From c4e6624f9a583cbe0dcac5052672d10304620d24 Mon Sep 17 00:00:00 2001 From: Steven Edwards Date: Tue, 25 Jan 2005 23:39:07 +0000 Subject: [PATCH 001/185] fixed building of setupapi. svn path=/trunk/; revision=13297 --- reactos/lib/setupapi/setupcab.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reactos/lib/setupapi/setupcab.c b/reactos/lib/setupapi/setupcab.c index 6fc3001ca49..84625bfefca 100644 --- a/reactos/lib/setupapi/setupcab.c +++ b/reactos/lib/setupapi/setupcab.c @@ -39,8 +39,8 @@ #include "fdi.h" #include "wine/unicode.h" -#include "msvcrt/fcntl.h" -#include "msvcrt/share.h" +#include "fcntl.h" +#include "share.h" #include "wine/debug.h" From 5078cef23f4aeaaa7583c8f86f4c33ac324add1e Mon Sep 17 00:00:00 2001 From: Alex Ionescu Date: Tue, 25 Jan 2005 23:40:05 +0000 Subject: [PATCH 002/185] Sorry for incorrect file comiited. svn path=/trunk/; revision=13298 --- reactos/config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reactos/config b/reactos/config index e12b11f269b..89b47afd28b 100644 --- a/reactos/config +++ b/reactos/config @@ -30,7 +30,7 @@ DBG := 0 # # Whether to compile with optimizations # -OPTIMIZED := 1 +OPTIMIZED := 0 # # Whether to compile a multiprocessor or single processor version @@ -45,7 +45,7 @@ ACPI := 0 # # whether to use a 3GB User, 1GB Kernel memory map # -3GB := 0 +3GB := 1 # # Which version of NDIS do we support up to? From e22aec2f4a454eba980049481e46ccf7be8c993c Mon Sep 17 00:00:00 2001 From: Steven Edwards Date: Tue, 25 Jan 2005 23:50:22 +0000 Subject: [PATCH 003/185] Forgot to add Makefiles svn path=/trunk/; revision=13299 --- reactos/lib/setupapi/Makefile.ros-template | 21 +++++++++++++++++++++ reactos/lib/setupapi/makefile | 9 +++++++++ 2 files changed, 30 insertions(+) create mode 100644 reactos/lib/setupapi/Makefile.ros-template create mode 100644 reactos/lib/setupapi/makefile diff --git a/reactos/lib/setupapi/Makefile.ros-template b/reactos/lib/setupapi/Makefile.ros-template new file mode 100644 index 00000000000..47cbad73413 --- /dev/null +++ b/reactos/lib/setupapi/Makefile.ros-template @@ -0,0 +1,21 @@ +# $Id: Makefile.ros-template 12852 2005-01-06 13:58:04Z mf $ + +TARGET_NAME = setupapi + +TARGET_OBJECTS = @C_SRCS@ + +TARGET_CFLAGS = @EXTRADEFS@ -D__REACTOS__ -D__WINESRC__ + +TARGET_SDKLIBS = @IMPORTS@ wine.a ntdll.a wine_unicode.a + +TARGET_BASE = $(TARGET_BASE_LIB_SETUPAPI) + +TARGET_RC_SRCS = @RC_SRCS@ +TARGET_RC_BINSRC = @RC_BINSRC@ +TARGET_RC_BINARIES = @RC_BINARIES@ + +default: all + +DEP_OBJECTS = $(TARGET_OBJECTS) + +include $(TOOLS_PATH)/depend.mk diff --git a/reactos/lib/setupapi/makefile b/reactos/lib/setupapi/makefile new file mode 100644 index 00000000000..9ba45e739ba --- /dev/null +++ b/reactos/lib/setupapi/makefile @@ -0,0 +1,9 @@ +# $Id: makefile 12852 2005-01-06 13:58:04Z mf $ + +PATH_TO_TOP = ../.. + +TARGET_TYPE = winedll + +include $(PATH_TO_TOP)/rules.mak + +include $(TOOLS_PATH)/helper.mk From e91cfb506502e48844d17998a4734c5c60db98eb Mon Sep 17 00:00:00 2001 From: Thomas Bluemel Date: Tue, 25 Jan 2005 23:57:57 +0000 Subject: [PATCH 004/185] enable the SeSystemtimePrivilege privilege which is required to call SetLocalTime svn path=/trunk/; revision=13300 --- reactos/lib/syssetup/wizard.c | 64 ++++++++++++++++++++++++++++++++++- 1 file changed, 63 insertions(+), 1 deletion(-) diff --git a/reactos/lib/syssetup/wizard.c b/reactos/lib/syssetup/wizard.c index 6ab8f1df3b3..4ddca5662b1 100644 --- a/reactos/lib/syssetup/wizard.c +++ b/reactos/lib/syssetup/wizard.c @@ -1121,6 +1121,62 @@ SetAutoDaylightInfo(HWND hwnd) } +static BOOL +SetSystemLocalTime(HWND hwnd, PSETUPDATA SetupData) +{ + HANDLE hToken; + TOKEN_PRIVILEGES priv, previouspriv; + BOOL Ret = FALSE; + + /* + * enable the SeSystemtimePrivilege privilege + */ + + if(OpenProcessToken(GetCurrentProcess(), + TOKEN_ADJUST_PRIVILEGES, + &hToken)) + { + priv.PrivilegeCount = 1; + priv.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED; + + if(LookupPrivilegeValue(NULL, + SE_SYSTEMTIME_NAME, + &priv.Privileges[0].Luid)) + { + if(AdjustTokenPrivileges(hToken, + FALSE, + &priv, + sizeof(previouspriv), + &previouspriv, + 0) && + GetLastError() == ERROR_SUCCESS) + { + /* + * we successfully enabled it, we're permitted to change the system time + */ + Ret = SetLocalTime(&SetupData->SystemTime); + + /* + * for the sake of security, restore the previous status again + */ + if(previouspriv.PrivilegeCount > 0) + { + AdjustTokenPrivileges(hToken, + FALSE, + &previouspriv, + 0, + NULL, + 0); + } + } + } + CloseHandle(hToken); + } + + return Ret; +} + + INT_PTR CALLBACK DateTimePageDlgProc(HWND hwndDlg, UINT uMsg, @@ -1167,7 +1223,13 @@ DateTimePageDlgProc(HWND hwndDlg, SetLocalTimeZone(GetDlgItem(hwndDlg, IDC_TIMEZONELIST), SetupData); SetAutoDaylightInfo(GetDlgItem(hwndDlg, IDC_AUTODAYLIGHT)); - SetLocalTime(&SetupData->SystemTime); + if(!SetSystemLocalTime(hwndDlg, SetupData)) + { + MessageBox(hwndDlg, + _T("Setup was unable to set the local time."), + _T("ReactOS Setup"), + MB_ICONWARNING | MB_OK); + } } break; From b55653e57c4e4be71aacd54a551ff8b03b931f28 Mon Sep 17 00:00:00 2001 From: Thomas Bluemel Date: Wed, 26 Jan 2005 00:03:05 +0000 Subject: [PATCH 005/185] 1. fixed NtCreateProcess to do some buffer checks and moved the implementation to an internal function so it can be shared with PsCreateSystemProcess(). Also don't leak so many resources on failures 2. processes should acuire a cid handle for their unique process id 3. fixed several instances in structures where process ids were DWORD/ULONG instead of HANDLEs svn path=/trunk/; revision=13301 --- reactos/include/csrss/csrss.h | 8 +- reactos/include/ddk/psfuncs.h | 2 +- reactos/include/ntos/zwtypes.h | 12 +- reactos/lib/kernel32/misc/console.c | 2 +- reactos/lib/kernel32/process/create.c | 4 +- reactos/lib/kernel32/process/proc.c | 2 +- reactos/lib/psapi/psapi.c | 2 +- reactos/lib/user32/misc/exit.c | 2 +- reactos/ntoskrnl/ex/mutant.c | 2 +- reactos/ntoskrnl/ex/sysinfo.c | 10 +- reactos/ntoskrnl/include/internal/mm.h | 6 +- reactos/ntoskrnl/include/internal/ps.h | 2 +- reactos/ntoskrnl/ke/profile.c | 14 +- reactos/ntoskrnl/mm/anonmem.c | 2 +- reactos/ntoskrnl/mm/pageop.c | 4 +- reactos/ntoskrnl/mm/rmap.c | 8 +- reactos/ntoskrnl/mm/section.c | 8 +- reactos/ntoskrnl/ps/cid.c | 2 +- reactos/ntoskrnl/ps/process.c | 704 +++++++++++++++--------- reactos/subsys/csrss/api/process.c | 12 +- reactos/subsys/csrss/api/wapi.c | 14 +- reactos/subsys/csrss/include/api.h | 8 +- reactos/subsys/csrss/win32csr/conio.c | 43 +- reactos/subsys/csrss/win32csr/exitros.c | 6 +- reactos/subsys/win32k/ntuser/misc.c | 6 +- reactos/w32api/include/ddk/ntapi.h | 8 +- reactos/w32api/include/ddk/ntifs.h | 2 +- 27 files changed, 538 insertions(+), 357 deletions(-) diff --git a/reactos/include/csrss/csrss.h b/reactos/include/csrss/csrss.h index e819f2cf5ba..d8376a2f6c4 100644 --- a/reactos/include/csrss/csrss.h +++ b/reactos/include/csrss/csrss.h @@ -19,7 +19,7 @@ typedef struct typedef struct { - ULONG NewProcessId; + HANDLE NewProcessId; ULONG Flags; PCONTROLDISPATCHER CtrlDispatcher; } CSRSS_CREATE_PROCESS_REQUEST, *PCSRSS_CREATE_PROCESS_REQUEST; @@ -359,7 +359,7 @@ typedef struct typedef struct { - DWORD ProcessId; + HANDLE ProcessId; } CSRSS_REGISTER_SERVICES_PROCESS_REQUEST, *PCSRSS_REGISTER_SERVICES_PROCESS_REQUEST; typedef struct @@ -476,7 +476,7 @@ typedef struct typedef struct { HANDLE Handle; - DWORD ProcessId; + HANDLE ProcessId; } CSRSS_DUPLICATE_HANDLE_REQUEST, *PCSRSS_DUPLICATE_HANDLE_REQUEST; typedef struct @@ -562,7 +562,7 @@ typedef struct typedef struct { - DWORD ProcessId; + HANDLE ProcessId; BOOL Register; } CSRSS_REGISTER_LOGON_PROCESS_REQUEST, *PCSRSS_REGISTER_LOGON_PROCESS_REQUEST; diff --git a/reactos/include/ddk/psfuncs.h b/reactos/include/ddk/psfuncs.h index 8ca1cac9c31..92bee18dc06 100644 --- a/reactos/include/ddk/psfuncs.h +++ b/reactos/include/ddk/psfuncs.h @@ -395,7 +395,7 @@ BOOLEAN STDCALL PsGetVersion (PULONG MajorVersion OPTIONAL, LARGE_INTEGER STDCALL PsGetProcessExitTime(VOID); BOOLEAN STDCALL PsIsThreadTerminating(struct _ETHREAD* Thread); -NTSTATUS STDCALL PsLookupProcessByProcessId(IN PVOID ProcessId, +NTSTATUS STDCALL PsLookupProcessByProcessId(IN HANDLE ProcessId, OUT PEPROCESS *Process); NTSTATUS STDCALL PsLookupProcessThreadByCid(IN PCLIENT_ID Cid, diff --git a/reactos/include/ntos/zwtypes.h b/reactos/include/ntos/zwtypes.h index 0432e9694c4..4b9c1b73d65 100755 --- a/reactos/include/ntos/zwtypes.h +++ b/reactos/include/ntos/zwtypes.h @@ -684,8 +684,8 @@ typedef struct _PROCESS_BASIC_INFORMATION PPEB PebBaseAddress; KAFFINITY AffinityMask; KPRIORITY BasePriority; - ULONG UniqueProcessId; - ULONG InheritedFromUniqueProcessId; + HANDLE UniqueProcessId; + HANDLE InheritedFromUniqueProcessId; } PROCESS_BASIC_INFORMATION, *PPROCESS_BASIC_INFORMATION; // Information class 1 @@ -1332,8 +1332,8 @@ typedef struct _SYSTEM_PROCESSES_NT4 LARGE_INTEGER KernelTime; UNICODE_STRING ProcessName; KPRIORITY BasePriority; - ULONG ProcessId; - ULONG InheritedFromProcessId; + HANDLE ProcessId; + HANDLE InheritedFromProcessId; ULONG HandleCount; ULONG Reserved2[2]; VM_COUNTERS VmCounters; @@ -1350,8 +1350,8 @@ typedef struct _SYSTEM_PROCESSES_NT5 LARGE_INTEGER KernelTime; UNICODE_STRING ProcessName; KPRIORITY BasePriority; - ULONG ProcessId; - ULONG InheritedFromProcessId; + HANDLE ProcessId; + HANDLE InheritedFromProcessId; ULONG HandleCount; ULONG Reserved2[2]; VM_COUNTERS VmCounters; diff --git a/reactos/lib/kernel32/misc/console.c b/reactos/lib/kernel32/misc/console.c index 0eb896d0ed9..58e13ffea8a 100644 --- a/reactos/lib/kernel32/misc/console.c +++ b/reactos/lib/kernel32/misc/console.c @@ -206,7 +206,7 @@ DuplicateConsoleHandle (HANDLE hConsole, Request.Type = CSRSS_DUPLICATE_HANDLE; Request.Data.DuplicateHandleRequest.Handle = hConsole; - Request.Data.DuplicateHandleRequest.ProcessId = GetCurrentProcessId(); + Request.Data.DuplicateHandleRequest.ProcessId = GetTeb()->Cid.UniqueProcess; Status = CsrClientCallServer(&Request, &Reply, sizeof(CSRSS_API_REQUEST), diff --git a/reactos/lib/kernel32/process/create.c b/reactos/lib/kernel32/process/create.c index 6589c974f35..4c0c0c48d5c 100644 --- a/reactos/lib/kernel32/process/create.c +++ b/reactos/lib/kernel32/process/create.c @@ -1157,9 +1157,9 @@ CreateProcessW &ProcessBasicInfo, sizeof(ProcessBasicInfo), &retlen); - DPRINT("ProcessBasicInfo.UniqueProcessId %d\n", + DPRINT("ProcessBasicInfo.UniqueProcessId 0x%x\n", ProcessBasicInfo.UniqueProcessId); - lpProcessInformation->dwProcessId = ProcessBasicInfo.UniqueProcessId; + lpProcessInformation->dwProcessId = (DWORD)ProcessBasicInfo.UniqueProcessId; /* * Tell the csrss server we are creating a new process diff --git a/reactos/lib/kernel32/process/proc.c b/reactos/lib/kernel32/process/proc.c index 5b83af6b2a8..104b837a3e6 100644 --- a/reactos/lib/kernel32/process/proc.c +++ b/reactos/lib/kernel32/process/proc.c @@ -324,7 +324,7 @@ GetProcessId(HANDLE Process) return 0; } - return ProcessBasic.UniqueProcessId; + return (DWORD)ProcessBasic.UniqueProcessId; } diff --git a/reactos/lib/psapi/psapi.c b/reactos/lib/psapi/psapi.c index 4e69e4e380b..29c4029cd98 100644 --- a/reactos/lib/psapi/psapi.c +++ b/reactos/lib/psapi/psapi.c @@ -83,7 +83,7 @@ EnumProcessesCallback(IN PSYSTEM_PROCESSES CurrentProcess, } /* return current process */ - *Context->lpidProcess = CurrentProcess->ProcessId; + *Context->lpidProcess = (DWORD)CurrentProcess->ProcessId; /* go to next array slot */ Context->lpidProcess++; diff --git a/reactos/lib/user32/misc/exit.c b/reactos/lib/user32/misc/exit.c index 595804a2ef8..083fa4936f0 100644 --- a/reactos/lib/user32/misc/exit.c +++ b/reactos/lib/user32/misc/exit.c @@ -104,7 +104,7 @@ RegisterServicesProcess(DWORD ServicesProcessId) NTSTATUS Status; Request.Type = CSRSS_REGISTER_SERVICES_PROCESS; - Request.Data.RegisterServicesProcessRequest.ProcessId = ServicesProcessId; + Request.Data.RegisterServicesProcessRequest.ProcessId = (HANDLE)ServicesProcessId; Status = CsrClientCallServer(&Request, &Reply, diff --git a/reactos/ntoskrnl/ex/mutant.c b/reactos/ntoskrnl/ex/mutant.c index 33e644441be..392328403b8 100644 --- a/reactos/ntoskrnl/ex/mutant.c +++ b/reactos/ntoskrnl/ex/mutant.c @@ -196,7 +196,7 @@ NtOpenMutant(OUT PHANDLE MutantHandle, KPROCESSOR_MODE PreviousMode; NTSTATUS Status = STATUS_SUCCESS; - DPRINT1("NtOpenMutant(0x%x, 0x%x, 0x%x)\n", MutantHandle, DesiredAccess, ObjectAttributes); + DPRINT("NtOpenMutant(0x%x, 0x%x, 0x%x)\n", MutantHandle, DesiredAccess, ObjectAttributes); PreviousMode = ExGetPreviousMode(); diff --git a/reactos/ntoskrnl/ex/sysinfo.c b/reactos/ntoskrnl/ex/sysinfo.c index a9d26be80af..10e36999ebd 100644 --- a/reactos/ntoskrnl/ex/sysinfo.c +++ b/reactos/ntoskrnl/ex/sysinfo.c @@ -401,7 +401,7 @@ QSI_DEF(SystemPerformanceInformation) return (STATUS_INFO_LENGTH_MISMATCH); } - PsLookupProcessByProcessId((PVOID) 1, &TheIdleProcess); + TheIdleProcess = PsInitialSystemProcess; /* FIXME */ Spi->IdleTime.QuadPart = TheIdleProcess->Pcb.KernelTime * 100000LL; @@ -505,8 +505,6 @@ QSI_DEF(SystemPerformanceInformation) Spi->SecondLevelTbFills = 0; /* FIXME */ Spi->SystemCalls = 0; /* FIXME */ - ObDereferenceObject(TheIdleProcess); - return (STATUS_SUCCESS); } @@ -609,7 +607,7 @@ QSI_DEF(SystemProcessInformation) SpiCur->BasePriority = pr->Pcb.BasePriority; SpiCur->ProcessId = pr->UniqueProcessId; - SpiCur->InheritedFromProcessId = (DWORD)(pr->InheritedFromUniqueProcessId); + SpiCur->InheritedFromProcessId = pr->InheritedFromUniqueProcessId; SpiCur->HandleCount = ObpGetHandleCountByHandleTable(&pr->HandleTable); SpiCur->VmCounters.PeakVirtualSize = pr->PeakVirtualSize; SpiCur->VmCounters.VirtualSize = pr->VirtualSize.QuadPart; @@ -949,7 +947,7 @@ QSI_DEF(SystemFullMemoryInformation) } DPRINT("SystemFullMemoryInformation\n"); - PsLookupProcessByProcessId((PVOID) 1, &TheIdleProcess); + TheIdleProcess = PsInitialSystemProcess; /* FIXME */ DPRINT("PID: %d, KernelTime: %u PFFree: %d PFUsed: %d\n", TheIdleProcess->UniqueProcessId, @@ -963,8 +961,6 @@ QSI_DEF(SystemFullMemoryInformation) *Spi = MiMemoryConsumers[MC_USER].PagesUsed; - ObDereferenceObject(TheIdleProcess); - return (STATUS_SUCCESS); } diff --git a/reactos/ntoskrnl/include/internal/mm.h b/reactos/ntoskrnl/include/internal/mm.h index 93cc04cc9b6..cf40567a127 100644 --- a/reactos/ntoskrnl/include/internal/mm.h +++ b/reactos/ntoskrnl/include/internal/mm.h @@ -296,7 +296,7 @@ typedef struct _MM_PAGEOP * These fields are used to identify the operation if it is against a * virtual memory area. */ - ULONG Pid; + HANDLE Pid; PVOID Address; /* * These fields are used to identify the operation if it is against a @@ -569,10 +569,10 @@ VOID MmReleasePageOp(PMM_PAGEOP PageOp); PMM_PAGEOP -MmGetPageOp(PMEMORY_AREA MArea, ULONG Pid, PVOID Address, +MmGetPageOp(PMEMORY_AREA MArea, HANDLE Pid, PVOID Address, PMM_SECTION_SEGMENT Segment, ULONG Offset, ULONG OpType, BOOL First); PMM_PAGEOP -MmCheckForPageOp(PMEMORY_AREA MArea, ULONG Pid, PVOID Address, +MmCheckForPageOp(PMEMORY_AREA MArea, HANDLE Pid, PVOID Address, PMM_SECTION_SEGMENT Segment, ULONG Offset); VOID MmInitializePageOp(VOID); diff --git a/reactos/ntoskrnl/include/internal/ps.h b/reactos/ntoskrnl/include/internal/ps.h index 8e2110c0362..28f47535dcf 100644 --- a/reactos/ntoskrnl/include/internal/ps.h +++ b/reactos/ntoskrnl/include/internal/ps.h @@ -323,7 +323,7 @@ struct _EPROCESS /* Unknown. */ PKTHREAD LockOwner; /* 090 */ /* Process id. */ - ULONG UniqueProcessId; /* 094 */ + HANDLE UniqueProcessId; /* 094 */ /* Unknown. */ LIST_ENTRY ActiveProcessLinks; /* 098 */ /* Unknown. */ diff --git a/reactos/ntoskrnl/ke/profile.c b/reactos/ntoskrnl/ke/profile.c index 921d931b80f..9333ec52ff4 100644 --- a/reactos/ntoskrnl/ke/profile.c +++ b/reactos/ntoskrnl/ke/profile.c @@ -140,13 +140,13 @@ KiInsertProfile(PKPROFILE Profile) } else { - ULONG Pid; + HANDLE Pid; PKPROCESS_PROFILE current; PLIST_ENTRY current_entry; PLIST_ENTRY ListHead; Pid = Profile->Process->UniqueProcessId; - ListHead = &ProcessProfileListHashTable[Pid % PROFILE_HASH_TABLE_SIZE]; + ListHead = &ProcessProfileListHashTable[(ULONG_PTR)Pid % PROFILE_HASH_TABLE_SIZE]; current_entry = ListHead; while(current_entry != ListHead) @@ -154,7 +154,7 @@ KiInsertProfile(PKPROFILE Profile) current = CONTAINING_RECORD(current_entry, KPROCESS_PROFILE, ListEntry); - if (current->Pid == (HANDLE)Pid) + if (current->Pid == Pid) { KiInsertProfileIntoProcess(¤t->ProfileListHead, Profile); KeReleaseSpinLock(&ProfileListLock, oldIrql); @@ -166,7 +166,7 @@ KiInsertProfile(PKPROFILE Profile) current = ExAllocatePool(NonPagedPool, sizeof(KPROCESS_PROFILE)); - current->Pid = (HANDLE)Pid; + current->Pid = Pid; InitializeListHead(¤t->ProfileListHead); InsertTailList(ListHead, ¤t->ListEntry); @@ -188,7 +188,7 @@ VOID KiRemoveProfile(PKPROFILE Profile) } else { - ULONG Pid; + HANDLE Pid; PLIST_ENTRY ListHead; PKPROCESS_PROFILE current; PLIST_ENTRY current_entry; @@ -196,7 +196,7 @@ VOID KiRemoveProfile(PKPROFILE Profile) RemoveEntryList(&Profile->ListEntry); Pid = Profile->Process->UniqueProcessId; - ListHead = &ProcessProfileListHashTable[Pid % PROFILE_HASH_TABLE_SIZE]; + ListHead = &ProcessProfileListHashTable[(ULONG_PTR)Pid % PROFILE_HASH_TABLE_SIZE]; current_entry = ListHead; while(current_entry != ListHead) @@ -204,7 +204,7 @@ VOID KiRemoveProfile(PKPROFILE Profile) current = CONTAINING_RECORD(current_entry, KPROCESS_PROFILE, ListEntry); - if (current->Pid == (HANDLE)Pid) + if (current->Pid == Pid) { if (IsListEmpty(¤t->ProfileListHead)) { diff --git a/reactos/ntoskrnl/mm/anonmem.c b/reactos/ntoskrnl/mm/anonmem.c index 8310bb68231..a023cc5679a 100644 --- a/reactos/ntoskrnl/mm/anonmem.c +++ b/reactos/ntoskrnl/mm/anonmem.c @@ -272,7 +272,7 @@ MmNotPresentFaultVirtualMemory(PMADDRESS_SPACE AddressSpace, /* * Get or create a page operation */ - PageOp = MmGetPageOp(MemoryArea, (ULONG)MemoryArea->Process->UniqueProcessId, + PageOp = MmGetPageOp(MemoryArea, MemoryArea->Process->UniqueProcessId, (PVOID)PAGE_ROUND_DOWN(Address), NULL, 0, MM_PAGEOP_PAGEIN, FALSE); if (PageOp == NULL) diff --git a/reactos/ntoskrnl/mm/pageop.c b/reactos/ntoskrnl/mm/pageop.c index e0f2c2f2773..e51bc4c9e56 100644 --- a/reactos/ntoskrnl/mm/pageop.c +++ b/reactos/ntoskrnl/mm/pageop.c @@ -67,7 +67,7 @@ MmReleasePageOp(PMM_PAGEOP PageOp) } PMM_PAGEOP -MmCheckForPageOp(PMEMORY_AREA MArea, ULONG Pid, PVOID Address, +MmCheckForPageOp(PMEMORY_AREA MArea, HANDLE Pid, PVOID Address, PMM_SECTION_SEGMENT Segment, ULONG Offset) { ULONG_PTR Hash; @@ -129,7 +129,7 @@ MmCheckForPageOp(PMEMORY_AREA MArea, ULONG Pid, PVOID Address, } PMM_PAGEOP -MmGetPageOp(PMEMORY_AREA MArea, ULONG Pid, PVOID Address, +MmGetPageOp(PMEMORY_AREA MArea, HANDLE Pid, PVOID Address, PMM_SECTION_SEGMENT Segment, ULONG Offset, ULONG OpType, BOOL First) /* * FUNCTION: Get a page operation descriptor corresponding to diff --git a/reactos/ntoskrnl/mm/rmap.c b/reactos/ntoskrnl/mm/rmap.c index 4302fb376b4..33c1968a80a 100644 --- a/reactos/ntoskrnl/mm/rmap.c +++ b/reactos/ntoskrnl/mm/rmap.c @@ -136,7 +136,7 @@ MmWritePagePhysicalAddress(PFN_TYPE Page) /* * Get or create a pageop */ - PageOp = MmGetPageOp(MemoryArea, 0, 0, + PageOp = MmGetPageOp(MemoryArea, NULL, 0, MemoryArea->Data.SectionData.Segment, Offset, MM_PAGEOP_PAGEOUT, TRUE); @@ -163,7 +163,7 @@ MmWritePagePhysicalAddress(PFN_TYPE Page) } else if (Type == MEMORY_AREA_VIRTUAL_MEMORY) { - PageOp = MmGetPageOp(MemoryArea, Address < (PVOID)KERNEL_BASE ? Process->UniqueProcessId : 0, + PageOp = MmGetPageOp(MemoryArea, Address < (PVOID)KERNEL_BASE ? Process->UniqueProcessId : NULL, Address, NULL, 0, MM_PAGEOP_PAGEOUT, TRUE); if (PageOp == NULL) @@ -260,7 +260,7 @@ MmPageOutPhysicalAddress(PFN_TYPE Page) /* * Get or create a pageop */ - PageOp = MmGetPageOp(MemoryArea, 0, 0, + PageOp = MmGetPageOp(MemoryArea, NULL, 0, MemoryArea->Data.SectionData.Segment, Offset, MM_PAGEOP_PAGEOUT, TRUE); if (PageOp == NULL) @@ -286,7 +286,7 @@ MmPageOutPhysicalAddress(PFN_TYPE Page) } else if (Type == MEMORY_AREA_VIRTUAL_MEMORY) { - PageOp = MmGetPageOp(MemoryArea, Address < (PVOID)KERNEL_BASE ? Process->UniqueProcessId : 0, + PageOp = MmGetPageOp(MemoryArea, Address < (PVOID)KERNEL_BASE ? Process->UniqueProcessId : NULL, Address, NULL, 0, MM_PAGEOP_PAGEOUT, TRUE); if (PageOp == NULL) { diff --git a/reactos/ntoskrnl/mm/section.c b/reactos/ntoskrnl/mm/section.c index b8c589203e2..e6fc7868537 100644 --- a/reactos/ntoskrnl/mm/section.c +++ b/reactos/ntoskrnl/mm/section.c @@ -665,7 +665,7 @@ MmNotPresentFaultSectionView(PMADDRESS_SPACE AddressSpace, /* * Get or create a page operation descriptor */ - PageOp = MmGetPageOp(MemoryArea, 0, 0, Segment, Offset, MM_PAGEOP_PAGEIN, FALSE); + PageOp = MmGetPageOp(MemoryArea, NULL, 0, Segment, Offset, MM_PAGEOP_PAGEIN, FALSE); if (PageOp == NULL) { DPRINT1("MmGetPageOp failed\n"); @@ -1187,7 +1187,7 @@ MmAccessFaultSectionView(PMADDRESS_SPACE AddressSpace, /* * Get or create a pageop */ - PageOp = MmGetPageOp(MemoryArea, 0, 0, Segment, Offset, + PageOp = MmGetPageOp(MemoryArea, NULL, 0, Segment, Offset, MM_PAGEOP_ACCESSFAULT, FALSE); if (PageOp == NULL) { @@ -3589,7 +3589,7 @@ MmFreeSectionPage(PVOID Context, MEMORY_AREA* MemoryArea, PVOID Address, Section = MArea->Data.SectionData.Section; Segment = MArea->Data.SectionData.Segment; - PageOp = MmCheckForPageOp(MArea, 0, NULL, Segment, Offset); + PageOp = MmCheckForPageOp(MArea, NULL, NULL, Segment, Offset); while (PageOp) { @@ -3606,7 +3606,7 @@ MmFreeSectionPage(PVOID Context, MEMORY_AREA* MemoryArea, PVOID Address, MmLockAddressSpace(&MArea->Process->AddressSpace); MmLockSectionSegment(Segment); MmspCompleteAndReleasePageOp(PageOp); - PageOp = MmCheckForPageOp(MArea, 0, NULL, Segment, Offset); + PageOp = MmCheckForPageOp(MArea, NULL, NULL, Segment, Offset); } Entry = MmGetPageEntrySectionSegment(Segment, Offset); diff --git a/reactos/ntoskrnl/ps/cid.c b/reactos/ntoskrnl/ps/cid.c index 2d6da148b9f..c816566aef4 100644 --- a/reactos/ntoskrnl/ps/cid.c +++ b/reactos/ntoskrnl/ps/cid.c @@ -70,7 +70,7 @@ PsCreateCidHandle(PVOID Object, POBJECT_TYPE ObjectType, PHANDLE Handle) cido->Obj.Object = Object; KeAcquireSpinLock(&CidLock, &oldIrql); - cido->Handle = (HANDLE)(++CidCounter); + cido->Handle = (HANDLE)((ULONG_PTR)(++CidCounter) << 2); InsertTailList(&CidHead, &cido->Entry); KeReleaseSpinLock(&CidLock, oldIrql); diff --git a/reactos/ntoskrnl/ps/process.c b/reactos/ntoskrnl/ps/process.c index 88379c73d6c..34a1e2ca4ea 100644 --- a/reactos/ntoskrnl/ps/process.c +++ b/reactos/ntoskrnl/ps/process.c @@ -23,7 +23,6 @@ POBJECT_TYPE EXPORTED PsProcessType = NULL; LIST_ENTRY PsProcessListHead; static KSPIN_LOCK PsProcessListLock; -static ULONG PiNextProcessUniqueId = 0; /* TODO */ static LARGE_INTEGER ShortPsLockDelay, PsLockTimeout; static GENERIC_MAPPING PiProcessMapping = {STANDARD_RIGHTS_READ | PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, @@ -192,26 +191,54 @@ NtOpenProcessTokenEx( { PACCESS_TOKEN Token; HANDLE hToken; - NTSTATUS Status; + KPROCESSOR_MODE PreviousMode; + NTSTATUS Status = STATUS_SUCCESS; + + PreviousMode = ExGetPreviousMode(); + + if(PreviousMode == UserMode) + { + _SEH_TRY + { + ProbeForWrite(TokenHandle, + sizeof(HANDLE), + sizeof(ULONG)); + } + _SEH_HANDLE + { + Status = _SEH_GetExceptionCode(); + } + _SEH_END; + + if(!NT_SUCCESS(Status)) + { + return Status; + } + } Status = PsOpenTokenOfProcess(ProcessHandle, &Token); - if (!NT_SUCCESS(Status)) - { - return(Status); - } - Status = ObCreateHandle(PsGetCurrentProcess(), - Token, - DesiredAccess, - FALSE, - &hToken); - ObDereferenceObject(Token); - if(NT_SUCCESS(Status)) + { + Status = ObCreateHandle(PsGetCurrentProcess(), + Token, + DesiredAccess, + FALSE, + &hToken); + ObDereferenceObject(Token); + + _SEH_TRY { - Status = MmCopyToCaller(TokenHandle, &hToken, sizeof(HANDLE)); + *TokenHandle = hToken; } - return(Status); + _SEH_HANDLE + { + Status = _SEH_GetExceptionCode(); + } + _SEH_END; + } + + return Status; } @@ -224,7 +251,7 @@ PsReferencePrimaryToken(PEPROCESS Process) ObReferenceObjectByPointer(Process->Token, TOKEN_ALL_ACCESS, SepTokenObjectType, - UserMode); + KernelMode); return(Process->Token); } @@ -239,16 +266,16 @@ PsOpenTokenOfProcess(HANDLE ProcessHandle, Status = ObReferenceObjectByHandle(ProcessHandle, PROCESS_QUERY_INFORMATION, PsProcessType, - UserMode, + ExGetPreviousMode(), (PVOID*)&Process, NULL); - if (!NT_SUCCESS(Status)) - { - return(Status); - } - *Token = PsReferencePrimaryToken(Process); - ObDereferenceObject(Process); - return(STATUS_SUCCESS); + if(NT_SUCCESS(Status)) + { + *Token = PsReferencePrimaryToken(Process); + ObDereferenceObject(Process); + } + + return Status; } @@ -269,7 +296,7 @@ PiKillMostProcesses(VOID) current_entry = current_entry->Flink; if (current->UniqueProcessId != PsInitialSystemProcess->UniqueProcessId && - current->UniqueProcessId != (ULONG)PsGetCurrentProcessId()) + current->UniqueProcessId != PsGetCurrentProcessId()) { PiTerminateProcessThreads(current, STATUS_SUCCESS); } @@ -373,8 +400,17 @@ PsInitProcessManagment(VOID) } #endif - PsInitialSystemProcess->UniqueProcessId = - InterlockedIncrementUL(&PiNextProcessUniqueId); /* TODO */ + strcpy(PsInitialSystemProcess->ImageFileName, "System"); + + Status = PsCreateCidHandle(PsInitialSystemProcess, + PsProcessType, + &PsInitialSystemProcess->UniqueProcessId); + if(!NT_SUCCESS(Status)) + { + DPRINT1("Failed to create CID handle (unique process id) for the system process!\n"); + return; + } + PsInitialSystemProcess->Win32WindowStation = (HANDLE)0; KeAcquireSpinLock(&PsProcessListLock, &oldIrql); @@ -382,8 +418,6 @@ PsInitProcessManagment(VOID) &PsInitialSystemProcess->ProcessListEntry); InitializeListHead(&PsInitialSystemProcess->ThreadListHead); KeReleaseSpinLock(&PsProcessListLock, oldIrql); - - strcpy(PsInitialSystemProcess->ImageFileName, "System"); SepCreateSystemProcessToken(PsInitialSystemProcess); } @@ -610,109 +644,112 @@ IoGetCurrentProcess(VOID) } } -/* - * @implemented - */ -NTSTATUS STDCALL -PsCreateSystemProcess(PHANDLE ProcessHandle, - ACCESS_MASK DesiredAccess, - POBJECT_ATTRIBUTES ObjectAttributes) -{ - HANDLE SystemProcessHandle; - NTSTATUS Status; - - /* FIXME - what about security? should there be any privilege checks or something - security related? */ - - Status = ObCreateHandle(PsGetCurrentProcess(), - PsInitialSystemProcess, - PROCESS_CREATE_PROCESS | PROCESS_CREATE_THREAD | PROCESS_QUERY_INFORMATION, - FALSE, - &SystemProcessHandle); - if(!NT_SUCCESS(Status)) - { - DPRINT1("Failed to create a handle for the system process!\n"); - return Status; - } - - Status = NtCreateProcess(ProcessHandle, - DesiredAccess, - ObjectAttributes, - SystemProcessHandle, - FALSE, - NULL, - NULL, - NULL); - - NtClose(SystemProcessHandle); - - return Status; -} - -NTSTATUS STDCALL -NtCreateProcess(OUT PHANDLE ProcessHandle, +NTSTATUS +PspCreateProcess(OUT PHANDLE ProcessHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL, - IN HANDLE ParentProcess, + IN HANDLE ParentProcess OPTIONAL, IN BOOLEAN InheritObjectTable, IN HANDLE SectionHandle OPTIONAL, IN HANDLE DebugPort OPTIONAL, IN HANDLE ExceptionPort OPTIONAL) -/* - * FUNCTION: Creates a process. - * ARGUMENTS: - * ProcessHandle (OUT) = Caller supplied storage for the resulting - * handle - * DesiredAccess = Specifies the allowed or desired access to the - * process can be a combination of - * STANDARD_RIGHTS_REQUIRED| .. - * ObjectAttribute = Initialized attributes for the object, contains - * the rootdirectory and the filename - * ParentProcess = Handle to the parent process. - * InheritObjectTable = Specifies to inherit the objects of the parent - * process if true. - * SectionHandle = Handle to a section object to back the image file - * DebugPort = Handle to a DebugPort if NULL the system default debug - * port will be used. - * ExceptionPort = Handle to a exception port. - * REMARKS: - * This function maps to the win32 CreateProcess. - * RETURNS: Status - */ { + HANDLE hProcess; PEPROCESS Process; PEPROCESS pParentProcess; PKPROCESS KProcess; - NTSTATUS Status; KIRQL oldIrql; PVOID LdrStartupAddr; - PVOID ImageBase; - PEPORT pDebugPort; - PEPORT pExceptionPort; PVOID BaseAddress; PMEMORY_AREA MemoryArea; PHYSICAL_ADDRESS BoundaryAddressMultiple; + KPROCESSOR_MODE PreviousMode; + PVOID ImageBase = NULL; + PEPORT pDebugPort = NULL; + PEPORT pExceptionPort = NULL; + PSECTION_OBJECT SectionObject = NULL; + NTSTATUS Status = STATUS_SUCCESS; - DPRINT("NtCreateProcess(ObjectAttributes %x)\n",ObjectAttributes); + DPRINT("PspCreateProcess(ObjectAttributes %x)\n", ObjectAttributes); + + PreviousMode = ExGetPreviousMode(); BoundaryAddressMultiple.QuadPart = 0; - Status = ObReferenceObjectByHandle(ParentProcess, - PROCESS_CREATE_PROCESS, - PsProcessType, - ExGetPreviousMode(), - (PVOID*)&pParentProcess, - NULL); - if (!NT_SUCCESS(Status)) + if(ParentProcess != NULL) + { + Status = ObReferenceObjectByHandle(ParentProcess, + PROCESS_CREATE_PROCESS, + PsProcessType, + PreviousMode, + (PVOID*)&pParentProcess, + NULL); + if (!NT_SUCCESS(Status)) + { + DPRINT1("Failed to reference the parent process: Status: 0x%x\n", Status); + return(Status); + } + } + else + { + pParentProcess = NULL; + } + + /* + * Add the debug port + */ + if (DebugPort != NULL) { - DPRINT("NtCreateProcess() = %x\n",Status); - return(Status); + Status = ObReferenceObjectByHandle(DebugPort, + PORT_ALL_ACCESS, + LpcPortObjectType, + PreviousMode, + (PVOID*)&pDebugPort, + NULL); + if (!NT_SUCCESS(Status)) + { + DPRINT1("Failed to reference the debug port: Status: 0x%x\n", Status); + goto exitdereferenceobjects; + } } - Status = ObCreateObject(ExGetPreviousMode(), + /* + * Add the exception port + */ + if (ExceptionPort != NULL) + { + Status = ObReferenceObjectByHandle(ExceptionPort, + PORT_ALL_ACCESS, + LpcPortObjectType, + PreviousMode, + (PVOID*)&pExceptionPort, + NULL); + if (!NT_SUCCESS(Status)) + { + DPRINT1("Failed to reference the exception port: Status: 0x%x\n", Status); + goto exitdereferenceobjects; + } + } + + if (SectionHandle != NULL) + { + Status = ObReferenceObjectByHandle(SectionHandle, + 0, + MmSectionObjectType, + PreviousMode, + (PVOID*)&SectionObject, + NULL); + if (!NT_SUCCESS(Status)) + { + DPRINT1("Failed to reference process image section: Status: 0x%x\n", Status); + goto exitdereferenceobjects; + } + } + + Status = ObCreateObject(PreviousMode, PsProcessType, ObjectAttributes, - ExGetPreviousMode(), + PreviousMode, NULL, sizeof(EPROCESS), 0, @@ -720,32 +757,92 @@ NtCreateProcess(OUT PHANDLE ProcessHandle, (PVOID*)&Process); if (!NT_SUCCESS(Status)) { - ObDereferenceObject(pParentProcess); - DPRINT("ObCreateObject() = %x\n",Status); - return(Status); + DPRINT1("Failed to create process object, Status: 0x%x\n", Status); + +exitdereferenceobjects: + if(SectionObject != NULL) + ObDereferenceObject(SectionObject); + if(pExceptionPort != NULL) + ObDereferenceObject(pExceptionPort); + if(pDebugPort != NULL) + ObDereferenceObject(pDebugPort); + if(pParentProcess != NULL) + ObDereferenceObject(pParentProcess); + return Status; } - Status = ObInsertObject ((PVOID)Process, - NULL, - DesiredAccess, - 0, - NULL, - ProcessHandle); - if (!NT_SUCCESS(Status)) - { - ObDereferenceObject (Process); - ObDereferenceObject (pParentProcess); - DPRINT("ObInsertObject() = %x\n",Status); - return Status; - } + KProcess = &Process->Pcb; + + RtlZeroMemory(Process, sizeof(EPROCESS)); + + Status = PsCreateCidHandle(Process, + PsProcessType, + &Process->UniqueProcessId); + if(!NT_SUCCESS(Status)) + { + DPRINT1("Failed to create CID handle (unique process ID)! Status: 0x%x\n", Status); + ObDereferenceObject(Process); + goto exitdereferenceobjects; + } - KeInitializeDispatcherHeader(&Process->Pcb.DispatcherHeader, + Process->DebugPort = pDebugPort; + Process->ExceptionPort = pExceptionPort; + + if(SectionObject != NULL) + { + UNICODE_STRING FileName; + PWCHAR szSrc; + PCHAR szDest; + USHORT lnFName = 0; + + /* + * Determine the image file name and save it to the EPROCESS structure + */ + + FileName = SectionObject->FileObject->FileName; + szSrc = (PWCHAR)(FileName.Buffer + (FileName.Length / sizeof(WCHAR)) - 1); + while(szSrc >= FileName.Buffer) + { + if(*szSrc == L'\\') + { + szSrc++; + break; + } + else + { + szSrc--; + lnFName++; + } + } + + /* copy the image file name to the process and truncate it to 15 characters + if necessary */ + szDest = Process->ImageFileName; + lnFName = min(lnFName, sizeof(Process->ImageFileName) - 1); + while(lnFName-- > 0) + { + *(szDest++) = (UCHAR)*(szSrc++); + } + /* *szDest = '\0'; */ + } + + KeInitializeDispatcherHeader(&KProcess->DispatcherHeader, InternalProcessType, sizeof(EPROCESS), FALSE); - KProcess = &Process->Pcb; + /* Inherit parent process's affinity. */ - KProcess->Affinity = pParentProcess->Pcb.Affinity; + if(pParentProcess != NULL) + { + KProcess->Affinity = pParentProcess->Pcb.Affinity; + Process->InheritedFromUniqueProcessId = pParentProcess->UniqueProcessId; + Process->SessionId = pParentProcess->SessionId; + } + else + { + KProcess->Affinity = KeActiveProcessors; + } + KProcess->BasePriority = PROCESS_PRIO_NORMAL; KProcess->IopmOffset = 0xffff; KProcess->LdtDescriptor[0] = 0; @@ -755,13 +852,11 @@ NtCreateProcess(OUT PHANDLE ProcessHandle, KProcess->AutoAlignment = 0; MmInitializeAddressSpace(Process, &Process->AddressSpace); - Process->UniqueProcessId = InterlockedIncrementUL(&PiNextProcessUniqueId); /* TODO */ - Process->InheritedFromUniqueProcessId = - (HANDLE)pParentProcess->UniqueProcessId; + ObCreateHandleTable(pParentProcess, InheritObjectTable, Process); - MmCopyMmInfo(ParentProcess, Process); + MmCopyMmInfo(pParentProcess ? pParentProcess : PsInitialSystemProcess, Process); KeInitializeEvent(&Process->LockEvent, SynchronizationEvent, FALSE); Process->LockCount = 0; @@ -777,50 +872,6 @@ NtCreateProcess(OUT PHANDLE ProcessHandle, ExInitializeFastMutex(&Process->TebLock); Process->Pcb.State = PROCESS_STATE_ACTIVE; - /* - * Add the debug port - */ - if (DebugPort != NULL) - { - Status = ObReferenceObjectByHandle(DebugPort, - PORT_ALL_ACCESS, - LpcPortObjectType, - UserMode, - (PVOID*)&pDebugPort, - NULL); - if (!NT_SUCCESS(Status)) - { - ObDereferenceObject(Process); - ObDereferenceObject(pParentProcess); - ZwClose(*ProcessHandle); - *ProcessHandle = NULL; - return(Status); - } - Process->DebugPort = pDebugPort; - } - - /* - * Add the exception port - */ - if (ExceptionPort != NULL) - { - Status = ObReferenceObjectByHandle(ExceptionPort, - PORT_ALL_ACCESS, - LpcPortObjectType, - UserMode, - (PVOID*)&pExceptionPort, - NULL); - if (!NT_SUCCESS(Status)) - { - ObDereferenceObject(Process); - ObDereferenceObject(pParentProcess); - ZwClose(*ProcessHandle); - *ProcessHandle = NULL; - return(Status); - } - Process->ExceptionPort = pExceptionPort; - } - /* * Now we have created the process proper */ @@ -843,7 +894,8 @@ NtCreateProcess(OUT PHANDLE ProcessHandle, { MmUnlockAddressSpace(&Process->AddressSpace); DPRINT1("Failed to protect the highest 64KB of the process address space\n"); - KEBUGCHECK(0); + ObDereferenceObject(Process); + goto exitdereferenceobjects; } /* Protect the lowest 64KB of the process address space */ @@ -863,7 +915,8 @@ NtCreateProcess(OUT PHANDLE ProcessHandle, { MmUnlockAddressSpace(&Process->AddressSpace); DPRINT1("Failed to protect the lowest 64KB of the process address space\n"); - KEBUGCHECK(0); + ObDereferenceObject(Process); + goto exitdereferenceobjects; } #endif @@ -883,7 +936,8 @@ NtCreateProcess(OUT PHANDLE ProcessHandle, { MmUnlockAddressSpace(&Process->AddressSpace); DPRINT1("Failed to protect the memory above the shared user page\n"); - KEBUGCHECK(0); + ObDereferenceObject(Process); + goto exitdereferenceobjects; } /* Create the shared data page */ @@ -901,131 +955,101 @@ NtCreateProcess(OUT PHANDLE ProcessHandle, MmUnlockAddressSpace(&Process->AddressSpace); if (!NT_SUCCESS(Status)) { - DPRINT1("Failed to create shared data page\n"); - KEBUGCHECK(0); + MmUnlockAddressSpace(&Process->AddressSpace); /* FIXME ? */ + DPRINT1("Failed to create shared data page\n"); + ObDereferenceObject(Process); + goto exitdereferenceobjects; } - if (SectionHandle != NULL) +#if 1 + /* + * FIXME - the handle should be created after all things are initialized, NOT HERE! + */ + Status = ObInsertObject ((PVOID)Process, + NULL, + DesiredAccess, + 0, + NULL, + &hProcess); + if (!NT_SUCCESS(Status)) { - PSECTION_OBJECT SectionObject; - UNICODE_STRING FileName; - PWCHAR szSrc; - PCHAR szDest; - USHORT lnFName = 0; - - /* - * Determine the image file name and save it to the EPROCESS structure - */ - Status = ObReferenceObjectByHandle(SectionHandle, - 0, - MmSectionObjectType, - UserMode, - (PVOID*)&SectionObject, - NULL); - if (!NT_SUCCESS(Status)) - { - DbgPrint("Failed to reference section object\n", Status); - ObDereferenceObject(Process); - ObDereferenceObject(pParentProcess); - return(Status); - } - - FileName = SectionObject->FileObject->FileName; - szSrc = (PWCHAR)(FileName.Buffer + (FileName.Length / sizeof(WCHAR)) - 1); - while(szSrc >= FileName.Buffer) - { - if(*szSrc == L'\\') - { - szSrc++; - break; - } - else - { - szSrc--; - lnFName++; - } - } - - /* copy the image file name to the process and truncate it to 15 characters - if necessary */ - szDest = Process->ImageFileName; - lnFName = min(lnFName, sizeof(Process->ImageFileName) - 1); - while(lnFName-- > 0) - { - *(szDest++) = (UCHAR)*(szSrc++); - } - *szDest = '\0'; - - - ObDereferenceObject(SectionObject); - } - else - { - Process->ImageFileName[0] = '\0'; + MmUnlockAddressSpace(&Process->AddressSpace); /* FIXME ? */ + DPRINT1("Failed to create a handle for the process\n"); + ObDereferenceObject(Process); + goto exitdereferenceobjects; } +#endif /* - * Map ntdll + * FIXME - Map ntdll */ - Status = LdrpMapSystemDll(*ProcessHandle, + Status = LdrpMapSystemDll(hProcess, /* FIXME - hProcess shouldn't be available at this point! */ &LdrStartupAddr); if (!NT_SUCCESS(Status)) { DbgPrint("LdrpMapSystemDll failed (Status %x)\n", Status); + MmUnlockAddressSpace(&Process->AddressSpace); /* FIXME ? */ ObDereferenceObject(Process); - ObDereferenceObject(pParentProcess); - return(Status); + goto exitdereferenceobjects; } /* * Map the process image */ - if (SectionHandle != NULL) + if (SectionObject != NULL) { + ULONG ViewSize = 0; DPRINT("Mapping process image\n"); - Status = LdrpMapImage(*ProcessHandle, - SectionHandle, - &ImageBase); + Status = MmMapViewOfSection(SectionObject, + Process, + (PVOID*)&ImageBase, + 0, + ViewSize, + NULL, + &ViewSize, + 0, + MEM_COMMIT, + PAGE_READWRITE); + if (!NT_SUCCESS(Status)) { - DbgPrint("LdrpMapImage failed (Status %x)\n", Status); + DbgPrint("Failed to map the process section (Status %x)\n", Status); + MmUnlockAddressSpace(&Process->AddressSpace); /* FIXME ? */ ObDereferenceObject(Process); - ObDereferenceObject(pParentProcess); - return(Status); + goto exitdereferenceobjects; } } - else - { - ImageBase = NULL; - } - - /* - * Duplicate the token - */ - Status = SepInitializeNewProcess(Process, pParentProcess); - if (!NT_SUCCESS(Status)) - { - DbgPrint("SepInitializeNewProcess failed (Status %x)\n", Status); - ObDereferenceObject(Process); - ObDereferenceObject(pParentProcess); - return(Status); - } + + if(pParentProcess != NULL) + { + /* + * Duplicate the token + */ + Status = SepInitializeNewProcess(Process, pParentProcess); + if (!NT_SUCCESS(Status)) + { + DbgPrint("SepInitializeNewProcess failed (Status %x)\n", Status); + ObDereferenceObject(Process); + goto exitdereferenceobjects; + } + } + else + { + /* FIXME */ + } /* - * + * FIXME - Create PEB */ DPRINT("Creating PEB\n"); - Status = PsCreatePeb(*ProcessHandle, + Status = PsCreatePeb(hProcess, /* FIXME - hProcess shouldn't be available at this point! */ Process, ImageBase); if (!NT_SUCCESS(Status)) { DbgPrint("NtCreateProcess() Peb creation failed: Status %x\n",Status); ObDereferenceObject(Process); - ObDereferenceObject(pParentProcess); - ZwClose(*ProcessHandle); - *ProcessHandle = NULL; - return(Status); + goto exitdereferenceobjects; } /* @@ -1058,9 +1082,139 @@ NtCreateProcess(OUT PHANDLE ProcessHandle, PspRunCreateProcessNotifyRoutines(Process, TRUE); + /* + * FIXME - the handle should be created not before this point! + */ +#if 0 + Status = ObInsertObject ((PVOID)Process, + NULL, + DesiredAccess, + 0, + NULL, + &hProcess); +#endif + if (NT_SUCCESS(Status)) + { + _SEH_TRY + { + *ProcessHandle = hProcess; + } + _SEH_HANDLE + { + Status = _SEH_GetExceptionCode(); + } + _SEH_END; + } + + /* + * don't dereference the debug port, exception port and section object even + * if ObInsertObject() failed, the process is alive! We just couldn't return + * the handle to the caller! + */ + ObDereferenceObject(Process); - ObDereferenceObject(pParentProcess); - return(STATUS_SUCCESS); + if(pParentProcess != NULL) + ObDereferenceObject(pParentProcess); + + return Status; +} + + +/* + * @implemented + */ +NTSTATUS STDCALL +PsCreateSystemProcess(PHANDLE ProcessHandle, + ACCESS_MASK DesiredAccess, + POBJECT_ATTRIBUTES ObjectAttributes) +{ + return PspCreateProcess(ProcessHandle, + DesiredAccess, + ObjectAttributes, + NULL, /* no parent process */ + FALSE, + NULL, + NULL, + NULL); +} + + +/* + * @implemented + */ +NTSTATUS STDCALL +NtCreateProcess(OUT PHANDLE ProcessHandle, + IN ACCESS_MASK DesiredAccess, + IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL, + IN HANDLE ParentProcess, + IN BOOLEAN InheritObjectTable, + IN HANDLE SectionHandle OPTIONAL, + IN HANDLE DebugPort OPTIONAL, + IN HANDLE ExceptionPort OPTIONAL) +/* + * FUNCTION: Creates a process. + * ARGUMENTS: + * ProcessHandle (OUT) = Caller supplied storage for the resulting + * handle + * DesiredAccess = Specifies the allowed or desired access to the + * process can be a combination of + * STANDARD_RIGHTS_REQUIRED| .. + * ObjectAttribute = Initialized attributes for the object, contains + * the rootdirectory and the filename + * ParentProcess = Handle to the parent process. + * InheritObjectTable = Specifies to inherit the objects of the parent + * process if true. + * SectionHandle = Handle to a section object to back the image file + * DebugPort = Handle to a DebugPort if NULL the system default debug + * port will be used. + * ExceptionPort = Handle to a exception port. + * REMARKS: + * This function maps to the win32 CreateProcess. + * RETURNS: Status + */ +{ + KPROCESSOR_MODE PreviousMode; + NTSTATUS Status = STATUS_SUCCESS; + + PreviousMode = ExGetPreviousMode(); + + if(PreviousMode != KernelMode) + { + _SEH_TRY + { + ProbeForWrite(ProcessHandle, + sizeof(HANDLE), + sizeof(ULONG)); + } + _SEH_HANDLE + { + Status = _SEH_GetExceptionCode(); + } + _SEH_END; + + if(!NT_SUCCESS(Status)) + { + return Status; + } + } + + if(ParentProcess == NULL) + { + Status = STATUS_INVALID_PARAMETER; + } + else + { + Status = PspCreateProcess(ProcessHandle, + DesiredAccess, + ObjectAttributes, + ParentProcess, + InheritObjectTable, + SectionHandle, + DebugPort, + ExceptionPort); + } + + return Status; } @@ -1123,7 +1277,7 @@ NtOpenProcess(OUT PHANDLE ProcessHandle, { current = CONTAINING_RECORD(current_entry, EPROCESS, ProcessListEntry); - if (current->UniqueProcessId == (ULONG)ClientId->UniqueProcess) + if (current->UniqueProcessId == ClientId->UniqueProcess) { if (current->Pcb.State == PROCESS_STATE_TERMINATED) { @@ -1220,7 +1374,7 @@ NtQueryInformationProcess(IN HANDLE ProcessHandle, ProcessBasicInformationP->UniqueProcessId = Process->UniqueProcessId; ProcessBasicInformationP->InheritedFromUniqueProcessId = - (ULONG)Process->InheritedFromUniqueProcessId; + Process->InheritedFromUniqueProcessId; ProcessBasicInformationP->BasePriority = Process->Pcb.BasePriority; @@ -2418,7 +2572,7 @@ PsIsProcessBeingDebugged( * @implemented */ NTSTATUS STDCALL -PsLookupProcessByProcessId(IN PVOID ProcessId, +PsLookupProcessByProcessId(IN HANDLE ProcessId, OUT PEPROCESS *Process) { KIRQL oldIrql; @@ -2433,7 +2587,7 @@ PsLookupProcessByProcessId(IN PVOID ProcessId, current = CONTAINING_RECORD(current_entry, EPROCESS, ProcessListEntry); - if (current->UniqueProcessId == (ULONG)ProcessId) + if (current->UniqueProcessId == ProcessId) { *Process = current; ObReferenceObject(current); diff --git a/reactos/subsys/csrss/api/process.c b/reactos/subsys/csrss/api/process.c index e985eeaacf9..7a5bd60d846 100644 --- a/reactos/subsys/csrss/api/process.c +++ b/reactos/subsys/csrss/api/process.c @@ -36,12 +36,12 @@ VOID STDCALL CsrInitProcessData(VOID) RtlInitializeCriticalSection( &ProcessDataLock ); } -PCSRSS_PROCESS_DATA STDCALL CsrGetProcessData(ULONG ProcessId) +PCSRSS_PROCESS_DATA STDCALL CsrGetProcessData(HANDLE ProcessId) { ULONG hash; PCSRSS_PROCESS_DATA pProcessData; - hash = ProcessId % (sizeof(ProcessData) / sizeof(*ProcessData)); + hash = (ULONG_PTR)ProcessId % (sizeof(ProcessData) / sizeof(*ProcessData)); LOCK; @@ -55,12 +55,12 @@ PCSRSS_PROCESS_DATA STDCALL CsrGetProcessData(ULONG ProcessId) return pProcessData; } -PCSRSS_PROCESS_DATA STDCALL CsrCreateProcessData(ULONG ProcessId) +PCSRSS_PROCESS_DATA STDCALL CsrCreateProcessData(HANDLE ProcessId) { ULONG hash; PCSRSS_PROCESS_DATA pProcessData; - hash = ProcessId % (sizeof(ProcessData) / sizeof(*ProcessData)); + hash = (ULONG_PTR)ProcessId % (sizeof(ProcessData) / sizeof(*ProcessData)); LOCK; @@ -94,13 +94,13 @@ PCSRSS_PROCESS_DATA STDCALL CsrCreateProcessData(ULONG ProcessId) return pProcessData; } -NTSTATUS STDCALL CsrFreeProcessData(ULONG Pid) +NTSTATUS STDCALL CsrFreeProcessData(HANDLE Pid) { ULONG hash; int c; PCSRSS_PROCESS_DATA pProcessData, pPrevProcessData = NULL; - hash = Pid % (sizeof(ProcessData) / sizeof(*ProcessData)); + hash = (ULONG_PTR)Pid % (sizeof(ProcessData) / sizeof(*ProcessData)); LOCK; diff --git a/reactos/subsys/csrss/api/wapi.c b/reactos/subsys/csrss/api/wapi.c index 08f9ad93c91..bb37e9bc398 100644 --- a/reactos/subsys/csrss/api/wapi.c +++ b/reactos/subsys/csrss/api/wapi.c @@ -123,18 +123,18 @@ ClientConnectionThread(HANDLE ServerPort) if (LpcRequest.Header.MessageType == LPC_PORT_CLOSED) { - CsrFreeProcessData( (ULONG)LpcRequest.Header.ClientId.UniqueProcess ); + CsrFreeProcessData( LpcRequest.Header.ClientId.UniqueProcess ); break; } Request = (PCSRSS_API_REQUEST)&LpcRequest; Reply = (PCSRSS_API_REPLY)&LpcReply; - ProcessData = CsrGetProcessData((ULONG)LpcRequest.Header.ClientId.UniqueProcess); + ProcessData = CsrGetProcessData(LpcRequest.Header.ClientId.UniqueProcess); if (ProcessData == NULL) { - DPRINT1("CSR: Message %d: Unable to find data for process %d\n", - LpcRequest.Header.MessageType, (ULONG)LpcRequest.Header.ClientId.UniqueProcess); + DPRINT1("CSR: Message %d: Unable to find data for process 0x%x\n", + LpcRequest.Header.MessageType, LpcRequest.Header.ClientId.UniqueProcess); break; } @@ -187,11 +187,11 @@ ServerApiPortThead(PVOID PortHandle) break; } - ProcessData = CsrCreateProcessData((ULONG)Request.Header.ClientId.UniqueProcess); + ProcessData = CsrCreateProcessData(Request.Header.ClientId.UniqueProcess); if (ProcessData == NULL) { - DPRINT1("Unable to allocate or find data for process %d\n", - (ULONG)Request.Header.ClientId.UniqueProcess); + DPRINT1("Unable to allocate or find data for process 0x%x\n", + Request.Header.ClientId.UniqueProcess); Status = STATUS_UNSUCCESSFUL; break; } diff --git a/reactos/subsys/csrss/include/api.h b/reactos/subsys/csrss/include/api.h index 07f6b47e042..46ccf091ff0 100644 --- a/reactos/subsys/csrss/include/api.h +++ b/reactos/subsys/csrss/include/api.h @@ -36,7 +36,7 @@ typedef struct _CSRSS_PROCESS_DATA PCSRSS_CONSOLE Console; ULONG HandleTableSize; Object_t ** HandleTable; - ULONG ProcessId; + HANDLE ProcessId; ULONG ShutdownLevel; ULONG ShutdownFlags; HANDLE ConsoleEvent; @@ -106,9 +106,9 @@ VOID STDCALL CsrInitConsoleSupport(VOID); /* api/process.c */ VOID STDCALL CsrInitProcessData(VOID); -PCSRSS_PROCESS_DATA STDCALL CsrGetProcessData(ULONG ProcessId); -PCSRSS_PROCESS_DATA STDCALL CsrCreateProcessData(ULONG ProcessId); -NTSTATUS STDCALL CsrFreeProcessData( ULONG Pid ); +PCSRSS_PROCESS_DATA STDCALL CsrGetProcessData(HANDLE ProcessId); +PCSRSS_PROCESS_DATA STDCALL CsrCreateProcessData(HANDLE ProcessId); +NTSTATUS STDCALL CsrFreeProcessData( HANDLE Pid ); /* api/handle.c */ NTSTATUS FASTCALL CsrRegisterObjectDefinitions(PCSRSS_OBJECT_DEFINITION NewDefinitions); diff --git a/reactos/subsys/csrss/win32csr/conio.c b/reactos/subsys/csrss/win32csr/conio.c index 0b536bfd479..c924c8755b6 100644 --- a/reactos/subsys/csrss/win32csr/conio.c +++ b/reactos/subsys/csrss/win32csr/conio.c @@ -80,10 +80,26 @@ ConioConsoleCtrlEvent(DWORD Event, PCSRSS_PROCESS_DATA ProcessData) if (ProcessData->CtrlDispatcher) { - Process = OpenProcess(PROCESS_DUP_HANDLE, FALSE, ProcessData->ProcessId); - if (NULL == Process) + OBJECT_ATTRIBUTES ObjectAttributes; + CLIENT_ID ClientId; + NTSTATUS Status; + + ClientId.UniqueThread = NULL; + ClientId.UniqueProcess = ProcessData->ProcessId; + InitializeObjectAttributes(&ObjectAttributes, + NULL, + 0, + NULL, + NULL); + + /* using OpenProcess is not optimal due to HANDLE vs. DWORD PIDs... */ + Status = NtOpenProcess(&Process, + PROCESS_DUP_HANDLE, + &ObjectAttributes, + &ClientId); + if (!NT_SUCCESS(Status)) { - DPRINT1("Failed for handle duplication\n"); + DPRINT1("Failed for handle duplication, Status: 0x%x\n", Status); return; } @@ -248,6 +264,8 @@ CsrInitConsole(PCSRSS_CONSOLE Console) CSR_API(CsrAllocConsole) { PCSRSS_CONSOLE Console; + OBJECT_ATTRIBUTES ObjectAttributes; + CLIENT_ID ClientId; HANDLE Process; NTSTATUS Status; @@ -301,10 +319,22 @@ CSR_API(CsrAllocConsole) return Reply->Status = Status; } - Process = OpenProcess(PROCESS_DUP_HANDLE, FALSE, ProcessData->ProcessId); - if (NULL == Process) + ClientId.UniqueThread = NULL; + ClientId.UniqueProcess = ProcessData->ProcessId; + InitializeObjectAttributes(&ObjectAttributes, + NULL, + 0, + NULL, + NULL); + + /* using OpenProcess is not optimal due to HANDLE vs. DWORD PIDs... */ + Status = NtOpenProcess(&Process, + PROCESS_DUP_HANDLE, + &ObjectAttributes, + &ClientId); + if (!NT_SUCCESS(Status)) { - DPRINT1("OpenProcess() failed for handle duplication\n"); + DPRINT1("NtOpenProcess() failed for handle duplication, Status: 0x%x\n", Status); Console->Header.ReferenceCount--; ProcessData->Console = 0; Win32CsrReleaseObject(ProcessData, Reply->Data.AllocConsoleReply.OutputHandle); @@ -312,6 +342,7 @@ CSR_API(CsrAllocConsole) Reply->Status = Status; return Status; } + if (! DuplicateHandle(GetCurrentProcess(), ProcessData->Console->ActiveEvent, Process, &ProcessData->ConsoleEvent, EVENT_ALL_ACCESS, FALSE, 0)) { diff --git a/reactos/subsys/csrss/win32csr/exitros.c b/reactos/subsys/csrss/win32csr/exitros.c index 57c9443eea1..11a0f247986 100644 --- a/reactos/subsys/csrss/win32csr/exitros.c +++ b/reactos/subsys/csrss/win32csr/exitros.c @@ -17,7 +17,7 @@ #include static HWND LogonNotifyWindow = NULL; -static DWORD LogonProcess = 0; +static HANDLE LogonProcess = NULL; CSR_API(CsrRegisterLogonProcess) { @@ -35,7 +35,7 @@ CSR_API(CsrRegisterLogonProcess) } else { - if ((DWORD) Request->Header.ClientId.UniqueProcess != LogonProcess) + if (Request->Header.ClientId.UniqueProcess != LogonProcess) { DPRINT1("Current logon process 0x%x, can't deregister from process 0x%x\n", LogonProcess, Request->Header.ClientId.UniqueProcess); @@ -64,7 +64,7 @@ CSR_API(CsrSetLogonNotifyWindow) Reply->Status = STATUS_INVALID_HANDLE; return Reply->Status; } - if (WindowCreator != LogonProcess) + if (WindowCreator != (DWORD)LogonProcess) { DPRINT1("Trying to register window not created by winlogon as notify window\n"); Reply->Status = STATUS_ACCESS_DENIED; diff --git a/reactos/subsys/win32k/ntuser/misc.c b/reactos/subsys/win32k/ntuser/misc.c index 7910397f12f..a0d666297d4 100644 --- a/reactos/subsys/win32k/ntuser/misc.c +++ b/reactos/subsys/win32k/ntuser/misc.c @@ -37,14 +37,14 @@ PUSER_MESSAGE_QUEUE W32kGetPrimitiveMessageQueue() { } BOOL FASTCALL -IntRegisterLogonProcess(DWORD ProcessId, BOOL Register) +IntRegisterLogonProcess(HANDLE ProcessId, BOOL Register) { PEPROCESS Process; NTSTATUS Status; CSRSS_API_REQUEST Request; CSRSS_API_REPLY Reply; - Status = PsLookupProcessByProcessId((PVOID)ProcessId, + Status = PsLookupProcessByProcessId(ProcessId, &Process); if (!NT_SUCCESS(Status)) { @@ -519,7 +519,7 @@ NtUserCallTwoParam( } case TWOPARAM_ROUTINE_REGISTERLOGONPROC: - return (DWORD)IntRegisterLogonProcess(Param1, (BOOL)Param2); + return (DWORD)IntRegisterLogonProcess((HANDLE)Param1, (BOOL)Param2); case TWOPARAM_ROUTINE_SETSYSCOLORS: { diff --git a/reactos/w32api/include/ddk/ntapi.h b/reactos/w32api/include/ddk/ntapi.h index 79aecb3a52c..f2d8ac9e290 100644 --- a/reactos/w32api/include/ddk/ntapi.h +++ b/reactos/w32api/include/ddk/ntapi.h @@ -297,8 +297,8 @@ typedef struct _SYSTEM_PROCESSES { LARGE_INTEGER KernelTime; UNICODE_STRING ProcessName; KPRIORITY BasePriority; - ULONG ProcessId; - ULONG InheritedFromProcessId; + HANDLE ProcessId; + HANDLE InheritedFromProcessId; ULONG HandleCount; ULONG Reserved2[2]; VM_COUNTERS VmCounters; @@ -1461,8 +1461,8 @@ typedef struct _PROCESS_BASIC_INFORMATION { PPEB PebBaseAddress; KAFFINITY AffinityMask; KPRIORITY BasePriority; - ULONG UniqueProcessId; - ULONG InheritedFromUniqueProcessId; + HANDLE UniqueProcessId; + HANDLE InheritedFromUniqueProcessId; } PROCESS_BASIC_INFORMATION, *PPROCESS_BASIC_INFORMATION; typedef struct _PROCESS_ACCESS_TOKEN { diff --git a/reactos/w32api/include/ddk/ntifs.h b/reactos/w32api/include/ddk/ntifs.h index d6922bcddb2..5db5f5b568a 100644 --- a/reactos/w32api/include/ddk/ntifs.h +++ b/reactos/w32api/include/ddk/ntifs.h @@ -3287,7 +3287,7 @@ NTKERNELAPI NTSTATUS NTAPI PsLookupProcessByProcessId ( - IN PVOID ProcessId, + IN HANDLE ProcessId, OUT PEPROCESS *Process ); From 0cf4124706aeffd408a8a85e76b89b72c3322dec Mon Sep 17 00:00:00 2001 From: Martin Fuchs Date: Wed, 26 Jan 2005 00:12:33 +0000 Subject: [PATCH 006/185] first draft of SDI browser application derived from ROS Explorer svn path=/trunk/; revision=13302 --- reactos/subsys/system/ibrowser/Makefile | 47 + reactos/subsys/system/ibrowser/Makefile.MinGW | 67 + reactos/subsys/system/ibrowser/Makefile.PCH | 72 + reactos/subsys/system/ibrowser/expat.license | 22 + reactos/subsys/system/ibrowser/favorites.cpp | 494 +++++ reactos/subsys/system/ibrowser/favorites.h | 104 + reactos/subsys/system/ibrowser/ibrowser.cpp | 517 +++++ reactos/subsys/system/ibrowser/ibrowser.dsp | 305 +++ reactos/subsys/system/ibrowser/ibrowser.dsw | 41 + reactos/subsys/system/ibrowser/ibrowser.h | 216 +++ reactos/subsys/system/ibrowser/ibrowser.rc | 24 + .../subsys/system/ibrowser/ibrowser_intres.h | 51 + .../subsys/system/ibrowser/ibrowser_intres.rc | 398 ++++ reactos/subsys/system/ibrowser/mainframe.cpp | 796 ++++++++ reactos/subsys/system/ibrowser/mainframe.h | 125 ++ .../subsys/system/ibrowser/make_ibrowser.dsp | 176 ++ reactos/subsys/system/ibrowser/precomp.cpp | 28 + reactos/subsys/system/ibrowser/precomp.h | 32 + reactos/subsys/system/ibrowser/readme.txt | 9 + reactos/subsys/system/ibrowser/res/dot.ico | Bin 0 -> 3750 bytes .../subsys/system/ibrowser/res/dot_red.ico | Bin 0 -> 3750 bytes .../subsys/system/ibrowser/res/dot_trans.ico | Bin 0 -> 3750 bytes .../subsys/system/ibrowser/res/favorites.ico | Bin 0 -> 9374 bytes .../subsys/system/ibrowser/res/ibrowser.ico | Bin 0 -> 12366 bytes .../subsys/system/ibrowser/res/network.ico | Bin 0 -> 9062 bytes .../subsys/system/ibrowser/res/reactos.ico | Bin 0 -> 25214 bytes .../subsys/system/ibrowser/res/toolbar.bmp | Bin 0 -> 1798 bytes .../subsys/system/ibrowser/utility/comutil.h | 321 +++ .../subsys/system/ibrowser/utility/expat.h | 1081 +++++++++++ .../system/ibrowser/utility/utility.cpp | 419 ++++ .../subsys/system/ibrowser/utility/utility.h | 1012 ++++++++++ .../subsys/system/ibrowser/utility/window.cpp | 1206 ++++++++++++ .../subsys/system/ibrowser/utility/window.h | 1100 +++++++++++ .../system/ibrowser/utility/xmlstorage.cpp | 612 ++++++ .../system/ibrowser/utility/xmlstorage.h | 1722 +++++++++++++++++ reactos/subsys/system/ibrowser/webchild.cpp | 309 +++ reactos/subsys/system/ibrowser/webchild.h | 1079 +++++++++++ 37 files changed, 12385 insertions(+) create mode 100644 reactos/subsys/system/ibrowser/Makefile create mode 100644 reactos/subsys/system/ibrowser/Makefile.MinGW create mode 100644 reactos/subsys/system/ibrowser/Makefile.PCH create mode 100644 reactos/subsys/system/ibrowser/expat.license create mode 100644 reactos/subsys/system/ibrowser/favorites.cpp create mode 100644 reactos/subsys/system/ibrowser/favorites.h create mode 100644 reactos/subsys/system/ibrowser/ibrowser.cpp create mode 100644 reactos/subsys/system/ibrowser/ibrowser.dsp create mode 100644 reactos/subsys/system/ibrowser/ibrowser.dsw create mode 100644 reactos/subsys/system/ibrowser/ibrowser.h create mode 100644 reactos/subsys/system/ibrowser/ibrowser.rc create mode 100644 reactos/subsys/system/ibrowser/ibrowser_intres.h create mode 100644 reactos/subsys/system/ibrowser/ibrowser_intres.rc create mode 100644 reactos/subsys/system/ibrowser/mainframe.cpp create mode 100644 reactos/subsys/system/ibrowser/mainframe.h create mode 100644 reactos/subsys/system/ibrowser/make_ibrowser.dsp create mode 100644 reactos/subsys/system/ibrowser/precomp.cpp create mode 100644 reactos/subsys/system/ibrowser/precomp.h create mode 100644 reactos/subsys/system/ibrowser/readme.txt create mode 100644 reactos/subsys/system/ibrowser/res/dot.ico create mode 100644 reactos/subsys/system/ibrowser/res/dot_red.ico create mode 100644 reactos/subsys/system/ibrowser/res/dot_trans.ico create mode 100644 reactos/subsys/system/ibrowser/res/favorites.ico create mode 100644 reactos/subsys/system/ibrowser/res/ibrowser.ico create mode 100644 reactos/subsys/system/ibrowser/res/network.ico create mode 100644 reactos/subsys/system/ibrowser/res/reactos.ico create mode 100644 reactos/subsys/system/ibrowser/res/toolbar.bmp create mode 100644 reactos/subsys/system/ibrowser/utility/comutil.h create mode 100644 reactos/subsys/system/ibrowser/utility/expat.h create mode 100644 reactos/subsys/system/ibrowser/utility/utility.cpp create mode 100644 reactos/subsys/system/ibrowser/utility/utility.h create mode 100644 reactos/subsys/system/ibrowser/utility/window.cpp create mode 100644 reactos/subsys/system/ibrowser/utility/window.h create mode 100644 reactos/subsys/system/ibrowser/utility/xmlstorage.cpp create mode 100644 reactos/subsys/system/ibrowser/utility/xmlstorage.h create mode 100644 reactos/subsys/system/ibrowser/webchild.cpp create mode 100644 reactos/subsys/system/ibrowser/webchild.h diff --git a/reactos/subsys/system/ibrowser/Makefile b/reactos/subsys/system/ibrowser/Makefile new file mode 100644 index 00000000000..36881540edb --- /dev/null +++ b/reactos/subsys/system/ibrowser/Makefile @@ -0,0 +1,47 @@ +# +# ROS Internet Web Browser +# +# Makefile +# + +PATH_TO_TOP := ../../.. + +TARGET_TYPE := program + +TARGET_APPTYPE := windows + +TARGET_NAME := ibrowser + +TARGET_INSTALLDIR := . + +TARGET_CFLAGS := \ + -D__USE_W32API -DWIN32 -D_ROS_ \ + -D_WIN32_IE=0x0600 -D_WIN32_WINNT=0x0501 -DWINVER=0x0500 \ + -DUNICODE -fexceptions -Wall + +TARGET_CPPFLAGS := $(TARGET_CFLAGS) + +TARGET_RCFLAGS := -D__USE_W32API -DWIN32 -D_ROS_ -D__WINDRES__ + +TARGET_SDKLIBS := gdi32.a comctl32.a ole32.a oleaut32.a shell32.a expat.a + +TARGET_GCCLIBS := stdc++ uuid + +TARGET_OBJECTS := \ + ibrowser.o \ + mainframe.o \ + webchild.o \ + favorites.o \ + utility/utility.o \ + utility/window.o \ + utility/xmlstorage.o + +TARGET_CPPAPP := yes + +TARGET_PCH := precomp.h + +DEP_OBJECTS := $(TARGET_OBJECTS) + +include $(PATH_TO_TOP)/rules.mak +include $(TOOLS_PATH)/helper.mk +include $(TOOLS_PATH)/depend.mk diff --git a/reactos/subsys/system/ibrowser/Makefile.MinGW b/reactos/subsys/system/ibrowser/Makefile.MinGW new file mode 100644 index 00000000000..b968c1c4938 --- /dev/null +++ b/reactos/subsys/system/ibrowser/Makefile.MinGW @@ -0,0 +1,67 @@ +# +# ROS Internet Web Browser +# +# Makefile.MinGW +# + +CC = gcc +CXX = g++ +LINK = g++ + +CFLAGS = -DWIN32 -D_WIN32_IE=0x0600 -D_WIN32_WINNT=0x0501 -DWINVER=0x0500 -fexceptions -Wall -I. +RCFLAGS = -DWIN32 -D__WINDRES__ +LFLAGS = -Wl,--subsystem,windows + +ifdef DEBUG +CFLAGS += -D_DEBUG -g +RCFLAGS += -D_DEBUG +LFLAGS += -g +else +CFLAGS += -DNDEBUG -Os +RCFLAGS += -DNDEBUG +LFLAGS += -s +endif + +ifndef UNICODE +UNICODE = 1 +endif + +ifeq ($(UNICODE),1) +CFLAGS += -DUNICODE +# LFLAGS+= -Wl,--entry,_wWinMain@16 +RCFLAGS += -DUNICODE +endif + +CXXFLAGS = $(CFLAGS) + +EXEC_SUFFIX = .exe +RES_SUFFIX = .coff + +VPATH = utility + +PROGRAM = ibrowser + +TARGET = $(PROGRAM)$(EXEC_SUFFIX) + +OBJECTS = \ + utility.o \ + window.o \ + ibrowser.o \ + webchild.o \ + mainframe.o \ + favorites.o \ + xmlstorage.o + +LIBS = gdi32 comctl32 shell32 ole32 uuid oleaut32 + +all: $(TARGET) + +$(TARGET): $(OBJECTS) $(PROGRAM)$(RES_SUFFIX) libexpat.dll + $(LINK) $(LFLAGS) -o $@ $^ $(addprefix -l,$(LIBS)) $(addprefix -l,$(DELAYIMPORTS)) + +ibrowser$(RES_SUFFIX): $(PROGRAM)_intres.rc res/*.bmp res/*.ico + windres $(RCFLAGS) -o $@ $(PROGRAM)_intres.rc + +clean: + rm -f $(TARGET) $(OBJECTS) $(PROGRAM)$(RES_SUFFIX) \ + desktop/*.o dialogs/*.o shell/*.o taskbar/*.o utility/*.o diff --git a/reactos/subsys/system/ibrowser/Makefile.PCH b/reactos/subsys/system/ibrowser/Makefile.PCH new file mode 100644 index 00000000000..71fc8575fa3 --- /dev/null +++ b/reactos/subsys/system/ibrowser/Makefile.PCH @@ -0,0 +1,72 @@ +# +# ROS Internet Web Browser +# +# Makefile.PCH +# +# MinGW Makefile with precompiled header support +# + +CC = gcc +CXX = g++ +LINK = g++ + +CFLAGS = -DWIN32 -D_WIN32_IE=0x0600 -D_WIN32_WINNT=0x0501 -DWINVER=0x0500 -fexceptions -Wall -I. +RCFLAGS = -DWIN32 -D__WINDRES__ +LFLAGS = -Wl,--subsystem,windows + +ifdef DEBUG +CFLAGS += -D_DEBUG -g +RCFLAGS += -D_DEBUG +LFLAGS += -g +else +CFLAGS += -DNDEBUG -Os -march=pentium4 +RCFLAGS += -DNDEBUG +LFLAGS += -s +endif + +ifndef UNICODE +UNICODE = 1 +endif + +ifeq ($(UNICODE),1) +CFLAGS += -DUNICODE +# LFLAGS+= -Wl,--entry,_wWinMain@16 +RCFLAGS += -DUNICODE +endif + +CXXFLAGS = $(CFLAGS) + +EXEC_SUFFIX = .exe +RES_SUFFIX = .coff + +VPATH = utility + +PROGRAM = ibrowser + +TARGET = $(PROGRAM)$(EXEC_SUFFIX) + +OBJECTS = \ + utility.o \ + window.o \ + ibrowser.o \ + webchild.o \ + mainframe.o \ + favorites.o \ + xmlstorage.o + +LIBS = gdi32 comctl32 shell32 ole32 oleaut32 uuid + +all: precomp.h.gch $(TARGET) + +precomp.h.gch: *.h utility/*.h + $(CXX) $(CFLAGS) precomp.h + +$(TARGET): $(OBJECTS) $(PROGRAM)$(RES_SUFFIX) libexpat.dll + $(LINK) $(LFLAGS) -o $@ $^ $(addprefix -l,$(LIBS)) $(addprefix -l,$(DELAYIMPORTS)) + +ibrowser$(RES_SUFFIX): $(PROGRAM)_intres.rc res/*.bmp res/*.ico + windres $(RCFLAGS) -o $@ $(PROGRAM)_intres.rc + +clean: + rm -f $(TARGET) $(OBJECTS) $(PROGRAM)$(RES_SUFFIX) precomp.h.gch \ + utility/*.o diff --git a/reactos/subsys/system/ibrowser/expat.license b/reactos/subsys/system/ibrowser/expat.license new file mode 100644 index 00000000000..5c5d524a1f8 --- /dev/null +++ b/reactos/subsys/system/ibrowser/expat.license @@ -0,0 +1,22 @@ +Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd + and Clark Cooper +Copyright (c) 2001, 2002, 2003 Expat maintainers. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/reactos/subsys/system/ibrowser/favorites.cpp b/reactos/subsys/system/ibrowser/favorites.cpp new file mode 100644 index 00000000000..0da5cc365e2 --- /dev/null +++ b/reactos/subsys/system/ibrowser/favorites.cpp @@ -0,0 +1,494 @@ +/* + * Copyright 2004 Martin Fuchs + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + + + // + // Explorer and Desktop clone + // + // favorites.cpp + // + // Martin Fuchs, 04.04.2004 + // + + +#include "precomp.h" + + +String DecodeURLString(const char* s) +{ + TCHAR buffer[BUFFER_LEN]; + LPTSTR o = buffer; + + for(const char* p=s; *p; ++p) + if (*p == '%') { + if (!strncmp(p+1, "20", 2)) { + *o++ = ' '; + p += 2; + } else + *o++ = *p; + } else + *o++ = *p; + + return String(buffer, o-buffer); +} + + + /// read .URL file +bool Bookmark::read_url(LPCTSTR path) +{ + char line[BUFFER_LEN]; + + tifstream in(path); + + while(in.good()) { + in.getline(line, BUFFER_LEN); + + const char* p = line; + while(isspace(*p)) + ++p; + + const char* keyword = p; + const char* eq = strchr(p, '='); + + if (eq) { + const char* cont = eq + 1; + while(isspace(*cont)) + ++cont; + + if (!strnicmp(keyword, "URL", 3)) + _url = DecodeURLString(cont); + else if (!strnicmp(keyword, "IconFile", 8)) + _icon_path = DecodeURLString(cont); + } + } + + return true; +} + + /// convert XBEL bookmark node +bool Bookmark::read(const_XMLPos& pos) +{ + _url = pos.get("href").c_str(); + + if (pos.go_down("title")) { + _name = pos->get_content(); + pos.back(); + } + + if (pos.go_down("desc")) { + _description = pos->get_content(); + pos.back(); + } + + if (pos.go_down("info")) { + const_XMLChildrenFilter metadata(pos, "metadata"); + + for(const_XMLChildrenFilter::const_iterator it=metadata.begin(); it!=metadata.end(); ++it) { + const XMLNode& node = **it; + const_XMLPos sub_pos(&node); + + if (node.get("owner") == "ros-explorer") { + if (sub_pos.go_down("icon")) { + _icon_path = sub_pos.get("path").c_str(); + _icon_idx = XS_toi(sub_pos.get("index")); + + sub_pos.back(); // + } + } + } + + pos.back(); // + pos.back(); // + } + + return !_url.empty(); // _url is mandatory. +} + + /// write XBEL bookmark node +void Bookmark::write(XMLPos& pos) const +{ + pos.create("bookmark"); + + pos["href"] = _url.c_str(); + + if (!_name.empty()) { + pos.create("title"); + pos->set_content(_name); + pos.back(); + } + + if (!_description.empty()) { + pos.create("desc"); + pos->set_content(_description); + pos.back(); + } + + if (!_icon_path.empty()) { + pos.create("info"); + pos.create("metadata"); + pos["owner"] = "ros-explorer"; + pos.create("icon"); + pos["path"] = _icon_path.c_str(); + pos["index"].printf(XS_TEXT("%d"), _icon_idx); + pos.back(); // + pos.back(); // + pos.back(); // + } + + pos.back(); +} + + + /// read bookmark folder from XBEL formated XML tree +void BookmarkFolder::read(const_XMLPos& pos) +{ + if (pos.go_down("title")) { + _name = pos->get_content(); + pos.back(); + } + + if (pos.go_down("desc")) { + _description = pos->get_content(); + pos.back(); + } + + _bookmarks.read(pos); +} + + /// write bookmark folder content from XBEL formated XML tree +void BookmarkFolder::write(XMLPos& pos) const +{ + pos.create("folder"); + + if (!_name.empty()) { + pos.create("title"); + pos->set_content(_name); + pos.back(); + } + + if (!_description.empty()) { + pos.create("desc"); + pos->set_content(_description); + pos.back(); + } + + _bookmarks.write(pos); +} + + +BookmarkNode::BookmarkNode() + : _type(BMNT_NONE) +{ + _pbookmark = NULL; +} + +BookmarkNode::BookmarkNode(const Bookmark& bm) + : _type(BMNT_BOOKMARK) +{ + _pbookmark = new Bookmark(bm); +} + +BookmarkNode::BookmarkNode(const BookmarkFolder& bmf) + : _type(BMNT_FOLDER) +{ + _pfolder = new BookmarkFolder(bmf); +} + +BookmarkNode::BookmarkNode(const BookmarkNode& other) + : _type(other._type) +{ + if (other._type == BMNT_BOOKMARK) + _pbookmark = new Bookmark(*other._pbookmark); + else if (other._type == BMNT_FOLDER) + _pfolder = new BookmarkFolder(*other._pfolder); + else + _pbookmark = NULL; +} + +BookmarkNode::~BookmarkNode() +{ + if (_type == BMNT_BOOKMARK) + delete _pbookmark; + else if (_type == BMNT_FOLDER) + delete _pfolder; +} + +BookmarkNode& BookmarkNode::operator=(const Bookmark& bm) +{ + clear(); + + _pbookmark = new Bookmark(bm); + + return *this; +} + +BookmarkNode& BookmarkNode::operator=(const BookmarkFolder& bmf) +{ + clear(); + + _pfolder = new BookmarkFolder(bmf); + + return *this; +} + +BookmarkNode& BookmarkNode::operator=(const BookmarkNode& other) +{ + clear(); + + _type = other._type; + + if (other._type == BMNT_BOOKMARK) + _pbookmark = new Bookmark(*other._pbookmark); + else if (other._type == BMNT_FOLDER) + _pfolder = new BookmarkFolder(*other._pfolder); + + return *this; +} + +void BookmarkNode::clear() +{ + if (_type == BMNT_BOOKMARK) { + delete _pbookmark; + _pbookmark = NULL; + } + else if (_type == BMNT_FOLDER) { + delete _pfolder; + _pfolder = NULL; + } + + _type = BMNT_NONE; +} + + + /// read bookmark list from XBEL formated XML tree +void BookmarkList::read(const_XMLPos& pos) +{ + const XMLNode::Children& children = pos->get_children(); + + for(XMLNode::Children::const_iterator it=children.begin(); it!=children.end(); ++it) { + const XMLNode& node = **it; + const_XMLPos sub_pos(&node); + + if (node == "folder") { + BookmarkFolder folder; + + folder.read(sub_pos); + + push_back(folder); + } else if (node == "bookmark") { + Bookmark bookmark; + + if (bookmark.read(sub_pos)) + push_back(bookmark); + } + } +} + + /// write bookmark list into XBEL formated XML tree +void BookmarkList::write(XMLPos& pos) const +{ + for(const_iterator it=begin(); it!=end(); ++it) { + const BookmarkNode& node = *it; + + if (node._type == BookmarkNode::BMNT_FOLDER) { + const BookmarkFolder& folder = *node._pfolder; + + folder.write(pos); + + pos.back(); + } else if (node._type == BookmarkNode::BMNT_BOOKMARK) { + const Bookmark& bookmark = *node._pbookmark; + + if (!bookmark._url.empty()) + bookmark.write(pos); + } + } +} + + + /// fill treeview control with bookmark tree content +void BookmarkList::fill_tree(HWND hwnd, HTREEITEM parent, HIMAGELIST himagelist, HDC hdc_wnd) const +{ + TV_INSERTSTRUCT tvi; + + tvi.hParent = parent; + tvi.hInsertAfter = TVI_LAST; + + TV_ITEM& tv = tvi.item; + tv.mask = TVIF_TEXT|TVIF_IMAGE|TVIF_SELECTEDIMAGE|TVIF_PARAM; + + for(const_iterator it=begin(); it!=end(); ++it) { + const BookmarkNode& node = *it; + + tv.lParam = (LPARAM)&node; + + if (node._type == BookmarkNode::BMNT_FOLDER) { + const BookmarkFolder& folder = *node._pfolder; + + tv.pszText = (LPTSTR)folder._name.c_str(); + tv.iImage = 3; // folder + tv.iSelectedImage = 4; // open folder + HTREEITEM hitem = TreeView_InsertItem(hwnd, &tvi); + + folder._bookmarks.fill_tree(hwnd, hitem, himagelist, hdc_wnd); + } else if (node._type == BookmarkNode::BMNT_BOOKMARK) { + const Bookmark& bookmark = *node._pbookmark; + + tv.pszText = (LPTSTR)bookmark._name.c_str(); + tv.iImage = 1; // bookmark + tv.iSelectedImage = 2; // selected bookmark + + if (!bookmark._icon_path.empty()) { + const Icon& icon = g_icon_cache.extract(bookmark._icon_path, bookmark._icon_idx); + + if ((ICON_ID)icon != ICID_NONE) + tv.iImage = tv.iSelectedImage = icon.add_to_imagelist(himagelist, hdc_wnd); + } + + TreeView_InsertItem(hwnd, &tvi); + } + } +} + + +/*@@ + + /// import Internet Explorer bookmarks from Favorites folder into bookmark list +void BookmarkList::import_IE_favorites(ShellDirectory& dir, HWND hwnd) +{ + TCHAR path[MAX_PATH], ext[_MAX_EXT]; + + dir.smart_scan(SORT_NAME, SCAN_FILESYSTEM); + + for(Entry*entry=dir._down; entry; entry=entry->_next) { + if (entry->_shell_attribs & SFGAO_HIDDEN) // ignore files like "desktop.ini" + continue; + + String name; + + if (entry->_etype == ET_SHELL) + name = dir._folder.get_name(static_cast(entry)->_pidl); + else + name = entry->_display_name; + + if (entry->_data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { + BookmarkFolder new_folder; + + new_folder._name = DecodeXMLString(name); + + if (entry->_etype == ET_SHELL) { + ShellDirectory new_dir(dir._folder, static_cast(entry)->_pidl, hwnd); + new_folder._bookmarks.import_IE_favorites(new_dir, hwnd); + } else { + entry->get_path(path); + ShellDirectory new_dir(GetDesktopFolder(), path, hwnd); + new_folder._bookmarks.import_IE_favorites(new_dir, hwnd); + } + + push_back(new_folder); + } else { + Bookmark bookmark; + + bookmark._name = DecodeXMLString(name); + + entry->get_path(path); + _tsplitpath(path, NULL, NULL, NULL, ext); + + if (!_tcsicmp(ext, TEXT(".url"))) { + bookmark.read_url(path); + push_back(bookmark); + } else { + ///@todo read shell links + //assert(0); + } + } + } +} + +*/ + + + /// read XBEL bookmark file +bool Favorites::read(LPCTSTR path) +{ + XMLDoc xbel; + + if (!xbel.read(path)) + if (xbel._last_error == XML_ERROR_NO_ELEMENTS) + return false; + else + MessageBox(0/*@@g_Globals._hwndDesktop*/, String(xbel._last_error_msg.c_str()), + TEXT("ROS Explorer - reading bookmark file"), MB_OK); + + const_XMLPos pos(&xbel); + + if (!pos.go_down("xbel")) + return false; + + super::read(pos); + + pos.back(); + + return true; +} + + /// write XBEL bookmark file +void Favorites::write(LPCTSTR path) const +{ + XMLDoc xbel; + + XMLPos pos(&xbel); + pos.create("xbel"); + super::write(pos); + pos.back(); + + xbel.write(path, XMLNode::FORMAT_SMART, XMLHeader("1.0", "UTF-8", "")); +} + + +/*@@ + + /// import Internet Explorer bookmarks from Favorites folder +bool Favorites::import_IE_favorites(HWND hwnd) +{ + WaitCursor wait; + + StartMenuShellDirs dirs; + + try { + dirs.push_back(ShellDirectory(GetDesktopFolder(), SpecialFolderPath(CSIDL_COMMON_FAVORITES, hwnd), hwnd)); + dirs.push_back(ShellDirectory(GetDesktopFolder(), SpecialFolderPath(CSIDL_FAVORITES, hwnd), hwnd)); + } catch(COMException&) { + } + + for(StartMenuShellDirs::iterator it=dirs.begin(); it!=dirs.end(); ++it) { + StartMenuDirectory& smd = *it; + ShellDirectory& dir = smd._dir; + + try { + super::import_IE_favorites(dir, hwnd); + } catch(COMException&) { + } + } + + return true; +} + +*/ diff --git a/reactos/subsys/system/ibrowser/favorites.h b/reactos/subsys/system/ibrowser/favorites.h new file mode 100644 index 00000000000..4d139ee0d1d --- /dev/null +++ b/reactos/subsys/system/ibrowser/favorites.h @@ -0,0 +1,104 @@ +/* + * Copyright 2004 Martin Fuchs + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + + + // + // Explorer and Desktop clone + // + // favorites.h + // + // Martin Fuchs, 04.04.2004 + // + + +extern String DecodeURLString(const char* s); + + +struct Bookmark +{ + Bookmark() : _icon_idx(0) {} + + String _name; + String _description; + String _url; + String _icon_path; + int _icon_idx; + + bool read_url(LPCTSTR path); + bool read(const_XMLPos& pos); + void write(XMLPos& pos) const; +}; + +struct BookmarkFolder; + +struct BookmarkNode +{ + BookmarkNode(); + BookmarkNode(const Bookmark& bm); + BookmarkNode(const BookmarkFolder& bmf); + BookmarkNode(const BookmarkNode& other); + + ~BookmarkNode(); + + BookmarkNode& operator=(const Bookmark& bm); + BookmarkNode& operator=(const BookmarkFolder& bmf); + BookmarkNode& operator=(const BookmarkNode& other); + + void clear(); + + enum BOOKMARKNODE_TYPE { + BMNT_NONE, BMNT_BOOKMARK, BMNT_FOLDER + }; + + BOOKMARKNODE_TYPE _type; + + union { + Bookmark* _pbookmark; + BookmarkFolder* _pfolder; + }; +}; + +struct BookmarkList : public list +{ + void import_IE_favorites(struct ShellDirectory& dir, HWND hwnd); + + void read(const_XMLPos& pos); + void write(XMLPos& pos) const; + + void fill_tree(HWND hwnd, HTREEITEM parent, HIMAGELIST, HDC hdc_wnd) const; +}; + +struct BookmarkFolder +{ + String _name; + String _description; + BookmarkList _bookmarks; + + void read(const_XMLPos& pos); + void write(XMLPos& pos) const; +}; + +struct Favorites : public BookmarkList +{ + typedef BookmarkList super; + + bool read(LPCTSTR path); + void write(LPCTSTR path) const; + + bool import_IE_favorites(HWND hwnd); +}; diff --git a/reactos/subsys/system/ibrowser/ibrowser.cpp b/reactos/subsys/system/ibrowser/ibrowser.cpp new file mode 100644 index 00000000000..7165a4e8946 --- /dev/null +++ b/reactos/subsys/system/ibrowser/ibrowser.cpp @@ -0,0 +1,517 @@ +/* + * Copyright 2005 Martin Fuchs + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + + + // + // ROS Internet Web Browser + // + // ibrowser.cpp + // + // Martin Fuchs, 24.01.2005 + // + + +#include "precomp.h" + +#include "ibrowser_intres.h" + +#include // for setlocale() + +#ifndef __WINE__ +#include // for dup2() +#include // for _O_RDONLY +#endif + + + // globals + +HINSTANCE g_hInstance; +IconCache g_icon_cache; +ATOM g_hframeClass; + + +/*@@ +void ExplorerGlobals::read_persistent() +{ + // read configuration file + _cfg_dir.printf(TEXT("%s\\ReactOS"), (LPCTSTR)SpecialFolderFSPath(CSIDL_APPDATA,0)); + _cfg_path.printf(TEXT("%s\\ros-ibrowser-cfg.xml"), _cfg_dir.c_str()); + + if (!_cfg.read(_cfg_path)) { + if (_cfg._last_error != XML_ERROR_NO_ELEMENTS) + MessageBox(g_Globals._hwndDesktop, String(_cfg._last_error_msg.c_str()), + TEXT("ROS Explorer - reading user settings"), MB_OK); + + _cfg.read(TEXT("ibrowser-cfg-template.xml")); + } + + // read bookmarks + _favorites_path.printf(TEXT("%s\\ros-ibrowser-bookmarks.xml"), _cfg_dir.c_str()); + + if (!_favorites.read(_favorites_path)) { + _favorites.import_IE_favorites(0); + _favorites.write(_favorites_path); + } +} + +void ExplorerGlobals::write_persistent() +{ + // write configuration file + RecursiveCreateDirectory(_cfg_dir); + + _cfg.write(_cfg_path); + _favorites.write(_favorites_path); +} + + +XMLPos ExplorerGlobals::get_cfg() +{ + XMLPos cfg_pos(&_cfg); + + cfg_pos.smart_create("ibrowser-cfg"); + + return cfg_pos; +} + +XMLPos ExplorerGlobals::get_cfg(const char* path) +{ + XMLPos cfg_pos(&_cfg); + + cfg_pos.smart_create("ibrowser-cfg"); + cfg_pos.create_relative(path); + + return cfg_pos; +} +*/ + + +Icon::Icon() + : _id(ICID_UNKNOWN), + _itype(IT_STATIC), + _hicon(0) +{ +} + +Icon::Icon(ICON_ID id, UINT nid) + : _id(id), + _itype(IT_STATIC), + _hicon(SmallIcon(nid)) +{ +} + +Icon::Icon(ICON_TYPE itype, int id, HICON hIcon) + : _id((ICON_ID)id), + _itype(itype), + _hicon(hIcon) +{ +} + +Icon::Icon(ICON_TYPE itype, int id, int sys_idx) + : _id((ICON_ID)id), + _itype(itype), + _sys_idx(sys_idx) +{ +} + +void Icon::draw(HDC hdc, int x, int y, int cx, int cy, COLORREF bk_color, HBRUSH bk_brush) const +{ + if (_itype == IT_SYSCACHE) + ImageList_DrawEx(g_icon_cache.get_sys_imagelist(), _sys_idx, hdc, x, y, cx, cy, bk_color, CLR_DEFAULT, ILD_NORMAL); + else + DrawIconEx(hdc, x, y, _hicon, cx, cy, 0, bk_brush, DI_NORMAL); +} + +HBITMAP Icon::create_bitmap(COLORREF bk_color, HBRUSH hbrBkgnd, HDC hdc_wnd) const +{ + if (_itype == IT_SYSCACHE) { + HIMAGELIST himl = g_icon_cache.get_sys_imagelist(); + + int cx, cy; + ImageList_GetIconSize(himl, &cx, &cy); + + HBITMAP hbmp = CreateCompatibleBitmap(hdc_wnd, cx, cy); + HDC hdc = CreateCompatibleDC(hdc_wnd); + HBITMAP hbmp_old = SelectBitmap(hdc, hbmp); + ImageList_DrawEx(himl, _sys_idx, hdc, 0, 0, cx, cy, bk_color, CLR_DEFAULT, ILD_NORMAL); + SelectBitmap(hdc, hbmp_old); + DeleteDC(hdc); + + return hbmp; + } else + return create_bitmap_from_icon(_hicon, hbrBkgnd, hdc_wnd); +} + + +int Icon::add_to_imagelist(HIMAGELIST himl, HDC hdc_wnd, COLORREF bk_color, HBRUSH bk_brush) const +{ + int ret; + + if (_itype == IT_SYSCACHE) { + HIMAGELIST himl = g_icon_cache.get_sys_imagelist(); + + int cx, cy; + ImageList_GetIconSize(himl, &cx, &cy); + + HBITMAP hbmp = CreateCompatibleBitmap(hdc_wnd, cx, cy); + HDC hdc = CreateCompatibleDC(hdc_wnd); + HBITMAP hbmp_old = SelectBitmap(hdc, hbmp); + ImageList_DrawEx(himl, _sys_idx, hdc, 0, 0, cx, cy, bk_color, CLR_DEFAULT, ILD_NORMAL); + SelectBitmap(hdc, hbmp_old); + DeleteDC(hdc); + + ret = ImageList_Add(himl, hbmp, 0); + + DeleteObject(hbmp); + } else + ret = ImageList_AddAlphaIcon(himl, _hicon, bk_brush, hdc_wnd); + + return ret; +} + +HBITMAP create_bitmap_from_icon(HICON hIcon, HBRUSH hbrush_bkgnd, HDC hdc_wnd) +{ + int cx = GetSystemMetrics(SM_CXSMICON); + int cy = GetSystemMetrics(SM_CYSMICON); + HBITMAP hbmp = CreateCompatibleBitmap(hdc_wnd, cx, cy); + + MemCanvas canvas; + BitmapSelection sel(canvas, hbmp); + + RECT rect = {0, 0, cx, cy}; + FillRect(canvas, &rect, hbrush_bkgnd); + + DrawIconEx(canvas, 0, 0, hIcon, cx, cy, 0, hbrush_bkgnd, DI_NORMAL); + + return hbmp; +} + +int ImageList_AddAlphaIcon(HIMAGELIST himl, HICON hIcon, HBRUSH hbrush_bkgnd, HDC hdc_wnd) +{ + HBITMAP hbmp = create_bitmap_from_icon(hIcon, hbrush_bkgnd, hdc_wnd); + + int ret = ImageList_Add(himl, hbmp, 0); + + DeleteObject(hbmp); + + return ret; +} + + +int IconCache::s_next_id = ICID_DYNAMIC; + + +void IconCache::init() +{ + _icons[ICID_NONE] = Icon(IT_STATIC, ICID_NONE, (HICON)0); + + _icons[ICID_IBROWSER] = Icon(ICID_IBROWSER, IDI_IBROWSER); + _icons[ICID_BOOKMARK] = Icon(ICID_BOOKMARK, IDI_DOT_TRANS); +} + + +const Icon& IconCache::extract(const String& path) +{ + PathMap::iterator found = _pathMap.find(path); + + if (found != _pathMap.end()) + return _icons[found->second]; + + SHFILEINFO sfi; + +#if 1 // use system image list + HIMAGELIST himlSys = (HIMAGELIST) SHGetFileInfo(path, 0, &sfi, sizeof(sfi), SHGFI_SYSICONINDEX|SHGFI_SMALLICON); + + if (himlSys) { + _himlSys = himlSys; + + const Icon& icon = add(sfi.iIcon/*, IT_SYSCACHE*/); +#else + if (SHGetFileInfo(path, 0, &sfi, sizeof(sfi), SHGFI_ICON|SHGFI_SMALLICON)) { + const Icon& icon = add(sfi.hIcon, IT_CACHED); +#endif + + ///@todo limit cache size + _pathMap[path] = icon; + + return icon; + } else + return _icons[ICID_NONE]; +} + +const Icon& IconCache::extract(LPCTSTR path, int idx) +{ + CachePair key(path, idx); + +#ifndef __WINE__ ///@todo _tcslwr() for Wine + _tcslwr((LPTSTR)key.first.c_str()); +#endif + + PathIdxMap::iterator found = _pathIdxMap.find(key); + + if (found != _pathIdxMap.end()) + return _icons[found->second]; + + HICON hIcon; + + if ((int)ExtractIconEx(path, idx, NULL, &hIcon, 1) > 0) { + const Icon& icon = add(hIcon, IT_CACHED); + + _pathIdxMap[key] = icon; + + return icon; + } else { + + ///@todo retreive "http://.../favicon.ico" format icons + + return _icons[ICID_NONE]; + } +} + + +const Icon& IconCache::add(HICON hIcon, ICON_TYPE type) +{ + int id = ++s_next_id; + + return _icons[id] = Icon(type, id, hIcon); +} + +const Icon& IconCache::add(int sys_idx/*, ICON_TYPE type=IT_SYSCACHE*/) +{ + int id = ++s_next_id; + + return _icons[id] = SysCacheIcon(id, sys_idx); +} + +const Icon& IconCache::get_icon(int id) +{ + return _icons[id]; +} + +void IconCache::free_icon(int icon_id) +{ + IconMap::iterator found = _icons.find(icon_id); + + if (found != _icons.end()) { + Icon& icon = found->second; + + if (icon.destroy()) + _icons.erase(found); + } +} + + +ResString::ResString(UINT nid) +{ + TCHAR buffer[BUFFER_LEN]; + + int len = LoadString(g_hInstance, nid, buffer, sizeof(buffer)/sizeof(TCHAR)); + + super::assign(buffer, len); +} + + +ResIcon::ResIcon(UINT nid) +{ + _hicon = LoadIcon(g_hInstance, MAKEINTRESOURCE(nid)); +} + +SmallIcon::SmallIcon(UINT nid) +{ + _hicon = (HICON)LoadImage(g_hInstance, MAKEINTRESOURCE(nid), IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), LR_SHARED); +} + +ResIconEx::ResIconEx(UINT nid, int w, int h) +{ + _hicon = (HICON)LoadImage(g_hInstance, MAKEINTRESOURCE(nid), IMAGE_ICON, w, h, LR_SHARED); +} + + +void SetWindowIcon(HWND hwnd, UINT nid) +{ + HICON hIcon = ResIcon(nid); + Window_SetIcon(hwnd, ICON_BIG, hIcon); + + HICON hIconSmall = SmallIcon(nid); + Window_SetIcon(hwnd, ICON_SMALL, hIconSmall); +} + + +ResBitmap::ResBitmap(UINT nid) +{ + _hBmp = LoadBitmap(g_hInstance, MAKEINTRESOURCE(nid)); +} + + +void ibrowser_show_frame(int cmdshow, LPTSTR lpCmdLine) +{ + MainFrameBase::Create(lpCmdLine, cmdshow); +} + + +PopupMenu::PopupMenu(UINT nid) +{ + HMENU hMenu = LoadMenu(g_hInstance, MAKEINTRESOURCE(nid)); + _hmenu = GetSubMenu(hMenu, 0); +} + + + /// "About Explorer" Dialog +struct ExplorerAboutDlg : public + CtlColorParent< + OwnerDrawParent + > +{ + typedef CtlColorParent< + OwnerDrawParent + > super; + + ExplorerAboutDlg(HWND hwnd) + : super(hwnd) + { + SetWindowIcon(hwnd, IDI_REACTOS); + + new FlatButton(hwnd, IDOK); + + _hfont = CreateFont(20, 0, 0, 0, FW_BOLD, TRUE, 0, 0, 0, 0, 0, 0, 0, TEXT("Sans Serif")); + new ColorStatic(hwnd, IDC_ROS_IBROWSER, RGB(32,32,128), 0, _hfont); + + new HyperlinkCtrl(hwnd, IDC_WWW); + + FmtString ver_txt(ResString(IDS_IBROWSER_VERSION_STR), (LPCTSTR)ResString(IDS_VERSION_STR)); + SetWindowText(GetDlgItem(hwnd, IDC_VERSION_TXT), ver_txt); + + /*@@ + HWND hwnd_winver = GetDlgItem(hwnd, IDC_WIN_VERSION); + SetWindowText(hwnd_winver, get_windows_version_str()); + SetWindowFont(hwnd_winver, GetStockFont(DEFAULT_GUI_FONT), FALSE); + */ + + CenterWindow(hwnd); + } + + ~ExplorerAboutDlg() + { + DeleteObject(_hfont); + } + +protected: + HFONT _hfont; +}; + +void ibrowser_about(HWND hwndParent) +{ + Dialog::DoModal(IDD_ABOUT_IBROWSER, WINDOW_CREATOR(ExplorerAboutDlg), hwndParent); +} + + +static void InitInstance(HINSTANCE hInstance) +{ + CONTEXT("InitInstance"); + + // register frame window class + g_hframeClass = IconWindowClass(CLASSNAME_FRAME,IDI_IBROWSER); + + // register child window class + WindowClass(CLASSNAME_CHILDWND, CS_CLASSDC|CS_VREDRAW).Register(); +} + + +int ibrowser_main(HINSTANCE hInstance, LPTSTR lpCmdLine, int cmdshow) +{ + CONTEXT("ibrowser_main"); + + // initialize Common Controls library + CommonControlInit usingCmnCtrl; + + try { + InitInstance(hInstance); + } catch(COMException& e) { + HandleException(e, GetDesktopWindow()); + return -1; + } + + if (cmdshow != SW_HIDE) { +/* // don't maximize if being called from the ROS desktop + if (cmdshow == SW_SHOWNORMAL) + ///@todo read window placement from registry + cmdshow = SW_MAXIMIZE; +*/ + + ibrowser_show_frame(cmdshow, lpCmdLine); + } + + return Window::MessageLoop(); +} + + + // MinGW does not provide a Unicode startup routine, so we have to implement an own. +#if defined(__MINGW32__) && defined(UNICODE) + +#define _tWinMain wWinMain +int WINAPI wWinMain(HINSTANCE, HINSTANCE, LPWSTR, int); + +int main(int argc, char* argv[]) +{ + CONTEXT("main"); + + STARTUPINFO startupinfo; + int nShowCmd = SW_SHOWNORMAL; + + GetStartupInfo(&startupinfo); + + if (startupinfo.dwFlags & STARTF_USESHOWWINDOW) + nShowCmd = startupinfo.wShowWindow; + + LPWSTR cmdline = GetCommandLineW(); + + while(*cmdline && !_istspace(*cmdline)) + ++cmdline; + + return wWinMain(GetModuleHandle(NULL), 0, cmdline, nShowCmd); +} + +#endif // __MINGW && UNICODE + + +int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nShowCmd) +{ + CONTEXT("WinMain()"); + + g_hInstance = hInstance; + + // initialize COM and OLE before creating the desktop window + OleInit usingCOM; + + // init common controls library + CommonControlInit usingCmnCtrl; + +//@@ g_Globals.read_persistent(); + + /**TODO fix command line handling */ + if (*lpCmdLine=='"' && lpCmdLine[_tcslen(lpCmdLine)-1]=='"') { + ++lpCmdLine; + lpCmdLine[_tcslen(lpCmdLine)-1] = '\0'; + } + + int ret = ibrowser_main(hInstance, lpCmdLine, nShowCmd); + + // write configuration file +//@@ g_Globals.write_persistent(); + + return ret; +} diff --git a/reactos/subsys/system/ibrowser/ibrowser.dsp b/reactos/subsys/system/ibrowser/ibrowser.dsp new file mode 100644 index 00000000000..02291f30a2a --- /dev/null +++ b/reactos/subsys/system/ibrowser/ibrowser.dsp @@ -0,0 +1,305 @@ +# Microsoft Developer Studio Project File - Name="ibrowser" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=IBROWSER - WIN32 DEBUG +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "ibrowser.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "ibrowser.mak" CFG="IBROWSER - WIN32 DEBUG" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "ibrowser - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "ibrowser - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE "ibrowser - Win32 Debug Release" (based on "Win32 (x86) Console Application") +!MESSAGE "ibrowser - Win32 Unicode Release" (based on "Win32 (x86) Console Application") +!MESSAGE "ibrowser - Win32 Unicode Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "ibrowser - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GR /GX /O1 /D "NDEBUG" /D "WIN32" /D _WIN32_IE=0x0600 /D _WIN32_WINNT=0x0501 /Yu"precomp.h" /FD /c +# ADD BASE RSC /l 0x407 /d "NDEBUG" +# ADD RSC /l 0x407 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 gdi32.lib comctl32.lib shell32.lib ole32.lib /nologo /subsystem:windows /machine:I386 /libpath:"Release" +# SUBTRACT LINK32 /pdb:none + +!ELSEIF "$(CFG)" == "ibrowser - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /ZI /Od /D "_DEBUG" /D "WIN32" /D _WIN32_IE=0x0600 /D _WIN32_WINNT=0x0501 /FR /Yu"precomp.h" /FD /GZ /c +# ADD BASE RSC /l 0x407 /d "_DEBUG" +# ADD RSC /l 0x407 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib gdi32.lib comctl32.lib shell32.lib ole32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept /libpath:"Debug" +# SUBTRACT LINK32 /pdb:none + +!ELSEIF "$(CFG)" == "ibrowser - Win32 Debug Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "DRelease" +# PROP BASE Intermediate_Dir "DRelease" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "DRelease" +# PROP Intermediate_Dir "DRelease" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "NDEBUG" /D "WIN32" /D "_ROS_" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GR /GX /Zi /O2 /D "NDEBUG" /D "WIN32" /D _WIN32_IE=0x0600 /D _WIN32_WINNT=0x0501 /FR /Yu"precomp.h" /FD /c +# ADD BASE RSC /l 0x407 /d "NDEBUG" +# ADD RSC /l 0x407 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 user32.lib gdi32.lib advapi32.lib shell32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 gdi32.lib comctl32.lib shell32.lib ole32.lib /nologo /subsystem:windows /debug /machine:I386 +# SUBTRACT LINK32 /pdb:none + +!ELSEIF "$(CFG)" == "ibrowser - Win32 Unicode Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "URelease" +# PROP BASE Intermediate_Dir "URelease" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "URelease" +# PROP Intermediate_Dir "URelease" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "NDEBUG" /D "WIN32" /D "UNICODE" /D "_ROS_" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GR /GX /O2 /D "NDEBUG" /D "UNICODE" /D "WIN32" /D _WIN32_IE=0x0600 /D _WIN32_WINNT=0x0501 /Yu"precomp.h" /FD /c +# ADD BASE RSC /l 0x407 /d "NDEBUG" +# ADD RSC /l 0x407 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 user32.lib gdi32.lib advapi32.lib shell32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 gdi32.lib comctl32.lib shell32.lib ole32.lib /nologo /subsystem:windows /machine:I386 /libpath:"Release" +# SUBTRACT LINK32 /pdb:none + +!ELSEIF "$(CFG)" == "ibrowser - Win32 Unicode Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "UDebug" +# PROP BASE Intermediate_Dir "UDebug" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "UDebug" +# PROP Intermediate_Dir "UDebug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "_DEBUG" /D "WIN32" /D "UNICODE" /D "_ROS_" /FR /YX /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /ZI /Od /D "_DEBUG" /D "UNICODE" /D "WIN32" /D _WIN32_IE=0x0600 /D _WIN32_WINNT=0x0501 /FR /Yu"precomp.h" /FD /GZ /c +# ADD BASE RSC /l 0x407 /d "_DEBUG" +# ADD RSC /l 0x407 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 user32.lib gdi32.lib advapi32.lib shell32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 gdi32.lib comctl32.lib shell32.lib ole32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept /libpath:"Debug" +# SUBTRACT LINK32 /pdb:none + +!ENDIF + +# Begin Target + +# Name "ibrowser - Win32 Release" +# Name "ibrowser - Win32 Debug" +# Name "ibrowser - Win32 Debug Release" +# Name "ibrowser - Win32 Unicode Release" +# Name "ibrowser - Win32 Unicode Debug" +# Begin Group "utility" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\utility\comutil.h +# End Source File +# Begin Source File + +SOURCE=.\utility\expat.h +# End Source File +# Begin Source File + +SOURCE=.\utility\utility.cpp +# End Source File +# Begin Source File + +SOURCE=.\utility\utility.h +# End Source File +# Begin Source File + +SOURCE=.\utility\window.cpp +# End Source File +# Begin Source File + +SOURCE=.\utility\window.h +# End Source File +# Begin Source File + +SOURCE=.\utility\xmlstorage.cpp +# End Source File +# Begin Source File + +SOURCE=.\utility\xmlstorage.h +# End Source File +# End Group +# Begin Group "resources" + +# PROP Default_Filter "bmp,ico" +# Begin Source File + +SOURCE=.\res\dot.ico +# End Source File +# Begin Source File + +SOURCE=.\res\dot_red.ico +# End Source File +# Begin Source File + +SOURCE=.\res\dot_trans.ico +# End Source File +# Begin Source File + +SOURCE=.\res\favorites.ico +# End Source File +# Begin Source File + +SOURCE=.\res\ibrowser.ico +# End Source File +# Begin Source File + +SOURCE=.\ibrowser_intres.h +# End Source File +# Begin Source File + +SOURCE=.\ibrowser_intres.rc +# End Source File +# Begin Source File + +SOURCE=.\res\iexplore.ico +# End Source File +# Begin Source File + +SOURCE=.\res\network.ico +# End Source File +# Begin Source File + +SOURCE=.\res\reactos.ico +# End Source File +# Begin Source File + +SOURCE=.\res\toolbar.bmp +# End Source File +# End Group +# Begin Group "main" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\favorites.cpp +# End Source File +# Begin Source File + +SOURCE=.\favorites.h +# End Source File +# Begin Source File + +SOURCE=.\ibrowser.cpp +# End Source File +# Begin Source File + +SOURCE=.\ibrowser.h +# End Source File +# Begin Source File + +SOURCE=.\mainframe.cpp +# End Source File +# Begin Source File + +SOURCE=.\mainframe.h +# End Source File +# Begin Source File + +SOURCE=.\precomp.cpp +# ADD CPP /Yc"precomp.h" +# End Source File +# Begin Source File + +SOURCE=.\precomp.h +# End Source File +# Begin Source File + +SOURCE=.\webchild.cpp +# End Source File +# Begin Source File + +SOURCE=.\webchild.h +# End Source File +# End Group +# Begin Source File + +SOURCE=.\readme.txt +# End Source File +# End Target +# End Project diff --git a/reactos/subsys/system/ibrowser/ibrowser.dsw b/reactos/subsys/system/ibrowser/ibrowser.dsw new file mode 100644 index 00000000000..eb8d2593f88 --- /dev/null +++ b/reactos/subsys/system/ibrowser/ibrowser.dsw @@ -0,0 +1,41 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "ibrowser"=.\ibrowser.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "make_ibrowser"=.\make_ibrowser.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/reactos/subsys/system/ibrowser/ibrowser.h b/reactos/subsys/system/ibrowser/ibrowser.h new file mode 100644 index 00000000000..39265f27dbd --- /dev/null +++ b/reactos/subsys/system/ibrowser/ibrowser.h @@ -0,0 +1,216 @@ +/* + * Copyright 2005 Martin Fuchs + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + + + // + // ROS Internet Web Browser + // + // ibrowser.h + // + // Martin Fuchs, 25.01.2005 + // + + +#include "utility/window.h" + + +#define IDW_STATUSBAR 0x100 +#define IDW_TOOLBAR 0x101 +#define IDW_EXTRABAR 0x102 +#define IDW_ADDRESSBAR 0x104 +#define IDW_SIDEBAR 0x106 +#define IDW_FIRST_CHILD 0xC000 /*0x200*/ + + +#define PM_GET_FILEWND_PTR (WM_APP+0x05) +#define PM_GET_SHELLBROWSER_PTR (WM_APP+0x06) + +#define PM_GET_CONTROLWINDOW (WM_APP+0x16) + +#define PM_RESIZE_CHILDREN (WM_APP+0x17) +#define PM_GET_WIDTH (WM_APP+0x18) + +#define PM_REFRESH (WM_APP+0x1B) +#define PM_REFRESH_CONFIG (WM_APP+0x1C) + + +#define CLASSNAME_FRAME TEXT("IBrowserFrameWClass") + +#define CLASSNAME_CHILDWND TEXT("IBrowserChildWClass") + + +#include "mainframe.h" + + + /// convenient loading of string resources +struct ResString : public String +{ + ResString(UINT nid); +}; + + /// convenient loading of standard (32x32) icon resources +struct ResIcon +{ + ResIcon(UINT nid); + + operator HICON() const {return _hicon;} + +protected: + HICON _hicon; +}; + + /// convenient loading of small (16x16) icon resources +struct SmallIcon +{ + SmallIcon(UINT nid); + + operator HICON() const {return _hicon;} + +protected: + HICON _hicon; +}; + + /// convenient loading of icon resources with specified sizes +struct ResIconEx +{ + ResIconEx(UINT nid, int w, int h); + + operator HICON() const {return _hicon;} + +protected: + HICON _hicon; +}; + + /// set big and small icons out of the resources for a window +extern void SetWindowIcon(HWND hwnd, UINT nid); + + /// convenient loading of bitmap resources +struct ResBitmap +{ + ResBitmap(UINT nid); + ~ResBitmap() {DeleteObject(_hBmp);} + + operator HBITMAP() const {return _hBmp;} + +protected: + HBITMAP _hBmp; +}; + + +enum ICON_TYPE { + IT_STATIC, + IT_CACHED, + IT_DYNAMIC, + IT_SYSCACHE +}; + +enum ICON_ID { + ICID_UNKNOWN, + ICID_NONE, + + ICID_IBROWSER, + ICID_BOOKMARK, + + ICID_DYNAMIC +}; + +struct Icon { + Icon(); + Icon(ICON_ID id, UINT nid); + Icon(ICON_TYPE itype, int id, HICON hIcon); + Icon(ICON_TYPE itype, int id, int sys_idx); + + operator ICON_ID() const {return _id;} + + void draw(HDC hdc, int x, int y, int cx, int cy, COLORREF bk_color, HBRUSH bk_brush) const; + HBITMAP create_bitmap(COLORREF bk_color, HBRUSH hbrBkgnd, HDC hdc_wnd) const; + int add_to_imagelist(HIMAGELIST himl, HDC hdc_wnd, COLORREF bk_color=GetSysColor(COLOR_WINDOW), HBRUSH bk_brush=GetSysColorBrush(COLOR_WINDOW)) const; + + int get_sysiml_idx() const {return _itype==IT_SYSCACHE? _sys_idx: -1;} + + bool destroy() {if (_itype == IT_DYNAMIC) {DestroyIcon(_hicon); return true;} else return false;} + +protected: + ICON_ID _id; + ICON_TYPE _itype; + HICON _hicon; + int _sys_idx; +}; + +struct SysCacheIcon : public Icon { + SysCacheIcon(int id, int sys_idx) + : Icon(IT_SYSCACHE, id, sys_idx) {} +}; + +struct IconCache { + IconCache() : _himlSys(0) {} + + void init(); + + const Icon& extract(const String& path); + const Icon& extract(LPCTSTR path, int idx); + const Icon& extract(IExtractIcon* pExtract, LPCTSTR path, int idx); + + const Icon& add(HICON hIcon, ICON_TYPE type=IT_DYNAMIC); + const Icon& add(int sys_idx/*, ICON_TYPE type=IT_SYSCACHE*/); + + const Icon& get_icon(int icon_id); + HIMAGELIST get_sys_imagelist() const {return _himlSys;} + + void free_icon(int icon_id); + +protected: + static int s_next_id; + + typedef map IconMap; + IconMap _icons; + + typedef map PathMap; + PathMap _pathMap; + + typedef pair CachePair; + typedef map PathIdxMap; + PathIdxMap _pathIdxMap; + + HIMAGELIST _himlSys; +}; + + + /// create a bitmap from an icon +extern HBITMAP create_bitmap_from_icon(HICON hIcon, HBRUSH hbrush_bkgnd, HDC hdc_wnd); + + /// add icon with alpha channel to imagelist using the specified background color +extern int ImageList_AddAlphaIcon(HIMAGELIST himl, HICON hIcon, HBRUSH hbrush_bkgnd, HDC hdc_wnd); + + +#include "utility/xmlstorage.h" + +using namespace XMLStorage; + +#include "favorites.h" + + + // globals +extern HINSTANCE g_hInstance; +extern IconCache g_icon_cache; +extern ATOM g_hframeClass; + + + // display explorer "About" dialog +extern void ibrowser_about(HWND hwndParent); + diff --git a/reactos/subsys/system/ibrowser/ibrowser.rc b/reactos/subsys/system/ibrowser/ibrowser.rc new file mode 100644 index 00000000000..6868a248ca4 --- /dev/null +++ b/reactos/subsys/system/ibrowser/ibrowser.rc @@ -0,0 +1,24 @@ +/* $Id: ibrowser.rc 12752 2005-01-03 11:25:40Z mf $ */ + +#include + +#include "ibrowser_intres.rc" + +#define REACTOS_STR_FILE_DESCRIPTION "ROS Internet Web Browser\0" +#define REACTOS_STR_INTERNAL_NAME "ibrowser\0" +#define REACTOS_STR_ORIGINAL_FILENAME "ibrowser.exe\0" +#include + +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US + +#define IDS_VERSION_STR 5000 +#define IDS_IBROWSER_VERSION_STR 5001 + +LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL + +STRINGTABLE DISCARDABLE +BEGIN + IDS_VERSION_STR REACTOS_STR_PRODUCT_VERSION + IDS_IBROWSER_VERSION_STR "ReactOS %s Web Browser" +END + diff --git a/reactos/subsys/system/ibrowser/ibrowser_intres.h b/reactos/subsys/system/ibrowser/ibrowser_intres.h new file mode 100644 index 00000000000..ec6e1882c44 --- /dev/null +++ b/reactos/subsys/system/ibrowser/ibrowser_intres.h @@ -0,0 +1,51 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by ibrowser_intres.rc +// +#define IDS_TITLE 1 +#define IDS_EMPTY 13 +#define IDS_ABOUT_IBROWSER 27 +#define IDI_REACTOS 100 +#define IDB_TOOLBAR 103 +#define IDA_IBROWSER 104 +#define IDM_SDIFRAME 113 +#define IDD_ABOUT_IBROWSER 135 +#define IDI_FAVORITES 140 +#define IDI_DOT 163 +#define IDI_DOT_TRANS 164 +#define IDI_DOT_RED 165 +#define IDI_IBROWSER 169 +#define ID_VIEW_STATUSBAR 503 +#define ID_VIEW_TOOL_BAR 508 +#define ID_VIEW_SIDE_BAR 510 +#define IDC_ROS_IBROWSER 1000 +#define IDC_WWW 1012 +#define IDC_VERSION_TXT 1029 +#define IDC_WIN_VERSION 1030 +#define ID_REFRESH 1704 +#define IDS_VERSION_STR 5000 +#define IDS_IBROWSER_VERSION_STR 5001 +#define ID_IBROWSER_FAQ 10002 +#define ID_VIEW_FULLSCREEN 0x8004 +#define ID_ABOUT_WINDOWS 40002 +#define ID_ABOUT_IBROWSER 40003 +#define ID_GO_BACK 40005 +#define ID_GO_FORWARD 40006 +#define ID_GO_HOME 40007 +#define ID_GO_SEARCH 40008 +#define ID_GO_UP 40009 +#define ID_STOP 40010 +#define ID_FILE_EXIT 0xE141 +#define ID_HELP 0xE146 +#define IDC_STATIC -1 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 170 +#define _APS_NEXT_COMMAND_VALUE 40024 +#define _APS_NEXT_CONTROL_VALUE 1033 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/reactos/subsys/system/ibrowser/ibrowser_intres.rc b/reactos/subsys/system/ibrowser/ibrowser_intres.rc new file mode 100644 index 00000000000..60a97e0c94e --- /dev/null +++ b/reactos/subsys/system/ibrowser/ibrowser_intres.rc @@ -0,0 +1,398 @@ +//Microsoft Developer Studio generated resource script. +// +#include "ibrowser_intres.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// Romanian resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ROM) +#ifdef _WIN32 +LANGUAGE LANG_ROMANIAN, SUBLANG_DEFAULT +#pragma code_page(1250) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Menu +// + +IDM_SDIFRAME MENU PRELOAD DISCARDABLE +BEGIN + POPUP "&Fiºier" + BEGIN + MENUITEM "&Ieºire", ID_FILE_EXIT + END + POPUP "&Prezentare" + BEGIN + MENUITEM "&Bara cu instrumente", ID_VIEW_TOOL_BAR + MENUITEM "&Side Bar", ID_VIEW_SIDE_BAR, GRAYED + MENUITEM "&Bara de stare", ID_VIEW_STATUSBAR + MENUITEM SEPARATOR + MENUITEM "&Resetare\tF5", ID_REFRESH + MENUITEM "F&ull Screen\tCtrl+Shift+S", ID_VIEW_FULLSCREEN + END + POPUP "&Ajutor" + BEGIN + MENUITEM "Explorer &FAQ...", ID_IBROWSER_FAQ + MENUITEM "&Despre Explorer...", ID_ABOUT_IBROWSER + MENUITEM "Despre &OS...", ID_ABOUT_WINDOWS + END +END + +#endif // Romanian resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// Neutral resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEU) +#ifdef _WIN32 +LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL +#pragma code_page(1252) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Bitmap +// + +IDB_TOOLBAR BITMAP DISCARDABLE "res/toolbar.bmp" + +///////////////////////////////////////////////////////////////////////////// +// +// Accelerator +// + +IDA_IBROWSER ACCELERATORS DISCARDABLE +BEGIN + "X", ID_FILE_EXIT, VIRTKEY, ALT, NOINVERT + "S", ID_VIEW_FULLSCREEN, VIRTKEY, SHIFT, CONTROL, + NOINVERT +END + +#endif // Neutral resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// German (Germany) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_DEU) +#ifdef _WIN32 +LANGUAGE LANG_GERMAN, SUBLANG_GERMAN +#pragma code_page(1252) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Menu +// + +IDM_SDIFRAME MENU PRELOAD DISCARDABLE +BEGIN + POPUP "&Datei" + BEGIN + MENUITEM "&Beenden", ID_FILE_EXIT + END + POPUP "&Ansicht" + BEGIN + MENUITEM "&Toolbar", ID_VIEW_TOOL_BAR + MENUITEM "S&ide Bar", ID_VIEW_SIDE_BAR, GRAYED + MENUITEM "&Status Bar", ID_VIEW_STATUSBAR + MENUITEM SEPARATOR + MENUITEM "&Aktualisieren\tF5", ID_REFRESH + MENUITEM "&Vollbild\tCtrl+Shift+S", ID_VIEW_FULLSCREEN + END + POPUP "&Hilfe" + BEGIN + MENUITEM "Explorer &FAQ...", ID_IBROWSER_FAQ + MENUITEM "&About Explorer...", ID_ABOUT_IBROWSER + MENUITEM "About &OS...", ID_ABOUT_WINDOWS + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_ABOUT_IBROWSER DIALOG DISCARDABLE 0, 0, 199, 106 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "About ReactOS Web Browser" +FONT 10, "MS Sans Serif" +BEGIN + LTEXT "ReactOS Web Browser",IDC_ROS_IBROWSER,91,13,104,11 + LTEXT "V 0.9",IDC_VERSION_TXT,91,27,104,8 + LTEXT "(c) 2005 Martin Fuchs",IDC_STATIC,91,42,104,8 + LTEXT "",IDC_WIN_VERSION,91,58,98,22 + LTEXT "http://www.sky.franken.de/explorer/",IDC_WWW,17,84,129, + 8 + CONTROL "&OK",IDOK,"Button",BS_OWNERDRAW | BS_FLAT | WS_GROUP, + 154,90,38,12 +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO DISCARDABLE +BEGIN + IDD_ABOUT_IBROWSER, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 192 + TOPMARGIN, 7 + BOTTOMMARGIN, 102 + END +END +#endif // APSTUDIO_INVOKED + + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE DISCARDABLE +BEGIN + "ibrowser_intres.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include \r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "#ifndef _ROS_\r\n" + "LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL\r\n" + "STRINGTABLE DISCARDABLE \r\n" + "BEGIN\r\n" + "IDS_VERSION_STR """"\r\n" + "#ifdef UNICODE\r\n" + "IDS_IBROWSER_VERSION_STR ""ROS Explorer%0s""\r\n" + "#else\r\n" + "IDS_IBROWSER_VERSION_STR ""ROS Explorer Ansi%0s""\r\n" + "#endif\r\n" + "END\r\n" + "#endif\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_REACTOS ICON DISCARDABLE "res/reactos.ico" +IDI_FAVORITES ICON DISCARDABLE "res/favorites.ico" +IDI_DOT ICON DISCARDABLE "res/dot.ico" +IDI_DOT_TRANS ICON DISCARDABLE "res/dot_trans.ico" +IDI_DOT_RED ICON DISCARDABLE "res/dot_red.ico" +IDI_IBROWSER ICON DISCARDABLE "res\\ibrowser.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE DISCARDABLE +BEGIN + IDS_TITLE "Reactos Internet Web Browser" + IDS_EMPTY "(Empty)" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_ABOUT_IBROWSER "&Über..." +END + +#endif // German (Germany) resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Menu +// + +IDM_SDIFRAME MENU PRELOAD DISCARDABLE +BEGIN + POPUP "&File" + BEGIN + MENUITEM "E&xit", ID_FILE_EXIT + END + POPUP "&View" + BEGIN + MENUITEM "&Toolbar", ID_VIEW_TOOL_BAR + MENUITEM "S&ide Bar", ID_VIEW_SIDE_BAR, GRAYED + MENUITEM "&Status Bar", ID_VIEW_STATUSBAR + MENUITEM SEPARATOR + MENUITEM "&Refresh\tF5", ID_REFRESH + MENUITEM "F&ull Screen\tCtrl+Shift+S", ID_VIEW_FULLSCREEN + END + POPUP "&Help" + BEGIN + MENUITEM "Explorer &FAQ...", ID_IBROWSER_FAQ + MENUITEM "&About Explorer...", ID_ABOUT_IBROWSER + MENUITEM "About &OS...", ID_ABOUT_WINDOWS + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE DISCARDABLE +BEGIN + IDS_TITLE "Reactos Internet Web Browser" + IDS_EMPTY "(Empty)" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_ABOUT_IBROWSER "&About..." +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// Spanish (Castilian) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ESP) +#ifdef _WIN32 +LANGUAGE LANG_SPANISH, SUBLANG_SPANISH +#pragma code_page(1252) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Menu +// + +IDM_SDIFRAME MENU PRELOAD DISCARDABLE +BEGIN + POPUP "&Archivo" + BEGIN + MENUITEM "S&alir", ID_FILE_EXIT + END + POPUP "&Ver" + BEGIN + MENUITEM "&Barra de Herramientas", ID_VIEW_TOOL_BAR + MENUITEM "Barra &Lateral", ID_VIEW_SIDE_BAR, GRAYED + MENUITEM "Barra de &Estado", ID_VIEW_STATUSBAR + MENUITEM SEPARATOR + MENUITEM "&Actualizar\tF5", ID_REFRESH + MENUITEM "P&antalla Completa\tCtrl+Shift+S", ID_VIEW_FULLSCREEN + END + POPUP "&Ayuda" + BEGIN + MENUITEM "Explorer &FAQ...", ID_IBROWSER_FAQ + MENUITEM "&Acerca de Explorer...", ID_ABOUT_IBROWSER + MENUITEM "Acerca de &OS...", ID_ABOUT_WINDOWS + END +END + +#endif // Spanish (Castilian) resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// French (France) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FRA) +#ifdef _WIN32 +LANGUAGE LANG_FRENCH, SUBLANG_FRENCH +#pragma code_page(1252) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Menu +// + +IDM_SDIFRAME MENU PRELOAD DISCARDABLE +BEGIN + POPUP "&Fichier" + BEGIN + MENUITEM "&Fermer", ID_FILE_EXIT + END + POPUP "&Affichage" + BEGIN + MENUITEM "Barre d'&outils", ID_VIEW_TOOL_BAR + MENUITEM "&Side Bar", ID_VIEW_SIDE_BAR, GRAYED + MENUITEM "Barre d'&état", ID_VIEW_STATUSBAR + MENUITEM SEPARATOR + MENUITEM "&Refresh\tF5", ID_REFRESH + MENUITEM "F&ull Screen\tCtrl+Shift+S", ID_VIEW_FULLSCREEN + END + POPUP "A&ide" + BEGIN + MENUITEM "&FAQ Explorateur...", ID_IBROWSER_FAQ + MENUITEM "A propos de l'&explorateur...", ID_ABOUT_WINDOWS + MENUITEM "A propos de l'&OS...", ID_ABOUT_IBROWSER + END +END + +#endif // French (France) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#ifndef _ROS_ +LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL +STRINGTABLE DISCARDABLE +BEGIN +IDS_VERSION_STR "" +#ifdef UNICODE +IDS_IBROWSER_VERSION_STR "ROS Explorer%0s" +#else +IDS_IBROWSER_VERSION_STR "ROS Explorer Ansi%0s" +#endif +END +#endif + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/reactos/subsys/system/ibrowser/mainframe.cpp b/reactos/subsys/system/ibrowser/mainframe.cpp new file mode 100644 index 00000000000..ba34da97ec7 --- /dev/null +++ b/reactos/subsys/system/ibrowser/mainframe.cpp @@ -0,0 +1,796 @@ +/* + * Copyright 2005 Martin Fuchs + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + + + // + // ROS Internet Web Browser + // + // mainframe.cpp + // + // Martin Fuchs, 25.01.2005 + // + + +#include "precomp.h" + +/* We can't include webchild.h here - otherwise MinGW produces errors like: "multiple definition of `QACONTAINERFLAGS'" +#include "webchild.h" +*/ +extern HWND create_webchildwindow(const WebChildWndInfo& info); + +#include "ibrowser_intres.h" + + +HWND MainFrameBase::Create(LPCTSTR url, UINT cmdshow) +{ + HWND hMainFrame; + + hMainFrame = MainFrame::Create(); + //@@hMainFrame = MainFrame::Create(url); + + if (hMainFrame) { + String sPath; + + if (url) { + sPath = url; // copy url to avoid accessing freed memory + url = sPath; + } + + ShowWindow(hMainFrame, cmdshow); + UpdateWindow(hMainFrame); + + // Open the first child window after initializing the application + PostMessage(hMainFrame, PM_OPEN_WINDOW, 0, (LPARAM)url); + } + + return hMainFrame; +} + + +MainFrameBase::MainFrameBase(HWND hwnd) + : super(hwnd), + _himl(ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), ILC_MASK|ILC_COLOR24, 2, 0)) +{ + _hMenuFrame = GetMenu(hwnd); + _hMenuWindow = GetSubMenu(_hMenuFrame, GetMenuItemCount(_hMenuFrame)-3); + + _menu_info._hMenuView = GetSubMenu(_hMenuFrame, 1); + + _hAccel = LoadAccelerators(g_hInstance, MAKEINTRESOURCE(IDA_IBROWSER)); + + + TBBUTTON toolbarBtns[] = { +#ifdef _NO_REBAR + {0, 0, 0, BTNS_SEP, {0, 0}, 0, 0}, +#endif + {7, ID_GO_BACK, TBSTATE_ENABLED, BTNS_BUTTON, {0, 0}, 0, 0}, + {8, ID_GO_FORWARD, TBSTATE_ENABLED, BTNS_BUTTON, {0, 0}, 0, 0}, + {9, ID_GO_UP, TBSTATE_ENABLED, BTNS_BUTTON, {0, 0}, 0, 0}, + {10, ID_GO_HOME, TBSTATE_ENABLED, BTNS_BUTTON, {0, 0}, 0, 0}, + {11, ID_GO_SEARCH, TBSTATE_ENABLED, BTNS_BUTTON, {0, 0}, 0, 0}, + {12, ID_REFRESH, TBSTATE_ENABLED, BTNS_BUTTON, {0, 0}, 0, 0}, + {13, ID_STOP, TBSTATE_ENABLED, BTNS_BUTTON, {0, 0}, 0, 0} + }; + + _htoolbar = CreateToolbarEx(hwnd, +#ifndef _NO_REBAR + CCS_NOPARENTALIGN|CCS_NORESIZE| +#endif + WS_CHILD|WS_VISIBLE, IDW_TOOLBAR, 2, g_hInstance, IDB_TOOLBAR, + toolbarBtns, sizeof(toolbarBtns)/sizeof(TBBUTTON), + 16, 15, 16, 15, sizeof(TBBUTTON)); + + CheckMenuItem(_menu_info._hMenuView, ID_VIEW_TOOL_BAR, MF_BYCOMMAND|MF_CHECKED); + + + // address bar + WindowCanvas canvas(hwnd); + RECT rect = {0, 0, 0, 0}; + DrawText(canvas, TEXT("My"), -1, &rect, DT_SINGLELINE|DT_NOPREFIX|DT_CALCRECT); + HFONT hfont = GetStockFont(DEFAULT_GUI_FONT); + + _haddressedit = CreateWindow(TEXT("EDIT"), NULL, WS_CHILD|WS_VISIBLE, 0, 0, 0, rect.bottom, + hwnd, (HMENU)IDW_ADDRESSBAR, g_hInstance, 0); + SetWindowFont(_haddressedit, hfont, FALSE); + new EditController(_haddressedit); + + /* CreateStatusWindow does not accept WS_BORDER + _hstatusbar = CreateWindowEx(WS_EX_NOPARENTNOTIFY, STATUSCLASSNAME, 0, + WS_CHILD|WS_VISIBLE|WS_CLIPSIBLINGS|WS_BORDER|CCS_NODIVIDER, 0,0,0,0, + hwnd, (HMENU)IDW_STATUSBAR, g_hInstance, 0);*/ + + _hstatusbar = CreateStatusWindow(WS_CHILD|WS_VISIBLE, 0, hwnd, IDW_STATUSBAR); + CheckMenuItem(_menu_info._hMenuView, ID_VIEW_STATUSBAR, MF_BYCOMMAND|MF_CHECKED); + + _hsidebar = CreateWindowEx(WS_EX_STATICEDGE, WC_TREEVIEW, TEXT("Sidebar"), + WS_CHILD|WS_TABSTOP|WS_BORDER|/*WS_VISIBLE|*/WS_CHILD|TVS_HASLINES|TVS_HASBUTTONS|TVS_SHOWSELALWAYS|TVS_INFOTIP, + -1, -1, 200, 0, _hwnd, (HMENU)IDW_SIDEBAR, g_hInstance, 0); + + TreeView_SetImageList(_hsidebar, _himl, TVSIL_NORMAL); + + CheckMenuItem(_menu_info._hMenuView, ID_VIEW_SIDE_BAR, MF_BYCOMMAND|MF_UNCHECKED/*MF_CHECKED*/); + + + // create rebar window to manage toolbar and drivebar +#ifndef _NO_REBAR + _hwndrebar = CreateWindowEx(WS_EX_TOOLWINDOW, REBARCLASSNAME, NULL, + WS_CHILD|WS_VISIBLE|WS_CLIPSIBLINGS|WS_CLIPCHILDREN| + RBS_VARHEIGHT|RBS_AUTOSIZE|RBS_DBLCLKTOGGLE| + CCS_NODIVIDER|CCS_NOPARENTALIGN, + 0, 0, 0, 0, _hwnd, 0, g_hInstance, 0); + + int btn_hgt = HIWORD(SendMessage(_htoolbar, TB_GETBUTTONSIZE, 0, 0)); + + REBARBANDINFO rbBand; + + rbBand.cbSize = sizeof(REBARBANDINFO); + rbBand.fMask = RBBIM_TEXT|RBBIM_STYLE|RBBIM_CHILD|RBBIM_CHILDSIZE|RBBIM_SIZE; +#ifndef RBBS_HIDETITLE // missing in MinGW headers as of 25.02.2004 +#define RBBS_HIDETITLE 0x400 +#endif + rbBand.fStyle = RBBS_CHILDEDGE|RBBS_GRIPPERALWAYS|RBBS_HIDETITLE; + + rbBand.cxMinChild = 0; + rbBand.cyMinChild = 0; + rbBand.cyChild = 0; + rbBand.cyMaxChild = 0; + rbBand.cyIntegral = btn_hgt; + + rbBand.lpText = NULL;//TEXT("Toolbar"); + rbBand.hwndChild = _htoolbar; + rbBand.cxMinChild = 0; + rbBand.cyMinChild = btn_hgt + 4; + rbBand.cx = 284; + SendMessage(_hwndrebar, RB_INSERTBAND, (WPARAM)-1, (LPARAM)&rbBand); +#endif +} + + +MainFrameBase::~MainFrameBase() +{ + ImageList_Destroy(_himl); + +//@@if (g_Globals._hMainWnd == _hwnd) + PostQuitMessage(0); +} + + +LRESULT MainFrameBase::WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam) +{ + LRESULT res; + + if (ProcessMessage(nmsg, wparam, lparam, &res)) + return res; + else + return super::WndProc(nmsg, wparam, lparam); +} + +bool MainFrameBase::ProcessMessage(UINT nmsg, WPARAM wparam, LPARAM lparam, LRESULT* pres) +{ + switch(nmsg) { + case PM_TRANSLATE_MSG: + *pres = TranslateMsg((MSG*)lparam); + return true; + + case WM_SHOWWINDOW: + if (wparam) // trigger child resizing after window creation - now we can succesfully call IsWindowVisible() + resize_frame_client(); + return false; // goto def; + + case WM_CLOSE: + DestroyWindow(_hwnd); +//@@ g_Globals._hMainWnd = 0; + break; + + case WM_DESTROY: + break; + + case WM_SIZE: + resize_frame(LOWORD(lparam), HIWORD(lparam)); + break; // do not pass message to DefFrameProc + + case WM_GETMINMAXINFO: { + LPMINMAXINFO lpmmi = (LPMINMAXINFO)lparam; + + lpmmi->ptMaxTrackSize.x <<= 1;/*2*GetSystemMetrics(SM_CXSCREEN) / SM_CXVIRTUALSCREEN */ + lpmmi->ptMaxTrackSize.y <<= 1;/*2*GetSystemMetrics(SM_CYSCREEN) / SM_CYVIRTUALSCREEN */ + break;} + + case PM_FRM_CALC_CLIENT: + frame_get_clientspace((PRECT)lparam); + *pres = TRUE; + return true; + + case PM_FRM_GET_MENUINFO: + *pres = (LPARAM)&_menu_info; + return true; + + case PM_GET_CONTROLWINDOW: + if (wparam == FCW_STATUS) { + *pres = (LRESULT)(HWND)_hstatusbar; + return true; + } + break; + + case PM_SETSTATUSTEXT: + SendMessage(_hstatusbar, SB_SETTEXT, 0, lparam); + break; + + case PM_URL_CHANGED: + SetWindowText(_haddressedit, (LPCTSTR)lparam); + break; + + default: + return false; + } + + *pres = 0; + return true; +} + +BOOL MainFrameBase::TranslateMsg(MSG* pmsg) +{ + if (TranslateAccelerator(_hwnd, _hAccel, pmsg)) + return TRUE; + + return FALSE; +} + + +int MainFrameBase::Command(int id, int code) +{ + CONTEXT("MainFrameBase::Command()"); + + switch(id) { + case ID_FILE_EXIT: + SendMessage(_hwnd, WM_CLOSE, 0, 0); + break; + + case ID_VIEW_TOOL_BAR: + toggle_child(_hwnd, id, _htoolbar, 0); + break; + + case ID_VIEW_STATUSBAR: + toggle_child(_hwnd, id, _hstatusbar); + break; + + case ID_VIEW_SIDE_BAR: + // lazy initialization + if (!TreeView_GetCount(_hsidebar)) + FillBookmarks(); + + toggle_child(_hwnd, id, _hsidebar); + break; + + case ID_HELP: + WinHelp(_hwnd, TEXT("ibrowser")/*file ibrowser.hlp*/, HELP_INDEX, 0); + break; + + case ID_VIEW_FULLSCREEN: + CheckMenuItem(_menu_info._hMenuView, id, toggle_fullscreen()?MF_CHECKED:0); + break; + + case ID_ABOUT_WINDOWS: + ShellAbout(_hwnd, ResString(IDS_TITLE), NULL, 0); + break; + + case ID_ABOUT_IBROWSER: + ibrowser_about(_hwnd); + break; + + case ID_IBROWSER_FAQ: + launch_file(_hwnd, TEXT("http://www.sky.franken.de/explorer/"), SW_SHOW); + break; + + case IDW_ADDRESSBAR: + if (code == 1) { + TCHAR url[BUFFER_LEN]; + + if (GetWindowText(_haddressedit, url, BUFFER_LEN)) + go_to(url, false); + } + break; + + default: + return 1; // no command handlers in Window::Command() + } + + return 0; +} + + +int MainFrameBase::Notify(int id, NMHDR* pnmh) +{ + switch(pnmh->code) { + // resize children windows when the rebar size changes + case RBN_AUTOSIZE: + resize_frame_client(); + break; + + case TVN_GETINFOTIP: { + NMTVGETINFOTIP* pnmgit = (NMTVGETINFOTIP*)pnmh; + + if (pnmgit->lParam) { + const BookmarkNode& node = *(BookmarkNode*)pnmgit->lParam; + + if (node._type == BookmarkNode::BMNT_FOLDER) { + // display tooltips for bookmark folders + if (!node._pfolder->_description.empty()) + lstrcpyn(pnmgit->pszText, node._pfolder->_description.c_str(), pnmgit->cchTextMax); + } else if (node._type == BookmarkNode::BMNT_BOOKMARK) { + // display tooltips for bookmark folders + String txt = node._pbookmark->_description; + + if (!node._pbookmark->_url.empty()) { + if (!txt.empty()) + txt += TEXT(" - "); + + txt += node._pbookmark->_url; + } + + lstrcpyn(pnmgit->pszText, txt.c_str(), pnmgit->cchTextMax); + } + } + break;} + + case NM_DBLCLK: { + HTREEITEM hitem = TreeView_GetSelection(_hsidebar); + LPARAM lparam = TreeView_GetItemData(_hsidebar, hitem); + + if (lparam) { + const BookmarkNode& node = *(BookmarkNode*)lparam; + + if (node._type == BookmarkNode::BMNT_BOOKMARK) { + bool new_window = GetAsyncKeyState(VK_SHIFT)<0; + + go_to(node._pbookmark->_url, new_window); + } + } + break;} + } + + return 0; +} + + +void MainFrameBase::resize_frame(int cx, int cy) +{ + if (cy <= 0) + return; // avoid resizing children when receiving RBN_AUTOSIZE while getting minimized + + RECT rect = {0, 0, cx, cy}; + + if (_hwndrebar) { + int height = ClientRect(_hwndrebar).bottom; + MoveWindow(_hwndrebar, rect.left, rect.top, rect.right-rect.left, height, TRUE); + rect.top += height; + } else { + if (IsWindowVisible(_htoolbar)) { + SendMessage(_htoolbar, WM_SIZE, 0, 0); + WindowRect rt(_htoolbar); + rect.top = rt.bottom; + // rect.bottom -= rt.bottom; + } + } + + if (IsWindowVisible(_hstatusbar)) { + int parts[] = {300, 500}; + + SendMessage(_hstatusbar, WM_SIZE, 0, 0); + SendMessage(_hstatusbar, SB_SETPARTS, 2, (LPARAM)&parts); + ClientRect rt(_hstatusbar); + rect.bottom -= rt.bottom; + } + + if (IsWindowVisible(_haddressedit)) { + ClientRect rt(_haddressedit); + rect.bottom -= rt.bottom; + + SetWindowPos(_haddressedit, 0, 0, rect.bottom, rect.right-rect.left, rt.bottom, SWP_NOACTIVATE|SWP_NOZORDER); + } + + if (IsWindowVisible(_hsidebar)) { + WindowRect rt(_hsidebar); + rect.left += rt.right-rt.left; + + SetWindowPos(_hsidebar, 0, -1, rect.top-1, rt.right-rt.left, rect.bottom-rect.top+1, SWP_NOACTIVATE|SWP_NOZORDER); + } +} + +void MainFrameBase::resize_frame_client() +{ + ClientRect rect(_hwnd); + + resize_frame(rect.right, rect.bottom); +} + +void MainFrameBase::frame_get_clientspace(PRECT prect) +{ + if (!IsIconic(_hwnd)) + GetClientRect(_hwnd, prect); + else { + WINDOWPLACEMENT wp; + + GetWindowPlacement(_hwnd, &wp); + + prect->left = prect->top = 0; + prect->right = wp.rcNormalPosition.right-wp.rcNormalPosition.left- + 2*(GetSystemMetrics(SM_CXSIZEFRAME)+GetSystemMetrics(SM_CXEDGE)); + prect->bottom = wp.rcNormalPosition.bottom-wp.rcNormalPosition.top- + 2*(GetSystemMetrics(SM_CYSIZEFRAME)+GetSystemMetrics(SM_CYEDGE))- + GetSystemMetrics(SM_CYCAPTION)-GetSystemMetrics(SM_CYMENUSIZE); + } + + if (IsWindowVisible(_htoolbar)) { + ClientRect rt(_htoolbar); + prect->top += rt.bottom+2; + } + + if (IsWindowVisible(_hstatusbar)) { + ClientRect rt(_hstatusbar); + prect->bottom -= rt.bottom; + } +} + +BOOL MainFrameBase::toggle_fullscreen() +{ + RECT rt; + + if ((_fullscreen._mode=!_fullscreen._mode)) { + GetWindowRect(_hwnd, &_fullscreen._orgPos); + _fullscreen._wasZoomed = IsZoomed(_hwnd); + + Frame_CalcFrameClient(_hwnd, &rt); + ClientToScreen(_hwnd, (LPPOINT)&rt.left); + ClientToScreen(_hwnd, (LPPOINT)&rt.right); + + rt.left = _fullscreen._orgPos.left-rt.left; + rt.top = _fullscreen._orgPos.top-rt.top; + rt.right = GetSystemMetrics(SM_CXSCREEN)+_fullscreen._orgPos.right-rt.right; + rt.bottom = GetSystemMetrics(SM_CYSCREEN)+_fullscreen._orgPos.bottom-rt.bottom; + + MoveWindow(_hwnd, rt.left, rt.top, rt.right-rt.left, rt.bottom-rt.top, TRUE); + } else { + MoveWindow(_hwnd, _fullscreen._orgPos.left, _fullscreen._orgPos.top, + _fullscreen._orgPos.right-_fullscreen._orgPos.left, + _fullscreen._orgPos.bottom-_fullscreen._orgPos.top, TRUE); + + if (_fullscreen._wasZoomed) + ShowWindow(_hwnd, WS_MAXIMIZE); + } + + return _fullscreen._mode; +} + +void MainFrameBase::fullscreen_move() +{ + RECT rt, pos; + GetWindowRect(_hwnd, &pos); + + Frame_CalcFrameClient(_hwnd, &rt); + ClientToScreen(_hwnd, (LPPOINT)&rt.left); + ClientToScreen(_hwnd, (LPPOINT)&rt.right); + + rt.left = pos.left-rt.left; + rt.top = pos.top-rt.top; + rt.right = GetSystemMetrics(SM_CXSCREEN)+pos.right-rt.right; + rt.bottom = GetSystemMetrics(SM_CYSCREEN)+pos.bottom-rt.bottom; + + MoveWindow(_hwnd, rt.left, rt.top, rt.right-rt.left, rt.bottom-rt.top, TRUE); +} + + +void MainFrameBase::toggle_child(HWND hwnd, UINT cmd, HWND hchild, int band_idx) +{ + BOOL vis = IsWindowVisible(hchild); + + CheckMenuItem(_menu_info._hMenuView, cmd, vis?MF_BYCOMMAND:MF_BYCOMMAND|MF_CHECKED); + + if (band_idx != -1) + SendMessage(_hwndrebar, RB_SHOWBAND, band_idx, !vis); + else + ShowWindow(hchild, vis? SW_HIDE: SW_SHOW); + + if (_fullscreen._mode) + fullscreen_move(); + + resize_frame_client(); +} + +void MainFrameBase::FillBookmarks() +{ +/*@@ + HiddenWindow hide(_hsidebar); + WindowCanvas canvas(_hwnd); + + TreeView_DeleteAllItems(_hsidebar); + + g_icon_cache.get_icon(ICID_FAVORITES).add_to_imagelist(_himl, canvas); + g_icon_cache.get_icon(ICID_BOOKMARK).add_to_imagelist(_himl, canvas); + ImageList_AddAlphaIcon(_himl, SmallIcon(IDI_DOT), GetStockBrush(WHITE_BRUSH), canvas); + g_icon_cache.get_icon(ICID_FOLDER).add_to_imagelist(_himl, canvas); + g_icon_cache.get_icon(ICID_FOLDER).add_to_imagelist(_himl, canvas); + + TV_INSERTSTRUCT tvi; + + tvi.hParent = TVI_ROOT; + tvi.hInsertAfter = TVI_LAST; + tvi.item.mask = TVIF_TEXT|TVIF_IMAGE|TVIF_SELECTEDIMAGE; + ResString sFavorites(IDS_FAVORITES); + tvi.item.pszText = (LPTSTR)sFavorites.c_str(); + tvi.item.iSelectedImage = tvi.item.iImage = 0; + + HTREEITEM hitem_bookmarks = TreeView_InsertItem(_hsidebar, &tvi); + + g_Globals._favorites.fill_tree(_hsidebar, hitem_bookmarks, _himl, canvas); + + TreeView_Expand(_hsidebar, hitem_bookmarks, TVE_EXPAND); +*/ +} + + +MainFrame::MainFrame(HWND hwnd) + : super(hwnd) +{ + _split_pos = DEFAULT_SPLIT_POS; + _last_split = DEFAULT_SPLIT_POS; +} + +HWND MainFrame::Create() +{ + HMENU hMenuFrame = LoadMenu(g_hInstance, MAKEINTRESOURCE(IDM_SDIFRAME)); + + return Window::Create(WINDOW_CREATOR(MainFrame), 0, + (LPCTSTR)(int)g_hframeClass, ResString(IDS_TITLE), WS_OVERLAPPEDWINDOW, + CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, + 0/*hwndDesktop*/, hMenuFrame); +} + +/*@@ +HWND MainFrame::Create(LPCTSTR url) +{ + HWND hFrame = Create(); + if (!hFrame) + return 0; + + ShowWindow(hFrame, SW_SHOW); + + MainFrame* pFrame = GET_WINDOW(MainFrame, hFrame); + + if (pFrame) + pFrame->set_url(url); + + return hFrame; +} +*/ + +LRESULT MainFrame::WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam) +{ + switch(nmsg) { + case WM_SIZE: + resize_frame(LOWORD(lparam), HIWORD(lparam)); + break; + + case WM_PAINT: { + PaintCanvas canvas(_hwnd); + + if (_left_hwnd && _right_hwnd) { + ClientRect rt(_hwnd); + rt.left = _split_pos-SPLIT_WIDTH/2; + rt.right = _split_pos+SPLIT_WIDTH/2+1; + + if (_right_hwnd) { + WindowRect right_rect(_right_hwnd); + ScreenToClient(_hwnd, &right_rect); + rt.top = right_rect.top; + rt.bottom = right_rect.bottom; + } + + HBRUSH lastBrush = SelectBrush(canvas, GetStockBrush(COLOR_SPLITBAR)); + Rectangle(canvas, rt.left, rt.top-1, rt.right, rt.bottom+1); + SelectObject(canvas, lastBrush); + } + break;} + + case WM_SETCURSOR: + if (LOWORD(lparam) == HTCLIENT) { + POINT pt; + GetCursorPos(&pt); + ScreenToClient(_hwnd, &pt); + + if (pt.x>=_split_pos-SPLIT_WIDTH/2 && pt.x<_split_pos+SPLIT_WIDTH/2+1) { + SetCursor(LoadCursor(0, IDC_SIZEWE)); + return TRUE; + } + } + goto def; + + case WM_LBUTTONDOWN: { + int x = GET_X_LPARAM(lparam); + + ClientRect rt(_hwnd); + + if (x>=_split_pos-SPLIT_WIDTH/2 && x<_split_pos+SPLIT_WIDTH/2+1) { + _last_split = _split_pos; + SetCapture(_hwnd); + } + + break;} + + case WM_LBUTTONUP: + if (GetCapture() == _hwnd) + ReleaseCapture(); + break; + + case WM_KEYDOWN: + if (wparam == VK_ESCAPE) + if (GetCapture() == _hwnd) { + _split_pos = _last_split; + resize_children(); + _last_split = -1; + ReleaseCapture(); + SetCursor(LoadCursor(0, IDC_ARROW)); + } + break; + + case WM_MOUSEMOVE: + if (GetCapture() == _hwnd) { + int x = LOWORD(lparam); + + ClientRect rt(_hwnd); + + if (x>=0 && x +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) External Target" 0x0106 + +CFG=make_ibrowser - Win32 bjam +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "make_ibrowser.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "make_ibrowser.mak" CFG="make_ibrowser - Win32 bjam" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "make_ibrowser - Win32 Release" (based on "Win32 (x86) External Target") +!MESSAGE "make_ibrowser - Win32 Debug" (based on "Win32 (x86) External Target") +!MESSAGE "make_ibrowser - Win32 Unicode Debug" (based on "Win32 (x86) External Target") +!MESSAGE "make_ibrowser - Win32 Unicode Release" (based on "Win32 (x86) External Target") +!MESSAGE "make_ibrowser - Win32 bjam" (based on "Win32 (x86) External Target") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" + +!IF "$(CFG)" == "make_ibrowser - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Cmd_Line "NMAKE /f make_ibrowser.mak" +# PROP BASE Rebuild_Opt "/a" +# PROP BASE Target_File "make_ibrowser.exe" +# PROP BASE Bsc_Name "make_ibrowser.bsc" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Cmd_Line "msdevfilt -gcc -pipe "perl d:\tools\gSTLFilt.pl" make -f Makefile.PCH UNICODE=0" +# PROP Rebuild_Opt "clean all" +# PROP Target_File "ibrowser.exe" +# PROP Bsc_Name "" +# PROP Target_Dir "" + +!ELSEIF "$(CFG)" == "make_ibrowser - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Cmd_Line "NMAKE /f make_ibrowser.mak" +# PROP BASE Rebuild_Opt "/a" +# PROP BASE Target_File "make_ibrowser.exe" +# PROP BASE Bsc_Name "make_ibrowser.bsc" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Cmd_Line "msdevfilt -gcc -pipe "perl d:\tools\gSTLFilt.pl" make -f Makefile.PCH UNICODE=0 DEBUG=1" +# PROP Rebuild_Opt "clean all" +# PROP Target_File "ibrowser.exe" +# PROP Bsc_Name "msdevfilt -gcc -pipe "perl d:\tools\gSTLFilt.pl" make -f Makefile.MinGW UNICODE=0 DEBUG=1" +# PROP Target_Dir "" + +!ELSEIF "$(CFG)" == "make_ibrowser - Win32 Unicode Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "UDebug" +# PROP BASE Intermediate_Dir "UDebug" +# PROP BASE Cmd_Line "msdevfilt -gcc -pipe "perl d:\tools\gSTLFilt.pl" make -f Makefile.MinGW UNICODE=1 DEBUG=1" +# PROP BASE Rebuild_Opt "clean all" +# PROP BASE Target_File "ibrowser.exe" +# PROP BASE Bsc_Name "" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "UDebug" +# PROP Intermediate_Dir "UDebug" +# PROP Cmd_Line "msdevfilt -gcc -pipe "perl d:\tools\gSTLFilt.pl" make -f Makefile.MinGW UNICODE=1 DEBUG=1" +# PROP Rebuild_Opt "clean all" +# PROP Target_File "ibrowser.exe" +# PROP Bsc_Name "" +# PROP Target_Dir "" + +!ELSEIF "$(CFG)" == "make_ibrowser - Win32 Unicode Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "URelease" +# PROP BASE Intermediate_Dir "URelease" +# PROP BASE Cmd_Line "msdevfilt -gcc -pipe "perl d:\tools\gSTLFilt.pl" make -f Makefile.MinGW UNICODE=1" +# PROP BASE Rebuild_Opt "clean all" +# PROP BASE Target_File "ibrowser.exe" +# PROP BASE Bsc_Name "" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "URelease" +# PROP Intermediate_Dir "URelease" +# PROP Cmd_Line "msdevfilt -gcc make -f Makefile.PCH UNICODE=1" +# PROP Rebuild_Opt "clean all" +# PROP Target_File "ibrowser.exe" +# PROP Bsc_Name "" +# PROP Target_Dir "" + +!ELSEIF "$(CFG)" == "make_ibrowser - Win32 bjam" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Cmd_Line "msdevfilt -gcc -pipe "perl d:\tools\gSTLFilt.pl" make -f Makefile.MinGW DEBUG=1" +# PROP BASE Rebuild_Opt "clean all" +# PROP BASE Target_File "ibrowser.exe" +# PROP BASE Bsc_Name "" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Cmd_Line "msdevfilt -gcc -pipe "perl d:\tools\gSTLFilt.pl" bjam" +# PROP Rebuild_Opt "clean&bjam release" +# PROP Target_File "ibrowser.exe" +# PROP Bsc_Name "" +# PROP Target_Dir "" + +!ENDIF + +# Begin Target + +# Name "make_ibrowser - Win32 Release" +# Name "make_ibrowser - Win32 Debug" +# Name "make_ibrowser - Win32 Unicode Debug" +# Name "make_ibrowser - Win32 Unicode Release" +# Name "make_ibrowser - Win32 bjam" + +!IF "$(CFG)" == "make_ibrowser - Win32 Release" + +!ELSEIF "$(CFG)" == "make_ibrowser - Win32 Debug" + +!ELSEIF "$(CFG)" == "make_ibrowser - Win32 Unicode Debug" + +!ELSEIF "$(CFG)" == "make_ibrowser - Win32 Unicode Release" + +!ELSEIF "$(CFG)" == "make_ibrowser - Win32 bjam" + +!ENDIF + +# Begin Source File + +SOURCE=.\Jamfile +# End Source File +# Begin Source File + +SOURCE=.\Makefile +# End Source File +# Begin Source File + +SOURCE=.\Makefile.MinGW +# End Source File +# Begin Source File + +SOURCE=.\Makefile.PCH +# End Source File +# End Target +# End Project diff --git a/reactos/subsys/system/ibrowser/precomp.cpp b/reactos/subsys/system/ibrowser/precomp.cpp new file mode 100644 index 00000000000..c786813cbda --- /dev/null +++ b/reactos/subsys/system/ibrowser/precomp.cpp @@ -0,0 +1,28 @@ +/* + * Copyright 2005 Martin Fuchs + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + + + // + // ROS Internet Web Browser - precompiled header support + // + // precomp.h + // + // Martin Fuchs, 25.01.2005 + // + +#include "precomp.h" diff --git a/reactos/subsys/system/ibrowser/precomp.h b/reactos/subsys/system/ibrowser/precomp.h new file mode 100644 index 00000000000..c0d382d9681 --- /dev/null +++ b/reactos/subsys/system/ibrowser/precomp.h @@ -0,0 +1,32 @@ +/* + * Copyright 2005 Martin Fuchs + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + + + // + // ROS Internet Web Browser - precompiled header support + // + // precomp.h + // + // Martin Fuchs, 25.01.2005 + // + +#include "utility/utility.h" +#include "utility/comutil.h" + +#include "ibrowser.h" + diff --git a/reactos/subsys/system/ibrowser/readme.txt b/reactos/subsys/system/ibrowser/readme.txt new file mode 100644 index 00000000000..234c112c97e --- /dev/null +++ b/reactos/subsys/system/ibrowser/readme.txt @@ -0,0 +1,9 @@ + +IBrowser is a Web Browser User Interface similar derived from ROS Explorer. +It encapsulates the Mozilla or MS Web Browser Control. + + +For more information about ReactOS Explorer please look at the FAQ web page: + +http://www.sky.franken.de/explorer/ + diff --git a/reactos/subsys/system/ibrowser/res/dot.ico b/reactos/subsys/system/ibrowser/res/dot.ico new file mode 100644 index 0000000000000000000000000000000000000000..9ddbb8a41c7472dca30197bd6541898b0df64bc8 GIT binary patch literal 3750 zcmds(e@xV69LL`$5GQhirG^T4nHi86V#TSbrzmB{4_oBs2-sYW^#_r(eUEA5=nuHm zKit$!UF~w&7HdPD>DbJ;N)l_%xj`d!4U~QuO>KE-Kjx?R=li{5IPPwh{gFMl=brEL z>+}42Jw0c(MKe%kk;(~&L+}zyRvz&S9$*mh}B6c~~ zbLQpBwUw2XRaI5%*RL-tD=RE4%+Ai9pE)t&C>wnK*w z9XWEOy}jM<_p^ILLqkPH#qv3m#+S9B?(RN(`0(Dnd%a%ohMMY# z^SOCr`07tX!^6YDU~q77u&b+U|Ni|gEiDx*@*}R7BVM~QbY8TTE5Cf1i5Kr*Bfuw?TfY5^Mf=q!Zf+&Na zfqW`+AVeUgAa)?OAc5fhkF=#DWgeRg_H>82^ZKn(Lw&ppfhi7~m){c@?Vmer2h*%} z%*GD1*TKHA8r7%oGONE_`KuA=Pqv-j8Z`P6T`1TdG_<0dWgU|pwwoMN>pIe`I%g*P zO{0C*X`DXJ8l{%=j^n2en#VS)m}ap~7%uh&4YhNS?STZ;&)5Z`3SFs|hu6&PsNfoD zW2a#|dwSA?hKP>f!iTh>(f@9#Ip@ljQly?+WAX5vEencEP0_ePNrI(%k^kqEiYT#WBfr|3z(W4 z%ROhY8MLj&%^W}Vxn$ezcR9LdzO$&*G7$O?+qtc9R7UInQCO4~SDv;esbzk3E``d2h01 z;K`Lm%a;|*dw6=Ned+3wXNs5RXH5)``1Dg{C94+RA07`_vtr5oIg3Z;^LIW*znS`m z-q|~At;ic?0%ke?yrB;-tV|#fFyA^p+l0w_$Mr*h`lu5xt%(v6o9*>l)r=y2iV}T3 z*jQlq`FuJM^FA+6I?*s#!}NyX@#O(2H^gYxjv|I$RHPUl%|;3T?mjuKQLOEXGUETI z*qvc3XY8cD3iU$tTg(2+3SU^3<)_{X^;f9FLOmAhvrx0ujz5--ZN^LG)Lx+`3pH7& z&qA#h>bOwfg_^H6qRwOA_BT4I)k1w1>a$R*h59YjcA@SI{R49?(dIyH7V5T8vxS;1 z)Ni4d3w2-U3kdxOp}!FoZfdnq(}h|t)N!G<3pL-gN&i9Ua|r#BsQoW}^K~cnT&U|p zjTh>@&?gZ34np5T=##{p|Iqi}mQ(wMdN0&{p-&+68-%`w&@U1CKr#1E_vMGdem{K( zp|4=tp>HAdM})qS_KkUd;e9>dbEf?4sZTrUw+MY5+5FKL(|6`i DK928Q literal 0 HcmV?d00001 diff --git a/reactos/subsys/system/ibrowser/res/dot_red.ico b/reactos/subsys/system/ibrowser/res/dot_red.ico new file mode 100644 index 0000000000000000000000000000000000000000..4d176eef1d552bb3ca84b8562a8cce458b818a76 GIT binary patch literal 3750 zcmds3eN0nV6hDQQ7FunmPSK%O-4wqDn@);G-lKi}!hwY`qC@{A2ei9Ah*Z^m@Hcr%PrTW0Gb7O6GjG#p+7WDYj%6y_{|}8jV`5 z*2pA=q||OcRIp$}PVu&!l3J^KYnEeOdTxoyJWr?7hHPxfqSLmOdkSCw#If#3VMSBH z@&>D`IwRL(GMQ4?ga@Zs%?>avmSt>jentT?XLJ zSbz>CK)bZBQjErEP9UF-ecv;gZ(;aOh7yL+0?Sw+naKl&MVm_n){p_LX#udh0$|Nn zNKVN`%>$dw1}3csv=%pLGfF}G$}-e)&}A-1T?x9ZHL%dO3@R%t!NfFy&Pq_%1D8_; zTz(C31+}2JZHGm+YS7zvfWB}i7#t1YcI<`~rF$SXc^}N@TEN160fwTzU|9SC7+fEL z(bWV-_W>}JdJT-6Njjm@yS?j)?)eiAmk za|##+H|H@DXP5?@B?=LXJ<+R=`WBBuMD=0Xv?Dj$HE?cMbiGjOEA9_oRi+SK+}6!s zlWHKLuA8TUXvDIezB)A49PNwkA5{-_tS!VazC( zUF+s)KNidfkU-andcb1}lu2=a4fJ}8CYU3`O^_jTRZKVU_0kzMpuzqrK5b+@bX5Pz zR|_$(m-fH@mRZQ5)#y6tsKTCT&w*Ih+_SvB^*n!BE{VG=2e4zEAAUANdt;i=bKa&j zP+gxV@VPMtVGOK&&}f5DkHeapEvd9T{B=$TG~TuMFr4W=j9)^Z&~F*t110VSouB&U ztIL<;`S-^AbJRFed^)a&aw$H4&UgG>tTh8iy0LW65f+5zQU#nZevv}d_g(gVGld^R z$nJT(H#@DzK`U6N58C4hbM&~6U?~z46}{3E1qlM-kx^0!LVjS(pdmw_8Y~wFD9?_H z8U4&il{}Czanj_evFcIE2tQ%MjQF_cr;HsY3rz81!mO93kBbiO54@mBm^lqMJSgLz z8}W3|c_gFvo%!$YS>LH3{d6GU_#l3RfX``dZAFX#UfXz>=y~!PUcZCKivo`(Vvge| zL+o%k=%{FGYh&qn^@0yLyIJr-#@Em|z=bouG34{V-6yqg4spn-o>Y*h`K`tr=2Fs z%x{S*>pD@UUnGMJM}?Zwi8d0ZoJ5dFHKgRs^|HrworGE2L1wS+Amd%X6V|^V)A@aLOrM#|8o*MIBfiX0Ljo^&Z)D zuv@5O*>amGb8nI`m_WJef!RILxMBC$aq@d)2wWjDNMm~Kb(q+Wr`+pqA8e|e=1HzIYC{nCDulBj^vtaV{JO~+5hh&*jAC5|8}h0X0BPN5p2Nu#`N9VHGYS}~d^RANwc zD3V7N#Qp!omXnc{ye(_j7F3=%`|LD6kp9X3{rfEz%icYlzH9p+AxH9a^Yily3JMM# zI+T->lb)WQl9H0nCZ8c+mw#oq7au)(w6wGo&!VCt1ZHMtS}iF)CstQmT~SeS^5n_N z%1S)T%gakjN^CY;Mn*>V?rr^txN`YYU0q#6L&N#==j-e1tE(m4Znx*<<$bz$NB{ok z>d)S~b@RrJ8!as@SFc`eY-~Jr>eTV$#}C^Ie9i|M?sRtESEaqZy{W0GrlzK>tSm2c zU;pGimd?%}9S#SA+S=MKUA%aB2uDy`bNc%$mmBJ8kJ-QI$@8DBxLicu@-T|%*I**Y zc%oLn$BWp+Cw;vAML+(YY2E9@JLyZnFbR>snFKT8K+YDR638PkOTdYMF9AjZ%mkWA zjtJNgXd`e+K!SiQ0bY``mQw-C1Rx275fC8Rd@xF27R640kAN+KUIHZqoC&8-;F16u z0Z{^}1c(Ui5#S)4BmrXrmxS{qAV)xx04aet0;vQj2{GphO^wl9Q8tY|$9(oRoi8%o;rzyZkj9e(~2x-CO#Ox&eLGqfcLZ?{-&Uw%Tl5 z^_x<(#b0ybW2e&Wr>BSmPDLDF!nWSw&Lh5W0^PpCso5mst3LRrKI6`si22B8S_Umc zpViQz@VOvu%}zz;^E&zyji9c{*#t~Uk0N$iM}N`x^wA=*7Ln#@PQ~St5%i?T{KYj4$%Ralg!!cduRDs#aPv#OdL7l&cu;KM&xN}UrVi@ zuT$q7pSq3$uDzkgubRF_)!wy_4O*k-TZNqZeQ!#7`r}*-iNDKsjB1_7@F#SO{L5qy z#$zvJd}*7KOgq4lYk{Ya4qEKtSdYYtJ$6}>@({TeL(9g>p2Mt)^p!#w&+(qW=J9uV z;D2Vp(sgRQ_tBHbYv`lZG5Xks)|@mSYd%Jv$_Vk$yK^nu7;L#irq-CiOb%pOnh3Zx>n#obimvKZy1c!%* z^Q;gZFPP>pd2~<8^FjPu93LOgn>KCYjT<*|Y-}t?Mn-a2SQsyyK8^>Aw;kAHFm3;k zlai8n=gysMHk*0t)~%e7kiao9F+6|X+(Fk;dgL=sOH1Q}2M;pt2b`6a#kfnb0BAHC z*W{Cxi&KX~wfolYlrbae2UGiSK4u#i(zQ#mer z(ST!1tjL{?R^3nc?((BYkJLQ3Z{KFzyLof0VMyoa&O-FvxzmOVwUt~^oX;P<|F*$v Wf7*24?~L4UrL_9E_lmvmz4uRwx7!&2 literal 0 HcmV?d00001 diff --git a/reactos/subsys/system/ibrowser/res/favorites.ico b/reactos/subsys/system/ibrowser/res/favorites.ico new file mode 100644 index 0000000000000000000000000000000000000000..558748e9ed09ff9d3cd195744f3e56625f8b72e6 GIT binary patch literal 9374 zcmeHMdr*|u6+g?uvJiwtQ4xh*d5H*!Cd5P&LGg|6AS$2{1!PqOdHQD2q>)5S+Qvj{ z-zH7$OwvR%O*@k|+i0fkjMGlqw9_;CD63bwD|Inzux2SNER=ck=E=f^3uW=* z#j<3{5?QuvnG_cnOKEATR8&;R=FOX>t*s6EM)Ga9~ zf0NYIcVPQH$;#?R=|fxbjD2YPW!f~A+izEyIaB5CyH)b@RhBRJVyv&qwryVcy(aVL zcgunW-BMI^1#LxJ@k|OCzpPrNvSy86)~!?7utD)$-FU8UlzyqKRH?33al2J^>`>Xc z(=V;9JyKt<($JvN)TGkVqH^$Huk7C42dM1btFnK;A3VQ2_E?v+xBJB7Q8{!-<-Yq= z9(?e+bauWk9UVTvkG9IOV?H^0l%>iekElHUxDW8lH@@+{oII)Wj|A>puC; zcluEJ<=JOdUVizioIBSmXV3cNrI&nY`{b2Ze3%a+r_Nq#eGz2{@I=CK%u#bTp%BNo z<1&{O(3SY(W+m`93MF+cmaDDukG{6O0X}E%AxQ{vJr!AD_F_x)ksq5Y6ffBx@aW6K2FN?)$aPLhNi~y zhN_A!O?8dsjm?`I_n_F**i=3ZY-~^XsK&(H&u;*of=@ptk+w+Fs@rs zR=#?*^~}5dF1DPo$rg!Mq-;_`%1vx3+Rtn^mgkH9B;QOh;18G-%{mzCB0|iEnnN#a_Z>z1{Nvf^g=62W488a$q ze|$`SO;z>Qni{uBH8oqSt7`IN#+w4!_B*TBmu;!6s;=Hjs;;i8+)}o_`c8W`1#S;d z-(0eGU1^oOwyvI3SL?1SUAMMmb9(sg=pR3NadGi_H-{G(9|!1OUtGL+G(6;m-ceHG zhUTuOrlw{RN=VeXOG@qt%@e0%QCS^3n_F61O=@X@%&z*nvPBN3j7(l#hd#WTefxv7 zk1wgYscv=hNQul`vj_YGe7T2A;wwG?-kvp?krJ78Puu-pAUy!;=;&Z!wC``bCo58- z(w6T&O6oM|A+sERQklP6C; zx^VKsM^PH>!%Oe7V{^J?+=8OUuY47B>b@1JUrSwa-zhe}(pa=$+%0&2w^}C7En0T( zj_sRP%}cRNu%ygewQ2i~dzTf>ooKn0KftsQ$CSGZ=g*xr#bKK+(`}9^v*yk(ynBix zWE#6c2_e>q=m?9={6WXtENEFn63kBH?`_kjPS5La=S`nF?S@}TztksE;rd{ZKVP*c zM)h*IYL`{jYf<%xsz{q(Bp<7`vqvNbYe;yPh}DZFnDB_XKHjLL4ACVXYmc=n#vjuI zM;}lI^c{c;=#Nvl0uMu>q2-7#R>{PP3nV+cP^M2`F0*H^!M?r&d*?maFH2QbrP z;+EPSwZ{H$wYDR6_%`(Ou>KSPo^^@Y)p1ePIh)$S~kluVUuHAQ*(1u!^2Z^bEmpuCd)0+ zBgc%wLT4E@W@I$?naNR+lQ^tNkx@K04IwVX{x%U`zDSQ#q9T8xID;$B=Gxh*iu1Wq4y?0}GL)r`scYEyZ|5cD?*zJ#(^2G1^x=p5w5?6G zy>e5EQ)_*z%zAyUzv&Aw^kw1Y=zwX+liX4Zw;)ILbhVI!j z804{!GL)qbb!mgP0yaPDw_txR@F$BUSCO~TojX;Ld(oO2#hh0~?#1AdKNRev3}vaq ze%hcd+6>sf(HJ;alYw6%m!`;3DPm7uyH>TVOm*W%)lHjJH*Yp=)BaGfk1~{{4s~gR zwrG>K13rfPE_gKEB_rTUC*R z)9u>_gFN<8hO!(3b!mgPXp^?-gT73khHs|0&WfZd@{WppqNb&(B8O=Fe*BGTJ2>}h zYd<{ig7c7l!8u4B>T(Xy7H!ftebATb6Nz4tyO0^Xj=ZU6XZI=2NXGb)YwUkc+O4Zo zMXu5Kwvcbs;lS^XGL)qb-x0?_TYM+9O&|0{pQdkllxr38uEuZ0cgSZA`lQXqM)SMI z`Ad=GG`@3w>qEgl%5V*!4t0ZLp-tN6e4wwu`Uv0hTjZiKu5M$T96z6pHfS%n*6iD- zx_`e3oB?$>1p6t=^@+N)L0hy*+k6-FMW6Hyyn|e~B8Lq5KKSq(p#6gfaU}N)UUQMR z)tiCqa&RrCE^W|O&@O$@7k$z<@DJqJv2XdXe*3heqYv;0peRisH>|`%51HUzGY~<3 zP%fxvmO*=ch7bCpPx=P_Vzq8ky zyGVrMokP0?Ua;RRhwAqlw&{bu=o9|oTSfzy zaA%{q1JT&nYxu5u6#08a?tT!E&qvJhzTzGPe#@b6F~B-`?4!(3J=&s8+NKZsGJP7p zx&9)hZRy3mkm6p(ki(q|_N{AJPrI>)bt~>oFh}3R+VLy+#s!I3c(L$|35$9haLz&&{@(9KvH_fCpCBgnr7n{OI=xJxqlfmoYy?iPTDO@ejs zOkK*-m#O=jVT(2cy6|E68X5=iJxm3D2q5(q3i%NLW63BW1dyu$_Gn21h7x(~gA8S< zLtWaSE!s3})5mc8KiCGbZ!EA7a07KfC4hZGVu6n$%21X%)TIsDqRpH6Mfd0QS-$}z zGuz`t9vHdcu5jdmtxP>Af}}QlVELFd&dbOHci~{=HS@q$&&T*3spGYJt(Rly=mQ#@ z4|a(`{G$F#dgiIGf2_In-6u|2V;!U3aX3c(wx)99&2FR?j96(1OfO^5`BnSuNh$7j;sBA%21X%3+5Gk^~Wzh6XtSGdLH*9*bCpn zx#XXSUEV+(RMzKmChaFeLP`xD`zS+Mmoxp>)a7q@;Ya5z?y7s&q$a1FNf?*mO`MSU zH0I)5_K_+p%8D{3O*-##X8k@ZGxMiAw{5AUj@kRa{nfSsxzKPV6|6VUg$BJbC&~qF z@H%5IFrJ{$kka7ek0(&^h}rOZz2JES=3vyc%L@O|305`s3?;kA%7vZw%vRxnmE0ksy9@ N7(wt)&1a$RzX4e@g8Tpg literal 0 HcmV?d00001 diff --git a/reactos/subsys/system/ibrowser/res/ibrowser.ico b/reactos/subsys/system/ibrowser/res/ibrowser.ico new file mode 100644 index 0000000000000000000000000000000000000000..700ca0da4b13c0f851246205b1374fa91d626cb3 GIT binary patch literal 12366 zcmeHN3s_Xg^`8Xf;?qekmoLM_SZ9e7g%6@*8czP_i?!A z&YU@~nYm}@o|y|{66V2FDrSS2p^UAiny;@&zdnSqv7U_hVuR6zu}vd5U!=!N7<+3Z z=Zo?&UX10r-|v76s!Y&?l`m6?PRMou{p&l!+;#_TtNs#7@9Z3^8&slJ@* z%c;JcD&gVbERyI*q9cipT)v#85rP_#Msy_6gy3Zwm4pci3Dg!zZIRSQB}Y&_GL7go zR#;d_ZE4g-mosjE(J70(B-?E~#)<)3k6YP!PZ6pwSH5$t8^M`u6;e=ayCk6=%e^YO&vbZMSNw_%4xx9v*`RyKs0 zX}o&oYv6Kxyqm{}<8|!+jxQ>8Uy(GKVEagpYsv^Y_|iN*C03c)J{NY9QTW?*Bodkf z>fbs$!<9-sle_SKa^NNXwAh)WmAW}(Z||{6-6-yaF@x<+H||?+C;miz2(NmM&3(#? zOBr~xp4uE`4B7~G!Sb1{E%dR)D_1XD7q)EGn$?R}Eqmn`YgVpay!!2>tKXsGoz-iW ztyoOlH&?D&wu;!Rdk7vIn+c!)ezuOs!xSoCO|s|?HuUt5yB2}`^Z4O$!Qm3g@H(F_ zag<`rbjOX^ZjaBq=QCBhc;6~poN+y=={d&7-)(Op$qWRoRy(k*5}yR>%cEKdB$LpwVc2dj-h$2!XR@#3l=xkZ~Gy zuYgwK7N8b{F^V8!`pKkHg<7Kt)(G7eT-_BKje1Ow!k=`>fJ{oXMhFh}5nX6K1yUca zAQr!5Qdy8f6C50@5gi z8K?>re0l`9aq1f(X)6RlO#(vTm=U&V;1;-NTknZGmU^UC1qKSrQ4(9Ykbtf4QqonZ z6`ZZs2!Vm4Y(1p#;TA;G3PHiS>Tzm~%HcuU1c)cH1!9MUC_MT+1W)48A889AYMNm_ zyxzzp7ryqMk$FUDoefzPwfZJ$3E^-|b5-@;m z6QJnewlzY(024j&M@71t5aBkz0dm13T;SA_mI1Gfv^tz~*kUv+Tll;I3JWt{892H?to+7T()Y2Cm^OTVzM>2uf zJ-G_i1VOOnEROj~XlN+qEz6lsrxSA*d#>V`r|=ww=O=f|O&s%*!8~O!PZ`Wp?7z?d zvphwjRy!^UF0OuF4h@td2&!RxY2u((d&!l8p!5(M=p8SY`^yDE;lWkZo^qw!U+OOp z7RI`}ipyzFL z)7vY0J7F*ws7=qn`E(PvXrQV{(1Ol64;yId?uIb3?P2W&8(r56oDT10TRHvPUUntz zgFVp8Z{c(=yDp60V888UTf>ZGu9sgqqP35AosY4vy0s6#C9ID4-Cd`01o6p#uR-E7 zk6H(Z55jj)x31&k7wuPa$3%Abm`{ZWHi61+iUhc1FT0oVAT^4CK0vvEE6)jNWHzj) zl4G$Q4ODW}_rq>}|B`flS}CpQq_o0HDMf!6&m8j!H=-zxZTEpUTRYt-qzUx4KTbSQ zoQn@S%s$;=_Qx<(jHi~NVwf2>^Q;F5YZb+}813=aYLlnTh||#N)=`|Gg?EcG7iZ6g z|I}zMSg{=qRC3fiAg8;rcm~Obi@#Z}%jZc&IFnG)z4PXq>;Gh+bFzOQOz~zPO%ME$ zV%S4>LCfqfCM%NH&2P-lOxqn1I-1tyhXyiN_K&5{7DsJpD9EJ9>guw79ku0&fT0h? z!S@3^QzPE3jeV~wCEgae{MOZJP1*71?~VFbNAYx!cgf)oJ5NUxM1Rm@T&%RWv>n&K zCFch?4+7M)HM1txoj=fdVMoE9P3;+<;mrH!YWBEtBqaPE9j&5^u8xlO_Kqe~)&6&Xbzd&#jt|H?xCK?;Sg*tu?fISg zssZ~K;_uV3J(S;1Z$x{u6=-j5ZEk8ZH#XImmqo96>0VsWnewLjPc&zpMD-QxwXaGK zZf?jX-WHC5j#F5JK7#XGzBuD@Ht z2VuCCN5)Zhu_EqIw^F~viS>vK#V0?)$8?eL=dphgVwYIY|GA~s*jV3KYcy7ul^ILR zO!>J7RxOaZJAc;mv_8hOd(l>j>P*z-nNIDfO!ydvP1rdbdtSh9@tTW0^Kftp;$Fwm zH@Z@`HJB=EjHarRl8WmErTGPw*%^D5J>~RQ@$<>Dw#=h27ojfSoPDAs=J#Dmf5UE@ z!M*ODNE}9t7 zkP_WlkzTS#*O9Oh(F?f2ee>QMz2Zq( zurpXP(W_zWllXKgVqU_5C44N0Ud5^Rkg^@$>_%n`a^rA49wi1;q`-6;wK)_Ut#w5? z$rn<-{3_$r>0SCTUr#q@w(V_UkNI@$d=5um<^4bMD z>>?`DQJqa8jizEW-?UmPfV!%Tld~qM?$C2b*2_~z-8%UJH<)`2ImeOr6|SE`@i~-V zg7Gq{ucEF1jU_NwSn1wg+h)po@yTyFTDWUHdd)K(m-o|Jib4Yl6H$_kigXw=QIm_> zLNu15soYwB18sF^Dh>O|w7VK~6rksS_M??BWtr0sqAV3=<%eCB8O>S8P<@SGwMD2eMdM90lv|r_qTLLudHXwy zoCW(mIT`0K$&FcK%{z{U3e=Tw%jPO;V+ERPxN#t1=etgSO7~>lCNx#)QJu6CXolGY zOEt{ZXsJg>3mGp?`ScO_@Ow9PJIU!2l)-%p{VoRgDFYV= zr!9l~6sObT*f_XPah#1i)Ccz|cbFVU*5E$nPXEWE5~u1;XGD&ZDb{_d_#@$K16g-% znL2j3+oh;C7GTNr$@IzXzHIz*&cxulZ=&9(O|upCWj8Q)>V!73vE(jZ`4)BSub+Pc zwO?#SSLSij@3L*bjk#CwxK`Oj{Mom$@g2Fh$Jzbwtw2ZGVYHmw0{kNsIR7F4x?r<$ z{bC{>4N+8){!B+3E)uqQ_7tr#=frM0oj8Z4v)jRsJ8k+=&jP7YurxNJxzU2Fr;p)# z;{v&j>D@LSkq&Qc$~XozT}R!iZLl7E8T^QvA0s3Br@-g0q3ud6s!GdXDy_iRhoUfk zw09}#PvAD(U0q&VF>gjkOZ;Zw(`DrQC*Y^7{FoRA76Hds0!f=;xpo>w+1V(%l7-Ws z{1p?%`sa1qpz^J?vx3mIZyxA8T=dIr#Jve5(;Va;0m=<@3_U#;WuwA>LS5cyM>*Uv*yj3Y;MYo0~(6y|HH~im;9mw+c&*UUnkz&@e#EBMI7GCvq)KlIv(w zOKlk$=%BYa*VUmGEn1MizCIbX&?J+V8f4T`n@n42k&%HO85``t<2Tg9Z(v30-u_sha^!?bd?E+Zxk2yAHH=P%E0<%aGg$n$o;M?P=veLvnnt z8@UX%Bj^7Npyi{xlgAi)nm=hMt#Is3D<=)05hF&>=+UET+_-Tx!)YWrIXTgkDN|_1 zj2ZN)+Zg)Xbqp=}#F19dokE_Tp0sY=I@)NjPd+0IXv^4+w0@j5?R4x+z7s6S$88{; zoN7hKr*);>?t^ImtReLKl0Fo?cpyc6NEG8Fqv#2G6zif-an2ePKUIt3rs`AJI5Ucw zY(g>9j45ttES)C|(L1#)@(2b&3^gy3Zl(x=>l2_YO>awns{#6eOThxn^7WbxzmAxo= zX|NZqr}Z;Fq^%1+q;F6@t~CL z^C)8fe0s3!6UyE@ld^q1=%Mc%$~!cZ@{i7;M@Q#U;V%m*_rxkH_+>Q}oc^2?msXM@ zU=3aJ^`hWYnf_>=}XG6T~rbIJ(b__rHUwDs*d-g(%Z+VH2ehRMg2@=QT|kZ`xKQ&ouKmQ zU+78FajH!{Ny@mhRFmdUwf9d`dCYlw9Djkz<1bQ0;$^B#`i-iRuTb5C3sjN(J5{Cz zQ*BldJGPRb?Wnsx#1b+DTN%-Lw^lN-pSZlW=XG0wz5Vdl-4^$T_ct??Lk!LO+yAl8 za0|J&7L)T-Qf$v+Q|F8(!oq;Xk6;W`$bi? z)lX_`$_s7{)G&KVNn3-nxr)k~x<;v~R6P7f$K<)CW(MbSODk(?YAPiWCyIa|;TjF8N1~rRQgy3cb8>b#Glf!yx_jPJZ)#jY`kYM~{Mn z@RcjJ1to`Go98#>i1q*?vyPukUFqnwIx;OcH$Oi=_xlwqR;~^X4V<#!ljH3zu(9`X zo;ShK(fQY?GCOJ8BzB8_z z&s^Pf$p3U-?ECUHlO~~g($;ICk&#hRzkY%p(0Sq_e_wa^AI9kpC;3;CCPIGr{YGeL z==JNqOC_1%v1sq!Wury=xEYfsxgENG<3{L>gIl+5Qp@&L-qUB!u*3X@cFUIS^S>T) zjiN7{qL`i}Bk93FN%BI54d+X25_xe^d?{gAxp;-I_n_aG@L33r<$%-g2XEB4nOb0{-2Gb=kMCnpOhYPs~j z3~xsg^A=+Q9ygP)v6>c*%|s?G{&TrRsVsviB`FE|Kod^*xtKrg?iF8A+bGo!c38`# zZ|8Z3{_<9~%TL^SR8&+L`_sqWTk1CHe%`}MSL=-~BOM&Nb#AArtA4QOZR(TvER1yJ za$O_K=6}9s{a(3b)llXTO=coi5v{Ao8>=O1tpu{Mc7SGx8Zs}063sxk7I@`;NaL7n z^?13M3v-%d?x8{ld&!uyTT1JtgS4lb0MF$-Zf8orgxNUx>fw|IA0M^c zkz!U&psY=ODbvdyets}r^!B85F9&+?_4{;x+Zg!n(Ujx!vE;KK?wvx}J6$QycPic8 zGz)&&Q}WGeN9Iu0Piv^ae>oMOTS-M1R#M4t>*&HkZ_2vlLq)%Bq{0CB;lNE)8nl^; z0=7_5;5PWK}(tLlICM1|NHesa}e3V()9wbL@DhPv#lFDeV=uZ8raW=EB8urw@JDTHG+0`QxeMCr=(b z@sr=U_C#;={c^|t!$*$p+WXzsRl;wMoVaVa+xlulL`Z zKF8Hl-@4a;{(~204tyuFccUD^ar{D7Jv!R5`abj6Vb*j zZGb+&Lf|rx0TckGjS%PJ-bG*;-~b34#S{NqJH%TP&pQw}2^6)~*Ha;zC1YO&DuBvHh;!U~1{4AO{FeZI;$B_h zi$1k^%+>d}p)i<{OE=l@3+8_p5Z^;{5#RY|V$G3%GjeKHl_x>RLm*dLSFTRQoC2_^ zIs^Cat0B&-(|{BJ?KKZD2KsAq7%zxghYgkSYG6&dDj7QPJ|ta2pMbc={VMdWN>KN$5MxqURh7y0#bFHJ&ERgt zH<=H70D#4ME;=~#HGiuugHvGeAdI}2kt1XMf>@=Df*o-$*#RArEkd7wu&YroY*m%V zaD7o2gQwv7l1N4#&6Sb+8QcN4Y26ATDg6Lg0!@2^C7!()ya|K9VQ?E<5p|N0_j5x* zAU7z&V8dN$Uc?Qs<0V_5uR#&P;4~PV2G`{VF=7oy48r-x=5kf+K`z8vf@|UQFYOte zl~{vEz!0DXAl81Gk$y`Rcp1Lyq|aGCo(v9%6<56(u@Kki2SCRi%o~aS7VJ<)!FqvpZu>5007ImchTUTw4pFIn4%)0kH<> zz|nEMM+XLPg}M52;D9)JNpA`F zmiOcIHAA=}at}XA@MCZ>96Q~Z!8dWjOmhb3!{7(S8i+l$BOttY26#MOAzX$D*xw25m|PjTIYvkYE^>kERhzBhnSewq`=8D0*2Z)q$vptY6h1m^d|wq)-rR}rYzOBZaAk0k zf5cK7PM+0{Qx}?Y+NWJOXZt8%Bxiiyox!iZtltd!AMbM?!1rbu!Uh>9x@z;i`R(|T z-wf#4g>UHqBUgal!(0(@fOGdw=B$mwv97~8bHfluZu44zvt;n1e1F3L1`o?=OFK$B zz#j|!c|cD<`1thYV|sAr8e6`<)|SCza^aaJSo6JH5q<#r4?+K7u8i_y@RSUW^Y5|4 zk->jT{n9_{$q8;coG?R+)0T8#aNI(FJRrV*@&7*!o*eJXjKRY)xKl2^ww23nL3ae6 zIqE1QPhxPF{OHJB24DJLA$Pwk-oFvP4}9ONZ5bTB(C-I`|G$t)ZS-_h;F39QwFSPn zeyj*Rz@=eA_X)0uKE)L=KXN6Y2-?ZuWf}bJe}#0cEqHJSkItw+JcG{3fY|?pbP)S5 zICxH7*@4s6^@t(ba8?{8QZ~+8Y7xn!&d-Y6{}n9|Apqru|>U9eYsUVDRnGZ^Nax53@4n3~(N} zz~%9m7<@0>-xY)-S766QR)ihm((q$k7I}&lxBM{X2y8xz^FwI!eFfmr8QeY_w$u{- zXAAJM|HCC&iC7Qy4o+L!6>}V9W&AlVPq+jZe3ij3bH%+NxYX-hl^V=dX~A&qml^zY zGn~VE8(ktaB9gB_#3^15dix`l}EaG|c2M*ZB z1~J7cM$G~tX0jR&5nn~0XVh&NH8P&l+lWy=6yI77;11{mf3@aleyxZx!asZup!1hRp` zMu>B5$71#T9_1pOJ?xDh-LOM_)+8&QBp1;VtH`Jh?`xdTn+p#gGXlY z%i@2$3K#@FoWV;oIBdid7E*oz&Q;2Fz}GVPX$F^#_{oXE5i|H?26rqtfB=l23@#k; zt&SAig6l?HznP_Y7O^aN<;M86ErSzhaL^2Xo54}Dp`JVn<39qQjy5@i|3)moNs0-< zDKq$M2A};R23$Xw!H+Zea|W-@dUCDX7;paZyKmHj3uo}v4E|Y)slaI?mhx-{5np*S zxOWC`&v*xWF(Rvv@yr`sBbiYlV|YQ49=RtS2K8Q23O9g5wK}%ooo!T1Db#T zVkU8KsDX~gt@k?{)SyPfsCO`GCk>s9v>zdk@kYDgS^iGMJf?sH-~@>O?Q3HLi3>&V X5Wowa1pZ9C(BReBHyi&P!KMBmL^5l| literal 0 HcmV?d00001 diff --git a/reactos/subsys/system/ibrowser/res/reactos.ico b/reactos/subsys/system/ibrowser/res/reactos.ico new file mode 100644 index 0000000000000000000000000000000000000000..492e388a939f05b77da8a5a5681b2843e38b3a55 GIT binary patch literal 25214 zcmeHP30zgx)?Xk3Do$aB4T?5sW+stIkb(**3W6dEIDjaqD2Sq76qSppTn1-RoU6TA9s0QcLrh&jzzzy|=#qf8Tov%wF||?|a|-x%n;jIs5Fh_u6Z(wf5Tk ztaU|Pq=7VRCdfTyTz!$1BI4_7zu)dD@;8)q>EgI=BC-`=ukR)uTto)k;H>W^r(H#+ zw|3TdlX31MBilOb`^q>sk(b&#>-)-f^xL_Uvp()`7CCyaNC)76M*=j2c$tL0E|+Ex zzE$SL-zj-{d6J)Shs+ysr<9KAB+JHklA_W6lAjWcJV4e>50H7Oy`(rJQkG?fO6ior zvMgtqys@>j9Nc=RytC^rc_2SbHd!O(ne~0-$?{0qvS6reFC8L}mB-1d{8U+6m?00Z z$(GH_XG`VA9C>o<6nSq?j2wGadfvFfA2~8^YQ)i)v4#@o6ir(g)^_qg|lzT#Xr9<7tenv-<|(R z{_^b^`Qf{Bk~idLxf(>yX&8Y20TPlPAm!JT8M0TmDwFfJzgV&YE?5+4d+7I;tl1YV zfyEarH+l7YvMSCv6oc>+R#M zjsM!+rz{nyjV5F>>hVn<08=y2sh9myzH!jPaVuW9;5#lZpaJlk?s!lS`5d{{m3T5S zhuF!}kDanaqP+(mKV@lQ=l?1`XJR{6ULchMhrG}G%aUZyn^f_i6=k*SRJAXY7cM+( z%0dH&Ps&cs$x59vHGBA!)KR0SPRbshJuM}B2C^C1Q&TgBAwhJkwt|erJ2}sPhjc|JKdC{O{>tsAL-OlWQA!w)DR0h6b(;nzF>VUB?^iH>vN@ zO8l?m{cX43+QjW@mus5K9lVtuKJ|Tj_PA+qiy(7*SHm{_`t|A6`4)G>dwyPFkplRfVh2Tq_w01DG`?Q$?9%n_h?wa9;lb_iyrVU_0jYQ2KHUS6cZ1^l zok^8EYzJ$e$YIc^8pNz_1OO{l0jyvyUlJJ4zPsnA`h1Ui))x>0sL`{~(U(gZJ(@{o z$W<~q^ctDk=UU0`bG>BuylUGg6jL>LcaT!({EuUeM7IvT;sd zDVh``C6fosqUi~;FlV?d$&QoqnFEdPUOYQRR?JF~XV&`3zE$_ivuiua8xORVLt8t^ zTU*=7kq2*+m+reuUfT@){!ll0_t9Y4U>z(Q3limiYnW`E7a==Kqh%$ksj_QXD%OM1Qn6uz zY*{j0HZ7ek+ty%h*f2%*Z%US@H>Jw{?OC$>{u%P@rap3TM^Aa~{sD4$XQ&+A-A~?r zWPrS}D^{u=7%m?@87D_8hRetM60x3)l-C~~BZnVPl|Md{g0&<=K6pAqUVS)AUf(@c zUf*Mp7kB5$v8q(8D--48=O#<_vuRjgCdl!ZCd-Lerpw6#xw2*TeA&KczU(r0me<>L~nqJYfP9gnI)U!_9 z{`c~!lc(ok(f`Hd?!AiUA$hW;r78rHie%J25+{U+5s zmi&z3!pKIOn}*v;iYF#t@9G{js84N*Eh^5twtj=qq7@5Ei;E|Wy1Tx+zxAiLv5msS@Yv?{eEKF3!fEg~rU}eNN`pH?!%V(#-tDWy=a@Xa7|4UvNb``O;L4g6d$^lhX9iDRHa!wMf11 zL~i_1JZk6jLsL=dWWnY1zO$a(k^Q5X{U4nBm-*f z6xuYGN#g@NBt5VJ)(E@3GO1?^ncTaju~()>v=&R$O)?|;7T7B7Wp-R=nGJhoPQsls zXGDOpS*(d&W$ws(q+ry&QkaH)BJ7h=*e6RS^_68)qGZvefwCBT$3@cSZEJt28 zW2BVN8Yv6&Qe`Duuf0p2SlM0P+~7RSuBX{tzcG?nsi4o*DwXB|(nuhuyM&ggm!plsx}nh8)~IMqb;U z4*O-4e6TN7jy^R(p51AYgHKGAx1Y+DW6w{8%`&>K&GL#xs$ZHV8&_E6{<68UWz_=N zy2d8E?#q|GTj$B%?Kapw^W?yu#q#F9eC&(M<^AX8%1193%eyZuk#}Bz4RUZU_QteB ziskg13+4EsRr1-JOXbXwm2&3Y4MMx*$cvlh=xaOV(<87&-rppjy|+`o_-Kdx`Pf6S zM|Q&w*#~=Mk9>LZDLHonHpypz(=XZg&u8B>Hi_9ge|b#4|LPO@;o@2O>tDW>zy0+u zGWKq_D|X8Nm;K;n^v9K=e~toy*R^OF5+2GO?Qcp=y<1&X-_7fW@G#%sRKMla;GnP& zFIU$l?ZSft{kz`OzJ2?fZuI-b{(ReU0T1rovc8K)tNwAf!@BEqTgO{E+<2$6yTG13 zd;avgZ_8|hh;OiuyNi3vm?5{{j(7ORU9cm9!}|1Y)3W6akyC2k2yPe2mI4EY4!_3D z)xA}0e3#C6<+hF;1HwaEG;nuyaoObV+Om(cI|+^oM)kOagv1fC-mb0wn% z`nU6PcSZ7O-s-yEULLh9h|sBla?c2)q@=V6PmDZzOiK6W^<7+D-Mp^t9g35Ppe7A| zY9FJG?1su|6Pd>QxVhGE71_YmwSMF41MW6h1YPUeIOF8sr>?zx z>(u4V`24x^tbIYr27RqITVdh6{QS&}6!4T+bllB9t1Xf~cY&n|XR3I~;>8P#3JVMP z!q}_bT--wjU8er*yw>$x-CGwgM_RIE@xsEwxj-o+%@0%2I_hUH1X`N7xVD_NY{klz zD_5*ofi7(G3eZ7Xaz6~BRUhBFZv=&SxOn9(TCt*>Y30i0OBWYm2w9URCXX1^$nDY> zf?B)QZ&SQ{#me&4tJlDMFJG}79RQ=ujMNbc!4JDBaBx;i+~O` z5BH(|Iv}(Z12FY*ute^6@ya$Vbe%`I{S<9F>aSaGZy)t*+V5sY8szEP+KjnLI|rls z&RSUq|Alt^hllkv6?{Fsj661JmmMA!9-f^Y8dO61V7Ie+^{N$|0Mci4V6TvCL&Cy> zgS|b>hQar`R;}8Fgat!HgGY7uyX9T1$PJJj56#QX@w66N zEEg>mHc-nW*CHOKsmpa_r z+ve{bVDU69mE;zd6!;X_D#d2js@%c~Te)Ar-fSsAbxfpXhQALwdCWf19=S98ZMnJG z-X(>6EFKpBc+72Xet>=QJnjjwhvpjsn(`L)E zMV7-XoTu(GnmQsC`l zE2*p$Pb2m~*E2U4asSsjQ)Vyn9ZjQH4 zZh1Fnv7q`BegTCQ6}kC-0lC!O_Ec!eY3>h*^S1QA3q z#duN};8)YU=c7J_SQH@BNEn^-fz2DL!jUQ~vb`OXSlR<$z zfcpStfMtLsfMP%vAPNu;7z9WH3_rVk1J68?OeI4JDTV-oKDX56rD zUyn%$_-bHek5j1kBH+P3VZjd#8W8qu->~4FxZeh-m!2{(DSzsy!vmv2bK%#g@C#J< z2`YU46h43oUqBr>sQVA_8&voe>by}s6uyFrcZn});W<7fcEVC?+!yfsQ~35NeE$@F zhYG(!ojanN!uL>@P7BtE@Ze9Ahx9p?F|5y*cyAbhG;EkMEHVN9fC^tgg@2%~%I>A` zT~zoUD*PE0zK06GM2(8*buKNj|CzX$@UeK0boBsSGjU8zK70Tb{)t*J++X)^&QbUQ z>Zb<_6h4RwKR$&oqYfSrasl<924n*61b74dGDpX}1)oT*+?b>A4b(4B?$>k29#;4f zDtr?a{)-A9N*x~6{fGX2dwz^}?gyj-ZWuoz;??#$zk_v78ivQh@Do|@ACY;^zL3)U{1c^-a<3co{z|DnP! z5jgD9({C=)<1bFqg6xQkpx>61$h*GI7#aBu-rtuqHs+E1DI?#Qo-v|oM%Kvv@NHCl zhpF5Dp(2IvrRHSBe>gpD(9uar5$`WZ3+4Rf0_vxa9y9_u`Q3YL^1!}Z*B2awpQN7s zXs5!rQp=0S92u1unT+Q*jTsRgIeARXn(T3L>v4ZOfb(A)C=c!c%1vWHQ%BBw&K2c| zz&f6g%Kw+ix!R!RXh^zW6UFMEm4Z z@}Uo)J-{D8{mgVL;5q>1;8I?7@+@owCL}CL;5!wMbUL)to>!l5g z7+ahXrSM-=Yf_-jitCK^;T~N$EneZfs1acyr=jCcMD^|QVRXNHKN#3Q$N;aSB6_^v zC$z^QwDS<45D)?A?f_mBuc-jilRzCG0JxrWh1_*~a&*e7{IQDl>U4Df(1WAm`@I5x zO3fYINi9(~>VmW|g>R$6H&NjusqmWwbkqZzIx2iAH8Z)}U*iY%{1$D!0oVcH9BuM!%Ju;k1G+f+cS%c%4#}T1^s_a^*%~__jBCJ3z=Y-VQWgG| z3ja`@5_*jmj}1}yU@H6~6@Hrf&dx3h-%W)Nr^268Qxop}p>J4^FBa#GQTTxB!YOfT z1McuGRrr%C{P-3Anbh%I=X*PO71wTQNin@vFUZsxnIqoEeOX*g*dh3J>e0vgD|{~% z{+~KMvaM$KxlZAGs_?~B_=)P#hXVAiKLjZJH5I<1umiejPRuQu)w`v_w?wD)^VPXY zL266yr|^B%<+De#f6@kiNk1hA4q-)eGEPlRA95^vT%WJt>!}~_OVE$^4^!F@@bgso zx+?r?6+X2J|5SxfsTQU6RQTJXzorU5TZIp;CPel4At@p1bb3nc;XzTMIjO@3{AuQ( zj=Id=e>VD~ny!;j)*xlrfT8eNRrr`Hd`cDmqFViYx_B=l?1PhYp{X9wpg z{8#nia#cID|}`ZKEj$CdmGwsuJe<+ zg7)L}gO`@Uep(1SZmymhQb$GC-wB!X`l^!lNCP1I(}rxUq{&W81)m=)c~$5 zm+QL$%G;I98TJbNa~1x)3O{Sj4sWG12e#L3rQ;O7y9&Qtg>Q_p0Z+YI3LNGcTEXvF z;U|syK4xw<<`35VDN&q*cL1vZaRBOXFF?&HF0TPxTUrkt)F*My)WkE}OOw$?8`!uV z6+YAo|6e_Se6OBAQK|3&hW+=Dp8a5po;kW&PrtPY^OUbAUY@4Ms>W*7mIR$MxSf#& z_+aV4$gpoidv!mC_U{Ko1E`-p09+f`H^R33_1Sa4rBcuR@ew`y{sVgE$SQ>&5p48XuxBSgPLuSxO@pAbI$=IqXi<89 zO&%8WV_5I*)GH-`AOPpV9l*J`AwITm+_;g^r?`)pJ*1PuuUbF<;9>ph(<=Su%&YqC z7e`>bzNZ(@y{i|_z6pF@)Gtpwspmf4Y3AbeTZ=)1xeA|d>@&vbM|)!xKI1ws*#(JJNm+zg9bMz4L*Nsnc>$HFHhC#=hBpV3x4amG(Q>ZS&&jsz#m^@`iF8& zrTk9?bVy2w^q-s-`{C^PE?SD`*z3K5@)Y=!oB4)sx3Sr2_y72pul2|8&I5;&`YrYY zqyc=w&0ga3BV|gSrLL%cZk&Gf)KGAIpx#A`R8Pg+8s(Tky*CXN|;Dkd`Qz@P!)&kq?CQ89W%%mKs)DE!<{FHXDw{(IZ--nZwD0-wXbz<*Xne1Y!XFjhyz z_g^+6W7v^pXqUD_-pD|mi#<4X6XGP;e;$B(n08}BOJ>6EX%pl3;JQ8F1_14*CSyiM zhcCz-^914o^xX01>dGHN<|c33cjRx)xr!ze0h3HwEnHlB!j0@P%DG051Hr zRR^kYUkx~43vlmJ1+b#**HS(zsMV#)*;nnH1~4}v$$*-3ikonAC0(Jw6$<=UQUL28 z*JRq>zqXdLPQCv$A~D>mL2yVmnr*#=d4S!2P@*<6mf2fSUg2sUd>o)j{~uLrX9)?bp-VV z;tI`K#Du_xrajIvV!`a^x8U32^ax$QbT)C~ypi{Q_T>y^W(=eU;_?h#P{wZ+PZ0N) zcSI}V?+hRY&zy%4U&{Q1phl+O>HXU(VgeO0cxIfn$AOqV!*7UHG;%~HR&&l^~0mSX^+F*`4T@kBl zXv}XE249?o@;vM$&hby;jNA!`169PanstwKCJ!$d9b%sg@HfAq5P!t98u>=NtPhUXDAoc>xc(7I+p7m*E+7_w6#d{Rd)UDl!afkmz?-sniGHOM)HTDH}QsV3Sxm3 z@xw+giHBY9dEpyiJEe}{v(FAMHe=*?IbWPR#49W1)O?R~%mwu>=Z@YVzCu**NXUS17|kj3T_Xh9kJ?47~zp0%6rjdGY0Y!c#-l%9ZbDIyOjEo>loJr>PfEq=$m6W0N`5H8}M87eQn$$XsbDC&UvQn z(FQ@xJib5d)34z3g}C+_`0CTA;Rp7V8IN;5>Wl&NNIBxS7|sFx-VpDv)X${9Q+IK_ z;-1N2KXSjsF>oFz!x|xpbgA5`De0# zvO2ggo;N|4TZS8YP`^+Y+IeNS9d~|nB;NSmck$diHSp~hZ<(=}Z;{S1KrSc`{2prf z$TkNK( zLGc?2hNsPUL-33JyX9NvyXALZ9#j1O0ls4$v-{y;Je&{C19|DvIWYQ{a)7m)JVYCc zb|7t8+T^sexQC@Yke|3lIOO4D;Q9ohj{SgpcK~H0oVatn=Nd^qCl7M%Gx&oSh!63) z@TWrtcjEn*3!lOF@N)y-e`Eg!%6T9!Ir)e@WaPlfLryuynoj&_6B2)}0hBrJKb-bB zWtw{tuEW5QV{qEeMxJp`e!7!(Cf}hhSZPgj+De?S&iKs>qg#j%@gjcoc_i*XeD`O? z?@k!tI5;Nql$is}m63y5JXA*p4F0Kh{2>F}7ok7ym5lsx9%#cFyB}+@!v=E7v$3C1 zw=rdv`ybZhI5~cl^NfIX+VVN&)`>syBfk(|;*Q_UFgboh1K*-C2lyUd!$bHMPF+-6 z2I|N#>~GSa_N~MIEJB~$qjz=M{oIF9e{k=@`N1>i98e!M;~s~8Cfv(8Y^5bA=lVxG zHikLnfco-ZMt`mYwdha2M?X%TzYW*i*AL|wxK5I%xi)Z}M!8cCcvjYUPU2nW%)v1~ zY~ytR<(+fMwzg4^QSbjd_@Db|&O6T<9CJ?_`Z)k`c!p;pH(XT*^Q0wDHM9e3v?x=RaJ#_&(*@v4(K{>p=RLF&O=S$S%vk*~l!` z1H<=N*POcNQr>s^qtG7ZzSzO9)QPu|KF0Qh{^q`gb}Dr^=}vu086YiDcMZTPztsQK zp^YgUY_Ar+T<==&8Gw3f35@M1Jv#9c&BFni+krdoOm+lxa!y&wdyryTTWYu_5^88-y0|H zHG03++ROb4_tR*Heg<4iiFZvuxUP*yGs9ch&#*7YT#@b^FY&8`TW$OQ*RE^z1O1z3 z)@hD~djPI?v_J8?N5*#LK8*Wf2i~Oj&+xunf3^BB^NxGx9Mz2Xa_{|~vdi>Ao%T!c zFYo{N;CiL*6$)ITz!eHyp}>C+1?)aUzaFnz?f5;EY6-?G#%~EFcK@Xutm4%UlKfgu zUni#T?3w-dO>k{~@5GtId(YgXU6Xq_@-~j&LqTrd$M2Vz_K;VzJ=CjWj`yt0|Ak(F ZRay4oebBJ7}#{qW65O`NP92 z^jV3e8~MuT=J!vYZzFt*Gd>(*!Z(Nm&mKm;=&6qd}j`h^HV*a=UkTIUm`yC26#BiSTF|LSb z_2OUru>zlzWkNX;D`4e2o+jV#Sul=uxBy@1UhgHQXQmSf)QfsBQ3C@jbpwIanbx&@U8FV{ch)C1GM3^eLaeO$g3L zGQ&aa#IkWkD}1;QTzq%`@U?jY9r=jPW6)3ebe#F9&#z}hxnxe{f!?AVdEa#t0oVgF z +#include + +/*@@ +#if _MSC_VER>=1300 // VS.Net +#include +using namespace _com_util; +#endif +*/ + +#ifndef _INC_COMUTIL // is comutil.h of MS headers not available? +#ifndef _NO_COMUTIL +#define _NO_COMUTIL +#endif +#endif + + + // Exception Handling + +#ifndef _NO_COMUTIL + +#define COMExceptionBase _com_error + +#else + + /// COM ExceptionBase class as replacement for _com_error +struct COMExceptionBase +{ + COMExceptionBase(HRESULT hr) + : _hr(hr) + { + } + + HRESULT Error() const + { + return _hr; + } + + LPCTSTR ErrorMessage() const + { + if (_msg.empty()) { + LPTSTR pBuf; + + if (FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER|FORMAT_MESSAGE_FROM_SYSTEM, + 0, _hr, MAKELANGID(LANG_NEUTRAL,SUBLANG_DEFAULT), (LPTSTR)&pBuf, 0, NULL)) { + _msg = pBuf; + LocalFree(pBuf); + } else { + TCHAR buffer[128]; + _stprintf(buffer, TEXT("unknown Exception: 0x%08lX"), _hr); + _msg = buffer; + } + } + + return _msg; + } + +protected: + HRESULT _hr; + mutable String _msg; +}; + +#endif + + + /// Exception with context information + +struct COMException : public COMExceptionBase +{ + typedef COMExceptionBase super; + + COMException(HRESULT hr) + : super(hr), + _context(CURRENT_CONTEXT), + _file(NULL), _line(0) + { + LOG(toString()); + LOG(CURRENT_CONTEXT.getStackTrace()); + } + + COMException(HRESULT hr, const char* file, int line) + : super(hr), + _context(CURRENT_CONTEXT), + _file(file), _line(line) + { + LOG(toString()); + LOG(CURRENT_CONTEXT.getStackTrace()); + } + + COMException(HRESULT hr, const String& obj) + : super(hr), + _context(CURRENT_CONTEXT), + _file(NULL), _line(0) + { + LOG(toString()); + LOG(CURRENT_CONTEXT.getStackTrace()); + } + + COMException(HRESULT hr, const String& obj, const char* file, int line) + : super(hr), + _context(CURRENT_CONTEXT), + _file(file), _line(line) + { + LOG(toString()); + LOG(CURRENT_CONTEXT.getStackTrace()); + } + + String toString() const; + + Context _context; + + const char* _file; + int _line; +}; + +#define THROW_EXCEPTION(hr) throw COMException(hr, __FILE__, __LINE__) +#define CHECKERROR(hr) ((void)(FAILED(hr)? THROW_EXCEPTION(hr): 0)) + + +#ifdef _NO_COMUTIL + +inline void CheckError(HRESULT hr) +{ + if (FAILED(hr)) + throw COMException(hr); +} + +#endif + + + /// COM Initialisation + +struct ComInit +{ + ComInit() + { + CHECKERROR(CoInitialize(0)); + } + +#if (_WIN32_WINNT>=0x0400) || defined(_WIN32_DCOM) + ComInit(DWORD flag) + { + CHECKERROR(CoInitializeEx(0, flag)); + } +#endif + + ~ComInit() + { + CoUninitialize(); + } +}; + + + /// OLE initialisation for drag drop support + +struct OleInit +{ + OleInit() + { + CHECKERROR(OleInitialize(0)); + } + + ~OleInit() + { + OleUninitialize(); + } +}; + + + /// Exception Handler for COM exceptions + +extern void HandleException(COMException& e, HWND hwnd); + + + /// wrapper class for COM interface pointers + +template struct SIfacePtr +{ + SIfacePtr() + : _p(0) + { + } + + SIfacePtr(T* p) + : _p(p) + { + if (p) + p->AddRef(); + } + + SIfacePtr(IUnknown* unknown, REFIID riid) + { + CHECKERROR(unknown->QueryInterface(riid, (LPVOID*)&_p)); + } + + ~SIfacePtr() + { + Free(); + } + + T* operator->() + { + return _p; + } + + const T* operator->() const + { + return _p; + } + +/* not GCC compatible + operator const T*() const + { + return _p; + } */ + + operator T*() + { + return _p; + } + + T** operator&() + { + return &_p; + } + + bool empty() const //NOTE: GCC seems not to work correctly when defining operator bool() AND operator T*() at one time + { + return !_p; + } + + SIfacePtr& operator=(T* p) + { + Free(); + + if (p) { + p->AddRef(); + _p = p; + } + + return *this; + } + + void operator=(SIfacePtr const& o) + { + T* h = _p; + + if (o._p) + o._p->AddRef(); + + _p = o._p; + + if (h) + h->Release(); + } + + HRESULT CreateInstance(REFIID clsid, REFIID riid) + { + return CoCreateInstance(clsid, NULL, CLSCTX_INPROC_SERVER, riid, (LPVOID*)&_p); + } + + template HRESULT QueryInterface(REFIID riid, I* p) + { + return _p->QueryInterface(riid, (LPVOID*)p); + } + + T* get() + { + return _p; + } + + void Free() + { + T* h = _p; + _p = NULL; + + if (h) + h->Release(); + } + +protected: + SIfacePtr(const SIfacePtr& o) + : _p(o._p) + { + if (_p) + _p->AddRef(); + } + + T* _p; +}; diff --git a/reactos/subsys/system/ibrowser/utility/expat.h b/reactos/subsys/system/ibrowser/utility/expat.h new file mode 100644 index 00000000000..b34f94ea8dd --- /dev/null +++ b/reactos/subsys/system/ibrowser/utility/expat.h @@ -0,0 +1,1081 @@ +/* Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd + See the file COPYING for copying permission. +*/ + +#ifndef XmlParse_INCLUDED +#define XmlParse_INCLUDED 1 + +#ifdef __VMS +/* 0 1 2 3 0 1 2 3 + 1234567890123456789012345678901 1234567890123456789012345678901 */ +#define XML_SetProcessingInstructionHandler XML_SetProcessingInstrHandler +#define XML_SetUnparsedEntityDeclHandler XML_SetUnparsedEntDeclHandler +#define XML_SetStartNamespaceDeclHandler XML_SetStartNamespcDeclHandler +#define XML_SetExternalEntityRefHandlerArg XML_SetExternalEntRefHandlerArg +#endif + +#include + +#if defined(_MSC_EXTENSIONS) && !defined(__BEOS__) && !defined(__CYGWIN__) +#define XML_USE_MSC_EXTENSIONS 1 +#endif + +/* Expat tries very hard to make the API boundary very specifically + defined. There are two macros defined to control this boundary; + each of these can be defined before including this header to + achieve some different behavior, but doing so it not recommended or + tested frequently. + + XMLCALL - The calling convention to use for all calls across the + "library boundary." This will default to cdecl, and + try really hard to tell the compiler that's what we + want. + + XMLIMPORT - Whatever magic is needed to note that a function is + to be imported from a dynamically loaded library + (.dll, .so, or .sl, depending on your platform). + + The XMLCALL macro was added in Expat 1.95.7. The only one which is + expected to be directly useful in client code is XMLCALL. + + Note that on at least some Unix versions, the Expat library must be + compiled with the cdecl calling convention as the default since + system headers may assume the cdecl convention. +*/ +#ifndef XMLCALL +#if defined(XML_USE_MSC_EXTENSIONS) +#define XMLCALL __cdecl +#elif defined(__GNUC__) && defined(__i386) +//MF#define XMLCALL __attribute__((cdecl)) +#define XMLCALL//MF +#else +/* For any platform which uses this definition and supports more than + one calling convention, we need to extend this definition to + declare the convention used on that platform, if it's possible to + do so. + + If this is the case for your platform, please file a bug report + with information on how to identify your platform via the C + pre-processor and how to specify the same calling convention as the + platform's malloc() implementation. +*/ +#define XMLCALL +#endif +#endif /* not defined XMLCALL */ + + +#if !defined(XML_STATIC) && !defined(XMLIMPORT) +#ifndef XML_BUILDING_EXPAT +/* using Expat from an application */ + +#ifdef XML_USE_MSC_EXTENSIONS +#define XMLIMPORT __declspec(dllimport) +#endif + +#endif +#endif /* not defined XML_STATIC */ + +/* If we didn't define it above, define it away: */ +#ifndef XMLIMPORT +#define XMLIMPORT +#endif + + +#define XMLPARSEAPI(type) XMLIMPORT type XMLCALL + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef XML_UNICODE_WCHAR_T +#define XML_UNICODE +#endif + +struct XML_ParserStruct; +typedef struct XML_ParserStruct *XML_Parser; + +#ifdef XML_UNICODE /* Information is UTF-16 encoded. */ +#ifdef XML_UNICODE_WCHAR_T +typedef wchar_t XML_Char; +typedef wchar_t XML_LChar; +#else +typedef unsigned short XML_Char; +typedef char XML_LChar; +#endif /* XML_UNICODE_WCHAR_T */ +#else /* Information is UTF-8 encoded. */ +typedef char XML_Char; +typedef char XML_LChar; +#endif /* XML_UNICODE */ + +/* Should this be defined using stdbool.h when C99 is available? */ +typedef unsigned char XML_Bool; +#define XML_TRUE ((XML_Bool) 1) +#define XML_FALSE ((XML_Bool) 0) + +/* The XML_Status enum gives the possible return values for several + API functions. The preprocessor #defines are included so this + stanza can be added to code that still needs to support older + versions of Expat 1.95.x: + + #ifndef XML_STATUS_OK + #define XML_STATUS_OK 1 + #define XML_STATUS_ERROR 0 + #endif + + Otherwise, the #define hackery is quite ugly and would have been + dropped. +*/ +enum XML_Status { + XML_STATUS_ERROR = 0, +#define XML_STATUS_ERROR XML_STATUS_ERROR + XML_STATUS_OK = 1, +#define XML_STATUS_OK XML_STATUS_OK + XML_STATUS_SUSPENDED = 2, +#define XML_STATUS_SUSPENDED XML_STATUS_SUSPENDED +}; + +enum XML_Error { + XML_ERROR_NONE, + XML_ERROR_NO_MEMORY, + XML_ERROR_SYNTAX, + XML_ERROR_NO_ELEMENTS, + XML_ERROR_INVALID_TOKEN, + XML_ERROR_UNCLOSED_TOKEN, + XML_ERROR_PARTIAL_CHAR, + XML_ERROR_TAG_MISMATCH, + XML_ERROR_DUPLICATE_ATTRIBUTE, + XML_ERROR_JUNK_AFTER_DOC_ELEMENT, + XML_ERROR_PARAM_ENTITY_REF, + XML_ERROR_UNDEFINED_ENTITY, + XML_ERROR_RECURSIVE_ENTITY_REF, + XML_ERROR_ASYNC_ENTITY, + XML_ERROR_BAD_CHAR_REF, + XML_ERROR_BINARY_ENTITY_REF, + XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF, + XML_ERROR_MISPLACED_XML_PI, + XML_ERROR_UNKNOWN_ENCODING, + XML_ERROR_INCORRECT_ENCODING, + XML_ERROR_UNCLOSED_CDATA_SECTION, + XML_ERROR_EXTERNAL_ENTITY_HANDLING, + XML_ERROR_NOT_STANDALONE, + XML_ERROR_UNEXPECTED_STATE, + XML_ERROR_ENTITY_DECLARED_IN_PE, + XML_ERROR_FEATURE_REQUIRES_XML_DTD, + XML_ERROR_CANT_CHANGE_FEATURE_ONCE_PARSING, + XML_ERROR_UNBOUND_PREFIX, + XML_ERROR_SUSPENDED, + XML_ERROR_NOT_SUSPENDED, + XML_ERROR_ABORTED, + XML_ERROR_FINISHED, + XML_ERROR_SUSPEND_PE +}; + +enum XML_Content_Type { + XML_CTYPE_EMPTY = 1, + XML_CTYPE_ANY, + XML_CTYPE_MIXED, + XML_CTYPE_NAME, + XML_CTYPE_CHOICE, + XML_CTYPE_SEQ +}; + +enum XML_Content_Quant { + XML_CQUANT_NONE, + XML_CQUANT_OPT, + XML_CQUANT_REP, + XML_CQUANT_PLUS +}; + +/* If type == XML_CTYPE_EMPTY or XML_CTYPE_ANY, then quant will be + XML_CQUANT_NONE, and the other fields will be zero or NULL. + If type == XML_CTYPE_MIXED, then quant will be NONE or REP and + numchildren will contain number of elements that may be mixed in + and children point to an array of XML_Content cells that will be + all of XML_CTYPE_NAME type with no quantification. + + If type == XML_CTYPE_NAME, then the name points to the name, and + the numchildren field will be zero and children will be NULL. The + quant fields indicates any quantifiers placed on the name. + + CHOICE and SEQ will have name NULL, the number of children in + numchildren and children will point, recursively, to an array + of XML_Content cells. + + The EMPTY, ANY, and MIXED types will only occur at top level. +*/ + +typedef struct XML_cp XML_Content; + +struct XML_cp { + enum XML_Content_Type type; + enum XML_Content_Quant quant; + XML_Char * name; + unsigned int numchildren; + XML_Content * children; +}; + + +/* This is called for an element declaration. See above for + description of the model argument. It's the caller's responsibility + to free model when finished with it. +*/ +typedef void (XMLCALL *XML_ElementDeclHandler) (void *userData, + const XML_Char *name, + XML_Content *model); + +XMLPARSEAPI(void) +XML_SetElementDeclHandler(XML_Parser parser, + XML_ElementDeclHandler eldecl); + +/* The Attlist declaration handler is called for *each* attribute. So + a single Attlist declaration with multiple attributes declared will + generate multiple calls to this handler. The "default" parameter + may be NULL in the case of the "#IMPLIED" or "#REQUIRED" + keyword. The "isrequired" parameter will be true and the default + value will be NULL in the case of "#REQUIRED". If "isrequired" is + true and default is non-NULL, then this is a "#FIXED" default. +*/ +typedef void (XMLCALL *XML_AttlistDeclHandler) ( + void *userData, + const XML_Char *elname, + const XML_Char *attname, + const XML_Char *att_type, + const XML_Char *dflt, + int isrequired); + +XMLPARSEAPI(void) +XML_SetAttlistDeclHandler(XML_Parser parser, + XML_AttlistDeclHandler attdecl); + +/* The XML declaration handler is called for *both* XML declarations + and text declarations. The way to distinguish is that the version + parameter will be NULL for text declarations. The encoding + parameter may be NULL for XML declarations. The standalone + parameter will be -1, 0, or 1 indicating respectively that there + was no standalone parameter in the declaration, that it was given + as no, or that it was given as yes. +*/ +typedef void (XMLCALL *XML_XmlDeclHandler) (void *userData, + const XML_Char *version, + const XML_Char *encoding, + int standalone); + +XMLPARSEAPI(void) +XML_SetXmlDeclHandler(XML_Parser parser, + XML_XmlDeclHandler xmldecl); + + +typedef struct { + void *(XMLCALL *malloc_fcn)(size_t size); + void *(XMLCALL *realloc_fcn)(void *ptr, size_t size); + void (XMLCALL *free_fcn)(void *ptr); +} XML_Memory_Handling_Suite; + +/* Constructs a new parser; encoding is the encoding specified by the + external protocol or NULL if there is none specified. +*/ +XMLPARSEAPI(XML_Parser) +XML_ParserCreate(const XML_Char *encoding); + +/* Constructs a new parser and namespace processor. Element type + names and attribute names that belong to a namespace will be + expanded; unprefixed attribute names are never expanded; unprefixed + element type names are expanded only if there is a default + namespace. The expanded name is the concatenation of the namespace + URI, the namespace separator character, and the local part of the + name. If the namespace separator is '\0' then the namespace URI + and the local part will be concatenated without any separator. + When a namespace is not declared, the name and prefix will be + passed through without expansion. +*/ +XMLPARSEAPI(XML_Parser) +XML_ParserCreateNS(const XML_Char *encoding, XML_Char namespaceSeparator); + + +/* Constructs a new parser using the memory management suite referred to + by memsuite. If memsuite is NULL, then use the standard library memory + suite. If namespaceSeparator is non-NULL it creates a parser with + namespace processing as described above. The character pointed at + will serve as the namespace separator. + + All further memory operations used for the created parser will come from + the given suite. +*/ +XMLPARSEAPI(XML_Parser) +XML_ParserCreate_MM(const XML_Char *encoding, + const XML_Memory_Handling_Suite *memsuite, + const XML_Char *namespaceSeparator); + +/* Prepare a parser object to be re-used. This is particularly + valuable when memory allocation overhead is disproportionatly high, + such as when a large number of small documnents need to be parsed. + All handlers are cleared from the parser, except for the + unknownEncodingHandler. The parser's external state is re-initialized + except for the values of ns and ns_triplets. + + Added in Expat 1.95.3. +*/ +XMLPARSEAPI(XML_Bool) +XML_ParserReset(XML_Parser parser, const XML_Char *encoding); + +/* atts is array of name/value pairs, terminated by 0; + names and values are 0 terminated. +*/ +typedef void (XMLCALL *XML_StartElementHandler) (void *userData, + const XML_Char *name, + const XML_Char **atts); + +typedef void (XMLCALL *XML_EndElementHandler) (void *userData, + const XML_Char *name); + + +/* s is not 0 terminated. */ +typedef void (XMLCALL *XML_CharacterDataHandler) (void *userData, + const XML_Char *s, + int len); + +/* target and data are 0 terminated */ +typedef void (XMLCALL *XML_ProcessingInstructionHandler) ( + void *userData, + const XML_Char *target, + const XML_Char *data); + +/* data is 0 terminated */ +typedef void (XMLCALL *XML_CommentHandler) (void *userData, + const XML_Char *data); + +typedef void (XMLCALL *XML_StartCdataSectionHandler) (void *userData); +typedef void (XMLCALL *XML_EndCdataSectionHandler) (void *userData); + +/* This is called for any characters in the XML document for which + there is no applicable handler. This includes both characters that + are part of markup which is of a kind that is not reported + (comments, markup declarations), or characters that are part of a + construct which could be reported but for which no handler has been + supplied. The characters are passed exactly as they were in the XML + document except that they will be encoded in UTF-8 or UTF-16. + Line boundaries are not normalized. Note that a byte order mark + character is not passed to the default handler. There are no + guarantees about how characters are divided between calls to the + default handler: for example, a comment might be split between + multiple calls. +*/ +typedef void (XMLCALL *XML_DefaultHandler) (void *userData, + const XML_Char *s, + int len); + +/* This is called for the start of the DOCTYPE declaration, before + any DTD or internal subset is parsed. +*/ +typedef void (XMLCALL *XML_StartDoctypeDeclHandler) ( + void *userData, + const XML_Char *doctypeName, + const XML_Char *sysid, + const XML_Char *pubid, + int has_internal_subset); + +/* This is called for the start of the DOCTYPE declaration when the + closing > is encountered, but after processing any external + subset. +*/ +typedef void (XMLCALL *XML_EndDoctypeDeclHandler)(void *userData); + +/* This is called for entity declarations. The is_parameter_entity + argument will be non-zero if the entity is a parameter entity, zero + otherwise. + + For internal entities (), value will + be non-NULL and systemId, publicID, and notationName will be NULL. + The value string is NOT nul-terminated; the length is provided in + the value_length argument. Since it is legal to have zero-length + values, do not use this argument to test for internal entities. + + For external entities, value will be NULL and systemId will be + non-NULL. The publicId argument will be NULL unless a public + identifier was provided. The notationName argument will have a + non-NULL value only for unparsed entity declarations. + + Note that is_parameter_entity can't be changed to XML_Bool, since + that would break binary compatibility. +*/ +typedef void (XMLCALL *XML_EntityDeclHandler) ( + void *userData, + const XML_Char *entityName, + int is_parameter_entity, + const XML_Char *value, + int value_length, + const XML_Char *base, + const XML_Char *systemId, + const XML_Char *publicId, + const XML_Char *notationName); + +XMLPARSEAPI(void) +XML_SetEntityDeclHandler(XML_Parser parser, + XML_EntityDeclHandler handler); + +/* OBSOLETE -- OBSOLETE -- OBSOLETE + This handler has been superceded by the EntityDeclHandler above. + It is provided here for backward compatibility. + + This is called for a declaration of an unparsed (NDATA) entity. + The base argument is whatever was set by XML_SetBase. The + entityName, systemId and notationName arguments will never be + NULL. The other arguments may be. +*/ +typedef void (XMLCALL *XML_UnparsedEntityDeclHandler) ( + void *userData, + const XML_Char *entityName, + const XML_Char *base, + const XML_Char *systemId, + const XML_Char *publicId, + const XML_Char *notationName); + +/* This is called for a declaration of notation. The base argument is + whatever was set by XML_SetBase. The notationName will never be + NULL. The other arguments can be. +*/ +typedef void (XMLCALL *XML_NotationDeclHandler) ( + void *userData, + const XML_Char *notationName, + const XML_Char *base, + const XML_Char *systemId, + const XML_Char *publicId); + +/* When namespace processing is enabled, these are called once for + each namespace declaration. The call to the start and end element + handlers occur between the calls to the start and end namespace + declaration handlers. For an xmlns attribute, prefix will be + NULL. For an xmlns="" attribute, uri will be NULL. +*/ +typedef void (XMLCALL *XML_StartNamespaceDeclHandler) ( + void *userData, + const XML_Char *prefix, + const XML_Char *uri); + +typedef void (XMLCALL *XML_EndNamespaceDeclHandler) ( + void *userData, + const XML_Char *prefix); + +/* This is called if the document is not standalone, that is, it has an + external subset or a reference to a parameter entity, but does not + have standalone="yes". If this handler returns XML_STATUS_ERROR, + then processing will not continue, and the parser will return a + XML_ERROR_NOT_STANDALONE error. + If parameter entity parsing is enabled, then in addition to the + conditions above this handler will only be called if the referenced + entity was actually read. +*/ +typedef int (XMLCALL *XML_NotStandaloneHandler) (void *userData); + +/* This is called for a reference to an external parsed general + entity. The referenced entity is not automatically parsed. The + application can parse it immediately or later using + XML_ExternalEntityParserCreate. + + The parser argument is the parser parsing the entity containing the + reference; it can be passed as the parser argument to + XML_ExternalEntityParserCreate. The systemId argument is the + system identifier as specified in the entity declaration; it will + not be NULL. + + The base argument is the system identifier that should be used as + the base for resolving systemId if systemId was relative; this is + set by XML_SetBase; it may be NULL. + + The publicId argument is the public identifier as specified in the + entity declaration, or NULL if none was specified; the whitespace + in the public identifier will have been normalized as required by + the XML spec. + + The context argument specifies the parsing context in the format + expected by the context argument to XML_ExternalEntityParserCreate; + context is valid only until the handler returns, so if the + referenced entity is to be parsed later, it must be copied. + context is NULL only when the entity is a parameter entity. + + The handler should return XML_STATUS_ERROR if processing should not + continue because of a fatal error in the handling of the external + entity. In this case the calling parser will return an + XML_ERROR_EXTERNAL_ENTITY_HANDLING error. + + Note that unlike other handlers the first argument is the parser, + not userData. +*/ +typedef int (XMLCALL *XML_ExternalEntityRefHandler) ( + XML_Parser parser, + const XML_Char *context, + const XML_Char *base, + const XML_Char *systemId, + const XML_Char *publicId); + +/* This is called in two situations: + 1) An entity reference is encountered for which no declaration + has been read *and* this is not an error. + 2) An internal entity reference is read, but not expanded, because + XML_SetDefaultHandler has been called. + Note: skipped parameter entities in declarations and skipped general + entities in attribute values cannot be reported, because + the event would be out of sync with the reporting of the + declarations or attribute values +*/ +typedef void (XMLCALL *XML_SkippedEntityHandler) ( + void *userData, + const XML_Char *entityName, + int is_parameter_entity); + +/* This structure is filled in by the XML_UnknownEncodingHandler to + provide information to the parser about encodings that are unknown + to the parser. + + The map[b] member gives information about byte sequences whose + first byte is b. + + If map[b] is c where c is >= 0, then b by itself encodes the + Unicode scalar value c. + + If map[b] is -1, then the byte sequence is malformed. + + If map[b] is -n, where n >= 2, then b is the first byte of an + n-byte sequence that encodes a single Unicode scalar value. + + The data member will be passed as the first argument to the convert + function. + + The convert function is used to convert multibyte sequences; s will + point to a n-byte sequence where map[(unsigned char)*s] == -n. The + convert function must return the Unicode scalar value represented + by this byte sequence or -1 if the byte sequence is malformed. + + The convert function may be NULL if the encoding is a single-byte + encoding, that is if map[b] >= -1 for all bytes b. + + When the parser is finished with the encoding, then if release is + not NULL, it will call release passing it the data member; once + release has been called, the convert function will not be called + again. + + Expat places certain restrictions on the encodings that are supported + using this mechanism. + + 1. Every ASCII character that can appear in a well-formed XML document, + other than the characters + + $@\^`{}~ + + must be represented by a single byte, and that byte must be the + same byte that represents that character in ASCII. + + 2. No character may require more than 4 bytes to encode. + + 3. All characters encoded must have Unicode scalar values <= + 0xFFFF, (i.e., characters that would be encoded by surrogates in + UTF-16 are not allowed). Note that this restriction doesn't + apply to the built-in support for UTF-8 and UTF-16. + + 4. No Unicode character may be encoded by more than one distinct + sequence of bytes. +*/ +typedef struct { + int map[256]; + void *data; + int (XMLCALL *convert)(void *data, const char *s); + void (XMLCALL *release)(void *data); +} XML_Encoding; + +/* This is called for an encoding that is unknown to the parser. + + The encodingHandlerData argument is that which was passed as the + second argument to XML_SetUnknownEncodingHandler. + + The name argument gives the name of the encoding as specified in + the encoding declaration. + + If the callback can provide information about the encoding, it must + fill in the XML_Encoding structure, and return XML_STATUS_OK. + Otherwise it must return XML_STATUS_ERROR. + + If info does not describe a suitable encoding, then the parser will + return an XML_UNKNOWN_ENCODING error. +*/ +typedef int (XMLCALL *XML_UnknownEncodingHandler) ( + void *encodingHandlerData, + const XML_Char *name, + XML_Encoding *info); + +XMLPARSEAPI(void) +XML_SetElementHandler(XML_Parser parser, + XML_StartElementHandler start, + XML_EndElementHandler end); + +XMLPARSEAPI(void) +XML_SetStartElementHandler(XML_Parser parser, + XML_StartElementHandler handler); + +XMLPARSEAPI(void) +XML_SetEndElementHandler(XML_Parser parser, + XML_EndElementHandler handler); + +XMLPARSEAPI(void) +XML_SetCharacterDataHandler(XML_Parser parser, + XML_CharacterDataHandler handler); + +XMLPARSEAPI(void) +XML_SetProcessingInstructionHandler(XML_Parser parser, + XML_ProcessingInstructionHandler handler); +XMLPARSEAPI(void) +XML_SetCommentHandler(XML_Parser parser, + XML_CommentHandler handler); + +XMLPARSEAPI(void) +XML_SetCdataSectionHandler(XML_Parser parser, + XML_StartCdataSectionHandler start, + XML_EndCdataSectionHandler end); + +XMLPARSEAPI(void) +XML_SetStartCdataSectionHandler(XML_Parser parser, + XML_StartCdataSectionHandler start); + +XMLPARSEAPI(void) +XML_SetEndCdataSectionHandler(XML_Parser parser, + XML_EndCdataSectionHandler end); + +/* This sets the default handler and also inhibits expansion of + internal entities. These entity references will be passed to the + default handler, or to the skipped entity handler, if one is set. +*/ +XMLPARSEAPI(void) +XML_SetDefaultHandler(XML_Parser parser, + XML_DefaultHandler handler); + +/* This sets the default handler but does not inhibit expansion of + internal entities. The entity reference will not be passed to the + default handler. +*/ +XMLPARSEAPI(void) +XML_SetDefaultHandlerExpand(XML_Parser parser, + XML_DefaultHandler handler); + +XMLPARSEAPI(void) +XML_SetDoctypeDeclHandler(XML_Parser parser, + XML_StartDoctypeDeclHandler start, + XML_EndDoctypeDeclHandler end); + +XMLPARSEAPI(void) +XML_SetStartDoctypeDeclHandler(XML_Parser parser, + XML_StartDoctypeDeclHandler start); + +XMLPARSEAPI(void) +XML_SetEndDoctypeDeclHandler(XML_Parser parser, + XML_EndDoctypeDeclHandler end); + +XMLPARSEAPI(void) +XML_SetUnparsedEntityDeclHandler(XML_Parser parser, + XML_UnparsedEntityDeclHandler handler); + +XMLPARSEAPI(void) +XML_SetNotationDeclHandler(XML_Parser parser, + XML_NotationDeclHandler handler); + +XMLPARSEAPI(void) +XML_SetNamespaceDeclHandler(XML_Parser parser, + XML_StartNamespaceDeclHandler start, + XML_EndNamespaceDeclHandler end); + +XMLPARSEAPI(void) +XML_SetStartNamespaceDeclHandler(XML_Parser parser, + XML_StartNamespaceDeclHandler start); + +XMLPARSEAPI(void) +XML_SetEndNamespaceDeclHandler(XML_Parser parser, + XML_EndNamespaceDeclHandler end); + +XMLPARSEAPI(void) +XML_SetNotStandaloneHandler(XML_Parser parser, + XML_NotStandaloneHandler handler); + +XMLPARSEAPI(void) +XML_SetExternalEntityRefHandler(XML_Parser parser, + XML_ExternalEntityRefHandler handler); + +/* If a non-NULL value for arg is specified here, then it will be + passed as the first argument to the external entity ref handler + instead of the parser object. +*/ +XMLPARSEAPI(void) +XML_SetExternalEntityRefHandlerArg(XML_Parser parser, + void *arg); + +XMLPARSEAPI(void) +XML_SetSkippedEntityHandler(XML_Parser parser, + XML_SkippedEntityHandler handler); + +XMLPARSEAPI(void) +XML_SetUnknownEncodingHandler(XML_Parser parser, + XML_UnknownEncodingHandler handler, + void *encodingHandlerData); + +/* This can be called within a handler for a start element, end + element, processing instruction or character data. It causes the + corresponding markup to be passed to the default handler. +*/ +XMLPARSEAPI(void) +XML_DefaultCurrent(XML_Parser parser); + +/* If do_nst is non-zero, and namespace processing is in effect, and + a name has a prefix (i.e. an explicit namespace qualifier) then + that name is returned as a triplet in a single string separated by + the separator character specified when the parser was created: URI + + sep + local_name + sep + prefix. + + If do_nst is zero, then namespace information is returned in the + default manner (URI + sep + local_name) whether or not the name + has a prefix. + + Note: Calling XML_SetReturnNSTriplet after XML_Parse or + XML_ParseBuffer has no effect. +*/ + +XMLPARSEAPI(void) +XML_SetReturnNSTriplet(XML_Parser parser, int do_nst); + +/* This value is passed as the userData argument to callbacks. */ +XMLPARSEAPI(void) +XML_SetUserData(XML_Parser parser, void *userData); + +/* Returns the last value set by XML_SetUserData or NULL. */ +#define XML_GetUserData(parser) (*(void **)(parser)) + +/* This is equivalent to supplying an encoding argument to + XML_ParserCreate. On success XML_SetEncoding returns non-zero, + zero otherwise. + Note: Calling XML_SetEncoding after XML_Parse or XML_ParseBuffer + has no effect and returns XML_STATUS_ERROR. +*/ +XMLPARSEAPI(enum XML_Status) +XML_SetEncoding(XML_Parser parser, const XML_Char *encoding); + +/* If this function is called, then the parser will be passed as the + first argument to callbacks instead of userData. The userData will + still be accessible using XML_GetUserData. +*/ +XMLPARSEAPI(void) +XML_UseParserAsHandlerArg(XML_Parser parser); + +/* If useDTD == XML_TRUE is passed to this function, then the parser + will assume that there is an external subset, even if none is + specified in the document. In such a case the parser will call the + externalEntityRefHandler with a value of NULL for the systemId + argument (the publicId and context arguments will be NULL as well). + Note: If this function is called, then this must be done before + the first call to XML_Parse or XML_ParseBuffer, since it will + have no effect after that. Returns + XML_ERROR_CANT_CHANGE_FEATURE_ONCE_PARSING. + Note: If the document does not have a DOCTYPE declaration at all, + then startDoctypeDeclHandler and endDoctypeDeclHandler will not + be called, despite an external subset being parsed. + Note: If XML_DTD is not defined when Expat is compiled, returns + XML_ERROR_FEATURE_REQUIRES_XML_DTD. +*/ +XMLPARSEAPI(enum XML_Error) +XML_UseForeignDTD(XML_Parser parser, XML_Bool useDTD); + + +/* Sets the base to be used for resolving relative URIs in system + identifiers in declarations. Resolving relative identifiers is + left to the application: this value will be passed through as the + base argument to the XML_ExternalEntityRefHandler, + XML_NotationDeclHandler and XML_UnparsedEntityDeclHandler. The base + argument will be copied. Returns XML_STATUS_ERROR if out of memory, + XML_STATUS_OK otherwise. +*/ +XMLPARSEAPI(enum XML_Status) +XML_SetBase(XML_Parser parser, const XML_Char *base); + +XMLPARSEAPI(const XML_Char *) +XML_GetBase(XML_Parser parser); + +/* Returns the number of the attribute/value pairs passed in last call + to the XML_StartElementHandler that were specified in the start-tag + rather than defaulted. Each attribute/value pair counts as 2; thus + this correspondds to an index into the atts array passed to the + XML_StartElementHandler. +*/ +XMLPARSEAPI(int) +XML_GetSpecifiedAttributeCount(XML_Parser parser); + +/* Returns the index of the ID attribute passed in the last call to + XML_StartElementHandler, or -1 if there is no ID attribute. Each + attribute/value pair counts as 2; thus this correspondds to an + index into the atts array passed to the XML_StartElementHandler. +*/ +XMLPARSEAPI(int) +XML_GetIdAttributeIndex(XML_Parser parser); + +/* Parses some input. Returns XML_STATUS_ERROR if a fatal error is + detected. The last call to XML_Parse must have isFinal true; len + may be zero for this call (or any other). + + Though the return values for these functions has always been + described as a Boolean value, the implementation, at least for the + 1.95.x series, has always returned exactly one of the XML_Status + values. +*/ +XMLPARSEAPI(enum XML_Status) +XML_Parse(XML_Parser parser, const char *s, int len, int isFinal); + +XMLPARSEAPI(void *) +XML_GetBuffer(XML_Parser parser, int len); + +XMLPARSEAPI(enum XML_Status) +XML_ParseBuffer(XML_Parser parser, int len, int isFinal); + +/* Stops parsing, causing XML_Parse() or XML_ParseBuffer() to return. + Must be called from within a call-back handler, except when aborting + (resumable = 0) an already suspended parser. Some call-backs may + still follow because they would otherwise get lost. Examples: + - endElementHandler() for empty elements when stopped in + startElementHandler(), + - endNameSpaceDeclHandler() when stopped in endElementHandler(), + and possibly others. + + Can be called from most handlers, including DTD related call-backs, + except when parsing an external parameter entity and resumable != 0. + Returns XML_STATUS_OK when successful, XML_STATUS_ERROR otherwise. + Possible error codes: + - XML_ERROR_SUSPENDED: when suspending an already suspended parser. + - XML_ERROR_FINISHED: when the parser has already finished. + - XML_ERROR_SUSPEND_PE: when suspending while parsing an external PE. + + When resumable != 0 (true) then parsing is suspended, that is, + XML_Parse() and XML_ParseBuffer() return XML_STATUS_SUSPENDED. + Otherwise, parsing is aborted, that is, XML_Parse() and XML_ParseBuffer() + return XML_STATUS_ERROR with error code XML_ERROR_ABORTED. + + *Note*: + This will be applied to the current parser instance only, that is, if + there is a parent parser then it will continue parsing when the + externalEntityRefHandler() returns. It is up to the implementation of + the externalEntityRefHandler() to call XML_StopParser() on the parent + parser (recursively), if one wants to stop parsing altogether. + + When suspended, parsing can be resumed by calling XML_ResumeParser(). +*/ +XMLPARSEAPI(enum XML_Status) +XML_StopParser(XML_Parser parser, XML_Bool resumable); + +/* Resumes parsing after it has been suspended with XML_StopParser(). + Must not be called from within a handler call-back. Returns same + status codes as XML_Parse() or XML_ParseBuffer(). + Additional error code XML_ERROR_NOT_SUSPENDED possible. + + *Note*: + This must be called on the most deeply nested child parser instance + first, and on its parent parser only after the child parser has finished, + to be applied recursively until the document entity's parser is restarted. + That is, the parent parser will not resume by itself and it is up to the + application to call XML_ResumeParser() on it at the appropriate moment. +*/ +XMLPARSEAPI(enum XML_Status) +XML_ResumeParser(XML_Parser parser); + +enum XML_Parsing { + XML_INITIALIZED, + XML_PARSING, + XML_FINISHED, + XML_SUSPENDED +}; + +typedef struct { + enum XML_Parsing parsing; + XML_Bool finalBuffer; +} XML_ParsingStatus; + +/* Returns status of parser with respect to being initialized, parsing, + finished, or suspended and processing the final buffer. + XXX XML_Parse() and XML_ParseBuffer() should return XML_ParsingStatus, + XXX with XML_FINISHED_OK or XML_FINISHED_ERROR replacing XML_FINISHED +*/ +XMLPARSEAPI(void) +XML_GetParsingStatus(XML_Parser parser, XML_ParsingStatus *status); + +/* Creates an XML_Parser object that can parse an external general + entity; context is a '\0'-terminated string specifying the parse + context; encoding is a '\0'-terminated string giving the name of + the externally specified encoding, or NULL if there is no + externally specified encoding. The context string consists of a + sequence of tokens separated by formfeeds (\f); a token consisting + of a name specifies that the general entity of the name is open; a + token of the form prefix=uri specifies the namespace for a + particular prefix; a token of the form =uri specifies the default + namespace. This can be called at any point after the first call to + an ExternalEntityRefHandler so longer as the parser has not yet + been freed. The new parser is completely independent and may + safely be used in a separate thread. The handlers and userData are + initialized from the parser argument. Returns NULL if out of memory. + Otherwise returns a new XML_Parser object. +*/ +XMLPARSEAPI(XML_Parser) +XML_ExternalEntityParserCreate(XML_Parser parser, + const XML_Char *context, + const XML_Char *encoding); + +enum XML_ParamEntityParsing { + XML_PARAM_ENTITY_PARSING_NEVER, + XML_PARAM_ENTITY_PARSING_UNLESS_STANDALONE, + XML_PARAM_ENTITY_PARSING_ALWAYS +}; + +/* Controls parsing of parameter entities (including the external DTD + subset). If parsing of parameter entities is enabled, then + references to external parameter entities (including the external + DTD subset) will be passed to the handler set with + XML_SetExternalEntityRefHandler. The context passed will be 0. + + Unlike external general entities, external parameter entities can + only be parsed synchronously. If the external parameter entity is + to be parsed, it must be parsed during the call to the external + entity ref handler: the complete sequence of + XML_ExternalEntityParserCreate, XML_Parse/XML_ParseBuffer and + XML_ParserFree calls must be made during this call. After + XML_ExternalEntityParserCreate has been called to create the parser + for the external parameter entity (context must be 0 for this + call), it is illegal to make any calls on the old parser until + XML_ParserFree has been called on the newly created parser. + If the library has been compiled without support for parameter + entity parsing (ie without XML_DTD being defined), then + XML_SetParamEntityParsing will return 0 if parsing of parameter + entities is requested; otherwise it will return non-zero. + Note: If XML_SetParamEntityParsing is called after XML_Parse or + XML_ParseBuffer, then it has no effect and will always return 0. +*/ +XMLPARSEAPI(int) +XML_SetParamEntityParsing(XML_Parser parser, + enum XML_ParamEntityParsing parsing); + +/* If XML_Parse or XML_ParseBuffer have returned XML_STATUS_ERROR, then + XML_GetErrorCode returns information about the error. +*/ +XMLPARSEAPI(enum XML_Error) +XML_GetErrorCode(XML_Parser parser); + +/* These functions return information about the current parse + location. They may be called from any callback called to report + some parse event; in this case the location is the location of the + first of the sequence of characters that generated the event. When + called from callbacks generated by declarations in the document + prologue, the location identified isn't as neatly defined, but will + be within the relevant markup. When called outside of the callback + functions, the position indicated will be just past the last parse + event (regardless of whether there was an associated callback). + + They may also be called after returning from a call to XML_Parse + or XML_ParseBuffer. If the return value is XML_STATUS_ERROR then + the location is the location of the character at which the error + was detected; otherwise the location is the location of the last + parse event, as described above. +*/ +XMLPARSEAPI(int) XML_GetCurrentLineNumber(XML_Parser parser); +XMLPARSEAPI(int) XML_GetCurrentColumnNumber(XML_Parser parser); +XMLPARSEAPI(long) XML_GetCurrentByteIndex(XML_Parser parser); + +/* Return the number of bytes in the current event. + Returns 0 if the event is in an internal entity. +*/ +XMLPARSEAPI(int) +XML_GetCurrentByteCount(XML_Parser parser); + +/* If XML_CONTEXT_BYTES is defined, returns the input buffer, sets + the integer pointed to by offset to the offset within this buffer + of the current parse position, and sets the integer pointed to by size + to the size of this buffer (the number of input bytes). Otherwise + returns a NULL pointer. Also returns a NULL pointer if a parse isn't + active. + + NOTE: The character pointer returned should not be used outside + the handler that makes the call. +*/ +XMLPARSEAPI(const char *) +XML_GetInputContext(XML_Parser parser, + int *offset, + int *size); + +/* For backwards compatibility with previous versions. */ +#define XML_GetErrorLineNumber XML_GetCurrentLineNumber +#define XML_GetErrorColumnNumber XML_GetCurrentColumnNumber +#define XML_GetErrorByteIndex XML_GetCurrentByteIndex + +/* Frees the content model passed to the element declaration handler */ +XMLPARSEAPI(void) +XML_FreeContentModel(XML_Parser parser, XML_Content *model); + +/* Exposing the memory handling functions used in Expat */ +XMLPARSEAPI(void *) +XML_MemMalloc(XML_Parser parser, size_t size); + +XMLPARSEAPI(void *) +XML_MemRealloc(XML_Parser parser, void *ptr, size_t size); + +XMLPARSEAPI(void) +XML_MemFree(XML_Parser parser, void *ptr); + +/* Frees memory used by the parser. */ +XMLPARSEAPI(void) +XML_ParserFree(XML_Parser parser); + +/* Returns a string describing the error. */ +XMLPARSEAPI(const XML_LChar *) +XML_ErrorString(enum XML_Error code); + +/* Return a string containing the version number of this expat */ +XMLPARSEAPI(const XML_LChar *) +XML_ExpatVersion(void); + +typedef struct { + int major; + int minor; + int micro; +} XML_Expat_Version; + +/* Return an XML_Expat_Version structure containing numeric version + number information for this version of expat. +*/ +XMLPARSEAPI(XML_Expat_Version) +XML_ExpatVersionInfo(void); + +/* Added in Expat 1.95.5. */ +enum XML_FeatureEnum { + XML_FEATURE_END = 0, + XML_FEATURE_UNICODE, + XML_FEATURE_UNICODE_WCHAR_T, + XML_FEATURE_DTD, + XML_FEATURE_CONTEXT_BYTES, + XML_FEATURE_MIN_SIZE, + XML_FEATURE_SIZEOF_XML_CHAR, + XML_FEATURE_SIZEOF_XML_LCHAR + /* Additional features must be added to the end of this enum. */ +}; + +typedef struct { + enum XML_FeatureEnum feature; + const XML_LChar *name; + long int value; +} XML_Feature; + +XMLPARSEAPI(const XML_Feature *) +XML_GetFeatureList(void); + + +/* Expat follows the GNU/Linux convention of odd number minor version for + beta/development releases and even number minor version for stable + releases. Micro is bumped with each release, and set to 0 with each + change to major or minor version. +*/ +#define XML_MAJOR_VERSION 1 +#define XML_MINOR_VERSION 95 +#define XML_MICRO_VERSION 8 + +#ifdef __cplusplus +} +#endif + +#endif /* not XmlParse_INCLUDED */ diff --git a/reactos/subsys/system/ibrowser/utility/utility.cpp b/reactos/subsys/system/ibrowser/utility/utility.cpp new file mode 100644 index 00000000000..6d51acf72a8 --- /dev/null +++ b/reactos/subsys/system/ibrowser/utility/utility.cpp @@ -0,0 +1,419 @@ +/* + * Copyright 2003, 2004, 2005 Martin Fuchs + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + + + // + // Explorer clone + // + // utility.cpp + // + // Martin Fuchs, 23.07.2003 + // + + +#include "precomp.h" + +//#include + +#include +#include + + +DWORD WINAPI Thread::ThreadProc(void* para) +{ + Thread* pThis = (Thread*) para; + + int ret = pThis->Run(); + + pThis->_alive = false; + + return ret; +} + + +void CenterWindow(HWND hwnd) +{ + RECT rt, prt; + GetWindowRect(hwnd, &rt); + + DWORD style; + HWND owner = 0; + + for(HWND wh=hwnd; (wh=GetWindow(wh,GW_OWNER))!=0; ) + if (((style=GetWindowStyle(wh))&WS_VISIBLE) && !(style&WS_MINIMIZE)) + {owner=wh; break;} + + if (owner) + GetWindowRect(owner, &prt); + else + SystemParametersInfo(SPI_GETWORKAREA, 0, &prt, 0); //@@ GetDesktopWindow() wäre auch hilfreich. + + SetWindowPos(hwnd, 0, (prt.left+prt.right+rt.left-rt.right)/2, + (prt.top+prt.bottom+rt.top-rt.bottom)/2, 0,0, SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOZORDER); + + MoveVisible(hwnd); +} + +void MoveVisible(HWND hwnd) +{ + RECT rc; + GetWindowRect(hwnd, &rc); + int left=rc.left, top=rc.top; + + int xmax = GetSystemMetrics(SM_CXSCREEN); + int ymax = GetSystemMetrics(SM_CYSCREEN); + + if (rc.left < 0) + rc.left = 0; + else if (rc.right > xmax) + if ((rc.left-=rc.right-xmax) < 0) + rc.left = 0; + + if (rc.top < 0) + rc.top = 0; + else if (rc.bottom > ymax) + if ((rc.top-=rc.bottom-ymax) < 0) + rc.top = 0; + + if (rc.left!=left || rc.top!=top) + SetWindowPos(hwnd, 0, rc.left,rc.top, 0,0, SWP_NOZORDER|SWP_NOSIZE|SWP_NOACTIVATE); +} + + +void display_error(HWND hwnd, DWORD error) //@@ CONTEXT mit ausgeben -> display_error(HWND hwnd, const Exception& e) +{ + PTSTR msg; + + if (FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER|FORMAT_MESSAGE_FROM_SYSTEM, + 0, error, MAKELANGID(LANG_NEUTRAL,SUBLANG_DEFAULT), (PTSTR)&msg, 0, NULL)) { + LOG(FmtString(TEXT("display_error(%#x): %s"), error, msg)); + + SetLastError(0); + MessageBox(hwnd, msg, TEXT("ROS Explorer"), MB_OK); + + if (GetLastError() == ERROR_INVALID_WINDOW_HANDLE) + MessageBox(0, msg, TEXT("ROS Explorer"), MB_OK); + } else { + LOG(FmtString(TEXT("Unknown Error %#x"), error)); + + FmtString msg(TEXT("Unknown Error %#x"), error); + + SetLastError(0); + MessageBox(hwnd, msg, TEXT("ROS Explorer"), MB_OK); + + if (GetLastError() == ERROR_INVALID_WINDOW_HANDLE) + MessageBox(0, msg, TEXT("ROS Explorer"), MB_OK); + } + + LocalFree(msg); +} + + +Context Context::s_main("-NO-CONTEXT-"); +Context* Context::s_current = &Context::s_main; + +String Context::toString() const +{ + String str = _ctx; + + if (!_obj.empty()) + str.appendf(TEXT("\nObject: %s"), (LPCTSTR)_obj); + + return str; +} + +String Context::getStackTrace() const +{ + ostringstream str; + + str << "Context Trace:\n"; + + for(const Context*p=this; p && p!=&s_main; p=p->_last) { + str << "- " << p->_ctx; + + if (!p->_obj.empty()) + str << " obj=" << ANS(p->_obj); + + str << '\n'; + } + + return str.str(); +} + + +BOOL time_to_filetime(const time_t* t, FILETIME* ftime) +{ + struct tm* tm = gmtime(t); + SYSTEMTIME stime; + + if (!tm) + return FALSE; + + stime.wYear = tm->tm_year+1900; + stime.wMonth = tm->tm_mon+1; + stime.wDayOfWeek = (WORD)-1; + stime.wDay = tm->tm_mday; + stime.wHour = tm->tm_hour; + stime.wMinute = tm->tm_min; + stime.wSecond = tm->tm_sec; + stime.wMilliseconds = 0; + + return SystemTimeToFileTime(&stime, ftime); +} + + +BOOL launch_file(HWND hwnd, LPCTSTR cmd, UINT nCmdShow, LPCTSTR parameters) +{ + CONTEXT("launch_file()"); + + HINSTANCE hinst = ShellExecute(hwnd, NULL/*operation*/, cmd, parameters, NULL/*dir*/, nCmdShow); + + if ((int)hinst <= 32) { + display_error(hwnd, GetLastError()); + return FALSE; + } + + return TRUE; +} + +#ifdef UNICODE +BOOL launch_fileA(HWND hwnd, LPSTR cmd, UINT nCmdShow, LPCSTR parameters) +{ + HINSTANCE hinst = ShellExecuteA(hwnd, NULL/*operation*/, cmd, parameters, NULL/*dir*/, nCmdShow); + + if ((int)hinst <= 32) { + display_error(hwnd, GetLastError()); + return FALSE; + } + + return TRUE; +} +#endif + + +/* search for already running instance */ + +static int g_foundPrevInstance = 0; + +static BOOL CALLBACK EnumWndProc(HWND hwnd, LPARAM lparam) +{ + TCHAR cls[128]; + + GetClassName(hwnd, cls, 128); + + if (!lstrcmp(cls, (LPCTSTR)lparam)) { + g_foundPrevInstance++; + return FALSE; + } + + return TRUE; +} + +/* search for window of given class name to allow only one running instance */ +int find_window_class(LPCTSTR classname) +{ + EnumWindows(EnumWndProc, (LPARAM)classname); + + if (g_foundPrevInstance) + return 1; + + return 0; +} + + +typedef void (WINAPI*RUNDLLPROC)(HWND hwnd, HINSTANCE hinst, LPCTSTR cmdline, DWORD nCmdShow); + +BOOL RunDLL(HWND hwnd, LPCTSTR dllname, LPCSTR procname, LPCTSTR cmdline, UINT nCmdShow) +{ + HMODULE hmod = LoadLibrary(dllname); + if (!hmod) + return FALSE; + +/*TODO + + It is possible to create a Unicode version of the function. + Rundll32 first tries to find a function named EntryPointW. + If it cannot find this function, it tries EntryPointA, then EntryPoint. + To create a DLL that supports ANSI on Windows 95/98/Me and Unicode otherwise, + export two functions: EntryPointW and EntryPoint. +*/ + RUNDLLPROC proc = (RUNDLLPROC)GetProcAddress(hmod, procname); + if (!proc) { + FreeLibrary(hmod); + return FALSE; + } + + proc(hwnd, hmod, cmdline, nCmdShow); + + FreeLibrary(hmod); + + return TRUE; +} + + +BOOL launch_cpanel(HWND hwnd, LPCTSTR applet) +{ + //launch_file(_hwnd, applet, SW_SHOWNORMAL); // This would be enough, but we want the fastest solution. + //launch_file(_hwnd, TEXT("rundll32.exe /d shell32.dll,Control_RunDLL ")+applet, SW_SHOWNORMAL); + + return RunDLL(hwnd, TEXT("shell32"), "Control_RunDLL", applet, SW_SHOWNORMAL); +} + + +BOOL RecursiveCreateDirectory(LPCTSTR path_in) +{ + TCHAR path[MAX_PATH], hole_path[MAX_PATH]; + + _tcscpy(hole_path, path_in); + + int drv_len = 0; + LPCTSTR d; + + for(d=hole_path; *d && *d!='/' && *d!='\\'; ++d) { + ++drv_len; + + if (*d == ':') + break; + } + + LPTSTR dir = hole_path + drv_len; + + int l; + LPTSTR p = hole_path + (l=_tcslen(hole_path)); + + while(--p>=hole_path && (*p=='/' || *p=='\\')) + *p = '\0'; + + WIN32_FIND_DATA w32fd; + + HANDLE hFind = FindFirstFile(hole_path, &w32fd); + + if (hFind == INVALID_HANDLE_VALUE) { + _tcsncpy(path, hole_path, drv_len); + int i = drv_len; + + for(p=dir; *p=='/'||*p=='\\'; p++) + path[i++] = *p++; + + for(; i + + // Unicode support +#ifdef UNICODE +#define _UNICODE +#endif +#include + +#include // for SelectBrush(), ListBox_SetSel(), SubclassWindow(), ... +#include + +#ifndef _MSC_VER +#include +#endif +#include // for VARIANT + +#include // for alloca() +#include +#include // for _MAX_DIR, ... +#include // for sprintf() +#include + +#ifndef _MAX_PATH +#define _MAX_DRIVE 3 +#define _MAX_FNAME 256 +#define _MAX_DIR _MAX_FNAME +#define _MAX_EXT _MAX_FNAME +#define _MAX_PATH 260 +#endif + + +#ifdef __cplusplus +extern "C" { +#endif + + +#define for if (0) {} else for + +#define COUNTOF(x) (sizeof(x)/sizeof(x[0])) + + +#define BUFFER_LEN 2048 + + +#define LOG(txt) + + +#ifndef _tcsrchr +#ifdef UNICODE +#define _tcsrchr wcsrchr +#else +#define _tcsrchr strrchr +#endif +#endif + +#ifndef _stprintf +#ifdef UNICODE +#define _stprintf wcsprintf +#else +#define _stprintf sprintf +#endif +#endif + +#define U2A(s, d, l) WideCharToMultiByte(CP_ACP, 0, s, -1, d, l, NULL, NULL) +#define U2nA(s, d, l) WideCharToMultiByte(CP_ACP, 0, s, l, d, l, NULL, NULL) +#define A2U(s, d, l) MultiByteToWideChar(CP_ACP, 0, s, -1, d, l) +#define A2nU(s, d, l) MultiByteToWideChar(CP_ACP, 0, s, l, d, l) + + +#ifdef __WINE__ +#ifdef UNICODE +extern void _wsplitpath(const WCHAR* path, WCHAR* drv, WCHAR* dir, WCHAR* name, WCHAR* ext); +#else +extern void _splitpath(const CHAR* path, CHAR* drv, CHAR* dir, CHAR* name, CHAR* ext); +#endif +#define _tcsnicmp strncasecmp +#define _tcsicoll strcasecmp +#endif + +#ifndef FILE_ATTRIBUTE_NOT_CONTENT_INDEXED +#define FILE_ATTRIBUTE_ENCRYPTED 0x00000040 +#define FILE_ATTRIBUTE_SPARSE_FILE 0x00000200 +#define FILE_ATTRIBUTE_REPARSE_POINT 0x00000400 +#define FILE_ATTRIBUTE_NOT_CONTENT_INDEXED 0x00002000 +#endif + + +#define SetDlgCtrlID(hwnd, id) SetWindowLong(hwnd, GWL_ID, id) +#define SetWindowStyle(hwnd, val) (DWORD)SetWindowLong(hwnd, GWL_STYLE, val) +#define SetWindowExStyle(h, val) (DWORD)SetWindowLong(hwnd, GWL_EXSTYLE, val) +#define Window_SetIcon(hwnd, type, hicon) (HICON)SendMessage(hwnd, WM_SETICON, type, (LPARAM)(hicon)) + + + // center window in respect to its parent window +extern void CenterWindow(HWND hwnd); + + // move window into visibility +extern void MoveVisible(HWND hwnd); + + // display error message +extern void display_error(HWND hwnd, DWORD error); + + // convert time_t to WIN32 FILETIME +extern BOOL time_to_filetime(const time_t* t, FILETIME* ftime); + + // search for windows of a specific classname +extern int find_window_class(LPCTSTR classname); + + // create a directory with all missing parent directories +BOOL RecursiveCreateDirectory(LPCTSTR path_in); + + // test for existing directory +BOOL exists_path(LPCTSTR path); + + +#ifdef __cplusplus +} // extern "C" +#endif + + +#ifdef __cplusplus + +#ifdef _MSC_VER +#pragma warning(disable: 4786) // disable warnings about too long debug information symbols +#endif + + // STL headers for strings and streams +#include +#include +using namespace std; + + // containers +#include +#include +#include +#include +#include + + +#if _MSC_VER>=1300 // VS.Net +#define _NO_COMUTIL //@@ +#endif + +#if defined(_MSC_VER) && !defined(_NO_COMUTIL) + + // COM utility headers +#include +using namespace _com_util; + +#endif // _MSC_VER && !_NO_COMUTIL + + + // launch a program or document file +extern BOOL launch_file(HWND hwnd, LPCTSTR cmd, UINT nCmdShow, LPCTSTR parameters=NULL); +#ifdef UNICODE +extern BOOL launch_fileA(HWND hwnd, LPSTR cmd, UINT nCmdShow, LPCSTR parameters=NULL); +#else +#define launch_fileA launch_file +#endif + + // call an DLL export like rundll32 +extern BOOL RunDLL(HWND hwnd, LPCTSTR dllname, LPCSTR procname, LPCTSTR cmdline, UINT nCmdShow); + + // launch control panel applet +extern BOOL launch_cpanel(HWND hwnd, LPCTSTR applet); + + + /// initialization of windows common controls +struct CommonControlInit +{ + CommonControlInit(DWORD flags=ICC_LISTVIEW_CLASSES|ICC_TREEVIEW_CLASSES|ICC_BAR_CLASSES|ICC_PROGRESS_CLASS|ICC_COOL_CLASSES) + { + INITCOMMONCONTROLSEX icc = {sizeof(INITCOMMONCONTROLSEX), flags}; + + InitCommonControlsEx(&icc); + } +}; + + + /// wait cursor + +struct WaitCursor ///@todo integrate with WM_SETCURSOR to enable multithreaded background tasks as program launching +{ + WaitCursor() + { + _old_cursor = SetCursor(LoadCursor(0, IDC_WAIT)); + } + + ~WaitCursor() + { + SetCursor(_old_cursor); + } + +protected: + HCURSOR _old_cursor; +}; + + + /// base of all structures storing a window handle +struct WindowHandle +{ + WindowHandle(HWND hwnd=0) + : _hwnd(hwnd) {} + + operator HWND() const {return _hwnd;} + HWND* operator&() {return &_hwnd;} + +protected: + HWND _hwnd; +}; + + + /// locally hide a window +struct HiddenWindow : public WindowHandle +{ + HiddenWindow(HWND hwnd) + : WindowHandle(IsWindowVisible(hwnd)? hwnd: 0) + { + if (_hwnd) + SetWindowPos(_hwnd, 0, 0, 0, 0, 0, SWP_HIDEWINDOW|SWP_NOREDRAW|SWP_NOMOVE|SWP_NOSIZE|SWP_NOZORDER); + } + + ~HiddenWindow() + { + if (_hwnd) + SetWindowPos(_hwnd, 0, 0, 0, 0, 0, SWP_SHOWWINDOW|SWP_NOMOVE|SWP_NOSIZE|SWP_NOZORDER); + } +}; + + + /// critical section wrapper + +struct CritSect : public CRITICAL_SECTION +{ + CritSect() + { + InitializeCriticalSection(this); + } + + ~CritSect() + { + DeleteCriticalSection(this); + } +}; + + + /// Lock protects a code section utilizing a critical section + +struct Lock +{ + Lock(CritSect& crit_sect) + : _crit_sect(crit_sect) + { + EnterCriticalSection(&crit_sect); + } + + ~Lock() + { + LeaveCriticalSection(&_crit_sect); + } + +protected: + CritSect& _crit_sect; +}; + + + /// Thread base class + +struct Thread +{ + Thread() + : _alive(false) + { + _hThread = INVALID_HANDLE_VALUE; + } + + virtual ~Thread() + { + Stop(); + + CloseHandle(_hThread); + } + + void Start() + { + if (!_alive) { + _alive = true; + _hThread = CreateThread(NULL, 0, ThreadProc, this, 0, NULL); + } + } + + void Stop() + { + if (_alive) { + { + Lock lock(_crit_sect); + _alive = false; + } + + // wait for finishing + WaitForSingleObject(_hThread, INFINITE); + } + } + + virtual int Run() = 0; + + bool is_alive() const {return _alive;} + + CritSect _crit_sect; + +protected: + static DWORD WINAPI ThreadProc(void* para); + + HANDLE _hThread; + bool _alive; +}; + + + // window utilities + + /// ClientRect retreives the client area rectangle of a window. +struct ClientRect : public RECT +{ + ClientRect(HWND hwnd) + { + GetClientRect(hwnd, this); + } + + operator LPRECT() {return this;} + + POINT& pos() {return *(LPPOINT)this;} +}; + + /// ClientRect retreives the window rectangle of a window. +struct WindowRect : public RECT +{ + WindowRect(HWND hwnd) + { + GetWindowRect(hwnd, this); + } + + operator LPRECT() {return this;} + + POINT& pos() {return *(LPPOINT)this;} +}; + + /// PointL encapsulates the POINT structure into a C++ object. +struct Point : public POINT +{ + Point(LONG x_, LONG y_) + { + x = x_; + y = y_; + } + + // constructor for being used in processing WM_MOUSEMOVE, WM_LBUTTONDOWN, ... messages + Point(LPARAM lparam) + { + x = GET_X_LPARAM(lparam); + y = GET_Y_LPARAM(lparam); + } + + operator LPPOINT() {return this;} +}; + + + /// transform coordinates in a RECT from client to screen coordiantes +inline void ClientToScreen(HWND hwnd, RECT* prect) + {::ClientToScreen(hwnd,(LPPOINT)&prect->left); ::ClientToScreen(hwnd,(LPPOINT)&prect->right);} + + /// transform coordinates in a RECT from screen to client coordiantes +inline void ScreenToClient(HWND hwnd, RECT* prect) + {::ScreenToClient(hwnd,(LPPOINT)&prect->left); ::ScreenToClient(hwnd,(LPPOINT)&prect->right);} + + + /// structure containing information about full screen display of the frame window +struct FullScreenParameters +{ + FullScreenParameters() + : _mode(FALSE) + { + } + + BOOL _mode; + RECT _orgPos; + BOOL _wasZoomed; +}; + + + // drawing utilities + + /// PaintCanvas is a encapsulation of device contexts managed by BeginPaint()/EndPaint(). +struct PaintCanvas : public PAINTSTRUCT +{ + PaintCanvas(HWND hwnd) + : _hwnd(hwnd) + { + BeginPaint(hwnd, this); + } + + ~PaintCanvas() + { + EndPaint(_hwnd, this); + } + + operator HDC() const {return hdc;} + +protected: + HWND _hwnd; +}; + + /// Canvas is a encapsulation of device contexts. +struct Canvas +{ + Canvas(HDC hdc) : _hdc(hdc) {} + + operator HDC() {return _hdc;} + +protected: + HDC _hdc; +}; + + /// WindowCanvas is a encapsulation of client area device contexts. +struct WindowCanvas : public Canvas +{ + WindowCanvas(HWND hwnd) + : Canvas(GetDC(hwnd)), _hwnd(hwnd) {} + + ~WindowCanvas() {ReleaseDC(_hwnd, _hdc);} + +protected: + HWND _hwnd; +}; + + + // double buffering classes + + /// Memory Canvas creates and destroys memory devoce contexts. +struct MemCanvas : public Canvas +{ + MemCanvas(HDC hdc=0) + : Canvas(CreateCompatibleDC(hdc)) {assert(_hdc);} + + ~MemCanvas() {DeleteDC(_hdc);} +}; + + /// SelectedBitmap is used to localy select bitmaps into device contexts. +struct SelectedBitmap +{ + SelectedBitmap(HDC hdc, HBITMAP hbmp) + : _hdc(hdc), _old_hbmp(SelectBitmap(hdc, hbmp)) {} + + ~SelectedBitmap() {DeleteObject(SelectBitmap(_hdc, _old_hbmp));} + +protected: + HDC _hdc; + HBITMAP _old_hbmp; +}; + + /// BufferCanvas manages offscreen bitmaps selected into memory device contexts. +struct BufferCanvas : public MemCanvas +{ + BufferCanvas(HDC hdc, int x, int y, int w, int h) + : MemCanvas(hdc), _hdctarg(hdc), + _x(x), _y(y), _w(w), _h(h), + _bmp(_hdc, CreateCompatibleBitmap(hdc, w, h)) {} + + BufferCanvas(HDC hdc, const RECT& rect) + : MemCanvas(hdc), _hdctarg(hdc), + _x(rect.left), _y(rect.top), _w(rect.right-rect.left), _h(rect.bottom-rect.top), + _bmp(_hdc, CreateCompatibleBitmap(hdc, _w, _h)) {} + +protected: + HDC _hdctarg; + int _x, _y, _w, _h; + SelectedBitmap _bmp; +}; + + /// BufferedCanvas enables double buffering for a device context. +struct BufferedCanvas : public BufferCanvas +{ + BufferedCanvas(HDC hdc, int x, int y, int w, int h, DWORD mode=SRCCOPY) + : BufferCanvas(hdc, x, y, w, h), _mode(mode) {} + + BufferedCanvas(HDC hdc, const RECT& rect, DWORD mode=SRCCOPY) + : BufferCanvas(hdc, rect), _mode(mode) {} + + ~BufferedCanvas() {BitBlt(_hdctarg, _x, _y, _w, _h, _hdc, 0, 0, _mode);} + + DWORD _mode; +}; + + /// BufferedPaintCanvas extends PaintCanvas for double buffering. +struct BufferedPaintCanvas : public PaintCanvas, public BufferedCanvas +{ + BufferedPaintCanvas(HWND hwnd) + : PaintCanvas(hwnd), + BufferedCanvas(PAINTSTRUCT::hdc, 0, 0, rcPaint.right, rcPaint.bottom) + { + } + + operator HDC() {return BufferedCanvas::_hdc;} +}; + + + /// TextColor locally selects a text color for drawing. +struct TextColor +{ + TextColor(HDC hdc, COLORREF color) + : _hdc(hdc), _old_color(SetTextColor(hdc, color)) {} + + ~TextColor() {SetTextColor(_hdc, _old_color);} + +protected: + HDC _hdc; + COLORREF _old_color; +}; + + /// BkMode locally sets the background mode for drawing. +struct BkMode +{ + BkMode(HDC hdc, int bkmode) + : _hdc(hdc), _old_bkmode(SetBkMode(hdc, bkmode)) {} + + ~BkMode() {SetBkMode(_hdc, _old_bkmode);} + +protected: + HDC _hdc; + COLORREF _old_bkmode; +}; + + /// FontSelection locally selects a font for drawing. +struct FontSelection +{ + FontSelection(HDC hdc, HFONT hFont) + : _hdc(hdc), _old_hFont(SelectFont(hdc, hFont)) {} + + ~FontSelection() {SelectFont(_hdc, _old_hFont);} + +protected: + HDC _hdc; + HFONT _old_hFont; +}; + + /// BitmapSelection locally selects a bitmap into a device context. +struct BitmapSelection +{ + BitmapSelection(HDC hdc, HBITMAP hBmp) + : _hdc(hdc), _old_hBmp(SelectBitmap(hdc, hBmp)) {} + + ~BitmapSelection() {SelectBitmap(_hdc, _old_hBmp);} + +protected: + HDC _hdc; + HBITMAP _old_hBmp; +}; + + /// BrushSelection locally selects a brush into a device context. +struct BrushSelection +{ + BrushSelection(HDC hdc, HBRUSH hBrush) + : _hdc(hdc), _old_hBrush(SelectBrush(hdc, hBrush)) {} + + ~BrushSelection() {SelectBrush(_hdc, _old_hBrush);} + +protected: + HDC _hdc; + HBRUSH _old_hBrush; +}; + + + /// Popup Menus +struct PopupMenu +{ + PopupMenu() + : _hmenu(CreatePopupMenu()) + { + } + + PopupMenu(UINT nid); + + operator HMENU() {return _hmenu;} + + void Append(UINT id, LPCTSTR str, UINT flags=MF_STRING) + { + AppendMenu(_hmenu, flags, id, str); + } + + int TrackPopupMenu(HWND hwnd, const POINT& pt, UINT flags=TPM_LEFTBUTTON|TPM_RIGHTBUTTON, LPTPMPARAMS tpm=NULL) { + return TrackPopupMenuEx(_hmenu, flags, pt.x, pt.y, hwnd, tpm); + } + + int PopupContextMenu(HWND hwnd, POINTS pos, UINT flags=TPM_LEFTBUTTON|TPM_RIGHTBUTTON) { + POINT pt; POINTSTOPOINT(pt, pos); + return TrackPopupMenuEx(_hmenu, flags, pt.x, pt.y, hwnd, NULL); + } + + int TrackPopupMenu(HWND hwnd, POINTS pos, UINT flags=TPM_LEFTBUTTON|TPM_RIGHTBUTTON) { + POINT pt; POINTSTOPOINT(pt, pos); + ClientToScreen(hwnd, &pt); + return TrackPopupMenuEx(_hmenu, flags, pt.x, pt.y, hwnd, NULL); + } + + int TrackPopupMenuAtCursor(HWND hwnd, UINT flags=TPM_LEFTBUTTON) { + POINT pt; GetCursorPos(&pt); + return TrackPopupMenuEx(_hmenu, flags, pt.x, pt.y, hwnd, NULL); + } + + int TrackPopupMenuAtPos(HWND hwnd, DWORD pos, UINT flags=TPM_LEFTBUTTON) { + return TrackPopupMenuEx(_hmenu, flags, GET_X_LPARAM(pos), GET_Y_LPARAM(pos), hwnd, NULL); + } + +protected: + HMENU _hmenu; +}; + + +struct Variant : public VARIANT +{ + Variant() {VariantInit(this);} + Variant(const VARIANT& var); + Variant(const VARIANT* var); + ~Variant(); + + operator long() const; + operator bool() const; + operator VARIANT_BOOL() const; + operator IDispatch*() const; +}; + + +struct BStr +{ + BStr() + { + _p = NULL; + } + + BStr(const BSTR s) + { + _p = SysAllocString(s); + } + + BStr(LPCSTR s) + { + WCHAR b[BUFFER_LEN]; + + if (s) + _p = SysAllocStringLen(b, MultiByteToWideChar(CP_ACP, 0, s, -1, b, BUFFER_LEN)-1); + else + _p = NULL; + } + + BStr(LPCWSTR s) + { + _p = SysAllocString(s); + } + + BStr(const VARIANT& var) + : _p(NULL) + { + assign(var); + } + + ~BStr() + { + SysFreeString(_p); + } + + void assign(BSTR s); + void assign(const VARIANT& var); + + operator BSTR() const + { + return _p? _p: (BSTR)L""; + } + + int length() const + { + return _p? wcslen(_p): 0; + } + +protected: + BSTR _p; +}; + + + /// string class for TCHAR strings +struct String +#ifdef UNICODE + : public wstring +#else + : public string +#endif +{ +#ifdef UNICODE + typedef wstring super; +#else + typedef string super; +#endif + + String() {} + + String(LPCTSTR s) {if (s) super::assign(s);} + String(LPCTSTR s, int l) : super(s, l) {} + + String(const super& other) : super(other) {} + String(const String& other) : super(other) {} + +#ifdef UNICODE + String(LPCSTR s) {assign(s);} + String(LPCSTR s, int l) {assign(s, l);} + String(const string& other) {assign(other.c_str());} + String& operator=(LPCSTR s) {assign(s); return *this;} + void assign(LPCSTR s) {if (s) {TCHAR b[BUFFER_LEN]; super::assign(b, MultiByteToWideChar(CP_ACP, 0, s, -1, b, BUFFER_LEN)-1);} else erase();} + void assign(LPCSTR s, int l) {if (s) {TCHAR b[BUFFER_LEN]; super::assign(b, MultiByteToWideChar(CP_ACP, 0, s, l, b, BUFFER_LEN));} else erase();} + void assign(const BStr& s) {int l = s.length(); super::assign(s, l);} +#else + String(LPCWSTR s) {assign(s);} + String(LPCWSTR s, int l) {assign(s, l);} + String(const wstring& other) {assign(other.c_str());} + String& operator=(LPCWSTR s) {assign(s); return *this;} + void assign(LPCWSTR s) {if (s) {char b[BUFFER_LEN]; super::assign(b, WideCharToMultiByte(CP_ACP, 0, s, -1, b, BUFFER_LEN, 0, 0)-1);} else erase();} + void assign(LPCWSTR s, int l) {if (s) {char b[BUFFER_LEN]; super::assign(b, WideCharToMultiByte(CP_ACP, 0, s, l, b, BUFFER_LEN, 0, 0));} else erase();} + void assign(const BStr& s) {int l = s.length(); if (l) {char b[BUFFER_LEN]; super::assign(b, WideCharToMultiByte(CP_ACP, 0, s, l, b, BUFFER_LEN, 0, 0));} else erase();} +#endif + String(const BStr& s) {assign(s);} + String& operator=(const BStr& s) {assign(s); return *this;} + + String& operator=(LPCTSTR s) {if (s) super::assign(s); else erase(); return *this;} + String& operator=(const super& s) {super::assign(s); return *this;} + void assign(LPCTSTR s) {super::assign(s);} + void assign(LPCTSTR s, int l) {super::assign(s, l);} + + operator LPCTSTR() const {return c_str();} + +#ifdef UNICODE + operator string() const {char b[BUFFER_LEN]; return string(b, WideCharToMultiByte(CP_ACP, 0, c_str(), -1, b, BUFFER_LEN, 0, 0)-1);} +#else + operator wstring() const {WCHAR b[BUFFER_LEN]; return wstring(b, MultiByteToWideChar(CP_ACP, 0, c_str(), -1, b, BUFFER_LEN)-1);} +#endif + + String& printf(LPCTSTR fmt, ...) + { + va_list l; + TCHAR b[BUFFER_LEN]; + + va_start(l, fmt); + super::assign(b, _vstprintf(b, fmt, l)); + va_end(l); + + return *this; + } + + String& vprintf(LPCTSTR fmt, va_list l) + { + TCHAR b[BUFFER_LEN]; + + super::assign(b, _vstprintf(b, fmt, l)); + + return *this; + } + + String& appendf(LPCTSTR fmt, ...) + { + va_list l; + TCHAR b[BUFFER_LEN]; + + va_start(l, fmt); + super::append(b, _vstprintf(b, fmt, l)); + va_end(l); + + return *this; + } + + String& vappendf(LPCTSTR fmt, va_list l) + { + TCHAR b[BUFFER_LEN]; + + super::append(b, _vstprintf(b, fmt, l)); + + return *this; + } +}; + +#define _STRING_DEFINED + + +struct FmtString : public String +{ + FmtString(LPCTSTR fmt, ...) + { + va_list l; + + va_start(l, fmt); + vprintf(fmt, l); + va_end(l); + } +}; + + +#ifdef UNICODE + +struct ANS +{ + ANS(LPCWSTR s) + { + int l = wcslen(s) + 1; + _str = (LPSTR) malloc(2*l); + + if (WideCharToMultiByte(CP_ACP, 0, s, -1, _str, 2*l, 0, 0) <= 0) + *_str = '\0'; + } + + ~ANS() + { + free(_str); + } + + operator LPCSTR() {return _str;} + +protected: + LPSTR _str; +}; + +#define UNC(x) ((LPCWSTR)(x)) + +#else + +#define ANS(x) ((LPCSTR)(x)) + +struct UNC +{ + UNC(LPCSTR s) + { + int l = strlen(s) + 1; + _str = (LPWSTR) malloc(2*l); + + if (MultiByteToWideChar(CP_ACP, 0, s, -1, _str, l) <= 0) + *_str = '\0'; + } + + ~UNC() + { + free(_str); + } + + operator LPCWSTR() {return _str;} + +protected: + LPWSTR _str; +}; + +#endif + + + // determine windows version string +//@@String get_windows_version_str(); + + + /// link dynamicly to functions by using GetModuleHandle() and GetProcAddress() +template struct DynamicFct +{ + DynamicFct(LPCTSTR moduleName, UINT ordinal) + { + HMODULE hModule = GetModuleHandle(moduleName); + + _fct = (FCT) GetProcAddress(hModule, (LPCSTR)ordinal); + } + + DynamicFct(LPCTSTR moduleName, LPCSTR name) + { + HMODULE hModule = GetModuleHandle(moduleName); + + _fct = (FCT) GetProcAddress(hModule, name); + } + + FCT operator*() const {return _fct;} + operator bool() const {return _fct? true: false;} + +protected: + FCT _fct; +}; + + + /// link dynamicly to functions by using LoadLibrary() and GetProcAddress() +template struct DynamicLoadLibFct +{ + DynamicLoadLibFct(LPCTSTR moduleName, UINT ordinal) + { + _hModule = LoadLibrary(moduleName); + + _fct = (FCT) GetProcAddress(_hModule, (LPCSTR)ordinal); + } + + DynamicLoadLibFct(LPCTSTR moduleName, LPCSTR name) + { + _hModule = LoadLibrary(moduleName); + + _fct = (FCT) GetProcAddress(_hModule, name); + } + + ~DynamicLoadLibFct() + { + FreeLibrary(_hModule); + } + + FCT operator*() const {return _fct;} + operator bool() const {return _fct? true: false;} + +protected: + HMODULE _hModule; + FCT _fct; +}; + + +struct Context +{ + Context(const char* ctx) + : _ctx(ctx) + { + _last = s_current; + s_current = this; + } + + Context(const char* ctx, LPCSTR obj) + : _ctx(ctx), + _obj(obj) + { + _last = s_current; + s_current = this; + } + + Context(const char* ctx, LPCWSTR obj) + : _ctx(ctx), + _obj(obj) + { + _last = s_current; + s_current = this; + } + + Context(const Context& other) + : _ctx(other._ctx), + _obj(other._obj) + { + _last = NULL; + } + + ~Context() + { + if (_last) { + s_current = _last; + _last = NULL; + } + } + + String toString() const; + String getStackTrace() const; + + const char* _ctx; + String _obj; + + static Context& current() {return *s_current;} + +protected: + Context* _last; + + static Context* s_current; ///@todo use TLS + static Context s_main; +}; + +#define CONTEXT_OBJ __ctx__._obj +#define CONTEXT(c) Context __ctx__(c) +#define CURRENT_CONTEXT Context::current() +#define OBJ_CONTEXT(c, o) Context __ctx__(c, o) + + +extern bool SplitFileSysURL(LPCTSTR url, String& dir_out, String& fname_out); + + +#endif // __cplusplus diff --git a/reactos/subsys/system/ibrowser/utility/window.cpp b/reactos/subsys/system/ibrowser/utility/window.cpp new file mode 100644 index 00000000000..c9d7085a98d --- /dev/null +++ b/reactos/subsys/system/ibrowser/utility/window.cpp @@ -0,0 +1,1206 @@ +/* + * Copyright 2003, 2004, 2005 Martin Fuchs + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + + + // + // ROS Internet Web Browser + // + // window.cpp + // + // Martin Fuchs, 23.07.2003 + // + + +#include "precomp.h" + +#include "../ibrowser_intres.h" // for ID_GO_BACK, ... + + +WindowClass::WindowClass(LPCTSTR classname, UINT style_, WNDPROC wndproc) +{ + memset(this, 0, sizeof(WNDCLASSEX)); + + cbSize = sizeof(WNDCLASSEX); + style = style_; + hInstance = g_hInstance; + hCursor = LoadCursor(0, IDC_ARROW); + + lpszClassName = classname; + lpfnWndProc = wndproc; + + _atomClass = 0; +} + + +IconWindowClass::IconWindowClass(LPCTSTR classname, UINT nid, UINT style, WNDPROC wndproc) + : WindowClass(classname, style, wndproc) +{ + hIcon = ResIcon(nid); + hIconSm = SmallIcon(nid); +} + + +Window::WindowMap Window::s_wnd_map; + +Window::CREATORFUNC Window::s_window_creator = NULL; +const void* Window::s_new_info = NULL; + + +Window::StaticWindowData& Window::GetStaticWindowData() +{ + static StaticWindowData s_initialized_data; + + return s_initialized_data; +} + + +Window::Window(HWND hwnd) + : WindowHandle(hwnd) +{ + Lock lock(GetStaticWindowData()._map_crit_sect); // protect access to s_wnd_map + + s_wnd_map[_hwnd] = this; +} + +Window::~Window() +{ + Lock lock(GetStaticWindowData()._map_crit_sect); // protect access to s_wnd_map + + s_wnd_map.erase(_hwnd); +} + + +HWND Window::Create(CREATORFUNC creator, DWORD dwExStyle, + LPCTSTR lpClassName, LPCTSTR lpWindowName, + DWORD dwStyle, int x, int y, int w, int h, + HWND hwndParent, HMENU hMenu/*, LPVOID lpParam*/) +{ + Lock lock(GetStaticWindowData()._create_crit_sect); // protect access to s_window_creator and s_new_info + + s_window_creator = creator; + s_new_info = NULL; + + return CreateWindowEx(dwExStyle, lpClassName, lpWindowName, dwStyle, + x, y, w, h, + hwndParent, hMenu, g_hInstance, 0/*lpParam*/); +} + +HWND Window::Create(CREATORFUNC_INFO creator, const void* info, DWORD dwExStyle, + LPCTSTR lpClassName, LPCTSTR lpWindowName, + DWORD dwStyle, int x, int y, int w, int h, + HWND hwndParent, HMENU hMenu/*, LPVOID lpParam*/) +{ + Lock lock(GetStaticWindowData()._create_crit_sect); // protect access to s_window_creator and s_new_info + + s_window_creator = (CREATORFUNC) creator; + s_new_info = info; + + return CreateWindowEx(dwExStyle, lpClassName, lpWindowName, dwStyle, + x, y, w, h, + hwndParent, hMenu, g_hInstance, 0/*lpParam*/); +} + + + /// get window controller from window handle + +Window* Window::get_window(HWND hwnd) +{ + { + Lock lock(GetStaticWindowData()._map_crit_sect); // protect access to s_wnd_map + + WindowMap::const_iterator found = s_wnd_map.find(hwnd); + + if (found!=s_wnd_map.end()) + return found->second; + } + + return NULL; +} + + + /// create controller for a new window + +Window* Window::create_controller(HWND hwnd) +{ + if (s_window_creator) { // protect for recursion and create the window object only for the first window + Lock lock(GetStaticWindowData()._create_crit_sect); // protect access to s_window_creator and s_new_info + + const void* info = s_new_info; + s_new_info = NULL; + + CREATORFUNC window_creator = s_window_creator; + s_window_creator = NULL; + + if (info) + return CREATORFUNC_INFO(window_creator)(hwnd, info); + else + return CREATORFUNC(window_creator)(hwnd); + } + + return NULL; +} + + +LRESULT Window::Init(LPCREATESTRUCT pcs) +{ + return 0; +} + + +LRESULT CALLBACK Window::WindowWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam) +{ + Window* pThis = get_window(hwnd); + + if (!pThis) + pThis = create_controller(hwnd); + + if (pThis) { + switch(nmsg) { + case WM_COMMAND: + return pThis->Command(LOWORD(wparam), HIWORD(wparam)); + + case WM_NOTIFY: + return pThis->Notify(wparam, (NMHDR*)lparam); + + case WM_NOTIFYFORMAT: + return NFR_CURRENT; + + case WM_CREATE: + return pThis->Init((LPCREATESTRUCT)lparam); + + case WM_NCDESTROY: + delete pThis; + return 0; + + default: + return pThis->WndProc(nmsg, wparam, lparam); + } + } + else + return DefWindowProc(hwnd, nmsg, wparam, lparam); +} + +LRESULT Window::WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam) +{ + return DefWindowProc(_hwnd, nmsg, wparam, lparam); +} + +int Window::Command(int id, int code) +{ + return 1; // no command handler found +} + +int Window::Notify(int id, NMHDR* pnmh) +{ + return 0; +} + +void Window::CancelModes(HWND hwnd) +{ + if (hwnd) + PostMessage(hwnd, WM_CANCELMODE, 0, 0); + else + PostMessage(HWND_BROADCAST, WM_CANCELMODE, 0, 0); +} + + +SubclassedWindow::SubclassedWindow(HWND hwnd) + : super(hwnd) +{ + _orgWndProc = SubclassWindow(_hwnd, SubclassedWndProc); + + if (!_orgWndProc) + delete this; +} + +LRESULT CALLBACK SubclassedWindow::SubclassedWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam) +{ + SubclassedWindow* pThis = GET_WINDOW(SubclassedWindow, hwnd); + assert(pThis); + + if (pThis) { + switch(nmsg) { + case WM_COMMAND: + if (!pThis->Command(LOWORD(wparam), HIWORD(wparam))) + return 0; + break; + + case WM_NOTIFY: + return pThis->Notify(wparam, (NMHDR*)lparam); + + case WM_NOTIFYFORMAT: + return NFR_CURRENT; + + case WM_CREATE: + return pThis->Init((LPCREATESTRUCT)lparam); + + case WM_NCDESTROY: + delete pThis; + return 0; + + default: + return pThis->WndProc(nmsg, wparam, lparam); + } + } + + return CallWindowProc(pThis->_orgWndProc, hwnd, nmsg, wparam, lparam); +} + +LRESULT SubclassedWindow::WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam) +{ + return CallWindowProc(_orgWndProc, _hwnd, nmsg, wparam, lparam); +} + +int SubclassedWindow::Command(int id, int code) +{ + return 1; // no command handler found +} + +int SubclassedWindow::Notify(int id, NMHDR* pnmh) +{ + return CallWindowProc(_orgWndProc, _hwnd, WM_NOTIFY, id, (LPARAM)pnmh); +} + + +ChildWindow::ChildWindow(HWND hwnd, HWND hwndFrame) + : super(hwnd), + _hwndFrame(hwndFrame) +{ +} + + +ChildWindow* ChildWindow::create(const ChildWndInfo& info, CREATORFUNC_INFO creator, + LPCTSTR classname, LPCTSTR title, DWORD style) +{ + HWND hwnd = Window::Create(creator, &info, 0, classname, title, style, + CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, info._hwndFrame); + + return GET_WINDOW(ChildWindow, hwnd); +} + + +LRESULT ChildWindow::WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam) +{ + switch(nmsg) { + case PM_JUMP_TO_URL: + return go_to((LPCTSTR)lparam)? TRUE: FALSE; + + default: + return super::WndProc(nmsg, wparam, lparam); + } + + return 0; +} + + +bool ChildWindow::go_to(LPCTSTR url) +{ + const String& url_str = jump_to_int(url); + + if (!url_str.empty()) { + set_url(url_str); + + _url_history.push(url_str); + + return true; + } else + return false; +} + +void ChildWindow::set_url(LPCTSTR url) +{ + if (_url != url) { + _url = url; + + SendMessage(_hwndFrame, PM_URL_CHANGED, 0, (LPARAM)url); + } +} + + +WindowSet Window::s_pretranslate_windows; + +void Window::register_pretranslate(HWND hwnd) +{ + s_pretranslate_windows.insert(hwnd); +} + +void Window::unregister_pretranslate(HWND hwnd) +{ + s_pretranslate_windows.erase(hwnd); +} + +BOOL Window::pretranslate_msg(LPMSG pmsg) +{ + for(WindowSet::const_iterator it=Window::s_pretranslate_windows.begin(); it!=s_pretranslate_windows.end(); ++it) + if (SendMessage(*it, PM_TRANSLATE_MSG, 0, (LPARAM)pmsg)) + return TRUE; + + return FALSE; +} + + +WindowSet Window::s_dialogs; + +void Window::register_dialog(HWND hwnd) +{ + s_dialogs.insert(hwnd); +} + +void Window::unregister_dialog(HWND hwnd) +{ + s_dialogs.erase(hwnd); +} + +BOOL Window::dispatch_dialog_msg(MSG* pmsg) +{ + for(WindowSet::const_iterator it=Window::s_dialogs.begin(); it!=s_dialogs.end(); ++it) + if (IsDialogMessage(*it, pmsg)) + return TRUE; + + return FALSE; +} + + +int Window::MessageLoop() +{ + MSG msg; + + while(GetMessage(&msg, 0, 0, 0)) { + try { + if (pretranslate_msg(&msg)) + continue; + + if (dispatch_dialog_msg(&msg)) + continue; + + TranslateMessage(&msg); + + try { + DispatchMessage(&msg); + } catch(COMException& e) { + HandleException(e, 0); + } + } catch(COMException& e) { + HandleException(e, 0); + } + } + + return msg.wParam; +} + + +LRESULT Window::SendParent(UINT nmsg, WPARAM wparam, LPARAM lparam) +{ + HWND parent = GetParent(_hwnd); + + if (!parent) + return 0; + + return SendMessage(parent, nmsg, wparam, lparam); +} + +LRESULT Window::PostParent(UINT nmsg, WPARAM wparam, LPARAM lparam) +{ + HWND parent = GetParent(_hwnd); + + if (!parent) + return 0; + + return PostMessage(parent, nmsg, wparam, lparam); +} + + +PreTranslateWindow::PreTranslateWindow(HWND hwnd) + : super(hwnd) +{ + register_pretranslate(hwnd); +} + +PreTranslateWindow::~PreTranslateWindow() +{ + unregister_pretranslate(_hwnd); +} + + +Dialog::Dialog(HWND hwnd) + : super(hwnd) +{ + register_dialog(hwnd); +} + +Dialog::~Dialog() +{ + unregister_dialog(_hwnd); +} + +int Dialog::DoModal(UINT nid, CREATORFUNC creator, HWND hwndParent) +{ + Lock lock(GetStaticWindowData()._create_crit_sect); // protect access to s_window_creator and s_new_info + + s_window_creator = creator; + s_new_info = NULL; + + ///@todo call Window::pretranslate_msg() + + return DialogBoxParam(g_hInstance, MAKEINTRESOURCE(nid), hwndParent, DialogProc, 0/*lpParam*/); +} + +int Dialog::DoModal(UINT nid, CREATORFUNC_INFO creator, const void* info, HWND hwndParent) +{ + Lock lock(GetStaticWindowData()._create_crit_sect); // protect access to s_window_creator and s_new_info + + s_window_creator = (CREATORFUNC) creator; + s_new_info = NULL; + + ///@todo call Window::pretranslate_msg() + + return DialogBoxParam(g_hInstance, MAKEINTRESOURCE(nid), hwndParent, DialogProc, 0/*lpParam*/); +} + +INT_PTR CALLBACK Window::DialogProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam) +{ + Window* pThis = get_window(hwnd); + + if (pThis) { + switch(nmsg) { + case WM_COMMAND: + pThis->Command(LOWORD(wparam), HIWORD(wparam)); + return TRUE; // message has been processed + + case WM_NOTIFY: + pThis->Notify(wparam, (NMHDR*)lparam); + return TRUE; // message has been processed + + case WM_NOTIFYFORMAT: + SetWindowLong(hwnd, DWLP_MSGRESULT, NFR_CURRENT); // set return value NFR_CURRENT + return TRUE; // message has been processed + + case WM_NCDESTROY: + delete pThis; + return TRUE; // message has been processed + + default: + return pThis->WndProc(nmsg, wparam, lparam); + } + } else if (nmsg == WM_INITDIALOG) { + pThis = create_controller(hwnd); + + if (pThis) + return pThis->Init(NULL); + } + + return FALSE; // message has not been processed +} + +LRESULT Dialog::WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam) +{ + return FALSE; // message has not been processed +} + +int Dialog::Command(int id, int code) +{ + if (code == BN_CLICKED) { + EndDialog(_hwnd, id); + return 0; // message has been processed + } + + return 1; +} + + +ResizeManager::ResizeManager(HWND hwnd) + : _hwnd(hwnd) +{ + ClientRect clnt(hwnd); + _last_size.cx = clnt.right; + _last_size.cy = clnt.bottom; + + WindowRect rect(hwnd); + _min_wnd_size.cx = rect.right - rect.left; + _min_wnd_size.cy = rect.bottom - rect.top; +} + +void ResizeManager::HandleSize(int cx, int cy) +{ + ClientRect clnt_rect(_hwnd); + SIZE new_size = {cx, cy}; + + int dx = new_size.cx - _last_size.cx; + int dy = new_size.cy - _last_size.cy; + + if (!dx && !dy) + return; + + _last_size = new_size; + + HDWP hDWP = BeginDeferWindowPos(size()); + + for(ResizeManager::const_iterator it=begin(); it!=end(); ++it) { + const ResizeEntry& e = *it; + RECT move = {0}; + + if (e._flags & MOVE_LEFT) + move.left += dx; + + if (e._flags & MOVE_RIGHT) + move.right += dx; + + if (e._flags & MOVE_TOP) + move.top += dy; + + if (e._flags & MOVE_BOTTOM) + move.bottom += dy; + + UINT flags = 0; + + if (!move.left && !move.top) + flags = SWP_NOMOVE; + + if (move.right==move.left && move.bottom==move.top) + flags |= SWP_NOSIZE; + + if (flags != (SWP_NOMOVE|SWP_NOSIZE)) { + HWND hwnd = GetDlgItem(_hwnd, e._id); + + if (hwnd) { + WindowRect rect(hwnd); + ScreenToClient(_hwnd, rect); + + rect.left += move.left; + rect.right += move.right; + rect.top += move.top; + rect.bottom += move.bottom; + + hDWP = DeferWindowPos(hDWP, hwnd, 0, rect.left, rect.top, rect.right-rect.left, rect.bottom-rect.top, flags|SWP_NOACTIVATE|SWP_NOZORDER); + } + } + } + + EndDeferWindowPos(hDWP); +} + +void ResizeManager::Resize(int dx, int dy) +{ + ::SetWindowPos(_hwnd, 0, 0, 0, _min_wnd_size.cx+dx, _min_wnd_size.cy+dy, SWP_NOMOVE|SWP_NOACTIVATE); + MoveVisible(_hwnd); + + ClientRect clnt_rect(_hwnd); + HandleSize(clnt_rect.right, clnt_rect.bottom); +} + + +Button::Button(HWND parent, LPCTSTR title, int left, int top, int width, int height, + int id, DWORD flags, DWORD exStyle) + : WindowHandle(CreateWindowEx(exStyle, TEXT("BUTTON"), title, flags, left, top, width, height, + parent, (HMENU)id, g_hInstance, 0)) +{ +} + + +LRESULT OwnerdrawnButton::WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam) +{ + if (nmsg == PM_DISPATCH_DRAWITEM) { + DrawItem((LPDRAWITEMSTRUCT)lparam); + return TRUE; + } else + return super::WndProc(nmsg, wparam, lparam); +} + + +Static::Static(HWND parent, LPCTSTR title, int left, int top, int width, int height, + int id, DWORD flags, DWORD exStyle) + : WindowHandle(CreateWindowEx(exStyle, TEXT("STATIC"), title, flags, left, top, width, height, + parent, (HMENU)id, g_hInstance, 0)) +{ +} + + +static RECT s_MyDrawText_Rect = {0, 0, 0, 0}; + +static BOOL CALLBACK MyDrawText(HDC hdc, LPARAM data, int cnt) +{ + ::DrawText(hdc, (LPCTSTR)data, cnt, &s_MyDrawText_Rect, DT_SINGLELINE); + return TRUE; +} + +void DrawGrayText(HDC hdc, LPRECT pRect, LPCTSTR title, int dt_flags) +{ + COLORREF gray = GetSysColor(COLOR_GRAYTEXT); + + if (gray) { + TextColor lcColor(hdc, GetSysColor(COLOR_BTNHIGHLIGHT)); + RECT shadowRect = {pRect->left+1, pRect->top+1, pRect->right+1, pRect->bottom+1}; + DrawText(hdc, title, -1, &shadowRect, dt_flags); + + SetTextColor(hdc, gray); + DrawText(hdc, title, -1, pRect, dt_flags); + } else { + int old_r = pRect->right; + int old_b = pRect->bottom; + + DrawText(hdc, title, -1, pRect, dt_flags|DT_CALCRECT); + + int x = pRect->left + (old_r-pRect->right)/2; + int y = pRect->top + (old_b-pRect->bottom)/2; + int w = pRect->right-pRect->left; + int h = pRect->bottom-pRect->top; + s_MyDrawText_Rect.right = w; + s_MyDrawText_Rect.bottom = h; + + GrayString(hdc, GetSysColorBrush(COLOR_GRAYTEXT), MyDrawText, (LPARAM)title, -1, x, y, w, h); + } +} + + +/* not yet used +void ColorButton::DrawItem(LPDRAWITEMSTRUCT dis) +{ + UINT state = DFCS_BUTTONPUSH; + + if (dis->itemState & ODS_DISABLED) + state |= DFCS_INACTIVE; + + RECT textRect = {dis->rcItem.left+2, dis->rcItem.top+2, dis->rcItem.right-4, dis->rcItem.bottom-4}; + + if (dis->itemState & ODS_SELECTED) { + state |= DFCS_PUSHED; + ++textRect.left; ++textRect.top; + ++textRect.right; ++textRect.bottom; + } + + DrawFrameControl(dis->hDC, &dis->rcItem, DFC_BUTTON, state); + + TCHAR title[BUFFER_LEN]; + GetWindowText(_hwnd, title, BUFFER_LEN); + + BkMode bk_mode(dis->hDC, TRANSPARENT); + + if (dis->itemState & (ODS_DISABLED|ODS_GRAYED)) + DrawGrayText(dis, &textRect, title, DT_SINGLELINE|DT_VCENTER|DT_CENTER); + else { + TextColor lcColor(dis->hDC, _textColor); + DrawText(dis->hDC, title, -1, &textRect, DT_SINGLELINE|DT_VCENTER|DT_CENTER); + } + + if (dis->itemState & ODS_FOCUS) { + RECT rect = { + dis->rcItem.left+3, dis->rcItem.top+3, + dis->rcItem.right-dis->rcItem.left-4, dis->rcItem.bottom-dis->rcItem.top-4 + }; + if (dis->itemState & ODS_SELECTED) { + ++rect.left; ++rect.top; + ++rect.right; ++rect.bottom; + } + DrawFocusRect(dis->hDC, &rect); + } +} +*/ + + +void PictureButton::DrawItem(LPDRAWITEMSTRUCT dis) +{ + UINT state = DFCS_BUTTONPUSH; + int style = GetWindowStyle(_hwnd); + + if (dis->itemState & ODS_DISABLED) + state |= DFCS_INACTIVE; + + POINT imagePos; + RECT textRect; + int dt_flags; + + if (style & BS_BOTTOM) { + // align horizontal centered, vertical floating + imagePos.x = (dis->rcItem.left + dis->rcItem.right - _cx) / 2; + imagePos.y = dis->rcItem.top + 3; + + textRect.left = dis->rcItem.left + 2; + textRect.top = dis->rcItem.top + _cy + 4; + textRect.right = dis->rcItem.right - 4; + textRect.bottom = dis->rcItem.bottom - 4; + + dt_flags = DT_SINGLELINE|DT_CENTER|DT_VCENTER; + } else { + // horizontal floating, vertical centered + imagePos.x = dis->rcItem.left + 3; + imagePos.y = (dis->rcItem.top + dis->rcItem.bottom - _cy)/2; + + textRect.left = dis->rcItem.left + _cx + 4; + textRect.top = dis->rcItem.top + 2; + textRect.right = dis->rcItem.right - 4; + textRect.bottom = dis->rcItem.bottom - 4; + + dt_flags = DT_SINGLELINE|DT_VCENTER/*|DT_CENTER*/; + } + + if (dis->itemState & ODS_SELECTED) { + state |= DFCS_PUSHED; + ++imagePos.x; ++imagePos.y; + ++textRect.left; ++textRect.top; + ++textRect.right; ++textRect.bottom; + } + + if (_flat) { + FillRect(dis->hDC, &dis->rcItem, _hBrush); + + if (style & BS_FLAT) // Only with BS_FLAT set, there will be drawn a frame without highlight. + DrawEdge(dis->hDC, &dis->rcItem, EDGE_RAISED, BF_RECT|BF_FLAT); + } else + DrawFrameControl(dis->hDC, &dis->rcItem, DFC_BUTTON, state); + + if (_hIcon) + DrawIconEx(dis->hDC, imagePos.x, imagePos.y, _hIcon, _cx, _cy, 0, _hBrush, DI_NORMAL); + else { + MemCanvas mem_dc; + BitmapSelection sel(mem_dc, _hBmp); + BitBlt(dis->hDC, imagePos.x, imagePos.y, _cx, _cy, mem_dc, 0, 0, SRCCOPY); + } + + TCHAR title[BUFFER_LEN]; + GetWindowText(_hwnd, title, BUFFER_LEN); + + BkMode bk_mode(dis->hDC, TRANSPARENT); + + if (dis->itemState & (ODS_DISABLED|ODS_GRAYED)) + DrawGrayText(dis->hDC, &textRect, title, dt_flags); + else { + TextColor lcColor(dis->hDC, GetSysColor(COLOR_BTNTEXT)); + DrawText(dis->hDC, title, -1, &textRect, dt_flags); + } + + if (dis->itemState & ODS_FOCUS) { + RECT rect = { + dis->rcItem.left+3, dis->rcItem.top+3, + dis->rcItem.right-dis->rcItem.left-4, dis->rcItem.bottom-dis->rcItem.top-4 + }; + if (dis->itemState & ODS_SELECTED) { + ++rect.left; ++rect.top; + ++rect.right; ++rect.bottom; + } + DrawFocusRect(dis->hDC, &rect); + } +} + + +void FlatButton::DrawItem(LPDRAWITEMSTRUCT dis) +{ + UINT style = DFCS_BUTTONPUSH; + + if (dis->itemState & ODS_DISABLED) + style |= DFCS_INACTIVE; + + RECT textRect = {dis->rcItem.left+2, dis->rcItem.top+2, dis->rcItem.right-4, dis->rcItem.bottom-4}; + + if (dis->itemState & ODS_SELECTED) { + style |= DFCS_PUSHED; + ++textRect.left; ++textRect.top; + ++textRect.right; ++textRect.bottom; + } + + FillRect(dis->hDC, &dis->rcItem, GetSysColorBrush(COLOR_BTNFACE)); + + // highlight the button? + if (_active) + DrawEdge(dis->hDC, &dis->rcItem, EDGE_ETCHED, BF_RECT); + else if (GetWindowStyle(_hwnd) & BS_FLAT) // Only with BS_FLAT there will be drawn a frame to show highlighting. + DrawEdge(dis->hDC, &dis->rcItem, EDGE_RAISED, BF_RECT|BF_FLAT); + + TCHAR txt[BUFFER_LEN]; + int txt_len = GetWindowText(_hwnd, txt, BUFFER_LEN); + + if (dis->itemState & (ODS_DISABLED|ODS_GRAYED)) { + COLORREF gray = GetSysColor(COLOR_GRAYTEXT); + + if (gray) { + { + TextColor lcColor(dis->hDC, GetSysColor(COLOR_BTNHIGHLIGHT)); + RECT shadowRect = {textRect.left+1, textRect.top+1, textRect.right+1, textRect.bottom+1}; + DrawText(dis->hDC, txt, txt_len, &shadowRect, DT_SINGLELINE|DT_VCENTER|DT_CENTER); + } + + BkMode mode(dis->hDC, TRANSPARENT); + TextColor lcColor(dis->hDC, gray); + DrawText(dis->hDC, txt, txt_len, &textRect, DT_SINGLELINE|DT_VCENTER|DT_CENTER); + } else { + int old_r = textRect.right; + int old_b = textRect.bottom; + DrawText(dis->hDC, txt, txt_len, &textRect, DT_SINGLELINE|DT_VCENTER|DT_CENTER|DT_CALCRECT); + int x = textRect.left + (old_r-textRect.right)/2; + int y = textRect.top + (old_b-textRect.bottom)/2; + int w = textRect.right-textRect.left; + int h = textRect.bottom-textRect.top; + s_MyDrawText_Rect.right = w; + s_MyDrawText_Rect.bottom = h; + GrayString(dis->hDC, GetSysColorBrush(COLOR_GRAYTEXT), MyDrawText, (LPARAM)txt, txt_len, x, y, w, h); + } + } else { + TextColor lcColor(dis->hDC, _active? _activeColor: _textColor); + DrawText(dis->hDC, txt, txt_len, &textRect, DT_SINGLELINE|DT_VCENTER|DT_CENTER); + } + + if (dis->itemState & ODS_FOCUS) { + RECT rect = { + dis->rcItem.left+3, dis->rcItem.top+3, + dis->rcItem.right-dis->rcItem.left-4, dis->rcItem.bottom-dis->rcItem.top-4 + }; + if (dis->itemState & ODS_SELECTED) { + ++rect.left; ++rect.top; + ++rect.right; ++rect.bottom; + } + DrawFocusRect(dis->hDC, &rect); + } +} + +LRESULT FlatButton::WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam) +{ + switch(nmsg) { + case WM_MOUSEMOVE: { + bool active = false; + + if (IsWindowEnabled(_hwnd)) { + DWORD pid_foreground; + HWND hwnd_foreground = GetForegroundWindow(); //@@ may be better look for WM_ACTIVATEAPP ? + GetWindowThreadProcessId(hwnd_foreground, &pid_foreground); + + if (GetCurrentProcessId() == pid_foreground) { + POINT pt = {GET_X_LPARAM(lparam), GET_Y_LPARAM(lparam)}; + ClientRect clntRect(_hwnd); + + // highlight the button? + if (pt.x>=clntRect.left && pt.x=clntRect.top && pt.y=clntRect.right || pt.y=clntRect.bottom) + goto cancel_press; + + goto def;} + + case WM_CANCELMODE: + cancel_press: { + TRACKMOUSEEVENT tme = {sizeof(tme), /*TME_HOVER|*/TME_LEAVE|TME_CANCEL, _hwnd/*, HOVER_DEFAULT*/}; + _TrackMouseEvent(&tme); + _active = false; + ReleaseCapture();} + // fall through + + case WM_MOUSELEAVE: + if (_active) { + _active = false; + + InvalidateRect(_hwnd, NULL, TRUE); + } + + return 0; + + default: def: + return super::WndProc(nmsg, wparam, lparam); + } +} + + +HyperlinkCtrl::HyperlinkCtrl(HWND hwnd, COLORREF colorLink, COLORREF colorVisited) + : super(hwnd), + _cmd(ResString(GetDlgCtrlID(hwnd))), + _textColor(colorLink), + _colorVisited(colorVisited), + _hfont(0), + _crsr_link(0) +{ + init(); +} + +HyperlinkCtrl::HyperlinkCtrl(HWND owner, int id, COLORREF colorLink, COLORREF colorVisited) + : super(GetDlgItem(owner, id)), + _cmd(ResString(id)), + _textColor(colorLink), + _colorVisited(colorVisited), + _hfont(0), + _crsr_link(0) +{ + init(); +} + +void HyperlinkCtrl::init() +{ + if (_cmd.empty()) { + TCHAR txt[BUFFER_LEN]; + _cmd.assign(txt, GetWindowText(_hwnd, txt, BUFFER_LEN)); + } +} + +HyperlinkCtrl::~HyperlinkCtrl() +{ + if (_hfont) + DeleteObject(_hfont); +} + +LRESULT HyperlinkCtrl::WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam) +{ + switch(nmsg) { + case PM_DISPATCH_CTLCOLOR: { + if (!_hfont) { + HFONT hfont = (HFONT) SendMessage(_hwnd, WM_GETFONT, 0, 0); + LOGFONT lf; GetObject(hfont, sizeof(lf), &lf); + lf.lfUnderline = TRUE; + _hfont = CreateFontIndirect(&lf); + } + + HDC hdc = (HDC) wparam; + SetTextColor(hdc, _textColor); //@@ + SelectFont(hdc, _hfont); + SetBkMode(hdc, TRANSPARENT); + return (LRESULT)GetStockObject(HOLLOW_BRUSH); + } + + case WM_SETCURSOR: + if (!_crsr_link) + _crsr_link = LoadCursor(0, IDC_HAND); + + if (_crsr_link) + SetCursor(_crsr_link); + return 0; + + case WM_NCHITTEST: + return HTCLIENT; // Aktivierung von Maus-Botschaften + + case WM_LBUTTONDOWN: + if (LaunchLink()) { + _textColor = _colorVisited; + InvalidateRect(_hwnd, NULL, FALSE); + } else + MessageBeep(0); + return 0; + + default: + return super::WndProc(nmsg, wparam, lparam); + } +} + + +ToolTip::ToolTip(HWND owner) + : super(CreateWindowEx(WS_EX_TOPMOST|WS_EX_NOPARENTNOTIFY, TOOLTIPS_CLASS, 0, + WS_POPUP|TTS_NOPREFIX|TTS_ALWAYSTIP, CW_USEDEFAULT,CW_USEDEFAULT,CW_USEDEFAULT,CW_USEDEFAULT, + owner, 0, g_hInstance, 0)) +{ + activate(); +} + + +ListSort::ListSort(HWND hwndListview, PFNLVCOMPARE compare_fct) + : WindowHandle(hwndListview), + _compare_fct(compare_fct) +{ + _sort_crit = 0; + _direction = false; +} + +void ListSort::toggle_sort(int idx) +{ + if (_sort_crit == idx) + _direction = !_direction; + else { + _sort_crit = idx; + _direction = false; + } +} + +void ListSort::sort() +{ + int idx = ListView_GetSelectionMark(_hwnd); + LPARAM param = ListView_GetItemData(_hwnd, idx); + + ListView_SortItems(_hwnd, _compare_fct, (LPARAM)this); + + if (idx >= 0) { + idx = ListView_FindItemPara(_hwnd, param); + ListView_EnsureVisible(_hwnd, idx, FALSE); + } +} + + +PropSheetPage::PropSheetPage(UINT nid, Window::CREATORFUNC dlg_creator) + : _dlg_creator(dlg_creator) +{ + PROPSHEETPAGE::dwSize = sizeof(PROPSHEETPAGE); + PROPSHEETPAGE::dwFlags = 0; + PROPSHEETPAGE::hInstance = g_hInstance; + PROPSHEETPAGE::pszTemplate = MAKEINTRESOURCE(nid); + PROPSHEETPAGE::pfnDlgProc = PropSheetPageDlg::DialogProc; + PROPSHEETPAGE::lParam = (LPARAM) this; +} + + +#ifndef PSM_GETRESULT // currently (as of 18.01.2004) missing in MinGW headers +#define PSM_GETRESULT (WM_USER + 135) +#define PropSheet_GetResult(hDlg) SNDMSG(hDlg, PSM_GETRESULT, 0, 0) +#endif + + +PropertySheetDialog::PropertySheetDialog(HWND owner) + : _hwnd(0) +{ + PROPSHEETHEADER::dwSize = sizeof(PROPSHEETHEADER); + PROPSHEETHEADER::dwFlags = PSH_PROPSHEETPAGE | PSH_MODELESS; + PROPSHEETHEADER::hwndParent = owner; + PROPSHEETHEADER::hInstance = g_hInstance; +} + +void PropertySheetDialog::add(PropSheetPage& psp) +{ + _pages.push_back(psp); +} + +int PropertySheetDialog::DoModal(int start_page) +{ + PROPSHEETHEADER::ppsp = (LPCPROPSHEETPAGE) &_pages[0]; + PROPSHEETHEADER::nPages = _pages.size(); + PROPSHEETHEADER::nStartPage = start_page; +/* + Window* pwnd = Window::create_property_sheet(this, WINDOW_CREATOR(PropertySheetDlg), NULL); + if (!pwnd) + return -1; + + HWND hwndPropSheet = *pwnd; +*/ + int ret = PropertySheet(this); + if (ret == -1) + return -1; + + HWND hwndPropSheet = (HWND) ret; + HWND hwndparent = GetParent(hwndPropSheet); + + if (hwndparent) + EnableWindow(hwndparent, FALSE); + + ret = 0; + MSG msg; + + while(GetMessage(&msg, 0, 0, 0)) { + try { + if (Window::pretranslate_msg(&msg)) + continue; + + if (PropSheet_IsDialogMessage(hwndPropSheet, &msg)) + continue; + + if (Window::dispatch_dialog_msg(&msg)) + continue; + + TranslateMessage(&msg); + + try { + DispatchMessage(&msg); + } catch(COMException& e) { + HandleException(e, 0); + } + + if (!PropSheet_GetCurrentPageHwnd(hwndPropSheet)) { + ret = PropSheet_GetResult(hwndPropSheet); + break; + } + } catch(COMException& e) { + HandleException(e, 0); + } + } + + if (hwndparent) + EnableWindow(hwndparent, TRUE); + + DestroyWindow(hwndPropSheet); + + return ret; +} + +HWND PropertySheetDialog::GetCurrentPage() +{ + HWND hdlg = PropSheet_GetCurrentPageHwnd(_hwnd); + return hdlg; +} + + +PropSheetPageDlg::PropSheetPageDlg(HWND hwnd) + : super(hwnd) +{ +} + +INT_PTR CALLBACK PropSheetPageDlg::DialogProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam) +{ + PropSheetPageDlg* pThis = GET_WINDOW(PropSheetPageDlg, hwnd); + + if (pThis) { + switch(nmsg) { + case WM_COMMAND: + pThis->Command(LOWORD(wparam), HIWORD(wparam)); + return TRUE; // message has been processed + + case WM_NOTIFY: + pThis->Notify(wparam, (NMHDR*)lparam); + return TRUE; // message has been processed + + case WM_NOTIFYFORMAT: + SetWindowLong(hwnd, DWLP_MSGRESULT, NFR_CURRENT); // set return value NFR_CURRENT + return TRUE; // message has been processed + + case WM_NCDESTROY: + delete pThis; + return TRUE; // message has been processed + + default: + return pThis->WndProc(nmsg, wparam, lparam); + } + } else if (nmsg == WM_INITDIALOG) { + PROPSHEETPAGE* psp = (PROPSHEETPAGE*) lparam; + PropSheetPage* ppsp = (PropSheetPage*) psp->lParam; + + if (ppsp->_dlg_creator) { + pThis = static_cast(ppsp->_dlg_creator(hwnd)); + + if (pThis) + return pThis->Init(NULL); + } + } + + return FALSE; // message has not been processed +} + +int PropSheetPageDlg::Command(int id, int code) +{ + // override call to EndDialog in Dialog::Command(); + + return FALSE; +} diff --git a/reactos/subsys/system/ibrowser/utility/window.h b/reactos/subsys/system/ibrowser/utility/window.h new file mode 100644 index 00000000000..bd568797aaf --- /dev/null +++ b/reactos/subsys/system/ibrowser/utility/window.h @@ -0,0 +1,1100 @@ +/* + * Copyright 2003, 2004, 2005 Martin Fuchs + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + + + // + // ROS Internet Web Browser + // + // window.h + // + // Martin Fuchs, 23.07.2003 + // + + +typedef set WindowSet; + + + /* + Classes are declared using "struct", not "class" because the default + access mode is "public". This way we can list the member functions in a + natural order without explicitly specifying any access mode at the begin + of the definition. + First are public constructors and destructor, then public member functions. + After that we list protected member varibables and functions. If needed, + private implemenation varibales and functions are positioned at the end. + */ + + + /// information structure for creation of a child window +struct ChildWndInfo +{ + ChildWndInfo(HWND hwndFrame) + : _hwndFrame(hwndFrame) {} + + HWND _hwndFrame; +}; + + + /** + Class Window is the base class for several C++ window wrapper classes. + Window objects are allocated from the heap. They are automatically freed + when the window gets destroyed. + */ +struct Window : public WindowHandle +{ + Window(HWND hwnd); + virtual ~Window(); + + + typedef map WindowMap; + + typedef Window* (*CREATORFUNC)(HWND); + typedef Window* (*CREATORFUNC_INFO)(HWND, const void*); + + static HWND Create(CREATORFUNC creator, DWORD dwExStyle, + LPCTSTR lpClassName, LPCTSTR lpWindowName, + DWORD dwStyle, int x, int y, int w, int h, + HWND hwndParent=0, HMENU hMenu=0/*, LPVOID lpParam=0*/); + + static HWND Create(CREATORFUNC_INFO creator, const void* info, + DWORD dwExStyle, LPCTSTR lpClassName, LPCTSTR lpWindowName, + DWORD dwStyle, int x, int y, int w, int h, + HWND hwndParent=0, HMENU hMenu=0/*, LPVOID lpParam=0*/); + + static LRESULT CALLBACK WindowWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam); + static INT_PTR CALLBACK DialogProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam); + + static Window* get_window(HWND hwnd); +#ifndef _MSC_VER + template static CLASS* get_window(HWND hwnd) {return static_cast(get_window(hwnd));} +#define GET_WINDOW(CLASS, hwnd) Window::get_window(hwnd) +#endif + + static void register_pretranslate(HWND hwnd); + static void unregister_pretranslate(HWND hwnd); + static BOOL pretranslate_msg(LPMSG pmsg); + + static void register_dialog(HWND hwnd); + static void unregister_dialog(HWND hwnd); + static BOOL dispatch_dialog_msg(LPMSG pmsg); + + static int MessageLoop(); + + + LRESULT SendParent(UINT nmsg, WPARAM wparam=0, LPARAM lparam=0); + LRESULT PostParent(UINT nmsg, WPARAM wparam=0, LPARAM lparam=0); + + static void CancelModes(HWND hwnd=0); + + +protected: + virtual LRESULT Init(LPCREATESTRUCT pcs); // WM_CREATE processing + virtual LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam); + virtual int Command(int id, int code); // WM_COMMAND processing + virtual int Notify(int id, NMHDR* pnmh); // WM_NOTIFY processing + + static Window* create_controller(HWND hwnd); + + + static WindowMap s_wnd_map; + + static const void* s_new_info; + static CREATORFUNC s_window_creator; + + + /// structure for managing critical sections as static class information in struct Window + struct StaticWindowData { + CritSect _map_crit_sect; + CritSect _create_crit_sect; + }; + + static StaticWindowData& GetStaticWindowData(); + + + static WindowSet s_pretranslate_windows; + static WindowSet s_dialogs; +}; + +#ifdef UNICODE +#define NFR_CURRENT NFR_UNICODE +#else +#define NFR_CURRENT NFR_ANSI +#endif + + +#ifdef _MSC_VER +template struct GetWindowHelper +{ + static CLASS* get_window(HWND hwnd) { + return static_cast(Window::get_window(hwnd)); + } +}; +#define GET_WINDOW(CLASS, hwnd) GetWindowHelper::get_window(hwnd) +#endif + + + /// dynamic casting of Window pointers +template struct TypeCheck +{ + static CLASS* dyn_cast(Window* wnd) + {return dynamic_cast(wnd);} +}; + +#define WINDOW_DYNAMIC_CAST(CLASS, hwnd) \ + TypeCheck::dyn_cast(Window::get_window(hwnd)) + + + /** + SubclassedWindow is used to wrap already existing window handles + into C++ Window objects. To construct a object, use the "new" operator + to put it in the heap. It is automatically freed, when the window + gets destroyed. + */ +struct SubclassedWindow : public Window +{ + typedef Window super; + + SubclassedWindow(HWND); + +protected: + WNDPROC _orgWndProc; + + static LRESULT CALLBACK SubclassedWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam); + + virtual LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam); + virtual int Command(int id, int code); + virtual int Notify(int id, NMHDR* pnmh); +}; + + + /// template class used in macro WINDOW_CREATOR to define the creater functions for Window objects +template struct WindowCreator +{ + static WND_CLASS* window_creator(HWND hwnd) + { + return new WND_CLASS(hwnd); + } +}; + +#define WINDOW_CREATOR(WND_CLASS) \ + ((Window::CREATORFUNC) WindowCreator::window_creator) + + + /// template class used in macro WINDOW_CREATOR_INFO to the define creater functions for Window objects with additional creation information +template struct WindowCreatorInfo +{ + static WND_CLASS* window_creator(HWND hwnd, const void* info) + { + return new WND_CLASS(hwnd, *static_cast(info)); + } +}; + +#define WINDOW_CREATOR_INFO(WND_CLASS, INFO_CLASS) \ + ((Window::CREATORFUNC_INFO) WindowCreatorInfo::window_creator) + + + /** + WindowClass is a neat wrapper for RegisterClassEx(). + Just construct a WindowClass object, override the attributes you want + to change, then call Register() or simply request the ATOM value to + register the window class. You don't have to worry calling Register() + more than once. It checks if, the class has already been registered. + */ +struct WindowClass : public WNDCLASSEX +{ + WindowClass(LPCTSTR classname, UINT style=0, WNDPROC wndproc=Window::WindowWndProc); + + ATOM Register() + { + if (!_atomClass) + _atomClass = RegisterClassEx(this); + + return _atomClass; + } + + operator ATOM() {return Register();} + + // return LPCTSTR for the CreateWindowEx() parameter + operator LPCTSTR() {return (LPCTSTR)(int)Register();} + +protected: + ATOM _atomClass; +}; + + /// window class with gray background color +struct BtnWindowClass : public WindowClass +{ + BtnWindowClass(LPCTSTR classname, UINT style=0, WNDPROC wndproc=Window::WindowWndProc) + : WindowClass(classname, style, wndproc) + { + hbrBackground = (HBRUSH)(COLOR_BTNFACE+1); + } +}; + + /// window class with specified icon from resources +struct IconWindowClass : public WindowClass +{ + IconWindowClass(LPCTSTR classname, UINT nid, UINT style=0, WNDPROC wndproc=Window::WindowWndProc); +}; + + + // private message constants +#define PM_DISPATCH_COMMAND (WM_APP+0x00) +#define PM_TRANSLATE_MSG (WM_APP+0x01) + + +#define SPLIT_WIDTH 5 +#define DEFAULT_SPLIT_POS 300 +#define COLOR_SPLITBAR LTGRAY_BRUSH + + + /// menu info structure +struct MenuInfo +{ + HMENU _hMenuView; +}; + +#define PM_FRM_GET_MENUINFO (WM_APP+0x02) + +#define Frame_GetMenuInfo(hwnd) ((MenuInfo*)SNDMSG(hwnd, PM_FRM_GET_MENUINFO, 0, 0)) + + + /** + Class ChildWindow is used with class MainFrame. + */ +struct ChildWindow : public Window +{ + typedef Window super; + + ChildWindow(HWND hwnd, HWND hwndFrame); + + static ChildWindow* create(const ChildWndInfo& info, CREATORFUNC_INFO creator, + LPCTSTR classname, LPCTSTR title=NULL, DWORD style=0); + + bool go_to(LPCTSTR url); + +protected: + LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam); + + virtual String jump_to_int(LPCTSTR url) = 0; + +protected: + MenuInfo*_menu_info; + + HWND _hwndFrame; + String _statusText; + String _url; + + stack _url_history; + + void set_url(LPCTSTR url); +}; + +#define PM_SETSTATUSTEXT (WM_APP+0x1E) + + + /** + PreTranslateWindow is used to register windows to be called by Window::pretranslate_msg(). + This way you get PM_TRANSLATE_MSG messages before the message loop dispatches messages. + You can then for example use TranslateAccelerator() to implement key shortcuts. + */ +struct PreTranslateWindow : public Window +{ + typedef Window super; + + PreTranslateWindow(HWND); + ~PreTranslateWindow(); +}; + + + /** + The class DialogWindow implements modeless dialogs, which are managed by + Window::dispatch_dialog_msg() in Window::MessageLoop(). + A DialogWindow object should be constructed by calling Window::Create() + and specifying the class using the WINDOW_CREATOR() macro. + */ +struct DialogWindow : public Window +{ + typedef Window super; + + DialogWindow(HWND hwnd) + : super(hwnd) + { + register_dialog(hwnd); + } + + ~DialogWindow() + { + unregister_dialog(_hwnd); + } +}; + + + /** + The class Dialog implements modal dialogs. + A Dialog object should be constructed by calling Dialog::DoModal() + and specifying the class using the WINDOW_CREATOR() macro. + */ +struct Dialog : public Window +{ + typedef Window super; + + Dialog(HWND); + ~Dialog(); + + static int DoModal(UINT nid, CREATORFUNC creator, HWND hwndParent=0); + static int DoModal(UINT nid, CREATORFUNC_INFO creator, const void* info, HWND hwndParent=0); + +protected: + LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam); + int Command(int id, int code); +}; + + +#define PM_FRM_CALC_CLIENT (WM_APP+0x03) +#define Frame_CalcFrameClient(hwnd, prt) ((BOOL)SNDMSG(hwnd, PM_FRM_CALC_CLIENT, 0, (LPARAM)(PRECT)prt)) + +#define PM_JUMP_TO_URL (WM_APP+0x25) +#define PM_URL_CHANGED (WM_APP+0x26) + + +struct PropSheetPage : public PROPSHEETPAGE +{ + PropSheetPage(UINT nid, Window::CREATORFUNC dlg_creator); + + void init(struct PropertySheetDialog*); + +protected: + friend struct PropSheetPageDlg; + + Window::CREATORFUNC _dlg_creator; +}; + + + /// Property Sheet dialog +struct PropertySheetDialog : public PROPSHEETHEADER +{ + PropertySheetDialog(HWND owner); + + void add(PropSheetPage& psp); + int DoModal(int start_page=0); + + HWND GetCurrentPage(); + +protected: + typedef vector Vector; + Vector _pages; + HWND _hwnd; +}; + + + /// Property Sheet Page (inner dialog) +struct PropSheetPageDlg : public Dialog +{ + typedef Dialog super; + + PropSheetPageDlg(HWND); + +protected: + friend struct PropertySheetDialog; + friend struct PropSheetPage; + + static INT_PTR CALLBACK DialogProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam); + + int Command(int id, int code); +}; + + +/* + /// Property Sheet Dialog (outer dialog) +struct PropertySheetDlg : public SubclassedWindow +{ + typedef SubclassedWindow super; + + PropertySheetDlg(HWND hwnd) : super(hwnd) {} +}; +*/ + + + // Layouting of resizable windows + + /// Flags to specify how to move and resize controls when resizing their parent window +enum RESIZE_FLAGS { + MOVE_LEFT = 0x1, + MOVE_RIGHT = 0x2, + MOVE_TOP = 0x4, + MOVE_BOTTOM = 0x8, + + MOVE_X = MOVE_LEFT | MOVE_RIGHT, + MOVE_Y = MOVE_TOP | MOVE_BOTTOM, + RESIZE_X= MOVE_RIGHT, + RESIZE_Y= MOVE_BOTTOM, + + MOVE = MOVE_X | MOVE_Y, + RESIZE = RESIZE_X | RESIZE_Y +}; + + /// structure to assign RESIZE_FLAGS to dialogs control +struct ResizeEntry +{ + ResizeEntry(UINT id, int flags) + : _id(id), _flags(flags) {} + + ResizeEntry(HWND hwnd, int flags) + : _id(GetDlgCtrlID(hwnd)), _flags(flags) {} + + UINT _id; + int _flags; +}; + + + /// Management of controls in resizable dialogs +struct ResizeManager : public std::list +{ + typedef std::list super; + + ResizeManager(HWND hwnd); + + void Add(UINT id, int flags) + {push_back(ResizeEntry(id, flags));} + + void Add(HWND hwnd, int flags) + {push_back(ResizeEntry(hwnd, flags));} + + void HandleSize(int cx, int cy); + void Resize(int dx, int dy); + + void SetMinMaxInfo(LPMINMAXINFO lpmmi) + { + lpmmi->ptMinTrackSize.x = _min_wnd_size.cx; + lpmmi->ptMinTrackSize.y = _min_wnd_size.cy; + } + + SIZE _min_wnd_size; + +protected: + HWND _hwnd; + SIZE _last_size; +}; + + + /// Controller base template class for resizable dialogs +template struct ResizeController : public BASE +{ + typedef BASE super; + + ResizeController(HWND hwnd) + : super(hwnd), + _resize_mgr(hwnd) + { + } + + LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam) + { + switch(nmsg) { + case PM_FRM_CALC_CLIENT: + GetClientSpace((PRECT)lparam); + return TRUE; + + case WM_SIZE: + if (wparam != SIZE_MINIMIZED) + _resize_mgr.HandleSize(LOWORD(lparam), HIWORD(lparam)); + goto def; + + case WM_GETMINMAXINFO: + _resize_mgr.SetMinMaxInfo((LPMINMAXINFO)lparam); + goto def; + + default: def: + return super::WndProc(nmsg, wparam, lparam); + } + } + + virtual void GetClientSpace(PRECT prect) + { + if (!IsIconic(this->_hwnd)) { + GetClientRect(this->_hwnd, prect); + } else { + WINDOWPLACEMENT wp; + GetWindowPlacement(this->_hwnd, &wp); + prect->left = prect->top = 0; + prect->right = wp.rcNormalPosition.right-wp.rcNormalPosition.left- + 2*(GetSystemMetrics(SM_CXSIZEFRAME)+GetSystemMetrics(SM_CXEDGE)); + prect->bottom = wp.rcNormalPosition.bottom-wp.rcNormalPosition.top- + 2*(GetSystemMetrics(SM_CYSIZEFRAME)+GetSystemMetrics(SM_CYEDGE))- + GetSystemMetrics(SM_CYCAPTION)-GetSystemMetrics(SM_CYMENUSIZE); + } + } + +protected: + ResizeManager _resize_mgr; +}; + + + /** + This class constructs button controls. + The button will remain existent when the C++ Button object is destroyed. + There is no conjunction between C++ object and windows control life time. + */ +struct Button : public WindowHandle +{ + Button(HWND parent, LPCTSTR text, int left, int top, int width, int height, + int id, DWORD flags=WS_VISIBLE|WS_CHILD|BS_PUSHBUTTON, DWORD exStyle=0); +}; + + + /** + This class constructs static controls. + The control will remain existent when the C++ object is destroyed. + There is no conjunction between C++ object and windows control life time. + */ +struct Static : public WindowHandle +{ + Static(HWND parent, LPCTSTR text, int left, int top, int width, int height, + int id, DWORD flags=WS_VISIBLE|WS_CHILD|SS_SIMPLE, DWORD ex_flags=0); +}; + + + // control color message routing for ColorStatic and HyperlinkCtrl + +#define PM_DISPATCH_CTLCOLOR (WM_APP+0x08) + +template struct CtlColorParent : public BASE +{ + typedef BASE super; + + CtlColorParent(HWND hwnd) + : super(hwnd) {} + + LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam) + { + switch(nmsg) { + case WM_CTLCOLOR: + case WM_CTLCOLORBTN: + case WM_CTLCOLORDLG: + case WM_CTLCOLORSCROLLBAR: + case WM_CTLCOLORSTATIC: { + HWND hctl = (HWND) lparam; + return SendMessage(hctl, PM_DISPATCH_CTLCOLOR, wparam, nmsg); + } + + default: + return super::WndProc(nmsg, wparam, lparam); + } + } +}; + + +#define PM_DISPATCH_DRAWITEM (WM_APP+0x09) + + /// draw message routing for ColorButton and PictureButton +template struct OwnerDrawParent : public BASE +{ + typedef BASE super; + + OwnerDrawParent(HWND hwnd) + : super(hwnd) {} + + LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam) + { + switch(nmsg) { + case WM_DRAWITEM: + if (wparam) { // should there be drawn a control? + HWND hctl = GetDlgItem(this->_hwnd, wparam); + + if (hctl) + return SendMessage(hctl, PM_DISPATCH_DRAWITEM, wparam, lparam); + } /*else // or is it a menu entry? + ; */ + + return 0; + + default: + return super::WndProc(nmsg, wparam, lparam); + } + } +}; + + + /** + Subclass button controls to draw them by using PM_DISPATCH_DRAWITEM + The owning window should use the OwnerDrawParent template to route owner draw messages to the buttons. + */ +struct OwnerdrawnButton : public SubclassedWindow +{ + typedef SubclassedWindow super; + + OwnerdrawnButton(HWND hwnd) + : super(hwnd) {} + +protected: + LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam); + + virtual void DrawItem(LPDRAWITEMSTRUCT dis) = 0; +}; + +extern void DrawGrayText(HDC hdc, LPRECT pRect, LPCTSTR text, int dt_flags); + + + /** + Subclass button controls to paint colored text labels. + The owning window should use the OwnerDrawParent template to route owner draw messages to the buttons. + */ +/* not yet used +struct ColorButton : public OwnerdrawnButton +{ + typedef OwnerdrawnButton super; + + ColorButton(HWND hwnd, COLORREF textColor) + : super(hwnd), _textColor(textColor) {} + +protected: + virtual void DrawItem(LPDRAWITEMSTRUCT dis); + + COLORREF _textColor; +}; +*/ + + +struct FlatButton : public OwnerdrawnButton +{ + typedef OwnerdrawnButton super; + + FlatButton(HWND hwnd) + : super(hwnd), _active(false) {} + + FlatButton(HWND owner, int id) + : super(GetDlgItem(owner, IDOK)), _active(false) {} + +protected: + LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam); + virtual void DrawItem(LPDRAWITEMSTRUCT dis); + + COLORREF _textColor; + COLORREF _activeColor; + bool _active; +}; + + + /** + Subclass button controls to paint pictures left to the labels. + The buttons should have set the style bit BS_OWNERDRAW. + The owning window should use the OwnerDrawParent template to route owner draw messages to the buttons. + */ +struct PictureButton : public OwnerdrawnButton +{ + typedef OwnerdrawnButton super; + + PictureButton(HWND hwnd, HICON hIcon, HBRUSH hbrush=GetSysColorBrush(COLOR_BTNFACE), bool flat=false) + : super(hwnd), _hIcon(hIcon), _hBmp(0), _hBrush(hbrush), _flat(flat) + { + _cx = 16; + _cy = 16; + } + + PictureButton(HWND hparent, int id, HICON hIcon, HBRUSH hbrush=GetSysColorBrush(COLOR_BTNFACE), bool flat=false) + : super(GetDlgItem(hparent, id)), _hIcon(hIcon), _hBmp(0), _hBrush(hbrush), _flat(flat) + { + _cx = 16; + _cy = 16; + } + + PictureButton(HWND hwnd, HBITMAP hBmp, HBRUSH hbrush=GetSysColorBrush(COLOR_BTNFACE), bool flat=false) + : super(hwnd), _hIcon(0), _hBmp(hBmp), _hBrush(hbrush), _flat(flat) + { + BITMAP bmp; + GetObject(hBmp, sizeof(bmp), &bmp); + _cx = bmp.bmWidth; + _cy = bmp.bmHeight; + } + + PictureButton(HWND hparent, int id, HBITMAP hBmp, HBRUSH hbrush=GetSysColorBrush(COLOR_BTNFACE), bool flat=false) + : super(GetDlgItem(hparent, id)), _hIcon(0), _hBmp(hBmp), _hBrush(hbrush), _flat(flat) + { + BITMAP bmp; + GetObject(hBmp, sizeof(bmp), &bmp); + _cx = bmp.bmWidth; + _cy = bmp.bmHeight; + } + +protected: + virtual void DrawItem(LPDRAWITEMSTRUCT dis); + + HICON _hIcon; + HBITMAP _hBmp; + HBRUSH _hBrush; + + int _cx; + int _cy; + + bool _flat; +}; + + +struct ColorStatic : public SubclassedWindow +{ + typedef SubclassedWindow super; + + ColorStatic(HWND hwnd, COLORREF textColor=RGB(255,0,0), HBRUSH hbrush_bkgnd=0, HFONT hfont=0) + : super(hwnd), + _textColor(textColor), + _hbrush_bkgnd(hbrush_bkgnd), + _hfont(hfont) + { + } + + ColorStatic(HWND owner, int id, COLORREF textColor=RGB(255,0,0), HBRUSH hbrush_bkgnd=0, HFONT hfont=0) + : super(GetDlgItem(owner, id)), + _textColor(textColor), + _hbrush_bkgnd(hbrush_bkgnd), + _hfont(hfont) + { + } + +protected: + LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam) + { + if (nmsg == PM_DISPATCH_CTLCOLOR) { + HDC hdc = (HDC) wparam; + + SetTextColor(hdc, _textColor); + + if (_hfont) + SelectFont(hdc, _hfont); + + if (_hbrush_bkgnd) + return (LRESULT)_hbrush_bkgnd; + else { + SetBkMode(hdc, TRANSPARENT); + return (LRESULT)GetStockBrush(HOLLOW_BRUSH); + } + } else + return super::WndProc(nmsg, wparam, lparam); + } + + COLORREF _textColor; + HBRUSH _hbrush_bkgnd; + HFONT _hfont; +}; + + + /// Hyperlink Controls + +struct HyperlinkCtrl : public SubclassedWindow +{ + typedef SubclassedWindow super; + + HyperlinkCtrl(HWND hwnd, COLORREF colorLink=RGB(0,0,255), COLORREF colorVisited=RGB(128,0,128)); + HyperlinkCtrl(HWND owner, int id, COLORREF colorLink=RGB(0,0,255), COLORREF colorVisited=RGB(128,0,128)); + + ~HyperlinkCtrl(); + + String _cmd; + +protected: + COLORREF _textColor; + COLORREF _colorVisited; + HFONT _hfont; + HCURSOR _crsr_link; + + LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam); + + void init(); + + bool LaunchLink() + { + if (!_cmd.empty()) { + HINSTANCE hinst = ShellExecute(GetParent(_hwnd), _T("open"), _cmd, 0, 0, SW_SHOWNORMAL); + return (int)hinst > HINSTANCE_ERROR; + } + + return true; + } +}; + + + /// encapsulation of tool tip controls +struct ToolTip : public WindowHandle +{ + typedef WindowHandle super; + + ToolTip(HWND owner); + + void activate(BOOL active=TRUE) + { + SendMessage(_hwnd, TTM_ACTIVATE, active, 0); + } + + void add(HWND hparent, HWND htool, LPCTSTR txt=LPSTR_TEXTCALLBACK, LPARAM lparam=0) + { + TOOLINFO ti = { + sizeof(TOOLINFO), TTF_SUBCLASS|TTF_IDISHWND|TTF_TRANSPARENT, hparent, (UINT)htool, + {0,0,0,0}, 0, (LPTSTR)txt, lparam + }; + +#ifdef UNICODE ///@todo Why is it neccesary to try both TTM_ADDTOOLW and TTM_ADDTOOLW ?! + if (!SendMessage(_hwnd, TTM_ADDTOOLW, 0, (LPARAM)&ti)) + SendMessage(_hwnd, TTM_ADDTOOLA, 0, (LPARAM)&ti); +#else + if (!SendMessage(_hwnd, TTM_ADDTOOLA, 0, (LPARAM)&ti)) + SendMessage(_hwnd, TTM_ADDTOOLW, 0, (LPARAM)&ti); +#endif + } + + void add(HWND hparent, UINT id, const RECT& rect, LPCTSTR txt=LPSTR_TEXTCALLBACK, LPARAM lparam=0) + { + TOOLINFO ti = { + sizeof(TOOLINFO), TTF_SUBCLASS|TTF_TRANSPARENT, hparent, id, + {rect.left,rect.top,rect.right,rect.bottom}, 0, (LPTSTR)txt, lparam + }; + +#ifdef UNICODE + if (!SendMessage(_hwnd, TTM_ADDTOOLW, 0, (LPARAM)&ti)) + SendMessage(_hwnd, TTM_ADDTOOLA, 0, (LPARAM)&ti); +#else + if (!SendMessage(_hwnd, TTM_ADDTOOLA, 0, (LPARAM)&ti)) + SendMessage(_hwnd, TTM_ADDTOOLW, 0, (LPARAM)&ti); +#endif + } + + void remove(HWND hparent, HWND htool) + { + TOOLINFO ti = { + sizeof(TOOLINFO), TTF_IDISHWND, hparent, (UINT)htool, + {0,0,0,0}, 0, 0, 0 + }; + + SendMessage(_hwnd, TTM_DELTOOL, 0, (LPARAM)&ti); + } + + void remove(HWND hparent, UINT id) + { + TOOLINFO ti = { + sizeof(TOOLINFO), 0, hparent, id, + {0,0,0,0}, 0, 0, 0 + }; + + SendMessage(_hwnd, TTM_DELTOOL, 0, (LPARAM)&ti); + } +}; + + +inline int ListView_GetItemData(HWND list_ctrl, int idx) +{ + LV_ITEM item; + + item.mask = LVIF_PARAM; + item.iItem = idx; + + if (!ListView_GetItem(list_ctrl, &item)) + return 0; + + return item.lParam; +} + +inline int ListView_FindItemPara(HWND list_ctrl, LPARAM param) +{ + LVFINDINFO fi; + + fi.flags = LVFI_PARAM; + fi.lParam = param; + + return ListView_FindItem(list_ctrl, (unsigned)-1, &fi); +} + +inline int ListView_GetFocusedItem(HWND list_ctrl) +{ + int idx = ListView_GetItemCount(list_ctrl); + + while(--idx >= 0) + if (ListView_GetItemState(list_ctrl, idx, LVIS_FOCUSED)) + break; + + return idx; +} + + + /// sorting of list controls +struct ListSort : public WindowHandle +{ + ListSort(HWND hwndListview, PFNLVCOMPARE compare_fct); + + void toggle_sort(int idx); + void sort(); + + int _sort_crit; + bool _direction; + +protected: + PFNLVCOMPARE _compare_fct; + + static int CALLBACK CompareFunc(LPARAM lparam1, LPARAM lparam2, LPARAM lparamSort); +}; + + +inline LPARAM TreeView_GetItemData(HWND hwndTreeView, HTREEITEM hItem) +{ + TVITEM tvItem; + + tvItem.mask = TVIF_PARAM; + tvItem.hItem = hItem; + + if (!TreeView_GetItem(hwndTreeView, &tvItem)) + return 0; + + return tvItem.lParam; +} + + +enum {TRAYBUTTON_LEFT=0, TRAYBUTTON_RIGHT, TRAYBUTTON_MIDDLE}; + +#define PM_TRAYICON (WM_APP+0x20) + +#define WINMSG_TASKBARCREATED TEXT("TaskbarCreated") + + +struct TrayIcon +{ + TrayIcon(HWND hparent, UINT id) + : _hparent(hparent), _id(id) {} + + ~TrayIcon() + {Remove();} + + void Add(HICON hIcon, LPCTSTR tooltip=NULL) + {Set(NIM_ADD, _id, hIcon, tooltip);} + + void Modify(HICON hIcon, LPCTSTR tooltip=NULL) + {Set(NIM_MODIFY, _id, hIcon, tooltip);} + + void Remove() + { + NOTIFYICONDATA nid = { + sizeof(NOTIFYICONDATA), // cbSize + _hparent, // hWnd + _id, // uID + }; + + Shell_NotifyIcon(NIM_DELETE, &nid); + } + +protected: + HWND _hparent; + UINT _id; + + void Set(DWORD dwMessage, UINT id, HICON hIcon, LPCTSTR tooltip=NULL) + { + NOTIFYICONDATA nid = { + sizeof(NOTIFYICONDATA), // cbSize + _hparent, // hWnd + id, // uID + NIF_MESSAGE|NIF_ICON, // uFlags + PM_TRAYICON, // uCallbackMessage + hIcon // hIcon + }; + + if (tooltip) + lstrcpyn(nid.szTip, tooltip, COUNTOF(nid.szTip)); + + if (nid.szTip[0]) + nid.uFlags |= NIF_TIP; + + Shell_NotifyIcon(dwMessage, &nid); + } +}; + + +template struct TrayIconControllerTemplate : public BASE +{ + typedef BASE super; + + TrayIconControllerTemplate(HWND hwnd) : BASE(hwnd), + WM_TASKBARCREATED(RegisterWindowMessage(WINMSG_TASKBARCREATED)) + { + } + + LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam) + { + if (nmsg == PM_TRAYICON) { + switch(lparam) { + case WM_MOUSEMOVE: + TrayMouseOver(wparam); + break; + + case WM_LBUTTONDOWN: + TrayClick(wparam, TRAYBUTTON_LEFT); + break; + + case WM_LBUTTONDBLCLK: + TrayDblClick(wparam, TRAYBUTTON_LEFT); + break; + + case WM_RBUTTONDOWN: + TrayClick(wparam, TRAYBUTTON_RIGHT); + break; + + case WM_RBUTTONDBLCLK: + TrayDblClick(wparam, TRAYBUTTON_RIGHT); + break; + + case WM_MBUTTONDOWN: + TrayClick(wparam, TRAYBUTTON_MIDDLE); + break; + + case WM_MBUTTONDBLCLK: + TrayDblClick(wparam, TRAYBUTTON_MIDDLE); + break; + } + + return 0; + } else if (nmsg == WM_TASKBARCREATED) { + AddTrayIcons(); + return 0; + } else + return super::WndProc(nmsg, wparam, lparam); + } + + virtual void AddTrayIcons() = 0; + virtual void TrayMouseOver(UINT id) {} + virtual void TrayClick(UINT id, int btn) {} + virtual void TrayDblClick(UINT id, int btn) {} + +protected: + const UINT WM_TASKBARCREATED; +}; + + +struct EditController : public SubclassedWindow +{ + typedef SubclassedWindow super; + + EditController(HWND hwnd) + : super(hwnd) + { + } + +protected: + LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam) + { + if (nmsg==WM_KEYDOWN && wparam==VK_RETURN) { + SendParent(WM_COMMAND, MAKEWPARAM(GetDlgCtrlID(_hwnd),1), (LPARAM)_hwnd); + return 0; + } else + return super::WndProc(nmsg, wparam, lparam); + } +}; diff --git a/reactos/subsys/system/ibrowser/utility/xmlstorage.cpp b/reactos/subsys/system/ibrowser/utility/xmlstorage.cpp new file mode 100644 index 00000000000..51019f3ebab --- /dev/null +++ b/reactos/subsys/system/ibrowser/utility/xmlstorage.cpp @@ -0,0 +1,612 @@ + + // + // XML storage classes + // + // xmlstorage.cpp + // + // Copyright (c) 2004, Martin Fuchs + // + + +/* + + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +//#include "xmlstorage.h" +#include "precomp.h" + + + // work around GCC's wide string constant bug +#ifdef __GNUC__ +const LPCXSSTR XMLStorage::XS_TRUE = XS_TEXT("true"); +const LPCXSSTR XMLStorage::XS_FALSE = XS_TEXT("false"); +const LPCXSSTR XMLStorage::XS_NUMBERFMT = XS_TEXT("%d"); +#endif + + +namespace XMLStorage { + + +static std::string unescape(const char* s, char b='"', char e='"') +{ + const char* end = s + strlen(s); + +// if (*s == b) +// ++s; +// +// if (end>s && end[-1]==e) +// --end; + + if (*s == b) + if (end>s && end[-1]==e) + ++s, --end; + + return std::string(s, end-s); +} + +static std::string unescape(const char* s, int l, char b='"', char e='"') +{ + const char* end = s + l; + +// if (*s == b) +// ++s; +// +// if (end>s && end[-1]==e) +// --end; + + if (*s == b) + if (end>s && end[-1]==e) + ++s, --end; + + return std::string(s, end-s); +} + + + /// move XPath like to position in XML tree +bool XMLPos::go(const char* path) +{ + XMLNode* node = _cur; + + // Is this an absolute path? + if (*path == '/') { + node = _root; + ++path; + } + + node = node->find_relative(path); + + if (node) { + go_to(node); + return true; + } else + return false; +} + + /// move XPath like to position in XML tree +bool const_XMLPos::go(const char* path) +{ + const XMLNode* node = _cur; + + // Is this an absolute path? + if (*path == '/') { + node = _root; + ++path; + } + + node = node->find_relative(path); + + if (node) { + go_to(node); + return true; + } else + return false; +} + + +const XMLNode* XMLNode::find_relative(const char* path) const +{ + const XMLNode* node = this; + + // parse relative path + while(*path) { + const char* slash = strchr(path, '/'); + if (slash == path) + return NULL; + + int l = slash? slash-path: strlen(path); + std::string comp(path, l); + path += l; + + // look for [n] and [@attr_name="attr_value"] expressions in path components + const char* bracket = strchr(comp.c_str(), '['); + l = bracket? bracket-comp.c_str(): comp.length(); + std::string child_name(comp.c_str(), l); + std::string attr_name, attr_value; + + int n = 0; + if (bracket) { + std::string expr = unescape(bracket, '[', ']'); + const char* p = expr.c_str(); + + n = atoi(p); // read index number + + if (n) + n = n - 1; // convert into zero based index + + const char* at = strchr(p, '@'); + + if (at) { + p = at + 1; + const char* equal = strchr(p, '='); + + // read attribute name and value + if (equal) { + attr_name = unescape(p, equal-p); + attr_value = unescape(equal+1); + } + } + } + + if (attr_name.empty()) + // search n.th child node with specified name + node = node->find(child_name, n); + else + // search n.th child node with specified name and matching attribute value + node = node->find(child_name, attr_name, attr_value, n); + + if (!node) + return NULL; + + if (*path == '/') + ++path; + } + + return node; +} + +XMLNode* XMLNode::create_relative(const char* path) +{ + XMLNode* node = this; + + // parse relative path + while(*path) { + const char* slash = strchr(path, '/'); + if (slash == path) + return NULL; + + int l = slash? slash-path: strlen(path); + std::string comp(path, l); + path += l; + + // look for [n] and [@attr_name="attr_value"] expressions in path components + const char* bracket = strchr(comp.c_str(), '['); + l = bracket? bracket-comp.c_str(): comp.length(); + std::string child_name(comp.c_str(), l); + std::string attr_name, attr_value; + + int n = 0; + if (bracket) { + std::string expr = unescape(bracket, '[', ']'); + const char* p = expr.c_str(); + + n = atoi(p); // read index number + + if (n) + n = n - 1; // convert into zero based index + + const char* at = strchr(p, '@'); + + if (at) { + p = at + 1; + const char* equal = strchr(p, '='); + + // read attribute name and value + if (equal) { + attr_name = unescape(p, equal-p); + attr_value = unescape(equal+1); + } + } + } + + XMLNode* child; + + if (attr_name.empty()) + // search n.th child node with specified name + child = node->find(child_name, n); + else + // search n.th child node with specified name and matching attribute value + child = node->find(child_name, attr_name, attr_value, n); + + if (!child) { + child = new XMLNode(child_name); + node->add_child(child); + + if (!attr_name.empty()) + (*node)[attr_name] = attr_value; + } + + node = child; + + if (*path == '/') + ++path; + } + + return node; +} + + + /// read XML stream into XML tree below _pos +XML_Status XMLReaderBase::read() +{ + XML_Status status = XML_STATUS_OK; + + while(status == XML_STATUS_OK) { + char* buffer = (char*) XML_GetBuffer(_parser, BUFFER_LEN); + + int l = read_buffer(buffer, BUFFER_LEN); + if (l < 0) + break; + + status = XML_ParseBuffer(_parser, l, false); + } + + if (status != XML_STATUS_ERROR) + status = XML_ParseBuffer(_parser, 0, true); + + if (_pos->_children.empty()) + _pos->_trailing.append(_content); + else + _pos->_children.back()->_trailing.append(_content); + + _content.erase(); + + return status; +} + + + /// store XML version and encoding into XML reader +void XMLCALL XMLReaderBase::XML_XmlDeclHandler(void* userData, const XML_Char* version, const XML_Char* encoding, int standalone) +{ + XMLReaderBase* pReader = (XMLReaderBase*) userData; + + if (version) + pReader->_xml_version = version; + + if (encoding) + pReader->_encoding = encoding; +} + + /// notifications about XML start tag +void XMLCALL XMLReaderBase::XML_StartElementHandler(void* userData, const XML_Char* name, const XML_Char** atts) +{ + XMLReaderBase* pReader = (XMLReaderBase*) userData; + XMLPos& pos = pReader->_pos; + + // search for end of first line + const char* s = pReader->_content.c_str(); + const char* p = s; + const char* e = p + pReader->_content.length(); + + for(; p_children.empty()) { // no children in last node? + if (pReader->_last_tag == TAG_START) + pos->_content.append(s, p-s); + else if (pReader->_last_tag == TAG_END) + pos->_trailing.append(s, p-s); + // else TAG_NONE -> don't store white space in root node + } else + pos->_children.back()->_trailing.append(s, p-s); + + std::string leading; + + if (p != e) + leading.assign(p, e-p); + + XMLNode* node = new XMLNode(String_from_XML_Char(name), leading); + + pos.add_down(node); + + while(*atts) { + const XML_Char* attr_name = *atts++; + const XML_Char* attr_value = *atts++; + + (*node)[String_from_XML_Char(attr_name)] = String_from_XML_Char(attr_value); + } + + pReader->_last_tag = TAG_START; + pReader->_content.erase(); +} + + /// notifications about XML end tag +void XMLCALL XMLReaderBase::XML_EndElementHandler(void* userData, const XML_Char* name) +{ + XMLReaderBase* pReader = (XMLReaderBase*) userData; + XMLPos& pos = pReader->_pos; + + // search for end of first line + const char* s = pReader->_content.c_str(); + const char* p = s; + const char* e = p + pReader->_content.length(); + + for(; p_children.empty()) // no children in current node? + pos->_content.append(s, p-s); + else + if (pReader->_last_tag == TAG_START) + pos->_content.append(s, p-s); + else + pos->_children.back()->_trailing.append(s, p-s); + + if (p != e) + pos->_end_leading.assign(p, e-p); + + pos.back(); + + pReader->_last_tag = TAG_END; + pReader->_content.erase(); +} + + /// store content, white space and comments +void XMLCALL XMLReaderBase::XML_DefaultHandler(void* userData, const XML_Char* s, int len) +{ + XMLReaderBase* pReader = (XMLReaderBase*) userData; + + pReader->_content.append(s, len); +} + + +std::string XMLReaderBase::get_error_string() const +{ + XML_Error error = XML_GetErrorCode(_parser); + + switch(error) { + case XML_ERROR_NONE: return "XML_ERROR_NONE"; + case XML_ERROR_NO_MEMORY: return "XML_ERROR_NO_MEMORY"; + case XML_ERROR_SYNTAX: return "XML_ERROR_SYNTAX"; + case XML_ERROR_NO_ELEMENTS: return "XML_ERROR_NO_ELEMENTS"; + case XML_ERROR_INVALID_TOKEN: return "XML_ERROR_INVALID_TOKEN"; + case XML_ERROR_UNCLOSED_TOKEN: return "XML_ERROR_UNCLOSED_TOKEN"; + case XML_ERROR_PARTIAL_CHAR: return "XML_ERROR_PARTIAL_CHAR"; + case XML_ERROR_TAG_MISMATCH: return "XML_ERROR_TAG_MISMATCH"; + case XML_ERROR_DUPLICATE_ATTRIBUTE: return "XML_ERROR_DUPLICATE_ATTRIBUTE"; + case XML_ERROR_JUNK_AFTER_DOC_ELEMENT: return "XML_ERROR_JUNK_AFTER_DOC_ELEMENT"; + case XML_ERROR_PARAM_ENTITY_REF: return "XML_ERROR_PARAM_ENTITY_REF"; + case XML_ERROR_UNDEFINED_ENTITY: return "XML_ERROR_UNDEFINED_ENTITY"; + case XML_ERROR_RECURSIVE_ENTITY_REF: return "XML_ERROR_RECURSIVE_ENTITY_REF"; + case XML_ERROR_ASYNC_ENTITY: return "XML_ERROR_ASYNC_ENTITY"; + case XML_ERROR_BAD_CHAR_REF: return "XML_ERROR_BAD_CHAR_REF"; + case XML_ERROR_BINARY_ENTITY_REF: return "XML_ERROR_BINARY_ENTITY_REF"; + case XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF: return "XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF"; + case XML_ERROR_MISPLACED_XML_PI: return "XML_ERROR_MISPLACED_XML_PI"; + case XML_ERROR_UNKNOWN_ENCODING: return "XML_ERROR_UNKNOWN_ENCODING"; + case XML_ERROR_INCORRECT_ENCODING: return "XML_ERROR_INCORRECT_ENCODING"; + case XML_ERROR_UNCLOSED_CDATA_SECTION: return "XML_ERROR_UNCLOSED_CDATA_SECTION"; + case XML_ERROR_EXTERNAL_ENTITY_HANDLING: return "XML_ERROR_EXTERNAL_ENTITY_HANDLING"; + case XML_ERROR_NOT_STANDALONE: return "XML_ERROR_NOT_STANDALONE"; + case XML_ERROR_UNEXPECTED_STATE: return "XML_ERROR_UNEXPECTED_STATE"; + case XML_ERROR_ENTITY_DECLARED_IN_PE: return "XML_ERROR_ENTITY_DECLARED_IN_PE"; + case XML_ERROR_FEATURE_REQUIRES_XML_DTD: return "XML_ERROR_FEATURE_REQUIRES_XML_DTD"; + case XML_ERROR_CANT_CHANGE_FEATURE_ONCE_PARSING: return "XML_ERROR_CANT_CHANGE_FEATURE_ONCE_PARSING"; + case XML_ERROR_UNBOUND_PREFIX: return "XML_ERROR_UNBOUND_PREFIX"; + // EXPAT version >= 1.95.8 +#if XML_MAJOR_VERSION>1 || (XML_MAJOR_VERSION==1 && XML_MINOR_VERSION>95) || (XML_MAJOR_VERSION==1 && XML_MINOR_VERSION==95 && XML_MICRO_VERSION>7) + case XML_ERROR_SUSPENDED: return "XML_ERROR_SUSPENDED"; + case XML_ERROR_NOT_SUSPENDED: return "XML_ERROR_NOT_SUSPENDED"; + case XML_ERROR_ABORTED: return "XML_ERROR_ABORTED"; + case XML_ERROR_FINISHED: return "XML_ERROR_FINISHED"; + case XML_ERROR_SUSPEND_PE: return "XML_ERROR_SUSPEND_PE"; +#endif + } + + std::ostringstream out; + + out << "XML parser error #" << error; + + return out.str(); +} + + +std::string EncodeXMLString(const XS_String& str) +{ + LPCXSSTR s = str.c_str(); + LPXSSTR buffer = (LPXSSTR)alloca(5*sizeof(XS_CHAR)*XS_len(s)); // worst case. "&" + LPXSSTR o = buffer; + + for(LPCXSSTR p=s; *p; ++p) + switch(*p) { + case '&': + *o++ = '&'; *o++ = 'a'; *o++ = 'm'; *o++ = 'p'; *o++ = ';'; + break; + + case '<': + *o++ = '&'; *o++ = 'l'; *o++ = 't'; *o++ = ';'; + break; + + case '>': + *o++ = '&'; *o++ = 'g'; *o++ = 't'; *o++ = ';'; + break; + + case '"': + *o++ = '&'; *o++ = 'q'; *o++ = 'u'; *o++ = 'o'; *o++ = 't'; *o++ = ';'; + break; + + case '\'': + *o++ = '&'; *o++ = 'a'; *o++ = 'p'; *o++ = 'o'; *o++ = 's'; *o++ = ';'; + break; + + default: + *o++ = *p; + } + +#ifdef XS_STRING_UTF8 + return XS_String(buffer, o-buffer); +#else + return get_utf8(buffer, o-buffer); +#endif +} + +XS_String DecodeXMLString(const XS_String& str) +{ + LPCXSSTR s = str.c_str(); + LPXSSTR buffer = (LPXSSTR)alloca(sizeof(XS_CHAR)*XS_len(s)); + LPXSSTR o = buffer; + + for(LPCXSSTR p=s; *p; ++p) + if (*p == '&') { + if (!XS_nicmp(p+1, XS_TEXT("lt;"), 3)) { + *o++ = '<'; + p += 3; + } else if (!XS_nicmp(p+1, XS_TEXT("gt;"), 3)) { + *o++ = '>'; + p += 3; + } else if (!XS_nicmp(p+1, XS_TEXT("amp;"), 4)) { + *o++ = '&'; + p += 4; + } else if (!XS_nicmp(p+1, XS_TEXT("quot;"), 5)) { + *o++ = '"'; + p += 5; + } else if (!XS_nicmp(p+1, XS_TEXT("apos;"), 5)) { + *o++ = '\''; + p += 5; + } else + *o++ = *p; + } else + *o++ = *p; + + return XS_String(buffer, o-buffer); +} + + + /// write node with children tree to output stream using original white space +void XMLNode::write_worker(std::ostream& out, int indent) const +{ + out << _leading << '<' << EncodeXMLString(*this); + + for(AttributeMap::const_iterator it=_attributes.begin(); it!=_attributes.end(); ++it) + out << ' ' << EncodeXMLString(it->first) << "=\"" << EncodeXMLString(it->second) << "\""; + + if (!_children.empty() || !_content.empty()) { + out << '>' << _content; + + for(Children::const_iterator it=_children.begin(); it!=_children.end(); ++it) + (*it)->write_worker(out, indent+1); + + out << _end_leading << "'; + } else + out << "/>"; + + out << _trailing; +} + + + /// pretty print node with children tree to output stream +void XMLNode::pretty_write_worker(std::ostream& out, int indent) const +{ + for(int i=indent; i--; ) + out << XML_INDENT_SPACE; + + out << '<' << EncodeXMLString(*this); + + for(AttributeMap::const_iterator it=_attributes.begin(); it!=_attributes.end(); ++it) + out << ' ' << EncodeXMLString(it->first) << "=\"" << EncodeXMLString(it->second) << "\""; + + if (!_children.empty() || !_content.empty()) { + out << ">\n"; + + for(Children::const_iterator it=_children.begin(); it!=_children.end(); ++it) + (*it)->pretty_write_worker(out, indent+1); + + for(int i=indent; i--; ) + out << XML_INDENT_SPACE; + + out << "\n"; + } else + out << "/>\n"; +} + + + /// write node with children tree to output stream using smart formating +void XMLNode::smart_write_worker(std::ostream& out, int indent) const +{ + if (_leading.empty()) + for(int i=indent; i--; ) + out << XML_INDENT_SPACE; + else + out << _leading; + + out << '<' << EncodeXMLString(*this); + + for(AttributeMap::const_iterator it=_attributes.begin(); it!=_attributes.end(); ++it) + out << ' ' << EncodeXMLString(it->first) << "=\"" << EncodeXMLString(it->second) << "\""; + + if (_children.empty() && _content.empty()) + out << "/>"; + else { + out << '>'; + + if (_content.empty()) + out << '\n'; + else + out << _content; + + Children::const_iterator it = _children.begin(); + + if (it != _children.end()) { + for(; it!=_children.end(); ++it) + (*it)->smart_write_worker(out, indent+1); + + if (_end_leading.empty()) + for(int i=indent; i--; ) + out << XML_INDENT_SPACE; + else + out << _end_leading; + } else + out << _end_leading; + + out << "'; + } + + if (_trailing.empty()) + out << '\n'; + else + out << _trailing; +} + + +} // namespace XMLStorage diff --git a/reactos/subsys/system/ibrowser/utility/xmlstorage.h b/reactos/subsys/system/ibrowser/utility/xmlstorage.h new file mode 100644 index 00000000000..60b5fab1daf --- /dev/null +++ b/reactos/subsys/system/ibrowser/utility/xmlstorage.h @@ -0,0 +1,1722 @@ + + // + // XML storage classes + // + // xmlstorage.h + // + // Copyright (c) 2004, Martin Fuchs + // + + +/* + + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +*/ + +#ifndef _XMLSTORAGE_H + +#include "expat.h" + +#ifdef _MSC_VER +#pragma comment(lib, "libexpat.lib") +#pragma warning(disable: 4786) +#endif + + +#include // for LPCTSTR + +#ifdef UNICODE +#define _UNICODE +#endif + +#include +#include + +#include +#include +#include +#include +#include +#include + + +#ifndef BUFFER_LEN +#define BUFFER_LEN 2048 +#endif + + +namespace XMLStorage { + + +#ifndef XS_String + +#ifdef XS_STRING_UTF8 +#define XS_CHAR char +#define XS_TEXT(x) x +#define LPXSSTR LPSTR +#define LPCXSSTR LPCSTR +#define XS_icmp stricmp +#define XS_nicmp strnicmp +#define XS_toi atoi +#define XS_len strlen +#define XS_sprintf sprintf +#define XS_vsprintf vsprintf +#else +#define XS_CHAR TCHAR +#define XS_TEXT(x) TEXT(x) +#define LPXSSTR LPTSTR +#define LPCXSSTR LPCTSTR +#define XS_icmp _tcsicmp +#define XS_nicmp _tcsnicmp +#define XS_toi _ttoi +#define XS_len _tcslen +#define XS_sprintf _stprintf +#define XS_vsprintf _vstprintf +#endif + +#if defined(_STRING_DEFINED) && !defined(XS_STRING_UTF8) + +#define XS_String String + +#else // _STRING_DEFINED, !XS_STRING_UTF8 + + /// string class for TCHAR strings + +struct XS_String +#if defined(UNICODE) && !defined(XS_STRING_UTF8) + : public std::wstring +#else + : public std::string +#endif +{ +#if defined(UNICODE) && !defined(XS_STRING_UTF8) + typedef std::wstring super; +#else + typedef std::string super; +#endif + + XS_String() {} + + XS_String(LPCXSSTR s) {if (s) super::assign(s);} + XS_String(LPCXSSTR s, int l) : super(s, l) {} + + XS_String(const super& other) : super(other) {} + XS_String(const XS_String& other) : super(other) {} + +#if defined(UNICODE) && !defined(XS_STRING_UTF8) + XS_String(LPCSTR s) {assign(s);} + XS_String(LPCSTR s, int l) {assign(s, l);} + XS_String(const std::string& other) {assign(other.c_str());} + XS_String& operator=(LPCSTR s) {assign(s); return *this;} + void assign(LPCSTR s) {if (s) {int bl=strlen(s); LPWSTR b=(LPWSTR)alloca(sizeof(WCHAR)*bl); super::assign(b, MultiByteToWideChar(CP_ACP, 0, s, bl, b, bl));} else erase();} + void assign(LPCSTR s, int l) {if (s) {int bl=l; LPWSTR b=(LPWSTR)alloca(sizeof(WCHAR)*bl); super::assign(b, MultiByteToWideChar(CP_ACP, 0, s, l, b, bl));} else erase();} +#else + XS_String(LPCWSTR s) {assign(s);} + XS_String(LPCWSTR s, int l) {assign(s, l);} + XS_String(const std::wstring& other) {assign(other.c_str());} + XS_String& operator=(LPCWSTR s) {assign(s); return *this;} +#ifdef XS_STRING_UTF8 + void assign(const XS_String& s) {assign(s.c_str());} + void assign(LPCWSTR s) {if (s) {int bl=wcslen(s); LPSTR b=(LPSTR)alloca(bl); super::assign(b, WideCharToMultiByte(CP_UTF8, 0, s, bl, b, bl, 0, 0));} else erase();} + void assign(LPCWSTR s, int l) {int bl=l; if (s) {LPSTR b=(LPSTR)alloca(bl); super::assign(b, WideCharToMultiByte(CP_UTF8, 0, s, l, b, bl, 0, 0));} else erase();} +#else // if !UNICODE && !XS_STRING_UTF8 + void assign(LPCWSTR s) {if (s) {int bl=wcslen(s); LPSTR b=(LPSTR)alloca(bl); super::assign(b, WideCharToMultiByte(CP_ACP, 0, s, bl, b, bl, 0, 0));} else erase();} + void assign(LPCWSTR s, int l) {int bl=l; if (s) {LPSTR b=(LPSTR)alloca(bl); super::assign(b, WideCharToMultiByte(CP_ACP, 0, s, l, b, bl, 0, 0));} else erase();} +#endif +#endif + + XS_String& operator=(LPCXSSTR s) {if (s) super::assign(s); else erase(); return *this;} + XS_String& operator=(const super& s) {super::assign(s); return *this;} + void assign(LPCXSSTR s) {super::assign(s);} + void assign(LPCXSSTR s, int l) {super::assign(s, l);} + + operator LPCXSSTR() const {return c_str();} + +#ifdef XS_STRING_UTF8 + operator std::wstring() const {int bl=length(); LPWSTR b=(LPWSTR)alloca(sizeof(WCHAR)*bl); return std::wstring(b, MultiByteToWideChar(CP_UTF8, 0, c_str(), bl, b, bl));} +#elif defined(UNICODE) + operator std::string() const {int bl=length(); LPSTR b=(LPSTR)alloca(bl); return std::string(b, WideCharToMultiByte(CP_ACP, 0, c_str(), bl, b, bl, 0, 0));} +#else + operator std::wstring() const {int bl=length(); LPWSTR b=(LPWSTR)alloca(sizeof(WCHAR)*bl); return std::wstring(b, MultiByteToWideChar(CP_ACP, 0, c_str(), bl, b, bl));} +#endif + + XS_String& printf(LPCXSSTR fmt, ...) + { + va_list l; + XS_CHAR b[BUFFER_LEN]; + + va_start(l, fmt); + super::assign(b, XS_vsprintf(b, fmt, l)); + va_end(l); + + return *this; + } + + XS_String& vprintf(LPCXSSTR fmt, va_list l) + { + XS_CHAR b[BUFFER_LEN]; + + super::assign(b, XS_vsprintf(b, fmt, l)); + + return *this; + } + + XS_String& appendf(LPCXSSTR fmt, ...) + { + va_list l; + XS_CHAR b[BUFFER_LEN]; + + va_start(l, fmt); + super::append(b, XS_vsprintf(b, fmt, l)); + va_end(l); + + return *this; + } + + XS_String& vappendf(LPCXSSTR fmt, va_list l) + { + XS_CHAR b[BUFFER_LEN]; + + super::append(b, XS_vsprintf(b, fmt, l)); + + return *this; + } +}; + +#endif // _STRING_DEFINED, !XS_STRING_UTF8 + +#endif // XS_String + + +#ifndef XS_STRING_UTF8 + +inline void assign_utf8(XS_String& s, const char* str) +{ + int lutf8 = strlen(str); + +#ifdef UNICODE + LPTSTR buffer = (LPTSTR)alloca(sizeof(TCHAR)*lutf8); + int l = MultiByteToWideChar(CP_UTF8, 0, str, lutf8, buffer, lutf8); +#else + LPWSTR wbuffer = (LPWSTR)alloca(sizeof(WCHAR)*lutf8); + int l = MultiByteToWideChar(CP_UTF8, 0, str, lutf8, wbuffer, lutf8); + + int bl=2*l; LPSTR buffer = (LPSTR)alloca(bl); + l = WideCharToMultiByte(CP_ACP, 0, wbuffer, l, buffer, bl, 0, 0); +#endif + + s.assign(buffer, l); +} + +inline std::string get_utf8(LPCTSTR s, int l) +{ +#ifdef UNICODE + int bl=2*l; LPSTR buffer = (LPSTR)alloca(bl); + l = WideCharToMultiByte(CP_UTF8, 0, s, l, buffer, bl, 0, 0); +#else + LPWSTR wbuffer = (LPWSTR)alloca(sizeof(WCHAR)*l); + l = MultiByteToWideChar(CP_ACP, 0, s, l, wbuffer, l); + + int bl=2*l; LPSTR buffer = (LPSTR)alloca(bl); + l = WideCharToMultiByte(CP_UTF8, 0, wbuffer, l, buffer, bl, 0, 0); +#endif + + return std::string(buffer, l); +} + +inline std::string get_utf8(const XS_String& s) +{ + return get_utf8(s.c_str(), s.length()); +} + +#endif // XS_STRING_UTF8 + +extern std::string EncodeXMLString(const XS_String& str); +extern XS_String DecodeXMLString(const XS_String& str); + + +#ifdef __GNUC__ +#include +typedef __gnu_cxx::stdio_filebuf STDIO_FILEBUF; +#else +typedef std::filebuf STDIO_FILEBUF; +#endif + + /// input file stream with ANSI/UNICODE file names +struct tifstream : public std::istream +{ + typedef std::istream super; + + tifstream(LPCTSTR path) + : super(&_buf), + _pfile(_tfopen(path, TEXT("r"))), +#ifdef __GNUC__ + _buf(_pfile, ios::in) +#else + _buf(_pfile) +#endif + { + } + + ~tifstream() + { + if (_pfile) + fclose(_pfile); + } + +protected: + FILE* _pfile; + STDIO_FILEBUF _buf; +}; + + /// output file stream with ANSI/UNICODE file names +struct tofstream : public std::ostream +{ + typedef std::ostream super; + + tofstream(LPCTSTR path) + : super(&_buf), + _pfile(_tfopen(path, TEXT("w"))), +#ifdef __GNUC__ + _buf(_pfile, ios::out) +#else + _buf(_pfile) +#endif + { + } + + ~tofstream() + { + flush(); + + if (_pfile) + fclose(_pfile); + } + +protected: + FILE* _pfile; + STDIO_FILEBUF _buf; +}; + + + // write XML files with 2 spaces indenting +#define XML_INDENT_SPACE " " + + +#ifdef XML_UNICODE // Are XML_Char strings UTF-16 encoded? + +typedef XS_String String_from_XML_Char; + +#elif defined(XS_STRING_UTF8) + +typedef XS_String String_from_XML_Char; + +#else + +struct String_from_XML_Char : public XS_String +{ + String_from_XML_Char(const XML_Char* str) + { + assign_utf8(*this, str); + } +}; + +#endif + + +#if defined(UNICODE) && !defined(XS_STRING_UTF8) + + // optimization for faster UNICODE/ASCII string comparison without temporary A/U conversion +inline bool operator==(const XS_String& s1, const char* s2) +{ + LPCWSTR p = s1; + const unsigned char* q = (const unsigned char*)s2; + + while(*p && *q) + if (*p++ != *q++) + return false; + + return *p == *q; +}; + +#endif + + + /// in memory representation of an XML node +struct XMLNode : public XS_String +{ +#if defined(UNICODE) && !defined(XS_STRING_UTF8) + // optimized read access without temporary A/U conversion when using ASCII attribute names + struct AttributeMap : public std::map + { + typedef std::map super; + + const_iterator find(const char* x) const + { + for(const_iterator it=begin(); it!=end(); ++it) + if (it->first == x) + return it; + + return end(); + } + + const_iterator find(const key_type& x) const + { + return super::find(x); + } + + iterator find(const key_type& x) + { + return super::find(x); + } + }; +#else + typedef std::map AttributeMap; +#endif + + struct Children : public std::list + { + void assign(const Children& other) + { + clear(); + + for(Children::const_iterator it=other.begin(); it!=other.end(); ++it) + push_back(new XMLNode(**it)); + } + + void clear() + { + while(!empty()) { + XMLNode* node = back(); + pop_back(); + + node->clear(); + delete node; + } + } + }; + + // access to protected class members for XMLPos and XMLReader + friend struct XMLPos; + friend struct const_XMLPos; + friend struct XMLReaderBase; + + XMLNode(const XS_String& name) + : XS_String(name) + { + } + + XMLNode(const XS_String& name, const std::string& leading) + : XS_String(name), + _leading(leading) + { + } + + XMLNode(const XMLNode& other) + : _attributes(other._attributes), + _leading(other._leading), + _content(other._content), + _end_leading(other._end_leading), + _trailing(other._trailing) + { + for(Children::const_iterator it=other._children.begin(); it!=other._children.end(); ++it) + _children.push_back(new XMLNode(**it)); + } + + ~XMLNode() + { + while(!_children.empty()) { + delete _children.back(); + _children.pop_back(); + } + } + + void clear() + { + _leading.erase(); + _content.erase(); + _end_leading.erase(); + _trailing.erase(); + + _attributes.clear(); + _children.clear(); + + XS_String::erase(); + } + + XMLNode& operator=(const XMLNode& other) + { + _children.assign(other._children); + + _attributes = other._attributes; + + _leading = other._leading; + _content = other._content; + _end_leading = other._end_leading; + _trailing = other._trailing; + + return *this; + } + + /// add a new child node + void add_child(XMLNode* child) + { + _children.push_back(child); + } + + /// write access to an attribute + void put(const XS_String& attr_name, const XS_String& value) + { + _attributes[attr_name] = value; + } + + /// C++ write access to an attribute + XS_String& operator[](const XS_String& attr_name) + { + return _attributes[attr_name]; + } + + /// read only access to an attribute + template XS_String get(const T& attr_name) const + { + AttributeMap::const_iterator found = _attributes.find(attr_name); + + if (found != _attributes.end()) + return found->second; + else + return XS_String(); + } + + /// convenient value access in children node + XS_String subvalue(const XS_String& name, const XS_String& attr_name, int n=0) const + { + const XMLNode* node = find(name, n); + + if (node) + return node->get(attr_name); + else + return XS_String(); + } + + /// convenient storage of distinct values in children node + XS_String& subvalue(const XS_String& name, const XS_String& attr_name, int n=0) + { + XMLNode* node = find(name, n); + + if (!node) { + node = new XMLNode(name); + add_child(node); + } + + return (*node)[attr_name]; + } + +#if defined(UNICODE) && !defined(XS_STRING_UTF8) + /// convenient value access in children node + XS_String subvalue(const char* name, const char* attr_name, int n=0) const + { + const XMLNode* node = find(name, n); + + if (node) + return node->get(attr_name); + else + return XS_String(); + } + + /// convenient storage of distinct values in children node + XS_String& subvalue(const char* name, const XS_String& attr_name, int n=0) + { + XMLNode* node = find(name, n); + + if (!node) { + node = new XMLNode(name); + add_child(node); + } + + return (*node)[attr_name]; + } +#endif + + const Children& get_children() const + { + return _children; + } + + Children& get_children() + { + return _children; + } + + XS_String get_content() const + { +#ifdef XS_STRING_UTF8 + const XS_String& ret = _content; +#else + XS_String ret; + assign_utf8(ret, _content.c_str()); +#endif + + return DecodeXMLString(ret.c_str()); + } + + void set_content(const XS_String& s) + { + _content.assign(EncodeXMLString(s.c_str())); + } + + enum WRITE_MODE { + FORMAT_SMART = 0, /// preserve original white space and comments if present; pretty print otherwise + FORMAT_ORIGINAL = 1, /// write XML stream preserving original white space and comments + FORMAT_PRETTY = 2 /// pretty print node to stream without preserving original white space + }; + + /// write node with children tree to output stream + std::ostream& write(std::ostream& out, WRITE_MODE mode=FORMAT_SMART, int indent=0) const + { + switch(mode) { + case FORMAT_PRETTY: + pretty_write_worker(out, indent); + break; + + case FORMAT_ORIGINAL: + write_worker(out, indent); + break; + + default: // FORMAT_SMART + smart_write_worker(out, indent); + } + + return out; + } + + XMLNode* find(const XS_String& name, int n=0) const + { + for(Children::const_iterator it=_children.begin(); it!=_children.end(); ++it) + if (**it == name) + if (!n--) + return *it; + + return NULL; + } + + XMLNode* find(const XS_String& name, const XS_String& attr_name, const XS_String& attr_value, int n=0) const + { + for(Children::const_iterator it=_children.begin(); it!=_children.end(); ++it) { + const XMLNode& node = **it; + + if (node==name && node.get(attr_name)==attr_value) + if (!n--) + return *it; + } + + return NULL; + } + +#if defined(UNICODE) && !defined(XS_STRING_UTF8) + XMLNode* find(const char* name, int n=0) const + { + for(Children::const_iterator it=_children.begin(); it!=_children.end(); ++it) + if (**it == name) + if (!n--) + return *it; + + return NULL; + } + + template + XMLNode* find(const char* name, const T& attr_name, const U& attr_value, int n=0) const + { + for(Children::const_iterator it=_children.begin(); it!=_children.end(); ++it) { + const XMLNode& node = **it; + + if (node==name && node.get(attr_name)==attr_value) + if (!n--) + return *it; + } + + return NULL; + } +#endif + + /// XPath find functions + const XMLNode* find_relative(const char* path) const; + + XMLNode* find_relative(const char* path) + {return const_cast(const_cast(this)->find_relative(path));} + + /// relative XPath create function + XMLNode* create_relative(const char* path); + +protected: + Children _children; + AttributeMap _attributes; + + std::string _leading; + std::string _content; + std::string _end_leading; + std::string _trailing; + + XMLNode* get_first_child() const + { + if (!_children.empty()) + return _children.front(); + else + return NULL; + } + + void write_worker(std::ostream& out, int indent) const; + void pretty_write_worker(std::ostream& out, int indent) const; + void smart_write_worker(std::ostream& out, int indent) const; +}; + + + /// iterator access to children nodes with name filtering +struct XMLChildrenFilter +{ + XMLChildrenFilter(XMLNode::Children& children, const XS_String& name) + : _begin(children.begin(), children.end(), name), + _end(children.end(), children.end(), name) + { + } + + XMLChildrenFilter(XMLNode* node, const XS_String& name) + : _begin(node->get_children().begin(), node->get_children().end(), name), + _end(node->get_children().end(), node->get_children().end(), name) + { + } + + struct iterator + { + typedef XMLNode::Children::iterator BaseIterator; + + iterator(BaseIterator begin, BaseIterator end, const XS_String& filter_name) + : _cur(begin), + _end(end), + _filter_name(filter_name) + { + search_next(); + } + + operator BaseIterator() + { + return _cur; + } + + const XMLNode* operator*() const + { + return *_cur; + } + + XMLNode* operator*() + { + return *_cur; + } + + iterator& operator++() + { + ++_cur; + search_next(); + + return *this; + } + + iterator operator++(int) + { + iterator ret = *this; + + ++_cur; + search_next(); + + return ret; + } + + bool operator==(const BaseIterator& other) const + { + return _cur == other; + } + + bool operator!=(const BaseIterator& other) const + { + return _cur != other; + } + + protected: + BaseIterator _cur; + BaseIterator _end; + XS_String _filter_name; + + void search_next() + { + while(_cur!=_end && **_cur!=_filter_name) + ++_cur; + } + }; + + iterator begin() + { + return _begin; + } + + iterator end() + { + return _end; + } + +protected: + iterator _begin; + iterator _end; +}; + + + /// read only iterator access to children nodes with name filtering +struct const_XMLChildrenFilter +{ + const_XMLChildrenFilter(const XMLNode::Children& children, const XS_String& name) + : _begin(children.begin(), children.end(), name), + _end(children.end(), children.end(), name) + { + } + + const_XMLChildrenFilter(const XMLNode* node, const XS_String& name) + : _begin(node->get_children().begin(), node->get_children().end(), name), + _end(node->get_children().end(), node->get_children().end(), name) + { + } + + struct const_iterator + { + typedef XMLNode::Children::const_iterator BaseIterator; + + const_iterator(BaseIterator begin, BaseIterator end, const XS_String& filter_name) + : _cur(begin), + _end(end), + _filter_name(filter_name) + { + search_next(); + } + + operator BaseIterator() + { + return _cur; + } + + const XMLNode* operator*() const + { + return *_cur; + } + + const_iterator& operator++() + { + ++_cur; + search_next(); + + return *this; + } + + const_iterator operator++(int) + { + const_iterator ret = *this; + + ++_cur; + search_next(); + + return ret; + } + + bool operator==(const BaseIterator& other) const + { + return _cur == other; + } + + bool operator!=(const BaseIterator& other) const + { + return _cur != other; + } + + protected: + BaseIterator _cur; + BaseIterator _end; + XS_String _filter_name; + + void search_next() + { + while(_cur!=_end && **_cur!=_filter_name) + ++_cur; + } + }; + + const_iterator begin() + { + return _begin; + } + + const_iterator end() + { + return _end; + } + +protected: + const_iterator _begin; + const_iterator _end; +}; + + + /// iterator for XML trees +struct XMLPos +{ + XMLPos(XMLNode* root) + : _root(root), + _cur(root) + { + } + + XMLPos(const XMLPos& other) + : _root(other._root), + _cur(other._cur) + { // don't copy _stack + } + + XMLPos(XMLNode* node, const XS_String& name) + : _root(node), + _cur(node) + { + smart_create(name); + } + + XMLPos(XMLNode* node, const XS_String& name, const XS_String& attr_name, const XS_String& attr_value) + : _root(node), + _cur(node) + { + smart_create(name, attr_name, attr_value); + } + + XMLPos(const XMLPos& other, const XS_String& name) + : _root(other._root), + _cur(other._cur) + { + smart_create(name); + } + + XMLPos(const XMLPos& other, const XS_String& name, const XS_String& attr_name, const XS_String& attr_value) + : _root(other._root), + _cur(other._cur) + { + smart_create(name, attr_name, attr_value); + } + + /// access to current node + XMLNode& cur() + { + return *_cur; + } + + const XMLNode& cur() const + { + return *_cur; + } + + /// C++ access to current node + operator const XMLNode*() const {return _cur;} + operator XMLNode*() {return _cur;} + + const XMLNode* operator->() const {return _cur;} + XMLNode* operator->() {return _cur;} + + const XMLNode& operator*() const {return *_cur;} + XMLNode& operator*() {return *_cur;} + + /// attribute access + XS_String get(const XS_String& attr_name) const + { + return _cur->get(attr_name); + } + + void put(const XS_String& attr_name, const XS_String& value) + { + _cur->put(attr_name, value); + } + + /// C++ attribute access + template XS_String get(const T& attr_name) const {return (*_cur)[attr_name];} + XS_String& operator[](const XS_String& attr_name) {return (*_cur)[attr_name];} + + /// insert children when building tree + void add_down(XMLNode* child) + { + _cur->add_child(child); + go_to(child); + } + + /// go back to previous position + bool back() + { + if (!_stack.empty()) { + _cur = _stack.top(); + _stack.pop(); + return true; + } else + return false; + } + + /// go down to first child + bool go_down() + { + XMLNode* node = _cur->get_first_child(); + + if (node) { + go_to(node); + return true; + } else + return false; + } + + /// search for child and go down + bool go_down(const XS_String& name, int n=0) + { + XMLNode* node = _cur->find(name, n); + + if (node) { + go_to(node); + return true; + } else + return false; + } + + /// move XPath like to position in XML tree + bool go(const char* path); + + /// create child nodes using XPath notation and move to the deepest child + bool create_relative(const char* path) + { + XMLNode* node = _cur->create_relative(path); + if (!node) + return false; // invalid path specified + + go_to(node); + return true; + } + + /// create node and move to it + void create(const XS_String& name) + { + add_down(new XMLNode(name)); + } + + /// create node if not already existing and move to it + void smart_create(const XS_String& name) + { + XMLNode* node = _cur->find(name); + + if (node) + go_to(node); + else + add_down(new XMLNode(name)); + } + + /// search matching child node identified by key name and an attribute value + void smart_create(const XS_String& name, const XS_String& attr_name, const XS_String& attr_value) + { + XMLNode* node = _cur->find(name, attr_name, attr_value); + + if (node) + go_to(node); + else { + node = new XMLNode(name); + add_down(node); + (*node)[attr_name] = attr_value; + } + } + +#if defined(UNICODE) && !defined(XS_STRING_UTF8) + /// search for child and go down + bool go_down(const char* name, int n=0) + { + XMLNode* node = _cur->find(name, n); + + if (node) { + go_to(node); + return true; + } else + return false; + } + + /// create node and move to it + void create(const char* name) + { + add_down(new XMLNode(name)); + } + + /// create node if not already existing and move to it + void smart_create(const char* name) + { + XMLNode* node = _cur->find(name); + + if (node) + go_to(node); + else + add_down(new XMLNode(name)); + } + + /// search matching child node identified by key name and an attribute value + template + void smart_create(const char* name, const T& attr_name, const U& attr_value) + { + XMLNode* node = _cur->find(name, attr_name, attr_value); + + if (node) + go_to(node); + else { + XMLNode* node = new XMLNode(name); + add_down(node); + (*node)[attr_name] = attr_value; + } + } +#endif + + XS_String& str() {return *_cur;} + const XS_String& str() const {return *_cur;} + +protected: + XMLNode* _root; + XMLNode* _cur; + std::stack _stack; + + /// go to specified node + void go_to(XMLNode* child) + { + _stack.push(_cur); + _cur = child; + } +}; + + + /// iterator for XML trees +struct const_XMLPos +{ + const_XMLPos(const XMLNode* root) + : _root(root), + _cur(root) + { + } + + const_XMLPos(const const_XMLPos& other) + : _root(other._root), + _cur(other._cur) + { // don't copy _stack + } + + /// access to current node + const XMLNode& cur() const + { + return *_cur; + } + + /// C++ access to current node + operator const XMLNode*() const {return _cur;} + + const XMLNode* operator->() const {return _cur;} + + const XMLNode& operator*() const {return *_cur;} + + /// attribute access + XS_String get(const XS_String& attr_name) const + { + return _cur->get(attr_name); + } + + /// C++ attribute access + template XS_String get(const T& attr_name) const {return _cur->get(attr_name);} + + /// go back to previous position + bool back() + { + if (!_stack.empty()) { + _cur = _stack.top(); + _stack.pop(); + return true; + } else + return false; + } + + /// go down to first child + bool go_down() + { + const XMLNode* node = _cur->get_first_child(); + + if (node) { + go_to(node); + return true; + } else + return false; + } + + /// search for child and go down + bool go_down(const XS_String& name, int n=0) + { + XMLNode* node = _cur->find(name, n); + + if (node) { + go_to(node); + return true; + } else + return false; + } + + /// move XPath like to position in XML tree + bool go(const char* path); + +#if defined(UNICODE) && !defined(XS_STRING_UTF8) + /// search for child and go down + bool go_down(const char* name, int n=0) + { + XMLNode* node = _cur->find(name, n); + + if (node) { + go_to(node); + return true; + } else + return false; + } +#endif + + const XS_String& str() const {return *_cur;} + +protected: + const XMLNode* _root; + const XMLNode* _cur; + std::stack _stack; + + /// go to specified node + void go_to(const XMLNode* child) + { + _stack.push(_cur); + _cur = child; + } +}; + + + // work around GCC's wide string constant bug +#ifdef __GNUC__ +extern const LPCXSSTR XS_TRUE; +extern const LPCXSSTR XS_FALSE; +extern const LPCXSSTR XS_NUMBERFMT; +#else +#define XS_TRUE XS_TEXT("true") +#define XS_FALSE XS_TEXT("false") +#define XS_NUMBERFMT XS_TEXT("%d") +#endif + + +struct XMLBool +{ + XMLBool(bool value=false) + : _value(value) + { + } + + XMLBool(LPCXSSTR value, bool def=false) + { + if (value && *value) + _value = !XS_icmp(value, XS_TRUE); + else + _value = def; + } + + XMLBool(const XMLNode* node, const XS_String& attr_name, bool def=false) + { + const XS_String& value = node->get(attr_name); + + if (!value.empty()) + _value = !XS_icmp(value.c_str(), XS_TRUE); + else + _value = def; + } + + operator bool() const + { + return _value; + } + + bool operator!() const + { + return !_value; + } + + operator LPCXSSTR() const + { + return _value? XS_TRUE: XS_FALSE; + } + +protected: + bool _value; + +private: + void operator=(const XMLBool&); // disallow assignment operations +}; + +struct XMLBoolRef +{ + XMLBoolRef(XMLNode* node, const XS_String& attr_name, bool def=false) + : _ref((*node)[attr_name]) + { + if (_ref.empty()) + assign(def); + } + + operator bool() const + { + return !XS_icmp(_ref.c_str(), XS_TRUE); + } + + bool operator!() const + { + return XS_icmp(_ref.c_str(), XS_TRUE)? true: false; + } + + XMLBoolRef& operator=(bool value) + { + assign(value); + + return *this; + } + + void assign(bool value) + { + _ref.assign(value? XS_TRUE: XS_FALSE); + } + + void toggle() + { + assign(!operator bool()); + } + +protected: + XS_String& _ref; +}; + + +struct XMLInt +{ + XMLInt(int value) + : _value(value) + { + } + + XMLInt(LPCXSSTR value, int def=0) + { + if (value && *value) + _value = XS_toi(value); + else + _value = def; + } + + XMLInt(const XMLNode* node, const XS_String& attr_name, int def=0) + { + const XS_String& value = node->get(attr_name); + + if (!value.empty()) + _value = XS_toi(value.c_str()); + else + _value = def; + } + + operator int() const + { + return _value; + } + + operator XS_String() const + { + XS_CHAR buffer[32]; + XS_sprintf(buffer, XS_NUMBERFMT, _value); + return buffer; + } + +protected: + int _value; + +private: + void operator=(const XMLInt&); // disallow assignment operations +}; + +struct XMLIntRef +{ + XMLIntRef(XMLNode* node, const XS_String& attr_name, int def=0) + : _ref((*node)[attr_name]) + { + if (_ref.empty()) + assign(def); + } + + XMLIntRef& operator=(int value) + { + assign(value); + + return *this; + } + + operator int() const + { + return XS_toi(_ref.c_str()); + } + + void assign(int value) + { + XS_CHAR buffer[32]; + XS_sprintf(buffer, XS_NUMBERFMT, value); + _ref.assign(buffer); + } + +protected: + XS_String& _ref; +}; + + +struct XMLString +{ + XMLString(const XS_String& value) + : _value(value) + { + } + + XMLString(LPCXSSTR value, LPCXSSTR def=XS_TEXT("")) + { + if (value && *value) + _value = value; + else + _value = def; + } + + XMLString(const XMLNode* node, const XS_String& attr_name, LPCXSSTR def=XS_TEXT("")) + { + const XS_String& value = node->get(attr_name); + + if (!value.empty()) + _value = value; + else + _value = def; + } + + operator const XS_String&() const + { + return _value; + } + + const XS_String& c_str() const + { + return _value; + } + +protected: + XS_String _value; + +private: + void operator=(const XMLString&); // disallow assignment operations +}; + +struct XMStringRef +{ + XMStringRef(XMLNode* node, const XS_String& attr_name, LPCXSSTR def=XS_TEXT("")) + : _ref((*node)[attr_name]) + { + if (_ref.empty()) + assign(def); + } + + XMStringRef(XMLNode* node, const XS_String& node_name, const XS_String& attr_name, LPCXSSTR def=XS_TEXT("")) + : _ref(node->subvalue(node_name, attr_name)) + { + if (_ref.empty()) + assign(def); + } + + XMStringRef& operator=(const XS_String& value) + { + assign(value); + + return *this; + } + + operator const XS_String&() const + { + return _ref; + } + + void assign(const XS_String& value) + { + _ref.assign(value); + } + +protected: + XS_String& _ref; +}; + + +template + inline void read_option(T& var, const_XMLPos& cfg, LPCXSSTR key) + { + const XS_String& val = cfg.get(key); + + if (!val.empty()) + var = val; + } + +template<> + inline void read_option(int& var, const_XMLPos& cfg, LPCXSSTR key) + { + const XS_String& val = cfg.get(key); + + if (!val.empty()) + var = XS_toi(val.c_str()); + } + + +#ifdef _MSC_VER +#pragma warning(disable: 4355) +#endif + + /// XML reader base class +struct XMLReaderBase +{ + XMLReaderBase(XMLNode* node) + : _pos(node), + _parser(XML_ParserCreate(NULL)) + { + XML_SetUserData(_parser, this); + XML_SetXmlDeclHandler(_parser, XML_XmlDeclHandler); + XML_SetElementHandler(_parser, XML_StartElementHandler, XML_EndElementHandler); + XML_SetDefaultHandler(_parser, XML_DefaultHandler); + + _last_tag = TAG_NONE; + } + + virtual ~XMLReaderBase() + { + XML_ParserFree(_parser); + } + + XML_Status read(); + + virtual int read_buffer(char* buffer, int len) = 0; + + std::string get_position() const + { + int line = XML_GetCurrentLineNumber(_parser); + int column = XML_GetCurrentColumnNumber(_parser); + + std::ostringstream out; + out << "(" << line << ") : [column " << column << "]"; + + return out.str(); + } + + XML_Error get_error_code() {return XML_GetErrorCode(_parser);} + std::string get_error_string() const; + +protected: + XMLPos _pos; + XML_Parser _parser; + std::string _xml_version; + std::string _encoding; + + std::string _content; + enum {TAG_NONE, TAG_START, TAG_END} _last_tag; + + static void XMLCALL XML_XmlDeclHandler(void* userData, const XML_Char* version, const XML_Char* encoding, int standalone); + static void XMLCALL XML_StartElementHandler(void* userData, const XML_Char* name, const XML_Char** atts); + static void XMLCALL XML_EndElementHandler(void* userData, const XML_Char* name); + static void XMLCALL XML_DefaultHandler(void* userData, const XML_Char* s, int len); +}; + + + /// XML file reader +struct XMLReader : public XMLReaderBase +{ + XMLReader(XMLNode* node, std::istream& in) + : XMLReaderBase(node), + _in(in) + { + } + + /// read XML stream into XML tree below _pos + int read_buffer(char* buffer, int len) + { + if (!_in.good()) + return -1; + + _in.read(buffer, len); + + return _in.gcount(); + } + +protected: + std::istream& _in; +}; + + +struct XMLHeader +{ + XMLHeader(const std::string& xml_version="1.0", const std::string& encoding="UTF-8", const std::string& doctype="") + : _version(xml_version), + _encoding(encoding), + _doctype(doctype) + { + } + + void print(std::ostream& out) const + { + out << "\n"; + + if (!_doctype.empty()) + out << _doctype << '\n'; + } + + std::string _version; + std::string _encoding; + std::string _doctype; +}; + + +struct XMLDoc : public XMLNode +{ + XMLDoc() + : XMLNode(""), + _last_error(XML_ERROR_NONE) + { + } + + XMLDoc(LPCTSTR path) + : XMLNode(""), + _last_error(XML_ERROR_NONE) + { + read(path); + } + + std::istream& read(std::istream& in) + { + XMLReader reader(this, in); + + read(reader); + + return in; + } + + bool read(LPCTSTR path) + { + tifstream in(path); + XMLReader reader(this, in); + +//#if defined(_STRING_DEFINED) && !defined(XS_STRING_UTF8) +// return read(reader, std::string(ANS(path))); +//#else + return read(reader, XS_String(path)); +//#endif + } + + bool read(XMLReaderBase& reader) + { + XML_Status status = reader.read(); + + if (status == XML_STATUS_ERROR) { + std::ostringstream out; + + out << "input stream" << reader.get_position() << " " << reader.get_error_string(); + + _last_error = reader.get_error_code(); + _last_error_msg = out.str(); + } + + return status != XML_STATUS_ERROR; + } + + bool read(XMLReaderBase& reader, const std::string& display_path) + { + XML_Status status = reader.read(); + + if (status == XML_STATUS_ERROR) { + std::ostringstream out; + + out << display_path << reader.get_position() << " " << reader.get_error_string(); + + _last_error = reader.get_error_code(); + _last_error_msg = out.str(); + } + + return status != XML_STATUS_ERROR; + } + + /// write XML stream preserving previous white space and comments + std::ostream& write(std::ostream& out, WRITE_MODE mode=FORMAT_SMART, const XMLHeader& header=XMLHeader()) const + { + header.print(out); + + if (!_children.empty()) + _children.front()->write(out); + + return out; + } + + /// write XML stream with formating + std::ostream& write_formating(std::ostream& out) const + { + return write(out, FORMAT_PRETTY); + } + + void write(LPCTSTR path, WRITE_MODE mode=FORMAT_SMART, const XMLHeader& header=XMLHeader()) const + { + tofstream out(path); + + write(out, mode, header); + } + + void write_formating(LPCTSTR path) const + { + tofstream out(path); + + write_formating(out); + } + + XML_Error _last_error; + std::string _last_error_msg; +}; + + +struct XMLMessage : public XMLDoc +{ + XMLMessage(const char* name) + : _pos(this) + { + _pos.create(name); + } + + XMLPos _pos; +}; + + +} // namespace XMLStorage + +#define _XMLSTORAGE_H +#endif // _XMLSTORAGE_H diff --git a/reactos/subsys/system/ibrowser/webchild.cpp b/reactos/subsys/system/ibrowser/webchild.cpp new file mode 100644 index 00000000000..78cc3c0f72a --- /dev/null +++ b/reactos/subsys/system/ibrowser/webchild.cpp @@ -0,0 +1,309 @@ +/* + * Copyright 2004, 2005 Martin Fuchs + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + + + // + // ROS Internet Web Browser + // + // webchild.cpp + // + // Martin Fuchs, 25.01.2005 + // + + +#include "precomp.h" + +#include "ibrowser_intres.h" + +#include "webchild.h" + + +#ifdef _MSC_VER + +#if _MSC_VER>=1300 // vtMissing for VS.Net +#include +#pragma comment(lib, "comsupp") +#endif + +#else + +#ifdef __MINGW32__ // MinGW is lacking vtMissing (as of 07.02.2004) +static Variant vtMissing; +#endif + +#endif + +//#include + + +Variant::Variant(const VARIANT& var) +{ + VariantInit(this); + CheckError(VariantCopy(this, const_cast(&var))); +} + +Variant::Variant(const VARIANT* var) +{ + VariantInit(this); + CheckError(VariantCopy(this, const_cast(var))); +} + +Variant::~Variant() +{ + VariantClear(this); +} + + +Variant::operator long() const +{ + Variant v; + CheckError(VariantChangeType(&v, (VARIANT*)this, 0, VT_I4)); + return V_I4(&v); +} + +Variant::operator bool() const +{ + Variant v; + CheckError(VariantChangeType(&v, (VARIANT*)this, 0, VT_BOOL)); + return V_BOOL(&v)? true: false; +} + +Variant::operator IDispatch*() const +{ + Variant v; + CheckError(VariantChangeType(&v, (VARIANT*)this, 0, VT_DISPATCH)); + return V_DISPATCH(&v); +} + +Variant::operator VARIANT_BOOL() const +{ + Variant v; + CheckError(VariantChangeType(&v, (VARIANT*)this, 0, VT_BOOL)); + return V_BOOL(&v); +} + + +void BStr::assign(BSTR s) +{ + if (!SysReAllocString(&_p, s)) + THROW_EXCEPTION(E_OUTOFMEMORY); +} + +void BStr::assign(const VARIANT& var) +{ + if (V_VT(&var) == VT_BSTR) + assign(V_BSTR(&var)); + else { + Variant v; + CheckError(VariantChangeType(&v, const_cast(&var), 0, VT_BSTR)); + assign(V_BSTR(&v)); + } +} + + +BrowserNavigator::BrowserNavigator() + : _browser_initialized(false) +{ +} + +void BrowserNavigator::attach(IWebBrowser* browser) +{ + _browser = browser; +} + +void BrowserNavigator::goto_url(LPCTSTR url) +{ + if (_browser_initialized) + _browser->Navigate(BStr(url), NULL, NULL, NULL, NULL); + else { + _new_url = url; + + _browser->Navigate(L"about:blank", NULL, NULL, NULL, NULL); + } +} + +void BrowserNavigator::set_html_page(const String& html_txt) +{ + _new_html_txt = html_txt; + + goto_url(TEXT("about:blank")); +} + +void T2nA_binary(LPCTSTR s, LPSTR d, int len) +{ + while(len-- > 0) + *d++ = (unsigned char)*s++; +} + +void BrowserNavigator::navigated(LPCTSTR url) +{ + _browser_initialized = true; + + bool nav = false; + + if (!_new_url.empty()) { + if (!_tcscmp(url,TEXT("about:blank")) && _new_url!=TEXT("about:blank")) { + _browser->Navigate(BStr(_new_url), NULL, NULL, NULL, NULL); + ++nav; + } + + _new_url.erase(); + } + + if (!nav && !_new_html_txt.empty()) { ///@todo move this into DocumentComplete() ? + int len = _new_html_txt.length(); + HGLOBAL hHtmlText = GlobalAlloc(GPTR, len); + + if (!hHtmlText) { + T2nA_binary(_new_html_txt, (char*)hHtmlText, len); + _new_html_txt.erase(); + + SIfacePtr pStream; + HRESULT hr = CreateStreamOnHGlobal(hHtmlText, TRUE, &pStream); + + if (SUCCEEDED(hr)) { + SIfacePtr pHtmlDoc; + CheckError(_browser->get_Document(&pHtmlDoc)); + + SIfacePtr pPersistStreamInit; + pHtmlDoc.QueryInterface(IID_IPersistStreamInit, &pPersistStreamInit); + + CheckError(pPersistStreamInit->InitNew()); + CheckError(pPersistStreamInit->Load(pStream)); + } else + GlobalFree(hHtmlText); + } + } +} + + +HWND create_webchildwindow(const WebChildWndInfo& info) +{ + WebChildWindow* pWnd = WebChildWindow::create(info); + + if (!pWnd) + return 0; + + return *pWnd; +} + +static const CLSID CLSID_MozillaBrowser = + {0x1339B54C, 0x3453, 0x11D2, {0x93, 0xB9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}; + + +WebChildWindow::WebChildWindow(HWND hwnd, const WebChildWndInfo& info) + : super(hwnd, info._hwndFrame), + web_super(_navigator) +{ + // first try to create a web control with MS IE's CLASSID + HRESULT hr = create_control(hwnd, CLSID_WebBrowser, IID_IWebBrowser2); + + // If this failed, try to use Mozilla's web control + if (FAILED(hr)) + hr = create_control(hwnd, CLSID_MozillaBrowser, IID_IWebBrowser2); + + if (SUCCEEDED(hr)) { + _navigator.attach(_control); + + _connector = auto_ptr(new EventConnector(_control, DIID_DWebBrowserEvents2, this)); + + _control->Navigate(BStr(info._url), &vtMissing, &vtMissing, &vtMissing, &vtMissing); + //browser->Navigate2(&Variant(info._url), &vtMissing, &vtMissing, &vtMissing, &vtMissing); + } +} + +LRESULT WebChildWindow::WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam) +{ + try { + switch(nmsg) { + case WM_ERASEBKGND: + if (!_control) { + HDC hdc = (HDC)wparam; + ClientRect rect(_hwnd); + + HBRUSH hbrush = CreateSolidBrush(RGB(200,200,235)); + BkMode mode(hdc, TRANSPARENT); + TextColor color(hdc, RGB(200,40,40)); + FillRect(hdc, &rect, hbrush); + DrawText(hdc, TEXT("Sorry - no web browser control could be loaded."), -1, &rect, DT_CENTER|DT_VCENTER|DT_SINGLELINE); + DeleteObject(hbrush); + } + + return TRUE; + + + case PM_DISPATCH_COMMAND: { + if (_control) { + HRESULT hr = E_FAIL; + + switch(LOWORD(wparam)) { + case ID_GO_BACK: + hr = _control->GoBack(); + break; + + case ID_GO_FORWARD: + hr = _control->GoForward(); + break; + + case ID_GO_UP: + ///@todo + break; + + case ID_GO_HOME: + hr = _control->GoHome(); + break; + + case ID_GO_SEARCH: + hr = _control->GoSearch(); + break; + + case ID_REFRESH: + hr = _control->Refresh(); + break; + + case ID_STOP: + hr = _control->Stop(); + break; + + default: + return super::WndProc(nmsg, wparam, lparam); + } + + if (FAILED(hr) && hr!=E_FAIL) + THROW_EXCEPTION(hr); + } + + return TRUE;} + + default: + return super::WndProc(nmsg, wparam, lparam); + } + } catch(COMException& e) { + HandleException(e, _hwnd); + } + + return 0; +} + + +String WebChildWindow::jump_to_int(LPCTSTR url) +{ + _navigator.goto_url(url); + + return url; +} diff --git a/reactos/subsys/system/ibrowser/webchild.h b/reactos/subsys/system/ibrowser/webchild.h new file mode 100644 index 00000000000..3ffc2a36316 --- /dev/null +++ b/reactos/subsys/system/ibrowser/webchild.h @@ -0,0 +1,1079 @@ +/* + * Copyright 2004, 2005 Martin Fuchs + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + + + // + // ROS Internet Web Browser + // + // webchild.h + // + // Martin Fuchs, 25.01.2005 + // + + +#ifndef _MSC_VER +#include // for IConnectionPointContainer +#include // for DWebBrowserEvents2 IDs +#endif + +#ifndef DISPID_BEFORENAVIGATE // missing in MinGW (as of 07.02.2004) +#define DISPID_BEFORENAVIGATE 100 +#define DISPID_NAVIGATECOMPLETE 101 +#define DISPID_STATUSTEXTCHANGE 102 +#define DISPID_QUIT 103 +#define DISPID_DOWNLOADCOMPLETE 104 +#define DISPID_COMMANDSTATECHANGE 105 +#define DISPID_DOWNLOADBEGIN 106 +#define DISPID_NEWWINDOW 107 +#define DISPID_PROGRESSCHANGE 108 +#define DISPID_WINDOWMOVE 109 +#define DISPID_WINDOWRESIZE 110 +#define DISPID_WINDOWACTIVATE 111 +#define DISPID_PROPERTYCHANGE 112 +#define DISPID_TITLECHANGE 113 +#define DISPID_TITLEICONCHANGE 114 +#define DISPID_FRAMEBEFORENAVIGATE 200 +#define DISPID_FRAMENAVIGATECOMPLETE 201 +#define DISPID_FRAMENEWWINDOW 204 + +#define DISPID_NAVIGATECOMPLETE2 252 +#define DISPID_ONQUIT 253 +#define DISPID_ONVISIBLE 254 +#define DISPID_ONTOOLBAR 255 +#define DISPID_ONMENUBAR 256 +#define DISPID_ONSTATUSBAR 257 +#define DISPID_ONFULLSCREEN 258 +#define DISPID_DOCUMENTCOMPLETE 259 +#define DISPID_ONTHEATERMODE 260 +#define DISPID_ONADDRESSBAR 261 +#define DISPID_WINDOWSETRESIZABLE 262 +#define DISPID_WINDOWCLOSING 263 +#define DISPID_WINDOWSETLEFT 264 +#define DISPID_WINDOWSETTOP 265 +#define DISPID_WINDOWSETWIDTH 266 +#define DISPID_WINDOWSETHEIGHT 267 +#define DISPID_CLIENTTOHOSTWINDOW 268 +#define DISPID_SETSECURELOCKICON 269 +#define DISPID_FILEDOWNLOAD 270 +#define DISPID_NAVIGATEERROR 271 +#define DISPID_PRIVACYIMPACTEDSTATECHANGE 272 +#endif + +#ifndef V_INT // missing in MinGW (as of 07.02.2004) +#define V_INT(x) V_UNION(x, intVal) +#endif + +#ifdef _MSC_VER +#define NOVTABLE __declspec(novtable) +#else +#define NOVTABLE +#endif +#define ANSUNC + +#ifdef _MSC_VER +#pragma warning(disable: 4355) // use of 'this' for initialization of _connector +#endif + + +struct NOVTABLE ComSrvObject // NOVTABLE erlaubt, da protected Destruktor +{ +protected: + ComSrvObject() : _ref(1) {} + virtual ~ComSrvObject() {} + + ULONG _ref; +}; + +struct SimpleComObject : public ComSrvObject +{ + ULONG IncRef() {return ++_ref;} + ULONG DecRef() {ULONG ref=--_ref; if (!ref) {_ref++; delete this;} return ref;} +}; + + + // server object interfaces + +template struct IComSrvQI : public BASE +{ + IComSrvQI(REFIID uuid_base) + : _uuid_base(uuid_base) + { + } + + STDMETHODIMP QueryInterface(REFIID riid, LPVOID* ppv) {*ppv=0; + if (IsEqualIID(riid, _uuid_base) || + IsEqualIID(riid, IID_IUnknown)) {*ppv=static_cast(this); this->AddRef(); return S_OK;} + return E_NOINTERFACE;} + +protected: + IComSrvQI() {} + + REFIID _uuid_base; +}; + +template<> struct IComSrvQI : public IUnknown +{ + STDMETHODIMP QueryInterface(REFIID riid, LPVOID* ppv) {*ppv=0; + if (IsEqualIID(riid, IID_IUnknown)) {*ppv=this; AddRef(); return S_OK;} + return E_NOINTERFACE;} + +protected: + IComSrvQI() {} +}; + + +template + class IComSrvBase : public IComSrvQI +{ + typedef IComSrvQI super; + +protected: + IComSrvBase(REFIID uuid_base) + : super(uuid_base) + { + } + +public: + STDMETHODIMP_(ULONG) AddRef() {return static_cast(this)->IncRef();} + STDMETHODIMP_(ULONG) Release() {return static_cast(this)->DecRef();} +}; + + +template struct ConnectionPoint : public SIfacePtr +{ + ConnectionPoint(IConnectionPointContainer* pCPC, REFIID riid) + { + CheckError(pCPC->FindConnectionPoint(riid, &this->_p)); + } +}; + +struct EventConnection +{ + EventConnection(IConnectionPoint* connectionpoint, IUnknown* sink) + { + CheckError(connectionpoint->Advise(sink, &_cookie)); + _connectionpoint = connectionpoint; + } + + template EventConnection(T& connectionpoint, IUnknown* sink) + { + CheckError(connectionpoint->Advise(sink, &_cookie)); + _connectionpoint = connectionpoint; + } + +/* template EventConnection(SIfacePtr& connectionpoint, IUnknown* sink) + { + CheckError(connectionpoint->Advise(sink, &_cookie)); + _connectionpoint = connectionpoint.GetPtr(); + } */ + +/* template EventConnection(T& connectionpoint, IUnknown* sink) + { + CheckError(connectionpoint->Advise(sink, &_cookie)); + _connectionpoint = connectionpoint; + } */ + + ~EventConnection() + { + if (_connectionpoint) + _connectionpoint->Unadvise(_cookie); + } + +protected: + SIfacePtr _connectionpoint; + DWORD _cookie; +}; + +struct EventConnector : public EventConnection +{ + EventConnector(IUnknown* unknown, REFIID riid, IUnknown* sink) + : EventConnection(ConnectionPoint( + SIfacePtr(unknown, IID_IConnectionPointContainer), riid), sink) + { + } +}; + + +struct OleInPlaceClient : public SimpleComObject, + public IOleClientSite, + public IOleInPlaceSite +{ +protected: + HWND _hwnd; + +public: + OleInPlaceClient(HWND hwnd=0) + : _hwnd(hwnd) + { + } + + void attach(HWND hwnd) + { + _hwnd = hwnd; + } + + HRESULT attach_control(IOleObject* ole_obj, LONG iVerb=OLEIVERB_INPLACEACTIVATE, HWND hwndParent=0, LPCRECT pRect=NULL) + { + HRESULT hr = ole_obj->SetClientSite(this); + if (FAILED(hr)) + return hr; + +// hr = ole_obj->SetHostNames(app, doc)); + + hr = ole_obj->DoVerb(iVerb, NULL, this, 0, 0/*hwnd*/, NULL/*&rcPos*/); + + return hr; + } + + HRESULT detach(IOleObject* ole_obj, DWORD dwSaveOption=OLECLOSE_SAVEIFDIRTY) + { + HRESULT hr = ole_obj->Close(dwSaveOption); + + _hwnd = 0; + + return hr; + } + + STDMETHODIMP QueryInterface(REFIID riid, LPVOID* ppv) + { + if (IsEqualIID(riid, IID_IOleClientSite)) + {*ppv=static_cast(this); IncRef(); return S_OK;} + + if (IsEqualIID(riid, IID_IOleInPlaceSite)) + {*ppv=static_cast(this); IncRef(); return S_OK;} + + if (IsEqualIID(riid, IID_IUnknown)) + {*ppv=static_cast(this); IncRef(); return S_OK;} + + return E_NOINTERFACE; + } + + STDMETHODIMP_(ULONG) AddRef() {return IncRef();} + STDMETHODIMP_(ULONG) Release() {return DecRef();} + + + // IOleWindow: + + virtual /* [input_sync] */ HRESULT STDMETHODCALLTYPE GetWindow(/* [out] */ HWND __RPC_FAR *phwnd) + { + *phwnd = _hwnd; + return S_OK; + } + + virtual HRESULT STDMETHODCALLTYPE ContextSensitiveHelp(/* [in] */ BOOL fEnterMode) + { + return E_NOTIMPL; + } + + + // IOleClientSite: + + virtual HRESULT STDMETHODCALLTYPE SaveObject() + { + return E_NOTIMPL; + } + + virtual HRESULT STDMETHODCALLTYPE GetMoniker(DWORD dwAssign, DWORD dwWhichMoniker, IMoniker __RPC_FAR *__RPC_FAR *ppmk) + { + return E_NOTIMPL; + } + + virtual HRESULT STDMETHODCALLTYPE GetContainer(IOleContainer __RPC_FAR *__RPC_FAR *ppContainer) + { + ppContainer = 0; + return E_NOINTERFACE; + } + + virtual HRESULT STDMETHODCALLTYPE ShowObject() + { + return S_OK; + } + + virtual HRESULT STDMETHODCALLTYPE OnShowWindow(BOOL fShow) + { + return S_OK; + } + + virtual HRESULT STDMETHODCALLTYPE RequestNewObjectLayout() + { + return S_OK; + } + + + // IOleInPlaceSite: + + virtual HRESULT STDMETHODCALLTYPE CanInPlaceActivate() + { + return S_OK; + } + + virtual HRESULT STDMETHODCALLTYPE OnInPlaceActivate() + { + return S_OK; + } + + virtual HRESULT STDMETHODCALLTYPE OnUIActivate() + { + return S_OK; + } + + virtual HRESULT STDMETHODCALLTYPE GetWindowContext( + /* [out] */ IOleInPlaceFrame __RPC_FAR *__RPC_FAR *ppFrame, + /* [out] */ IOleInPlaceUIWindow __RPC_FAR *__RPC_FAR *ppDoc, + /* [out] */ LPRECT lprcPosRect, + /* [out] */ LPRECT lprcClipRect, + /* [out][in] */ LPOLEINPLACEFRAMEINFO lpFrameInfo) + { + ClientRect rect(_hwnd); + + ppFrame = 0; + ppDoc = 0; + *lprcPosRect = rect; + *lprcClipRect = rect; + + assert(lpFrameInfo->cb>=sizeof(OLEINPLACEFRAMEINFO)); + lpFrameInfo->fMDIApp = FALSE; + lpFrameInfo->hwndFrame = 0; + lpFrameInfo->haccel = 0; + lpFrameInfo->cAccelEntries = 0; + + return S_OK; + } + + virtual HRESULT STDMETHODCALLTYPE Scroll(/* [in] */ SIZE scrollExtant) + { + return S_OK; + } + + virtual HRESULT STDMETHODCALLTYPE OnUIDeactivate(/* [in] */ BOOL fUndoable) + { + return S_OK; + } + + virtual HRESULT STDMETHODCALLTYPE OnInPlaceDeactivate() + { + return S_OK; + } + + virtual HRESULT STDMETHODCALLTYPE DiscardUndoState() + { + return S_OK; + } + + virtual HRESULT STDMETHODCALLTYPE DeactivateAndUndo() + { + return S_OK; + } + + virtual HRESULT STDMETHODCALLTYPE OnPosRectChange(/* [in] */ LPCRECT lprcPosRect) + { + return S_OK; + } +}; + + + // window with in place activates Active-X Control + +template struct IPCtrlWindow : public BASE +{ + typedef BASE super; + + IPCtrlWindow(HWND hwnd) + : super(hwnd) + { + } + + template IPCtrlWindow(HWND hwnd, T& info) + : super(hwnd, info) + { + } + + HRESULT create_control(HWND hwnd, REFIID clsid, REFIID riid) + { + // Erzeugen einer Instanz des Controls + HRESULT hr = _control.CreateInstance(clsid, riid); + if (FAILED(hr)) + return hr; + + _client_side.attach(hwnd); + + hr = _client_side.attach_control(SIfacePtr(_control, IID_IOleObject)/*, OLEIVERB_INPLACEACTIVATE, + hwnd, &Rect(10, 10, 500, 500)*/); + if (FAILED(hr)) + return hr; + + // try to get a IOleInPlaceObject interface for window resizing + return _control.QueryInterface(IID_IOleInPlaceObject, &_in_place_object); // _in_place_object = _control + } + +protected: + LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam) + { + if (nmsg == WM_SIZE) { + if (_in_place_object) { + RECT rect = {0, 0, LOWORD(lparam), HIWORD(lparam)}; + + _in_place_object->SetObjectRects(&rect, &rect); + } + } else if (nmsg == WM_CLOSE) { + _in_place_object = NULL; + + if (_control) { + _client_side.detach(SIfacePtr(_control, IID_IOleObject), OLECLOSE_NOSAVE); + _control = NULL; + } + } + + return super::WndProc(nmsg, wparam, lparam); + } + + ComInit _usingCOM; + SMARTPTR _control; + OleInPlaceClient _client_side; + SIfacePtr _in_place_object; +}; + + + +#include "exdispid.h" + + +struct DWebBrowserEvents2IF +{ + virtual void StatusTextChange(const BStr& text) + {} + + virtual void ProgressChange(long progress, long progressMax) + {} + + virtual void WindowMove() + {} + + virtual void WindowResize() + {} + + virtual void WindowActivate() + {} + + virtual void PropertyChange(const BStr& property) + {} + + virtual void DownloadComplete() + {} + + virtual void CommandStateChange(long command, bool enable) + {} + + virtual void DownloadBegin() + {} + + virtual void NewWindow2(IDispatch** ppDisp, VARIANT_BOOL& cancel) + {} + + virtual void TitleChange(const BStr& text) + {} + + virtual void TitleIconChange(const BStr& text) + {} + + virtual void FrameBeforeNavigate(const BStr& url, long flags, const BStr& targetFrameName, VARIANT* postData, const BStr& headers, VARIANT_BOOL& cancel) + {} + + virtual void FrameNavigateComplete(const BStr& url) + {} + + virtual void FrameNewWindow(const BStr&url, long flags, const BStr& targetFrameName, VARIANT* postData, const BStr& headers, VARIANT_BOOL& processed) + {} + + virtual void BeforeNavigate2(IDispatch* pDisp, const Variant& url, const Variant& flags, + const Variant& targetFrameName, const Variant& postData, + const Variant& headers, VARIANT_BOOL& cancel) + {} + + virtual void NavigateComplete2(IDispatch* pDisp, const Variant& url) + {} + + virtual void OnQuit() + {} + + virtual void OnVisible(bool Visible) + {} + + virtual void OnToolbar(bool Visible) + {} + + virtual void OnMenubar(bool Visible) + {} + + virtual void OnStatusbar(bool Visible) + {} + + virtual void OnFullscreen(bool Visible) + {} + + virtual void DocumentComplete() + {} + + virtual void OnTheatermode(bool Visible) + {} + + virtual void OnAddressbar(bool Visible) + {} + + virtual void WindowSetResizable(bool Visible) + {} + + virtual void WindowClosing(VARIANT_BOOL IsChildWindow, VARIANT_BOOL& cancel) + {} + + virtual void WindowSetLeft(long Left) + {} + + virtual void WindowSetTop(long Top) + {} + + virtual void WindowSetWidth(long Width) + {} + + virtual void WindowSetHeight(long Height) + {} + + virtual void ClientToHostWindow(long& CX, long& CY) + {} + + virtual void SetSecureLockIcon(long SecureLockIcon) + {} + + virtual void FileDownload(Variant& cancel) + {} + + virtual void NavigateError(IDispatch* pDisp, const Variant& url, const Variant& Frame, const Variant& StatusCode, VARIANT_BOOL& cancel) + {} + + virtual void PrivacyImpactedStateChange(bool bImpacted) + {} +}; + + + // The web browser control has to be initialized completely before being able, + // to display a page, that does not access internet. +struct ANSUNC BrowserNavigator +{ + BrowserNavigator(); + + void attach(IWebBrowser* browser); + void goto_url(LPCTSTR url); + void set_html_page(const String& html_txt); + void navigated(LPCTSTR url); + + IWebBrowser* get_browser() {return _browser.get();} + +protected: + SIfacePtr _browser; + String _new_url; + String _new_html_txt; + bool _browser_initialized; +}; + + + // MinGW defines a wrong FixedDWebBrowserEvents2 interface with virtual functions for DISPID calls, so we use our own, corrected version: +interface FixedDWebBrowserEvents2 : public IDispatch +{ +}; + +struct ANSUNC DWebBrowserEvents2Impl : public SimpleComObject, + public IComSrvBase, + public DWebBrowserEvents2IF +{ + typedef IComSrvBase super; + + + DWebBrowserEvents2IF* _callback; + + + DWebBrowserEvents2Impl(BrowserNavigator& navigator) + : super(DIID_DWebBrowserEvents2), + _navigator(navigator) + { + _callback = this; + } + + +/* // IUnknown + STDMETHOD(QueryInterface)(REFIID riid, LPVOID* ppv) + { + *ppv = NULL; + + if (SUCCEEDED(super::QueryInterface(riid, ppv))) + return S_OK; + + return E_NOINTERFACE; + } */ + + + // IDispatch + STDMETHOD(GetTypeInfoCount)(UINT* pctinfo) + {return E_NOTIMPL;} + + STDMETHOD(GetTypeInfo)(UINT iTInfo, LCID lcid, ITypeInfo** ppTInfo) + {return E_NOTIMPL;} + + STDMETHOD(GetIDsOfNames)(REFIID riid, LPOLESTR* rgszNames, UINT cNames, LCID lcid, DISPID* rgDispId) + {return E_NOTIMPL;} + + STDMETHOD(Invoke)(DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, + DISPPARAMS __RPC_FAR *pDispParams, VARIANT __RPC_FAR *pVarResult, EXCEPINFO __RPC_FAR *pExcepInfo, UINT __RPC_FAR *puArgErr) + { + switch(dispIdMember) { + case DISPID_STATUSTEXTCHANGE: + _callback->StatusTextChange((BStr)Variant(pDispParams->rgvarg[0])); + break; + + case DISPID_COMMANDSTATECHANGE: + _callback->CommandStateChange(Variant(pDispParams->rgvarg[1]), Variant(pDispParams->rgvarg[0])); + break; + + case DISPID_DOWNLOADBEGIN: + _callback->DownloadBegin(); + break; + + case DISPID_PROGRESSCHANGE: // sent when download progress is updated + _callback->ProgressChange(Variant(pDispParams->rgvarg[1]), Variant(pDispParams->rgvarg[0])); + break; + + case DISPID_WINDOWMOVE: // sent when main window has been moved + _callback->WindowMove(); + break; + + case DISPID_WINDOWRESIZE: // sent when main window has been sized + _callback->WindowResize(); + break; + + case DISPID_WINDOWACTIVATE: // sent when main window has been activated + _callback->WindowActivate(); + break; + + case DISPID_PROPERTYCHANGE: // sent when the PutProperty method is called + _callback->PropertyChange((BStr)Variant(pDispParams->rgvarg[0])); + break; + + case DISPID_TITLECHANGE: // sent when the document title changes + _callback->TitleChange((BStr)Variant(pDispParams->rgvarg[0])); + break; + + case DISPID_TITLEICONCHANGE: // sent when the top level window icon may have changed. + _callback->TitleIconChange((BStr)Variant(pDispParams->rgvarg[0])); + break; + + + // anything below here is not present in DWebBrowserEvents, only in DWebBrowserEvents2: -> + + case DISPID_FRAMEBEFORENAVIGATE: + if (pDispParams->cArgs != 6) + return E_INVALIDARG; + if (V_VT(&pDispParams->rgvarg[0]) != (VT_BOOL|VT_BYREF)) + return E_INVALIDARG; + _callback->FrameBeforeNavigate( + (BStr)Variant(&pDispParams->rgvarg[5]), Variant(&pDispParams->rgvarg[4]), + (BStr)Variant(&pDispParams->rgvarg[3]), &pDispParams->rgvarg[2], + (BStr)Variant(&pDispParams->rgvarg[1]), *V_BOOLREF(&pDispParams->rgvarg[0])); + break; + + case DISPID_FRAMENAVIGATECOMPLETE: + if (pDispParams->cArgs != 1) + return E_INVALIDARG; + _callback->FrameNavigateComplete((BStr)Variant(pDispParams->rgvarg[0])); + break; + + case DISPID_FRAMENEWWINDOW: + if (pDispParams->cArgs != 6) + return E_INVALIDARG; + if (V_VT(&pDispParams->rgvarg[0]) != (VT_BOOL|VT_BYREF)) + return E_INVALIDARG; + _callback->FrameNewWindow((BStr)Variant(&pDispParams->rgvarg[5]), Variant(&pDispParams->rgvarg[4]), + (BStr)Variant(&pDispParams->rgvarg[3]), &pDispParams->rgvarg[2], + (BStr)Variant(&pDispParams->rgvarg[1]), *V_BOOLREF(&pDispParams->rgvarg[0])); + break; + + case DISPID_BEFORENAVIGATE2: // hyperlink clicked on + if (pDispParams->cArgs != 7) + return E_INVALIDARG; + if (V_VT(&pDispParams->rgvarg[0]) != (VT_BOOL|VT_BYREF)) + return E_INVALIDARG; + _callback->BeforeNavigate2(Variant(pDispParams->rgvarg[6]), + pDispParams->rgvarg[5], &pDispParams->rgvarg[4], + pDispParams->rgvarg[3], &pDispParams->rgvarg[2], + pDispParams->rgvarg[1], *V_BOOLREF(&pDispParams->rgvarg[0])); + break; + + case DISPID_NEWWINDOW2: // sent when a new window should be created + if (pDispParams->cArgs != 2) + return E_INVALIDARG; + if (V_VT(&pDispParams->rgvarg[0]) != (VT_BOOL|VT_BYREF)) + return E_INVALIDARG; + if (V_VT(&pDispParams->rgvarg[1]) != (VT_DISPATCH|VT_BYREF)) + return E_INVALIDARG; + _callback->NewWindow2(V_DISPATCHREF(&pDispParams->rgvarg[1]), *V_BOOLREF(&pDispParams->rgvarg[0])); + break; + + case DISPID_NAVIGATECOMPLETE2:// UIActivate new document + if (pDispParams->cArgs != 2) + return E_INVALIDARG; + + // notify the navigator + NavigateComplete2(Variant(pDispParams->rgvarg[1]), Variant(pDispParams->rgvarg[0])); + + _callback->NavigateComplete2(Variant(pDispParams->rgvarg[1]), Variant(pDispParams->rgvarg[0])); + break; + + case DISPID_ONQUIT: + _callback->OnQuit(); + break; + + case DISPID_ONVISIBLE: // sent when the window goes visible/hidden + if (pDispParams->cArgs != 1) + return E_INVALIDARG; + _callback->OnVisible(Variant(pDispParams->rgvarg[0])); + break; + + case DISPID_ONTOOLBAR: // sent when the toolbar should be shown/hidden + if (pDispParams->cArgs != 1) + return E_INVALIDARG; + _callback->OnToolbar(Variant(pDispParams->rgvarg[0])); + break; + + case DISPID_ONMENUBAR: // sent when the menubar should be shown/hidden + if (pDispParams->cArgs != 1) + return E_INVALIDARG; + _callback->OnMenubar(Variant(pDispParams->rgvarg[0])); + break; + + case DISPID_ONSTATUSBAR: // sent when the statusbar should be shown/hidden + if (pDispParams->cArgs != 1) + return E_INVALIDARG; + _callback->OnStatusbar(Variant(pDispParams->rgvarg[0])); + break; + + case DISPID_ONFULLSCREEN: // sent when kiosk mode should be on/off + if (pDispParams->cArgs != 1) + return E_INVALIDARG; + _callback->OnFullscreen(Variant(pDispParams->rgvarg[0])); + break; + + case DISPID_DOCUMENTCOMPLETE:// new document goes ReadyState_Complete + _callback->DocumentComplete(); + break; + + case DISPID_DOWNLOADCOMPLETE: + _callback->DownloadComplete(); + break; + + case DISPID_ONTHEATERMODE: // sent when theater mode should be on/off + if (pDispParams->cArgs != 1) + return E_INVALIDARG; + _callback->OnTheatermode(Variant(pDispParams->rgvarg[0])); + break; + + case DISPID_ONADDRESSBAR: // sent when the address bar should be shown/hidden + if (pDispParams->cArgs != 1) + return E_INVALIDARG; + _callback->OnAddressbar(Variant(pDispParams->rgvarg[0])); + break; + + case DISPID_WINDOWSETRESIZABLE:// sent to set the style of the host window frame + if (pDispParams->cArgs != 1) + return E_INVALIDARG; + _callback->WindowSetResizable(Variant(pDispParams->rgvarg[0])); + break; + + case DISPID_WINDOWCLOSING: // sent before script window.close closes the window + if (pDispParams->cArgs != 2) + return E_INVALIDARG; + if (V_VT(&pDispParams->rgvarg[0]) != (VT_BOOL|VT_BYREF)) + return E_INVALIDARG; + _callback->WindowClosing(Variant(pDispParams->rgvarg[1]), *V_BOOLREF(&pDispParams->rgvarg[0])); + break; + + case DISPID_WINDOWSETLEFT: // sent when the put_left method is called on the WebOC + if (pDispParams->cArgs != 1) + return E_INVALIDARG; + _callback->WindowSetLeft(Variant(pDispParams->rgvarg[0])); + break; + + case DISPID_WINDOWSETTOP: // sent when the put_top method is called on the WebOC + if (pDispParams->cArgs != 1) + return E_INVALIDARG; + _callback->WindowSetTop(Variant(pDispParams->rgvarg[0])); + break; + + case DISPID_WINDOWSETWIDTH: // sent when the put_width method is called on the WebOC + if (pDispParams->cArgs != 1) + return E_INVALIDARG; + _callback->WindowSetWidth(Variant(pDispParams->rgvarg[0])); + break; + + case DISPID_WINDOWSETHEIGHT: // sent when the put_height method is called on the WebOC + if (pDispParams->cArgs != 1) + return E_INVALIDARG; + _callback->WindowSetHeight(Variant(pDispParams->rgvarg[0])); + break; + + case DISPID_CLIENTTOHOSTWINDOW:// sent during window.open to request conversion of dimensions + if (pDispParams->cArgs != 2) + return E_INVALIDARG; + if (V_VT(&pDispParams->rgvarg[0]) != (VT_I4|VT_BYREF)) + return E_INVALIDARG; + if (V_VT(&pDispParams->rgvarg[1]) != (VT_I4|VT_BYREF)) + return E_INVALIDARG; + _callback->ClientToHostWindow(*V_I4REF(&pDispParams->rgvarg[1]), *V_I4REF(&pDispParams->rgvarg[0])); + break; + + case DISPID_SETSECURELOCKICON:// sent to suggest the appropriate security icon to show + if (pDispParams->cArgs != 1) + return E_INVALIDARG; + _callback->SetSecureLockIcon(Variant(pDispParams->rgvarg[0])); + break; + + case DISPID_FILEDOWNLOAD: { // Fired to indicate the File Download dialog is opening + if (pDispParams->cArgs != 1) //@@ every time 2 ?! + return E_INVALIDARG; + Variant var(pDispParams->rgvarg[0]); + _callback->FileDownload(var);} + break; + + case DISPID_NAVIGATEERROR: // Fired to indicate the a binding error has occured + if (pDispParams->cArgs != 5) + return E_INVALIDARG; + if (V_VT(&pDispParams->rgvarg[0]) != (VT_BOOL|VT_BYREF)) + return E_INVALIDARG; + _callback->NavigateError(Variant(pDispParams->rgvarg[4]), Variant(pDispParams->rgvarg[3]), + Variant(pDispParams->rgvarg[2]), Variant(pDispParams->rgvarg[1]), + *V_BOOLREF(&pDispParams->rgvarg[0])); + break; + + case DISPID_PRIVACYIMPACTEDSTATECHANGE:// Fired when the user's browsing experience is impacted + if (pDispParams->cArgs != 1) + return E_INVALIDARG; + _callback->PrivacyImpactedStateChange(Variant(pDispParams->rgvarg[0])); + break; + + default: + return NOERROR; + } + + return S_OK; + } + +protected: + BrowserNavigator& _navigator; + + void NavigateComplete2(IDispatch* pDisp, const Variant& url) + { + String adr = (BStr)url; + + _navigator.navigated(adr); + } +}; + + + /// encapsulation of the Web control +struct WebChildWindow : public IPCtrlWindow >, + public DWebBrowserEvents2Impl +{ + typedef IPCtrlWindow > super; + typedef DWebBrowserEvents2Impl web_super; + + WebChildWindow(HWND hwnd, const WebChildWndInfo& info); + + static WebChildWindow* create(const WebChildWndInfo& info) + { + ChildWindow* child = ChildWindow::create(info, + WINDOW_CREATOR_INFO(WebChildWindow,WebChildWndInfo), CLASSNAME_CHILDWND, NULL, WS_CHILD|WS_VISIBLE); + + return static_cast(child); + } + + + // DWebBrowserEvents2Impl overides -> + + void BeforeNavigate2(IDispatch* pDisp, const Variant& url, const Variant& flags, + const Variant& targetFrameName, const Variant& postData, + const Variant& headers, VARIANT_BOOL& cancel) + { + //String adr = (BStr)url; + } + + void NavigateComplete2(IDispatch* pDisp, const Variant& url) + { + web_super::NavigateComplete2(pDisp, url); + + set_url(String(BStr(url))); + } + + void StatusTextChange(const BStr& text) + { + _statusText = text; + SendMessage(_hwndFrame, PM_SETSTATUSTEXT, 0, (LPARAM)_statusText.c_str()); + } + + void ProgressChange(long Progress, long ProgressMax) + { + } + + void WindowMove() + { + } + + void WindowResize() + { + } + + void WindowActivate() + { + } + + void PropertyChange(const BStr& Property) + { + Variant value; + _control->GetProperty(Property, &value); + } + + void CommandStateChange(long command/*CSC_NAVIGATEFORWARD, CSC_NAVIGATEBACK*/, bool enable) + { + } + + void DownloadBegin() + { + } + + void NewWindow2(IDispatch** ppDisp, VARIANT_BOOL& cancel) + { + //*ppDisp = ; + //cancel = TRUE; + } + + void TitleChange(const BStr& text) + { + SetWindowText(_hwnd, String(text)); + } + + void TitleIconChange(const BStr& text) + { + } + + void FrameBeforeNavigate(const BStr& url, long flags, const BStr& targetFrameName, VARIANT* postData, const BStr& headers, VARIANT_BOOL& cancel) + { + } + + void FrameNavigateComplete(const BStr& url) + { + } + + void FrameNewWindow(const BStr& url, long flags, const BStr& targetFrameName, VARIANT* postData, const BStr& headers, VARIANT_BOOL& processed) + { + } + + void OnQuit() + { + } + + void OnVisible(bool Visible) + { + } + + void OnToolbar(bool Visible) + { + } + + void OnMenubar(bool Visible) + { + } + + void OnStatusbar(bool Visible) + { + } + + void OnFullscreen(bool Visible) + { + } + + void DocumentComplete() + { + } + + void OnTheatermode(bool Visible) + { + } + + void OnAddressbar(bool Visible) + { + } + + void WindowSetResizable(bool Visible) + { + } + + void WindowClosing(VARIANT_BOOL IsChildWindow, VARIANT_BOOL& cancel) + { + } + + void WindowSetLeft(long Left) + { + } + + void WindowSetTop(long Top) + { + } + + void WindowSetWidth(long Width) + { + } + + void WindowSetHeight(long Height) + { + } + + void ClientToHostWindow(long& CX, long& CY) + { + } + + void SetSecureLockIcon(long SecureLockIcon) + { + } + + void FileDownload(Variant& cancel) + { + } + + void NavigateError(IDispatch* pDisp, const Variant& url, const Variant& Frame, const Variant& StatusCode, VARIANT_BOOL& cancel) + { + } + + void PrivacyImpactedStateChange(bool bImpacted) + { + } + + +protected: + BrowserNavigator _navigator; + auto_ptr _connector; + + LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam); + + virtual String jump_to_int(LPCTSTR url); +}; From 180cf153bb014a43de40d77b536f38eca81a3d0f Mon Sep 17 00:00:00 2001 From: Thomas Bluemel Date: Wed, 26 Jan 2005 00:43:24 +0000 Subject: [PATCH 007/185] don't shift the PIDs of objects so the first bit can be used to lock objects, as the lower 2 bits of PIDs are now always zero just test and set this bit svn path=/trunk/; revision=13303 --- reactos/include/win32k/ntuser.h | 2 +- reactos/subsys/win32k/objects/gdiobj.c | 172 ++++++++++++------------- 2 files changed, 81 insertions(+), 93 deletions(-) diff --git a/reactos/include/win32k/ntuser.h b/reactos/include/win32k/ntuser.h index 13983b00a4f..71f39147310 100644 --- a/reactos/include/win32k/ntuser.h +++ b/reactos/include/win32k/ntuser.h @@ -1814,7 +1814,7 @@ typedef struct tagKMDDELPARAM typedef struct _GDI_TABLE_ENTRY { PVOID KernelData; /* Points to the kernel mode structure */ - LONG ProcessId; /* process id that created the object, 0 for stock objects */ + HANDLE ProcessId; /* process id that created the object, 0 for stock objects */ LONG Type; /* the first 16 bit is the object type including the stock obj flag, the last 16 bits is just the object type */ PVOID UserData; /* Points to the user mode structure, usually NULL though */ } GDI_TABLE_ENTRY, *PGDI_TABLE_ENTRY; diff --git a/reactos/subsys/win32k/objects/gdiobj.c b/reactos/subsys/win32k/objects/gdiobj.c index 94ff539d2e4..0be5dc8e9d7 100644 --- a/reactos/subsys/win32k/objects/gdiobj.c +++ b/reactos/subsys/win32k/objects/gdiobj.c @@ -327,7 +327,7 @@ GDIOBJ_AllocObj(ULONG ObjectType) PW32PROCESS W32Process; PGDIOBJHDR newObject; PPAGED_LOOKASIDE_LIST LookasideList; - LONG CurrentProcessId, LockedProcessId; + HANDLE CurrentProcessId, LockedProcessId; #ifdef GDI_DEBUG ULONG Attempts = 0; #endif @@ -351,11 +351,8 @@ GDIOBJ_AllocObj(ULONG ObjectType) PGDIOBJ ObjectBody; LONG TypeInfo; - /* shift the process id to the left so we can use the first bit to lock - the object. - FIXME - don't shift once ROS' PIDs match with nt! */ - CurrentProcessId = (LONG)PsGetCurrentProcessId() << 1; - LockedProcessId = CurrentProcessId | 0x1; + CurrentProcessId = PsGetCurrentProcessId(); + LockedProcessId = (HANDLE)((ULONG_PTR)CurrentProcessId | 0x1); newObject->LockingThread = NULL; newObject->Locks = 0; @@ -376,7 +373,7 @@ GDIOBJ_AllocObj(ULONG ObjectType) FreeEntry = InterlockedPopEntrySList(&HandleTable->FreeEntriesHead); if(FreeEntry != NULL) { - LONG PrevProcId; + HANDLE PrevProcId; UINT Index; HGDIOBJ Handle; @@ -387,8 +384,8 @@ GDIOBJ_AllocObj(ULONG ObjectType) Handle = (HGDIOBJ)((Index & 0xFFFF) | (ObjectType & 0xFFFF0000)); LockHandle: - PrevProcId = InterlockedCompareExchange(&Entry->ProcessId, LockedProcessId, 0); - if(PrevProcId == 0) + PrevProcId = InterlockedCompareExchangePointer(&Entry->ProcessId, LockedProcessId, 0); + if(PrevProcId == NULL) { ASSERT(Entry->KernelData == NULL); @@ -399,7 +396,7 @@ LockHandle: Entry->Type = TypeInfo; /* unlock the entry */ - InterlockedExchange(&Entry->ProcessId, CurrentProcessId); + InterlockedExchangePointer(&Entry->ProcessId, CurrentProcessId); #ifdef GDI_DEBUG memset ( GDIHandleAllocator[Index], 0xcd, GDI_STACK_LEVELS * sizeof(ULONG) ); @@ -468,7 +465,8 @@ GDIOBJ_FreeObj(HGDIOBJ hObj, DWORD ObjectType) { PGDI_TABLE_ENTRY Entry; PPAGED_LOOKASIDE_LIST LookasideList; - LONG ProcessId, LockedProcessId, PrevProcId, ExpectedType; + HANDLE ProcessId, LockedProcessId, PrevProcId; + LONG ExpectedType; #ifdef GDI_DEBUG ULONG Attempts = 0; #endif @@ -484,10 +482,8 @@ GDIOBJ_FreeObj(HGDIOBJ hObj, DWORD ObjectType) return FALSE; } - /* shift the process id to the left so we can use the first bit to lock the object. - FIXME - don't shift once ROS' PIDs match with nt! */ - ProcessId = (LONG)PsGetCurrentProcessId() << 1; - LockedProcessId = ProcessId | 0x1; + ProcessId = PsGetCurrentProcessId(); + LockedProcessId = (HANDLE)((ULONG_PTR)ProcessId | 0x1); ExpectedType = ((ObjectType != GDI_OBJECT_TYPE_DONTCARE) ? ObjectType : 0); @@ -496,7 +492,7 @@ GDIOBJ_FreeObj(HGDIOBJ hObj, DWORD ObjectType) LockHandle: /* lock the object, we must not delete global objects, so don't exchange the locking process ID to zero when attempting to lock a global object... */ - PrevProcId = InterlockedCompareExchange(&Entry->ProcessId, LockedProcessId, ProcessId); + PrevProcId = InterlockedCompareExchangePointer(&Entry->ProcessId, LockedProcessId, ProcessId); if(PrevProcId == ProcessId) { if(Entry->Type != 0 && Entry->KernelData != NULL && (ExpectedType == 0 || ((Entry->Type << 16) == ExpectedType))) @@ -516,7 +512,7 @@ LockHandle: Entry->KernelData = NULL; /* unlock the handle slot */ - InterlockedExchange(&Entry->ProcessId, 0); + InterlockedExchangePointer(&Entry->ProcessId, NULL); /* push this entry to the free list */ InterlockedPushEntrySList(&HandleTable->FreeEntriesHead, @@ -546,7 +542,7 @@ LockHandle: Entry->Type = 0; /* unlock the handle slot */ - InterlockedExchange(&Entry->ProcessId, 0); + InterlockedExchangePointer(&Entry->ProcessId, NULL); /* report a successful deletion as the object is actually removed from the table */ return TRUE; @@ -562,7 +558,7 @@ LockHandle: { DPRINT1("Attempted to delete object 0x%x which was already deleted!\n", hObj); } - InterlockedExchange(&Entry->ProcessId, PrevProcId); + InterlockedExchangePointer(&Entry->ProcessId, PrevProcId); } } else if(PrevProcId == LockedProcessId) @@ -581,13 +577,13 @@ LockHandle: } else { - if((PrevProcId >> 1) == 0) + if(((ULONG_PTR)PrevProcId & 0x1) == 0) { DPRINT1("Attempted to free global gdi handle 0x%x, caller needs to get ownership first!!!", hObj); } else { - DPRINT1("Attempted to free foreign handle: 0x%x Owner: 0x%x from Caller: 0x%x\n", hObj, PrevProcId >> 1, ProcessId >> 1); + DPRINT1("Attempted to free foreign handle: 0x%x Owner: 0x%x from Caller: 0x%x\n", hObj, (ULONG_PTR)PrevProcId & ~0x1, (ULONG_PTR)ProcessId & ~0x1); } #ifdef GDI_DEBUG DPRINT1("-> called from %s:%i\n", file, line); @@ -712,7 +708,7 @@ GDI_CleanupForProcess (struct _EPROCESS *Process) PGDI_TABLE_ENTRY Entry, End; PEPROCESS CurrentProcess; PW32PROCESS W32Process; - LONG ProcId; + HANDLE ProcId; ULONG Index = RESERVE_ENTRIES_COUNT; DPRINT("Starting CleanupForProcess prochandle %x Pid %d\n", Process, Process->UniqueProcessId); @@ -728,7 +724,7 @@ GDI_CleanupForProcess (struct _EPROCESS *Process) { /* FIXME - Instead of building the handle here and delete it using GDIOBJ_FreeObj we should delete it directly here! */ - ProcId = ((LONG)Process->UniqueProcessId << 1); + ProcId = Process->UniqueProcessId; End = &HandleTable->Entries[GDI_HANDLE_COUNT]; for(Entry = &HandleTable->Entries[RESERVE_ENTRIES_COUNT]; @@ -736,7 +732,7 @@ GDI_CleanupForProcess (struct _EPROCESS *Process) Entry++, Index++) { /* ignore the lock bit */ - if((Entry->ProcessId & ~0x1) == ProcId && Entry->Type != 0) + if((HANDLE)((ULONG_PTR)Entry->ProcessId & ~0x1) == ProcId && Entry->Type != 0) { HGDIOBJ ObjectHandle; @@ -785,7 +781,8 @@ GDIOBJ_LockObj (HGDIOBJ hObj, DWORD ObjectType) { PGDI_TABLE_ENTRY Entry; PETHREAD Thread; - LONG ProcessId, LockedProcessId, PrevProcId, ExpectedType; + HANDLE ProcessId, LockedProcessId, PrevProcId; + LONG ExpectedType; #ifdef GDI_DEBUG ULONG Attempts = 0; #endif @@ -794,10 +791,8 @@ GDIOBJ_LockObj (HGDIOBJ hObj, DWORD ObjectType) Thread = PsGetCurrentThread(); - /* shift the process id to the left so we can use the first bit to lock the object. - FIXME - don't shift once ROS' PIDs match with nt! */ - ProcessId = (LONG)PsGetCurrentProcessId() << 1; - LockedProcessId = ProcessId | 0x1; + ProcessId = PsGetCurrentProcessId(); + LockedProcessId = (HANDLE)((ULONG_PTR)ProcessId | 0x1); ExpectedType = ((ObjectType != GDI_OBJECT_TYPE_DONTCARE) ? ObjectType : 0); @@ -805,7 +800,7 @@ GDIOBJ_LockObj (HGDIOBJ hObj, DWORD ObjectType) LockHandle: /* lock the object, we must not delete stock objects, so don't check!!! */ - PrevProcId = InterlockedCompareExchange(&Entry->ProcessId, LockedProcessId, ProcessId); + PrevProcId = InterlockedCompareExchangePointer(&Entry->ProcessId, LockedProcessId, ProcessId); if(PrevProcId == ProcessId) { LONG EntryType = Entry->Type << 16; @@ -835,14 +830,14 @@ LockHandle: #endif } - InterlockedExchange(&Entry->ProcessId, PrevProcId); + InterlockedExchangePointer(&Entry->ProcessId, PrevProcId); /* we're done, return the object body */ return GDIHdrToBdy(GdiHdr); } else { - InterlockedExchange(&Entry->ProcessId, PrevProcId); + InterlockedExchangePointer(&Entry->ProcessId, PrevProcId); #ifdef GDI_DEBUG if(++Attempts > 20) @@ -857,7 +852,7 @@ LockHandle: } else { - InterlockedExchange(&Entry->ProcessId, PrevProcId); + InterlockedExchangePointer(&Entry->ProcessId, PrevProcId); if(EntryType == 0) { @@ -888,17 +883,17 @@ LockHandle: /* try again */ goto LockHandle; } - else if((PrevProcId & ~0x1) == 0) + else if(((ULONG_PTR)PrevProcId & ~0x1) == 0) { /* we're trying to lock a global object, change the ProcessId to 0 and try again */ - ProcessId = 0x0; - LockedProcessId = ProcessId |0x1; + ProcessId = NULL; + LockedProcessId = (HANDLE)((ULONG_PTR)ProcessId | 0x1); goto LockHandle; } else { - DPRINT1("Attempted to lock foreign handle: 0x%x, Owner: 0x%x locked: 0x%x Caller: 0x%x, stockobj: 0x%x\n", hObj, PrevProcId >> 1, PrevProcId & 0x1, PsGetCurrentProcessId(), GDI_HANDLE_IS_STOCKOBJ(hObj)); + DPRINT1("Attempted to lock foreign handle: 0x%x, Owner: 0x%x locked: 0x%x Caller: 0x%x, stockobj: 0x%x\n", hObj, (ULONG_PTR)PrevProcId & ~0x1, (ULONG_PTR)PrevProcId & 0x1, PsGetCurrentProcessId(), GDI_HANDLE_IS_STOCKOBJ(hObj)); KeRosDumpStackFrames ( NULL, 20 ); #ifdef GDI_DEBUG DPRINT1("-> called from %s:%i\n", file, line); @@ -927,7 +922,7 @@ GDIOBJ_UnlockObj (HGDIOBJ hObj) { PGDI_TABLE_ENTRY Entry; PETHREAD Thread; - LONG ProcessId, LockedProcessId, PrevProcId; + HANDLE ProcessId, LockedProcessId, PrevProcId; #ifdef GDI_DEBUG ULONG Attempts = 0; #endif @@ -935,16 +930,14 @@ GDIOBJ_UnlockObj (HGDIOBJ hObj) DPRINT("GDIOBJ_UnlockObj: hObj: 0x%08x\n", hObj); Thread = PsGetCurrentThread(); - /* shift the process id to the left so we can use the first bit to lock the object. - FIXME - don't shift once ROS' PIDs match with nt! */ - ProcessId = (LONG)PsGetCurrentProcessId() << 1; - LockedProcessId = ProcessId | 0x1; + ProcessId = PsGetCurrentProcessId(); + LockedProcessId = (HANDLE)((ULONG_PTR)ProcessId | 0x1); Entry = GDI_HANDLE_GET_ENTRY(HandleTable, hObj); LockHandle: /* lock the handle, we must not delete stock objects, so don't check!!! */ - PrevProcId = InterlockedCompareExchange(&Entry->ProcessId, LockedProcessId, ProcessId); + PrevProcId = InterlockedCompareExchangePointer(&Entry->ProcessId, LockedProcessId, ProcessId); if(PrevProcId == ProcessId) { /* we're unlocking an object that belongs to our process or it's a global @@ -982,7 +975,7 @@ LockHandle: /* we should delete the handle */ Entry->KernelData = NULL; - InterlockedExchange(&Entry->ProcessId, 0); + InterlockedExchangePointer(&Entry->ProcessId, 0); InterlockedPushEntrySList(&HandleTable->FreeEntriesHead, &HandleTable->FreeEntries[GDI_ENTRY_TO_INDEX(HandleTable, Entry)]); @@ -1005,7 +998,7 @@ LockHandle: else { /* remove the handle slot lock */ - InterlockedExchange(&Entry->ProcessId, PrevProcId); + InterlockedExchangePointer(&Entry->ProcessId, PrevProcId); Ret = TRUE; } @@ -1017,7 +1010,7 @@ LockHandle: { DPRINT1("Attempted to unlock object 0x%x, previously locked by other thread (0x%x) from %s:%i (called from %s:%i)\n", hObj, PrevThread, GdiHdr->lockfile, GdiHdr->lockline, file, line); - InterlockedExchange(&Entry->ProcessId, PrevProcId); + InterlockedExchangePointer(&Entry->ProcessId, PrevProcId); } #endif else @@ -1029,7 +1022,7 @@ LockHandle: } #endif /* FIXME - we should give up after some time unless we want to wait forever! */ - InterlockedExchange(&Entry->ProcessId, PrevProcId); + InterlockedExchangePointer(&Entry->ProcessId, PrevProcId); DelayExecution(); goto LockHandle; @@ -1037,7 +1030,7 @@ LockHandle: } else { - InterlockedExchange(&Entry->ProcessId, PrevProcId); + InterlockedExchangePointer(&Entry->ProcessId, PrevProcId); DPRINT1("Attempted to unlock object 0x%x that is deleted!\n", hObj); } } @@ -1055,17 +1048,17 @@ LockHandle: /* try again */ goto LockHandle; } - else if((PrevProcId & ~0x1) == 0) + else if(((ULONG_PTR)PrevProcId & ~0x1) == 0) { /* we're trying to unlock a global object, change the ProcessId to 0 and try again */ - ProcessId = 0x0; - LockedProcessId = ProcessId |0x1; + ProcessId = NULL; + LockedProcessId = (HANDLE)((ULONG_PTR)ProcessId | 0x1); goto LockHandle; } else { - DPRINT1("Attempted to unlock foreign handle: 0x%x, Owner: 0x%x locked: 0x%x Caller: 0x%x, stockobj: 0x%x\n", hObj, PrevProcId >> 1, PrevProcId & 0x1, PsGetCurrentProcessId(), GDI_HANDLE_IS_STOCKOBJ(hObj)); + DPRINT1("Attempted to unlock foreign handle: 0x%x, Owner: 0x%x locked: 0x%x Caller: 0x%x, stockobj: 0x%x\n", hObj, (ULONG_PTR)PrevProcId & ~0x1, (ULONG_PTR)PrevProcId & 0x1, PsGetCurrentProcessId(), GDI_HANDLE_IS_STOCKOBJ(hObj)); } return FALSE; @@ -1075,19 +1068,19 @@ BOOL INTERNAL_CALL GDIOBJ_OwnedByCurrentProcess(HGDIOBJ ObjectHandle) { PGDI_TABLE_ENTRY Entry; - LONG ProcessId; + HANDLE ProcessId; BOOL Ret; DPRINT("GDIOBJ_OwnedByCurrentProcess: ObjectHandle: 0x%08x\n", ObjectHandle); if(!GDI_HANDLE_IS_STOCKOBJ(ObjectHandle)) { - ProcessId = (LONG)PsGetCurrentProcessId() << 1; + ProcessId = PsGetCurrentProcessId(); Entry = GDI_HANDLE_GET_ENTRY(HandleTable, ObjectHandle); Ret = Entry->KernelData != NULL && Entry->Type != 0 && - (Entry->ProcessId & ~0x1) == ProcessId; + (HANDLE)((ULONG_PTR)Entry->ProcessId & ~0x1) == ProcessId; return Ret; } @@ -1103,7 +1096,7 @@ GDIOBJ_ConvertToStockObj(HGDIOBJ *hObj) * MIGHT ATTEMPT TO LOCK THE OBJECT DURING THIS CALL!!! */ PGDI_TABLE_ENTRY Entry; - LONG ProcessId, LockedProcessId, PrevProcId; + HANDLE ProcessId, LockedProcessId, PrevProcId; PETHREAD Thread; #ifdef GDI_DEBUG ULONG Attempts = 0; @@ -1117,16 +1110,14 @@ GDIOBJ_ConvertToStockObj(HGDIOBJ *hObj) if(!GDI_HANDLE_IS_STOCKOBJ(*hObj)) { - /* shift the process id to the left so we can use the first bit to lock the object. - FIXME - don't shift once ROS' PIDs match with nt! */ - ProcessId = (LONG)PsGetCurrentProcessId() << 1; - LockedProcessId = ProcessId | 0x1; + ProcessId = PsGetCurrentProcessId(); + LockedProcessId = (HANDLE)((ULONG_PTR)ProcessId | 0x1); Entry = GDI_HANDLE_GET_ENTRY(HandleTable, *hObj); LockHandle: /* lock the object, we must not convert stock objects, so don't check!!! */ - PrevProcId = InterlockedCompareExchange(&Entry->ProcessId, LockedProcessId, ProcessId); + PrevProcId = InterlockedCompareExchangePointer(&Entry->ProcessId, LockedProcessId, ProcessId); if(PrevProcId == ProcessId) { LONG NewType, PrevType, OldType; @@ -1165,7 +1156,7 @@ LockHandle: NTSTATUS Status; /* FIXME */ - Status = PsLookupProcessByProcessId((PVOID)(PrevProcId >> 1), &OldProcess); + Status = PsLookupProcessByProcessId((HANDLE)((ULONG_PTR)PrevProcId & ~0x1), &OldProcess); if(NT_SUCCESS(Status)) { W32Process = OldProcess->Win32Process; @@ -1178,7 +1169,7 @@ LockHandle: } /* remove the process id lock and make it global */ - InterlockedExchange(&Entry->ProcessId, GDI_GLOBAL_PROCESS); + InterlockedExchangePointer(&Entry->ProcessId, GDI_GLOBAL_PROCESS); *hObj = (HGDIOBJ)((ULONG)(*hObj) | GDI_HANDLE_STOCK_MASK); @@ -1199,7 +1190,7 @@ LockHandle: /* WTF?! The object is already locked by a different thread! Release the lock, wait a bit and try again! FIXME - we should give up after some time unless we want to wait forever! */ - InterlockedExchange(&Entry->ProcessId, PrevProcId); + InterlockedExchangePointer(&Entry->ProcessId, PrevProcId); DelayExecution(); goto LockHandle; @@ -1237,7 +1228,7 @@ void INTERNAL_CALL GDIOBJ_SetOwnership(HGDIOBJ ObjectHandle, PEPROCESS NewOwner) { PGDI_TABLE_ENTRY Entry; - LONG ProcessId, LockedProcessId, PrevProcId; + HANDLE ProcessId, LockedProcessId, PrevProcId; PETHREAD Thread; #ifdef GDI_DEBUG ULONG Attempts = 0; @@ -1249,16 +1240,14 @@ GDIOBJ_SetOwnership(HGDIOBJ ObjectHandle, PEPROCESS NewOwner) if(!GDI_HANDLE_IS_STOCKOBJ(ObjectHandle)) { - /* shift the process id to the left so we can use the first bit to lock the object. - FIXME - don't shift once ROS' PIDs match with nt! */ - ProcessId = (LONG)PsGetCurrentProcessId() << 1; - LockedProcessId = ProcessId | 0x1; + ProcessId = PsGetCurrentProcessId(); + LockedProcessId = (HANDLE)((ULONG_PTR)ProcessId | 0x1); Entry = GDI_HANDLE_GET_ENTRY(HandleTable, ObjectHandle); LockHandle: /* lock the object, we must not convert stock objects, so don't check!!! */ - PrevProcId = InterlockedCompareExchange(&Entry->ProcessId, ProcessId, LockedProcessId); + PrevProcId = InterlockedCompareExchangePointer(&Entry->ProcessId, ProcessId, LockedProcessId); if(PrevProcId == ProcessId) { PETHREAD PrevThread; @@ -1276,7 +1265,7 @@ LockHandle: /* dereference the process' object counter */ /* FIXME */ - Status = PsLookupProcessByProcessId((PVOID)(PrevProcId >> 1), &OldProcess); + Status = PsLookupProcessByProcessId((HANDLE)((ULONG_PTR)PrevProcId & ~0x1), &OldProcess); if(NT_SUCCESS(Status)) { W32Process = OldProcess->Win32Process; @@ -1289,8 +1278,7 @@ LockHandle: if(NewOwner != NULL) { - /* FIXME */ - ProcessId = (LONG)PsGetProcessId(NewOwner) << 1; + ProcessId = PsGetProcessId(NewOwner); /* Increase the new process' object counter */ W32Process = NewOwner->Win32Process; @@ -1303,7 +1291,7 @@ LockHandle: ProcessId = 0; /* remove the process id lock and change it to the new process id */ - InterlockedExchange(&Entry->ProcessId, ProcessId); + InterlockedExchangePointer(&Entry->ProcessId, ProcessId); /* we're done! */ return; @@ -1325,7 +1313,7 @@ LockHandle: being deleted in the meantime (because we don't have aquired a reference at this point). FIXME - we should give up after some time unless we want to wait forever! */ - InterlockedExchange(&Entry->ProcessId, PrevProcId); + InterlockedExchangePointer(&Entry->ProcessId, PrevProcId); DelayExecution(); goto LockHandle; @@ -1350,16 +1338,16 @@ LockHandle: /* try again */ goto LockHandle; } - else if((PrevProcId >> 1) == 0) + else if(((ULONG_PTR)PrevProcId & ~0x1) == 0) { /* allow changing ownership of global objects */ - ProcessId = 0; - LockedProcessId = ProcessId | 0x1; + ProcessId = NULL; + LockedProcessId = (HANDLE)((ULONG_PTR)ProcessId | 0x1); goto LockHandle; } - else if((PrevProcId >> 1) != (LONG)PsGetCurrentProcessId()) + else if((HANDLE)((ULONG_PTR)PrevProcId & ~0x1) != PsGetCurrentProcessId()) { - DPRINT1("Attempted to change ownership of object 0x%x (pid: 0x%x) from pid 0x%x!!!\n", ObjectHandle, PrevProcId >> 1, PsGetCurrentProcessId()); + DPRINT1("Attempted to change ownership of object 0x%x (pid: 0x%x) from pid 0x%x!!!\n", ObjectHandle, (ULONG_PTR)PrevProcId & ~0x1, PsGetCurrentProcessId()); } else { @@ -1373,7 +1361,7 @@ GDIOBJ_CopyOwnership(HGDIOBJ CopyFrom, HGDIOBJ CopyTo) { PGDI_TABLE_ENTRY FromEntry; PETHREAD Thread; - LONG FromProcessId, FromLockedProcessId, FromPrevProcId; + HANDLE FromProcessId, FromLockedProcessId, FromPrevProcId; #ifdef GDI_DEBUG ULONG Attempts = 0; #endif @@ -1386,12 +1374,12 @@ GDIOBJ_CopyOwnership(HGDIOBJ CopyFrom, HGDIOBJ CopyTo) { FromEntry = GDI_HANDLE_GET_ENTRY(HandleTable, CopyFrom); - FromProcessId = FromEntry->ProcessId & ~0x1; - FromLockedProcessId = FromProcessId | 0x1; + FromProcessId = (HANDLE)((ULONG_PTR)FromEntry->ProcessId & ~0x1); + FromLockedProcessId = (HANDLE)((ULONG_PTR)FromProcessId | 0x1); LockHandleFrom: /* lock the object, we must not convert stock objects, so don't check!!! */ - FromPrevProcId = InterlockedCompareExchange(&FromEntry->ProcessId, FromProcessId, FromLockedProcessId); + FromPrevProcId = InterlockedCompareExchangePointer(&FromEntry->ProcessId, FromProcessId, FromLockedProcessId); if(FromPrevProcId == FromProcessId) { PETHREAD PrevThread; @@ -1408,11 +1396,11 @@ LockHandleFrom: { /* now let's change the ownership of the target object */ - if((FromPrevProcId & ~0x1) != 0) + if(((ULONG_PTR)FromPrevProcId & ~0x1) != 0) { PEPROCESS ProcessTo; /* FIXME */ - if(NT_SUCCESS(PsLookupProcessByProcessId((PVOID)(FromPrevProcId >> 1), &ProcessTo))) + if(NT_SUCCESS(PsLookupProcessByProcessId((HANDLE)((ULONG_PTR)FromPrevProcId & ~0x1), &ProcessTo))) { GDIOBJ_SetOwnership(CopyTo, ProcessTo); ObDereferenceObject(ProcessTo); @@ -1424,7 +1412,7 @@ LockHandleFrom: GDIOBJ_SetOwnership(CopyTo, NULL); } - InterlockedExchange(&FromEntry->ProcessId, FromPrevProcId); + InterlockedExchangePointer(&FromEntry->ProcessId, FromPrevProcId); } else { @@ -1443,7 +1431,7 @@ LockHandleFrom: being deleted in the meantime (because we don't have aquired a reference at this point). FIXME - we should give up after some time unless we want to wait forever! */ - InterlockedExchange(&FromEntry->ProcessId, FromPrevProcId); + InterlockedExchangePointer(&FromEntry->ProcessId, FromPrevProcId); DelayExecution(); goto LockHandleFrom; @@ -1468,12 +1456,12 @@ LockHandleFrom: /* try again */ goto LockHandleFrom; } - else if((FromPrevProcId >> 1) != (LONG)PsGetCurrentProcessId()) + else if((HANDLE)((ULONG_PTR)FromPrevProcId & ~0x1) != PsGetCurrentProcessId()) { /* FIXME - should we really allow copying ownership from objects that we don't even own? */ - DPRINT1("WARNING! Changing copying ownership of object 0x%x (pid: 0x%x) to pid 0x%x!!!\n", CopyFrom, FromPrevProcId >> 1, PsGetCurrentProcessId()); - FromProcessId = FromPrevProcId & ~0x1; - FromLockedProcessId = FromProcessId | 0x1; + DPRINT1("WARNING! Changing copying ownership of object 0x%x (pid: 0x%x) to pid 0x%x!!!\n", CopyFrom, (ULONG_PTR)FromPrevProcId & ~0x1, PsGetCurrentProcessId()); + FromProcessId = (HANDLE)((ULONG_PTR)FromPrevProcId & ~0x1); + FromLockedProcessId = (HANDLE)((ULONG_PTR)FromProcessId | 0x1); goto LockHandleFrom; } else From d533b8c5d369ea95ea4b89778f370b374d0dd83c Mon Sep 17 00:00:00 2001 From: Steven Edwards Date: Wed, 26 Jan 2005 00:43:49 +0000 Subject: [PATCH 008/185] Windows is stupid. Why they hell would you be case insensitive but case retaining svn path=/trunk/; revision=13304 --- reactos/lib/setupapi/Makefile | 415 ---------------------------------- 1 file changed, 415 deletions(-) delete mode 100644 reactos/lib/setupapi/Makefile diff --git a/reactos/lib/setupapi/Makefile b/reactos/lib/setupapi/Makefile deleted file mode 100644 index 5c2ab0a26c5..00000000000 --- a/reactos/lib/setupapi/Makefile +++ /dev/null @@ -1,415 +0,0 @@ -EXTRADEFS = -D_SETUPAPI_ -TOPSRCDIR = ../.. -TOPOBJDIR = ../.. -SRCDIR = . - -MODULE = setupapi.dll -IMPORTS = user32 version advapi32 rpcrt4 kernel32 ntdll -DELAYIMPORTS = shell32 -EXTRALIBS = $(LIBUNICODE) - -C_SRCS = \ - devinst.c \ - dirid.c \ - diskspace.c \ - install.c \ - misc.c \ - parser.c \ - queue.c \ - setupcab.c \ - stubs.c - -C_SRCS16 = \ - devinst16.c \ - infparse.c \ - setupx_main.c \ - virtcopy.c - -SPEC_SRCS16 = setupx.spec - -RC_SRCS= setupapi.rc - - -# Global rules for building dlls -*-Makefile-*- -# -# Each individual makefile should define the following variables: -# MODULE : name of the main module being built -# EXTRALIBS : extra libraries to link in (optional) -# SPEC_SRCS16 : interface definition files for 16-bit dlls (optional) -# SUBSYSTEM : (optional) subsystem (for native dlls) -# -# plus all variables required by the global Make.rules.in -# - -DLLDEFS = -DLLFLAGS = -D_REENTRANT -DLLEXT = -DEFS = -D__WINESRC__ $(DLLDEFS) $(EXTRADEFS) -MAINSPEC = $(MODULE:%.dll=%).spec -SPEC_DEF = $(MAINSPEC).def -WIN16_FILES = $(SPEC_SRCS16:.spec=.spec.o) $(C_SRCS16:.c=.o) $(EXTRA_OBJS16) -ALL_OBJS = $(OBJS) $(MODULE).dbg.o -ALL_LIBS = $(LIBWINE) $(EXTRALIBS) $(LIBPORT) $(LDFLAGS) $(LIBS) -IMPORTLIBS = $(DELAYIMPORTS:%=$(DLLDIR)/lib%.$(IMPLIBEXT)) $(IMPORTS:%=$(DLLDIR)/lib%.$(IMPLIBEXT)) - -all: $(MODULE)$(DLLEXT) $(SUBDIRS) - - -# Global rules shared by all makefiles -*-Makefile-*- -# -# Each individual makefile must define the following variables: -# TOPSRCDIR : top-level source directory -# TOPOBJDIR : top-level object directory -# SRCDIR : source directory for this module -# MODULE : name of the module being built -# -# Each individual makefile may define the following additional variables: -# C_SRCS : C sources for the module -# C_SRCS16 : 16-bit C sources for the module -# RC_SRCS : resource source files -# EXTRA_SRCS : extra source files for make depend -# EXTRA_OBJS : extra object files -# IMPORTS : dlls to import -# DELAYIMPORTS : dlls to import in delayed mode -# SUBDIRS : subdirectories that contain a Makefile -# EXTRASUBDIRS : subdirectories that do not contain a Makefile -# INSTALLSUBDIRS : subdirectories to run make install/uninstall into - -# First some useful definitions - -SHELL = /bin/sh -CC = mingw32-gcc -CFLAGS = -g -O2 -CPPFLAGS = -LIBS = -BISON = bison -YACC = $(BISON) -y -LEX = flex -LEXLIB = -EXEEXT = .exe -OBJEXT = o -LIBEXT = dll -DLLEXT = -IMPLIBEXT = a -LDSHARED = -DLLTOOL = mingw32-dlltool -DLLWRAP = mingw32-dllwrap -AR = mingw32-ar rc -RANLIB = mingw32-ranlib -STRIP = mingw32-strip -WINDRES = mingw32-windres -LN = ln -LN_S = ln -s -TOOLSDIR = /usr/src/wine-tools/ -AS = mingw32-as -LD = mingw32-ld -LDFLAGS = -RM = rm -f -MV = mv -LINT = -LINTFLAGS = -FONTFORGE = fontforge -INCLUDES = -I$(SRCDIR) -I. -I$(TOPSRCDIR)/include -I$(TOPOBJDIR)/include $(EXTRAINCL) -EXTRACFLAGS = -Wall -pipe -fno-strength-reduce -mpreferred-stack-boundary=2 -fno-strict-aliasing -gstabs+ -Wpointer-arith -ALLCFLAGS = $(INCLUDES) $(DEFS) $(DLLFLAGS) $(EXTRACFLAGS) $(CPPFLAGS) $(CFLAGS) -ALLLINTFLAGS = $(INCLUDES) $(DEFS) $(LINTFLAGS) -IDLFLAGS = $(INCLUDES) $(DEFS) $(EXTRAIDLFLAGS) -MKINSTALLDIRS= $(TOPSRCDIR)/tools/mkinstalldirs -m 755 -WINAPI_CHECK = $(TOPSRCDIR)/tools/winapi_check/winapi_check -WINEWRAPPER = $(TOPSRCDIR)/tools/winewrapper -C2MAN = $(TOPSRCDIR)/tools/c2man.pl -RUNTEST = $(TOPSRCDIR)/tools/runtest -WINEBUILD = $(TOOLSDIR)/tools/winebuild/winebuild -MAKEDEP = $(TOOLSDIR)/tools/makedep -WRC = $(TOOLSDIR)/tools/wrc/wrc -BIN2RES = $(TOOLSDIR)/tools/bin2res -WMC = $(TOOLSDIR)/tools/wmc/wmc -WIDL = $(TOOLSDIR)/tools/widl/widl -WINEGCC = $(TOOLSDIR)/tools/winegcc/winegcc -SFNT2FNT = $(TOOLSDIR)/tools/sfnt2fnt -FNT2FON = $(TOOLSDIR)/tools/fnt2fon -RC = $(WRC) -RC16 = $(WRC) -RCFLAGS = --nostdinc $(INCLUDES) $(DEFS) $(EXTRARCFLAGS) -RC16FLAGS = -O res16 $(RCFLAGS) -LDPATH = LD_LIBRARY_PATH="$(TOOLSDIR)/libs/unicode:$$LD_LIBRARY_PATH" -DLLDIR = $(TOPOBJDIR)/dlls -LIBDIR = $(TOPOBJDIR)/libs -LIBPORT = -L$(TOPOBJDIR)/libs/port -lwine_port -LIBUNICODE = -L$(TOPOBJDIR)/libs/unicode -lwine_unicode -LIBWINE = -L$(TOPOBJDIR)/libs/wine -lwine - - - -# Installation infos - -INSTALL = /usr/bin/ginstall -c $(INSTALL_FLAGS) -INSTALL_PROGRAM = ${INSTALL} $(INSTALL_PROGRAM_FLAGS) -INSTALL_SCRIPT = ${INSTALL} $(INSTALL_SCRIPT_FLAGS) -INSTALL_DATA = ${INSTALL} -m 644 $(INSTALL_DATA_FLAGS) -prefix = /usr/local -exec_prefix = ${prefix} -bindir = ${exec_prefix}/bin -libdir = ${exec_prefix}/lib -datadir = ${prefix}/share -infodir = ${prefix}/info -mandir = ${prefix}/man -sysconfdir = ${prefix}/etc -includedir = ${prefix}/include/wine -dlldir = ${exec_prefix}/lib/wine -prog_manext = 1 -api_manext = 3w -conf_manext = 5 -CLEAN_FILES = *.o *.a *.so *.ln *.$(LIBEXT) \\\#*\\\# *~ *% .\\\#* *.bak *.orig *.rej \ - *.flc *.spec.c *.spec.def *.dbg.c *.tab.c *.tab.h lex.yy.c core - -OBJS = $(C_SRCS:.c=.o) $(EXTRA_OBJS) - -RCOBJS = $(RC_SRCS:.rc=.res.o) -LINTS = $(C_SRCS:.c=.ln) - -# Implicit rules - -.SUFFIXES: .mc .rc .mc.rc .res .res.o .spec .spec.c .spec.def .idl .h .ok .sfd .ttf - -.c.o: - $(CC) -c $(ALLCFLAGS) -o $@ $< - -.s.o: - $(AS) -o $@ $< - -.mc.mc.rc: - $(LDPATH) $(WMC) -i -U -H /dev/null -o $@ $< - -.rc.res: - $(LDPATH) $(RC) $(RCFLAGS) -fo$@ $< - -.res.res.o: - $(WINDRES) -i $< -o $@ - -.spec.spec.c: - $(WINEBUILD) $(DEFS) -o $@ --main-module $(MODULE) --dll $< - -.spec.spec.def: - $(WINEBUILD) -w $(DEFS) -o $@ --def $< - -.idl.h: - $(WIDL) $(IDLFLAGS) -h -H $@ $< - -.c.ln: - $(LINT) -c $(ALLLINTFLAGS) $< || ( $(RM) $@ && exit 1 ) - -.c.ok: - $(RUNTEST) $(RUNTESTFLAGS) $< && touch $@ - -.sfd.ttf: - $(FONTFORGE) -script $(TOPSRCDIR)/fonts/genttf.ff $< - -# 'all' target first in case the enclosing Makefile didn't define any target - -all: Makefile - -filter: - @$(TOPSRCDIR)/tools/winapi/make_filter --make $(MAKE) all - -.PHONY: all filter - -# Rules for resources - -$(RC_BINARIES): $(BIN2RES) $(RC_BINSRC) - $(BIN2RES) -f -o $@ $(SRCDIR)/$(RC_BINSRC) - -$(RC_SRCS:.rc=.res) $(RC_SRCS16:.rc=.res): $(WRC) $(RC_BINARIES) - -# Rule for main module debug channels - -$(MODULE).dbg.c: $(C_SRCS) $(C_SRCS16) $(WINEBUILD) - $(WINEBUILD) $(DEFS) -o $@ --debug -C$(SRCDIR) $(C_SRCS) $(C_SRCS16) - -# Rules for makefile - -Makefile: Makefile.in $(TOPSRCDIR)/configure - @echo Makefile is older than $?, please rerun $(TOPSRCDIR)/configure - @exit 1 - -# Rule for linting - -$(MODULE).ln : $(LINTS) - if test "$(LINTS)" ; \ - then \ - $(LINT) $(ALLLINTFLAGS) -o$(MODULE) $(LINTS) ; \ - $(MV) llib-l$(MODULE).ln $(MODULE).ln ; \ - else \ - $(LINT) $(ALLLINTFLAGS) -C$(MODULE) /dev/null ; \ - fi - -lint:: $(MODULE).ln - -# Rules for Windows API checking - -winapi_check:: dummy - $(WINAPI_CHECK) $(WINAPI_CHECK_FLAGS) $(WINAPI_CHECK_EXTRA_FLAGS) . - -.PHONY: winapi_check - -# Rules for dependencies - -$(SUBDIRS:%=%/__depend__): dummy - cd `dirname $@` && $(MAKE) depend - -depend: $(IDL_SRCS:.idl=.h) $(SUBDIRS:%=%/__depend__) - $(MAKEDEP) $(INCLUDES) -C$(SRCDIR) $(C_SRCS) $(C_SRCS16) $(RC_SRCS) $(RC_SRCS16) $(MC_SRCS) $(IDL_SRCS) $(EXTRA_SRCS) - -.PHONY: depend $(SUBDIRS:%=%/__depend__) - -# Rules for cleaning - -$(SUBDIRS:%=%/__clean__): dummy - cd `dirname $@` && $(MAKE) clean - -$(SUBDIRS:%=%/__testclean__): dummy - cd `dirname $@` && $(MAKE) testclean - -$(EXTRASUBDIRS:%=%/__clean__): dummy - -cd `dirname $@` && $(RM) $(CLEAN_FILES) - -testclean:: $(SUBDIRS:%=%/__testclean__) - -clean:: $(SUBDIRS:%=%/__clean__) $(EXTRASUBDIRS:%=%/__clean__) - $(RM) $(CLEAN_FILES) $(RC_SRCS:.rc=.res) $(RC_SRCS16:.rc=.res) $(MC_SRCS:.mc=.mc.rc) $(IDL_SRCS:.idl=.h) $(PROGRAMS) $(RC_BINARIES) - -.PHONY: clean testclean $(SUBDIRS:%=%/__clean__) $(SUBDIRS:%=%/__testclean__) $(EXTRASUBDIRS:%=%/__clean__) - -# Rules for installing - -$(SUBDIRS:%=%/__install__): dummy - cd `dirname $@` && $(MAKE) install - -$(SUBDIRS:%=%/__install-lib__): dummy - cd `dirname $@` && $(MAKE) install-lib - -$(SUBDIRS:%=%/__install-dev__): dummy - cd `dirname $@` && $(MAKE) install-dev - -$(SUBDIRS:%=%/__uninstall__): dummy - cd `dirname $@` && $(MAKE) uninstall - -install:: $(INSTALLSUBDIRS:%=%/__install__) - -uninstall:: $(INSTALLSUBDIRS:%=%/__uninstall__) - -.PHONY: install install-lib install-dev uninstall \ - $(SUBDIRS:%=%/__install__) $(SUBDIRS:%=%/__uninstall__) \ - $(SUBDIRS:%=%/__install-lib__) $(SUBDIRS:%=%/__install-dev__) - -# Rules for checking that no imports are missing - -$(SUBDIRS:%=%/__checklink__): dummy - @cd `dirname $@` && $(MAKE) checklink - -.PHONY: checklink $(SUBDIRS:%=%/__checklink__) - -# Rules for testing - -$(SUBDIRS:%=%/__test__): dummy - @cd `dirname $@` && $(MAKE) test - -$(SUBDIRS:%=%/__crosstest__): dummy - @cd `dirname $@` && $(MAKE) crosstest - -.PHONY: check test crosstest $(SUBDIRS:%=%/__test__) $(SUBDIRS:%=%/__crosstest__) - -# Misc. rules - -$(MC_SRCS:.mc=.mc.rc): $(WMC) - -$(IDL_SRCS:.idl=.h): $(WIDL) - -$(SUBDIRS): dummy - @cd $@ && $(MAKE) - -dummy: - -.PHONY: dummy $(SUBDIRS) - -# End of global rules - -# Rules for .so files - -$(MODULE).so: $(MAINSPEC) $(RC_SRCS:.rc=.res) $(ALL_OBJS) $(IMPORTLIBS) Makefile.in - $(WINEGCC) -B$(TOOLSDIR)/tools/winebuild -shared $(SRCDIR)/$(MAINSPEC) $(ALL_OBJS) $(RC_SRCS:.rc=.res) $(SUBSYSTEM:%=-Wb,--subsystem,%) -o $@ -L$(DLLDIR) $(DELAYIMPORTS:%=-Wb,-d%) $(IMPORTS:%=-l%) $(ALL_LIBS) - -# Rules for .dll files - -$(MODULE): $(RCOBJS) $(OBJS) $(MODULE).dbg.o $(SPEC_DEF) $(IMPORTLIBS) Makefile.in - $(DLLWRAP) -k --def $(SPEC_DEF) -o $@ $(RCOBJS) $(OBJS) $(MODULE).dbg.o -L$(DLLDIR) $(DELAYIMPORTS:%=-l%) $(IMPORTS:%=-l%) $(ALL_LIBS) - -$(SPEC_DEF): $(WINEBUILD) - -# Rules for checking that no imports are missing - -.PHONY: checklink16 $(WIN16_FILES:%=__checklink16__%) - -$(WIN16_FILES:%=__checklink16__%): checklink16 - -checklink16:: $(MAINSPEC).o $(OBJS) $(MODULE).dbg.o dummy - $(CC) -o checklink -Wl,-rpath,$(TOPOBJDIR)/libs $(TOPSRCDIR)/dlls/checklink.c $(MAINSPEC).o $(OBJS) $(MODULE).dbg.o -L$(DLLDIR) $(ALL_LIBS) -lm && $(RM) checklink $(MAINSPEC).c $(MAINSPEC).o - -checklink:: $(WIN16_FILES:%=__checklink16__%) - -# Rules for testing - -check test:: $(SUBDIRS:%=%/__test__) - -crosstest:: $(SUBDIRS:%=%/__crosstest__) - -# Rule to explicitly generate the .spec.c for debugging - -$(MAINSPEC).c: $(MAINSPEC) $(RC_SRCS:.rc=.res) $(ALL_OBJS) $(IMPORTLIBS) $(WINEBUILD) - $(WINEBUILD) $(DEFS) $(DLLFLAGS) -o $@ --dll $(SRCDIR)/$(MAINSPEC) $(SUBSYSTEM:%=--subsystem %) $(RC_SRCS:.rc=.res) $(ALL_OBJS) -L$(DLLDIR) $(DELAYIMPORTS:%=-d%) $(IMPORTS:%=-l%) - -# Rules for auto documentation - -man: $(C_SRCS) - $(C2MAN) -o $(TOPOBJDIR)/documentation/man$(api_manext) -R$(TOPOBJDIR) -S$(api_manext) $(INCLUDES) $(MAINSPEC:%=-w %) $(SPEC_SRCS16:%=-w %) $(C_SRCS) $(C_SRCS16) - -doc-html: $(C_SRCS) - $(C2MAN) -o $(TOPOBJDIR)/documentation/html -R$(TOPSRCDIR) $(INCLUDES) -Th $(MAINSPEC:%=-w %) $(SPEC_SRCS16:%=-w %) $(C_SRCS) $(C_SRCS16) - -doc-sgml: $(C_SRCS) - $(C2MAN) -o $(TOPOBJDIR)/documentation/api-guide -R$(TOPSRCDIR) $(INCLUDES) -Ts $(MAINSPEC:%=-w %) $(SPEC_SRCS16:%=-w %) $(C_SRCS) $(C_SRCS16) - -.PHONY: man doc-html doc-sgml - -# Rules for installation - -EXE_SPECS16 = $(SPEC_SRCS16:.exe.spec=.exe) -DRV_SPECS16 = $(EXE_SPECS16:.drv.spec=.drv) -ALL_SPECS16 = $(DRV_SPECS16:.spec=.dll) - -WIN16_INSTALL = $(ALL_SPECS16:%=_install_/%) - -.PHONY: install_lib $(ALL_SPECS16:%=_install_/%) $(ALL_SPECS16:%=_uninstall_/%) - -$(ALL_SPECS16:%=_install_/%): install_lib - cd $(dlldir) && $(RM) `basename $@`$(DLLEXT) && $(LN_S) $(MODULE)$(DLLEXT) `basename $@`$(DLLEXT) - -$(ALL_SPECS16:%=_uninstall_/%): dummy - $(RM) $(dlldir)/`basename $@`$(DLLEXT) - -install_lib: $(MODULE)$(DLLEXT) - $(MKINSTALLDIRS) $(dlldir) - $(INSTALL_PROGRAM) $(MODULE)$(DLLEXT) $(dlldir)/$(MODULE)$(DLLEXT) - -install:: install_lib - -uninstall:: $(ALL_SPECS16:%=_uninstall_/%) - $(RM) $(dlldir)/$(MODULE)$(DLLEXT) - -# Misc. rules - -$(SPEC_SRCS16:.spec=.spec.c): $(WINEBUILD) - -# End of global dll rules - -### Dependencies: From 394f14a702e67fdceddd5e993d7c3f74714e0676 Mon Sep 17 00:00:00 2001 From: Alex Ionescu Date: Wed, 26 Jan 2005 05:00:08 +0000 Subject: [PATCH 009/185] Dynamic 3GB support, part 1. Only multiboot.S remains to be changed, all other parts of the Kernel now used KERNEL_BASE based on the command-line (Please don't use /3gb if you don't compile 3GB) svn path=/trunk/; revision=13305 --- reactos/config | 2 +- reactos/ntoskrnl/include/internal/i386/mm.h | 16 ++++++++++------ reactos/ntoskrnl/ke/main.c | 13 +++++++++++++ reactos/ntoskrnl/mm/mminit.c | 5 +---- 4 files changed, 25 insertions(+), 11 deletions(-) diff --git a/reactos/config b/reactos/config index 89b47afd28b..4a6356a03ad 100644 --- a/reactos/config +++ b/reactos/config @@ -45,7 +45,7 @@ ACPI := 0 # # whether to use a 3GB User, 1GB Kernel memory map # -3GB := 1 +3GB := 0 # # Which version of NDIS do we support up to? diff --git a/reactos/ntoskrnl/include/internal/i386/mm.h b/reactos/ntoskrnl/include/internal/i386/mm.h index d045379fe6e..9650f1bd32a 100644 --- a/reactos/ntoskrnl/include/internal/i386/mm.h +++ b/reactos/ntoskrnl/include/internal/i386/mm.h @@ -23,14 +23,10 @@ #endif -#ifdef __3GB__ -#define KERNEL_BASE (0xC0000000) -#else -#define KERNEL_BASE (0x80000000) -#endif - #ifndef __ASM__ +#define KERNEL_BASE (ULONG)MmSystemRangeStart + #if defined(__GNUC__) #define FLUSH_TLB { \ @@ -65,6 +61,14 @@ VOID MiEnablePAE(PVOID* LastKernelAddress); #define PAGE_MASK(x) ((x)&(~0xfff)) #define PAE_PAGE_MASK(x) ((x)&(~0xfffLL)) +#else + +#ifdef __3GB__ +#define KERNEL_BASE (0xC0000000) +#else +#define KERNEL_BASE (0x80000000) +#endif + #endif /* ASSEMBLER */ #endif /* __NTOSKRNL_INCLUDE_INTERNAL_I386_MM_H */ diff --git a/reactos/ntoskrnl/ke/main.c b/reactos/ntoskrnl/ke/main.c index 0f56046a651..0df09452e65 100644 --- a/reactos/ntoskrnl/ke/main.c +++ b/reactos/ntoskrnl/ke/main.c @@ -691,6 +691,7 @@ ExpInitializeExecutive(VOID) /* Create the SystemRoot symbolic link */ CPRINT("CommandLine: %s\n", (PCHAR)KeLoaderBlock.CommandLine); + DPRINT1("MmSystemRangeStart: 0x%x\n", MmSystemRangeStart); Status = IoCreateSystemRootLink((PCHAR)KeLoaderBlock.CommandLine); if (!NT_SUCCESS(Status)) { @@ -953,6 +954,18 @@ _main (ULONG MultiBootMagic, PLOADER_PARAMETER_BLOCK _LoaderBlock) } KeLoaderBlock.CommandLine = (ULONG)KeLoaderCommandLine; + /* Gotta check 3GB setting right *here* before we use KERNEL_BASE! */ + if (!_strnicmp(KeLoaderCommandLine, "3GB", 3)) { + + /* Use 3GB */ + MmSystemRangeStart = (PVOID)0xC0000000; + + } else { + + /* Use 2GB */ + MmSystemRangeStart = (PVOID)0x80000000; + } + strcpy(KeLoaderModuleStrings[0], "ntoskrnl.exe"); KeLoaderModules[0].String = (ULONG)KeLoaderModuleStrings[0]; KeLoaderModules[0].ModStart = KERNEL_BASE; diff --git a/reactos/ntoskrnl/mm/mminit.c b/reactos/ntoskrnl/mm/mminit.c index 6dc0591c11b..95c02502c9d 100644 --- a/reactos/ntoskrnl/mm/mminit.c +++ b/reactos/ntoskrnl/mm/mminit.c @@ -324,10 +324,7 @@ MmInit1(ULONG_PTR FirstKrnlPhysAddr, KeLoaderBlock.MemHigher = (MaxMem - 1) * 1024; } - /* - * FIXME: Set this based on the system command line - */ - MmSystemRangeStart = (PVOID)KERNEL_BASE; // 0xC0000000 + /* Set memory limits */ MmUserProbeAddress = 0x7fff0000; MmHighestUserAddress = (PVOID)0x7ffeffff; From 0ce1bb564c2b4328dd493393605b15cbdd5a3d4f Mon Sep 17 00:00:00 2001 From: Thomas Bluemel Date: Wed, 26 Jan 2005 12:47:38 +0000 Subject: [PATCH 010/185] securely access buffers in NtOpenDirectoryObject(), NtQueryDirectoryObject() and NtCreateDirectoryObject() svn path=/trunk/; revision=13306 --- reactos/ntoskrnl/ob/dirobj.c | 573 +++++++++++++++++++---------------- 1 file changed, 309 insertions(+), 264 deletions(-) diff --git a/reactos/ntoskrnl/ob/dirobj.c b/reactos/ntoskrnl/ob/dirobj.c index 5ec60b78af4..3dadd85958c 100644 --- a/reactos/ntoskrnl/ob/dirobj.c +++ b/reactos/ntoskrnl/ob/dirobj.c @@ -47,62 +47,54 @@ NtOpenDirectoryObject (OUT PHANDLE DirectoryHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes) { - PVOID Object; - NTSTATUS Status; - - *DirectoryHandle = 0; + HANDLE hDirectory; + KPROCESSOR_MODE PreviousMode; + NTSTATUS Status = STATUS_SUCCESS; - Status = ObReferenceObjectByName(ObjectAttributes->ObjectName, - ObjectAttributes->Attributes, - NULL, - DesiredAccess, - ObDirectoryType, - UserMode, - NULL, - &Object); - if (!NT_SUCCESS(Status)) + PreviousMode = ExGetPreviousMode(); + + if(PreviousMode != KernelMode) + { + _SEH_TRY { - return Status; + ProbeForWrite(DirectoryHandle, + sizeof(HANDLE), + sizeof(ULONG)); } + _SEH_HANDLE + { + Status = _SEH_GetExceptionCode(); + } + _SEH_END; + + if(!NT_SUCCESS(Status)) + { + DPRINT1("NtOpenDirectoryObject failed, Status: 0x%x\n", Status); + return Status; + } + } - Status = ObCreateHandle(PsGetCurrentProcess(), - Object, - DesiredAccess, - FALSE, - DirectoryHandle); - return STATUS_SUCCESS; -} - -static NTSTATUS -CopyDirectoryString(PUNICODE_STRING UnsafeTarget, PUNICODE_STRING Source, PUCHAR *Buffer) -{ - UNICODE_STRING Target; - NTSTATUS Status; - WCHAR NullWchar; - - Target.Length = Source->Length; - Target.MaximumLength = (Source->Length + sizeof (WCHAR)); - Target.Buffer = (PWCHAR) *Buffer; - Status = MmCopyToCaller(UnsafeTarget, &Target, sizeof(UNICODE_STRING)); - if (! NT_SUCCESS(Status)) - { - return Status; - } - Status = MmCopyToCaller(*Buffer, Source->Buffer, Source->Length); - if (! NT_SUCCESS(Status)) - { - return Status; - } - *Buffer += Source->Length; - NullWchar = L'\0'; - Status = MmCopyToCaller(*Buffer, &NullWchar, sizeof(WCHAR)); - if (! NT_SUCCESS(Status)) - { - return Status; - } - *Buffer += sizeof(WCHAR); - - return STATUS_SUCCESS; + Status = ObOpenObjectByName(ObjectAttributes, + ObDirectoryType, + NULL, + PreviousMode, + DesiredAccess, + NULL, + &hDirectory); + if(NT_SUCCESS(Status)) + { + _SEH_TRY + { + *DirectoryHandle = hDirectory; + } + _SEH_HANDLE + { + Status = _SEH_GetExceptionCode(); + } + _SEH_END; + } + + return Status; } @@ -169,202 +161,229 @@ NtQueryDirectoryObject (IN HANDLE DirectoryHandle, IN ULONG BufferLength, IN BOOLEAN ReturnSingleEntry, IN BOOLEAN RestartScan, - IN OUT PULONG UnsafeContext, - OUT PULONG UnsafeReturnLength OPTIONAL) + IN OUT PULONG Context, + OUT PULONG ReturnLength OPTIONAL) { - PDIRECTORY_OBJECT dir = NULL; - PLIST_ENTRY current_entry = NULL; - PLIST_ENTRY start_entry; - POBJECT_HEADER current = NULL; - NTSTATUS Status = STATUS_SUCCESS; - ULONG DirectoryCount = 0; - ULONG DirectoryIndex = 0; - POBJECT_DIRECTORY_INFORMATION current_odi = (POBJECT_DIRECTORY_INFORMATION) Buffer; - OBJECT_DIRECTORY_INFORMATION ZeroOdi; - PUCHAR FirstFree = (PUCHAR) Buffer; - ULONG Context; - ULONG RequiredSize; - ULONG NewValue; - KIRQL OldLevel; + PDIRECTORY_OBJECT Directory; + KPROCESSOR_MODE PreviousMode; + ULONG SkipEntries = 0; + ULONG NextEntry = 0; + NTSTATUS Status = STATUS_SUCCESS; + + PreviousMode = ExGetPreviousMode(); - DPRINT("NtQueryDirectoryObject(DirectoryHandle %x)\n", DirectoryHandle); - - /* Check Context is not NULL */ - if (NULL == UnsafeContext) + if(PreviousMode != KernelMode) + { + _SEH_TRY + { + /* a test showed that the Buffer pointer just has to be 16 bit aligned, + propably due to the fact that most information that needs to be copied + is unicode strings */ + ProbeForWrite(Buffer, + BufferLength, + sizeof(WCHAR)); + ProbeForWrite(Context, + sizeof(ULONG), + sizeof(ULONG)); + if(!RestartScan) { - return STATUS_INVALID_PARAMETER; + SkipEntries = *Context; } - - /* Reference the DIRECTORY_OBJECT */ - Status = ObReferenceObjectByHandle(DirectoryHandle, - DIRECTORY_QUERY, - ObDirectoryType, - UserMode, - (PVOID*)&dir, - NULL); - if (!NT_SUCCESS(Status)) + if(ReturnLength != NULL) { - return Status; + ProbeForWrite(ReturnLength, + sizeof(ULONG), + sizeof(ULONG)); } - - KeAcquireSpinLock(&dir->Lock, &OldLevel); - - /* - * Optionally, skip over some entries at the start of the directory - * (use *ObjectIndex value) - */ - start_entry = dir->head.Flink; - if (! RestartScan) - { - register ULONG EntriesToSkip; - - Status = MmCopyFromCaller(&Context, UnsafeContext, sizeof(ULONG)); - if (! NT_SUCCESS(Status)) - { - KeReleaseSpinLock(&dir->Lock, OldLevel); - ObDereferenceObject(dir); - return Status; - } - EntriesToSkip = Context; - - CHECKPOINT; - - for (; 0 != EntriesToSkip-- && start_entry != &dir->head; - start_entry = start_entry->Flink) - { - ; - } - if ((0 != EntriesToSkip) && (start_entry == &dir->head)) - { - KeReleaseSpinLock(&dir->Lock, OldLevel); - ObDereferenceObject(dir); - return STATUS_NO_MORE_ENTRIES; - } - } - - /* - * Compute number of entries that we will copy into the buffer and - * the total size of all entries (even if larger than the buffer size) - */ - DirectoryCount = 0; - /* For the end sentenil */ - RequiredSize = sizeof(OBJECT_DIRECTORY_INFORMATION); - for (current_entry = start_entry; - current_entry != &dir->head; - current_entry = current_entry->Flink) - { - current = CONTAINING_RECORD(current_entry, OBJECT_HEADER, Entry); - - RequiredSize += sizeof(OBJECT_DIRECTORY_INFORMATION) + - current->Name.Length + sizeof(WCHAR) + - current->ObjectType->TypeName.Length + sizeof(WCHAR); - if (RequiredSize <= BufferLength && - (! ReturnSingleEntry || DirectoryCount < 1)) - { - DirectoryCount++; - } - } - - /* - * If there's no room to even copy a single entry then return error - * status. - */ - if (0 == DirectoryCount && - !(IsListEmpty(&dir->head) && BufferLength >= RequiredSize)) - { - KeReleaseSpinLock(&dir->Lock, OldLevel); - ObDereferenceObject(dir); - if (NULL != UnsafeReturnLength) - { - Status = MmCopyToCaller(UnsafeReturnLength, &RequiredSize, sizeof(ULONG)); - } - return NT_SUCCESS(Status) ? STATUS_BUFFER_TOO_SMALL : Status; - } - - /* - * Move FirstFree to point to the Unicode strings area - */ - FirstFree += (DirectoryCount + 1) * sizeof(OBJECT_DIRECTORY_INFORMATION); - - /* Scan the directory */ - current_entry = start_entry; - for (DirectoryIndex = 0; DirectoryIndex < DirectoryCount; DirectoryIndex++) - { - current = CONTAINING_RECORD(current_entry, OBJECT_HEADER, Entry); - - /* - * Copy the current directory entry's data into the buffer - * and update the OBJDIR_INFORMATION entry in the array. - */ - /* --- Object's name --- */ - Status = CopyDirectoryString(¤t_odi->ObjectName, ¤t->Name, &FirstFree); - if (! NT_SUCCESS(Status)) - { - KeReleaseSpinLock(&dir->Lock, OldLevel); - ObDereferenceObject(dir); - return Status; - } - /* --- Object type's name --- */ - Status = CopyDirectoryString(¤t_odi->ObjectTypeName, ¤t->ObjectType->TypeName, &FirstFree); - if (! NT_SUCCESS(Status)) - { - KeReleaseSpinLock(&dir->Lock, OldLevel); - ObDereferenceObject(dir); - return Status; - } - - /* Next entry in the array */ - current_odi++; - /* Next object in the directory */ - current_entry = current_entry->Flink; } + _SEH_HANDLE + { + Status = _SEH_GetExceptionCode(); + } + _SEH_END; - /* - * Don't need dir object anymore - */ - KeReleaseSpinLock(&dir->Lock, OldLevel); - ObDereferenceObject(dir); + if(!NT_SUCCESS(Status)) + { + DPRINT1("NtQueryDirectoryObject failed, Status: 0x%x\n", Status); + return Status; + } + } + else if(!RestartScan) + { + SkipEntries = *Context; + } + + Status = ObReferenceObjectByHandle(DirectoryHandle, + DIRECTORY_QUERY, + ObDirectoryType, + PreviousMode, + (PVOID*)&Directory, + NULL); + if(NT_SUCCESS(Status)) + { + PVOID TemporaryBuffer = ExAllocatePool(PagedPool, + BufferLength); + if(TemporaryBuffer != NULL) + { + POBJECT_HEADER EntryHeader; + PLIST_ENTRY ListEntry; + KIRQL OldLevel; + ULONG RequiredSize = 0; + ULONG nDirectories = 0; + POBJECT_DIRECTORY_INFORMATION DirInfo = (POBJECT_DIRECTORY_INFORMATION)TemporaryBuffer; - /* Terminate with all zero entry */ - memset(&ZeroOdi, '\0', sizeof(OBJECT_DIRECTORY_INFORMATION)); - Status = MmCopyToCaller(current_odi, &ZeroOdi, sizeof(OBJECT_DIRECTORY_INFORMATION)); - if (! NT_SUCCESS(Status)) + KeAcquireSpinLock(&Directory->Lock, &OldLevel); + + for(ListEntry = Directory->head.Flink; + ListEntry != &Directory->head; + ListEntry = ListEntry->Flink) { - return Status; + NextEntry++; + if(SkipEntries == 0) + { + PUNICODE_STRING Name, Type; + ULONG EntrySize; + + EntryHeader = CONTAINING_RECORD(ListEntry, OBJECT_HEADER, Entry); + + /* calculate the size of the required buffer space for this entry */ + Name = (EntryHeader->Name.Length != 0 ? &EntryHeader->Name : NULL); + Type = &EntryHeader->ObjectType->TypeName; + EntrySize = sizeof(OBJECT_DIRECTORY_INFORMATION) + + ((Name != NULL) ? ((ULONG)Name->Length + sizeof(WCHAR)) : 0) + + (ULONG)EntryHeader->ObjectType->TypeName.Length + sizeof(WCHAR); + + if(RequiredSize + EntrySize <= BufferLength) + { + /* the buffer is large enough to receive this entry. It would've + been much easier if the strings were directly appended to the + OBJECT_DIRECTORY_INFORMATION structured written into the buffer */ + if(Name != NULL) + DirInfo->ObjectName = *Name; + else + { + DirInfo->ObjectName.Length = DirInfo->ObjectName.MaximumLength = 0; + DirInfo->ObjectName.Buffer = NULL; + } + DirInfo->ObjectTypeName = *Type; + + nDirectories++; + RequiredSize += EntrySize; + + if(ReturnSingleEntry) + { + /* we're only supposed to query one entry, so bail and copy the + strings to the buffer */ + break; + } + DirInfo++; + } + else + { + if(ReturnSingleEntry) + { + /* the buffer is too small, so return the number of bytes that + would've been required for this query */ + RequiredSize += EntrySize; + Status = STATUS_BUFFER_TOO_SMALL; + } + else + { + /* just copy the entries that fit into the buffer */ + Status = STATUS_NO_MORE_ENTRIES; + } + break; + } + } + else + { + /* skip the entry */ + SkipEntries--; + } } - /* - * Store current index in Context - */ - if (RestartScan) + if(NT_SUCCESS(Status)) { - Context = DirectoryCount; + if(SkipEntries > 0 || nDirectories == 0) + { + /* we skipped more entries than the directory contains, nothing more to do */ + Status = STATUS_NO_MORE_ENTRIES; + } + else + { + _SEH_TRY + { + POBJECT_DIRECTORY_INFORMATION DestDirInfo = (POBJECT_DIRECTORY_INFORMATION)Buffer; + PWSTR strbuf = (PWSTR)((POBJECT_DIRECTORY_INFORMATION)Buffer + nDirectories); + + /* copy all OBJECT_DIRECTORY_INFORMATION structures to the buffer and + just append all strings (whose pointers are stored in the buffer!) + and replace the pointers */ + for(DirInfo = (POBJECT_DIRECTORY_INFORMATION)TemporaryBuffer; + nDirectories > 0; + nDirectories--, DirInfo++, DestDirInfo++) + { + if(DirInfo->ObjectName.Length > 0) + { + DestDirInfo->ObjectName.Length = DirInfo->ObjectName.Length; + DestDirInfo->ObjectName.MaximumLength = DirInfo->ObjectName.MaximumLength; + DestDirInfo->ObjectName.Buffer = strbuf; + RtlCopyMemory(strbuf, + DirInfo->ObjectName.Buffer, + DirInfo->ObjectName.Length); + /* NULL-terminate the string */ + strbuf[DirInfo->ObjectName.Length / sizeof(WCHAR)] = L'\0'; + strbuf += (DirInfo->ObjectName.Length / sizeof(WCHAR)) + 1; + } + + DestDirInfo->ObjectTypeName.Length = DirInfo->ObjectTypeName.Length; + DestDirInfo->ObjectTypeName.MaximumLength = DirInfo->ObjectTypeName.MaximumLength; + DestDirInfo->ObjectTypeName.Buffer = strbuf; + RtlCopyMemory(strbuf, + DirInfo->ObjectTypeName.Buffer, + DirInfo->ObjectTypeName.Length); + /* NULL-terminate the string */ + strbuf[DirInfo->ObjectTypeName.Length / sizeof(WCHAR)] = L'\0'; + strbuf += (DirInfo->ObjectTypeName.Length / sizeof(WCHAR)) + 1; + } + } + _SEH_HANDLE + { + Status = _SEH_GetExceptionCode(); + } + _SEH_END; + } } + + KeReleaseSpinLock(&Directory->Lock, OldLevel); + ObDereferenceObject(Directory); + + ExFreePool(TemporaryBuffer); + + if(NT_SUCCESS(Status) || ReturnSingleEntry) + { + _SEH_TRY + { + *Context = NextEntry; + if(ReturnLength != NULL) + { + *ReturnLength = RequiredSize; + } + } + _SEH_HANDLE + { + Status = _SEH_GetExceptionCode(); + } + _SEH_END; + } + } else - { - Context += DirectoryCount; - } - Status = MmCopyToCaller(UnsafeContext, &Context, sizeof(ULONG)); - if (! NT_SUCCESS(Status)) - { - return Status; - } - - /* - * Report to the caller how much bytes - * we wrote in the user buffer. - */ - if (NULL != UnsafeReturnLength) - { - NewValue = FirstFree - (PUCHAR) Buffer; - Status = MmCopyToCaller(UnsafeReturnLength, &NewValue, sizeof(ULONG)); - if (! NT_SUCCESS(Status)) - { - return Status; - } - } - - return Status; + { + Status = STATUS_INSUFFICIENT_RESOURCES; + } + } + + return Status; } @@ -396,43 +415,69 @@ NtCreateDirectoryObject (OUT PHANDLE DirectoryHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes) { - PDIRECTORY_OBJECT DirectoryObject; - NTSTATUS Status; - + PDIRECTORY_OBJECT Directory; + HANDLE hDirectory; + KPROCESSOR_MODE PreviousMode; + NTSTATUS Status = STATUS_SUCCESS; + DPRINT("NtCreateDirectoryObject(DirectoryHandle %x, " - "DesiredAccess %x, ObjectAttributes %x, " - "ObjectAttributes->ObjectName %wZ)\n", - DirectoryHandle, DesiredAccess, ObjectAttributes, - ObjectAttributes->ObjectName); + "DesiredAccess %x, ObjectAttributes %x\n", + DirectoryHandle, DesiredAccess, ObjectAttributes); - Status = NtOpenDirectoryObject (DirectoryHandle, - DesiredAccess, - ObjectAttributes); + PreviousMode = ExGetPreviousMode(); - if (Status == STATUS_OBJECT_NAME_NOT_FOUND) + if(PreviousMode != KernelMode) { - Status = ObCreateObject (ExGetPreviousMode(), - ObDirectoryType, - ObjectAttributes, - ExGetPreviousMode(), - NULL, - sizeof(DIRECTORY_OBJECT), - 0, - 0, - (PVOID*)&DirectoryObject); - if (!NT_SUCCESS(Status)) - { - return Status; - } + _SEH_TRY + { + ProbeForWrite(DirectoryHandle, + sizeof(HANDLE), + sizeof(ULONG)); + } + _SEH_HANDLE + { + Status = _SEH_GetExceptionCode(); + } + _SEH_END; - Status = ObInsertObject ((PVOID)DirectoryObject, - NULL, - DesiredAccess, - 0, - NULL, - DirectoryHandle); + if(!NT_SUCCESS(Status)) + { + DPRINT1("NtCreateDirectoryObject failed, Status: 0x%x\n", Status); + return Status; + } + } - ObDereferenceObject(DirectoryObject); + Status = ObCreateObject(PreviousMode, + ObDirectoryType, + ObjectAttributes, + PreviousMode, + NULL, + sizeof(DIRECTORY_OBJECT), + 0, + 0, + (PVOID*)&Directory); + if(NT_SUCCESS(Status)) + { + Status = ObInsertObject((PVOID)Directory, + NULL, + DesiredAccess, + 0, + NULL, + &hDirectory); + ObDereferenceObject(Directory); + + if(NT_SUCCESS(Status)) + { + _SEH_TRY + { + *DirectoryHandle = hDirectory; + } + _SEH_HANDLE + { + Status = _SEH_GetExceptionCode(); + } + _SEH_END; + } } return Status; From 4556d3a778973a650a933a64bfbb1f4e5e9bc446 Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Wed, 26 Jan 2005 13:48:38 +0000 Subject: [PATCH 011/185] - Replace NtQuerySystemTime by KeQuerySystemTime - Nt->Zw svn path=/trunk/; revision=13307 --- reactos/ntoskrnl/cm/import.c | 16 ++++++++-------- reactos/ntoskrnl/cm/ntfunc.c | 23 +++++++++++------------ reactos/ntoskrnl/cm/regfile.c | 20 ++++++++++---------- reactos/ntoskrnl/cm/regobj.c | 2 +- 4 files changed, 30 insertions(+), 31 deletions(-) diff --git a/reactos/ntoskrnl/cm/import.c b/reactos/ntoskrnl/cm/import.c index 4afca0be886..6523c58e65c 100644 --- a/reactos/ntoskrnl/cm/import.c +++ b/reactos/ntoskrnl/cm/import.c @@ -233,7 +233,7 @@ CmImportHardwareHive(PCHAR ChunkBase, OBJ_CASE_INSENSITIVE, NULL, NULL); - Status = NtCreateKey (&HardwareKey, + Status = ZwCreateKey (&HardwareKey, KEY_ALL_ACCESS, &ObjectAttributes, 0, @@ -245,7 +245,7 @@ CmImportHardwareHive(PCHAR ChunkBase, DPRINT1("NtCreateKey() failed, status: 0x%x\n", Status); return FALSE; } - NtClose (HardwareKey); + ZwClose (HardwareKey); /* Create '\Registry\Machine\HARDWARE\DESCRIPTION' key. */ RtlInitUnicodeString(&KeyName, @@ -255,7 +255,7 @@ CmImportHardwareHive(PCHAR ChunkBase, OBJ_CASE_INSENSITIVE, NULL, NULL); - Status = NtCreateKey (&HardwareKey, + Status = ZwCreateKey (&HardwareKey, KEY_ALL_ACCESS, &ObjectAttributes, 0, @@ -267,7 +267,7 @@ CmImportHardwareHive(PCHAR ChunkBase, DPRINT1("NtCreateKey() failed, status: 0x%x\n", Status); return FALSE; } - NtClose (HardwareKey); + ZwClose (HardwareKey); /* Create '\Registry\Machine\HARDWARE\DEVICEMAP' key. */ RtlInitUnicodeString (&KeyName, @@ -277,7 +277,7 @@ CmImportHardwareHive(PCHAR ChunkBase, OBJ_CASE_INSENSITIVE, NULL, NULL); - Status = NtCreateKey (&HardwareKey, + Status = ZwCreateKey (&HardwareKey, KEY_ALL_ACCESS, &ObjectAttributes, 0, @@ -289,7 +289,7 @@ CmImportHardwareHive(PCHAR ChunkBase, DPRINT1("NtCreateKey() failed, status: 0x%x\n", Status); return FALSE; } - NtClose (HardwareKey); + ZwClose (HardwareKey); /* Create '\Registry\Machine\HARDWARE\RESOURCEMAP' key. */ RtlInitUnicodeString(&KeyName, @@ -299,7 +299,7 @@ CmImportHardwareHive(PCHAR ChunkBase, OBJ_CASE_INSENSITIVE, NULL, NULL); - Status = NtCreateKey (&HardwareKey, + Status = ZwCreateKey (&HardwareKey, KEY_ALL_ACCESS, &ObjectAttributes, 0, @@ -311,7 +311,7 @@ CmImportHardwareHive(PCHAR ChunkBase, DPRINT1("NtCreateKey() failed, status: 0x%x\n", Status); return FALSE; } - NtClose (HardwareKey); + ZwClose (HardwareKey); return TRUE; } diff --git a/reactos/ntoskrnl/cm/ntfunc.c b/reactos/ntoskrnl/cm/ntfunc.c index 0e654eea8b5..fe789811ccf 100644 --- a/reactos/ntoskrnl/cm/ntfunc.c +++ b/reactos/ntoskrnl/cm/ntfunc.c @@ -30,23 +30,22 @@ static BOOLEAN CmiRegistryInitialized = FALSE; */ NTSTATUS STDCALL CmRegisterCallback(IN PEX_CALLBACK_FUNCTION Function, - IN PVOID Context, - IN OUT PLARGE_INTEGER Cookie - ) + IN PVOID Context, + IN OUT PLARGE_INTEGER Cookie) { - UNIMPLEMENTED; - return STATUS_NOT_IMPLEMENTED; + UNIMPLEMENTED; + return STATUS_NOT_IMPLEMENTED; } + /* * @unimplemented */ - NTSTATUS STDCALL -CmUnRegisterCallback(IN LARGE_INTEGER Cookie) +CmUnRegisterCallback(IN LARGE_INTEGER Cookie) { - UNIMPLEMENTED; - return STATUS_NOT_IMPLEMENTED; + UNIMPLEMENTED; + return STATUS_NOT_IMPLEMENTED; } @@ -1640,7 +1639,7 @@ NtSetValueKey(IN HANDLE KeyHandle, KeyCell->Flags |= REG_KEY_LINK_CELL; } - ZwQuerySystemTime (&KeyCell->LastWriteTime); + KeQuerySystemTime (&KeyCell->LastWriteTime); CmiMarkBlockDirty (RegistryHive, KeyObject->KeyCellOffset); ExReleaseResourceLite(&CmiRegistryLock); @@ -1685,7 +1684,7 @@ NtDeleteValueKey (IN HANDLE KeyHandle, KeyObject->KeyCellOffset, ValueName); - ZwQuerySystemTime (&KeyObject->KeyCell->LastWriteTime); + KeQuerySystemTime (&KeyObject->KeyCell->LastWriteTime); CmiMarkBlockDirty (KeyObject->RegistryHive, KeyObject->KeyCellOffset); /* Release hive lock */ @@ -1749,7 +1748,7 @@ NtLoadKey2 (IN POBJECT_ATTRIBUTES KeyObjectAttributes, if (Buffer == NULL) return STATUS_INSUFFICIENT_RESOURCES; - Status = NtQueryObject (FileObjectAttributes->RootDirectory, + Status = ZwQueryObject (FileObjectAttributes->RootDirectory, ObjectNameInformation, Buffer, BufferSize, diff --git a/reactos/ntoskrnl/cm/regfile.c b/reactos/ntoskrnl/cm/regfile.c index 30bab35448f..42cb0fbad7d 100644 --- a/reactos/ntoskrnl/cm/regfile.c +++ b/reactos/ntoskrnl/cm/regfile.c @@ -71,7 +71,7 @@ CmiCreateDefaultRootKeyCell(PKEY_CELL RootKeyCell) RootKeyCell->CellSize = -sizeof(KEY_CELL); RootKeyCell->Id = REG_KEY_CELL_ID; RootKeyCell->Flags = REG_KEY_ROOT_CELL | REG_KEY_NAME_PACKED; - ZwQuerySystemTime(&RootKeyCell->LastWriteTime); + KeQuerySystemTime(&RootKeyCell->LastWriteTime); RootKeyCell->ParentKeyOffset = 0; RootKeyCell->NumberOfSubKeys = 0; RootKeyCell->HashTableOffset = -1; @@ -1939,7 +1939,7 @@ CmiFlushRegistryHive(PREGISTRY_HIVE RegistryHive) &RegistryHive->LogFileName); /* Update hive header modification time */ - ZwQuerySystemTime(&RegistryHive->HiveHeader->DateModified); + KeQuerySystemTime(&RegistryHive->HiveHeader->DateModified); /* Start log update */ Status = CmiStartLogUpdate(RegistryHive); @@ -2436,7 +2436,7 @@ CmiAddSubKey(PREGISTRY_HIVE RegistryHive, { NewKeyCell->Id = REG_KEY_CELL_ID; NewKeyCell->Flags = 0; - ZwQuerySystemTime(&NewKeyCell->LastWriteTime); + KeQuerySystemTime(&NewKeyCell->LastWriteTime); NewKeyCell->ParentKeyOffset = -1; NewKeyCell->NumberOfSubKeys = 0; NewKeyCell->HashTableOffset = -1; @@ -2552,7 +2552,7 @@ CmiAddSubKey(PREGISTRY_HIVE RegistryHive, ParentKeyCell->NumberOfSubKeys++; } - ZwQuerySystemTime (&ParentKeyCell->LastWriteTime); + KeQuerySystemTime (&ParentKeyCell->LastWriteTime); CmiMarkBlockDirty (RegistryHive, ParentKey->KeyCellOffset); return(Status); @@ -2710,7 +2710,7 @@ CmiRemoveSubKey(PREGISTRY_HIVE RegistryHive, } } - ZwQuerySystemTime(&ParentKey->KeyCell->LastWriteTime); + KeQuerySystemTime(&ParentKey->KeyCell->LastWriteTime); CmiMarkBlockDirty(ParentKey->RegistryHive, ParentKey->KeyCellOffset); } @@ -3210,7 +3210,7 @@ CmiDestroyValueCell(PREGISTRY_HIVE RegistryHive, /* Update time of heap */ if (!IsNoFileHive(RegistryHive)) - ZwQuerySystemTime(&Bin->DateModified); + KeQuerySystemTime(&Bin->DateModified); } /* Destroy the value cell */ @@ -3219,7 +3219,7 @@ CmiDestroyValueCell(PREGISTRY_HIVE RegistryHive, /* Update time of heap */ if (!IsNoFileHive(RegistryHive) && CmiGetCell (RegistryHive, ValueCellOffset, &Bin)) { - ZwQuerySystemTime(&Bin->DateModified); + KeQuerySystemTime(&Bin->DateModified); } return Status; @@ -3254,7 +3254,7 @@ CmiAddBin(PREGISTRY_HIVE RegistryHive, RegistryHive->FileSize += BinSize; tmpBin->BinSize = BinSize; tmpBin->Unused1 = 0; - ZwQuerySystemTime(&tmpBin->DateModified); + KeQuerySystemTime(&tmpBin->DateModified); tmpBin->Unused2 = 0; DPRINT (" BinOffset %lx BinSize %lx\n", tmpBin->BinOffset,tmpBin->BinSize); @@ -3382,7 +3382,7 @@ CmiAllocateCell (PREGISTRY_HIVE RegistryHive, return STATUS_UNSUCCESSFUL; } - ZwQuerySystemTime(&Bin->DateModified); + KeQuerySystemTime(&Bin->DateModified); CmiMarkBlockDirty(RegistryHive, RegistryHive->FreeListOffset[i]); if ((i + 1) < RegistryHive->FreeListSize) @@ -3471,7 +3471,7 @@ CmiDestroyCell (PREGISTRY_HIVE RegistryHive, /* Update time of heap */ if (!IsNoFileHive(RegistryHive) && CmiGetCell (RegistryHive, CellOffset,&pBin)) - ZwQuerySystemTime(&pBin->DateModified); + KeQuerySystemTime(&pBin->DateModified); CmiMarkBlockDirty(RegistryHive, CellOffset); } diff --git a/reactos/ntoskrnl/cm/regobj.c b/reactos/ntoskrnl/cm/regobj.c index f4de497cd6a..f0809a75d10 100644 --- a/reactos/ntoskrnl/cm/regobj.c +++ b/reactos/ntoskrnl/cm/regobj.c @@ -287,7 +287,7 @@ CmiObjectDelete(PVOID DeletedObject) ParentKeyObject, KeyObject); - NtQuerySystemTime (&ParentKeyObject->KeyCell->LastWriteTime); + KeQuerySystemTime (&ParentKeyObject->KeyCell->LastWriteTime); CmiMarkBlockDirty (ParentKeyObject->RegistryHive, ParentKeyObject->KeyCellOffset); From 49cd29484dac7c6393936d2187831e22ea7af8c9 Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Wed, 26 Jan 2005 13:52:53 +0000 Subject: [PATCH 012/185] Replace hardcoded values by known constants. svn path=/trunk/; revision=13308 --- reactos/ntoskrnl/se/priv.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/reactos/ntoskrnl/se/priv.c b/reactos/ntoskrnl/se/priv.c index 97721c1cea5..65e5e77a9a0 100644 --- a/reactos/ntoskrnl/se/priv.c +++ b/reactos/ntoskrnl/se/priv.c @@ -252,10 +252,10 @@ NtPrivilegeCheck (IN HANDLE ClientToken, Privilege = 0; Status = SeCaptureLuidAndAttributesArray (RequiredPrivileges->Privilege, PrivilegeCount, - 1, + UserMode, + NULL, 0, - 0, - 1, + PagedPool, 1, &Privilege, &Length); From c4ee7a37efd99d7a1c4b7aaad3404bb89968d19e Mon Sep 17 00:00:00 2001 From: Thomas Bluemel Date: Wed, 26 Jan 2005 13:54:07 +0000 Subject: [PATCH 013/185] fixed NtQueryDirectoryObject() to properly handle buffers that are not large enough svn path=/trunk/; revision=13309 --- reactos/ntoskrnl/ob/dirobj.c | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/reactos/ntoskrnl/ob/dirobj.c b/reactos/ntoskrnl/ob/dirobj.c index 3dadd85958c..92ee3c3388a 100644 --- a/reactos/ntoskrnl/ob/dirobj.c +++ b/reactos/ntoskrnl/ob/dirobj.c @@ -231,6 +231,8 @@ NtQueryDirectoryObject (IN HANDLE DirectoryHandle, ULONG RequiredSize = 0; ULONG nDirectories = 0; POBJECT_DIRECTORY_INFORMATION DirInfo = (POBJECT_DIRECTORY_INFORMATION)TemporaryBuffer; + + Status = STATUS_NO_MORE_ENTRIES; KeAcquireSpinLock(&Directory->Lock, &OldLevel); @@ -269,6 +271,8 @@ NtQueryDirectoryObject (IN HANDLE DirectoryHandle, nDirectories++; RequiredSize += EntrySize; + + Status = STATUS_SUCCESS; if(ReturnSingleEntry) { @@ -287,11 +291,13 @@ NtQueryDirectoryObject (IN HANDLE DirectoryHandle, RequiredSize += EntrySize; Status = STATUS_BUFFER_TOO_SMALL; } - else - { - /* just copy the entries that fit into the buffer */ - Status = STATUS_NO_MORE_ENTRIES; - } + + /* we couldn't query this entry, so leave the index that will be stored + in Context to this entry so the caller can query it the next time + he queries (hopefully with a buffer that is large enough then...) */ + NextEntry--; + + /* just copy the entries that fit into the buffer */ break; } } @@ -301,15 +307,17 @@ NtQueryDirectoryObject (IN HANDLE DirectoryHandle, SkipEntries--; } } + + if(!ReturnSingleEntry && ListEntry != &Directory->head) + { + /* there are more entries to enumerate but the buffer is already full. + only tell this to the user if he queries multiple entries */ + Status = STATUS_MORE_ENTRIES; + } if(NT_SUCCESS(Status)) { - if(SkipEntries > 0 || nDirectories == 0) - { - /* we skipped more entries than the directory contains, nothing more to do */ - Status = STATUS_NO_MORE_ENTRIES; - } - else + if(nDirectories > 0) { _SEH_TRY { From c7348f12047d2fb868b367943cff8c6b14dcc6c0 Mon Sep 17 00:00:00 2001 From: Thomas Bluemel Date: Wed, 26 Jan 2005 13:54:53 +0000 Subject: [PATCH 014/185] fixed usage of NtQueryDirectoryObject() svn path=/trunk/; revision=13310 --- reactos/apps/utils/objdir/objdir.c | 35 +++++++++++++++++++----------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/reactos/apps/utils/objdir/objdir.c b/reactos/apps/utils/objdir/objdir.c index 28c01bbb8de..82516fdb309 100644 --- a/reactos/apps/utils/objdir/objdir.c +++ b/reactos/apps/utils/objdir/objdir.c @@ -79,10 +79,14 @@ StatusToName (NTSTATUS Status) return "STATUS_PATH_SYNTAX_BAD"; case STATUS_NO_MORE_ENTRIES: return "STATUS_NO_MORE_ENTRIES"; + case STATUS_MORE_ENTRIES: + return "STATUS_MORE_ENTRIES"; case STATUS_ACCESS_DENIED: return "STATUS_ACCESS_DENIED"; case STATUS_UNSUCCESSFUL: return "STATUS_UNSUCCESSFUL"; + case STATUS_INVALID_HANDLE: + return "STATUS_INVALID_HANDLE"; } sprintf (RawValue, "0x%08lx", Status); return (const char *) RawValue; @@ -173,8 +177,9 @@ ListDirectory ( OBJECT_ATTRIBUTES ObjectAttributes; NTSTATUS Status; HANDLE DirectoryHandle; - BYTE DirectoryEntry [MAX_DIR_ENTRY * sizeof(OBJECT_DIRECTORY_INFORMATION)]; + BYTE DirectoryEntry [512]; POBJECT_DIRECTORY_INFORMATION pDirectoryEntry = (POBJECT_DIRECTORY_INFORMATION) DirectoryEntry; + POBJECT_DIRECTORY_INFORMATION pDirectoryEntries = (POBJECT_DIRECTORY_INFORMATION) DirectoryEntry; ULONG Context = 0; ULONG ReturnLength = 0; ULONG EntryCount = 0; @@ -217,25 +222,23 @@ ListDirectory ( return (FALSE); } printf ("\n Directory of %s\n\n", DirectoryNameA); + + for(;;) + { /* * Enumerate each item in the directory. */ Status = NtQueryDirectoryObject ( DirectoryHandle, - pDirectoryEntry, + pDirectoryEntries, sizeof DirectoryEntry, FALSE,/* ReturnSingleEntry */ - TRUE, /* RestartScan */ + FALSE, /* RestartScan */ & Context, & ReturnLength ); - if (!NT_SUCCESS(Status)) + if (!NT_SUCCESS(Status) && Status != STATUS_NO_MORE_ENTRIES) { - if (STATUS_NO_MORE_ENTRIES == Status) - { - NtClose (DirectoryHandle); - return TRUE; - } printf ( "Failed to query directory object (Status: %s)\n", StatusToName (Status) @@ -243,12 +246,17 @@ ListDirectory ( NtClose (DirectoryHandle); return (FALSE); } - while (0 != pDirectoryEntry->ObjectTypeName.Length) + if (Status == STATUS_NO_MORE_ENTRIES) + { + break; + } + pDirectoryEntry = pDirectoryEntries; + while (EntryCount < Context) { CHAR ObjectNameA [MAX_PATH]; CHAR TypeNameA [MAX_PATH]; CHAR TargetNameA [MAX_PATH]; - + if (0 == wcscmp (L"SymbolicLink", pDirectoryEntry->ObjectTypeName.Buffer)) { if (TRUE == ExpandSymbolicLink ( @@ -258,7 +266,7 @@ ListDirectory ( ) ) { - + printf ( "%-16s %s -> %s\n", RawUszAsz (pDirectoryEntry->ObjectTypeName.Buffer, TypeNameA), @@ -283,9 +291,10 @@ ListDirectory ( RawUszAsz (pDirectoryEntry->ObjectName.Buffer, ObjectNameA) ); } - ++ EntryCount; ++ pDirectoryEntry; + ++ EntryCount; } + }; printf ("\n\t%lu object(s)\n", EntryCount); /* * Free any resource. From fe6116543ec2de960751c98b82553d98c850b611 Mon Sep 17 00:00:00 2001 From: Alex Ionescu Date: Wed, 26 Jan 2005 13:58:37 +0000 Subject: [PATCH 015/185] Standardize comment headers. Patch by Trevor McCort svn path=/trunk/; revision=13311 --- reactos/ntoskrnl/cc/cacheman.c | 28 +- reactos/ntoskrnl/cc/copy.c | 5 +- reactos/ntoskrnl/cc/fs.c | 9 +- reactos/ntoskrnl/cc/mdl.c | 9 +- reactos/ntoskrnl/cc/pin.c | 5 +- reactos/ntoskrnl/cc/view.c | 25 +- reactos/ntoskrnl/cm/import.c | 1 + reactos/ntoskrnl/cm/ntfunc.c | 16 +- reactos/ntoskrnl/cm/regfile.c | 16 +- reactos/ntoskrnl/cm/registry.c | 3 +- reactos/ntoskrnl/cm/regobj.c | 14 +- reactos/ntoskrnl/dbg/dbgctrl.c | 25 +- reactos/ntoskrnl/dbg/errinfo.c | 27 +- reactos/ntoskrnl/dbg/i386/i386-dis.c | 10 + reactos/ntoskrnl/dbg/kdb.c | 24 +- reactos/ntoskrnl/dbg/kdb_keyboard.c | 33 +- reactos/ntoskrnl/dbg/kdb_serial.c | 37 +-- reactos/ntoskrnl/dbg/kdb_stabs.c | 33 +- reactos/ntoskrnl/dbg/kdb_symbols.c | 34 +-- reactos/ntoskrnl/dbg/print.c | 26 +- reactos/ntoskrnl/dbg/profile.c | 27 +- reactos/ntoskrnl/dbg/rdebug.c | 23 +- reactos/ntoskrnl/dbg/user.c | 26 +- reactos/ntoskrnl/ex/btree.c | 29 +- reactos/ntoskrnl/ex/callback.c | 33 +- reactos/ntoskrnl/ex/event.c | 27 +- reactos/ntoskrnl/ex/evtpair.c | 10 +- reactos/ntoskrnl/ex/fmutex.c | 25 +- reactos/ntoskrnl/ex/hashtab.c | 33 +- reactos/ntoskrnl/ex/i386/interlck.c | 9 +- reactos/ntoskrnl/ex/init.c | 32 +- reactos/ntoskrnl/ex/interlck.c | 7 +- reactos/ntoskrnl/ex/list.c | 3 +- reactos/ntoskrnl/ex/lookas.c | 8 +- reactos/ntoskrnl/ex/mutant.c | 26 +- reactos/ntoskrnl/ex/napi.c | 6 +- reactos/ntoskrnl/ex/power.c | 9 +- reactos/ntoskrnl/ex/profile.c | 27 +- reactos/ntoskrnl/ex/resource.c | 5 +- reactos/ntoskrnl/ex/rundown.c | 25 +- reactos/ntoskrnl/ex/sem.c | 5 +- reactos/ntoskrnl/ex/stree.c | 30 +- reactos/ntoskrnl/ex/synch.c | 25 +- reactos/ntoskrnl/ex/sysinfo.c | 9 +- reactos/ntoskrnl/ex/time.c | 5 +- reactos/ntoskrnl/ex/timer.c | 5 +- reactos/ntoskrnl/ex/util.c | 25 +- reactos/ntoskrnl/ex/uuid.c | 10 +- reactos/ntoskrnl/ex/win32k.c | 29 +- reactos/ntoskrnl/ex/work.c | 7 +- reactos/ntoskrnl/ex/zone.c | 11 +- reactos/ntoskrnl/fs/dbcsname.c | 6 +- reactos/ntoskrnl/fs/filelock.c | 6 +- reactos/ntoskrnl/fs/mcb.c | 6 +- reactos/ntoskrnl/fs/mdl.c | 6 +- reactos/ntoskrnl/fs/name.c | 6 +- reactos/ntoskrnl/fs/notify.c | 6 +- reactos/ntoskrnl/fs/oplock.c | 8 +- reactos/ntoskrnl/fs/pool.c | 6 +- reactos/ntoskrnl/fs/tunnel.c | 6 +- reactos/ntoskrnl/fs/unc.c | 6 +- reactos/ntoskrnl/fs/util.c | 6 +- reactos/ntoskrnl/inbv/inbv.c | 5 +- reactos/ntoskrnl/io/adapter.c | 5 +- reactos/ntoskrnl/io/arcname.c | 23 +- reactos/ntoskrnl/io/bootlog.c | 11 +- reactos/ntoskrnl/io/buildirp.c | 6 +- reactos/ntoskrnl/io/cancel.c | 24 +- reactos/ntoskrnl/io/cleanup.c | 16 +- reactos/ntoskrnl/io/cntrller.c | 5 +- reactos/ntoskrnl/io/create.c | 5 +- reactos/ntoskrnl/io/device.c | 13 +- reactos/ntoskrnl/io/deviface.c | 18 +- reactos/ntoskrnl/io/dir.c | 5 +- reactos/ntoskrnl/io/driver.c | 15 +- reactos/ntoskrnl/io/efi.c | 8 +- reactos/ntoskrnl/io/errlog.c | 5 +- reactos/ntoskrnl/io/error.c | 24 +- reactos/ntoskrnl/io/event.c | 5 +- reactos/ntoskrnl/io/file.c | 5 +- reactos/ntoskrnl/io/flush.c | 8 +- reactos/ntoskrnl/io/fs.c | 8 +- reactos/ntoskrnl/io/iocomp.c | 13 +- reactos/ntoskrnl/io/ioctrl.c | 8 +- reactos/ntoskrnl/io/iomgr.c | 13 +- reactos/ntoskrnl/io/iowork.c | 15 +- reactos/ntoskrnl/io/irp.c | 5 +- reactos/ntoskrnl/io/irq.c | 6 +- reactos/ntoskrnl/io/lock.c | 12 +- reactos/ntoskrnl/io/mailslot.c | 13 +- reactos/ntoskrnl/io/mdl.c | 5 +- reactos/ntoskrnl/io/npipe.c | 8 +- reactos/ntoskrnl/io/page.c | 7 +- reactos/ntoskrnl/io/parttab.c | 7 +- reactos/ntoskrnl/io/plugplay.c | 8 +- reactos/ntoskrnl/io/pnpdma.c | 13 +- reactos/ntoskrnl/io/pnpmgr.c | 13 +- reactos/ntoskrnl/io/pnpnotify.c | 16 +- reactos/ntoskrnl/io/pnpreport.c | 16 +- reactos/ntoskrnl/io/pnproot.c | 13 +- reactos/ntoskrnl/io/process.c | 23 +- reactos/ntoskrnl/io/queue.c | 11 +- reactos/ntoskrnl/io/rawfs.c | 5 +- reactos/ntoskrnl/io/remlock.c | 16 +- reactos/ntoskrnl/io/resource.c | 24 +- reactos/ntoskrnl/io/rw.c | 13 +- reactos/ntoskrnl/io/share.c | 25 +- reactos/ntoskrnl/io/shutdown.c | 5 +- reactos/ntoskrnl/io/symlink.c | 5 +- reactos/ntoskrnl/io/timer.c | 12 +- reactos/ntoskrnl/io/vpb.c | 5 +- reactos/ntoskrnl/io/wdm.c | 6 +- reactos/ntoskrnl/io/wmi.c | 5 +- reactos/ntoskrnl/io/xhaldisp.c | 5 +- reactos/ntoskrnl/io/xhaldrv.c | 5 +- reactos/ntoskrnl/kd/dlog.c | 5 +- reactos/ntoskrnl/kd/kdebug.c | 8 +- reactos/ntoskrnl/kd/mda.c | 22 +- reactos/ntoskrnl/kd/service.c | 5 +- reactos/ntoskrnl/ke/alert.c | 305 +++++++++---------- reactos/ntoskrnl/ke/apc.c | 29 +- reactos/ntoskrnl/ke/bug.c | 27 +- reactos/ntoskrnl/ke/catch.c | 30 +- reactos/ntoskrnl/ke/critical.c | 5 +- reactos/ntoskrnl/ke/device.c | 9 +- reactos/ntoskrnl/ke/dpc.c | 31 +- reactos/ntoskrnl/ke/error.c | 15 +- reactos/ntoskrnl/ke/event.c | 8 +- reactos/ntoskrnl/ke/gmutex.c | 24 +- reactos/ntoskrnl/ke/i386/bios.c | 23 +- reactos/ntoskrnl/ke/i386/brkpoint.c | 25 +- reactos/ntoskrnl/ke/i386/exp.c | 36 +-- reactos/ntoskrnl/ke/i386/fpu.c | 26 +- reactos/ntoskrnl/ke/i386/gdt.c | 27 +- reactos/ntoskrnl/ke/i386/idt.c | 10 +- reactos/ntoskrnl/ke/i386/irq.c | 27 +- reactos/ntoskrnl/ke/i386/kernel.c | 25 +- reactos/ntoskrnl/ke/i386/ldt.c | 25 +- reactos/ntoskrnl/ke/i386/thread.c | 31 +- reactos/ntoskrnl/ke/i386/tss.c | 25 +- reactos/ntoskrnl/ke/i386/usercall.c | 7 +- reactos/ntoskrnl/ke/i386/usertrap.c | 31 +- reactos/ntoskrnl/ke/i386/v86m.c | 23 +- reactos/ntoskrnl/ke/i386/vdm.c | 10 +- reactos/ntoskrnl/ke/ipi.c | 5 +- reactos/ntoskrnl/ke/kqueue.c | 16 +- reactos/ntoskrnl/ke/kthread.c | 25 +- reactos/ntoskrnl/ke/main.c | 27 +- reactos/ntoskrnl/ke/mutex.c | 24 +- reactos/ntoskrnl/ke/process.c | 25 +- reactos/ntoskrnl/ke/profile.c | 7 +- reactos/ntoskrnl/ke/queue.c | 24 +- reactos/ntoskrnl/ke/sem.c | 24 +- reactos/ntoskrnl/ke/spinlock.c | 5 +- reactos/ntoskrnl/ke/timer.c | 15 +- reactos/ntoskrnl/ke/wait.c | 19 +- reactos/ntoskrnl/ldr/init.c | 30 +- reactos/ntoskrnl/ldr/loader.c | 12 +- reactos/ntoskrnl/ldr/resource.c | 1 + reactos/ntoskrnl/ldr/rtl.c | 3 +- reactos/ntoskrnl/ldr/sysdll.c | 8 +- reactos/ntoskrnl/ldr/userldr.c | 8 +- reactos/ntoskrnl/lpc/close.c | 5 +- reactos/ntoskrnl/lpc/complete.c | 5 +- reactos/ntoskrnl/lpc/connect.c | 5 +- reactos/ntoskrnl/lpc/create.c | 5 +- reactos/ntoskrnl/lpc/listen.c | 5 +- reactos/ntoskrnl/lpc/port.c | 8 +- reactos/ntoskrnl/lpc/query.c | 5 +- reactos/ntoskrnl/lpc/queue.c | 5 +- reactos/ntoskrnl/lpc/receive.c | 5 +- reactos/ntoskrnl/lpc/reply.c | 5 +- reactos/ntoskrnl/lpc/send.c | 5 +- reactos/ntoskrnl/mkconfig.c | 10 + reactos/ntoskrnl/mm/anonmem.c | 28 +- reactos/ntoskrnl/mm/aspace.c | 5 +- reactos/ntoskrnl/mm/balance.c | 30 +- reactos/ntoskrnl/mm/cont.c | 5 +- reactos/ntoskrnl/mm/drvlck.c | 7 +- reactos/ntoskrnl/mm/elf32.c | 10 + reactos/ntoskrnl/mm/elf64.c | 10 + reactos/ntoskrnl/mm/freelist.c | 18 +- reactos/ntoskrnl/mm/i386/page.c | 30 +- reactos/ntoskrnl/mm/i386/pfault.c | 8 +- reactos/ntoskrnl/mm/iospace.c | 24 +- reactos/ntoskrnl/mm/kmap.c | 11 +- reactos/ntoskrnl/mm/marea.c | 27 +- reactos/ntoskrnl/mm/mdl.c | 13 +- reactos/ntoskrnl/mm/mm.c | 30 +- reactos/ntoskrnl/mm/mminit.c | 13 +- reactos/ntoskrnl/mm/mpw.c | 32 +- reactos/ntoskrnl/mm/ncache.c | 7 +- reactos/ntoskrnl/mm/npool.c | 20 +- reactos/ntoskrnl/mm/pagefile.c | 24 +- reactos/ntoskrnl/mm/pageop.c | 12 +- reactos/ntoskrnl/mm/pager.c | 13 +- reactos/ntoskrnl/mm/pagfault.c | 11 +- reactos/ntoskrnl/mm/paging.c | 8 +- reactos/ntoskrnl/mm/pe.c | 29 +- reactos/ntoskrnl/mm/physical.c | 8 +- reactos/ntoskrnl/mm/pool.c | 11 +- reactos/ntoskrnl/mm/ppool.c | 7 +- reactos/ntoskrnl/mm/region.c | 28 +- reactos/ntoskrnl/mm/rmap.c | 31 +- reactos/ntoskrnl/mm/section.c | 24 +- reactos/ntoskrnl/mm/verifier.c | 8 +- reactos/ntoskrnl/mm/virtual.c | 28 +- reactos/ntoskrnl/mm/wset.c | 24 +- reactos/ntoskrnl/ob/dirobj.c | 5 +- reactos/ntoskrnl/ob/namespc.c | 5 +- reactos/ntoskrnl/ob/ntobj.c | 13 +- reactos/ntoskrnl/ob/object.c | 16 +- reactos/ntoskrnl/ob/sdcache.c | 9 +- reactos/ntoskrnl/ob/security.c | 16 +- reactos/ntoskrnl/ob/symlink.c | 5 +- reactos/ntoskrnl/po/power.c | 26 +- reactos/ntoskrnl/ps/cid.c | 13 +- reactos/ntoskrnl/ps/create.c | 17 +- reactos/ntoskrnl/ps/debug.c | 33 +- reactos/ntoskrnl/ps/i386/continue.c | 14 +- reactos/ntoskrnl/ps/idle.c | 8 +- reactos/ntoskrnl/ps/job.c | 10 +- reactos/ntoskrnl/ps/kill.c | 5 +- reactos/ntoskrnl/ps/locale.c | 5 +- reactos/ntoskrnl/ps/process.c | 13 +- reactos/ntoskrnl/ps/psmgr.c | 11 +- reactos/ntoskrnl/ps/suspend.c | 28 +- reactos/ntoskrnl/ps/thread.c | 15 +- reactos/ntoskrnl/ps/tinfo.c | 8 +- reactos/ntoskrnl/ps/w32call.c | 15 +- reactos/ntoskrnl/ps/win32.c | 31 +- reactos/ntoskrnl/rtl/atom.c | 7 +- reactos/ntoskrnl/rtl/capture.c | 24 +- reactos/ntoskrnl/rtl/ctype.c | 7 +- reactos/ntoskrnl/rtl/handle.c | 11 +- reactos/ntoskrnl/rtl/i386/exception.c | 11 +- reactos/ntoskrnl/rtl/libsupp.c | 8 +- reactos/ntoskrnl/rtl/message.c | 13 +- reactos/ntoskrnl/rtl/misc.c | 15 +- reactos/ntoskrnl/rtl/nls.c | 4 +- reactos/ntoskrnl/rtl/purecall.c | 13 +- reactos/ntoskrnl/rtl/rangelist.c | 28 +- reactos/ntoskrnl/rtl/regio.c | 13 +- reactos/ntoskrnl/rtl/sprintf.c | 2 +- reactos/ntoskrnl/rtl/stdlib.c | 5 +- reactos/ntoskrnl/rtl/string.c | 8 +- reactos/ntoskrnl/rtl/strtok.c | 8 +- reactos/ntoskrnl/rtl/swprintf.c | 7 +- reactos/ntoskrnl/rtl/wstring.c | 7 +- reactos/ntoskrnl/se/access.c | 13 +- reactos/ntoskrnl/se/acl.c | 13 +- reactos/ntoskrnl/se/audit.c | 13 +- reactos/ntoskrnl/se/lsa.c | 9 +- reactos/ntoskrnl/se/luid.c | 13 +- reactos/ntoskrnl/se/priv.c | 13 +- reactos/ntoskrnl/se/sd.c | 13 +- reactos/ntoskrnl/se/semgr.c | 13 +- reactos/ntoskrnl/se/sid.c | 13 +- reactos/ntoskrnl/se/token.c | 13 +- reactos/ntoskrnl/tests/setup.c | 10 + reactos/ntoskrnl/tests/tests/VirtualMemory.c | 10 + 261 files changed, 1349 insertions(+), 2692 deletions(-) diff --git a/reactos/ntoskrnl/cc/cacheman.c b/reactos/ntoskrnl/cc/cacheman.c index f174859aa73..b95459f979f 100644 --- a/reactos/ntoskrnl/cc/cacheman.c +++ b/reactos/ntoskrnl/cc/cacheman.c @@ -1,29 +1,11 @@ -/* - * ReactOS kernel - * Copyright (C) 2000 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -/* +/* $Id:$ + * + * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/cc/cacheman.c * PURPOSE: Cache manager - * PROGRAMMER: David Welch (welch@cwcom.net) - * PORTABILITY: Checked - * UPDATE HISTORY: - * Created 22/05/98 + * + * PROGRAMMERS: David Welch (welch@cwcom.net) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/cc/copy.c b/reactos/ntoskrnl/cc/copy.c index ab59de0eb2b..60c4893e1cb 100644 --- a/reactos/ntoskrnl/cc/copy.c +++ b/reactos/ntoskrnl/cc/copy.c @@ -4,9 +4,8 @@ * PROJECT: ReactOS kernel * FILE: ntoskrnl/cc/copy.c * PURPOSE: Implements cache managers copy interface - * PROGRAMMER: Hartmut Birr - * UPDATE HISTORY: - * Created 05.10.2001 + * + * PROGRAMMERS: Hartmut Birr */ /* INCLUDES ******************************************************************/ diff --git a/reactos/ntoskrnl/cc/fs.c b/reactos/ntoskrnl/cc/fs.c index 09b490b9d6e..5a54a2575dc 100644 --- a/reactos/ntoskrnl/cc/fs.c +++ b/reactos/ntoskrnl/cc/fs.c @@ -1,10 +1,11 @@ -/* COPYRIGHT: See COPYING in the top level directory +/* $Id:$ + * + * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/cc/fs.c * PURPOSE: Implements cache managers functions useful for File Systems - * PROGRAMMER: Alex Ionescu - * UPDATE HISTORY: - * Created 20/06/04 + * + * PROGRAMMERS: Alex Ionescu */ /* INCLUDES ******************************************************************/ diff --git a/reactos/ntoskrnl/cc/mdl.c b/reactos/ntoskrnl/cc/mdl.c index 367d232ff27..0618a20bf78 100644 --- a/reactos/ntoskrnl/cc/mdl.c +++ b/reactos/ntoskrnl/cc/mdl.c @@ -1,10 +1,11 @@ -/* COPYRIGHT: See COPYING in the top level directory +/* $Id:$ + * + * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/cc/fs.c * PURPOSE: Implements MDL Cache Manager Functions - * PROGRAMMER: Alex Ionescu - * UPDATE HISTORY: - * Created 20/06/04 + * + * PROGRAMMERS: Alex Ionescu */ /* INCLUDES ******************************************************************/ diff --git a/reactos/ntoskrnl/cc/pin.c b/reactos/ntoskrnl/cc/pin.c index de20a1ae947..1b51b243e6a 100644 --- a/reactos/ntoskrnl/cc/pin.c +++ b/reactos/ntoskrnl/cc/pin.c @@ -4,9 +4,8 @@ * PROJECT: ReactOS kernel * FILE: ntoskrnl/cc/pin.c * PURPOSE: Implements cache managers pinning interface - * PROGRAMMER: Hartmut Birr - * UPDATE HISTORY: - * Created 05.10.2001 + * + * PROGRAMMERS: Hartmut Birr */ /* INCLUDES ******************************************************************/ diff --git a/reactos/ntoskrnl/cc/view.c b/reactos/ntoskrnl/cc/view.c index 4cd85bcb911..9162b84766b 100644 --- a/reactos/ntoskrnl/cc/view.c +++ b/reactos/ntoskrnl/cc/view.c @@ -1,30 +1,11 @@ -/* - * ReactOS kernel - * Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ /* $Id$ * + * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/cc/view.c * PURPOSE: Cache manager - * PROGRAMMER: David Welch (welch@mcmail.com) - * PORTABILITY: Checked - * UPDATE HISTORY: - * Created 22/05/98 + * + * PROGRAMMERS: David Welch (welch@mcmail.com) */ /* NOTES ********************************************************************** diff --git a/reactos/ntoskrnl/cm/import.c b/reactos/ntoskrnl/cm/import.c index 6523c58e65c..16b23ceb3c7 100644 --- a/reactos/ntoskrnl/cm/import.c +++ b/reactos/ntoskrnl/cm/import.c @@ -4,6 +4,7 @@ * PROJECT: ReactOS kernel * FILE: ntoskrnl/cm/import.c * PURPOSE: Registry-Hive import functions + * * PROGRAMMERS: Eric Kohl */ diff --git a/reactos/ntoskrnl/cm/ntfunc.c b/reactos/ntoskrnl/cm/ntfunc.c index fe789811ccf..2c7bab080c6 100644 --- a/reactos/ntoskrnl/cm/ntfunc.c +++ b/reactos/ntoskrnl/cm/ntfunc.c @@ -1,10 +1,12 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: ntoskrnl/cm/ntfunc.c - * PURPOSE: Ntxxx function for registry access - * UPDATE HISTORY: -*/ +/* $Id$ + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/cm/ntfunc.c + * PURPOSE: Ntxxx function for registry access + * + * PROGRAMMERS: No programmer listed. + */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/cm/regfile.c b/reactos/ntoskrnl/cm/regfile.c index 42cb0fbad7d..5479ec93992 100644 --- a/reactos/ntoskrnl/cm/regfile.c +++ b/reactos/ntoskrnl/cm/regfile.c @@ -1,10 +1,12 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: ntoskrnl/cm/regfile.c - * PURPOSE: Registry file manipulation routines - * UPDATE HISTORY: -*/ +/* $Id$ + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/cm/regfile.c + * PURPOSE: Registry file manipulation routines + * + * PROGRAMMERS: No programmer listed. + */ #include #define NDEBUG diff --git a/reactos/ntoskrnl/cm/registry.c b/reactos/ntoskrnl/cm/registry.c index 996dea34f86..7223fef3a24 100644 --- a/reactos/ntoskrnl/cm/registry.c +++ b/reactos/ntoskrnl/cm/registry.c @@ -4,11 +4,10 @@ * PROJECT: ReactOS kernel * FILE: ntoskrnl/cm/registry.c * PURPOSE: Registry functions + * * PROGRAMMERS: Rex Jolliff * Matt Pyne * Jean Michault - * UPDATE HISTORY: - * Created 22/05/98 */ #include diff --git a/reactos/ntoskrnl/cm/regobj.c b/reactos/ntoskrnl/cm/regobj.c index f0809a75d10..0f6542aab78 100644 --- a/reactos/ntoskrnl/cm/regobj.c +++ b/reactos/ntoskrnl/cm/regobj.c @@ -1,9 +1,11 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: ntoskrnl/cm/regobj.c - * PURPOSE: Registry object manipulation routines. - * UPDATE HISTORY: +/* $Id$ + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/cm/regobj.c + * PURPOSE: Registry object manipulation routines. + * + * PROGRAMMERS: No programmer listed. */ #include diff --git a/reactos/ntoskrnl/dbg/dbgctrl.c b/reactos/ntoskrnl/dbg/dbgctrl.c index ac5fdb63afd..06a97486856 100644 --- a/reactos/ntoskrnl/dbg/dbgctrl.c +++ b/reactos/ntoskrnl/dbg/dbgctrl.c @@ -1,26 +1,11 @@ -/* - * ReactOS kernel - * Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -/* +/* $Id:$ + * + * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/dbg/dbgctrl.c * PURPOSE: System debug control - * PORTABILITY: Checked + * + * PROGRAMMERS: No programmer listed. */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/dbg/errinfo.c b/reactos/ntoskrnl/dbg/errinfo.c index 5ca0e9b5e78..1cff819499b 100644 --- a/reactos/ntoskrnl/dbg/errinfo.c +++ b/reactos/ntoskrnl/dbg/errinfo.c @@ -1,28 +1,11 @@ -/* - * ReactOS kernel - * Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -/* +/* $Id:$ + * + * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/dbg/errinfo.c * PURPOSE: Print information descriptions of error messages - * PORTABILITY: Checked - * UPDATE HISTORY: - * Created 22/05/98 + * + * PROGRAMMERS: No programmer listed. */ /* INCLUDES ******************************************************************/ diff --git a/reactos/ntoskrnl/dbg/i386/i386-dis.c b/reactos/ntoskrnl/dbg/i386/i386-dis.c index 558b120e5dc..66bb380e896 100644 --- a/reactos/ntoskrnl/dbg/i386/i386-dis.c +++ b/reactos/ntoskrnl/dbg/i386/i386-dis.c @@ -1,3 +1,13 @@ +/* $Id:$ + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/dbg/i386/i386-dis.c + * PURPOSE: No purpose listed. + * + * PROGRAMMERS: No programmer listed. + */ + #include /* ReactOS compatibility stuff. */ diff --git a/reactos/ntoskrnl/dbg/kdb.c b/reactos/ntoskrnl/dbg/kdb.c index ff23cf566a6..c6b7368f818 100644 --- a/reactos/ntoskrnl/dbg/kdb.c +++ b/reactos/ntoskrnl/dbg/kdb.c @@ -1,29 +1,11 @@ -/* - * ReactOS kernel - * Copyright (C) 2001-2004 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ /* $Id$ * + * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/dbg/kdb.c * PURPOSE: Kernel debugger - * PROGRAMMER: David Welch (welch@mcmail.com) - * UPDATE HISTORY: - * Created 01/03/01 + * + * PROGRAMMERS: David Welch (welch@mcmail.com) */ /* INCLUDES ******************************************************************/ diff --git a/reactos/ntoskrnl/dbg/kdb_keyboard.c b/reactos/ntoskrnl/dbg/kdb_keyboard.c index 11cddefd09e..a9804e39aa0 100644 --- a/reactos/ntoskrnl/dbg/kdb_keyboard.c +++ b/reactos/ntoskrnl/dbg/kdb_keyboard.c @@ -1,27 +1,12 @@ -/* - * ReactOS kernel - * Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -/* - * PROJECT: ReactOS kernel - * FILE: ntoskrnl/dbg/kdb_keyboard.c - * PURPOSE: Keyboard driver - * PROGRAMMER: Victor Kirhenshtein (sauros@iname.com) - * Jason Filby (jasonfilby@yahoo.com) +/* $Id:$ + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/dbg/kdb_keyboard.c + * PURPOSE: Keyboard driver + * + * PROGRAMMERS: Victor Kirhenshtein (sauros@iname.com) + * Jason Filby (jasonfilby@yahoo.com) */ /* INCLUDES ****************************************************************/ diff --git a/reactos/ntoskrnl/dbg/kdb_serial.c b/reactos/ntoskrnl/dbg/kdb_serial.c index 0c27f1796d0..3223a77f7c4 100644 --- a/reactos/ntoskrnl/dbg/kdb_serial.c +++ b/reactos/ntoskrnl/dbg/kdb_serial.c @@ -1,30 +1,13 @@ -/* - * ReactOS kernel - * Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -/* - * PROJECT: ReactOS kernel - * FILE: ntoskrnl/dbg/kdb_serial.c - * PURPOSE: Serial driver - * PROGRAMMER: Original: - * Victor Kirhenshtein (sauros@iname.com) - * Jason Filby (jasonfilby@yahoo.com) - * Modified: - * arty +/* $Id:$ + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/dbg/kdb_serial.c + * PURPOSE: Serial driver + * + * PROGRAMMERS: Victor Kirhenshtein (sauros@iname.com) + * Jason Filby (jasonfilby@yahoo.com) + * arty */ /* INCLUDES ****************************************************************/ diff --git a/reactos/ntoskrnl/dbg/kdb_stabs.c b/reactos/ntoskrnl/dbg/kdb_stabs.c index c6677a00c1d..2bb9f986840 100644 --- a/reactos/ntoskrnl/dbg/kdb_stabs.c +++ b/reactos/ntoskrnl/dbg/kdb_stabs.c @@ -1,28 +1,11 @@ -/* - * ReactOS kernel - * Copyright (C) 2004 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -/* - * PROJECT: ReactOS kernel - * FILE: ntoskrnl/dbg/kdb_stabs.c - * PURPOSE: Stabs functions... - * PROGRAMMER: Gregor Anich (blight@blight.eu.org) - * REVISION HISTORY: - * 2004/06/27: Created +/* $Id:$ + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/dbg/kdb_stabs.c + * PURPOSE: Stabs functions... + * + * PROGRAMMERS: Gregor Anich (blight@blight.eu.org) */ #include diff --git a/reactos/ntoskrnl/dbg/kdb_symbols.c b/reactos/ntoskrnl/dbg/kdb_symbols.c index 00113238d64..381b2d37192 100644 --- a/reactos/ntoskrnl/dbg/kdb_symbols.c +++ b/reactos/ntoskrnl/dbg/kdb_symbols.c @@ -1,21 +1,3 @@ -/* - * ReactOS kernel - * Copyright (C) 1998-2004 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ /* * Parts of this file based on work Copyright (c) 1990, 1993 * The Regents of the University of California. All rights reserved. @@ -44,13 +26,15 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ -/* - * PROJECT: ReactOS kernel - * FILE: ntoskrnl/dbg/kdb_symbols.c - * PURPOSE: Getting symbol information... - * PROGRAMMER: David Welch (welch@cwcom.net), ... - * REVISION HISTORY: - * ??/??/??: Created + +/* $Id:$ + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/dbg/kdb_symbols.c + * PURPOSE: Getting symbol information... + * + * PROGRAMMERS: David Welch (welch@cwcom.net) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/dbg/print.c b/reactos/ntoskrnl/dbg/print.c index f2ad9b82c77..cc0649d12fe 100644 --- a/reactos/ntoskrnl/dbg/print.c +++ b/reactos/ntoskrnl/dbg/print.c @@ -1,31 +1,11 @@ -/* - * ReactOS kernel - * Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ /* $Id$ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/dbg/print.c - * PURPOSE: Debug output - * PROGRAMMER: Eric Kohl (ekohl@abo.rhein-zeitung.de) - * PORTABILITY: Unchecked - * UPDATE HISTORY: - * 14/10/99: Created + * PURPOSE: Debug output + * + * PROGRAMMERS: Eric Kohl (ekohl@abo.rhein-zeitung.de) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/dbg/profile.c b/reactos/ntoskrnl/dbg/profile.c index ec311ae3a76..15809fbb281 100755 --- a/reactos/ntoskrnl/dbg/profile.c +++ b/reactos/ntoskrnl/dbg/profile.c @@ -1,28 +1,11 @@ -/* - * ReactOS kernel - * Copyright (C) 1998-2003 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -/* +/* $Id:$ + * + * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/dbg/profile.c * PURPOSE: Kernel profiling - * PROGRAMMER: Casper S. Hornstrup (chorns@users.sourceforge.net) - * UPDATE HISTORY: - * Created 12/01/2003 + * + * PROGRAMMERS: Casper S. Hornstrup (chorns@users.sourceforge.net) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/dbg/rdebug.c b/reactos/ntoskrnl/dbg/rdebug.c index b26a882f509..f9aefe69717 100644 --- a/reactos/ntoskrnl/dbg/rdebug.c +++ b/reactos/ntoskrnl/dbg/rdebug.c @@ -1,30 +1,11 @@ -/* - * ReactOS kernel - * Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ /* $Id$ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/dbg/rdebug.c * PURPOSE: Runtime debugging support - * PROGRAMMER: Casper S. Hornstrup (chorns@users.sourceforge.net) - * UPDATE HISTORY: - * 01-05-2001 CSH Created + * + * PROGRAMMERS: Casper S. Hornstrup (chorns@users.sourceforge.net) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/dbg/user.c b/reactos/ntoskrnl/dbg/user.c index 0c03ae27fc1..b104c548b6a 100644 --- a/reactos/ntoskrnl/dbg/user.c +++ b/reactos/ntoskrnl/dbg/user.c @@ -1,27 +1,11 @@ -/* - * ReactOS kernel - * Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -/* +/* $Id:$ + * + * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/dbg/user.c * PURPOSE: User mode debugging - * PROGRAMMER: David Welch (welch@cwcom.net) - * PORTABILITY: Unchecked + * + * PROGRAMMERS: David Welch (welch@cwcom.net) */ /* INCLUDES ******************************************************************/ diff --git a/reactos/ntoskrnl/ex/btree.c b/reactos/ntoskrnl/ex/btree.c index d626809470e..6ced8855417 100644 --- a/reactos/ntoskrnl/ex/btree.c +++ b/reactos/ntoskrnl/ex/btree.c @@ -1,28 +1,11 @@ -/* - * ReactOS kernel - * Copyright (C) 1998-2002 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -/* +/* $Id:$ + * + * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel - * FILE: btree.c + * FILE: ntoskrnl/ex/btree.c * PURPOSE: Binary tree support - * PROGRAMMER: Casper S. Hornstrup (chorns@users.sourceforge.net) - * UPDATE HISTORY: - * 15-03-2002 CSH Created + * + * PROGRAMMERS: Casper S. Hornstrup (chorns@users.sourceforge.net) */ #include diff --git a/reactos/ntoskrnl/ex/callback.c b/reactos/ntoskrnl/ex/callback.c index 757cea4d43a..d6cf2cbe629 100644 --- a/reactos/ntoskrnl/ex/callback.c +++ b/reactos/ntoskrnl/ex/callback.c @@ -1,34 +1,17 @@ -/* - * ReactOS kernel - * Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ /* $Id$ * + * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/ex/callback.c * PURPOSE: Executive callbacks - * PROGRAMMER: David Welch (welch@mcmail.com) + * + * PROGRAMMERS: David Welch (welch@mcmail.com) * Alex Ionescu (alex@relsoft.net) - * PORTABILITY: Checked. - * UPDATE HISTORY: - * Added all functions 30/05/04 - * Created 22/05/98 - * NOTE: - * These funtions are not implemented in NT4, but + */ + + +/* + * NOTE: These funtions are not implemented in NT4, but * they are implemented in Win2k. */ diff --git a/reactos/ntoskrnl/ex/event.c b/reactos/ntoskrnl/ex/event.c index 0993470ad9d..386f15b0945 100644 --- a/reactos/ntoskrnl/ex/event.c +++ b/reactos/ntoskrnl/ex/event.c @@ -1,28 +1,11 @@ -/* - * ReactOS kernel - * Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -/* +/* $Id:$ + * + * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/nt/event.c * PURPOSE: Named event support - * PROGRAMMER: Philip Susi and David Welch - * UPDATE HISTORY: - * Created 22/05/98 + * + * PROGRAMMERS: Philip Susi and David Welch */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/ex/evtpair.c b/reactos/ntoskrnl/ex/evtpair.c index 6784227ab48..2c3a9d4c475 100644 --- a/reactos/ntoskrnl/ex/evtpair.c +++ b/reactos/ntoskrnl/ex/evtpair.c @@ -4,13 +4,9 @@ * PROJECT: ReactOS kernel * FILE: ntoskrnl/ex/evtpair.c * PURPOSE: Support for event pairs - * PROGRAMMER: David Welch (welch@mcmail.com) - * UPDATE HISTORY: - * Created 22/05/98 - * Updated 09/08/2003 by Skywing (skywing@valhallalegends.com) - * to correctly maintain ownership of the dispatcher lock - * between KeSetEvent and KeWaitForSingleObject calls. - * Additionally, implemented the thread-eventpair routines. + * + * PROGRAMMERS: David Welch (welch@mcmail.com) + * Skywing (skywing@valhallalegends.com) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/ex/fmutex.c b/reactos/ntoskrnl/ex/fmutex.c index d6f7a362be3..8bb01b4015d 100644 --- a/reactos/ntoskrnl/ex/fmutex.c +++ b/reactos/ntoskrnl/ex/fmutex.c @@ -1,30 +1,11 @@ -/* - * ReactOS kernel - * Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ /* $Id$ * + * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/ex/fmutex.c * PURPOSE: Implements fast mutexes - * PROGRAMMER: David Welch (welch@cwcom.net) - * PORTABILITY: Checked. - * UPDATE HISTORY: - * Created 22/05/98 + * + * PROGRAMMERS: David Welch (welch@cwcom.net) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/ex/hashtab.c b/reactos/ntoskrnl/ex/hashtab.c index 8d5c77921f3..011aec6eb02 100644 --- a/reactos/ntoskrnl/ex/hashtab.c +++ b/reactos/ntoskrnl/ex/hashtab.c @@ -1,32 +1,19 @@ -/* - * ReactOS kernel - * Copyright (C) 1998-2002 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -/* +/* $Id:$ + * + * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel - * FILE: hashtab.c + * FILE: ntoskrnl/ex/hashtab.c * PURPOSE: Hash table support - * PROGRAMMER: Casper S. Hornstrup (chorns@users.sourceforge.net) + * + * PROGRAMMERS: Casper S. Hornstrup (chorns@users.sourceforge.net) + */ + +/* * NOTES: The hash function is from: * Bob Jenkins * http://burtleburtle.net/bob/hash/doobs.html - * UPDATE HISTORY: - * 15-03-2002 CSH Created */ + #include #define NDEBUG diff --git a/reactos/ntoskrnl/ex/i386/interlck.c b/reactos/ntoskrnl/ex/i386/interlck.c index 2c031db2779..12a3c2d9887 100644 --- a/reactos/ntoskrnl/ex/i386/interlck.c +++ b/reactos/ntoskrnl/ex/i386/interlck.c @@ -1,8 +1,13 @@ /* $Id$ + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/ex/i386/interlck.c + * PURPOSE: No purpose listed. * - * reactos/ntoskrnl/ex/i386/interlck.c - * + * PROGRAMMERS: No programmer listed. */ + #include #ifdef LOCK diff --git a/reactos/ntoskrnl/ex/init.c b/reactos/ntoskrnl/ex/init.c index c81768b0a34..c47ef4f05b4 100644 --- a/reactos/ntoskrnl/ex/init.c +++ b/reactos/ntoskrnl/ex/init.c @@ -1,29 +1,11 @@ -/* - * ReactOS kernel - * Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -/* +/* $Id:$ + * + * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel - * FILE: kernel/ex/init.c - * PURPOSE: executive initalization - * PROGRAMMER: Eric Kohl (ekohl@abo.rhein-zeitung.de) - * PORTABILITY: Checked. - * UPDATE HISTORY: - * Created 11/09/99 + * FILE: ntoskrnl/ex/init.c + * PURPOSE: Executive initalization + * + * PROGRAMMERS: Eric Kohl (ekohl@abo.rhein-zeitung.de) */ #include diff --git a/reactos/ntoskrnl/ex/interlck.c b/reactos/ntoskrnl/ex/interlck.c index 2fe585641ff..e7863fd1ef5 100644 --- a/reactos/ntoskrnl/ex/interlck.c +++ b/reactos/ntoskrnl/ex/interlck.c @@ -3,10 +3,9 @@ * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/ex/interlck.c - * PURPOSE: Implements interlocked functions - * PROGRAMMER: David Welch (welch@mcmail.com) - * UPDATE HISTORY: - * Created 22/05/98 + * PURPOSE: Implements interlocked functions + * + * PROGRAMMERS: David Welch (welch@mcmail.com) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/ex/list.c b/reactos/ntoskrnl/ex/list.c index 398cb10794d..25fbbea0eae 100644 --- a/reactos/ntoskrnl/ex/list.c +++ b/reactos/ntoskrnl/ex/list.c @@ -5,10 +5,9 @@ * FILE: ntoskrnl/ex/list.c * PURPOSE: Manages double linked lists, single linked lists and * sequenced lists + * * PROGRAMMERS: David Welch (welch@mcmail.com) * Casper S. Hornstrup (chorns@users.sourceforge.net) - * UPDATE HISTORY: - * 02-07-2001 CSH Implemented sequenced lists */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/ex/lookas.c b/reactos/ntoskrnl/ex/lookas.c index 1f1fe9dde76..1bd2a64050e 100644 --- a/reactos/ntoskrnl/ex/lookas.c +++ b/reactos/ntoskrnl/ex/lookas.c @@ -4,12 +4,14 @@ * PROJECT: ReactOS kernel * FILE: ntoskrnl/ex/lookas.c * PURPOSE: Lookaside lists + * * PROGRAMMERS: David Welch (welch@mcmail.com) * Casper S. Hornstrup (chorns@users.sourceforge.net) + */ + + +/* * TODO: Use InterlockedXxxEntrySList for binary compatibility - * UPDATE HISTORY: - * 22-05-1998 DW Created - * 02-07-2001 CSH Implemented lookaside lists */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/ex/mutant.c b/reactos/ntoskrnl/ex/mutant.c index 392328403b8..137da181826 100644 --- a/reactos/ntoskrnl/ex/mutant.c +++ b/reactos/ntoskrnl/ex/mutant.c @@ -1,29 +1,11 @@ -/* - * ReactOS kernel - * Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -/* +/* $Id:$ + * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/ex/mutant.c * PURPOSE: Synchronization primitives - * PROGRAMMER: David Welch (welch@cwcom.net) - * UPDATE HISTORY: - * Created 22/05/98 + * + * PROGRAMMERS: David Welch (welch@cwcom.net) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/ex/napi.c b/reactos/ntoskrnl/ex/napi.c index b250a4e75d5..aa61d3bd5ba 100644 --- a/reactos/ntoskrnl/ex/napi.c +++ b/reactos/ntoskrnl/ex/napi.c @@ -1,9 +1,11 @@ -/* +/* $Id:$ + * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/ex/napi.c * PURPOSE: Native API support routines - * PROGRAMMER: David Welch (welch@cwcom.net) + * + * PROGRAMMERS: David Welch (welch@cwcom.net) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/ex/power.c b/reactos/ntoskrnl/ex/power.c index baaa3c2c07f..8d33ce70927 100644 --- a/reactos/ntoskrnl/ex/power.c +++ b/reactos/ntoskrnl/ex/power.c @@ -1,12 +1,11 @@ -/* +/* $Id:$ + * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/ex/power.c * PURPOSE: Power managment - * PROGRAMMER: David Welch (welch@cwcom.net) - * UPDATE HISTORY: - * Created 22/05/98 - * Added reboot support 30/01/99 + * + * PROGRAMMERS: David Welch (welch@cwcom.net) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/ex/profile.c b/reactos/ntoskrnl/ex/profile.c index 30170a648ed..822ef1894ac 100644 --- a/reactos/ntoskrnl/ex/profile.c +++ b/reactos/ntoskrnl/ex/profile.c @@ -1,28 +1,11 @@ -/* - * ReactOS kernel - * Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -/* +/* $Id:$ + * + * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/nt/profile.c * PURPOSE: Support for profiling - * PROGRAMMER: Nobody - * UPDATE HISTORY: - * + * + * PROGRAMMERS: No programmer listed. */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/ex/resource.c b/reactos/ntoskrnl/ex/resource.c index 673034753a2..2da0c9752b0 100644 --- a/reactos/ntoskrnl/ex/resource.c +++ b/reactos/ntoskrnl/ex/resource.c @@ -4,9 +4,8 @@ * PROJECT: ReactOS kernel * FILE: ntoskrnl/ex/resource.c * PURPOSE: Resource synchronization construct - * PROGRAMMER: Unknown - * UPDATE HISTORY: - * Created 22/05/98 + * + * PROGRAMMERS: No programmer listed. */ diff --git a/reactos/ntoskrnl/ex/rundown.c b/reactos/ntoskrnl/ex/rundown.c index 39dfa89770e..3f7615155e8 100644 --- a/reactos/ntoskrnl/ex/rundown.c +++ b/reactos/ntoskrnl/ex/rundown.c @@ -1,26 +1,11 @@ -/* - * ReactOS kernel - * Copyright (C) 1998 - 2004 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -/* +/* $Id:$ + * + * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/ex/rundown.c * PURPOSE: Rundown Protection Functions - * PORTABILITY: Checked + * + * PROGRAMMERS: No programmer listed. */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/ex/sem.c b/reactos/ntoskrnl/ex/sem.c index 38f16e5112b..6ca1ebe01db 100644 --- a/reactos/ntoskrnl/ex/sem.c +++ b/reactos/ntoskrnl/ex/sem.c @@ -4,9 +4,8 @@ * PROJECT: ReactOS kernel * FILE: ntoskrnl/ex/sem.c * PURPOSE: Synchronization primitives - * PROGRAMMER: David Welch (welch@mcmail.com) - * UPDATE HISTORY: - * Created 22/05/98 + * + * PROGRAMMERS: David Welch (welch@mcmail.com) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/ex/stree.c b/reactos/ntoskrnl/ex/stree.c index 8a33bb97fd2..14c740dfbcd 100644 --- a/reactos/ntoskrnl/ex/stree.c +++ b/reactos/ntoskrnl/ex/stree.c @@ -1,31 +1,15 @@ -/* - * ReactOS kernel - * Copyright (C) 1998-2002 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -/* +/* $Id:$ + * + * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel - * FILE: stree.c + * FILE: ntoskrnl/ex/stree.c * PURPOSE: Splay tree support - * PROGRAMMER: Casper S. Hornstrup (chorns@users.sourceforge.net) + * + * PROGRAMMERS: Casper S. Hornstrup (chorns@users.sourceforge.net) + * * NOTES: Based on a splay tree implementation by * Daniel Stenberg * http://www.contactor.se/~dast/stuff/dsplay-1.2.tar.gz - * UPDATE HISTORY: - * 15-03-2002 CSH Created */ #include diff --git a/reactos/ntoskrnl/ex/synch.c b/reactos/ntoskrnl/ex/synch.c index 08984df02f0..ade25c7f34d 100644 --- a/reactos/ntoskrnl/ex/synch.c +++ b/reactos/ntoskrnl/ex/synch.c @@ -1,26 +1,11 @@ -/* - * ReactOS kernel - * Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -/* +/* $Id:$ + * + * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/ex/synch.c * PURPOSE: Synchronization Functions (Pushlocks) - * PORTABILITY: Checked + * + * PROGRAMMERS: No programmer listed. */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/ex/sysinfo.c b/reactos/ntoskrnl/ex/sysinfo.c index 10e36999ebd..de9efb57168 100644 --- a/reactos/ntoskrnl/ex/sysinfo.c +++ b/reactos/ntoskrnl/ex/sysinfo.c @@ -4,12 +4,9 @@ * PROJECT: ReactOS kernel * FILE: ntoskrnl/ex/sysinfo.c * PURPOSE: System information functions - * PROGRAMMER: David Welch (welch@mcmail.com) - * UPDATE HISTORY: - * Created 22/05/98 - * 20/03/2003: implemented querying SystemProcessInformation, - * no more copying to-from the caller (Aleksey - * Bragin ) + * + * PROGRAMMERS: David Welch (welch@mcmail.com) + * Aleksey Bragin (aleksey@studiocerebral.com) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/ex/time.c b/reactos/ntoskrnl/ex/time.c index 36e29a87283..9e5965893a4 100644 --- a/reactos/ntoskrnl/ex/time.c +++ b/reactos/ntoskrnl/ex/time.c @@ -4,9 +4,8 @@ * PROJECT: ReactOS kernel * FILE: ntoskrnl/ex/time.c * PURPOSE: Time - * PROGRAMMER: David Welch (welch@mcmail.com) - * UPDATE HISTORY: - * Created 22/05/98 + * + * PROGRAMMERS: David Welch (welch@mcmail.com) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/ex/timer.c b/reactos/ntoskrnl/ex/timer.c index dd3a665c1bf..91fa92655ff 100644 --- a/reactos/ntoskrnl/ex/timer.c +++ b/reactos/ntoskrnl/ex/timer.c @@ -4,9 +4,8 @@ * PROJECT: ReactOS kernel * FILE: ntoskrnl/ex/timer.c * PURPOSE: User-mode timers - * PROGRAMMER: David Welch (welch@mcmail.com) - * UPDATE HISTORY: - * Created 22/05/98 + * + * PROGRAMMERS: David Welch (welch@mcmail.com) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/ex/util.c b/reactos/ntoskrnl/ex/util.c index 25c4bee59a4..08758e66ad6 100644 --- a/reactos/ntoskrnl/ex/util.c +++ b/reactos/ntoskrnl/ex/util.c @@ -1,26 +1,11 @@ -/* - * ReactOS kernel - * Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -/* +/* $Id:$ + * + * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/ex/misc.c * PURPOSE: Executive Utility Functions - * PORTABILITY: Checked + * + * PROGRAMMERS: No programmer listed. */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/ex/uuid.c b/reactos/ntoskrnl/ex/uuid.c index d049cc8e41e..8cdac4f657f 100644 --- a/reactos/ntoskrnl/ex/uuid.c +++ b/reactos/ntoskrnl/ex/uuid.c @@ -1,9 +1,11 @@ /* $Id$ * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * PURPOSE: UUID generator - * FILE: kernel/ex/uuid.c + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/ex/uuid.c + * PURPOSE: UUID generator + * + * PROGRAMMERS: No programmer listed. */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/ex/win32k.c b/reactos/ntoskrnl/ex/win32k.c index a1d06d75836..c93ce37f042 100644 --- a/reactos/ntoskrnl/ex/win32k.c +++ b/reactos/ntoskrnl/ex/win32k.c @@ -1,28 +1,11 @@ -/* - * ReactOS kernel - * Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -/* +/* $Id:$ + * + * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel - * FILE: kernel/ex/win32k.c + * FILE: ntoskrnl/ex/win32k.c * PURPOSE: Executive Win32 subsystem support - * PROGRAMMER: Casper S. Hornstrup (chorns@users.sourceforge.net) - * UPDATE HISTORY: - * 04-06-2001 CSH Created + * + * PROGRAMMERS: Casper S. Hornstrup (chorns@users.sourceforge.net) */ #include diff --git a/reactos/ntoskrnl/ex/work.c b/reactos/ntoskrnl/ex/work.c index 94fbba3c0ce..8d7bac152fa 100644 --- a/reactos/ntoskrnl/ex/work.c +++ b/reactos/ntoskrnl/ex/work.c @@ -2,11 +2,10 @@ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel - * FILE: mkernel/kernel/work.c + * FILE: ntoskrnl/ex/work.c * PURPOSE: Manage system work queues - * PROGRAMMER: David Welch (welch@mcmail.com) - * REVISION HISTORY: - * 29/06/98: Created + * + * PROGRAMMERS: David Welch (welch@mcmail.com) */ /* INCLUDES ******************************************************************/ diff --git a/reactos/ntoskrnl/ex/zone.c b/reactos/ntoskrnl/ex/zone.c index 3d17459a02d..c606d6afe75 100644 --- a/reactos/ntoskrnl/ex/zone.c +++ b/reactos/ntoskrnl/ex/zone.c @@ -1,10 +1,11 @@ /* $Id$ * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: ntoskrnl/mm/zone.c - * PURPOSE: Implements zone buffers - * PROGRAMMER: David Welch (welch@mcmail.com) + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/mm/zone.c + * PURPOSE: Implements zone buffers + * + * PROGRAMMERS: David Welch (welch@mcmail.com) */ /* INCLUDES ****************************************************************/ diff --git a/reactos/ntoskrnl/fs/dbcsname.c b/reactos/ntoskrnl/fs/dbcsname.c index 2256371f0f1..d1af7e2b3ec 100644 --- a/reactos/ntoskrnl/fs/dbcsname.c +++ b/reactos/ntoskrnl/fs/dbcsname.c @@ -1,7 +1,11 @@ /* $Id$ * - * reactos/ntoskrnl/fs/dbcsname.c + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/fs/dbcsname.c + * PURPOSE: No purpose listed. * + * PROGRAMMERS: No programmer listed. */ #include diff --git a/reactos/ntoskrnl/fs/filelock.c b/reactos/ntoskrnl/fs/filelock.c index 61e1bcf0cd3..be9e2108fbf 100644 --- a/reactos/ntoskrnl/fs/filelock.c +++ b/reactos/ntoskrnl/fs/filelock.c @@ -1,7 +1,11 @@ /* $Id$ * - * reactos/ntoskrnl/fs/filelock.c + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/fs/filelock.c + * PURPOSE: No purpose listed. * + * PROGRAMMERS: No programmer listed. */ #include diff --git a/reactos/ntoskrnl/fs/mcb.c b/reactos/ntoskrnl/fs/mcb.c index 11eb8ad9b0c..430d747447f 100644 --- a/reactos/ntoskrnl/fs/mcb.c +++ b/reactos/ntoskrnl/fs/mcb.c @@ -1,7 +1,11 @@ /* $Id$ * - * reactos/ntoskrnl/fs/mcb.c + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/fs/mcb.c + * PURPOSE: No purpose listed. * + * PROGRAMMERS: No programmer listed. */ #include diff --git a/reactos/ntoskrnl/fs/mdl.c b/reactos/ntoskrnl/fs/mdl.c index 6bbcc631ac0..1cedcba0f8a 100644 --- a/reactos/ntoskrnl/fs/mdl.c +++ b/reactos/ntoskrnl/fs/mdl.c @@ -1,7 +1,11 @@ /* $Id$ * - * reactos/ntoskrnl/fs/mdl.c + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/fs/mdl.c + * PURPOSE: No purpose listed. * + * PROGRAMMERS: No programmer listed. */ #include diff --git a/reactos/ntoskrnl/fs/name.c b/reactos/ntoskrnl/fs/name.c index 80dee2c0b19..e6dd25779b8 100644 --- a/reactos/ntoskrnl/fs/name.c +++ b/reactos/ntoskrnl/fs/name.c @@ -1,7 +1,11 @@ /* $Id$ * - * reactos/ntoskrnl/fs/name.c + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/fs/name.c + * PURPOSE: No purpose listed. * + * PROGRAMMERS: No programmer listed. */ #include diff --git a/reactos/ntoskrnl/fs/notify.c b/reactos/ntoskrnl/fs/notify.c index 7049c561a57..401dce9252d 100644 --- a/reactos/ntoskrnl/fs/notify.c +++ b/reactos/ntoskrnl/fs/notify.c @@ -1,7 +1,11 @@ /* $Id$ * - * reactos/ntoskrnl/fs/notify.c + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/fs/notify.c + * PURPOSE: No purpose listed. * + * PROGRAMMERS: No programmer listed. */ #include diff --git a/reactos/ntoskrnl/fs/oplock.c b/reactos/ntoskrnl/fs/oplock.c index 4f7f810c69f..c43e144f0d3 100644 --- a/reactos/ntoskrnl/fs/oplock.c +++ b/reactos/ntoskrnl/fs/oplock.c @@ -1,9 +1,13 @@ /* $Id$ * - * reactos/ntoskrnl/fs/oplock.c + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/fs/oplock.c + * PURPOSE: No purpose listed. * + * PROGRAMMERS: No programmer listed. */ - + #include diff --git a/reactos/ntoskrnl/fs/pool.c b/reactos/ntoskrnl/fs/pool.c index 4cee65915a7..54513102a62 100644 --- a/reactos/ntoskrnl/fs/pool.c +++ b/reactos/ntoskrnl/fs/pool.c @@ -1,7 +1,11 @@ /* $Id$ * - * reactos/ntoskrnl/fs/pool.c + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/fs/pool.c + * PURPOSE: No purpose listed. * + * PROGRAMMERS: No programmer listed. */ #include diff --git a/reactos/ntoskrnl/fs/tunnel.c b/reactos/ntoskrnl/fs/tunnel.c index 980b608dea3..908acf5b2a6 100644 --- a/reactos/ntoskrnl/fs/tunnel.c +++ b/reactos/ntoskrnl/fs/tunnel.c @@ -1,7 +1,11 @@ /* $Id$ * - * reactos/ntoskrnl/fs/tunnel.c + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/fs/tunnel.c + * PURPOSE: No purpose listed. * + * PROGRAMMERS: No programmer listed. */ #include diff --git a/reactos/ntoskrnl/fs/unc.c b/reactos/ntoskrnl/fs/unc.c index 2dd07986f61..11da3c74e4d 100644 --- a/reactos/ntoskrnl/fs/unc.c +++ b/reactos/ntoskrnl/fs/unc.c @@ -1,7 +1,11 @@ /* $Id$ * - * reactos/ntoskrnl/fs/unc.c + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/fs/unc.c + * PURPOSE: No purpose listed. * + * PROGRAMMERS: No programmer listed. */ #include diff --git a/reactos/ntoskrnl/fs/util.c b/reactos/ntoskrnl/fs/util.c index 64e3dd13fca..d034f4bfa89 100644 --- a/reactos/ntoskrnl/fs/util.c +++ b/reactos/ntoskrnl/fs/util.c @@ -1,7 +1,11 @@ /* $Id$ * - * reactos/ntoskrnl/fs/util.c + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/fs/util.c + * PURPOSE: No purpose listed. * + * PROGRAMMERS: No programmer listed. */ #include diff --git a/reactos/ntoskrnl/inbv/inbv.c b/reactos/ntoskrnl/inbv/inbv.c index dbf9209a0b6..2e888968e68 100755 --- a/reactos/ntoskrnl/inbv/inbv.c +++ b/reactos/ntoskrnl/inbv/inbv.c @@ -4,9 +4,8 @@ * PROJECT: ReactOS kernel * FILE: ntoskrnl/inbv/inbv.c * PURPOSE: Boot video support - * PROGRAMMER: Casper S. Hornstrup (chorns@users.sourceforge.net) - * UPDATE HISTORY: - * 12-07-2003 CSH Created + * + * PROGRAMMERS: Casper S. Hornstrup (chorns@users.sourceforge.net) */ /* INCLUDES ******************************************************************/ diff --git a/reactos/ntoskrnl/io/adapter.c b/reactos/ntoskrnl/io/adapter.c index bfcf9279c1f..59907aaf947 100644 --- a/reactos/ntoskrnl/io/adapter.c +++ b/reactos/ntoskrnl/io/adapter.c @@ -4,9 +4,8 @@ * PROJECT: ReactOS kernel * FILE: ntoskrnl/io/adapter.c * PURPOSE: DMA handling - * PROGRAMMER: David Welch (welch@mcmail.com) - * UPDATE HISTORY: - * Created 22/05/98 + * + * PROGRAMMERS: David Welch (welch@mcmail.com) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/io/arcname.c b/reactos/ntoskrnl/io/arcname.c index 87ad99f19f1..95ac80a1c31 100644 --- a/reactos/ntoskrnl/io/arcname.c +++ b/reactos/ntoskrnl/io/arcname.c @@ -1,28 +1,11 @@ -/* - * ReactOS kernel - * Copyright (C) 2002 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ /* $Id$ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/io/arcname.c - * PURPOSE: creates ARC names for boot devices - * PROGRAMMER: Eric Kohl (ekohl@rz-online.de) + * PURPOSE: Creates ARC names for boot devices + * + * PROGRAMMERS: Eric Kohl (ekohl@rz-online.de) */ diff --git a/reactos/ntoskrnl/io/bootlog.c b/reactos/ntoskrnl/io/bootlog.c index 9753dad9ca6..52d8e4f1e16 100644 --- a/reactos/ntoskrnl/io/bootlog.c +++ b/reactos/ntoskrnl/io/bootlog.c @@ -1,10 +1,11 @@ /* $Id$ * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: ntoskrnl/io/bootlog.c - * PURPOSE: Boot log file support - * PROGRAMMER: Eric Kohl + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/io/bootlog.c + * PURPOSE: Boot log file support + * + * PROGRAMMERS: Eric Kohl */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/io/buildirp.c b/reactos/ntoskrnl/io/buildirp.c index c7848e4c870..99fdc41cbbe 100644 --- a/reactos/ntoskrnl/io/buildirp.c +++ b/reactos/ntoskrnl/io/buildirp.c @@ -4,10 +4,8 @@ * PROJECT: ReactOS kernel * FILE: ntoskrnl/io/buildirp.c * PURPOSE: Building various types of irp - * PROGRAMMER: David Welch (welch@mcmail.com) - * UPDATE HISTORY: - * Created 22/05/98 - * Fixed IO method handling 04/03/99 + * + * PROGRAMMERS: David Welch (welch@mcmail.com) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/io/cancel.c b/reactos/ntoskrnl/io/cancel.c index dbb1f0d5e30..f5c4312eeb9 100644 --- a/reactos/ntoskrnl/io/cancel.c +++ b/reactos/ntoskrnl/io/cancel.c @@ -1,29 +1,11 @@ -/* - * ReactOS kernel - * Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ /* $Id$ * + * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/io/cancel.c * PURPOSE: Cancel routine - * PROGRAMMER: David Welch (welch@mcmail.com) - * UPDATE HISTORY: - * Created 22/05/98 + * + * PROGRAMMERS: David Welch (welch@mcmail.com) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/io/cleanup.c b/reactos/ntoskrnl/io/cleanup.c index 19bb86ab11b..b543e5c463d 100644 --- a/reactos/ntoskrnl/io/cleanup.c +++ b/reactos/ntoskrnl/io/cleanup.c @@ -1,11 +1,11 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: ntoskrnl/io/cleanup.c - * PURPOSE: IRP cleanup - * PROGRAMMER: David Welch (welch@mcmail.com) - * UPDATE HISTORY: - * 30/05/98: Created +/* $Id:$ + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/io/cleanup.c + * PURPOSE: IRP cleanup + * + * PROGRAMMERS: David Welch (welch@mcmail.com) */ /* INCLUDES ****************************************************************/ diff --git a/reactos/ntoskrnl/io/cntrller.c b/reactos/ntoskrnl/io/cntrller.c index a9218db4f71..70a6dba75c8 100644 --- a/reactos/ntoskrnl/io/cntrller.c +++ b/reactos/ntoskrnl/io/cntrller.c @@ -4,9 +4,8 @@ * PROJECT: ReactOS kernel * FILE: ntoskrnl/io/cntrller.c * PURPOSE: Implements the controller object - * PROGRAMMER: David Welch (welch@mcmail.com) - * UPDATE HISTORY: - * Created 22/05/98 + * + * PROGRAMMERS: David Welch (welch@mcmail.com) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/io/create.c b/reactos/ntoskrnl/io/create.c index d0b92ccbe54..568db171cc4 100644 --- a/reactos/ntoskrnl/io/create.c +++ b/reactos/ntoskrnl/io/create.c @@ -4,9 +4,8 @@ * PROJECT: ReactOS kernel * FILE: ntoskrnl/io/create.c * PURPOSE: Handling file create/open apis - * PROGRAMMER: David Welch (welch@cwcom.net) - * UPDATE HISTORY: - * 24/05/98: Created + * + * PROGRAMMERS: David Welch (welch@cwcom.net) */ /* INCLUDES ***************************************************************/ diff --git a/reactos/ntoskrnl/io/device.c b/reactos/ntoskrnl/io/device.c index 44e6ec892ac..b045b1aebbc 100644 --- a/reactos/ntoskrnl/io/device.c +++ b/reactos/ntoskrnl/io/device.c @@ -1,12 +1,11 @@ /* $Id$ * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: ntoskrnl/io/device.c - * PURPOSE: Manage devices - * PROGRAMMER: David Welch (welch@cwcom.net) - * UPDATE HISTORY: - * 15/05/98: Created + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/io/device.c + * PURPOSE: Manage devices + * + * PROGRAMMERS: David Welch (welch@cwcom.net) */ /* INCLUDES *******************************************************************/ diff --git a/reactos/ntoskrnl/io/deviface.c b/reactos/ntoskrnl/io/deviface.c index 4d42858241a..4797b915be9 100644 --- a/reactos/ntoskrnl/io/deviface.c +++ b/reactos/ntoskrnl/io/deviface.c @@ -1,12 +1,12 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: ntoskrnl/io/pnpmgr/devintrf.c - * PURPOSE: Device interface functions - * PROGRAMMER: Filip Navara (xnavara@volny.cz) - * Matthew Brace (ismarc@austin.rr.com) - * UPDATE HISTORY: - * 22/09/2003 FiN Created +/* $Id:$ + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/io/deviface.c + * PURPOSE: Device interface functions + * + * PROGRAMMERS: Filip Navara (xnavara@volny.cz) + * Matthew Brace (ismarc@austin.rr.com) */ /* INCLUDES ******************************************************************/ diff --git a/reactos/ntoskrnl/io/dir.c b/reactos/ntoskrnl/io/dir.c index a9e65a8c184..90b91800927 100644 --- a/reactos/ntoskrnl/io/dir.c +++ b/reactos/ntoskrnl/io/dir.c @@ -4,9 +4,8 @@ * PROJECT: ReactOS kernel * FILE: ntoskrnl/io/dir.c * PURPOSE: Directory functions - * PROGRAMMER: David Welch (welch@mcmail.com) - * UPDATE HISTORY: - * Created 22/05/98 + * + * PROGRAMMERS: David Welch (welch@mcmail.com) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/io/driver.c b/reactos/ntoskrnl/io/driver.c index 12c5543a81b..ea19a8c2c02 100644 --- a/reactos/ntoskrnl/io/driver.c +++ b/reactos/ntoskrnl/io/driver.c @@ -1,13 +1,12 @@ /* $Id$ * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: ntoskrnl/io/driver.c - * PURPOSE: Loading and unloading of drivers - * PROGRAMMER: David Welch (welch@cwcom.net) - * Filip Navara (xnavara@volny.cz) - * UPDATE HISTORY: - * 15/05/98: Created + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/io/driver.c + * PURPOSE: Loading and unloading of drivers + * + * PROGRAMMERS: David Welch (welch@cwcom.net) + * Filip Navara (xnavara@volny.cz) */ /* INCLUDES *******************************************************************/ diff --git a/reactos/ntoskrnl/io/efi.c b/reactos/ntoskrnl/io/efi.c index dfdbc1bfd5a..f93fea0d784 100644 --- a/reactos/ntoskrnl/io/efi.c +++ b/reactos/ntoskrnl/io/efi.c @@ -1,11 +1,11 @@ -/* +/* $Id:$ + * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/io/efi.c * PURPOSE: EFI Unimplemented Function Calls - * PROGRAMMER: Alex Ionescu (alex@relsoft.net) - * UPDATE HISTORY: - * Created 16/07/04 + * + * PROGRAMMERS: Alex Ionescu (alex@relsoft.net) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/io/errlog.c b/reactos/ntoskrnl/io/errlog.c index a31986c93b9..3780068c619 100644 --- a/reactos/ntoskrnl/io/errlog.c +++ b/reactos/ntoskrnl/io/errlog.c @@ -4,9 +4,8 @@ * PROJECT: ReactOS kernel * FILE: ntoskrnl/io/errlog.c * PURPOSE: Error logging - * PROGRAMMER: David Welch (welch@cwcom.net) - * UPDATE HISTORY: - * Created 22/05/98 + * + * PROGRAMMERS: David Welch (welch@cwcom.net) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/io/error.c b/reactos/ntoskrnl/io/error.c index 98e85f48027..5b85dd926ff 100644 --- a/reactos/ntoskrnl/io/error.c +++ b/reactos/ntoskrnl/io/error.c @@ -1,29 +1,11 @@ -/* - * ReactOS kernel - * Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ /* $Id$ * + * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/io/error.c * PURPOSE: Handle media errors - * PROGRAMMER: David Welch (welch@mcmail.com) - * UPDATE HISTORY: - * Created 22/05/98 + * + * PROGRAMMERS: David Welch (welch@mcmail.com) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/io/event.c b/reactos/ntoskrnl/io/event.c index b41be412e94..785df0330b1 100644 --- a/reactos/ntoskrnl/io/event.c +++ b/reactos/ntoskrnl/io/event.c @@ -4,9 +4,8 @@ * PROJECT: ReactOS kernel * FILE: ntoskrnl/io/event.c * PURPOSE: Implements named events - * PROGRAMMER: David Welch (welch@mcmail.com) - * UPDATE HISTORY: - * Created 22/05/98 + * + * PROGRAMMERS: David Welch (welch@mcmail.com) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/io/file.c b/reactos/ntoskrnl/io/file.c index 83cfbf25359..21d4a116962 100644 --- a/reactos/ntoskrnl/io/file.c +++ b/reactos/ntoskrnl/io/file.c @@ -4,9 +4,8 @@ * PROJECT: ReactOS kernel * FILE: ntoskrnl/io/file.c * PURPOSE: Graceful system shutdown if a bug is detected - * PROGRAMMER: David Welch (welch@mcmail.com) - * UPDATE HISTORY: - * Created 22/05/98 + * + * PROGRAMMERS: David Welch (welch@mcmail.com) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/io/flush.c b/reactos/ntoskrnl/io/flush.c index 7443dfa5eee..4af8c76222a 100644 --- a/reactos/ntoskrnl/io/flush.c +++ b/reactos/ntoskrnl/io/flush.c @@ -1,11 +1,11 @@ -/* +/* $Id:$ + * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/io/flush.c * PURPOSE: Flushing file buffer - * PROGRAMMER: David Welch (welch@cwcom.net) - * UPDATE HISTORY: - * Created 22/05/98 + * + * PROGRAMMERS: David Welch (welch@cwcom.net) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/io/fs.c b/reactos/ntoskrnl/io/fs.c index 686ba951f54..273b58c6868 100644 --- a/reactos/ntoskrnl/io/fs.c +++ b/reactos/ntoskrnl/io/fs.c @@ -1,11 +1,11 @@ -/* +/* $Id:$ + * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/io/fs.c * PURPOSE: Filesystem functions - * PROGRAMMER: David Welch (welch@mcmail.com) - * UPDATE HISTORY: - * Created 22/05/98 + * + * PROGRAMMERS: David Welch (welch@mcmail.com) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/io/iocomp.c b/reactos/ntoskrnl/io/iocomp.c index 17b5d604065..5e18411ded3 100644 --- a/reactos/ntoskrnl/io/iocomp.c +++ b/reactos/ntoskrnl/io/iocomp.c @@ -1,12 +1,11 @@ -/* +/* $Id:$ + * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel - * FILE: ntoskrnl/ke/iocomp.c - * PURPOSE: - * PROGRAMMER: David Welch (welch@mcmail.com) - * UPDATE HISTORY: - * Created 22/05/98 - Changed NtQueryIoCompletion + * FILE: ntoskrnl/io/iocomp.c + * PURPOSE: No purpose listed. + * + * PROGRAMMERS: David Welch (welch@mcmail.com) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/io/ioctrl.c b/reactos/ntoskrnl/io/ioctrl.c index b9a038c38f6..f404ae16296 100644 --- a/reactos/ntoskrnl/io/ioctrl.c +++ b/reactos/ntoskrnl/io/ioctrl.c @@ -4,13 +4,9 @@ * PROJECT: ReactOS kernel * FILE: ntoskrnl/io/ioctrl.c * PURPOSE: Device IO control - * PROGRAMMER: David Welch (welch@mcmail.com) + * + * PROGRAMMERS: David Welch (welch@mcmail.com) * Eric Kohl (ekohl@rz-online.de) - * UPDATE HISTORY: - * Created 22/05/98 - * Filled in ZwDeviceIoControlFile 22/02/99 - * Fixed IO method handling 08/03/99 - * Added APC support 05/11/99 */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/io/iomgr.c b/reactos/ntoskrnl/io/iomgr.c index 46cf6b633a5..a85a2bb2d05 100644 --- a/reactos/ntoskrnl/io/iomgr.c +++ b/reactos/ntoskrnl/io/iomgr.c @@ -1,12 +1,11 @@ /* $Id$ * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: ntoskrnl/io/iomgr.c - * PURPOSE: Initializes the io manager - * PROGRAMMER: David Welch (welch@mcmail.com) - * REVISION HISTORY: - * 29/07/98: Created + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/io/iomgr.c + * PURPOSE: Initializes the io manager + * + * PROGRAMMERS: David Welch (welch@mcmail.com) */ /* INCLUDES ****************************************************************/ diff --git a/reactos/ntoskrnl/io/iowork.c b/reactos/ntoskrnl/io/iowork.c index a7bb0392938..62ce6683eda 100644 --- a/reactos/ntoskrnl/io/iowork.c +++ b/reactos/ntoskrnl/io/iowork.c @@ -1,13 +1,12 @@ /* $Id$ * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: reactos/ntoskrnl/io/iowork.c - * PURPOSE: Manage IO system work queues - * PROGRAMMER: David Welch (welch@mcmail.com) - * Robert Dickenson (odin@pnc.com.au) - * REVISION HISTORY: - * 28/09/2002: (RDD) Created from copy of ex/work.c + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/io/iowork.c + * PURPOSE: Manage IO system work queues + * + * PROGRAMMERS: David Welch (welch@mcmail.com) + * Robert Dickenson (odin@pnc.com.au) */ /* INCLUDES ******************************************************************/ diff --git a/reactos/ntoskrnl/io/irp.c b/reactos/ntoskrnl/io/irp.c index e846a2ef79a..d898dc4f1c8 100644 --- a/reactos/ntoskrnl/io/irp.c +++ b/reactos/ntoskrnl/io/irp.c @@ -4,9 +4,8 @@ * PROJECT: ReactOS kernel * FILE: ntoskrnl/io/irp.c * PURPOSE: Handle IRPs - * PROGRAMMER: David Welch (welch@mcmail.com) - * UPDATE HISTORY: - * 24/05/98: Created + * + * PROGRAMMERS: David Welch (welch@mcmail.com) */ /* NOTES ******************************************************************* diff --git a/reactos/ntoskrnl/io/irq.c b/reactos/ntoskrnl/io/irq.c index 66dee26c58b..61a57ad8d9c 100644 --- a/reactos/ntoskrnl/io/irq.c +++ b/reactos/ntoskrnl/io/irq.c @@ -1,9 +1,11 @@ -/* +/* $Id:$ + * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/io/irq.c * PURPOSE: IRQ handling - * PROGRAMMER: David Welch (welch@mcmail.com) + * + * PROGRAMMERS: David Welch (welch@mcmail.com) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/io/lock.c b/reactos/ntoskrnl/io/lock.c index 5a181ae4978..a09582bd500 100644 --- a/reactos/ntoskrnl/io/lock.c +++ b/reactos/ntoskrnl/io/lock.c @@ -1,11 +1,11 @@ -/* +/* $Id:$ + * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel - * FILE: ntoskrnl/ke/bug.c - * PURPOSE: Graceful system shutdown if a bug is detected - * PROGRAMMER: David Welch (welch@mcmail.com) - * UPDATE HISTORY: - * Created 22/05/98 + * FILE: ntoskrnl/io/lock.c + * PURPOSE: No purpose listed. + * + * PROGRAMMERS: David Welch (welch@mcmail.com) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/io/mailslot.c b/reactos/ntoskrnl/io/mailslot.c index aa328408515..256c6a838e1 100644 --- a/reactos/ntoskrnl/io/mailslot.c +++ b/reactos/ntoskrnl/io/mailslot.c @@ -1,12 +1,11 @@ -/* +/* $Id:$ + * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel - * FILE: ntoskrnl/ke/bug.c - * PURPOSE: Graceful system shutdown if a bug is detected - * PROGRAMMER: David Welch (welch@mcmail.com) - * UPDATE HISTORY: - * Created 22/05/98 - Changed NtCreateMailslotFile + * FILE: ntoskrnl/io/mailslot.c + * PURPOSE: No purpose listed. + * + * PROGRAMMERS: David Welch (welch@mcmail.com) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/io/mdl.c b/reactos/ntoskrnl/io/mdl.c index 85d470f1b67..da6a4dbc7e0 100644 --- a/reactos/ntoskrnl/io/mdl.c +++ b/reactos/ntoskrnl/io/mdl.c @@ -4,9 +4,8 @@ * PROJECT: ReactOS kernel * FILE: ntoskrnl/io/mdl.c * PURPOSE: Io manager mdl functions - * PROGRAMMER: David Welch (welch@mcmail.com) - * UPDATE HISTORY: - * Created 22/05/98 + * + * PROGRAMMERS: David Welch (welch@mcmail.com) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/io/npipe.c b/reactos/ntoskrnl/io/npipe.c index fe1e1879b90..d64a71c6d26 100644 --- a/reactos/ntoskrnl/io/npipe.c +++ b/reactos/ntoskrnl/io/npipe.c @@ -1,11 +1,11 @@ -/* +/* $Id:$ + * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/io/npipe.c * PURPOSE: Named pipe helper function - * PROGRAMMER: David Welch (welch@mcmail.com) - * UPDATE HISTORY: - * Created 22/05/98 + * + * PROGRAMMERS: David Welch (welch@mcmail.com) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/io/page.c b/reactos/ntoskrnl/io/page.c index fa6178df73d..49734f0f4fc 100644 --- a/reactos/ntoskrnl/io/page.c +++ b/reactos/ntoskrnl/io/page.c @@ -3,10 +3,9 @@ * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/io/page.c - * PURPOSE: - * PROGRAMMER: - * UPDATE HISTORY: - * + * PURPOSE: No purpose listed. + * + * PROGRAMMERS: No programmer listed. */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/io/parttab.c b/reactos/ntoskrnl/io/parttab.c index bff11177ac1..3bab16d9c7a 100644 --- a/reactos/ntoskrnl/io/parttab.c +++ b/reactos/ntoskrnl/io/parttab.c @@ -4,11 +4,8 @@ * PROJECT: ReactOS kernel * FILE: ntoskrnl/io/parttab.c * PURPOSE: Handling fixed disks (partition table functions) - * PROGRAMMER: David Welch (welch@mcmail.com) - * UPDATE HISTORY: - * Created 22/05/98 - * 2000-03-25 (ea) - * Moved here from ntoskrnl/io/fdisk.c + * + * PROGRAMMERS: David Welch (welch@mcmail.com) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/io/plugplay.c b/reactos/ntoskrnl/io/plugplay.c index e37c3b66810..56e094aae9a 100644 --- a/reactos/ntoskrnl/io/plugplay.c +++ b/reactos/ntoskrnl/io/plugplay.c @@ -1,11 +1,11 @@ -/* +/* $Id:$ + * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/io/plugplay.c * PURPOSE: Mysterious nt4 support for plug-and-play - * PROGRAMMER: David Welch (welch@mcmail.com) - * UPDATE HISTORY: - * Created 22/05/98 + * + * PROGRAMMERS: David Welch (welch@mcmail.com) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/io/pnpdma.c b/reactos/ntoskrnl/io/pnpdma.c index 854b7fbf328..60398aa1aa9 100644 --- a/reactos/ntoskrnl/io/pnpdma.c +++ b/reactos/ntoskrnl/io/pnpdma.c @@ -1,12 +1,11 @@ /* $Id$ * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: ntoskrnl/io/pnpmgr.c - * PURPOSE: PnP manager DMA routines - * PROGRAMMER: Filip Navara (xnavara@volny.cz) - * UPDATE HISTORY: - * 22/09/2003 FiN Created + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/io/pnpdma.c + * PURPOSE: PnP manager DMA routines + * + * PROGRAMMERS: Filip Navara (xnavara@volny.cz) */ /* INCLUDES ******************************************************************/ diff --git a/reactos/ntoskrnl/io/pnpmgr.c b/reactos/ntoskrnl/io/pnpmgr.c index 105421866ba..b5c03ad2b81 100644 --- a/reactos/ntoskrnl/io/pnpmgr.c +++ b/reactos/ntoskrnl/io/pnpmgr.c @@ -1,12 +1,11 @@ /* $Id$ * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: ntoskrnl/io/pnpmgr/pnpmgr.c - * PURPOSE: Initializes the PnP manager - * PROGRAMMER: Casper S. Hornstrup (chorns@users.sourceforge.net) - * UPDATE HISTORY: - * 16/04/2001 CSH Created + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/io/pnpmgr.c + * PURPOSE: Initializes the PnP manager + * + * PROGRAMMERS: Casper S. Hornstrup (chorns@users.sourceforge.net) */ /* INCLUDES ******************************************************************/ diff --git a/reactos/ntoskrnl/io/pnpnotify.c b/reactos/ntoskrnl/io/pnpnotify.c index 501f6159951..73b6cd28bfe 100644 --- a/reactos/ntoskrnl/io/pnpnotify.c +++ b/reactos/ntoskrnl/io/pnpnotify.c @@ -1,11 +1,11 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: ntoskrnl/io/pnpmgr/remlock.c - * PURPOSE: Plug & Play notification functions - * PROGRAMMER: Filip Navara (xnavara@volny.cz) - * UPDATE HISTORY: - * 22/09/2003 FiN Created +/* $Id:$ + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/io/pnpnotify.c + * PURPOSE: Plug & Play notification functions + * + * PROGRAMMERS: Filip Navara (xnavara@volny.cz) */ /* INCLUDES ******************************************************************/ diff --git a/reactos/ntoskrnl/io/pnpreport.c b/reactos/ntoskrnl/io/pnpreport.c index e8626e70bbd..ff487f4efb0 100644 --- a/reactos/ntoskrnl/io/pnpreport.c +++ b/reactos/ntoskrnl/io/pnpreport.c @@ -1,11 +1,11 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: ntoskrnl/io/pnpmgr/report.c - * PURPOSE: Device Changes Reporting functions - * PROGRAMMER: Filip Navara (xnavara@volny.cz) - * UPDATE HISTORY: - * 22/09/2003 FiN Created +/* $Id:$ + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/io/pnpreport.c + * PURPOSE: Device Changes Reporting functions + * + * PROGRAMMERS: Filip Navara (xnavara@volny.cz) */ /* INCLUDES ******************************************************************/ diff --git a/reactos/ntoskrnl/io/pnproot.c b/reactos/ntoskrnl/io/pnproot.c index cc9fd6d402e..a2c7223cb61 100644 --- a/reactos/ntoskrnl/io/pnproot.c +++ b/reactos/ntoskrnl/io/pnproot.c @@ -1,12 +1,11 @@ /* $Id$ * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: ntoskrnl/io/pnpmgr/pnproot.c - * PURPOSE: PnP manager root device - * PROGRAMMER: Casper S. Hornstrup (chorns@users.sourceforge.net) - * UPDATE HISTORY: - * 16/04/2001 CSH Created + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/io/pnproot.c + * PURPOSE: PnP manager root device + * + * PROGRAMMERS: Casper S. Hornstrup (chorns@users.sourceforge.net) */ /* INCLUDES ******************************************************************/ diff --git a/reactos/ntoskrnl/io/process.c b/reactos/ntoskrnl/io/process.c index 51537867e3b..4d04d24fa0f 100644 --- a/reactos/ntoskrnl/io/process.c +++ b/reactos/ntoskrnl/io/process.c @@ -1,30 +1,11 @@ -/* - * ReactOS kernel - * Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ /* $Id$ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/io/process.c * PURPOSE: Process functions that, bizarrely, are in the iomgr - * PROGRAMMER: David Welch (welch@mcmail.com) - * UPDATE HISTORY: - * Created 22/05/98 + * + * PROGRAMMERS: David Welch (welch@mcmail.com) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/io/queue.c b/reactos/ntoskrnl/io/queue.c index f4d55cf30dc..543f433e4bb 100644 --- a/reactos/ntoskrnl/io/queue.c +++ b/reactos/ntoskrnl/io/queue.c @@ -1,10 +1,11 @@ /* $Id$ * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: ntoskrnl/io/queue.c - * PURPOSE: Implement device queueing - * PROGRAMMER: David Welch (welch@mcmail.com) + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/io/queue.c + * PURPOSE: Implement device queueing + * + * PROGRAMMERS: David Welch (welch@mcmail.com) */ /* INCLUDES ******************************************************************/ diff --git a/reactos/ntoskrnl/io/rawfs.c b/reactos/ntoskrnl/io/rawfs.c index ca9d7eb6175..c4198e48135 100755 --- a/reactos/ntoskrnl/io/rawfs.c +++ b/reactos/ntoskrnl/io/rawfs.c @@ -4,9 +4,8 @@ * PROJECT: ReactOS kernel * FILE: ntoskrnl/io/rawfs.c * PURPOSE: Raw filesystem driver - * PROGRAMMER: Casper S. Hornstrup (chorns@users.sourceforge.net) - * UPDATE HISTORY: - * Created 13/04/2003 + * + * PROGRAMMERS: Casper S. Hornstrup (chorns@users.sourceforge.net) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/io/remlock.c b/reactos/ntoskrnl/io/remlock.c index d58c096ef13..539807d2a61 100644 --- a/reactos/ntoskrnl/io/remlock.c +++ b/reactos/ntoskrnl/io/remlock.c @@ -1,11 +1,11 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: ntoskrnl/io/pnpmgr/remlock.c - * PURPOSE: Remove Lock functions - * PROGRAMMER: Filip Navara (xnavara@volny.cz) - * UPDATE HISTORY: - * 22/09/2003 FiN Created +/* $Id:$ + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/io/remlock.c + * PURPOSE: Remove Lock functions + * + * PROGRAMMERS: Filip Navara (xnavara@volny.cz) */ /* INCLUDES ******************************************************************/ diff --git a/reactos/ntoskrnl/io/resource.c b/reactos/ntoskrnl/io/resource.c index fd3fd78abd0..be9910ae0d7 100644 --- a/reactos/ntoskrnl/io/resource.c +++ b/reactos/ntoskrnl/io/resource.c @@ -1,30 +1,12 @@ -/* - * ReactOS kernel - * Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ /* $Id$ * + * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/io/resource.c * PURPOSE: Hardware resource managment - * PROGRAMMER: David Welch (welch@mcmail.com) + * + * PROGRAMMERS: David Welch (welch@mcmail.com) * Alex Ionescu (alex@relsoft.net) - * UPDATE HISTORY: - * Created 22/05/98 */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/io/rw.c b/reactos/ntoskrnl/io/rw.c index c0518b6d455..07af4e53701 100644 --- a/reactos/ntoskrnl/io/rw.c +++ b/reactos/ntoskrnl/io/rw.c @@ -1,12 +1,11 @@ /* $Id$ * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: ntoskrnl/io/rw.c - * PURPOSE: Implements read/write APIs - * PROGRAMMER: David Welch (welch@cwcom.net) - * UPDATE HISTORY: - * 30/05/98: Created + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/io/rw.c + * PURPOSE: Implements read/write APIs + * + * PROGRAMMERS: David Welch (welch@cwcom.net) */ /* INCLUDES ****************************************************************/ diff --git a/reactos/ntoskrnl/io/share.c b/reactos/ntoskrnl/io/share.c index 86c245e6b1a..735ae576d69 100644 --- a/reactos/ntoskrnl/io/share.c +++ b/reactos/ntoskrnl/io/share.c @@ -1,30 +1,11 @@ -/* - * ReactOS kernel - * Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ /* $Id$ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/io/share.c - * PURPOSE: - * PROGRAMMER: David Welch (welch@mcmail.com) - * UPDATE HISTORY: - * Created 22/05/98 + * PURPOSE: No purpose listed. + * + * PROGRAMMERS: David Welch (welch@mcmail.com) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/io/shutdown.c b/reactos/ntoskrnl/io/shutdown.c index 5fc0f62e46a..6602ceba835 100644 --- a/reactos/ntoskrnl/io/shutdown.c +++ b/reactos/ntoskrnl/io/shutdown.c @@ -4,9 +4,8 @@ * PROJECT: ReactOS kernel * FILE: ntoskrnl/io/shutdown.c * PURPOSE: Implements shutdown notification - * PROGRAMMER: David Welch (welch@mcmail.com) - * UPDATE HISTORY: - * Created 22/05/98 + * + * PROGRAMMERS: David Welch (welch@mcmail.com) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/io/symlink.c b/reactos/ntoskrnl/io/symlink.c index 842d901a2fc..d5c4616dc63 100644 --- a/reactos/ntoskrnl/io/symlink.c +++ b/reactos/ntoskrnl/io/symlink.c @@ -4,9 +4,8 @@ * PROJECT: ReactOS kernel * FILE: ntoskrnl/io/symlink.c * PURPOSE: Implements symbolic links - * PROGRAMMER: David Welch (welch@mcmail.com) - * UPDATE HISTORY: - * Created 22/05/98 + * + * PROGRAMMERS: David Welch (welch@mcmail.com) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/io/timer.c b/reactos/ntoskrnl/io/timer.c index 6fe893b4116..3045b9275e8 100644 --- a/reactos/ntoskrnl/io/timer.c +++ b/reactos/ntoskrnl/io/timer.c @@ -1,12 +1,12 @@ -/* +/* $Id:$ + * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/io/timer.c - * PURPOSE: io timers - * PROGRAMMER: David Welch (welch@mcmail.com) - * UPDATE HISTORY: - * Created 22/05/98 - * Reimplemented 05/11/04 - Alex Ionescu (alex@relsoft.net) + * PURPOSE: IO timers + * + * PROGRAMMERS: David Welch (welch@mcmail.com) + * Alex Ionescu (alex@relsoft.net) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/io/vpb.c b/reactos/ntoskrnl/io/vpb.c index 963f9b7aec5..df168e91393 100644 --- a/reactos/ntoskrnl/io/vpb.c +++ b/reactos/ntoskrnl/io/vpb.c @@ -4,9 +4,8 @@ * PROJECT: ReactOS kernel * FILE: ntoskrnl/io/vpb.c * PURPOSE: Volume Parameter Block managment - * PROGRAMMER: David Welch (welch@mcmail.com) - * UPDATE HISTORY: - * Created 22/05/98 + * + * PROGRAMMERS: David Welch (welch@mcmail.com) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/io/wdm.c b/reactos/ntoskrnl/io/wdm.c index 4185d46bd72..b81f9efa0ce 100644 --- a/reactos/ntoskrnl/io/wdm.c +++ b/reactos/ntoskrnl/io/wdm.c @@ -1,9 +1,11 @@ -/* +/* $Id:$ + * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/io/wdm.c * PURPOSE: Various Windows Driver Model routines - * PROGRAMMER: Filip Navara (xnavara@volny.cz) + * + * PROGRAMMERS: Filip Navara (xnavara@volny.cz) */ #include diff --git a/reactos/ntoskrnl/io/wmi.c b/reactos/ntoskrnl/io/wmi.c index 5d16ba961ed..8b9088270f5 100644 --- a/reactos/ntoskrnl/io/wmi.c +++ b/reactos/ntoskrnl/io/wmi.c @@ -4,9 +4,8 @@ * PROJECT: ReactOS kernel * FILE: ntoskrnl/io/wmi.c * PURPOSE: Windows Management Instrumentation - * PROGRAMMER: Alex Ionescu (alex@relsoft.net) - * UPDATE HISTORY: - * Created 23/06/04 + * + * PROGRAMMERS: Alex Ionescu (alex@relsoft.net) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/io/xhaldisp.c b/reactos/ntoskrnl/io/xhaldisp.c index 5a8ef861d31..4c4cea3d5ab 100644 --- a/reactos/ntoskrnl/io/xhaldisp.c +++ b/reactos/ntoskrnl/io/xhaldisp.c @@ -4,9 +4,8 @@ * PROJECT: ReactOS kernel * FILE: ntoskrnl/io/xhaldisp.c * PURPOSE: Hal dispatch tables - * PROGRAMMER: Eric Kohl (ekohl@rz-online.de) - * UPDATE HISTORY: - * Created 19/06/2000 + * + * PROGRAMMERS: Eric Kohl (ekohl@rz-online.de) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/io/xhaldrv.c b/reactos/ntoskrnl/io/xhaldrv.c index 0dbea45e093..178eab40eee 100644 --- a/reactos/ntoskrnl/io/xhaldrv.c +++ b/reactos/ntoskrnl/io/xhaldrv.c @@ -4,10 +4,9 @@ * PROJECT: ReactOS kernel * FILE: ntoskrnl/io/xhaldrv.c * PURPOSE: Hal drive routines - * PROGRAMMER: Eric Kohl (ekohl@rz-online.de) + * + * PROGRAMMERS: Eric Kohl (ekohl@rz-online.de) * Casper S. Hornstrup (chorns@users.sourceforge.net) - * UPDATE HISTORY: - * Created 19/06/2000 */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/kd/dlog.c b/reactos/ntoskrnl/kd/dlog.c index 3d0592f5a9d..2e86dcfee0e 100644 --- a/reactos/ntoskrnl/kd/dlog.c +++ b/reactos/ntoskrnl/kd/dlog.c @@ -4,9 +4,8 @@ * PROJECT: ReactOS kernel * FILE: ntoskrnl/kd/kdebug.c * PURPOSE: Kernel debugger - * PROGRAMMER: Eric Kohl (ekohl@abo.rhein-zeitung.de) - * UPDATE HISTORY: - * 21/10/99: Created + * + * PROGRAMMERS: Eric Kohl (ekohl@abo.rhein-zeitung.de) */ /* INCLUDES ******************************************************************/ diff --git a/reactos/ntoskrnl/kd/kdebug.c b/reactos/ntoskrnl/kd/kdebug.c index 4a05502ca91..b8e923dbfb4 100644 --- a/reactos/ntoskrnl/kd/kdebug.c +++ b/reactos/ntoskrnl/kd/kdebug.c @@ -1,11 +1,11 @@ -/* +/* $Id:$ + * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/kd/kdebug.c * PURPOSE: Kernel debugger - * PROGRAMMER: Eric Kohl (ekohl@abo.rhein-zeitung.de) - * UPDATE HISTORY: - * 21/10/99: Created + * + * PROGRAMMERS: Eric Kohl (ekohl@abo.rhein-zeitung.de) */ #include diff --git a/reactos/ntoskrnl/kd/mda.c b/reactos/ntoskrnl/kd/mda.c index b8cbd392c34..cd6887ac3c3 100644 --- a/reactos/ntoskrnl/kd/mda.c +++ b/reactos/ntoskrnl/kd/mda.c @@ -1,27 +1,11 @@ -/* - * ReactOS kernel - * Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ /* $Id$ * + * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/kd/mda.c * PURPOSE: Support for debugging using an MDA card. - * PROGRAMMER: David Welch + * + * PROGRAMMERS: David Welch */ /* INCLUDES ******************************************************************/ diff --git a/reactos/ntoskrnl/kd/service.c b/reactos/ntoskrnl/kd/service.c index 4f7833ba446..f37f9206e56 100644 --- a/reactos/ntoskrnl/kd/service.c +++ b/reactos/ntoskrnl/kd/service.c @@ -4,9 +4,8 @@ * PROJECT: ReactOS kernel * FILE: ntoskrnl/kd/service.c * PURPOSE: Debug service dispatcher - * PROGRAMMER: Eric Kohl (ekohl@abo.rhein-zeitung.de) - * UPDATE HISTORY: - * 17/01/2000: Created + * + * PROGRAMMERS: Eric Kohl (ekohl@abo.rhein-zeitung.de) */ #include diff --git a/reactos/ntoskrnl/ke/alert.c b/reactos/ntoskrnl/ke/alert.c index f5f59850db0..6dcc12cec1e 100644 --- a/reactos/ntoskrnl/ke/alert.c +++ b/reactos/ntoskrnl/ke/alert.c @@ -1,166 +1,149 @@ -/* - * ReactOS kernel - * Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -/* - * PROJECT: ReactOS kernel - * FILE: ntoskrnl/ke/alert.c - * PURPOSE: Alerts - * PROGRAMMER: Alex Ionescu (alex@relsoft.net) - * PORTABILITY: Unchecked - * UPDATE HISTORY: - * Created 22/05/98 - */ - -/* INCLUDES *****************************************************************/ - -#include -#define NDEBUG -#include - -/* GLOBALS *******************************************************************/ - - -/* FUNCTIONS *****************************************************************/ - - -BOOLEAN -STDCALL -KeTestAlertThread(IN KPROCESSOR_MODE AlertMode) -/* - * FUNCTION: Tests whether there are any pending APCs for the current thread - * and if so the APCs will be delivered on exit from kernel mode - */ -{ - KIRQL OldIrql; - PKTHREAD Thread = KeGetCurrentThread(); - BOOLEAN OldState; - - ASSERT_IRQL_LESS_OR_EQUAL(DISPATCH_LEVEL); - - OldIrql = KeAcquireDispatcherDatabaseLock(); - KiAcquireSpinLock(&Thread->ApcQueueLock); - - /* NOTE: Albert Almeida claims Alerted[1] is never used. Two kind of - * alerts _do_ seem useless. -Gunnar - */ - OldState = Thread->Alerted[0]; - - /* If the Thread is Alerted, Clear it */ - if (OldState) { - Thread->Alerted[0] = FALSE; - } else if ((AlertMode == UserMode) && (!IsListEmpty(&Thread->ApcState.ApcListHead[UserMode]))) { - /* If the mode is User and the Queue isn't empty, set Pending */ - Thread->ApcState.UserApcPending = TRUE; - } - - KiReleaseSpinLock(&Thread->ApcQueueLock); - KeReleaseDispatcherDatabaseLock(OldIrql); - return OldState; -} - - -VOID -KeAlertThread(PKTHREAD Thread, KPROCESSOR_MODE AlertMode) -{ +/* $Id:$ + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/ke/alert.c + * PURPOSE: Alerts + * + * PROGRAMMERS: Alex Ionescu (alex@relsoft.net) + */ + +/* INCLUDES *****************************************************************/ + +#include +#define NDEBUG +#include + +/* GLOBALS *******************************************************************/ + + +/* FUNCTIONS *****************************************************************/ + + +BOOLEAN +STDCALL +KeTestAlertThread(IN KPROCESSOR_MODE AlertMode) +/* + * FUNCTION: Tests whether there are any pending APCs for the current thread + * and if so the APCs will be delivered on exit from kernel mode + */ +{ + KIRQL OldIrql; + PKTHREAD Thread = KeGetCurrentThread(); + BOOLEAN OldState; + + ASSERT_IRQL_LESS_OR_EQUAL(DISPATCH_LEVEL); + + OldIrql = KeAcquireDispatcherDatabaseLock(); + KiAcquireSpinLock(&Thread->ApcQueueLock); + + /* NOTE: Albert Almeida claims Alerted[1] is never used. Two kind of + * alerts _do_ seem useless. -Gunnar + */ + OldState = Thread->Alerted[0]; + + /* If the Thread is Alerted, Clear it */ + if (OldState) { + Thread->Alerted[0] = FALSE; + } else if ((AlertMode == UserMode) && (!IsListEmpty(&Thread->ApcState.ApcListHead[UserMode]))) { + /* If the mode is User and the Queue isn't empty, set Pending */ + Thread->ApcState.UserApcPending = TRUE; + } + + KiReleaseSpinLock(&Thread->ApcQueueLock); + KeReleaseDispatcherDatabaseLock(OldIrql); + return OldState; +} + + +VOID +KeAlertThread(PKTHREAD Thread, KPROCESSOR_MODE AlertMode) +{ KIRQL oldIrql; - - oldIrql = KeAcquireDispatcherDatabaseLock(); + + oldIrql = KeAcquireDispatcherDatabaseLock(); - /* Return if thread is already alerted. - * NOTE: Albert Almeida claims Alerted[1] is never used. Two kind of - * alerts _do_ seem useless. -Gunnar - */ - if (Thread->Alerted[0] == FALSE) - { - Thread->Alerted[0] = TRUE; - - if (Thread->State == THREAD_STATE_BLOCKED && - Thread->WaitMode == AlertMode && - Thread->Alertable) - { - KiAbortWaitThread(Thread, STATUS_ALERTED); - } - } - - KeReleaseDispatcherDatabaseLock(oldIrql); - -} - - -/* - * - * NOT EXPORTED - */ -NTSTATUS STDCALL -NtAlertResumeThread(IN HANDLE ThreadHandle, - OUT PULONG SuspendCount) -{ - UNIMPLEMENTED; - return(STATUS_NOT_IMPLEMENTED); - -} - -/* - * @implemented - * - * EXPORTED - */ -NTSTATUS STDCALL -NtAlertThread (IN HANDLE ThreadHandle) -{ - PETHREAD Thread; - NTSTATUS Status; - - Status = ObReferenceObjectByHandle(ThreadHandle, - THREAD_SUSPEND_RESUME, - PsThreadType, - ExGetPreviousMode(), - (PVOID*)&Thread, - NULL); - if (!NT_SUCCESS(Status)) - { - return(Status); - } - + /* Return if thread is already alerted. + * NOTE: Albert Almeida claims Alerted[1] is never used. Two kind of + * alerts _do_ seem useless. -Gunnar + */ + if (Thread->Alerted[0] == FALSE) + { + Thread->Alerted[0] = TRUE; + + if (Thread->State == THREAD_STATE_BLOCKED && + Thread->WaitMode == AlertMode && + Thread->Alertable) + { + KiAbortWaitThread(Thread, STATUS_ALERTED); + } + } + + KeReleaseDispatcherDatabaseLock(oldIrql); + +} + + +/* + * + * NOT EXPORTED + */ +NTSTATUS STDCALL +NtAlertResumeThread(IN HANDLE ThreadHandle, + OUT PULONG SuspendCount) +{ + UNIMPLEMENTED; + return(STATUS_NOT_IMPLEMENTED); + +} + +/* + * @implemented + * + * EXPORTED + */ +NTSTATUS STDCALL +NtAlertThread (IN HANDLE ThreadHandle) +{ + PETHREAD Thread; + NTSTATUS Status; + + Status = ObReferenceObjectByHandle(ThreadHandle, + THREAD_SUSPEND_RESUME, + PsThreadType, + ExGetPreviousMode(), + (PVOID*)&Thread, + NULL); + if (!NT_SUCCESS(Status)) + { + return(Status); + } + /* FIXME: should we always use UserMode here, even if the ntoskrnl exported - * ZwAlertThread was called? - * -Gunnar - */ - KeAlertThread((PKTHREAD)Thread, UserMode); - - ObDereferenceObject(Thread); - return(STATUS_SUCCESS); -} - - -/* - * NOT EXPORTED - */ -NTSTATUS -STDCALL -NtTestAlert(VOID) -{ - /* Check and Alert Thread if needed */ - if (KeTestAlertThread(KeGetPreviousMode())) { - return STATUS_ALERTED; - } else { - return STATUS_SUCCESS; - } -} + * ZwAlertThread was called? + * -Gunnar + */ + KeAlertThread((PKTHREAD)Thread, UserMode); + + ObDereferenceObject(Thread); + return(STATUS_SUCCESS); +} + + +/* + * NOT EXPORTED + */ +NTSTATUS +STDCALL +NtTestAlert(VOID) +{ + /* Check and Alert Thread if needed */ + if (KeTestAlertThread(KeGetPreviousMode())) { + return STATUS_ALERTED; + } else { + return STATUS_SUCCESS; + } +} + diff --git a/reactos/ntoskrnl/ke/apc.c b/reactos/ntoskrnl/ke/apc.c index 876eca15f6e..437de014465 100644 --- a/reactos/ntoskrnl/ke/apc.c +++ b/reactos/ntoskrnl/ke/apc.c @@ -1,31 +1,12 @@ -/* - * ReactOS kernel - * Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team +/* $Id:$ * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -/* + * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/ke/apc.c * PURPOSE: NT Implementation of APCs - * PROGRAMMER: Alex Ionescu (alex@relsoft.net) - * PORTABILITY: Unchecked - * UPDATE HISTORY: - * Created 22/05/98 - * 12/11/99: Phillip Susi: Reworked the APC code - * 11/11/04: Alex Ionescu - Total Rewrite + * + * PROGRAMMERS: Alex Ionescu (alex@relsoft.net) + * Phillip Susi */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/ke/bug.c b/reactos/ntoskrnl/ke/bug.c index 2e8df660bb8..2af3e26b721 100644 --- a/reactos/ntoskrnl/ke/bug.c +++ b/reactos/ntoskrnl/ke/bug.c @@ -1,31 +1,12 @@ -/* - * ReactOS kernel - * Copyright (C) 1998, 1999, 2000, 2001, 2002 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ /* $Id$ * + * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/ke/bug.c * PURPOSE: Graceful system shutdown if a bug is detected - * PROGRAMMER: David Welch (welch@cwcom.net) - * PORTABILITY: Unchecked - * UPDATE HISTORY: - * Created 22/05/98 - * Phillip Susi: 12/8/99: Minor fix + * + * PROGRAMMERS: David Welch (welch@cwcom.net) + * Phillip Susi */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/ke/catch.c b/reactos/ntoskrnl/ke/catch.c index cda37261c12..1d4ca92a486 100644 --- a/reactos/ntoskrnl/ke/catch.c +++ b/reactos/ntoskrnl/ke/catch.c @@ -1,28 +1,12 @@ -/* - * ReactOS kernel - * Copyright (C) 2000 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ /* $Id$ * - * PROJECT: ReactOS kernel - * FILE: ntoskrnl/ke/catch.c - * PURPOSE: Exception handling - * PROGRAMMER: David Welch (welch@mcmail.com) - * Casper S. Hornstrup (chorns@users.sourceforge.net) + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/ke/catch.c + * PURPOSE: Exception handling + * + * PROGRAMMERS: David Welch (welch@mcmail.com) + * Casper S. Hornstrup (chorns@users.sourceforge.net) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/ke/critical.c b/reactos/ntoskrnl/ke/critical.c index 09b39bd04e5..e2428549b45 100644 --- a/reactos/ntoskrnl/ke/critical.c +++ b/reactos/ntoskrnl/ke/critical.c @@ -4,9 +4,8 @@ * PROJECT: ReactOS kernel * FILE: ntoskrnl/ke/critical.c * PURPOSE: Implement critical regions - * PROGRAMMER: David Welch (welch@mcmail.com) - * UPDATE HISTORY: - * Created 22/05/98 + * + * PROGRAMMERS: David Welch (welch@mcmail.com) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/ke/device.c b/reactos/ntoskrnl/ke/device.c index 56473d18b32..ad1c8bd32dd 100644 --- a/reactos/ntoskrnl/ke/device.c +++ b/reactos/ntoskrnl/ke/device.c @@ -1,10 +1,11 @@ /* $Id$ * - * FILE: ntoskrnl/ke/profile.c + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/ke/device.c * PURPOSE: Kernel Device/Settings Functions - * PROGRAMMER: Alex Ionescu (alex@relsoft.net) - * UPDATE HISTORY: - * Created 23/06/04 + * + * PROGRAMMERS: Alex Ionescu (alex@relsoft.net) */ #include diff --git a/reactos/ntoskrnl/ke/dpc.c b/reactos/ntoskrnl/ke/dpc.c index 6e70fcc5919..2aee866c39d 100644 --- a/reactos/ntoskrnl/ke/dpc.c +++ b/reactos/ntoskrnl/ke/dpc.c @@ -1,35 +1,14 @@ -/* - * ReactOS kernel - * Copyright (C) 2000, 1999, 1998 David Welch , - * Philip Susi , - * Eric Kohl - * Alex Ionescu - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ /* $Id$ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/ke/dpc.c * PURPOSE: Handle DPCs (Delayed Procedure Calls) - * PROGRAMMER: David Welch (welch@mcmail.com) - * UPDATE HISTORY: - * 28/05/98: Created - * 12/3/99: Phillip Susi: Fixed IRQL problem - * 12/11/04: Alex Ionescu - Major rewrite. + * + * PROGRAMMERS: David Welch (welch@mcmail.com) + * Philip Susi (phreak@iag.net) + * Eric Kohl (ekohl@abo.rhein-zeitung.de) + * Alex Ionescu (alex@relsoft.net) */ /* diff --git a/reactos/ntoskrnl/ke/error.c b/reactos/ntoskrnl/ke/error.c index e6759423edc..a86185086ee 100644 --- a/reactos/ntoskrnl/ke/error.c +++ b/reactos/ntoskrnl/ke/error.c @@ -1,12 +1,11 @@ -/* $Id $ +/* $Id:$ * - * COPYRIGHT: See COPYING in the top directory - * PROJECT: ReactOS kernel v0.0.2 - * FILE: ntoskrnl/ke/error.c - * PURPOSE: Error reason setting/getting - * PROGRAMMER: David Welch - * UPDATE HISTORY: - * 16/4/98: Created + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/ke/error.c + * PURPOSE: Error reason setting/getting + * + * PROGRAMMERS: David Welch */ /* INCLUDE *****************************************************************/ diff --git a/reactos/ntoskrnl/ke/event.c b/reactos/ntoskrnl/ke/event.c index dcb8f737f23..75dde7be159 100644 --- a/reactos/ntoskrnl/ke/event.c +++ b/reactos/ntoskrnl/ke/event.c @@ -1,11 +1,11 @@ -/* +/* $Id:$ + * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/ke/event.c * PURPOSE: Implements events - * PROGRAMMER: David Welch (welch@mcmail.com) - * UPDATE HISTORY: - * Created 22/05/98 + * + * PROGRAMMERS: David Welch (welch@mcmail.com) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/ke/gmutex.c b/reactos/ntoskrnl/ke/gmutex.c index 0c1db8c1cbf..35d1d436276 100644 --- a/reactos/ntoskrnl/ke/gmutex.c +++ b/reactos/ntoskrnl/ke/gmutex.c @@ -1,29 +1,11 @@ -/* - * ReactOS kernel - * Copyright (C) 2004 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ /* $Id$ * + * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/ke/gmutex.c * PURPOSE: Implements guarded mutex (w2k3+/64) - * PROGRAMMER: - * UPDATE HISTORY: - * Created 2004-10-31 based on Steve Dispensa's blog + * + * PROGRAMMERS: No programmer listed. */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/ke/i386/bios.c b/reactos/ntoskrnl/ke/i386/bios.c index e89f7df8e92..1daa1082366 100644 --- a/reactos/ntoskrnl/ke/i386/bios.c +++ b/reactos/ntoskrnl/ke/i386/bios.c @@ -1,26 +1,11 @@ -/* - * ReactOS kernel - * Copyright (C) 2000 ReactOS Team +/* $Id:$ * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -/* + * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/ke/i386/bios.c * PURPOSE: Support for calling the BIOS in v86 mode - * PROGRAMMER: David Welch (welch@cwcom.net) + * + * PROGRAMMERS: David Welch (welch@cwcom.net) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/ke/i386/brkpoint.c b/reactos/ntoskrnl/ke/i386/brkpoint.c index f81480e88bf..b1e304b6409 100644 --- a/reactos/ntoskrnl/ke/i386/brkpoint.c +++ b/reactos/ntoskrnl/ke/i386/brkpoint.c @@ -1,26 +1,11 @@ -/* - * ReactOS kernel - * Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -/* +/* $Id:$ + * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel - * FILE: ntoskrnl/dbg/brkpoints.c + * FILE: ntoskrnl/ke/i386/brkpoint.c * PURPOSE: Handles breakpoints + * + * PROGRAMMERS: No programmer listed. */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/ke/i386/exp.c b/reactos/ntoskrnl/ke/i386/exp.c index 70c2f31fb6d..6341abef049 100644 --- a/reactos/ntoskrnl/ke/i386/exp.c +++ b/reactos/ntoskrnl/ke/i386/exp.c @@ -1,30 +1,12 @@ -/* - * ReactOS kernel - * Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -/* - * PROJECT: ReactOS kernel - * FILE: ntoskrnl/ke/i386/exp.c - * PURPOSE: Handling exceptions - * PROGRAMMERS: David Welch (welch@cwcom.net) - * Skywing (skywing@valhallalegends.com) - * REVISION HISTORY: - * ??/??/??: Created - * 09/12/03: KeRaiseUserException added (Skywing). +/* $Id:$ + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/ke/i386/exp.c + * PURPOSE: Handling exceptions + * + * PROGRAMMERS: David Welch (welch@cwcom.net) + * Skywing (skywing@valhallalegends.com) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/ke/i386/fpu.c b/reactos/ntoskrnl/ke/i386/fpu.c index b57ffce01fb..fd5d5dcee17 100644 --- a/reactos/ntoskrnl/ke/i386/fpu.c +++ b/reactos/ntoskrnl/ke/i386/fpu.c @@ -1,29 +1,11 @@ -/* $Id$ +/* $Id:$ * - * ReactOS kernel - * Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -/* + * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/ke/i386/fpu.c * PURPOSE: Handles the FPU - * PROGRAMMER: David Welch (welch@mcmail.com) - * UPDATE HISTORY: - * Created 22/05/98 + * + * PROGRAMMERS: David Welch (welch@mcmail.com) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/ke/i386/gdt.c b/reactos/ntoskrnl/ke/i386/gdt.c index 565f6dbf359..090ebbbe520 100644 --- a/reactos/ntoskrnl/ke/i386/gdt.c +++ b/reactos/ntoskrnl/ke/i386/gdt.c @@ -1,28 +1,11 @@ -/* - * ReactOS kernel - * Copyright (C) 2000 ReactOS Team +/* $Id:$ * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -/* + * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel - * FILE: ntoskrnl/ke/gdt.c + * FILE: ntoskrnl/ke/i386/gdt.c * PURPOSE: GDT managment - * PROGRAMMER: David Welch (welch@cwcom.net) - * UPDATE HISTORY: - * Created 22/05/98 + * + * PROGRAMMERS: David Welch (welch@cwcom.net) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/ke/i386/idt.c b/reactos/ntoskrnl/ke/i386/idt.c index 2e45ae8958d..2c08dae5ede 100644 --- a/reactos/ntoskrnl/ke/i386/idt.c +++ b/reactos/ntoskrnl/ke/i386/idt.c @@ -1,11 +1,11 @@ -/* +/* $Id:$ + * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel - * FILE: ntoskrnl/ke/idt.c + * FILE: ntoskrnl/ke/i386/idt.c * PURPOSE: IDT managment - * PROGRAMMER: David Welch (welch@cwcom.net) - * UPDATE HISTORY: - * Created 22/05/98 + * + * PROGRAMMERS: David Welch (welch@cwcom.net) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/ke/i386/irq.c b/reactos/ntoskrnl/ke/i386/irq.c index a52e83b60d0..a666bdd2af0 100644 --- a/reactos/ntoskrnl/ke/i386/irq.c +++ b/reactos/ntoskrnl/ke/i386/irq.c @@ -1,29 +1,12 @@ -/* - * ReactOS kernel - * Copyright (C) 1998 - 2005 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -/* +/* $Id:$ + * + * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/ke/i386/irq.c * PURPOSE: IRQ handling - * PROGRAMMER: David Welch (welch@mcmail.com) + * + * PROGRAMMERS: David Welch (welch@mcmail.com) * Hartmut Birr - * UPDATE HISTORY: - * 29/05/98: Created */ /* diff --git a/reactos/ntoskrnl/ke/i386/kernel.c b/reactos/ntoskrnl/ke/i386/kernel.c index 7efe3e276d4..553cea437de 100644 --- a/reactos/ntoskrnl/ke/i386/kernel.c +++ b/reactos/ntoskrnl/ke/i386/kernel.c @@ -1,28 +1,11 @@ -/* - * ReactOS kernel - * Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team +/* $Id:$ * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -/* + * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/ke/i386/kernel.c * PURPOSE: Initializes the kernel - * PROGRAMMER: David Welch (welch@mcmail.com) - * UPDATE HISTORY: - * Created 22/05/98 + * + * PROGRAMMERS: David Welch (welch@mcmail.com) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/ke/i386/ldt.c b/reactos/ntoskrnl/ke/i386/ldt.c index aa7d33b9d75..ed3e66e82ee 100644 --- a/reactos/ntoskrnl/ke/i386/ldt.c +++ b/reactos/ntoskrnl/ke/i386/ldt.c @@ -1,28 +1,11 @@ -/* - * ReactOS kernel - * Copyright (C) 2000 ReactOS Team +/* $Id:$ * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -/* + * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/ke/i386/ldt.c * PURPOSE: LDT managment - * PROGRAMMER: David Welch (welch@cwcom.net) - * UPDATE HISTORY: - * Created 22/05/98 + * + * PROGRAMMERS: David Welch (welch@cwcom.net) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/ke/i386/thread.c b/reactos/ntoskrnl/ke/i386/thread.c index 7e4c34b35cd..1d8982cd63f 100644 --- a/reactos/ntoskrnl/ke/i386/thread.c +++ b/reactos/ntoskrnl/ke/i386/thread.c @@ -1,28 +1,11 @@ -/* - * ReactOS kernel - * Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team +/* $Id:$ * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -/* - * PROJECT: ReactOS kernel - * FILE: ntoskrnl/ke/i386/thread.c - * PURPOSE: Architecture multitasking functions - * PROGRAMMER: David Welch (welch@cwcom.net) - * REVISION HISTORY: - * 27/06/98: Created + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/ke/i386/thread.c + * PURPOSE: Architecture multitasking functions + * + * PROGRAMMERS: David Welch (welch@cwcom.net) */ /* INCLUDES ****************************************************************/ diff --git a/reactos/ntoskrnl/ke/i386/tss.c b/reactos/ntoskrnl/ke/i386/tss.c index 835a75010ea..1c03a6a88a3 100644 --- a/reactos/ntoskrnl/ke/i386/tss.c +++ b/reactos/ntoskrnl/ke/i386/tss.c @@ -1,28 +1,11 @@ -/* - * ReactOS kernel - * Copyright (C) 2000 ReactOS Team +/* $Id:$ * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -/* + * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/ke/i386/tss.c * PURPOSE: TSS managment - * PROGRAMMER: David Welch (welch@cwcom.net) - * UPDATE HISTORY: - * Created 22/05/98 + * + * PROGRAMMERS: David Welch (welch@cwcom.net) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/ke/i386/usercall.c b/reactos/ntoskrnl/ke/i386/usercall.c index f60f0d3e3e1..46aa853ef50 100644 --- a/reactos/ntoskrnl/ke/i386/usercall.c +++ b/reactos/ntoskrnl/ke/i386/usercall.c @@ -2,11 +2,10 @@ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel - * FILE: ntoskrnl/hal/x86/usercall.c + * FILE: ntoskrnl/ke/i386/usercall.c * PURPOSE: 2E interrupt handler - * PROGRAMMER: David Welch (david.welch@seh.ox.ac.uk) - * UPDATE HISTORY: - * ??? + * + * PROGRAMMERS: David Welch (david.welch@seh.ox.ac.uk) */ /* INCLUDES ******************************************************************/ diff --git a/reactos/ntoskrnl/ke/i386/usertrap.c b/reactos/ntoskrnl/ke/i386/usertrap.c index e4af88ccc2c..6bbf0efef04 100644 --- a/reactos/ntoskrnl/ke/i386/usertrap.c +++ b/reactos/ntoskrnl/ke/i386/usertrap.c @@ -1,28 +1,11 @@ -/* - * ReactOS kernel - * Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team +/* $Id:$ * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -/* - * PROJECT: ReactOS kernel - * FILE: ntoskrnl/ke/i386/usertrap.c - * PURPOSE: Handling usermode exceptions. - * PROGRAMMER: David Welch (welch@cwcom.net) - * REVISION HISTORY: - * 18/11/01: Split from ntoskrnl/ke/i386/exp.c + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/ke/i386/usertrap.c + * PURPOSE: Handling usermode exceptions. + * + * PROGRAMMERS: David Welch (welch@cwcom.net) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/ke/i386/v86m.c b/reactos/ntoskrnl/ke/i386/v86m.c index dadacc76384..3ee12335922 100644 --- a/reactos/ntoskrnl/ke/i386/v86m.c +++ b/reactos/ntoskrnl/ke/i386/v86m.c @@ -1,26 +1,11 @@ -/* - * ReactOS kernel - * Copyright (C) 2000, 2001 ReactOS Team +/* $Id:$ * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -/* + * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/ke/i386/v86m.c * PURPOSE: Support for v86 mode - * PROGRAMMER: David Welch (welch@cwcom.net) + * + * PROGRAMMERS: David Welch (welch@cwcom.net) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/ke/i386/vdm.c b/reactos/ntoskrnl/ke/i386/vdm.c index 09f21b798d6..75cd7497bac 100644 --- a/reactos/ntoskrnl/ke/i386/vdm.c +++ b/reactos/ntoskrnl/ke/i386/vdm.c @@ -1,11 +1,11 @@ -/* +/* $Id:$ + * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel - * FILE: ntoskrnl/nt/vdm.c + * FILE: ntoskrnl/ke/i386/vdm.c * PURPOSE: Virtual DOS machine support - * PROGRAMMER: David Welch (welch@mcmail.com) - * UPDATE HISTORY: - * Created 22/05/98 + * + * PROGRAMMERS: David Welch (welch@mcmail.com) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/ke/ipi.c b/reactos/ntoskrnl/ke/ipi.c index ed72e8c3c96..3798d44acdf 100644 --- a/reactos/ntoskrnl/ke/ipi.c +++ b/reactos/ntoskrnl/ke/ipi.c @@ -4,10 +4,9 @@ * PROJECT: ReactOS kernel * FILE: ntoskrnl/ke/ipi.c * PURPOSE: IPI Routines (Inter-Processor Interrupts). NT5+ - * PROGRAMMER: Alex Ionescu (alex@relsoft.net) + * + * PROGRAMMERS: Alex Ionescu (alex@relsoft.net) * Hartmut Birr - * UPDATE HISTORY: - * Created 11/08/2004 */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/ke/kqueue.c b/reactos/ntoskrnl/ke/kqueue.c index 70ffe09954f..3d10965d4eb 100644 --- a/reactos/ntoskrnl/ke/kqueue.c +++ b/reactos/ntoskrnl/ke/kqueue.c @@ -1,11 +1,11 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PURPOSE: ReactOS kernel - * FILE: ntoskrnl/ke/kqueue.c - * PURPOSE: Implement device queues - * PROGRAMMER: David Welch (welch@mcmail.com) - * REVISION HISTORY: - * 08/07/98: Created +/* $Id:$ + * + * COPYRIGHT: See COPYING in the top level directory + * PURPOSE: ReactOS kernel + * FILE: ntoskrnl/ke/kqueue.c + * PURPOSE: Implement device queues + * + * PROGRAMMERS: David Welch (welch@mcmail.com) */ /* INCLUDES ****************************************************************/ diff --git a/reactos/ntoskrnl/ke/kthread.c b/reactos/ntoskrnl/ke/kthread.c index bac75e241ba..3f5b4bdc069 100644 --- a/reactos/ntoskrnl/ke/kthread.c +++ b/reactos/ntoskrnl/ke/kthread.c @@ -1,28 +1,11 @@ -/* - * ReactOS kernel - * Copyright (C) 2000 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ /* $Id$ * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel * FILE: ntoskrnl/ke/kthread.c * PURPOSE: Microkernel thread support - * PROGRAMMER: David Welch (welch@cwcom.net) - * UPDATE HISTORY: - * Created 22/05/98 + * + * PROGRAMMERS: David Welch (welch@cwcom.net) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/ke/main.c b/reactos/ntoskrnl/ke/main.c index 0df09452e65..ea48dddb273 100644 --- a/reactos/ntoskrnl/ke/main.c +++ b/reactos/ntoskrnl/ke/main.c @@ -1,28 +1,11 @@ -/* - * ReactOS kernel - * Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -/* +/* $Id$ + * + * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/ke/main.c * PURPOSE: Initalizes the kernel - * PROGRAMMER: David Welch (welch@cwcom.net) - * UPDATE HISTORY: - * 28/05/98: Created + * + * PROGRAMMERS: David Welch (welch@cwcom.net) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/ke/mutex.c b/reactos/ntoskrnl/ke/mutex.c index 5f69af5ee61..3532781082c 100644 --- a/reactos/ntoskrnl/ke/mutex.c +++ b/reactos/ntoskrnl/ke/mutex.c @@ -1,29 +1,11 @@ -/* - * ReactOS kernel - * Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ /* $Id$ * + * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/ke/mutex.c * PURPOSE: Implements mutex - * PROGRAMMER: David Welch (welch@mcmail.com) - * UPDATE HISTORY: - * Created 22/05/98 + * + * PROGRAMMERS: David Welch (welch@mcmail.com) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/ke/process.c b/reactos/ntoskrnl/ke/process.c index 9d8c575236b..56d2bf00bc9 100644 --- a/reactos/ntoskrnl/ke/process.c +++ b/reactos/ntoskrnl/ke/process.c @@ -1,30 +1,11 @@ -/* - * ReactOS kernel - * Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ /* $Id$ * + * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/ke/process.c * PURPOSE: Microkernel process management - * PROGRAMMER: David Welch (welch@cwcom.net) - * PORTABILITY: No. - * UPDATE HISTORY: - * Created 22/05/98 + * + * PROGRAMMERS: David Welch (welch@cwcom.net) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/ke/profile.c b/reactos/ntoskrnl/ke/profile.c index 9333ec52ff4..08b9bb9d968 100644 --- a/reactos/ntoskrnl/ke/profile.c +++ b/reactos/ntoskrnl/ke/profile.c @@ -1,10 +1,11 @@ /* $Id$ * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel * FILE: ntoskrnl/ke/profile.c * PURPOSE: Kernel Profiling - * PROGRAMMER: Alex Ionescu (alex@relsoft.net) - * UPDATE HISTORY: - * Created 23/06/04 + * + * PROGRAMMERS: Alex Ionescu (alex@relsoft.net) */ #include diff --git a/reactos/ntoskrnl/ke/queue.c b/reactos/ntoskrnl/ke/queue.c index 35095eed030..9c478709de8 100644 --- a/reactos/ntoskrnl/ke/queue.c +++ b/reactos/ntoskrnl/ke/queue.c @@ -1,29 +1,11 @@ -/* - * ReactOS kernel - * Copyright (C) 1998, 1999, 2000, 2001, 2002 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ /* $Id$ * + * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/ke/queue.c * PURPOSE: Implements kernel queues - * PROGRAMMER: Eric Kohl (ekohl@rz-online.de) - * UPDATE HISTORY: - * Created 04/01/2002 + * + * PROGRAMMERS: Eric Kohl (ekohl@rz-online.de) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/ke/sem.c b/reactos/ntoskrnl/ke/sem.c index 51493a02c8d..9408e66948c 100644 --- a/reactos/ntoskrnl/ke/sem.c +++ b/reactos/ntoskrnl/ke/sem.c @@ -1,29 +1,11 @@ -/* - * ReactOS kernel - * Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ /* $Id$ * + * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/ke/sem.c * PURPOSE: Implements kernel semaphores - * PROGRAMMER: David Welch (welch@mcmail.com) - * UPDATE HISTORY: - * Created 22/05/98 + * + * PROGRAMMERS: David Welch (welch@mcmail.com) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/ke/spinlock.c b/reactos/ntoskrnl/ke/spinlock.c index c4a0754c815..47fa9dd4258 100644 --- a/reactos/ntoskrnl/ke/spinlock.c +++ b/reactos/ntoskrnl/ke/spinlock.c @@ -4,9 +4,8 @@ * PROJECT: ReactOS kernel * FILE: ntoskrnl/ke/spinlock.c * PURPOSE: Implements spinlocks - * PROGRAMMER: David Welch (welch@cwcom.net) - * UPDATE HISTORY: - * 3/6/98: Created + * + * PROGRAMMERS: David Welch (welch@cwcom.net) */ /* diff --git a/reactos/ntoskrnl/ke/timer.c b/reactos/ntoskrnl/ke/timer.c index 4e0a421680d..61a99c2d0a7 100644 --- a/reactos/ntoskrnl/ke/timer.c +++ b/reactos/ntoskrnl/ke/timer.c @@ -1,13 +1,12 @@ /* $Id$ * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: ntoskrnl/ke/timer.c - * PURPOSE: Handle timers - * PROGRAMMER: David Welch (welch@mcmail.com) - * UPDATE HISTORY: - * 28/05/98: Created - * 12/3/99: Phillip Susi: enabled the timers, fixed spin lock + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/ke/timer.c + * PURPOSE: Handle timers + * + * PROGRAMMERS: David Welch (welch@mcmail.com) + * Phillip Susi */ /* NOTES ******************************************************************/ diff --git a/reactos/ntoskrnl/ke/wait.c b/reactos/ntoskrnl/ke/wait.c index c13cd4466c0..dd046cb6230 100644 --- a/reactos/ntoskrnl/ke/wait.c +++ b/reactos/ntoskrnl/ke/wait.c @@ -1,13 +1,12 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS project - * FILE: ntoskrnl/ke/wait.c - * PURPOSE: Manages non-busy waiting - * PROGRAMMER: David Welch (welch@mcmail.com) - * REVISION HISTORY: - * 21/07/98: Created - * 12/1/99: Phillip Susi: Fixed wake code in KeDispatcherObjectWake - * so that things like KeWaitForXXX() return the correct value +/* $Id:$ + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS project + * FILE: ntoskrnl/ke/wait.c + * PURPOSE: Manages non-busy waiting + * + * PROGRAMMERS: David Welch (welch@mcmail.com) + * Phillip Susi */ /* NOTES ******************************************************************** diff --git a/reactos/ntoskrnl/ldr/init.c b/reactos/ntoskrnl/ldr/init.c index 4ba799b189d..7b0d5352fb7 100644 --- a/reactos/ntoskrnl/ldr/init.c +++ b/reactos/ntoskrnl/ldr/init.c @@ -1,38 +1,12 @@ -/* - * ReactOS kernel - * Copyright (C) 1998, 1999, 2000, 2001, 2002 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ /* $Id$ * + * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/ldr/init.c * PURPOSE: Loaders for PE executables + * * PROGRAMMERS: Jean Michault * Rex Jolliff (rex@lvcablemodem.com) - * UPDATE HISTORY: - * DW 22/05/98 Created - * RJJ 10/12/98 Completed image loader function and added hooks for MZ/PE - * RJJ 10/12/98 Built driver loader function and added hooks for PE/COFF - * RJJ 10/12/98 Rolled in David's code to load COFF drivers - * JM 14/12/98 Built initial PE user module loader - * RJJ 06/03/99 Moved user PE loader into NTDLL - * EA 19990717 LdrGetSystemDirectory() - * EK 20000618 Using SystemRoot link instead of LdrGetSystemDirectory() - * EK 20021119 Create a process parameter block for the initial process. */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/ldr/loader.c b/reactos/ntoskrnl/ldr/loader.c index c0f7a41b3a4..c1afd7c11aa 100644 --- a/reactos/ntoskrnl/ldr/loader.c +++ b/reactos/ntoskrnl/ldr/loader.c @@ -4,21 +4,11 @@ * PROJECT: ReactOS kernel * FILE: ntoskrnl/ldr/loader.c * PURPOSE: Loaders for PE executables + * * PROGRAMMERS: Jean Michault * Rex Jolliff (rex@lvcablemodem.com) * Jason Filby (jasonfilby@yahoo.com) * Casper S. Hornstrup (chorns@users.sourceforge.net) - * UPDATE HISTORY: - * DW 22/05/98 Created - * RJJ 10/12/98 Completed image loader function and added hooks for MZ/PE - * RJJ 10/12/98 Built driver loader function and added hooks for PE/COFF - * RJJ 10/12/98 Rolled in David's code to load COFF drivers - * JM 14/12/98 Built initial PE user module loader - * RJJ 06/03/99 Moved user PE loader into NTDLL - * JF 26/01/2000 Recoded some parts to retrieve export details correctly - * DW 27/06/2000 Removed redundant header files - * CSH 11/04/2001 Added automatic loading of module symbols if they exist - * KJK 02/04/2003 Nebbet-ized a couple of type names */ diff --git a/reactos/ntoskrnl/ldr/resource.c b/reactos/ntoskrnl/ldr/resource.c index 28507e71dac..97588714a0e 100644 --- a/reactos/ntoskrnl/ldr/resource.c +++ b/reactos/ntoskrnl/ldr/resource.c @@ -4,6 +4,7 @@ * PROJECT: ReactOS kernel * FILE: ntoskrnl/ldr/resource.c * PURPOSE: Resource loader + * * PROGRAMMERS: Eric Kohl (ekohl@rz-online.de) */ diff --git a/reactos/ntoskrnl/ldr/rtl.c b/reactos/ntoskrnl/ldr/rtl.c index ee9a7aa20cc..c54db5f70ff 100644 --- a/reactos/ntoskrnl/ldr/rtl.c +++ b/reactos/ntoskrnl/ldr/rtl.c @@ -2,8 +2,9 @@ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel - * FILE: ntoskrnl/ldr/loader.c + * FILE: ntoskrnl/ldr/rtl.c * PURPOSE: Loader utilities + * * PROGRAMMERS: Jean Michault * Rex Jolliff (rex@lvcablemodem.com) */ diff --git a/reactos/ntoskrnl/ldr/sysdll.c b/reactos/ntoskrnl/ldr/sysdll.c index 8a2756b4d78..ec928a776c2 100644 --- a/reactos/ntoskrnl/ldr/sysdll.c +++ b/reactos/ntoskrnl/ldr/sysdll.c @@ -1,13 +1,13 @@ -/* +/* $Id:$ + * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/ldr/sysdll.c * PURPOSE: Loaders for PE executables + * * PROGRAMMERS: Jean Michault * Rex Jolliff (rex@lvcablemodem.com) - * UPDATE HISTORY: - * DW 26/01/00 Created - * Skywing 09/11/2003 Added support for KiRaiseUserExceptionDispatcher + * Skywing */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/ldr/userldr.c b/reactos/ntoskrnl/ldr/userldr.c index 00e28be6c59..26c2239840c 100644 --- a/reactos/ntoskrnl/ldr/userldr.c +++ b/reactos/ntoskrnl/ldr/userldr.c @@ -1,12 +1,12 @@ -/* +/* $Id:$ + * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel - * FILE: ntoskrnl/ldr/sysdll.c + * FILE: ntoskrnl/ldr/userldr.c * PURPOSE: Loaders for PE executables + * * PROGRAMMERS: Jean Michault * Rex Jolliff (rex@lvcablemodem.com) - * UPDATE HISTORY: - * DW 26/01/00 Created */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/lpc/close.c b/reactos/ntoskrnl/lpc/close.c index 1fd8d76e37d..4f61c713263 100644 --- a/reactos/ntoskrnl/lpc/close.c +++ b/reactos/ntoskrnl/lpc/close.c @@ -4,9 +4,8 @@ * PROJECT: ReactOS kernel * FILE: ntoskrnl/lpc/close.c * PURPOSE: Communication mechanism - * PROGRAMMER: David Welch (welch@cwcom.net) - * UPDATE HISTORY: - * Created 22/05/98 + * + * PROGRAMMERS: David Welch (welch@cwcom.net) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/lpc/complete.c b/reactos/ntoskrnl/lpc/complete.c index 9b7b66fd3de..343e143d966 100644 --- a/reactos/ntoskrnl/lpc/complete.c +++ b/reactos/ntoskrnl/lpc/complete.c @@ -4,9 +4,8 @@ * PROJECT: ReactOS kernel * FILE: ntoskrnl/lpc/complete.c * PURPOSE: Communication mechanism - * PROGRAMMER: David Welch (welch@cwcom.net) - * UPDATE HISTORY: - * Created 22/05/98 + * + * PROGRAMMERS: David Welch (welch@cwcom.net) */ /* INCLUDES ******************************************************************/ diff --git a/reactos/ntoskrnl/lpc/connect.c b/reactos/ntoskrnl/lpc/connect.c index d227ed6140f..544788268dd 100644 --- a/reactos/ntoskrnl/lpc/connect.c +++ b/reactos/ntoskrnl/lpc/connect.c @@ -4,9 +4,8 @@ * PROJECT: ReactOS kernel * FILE: ntoskrnl/lpc/connect.c * PURPOSE: Communication mechanism - * PROGRAMMER: David Welch (welch@cwcom.net) - * UPDATE HISTORY: - * Created 22/05/98 + * + * PROGRAMMERS: David Welch (welch@cwcom.net) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/lpc/create.c b/reactos/ntoskrnl/lpc/create.c index adf561f5f6b..637c54d0166 100644 --- a/reactos/ntoskrnl/lpc/create.c +++ b/reactos/ntoskrnl/lpc/create.c @@ -4,9 +4,8 @@ * PROJECT: ReactOS kernel * FILE: ntoskrnl/lpc/create.c * PURPOSE: Communication mechanism - * PROGRAMMER: David Welch (welch@cwcom.net) - * UPDATE HISTORY: - * Created 22/05/98 + * + * PROGRAMMERS: David Welch (welch@cwcom.net) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/lpc/listen.c b/reactos/ntoskrnl/lpc/listen.c index a9931652e92..7b5d3cbc34d 100644 --- a/reactos/ntoskrnl/lpc/listen.c +++ b/reactos/ntoskrnl/lpc/listen.c @@ -4,9 +4,8 @@ * PROJECT: ReactOS kernel * FILE: ntoskrnl/lpc/listen.c * PURPOSE: Communication mechanism - * PROGRAMMER: David Welch (welch@cwcom.net) - * UPDATE HISTORY: - * Created 22/05/98 + * + * PROGRAMMERS: David Welch (welch@cwcom.net) */ /* INCLUDES ******************************************************************/ diff --git a/reactos/ntoskrnl/lpc/port.c b/reactos/ntoskrnl/lpc/port.c index 2450ae5c3ef..6735cc195d8 100644 --- a/reactos/ntoskrnl/lpc/port.c +++ b/reactos/ntoskrnl/lpc/port.c @@ -4,12 +4,8 @@ * PROJECT: ReactOS kernel * FILE: ntoskrnl/lpc/port.c * PURPOSE: Communication mechanism - * PROGRAMMER: David Welch (welch@cwcom.net) - * UPDATE HISTORY: - * Created 22/05/98 - * - * 2000-06-04 (ea) - * ntoskrnl/nt/port.c moved in ntoskrnl/lpc/port.c + * + * PROGRAMMERS: David Welch (welch@cwcom.net) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/lpc/query.c b/reactos/ntoskrnl/lpc/query.c index d9bb6187fc8..faad386e23b 100644 --- a/reactos/ntoskrnl/lpc/query.c +++ b/reactos/ntoskrnl/lpc/query.c @@ -4,9 +4,8 @@ * PROJECT: ReactOS kernel * FILE: ntoskrnl/lpc/query.c * PURPOSE: Communication mechanism - * PROGRAMMER: David Welch (welch@cwcom.net) - * UPDATE HISTORY: - * Created 22/05/98 + * + * PROGRAMMERS: David Welch (welch@cwcom.net) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/lpc/queue.c b/reactos/ntoskrnl/lpc/queue.c index c98fbf20bc3..ebb60623bab 100644 --- a/reactos/ntoskrnl/lpc/queue.c +++ b/reactos/ntoskrnl/lpc/queue.c @@ -4,9 +4,8 @@ * PROJECT: ReactOS kernel * FILE: ntoskrnl/lpc/queue.c * PURPOSE: Communication mechanism - * PROGRAMMER: David Welch (welch@cwcom.net) - * UPDATE HISTORY: - * Created 22/05/98 + * + * PROGRAMMERS: David Welch (welch@cwcom.net) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/lpc/receive.c b/reactos/ntoskrnl/lpc/receive.c index bf71f12d2c7..6b05130b2ff 100644 --- a/reactos/ntoskrnl/lpc/receive.c +++ b/reactos/ntoskrnl/lpc/receive.c @@ -4,9 +4,8 @@ * PROJECT: ReactOS kernel * FILE: ntoskrnl/lpc/receive.c * PURPOSE: Communication mechanism - * PROGRAMMER: David Welch (welch@cwcom.net) - * UPDATE HISTORY: - * Created 22/05/98 + * + * PROGRAMMERS: David Welch (welch@cwcom.net) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/lpc/reply.c b/reactos/ntoskrnl/lpc/reply.c index 2a1add8d0e5..73bb67f4090 100644 --- a/reactos/ntoskrnl/lpc/reply.c +++ b/reactos/ntoskrnl/lpc/reply.c @@ -4,9 +4,8 @@ * PROJECT: ReactOS kernel * FILE: ntoskrnl/lpc/reply.c * PURPOSE: Communication mechanism - * PROGRAMMER: David Welch (welch@cwcom.net) - * UPDATE HISTORY: - * Created 22/05/98 + * + * PROGRAMMERS: David Welch (welch@cwcom.net) */ /* INCLUDES ******************************************************************/ diff --git a/reactos/ntoskrnl/lpc/send.c b/reactos/ntoskrnl/lpc/send.c index a9914d7ac3f..1f790c8609e 100644 --- a/reactos/ntoskrnl/lpc/send.c +++ b/reactos/ntoskrnl/lpc/send.c @@ -4,9 +4,8 @@ * PROJECT: ReactOS kernel * FILE: ntoskrnl/lpc/send.c * PURPOSE: Communication mechanism - * PROGRAMMER: David Welch (welch@cwcom.net) - * UPDATE HISTORY: - * Created 22/05/98 + * + * PROGRAMMERS: David Welch (welch@cwcom.net) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/mkconfig.c b/reactos/ntoskrnl/mkconfig.c index 56bb885dc08..26994e1f83f 100644 --- a/reactos/ntoskrnl/mkconfig.c +++ b/reactos/ntoskrnl/mkconfig.c @@ -1,3 +1,13 @@ +/* $Id:$ + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/mkconfig.c + * PURPOSE: No purpose listed. + * + * PROGRAMMERS: No programmer listed. + */ + #include #include #include diff --git a/reactos/ntoskrnl/mm/anonmem.c b/reactos/ntoskrnl/mm/anonmem.c index a023cc5679a..33efecd23cb 100644 --- a/reactos/ntoskrnl/mm/anonmem.c +++ b/reactos/ntoskrnl/mm/anonmem.c @@ -1,27 +1,11 @@ -/* - * ReactOS kernel - * Copyright (C) 1998, 1999, 2000, 2001, 2002 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ /* $Id$ * - * PROJECT: ReactOS kernel - * FILE: ntoskrnl/mm/anonmem.c - * PURPOSE: Implementing anonymous memory. - * PROGRAMMER: David Welch + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/mm/anonmem.c + * PURPOSE: Implementing anonymous memory. + * + * PROGRAMMERS: David Welch */ /* INCLUDE *****************************************************************/ diff --git a/reactos/ntoskrnl/mm/aspace.c b/reactos/ntoskrnl/mm/aspace.c index f7ee69a4c42..28f62383ad3 100644 --- a/reactos/ntoskrnl/mm/aspace.c +++ b/reactos/ntoskrnl/mm/aspace.c @@ -4,9 +4,8 @@ * PROJECT: ReactOS kernel * FILE: ntoskrnl/mm/aspace.c * PURPOSE: Manages address spaces - * PROGRAMMER: David Welch (welch@cwcom.net) - * UPDATE HISTORY: - * Created 22/05/98 + * + * PROGRAMMERS: David Welch (welch@cwcom.net) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/mm/balance.c b/reactos/ntoskrnl/mm/balance.c index 89739bbb460..c026a991e1c 100644 --- a/reactos/ntoskrnl/mm/balance.c +++ b/reactos/ntoskrnl/mm/balance.c @@ -1,29 +1,11 @@ -/* - * ReactOS kernel - * Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ /* $Id$ * - * PROJECT: ReactOS kernel - * FILE: ntoskrnl/mm/balance.c - * PURPOSE: kernel memory managment functions - * PROGRAMMER: David Welch (welch@cwcom.net) - * UPDATE HISTORY: - * Created 27/12/01 + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/mm/balance.c + * PURPOSE: kernel memory managment functions + * + * PROGRAMMERS: David Welch (welch@cwcom.net) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/mm/cont.c b/reactos/ntoskrnl/mm/cont.c index 324cca6d44b..4aeec1f9614 100644 --- a/reactos/ntoskrnl/mm/cont.c +++ b/reactos/ntoskrnl/mm/cont.c @@ -4,9 +4,8 @@ * PROJECT: ReactOS kernel * FILE: ntoskrnl/mm/cont.c * PURPOSE: Manages continuous memory - * PROGRAMMER: David Welch (welch@cwcom.net) - * UPDATE HISTORY: - * Created 22/05/98 + * + * PROGRAMMERS: David Welch (welch@cwcom.net) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/mm/drvlck.c b/reactos/ntoskrnl/mm/drvlck.c index 550307e213a..ec3e43c44cb 100644 --- a/reactos/ntoskrnl/mm/drvlck.c +++ b/reactos/ntoskrnl/mm/drvlck.c @@ -2,11 +2,10 @@ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel - * FILE: ntoskrnl/io/drvlck.c + * FILE: ntoskrnl/mm/drvlck.c * PURPOSE: Managing driver managing - * PROGRAMMER: David Welch (welch@mcmail.com) - * UPDATE HISTORY: - * Created 22/05/98 + * + * PROGRAMMERS: David Welch (welch@mcmail.com) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/mm/elf32.c b/reactos/ntoskrnl/mm/elf32.c index 79bbf626ef1..7b497ad37ca 100644 --- a/reactos/ntoskrnl/mm/elf32.c +++ b/reactos/ntoskrnl/mm/elf32.c @@ -1,3 +1,13 @@ +/* $Id:$ + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/mm/elf32.c + * PURPOSE: No purpose listed. + * + * PROGRAMMERS: No programmer listed. + */ + #define __ELF_WORD_SIZE 32 #include "elf.inc.h" diff --git a/reactos/ntoskrnl/mm/elf64.c b/reactos/ntoskrnl/mm/elf64.c index cda366065d9..99a92931bb1 100644 --- a/reactos/ntoskrnl/mm/elf64.c +++ b/reactos/ntoskrnl/mm/elf64.c @@ -1,2 +1,12 @@ +/* $Id:$ + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/mm/elf64.c + * PURPOSE: No purpose listed. + * + * PROGRAMMERS: No programmer listed. + */ + #define __ELF_WORD_SIZE 64 #include "elf.inc.h" diff --git a/reactos/ntoskrnl/mm/freelist.c b/reactos/ntoskrnl/mm/freelist.c index 0c6ab950c83..621348762f2 100644 --- a/reactos/ntoskrnl/mm/freelist.c +++ b/reactos/ntoskrnl/mm/freelist.c @@ -1,12 +1,12 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: ntoskrnl/mm/freelist.c - * PURPOSE: Handle the list of free physical pages - * PROGRAMMER: David Welch (welch@cwcom.net) - * UPDATE HISTORY: - * 27/05/98: Created - * 18/08/98: Added a fix from Robert Bergkvist +/* $Id$ + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/mm/freelist.c + * PURPOSE: Handle the list of free physical pages + * + * PROGRAMMERS: David Welch (welch@cwcom.net) + * Robert Bergkvist */ /* INCLUDES ****************************************************************/ diff --git a/reactos/ntoskrnl/mm/i386/page.c b/reactos/ntoskrnl/mm/i386/page.c index e309e8a0ab6..147aec8776f 100644 --- a/reactos/ntoskrnl/mm/i386/page.c +++ b/reactos/ntoskrnl/mm/i386/page.c @@ -1,29 +1,11 @@ -/* - * ReactOS kernel - * Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ /* $Id$ * - * PROJECT: ReactOS kernel - * FILE: ntoskrnl/mm/i386/page.c - * PURPOSE: low level memory managment manipulation - * PROGRAMER: David Welch (welch@cwcom.net) - * UPDATE HISTORY: - * 9/3/98: Created + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/mm/i386/page.c + * PURPOSE: Low level memory managment manipulation + * + * PROGRAMMERS: David Welch (welch@cwcom.net) */ /* INCLUDES ***************************************************************/ diff --git a/reactos/ntoskrnl/mm/i386/pfault.c b/reactos/ntoskrnl/mm/i386/pfault.c index 75bcfda024c..fedd6fbfb9c 100644 --- a/reactos/ntoskrnl/mm/i386/pfault.c +++ b/reactos/ntoskrnl/mm/i386/pfault.c @@ -1,11 +1,11 @@ -/* +/* $Id:$ + * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/mm/i386/pfault.c * PURPOSE: Paging file functions - * PROGRAMMER: David Welch (welch@mcmail.com) - * UPDATE HISTORY: - * Created 22/05/98 + * + * PROGRAMMERS: David Welch (welch@mcmail.com) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/mm/iospace.c b/reactos/ntoskrnl/mm/iospace.c index 3cbd4333d15..0e7031e5db6 100644 --- a/reactos/ntoskrnl/mm/iospace.c +++ b/reactos/ntoskrnl/mm/iospace.c @@ -1,29 +1,11 @@ -/* - * ReactOS kernel - * Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ /* $Id$ * + * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/mm/iospace.c * PURPOSE: Mapping I/O space - * PROGRAMMER: David Welch (welch@mcmail.com) - * UPDATE HISTORY: - * Created 22/05/98 + * + * PROGRAMMERS: David Welch (welch@mcmail.com) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/mm/kmap.c b/reactos/ntoskrnl/mm/kmap.c index b7a089b8419..614f69a2df4 100644 --- a/reactos/ntoskrnl/mm/kmap.c +++ b/reactos/ntoskrnl/mm/kmap.c @@ -1,10 +1,11 @@ /* $Id$ * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: ntoskrnl/mm/kmap.c - * PURPOSE: Implements the kernel memory pool - * PROGRAMMER: David Welch (welch@cwcom.net) + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/mm/kmap.c + * PURPOSE: Implements the kernel memory pool + * + * PROGRAMMERS: David Welch (welch@cwcom.net) */ /* INCLUDES ****************************************************************/ diff --git a/reactos/ntoskrnl/mm/marea.c b/reactos/ntoskrnl/mm/marea.c index 7e7978fc489..284a9a8c96f 100644 --- a/reactos/ntoskrnl/mm/marea.c +++ b/reactos/ntoskrnl/mm/marea.c @@ -1,28 +1,11 @@ -/* - * ReactOS kernel - * Copyright (C) 1998, 1999, 2000, 2001, 2003 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -/* +/* $Id:$ + * + * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/mm/marea.c * PURPOSE: Implements memory areas - * PROGRAMMER: David Welch (welch@mcmail.com) - * UPDATE HISTORY: - * Created 22/05/98 + * + * PROGRAMMERS: David Welch (welch@mcmail.com) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/mm/mdl.c b/reactos/ntoskrnl/mm/mdl.c index dd4e32e1252..4fe192864d4 100644 --- a/reactos/ntoskrnl/mm/mdl.c +++ b/reactos/ntoskrnl/mm/mdl.c @@ -1,12 +1,11 @@ /* $Id$ * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: ntoskrnl/mm/mdl.c - * PURPOSE: Manipulates MDLs - * PROGRAMMER: David Welch (welch@cwcom.net) - * UPDATE HISTORY: - * 27/05/98: Created + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/mm/mdl.c + * PURPOSE: Manipulates MDLs + * + * PROGRAMMERS: David Welch (welch@cwcom.net) */ /* INCLUDES ****************************************************************/ diff --git a/reactos/ntoskrnl/mm/mm.c b/reactos/ntoskrnl/mm/mm.c index 6cdc7b2515d..033c5c5fd3e 100644 --- a/reactos/ntoskrnl/mm/mm.c +++ b/reactos/ntoskrnl/mm/mm.c @@ -1,30 +1,10 @@ -/* - * ReactOS kernel - * Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ /* $Id$ * - * COPYRIGHT: See COPYING in the top directory - * PROJECT: ReactOS kernel - * FILE: ntoskrnl/mm/mm.c - * PURPOSE: kernel memory managment functions - * PROGRAMMER: David Welch (welch@cwcom.net) - * UPDATE HISTORY: - * Created 9/4/98 + * COPYRIGHT: See COPYING in the top directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/mm/mm.c + * PURPOSE: Kernel memory managment functions + * PROGRAMMERS: David Welch (welch@cwcom.net) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/mm/mminit.c b/reactos/ntoskrnl/mm/mminit.c index 95c02502c9d..911ce43e025 100644 --- a/reactos/ntoskrnl/mm/mminit.c +++ b/reactos/ntoskrnl/mm/mminit.c @@ -1,12 +1,11 @@ /* $Id$ * - * COPYRIGHT: See COPYING in the top directory - * PROJECT: ReactOS kernel - * FILE: ntoskrnl/mm/mminit.c - * PURPOSE: kernel memory managment initialization functions - * PROGRAMMER: David Welch (welch@cwcom.net) - * UPDATE HISTORY: - * Created 9/4/98 + * COPYRIGHT: See COPYING in the top directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/mm/mminit.c + * PURPOSE: Kernel memory managment initialization functions + * + * PROGRAMMERS: David Welch (welch@cwcom.net) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/mm/mpw.c b/reactos/ntoskrnl/mm/mpw.c index e56ed491b2a..43f4d2dcaf9 100644 --- a/reactos/ntoskrnl/mm/mpw.c +++ b/reactos/ntoskrnl/mm/mpw.c @@ -1,30 +1,12 @@ -/* - * ReactOS kernel - * Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ /* $Id$ * - * PROJECT: ReactOS kernel - * FILE: ntoskrnl/mm/mpw.c - * PURPOSE: Writes data that has been modified in memory but not on - * the disk - * PROGRAMMER: David Welch (welch@cwcom.net) - * UPDATE HISTORY: - * 27/05/98: Created + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/mm/mpw.c + * PURPOSE: Writes data that has been modified in memory but not on + * the disk + * + * PROGRAMMERS: David Welch (welch@cwcom.net) */ /* INCLUDES ****************************************************************/ diff --git a/reactos/ntoskrnl/mm/ncache.c b/reactos/ntoskrnl/mm/ncache.c index 48e3ccfc50a..8eef949bab0 100644 --- a/reactos/ntoskrnl/mm/ncache.c +++ b/reactos/ntoskrnl/mm/ncache.c @@ -2,11 +2,10 @@ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel - * FILE: ntoskrnl/mm/cont.c + * FILE: ntoskrnl/mm/ncache.c * PURPOSE: Manages non-cached memory - * PROGRAMMER: David Welch (welch@cwcom.net) - * UPDATE HISTORY: - * Created 22/05/98 + * + * PROGRAMMERS: David Welch (welch@cwcom.net) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/mm/npool.c b/reactos/ntoskrnl/mm/npool.c index 30fea119881..fc92e770adb 100644 --- a/reactos/ntoskrnl/mm/npool.c +++ b/reactos/ntoskrnl/mm/npool.c @@ -1,17 +1,13 @@ /* $Id$ * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: ntoskrnl/mm/npool.c - * PURPOSE: Implements the kernel memory pool - * PROGRAMMER: David Welch (welch@cwcom.net) - * UPDATE HISTORY: - * 27/05/98: Created - * 10/06/98: Bug fixes by Iwan Fatahi (i_fatahi@hotmail.com) - * in take_block (if current bigger than required) - * in remove_from_used_list - * in ExFreePool - * 23/08/98: Fixes from Robert Bergkvist (fragdance@hotmail.com) + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/mm/npool.c + * PURPOSE: Implements the kernel memory pool + * + * PROGRAMMERS: David Welch (welch@cwcom.net) + * Iwan Fatahi (i_fatahi@hotmail.com) + * Robert Bergkvist (fragdance@hotmail.com) */ /* INCLUDES ****************************************************************/ diff --git a/reactos/ntoskrnl/mm/pagefile.c b/reactos/ntoskrnl/mm/pagefile.c index c27fabb04f3..7cc3d347033 100644 --- a/reactos/ntoskrnl/mm/pagefile.c +++ b/reactos/ntoskrnl/mm/pagefile.c @@ -1,29 +1,11 @@ -/* - * ReactOS kernel - * Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ /* $Id$ * + * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/mm/pagefile.c * PURPOSE: Paging file functions - * PROGRAMMER: David Welch (welch@mcmail.com) - * UPDATE HISTORY: - * Created 22/05/98 + * + * PROGRAMMERS: David Welch (welch@mcmail.com) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/mm/pageop.c b/reactos/ntoskrnl/mm/pageop.c index e51bc4c9e56..e68414dea15 100644 --- a/reactos/ntoskrnl/mm/pageop.c +++ b/reactos/ntoskrnl/mm/pageop.c @@ -1,11 +1,11 @@ /* $Id$ * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: ntoskrnl/mm/pageop.c - * PROGRAMMER: David Welch (welch@cwcom.net) - * UPDATE HISTORY: - * 27/05/98: Created + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/mm/pageop.c + * PURPOSE: No purpose listed. + * + * PROGRAMMERS: David Welch (welch@cwcom.net) */ /* INCLUDES ****************************************************************/ diff --git a/reactos/ntoskrnl/mm/pager.c b/reactos/ntoskrnl/mm/pager.c index 50f62c6357d..656da6aba35 100644 --- a/reactos/ntoskrnl/mm/pager.c +++ b/reactos/ntoskrnl/mm/pager.c @@ -1,12 +1,11 @@ /* $Id$ * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: ntoskrnl/mm/pager.c - * PURPOSE: Moves infrequently used data out of memory - * PROGRAMMER: David Welch (welch@cwcom.net) - * UPDATE HISTORY: - * 27/05/98: Created + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/mm/pager.c + * PURPOSE: Moves infrequently used data out of memory + * + * PROGRAMMERS: David Welch (welch@cwcom.net) */ /* INCLUDES ****************************************************************/ diff --git a/reactos/ntoskrnl/mm/pagfault.c b/reactos/ntoskrnl/mm/pagfault.c index 7ac0e17dfbe..a274cd210a2 100644 --- a/reactos/ntoskrnl/mm/pagfault.c +++ b/reactos/ntoskrnl/mm/pagfault.c @@ -1,4 +1,13 @@ -/* $Id$ */ +/* $Id$ + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/mm/pagfault.c + * PURPOSE: No purpose listed. + * + * PROGRAMMERS: No programmer listed. + */ + #include diff --git a/reactos/ntoskrnl/mm/paging.c b/reactos/ntoskrnl/mm/paging.c index 9f4411121a2..159909c8341 100644 --- a/reactos/ntoskrnl/mm/paging.c +++ b/reactos/ntoskrnl/mm/paging.c @@ -1,11 +1,11 @@ -/* +/* $Id:$ + * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/mm/paging.c * PURPOSE: Paging file functions - * PROGRAMMER: David Welch (welch@mcmail.com) - * UPDATE HISTORY: - * Created 22/05/98 + * + * PROGRAMMERS: David Welch (welch@mcmail.com) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/mm/pe.c b/reactos/ntoskrnl/mm/pe.c index 30a6e070e46..f68fac9f381 100644 --- a/reactos/ntoskrnl/mm/pe.c +++ b/reactos/ntoskrnl/mm/pe.c @@ -1,34 +1,11 @@ -/* - * ReactOS kernel - * Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ /* $Id$ * + * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/mm/pe.c * PURPOSE: Loader for PE executables - * PROGRAMMER: KJK::Hyperion - * UPDATE HISTORY: - * 2004-12-06 Created - * 2004-12-09 Compiles - * 2004-12-26 Actually works, several checks relaxed to support - * the majority of existing executables, corrected - * the alignment helper functions, debug messages to - * explain failure. + * + * PROGRAMMERS: KJK::Hyperion */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/mm/physical.c b/reactos/ntoskrnl/mm/physical.c index 99176a5f1b2..ec3f719f9b8 100644 --- a/reactos/ntoskrnl/mm/physical.c +++ b/reactos/ntoskrnl/mm/physical.c @@ -1,11 +1,11 @@ -/* +/* $Id:$ + * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/mm/physical.c * PURPOSE: Physical Memory Manipulation functions - * PROGRAMMER: Alex Ionescu (alex@relsoft.net) - * UPDATE HISTORY: - * Created 16/07/04 + * + * PROGRAMMERS: Alex Ionescu (alex@relsoft.net) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/mm/pool.c b/reactos/ntoskrnl/mm/pool.c index 98a62bc0f9b..9370213c88e 100644 --- a/reactos/ntoskrnl/mm/pool.c +++ b/reactos/ntoskrnl/mm/pool.c @@ -1,10 +1,11 @@ /* $Id$ * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: ntoskrnl/mm/pool.c - * PURPOSE: Implements the kernel memory pool - * PROGRAMMER: David Welch (welch@mcmail.com) + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/mm/pool.c + * PURPOSE: Implements the kernel memory pool + * + * PROGRAMMERS: David Welch (welch@mcmail.com) */ /* INCLUDES ****************************************************************/ diff --git a/reactos/ntoskrnl/mm/ppool.c b/reactos/ntoskrnl/mm/ppool.c index 7bcb786ac38..0a141302056 100644 --- a/reactos/ntoskrnl/mm/ppool.c +++ b/reactos/ntoskrnl/mm/ppool.c @@ -4,10 +4,9 @@ * PROJECT: ReactOS kernel * FILE: ntoskrnl/mm/ppool.c * PURPOSE: Implements the paged pool - * PROGRAMMER: David Welch (welch@mcmail.com) - * UPDATE HISTORY: - * Created 22/05/98 - * Complete Rewrite Dec 2004 by Royce Mitchell III + * + * PROGRAMMERS: David Welch (welch@mcmail.com) + * Royce Mitchell III */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/mm/region.c b/reactos/ntoskrnl/mm/region.c index c6e745c84b4..e5efd3fe827 100644 --- a/reactos/ntoskrnl/mm/region.c +++ b/reactos/ntoskrnl/mm/region.c @@ -1,27 +1,11 @@ -/* - * ReactOS kernel - * Copyright (C) 1998, 1999, 2000, 2001, 2002 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ /* $Id$ * - * PROJECT: ReactOS kernel - * FILE: ntoskrnl/mm/region.c - * PROGRAMMER: David Welch - * PURPOSE: + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/mm/region.c + * PURPOSE: No purpose listed. + * + * PROGRAMMERS: David Welch */ /* INCLUDE *****************************************************************/ diff --git a/reactos/ntoskrnl/mm/rmap.c b/reactos/ntoskrnl/mm/rmap.c index 33c1968a80a..da916f1f1af 100644 --- a/reactos/ntoskrnl/mm/rmap.c +++ b/reactos/ntoskrnl/mm/rmap.c @@ -1,30 +1,11 @@ -/* - * ReactOS kernel - * Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ /* $Id$ * - * COPYRIGHT: See COPYING in the top directory - * PROJECT: ReactOS kernel - * FILE: ntoskrnl/mm/rmap.c - * PURPOSE: kernel memory managment functions - * PROGRAMMER: David Welch (welch@cwcom.net) - * UPDATE HISTORY: - * Created 27/12/01 + * COPYRIGHT: See COPYING in the top directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/mm/rmap.c + * PURPOSE: Kernel memory managment functions + * + * PROGRAMMERS: David Welch (welch@cwcom.net) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/mm/section.c b/reactos/ntoskrnl/mm/section.c index e6fc7868537..ada2a84042c 100644 --- a/reactos/ntoskrnl/mm/section.c +++ b/reactos/ntoskrnl/mm/section.c @@ -1,29 +1,11 @@ -/* - * ReactOS kernel - * Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ /* $Id$ * + * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/mm/section.c * PURPOSE: Implements section objects - * PROGRAMMER: David Welch (welch@mcmail.com) - * UPDATE HISTORY: - * Created 22/05/98 + * + * PROGRAMMERS: David Welch (welch@mcmail.com) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/mm/verifier.c b/reactos/ntoskrnl/mm/verifier.c index 7f39eabcc9e..bf25b4165f6 100644 --- a/reactos/ntoskrnl/mm/verifier.c +++ b/reactos/ntoskrnl/mm/verifier.c @@ -1,11 +1,11 @@ -/* +/* $Id:$ + * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/mm/verifier.c * PURPOSE: Driver Verifier functions - * PROGRAMMER: Alex Ionescu (alex@relsoft.net) - * UPDATE HISTORY: - * Created 16/07/04 + * + * PROGRAMMERS: Alex Ionescu (alex@relsoft.net) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/mm/virtual.c b/reactos/ntoskrnl/mm/virtual.c index e98781ed24d..aadecb396c9 100644 --- a/reactos/ntoskrnl/mm/virtual.c +++ b/reactos/ntoskrnl/mm/virtual.c @@ -1,27 +1,11 @@ -/* - * ReactOS kernel - * Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ /* $Id$ * - * PROJECT: ReactOS kernel - * FILE: ntoskrnl/mm/virtual.c - * PURPOSE: Implementing operations on virtual memory. - * PROGRAMMER: David Welch + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/mm/virtual.c + * PURPOSE: Implementing operations on virtual memory. + * + * PROGRAMMERS: David Welch */ /* INCLUDE *****************************************************************/ diff --git a/reactos/ntoskrnl/mm/wset.c b/reactos/ntoskrnl/mm/wset.c index f3962cac114..d6ff15b5a85 100644 --- a/reactos/ntoskrnl/mm/wset.c +++ b/reactos/ntoskrnl/mm/wset.c @@ -1,29 +1,11 @@ -/* - * ReactOS kernel - * Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ /* $Id$ * + * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/mm/wset.c * PURPOSE: Manages working sets - * PROGRAMMER: David Welch (welch@cwcom.net) - * UPDATE HISTORY: - * Created 22/05/98 + * + * PROGRAMMERS: David Welch (welch@cwcom.net) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/ob/dirobj.c b/reactos/ntoskrnl/ob/dirobj.c index 92ee3c3388a..fab1f3d4001 100644 --- a/reactos/ntoskrnl/ob/dirobj.c +++ b/reactos/ntoskrnl/ob/dirobj.c @@ -4,9 +4,8 @@ * PROJECT: ReactOS kernel * FILE: ntoskrnl/ob/dirobj.c * PURPOSE: Interface functions to directory object - * PROGRAMMER: David Welch (welch@mcmail.com) - * UPDATE HISTORY: - * 22/05/98: Created + * + * PROGRAMMERS: David Welch (welch@mcmail.com) */ /* INCLUDES ***************************************************************/ diff --git a/reactos/ntoskrnl/ob/namespc.c b/reactos/ntoskrnl/ob/namespc.c index 60bee7fd7e8..2308f3cc564 100644 --- a/reactos/ntoskrnl/ob/namespc.c +++ b/reactos/ntoskrnl/ob/namespc.c @@ -4,9 +4,8 @@ * PROJECT: ReactOS kernel * FILE: ntoskrnl/ob/namespc.c * PURPOSE: Manages the system namespace - * PROGRAMMER: David Welch (welch@mcmail.com) - * UPDATE HISTORY: - * 22/05/98: Created + * + * PROGRAMMERS: David Welch (welch@mcmail.com) */ /* INCLUDES ***************************************************************/ diff --git a/reactos/ntoskrnl/ob/ntobj.c b/reactos/ntoskrnl/ob/ntobj.c index 68891561105..91d9b86a872 100644 --- a/reactos/ntoskrnl/ob/ntobj.c +++ b/reactos/ntoskrnl/ob/ntobj.c @@ -1,12 +1,11 @@ /* $Id$ * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: ntoskrnl/ob/ntobj.c - * PURPOSE: User mode interface to object manager - * PROGRAMMER: David Welch (welch@cwcom.net) - * UPDATE HISTORY: - * 10/06/98: Created + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/ob/ntobj.c + * PURPOSE: User mode interface to object manager + * + * PROGRAMMERS: David Welch (welch@cwcom.net) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/ob/object.c b/reactos/ntoskrnl/ob/object.c index 2d94ad80297..96c3d3b8924 100644 --- a/reactos/ntoskrnl/ob/object.c +++ b/reactos/ntoskrnl/ob/object.c @@ -1,14 +1,12 @@ /* $Id$ * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: ntoskrnl/ob/object.c - * PURPOSE: Implements generic object managment functions - * PROGRAMMERS David Welch (welch@cwcom.net), Skywing (skywing@valhallalegends.com) - * UPDATE HISTORY: - * 10/06/98: Created - * 09/13/03: Fixed various ObXxx routines to not call retention - * checks directly at a raised IRQL. + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/ob/object.c + * PURPOSE: Implements generic object managment functions + * + * PROGRAMMERS: David Welch (welch@cwcom.net) + * Skywing (skywing@valhallalegends.com) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/ob/sdcache.c b/reactos/ntoskrnl/ob/sdcache.c index dc5f0fc5ec0..f06b3f9d1dc 100644 --- a/reactos/ntoskrnl/ob/sdcache.c +++ b/reactos/ntoskrnl/ob/sdcache.c @@ -2,11 +2,10 @@ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel - * FILE: ntoskrnl/ps/kill.c - * PURPOSE: Terminating a thread - * PROGRAMMER: David Welch (welch@cwcom.net) - * UPDATE HISTORY: - * Created 22/05/98 + * FILE: ntoskrnl/ob/sdcache.c + * PURPOSE: No purpose listed. + * + * PROGRAMMERS: David Welch (welch@cwcom.net) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/ob/security.c b/reactos/ntoskrnl/ob/security.c index 4d1000a9c18..ef6d4383c00 100644 --- a/reactos/ntoskrnl/ob/security.c +++ b/reactos/ntoskrnl/ob/security.c @@ -1,11 +1,11 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * PURPOSE: Security manager - * FILE: ntoskrnl/ob/security.c - * PROGRAMER: ? - * REVISION HISTORY: - * 26/07/98: Added stubs for security functions +/* $Id:$ + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/ob/security.c + * PURPOSE: Security manager + * + * PROGRAMERS: No programmer listed. */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/ob/symlink.c b/reactos/ntoskrnl/ob/symlink.c index 5d657fd9ac9..67681c31f44 100644 --- a/reactos/ntoskrnl/ob/symlink.c +++ b/reactos/ntoskrnl/ob/symlink.c @@ -4,9 +4,8 @@ * PROJECT: ReactOS kernel * FILE: ntoskrnl/ob/symlink.c * PURPOSE: Implements symbolic links - * PROGRAMMER: David Welch (welch@mcmail.com) - * UPDATE HISTORY: - * Created 22/05/98 + * + * PROGRAMMERS: David Welch (welch@mcmail.com) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/po/power.c b/reactos/ntoskrnl/po/power.c index 675b11f203e..b50bd0912d5 100644 --- a/reactos/ntoskrnl/po/power.c +++ b/reactos/ntoskrnl/po/power.c @@ -1,29 +1,11 @@ -/* - * ReactOS kernel - * Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ /* $Id$ + * + * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/po/power.c * PURPOSE: Power Manager - * PROGRAMMER: Casper S. Hornstrup (chorns@users.sourceforge.net) - * UPDATE HISTORY: - * 20/08/1999 EA Created - * 16/04/2001 CSH Stubs added + * + * PROGRAMMERS: Casper S. Hornstrup (chorns@users.sourceforge.net) */ #include diff --git a/reactos/ntoskrnl/ps/cid.c b/reactos/ntoskrnl/ps/cid.c index c816566aef4..e38842500f5 100644 --- a/reactos/ntoskrnl/ps/cid.c +++ b/reactos/ntoskrnl/ps/cid.c @@ -1,12 +1,11 @@ /* $Id$ * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: ntoskrnl/ps/clientid.c - * PURPOSE: Client ID (CID) management - * PROGRAMMER: Thomas Weidenmueller - * REVISION HISTORY: - * 9/20/2004: Created + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/ps/cid.c + * PURPOSE: Client ID (CID) management + * + * PROGRAMMERS: Thomas Weidenmueller */ /* INCLUDES ******************************************************************/ diff --git a/reactos/ntoskrnl/ps/create.c b/reactos/ntoskrnl/ps/create.c index 744808f06f7..79d0c73c4c2 100644 --- a/reactos/ntoskrnl/ps/create.c +++ b/reactos/ntoskrnl/ps/create.c @@ -1,14 +1,13 @@ /* $Id$ * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: ntoskrnl/ps/thread.c - * PURPOSE: Thread managment - * PROGRAMMER: David Welch (welch@mcmail.com) - * REVISION HISTORY: - * 23/06/98: Created - * 12/10/99: Phillip Susi: Thread priorities, and APC work - * 09/08/03: Skywing: ThreadEventPair support (delete) + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/ps/create.c + * PURPOSE: Thread managment + * + * PROGRAMMERS: David Welch (welch@mcmail.com) + * Phillip Susi + * Skywing */ /* diff --git a/reactos/ntoskrnl/ps/debug.c b/reactos/ntoskrnl/ps/debug.c index 50b36b1adb5..07351e02b6f 100644 --- a/reactos/ntoskrnl/ps/debug.c +++ b/reactos/ntoskrnl/ps/debug.c @@ -1,31 +1,12 @@ -/* - * ReactOS kernel - * Copyright (C) 2000, 1999, 1998 David Welch , - * Philip Susi - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ /* $Id$ * - * PROJECT: ReactOS kernel - * FILE: ntoskrnl/ps/debug.c - * PURPOSE: Thread managment - * PROGRAMMER: David Welch (welch@mcmail.com) - * REVISION HISTORY: - * 23/06/98: Created - * 12/10/99: Phillip Susi: Thread priorities, and APC work + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/ps/debug.c + * PURPOSE: Thread managment + * + * PROGRAMMERS: David Welch (welch@mcmail.com) + * Phillip Susi */ /* diff --git a/reactos/ntoskrnl/ps/i386/continue.c b/reactos/ntoskrnl/ps/i386/continue.c index 7a43a75459d..10d2c60650b 100644 --- a/reactos/ntoskrnl/ps/i386/continue.c +++ b/reactos/ntoskrnl/ps/i386/continue.c @@ -1,12 +1,12 @@ /* $Id$ * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: ntoskrnl/ps/i386/continue.c - * PURPOSE: i386 implementation of NtContinue() - * PROGRAMMER: Royce Mitchell III, kjk_hyperion - * REVISION HISTORY: - * 29/06/04: Created + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/ps/i386/continue.c + * PURPOSE: i386 implementation of NtContinue() + * + * PROGRAMMERS: Royce Mitchell III, + * kjk_hyperion */ /* INCLUDES ****************************************************************/ diff --git a/reactos/ntoskrnl/ps/idle.c b/reactos/ntoskrnl/ps/idle.c index 6fec7c96b30..d338cc56c12 100644 --- a/reactos/ntoskrnl/ps/idle.c +++ b/reactos/ntoskrnl/ps/idle.c @@ -1,11 +1,11 @@ -/* +/* $Id:$ + * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/ps/idle.c * PURPOSE: Using idle time - * PROGRAMMER: David Welch (welch@cwcom.net) - * UPDATE HISTORY: - * Created 22/05/98 + * + * PROGRAMMERS: David Welch (welch@cwcom.net) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/ps/job.c b/reactos/ntoskrnl/ps/job.c index 302679ec3f4..6d4e59ca985 100644 --- a/reactos/ntoskrnl/ps/job.c +++ b/reactos/ntoskrnl/ps/job.c @@ -1,11 +1,11 @@ -/* +/* $Id:$ + * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel - * FILE: ntoskrnl/ps/jobs.c + * FILE: ntoskrnl/ps/job.c * PURPOSE: Job Native Functions - * PROGRAMMER: Alex Ionescu (alex@relsoft.net) - * UPDATE HISTORY: - * Created 16/07/04 + * + * PROGRAMMERS: Alex Ionescu (alex@relsoft.net) */ /* Note: Jobs are only supported on Win2K+ */ diff --git a/reactos/ntoskrnl/ps/kill.c b/reactos/ntoskrnl/ps/kill.c index e9eee49b044..273f12d5808 100644 --- a/reactos/ntoskrnl/ps/kill.c +++ b/reactos/ntoskrnl/ps/kill.c @@ -4,9 +4,8 @@ * PROJECT: ReactOS kernel * FILE: ntoskrnl/ps/kill.c * PURPOSE: Terminating a thread - * PROGRAMMER: David Welch (welch@cwcom.net) - * UPDATE HISTORY: - * Created 22/05/98 + * + * PROGRAMMERS: David Welch (welch@cwcom.net) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/ps/locale.c b/reactos/ntoskrnl/ps/locale.c index 508cca6586d..545cde0f667 100644 --- a/reactos/ntoskrnl/ps/locale.c +++ b/reactos/ntoskrnl/ps/locale.c @@ -4,9 +4,8 @@ * PROJECT: ReactOS kernel * FILE: ntoskrnl/ps/locale.c * PURPOSE: Locale support - * PROGRAMMER: David Welch (welch@cwcom.net) - * UPDATE HISTORY: - * Created 22/05/98 + * + * PROGRAMMERS: David Welch (welch@cwcom.net) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/ps/process.c b/reactos/ntoskrnl/ps/process.c index 34a1e2ca4ea..688f8341b90 100644 --- a/reactos/ntoskrnl/ps/process.c +++ b/reactos/ntoskrnl/ps/process.c @@ -1,12 +1,11 @@ /* $Id$ * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: ntoskrnl/ps/process.c - * PURPOSE: Process managment - * PROGRAMMER: David Welch (welch@cwcom.net) - * REVISION HISTORY: - * 21/07/98: Created + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/ps/process.c + * PURPOSE: Process managment + * + * PROGRAMMERS: David Welch (welch@cwcom.net) */ /* INCLUDES ******************************************************************/ diff --git a/reactos/ntoskrnl/ps/psmgr.c b/reactos/ntoskrnl/ps/psmgr.c index 8601c6e6229..051d6ae9989 100644 --- a/reactos/ntoskrnl/ps/psmgr.c +++ b/reactos/ntoskrnl/ps/psmgr.c @@ -1,10 +1,11 @@ /* $Id$ * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: ntoskrnl/ps/psmgr.c - * PURPOSE: Process management - * PROGRAMMER: David Welch (welch@mcmail.com) + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/ps/psmgr.c + * PURPOSE: Process management + * + * PROGRAMMERS: David Welch (welch@mcmail.com) */ /* INCLUDES **************************************************************/ diff --git a/reactos/ntoskrnl/ps/suspend.c b/reactos/ntoskrnl/ps/suspend.c index 777704780f2..eeacff4e21b 100644 --- a/reactos/ntoskrnl/ps/suspend.c +++ b/reactos/ntoskrnl/ps/suspend.c @@ -1,27 +1,11 @@ -/* - * ReactOS kernel - * Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ /* $Id$ * - * PROJECT: ReactOS kernel - * FILE: ntoskrnl/ps/suspend.c - * PURPOSE: Thread managment - * PROGRAMMER: David Welch (welch@mcmail.com) + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/ps/suspend.c + * PURPOSE: Thread managment + * + * PROGRAMMERS: David Welch (welch@mcmail.com) */ /* INCLUDES ******************************************************************/ diff --git a/reactos/ntoskrnl/ps/thread.c b/reactos/ntoskrnl/ps/thread.c index 9ed9ca88490..3acafcfd7e0 100644 --- a/reactos/ntoskrnl/ps/thread.c +++ b/reactos/ntoskrnl/ps/thread.c @@ -1,13 +1,12 @@ /* $Id$ * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: ntoskrnl/ps/thread.c - * PURPOSE: Thread managment - * PROGRAMMER: David Welch (welch@mcmail.com) - * REVISION HISTORY: - * 23/06/98: Created - * 12/10/99: Phillip Susi: Thread priorities, and APC work + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/ps/thread.c + * PURPOSE: Thread managment + * + * PROGRAMMERS: David Welch (welch@mcmail.com) + * Phillip Susi */ /* diff --git a/reactos/ntoskrnl/ps/tinfo.c b/reactos/ntoskrnl/ps/tinfo.c index f011bef31e9..70455fa2336 100644 --- a/reactos/ntoskrnl/ps/tinfo.c +++ b/reactos/ntoskrnl/ps/tinfo.c @@ -4,11 +4,9 @@ * PROJECT: ReactOS kernel * FILE: ntoskrnl/ps/tinfo.c * PURPOSE: Getting/setting thread information - * PROGRAMMER: David Welch (welch@mcmail.com) - * UPDATE HISTORY: - * Created 22/05/98 - * Updated 09/08/2003 by Skywing (skywing@valhallalegends.com) - * to suppport thread-eventpairs. + * + * PROGRAMMERS: David Welch (welch@mcmail.com) + * Skywing (skywing@valhallalegends.com) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/ps/w32call.c b/reactos/ntoskrnl/ps/w32call.c index 0bbda42d6fc..48b11ac8259 100644 --- a/reactos/ntoskrnl/ps/w32call.c +++ b/reactos/ntoskrnl/ps/w32call.c @@ -1,13 +1,12 @@ /* $Id$ * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: ntoskrnl/ps/thread.c - * PURPOSE: Thread managment - * PROGRAMMER: David Welch (welch@mcmail.com) - * REVISION HISTORY: - * 23/06/98: Created - * 12/10/99: Phillip Susi: Thread priorities, and APC work + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/ps/w32call.c + * PURPOSE: Thread managment + * + * PROGRAMMERS: David Welch (welch@mcmail.com) + * Phillip Susi */ /* diff --git a/reactos/ntoskrnl/ps/win32.c b/reactos/ntoskrnl/ps/win32.c index 767a4f36608..6e9ef4d07ba 100644 --- a/reactos/ntoskrnl/ps/win32.c +++ b/reactos/ntoskrnl/ps/win32.c @@ -1,30 +1,11 @@ -/* - * ReactOS kernel - * Copyright (C) 2002 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ /* $Id$ * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: ntoskrnl/ps/win32.c - * PURPOSE: win32k support - * PROGRAMMER: Eric Kohl (ekohl@rz-online.de) - * REVISION HISTORY: - * 04/01/2002: Created + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/ps/win32.c + * PURPOSE: win32k support + * + * PROGRAMMERS: Eric Kohl (ekohl@rz-online.de) */ /* INCLUDES ****************************************************************/ diff --git a/reactos/ntoskrnl/rtl/atom.c b/reactos/ntoskrnl/rtl/atom.c index fec78afa376..6ab15b3d1db 100644 --- a/reactos/ntoskrnl/rtl/atom.c +++ b/reactos/ntoskrnl/rtl/atom.c @@ -2,11 +2,10 @@ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel - * FILE: ntoskrnl/nt/atom.c + * FILE: ntoskrnl/rtl/atom.c * PURPOSE: Atom managment - * PROGRAMMER: Nobody - * UPDATE HISTORY: - * Created 22/05/98 + * + * PROGRAMMERS: No programmer listed. */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/rtl/capture.c b/reactos/ntoskrnl/rtl/capture.c index 05238bfe118..c001291b15e 100644 --- a/reactos/ntoskrnl/rtl/capture.c +++ b/reactos/ntoskrnl/rtl/capture.c @@ -1,29 +1,11 @@ -/* - * ReactOS kernel - * Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ /* $Id$ * + * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/rtl/capture.c * PURPOSE: Helper routines for system calls. - * PROGRAMMER: David Welch (welch@cwcom.net) - * UPDATE HISTORY: - * 02/09/01: Created + * + * PROGRAMMERS: David Welch (welch@cwcom.net) */ /* INCLUDES ******************************************************************/ diff --git a/reactos/ntoskrnl/rtl/ctype.c b/reactos/ntoskrnl/rtl/ctype.c index 4a6887a05ff..3366e1b4b6b 100644 --- a/reactos/ntoskrnl/rtl/ctype.c +++ b/reactos/ntoskrnl/rtl/ctype.c @@ -4,11 +4,8 @@ * PROJECT: ReactOS kernel * FILE: ntoskrnl/rtl/ctype.c * PURPOSE: Character type and conversion functions - * PROGRAMMERS: ??? - * Eric Kohl - * HISTORY: ???: Created - * 10/01/2000: Added missing functions and changed - * all functions to use ctype table + * + * PROGRAMMERS: Eric Kohl */ #undef __MSVCRT__ #include diff --git a/reactos/ntoskrnl/rtl/handle.c b/reactos/ntoskrnl/rtl/handle.c index c29982d73c9..3765367ee7c 100644 --- a/reactos/ntoskrnl/rtl/handle.c +++ b/reactos/ntoskrnl/rtl/handle.c @@ -1,10 +1,11 @@ /* $Id$ * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * PURPOSE: Handle table - * FILE: lib/ntdll/rtl/handle.c - * PROGRAMER: Eric Kohl + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/rtl/handle.c + * PURPOSE: Handle table + * + * PROGRAMMERS: Eric Kohl */ /* INCLUDES ******************************************************************/ diff --git a/reactos/ntoskrnl/rtl/i386/exception.c b/reactos/ntoskrnl/rtl/i386/exception.c index 98eb681e993..f6fdd18ac4b 100755 --- a/reactos/ntoskrnl/rtl/i386/exception.c +++ b/reactos/ntoskrnl/rtl/i386/exception.c @@ -1,10 +1,11 @@ /* $Id$ * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * PURPOSE: Kernel-mode exception support for IA-32 - * FILE: ntoskrnl/rtl/i386/exception.c - * PROGRAMER: Casper S. Hornstrup (chorns@users.sourceforge.net) + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/rtl/i386/exception.c + * PURPOSE: Kernel-mode exception support for IA-32 + * + * PROGRAMMERS: Casper S. Hornstrup (chorns@users.sourceforge.net) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/rtl/libsupp.c b/reactos/ntoskrnl/rtl/libsupp.c index 01926e1fd77..b5f345102a4 100644 --- a/reactos/ntoskrnl/rtl/libsupp.c +++ b/reactos/ntoskrnl/rtl/libsupp.c @@ -1,11 +1,11 @@ -/* +/* $Id:$ * * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/ntoskrnl/rtl/libsup.c + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/rtl/libsupp.c * PURPOSE: Rtl library support routines - * UPDATE HISTORY: * + * PROGRAMMERS: No programmer listed. */ /* INCLUDES ******************************************************************/ diff --git a/reactos/ntoskrnl/rtl/message.c b/reactos/ntoskrnl/rtl/message.c index f473b923bf2..630b281ac72 100644 --- a/reactos/ntoskrnl/rtl/message.c +++ b/reactos/ntoskrnl/rtl/message.c @@ -1,12 +1,11 @@ /* $Id$ * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * PURPOSE: Message table functions - * FILE: ntoskrnl/rtl/message.c - * PROGRAMER: Eric Kohl - * REVISION HISTORY: - * 29/05/2001: Created + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/rtl/message.c + * PURPOSE: Message table functions + * + * PROGRAMMERS: Eric Kohl */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/rtl/misc.c b/reactos/ntoskrnl/rtl/misc.c index 7092a040d39..7bb05ac2a95 100644 --- a/reactos/ntoskrnl/rtl/misc.c +++ b/reactos/ntoskrnl/rtl/misc.c @@ -1,12 +1,11 @@ -/* $Id$ +/* $Id:$ * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * PURPOSE: Various functions - * FILE: lib/ntoskrnl/rtl/misc.c - * PROGRAMER: Hartmut Birr - * REVISION HISTORY: - * 01/03/2005: Created + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/rtl/misc.c + * PURPOSE: Various functions + * + * PROGRAMMERS: Hartmut Birr */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/rtl/nls.c b/reactos/ntoskrnl/rtl/nls.c index f1b1ceed460..c56345c0f61 100644 --- a/reactos/ntoskrnl/rtl/nls.c +++ b/reactos/ntoskrnl/rtl/nls.c @@ -4,8 +4,8 @@ * PROJECT: ReactOS kernel * FILE: ntoskrnl/rtl/nls.c * PURPOSE: Bitmap functions - * UPDATE HISTORY: - * 20/08/99 Created by Eric Kohl + * + * PROGRAMMERS: Eric Kohl */ #include diff --git a/reactos/ntoskrnl/rtl/purecall.c b/reactos/ntoskrnl/rtl/purecall.c index a8e378a90c3..43012472012 100644 --- a/reactos/ntoskrnl/rtl/purecall.c +++ b/reactos/ntoskrnl/rtl/purecall.c @@ -1,12 +1,11 @@ /* $Id$ * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * PURPOSE: Message table functions - * FILE: ntoskrnl/rtl/message.c - * PROGRAMER: Eric Kohl - * REVISION HISTORY: - * 29/05/2001: Created + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/rtl/purecall.c + * PURPOSE: No purpose listed. + * + * PROGRAMMERS: Eric Kohl */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/rtl/rangelist.c b/reactos/ntoskrnl/rtl/rangelist.c index 3e1724768ad..788886c76f6 100644 --- a/reactos/ntoskrnl/rtl/rangelist.c +++ b/reactos/ntoskrnl/rtl/rangelist.c @@ -1,27 +1,11 @@ -/* - * ReactOS kernel - * Copyright (C) 2004 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ /* $Id$ * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * PURPOSE: Range list implementation - * FILE: ntoskrnl/rtl/rangelist.c + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/rtl/rangelist.c + * PURPOSE: Range list implementation + * + * PROGRAMMERS: No programmer listed. */ /* INCLUDES ****************************************************************/ diff --git a/reactos/ntoskrnl/rtl/regio.c b/reactos/ntoskrnl/rtl/regio.c index 23926ede4dd..826ec431daf 100644 --- a/reactos/ntoskrnl/rtl/regio.c +++ b/reactos/ntoskrnl/rtl/regio.c @@ -1,12 +1,11 @@ /* $Id$ * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: ntoskrnl/rtl/regio.c - * PURPOSE: Register io functions - * PROGRAMMER: Eric Kohl (ekohl@abo.rhein-zeitung.de) - * REVISION HISTORY: - * 29/12/1999 Created + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/rtl/regio.c + * PURPOSE: Register io functions + * + * PROGRAMMERS: Eric Kohl (ekohl@abo.rhein-zeitung.de) */ #include diff --git a/reactos/ntoskrnl/rtl/sprintf.c b/reactos/ntoskrnl/rtl/sprintf.c index b8c6c1faf25..8faa8ca70b9 100644 --- a/reactos/ntoskrnl/rtl/sprintf.c +++ b/reactos/ntoskrnl/rtl/sprintf.c @@ -4,9 +4,9 @@ * PROJECT: ReactOS kernel * FILE: ntoskrnl/rtl/sprintf.c * PURPOSE: Single byte sprintf functions + * * PROGRAMMERS: David Welch * Eric Kohl - * */ /* diff --git a/reactos/ntoskrnl/rtl/stdlib.c b/reactos/ntoskrnl/rtl/stdlib.c index 36fa2db3390..e77e58b3dff 100644 --- a/reactos/ntoskrnl/rtl/stdlib.c +++ b/reactos/ntoskrnl/rtl/stdlib.c @@ -4,9 +4,8 @@ * PROJECT: ReactOS kernel * FILE: ntoskrnl/rtl/stdlib.c * PURPOSE: Standard library functions - * PROGRAMMER: Eric Kohl (ekohl@abo.rhein-zeitung.de) - * UPDATE HISTORY: - * 1999/07/29 ekohl Created + * + * PROGRAMMERS: Eric Kohl (ekohl@abo.rhein-zeitung.de) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/rtl/string.c b/reactos/ntoskrnl/rtl/string.c index 50c45a86eb8..1def14a1f0f 100644 --- a/reactos/ntoskrnl/rtl/string.c +++ b/reactos/ntoskrnl/rtl/string.c @@ -1,11 +1,11 @@ -/* +/* $Id:$ + * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/rtl/string.c * PURPOSE: Ascii string functions - * PROGRAMMER: Eric Kohl (ekohl@abo.rhein-zeitung.de) - * UPDATE HISTORY: - * 1999/07/29 ekohl Created + * + * PROGRAMMERS: Eric Kohl (ekohl@abo.rhein-zeitung.de) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/rtl/strtok.c b/reactos/ntoskrnl/rtl/strtok.c index 7f9f8256f2f..c0e0b02f87c 100644 --- a/reactos/ntoskrnl/rtl/strtok.c +++ b/reactos/ntoskrnl/rtl/strtok.c @@ -1,11 +1,11 @@ -/* +/* $Id:$ + * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/rtl/strtok.c * PURPOSE: Unicode and thread safe implementation of strtok - * PROGRAMMER: David Welch (welch@mcmail.com) - * UPDATE HISTORY: - * Created 22/05/98 + * + * PROGRAMMERS: David Welch (welch@mcmail.com) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/rtl/swprintf.c b/reactos/ntoskrnl/rtl/swprintf.c index 7135a5435e8..b543e05f924 100644 --- a/reactos/ntoskrnl/rtl/swprintf.c +++ b/reactos/ntoskrnl/rtl/swprintf.c @@ -3,10 +3,13 @@ * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/rtl/swprintf.c - * PURPOSE: unicode sprintf functions + * PURPOSE: Unicode sprintf functions + * * PROGRAMMERS: David Welch * Eric Kohl - * + */ + +/* * TODO: * - Verify the implementation of '%Z'. */ diff --git a/reactos/ntoskrnl/rtl/wstring.c b/reactos/ntoskrnl/rtl/wstring.c index be30eb8596c..0e2939b781a 100644 --- a/reactos/ntoskrnl/rtl/wstring.c +++ b/reactos/ntoskrnl/rtl/wstring.c @@ -4,11 +4,8 @@ * PROJECT: ReactOS kernel * FILE: ntoskrnl/rtl/wstring.c * PURPOSE: Wide string functions - * PROGRAMMER: David Welch (welch@cwcom.net) - * UPDATE HISTORY: - * Created 22/05/98 - * 1998/12/04 RJJ Cleaned up and added i386 def checks. - * 1999/07/29 ekohl Added missing functions. + * + * PROGRAMMERS: David Welch (welch@cwcom.net) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/se/access.c b/reactos/ntoskrnl/se/access.c index 273de5fb776..422ec1e301b 100644 --- a/reactos/ntoskrnl/se/access.c +++ b/reactos/ntoskrnl/se/access.c @@ -1,12 +1,11 @@ /* $Id$ * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * PURPOSE: Access rights handling functions - * FILE: ntoskrnl/se/access.c - * PROGRAMER: Eric Kohl - * REVISION HISTORY: - * 07/04/2000: Created + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/se/access.c + * PURPOSE: Access rights handling functions + * + * PROGRAMMERS: Eric Kohl */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/se/acl.c b/reactos/ntoskrnl/se/acl.c index 7ad1620d3bb..bdb249ebe04 100644 --- a/reactos/ntoskrnl/se/acl.c +++ b/reactos/ntoskrnl/se/acl.c @@ -1,12 +1,11 @@ /* $Id$ * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * PURPOSE: Security manager - * FILE: kernel/se/acl.c - * PROGRAMER: David Welch - * REVISION HISTORY: - * 26/07/98: Added stubs for security functions + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/se/acl.c + * PURPOSE: Security manager + * + * PROGRAMMERS: David Welch */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/se/audit.c b/reactos/ntoskrnl/se/audit.c index 1994999069a..d65b6958b40 100644 --- a/reactos/ntoskrnl/se/audit.c +++ b/reactos/ntoskrnl/se/audit.c @@ -1,12 +1,11 @@ /* $Id$ * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * PURPOSE: Audit functions - * FILE: kernel/se/audit.c - * PROGRAMER: Eric Kohl (ekohl@rz-online.de) - * REVISION HISTORY: - * 20/07/2003: Created + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/se/audit.c + * PURPOSE: Audit functions + * + * PROGRAMMERS: Eric Kohl (ekohl@rz-online.de) */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/se/lsa.c b/reactos/ntoskrnl/se/lsa.c index 896a825cebe..3cc917170a6 100644 --- a/reactos/ntoskrnl/se/lsa.c +++ b/reactos/ntoskrnl/se/lsa.c @@ -1,4 +1,11 @@ -/* $Id$ +/* $Id:$ + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/se/lsa.c + * PURPOSE: No purpose listed. + * + * PROGRAMMERS: No programmer listed. */ #include diff --git a/reactos/ntoskrnl/se/luid.c b/reactos/ntoskrnl/se/luid.c index 88940ddb453..c3dac995355 100644 --- a/reactos/ntoskrnl/se/luid.c +++ b/reactos/ntoskrnl/se/luid.c @@ -1,12 +1,11 @@ /* $Id$ * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * PURPOSE: Security manager - * FILE: ntoskrnl/se/luid.c - * PROGRAMER: ? - * REVISION HISTORY: - * 26/07/98: Added stubs for security functions + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/se/luid.c + * PURPOSE: Security manager + * + * PROGRAMMERS: No programmer listed. */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/se/priv.c b/reactos/ntoskrnl/se/priv.c index 65e5e77a9a0..5dceff3ab93 100644 --- a/reactos/ntoskrnl/se/priv.c +++ b/reactos/ntoskrnl/se/priv.c @@ -1,12 +1,11 @@ /* $Id$ * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * PURPOSE: Security manager - * FILE: kernel/se/priv.c - * PROGRAMER: ? - * REVISION HISTORY: - * 26/07/98: Added stubs for security functions + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/se/priv.c + * PURPOSE: Security manager + * + * PROGRAMMERS: No programmer listed. */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/se/sd.c b/reactos/ntoskrnl/se/sd.c index 01afd45deff..ac62afe8340 100644 --- a/reactos/ntoskrnl/se/sd.c +++ b/reactos/ntoskrnl/se/sd.c @@ -1,12 +1,11 @@ /* $Id$ * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * PURPOSE: Security manager - * FILE: kernel/se/sd.c - * PROGRAMER: David Welch - * REVISION HISTORY: - * 26/07/98: Added stubs for security functions + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/se/sd.c + * PURPOSE: Security manager + * + * PROGRAMMERS: David Welch */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/se/semgr.c b/reactos/ntoskrnl/se/semgr.c index b5126b5a7f1..1df75460793 100644 --- a/reactos/ntoskrnl/se/semgr.c +++ b/reactos/ntoskrnl/se/semgr.c @@ -1,12 +1,11 @@ /* $Id$ * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * PURPOSE: Security manager - * FILE: kernel/se/semgr.c - * PROGRAMER: ? - * REVISION HISTORY: - * 26/07/98: Added stubs for security functions + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/se/semgr.c + * PURPOSE: Security manager + * + * PROGRAMMERS: No programmer listed. */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/se/sid.c b/reactos/ntoskrnl/se/sid.c index a067310e3b3..d925ee3df63 100644 --- a/reactos/ntoskrnl/se/sid.c +++ b/reactos/ntoskrnl/se/sid.c @@ -1,12 +1,11 @@ /* $Id$ * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * PURPOSE: Security manager - * FILE: ntoskrnl/se/sid.c - * PROGRAMER: David Welch - * REVISION HISTORY: - * 26/07/98: Added stubs for security functions + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/se/sid.c + * PURPOSE: Security manager + * + * PROGRAMMERS: David Welch */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/se/token.c b/reactos/ntoskrnl/se/token.c index 4935d0efd9d..e120e814cff 100644 --- a/reactos/ntoskrnl/se/token.c +++ b/reactos/ntoskrnl/se/token.c @@ -1,12 +1,11 @@ /* $Id$ * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * PURPOSE: Security manager - * FILE: kernel/se/token.c - * PROGRAMER: David Welch - * REVISION HISTORY: - * 26/07/98: Added stubs for security functions + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/se/token.c + * PURPOSE: Security manager + * + * PROGRAMMERS: David Welch */ /* INCLUDES *****************************************************************/ diff --git a/reactos/ntoskrnl/tests/setup.c b/reactos/ntoskrnl/tests/setup.c index 507484da7bd..184ccc9af80 100644 --- a/reactos/ntoskrnl/tests/setup.c +++ b/reactos/ntoskrnl/tests/setup.c @@ -1,3 +1,13 @@ +/* $Id:$ + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/tests/setup.c + * PURPOSE: No purpose listed. + * + * PROGRAMMERS: No programmer listed. + */ + #include #include "regtests.h" diff --git a/reactos/ntoskrnl/tests/tests/VirtualMemory.c b/reactos/ntoskrnl/tests/tests/VirtualMemory.c index e6642311f47..c6bca976d83 100644 --- a/reactos/ntoskrnl/tests/tests/VirtualMemory.c +++ b/reactos/ntoskrnl/tests/tests/VirtualMemory.c @@ -1,3 +1,13 @@ +/* $Id:$ + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: ntoskrnl/tests/tests/VirtualMemory.c + * PURPOSE: No purpose listed. + * + * PROGRAMMERS: No programmer listed. + */ + #include #include "regtests.h" From 77a7f19e4ffcc6a52562b2deae1a00c0cc9163f7 Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Wed, 26 Jan 2005 14:00:41 +0000 Subject: [PATCH 016/185] Remove RtlImageNtHeader, RtlImageDirectoryEntryToData, RtlImageRvaToSection and RtlImageRvaToVa because these function have been moved to lib/rtl/image.c. svn path=/trunk/; revision=13312 --- reactos/ntoskrnl/ldr/rtl.c | 126 ------------------------------------- 1 file changed, 126 deletions(-) diff --git a/reactos/ntoskrnl/ldr/rtl.c b/reactos/ntoskrnl/ldr/rtl.c index c54db5f70ff..dd345fcf803 100644 --- a/reactos/ntoskrnl/ldr/rtl.c +++ b/reactos/ntoskrnl/ldr/rtl.c @@ -17,132 +17,6 @@ /* FUNCTIONS ****************************************************************/ - -/* - * @implemented - */ -PIMAGE_NT_HEADERS STDCALL -RtlImageNtHeader (IN PVOID BaseAddress) -{ - PIMAGE_DOS_HEADER DosHeader; - PIMAGE_NT_HEADERS NTHeaders; - - DosHeader = (PIMAGE_DOS_HEADER)BaseAddress; - NTHeaders = (PIMAGE_NT_HEADERS)((char*)BaseAddress + DosHeader->e_lfanew); - if ((DosHeader->e_magic != IMAGE_DOS_SIGNATURE) - || (DosHeader->e_lfanew == 0L) - || (*(PULONG) NTHeaders != IMAGE_NT_SIGNATURE)) - { - return(NULL); - } - return(NTHeaders); -} - - -/* - * @implemented - */ -PVOID STDCALL -RtlImageDirectoryEntryToData (IN PVOID BaseAddress, - IN BOOLEAN ImageLoaded, - IN ULONG Directory, - OUT PULONG Size) -{ - PIMAGE_NT_HEADERS NtHeader; - PIMAGE_SECTION_HEADER SectionHeader; - ULONG Va; - ULONG Count; - - NtHeader = RtlImageNtHeader (BaseAddress); - if (NtHeader == NULL) - return NULL; - - if (Directory >= NtHeader->OptionalHeader.NumberOfRvaAndSizes) - return NULL; - - Va = NtHeader->OptionalHeader.DataDirectory[Directory].VirtualAddress; - if (Va == 0) - return NULL; - - if (Size) - *Size = NtHeader->OptionalHeader.DataDirectory[Directory].Size; - - if (ImageLoaded) - return (PVOID)((char*)BaseAddress + Va); - - /* image mapped as ordinary file, we must find raw pointer */ - SectionHeader = (PIMAGE_SECTION_HEADER)(NtHeader + 1); - Count = NtHeader->FileHeader.NumberOfSections; - while (Count--) - { - if (SectionHeader->VirtualAddress == Va) - return (PVOID)((char*)BaseAddress + SectionHeader->PointerToRawData); - SectionHeader++; - } - - return NULL; -} - - -PIMAGE_SECTION_HEADER -STDCALL -RtlImageRvaToSection ( - PIMAGE_NT_HEADERS NtHeader, - PVOID BaseAddress, - ULONG Rva - ) -{ - PIMAGE_SECTION_HEADER Section; - ULONG Va; - ULONG Count; - - Count = NtHeader->FileHeader.NumberOfSections; - Section = (PIMAGE_SECTION_HEADER)((ULONG)&NtHeader->OptionalHeader + - NtHeader->FileHeader.SizeOfOptionalHeader); - while (Count) - { - Va = Section->VirtualAddress; - if ((Va <= Rva) && - (Rva < Va + Section->SizeOfRawData)) - return Section; - Section++; - } - return NULL; -} - - -ULONG -STDCALL -RtlImageRvaToVa ( - PIMAGE_NT_HEADERS NtHeader, - PVOID BaseAddress, - ULONG Rva, - PIMAGE_SECTION_HEADER *SectionHeader - ) -{ - PIMAGE_SECTION_HEADER Section = NULL; - - if (SectionHeader) - Section = *SectionHeader; - - if (Section == NULL || - Rva < Section->VirtualAddress || - Rva >= Section->VirtualAddress + Section->SizeOfRawData) - { - Section = RtlImageRvaToSection (NtHeader, BaseAddress, Rva); - if (Section == NULL) - return 0; - - if (SectionHeader) - *SectionHeader = Section; - } - - return (ULONG)((char*)BaseAddress + - Rva + - Section->PointerToRawData - - Section->VirtualAddress); -} - #define RVA(m, b) ((ULONG)b + m) NTSTATUS STDCALL From a2ea8e6fef511feb4bfdb5e0740c73ce14787a6c Mon Sep 17 00:00:00 2001 From: Thomas Bluemel Date: Wed, 26 Jan 2005 14:15:38 +0000 Subject: [PATCH 017/185] Fixed GetTempPathA/W and GetCurrentDirectoryA/W. Patch by tinus, Eric Kohl and me, fixes bug #482 svn path=/trunk/; revision=13313 --- reactos/lib/kernel32/file/curdir.c | 164 ++++++++++++++++++++--------- 1 file changed, 113 insertions(+), 51 deletions(-) diff --git a/reactos/lib/kernel32/file/curdir.c b/reactos/lib/kernel32/file/curdir.c index c3730694b9d..be9d32b4252 100644 --- a/reactos/lib/kernel32/file/curdir.c +++ b/reactos/lib/kernel32/file/curdir.c @@ -37,6 +37,7 @@ GetCurrentDirectoryA ( { ANSI_STRING AnsiString; UNICODE_STRING UnicodeString; + ULONG Length; /* allocate buffer for unicode string */ UnicodeString.Length = 0; @@ -56,33 +57,48 @@ GetCurrentDirectoryA ( { UnicodeString.Buffer = NULL; } + /* get current directory */ UnicodeString.Length = RtlGetCurrentDirectory_U (UnicodeString.MaximumLength, UnicodeString.Buffer); - if (nBufferLength > 0) + DPRINT("UnicodeString.Buffer %wZ\n", &UnicodeString); + + /* convert unicode string to ansi (or oem) */ + if (bIsFileApiAnsi) { - DPRINT("UnicodeString.Buffer %wZ\n", &UnicodeString); - - /* convert unicode string to ansi (or oem) */ - if (bIsFileApiAnsi) - RtlUnicodeStringToAnsiString (&AnsiString, - &UnicodeString, - FALSE); - else - RtlUnicodeStringToOemString (&AnsiString, - &UnicodeString, - FALSE); - DPRINT("AnsiString.Buffer %s\n", AnsiString.Buffer); - - /* free unicode string */ - RtlFreeHeap (RtlGetProcessHeap (), - 0, - UnicodeString.Buffer); + Length = RtlUnicodeStringToAnsiSize (&UnicodeString); + if (Length > nBufferLength) + { + RtlFreeHeap (RtlGetProcessHeap (), + 0, + UnicodeString.Buffer); + return Length-1; + } + RtlUnicodeStringToAnsiString (&AnsiString, + &UnicodeString, + FALSE); } else { - AnsiString.Length = UnicodeString.Length / sizeof(WCHAR); + Length = RtlUnicodeStringToOemSize (&UnicodeString); + if (Length > nBufferLength) + { + RtlFreeHeap (RtlGetProcessHeap (), + 0, + UnicodeString.Buffer); + return Length-1; + } + RtlUnicodeStringToOemString (&AnsiString, + &UnicodeString, + FALSE); } + DPRINT("AnsiString.Buffer %s\n", AnsiString.Buffer); + + /* free unicode string */ + RtlFreeHeap (RtlGetProcessHeap (), + 0, + UnicodeString.Buffer); + return AnsiString.Length; } @@ -184,6 +200,7 @@ GetTempPathA ( { UNICODE_STRING UnicodeString; ANSI_STRING AnsiString; + DWORD Length; AnsiString.Length = 0; AnsiString.MaximumLength = nBufferLength; @@ -191,30 +208,50 @@ GetTempPathA ( /* initialize allocate unicode string */ UnicodeString.Length = 0; - UnicodeString.MaximumLength = nBufferLength * sizeof(WCHAR); - UnicodeString.Buffer = RtlAllocateHeap (RtlGetProcessHeap(), - 0, - UnicodeString.MaximumLength); - - UnicodeString.Length = GetTempPathW (nBufferLength, - UnicodeString.Buffer) * sizeof(WCHAR); - - /* convert unicode string to ansi (or oem) */ - if (bIsFileApiAnsi) - RtlUnicodeStringToAnsiString (&AnsiString, - &UnicodeString, - FALSE); + if(nBufferLength > 0) + { + UnicodeString.MaximumLength = (nBufferLength + 1) * sizeof(WCHAR); + UnicodeString.Buffer = RtlAllocateHeap (RtlGetProcessHeap (), + 0, + UnicodeString.MaximumLength); + if (UnicodeString.Buffer == NULL) + { + SetLastError(ERROR_NOT_ENOUGH_MEMORY); + return 0; + } + } else - RtlUnicodeStringToOemString (&AnsiString, - &UnicodeString, - FALSE); + { + UnicodeString.MaximumLength = 0; + UnicodeString.Buffer = NULL; + } + + Length = GetTempPathW (nBufferLength, + UnicodeString.Buffer); + + if (nBufferLength >= Length) + { + /* only touch the buffer if the supplied buffer length is at least + the length that GetTempPathW returned! */ + UnicodeString.Length = Length * sizeof(WCHAR); + + /* convert unicode string to ansi (or oem) */ + if (bIsFileApiAnsi) + RtlUnicodeStringToAnsiString (&AnsiString, + &UnicodeString, + FALSE); + else + RtlUnicodeStringToOemString (&AnsiString, + &UnicodeString, + FALSE); + } /* free unicode string buffer */ RtlFreeHeap (RtlGetProcessHeap (), 0, UnicodeString.Buffer); - return AnsiString.Length; + return Length; } @@ -229,42 +266,67 @@ GetTempPathW ( ) { UNICODE_STRING Name; - UNICODE_STRING Value; + PUNICODE_STRING Value; + PTEB Teb; + DWORD Length; NTSTATUS Status; - Value.Length = 0; - Value.MaximumLength = (nBufferLength - 1) * sizeof(WCHAR); - Value.Buffer = lpBuffer; + Teb = NtCurrentTeb(); + Teb->StaticUnicodeString.Length = 0; + Teb->StaticUnicodeString.MaximumLength = MAX_PATH * sizeof(WCHAR); + Teb->StaticUnicodeString.Buffer = Teb->StaticUnicodeBuffer; + Value = &Teb->StaticUnicodeString; RtlRosInitUnicodeStringFromLiteral (&Name, - L"TMP"); + L"TMP"); Status = RtlQueryEnvironmentVariable_U (NULL, &Name, - &Value); + Value); if (!NT_SUCCESS(Status) && Status != STATUS_BUFFER_TOO_SMALL) { RtlRosInitUnicodeStringFromLiteral (&Name, - L"TEMP"); + L"TEMP"); Status = RtlQueryEnvironmentVariable_U (NULL, &Name, - &Value); - + Value); if (!NT_SUCCESS(Status) && Status != STATUS_BUFFER_TOO_SMALL) { - Value.Length = RtlGetCurrentDirectory_U (Value.MaximumLength, - Value.Buffer); + Value->Length = RtlGetCurrentDirectory_U(Value->MaximumLength, + Value->Buffer); } } - if (NT_SUCCESS(Status)) + if (!NT_SUCCESS(Status)) { - lpBuffer[Value.Length / sizeof(WCHAR)] = L'\\'; - lpBuffer[Value.Length / sizeof(WCHAR) + 1] = 0; + SetLastError(RtlNtStatusToDosError(Status)); + return 0; } - return Value.Length / sizeof(WCHAR) + 1; + Length = Value->Length / sizeof(WCHAR) + 1; + if (nBufferLength < Value->Length / sizeof(WCHAR) + 2) + Length++; + + if (lpBuffer != NULL) + { + if (nBufferLength < Value->Length / sizeof(WCHAR) + 2) + { + memcpy (lpBuffer, + Value->Buffer, + nBufferLength * sizeof(WCHAR)); + } + else + { + memcpy (lpBuffer, + Value->Buffer, + Value->Length); + lpBuffer[Value->Length / sizeof(WCHAR)] = L'\\'; + lpBuffer[Value->Length / sizeof(WCHAR) + 1] = 0; + } + } + + return Length; } From 87e84448dbaee57b27e2823d5a532a750f468743 Mon Sep 17 00:00:00 2001 From: Thomas Bluemel Date: Wed, 26 Jan 2005 14:38:27 +0000 Subject: [PATCH 018/185] NtCreatePagingFile() should release the captured unicode string even if probing the other parameters failed svn path=/trunk/; revision=13314 --- reactos/ntoskrnl/mm/pagefile.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/reactos/ntoskrnl/mm/pagefile.c b/reactos/ntoskrnl/mm/pagefile.c index 7cc3d347033..649157b7f4b 100644 --- a/reactos/ntoskrnl/mm/pagefile.c +++ b/reactos/ntoskrnl/mm/pagefile.c @@ -757,15 +757,7 @@ NtCreatePagingFile(IN PUNICODE_STRING FileName, } PreviousMode = ExGetPreviousMode(); - Status = RtlCaptureUnicodeString(&CapturedFileName, - PreviousMode, - PagedPool, - FALSE, - FileName); - if (!NT_SUCCESS(Status)) - { - return(Status); - } + if (PreviousMode == UserMode) { _SEH_TRY @@ -795,6 +787,16 @@ NtCreatePagingFile(IN PUNICODE_STRING FileName, SafeInitialSize = *InitialSize; SafeMaximumSize = *MaximumSize; } + + Status = RtlCaptureUnicodeString(&CapturedFileName, + PreviousMode, + PagedPool, + FALSE, + FileName); + if (!NT_SUCCESS(Status)) + { + return(Status); + } InitializeObjectAttributes(&ObjectAttributes, &CapturedFileName, From a3d5e1cf556984bcc7176fc814471dca6cfb0163 Mon Sep 17 00:00:00 2001 From: Thomas Bluemel Date: Wed, 26 Jan 2005 17:53:01 +0000 Subject: [PATCH 019/185] Heap32ListFirst() should check the number of heaps in the list, not the numer of modules svn path=/trunk/; revision=13315 --- reactos/lib/kernel32/misc/toolhelp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/lib/kernel32/misc/toolhelp.c b/reactos/lib/kernel32/misc/toolhelp.c index 9d2bb1a0df8..0ccb5f67da5 100644 --- a/reactos/lib/kernel32/misc/toolhelp.c +++ b/reactos/lib/kernel32/misc/toolhelp.c @@ -550,7 +550,7 @@ Heap32ListFirst(HANDLE hSnapshot, LPHEAPLIST32 lphl) { BOOL Ret; - if(Snapshot->ModuleListCount > 0) + if(Snapshot->HeapListCount > 0) { LPHEAPLIST32 Entries = (LPHEAPLIST32)OffsetToPtr(Snapshot, Snapshot->HeapListOffset); Snapshot->HeapListIndex = 1; From 92ce1ebfdc86e3940c5f6a40d46277d74e32c537 Mon Sep 17 00:00:00 2001 From: Thomas Bluemel Date: Wed, 26 Jan 2005 17:54:26 +0000 Subject: [PATCH 020/185] don't return a random status code in case of probing failed, initialize the Status variable first svn path=/trunk/; revision=13316 --- reactos/ntoskrnl/mm/pagefile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/ntoskrnl/mm/pagefile.c b/reactos/ntoskrnl/mm/pagefile.c index 649157b7f4b..887c5f49fe7 100644 --- a/reactos/ntoskrnl/mm/pagefile.c +++ b/reactos/ntoskrnl/mm/pagefile.c @@ -726,7 +726,6 @@ NtCreatePagingFile(IN PUNICODE_STRING FileName, IN PLARGE_INTEGER MaximumSize, IN ULONG Reserved) { - NTSTATUS Status; OBJECT_ATTRIBUTES ObjectAttributes; HANDLE FileHandle; IO_STATUS_BLOCK IoStatus; @@ -747,6 +746,7 @@ NtCreatePagingFile(IN PUNICODE_STRING FileName, KPROCESSOR_MODE PreviousMode; UNICODE_STRING CapturedFileName; LARGE_INTEGER SafeInitialSize, SafeMaximumSize; + NTSTATUS Status = STATUS_SUCCESS; DPRINT("NtCreatePagingFile(FileName %wZ, InitialSize %I64d)\n", FileName, InitialSize->QuadPart); From 66af63e1c77b9f5374d3cf9a328f4390e9190fc6 Mon Sep 17 00:00:00 2001 From: Thomas Bluemel Date: Wed, 26 Jan 2005 19:19:07 +0000 Subject: [PATCH 021/185] fixed typo, "fixes" bug 486 svn path=/trunk/; revision=13317 --- reactos/media/drivers/etc/services | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/media/drivers/etc/services b/reactos/media/drivers/etc/services index 3fc6e36df6f..2e2b549148a 100644 --- a/reactos/media/drivers/etc/services +++ b/reactos/media/drivers/etc/services @@ -2,7 +2,7 @@ # # This file contains port numbers for well-known services defined by IANA # -# The Well Known Ports are thuse from 0 through 1023 +# The Well Known Ports are those from 0 through 1023 # The Registered Ports are those from 1024 through 49151 # The Dynamic and/or Private Ports are those from 49152 through 65535 # From 5d781df3254b11570bce70019e20bce6a137b353 Mon Sep 17 00:00:00 2001 From: Steven Edwards Date: Wed, 26 Jan 2005 19:22:37 +0000 Subject: [PATCH 022/185] fix resouce compiling on cross-compile svn path=/trunk/; revision=13318 --- reactos/subsys/system/ibrowser/ibrowser_intres.rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/subsys/system/ibrowser/ibrowser_intres.rc b/reactos/subsys/system/ibrowser/ibrowser_intres.rc index 60a97e0c94e..bdf80344995 100644 --- a/reactos/subsys/system/ibrowser/ibrowser_intres.rc +++ b/reactos/subsys/system/ibrowser/ibrowser_intres.rc @@ -212,7 +212,7 @@ IDI_FAVORITES ICON DISCARDABLE "res/favorites.ico" IDI_DOT ICON DISCARDABLE "res/dot.ico" IDI_DOT_TRANS ICON DISCARDABLE "res/dot_trans.ico" IDI_DOT_RED ICON DISCARDABLE "res/dot_red.ico" -IDI_IBROWSER ICON DISCARDABLE "res\\ibrowser.ico" +IDI_IBROWSER ICON DISCARDABLE "res/ibrowser.ico" ///////////////////////////////////////////////////////////////////////////// // From b142dbd5d2fab10d46ee3ed17541e3b763b26c73 Mon Sep 17 00:00:00 2001 From: Hartmut Birr Date: Wed, 26 Jan 2005 19:43:03 +0000 Subject: [PATCH 023/185] - Fixed a crash in PAE mode and without the '/3GB' switch. svn path=/trunk/; revision=13319 --- reactos/ntoskrnl/mm/i386/page.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/ntoskrnl/mm/i386/page.c b/reactos/ntoskrnl/mm/i386/page.c index 147aec8776f..aef0d0a11c8 100644 --- a/reactos/ntoskrnl/mm/i386/page.c +++ b/reactos/ntoskrnl/mm/i386/page.c @@ -258,7 +258,7 @@ NTSTATUS Mmi386ReleaseMmInfo(PEPROCESS Process) } } } - else + if (i == PAE_ADDR_TO_PDTE_OFFSET(HYPERSPACE)) { MmReleasePageMemoryConsumer(MC_NPPOOL, PAE_PTE_TO_PFN(PageDir[PAE_ADDR_TO_PDE_PAGE_OFFSET(HYPERSPACE)])); MmReleasePageMemoryConsumer(MC_NPPOOL, PAE_PTE_TO_PFN(PageDir[PAE_ADDR_TO_PDE_PAGE_OFFSET(HYPERSPACE)+1])); From c05831ef5fa1de67c75ac2cfd53f3e03c1e88f5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20van=20Geldorp?= Date: Wed, 26 Jan 2005 20:31:05 +0000 Subject: [PATCH 024/185] =?UTF-8?q?Herv=C3=A9=20Poussineau=20=20Replace=20GET=5FRETRIEVAL=5FDESCRIPTOR=20structure?= =?UTF-8?q?=20(undocumented)=20by=20RETRIEVAL=5FPOINTERS=5FBUFFER.=20Corre?= =?UTF-8?q?ct=20alignment=20for=20some=20structures?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit svn path=/trunk/; revision=13321 --- reactos/include/ntos/zw.h | 12 ++-- reactos/include/ntos/zwtypes.h | 42 +++-------- reactos/ntoskrnl/mm/pagefile.c | 108 +++++++++++++++++------------ reactos/w32api/include/ddk/ntifs.h | 2 + 4 files changed, 80 insertions(+), 84 deletions(-) diff --git a/reactos/include/ntos/zw.h b/reactos/include/ntos/zw.h index 07890fec1f8..5afa4421dc8 100755 --- a/reactos/include/ntos/zw.h +++ b/reactos/include/ntos/zw.h @@ -1485,14 +1485,14 @@ NTSTATUS STDCALL ZwFreeVirtualMemory(IN HANDLE ProcessHandle, * IoStatusBlock = Caller should supply storage for * IoControlCode = Contains the File System Control command. This is an * index to the structures in InputBuffer and OutputBuffer. - * FSCTL_GET_RETRIEVAL_POINTERS MAPPING_PAIR - * FSCTL_GET_RETRIEVAL_POINTERS GET_RETRIEVAL_DESCRIPTOR - * FSCTL_GET_VOLUME_BITMAP BITMAP_DESCRIPTOR - * FSCTL_MOVE_FILE MOVEFILE_DESCRIPTOR + * FSCTL_GET_RETRIEVAL_POINTERS [Input/Output] RETRIEVAL_POINTERS_BUFFER + * FSCTL_GET_VOLUME_BITMAP [Input] STARTING_LCN_INPUT_BUFFER + * FSCTL_GET_VOLUME_BITMAP [Output] VOLUME_BITMAP_BUFFER + * FSCTL_MOVE_FILE [Input] MOVE_FILE_DATA * - * InputBuffer = Caller should supply storage for input buffer if FCTL expects one. + * InputBuffer = Caller should supply storage for input buffer if FSCTL expects one. * InputBufferSize = Size of the input bufffer - * OutputBuffer = Caller should supply storage for output buffer if FCTL expects one. + * OutputBuffer = Caller should supply storage for output buffer if FSCTL expects one. * OutputBufferSize = Size of the input bufffer * RETURNS: Status [ STATUS_SUCCESS | STATUS_PENDING | STATUS_ACCESS_DENIED | STATUS_INSUFFICIENT_RESOURCES | * STATUS_INVALID_PARAMETER | STATUS_INVALID_DEVICE_REQUEST ] diff --git a/reactos/include/ntos/zwtypes.h b/reactos/include/ntos/zwtypes.h index 4b9c1b73d65..067ed8bb132 100755 --- a/reactos/include/ntos/zwtypes.h +++ b/reactos/include/ntos/zwtypes.h @@ -1111,32 +1111,18 @@ typedef struct _FILE_NOTIFY_INFORMATION { #define FSCTL_GET_RETRIEVAL_POINTERS 0x90073 #define FSCTL_MOVE_FILE 0x90074 -typedef struct _MAPPING_PAIR -{ - ULONGLONG Vcn; - ULONGLONG Lcn; -} MAPPING_PAIR, *PMAPPING_PAIR; - -/* Must match RETRIEVAL_POINTERS_BUFFER (ntifs.h) */ -#include -typedef struct _GET_RETRIEVAL_DESCRIPTOR -{ - ULONG NumberOfPairs; - ULONGLONG StartVcn; - MAPPING_PAIR Pair[0]; // variable size -} GET_RETRIEVAL_DESCRIPTOR, *PGET_RETRIEVAL_DESCRIPTOR; +/* Structure copied from ntifs.h (Must be in sync!) */ +#include +typedef struct _RETRIEVAL_POINTERS_BUFFER { + ULONG ExtentCount; + LARGE_INTEGER StartingVcn; + struct { + LARGE_INTEGER NextVcn; + LARGE_INTEGER Lcn; + } Extents[1]; +} RETRIEVAL_POINTERS_BUFFER, *PRETRIEVAL_POINTERS_BUFFER; #include -typedef struct _MOVEFILE_DESCRIPTOR -{ - HANDLE FileHandle; - ULONG Reserved; - LARGE_INTEGER StartVcn; - LARGE_INTEGER TargetLcn; - ULONG NumVcns; - ULONG Reserved1; -} MOVEFILE_DESCRIPTOR, *PMOVEFILE_DESCRIPTOR; - typedef struct _SECTION_BASIC_INFORMATION { PVOID BaseAddress; @@ -1723,14 +1709,6 @@ typedef enum _POWER_INFORMATION_LEVEL { #define FSCTL_READ_MFT_RECORD 0x90068 // NTFS only -typedef struct _BITMAP_DESCRIPTOR -{ - ULONGLONG StartLcn; - ULONGLONG ClustersToEndOfVol; - BYTE Map[0]; // variable size -} BITMAP_DESCRIPTOR, *PBITMAP_DESCRIPTOR; - - //typedef enum _TIMER_TYPE //{ // NotificationTimer, diff --git a/reactos/ntoskrnl/mm/pagefile.c b/reactos/ntoskrnl/mm/pagefile.c index 887c5f49fe7..c700d2c5251 100644 --- a/reactos/ntoskrnl/mm/pagefile.c +++ b/reactos/ntoskrnl/mm/pagefile.c @@ -1,11 +1,29 @@ +/* + * ReactOS kernel + * Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ /* $Id$ * - * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/mm/pagefile.c * PURPOSE: Paging file functions - * - * PROGRAMMERS: David Welch (welch@mcmail.com) + * PROGRAMMER: David Welch (welch@mcmail.com) + * UPDATE HISTORY: + * Created 22/05/98 */ /* INCLUDES *****************************************************************/ @@ -27,14 +45,14 @@ typedef struct _PAGINGFILE PULONG AllocMap; KSPIN_LOCK AllocMapLock; ULONG AllocMapSize; - PGET_RETRIEVAL_DESCRIPTOR RetrievalPointers; + PRETRIEVAL_POINTERS_BUFFER RetrievalPointers; } PAGINGFILE, *PPAGINGFILE; typedef struct _RETRIEVEL_DESCRIPTOR_LIST { struct _RETRIEVEL_DESCRIPTOR_LIST* Next; - GET_RETRIEVAL_DESCRIPTOR RetrievalPointers; + RETRIEVAL_POINTERS_BUFFER RetrievalPointers; } RETRIEVEL_DESCRIPTOR_LIST, *PRETRIEVEL_DESCRIPTOR_LIST; @@ -110,27 +128,27 @@ MmShowOutOfSpaceMessagePagingFile(VOID) } LARGE_INTEGER STATIC -MmGetOffsetPageFile(PGET_RETRIEVAL_DESCRIPTOR RetrievalPointers, LARGE_INTEGER Offset) +MmGetOffsetPageFile(PRETRIEVAL_POINTERS_BUFFER RetrievalPointers, LARGE_INTEGER Offset) { /* Simple binary search */ ULONG first, last, mid; first = 0; - last = RetrievalPointers->NumberOfPairs - 1; + last = RetrievalPointers->ExtentCount - 1; while (first <= last) { mid = (last - first) / 2 + first; - if ((ULONGLONG) Offset.QuadPart < RetrievalPointers->Pair[mid].Vcn) + if (Offset.QuadPart < RetrievalPointers->Extents[mid].NextVcn.QuadPart) { if (mid == 0) { - Offset.QuadPart += RetrievalPointers->Pair[0].Lcn - RetrievalPointers->StartVcn; + Offset.QuadPart += RetrievalPointers->Extents[0].Lcn.QuadPart - RetrievalPointers->StartingVcn.QuadPart; return Offset; } else { - if ((ULONGLONG) Offset.QuadPart >= RetrievalPointers->Pair[mid-1].Vcn) + if (Offset.QuadPart >= RetrievalPointers->Extents[mid-1].NextVcn.QuadPart) { - Offset.QuadPart += RetrievalPointers->Pair[mid].Lcn - RetrievalPointers->Pair[mid-1].Vcn; + Offset.QuadPart += RetrievalPointers->Extents[mid].Lcn.QuadPart - RetrievalPointers->Extents[mid-1].NextVcn.QuadPart; return Offset; } last = mid - 1; @@ -138,13 +156,13 @@ MmGetOffsetPageFile(PGET_RETRIEVAL_DESCRIPTOR RetrievalPointers, LARGE_INTEGER O } else { - if (mid == RetrievalPointers->NumberOfPairs - 1) + if (mid == RetrievalPointers->ExtentCount - 1) { break; } - if ((ULONGLONG) Offset.QuadPart < RetrievalPointers->Pair[mid+1].Vcn) + if (Offset.QuadPart < RetrievalPointers->Extents[mid+1].NextVcn.QuadPart) { - Offset.QuadPart += RetrievalPointers->Pair[mid+1].Lcn - RetrievalPointers->Pair[mid].Vcn; + Offset.QuadPart += RetrievalPointers->Extents[mid+1].Lcn.QuadPart - RetrievalPointers->Extents[mid].NextVcn.QuadPart; return Offset; } first = mid + 1; @@ -453,7 +471,7 @@ MmAllocRetrievelDescriptorList(ULONG Pairs) ULONG Size; PRETRIEVEL_DESCRIPTOR_LIST RetDescList; - Size = sizeof(RETRIEVEL_DESCRIPTOR_LIST) + Pairs * sizeof(MAPPING_PAIR); + Size = sizeof(RETRIEVEL_DESCRIPTOR_LIST) + Pairs * 2 * sizeof(LARGE_INTEGER); RetDescList = ExAllocatePool(NonPagedPool, Size); if (RetDescList) { @@ -480,7 +498,7 @@ MmDumpToPagingFile(ULONG BugCode, PULONG MdlMap; LONGLONG NextOffset = 0; ULONG i; - PGET_RETRIEVAL_DESCRIPTOR RetrievalPointers; + PRETRIEVAL_POINTERS_BUFFER RetrievalPointers; LARGE_INTEGER DiskOffset; if (MmCoreDumpPageFile == 0xFFFFFFFF) @@ -726,6 +744,7 @@ NtCreatePagingFile(IN PUNICODE_STRING FileName, IN PLARGE_INTEGER MaximumSize, IN ULONG Reserved) { + NTSTATUS Status; OBJECT_ATTRIBUTES ObjectAttributes; HANDLE FileHandle; IO_STATUS_BLOCK IoStatus; @@ -740,13 +759,12 @@ NtCreatePagingFile(IN PUNICODE_STRING FileName, ULONG BytesPerAllocationUnit; LARGE_INTEGER Vcn; ULONG ExtentCount; - ULONG MaxVcn; + LARGE_INTEGER MaxVcn; ULONG Count; ULONG Size; KPROCESSOR_MODE PreviousMode; UNICODE_STRING CapturedFileName; LARGE_INTEGER SafeInitialSize, SafeMaximumSize; - NTSTATUS Status = STATUS_SUCCESS; DPRINT("NtCreatePagingFile(FileName %wZ, InitialSize %I64d)\n", FileName, InitialSize->QuadPart); @@ -757,7 +775,15 @@ NtCreatePagingFile(IN PUNICODE_STRING FileName, } PreviousMode = ExGetPreviousMode(); - + Status = RtlCaptureUnicodeString(&CapturedFileName, + PreviousMode, + PagedPool, + FALSE, + FileName); + if (!NT_SUCCESS(Status)) + { + return(Status); + } if (PreviousMode == UserMode) { _SEH_TRY @@ -787,16 +813,6 @@ NtCreatePagingFile(IN PUNICODE_STRING FileName, SafeInitialSize = *InitialSize; SafeMaximumSize = *MaximumSize; } - - Status = RtlCaptureUnicodeString(&CapturedFileName, - PreviousMode, - PagedPool, - FALSE, - FileName); - if (!NT_SUCCESS(Status)) - { - return(Status); - } InitializeObjectAttributes(&ObjectAttributes, &CapturedFileName, @@ -884,7 +900,7 @@ NtCreatePagingFile(IN PUNICODE_STRING FileName, #endif ExtentCount = 0; - MaxVcn = (ULONG)((SafeInitialSize.QuadPart + BytesPerAllocationUnit - 1) / BytesPerAllocationUnit); + MaxVcn.QuadPart = (SafeInitialSize.QuadPart + BytesPerAllocationUnit - 1) / BytesPerAllocationUnit; while(1) { Status = ZwFsControlFile(FileHandle, @@ -896,7 +912,7 @@ NtCreatePagingFile(IN PUNICODE_STRING FileName, &Vcn, sizeof(LARGE_INTEGER), &CurrentRetDescList->RetrievalPointers, - sizeof(GET_RETRIEVAL_DESCRIPTOR) + PAIRS_PER_RUN * sizeof(MAPPING_PAIR)); + sizeof(RETRIEVAL_POINTERS_BUFFER) + PAIRS_PER_RUN * 2 * sizeof(LARGE_INTEGER)); if (!NT_SUCCESS(Status)) { while (RetDescList) @@ -909,8 +925,8 @@ NtCreatePagingFile(IN PUNICODE_STRING FileName, ZwClose(FileHandle); return(Status); } - ExtentCount += CurrentRetDescList->RetrievalPointers.NumberOfPairs; - if ((ULONG)CurrentRetDescList->RetrievalPointers.Pair[CurrentRetDescList->RetrievalPointers.NumberOfPairs-1].Vcn < MaxVcn) + ExtentCount += CurrentRetDescList->RetrievalPointers.ExtentCount; + if (CurrentRetDescList->RetrievalPointers.Extents[CurrentRetDescList->RetrievalPointers.ExtentCount-1].NextVcn.QuadPart < MaxVcn.QuadPart) { CurrentRetDescList->Next = MmAllocRetrievelDescriptorList(PAIRS_PER_RUN); if (CurrentRetDescList->Next == NULL) @@ -925,7 +941,7 @@ NtCreatePagingFile(IN PUNICODE_STRING FileName, ZwClose(FileHandle); return(STATUS_NO_MEMORY); } - Vcn.QuadPart = CurrentRetDescList->RetrievalPointers.Pair[CurrentRetDescList->RetrievalPointers.NumberOfPairs-1].Vcn; + Vcn = CurrentRetDescList->RetrievalPointers.Extents[CurrentRetDescList->RetrievalPointers.ExtentCount-1].NextVcn; CurrentRetDescList = CurrentRetDescList->Next; } else @@ -976,7 +992,7 @@ NtCreatePagingFile(IN PUNICODE_STRING FileName, return(STATUS_NO_MEMORY); } DPRINT("ExtentCount: %d\n", ExtentCount); - Size = sizeof(GET_RETRIEVAL_DESCRIPTOR) + ExtentCount * sizeof(MAPPING_PAIR); + Size = sizeof(RETRIEVAL_POINTERS_BUFFER) + ExtentCount * 2 * sizeof(LARGE_INTEGER); PagingFile->RetrievalPointers = ExAllocatePool(NonPagedPool, Size); if (PagingFile->RetrievalPointers == NULL) { @@ -997,22 +1013,22 @@ NtCreatePagingFile(IN PUNICODE_STRING FileName, RtlZeroMemory(PagingFile->RetrievalPointers, Size); Count = 0; - PagingFile->RetrievalPointers->NumberOfPairs = ExtentCount; - PagingFile->RetrievalPointers->StartVcn = RetDescList->RetrievalPointers.StartVcn; + PagingFile->RetrievalPointers->ExtentCount = ExtentCount; + PagingFile->RetrievalPointers->StartingVcn = RetDescList->RetrievalPointers.StartingVcn; CurrentRetDescList = RetDescList; while (CurrentRetDescList) { - memcpy(&PagingFile->RetrievalPointers->Pair[Count], - CurrentRetDescList->RetrievalPointers.Pair, - CurrentRetDescList->RetrievalPointers.NumberOfPairs * sizeof(MAPPING_PAIR)); - Count += CurrentRetDescList->RetrievalPointers.NumberOfPairs; + memcpy(&PagingFile->RetrievalPointers->Extents[Count], + CurrentRetDescList->RetrievalPointers.Extents, + CurrentRetDescList->RetrievalPointers.ExtentCount * 2 * sizeof(LARGE_INTEGER)); + Count += CurrentRetDescList->RetrievalPointers.ExtentCount; RetDescList = CurrentRetDescList; CurrentRetDescList = CurrentRetDescList->Next; ExFreePool(RetDescList); } - if (PagingFile->RetrievalPointers->NumberOfPairs != ExtentCount || - (ULONG)PagingFile->RetrievalPointers->Pair[ExtentCount - 1].Vcn != MaxVcn) + if (PagingFile->RetrievalPointers->ExtentCount != ExtentCount || + PagingFile->RetrievalPointers->Extents[ExtentCount - 1].NextVcn.QuadPart != MaxVcn.QuadPart) { ExFreePool(PagingFile->RetrievalPointers); ExFreePool(PagingFile->AllocMap); @@ -1025,11 +1041,11 @@ NtCreatePagingFile(IN PUNICODE_STRING FileName, /* * Change the entries from lcn's to volume offset's. */ - PagingFile->RetrievalPointers->StartVcn *= BytesPerAllocationUnit; + PagingFile->RetrievalPointers->StartingVcn.QuadPart *= BytesPerAllocationUnit; for (i = 0; i < ExtentCount; i++) { - PagingFile->RetrievalPointers->Pair[i].Lcn *= BytesPerAllocationUnit; - PagingFile->RetrievalPointers->Pair[i].Vcn *= BytesPerAllocationUnit; + PagingFile->RetrievalPointers->Extents[i].Lcn.QuadPart *= BytesPerAllocationUnit; + PagingFile->RetrievalPointers->Extents[i].NextVcn.QuadPart *= BytesPerAllocationUnit; } KeAcquireSpinLock(&PagingFileListLock, &oldIrql); diff --git a/reactos/w32api/include/ddk/ntifs.h b/reactos/w32api/include/ddk/ntifs.h index 5db5f5b568a..fe7bb9922d0 100644 --- a/reactos/w32api/include/ddk/ntifs.h +++ b/reactos/w32api/include/ddk/ntifs.h @@ -1406,6 +1406,7 @@ typedef struct _QUERY_PATH_RESPONSE { ULONG LengthAccepted; } QUERY_PATH_RESPONSE, *PQUERY_PATH_RESPONSE; +#pragma pack(push,8) typedef struct _RETRIEVAL_POINTERS_BUFFER { ULONG ExtentCount; LARGE_INTEGER StartingVcn; @@ -1414,6 +1415,7 @@ typedef struct _RETRIEVAL_POINTERS_BUFFER { LARGE_INTEGER Lcn; } Extents[1]; } RETRIEVAL_POINTERS_BUFFER, *PRETRIEVAL_POINTERS_BUFFER; +#pragma pack(pop) typedef struct _RTL_SPLAY_LINKS { struct _RTL_SPLAY_LINKS *Parent; From 0053497f8242ff964bd380446e84d6754b5d8179 Mon Sep 17 00:00:00 2001 From: Steven Edwards Date: Wed, 26 Jan 2005 22:03:05 +0000 Subject: [PATCH 025/185] added ibrowser to the makefile svn path=/trunk/; revision=13322 --- reactos/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/Makefile b/reactos/Makefile index eb5221302e3..052718c2a0f 100644 --- a/reactos/Makefile +++ b/reactos/Makefile @@ -100,7 +100,7 @@ STORAGE_DRIVERS = atapi cdrom class2 disk floppy scsiport diskdump # System applications # autochk cmd format services setup usetup welcome winlogon msiexec -SYS_APPS = autochk calc cmd explorer expand format msiexec regedt32 regsvr32 \ +SYS_APPS = autochk calc cmd explorer expand format ibrowser msiexec regedt32 regsvr32 \ reporterror services setup taskmgr userinit usetup welcome vmwinst \ winlogon regedit winefile notepad reactos From 5546cc5fd31569d1d92af6b24bc7763fa91c564c Mon Sep 17 00:00:00 2001 From: Filip Navara Date: Wed, 26 Jan 2005 22:05:12 +0000 Subject: [PATCH 026/185] =?UTF-8?q?Herv=C3=A9=20Poussineau=20=20No=20need=20to=20create=20\=3F=3F\Mouse=20symlink?= =?UTF-8?q?=20in=20mouse=20driver,=20it's=20done=20in=20mouclass.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit svn path=/trunk/; revision=13323 --- reactos/drivers/input/psaux/psaux.c | 12 +----------- reactos/drivers/input/sermouse/sermouse.c | 17 +---------------- 2 files changed, 2 insertions(+), 27 deletions(-) diff --git a/reactos/drivers/input/psaux/psaux.c b/reactos/drivers/input/psaux/psaux.c index 4cb6369d797..44a4c319525 100644 --- a/reactos/drivers/input/psaux/psaux.c +++ b/reactos/drivers/input/psaux/psaux.c @@ -177,7 +177,6 @@ AllocatePointerDevice(PDRIVER_OBJECT DriverObject) PDEVICE_OBJECT DeviceObject; UNICODE_STRING DeviceName; UNICODE_STRING SuffixString; - UNICODE_STRING SymlinkName; PDEVICE_EXTENSION DeviceExtension; ULONG Suffix; NTSTATUS Status; @@ -213,25 +212,16 @@ AllocatePointerDevice(PDRIVER_OBJECT DriverObject) } ExFreePool(DeviceName.Buffer); + ExFreePool(SuffixString.Buffer); /* Couldn't create device */ if (!NT_SUCCESS(Status)) { - ExFreePool(SuffixString.Buffer); return NULL; } DeviceObject->Flags = DeviceObject->Flags | DO_BUFFERED_IO; - /* Create symlink */ - RtlInitUnicodeString(&SymlinkName, NULL); - SymlinkName.MaximumLength = sizeof(L"\\??\\Mouse") + SUFFIX_MAXIMUM_SIZE + sizeof(UNICODE_NULL); - SymlinkName.Buffer = ExAllocatePool(PagedPool, SymlinkName.MaximumLength); - RtlAppendUnicodeToString(&SymlinkName, L"\\??\\Mouse"); - RtlAppendUnicodeToString(&DeviceName, SuffixString.Buffer); - IoCreateSymbolicLink(&SymlinkName, &DeviceName); - ExFreePool(SuffixString.Buffer); - DeviceExtension = DeviceObject->DeviceExtension; KeInitializeDpc(&DeviceExtension->IsrDpc, (PKDEFERRED_ROUTINE)PS2MouseIsrDpc, DeviceObject); diff --git a/reactos/drivers/input/sermouse/sermouse.c b/reactos/drivers/input/sermouse/sermouse.c index 23ed60e7cf4..b2ad310a84d 100644 --- a/reactos/drivers/input/sermouse/sermouse.c +++ b/reactos/drivers/input/sermouse/sermouse.c @@ -26,8 +26,6 @@ #define SERMOUSE_COM1_SUPPORT /* Check for mouse on COM2? */ /* #define SERMOUSE_COM2_SUPPORT */ -/* Create \??\Mouse* symlink for device? */ -#define SERMOUSE_MOUSESYMLINK_SUPPORT /* * Definitions @@ -511,7 +509,6 @@ AllocatePointerDevice(PDRIVER_OBJECT DriverObject) PDEVICE_OBJECT DeviceObject; UNICODE_STRING DeviceName; UNICODE_STRING SuffixString; - UNICODE_STRING SymlinkName; PDEVICE_EXTENSION DeviceExtension; ULONG Suffix; NTSTATUS Status; @@ -541,28 +538,16 @@ AllocatePointerDevice(PDRIVER_OBJECT DriverObject) } ExFreePool(DeviceName.Buffer); + ExFreePool(SuffixString.Buffer); /* Couldn't create device */ if (!NT_SUCCESS(Status)) { - ExFreePool(SuffixString.Buffer); return NULL; } DeviceObject->Flags = DeviceObject->Flags | DO_BUFFERED_IO; -#ifdef SERMOUSE_MOUSESYMLINK_SUPPORT - /* Create symlink */ - /* FIXME: Why? FiN 20/08/2003 */ - RtlInitUnicodeString(&SymlinkName, NULL); - SymlinkName.MaximumLength = sizeof(L"\\??\\Mouse") + SUFFIX_MAXIMUM_SIZE + sizeof(UNICODE_NULL); - SymlinkName.Buffer = ExAllocatePool(PagedPool, SymlinkName.MaximumLength); - RtlAppendUnicodeToString(&SymlinkName, L"\\??\\Mouse"); - RtlAppendUnicodeToString(&DeviceName, SuffixString.Buffer); - IoCreateSymbolicLink(&SymlinkName, &DeviceName); -#endif - ExFreePool(SuffixString.Buffer); - DeviceExtension = DeviceObject->DeviceExtension; KeInitializeDpc(&DeviceExtension->IsrDpc, (PKDEFERRED_ROUTINE)SerialMouseIsrDpc, DeviceObject); From d3fb293ea330c5247d44090fe9fc7019c83c06b2 Mon Sep 17 00:00:00 2001 From: Aleksey Bragin Date: Wed, 26 Jan 2005 22:34:39 +0000 Subject: [PATCH 027/185] This is the initial version of USB port+hub+hostcontroller drivers from a special version of Linux USB Stack. More info will be placed at ROS-Wiki. svn path=/trunk/; revision=13324 --- reactos/drivers/usb/cromwell/Makefile | 50 + .../drivers/usb/cromwell/core/buffer_simple.c | 42 + reactos/drivers/usb/cromwell/core/config.c | 508 + reactos/drivers/usb/cromwell/core/hcd-pci.c | 365 + reactos/drivers/usb/cromwell/core/hcd.c | 1499 ++ reactos/drivers/usb/cromwell/core/hcd.h | 430 + reactos/drivers/usb/cromwell/core/hub.c | 1383 ++ reactos/drivers/usb/cromwell/core/hub.h | 195 + reactos/drivers/usb/cromwell/core/makefile | 18 + .../drivers/usb/cromwell/core/makefile.crom | 6 + reactos/drivers/usb/cromwell/core/message.c | 1053 ++ reactos/drivers/usb/cromwell/core/urb.c | 398 + reactos/drivers/usb/cromwell/core/usb-debug.c | 206 + reactos/drivers/usb/cromwell/core/usb.c | 1596 +++ reactos/drivers/usb/cromwell/core/usb.h | 5 + reactos/drivers/usb/cromwell/core/usbcore.a | Bin 0 -> 69120 bytes reactos/drivers/usb/cromwell/core/usbcore.c | 16 + .../drivers/usb/cromwell/core/usbcore.coff | Bin 0 -> 976 bytes reactos/drivers/usb/cromwell/core/usbcore.def | 29 + reactos/drivers/usb/cromwell/core/usbcore.map | 11539 ++++++++++++++++ .../usb/cromwell/core/usbcore.nostrip.sys | Bin 0 -> 81469 bytes reactos/drivers/usb/cromwell/core/usbcore.rc | 5 + reactos/drivers/usb/cromwell/core/usbcore.sym | Bin 0 -> 7904 bytes reactos/drivers/usb/cromwell/core/usbcore.sys | Bin 0 -> 81037 bytes reactos/drivers/usb/cromwell/host/makefile | 16 + .../drivers/usb/cromwell/host/makefile.crom | 3 + reactos/drivers/usb/cromwell/host/ohci-dbg.c | 666 + reactos/drivers/usb/cromwell/host/ohci-hcd.c | 703 + reactos/drivers/usb/cromwell/host/ohci-hub.c | 271 + reactos/drivers/usb/cromwell/host/ohci-mem.c | 146 + reactos/drivers/usb/cromwell/host/ohci-pci.c | 405 + reactos/drivers/usb/cromwell/host/ohci-q.c | 1014 ++ reactos/drivers/usb/cromwell/host/ohci.a | Bin 0 -> 22522 bytes reactos/drivers/usb/cromwell/host/ohci.coff | Bin 0 -> 968 bytes reactos/drivers/usb/cromwell/host/ohci.def | 2 + reactos/drivers/usb/cromwell/host/ohci.h | 406 + reactos/drivers/usb/cromwell/host/ohci.map | 4524 ++++++ .../usb/cromwell/host/ohci.nostrip.sys | Bin 0 -> 50449 bytes reactos/drivers/usb/cromwell/host/ohci.rc | 5 + reactos/drivers/usb/cromwell/host/ohci.sym | Bin 0 -> 2592 bytes reactos/drivers/usb/cromwell/host/ohci.sys | Bin 0 -> 50305 bytes .../drivers/usb/cromwell/host/ohci_config.h | 5 + reactos/drivers/usb/cromwell/host/ohci_main.c | 16 + .../drivers/usb/cromwell/linux/asm/bitops.h | 384 + reactos/drivers/usb/cromwell/linux/bitops.h | 72 + reactos/drivers/usb/cromwell/linux/boot.h | 337 + reactos/drivers/usb/cromwell/linux/consts.h | 70 + .../usb/cromwell/linux/cromwell_types.h | 27 + reactos/drivers/usb/cromwell/linux/errno.h | 132 + .../usb/cromwell/linux/linux_wrapper.h | 762 + reactos/drivers/usb/cromwell/linux/list.h | 224 + reactos/drivers/usb/cromwell/linux/pci_ids.h | 11 + reactos/drivers/usb/cromwell/linux/usb.h | 1032 ++ reactos/drivers/usb/cromwell/linux/usb_ch9.h | 315 + reactos/drivers/usb/cromwell/sys/BootUSB.c | 90 + reactos/drivers/usb/cromwell/sys/Makefile | 4 + .../drivers/usb/cromwell/sys/linuxwrapper.c | 271 + reactos/drivers/usb/cromwell/sys/risefall.c | 138 + .../drivers/usb/cromwell/sys/ros_wrapper.c | 10 + reactos/drivers/usb/cromwell/sys/usbkey.c | 123 + reactos/drivers/usb/cromwell/sys/usbwrapper.c | 65 + reactos/drivers/usb/cromwell/sys/xpad.c | 183 + reactos/drivers/usb/cromwell/sys/xremote.c | 142 + reactos/drivers/usb/cromwell/usb_wrapper.h | 14 + 64 files changed, 31931 insertions(+) create mode 100644 reactos/drivers/usb/cromwell/Makefile create mode 100644 reactos/drivers/usb/cromwell/core/buffer_simple.c create mode 100644 reactos/drivers/usb/cromwell/core/config.c create mode 100644 reactos/drivers/usb/cromwell/core/hcd-pci.c create mode 100644 reactos/drivers/usb/cromwell/core/hcd.c create mode 100644 reactos/drivers/usb/cromwell/core/hcd.h create mode 100644 reactos/drivers/usb/cromwell/core/hub.c create mode 100644 reactos/drivers/usb/cromwell/core/hub.h create mode 100644 reactos/drivers/usb/cromwell/core/makefile create mode 100644 reactos/drivers/usb/cromwell/core/makefile.crom create mode 100644 reactos/drivers/usb/cromwell/core/message.c create mode 100644 reactos/drivers/usb/cromwell/core/urb.c create mode 100644 reactos/drivers/usb/cromwell/core/usb-debug.c create mode 100644 reactos/drivers/usb/cromwell/core/usb.c create mode 100644 reactos/drivers/usb/cromwell/core/usb.h create mode 100644 reactos/drivers/usb/cromwell/core/usbcore.a create mode 100644 reactos/drivers/usb/cromwell/core/usbcore.c create mode 100644 reactos/drivers/usb/cromwell/core/usbcore.coff create mode 100644 reactos/drivers/usb/cromwell/core/usbcore.def create mode 100644 reactos/drivers/usb/cromwell/core/usbcore.map create mode 100644 reactos/drivers/usb/cromwell/core/usbcore.nostrip.sys create mode 100644 reactos/drivers/usb/cromwell/core/usbcore.rc create mode 100644 reactos/drivers/usb/cromwell/core/usbcore.sym create mode 100644 reactos/drivers/usb/cromwell/core/usbcore.sys create mode 100644 reactos/drivers/usb/cromwell/host/makefile create mode 100644 reactos/drivers/usb/cromwell/host/makefile.crom create mode 100644 reactos/drivers/usb/cromwell/host/ohci-dbg.c create mode 100644 reactos/drivers/usb/cromwell/host/ohci-hcd.c create mode 100644 reactos/drivers/usb/cromwell/host/ohci-hub.c create mode 100644 reactos/drivers/usb/cromwell/host/ohci-mem.c create mode 100644 reactos/drivers/usb/cromwell/host/ohci-pci.c create mode 100644 reactos/drivers/usb/cromwell/host/ohci-q.c create mode 100644 reactos/drivers/usb/cromwell/host/ohci.a create mode 100644 reactos/drivers/usb/cromwell/host/ohci.coff create mode 100644 reactos/drivers/usb/cromwell/host/ohci.def create mode 100644 reactos/drivers/usb/cromwell/host/ohci.h create mode 100644 reactos/drivers/usb/cromwell/host/ohci.map create mode 100644 reactos/drivers/usb/cromwell/host/ohci.nostrip.sys create mode 100644 reactos/drivers/usb/cromwell/host/ohci.rc create mode 100644 reactos/drivers/usb/cromwell/host/ohci.sym create mode 100644 reactos/drivers/usb/cromwell/host/ohci.sys create mode 100644 reactos/drivers/usb/cromwell/host/ohci_config.h create mode 100644 reactos/drivers/usb/cromwell/host/ohci_main.c create mode 100644 reactos/drivers/usb/cromwell/linux/asm/bitops.h create mode 100644 reactos/drivers/usb/cromwell/linux/bitops.h create mode 100644 reactos/drivers/usb/cromwell/linux/boot.h create mode 100644 reactos/drivers/usb/cromwell/linux/consts.h create mode 100644 reactos/drivers/usb/cromwell/linux/cromwell_types.h create mode 100644 reactos/drivers/usb/cromwell/linux/errno.h create mode 100644 reactos/drivers/usb/cromwell/linux/linux_wrapper.h create mode 100644 reactos/drivers/usb/cromwell/linux/list.h create mode 100644 reactos/drivers/usb/cromwell/linux/pci_ids.h create mode 100644 reactos/drivers/usb/cromwell/linux/usb.h create mode 100644 reactos/drivers/usb/cromwell/linux/usb_ch9.h create mode 100644 reactos/drivers/usb/cromwell/sys/BootUSB.c create mode 100644 reactos/drivers/usb/cromwell/sys/Makefile create mode 100644 reactos/drivers/usb/cromwell/sys/linuxwrapper.c create mode 100644 reactos/drivers/usb/cromwell/sys/risefall.c create mode 100644 reactos/drivers/usb/cromwell/sys/ros_wrapper.c create mode 100644 reactos/drivers/usb/cromwell/sys/usbkey.c create mode 100644 reactos/drivers/usb/cromwell/sys/usbwrapper.c create mode 100644 reactos/drivers/usb/cromwell/sys/xpad.c create mode 100644 reactos/drivers/usb/cromwell/sys/xremote.c create mode 100644 reactos/drivers/usb/cromwell/usb_wrapper.h diff --git a/reactos/drivers/usb/cromwell/Makefile b/reactos/drivers/usb/cromwell/Makefile new file mode 100644 index 00000000000..b38e31bc053 --- /dev/null +++ b/reactos/drivers/usb/cromwell/Makefile @@ -0,0 +1,50 @@ +# +# ReactOS USB-Cromwell Drivers +# + +PATH_TO_TOP = ../../.. + +include $(PATH_TO_TOP)/rules.mak + +DRIVERS = core host + +all: $(DRIVERS) + +depends: + +implib: $(DRIVERS:%=%_implib) + +clean: $(DRIVERS:%=%_clean) + +install: $(DRIVERS:%=%_install) + +bootcd: $(DRIVERS:%=%_bootcd) + +.PHONY: all depends implib clean install bootcd + + +# +# USB DRIVERS +# +$(DRIVERS): %: + $(MAKE) -C $* + +$(DRIVERS:%=%_implib): %_implib: + $(MAKE) -C $* implib + +$(DRIVERS:%=%_clean): %_clean: + $(MAKE) -C $* clean + +$(DRIVERS:%=%_install): %_install: + $(MAKE) -C $* install + +$(DRIVERS:%=%_bootcd): %_bootcd: + $(MAKE) -C $* bootcd + +.PHONY: $(DRIVERS) $(DRIVERS:%=%_implib) $(DRIVERS:%=%_clean) $(DRIVERS:%=%_install) $(DRIVERS:%=%_bootcd) + + +etags: + find . -name "*.[ch]" -print | etags --language=c - + +# EOF diff --git a/reactos/drivers/usb/cromwell/core/buffer_simple.c b/reactos/drivers/usb/cromwell/core/buffer_simple.c new file mode 100644 index 00000000000..7ac70ce30cb --- /dev/null +++ b/reactos/drivers/usb/cromwell/core/buffer_simple.c @@ -0,0 +1,42 @@ +/* + * buffer_simple.c -- replacement for usb/core/buffer.c + * + * (c) Georg Acher, georg@acher.org + * + */ + +#include "../usb_wrapper.h" +#define __KERNEL__ +#define CONFIG_PCI +#include "hcd.h" + +/*------------------------------------------------------------------------*/ +int hcd_buffer_create (struct usb_hcd *hcd) +{ + return 0; +} +/*------------------------------------------------------------------------*/ +void hcd_buffer_destroy (struct usb_hcd *hcd) +{ +} +/*------------------------------------------------------------------------*/ +void *hcd_buffer_alloc ( + struct usb_bus *bus, + size_t size, + int mem_flags, + dma_addr_t *dma +) +{ + return kmalloc(size,0); +} +/*------------------------------------------------------------------------*/ +void hcd_buffer_free ( + struct usb_bus *bus, + size_t size, + void *addr, + dma_addr_t dma +) +{ + kfree(addr); +} + diff --git a/reactos/drivers/usb/cromwell/core/config.c b/reactos/drivers/usb/cromwell/core/config.c new file mode 100644 index 00000000000..7d400e982d8 --- /dev/null +++ b/reactos/drivers/usb/cromwell/core/config.c @@ -0,0 +1,508 @@ +#if 0 +#include +#include +#include +#include +#include +#else +#include "../usb_wrapper.h" +#endif + +#define USB_MAXALTSETTING 128 /* Hard limit */ +#define USB_MAXENDPOINTS 30 /* Hard limit */ + +/* these maximums are arbitrary */ +#define USB_MAXCONFIG 8 +#define USB_ALTSETTINGALLOC 4 +#define USB_MAXINTERFACES 32 + +static int usb_parse_endpoint(struct usb_host_endpoint *endpoint, unsigned char *buffer, int size) +{ + struct usb_descriptor_header *header; + unsigned char *begin; + int parsed = 0, len, numskipped; + + header = (struct usb_descriptor_header *)buffer; + + /* Everything should be fine being passed into here, but we sanity */ + /* check JIC */ + if (header->bLength > size) { + err("ran out of descriptors parsing"); + return -1; + } + + if (header->bDescriptorType != USB_DT_ENDPOINT) { + warn("unexpected descriptor 0x%X, expecting endpoint, 0x%X", + header->bDescriptorType, USB_DT_ENDPOINT); + return parsed; + } + + if (header->bLength == USB_DT_ENDPOINT_AUDIO_SIZE) + memcpy(&endpoint->desc, buffer, USB_DT_ENDPOINT_AUDIO_SIZE); + else + memcpy(&endpoint->desc, buffer, USB_DT_ENDPOINT_SIZE); + + le16_to_cpus(&endpoint->desc.wMaxPacketSize); + + buffer += header->bLength; + size -= header->bLength; + parsed += header->bLength; + + /* Skip over the rest of the Class Specific or Vendor Specific */ + /* descriptors */ + begin = buffer; + numskipped = 0; + while (size >= sizeof(struct usb_descriptor_header)) { + header = (struct usb_descriptor_header *)buffer; + + if (header->bLength < 2) { + err("invalid descriptor length of %d", header->bLength); + return -1; + } + + /* If we find another "proper" descriptor then we're done */ + if ((header->bDescriptorType == USB_DT_ENDPOINT) || + (header->bDescriptorType == USB_DT_INTERFACE) || + (header->bDescriptorType == USB_DT_CONFIG) || + (header->bDescriptorType == USB_DT_DEVICE)) + break; + + dbg("skipping descriptor 0x%X", + header->bDescriptorType); + numskipped++; + + buffer += header->bLength; + size -= header->bLength; + parsed += header->bLength; + } + if (numskipped) + dbg("skipped %d class/vendor specific endpoint descriptors", numskipped); + + /* Copy any unknown descriptors into a storage area for drivers */ + /* to later parse */ + len = (int)(buffer - begin); + if (!len) { + endpoint->extra = NULL; + endpoint->extralen = 0; + return parsed; + } + + endpoint->extra = kmalloc(len, GFP_KERNEL); + + if (!endpoint->extra) { + err("couldn't allocate memory for endpoint extra descriptors"); + endpoint->extralen = 0; + return parsed; + } + + memcpy(endpoint->extra, begin, len); + endpoint->extralen = len; + + return parsed; +} + +static int usb_parse_interface(struct usb_interface *interface, unsigned char *buffer, int size) +{ + int i, len, numskipped, retval, parsed = 0; + struct usb_descriptor_header *header; + struct usb_host_interface *ifp; + unsigned char *begin; + + interface->act_altsetting = 0; + interface->num_altsetting = 0; + interface->max_altsetting = USB_ALTSETTINGALLOC; + device_initialize(&interface->dev); + + interface->altsetting = kmalloc(sizeof(*interface->altsetting) * interface->max_altsetting, + GFP_KERNEL); + + if (!interface->altsetting) { + err("couldn't kmalloc interface->altsetting"); + return -1; + } + + while (size > 0) { + struct usb_interface_descriptor *d; + + if (interface->num_altsetting >= interface->max_altsetting) { + struct usb_host_interface *ptr; + int oldmas; + + oldmas = interface->max_altsetting; + interface->max_altsetting += USB_ALTSETTINGALLOC; + if (interface->max_altsetting > USB_MAXALTSETTING) { + warn("too many alternate settings (incr %d max %d)\n", + USB_ALTSETTINGALLOC, USB_MAXALTSETTING); + return -1; + } + + ptr = kmalloc(sizeof(*ptr) * interface->max_altsetting, GFP_KERNEL); + if (ptr == NULL) { + err("couldn't kmalloc interface->altsetting"); + return -1; + } + memcpy(ptr, interface->altsetting, sizeof(*interface->altsetting) * oldmas); + kfree(interface->altsetting); + interface->altsetting = ptr; + } + + ifp = interface->altsetting + interface->num_altsetting; + ifp->endpoint = NULL; + ifp->extra = NULL; + ifp->extralen = 0; + interface->num_altsetting++; + + memcpy(ifp, buffer, USB_DT_INTERFACE_SIZE); + + /* Skip over the interface */ + buffer += ifp->desc.bLength; + parsed += ifp->desc.bLength; + size -= ifp->desc.bLength; + + begin = buffer; + numskipped = 0; + + /* Skip over any interface, class or vendor descriptors */ + while (size >= sizeof(struct usb_descriptor_header)) { + header = (struct usb_descriptor_header *)buffer; + + if (header->bLength < 2) { + err("invalid descriptor length of %d", header->bLength); + return -1; + } + + /* If we find another "proper" descriptor then we're done */ + if ((header->bDescriptorType == USB_DT_INTERFACE) || + (header->bDescriptorType == USB_DT_ENDPOINT) || + (header->bDescriptorType == USB_DT_CONFIG) || + (header->bDescriptorType == USB_DT_DEVICE)) + break; + + numskipped++; + + buffer += header->bLength; + parsed += header->bLength; + size -= header->bLength; + } + + if (numskipped) + dbg("skipped %d class/vendor specific interface descriptors", numskipped); + + /* Copy any unknown descriptors into a storage area for */ + /* drivers to later parse */ + len = (int)(buffer - begin); + if (len) { + ifp->extra = kmalloc(len, GFP_KERNEL); + + if (!ifp->extra) { + err("couldn't allocate memory for interface extra descriptors"); + ifp->extralen = 0; + return -1; + } + memcpy(ifp->extra, begin, len); + ifp->extralen = len; + } + + /* Did we hit an unexpected descriptor? */ + header = (struct usb_descriptor_header *)buffer; + if ((size >= sizeof(struct usb_descriptor_header)) && + ((header->bDescriptorType == USB_DT_CONFIG) || + (header->bDescriptorType == USB_DT_DEVICE))) + return parsed; + + if (ifp->desc.bNumEndpoints > USB_MAXENDPOINTS) { + warn("too many endpoints"); + return -1; + } + + ifp->endpoint = (struct usb_host_endpoint *) + kmalloc(ifp->desc.bNumEndpoints * + sizeof(struct usb_host_endpoint), GFP_KERNEL); + if (!ifp->endpoint) { + err("out of memory"); + return -1; + } + + memset(ifp->endpoint, 0, ifp->desc.bNumEndpoints * + sizeof(struct usb_host_endpoint)); + + for (i = 0; i < ifp->desc.bNumEndpoints; i++) { + header = (struct usb_descriptor_header *)buffer; + + if (header->bLength > size) { + err("ran out of descriptors parsing"); + return -1; + } + + retval = usb_parse_endpoint(ifp->endpoint + i, buffer, size); + if (retval < 0) + return retval; + + buffer += retval; + parsed += retval; + size -= retval; + } + + /* We check to see if it's an alternate to this one */ + d = (struct usb_interface_descriptor *)buffer; + if (size < USB_DT_INTERFACE_SIZE + || d->bDescriptorType != USB_DT_INTERFACE + || !d->bAlternateSetting) + return parsed; + } + + return parsed; +} + +int usb_parse_configuration(struct usb_host_config *config, char *buffer) +{ + int i, retval, size; + struct usb_descriptor_header *header; + + memcpy(&config->desc, buffer, USB_DT_CONFIG_SIZE); + le16_to_cpus(&config->desc.wTotalLength); + size = config->desc.wTotalLength; + + if (config->desc.bNumInterfaces > USB_MAXINTERFACES) { + warn("too many interfaces"); + return -1; + } + + config->interface = (struct usb_interface *) + kmalloc(config->desc.bNumInterfaces * + sizeof(struct usb_interface), GFP_KERNEL); + dbg("kmalloc IF %p, numif %i", config->interface, config->desc.bNumInterfaces); + if (!config->interface) { + err("out of memory"); + return -1; + } + + memset(config->interface, 0, + config->desc.bNumInterfaces * sizeof(struct usb_interface)); + + buffer += config->desc.bLength; + size -= config->desc.bLength; + + config->extra = NULL; + config->extralen = 0; + + for (i = 0; i < config->desc.bNumInterfaces; i++) { + int numskipped, len; + char *begin; + + /* Skip over the rest of the Class Specific or Vendor */ + /* Specific descriptors */ + begin = buffer; + numskipped = 0; + while (size >= sizeof(struct usb_descriptor_header)) { + header = (struct usb_descriptor_header *)buffer; + + if ((header->bLength > size) || (header->bLength < 2)) { + err("invalid descriptor length of %d", header->bLength); + return -1; + } + + /* If we find another "proper" descriptor then we're done */ + if ((header->bDescriptorType == USB_DT_ENDPOINT) || + (header->bDescriptorType == USB_DT_INTERFACE) || + (header->bDescriptorType == USB_DT_CONFIG) || + (header->bDescriptorType == USB_DT_DEVICE)) + break; + + dbg("skipping descriptor 0x%X", header->bDescriptorType); + numskipped++; + + buffer += header->bLength; + size -= header->bLength; + } + if (numskipped) + dbg("skipped %d class/vendor specific endpoint descriptors", numskipped); + + /* Copy any unknown descriptors into a storage area for */ + /* drivers to later parse */ + len = (int)(buffer - begin); + if (len) { + if (config->extralen) { + warn("extra config descriptor"); + } else { + config->extra = kmalloc(len, GFP_KERNEL); + if (!config->extra) { + err("couldn't allocate memory for config extra descriptors"); + config->extralen = 0; + return -1; + } + + memcpy(config->extra, begin, len); + config->extralen = len; + } + } + + retval = usb_parse_interface(config->interface + i, buffer, size); + if (retval < 0) + return retval; + + buffer += retval; + size -= retval; + } + + return size; +} + +// hub-only!! ... and only exported for reset/reinit path. +// otherwise used internally on disconnect/destroy path +void usb_destroy_configuration(struct usb_device *dev) +{ + int c, i, j, k; + + if (!dev->config) + return; + + if (dev->rawdescriptors) { + for (i = 0; i < dev->descriptor.bNumConfigurations; i++) + kfree(dev->rawdescriptors[i]); + + kfree(dev->rawdescriptors); + } + + for (c = 0; c < dev->descriptor.bNumConfigurations; c++) { + struct usb_host_config *cf = &dev->config[c]; + + if (!cf->interface) + break; + + for (i = 0; i < cf->desc.bNumInterfaces; i++) { + struct usb_interface *ifp = + &cf->interface[i]; + + if (!ifp->altsetting) + break; + + for (j = 0; j < ifp->num_altsetting; j++) { + struct usb_host_interface *as = + &ifp->altsetting[j]; + + if(as->extra) { + kfree(as->extra); + } + + if (!as->endpoint) + break; + + for(k = 0; k < as->desc.bNumEndpoints; k++) { + if(as->endpoint[k].extra) { + kfree(as->endpoint[k].extra); + } + } + kfree(as->endpoint); + } + + kfree(ifp->altsetting); + } + kfree(cf->interface); + } + kfree(dev->config); +} + + +// hub-only!! ... and only in reset path, or usb_new_device() +// (used by real hubs and virtual root hubs) +int usb_get_configuration(struct usb_device *dev) +{ + int result; + unsigned int cfgno, length; + unsigned char *buffer; + unsigned char *bigbuffer; + struct usb_config_descriptor *desc; + + if (dev->descriptor.bNumConfigurations > USB_MAXCONFIG) { + warn("too many configurations"); + return -EINVAL; + } + + if (dev->descriptor.bNumConfigurations < 1) { + warn("not enough configurations"); + return -EINVAL; + } + + dev->config = (struct usb_host_config *) + kmalloc(dev->descriptor.bNumConfigurations * + sizeof(struct usb_host_config), GFP_KERNEL); + if (!dev->config) { + err("out of memory"); + return -ENOMEM; + } + memset(dev->config, 0, dev->descriptor.bNumConfigurations * + sizeof(struct usb_host_config)); + + dev->rawdescriptors = (char **)kmalloc(sizeof(char *) * + dev->descriptor.bNumConfigurations, GFP_KERNEL); + if (!dev->rawdescriptors) { + err("out of memory"); + return -ENOMEM; + } + + buffer = kmalloc(8, GFP_KERNEL); + if (!buffer) { + err("unable to allocate memory for configuration descriptors"); + return -ENOMEM; + } + desc = (struct usb_config_descriptor *)buffer; + + for (cfgno = 0; cfgno < dev->descriptor.bNumConfigurations; cfgno++) { + /* We grab the first 8 bytes so we know how long the whole */ + /* configuration is */ + result = usb_get_descriptor(dev, USB_DT_CONFIG, cfgno, buffer, 8); + if (result < 8) { + if (result < 0) + err("unable to get descriptor"); + else { + err("config descriptor too short (expected %i, got %i)", 8, result); + result = -EINVAL; + } + goto err; + } + + /* Get the full buffer */ + length = le16_to_cpu(desc->wTotalLength); + + bigbuffer = kmalloc(length, GFP_KERNEL); + if (!bigbuffer) { + err("unable to allocate memory for configuration descriptors"); + result = -ENOMEM; + goto err; + } + + /* Now that we know the length, get the whole thing */ + result = usb_get_descriptor(dev, USB_DT_CONFIG, cfgno, bigbuffer, length); + if (result < 0) { + err("couldn't get all of config descriptors"); + kfree(bigbuffer); + goto err; + } + + if (result < length) { + err("config descriptor too short (expected %i, got %i)", length, result); + result = -EINVAL; + kfree(bigbuffer); + goto err; + } + + dev->rawdescriptors[cfgno] = bigbuffer; + + result = usb_parse_configuration(&dev->config[cfgno], bigbuffer); + if (result > 0) + dbg("descriptor data left"); + else if (result < 0) { + result = -EINVAL; + goto err; + } + } + + kfree(buffer); + return 0; +err: + kfree(buffer); + dev->descriptor.bNumConfigurations = cfgno; + return result; +} + diff --git a/reactos/drivers/usb/cromwell/core/hcd-pci.c b/reactos/drivers/usb/cromwell/core/hcd-pci.c new file mode 100644 index 00000000000..ca7182c0b2a --- /dev/null +++ b/reactos/drivers/usb/cromwell/core/hcd-pci.c @@ -0,0 +1,365 @@ +/* + * (C) Copyright David Brownell 2000-2002 + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program 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 General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#if 0 +#include + +#ifdef CONFIG_USB_DEBUG + #define DEBUG +#else + #undef DEBUG +#endif + +#include +#include +#include +#include +#include +#include +#include "hcd.h" +#else +#define DEBUG +#include "../usb_wrapper.h" +#include "hcd.h" +#endif + + +/* PCI-based HCs are normal, but custom bus glue should be ok */ + + +/*-------------------------------------------------------------------------*/ + +/* configure so an HC device and id are always provided */ +/* always called with process context; sleeping is OK */ + +/** + * usb_hcd_pci_probe - initialize PCI-based HCDs + * @dev: USB Host Controller being probed + * @id: pci hotplug id connecting controller to HCD framework + * Context: !in_interrupt() + * + * Allocates basic PCI resources for this USB host controller, and + * then invokes the start() method for the HCD associated with it + * through the hotplug entry's driver_data. + * + * Store this function in the HCD's struct pci_driver as probe(). + */ +int STDCALL usb_hcd_pci_probe (struct pci_dev *dev, const struct pci_device_id *id) +{ + struct hc_driver *driver; + unsigned long resource, len; + void *base; + struct usb_hcd *hcd; + int retval, region; + char buf [8]; + //char *bufp = buf; + + if (usb_disabled()) + return -ENODEV; + + if (!id || !(driver = (struct hc_driver *) id->driver_data)) + return -EINVAL; + + if (pci_enable_device (dev) < 0) + return -ENODEV; + + if (!dev->irq) { + err ("Found HC with no IRQ. Check BIOS/PCI %s setup!", + dev->slot_name); + return -ENODEV; + } + + if (driver->flags & HCD_MEMORY) { // EHCI, OHCI + region = 0; + resource = pci_resource_start (dev, 0); + len = pci_resource_len (dev, 0); + if (!request_mem_region (resource, len, driver->description)) { + dbg ("controller already in use"); + return -EBUSY; + } + base = ioremap_nocache (resource, len); + if (base == NULL) { + dbg ("error mapping memory"); + retval = -EFAULT; +clean_1: + release_mem_region (resource, len); + err ("init %s fail, %d", dev->slot_name, retval); + return retval; + } + + } else { // UHCI + resource = len = 0; + for (region = 0; region < PCI_ROM_RESOURCE; region++) { + if (!(pci_resource_flags (dev, region) & IORESOURCE_IO)) + continue; + + resource = pci_resource_start (dev, region); + len = pci_resource_len (dev, region); + if (request_region (resource, len, + driver->description)) + break; + } + if (region == PCI_ROM_RESOURCE) { + dbg ("no i/o regions available"); + return -EBUSY; + } + base = (void *) resource; + } + + // driver->start(), later on, will transfer device from + // control by SMM/BIOS to control by Linux (if needed) + + pci_set_master (dev); + + hcd = driver->hcd_alloc (); + if (hcd == NULL){ + dbg ("hcd alloc fail"); + retval = -ENOMEM; +clean_2: + if (driver->flags & HCD_MEMORY) { + iounmap (base); + goto clean_1; + } else { + release_region (resource, len); + err ("init %s fail, %d", dev->slot_name, retval); + return retval; + } + } + pci_set_drvdata (dev, hcd); + hcd->driver = driver; + hcd->description = driver->description; + hcd->pdev = dev; + hcd->self.bus_name = dev->slot_name; + hcd->product_desc = dev->dev.name; + hcd->self.controller = &dev->dev; + hcd->controller = hcd->self.controller; + + if ((retval = hcd_buffer_create (hcd)) != 0) { +clean_3: + driver->hcd_free (hcd); + goto clean_2; + } + + dev_info (hcd->controller, "%s\n", hcd->product_desc); + +#ifndef __sparc__ + sprintf (buf, "%d", dev->irq); +#else + bufp = __irq_itoa(dev->irq); +#endif + if (request_irq (dev->irq, usb_hcd_irq, SA_SHIRQ, hcd->description, hcd) + != 0) { + dev_err (hcd->controller, + "request interrupt %s failed\n", bufp); + retval = -EBUSY; + goto clean_3; + } + hcd->irq = dev->irq; + + hcd->regs = base; + hcd->region = region; + dev_info (hcd->controller, "irq %s, %s %p\n", bufp, + (driver->flags & HCD_MEMORY) ? "pci mem" : "io base", + base); + + usb_bus_init (&hcd->self); + hcd->self.op = &usb_hcd_operations; + hcd->self.hcpriv = (void *) hcd; + + INIT_LIST_HEAD (&hcd->dev_list); + + usb_register_bus (&hcd->self); + + if ((retval = driver->start (hcd)) < 0) + usb_hcd_pci_remove (dev); + + return retval; +} +EXPORT_SYMBOL (usb_hcd_pci_probe); + + +/* may be called without controller electrically present */ +/* may be called with controller, bus, and devices active */ + +/** + * usb_hcd_pci_remove - shutdown processing for PCI-based HCDs + * @dev: USB Host Controller being removed + * Context: !in_interrupt() + * + * Reverses the effect of usb_hcd_pci_probe(), first invoking + * the HCD's stop() method. It is always called from a thread + * context, normally "rmmod", "apmd", or something similar. + * + * Store this function in the HCD's struct pci_driver as remove(). + */ +void STDCALL usb_hcd_pci_remove (struct pci_dev *dev) +{ + struct usb_hcd *hcd; + struct usb_device *hub; + + hcd = pci_get_drvdata(dev); + if (!hcd) + return; + dev_info (hcd->controller, "remove, state %x\n", hcd->state); + + if (in_interrupt ()) + BUG (); + + hub = hcd->self.root_hub; + hcd->state = USB_STATE_QUIESCING; + + dev_dbg (hcd->controller, "roothub graceful disconnect\n"); + usb_disconnect (&hub); + + hcd->driver->stop (hcd); + hcd_buffer_destroy (hcd); + hcd->state = USB_STATE_HALT; + pci_set_drvdata (dev, 0); + + free_irq (hcd->irq, hcd); + if (hcd->driver->flags & HCD_MEMORY) { + iounmap (hcd->regs); + release_mem_region (pci_resource_start (dev, 0), + pci_resource_len (dev, 0)); + } else { + release_region (pci_resource_start (dev, hcd->region), + pci_resource_len (dev, hcd->region)); + } + + usb_deregister_bus (&hcd->self); + if (atomic_read (&hcd->self.refcnt) != 1) { + dev_warn (hcd->controller, + "dangling refs (%d) to bus %d!\n", + atomic_read (&hcd->self.refcnt) - 1, + hcd->self.busnum); + } + hcd->driver->hcd_free (hcd); +} +EXPORT_SYMBOL (usb_hcd_pci_remove); + + +#ifdef CONFIG_PM + +/* + * Some "sleep" power levels imply updating struct usb_driver + * to include a callback asking hcds to do their bit by checking + * if all the drivers can suspend. Gets involved with remote wakeup. + * + * If there are pending urbs, then HCs will need to access memory, + * causing extra power drain. New sleep()/wakeup() PM calls might + * be needed, beyond PCI suspend()/resume(). The root hub timer + * still be accessing memory though ... + * + * FIXME: USB should have some power budgeting support working with + * all kinds of hubs. + * + * FIXME: This assumes only D0->D3 suspend and D3->D0 resume. + * D1 and D2 states should do something, yes? + * + * FIXME: Should provide generic enable_wake(), calling pci_enable_wake() + * for all supported states, so that USB remote wakeup can work for any + * devices that support it (and are connected via powered hubs). + * + * FIXME: resume doesn't seem to work right any more... + */ + + +// 2.4 kernels have issued concurrent resumes (w/APM) +// we defend against that error; PCI doesn't yet. + +/** + * usb_hcd_pci_suspend - power management suspend of a PCI-based HCD + * @dev: USB Host Controller being suspended + * + * Store this function in the HCD's struct pci_driver as suspend(). + */ +int usb_hcd_pci_suspend (struct pci_dev *dev, u32 state) +{ + struct usb_hcd *hcd; + int retval; + + hcd = pci_get_drvdata(dev); + dev_info (hcd->controller, "suspend to state %d\n", state); + + pci_save_state (dev, hcd->pci_state); + + // FIXME for all connected devices, leaf-to-root: + // driver->suspend() + // proposed "new 2.5 driver model" will automate that + + /* driver may want to disable DMA etc */ + retval = hcd->driver->suspend (hcd, state); + hcd->state = USB_STATE_SUSPENDED; + + pci_set_power_state (dev, state); + return retval; +} +EXPORT_SYMBOL (usb_hcd_pci_suspend); + +/** + * usb_hcd_pci_resume - power management resume of a PCI-based HCD + * @dev: USB Host Controller being resumed + * + * Store this function in the HCD's struct pci_driver as resume(). + */ +int usb_hcd_pci_resume (struct pci_dev *dev) +{ + struct usb_hcd *hcd; + int retval; + + hcd = pci_get_drvdata(dev); + dev_info (hcd->controller, "resume\n"); + + /* guard against multiple resumes (APM bug?) */ + atomic_inc (&hcd->resume_count); + if (atomic_read (&hcd->resume_count) != 1) { + dev_err (hcd->controller, "concurrent PCI resumes\n"); + retval = 0; + goto done; + } + + retval = -EBUSY; + if (hcd->state != USB_STATE_SUSPENDED) { + dev_dbg (hcd->controller, "can't resume, not suspended!\n"); + goto done; + } + hcd->state = USB_STATE_RESUMING; + + pci_set_power_state (dev, 0); + pci_restore_state (dev, hcd->pci_state); + + retval = hcd->driver->resume (hcd); + if (!HCD_IS_RUNNING (hcd->state)) { + dev_dbg (hcd->controller, "resume fail, retval %d\n", retval); + usb_hc_died (hcd); +// FIXME: recover, reset etc. + } else { + // FIXME for all connected devices, root-to-leaf: + // driver->resume (); + // proposed "new 2.5 driver model" will automate that + } + +done: + atomic_dec (&hcd->resume_count); + return retval; +} +EXPORT_SYMBOL (usb_hcd_pci_resume); + +#endif /* CONFIG_PM */ + + diff --git a/reactos/drivers/usb/cromwell/core/hcd.c b/reactos/drivers/usb/cromwell/core/hcd.c new file mode 100644 index 00000000000..a9efdf7a77f --- /dev/null +++ b/reactos/drivers/usb/cromwell/core/hcd.c @@ -0,0 +1,1499 @@ +/* + * (C) Copyright Linus Torvalds 1999 + * (C) Copyright Johannes Erdfelt 1999-2001 + * (C) Copyright Andreas Gal 1999 + * (C) Copyright Gregory P. Smith 1999 + * (C) Copyright Deti Fliegl 1999 + * (C) Copyright Randy Dunlap 2000 + * (C) Copyright David Brownell 2000-2002 + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program 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 General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#if 0 +#include + +#ifdef CONFIG_USB_DEBUG +#define DEBUG +#endif + +#include +#include +#include +#include +#include +#include /* for UTS_SYSNAME */ +#include /* for hcd->pdev and dma addressing */ +#include +#include + +#include +#else +#include "../usb_wrapper.h" +//#define DEBUG +#endif + +#include "hcd.h" + +// #define USB_BANDWIDTH_MESSAGES + +/*-------------------------------------------------------------------------*/ + +/* + * USB Host Controller Driver framework + * + * Plugs into usbcore (usb_bus) and lets HCDs share code, minimizing + * HCD-specific behaviors/bugs. + * + * This does error checks, tracks devices and urbs, and delegates to a + * "hc_driver" only for code (and data) that really needs to know about + * hardware differences. That includes root hub registers, i/o queues, + * and so on ... but as little else as possible. + * + * Shared code includes most of the "root hub" code (these are emulated, + * though each HC's hardware works differently) and PCI glue, plus request + * tracking overhead. The HCD code should only block on spinlocks or on + * hardware handshaking; blocking on software events (such as other kernel + * threads releasing resources, or completing actions) is all generic. + * + * Happens the USB 2.0 spec says this would be invisible inside the "USBD", + * and includes mostly a "HCDI" (HCD Interface) along with some APIs used + * only by the hub driver ... and that neither should be seen or used by + * usb client device drivers. + * + * Contributors of ideas or unattributed patches include: David Brownell, + * Roman Weissgaerber, Rory Bolt, Greg Kroah-Hartman, ... + * + * HISTORY: + * 2002-02-21 Pull in most of the usb_bus support from usb.c; some + * associated cleanup. "usb_hcd" still != "usb_bus". + * 2001-12-12 Initial patch version for Linux 2.5.1 kernel. + */ + +/*-------------------------------------------------------------------------*/ + +/* host controllers we manage */ +LIST_HEAD (usb_bus_list); +EXPORT_SYMBOL_GPL (usb_bus_list); + +/* used when allocating bus numbers */ +#define USB_MAXBUS 64 +struct usb_busmap { + unsigned long busmap [USB_MAXBUS / (8*sizeof (unsigned long))]; +}; +static struct usb_busmap busmap; + +/* used when updating list of hcds */ +DECLARE_MUTEX (usb_bus_list_lock); /* exported only for usbfs */ +EXPORT_SYMBOL_GPL (usb_bus_list_lock); + +/* used when updating hcd data */ +static spinlock_t hcd_data_lock = SPIN_LOCK_UNLOCKED; + +/*-------------------------------------------------------------------------*/ + +/* + * Sharable chunks of root hub code. + */ + +/*-------------------------------------------------------------------------*/ + +#define KERNEL_REL ((LINUX_VERSION_CODE >> 16) & 0x0ff) +#define KERNEL_VER ((LINUX_VERSION_CODE >> 8) & 0x0ff) + +/* usb 2.0 root hub device descriptor */ +static const u8 usb2_rh_dev_descriptor [18] = { + 0x12, /* __u8 bLength; */ + 0x01, /* __u8 bDescriptorType; Device */ + 0x00, 0x02, /* __u16 bcdUSB; v2.0 */ + + 0x09, /* __u8 bDeviceClass; HUB_CLASSCODE */ + 0x00, /* __u8 bDeviceSubClass; */ + 0x01, /* __u8 bDeviceProtocol; [ usb 2.0 single TT ]*/ + 0x08, /* __u8 bMaxPacketSize0; 8 Bytes */ + + 0x00, 0x00, /* __u16 idVendor; */ + 0x00, 0x00, /* __u16 idProduct; */ + KERNEL_VER, KERNEL_REL, /* __u16 bcdDevice */ + + 0x03, /* __u8 iManufacturer; */ + 0x02, /* __u8 iProduct; */ + 0x01, /* __u8 iSerialNumber; */ + 0x01 /* __u8 bNumConfigurations; */ +}; + +/* no usb 2.0 root hub "device qualifier" descriptor: one speed only */ + +/* usb 1.1 root hub device descriptor */ +static const u8 usb11_rh_dev_descriptor [18] = { + 0x12, /* __u8 bLength; */ + 0x01, /* __u8 bDescriptorType; Device */ + 0x10, 0x01, /* __u16 bcdUSB; v1.1 */ + + 0x09, /* __u8 bDeviceClass; HUB_CLASSCODE */ + 0x00, /* __u8 bDeviceSubClass; */ + 0x00, /* __u8 bDeviceProtocol; [ low/full speeds only ] */ + 0x08, /* __u8 bMaxPacketSize0; 8 Bytes */ + + 0x00, 0x00, /* __u16 idVendor; */ + 0x00, 0x00, /* __u16 idProduct; */ + KERNEL_VER, KERNEL_REL, /* __u16 bcdDevice */ + + 0x03, /* __u8 iManufacturer; */ + 0x02, /* __u8 iProduct; */ + 0x01, /* __u8 iSerialNumber; */ + 0x01 /* __u8 bNumConfigurations; */ +}; + + +/*-------------------------------------------------------------------------*/ + +/* Configuration descriptors for our root hubs */ + +static const u8 fs_rh_config_descriptor [] = { + + /* one configuration */ + 0x09, /* __u8 bLength; */ + 0x02, /* __u8 bDescriptorType; Configuration */ + 0x19, 0x00, /* __u16 wTotalLength; */ + 0x01, /* __u8 bNumInterfaces; (1) */ + 0x01, /* __u8 bConfigurationValue; */ + 0x00, /* __u8 iConfiguration; */ + 0x40, /* __u8 bmAttributes; + Bit 7: Bus-powered, + 6: Self-powered, + 5 Remote-wakwup, + 4..0: resvd */ + 0x00, /* __u8 MaxPower; */ + + /* USB 1.1: + * USB 2.0, single TT organization (mandatory): + * one interface, protocol 0 + * + * USB 2.0, multiple TT organization (optional): + * two interfaces, protocols 1 (like single TT) + * and 2 (multiple TT mode) ... config is + * sometimes settable + * NOT IMPLEMENTED + */ + + /* one interface */ + 0x09, /* __u8 if_bLength; */ + 0x04, /* __u8 if_bDescriptorType; Interface */ + 0x00, /* __u8 if_bInterfaceNumber; */ + 0x00, /* __u8 if_bAlternateSetting; */ + 0x01, /* __u8 if_bNumEndpoints; */ + 0x09, /* __u8 if_bInterfaceClass; HUB_CLASSCODE */ + 0x00, /* __u8 if_bInterfaceSubClass; */ + 0x00, /* __u8 if_bInterfaceProtocol; [usb1.1 or single tt] */ + 0x00, /* __u8 if_iInterface; */ + + /* one endpoint (status change endpoint) */ + 0x07, /* __u8 ep_bLength; */ + 0x05, /* __u8 ep_bDescriptorType; Endpoint */ + 0x81, /* __u8 ep_bEndpointAddress; IN Endpoint 1 */ + 0x03, /* __u8 ep_bmAttributes; Interrupt */ + 0x02, 0x00, /* __u16 ep_wMaxPacketSize; 1 + (MAX_ROOT_PORTS / 8) */ + 0xff /* __u8 ep_bInterval; (255ms -- usb 2.0 spec) */ +}; + +static const u8 hs_rh_config_descriptor [] = { + + /* one configuration */ + 0x09, /* __u8 bLength; */ + 0x02, /* __u8 bDescriptorType; Configuration */ + 0x19, 0x00, /* __u16 wTotalLength; */ + 0x01, /* __u8 bNumInterfaces; (1) */ + 0x01, /* __u8 bConfigurationValue; */ + 0x00, /* __u8 iConfiguration; */ + 0x40, /* __u8 bmAttributes; + Bit 7: Bus-powered, + 6: Self-powered, + 5 Remote-wakwup, + 4..0: resvd */ + 0x00, /* __u8 MaxPower; */ + + /* USB 1.1: + * USB 2.0, single TT organization (mandatory): + * one interface, protocol 0 + * + * USB 2.0, multiple TT organization (optional): + * two interfaces, protocols 1 (like single TT) + * and 2 (multiple TT mode) ... config is + * sometimes settable + * NOT IMPLEMENTED + */ + + /* one interface */ + 0x09, /* __u8 if_bLength; */ + 0x04, /* __u8 if_bDescriptorType; Interface */ + 0x00, /* __u8 if_bInterfaceNumber; */ + 0x00, /* __u8 if_bAlternateSetting; */ + 0x01, /* __u8 if_bNumEndpoints; */ + 0x09, /* __u8 if_bInterfaceClass; HUB_CLASSCODE */ + 0x00, /* __u8 if_bInterfaceSubClass; */ + 0x00, /* __u8 if_bInterfaceProtocol; [usb1.1 or single tt] */ + 0x00, /* __u8 if_iInterface; */ + + /* one endpoint (status change endpoint) */ + 0x07, /* __u8 ep_bLength; */ + 0x05, /* __u8 ep_bDescriptorType; Endpoint */ + 0x81, /* __u8 ep_bEndpointAddress; IN Endpoint 1 */ + 0x03, /* __u8 ep_bmAttributes; Interrupt */ + 0x02, 0x00, /* __u16 ep_wMaxPacketSize; 1 + (MAX_ROOT_PORTS / 8) */ + 0x0c /* __u8 ep_bInterval; (256ms -- usb 2.0 spec) */ +}; + +/*-------------------------------------------------------------------------*/ + +/* + * helper routine for returning string descriptors in UTF-16LE + * input can actually be ISO-8859-1; ASCII is its 7-bit subset + */ +static int ascii2utf (char *s, u8 *utf, int utfmax) +{ + int retval; + + for (retval = 0; *s && utfmax > 1; utfmax -= 2, retval += 2) { + *utf++ = *s++; + *utf++ = 0; + } + return retval; +} + +/* + * rh_string - provides manufacturer, product and serial strings for root hub + * @id: the string ID number (1: serial number, 2: product, 3: vendor) + * @hcd: the host controller for this root hub + * @type: string describing our driver + * @data: return packet in UTF-16 LE + * @len: length of the return packet + * + * Produces either a manufacturer, product or serial number string for the + * virtual root hub device. + */ +static int rh_string ( + int id, + struct usb_hcd *hcd, + u8 *data, + int len +) { + char buf [100]; + + // language ids + if (id == 0) { + *data++ = 4; *data++ = 3; /* 4 bytes string data */ + *data++ = 0x09; *data++ = 0x04; /* MSFT-speak for "en-us" */ + return 4; + + // serial number + } else if (id == 1) { + strcpy (buf, hcd->self.bus_name); + + // product description + } else if (id == 2) { + strcpy (buf, hcd->product_desc); + + // id 3 == vendor description + } else if (id == 3) { + sprintf (buf, "%s %s %s", UTS_SYSNAME, UTS_RELEASE, + hcd->description); + + // unsupported IDs --> "protocol stall" + } else + return 0; + + data [0] = 2 * (strlen (buf) + 1); + data [1] = 3; /* type == string */ + return 2 + ascii2utf (buf, data + 2, len - 2); +} + + +/* Root hub control transfers execute synchronously */ +static int rh_call_control (struct usb_hcd *hcd, struct urb *urb) +{ + struct usb_ctrlrequest *cmd = (struct usb_ctrlrequest *) urb->setup_packet; + u16 typeReq, wValue, wIndex, wLength; + const u8 *bufp = 0; + u8 *ubuf = urb->transfer_buffer; + int len = 0; + //unsigned long flags; + + typeReq = (cmd->bRequestType << 8) | cmd->bRequest; + wValue = le16_to_cpu (cmd->wValue); + wIndex = le16_to_cpu (cmd->wIndex); + wLength = le16_to_cpu (cmd->wLength); + + if (wLength > urb->transfer_buffer_length) + goto error; + + /* set up for success */ + urb->status = 0; + urb->actual_length = wLength; + switch (typeReq) { + + /* DEVICE REQUESTS */ + + case DeviceRequest | USB_REQ_GET_STATUS: + // DEVICE_REMOTE_WAKEUP + ubuf [0] = 1; // selfpowered + ubuf [1] = 0; + /* FALLTHROUGH */ + case DeviceOutRequest | USB_REQ_CLEAR_FEATURE: + case DeviceOutRequest | USB_REQ_SET_FEATURE: + dev_dbg (hcd->controller, "no device features yet yet\n"); + break; + case DeviceRequest | USB_REQ_GET_CONFIGURATION: + ubuf [0] = 1; + /* FALLTHROUGH */ + case DeviceOutRequest | USB_REQ_SET_CONFIGURATION: + break; + case DeviceRequest | USB_REQ_GET_DESCRIPTOR: + switch (wValue & 0xff00) { + case USB_DT_DEVICE << 8: + if (hcd->driver->flags & HCD_USB2) + bufp = usb2_rh_dev_descriptor; + else if (hcd->driver->flags & HCD_USB11) + bufp = usb11_rh_dev_descriptor; + else + goto error; + len = 18; + break; + case USB_DT_CONFIG << 8: + if (hcd->driver->flags & HCD_USB2) { + bufp = hs_rh_config_descriptor; + len = sizeof hs_rh_config_descriptor; + } else { + bufp = fs_rh_config_descriptor; + len = sizeof fs_rh_config_descriptor; + } + break; + case USB_DT_STRING << 8: + urb->actual_length = rh_string ( + wValue & 0xff, hcd, + ubuf, wLength); + break; + default: + goto error; + } + break; + case DeviceRequest | USB_REQ_GET_INTERFACE: + ubuf [0] = 0; + /* FALLTHROUGH */ + case DeviceOutRequest | USB_REQ_SET_INTERFACE: + break; + case DeviceOutRequest | USB_REQ_SET_ADDRESS: + // wValue == urb->dev->devaddr + dev_dbg (hcd->controller, "root hub device address %d\n", + wValue); + break; + + /* INTERFACE REQUESTS (no defined feature/status flags) */ + + /* ENDPOINT REQUESTS */ + + case EndpointRequest | USB_REQ_GET_STATUS: + // ENDPOINT_HALT flag + ubuf [0] = 0; + ubuf [1] = 0; + /* FALLTHROUGH */ + case EndpointOutRequest | USB_REQ_CLEAR_FEATURE: + case EndpointOutRequest | USB_REQ_SET_FEATURE: + dev_dbg (hcd->controller, "no endpoint features yet\n"); + break; + + /* CLASS REQUESTS (and errors) */ + + default: + /* non-generic request */ + urb->status = hcd->driver->hub_control (hcd, + typeReq, wValue, wIndex, + ubuf, wLength); + break; +error: + /* "protocol stall" on error */ + urb->status = -EPIPE; + dev_dbg (hcd->controller, "unsupported hub control message (maxchild %d)\n", + urb->dev->maxchild); + } + if (urb->status) { + urb->actual_length = 0; + dev_dbg (hcd->controller, "CTRL: TypeReq=0x%x val=0x%x idx=0x%x len=%d ==> %d\n", + typeReq, wValue, wIndex, wLength, urb->status); + } + if (bufp) { + if (urb->transfer_buffer_length < len) + len = urb->transfer_buffer_length; + urb->actual_length = len; + // always USB_DIR_IN, toward host + memcpy (ubuf, bufp, len); + } + + /* any errors get returned through the urb completion */ + local_irq_save (flags); + usb_hcd_giveback_urb (hcd, urb, NULL); + local_irq_restore (flags); + return 0; +} + +/*-------------------------------------------------------------------------*/ + +/* + * Root Hub interrupt transfers are synthesized with a timer. + * Completions are called in_interrupt() but not in_irq(). + */ + +static void rh_report_status (unsigned long ptr); + +static int rh_status_urb (struct usb_hcd *hcd, struct urb *urb) +{ + int len = 1 + (urb->dev->maxchild / 8); + + /* rh_timer protected by hcd_data_lock */ + if (hcd->rh_timer.data + || urb->status != -EINPROGRESS + || urb->transfer_buffer_length < len) { + dev_dbg (hcd->controller, + "not queuing rh status urb, stat %d\n", + urb->status); + return -EINVAL; + } + + init_timer (&hcd->rh_timer); + + hcd->rh_timer.function = rh_report_status; + hcd->rh_timer.data = (unsigned long) urb; + /* USB 2.0 spec says 256msec; this is close enough */ + hcd->rh_timer.expires = jiffies + HZ/4; + add_timer (&hcd->rh_timer); + urb->hcpriv = hcd; /* nonzero to indicate it's queued */ + return 0; +} + +/* timer callback */ + +static void rh_report_status (unsigned long ptr) +{ + struct urb *urb; + struct usb_hcd *hcd; + int length; + //unsigned long flags; + + urb = (struct urb *) ptr; + local_irq_save (flags); + spin_lock (&urb->lock); + + /* do nothing if the hc is gone or the urb's been unlinked */ + if (!urb->dev + || urb->status != -EINPROGRESS + || (hcd = urb->dev->bus->hcpriv) == 0 + || !HCD_IS_RUNNING (hcd->state)) { + spin_unlock (&urb->lock); + local_irq_restore (flags); + return; + } + + length = hcd->driver->hub_status_data (hcd, urb->transfer_buffer); + + /* complete the status urb, or retrigger the timer */ + spin_lock (&hcd_data_lock); + if (length > 0) { + hcd->rh_timer.data = 0; + urb->actual_length = length; + urb->status = 0; + urb->hcpriv = 0; + } else + mod_timer (&hcd->rh_timer, jiffies + HZ/4); + spin_unlock (&hcd_data_lock); + spin_unlock (&urb->lock); + + /* local irqs are always blocked in completions */ + if (length > 0) + usb_hcd_giveback_urb (hcd, urb, NULL); + local_irq_restore (flags); +} + +/*-------------------------------------------------------------------------*/ + +static int rh_urb_enqueue (struct usb_hcd *hcd, struct urb *urb) +{ + if (usb_pipeint (urb->pipe)) { + int retval; + unsigned long flags; + + spin_lock_irqsave (&hcd_data_lock, flags); + retval = rh_status_urb (hcd, urb); + spin_unlock_irqrestore (&hcd_data_lock, flags); + return retval; + } + if (usb_pipecontrol (urb->pipe)) + return rh_call_control (hcd, urb); + else + return -EINVAL; +} + +/*-------------------------------------------------------------------------*/ + +void usb_rh_status_dequeue (struct usb_hcd *hcd, struct urb *urb) +{ + //unsigned long flags; + + /* note: always a synchronous unlink */ + del_timer_sync (&hcd->rh_timer); + hcd->rh_timer.data = 0; + + local_irq_save (flags); + urb->hcpriv = 0; + usb_hcd_giveback_urb (hcd, urb, NULL); + local_irq_restore (flags); +} + +/*-------------------------------------------------------------------------*/ + +/* exported only within usbcore */ +void usb_bus_get (struct usb_bus *bus) +{ + atomic_inc (&bus->refcnt); +} + +/* exported only within usbcore */ +void usb_bus_put (struct usb_bus *bus) +{ + if (atomic_dec_and_test (&bus->refcnt)) + kfree (bus); +} + +/*-------------------------------------------------------------------------*/ + +/** + * usb_bus_init - shared initialization code + * @bus: the bus structure being initialized + * + * This code is used to initialize a usb_bus structure, memory for which is + * separately managed. + */ +void STDCALL usb_bus_init (struct usb_bus *bus) +{ + memset (&bus->devmap, 0, sizeof(struct usb_devmap)); + + bus->devnum_next = 1; + + bus->root_hub = NULL; + bus->hcpriv = NULL; + bus->busnum = -1; + bus->bandwidth_allocated = 0; + bus->bandwidth_int_reqs = 0; + bus->bandwidth_isoc_reqs = 0; + + INIT_LIST_HEAD (&bus->bus_list); + + atomic_set (&bus->refcnt, 1); +} + +/** + * usb_alloc_bus - creates a new USB host controller structure + * @op: pointer to a struct usb_operations that this bus structure should use + * Context: !in_interrupt() + * + * Creates a USB host controller bus structure with the specified + * usb_operations and initializes all the necessary internal objects. + * + * If no memory is available, NULL is returned. + * + * The caller should call usb_free_bus() when it is finished with the structure. + */ +struct usb_bus STDCALL *usb_alloc_bus (struct usb_operations *op) +{ + struct usb_bus *bus; + + bus = kmalloc (sizeof *bus, GFP_KERNEL); + if (!bus) + return NULL; + usb_bus_init (bus); + bus->op = op; + return bus; +} + +/** + * usb_free_bus - frees the memory used by a bus structure + * @bus: pointer to the bus to free + * + * To be invoked by a HCD, only as the last step of decoupling from + * hardware. It is an error to call this if the reference count is + * anything but one. That would indicate that some system component + * did not correctly shut down, and thought the hardware was still + * accessible. + */ +void STDCALL usb_free_bus (struct usb_bus *bus) +{ + if (!bus) + return; + if (atomic_read (&bus->refcnt) != 1) + err ("usb_free_bus #%d, count != 1", bus->busnum); + usb_bus_put (bus); +} + +/*-------------------------------------------------------------------------*/ + +/** + * usb_register_bus - registers the USB host controller with the usb core + * @bus: pointer to the bus to register + * Context: !in_interrupt() + * + * Assigns a bus number, and links the controller into usbcore data + * structures so that it can be seen by scanning the bus list. + */ +void STDCALL usb_register_bus(struct usb_bus *bus) +{ + int busnum; + + down (&usb_bus_list_lock); + busnum = find_next_zero_bit (busmap.busmap, USB_MAXBUS, 1); + if (busnum < USB_MAXBUS) { + set_bit (busnum, busmap.busmap); + bus->busnum = busnum; + } else + warn ("too many buses"); + + usb_bus_get (bus); + + /* Add it to the list of buses */ + list_add (&bus->bus_list, &usb_bus_list); + up (&usb_bus_list_lock); + + usbfs_add_bus (bus); + + dev_info (bus->controller, "new USB bus registered, assigned bus number %d\n", bus->busnum); +} + +/** + * usb_deregister_bus - deregisters the USB host controller + * @bus: pointer to the bus to deregister + * Context: !in_interrupt() + * + * Recycles the bus number, and unlinks the controller from usbcore data + * structures so that it won't be seen by scanning the bus list. + */ +void STDCALL usb_deregister_bus (struct usb_bus *bus) +{ + dev_info (bus->controller, "USB bus %d deregistered\n", bus->busnum); + + /* + * NOTE: make sure that all the devices are removed by the + * controller code, as well as having it call this when cleaning + * itself up + */ + down (&usb_bus_list_lock); + list_del (&bus->bus_list); + up (&usb_bus_list_lock); + + usbfs_remove_bus (bus); + + clear_bit (bus->busnum, busmap.busmap); + + usb_bus_put (bus); +} + +/** + * usb_register_root_hub - called by HCD to register its root hub + * @usb_dev: the usb root hub device to be registered. + * @parent_dev: the parent device of this root hub. + * + * The USB host controller calls this function to register the root hub + * properly with the USB subsystem. It sets up the device properly in + * the driverfs tree, and then calls usb_new_device() to register the + * usb device. + */ +int STDCALL usb_register_root_hub (struct usb_device *usb_dev, struct device *parent_dev) +{ + int retval; + + sprintf (&usb_dev->dev.bus_id[0], "usb%d", usb_dev->bus->busnum); + usb_dev->state = USB_STATE_DEFAULT; + retval = usb_new_device (usb_dev, parent_dev); + if (retval) + dev_err (parent_dev, "can't register root hub for %s, %d\n", + usb_dev->dev.bus_id, retval); + return retval; +} + + +/*-------------------------------------------------------------------------*/ + +/** + * usb_calc_bus_time - approximate periodic transaction time in nanoseconds + * @speed: from dev->speed; USB_SPEED_{LOW,FULL,HIGH} + * @is_input: true iff the transaction sends data to the host + * @isoc: true for isochronous transactions, false for interrupt ones + * @bytecount: how many bytes in the transaction. + * + * Returns approximate bus time in nanoseconds for a periodic transaction. + * See USB 2.0 spec section 5.11.3; only periodic transfers need to be + * scheduled in software, this function is only used for such scheduling. + */ +long STDCALL usb_calc_bus_time (int speed, int is_input, int isoc, int bytecount) +{ + unsigned long tmp; + + switch (speed) { + case USB_SPEED_LOW: /* INTR only */ + if (is_input) { + tmp = (67667L * (31L + 10L * BitTime (bytecount))) / 1000L; + return (64060L + (2 * BW_HUB_LS_SETUP) + BW_HOST_DELAY + tmp); + } else { + tmp = (66700L * (31L + 10L * BitTime (bytecount))) / 1000L; + return (64107L + (2 * BW_HUB_LS_SETUP) + BW_HOST_DELAY + tmp); + } + case USB_SPEED_FULL: /* ISOC or INTR */ + if (isoc) { + tmp = (8354L * (31L + 10L * BitTime (bytecount))) / 1000L; + return (((is_input) ? 7268L : 6265L) + BW_HOST_DELAY + tmp); + } else { + tmp = (8354L * (31L + 10L * BitTime (bytecount))) / 1000L; + return (9107L + BW_HOST_DELAY + tmp); + } + case USB_SPEED_HIGH: /* ISOC or INTR */ + // FIXME adjust for input vs output + if (isoc) + tmp = HS_USECS (bytecount); + else + tmp = HS_USECS_ISO (bytecount); + return tmp; + default: + dbg ("bogus device speed!"); + return -1; + } +} + +/* + * usb_check_bandwidth(): + * + * old_alloc is from host_controller->bandwidth_allocated in microseconds; + * bustime is from calc_bus_time(), but converted to microseconds. + * + * returns if successful, + * or -ENOSPC if bandwidth request fails. + * + * FIXME: + * This initial implementation does not use Endpoint.bInterval + * in managing bandwidth allocation. + * It probably needs to be expanded to use Endpoint.bInterval. + * This can be done as a later enhancement (correction). + * + * This will also probably require some kind of + * frame allocation tracking...meaning, for example, + * that if multiple drivers request interrupts every 10 USB frames, + * they don't all have to be allocated at + * frame numbers N, N+10, N+20, etc. Some of them could be at + * N+11, N+21, N+31, etc., and others at + * N+12, N+22, N+32, etc. + * + * Similarly for isochronous transfers... + * + * Individual HCDs can schedule more directly ... this logic + * is not correct for high speed transfers. + */ +int STDCALL usb_check_bandwidth (struct usb_device *dev, struct urb *urb) +{ + unsigned int pipe = urb->pipe; + long bustime; + int is_in = usb_pipein (pipe); + int is_iso = usb_pipeisoc (pipe); + int old_alloc = dev->bus->bandwidth_allocated; + int new_alloc; + + + bustime = NS_TO_US (usb_calc_bus_time (dev->speed, is_in, is_iso, + usb_maxpacket (dev, pipe, !is_in))); + if (is_iso) + bustime /= urb->number_of_packets; + + new_alloc = old_alloc + (int) bustime; + if (new_alloc > FRAME_TIME_MAX_USECS_ALLOC) { +#ifdef DEBUG + char *mode = +#ifdef CONFIG_USB_BANDWIDTH + ""; +#else + "would have "; +#endif + dev_dbg (&dev->dev, "usb_check_bandwidth %sFAILED: %d + %ld = %d usec\n", + mode, old_alloc, bustime, new_alloc); +#endif +#ifdef CONFIG_USB_BANDWIDTH + bustime = -ENOSPC; /* report error */ +#endif + } + + return bustime; +} + + +/** + * usb_claim_bandwidth - records bandwidth for a periodic transfer + * @dev: source/target of request + * @urb: request (urb->dev == dev) + * @bustime: bandwidth consumed, in (average) microseconds per frame + * @isoc: true iff the request is isochronous + * + * Bus bandwidth reservations are recorded purely for diagnostic purposes. + * HCDs are expected not to overcommit periodic bandwidth, and to record such + * reservations whenever endpoints are added to the periodic schedule. + * + * FIXME averaging per-frame is suboptimal. Better to sum over the HCD's + * entire periodic schedule ... 32 frames for OHCI, 1024 for UHCI, settable + * for EHCI (256/512/1024 frames, default 1024) and have the bus expose how + * large its periodic schedule is. + */ +void STDCALL usb_claim_bandwidth (struct usb_device *dev, struct urb *urb, int bustime, int isoc) +{ + dev->bus->bandwidth_allocated += bustime; + if (isoc) + dev->bus->bandwidth_isoc_reqs++; + else + dev->bus->bandwidth_int_reqs++; + urb->bandwidth = bustime; + +#ifdef USB_BANDWIDTH_MESSAGES + dev_dbg (&dev->dev, "bandwidth alloc increased by %d (%s) to %d for %d requesters\n", + bustime, + isoc ? "ISOC" : "INTR", + dev->bus->bandwidth_allocated, + dev->bus->bandwidth_int_reqs + dev->bus->bandwidth_isoc_reqs); +#endif +} + + +/** + * usb_release_bandwidth - reverses effect of usb_claim_bandwidth() + * @dev: source/target of request + * @urb: request (urb->dev == dev) + * @isoc: true iff the request is isochronous + * + * This records that previously allocated bandwidth has been released. + * Bandwidth is released when endpoints are removed from the host controller's + * periodic schedule. + */ +void STDCALL usb_release_bandwidth (struct usb_device *dev, struct urb *urb, int isoc) +{ + dev->bus->bandwidth_allocated -= urb->bandwidth; + if (isoc) + dev->bus->bandwidth_isoc_reqs--; + else + dev->bus->bandwidth_int_reqs--; + +#ifdef USB_BANDWIDTH_MESSAGES + dev_dbg (&dev->dev, "bandwidth alloc reduced by %d (%s) to %d for %d requesters\n", + urb->bandwidth, + isoc ? "ISOC" : "INTR", + dev->bus->bandwidth_allocated, + dev->bus->bandwidth_int_reqs + dev->bus->bandwidth_isoc_reqs); +#endif + urb->bandwidth = 0; +} + + +/*-------------------------------------------------------------------------*/ + +/* + * Generic HC operations. + */ + +/*-------------------------------------------------------------------------*/ + +/* called from khubd, or root hub init threads for hcd-private init */ +static int hcd_alloc_dev (struct usb_device *udev) +{ + struct hcd_dev *dev; + struct usb_hcd *hcd; + unsigned long flags; + + if (!udev || udev->hcpriv) + return -EINVAL; + if (!udev->bus || !udev->bus->hcpriv) + return -ENODEV; + hcd = udev->bus->hcpriv; + if (hcd->state == USB_STATE_QUIESCING) + return -ENOLINK; + + dev = (struct hcd_dev *) kmalloc (sizeof *dev, GFP_KERNEL); + if (dev == NULL) + return -ENOMEM; + memset (dev, 0, sizeof *dev); + + INIT_LIST_HEAD (&dev->dev_list); + INIT_LIST_HEAD (&dev->urb_list); + + spin_lock_irqsave (&hcd_data_lock, flags); + list_add (&dev->dev_list, &hcd->dev_list); + // refcount is implicit + udev->hcpriv = dev; + spin_unlock_irqrestore (&hcd_data_lock, flags); + + return 0; +} + +/*-------------------------------------------------------------------------*/ + +static void urb_unlink (struct urb *urb) +{ + unsigned long flags; + struct usb_device *dev; + + /* Release any periodic transfer bandwidth */ + if (urb->bandwidth) + usb_release_bandwidth (urb->dev, urb, + usb_pipeisoc (urb->pipe)); + + /* clear all state linking urb to this dev (and hcd) */ + + spin_lock_irqsave (&hcd_data_lock, flags); + list_del_init (&urb->urb_list); + dev = urb->dev; + spin_unlock_irqrestore (&hcd_data_lock, flags); + usb_put_dev (dev); +} + + +/* may be called in any context with a valid urb->dev usecount + * caller surrenders "ownership" of urb + * expects usb_submit_urb() to have sanity checked and conditioned all + * inputs in the urb + */ +static int hcd_submit_urb (struct urb *urb, int mem_flags) +{ + int status; + struct usb_hcd *hcd = urb->dev->bus->hcpriv; + struct hcd_dev *dev = urb->dev->hcpriv; + unsigned long flags; + + + if (!hcd || !dev) + return -ENODEV; +// printk("submit_urb %p, # %i, t %i\n",urb,urb->dev->devnum,usb_pipetype(urb->pipe)); + /* + * FIXME: make urb timeouts be generic, keeping the HCD cores + * as simple as possible. + */ + + // NOTE: a generic device/urb monitoring hook would go here. + // hcd_monitor_hook(MONITOR_URB_SUBMIT, urb) + // It would catch submission paths for all urbs. + + /* + * Atomically queue the urb, first to our records, then to the HCD. + * Access to urb->status is controlled by urb->lock ... changes on + * i/o completion (normal or fault) or unlinking. + */ + + // FIXME: verify that quiescing hc works right (RH cleans up) + + spin_lock_irqsave (&hcd_data_lock, flags); + if (HCD_IS_RUNNING (hcd->state) && hcd->state != USB_STATE_QUIESCING) { + usb_get_dev (urb->dev); + list_add_tail (&urb->urb_list, &dev->urb_list); + status = 0; + } else { + INIT_LIST_HEAD (&urb->urb_list); + status = -ESHUTDOWN; + } + spin_unlock_irqrestore (&hcd_data_lock, flags); + if (status) + return status; + + /* increment urb's reference count as part of giving it to the HCD + * (which now controls it). HCD guarantees that it either returns + * an error or calls giveback(), but not both. + */ + + urb = usb_get_urb (urb); + if (urb->dev == hcd->self.root_hub) { + /* NOTE: requirement on hub callers (usbfs and the hub + * driver, for now) that URBs' urb->transfer_buffer be + * valid and usb_buffer_{sync,unmap}() not be needed, since + * they could clobber root hub response data. + */ + urb->transfer_flags |= URB_NO_DMA_MAP; + status = rh_urb_enqueue (hcd, urb); + goto done; + } + + /* lower level hcd code should use *_dma exclusively, + * unless it uses pio or talks to another transport. + */ + if (!(urb->transfer_flags & URB_NO_DMA_MAP) + && hcd->controller->dma_mask) { + if (usb_pipecontrol (urb->pipe)) + urb->setup_dma = dma_map_single ( + hcd->controller, + urb->setup_packet, + sizeof (struct usb_ctrlrequest), + DMA_TO_DEVICE); + if (urb->transfer_buffer_length != 0) + urb->transfer_dma = dma_map_single ( + hcd->controller, + urb->transfer_buffer, + urb->transfer_buffer_length, + usb_pipein (urb->pipe) + ? DMA_FROM_DEVICE + : DMA_TO_DEVICE); + } + + status = hcd->driver->urb_enqueue (hcd, urb, mem_flags); +done: + if (status) { + usb_put_urb (urb); + urb_unlink (urb); + } + return status; +} + +/*-------------------------------------------------------------------------*/ + +/* called in any context */ +static int hcd_get_frame_number (struct usb_device *udev) +{ + struct usb_hcd *hcd = (struct usb_hcd *)udev->bus->hcpriv; + return hcd->driver->get_frame_number (hcd); +} + +/*-------------------------------------------------------------------------*/ + +/* this makes the hcd giveback() the urb more quickly, by kicking it + * off hardware queues (which may take a while) and returning it as + * soon as practical. we've already set up the urb's return status, + * but we can't know if the callback completed already. + */ +static void +unlink1 (struct usb_hcd *hcd, struct urb *urb) +{ + if (urb == (struct urb *) hcd->rh_timer.data) + usb_rh_status_dequeue (hcd, urb); + else { + int value; + + /* failures "should" be harmless */ + value = hcd->driver->urb_dequeue (hcd, urb); + if (value != 0) + dev_dbg (hcd->controller, + "dequeue %p --> %d\n", + urb, value); + } +} + +struct completion_splice { // modified urb context: + /* did we complete? */ + struct completion done; + + /* original urb data */ + usb_complete_t complete; + void *context; +}; + +static void unlink_complete (struct urb *urb, struct pt_regs *regs) +{ + struct completion_splice *splice; + + splice = (struct completion_splice *) urb->context; + + /* issue original completion call */ + urb->complete = splice->complete; + urb->context = splice->context; + urb->complete (urb, regs); + + /* then let the synchronous unlink call complete */ + complete (&splice->done); +} + +/* + * called in any context; note ASYNC_UNLINK restrictions + * + * caller guarantees urb won't be recycled till both unlink() + * and the urb's completion function return + */ +static int hcd_unlink_urb (struct urb *urb) +{ + struct hcd_dev *dev; + struct usb_hcd *hcd = 0; + struct device *sys = 0; + unsigned long flags; + struct completion_splice splice; + int retval; + + if (!urb) + return -EINVAL; + + /* + * we contend for urb->status with the hcd core, + * which changes it while returning the urb. + * + * Caller guaranteed that the urb pointer hasn't been freed, and + * that it was submitted. But as a rule it can't know whether or + * not it's already been unlinked ... so we respect the reversed + * lock sequence needed for the usb_hcd_giveback_urb() code paths + * (urb lock, then hcd_data_lock) in case some other CPU is now + * unlinking it. + */ + spin_lock_irqsave (&urb->lock, flags); + spin_lock (&hcd_data_lock); + + if (!urb->dev || !urb->dev->bus) { + retval = -ENODEV; + goto done; + } + + dev = urb->dev->hcpriv; + sys = &urb->dev->dev; + hcd = urb->dev->bus->hcpriv; + if (!dev || !hcd) { + retval = -ENODEV; + goto done; + } + + if (!urb->hcpriv) { + retval = -EINVAL; + goto done; + } + + /* Any status except -EINPROGRESS means something already started to + * unlink this URB from the hardware. So there's no more work to do. + * + * FIXME use better explicit urb state + */ + if (urb->status != -EINPROGRESS) { + retval = -EBUSY; + goto done; + } + + /* maybe set up to block until the urb's completion fires. the + * lower level hcd code is always async, locking on urb->status + * updates; an intercepted completion unblocks us. + */ + if (!(urb->transfer_flags & URB_ASYNC_UNLINK)) { + if (in_interrupt ()) { + dev_dbg (hcd->controller, "non-async unlink in_interrupt"); + retval = -EWOULDBLOCK; + goto done; + } + /* synchronous unlink: block till we see the completion */ + init_completion (&splice.done); + splice.complete = urb->complete; + splice.context = urb->context; + urb->complete = unlink_complete; + urb->context = &splice; + urb->status = -ENOENT; + } else { + /* asynchronous unlink */ + urb->status = -ECONNRESET; + } + spin_unlock (&hcd_data_lock); + spin_unlock_irqrestore (&urb->lock, flags); + + // FIXME remove splicing, so this becomes unlink1 (hcd, urb); + if (urb == (struct urb *) hcd->rh_timer.data) { + usb_rh_status_dequeue (hcd, urb); + retval = 0; + } else { + retval = hcd->driver->urb_dequeue (hcd, urb); + + /* hcds shouldn't really fail these calls, but... */ + if (retval) { + dev_dbg (sys, "dequeue %p --> %d\n", urb, retval); + if (!(urb->transfer_flags & URB_ASYNC_UNLINK)) { + spin_lock_irqsave (&urb->lock, flags); + urb->complete = splice.complete; + urb->context = splice.context; + spin_unlock_irqrestore (&urb->lock, flags); + } + goto bye; + } + } + + /* block till giveback, if needed */ + if (urb->transfer_flags & URB_ASYNC_UNLINK) + return -EINPROGRESS; + + wait_for_completion (&splice.done); + return 0; + +done: + spin_unlock (&hcd_data_lock); + spin_unlock_irqrestore (&urb->lock, flags); +bye: + if (retval && sys && sys->driver) + dev_dbg (sys, "hcd_unlink_urb %p fail %d\n", urb, retval); + return retval; +} + +/*-------------------------------------------------------------------------*/ + +/* disables the endpoint: cancels any pending urbs, then synchronizes with + * the hcd to make sure all endpoint state is gone from hardware. use for + * set_configuration, set_interface, driver removal, physical disconnect. + * + * example: a qh stored in hcd_dev.ep[], holding state related to endpoint + * type, maxpacket size, toggle, halt status, and scheduling. + */ +static void hcd_endpoint_disable (struct usb_device *udev, int endpoint) +{ + unsigned long flags; + struct hcd_dev *dev; + struct usb_hcd *hcd; + struct urb *urb; + unsigned epnum = endpoint & USB_ENDPOINT_NUMBER_MASK; + + dev = udev->hcpriv; + hcd = udev->bus->hcpriv; + +rescan: + /* (re)block new requests, as best we can */ + if (endpoint & USB_DIR_IN) { + usb_endpoint_halt (udev, epnum, 0); + udev->epmaxpacketin [epnum] = 0; + } else { + usb_endpoint_halt (udev, epnum, 1); + udev->epmaxpacketout [epnum] = 0; + } + + /* then kill any current requests */ + spin_lock_irqsave (&hcd_data_lock, flags); + list_for_each_entry (urb, &dev->urb_list, urb_list) { + int tmp = urb->pipe; + + /* ignore urbs for other endpoints */ + if (usb_pipeendpoint (tmp) != epnum) + continue; + if ((tmp ^ endpoint) & USB_DIR_IN) + continue; + + /* another cpu may be in hcd, spinning on hcd_data_lock + * to giveback() this urb. the races here should be + * small, but a full fix needs a new "can't submit" + * urb state. + */ + if (urb->status != -EINPROGRESS) + continue; + usb_get_urb (urb); + spin_unlock_irqrestore (&hcd_data_lock, flags); + + spin_lock_irqsave (&urb->lock, flags); + tmp = urb->status; + if (tmp == -EINPROGRESS) + urb->status = -ESHUTDOWN; + spin_unlock_irqrestore (&urb->lock, flags); + + /* kick hcd unless it's already returning this */ + if (tmp == -EINPROGRESS) { + tmp = urb->pipe; + unlink1 (hcd, urb); + dev_dbg (hcd->controller, + "shutdown urb %p pipe %08x ep%d%s%s\n", + urb, tmp, usb_pipeendpoint (tmp), + (tmp & USB_DIR_IN) ? "in" : "out", + ({ char *s; \ + switch (usb_pipetype (tmp)) { \ + case PIPE_CONTROL: s = ""; break; \ + case PIPE_BULK: s = "-bulk"; break; \ + case PIPE_INTERRUPT: s = "-intr"; break; \ + default: s = "-iso"; break; \ + }; s;})); + } + usb_put_urb (urb); + + /* list contents may have changed */ + goto rescan; + } + spin_unlock_irqrestore (&hcd_data_lock, flags); + + /* synchronize with the hardware, so old configuration state + * clears out immediately (and will be freed). + */ + might_sleep (); + if (hcd->driver->endpoint_disable) + hcd->driver->endpoint_disable (hcd, dev, endpoint); +} + +/*-------------------------------------------------------------------------*/ + +/* called by khubd, rmmod, apmd, or other thread for hcd-private cleanup. + * we're guaranteed that the device is fully quiesced. also, that each + * endpoint has been hcd_endpoint_disabled. + */ + +static int hcd_free_dev (struct usb_device *udev) +{ + struct hcd_dev *dev; + struct usb_hcd *hcd; + unsigned long flags; + + if (!udev || !udev->hcpriv) + return -EINVAL; + + if (!udev->bus || !udev->bus->hcpriv) + return -ENODEV; + + // should udev->devnum == -1 ?? + + dev = udev->hcpriv; + hcd = udev->bus->hcpriv; + + /* device driver problem with refcounts? */ + if (!list_empty (&dev->urb_list)) { + dev_dbg (hcd->controller, "free busy dev, %s devnum %d (bug!)\n", + hcd->self.bus_name, udev->devnum); + return -EINVAL; + } + + spin_lock_irqsave (&hcd_data_lock, flags); + list_del (&dev->dev_list); + udev->hcpriv = NULL; + spin_unlock_irqrestore (&hcd_data_lock, flags); + + kfree (dev); + return 0; +} + +/* + * usb_hcd_operations - adapts usb_bus framework to HCD framework (bus glue) + * + * When registering a USB bus through the HCD framework code, use this + * usb_operations vector. The PCI glue layer does so automatically; only + * bus glue for non-PCI system busses will need to use this. + */ +struct usb_operations usb_hcd_operations = { + .allocate = hcd_alloc_dev, + .get_frame_number = hcd_get_frame_number, + .submit_urb = hcd_submit_urb, + .unlink_urb = hcd_unlink_urb, + .deallocate = hcd_free_dev, + .buffer_alloc = hcd_buffer_alloc, + .buffer_free = hcd_buffer_free, + .disable = hcd_endpoint_disable, +}; +EXPORT_SYMBOL (usb_hcd_operations); + +/*-------------------------------------------------------------------------*/ + +/** + * usb_hcd_giveback_urb - return URB from HCD to device driver + * @hcd: host controller returning the URB + * @urb: urb being returned to the USB device driver. + * @regs: pt_regs, passed down to the URB completion handler + * Context: in_interrupt() + * + * This hands the URB from HCD to its USB device driver, using its + * completion function. The HCD has freed all per-urb resources + * (and is done using urb->hcpriv). It also released all HCD locks; + * the device driver won't cause problems if it frees, modifies, + * or resubmits this URB. + */ +void STDCALL usb_hcd_giveback_urb (struct usb_hcd *hcd, struct urb *urb, struct pt_regs *regs) +{ + urb_unlink (urb); + + // NOTE: a generic device/urb monitoring hook would go here. + // hcd_monitor_hook(MONITOR_URB_FINISH, urb, dev) + // It would catch exit/unlink paths for all urbs. + + /* lower level hcd code should use *_dma exclusively */ + if (!(urb->transfer_flags & URB_NO_DMA_MAP)) { + if (usb_pipecontrol (urb->pipe)) + pci_unmap_single (hcd->pdev, urb->setup_dma, + sizeof (struct usb_ctrlrequest), + PCI_DMA_TODEVICE); + if (urb->transfer_buffer_length != 0) + pci_unmap_single (hcd->pdev, urb->transfer_dma, + urb->transfer_buffer_length, + usb_pipein (urb->pipe) + ? PCI_DMA_FROMDEVICE + : PCI_DMA_TODEVICE); + } + + /* pass ownership to the completion handler */ + urb->complete (urb, regs); + usb_put_urb (urb); +} + +/*-------------------------------------------------------------------------*/ + +/** + * usb_hcd_irq - hook IRQs to HCD framework (bus glue) + * @irq: the IRQ being raised + * @__hcd: pointer to the HCD whose IRQ is beinng signaled + * @r: saved hardware registers + * + * When registering a USB bus through the HCD framework code, use this + * to handle interrupts. The PCI glue layer does so automatically; only + * bus glue for non-PCI system busses will need to use this. + */ +irqreturn_t usb_hcd_irq (int irq, void *__hcd, struct pt_regs * r) +{ + struct usb_hcd *hcd = __hcd; + int start = hcd->state; + + if (unlikely (hcd->state == USB_STATE_HALT)) /* irq sharing? */ + return IRQ_NONE; + + hcd->driver->irq (hcd, r); + if (hcd->state != start && hcd->state == USB_STATE_HALT) + usb_hc_died (hcd); + return IRQ_HANDLED; +} + +/*-------------------------------------------------------------------------*/ + +static void hcd_panic (void *_hcd) +{ + struct usb_hcd *hcd = _hcd; + hcd->driver->stop (hcd); +} + +/** + * usb_hc_died - report abnormal shutdown of a host controller (bus glue) + * @hcd: pointer to the HCD representing the controller + * + * This is called by bus glue to report a USB host controller that died + * while operations may still have been pending. It's called automatically + * by the PCI glue, so only glue for non-PCI busses should need to call it. + */ +void STDCALL usb_hc_died (struct usb_hcd *hcd) +{ + struct list_head *devlist, *urblist; + struct hcd_dev *dev; + struct urb *urb; + unsigned long flags; + + /* flag every pending urb as done */ + spin_lock_irqsave (&hcd_data_lock, flags); + list_for_each (devlist, &hcd->dev_list) { + dev = list_entry (devlist, struct hcd_dev, dev_list); + list_for_each (urblist, &dev->urb_list) { + urb = list_entry (urblist, struct urb, urb_list); + dev_dbg (hcd->controller, "shutdown %s urb %p pipe %x, current status %d\n", + hcd->self.bus_name, urb, urb->pipe, urb->status); + if (urb->status == -EINPROGRESS) + urb->status = -ESHUTDOWN; + } + } + urb = (struct urb *) hcd->rh_timer.data; + if (urb) + urb->status = -ESHUTDOWN; + spin_unlock_irqrestore (&hcd_data_lock, flags); + + /* hcd->stop() needs a task context */ + INIT_WORK (&hcd->work, hcd_panic, hcd); + (void) schedule_work (&hcd->work); +} + diff --git a/reactos/drivers/usb/cromwell/core/hcd.h b/reactos/drivers/usb/cromwell/core/hcd.h new file mode 100644 index 00000000000..15eae1d8949 --- /dev/null +++ b/reactos/drivers/usb/cromwell/core/hcd.h @@ -0,0 +1,430 @@ +/* + * Copyright (c) 2001-2002 by David Brownell + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program 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 General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + + +#ifdef __KERNEL__ + +/* This file contains declarations of usbcore internals that are mostly + * used or exposed by Host Controller Drivers. + */ + +/* + * USB Packet IDs (PIDs) + */ +#define USB_PID_UNDEF_0 0xf0 +#define USB_PID_OUT 0xe1 +#define USB_PID_ACK 0xd2 +#define USB_PID_DATA0 0xc3 +#define USB_PID_PING 0xb4 /* USB 2.0 */ +#define USB_PID_SOF 0xa5 +#define USB_PID_NYET 0x96 /* USB 2.0 */ +#define USB_PID_DATA2 0x87 /* USB 2.0 */ +#define USB_PID_SPLIT 0x78 /* USB 2.0 */ +#define USB_PID_IN 0x69 +#define USB_PID_NAK 0x5a +#define USB_PID_DATA1 0x4b +#define USB_PID_PREAMBLE 0x3c /* Token mode */ +#define USB_PID_ERR 0x3c /* USB 2.0: handshake mode */ +#define USB_PID_SETUP 0x2d +#define USB_PID_STALL 0x1e +#define USB_PID_MDATA 0x0f /* USB 2.0 */ + +/*-------------------------------------------------------------------------*/ + +/* + * USB Host Controller Driver (usb_hcd) framework + * + * Since "struct usb_bus" is so thin, you can't share much code in it. + * This framework is a layer over that, and should be more sharable. + */ + +/*-------------------------------------------------------------------------*/ + +struct usb_hcd { /* usb_bus.hcpriv points to this */ + + /* + * housekeeping + */ + struct usb_bus self; /* hcd is-a bus */ + + const char *product_desc; /* product/vendor string */ + const char *description; /* "ehci-hcd" etc */ + + struct timer_list rh_timer; /* drives root hub */ + struct list_head dev_list; /* devices on this bus */ + struct work_struct work; + + /* + * hardware info/state + */ + struct hc_driver *driver; /* hw-specific hooks */ + int irq; /* irq allocated */ + void *regs; /* device memory/io */ + struct device *controller; /* handle to hardware */ + + /* a few non-PCI controllers exist, mostly for OHCI */ + struct pci_dev *pdev; /* pci is typical */ +#ifdef CONFIG_PCI + int region; /* pci region for regs */ + u32 pci_state [16]; /* for PM state save */ + atomic_t resume_count; /* multiple resumes issue */ +#endif + +#define HCD_BUFFER_POOLS 4 + struct pci_pool *pool [HCD_BUFFER_POOLS]; + + int state; +# define __ACTIVE 0x01 +# define __SLEEPY 0x02 +# define __SUSPEND 0x04 +# define __TRANSIENT 0x80 + +# define USB_STATE_HALT 0 +# define USB_STATE_RUNNING (__ACTIVE) +# define USB_STATE_READY (__ACTIVE|__SLEEPY) +# define USB_STATE_QUIESCING (__SUSPEND|__TRANSIENT|__ACTIVE) +# define USB_STATE_RESUMING (__SUSPEND|__TRANSIENT) +# define USB_STATE_SUSPENDED (__SUSPEND) + +#define HCD_IS_RUNNING(state) ((state) & __ACTIVE) +#define HCD_IS_SUSPENDED(state) ((state) & __SUSPEND) + + /* more shared queuing code would be good; it should support + * smarter scheduling, handle transaction translators, etc; + * input size of periodic table to an interrupt scheduler. + * (ohci 32, uhci 1024, ehci 256/512/1024). + */ +}; + +/* 2.4 does this a bit differently ... */ +static inline struct usb_bus *hcd_to_bus (struct usb_hcd *hcd) +{ + return &hcd->self; +} + + +struct hcd_dev { /* usb_device.hcpriv points to this */ + struct list_head dev_list; /* on this hcd */ + struct list_head urb_list; /* pending on this dev */ + + /* per-configuration HC/HCD state, such as QH or ED */ + void *ep[32]; +}; + +// urb.hcpriv is really hardware-specific + +struct hcd_timeout { /* timeouts we allocate */ + struct list_head timeout_list; + struct timer_list timer; +}; + +/*-------------------------------------------------------------------------*/ + +/* + * FIXME usb_operations should vanish or become hc_driver, + * when usb_bus and usb_hcd become the same thing. + */ + +struct usb_operations { + int (*allocate)(struct usb_device *); + int (*deallocate)(struct usb_device *); + int (*get_frame_number) (struct usb_device *usb_dev); + int (*submit_urb) (struct urb *urb, int mem_flags); + int (*unlink_urb) (struct urb *urb); + + /* allocate dma-consistent buffer for URB_DMA_NOMAPPING */ + void *(*buffer_alloc)(struct usb_bus *bus, size_t size, + int mem_flags, + dma_addr_t *dma); + void (*buffer_free)(struct usb_bus *bus, size_t size, + void *addr, dma_addr_t dma); + + void (*disable)(struct usb_device *udev, int bEndpointAddress); +}; + +/* each driver provides one of these, and hardware init support */ + +struct pt_regs; + +struct hc_driver { + const char *description; /* "ehci-hcd" etc */ + + /* irq handler */ + void (*irq) (struct usb_hcd *hcd, struct pt_regs *regs); + + int flags; +#define HCD_MEMORY 0x0001 /* HC regs use memory (else I/O) */ +#define HCD_USB11 0x0010 /* USB 1.1 */ +#define HCD_USB2 0x0020 /* USB 2.0 */ + + /* called to init HCD and root hub */ + int (*start) (struct usb_hcd *hcd); + + /* called after all devices were suspended */ + int (*suspend) (struct usb_hcd *hcd, u32 state); + + /* called before any devices get resumed */ + int (*resume) (struct usb_hcd *hcd); + + /* cleanly make HCD stop writing memory and doing I/O */ + void (*stop) (struct usb_hcd *hcd); + + /* return current frame number */ + int (*get_frame_number) (struct usb_hcd *hcd); + + /* memory lifecycle */ + struct usb_hcd *(*hcd_alloc) (void); + void (*hcd_free) (struct usb_hcd *hcd); + + /* manage i/o requests, device state */ + int (*urb_enqueue) (struct usb_hcd *hcd, struct urb *urb, + int mem_flags); + int (*urb_dequeue) (struct usb_hcd *hcd, struct urb *urb); + + /* hw synch, freeing endpoint resources that urb_dequeue can't */ + void (*endpoint_disable)(struct usb_hcd *hcd, + struct hcd_dev *dev, int bEndpointAddress); + + /* root hub support */ + int (*hub_status_data) (struct usb_hcd *hcd, char *buf); + int (*hub_control) (struct usb_hcd *hcd, + u16 typeReq, u16 wValue, u16 wIndex, + char *buf, u16 wLength); +}; + +extern void STDCALL usb_hcd_giveback_urb (struct usb_hcd *hcd, struct urb *urb, struct pt_regs *regs); +extern void STDCALL usb_bus_init (struct usb_bus *bus); +extern void usb_rh_status_dequeue (struct usb_hcd *hcd, struct urb *urb); + +#ifdef CONFIG_PCI +struct pci_dev; +struct pci_device_id; +extern int STDCALL usb_hcd_pci_probe (struct pci_dev *dev, + const struct pci_device_id *id); +extern void STDCALL usb_hcd_pci_remove (struct pci_dev *dev); + +#ifdef CONFIG_PM +// FIXME: see Documentation/power/pci.txt (2.4.6 and later?) +// extern int usb_hcd_pci_save_state (struct pci_dev *dev, u32 state); +extern int usb_hcd_pci_suspend (struct pci_dev *dev, u32 state); +extern int usb_hcd_pci_resume (struct pci_dev *dev); +// extern int usb_hcd_pci_enable_wake (struct pci_dev *dev, u32 state, int flg); +#endif /* CONFIG_PM */ + +#endif /* CONFIG_PCI */ + +/* pci-ish (pdev null is ok) buffer alloc/mapping support */ +int hcd_buffer_create (struct usb_hcd *hcd); +void hcd_buffer_destroy (struct usb_hcd *hcd); + +void *hcd_buffer_alloc (struct usb_bus *bus, size_t size, + int mem_flags, dma_addr_t *dma); +void hcd_buffer_free (struct usb_bus *bus, size_t size, + void *addr, dma_addr_t dma); + +/* generic bus glue, needed for host controllers that don't use PCI */ +extern struct usb_operations usb_hcd_operations; +extern irqreturn_t usb_hcd_irq (int irq, void *__hcd, struct pt_regs *r); +extern void STDCALL usb_hc_died (struct usb_hcd *hcd); + +/* -------------------------------------------------------------------------- */ + +/* Enumeration is only for the hub driver, or HCD virtual root hubs */ +extern int usb_new_device(struct usb_device *dev, struct device *parent); +extern void STDCALL usb_connect(struct usb_device *dev); +extern void usb_disconnect(struct usb_device **); + +/* exported to hub driver ONLY to support usb_reset_device () */ +extern int usb_get_configuration(struct usb_device *dev); +extern void usb_set_maxpacket(struct usb_device *dev); +extern void usb_destroy_configuration(struct usb_device *dev); +extern int usb_set_address(struct usb_device *dev); + +/* use these only before the device's address has been set */ +#define usb_snddefctrl(dev) ((PIPE_CONTROL << 30)) +#define usb_rcvdefctrl(dev) ((PIPE_CONTROL << 30) | USB_DIR_IN) + +/*-------------------------------------------------------------------------*/ + +/* + * HCD Root Hub support + */ + +#include "hub.h" + +/* (shifted) direction/type/recipient from the USB 2.0 spec, table 9.2 */ +#define DeviceRequest \ + ((USB_DIR_IN|USB_TYPE_STANDARD|USB_RECIP_DEVICE)<<8) +#define DeviceOutRequest \ + ((USB_DIR_OUT|USB_TYPE_STANDARD|USB_RECIP_DEVICE)<<8) + +#define InterfaceRequest \ + ((USB_DIR_IN|USB_TYPE_STANDARD|USB_RECIP_INTERFACE)<<8) + +#define EndpointRequest \ + ((USB_DIR_IN|USB_TYPE_STANDARD|USB_RECIP_INTERFACE)<<8) +#define EndpointOutRequest \ + ((USB_DIR_OUT|USB_TYPE_STANDARD|USB_RECIP_INTERFACE)<<8) + +/* table 9.6 standard features */ +#define DEVICE_REMOTE_WAKEUP 1 +#define ENDPOINT_HALT 0 + +/* class requests from the USB 2.0 hub spec, table 11-15 */ +/* GetBusState and SetHubDescriptor are optional, omitted */ +#define ClearHubFeature (0x2000 | USB_REQ_CLEAR_FEATURE) +#define ClearPortFeature (0x2300 | USB_REQ_CLEAR_FEATURE) +#define GetHubDescriptor (0xa000 | USB_REQ_GET_DESCRIPTOR) +#define GetHubStatus (0xa000 | USB_REQ_GET_STATUS) +#define GetPortStatus (0xa300 | USB_REQ_GET_STATUS) +#define SetHubFeature (0x2000 | USB_REQ_SET_FEATURE) +#define SetPortFeature (0x2300 | USB_REQ_SET_FEATURE) + + +/*-------------------------------------------------------------------------*/ + +/* + * Generic bandwidth allocation constants/support + */ +#define FRAME_TIME_USECS 1000L +#define BitTime(bytecount) (7 * 8 * bytecount / 6) /* with integer truncation */ + /* Trying not to use worst-case bit-stuffing + of (7/6 * 8 * bytecount) = 9.33 * bytecount */ + /* bytecount = data payload byte count */ + +#define NS_TO_US(ns) ((ns + 500L) / 1000L) + /* convert & round nanoseconds to microseconds */ + +extern void STDCALL usb_claim_bandwidth (struct usb_device *dev, struct urb *urb, + int bustime, int isoc); +extern void STDCALL usb_release_bandwidth (struct usb_device *dev, struct urb *urb, + int isoc); + +/* + * Full/low speed bandwidth allocation constants/support. + */ +#define BW_HOST_DELAY 1000L /* nanoseconds */ +#define BW_HUB_LS_SETUP 333L /* nanoseconds */ + /* 4 full-speed bit times (est.) */ + +#define FRAME_TIME_BITS 12000L /* frame = 1 millisecond */ +#define FRAME_TIME_MAX_BITS_ALLOC (90L * FRAME_TIME_BITS / 100L) +#define FRAME_TIME_MAX_USECS_ALLOC (90L * FRAME_TIME_USECS / 100L) + +extern int STDCALL usb_check_bandwidth (struct usb_device *dev, struct urb *urb); + +/* + * Ceiling microseconds (typical) for that many bytes at high speed + * ISO is a bit less, no ACK ... from USB 2.0 spec, 5.11.3 (and needed + * to preallocate bandwidth) + */ +#define USB2_HOST_DELAY 5 /* nsec, guess */ +#define HS_USECS(bytes) NS_TO_US ( ((55 * 8 * 2083)/1000) \ + + ((2083UL * (3167 + BitTime (bytes)))/1000) \ + + USB2_HOST_DELAY) +#define HS_USECS_ISO(bytes) NS_TO_US ( ((long)(38 * 8 * 2.083)) \ + + ((2083UL * (3167 + BitTime (bytes)))/1000) \ + + USB2_HOST_DELAY) + +extern long STDCALL usb_calc_bus_time (int speed, int is_input, + int isoc, int bytecount); + +/*-------------------------------------------------------------------------*/ + +extern struct usb_bus STDCALL *usb_alloc_bus (struct usb_operations *); +extern void STDCALL usb_free_bus (struct usb_bus *); + +extern void STDCALL usb_register_bus (struct usb_bus *); +extern void STDCALL usb_deregister_bus (struct usb_bus *); + +extern int STDCALL usb_register_root_hub (struct usb_device *usb_dev, + struct device *parent_dev); + +/* for portability to 2.4, hcds should call this */ +static inline int hcd_register_root (struct usb_hcd *hcd) +{ + return usb_register_root_hub ( + hcd_to_bus (hcd)->root_hub, hcd->controller); +} + +/*-------------------------------------------------------------------------*/ + +/* exported only within usbcore */ + +extern struct list_head usb_bus_list; +extern struct semaphore usb_bus_list_lock; + +extern void usb_bus_get (struct usb_bus *bus); +extern void usb_bus_put (struct usb_bus *bus); + +extern int usb_find_interface_driver (struct usb_device *dev, + struct usb_interface *interface); + +#define usb_endpoint_halt(dev, ep, out) ((dev)->halted[out] |= (1 << (ep))) + +#define usb_endpoint_out(ep_dir) (!((ep_dir) & USB_DIR_IN)) + +/* + * USB device fs stuff + */ + +#ifdef CONFIG_USB_DEVICEFS + +/* + * these are expected to be called from the USB core/hub thread + * with the kernel lock held + */ +extern void usbfs_add_bus(struct usb_bus *bus); +extern void usbfs_remove_bus(struct usb_bus *bus); +extern void usbfs_add_device(struct usb_device *dev); +extern void usbfs_remove_device(struct usb_device *dev); +extern void usbfs_update_special (void); + +extern int usbfs_init(void); +extern void usbfs_cleanup(void); + +#else /* CONFIG_USB_DEVICEFS */ + +static inline void usbfs_add_bus(struct usb_bus *bus) {} +static inline void usbfs_remove_bus(struct usb_bus *bus) {} +static inline void usbfs_add_device(struct usb_device *dev) {} +static inline void usbfs_remove_device(struct usb_device *dev) {} +static inline void usbfs_update_special (void) {} + +static inline int usbfs_init(void) { return 0; } +static inline void usbfs_cleanup(void) { } + +#endif /* CONFIG_USB_DEVICEFS */ + +/*-------------------------------------------------------------------------*/ + +/* hub.h ... DeviceRemovable in 2.4.2-ac11, gone in 2.4.10 */ +// bleech -- resurfaced in 2.4.11 or 2.4.12 +#define bitmap DeviceRemovable + + +/*-------------------------------------------------------------------------*/ + +/* random stuff */ + +#define RUN_CONTEXT (in_irq () ? "in_irq" \ + : (in_interrupt () ? "in_interrupt" : "can sleep")) + + +#endif /* __KERNEL__ */ + diff --git a/reactos/drivers/usb/cromwell/core/hub.c b/reactos/drivers/usb/cromwell/core/hub.c new file mode 100644 index 00000000000..744ec729b87 --- /dev/null +++ b/reactos/drivers/usb/cromwell/core/hub.c @@ -0,0 +1,1383 @@ +/* + * USB hub driver. + * + * (C) Copyright 1999 Linus Torvalds + * (C) Copyright 1999 Johannes Erdfelt + * (C) Copyright 1999 Gregory P. Smith + * (C) Copyright 2001 Brad Hards (bhards@bigpond.net.au) + * + */ +#define DEBUG +#if 0 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifdef CONFIG_USB_DEBUG + #define DEBUG +#else + #undef DEBUG +#endif +#include +#include +#include + +#include +#include +#include + +#include "hcd.h" +#include "hub.h" +#else +#include "../usb_wrapper.h" +#include "hcd.h" +#include "hub.h" +#define DEBUG +#endif + +/* Wakes up khubd */ +static spinlock_t hub_event_lock = SPIN_LOCK_UNLOCKED; +static DECLARE_MUTEX(usb_address0_sem); + +static LIST_HEAD(hub_event_list); /* List of hubs needing servicing */ +static LIST_HEAD(hub_list); /* List of all hubs (for cleanup) */ + +static DECLARE_WAIT_QUEUE_HEAD(khubd_wait); +static pid_t khubd_pid = 0; /* PID of khubd */ +static DECLARE_COMPLETION(khubd_exited); + +#ifdef DEBUG +static inline char *portspeed (int portstatus) +{ + if (portstatus & (1 << USB_PORT_FEAT_HIGHSPEED)) + return "480 Mb/s"; + else if (portstatus & (1 << USB_PORT_FEAT_LOWSPEED)) + return "1.5 Mb/s"; + else + return "12 Mb/s"; +} +#endif + +/* for dev_info, dev_dbg, etc */ +static inline struct device *hubdev (struct usb_device *dev) +{ + return &dev->actconfig->interface [0].dev; +} + +/* USB 2.0 spec Section 11.24.4.5 */ +static int get_hub_descriptor(struct usb_device *dev, void *data, int size) +{ + return usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), + USB_REQ_GET_DESCRIPTOR, USB_DIR_IN | USB_RT_HUB, + USB_DT_HUB << 8, 0, data, size, HZ * USB_CTRL_GET_TIMEOUT); +} + +/* + * USB 2.0 spec Section 11.24.2.1 + */ +static int clear_hub_feature(struct usb_device *dev, int feature) +{ + return usb_control_msg(dev, usb_sndctrlpipe(dev, 0), + USB_REQ_CLEAR_FEATURE, USB_RT_HUB, feature, 0, NULL, 0, HZ); +} + +/* + * USB 2.0 spec Section 11.24.2.2 + * BUG: doesn't handle port indicator selector in high byte of wIndex + */ +static int clear_port_feature(struct usb_device *dev, int port, int feature) +{ + return usb_control_msg(dev, usb_sndctrlpipe(dev, 0), + USB_REQ_CLEAR_FEATURE, USB_RT_PORT, feature, port, NULL, 0, HZ); +} + +/* + * USB 2.0 spec Section 11.24.2.13 + * BUG: doesn't handle port indicator selector in high byte of wIndex + */ +static int set_port_feature(struct usb_device *dev, int port, int feature) +{ + return usb_control_msg(dev, usb_sndctrlpipe(dev, 0), + USB_REQ_SET_FEATURE, USB_RT_PORT, feature, port, NULL, 0, HZ); +} + +/* + * USB 2.0 spec Section 11.24.2.6 + */ +static int get_hub_status(struct usb_device *dev, + struct usb_hub_status *data) +{ + return usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), + USB_REQ_GET_STATUS, USB_DIR_IN | USB_RT_HUB, 0, 0, + data, sizeof(*data), HZ * USB_CTRL_GET_TIMEOUT); +} + +/* + * USB 2.0 spec Section 11.24.2.7 + */ +static int get_port_status(struct usb_device *dev, int port, + struct usb_port_status *data) +{ + return usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), + USB_REQ_GET_STATUS, USB_DIR_IN | USB_RT_PORT, 0, port, + data, sizeof(*data), HZ * USB_CTRL_GET_TIMEOUT); +} + +/* completion function, fires on port status changes and various faults */ +static void hub_irq(struct urb *urb, struct pt_regs *regs) +{ + struct usb_hub *hub = (struct usb_hub *)urb->context; + unsigned long flags; + int status; + + switch (urb->status) { + case -ENOENT: /* synchronous unlink */ + case -ECONNRESET: /* async unlink */ + case -ESHUTDOWN: /* hardware going away */ + return; + + default: /* presumably an error */ + /* Cause a hub reset after 10 consecutive errors */ + dev_dbg (&hub->intf->dev, "transfer --> %d\n", urb->status); + if ((++hub->nerrors < 10) || hub->error) + goto resubmit; + hub->error = urb->status; + /* FALL THROUGH */ + + /* let khubd handle things */ + case 0: /* we got data: port status changed */ + break; + } + + hub->nerrors = 0; + + /* Something happened, let khubd figure it out */ + spin_lock_irqsave(&hub_event_lock, flags); + if (list_empty(&hub->event_list)) { + list_add(&hub->event_list, &hub_event_list); + wake_up(&khubd_wait); + } + spin_unlock_irqrestore(&hub_event_lock, flags); + +resubmit: + if ((status = usb_submit_urb (hub->urb, GFP_ATOMIC)) != 0 + /* ENODEV means we raced disconnect() */ + && status != -ENODEV) + dev_err (&hub->intf->dev, "resubmit --> %d\n", urb->status); +} + +/* USB 2.0 spec Section 11.24.2.3 */ +static inline int +hub_clear_tt_buffer (struct usb_device *hub, u16 devinfo, u16 tt) +{ + return usb_control_msg (hub, usb_rcvctrlpipe (hub, 0), + HUB_CLEAR_TT_BUFFER, USB_DIR_IN | USB_RECIP_OTHER, + devinfo, tt, 0, 0, HZ); +} + +/* + * enumeration blocks khubd for a long time. we use keventd instead, since + * long blocking there is the exception, not the rule. accordingly, HCDs + * talking to TTs must queue control transfers (not just bulk and iso), so + * both can talk to the same hub concurrently. + */ +static void hub_tt_kevent (void *arg) +{ + struct usb_hub *hub = arg; + unsigned long flags; + + spin_lock_irqsave (&hub->tt.lock, flags); + while (!list_empty (&hub->tt.clear_list)) { + struct list_head *temp; + struct usb_tt_clear *clear; + struct usb_device *dev; + int status; + + temp = hub->tt.clear_list.next; + clear = list_entry (temp, struct usb_tt_clear, clear_list); + list_del (&clear->clear_list); + + /* drop lock so HCD can concurrently report other TT errors */ + spin_unlock_irqrestore (&hub->tt.lock, flags); + dev = interface_to_usbdev (hub->intf); + status = hub_clear_tt_buffer (dev, clear->devinfo, clear->tt); + spin_lock_irqsave (&hub->tt.lock, flags); + + if (status) + err ("usb-%s-%s clear tt %d (%04x) error %d", + dev->bus->bus_name, dev->devpath, + clear->tt, clear->devinfo, status); + kfree (clear); + } + spin_unlock_irqrestore (&hub->tt.lock, flags); +} + +/** + * usb_hub_tt_clear_buffer - clear control/bulk TT state in high speed hub + * @dev: the device whose split transaction failed + * @pipe: identifies the endpoint of the failed transaction + * + * High speed HCDs use this to tell the hub driver that some split control or + * bulk transaction failed in a way that requires clearing internal state of + * a transaction translator. This is normally detected (and reported) from + * interrupt context. + * + * It may not be possible for that hub to handle additional full (or low) + * speed transactions until that state is fully cleared out. + */ +void usb_hub_tt_clear_buffer (struct usb_device *dev, int pipe) +{ + struct usb_tt *tt = dev->tt; + unsigned long flags; + struct usb_tt_clear *clear; + + /* we've got to cope with an arbitrary number of pending TT clears, + * since each TT has "at least two" buffers that can need it (and + * there can be many TTs per hub). even if they're uncommon. + */ + if ((clear = kmalloc (sizeof *clear, SLAB_ATOMIC)) == 0) { + err ("can't save CLEAR_TT_BUFFER state for hub at usb-%s-%s", + dev->bus->bus_name, tt->hub->devpath); + /* FIXME recover somehow ... RESET_TT? */ + return; + } + + /* info that CLEAR_TT_BUFFER needs */ + clear->tt = tt->multi ? dev->ttport : 1; + clear->devinfo = usb_pipeendpoint (pipe); + clear->devinfo |= dev->devnum << 4; + clear->devinfo |= usb_pipecontrol (pipe) + ? (USB_ENDPOINT_XFER_CONTROL << 11) + : (USB_ENDPOINT_XFER_BULK << 11); + if (usb_pipein (pipe)) + clear->devinfo |= 1 << 15; + + /* tell keventd to clear state for this TT */ + spin_lock_irqsave (&tt->lock, flags); + list_add_tail (&clear->clear_list, &tt->clear_list); + schedule_work (&tt->kevent); + spin_unlock_irqrestore (&tt->lock, flags); +} + +static void hub_power_on(struct usb_hub *hub) +{ + struct usb_device *dev; + int i; + + /* Enable power to the ports */ + dev_dbg(hubdev(interface_to_usbdev(hub->intf)), + "enabling power on all ports\n"); + dev = interface_to_usbdev(hub->intf); + + for (i = 0; i < hub->descriptor->bNbrPorts; i++) + set_port_feature(dev, i + 1, USB_PORT_FEAT_POWER); + + /* Wait for power to be enabled */ + wait_ms(hub->descriptor->bPwrOn2PwrGood * 2); +} + +static int hub_hub_status(struct usb_hub *hub, + u16 *status, u16 *change) +{ + struct usb_device *dev = interface_to_usbdev (hub->intf); + int ret; + + ret = get_hub_status(dev, &hub->status->hub); + if (ret < 0) + dev_err (hubdev (dev), + "%s failed (err = %d)\n", __FUNCTION__, ret); + else { + *status = le16_to_cpu(hub->status->hub.wHubStatus); + *change = le16_to_cpu(hub->status->hub.wHubChange); + ret = 0; + } + return ret; +} + +static int hub_configure(struct usb_hub *hub, + struct usb_endpoint_descriptor *endpoint) +{ + struct usb_device *dev = interface_to_usbdev (hub->intf); + struct device *hub_dev; + u16 hubstatus, hubchange; + unsigned int pipe; + int maxp, ret; + char *message; + + hub->buffer = usb_buffer_alloc(dev, sizeof(*hub->buffer), GFP_KERNEL, + &hub->buffer_dma); + if (!hub->buffer) { + message = "can't allocate hub irq buffer"; + ret = -ENOMEM; + goto fail; + } + + hub->status = kmalloc(sizeof(*hub->status), GFP_KERNEL); + if (!hub->status) { + message = "can't kmalloc hub status buffer"; + ret = -ENOMEM; + goto fail; + } + + hub->descriptor = kmalloc(sizeof(*hub->descriptor), GFP_KERNEL); + if (!hub->descriptor) { + message = "can't kmalloc hub descriptor"; + ret = -ENOMEM; + goto fail; + } + + /* Request the entire hub descriptor. + * hub->descriptor can handle USB_MAXCHILDREN ports, + * but the hub can/will return fewer bytes here. + */ + ret = get_hub_descriptor(dev, hub->descriptor, + sizeof(*hub->descriptor)); + if (ret < 0) { + message = "can't read hub descriptor"; + goto fail; + } else if (hub->descriptor->bNbrPorts > USB_MAXCHILDREN) { + message = "hub has too many ports!"; + ret = -ENODEV; + goto fail; + } + + hub_dev = hubdev(dev); + dev->maxchild = hub->descriptor->bNbrPorts; + dev_info (hub_dev, "%d port%s detected\n", dev->maxchild, + (dev->maxchild == 1) ? "" : "s"); + + le16_to_cpus(&hub->descriptor->wHubCharacteristics); + + if (hub->descriptor->wHubCharacteristics & HUB_CHAR_COMPOUND) { + int i; + char portstr [USB_MAXCHILDREN + 1]; + + for (i = 0; i < dev->maxchild; i++) + portstr[i] = hub->descriptor->DeviceRemovable + [((i + 1) / 8)] & (1 << ((i + 1) % 8)) + ? 'F' : 'R'; + portstr[dev->maxchild] = 0; + dev_dbg(hub_dev, "compound device; port removable status: %s\n", portstr); + } else + dev_dbg(hub_dev, "standalone hub\n"); + + switch (hub->descriptor->wHubCharacteristics & HUB_CHAR_LPSM) { + case 0x00: + dev_dbg(hub_dev, "ganged power switching\n"); + break; + case 0x01: + dev_dbg(hub_dev, "individual port power switching\n"); + break; + case 0x02: + case 0x03: + dev_dbg(hub_dev, "unknown reserved power switching mode\n"); + break; + } + + switch (hub->descriptor->wHubCharacteristics & HUB_CHAR_OCPM) { + case 0x00: + dev_dbg(hub_dev, "global over-current protection\n"); + break; + case 0x08: + dev_dbg(hub_dev, "individual port over-current protection\n"); + break; + case 0x10: + case 0x18: + dev_dbg(hub_dev, "no over-current protection\n"); + break; + } + + spin_lock_init (&hub->tt.lock); + INIT_LIST_HEAD (&hub->tt.clear_list); + INIT_WORK (&hub->tt.kevent, hub_tt_kevent, hub); + switch (dev->descriptor.bDeviceProtocol) { + case 0: + break; + case 1: + dev_dbg(hub_dev, "Single TT\n"); + hub->tt.hub = dev; + break; + case 2: + dev_dbg(hub_dev, "TT per port\n"); + hub->tt.hub = dev; + hub->tt.multi = 1; + break; + default: + dev_dbg(hub_dev, "Unrecognized hub protocol %d\n", + dev->descriptor.bDeviceProtocol); + break; + } + + switch (hub->descriptor->wHubCharacteristics & HUB_CHAR_TTTT) { + case 0x00: + if (dev->descriptor.bDeviceProtocol != 0) + dev_dbg(hub_dev, "TT requires at most 8 FS bit times\n"); + break; + case 0x20: + dev_dbg(hub_dev, "TT requires at most 16 FS bit times\n"); + break; + case 0x40: + dev_dbg(hub_dev, "TT requires at most 24 FS bit times\n"); + break; + case 0x60: + dev_dbg(hub_dev, "TT requires at most 32 FS bit times\n"); + break; + } + + dev_dbg(hub_dev, "Port indicators are %s supported\n", + (hub->descriptor->wHubCharacteristics & HUB_CHAR_PORTIND) + ? "" : "not"); + + dev_dbg(hub_dev, "power on to power good time: %dms\n", + hub->descriptor->bPwrOn2PwrGood * 2); + dev_dbg(hub_dev, "hub controller current requirement: %dmA\n", + hub->descriptor->bHubContrCurrent); + + ret = hub_hub_status(hub, &hubstatus, &hubchange); + if (ret < 0) { + message = "can't get hub status"; + goto fail; + } + + dev_dbg(hub_dev, "local power source is %s\n", + (hubstatus & HUB_STATUS_LOCAL_POWER) + ? "lost (inactive)" : "good"); + + dev_dbg(hub_dev, "%sover-current condition exists\n", + (hubstatus & HUB_STATUS_OVERCURRENT) ? "" : "no "); + + /* Start the interrupt endpoint */ + pipe = usb_rcvintpipe(dev, endpoint->bEndpointAddress); + maxp = usb_maxpacket(dev, pipe, usb_pipeout(pipe)); + + if (maxp > sizeof(*hub->buffer)) + maxp = sizeof(*hub->buffer); + + hub->urb = usb_alloc_urb(0, GFP_KERNEL); + if (!hub->urb) { + message = "couldn't allocate interrupt urb"; + ret = -ENOMEM; + goto fail; + } + + usb_fill_int_urb(hub->urb, dev, pipe, *hub->buffer, maxp, hub_irq, + hub, endpoint->bInterval); + hub->urb->transfer_dma = hub->buffer_dma; + hub->urb->transfer_flags |= URB_NO_DMA_MAP; + ret = usb_submit_urb(hub->urb, GFP_KERNEL); + if (ret) { + message = "couldn't submit status urb"; + goto fail; + } + + /* Wake up khubd */ + wake_up(&khubd_wait); + + hub_power_on(hub); + + return 0; + +fail: + dev_err (&hub->intf->dev, "config failed, %s (err %d)\n", + message, ret); + /* hub_disconnect() frees urb and descriptor */ + return ret; +} + +static void hub_disconnect(struct usb_interface *intf) +{ + struct usb_hub *hub = usb_get_intfdata (intf); + unsigned long flags; + + if (!hub) + return; + + usb_set_intfdata (intf, NULL); + spin_lock_irqsave(&hub_event_lock, flags); + + /* Delete it and then reset it */ + list_del(&hub->event_list); + INIT_LIST_HEAD(&hub->event_list); + list_del(&hub->hub_list); + INIT_LIST_HEAD(&hub->hub_list); + + spin_unlock_irqrestore(&hub_event_lock, flags); + + down(&hub->khubd_sem); /* Wait for khubd to leave this hub alone. */ + up(&hub->khubd_sem); + + /* assuming we used keventd, it must quiesce too */ + if (hub->tt.hub) + flush_scheduled_work (); + + if (hub->urb) { + usb_unlink_urb(hub->urb); + usb_free_urb(hub->urb); + hub->urb = NULL; + } + + if (hub->descriptor) { + kfree(hub->descriptor); + hub->descriptor = NULL; + } + + if (hub->status) { + kfree(hub->status); + hub->status = NULL; + } + + if (hub->buffer) { + usb_buffer_free(interface_to_usbdev(intf), + sizeof(*hub->buffer), hub->buffer, + hub->buffer_dma); + hub->buffer = NULL; + } + + /* Free the memory */ + kfree(hub); +} + +static int hub_probe(struct usb_interface *intf, const struct usb_device_id *id) +{ + struct usb_host_interface *desc; + struct usb_endpoint_descriptor *endpoint; + struct usb_device *dev; + struct usb_hub *hub; + unsigned long flags; + + desc = intf->altsetting + intf->act_altsetting; + dev = interface_to_usbdev(intf); + + /* Some hubs have a subclass of 1, which AFAICT according to the */ + /* specs is not defined, but it works */ + if ((desc->desc.bInterfaceSubClass != 0) && + (desc->desc.bInterfaceSubClass != 1)) { +descriptor_error: + dev_err (&intf->dev, "bad descriptor, ignoring hub\n"); + return -EIO; + } + + /* Multiple endpoints? What kind of mutant ninja-hub is this? */ + if (desc->desc.bNumEndpoints != 1) { + goto descriptor_error; + } + + endpoint = &desc->endpoint[0].desc; + + /* Output endpoint? Curiouser and curiouser.. */ + if (!(endpoint->bEndpointAddress & USB_DIR_IN)) { + goto descriptor_error; + } + + /* If it's not an interrupt endpoint, we'd better punt! */ + if ((endpoint->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) + != USB_ENDPOINT_XFER_INT) { + goto descriptor_error; + return -EIO; + } + + /* We found a hub */ + dev_info (hubdev (dev), "USB hub found\n"); + + hub = kmalloc(sizeof(*hub), GFP_KERNEL); + if (!hub) { + err("couldn't kmalloc hub struct"); + return -ENOMEM; + } + + memset(hub, 0, sizeof(*hub)); + + INIT_LIST_HEAD(&hub->event_list); + hub->intf = intf; + init_MUTEX(&hub->khubd_sem); + + /* Record the new hub's existence */ + spin_lock_irqsave(&hub_event_lock, flags); + INIT_LIST_HEAD(&hub->hub_list); + list_add(&hub->hub_list, &hub_list); + spin_unlock_irqrestore(&hub_event_lock, flags); + + usb_set_intfdata (intf, hub); + + if (hub_configure(hub, endpoint) >= 0) { + strcpy (intf->dev.name, "Hub"); + return 0; + } + + hub_disconnect (intf); + return -ENODEV; +} + +static int +hub_ioctl(struct usb_interface *intf, unsigned int code, void *user_data) +{ + struct usb_device *hub = interface_to_usbdev (intf); + + /* assert ifno == 0 (part of hub spec) */ + switch (code) { + case USBDEVFS_HUB_PORTINFO: { + struct usbdevfs_hub_portinfo *info = user_data; + unsigned long flags; + int i; + + spin_lock_irqsave(&hub_event_lock, flags); + if (hub->devnum <= 0) + info->nports = 0; + else { + info->nports = hub->maxchild; + for (i = 0; i < info->nports; i++) { + if (hub->children[i] == NULL) + info->port[i] = 0; + else + info->port[i] = + hub->children[i]->devnum; + } + } + spin_unlock_irqrestore(&hub_event_lock, flags); + + return info->nports + 1; + } + + default: + return -ENOSYS; + } +} + +static int hub_reset(struct usb_hub *hub) +{ + struct usb_device *dev = interface_to_usbdev(hub->intf); + int i; + + /* Disconnect any attached devices */ + for (i = 0; i < hub->descriptor->bNbrPorts; i++) { + if (dev->children[i]) + usb_disconnect(&dev->children[i]); + } + + /* Attempt to reset the hub */ + if (hub->urb) + usb_unlink_urb(hub->urb); + else + return -1; + + if (usb_reset_device(dev)) + return -1; + + hub->urb->dev = dev; + if (usb_submit_urb(hub->urb, GFP_KERNEL)) + return -1; + + hub_power_on(hub); + + return 0; +} + +static void hub_start_disconnect(struct usb_device *dev) +{ + struct usb_device *parent = dev->parent; + int i; + + /* Find the device pointer to disconnect */ + if (parent) { + for (i = 0; i < parent->maxchild; i++) { + if (parent->children[i] == dev) { + usb_disconnect(&parent->children[i]); + return; + } + } + } + + err("cannot disconnect hub %s", dev->devpath); +} + +static int hub_port_status(struct usb_device *dev, int port, + u16 *status, u16 *change) +{ + struct usb_hub *hub = usb_get_intfdata (dev->actconfig->interface); + int ret; + + ret = get_port_status(dev, port + 1, &hub->status->port); + if (ret < 0) + dev_err (hubdev (dev), + "%s failed (err = %d)\n", __FUNCTION__, ret); + else { + *status = le16_to_cpu(hub->status->port.wPortStatus); + *change = le16_to_cpu(hub->status->port.wPortChange); + ret = 0; + } + return ret; +} + +#define HUB_RESET_TRIES 5 +#define HUB_PROBE_TRIES 2 +#define HUB_SHORT_RESET_TIME 10 +#define HUB_LONG_RESET_TIME 200 +#define HUB_RESET_TIMEOUT 500 + +/* return: -1 on error, 0 on success, 1 on disconnect. */ +static int hub_port_wait_reset(struct usb_device *hub, int port, + struct usb_device *dev, unsigned int delay) +{ + int delay_time, ret; + u16 portstatus; + u16 portchange; + + for (delay_time = 0; + delay_time < HUB_RESET_TIMEOUT; + delay_time += delay) { + /* wait to give the device a chance to reset */ + wait_ms(delay); + + /* read and decode port status */ + ret = hub_port_status(hub, port, &portstatus, &portchange); + if (ret < 0) { + return -1; + } + + /* Device went away? */ + if (!(portstatus & USB_PORT_STAT_CONNECTION)) + return 1; + + /* bomb out completely if something weird happened */ + if ((portchange & USB_PORT_STAT_C_CONNECTION)) + return -1; + + /* if we`ve finished resetting, then break out of the loop */ + if (!(portstatus & USB_PORT_STAT_RESET) && + (portstatus & USB_PORT_STAT_ENABLE)) { + if (portstatus & USB_PORT_STAT_HIGH_SPEED) + dev->speed = USB_SPEED_HIGH; + else if (portstatus & USB_PORT_STAT_LOW_SPEED) + dev->speed = USB_SPEED_LOW; + else + dev->speed = USB_SPEED_FULL; + return 0; + } + + /* switch to the long delay after two short delay failures */ + if (delay_time >= 2 * HUB_SHORT_RESET_TIME) + delay = HUB_LONG_RESET_TIME; + + dev_dbg (hubdev (hub), + "port %d not reset yet, waiting %dms\n", + port + 1, delay); + } + + return -1; +} + +/* return: -1 on error, 0 on success, 1 on disconnect. */ +static int hub_port_reset(struct usb_device *hub, int port, + struct usb_device *dev, unsigned int delay) +{ + int i, status; + + /* Reset the port */ + for (i = 0; i < HUB_RESET_TRIES; i++) { + set_port_feature(hub, port + 1, USB_PORT_FEAT_RESET); + + /* return on disconnect or reset */ + status = hub_port_wait_reset(hub, port, dev, delay); + if (status != -1) { + clear_port_feature(hub, + port + 1, USB_PORT_FEAT_C_RESET); + dev->state = status + ? USB_STATE_NOTATTACHED + : USB_STATE_DEFAULT; + return status; + } + + dev_dbg (hubdev (hub), + "port %d not enabled, trying reset again...\n", + port + 1); + delay = HUB_LONG_RESET_TIME; + } + + dev_err (hubdev (hub), + "Cannot enable port %i. Maybe the USB cable is bad?\n", + port + 1); + + return -1; +} + +int hub_port_disable(struct usb_device *hub, int port) +{ + int ret; + + ret = clear_port_feature(hub, port + 1, USB_PORT_FEAT_ENABLE); + if (ret) + dev_err(hubdev(hub), "cannot disable port %d (err = %d)\n", + port + 1, ret); + + return ret; +} + +/* USB 2.0 spec, 7.1.7.3 / fig 7-29: + * + * Between connect detection and reset signaling there must be a delay + * of 100ms at least for debounce and power-settling. The corresponding + * timer shall restart whenever the downstream port detects a disconnect. + * + * Apparently there are some bluetooth and irda-dongles and a number + * of low-speed devices which require longer delays of about 200-400ms. + * Not covered by the spec - but easy to deal with. + * + * This implementation uses 400ms minimum debounce timeout and checks + * every 25ms for transient disconnects to restart the delay. + */ + +#define HUB_DEBOUNCE_TIMEOUT 400 +#define HUB_DEBOUNCE_STEP 25 +#define HUB_DEBOUNCE_STABLE 4 + +/* return: -1 on error, 0 on success, 1 on disconnect. */ +static int hub_port_debounce(struct usb_device *hub, int port) +{ + int ret; + int delay_time, stable_count; + u16 portchange, portstatus; + unsigned connection; + + connection = 0; + stable_count = 0; + for (delay_time = 0; delay_time < HUB_DEBOUNCE_TIMEOUT; delay_time += HUB_DEBOUNCE_STEP) { + wait_ms(HUB_DEBOUNCE_STEP); + + ret = hub_port_status(hub, port, &portstatus, &portchange); + if (ret < 0) + return -1; + + if ((portstatus & USB_PORT_STAT_CONNECTION) == connection) { + if (connection) { + if (++stable_count == HUB_DEBOUNCE_STABLE) + break; + } + } else { + stable_count = 0; + } + connection = portstatus & USB_PORT_STAT_CONNECTION; + + if ((portchange & USB_PORT_STAT_C_CONNECTION)) { + clear_port_feature(hub, port+1, USB_PORT_FEAT_C_CONNECTION); + } + } + + /* XXX Replace this with dbg() when 2.6 is about to ship. */ + dev_dbg (hubdev (hub), + "debounce: port %d: delay %dms stable %d status 0x%x\n", + port + 1, delay_time, stable_count, portstatus); + + return ((portstatus&USB_PORT_STAT_CONNECTION)) ? 0 : 1; +} + +static void hub_port_connect_change(struct usb_hub *hubstate, int port, + u16 portstatus, u16 portchange) +{ + struct usb_device *hub = interface_to_usbdev(hubstate->intf); + struct usb_device *dev; + unsigned int delay = HUB_SHORT_RESET_TIME; + int i; + + dev_dbg (&hubstate->intf->dev, + "port %d, status %x, change %x, %s\n", + port + 1, portstatus, portchange, portspeed (portstatus)); + + /* Clear the connection change status */ + clear_port_feature(hub, port + 1, USB_PORT_FEAT_C_CONNECTION); + + /* Disconnect any existing devices under this port */ + if (hub->children[port]) + usb_disconnect(&hub->children[port]); + + /* Return now if nothing is connected */ + if (!(portstatus & USB_PORT_STAT_CONNECTION)) { + if (portstatus & USB_PORT_STAT_ENABLE) + hub_port_disable(hub, port); + + return; + } + + if (hub_port_debounce(hub, port)) { + dev_err (&hubstate->intf->dev, + "connect-debounce failed, port %d disabled\n", + port+1); + hub_port_disable(hub, port); + return; + } + + /* Some low speed devices have problems with the quick delay, so */ + /* be a bit pessimistic with those devices. RHbug #23670 */ + if (portstatus & USB_PORT_STAT_LOW_SPEED) + delay = HUB_LONG_RESET_TIME; + + down(&usb_address0_sem); + + for (i = 0; i < HUB_PROBE_TRIES; i++) { + struct usb_device *pdev; + int len; + + /* Allocate a new device struct */ + dev = usb_alloc_dev(hub, hub->bus); + if (!dev) { + dev_err (&hubstate->intf->dev, + "couldn't allocate usb_device\n"); + break; + } + + hub->children[port] = dev; + dev->state = USB_STATE_POWERED; + + /* Reset the device, and detect its speed */ + if (hub_port_reset(hub, port, dev, delay)) { + usb_put_dev(dev); + break; + } + + /* Find a new address for it */ + usb_connect(dev); + + /* Set up TT records, if needed */ + if (hub->tt) { + dev->tt = hub->tt; + dev->ttport = hub->ttport; + } else if (dev->speed != USB_SPEED_HIGH + && hub->speed == USB_SPEED_HIGH) { + dev->tt = &hubstate->tt; + dev->ttport = port + 1; + } + + /* Save readable and stable topology id, distinguishing + * devices by location for diagnostics, tools, etc. The + * string is a path along hub ports, from the root. Each + * device's id will be stable until USB is re-cabled, and + * hubs are often labeled with these port numbers. + * + * Initial size: ".NN" times five hubs + NUL = 16 bytes max + * (quite rare, since most hubs have 4-6 ports). + */ + pdev = dev->parent; + if (pdev->devpath [0] != '0') /* parent not root? */ + len = snprintf (dev->devpath, sizeof dev->devpath, + "%s.%d", pdev->devpath, port + 1); + /* root == "0", root port 2 == "2", port 3 that hub "2.3" */ + else + len = snprintf (dev->devpath, sizeof dev->devpath, + "%d", port + 1); + if (len == sizeof dev->devpath) + dev_err (&hubstate->intf->dev, + "devpath size! usb/%03d/%03d path %s\n", + dev->bus->busnum, dev->devnum, dev->devpath); + dev_info (&hubstate->intf->dev, + "new USB device on port %d, assigned address %d\n", + port + 1, dev->devnum); + + /* put the device in the global device tree. the hub port + * is the "bus_id"; hubs show in hierarchy like bridges + */ + dev->dev.parent = dev->parent->dev.parent->parent; + + /* Run it through the hoops (find a driver, etc) */ + if (!usb_new_device(dev, &hub->dev)) + goto done; + + /* Free the configuration if there was an error */ + usb_put_dev(dev); + + /* Switch to a long reset time */ + delay = HUB_LONG_RESET_TIME; + } + + hub->children[port] = NULL; + hub_port_disable(hub, port); +done: + up(&usb_address0_sem); +} + +static void hub_events(void) +{ + unsigned long flags; + struct list_head *tmp; + struct usb_device *dev; + struct usb_hub *hub; + u16 hubstatus; + u16 hubchange; + u16 portstatus; + u16 portchange; + int i, ret; + int m=0; + /* + * We restart the list every time to avoid a deadlock with + * deleting hubs downstream from this one. This should be + * safe since we delete the hub from the event list. + * Not the most efficient, but avoids deadlocks. + */ + + while (m<5) { + m++; + spin_lock_irqsave(&hub_event_lock, flags); + + if (list_empty(&hub_event_list)) + break; + + /* Grab the next entry from the beginning of the list */ + tmp = hub_event_list.next; + + hub = list_entry(tmp, struct usb_hub, event_list); + dev = interface_to_usbdev(hub->intf); + + list_del_init(tmp); + + if (unlikely(down_trylock(&hub->khubd_sem))) + BUG(); /* never blocks, we were on list */ + + spin_unlock_irqrestore(&hub_event_lock, flags); + + if (hub->error) { + dev_dbg (&hub->intf->dev, "resetting for error %d\n", + hub->error); + + if (hub_reset(hub)) { + dev_dbg (&hub->intf->dev, + "can't reset; disconnecting\n"); + up(&hub->khubd_sem); + hub_start_disconnect(dev); + continue; + } + + hub->nerrors = 0; + hub->error = 0; + } + + for (i = 0; i < hub->descriptor->bNbrPorts; i++) { + ret = hub_port_status(dev, i, &portstatus, &portchange); + if (ret < 0) { + continue; + } + + if (portchange & USB_PORT_STAT_C_CONNECTION) { + hub_port_connect_change(hub, i, portstatus, portchange); + } else if (portchange & USB_PORT_STAT_C_ENABLE) { + dev_dbg (hubdev (dev), + "port %d enable change, status %x\n", + i + 1, portstatus); + clear_port_feature(dev, + i + 1, USB_PORT_FEAT_C_ENABLE); + + /* + * EM interference sometimes causes badly + * shielded USB devices to be shutdown by + * the hub, this hack enables them again. + * Works at least with mouse driver. + */ + if (!(portstatus & USB_PORT_STAT_ENABLE) + && (portstatus & USB_PORT_STAT_CONNECTION) + && (dev->children[i])) { + dev_err (&hub->intf->dev, + "port %i " + "disabled by hub (EMI?), " + "re-enabling...", + i + 1); + hub_port_connect_change(hub, + i, portstatus, portchange); + } + } + + if (portchange & USB_PORT_STAT_C_SUSPEND) { + dev_dbg (&hub->intf->dev, + "suspend change on port %d\n", + i + 1); + clear_port_feature(dev, + i + 1, USB_PORT_FEAT_C_SUSPEND); + } + + if (portchange & USB_PORT_STAT_C_OVERCURRENT) { + dev_err (&hub->intf->dev, + "over-current change on port %d\n", + i + 1); + clear_port_feature(dev, + i + 1, USB_PORT_FEAT_C_OVER_CURRENT); + hub_power_on(hub); + } + + if (portchange & USB_PORT_STAT_C_RESET) { + dev_dbg (&hub->intf->dev, + "reset change on port %d\n", + i + 1); + clear_port_feature(dev, + i + 1, USB_PORT_FEAT_C_RESET); + } + } /* end for i */ + + /* deal with hub status changes */ + if (hub_hub_status(hub, &hubstatus, &hubchange) < 0) + dev_err (&hub->intf->dev, "get_hub_status failed\n"); + else { + if (hubchange & HUB_CHANGE_LOCAL_POWER) { + dev_dbg (&hub->intf->dev, "power change\n"); + clear_hub_feature(dev, C_HUB_LOCAL_POWER); + } + if (hubchange & HUB_CHANGE_OVERCURRENT) { + dev_dbg (&hub->intf->dev, "overcurrent change\n"); + wait_ms(500); /* Cool down */ + clear_hub_feature(dev, C_HUB_OVER_CURRENT); + hub_power_on(hub); + } + } + up(&hub->khubd_sem); + } /* end while (1) */ + + spin_unlock_irqrestore(&hub_event_lock, flags); +} + +static int hub_thread(void *__hub) +{ + /* + * This thread doesn't need any user-level access, + * so get rid of all our resources + */ + + daemonize("khubd"); + allow_signal(SIGKILL); + /* Send me a signal to get me die (for debugging) */ + do { + + hub_events(); + wait_event_interruptible(khubd_wait, !list_empty(&hub_event_list)); + + if (current->flags & PF_FREEZE) + refrigerator(PF_IOTHREAD); + + } while (!signal_pending(current)); + +// dbg("hub_thread exiting"); + complete_and_exit(&khubd_exited, 0); +} + +static struct usb_device_id hub_id_table [] = { + { .match_flags = USB_DEVICE_ID_MATCH_DEV_CLASS, + .bDeviceClass = USB_CLASS_HUB}, + { .match_flags = USB_DEVICE_ID_MATCH_INT_CLASS, + .bInterfaceClass = USB_CLASS_HUB}, + { } /* Terminating entry */ +}; + +MODULE_DEVICE_TABLE (usb, hub_id_table); + +static struct usb_driver hub_driver = { + .owner = THIS_MODULE, + .name = "hub", + .probe = hub_probe, + .disconnect = hub_disconnect, + .ioctl = hub_ioctl, + .id_table = hub_id_table, +}; + +/* + * This should be a separate module. + */ +int usb_hub_init(void) +{ + pid_t pid; + + if (usb_register(&hub_driver) < 0) { + err("Unable to register USB hub driver"); + return -1; + } + + pid = kernel_thread(hub_thread, NULL, + CLONE_FS | CLONE_FILES | CLONE_SIGHAND); + if (pid >= 0) { + khubd_pid = pid; + return 0; + } + + /* Fall through if kernel_thread failed */ + usb_deregister(&hub_driver); + err("failed to start hub_thread"); + + return -1; +} + +void usb_hub_cleanup(void) +{ + int ret; + + /* Kill the thread */ + ret = kill_proc(khubd_pid, SIGKILL, 1); + + wait_for_completion(&khubd_exited); + + /* + * Hub resources are freed for us by usb_deregister. It calls + * usb_driver_purge on every device which in turn calls that + * devices disconnect function if it is using this driver. + * The hub_disconnect function takes care of releasing the + * individual hub resources. -greg + */ + usb_deregister(&hub_driver); +} /* usb_hub_cleanup() */ + +/* + * WARNING - If a driver calls usb_reset_device, you should simulate a + * disconnect() and probe() for other interfaces you doesn't claim. This + * is left up to the driver writer right now. This insures other drivers + * have a chance to re-setup their interface. + * + * Take a look at proc_resetdevice in devio.c for some sample code to + * do this. + * Use this only from within your probe function, otherwise use + * usb_reset_device() below, which ensure proper locking + */ +int usb_physical_reset_device(struct usb_device *dev) +{ + struct usb_device *parent = dev->parent; + struct usb_device_descriptor *descriptor; + int i, ret, port = -1; + + if (!parent) { + err("attempting to reset root hub!"); + return -EINVAL; + } + + for (i = 0; i < parent->maxchild; i++) + if (parent->children[i] == dev) { + port = i; + break; + } + + if (port < 0) + return -ENOENT; + + descriptor = kmalloc(sizeof *descriptor, GFP_NOIO); + if (!descriptor) { + return -ENOMEM; + } + + down(&usb_address0_sem); + + /* Send a reset to the device */ + if (hub_port_reset(parent, port, dev, HUB_SHORT_RESET_TIME)) { + hub_port_disable(parent, port); + up(&usb_address0_sem); + kfree(descriptor); + return(-ENODEV); + } + + /* Reprogram the Address */ + ret = usb_set_address(dev); + if (ret < 0) { + err("USB device not accepting new address (error=%d)", ret); + hub_port_disable(parent, port); + up(&usb_address0_sem); + kfree(descriptor); + return ret; + } + + /* Let the SET_ADDRESS settle */ + wait_ms(10); + + up(&usb_address0_sem); + + /* + * Now we fetch the configuration descriptors for the device and + * see if anything has changed. If it has, we dump the current + * parsed descriptors and reparse from scratch. Then we leave + * the device alone for the caller to finish setting up. + * + * If nothing changed, we reprogram the configuration and then + * the alternate settings. + */ + + ret = usb_get_descriptor(dev, USB_DT_DEVICE, 0, descriptor, + sizeof(*descriptor)); + if (ret < 0) { + kfree(descriptor); + return ret; + } + + le16_to_cpus(&descriptor->bcdUSB); + le16_to_cpus(&descriptor->idVendor); + le16_to_cpus(&descriptor->idProduct); + le16_to_cpus(&descriptor->bcdDevice); + + if (RtlCompareMemory(&dev->descriptor, descriptor, sizeof(*descriptor))) { + kfree(descriptor); + usb_destroy_configuration(dev); + + ret = usb_get_device_descriptor(dev); + if (ret < sizeof(dev->descriptor)) { + if (ret < 0) + err("unable to get device %s descriptor " + "(error=%d)", dev->devpath, ret); + else + err("USB device %s descriptor short read " + "(expected %Zi, got %i)", + dev->devpath, + sizeof(dev->descriptor), ret); + + clear_bit(dev->devnum, dev->bus->devmap.devicemap); + dev->devnum = -1; + return -EIO; + } + + ret = usb_get_configuration(dev); + if (ret < 0) { + err("unable to get configuration (error=%d)", ret); + usb_destroy_configuration(dev); + clear_bit(dev->devnum, dev->bus->devmap.devicemap); + dev->devnum = -1; + return 1; + } + + dev->actconfig = dev->config; + usb_set_maxpacket(dev); + + return 1; + } + + kfree(descriptor); + + ret = usb_set_configuration(dev, dev->actconfig->desc.bConfigurationValue); + if (ret < 0) { + err("failed to set dev %s active configuration (error=%d)", + dev->devpath, ret); + return ret; + } + + for (i = 0; i < dev->actconfig->desc.bNumInterfaces; i++) { + struct usb_interface *intf = &dev->actconfig->interface[i]; + struct usb_interface_descriptor *as; + + as = &intf->altsetting[intf->act_altsetting].desc; + ret = usb_set_interface(dev, as->bInterfaceNumber, + as->bAlternateSetting); + if (ret < 0) { + err("failed to set active alternate setting " + "for dev %s interface %d (error=%d)", + dev->devpath, i, ret); + return ret; + } + } + + return 0; +} + +int usb_reset_device(struct usb_device *udev) +{ + //struct device *gdev = &udev->dev; + int r; + + down_read(&gdev->bus->subsys.rwsem); + r = usb_physical_reset_device(udev); + up_read(&gdev->bus->subsys.rwsem); + + return r; +} + + diff --git a/reactos/drivers/usb/cromwell/core/hub.h b/reactos/drivers/usb/cromwell/core/hub.h new file mode 100644 index 00000000000..f51a9992cc6 --- /dev/null +++ b/reactos/drivers/usb/cromwell/core/hub.h @@ -0,0 +1,195 @@ +#ifndef __LINUX_HUB_H +#define __LINUX_HUB_H + +/* + * Hub protocol and driver data structures. + * + * Some of these are known to the "virtual root hub" code + * in host controller drivers. + */ +#if 0 +#include +#include +#include /* likely()/unlikely() */ +#endif +/* + * Hub request types + */ + +#define USB_RT_HUB (USB_TYPE_CLASS | USB_RECIP_DEVICE) +#define USB_RT_PORT (USB_TYPE_CLASS | USB_RECIP_OTHER) + +/* + * Hub class requests + * See USB 2.0 spec Table 11-16 + */ +#define HUB_CLEAR_TT_BUFFER 8 +#define HUB_RESET_TT 9 +#define HUB_GET_TT_STATE 10 +#define HUB_STOP_TT 11 + +/* + * Hub Class feature numbers + * See USB 2.0 spec Table 11-17 + */ +#define C_HUB_LOCAL_POWER 0 +#define C_HUB_OVER_CURRENT 1 + +/* + * Port feature numbers + * See USB 2.0 spec Table 11-17 + */ +#define USB_PORT_FEAT_CONNECTION 0 +#define USB_PORT_FEAT_ENABLE 1 +#define USB_PORT_FEAT_SUSPEND 2 +#define USB_PORT_FEAT_OVER_CURRENT 3 +#define USB_PORT_FEAT_RESET 4 +#define USB_PORT_FEAT_POWER 8 +#define USB_PORT_FEAT_LOWSPEED 9 +#define USB_PORT_FEAT_HIGHSPEED 10 +#define USB_PORT_FEAT_C_CONNECTION 16 +#define USB_PORT_FEAT_C_ENABLE 17 +#define USB_PORT_FEAT_C_SUSPEND 18 +#define USB_PORT_FEAT_C_OVER_CURRENT 19 +#define USB_PORT_FEAT_C_RESET 20 +#define USB_PORT_FEAT_TEST 21 +#define USB_PORT_FEAT_INDICATOR 22 + +/* + * Hub Status and Hub Change results + * See USB 2.0 spec Table 11-19 and Table 11-20 + */ +struct usb_port_status { + __u16 wPortStatus; + __u16 wPortChange; +} __attribute__ ((packed)); + +/* + * wPortStatus bit field + * See USB 2.0 spec Table 11-21 + */ +#define USB_PORT_STAT_CONNECTION 0x0001 +#define USB_PORT_STAT_ENABLE 0x0002 +#define USB_PORT_STAT_SUSPEND 0x0004 +#define USB_PORT_STAT_OVERCURRENT 0x0008 +#define USB_PORT_STAT_RESET 0x0010 +/* bits 5 to 7 are reserved */ +#define USB_PORT_STAT_POWER 0x0100 +#define USB_PORT_STAT_LOW_SPEED 0x0200 +#define USB_PORT_STAT_HIGH_SPEED 0x0400 +#define USB_PORT_STAT_TEST 0x0800 +#define USB_PORT_STAT_INDICATOR 0x1000 +/* bits 13 to 15 are reserved */ + +/* + * wPortChange bit field + * See USB 2.0 spec Table 11-22 + * Bits 0 to 4 shown, bits 5 to 15 are reserved + */ +#define USB_PORT_STAT_C_CONNECTION 0x0001 +#define USB_PORT_STAT_C_ENABLE 0x0002 +#define USB_PORT_STAT_C_SUSPEND 0x0004 +#define USB_PORT_STAT_C_OVERCURRENT 0x0008 +#define USB_PORT_STAT_C_RESET 0x0010 + +/* + * wHubCharacteristics (masks) + * See USB 2.0 spec Table 11-13, offset 3 + */ +#define HUB_CHAR_LPSM 0x0003 /* D1 .. D0 */ +#define HUB_CHAR_COMPOUND 0x0004 /* D2 */ +#define HUB_CHAR_OCPM 0x0018 /* D4 .. D3 */ +#define HUB_CHAR_TTTT 0x0060 /* D6 .. D5 */ +#define HUB_CHAR_PORTIND 0x0080 /* D7 */ + +struct usb_hub_status { + __u16 wHubStatus; + __u16 wHubChange; +} __attribute__ ((packed)); + +/* + * Hub Status & Hub Change bit masks + * See USB 2.0 spec Table 11-19 and Table 11-20 + * Bits 0 and 1 for wHubStatus and wHubChange + * Bits 2 to 15 are reserved for both + */ +#define HUB_STATUS_LOCAL_POWER 0x0001 +#define HUB_STATUS_OVERCURRENT 0x0002 +#define HUB_CHANGE_LOCAL_POWER 0x0001 +#define HUB_CHANGE_OVERCURRENT 0x0002 + + +/* + * Hub descriptor + * See USB 2.0 spec Table 11-13 + */ + +#define USB_DT_HUB (USB_TYPE_CLASS | 0x09) +#define USB_DT_HUB_NONVAR_SIZE 7 + +struct usb_hub_descriptor { + __u8 bDescLength; + __u8 bDescriptorType; + __u8 bNbrPorts; + __u16 wHubCharacteristics; + __u8 bPwrOn2PwrGood; + __u8 bHubContrCurrent; + /* add 1 bit for hub status change; round to bytes */ + __u8 DeviceRemovable[(USB_MAXCHILDREN + 1 + 7) / 8]; + __u8 PortPwrCtrlMask[(USB_MAXCHILDREN + 1 + 7) / 8]; +} __attribute__ ((packed)); + +struct usb_device; + +/* + * As of USB 2.0, full/low speed devices are segregated into trees. + * One type grows from USB 1.1 host controllers (OHCI, UHCI etc). + * The other type grows from high speed hubs when they connect to + * full/low speed devices using "Transaction Translators" (TTs). + * + * TTs should only be known to the hub driver, and high speed bus + * drivers (only EHCI for now). They affect periodic scheduling and + * sometimes control/bulk error recovery. + */ +struct usb_tt { + struct usb_device *hub; /* upstream highspeed hub */ + int multi; /* true means one TT per port */ + + /* for control/bulk error recovery (CLEAR_TT_BUFFER) */ + spinlock_t lock; + struct list_head clear_list; /* of usb_tt_clear */ + struct work_struct kevent; +}; + +struct usb_tt_clear { + struct list_head clear_list; + unsigned tt; + u16 devinfo; +}; + +extern void usb_hub_tt_clear_buffer (struct usb_device *dev, int pipe); + +struct usb_hub { + struct usb_interface *intf; /* the "real" device */ + struct urb *urb; /* for interrupt polling pipe */ + + /* buffer for urb ... 1 bit each for hub and children, rounded up */ + char (*buffer)[(USB_MAXCHILDREN + 1 + 7) / 8]; + dma_addr_t buffer_dma; /* DMA address for buffer */ + union { + struct usb_hub_status hub; + struct usb_port_status port; + } *status; /* buffer for status reports */ + + int error; /* last reported error */ + int nerrors; /* track consecutive errors */ + + struct list_head hub_list; /* all hubs */ + struct list_head event_list; /* hubs w/data or errs ready */ + + struct usb_hub_descriptor *descriptor; /* class descriptor */ + struct semaphore khubd_sem; + struct usb_tt tt; /* Transaction Translator */ +}; + +#endif /* __LINUX_HUB_H */ diff --git a/reactos/drivers/usb/cromwell/core/makefile b/reactos/drivers/usb/cromwell/core/makefile new file mode 100644 index 00000000000..eeba46f94d7 --- /dev/null +++ b/reactos/drivers/usb/cromwell/core/makefile @@ -0,0 +1,18 @@ +PATH_TO_TOP = ../../../.. + +TARGET_TYPE = export_driver + +TARGET_NAME = usbcore + +TARGET_DDKLIBS = ntoskrnl.a + +TARGET_CFLAGS = -Wall -I$(PATH_TO_TOP)/ntoskrnl/include + +TARGET_OBJECTS = \ + message.o hcd.o hcd-pci.o hub.o usb.o config.o urb.o \ + buffer_simple.o usb-debug.o ../sys/ros_wrapper.o \ + ../sys/linuxwrapper.o usbcore.o + +include $(PATH_TO_TOP)/rules.mak + +include $(TOOLS_PATH)/helper.mk diff --git a/reactos/drivers/usb/cromwell/core/makefile.crom b/reactos/drivers/usb/cromwell/core/makefile.crom new file mode 100644 index 00000000000..489af5802be --- /dev/null +++ b/reactos/drivers/usb/cromwell/core/makefile.crom @@ -0,0 +1,6 @@ + +O_TARGET := message.o hcd.o hcd-pci.o hub.o usb.o config.o urb.o buffer_simple.o urb.o usb-debug.o + +#O_TARGET := urb.o + +include $(TOPDIR)/Rules.make diff --git a/reactos/drivers/usb/cromwell/core/message.c b/reactos/drivers/usb/cromwell/core/message.c new file mode 100644 index 00000000000..b43a52dc4e6 --- /dev/null +++ b/reactos/drivers/usb/cromwell/core/message.c @@ -0,0 +1,1053 @@ +/* + * message.c - synchronous message handling + */ +#if 0 +#include /* for scatterlist macros */ +#include +#include +#include +#include +#include +#include +#else +#include "../usb_wrapper.h" +#endif + +#include "hcd.h" /* for usbcore internals */ + +struct usb_api_data { + wait_queue_head_t wqh; + int done; +}; + +static void usb_api_blocking_completion(struct urb *urb, struct pt_regs *regs) +{ + struct usb_api_data *awd = (struct usb_api_data *)urb->context; + + awd->done = 1; + wmb(); + wake_up(&awd->wqh); +} + +// Starts urb and waits for completion or timeout +static int usb_start_wait_urb(struct urb *urb, int timeout, int* actual_length) +{ + //DECLARE_WAITQUEUE(wait, current); // Fireball, 24Jan05 - silent gcc complaining about unused wait variable + struct usb_api_data awd; + int status; + + init_waitqueue_head(&awd.wqh); + awd.done = 0; + + set_current_state(TASK_UNINTERRUPTIBLE); + add_wait_queue(&awd.wqh, &wait); + + urb->context = &awd; + status = usb_submit_urb(urb, GFP_ATOMIC); + if (status) { + // something went wrong + usb_free_urb(urb); + set_current_state(TASK_RUNNING); + remove_wait_queue(&awd.wqh, &wait); + return status; + } + + while (timeout && !awd.done) + { + timeout = schedule_timeout(timeout); + set_current_state(TASK_UNINTERRUPTIBLE); + rmb(); + } + + set_current_state(TASK_RUNNING); + remove_wait_queue(&awd.wqh, &wait); + + if (!timeout && !awd.done) { + if (urb->status != -EINPROGRESS) { /* No callback?!! */ + printk(KERN_ERR "usb: raced timeout, " + "pipe 0x%x status %d time left %d\n", + urb->pipe, urb->status, timeout); + status = urb->status; + } else { + warn("usb_control/bulk_msg: timeout"); + usb_unlink_urb(urb); // remove urb safely + status = -ETIMEDOUT; + } + } else + status = urb->status; + + if (actual_length) + *actual_length = urb->actual_length; + + usb_free_urb(urb); + return status; +} + +/*-------------------------------------------------------------------*/ +// returns status (negative) or length (positive) +int usb_internal_control_msg(struct usb_device *usb_dev, unsigned int pipe, + struct usb_ctrlrequest *cmd, void *data, int len, int timeout) +{ + struct urb *urb; + int retv; + int length; + + urb = usb_alloc_urb(0, GFP_NOIO); + if (!urb) + return -ENOMEM; + + usb_fill_control_urb(urb, usb_dev, pipe, (unsigned char*)cmd, data, len, + usb_api_blocking_completion, 0); + + retv = usb_start_wait_urb(urb, timeout, &length); + + if (retv < 0) + return retv; + else + return length; +} + +/** + * usb_control_msg - Builds a control urb, sends it off and waits for completion + * @dev: pointer to the usb device to send the message to + * @pipe: endpoint "pipe" to send the message to + * @request: USB message request value + * @requesttype: USB message request type value + * @value: USB message value + * @index: USB message index value + * @data: pointer to the data to send + * @size: length in bytes of the data to send + * @timeout: time in jiffies to wait for the message to complete before + * timing out (if 0 the wait is forever) + * Context: !in_interrupt () + * + * This function sends a simple control message to a specified endpoint + * and waits for the message to complete, or timeout. + * + * If successful, it returns the number of bytes transferred, otherwise a negative error number. + * + * Don't use this function from within an interrupt context, like a + * bottom half handler. If you need an asynchronous message, or need to send + * a message from within interrupt context, use usb_submit_urb() + * If a thread in your driver uses this call, make sure your disconnect() + * method can wait for it to complete. Since you don't have a handle on + * the URB used, you can't cancel the request. + */ +int usb_control_msg(struct usb_device *dev, unsigned int pipe, __u8 request, __u8 requesttype, + __u16 value, __u16 index, void *data, __u16 size, int timeout) +{ + struct usb_ctrlrequest *dr = kmalloc(sizeof(struct usb_ctrlrequest), GFP_NOIO); + int ret; + + if (!dr) + return -ENOMEM; + + dr->bRequestType= requesttype; + dr->bRequest = request; + dr->wValue = cpu_to_le16p(&value); + dr->wIndex = cpu_to_le16p(&index); + dr->wLength = cpu_to_le16p(&size); + + //dbg("usb_control_msg"); + + ret = usb_internal_control_msg(dev, pipe, dr, data, size, timeout); + + kfree(dr); + + return ret; +} + + +/** + * usb_bulk_msg - Builds a bulk urb, sends it off and waits for completion + * @usb_dev: pointer to the usb device to send the message to + * @pipe: endpoint "pipe" to send the message to + * @data: pointer to the data to send + * @len: length in bytes of the data to send + * @actual_length: pointer to a location to put the actual length transferred in bytes + * @timeout: time in jiffies to wait for the message to complete before + * timing out (if 0 the wait is forever) + * Context: !in_interrupt () + * + * This function sends a simple bulk message to a specified endpoint + * and waits for the message to complete, or timeout. + * + * If successful, it returns 0, otherwise a negative error number. + * The number of actual bytes transferred will be stored in the + * actual_length paramater. + * + * Don't use this function from within an interrupt context, like a + * bottom half handler. If you need an asynchronous message, or need to + * send a message from within interrupt context, use usb_submit_urb() + * If a thread in your driver uses this call, make sure your disconnect() + * method can wait for it to complete. Since you don't have a handle on + * the URB used, you can't cancel the request. + */ +int usb_bulk_msg(struct usb_device *usb_dev, unsigned int pipe, + void *data, int len, int *actual_length, int timeout) +{ + struct urb *urb; + + if (len < 0) + return -EINVAL; + + urb=usb_alloc_urb(0, GFP_KERNEL); + if (!urb) + return -ENOMEM; + + usb_fill_bulk_urb(urb, usb_dev, pipe, data, len, + usb_api_blocking_completion, 0); + + return usb_start_wait_urb(urb,timeout,actual_length); +} + +/*-------------------------------------------------------------------*/ +//#warning "Scatter-gather stuff disabled" +#if 0 +static void sg_clean (struct usb_sg_request *io) +{ + if (io->urbs) { + while (io->entries--) + usb_free_urb (io->urbs [io->entries]); + kfree (io->urbs); + io->urbs = 0; + } + if (io->dev->dev.dma_mask != 0) + usb_buffer_unmap_sg (io->dev, io->pipe, io->sg, io->nents); + io->dev = 0; +} + +static void sg_complete (struct urb *urb, struct pt_regs *regs) +{ + struct usb_sg_request *io = (struct usb_sg_request *) urb->context; + unsigned long flags; + + spin_lock_irqsave (&io->lock, flags); + + /* In 2.5 we require hcds' endpoint queues not to progress after fault + * reports, until the completion callback (this!) returns. That lets + * device driver code (like this routine) unlink queued urbs first, + * if it needs to, since the HC won't work on them at all. So it's + * not possible for page N+1 to overwrite page N, and so on. + * + * That's only for "hard" faults; "soft" faults (unlinks) sometimes + * complete before the HCD can get requests away from hardware, + * though never during cleanup after a hard fault. + */ + if (io->status + && (io->status != -ECONNRESET + || urb->status != -ECONNRESET) + && urb->actual_length) { + dev_err (io->dev->bus->controller, + "dev %s ep%d%s scatterlist error %d/%d\n", + io->dev->devpath, + usb_pipeendpoint (urb->pipe), + usb_pipein (urb->pipe) ? "in" : "out", + urb->status, io->status); + // BUG (); + } + + if (urb->status && urb->status != -ECONNRESET) { + int i, found, status; + + io->status = urb->status; + + /* the previous urbs, and this one, completed already. + * unlink the later ones so they won't rx/tx bad data, + * + * FIXME don't bother unlinking urbs that haven't yet been + * submitted; those non-error cases shouldn't be syslogged + */ + for (i = 0, found = 0; i < io->entries; i++) { + if (found) { + status = usb_unlink_urb (io->urbs [i]); + if (status && status != -EINPROGRESS) + err ("sg_complete, unlink --> %d", + status); + } else if (urb == io->urbs [i]) + found = 1; + } + } + + /* on the last completion, signal usb_sg_wait() */ + io->bytes += urb->actual_length; + io->count--; + if (!io->count) + complete (&io->complete); + + spin_unlock_irqrestore (&io->lock, flags); +} + + +/** + * usb_sg_init - initializes scatterlist-based bulk/interrupt I/O request + * @io: request block being initialized. until usb_sg_wait() returns, + * treat this as a pointer to an opaque block of memory, + * @dev: the usb device that will send or receive the data + * @pipe: endpoint "pipe" used to transfer the data + * @period: polling rate for interrupt endpoints, in frames or + * (for high speed endpoints) microframes; ignored for bulk + * @sg: scatterlist entries + * @nents: how many entries in the scatterlist + * @length: how many bytes to send from the scatterlist, or zero to + * send every byte identified in the list. + * @mem_flags: SLAB_* flags affecting memory allocations in this call + * + * Returns zero for success, else a negative errno value. This initializes a + * scatter/gather request, allocating resources such as I/O mappings and urb + * memory (except maybe memory used by USB controller drivers). + * + * The request must be issued using usb_sg_wait(), which waits for the I/O to + * complete (or to be canceled) and then cleans up all resources allocated by + * usb_sg_init(). + * + * The request may be canceled with usb_sg_cancel(), either before or after + * usb_sg_wait() is called. + */ +int usb_sg_init ( + struct usb_sg_request *io, + struct usb_device *dev, + unsigned pipe, + unsigned period, + struct scatterlist *sg, + int nents, + size_t length, + int mem_flags +) +{ + int i; + int urb_flags; + int dma; + + if (!io || !dev || !sg + || usb_pipecontrol (pipe) + || usb_pipeisoc (pipe) + || nents <= 0) + return -EINVAL; + + spin_lock_init (&io->lock); + io->dev = dev; + io->pipe = pipe; + io->sg = sg; + io->nents = nents; + + /* not all host controllers use DMA (like the mainstream pci ones); + * they can use PIO (sl811) or be software over another transport. + */ + dma = (dev->dev.dma_mask != 0); + if (dma) + io->entries = usb_buffer_map_sg (dev, pipe, sg, nents); + else + io->entries = nents; + + /* initialize all the urbs we'll use */ + if (io->entries <= 0) + return io->entries; + + io->count = 0; + io->urbs = kmalloc (io->entries * sizeof *io->urbs, mem_flags); + if (!io->urbs) + goto nomem; + + urb_flags = URB_ASYNC_UNLINK | URB_NO_DMA_MAP | URB_NO_INTERRUPT; + if (usb_pipein (pipe)) + urb_flags |= URB_SHORT_NOT_OK; + + for (i = 0; i < io->entries; i++, io->count = i) { + unsigned len; + + io->urbs [i] = usb_alloc_urb (0, mem_flags); + if (!io->urbs [i]) { + io->entries = i; + goto nomem; + } + + io->urbs [i]->dev = dev; + io->urbs [i]->pipe = pipe; + io->urbs [i]->interval = period; + io->urbs [i]->transfer_flags = urb_flags; + + io->urbs [i]->complete = sg_complete; + io->urbs [i]->context = io; + io->urbs [i]->status = -EINPROGRESS; + io->urbs [i]->actual_length = 0; + + if (dma) { + /* hc may use _only_ transfer_dma */ + io->urbs [i]->transfer_dma = sg_dma_address (sg + i); + len = sg_dma_len (sg + i); + } else { + /* hc may use _only_ transfer_buffer */ + io->urbs [i]->transfer_buffer = + page_address (sg [i].page) + sg [i].offset; + len = sg [i].length; + } + + if (length) { + len = min_t (unsigned, len, length); + length -= len; + if (length == 0) + io->entries = i + 1; + } + io->urbs [i]->transfer_buffer_length = len; + } + io->urbs [--i]->transfer_flags &= ~URB_NO_INTERRUPT; + + /* transaction state */ + io->status = 0; + io->bytes = 0; + init_completion (&io->complete); + return 0; + +nomem: + sg_clean (io); + return -ENOMEM; +} + + +/** + * usb_sg_wait - synchronously execute scatter/gather request + * @io: request block handle, as initialized with usb_sg_init(). + * some fields become accessible when this call returns. + * Context: !in_interrupt () + * + * This function blocks until the specified I/O operation completes. It + * leverages the grouping of the related I/O requests to get good transfer + * rates, by queueing the requests. At higher speeds, such queuing can + * significantly improve USB throughput. + * + * There are three kinds of completion for this function. + * (1) success, where io->status is zero. The number of io->bytes + * transferred is as requested. + * (2) error, where io->status is a negative errno value. The number + * of io->bytes transferred before the error is usually less + * than requested, and can be nonzero. + * (3) cancelation, a type of error with status -ECONNRESET that + * is initiated by usb_sg_cancel(). + * + * When this function returns, all memory allocated through usb_sg_init() or + * this call will have been freed. The request block parameter may still be + * passed to usb_sg_cancel(), or it may be freed. It could also be + * reinitialized and then reused. + * + * Data Transfer Rates: + * + * Bulk transfers are valid for full or high speed endpoints. + * The best full speed data rate is 19 packets of 64 bytes each + * per frame, or 1216 bytes per millisecond. + * The best high speed data rate is 13 packets of 512 bytes each + * per microframe, or 52 KBytes per millisecond. + * + * The reason to use interrupt transfers through this API would most likely + * be to reserve high speed bandwidth, where up to 24 KBytes per millisecond + * could be transferred. That capability is less useful for low or full + * speed interrupt endpoints, which allow at most one packet per millisecond, + * of at most 8 or 64 bytes (respectively). + */ +void usb_sg_wait (struct usb_sg_request *io) +{ + int i; + unsigned long flags; + + /* queue the urbs. */ + spin_lock_irqsave (&io->lock, flags); + for (i = 0; i < io->entries && !io->status; i++) { + int retval; + + retval = usb_submit_urb (io->urbs [i], SLAB_ATOMIC); + + /* after we submit, let completions or cancelations fire; + * we handshake using io->status. + */ + spin_unlock_irqrestore (&io->lock, flags); + switch (retval) { + /* maybe we retrying will recover */ + case -ENXIO: // hc didn't queue this one + case -EAGAIN: + case -ENOMEM: + retval = 0; + i--; + // FIXME: should it usb_sg_cancel() on INTERRUPT? + yield (); + break; + + /* no error? continue immediately. + * + * NOTE: to work better with UHCI (4K I/O buffer may + * need 3K of TDs) it may be good to limit how many + * URBs are queued at once; N milliseconds? + */ + case 0: + cpu_relax (); + break; + + /* fail any uncompleted urbs */ + default: + io->urbs [i]->status = retval; + dbg ("usb_sg_msg, submit --> %d", retval); + usb_sg_cancel (io); + } + spin_lock_irqsave (&io->lock, flags); + if (retval && io->status == -ECONNRESET) + io->status = retval; + } + spin_unlock_irqrestore (&io->lock, flags); + + /* OK, yes, this could be packaged as non-blocking. + * So could the submit loop above ... but it's easier to + * solve neither problem than to solve both! + */ + wait_for_completion (&io->complete); + + sg_clean (io); +} + +/** + * usb_sg_cancel - stop scatter/gather i/o issued by usb_sg_wait() + * @io: request block, initialized with usb_sg_init() + * + * This stops a request after it has been started by usb_sg_wait(). + * It can also prevents one initialized by usb_sg_init() from starting, + * so that call just frees resources allocated to the request. + */ +void usb_sg_cancel (struct usb_sg_request *io) +{ + unsigned long flags; + + spin_lock_irqsave (&io->lock, flags); + + /* shut everything down, if it didn't already */ + if (!io->status) { + int i; + + io->status = -ECONNRESET; + for (i = 0; i < io->entries; i++) { + int retval; + + if (!io->urbs [i]->dev) + continue; + retval = usb_unlink_urb (io->urbs [i]); + if (retval && retval != -EINPROGRESS) + warn ("usb_sg_cancel, unlink --> %d", retval); + // FIXME don't warn on "not yet submitted" error + } + } + spin_unlock_irqrestore (&io->lock, flags); +} +#endif +/*-------------------------------------------------------------------*/ + +/** + * usb_get_descriptor - issues a generic GET_DESCRIPTOR request + * @dev: the device whose descriptor is being retrieved + * @type: the descriptor type (USB_DT_*) + * @index: the number of the descriptor + * @buf: where to put the descriptor + * @size: how big is "buf"? + * Context: !in_interrupt () + * + * Gets a USB descriptor. Convenience functions exist to simplify + * getting some types of descriptors. Use + * usb_get_device_descriptor() for USB_DT_DEVICE, + * and usb_get_string() or usb_string() for USB_DT_STRING. + * Configuration descriptors (USB_DT_CONFIG) are part of the device + * structure, at least for the current configuration. + * In addition to a number of USB-standard descriptors, some + * devices also use class-specific or vendor-specific descriptors. + * + * This call is synchronous, and may not be used in an interrupt context. + * + * Returns the number of bytes received on success, or else the status code + * returned by the underlying usb_control_msg() call. + */ +int usb_get_descriptor(struct usb_device *dev, unsigned char type, unsigned char index, void *buf, int size) +{ + int i = 5; + int result; + + memset(buf,0,size); // Make sure we parse really received data + + while (i--) { + /* retries if the returned length was 0; flakey device */ + if ((result = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), + USB_REQ_GET_DESCRIPTOR, USB_DIR_IN, + (type << 8) + index, 0, buf, size, + HZ * USB_CTRL_GET_TIMEOUT)) > 0 + || result == -EPIPE) + break; + } + return result; +} + +/** + * usb_get_string - gets a string descriptor + * @dev: the device whose string descriptor is being retrieved + * @langid: code for language chosen (from string descriptor zero) + * @index: the number of the descriptor + * @buf: where to put the string + * @size: how big is "buf"? + * Context: !in_interrupt () + * + * Retrieves a string, encoded using UTF-16LE (Unicode, 16 bits per character, + * in little-endian byte order). + * The usb_string() function will often be a convenient way to turn + * these strings into kernel-printable form. + * + * Strings may be referenced in device, configuration, interface, or other + * descriptors, and could also be used in vendor-specific ways. + * + * This call is synchronous, and may not be used in an interrupt context. + * + * Returns the number of bytes received on success, or else the status code + * returned by the underlying usb_control_msg() call. + */ +int usb_get_string(struct usb_device *dev, unsigned short langid, unsigned char index, void *buf, int size) +{ + return usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), + USB_REQ_GET_DESCRIPTOR, USB_DIR_IN, + (USB_DT_STRING << 8) + index, langid, buf, size, + HZ * USB_CTRL_GET_TIMEOUT); +} + +/** + * usb_get_device_descriptor - (re)reads the device descriptor + * @dev: the device whose device descriptor is being updated + * Context: !in_interrupt () + * + * Updates the copy of the device descriptor stored in the device structure, + * which dedicates space for this purpose. Note that several fields are + * converted to the host CPU's byte order: the USB version (bcdUSB), and + * vendors product and version fields (idVendor, idProduct, and bcdDevice). + * That lets device drivers compare against non-byteswapped constants. + * + * There's normally no need to use this call, although some devices + * will change their descriptors after events like updating firmware. + * + * This call is synchronous, and may not be used in an interrupt context. + * + * Returns the number of bytes received on success, or else the status code + * returned by the underlying usb_control_msg() call. + */ +int usb_get_device_descriptor(struct usb_device *dev) +{ + int ret = usb_get_descriptor(dev, USB_DT_DEVICE, 0, &dev->descriptor, + sizeof(dev->descriptor)); + if (ret >= 0) { + le16_to_cpus(&dev->descriptor.bcdUSB); + le16_to_cpus(&dev->descriptor.idVendor); + le16_to_cpus(&dev->descriptor.idProduct); + le16_to_cpus(&dev->descriptor.bcdDevice); + } + return ret; +} + +/** + * usb_get_status - issues a GET_STATUS call + * @dev: the device whose status is being checked + * @type: USB_RECIP_*; for device, interface, or endpoint + * @target: zero (for device), else interface or endpoint number + * @data: pointer to two bytes of bitmap data + * Context: !in_interrupt () + * + * Returns device, interface, or endpoint status. Normally only of + * interest to see if the device is self powered, or has enabled the + * remote wakeup facility; or whether a bulk or interrupt endpoint + * is halted ("stalled"). + * + * Bits in these status bitmaps are set using the SET_FEATURE request, + * and cleared using the CLEAR_FEATURE request. The usb_clear_halt() + * function should be used to clear halt ("stall") status. + * + * This call is synchronous, and may not be used in an interrupt context. + * + * Returns the number of bytes received on success, or else the status code + * returned by the underlying usb_control_msg() call. + */ +int usb_get_status(struct usb_device *dev, int type, int target, void *data) +{ + return usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), + USB_REQ_GET_STATUS, USB_DIR_IN | type, 0, target, data, 2, + HZ * USB_CTRL_GET_TIMEOUT); +} + + +// hub-only!! ... and only exported for reset/reinit path. +// otherwise used internally, when setting up a config +void usb_set_maxpacket(struct usb_device *dev) +{ + int i, b; + + /* NOTE: affects all endpoints _except_ ep0 */ + for (i=0; iactconfig->desc.bNumInterfaces; i++) { + struct usb_interface *ifp = dev->actconfig->interface + i; + struct usb_host_interface *as = ifp->altsetting + ifp->act_altsetting; + struct usb_host_endpoint *ep = as->endpoint; + int e; + + for (e=0; edesc.bNumEndpoints; e++) { + struct usb_endpoint_descriptor *d; + d = &ep [e].desc; + b = d->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK; + if ((d->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == + USB_ENDPOINT_XFER_CONTROL) { /* Control => bidirectional */ + dev->epmaxpacketout[b] = d->wMaxPacketSize; + dev->epmaxpacketin [b] = d->wMaxPacketSize; + } + else if (usb_endpoint_out(d->bEndpointAddress)) { + if (d->wMaxPacketSize > dev->epmaxpacketout[b]) + dev->epmaxpacketout[b] = d->wMaxPacketSize; + } + else { + if (d->wMaxPacketSize > dev->epmaxpacketin [b]) + dev->epmaxpacketin [b] = d->wMaxPacketSize; + } + } + } +} + +/** + * usb_clear_halt - tells device to clear endpoint halt/stall condition + * @dev: device whose endpoint is halted + * @pipe: endpoint "pipe" being cleared + * Context: !in_interrupt () + * + * This is used to clear halt conditions for bulk and interrupt endpoints, + * as reported by URB completion status. Endpoints that are halted are + * sometimes referred to as being "stalled". Such endpoints are unable + * to transmit or receive data until the halt status is cleared. Any URBs + * queued for such an endpoint should normally be unlinked by the driver + * before clearing the halt condition, as described in sections 5.7.5 + * and 5.8.5 of the USB 2.0 spec. + * + * Note that control and isochronous endpoints don't halt, although control + * endpoints report "protocol stall" (for unsupported requests) using the + * same status code used to report a true stall. + * + * This call is synchronous, and may not be used in an interrupt context. + * + * Returns zero on success, or else the status code returned by the + * underlying usb_control_msg() call. + */ +int usb_clear_halt(struct usb_device *dev, int pipe) +{ + int result; + int endp = usb_pipeendpoint(pipe); + + if (usb_pipein (pipe)) + endp |= USB_DIR_IN; + + /* we don't care if it wasn't halted first. in fact some devices + * (like some ibmcam model 1 units) seem to expect hosts to make + * this request for iso endpoints, which can't halt! + */ + result = usb_control_msg(dev, usb_sndctrlpipe(dev, 0), + USB_REQ_CLEAR_FEATURE, USB_RECIP_ENDPOINT, 0, endp, NULL, 0, + HZ * USB_CTRL_SET_TIMEOUT); + + /* don't un-halt or force to DATA0 except on success */ + if (result < 0) + return result; + + /* NOTE: seems like Microsoft and Apple don't bother verifying + * the clear "took", so some devices could lock up if you check... + * such as the Hagiwara FlashGate DUAL. So we won't bother. + * + * NOTE: make sure the logic here doesn't diverge much from + * the copy in usb-storage, for as long as we need two copies. + */ + + /* toggle was reset by the clear, then ep was reactivated */ + usb_settoggle(dev, usb_pipeendpoint(pipe), usb_pipeout(pipe), 0); + usb_endpoint_running(dev, usb_pipeendpoint(pipe), usb_pipeout(pipe)); + + return 0; +} + +/** + * usb_set_interface - Makes a particular alternate setting be current + * @dev: the device whose interface is being updated + * @interface: the interface being updated + * @alternate: the setting being chosen. + * Context: !in_interrupt () + * + * This is used to enable data transfers on interfaces that may not + * be enabled by default. Not all devices support such configurability. + * Only the driver bound to an interface may change its setting. + * + * Within any given configuration, each interface may have several + * alternative settings. These are often used to control levels of + * bandwidth consumption. For example, the default setting for a high + * speed interrupt endpoint may not send more than 64 bytes per microframe, + * while interrupt transfers of up to 3KBytes per microframe are legal. + * Also, isochronous endpoints may never be part of an + * interface's default setting. To access such bandwidth, alternate + * interface settings must be made current. + * + * Note that in the Linux USB subsystem, bandwidth associated with + * an endpoint in a given alternate setting is not reserved until an URB + * is submitted that needs that bandwidth. Some other operating systems + * allocate bandwidth early, when a configuration is chosen. + * + * This call is synchronous, and may not be used in an interrupt context. + * Also, drivers must not change altsettings while urbs are scheduled for + * endpoints in that interface; all such urbs must first be completed + * (perhaps forced by unlinking). + * + * Returns zero on success, or else the status code returned by the + * underlying usb_control_msg() call. + */ +int usb_set_interface(struct usb_device *dev, int interface, int alternate) +{ + struct usb_interface *iface; + struct usb_host_interface *iface_as; + int i, ret; + void (*disable)(struct usb_device *, int) = dev->bus->op->disable; + + iface = usb_ifnum_to_if(dev, interface); + if (!iface) { + warn("selecting invalid interface %d", interface); + return -EINVAL; + } + + /* 9.4.10 says devices don't need this, if the interface + only has one alternate setting */ + if (iface->num_altsetting == 1) { + dbg("ignoring set_interface for dev %d, iface %d, alt %d", + dev->devnum, interface, alternate); + return 0; + } + + if (alternate < 0 || alternate >= iface->num_altsetting) + return -EINVAL; + + if ((ret = usb_control_msg(dev, usb_sndctrlpipe(dev, 0), + USB_REQ_SET_INTERFACE, USB_RECIP_INTERFACE, + iface->altsetting[alternate] + .desc.bAlternateSetting, + interface, NULL, 0, HZ * 5)) < 0) + return ret; + + /* FIXME drivers shouldn't need to replicate/bugfix the logic here + * when they implement async or easily-killable versions of this or + * other "should-be-internal" functions (like clear_halt). + * should hcd+usbcore postprocess control requests? + */ + + /* prevent submissions using previous endpoint settings */ + iface_as = iface->altsetting + iface->act_altsetting; + for (i = 0; i < iface_as->desc.bNumEndpoints; i++) { + u8 ep = iface_as->endpoint [i].desc.bEndpointAddress; + int out = !(ep & USB_DIR_IN); + + /* clear out hcd state, then usbcore state */ + if (disable) + disable (dev, ep); + ep &= USB_ENDPOINT_NUMBER_MASK; + (out ? dev->epmaxpacketout : dev->epmaxpacketin ) [ep] = 0; + } + iface->act_altsetting = alternate; + + /* 9.1.1.5: reset toggles for all endpoints affected by this iface-as + * + * Note: + * Despite EP0 is always present in all interfaces/AS, the list of + * endpoints from the descriptor does not contain EP0. Due to its + * omnipresence one might expect EP0 being considered "affected" by + * any SetInterface request and hence assume toggles need to be reset. + * However, EP0 toggles are re-synced for every individual transfer + * during the SETUP stage - hence EP0 toggles are "don't care" here. + * (Likewise, EP0 never "halts" on well designed devices.) + */ + + iface_as = &iface->altsetting[alternate]; + for (i = 0; i < iface_as->desc.bNumEndpoints; i++) { + u8 ep = iface_as->endpoint[i].desc.bEndpointAddress; + int out = !(ep & USB_DIR_IN); + + ep &= USB_ENDPOINT_NUMBER_MASK; + usb_settoggle (dev, ep, out, 0); + (out ? dev->epmaxpacketout : dev->epmaxpacketin) [ep] + = iface_as->endpoint [i].desc.wMaxPacketSize; + usb_endpoint_running (dev, ep, out); + } + + return 0; +} + +/** + * usb_set_configuration - Makes a particular device setting be current + * @dev: the device whose configuration is being updated + * @configuration: the configuration being chosen. + * Context: !in_interrupt () + * + * This is used to enable non-default device modes. Not all devices + * support this kind of configurability. By default, configuration + * zero is selected after enumeration; many devices only have a single + * configuration. + * + * USB devices may support one or more configurations, which affect + * power consumption and the functionality available. For example, + * the default configuration is limited to using 100mA of bus power, + * so that when certain device functionality requires more power, + * and the device is bus powered, that functionality will be in some + * non-default device configuration. Other device modes may also be + * reflected as configuration options, such as whether two ISDN + * channels are presented as independent 64Kb/s interfaces or as one + * bonded 128Kb/s interface. + * + * Note that USB has an additional level of device configurability, + * associated with interfaces. That configurability is accessed using + * usb_set_interface(). + * + * This call is synchronous, and may not be used in an interrupt context. + * + * Returns zero on success, or else the status code returned by the + * underlying usb_control_msg() call. + */ +int usb_set_configuration(struct usb_device *dev, int configuration) +{ + int i, ret; + struct usb_host_config *cp = NULL; + void (*disable)(struct usb_device *, int) = dev->bus->op->disable; + + for (i=0; idescriptor.bNumConfigurations; i++) { + if (dev->config[i].desc.bConfigurationValue == configuration) { + cp = &dev->config[i]; + break; + } + } + if ((!cp && configuration != 0) || (cp && configuration == 0)) { + warn("selecting invalid configuration %d", configuration); + return -EINVAL; + } + + /* if it's already configured, clear out old state first. */ + if (dev->state != USB_STATE_ADDRESS && disable) { + for (i = 1 /* skip ep0 */; i < 15; i++) { + disable (dev, i); + disable (dev, USB_DIR_IN | i); + } + } + dev->toggle[0] = dev->toggle[1] = 0; + dev->halted[0] = dev->halted[1] = 0; + dev->state = USB_STATE_ADDRESS; + + if ((ret = usb_control_msg(dev, usb_sndctrlpipe(dev, 0), + USB_REQ_SET_CONFIGURATION, 0, configuration, 0, + NULL, 0, HZ * USB_CTRL_SET_TIMEOUT)) < 0) + return ret; + if (configuration) + dev->state = USB_STATE_CONFIGURED; + dev->actconfig = cp; + + /* reset more hc/hcd endpoint state */ + usb_set_maxpacket(dev); + + return 0; +} + + +/** + * usb_string - returns ISO 8859-1 version of a string descriptor + * @dev: the device whose string descriptor is being retrieved + * @index: the number of the descriptor + * @buf: where to put the string + * @size: how big is "buf"? + * Context: !in_interrupt () + * + * This converts the UTF-16LE encoded strings returned by devices, from + * usb_get_string_descriptor(), to null-terminated ISO-8859-1 encoded ones + * that are more usable in most kernel contexts. Note that all characters + * in the chosen descriptor that can't be encoded using ISO-8859-1 + * are converted to the question mark ("?") character, and this function + * chooses strings in the first language supported by the device. + * + * The ASCII (or, redundantly, "US-ASCII") character set is the seven-bit + * subset of ISO 8859-1. ISO-8859-1 is the eight-bit subset of Unicode, + * and is appropriate for use many uses of English and several other + * Western European languages. (But it doesn't include the "Euro" symbol.) + * + * This call is synchronous, and may not be used in an interrupt context. + * + * Returns length of the string (>= 0) or usb_control_msg status (< 0). + */ +int usb_string(struct usb_device *dev, int index, char *buf, size_t size) +{ + unsigned char *tbuf; + int err, len; + unsigned int u, idx; + + if (size <= 0 || !buf || !index) + return -EINVAL; + buf[0] = 0; + tbuf = kmalloc(256, GFP_KERNEL); + if (!tbuf) + return -ENOMEM; + + /* get langid for strings if it's not yet known */ + if (!dev->have_langid) { + err = usb_get_string(dev, 0, 0, tbuf, 4); + if (err < 0) { + err("error getting string descriptor 0 (error=%d)", err); + goto errout; + } else if (tbuf[0] < 4) { + err("string descriptor 0 too short"); + err = -EINVAL; + goto errout; + } else { + dev->have_langid = -1; + dev->string_langid = tbuf[2] | (tbuf[3]<< 8); + /* always use the first langid listed */ + dbg("USB device number %d default language ID 0x%x", + dev->devnum, dev->string_langid); + } + } + + /* + * ask for the length of the string + */ + + err = usb_get_string(dev, dev->string_langid, index, tbuf, 2); + if(err<2) + goto errout; + len=tbuf[0]; + + err = usb_get_string(dev, dev->string_langid, index, tbuf, len); + if (err < 0) + goto errout; + + size--; /* leave room for trailing NULL char in output buffer */ + for (idx = 0, u = 2; u < err; u += 2) { + if (idx >= size) + break; + if (tbuf[u+1]) /* high byte */ + buf[idx++] = '?'; /* non ISO-8859-1 character */ + else + buf[idx++] = tbuf[u]; + } + buf[idx] = 0; + err = idx; + + errout: + kfree(tbuf); + return err; +} + +// synchronous request completion model +EXPORT_SYMBOL(usb_control_msg); +EXPORT_SYMBOL(usb_bulk_msg); + +EXPORT_SYMBOL(usb_sg_init); +EXPORT_SYMBOL(usb_sg_cancel); +EXPORT_SYMBOL(usb_sg_wait); + +// synchronous control message convenience routines +EXPORT_SYMBOL(usb_get_descriptor); +EXPORT_SYMBOL(usb_get_device_descriptor); +EXPORT_SYMBOL(usb_get_status); +EXPORT_SYMBOL(usb_get_string); +EXPORT_SYMBOL(usb_string); +EXPORT_SYMBOL(usb_clear_halt); +EXPORT_SYMBOL(usb_set_configuration); +EXPORT_SYMBOL(usb_set_interface); + diff --git a/reactos/drivers/usb/cromwell/core/urb.c b/reactos/drivers/usb/cromwell/core/urb.c new file mode 100644 index 00000000000..08b691fd1ff --- /dev/null +++ b/reactos/drivers/usb/cromwell/core/urb.c @@ -0,0 +1,398 @@ +#include "../usb_wrapper.h" +#include "hcd.h" + +/** + * usb_init_urb - initializes a urb so that it can be used by a USB driver + * @urb: pointer to the urb to initialize + * + * Initializes a urb so that the USB subsystem can use it properly. + * + * If a urb is created with a call to usb_alloc_urb() it is not + * necessary to call this function. Only use this if you allocate the + * space for a struct urb on your own. If you call this function, be + * careful when freeing the memory for your urb that it is no longer in + * use by the USB core. + * + * Only use this function if you _really_ understand what you are doing. + */ +void STDCALL usb_init_urb(struct urb *urb) +{ + if (urb) { + memset(urb, 0, sizeof(*urb)); + urb->count = (atomic_t)ATOMIC_INIT(1); + spin_lock_init(&urb->lock); + } +} + +/** + * usb_alloc_urb - creates a new urb for a USB driver to use + * @iso_packets: number of iso packets for this urb + * @mem_flags: the type of memory to allocate, see kmalloc() for a list of + * valid options for this. + * + * Creates an urb for the USB driver to use, initializes a few internal + * structures, incrementes the usage counter, and returns a pointer to it. + * + * If no memory is available, NULL is returned. + * + * If the driver want to use this urb for interrupt, control, or bulk + * endpoints, pass '0' as the number of iso packets. + * + * The driver must call usb_free_urb() when it is finished with the urb. + */ +struct urb STDCALL *usb_alloc_urb(int iso_packets, int mem_flags) +{ + struct urb *urb; + + urb = (struct urb *)kmalloc(sizeof(struct urb) + + iso_packets * sizeof(struct usb_iso_packet_descriptor), + mem_flags); + if (!urb) { + err("alloc_urb: kmalloc failed"); + return NULL; + } + usb_init_urb(urb); + return urb; +} + +/** + * usb_free_urb - frees the memory used by a urb when all users of it are finished + * @urb: pointer to the urb to free + * + * Must be called when a user of a urb is finished with it. When the last user + * of the urb calls this function, the memory of the urb is freed. + * + * Note: The transfer buffer associated with the urb is not freed, that must be + * done elsewhere. + */ +void STDCALL usb_free_urb(struct urb *urb) +{ + if (urb) + if (atomic_dec_and_test(&urb->count)) + { + kfree(urb); + } +} + +/** + * usb_get_urb - increments the reference count of the urb + * @urb: pointer to the urb to modify + * + * This must be called whenever a urb is transferred from a device driver to a + * host controller driver. This allows proper reference counting to happen + * for urbs. + * + * A pointer to the urb with the incremented reference counter is returned. + */ +struct urb STDCALL * usb_get_urb(struct urb *urb) +{ + if (urb) { + atomic_inc(&urb->count); + return urb; + } else + return NULL; +} + + +/*-------------------------------------------------------------------*/ + +/** + * usb_submit_urb - issue an asynchronous transfer request for an endpoint + * @urb: pointer to the urb describing the request + * @mem_flags: the type of memory to allocate, see kmalloc() for a list + * of valid options for this. + * + * This submits a transfer request, and transfers control of the URB + * describing that request to the USB subsystem. Request completion will + * be indicated later, asynchronously, by calling the completion handler. + * The three types of completion are success, error, and unlink + * (also called "request cancellation"). + * URBs may be submitted in interrupt context. + * + * The caller must have correctly initialized the URB before submitting + * it. Functions such as usb_fill_bulk_urb() and usb_fill_control_urb() are + * available to ensure that most fields are correctly initialized, for + * the particular kind of transfer, although they will not initialize + * any transfer flags. + * + * Successful submissions return 0; otherwise this routine returns a + * negative error number. If the submission is successful, the complete() + * callback from the urb will be called exactly once, when the USB core and + * host controller driver are finished with the urb. When the completion + * function is called, control of the URB is returned to the device + * driver which issued the request. The completion handler may then + * immediately free or reuse that URB. + * + * For control endpoints, the synchronous usb_control_msg() call is + * often used (in non-interrupt context) instead of this call. + * That is often used through convenience wrappers, for the requests + * that are standardized in the USB 2.0 specification. For bulk + * endpoints, a synchronous usb_bulk_msg() call is available. + * + * Request Queuing: + * + * URBs may be submitted to endpoints before previous ones complete, to + * minimize the impact of interrupt latencies and system overhead on data + * throughput. This is required for continuous isochronous data streams, + * and may also be required for some kinds of interrupt transfers. Such + * queueing also maximizes bandwidth utilization by letting USB controllers + * start work on later requests before driver software has finished the + * completion processing for earlier requests. + * + * Bulk and Isochronous URBs may always be queued. At this writing, all + * mainstream host controller drivers support queueing for control and + * interrupt transfer requests. + * + * Reserved Bandwidth Transfers: + * + * Periodic transfers (interrupt or isochronous) are performed repeatedly, + * using the interval specified in the urb. Submitting the first urb to + * the endpoint reserves the bandwidth necessary to make those transfers. + * If the USB subsystem can't allocate sufficient bandwidth to perform + * the periodic request, submitting such a periodic request should fail. + * + * Device drivers must explicitly request that repetition, by ensuring that + * some URB is always on the endpoint's queue (except possibly for short + * periods during completion callacks). When there is no longer an urb + * queued, the endpoint's bandwidth reservation is canceled. This means + * drivers can use their completion handlers to ensure they keep bandwidth + * they need, by reinitializing and resubmitting the just-completed urb + * until the driver longer needs that periodic bandwidth. + * + * Memory Flags: + * + * The general rules for how to decide which mem_flags to use + * are the same as for kmalloc. There are four + * different possible values; GFP_KERNEL, GFP_NOFS, GFP_NOIO and + * GFP_ATOMIC. + * + * GFP_NOFS is not ever used, as it has not been implemented yet. + * + * GFP_ATOMIC is used when + * (a) you are inside a completion handler, an interrupt, bottom half, + * tasklet or timer, or + * (b) you are holding a spinlock or rwlock (does not apply to + * semaphores), or + * (c) current->state != TASK_RUNNING, this is the case only after + * you've changed it. + * + * GFP_NOIO is used in the block io path and error handling of storage + * devices. + * + * All other situations use GFP_KERNEL. + * + * Some more specific rules for mem_flags can be inferred, such as + * (1) start_xmit, timeout, and receive methods of network drivers must + * use GFP_ATOMIC (they are called with a spinlock held); + * (2) queuecommand methods of scsi drivers must use GFP_ATOMIC (also + * called with a spinlock held); + * (3) If you use a kernel thread with a network driver you must use + * GFP_NOIO, unless (b) or (c) apply; + * (4) after you have done a down() you can use GFP_KERNEL, unless (b) or (c) + * apply or your are in a storage driver's block io path; + * (5) USB probe and disconnect can use GFP_KERNEL unless (b) or (c) apply; and + * (6) changing firmware on a running storage or net device uses + * GFP_NOIO, unless b) or c) apply + * + */ +int STDCALL usb_submit_urb(struct urb *urb, int mem_flags) +{ + int pipe, temp, max; + struct usb_device *dev; + struct usb_operations *op; + int is_out; +// printk("sub dev %p bus %p num %i op %p sub %p\n", +// urb->dev, urb->dev->bus,urb->dev->devnum,urb->dev->bus->op, urb->dev->bus->op->submit_urb); + if (!urb || urb->hcpriv || !urb->complete) + return -EINVAL; + if (!(dev = urb->dev) || + (dev->state < USB_STATE_DEFAULT) || + (!dev->bus) || (dev->devnum <= 0)) + return -ENODEV; + if (!(op = dev->bus->op) || !op->submit_urb) + return -ENODEV; + + urb->status = -EINPROGRESS; + urb->actual_length = 0; + urb->bandwidth = 0; + + /* Lots of sanity checks, so HCDs can rely on clean data + * and don't need to duplicate tests + */ + pipe = urb->pipe; + temp = usb_pipetype (pipe); + is_out = usb_pipeout (pipe); + + if (!usb_pipecontrol (pipe) && dev->state < USB_STATE_CONFIGURED) + return -ENODEV; + + /* (actually HCDs may need to duplicate this, endpoint might yet + * stall due to queued bulk/intr transactions that complete after + * we check) + */ + if (usb_endpoint_halted (dev, usb_pipeendpoint (pipe), is_out)) + return -EPIPE; + + /* FIXME there should be a sharable lock protecting us against + * config/altsetting changes and disconnects, kicking in here. + * (here == before maxpacket, and eventually endpoint type, + * checks get made.) + */ + + max = usb_maxpacket (dev, pipe, is_out); + if (max <= 0) { + dbg ("%s: bogus endpoint %d-%s on usb-%s-%s (bad maxpacket %d)", + __FUNCTION__, + usb_pipeendpoint (pipe), is_out ? "OUT" : "IN", + dev->bus->bus_name, dev->devpath, + max); + return -EMSGSIZE; + } + + /* periodic transfers limit size per frame/uframe, + * but drivers only control those sizes for ISO. + * while we're checking, initialize return status. + */ + if (temp == PIPE_ISOCHRONOUS) { + int n, len; + + /* "high bandwidth" mode, 1-3 packets/uframe? */ + if (dev->speed == USB_SPEED_HIGH) { + int mult = 1 + ((max >> 11) & 0x03); + max &= 0x03ff; + max *= mult; + } + + if (urb->number_of_packets <= 0) + return -EINVAL; + for (n = 0; n < urb->number_of_packets; n++) { + len = urb->iso_frame_desc [n].length; + if (len < 0 || len > max) + return -EMSGSIZE; + urb->iso_frame_desc [n].status = -EXDEV; + urb->iso_frame_desc [n].actual_length = 0; + } + } + + /* the I/O buffer must be mapped/unmapped, except when length=0 */ + if (urb->transfer_buffer_length < 0) + return -EMSGSIZE; + +#ifdef DEBUG + /* stuff that drivers shouldn't do, but which shouldn't + * cause problems in HCDs if they get it wrong. + */ + { + unsigned int orig_flags = urb->transfer_flags; + unsigned int allowed; + + /* enforce simple/standard policy */ + allowed = URB_ASYNC_UNLINK; // affects later unlinks + allowed |= URB_NO_DMA_MAP; + allowed |= URB_NO_INTERRUPT; + switch (temp) { + case PIPE_BULK: + if (is_out) + allowed |= URB_ZERO_PACKET; + /* FALLTHROUGH */ + case PIPE_CONTROL: + allowed |= URB_NO_FSBR; /* only affects UHCI */ + /* FALLTHROUGH */ + default: /* all non-iso endpoints */ + if (!is_out) + allowed |= URB_SHORT_NOT_OK; + break; + case PIPE_ISOCHRONOUS: + allowed |= URB_ISO_ASAP; + break; + } + urb->transfer_flags &= allowed; + + /* fail if submitter gave bogus flags */ + if (urb->transfer_flags != orig_flags) { + err ("BOGUS urb flags, %x --> %x", + orig_flags, urb->transfer_flags); + return -EINVAL; + } + } +#endif + /* + * Force periodic transfer intervals to be legal values that are + * a power of two (so HCDs don't need to). + * + * FIXME want bus->{intr,iso}_sched_horizon values here. Each HC + * supports different values... this uses EHCI/UHCI defaults (and + * EHCI can use smaller non-default values). + */ + switch (temp) { + case PIPE_ISOCHRONOUS: + case PIPE_INTERRUPT: + /* too small? */ + if (urb->interval <= 0) + return -EINVAL; + /* too big? */ + switch (dev->speed) { + case USB_SPEED_HIGH: /* units are microframes */ + // NOTE usb handles 2^15 + if (urb->interval > (1024 * 8)) + urb->interval = 1024 * 8; + temp = 1024 * 8; + break; + case USB_SPEED_FULL: /* units are frames/msec */ + case USB_SPEED_LOW: + if (temp == PIPE_INTERRUPT) { + if (urb->interval > 255) + return -EINVAL; + // NOTE ohci only handles up to 32 + temp = 128; + } else { + if (urb->interval > 1024) + urb->interval = 1024; + // NOTE usb and ohci handle up to 2^15 + temp = 1024; + } + break; + default: + return -EINVAL; + } + /* power of two? */ + while (temp > urb->interval) + temp >>= 1; + urb->interval = temp; + } + + return op->submit_urb (urb, mem_flags); +} + +/*-------------------------------------------------------------------*/ + +/** + * usb_unlink_urb - abort/cancel a transfer request for an endpoint + * @urb: pointer to urb describing a previously submitted request + * + * This routine cancels an in-progress request. The requests's + * completion handler will be called with a status code indicating + * that the request has been canceled, and that control of the URB + * has been returned to that device driver. + * + * When the URB_ASYNC_UNLINK transfer flag for the URB is clear, this + * request is synchronous. Success is indicated by returning zero, + * at which time the urb will have been unlinked, + * and the completion function will see status -ENOENT. Failure is + * indicated by any other return value. This mode may not be used + * when unlinking an urb from an interrupt context, such as a bottom + * half or a completion handler, + * + * When the URB_ASYNC_UNLINK transfer flag for the URB is set, this + * request is asynchronous. Success is indicated by returning -EINPROGRESS, + * at which time the urb will normally not have been unlinked, + * and the completion function will see status -ECONNRESET. Failure is + * indicated by any other return value. + */ +int STDCALL usb_unlink_urb(struct urb *urb) +{ + if (urb && urb->dev && urb->dev->bus && urb->dev->bus->op) + return urb->dev->bus->op->unlink_urb(urb); + else + return -ENODEV; +} diff --git a/reactos/drivers/usb/cromwell/core/usb-debug.c b/reactos/drivers/usb/cromwell/core/usb-debug.c new file mode 100644 index 00000000000..a2a3404f4c6 --- /dev/null +++ b/reactos/drivers/usb/cromwell/core/usb-debug.c @@ -0,0 +1,206 @@ +/* + * debug.c - USB debug helper routines. + * + * I just want these out of the way where they aren't in your + * face, but so that you can still use them.. + */ +#define CONFIG_USB_DEBUG +#if 0 +#include +#include +#include +#include +#ifdef CONFIG_USB_DEBUG + #define DEBUG +#else + #undef DEBUG +#endif +#include +#else +#include "../usb_wrapper.h" +#endif + +static void usb_show_endpoint(struct usb_host_endpoint *endpoint) +{ + usb_show_endpoint_descriptor(&endpoint->desc); +} + +static void usb_show_interface(struct usb_host_interface *altsetting) +{ + int i; + + usb_show_interface_descriptor(&altsetting->desc); + + for (i = 0; i < altsetting->desc.bNumEndpoints; i++) + usb_show_endpoint(altsetting->endpoint + i); +} + +static void usb_show_config(struct usb_host_config *config) +{ + int i, j; + struct usb_interface *ifp; + + usb_show_config_descriptor(&config->desc); + for (i = 0; i < config->desc.bNumInterfaces; i++) { + ifp = config->interface + i; + + if (!ifp) + break; + + printk("\n Interface: %d\n", i); + for (j = 0; j < ifp->num_altsetting; j++) + usb_show_interface(ifp->altsetting + j); + } +} + +void usb_show_device(struct usb_device *dev) +{ + int i; + + usb_show_device_descriptor(&dev->descriptor); + for (i = 0; i < dev->descriptor.bNumConfigurations; i++) + usb_show_config(dev->config + i); +} + +/* + * Parse and show the different USB descriptors. + */ +void usb_show_device_descriptor(struct usb_device_descriptor *desc) +{ + if (!desc) + { + printk("Invalid USB device descriptor (NULL POINTER)\n"); + return; + } + printk(" Length = %2d%s\n", desc->bLength, + desc->bLength == USB_DT_DEVICE_SIZE ? "" : " (!!!)"); + printk(" DescriptorType = %02x\n", desc->bDescriptorType); + + printk(" USB version = %x.%02x\n", + desc->bcdUSB >> 8, desc->bcdUSB & 0xff); + printk(" Vendor:Product = %04x:%04x\n", + desc->idVendor, desc->idProduct); + printk(" MaxPacketSize0 = %d\n", desc->bMaxPacketSize0); + printk(" NumConfigurations = %d\n", desc->bNumConfigurations); + printk(" Device version = %x.%02x\n", + desc->bcdDevice >> 8, desc->bcdDevice & 0xff); + + printk(" Device Class:SubClass:Protocol = %02x:%02x:%02x\n", + desc->bDeviceClass, desc->bDeviceSubClass, desc->bDeviceProtocol); + switch (desc->bDeviceClass) { + case 0: + printk(" Per-interface classes\n"); + break; + case USB_CLASS_AUDIO: + printk(" Audio device class\n"); + break; + case USB_CLASS_COMM: + printk(" Communications class\n"); + break; + case USB_CLASS_HID: + printk(" Human Interface Devices class\n"); + break; + case USB_CLASS_PRINTER: + printk(" Printer device class\n"); + break; + case USB_CLASS_MASS_STORAGE: + printk(" Mass Storage device class\n"); + break; + case USB_CLASS_HUB: + printk(" Hub device class\n"); + break; + case USB_CLASS_VENDOR_SPEC: + printk(" Vendor class\n"); + break; + default: + printk(" Unknown class\n"); + } +} + +void usb_show_config_descriptor(struct usb_config_descriptor *desc) +{ + printk("Configuration:\n"); + printk(" bLength = %4d%s\n", desc->bLength, + desc->bLength == USB_DT_CONFIG_SIZE ? "" : " (!!!)"); + printk(" bDescriptorType = %02x\n", desc->bDescriptorType); + printk(" wTotalLength = %04x\n", desc->wTotalLength); + printk(" bNumInterfaces = %02x\n", desc->bNumInterfaces); + printk(" bConfigurationValue = %02x\n", desc->bConfigurationValue); + printk(" iConfiguration = %02x\n", desc->iConfiguration); + printk(" bmAttributes = %02x\n", desc->bmAttributes); + printk(" bMaxPower = %4dmA\n", desc->bMaxPower * 2); +} + +void usb_show_interface_descriptor(struct usb_interface_descriptor *desc) +{ + printk(" Alternate Setting: %2d\n", desc->bAlternateSetting); + printk(" bLength = %4d%s\n", desc->bLength, + desc->bLength == USB_DT_INTERFACE_SIZE ? "" : " (!!!)"); + printk(" bDescriptorType = %02x\n", desc->bDescriptorType); + printk(" bInterfaceNumber = %02x\n", desc->bInterfaceNumber); + printk(" bAlternateSetting = %02x\n", desc->bAlternateSetting); + printk(" bNumEndpoints = %02x\n", desc->bNumEndpoints); + printk(" bInterface Class:SubClass:Protocol = %02x:%02x:%02x\n", + desc->bInterfaceClass, desc->bInterfaceSubClass, desc->bInterfaceProtocol); + printk(" iInterface = %02x\n", desc->iInterface); +} + +void usb_show_endpoint_descriptor(struct usb_endpoint_descriptor *desc) +{ + char *LengthCommentString = (desc->bLength == + USB_DT_ENDPOINT_AUDIO_SIZE) ? " (Audio)" : (desc->bLength == + USB_DT_ENDPOINT_SIZE) ? "" : " (!!!)"; + char *EndpointType[4] = { "Control", "Isochronous", "Bulk", "Interrupt" }; + + printk(" Endpoint:\n"); + printk(" bLength = %4d%s\n", + desc->bLength, LengthCommentString); + printk(" bDescriptorType = %02x\n", desc->bDescriptorType); + printk(" bEndpointAddress = %02x (%s)\n", desc->bEndpointAddress, + (desc->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == + USB_ENDPOINT_XFER_CONTROL ? "i/o" : + (desc->bEndpointAddress & USB_ENDPOINT_DIR_MASK) ? "in" : "out"); + printk(" bmAttributes = %02x (%s)\n", desc->bmAttributes, + EndpointType[USB_ENDPOINT_XFERTYPE_MASK & desc->bmAttributes]); + printk(" wMaxPacketSize = %04x\n", desc->wMaxPacketSize); + printk(" bInterval = %02x\n", desc->bInterval); + + /* Audio extensions to the endpoint descriptor */ + if (desc->bLength == USB_DT_ENDPOINT_AUDIO_SIZE) { + printk(" bRefresh = %02x\n", desc->bRefresh); + printk(" bSynchAddress = %02x\n", desc->bSynchAddress); + } +} + +void usb_show_string(struct usb_device *dev, char *id, int index) +{ + char *buf; + + if (!index) + return; + if (!(buf = kmalloc(256, GFP_KERNEL))) + return; + if (usb_string(dev, index, buf, 256) > 0) + dev_printk(KERN_INFO, &dev->dev, "%s: %s\n", id, buf); + kfree(buf); +} + +void usb_dump_urb (struct urb *urb) +{ + printk ("urb :%p\n", urb); + printk ("dev :%p\n", urb->dev); + printk ("pipe :%08X\n", urb->pipe); + printk ("status :%d\n", urb->status); + printk ("transfer_flags :%08X\n", urb->transfer_flags); + printk ("transfer_buffer :%p\n", urb->transfer_buffer); + printk ("transfer_buffer_length:%d\n", urb->transfer_buffer_length); + printk ("actual_length :%d\n", urb->actual_length); + printk ("setup_packet :%p\n", urb->setup_packet); + printk ("start_frame :%d\n", urb->start_frame); + printk ("number_of_packets :%d\n", urb->number_of_packets); + printk ("interval :%d\n", urb->interval); + printk ("error_count :%d\n", urb->error_count); + printk ("context :%p\n", urb->context); + printk ("complete :%p\n", urb->complete); +} + diff --git a/reactos/drivers/usb/cromwell/core/usb.c b/reactos/drivers/usb/cromwell/core/usb.c new file mode 100644 index 00000000000..4206935def1 --- /dev/null +++ b/reactos/drivers/usb/cromwell/core/usb.c @@ -0,0 +1,1596 @@ +/* + * drivers/usb/usb.c + * + * (C) Copyright Linus Torvalds 1999 + * (C) Copyright Johannes Erdfelt 1999-2001 + * (C) Copyright Andreas Gal 1999 + * (C) Copyright Gregory P. Smith 1999 + * (C) Copyright Deti Fliegl 1999 (new USB architecture) + * (C) Copyright Randy Dunlap 2000 + * (C) Copyright David Brownell 2000-2001 (kernel hotplug, usb_device_id, + more docs, etc) + * (C) Copyright Yggdrasil Computing, Inc. 2000 + * (usb_device_id matching changes by Adam J. Richter) + * (C) Copyright Greg Kroah-Hartman 2002-2003 + * + * NOTE! This is not actually a driver at all, rather this is + * just a collection of helper routines that implement the + * generic USB things that the real drivers can use.. + * + * Think of this as a "USB library" rather than anything else. + * It should be considered a slave, with no callbacks. Callbacks + * are evil. + */ + +#if 0 +#include + +#ifdef CONFIG_USB_DEBUG + #define DEBUG +#else + #undef DEBUG +#endif + +#include +#include +#include +#include +#include /* for in_interrupt() */ +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include "hcd.h" +#include "usb.h" +#else +#include "../usb_wrapper.h" +#include "hcd.h" +#endif + + +extern int usb_hub_init(void); +extern void usb_hub_cleanup(void); +extern int usb_major_init(void); +extern void usb_major_cleanup(void); + + +int nousb; /* Disable USB when built into kernel image */ + /* Not honored on modular build */ + + +static int generic_probe (struct device *dev) +{ + return 0; +} +static int generic_remove (struct device *dev) +{ + return 0; +} + +static struct device_driver usb_generic_driver = { + .name = "usb", + .bus = &usb_bus_type, + .probe = generic_probe, + .remove = generic_remove, +}; + +static int usb_generic_driver_data; + +/* needs to be called with BKL held */ +int usb_device_probe(struct device *dev) +{ + struct usb_interface * intf = to_usb_interface(dev); + struct usb_driver * driver = to_usb_driver(dev->driver); + const struct usb_device_id *id; + int error = -ENODEV; + + dev_dbg(dev, "%s\n", __FUNCTION__); + + if (!driver->probe) + return error; + + id = usb_match_id (intf, driver->id_table); + if (id) { + dev_dbg (dev, "%s - got id\n", __FUNCTION__); + down (&driver->serialize); + error = driver->probe (intf, id); + up (&driver->serialize); + } + if (!error) + intf->driver = driver; + + return error; +} + +int usb_device_remove(struct device *dev) +{ + struct usb_interface *intf; + struct usb_driver *driver; + + intf = list_entry(dev,struct usb_interface,dev); + driver = to_usb_driver(dev->driver); + + down(&driver->serialize); + + if (intf->driver && intf->driver->disconnect) + intf->driver->disconnect(intf); + + /* if driver->disconnect didn't release the interface */ + if (intf->driver) + usb_driver_release_interface(driver, intf); + + up(&driver->serialize); + + return 0; +} + +/** + * usb_register - register a USB driver + * @new_driver: USB operations for the driver + * + * Registers a USB driver with the USB core. The list of unattached + * interfaces will be rescanned whenever a new driver is added, allowing + * the new driver to attach to any recognized devices. + * Returns a negative error code on failure and 0 on success. + * + * NOTE: if you want your driver to use the USB major number, you must call + * usb_register_dev() to enable that functionality. This function no longer + * takes care of that. + */ +int usb_register(struct usb_driver *new_driver) +{ + int retval = 0; + + if (nousb) + return -ENODEV; + + new_driver->driver.name = (char *)new_driver->name; + new_driver->driver.bus = &usb_bus_type; + new_driver->driver.probe = usb_device_probe; + new_driver->driver.remove = usb_device_remove; + + init_MUTEX(&new_driver->serialize); + + retval = driver_register(&new_driver->driver); + + if (!retval) { + info("registered new driver %s", new_driver->name); + usbfs_update_special(); + } else { + err("problem %d when registering driver %s", + retval, new_driver->name); + } + + return retval; +} + +/** + * usb_deregister - unregister a USB driver + * @driver: USB operations of the driver to unregister + * Context: !in_interrupt (), must be called with BKL held + * + * Unlinks the specified driver from the internal USB driver list. + * + * NOTE: If you called usb_register_dev(), you still need to call + * usb_deregister_dev() to clean up your driver's allocated minor numbers, + * this * call will no longer do it for you. + */ +void usb_deregister(struct usb_driver *driver) +{ + info("deregistering driver %s", driver->name); + + driver_unregister (&driver->driver); + + usbfs_update_special(); +} + +/** + * usb_ifnum_to_if - get the interface object with a given interface number (usbcore-internal) + * @dev: the device whose current configuration is considered + * @ifnum: the desired interface + * + * This walks the device descriptor for the currently active configuration + * and returns a pointer to the interface with that particular interface + * number, or null. + * + * Note that configuration descriptors are not required to assign interface + * numbers sequentially, so that it would be incorrect to assume that + * the first interface in that descriptor corresponds to interface zero. + * This routine helps device drivers avoid such mistakes. + * However, you should make sure that you do the right thing with any + * alternate settings available for this interfaces. + */ +struct usb_interface *usb_ifnum_to_if(struct usb_device *dev, unsigned ifnum) +{ + int i; + + for (i = 0; i < dev->actconfig->desc.bNumInterfaces; i++) + if (dev->actconfig->interface[i].altsetting[0] + .desc.bInterfaceNumber == ifnum) + return &dev->actconfig->interface[i]; + + return NULL; +} + +/** + * usb_epnum_to_ep_desc - get the endpoint object with a given endpoint number + * @dev: the device whose current configuration is considered + * @epnum: the desired endpoint + * + * This walks the device descriptor for the currently active configuration, + * and returns a pointer to the endpoint with that particular endpoint + * number, or null. + * + * Note that interface descriptors are not required to assign endpont + * numbers sequentially, so that it would be incorrect to assume that + * the first endpoint in that descriptor corresponds to interface zero. + * This routine helps device drivers avoid such mistakes. + */ +struct usb_endpoint_descriptor * +usb_epnum_to_ep_desc(struct usb_device *dev, unsigned epnum) +{ + int i, j, k; + + for (i = 0; i < dev->actconfig->desc.bNumInterfaces; i++) + for (j = 0; j < dev->actconfig->interface[i].num_altsetting; j++) + for (k = 0; k < dev->actconfig->interface[i] + .altsetting[j].desc.bNumEndpoints; k++) + if (epnum == dev->actconfig->interface[i] + .altsetting[j].endpoint[k] + .desc.bEndpointAddress) + return &dev->actconfig->interface[i] + .altsetting[j].endpoint[k] + .desc; + + return NULL; +} + +/** + * usb_driver_claim_interface - bind a driver to an interface + * @driver: the driver to be bound + * @iface: the interface to which it will be bound + * @priv: driver data associated with that interface + * + * This is used by usb device drivers that need to claim more than one + * interface on a device when probing (audio and acm are current examples). + * No device driver should directly modify internal usb_interface or + * usb_device structure members. + * + * Few drivers should need to use this routine, since the most natural + * way to bind to an interface is to return the private data from + * the driver's probe() method. Any driver that does use this must + * first be sure that no other driver has claimed the interface, by + * checking with usb_interface_claimed(). + */ +void usb_driver_claim_interface(struct usb_driver *driver, struct usb_interface *iface, void* priv) +{ + if (!iface || !driver) + return; + + // FIXME change API to report an error in this case + if (iface->driver) + err ("%s driver booted %s off interface %p", + driver->name, iface->driver->name, iface); + else + dbg("%s driver claimed interface %p", driver->name, iface); + + iface->driver = driver; + usb_set_intfdata(iface, priv); +} + +/** + * usb_interface_claimed - returns true iff an interface is claimed + * @iface: the interface being checked + * + * This should be used by drivers to check other interfaces to see if + * they are available or not. If another driver has claimed the interface, + * they may not claim it. Otherwise it's OK to claim it using + * usb_driver_claim_interface(). + * + * Returns true (nonzero) iff the interface is claimed, else false (zero). + */ +int usb_interface_claimed(struct usb_interface *iface) +{ + if (!iface) + return 0; + + return (iface->driver != NULL); +} /* usb_interface_claimed() */ + +/** + * usb_driver_release_interface - unbind a driver from an interface + * @driver: the driver to be unbound + * @iface: the interface from which it will be unbound + * + * This should be used by drivers to release their claimed interfaces. + * It is normally called in their disconnect() methods, and only for + * drivers that bound to more than one interface in their probe(). + * + * When the USB subsystem disconnect()s a driver from some interface, + * it automatically invokes this method for that interface. That + * means that even drivers that used usb_driver_claim_interface() + * usually won't need to call this. + */ +void usb_driver_release_interface(struct usb_driver *driver, struct usb_interface *iface) +{ + /* this should never happen, don't release something that's not ours */ + if (!iface || iface->driver != driver) + return; + + iface->driver = NULL; + usb_set_intfdata(iface, NULL); +} + +/** + * usb_match_id - find first usb_device_id matching device or interface + * @interface: the interface of interest + * @id: array of usb_device_id structures, terminated by zero entry + * + * usb_match_id searches an array of usb_device_id's and returns + * the first one matching the device or interface, or null. + * This is used when binding (or rebinding) a driver to an interface. + * Most USB device drivers will use this indirectly, through the usb core, + * but some layered driver frameworks use it directly. + * These device tables are exported with MODULE_DEVICE_TABLE, through + * modutils and "modules.usbmap", to support the driver loading + * functionality of USB hotplugging. + * + * What Matches: + * + * The "match_flags" element in a usb_device_id controls which + * members are used. If the corresponding bit is set, the + * value in the device_id must match its corresponding member + * in the device or interface descriptor, or else the device_id + * does not match. + * + * "driver_info" is normally used only by device drivers, + * but you can create a wildcard "matches anything" usb_device_id + * as a driver's "modules.usbmap" entry if you provide an id with + * only a nonzero "driver_info" field. If you do this, the USB device + * driver's probe() routine should use additional intelligence to + * decide whether to bind to the specified interface. + * + * What Makes Good usb_device_id Tables: + * + * The match algorithm is very simple, so that intelligence in + * driver selection must come from smart driver id records. + * Unless you have good reasons to use another selection policy, + * provide match elements only in related groups, and order match + * specifiers from specific to general. Use the macros provided + * for that purpose if you can. + * + * The most specific match specifiers use device descriptor + * data. These are commonly used with product-specific matches; + * the USB_DEVICE macro lets you provide vendor and product IDs, + * and you can also match against ranges of product revisions. + * These are widely used for devices with application or vendor + * specific bDeviceClass values. + * + * Matches based on device class/subclass/protocol specifications + * are slightly more general; use the USB_DEVICE_INFO macro, or + * its siblings. These are used with single-function devices + * where bDeviceClass doesn't specify that each interface has + * its own class. + * + * Matches based on interface class/subclass/protocol are the + * most general; they let drivers bind to any interface on a + * multiple-function device. Use the USB_INTERFACE_INFO + * macro, or its siblings, to match class-per-interface style + * devices (as recorded in bDeviceClass). + * + * Within those groups, remember that not all combinations are + * meaningful. For example, don't give a product version range + * without vendor and product IDs; or specify a protocol without + * its associated class and subclass. + */ +const struct usb_device_id * +usb_match_id(struct usb_interface *interface, const struct usb_device_id *id) +{ + struct usb_host_interface *intf; + struct usb_device *dev; + + /* proc_connectinfo in devio.c may call us with id == NULL. */ + if (id == NULL) + return NULL; + + intf = &interface->altsetting [interface->act_altsetting]; + dev = interface_to_usbdev(interface); + + /* It is important to check that id->driver_info is nonzero, + since an entry that is all zeroes except for a nonzero + id->driver_info is the way to create an entry that + indicates that the driver want to examine every + device and interface. */ + for (; id->idVendor || id->bDeviceClass || id->bInterfaceClass || + id->driver_info; id++) { + + if ((id->match_flags & USB_DEVICE_ID_MATCH_VENDOR) && + id->idVendor != dev->descriptor.idVendor) + continue; + + if ((id->match_flags & USB_DEVICE_ID_MATCH_PRODUCT) && + id->idProduct != dev->descriptor.idProduct) + continue; + + /* No need to test id->bcdDevice_lo != 0, since 0 is never + greater than any unsigned number. */ + if ((id->match_flags & USB_DEVICE_ID_MATCH_DEV_LO) && + (id->bcdDevice_lo > dev->descriptor.bcdDevice)) + continue; + + if ((id->match_flags & USB_DEVICE_ID_MATCH_DEV_HI) && + (id->bcdDevice_hi < dev->descriptor.bcdDevice)) + continue; + + if ((id->match_flags & USB_DEVICE_ID_MATCH_DEV_CLASS) && + (id->bDeviceClass != dev->descriptor.bDeviceClass)) + continue; + + if ((id->match_flags & USB_DEVICE_ID_MATCH_DEV_SUBCLASS) && + (id->bDeviceSubClass!= dev->descriptor.bDeviceSubClass)) + continue; + + if ((id->match_flags & USB_DEVICE_ID_MATCH_DEV_PROTOCOL) && + (id->bDeviceProtocol != dev->descriptor.bDeviceProtocol)) + continue; + + if ((id->match_flags & USB_DEVICE_ID_MATCH_INT_CLASS) && + (id->bInterfaceClass != intf->desc.bInterfaceClass)) + continue; + + if ((id->match_flags & USB_DEVICE_ID_MATCH_INT_SUBCLASS) && + (id->bInterfaceSubClass != intf->desc.bInterfaceSubClass)) + continue; + + if ((id->match_flags & USB_DEVICE_ID_MATCH_INT_PROTOCOL) && + (id->bInterfaceProtocol != intf->desc.bInterfaceProtocol)) + continue; + + return id; + } + + return NULL; +} + +/** + * usb_find_interface - find usb_interface pointer for driver and device + * @drv: the driver whose current configuration is considered + * @minor: the minor number of the desired device + * + * This walks the driver device list and returns a pointer to the interface + * with the matching minor. Note, this only works for devices that share the + * USB major number. + */ +struct usb_interface *usb_find_interface(struct usb_driver *drv, int minor) +{ + struct list_head *entry; + struct device *dev; + struct usb_interface *intf; + + list_for_each(entry, &drv->driver.devices) { + dev = container_of(entry, struct device, driver_list); + + /* can't look at usb devices, only interfaces */ + if (dev->driver == &usb_generic_driver) + continue; + + intf = to_usb_interface(dev); + if (intf->minor == -1) + continue; + if (intf->minor == minor) + return intf; + } + + /* no device found that matches */ + return NULL; +} + +static int usb_device_match (struct device *dev, struct device_driver *drv) +{ + struct usb_interface *intf; + struct usb_driver *usb_drv; + const struct usb_device_id *id; + + /* check for generic driver, which we don't match any device with */ + if (drv == &usb_generic_driver) + return 0; + + intf = to_usb_interface(dev); + + usb_drv = to_usb_driver(drv); + id = usb_drv->id_table; + + id = usb_match_id (intf, usb_drv->id_table); + if (id) + return 1; + + return 0; +} + + +#ifdef CONFIG_HOTPLUG + +/* + * USB hotplugging invokes what /proc/sys/kernel/hotplug says + * (normally /sbin/hotplug) when USB devices get added or removed. + * + * This invokes a user mode policy agent, typically helping to load driver + * or other modules, configure the device, and more. Drivers can provide + * a MODULE_DEVICE_TABLE to help with module loading subtasks. + * + * We're called either from khubd (the typical case) or from root hub + * (init, kapmd, modprobe, rmmod, etc), but the agents need to handle + * delays in event delivery. Use sysfs (and DEVPATH) to make sure the + * device (and this configuration!) are still present. + */ +static int usb_hotplug (struct device *dev, char **envp, int num_envp, + char *buffer, int buffer_size) +{ + struct usb_interface *intf; + struct usb_device *usb_dev; + char *scratch; + int i = 0; + int length = 0; + + dbg ("%s", __FUNCTION__); + + if (!dev) + return -ENODEV; + + /* Must check driver_data here, as on remove driver is always NULL */ + if ((dev->driver == &usb_generic_driver) || + (dev->driver_data == &usb_generic_driver_data)) + return 0; + + intf = to_usb_interface(dev); + usb_dev = interface_to_usbdev (intf); + + if (usb_dev->devnum < 0) { + dbg ("device already deleted ??"); + return -ENODEV; + } + if (!usb_dev->bus) { + dbg ("bus already removed?"); + return -ENODEV; + } + + scratch = buffer; + +#ifdef CONFIG_USB_DEVICEFS + /* If this is available, userspace programs can directly read + * all the device descriptors we don't tell them about. Or + * even act as usermode drivers. + * + * FIXME reduce hardwired intelligence here + */ + envp [i++] = scratch; + length += snprintf (scratch, buffer_size - length, + "DEVICE=/proc/bus/usb/%03d/%03d", + usb_dev->bus->busnum, usb_dev->devnum); + if ((buffer_size - length <= 0) || (i >= num_envp)) + return -ENOMEM; + ++length; + scratch += length; +#endif + + /* per-device configurations are common */ + envp [i++] = scratch; + length += snprintf (scratch, buffer_size - length, "PRODUCT=%x/%x/%x", + usb_dev->descriptor.idVendor, + usb_dev->descriptor.idProduct, + usb_dev->descriptor.bcdDevice); + if ((buffer_size - length <= 0) || (i >= num_envp)) + return -ENOMEM; + ++length; + scratch += length; + + /* class-based driver binding models */ + envp [i++] = scratch; + length += snprintf (scratch, buffer_size - length, "TYPE=%d/%d/%d", + usb_dev->descriptor.bDeviceClass, + usb_dev->descriptor.bDeviceSubClass, + usb_dev->descriptor.bDeviceProtocol); + if ((buffer_size - length <= 0) || (i >= num_envp)) + return -ENOMEM; + ++length; + scratch += length; + + if (usb_dev->descriptor.bDeviceClass == 0) { + int alt = intf->act_altsetting; + + /* 2.4 only exposed interface zero. in 2.5, hotplug + * agents are called for all interfaces, and can use + * $DEVPATH/bInterfaceNumber if necessary. + */ + envp [i++] = scratch; + length += snprintf (scratch, buffer_size - length, + "INTERFACE=%d/%d/%d", + intf->altsetting[alt].desc.bInterfaceClass, + intf->altsetting[alt].desc.bInterfaceSubClass, + intf->altsetting[alt].desc.bInterfaceProtocol); + if ((buffer_size - length <= 0) || (i >= num_envp)) + return -ENOMEM; + ++length; + scratch += length; + + } + envp [i++] = 0; + + return 0; +} + +#else + +static int usb_hotplug (struct device *dev, char **envp, + int num_envp, char *buffer, int buffer_size) +{ + return -ENODEV; +} + +#endif /* CONFIG_HOTPLUG */ + +/** + * usb_alloc_dev - allocate a usb device structure (usbcore-internal) + * @parent: hub to which device is connected + * @bus: bus used to access the device + * Context: !in_interrupt () + * + * Only hub drivers (including virtual root hub drivers for host + * controllers) should ever call this. + * + * This call is synchronous, and may not be used in an interrupt context. + */ +struct usb_device STDCALL *usb_alloc_dev(struct usb_device *parent, struct usb_bus *bus) +{ + struct usb_device *dev; + + dev = kmalloc(sizeof(*dev), GFP_KERNEL); + if (!dev) + return NULL; + + memset(dev, 0, sizeof(*dev)); + + device_initialize(&dev->dev); + dev->state = USB_STATE_ATTACHED; + + usb_bus_get(bus); + + if (!parent) + dev->devpath [0] = '0'; + dev->bus = bus; + dev->parent = parent; + INIT_LIST_HEAD(&dev->filelist); + + init_MUTEX(&dev->serialize); + + if (dev->bus->op->allocate) + dev->bus->op->allocate(dev); + + return dev; +} + +/** + * usb_get_dev - increments the reference count of the usb device structure + * @dev: the device being referenced + * + * Each live reference to a device should be refcounted. + * + * Drivers for USB interfaces should normally record such references in + * their probe() methods, when they bind to an interface, and release + * them by calling usb_put_dev(), in their disconnect() methods. + * + * A pointer to the device with the incremented reference counter is returned. + */ +struct usb_device *usb_get_dev (struct usb_device *dev) +{ + struct device *tmp; + + if (!dev) + return NULL; + + tmp = get_device(&dev->dev); + if (tmp) + return to_usb_device(tmp); + else + return NULL; +} + +/** + * usb_put_dev - release a use of the usb device structure + * @dev: device that's been disconnected + * + * Must be called when a user of a device is finished with it. When the last + * user of the device calls this function, the memory of the device is freed. + */ +void STDCALL usb_put_dev(struct usb_device *dev) +{ + if (dev) + put_device(&dev->dev); +} + +/** + * usb_release_dev - free a usb device structure when all users of it are finished. + * @dev: device that's been disconnected + * + * Will be called only by the device core when all users of this usb device are + * done. + */ +static void usb_release_dev(struct device *dev) +{ + struct usb_device *udev; + + udev = to_usb_device(dev); + + if (udev->bus && udev->bus->op && udev->bus->op->deallocate) + udev->bus->op->deallocate(udev); + usb_destroy_configuration (udev); + usb_bus_put (udev->bus); + kfree (udev); +} + + +static struct usb_device *match_device(struct usb_device *dev, + u16 vendor_id, u16 product_id) +{ + struct usb_device *ret_dev = NULL; + int child; + + dbg("looking at vendor %d, product %d", + dev->descriptor.idVendor, + dev->descriptor.idProduct); + + /* see if this device matches */ + if ((dev->descriptor.idVendor == vendor_id) && + (dev->descriptor.idProduct == product_id)) { + dbg ("found the device!"); + ret_dev = usb_get_dev(dev); + goto exit; + } + + /* look through all of the children of this device */ + for (child = 0; child < dev->maxchild; ++child) { + if (dev->children[child]) { + ret_dev = match_device(dev->children[child], + vendor_id, product_id); + if (ret_dev) + goto exit; + } + } +exit: + return ret_dev; +} + +/** + * usb_find_device - find a specific usb device in the system + * @vendor_id: the vendor id of the device to find + * @product_id: the product id of the device to find + * + * Returns a pointer to a struct usb_device if such a specified usb + * device is present in the system currently. The usage count of the + * device will be incremented if a device is found. Make sure to call + * usb_put_dev() when the caller is finished with the device. + * + * If a device with the specified vendor and product id is not found, + * NULL is returned. + */ +struct usb_device *usb_find_device(u16 vendor_id, u16 product_id) +{ + struct list_head *buslist; + struct usb_bus *bus; + struct usb_device *dev = NULL; + + down(&usb_bus_list_lock); + for (buslist = usb_bus_list.next; + buslist != &usb_bus_list; + buslist = buslist->next) { + bus = container_of(buslist, struct usb_bus, bus_list); + dev = match_device(bus->root_hub, vendor_id, product_id); + if (dev) + goto exit; + } +exit: + up(&usb_bus_list_lock); + return dev; +} + +/** + * usb_get_current_frame_number - return current bus frame number + * @dev: the device whose bus is being queried + * + * Returns the current frame number for the USB host controller + * used with the given USB device. This can be used when scheduling + * isochronous requests. + * + * Note that different kinds of host controller have different + * "scheduling horizons". While one type might support scheduling only + * 32 frames into the future, others could support scheduling up to + * 1024 frames into the future. + */ +int usb_get_current_frame_number(struct usb_device *dev) +{ + return dev->bus->op->get_frame_number (dev); +} + +/*-------------------------------------------------------------------*/ +/* + * __usb_get_extra_descriptor() finds a descriptor of specific type in the + * extra field of the interface and endpoint descriptor structs. + */ + +int __usb_get_extra_descriptor(char *buffer, unsigned size, unsigned char type, void **ptr) +{ + struct usb_descriptor_header *header; + + while (size >= sizeof(struct usb_descriptor_header)) { + header = (struct usb_descriptor_header *)buffer; + + if (header->bLength < 2) { + err("invalid descriptor length of %d", header->bLength); + return -1; + } + + if (header->bDescriptorType == type) { + *ptr = header; + return 0; + } + + buffer += header->bLength; + size -= header->bLength; + } + return -1; +} + +/** + * usb_disconnect - disconnect a device (usbcore-internal) + * @pdev: pointer to device being disconnected + * Context: !in_interrupt () + * + * Something got disconnected. Get rid of it, and all of its children. + * + * Only hub drivers (including virtual root hub drivers for host + * controllers) should ever call this. + * + * This call is synchronous, and may not be used in an interrupt context. + */ +void usb_disconnect(struct usb_device **pdev) +{ + struct usb_device *dev = *pdev; + struct usb_bus *bus; + struct usb_operations *ops; + int i; + + might_sleep (); + + if (!dev) { + pr_debug ("%s nodev\n", __FUNCTION__); + return; + } + bus = dev->bus; + if (!bus) { + pr_debug ("%s nobus\n", __FUNCTION__); + return; + } + ops = bus->op; + + *pdev = NULL; + + /* mark the device as inactive, so any further urb submissions for + * this device will fail. + */ + dev->state = USB_STATE_NOTATTACHED; + + dev_info (&dev->dev, "USB disconnect, address %d\n", dev->devnum); + + /* Free up all the children before we remove this device */ + for (i = 0; i < USB_MAXCHILDREN; i++) { + struct usb_device **child = dev->children + i; + if (*child) + usb_disconnect(child); + } + + /* disconnect() drivers from interfaces (a key side effect) */ + dev_dbg (&dev->dev, "unregistering interfaces\n"); + if (dev->actconfig) { + for (i = 0; i < dev->actconfig->desc.bNumInterfaces; i++) { + struct usb_interface *interface; + + /* remove this interface */ + interface = &dev->actconfig->interface[i]; + device_unregister(&interface->dev); + } + } + + /* deallocate hcd/hardware state */ + if (ops->disable) { + void (*disable)(struct usb_device *, int) = ops->disable; + + for (i = 0; i < 15; i++) { + disable (dev, i); + disable (dev, USB_DIR_IN | i); + } + } + + dev_dbg (&dev->dev, "unregistering device\n"); + /* Free the device number and remove the /proc/bus/usb entry */ + if (dev->devnum > 0) { + clear_bit(dev->devnum, dev->bus->devmap.devicemap); + usbfs_remove_device(dev); + } + device_unregister(&dev->dev); + + /* Decrement the reference count, it'll auto free everything when */ + /* it hits 0 which could very well be now */ + usb_put_dev(dev); +} + +/** + * usb_connect - pick device address (usbcore-internal) + * @dev: newly detected device (in DEFAULT state) + * + * Picks a device address. It's up to the hub (or root hub) driver + * to handle and manage enumeration, starting from the DEFAULT state. + * Only hub drivers (including virtual root hub drivers for host + * controllers) should ever call this. + */ +void STDCALL usb_connect(struct usb_device *dev) +{ + int devnum; + // FIXME needs locking for SMP!! + /* why? this is called only from the hub thread, + * which hopefully doesn't run on multiple CPU's simultaneously 8-) + * ... it's also called from modprobe/rmmod/apmd threads as part + * of virtual root hub init/reinit. In the init case, the hub code + * won't have seen this, but not so for reinit ... + */ + dev->descriptor.bMaxPacketSize0 = 8; /* Start off at 8 bytes */ + + /* Try to allocate the next devnum beginning at bus->devnum_next. */ + devnum = find_next_zero_bit(dev->bus->devmap.devicemap, 128, dev->bus->devnum_next); + if (devnum >= 128) + devnum = find_next_zero_bit(dev->bus->devmap.devicemap, 128, 1); + + dev->bus->devnum_next = ( devnum >= 127 ? 1 : devnum + 1); + + if (devnum < 128) { + set_bit(devnum, dev->bus->devmap.devicemap); + dev->devnum = devnum; + } +} + + +// hub-only!! ... and only exported for reset/reinit path. +// otherwise used internally, for usb_new_device() +int usb_set_address(struct usb_device *dev) +{ + int retval; + + if (dev->devnum == 0) + return -EINVAL; + if (dev->state != USB_STATE_DEFAULT && dev->state != USB_STATE_ADDRESS) + return -EINVAL; + retval = usb_control_msg(dev, usb_snddefctrl(dev), USB_REQ_SET_ADDRESS, + 0, dev->devnum, 0, NULL, 0, HZ * USB_CTRL_SET_TIMEOUT); + if (retval == 0) + dev->state = USB_STATE_ADDRESS; + return retval; +} + + +/* improve on the default device description, if we can ... and + * while we're at it, maybe show the vendor and product strings. + */ +static void set_device_description (struct usb_device *dev) +{ + void *buf; + int mfgr = dev->descriptor.iManufacturer; + int prod = dev->descriptor.iProduct; + int vendor_id = dev->descriptor.idVendor; + int product_id = dev->descriptor.idProduct; + char *mfgr_str, *prod_str; + + /* set default; keep it if there are no strings, or kmalloc fails */ + sprintf (dev->dev.name, "USB device %04x:%04x", + vendor_id, product_id); + + if (!(buf = kmalloc(256 * 2, GFP_KERNEL))) + return; + + prod_str = (char *) buf; + mfgr_str = (char *) buf + 256; + + if (prod && usb_string (dev, prod, prod_str, 256) > 0) { +#ifdef DEBUG + dev_printk (KERN_INFO, &dev->dev, "Product: %s\n", prod_str); +#endif + } else { + prod_str = 0; + } + + if (mfgr && usb_string (dev, mfgr, mfgr_str, 256) > 0) { +#ifdef DEBUG + dev_printk (KERN_INFO, &dev->dev, "Manufacturer: %s\n", mfgr_str); +#endif + } else { + mfgr_str = 0; + } + + /* much like pci ... describe as either: + * - both strings: 'product descr (vendor descr)' + * - product only: 'product descr (USB device vvvv:pppp)' + * - vendor only: 'USB device vvvv:pppp (vendor descr)' + * - neither string: 'USB device vvvv:pppp' + */ + + if (prod_str && mfgr_str) { + + snprintf(dev->dev.name, sizeof dev->dev.name, + "%s (%s)", prod_str, mfgr_str); + } else if (prod_str) { + snprintf(dev->dev.name, sizeof dev->dev.name, + "%s (USB device %04x:%04x)", + prod_str, vendor_id, product_id); + + } else if (mfgr_str) { + snprintf(dev->dev.name, sizeof dev->dev.name, + "USB device %04x:%04x (%s)", + vendor_id, product_id, mfgr_str); + } + //usbprintk("USB connected: %s\n",dev->dev.name); + kfree(buf); +} + +/* + * By the time we get here, we chose a new device address + * and is in the default state. We need to identify the thing and + * get the ball rolling.. + * + * Returns 0 for success, != 0 for error. + * + * This call is synchronous, and may not be used in an interrupt context. + * + * Only hub drivers (including virtual root hub drivers for host + * controllers) should ever call this. + */ +#define NEW_DEVICE_RETRYS 2 +#define SET_ADDRESS_RETRYS 2 +int usb_new_device(struct usb_device *dev, struct device *parent) +{ + int err = 0; + int i; + int j; + + /* + * Set the driver for the usb device to point to the "generic" driver. + * This prevents the main usb device from being sent to the usb bus + * probe function. Yes, it's a hack, but a nice one :) + * + * Do it asap, so more driver model stuff (like the device.h message + * utilities) can be used in hcd submit/unlink code paths. + */ + usb_generic_driver.bus = &usb_bus_type; + dev->dev.parent = parent; + dev->dev.driver = &usb_generic_driver; + dev->dev.bus = &usb_bus_type; + dev->dev.release = usb_release_dev; + dev->dev.driver_data = &usb_generic_driver_data; + usb_get_dev(dev); + if (dev->dev.bus_id[0] == 0) + sprintf (&dev->dev.bus_id[0], "%d-%s", + dev->bus->busnum, dev->devpath); + + /* dma masks come from the controller; readonly, except to hcd */ + dev->dev.dma_mask = parent->dma_mask; + + /* USB 2.0 section 5.5.3 talks about ep0 maxpacket ... + * it's fixed size except for full speed devices. + */ + switch (dev->speed) { + case USB_SPEED_HIGH: /* fixed at 64 */ + i = 64; + break; + case USB_SPEED_FULL: /* 8, 16, 32, or 64 */ + /* to determine the ep0 maxpacket size, read the first 8 + * bytes from the device descriptor to get bMaxPacketSize0; + * then correct our initial (small) guess. + */ + // FALLTHROUGH + case USB_SPEED_LOW: /* fixed at 8 */ + i = 8; + break; + default: + return -EINVAL; + } + dev->epmaxpacketin [0] = i; + dev->epmaxpacketout[0] = i; + + for (i = 0; i < NEW_DEVICE_RETRYS; ++i) { + + for (j = 0; j < SET_ADDRESS_RETRYS; ++j) { + err = usb_set_address(dev); + if (err >= 0) + break; + wait_ms(200); + } + if (err < 0) { + dev_err(&dev->dev, "USB device not accepting new address=%d (error=%d)\n", + dev->devnum, err); + dev->state = USB_STATE_DEFAULT; + clear_bit(dev->devnum, dev->bus->devmap.devicemap); + dev->devnum = -1; + return 1; + } + + wait_ms(10); /* Let the SET_ADDRESS settle */ + + /* high and low speed devices don't need this... */ + err = usb_get_descriptor(dev, USB_DT_DEVICE, 0, &dev->descriptor, 8); + if (err >= 8) + break; + wait_ms(100); + } + + if (err < 8) { + if (err < 0) + dev_err(&dev->dev, "USB device not responding, giving up (error=%d)\n", err); + else + dev_err(&dev->dev, "USB device descriptor short read (expected %i, got %i)\n", 8, err); + clear_bit(dev->devnum, dev->bus->devmap.devicemap); + dev->devnum = -1; + return 1; + } + if (dev->speed == USB_SPEED_FULL) { + dev->epmaxpacketin [0] = dev->descriptor.bMaxPacketSize0; + dev->epmaxpacketout[0] = dev->descriptor.bMaxPacketSize0; + } + + /* USB device state == addressed ... still not usable */ + + err = usb_get_device_descriptor(dev); + if (err < (signed)sizeof(dev->descriptor)) { + if (err < 0) + dev_err(&dev->dev, "unable to get device descriptor (error=%d)\n", err); + else + dev_err(&dev->dev, "USB device descriptor short read (expected %Zi, got %i)\n", + sizeof(dev->descriptor), err); + + clear_bit(dev->devnum, dev->bus->devmap.devicemap); + dev->devnum = -1; + return 1; + } + + err = usb_get_configuration(dev); + if (err < 0) { + dev_err(&dev->dev, "unable to get device %d configuration (error=%d)\n", + dev->devnum, err); + clear_bit(dev->devnum, dev->bus->devmap.devicemap); + dev->devnum = -1; + return 1; + } + + /* we set the default configuration here */ + err = usb_set_configuration(dev, dev->config[0].desc.bConfigurationValue); + if (err) { + dev_err(&dev->dev, "failed to set device %d default configuration (error=%d)\n", + dev->devnum, err); + clear_bit(dev->devnum, dev->bus->devmap.devicemap); + dev->devnum = -1; + return 1; + } + + /* USB device state == configured ... tell the world! */ + + dev_dbg(&dev->dev, "new device strings: Mfr=%d, Product=%d, SerialNumber=%d\n", + dev->descriptor.iManufacturer, dev->descriptor.iProduct, dev->descriptor.iSerialNumber); + set_device_description (dev); + +#ifdef DEBUG + if (dev->descriptor.iSerialNumber) + usb_show_string(dev, "SerialNumber", dev->descriptor.iSerialNumber); +#endif + /* put into sysfs, with device and config specific files */ + err = device_add (&dev->dev); + if (err) + return err; + usb_create_driverfs_dev_files (dev); + + /* Register all of the interfaces for this device with the driver core. + * Remember, interfaces get bound to drivers, not devices. */ + for (i = 0; i < dev->actconfig->desc.bNumInterfaces; i++) { + struct usb_interface *interface = &dev->actconfig->interface[i]; + struct usb_interface_descriptor *desc; + + desc = &interface->altsetting [interface->act_altsetting].desc; + interface->dev.parent = &dev->dev; + interface->dev.driver = NULL; + interface->dev.bus = &usb_bus_type; + interface->dev.dma_mask = parent->dma_mask; + sprintf (&interface->dev.bus_id[0], "%d-%s:%d", + dev->bus->busnum, dev->devpath, + desc->bInterfaceNumber); + if (!desc->iInterface + || usb_string (dev, desc->iInterface, + interface->dev.name, + sizeof interface->dev.name) <= 0) { + /* typically devices won't bother with interface + * descriptions; this is the normal case. an + * interface's driver might describe it better. + * (also: iInterface is per-altsetting ...) + */ + sprintf (&interface->dev.name[0], + "usb-%s-%s interface %d", + dev->bus->bus_name, dev->devpath, + desc->bInterfaceNumber); + } + dev_dbg (&dev->dev, "%s - registering interface %s\n", __FUNCTION__, interface->dev.bus_id); + device_add (&interface->dev); + usb_create_driverfs_intf_files (interface); + } + /* add a /proc/bus/usb entry */ + usbfs_add_device(dev); + + return 0; +} + +/** + * usb_buffer_alloc - allocate dma-consistent buffer for URB_NO_DMA_MAP + * @dev: device the buffer will be used with + * @size: requested buffer size + * @mem_flags: affect whether allocation may block + * @dma: used to return DMA address of buffer + * + * Return value is either null (indicating no buffer could be allocated), or + * the cpu-space pointer to a buffer that may be used to perform DMA to the + * specified device. Such cpu-space buffers are returned along with the DMA + * address (through the pointer provided). + * + * These buffers are used with URB_NO_DMA_MAP set in urb->transfer_flags to + * avoid behaviors like using "DMA bounce buffers", or tying down I/O mapping + * hardware for long idle periods. The implementation varies between + * platforms, depending on details of how DMA will work to this device. + * Using these buffers also helps prevent cacheline sharing problems on + * architectures where CPU caches are not DMA-coherent. + * + * When the buffer is no longer used, free it with usb_buffer_free(). + */ +void *usb_buffer_alloc ( + struct usb_device *dev, + size_t size, + int mem_flags, + dma_addr_t *dma +) +{ + if (!dev || !dev->bus || !dev->bus->op || !dev->bus->op->buffer_alloc) + return 0; + return dev->bus->op->buffer_alloc (dev->bus, size, mem_flags, dma); +} + +/** + * usb_buffer_free - free memory allocated with usb_buffer_alloc() + * @dev: device the buffer was used with + * @size: requested buffer size + * @addr: CPU address of buffer + * @dma: DMA address of buffer + * + * This reclaims an I/O buffer, letting it be reused. The memory must have + * been allocated using usb_buffer_alloc(), and the parameters must match + * those provided in that allocation request. + */ +void usb_buffer_free ( + struct usb_device *dev, + size_t size, + void *addr, + dma_addr_t dma +) +{ + if (!dev || !dev->bus || !dev->bus->op || !dev->bus->op->buffer_free) + return; + dev->bus->op->buffer_free (dev->bus, size, addr, dma); +} + +/** + * usb_buffer_map - create DMA mapping(s) for an urb + * @urb: urb whose transfer_buffer will be mapped + * + * Return value is either null (indicating no buffer could be mapped), or + * the parameter. URB_NO_DMA_MAP is added to urb->transfer_flags if the + * operation succeeds. If the device is connected to this system through + * a non-DMA controller, this operation always succeeds. + * + * This call would normally be used for an urb which is reused, perhaps + * as the target of a large periodic transfer, with usb_buffer_dmasync() + * calls to synchronize memory and dma state. It may not be used for + * control requests. + * + * Reverse the effect of this call with usb_buffer_unmap(). + */ +struct urb *usb_buffer_map (struct urb *urb) +{ + struct usb_bus *bus; + struct device *controller; + + if (!urb + || usb_pipecontrol (urb->pipe) + || !urb->dev + || !(bus = urb->dev->bus) + || !(controller = bus->controller)) + return 0; + + if (controller->dma_mask) { + urb->transfer_dma = dma_map_single (controller, + urb->transfer_buffer, urb->transfer_buffer_length, + usb_pipein (urb->pipe) + ? DMA_FROM_DEVICE : DMA_TO_DEVICE); + // FIXME generic api broken like pci, can't report errors + // if (urb->transfer_dma == DMA_ADDR_INVALID) return 0; + } else + urb->transfer_dma = ~0; + urb->transfer_flags |= URB_NO_DMA_MAP; + return urb; +} + +/** + * usb_buffer_dmasync - synchronize DMA and CPU view of buffer(s) + * @urb: urb whose transfer_buffer will be synchronized + */ +void usb_buffer_dmasync (struct urb *urb) +{ + struct usb_bus *bus; + struct device *controller; + + if (!urb + || !(urb->transfer_flags & URB_NO_DMA_MAP) + || !urb->dev + || !(bus = urb->dev->bus) + || !(controller = bus->controller)) + return; + + if (controller->dma_mask) + dma_sync_single (controller, + urb->transfer_dma, urb->transfer_buffer_length, + usb_pipein (urb->pipe) + ? DMA_FROM_DEVICE : DMA_TO_DEVICE); +} + +/** + * usb_buffer_unmap - free DMA mapping(s) for an urb + * @urb: urb whose transfer_buffer will be unmapped + * + * Reverses the effect of usb_buffer_map(). + */ +void usb_buffer_unmap (struct urb *urb) +{ + struct usb_bus *bus; + struct device *controller; + + if (!urb + || !(urb->transfer_flags & URB_NO_DMA_MAP) + || !urb->dev + || !(bus = urb->dev->bus) + || !(controller = bus->controller)) + return; + + if (controller->dma_mask) + dma_unmap_single (controller, + urb->transfer_dma, urb->transfer_buffer_length, + usb_pipein (urb->pipe) + ? DMA_FROM_DEVICE : DMA_TO_DEVICE); + urb->transfer_flags &= ~URB_NO_DMA_MAP; +} + +/** + * usb_buffer_map_sg - create scatterlist DMA mapping(s) for an endpoint + * @dev: device to which the scatterlist will be mapped + * @pipe: endpoint defining the mapping direction + * @sg: the scatterlist to map + * @nents: the number of entries in the scatterlist + * + * Return value is either < 0 (indicating no buffers could be mapped), or + * the number of DMA mapping array entries in the scatterlist. + * + * The caller is responsible for placing the resulting DMA addresses from + * the scatterlist into URB transfer buffer pointers, and for setting the + * URB_NO_DMA_MAP transfer flag in each of those URBs. + * + * Top I/O rates come from queuing URBs, instead of waiting for each one + * to complete before starting the next I/O. This is particularly easy + * to do with scatterlists. Just allocate and submit one URB for each DMA + * mapping entry returned, stopping on the first error or when all succeed. + * Better yet, use the usb_sg_*() calls, which do that (and more) for you. + * + * This call would normally be used when translating scatterlist requests, + * rather than usb_buffer_map(), since on some hardware (with IOMMUs) it + * may be able to coalesce mappings for improved I/O efficiency. + * + * Reverse the effect of this call with usb_buffer_unmap_sg(). + */ +int usb_buffer_map_sg (struct usb_device *dev, unsigned pipe, + struct scatterlist *sg, int nents) +{ + struct usb_bus *bus; + struct device *controller; + + if (!dev + || usb_pipecontrol (pipe) + || !(bus = dev->bus) + || !(controller = bus->controller) + || !controller->dma_mask) + return -1; + + // FIXME generic api broken like pci, can't report errors + return dma_map_sg (controller, sg, nents, + usb_pipein (pipe) ? DMA_FROM_DEVICE : DMA_TO_DEVICE); +} + +/** + * usb_buffer_dmasync_sg - synchronize DMA and CPU view of scatterlist buffer(s) + * @dev: device to which the scatterlist will be mapped + * @pipe: endpoint defining the mapping direction + * @sg: the scatterlist to synchronize + * @n_hw_ents: the positive return value from usb_buffer_map_sg + * + * Use this when you are re-using a scatterlist's data buffers for + * another USB request. + */ +void usb_buffer_dmasync_sg (struct usb_device *dev, unsigned pipe, + struct scatterlist *sg, int n_hw_ents) +{ + struct usb_bus *bus; + struct device *controller; + + if (!dev + || !(bus = dev->bus) + || !(controller = bus->controller) + || !controller->dma_mask) + return; + + dma_sync_sg (controller, sg, n_hw_ents, + usb_pipein (pipe) ? DMA_FROM_DEVICE : DMA_TO_DEVICE); +} + +/** + * usb_buffer_unmap_sg - free DMA mapping(s) for a scatterlist + * @dev: device to which the scatterlist will be mapped + * @pipe: endpoint defining the mapping direction + * @sg: the scatterlist to unmap + * @n_hw_ents: the positive return value from usb_buffer_map_sg + * + * Reverses the effect of usb_buffer_map_sg(). + */ +void usb_buffer_unmap_sg (struct usb_device *dev, unsigned pipe, + struct scatterlist *sg, int n_hw_ents) +{ + struct usb_bus *bus; + struct device *controller; + + if (!dev + || !(bus = dev->bus) + || !(controller = bus->controller) + || !controller->dma_mask) + return; + + dma_unmap_sg (controller, sg, n_hw_ents, + usb_pipein (pipe) ? DMA_FROM_DEVICE : DMA_TO_DEVICE); +} + + +struct bus_type usb_bus_type = { + .name = "usb", + .match = usb_device_match, + .hotplug = usb_hotplug, +}; + +#ifndef MODULE + +static int __init usb_setup_disable(char *str) +{ + nousb = 1; + return 1; +} + +/* format to disable USB on kernel command line is: nousb */ +__setup("nousb", usb_setup_disable); + +#endif + +/* + * for external read access to + */ +int STDCALL usb_disabled(void) +{ + return nousb; +} + +/* + * Init + */ +static int __init usb_init(void) +{ + if (nousb) { + info("USB support disabled\n"); + return 0; + } + + bus_register(&usb_bus_type); + usb_major_init(); + usbfs_init(); + usb_hub_init(); + + driver_register(&usb_generic_driver); + + return 0; +} + +/* + * Cleanup + */ +static void __exit usb_exit(void) +{ + /* This will matter if shutdown/reboot does exitcalls. */ + if (nousb) + return; + + driver_unregister(&usb_generic_driver); + usb_major_cleanup(); + usbfs_cleanup(); + usb_hub_cleanup(); + bus_unregister(&usb_bus_type); +} + +subsys_initcall(usb_init); +module_exit(usb_exit); + +/* + * USB may be built into the kernel or be built as modules. + * These symbols are exported for device (or host controller) + * driver modules to use. + */ +EXPORT_SYMBOL(usb_epnum_to_ep_desc); + +EXPORT_SYMBOL(usb_register); +EXPORT_SYMBOL(usb_deregister); +EXPORT_SYMBOL(usb_disabled); + +EXPORT_SYMBOL(usb_device_probe); +EXPORT_SYMBOL(usb_device_remove); + +EXPORT_SYMBOL(usb_alloc_dev); +EXPORT_SYMBOL(usb_put_dev); +EXPORT_SYMBOL(usb_get_dev); +EXPORT_SYMBOL(usb_hub_tt_clear_buffer); + +EXPORT_SYMBOL(usb_driver_claim_interface); +EXPORT_SYMBOL(usb_interface_claimed); +EXPORT_SYMBOL(usb_driver_release_interface); +EXPORT_SYMBOL(usb_match_id); +EXPORT_SYMBOL(usb_find_interface); +EXPORT_SYMBOL(usb_ifnum_to_if); + +EXPORT_SYMBOL(usb_new_device); +EXPORT_SYMBOL(usb_reset_device); +EXPORT_SYMBOL(usb_connect); +EXPORT_SYMBOL(usb_disconnect); + +EXPORT_SYMBOL(__usb_get_extra_descriptor); + +EXPORT_SYMBOL(usb_find_device); +EXPORT_SYMBOL(usb_get_current_frame_number); + +EXPORT_SYMBOL (usb_buffer_alloc); +EXPORT_SYMBOL (usb_buffer_free); + +EXPORT_SYMBOL (usb_buffer_map); +EXPORT_SYMBOL (usb_buffer_dmasync); +EXPORT_SYMBOL (usb_buffer_unmap); + +EXPORT_SYMBOL (usb_buffer_map_sg); +EXPORT_SYMBOL (usb_buffer_dmasync_sg); +EXPORT_SYMBOL (usb_buffer_unmap_sg); + +MODULE_LICENSE("GPL"); diff --git a/reactos/drivers/usb/cromwell/core/usb.h b/reactos/drivers/usb/cromwell/core/usb.h new file mode 100644 index 00000000000..52210ef7fa6 --- /dev/null +++ b/reactos/drivers/usb/cromwell/core/usb.h @@ -0,0 +1,5 @@ +/* Functions local to drivers/usb/core/ */ + +extern void usb_create_driverfs_dev_files (struct usb_device *dev); +extern void usb_create_driverfs_intf_files (struct usb_interface *intf); + diff --git a/reactos/drivers/usb/cromwell/core/usbcore.a b/reactos/drivers/usb/cromwell/core/usbcore.a new file mode 100644 index 0000000000000000000000000000000000000000..51ee725a9ddac64bd6ed0ec20aba5cddc73c1ff6 GIT binary patch literal 69120 zcmeFa4}4rznLm8Xi*9gC?HVMG?{c#(j+D`Z7Q@) zJ4HJkipb)ME-EPgM@41bs_3sRl^}~+r7F5rB379=(amBOvKq7M6(#q+8^`al28ddBl!&)-#F^SsG^x4i0kf6MQ#?|a_=n}1(>&hrlS zd+N8I_t*aRea7=%>-X%i=lw0eKfmC4#eT2$dfwmZS5md2G1arOv8^K+@9t=7Z*1=D zNOpI&H?HYf<%vrHurk$toA10To@{K1_cV96btOBy)eEtnWOrMK2|{_+wl&8mVQosL zdemzVysl~L?P_YiEuJ(2w8xve8xu|K=AA4eZfjF>-1h}JTiaHpx|@=1ogD@?GBkI0 zu2~mvm&Ad`Yji+&JlVazy|bw$fbn%@Q^#!qsJ^YUC%L{0vGuO(>}~9BTB8wkCy-7G zk955&6;By)Rsukpm4`1~slZEHM_V$wKpmUf+dG>Z!D4~d?sz=--W^}n)`Ox6VlDAv zsKdHDJClux)XL~Wjib4#U7~1AwylXr=U-sZM7;U7Mx?W4U0X{s;h5W-+SUYM%ibMF zDfB=z=VAW28c?FSrEyi;+W1NoS!1euWi;r}*8MKa)!5P&Z?VZ_rnDnr*0H6rvn#Ge z2Ssqjqh%TZ{)gpdqisa4qkO6O6u+yvt+A`Sb7kD-f(5(dYdY7)DfH_m5(=s@nQUwp zC106pZH=Q65$x*hM$KyLXZVSAgoerYYH+XlygZ$l9%~bVnzO74gKA zsV)gnDOa0bx7ys*)Qv{6NLPd|65ZNdLok z!$9EzuPC`SCIsUl)zRM8p$$L0ye@*XH8!f&+#PR9LX88E$=MKQv_HV5+W)$U$9(Kb zbcU;;0KqX(OKJ^Nu^U=Bfxn;y5U;92#ob&bDDE8ZXzA(%PssIkN%^`a=)#)UtHTyu zUDw^zg^>YD7XuG;R~S$rzP66$#?@`Dt!;6LE8Yt zbT()?_0_g2w!iUNQXPJ;1C;u28+MRi*+9@kMRa1J(1duJLy#iS4EY423u-5gK$V4%wZ6nsg&v@h$LZi_dv+iz-?ZU!7p zZ5^5eW>^I;E`!)hYQ6zAy^@Df!YYGy#N#ax_qI5L)J!wkjeIxnXxK33eOYSkg{!i$kxXoO@LLRQLzS02IlW=b zODR*8jUyAQ8cr{s<$3vkBU7qHm~KT}>E4+;l5b8Am9LH^7=3~ZAlBP>3c**7cg>W) zGZM7{H$d6wObC^agazu4jodpvKAxZEIMN$xyyRioSWR|WW%io7OikE>rXU*|wmBgw zUu~s8!pB71Y5lR`5r({UwI{NUr)G?&YR6MGkP{ijJY4_@(|aLN`Ht8~!+2^Y!3SO) zA4f)KVx#E|quzQH$tbccKP4P7g^N{X>T89l$<)sfqBc{%P>30s`dLEE%+${lB9f`U zQHWWY`sMSM_Mz>Uuw;yhMB&~)g>mE zk-nkyh9NJ7^c|G+tOCQ%|Th8$&Sl4UT+5JMLd3m*DpK>Jn;JA8d2Oq2-t*`Q_nwju8A(Q*l4QEasO?kl7eDzo>~CA)Mq^VIHv(vqik z)ZR%yCHqQtl@KYryb4t{yL1@Jooy)35Z||ZpscI}wI+*yQMl(&aWtkOKaPXdcmEq> zUv@A952f@~T1K58$i@b?M@vPN^guO=PJl84l-;>2bvD&mab&6Rz~6{~S9OXQ+0=hdaF zOSEt=6CJ8Vk7^YCx)o zCiYxs`h0;7`l)&<8)LJRi9Kag^^~M)Z#uSDQuUOiimwYN$=KHH;!u>gdH$4ZcJ2ZSX2oBI-M%%K~dX`dNHo=OOsjIAC)nFfBhUuGY4kC zIJWcp>+1v~P|G<%u-s~gsD>xh+%AYO6=jjqvEr$}? zd}p?>hhn2KTWV!FlC2U9nQn6i2Te(24Mw>po1nmwHJ^r8v=~oP%*up^x8Sf(hqY)( zavV$zzFU|p(>w10;iWo|veg*OjM)x%&nuK0BRQ43V(@(NFxI!QY#joTA=}_78c2U1 z13{?cEM5$tca?sFQg5%3m$L1uCm5Mb+n3pVA9xuXx_t}>kb~fCkoJ=<+L|#3qCp8t zHdPFM6^sbbgvL=2r#2(65zK!{0l0*e<~w)9YR4;0#$uGuwgMx>MX}+vF?3IhVzu3+ z`9)Bbve;O(Z=sh&Du&9Kua}}rgWepA_spKMWlUXJYsmU%9YbYqLECBlst zEDOwwbhUNGBXzyAdn3AS6q&7#k@k3N5-*rm!Mk@Rezo2b{5?geM*MxFP+Rer!^>Ll z%lLadep5Vb@EYoypyuLN>;1@KKXn*3E4@?2mBp{&T?PshKKNJ;sut7~?-XS0Y{5PV z>NKJL6_oP*4wUk3#z>P@uh#pgsh)SbP&2Bm--j?NP`_ulwqXZDpI4zYt4jPlGqC)} zddjE7i+E*_rr2`|K&DW5gyDSrJrCSOAR3;l@q5G|5D^b!9}e-X1@c9(`@Wd7r-0oL z`GY`iF^Gozc_3V3@OfBW-e3^rc^b&(5b_%!kA#r_1oB@Yq!Q9~O$o{~1ISwBt1sc1 zK;8-s@sWBUzdp<&!Icg;AP>KaGT{1#{{&Y#C~vWR4z6%8|BCViRyU9k@G#d4pQ|89 zje#|P8Vit~0^~gf$cGA$PXMuxhWyV3$ae~mpB5mw0_0BxNTo)A=%{0jYvOCLpI{=l zT6bKChmNNfAPYmtV!Y`hd{u#(jQme8`*-X)MN=RaQiEzp@nCrL0SL5y2)R-=P_}U zB)kX06o>XzV!fAfn;+TN(An9}ot9YdTd*4^Z)Tq*w7I!><*Ei)Pv}bUB#XTB&jQcqP6UAm z&6F1ntd>UbKH1Y(WVN&l%q=EP>o00oOEI{zi=gc0&%>CiWaC*Fl4SN^I5Hlq)SkU+ z936QTy7L_|kUL^E={e}{$Jo_>2O|I(mtDJgXe+``Z>aQA3uO$3CBYhc#IT{vCow6u zs511&wzAzD{F3@ENpVJm=*GJ$cf__e`CzA(RtC}jruknZ`E5D_%EA|01p>R zl5+}@6wyY9g^;txiPPkLC_$e~!gLH2x#3|=SXh@^P7hcOWroHlP5-~cAsX$S^C zfX*J1?ZM;mAK%a&S8t^n406E0v3E3?jaKf?RhYFKQ-=AI0&eBvR=xGd@CWy!TFjt1A8lB z$O@2$vLt^s!jO7XnQcf~6<}aoy*BG3F%7eUYT+gs+4_Z?5JobW&&*>oMnxLn zG$vMstqL!xkjw$OXr9CZ8kBn8qS(O=*l-}pRc&hB!AyOftOg&H#qgZ1xUytz7RQ%k zyqn%zF7tm|bIiJOv^Lwvu_h-qm;kRYPsc{4Vp(_hXjxQtb1>n((M!ES1>2FriiZj^ zc1J0zw635plNO*dz3aM$TpC%2h6AP2AHD9Q704^I8_Hqh zTyXYBZzLuu96>QtBGcZG5}ETSAXJ;HXfj8o4A3F63?!tZjV54eVl;OxY7I2OWGffV zIpJj`VUd}F!Y)f?ZmYDomNQfUr!n2-QUHr$l_?bUSiinfTw4bFO(e2?5uLF+cT#$w zEInG1I@J^}1ULG*#%`D}(~%eXvqj6CpVHJDeC8>C;`#u#xv+GD4!a%rOIU`gxCUyEp*f+LQ$GI67(EX zC+wTl2}q_||J^<1o^I_TS65$IxS+$z&k*w`N-D;3mm+qgg35sv(uRnXmH!5LSM!!{{sE+AdHX(r?l2kv!Bbut<|hUHai>^jw0vQaKg zV?z!DKn7#78WU2!nJ8@;K_8%T<8?+KSry5|y-uucBP6civUb!+o`F{YX|75o5NV4m zt3R)A(zw>_9<7kw7`7%RvpA+1z#_Enao01iumR&en|ozn_2auz6+0t{8tsVue`ah1 zn@AhErCi3vo1y&W76*%r1j~_H5o~PkKD+oHtD3tHUC>zWSWSkEU`DZyge4>0PLhP( zfIXC2S>i-V9t5kGhn8Z9b#i9+?!gMKB`>esNsXHSqd$HrIqkf+j-~&-y!!EdbD!V+ zVp++bGEZdoVUU%13aQC(r#bVSgq~y16g!ySTYIzaQ$R#pE9W%iu2i8+aa?5Iv}lpj z<6Y%BPWk;J`)BQiO_7<5{;FoQUw|l_%5gN262J@%0B?adz8s)u%2YcVEmQOjelYA8 zv_Xd;i8lBEP_YEnE?g07xv+qg8I57kkXXBo@9wG8s#6QU$QUdZmsW2*1!0idbQu1Y zBx?r`%GhrhW4)t54gOeOVcM`ZyR4S`7-e($2YI^l^Pl_N8LzAv%KQ-Pdb>wY&OAML zkK64llPy2lEtKs<_>o<}in-WC+_CNO(ulY7*`+IMUK!l|rzzNe96gzyRnUrWqr-tJ z4X!}kuNCXu-Q2t^ll@BWV19>b)*Vc@omoi0$Bu0ycb$9)A%1U!_&3R*8g#UGBjmqY zoRB2GfXoKSTe@T0NB>whN$j!|juFjR#g!2m0_CyMKDK#J69)B}Wta`X=45p6a>(_6 zLmJ9)`{`2s2Y-MZkd^jZUn^#-3{#8>AjxP7?)l4ST1=u}fU4xC?6_wKS~b-KMW6!t zTmIKV??&yK5W2Si?4+?Z!A=?-L5)@n^bHtA&QL9!-G{`Y5dpsr5-^CmZPAniJlJb;wqY{D9b?xj13>n*W9dC; z(XpXZDX{-mj}h7kA~B=s^sa>Tbqi$sONX#ynJr8(5GEq^mZ!3S$YgNMrjhtX9lqv@*59upe3>o!DrOvDo1oLUz5-y|R<0{j(&4p=01+ z#KFKAQiP@t7NPhuNEns9HmE#`WJro+T`*pm1Ujnru7hJpIf;2@K(lL(Uw86*n-mW?85i|S{k zW=pk1LL=#?$}{y5=`+!7j^=*(M>CKg%Wsf`M|S5*b-n}vk+ePrzH=)BPQF<<0y6^I z`Y`Bg7II}~ygJix36ON}JTK{-W?82>GQfjKN$syW^@`3hQ!m+{Ok#K$u$jQ5Uf%ZV z%tTX*-dBnaVW7fce85rX&;C@7I*@WXur{Q zeXZDq2xJ&Jp=w|d1*1^xI}b};*e}7HsKLOFML`kBEG&t|C#2jz%;xEj2v%Z%j+Lp7 zAyv--Rrp3}@DV5S6Qftmpl*y|(FD1oS+uiKMyy#am>miAJP=YXQ12$JI;G+;oV|QPxZ6(Br~> zXGmHfVi)bH-uf9ZqRz=cfl~^#_F5Fn!Srw=1UnCqHTo*ew}Vv*y)@q>TJCH>U1SIf zro6N^+L1yr4xt#eMZ^2?E+#3;Ar|FzI`asJHaG}15aucsdvLK;g(Q2=By<6@2rY3m zA|q1hbyE8Ri*M39ONBGNGjvt^X0BwRL?-E*QRvb)=ie15HFTS9lvJl36Iubb^me`l zb3giI4ar~VdQgZrmixv_qOb^}UzC95BT2UXGbJNvds0T`LF?@(&7VCXysF$irYq(U z&u`KZBw8ad)Uf%C23n&k*MYjB3mA25sEcSa02@ooutN-pWdM+Wiv+2yD?$ZPuDOiH zux|hYWA>axxjLV^?l6{{4>xq!$Oh^$`out!ig=NDX+yQqo*`ix4j3p&8;C5x$RmrU zidheGQEV)EC49*^R+U<$CP^`{W;QD7f*J+GyP2YZ!$tww+aajY{0|r}1I>SynH)v4 z#Mz^)2m8#3udCm?|2QcoiN32LH&xQ)FKieS51@y9;x*X&#&r4TN5gUgi-TW6t7o4( z-{5&im3XDoypl>{6{TgRB_&6d)Rau~yZ|z-^f(VY98qr?CINKwrdDh&EA_@FbErBC zk9TAJ)i-*xdm{4B!=~fx7SH=Ed@skZ*5hicQqP0B9KR{vK}T`mq1a2HZov;Lv?xvP zJ=J=rmRZ-!9o6QjI~=tV0^cM){v8yz45lENp0`w}w}HA!sGA&h0vIk6?0Qhj_phLo z@8^zs4CSHN6OK9td3H7Y)_UiGdZ$p|1l1taX~;MY`BF!iR`cmkahd zC{6iKLER{!yomDD@Q%Q`rpB=!)H}pAg%Z9&sGoznMyQ8S^4ALWDU|)KLj4ky#`Za^ z#c00V3T@!_UahwV3rp(vo1oP17okI%wqu}|ioFd>ZzfOSPt$>HHdF+Zy3TUc97l2S zR$c2HwE)yI{HAyd@%K8RF2P^rE40$#-f}bC!w)6k10|53=OF{+p$k#9UqS|XKC&2Z zvqH#nyfJ2l^$`AP`M1NnUj`7@B4ptJOaWg$Fh1H?kg59f_QeiGv0Okya6 zTms}IXty5@Q~8AuLYuA85V8iy3~0Uj;-vvRzYC=fl-FkPWDSp&7p(yA2_YW_@pjGV96^QVQ00gb;4@ zZV4eXfZT5o4S7EP%Y~4)0x7Asxj~t41=1fv)&e;S8RX~lJwVv5`x1T($U3wFKJs}W zzX&1U0Ky)?=Xn~)Zd48*`56%Q6pA#e*~t6~v=%*0b$SNBX0(>JA}Lq$WIJ{Xz?@yiJ%3dFGae5u&?yPxgE$iLOk1nw4k+8o`_`7lkIu1^Drgph9nVNKzq zJkJy$0|f|HM<@820ztyz)D$46Qdsk7T;~)Z(E{YE0%S!2(pi9PEI{sdh%M!h6(CrS*ln?JvpLu(JwA}6gAlQ}f?G`F>#n}W3TX|3NF2u~mzGdtrZ*TRTF9ZntV z*<4Sq@31tyb;sqF4>bmcVPU6ZY~lH3m<{6uF8B~kW4t49!;HipzIev@Xbj%s@OoZE zgZyLC(8+jm>X>i5;DQ&sC@p82J8%HE@!j$6PIe)lUbfNN)(svXq|IF6wKlxo1UKK9 zyC7Ixavw_|MkLzBC^Q4I2e=#mFW!X1s|M8Q59$X4Nfeki?~HC@T|YRf5+9`X(! za&$Fyw3+Kc63y;9A7`JquCv?RsbjC%@dN*R-0l-R0$*@GK5T(mXrW0xnsCVrO9ka> zZ^j53fiibO*Q^8p(F)YRndSh99sm$F@&b>8v?pp6W{|v62@b}_yy94(M$n{@i zCpUyB&6Yk^Nc4EnObtxdh72^$sKk&)7Oci-{(!}*(cA%bfLLp79x05AH|zmc=6(%Eq*m8{OY@6;ml7)>_H!V0kehojT+H+H=3Wg3C0a^D zCmd4Ee}JbKHLKPhB2hPn5~W!+4WVK2hpRlg-!NB$m*uC(IJW8a%)D%yrCAF2O;QxM zhr*Y$RuYVAMG|`qSbQ7KeT(_Ow`TD3w3czD^bti(rglpiAuooQbGI2c9?plYO;Qfz zbD65XLCDI?maT|e>1-7Hnphf?-%CR5a9EYJtGmX}p!?l}nOos3*oSpQl|R@$qwTes{l^og9&uu!HG zLv{Z47P>)GBx#j7PW`3T&|`fSgNFkUMT5yT_Q}Wk`v&0uPW<2lhqv9Xgyx29grKp~ zWmO5(t~1v--|%dX-~WMXx)+f{8@V|=-qmZ$mD~u-Hhakh;(AB!fcU_D4bv=o$ zsM7xh&)F@mf9u6q|GYS2M&9l5?nqNRFa22`Y3slVy!dp_@x;5kJG&!T4(Y-%n+Rqm zo!#p(;dJgDosqV4IwKrBc6Rhcn$}`C#vAeiK|ltCkE0xsRya=gX18Fi79yUEU#<7A z_&Wo?Dc(LuaSiEA{A#@chyBJ;zXPSNr$7tT?`e+Wc`tRnz+sCV6?LvJJM7Pn;sjRx z9tKK7u5r{c&h>hS-R!6p&h<8j@pQX}l5(zd(D0vu6x4b*f>PHeP;&)a2kLZCQ@kyp z<_Pv}P!Xa271Sx>ItJ>Ef=$Qj+i61012tPHt{l%2>X)ES6{_e;rO^#AxToAuC5W>W zIaBPxGKRMhjO2kJc$gy2vlVG<>y&HkZgdEFF2;{*-@dQ60cj5*Hvw52LOAQ)7DBcF zxi^IT1CS4gkWT}7ID~v1$QMJ%_kipQAp=03HV6s~&&&AXb`T?TaP-HlDJwY)V=(5q z{}is#_->XeT%)lr{{Mw*G#~UG1JqOq5?(i%QGm=VKrSsnt|>rn0b(D`jrIcMjsk?M zqV`c=4;LU@@zlqzr1TdcG|UV0165oSx-wsfzROQ|qJ#>^TQ6>4MW2{##V10?R6<=tR<`&iH&S59`Ox^abXYkSiw%=m2> zXh~f-ZJn5*XC68N+0JG&QT*kOVJg+s6oPX~8g%eKiMeu_BMK_)Nzyie}8VC=CQBdHTo~IDt&IVf;oAUhs(` zNNa>|uXHlk6=4^hqh0h>i3j1uUfqNxbPUfb5AXBLH4u0Qpw|^)^jGwnCXB*XxA6Xj z;LQ>ddr8g{I%+x`0qM;W!60>DsJ^jlZ;w3LJC#ngfo%LA1yZKtw~Jmo5WUz5mRZOh zceEAyCuU2n;zq)zJQ#kUB&Peypn6|MQG>;vnZUVuf`86{$4Yi>Aqa3MN z3mP3%r+3Y2$Vo6}UkFuFza$4zv-AAI>-jl13YH&qxuMW9{MHOm{S@1{HROJe=d;0ZE~wm+jk$ zH?i0{c-Af%@d?0Ql1bUZu&Yo0lHsKnRzTVP@N!X}|>6w<3cM zGuYPbHC3CR_WH)h$>7QYIRizgf+_BZHMg}YUfU2dTaBmn1TeOQN%x%TPYV-;jA()Aj|(y#84l4tx(A>H?{Q@26<(* z5|iOk8zqW}Mczd-rQFpTF4y9CQDbTTG(FUUwUgGY*UCi&=r^LmE6*jDx;mogAz{0h zlv1%Vp>&5$Oe3_u;arY~XB%b?@JBtu`775H zTuv#{y*26~67X*o_dG|Je&p(%v>C{KrYOqShK`B8tXm-ypW4)oClV} z$Kan!sglfS+%{LUma?wXki_Qm0Gv@24B-j}$_30}qo#goX0|*6)z)B;iMWew9DB#c zycp-BCBWzKm(@d0z%GhCSAF+3ASmxL+!B^U)AOi?kcoXJ8+#7#52rUgEN5gN#u?d% zaYi<~^fTXJDBG{AoSIqopmIHsUG_j`+5PDa_Y3d+;JqKbIGd7P`oP@X+1P{6j>|pjFTEvSj=$GzU;3qN?9pwsH^tpyt!RZH8LmhzyN4;s?1MZ{LRuPVM z)`i+4F#BD;r3Y5XdM8T|_YL7h{vS|3a4V!ew&|DP`w->eMUwSZwq{9P-Y9n}Nt=j# z%%NSdrkgy?f!c|8|1`%vJk1dT7iMDjWMlWJ^=8>xv|R^L`c`Yv$NO3<`GB@g)cj#E zSv7x%9%7JdieCMMG$cL)S+VAewBzCfIRuVqL6_$?gBz=d%$^1Y$vYV9=LBBMgEsAQ zTr<>& zCE>wI8^==<;z5^Y!ok6s3naI6{K5Wg^Y3=4E7qtb{L0m3*BI|;M_~Jt*x@Z9kAhHFEtxY^<+$ikCbFaf2w~ z4%9*D+PJyc0bqFvHZca_F4v2)yOR4oOY=Vlxt)zB1?HjcGBEC9S%=O6%Z?8Bp$5U-kFBizEMdk6U;(& zZpbZ{gBR#fhgpptv#YbH#G{OUzbew5yLuz^`Mmf<`#8gO+Ge9De~eM^BeXdK%#H^3 z=2AN7Y-;1RVxw^+vg<(SmSBm`{?Dt;Bml9jm+>8X&=n2*guV9Wa*EFKg_9zcQ|BsZn_Brbp!KO_SpHk0q1EUX9~dM zHDtvQ2K_eIM7;bdy!K-ww7T{wyyD0zj=q=F4E_;S-XsZaf+-Og=u0laOL_JC?gT%F zozNtM{%nDS|O=Uqq)V>#ncSG1kru;9f~4(?v9et+;N7LYw0f7-8rM~Nd7Q2*_1Cb zzohzo@77SELF11;4o4bd;6JpGc1;HJ`DI|jE#fj=9La2bzjOlVVWPFHFVYpl=mM30 zH1`KRy9Bv(=ikl)s|IT%CYeEL1Z?f()}iC2&%x11Tth$8(zuB}l1Isma6FkjS$Hw9 z#J$}p5_G5wEN@j5oZt(NMli^zOY(S{C<%rqJYJaiHR7e-;BbsPY#71Np0_@sLL>%@ zxTAU=lqgO3*}fIbjJ^lKo7qAdWdh+Ub^$;gu<1qrf`iYONuOgeHfbyX={X1QKw+uY z^lP^Ymp}n8)r_<%YNpP(qzmoK1IYFru><2MN@;Zx^qQ*_O~e`&1_tj2$3sNXx-jc< z*d-rEweS`DIZPVupiQJ4&C%=|6$xxy0Zd*b@Nn*YJEU<%dbAF%2RpQ`q1|Lu@CS_` zWrjG6FW9r=(s=GD;W}nC7{5bi!RBQocSd+ZUNLw!GdPwD^aZ$jNnd%H)$eo>OwZWo z7HKx+*IO3b9VA#yk3>~xM>vvuYET*p=ijiUE^~;sEf{-1zYe;JjJ46pqTZ!bD9d1{ z`AKP>a2VLce3i!Rv*|(5^1zyD7Q_=iaxjv+ zP(2xm$A?6e!JFVkl$JxNIx~)XBu_^<#mRBE%mf2R(qSS2U!2qg)_?4da)IUweAbJ0DcvLh^LGLDq%sBd^9vkYph-dXt&=Hi9 zd=Eo|MO&-E>i2V;93~Vh8B3NPk;D2$4HF_-wd$>;!zqwA_rZbin?`ozx^s~RDKK_# zyxEF6S(m$;vB{+h{c@8xicY4f9U?`s%!r1=FCOfLg~0;x29L#GN`WS9{5_YI?`ZE0uHz^ zphQzoB-z;so2`!Z5gwH2ImJYW{eJOa4o)<8rrKLVV#*E4-Knl*geNeZyV~7b3F)*X zwGxMD&xR!z{vlF1UD=Fu)q3|bbwd5rQ8S^qirwU>k2#9>JJU93igz`rON6=(R9r$? z1?nwIp;>*aP)~r;@Xo+G#S+0jQUU8Cp)P|>PLohKfO<2iDPA`y<>T2z#XjM%uRAR7 zsIsY+?_4O@LJ5WE2-WW#=+6}r$D2VZb}K05`x2yI7werTqqXeX#fajk-uYEHfdluC6Cs9VMLV@F_}PpDm> zG~NoF>QhPY1f{OCPb--wfWN?n8Vck23QP*+MQS75ZaRH$1(T_x1BpfuiJfoc)# zj}9w2#$p$NxuOpwx96C_QogFsOwHWs3J%P&Y|<-vXui z{C!aB<5^I&sHpW`ajs*aZWL_lah9(Nl=8hFl;-XMP+A@@gStU{oOHa!E&!$SEd_PG zxbjS&`q&2QYQaA0utz{G6YLwHt`n;41bce^nA;cQH$_TC%P4{Og@Uy^s>@MHQ0k+I?I7%7SOdckCE$bVDL>}8 zKBW$s1&Z?d$k}*fd+qzW2ycAEQV{J#v4=Xt67sDHnL_HQk96YgpF&6)Zv!FZ19+Q_ zIDB891k&sf{nT^!ySQiL^L!0Fb@=%*@4?%8B+BP`1_-|e;Umuh`F0372!uOlKF=S4 zq!6r+R3c`csq~SffczzdoCM@(WIuTj93BoujzOE~`+5tI<3k8%_UDBVru$PNgx?vc zMyu$Dvjxas(1t0({Nd@SRp=#sp8LSVe$z*21^7#}UOw_QATNcGr+~1>^?9BJ!oJr> zehK7qv|m0l2;@ApUOqAo)(JoDz?Ocy0pnTeOOP zI6XizXs>)^6OcEfb@7qAfpE6sBOeA5K`G%sQ&T) zaDg(Ia5!n;Z3v7DB%U$+*NyhVk9{iGBXIG39S5?{@RWv5IUy@y=lTHL-U-To3hi9) zgCmMO@K~!fLK0U=L%>zZphX(nkFt{C0v-ZqA^_HKrb*NF79c26c@&|AKp45L0NGf8 zyuSeXCm{CGkiSrX@Z7U~l;?W|$S(_!;R3{CqRpe>99e)w3XsBc&x;+8E%zG=kd6Xm za{+RH0rJ%X^ZZqfv4gv0>XY(|ivdqEQF_=%=f@b0zYaWLsx*k_U}J z!sr?wvau52J2Szc#T#Z_A>kye2(%KQ{N38LA z?^VV@iozZ#51gBZy!MOUk_?=c_akVLk4PK)cP0{c+5Q^~sDod(R^^EIwk6}xQ)X3H zVtr2=j_+$;@bZ8*N@$AI1_Hf7`g-bMM!!b=Npc;#`JlH5q?zobd)>^@{X^u@f=|j6 zKhUfP)Om&(9+-Il+_<$(51wi!hk8M-ST7R}MVkVo_iK{vm*Z3CP2KUOa=0ow|6Gm5 z=x4mU6<}YLU zmFf z!gJwuz#qnF?MaNU_;6+v^?ZANJDQ=}#HWvZ6YTl#0MmYi7kr`!688K%iHTW;Psx?> z*y__=A|4CpvS8o+;KY_P_sVhrvC1vC|8XmcmYlk3J(Ryf7C}eHyJ~4*dN?|KSv*!- zZvCMm_{@8+-}11B~}N`YWxfcAdwcA1Pg$)4NXQsz>0xq z(vz^+z`7w{B_=)eY8j7&jDWcceksOY5KvM-aqa(2%pBQdALXKWzCkxBaJgTmo+9DS zycu8+D#A&vP_rHeC9#KWe9UG?imi9w}I=9o^W8 zceIg^9AS;F3R$2$G6L(>>+*M414h5@W)rn zkHeQ&%f)yM#s$@Pe@jyFw+FZ2J0f4zaX4dbuDiEcy!Z(Du&;@uDy0`_b5R~P>xW8g zP~0Nn(@X$ib0287ZVr!N`$reb9}x-`5`&vTVYf-7!;bden&5}!Q48KEH{_P)v7OFU zbW|KhH0@OjXx z{;0H5G{LLN-48W_@|YTi($lIgSFW!<= zA)cPdTA_Q@j`gsMx1^NyV-s1YC@c1vHPot$x6m>hhL!6=v73*WqcsNK*!Jk*7uQ#S z>6#FexzoWh9dU8}6fp4_SP%}`c`>5Q%3!K&m3jatBD*qBBUF@l$_(sqMWxM}Xp zXT)p^IWFc$Lk!z?bvxP57%NF0f=CR5Ex6IE7SGsJ9;LTIHfX4)%7%(&&3Spg3Q4Ni z1$So{2>`|zj90eMs-)RKn<2FvCj-WwjF#6)9}N57$H68v?$luC2zv9L2jH2(@_(^~ zo&dp&7WrsDmkq1aB)4^g7&~K6dVQd#2i#-6Q8L3eH`3eWFVsFXoCed2^2-RuyJ-^i z6HE{k0;=8R@;&ymK~h{S7Q@SC%id{>j~p9`)4dTdInTY)q@Kr=)Y8;Xl?*5Jc3;WH z30bZtQ!Z!R4JDcHC0oox=@$9OTjY(W1AbwmbK zqxqH2Fb@5%niGs{TqttbOpRkjJG_C-UG*k>Wo#&57^tR*tUr1^OD?xXOGpi@pFwQtog8C$ z$wt>+K>$Mjp8n8Aeuu#h6o-lpMi}Si9Aro)!z9kPN!O@8!&Z%-0Yp%++`=hR99EPj z3v$~}%@1K94O=Fu)@Zbl7Wve?!!)SxQ|g7@Mw+0w>{8>4Q5aubh}5t#qMDE9X1O=8 zhMNF7pNP$WYak%arH*fWD}fm(qbK|Lg$n2oS|y`DytStfK|4S`Yj&STrftinjc?ok`nks@0=>0m@}&(BOT=+8&BuU*oYCd=9s7BT83B`_g*>*yIBk zWY|VrMx0vlO*3u~R2KXjPG}63Vclkz&y9@2F27=M+=>Lto3RRP+@J}m_uw?}@f+g5@BM3h7 z62*&f(WMwUY(@|(AqTtLQ0|L@`{36mpu@wAy8N4zu zoQhm%iC(aQi$?J<(S8b)>4I@^zhqOLk^iUGC`$UK-cq%6BzI0c(g$5@Mj|LhpllrdY}kE&@NI3tRS)O|A0^?E5InRA?fNE?2ks za&Z27HoG-AZ#sv0H9>&clL+t)P8V72XOyPqNdBM}vZ>c{7EP=mW-ful zWPOjaDDc1sKK21Zt1(zz9eMz$q#|e6uviTXYU9lsO2vct-=;Kz?xPROlF7NI)f(d1 z2H^H6u45qM#P$yZW#rePVyaBEz$4@h43i?_D~OBS_ zOm-4#n%2%? zL_D12tqSLsmaXOx#XB*)m&Bdv|JsWbEohR8Br?|{NMHjMwO8`$%~zIlfZn6b;JZ)ny=2m_{Nj3 z%t#R8OFUQ+a^1)cld+Y#$K}P^2eXyo6Shgg4SG`*e;@vzZelqb>yrrNxRGQ-5;3%GjUjeMv`w8r^lBgik!`fGgDj4ELzT6U{F0++L3*S3*Z}G>@sS0k zmXaR9ARjn&YTK8&U4DHp4yqFg89V zUIeyYN>BWYtdm+RJmPq&VZp#mEXiQs2nv}f;Sg1O?1w`L^_;en3`coZ19^`@%0Odg zh+j6ua}SUYgph}T&`RA8=U;&Q6ao0ivp}XIalXvI0dj&tG6 zjX>Bk`N%myK4cK}6$P>#h2_W2_Tt|{2&X%o`}pCk0n+X4HX(|~y^zyUyZvzP0`g!8 z`5cfvA>>IQ^A8L9`U#LHpfY}3ysPo45b`pRpBRK+w16c7K2dOQ$hNZr$$Kz_90z1^ z$lCL4AYU+u=EkM??+mmqe(W~@`6_C=pDvyv;KMRE{w_$g4np5kiiESW{8ie3{Px!v4vZ@J&EsA)ci` zt`70g2J+qz(hTH*5YhwWQz2vnkf%b(T|mAULOurMM+SlTcpe4vdHbfPR$LTMF}HsEP=I{1 z0C~Cq`BecjT7Vo48%KQ@S8>b9)5APP?`Ea#xgQRx#RbSs1<0xbWJ>|^{sM$wDbq(} z#?`7c;`0$wkA--MJQYHo#T!hkI^x}J&DJ*1zUtMgYJg<1pn07!yD}DqP%&$W74#S~ zg~FFxQeCi4jN@Y4cyn75tPj;&h^w)!wIj8rG1&=18RA_Aha1ez4GMYFk4q z$BA}jzTqPyaSZCgn*GU_X`Gvthqiw(Kub0!6iIX@yV_H$^rgTQ&e))->jb+vdpj;N z3)W%`(d3eHOZ1wN3W%9os=J$(w&72|G&(ald`G9dNiw3ltt;7ydwL}o!)9gvS8{Cd z6HFP64H_->{-)3Ku%B~wa(pp*U=Qu#)^rtUqTO3qhZ>!gs`-476_aT(CUF4^xXFy< z)-=JIGvK8KR~N7EFkh!Jp5*545Epzk_L$-{Ovd9xSo}H=$xT58twpQJc3PjdMC&vL zXK;#SIT|Iuy0bg*PRmo_2bVKSWpK*qAlP>HtVgX81*R8cU`qdjx`1%0Gd|qY4ckM# z(s_bTtLo7xTQjStF}c1AMwpr+ViVH#x|pjLnxlrlzhh-nOLD%^!q?@71vFoAS+Y?* zsH3Kf>NttH=Opk1<+YWmsDWq_A1E_Q6Eev31xa;;TQc4ZjRrx5o5UU!zD)xn2FErF zfQfmj5s*nngW2|Olo{i*g}n+k_q?gwHwvAuDfNv(-ObMDM}yaW#JcshB4;73p_l<#OE~pBAA#3M>)icJyFlM1TE%nu|Du& z-%7VjhKY)u3U+1fcK4!K%|`AzaPesH4h+TN1Pg=;E)T;1^Wb2@U<;?EX8|Wo9!PlC(q1R!$V)GdnmE|a2dP7ag+HNN#H}IWwzZCIRx~o;p z^5k2TC{4aeiIU_3TqH8iWc>9ax(!tP@3xF_c<63Rl19s7H2{iV(xI4(pxfm?ggJr>TC{vG2U}p0;y}4%*MYh0M z^&vDFYDu^<-W95fpe#OPLEPW9SK+{sZK!gW^ECt{ErT0(P?58|;COuSPG~D~-mAWw z2Mp;GtCP{nMfFwHTRyBAAeZv(vkR_{OlWE^Z~usO3I_D4&(Nt11;bY9DFGt>Ys9dKm_ z%9I@_E(|b%Ax2>T=WwL*$3c^i{e~{EJIde3li(@NGv{8k5ppaUL{8hp^}&8L1L%=nZZk> zu^7NTODFjnaXLW}%H<%php=T-!aqUHWF3N>Y8a}yH^>5)DK4*y57sMYj3)GUekIb>VqMr8bRRDl#O9R^Y6Ro|JR1&d@HFIr^=X7SH& z0A~3r>e^fAE^fjt4VV@nvm?yx15%aGEM;axxmhp1PHo@5q^f;*Q?vfP_5}2Z$+>)m8+7zl1 z0j~Xd$?N@1;_ZE#0m&ZfqS(mBIc%NT5RX`k_|5b(zM#}L*Rmg)|Bh+JAEm2x3Y2^> z)Y0m@yTQd^SszPwv8^a8+f3n%X&jr0ioq)ZILWYeYpXpruHV1_mggoh!na%2Y_HiH zRt)|Y$+X86cv<}LqIw)d_!>}Nbz=_}Pz=+@uyB(&NWxajZ#7*TR+``7Eb{^l($L1Y zXW7h5JVtO?Rr-!n*wEADW)g<+WT|cI@G&!9wE9UKdjLl_GPnq>fjAxXJ5Ak{{)z5N zqrveTP6Wn-9_y?VwvL(6wv2*p5;UT3CyT$5jn05rtH27MnxeS$?24}lHbz>z?x9y# zp1~F<%@_j;$k62`tK$)h^Z=$6nHU5;h2*Vq4PZb~C-gLF>Y&6%LS>fN9>FWBGQOVR zcb|Gc6-O-QhI;XfPT-)^JeZmU>qPZ?&XRDdR?{L1HA4*!R+suF2QUd0vzSfCiXl$L zAU7mX8ze`kNDK#qO}(@)!$GO!6NQv&R3!fq(t#qEdlz$uiqcz;K|AD;T?m&=svIVw~#RMZhyuv$?Ya_8B0Nvv650aPuCbq0E; zs7^j^EhUDmNXTl)do~S1`cjdVO-neR8>$N*-1+tTSN42tl zqprULhJ|)u)1hGMnsF3w<50fugJK_5>&?PIRWW{LO?{k?F}Pw6gHr4_ps?@{AKWQd z*ORcjqpt0s)b(B1yHSjLw8{s|0u$T)j=BwdGb#aZ2vTa$QDxYJQS2l~UE(P2*=QU? zpfuhiut%fVB1hc|3L6>->4y%h!0bn{nV>X|H#>?uy^1~QsKUKIGmCCU(1C{&7d|Ck zWYWDp=Eql2M#3Z9XW=hbVu_$o@Vo`T*~lj!X#%nYDOIF!SK&p-dK$gDCph0`sKxdk z3wITq_Yl#GxA01TrU3a!0rF@8@8=`nvPT6{!&mR z@SU$oR)gkWbS_-@@LVvO3q1THBU_we=Ym(DO56pPAyYNzBl7yJ2B9MnOC$Nd%q{xC z1jHum5gezMQ$>s=I(cO(v3sCAz3Y}>f2|j5iWxS2=Xu(eChZ^Q$b(;zwU*O+%-J4| z^$c_*={@D_dUus)y(O5#3&|mv{SYm~Ll8~|IfR(R$;+TmesP2bUSqU*;s!c;urcF> zt0$61F2%^v_0i+xi7m8h~<4YY4_?nAZ+rIA6LJqxB(c6~|cxBtyrAZdN~; z{Wr_fm3k)T;!Ca2h?-hx;+9YXwi(9KhYiUN6ew07fU9v>Zeb+Czlc6a60UEmtEz8$?S#Ga7db4`8hP zLD7MEa*?VgMwb+E@w1m6EvbI*PDv3IW=TL$j$4uMQc};PH#}3)-G#rUYfr~tT5+#L zsGH#<;&~e(CJI+*jtl|iucWnh3Rg*!X&hl~#NbCXFy9QGJ|Mi$T7p2`cR_$=5crSZ zDo_vSf-f6gf;ra)T>U@t!-e@jNDg3yW{FhOoUX%SvCf!$?#C(_hezQ$cqPJ-nd{{e zV6D~m1^TM0EoPuN2ZNgI+iAkK5+hiisNW}t#kBJA#G2maxV5T?0NW=Ae&JO@XW?vrq$#!K4hfgs>IthMZ zponxVz+asQ6xPddZrK|8*VIe402qJ=>fD)lgBex;p;h7O4k@g2bXT1PA{FQI+n(VdTlP&g*+5l!Y@B;`dpx5|! zsYj^JXW{Cp)G9L`eyw^mzivLaNAdVKQMt!Dcb+Y>rjt^ zR$!FmG0efsty&Pk6U9F{_lHq12Dg>D_h8zMjxSWbDsvflmD3$&7#di_9^0tPd04g> zo3O3$3G|xqC7)%RSDO$e+;4u=+ZN*Z!wT(P0>JR|-?T|T^l z!vM2=fuMEhVD4*wtH$U?>f!aWF}H@yTna7rHslW4sKyZ0cU;zEr6h%Ku9dG|QY>Lr zi8+B(4gM#3aPnSRjF*#fJ`WE0Ks$q$ar1pZb+;Mgvh{_77Gl^;3%pR zUGGb5n&73Om>0(HR{GSVL0Wg`a8wDS#)ia$6GFP?5Ft%hKN^S)VDE$gt}PaTN79ikNmiTBCkkER0<*QH zA+b0R4w!Tq8oP+gxFlIty>)=Xg4%Qf{+1-~;NR-^eN<5|86CVA0RXJ5-g>y9HgOem zYW3D1f=Q14<8@l~R<51k76cCRtGAwqmqG4dQB!UylpVDru@25Qvj(p*yp6?qDTU)b z&G4=)&P&s5$NMLy1Tw^n^X?7ue&6sWiu1l0Eml{+H;O;8eG*@Ptp?COKA86GB;kdX z;L!=bIFp#Xbg=&q_lCs&3BEW}oZOd9@#q9!cOTN1Zm2dSW@7LkOxHa{eMvKH3UspO zIYDctU{LQb8kDSPpf5FtbrW|4e3@cih$#9NPD>sy|4(J@+%G*iPTKBg56-T9|3~4G z);xh?U<>((U7=hLO7qCBpj+g8Z>B^3~#ng@b;-gcypgjPCOFu z#e~C1v7P1kxkLK4?ajV`Z~FTDA$?gj90~YxtqqLlFwVxe8Y|@<4u2w!^=Yh($yeWI znJYSQ=VXn)4Xn4_gs-=d!E<@y+mp!y--#Jh!YcBACSyjv;3Ce%c@y||9g=@W;;IS! zyAR1fGjZDl{ym4}k0jnRf&Ym^^3O`}qb$KHvG0QB65H$4)$!X7=j7>A#+fOJL2S{Q1# zL;{Da?b(RV?#P_0mR)&eq~Yo-uDULE&0MfY=A3fMDRUuDBywfEV^uOCOAhYOn)U&mM%JZg5;Imu81WfMY0r!*h9i zQ%}#u*QQn~0dbO@&7JKG3+cg0b@PXDMj{RI?z7zPZ3HKNdV1oLC6UNwsg|}*d&*s0 z)C;blUX$v;jo!Rfx<~z}%aRm6B;}WykvhcE084+E)lUdk@|fAv(-XNC=Wd!-#V2r3 z)+P92l^X2_Bh_pVBFj2%>*!q9VWCj2Ud#fGL{=722xQO#(FeL0(TF!e1TF4JWZiY0 z$)@&jAk5$eqA>7}(sbI(lEf4AzcM7$^-b-mc*wmiU@S_rIt%2Oxq=4A3|Ry@~#WDQuNJmeck5!N=Y(WW4@Tj#;t7uc&>?KO}Z!4>K5=^ ziz8);Kmrh!&x8FV8+hRVi)VLD_s|XmAWMo=nHS0?wL>L1zp4ux{srO z9X+i$=+)ZZw92ZP_2(RQncn!9_$D|two6}wPHei@)SOJ=!v~7EIK@d1h3P%~&IPd{ zZIBV)gpf0ez6+cXV29MB#?ID8^{HZtQyY~qTq5u-PEbyqk;6CoI!w1D!HQEebQ-4~ z1M!d)F`DtIf%Z6>h|nWWXeXY=k2^(EJnkVXwI9@p_|D$aM*rF{mi-k!C|jB%G&Ks@pyZ*hCCCLhJ1>nPIInra#+2?_-#S;!EXyH z^-kydUWeV~un#%xqmKH7bA8HT-*ec{9rnDV4m#IAJB%C6nvTOksVql1>R9J`w!_YI zSkz%LN4?Ft;=q9kk0<&yj_nS6pQG+`uDcxe9f!RIvssnu?T%^yrQzM|Fz%Tv*6px$ zj^adKUEk}lyBx;Zy2kMdM}5Y*@|#2Iy3=8tn=AGMN9}j6&pYg(!(MjSpB=?Hw@StD z5ovfe4tt}+IG0w}dCv7hhh5?@evL@^8XUFExvp?n++j(Ft#=f^Go(^w9Co+E_-#v# z##pMY}8SIajr*U8l)1O;Ha}5#Yv}1A9YyF zQEzjuO%7{ySdYVc9ks!^e!yWLcG#yK_K2gt>|CF6*!LXv3x~bns282>vY&Ahi!Efw-{A|k2~zs4*Ne2+v}+BI@bY* z{l;Pc>99XJYTUWjR@zja=%_kJoexT7i8<_Tj=I{pwmR%Khu!Y5K1bc@Tpw`QLk|10 z!@lOIZ#vf>Iqatnd(mM-j`|PhT8S-OEy2Sb621>CL92RlZZ0GuB zhw)x7^>MAkForVWEqAU-hpl&5#$k6m>K~lzHyyUuQO`Q+MMu#>T_qTESjk~lf+?WX z^&E#SaM)spUE!#!oNKGYZgbe}4(oH&ozC?Ehdt!5uRHA9j(Wnm{@h{DJM7;bHsYxN za;`Pli`UXR29&1lLQu!csOp`dW(u_m)Codu0;N8-Iw}K7{eIA44>;@*hke;mUvsYg z4tvI72ORb*NB!2hzT&VkhwU4+AbJ!&gyUbDiGO_x&!C|*JtleSn za@1Pq`d)|K<*)}F_K>4KfI@fg$yTf63Iqdz8`bX#bX@@=Hu*V&?+fh$C*PlA< zfWw9y_8*RV*||=I4UcL>6)4S(nGQR}QKvcA3mtZe!wRj^f@_DU5az)UPM#8P^3x9$- z(o7$r+s>p`JAD;r`BPZWnf5T_|5iO`gsk7;`bk^AFfz9QVLKS+xw-&(ClLFTdThI1 zA8XXN#}~)jo7TsAyrd-eO?10JL$v!~=oC3|+1)40`3i;=sRYz_*M6(R6- zxg-yh;WT`HF>0>kFsGC8p^t#z_XZ^JnUeWNG2NV`We2k zM_0dZ3;p8o+a;Ru$=mRf)l$GovE(g*S6)7kvo_XQJ{S~u#Wy7RElum(AC;m35GYi! zI|kEeK+t4B&`&TCxDP}A-+2aJe4(x7a9Y2KmXzZ|a?d`G#8q$I0d6(Y)h~O>$sYSX z&XGYT)TA6TEt2BiuvFz`sWOn{1#$q1Ng$Nja=#7JLV-YG1p(`mQ8ss~4WEJCq6x_(*fZrHV7%iZoDo*ccd4il)v6m< zZ7!S!TGJ~Z3FRj#93sN%*{PifRxd^u>i?a(7pVskJt#eT>PZj59K@p#sNeU` z?(A$f;sYE=^6fV}v-8Z(^BYN3`O>AGk#JKQ=XBP2xsYgWaF*{LXdiOQSQN7p8CE-YweX^oe(ZB0(eFm&tN>TQ4(jf)Ya_X>IL(h zN6?ay72VdM98Bca+6UK*D2G(Ap{|ZB08k4jq_|c3xb)>4h%DJG8_887?OV3fx^@?b z*E;mlEIC0&j#uSoFmL6!D?IO~8vNJMZ@H1W&G(P1|KN#*Kw5}JO*OT{(Q{H+o4JcF z-eeTkrLNkU&)o1b-wnsoQcq7WGyr=8uMKMjLL!+QjGY@j?M*u83*{K5ZQ>Y-&>C(r z{6-XOSX@v)zPkhs;d{5B5qz_!9#N+Zngr?=Zr-3}V|yQHkJ!F6+;<@Dg6(UK1`RrE zP|~0RP+WXj28s!KV9-;8Rt)-R(3(Mw$t zmU9l8TLJ147w-&O1L_v;v*CUiZryM@P}KB&9YETbaNDqYb<5bSoR8DIuqk9bX-*j=Ns?$M(?{7u1UHx05qGo_Ec`d=f)sR<3oHsGrIHn7Zzo(fpUI?=J(HOVl!43A>vB^W zGO6x0q(6`i|7D=U3_i4B@Fi6!a>s5=jMvZWJJNjgq3^IOykRMC@GUDZaeQ((DL3P8w4u&Tij2#zN cK + + +/* + * Standard DriverEntry method. + */ +NTSTATUS STDCALL +DriverEntry(IN PVOID Context1, IN PVOID Context2) +{ + return STATUS_SUCCESS; +} diff --git a/reactos/drivers/usb/cromwell/core/usbcore.coff b/reactos/drivers/usb/cromwell/core/usbcore.coff new file mode 100644 index 0000000000000000000000000000000000000000..6bb45a84b3fe3a93675da95a86577e686d211333 GIT binary patch literal 976 zcmaKr%}X0m6va=>fCjqgs#b6j!BwGQ8mFKj_!UJ#8qqemlkqDC;ut1T5L~$N|H)bq z{EysrRr2jp}upQ$=Vfb zw5|{2X^wcUYo;r&nORu}#`V=ud(X`Kc0l}%&UNb@`d{Cg+`{S@dk5@|RH>42SzWTe zMP93M&dDl=6BTY)k*RhJcdq{Z)k%xISMfS5b3(T6NJ0JvD#0+Y|BH=j75}9rJY|pm E3-UySZ2$lO literal 0 HcmV?d00001 diff --git a/reactos/drivers/usb/cromwell/core/usbcore.def b/reactos/drivers/usb/cromwell/core/usbcore.def new file mode 100644 index 00000000000..cc6e7687e2d --- /dev/null +++ b/reactos/drivers/usb/cromwell/core/usbcore.def @@ -0,0 +1,29 @@ +; +; Exports definition file for usbcore.sys +; +EXPORTS +usb_init_urb@4 +usb_alloc_urb@8 +usb_free_urb@4 +usb_get_urb@4 +usb_submit_urb@8 +usb_unlink_urb@4 +usb_bus_init@4 +usb_alloc_bus@4 +usb_free_bus@4 +usb_register_bus@4 +usb_deregister_bus@4 +usb_register_root_hub@8 +usb_calc_bus_time@16 +usb_check_bandwidth@8 +usb_claim_bandwidth@16 +usb_release_bandwidth@12 +usb_hcd_giveback_urb@12 +;usb_hcd_irq@12 +usb_hc_died@4 +usb_alloc_dev@8 +usb_connect@4 +usb_put_dev@4 +usb_disabled@0 +usb_hcd_pci_probe@8 +usb_hcd_pci_remove@4 \ No newline at end of file diff --git a/reactos/drivers/usb/cromwell/core/usbcore.map b/reactos/drivers/usb/cromwell/core/usbcore.map new file mode 100644 index 00000000000..7e4bf4cdf13 --- /dev/null +++ b/reactos/drivers/usb/cromwell/core/usbcore.map @@ -0,0 +1,11539 @@ + +usbcore.nostrip.sys: file format pei-i386 + +Disassembly of section .text: + +00011000 <__end__>: + 11000: 55 push %ebp + 11001: 89 e5 mov %esp,%ebp + 11003: 83 ec 08 sub $0x8,%esp + 11006: 8b 45 08 mov 0x8(%ebp),%eax + 11009: 8b 40 54 mov 0x54(%eax),%eax + 1100c: 89 45 fc mov %eax,0xfffffffc(%ebp) + 1100f: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 11012: c7 40 04 01 00 00 00 movl $0x1,0x4(%eax) + 11019: 83 ec 0c sub $0xc,%esp + 1101c: ff 75 fc pushl 0xfffffffc(%ebp) + 1101f: e8 41 88 00 00 call 19865 <_my_wake_up> + 11024: 83 c4 10 add $0x10,%esp + 11027: c9 leave + 11028: c3 ret + +00011029 <_usb_start_wait_urb>: + 11029: 55 push %ebp + 1102a: 89 e5 mov %esp,%ebp + 1102c: 83 ec 18 sub $0x18,%esp + 1102f: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) + 11036: 8b 45 08 mov 0x8(%ebp),%eax + 11039: 8d 55 f8 lea 0xfffffff8(%ebp),%edx + 1103c: 89 50 54 mov %edx,0x54(%eax) + 1103f: 83 ec 08 sub $0x8,%esp + 11042: 6a 00 push $0x0 + 11044: ff 75 08 pushl 0x8(%ebp) + 11047: e8 57 71 00 00 call 181a3 <_usb_submit_urb@8> + 1104c: 83 c4 08 add $0x8,%esp + 1104f: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 11052: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) + 11056: 74 19 je 11071 <_usb_start_wait_urb+0x48> + 11058: 83 ec 0c sub $0xc,%esp + 1105b: ff 75 08 pushl 0x8(%ebp) + 1105e: e8 d3 70 00 00 call 18136 <_usb_free_urb@4> + 11063: 83 c4 0c add $0xc,%esp + 11066: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 11069: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 1106c: e9 bd 00 00 00 jmp 1112e <_usb_start_wait_urb+0x105> + 11071: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) + 11075: 74 1f je 11096 <_usb_start_wait_urb+0x6d> + 11077: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) + 1107b: 75 19 jne 11096 <_usb_start_wait_urb+0x6d> + 1107d: 83 ec 0c sub $0xc,%esp + 11080: ff 75 0c pushl 0xc(%ebp) + 11083: e8 ec 87 00 00 call 19874 <_my_schedule_timeout> + 11088: 83 c4 10 add $0x10,%esp + 1108b: 89 45 0c mov %eax,0xc(%ebp) + 1108e: f0 83 44 24 00 00 lock addl $0x0,0x0(%esp,1) + 11094: eb db jmp 11071 <_usb_start_wait_urb+0x48> + 11096: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) + 1109a: 75 64 jne 11100 <_usb_start_wait_urb+0xd7> + 1109c: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) + 110a0: 75 5e jne 11100 <_usb_start_wait_urb+0xd7> + 110a2: 8b 45 08 mov 0x8(%ebp),%eax + 110a5: 83 78 1c 8d cmpl $0xffffff8d,0x1c(%eax) + 110a9: 74 3e je 110e9 <_usb_start_wait_urb+0xc0> + 110ab: 83 ec 04 sub $0x4,%esp + 110ae: 6a 45 push $0x45 + 110b0: 68 00 b0 01 00 push $0x1b000 + 110b5: 68 0a b0 01 00 push $0x1b00a + 110ba: e8 a1 89 00 00 call 19a60 <_DbgPrint> + 110bf: 83 c4 10 add $0x10,%esp + 110c2: ff 75 0c pushl 0xc(%ebp) + 110c5: 8b 45 08 mov 0x8(%ebp),%eax + 110c8: ff 70 1c pushl 0x1c(%eax) + 110cb: 8b 45 08 mov 0x8(%ebp),%eax + 110ce: ff 70 18 pushl 0x18(%eax) + 110d1: 68 14 b0 01 00 push $0x1b014 + 110d6: e8 85 89 00 00 call 19a60 <_DbgPrint> + 110db: 83 c4 10 add $0x10,%esp + 110de: 8b 45 08 mov 0x8(%ebp),%eax + 110e1: 8b 40 1c mov 0x1c(%eax),%eax + 110e4: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 110e7: eb 20 jmp 11109 <_usb_start_wait_urb+0xe0> + 110e9: 83 ec 0c sub $0xc,%esp + 110ec: ff 75 08 pushl 0x8(%ebp) + 110ef: e8 c6 73 00 00 call 184ba <_usb_unlink_urb@4> + 110f4: 83 c4 0c add $0xc,%esp + 110f7: c7 45 f4 92 ff ff ff movl $0xffffff92,0xfffffff4(%ebp) + 110fe: eb 09 jmp 11109 <_usb_start_wait_urb+0xe0> + 11100: 8b 45 08 mov 0x8(%ebp),%eax + 11103: 8b 40 1c mov 0x1c(%eax),%eax + 11106: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 11109: 83 7d 10 00 cmpl $0x0,0x10(%ebp) + 1110d: 74 0b je 1111a <_usb_start_wait_urb+0xf1> + 1110f: 8b 45 10 mov 0x10(%ebp),%eax + 11112: 8b 55 08 mov 0x8(%ebp),%edx + 11115: 8b 52 30 mov 0x30(%edx),%edx + 11118: 89 10 mov %edx,(%eax) + 1111a: 83 ec 0c sub $0xc,%esp + 1111d: ff 75 08 pushl 0x8(%ebp) + 11120: e8 11 70 00 00 call 18136 <_usb_free_urb@4> + 11125: 83 c4 0c add $0xc,%esp + 11128: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 1112b: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 1112e: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 11131: c9 leave + 11132: c3 ret + +00011133 <_usb_internal_control_msg>: + 11133: 55 push %ebp + 11134: 89 e5 mov %esp,%ebp + 11136: 83 ec 18 sub $0x18,%esp + 11139: 83 ec 08 sub $0x8,%esp + 1113c: 6a 00 push $0x0 + 1113e: 6a 00 push $0x0 + 11140: e8 a7 6f 00 00 call 180ec <_usb_alloc_urb@8> + 11145: 83 c4 08 add $0x8,%esp + 11148: 89 45 fc mov %eax,0xfffffffc(%ebp) + 1114b: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) + 1114f: 75 09 jne 1115a <_usb_internal_control_msg+0x27> + 11151: c7 45 f0 f4 ff ff ff movl $0xfffffff4,0xfffffff0(%ebp) + 11158: eb 4d jmp 111a7 <_usb_internal_control_msg+0x74> + 1115a: 6a 00 push $0x0 + 1115c: 68 00 10 01 00 push $0x11000 + 11161: ff 75 18 pushl 0x18(%ebp) + 11164: ff 75 14 pushl 0x14(%ebp) + 11167: ff 75 10 pushl 0x10(%ebp) + 1116a: ff 75 0c pushl 0xc(%ebp) + 1116d: ff 75 08 pushl 0x8(%ebp) + 11170: ff 75 fc pushl 0xfffffffc(%ebp) + 11173: e8 34 00 00 00 call 111ac <_usb_fill_control_urb> + 11178: 83 c4 20 add $0x20,%esp + 1117b: 83 ec 04 sub $0x4,%esp + 1117e: 8d 45 f4 lea 0xfffffff4(%ebp),%eax + 11181: 50 push %eax + 11182: ff 75 1c pushl 0x1c(%ebp) + 11185: ff 75 fc pushl 0xfffffffc(%ebp) + 11188: e8 9c fe ff ff call 11029 <_usb_start_wait_urb> + 1118d: 83 c4 10 add $0x10,%esp + 11190: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 11193: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) + 11197: 79 08 jns 111a1 <_usb_internal_control_msg+0x6e> + 11199: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 1119c: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 1119f: eb 06 jmp 111a7 <_usb_internal_control_msg+0x74> + 111a1: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 111a4: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 111a7: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 111aa: c9 leave + 111ab: c3 ret + +000111ac <_usb_fill_control_urb>: + 111ac: 55 push %ebp + 111ad: 89 e5 mov %esp,%ebp + 111af: 8b 55 08 mov 0x8(%ebp),%edx + 111b2: 8b 45 0c mov 0xc(%ebp),%eax + 111b5: 89 42 14 mov %eax,0x14(%edx) + 111b8: 8b 55 08 mov 0x8(%ebp),%edx + 111bb: 8b 45 10 mov 0x10(%ebp),%eax + 111be: 89 42 18 mov %eax,0x18(%edx) + 111c1: 8b 55 08 mov 0x8(%ebp),%edx + 111c4: 8b 45 14 mov 0x14(%ebp),%eax + 111c7: 89 42 38 mov %eax,0x38(%edx) + 111ca: 8b 55 08 mov 0x8(%ebp),%edx + 111cd: 8b 45 18 mov 0x18(%ebp),%eax + 111d0: 89 42 24 mov %eax,0x24(%edx) + 111d3: 8b 55 08 mov 0x8(%ebp),%edx + 111d6: 8b 45 1c mov 0x1c(%ebp),%eax + 111d9: 89 42 2c mov %eax,0x2c(%edx) + 111dc: 8b 55 08 mov 0x8(%ebp),%edx + 111df: 8b 45 20 mov 0x20(%ebp),%eax + 111e2: 89 42 58 mov %eax,0x58(%edx) + 111e5: 8b 55 08 mov 0x8(%ebp),%edx + 111e8: 8b 45 24 mov 0x24(%ebp),%eax + 111eb: 89 42 54 mov %eax,0x54(%edx) + 111ee: 5d pop %ebp + 111ef: c3 ret + +000111f0 <_usb_control_msg>: + 111f0: 55 push %ebp + 111f1: 89 e5 mov %esp,%ebp + 111f3: 56 push %esi + 111f4: 53 push %ebx + 111f5: 83 ec 20 sub $0x20,%esp + 111f8: 8b 45 10 mov 0x10(%ebp),%eax + 111fb: 8b 55 14 mov 0x14(%ebp),%edx + 111fe: 8b 4d 18 mov 0x18(%ebp),%ecx + 11201: 8b 5d 1c mov 0x1c(%ebp),%ebx + 11204: 8b 75 24 mov 0x24(%ebp),%esi + 11207: 88 45 f7 mov %al,0xfffffff7(%ebp) + 1120a: 88 55 f6 mov %dl,0xfffffff6(%ebp) + 1120d: 66 89 4d f4 mov %cx,0xfffffff4(%ebp) + 11211: 66 89 5d f2 mov %bx,0xfffffff2(%ebp) + 11215: 66 89 75 f0 mov %si,0xfffffff0(%ebp) + 11219: 83 ec 08 sub $0x8,%esp + 1121c: 6a 08 push $0x8 + 1121e: 6a 01 push $0x1 + 11220: e8 0b 88 00 00 call 19a30 <_ExAllocatePool@8> + 11225: 83 c4 08 add $0x8,%esp + 11228: 89 45 ec mov %eax,0xffffffec(%ebp) + 1122b: 83 7d ec 00 cmpl $0x0,0xffffffec(%ebp) + 1122f: 75 09 jne 1123a <_usb_control_msg+0x4a> + 11231: c7 45 e4 f4 ff ff ff movl $0xfffffff4,0xffffffe4(%ebp) + 11238: eb 6a jmp 112a4 <_usb_control_msg+0xb4> + 1123a: 8b 55 ec mov 0xffffffec(%ebp),%edx + 1123d: 8a 45 f6 mov 0xfffffff6(%ebp),%al + 11240: 88 02 mov %al,(%edx) + 11242: 8b 55 ec mov 0xffffffec(%ebp),%edx + 11245: 8a 45 f7 mov 0xfffffff7(%ebp),%al + 11248: 88 42 01 mov %al,0x1(%edx) + 1124b: 8b 55 ec mov 0xffffffec(%ebp),%edx + 1124e: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 11251: 66 89 42 02 mov %ax,0x2(%edx) + 11255: 8b 55 ec mov 0xffffffec(%ebp),%edx + 11258: 66 8b 45 f2 mov 0xfffffff2(%ebp),%ax + 1125c: 66 89 42 04 mov %ax,0x4(%edx) + 11260: 8b 55 ec mov 0xffffffec(%ebp),%edx + 11263: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 11266: 66 89 42 06 mov %ax,0x6(%edx) + 1126a: 83 ec 08 sub $0x8,%esp + 1126d: ff 75 28 pushl 0x28(%ebp) + 11270: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 11273: 25 ff ff 00 00 and $0xffff,%eax + 11278: 50 push %eax + 11279: ff 75 20 pushl 0x20(%ebp) + 1127c: ff 75 ec pushl 0xffffffec(%ebp) + 1127f: ff 75 0c pushl 0xc(%ebp) + 11282: ff 75 08 pushl 0x8(%ebp) + 11285: e8 a9 fe ff ff call 11133 <_usb_internal_control_msg> + 1128a: 83 c4 20 add $0x20,%esp + 1128d: 89 45 e8 mov %eax,0xffffffe8(%ebp) + 11290: 83 ec 0c sub $0xc,%esp + 11293: ff 75 ec pushl 0xffffffec(%ebp) + 11296: e8 a5 87 00 00 call 19a40 <_ExFreePool@4> + 1129b: 83 c4 0c add $0xc,%esp + 1129e: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 112a1: 89 45 e4 mov %eax,0xffffffe4(%ebp) + 112a4: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 112a7: 8d 65 f8 lea 0xfffffff8(%ebp),%esp + 112aa: 5b pop %ebx + 112ab: 5e pop %esi + 112ac: 5d pop %ebp + 112ad: c3 ret + +000112ae <_usb_bulk_msg>: + 112ae: 55 push %ebp + 112af: 89 e5 mov %esp,%ebp + 112b1: 83 ec 08 sub $0x8,%esp + 112b4: 83 7d 14 00 cmpl $0x0,0x14(%ebp) + 112b8: 79 09 jns 112c3 <_usb_bulk_msg+0x15> + 112ba: c7 45 f8 ea ff ff ff movl $0xffffffea,0xfffffff8(%ebp) + 112c1: eb 59 jmp 1131c <_usb_bulk_msg+0x6e> + 112c3: 83 ec 08 sub $0x8,%esp + 112c6: 6a 00 push $0x0 + 112c8: 6a 00 push $0x0 + 112ca: e8 1d 6e 00 00 call 180ec <_usb_alloc_urb@8> + 112cf: 83 c4 08 add $0x8,%esp + 112d2: 89 45 fc mov %eax,0xfffffffc(%ebp) + 112d5: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) + 112d9: 75 09 jne 112e4 <_usb_bulk_msg+0x36> + 112db: c7 45 f8 f4 ff ff ff movl $0xfffffff4,0xfffffff8(%ebp) + 112e2: eb 38 jmp 1131c <_usb_bulk_msg+0x6e> + 112e4: 83 ec 04 sub $0x4,%esp + 112e7: 6a 00 push $0x0 + 112e9: 68 00 10 01 00 push $0x11000 + 112ee: ff 75 14 pushl 0x14(%ebp) + 112f1: ff 75 10 pushl 0x10(%ebp) + 112f4: ff 75 0c pushl 0xc(%ebp) + 112f7: ff 75 08 pushl 0x8(%ebp) + 112fa: ff 75 fc pushl 0xfffffffc(%ebp) + 112fd: e8 1f 00 00 00 call 11321 <_usb_fill_bulk_urb> + 11302: 83 c4 20 add $0x20,%esp + 11305: 83 ec 04 sub $0x4,%esp + 11308: ff 75 18 pushl 0x18(%ebp) + 1130b: ff 75 1c pushl 0x1c(%ebp) + 1130e: ff 75 fc pushl 0xfffffffc(%ebp) + 11311: e8 13 fd ff ff call 11029 <_usb_start_wait_urb> + 11316: 83 c4 10 add $0x10,%esp + 11319: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 1131c: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 1131f: c9 leave + 11320: c3 ret + +00011321 <_usb_fill_bulk_urb>: + 11321: 55 push %ebp + 11322: 89 e5 mov %esp,%ebp + 11324: 8b 55 08 mov 0x8(%ebp),%edx + 11327: 8b 45 0c mov 0xc(%ebp),%eax + 1132a: 89 42 14 mov %eax,0x14(%edx) + 1132d: 8b 55 08 mov 0x8(%ebp),%edx + 11330: 8b 45 10 mov 0x10(%ebp),%eax + 11333: 89 42 18 mov %eax,0x18(%edx) + 11336: 8b 55 08 mov 0x8(%ebp),%edx + 11339: 8b 45 14 mov 0x14(%ebp),%eax + 1133c: 89 42 24 mov %eax,0x24(%edx) + 1133f: 8b 55 08 mov 0x8(%ebp),%edx + 11342: 8b 45 18 mov 0x18(%ebp),%eax + 11345: 89 42 2c mov %eax,0x2c(%edx) + 11348: 8b 55 08 mov 0x8(%ebp),%edx + 1134b: 8b 45 1c mov 0x1c(%ebp),%eax + 1134e: 89 42 58 mov %eax,0x58(%edx) + 11351: 8b 55 08 mov 0x8(%ebp),%edx + 11354: 8b 45 20 mov 0x20(%ebp),%eax + 11357: 89 42 54 mov %eax,0x54(%edx) + 1135a: 5d pop %ebp + 1135b: c3 ret + +0001135c <_usb_get_descriptor>: + 1135c: 55 push %ebp + 1135d: 89 e5 mov %esp,%ebp + 1135f: 83 ec 18 sub $0x18,%esp + 11362: 8b 45 0c mov 0xc(%ebp),%eax + 11365: 8b 55 10 mov 0x10(%ebp),%edx + 11368: 88 45 ff mov %al,0xffffffff(%ebp) + 1136b: 88 55 fe mov %dl,0xfffffffe(%ebp) + 1136e: c7 45 f8 05 00 00 00 movl $0x5,0xfffffff8(%ebp) + 11375: 83 ec 04 sub $0x4,%esp + 11378: ff 75 18 pushl 0x18(%ebp) + 1137b: 6a 00 push $0x0 + 1137d: ff 75 14 pushl 0x14(%ebp) + 11380: e8 cb 86 00 00 call 19a50 <_memset> + 11385: 83 c4 10 add $0x10,%esp + 11388: 8d 45 f8 lea 0xfffffff8(%ebp),%eax + 1138b: ff 08 decl (%eax) + 1138d: 83 7d f8 ff cmpl $0xffffffff,0xfffffff8(%ebp) + 11391: 74 69 je 113fc <_usb_get_descriptor+0xa0> + 11393: 83 ec 0c sub $0xc,%esp + 11396: 68 f4 01 00 00 push $0x1f4 + 1139b: 8b 45 18 mov 0x18(%ebp),%eax + 1139e: 25 ff ff 00 00 and $0xffff,%eax + 113a3: 50 push %eax + 113a4: ff 75 14 pushl 0x14(%ebp) + 113a7: 6a 00 push $0x0 + 113a9: b8 00 00 00 00 mov $0x0,%eax + 113ae: 8a 45 ff mov 0xffffffff(%ebp),%al + 113b1: 89 c2 mov %eax,%edx + 113b3: c1 e2 08 shl $0x8,%edx + 113b6: b8 00 00 00 00 mov $0x0,%eax + 113bb: 8a 45 fe mov 0xfffffffe(%ebp),%al + 113be: 01 d0 add %edx,%eax + 113c0: 25 ff ff 00 00 and $0xffff,%eax + 113c5: 50 push %eax + 113c6: 68 80 00 00 00 push $0x80 + 113cb: 6a 06 push $0x6 + 113cd: 6a 00 push $0x0 + 113cf: ff 75 08 pushl 0x8(%ebp) + 113d2: e8 2a 00 00 00 call 11401 <___create_pipe> + 113d7: 83 c4 08 add $0x8,%esp + 113da: 0d 80 00 00 80 or $0x80000080,%eax + 113df: 50 push %eax + 113e0: ff 75 08 pushl 0x8(%ebp) + 113e3: e8 08 fe ff ff call 111f0 <_usb_control_msg> + 113e8: 83 c4 30 add $0x30,%esp + 113eb: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 113ee: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) + 113f2: 7f 08 jg 113fc <_usb_get_descriptor+0xa0> + 113f4: 83 7d f4 e0 cmpl $0xffffffe0,0xfffffff4(%ebp) + 113f8: 74 02 je 113fc <_usb_get_descriptor+0xa0> + 113fa: eb 8c jmp 11388 <_usb_get_descriptor+0x2c> + 113fc: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 113ff: c9 leave + 11400: c3 ret + +00011401 <___create_pipe>: + 11401: 55 push %ebp + 11402: 89 e5 mov %esp,%ebp + 11404: 8b 45 08 mov 0x8(%ebp),%eax + 11407: 8b 00 mov (%eax),%eax + 11409: c1 e0 08 shl $0x8,%eax + 1140c: 8b 55 0c mov 0xc(%ebp),%edx + 1140f: c1 e2 0f shl $0xf,%edx + 11412: 09 d0 or %edx,%eax + 11414: 5d pop %ebp + 11415: c3 ret + +00011416 <_usb_get_string>: + 11416: 55 push %ebp + 11417: 89 e5 mov %esp,%ebp + 11419: 83 ec 08 sub $0x8,%esp + 1141c: 8b 45 0c mov 0xc(%ebp),%eax + 1141f: 8b 55 10 mov 0x10(%ebp),%edx + 11422: 66 89 45 fe mov %ax,0xfffffffe(%ebp) + 11426: 88 55 fd mov %dl,0xfffffffd(%ebp) + 11429: 83 ec 0c sub $0xc,%esp + 1142c: 68 f4 01 00 00 push $0x1f4 + 11431: 8b 45 18 mov 0x18(%ebp),%eax + 11434: 25 ff ff 00 00 and $0xffff,%eax + 11439: 50 push %eax + 1143a: ff 75 14 pushl 0x14(%ebp) + 1143d: 66 8b 45 fe mov 0xfffffffe(%ebp),%ax + 11441: 25 ff ff 00 00 and $0xffff,%eax + 11446: 50 push %eax + 11447: b8 00 00 00 00 mov $0x0,%eax + 1144c: 8a 45 fd mov 0xfffffffd(%ebp),%al + 1144f: 05 00 03 00 00 add $0x300,%eax + 11454: 25 ff ff 00 00 and $0xffff,%eax + 11459: 50 push %eax + 1145a: 68 80 00 00 00 push $0x80 + 1145f: 6a 06 push $0x6 + 11461: 6a 00 push $0x0 + 11463: ff 75 08 pushl 0x8(%ebp) + 11466: e8 96 ff ff ff call 11401 <___create_pipe> + 1146b: 83 c4 08 add $0x8,%esp + 1146e: 0d 80 00 00 80 or $0x80000080,%eax + 11473: 50 push %eax + 11474: ff 75 08 pushl 0x8(%ebp) + 11477: e8 74 fd ff ff call 111f0 <_usb_control_msg> + 1147c: 83 c4 30 add $0x30,%esp + 1147f: c9 leave + 11480: c3 ret + +00011481 <_usb_get_device_descriptor>: + 11481: 55 push %ebp + 11482: 89 e5 mov %esp,%ebp + 11484: 83 ec 08 sub $0x8,%esp + 11487: 83 ec 0c sub $0xc,%esp + 1148a: 6a 12 push $0x12 + 1148c: 8b 45 08 mov 0x8(%ebp),%eax + 1148f: 05 70 01 00 00 add $0x170,%eax + 11494: 50 push %eax + 11495: 6a 00 push $0x0 + 11497: 6a 01 push $0x1 + 11499: ff 75 08 pushl 0x8(%ebp) + 1149c: e8 bb fe ff ff call 1135c <_usb_get_descriptor> + 114a1: 83 c4 20 add $0x20,%esp + 114a4: 89 45 fc mov %eax,0xfffffffc(%ebp) + 114a7: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 114aa: c9 leave + 114ab: c3 ret + +000114ac <_usb_get_status>: + 114ac: 55 push %ebp + 114ad: 89 e5 mov %esp,%ebp + 114af: 83 ec 08 sub $0x8,%esp + 114b2: 83 ec 0c sub $0xc,%esp + 114b5: 68 f4 01 00 00 push $0x1f4 + 114ba: 6a 02 push $0x2 + 114bc: ff 75 14 pushl 0x14(%ebp) + 114bf: 8b 45 10 mov 0x10(%ebp),%eax + 114c2: 25 ff ff 00 00 and $0xffff,%eax + 114c7: 50 push %eax + 114c8: 6a 00 push $0x0 + 114ca: 8b 55 0c mov 0xc(%ebp),%edx + 114cd: b0 80 mov $0x80,%al + 114cf: 09 d0 or %edx,%eax + 114d1: 25 ff 00 00 00 and $0xff,%eax + 114d6: 50 push %eax + 114d7: 6a 00 push $0x0 + 114d9: 6a 00 push $0x0 + 114db: ff 75 08 pushl 0x8(%ebp) + 114de: e8 1e ff ff ff call 11401 <___create_pipe> + 114e3: 83 c4 08 add $0x8,%esp + 114e6: 0d 80 00 00 80 or $0x80000080,%eax + 114eb: 50 push %eax + 114ec: ff 75 08 pushl 0x8(%ebp) + 114ef: e8 fc fc ff ff call 111f0 <_usb_control_msg> + 114f4: 83 c4 30 add $0x30,%esp + 114f7: c9 leave + 114f8: c3 ret + +000114f9 <_usb_set_maxpacket>: + 114f9: 55 push %ebp + 114fa: 89 e5 mov %esp,%ebp + 114fc: 53 push %ebx + 114fd: 83 ec 1c sub $0x1c,%esp + 11500: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 11507: 8b 45 08 mov 0x8(%ebp),%eax + 1150a: 8b 80 88 01 00 00 mov 0x188(%eax),%eax + 11510: 8a 40 04 mov 0x4(%eax),%al + 11513: 25 ff 00 00 00 and $0xff,%eax + 11518: 3b 45 f8 cmp 0xfffffff8(%ebp),%eax + 1151b: 0f 8e 49 01 00 00 jle 1166a <_usb_set_maxpacket+0x171> + 11521: 8b 45 08 mov 0x8(%ebp),%eax + 11524: 8b 98 88 01 00 00 mov 0x188(%eax),%ebx + 1152a: 8b 4d f8 mov 0xfffffff8(%ebp),%ecx + 1152d: 89 c8 mov %ecx,%eax + 1152f: c1 e0 02 shl $0x2,%eax + 11532: 01 c8 add %ecx,%eax + 11534: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx + 1153b: 01 d0 add %edx,%eax + 1153d: 01 c0 add %eax,%eax + 1153f: 01 c8 add %ecx,%eax + 11541: c1 e0 02 shl $0x2,%eax + 11544: 03 43 0c add 0xc(%ebx),%eax + 11547: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 1154a: 8b 4d f0 mov 0xfffffff0(%ebp),%ecx + 1154d: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 11550: 8b 50 04 mov 0x4(%eax),%edx + 11553: 89 d0 mov %edx,%eax + 11555: 01 c0 add %eax,%eax + 11557: 01 d0 add %edx,%eax + 11559: c1 e0 03 shl $0x3,%eax + 1155c: 03 01 add (%ecx),%eax + 1155e: 89 45 ec mov %eax,0xffffffec(%ebp) + 11561: 8b 45 ec mov 0xffffffec(%ebp),%eax + 11564: 8b 40 0c mov 0xc(%eax),%eax + 11567: 89 45 e8 mov %eax,0xffffffe8(%ebp) + 1156a: c7 45 e4 00 00 00 00 movl $0x0,0xffffffe4(%ebp) + 11571: 8b 45 ec mov 0xffffffec(%ebp),%eax + 11574: 8a 40 04 mov 0x4(%eax),%al + 11577: 25 ff 00 00 00 and $0xff,%eax + 1157c: 3b 45 e4 cmp 0xffffffe4(%ebp),%eax + 1157f: 0f 8e db 00 00 00 jle 11660 <_usb_set_maxpacket+0x167> + 11585: 8b 55 e4 mov 0xffffffe4(%ebp),%edx + 11588: 89 d0 mov %edx,%eax + 1158a: c1 e0 02 shl $0x2,%eax + 1158d: 01 d0 add %edx,%eax + 1158f: c1 e0 02 shl $0x2,%eax + 11592: 03 45 e8 add 0xffffffe8(%ebp),%eax + 11595: 89 45 e0 mov %eax,0xffffffe0(%ebp) + 11598: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 1159b: 8a 40 02 mov 0x2(%eax),%al + 1159e: 25 ff 00 00 00 and $0xff,%eax + 115a3: 83 e0 0f and $0xf,%eax + 115a6: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 115a9: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 115ac: 8a 40 03 mov 0x3(%eax),%al + 115af: 25 ff 00 00 00 and $0xff,%eax + 115b4: 83 e0 03 and $0x3,%eax + 115b7: 85 c0 test %eax,%eax + 115b9: 75 2e jne 115e9 <_usb_set_maxpacket+0xf0> + 115bb: 8b 55 08 mov 0x8(%ebp),%edx + 115be: 8b 4d f4 mov 0xfffffff4(%ebp),%ecx + 115c1: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 115c4: 66 8b 40 04 mov 0x4(%eax),%ax + 115c8: 25 ff ff 00 00 and $0xffff,%eax + 115cd: 89 44 8a 78 mov %eax,0x78(%edx,%ecx,4) + 115d1: 8b 55 08 mov 0x8(%ebp),%edx + 115d4: 8b 4d f4 mov 0xfffffff4(%ebp),%ecx + 115d7: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 115da: 66 8b 40 04 mov 0x4(%eax),%ax + 115de: 25 ff ff 00 00 and $0xffff,%eax + 115e3: 89 44 8a 38 mov %eax,0x38(%edx,%ecx,4) + 115e7: eb 6d jmp 11656 <_usb_set_maxpacket+0x15d> + 115e9: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 115ec: 80 78 02 00 cmpb $0x0,0x2(%eax) + 115f0: 78 33 js 11625 <_usb_set_maxpacket+0x12c> + 115f2: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 115f5: 66 8b 40 04 mov 0x4(%eax),%ax + 115f9: 89 c1 mov %eax,%ecx + 115fb: 81 e1 ff ff 00 00 and $0xffff,%ecx + 11601: 8b 55 08 mov 0x8(%ebp),%edx + 11604: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 11607: 3b 4c 82 78 cmp 0x78(%edx,%eax,4),%ecx + 1160b: 7e 49 jle 11656 <_usb_set_maxpacket+0x15d> + 1160d: 8b 55 08 mov 0x8(%ebp),%edx + 11610: 8b 4d f4 mov 0xfffffff4(%ebp),%ecx + 11613: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 11616: 66 8b 40 04 mov 0x4(%eax),%ax + 1161a: 25 ff ff 00 00 and $0xffff,%eax + 1161f: 89 44 8a 78 mov %eax,0x78(%edx,%ecx,4) + 11623: eb 31 jmp 11656 <_usb_set_maxpacket+0x15d> + 11625: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 11628: 66 8b 40 04 mov 0x4(%eax),%ax + 1162c: 89 c1 mov %eax,%ecx + 1162e: 81 e1 ff ff 00 00 and $0xffff,%ecx + 11634: 8b 55 08 mov 0x8(%ebp),%edx + 11637: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 1163a: 3b 4c 82 38 cmp 0x38(%edx,%eax,4),%ecx + 1163e: 7e 16 jle 11656 <_usb_set_maxpacket+0x15d> + 11640: 8b 55 08 mov 0x8(%ebp),%edx + 11643: 8b 4d f4 mov 0xfffffff4(%ebp),%ecx + 11646: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 11649: 66 8b 40 04 mov 0x4(%eax),%ax + 1164d: 25 ff ff 00 00 and $0xffff,%eax + 11652: 89 44 8a 38 mov %eax,0x38(%edx,%ecx,4) + 11656: 8d 45 e4 lea 0xffffffe4(%ebp),%eax + 11659: ff 00 incl (%eax) + 1165b: e9 11 ff ff ff jmp 11571 <_usb_set_maxpacket+0x78> + 11660: 8d 45 f8 lea 0xfffffff8(%ebp),%eax + 11663: ff 00 incl (%eax) + 11665: e9 9d fe ff ff jmp 11507 <_usb_set_maxpacket+0xe> + 1166a: 83 c4 1c add $0x1c,%esp + 1166d: 5b pop %ebx + 1166e: 5d pop %ebp + 1166f: c3 ret + +00011670 <_usb_clear_halt>: + 11670: 55 push %ebp + 11671: 89 e5 mov %esp,%ebp + 11673: 57 push %edi + 11674: 56 push %esi + 11675: 53 push %ebx + 11676: 83 ec 0c sub $0xc,%esp + 11679: 8b 45 0c mov 0xc(%ebp),%eax + 1167c: c1 f8 0f sar $0xf,%eax + 1167f: 83 e0 0f and $0xf,%eax + 11682: 89 45 ec mov %eax,0xffffffec(%ebp) + 11685: 8b 45 0c mov 0xc(%ebp),%eax + 11688: c1 e8 07 shr $0x7,%eax + 1168b: 83 e0 01 and $0x1,%eax + 1168e: 85 c0 test %eax,%eax + 11690: 74 09 je 1169b <_usb_clear_halt+0x2b> + 11692: 8d 45 ec lea 0xffffffec(%ebp),%eax + 11695: 81 08 80 00 00 00 orl $0x80,(%eax) + 1169b: 83 ec 0c sub $0xc,%esp + 1169e: 68 f4 01 00 00 push $0x1f4 + 116a3: 6a 00 push $0x0 + 116a5: 6a 00 push $0x0 + 116a7: 8b 45 ec mov 0xffffffec(%ebp),%eax + 116aa: 25 ff ff 00 00 and $0xffff,%eax + 116af: 50 push %eax + 116b0: 6a 00 push $0x0 + 116b2: 6a 02 push $0x2 + 116b4: 6a 01 push $0x1 + 116b6: 6a 00 push $0x0 + 116b8: ff 75 08 pushl 0x8(%ebp) + 116bb: e8 41 fd ff ff call 11401 <___create_pipe> + 116c0: 83 c4 08 add $0x8,%esp + 116c3: 0d 00 00 00 80 or $0x80000000,%eax + 116c8: 50 push %eax + 116c9: ff 75 08 pushl 0x8(%ebp) + 116cc: e8 1f fb ff ff call 111f0 <_usb_control_msg> + 116d1: 83 c4 30 add $0x30,%esp + 116d4: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 116d7: 83 7d f0 00 cmpl $0x0,0xfffffff0(%ebp) + 116db: 79 0b jns 116e8 <_usb_clear_halt+0x78> + 116dd: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 116e0: 89 45 e8 mov %eax,0xffffffe8(%ebp) + 116e3: e9 83 00 00 00 jmp 1176b <_usb_clear_halt+0xfb> + 116e8: 8b 5d 08 mov 0x8(%ebp),%ebx + 116eb: 8b 45 0c mov 0xc(%ebp),%eax + 116ee: c1 e8 07 shr $0x7,%eax + 116f1: 83 f0 01 xor $0x1,%eax + 116f4: 89 c6 mov %eax,%esi + 116f6: 83 e6 01 and $0x1,%esi + 116f9: 8b 7d 08 mov 0x8(%ebp),%edi + 116fc: 8b 45 0c mov 0xc(%ebp),%eax + 116ff: c1 e8 07 shr $0x7,%eax + 11702: 83 f0 01 xor $0x1,%eax + 11705: 89 c2 mov %eax,%edx + 11707: 83 e2 01 and $0x1,%edx + 1170a: 8b 45 0c mov 0xc(%ebp),%eax + 1170d: c1 f8 0f sar $0xf,%eax + 11710: 89 c1 mov %eax,%ecx + 11712: 83 e1 0f and $0xf,%ecx + 11715: b8 01 00 00 00 mov $0x1,%eax + 1171a: d3 e0 shl %cl,%eax + 1171c: f7 d0 not %eax + 1171e: 23 44 97 28 and 0x28(%edi,%edx,4),%eax + 11722: 89 44 b3 28 mov %eax,0x28(%ebx,%esi,4) + 11726: 8b 5d 08 mov 0x8(%ebp),%ebx + 11729: 8b 45 0c mov 0xc(%ebp),%eax + 1172c: c1 e8 07 shr $0x7,%eax + 1172f: 83 f0 01 xor $0x1,%eax + 11732: 89 c6 mov %eax,%esi + 11734: 83 e6 01 and $0x1,%esi + 11737: 8b 7d 08 mov 0x8(%ebp),%edi + 1173a: 8b 45 0c mov 0xc(%ebp),%eax + 1173d: c1 e8 07 shr $0x7,%eax + 11740: 83 f0 01 xor $0x1,%eax + 11743: 89 c2 mov %eax,%edx + 11745: 83 e2 01 and $0x1,%edx + 11748: 8b 45 0c mov 0xc(%ebp),%eax + 1174b: c1 f8 0f sar $0xf,%eax + 1174e: 89 c1 mov %eax,%ecx + 11750: 83 e1 0f and $0xf,%ecx + 11753: b8 01 00 00 00 mov $0x1,%eax + 11758: d3 e0 shl %cl,%eax + 1175a: f7 d0 not %eax + 1175c: 23 44 97 30 and 0x30(%edi,%edx,4),%eax + 11760: 89 44 b3 30 mov %eax,0x30(%ebx,%esi,4) + 11764: c7 45 e8 00 00 00 00 movl $0x0,0xffffffe8(%ebp) + 1176b: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 1176e: 8d 65 f4 lea 0xfffffff4(%ebp),%esp + 11771: 5b pop %ebx + 11772: 5e pop %esi + 11773: 5f pop %edi + 11774: 5d pop %ebp + 11775: c3 ret + +00011776 <_usb_set_interface>: + 11776: 55 push %ebp + 11777: 89 e5 mov %esp,%ebp + 11779: 57 push %edi + 1177a: 56 push %esi + 1177b: 53 push %ebx + 1177c: 83 ec 3c sub $0x3c,%esp + 1177f: 8b 45 08 mov 0x8(%ebp),%eax + 11782: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 11788: 8b 40 20 mov 0x20(%eax),%eax + 1178b: 8b 40 1c mov 0x1c(%eax),%eax + 1178e: 89 45 e0 mov %eax,0xffffffe0(%ebp) + 11791: 83 ec 08 sub $0x8,%esp + 11794: ff 75 0c pushl 0xc(%ebp) + 11797: ff 75 08 pushl 0x8(%ebp) + 1179a: e8 d6 44 00 00 call 15c75 <_usb_ifnum_to_if> + 1179f: 83 c4 10 add $0x10,%esp + 117a2: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 117a5: 83 7d f0 00 cmpl $0x0,0xfffffff0(%ebp) + 117a9: 75 0c jne 117b7 <_usb_set_interface+0x41> + 117ab: c7 45 d4 ea ff ff ff movl $0xffffffea,0xffffffd4(%ebp) + 117b2: e9 85 02 00 00 jmp 11a3c <_usb_set_interface+0x2c6> + 117b7: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 117ba: 83 78 08 01 cmpl $0x1,0x8(%eax) + 117be: 75 0c jne 117cc <_usb_set_interface+0x56> + 117c0: c7 45 d4 00 00 00 00 movl $0x0,0xffffffd4(%ebp) + 117c7: e9 70 02 00 00 jmp 11a3c <_usb_set_interface+0x2c6> + 117cc: 83 7d 10 00 cmpl $0x0,0x10(%ebp) + 117d0: 78 0d js 117df <_usb_set_interface+0x69> + 117d2: 8b 55 f0 mov 0xfffffff0(%ebp),%edx + 117d5: 8b 45 10 mov 0x10(%ebp),%eax + 117d8: 3b 42 08 cmp 0x8(%edx),%eax + 117db: 73 02 jae 117df <_usb_set_interface+0x69> + 117dd: eb 0c jmp 117eb <_usb_set_interface+0x75> + 117df: c7 45 d4 ea ff ff ff movl $0xffffffea,0xffffffd4(%ebp) + 117e6: e9 51 02 00 00 jmp 11a3c <_usb_set_interface+0x2c6> + 117eb: 83 ec 0c sub $0xc,%esp + 117ee: 68 f4 01 00 00 push $0x1f4 + 117f3: 6a 00 push $0x0 + 117f5: 6a 00 push $0x0 + 117f7: 8b 45 0c mov 0xc(%ebp),%eax + 117fa: 25 ff ff 00 00 and $0xffff,%eax + 117ff: 50 push %eax + 11800: 8b 4d f0 mov 0xfffffff0(%ebp),%ecx + 11803: 8b 55 10 mov 0x10(%ebp),%edx + 11806: 89 d0 mov %edx,%eax + 11808: 01 c0 add %eax,%eax + 1180a: 01 d0 add %edx,%eax + 1180c: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx + 11813: 8b 01 mov (%ecx),%eax + 11815: 8a 44 02 03 mov 0x3(%edx,%eax,1),%al + 11819: 25 ff 00 00 00 and $0xff,%eax + 1181e: 50 push %eax + 1181f: 6a 01 push $0x1 + 11821: 6a 0b push $0xb + 11823: 6a 00 push $0x0 + 11825: ff 75 08 pushl 0x8(%ebp) + 11828: e8 d4 fb ff ff call 11401 <___create_pipe> + 1182d: 83 c4 08 add $0x8,%esp + 11830: 0d 00 00 00 80 or $0x80000000,%eax + 11835: 50 push %eax + 11836: ff 75 08 pushl 0x8(%ebp) + 11839: e8 b2 f9 ff ff call 111f0 <_usb_control_msg> + 1183e: 83 c4 30 add $0x30,%esp + 11841: 89 45 e4 mov %eax,0xffffffe4(%ebp) + 11844: 83 7d e4 00 cmpl $0x0,0xffffffe4(%ebp) + 11848: 79 0b jns 11855 <_usb_set_interface+0xdf> + 1184a: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 1184d: 89 45 d4 mov %eax,0xffffffd4(%ebp) + 11850: e9 e7 01 00 00 jmp 11a3c <_usb_set_interface+0x2c6> + 11855: 8b 4d f0 mov 0xfffffff0(%ebp),%ecx + 11858: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 1185b: 8b 50 04 mov 0x4(%eax),%edx + 1185e: 89 d0 mov %edx,%eax + 11860: 01 c0 add %eax,%eax + 11862: 01 d0 add %edx,%eax + 11864: c1 e0 03 shl $0x3,%eax + 11867: 03 01 add (%ecx),%eax + 11869: 89 45 ec mov %eax,0xffffffec(%ebp) + 1186c: c7 45 e8 00 00 00 00 movl $0x0,0xffffffe8(%ebp) + 11873: 8b 45 ec mov 0xffffffec(%ebp),%eax + 11876: 8a 40 04 mov 0x4(%eax),%al + 11879: 25 ff 00 00 00 and $0xff,%eax + 1187e: 3b 45 e8 cmp 0xffffffe8(%ebp),%eax + 11881: 0f 8e 96 00 00 00 jle 1191d <_usb_set_interface+0x1a7> + 11887: 8b 4d ec mov 0xffffffec(%ebp),%ecx + 1188a: 8b 55 e8 mov 0xffffffe8(%ebp),%edx + 1188d: 89 d0 mov %edx,%eax + 1188f: c1 e0 02 shl $0x2,%eax + 11892: 01 d0 add %edx,%eax + 11894: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx + 1189b: 8b 41 0c mov 0xc(%ecx),%eax + 1189e: 8a 44 02 02 mov 0x2(%edx,%eax,1),%al + 118a2: 88 45 df mov %al,0xffffffdf(%ebp) + 118a5: 0f be 45 df movsbl 0xffffffdf(%ebp),%eax + 118a9: f7 d0 not %eax + 118ab: c1 e8 1f shr $0x1f,%eax + 118ae: 89 45 d8 mov %eax,0xffffffd8(%ebp) + 118b1: 83 7d e0 00 cmpl $0x0,0xffffffe0(%ebp) + 118b5: 74 17 je 118ce <_usb_set_interface+0x158> + 118b7: 83 ec 08 sub $0x8,%esp + 118ba: b8 00 00 00 00 mov $0x0,%eax + 118bf: 8a 45 df mov 0xffffffdf(%ebp),%al + 118c2: 50 push %eax + 118c3: ff 75 08 pushl 0x8(%ebp) + 118c6: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 118c9: ff d0 call *%eax + 118cb: 83 c4 10 add $0x10,%esp + 118ce: 8d 45 df lea 0xffffffdf(%ebp),%eax + 118d1: 80 20 0f andb $0xf,(%eax) + 118d4: b8 00 00 00 00 mov $0x0,%eax + 118d9: 8a 45 df mov 0xffffffdf(%ebp),%al + 118dc: 89 45 d0 mov %eax,0xffffffd0(%ebp) + 118df: 8b 45 d0 mov 0xffffffd0(%ebp),%eax + 118e2: c1 e0 02 shl $0x2,%eax + 118e5: 89 45 d0 mov %eax,0xffffffd0(%ebp) + 118e8: 83 7d d8 00 cmpl $0x0,0xffffffd8(%ebp) + 118ec: 74 0f je 118fd <_usb_set_interface+0x187> + 118ee: 8b 55 d0 mov 0xffffffd0(%ebp),%edx + 118f1: 03 55 08 add 0x8(%ebp),%edx + 118f4: 89 55 cc mov %edx,0xffffffcc(%ebp) + 118f7: 83 45 cc 78 addl $0x78,0xffffffcc(%ebp) + 118fb: eb 0d jmp 1190a <_usb_set_interface+0x194> + 118fd: 8b 45 d0 mov 0xffffffd0(%ebp),%eax + 11900: 03 45 08 add 0x8(%ebp),%eax + 11903: 89 45 cc mov %eax,0xffffffcc(%ebp) + 11906: 83 45 cc 38 addl $0x38,0xffffffcc(%ebp) + 1190a: 8b 55 cc mov 0xffffffcc(%ebp),%edx + 1190d: c7 02 00 00 00 00 movl $0x0,(%edx) + 11913: 8d 45 e8 lea 0xffffffe8(%ebp),%eax + 11916: ff 00 incl (%eax) + 11918: e9 56 ff ff ff jmp 11873 <_usb_set_interface+0xfd> + 1191d: 8b 55 f0 mov 0xfffffff0(%ebp),%edx + 11920: 8b 45 10 mov 0x10(%ebp),%eax + 11923: 89 42 04 mov %eax,0x4(%edx) + 11926: 8b 4d f0 mov 0xfffffff0(%ebp),%ecx + 11929: 8b 55 10 mov 0x10(%ebp),%edx + 1192c: 89 d0 mov %edx,%eax + 1192e: 01 c0 add %eax,%eax + 11930: 01 d0 add %edx,%eax + 11932: c1 e0 03 shl $0x3,%eax + 11935: 03 01 add (%ecx),%eax + 11937: 89 45 ec mov %eax,0xffffffec(%ebp) + 1193a: c7 45 e8 00 00 00 00 movl $0x0,0xffffffe8(%ebp) + 11941: 8b 45 ec mov 0xffffffec(%ebp),%eax + 11944: 8a 40 04 mov 0x4(%eax),%al + 11947: 25 ff 00 00 00 and $0xff,%eax + 1194c: 3b 45 e8 cmp 0xffffffe8(%ebp),%eax + 1194f: 0f 8e e0 00 00 00 jle 11a35 <_usb_set_interface+0x2bf> + 11955: 8b 4d ec mov 0xffffffec(%ebp),%ecx + 11958: 8b 55 e8 mov 0xffffffe8(%ebp),%edx + 1195b: 89 d0 mov %edx,%eax + 1195d: c1 e0 02 shl $0x2,%eax + 11960: 01 d0 add %edx,%eax + 11962: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx + 11969: 8b 41 0c mov 0xc(%ecx),%eax + 1196c: 8a 44 02 02 mov 0x2(%edx,%eax,1),%al + 11970: 88 45 df mov %al,0xffffffdf(%ebp) + 11973: 0f be 45 df movsbl 0xffffffdf(%ebp),%eax + 11977: f7 d0 not %eax + 11979: c1 e8 1f shr $0x1f,%eax + 1197c: 89 45 d8 mov %eax,0xffffffd8(%ebp) + 1197f: 8d 45 df lea 0xffffffdf(%ebp),%eax + 11982: 80 20 0f andb $0xf,(%eax) + 11985: 8b 5d 08 mov 0x8(%ebp),%ebx + 11988: 8b 75 d8 mov 0xffffffd8(%ebp),%esi + 1198b: 8b 7d 08 mov 0x8(%ebp),%edi + 1198e: 8b 55 d8 mov 0xffffffd8(%ebp),%edx + 11991: b9 00 00 00 00 mov $0x0,%ecx + 11996: 8a 4d df mov 0xffffffdf(%ebp),%cl + 11999: b8 01 00 00 00 mov $0x1,%eax + 1199e: d3 e0 shl %cl,%eax + 119a0: f7 d0 not %eax + 119a2: 23 44 97 28 and 0x28(%edi,%edx,4),%eax + 119a6: 89 44 b3 28 mov %eax,0x28(%ebx,%esi,4) + 119aa: b8 00 00 00 00 mov $0x0,%eax + 119af: 8a 45 df mov 0xffffffdf(%ebp),%al + 119b2: 89 45 c8 mov %eax,0xffffffc8(%ebp) + 119b5: 8b 45 c8 mov 0xffffffc8(%ebp),%eax + 119b8: c1 e0 02 shl $0x2,%eax + 119bb: 89 45 c8 mov %eax,0xffffffc8(%ebp) + 119be: 83 7d d8 00 cmpl $0x0,0xffffffd8(%ebp) + 119c2: 74 0f je 119d3 <_usb_set_interface+0x25d> + 119c4: 8b 55 c8 mov 0xffffffc8(%ebp),%edx + 119c7: 03 55 08 add 0x8(%ebp),%edx + 119ca: 89 55 c4 mov %edx,0xffffffc4(%ebp) + 119cd: 83 45 c4 78 addl $0x78,0xffffffc4(%ebp) + 119d1: eb 0d jmp 119e0 <_usb_set_interface+0x26a> + 119d3: 8b 45 c8 mov 0xffffffc8(%ebp),%eax + 119d6: 03 45 08 add 0x8(%ebp),%eax + 119d9: 89 45 c4 mov %eax,0xffffffc4(%ebp) + 119dc: 83 45 c4 38 addl $0x38,0xffffffc4(%ebp) + 119e0: 8b 4d ec mov 0xffffffec(%ebp),%ecx + 119e3: 8b 55 e8 mov 0xffffffe8(%ebp),%edx + 119e6: 89 d0 mov %edx,%eax + 119e8: c1 e0 02 shl $0x2,%eax + 119eb: 01 d0 add %edx,%eax + 119ed: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx + 119f4: 8b 41 0c mov 0xc(%ecx),%eax + 119f7: 66 8b 44 02 04 mov 0x4(%edx,%eax,1),%ax + 119fc: 25 ff ff 00 00 and $0xffff,%eax + 11a01: 8b 55 c4 mov 0xffffffc4(%ebp),%edx + 11a04: 89 02 mov %eax,(%edx) + 11a06: 8b 5d 08 mov 0x8(%ebp),%ebx + 11a09: 8b 75 d8 mov 0xffffffd8(%ebp),%esi + 11a0c: 8b 7d 08 mov 0x8(%ebp),%edi + 11a0f: 8b 55 d8 mov 0xffffffd8(%ebp),%edx + 11a12: b9 00 00 00 00 mov $0x0,%ecx + 11a17: 8a 4d df mov 0xffffffdf(%ebp),%cl + 11a1a: b8 01 00 00 00 mov $0x1,%eax + 11a1f: d3 e0 shl %cl,%eax + 11a21: f7 d0 not %eax + 11a23: 23 44 97 30 and 0x30(%edi,%edx,4),%eax + 11a27: 89 44 b3 30 mov %eax,0x30(%ebx,%esi,4) + 11a2b: 8d 45 e8 lea 0xffffffe8(%ebp),%eax + 11a2e: ff 00 incl (%eax) + 11a30: e9 0c ff ff ff jmp 11941 <_usb_set_interface+0x1cb> + 11a35: c7 45 d4 00 00 00 00 movl $0x0,0xffffffd4(%ebp) + 11a3c: 8b 45 d4 mov 0xffffffd4(%ebp),%eax + 11a3f: 8d 65 f4 lea 0xfffffff4(%ebp),%esp + 11a42: 5b pop %ebx + 11a43: 5e pop %esi + 11a44: 5f pop %edi + 11a45: 5d pop %ebp + 11a46: c3 ret + +00011a47 <_usb_set_configuration>: + 11a47: 55 push %ebp + 11a48: 89 e5 mov %esp,%ebp + 11a4a: 83 ec 18 sub $0x18,%esp + 11a4d: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) + 11a54: 8b 45 08 mov 0x8(%ebp),%eax + 11a57: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 11a5d: 8b 40 20 mov 0x20(%eax),%eax + 11a60: 8b 40 1c mov 0x1c(%eax),%eax + 11a63: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 11a66: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) + 11a6d: 8b 45 08 mov 0x8(%ebp),%eax + 11a70: 8a 80 81 01 00 00 mov 0x181(%eax),%al + 11a76: 25 ff 00 00 00 and $0xff,%eax + 11a7b: 3b 45 fc cmp 0xfffffffc(%ebp),%eax + 11a7e: 7e 48 jle 11ac8 <_usb_set_configuration+0x81> + 11a80: 8b 4d 08 mov 0x8(%ebp),%ecx + 11a83: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 11a86: 89 d0 mov %edx,%eax + 11a88: 01 c0 add %eax,%eax + 11a8a: 01 d0 add %edx,%eax + 11a8c: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx + 11a93: 8b 81 84 01 00 00 mov 0x184(%ecx),%eax + 11a99: 8a 44 02 05 mov 0x5(%edx,%eax,1),%al + 11a9d: 25 ff 00 00 00 and $0xff,%eax + 11aa2: 3b 45 0c cmp 0xc(%ebp),%eax + 11aa5: 75 1a jne 11ac1 <_usb_set_configuration+0x7a> + 11aa7: 8b 4d 08 mov 0x8(%ebp),%ecx + 11aaa: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 11aad: 89 d0 mov %edx,%eax + 11aaf: 01 c0 add %eax,%eax + 11ab1: 01 d0 add %edx,%eax + 11ab3: c1 e0 03 shl $0x3,%eax + 11ab6: 03 81 84 01 00 00 add 0x184(%ecx),%eax + 11abc: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 11abf: eb 07 jmp 11ac8 <_usb_set_configuration+0x81> + 11ac1: 8d 45 fc lea 0xfffffffc(%ebp),%eax + 11ac4: ff 00 incl (%eax) + 11ac6: eb a5 jmp 11a6d <_usb_set_configuration+0x26> + 11ac8: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) + 11acc: 75 06 jne 11ad4 <_usb_set_configuration+0x8d> + 11ace: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) + 11ad2: 75 0c jne 11ae0 <_usb_set_configuration+0x99> + 11ad4: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) + 11ad8: 74 12 je 11aec <_usb_set_configuration+0xa5> + 11ada: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) + 11ade: 75 0c jne 11aec <_usb_set_configuration+0xa5> + 11ae0: c7 45 ec ea ff ff ff movl $0xffffffea,0xffffffec(%ebp) + 11ae7: e9 f2 00 00 00 jmp 11bde <_usb_set_configuration+0x197> + 11aec: 8b 45 08 mov 0x8(%ebp),%eax + 11aef: 83 78 14 04 cmpl $0x4,0x14(%eax) + 11af3: 74 3f je 11b34 <_usb_set_configuration+0xed> + 11af5: 83 7d f0 00 cmpl $0x0,0xfffffff0(%ebp) + 11af9: 74 39 je 11b34 <_usb_set_configuration+0xed> + 11afb: c7 45 fc 01 00 00 00 movl $0x1,0xfffffffc(%ebp) + 11b02: 83 7d fc 0e cmpl $0xe,0xfffffffc(%ebp) + 11b06: 7f 2c jg 11b34 <_usb_set_configuration+0xed> + 11b08: 83 ec 08 sub $0x8,%esp + 11b0b: ff 75 fc pushl 0xfffffffc(%ebp) + 11b0e: ff 75 08 pushl 0x8(%ebp) + 11b11: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 11b14: ff d0 call *%eax + 11b16: 83 c4 10 add $0x10,%esp + 11b19: 83 ec 08 sub $0x8,%esp + 11b1c: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 11b1f: 0c 80 or $0x80,%al + 11b21: 50 push %eax + 11b22: ff 75 08 pushl 0x8(%ebp) + 11b25: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 11b28: ff d0 call *%eax + 11b2a: 83 c4 10 add $0x10,%esp + 11b2d: 8d 45 fc lea 0xfffffffc(%ebp),%eax + 11b30: ff 00 incl (%eax) + 11b32: eb ce jmp 11b02 <_usb_set_configuration+0xbb> + 11b34: 8b 55 08 mov 0x8(%ebp),%edx + 11b37: 8b 45 08 mov 0x8(%ebp),%eax + 11b3a: c7 40 2c 00 00 00 00 movl $0x0,0x2c(%eax) + 11b41: c7 42 28 00 00 00 00 movl $0x0,0x28(%edx) + 11b48: 8b 55 08 mov 0x8(%ebp),%edx + 11b4b: 8b 45 08 mov 0x8(%ebp),%eax + 11b4e: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) + 11b55: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx) + 11b5c: 8b 45 08 mov 0x8(%ebp),%eax + 11b5f: c7 40 14 04 00 00 00 movl $0x4,0x14(%eax) + 11b66: 83 ec 0c sub $0xc,%esp + 11b69: 68 f4 01 00 00 push $0x1f4 + 11b6e: 6a 00 push $0x0 + 11b70: 6a 00 push $0x0 + 11b72: 6a 00 push $0x0 + 11b74: 8b 45 0c mov 0xc(%ebp),%eax + 11b77: 25 ff ff 00 00 and $0xffff,%eax + 11b7c: 50 push %eax + 11b7d: 6a 00 push $0x0 + 11b7f: 6a 09 push $0x9 + 11b81: 6a 00 push $0x0 + 11b83: ff 75 08 pushl 0x8(%ebp) + 11b86: e8 76 f8 ff ff call 11401 <___create_pipe> + 11b8b: 83 c4 08 add $0x8,%esp + 11b8e: 0d 00 00 00 80 or $0x80000000,%eax + 11b93: 50 push %eax + 11b94: ff 75 08 pushl 0x8(%ebp) + 11b97: e8 54 f6 ff ff call 111f0 <_usb_control_msg> + 11b9c: 83 c4 30 add $0x30,%esp + 11b9f: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 11ba2: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) + 11ba6: 79 08 jns 11bb0 <_usb_set_configuration+0x169> + 11ba8: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 11bab: 89 45 ec mov %eax,0xffffffec(%ebp) + 11bae: eb 2e jmp 11bde <_usb_set_configuration+0x197> + 11bb0: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) + 11bb4: 74 0a je 11bc0 <_usb_set_configuration+0x179> + 11bb6: 8b 45 08 mov 0x8(%ebp),%eax + 11bb9: c7 40 14 05 00 00 00 movl $0x5,0x14(%eax) + 11bc0: 8b 55 08 mov 0x8(%ebp),%edx + 11bc3: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 11bc6: 89 82 88 01 00 00 mov %eax,0x188(%edx) + 11bcc: ff 75 08 pushl 0x8(%ebp) + 11bcf: e8 25 f9 ff ff call 114f9 <_usb_set_maxpacket> + 11bd4: 83 c4 04 add $0x4,%esp + 11bd7: c7 45 ec 00 00 00 00 movl $0x0,0xffffffec(%ebp) + 11bde: 8b 45 ec mov 0xffffffec(%ebp),%eax + 11be1: c9 leave + 11be2: c3 ret + +00011be3 <_usb_string>: + 11be3: 55 push %ebp + 11be4: 89 e5 mov %esp,%ebp + 11be6: 83 ec 18 sub $0x18,%esp + 11be9: 83 7d 14 00 cmpl $0x0,0x14(%ebp) + 11bed: 74 0c je 11bfb <_usb_string+0x18> + 11bef: 83 7d 10 00 cmpl $0x0,0x10(%ebp) + 11bf3: 74 06 je 11bfb <_usb_string+0x18> + 11bf5: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) + 11bf9: 75 0c jne 11c07 <_usb_string+0x24> + 11bfb: c7 45 e8 ea ff ff ff movl $0xffffffea,0xffffffe8(%ebp) + 11c02: e9 a7 01 00 00 jmp 11dae <_usb_string+0x1cb> + 11c07: 8b 45 10 mov 0x10(%ebp),%eax + 11c0a: c6 00 00 movb $0x0,(%eax) + 11c0d: 83 ec 08 sub $0x8,%esp + 11c10: 68 00 01 00 00 push $0x100 + 11c15: 6a 01 push $0x1 + 11c17: e8 14 7e 00 00 call 19a30 <_ExAllocatePool@8> + 11c1c: 83 c4 08 add $0x8,%esp + 11c1f: 89 45 fc mov %eax,0xfffffffc(%ebp) + 11c22: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) + 11c26: 75 0c jne 11c34 <_usb_string+0x51> + 11c28: c7 45 e8 f4 ff ff ff movl $0xfffffff4,0xffffffe8(%ebp) + 11c2f: e9 7a 01 00 00 jmp 11dae <_usb_string+0x1cb> + 11c34: 8b 45 08 mov 0x8(%ebp),%eax + 11c37: 83 b8 90 01 00 00 00 cmpl $0x0,0x190(%eax) + 11c3e: 75 6e jne 11cae <_usb_string+0xcb> + 11c40: 83 ec 0c sub $0xc,%esp + 11c43: 6a 04 push $0x4 + 11c45: ff 75 fc pushl 0xfffffffc(%ebp) + 11c48: 6a 00 push $0x0 + 11c4a: 6a 00 push $0x0 + 11c4c: ff 75 08 pushl 0x8(%ebp) + 11c4f: e8 c2 f7 ff ff call 11416 <_usb_get_string> + 11c54: 83 c4 20 add $0x20,%esp + 11c57: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 11c5a: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) + 11c5e: 79 05 jns 11c65 <_usb_string+0x82> + 11c60: e9 35 01 00 00 jmp 11d9a <_usb_string+0x1b7> + 11c65: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 11c68: 80 38 03 cmpb $0x3,(%eax) + 11c6b: 77 0c ja 11c79 <_usb_string+0x96> + 11c6d: c7 45 f8 ea ff ff ff movl $0xffffffea,0xfffffff8(%ebp) + 11c74: e9 21 01 00 00 jmp 11d9a <_usb_string+0x1b7> + 11c79: 8b 45 08 mov 0x8(%ebp),%eax + 11c7c: c7 80 90 01 00 00 ff movl $0xffffffff,0x190(%eax) + 11c83: ff ff ff + 11c86: 8b 4d 08 mov 0x8(%ebp),%ecx + 11c89: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 11c8c: 83 c0 02 add $0x2,%eax + 11c8f: ba 00 00 00 00 mov $0x0,%edx + 11c94: 8a 10 mov (%eax),%dl + 11c96: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 11c99: 83 c0 03 add $0x3,%eax + 11c9c: 8a 00 mov (%eax),%al + 11c9e: 25 ff 00 00 00 and $0xff,%eax + 11ca3: c1 e0 08 shl $0x8,%eax + 11ca6: 09 d0 or %edx,%eax + 11ca8: 89 81 94 01 00 00 mov %eax,0x194(%ecx) + 11cae: 83 ec 0c sub $0xc,%esp + 11cb1: 6a 02 push $0x2 + 11cb3: ff 75 fc pushl 0xfffffffc(%ebp) + 11cb6: 8b 45 0c mov 0xc(%ebp),%eax + 11cb9: 25 ff 00 00 00 and $0xff,%eax + 11cbe: 50 push %eax + 11cbf: 8b 45 08 mov 0x8(%ebp),%eax + 11cc2: 8b 80 94 01 00 00 mov 0x194(%eax),%eax + 11cc8: 25 ff ff 00 00 and $0xffff,%eax + 11ccd: 50 push %eax + 11cce: ff 75 08 pushl 0x8(%ebp) + 11cd1: e8 40 f7 ff ff call 11416 <_usb_get_string> + 11cd6: 83 c4 20 add $0x20,%esp + 11cd9: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 11cdc: 83 7d f8 01 cmpl $0x1,0xfffffff8(%ebp) + 11ce0: 7f 05 jg 11ce7 <_usb_string+0x104> + 11ce2: e9 b3 00 00 00 jmp 11d9a <_usb_string+0x1b7> + 11ce7: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 11cea: 8a 00 mov (%eax),%al + 11cec: 25 ff 00 00 00 and $0xff,%eax + 11cf1: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 11cf4: 83 ec 0c sub $0xc,%esp + 11cf7: ff 75 f4 pushl 0xfffffff4(%ebp) + 11cfa: ff 75 fc pushl 0xfffffffc(%ebp) + 11cfd: 8b 45 0c mov 0xc(%ebp),%eax + 11d00: 25 ff 00 00 00 and $0xff,%eax + 11d05: 50 push %eax + 11d06: 8b 45 08 mov 0x8(%ebp),%eax + 11d09: 8b 80 94 01 00 00 mov 0x194(%eax),%eax + 11d0f: 25 ff ff 00 00 and $0xffff,%eax + 11d14: 50 push %eax + 11d15: ff 75 08 pushl 0x8(%ebp) + 11d18: e8 f9 f6 ff ff call 11416 <_usb_get_string> + 11d1d: 83 c4 20 add $0x20,%esp + 11d20: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 11d23: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) + 11d27: 79 02 jns 11d2b <_usb_string+0x148> + 11d29: eb 6f jmp 11d9a <_usb_string+0x1b7> + 11d2b: 8d 45 14 lea 0x14(%ebp),%eax + 11d2e: ff 08 decl (%eax) + 11d30: c7 45 ec 00 00 00 00 movl $0x0,0xffffffec(%ebp) + 11d37: c7 45 f0 02 00 00 00 movl $0x2,0xfffffff0(%ebp) + 11d3e: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 11d41: 3b 45 f0 cmp 0xfffffff0(%ebp),%eax + 11d44: 76 45 jbe 11d8b <_usb_string+0x1a8> + 11d46: 8b 45 ec mov 0xffffffec(%ebp),%eax + 11d49: 3b 45 14 cmp 0x14(%ebp),%eax + 11d4c: 72 02 jb 11d50 <_usb_string+0x16d> + 11d4e: eb 3b jmp 11d8b <_usb_string+0x1a8> + 11d50: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 11d53: 03 45 fc add 0xfffffffc(%ebp),%eax + 11d56: 40 inc %eax + 11d57: 80 38 00 cmpb $0x0,(%eax) + 11d5a: 74 10 je 11d6c <_usb_string+0x189> + 11d5c: 8b 45 ec mov 0xffffffec(%ebp),%eax + 11d5f: 03 45 10 add 0x10(%ebp),%eax + 11d62: c6 00 3f movb $0x3f,(%eax) + 11d65: 8d 45 ec lea 0xffffffec(%ebp),%eax + 11d68: ff 00 incl (%eax) + 11d6a: eb 17 jmp 11d83 <_usb_string+0x1a0> + 11d6c: 8b 45 ec mov 0xffffffec(%ebp),%eax + 11d6f: 89 c2 mov %eax,%edx + 11d71: 03 55 10 add 0x10(%ebp),%edx + 11d74: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 11d77: 03 45 f0 add 0xfffffff0(%ebp),%eax + 11d7a: 8a 00 mov (%eax),%al + 11d7c: 88 02 mov %al,(%edx) + 11d7e: 8d 45 ec lea 0xffffffec(%ebp),%eax + 11d81: ff 00 incl (%eax) + 11d83: 8d 45 f0 lea 0xfffffff0(%ebp),%eax + 11d86: 83 00 02 addl $0x2,(%eax) + 11d89: eb b3 jmp 11d3e <_usb_string+0x15b> + 11d8b: 8b 45 10 mov 0x10(%ebp),%eax + 11d8e: 03 45 ec add 0xffffffec(%ebp),%eax + 11d91: c6 00 00 movb $0x0,(%eax) + 11d94: 8b 45 ec mov 0xffffffec(%ebp),%eax + 11d97: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 11d9a: 83 ec 0c sub $0xc,%esp + 11d9d: ff 75 fc pushl 0xfffffffc(%ebp) + 11da0: e8 9b 7c 00 00 call 19a40 <_ExFreePool@4> + 11da5: 83 c4 0c add $0xc,%esp + 11da8: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 11dab: 89 45 e8 mov %eax,0xffffffe8(%ebp) + 11dae: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 11db1: c9 leave + 11db2: c3 ret + 11db3: 90 nop + 11db4: 90 nop + 11db5: 90 nop + 11db6: 90 nop + 11db7: 90 nop + 11db8: 90 nop + 11db9: 90 nop + 11dba: 90 nop + 11dbb: 90 nop + 11dbc: 90 nop + 11dbd: 90 nop + 11dbe: 90 nop + 11dbf: 90 nop + +00011dc0 <_ascii2utf>: + 11dc0: 55 push %ebp + 11dc1: 89 e5 mov %esp,%ebp + 11dc3: 83 ec 04 sub $0x4,%esp + 11dc6: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) + 11dcd: 8b 45 08 mov 0x8(%ebp),%eax + 11dd0: 80 38 00 cmpb $0x0,(%eax) + 11dd3: 74 33 je 11e08 <_ascii2utf+0x48> + 11dd5: 83 7d 10 01 cmpl $0x1,0x10(%ebp) + 11dd9: 7e 2d jle 11e08 <_ascii2utf+0x48> + 11ddb: 8b 45 0c mov 0xc(%ebp),%eax + 11dde: 89 c2 mov %eax,%edx + 11de0: 8b 45 08 mov 0x8(%ebp),%eax + 11de3: ff 45 08 incl 0x8(%ebp) + 11de6: 8a 00 mov (%eax),%al + 11de8: 88 02 mov %al,(%edx) + 11dea: 8d 45 0c lea 0xc(%ebp),%eax + 11ded: ff 00 incl (%eax) + 11def: 8b 45 0c mov 0xc(%ebp),%eax + 11df2: c6 00 00 movb $0x0,(%eax) + 11df5: 8d 45 0c lea 0xc(%ebp),%eax + 11df8: ff 00 incl (%eax) + 11dfa: 8d 45 10 lea 0x10(%ebp),%eax + 11dfd: 83 28 02 subl $0x2,(%eax) + 11e00: 8d 45 fc lea 0xfffffffc(%ebp),%eax + 11e03: 83 00 02 addl $0x2,(%eax) + 11e06: eb c5 jmp 11dcd <_ascii2utf+0xd> + 11e08: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 11e0b: c9 leave + 11e0c: c3 ret + +00011e0d <_rh_string>: + 11e0d: 55 push %ebp + 11e0e: 89 e5 mov %esp,%ebp + 11e10: 53 push %ebx + 11e11: 81 ec 84 00 00 00 sub $0x84,%esp + 11e17: 83 7d 08 00 cmpl $0x0,0x8(%ebp) + 11e1b: 75 38 jne 11e55 <_rh_string+0x48> + 11e1d: 8b 45 10 mov 0x10(%ebp),%eax + 11e20: c6 00 04 movb $0x4,(%eax) + 11e23: 8d 45 10 lea 0x10(%ebp),%eax + 11e26: ff 00 incl (%eax) + 11e28: 8b 45 10 mov 0x10(%ebp),%eax + 11e2b: c6 00 03 movb $0x3,(%eax) + 11e2e: 8d 45 10 lea 0x10(%ebp),%eax + 11e31: ff 00 incl (%eax) + 11e33: 8b 45 10 mov 0x10(%ebp),%eax + 11e36: c6 00 09 movb $0x9,(%eax) + 11e39: 8d 45 10 lea 0x10(%ebp),%eax + 11e3c: ff 00 incl (%eax) + 11e3e: 8b 45 10 mov 0x10(%ebp),%eax + 11e41: c6 00 04 movb $0x4,(%eax) + 11e44: 8d 45 10 lea 0x10(%ebp),%eax + 11e47: ff 00 incl (%eax) + 11e49: c7 45 84 04 00 00 00 movl $0x4,0xffffff84(%ebp) + 11e50: e9 af 00 00 00 jmp 11f04 <_rh_string+0xf7> + 11e55: 83 7d 08 01 cmpl $0x1,0x8(%ebp) + 11e59: 75 17 jne 11e72 <_rh_string+0x65> + 11e5b: 83 ec 08 sub $0x8,%esp + 11e5e: 8b 45 0c mov 0xc(%ebp),%eax + 11e61: ff 70 08 pushl 0x8(%eax) + 11e64: 8d 45 88 lea 0xffffff88(%ebp),%eax + 11e67: 50 push %eax + 11e68: e8 33 7c 00 00 call 19aa0 <_strcpy> + 11e6d: 83 c4 10 add $0x10,%esp + 11e70: eb 52 jmp 11ec4 <_rh_string+0xb7> + 11e72: 83 7d 08 02 cmpl $0x2,0x8(%ebp) + 11e76: 75 17 jne 11e8f <_rh_string+0x82> + 11e78: 83 ec 08 sub $0x8,%esp + 11e7b: 8b 45 0c mov 0xc(%ebp),%eax + 11e7e: ff 70 4c pushl 0x4c(%eax) + 11e81: 8d 45 88 lea 0xffffff88(%ebp),%eax + 11e84: 50 push %eax + 11e85: e8 16 7c 00 00 call 19aa0 <_strcpy> + 11e8a: 83 c4 10 add $0x10,%esp + 11e8d: eb 35 jmp 11ec4 <_rh_string+0xb7> + 11e8f: 83 7d 08 03 cmpl $0x3,0x8(%ebp) + 11e93: 75 26 jne 11ebb <_rh_string+0xae> + 11e95: 83 ec 0c sub $0xc,%esp + 11e98: 8b 45 0c mov 0xc(%ebp),%eax + 11e9b: ff 70 50 pushl 0x50(%eax) + 11e9e: 68 a6 b0 01 00 push $0x1b0a6 + 11ea3: 68 ab b0 01 00 push $0x1b0ab + 11ea8: 68 b0 b0 01 00 push $0x1b0b0 + 11ead: 8d 45 88 lea 0xffffff88(%ebp),%eax + 11eb0: 50 push %eax + 11eb1: e8 da 7b 00 00 call 19a90 <_sprintf> + 11eb6: 83 c4 20 add $0x20,%esp + 11eb9: eb 09 jmp 11ec4 <_rh_string+0xb7> + 11ebb: c7 45 84 00 00 00 00 movl $0x0,0xffffff84(%ebp) + 11ec2: eb 40 jmp 11f04 <_rh_string+0xf7> + 11ec4: 8b 5d 10 mov 0x10(%ebp),%ebx + 11ec7: 8d 45 88 lea 0xffffff88(%ebp),%eax + 11eca: 83 ec 0c sub $0xc,%esp + 11ecd: 50 push %eax + 11ece: e8 ad 7b 00 00 call 19a80 <_strlen> + 11ed3: 83 c4 10 add $0x10,%esp + 11ed6: 01 c0 add %eax,%eax + 11ed8: 83 c0 02 add $0x2,%eax + 11edb: 88 03 mov %al,(%ebx) + 11edd: 8b 45 10 mov 0x10(%ebp),%eax + 11ee0: 40 inc %eax + 11ee1: c6 00 03 movb $0x3,(%eax) + 11ee4: 8b 45 14 mov 0x14(%ebp),%eax + 11ee7: 83 e8 02 sub $0x2,%eax + 11eea: 50 push %eax + 11eeb: 8b 45 10 mov 0x10(%ebp),%eax + 11eee: 83 c0 02 add $0x2,%eax + 11ef1: 50 push %eax + 11ef2: 8d 45 88 lea 0xffffff88(%ebp),%eax + 11ef5: 50 push %eax + 11ef6: e8 c5 fe ff ff call 11dc0 <_ascii2utf> + 11efb: 83 c4 0c add $0xc,%esp + 11efe: 83 c0 02 add $0x2,%eax + 11f01: 89 45 84 mov %eax,0xffffff84(%ebp) + 11f04: 8b 45 84 mov 0xffffff84(%ebp),%eax + 11f07: 8b 5d fc mov 0xfffffffc(%ebp),%ebx + 11f0a: c9 leave + 11f0b: c3 ret + +00011f0c <_rh_call_control>: + 11f0c: 55 push %ebp + 11f0d: 89 e5 mov %esp,%ebp + 11f0f: 53 push %ebx + 11f10: 83 ec 24 sub $0x24,%esp + 11f13: 8b 45 0c mov 0xc(%ebp),%eax + 11f16: 8b 40 38 mov 0x38(%eax),%eax + 11f19: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 11f1c: c7 45 ec 00 00 00 00 movl $0x0,0xffffffec(%ebp) + 11f23: 8b 45 0c mov 0xc(%ebp),%eax + 11f26: 8b 40 24 mov 0x24(%eax),%eax + 11f29: 89 45 e8 mov %eax,0xffffffe8(%ebp) + 11f2c: c7 45 e4 00 00 00 00 movl $0x0,0xffffffe4(%ebp) + 11f33: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 11f36: 8a 00 mov (%eax),%al + 11f38: 25 ff 00 00 00 and $0xff,%eax + 11f3d: 89 c2 mov %eax,%edx + 11f3f: c1 e2 08 shl $0x8,%edx + 11f42: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 11f45: 8a 40 01 mov 0x1(%eax),%al + 11f48: 25 ff 00 00 00 and $0xff,%eax + 11f4d: 09 d0 or %edx,%eax + 11f4f: 66 89 45 f6 mov %ax,0xfffffff6(%ebp) + 11f53: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 11f56: 66 8b 40 02 mov 0x2(%eax),%ax + 11f5a: 66 89 45 f4 mov %ax,0xfffffff4(%ebp) + 11f5e: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 11f61: 66 8b 40 04 mov 0x4(%eax),%ax + 11f65: 66 89 45 f2 mov %ax,0xfffffff2(%ebp) + 11f69: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 11f6c: 66 8b 40 06 mov 0x6(%eax),%ax + 11f70: 66 89 45 f0 mov %ax,0xfffffff0(%ebp) + 11f74: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 11f77: 89 c2 mov %eax,%edx + 11f79: 81 e2 ff ff 00 00 and $0xffff,%edx + 11f7f: 8b 45 0c mov 0xc(%ebp),%eax + 11f82: 3b 50 2c cmp 0x2c(%eax),%edx + 11f85: 7e 05 jle 11f8c <_rh_call_control+0x80> + 11f87: e9 49 02 00 00 jmp 121d5 <_rh_call_control+0x2c9> + 11f8c: 8b 45 0c mov 0xc(%ebp),%eax + 11f8f: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) + 11f96: 8b 55 0c mov 0xc(%ebp),%edx + 11f99: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 11f9c: 25 ff ff 00 00 and $0xffff,%eax + 11fa1: 89 42 30 mov %eax,0x30(%edx) + 11fa4: 66 8b 45 f6 mov 0xfffffff6(%ebp),%ax + 11fa8: 89 c2 mov %eax,%edx + 11faa: 81 e2 ff ff 00 00 and $0xffff,%edx + 11fb0: 89 55 dc mov %edx,0xffffffdc(%ebp) + 11fb3: 81 7d dc 01 01 00 00 cmpl $0x101,0xffffffdc(%ebp) + 11fba: 0f 84 1f 02 00 00 je 121df <_rh_call_control+0x2d3> + 11fc0: 81 7d dc 01 01 00 00 cmpl $0x101,0xffffffdc(%ebp) + 11fc7: 7f 42 jg 1200b <_rh_call_control+0xff> + 11fc9: 83 7d dc 05 cmpl $0x5,0xffffffdc(%ebp) + 11fcd: 0f 84 0c 02 00 00 je 121df <_rh_call_control+0x2d3> + 11fd3: 83 7d dc 05 cmpl $0x5,0xffffffdc(%ebp) + 11fd7: 7f 19 jg 11ff2 <_rh_call_control+0xe6> + 11fd9: 83 7d dc 01 cmpl $0x1,0xffffffdc(%ebp) + 11fdd: 0f 84 fc 01 00 00 je 121df <_rh_call_control+0x2d3> + 11fe3: 83 7d dc 03 cmpl $0x3,0xffffffdc(%ebp) + 11fe7: 0f 84 f2 01 00 00 je 121df <_rh_call_control+0x2d3> + 11fed: e9 9e 01 00 00 jmp 12190 <_rh_call_control+0x284> + 11ff2: 83 7d dc 09 cmpl $0x9,0xffffffdc(%ebp) + 11ff6: 0f 84 e3 01 00 00 je 121df <_rh_call_control+0x2d3> + 11ffc: 83 7d dc 0b cmpl $0xb,0xffffffdc(%ebp) + 12000: 0f 84 d9 01 00 00 je 121df <_rh_call_control+0x2d3> + 12006: e9 85 01 00 00 jmp 12190 <_rh_call_control+0x284> + 1200b: 81 7d dc 06 80 00 00 cmpl $0x8006,0xffffffdc(%ebp) + 12012: 74 77 je 1208b <_rh_call_control+0x17f> + 12014: 81 7d dc 06 80 00 00 cmpl $0x8006,0xffffffdc(%ebp) + 1201b: 7f 1b jg 12038 <_rh_call_control+0x12c> + 1201d: 81 7d dc 03 01 00 00 cmpl $0x103,0xffffffdc(%ebp) + 12024: 0f 84 b5 01 00 00 je 121df <_rh_call_control+0x2d3> + 1202a: 81 7d dc 00 80 00 00 cmpl $0x8000,0xffffffdc(%ebp) + 12031: 74 3b je 1206e <_rh_call_control+0x162> + 12033: e9 58 01 00 00 jmp 12190 <_rh_call_control+0x284> + 12038: 81 7d dc 0a 80 00 00 cmpl $0x800a,0xffffffdc(%ebp) + 1203f: 0f 84 34 01 00 00 je 12179 <_rh_call_control+0x26d> + 12045: 81 7d dc 0a 80 00 00 cmpl $0x800a,0xffffffdc(%ebp) + 1204c: 7f 0e jg 1205c <_rh_call_control+0x150> + 1204e: 81 7d dc 08 80 00 00 cmpl $0x8008,0xffffffdc(%ebp) + 12055: 74 29 je 12080 <_rh_call_control+0x174> + 12057: e9 34 01 00 00 jmp 12190 <_rh_call_control+0x284> + 1205c: 81 7d dc 00 81 00 00 cmpl $0x8100,0xffffffdc(%ebp) + 12063: 0f 84 18 01 00 00 je 12181 <_rh_call_control+0x275> + 12069: e9 22 01 00 00 jmp 12190 <_rh_call_control+0x284> + 1206e: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 12071: c6 00 01 movb $0x1,(%eax) + 12074: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 12077: 40 inc %eax + 12078: c6 00 00 movb $0x0,(%eax) + 1207b: e9 5f 01 00 00 jmp 121df <_rh_call_control+0x2d3> + 12080: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 12083: c6 00 01 movb $0x1,(%eax) + 12086: e9 54 01 00 00 jmp 121df <_rh_call_control+0x2d3> + 1208b: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 1208e: 25 ff ff 00 00 and $0xffff,%eax + 12093: 25 00 ff 00 00 and $0xff00,%eax + 12098: 89 45 e0 mov %eax,0xffffffe0(%ebp) + 1209b: 81 7d e0 00 02 00 00 cmpl $0x200,0xffffffe0(%ebp) + 120a2: 74 6f je 12113 <_rh_call_control+0x207> + 120a4: 81 7d e0 00 02 00 00 cmpl $0x200,0xffffffe0(%ebp) + 120ab: 7f 0e jg 120bb <_rh_call_control+0x1af> + 120ad: 81 7d e0 00 01 00 00 cmpl $0x100,0xffffffe0(%ebp) + 120b4: 74 17 je 120cd <_rh_call_control+0x1c1> + 120b6: e9 1a 01 00 00 jmp 121d5 <_rh_call_control+0x2c9> + 120bb: 81 7d e0 00 03 00 00 cmpl $0x300,0xffffffe0(%ebp) + 120c2: 0f 84 84 00 00 00 je 1214c <_rh_call_control+0x240> + 120c8: e9 08 01 00 00 jmp 121d5 <_rh_call_control+0x2c9> + 120cd: 8b 45 08 mov 0x8(%ebp),%eax + 120d0: 8b 40 74 mov 0x74(%eax),%eax + 120d3: 8b 40 08 mov 0x8(%eax),%eax + 120d6: c1 e8 05 shr $0x5,%eax + 120d9: 83 e0 01 and $0x1,%eax + 120dc: 85 c0 test %eax,%eax + 120de: 74 09 je 120e9 <_rh_call_control+0x1dd> + 120e0: c7 45 ec 50 b0 01 00 movl $0x1b050,0xffffffec(%ebp) + 120e7: eb 1e jmp 12107 <_rh_call_control+0x1fb> + 120e9: 8b 45 08 mov 0x8(%ebp),%eax + 120ec: 8b 40 74 mov 0x74(%eax),%eax + 120ef: 8b 40 08 mov 0x8(%eax),%eax + 120f2: c1 e8 04 shr $0x4,%eax + 120f5: 83 e0 01 and $0x1,%eax + 120f8: 85 c0 test %eax,%eax + 120fa: 0f 84 d5 00 00 00 je 121d5 <_rh_call_control+0x2c9> + 12100: c7 45 ec 62 b0 01 00 movl $0x1b062,0xffffffec(%ebp) + 12107: c7 45 e4 12 00 00 00 movl $0x12,0xffffffe4(%ebp) + 1210e: e9 cc 00 00 00 jmp 121df <_rh_call_control+0x2d3> + 12113: 8b 45 08 mov 0x8(%ebp),%eax + 12116: 8b 40 74 mov 0x74(%eax),%eax + 12119: 8b 40 08 mov 0x8(%eax),%eax + 1211c: c1 e8 05 shr $0x5,%eax + 1211f: 83 e0 01 and $0x1,%eax + 12122: 85 c0 test %eax,%eax + 12124: 74 13 je 12139 <_rh_call_control+0x22d> + 12126: c7 45 ec 8d b0 01 00 movl $0x1b08d,0xffffffec(%ebp) + 1212d: c7 45 e4 19 00 00 00 movl $0x19,0xffffffe4(%ebp) + 12134: e9 a6 00 00 00 jmp 121df <_rh_call_control+0x2d3> + 12139: c7 45 ec 74 b0 01 00 movl $0x1b074,0xffffffec(%ebp) + 12140: c7 45 e4 19 00 00 00 movl $0x19,0xffffffe4(%ebp) + 12147: e9 93 00 00 00 jmp 121df <_rh_call_control+0x2d3> + 1214c: 8b 5d 0c mov 0xc(%ebp),%ebx + 1214f: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 12152: 25 ff ff 00 00 and $0xffff,%eax + 12157: 50 push %eax + 12158: ff 75 e8 pushl 0xffffffe8(%ebp) + 1215b: ff 75 08 pushl 0x8(%ebp) + 1215e: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 12161: 25 ff ff 00 00 and $0xffff,%eax + 12166: 25 ff 00 00 00 and $0xff,%eax + 1216b: 50 push %eax + 1216c: e8 9c fc ff ff call 11e0d <_rh_string> + 12171: 83 c4 10 add $0x10,%esp + 12174: 89 43 30 mov %eax,0x30(%ebx) + 12177: eb 66 jmp 121df <_rh_call_control+0x2d3> + 12179: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 1217c: c6 00 00 movb $0x0,(%eax) + 1217f: eb 5e jmp 121df <_rh_call_control+0x2d3> + 12181: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 12184: c6 00 00 movb $0x0,(%eax) + 12187: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 1218a: 40 inc %eax + 1218b: c6 00 00 movb $0x0,(%eax) + 1218e: eb 4f jmp 121df <_rh_call_control+0x2d3> + 12190: 8b 5d 0c mov 0xc(%ebp),%ebx + 12193: 83 ec 08 sub $0x8,%esp + 12196: 8b 45 08 mov 0x8(%ebp),%eax + 12199: 8b 50 74 mov 0x74(%eax),%edx + 1219c: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 1219f: 25 ff ff 00 00 and $0xffff,%eax + 121a4: 50 push %eax + 121a5: ff 75 e8 pushl 0xffffffe8(%ebp) + 121a8: 66 8b 45 f2 mov 0xfffffff2(%ebp),%ax + 121ac: 25 ff ff 00 00 and $0xffff,%eax + 121b1: 50 push %eax + 121b2: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 121b5: 25 ff ff 00 00 and $0xffff,%eax + 121ba: 50 push %eax + 121bb: 66 8b 45 f6 mov 0xfffffff6(%ebp),%ax + 121bf: 25 ff ff 00 00 and $0xffff,%eax + 121c4: 50 push %eax + 121c5: ff 75 08 pushl 0x8(%ebp) + 121c8: 8b 42 38 mov 0x38(%edx),%eax + 121cb: ff d0 call *%eax + 121cd: 83 c4 20 add $0x20,%esp + 121d0: 89 43 1c mov %eax,0x1c(%ebx) + 121d3: eb 0a jmp 121df <_rh_call_control+0x2d3> + 121d5: 8b 45 0c mov 0xc(%ebp),%eax + 121d8: c7 40 1c e0 ff ff ff movl $0xffffffe0,0x1c(%eax) + 121df: 8b 45 0c mov 0xc(%ebp),%eax + 121e2: 83 78 1c 00 cmpl $0x0,0x1c(%eax) + 121e6: 74 0a je 121f2 <_rh_call_control+0x2e6> + 121e8: 8b 45 0c mov 0xc(%ebp),%eax + 121eb: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) + 121f2: 83 7d ec 00 cmpl $0x0,0xffffffec(%ebp) + 121f6: 74 31 je 12229 <_rh_call_control+0x31d> + 121f8: 8b 45 0c mov 0xc(%ebp),%eax + 121fb: 8b 40 2c mov 0x2c(%eax),%eax + 121fe: 3b 45 e4 cmp 0xffffffe4(%ebp),%eax + 12201: 7d 09 jge 1220c <_rh_call_control+0x300> + 12203: 8b 45 0c mov 0xc(%ebp),%eax + 12206: 8b 40 2c mov 0x2c(%eax),%eax + 12209: 89 45 e4 mov %eax,0xffffffe4(%ebp) + 1220c: 8b 55 0c mov 0xc(%ebp),%edx + 1220f: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 12212: 89 42 30 mov %eax,0x30(%edx) + 12215: 83 ec 04 sub $0x4,%esp + 12218: ff 75 e4 pushl 0xffffffe4(%ebp) + 1221b: ff 75 ec pushl 0xffffffec(%ebp) + 1221e: ff 75 e8 pushl 0xffffffe8(%ebp) + 12221: e8 4a 78 00 00 call 19a70 <_memcpy> + 12226: 83 c4 10 add $0x10,%esp + 12229: 83 ec 04 sub $0x4,%esp + 1222c: 6a 00 push $0x0 + 1222e: ff 75 0c pushl 0xc(%ebp) + 12231: ff 75 08 pushl 0x8(%ebp) + 12234: e8 5d 14 00 00 call 13696 <_usb_hcd_giveback_urb@12> + 12239: 83 c4 04 add $0x4,%esp + 1223c: b8 00 00 00 00 mov $0x0,%eax + 12241: 8b 5d fc mov 0xfffffffc(%ebp),%ebx + 12244: c9 leave + 12245: c3 ret + +00012246 <_rh_status_urb>: + 12246: 55 push %ebp + 12247: 89 e5 mov %esp,%ebp + 12249: 83 ec 18 sub $0x18,%esp + 1224c: 8b 45 0c mov 0xc(%ebp),%eax + 1224f: 8b 40 14 mov 0x14(%eax),%eax + 12252: 8b 80 ac 01 00 00 mov 0x1ac(%eax),%eax + 12258: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 1225b: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) + 1225f: 79 04 jns 12265 <_rh_status_urb+0x1f> + 12261: 83 45 f4 07 addl $0x7,0xfffffff4(%ebp) + 12265: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 12268: c1 f8 03 sar $0x3,%eax + 1226b: 40 inc %eax + 1226c: 89 45 fc mov %eax,0xfffffffc(%ebp) + 1226f: 8b 45 08 mov 0x8(%ebp),%eax + 12272: 83 78 58 00 cmpl $0x0,0x58(%eax) + 12276: 75 16 jne 1228e <_rh_status_urb+0x48> + 12278: 8b 45 0c mov 0xc(%ebp),%eax + 1227b: 83 78 1c 8d cmpl $0xffffff8d,0x1c(%eax) + 1227f: 75 0d jne 1228e <_rh_status_urb+0x48> + 12281: 8b 45 0c mov 0xc(%ebp),%eax + 12284: 8b 40 2c mov 0x2c(%eax),%eax + 12287: 3b 45 fc cmp 0xfffffffc(%ebp),%eax + 1228a: 7c 02 jl 1228e <_rh_status_urb+0x48> + 1228c: eb 09 jmp 12297 <_rh_status_urb+0x51> + 1228e: c7 45 f8 ea ff ff ff movl $0xffffffea,0xfffffff8(%ebp) + 12295: eb 55 jmp 122ec <_rh_status_urb+0xa6> + 12297: 83 ec 0c sub $0xc,%esp + 1229a: 8b 45 08 mov 0x8(%ebp),%eax + 1229d: 83 c0 54 add $0x54,%eax + 122a0: 50 push %eax + 122a1: e8 83 00 00 00 call 12329 <_init_timer> + 122a6: 83 c4 10 add $0x10,%esp + 122a9: 8b 45 08 mov 0x8(%ebp),%eax + 122ac: c7 40 54 5e 23 01 00 movl $0x1235e,0x54(%eax) + 122b3: 8b 55 08 mov 0x8(%ebp),%edx + 122b6: 8b 45 0c mov 0xc(%ebp),%eax + 122b9: 89 42 58 mov %eax,0x58(%edx) + 122bc: 8b 55 08 mov 0x8(%ebp),%edx + 122bf: a1 40 c2 01 00 mov 0x1c240,%eax + 122c4: 83 c0 19 add $0x19,%eax + 122c7: 89 42 5c mov %eax,0x5c(%edx) + 122ca: 83 ec 0c sub $0xc,%esp + 122cd: 8b 45 08 mov 0x8(%ebp),%eax + 122d0: 83 c0 54 add $0x54,%eax + 122d3: 50 push %eax + 122d4: e8 18 00 00 00 call 122f1 <_add_timer> + 122d9: 83 c4 10 add $0x10,%esp + 122dc: 8b 55 0c mov 0xc(%ebp),%edx + 122df: 8b 45 08 mov 0x8(%ebp),%eax + 122e2: 89 42 08 mov %eax,0x8(%edx) + 122e5: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 122ec: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 122ef: c9 leave + 122f0: c3 ret + +000122f1 <_add_timer>: + 122f1: 55 push %ebp + 122f2: 89 e5 mov %esp,%ebp + 122f4: 83 ec 04 sub $0x4,%esp + 122f7: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) + 122fe: 83 7d fc 13 cmpl $0x13,0xfffffffc(%ebp) + 12302: 7f 23 jg 12327 <_add_timer+0x36> + 12304: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 12307: 83 3c 85 60 c1 01 00 cmpl $0x0,0x1c160(,%eax,4) + 1230e: 00 + 1230f: 75 0f jne 12320 <_add_timer+0x2f> + 12311: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 12314: 8b 45 08 mov 0x8(%ebp),%eax + 12317: 89 04 95 60 c1 01 00 mov %eax,0x1c160(,%edx,4) + 1231e: eb 07 jmp 12327 <_add_timer+0x36> + 12320: 8d 45 fc lea 0xfffffffc(%ebp),%eax + 12323: ff 00 incl (%eax) + 12325: eb d7 jmp 122fe <_add_timer+0xd> + 12327: c9 leave + 12328: c3 ret + +00012329 <_init_timer>: + 12329: 55 push %ebp + 1232a: 89 e5 mov %esp,%ebp + 1232c: 8b 55 08 mov 0x8(%ebp),%edx + 1232f: 83 c2 0c add $0xc,%edx + 12332: 8b 45 08 mov 0x8(%ebp),%eax + 12335: 83 c0 0c add $0xc,%eax + 12338: 89 02 mov %eax,(%edx) + 1233a: 8b 55 08 mov 0x8(%ebp),%edx + 1233d: 83 c2 0c add $0xc,%edx + 12340: 8b 45 08 mov 0x8(%ebp),%eax + 12343: 83 c0 0c add $0xc,%eax + 12346: 89 42 04 mov %eax,0x4(%edx) + 12349: 8b 45 08 mov 0x8(%ebp),%eax + 1234c: c7 00 00 00 00 00 movl $0x0,(%eax) + 12352: 8b 45 08 mov 0x8(%ebp),%eax + 12355: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) + 1235c: 5d pop %ebp + 1235d: c3 ret + +0001235e <_rh_report_status>: + 1235e: 55 push %ebp + 1235f: 89 e5 mov %esp,%ebp + 12361: 83 ec 18 sub $0x18,%esp + 12364: 8b 45 08 mov 0x8(%ebp),%eax + 12367: 89 45 fc mov %eax,0xfffffffc(%ebp) + 1236a: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 1236d: c7 00 01 00 00 00 movl $0x1,(%eax) + 12373: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 12376: 83 78 14 00 cmpl $0x0,0x14(%eax) + 1237a: 0f 84 c6 00 00 00 je 12446 <_rh_report_status+0xe8> + 12380: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 12383: 83 78 1c 8d cmpl $0xffffff8d,0x1c(%eax) + 12387: 0f 85 b9 00 00 00 jne 12446 <_rh_report_status+0xe8> + 1238d: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 12390: 8b 40 14 mov 0x14(%eax),%eax + 12393: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 12399: 8b 40 30 mov 0x30(%eax),%eax + 1239c: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 1239f: 85 c0 test %eax,%eax + 123a1: 0f 84 9f 00 00 00 je 12446 <_rh_report_status+0xe8> + 123a7: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 123aa: 8b 80 e0 00 00 00 mov 0xe0(%eax),%eax + 123b0: 83 e0 01 and $0x1,%eax + 123b3: 85 c0 test %eax,%eax + 123b5: 75 05 jne 123bc <_rh_report_status+0x5e> + 123b7: e9 8a 00 00 00 jmp 12446 <_rh_report_status+0xe8> + 123bc: 83 ec 08 sub $0x8,%esp + 123bf: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 123c2: 8b 50 74 mov 0x74(%eax),%edx + 123c5: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 123c8: ff 70 24 pushl 0x24(%eax) + 123cb: ff 75 f8 pushl 0xfffffff8(%ebp) + 123ce: 8b 42 34 mov 0x34(%edx),%eax + 123d1: ff d0 call *%eax + 123d3: 83 c4 10 add $0x10,%esp + 123d6: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 123d9: c7 05 00 c0 01 00 01 movl $0x1,0x1c000 + 123e0: 00 00 00 + 123e3: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) + 123e7: 7e 29 jle 12412 <_rh_report_status+0xb4> + 123e9: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 123ec: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax) + 123f3: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 123f6: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 123f9: 89 42 30 mov %eax,0x30(%edx) + 123fc: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 123ff: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) + 12406: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 12409: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) + 12410: eb 1b jmp 1242d <_rh_report_status+0xcf> + 12412: 83 ec 08 sub $0x8,%esp + 12415: a1 40 c2 01 00 mov 0x1c240,%eax + 1241a: 83 c0 19 add $0x19,%eax + 1241d: 50 push %eax + 1241e: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 12421: 83 c0 54 add $0x54,%eax + 12424: 50 push %eax + 12425: e8 1e 00 00 00 call 12448 <_mod_timer> + 1242a: 83 c4 10 add $0x10,%esp + 1242d: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) + 12431: 7e 13 jle 12446 <_rh_report_status+0xe8> + 12433: 83 ec 04 sub $0x4,%esp + 12436: 6a 00 push $0x0 + 12438: ff 75 fc pushl 0xfffffffc(%ebp) + 1243b: ff 75 f8 pushl 0xfffffff8(%ebp) + 1243e: e8 53 12 00 00 call 13696 <_usb_hcd_giveback_urb@12> + 12443: 83 c4 04 add $0x4,%esp + 12446: c9 leave + 12447: c3 ret + +00012448 <_mod_timer>: + 12448: 55 push %ebp + 12449: 89 e5 mov %esp,%ebp + 1244b: 83 ec 08 sub $0x8,%esp + 1244e: 83 ec 0c sub $0xc,%esp + 12451: ff 75 08 pushl 0x8(%ebp) + 12454: e8 19 00 00 00 call 12472 <_del_timer> + 12459: 83 c4 10 add $0x10,%esp + 1245c: 8b 55 08 mov 0x8(%ebp),%edx + 1245f: 8b 45 0c mov 0xc(%ebp),%eax + 12462: 89 42 08 mov %eax,0x8(%edx) + 12465: ff 75 08 pushl 0x8(%ebp) + 12468: e8 84 fe ff ff call 122f1 <_add_timer> + 1246d: 83 c4 04 add $0x4,%esp + 12470: c9 leave + 12471: c3 ret + +00012472 <_del_timer>: + 12472: 55 push %ebp + 12473: 89 e5 mov %esp,%ebp + 12475: 83 ec 04 sub $0x4,%esp + 12478: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) + 1247f: 83 7d fc 13 cmpl $0x13,0xfffffffc(%ebp) + 12483: 7f 26 jg 124ab <_del_timer+0x39> + 12485: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 12488: 8b 04 85 60 c1 01 00 mov 0x1c160(,%eax,4),%eax + 1248f: 3b 45 08 cmp 0x8(%ebp),%eax + 12492: 75 10 jne 124a4 <_del_timer+0x32> + 12494: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 12497: c7 04 85 60 c1 01 00 movl $0x0,0x1c160(,%eax,4) + 1249e: 00 00 00 00 + 124a2: eb 07 jmp 124ab <_del_timer+0x39> + 124a4: 8d 45 fc lea 0xfffffffc(%ebp),%eax + 124a7: ff 00 incl (%eax) + 124a9: eb d4 jmp 1247f <_del_timer+0xd> + 124ab: c9 leave + 124ac: c3 ret + +000124ad <_rh_urb_enqueue>: + 124ad: 55 push %ebp + 124ae: 89 e5 mov %esp,%ebp + 124b0: 83 ec 18 sub $0x18,%esp + 124b3: 8b 45 0c mov 0xc(%ebp),%eax + 124b6: 8b 40 18 mov 0x18(%eax),%eax + 124b9: c1 e8 1e shr $0x1e,%eax + 124bc: 83 e0 03 and $0x3,%eax + 124bf: 83 f8 01 cmp $0x1,%eax + 124c2: 75 23 jne 124e7 <_rh_urb_enqueue+0x3a> + 124c4: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 124cb: 83 ec 08 sub $0x8,%esp + 124ce: ff 75 0c pushl 0xc(%ebp) + 124d1: ff 75 08 pushl 0x8(%ebp) + 124d4: e8 6d fd ff ff call 12246 <_rh_status_urb> + 124d9: 83 c4 10 add $0x10,%esp + 124dc: 89 45 fc mov %eax,0xfffffffc(%ebp) + 124df: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 124e2: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 124e5: eb 2e jmp 12515 <_rh_urb_enqueue+0x68> + 124e7: 8b 45 0c mov 0xc(%ebp),%eax + 124ea: 8b 40 18 mov 0x18(%eax),%eax + 124ed: c1 e8 1e shr $0x1e,%eax + 124f0: 83 e0 03 and $0x3,%eax + 124f3: 83 f8 02 cmp $0x2,%eax + 124f6: 75 16 jne 1250e <_rh_urb_enqueue+0x61> + 124f8: 83 ec 08 sub $0x8,%esp + 124fb: ff 75 0c pushl 0xc(%ebp) + 124fe: ff 75 08 pushl 0x8(%ebp) + 12501: e8 06 fa ff ff call 11f0c <_rh_call_control> + 12506: 83 c4 10 add $0x10,%esp + 12509: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 1250c: eb 07 jmp 12515 <_rh_urb_enqueue+0x68> + 1250e: c7 45 f4 ea ff ff ff movl $0xffffffea,0xfffffff4(%ebp) + 12515: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 12518: c9 leave + 12519: c3 ret + +0001251a <_usb_rh_status_dequeue>: + 1251a: 55 push %ebp + 1251b: 89 e5 mov %esp,%ebp + 1251d: 83 ec 08 sub $0x8,%esp + 12520: 83 ec 0c sub $0xc,%esp + 12523: 8b 45 08 mov 0x8(%ebp),%eax + 12526: 83 c0 54 add $0x54,%eax + 12529: 50 push %eax + 1252a: e8 2c 00 00 00 call 1255b <_del_timer_sync> + 1252f: 83 c4 10 add $0x10,%esp + 12532: 8b 45 08 mov 0x8(%ebp),%eax + 12535: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax) + 1253c: 8b 45 0c mov 0xc(%ebp),%eax + 1253f: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) + 12546: 83 ec 04 sub $0x4,%esp + 12549: 6a 00 push $0x0 + 1254b: ff 75 0c pushl 0xc(%ebp) + 1254e: ff 75 08 pushl 0x8(%ebp) + 12551: e8 40 11 00 00 call 13696 <_usb_hcd_giveback_urb@12> + 12556: 83 c4 04 add $0x4,%esp + 12559: c9 leave + 1255a: c3 ret + +0001255b <_del_timer_sync>: + 1255b: 55 push %ebp + 1255c: 89 e5 mov %esp,%ebp + 1255e: 83 ec 04 sub $0x4,%esp + 12561: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) + 12568: 83 7d fc 13 cmpl $0x13,0xfffffffc(%ebp) + 1256c: 7f 26 jg 12594 <_del_timer_sync+0x39> + 1256e: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 12571: 8b 04 85 60 c1 01 00 mov 0x1c160(,%eax,4),%eax + 12578: 3b 45 08 cmp 0x8(%ebp),%eax + 1257b: 75 10 jne 1258d <_del_timer_sync+0x32> + 1257d: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 12580: c7 04 85 60 c1 01 00 movl $0x0,0x1c160(,%eax,4) + 12587: 00 00 00 00 + 1258b: eb 07 jmp 12594 <_del_timer_sync+0x39> + 1258d: 8d 45 fc lea 0xfffffffc(%ebp),%eax + 12590: ff 00 incl (%eax) + 12592: eb d4 jmp 12568 <_del_timer_sync+0xd> + 12594: c9 leave + 12595: c3 ret + +00012596 <_usb_bus_get>: + 12596: 55 push %ebp + 12597: 89 e5 mov %esp,%ebp + 12599: 8b 45 08 mov 0x8(%ebp),%eax + 1259c: 83 c0 48 add $0x48,%eax + 1259f: 8b 55 08 mov 0x8(%ebp),%edx + 125a2: 83 c2 48 add $0x48,%edx + 125a5: 8b 12 mov (%edx),%edx + 125a7: 42 inc %edx + 125a8: 89 10 mov %edx,(%eax) + 125aa: 5d pop %ebp + 125ab: c3 ret + +000125ac <_usb_bus_put>: + 125ac: 55 push %ebp + 125ad: 89 e5 mov %esp,%ebp + 125af: 83 ec 08 sub $0x8,%esp + 125b2: 8b 55 08 mov 0x8(%ebp),%edx + 125b5: 83 c2 48 add $0x48,%edx + 125b8: 8b 45 08 mov 0x8(%ebp),%eax + 125bb: 83 c0 48 add $0x48,%eax + 125be: 8b 00 mov (%eax),%eax + 125c0: 48 dec %eax + 125c1: 89 02 mov %eax,(%edx) + 125c3: 8b 45 08 mov 0x8(%ebp),%eax + 125c6: 83 c0 48 add $0x48,%eax + 125c9: 83 38 00 cmpl $0x0,(%eax) + 125cc: 75 0e jne 125dc <_usb_bus_put+0x30> + 125ce: 83 ec 0c sub $0xc,%esp + 125d1: ff 75 08 pushl 0x8(%ebp) + 125d4: e8 67 74 00 00 call 19a40 <_ExFreePool@4> + 125d9: 83 c4 0c add $0xc,%esp + 125dc: c9 leave + 125dd: c3 ret + +000125de <_usb_bus_init@4>: + 125de: 55 push %ebp + 125df: 89 e5 mov %esp,%ebp + 125e1: 83 ec 08 sub $0x8,%esp + 125e4: 83 ec 04 sub $0x4,%esp + 125e7: 6a 10 push $0x10 + 125e9: 6a 00 push $0x0 + 125eb: 8b 45 08 mov 0x8(%ebp),%eax + 125ee: 83 c0 10 add $0x10,%eax + 125f1: 50 push %eax + 125f2: e8 59 74 00 00 call 19a50 <_memset> + 125f7: 83 c4 10 add $0x10,%esp + 125fa: 8b 45 08 mov 0x8(%ebp),%eax + 125fd: c7 40 0c 01 00 00 00 movl $0x1,0xc(%eax) + 12604: 8b 45 08 mov 0x8(%ebp),%eax + 12607: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) + 1260e: 8b 45 08 mov 0x8(%ebp),%eax + 12611: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) + 12618: 8b 45 08 mov 0x8(%ebp),%eax + 1261b: c7 40 04 ff ff ff ff movl $0xffffffff,0x4(%eax) + 12622: 8b 45 08 mov 0x8(%ebp),%eax + 12625: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) + 1262c: 8b 45 08 mov 0x8(%ebp),%eax + 1262f: c7 40 38 00 00 00 00 movl $0x0,0x38(%eax) + 12636: 8b 45 08 mov 0x8(%ebp),%eax + 12639: c7 40 3c 00 00 00 00 movl $0x0,0x3c(%eax) + 12640: 8b 55 08 mov 0x8(%ebp),%edx + 12643: 83 c2 28 add $0x28,%edx + 12646: 8b 45 08 mov 0x8(%ebp),%eax + 12649: 83 c0 28 add $0x28,%eax + 1264c: 89 02 mov %eax,(%edx) + 1264e: 8b 55 08 mov 0x8(%ebp),%edx + 12651: 83 c2 28 add $0x28,%edx + 12654: 8b 45 08 mov 0x8(%ebp),%eax + 12657: 83 c0 28 add $0x28,%eax + 1265a: 89 42 04 mov %eax,0x4(%edx) + 1265d: 8b 45 08 mov 0x8(%ebp),%eax + 12660: 83 c0 48 add $0x48,%eax + 12663: c7 00 01 00 00 00 movl $0x1,(%eax) + 12669: c9 leave + 1266a: c2 04 00 ret $0x4 + +0001266d <_usb_alloc_bus@4>: + 1266d: 55 push %ebp + 1266e: 89 e5 mov %esp,%ebp + 12670: 83 ec 08 sub $0x8,%esp + 12673: 83 ec 08 sub $0x8,%esp + 12676: 6a 4c push $0x4c + 12678: 6a 01 push $0x1 + 1267a: e8 b1 73 00 00 call 19a30 <_ExAllocatePool@8> + 1267f: 83 c4 08 add $0x8,%esp + 12682: 89 45 fc mov %eax,0xfffffffc(%ebp) + 12685: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) + 12689: 75 09 jne 12694 <_usb_alloc_bus@4+0x27> + 1268b: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 12692: eb 1d jmp 126b1 <_usb_alloc_bus@4+0x44> + 12694: 83 ec 0c sub $0xc,%esp + 12697: ff 75 fc pushl 0xfffffffc(%ebp) + 1269a: e8 3f ff ff ff call 125de <_usb_bus_init@4> + 1269f: 83 c4 0c add $0xc,%esp + 126a2: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 126a5: 8b 55 08 mov 0x8(%ebp),%edx + 126a8: 89 50 20 mov %edx,0x20(%eax) + 126ab: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 126ae: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 126b1: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 126b4: c9 leave + 126b5: c2 04 00 ret $0x4 + +000126b8 <_usb_free_bus@4>: + 126b8: 55 push %ebp + 126b9: 89 e5 mov %esp,%ebp + 126bb: 83 ec 08 sub $0x8,%esp + 126be: 83 7d 08 00 cmpl $0x0,0x8(%ebp) + 126c2: 75 02 jne 126c6 <_usb_free_bus@4+0xe> + 126c4: eb 0e jmp 126d4 <_usb_free_bus@4+0x1c> + 126c6: 83 ec 0c sub $0xc,%esp + 126c9: ff 75 08 pushl 0x8(%ebp) + 126cc: e8 db fe ff ff call 125ac <_usb_bus_put> + 126d1: 83 c4 10 add $0x10,%esp + 126d4: c9 leave + 126d5: c2 04 00 ret $0x4 + +000126d8 <_usb_register_bus@4>: + 126d8: 55 push %ebp + 126d9: 89 e5 mov %esp,%ebp + 126db: 83 ec 08 sub $0x8,%esp + 126de: 83 ec 04 sub $0x4,%esp + 126e1: 6a 01 push $0x1 + 126e3: 6a 40 push $0x40 + 126e5: 68 10 c0 01 00 push $0x1c010 + 126ea: e8 b4 00 00 00 call 127a3 <_find_next_zero_bit> + 126ef: 83 c4 10 add $0x10,%esp + 126f2: 89 45 fc mov %eax,0xfffffffc(%ebp) + 126f5: 83 7d fc 3f cmpl $0x3f,0xfffffffc(%ebp) + 126f9: 7f 1c jg 12717 <_usb_register_bus@4+0x3f> + 126fb: 83 ec 08 sub $0x8,%esp + 126fe: 68 10 c0 01 00 push $0x1c010 + 12703: ff 75 fc pushl 0xfffffffc(%ebp) + 12706: e8 8a 00 00 00 call 12795 <_set_bit> + 1270b: 83 c4 10 add $0x10,%esp + 1270e: 8b 55 08 mov 0x8(%ebp),%edx + 12711: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 12714: 89 42 04 mov %eax,0x4(%edx) + 12717: ff 75 08 pushl 0x8(%ebp) + 1271a: e8 77 fe ff ff call 12596 <_usb_bus_get> + 1271f: 83 c4 04 add $0x4,%esp + 12722: 83 ec 08 sub $0x8,%esp + 12725: 68 00 a0 01 00 push $0x1a000 + 1272a: 8b 45 08 mov 0x8(%ebp),%eax + 1272d: 83 c0 28 add $0x28,%eax + 12730: 50 push %eax + 12731: e8 1a 00 00 00 call 12750 <_list_add> + 12736: 83 c4 10 add $0x10,%esp + 12739: 83 ec 0c sub $0xc,%esp + 1273c: ff 75 08 pushl 0x8(%ebp) + 1273f: e8 07 00 00 00 call 1274b <_usbfs_add_bus> + 12744: 83 c4 10 add $0x10,%esp + 12747: c9 leave + 12748: c2 04 00 ret $0x4 + +0001274b <_usbfs_add_bus>: + 1274b: 55 push %ebp + 1274c: 89 e5 mov %esp,%ebp + 1274e: 5d pop %ebp + 1274f: c3 ret + +00012750 <_list_add>: + 12750: 55 push %ebp + 12751: 89 e5 mov %esp,%ebp + 12753: 83 ec 08 sub $0x8,%esp + 12756: 83 ec 04 sub $0x4,%esp + 12759: 8b 45 0c mov 0xc(%ebp),%eax + 1275c: ff 30 pushl (%eax) + 1275e: ff 75 0c pushl 0xc(%ebp) + 12761: ff 75 08 pushl 0x8(%ebp) + 12764: e8 05 00 00 00 call 1276e <___list_add> + 12769: 83 c4 10 add $0x10,%esp + 1276c: c9 leave + 1276d: c3 ret + +0001276e <___list_add>: + 1276e: 55 push %ebp + 1276f: 89 e5 mov %esp,%ebp + 12771: 8b 55 10 mov 0x10(%ebp),%edx + 12774: 8b 45 08 mov 0x8(%ebp),%eax + 12777: 89 42 04 mov %eax,0x4(%edx) + 1277a: 8b 55 08 mov 0x8(%ebp),%edx + 1277d: 8b 45 10 mov 0x10(%ebp),%eax + 12780: 89 02 mov %eax,(%edx) + 12782: 8b 55 08 mov 0x8(%ebp),%edx + 12785: 8b 45 0c mov 0xc(%ebp),%eax + 12788: 89 42 04 mov %eax,0x4(%edx) + 1278b: 8b 55 0c mov 0xc(%ebp),%edx + 1278e: 8b 45 08 mov 0x8(%ebp),%eax + 12791: 89 02 mov %eax,(%edx) + 12793: 5d pop %ebp + 12794: c3 ret + +00012795 <_set_bit>: + 12795: 55 push %ebp + 12796: 89 e5 mov %esp,%ebp + 12798: 8b 55 0c mov 0xc(%ebp),%edx + 1279b: 8b 45 08 mov 0x8(%ebp),%eax + 1279e: 0f ab 02 bts %eax,(%edx) + 127a1: 5d pop %ebp + 127a2: c3 ret + +000127a3 <_find_next_zero_bit>: + 127a3: 55 push %ebp + 127a4: 89 e5 mov %esp,%ebp + 127a6: 83 ec 18 sub $0x18,%esp + 127a9: 8b 45 10 mov 0x10(%ebp),%eax + 127ac: c1 f8 05 sar $0x5,%eax + 127af: c1 e0 02 shl $0x2,%eax + 127b2: 03 45 08 add 0x8(%ebp),%eax + 127b5: 89 45 fc mov %eax,0xfffffffc(%ebp) + 127b8: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 127bf: 8b 45 10 mov 0x10(%ebp),%eax + 127c2: 83 e0 1f and $0x1f,%eax + 127c5: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 127c8: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) + 127cc: 74 42 je 12810 <_find_next_zero_bit+0x6d> + 127ce: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 127d1: 8b 4d f4 mov 0xfffffff4(%ebp),%ecx + 127d4: 8b 00 mov (%eax),%eax + 127d6: d3 e8 shr %cl,%eax + 127d8: f7 d0 not %eax + 127da: 0f bc c0 bsf %eax,%eax + 127dd: 75 05 jne 127e4 <_find_next_zero_bit+0x41> + 127df: b8 20 00 00 00 mov $0x20,%eax + 127e4: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 127e7: b8 20 00 00 00 mov $0x20,%eax + 127ec: 2b 45 f4 sub 0xfffffff4(%ebp),%eax + 127ef: 3b 45 f8 cmp 0xfffffff8(%ebp),%eax + 127f2: 7e 0b jle 127ff <_find_next_zero_bit+0x5c> + 127f4: 8b 45 10 mov 0x10(%ebp),%eax + 127f7: 03 45 f8 add 0xfffffff8(%ebp),%eax + 127fa: 89 45 ec mov %eax,0xffffffec(%ebp) + 127fd: eb 43 jmp 12842 <_find_next_zero_bit+0x9f> + 127ff: b8 20 00 00 00 mov $0x20,%eax + 12804: 2b 45 f4 sub 0xfffffff4(%ebp),%eax + 12807: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 1280a: 8d 45 fc lea 0xfffffffc(%ebp),%eax + 1280d: 83 00 04 addl $0x4,(%eax) + 12810: 83 ec 08 sub $0x8,%esp + 12813: 8b 55 08 mov 0x8(%ebp),%edx + 12816: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 12819: 29 d0 sub %edx,%eax + 1281b: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx + 12822: 8b 45 0c mov 0xc(%ebp),%eax + 12825: 29 d0 sub %edx,%eax + 12827: 50 push %eax + 12828: ff 75 fc pushl 0xfffffffc(%ebp) + 1282b: e8 17 00 00 00 call 12847 <_find_first_zero_bit> + 12830: 83 c4 10 add $0x10,%esp + 12833: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 12836: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 12839: 03 45 10 add 0x10(%ebp),%eax + 1283c: 03 45 f0 add 0xfffffff0(%ebp),%eax + 1283f: 89 45 ec mov %eax,0xffffffec(%ebp) + 12842: 8b 45 ec mov 0xffffffec(%ebp),%eax + 12845: c9 leave + 12846: c3 ret + +00012847 <_find_first_zero_bit>: + 12847: 55 push %ebp + 12848: 89 e5 mov %esp,%ebp + 1284a: 57 push %edi + 1284b: 53 push %ebx + 1284c: 83 ec 14 sub $0x14,%esp + 1284f: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) + 12853: 75 09 jne 1285e <_find_first_zero_bit+0x17> + 12855: c7 45 e4 00 00 00 00 movl $0x0,0xffffffe4(%ebp) + 1285c: eb 48 jmp 128a6 <_find_first_zero_bit+0x5f> + 1285e: 8b 45 0c mov 0xc(%ebp),%eax + 12861: 83 c0 1f add $0x1f,%eax + 12864: 89 c1 mov %eax,%ecx + 12866: c1 e9 05 shr $0x5,%ecx + 12869: 8b 7d 08 mov 0x8(%ebp),%edi + 1286c: 8b 5d 08 mov 0x8(%ebp),%ebx + 1286f: b8 ff ff ff ff mov $0xffffffff,%eax + 12874: 31 d2 xor %edx,%edx + 12876: f3 af repz scas %es:(%edi),%eax + 12878: 74 09 je 12883 <_find_first_zero_bit+0x3c> + 1287a: 33 47 fc xor 0xfffffffc(%edi),%eax + 1287d: 83 ef 04 sub $0x4,%edi + 12880: 0f bc d0 bsf %eax,%edx + 12883: 29 df sub %ebx,%edi + 12885: c1 e7 03 shl $0x3,%edi + 12888: 01 fa add %edi,%edx + 1288a: 89 c3 mov %eax,%ebx + 1288c: 89 d0 mov %edx,%eax + 1288e: 89 45 e8 mov %eax,0xffffffe8(%ebp) + 12891: 89 c8 mov %ecx,%eax + 12893: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 12896: 89 f8 mov %edi,%eax + 12898: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 1289b: 89 d8 mov %ebx,%eax + 1289d: 89 45 ec mov %eax,0xffffffec(%ebp) + 128a0: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 128a3: 89 45 e4 mov %eax,0xffffffe4(%ebp) + 128a6: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 128a9: 83 c4 14 add $0x14,%esp + 128ac: 5b pop %ebx + 128ad: 5f pop %edi + 128ae: 5d pop %ebp + 128af: c3 ret + +000128b0 <_usb_deregister_bus@4>: + 128b0: 55 push %ebp + 128b1: 89 e5 mov %esp,%ebp + 128b3: 83 ec 08 sub $0x8,%esp + 128b6: 83 ec 0c sub $0xc,%esp + 128b9: 8b 45 08 mov 0x8(%ebp),%eax + 128bc: 83 c0 28 add $0x28,%eax + 128bf: 50 push %eax + 128c0: e8 4c 00 00 00 call 12911 <_list_del> + 128c5: 83 c4 10 add $0x10,%esp + 128c8: 83 ec 0c sub $0xc,%esp + 128cb: ff 75 08 pushl 0x8(%ebp) + 128ce: e8 39 00 00 00 call 1290c <_usbfs_remove_bus> + 128d3: 83 c4 10 add $0x10,%esp + 128d6: 83 ec 08 sub $0x8,%esp + 128d9: 68 10 c0 01 00 push $0x1c010 + 128de: 8b 45 08 mov 0x8(%ebp),%eax + 128e1: ff 70 04 pushl 0x4(%eax) + 128e4: e8 15 00 00 00 call 128fe <_clear_bit> + 128e9: 83 c4 10 add $0x10,%esp + 128ec: 83 ec 0c sub $0xc,%esp + 128ef: ff 75 08 pushl 0x8(%ebp) + 128f2: e8 b5 fc ff ff call 125ac <_usb_bus_put> + 128f7: 83 c4 10 add $0x10,%esp + 128fa: c9 leave + 128fb: c2 04 00 ret $0x4 + +000128fe <_clear_bit>: + 128fe: 55 push %ebp + 128ff: 89 e5 mov %esp,%ebp + 12901: 8b 55 0c mov 0xc(%ebp),%edx + 12904: 8b 45 08 mov 0x8(%ebp),%eax + 12907: 0f b3 02 btr %eax,(%edx) + 1290a: 5d pop %ebp + 1290b: c3 ret + +0001290c <_usbfs_remove_bus>: + 1290c: 55 push %ebp + 1290d: 89 e5 mov %esp,%ebp + 1290f: 5d pop %ebp + 12910: c3 ret + +00012911 <_list_del>: + 12911: 55 push %ebp + 12912: 89 e5 mov %esp,%ebp + 12914: 83 ec 08 sub $0x8,%esp + 12917: 83 ec 08 sub $0x8,%esp + 1291a: 8b 45 08 mov 0x8(%ebp),%eax + 1291d: ff 30 pushl (%eax) + 1291f: 8b 45 08 mov 0x8(%ebp),%eax + 12922: ff 70 04 pushl 0x4(%eax) + 12925: e8 18 00 00 00 call 12942 <___list_del> + 1292a: 83 c4 10 add $0x10,%esp + 1292d: 8b 45 08 mov 0x8(%ebp),%eax + 12930: c7 00 00 00 00 00 movl $0x0,(%eax) + 12936: 8b 45 08 mov 0x8(%ebp),%eax + 12939: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) + 12940: c9 leave + 12941: c3 ret + +00012942 <___list_del>: + 12942: 55 push %ebp + 12943: 89 e5 mov %esp,%ebp + 12945: 8b 55 0c mov 0xc(%ebp),%edx + 12948: 8b 45 08 mov 0x8(%ebp),%eax + 1294b: 89 42 04 mov %eax,0x4(%edx) + 1294e: 8b 55 08 mov 0x8(%ebp),%edx + 12951: 8b 45 0c mov 0xc(%ebp),%eax + 12954: 89 02 mov %eax,(%edx) + 12956: 5d pop %ebp + 12957: c3 ret + +00012958 <_usb_register_root_hub@8>: + 12958: 55 push %ebp + 12959: 89 e5 mov %esp,%ebp + 1295b: 83 ec 08 sub $0x8,%esp + 1295e: 83 ec 04 sub $0x4,%esp + 12961: 8b 45 08 mov 0x8(%ebp),%eax + 12964: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 1296a: ff 70 04 pushl 0x4(%eax) + 1296d: 68 b9 b0 01 00 push $0x1b0b9 + 12972: 8b 45 08 mov 0x8(%ebp),%eax + 12975: 05 48 01 00 00 add $0x148,%eax + 1297a: 50 push %eax + 1297b: e8 10 71 00 00 call 19a90 <_sprintf> + 12980: 83 c4 10 add $0x10,%esp + 12983: 8b 45 08 mov 0x8(%ebp),%eax + 12986: c7 40 14 03 00 00 00 movl $0x3,0x14(%eax) + 1298d: 83 ec 08 sub $0x8,%esp + 12990: ff 75 0c pushl 0xc(%ebp) + 12993: ff 75 08 pushl 0x8(%ebp) + 12996: e8 f8 41 00 00 call 16b93 <_usb_new_device> + 1299b: 83 c4 10 add $0x10,%esp + 1299e: 89 45 fc mov %eax,0xfffffffc(%ebp) + 129a1: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 129a4: c9 leave + 129a5: c2 08 00 ret $0x8 + +000129a8 <_usb_calc_bus_time@16>: + 129a8: 55 push %ebp + 129a9: 89 e5 mov %esp,%ebp + 129ab: 83 ec 14 sub $0x14,%esp + 129ae: 8b 45 08 mov 0x8(%ebp),%eax + 129b1: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 129b4: 83 7d f0 02 cmpl $0x2,0xfffffff0(%ebp) + 129b8: 0f 84 21 01 00 00 je 12adf <_usb_calc_bus_time@16+0x137> + 129be: 83 7d f0 02 cmpl $0x2,0xfffffff0(%ebp) + 129c2: 7f 0b jg 129cf <_usb_calc_bus_time@16+0x27> + 129c4: 83 7d f0 01 cmpl $0x1,0xfffffff0(%ebp) + 129c8: 74 14 je 129de <_usb_calc_bus_time@16+0x36> + 129ca: e9 e4 02 00 00 jmp 12cb3 <_usb_calc_bus_time@16+0x30b> + 129cf: 83 7d f0 03 cmpl $0x3,0xfffffff0(%ebp) + 129d3: 0f 84 12 02 00 00 je 12beb <_usb_calc_bus_time@16+0x243> + 129d9: e9 d5 02 00 00 jmp 12cb3 <_usb_calc_bus_time@16+0x30b> + 129de: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) + 129e2: 74 76 je 12a5a <_usb_calc_bus_time@16+0xb2> + 129e4: 8b 55 14 mov 0x14(%ebp),%edx + 129e7: 89 d0 mov %edx,%eax + 129e9: c1 e0 03 shl $0x3,%eax + 129ec: 29 d0 sub %edx,%eax + 129ee: c1 e0 03 shl $0x3,%eax + 129f1: 89 45 ec mov %eax,0xffffffec(%ebp) + 129f4: b8 ab aa aa 2a mov $0x2aaaaaab,%eax + 129f9: f7 6d ec imull 0xffffffec(%ebp) + 129fc: 89 d1 mov %edx,%ecx + 129fe: 8b 45 ec mov 0xffffffec(%ebp),%eax + 12a01: c1 f8 1f sar $0x1f,%eax + 12a04: 89 ca mov %ecx,%edx + 12a06: 29 c2 sub %eax,%edx + 12a08: 89 d0 mov %edx,%eax + 12a0a: c1 e0 02 shl $0x2,%eax + 12a0d: 01 d0 add %edx,%eax + 12a0f: c1 e0 03 shl $0x3,%eax + 12a12: 01 d0 add %edx,%eax + 12a14: c1 e0 02 shl $0x2,%eax + 12a17: 01 d0 add %edx,%eax + 12a19: c1 e0 03 shl $0x3,%eax + 12a1c: 01 d0 add %edx,%eax + 12a1e: 01 c0 add %eax,%eax + 12a20: 01 d0 add %edx,%eax + 12a22: c1 e0 02 shl $0x2,%eax + 12a25: 01 d0 add %edx,%eax + 12a27: c1 e0 05 shl $0x5,%eax + 12a2a: 29 d0 sub %edx,%eax + 12a2c: 01 c0 add %eax,%eax + 12a2e: 8d 88 0d 02 20 00 lea 0x20020d(%eax),%ecx + 12a34: b8 d3 4d 62 10 mov $0x10624dd3,%eax + 12a39: f7 e9 imul %ecx + 12a3b: c1 fa 06 sar $0x6,%edx + 12a3e: 89 c8 mov %ecx,%eax + 12a40: c1 f8 1f sar $0x1f,%eax + 12a43: 29 c2 sub %eax,%edx + 12a45: 89 d0 mov %edx,%eax + 12a47: 89 45 fc mov %eax,0xfffffffc(%ebp) + 12a4a: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 12a4d: 05 be 00 01 00 add $0x100be,%eax + 12a52: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 12a55: e9 60 02 00 00 jmp 12cba <_usb_calc_bus_time@16+0x312> + 12a5a: 8b 55 14 mov 0x14(%ebp),%edx + 12a5d: 89 d0 mov %edx,%eax + 12a5f: c1 e0 03 shl $0x3,%eax + 12a62: 29 d0 sub %edx,%eax + 12a64: c1 e0 03 shl $0x3,%eax + 12a67: 89 45 ec mov %eax,0xffffffec(%ebp) + 12a6a: b8 ab aa aa 2a mov $0x2aaaaaab,%eax + 12a6f: f7 6d ec imull 0xffffffec(%ebp) + 12a72: 89 d1 mov %edx,%ecx + 12a74: 8b 45 ec mov 0xffffffec(%ebp),%eax + 12a77: c1 f8 1f sar $0x1f,%eax + 12a7a: 29 c1 sub %eax,%ecx + 12a7c: 89 c8 mov %ecx,%eax + 12a7e: c1 e0 03 shl $0x3,%eax + 12a81: 01 c8 add %ecx,%eax + 12a83: c1 e0 02 shl $0x2,%eax + 12a86: 01 c8 add %ecx,%eax + 12a88: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx + 12a8f: 01 d0 add %edx,%eax + 12a91: 01 c0 add %eax,%eax + 12a93: 01 c8 add %ecx,%eax + 12a95: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx + 12a9c: 01 d0 add %edx,%eax + 12a9e: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx + 12aa5: 01 d0 add %edx,%eax + 12aa7: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx + 12aae: 01 d0 add %edx,%eax + 12ab0: c1 e0 03 shl $0x3,%eax + 12ab3: 8d 88 f4 8c 1f 00 lea 0x1f8cf4(%eax),%ecx + 12ab9: b8 d3 4d 62 10 mov $0x10624dd3,%eax + 12abe: f7 e9 imul %ecx + 12ac0: c1 fa 06 sar $0x6,%edx + 12ac3: 89 c8 mov %ecx,%eax + 12ac5: c1 f8 1f sar $0x1f,%eax + 12ac8: 29 c2 sub %eax,%edx + 12aca: 89 d0 mov %edx,%eax + 12acc: 89 45 fc mov %eax,0xfffffffc(%ebp) + 12acf: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 12ad2: 05 ed 00 01 00 add $0x100ed,%eax + 12ad7: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 12ada: e9 db 01 00 00 jmp 12cba <_usb_calc_bus_time@16+0x312> + 12adf: 83 7d 10 00 cmpl $0x0,0x10(%ebp) + 12ae3: 0f 84 8e 00 00 00 je 12b77 <_usb_calc_bus_time@16+0x1cf> + 12ae9: 8b 55 14 mov 0x14(%ebp),%edx + 12aec: 89 d0 mov %edx,%eax + 12aee: c1 e0 03 shl $0x3,%eax + 12af1: 29 d0 sub %edx,%eax + 12af3: c1 e0 03 shl $0x3,%eax + 12af6: 89 45 ec mov %eax,0xffffffec(%ebp) + 12af9: b8 ab aa aa 2a mov $0x2aaaaaab,%eax + 12afe: f7 6d ec imull 0xffffffec(%ebp) + 12b01: 89 d1 mov %edx,%ecx + 12b03: 8b 45 ec mov 0xffffffec(%ebp),%eax + 12b06: c1 f8 1f sar $0x1f,%eax + 12b09: 29 c1 sub %eax,%ecx + 12b0b: 89 c8 mov %ecx,%eax + 12b0d: c1 e0 03 shl $0x3,%eax + 12b10: 01 c8 add %ecx,%eax + 12b12: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx + 12b19: 01 d0 add %edx,%eax + 12b1b: 01 c0 add %eax,%eax + 12b1d: 01 c8 add %ecx,%eax + 12b1f: c1 e0 03 shl $0x3,%eax + 12b22: 01 c8 add %ecx,%eax + 12b24: c1 e0 02 shl $0x2,%eax + 12b27: 01 c8 add %ecx,%eax + 12b29: c1 e0 02 shl $0x2,%eax + 12b2c: 01 c8 add %ecx,%eax + 12b2e: c1 e0 02 shl $0x2,%eax + 12b31: 8d 88 9e f3 03 00 lea 0x3f39e(%eax),%ecx + 12b37: b8 d3 4d 62 10 mov $0x10624dd3,%eax + 12b3c: f7 e9 imul %ecx + 12b3e: c1 fa 06 sar $0x6,%edx + 12b41: 89 c8 mov %ecx,%eax + 12b43: c1 f8 1f sar $0x1f,%eax + 12b46: 29 c2 sub %eax,%edx + 12b48: 89 d0 mov %edx,%eax + 12b4a: 89 45 fc mov %eax,0xfffffffc(%ebp) + 12b4d: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) + 12b51: 74 0d je 12b60 <_usb_calc_bus_time@16+0x1b8> + 12b53: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 12b56: 05 4c 20 00 00 add $0x204c,%eax + 12b5b: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 12b5e: eb 0c jmp 12b6c <_usb_calc_bus_time@16+0x1c4> + 12b60: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 12b63: 81 c2 61 1c 00 00 add $0x1c61,%edx + 12b69: 89 55 f4 mov %edx,0xfffffff4(%ebp) + 12b6c: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 12b6f: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 12b72: e9 43 01 00 00 jmp 12cba <_usb_calc_bus_time@16+0x312> + 12b77: 8b 55 14 mov 0x14(%ebp),%edx + 12b7a: 89 d0 mov %edx,%eax + 12b7c: c1 e0 03 shl $0x3,%eax + 12b7f: 29 d0 sub %edx,%eax + 12b81: c1 e0 03 shl $0x3,%eax + 12b84: 89 45 ec mov %eax,0xffffffec(%ebp) + 12b87: b8 ab aa aa 2a mov $0x2aaaaaab,%eax + 12b8c: f7 6d ec imull 0xffffffec(%ebp) + 12b8f: 89 d1 mov %edx,%ecx + 12b91: 8b 45 ec mov 0xffffffec(%ebp),%eax + 12b94: c1 f8 1f sar $0x1f,%eax + 12b97: 29 c1 sub %eax,%ecx + 12b99: 89 c8 mov %ecx,%eax + 12b9b: c1 e0 03 shl $0x3,%eax + 12b9e: 01 c8 add %ecx,%eax + 12ba0: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx + 12ba7: 01 d0 add %edx,%eax + 12ba9: 01 c0 add %eax,%eax + 12bab: 01 c8 add %ecx,%eax + 12bad: c1 e0 03 shl $0x3,%eax + 12bb0: 01 c8 add %ecx,%eax + 12bb2: c1 e0 02 shl $0x2,%eax + 12bb5: 01 c8 add %ecx,%eax + 12bb7: c1 e0 02 shl $0x2,%eax + 12bba: 01 c8 add %ecx,%eax + 12bbc: c1 e0 02 shl $0x2,%eax + 12bbf: 8d 88 9e f3 03 00 lea 0x3f39e(%eax),%ecx + 12bc5: b8 d3 4d 62 10 mov $0x10624dd3,%eax + 12bca: f7 e9 imul %ecx + 12bcc: c1 fa 06 sar $0x6,%edx + 12bcf: 89 c8 mov %ecx,%eax + 12bd1: c1 f8 1f sar $0x1f,%eax + 12bd4: 29 c2 sub %eax,%edx + 12bd6: 89 d0 mov %edx,%eax + 12bd8: 89 45 fc mov %eax,0xfffffffc(%ebp) + 12bdb: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 12bde: 05 7b 27 00 00 add $0x277b,%eax + 12be3: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 12be6: e9 cf 00 00 00 jmp 12cba <_usb_calc_bus_time@16+0x312> + 12beb: 83 7d 10 00 cmpl $0x0,0x10(%ebp) + 12bef: 74 5e je 12c4f <_usb_calc_bus_time@16+0x2a7> + 12bf1: 8b 55 14 mov 0x14(%ebp),%edx + 12bf4: 89 d0 mov %edx,%eax + 12bf6: c1 e0 03 shl $0x3,%eax + 12bf9: 29 d0 sub %edx,%eax + 12bfb: c1 e0 03 shl $0x3,%eax + 12bfe: 89 45 ec mov %eax,0xffffffec(%ebp) + 12c01: b8 ab aa aa 2a mov $0x2aaaaaab,%eax + 12c06: f7 6d ec imull 0xffffffec(%ebp) + 12c09: 89 d1 mov %edx,%ecx + 12c0b: 8b 45 ec mov 0xffffffec(%ebp),%eax + 12c0e: c1 f8 1f sar $0x1f,%eax + 12c11: 89 ca mov %ecx,%edx + 12c13: 29 c2 sub %eax,%edx + 12c15: 89 d0 mov %edx,%eax + 12c17: c1 e0 06 shl $0x6,%eax + 12c1a: 01 d0 add %edx,%eax + 12c1c: c1 e0 03 shl $0x3,%eax + 12c1f: 01 d0 add %edx,%eax + 12c21: c1 e0 02 shl $0x2,%eax + 12c24: 29 d0 sub %edx,%eax + 12c26: 8d 90 fd a8 64 00 lea 0x64a8fd(%eax),%edx + 12c2c: b8 d3 4d 62 10 mov $0x10624dd3,%eax + 12c31: f7 e2 mul %edx + 12c33: 89 d0 mov %edx,%eax + 12c35: c1 e8 06 shr $0x6,%eax + 12c38: 8d 90 8d 05 00 00 lea 0x58d(%eax),%edx + 12c3e: b8 d3 4d 62 10 mov $0x10624dd3,%eax + 12c43: f7 e2 mul %edx + 12c45: 89 d0 mov %edx,%eax + 12c47: c1 e8 06 shr $0x6,%eax + 12c4a: 89 45 fc mov %eax,0xfffffffc(%ebp) + 12c4d: eb 5c jmp 12cab <_usb_calc_bus_time@16+0x303> + 12c4f: 8b 55 14 mov 0x14(%ebp),%edx + 12c52: 89 d0 mov %edx,%eax + 12c54: c1 e0 03 shl $0x3,%eax + 12c57: 29 d0 sub %edx,%eax + 12c59: c1 e0 03 shl $0x3,%eax + 12c5c: 89 45 ec mov %eax,0xffffffec(%ebp) + 12c5f: b8 ab aa aa 2a mov $0x2aaaaaab,%eax + 12c64: f7 6d ec imull 0xffffffec(%ebp) + 12c67: 89 d1 mov %edx,%ecx + 12c69: 8b 45 ec mov 0xffffffec(%ebp),%eax + 12c6c: c1 f8 1f sar $0x1f,%eax + 12c6f: 89 ca mov %ecx,%edx + 12c71: 29 c2 sub %eax,%edx + 12c73: 89 d0 mov %edx,%eax + 12c75: c1 e0 06 shl $0x6,%eax + 12c78: 01 d0 add %edx,%eax + 12c7a: c1 e0 03 shl $0x3,%eax + 12c7d: 01 d0 add %edx,%eax + 12c7f: c1 e0 02 shl $0x2,%eax + 12c82: 29 d0 sub %edx,%eax + 12c84: 8d 90 fd a8 64 00 lea 0x64a8fd(%eax),%edx + 12c8a: b8 d3 4d 62 10 mov $0x10624dd3,%eax + 12c8f: f7 e2 mul %edx + 12c91: 89 d0 mov %edx,%eax + 12c93: c1 e8 06 shr $0x6,%eax + 12c96: 8d 90 72 04 00 00 lea 0x472(%eax),%edx + 12c9c: b8 d3 4d 62 10 mov $0x10624dd3,%eax + 12ca1: f7 e2 mul %edx + 12ca3: 89 d0 mov %edx,%eax + 12ca5: c1 e8 06 shr $0x6,%eax + 12ca8: 89 45 fc mov %eax,0xfffffffc(%ebp) + 12cab: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 12cae: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 12cb1: eb 07 jmp 12cba <_usb_calc_bus_time@16+0x312> + 12cb3: c7 45 f8 ff ff ff ff movl $0xffffffff,0xfffffff8(%ebp) + 12cba: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 12cbd: c9 leave + 12cbe: c2 10 00 ret $0x10 + +00012cc1 <_usb_check_bandwidth@8>: + 12cc1: 55 push %ebp + 12cc2: 89 e5 mov %esp,%ebp + 12cc4: 83 ec 20 sub $0x20,%esp + 12cc7: 8b 45 0c mov 0xc(%ebp),%eax + 12cca: 8b 40 18 mov 0x18(%eax),%eax + 12ccd: 89 45 fc mov %eax,0xfffffffc(%ebp) + 12cd0: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 12cd3: 25 80 00 00 00 and $0x80,%eax + 12cd8: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 12cdb: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 12cde: c1 e8 1e shr $0x1e,%eax + 12ce1: 83 e0 03 and $0x3,%eax + 12ce4: 85 c0 test %eax,%eax + 12ce6: 0f 94 c0 sete %al + 12ce9: 25 ff 00 00 00 and $0xff,%eax + 12cee: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 12cf1: 8b 45 08 mov 0x8(%ebp),%eax + 12cf4: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 12cfa: 8b 40 34 mov 0x34(%eax),%eax + 12cfd: 89 45 ec mov %eax,0xffffffec(%ebp) + 12d00: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) + 12d04: 75 15 jne 12d1b <_usb_check_bandwidth@8+0x5a> + 12d06: 8b 55 08 mov 0x8(%ebp),%edx + 12d09: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 12d0c: c1 e8 0f shr $0xf,%eax + 12d0f: 83 e0 0f and $0xf,%eax + 12d12: 8b 44 82 78 mov 0x78(%edx,%eax,4),%eax + 12d16: 89 45 e4 mov %eax,0xffffffe4(%ebp) + 12d19: eb 13 jmp 12d2e <_usb_check_bandwidth@8+0x6d> + 12d1b: 8b 55 08 mov 0x8(%ebp),%edx + 12d1e: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 12d21: c1 e8 0f shr $0xf,%eax + 12d24: 83 e0 0f and $0xf,%eax + 12d27: 8b 44 82 38 mov 0x38(%edx,%eax,4),%eax + 12d2b: 89 45 e4 mov %eax,0xffffffe4(%ebp) + 12d2e: ff 75 e4 pushl 0xffffffe4(%ebp) + 12d31: ff 75 f0 pushl 0xfffffff0(%ebp) + 12d34: ff 75 f4 pushl 0xfffffff4(%ebp) + 12d37: 8b 45 08 mov 0x8(%ebp),%eax + 12d3a: ff 70 18 pushl 0x18(%eax) + 12d3d: e8 66 fc ff ff call 129a8 <_usb_calc_bus_time@16> + 12d42: 8d 88 f4 01 00 00 lea 0x1f4(%eax),%ecx + 12d48: b8 d3 4d 62 10 mov $0x10624dd3,%eax + 12d4d: f7 e9 imul %ecx + 12d4f: c1 fa 06 sar $0x6,%edx + 12d52: 89 c8 mov %ecx,%eax + 12d54: c1 f8 1f sar $0x1f,%eax + 12d57: 29 c2 sub %eax,%edx + 12d59: 89 d0 mov %edx,%eax + 12d5b: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 12d5e: 83 7d f0 00 cmpl $0x0,0xfffffff0(%ebp) + 12d62: 74 13 je 12d77 <_usb_check_bandwidth@8+0xb6> + 12d64: 8b 45 0c mov 0xc(%ebp),%eax + 12d67: 89 45 e0 mov %eax,0xffffffe0(%ebp) + 12d6a: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 12d6d: 8b 4d e0 mov 0xffffffe0(%ebp),%ecx + 12d70: 99 cltd + 12d71: f7 79 44 idivl 0x44(%ecx) + 12d74: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 12d77: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 12d7a: 03 45 ec add 0xffffffec(%ebp),%eax + 12d7d: 89 45 e8 mov %eax,0xffffffe8(%ebp) + 12d80: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 12d83: c9 leave + 12d84: c2 08 00 ret $0x8 + +00012d87 <_usb_claim_bandwidth@16>: + 12d87: 55 push %ebp + 12d88: 89 e5 mov %esp,%ebp + 12d8a: 8b 45 08 mov 0x8(%ebp),%eax + 12d8d: 8b 88 bc 00 00 00 mov 0xbc(%eax),%ecx + 12d93: 8b 45 08 mov 0x8(%ebp),%eax + 12d96: 8b 90 bc 00 00 00 mov 0xbc(%eax),%edx + 12d9c: 8b 45 10 mov 0x10(%ebp),%eax + 12d9f: 03 42 34 add 0x34(%edx),%eax + 12da2: 89 41 34 mov %eax,0x34(%ecx) + 12da5: 83 7d 14 00 cmpl $0x0,0x14(%ebp) + 12da9: 74 0e je 12db9 <_usb_claim_bandwidth@16+0x32> + 12dab: 8b 45 08 mov 0x8(%ebp),%eax + 12dae: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 12db4: ff 40 3c incl 0x3c(%eax) + 12db7: eb 0c jmp 12dc5 <_usb_claim_bandwidth@16+0x3e> + 12db9: 8b 45 08 mov 0x8(%ebp),%eax + 12dbc: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 12dc2: ff 40 38 incl 0x38(%eax) + 12dc5: 8b 55 0c mov 0xc(%ebp),%edx + 12dc8: 8b 45 10 mov 0x10(%ebp),%eax + 12dcb: 89 42 34 mov %eax,0x34(%edx) + 12dce: 5d pop %ebp + 12dcf: c2 10 00 ret $0x10 + +00012dd2 <_usb_release_bandwidth@12>: + 12dd2: 55 push %ebp + 12dd3: 89 e5 mov %esp,%ebp + 12dd5: 53 push %ebx + 12dd6: 8b 45 08 mov 0x8(%ebp),%eax + 12dd9: 8b 98 bc 00 00 00 mov 0xbc(%eax),%ebx + 12ddf: 8b 45 08 mov 0x8(%ebp),%eax + 12de2: 8b 88 bc 00 00 00 mov 0xbc(%eax),%ecx + 12de8: 8b 45 0c mov 0xc(%ebp),%eax + 12deb: 8b 50 34 mov 0x34(%eax),%edx + 12dee: 8b 41 34 mov 0x34(%ecx),%eax + 12df1: 29 d0 sub %edx,%eax + 12df3: 89 43 34 mov %eax,0x34(%ebx) + 12df6: 83 7d 10 00 cmpl $0x0,0x10(%ebp) + 12dfa: 74 0e je 12e0a <_usb_release_bandwidth@12+0x38> + 12dfc: 8b 45 08 mov 0x8(%ebp),%eax + 12dff: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 12e05: ff 48 3c decl 0x3c(%eax) + 12e08: eb 0c jmp 12e16 <_usb_release_bandwidth@12+0x44> + 12e0a: 8b 45 08 mov 0x8(%ebp),%eax + 12e0d: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 12e13: ff 48 38 decl 0x38(%eax) + 12e16: 8b 45 0c mov 0xc(%ebp),%eax + 12e19: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) + 12e20: 5b pop %ebx + 12e21: 5d pop %ebp + 12e22: c2 0c 00 ret $0xc + +00012e25 <_hcd_alloc_dev>: + 12e25: 55 push %ebp + 12e26: 89 e5 mov %esp,%ebp + 12e28: 83 ec 18 sub $0x18,%esp + 12e2b: 83 7d 08 00 cmpl $0x0,0x8(%ebp) + 12e2f: 74 0e je 12e3f <_hcd_alloc_dev+0x1a> + 12e31: 8b 45 08 mov 0x8(%ebp),%eax + 12e34: 83 b8 98 01 00 00 00 cmpl $0x0,0x198(%eax) + 12e3b: 75 02 jne 12e3f <_hcd_alloc_dev+0x1a> + 12e3d: eb 0c jmp 12e4b <_hcd_alloc_dev+0x26> + 12e3f: c7 45 f0 ea ff ff ff movl $0xffffffea,0xfffffff0(%ebp) + 12e46: e9 e7 00 00 00 jmp 12f32 <_hcd_alloc_dev+0x10d> + 12e4b: 8b 45 08 mov 0x8(%ebp),%eax + 12e4e: 83 b8 bc 00 00 00 00 cmpl $0x0,0xbc(%eax) + 12e55: 74 0f je 12e66 <_hcd_alloc_dev+0x41> + 12e57: 8b 45 08 mov 0x8(%ebp),%eax + 12e5a: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 12e60: 83 78 30 00 cmpl $0x0,0x30(%eax) + 12e64: 75 0c jne 12e72 <_hcd_alloc_dev+0x4d> + 12e66: c7 45 f0 ed ff ff ff movl $0xffffffed,0xfffffff0(%ebp) + 12e6d: e9 c0 00 00 00 jmp 12f32 <_hcd_alloc_dev+0x10d> + 12e72: 8b 45 08 mov 0x8(%ebp),%eax + 12e75: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 12e7b: 8b 40 30 mov 0x30(%eax),%eax + 12e7e: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 12e81: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 12e84: 81 b8 e0 00 00 00 85 cmpl $0x85,0xe0(%eax) + 12e8b: 00 00 00 + 12e8e: 75 0c jne 12e9c <_hcd_alloc_dev+0x77> + 12e90: c7 45 f0 bd ff ff ff movl $0xffffffbd,0xfffffff0(%ebp) + 12e97: e9 96 00 00 00 jmp 12f32 <_hcd_alloc_dev+0x10d> + 12e9c: 83 ec 08 sub $0x8,%esp + 12e9f: 68 90 00 00 00 push $0x90 + 12ea4: 6a 01 push $0x1 + 12ea6: e8 85 6b 00 00 call 19a30 <_ExAllocatePool@8> + 12eab: 83 c4 08 add $0x8,%esp + 12eae: 89 45 fc mov %eax,0xfffffffc(%ebp) + 12eb1: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) + 12eb5: 75 09 jne 12ec0 <_hcd_alloc_dev+0x9b> + 12eb7: c7 45 f0 f4 ff ff ff movl $0xfffffff4,0xfffffff0(%ebp) + 12ebe: eb 72 jmp 12f32 <_hcd_alloc_dev+0x10d> + 12ec0: 83 ec 04 sub $0x4,%esp + 12ec3: 68 90 00 00 00 push $0x90 + 12ec8: 6a 00 push $0x0 + 12eca: ff 75 fc pushl 0xfffffffc(%ebp) + 12ecd: e8 7e 6b 00 00 call 19a50 <_memset> + 12ed2: 83 c4 10 add $0x10,%esp + 12ed5: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 12ed8: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 12edb: 89 02 mov %eax,(%edx) + 12edd: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 12ee0: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 12ee3: 89 42 04 mov %eax,0x4(%edx) + 12ee6: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 12ee9: 83 c2 08 add $0x8,%edx + 12eec: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 12eef: 83 c0 08 add $0x8,%eax + 12ef2: 89 02 mov %eax,(%edx) + 12ef4: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 12ef7: 83 c2 08 add $0x8,%edx + 12efa: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 12efd: 83 c0 08 add $0x8,%eax + 12f00: 89 42 04 mov %eax,0x4(%edx) + 12f03: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) + 12f0a: 83 ec 08 sub $0x8,%esp + 12f0d: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 12f10: 83 c0 68 add $0x68,%eax + 12f13: 50 push %eax + 12f14: ff 75 fc pushl 0xfffffffc(%ebp) + 12f17: e8 34 f8 ff ff call 12750 <_list_add> + 12f1c: 83 c4 10 add $0x10,%esp + 12f1f: 8b 55 08 mov 0x8(%ebp),%edx + 12f22: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 12f25: 89 82 98 01 00 00 mov %eax,0x198(%edx) + 12f2b: c7 45 f0 00 00 00 00 movl $0x0,0xfffffff0(%ebp) + 12f32: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 12f35: c9 leave + 12f36: c3 ret + +00012f37 <_urb_unlink>: + 12f37: 55 push %ebp + 12f38: 89 e5 mov %esp,%ebp + 12f3a: 83 ec 08 sub $0x8,%esp + 12f3d: 8b 45 08 mov 0x8(%ebp),%eax + 12f40: 83 78 34 00 cmpl $0x0,0x34(%eax) + 12f44: 74 25 je 12f6b <_urb_unlink+0x34> + 12f46: 8b 45 08 mov 0x8(%ebp),%eax + 12f49: 8b 40 18 mov 0x18(%eax),%eax + 12f4c: c1 e8 1e shr $0x1e,%eax + 12f4f: 83 e0 03 and $0x3,%eax + 12f52: 85 c0 test %eax,%eax + 12f54: 0f 94 c0 sete %al + 12f57: 25 ff 00 00 00 and $0xff,%eax + 12f5c: 50 push %eax + 12f5d: ff 75 08 pushl 0x8(%ebp) + 12f60: 8b 45 08 mov 0x8(%ebp),%eax + 12f63: ff 70 14 pushl 0x14(%eax) + 12f66: e8 67 fe ff ff call 12dd2 <_usb_release_bandwidth@12> + 12f6b: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) + 12f72: 83 ec 0c sub $0xc,%esp + 12f75: 8b 45 08 mov 0x8(%ebp),%eax + 12f78: 83 c0 0c add $0xc,%eax + 12f7b: 50 push %eax + 12f7c: e8 1c 00 00 00 call 12f9d <_list_del_init> + 12f81: 83 c4 10 add $0x10,%esp + 12f84: 8b 45 08 mov 0x8(%ebp),%eax + 12f87: 8b 40 14 mov 0x14(%eax),%eax + 12f8a: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 12f8d: 83 ec 0c sub $0xc,%esp + 12f90: ff 75 f8 pushl 0xfffffff8(%ebp) + 12f93: e8 23 34 00 00 call 163bb <_usb_put_dev@4> + 12f98: 83 c4 0c add $0xc,%esp + 12f9b: c9 leave + 12f9c: c3 ret + +00012f9d <_list_del_init>: + 12f9d: 55 push %ebp + 12f9e: 89 e5 mov %esp,%ebp + 12fa0: 8b 45 08 mov 0x8(%ebp),%eax + 12fa3: ff 30 pushl (%eax) + 12fa5: 8b 45 08 mov 0x8(%ebp),%eax + 12fa8: ff 70 04 pushl 0x4(%eax) + 12fab: e8 92 f9 ff ff call 12942 <___list_del> + 12fb0: 83 c4 08 add $0x8,%esp + 12fb3: 8b 55 08 mov 0x8(%ebp),%edx + 12fb6: 8b 45 08 mov 0x8(%ebp),%eax + 12fb9: 89 02 mov %eax,(%edx) + 12fbb: 8b 55 08 mov 0x8(%ebp),%edx + 12fbe: 8b 45 08 mov 0x8(%ebp),%eax + 12fc1: 89 42 04 mov %eax,0x4(%edx) + 12fc4: c9 leave + 12fc5: c3 ret + +00012fc6 <_hcd_submit_urb>: + 12fc6: 55 push %ebp + 12fc7: 89 e5 mov %esp,%ebp + 12fc9: 83 ec 18 sub $0x18,%esp + 12fcc: 8b 45 08 mov 0x8(%ebp),%eax + 12fcf: 8b 40 14 mov 0x14(%eax),%eax + 12fd2: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 12fd8: 8b 40 30 mov 0x30(%eax),%eax + 12fdb: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 12fde: 8b 45 08 mov 0x8(%ebp),%eax + 12fe1: 8b 40 14 mov 0x14(%eax),%eax + 12fe4: 8b 80 98 01 00 00 mov 0x198(%eax),%eax + 12fea: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 12fed: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) + 12ff1: 74 06 je 12ff9 <_hcd_submit_urb+0x33> + 12ff3: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) + 12ff7: 75 0c jne 13005 <_hcd_submit_urb+0x3f> + 12ff9: c7 45 ec ed ff ff ff movl $0xffffffed,0xffffffec(%ebp) + 13000: e9 77 01 00 00 jmp 1317c <_hcd_submit_urb+0x1b6> + 13005: c7 45 f0 00 00 00 00 movl $0x0,0xfffffff0(%ebp) + 1300c: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 1300f: 8b 80 e0 00 00 00 mov 0xe0(%eax),%eax + 13015: 83 e0 01 and $0x1,%eax + 13018: 85 c0 test %eax,%eax + 1301a: 74 42 je 1305e <_hcd_submit_urb+0x98> + 1301c: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 1301f: 81 b8 e0 00 00 00 85 cmpl $0x85,0xe0(%eax) + 13026: 00 00 00 + 13029: 74 33 je 1305e <_hcd_submit_urb+0x98> + 1302b: 83 ec 0c sub $0xc,%esp + 1302e: 8b 45 08 mov 0x8(%ebp),%eax + 13031: ff 70 14 pushl 0x14(%eax) + 13034: e8 31 33 00 00 call 1636a <_usb_get_dev> + 13039: 83 c4 10 add $0x10,%esp + 1303c: 83 ec 08 sub $0x8,%esp + 1303f: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 13042: 83 c0 08 add $0x8,%eax + 13045: 50 push %eax + 13046: 8b 45 08 mov 0x8(%ebp),%eax + 13049: 83 c0 0c add $0xc,%eax + 1304c: 50 push %eax + 1304d: e8 2f 01 00 00 call 13181 <_list_add_tail> + 13052: 83 c4 10 add $0x10,%esp + 13055: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) + 1305c: eb 24 jmp 13082 <_hcd_submit_urb+0xbc> + 1305e: 8b 55 08 mov 0x8(%ebp),%edx + 13061: 83 c2 0c add $0xc,%edx + 13064: 8b 45 08 mov 0x8(%ebp),%eax + 13067: 83 c0 0c add $0xc,%eax + 1306a: 89 02 mov %eax,(%edx) + 1306c: 8b 55 08 mov 0x8(%ebp),%edx + 1306f: 83 c2 0c add $0xc,%edx + 13072: 8b 45 08 mov 0x8(%ebp),%eax + 13075: 83 c0 0c add $0xc,%eax + 13078: 89 42 04 mov %eax,0x4(%edx) + 1307b: c7 45 fc 94 ff ff ff movl $0xffffff94,0xfffffffc(%ebp) + 13082: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) + 13086: 74 0b je 13093 <_hcd_submit_urb+0xcd> + 13088: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 1308b: 89 45 ec mov %eax,0xffffffec(%ebp) + 1308e: e9 e9 00 00 00 jmp 1317c <_hcd_submit_urb+0x1b6> + 13093: 83 ec 0c sub $0xc,%esp + 13096: ff 75 08 pushl 0x8(%ebp) + 13099: e8 d2 50 00 00 call 18170 <_usb_get_urb@4> + 1309e: 83 c4 0c add $0xc,%esp + 130a1: 89 45 08 mov %eax,0x8(%ebp) + 130a4: 8b 45 08 mov 0x8(%ebp),%eax + 130a7: 8b 55 f8 mov 0xfffffff8(%ebp),%edx + 130aa: 8b 40 14 mov 0x14(%eax),%eax + 130ad: 3b 42 24 cmp 0x24(%edx),%eax + 130b0: 75 25 jne 130d7 <_hcd_submit_urb+0x111> + 130b2: 8b 55 08 mov 0x8(%ebp),%edx + 130b5: 8b 45 08 mov 0x8(%ebp),%eax + 130b8: 8b 40 20 mov 0x20(%eax),%eax + 130bb: 83 c8 04 or $0x4,%eax + 130be: 89 42 20 mov %eax,0x20(%edx) + 130c1: 83 ec 08 sub $0x8,%esp + 130c4: ff 75 08 pushl 0x8(%ebp) + 130c7: ff 75 f8 pushl 0xfffffff8(%ebp) + 130ca: e8 de f3 ff ff call 124ad <_rh_urb_enqueue> + 130cf: 83 c4 10 add $0x10,%esp + 130d2: 89 45 fc mov %eax,0xfffffffc(%ebp) + 130d5: eb 7d jmp 13154 <_hcd_submit_urb+0x18e> + 130d7: 8b 45 08 mov 0x8(%ebp),%eax + 130da: 8b 40 20 mov 0x20(%eax),%eax + 130dd: c1 e8 02 shr $0x2,%eax + 130e0: 83 e0 01 and $0x1,%eax + 130e3: 85 c0 test %eax,%eax + 130e5: 75 50 jne 13137 <_hcd_submit_urb+0x171> + 130e7: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 130ea: 8b 80 80 00 00 00 mov 0x80(%eax),%eax + 130f0: 83 b8 84 00 00 00 00 cmpl $0x0,0x84(%eax) + 130f7: 74 3e je 13137 <_hcd_submit_urb+0x171> + 130f9: 8b 45 08 mov 0x8(%ebp),%eax + 130fc: 8b 40 18 mov 0x18(%eax),%eax + 130ff: c1 e8 1e shr $0x1e,%eax + 13102: 83 e0 03 and $0x3,%eax + 13105: 83 f8 02 cmp $0x2,%eax + 13108: 75 12 jne 1311c <_hcd_submit_urb+0x156> + 1310a: 8b 45 08 mov 0x8(%ebp),%eax + 1310d: 8b 55 08 mov 0x8(%ebp),%edx + 13110: 8b 52 38 mov 0x38(%edx),%edx + 13113: 81 e2 ff ff ff 0f and $0xfffffff,%edx + 13119: 89 50 3c mov %edx,0x3c(%eax) + 1311c: 8b 45 08 mov 0x8(%ebp),%eax + 1311f: 83 78 2c 00 cmpl $0x0,0x2c(%eax) + 13123: 74 12 je 13137 <_hcd_submit_urb+0x171> + 13125: 8b 45 08 mov 0x8(%ebp),%eax + 13128: 8b 55 08 mov 0x8(%ebp),%edx + 1312b: 8b 52 24 mov 0x24(%edx),%edx + 1312e: 81 e2 ff ff ff 0f and $0xfffffff,%edx + 13134: 89 50 28 mov %edx,0x28(%eax) + 13137: 83 ec 04 sub $0x4,%esp + 1313a: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 1313d: 8b 40 74 mov 0x74(%eax),%eax + 13140: ff 75 0c pushl 0xc(%ebp) + 13143: ff 75 08 pushl 0x8(%ebp) + 13146: ff 75 f8 pushl 0xfffffff8(%ebp) + 13149: 8b 40 28 mov 0x28(%eax),%eax + 1314c: ff d0 call *%eax + 1314e: 83 c4 10 add $0x10,%esp + 13151: 89 45 fc mov %eax,0xfffffffc(%ebp) + 13154: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) + 13158: 74 1c je 13176 <_hcd_submit_urb+0x1b0> + 1315a: 83 ec 0c sub $0xc,%esp + 1315d: ff 75 08 pushl 0x8(%ebp) + 13160: e8 d1 4f 00 00 call 18136 <_usb_free_urb@4> + 13165: 83 c4 0c add $0xc,%esp + 13168: 83 ec 0c sub $0xc,%esp + 1316b: ff 75 08 pushl 0x8(%ebp) + 1316e: e8 c4 fd ff ff call 12f37 <_urb_unlink> + 13173: 83 c4 10 add $0x10,%esp + 13176: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13179: 89 45 ec mov %eax,0xffffffec(%ebp) + 1317c: 8b 45 ec mov 0xffffffec(%ebp),%eax + 1317f: c9 leave + 13180: c3 ret + +00013181 <_list_add_tail>: + 13181: 55 push %ebp + 13182: 89 e5 mov %esp,%ebp + 13184: ff 75 0c pushl 0xc(%ebp) + 13187: 8b 45 0c mov 0xc(%ebp),%eax + 1318a: ff 70 04 pushl 0x4(%eax) + 1318d: ff 75 08 pushl 0x8(%ebp) + 13190: e8 d9 f5 ff ff call 1276e <___list_add> + 13195: 83 c4 0c add $0xc,%esp + 13198: c9 leave + 13199: c3 ret + +0001319a <_hcd_get_frame_number>: + 1319a: 55 push %ebp + 1319b: 89 e5 mov %esp,%ebp + 1319d: 83 ec 08 sub $0x8,%esp + 131a0: 8b 45 08 mov 0x8(%ebp),%eax + 131a3: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 131a9: 8b 40 30 mov 0x30(%eax),%eax + 131ac: 89 45 fc mov %eax,0xfffffffc(%ebp) + 131af: 83 ec 0c sub $0xc,%esp + 131b2: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 131b5: 8b 40 74 mov 0x74(%eax),%eax + 131b8: ff 75 fc pushl 0xfffffffc(%ebp) + 131bb: 8b 40 1c mov 0x1c(%eax),%eax + 131be: ff d0 call *%eax + 131c0: 83 c4 10 add $0x10,%esp + 131c3: c9 leave + 131c4: c3 ret + +000131c5 <_unlink1>: + 131c5: 55 push %ebp + 131c6: 89 e5 mov %esp,%ebp + 131c8: 83 ec 08 sub $0x8,%esp + 131cb: 8b 45 08 mov 0x8(%ebp),%eax + 131ce: 8b 40 58 mov 0x58(%eax),%eax + 131d1: 3b 45 0c cmp 0xc(%ebp),%eax + 131d4: 75 13 jne 131e9 <_unlink1+0x24> + 131d6: 83 ec 08 sub $0x8,%esp + 131d9: ff 75 0c pushl 0xc(%ebp) + 131dc: ff 75 08 pushl 0x8(%ebp) + 131df: e8 36 f3 ff ff call 1251a <_usb_rh_status_dequeue> + 131e4: 83 c4 10 add $0x10,%esp + 131e7: eb 1a jmp 13203 <_unlink1+0x3e> + 131e9: 83 ec 08 sub $0x8,%esp + 131ec: 8b 45 08 mov 0x8(%ebp),%eax + 131ef: 8b 40 74 mov 0x74(%eax),%eax + 131f2: ff 75 0c pushl 0xc(%ebp) + 131f5: ff 75 08 pushl 0x8(%ebp) + 131f8: 8b 40 2c mov 0x2c(%eax),%eax + 131fb: ff d0 call *%eax + 131fd: 83 c4 10 add $0x10,%esp + 13200: 89 45 fc mov %eax,0xfffffffc(%ebp) + 13203: c9 leave + 13204: c3 ret + +00013205 <_unlink_complete>: + 13205: 55 push %ebp + 13206: 89 e5 mov %esp,%ebp + 13208: 83 ec 08 sub $0x8,%esp + 1320b: 8b 45 08 mov 0x8(%ebp),%eax + 1320e: 8b 40 54 mov 0x54(%eax),%eax + 13211: 89 45 fc mov %eax,0xfffffffc(%ebp) + 13214: 8b 55 08 mov 0x8(%ebp),%edx + 13217: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 1321a: 8b 40 08 mov 0x8(%eax),%eax + 1321d: 89 42 58 mov %eax,0x58(%edx) + 13220: 8b 55 08 mov 0x8(%ebp),%edx + 13223: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13226: 8b 40 0c mov 0xc(%eax),%eax + 13229: 89 42 54 mov %eax,0x54(%edx) + 1322c: 83 ec 08 sub $0x8,%esp + 1322f: 8b 45 08 mov 0x8(%ebp),%eax + 13232: ff 75 0c pushl 0xc(%ebp) + 13235: ff 75 08 pushl 0x8(%ebp) + 13238: 8b 40 58 mov 0x58(%eax),%eax + 1323b: ff d0 call *%eax + 1323d: 83 c4 10 add $0x10,%esp + 13240: 83 ec 0c sub $0xc,%esp + 13243: ff 75 fc pushl 0xfffffffc(%ebp) + 13246: e8 05 00 00 00 call 13250 <_complete> + 1324b: 83 c4 10 add $0x10,%esp + 1324e: c9 leave + 1324f: c3 ret + +00013250 <_complete>: + 13250: 55 push %ebp + 13251: 89 e5 mov %esp,%ebp + 13253: 83 ec 08 sub $0x8,%esp + 13256: 8b 45 08 mov 0x8(%ebp),%eax + 13259: ff 00 incl (%eax) + 1325b: 83 ec 0c sub $0xc,%esp + 1325e: 8b 45 08 mov 0x8(%ebp),%eax + 13261: 83 c0 04 add $0x4,%eax + 13264: 50 push %eax + 13265: e8 fb 65 00 00 call 19865 <_my_wake_up> + 1326a: 83 c4 10 add $0x10,%esp + 1326d: c9 leave + 1326e: c3 ret + +0001326f <_hcd_unlink_urb>: + 1326f: 55 push %ebp + 13270: 89 e5 mov %esp,%ebp + 13272: 83 ec 38 sub $0x38,%esp + 13275: c7 45 f0 00 00 00 00 movl $0x0,0xfffffff0(%ebp) + 1327c: c7 45 ec 00 00 00 00 movl $0x0,0xffffffec(%ebp) + 13283: 83 7d 08 00 cmpl $0x0,0x8(%ebp) + 13287: 75 0c jne 13295 <_hcd_unlink_urb+0x26> + 13289: c7 45 d0 ea ff ff ff movl $0xffffffea,0xffffffd0(%ebp) + 13290: e9 ab 01 00 00 jmp 13440 <_hcd_unlink_urb+0x1d1> + 13295: c7 45 e8 00 00 00 00 movl $0x0,0xffffffe8(%ebp) + 1329c: c7 05 00 c0 01 00 01 movl $0x1,0x1c000 + 132a3: 00 00 00 + 132a6: 8b 45 08 mov 0x8(%ebp),%eax + 132a9: 83 78 14 00 cmpl $0x0,0x14(%eax) + 132ad: 74 0f je 132be <_hcd_unlink_urb+0x4f> + 132af: 8b 45 08 mov 0x8(%ebp),%eax + 132b2: 8b 40 14 mov 0x14(%eax),%eax + 132b5: 83 b8 bc 00 00 00 00 cmpl $0x0,0xbc(%eax) + 132bc: 75 0c jne 132ca <_hcd_unlink_urb+0x5b> + 132be: c7 45 d4 ed ff ff ff movl $0xffffffed,0xffffffd4(%ebp) + 132c5: e9 64 01 00 00 jmp 1342e <_hcd_unlink_urb+0x1bf> + 132ca: 8b 45 08 mov 0x8(%ebp),%eax + 132cd: 8b 40 14 mov 0x14(%eax),%eax + 132d0: 8b 80 98 01 00 00 mov 0x198(%eax),%eax + 132d6: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 132d9: 8b 45 08 mov 0x8(%ebp),%eax + 132dc: 8b 40 14 mov 0x14(%eax),%eax + 132df: 05 c0 00 00 00 add $0xc0,%eax + 132e4: 89 45 ec mov %eax,0xffffffec(%ebp) + 132e7: 8b 45 08 mov 0x8(%ebp),%eax + 132ea: 8b 40 14 mov 0x14(%eax),%eax + 132ed: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 132f3: 8b 40 30 mov 0x30(%eax),%eax + 132f6: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 132f9: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) + 132fd: 74 06 je 13305 <_hcd_unlink_urb+0x96> + 132ff: 83 7d f0 00 cmpl $0x0,0xfffffff0(%ebp) + 13303: 75 0c jne 13311 <_hcd_unlink_urb+0xa2> + 13305: c7 45 d4 ed ff ff ff movl $0xffffffed,0xffffffd4(%ebp) + 1330c: e9 1d 01 00 00 jmp 1342e <_hcd_unlink_urb+0x1bf> + 13311: 8b 45 08 mov 0x8(%ebp),%eax + 13314: 83 78 08 00 cmpl $0x0,0x8(%eax) + 13318: 75 0c jne 13326 <_hcd_unlink_urb+0xb7> + 1331a: c7 45 d4 ea ff ff ff movl $0xffffffea,0xffffffd4(%ebp) + 13321: e9 08 01 00 00 jmp 1342e <_hcd_unlink_urb+0x1bf> + 13326: 8b 45 08 mov 0x8(%ebp),%eax + 13329: 83 78 1c 8d cmpl $0xffffff8d,0x1c(%eax) + 1332d: 74 0c je 1333b <_hcd_unlink_urb+0xcc> + 1332f: c7 45 d4 f0 ff ff ff movl $0xfffffff0,0xffffffd4(%ebp) + 13336: e9 f3 00 00 00 jmp 1342e <_hcd_unlink_urb+0x1bf> + 1333b: 8b 45 08 mov 0x8(%ebp),%eax + 1333e: 8b 40 20 mov 0x20(%eax),%eax + 13341: c1 e8 03 shr $0x3,%eax + 13344: 83 e0 01 and $0x1,%eax + 13347: 85 c0 test %eax,%eax + 13349: 75 38 jne 13383 <_hcd_unlink_urb+0x114> + 1334b: c7 45 d8 00 00 00 00 movl $0x0,0xffffffd8(%ebp) + 13352: 8b 45 08 mov 0x8(%ebp),%eax + 13355: 8b 40 58 mov 0x58(%eax),%eax + 13358: 89 45 e0 mov %eax,0xffffffe0(%ebp) + 1335b: 8b 45 08 mov 0x8(%ebp),%eax + 1335e: 8b 40 54 mov 0x54(%eax),%eax + 13361: 89 45 e4 mov %eax,0xffffffe4(%ebp) + 13364: 8b 45 08 mov 0x8(%ebp),%eax + 13367: c7 40 58 05 32 01 00 movl $0x13205,0x58(%eax) + 1336e: 8b 55 08 mov 0x8(%ebp),%edx + 13371: 8d 45 d8 lea 0xffffffd8(%ebp),%eax + 13374: 89 42 54 mov %eax,0x54(%edx) + 13377: 8b 45 08 mov 0x8(%ebp),%eax + 1337a: c7 40 1c fe ff ff ff movl $0xfffffffe,0x1c(%eax) + 13381: eb 0a jmp 1338d <_hcd_unlink_urb+0x11e> + 13383: 8b 45 08 mov 0x8(%ebp),%eax + 13386: c7 40 1c 98 ff ff ff movl $0xffffff98,0x1c(%eax) + 1338d: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 13390: 8b 40 58 mov 0x58(%eax),%eax + 13393: 3b 45 08 cmp 0x8(%ebp),%eax + 13396: 75 1a jne 133b2 <_hcd_unlink_urb+0x143> + 13398: 83 ec 08 sub $0x8,%esp + 1339b: ff 75 08 pushl 0x8(%ebp) + 1339e: ff 75 f0 pushl 0xfffffff0(%ebp) + 133a1: e8 74 f1 ff ff call 1251a <_usb_rh_status_dequeue> + 133a6: 83 c4 10 add $0x10,%esp + 133a9: c7 45 d4 00 00 00 00 movl $0x0,0xffffffd4(%ebp) + 133b0: eb 4b jmp 133fd <_hcd_unlink_urb+0x18e> + 133b2: 83 ec 08 sub $0x8,%esp + 133b5: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 133b8: 8b 40 74 mov 0x74(%eax),%eax + 133bb: ff 75 08 pushl 0x8(%ebp) + 133be: ff 75 f0 pushl 0xfffffff0(%ebp) + 133c1: 8b 40 2c mov 0x2c(%eax),%eax + 133c4: ff d0 call *%eax + 133c6: 83 c4 10 add $0x10,%esp + 133c9: 89 45 d4 mov %eax,0xffffffd4(%ebp) + 133cc: 83 7d d4 00 cmpl $0x0,0xffffffd4(%ebp) + 133d0: 74 2b je 133fd <_hcd_unlink_urb+0x18e> + 133d2: 8b 45 08 mov 0x8(%ebp),%eax + 133d5: 8b 40 20 mov 0x20(%eax),%eax + 133d8: c1 e8 03 shr $0x3,%eax + 133db: 83 e0 01 and $0x1,%eax + 133de: 85 c0 test %eax,%eax + 133e0: 75 4c jne 1342e <_hcd_unlink_urb+0x1bf> + 133e2: c7 45 e8 00 00 00 00 movl $0x0,0xffffffe8(%ebp) + 133e9: 8b 55 08 mov 0x8(%ebp),%edx + 133ec: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 133ef: 89 42 58 mov %eax,0x58(%edx) + 133f2: 8b 55 08 mov 0x8(%ebp),%edx + 133f5: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 133f8: 89 42 54 mov %eax,0x54(%edx) + 133fb: eb 31 jmp 1342e <_hcd_unlink_urb+0x1bf> + 133fd: 8b 45 08 mov 0x8(%ebp),%eax + 13400: 8b 40 20 mov 0x20(%eax),%eax + 13403: c1 e8 03 shr $0x3,%eax + 13406: 83 e0 01 and $0x1,%eax + 13409: 85 c0 test %eax,%eax + 1340b: 74 09 je 13416 <_hcd_unlink_urb+0x1a7> + 1340d: c7 45 d0 8d ff ff ff movl $0xffffff8d,0xffffffd0(%ebp) + 13414: eb 2a jmp 13440 <_hcd_unlink_urb+0x1d1> + 13416: 83 ec 0c sub $0xc,%esp + 13419: 8d 45 d8 lea 0xffffffd8(%ebp),%eax + 1341c: 50 push %eax + 1341d: e8 b6 64 00 00 call 198d8 <_my_wait_for_completion> + 13422: 83 c4 10 add $0x10,%esp + 13425: c7 45 d0 00 00 00 00 movl $0x0,0xffffffd0(%ebp) + 1342c: eb 12 jmp 13440 <_hcd_unlink_urb+0x1d1> + 1342e: 83 7d d4 00 cmpl $0x0,0xffffffd4(%ebp) + 13432: 74 06 je 1343a <_hcd_unlink_urb+0x1cb> + 13434: 83 7d ec 00 cmpl $0x0,0xffffffec(%ebp) + 13438: 74 00 je 1343a <_hcd_unlink_urb+0x1cb> + 1343a: 8b 45 d4 mov 0xffffffd4(%ebp),%eax + 1343d: 89 45 d0 mov %eax,0xffffffd0(%ebp) + 13440: 8b 45 d0 mov 0xffffffd0(%ebp),%eax + 13443: c9 leave + 13444: c3 ret + +00013445 <_hcd_endpoint_disable>: + 13445: 55 push %ebp + 13446: 89 e5 mov %esp,%ebp + 13448: 53 push %ebx + 13449: 83 ec 24 sub $0x24,%esp + 1344c: 8b 45 0c mov 0xc(%ebp),%eax + 1344f: 83 e0 0f and $0xf,%eax + 13452: 89 45 e8 mov %eax,0xffffffe8(%ebp) + 13455: 8b 45 08 mov 0x8(%ebp),%eax + 13458: 8b 80 98 01 00 00 mov 0x198(%eax),%eax + 1345e: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 13461: 8b 45 08 mov 0x8(%ebp),%eax + 13464: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 1346a: 8b 40 30 mov 0x30(%eax),%eax + 1346d: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 13470: 8b 45 0c mov 0xc(%ebp),%eax + 13473: c1 e8 07 shr $0x7,%eax + 13476: 83 e0 01 and $0x1,%eax + 13479: 85 c0 test %eax,%eax + 1347b: 74 26 je 134a3 <_hcd_endpoint_disable+0x5e> + 1347d: 8b 5d 08 mov 0x8(%ebp),%ebx + 13480: 8b 55 08 mov 0x8(%ebp),%edx + 13483: 8b 4d e8 mov 0xffffffe8(%ebp),%ecx + 13486: b8 01 00 00 00 mov $0x1,%eax + 1348b: d3 e0 shl %cl,%eax + 1348d: 0b 42 30 or 0x30(%edx),%eax + 13490: 89 43 30 mov %eax,0x30(%ebx) + 13493: 8b 55 08 mov 0x8(%ebp),%edx + 13496: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 13499: c7 44 82 38 00 00 00 movl $0x0,0x38(%edx,%eax,4) + 134a0: 00 + 134a1: eb 24 jmp 134c7 <_hcd_endpoint_disable+0x82> + 134a3: 8b 5d 08 mov 0x8(%ebp),%ebx + 134a6: 8b 55 08 mov 0x8(%ebp),%edx + 134a9: 8b 4d e8 mov 0xffffffe8(%ebp),%ecx + 134ac: b8 01 00 00 00 mov $0x1,%eax + 134b1: d3 e0 shl %cl,%eax + 134b3: 0b 42 34 or 0x34(%edx),%eax + 134b6: 89 43 34 mov %eax,0x34(%ebx) + 134b9: 8b 55 08 mov 0x8(%ebp),%edx + 134bc: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 134bf: c7 44 82 78 00 00 00 movl $0x0,0x78(%edx,%eax,4) + 134c6: 00 + 134c7: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 134ce: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 134d1: 83 c0 08 add $0x8,%eax + 134d4: 8b 00 mov (%eax),%eax + 134d6: 83 e8 0c sub $0xc,%eax + 134d9: 89 45 ec mov %eax,0xffffffec(%ebp) + 134dc: 8b 55 ec mov 0xffffffec(%ebp),%edx + 134df: 83 c2 0c add $0xc,%edx + 134e2: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 134e5: 83 c0 08 add $0x8,%eax + 134e8: 39 c2 cmp %eax,%edx + 134ea: 0f 84 a8 00 00 00 je 13598 <_hcd_endpoint_disable+0x153> + 134f0: 8b 45 ec mov 0xffffffec(%ebp),%eax + 134f3: 8b 40 18 mov 0x18(%eax),%eax + 134f6: 89 45 e4 mov %eax,0xffffffe4(%ebp) + 134f9: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 134fc: c1 f8 0f sar $0xf,%eax + 134ff: 83 e0 0f and $0xf,%eax + 13502: 3b 45 e8 cmp 0xffffffe8(%ebp),%eax + 13505: 74 02 je 13509 <_hcd_endpoint_disable+0xc4> + 13507: eb 7e jmp 13587 <_hcd_endpoint_disable+0x142> + 13509: 8b 45 0c mov 0xc(%ebp),%eax + 1350c: 33 45 e4 xor 0xffffffe4(%ebp),%eax + 1350f: c1 e8 07 shr $0x7,%eax + 13512: 83 e0 01 and $0x1,%eax + 13515: 85 c0 test %eax,%eax + 13517: 74 02 je 1351b <_hcd_endpoint_disable+0xd6> + 13519: eb 6c jmp 13587 <_hcd_endpoint_disable+0x142> + 1351b: 8b 45 ec mov 0xffffffec(%ebp),%eax + 1351e: 83 78 1c 8d cmpl $0xffffff8d,0x1c(%eax) + 13522: 74 02 je 13526 <_hcd_endpoint_disable+0xe1> + 13524: eb 61 jmp 13587 <_hcd_endpoint_disable+0x142> + 13526: 83 ec 0c sub $0xc,%esp + 13529: ff 75 ec pushl 0xffffffec(%ebp) + 1352c: e8 3f 4c 00 00 call 18170 <_usb_get_urb@4> + 13531: 83 c4 0c add $0xc,%esp + 13534: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 1353b: 8b 45 ec mov 0xffffffec(%ebp),%eax + 1353e: 8b 40 1c mov 0x1c(%eax),%eax + 13541: 89 45 e4 mov %eax,0xffffffe4(%ebp) + 13544: 83 7d e4 8d cmpl $0xffffff8d,0xffffffe4(%ebp) + 13548: 75 0a jne 13554 <_hcd_endpoint_disable+0x10f> + 1354a: 8b 45 ec mov 0xffffffec(%ebp),%eax + 1354d: c7 40 1c 94 ff ff ff movl $0xffffff94,0x1c(%eax) + 13554: 83 7d e4 8d cmpl $0xffffff8d,0xffffffe4(%ebp) + 13558: 75 1a jne 13574 <_hcd_endpoint_disable+0x12f> + 1355a: 8b 45 ec mov 0xffffffec(%ebp),%eax + 1355d: 8b 40 18 mov 0x18(%eax),%eax + 13560: 89 45 e4 mov %eax,0xffffffe4(%ebp) + 13563: 83 ec 08 sub $0x8,%esp + 13566: ff 75 ec pushl 0xffffffec(%ebp) + 13569: ff 75 f0 pushl 0xfffffff0(%ebp) + 1356c: e8 54 fc ff ff call 131c5 <_unlink1> + 13571: 83 c4 10 add $0x10,%esp + 13574: 83 ec 0c sub $0xc,%esp + 13577: ff 75 ec pushl 0xffffffec(%ebp) + 1357a: e8 b7 4b 00 00 call 18136 <_usb_free_urb@4> + 1357f: 83 c4 0c add $0xc,%esp + 13582: e9 e9 fe ff ff jmp 13470 <_hcd_endpoint_disable+0x2b> + 13587: 8b 45 ec mov 0xffffffec(%ebp),%eax + 1358a: 8b 40 0c mov 0xc(%eax),%eax + 1358d: 83 e8 0c sub $0xc,%eax + 13590: 89 45 ec mov %eax,0xffffffec(%ebp) + 13593: e9 44 ff ff ff jmp 134dc <_hcd_endpoint_disable+0x97> + 13598: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 1359b: 8b 40 74 mov 0x74(%eax),%eax + 1359e: 83 78 30 00 cmpl $0x0,0x30(%eax) + 135a2: 74 1a je 135be <_hcd_endpoint_disable+0x179> + 135a4: 83 ec 04 sub $0x4,%esp + 135a7: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 135aa: 8b 40 74 mov 0x74(%eax),%eax + 135ad: ff 75 0c pushl 0xc(%ebp) + 135b0: ff 75 f4 pushl 0xfffffff4(%ebp) + 135b3: ff 75 f0 pushl 0xfffffff0(%ebp) + 135b6: 8b 40 30 mov 0x30(%eax),%eax + 135b9: ff d0 call *%eax + 135bb: 83 c4 10 add $0x10,%esp + 135be: 8b 5d fc mov 0xfffffffc(%ebp),%ebx + 135c1: c9 leave + 135c2: c3 ret + +000135c3 <_hcd_free_dev>: + 135c3: 55 push %ebp + 135c4: 89 e5 mov %esp,%ebp + 135c6: 83 ec 18 sub $0x18,%esp + 135c9: 83 7d 08 00 cmpl $0x0,0x8(%ebp) + 135cd: 74 0c je 135db <_hcd_free_dev+0x18> + 135cf: 8b 45 08 mov 0x8(%ebp),%eax + 135d2: 83 b8 98 01 00 00 00 cmpl $0x0,0x198(%eax) + 135d9: 75 0c jne 135e7 <_hcd_free_dev+0x24> + 135db: c7 45 f0 ea ff ff ff movl $0xffffffea,0xfffffff0(%ebp) + 135e2: e9 95 00 00 00 jmp 1367c <_hcd_free_dev+0xb9> + 135e7: 8b 45 08 mov 0x8(%ebp),%eax + 135ea: 83 b8 bc 00 00 00 00 cmpl $0x0,0xbc(%eax) + 135f1: 74 0f je 13602 <_hcd_free_dev+0x3f> + 135f3: 8b 45 08 mov 0x8(%ebp),%eax + 135f6: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 135fc: 83 78 30 00 cmpl $0x0,0x30(%eax) + 13600: 75 09 jne 1360b <_hcd_free_dev+0x48> + 13602: c7 45 f0 ed ff ff ff movl $0xffffffed,0xfffffff0(%ebp) + 13609: eb 71 jmp 1367c <_hcd_free_dev+0xb9> + 1360b: 8b 45 08 mov 0x8(%ebp),%eax + 1360e: 8b 80 98 01 00 00 mov 0x198(%eax),%eax + 13614: 89 45 fc mov %eax,0xfffffffc(%ebp) + 13617: 8b 45 08 mov 0x8(%ebp),%eax + 1361a: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 13620: 8b 40 30 mov 0x30(%eax),%eax + 13623: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 13626: 83 ec 0c sub $0xc,%esp + 13629: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 1362c: 83 c0 08 add $0x8,%eax + 1362f: 50 push %eax + 13630: e8 4c 00 00 00 call 13681 <_list_empty> + 13635: 83 c4 10 add $0x10,%esp + 13638: 85 c0 test %eax,%eax + 1363a: 75 09 jne 13645 <_hcd_free_dev+0x82> + 1363c: c7 45 f0 ea ff ff ff movl $0xffffffea,0xfffffff0(%ebp) + 13643: eb 37 jmp 1367c <_hcd_free_dev+0xb9> + 13645: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) + 1364c: 83 ec 0c sub $0xc,%esp + 1364f: ff 75 fc pushl 0xfffffffc(%ebp) + 13652: e8 ba f2 ff ff call 12911 <_list_del> + 13657: 83 c4 10 add $0x10,%esp + 1365a: 8b 45 08 mov 0x8(%ebp),%eax + 1365d: c7 80 98 01 00 00 00 movl $0x0,0x198(%eax) + 13664: 00 00 00 + 13667: 83 ec 0c sub $0xc,%esp + 1366a: ff 75 fc pushl 0xfffffffc(%ebp) + 1366d: e8 ce 63 00 00 call 19a40 <_ExFreePool@4> + 13672: 83 c4 0c add $0xc,%esp + 13675: c7 45 f0 00 00 00 00 movl $0x0,0xfffffff0(%ebp) + 1367c: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 1367f: c9 leave + 13680: c3 ret + +00013681 <_list_empty>: + 13681: 55 push %ebp + 13682: 89 e5 mov %esp,%ebp + 13684: 8b 45 08 mov 0x8(%ebp),%eax + 13687: 8b 00 mov (%eax),%eax + 13689: 3b 45 08 cmp 0x8(%ebp),%eax + 1368c: 0f 94 c0 sete %al + 1368f: 25 ff 00 00 00 and $0xff,%eax + 13694: 5d pop %ebp + 13695: c3 ret + +00013696 <_usb_hcd_giveback_urb@12>: + 13696: 55 push %ebp + 13697: 89 e5 mov %esp,%ebp + 13699: 83 ec 08 sub $0x8,%esp + 1369c: 83 ec 0c sub $0xc,%esp + 1369f: ff 75 0c pushl 0xc(%ebp) + 136a2: e8 90 f8 ff ff call 12f37 <_urb_unlink> + 136a7: 83 c4 10 add $0x10,%esp + 136aa: 8b 45 0c mov 0xc(%ebp),%eax + 136ad: 8b 40 20 mov 0x20(%eax),%eax + 136b0: c1 e8 02 shr $0x2,%eax + 136b3: 83 e0 01 and $0x1,%eax + 136b6: 85 c0 test %eax,%eax + 136b8: 75 00 jne 136ba <_usb_hcd_giveback_urb@12+0x24> + 136ba: 83 ec 08 sub $0x8,%esp + 136bd: 8b 45 0c mov 0xc(%ebp),%eax + 136c0: ff 75 10 pushl 0x10(%ebp) + 136c3: ff 75 0c pushl 0xc(%ebp) + 136c6: 8b 40 58 mov 0x58(%eax),%eax + 136c9: ff d0 call *%eax + 136cb: 83 c4 10 add $0x10,%esp + 136ce: 83 ec 0c sub $0xc,%esp + 136d1: ff 75 0c pushl 0xc(%ebp) + 136d4: e8 5d 4a 00 00 call 18136 <_usb_free_urb@4> + 136d9: 83 c4 0c add $0xc,%esp + 136dc: c9 leave + 136dd: c2 0c 00 ret $0xc + +000136e0 <_usb_hcd_irq>: + 136e0: 55 push %ebp + 136e1: 89 e5 mov %esp,%ebp + 136e3: 83 ec 18 sub $0x18,%esp + 136e6: 8b 45 0c mov 0xc(%ebp),%eax + 136e9: 89 45 fc mov %eax,0xfffffffc(%ebp) + 136ec: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 136ef: 8b 80 e0 00 00 00 mov 0xe0(%eax),%eax + 136f5: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 136f8: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 136fb: 83 b8 e0 00 00 00 00 cmpl $0x0,0xe0(%eax) + 13702: 75 09 jne 1370d <_usb_hcd_irq+0x2d> + 13704: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) + 1370b: eb 46 jmp 13753 <_usb_hcd_irq+0x73> + 1370d: 83 ec 08 sub $0x8,%esp + 13710: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13713: 8b 40 74 mov 0x74(%eax),%eax + 13716: ff 75 10 pushl 0x10(%ebp) + 13719: ff 75 fc pushl 0xfffffffc(%ebp) + 1371c: 8b 40 04 mov 0x4(%eax),%eax + 1371f: ff d0 call *%eax + 13721: 83 c4 10 add $0x10,%esp + 13724: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13727: 8b 80 e0 00 00 00 mov 0xe0(%eax),%eax + 1372d: 3b 45 f8 cmp 0xfffffff8(%ebp),%eax + 13730: 74 1a je 1374c <_usb_hcd_irq+0x6c> + 13732: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13735: 83 b8 e0 00 00 00 00 cmpl $0x0,0xe0(%eax) + 1373c: 75 0e jne 1374c <_usb_hcd_irq+0x6c> + 1373e: 83 ec 0c sub $0xc,%esp + 13741: ff 75 fc pushl 0xfffffffc(%ebp) + 13744: e8 31 00 00 00 call 1377a <_usb_hc_died@4> + 13749: 83 c4 0c add $0xc,%esp + 1374c: c7 45 f4 01 00 00 00 movl $0x1,0xfffffff4(%ebp) + 13753: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 13756: c9 leave + 13757: c3 ret + +00013758 <_hcd_panic>: + 13758: 55 push %ebp + 13759: 89 e5 mov %esp,%ebp + 1375b: 83 ec 08 sub $0x8,%esp + 1375e: 8b 45 08 mov 0x8(%ebp),%eax + 13761: 89 45 fc mov %eax,0xfffffffc(%ebp) + 13764: 83 ec 0c sub $0xc,%esp + 13767: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 1376a: 8b 40 74 mov 0x74(%eax),%eax + 1376d: ff 75 fc pushl 0xfffffffc(%ebp) + 13770: 8b 40 18 mov 0x18(%eax),%eax + 13773: ff d0 call *%eax + 13775: 83 c4 10 add $0x10,%esp + 13778: c9 leave + 13779: c3 ret + +0001377a <_usb_hc_died@4>: + 1377a: 55 push %ebp + 1377b: 89 e5 mov %esp,%ebp + 1377d: 83 ec 18 sub $0x18,%esp + 13780: c7 45 ec 00 00 00 00 movl $0x0,0xffffffec(%ebp) + 13787: 8b 45 08 mov 0x8(%ebp),%eax + 1378a: 83 c0 68 add $0x68,%eax + 1378d: 8b 00 mov (%eax),%eax + 1378f: 89 45 fc mov %eax,0xfffffffc(%ebp) + 13792: 8b 45 08 mov 0x8(%ebp),%eax + 13795: 83 c0 68 add $0x68,%eax + 13798: 3b 45 fc cmp 0xfffffffc(%ebp),%eax + 1379b: 74 4c je 137e9 <_usb_hc_died@4+0x6f> + 1379d: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 137a0: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 137a3: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 137a6: 83 c0 08 add $0x8,%eax + 137a9: 8b 00 mov (%eax),%eax + 137ab: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 137ae: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 137b1: 83 c0 08 add $0x8,%eax + 137b4: 3b 45 f8 cmp 0xfffffff8(%ebp),%eax + 137b7: 74 26 je 137df <_usb_hc_died@4+0x65> + 137b9: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 137bc: 83 e8 0c sub $0xc,%eax + 137bf: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 137c2: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 137c5: 83 78 1c 8d cmpl $0xffffff8d,0x1c(%eax) + 137c9: 75 0a jne 137d5 <_usb_hc_died@4+0x5b> + 137cb: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 137ce: c7 40 1c 94 ff ff ff movl $0xffffff94,0x1c(%eax) + 137d5: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 137d8: 8b 00 mov (%eax),%eax + 137da: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 137dd: eb cf jmp 137ae <_usb_hc_died@4+0x34> + 137df: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 137e2: 8b 00 mov (%eax),%eax + 137e4: 89 45 fc mov %eax,0xfffffffc(%ebp) + 137e7: eb a9 jmp 13792 <_usb_hc_died@4+0x18> + 137e9: 8b 45 08 mov 0x8(%ebp),%eax + 137ec: 8b 40 58 mov 0x58(%eax),%eax + 137ef: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 137f2: 83 7d f0 00 cmpl $0x0,0xfffffff0(%ebp) + 137f6: 74 0a je 13802 <_usb_hc_died@4+0x88> + 137f8: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 137fb: c7 40 1c 94 ff ff ff movl $0xffffff94,0x1c(%eax) + 13802: 8b 45 08 mov 0x8(%ebp),%eax + 13805: 83 c0 70 add $0x70,%eax + 13808: c7 00 58 37 01 00 movl $0x13758,(%eax) + 1380e: 83 ec 0c sub $0xc,%esp + 13811: 8b 45 08 mov 0x8(%ebp),%eax + 13814: 83 c0 70 add $0x70,%eax + 13817: 50 push %eax + 13818: e8 07 00 00 00 call 13824 <_schedule_work> + 1381d: 83 c4 10 add $0x10,%esp + 13820: c9 leave + 13821: c2 04 00 ret $0x4 + +00013824 <_schedule_work>: + 13824: 55 push %ebp + 13825: 89 e5 mov %esp,%ebp + 13827: 5d pop %ebp + 13828: c3 ret + 13829: 90 nop + 1382a: 90 nop + 1382b: 90 nop + 1382c: 90 nop + 1382d: 90 nop + 1382e: 90 nop + 1382f: 90 nop + +00013830 <_usb_hcd_pci_probe@8>: + 13830: 55 push %ebp + 13831: 89 e5 mov %esp,%ebp + 13833: 83 ec 38 sub $0x38,%esp + 13836: e8 ea 3a 00 00 call 17325 <_usb_disabled@0> + 1383b: 85 c0 test %eax,%eax + 1383d: 74 0c je 1384b <_usb_hcd_pci_probe@8+0x1b> + 1383f: c7 45 d4 ed ff ff ff movl $0xffffffed,0xffffffd4(%ebp) + 13846: e9 16 04 00 00 jmp 13c61 <_usb_hcd_pci_probe@8+0x431> + 1384b: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) + 1384f: 74 0d je 1385e <_usb_hcd_pci_probe@8+0x2e> + 13851: 8b 45 0c mov 0xc(%ebp),%eax + 13854: 8b 40 18 mov 0x18(%eax),%eax + 13857: 89 45 fc mov %eax,0xfffffffc(%ebp) + 1385a: 85 c0 test %eax,%eax + 1385c: 75 0c jne 1386a <_usb_hcd_pci_probe@8+0x3a> + 1385e: c7 45 d4 ea ff ff ff movl $0xffffffea,0xffffffd4(%ebp) + 13865: e9 f7 03 00 00 jmp 13c61 <_usb_hcd_pci_probe@8+0x431> + 1386a: 83 ec 0c sub $0xc,%esp + 1386d: ff 75 08 pushl 0x8(%ebp) + 13870: e8 7b 04 00 00 call 13cf0 <_pci_enable_device> + 13875: 83 c4 10 add $0x10,%esp + 13878: 85 c0 test %eax,%eax + 1387a: 79 0c jns 13888 <_usb_hcd_pci_probe@8+0x58> + 1387c: c7 45 d4 ed ff ff ff movl $0xffffffed,0xffffffd4(%ebp) + 13883: e9 d9 03 00 00 jmp 13c61 <_usb_hcd_pci_probe@8+0x431> + 13888: 8b 45 08 mov 0x8(%ebp),%eax + 1388b: 83 78 0c 00 cmpl $0x0,0xc(%eax) + 1388f: 75 0c jne 1389d <_usb_hcd_pci_probe@8+0x6d> + 13891: c7 45 d4 ed ff ff ff movl $0xffffffed,0xffffffd4(%ebp) + 13898: e9 c4 03 00 00 jmp 13c61 <_usb_hcd_pci_probe@8+0x431> + 1389d: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 138a0: 8b 40 08 mov 0x8(%eax),%eax + 138a3: 83 e0 01 and $0x1,%eax + 138a6: 85 c0 test %eax,%eax + 138a8: 0f 84 ec 00 00 00 je 1399a <_usb_hcd_pci_probe@8+0x16a> + 138ae: c7 45 e4 00 00 00 00 movl $0x0,0xffffffe4(%ebp) + 138b5: 83 ec 08 sub $0x8,%esp + 138b8: 6a 00 push $0x0 + 138ba: ff 75 08 pushl 0x8(%ebp) + 138bd: e8 1c 04 00 00 call 13cde <_pci_resource_start> + 138c2: 83 c4 10 add $0x10,%esp + 138c5: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 138c8: 83 ec 08 sub $0x8,%esp + 138cb: 6a 00 push $0x0 + 138cd: ff 75 08 pushl 0x8(%ebp) + 138d0: e8 ff 03 00 00 call 13cd4 <_pci_resource_len> + 138d5: 83 c4 10 add $0x10,%esp + 138d8: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 138db: 83 ec 04 sub $0x4,%esp + 138de: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 138e1: ff 30 pushl (%eax) + 138e3: ff 75 f4 pushl 0xfffffff4(%ebp) + 138e6: ff 75 f8 pushl 0xfffffff8(%ebp) + 138e9: e8 dc 03 00 00 call 13cca <_request_mem_region> + 138ee: 83 c4 10 add $0x10,%esp + 138f1: 85 c0 test %eax,%eax + 138f3: 75 38 jne 1392d <_usb_hcd_pci_probe@8+0xfd> + 138f5: 83 ec 04 sub $0x4,%esp + 138f8: 6a 5c push $0x5c + 138fa: 68 c0 b0 01 00 push $0x1b0c0 + 138ff: 68 ca b0 01 00 push $0x1b0ca + 13904: e8 57 61 00 00 call 19a60 <_DbgPrint> + 13909: 83 c4 10 add $0x10,%esp + 1390c: 83 ec 08 sub $0x8,%esp + 1390f: 68 c0 b0 01 00 push $0x1b0c0 + 13914: 68 d4 b0 01 00 push $0x1b0d4 + 13919: e8 42 61 00 00 call 19a60 <_DbgPrint> + 1391e: 83 c4 10 add $0x10,%esp + 13921: c7 45 d4 f0 ff ff ff movl $0xfffffff0,0xffffffd4(%ebp) + 13928: e9 34 03 00 00 jmp 13c61 <_usb_hcd_pci_probe@8+0x431> + 1392d: 83 ec 08 sub $0x8,%esp + 13930: ff 75 f4 pushl 0xfffffff4(%ebp) + 13933: ff 75 f8 pushl 0xfffffff8(%ebp) + 13936: e8 87 03 00 00 call 13cc2 <_ioremap_nocache> + 1393b: 83 c4 10 add $0x10,%esp + 1393e: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 13941: 83 7d f0 00 cmpl $0x0,0xfffffff0(%ebp) + 13945: 0f 85 13 01 00 00 jne 13a5e <_usb_hcd_pci_probe@8+0x22e> + 1394b: 83 ec 04 sub $0x4,%esp + 1394e: 6a 61 push $0x61 + 13950: 68 c0 b0 01 00 push $0x1b0c0 + 13955: 68 ca b0 01 00 push $0x1b0ca + 1395a: e8 01 61 00 00 call 19a60 <_DbgPrint> + 1395f: 83 c4 10 add $0x10,%esp + 13962: 83 ec 08 sub $0x8,%esp + 13965: 68 c0 b0 01 00 push $0x1b0c0 + 1396a: 68 f8 b0 01 00 push $0x1b0f8 + 1396f: e8 ec 60 00 00 call 19a60 <_DbgPrint> + 13974: 83 c4 10 add $0x10,%esp + 13977: c7 45 e8 f2 ff ff ff movl $0xfffffff2,0xffffffe8(%ebp) + 1397e: 83 ec 08 sub $0x8,%esp + 13981: ff 75 f4 pushl 0xfffffff4(%ebp) + 13984: ff 75 f8 pushl 0xfffffff8(%ebp) + 13987: e8 2c 03 00 00 call 13cb8 <_release_mem_region> + 1398c: 83 c4 10 add $0x10,%esp + 1398f: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 13992: 89 45 d4 mov %eax,0xffffffd4(%ebp) + 13995: e9 c7 02 00 00 jmp 13c61 <_usb_hcd_pci_probe@8+0x431> + 1399a: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) + 139a1: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 139a8: c7 45 e4 00 00 00 00 movl $0x0,0xffffffe4(%ebp) + 139af: 83 7d e4 00 cmpl $0x0,0xffffffe4(%ebp) + 139b3: 79 65 jns 13a1a <_usb_hcd_pci_probe@8+0x1ea> + 139b5: 83 ec 08 sub $0x8,%esp + 139b8: ff 75 e4 pushl 0xffffffe4(%ebp) + 139bb: ff 75 08 pushl 0x8(%ebp) + 139be: e8 e3 02 00 00 call 13ca6 <_pci_resource_flags> + 139c3: 83 c4 10 add $0x10,%esp + 139c6: 83 e0 01 and $0x1,%eax + 139c9: 85 c0 test %eax,%eax + 139cb: 75 02 jne 139cf <_usb_hcd_pci_probe@8+0x19f> + 139cd: eb 44 jmp 13a13 <_usb_hcd_pci_probe@8+0x1e3> + 139cf: 83 ec 08 sub $0x8,%esp + 139d2: ff 75 e4 pushl 0xffffffe4(%ebp) + 139d5: ff 75 08 pushl 0x8(%ebp) + 139d8: e8 01 03 00 00 call 13cde <_pci_resource_start> + 139dd: 83 c4 10 add $0x10,%esp + 139e0: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 139e3: 83 ec 08 sub $0x8,%esp + 139e6: ff 75 e4 pushl 0xffffffe4(%ebp) + 139e9: ff 75 08 pushl 0x8(%ebp) + 139ec: e8 e3 02 00 00 call 13cd4 <_pci_resource_len> + 139f1: 83 c4 10 add $0x10,%esp + 139f4: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 139f7: 83 ec 04 sub $0x4,%esp + 139fa: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 139fd: ff 30 pushl (%eax) + 139ff: ff 75 f4 pushl 0xfffffff4(%ebp) + 13a02: ff 75 f8 pushl 0xfffffff8(%ebp) + 13a05: e8 92 02 00 00 call 13c9c <_request_region> + 13a0a: 83 c4 10 add $0x10,%esp + 13a0d: 85 c0 test %eax,%eax + 13a0f: 74 02 je 13a13 <_usb_hcd_pci_probe@8+0x1e3> + 13a11: eb 07 jmp 13a1a <_usb_hcd_pci_probe@8+0x1ea> + 13a13: 8d 45 e4 lea 0xffffffe4(%ebp),%eax + 13a16: ff 00 incl (%eax) + 13a18: eb 95 jmp 139af <_usb_hcd_pci_probe@8+0x17f> + 13a1a: 83 7d e4 00 cmpl $0x0,0xffffffe4(%ebp) + 13a1e: 75 38 jne 13a58 <_usb_hcd_pci_probe@8+0x228> + 13a20: 83 ec 04 sub $0x4,%esp + 13a23: 6a 76 push $0x76 + 13a25: 68 c0 b0 01 00 push $0x1b0c0 + 13a2a: 68 ca b0 01 00 push $0x1b0ca + 13a2f: e8 2c 60 00 00 call 19a60 <_DbgPrint> + 13a34: 83 c4 10 add $0x10,%esp + 13a37: 83 ec 08 sub $0x8,%esp + 13a3a: 68 c0 b0 01 00 push $0x1b0c0 + 13a3f: 68 18 b1 01 00 push $0x1b118 + 13a44: e8 17 60 00 00 call 19a60 <_DbgPrint> + 13a49: 83 c4 10 add $0x10,%esp + 13a4c: c7 45 d4 f0 ff ff ff movl $0xfffffff0,0xffffffd4(%ebp) + 13a53: e9 09 02 00 00 jmp 13c61 <_usb_hcd_pci_probe@8+0x431> + 13a58: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 13a5b: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 13a5e: 83 ec 0c sub $0xc,%esp + 13a61: ff 75 08 pushl 0x8(%ebp) + 13a64: e8 29 02 00 00 call 13c92 <_pci_set_master> + 13a69: 83 c4 10 add $0x10,%esp + 13a6c: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13a6f: 8b 40 20 mov 0x20(%eax),%eax + 13a72: ff d0 call *%eax + 13a74: 89 45 ec mov %eax,0xffffffec(%ebp) + 13a77: 83 7d ec 00 cmpl $0x0,0xffffffec(%ebp) + 13a7b: 75 72 jne 13aef <_usb_hcd_pci_probe@8+0x2bf> + 13a7d: 83 ec 04 sub $0x4,%esp + 13a80: 68 83 00 00 00 push $0x83 + 13a85: 68 c0 b0 01 00 push $0x1b0c0 + 13a8a: 68 ca b0 01 00 push $0x1b0ca + 13a8f: e8 cc 5f 00 00 call 19a60 <_DbgPrint> + 13a94: 83 c4 10 add $0x10,%esp + 13a97: 83 ec 08 sub $0x8,%esp + 13a9a: 68 c0 b0 01 00 push $0x1b0c0 + 13a9f: 68 3b b1 01 00 push $0x1b13b + 13aa4: e8 b7 5f 00 00 call 19a60 <_DbgPrint> + 13aa9: 83 c4 10 add $0x10,%esp + 13aac: c7 45 e8 f4 ff ff ff movl $0xfffffff4,0xffffffe8(%ebp) + 13ab3: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13ab6: 8b 40 08 mov 0x8(%eax),%eax + 13ab9: 83 e0 01 and $0x1,%eax + 13abc: 85 c0 test %eax,%eax + 13abe: 74 13 je 13ad3 <_usb_hcd_pci_probe@8+0x2a3> + 13ac0: 83 ec 0c sub $0xc,%esp + 13ac3: ff 75 f0 pushl 0xfffffff0(%ebp) + 13ac6: e8 bd 01 00 00 call 13c88 <_iounmap> + 13acb: 83 c4 10 add $0x10,%esp + 13ace: e9 ab fe ff ff jmp 1397e <_usb_hcd_pci_probe@8+0x14e> + 13ad3: 83 ec 08 sub $0x8,%esp + 13ad6: ff 75 f4 pushl 0xfffffff4(%ebp) + 13ad9: ff 75 f8 pushl 0xfffffff8(%ebp) + 13adc: e8 9d 01 00 00 call 13c7e <_release_region> + 13ae1: 83 c4 10 add $0x10,%esp + 13ae4: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 13ae7: 89 45 d4 mov %eax,0xffffffd4(%ebp) + 13aea: e9 72 01 00 00 jmp 13c61 <_usb_hcd_pci_probe@8+0x431> + 13aef: 83 ec 08 sub $0x8,%esp + 13af2: ff 75 ec pushl 0xffffffec(%ebp) + 13af5: ff 75 08 pushl 0x8(%ebp) + 13af8: e8 6b 01 00 00 call 13c68 <_pci_set_drvdata> + 13afd: 83 c4 10 add $0x10,%esp + 13b00: 8b 55 ec mov 0xffffffec(%ebp),%edx + 13b03: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13b06: 89 42 74 mov %eax,0x74(%edx) + 13b09: 8b 55 ec mov 0xffffffec(%ebp),%edx + 13b0c: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13b0f: 8b 00 mov (%eax),%eax + 13b11: 89 42 50 mov %eax,0x50(%edx) + 13b14: 8b 55 ec mov 0xffffffec(%ebp),%edx + 13b17: 8b 45 08 mov 0x8(%ebp),%eax + 13b1a: 89 82 84 00 00 00 mov %eax,0x84(%edx) + 13b20: 8b 55 ec mov 0xffffffec(%ebp),%edx + 13b23: 8b 45 08 mov 0x8(%ebp),%eax + 13b26: 8b 40 10 mov 0x10(%eax),%eax + 13b29: 89 42 08 mov %eax,0x8(%edx) + 13b2c: 8b 55 ec mov 0xffffffec(%ebp),%edx + 13b2f: 8b 45 08 mov 0x8(%ebp),%eax + 13b32: 83 c0 14 add $0x14,%eax + 13b35: 89 42 4c mov %eax,0x4c(%edx) + 13b38: 8b 55 ec mov 0xffffffec(%ebp),%edx + 13b3b: 8b 45 08 mov 0x8(%ebp),%eax + 13b3e: 83 c0 14 add $0x14,%eax + 13b41: 89 02 mov %eax,(%edx) + 13b43: 8b 55 ec mov 0xffffffec(%ebp),%edx + 13b46: 8b 45 ec mov 0xffffffec(%ebp),%eax + 13b49: 8b 00 mov (%eax),%eax + 13b4b: 89 82 80 00 00 00 mov %eax,0x80(%edx) + 13b51: 83 ec 0c sub $0xc,%esp + 13b54: ff 75 ec pushl 0xffffffec(%ebp) + 13b57: e8 c4 49 00 00 call 18520 <_hcd_buffer_create> + 13b5c: 83 c4 10 add $0x10,%esp + 13b5f: 89 45 e8 mov %eax,0xffffffe8(%ebp) + 13b62: 83 7d e8 00 cmpl $0x0,0xffffffe8(%ebp) + 13b66: 74 16 je 13b7e <_usb_hcd_pci_probe@8+0x34e> + 13b68: 83 ec 0c sub $0xc,%esp + 13b6b: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13b6e: ff 75 ec pushl 0xffffffec(%ebp) + 13b71: 8b 40 24 mov 0x24(%eax),%eax + 13b74: ff d0 call *%eax + 13b76: 83 c4 10 add $0x10,%esp + 13b79: e9 35 ff ff ff jmp 13ab3 <_usb_hcd_pci_probe@8+0x283> + 13b7e: 83 ec 04 sub $0x4,%esp + 13b81: 8b 45 08 mov 0x8(%ebp),%eax + 13b84: ff 70 0c pushl 0xc(%eax) + 13b87: 68 54 b1 01 00 push $0x1b154 + 13b8c: 8d 45 d8 lea 0xffffffd8(%ebp),%eax + 13b8f: 50 push %eax + 13b90: e8 fb 5e 00 00 call 19a90 <_sprintf> + 13b95: 83 c4 10 add $0x10,%esp + 13b98: 83 ec 0c sub $0xc,%esp + 13b9b: ff 75 ec pushl 0xffffffec(%ebp) + 13b9e: 8b 45 ec mov 0xffffffec(%ebp),%eax + 13ba1: ff 70 50 pushl 0x50(%eax) + 13ba4: 6a 00 push $0x0 + 13ba6: 68 e0 36 01 00 push $0x136e0 + 13bab: 8b 45 08 mov 0x8(%ebp),%eax + 13bae: ff 70 0c pushl 0xc(%eax) + 13bb1: e8 e0 5d 00 00 call 19996 <_my_request_irq> + 13bb6: 83 c4 20 add $0x20,%esp + 13bb9: 85 c0 test %eax,%eax + 13bbb: 74 09 je 13bc6 <_usb_hcd_pci_probe@8+0x396> + 13bbd: c7 45 e8 f0 ff ff ff movl $0xfffffff0,0xffffffe8(%ebp) + 13bc4: eb a2 jmp 13b68 <_usb_hcd_pci_probe@8+0x338> + 13bc6: 8b 55 ec mov 0xffffffec(%ebp),%edx + 13bc9: 8b 45 08 mov 0x8(%ebp),%eax + 13bcc: 8b 40 0c mov 0xc(%eax),%eax + 13bcf: 89 42 78 mov %eax,0x78(%edx) + 13bd2: 8b 55 ec mov 0xffffffec(%ebp),%edx + 13bd5: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 13bd8: 89 42 7c mov %eax,0x7c(%edx) + 13bdb: 8b 55 ec mov 0xffffffec(%ebp),%edx + 13bde: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 13be1: 89 82 88 00 00 00 mov %eax,0x88(%edx) + 13be7: 83 ec 0c sub $0xc,%esp + 13bea: ff 75 ec pushl 0xffffffec(%ebp) + 13bed: e8 ec e9 ff ff call 125de <_usb_bus_init@4> + 13bf2: 83 c4 0c add $0xc,%esp + 13bf5: 8b 45 ec mov 0xffffffec(%ebp),%eax + 13bf8: c7 40 20 20 a0 01 00 movl $0x1a020,0x20(%eax) + 13bff: 8b 55 ec mov 0xffffffec(%ebp),%edx + 13c02: 8b 45 ec mov 0xffffffec(%ebp),%eax + 13c05: 89 42 30 mov %eax,0x30(%edx) + 13c08: 8b 55 ec mov 0xffffffec(%ebp),%edx + 13c0b: 83 c2 68 add $0x68,%edx + 13c0e: 8b 45 ec mov 0xffffffec(%ebp),%eax + 13c11: 83 c0 68 add $0x68,%eax + 13c14: 89 02 mov %eax,(%edx) + 13c16: 8b 55 ec mov 0xffffffec(%ebp),%edx + 13c19: 83 c2 68 add $0x68,%edx + 13c1c: 8b 45 ec mov 0xffffffec(%ebp),%eax + 13c1f: 83 c0 68 add $0x68,%eax + 13c22: 89 42 04 mov %eax,0x4(%edx) + 13c25: 83 ec 0c sub $0xc,%esp + 13c28: ff 75 ec pushl 0xffffffec(%ebp) + 13c2b: e8 a8 ea ff ff call 126d8 <_usb_register_bus@4> + 13c30: 83 c4 0c add $0xc,%esp + 13c33: 83 ec 0c sub $0xc,%esp + 13c36: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13c39: ff 75 ec pushl 0xffffffec(%ebp) + 13c3c: 8b 40 0c mov 0xc(%eax),%eax + 13c3f: ff d0 call *%eax + 13c41: 83 c4 10 add $0x10,%esp + 13c44: 89 45 e8 mov %eax,0xffffffe8(%ebp) + 13c47: 83 7d e8 00 cmpl $0x0,0xffffffe8(%ebp) + 13c4b: 79 0e jns 13c5b <_usb_hcd_pci_probe@8+0x42b> + 13c4d: 83 ec 0c sub $0xc,%esp + 13c50: ff 75 08 pushl 0x8(%ebp) + 13c53: e8 a2 00 00 00 call 13cfa <_usb_hcd_pci_remove@4> + 13c58: 83 c4 0c add $0xc,%esp + 13c5b: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 13c5e: 89 45 d4 mov %eax,0xffffffd4(%ebp) + 13c61: 8b 45 d4 mov 0xffffffd4(%ebp),%eax + 13c64: c9 leave + 13c65: c2 08 00 ret $0x8 + +00013c68 <_pci_set_drvdata>: + 13c68: 55 push %ebp + 13c69: 89 e5 mov %esp,%ebp + 13c6b: 8b 45 08 mov 0x8(%ebp),%eax + 13c6e: 8b 55 0c mov 0xc(%ebp),%edx + 13c71: 89 90 e4 00 00 00 mov %edx,0xe4(%eax) + 13c77: b8 00 00 00 00 mov $0x0,%eax + 13c7c: 5d pop %ebp + 13c7d: c3 ret + +00013c7e <_release_region>: + 13c7e: 55 push %ebp + 13c7f: 89 e5 mov %esp,%ebp + 13c81: b8 00 00 00 00 mov $0x0,%eax + 13c86: 5d pop %ebp + 13c87: c3 ret + +00013c88 <_iounmap>: + 13c88: 55 push %ebp + 13c89: 89 e5 mov %esp,%ebp + 13c8b: b8 00 00 00 00 mov $0x0,%eax + 13c90: 5d pop %ebp + 13c91: c3 ret + +00013c92 <_pci_set_master>: + 13c92: 55 push %ebp + 13c93: 89 e5 mov %esp,%ebp + 13c95: b8 00 00 00 00 mov $0x0,%eax + 13c9a: 5d pop %ebp + 13c9b: c3 ret + +00013c9c <_request_region>: + 13c9c: 55 push %ebp + 13c9d: 89 e5 mov %esp,%ebp + 13c9f: b8 00 00 00 00 mov $0x0,%eax + 13ca4: 5d pop %ebp + 13ca5: c3 ret + +00013ca6 <_pci_resource_flags>: + 13ca6: 55 push %ebp + 13ca7: 89 e5 mov %esp,%ebp + 13ca9: 8b 55 08 mov 0x8(%ebp),%edx + 13cac: 8b 45 0c mov 0xc(%ebp),%eax + 13caf: 8b 84 82 d4 00 00 00 mov 0xd4(%edx,%eax,4),%eax + 13cb6: 5d pop %ebp + 13cb7: c3 ret + +00013cb8 <_release_mem_region>: + 13cb8: 55 push %ebp + 13cb9: 89 e5 mov %esp,%ebp + 13cbb: b8 00 00 00 00 mov $0x0,%eax + 13cc0: 5d pop %ebp + 13cc1: c3 ret + +00013cc2 <_ioremap_nocache>: + 13cc2: 55 push %ebp + 13cc3: 89 e5 mov %esp,%ebp + 13cc5: 8b 45 08 mov 0x8(%ebp),%eax + 13cc8: 5d pop %ebp + 13cc9: c3 ret + +00013cca <_request_mem_region>: + 13cca: 55 push %ebp + 13ccb: 89 e5 mov %esp,%ebp + 13ccd: b8 01 00 00 00 mov $0x1,%eax + 13cd2: 5d pop %ebp + 13cd3: c3 ret + +00013cd4 <_pci_resource_len>: + 13cd4: 55 push %ebp + 13cd5: 89 e5 mov %esp,%ebp + 13cd7: b8 00 00 00 00 mov $0x0,%eax + 13cdc: 5d pop %ebp + 13cdd: c3 ret + +00013cde <_pci_resource_start>: + 13cde: 55 push %ebp + 13cdf: 89 e5 mov %esp,%ebp + 13ce1: 8b 55 08 mov 0x8(%ebp),%edx + 13ce4: 8b 45 0c mov 0xc(%ebp),%eax + 13ce7: 8b 84 82 c4 00 00 00 mov 0xc4(%edx,%eax,4),%eax + 13cee: 5d pop %ebp + 13cef: c3 ret + +00013cf0 <_pci_enable_device>: + 13cf0: 55 push %ebp + 13cf1: 89 e5 mov %esp,%ebp + 13cf3: b8 00 00 00 00 mov $0x0,%eax + 13cf8: 5d pop %ebp + 13cf9: c3 ret + +00013cfa <_usb_hcd_pci_remove@4>: + 13cfa: 55 push %ebp + 13cfb: 89 e5 mov %esp,%ebp + 13cfd: 83 ec 08 sub $0x8,%esp + 13d00: 83 ec 0c sub $0xc,%esp + 13d03: ff 75 08 pushl 0x8(%ebp) + 13d06: e8 22 01 00 00 call 13e2d <_pci_get_drvdata> + 13d0b: 83 c4 10 add $0x10,%esp + 13d0e: 89 45 fc mov %eax,0xfffffffc(%ebp) + 13d11: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) + 13d15: 75 05 jne 13d1c <_usb_hcd_pci_remove@4+0x22> + 13d17: e9 0d 01 00 00 jmp 13e29 <_usb_hcd_pci_remove@4+0x12f> + 13d1c: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13d1f: 8b 40 24 mov 0x24(%eax),%eax + 13d22: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 13d25: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13d28: c7 80 e0 00 00 00 85 movl $0x85,0xe0(%eax) + 13d2f: 00 00 00 + 13d32: 83 ec 0c sub $0xc,%esp + 13d35: 8d 45 f8 lea 0xfffffff8(%ebp),%eax + 13d38: 50 push %eax + 13d39: e8 d3 28 00 00 call 16611 <_usb_disconnect> + 13d3e: 83 c4 10 add $0x10,%esp + 13d41: 83 ec 0c sub $0xc,%esp + 13d44: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13d47: 8b 40 74 mov 0x74(%eax),%eax + 13d4a: ff 75 fc pushl 0xfffffffc(%ebp) + 13d4d: 8b 40 18 mov 0x18(%eax),%eax + 13d50: ff d0 call *%eax + 13d52: 83 c4 10 add $0x10,%esp + 13d55: 83 ec 0c sub $0xc,%esp + 13d58: ff 75 fc pushl 0xfffffffc(%ebp) + 13d5b: e8 ca 47 00 00 call 1852a <_hcd_buffer_destroy> + 13d60: 83 c4 10 add $0x10,%esp + 13d63: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13d66: c7 80 e0 00 00 00 00 movl $0x0,0xe0(%eax) + 13d6d: 00 00 00 + 13d70: 6a 00 push $0x0 + 13d72: ff 75 08 pushl 0x8(%ebp) + 13d75: e8 ee fe ff ff call 13c68 <_pci_set_drvdata> + 13d7a: 83 c4 08 add $0x8,%esp + 13d7d: 83 ec 08 sub $0x8,%esp + 13d80: ff 75 fc pushl 0xfffffffc(%ebp) + 13d83: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13d86: ff 70 78 pushl 0x78(%eax) + 13d89: e8 86 5c 00 00 call 19a14 <_my_free_irq> + 13d8e: 83 c4 10 add $0x10,%esp + 13d91: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13d94: 8b 40 74 mov 0x74(%eax),%eax + 13d97: 8b 40 08 mov 0x8(%eax),%eax + 13d9a: 83 e0 01 and $0x1,%eax + 13d9d: 85 c0 test %eax,%eax + 13d9f: 74 34 je 13dd5 <_usb_hcd_pci_remove@4+0xdb> + 13da1: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13da4: ff 70 7c pushl 0x7c(%eax) + 13da7: e8 dc fe ff ff call 13c88 <_iounmap> + 13dac: 83 c4 04 add $0x4,%esp + 13daf: 6a 00 push $0x0 + 13db1: ff 75 08 pushl 0x8(%ebp) + 13db4: e8 1b ff ff ff call 13cd4 <_pci_resource_len> + 13db9: 83 c4 08 add $0x8,%esp + 13dbc: 50 push %eax + 13dbd: 6a 00 push $0x0 + 13dbf: ff 75 08 pushl 0x8(%ebp) + 13dc2: e8 17 ff ff ff call 13cde <_pci_resource_start> + 13dc7: 83 c4 08 add $0x8,%esp + 13dca: 50 push %eax + 13dcb: e8 e8 fe ff ff call 13cb8 <_release_mem_region> + 13dd0: 83 c4 08 add $0x8,%esp + 13dd3: eb 32 jmp 13e07 <_usb_hcd_pci_remove@4+0x10d> + 13dd5: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13dd8: ff b0 88 00 00 00 pushl 0x88(%eax) + 13dde: ff 75 08 pushl 0x8(%ebp) + 13de1: e8 ee fe ff ff call 13cd4 <_pci_resource_len> + 13de6: 83 c4 08 add $0x8,%esp + 13de9: 50 push %eax + 13dea: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13ded: ff b0 88 00 00 00 pushl 0x88(%eax) + 13df3: ff 75 08 pushl 0x8(%ebp) + 13df6: e8 e3 fe ff ff call 13cde <_pci_resource_start> + 13dfb: 83 c4 08 add $0x8,%esp + 13dfe: 50 push %eax + 13dff: e8 7a fe ff ff call 13c7e <_release_region> + 13e04: 83 c4 08 add $0x8,%esp + 13e07: 83 ec 0c sub $0xc,%esp + 13e0a: ff 75 fc pushl 0xfffffffc(%ebp) + 13e0d: e8 9e ea ff ff call 128b0 <_usb_deregister_bus@4> + 13e12: 83 c4 0c add $0xc,%esp + 13e15: 83 ec 0c sub $0xc,%esp + 13e18: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13e1b: 8b 40 74 mov 0x74(%eax),%eax + 13e1e: ff 75 fc pushl 0xfffffffc(%ebp) + 13e21: 8b 40 24 mov 0x24(%eax),%eax + 13e24: ff d0 call *%eax + 13e26: 83 c4 10 add $0x10,%esp + 13e29: c9 leave + 13e2a: c2 04 00 ret $0x4 + +00013e2d <_pci_get_drvdata>: + 13e2d: 55 push %ebp + 13e2e: 89 e5 mov %esp,%ebp + 13e30: 8b 45 08 mov 0x8(%ebp),%eax + 13e33: 8b 80 e4 00 00 00 mov 0xe4(%eax),%eax + 13e39: 5d pop %ebp + 13e3a: c3 ret + 13e3b: 90 nop + 13e3c: 90 nop + 13e3d: 90 nop + 13e3e: 90 nop + 13e3f: 90 nop + +00013e40 <_get_hub_descriptor>: + 13e40: 55 push %ebp + 13e41: 89 e5 mov %esp,%ebp + 13e43: 83 ec 08 sub $0x8,%esp + 13e46: 83 ec 0c sub $0xc,%esp + 13e49: 68 f4 01 00 00 push $0x1f4 + 13e4e: 8b 45 10 mov 0x10(%ebp),%eax + 13e51: 25 ff ff 00 00 and $0xffff,%eax + 13e56: 50 push %eax + 13e57: ff 75 0c pushl 0xc(%ebp) + 13e5a: 6a 00 push $0x0 + 13e5c: 68 00 29 00 00 push $0x2900 + 13e61: 68 a0 00 00 00 push $0xa0 + 13e66: 6a 06 push $0x6 + 13e68: 6a 00 push $0x0 + 13e6a: ff 75 08 pushl 0x8(%ebp) + 13e6d: e8 16 00 00 00 call 13e88 <___create_pipe> + 13e72: 83 c4 08 add $0x8,%esp + 13e75: 0d 80 00 00 80 or $0x80000080,%eax + 13e7a: 50 push %eax + 13e7b: ff 75 08 pushl 0x8(%ebp) + 13e7e: e8 6d d3 ff ff call 111f0 <_usb_control_msg> + 13e83: 83 c4 30 add $0x30,%esp + 13e86: c9 leave + 13e87: c3 ret + +00013e88 <___create_pipe>: + 13e88: 55 push %ebp + 13e89: 89 e5 mov %esp,%ebp + 13e8b: 8b 45 08 mov 0x8(%ebp),%eax + 13e8e: 8b 00 mov (%eax),%eax + 13e90: c1 e0 08 shl $0x8,%eax + 13e93: 8b 55 0c mov 0xc(%ebp),%edx + 13e96: c1 e2 0f shl $0xf,%edx + 13e99: 09 d0 or %edx,%eax + 13e9b: 5d pop %ebp + 13e9c: c3 ret + +00013e9d <_clear_hub_feature>: + 13e9d: 55 push %ebp + 13e9e: 89 e5 mov %esp,%ebp + 13ea0: 83 ec 08 sub $0x8,%esp + 13ea3: 83 ec 0c sub $0xc,%esp + 13ea6: 6a 64 push $0x64 + 13ea8: 6a 00 push $0x0 + 13eaa: 6a 00 push $0x0 + 13eac: 6a 00 push $0x0 + 13eae: 8b 45 0c mov 0xc(%ebp),%eax + 13eb1: 25 ff ff 00 00 and $0xffff,%eax + 13eb6: 50 push %eax + 13eb7: 6a 20 push $0x20 + 13eb9: 6a 01 push $0x1 + 13ebb: 6a 00 push $0x0 + 13ebd: ff 75 08 pushl 0x8(%ebp) + 13ec0: e8 c3 ff ff ff call 13e88 <___create_pipe> + 13ec5: 83 c4 08 add $0x8,%esp + 13ec8: 0d 00 00 00 80 or $0x80000000,%eax + 13ecd: 50 push %eax + 13ece: ff 75 08 pushl 0x8(%ebp) + 13ed1: e8 1a d3 ff ff call 111f0 <_usb_control_msg> + 13ed6: 83 c4 30 add $0x30,%esp + 13ed9: c9 leave + 13eda: c3 ret + +00013edb <_clear_port_feature>: + 13edb: 55 push %ebp + 13edc: 89 e5 mov %esp,%ebp + 13ede: 83 ec 08 sub $0x8,%esp + 13ee1: 83 ec 0c sub $0xc,%esp + 13ee4: 6a 64 push $0x64 + 13ee6: 6a 00 push $0x0 + 13ee8: 6a 00 push $0x0 + 13eea: 8b 45 0c mov 0xc(%ebp),%eax + 13eed: 25 ff ff 00 00 and $0xffff,%eax + 13ef2: 50 push %eax + 13ef3: 8b 45 10 mov 0x10(%ebp),%eax + 13ef6: 25 ff ff 00 00 and $0xffff,%eax + 13efb: 50 push %eax + 13efc: 6a 23 push $0x23 + 13efe: 6a 01 push $0x1 + 13f00: 6a 00 push $0x0 + 13f02: ff 75 08 pushl 0x8(%ebp) + 13f05: e8 7e ff ff ff call 13e88 <___create_pipe> + 13f0a: 83 c4 08 add $0x8,%esp + 13f0d: 0d 00 00 00 80 or $0x80000000,%eax + 13f12: 50 push %eax + 13f13: ff 75 08 pushl 0x8(%ebp) + 13f16: e8 d5 d2 ff ff call 111f0 <_usb_control_msg> + 13f1b: 83 c4 30 add $0x30,%esp + 13f1e: c9 leave + 13f1f: c3 ret + +00013f20 <_set_port_feature>: + 13f20: 55 push %ebp + 13f21: 89 e5 mov %esp,%ebp + 13f23: 83 ec 08 sub $0x8,%esp + 13f26: 83 ec 0c sub $0xc,%esp + 13f29: 6a 64 push $0x64 + 13f2b: 6a 00 push $0x0 + 13f2d: 6a 00 push $0x0 + 13f2f: 8b 45 0c mov 0xc(%ebp),%eax + 13f32: 25 ff ff 00 00 and $0xffff,%eax + 13f37: 50 push %eax + 13f38: 8b 45 10 mov 0x10(%ebp),%eax + 13f3b: 25 ff ff 00 00 and $0xffff,%eax + 13f40: 50 push %eax + 13f41: 6a 23 push $0x23 + 13f43: 6a 03 push $0x3 + 13f45: 6a 00 push $0x0 + 13f47: ff 75 08 pushl 0x8(%ebp) + 13f4a: e8 39 ff ff ff call 13e88 <___create_pipe> + 13f4f: 83 c4 08 add $0x8,%esp + 13f52: 0d 00 00 00 80 or $0x80000000,%eax + 13f57: 50 push %eax + 13f58: ff 75 08 pushl 0x8(%ebp) + 13f5b: e8 90 d2 ff ff call 111f0 <_usb_control_msg> + 13f60: 83 c4 30 add $0x30,%esp + 13f63: c9 leave + 13f64: c3 ret + +00013f65 <_get_hub_status>: + 13f65: 55 push %ebp + 13f66: 89 e5 mov %esp,%ebp + 13f68: 83 ec 08 sub $0x8,%esp + 13f6b: 83 ec 0c sub $0xc,%esp + 13f6e: 68 f4 01 00 00 push $0x1f4 + 13f73: 6a 04 push $0x4 + 13f75: ff 75 0c pushl 0xc(%ebp) + 13f78: 6a 00 push $0x0 + 13f7a: 6a 00 push $0x0 + 13f7c: 68 a0 00 00 00 push $0xa0 + 13f81: 6a 00 push $0x0 + 13f83: 6a 00 push $0x0 + 13f85: ff 75 08 pushl 0x8(%ebp) + 13f88: e8 fb fe ff ff call 13e88 <___create_pipe> + 13f8d: 83 c4 08 add $0x8,%esp + 13f90: 0d 80 00 00 80 or $0x80000080,%eax + 13f95: 50 push %eax + 13f96: ff 75 08 pushl 0x8(%ebp) + 13f99: e8 52 d2 ff ff call 111f0 <_usb_control_msg> + 13f9e: 83 c4 30 add $0x30,%esp + 13fa1: c9 leave + 13fa2: c3 ret + +00013fa3 <_get_port_status>: + 13fa3: 55 push %ebp + 13fa4: 89 e5 mov %esp,%ebp + 13fa6: 83 ec 08 sub $0x8,%esp + 13fa9: 83 ec 0c sub $0xc,%esp + 13fac: 68 f4 01 00 00 push $0x1f4 + 13fb1: 6a 04 push $0x4 + 13fb3: ff 75 10 pushl 0x10(%ebp) + 13fb6: 8b 45 0c mov 0xc(%ebp),%eax + 13fb9: 25 ff ff 00 00 and $0xffff,%eax + 13fbe: 50 push %eax + 13fbf: 6a 00 push $0x0 + 13fc1: 68 a3 00 00 00 push $0xa3 + 13fc6: 6a 00 push $0x0 + 13fc8: 6a 00 push $0x0 + 13fca: ff 75 08 pushl 0x8(%ebp) + 13fcd: e8 b6 fe ff ff call 13e88 <___create_pipe> + 13fd2: 83 c4 08 add $0x8,%esp + 13fd5: 0d 80 00 00 80 or $0x80000080,%eax + 13fda: 50 push %eax + 13fdb: ff 75 08 pushl 0x8(%ebp) + 13fde: e8 0d d2 ff ff call 111f0 <_usb_control_msg> + 13fe3: 83 c4 30 add $0x30,%esp + 13fe6: c9 leave + 13fe7: c3 ret + +00013fe8 <_hub_irq>: + 13fe8: 55 push %ebp + 13fe9: 89 e5 mov %esp,%ebp + 13feb: 83 ec 18 sub $0x18,%esp + 13fee: 8b 45 08 mov 0x8(%ebp),%eax + 13ff1: 8b 40 54 mov 0x54(%eax),%eax + 13ff4: 89 45 fc mov %eax,0xfffffffc(%ebp) + 13ff7: 8b 45 08 mov 0x8(%ebp),%eax + 13ffa: 8b 40 1c mov 0x1c(%eax),%eax + 13ffd: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 14000: 83 7d f0 98 cmpl $0xffffff98,0xfffffff0(%ebp) + 14004: 0f 84 ad 00 00 00 je 140b7 <_hub_irq+0xcf> + 1400a: 83 7d f0 98 cmpl $0xffffff98,0xfffffff0(%ebp) + 1400e: 7f 0c jg 1401c <_hub_irq+0x34> + 14010: 83 7d f0 94 cmpl $0xffffff94,0xfffffff0(%ebp) + 14014: 0f 84 9d 00 00 00 je 140b7 <_hub_irq+0xcf> + 1401a: eb 10 jmp 1402c <_hub_irq+0x44> + 1401c: 83 7d f0 fe cmpl $0xfffffffe,0xfffffff0(%ebp) + 14020: 0f 84 91 00 00 00 je 140b7 <_hub_irq+0xcf> + 14026: 83 7d f0 00 cmpl $0x0,0xfffffff0(%ebp) + 1402a: 74 21 je 1404d <_hub_irq+0x65> + 1402c: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 1402f: ff 40 18 incl 0x18(%eax) + 14032: 83 78 18 09 cmpl $0x9,0x18(%eax) + 14036: 7e 63 jle 1409b <_hub_irq+0xb3> + 14038: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 1403b: 83 78 14 00 cmpl $0x0,0x14(%eax) + 1403f: 75 5a jne 1409b <_hub_irq+0xb3> + 14041: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 14044: 8b 55 08 mov 0x8(%ebp),%edx + 14047: 8b 52 1c mov 0x1c(%edx),%edx + 1404a: 89 50 14 mov %edx,0x14(%eax) + 1404d: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 14050: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) + 14057: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 1405e: 83 ec 0c sub $0xc,%esp + 14061: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 14064: 83 c0 24 add $0x24,%eax + 14067: 50 push %eax + 14068: e8 91 00 00 00 call 140fe <_list_empty> + 1406d: 83 c4 10 add $0x10,%esp + 14070: 85 c0 test %eax,%eax + 14072: 74 27 je 1409b <_hub_irq+0xb3> + 14074: 83 ec 08 sub $0x8,%esp + 14077: 68 40 a0 01 00 push $0x1a040 + 1407c: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 1407f: 83 c0 24 add $0x24,%eax + 14082: 50 push %eax + 14083: e8 31 00 00 00 call 140b9 <_list_add> + 14088: 83 c4 10 add $0x10,%esp + 1408b: 83 ec 0c sub $0xc,%esp + 1408e: 68 50 c0 01 00 push $0x1c050 + 14093: e8 cd 57 00 00 call 19865 <_my_wake_up> + 14098: 83 c4 10 add $0x10,%esp + 1409b: 83 ec 08 sub $0x8,%esp + 1409e: 6a 00 push $0x0 + 140a0: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 140a3: ff 70 04 pushl 0x4(%eax) + 140a6: e8 f8 40 00 00 call 181a3 <_usb_submit_urb@8> + 140ab: 83 c4 08 add $0x8,%esp + 140ae: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 140b1: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) + 140b5: 74 00 je 140b7 <_hub_irq+0xcf> + 140b7: c9 leave + 140b8: c3 ret + +000140b9 <_list_add>: + 140b9: 55 push %ebp + 140ba: 89 e5 mov %esp,%ebp + 140bc: 83 ec 08 sub $0x8,%esp + 140bf: 83 ec 04 sub $0x4,%esp + 140c2: 8b 45 0c mov 0xc(%ebp),%eax + 140c5: ff 30 pushl (%eax) + 140c7: ff 75 0c pushl 0xc(%ebp) + 140ca: ff 75 08 pushl 0x8(%ebp) + 140cd: e8 05 00 00 00 call 140d7 <___list_add> + 140d2: 83 c4 10 add $0x10,%esp + 140d5: c9 leave + 140d6: c3 ret + +000140d7 <___list_add>: + 140d7: 55 push %ebp + 140d8: 89 e5 mov %esp,%ebp + 140da: 8b 55 10 mov 0x10(%ebp),%edx + 140dd: 8b 45 08 mov 0x8(%ebp),%eax + 140e0: 89 42 04 mov %eax,0x4(%edx) + 140e3: 8b 55 08 mov 0x8(%ebp),%edx + 140e6: 8b 45 10 mov 0x10(%ebp),%eax + 140e9: 89 02 mov %eax,(%edx) + 140eb: 8b 55 08 mov 0x8(%ebp),%edx + 140ee: 8b 45 0c mov 0xc(%ebp),%eax + 140f1: 89 42 04 mov %eax,0x4(%edx) + 140f4: 8b 55 0c mov 0xc(%ebp),%edx + 140f7: 8b 45 08 mov 0x8(%ebp),%eax + 140fa: 89 02 mov %eax,(%edx) + 140fc: 5d pop %ebp + 140fd: c3 ret + +000140fe <_list_empty>: + 140fe: 55 push %ebp + 140ff: 89 e5 mov %esp,%ebp + 14101: 8b 45 08 mov 0x8(%ebp),%eax + 14104: 8b 00 mov (%eax),%eax + 14106: 3b 45 08 cmp 0x8(%ebp),%eax + 14109: 0f 94 c0 sete %al + 1410c: 25 ff 00 00 00 and $0xff,%eax + 14111: 5d pop %ebp + 14112: c3 ret + +00014113 <_hub_tt_kevent>: + 14113: 55 push %ebp + 14114: 89 e5 mov %esp,%ebp + 14116: 83 ec 28 sub $0x28,%esp + 14119: 8b 45 08 mov 0x8(%ebp),%eax + 1411c: 89 45 fc mov %eax,0xfffffffc(%ebp) + 1411f: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 14126: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 14129: 83 c0 40 add $0x40,%eax + 1412c: 50 push %eax + 1412d: e8 cc ff ff ff call 140fe <_list_empty> + 14132: 83 c4 04 add $0x4,%esp + 14135: 85 c0 test %eax,%eax + 14137: 75 7a jne 141b3 <_hub_tt_kevent+0xa0> + 14139: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 1413c: 8b 40 40 mov 0x40(%eax),%eax + 1413f: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 14142: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 14145: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 14148: 83 ec 0c sub $0xc,%esp + 1414b: ff 75 f0 pushl 0xfffffff0(%ebp) + 1414e: e8 b9 00 00 00 call 1420c <_list_del> + 14153: 83 c4 10 add $0x10,%esp + 14156: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 14159: 8b 00 mov (%eax),%eax + 1415b: 8b 80 b8 00 00 00 mov 0xb8(%eax),%eax + 14161: 89 45 e4 mov %eax,0xffffffe4(%ebp) + 14164: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 14167: 2d c0 00 00 00 sub $0xc0,%eax + 1416c: 89 45 ec mov %eax,0xffffffec(%ebp) + 1416f: 83 ec 04 sub $0x4,%esp + 14172: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 14175: 8b 40 08 mov 0x8(%eax),%eax + 14178: 25 ff ff 00 00 and $0xffff,%eax + 1417d: 50 push %eax + 1417e: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 14181: 66 8b 40 0c mov 0xc(%eax),%ax + 14185: 25 ff ff 00 00 and $0xffff,%eax + 1418a: 50 push %eax + 1418b: ff 75 ec pushl 0xffffffec(%ebp) + 1418e: e8 22 00 00 00 call 141b5 <_hub_clear_tt_buffer> + 14193: 83 c4 10 add $0x10,%esp + 14196: 89 45 e8 mov %eax,0xffffffe8(%ebp) + 14199: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 141a0: 83 ec 0c sub $0xc,%esp + 141a3: ff 75 f0 pushl 0xfffffff0(%ebp) + 141a6: e8 95 58 00 00 call 19a40 <_ExFreePool@4> + 141ab: 83 c4 0c add $0xc,%esp + 141ae: e9 73 ff ff ff jmp 14126 <_hub_tt_kevent+0x13> + 141b3: c9 leave + 141b4: c3 ret + +000141b5 <_hub_clear_tt_buffer>: + 141b5: 55 push %ebp + 141b6: 89 e5 mov %esp,%ebp + 141b8: 83 ec 08 sub $0x8,%esp + 141bb: 8b 45 0c mov 0xc(%ebp),%eax + 141be: 8b 55 10 mov 0x10(%ebp),%edx + 141c1: 66 89 45 fe mov %ax,0xfffffffe(%ebp) + 141c5: 66 89 55 fc mov %dx,0xfffffffc(%ebp) + 141c9: 83 ec 0c sub $0xc,%esp + 141cc: 6a 64 push $0x64 + 141ce: 6a 00 push $0x0 + 141d0: 6a 00 push $0x0 + 141d2: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 141d5: 25 ff ff 00 00 and $0xffff,%eax + 141da: 50 push %eax + 141db: 66 8b 45 fe mov 0xfffffffe(%ebp),%ax + 141df: 25 ff ff 00 00 and $0xffff,%eax + 141e4: 50 push %eax + 141e5: 68 83 00 00 00 push $0x83 + 141ea: 6a 08 push $0x8 + 141ec: 6a 00 push $0x0 + 141ee: ff 75 08 pushl 0x8(%ebp) + 141f1: e8 92 fc ff ff call 13e88 <___create_pipe> + 141f6: 83 c4 08 add $0x8,%esp + 141f9: 0d 80 00 00 80 or $0x80000080,%eax + 141fe: 50 push %eax + 141ff: ff 75 08 pushl 0x8(%ebp) + 14202: e8 e9 cf ff ff call 111f0 <_usb_control_msg> + 14207: 83 c4 30 add $0x30,%esp + 1420a: c9 leave + 1420b: c3 ret + +0001420c <_list_del>: + 1420c: 55 push %ebp + 1420d: 89 e5 mov %esp,%ebp + 1420f: 83 ec 08 sub $0x8,%esp + 14212: 83 ec 08 sub $0x8,%esp + 14215: 8b 45 08 mov 0x8(%ebp),%eax + 14218: ff 30 pushl (%eax) + 1421a: 8b 45 08 mov 0x8(%ebp),%eax + 1421d: ff 70 04 pushl 0x4(%eax) + 14220: e8 18 00 00 00 call 1423d <___list_del> + 14225: 83 c4 10 add $0x10,%esp + 14228: 8b 45 08 mov 0x8(%ebp),%eax + 1422b: c7 00 00 00 00 00 movl $0x0,(%eax) + 14231: 8b 45 08 mov 0x8(%ebp),%eax + 14234: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) + 1423b: c9 leave + 1423c: c3 ret + +0001423d <___list_del>: + 1423d: 55 push %ebp + 1423e: 89 e5 mov %esp,%ebp + 14240: 8b 55 0c mov 0xc(%ebp),%edx + 14243: 8b 45 08 mov 0x8(%ebp),%eax + 14246: 89 42 04 mov %eax,0x4(%edx) + 14249: 8b 55 08 mov 0x8(%ebp),%edx + 1424c: 8b 45 0c mov 0xc(%ebp),%eax + 1424f: 89 02 mov %eax,(%edx) + 14251: 5d pop %ebp + 14252: c3 ret + +00014253 <_usb_hub_tt_clear_buffer>: + 14253: 55 push %ebp + 14254: 89 e5 mov %esp,%ebp + 14256: 83 ec 28 sub $0x28,%esp + 14259: 8b 45 08 mov 0x8(%ebp),%eax + 1425c: 8b 40 1c mov 0x1c(%eax),%eax + 1425f: 89 45 fc mov %eax,0xfffffffc(%ebp) + 14262: 83 ec 08 sub $0x8,%esp + 14265: 6a 10 push $0x10 + 14267: 6a 01 push $0x1 + 14269: e8 c2 57 00 00 call 19a30 <_ExAllocatePool@8> + 1426e: 83 c4 08 add $0x8,%esp + 14271: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 14274: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 14277: 85 c0 test %eax,%eax + 14279: 75 05 jne 14280 <_usb_hub_tt_clear_buffer+0x2d> + 1427b: e9 d3 00 00 00 jmp 14353 <_usb_hub_tt_clear_buffer+0x100> + 14280: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 14283: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 14286: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 14289: 83 78 04 00 cmpl $0x0,0x4(%eax) + 1428d: 74 0b je 1429a <_usb_hub_tt_clear_buffer+0x47> + 1428f: 8b 45 08 mov 0x8(%ebp),%eax + 14292: 8b 40 20 mov 0x20(%eax),%eax + 14295: 89 45 ec mov %eax,0xffffffec(%ebp) + 14298: eb 07 jmp 142a1 <_usb_hub_tt_clear_buffer+0x4e> + 1429a: c7 45 ec 01 00 00 00 movl $0x1,0xffffffec(%ebp) + 142a1: 8b 45 ec mov 0xffffffec(%ebp),%eax + 142a4: 8b 55 f0 mov 0xfffffff0(%ebp),%edx + 142a7: 89 42 08 mov %eax,0x8(%edx) + 142aa: 8b 55 f4 mov 0xfffffff4(%ebp),%edx + 142ad: 8b 45 0c mov 0xc(%ebp),%eax + 142b0: c1 f8 0f sar $0xf,%eax + 142b3: 83 e0 0f and $0xf,%eax + 142b6: 66 89 42 0c mov %ax,0xc(%edx) + 142ba: 8b 4d f4 mov 0xfffffff4(%ebp),%ecx + 142bd: 8b 55 f4 mov 0xfffffff4(%ebp),%edx + 142c0: 8b 45 08 mov 0x8(%ebp),%eax + 142c3: 8b 00 mov (%eax),%eax + 142c5: c1 e0 04 shl $0x4,%eax + 142c8: 66 0b 42 0c or 0xc(%edx),%ax + 142cc: 66 89 41 0c mov %ax,0xc(%ecx) + 142d0: 8b 55 f4 mov 0xfffffff4(%ebp),%edx + 142d3: 89 55 e8 mov %edx,0xffffffe8(%ebp) + 142d6: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 142d9: 66 8b 40 0c mov 0xc(%eax),%ax + 142dd: 25 ff ff 00 00 and $0xffff,%eax + 142e2: 89 45 e4 mov %eax,0xffffffe4(%ebp) + 142e5: 8b 45 0c mov 0xc(%ebp),%eax + 142e8: c1 f8 1e sar $0x1e,%eax + 142eb: 83 e0 03 and $0x3,%eax + 142ee: 83 f8 02 cmp $0x2,%eax + 142f1: 74 07 je 142fa <_usb_hub_tt_clear_buffer+0xa7> + 142f3: 81 4d e4 00 10 00 00 orl $0x1000,0xffffffe4(%ebp) + 142fa: 8b 55 e4 mov 0xffffffe4(%ebp),%edx + 142fd: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 14300: 66 89 50 0c mov %dx,0xc(%eax) + 14304: 8b 45 0c mov 0xc(%ebp),%eax + 14307: c1 e8 07 shr $0x7,%eax + 1430a: 83 e0 01 and $0x1,%eax + 1430d: 85 c0 test %eax,%eax + 1430f: 74 14 je 14325 <_usb_hub_tt_clear_buffer+0xd2> + 14311: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 14314: 8b 55 f4 mov 0xfffffff4(%ebp),%edx + 14317: 66 8b 52 0c mov 0xc(%edx),%dx + 1431b: 81 ca 00 80 ff ff or $0xffff8000,%edx + 14321: 66 89 50 0c mov %dx,0xc(%eax) + 14325: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 1432c: 83 ec 08 sub $0x8,%esp + 1432f: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 14332: 83 c0 0c add $0xc,%eax + 14335: 50 push %eax + 14336: ff 75 f4 pushl 0xfffffff4(%ebp) + 14339: e8 1c 00 00 00 call 1435a <_list_add_tail> + 1433e: 83 c4 10 add $0x10,%esp + 14341: 83 ec 0c sub $0xc,%esp + 14344: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 14347: 83 c0 14 add $0x14,%eax + 1434a: 50 push %eax + 1434b: e8 05 00 00 00 call 14355 <_schedule_work> + 14350: 83 c4 10 add $0x10,%esp + 14353: c9 leave + 14354: c3 ret + +00014355 <_schedule_work>: + 14355: 55 push %ebp + 14356: 89 e5 mov %esp,%ebp + 14358: 5d pop %ebp + 14359: c3 ret + +0001435a <_list_add_tail>: + 1435a: 55 push %ebp + 1435b: 89 e5 mov %esp,%ebp + 1435d: ff 75 0c pushl 0xc(%ebp) + 14360: 8b 45 0c mov 0xc(%ebp),%eax + 14363: ff 70 04 pushl 0x4(%eax) + 14366: ff 75 08 pushl 0x8(%ebp) + 14369: e8 69 fd ff ff call 140d7 <___list_add> + 1436e: 83 c4 0c add $0xc,%esp + 14371: c9 leave + 14372: c3 ret + +00014373 <_hub_power_on>: + 14373: 55 push %ebp + 14374: 89 e5 mov %esp,%ebp + 14376: 83 ec 18 sub $0x18,%esp + 14379: 8b 45 08 mov 0x8(%ebp),%eax + 1437c: 8b 00 mov (%eax),%eax + 1437e: 8b 80 b8 00 00 00 mov 0xb8(%eax),%eax + 14384: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 14387: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 1438a: 2d c0 00 00 00 sub $0xc0,%eax + 1438f: 89 45 fc mov %eax,0xfffffffc(%ebp) + 14392: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 14399: 8b 45 08 mov 0x8(%ebp),%eax + 1439c: 8b 40 2c mov 0x2c(%eax),%eax + 1439f: 8a 40 02 mov 0x2(%eax),%al + 143a2: 25 ff 00 00 00 and $0xff,%eax + 143a7: 3b 45 f8 cmp 0xfffffff8(%ebp),%eax + 143aa: 7e 1c jle 143c8 <_hub_power_on+0x55> + 143ac: 83 ec 04 sub $0x4,%esp + 143af: 6a 08 push $0x8 + 143b1: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 143b4: 40 inc %eax + 143b5: 50 push %eax + 143b6: ff 75 fc pushl 0xfffffffc(%ebp) + 143b9: e8 62 fb ff ff call 13f20 <_set_port_feature> + 143be: 83 c4 10 add $0x10,%esp + 143c1: 8d 45 f8 lea 0xfffffff8(%ebp),%eax + 143c4: ff 00 incl (%eax) + 143c6: eb d1 jmp 14399 <_hub_power_on+0x26> + 143c8: 83 ec 0c sub $0xc,%esp + 143cb: 8b 45 08 mov 0x8(%ebp),%eax + 143ce: 8b 40 2c mov 0x2c(%eax),%eax + 143d1: 8a 40 05 mov 0x5(%eax),%al + 143d4: 25 ff 00 00 00 and $0xff,%eax + 143d9: 01 c0 add %eax,%eax + 143db: 50 push %eax + 143dc: e8 cf 50 00 00 call 194b0 <_wait_ms> + 143e1: 83 c4 10 add $0x10,%esp + 143e4: c9 leave + 143e5: c3 ret + +000143e6 <_hub_hub_status>: + 143e6: 55 push %ebp + 143e7: 89 e5 mov %esp,%ebp + 143e9: 83 ec 08 sub $0x8,%esp + 143ec: 8b 45 08 mov 0x8(%ebp),%eax + 143ef: 8b 00 mov (%eax),%eax + 143f1: 8b 80 b8 00 00 00 mov 0xb8(%eax),%eax + 143f7: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 143fa: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 143fd: 2d c0 00 00 00 sub $0xc0,%eax + 14402: 89 45 fc mov %eax,0xfffffffc(%ebp) + 14405: 83 ec 08 sub $0x8,%esp + 14408: 8b 45 08 mov 0x8(%ebp),%eax + 1440b: ff 70 10 pushl 0x10(%eax) + 1440e: ff 75 fc pushl 0xfffffffc(%ebp) + 14411: e8 4f fb ff ff call 13f65 <_get_hub_status> + 14416: 83 c4 10 add $0x10,%esp + 14419: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 1441c: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) + 14420: 79 02 jns 14424 <_hub_hub_status+0x3e> + 14422: eb 26 jmp 1444a <_hub_hub_status+0x64> + 14424: 8b 55 0c mov 0xc(%ebp),%edx + 14427: 8b 45 08 mov 0x8(%ebp),%eax + 1442a: 8b 40 10 mov 0x10(%eax),%eax + 1442d: 66 8b 00 mov (%eax),%ax + 14430: 66 89 02 mov %ax,(%edx) + 14433: 8b 55 10 mov 0x10(%ebp),%edx + 14436: 8b 45 08 mov 0x8(%ebp),%eax + 14439: 8b 40 10 mov 0x10(%eax),%eax + 1443c: 66 8b 40 02 mov 0x2(%eax),%ax + 14440: 66 89 02 mov %ax,(%edx) + 14443: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 1444a: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 1444d: c9 leave + 1444e: c3 ret + +0001444f <_hub_configure>: + 1444f: 55 push %ebp + 14450: 89 e5 mov %esp,%ebp + 14452: 53 push %ebx + 14453: 83 ec 74 sub $0x74,%esp + 14456: 8b 45 08 mov 0x8(%ebp),%eax + 14459: 8b 00 mov (%eax),%eax + 1445b: 8b 80 b8 00 00 00 mov 0xb8(%eax),%eax + 14461: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 14464: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 14467: 2d c0 00 00 00 sub $0xc0,%eax + 1446c: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 1446f: 8b 5d 08 mov 0x8(%ebp),%ebx + 14472: 8b 45 08 mov 0x8(%ebp),%eax + 14475: 83 c0 0c add $0xc,%eax + 14478: 50 push %eax + 14479: 6a 00 push $0x0 + 1447b: 6a 03 push $0x3 + 1447d: ff 75 f4 pushl 0xfffffff4(%ebp) + 14480: e8 dd 2b 00 00 call 17062 <_usb_buffer_alloc> + 14485: 83 c4 10 add $0x10,%esp + 14488: 89 43 08 mov %eax,0x8(%ebx) + 1448b: 8b 45 08 mov 0x8(%ebp),%eax + 1448e: 83 78 08 00 cmpl $0x0,0x8(%eax) + 14492: 75 13 jne 144a7 <_hub_configure+0x58> + 14494: c7 45 dc 58 b1 01 00 movl $0x1b158,0xffffffdc(%ebp) + 1449b: c7 45 e0 f4 ff ff ff movl $0xfffffff4,0xffffffe0(%ebp) + 144a2: e9 88 03 00 00 jmp 1482f <_hub_configure+0x3e0> + 144a7: 8b 5d 08 mov 0x8(%ebp),%ebx + 144aa: 83 ec 08 sub $0x8,%esp + 144ad: 6a 04 push $0x4 + 144af: 6a 01 push $0x1 + 144b1: e8 7a 55 00 00 call 19a30 <_ExAllocatePool@8> + 144b6: 83 c4 08 add $0x8,%esp + 144b9: 89 43 10 mov %eax,0x10(%ebx) + 144bc: 8b 45 08 mov 0x8(%ebp),%eax + 144bf: 83 78 10 00 cmpl $0x0,0x10(%eax) + 144c3: 75 13 jne 144d8 <_hub_configure+0x89> + 144c5: c7 45 dc 78 b1 01 00 movl $0x1b178,0xffffffdc(%ebp) + 144cc: c7 45 e0 f4 ff ff ff movl $0xfffffff4,0xffffffe0(%ebp) + 144d3: e9 57 03 00 00 jmp 1482f <_hub_configure+0x3e0> + 144d8: 8b 5d 08 mov 0x8(%ebp),%ebx + 144db: 83 ec 08 sub $0x8,%esp + 144de: 6a 0d push $0xd + 144e0: 6a 01 push $0x1 + 144e2: e8 49 55 00 00 call 19a30 <_ExAllocatePool@8> + 144e7: 83 c4 08 add $0x8,%esp + 144ea: 89 43 2c mov %eax,0x2c(%ebx) + 144ed: 8b 45 08 mov 0x8(%ebp),%eax + 144f0: 83 78 2c 00 cmpl $0x0,0x2c(%eax) + 144f4: 75 13 jne 14509 <_hub_configure+0xba> + 144f6: c7 45 dc 98 b1 01 00 movl $0x1b198,0xffffffdc(%ebp) + 144fd: c7 45 e0 f4 ff ff ff movl $0xfffffff4,0xffffffe0(%ebp) + 14504: e9 26 03 00 00 jmp 1482f <_hub_configure+0x3e0> + 14509: 83 ec 04 sub $0x4,%esp + 1450c: 6a 0d push $0xd + 1450e: 8b 45 08 mov 0x8(%ebp),%eax + 14511: ff 70 2c pushl 0x2c(%eax) + 14514: ff 75 f4 pushl 0xfffffff4(%ebp) + 14517: e8 24 f9 ff ff call 13e40 <_get_hub_descriptor> + 1451c: 83 c4 10 add $0x10,%esp + 1451f: 89 45 e0 mov %eax,0xffffffe0(%ebp) + 14522: 83 7d e0 00 cmpl $0x0,0xffffffe0(%ebp) + 14526: 79 0c jns 14534 <_hub_configure+0xe5> + 14528: c7 45 dc b5 b1 01 00 movl $0x1b1b5,0xffffffdc(%ebp) + 1452f: e9 fb 02 00 00 jmp 1482f <_hub_configure+0x3e0> + 14534: 8b 45 08 mov 0x8(%ebp),%eax + 14537: 8b 40 2c mov 0x2c(%eax),%eax + 1453a: 80 78 02 10 cmpb $0x10,0x2(%eax) + 1453e: 76 13 jbe 14553 <_hub_configure+0x104> + 14540: c7 45 dc cf b1 01 00 movl $0x1b1cf,0xffffffdc(%ebp) + 14547: c7 45 e0 ed ff ff ff movl $0xffffffed,0xffffffe0(%ebp) + 1454e: e9 dc 02 00 00 jmp 1482f <_hub_configure+0x3e0> + 14553: 83 ec 0c sub $0xc,%esp + 14556: ff 75 f4 pushl 0xfffffff4(%ebp) + 14559: e8 49 03 00 00 call 148a7 <_hubdev> + 1455e: 83 c4 10 add $0x10,%esp + 14561: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 14564: 8b 55 f4 mov 0xfffffff4(%ebp),%edx + 14567: 8b 45 08 mov 0x8(%ebp),%eax + 1456a: 8b 40 2c mov 0x2c(%eax),%eax + 1456d: 8a 40 02 mov 0x2(%eax),%al + 14570: 25 ff 00 00 00 and $0xff,%eax + 14575: 89 82 ac 01 00 00 mov %eax,0x1ac(%edx) + 1457b: 8b 45 08 mov 0x8(%ebp),%eax + 1457e: 8b 40 2c mov 0x2c(%eax),%eax + 14581: 66 8b 40 03 mov 0x3(%eax),%ax + 14585: 25 ff ff 00 00 and $0xffff,%eax + 1458a: c1 e8 02 shr $0x2,%eax + 1458d: 83 e0 01 and $0x1,%eax + 14590: 85 c0 test %eax,%eax + 14592: 0f 84 b5 00 00 00 je 1464d <_hub_configure+0x1fe> + 14598: c7 45 d8 00 00 00 00 movl $0x0,0xffffffd8(%ebp) + 1459f: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 145a2: 8b 80 ac 01 00 00 mov 0x1ac(%eax),%eax + 145a8: 3b 45 d8 cmp 0xffffffd8(%ebp),%eax + 145ab: 0f 8e 88 00 00 00 jle 14639 <_hub_configure+0x1ea> + 145b1: 8d 45 f8 lea 0xfffffff8(%ebp),%eax + 145b4: 03 45 d8 add 0xffffffd8(%ebp),%eax + 145b7: 83 e8 40 sub $0x40,%eax + 145ba: 89 45 b0 mov %eax,0xffffffb0(%ebp) + 145bd: 8b 45 08 mov 0x8(%ebp),%eax + 145c0: 8b 40 2c mov 0x2c(%eax),%eax + 145c3: 89 45 a8 mov %eax,0xffffffa8(%ebp) + 145c6: 8b 45 d8 mov 0xffffffd8(%ebp),%eax + 145c9: 40 inc %eax + 145ca: 89 45 a4 mov %eax,0xffffffa4(%ebp) + 145cd: 83 7d a4 00 cmpl $0x0,0xffffffa4(%ebp) + 145d1: 79 04 jns 145d7 <_hub_configure+0x188> + 145d3: 83 45 a4 07 addl $0x7,0xffffffa4(%ebp) + 145d7: 8b 45 a4 mov 0xffffffa4(%ebp),%eax + 145da: c1 f8 03 sar $0x3,%eax + 145dd: 8b 4d a8 mov 0xffffffa8(%ebp),%ecx + 145e0: ba 00 00 00 00 mov $0x0,%edx + 145e5: 8a 54 08 07 mov 0x7(%eax,%ecx,1),%dl + 145e9: 89 55 a0 mov %edx,0xffffffa0(%ebp) + 145ec: 8b 45 d8 mov 0xffffffd8(%ebp),%eax + 145ef: 40 inc %eax + 145f0: 89 45 9c mov %eax,0xffffff9c(%ebp) + 145f3: 8b 55 9c mov 0xffffff9c(%ebp),%edx + 145f6: 89 55 98 mov %edx,0xffffff98(%ebp) + 145f9: 83 7d 98 00 cmpl $0x0,0xffffff98(%ebp) + 145fd: 79 04 jns 14603 <_hub_configure+0x1b4> + 145ff: 83 45 98 07 addl $0x7,0xffffff98(%ebp) + 14603: 8b 45 98 mov 0xffffff98(%ebp),%eax + 14606: c1 f8 03 sar $0x3,%eax + 14609: c1 e0 03 shl $0x3,%eax + 1460c: 8b 4d 9c mov 0xffffff9c(%ebp),%ecx + 1460f: 29 c1 sub %eax,%ecx + 14611: 8b 45 a0 mov 0xffffffa0(%ebp),%eax + 14614: d3 f8 sar %cl,%eax + 14616: 83 e0 01 and $0x1,%eax + 14619: 85 c0 test %eax,%eax + 1461b: 74 06 je 14623 <_hub_configure+0x1d4> + 1461d: c6 45 af 46 movb $0x46,0xffffffaf(%ebp) + 14621: eb 04 jmp 14627 <_hub_configure+0x1d8> + 14623: c6 45 af 52 movb $0x52,0xffffffaf(%ebp) + 14627: 8a 4d af mov 0xffffffaf(%ebp),%cl + 1462a: 8b 45 b0 mov 0xffffffb0(%ebp),%eax + 1462d: 88 08 mov %cl,(%eax) + 1462f: 8d 45 d8 lea 0xffffffd8(%ebp),%eax + 14632: ff 00 incl (%eax) + 14634: e9 66 ff ff ff jmp 1459f <_hub_configure+0x150> + 14639: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 1463c: 8d 55 f8 lea 0xfffffff8(%ebp),%edx + 1463f: 03 90 ac 01 00 00 add 0x1ac(%eax),%edx + 14645: 89 d0 mov %edx,%eax + 14647: 83 e8 40 sub $0x40,%eax + 1464a: c6 00 00 movb $0x0,(%eax) + 1464d: 8b 55 08 mov 0x8(%ebp),%edx + 14650: 83 c2 40 add $0x40,%edx + 14653: 8b 45 08 mov 0x8(%ebp),%eax + 14656: 83 c0 40 add $0x40,%eax + 14659: 89 02 mov %eax,(%edx) + 1465b: 8b 55 08 mov 0x8(%ebp),%edx + 1465e: 83 c2 40 add $0x40,%edx + 14661: 8b 45 08 mov 0x8(%ebp),%eax + 14664: 83 c0 40 add $0x40,%eax + 14667: 89 42 04 mov %eax,0x4(%edx) + 1466a: 8b 45 08 mov 0x8(%ebp),%eax + 1466d: 83 c0 48 add $0x48,%eax + 14670: c7 00 13 41 01 00 movl $0x14113,(%eax) + 14676: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 14679: b9 00 00 00 00 mov $0x0,%ecx + 1467e: 8a 88 76 01 00 00 mov 0x176(%eax),%cl + 14684: 89 4d 94 mov %ecx,0xffffff94(%ebp) + 14687: 83 7d 94 01 cmpl $0x1,0xffffff94(%ebp) + 1468b: 74 08 je 14695 <_hub_configure+0x246> + 1468d: 83 7d 94 02 cmpl $0x2,0xffffff94(%ebp) + 14691: 74 0d je 146a0 <_hub_configure+0x251> + 14693: eb 1e jmp 146b3 <_hub_configure+0x264> + 14695: 8b 55 08 mov 0x8(%ebp),%edx + 14698: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 1469b: 89 42 34 mov %eax,0x34(%edx) + 1469e: eb 13 jmp 146b3 <_hub_configure+0x264> + 146a0: 8b 45 08 mov 0x8(%ebp),%eax + 146a3: 8b 55 f4 mov 0xfffffff4(%ebp),%edx + 146a6: 89 50 34 mov %edx,0x34(%eax) + 146a9: 8b 45 08 mov 0x8(%ebp),%eax + 146ac: c7 40 38 01 00 00 00 movl $0x1,0x38(%eax) + 146b3: 8b 45 08 mov 0x8(%ebp),%eax + 146b6: 8b 40 2c mov 0x2c(%eax),%eax + 146b9: 66 8b 40 03 mov 0x3(%eax),%ax + 146bd: 25 ff ff 00 00 and $0xffff,%eax + 146c2: 83 e0 60 and $0x60,%eax + 146c5: 85 c0 test %eax,%eax + 146c7: 74 02 je 146cb <_hub_configure+0x27c> + 146c9: eb 00 jmp 146cb <_hub_configure+0x27c> + 146cb: 83 ec 04 sub $0x4,%esp + 146ce: 8d 45 ec lea 0xffffffec(%ebp),%eax + 146d1: 50 push %eax + 146d2: 8d 45 ee lea 0xffffffee(%ebp),%eax + 146d5: 50 push %eax + 146d6: ff 75 08 pushl 0x8(%ebp) + 146d9: e8 08 fd ff ff call 143e6 <_hub_hub_status> + 146de: 83 c4 10 add $0x10,%esp + 146e1: 89 45 e0 mov %eax,0xffffffe0(%ebp) + 146e4: 83 7d e0 00 cmpl $0x0,0xffffffe0(%ebp) + 146e8: 79 0c jns 146f6 <_hub_configure+0x2a7> + 146ea: c7 45 dc e7 b1 01 00 movl $0x1b1e7,0xffffffdc(%ebp) + 146f1: e9 39 01 00 00 jmp 1482f <_hub_configure+0x3e0> + 146f6: 8b 45 0c mov 0xc(%ebp),%eax + 146f9: 8a 40 02 mov 0x2(%eax),%al + 146fc: 25 ff 00 00 00 and $0xff,%eax + 14701: 50 push %eax + 14702: ff 75 f4 pushl 0xfffffff4(%ebp) + 14705: e8 7e f7 ff ff call 13e88 <___create_pipe> + 1470a: 83 c4 08 add $0x8,%esp + 1470d: 0d 80 00 00 40 or $0x40000080,%eax + 14712: 89 45 e8 mov %eax,0xffffffe8(%ebp) + 14715: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 14718: c1 e8 07 shr $0x7,%eax + 1471b: 83 e0 01 and $0x1,%eax + 1471e: 85 c0 test %eax,%eax + 14720: 75 15 jne 14737 <_hub_configure+0x2e8> + 14722: 8b 55 f4 mov 0xfffffff4(%ebp),%edx + 14725: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 14728: c1 e8 0f shr $0xf,%eax + 1472b: 83 e0 0f and $0xf,%eax + 1472e: 8b 44 82 78 mov 0x78(%edx,%eax,4),%eax + 14732: 89 45 90 mov %eax,0xffffff90(%ebp) + 14735: eb 13 jmp 1474a <_hub_configure+0x2fb> + 14737: 8b 55 f4 mov 0xfffffff4(%ebp),%edx + 1473a: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 1473d: c1 e8 0f shr $0xf,%eax + 14740: 83 e0 0f and $0xf,%eax + 14743: 8b 44 82 38 mov 0x38(%edx,%eax,4),%eax + 14747: 89 45 90 mov %eax,0xffffff90(%ebp) + 1474a: 8b 45 90 mov 0xffffff90(%ebp),%eax + 1474d: 89 45 e4 mov %eax,0xffffffe4(%ebp) + 14750: 83 7d e4 03 cmpl $0x3,0xffffffe4(%ebp) + 14754: 76 07 jbe 1475d <_hub_configure+0x30e> + 14756: c7 45 e4 03 00 00 00 movl $0x3,0xffffffe4(%ebp) + 1475d: 8b 5d 08 mov 0x8(%ebp),%ebx + 14760: 83 ec 08 sub $0x8,%esp + 14763: 6a 00 push $0x0 + 14765: 6a 00 push $0x0 + 14767: e8 80 39 00 00 call 180ec <_usb_alloc_urb@8> + 1476c: 83 c4 08 add $0x8,%esp + 1476f: 89 43 04 mov %eax,0x4(%ebx) + 14772: 8b 45 08 mov 0x8(%ebp),%eax + 14775: 83 78 04 00 cmpl $0x0,0x4(%eax) + 14779: 75 13 jne 1478e <_hub_configure+0x33f> + 1477b: c7 45 dc fc b1 01 00 movl $0x1b1fc,0xffffffdc(%ebp) + 14782: c7 45 e0 f4 ff ff ff movl $0xfffffff4,0xffffffe0(%ebp) + 14789: e9 a1 00 00 00 jmp 1482f <_hub_configure+0x3e0> + 1478e: 8b 45 0c mov 0xc(%ebp),%eax + 14791: 8a 40 06 mov 0x6(%eax),%al + 14794: 25 ff 00 00 00 and $0xff,%eax + 14799: 50 push %eax + 1479a: ff 75 08 pushl 0x8(%ebp) + 1479d: 68 e8 3f 01 00 push $0x13fe8 + 147a2: ff 75 e4 pushl 0xffffffe4(%ebp) + 147a5: 8b 45 08 mov 0x8(%ebp),%eax + 147a8: ff 70 08 pushl 0x8(%eax) + 147ab: ff 75 e8 pushl 0xffffffe8(%ebp) + 147ae: ff 75 f4 pushl 0xfffffff4(%ebp) + 147b1: 8b 45 08 mov 0x8(%ebp),%eax + 147b4: ff 70 04 pushl 0x4(%eax) + 147b7: e8 81 00 00 00 call 1483d <_usb_fill_int_urb> + 147bc: 83 c4 20 add $0x20,%esp + 147bf: 8b 45 08 mov 0x8(%ebp),%eax + 147c2: 8b 50 04 mov 0x4(%eax),%edx + 147c5: 8b 45 08 mov 0x8(%ebp),%eax + 147c8: 8b 40 0c mov 0xc(%eax),%eax + 147cb: 89 42 28 mov %eax,0x28(%edx) + 147ce: 8b 45 08 mov 0x8(%ebp),%eax + 147d1: 8b 50 04 mov 0x4(%eax),%edx + 147d4: 8b 45 08 mov 0x8(%ebp),%eax + 147d7: 8b 40 04 mov 0x4(%eax),%eax + 147da: 8b 40 20 mov 0x20(%eax),%eax + 147dd: 83 c8 04 or $0x4,%eax + 147e0: 89 42 20 mov %eax,0x20(%edx) + 147e3: 83 ec 08 sub $0x8,%esp + 147e6: 6a 00 push $0x0 + 147e8: 8b 45 08 mov 0x8(%ebp),%eax + 147eb: ff 70 04 pushl 0x4(%eax) + 147ee: e8 b0 39 00 00 call 181a3 <_usb_submit_urb@8> + 147f3: 83 c4 08 add $0x8,%esp + 147f6: 89 45 e0 mov %eax,0xffffffe0(%ebp) + 147f9: 83 7d e0 00 cmpl $0x0,0xffffffe0(%ebp) + 147fd: 74 09 je 14808 <_hub_configure+0x3b9> + 147ff: c7 45 dc 1c b2 01 00 movl $0x1b21c,0xffffffdc(%ebp) + 14806: eb 27 jmp 1482f <_hub_configure+0x3e0> + 14808: 83 ec 0c sub $0xc,%esp + 1480b: 68 50 c0 01 00 push $0x1c050 + 14810: e8 50 50 00 00 call 19865 <_my_wake_up> + 14815: 83 c4 10 add $0x10,%esp + 14818: 83 ec 0c sub $0xc,%esp + 1481b: ff 75 08 pushl 0x8(%ebp) + 1481e: e8 50 fb ff ff call 14373 <_hub_power_on> + 14823: 83 c4 10 add $0x10,%esp + 14826: c7 45 b4 00 00 00 00 movl $0x0,0xffffffb4(%ebp) + 1482d: eb 06 jmp 14835 <_hub_configure+0x3e6> + 1482f: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 14832: 89 45 b4 mov %eax,0xffffffb4(%ebp) + 14835: 8b 45 b4 mov 0xffffffb4(%ebp),%eax + 14838: 8b 5d fc mov 0xfffffffc(%ebp),%ebx + 1483b: c9 leave + 1483c: c3 ret + +0001483d <_usb_fill_int_urb>: + 1483d: 55 push %ebp + 1483e: 89 e5 mov %esp,%ebp + 14840: 8b 55 08 mov 0x8(%ebp),%edx + 14843: 8b 45 0c mov 0xc(%ebp),%eax + 14846: 89 42 14 mov %eax,0x14(%edx) + 14849: 8b 55 08 mov 0x8(%ebp),%edx + 1484c: 8b 45 10 mov 0x10(%ebp),%eax + 1484f: 89 42 18 mov %eax,0x18(%edx) + 14852: 8b 55 08 mov 0x8(%ebp),%edx + 14855: 8b 45 14 mov 0x14(%ebp),%eax + 14858: 89 42 24 mov %eax,0x24(%edx) + 1485b: 8b 55 08 mov 0x8(%ebp),%edx + 1485e: 8b 45 18 mov 0x18(%ebp),%eax + 14861: 89 42 2c mov %eax,0x2c(%edx) + 14864: 8b 55 08 mov 0x8(%ebp),%edx + 14867: 8b 45 1c mov 0x1c(%ebp),%eax + 1486a: 89 42 58 mov %eax,0x58(%edx) + 1486d: 8b 55 08 mov 0x8(%ebp),%edx + 14870: 8b 45 20 mov 0x20(%ebp),%eax + 14873: 89 42 54 mov %eax,0x54(%edx) + 14876: 8b 45 0c mov 0xc(%ebp),%eax + 14879: 83 78 18 03 cmpl $0x3,0x18(%eax) + 1487d: 75 13 jne 14892 <_usb_fill_int_urb+0x55> + 1487f: 8b 55 08 mov 0x8(%ebp),%edx + 14882: 8b 4d 24 mov 0x24(%ebp),%ecx + 14885: 49 dec %ecx + 14886: b8 01 00 00 00 mov $0x1,%eax + 1488b: d3 e0 shl %cl,%eax + 1488d: 89 42 48 mov %eax,0x48(%edx) + 14890: eb 09 jmp 1489b <_usb_fill_int_urb+0x5e> + 14892: 8b 55 08 mov 0x8(%ebp),%edx + 14895: 8b 45 24 mov 0x24(%ebp),%eax + 14898: 89 42 48 mov %eax,0x48(%edx) + 1489b: 8b 45 08 mov 0x8(%ebp),%eax + 1489e: c7 40 40 ff ff ff ff movl $0xffffffff,0x40(%eax) + 148a5: 5d pop %ebp + 148a6: c3 ret + +000148a7 <_hubdev>: + 148a7: 55 push %ebp + 148a8: 89 e5 mov %esp,%ebp + 148aa: 8b 45 08 mov 0x8(%ebp),%eax + 148ad: 8b 80 88 01 00 00 mov 0x188(%eax),%eax + 148b3: 8b 40 0c mov 0xc(%eax),%eax + 148b6: 83 c0 18 add $0x18,%eax + 148b9: 5d pop %ebp + 148ba: c3 ret + +000148bb <_hub_disconnect>: + 148bb: 55 push %ebp + 148bc: 89 e5 mov %esp,%ebp + 148be: 83 ec 18 sub $0x18,%esp + 148c1: 83 ec 0c sub $0xc,%esp + 148c4: ff 75 08 pushl 0x8(%ebp) + 148c7: e8 66 01 00 00 call 14a32 <_usb_get_intfdata> + 148cc: 83 c4 10 add $0x10,%esp + 148cf: 89 45 fc mov %eax,0xfffffffc(%ebp) + 148d2: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) + 148d6: 75 05 jne 148dd <_hub_disconnect+0x22> + 148d8: e9 3f 01 00 00 jmp 14a1c <_hub_disconnect+0x161> + 148dd: 83 ec 08 sub $0x8,%esp + 148e0: 6a 00 push $0x0 + 148e2: ff 75 08 pushl 0x8(%ebp) + 148e5: e8 34 01 00 00 call 14a1e <_usb_set_intfdata> + 148ea: 83 c4 10 add $0x10,%esp + 148ed: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 148f4: 83 ec 0c sub $0xc,%esp + 148f7: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 148fa: 83 c0 24 add $0x24,%eax + 148fd: 50 push %eax + 148fe: e8 09 f9 ff ff call 1420c <_list_del> + 14903: 83 c4 10 add $0x10,%esp + 14906: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 14909: 83 c2 24 add $0x24,%edx + 1490c: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 1490f: 83 c0 24 add $0x24,%eax + 14912: 89 02 mov %eax,(%edx) + 14914: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 14917: 83 c2 24 add $0x24,%edx + 1491a: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 1491d: 83 c0 24 add $0x24,%eax + 14920: 89 42 04 mov %eax,0x4(%edx) + 14923: 83 ec 0c sub $0xc,%esp + 14926: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 14929: 83 c0 1c add $0x1c,%eax + 1492c: 50 push %eax + 1492d: e8 da f8 ff ff call 1420c <_list_del> + 14932: 83 c4 10 add $0x10,%esp + 14935: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 14938: 83 c2 1c add $0x1c,%edx + 1493b: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 1493e: 83 c0 1c add $0x1c,%eax + 14941: 89 02 mov %eax,(%edx) + 14943: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 14946: 83 c2 1c add $0x1c,%edx + 14949: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 1494c: 83 c0 1c add $0x1c,%eax + 1494f: 89 42 04 mov %eax,0x4(%edx) + 14952: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 14955: 83 78 04 00 cmpl $0x0,0x4(%eax) + 14959: 74 2c je 14987 <_hub_disconnect+0xcc> + 1495b: 83 ec 0c sub $0xc,%esp + 1495e: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 14961: ff 70 04 pushl 0x4(%eax) + 14964: e8 51 3b 00 00 call 184ba <_usb_unlink_urb@4> + 14969: 83 c4 0c add $0xc,%esp + 1496c: 83 ec 0c sub $0xc,%esp + 1496f: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 14972: ff 70 04 pushl 0x4(%eax) + 14975: e8 bc 37 00 00 call 18136 <_usb_free_urb@4> + 1497a: 83 c4 0c add $0xc,%esp + 1497d: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 14980: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) + 14987: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 1498a: 83 78 2c 00 cmpl $0x0,0x2c(%eax) + 1498e: 74 1b je 149ab <_hub_disconnect+0xf0> + 14990: 83 ec 0c sub $0xc,%esp + 14993: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 14996: ff 70 2c pushl 0x2c(%eax) + 14999: e8 a2 50 00 00 call 19a40 <_ExFreePool@4> + 1499e: 83 c4 0c add $0xc,%esp + 149a1: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 149a4: c7 40 2c 00 00 00 00 movl $0x0,0x2c(%eax) + 149ab: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 149ae: 83 78 10 00 cmpl $0x0,0x10(%eax) + 149b2: 74 1b je 149cf <_hub_disconnect+0x114> + 149b4: 83 ec 0c sub $0xc,%esp + 149b7: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 149ba: ff 70 10 pushl 0x10(%eax) + 149bd: e8 7e 50 00 00 call 19a40 <_ExFreePool@4> + 149c2: 83 c4 0c add $0xc,%esp + 149c5: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 149c8: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) + 149cf: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 149d2: 83 78 08 00 cmpl $0x0,0x8(%eax) + 149d6: 74 36 je 14a0e <_hub_disconnect+0x153> + 149d8: 8b 45 08 mov 0x8(%ebp),%eax + 149db: 8b 80 b8 00 00 00 mov 0xb8(%eax),%eax + 149e1: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 149e4: 8b 55 f4 mov 0xfffffff4(%ebp),%edx + 149e7: 81 ea c0 00 00 00 sub $0xc0,%edx + 149ed: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 149f0: ff 70 0c pushl 0xc(%eax) + 149f3: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 149f6: ff 70 08 pushl 0x8(%eax) + 149f9: 6a 03 push $0x3 + 149fb: 52 push %edx + 149fc: e8 d1 26 00 00 call 170d2 <_usb_buffer_free> + 14a01: 83 c4 10 add $0x10,%esp + 14a04: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 14a07: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) + 14a0e: 83 ec 0c sub $0xc,%esp + 14a11: ff 75 fc pushl 0xfffffffc(%ebp) + 14a14: e8 27 50 00 00 call 19a40 <_ExFreePool@4> + 14a19: 83 c4 0c add $0xc,%esp + 14a1c: c9 leave + 14a1d: c3 ret + +00014a1e <_usb_set_intfdata>: + 14a1e: 55 push %ebp + 14a1f: 89 e5 mov %esp,%ebp + 14a21: 8b 55 08 mov 0x8(%ebp),%edx + 14a24: 83 c2 18 add $0x18,%edx + 14a27: 8b 45 0c mov 0xc(%ebp),%eax + 14a2a: 89 82 9c 00 00 00 mov %eax,0x9c(%edx) + 14a30: 5d pop %ebp + 14a31: c3 ret + +00014a32 <_usb_get_intfdata>: + 14a32: 55 push %ebp + 14a33: 89 e5 mov %esp,%ebp + 14a35: 8b 45 08 mov 0x8(%ebp),%eax + 14a38: 83 c0 18 add $0x18,%eax + 14a3b: 8b 80 9c 00 00 00 mov 0x9c(%eax),%eax + 14a41: 5d pop %ebp + 14a42: c3 ret + +00014a43 <_hub_probe>: + 14a43: 55 push %ebp + 14a44: 89 e5 mov %esp,%ebp + 14a46: 83 ec 28 sub $0x28,%esp + 14a49: 8b 4d 08 mov 0x8(%ebp),%ecx + 14a4c: 8b 45 08 mov 0x8(%ebp),%eax + 14a4f: 8b 50 04 mov 0x4(%eax),%edx + 14a52: 89 d0 mov %edx,%eax + 14a54: 01 c0 add %eax,%eax + 14a56: 01 d0 add %edx,%eax + 14a58: c1 e0 03 shl $0x3,%eax + 14a5b: 03 01 add (%ecx),%eax + 14a5d: 89 45 fc mov %eax,0xfffffffc(%ebp) + 14a60: 8b 45 08 mov 0x8(%ebp),%eax + 14a63: 8b 80 b8 00 00 00 mov 0xb8(%eax),%eax + 14a69: 89 45 e8 mov %eax,0xffffffe8(%ebp) + 14a6c: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 14a6f: 2d c0 00 00 00 sub $0xc0,%eax + 14a74: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 14a77: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 14a7a: 80 78 06 00 cmpb $0x0,0x6(%eax) + 14a7e: 74 15 je 14a95 <_hub_probe+0x52> + 14a80: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 14a83: 80 78 06 01 cmpb $0x1,0x6(%eax) + 14a87: 74 0c je 14a95 <_hub_probe+0x52> + 14a89: c7 45 e4 fb ff ff ff movl $0xfffffffb,0xffffffe4(%ebp) + 14a90: e9 22 01 00 00 jmp 14bb7 <_hub_probe+0x174> + 14a95: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 14a98: 80 78 04 01 cmpb $0x1,0x4(%eax) + 14a9c: 74 02 je 14aa0 <_hub_probe+0x5d> + 14a9e: eb e9 jmp 14a89 <_hub_probe+0x46> + 14aa0: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 14aa3: 8b 40 0c mov 0xc(%eax),%eax + 14aa6: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 14aa9: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 14aac: 80 78 02 00 cmpb $0x0,0x2(%eax) + 14ab0: 78 02 js 14ab4 <_hub_probe+0x71> + 14ab2: eb d5 jmp 14a89 <_hub_probe+0x46> + 14ab4: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 14ab7: 8a 40 03 mov 0x3(%eax),%al + 14aba: 25 ff 00 00 00 and $0xff,%eax + 14abf: 83 e0 03 and $0x3,%eax + 14ac2: 83 f8 03 cmp $0x3,%eax + 14ac5: 74 02 je 14ac9 <_hub_probe+0x86> + 14ac7: eb c0 jmp 14a89 <_hub_probe+0x46> + 14ac9: 83 ec 08 sub $0x8,%esp + 14acc: 6a 4c push $0x4c + 14ace: 6a 01 push $0x1 + 14ad0: e8 5b 4f 00 00 call 19a30 <_ExAllocatePool@8> + 14ad5: 83 c4 08 add $0x8,%esp + 14ad8: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 14adb: 83 7d f0 00 cmpl $0x0,0xfffffff0(%ebp) + 14adf: 75 0c jne 14aed <_hub_probe+0xaa> + 14ae1: c7 45 e4 f4 ff ff ff movl $0xfffffff4,0xffffffe4(%ebp) + 14ae8: e9 ca 00 00 00 jmp 14bb7 <_hub_probe+0x174> + 14aed: 83 ec 04 sub $0x4,%esp + 14af0: 6a 4c push $0x4c + 14af2: 6a 00 push $0x0 + 14af4: ff 75 f0 pushl 0xfffffff0(%ebp) + 14af7: e8 54 4f 00 00 call 19a50 <_memset> + 14afc: 83 c4 10 add $0x10,%esp + 14aff: 8b 55 f0 mov 0xfffffff0(%ebp),%edx + 14b02: 83 c2 24 add $0x24,%edx + 14b05: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 14b08: 83 c0 24 add $0x24,%eax + 14b0b: 89 02 mov %eax,(%edx) + 14b0d: 8b 55 f0 mov 0xfffffff0(%ebp),%edx + 14b10: 83 c2 24 add $0x24,%edx + 14b13: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 14b16: 83 c0 24 add $0x24,%eax + 14b19: 89 42 04 mov %eax,0x4(%edx) + 14b1c: 8b 55 f0 mov 0xfffffff0(%ebp),%edx + 14b1f: 8b 45 08 mov 0x8(%ebp),%eax + 14b22: 89 02 mov %eax,(%edx) + 14b24: c7 45 ec 00 00 00 00 movl $0x0,0xffffffec(%ebp) + 14b2b: 8b 55 f0 mov 0xfffffff0(%ebp),%edx + 14b2e: 83 c2 1c add $0x1c,%edx + 14b31: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 14b34: 83 c0 1c add $0x1c,%eax + 14b37: 89 02 mov %eax,(%edx) + 14b39: 8b 55 f0 mov 0xfffffff0(%ebp),%edx + 14b3c: 83 c2 1c add $0x1c,%edx + 14b3f: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 14b42: 83 c0 1c add $0x1c,%eax + 14b45: 89 42 04 mov %eax,0x4(%edx) + 14b48: 83 ec 08 sub $0x8,%esp + 14b4b: 68 48 a0 01 00 push $0x1a048 + 14b50: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 14b53: 83 c0 1c add $0x1c,%eax + 14b56: 50 push %eax + 14b57: e8 5d f5 ff ff call 140b9 <_list_add> + 14b5c: 83 c4 10 add $0x10,%esp + 14b5f: ff 75 f0 pushl 0xfffffff0(%ebp) + 14b62: ff 75 08 pushl 0x8(%ebp) + 14b65: e8 b4 fe ff ff call 14a1e <_usb_set_intfdata> + 14b6a: 83 c4 08 add $0x8,%esp + 14b6d: 83 ec 08 sub $0x8,%esp + 14b70: ff 75 f8 pushl 0xfffffff8(%ebp) + 14b73: ff 75 f0 pushl 0xfffffff0(%ebp) + 14b76: e8 d4 f8 ff ff call 1444f <_hub_configure> + 14b7b: 83 c4 10 add $0x10,%esp + 14b7e: 85 c0 test %eax,%eax + 14b80: 78 20 js 14ba2 <_hub_probe+0x15f> + 14b82: 83 ec 08 sub $0x8,%esp + 14b85: 68 37 b2 01 00 push $0x1b237 + 14b8a: 8b 45 08 mov 0x8(%ebp),%eax + 14b8d: 83 c0 18 add $0x18,%eax + 14b90: 50 push %eax + 14b91: e8 0a 4f 00 00 call 19aa0 <_strcpy> + 14b96: 83 c4 10 add $0x10,%esp + 14b99: c7 45 e4 00 00 00 00 movl $0x0,0xffffffe4(%ebp) + 14ba0: eb 15 jmp 14bb7 <_hub_probe+0x174> + 14ba2: 83 ec 0c sub $0xc,%esp + 14ba5: ff 75 08 pushl 0x8(%ebp) + 14ba8: e8 0e fd ff ff call 148bb <_hub_disconnect> + 14bad: 83 c4 10 add $0x10,%esp + 14bb0: c7 45 e4 ed ff ff ff movl $0xffffffed,0xffffffe4(%ebp) + 14bb7: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 14bba: c9 leave + 14bbb: c3 ret + +00014bbc <_hub_ioctl>: + 14bbc: 55 push %ebp + 14bbd: 89 e5 mov %esp,%ebp + 14bbf: 53 push %ebx + 14bc0: 83 ec 14 sub $0x14,%esp + 14bc3: 8b 45 08 mov 0x8(%ebp),%eax + 14bc6: 8b 80 b8 00 00 00 mov 0xb8(%eax),%eax + 14bcc: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 14bcf: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 14bd2: 2d c0 00 00 00 sub $0xc0,%eax + 14bd7: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 14bda: 8b 45 0c mov 0xc(%ebp),%eax + 14bdd: 3d d2 04 00 00 cmp $0x4d2,%eax + 14be2: 74 05 je 14be9 <_hub_ioctl+0x2d> + 14be4: e9 8a 00 00 00 jmp 14c73 <_hub_ioctl+0xb7> + 14be9: 8b 45 10 mov 0x10(%ebp),%eax + 14bec: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 14bef: c7 45 f0 00 00 00 00 movl $0x0,0xfffffff0(%ebp) + 14bf6: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 14bf9: 83 38 00 cmpl $0x0,(%eax) + 14bfc: 7f 0b jg 14c09 <_hub_ioctl+0x4d> + 14bfe: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 14c01: c7 00 00 00 00 00 movl $0x0,(%eax) + 14c07: eb 5f jmp 14c68 <_hub_ioctl+0xac> + 14c09: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 14c0c: 8b 55 f8 mov 0xfffffff8(%ebp),%edx + 14c0f: 8b 92 ac 01 00 00 mov 0x1ac(%edx),%edx + 14c15: 89 10 mov %edx,(%eax) + 14c17: c7 45 ec 00 00 00 00 movl $0x0,0xffffffec(%ebp) + 14c1e: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 14c21: 8b 00 mov (%eax),%eax + 14c23: 3b 45 ec cmp 0xffffffec(%ebp),%eax + 14c26: 7e 40 jle 14c68 <_hub_ioctl+0xac> + 14c28: 8b 55 f8 mov 0xfffffff8(%ebp),%edx + 14c2b: 8b 45 ec mov 0xffffffec(%ebp),%eax + 14c2e: 83 bc 82 b0 01 00 00 cmpl $0x0,0x1b0(%edx,%eax,4) + 14c35: 00 + 14c36: 75 10 jne 14c48 <_hub_ioctl+0x8c> + 14c38: 8b 55 f4 mov 0xfffffff4(%ebp),%edx + 14c3b: 8b 45 ec mov 0xffffffec(%ebp),%eax + 14c3e: c7 44 82 04 00 00 00 movl $0x0,0x4(%edx,%eax,4) + 14c45: 00 + 14c46: eb 19 jmp 14c61 <_hub_ioctl+0xa5> + 14c48: 8b 5d f4 mov 0xfffffff4(%ebp),%ebx + 14c4b: 8b 4d ec mov 0xffffffec(%ebp),%ecx + 14c4e: 8b 55 f8 mov 0xfffffff8(%ebp),%edx + 14c51: 8b 45 ec mov 0xffffffec(%ebp),%eax + 14c54: 8b 84 82 b0 01 00 00 mov 0x1b0(%edx,%eax,4),%eax + 14c5b: 8b 00 mov (%eax),%eax + 14c5d: 89 44 8b 04 mov %eax,0x4(%ebx,%ecx,4) + 14c61: 8d 45 ec lea 0xffffffec(%ebp),%eax + 14c64: ff 00 incl (%eax) + 14c66: eb b6 jmp 14c1e <_hub_ioctl+0x62> + 14c68: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 14c6b: 8b 00 mov (%eax),%eax + 14c6d: 40 inc %eax + 14c6e: 89 45 e8 mov %eax,0xffffffe8(%ebp) + 14c71: eb 07 jmp 14c7a <_hub_ioctl+0xbe> + 14c73: c7 45 e8 da ff ff ff movl $0xffffffda,0xffffffe8(%ebp) + 14c7a: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 14c7d: 83 c4 14 add $0x14,%esp + 14c80: 5b pop %ebx + 14c81: 5d pop %ebp + 14c82: c3 ret + +00014c83 <_hub_reset>: + 14c83: 55 push %ebp + 14c84: 89 e5 mov %esp,%ebp + 14c86: 83 ec 18 sub $0x18,%esp + 14c89: 8b 45 08 mov 0x8(%ebp),%eax + 14c8c: 8b 00 mov (%eax),%eax + 14c8e: 8b 80 b8 00 00 00 mov 0xb8(%eax),%eax + 14c94: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 14c97: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 14c9a: 2d c0 00 00 00 sub $0xc0,%eax + 14c9f: 89 45 fc mov %eax,0xfffffffc(%ebp) + 14ca2: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 14ca9: 8b 45 08 mov 0x8(%ebp),%eax + 14cac: 8b 40 2c mov 0x2c(%eax),%eax + 14caf: 8a 40 02 mov 0x2(%eax),%al + 14cb2: 25 ff 00 00 00 and $0xff,%eax + 14cb7: 3b 45 f8 cmp 0xfffffff8(%ebp),%eax + 14cba: 7e 31 jle 14ced <_hub_reset+0x6a> + 14cbc: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 14cbf: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 14cc2: 83 bc 82 b0 01 00 00 cmpl $0x0,0x1b0(%edx,%eax,4) + 14cc9: 00 + 14cca: 74 1a je 14ce6 <_hub_reset+0x63> + 14ccc: 83 ec 0c sub $0xc,%esp + 14ccf: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 14cd2: c1 e0 02 shl $0x2,%eax + 14cd5: 03 45 fc add 0xfffffffc(%ebp),%eax + 14cd8: 05 b0 01 00 00 add $0x1b0,%eax + 14cdd: 50 push %eax + 14cde: e8 2e 19 00 00 call 16611 <_usb_disconnect> + 14ce3: 83 c4 10 add $0x10,%esp + 14ce6: 8d 45 f8 lea 0xfffffff8(%ebp),%eax + 14ce9: ff 00 incl (%eax) + 14ceb: eb bc jmp 14ca9 <_hub_reset+0x26> + 14ced: 8b 45 08 mov 0x8(%ebp),%eax + 14cf0: 83 78 04 00 cmpl $0x0,0x4(%eax) + 14cf4: 74 13 je 14d09 <_hub_reset+0x86> + 14cf6: 83 ec 0c sub $0xc,%esp + 14cf9: 8b 45 08 mov 0x8(%ebp),%eax + 14cfc: ff 70 04 pushl 0x4(%eax) + 14cff: e8 b6 37 00 00 call 184ba <_usb_unlink_urb@4> + 14d04: 83 c4 0c add $0xc,%esp + 14d07: eb 09 jmp 14d12 <_hub_reset+0x8f> + 14d09: c7 45 f4 ff ff ff ff movl $0xffffffff,0xfffffff4(%ebp) + 14d10: eb 5c jmp 14d6e <_hub_reset+0xeb> + 14d12: 83 ec 0c sub $0xc,%esp + 14d15: ff 75 fc pushl 0xfffffffc(%ebp) + 14d18: e8 a3 0d 00 00 call 15ac0 <_usb_reset_device> + 14d1d: 83 c4 10 add $0x10,%esp + 14d20: 85 c0 test %eax,%eax + 14d22: 74 09 je 14d2d <_hub_reset+0xaa> + 14d24: c7 45 f4 ff ff ff ff movl $0xffffffff,0xfffffff4(%ebp) + 14d2b: eb 41 jmp 14d6e <_hub_reset+0xeb> + 14d2d: 8b 45 08 mov 0x8(%ebp),%eax + 14d30: 8b 50 04 mov 0x4(%eax),%edx + 14d33: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 14d36: 89 42 14 mov %eax,0x14(%edx) + 14d39: 83 ec 08 sub $0x8,%esp + 14d3c: 6a 00 push $0x0 + 14d3e: 8b 45 08 mov 0x8(%ebp),%eax + 14d41: ff 70 04 pushl 0x4(%eax) + 14d44: e8 5a 34 00 00 call 181a3 <_usb_submit_urb@8> + 14d49: 83 c4 08 add $0x8,%esp + 14d4c: 85 c0 test %eax,%eax + 14d4e: 74 09 je 14d59 <_hub_reset+0xd6> + 14d50: c7 45 f4 ff ff ff ff movl $0xffffffff,0xfffffff4(%ebp) + 14d57: eb 15 jmp 14d6e <_hub_reset+0xeb> + 14d59: 83 ec 0c sub $0xc,%esp + 14d5c: ff 75 08 pushl 0x8(%ebp) + 14d5f: e8 0f f6 ff ff call 14373 <_hub_power_on> + 14d64: 83 c4 10 add $0x10,%esp + 14d67: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) + 14d6e: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 14d71: c9 leave + 14d72: c3 ret + +00014d73 <_hub_start_disconnect>: + 14d73: 55 push %ebp + 14d74: 89 e5 mov %esp,%ebp + 14d76: 83 ec 08 sub $0x8,%esp + 14d79: 8b 45 08 mov 0x8(%ebp),%eax + 14d7c: 8b 80 b8 00 00 00 mov 0xb8(%eax),%eax + 14d82: 89 45 fc mov %eax,0xfffffffc(%ebp) + 14d85: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) + 14d89: 74 4a je 14dd5 <_hub_start_disconnect+0x62> + 14d8b: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 14d92: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 14d95: 8b 80 ac 01 00 00 mov 0x1ac(%eax),%eax + 14d9b: 3b 45 f8 cmp 0xfffffff8(%ebp),%eax + 14d9e: 7e 35 jle 14dd5 <_hub_start_disconnect+0x62> + 14da0: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 14da3: 8b 55 f8 mov 0xfffffff8(%ebp),%edx + 14da6: 8b 84 90 b0 01 00 00 mov 0x1b0(%eax,%edx,4),%eax + 14dad: 3b 45 08 cmp 0x8(%ebp),%eax + 14db0: 75 1c jne 14dce <_hub_start_disconnect+0x5b> + 14db2: 83 ec 0c sub $0xc,%esp + 14db5: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 14db8: c1 e0 02 shl $0x2,%eax + 14dbb: 03 45 fc add 0xfffffffc(%ebp),%eax + 14dbe: 05 b0 01 00 00 add $0x1b0,%eax + 14dc3: 50 push %eax + 14dc4: e8 48 18 00 00 call 16611 <_usb_disconnect> + 14dc9: 83 c4 10 add $0x10,%esp + 14dcc: eb 07 jmp 14dd5 <_hub_start_disconnect+0x62> + 14dce: 8d 45 f8 lea 0xfffffff8(%ebp),%eax + 14dd1: ff 00 incl (%eax) + 14dd3: eb bd jmp 14d92 <_hub_start_disconnect+0x1f> + 14dd5: c9 leave + 14dd6: c3 ret + +00014dd7 <_hub_port_status>: + 14dd7: 55 push %ebp + 14dd8: 89 e5 mov %esp,%ebp + 14dda: 83 ec 08 sub $0x8,%esp + 14ddd: 8b 45 08 mov 0x8(%ebp),%eax + 14de0: 8b 80 88 01 00 00 mov 0x188(%eax),%eax + 14de6: ff 70 0c pushl 0xc(%eax) + 14de9: e8 44 fc ff ff call 14a32 <_usb_get_intfdata> + 14dee: 83 c4 04 add $0x4,%esp + 14df1: 89 45 fc mov %eax,0xfffffffc(%ebp) + 14df4: 83 ec 04 sub $0x4,%esp + 14df7: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 14dfa: ff 70 10 pushl 0x10(%eax) + 14dfd: 8b 45 0c mov 0xc(%ebp),%eax + 14e00: 40 inc %eax + 14e01: 50 push %eax + 14e02: ff 75 08 pushl 0x8(%ebp) + 14e05: e8 99 f1 ff ff call 13fa3 <_get_port_status> + 14e0a: 83 c4 10 add $0x10,%esp + 14e0d: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 14e10: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) + 14e14: 79 02 jns 14e18 <_hub_port_status+0x41> + 14e16: eb 26 jmp 14e3e <_hub_port_status+0x67> + 14e18: 8b 55 10 mov 0x10(%ebp),%edx + 14e1b: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 14e1e: 8b 40 10 mov 0x10(%eax),%eax + 14e21: 66 8b 00 mov (%eax),%ax + 14e24: 66 89 02 mov %ax,(%edx) + 14e27: 8b 55 14 mov 0x14(%ebp),%edx + 14e2a: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 14e2d: 8b 40 10 mov 0x10(%eax),%eax + 14e30: 66 8b 40 02 mov 0x2(%eax),%ax + 14e34: 66 89 02 mov %ax,(%edx) + 14e37: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 14e3e: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 14e41: c9 leave + 14e42: c3 ret + +00014e43 <_hub_port_wait_reset>: + 14e43: 55 push %ebp + 14e44: 89 e5 mov %esp,%ebp + 14e46: 83 ec 18 sub $0x18,%esp + 14e49: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) + 14e50: 81 7d fc f3 01 00 00 cmpl $0x1f3,0xfffffffc(%ebp) + 14e57: 0f 8f 00 01 00 00 jg 14f5d <_hub_port_wait_reset+0x11a> + 14e5d: 83 ec 0c sub $0xc,%esp + 14e60: ff 75 14 pushl 0x14(%ebp) + 14e63: e8 48 46 00 00 call 194b0 <_wait_ms> + 14e68: 83 c4 10 add $0x10,%esp + 14e6b: 8d 45 f4 lea 0xfffffff4(%ebp),%eax + 14e6e: 50 push %eax + 14e6f: 8d 45 f6 lea 0xfffffff6(%ebp),%eax + 14e72: 50 push %eax + 14e73: ff 75 0c pushl 0xc(%ebp) + 14e76: ff 75 08 pushl 0x8(%ebp) + 14e79: e8 59 ff ff ff call 14dd7 <_hub_port_status> + 14e7e: 83 c4 10 add $0x10,%esp + 14e81: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 14e84: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) + 14e88: 79 0c jns 14e96 <_hub_port_wait_reset+0x53> + 14e8a: c7 45 f0 ff ff ff ff movl $0xffffffff,0xfffffff0(%ebp) + 14e91: e9 ce 00 00 00 jmp 14f64 <_hub_port_wait_reset+0x121> + 14e96: 66 8b 45 f6 mov 0xfffffff6(%ebp),%ax + 14e9a: 25 ff ff 00 00 and $0xffff,%eax + 14e9f: 83 e0 01 and $0x1,%eax + 14ea2: 85 c0 test %eax,%eax + 14ea4: 75 0c jne 14eb2 <_hub_port_wait_reset+0x6f> + 14ea6: c7 45 f0 01 00 00 00 movl $0x1,0xfffffff0(%ebp) + 14ead: e9 b2 00 00 00 jmp 14f64 <_hub_port_wait_reset+0x121> + 14eb2: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 14eb5: 25 ff ff 00 00 and $0xffff,%eax + 14eba: 83 e0 01 and $0x1,%eax + 14ebd: 85 c0 test %eax,%eax + 14ebf: 74 0c je 14ecd <_hub_port_wait_reset+0x8a> + 14ec1: c7 45 f0 ff ff ff ff movl $0xffffffff,0xfffffff0(%ebp) + 14ec8: e9 97 00 00 00 jmp 14f64 <_hub_port_wait_reset+0x121> + 14ecd: 66 8b 45 f6 mov 0xfffffff6(%ebp),%ax + 14ed1: 25 ff ff 00 00 and $0xffff,%eax + 14ed6: c1 e8 04 shr $0x4,%eax + 14ed9: 83 e0 01 and $0x1,%eax + 14edc: 85 c0 test %eax,%eax + 14ede: 75 63 jne 14f43 <_hub_port_wait_reset+0x100> + 14ee0: 66 8b 45 f6 mov 0xfffffff6(%ebp),%ax + 14ee4: 25 ff ff 00 00 and $0xffff,%eax + 14ee9: d1 e8 shr %eax + 14eeb: 83 e0 01 and $0x1,%eax + 14eee: 85 c0 test %eax,%eax + 14ef0: 74 51 je 14f43 <_hub_port_wait_reset+0x100> + 14ef2: 66 8b 45 f6 mov 0xfffffff6(%ebp),%ax + 14ef6: 25 ff ff 00 00 and $0xffff,%eax + 14efb: c1 e8 0a shr $0xa,%eax + 14efe: 83 e0 01 and $0x1,%eax + 14f01: 85 c0 test %eax,%eax + 14f03: 74 0c je 14f11 <_hub_port_wait_reset+0xce> + 14f05: 8b 45 10 mov 0x10(%ebp),%eax + 14f08: c7 40 18 03 00 00 00 movl $0x3,0x18(%eax) + 14f0f: eb 29 jmp 14f3a <_hub_port_wait_reset+0xf7> + 14f11: 66 8b 45 f6 mov 0xfffffff6(%ebp),%ax + 14f15: 25 ff ff 00 00 and $0xffff,%eax + 14f1a: c1 e8 09 shr $0x9,%eax + 14f1d: 83 e0 01 and $0x1,%eax + 14f20: 85 c0 test %eax,%eax + 14f22: 74 0c je 14f30 <_hub_port_wait_reset+0xed> + 14f24: 8b 45 10 mov 0x10(%ebp),%eax + 14f27: c7 40 18 01 00 00 00 movl $0x1,0x18(%eax) + 14f2e: eb 0a jmp 14f3a <_hub_port_wait_reset+0xf7> + 14f30: 8b 45 10 mov 0x10(%ebp),%eax + 14f33: c7 40 18 02 00 00 00 movl $0x2,0x18(%eax) + 14f3a: c7 45 f0 00 00 00 00 movl $0x0,0xfffffff0(%ebp) + 14f41: eb 21 jmp 14f64 <_hub_port_wait_reset+0x121> + 14f43: 83 7d fc 13 cmpl $0x13,0xfffffffc(%ebp) + 14f47: 7e 07 jle 14f50 <_hub_port_wait_reset+0x10d> + 14f49: c7 45 14 c8 00 00 00 movl $0xc8,0x14(%ebp) + 14f50: 8b 55 14 mov 0x14(%ebp),%edx + 14f53: 8d 45 fc lea 0xfffffffc(%ebp),%eax + 14f56: 01 10 add %edx,(%eax) + 14f58: e9 f3 fe ff ff jmp 14e50 <_hub_port_wait_reset+0xd> + 14f5d: c7 45 f0 ff ff ff ff movl $0xffffffff,0xfffffff0(%ebp) + 14f64: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 14f67: c9 leave + 14f68: c3 ret + +00014f69 <_hub_port_reset>: + 14f69: 55 push %ebp + 14f6a: 89 e5 mov %esp,%ebp + 14f6c: 83 ec 18 sub $0x18,%esp + 14f6f: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) + 14f76: 83 7d fc 04 cmpl $0x4,0xfffffffc(%ebp) + 14f7a: 0f 8f 85 00 00 00 jg 15005 <_hub_port_reset+0x9c> + 14f80: 83 ec 04 sub $0x4,%esp + 14f83: 6a 04 push $0x4 + 14f85: 8b 45 0c mov 0xc(%ebp),%eax + 14f88: 40 inc %eax + 14f89: 50 push %eax + 14f8a: ff 75 08 pushl 0x8(%ebp) + 14f8d: e8 8e ef ff ff call 13f20 <_set_port_feature> + 14f92: 83 c4 10 add $0x10,%esp + 14f95: ff 75 14 pushl 0x14(%ebp) + 14f98: ff 75 10 pushl 0x10(%ebp) + 14f9b: ff 75 0c pushl 0xc(%ebp) + 14f9e: ff 75 08 pushl 0x8(%ebp) + 14fa1: e8 9d fe ff ff call 14e43 <_hub_port_wait_reset> + 14fa6: 83 c4 10 add $0x10,%esp + 14fa9: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 14fac: 83 7d f8 ff cmpl $0xffffffff,0xfffffff8(%ebp) + 14fb0: 74 42 je 14ff4 <_hub_port_reset+0x8b> + 14fb2: 83 ec 04 sub $0x4,%esp + 14fb5: 6a 14 push $0x14 + 14fb7: 8b 45 0c mov 0xc(%ebp),%eax + 14fba: 40 inc %eax + 14fbb: 50 push %eax + 14fbc: ff 75 08 pushl 0x8(%ebp) + 14fbf: e8 17 ef ff ff call 13edb <_clear_port_feature> + 14fc4: 83 c4 10 add $0x10,%esp + 14fc7: 8b 45 10 mov 0x10(%ebp),%eax + 14fca: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 14fcd: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) + 14fd1: 74 09 je 14fdc <_hub_port_reset+0x73> + 14fd3: c7 45 ec 00 00 00 00 movl $0x0,0xffffffec(%ebp) + 14fda: eb 07 jmp 14fe3 <_hub_port_reset+0x7a> + 14fdc: c7 45 ec 03 00 00 00 movl $0x3,0xffffffec(%ebp) + 14fe3: 8b 45 ec mov 0xffffffec(%ebp),%eax + 14fe6: 8b 55 f0 mov 0xfffffff0(%ebp),%edx + 14fe9: 89 42 14 mov %eax,0x14(%edx) + 14fec: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 14fef: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 14ff2: eb 18 jmp 1500c <_hub_port_reset+0xa3> + 14ff4: c7 45 14 c8 00 00 00 movl $0xc8,0x14(%ebp) + 14ffb: 8d 45 fc lea 0xfffffffc(%ebp),%eax + 14ffe: ff 00 incl (%eax) + 15000: e9 71 ff ff ff jmp 14f76 <_hub_port_reset+0xd> + 15005: c7 45 f4 ff ff ff ff movl $0xffffffff,0xfffffff4(%ebp) + 1500c: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 1500f: c9 leave + 15010: c3 ret + +00015011 <_hub_port_disable>: + 15011: 55 push %ebp + 15012: 89 e5 mov %esp,%ebp + 15014: 83 ec 08 sub $0x8,%esp + 15017: 83 ec 04 sub $0x4,%esp + 1501a: 6a 01 push $0x1 + 1501c: 8b 45 0c mov 0xc(%ebp),%eax + 1501f: 40 inc %eax + 15020: 50 push %eax + 15021: ff 75 08 pushl 0x8(%ebp) + 15024: e8 b2 ee ff ff call 13edb <_clear_port_feature> + 15029: 83 c4 10 add $0x10,%esp + 1502c: 89 45 fc mov %eax,0xfffffffc(%ebp) + 1502f: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 15032: c9 leave + 15033: c3 ret + +00015034 <_hub_port_debounce>: + 15034: 55 push %ebp + 15035: 89 e5 mov %esp,%ebp + 15037: 83 ec 28 sub $0x28,%esp + 1503a: c7 45 ec 00 00 00 00 movl $0x0,0xffffffec(%ebp) + 15041: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) + 15048: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 1504f: 81 7d f8 8f 01 00 00 cmpl $0x18f,0xfffffff8(%ebp) + 15056: 0f 8f a0 00 00 00 jg 150fc <_hub_port_debounce+0xc8> + 1505c: 83 ec 0c sub $0xc,%esp + 1505f: 6a 19 push $0x19 + 15061: e8 4a 44 00 00 call 194b0 <_wait_ms> + 15066: 83 c4 10 add $0x10,%esp + 15069: 8d 45 f2 lea 0xfffffff2(%ebp),%eax + 1506c: 50 push %eax + 1506d: 8d 45 f0 lea 0xfffffff0(%ebp),%eax + 15070: 50 push %eax + 15071: ff 75 0c pushl 0xc(%ebp) + 15074: ff 75 08 pushl 0x8(%ebp) + 15077: e8 5b fd ff ff call 14dd7 <_hub_port_status> + 1507c: 83 c4 10 add $0x10,%esp + 1507f: 89 45 fc mov %eax,0xfffffffc(%ebp) + 15082: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) + 15086: 79 0c jns 15094 <_hub_port_debounce+0x60> + 15088: c7 45 e8 ff ff ff ff movl $0xffffffff,0xffffffe8(%ebp) + 1508f: e9 8d 00 00 00 jmp 15121 <_hub_port_debounce+0xed> + 15094: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 15097: 25 ff ff 00 00 and $0xffff,%eax + 1509c: 83 e0 01 and $0x1,%eax + 1509f: 3b 45 ec cmp 0xffffffec(%ebp),%eax + 150a2: 75 13 jne 150b7 <_hub_port_debounce+0x83> + 150a4: 83 7d ec 00 cmpl $0x0,0xffffffec(%ebp) + 150a8: 74 14 je 150be <_hub_port_debounce+0x8a> + 150aa: 8d 45 f4 lea 0xfffffff4(%ebp),%eax + 150ad: ff 00 incl (%eax) + 150af: 83 7d f4 04 cmpl $0x4,0xfffffff4(%ebp) + 150b3: 75 09 jne 150be <_hub_port_debounce+0x8a> + 150b5: eb 45 jmp 150fc <_hub_port_debounce+0xc8> + 150b7: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) + 150be: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 150c1: 25 ff ff 00 00 and $0xffff,%eax + 150c6: 83 e0 01 and $0x1,%eax + 150c9: 89 45 ec mov %eax,0xffffffec(%ebp) + 150cc: 66 8b 45 f2 mov 0xfffffff2(%ebp),%ax + 150d0: 25 ff ff 00 00 and $0xffff,%eax + 150d5: 83 e0 01 and $0x1,%eax + 150d8: 85 c0 test %eax,%eax + 150da: 74 15 je 150f1 <_hub_port_debounce+0xbd> + 150dc: 83 ec 04 sub $0x4,%esp + 150df: 6a 10 push $0x10 + 150e1: 8b 45 0c mov 0xc(%ebp),%eax + 150e4: 40 inc %eax + 150e5: 50 push %eax + 150e6: ff 75 08 pushl 0x8(%ebp) + 150e9: e8 ed ed ff ff call 13edb <_clear_port_feature> + 150ee: 83 c4 10 add $0x10,%esp + 150f1: 8d 45 f8 lea 0xfffffff8(%ebp),%eax + 150f4: 83 00 19 addl $0x19,(%eax) + 150f7: e9 53 ff ff ff jmp 1504f <_hub_port_debounce+0x1b> + 150fc: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 150ff: 25 ff ff 00 00 and $0xffff,%eax + 15104: 83 e0 01 and $0x1,%eax + 15107: 85 c0 test %eax,%eax + 15109: 74 09 je 15114 <_hub_port_debounce+0xe0> + 1510b: c7 45 e4 00 00 00 00 movl $0x0,0xffffffe4(%ebp) + 15112: eb 07 jmp 1511b <_hub_port_debounce+0xe7> + 15114: c7 45 e4 01 00 00 00 movl $0x1,0xffffffe4(%ebp) + 1511b: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 1511e: 89 45 e8 mov %eax,0xffffffe8(%ebp) + 15121: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 15124: c9 leave + 15125: c3 ret + +00015126 <_hub_port_connect_change>: + 15126: 55 push %ebp + 15127: 89 e5 mov %esp,%ebp + 15129: 83 ec 28 sub $0x28,%esp + 1512c: 8b 45 10 mov 0x10(%ebp),%eax + 1512f: 8b 55 14 mov 0x14(%ebp),%edx + 15132: 66 89 45 fe mov %ax,0xfffffffe(%ebp) + 15136: 66 89 55 fc mov %dx,0xfffffffc(%ebp) + 1513a: 8b 45 08 mov 0x8(%ebp),%eax + 1513d: 8b 00 mov (%eax),%eax + 1513f: 8b 80 b8 00 00 00 mov 0xb8(%eax),%eax + 15145: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 15148: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 1514b: 2d c0 00 00 00 sub $0xc0,%eax + 15150: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 15153: c7 45 f0 0a 00 00 00 movl $0xa,0xfffffff0(%ebp) + 1515a: 83 ec 04 sub $0x4,%esp + 1515d: 6a 10 push $0x10 + 1515f: 8b 45 0c mov 0xc(%ebp),%eax + 15162: 40 inc %eax + 15163: 50 push %eax + 15164: ff 75 f8 pushl 0xfffffff8(%ebp) + 15167: e8 6f ed ff ff call 13edb <_clear_port_feature> + 1516c: 83 c4 10 add $0x10,%esp + 1516f: 8b 55 f8 mov 0xfffffff8(%ebp),%edx + 15172: 8b 45 0c mov 0xc(%ebp),%eax + 15175: 83 bc 82 b0 01 00 00 cmpl $0x0,0x1b0(%edx,%eax,4) + 1517c: 00 + 1517d: 74 1a je 15199 <_hub_port_connect_change+0x73> + 1517f: 83 ec 0c sub $0xc,%esp + 15182: 8b 45 0c mov 0xc(%ebp),%eax + 15185: c1 e0 02 shl $0x2,%eax + 15188: 03 45 f8 add 0xfffffff8(%ebp),%eax + 1518b: 05 b0 01 00 00 add $0x1b0,%eax + 15190: 50 push %eax + 15191: e8 7b 14 00 00 call 16611 <_usb_disconnect> + 15196: 83 c4 10 add $0x10,%esp + 15199: 66 8b 45 fe mov 0xfffffffe(%ebp),%ax + 1519d: 25 ff ff 00 00 and $0xffff,%eax + 151a2: 83 e0 01 and $0x1,%eax + 151a5: 85 c0 test %eax,%eax + 151a7: 75 2c jne 151d5 <_hub_port_connect_change+0xaf> + 151a9: 66 8b 45 fe mov 0xfffffffe(%ebp),%ax + 151ad: 25 ff ff 00 00 and $0xffff,%eax + 151b2: d1 e8 shr %eax + 151b4: 83 e0 01 and $0x1,%eax + 151b7: 85 c0 test %eax,%eax + 151b9: 0f 84 08 02 00 00 je 153c7 <_hub_port_connect_change+0x2a1> + 151bf: 83 ec 08 sub $0x8,%esp + 151c2: ff 75 0c pushl 0xc(%ebp) + 151c5: ff 75 f8 pushl 0xfffffff8(%ebp) + 151c8: e8 44 fe ff ff call 15011 <_hub_port_disable> + 151cd: 83 c4 10 add $0x10,%esp + 151d0: e9 f2 01 00 00 jmp 153c7 <_hub_port_connect_change+0x2a1> + 151d5: 83 ec 08 sub $0x8,%esp + 151d8: ff 75 0c pushl 0xc(%ebp) + 151db: ff 75 f8 pushl 0xfffffff8(%ebp) + 151de: e8 51 fe ff ff call 15034 <_hub_port_debounce> + 151e3: 83 c4 10 add $0x10,%esp + 151e6: 85 c0 test %eax,%eax + 151e8: 74 16 je 15200 <_hub_port_connect_change+0xda> + 151ea: 83 ec 08 sub $0x8,%esp + 151ed: ff 75 0c pushl 0xc(%ebp) + 151f0: ff 75 f8 pushl 0xfffffff8(%ebp) + 151f3: e8 19 fe ff ff call 15011 <_hub_port_disable> + 151f8: 83 c4 10 add $0x10,%esp + 151fb: e9 c7 01 00 00 jmp 153c7 <_hub_port_connect_change+0x2a1> + 15200: 66 8b 45 fe mov 0xfffffffe(%ebp),%ax + 15204: 25 ff ff 00 00 and $0xffff,%eax + 15209: c1 e8 09 shr $0x9,%eax + 1520c: 83 e0 01 and $0x1,%eax + 1520f: 85 c0 test %eax,%eax + 15211: 74 07 je 1521a <_hub_port_connect_change+0xf4> + 15213: c7 45 f0 c8 00 00 00 movl $0xc8,0xfffffff0(%ebp) + 1521a: c7 45 ec 00 00 00 00 movl $0x0,0xffffffec(%ebp) + 15221: 83 7d ec 01 cmpl $0x1,0xffffffec(%ebp) + 15225: 0f 8f 7a 01 00 00 jg 153a5 <_hub_port_connect_change+0x27f> + 1522b: 83 ec 08 sub $0x8,%esp + 1522e: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 15231: ff b0 bc 00 00 00 pushl 0xbc(%eax) + 15237: ff 75 f8 pushl 0xfffffff8(%ebp) + 1523a: e8 3a 10 00 00 call 16279 <_usb_alloc_dev@8> + 1523f: 83 c4 08 add $0x8,%esp + 15242: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 15245: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) + 15249: 75 05 jne 15250 <_hub_port_connect_change+0x12a> + 1524b: e9 55 01 00 00 jmp 153a5 <_hub_port_connect_change+0x27f> + 15250: 8b 4d f8 mov 0xfffffff8(%ebp),%ecx + 15253: 8b 55 0c mov 0xc(%ebp),%edx + 15256: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 15259: 89 84 91 b0 01 00 00 mov %eax,0x1b0(%ecx,%edx,4) + 15260: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 15263: c7 40 14 02 00 00 00 movl $0x2,0x14(%eax) + 1526a: ff 75 f0 pushl 0xfffffff0(%ebp) + 1526d: ff 75 f4 pushl 0xfffffff4(%ebp) + 15270: ff 75 0c pushl 0xc(%ebp) + 15273: ff 75 f8 pushl 0xfffffff8(%ebp) + 15276: e8 ee fc ff ff call 14f69 <_hub_port_reset> + 1527b: 83 c4 10 add $0x10,%esp + 1527e: 85 c0 test %eax,%eax + 15280: 74 13 je 15295 <_hub_port_connect_change+0x16f> + 15282: 83 ec 0c sub $0xc,%esp + 15285: ff 75 f4 pushl 0xfffffff4(%ebp) + 15288: e8 2e 11 00 00 call 163bb <_usb_put_dev@4> + 1528d: 83 c4 0c add $0xc,%esp + 15290: e9 10 01 00 00 jmp 153a5 <_hub_port_connect_change+0x27f> + 15295: 83 ec 0c sub $0xc,%esp + 15298: ff 75 f4 pushl 0xfffffff4(%ebp) + 1529b: e8 16 15 00 00 call 167b6 <_usb_connect@4> + 152a0: 83 c4 0c add $0xc,%esp + 152a3: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 152a6: 83 78 1c 00 cmpl $0x0,0x1c(%eax) + 152aa: 74 1a je 152c6 <_hub_port_connect_change+0x1a0> + 152ac: 8b 55 f4 mov 0xfffffff4(%ebp),%edx + 152af: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 152b2: 8b 40 1c mov 0x1c(%eax),%eax + 152b5: 89 42 1c mov %eax,0x1c(%edx) + 152b8: 8b 55 f4 mov 0xfffffff4(%ebp),%edx + 152bb: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 152be: 8b 40 20 mov 0x20(%eax),%eax + 152c1: 89 42 20 mov %eax,0x20(%edx) + 152c4: eb 28 jmp 152ee <_hub_port_connect_change+0x1c8> + 152c6: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 152c9: 83 78 18 03 cmpl $0x3,0x18(%eax) + 152cd: 74 1f je 152ee <_hub_port_connect_change+0x1c8> + 152cf: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 152d2: 83 78 18 03 cmpl $0x3,0x18(%eax) + 152d6: 75 16 jne 152ee <_hub_port_connect_change+0x1c8> + 152d8: 8b 55 f4 mov 0xfffffff4(%ebp),%edx + 152db: 8b 45 08 mov 0x8(%ebp),%eax + 152de: 83 c0 34 add $0x34,%eax + 152e1: 89 42 1c mov %eax,0x1c(%edx) + 152e4: 8b 55 f4 mov 0xfffffff4(%ebp),%edx + 152e7: 8b 45 0c mov 0xc(%ebp),%eax + 152ea: 40 inc %eax + 152eb: 89 42 20 mov %eax,0x20(%edx) + 152ee: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 152f1: 8b 80 b8 00 00 00 mov 0xb8(%eax),%eax + 152f7: 89 45 e8 mov %eax,0xffffffe8(%ebp) + 152fa: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 152fd: 80 78 04 30 cmpb $0x30,0x4(%eax) + 15301: 74 2a je 1532d <_hub_port_connect_change+0x207> + 15303: 83 ec 0c sub $0xc,%esp + 15306: 8b 45 0c mov 0xc(%ebp),%eax + 15309: 40 inc %eax + 1530a: 50 push %eax + 1530b: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 1530e: 83 c0 04 add $0x4,%eax + 15311: 50 push %eax + 15312: 68 3b b2 01 00 push $0x1b23b + 15317: 6a 10 push $0x10 + 15319: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 1531c: 83 c0 04 add $0x4,%eax + 1531f: 50 push %eax + 15320: e8 9b 47 00 00 call 19ac0 <__snprintf> + 15325: 83 c4 20 add $0x20,%esp + 15328: 89 45 e4 mov %eax,0xffffffe4(%ebp) + 1532b: eb 1e jmp 1534b <_hub_port_connect_change+0x225> + 1532d: 8b 45 0c mov 0xc(%ebp),%eax + 15330: 40 inc %eax + 15331: 50 push %eax + 15332: 68 41 b2 01 00 push $0x1b241 + 15337: 6a 10 push $0x10 + 15339: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 1533c: 83 c0 04 add $0x4,%eax + 1533f: 50 push %eax + 15340: e8 7b 47 00 00 call 19ac0 <__snprintf> + 15345: 83 c4 10 add $0x10,%esp + 15348: 89 45 e4 mov %eax,0xffffffe4(%ebp) + 1534b: 8b 55 f4 mov 0xfffffff4(%ebp),%edx + 1534e: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 15351: 8b 80 b8 00 00 00 mov 0xb8(%eax),%eax + 15357: 8b 80 60 01 00 00 mov 0x160(%eax),%eax + 1535d: 8b 80 a0 00 00 00 mov 0xa0(%eax),%eax + 15363: 89 82 60 01 00 00 mov %eax,0x160(%edx) + 15369: 83 ec 08 sub $0x8,%esp + 1536c: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 1536f: 05 c0 00 00 00 add $0xc0,%eax + 15374: 50 push %eax + 15375: ff 75 f4 pushl 0xfffffff4(%ebp) + 15378: e8 16 18 00 00 call 16b93 <_usb_new_device> + 1537d: 83 c4 10 add $0x10,%esp + 15380: 85 c0 test %eax,%eax + 15382: 75 02 jne 15386 <_hub_port_connect_change+0x260> + 15384: eb 41 jmp 153c7 <_hub_port_connect_change+0x2a1> + 15386: 83 ec 0c sub $0xc,%esp + 15389: ff 75 f4 pushl 0xfffffff4(%ebp) + 1538c: e8 2a 10 00 00 call 163bb <_usb_put_dev@4> + 15391: 83 c4 0c add $0xc,%esp + 15394: c7 45 f0 c8 00 00 00 movl $0xc8,0xfffffff0(%ebp) + 1539b: 8d 45 ec lea 0xffffffec(%ebp),%eax + 1539e: ff 00 incl (%eax) + 153a0: e9 7c fe ff ff jmp 15221 <_hub_port_connect_change+0xfb> + 153a5: 8b 55 f8 mov 0xfffffff8(%ebp),%edx + 153a8: 8b 45 0c mov 0xc(%ebp),%eax + 153ab: c7 84 82 b0 01 00 00 movl $0x0,0x1b0(%edx,%eax,4) + 153b2: 00 00 00 00 + 153b6: 83 ec 08 sub $0x8,%esp + 153b9: ff 75 0c pushl 0xc(%ebp) + 153bc: ff 75 f8 pushl 0xfffffff8(%ebp) + 153bf: e8 4d fc ff ff call 15011 <_hub_port_disable> + 153c4: 83 c4 10 add $0x10,%esp + 153c7: c9 leave + 153c8: c3 ret + +000153c9 <_hub_events>: + 153c9: 55 push %ebp + 153ca: 89 e5 mov %esp,%ebp + 153cc: 83 ec 28 sub $0x28,%esp + 153cf: c7 45 dc 00 00 00 00 movl $0x0,0xffffffdc(%ebp) + 153d6: 83 7d dc 04 cmpl $0x4,0xffffffdc(%ebp) + 153da: 0f 8f 9c 02 00 00 jg 1567c <_hub_events+0x2b3> + 153e0: 8d 45 dc lea 0xffffffdc(%ebp),%eax + 153e3: ff 00 incl (%eax) + 153e5: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) + 153ec: 68 40 a0 01 00 push $0x1a040 + 153f1: e8 08 ed ff ff call 140fe <_list_empty> + 153f6: 83 c4 04 add $0x4,%esp + 153f9: 85 c0 test %eax,%eax + 153fb: 74 05 je 15402 <_hub_events+0x39> + 153fd: e9 7a 02 00 00 jmp 1567c <_hub_events+0x2b3> + 15402: a1 40 a0 01 00 mov 0x1a040,%eax + 15407: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 1540a: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 1540d: 83 e8 24 sub $0x24,%eax + 15410: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 15413: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 15416: 8b 00 mov (%eax),%eax + 15418: 8b 80 b8 00 00 00 mov 0xb8(%eax),%eax + 1541e: 89 45 d8 mov %eax,0xffffffd8(%ebp) + 15421: 8b 45 d8 mov 0xffffffd8(%ebp),%eax + 15424: 2d c0 00 00 00 sub $0xc0,%eax + 15429: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 1542c: 83 ec 0c sub $0xc,%esp + 1542f: ff 75 f8 pushl 0xfffffff8(%ebp) + 15432: e8 47 02 00 00 call 1567e <_list_del_init> + 15437: 83 c4 10 add $0x10,%esp + 1543a: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 1543d: 83 78 14 00 cmpl $0x0,0x14(%eax) + 15441: 74 39 je 1547c <_hub_events+0xb3> + 15443: 83 ec 0c sub $0xc,%esp + 15446: ff 75 f0 pushl 0xfffffff0(%ebp) + 15449: e8 35 f8 ff ff call 14c83 <_hub_reset> + 1544e: 83 c4 10 add $0x10,%esp + 15451: 85 c0 test %eax,%eax + 15453: 74 13 je 15468 <_hub_events+0x9f> + 15455: 83 ec 0c sub $0xc,%esp + 15458: ff 75 f4 pushl 0xfffffff4(%ebp) + 1545b: e8 13 f9 ff ff call 14d73 <_hub_start_disconnect> + 15460: 83 c4 10 add $0x10,%esp + 15463: e9 6e ff ff ff jmp 153d6 <_hub_events+0xd> + 15468: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 1546b: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) + 15472: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 15475: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax) + 1547c: c7 45 e4 00 00 00 00 movl $0x0,0xffffffe4(%ebp) + 15483: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 15486: 8b 40 2c mov 0x2c(%eax),%eax + 15489: 8a 40 02 mov 0x2(%eax),%al + 1548c: 25 ff 00 00 00 and $0xff,%eax + 15491: 3b 45 e4 cmp 0xffffffe4(%ebp),%eax + 15494: 0f 8e 5c 01 00 00 jle 155f6 <_hub_events+0x22d> + 1549a: 8d 45 e8 lea 0xffffffe8(%ebp),%eax + 1549d: 50 push %eax + 1549e: 8d 45 ea lea 0xffffffea(%ebp),%eax + 154a1: 50 push %eax + 154a2: ff 75 e4 pushl 0xffffffe4(%ebp) + 154a5: ff 75 f4 pushl 0xfffffff4(%ebp) + 154a8: e8 2a f9 ff ff call 14dd7 <_hub_port_status> + 154ad: 83 c4 10 add $0x10,%esp + 154b0: 89 45 e0 mov %eax,0xffffffe0(%ebp) + 154b3: 83 7d e0 00 cmpl $0x0,0xffffffe0(%ebp) + 154b7: 79 05 jns 154be <_hub_events+0xf5> + 154b9: e9 2e 01 00 00 jmp 155ec <_hub_events+0x223> + 154be: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 154c1: 25 ff ff 00 00 and $0xffff,%eax + 154c6: 83 e0 01 and $0x1,%eax + 154c9: 85 c0 test %eax,%eax + 154cb: 74 23 je 154f0 <_hub_events+0x127> + 154cd: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 154d0: 25 ff ff 00 00 and $0xffff,%eax + 154d5: 50 push %eax + 154d6: 66 8b 45 ea mov 0xffffffea(%ebp),%ax + 154da: 25 ff ff 00 00 and $0xffff,%eax + 154df: 50 push %eax + 154e0: ff 75 e4 pushl 0xffffffe4(%ebp) + 154e3: ff 75 f0 pushl 0xfffffff0(%ebp) + 154e6: e8 3b fc ff ff call 15126 <_hub_port_connect_change> + 154eb: 83 c4 10 add $0x10,%esp + 154ee: eb 79 jmp 15569 <_hub_events+0x1a0> + 154f0: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 154f3: 25 ff ff 00 00 and $0xffff,%eax + 154f8: d1 e8 shr %eax + 154fa: 83 e0 01 and $0x1,%eax + 154fd: 85 c0 test %eax,%eax + 154ff: 74 68 je 15569 <_hub_events+0x1a0> + 15501: 83 ec 04 sub $0x4,%esp + 15504: 6a 11 push $0x11 + 15506: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 15509: 40 inc %eax + 1550a: 50 push %eax + 1550b: ff 75 f4 pushl 0xfffffff4(%ebp) + 1550e: e8 c8 e9 ff ff call 13edb <_clear_port_feature> + 15513: 83 c4 10 add $0x10,%esp + 15516: 66 8b 45 ea mov 0xffffffea(%ebp),%ax + 1551a: 25 ff ff 00 00 and $0xffff,%eax + 1551f: d1 e8 shr %eax + 15521: 83 e0 01 and $0x1,%eax + 15524: 85 c0 test %eax,%eax + 15526: 75 41 jne 15569 <_hub_events+0x1a0> + 15528: 66 8b 45 ea mov 0xffffffea(%ebp),%ax + 1552c: 25 ff ff 00 00 and $0xffff,%eax + 15531: 83 e0 01 and $0x1,%eax + 15534: 85 c0 test %eax,%eax + 15536: 74 31 je 15569 <_hub_events+0x1a0> + 15538: 8b 55 f4 mov 0xfffffff4(%ebp),%edx + 1553b: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 1553e: 83 bc 82 b0 01 00 00 cmpl $0x0,0x1b0(%edx,%eax,4) + 15545: 00 + 15546: 74 21 je 15569 <_hub_events+0x1a0> + 15548: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 1554b: 25 ff ff 00 00 and $0xffff,%eax + 15550: 50 push %eax + 15551: 66 8b 45 ea mov 0xffffffea(%ebp),%ax + 15555: 25 ff ff 00 00 and $0xffff,%eax + 1555a: 50 push %eax + 1555b: ff 75 e4 pushl 0xffffffe4(%ebp) + 1555e: ff 75 f0 pushl 0xfffffff0(%ebp) + 15561: e8 c0 fb ff ff call 15126 <_hub_port_connect_change> + 15566: 83 c4 10 add $0x10,%esp + 15569: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 1556c: 25 ff ff 00 00 and $0xffff,%eax + 15571: c1 e8 02 shr $0x2,%eax + 15574: 83 e0 01 and $0x1,%eax + 15577: 85 c0 test %eax,%eax + 15579: 74 15 je 15590 <_hub_events+0x1c7> + 1557b: 83 ec 04 sub $0x4,%esp + 1557e: 6a 12 push $0x12 + 15580: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 15583: 40 inc %eax + 15584: 50 push %eax + 15585: ff 75 f4 pushl 0xfffffff4(%ebp) + 15588: e8 4e e9 ff ff call 13edb <_clear_port_feature> + 1558d: 83 c4 10 add $0x10,%esp + 15590: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 15593: 25 ff ff 00 00 and $0xffff,%eax + 15598: c1 e8 03 shr $0x3,%eax + 1559b: 83 e0 01 and $0x1,%eax + 1559e: 85 c0 test %eax,%eax + 155a0: 74 23 je 155c5 <_hub_events+0x1fc> + 155a2: 83 ec 04 sub $0x4,%esp + 155a5: 6a 13 push $0x13 + 155a7: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 155aa: 40 inc %eax + 155ab: 50 push %eax + 155ac: ff 75 f4 pushl 0xfffffff4(%ebp) + 155af: e8 27 e9 ff ff call 13edb <_clear_port_feature> + 155b4: 83 c4 10 add $0x10,%esp + 155b7: 83 ec 0c sub $0xc,%esp + 155ba: ff 75 f0 pushl 0xfffffff0(%ebp) + 155bd: e8 b1 ed ff ff call 14373 <_hub_power_on> + 155c2: 83 c4 10 add $0x10,%esp + 155c5: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 155c8: 25 ff ff 00 00 and $0xffff,%eax + 155cd: c1 e8 04 shr $0x4,%eax + 155d0: 83 e0 01 and $0x1,%eax + 155d3: 85 c0 test %eax,%eax + 155d5: 74 15 je 155ec <_hub_events+0x223> + 155d7: 83 ec 04 sub $0x4,%esp + 155da: 6a 14 push $0x14 + 155dc: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 155df: 40 inc %eax + 155e0: 50 push %eax + 155e1: ff 75 f4 pushl 0xfffffff4(%ebp) + 155e4: e8 f2 e8 ff ff call 13edb <_clear_port_feature> + 155e9: 83 c4 10 add $0x10,%esp + 155ec: 8d 45 e4 lea 0xffffffe4(%ebp),%eax + 155ef: ff 00 incl (%eax) + 155f1: e9 8d fe ff ff jmp 15483 <_hub_events+0xba> + 155f6: 83 ec 04 sub $0x4,%esp + 155f9: 8d 45 ec lea 0xffffffec(%ebp),%eax + 155fc: 50 push %eax + 155fd: 8d 45 ee lea 0xffffffee(%ebp),%eax + 15600: 50 push %eax + 15601: ff 75 f0 pushl 0xfffffff0(%ebp) + 15604: e8 dd ed ff ff call 143e6 <_hub_hub_status> + 15609: 83 c4 10 add $0x10,%esp + 1560c: 85 c0 test %eax,%eax + 1560e: 79 05 jns 15615 <_hub_events+0x24c> + 15610: e9 c1 fd ff ff jmp 153d6 <_hub_events+0xd> + 15615: 8b 45 ec mov 0xffffffec(%ebp),%eax + 15618: 25 ff ff 00 00 and $0xffff,%eax + 1561d: 83 e0 01 and $0x1,%eax + 15620: 85 c0 test %eax,%eax + 15622: 74 10 je 15634 <_hub_events+0x26b> + 15624: 83 ec 08 sub $0x8,%esp + 15627: 6a 00 push $0x0 + 15629: ff 75 f4 pushl 0xfffffff4(%ebp) + 1562c: e8 6c e8 ff ff call 13e9d <_clear_hub_feature> + 15631: 83 c4 10 add $0x10,%esp + 15634: 8b 45 ec mov 0xffffffec(%ebp),%eax + 15637: 25 ff ff 00 00 and $0xffff,%eax + 1563c: d1 e8 shr %eax + 1563e: 83 e0 01 and $0x1,%eax + 15641: 85 c0 test %eax,%eax + 15643: 0f 84 8d fd ff ff je 153d6 <_hub_events+0xd> + 15649: 83 ec 0c sub $0xc,%esp + 1564c: 68 f4 01 00 00 push $0x1f4 + 15651: e8 5a 3e 00 00 call 194b0 <_wait_ms> + 15656: 83 c4 10 add $0x10,%esp + 15659: 83 ec 08 sub $0x8,%esp + 1565c: 6a 01 push $0x1 + 1565e: ff 75 f4 pushl 0xfffffff4(%ebp) + 15661: e8 37 e8 ff ff call 13e9d <_clear_hub_feature> + 15666: 83 c4 10 add $0x10,%esp + 15669: 83 ec 0c sub $0xc,%esp + 1566c: ff 75 f0 pushl 0xfffffff0(%ebp) + 1566f: e8 ff ec ff ff call 14373 <_hub_power_on> + 15674: 83 c4 10 add $0x10,%esp + 15677: e9 5a fd ff ff jmp 153d6 <_hub_events+0xd> + 1567c: c9 leave + 1567d: c3 ret + +0001567e <_list_del_init>: + 1567e: 55 push %ebp + 1567f: 89 e5 mov %esp,%ebp + 15681: 8b 45 08 mov 0x8(%ebp),%eax + 15684: ff 30 pushl (%eax) + 15686: 8b 45 08 mov 0x8(%ebp),%eax + 15689: ff 70 04 pushl 0x4(%eax) + 1568c: e8 ac eb ff ff call 1423d <___list_del> + 15691: 83 c4 08 add $0x8,%esp + 15694: 8b 55 08 mov 0x8(%ebp),%edx + 15697: 8b 45 08 mov 0x8(%ebp),%eax + 1569a: 89 02 mov %eax,(%edx) + 1569c: 8b 55 08 mov 0x8(%ebp),%edx + 1569f: 8b 45 08 mov 0x8(%ebp),%eax + 156a2: 89 42 04 mov %eax,0x4(%edx) + 156a5: c9 leave + 156a6: c3 ret + +000156a7 <_hub_thread>: + 156a7: 55 push %ebp + 156a8: 89 e5 mov %esp,%ebp + 156aa: 83 ec 08 sub $0x8,%esp + 156ad: e8 17 fd ff ff call 153c9 <_hub_events> + 156b2: b8 00 00 00 00 mov $0x0,%eax + 156b7: c9 leave + 156b8: c3 ret + +000156b9 <_usb_hub_init>: + 156b9: 55 push %ebp + 156ba: 89 e5 mov %esp,%ebp + 156bc: 83 ec 08 sub $0x8,%esp + 156bf: 83 ec 0c sub $0xc,%esp + 156c2: 68 a0 a0 01 00 push $0x1a0a0 + 156c7: e8 26 05 00 00 call 15bf2 <_usb_register> + 156cc: 83 c4 10 add $0x10,%esp + 156cf: 85 c0 test %eax,%eax + 156d1: 79 09 jns 156dc <_usb_hub_init+0x23> + 156d3: c7 45 f8 ff ff ff ff movl $0xffffffff,0xfffffff8(%ebp) + 156da: eb 45 jmp 15721 <_usb_hub_init+0x68> + 156dc: 83 ec 04 sub $0x4,%esp + 156df: 6a 00 push $0x0 + 156e1: 6a 00 push $0x0 + 156e3: 68 a7 56 01 00 push $0x156a7 + 156e8: e8 03 40 00 00 call 196f0 <_my_kernel_thread> + 156ed: 83 c4 10 add $0x10,%esp + 156f0: 89 45 fc mov %eax,0xfffffffc(%ebp) + 156f3: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) + 156f7: 78 11 js 1570a <_usb_hub_init+0x51> + 156f9: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 156fc: a3 30 c0 01 00 mov %eax,0x1c030 + 15701: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 15708: eb 17 jmp 15721 <_usb_hub_init+0x68> + 1570a: 83 ec 0c sub $0xc,%esp + 1570d: 68 a0 a0 01 00 push $0x1a0a0 + 15712: e8 54 05 00 00 call 15c6b <_usb_deregister> + 15717: 83 c4 10 add $0x10,%esp + 1571a: c7 45 f8 ff ff ff ff movl $0xffffffff,0xfffffff8(%ebp) + 15721: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 15724: c9 leave + 15725: c3 ret + +00015726 <_usb_hub_cleanup>: + 15726: 55 push %ebp + 15727: 89 e5 mov %esp,%ebp + 15729: 83 ec 08 sub $0x8,%esp + 1572c: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) + 15733: 83 ec 0c sub $0xc,%esp + 15736: 68 60 c0 01 00 push $0x1c060 + 1573b: e8 98 41 00 00 call 198d8 <_my_wait_for_completion> + 15740: 83 c4 10 add $0x10,%esp + 15743: 83 ec 0c sub $0xc,%esp + 15746: 68 a0 a0 01 00 push $0x1a0a0 + 1574b: e8 1b 05 00 00 call 15c6b <_usb_deregister> + 15750: 83 c4 10 add $0x10,%esp + 15753: c9 leave + 15754: c3 ret + +00015755 <_usb_physical_reset_device>: + 15755: 55 push %ebp + 15756: 89 e5 mov %esp,%ebp + 15758: 53 push %ebx + 15759: 83 ec 24 sub $0x24,%esp + 1575c: 8b 45 08 mov 0x8(%ebp),%eax + 1575f: 8b 80 b8 00 00 00 mov 0xb8(%eax),%eax + 15765: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 15768: c7 45 e8 ff ff ff ff movl $0xffffffff,0xffffffe8(%ebp) + 1576f: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) + 15773: 75 0c jne 15781 <_usb_physical_reset_device+0x2c> + 15775: c7 45 dc ea ff ff ff movl $0xffffffea,0xffffffdc(%ebp) + 1577c: e9 29 03 00 00 jmp 15aaa <_usb_physical_reset_device+0x355> + 15781: c7 45 f0 00 00 00 00 movl $0x0,0xfffffff0(%ebp) + 15788: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 1578b: 8b 80 ac 01 00 00 mov 0x1ac(%eax),%eax + 15791: 3b 45 f0 cmp 0xfffffff0(%ebp),%eax + 15794: 7e 21 jle 157b7 <_usb_physical_reset_device+0x62> + 15796: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 15799: 8b 55 f0 mov 0xfffffff0(%ebp),%edx + 1579c: 8b 84 90 b0 01 00 00 mov 0x1b0(%eax,%edx,4),%eax + 157a3: 3b 45 08 cmp 0x8(%ebp),%eax + 157a6: 75 08 jne 157b0 <_usb_physical_reset_device+0x5b> + 157a8: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 157ab: 89 45 e8 mov %eax,0xffffffe8(%ebp) + 157ae: eb 07 jmp 157b7 <_usb_physical_reset_device+0x62> + 157b0: 8d 45 f0 lea 0xfffffff0(%ebp),%eax + 157b3: ff 00 incl (%eax) + 157b5: eb d1 jmp 15788 <_usb_physical_reset_device+0x33> + 157b7: 83 7d e8 00 cmpl $0x0,0xffffffe8(%ebp) + 157bb: 79 0c jns 157c9 <_usb_physical_reset_device+0x74> + 157bd: c7 45 dc fe ff ff ff movl $0xfffffffe,0xffffffdc(%ebp) + 157c4: e9 e1 02 00 00 jmp 15aaa <_usb_physical_reset_device+0x355> + 157c9: 83 ec 08 sub $0x8,%esp + 157cc: 6a 12 push $0x12 + 157ce: 6a 01 push $0x1 + 157d0: e8 5b 42 00 00 call 19a30 <_ExAllocatePool@8> + 157d5: 83 c4 08 add $0x8,%esp + 157d8: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 157db: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) + 157df: 75 0c jne 157ed <_usb_physical_reset_device+0x98> + 157e1: c7 45 dc f4 ff ff ff movl $0xfffffff4,0xffffffdc(%ebp) + 157e8: e9 bd 02 00 00 jmp 15aaa <_usb_physical_reset_device+0x355> + 157ed: 6a 0a push $0xa + 157ef: ff 75 08 pushl 0x8(%ebp) + 157f2: ff 75 e8 pushl 0xffffffe8(%ebp) + 157f5: ff 75 f8 pushl 0xfffffff8(%ebp) + 157f8: e8 6c f7 ff ff call 14f69 <_hub_port_reset> + 157fd: 83 c4 10 add $0x10,%esp + 15800: 85 c0 test %eax,%eax + 15802: 74 2b je 1582f <_usb_physical_reset_device+0xda> + 15804: 83 ec 08 sub $0x8,%esp + 15807: ff 75 e8 pushl 0xffffffe8(%ebp) + 1580a: ff 75 f8 pushl 0xfffffff8(%ebp) + 1580d: e8 ff f7 ff ff call 15011 <_hub_port_disable> + 15812: 83 c4 10 add $0x10,%esp + 15815: 83 ec 0c sub $0xc,%esp + 15818: ff 75 f4 pushl 0xfffffff4(%ebp) + 1581b: e8 20 42 00 00 call 19a40 <_ExFreePool@4> + 15820: 83 c4 0c add $0xc,%esp + 15823: c7 45 dc ed ff ff ff movl $0xffffffed,0xffffffdc(%ebp) + 1582a: e9 7b 02 00 00 jmp 15aaa <_usb_physical_reset_device+0x355> + 1582f: 83 ec 0c sub $0xc,%esp + 15832: ff 75 08 pushl 0x8(%ebp) + 15835: e8 53 11 00 00 call 1698d <_usb_set_address> + 1583a: 83 c4 10 add $0x10,%esp + 1583d: 89 45 ec mov %eax,0xffffffec(%ebp) + 15840: 83 7d ec 00 cmpl $0x0,0xffffffec(%ebp) + 15844: 79 2a jns 15870 <_usb_physical_reset_device+0x11b> + 15846: 83 ec 08 sub $0x8,%esp + 15849: ff 75 e8 pushl 0xffffffe8(%ebp) + 1584c: ff 75 f8 pushl 0xfffffff8(%ebp) + 1584f: e8 bd f7 ff ff call 15011 <_hub_port_disable> + 15854: 83 c4 10 add $0x10,%esp + 15857: 83 ec 0c sub $0xc,%esp + 1585a: ff 75 f4 pushl 0xfffffff4(%ebp) + 1585d: e8 de 41 00 00 call 19a40 <_ExFreePool@4> + 15862: 83 c4 0c add $0xc,%esp + 15865: 8b 45 ec mov 0xffffffec(%ebp),%eax + 15868: 89 45 dc mov %eax,0xffffffdc(%ebp) + 1586b: e9 3a 02 00 00 jmp 15aaa <_usb_physical_reset_device+0x355> + 15870: 83 ec 0c sub $0xc,%esp + 15873: 6a 0a push $0xa + 15875: e8 36 3c 00 00 call 194b0 <_wait_ms> + 1587a: 83 c4 10 add $0x10,%esp + 1587d: 83 ec 0c sub $0xc,%esp + 15880: 6a 12 push $0x12 + 15882: ff 75 f4 pushl 0xfffffff4(%ebp) + 15885: 6a 00 push $0x0 + 15887: 6a 01 push $0x1 + 15889: ff 75 08 pushl 0x8(%ebp) + 1588c: e8 cb ba ff ff call 1135c <_usb_get_descriptor> + 15891: 83 c4 20 add $0x20,%esp + 15894: 89 45 ec mov %eax,0xffffffec(%ebp) + 15897: 83 7d ec 00 cmpl $0x0,0xffffffec(%ebp) + 1589b: 79 19 jns 158b6 <_usb_physical_reset_device+0x161> + 1589d: 83 ec 0c sub $0xc,%esp + 158a0: ff 75 f4 pushl 0xfffffff4(%ebp) + 158a3: e8 98 41 00 00 call 19a40 <_ExFreePool@4> + 158a8: 83 c4 0c add $0xc,%esp + 158ab: 8b 45 ec mov 0xffffffec(%ebp),%eax + 158ae: 89 45 dc mov %eax,0xffffffdc(%ebp) + 158b1: e9 f4 01 00 00 jmp 15aaa <_usb_physical_reset_device+0x355> + 158b6: 83 ec 04 sub $0x4,%esp + 158b9: 6a 12 push $0x12 + 158bb: ff 75 f4 pushl 0xfffffff4(%ebp) + 158be: 8b 45 08 mov 0x8(%ebp),%eax + 158c1: 05 70 01 00 00 add $0x170,%eax + 158c6: 50 push %eax + 158c7: e8 e4 41 00 00 call 19ab0 <_RtlCompareMemory@12> + 158cc: 83 c4 04 add $0x4,%esp + 158cf: 85 c0 test %eax,%eax + 158d1: 0f 84 e8 00 00 00 je 159bf <_usb_physical_reset_device+0x26a> + 158d7: 83 ec 0c sub $0xc,%esp + 158da: ff 75 f4 pushl 0xfffffff4(%ebp) + 158dd: e8 5e 41 00 00 call 19a40 <_ExFreePool@4> + 158e2: 83 c4 0c add $0xc,%esp + 158e5: 83 ec 0c sub $0xc,%esp + 158e8: ff 75 08 pushl 0x8(%ebp) + 158eb: e8 05 23 00 00 call 17bf5 <_usb_destroy_configuration> + 158f0: 83 c4 10 add $0x10,%esp + 158f3: 83 ec 0c sub $0xc,%esp + 158f6: ff 75 08 pushl 0x8(%ebp) + 158f9: e8 83 bb ff ff call 11481 <_usb_get_device_descriptor> + 158fe: 83 c4 10 add $0x10,%esp + 15901: 89 45 ec mov %eax,0xffffffec(%ebp) + 15904: 83 7d ec 11 cmpl $0x11,0xffffffec(%ebp) + 15908: 77 32 ja 1593c <_usb_physical_reset_device+0x1e7> + 1590a: 83 ec 08 sub $0x8,%esp + 1590d: 8b 45 08 mov 0x8(%ebp),%eax + 15910: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 15916: 83 c0 10 add $0x10,%eax + 15919: 50 push %eax + 1591a: 8b 45 08 mov 0x8(%ebp),%eax + 1591d: ff 30 pushl (%eax) + 1591f: e8 8e 01 00 00 call 15ab2 <_clear_bit> + 15924: 83 c4 10 add $0x10,%esp + 15927: 8b 45 08 mov 0x8(%ebp),%eax + 1592a: c7 00 ff ff ff ff movl $0xffffffff,(%eax) + 15930: c7 45 dc fb ff ff ff movl $0xfffffffb,0xffffffdc(%ebp) + 15937: e9 6e 01 00 00 jmp 15aaa <_usb_physical_reset_device+0x355> + 1593c: 83 ec 0c sub $0xc,%esp + 1593f: ff 75 08 pushl 0x8(%ebp) + 15942: e8 d1 24 00 00 call 17e18 <_usb_get_configuration> + 15947: 83 c4 10 add $0x10,%esp + 1594a: 89 45 ec mov %eax,0xffffffec(%ebp) + 1594d: 83 7d ec 00 cmpl $0x0,0xffffffec(%ebp) + 15951: 79 40 jns 15993 <_usb_physical_reset_device+0x23e> + 15953: 83 ec 0c sub $0xc,%esp + 15956: ff 75 08 pushl 0x8(%ebp) + 15959: e8 97 22 00 00 call 17bf5 <_usb_destroy_configuration> + 1595e: 83 c4 10 add $0x10,%esp + 15961: 83 ec 08 sub $0x8,%esp + 15964: 8b 45 08 mov 0x8(%ebp),%eax + 15967: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 1596d: 83 c0 10 add $0x10,%eax + 15970: 50 push %eax + 15971: 8b 45 08 mov 0x8(%ebp),%eax + 15974: ff 30 pushl (%eax) + 15976: e8 37 01 00 00 call 15ab2 <_clear_bit> + 1597b: 83 c4 10 add $0x10,%esp + 1597e: 8b 45 08 mov 0x8(%ebp),%eax + 15981: c7 00 ff ff ff ff movl $0xffffffff,(%eax) + 15987: c7 45 dc 01 00 00 00 movl $0x1,0xffffffdc(%ebp) + 1598e: e9 17 01 00 00 jmp 15aaa <_usb_physical_reset_device+0x355> + 15993: 8b 45 08 mov 0x8(%ebp),%eax + 15996: 8b 55 08 mov 0x8(%ebp),%edx + 15999: 8b 92 84 01 00 00 mov 0x184(%edx),%edx + 1599f: 89 90 88 01 00 00 mov %edx,0x188(%eax) + 159a5: 83 ec 0c sub $0xc,%esp + 159a8: ff 75 08 pushl 0x8(%ebp) + 159ab: e8 49 bb ff ff call 114f9 <_usb_set_maxpacket> + 159b0: 83 c4 10 add $0x10,%esp + 159b3: c7 45 dc 01 00 00 00 movl $0x1,0xffffffdc(%ebp) + 159ba: e9 eb 00 00 00 jmp 15aaa <_usb_physical_reset_device+0x355> + 159bf: 83 ec 0c sub $0xc,%esp + 159c2: ff 75 f4 pushl 0xfffffff4(%ebp) + 159c5: e8 76 40 00 00 call 19a40 <_ExFreePool@4> + 159ca: 83 c4 0c add $0xc,%esp + 159cd: 83 ec 08 sub $0x8,%esp + 159d0: 8b 45 08 mov 0x8(%ebp),%eax + 159d3: 8b 80 88 01 00 00 mov 0x188(%eax),%eax + 159d9: 8a 40 05 mov 0x5(%eax),%al + 159dc: 25 ff 00 00 00 and $0xff,%eax + 159e1: 50 push %eax + 159e2: ff 75 08 pushl 0x8(%ebp) + 159e5: e8 5d c0 ff ff call 11a47 <_usb_set_configuration> + 159ea: 83 c4 10 add $0x10,%esp + 159ed: 89 45 ec mov %eax,0xffffffec(%ebp) + 159f0: 83 7d ec 00 cmpl $0x0,0xffffffec(%ebp) + 159f4: 79 0b jns 15a01 <_usb_physical_reset_device+0x2ac> + 159f6: 8b 45 ec mov 0xffffffec(%ebp),%eax + 159f9: 89 45 dc mov %eax,0xffffffdc(%ebp) + 159fc: e9 a9 00 00 00 jmp 15aaa <_usb_physical_reset_device+0x355> + 15a01: c7 45 f0 00 00 00 00 movl $0x0,0xfffffff0(%ebp) + 15a08: 8b 45 08 mov 0x8(%ebp),%eax + 15a0b: 8b 80 88 01 00 00 mov 0x188(%eax),%eax + 15a11: 8a 40 04 mov 0x4(%eax),%al + 15a14: 25 ff 00 00 00 and $0xff,%eax + 15a19: 3b 45 f0 cmp 0xfffffff0(%ebp),%eax + 15a1c: 0f 8e 81 00 00 00 jle 15aa3 <_usb_physical_reset_device+0x34e> + 15a22: 8b 45 08 mov 0x8(%ebp),%eax + 15a25: 8b 98 88 01 00 00 mov 0x188(%eax),%ebx + 15a2b: 8b 4d f0 mov 0xfffffff0(%ebp),%ecx + 15a2e: 89 c8 mov %ecx,%eax + 15a30: c1 e0 02 shl $0x2,%eax + 15a33: 01 c8 add %ecx,%eax + 15a35: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx + 15a3c: 01 d0 add %edx,%eax + 15a3e: 01 c0 add %eax,%eax + 15a40: 01 c8 add %ecx,%eax + 15a42: c1 e0 02 shl $0x2,%eax + 15a45: 03 43 0c add 0xc(%ebx),%eax + 15a48: 89 45 e4 mov %eax,0xffffffe4(%ebp) + 15a4b: 8b 4d e4 mov 0xffffffe4(%ebp),%ecx + 15a4e: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 15a51: 8b 50 04 mov 0x4(%eax),%edx + 15a54: 89 d0 mov %edx,%eax + 15a56: 01 c0 add %eax,%eax + 15a58: 01 d0 add %edx,%eax + 15a5a: c1 e0 03 shl $0x3,%eax + 15a5d: 03 01 add (%ecx),%eax + 15a5f: 89 45 e0 mov %eax,0xffffffe0(%ebp) + 15a62: 83 ec 04 sub $0x4,%esp + 15a65: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 15a68: 8a 40 03 mov 0x3(%eax),%al + 15a6b: 25 ff 00 00 00 and $0xff,%eax + 15a70: 50 push %eax + 15a71: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 15a74: 8a 40 02 mov 0x2(%eax),%al + 15a77: 25 ff 00 00 00 and $0xff,%eax + 15a7c: 50 push %eax + 15a7d: ff 75 08 pushl 0x8(%ebp) + 15a80: e8 f1 bc ff ff call 11776 <_usb_set_interface> + 15a85: 83 c4 10 add $0x10,%esp + 15a88: 89 45 ec mov %eax,0xffffffec(%ebp) + 15a8b: 83 7d ec 00 cmpl $0x0,0xffffffec(%ebp) + 15a8f: 79 08 jns 15a99 <_usb_physical_reset_device+0x344> + 15a91: 8b 45 ec mov 0xffffffec(%ebp),%eax + 15a94: 89 45 dc mov %eax,0xffffffdc(%ebp) + 15a97: eb 11 jmp 15aaa <_usb_physical_reset_device+0x355> + 15a99: 8d 45 f0 lea 0xfffffff0(%ebp),%eax + 15a9c: ff 00 incl (%eax) + 15a9e: e9 65 ff ff ff jmp 15a08 <_usb_physical_reset_device+0x2b3> + 15aa3: c7 45 dc 00 00 00 00 movl $0x0,0xffffffdc(%ebp) + 15aaa: 8b 45 dc mov 0xffffffdc(%ebp),%eax + 15aad: 8b 5d fc mov 0xfffffffc(%ebp),%ebx + 15ab0: c9 leave + 15ab1: c3 ret + +00015ab2 <_clear_bit>: + 15ab2: 55 push %ebp + 15ab3: 89 e5 mov %esp,%ebp + 15ab5: 8b 55 0c mov 0xc(%ebp),%edx + 15ab8: 8b 45 08 mov 0x8(%ebp),%eax + 15abb: 0f b3 02 btr %eax,(%edx) + 15abe: 5d pop %ebp + 15abf: c3 ret + +00015ac0 <_usb_reset_device>: + 15ac0: 55 push %ebp + 15ac1: 89 e5 mov %esp,%ebp + 15ac3: 83 ec 08 sub $0x8,%esp + 15ac6: 83 ec 0c sub $0xc,%esp + 15ac9: ff 75 08 pushl 0x8(%ebp) + 15acc: e8 84 fc ff ff call 15755 <_usb_physical_reset_device> + 15ad1: 83 c4 10 add $0x10,%esp + 15ad4: 89 45 fc mov %eax,0xfffffffc(%ebp) + 15ad7: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 15ada: c9 leave + 15adb: c3 ret + 15adc: 90 nop + 15add: 90 nop + 15ade: 90 nop + 15adf: 90 nop + +00015ae0 <_generic_probe>: + 15ae0: 55 push %ebp + 15ae1: 89 e5 mov %esp,%ebp + 15ae3: b8 00 00 00 00 mov $0x0,%eax + 15ae8: 5d pop %ebp + 15ae9: c3 ret + +00015aea <_generic_remove>: + 15aea: 55 push %ebp + 15aeb: 89 e5 mov %esp,%ebp + 15aed: b8 00 00 00 00 mov $0x0,%eax + 15af2: 5d pop %ebp + 15af3: c3 ret + +00015af4 <_usb_device_probe>: + 15af4: 55 push %ebp + 15af5: 89 e5 mov %esp,%ebp + 15af7: 83 ec 18 sub $0x18,%esp + 15afa: 8b 45 08 mov 0x8(%ebp),%eax + 15afd: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 15b00: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 15b03: 83 e8 18 sub $0x18,%eax + 15b06: 89 45 fc mov %eax,0xfffffffc(%ebp) + 15b09: 8b 45 08 mov 0x8(%ebp),%eax + 15b0c: 8b 80 98 00 00 00 mov 0x98(%eax),%eax + 15b12: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 15b15: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 15b18: 83 e8 18 sub $0x18,%eax + 15b1b: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 15b1e: c7 45 f0 ed ff ff ff movl $0xffffffed,0xfffffff0(%ebp) + 15b25: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 15b28: 83 78 08 00 cmpl $0x0,0x8(%eax) + 15b2c: 75 08 jne 15b36 <_usb_device_probe+0x42> + 15b2e: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 15b31: 89 45 ec mov %eax,0xffffffec(%ebp) + 15b34: eb 49 jmp 15b7f <_usb_device_probe+0x8b> + 15b36: 83 ec 08 sub $0x8,%esp + 15b39: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 15b3c: ff 70 14 pushl 0x14(%eax) + 15b3f: ff 75 fc pushl 0xfffffffc(%ebp) + 15b42: e8 0d 04 00 00 call 15f54 <_usb_match_id> + 15b47: 83 c4 10 add $0x10,%esp + 15b4a: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 15b4d: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) + 15b51: 74 17 je 15b6a <_usb_device_probe+0x76> + 15b53: 83 ec 08 sub $0x8,%esp + 15b56: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 15b59: ff 75 f4 pushl 0xfffffff4(%ebp) + 15b5c: ff 75 fc pushl 0xfffffffc(%ebp) + 15b5f: 8b 40 08 mov 0x8(%eax),%eax + 15b62: ff d0 call *%eax + 15b64: 83 c4 10 add $0x10,%esp + 15b67: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 15b6a: 83 7d f0 00 cmpl $0x0,0xfffffff0(%ebp) + 15b6e: 75 09 jne 15b79 <_usb_device_probe+0x85> + 15b70: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 15b73: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 15b76: 89 42 10 mov %eax,0x10(%edx) + 15b79: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 15b7c: 89 45 ec mov %eax,0xffffffec(%ebp) + 15b7f: 8b 45 ec mov 0xffffffec(%ebp),%eax + 15b82: c9 leave + 15b83: c3 ret + +00015b84 <_usb_device_remove>: + 15b84: 55 push %ebp + 15b85: 89 e5 mov %esp,%ebp + 15b87: 83 ec 18 sub $0x18,%esp + 15b8a: 8b 45 08 mov 0x8(%ebp),%eax + 15b8d: 83 e8 18 sub $0x18,%eax + 15b90: 89 45 fc mov %eax,0xfffffffc(%ebp) + 15b93: 8b 45 08 mov 0x8(%ebp),%eax + 15b96: 8b 80 98 00 00 00 mov 0x98(%eax),%eax + 15b9c: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 15b9f: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 15ba2: 83 e8 18 sub $0x18,%eax + 15ba5: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 15ba8: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 15bab: 83 78 10 00 cmpl $0x0,0x10(%eax) + 15baf: 74 20 je 15bd1 <_usb_device_remove+0x4d> + 15bb1: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 15bb4: 8b 40 10 mov 0x10(%eax),%eax + 15bb7: 83 78 0c 00 cmpl $0x0,0xc(%eax) + 15bbb: 74 14 je 15bd1 <_usb_device_remove+0x4d> + 15bbd: 83 ec 0c sub $0xc,%esp + 15bc0: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 15bc3: 8b 40 10 mov 0x10(%eax),%eax + 15bc6: ff 75 fc pushl 0xfffffffc(%ebp) + 15bc9: 8b 40 0c mov 0xc(%eax),%eax + 15bcc: ff d0 call *%eax + 15bce: 83 c4 10 add $0x10,%esp + 15bd1: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 15bd4: 83 78 10 00 cmpl $0x0,0x10(%eax) + 15bd8: 74 11 je 15beb <_usb_device_remove+0x67> + 15bda: 83 ec 08 sub $0x8,%esp + 15bdd: ff 75 fc pushl 0xfffffffc(%ebp) + 15be0: ff 75 f8 pushl 0xfffffff8(%ebp) + 15be3: e8 3f 03 00 00 call 15f27 <_usb_driver_release_interface> + 15be8: 83 c4 10 add $0x10,%esp + 15beb: b8 00 00 00 00 mov $0x0,%eax + 15bf0: c9 leave + 15bf1: c3 ret + +00015bf2 <_usb_register>: + 15bf2: 55 push %ebp + 15bf3: 89 e5 mov %esp,%ebp + 15bf5: 83 ec 08 sub $0x8,%esp + 15bf8: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) + 15bff: 83 3d 30 c1 01 00 00 cmpl $0x0,0x1c130 + 15c06: 74 09 je 15c11 <_usb_register+0x1f> + 15c08: c7 45 f8 ed ff ff ff movl $0xffffffed,0xfffffff8(%ebp) + 15c0f: eb 50 jmp 15c61 <_usb_register+0x6f> + 15c11: 8b 55 08 mov 0x8(%ebp),%edx + 15c14: 8b 45 08 mov 0x8(%ebp),%eax + 15c17: 8b 40 04 mov 0x4(%eax),%eax + 15c1a: 89 42 18 mov %eax,0x18(%edx) + 15c1d: 8b 45 08 mov 0x8(%ebp),%eax + 15c20: c7 40 1c f8 a0 01 00 movl $0x1a0f8,0x1c(%eax) + 15c27: 8b 45 08 mov 0x8(%ebp),%eax + 15c2a: c7 40 20 f4 5a 01 00 movl $0x15af4,0x20(%eax) + 15c31: 8b 45 08 mov 0x8(%ebp),%eax + 15c34: c7 40 24 84 5b 01 00 movl $0x15b84,0x24(%eax) + 15c3b: 83 ec 0c sub $0xc,%esp + 15c3e: 8b 45 08 mov 0x8(%ebp),%eax + 15c41: 83 c0 18 add $0x18,%eax + 15c44: 50 push %eax + 15c45: e8 92 3b 00 00 call 197dc <_my_driver_register> + 15c4a: 83 c4 10 add $0x10,%esp + 15c4d: 89 45 fc mov %eax,0xfffffffc(%ebp) + 15c50: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) + 15c54: 75 05 jne 15c5b <_usb_register+0x69> + 15c56: e8 0b 00 00 00 call 15c66 <_usbfs_update_special> + 15c5b: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 15c5e: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 15c61: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 15c64: c9 leave + 15c65: c3 ret + +00015c66 <_usbfs_update_special>: + 15c66: 55 push %ebp + 15c67: 89 e5 mov %esp,%ebp + 15c69: 5d pop %ebp + 15c6a: c3 ret + +00015c6b <_usb_deregister>: + 15c6b: 55 push %ebp + 15c6c: 89 e5 mov %esp,%ebp + 15c6e: e8 f3 ff ff ff call 15c66 <_usbfs_update_special> + 15c73: 5d pop %ebp + 15c74: c3 ret + +00015c75 <_usb_ifnum_to_if>: + 15c75: 55 push %ebp + 15c76: 89 e5 mov %esp,%ebp + 15c78: 53 push %ebx + 15c79: 83 ec 08 sub $0x8,%esp + 15c7c: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 15c83: 8b 45 08 mov 0x8(%ebp),%eax + 15c86: 8b 80 88 01 00 00 mov 0x188(%eax),%eax + 15c8c: 8a 40 04 mov 0x4(%eax),%al + 15c8f: 25 ff 00 00 00 and $0xff,%eax + 15c94: 3b 45 f8 cmp 0xfffffff8(%ebp),%eax + 15c97: 7e 6f jle 15d08 <_usb_ifnum_to_if+0x93> + 15c99: 8b 45 08 mov 0x8(%ebp),%eax + 15c9c: 8b 98 88 01 00 00 mov 0x188(%eax),%ebx + 15ca2: 8b 4d f8 mov 0xfffffff8(%ebp),%ecx + 15ca5: 89 c8 mov %ecx,%eax + 15ca7: c1 e0 02 shl $0x2,%eax + 15caa: 01 c8 add %ecx,%eax + 15cac: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx + 15cb3: 01 d0 add %edx,%eax + 15cb5: 01 c0 add %eax,%eax + 15cb7: 01 c8 add %ecx,%eax + 15cb9: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx + 15cc0: 8b 43 0c mov 0xc(%ebx),%eax + 15cc3: 8b 04 02 mov (%edx,%eax,1),%eax + 15cc6: 8a 40 02 mov 0x2(%eax),%al + 15cc9: 25 ff 00 00 00 and $0xff,%eax + 15cce: 3b 45 0c cmp 0xc(%ebp),%eax + 15cd1: 75 2b jne 15cfe <_usb_ifnum_to_if+0x89> + 15cd3: 8b 45 08 mov 0x8(%ebp),%eax + 15cd6: 8b 98 88 01 00 00 mov 0x188(%eax),%ebx + 15cdc: 8b 4d f8 mov 0xfffffff8(%ebp),%ecx + 15cdf: 89 c8 mov %ecx,%eax + 15ce1: c1 e0 02 shl $0x2,%eax + 15ce4: 01 c8 add %ecx,%eax + 15ce6: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx + 15ced: 01 d0 add %edx,%eax + 15cef: 01 c0 add %eax,%eax + 15cf1: 01 c8 add %ecx,%eax + 15cf3: c1 e0 02 shl $0x2,%eax + 15cf6: 03 43 0c add 0xc(%ebx),%eax + 15cf9: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 15cfc: eb 11 jmp 15d0f <_usb_ifnum_to_if+0x9a> + 15cfe: 8d 45 f8 lea 0xfffffff8(%ebp),%eax + 15d01: ff 00 incl (%eax) + 15d03: e9 7b ff ff ff jmp 15c83 <_usb_ifnum_to_if+0xe> + 15d08: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) + 15d0f: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 15d12: 83 c4 08 add $0x8,%esp + 15d15: 5b pop %ebx + 15d16: 5d pop %ebp + 15d17: c3 ret + +00015d18 <_usb_epnum_to_ep_desc>: + 15d18: 55 push %ebp + 15d19: 89 e5 mov %esp,%ebp + 15d1b: 56 push %esi + 15d1c: 53 push %ebx + 15d1d: 83 ec 10 sub $0x10,%esp + 15d20: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) + 15d27: 8b 45 08 mov 0x8(%ebp),%eax + 15d2a: 8b 80 88 01 00 00 mov 0x188(%eax),%eax + 15d30: 8a 40 04 mov 0x4(%eax),%al + 15d33: 25 ff 00 00 00 and $0xff,%eax + 15d38: 3b 45 f4 cmp 0xfffffff4(%ebp),%eax + 15d3b: 0f 8e 65 01 00 00 jle 15ea6 <_usb_epnum_to_ep_desc+0x18e> + 15d41: c7 45 f0 00 00 00 00 movl $0x0,0xfffffff0(%ebp) + 15d48: 8b 45 08 mov 0x8(%ebp),%eax + 15d4b: 8b 98 88 01 00 00 mov 0x188(%eax),%ebx + 15d51: 8b 4d f4 mov 0xfffffff4(%ebp),%ecx + 15d54: 89 c8 mov %ecx,%eax + 15d56: c1 e0 02 shl $0x2,%eax + 15d59: 01 c8 add %ecx,%eax + 15d5b: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx + 15d62: 01 d0 add %edx,%eax + 15d64: 01 c0 add %eax,%eax + 15d66: 01 c8 add %ecx,%eax + 15d68: 8d 0c 85 00 00 00 00 lea 0x0(,%eax,4),%ecx + 15d6f: 8b 53 0c mov 0xc(%ebx),%edx + 15d72: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 15d75: 3b 44 11 08 cmp 0x8(%ecx,%edx,1),%eax + 15d79: 0f 83 1d 01 00 00 jae 15e9c <_usb_epnum_to_ep_desc+0x184> + 15d7f: c7 45 ec 00 00 00 00 movl $0x0,0xffffffec(%ebp) + 15d86: 8b 45 08 mov 0x8(%ebp),%eax + 15d89: 8b 98 88 01 00 00 mov 0x188(%eax),%ebx + 15d8f: 8b 4d f4 mov 0xfffffff4(%ebp),%ecx + 15d92: 89 c8 mov %ecx,%eax + 15d94: c1 e0 02 shl $0x2,%eax + 15d97: 01 c8 add %ecx,%eax + 15d99: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx + 15da0: 01 d0 add %edx,%eax + 15da2: 01 c0 add %eax,%eax + 15da4: 01 c8 add %ecx,%eax + 15da6: 8d 0c 85 00 00 00 00 lea 0x0(,%eax,4),%ecx + 15dad: 8b 5b 0c mov 0xc(%ebx),%ebx + 15db0: 8b 55 f0 mov 0xfffffff0(%ebp),%edx + 15db3: 89 d0 mov %edx,%eax + 15db5: 01 c0 add %eax,%eax + 15db7: 01 d0 add %edx,%eax + 15db9: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx + 15dc0: 8b 04 19 mov (%ecx,%ebx,1),%eax + 15dc3: 8a 44 02 04 mov 0x4(%edx,%eax,1),%al + 15dc7: 25 ff 00 00 00 and $0xff,%eax + 15dcc: 3b 45 ec cmp 0xffffffec(%ebp),%eax + 15dcf: 0f 8e bd 00 00 00 jle 15e92 <_usb_epnum_to_ep_desc+0x17a> + 15dd5: 8b 45 08 mov 0x8(%ebp),%eax + 15dd8: 8b 98 88 01 00 00 mov 0x188(%eax),%ebx + 15dde: 8b 4d f4 mov 0xfffffff4(%ebp),%ecx + 15de1: 89 c8 mov %ecx,%eax + 15de3: c1 e0 02 shl $0x2,%eax + 15de6: 01 c8 add %ecx,%eax + 15de8: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx + 15def: 01 d0 add %edx,%eax + 15df1: 01 c0 add %eax,%eax + 15df3: 01 c8 add %ecx,%eax + 15df5: 8d 0c 85 00 00 00 00 lea 0x0(,%eax,4),%ecx + 15dfc: 8b 5b 0c mov 0xc(%ebx),%ebx + 15dff: 8b 55 f0 mov 0xfffffff0(%ebp),%edx + 15e02: 89 d0 mov %edx,%eax + 15e04: 01 c0 add %eax,%eax + 15e06: 01 d0 add %edx,%eax + 15e08: 8d 34 c5 00 00 00 00 lea 0x0(,%eax,8),%esi + 15e0f: 8b 0c 19 mov (%ecx,%ebx,1),%ecx + 15e12: 8b 55 ec mov 0xffffffec(%ebp),%edx + 15e15: 89 d0 mov %edx,%eax + 15e17: c1 e0 02 shl $0x2,%eax + 15e1a: 01 d0 add %edx,%eax + 15e1c: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx + 15e23: 8b 44 0e 0c mov 0xc(%esi,%ecx,1),%eax + 15e27: 8a 44 02 02 mov 0x2(%edx,%eax,1),%al + 15e2b: 25 ff 00 00 00 and $0xff,%eax + 15e30: 3b 45 0c cmp 0xc(%ebp),%eax + 15e33: 75 53 jne 15e88 <_usb_epnum_to_ep_desc+0x170> + 15e35: 8b 45 08 mov 0x8(%ebp),%eax + 15e38: 8b 98 88 01 00 00 mov 0x188(%eax),%ebx + 15e3e: 8b 4d f4 mov 0xfffffff4(%ebp),%ecx + 15e41: 89 c8 mov %ecx,%eax + 15e43: c1 e0 02 shl $0x2,%eax + 15e46: 01 c8 add %ecx,%eax + 15e48: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx + 15e4f: 01 d0 add %edx,%eax + 15e51: 01 c0 add %eax,%eax + 15e53: 01 c8 add %ecx,%eax + 15e55: 8d 0c 85 00 00 00 00 lea 0x0(,%eax,4),%ecx + 15e5c: 8b 5b 0c mov 0xc(%ebx),%ebx + 15e5f: 8b 55 f0 mov 0xfffffff0(%ebp),%edx + 15e62: 89 d0 mov %edx,%eax + 15e64: 01 c0 add %eax,%eax + 15e66: 01 d0 add %edx,%eax + 15e68: 8d 34 c5 00 00 00 00 lea 0x0(,%eax,8),%esi + 15e6f: 8b 0c 19 mov (%ecx,%ebx,1),%ecx + 15e72: 8b 55 ec mov 0xffffffec(%ebp),%edx + 15e75: 89 d0 mov %edx,%eax + 15e77: c1 e0 02 shl $0x2,%eax + 15e7a: 01 d0 add %edx,%eax + 15e7c: c1 e0 02 shl $0x2,%eax + 15e7f: 03 44 0e 0c add 0xc(%esi,%ecx,1),%eax + 15e83: 89 45 e8 mov %eax,0xffffffe8(%ebp) + 15e86: eb 25 jmp 15ead <_usb_epnum_to_ep_desc+0x195> + 15e88: 8d 45 ec lea 0xffffffec(%ebp),%eax + 15e8b: ff 00 incl (%eax) + 15e8d: e9 f4 fe ff ff jmp 15d86 <_usb_epnum_to_ep_desc+0x6e> + 15e92: 8d 45 f0 lea 0xfffffff0(%ebp),%eax + 15e95: ff 00 incl (%eax) + 15e97: e9 ac fe ff ff jmp 15d48 <_usb_epnum_to_ep_desc+0x30> + 15e9c: 8d 45 f4 lea 0xfffffff4(%ebp),%eax + 15e9f: ff 00 incl (%eax) + 15ea1: e9 81 fe ff ff jmp 15d27 <_usb_epnum_to_ep_desc+0xf> + 15ea6: c7 45 e8 00 00 00 00 movl $0x0,0xffffffe8(%ebp) + 15ead: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 15eb0: 83 c4 10 add $0x10,%esp + 15eb3: 5b pop %ebx + 15eb4: 5e pop %esi + 15eb5: 5d pop %ebp + 15eb6: c3 ret + +00015eb7 <_usb_driver_claim_interface>: + 15eb7: 55 push %ebp + 15eb8: 89 e5 mov %esp,%ebp + 15eba: 83 ec 08 sub $0x8,%esp + 15ebd: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) + 15ec1: 74 22 je 15ee5 <_usb_driver_claim_interface+0x2e> + 15ec3: 83 7d 08 00 cmpl $0x0,0x8(%ebp) + 15ec7: 75 02 jne 15ecb <_usb_driver_claim_interface+0x14> + 15ec9: eb 1a jmp 15ee5 <_usb_driver_claim_interface+0x2e> + 15ecb: 8b 55 0c mov 0xc(%ebp),%edx + 15ece: 8b 45 08 mov 0x8(%ebp),%eax + 15ed1: 89 42 10 mov %eax,0x10(%edx) + 15ed4: 83 ec 08 sub $0x8,%esp + 15ed7: ff 75 10 pushl 0x10(%ebp) + 15eda: ff 75 0c pushl 0xc(%ebp) + 15edd: e8 05 00 00 00 call 15ee7 <_usb_set_intfdata> + 15ee2: 83 c4 10 add $0x10,%esp + 15ee5: c9 leave + 15ee6: c3 ret + +00015ee7 <_usb_set_intfdata>: + 15ee7: 55 push %ebp + 15ee8: 89 e5 mov %esp,%ebp + 15eea: 8b 55 08 mov 0x8(%ebp),%edx + 15eed: 83 c2 18 add $0x18,%edx + 15ef0: 8b 45 0c mov 0xc(%ebp),%eax + 15ef3: 89 82 9c 00 00 00 mov %eax,0x9c(%edx) + 15ef9: 5d pop %ebp + 15efa: c3 ret + +00015efb <_usb_interface_claimed>: + 15efb: 55 push %ebp + 15efc: 89 e5 mov %esp,%ebp + 15efe: 83 ec 04 sub $0x4,%esp + 15f01: 83 7d 08 00 cmpl $0x0,0x8(%ebp) + 15f05: 75 09 jne 15f10 <_usb_interface_claimed+0x15> + 15f07: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) + 15f0e: eb 12 jmp 15f22 <_usb_interface_claimed+0x27> + 15f10: 8b 45 08 mov 0x8(%ebp),%eax + 15f13: 83 78 10 00 cmpl $0x0,0x10(%eax) + 15f17: 0f 95 c0 setne %al + 15f1a: 25 ff 00 00 00 and $0xff,%eax + 15f1f: 89 45 fc mov %eax,0xfffffffc(%ebp) + 15f22: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 15f25: c9 leave + 15f26: c3 ret + +00015f27 <_usb_driver_release_interface>: + 15f27: 55 push %ebp + 15f28: 89 e5 mov %esp,%ebp + 15f2a: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) + 15f2e: 74 22 je 15f52 <_usb_driver_release_interface+0x2b> + 15f30: 8b 45 0c mov 0xc(%ebp),%eax + 15f33: 8b 40 10 mov 0x10(%eax),%eax + 15f36: 3b 45 08 cmp 0x8(%ebp),%eax + 15f39: 75 17 jne 15f52 <_usb_driver_release_interface+0x2b> + 15f3b: 8b 45 0c mov 0xc(%ebp),%eax + 15f3e: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) + 15f45: 6a 00 push $0x0 + 15f47: ff 75 0c pushl 0xc(%ebp) + 15f4a: e8 98 ff ff ff call 15ee7 <_usb_set_intfdata> + 15f4f: 83 c4 08 add $0x8,%esp + 15f52: c9 leave + 15f53: c3 ret + +00015f54 <_usb_match_id>: + 15f54: 55 push %ebp + 15f55: 89 e5 mov %esp,%ebp + 15f57: 83 ec 10 sub $0x10,%esp + 15f5a: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) + 15f5e: 75 0c jne 15f6c <_usb_match_id+0x18> + 15f60: c7 45 f0 00 00 00 00 movl $0x0,0xfffffff0(%ebp) + 15f67: e9 0f 02 00 00 jmp 1617b <_usb_match_id+0x227> + 15f6c: 8b 4d 08 mov 0x8(%ebp),%ecx + 15f6f: 8b 45 08 mov 0x8(%ebp),%eax + 15f72: 8b 50 04 mov 0x4(%eax),%edx + 15f75: 89 d0 mov %edx,%eax + 15f77: 01 c0 add %eax,%eax + 15f79: 01 d0 add %edx,%eax + 15f7b: c1 e0 03 shl $0x3,%eax + 15f7e: 03 01 add (%ecx),%eax + 15f80: 89 45 fc mov %eax,0xfffffffc(%ebp) + 15f83: 8b 45 08 mov 0x8(%ebp),%eax + 15f86: 8b 80 b8 00 00 00 mov 0xb8(%eax),%eax + 15f8c: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 15f8f: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 15f92: 2d c0 00 00 00 sub $0xc0,%eax + 15f97: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 15f9a: 8b 45 0c mov 0xc(%ebp),%eax + 15f9d: 66 83 78 02 00 cmpw $0x0,0x2(%eax) + 15fa2: 75 20 jne 15fc4 <_usb_match_id+0x70> + 15fa4: 8b 45 0c mov 0xc(%ebp),%eax + 15fa7: 80 78 0a 00 cmpb $0x0,0xa(%eax) + 15fab: 75 17 jne 15fc4 <_usb_match_id+0x70> + 15fad: 8b 45 0c mov 0xc(%ebp),%eax + 15fb0: 80 78 0d 00 cmpb $0x0,0xd(%eax) + 15fb4: 75 0e jne 15fc4 <_usb_match_id+0x70> + 15fb6: 8b 45 0c mov 0xc(%ebp),%eax + 15fb9: 83 78 10 00 cmpl $0x0,0x10(%eax) + 15fbd: 75 05 jne 15fc4 <_usb_match_id+0x70> + 15fbf: e9 b0 01 00 00 jmp 16174 <_usb_match_id+0x220> + 15fc4: 8b 45 0c mov 0xc(%ebp),%eax + 15fc7: 66 8b 00 mov (%eax),%ax + 15fca: 25 ff ff 00 00 and $0xffff,%eax + 15fcf: 83 e0 01 and $0x1,%eax + 15fd2: 85 c0 test %eax,%eax + 15fd4: 74 18 je 15fee <_usb_match_id+0x9a> + 15fd6: 8b 45 0c mov 0xc(%ebp),%eax + 15fd9: 8b 55 f8 mov 0xfffffff8(%ebp),%edx + 15fdc: 66 8b 40 02 mov 0x2(%eax),%ax + 15fe0: 66 3b 82 78 01 00 00 cmp 0x178(%edx),%ax + 15fe7: 74 05 je 15fee <_usb_match_id+0x9a> + 15fe9: e9 7b 01 00 00 jmp 16169 <_usb_match_id+0x215> + 15fee: 8b 45 0c mov 0xc(%ebp),%eax + 15ff1: 66 8b 00 mov (%eax),%ax + 15ff4: 25 ff ff 00 00 and $0xffff,%eax + 15ff9: d1 e8 shr %eax + 15ffb: 83 e0 01 and $0x1,%eax + 15ffe: 85 c0 test %eax,%eax + 16000: 74 18 je 1601a <_usb_match_id+0xc6> + 16002: 8b 45 0c mov 0xc(%ebp),%eax + 16005: 8b 55 f8 mov 0xfffffff8(%ebp),%edx + 16008: 66 8b 40 04 mov 0x4(%eax),%ax + 1600c: 66 3b 82 7a 01 00 00 cmp 0x17a(%edx),%ax + 16013: 74 05 je 1601a <_usb_match_id+0xc6> + 16015: e9 4f 01 00 00 jmp 16169 <_usb_match_id+0x215> + 1601a: 8b 45 0c mov 0xc(%ebp),%eax + 1601d: 66 8b 00 mov (%eax),%ax + 16020: 25 ff ff 00 00 and $0xffff,%eax + 16025: c1 e8 02 shr $0x2,%eax + 16028: 83 e0 01 and $0x1,%eax + 1602b: 85 c0 test %eax,%eax + 1602d: 74 18 je 16047 <_usb_match_id+0xf3> + 1602f: 8b 45 0c mov 0xc(%ebp),%eax + 16032: 8b 55 f8 mov 0xfffffff8(%ebp),%edx + 16035: 66 8b 40 06 mov 0x6(%eax),%ax + 16039: 66 3b 82 7c 01 00 00 cmp 0x17c(%edx),%ax + 16040: 76 05 jbe 16047 <_usb_match_id+0xf3> + 16042: e9 22 01 00 00 jmp 16169 <_usb_match_id+0x215> + 16047: 8b 45 0c mov 0xc(%ebp),%eax + 1604a: 66 8b 00 mov (%eax),%ax + 1604d: 25 ff ff 00 00 and $0xffff,%eax + 16052: c1 e8 03 shr $0x3,%eax + 16055: 83 e0 01 and $0x1,%eax + 16058: 85 c0 test %eax,%eax + 1605a: 74 18 je 16074 <_usb_match_id+0x120> + 1605c: 8b 45 0c mov 0xc(%ebp),%eax + 1605f: 8b 55 f8 mov 0xfffffff8(%ebp),%edx + 16062: 66 8b 40 08 mov 0x8(%eax),%ax + 16066: 66 3b 82 7c 01 00 00 cmp 0x17c(%edx),%ax + 1606d: 73 05 jae 16074 <_usb_match_id+0x120> + 1606f: e9 f5 00 00 00 jmp 16169 <_usb_match_id+0x215> + 16074: 8b 45 0c mov 0xc(%ebp),%eax + 16077: 66 8b 00 mov (%eax),%ax + 1607a: 25 ff ff 00 00 and $0xffff,%eax + 1607f: c1 e8 04 shr $0x4,%eax + 16082: 83 e0 01 and $0x1,%eax + 16085: 85 c0 test %eax,%eax + 16087: 74 16 je 1609f <_usb_match_id+0x14b> + 16089: 8b 45 0c mov 0xc(%ebp),%eax + 1608c: 8b 55 f8 mov 0xfffffff8(%ebp),%edx + 1608f: 8a 40 0a mov 0xa(%eax),%al + 16092: 3a 82 74 01 00 00 cmp 0x174(%edx),%al + 16098: 74 05 je 1609f <_usb_match_id+0x14b> + 1609a: e9 ca 00 00 00 jmp 16169 <_usb_match_id+0x215> + 1609f: 8b 45 0c mov 0xc(%ebp),%eax + 160a2: 66 8b 00 mov (%eax),%ax + 160a5: 25 ff ff 00 00 and $0xffff,%eax + 160aa: c1 e8 05 shr $0x5,%eax + 160ad: 83 e0 01 and $0x1,%eax + 160b0: 85 c0 test %eax,%eax + 160b2: 74 16 je 160ca <_usb_match_id+0x176> + 160b4: 8b 45 0c mov 0xc(%ebp),%eax + 160b7: 8b 55 f8 mov 0xfffffff8(%ebp),%edx + 160ba: 8a 40 0b mov 0xb(%eax),%al + 160bd: 3a 82 75 01 00 00 cmp 0x175(%edx),%al + 160c3: 74 05 je 160ca <_usb_match_id+0x176> + 160c5: e9 9f 00 00 00 jmp 16169 <_usb_match_id+0x215> + 160ca: 8b 45 0c mov 0xc(%ebp),%eax + 160cd: 66 8b 00 mov (%eax),%ax + 160d0: 25 ff ff 00 00 and $0xffff,%eax + 160d5: c1 e8 06 shr $0x6,%eax + 160d8: 83 e0 01 and $0x1,%eax + 160db: 85 c0 test %eax,%eax + 160dd: 74 13 je 160f2 <_usb_match_id+0x19e> + 160df: 8b 45 0c mov 0xc(%ebp),%eax + 160e2: 8b 55 f8 mov 0xfffffff8(%ebp),%edx + 160e5: 8a 40 0c mov 0xc(%eax),%al + 160e8: 3a 82 76 01 00 00 cmp 0x176(%edx),%al + 160ee: 74 02 je 160f2 <_usb_match_id+0x19e> + 160f0: eb 77 jmp 16169 <_usb_match_id+0x215> + 160f2: 8b 45 0c mov 0xc(%ebp),%eax + 160f5: 66 8b 00 mov (%eax),%ax + 160f8: 25 ff ff 00 00 and $0xffff,%eax + 160fd: c1 e8 07 shr $0x7,%eax + 16100: 83 e0 01 and $0x1,%eax + 16103: 85 c0 test %eax,%eax + 16105: 74 10 je 16117 <_usb_match_id+0x1c3> + 16107: 8b 45 0c mov 0xc(%ebp),%eax + 1610a: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 1610d: 8a 40 0d mov 0xd(%eax),%al + 16110: 3a 42 05 cmp 0x5(%edx),%al + 16113: 74 02 je 16117 <_usb_match_id+0x1c3> + 16115: eb 52 jmp 16169 <_usb_match_id+0x215> + 16117: 8b 45 0c mov 0xc(%ebp),%eax + 1611a: 66 8b 00 mov (%eax),%ax + 1611d: 25 ff ff 00 00 and $0xffff,%eax + 16122: c1 e8 08 shr $0x8,%eax + 16125: 83 e0 01 and $0x1,%eax + 16128: 85 c0 test %eax,%eax + 1612a: 74 10 je 1613c <_usb_match_id+0x1e8> + 1612c: 8b 45 0c mov 0xc(%ebp),%eax + 1612f: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 16132: 8a 40 0e mov 0xe(%eax),%al + 16135: 3a 42 06 cmp 0x6(%edx),%al + 16138: 74 02 je 1613c <_usb_match_id+0x1e8> + 1613a: eb 2d jmp 16169 <_usb_match_id+0x215> + 1613c: 8b 45 0c mov 0xc(%ebp),%eax + 1613f: 66 8b 00 mov (%eax),%ax + 16142: 25 ff ff 00 00 and $0xffff,%eax + 16147: c1 e8 09 shr $0x9,%eax + 1614a: 83 e0 01 and $0x1,%eax + 1614d: 85 c0 test %eax,%eax + 1614f: 74 10 je 16161 <_usb_match_id+0x20d> + 16151: 8b 45 0c mov 0xc(%ebp),%eax + 16154: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 16157: 8a 40 0f mov 0xf(%eax),%al + 1615a: 3a 42 07 cmp 0x7(%edx),%al + 1615d: 74 02 je 16161 <_usb_match_id+0x20d> + 1615f: eb 08 jmp 16169 <_usb_match_id+0x215> + 16161: 8b 45 0c mov 0xc(%ebp),%eax + 16164: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 16167: eb 12 jmp 1617b <_usb_match_id+0x227> + 16169: 8d 45 0c lea 0xc(%ebp),%eax + 1616c: 83 00 14 addl $0x14,(%eax) + 1616f: e9 26 fe ff ff jmp 15f9a <_usb_match_id+0x46> + 16174: c7 45 f0 00 00 00 00 movl $0x0,0xfffffff0(%ebp) + 1617b: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 1617e: c9 leave + 1617f: c3 ret + +00016180 <_usb_find_interface>: + 16180: 55 push %ebp + 16181: 89 e5 mov %esp,%ebp + 16183: 83 ec 14 sub $0x14,%esp + 16186: 8b 45 08 mov 0x8(%ebp),%eax + 16189: 83 c0 28 add $0x28,%eax + 1618c: 8b 00 mov (%eax),%eax + 1618e: 89 45 fc mov %eax,0xfffffffc(%ebp) + 16191: 8b 45 08 mov 0x8(%ebp),%eax + 16194: 83 c0 28 add $0x28,%eax + 16197: 3b 45 fc cmp 0xfffffffc(%ebp),%eax + 1619a: 74 59 je 161f5 <_usb_find_interface+0x75> + 1619c: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 1619f: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 161a2: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 161a5: 2d a4 00 00 00 sub $0xa4,%eax + 161aa: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 161ad: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 161b0: 81 b8 98 00 00 00 e0 cmpl $0x1a0e0,0x98(%eax) + 161b7: a0 01 00 + 161ba: 75 02 jne 161be <_usb_find_interface+0x3e> + 161bc: eb 2d jmp 161eb <_usb_find_interface+0x6b> + 161be: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 161c1: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 161c4: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 161c7: 83 e8 18 sub $0x18,%eax + 161ca: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 161cd: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 161d0: 83 78 14 ff cmpl $0xffffffff,0x14(%eax) + 161d4: 75 02 jne 161d8 <_usb_find_interface+0x58> + 161d6: eb 13 jmp 161eb <_usb_find_interface+0x6b> + 161d8: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 161db: 8b 40 14 mov 0x14(%eax),%eax + 161de: 3b 45 0c cmp 0xc(%ebp),%eax + 161e1: 75 08 jne 161eb <_usb_find_interface+0x6b> + 161e3: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 161e6: 89 45 ec mov %eax,0xffffffec(%ebp) + 161e9: eb 11 jmp 161fc <_usb_find_interface+0x7c> + 161eb: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 161ee: 8b 00 mov (%eax),%eax + 161f0: 89 45 fc mov %eax,0xfffffffc(%ebp) + 161f3: eb 9c jmp 16191 <_usb_find_interface+0x11> + 161f5: c7 45 ec 00 00 00 00 movl $0x0,0xffffffec(%ebp) + 161fc: 8b 45 ec mov 0xffffffec(%ebp),%eax + 161ff: c9 leave + 16200: c3 ret + +00016201 <_usb_device_match>: + 16201: 55 push %ebp + 16202: 89 e5 mov %esp,%ebp + 16204: 83 ec 14 sub $0x14,%esp + 16207: 81 7d 0c e0 a0 01 00 cmpl $0x1a0e0,0xc(%ebp) + 1620e: 75 09 jne 16219 <_usb_device_match+0x18> + 16210: c7 45 ec 00 00 00 00 movl $0x0,0xffffffec(%ebp) + 16217: eb 51 jmp 1626a <_usb_device_match+0x69> + 16219: 8b 45 08 mov 0x8(%ebp),%eax + 1621c: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 1621f: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 16222: 83 e8 18 sub $0x18,%eax + 16225: 89 45 fc mov %eax,0xfffffffc(%ebp) + 16228: 8b 45 0c mov 0xc(%ebp),%eax + 1622b: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 1622e: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 16231: 83 e8 18 sub $0x18,%eax + 16234: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 16237: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 1623a: 8b 40 14 mov 0x14(%eax),%eax + 1623d: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 16240: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 16243: ff 70 14 pushl 0x14(%eax) + 16246: ff 75 fc pushl 0xfffffffc(%ebp) + 16249: e8 06 fd ff ff call 15f54 <_usb_match_id> + 1624e: 83 c4 08 add $0x8,%esp + 16251: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 16254: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) + 16258: 74 09 je 16263 <_usb_device_match+0x62> + 1625a: c7 45 ec 01 00 00 00 movl $0x1,0xffffffec(%ebp) + 16261: eb 07 jmp 1626a <_usb_device_match+0x69> + 16263: c7 45 ec 00 00 00 00 movl $0x0,0xffffffec(%ebp) + 1626a: 8b 45 ec mov 0xffffffec(%ebp),%eax + 1626d: c9 leave + 1626e: c3 ret + +0001626f <_usb_hotplug>: + 1626f: 55 push %ebp + 16270: 89 e5 mov %esp,%ebp + 16272: b8 ed ff ff ff mov $0xffffffed,%eax + 16277: 5d pop %ebp + 16278: c3 ret + +00016279 <_usb_alloc_dev@8>: + 16279: 55 push %ebp + 1627a: 89 e5 mov %esp,%ebp + 1627c: 83 ec 08 sub $0x8,%esp + 1627f: 83 ec 08 sub $0x8,%esp + 16282: 68 f0 01 00 00 push $0x1f0 + 16287: 6a 01 push $0x1 + 16289: e8 a2 37 00 00 call 19a30 <_ExAllocatePool@8> + 1628e: 83 c4 08 add $0x8,%esp + 16291: 89 45 fc mov %eax,0xfffffffc(%ebp) + 16294: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) + 16298: 75 0c jne 162a6 <_usb_alloc_dev@8+0x2d> + 1629a: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 162a1: e9 bd 00 00 00 jmp 16363 <_usb_alloc_dev@8+0xea> + 162a6: 83 ec 04 sub $0x4,%esp + 162a9: 68 f0 01 00 00 push $0x1f0 + 162ae: 6a 00 push $0x0 + 162b0: ff 75 fc pushl 0xfffffffc(%ebp) + 162b3: e8 98 37 00 00 call 19a50 <_memset> + 162b8: 83 c4 10 add $0x10,%esp + 162bb: 83 ec 0c sub $0xc,%esp + 162be: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 162c1: 05 c0 00 00 00 add $0xc0,%eax + 162c6: 50 push %eax + 162c7: e8 94 35 00 00 call 19860 <_my_device_initialize> + 162cc: 83 c4 10 add $0x10,%esp + 162cf: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 162d2: c7 40 14 01 00 00 00 movl $0x1,0x14(%eax) + 162d9: 83 ec 0c sub $0xc,%esp + 162dc: ff 75 0c pushl 0xc(%ebp) + 162df: e8 b2 c2 ff ff call 12596 <_usb_bus_get> + 162e4: 83 c4 10 add $0x10,%esp + 162e7: 83 7d 08 00 cmpl $0x0,0x8(%ebp) + 162eb: 75 07 jne 162f4 <_usb_alloc_dev@8+0x7b> + 162ed: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 162f0: c6 40 04 30 movb $0x30,0x4(%eax) + 162f4: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 162f7: 8b 45 0c mov 0xc(%ebp),%eax + 162fa: 89 82 bc 00 00 00 mov %eax,0xbc(%edx) + 16300: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 16303: 8b 45 08 mov 0x8(%ebp),%eax + 16306: 89 82 b8 00 00 00 mov %eax,0xb8(%edx) + 1630c: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 1630f: 81 c2 9c 01 00 00 add $0x19c,%edx + 16315: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 16318: 05 9c 01 00 00 add $0x19c,%eax + 1631d: 89 02 mov %eax,(%edx) + 1631f: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 16322: 81 c2 9c 01 00 00 add $0x19c,%edx + 16328: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 1632b: 05 9c 01 00 00 add $0x19c,%eax + 16330: 89 42 04 mov %eax,0x4(%edx) + 16333: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 16336: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 1633c: 8b 40 20 mov 0x20(%eax),%eax + 1633f: 83 38 00 cmpl $0x0,(%eax) + 16342: 74 19 je 1635d <_usb_alloc_dev@8+0xe4> + 16344: 83 ec 0c sub $0xc,%esp + 16347: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 1634a: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 16350: 8b 40 20 mov 0x20(%eax),%eax + 16353: ff 75 fc pushl 0xfffffffc(%ebp) + 16356: 8b 00 mov (%eax),%eax + 16358: ff d0 call *%eax + 1635a: 83 c4 10 add $0x10,%esp + 1635d: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 16360: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 16363: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 16366: c9 leave + 16367: c2 08 00 ret $0x8 + +0001636a <_usb_get_dev>: + 1636a: 55 push %ebp + 1636b: 89 e5 mov %esp,%ebp + 1636d: 83 ec 18 sub $0x18,%esp + 16370: 83 7d 08 00 cmpl $0x0,0x8(%ebp) + 16374: 75 09 jne 1637f <_usb_get_dev+0x15> + 16376: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) + 1637d: eb 37 jmp 163b6 <_usb_get_dev+0x4c> + 1637f: 83 ec 0c sub $0xc,%esp + 16382: 8b 45 08 mov 0x8(%ebp),%eax + 16385: 05 c0 00 00 00 add $0xc0,%eax + 1638a: 50 push %eax + 1638b: e8 c6 34 00 00 call 19856 <_my_get_device> + 16390: 83 c4 10 add $0x10,%esp + 16393: 89 45 fc mov %eax,0xfffffffc(%ebp) + 16396: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) + 1639a: 74 13 je 163af <_usb_get_dev+0x45> + 1639c: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 1639f: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 163a2: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 163a5: 2d c0 00 00 00 sub $0xc0,%eax + 163aa: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 163ad: eb 07 jmp 163b6 <_usb_get_dev+0x4c> + 163af: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) + 163b6: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 163b9: c9 leave + 163ba: c3 ret + +000163bb <_usb_put_dev@4>: + 163bb: 55 push %ebp + 163bc: 89 e5 mov %esp,%ebp + 163be: 5d pop %ebp + 163bf: c2 04 00 ret $0x4 + +000163c2 <_usb_release_dev>: + 163c2: 55 push %ebp + 163c3: 89 e5 mov %esp,%ebp + 163c5: 83 ec 08 sub $0x8,%esp + 163c8: 8b 45 08 mov 0x8(%ebp),%eax + 163cb: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 163ce: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 163d1: 2d c0 00 00 00 sub $0xc0,%eax + 163d6: 89 45 fc mov %eax,0xfffffffc(%ebp) + 163d9: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 163dc: 83 b8 bc 00 00 00 00 cmpl $0x0,0xbc(%eax) + 163e3: 74 3b je 16420 <_usb_release_dev+0x5e> + 163e5: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 163e8: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 163ee: 83 78 20 00 cmpl $0x0,0x20(%eax) + 163f2: 74 2c je 16420 <_usb_release_dev+0x5e> + 163f4: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 163f7: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 163fd: 8b 40 20 mov 0x20(%eax),%eax + 16400: 83 78 04 00 cmpl $0x0,0x4(%eax) + 16404: 74 1a je 16420 <_usb_release_dev+0x5e> + 16406: 83 ec 0c sub $0xc,%esp + 16409: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 1640c: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 16412: 8b 40 20 mov 0x20(%eax),%eax + 16415: ff 75 fc pushl 0xfffffffc(%ebp) + 16418: 8b 40 04 mov 0x4(%eax),%eax + 1641b: ff d0 call *%eax + 1641d: 83 c4 10 add $0x10,%esp + 16420: 83 ec 0c sub $0xc,%esp + 16423: ff 75 fc pushl 0xfffffffc(%ebp) + 16426: e8 ca 17 00 00 call 17bf5 <_usb_destroy_configuration> + 1642b: 83 c4 10 add $0x10,%esp + 1642e: 83 ec 0c sub $0xc,%esp + 16431: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 16434: ff b0 bc 00 00 00 pushl 0xbc(%eax) + 1643a: e8 6d c1 ff ff call 125ac <_usb_bus_put> + 1643f: 83 c4 10 add $0x10,%esp + 16442: 83 ec 0c sub $0xc,%esp + 16445: ff 75 fc pushl 0xfffffffc(%ebp) + 16448: e8 f3 35 00 00 call 19a40 <_ExFreePool@4> + 1644d: 83 c4 0c add $0xc,%esp + 16450: c9 leave + 16451: c3 ret + +00016452 <_match_device>: + 16452: 55 push %ebp + 16453: 89 e5 mov %esp,%ebp + 16455: 83 ec 18 sub $0x18,%esp + 16458: 8b 45 0c mov 0xc(%ebp),%eax + 1645b: 8b 55 10 mov 0x10(%ebp),%edx + 1645e: 66 89 45 fe mov %ax,0xfffffffe(%ebp) + 16462: 66 89 55 fc mov %dx,0xfffffffc(%ebp) + 16466: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 1646d: 8b 45 08 mov 0x8(%ebp),%eax + 16470: 66 8b 80 78 01 00 00 mov 0x178(%eax),%ax + 16477: 66 3b 45 fe cmp 0xfffffffe(%ebp),%ax + 1647b: 75 23 jne 164a0 <_match_device+0x4e> + 1647d: 8b 45 08 mov 0x8(%ebp),%eax + 16480: 66 8b 80 7a 01 00 00 mov 0x17a(%eax),%ax + 16487: 66 3b 45 fc cmp 0xfffffffc(%ebp),%ax + 1648b: 75 13 jne 164a0 <_match_device+0x4e> + 1648d: 83 ec 0c sub $0xc,%esp + 16490: ff 75 08 pushl 0x8(%ebp) + 16493: e8 d2 fe ff ff call 1636a <_usb_get_dev> + 16498: 83 c4 10 add $0x10,%esp + 1649b: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 1649e: eb 62 jmp 16502 <_match_device+0xb0> + 164a0: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) + 164a7: 8b 45 08 mov 0x8(%ebp),%eax + 164aa: 8b 80 ac 01 00 00 mov 0x1ac(%eax),%eax + 164b0: 3b 45 f4 cmp 0xfffffff4(%ebp),%eax + 164b3: 7e 4d jle 16502 <_match_device+0xb0> + 164b5: 8b 55 08 mov 0x8(%ebp),%edx + 164b8: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 164bb: 83 bc 82 b0 01 00 00 cmpl $0x0,0x1b0(%edx,%eax,4) + 164c2: 00 + 164c3: 74 36 je 164fb <_match_device+0xa9> + 164c5: 83 ec 04 sub $0x4,%esp + 164c8: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 164cb: 25 ff ff 00 00 and $0xffff,%eax + 164d0: 50 push %eax + 164d1: 66 8b 45 fe mov 0xfffffffe(%ebp),%ax + 164d5: 25 ff ff 00 00 and $0xffff,%eax + 164da: 50 push %eax + 164db: 8b 55 08 mov 0x8(%ebp),%edx + 164de: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 164e1: ff b4 82 b0 01 00 00 pushl 0x1b0(%edx,%eax,4) + 164e8: e8 65 ff ff ff call 16452 <_match_device> + 164ed: 83 c4 10 add $0x10,%esp + 164f0: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 164f3: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) + 164f7: 74 02 je 164fb <_match_device+0xa9> + 164f9: eb 07 jmp 16502 <_match_device+0xb0> + 164fb: 8d 45 f4 lea 0xfffffff4(%ebp),%eax + 164fe: ff 00 incl (%eax) + 16500: eb a5 jmp 164a7 <_match_device+0x55> + 16502: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 16505: c9 leave + 16506: c3 ret + +00016507 <_usb_find_device>: + 16507: 55 push %ebp + 16508: 89 e5 mov %esp,%ebp + 1650a: 83 ec 18 sub $0x18,%esp + 1650d: 8b 45 08 mov 0x8(%ebp),%eax + 16510: 8b 55 0c mov 0xc(%ebp),%edx + 16513: 66 89 45 fe mov %ax,0xfffffffe(%ebp) + 16517: 66 89 55 fc mov %dx,0xfffffffc(%ebp) + 1651b: c7 45 f0 00 00 00 00 movl $0x0,0xfffffff0(%ebp) + 16522: a1 00 a0 01 00 mov 0x1a000,%eax + 16527: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 1652a: 81 7d f8 00 a0 01 00 cmpl $0x1a000,0xfffffff8(%ebp) + 16531: 74 48 je 1657b <_usb_find_device+0x74> + 16533: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 16536: 89 45 ec mov %eax,0xffffffec(%ebp) + 16539: 8b 45 ec mov 0xffffffec(%ebp),%eax + 1653c: 83 e8 28 sub $0x28,%eax + 1653f: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 16542: 83 ec 04 sub $0x4,%esp + 16545: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 16548: 25 ff ff 00 00 and $0xffff,%eax + 1654d: 50 push %eax + 1654e: 66 8b 45 fe mov 0xfffffffe(%ebp),%ax + 16552: 25 ff ff 00 00 and $0xffff,%eax + 16557: 50 push %eax + 16558: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 1655b: ff 70 24 pushl 0x24(%eax) + 1655e: e8 ef fe ff ff call 16452 <_match_device> + 16563: 83 c4 10 add $0x10,%esp + 16566: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 16569: 83 7d f0 00 cmpl $0x0,0xfffffff0(%ebp) + 1656d: 74 02 je 16571 <_usb_find_device+0x6a> + 1656f: eb 0a jmp 1657b <_usb_find_device+0x74> + 16571: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 16574: 8b 00 mov (%eax),%eax + 16576: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 16579: eb af jmp 1652a <_usb_find_device+0x23> + 1657b: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 1657e: c9 leave + 1657f: c3 ret + +00016580 <_usb_get_current_frame_number>: + 16580: 55 push %ebp + 16581: 89 e5 mov %esp,%ebp + 16583: 83 ec 08 sub $0x8,%esp + 16586: 83 ec 0c sub $0xc,%esp + 16589: 8b 45 08 mov 0x8(%ebp),%eax + 1658c: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 16592: 8b 40 20 mov 0x20(%eax),%eax + 16595: ff 75 08 pushl 0x8(%ebp) + 16598: 8b 40 08 mov 0x8(%eax),%eax + 1659b: ff d0 call *%eax + 1659d: 83 c4 10 add $0x10,%esp + 165a0: c9 leave + 165a1: c3 ret + +000165a2 <___usb_get_extra_descriptor>: + 165a2: 55 push %ebp + 165a3: 89 e5 mov %esp,%ebp + 165a5: 83 ec 0c sub $0xc,%esp + 165a8: 8b 45 10 mov 0x10(%ebp),%eax + 165ab: 88 45 ff mov %al,0xffffffff(%ebp) + 165ae: 83 7d 0c 01 cmpl $0x1,0xc(%ebp) + 165b2: 76 51 jbe 16605 <___usb_get_extra_descriptor+0x63> + 165b4: 8b 45 08 mov 0x8(%ebp),%eax + 165b7: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 165ba: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 165bd: 80 38 01 cmpb $0x1,(%eax) + 165c0: 77 09 ja 165cb <___usb_get_extra_descriptor+0x29> + 165c2: c7 45 f4 ff ff ff ff movl $0xffffffff,0xfffffff4(%ebp) + 165c9: eb 41 jmp 1660c <___usb_get_extra_descriptor+0x6a> + 165cb: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 165ce: 8a 40 01 mov 0x1(%eax),%al + 165d1: 3a 45 ff cmp 0xffffffff(%ebp),%al + 165d4: 75 11 jne 165e7 <___usb_get_extra_descriptor+0x45> + 165d6: 8b 55 14 mov 0x14(%ebp),%edx + 165d9: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 165dc: 89 02 mov %eax,(%edx) + 165de: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) + 165e5: eb 25 jmp 1660c <___usb_get_extra_descriptor+0x6a> + 165e7: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 165ea: 8a 00 mov (%eax),%al + 165ec: 25 ff 00 00 00 and $0xff,%eax + 165f1: 01 45 08 add %eax,0x8(%ebp) + 165f4: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 165f7: ba 00 00 00 00 mov $0x0,%edx + 165fc: 8a 10 mov (%eax),%dl + 165fe: 8d 45 0c lea 0xc(%ebp),%eax + 16601: 29 10 sub %edx,(%eax) + 16603: eb a9 jmp 165ae <___usb_get_extra_descriptor+0xc> + 16605: c7 45 f4 ff ff ff ff movl $0xffffffff,0xfffffff4(%ebp) + 1660c: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 1660f: c9 leave + 16610: c3 ret + +00016611 <_usb_disconnect>: + 16611: 55 push %ebp + 16612: 89 e5 mov %esp,%ebp + 16614: 53 push %ebx + 16615: 83 ec 14 sub $0x14,%esp + 16618: 8b 45 08 mov 0x8(%ebp),%eax + 1661b: 8b 00 mov (%eax),%eax + 1661d: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 16620: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) + 16624: 75 05 jne 1662b <_usb_disconnect+0x1a> + 16626: e9 73 01 00 00 jmp 1679e <_usb_disconnect+0x18d> + 1662b: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 1662e: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 16634: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 16637: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) + 1663b: 75 05 jne 16642 <_usb_disconnect+0x31> + 1663d: e9 5c 01 00 00 jmp 1679e <_usb_disconnect+0x18d> + 16642: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 16645: 8b 40 20 mov 0x20(%eax),%eax + 16648: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 1664b: 8b 45 08 mov 0x8(%ebp),%eax + 1664e: c7 00 00 00 00 00 movl $0x0,(%eax) + 16654: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 16657: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax) + 1665e: c7 45 ec 00 00 00 00 movl $0x0,0xffffffec(%ebp) + 16665: 83 7d ec 0f cmpl $0xf,0xffffffec(%ebp) + 16669: 7f 2e jg 16699 <_usb_disconnect+0x88> + 1666b: 8b 45 ec mov 0xffffffec(%ebp),%eax + 1666e: c1 e0 02 shl $0x2,%eax + 16671: 03 45 f8 add 0xfffffff8(%ebp),%eax + 16674: 05 b0 01 00 00 add $0x1b0,%eax + 16679: 89 45 e8 mov %eax,0xffffffe8(%ebp) + 1667c: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 1667f: 83 38 00 cmpl $0x0,(%eax) + 16682: 74 0e je 16692 <_usb_disconnect+0x81> + 16684: 83 ec 0c sub $0xc,%esp + 16687: ff 75 e8 pushl 0xffffffe8(%ebp) + 1668a: e8 82 ff ff ff call 16611 <_usb_disconnect> + 1668f: 83 c4 10 add $0x10,%esp + 16692: 8d 45 ec lea 0xffffffec(%ebp),%eax + 16695: ff 00 incl (%eax) + 16697: eb cc jmp 16665 <_usb_disconnect+0x54> + 16699: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 1669c: 83 b8 88 01 00 00 00 cmpl $0x0,0x188(%eax) + 166a3: 74 5f je 16704 <_usb_disconnect+0xf3> + 166a5: c7 45 ec 00 00 00 00 movl $0x0,0xffffffec(%ebp) + 166ac: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 166af: 8b 80 88 01 00 00 mov 0x188(%eax),%eax + 166b5: 8a 40 04 mov 0x4(%eax),%al + 166b8: 25 ff 00 00 00 and $0xff,%eax + 166bd: 3b 45 ec cmp 0xffffffec(%ebp),%eax + 166c0: 7e 42 jle 16704 <_usb_disconnect+0xf3> + 166c2: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 166c5: 8b 98 88 01 00 00 mov 0x188(%eax),%ebx + 166cb: 8b 4d ec mov 0xffffffec(%ebp),%ecx + 166ce: 89 c8 mov %ecx,%eax + 166d0: c1 e0 02 shl $0x2,%eax + 166d3: 01 c8 add %ecx,%eax + 166d5: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx + 166dc: 01 d0 add %edx,%eax + 166de: 01 c0 add %eax,%eax + 166e0: 01 c8 add %ecx,%eax + 166e2: c1 e0 02 shl $0x2,%eax + 166e5: 03 43 0c add 0xc(%ebx),%eax + 166e8: 89 45 e8 mov %eax,0xffffffe8(%ebp) + 166eb: 83 ec 0c sub $0xc,%esp + 166ee: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 166f1: 83 c0 18 add $0x18,%eax + 166f4: 50 push %eax + 166f5: e8 1d 31 00 00 call 19817 <_my_device_unregister> + 166fa: 83 c4 10 add $0x10,%esp + 166fd: 8d 45 ec lea 0xffffffec(%ebp),%eax + 16700: ff 00 incl (%eax) + 16702: eb a8 jmp 166ac <_usb_disconnect+0x9b> + 16704: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 16707: 83 78 1c 00 cmpl $0x0,0x1c(%eax) + 1670b: 74 42 je 1674f <_usb_disconnect+0x13e> + 1670d: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 16710: 8b 40 1c mov 0x1c(%eax),%eax + 16713: 89 45 e8 mov %eax,0xffffffe8(%ebp) + 16716: c7 45 ec 00 00 00 00 movl $0x0,0xffffffec(%ebp) + 1671d: 83 7d ec 0e cmpl $0xe,0xffffffec(%ebp) + 16721: 7f 2c jg 1674f <_usb_disconnect+0x13e> + 16723: 83 ec 08 sub $0x8,%esp + 16726: ff 75 ec pushl 0xffffffec(%ebp) + 16729: ff 75 f8 pushl 0xfffffff8(%ebp) + 1672c: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 1672f: ff d0 call *%eax + 16731: 83 c4 10 add $0x10,%esp + 16734: 83 ec 08 sub $0x8,%esp + 16737: 8b 45 ec mov 0xffffffec(%ebp),%eax + 1673a: 0c 80 or $0x80,%al + 1673c: 50 push %eax + 1673d: ff 75 f8 pushl 0xfffffff8(%ebp) + 16740: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 16743: ff d0 call *%eax + 16745: 83 c4 10 add $0x10,%esp + 16748: 8d 45 ec lea 0xffffffec(%ebp),%eax + 1674b: ff 00 incl (%eax) + 1674d: eb ce jmp 1671d <_usb_disconnect+0x10c> + 1674f: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 16752: 83 38 00 cmpl $0x0,(%eax) + 16755: 7e 2b jle 16782 <_usb_disconnect+0x171> + 16757: 83 ec 08 sub $0x8,%esp + 1675a: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 1675d: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 16763: 83 c0 10 add $0x10,%eax + 16766: 50 push %eax + 16767: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 1676a: ff 30 pushl (%eax) + 1676c: e8 37 00 00 00 call 167a8 <_clear_bit> + 16771: 83 c4 10 add $0x10,%esp + 16774: 83 ec 0c sub $0xc,%esp + 16777: ff 75 f8 pushl 0xfffffff8(%ebp) + 1677a: e8 24 00 00 00 call 167a3 <_usbfs_remove_device> + 1677f: 83 c4 10 add $0x10,%esp + 16782: 83 ec 0c sub $0xc,%esp + 16785: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 16788: 05 c0 00 00 00 add $0xc0,%eax + 1678d: 50 push %eax + 1678e: e8 84 30 00 00 call 19817 <_my_device_unregister> + 16793: 83 c4 10 add $0x10,%esp + 16796: ff 75 f8 pushl 0xfffffff8(%ebp) + 16799: e8 1d fc ff ff call 163bb <_usb_put_dev@4> + 1679e: 8b 5d fc mov 0xfffffffc(%ebp),%ebx + 167a1: c9 leave + 167a2: c3 ret + +000167a3 <_usbfs_remove_device>: + 167a3: 55 push %ebp + 167a4: 89 e5 mov %esp,%ebp + 167a6: 5d pop %ebp + 167a7: c3 ret + +000167a8 <_clear_bit>: + 167a8: 55 push %ebp + 167a9: 89 e5 mov %esp,%ebp + 167ab: 8b 55 0c mov 0xc(%ebp),%edx + 167ae: 8b 45 08 mov 0x8(%ebp),%eax + 167b1: 0f b3 02 btr %eax,(%edx) + 167b4: 5d pop %ebp + 167b5: c3 ret + +000167b6 <_usb_connect@4>: + 167b6: 55 push %ebp + 167b7: 89 e5 mov %esp,%ebp + 167b9: 83 ec 18 sub $0x18,%esp + 167bc: 8b 45 08 mov 0x8(%ebp),%eax + 167bf: c6 80 77 01 00 00 08 movb $0x8,0x177(%eax) + 167c6: 83 ec 04 sub $0x4,%esp + 167c9: 8b 45 08 mov 0x8(%ebp),%eax + 167cc: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 167d2: ff 70 0c pushl 0xc(%eax) + 167d5: 68 80 00 00 00 push $0x80 + 167da: 8b 45 08 mov 0x8(%ebp),%eax + 167dd: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 167e3: 83 c0 10 add $0x10,%eax + 167e6: 50 push %eax + 167e7: e8 94 00 00 00 call 16880 <_find_next_zero_bit> + 167ec: 83 c4 10 add $0x10,%esp + 167ef: 89 45 fc mov %eax,0xfffffffc(%ebp) + 167f2: 83 7d fc 7f cmpl $0x7f,0xfffffffc(%ebp) + 167f6: 7e 22 jle 1681a <_usb_connect@4+0x64> + 167f8: 83 ec 04 sub $0x4,%esp + 167fb: 6a 01 push $0x1 + 167fd: 68 80 00 00 00 push $0x80 + 16802: 8b 45 08 mov 0x8(%ebp),%eax + 16805: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 1680b: 83 c0 10 add $0x10,%eax + 1680e: 50 push %eax + 1680f: e8 6c 00 00 00 call 16880 <_find_next_zero_bit> + 16814: 83 c4 10 add $0x10,%esp + 16817: 89 45 fc mov %eax,0xfffffffc(%ebp) + 1681a: 8b 45 08 mov 0x8(%ebp),%eax + 1681d: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 16823: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 16826: 83 7d fc 7e cmpl $0x7e,0xfffffffc(%ebp) + 1682a: 7f 09 jg 16835 <_usb_connect@4+0x7f> + 1682c: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 1682f: 40 inc %eax + 16830: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 16833: eb 07 jmp 1683c <_usb_connect@4+0x86> + 16835: c7 45 f4 01 00 00 00 movl $0x1,0xfffffff4(%ebp) + 1683c: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 1683f: 8b 55 f8 mov 0xfffffff8(%ebp),%edx + 16842: 89 42 0c mov %eax,0xc(%edx) + 16845: 83 7d fc 7f cmpl $0x7f,0xfffffffc(%ebp) + 16849: 7f 23 jg 1686e <_usb_connect@4+0xb8> + 1684b: 83 ec 08 sub $0x8,%esp + 1684e: 8b 45 08 mov 0x8(%ebp),%eax + 16851: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 16857: 83 c0 10 add $0x10,%eax + 1685a: 50 push %eax + 1685b: ff 75 fc pushl 0xfffffffc(%ebp) + 1685e: e8 0f 00 00 00 call 16872 <_set_bit> + 16863: 83 c4 10 add $0x10,%esp + 16866: 8b 55 08 mov 0x8(%ebp),%edx + 16869: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 1686c: 89 02 mov %eax,(%edx) + 1686e: c9 leave + 1686f: c2 04 00 ret $0x4 + +00016872 <_set_bit>: + 16872: 55 push %ebp + 16873: 89 e5 mov %esp,%ebp + 16875: 8b 55 0c mov 0xc(%ebp),%edx + 16878: 8b 45 08 mov 0x8(%ebp),%eax + 1687b: 0f ab 02 bts %eax,(%edx) + 1687e: 5d pop %ebp + 1687f: c3 ret + +00016880 <_find_next_zero_bit>: + 16880: 55 push %ebp + 16881: 89 e5 mov %esp,%ebp + 16883: 83 ec 18 sub $0x18,%esp + 16886: 8b 45 10 mov 0x10(%ebp),%eax + 16889: c1 f8 05 sar $0x5,%eax + 1688c: c1 e0 02 shl $0x2,%eax + 1688f: 03 45 08 add 0x8(%ebp),%eax + 16892: 89 45 fc mov %eax,0xfffffffc(%ebp) + 16895: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 1689c: 8b 45 10 mov 0x10(%ebp),%eax + 1689f: 83 e0 1f and $0x1f,%eax + 168a2: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 168a5: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) + 168a9: 74 42 je 168ed <_find_next_zero_bit+0x6d> + 168ab: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 168ae: 8b 4d f4 mov 0xfffffff4(%ebp),%ecx + 168b1: 8b 00 mov (%eax),%eax + 168b3: d3 e8 shr %cl,%eax + 168b5: f7 d0 not %eax + 168b7: 0f bc c0 bsf %eax,%eax + 168ba: 75 05 jne 168c1 <_find_next_zero_bit+0x41> + 168bc: b8 20 00 00 00 mov $0x20,%eax + 168c1: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 168c4: b8 20 00 00 00 mov $0x20,%eax + 168c9: 2b 45 f4 sub 0xfffffff4(%ebp),%eax + 168cc: 3b 45 f8 cmp 0xfffffff8(%ebp),%eax + 168cf: 7e 0b jle 168dc <_find_next_zero_bit+0x5c> + 168d1: 8b 45 10 mov 0x10(%ebp),%eax + 168d4: 03 45 f8 add 0xfffffff8(%ebp),%eax + 168d7: 89 45 ec mov %eax,0xffffffec(%ebp) + 168da: eb 43 jmp 1691f <_find_next_zero_bit+0x9f> + 168dc: b8 20 00 00 00 mov $0x20,%eax + 168e1: 2b 45 f4 sub 0xfffffff4(%ebp),%eax + 168e4: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 168e7: 8d 45 fc lea 0xfffffffc(%ebp),%eax + 168ea: 83 00 04 addl $0x4,(%eax) + 168ed: 83 ec 08 sub $0x8,%esp + 168f0: 8b 55 08 mov 0x8(%ebp),%edx + 168f3: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 168f6: 29 d0 sub %edx,%eax + 168f8: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx + 168ff: 8b 45 0c mov 0xc(%ebp),%eax + 16902: 29 d0 sub %edx,%eax + 16904: 50 push %eax + 16905: ff 75 fc pushl 0xfffffffc(%ebp) + 16908: e8 17 00 00 00 call 16924 <_find_first_zero_bit> + 1690d: 83 c4 10 add $0x10,%esp + 16910: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 16913: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 16916: 03 45 10 add 0x10(%ebp),%eax + 16919: 03 45 f0 add 0xfffffff0(%ebp),%eax + 1691c: 89 45 ec mov %eax,0xffffffec(%ebp) + 1691f: 8b 45 ec mov 0xffffffec(%ebp),%eax + 16922: c9 leave + 16923: c3 ret + +00016924 <_find_first_zero_bit>: + 16924: 55 push %ebp + 16925: 89 e5 mov %esp,%ebp + 16927: 57 push %edi + 16928: 53 push %ebx + 16929: 83 ec 14 sub $0x14,%esp + 1692c: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) + 16930: 75 09 jne 1693b <_find_first_zero_bit+0x17> + 16932: c7 45 e4 00 00 00 00 movl $0x0,0xffffffe4(%ebp) + 16939: eb 48 jmp 16983 <_find_first_zero_bit+0x5f> + 1693b: 8b 45 0c mov 0xc(%ebp),%eax + 1693e: 83 c0 1f add $0x1f,%eax + 16941: 89 c1 mov %eax,%ecx + 16943: c1 e9 05 shr $0x5,%ecx + 16946: 8b 7d 08 mov 0x8(%ebp),%edi + 16949: 8b 5d 08 mov 0x8(%ebp),%ebx + 1694c: b8 ff ff ff ff mov $0xffffffff,%eax + 16951: 31 d2 xor %edx,%edx + 16953: f3 af repz scas %es:(%edi),%eax + 16955: 74 09 je 16960 <_find_first_zero_bit+0x3c> + 16957: 33 47 fc xor 0xfffffffc(%edi),%eax + 1695a: 83 ef 04 sub $0x4,%edi + 1695d: 0f bc d0 bsf %eax,%edx + 16960: 29 df sub %ebx,%edi + 16962: c1 e7 03 shl $0x3,%edi + 16965: 01 fa add %edi,%edx + 16967: 89 c3 mov %eax,%ebx + 16969: 89 d0 mov %edx,%eax + 1696b: 89 45 e8 mov %eax,0xffffffe8(%ebp) + 1696e: 89 c8 mov %ecx,%eax + 16970: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 16973: 89 f8 mov %edi,%eax + 16975: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 16978: 89 d8 mov %ebx,%eax + 1697a: 89 45 ec mov %eax,0xffffffec(%ebp) + 1697d: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 16980: 89 45 e4 mov %eax,0xffffffe4(%ebp) + 16983: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 16986: 83 c4 14 add $0x14,%esp + 16989: 5b pop %ebx + 1698a: 5f pop %edi + 1698b: 5d pop %ebp + 1698c: c3 ret + +0001698d <_usb_set_address>: + 1698d: 55 push %ebp + 1698e: 89 e5 mov %esp,%ebp + 16990: 83 ec 08 sub $0x8,%esp + 16993: 8b 45 08 mov 0x8(%ebp),%eax + 16996: 83 38 00 cmpl $0x0,(%eax) + 16999: 75 09 jne 169a4 <_usb_set_address+0x17> + 1699b: c7 45 f8 ea ff ff ff movl $0xffffffea,0xfffffff8(%ebp) + 169a2: eb 61 jmp 16a05 <_usb_set_address+0x78> + 169a4: 8b 45 08 mov 0x8(%ebp),%eax + 169a7: 83 78 14 03 cmpl $0x3,0x14(%eax) + 169ab: 74 12 je 169bf <_usb_set_address+0x32> + 169ad: 8b 45 08 mov 0x8(%ebp),%eax + 169b0: 83 78 14 04 cmpl $0x4,0x14(%eax) + 169b4: 74 09 je 169bf <_usb_set_address+0x32> + 169b6: c7 45 f8 ea ff ff ff movl $0xffffffea,0xfffffff8(%ebp) + 169bd: eb 46 jmp 16a05 <_usb_set_address+0x78> + 169bf: 83 ec 0c sub $0xc,%esp + 169c2: 68 f4 01 00 00 push $0x1f4 + 169c7: 6a 00 push $0x0 + 169c9: 6a 00 push $0x0 + 169cb: 6a 00 push $0x0 + 169cd: 8b 45 08 mov 0x8(%ebp),%eax + 169d0: 8b 00 mov (%eax),%eax + 169d2: 25 ff ff 00 00 and $0xffff,%eax + 169d7: 50 push %eax + 169d8: 6a 00 push $0x0 + 169da: 6a 05 push $0x5 + 169dc: 68 00 00 00 80 push $0x80000000 + 169e1: ff 75 08 pushl 0x8(%ebp) + 169e4: e8 07 a8 ff ff call 111f0 <_usb_control_msg> + 169e9: 83 c4 30 add $0x30,%esp + 169ec: 89 45 fc mov %eax,0xfffffffc(%ebp) + 169ef: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) + 169f3: 75 0a jne 169ff <_usb_set_address+0x72> + 169f5: 8b 45 08 mov 0x8(%ebp),%eax + 169f8: c7 40 14 04 00 00 00 movl $0x4,0x14(%eax) + 169ff: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 16a02: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 16a05: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 16a08: c9 leave + 16a09: c3 ret + +00016a0a <_set_device_description>: + 16a0a: 55 push %ebp + 16a0b: 89 e5 mov %esp,%ebp + 16a0d: 83 ec 28 sub $0x28,%esp + 16a10: 8b 45 08 mov 0x8(%ebp),%eax + 16a13: 8a 80 7e 01 00 00 mov 0x17e(%eax),%al + 16a19: 25 ff 00 00 00 and $0xff,%eax + 16a1e: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 16a21: 8b 45 08 mov 0x8(%ebp),%eax + 16a24: 8a 80 7f 01 00 00 mov 0x17f(%eax),%al + 16a2a: 25 ff 00 00 00 and $0xff,%eax + 16a2f: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 16a32: 8b 45 08 mov 0x8(%ebp),%eax + 16a35: 66 8b 80 78 01 00 00 mov 0x178(%eax),%ax + 16a3c: 25 ff ff 00 00 and $0xffff,%eax + 16a41: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 16a44: 8b 45 08 mov 0x8(%ebp),%eax + 16a47: 66 8b 80 7a 01 00 00 mov 0x17a(%eax),%ax + 16a4e: 25 ff ff 00 00 and $0xffff,%eax + 16a53: 89 45 ec mov %eax,0xffffffec(%ebp) + 16a56: ff 75 ec pushl 0xffffffec(%ebp) + 16a59: ff 75 f0 pushl 0xfffffff0(%ebp) + 16a5c: 68 4c b2 01 00 push $0x1b24c + 16a61: 8b 45 08 mov 0x8(%ebp),%eax + 16a64: 05 c0 00 00 00 add $0xc0,%eax + 16a69: 50 push %eax + 16a6a: e8 21 30 00 00 call 19a90 <_sprintf> + 16a6f: 83 c4 10 add $0x10,%esp + 16a72: 83 ec 08 sub $0x8,%esp + 16a75: 68 00 02 00 00 push $0x200 + 16a7a: 6a 01 push $0x1 + 16a7c: e8 af 2f 00 00 call 19a30 <_ExAllocatePool@8> + 16a81: 83 c4 08 add $0x8,%esp + 16a84: 89 45 fc mov %eax,0xfffffffc(%ebp) + 16a87: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) + 16a8b: 75 05 jne 16a92 <_set_device_description+0x88> + 16a8d: e9 ff 00 00 00 jmp 16b91 <_set_device_description+0x187> + 16a92: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 16a95: 89 45 e4 mov %eax,0xffffffe4(%ebp) + 16a98: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 16a9b: 05 00 01 00 00 add $0x100,%eax + 16aa0: 89 45 e8 mov %eax,0xffffffe8(%ebp) + 16aa3: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) + 16aa7: 74 1c je 16ac5 <_set_device_description+0xbb> + 16aa9: 68 00 01 00 00 push $0x100 + 16aae: ff 75 e4 pushl 0xffffffe4(%ebp) + 16ab1: ff 75 f4 pushl 0xfffffff4(%ebp) + 16ab4: ff 75 08 pushl 0x8(%ebp) + 16ab7: e8 27 b1 ff ff call 11be3 <_usb_string> + 16abc: 83 c4 10 add $0x10,%esp + 16abf: 85 c0 test %eax,%eax + 16ac1: 7e 02 jle 16ac5 <_set_device_description+0xbb> + 16ac3: eb 07 jmp 16acc <_set_device_description+0xc2> + 16ac5: c7 45 e4 00 00 00 00 movl $0x0,0xffffffe4(%ebp) + 16acc: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) + 16ad0: 74 1c je 16aee <_set_device_description+0xe4> + 16ad2: 68 00 01 00 00 push $0x100 + 16ad7: ff 75 e8 pushl 0xffffffe8(%ebp) + 16ada: ff 75 f8 pushl 0xfffffff8(%ebp) + 16add: ff 75 08 pushl 0x8(%ebp) + 16ae0: e8 fe b0 ff ff call 11be3 <_usb_string> + 16ae5: 83 c4 10 add $0x10,%esp + 16ae8: 85 c0 test %eax,%eax + 16aea: 7e 02 jle 16aee <_set_device_description+0xe4> + 16aec: eb 07 jmp 16af5 <_set_device_description+0xeb> + 16aee: c7 45 e8 00 00 00 00 movl $0x0,0xffffffe8(%ebp) + 16af5: 83 7d e4 00 cmpl $0x0,0xffffffe4(%ebp) + 16af9: 74 2c je 16b27 <_set_device_description+0x11d> + 16afb: 83 7d e8 00 cmpl $0x0,0xffffffe8(%ebp) + 16aff: 74 26 je 16b27 <_set_device_description+0x11d> + 16b01: 83 ec 0c sub $0xc,%esp + 16b04: ff 75 e8 pushl 0xffffffe8(%ebp) + 16b07: ff 75 e4 pushl 0xffffffe4(%ebp) + 16b0a: 68 61 b2 01 00 push $0x1b261 + 16b0f: 68 80 00 00 00 push $0x80 + 16b14: 8b 45 08 mov 0x8(%ebp),%eax + 16b17: 05 c0 00 00 00 add $0xc0,%eax + 16b1c: 50 push %eax + 16b1d: e8 9e 2f 00 00 call 19ac0 <__snprintf> + 16b22: 83 c4 20 add $0x20,%esp + 16b25: eb 5c jmp 16b83 <_set_device_description+0x179> + 16b27: 83 7d e4 00 cmpl $0x0,0xffffffe4(%ebp) + 16b2b: 74 29 je 16b56 <_set_device_description+0x14c> + 16b2d: 83 ec 08 sub $0x8,%esp + 16b30: ff 75 ec pushl 0xffffffec(%ebp) + 16b33: ff 75 f0 pushl 0xfffffff0(%ebp) + 16b36: ff 75 e4 pushl 0xffffffe4(%ebp) + 16b39: 68 69 b2 01 00 push $0x1b269 + 16b3e: 68 80 00 00 00 push $0x80 + 16b43: 8b 45 08 mov 0x8(%ebp),%eax + 16b46: 05 c0 00 00 00 add $0xc0,%eax + 16b4b: 50 push %eax + 16b4c: e8 6f 2f 00 00 call 19ac0 <__snprintf> + 16b51: 83 c4 20 add $0x20,%esp + 16b54: eb 2d jmp 16b83 <_set_device_description+0x179> + 16b56: 83 7d e8 00 cmpl $0x0,0xffffffe8(%ebp) + 16b5a: 74 27 je 16b83 <_set_device_description+0x179> + 16b5c: 83 ec 08 sub $0x8,%esp + 16b5f: ff 75 e8 pushl 0xffffffe8(%ebp) + 16b62: ff 75 ec pushl 0xffffffec(%ebp) + 16b65: ff 75 f0 pushl 0xfffffff0(%ebp) + 16b68: 68 83 b2 01 00 push $0x1b283 + 16b6d: 68 80 00 00 00 push $0x80 + 16b72: 8b 45 08 mov 0x8(%ebp),%eax + 16b75: 05 c0 00 00 00 add $0xc0,%eax + 16b7a: 50 push %eax + 16b7b: e8 40 2f 00 00 call 19ac0 <__snprintf> + 16b80: 83 c4 20 add $0x20,%esp + 16b83: 83 ec 0c sub $0xc,%esp + 16b86: ff 75 fc pushl 0xfffffffc(%ebp) + 16b89: e8 b2 2e 00 00 call 19a40 <_ExFreePool@4> + 16b8e: 83 c4 0c add $0xc,%esp + 16b91: c9 leave + 16b92: c3 ret + +00016b93 <_usb_new_device>: + 16b93: 55 push %ebp + 16b94: 89 e5 mov %esp,%ebp + 16b96: 53 push %ebx + 16b97: 83 ec 24 sub $0x24,%esp + 16b9a: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 16ba1: c7 05 e4 a0 01 00 f8 movl $0x1a0f8,0x1a0e4 + 16ba8: a0 01 00 + 16bab: 8b 55 08 mov 0x8(%ebp),%edx + 16bae: 8b 45 0c mov 0xc(%ebp),%eax + 16bb1: 89 82 60 01 00 00 mov %eax,0x160(%edx) + 16bb7: 8b 45 08 mov 0x8(%ebp),%eax + 16bba: c7 80 58 01 00 00 e0 movl $0x1a0e0,0x158(%eax) + 16bc1: a0 01 00 + 16bc4: 8b 45 08 mov 0x8(%ebp),%eax + 16bc7: c7 80 40 01 00 00 f8 movl $0x1a0f8,0x140(%eax) + 16bce: a0 01 00 + 16bd1: 8b 45 08 mov 0x8(%ebp),%eax + 16bd4: c7 80 6c 01 00 00 c2 movl $0x163c2,0x16c(%eax) + 16bdb: 63 01 00 + 16bde: 8b 45 08 mov 0x8(%ebp),%eax + 16be1: c7 80 5c 01 00 00 70 movl $0x1c070,0x15c(%eax) + 16be8: c0 01 00 + 16beb: 83 ec 0c sub $0xc,%esp + 16bee: ff 75 08 pushl 0x8(%ebp) + 16bf1: e8 74 f7 ff ff call 1636a <_usb_get_dev> + 16bf6: 83 c4 10 add $0x10,%esp + 16bf9: 8b 45 08 mov 0x8(%ebp),%eax + 16bfc: 80 b8 48 01 00 00 00 cmpb $0x0,0x148(%eax) + 16c03: 75 29 jne 16c2e <_usb_new_device+0x9b> + 16c05: 8b 45 08 mov 0x8(%ebp),%eax + 16c08: 83 c0 04 add $0x4,%eax + 16c0b: 50 push %eax + 16c0c: 8b 45 08 mov 0x8(%ebp),%eax + 16c0f: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 16c15: ff 70 04 pushl 0x4(%eax) + 16c18: 68 9d b2 01 00 push $0x1b29d + 16c1d: 8b 45 08 mov 0x8(%ebp),%eax + 16c20: 05 48 01 00 00 add $0x148,%eax + 16c25: 50 push %eax + 16c26: e8 65 2e 00 00 call 19a90 <_sprintf> + 16c2b: 83 c4 10 add $0x10,%esp + 16c2e: 8b 55 08 mov 0x8(%ebp),%edx + 16c31: 8b 45 0c mov 0xc(%ebp),%eax + 16c34: 8b 80 84 00 00 00 mov 0x84(%eax),%eax + 16c3a: 89 82 44 01 00 00 mov %eax,0x144(%edx) + 16c40: 8b 45 08 mov 0x8(%ebp),%eax + 16c43: 8b 40 18 mov 0x18(%eax),%eax + 16c46: 89 45 e0 mov %eax,0xffffffe0(%ebp) + 16c49: 83 7d e0 01 cmpl $0x1,0xffffffe0(%ebp) + 16c4d: 72 20 jb 16c6f <_usb_new_device+0xdc> + 16c4f: 83 7d e0 02 cmpl $0x2,0xffffffe0(%ebp) + 16c53: 76 11 jbe 16c66 <_usb_new_device+0xd3> + 16c55: 83 7d e0 03 cmpl $0x3,0xffffffe0(%ebp) + 16c59: 74 02 je 16c5d <_usb_new_device+0xca> + 16c5b: eb 12 jmp 16c6f <_usb_new_device+0xdc> + 16c5d: c7 45 f4 40 00 00 00 movl $0x40,0xfffffff4(%ebp) + 16c64: eb 15 jmp 16c7b <_usb_new_device+0xe8> + 16c66: c7 45 f4 08 00 00 00 movl $0x8,0xfffffff4(%ebp) + 16c6d: eb 0c jmp 16c7b <_usb_new_device+0xe8> + 16c6f: c7 45 e4 ea ff ff ff movl $0xffffffea,0xffffffe4(%ebp) + 16c76: e9 da 03 00 00 jmp 17055 <_usb_new_device+0x4c2> + 16c7b: 8b 55 08 mov 0x8(%ebp),%edx + 16c7e: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 16c81: 89 42 38 mov %eax,0x38(%edx) + 16c84: 8b 55 08 mov 0x8(%ebp),%edx + 16c87: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 16c8a: 89 42 78 mov %eax,0x78(%edx) + 16c8d: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) + 16c94: 83 7d f4 01 cmpl $0x1,0xfffffff4(%ebp) + 16c98: 0f 8f c8 00 00 00 jg 16d66 <_usb_new_device+0x1d3> + 16c9e: c7 45 f0 00 00 00 00 movl $0x0,0xfffffff0(%ebp) + 16ca5: 83 7d f0 01 cmpl $0x1,0xfffffff0(%ebp) + 16ca9: 7f 30 jg 16cdb <_usb_new_device+0x148> + 16cab: 83 ec 0c sub $0xc,%esp + 16cae: ff 75 08 pushl 0x8(%ebp) + 16cb1: e8 d7 fc ff ff call 1698d <_usb_set_address> + 16cb6: 83 c4 10 add $0x10,%esp + 16cb9: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 16cbc: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) + 16cc0: 78 02 js 16cc4 <_usb_new_device+0x131> + 16cc2: eb 17 jmp 16cdb <_usb_new_device+0x148> + 16cc4: 83 ec 0c sub $0xc,%esp + 16cc7: 68 c8 00 00 00 push $0xc8 + 16ccc: e8 df 27 00 00 call 194b0 <_wait_ms> + 16cd1: 83 c4 10 add $0x10,%esp + 16cd4: 8d 45 f0 lea 0xfffffff0(%ebp),%eax + 16cd7: ff 00 incl (%eax) + 16cd9: eb ca jmp 16ca5 <_usb_new_device+0x112> + 16cdb: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) + 16cdf: 79 39 jns 16d1a <_usb_new_device+0x187> + 16ce1: 8b 45 08 mov 0x8(%ebp),%eax + 16ce4: c7 40 14 03 00 00 00 movl $0x3,0x14(%eax) + 16ceb: 8b 45 08 mov 0x8(%ebp),%eax + 16cee: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 16cf4: 83 c0 10 add $0x10,%eax + 16cf7: 50 push %eax + 16cf8: 8b 45 08 mov 0x8(%ebp),%eax + 16cfb: ff 30 pushl (%eax) + 16cfd: e8 a6 fa ff ff call 167a8 <_clear_bit> + 16d02: 83 c4 08 add $0x8,%esp + 16d05: 8b 45 08 mov 0x8(%ebp),%eax + 16d08: c7 00 ff ff ff ff movl $0xffffffff,(%eax) + 16d0e: c7 45 e4 01 00 00 00 movl $0x1,0xffffffe4(%ebp) + 16d15: e9 3b 03 00 00 jmp 17055 <_usb_new_device+0x4c2> + 16d1a: 83 ec 0c sub $0xc,%esp + 16d1d: 6a 0a push $0xa + 16d1f: e8 8c 27 00 00 call 194b0 <_wait_ms> + 16d24: 83 c4 10 add $0x10,%esp + 16d27: 83 ec 0c sub $0xc,%esp + 16d2a: 6a 08 push $0x8 + 16d2c: 8b 45 08 mov 0x8(%ebp),%eax + 16d2f: 05 70 01 00 00 add $0x170,%eax + 16d34: 50 push %eax + 16d35: 6a 00 push $0x0 + 16d37: 6a 01 push $0x1 + 16d39: ff 75 08 pushl 0x8(%ebp) + 16d3c: e8 1b a6 ff ff call 1135c <_usb_get_descriptor> + 16d41: 83 c4 20 add $0x20,%esp + 16d44: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 16d47: 83 7d f8 07 cmpl $0x7,0xfffffff8(%ebp) + 16d4b: 7e 02 jle 16d4f <_usb_new_device+0x1bc> + 16d4d: eb 17 jmp 16d66 <_usb_new_device+0x1d3> + 16d4f: 83 ec 0c sub $0xc,%esp + 16d52: 6a 64 push $0x64 + 16d54: e8 57 27 00 00 call 194b0 <_wait_ms> + 16d59: 83 c4 10 add $0x10,%esp + 16d5c: 8d 45 f4 lea 0xfffffff4(%ebp),%eax + 16d5f: ff 00 incl (%eax) + 16d61: e9 2e ff ff ff jmp 16c94 <_usb_new_device+0x101> + 16d66: 83 7d f8 07 cmpl $0x7,0xfffffff8(%ebp) + 16d6a: 7f 2f jg 16d9b <_usb_new_device+0x208> + 16d6c: 8b 45 08 mov 0x8(%ebp),%eax + 16d6f: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 16d75: 83 c0 10 add $0x10,%eax + 16d78: 50 push %eax + 16d79: 8b 45 08 mov 0x8(%ebp),%eax + 16d7c: ff 30 pushl (%eax) + 16d7e: e8 25 fa ff ff call 167a8 <_clear_bit> + 16d83: 83 c4 08 add $0x8,%esp + 16d86: 8b 45 08 mov 0x8(%ebp),%eax + 16d89: c7 00 ff ff ff ff movl $0xffffffff,(%eax) + 16d8f: c7 45 e4 01 00 00 00 movl $0x1,0xffffffe4(%ebp) + 16d96: e9 ba 02 00 00 jmp 17055 <_usb_new_device+0x4c2> + 16d9b: 8b 45 08 mov 0x8(%ebp),%eax + 16d9e: 83 78 18 02 cmpl $0x2,0x18(%eax) + 16da2: 75 28 jne 16dcc <_usb_new_device+0x239> + 16da4: 8b 55 08 mov 0x8(%ebp),%edx + 16da7: 8b 45 08 mov 0x8(%ebp),%eax + 16daa: 8a 80 77 01 00 00 mov 0x177(%eax),%al + 16db0: 25 ff 00 00 00 and $0xff,%eax + 16db5: 89 42 38 mov %eax,0x38(%edx) + 16db8: 8b 55 08 mov 0x8(%ebp),%edx + 16dbb: 8b 45 08 mov 0x8(%ebp),%eax + 16dbe: 8a 80 77 01 00 00 mov 0x177(%eax),%al + 16dc4: 25 ff 00 00 00 and $0xff,%eax + 16dc9: 89 42 78 mov %eax,0x78(%edx) + 16dcc: 83 ec 0c sub $0xc,%esp + 16dcf: ff 75 08 pushl 0x8(%ebp) + 16dd2: e8 aa a6 ff ff call 11481 <_usb_get_device_descriptor> + 16dd7: 83 c4 10 add $0x10,%esp + 16dda: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 16ddd: 83 7d f8 11 cmpl $0x11,0xfffffff8(%ebp) + 16de1: 7f 2f jg 16e12 <_usb_new_device+0x27f> + 16de3: 8b 45 08 mov 0x8(%ebp),%eax + 16de6: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 16dec: 83 c0 10 add $0x10,%eax + 16def: 50 push %eax + 16df0: 8b 45 08 mov 0x8(%ebp),%eax + 16df3: ff 30 pushl (%eax) + 16df5: e8 ae f9 ff ff call 167a8 <_clear_bit> + 16dfa: 83 c4 08 add $0x8,%esp + 16dfd: 8b 45 08 mov 0x8(%ebp),%eax + 16e00: c7 00 ff ff ff ff movl $0xffffffff,(%eax) + 16e06: c7 45 e4 01 00 00 00 movl $0x1,0xffffffe4(%ebp) + 16e0d: e9 43 02 00 00 jmp 17055 <_usb_new_device+0x4c2> + 16e12: 83 ec 0c sub $0xc,%esp + 16e15: ff 75 08 pushl 0x8(%ebp) + 16e18: e8 fb 0f 00 00 call 17e18 <_usb_get_configuration> + 16e1d: 83 c4 10 add $0x10,%esp + 16e20: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 16e23: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) + 16e27: 79 2f jns 16e58 <_usb_new_device+0x2c5> + 16e29: 8b 45 08 mov 0x8(%ebp),%eax + 16e2c: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 16e32: 83 c0 10 add $0x10,%eax + 16e35: 50 push %eax + 16e36: 8b 45 08 mov 0x8(%ebp),%eax + 16e39: ff 30 pushl (%eax) + 16e3b: e8 68 f9 ff ff call 167a8 <_clear_bit> + 16e40: 83 c4 08 add $0x8,%esp + 16e43: 8b 45 08 mov 0x8(%ebp),%eax + 16e46: c7 00 ff ff ff ff movl $0xffffffff,(%eax) + 16e4c: c7 45 e4 01 00 00 00 movl $0x1,0xffffffe4(%ebp) + 16e53: e9 fd 01 00 00 jmp 17055 <_usb_new_device+0x4c2> + 16e58: 83 ec 08 sub $0x8,%esp + 16e5b: 8b 45 08 mov 0x8(%ebp),%eax + 16e5e: 8b 80 84 01 00 00 mov 0x184(%eax),%eax + 16e64: 8a 40 05 mov 0x5(%eax),%al + 16e67: 25 ff 00 00 00 and $0xff,%eax + 16e6c: 50 push %eax + 16e6d: ff 75 08 pushl 0x8(%ebp) + 16e70: e8 d2 ab ff ff call 11a47 <_usb_set_configuration> + 16e75: 83 c4 10 add $0x10,%esp + 16e78: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 16e7b: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) + 16e7f: 74 2f je 16eb0 <_usb_new_device+0x31d> + 16e81: 8b 45 08 mov 0x8(%ebp),%eax + 16e84: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 16e8a: 83 c0 10 add $0x10,%eax + 16e8d: 50 push %eax + 16e8e: 8b 45 08 mov 0x8(%ebp),%eax + 16e91: ff 30 pushl (%eax) + 16e93: e8 10 f9 ff ff call 167a8 <_clear_bit> + 16e98: 83 c4 08 add $0x8,%esp + 16e9b: 8b 45 08 mov 0x8(%ebp),%eax + 16e9e: c7 00 ff ff ff ff movl $0xffffffff,(%eax) + 16ea4: c7 45 e4 01 00 00 00 movl $0x1,0xffffffe4(%ebp) + 16eab: e9 a5 01 00 00 jmp 17055 <_usb_new_device+0x4c2> + 16eb0: 83 ec 0c sub $0xc,%esp + 16eb3: ff 75 08 pushl 0x8(%ebp) + 16eb6: e8 4f fb ff ff call 16a0a <_set_device_description> + 16ebb: 83 c4 10 add $0x10,%esp + 16ebe: 83 ec 0c sub $0xc,%esp + 16ec1: 8b 45 08 mov 0x8(%ebp),%eax + 16ec4: 05 c0 00 00 00 add $0xc0,%eax + 16ec9: 50 push %eax + 16eca: e8 3b 28 00 00 call 1970a <_my_device_add> + 16ecf: 83 c4 10 add $0x10,%esp + 16ed2: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 16ed5: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) + 16ed9: 74 0b je 16ee6 <_usb_new_device+0x353> + 16edb: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 16ede: 89 45 e4 mov %eax,0xffffffe4(%ebp) + 16ee1: e9 6f 01 00 00 jmp 17055 <_usb_new_device+0x4c2> + 16ee6: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) + 16eed: 8b 45 08 mov 0x8(%ebp),%eax + 16ef0: 8b 80 88 01 00 00 mov 0x188(%eax),%eax + 16ef6: 8a 40 04 mov 0x4(%eax),%al + 16ef9: 25 ff 00 00 00 and $0xff,%eax + 16efe: 3b 45 f4 cmp 0xfffffff4(%ebp),%eax + 16f01: 0f 8e 39 01 00 00 jle 17040 <_usb_new_device+0x4ad> + 16f07: 8b 45 08 mov 0x8(%ebp),%eax + 16f0a: 8b 98 88 01 00 00 mov 0x188(%eax),%ebx + 16f10: 8b 4d f4 mov 0xfffffff4(%ebp),%ecx + 16f13: 89 c8 mov %ecx,%eax + 16f15: c1 e0 02 shl $0x2,%eax + 16f18: 01 c8 add %ecx,%eax + 16f1a: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx + 16f21: 01 d0 add %edx,%eax + 16f23: 01 c0 add %eax,%eax + 16f25: 01 c8 add %ecx,%eax + 16f27: c1 e0 02 shl $0x2,%eax + 16f2a: 03 43 0c add 0xc(%ebx),%eax + 16f2d: 89 45 ec mov %eax,0xffffffec(%ebp) + 16f30: 8b 4d ec mov 0xffffffec(%ebp),%ecx + 16f33: 8b 45 ec mov 0xffffffec(%ebp),%eax + 16f36: 8b 50 04 mov 0x4(%eax),%edx + 16f39: 89 d0 mov %edx,%eax + 16f3b: 01 c0 add %eax,%eax + 16f3d: 01 d0 add %edx,%eax + 16f3f: c1 e0 03 shl $0x3,%eax + 16f42: 03 01 add (%ecx),%eax + 16f44: 89 45 e8 mov %eax,0xffffffe8(%ebp) + 16f47: 8b 55 ec mov 0xffffffec(%ebp),%edx + 16f4a: 8b 45 08 mov 0x8(%ebp),%eax + 16f4d: 05 c0 00 00 00 add $0xc0,%eax + 16f52: 89 82 b8 00 00 00 mov %eax,0xb8(%edx) + 16f58: 8b 45 ec mov 0xffffffec(%ebp),%eax + 16f5b: c7 80 b0 00 00 00 00 movl $0x0,0xb0(%eax) + 16f62: 00 00 00 + 16f65: 8b 45 ec mov 0xffffffec(%ebp),%eax + 16f68: c7 80 98 00 00 00 f8 movl $0x1a0f8,0x98(%eax) + 16f6f: a0 01 00 + 16f72: 8b 55 ec mov 0xffffffec(%ebp),%edx + 16f75: 8b 45 0c mov 0xc(%ebp),%eax + 16f78: 8b 80 84 00 00 00 mov 0x84(%eax),%eax + 16f7e: 89 82 9c 00 00 00 mov %eax,0x9c(%edx) + 16f84: 83 ec 0c sub $0xc,%esp + 16f87: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 16f8a: 8a 40 02 mov 0x2(%eax),%al + 16f8d: 25 ff 00 00 00 and $0xff,%eax + 16f92: 50 push %eax + 16f93: 8b 45 08 mov 0x8(%ebp),%eax + 16f96: 83 c0 04 add $0x4,%eax + 16f99: 50 push %eax + 16f9a: 8b 45 08 mov 0x8(%ebp),%eax + 16f9d: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 16fa3: ff 70 04 pushl 0x4(%eax) + 16fa6: 68 a3 b2 01 00 push $0x1b2a3 + 16fab: 8b 45 ec mov 0xffffffec(%ebp),%eax + 16fae: 05 a0 00 00 00 add $0xa0,%eax + 16fb3: 50 push %eax + 16fb4: e8 d7 2a 00 00 call 19a90 <_sprintf> + 16fb9: 83 c4 20 add $0x20,%esp + 16fbc: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 16fbf: 80 78 08 00 cmpb $0x0,0x8(%eax) + 16fc3: 74 29 je 16fee <_usb_new_device+0x45b> + 16fc5: 68 80 00 00 00 push $0x80 + 16fca: 8b 45 ec mov 0xffffffec(%ebp),%eax + 16fcd: 83 c0 18 add $0x18,%eax + 16fd0: 50 push %eax + 16fd1: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 16fd4: 8a 40 08 mov 0x8(%eax),%al + 16fd7: 25 ff 00 00 00 and $0xff,%eax + 16fdc: 50 push %eax + 16fdd: ff 75 08 pushl 0x8(%ebp) + 16fe0: e8 fe ab ff ff call 11be3 <_usb_string> + 16fe5: 83 c4 10 add $0x10,%esp + 16fe8: 85 c0 test %eax,%eax + 16fea: 7e 02 jle 16fee <_usb_new_device+0x45b> + 16fec: eb 36 jmp 17024 <_usb_new_device+0x491> + 16fee: 83 ec 0c sub $0xc,%esp + 16ff1: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 16ff4: 8a 40 02 mov 0x2(%eax),%al + 16ff7: 25 ff 00 00 00 and $0xff,%eax + 16ffc: 50 push %eax + 16ffd: 8b 45 08 mov 0x8(%ebp),%eax + 17000: 83 c0 04 add $0x4,%eax + 17003: 50 push %eax + 17004: 8b 45 08 mov 0x8(%ebp),%eax + 17007: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 1700d: ff 70 08 pushl 0x8(%eax) + 17010: 68 ac b2 01 00 push $0x1b2ac + 17015: 8b 45 ec mov 0xffffffec(%ebp),%eax + 17018: 83 c0 18 add $0x18,%eax + 1701b: 50 push %eax + 1701c: e8 6f 2a 00 00 call 19a90 <_sprintf> + 17021: 83 c4 20 add $0x20,%esp + 17024: 83 ec 0c sub $0xc,%esp + 17027: 8b 45 ec mov 0xffffffec(%ebp),%eax + 1702a: 83 c0 18 add $0x18,%eax + 1702d: 50 push %eax + 1702e: e8 d7 26 00 00 call 1970a <_my_device_add> + 17033: 83 c4 10 add $0x10,%esp + 17036: 8d 45 f4 lea 0xfffffff4(%ebp),%eax + 17039: ff 00 incl (%eax) + 1703b: e9 ad fe ff ff jmp 16eed <_usb_new_device+0x35a> + 17040: 83 ec 0c sub $0xc,%esp + 17043: ff 75 08 pushl 0x8(%ebp) + 17046: e8 12 00 00 00 call 1705d <_usbfs_add_device> + 1704b: 83 c4 10 add $0x10,%esp + 1704e: c7 45 e4 00 00 00 00 movl $0x0,0xffffffe4(%ebp) + 17055: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 17058: 8b 5d fc mov 0xfffffffc(%ebp),%ebx + 1705b: c9 leave + 1705c: c3 ret + +0001705d <_usbfs_add_device>: + 1705d: 55 push %ebp + 1705e: 89 e5 mov %esp,%ebp + 17060: 5d pop %ebp + 17061: c3 ret + +00017062 <_usb_buffer_alloc>: + 17062: 55 push %ebp + 17063: 89 e5 mov %esp,%ebp + 17065: 83 ec 08 sub $0x8,%esp + 17068: 83 7d 08 00 cmpl $0x0,0x8(%ebp) + 1706c: 74 2d je 1709b <_usb_buffer_alloc+0x39> + 1706e: 8b 45 08 mov 0x8(%ebp),%eax + 17071: 83 b8 bc 00 00 00 00 cmpl $0x0,0xbc(%eax) + 17078: 74 21 je 1709b <_usb_buffer_alloc+0x39> + 1707a: 8b 45 08 mov 0x8(%ebp),%eax + 1707d: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 17083: 83 78 20 00 cmpl $0x0,0x20(%eax) + 17087: 74 12 je 1709b <_usb_buffer_alloc+0x39> + 17089: 8b 45 08 mov 0x8(%ebp),%eax + 1708c: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 17092: 8b 40 20 mov 0x20(%eax),%eax + 17095: 83 78 14 00 cmpl $0x0,0x14(%eax) + 17099: 75 09 jne 170a4 <_usb_buffer_alloc+0x42> + 1709b: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) + 170a2: eb 29 jmp 170cd <_usb_buffer_alloc+0x6b> + 170a4: 8b 45 08 mov 0x8(%ebp),%eax + 170a7: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 170ad: 8b 50 20 mov 0x20(%eax),%edx + 170b0: ff 75 14 pushl 0x14(%ebp) + 170b3: ff 75 10 pushl 0x10(%ebp) + 170b6: ff 75 0c pushl 0xc(%ebp) + 170b9: 8b 45 08 mov 0x8(%ebp),%eax + 170bc: ff b0 bc 00 00 00 pushl 0xbc(%eax) + 170c2: 8b 42 14 mov 0x14(%edx),%eax + 170c5: ff d0 call *%eax + 170c7: 83 c4 10 add $0x10,%esp + 170ca: 89 45 fc mov %eax,0xfffffffc(%ebp) + 170cd: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 170d0: c9 leave + 170d1: c3 ret + +000170d2 <_usb_buffer_free>: + 170d2: 55 push %ebp + 170d3: 89 e5 mov %esp,%ebp + 170d5: 83 ec 08 sub $0x8,%esp + 170d8: 83 7d 08 00 cmpl $0x0,0x8(%ebp) + 170dc: 74 55 je 17133 <_usb_buffer_free+0x61> + 170de: 8b 45 08 mov 0x8(%ebp),%eax + 170e1: 83 b8 bc 00 00 00 00 cmpl $0x0,0xbc(%eax) + 170e8: 74 49 je 17133 <_usb_buffer_free+0x61> + 170ea: 8b 45 08 mov 0x8(%ebp),%eax + 170ed: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 170f3: 83 78 20 00 cmpl $0x0,0x20(%eax) + 170f7: 74 3a je 17133 <_usb_buffer_free+0x61> + 170f9: 8b 45 08 mov 0x8(%ebp),%eax + 170fc: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 17102: 8b 40 20 mov 0x20(%eax),%eax + 17105: 83 78 18 00 cmpl $0x0,0x18(%eax) + 17109: 75 02 jne 1710d <_usb_buffer_free+0x3b> + 1710b: eb 26 jmp 17133 <_usb_buffer_free+0x61> + 1710d: 8b 45 08 mov 0x8(%ebp),%eax + 17110: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 17116: 8b 50 20 mov 0x20(%eax),%edx + 17119: ff 75 14 pushl 0x14(%ebp) + 1711c: ff 75 10 pushl 0x10(%ebp) + 1711f: ff 75 0c pushl 0xc(%ebp) + 17122: 8b 45 08 mov 0x8(%ebp),%eax + 17125: ff b0 bc 00 00 00 pushl 0xbc(%eax) + 1712b: 8b 42 18 mov 0x18(%edx),%eax + 1712e: ff d0 call *%eax + 17130: 83 c4 10 add $0x10,%esp + 17133: c9 leave + 17134: c3 ret + +00017135 <_usb_buffer_map>: + 17135: 55 push %ebp + 17136: 89 e5 mov %esp,%ebp + 17138: 83 ec 0c sub $0xc,%esp + 1713b: 83 7d 08 00 cmpl $0x0,0x8(%ebp) + 1713f: 74 39 je 1717a <_usb_buffer_map+0x45> + 17141: 8b 45 08 mov 0x8(%ebp),%eax + 17144: 8b 40 18 mov 0x18(%eax),%eax + 17147: c1 e8 1e shr $0x1e,%eax + 1714a: 83 e0 03 and $0x3,%eax + 1714d: 83 f8 02 cmp $0x2,%eax + 17150: 74 28 je 1717a <_usb_buffer_map+0x45> + 17152: 8b 45 08 mov 0x8(%ebp),%eax + 17155: 83 78 14 00 cmpl $0x0,0x14(%eax) + 17159: 74 1f je 1717a <_usb_buffer_map+0x45> + 1715b: 8b 45 08 mov 0x8(%ebp),%eax + 1715e: 8b 40 14 mov 0x14(%eax),%eax + 17161: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 17167: 89 45 fc mov %eax,0xfffffffc(%ebp) + 1716a: 85 c0 test %eax,%eax + 1716c: 74 0c je 1717a <_usb_buffer_map+0x45> + 1716e: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 17171: 8b 00 mov (%eax),%eax + 17173: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 17176: 85 c0 test %eax,%eax + 17178: 75 09 jne 17183 <_usb_buffer_map+0x4e> + 1717a: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) + 17181: eb 3f jmp 171c2 <_usb_buffer_map+0x8d> + 17183: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 17186: 83 b8 84 00 00 00 00 cmpl $0x0,0x84(%eax) + 1718d: 74 14 je 171a3 <_usb_buffer_map+0x6e> + 1718f: 8b 45 08 mov 0x8(%ebp),%eax + 17192: 8b 55 08 mov 0x8(%ebp),%edx + 17195: 8b 52 24 mov 0x24(%edx),%edx + 17198: 81 e2 ff ff ff 0f and $0xfffffff,%edx + 1719e: 89 50 28 mov %edx,0x28(%eax) + 171a1: eb 0a jmp 171ad <_usb_buffer_map+0x78> + 171a3: 8b 45 08 mov 0x8(%ebp),%eax + 171a6: c7 40 28 ff ff ff ff movl $0xffffffff,0x28(%eax) + 171ad: 8b 55 08 mov 0x8(%ebp),%edx + 171b0: 8b 45 08 mov 0x8(%ebp),%eax + 171b3: 8b 40 20 mov 0x20(%eax),%eax + 171b6: 83 c8 04 or $0x4,%eax + 171b9: 89 42 20 mov %eax,0x20(%edx) + 171bc: 8b 45 08 mov 0x8(%ebp),%eax + 171bf: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 171c2: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 171c5: c9 leave + 171c6: c3 ret + +000171c7 <_usb_buffer_dmasync>: + 171c7: 55 push %ebp + 171c8: 89 e5 mov %esp,%ebp + 171ca: 83 ec 08 sub $0x8,%esp + 171cd: 83 7d 08 00 cmpl $0x0,0x8(%ebp) + 171d1: 74 3a je 1720d <_usb_buffer_dmasync+0x46> + 171d3: 8b 45 08 mov 0x8(%ebp),%eax + 171d6: 8b 40 20 mov 0x20(%eax),%eax + 171d9: c1 e8 02 shr $0x2,%eax + 171dc: 83 e0 01 and $0x1,%eax + 171df: 85 c0 test %eax,%eax + 171e1: 74 2a je 1720d <_usb_buffer_dmasync+0x46> + 171e3: 8b 45 08 mov 0x8(%ebp),%eax + 171e6: 83 78 14 00 cmpl $0x0,0x14(%eax) + 171ea: 74 21 je 1720d <_usb_buffer_dmasync+0x46> + 171ec: 8b 45 08 mov 0x8(%ebp),%eax + 171ef: 8b 40 14 mov 0x14(%eax),%eax + 171f2: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 171f8: 89 45 fc mov %eax,0xfffffffc(%ebp) + 171fb: 85 c0 test %eax,%eax + 171fd: 74 0e je 1720d <_usb_buffer_dmasync+0x46> + 171ff: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 17202: 8b 00 mov (%eax),%eax + 17204: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 17207: 85 c0 test %eax,%eax + 17209: 75 02 jne 1720d <_usb_buffer_dmasync+0x46> + 1720b: eb 00 jmp 1720d <_usb_buffer_dmasync+0x46> + 1720d: c9 leave + 1720e: c3 ret + +0001720f <_usb_buffer_unmap>: + 1720f: 55 push %ebp + 17210: 89 e5 mov %esp,%ebp + 17212: 83 ec 08 sub $0x8,%esp + 17215: 83 7d 08 00 cmpl $0x0,0x8(%ebp) + 17219: 74 49 je 17264 <_usb_buffer_unmap+0x55> + 1721b: 8b 45 08 mov 0x8(%ebp),%eax + 1721e: 8b 40 20 mov 0x20(%eax),%eax + 17221: c1 e8 02 shr $0x2,%eax + 17224: 83 e0 01 and $0x1,%eax + 17227: 85 c0 test %eax,%eax + 17229: 74 39 je 17264 <_usb_buffer_unmap+0x55> + 1722b: 8b 45 08 mov 0x8(%ebp),%eax + 1722e: 83 78 14 00 cmpl $0x0,0x14(%eax) + 17232: 74 30 je 17264 <_usb_buffer_unmap+0x55> + 17234: 8b 45 08 mov 0x8(%ebp),%eax + 17237: 8b 40 14 mov 0x14(%eax),%eax + 1723a: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 17240: 89 45 fc mov %eax,0xfffffffc(%ebp) + 17243: 85 c0 test %eax,%eax + 17245: 74 1d je 17264 <_usb_buffer_unmap+0x55> + 17247: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 1724a: 8b 00 mov (%eax),%eax + 1724c: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 1724f: 85 c0 test %eax,%eax + 17251: 75 02 jne 17255 <_usb_buffer_unmap+0x46> + 17253: eb 0f jmp 17264 <_usb_buffer_unmap+0x55> + 17255: 8b 45 08 mov 0x8(%ebp),%eax + 17258: 8b 55 08 mov 0x8(%ebp),%edx + 1725b: 8b 52 20 mov 0x20(%edx),%edx + 1725e: 83 e2 fb and $0xfffffffb,%edx + 17261: 89 50 20 mov %edx,0x20(%eax) + 17264: c9 leave + 17265: c3 ret + +00017266 <_usb_buffer_map_sg>: + 17266: 55 push %ebp + 17267: 89 e5 mov %esp,%ebp + 17269: 83 ec 0c sub $0xc,%esp + 1726c: 83 7d 08 00 cmpl $0x0,0x8(%ebp) + 17270: 74 36 je 172a8 <_usb_buffer_map_sg+0x42> + 17272: 8b 45 0c mov 0xc(%ebp),%eax + 17275: c1 e8 1e shr $0x1e,%eax + 17278: 83 e0 03 and $0x3,%eax + 1727b: 83 f8 02 cmp $0x2,%eax + 1727e: 74 28 je 172a8 <_usb_buffer_map_sg+0x42> + 17280: 8b 45 08 mov 0x8(%ebp),%eax + 17283: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 17289: 89 45 fc mov %eax,0xfffffffc(%ebp) + 1728c: 85 c0 test %eax,%eax + 1728e: 74 18 je 172a8 <_usb_buffer_map_sg+0x42> + 17290: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 17293: 8b 00 mov (%eax),%eax + 17295: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 17298: 85 c0 test %eax,%eax + 1729a: 74 0c je 172a8 <_usb_buffer_map_sg+0x42> + 1729c: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 1729f: 83 b8 84 00 00 00 00 cmpl $0x0,0x84(%eax) + 172a6: 75 09 jne 172b1 <_usb_buffer_map_sg+0x4b> + 172a8: c7 45 f4 ff ff ff ff movl $0xffffffff,0xfffffff4(%ebp) + 172af: eb 07 jmp 172b8 <_usb_buffer_map_sg+0x52> + 172b1: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) + 172b8: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 172bb: c9 leave + 172bc: c3 ret + +000172bd <_usb_buffer_dmasync_sg>: + 172bd: 55 push %ebp + 172be: 89 e5 mov %esp,%ebp + 172c0: 83 ec 08 sub $0x8,%esp + 172c3: 83 7d 08 00 cmpl $0x0,0x8(%ebp) + 172c7: 74 1c je 172e5 <_usb_buffer_dmasync_sg+0x28> + 172c9: 8b 45 08 mov 0x8(%ebp),%eax + 172cc: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 172d2: 89 45 fc mov %eax,0xfffffffc(%ebp) + 172d5: 85 c0 test %eax,%eax + 172d7: 74 0c je 172e5 <_usb_buffer_dmasync_sg+0x28> + 172d9: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 172dc: 8b 00 mov (%eax),%eax + 172de: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 172e1: 85 c0 test %eax,%eax + 172e3: 74 00 je 172e5 <_usb_buffer_dmasync_sg+0x28> + 172e5: c9 leave + 172e6: c3 ret + +000172e7 <_usb_buffer_unmap_sg>: + 172e7: 55 push %ebp + 172e8: 89 e5 mov %esp,%ebp + 172ea: 83 ec 08 sub $0x8,%esp + 172ed: 83 7d 08 00 cmpl $0x0,0x8(%ebp) + 172f1: 74 1c je 1730f <_usb_buffer_unmap_sg+0x28> + 172f3: 8b 45 08 mov 0x8(%ebp),%eax + 172f6: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 172fc: 89 45 fc mov %eax,0xfffffffc(%ebp) + 172ff: 85 c0 test %eax,%eax + 17301: 74 0c je 1730f <_usb_buffer_unmap_sg+0x28> + 17303: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 17306: 8b 00 mov (%eax),%eax + 17308: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 1730b: 85 c0 test %eax,%eax + 1730d: 74 00 je 1730f <_usb_buffer_unmap_sg+0x28> + 1730f: c9 leave + 17310: c3 ret + +00017311 <_usb_setup_disable>: + 17311: 55 push %ebp + 17312: 89 e5 mov %esp,%ebp + 17314: c7 05 30 c1 01 00 01 movl $0x1,0x1c130 + 1731b: 00 00 00 + 1731e: b8 01 00 00 00 mov $0x1,%eax + 17323: 5d pop %ebp + 17324: c3 ret + +00017325 <_usb_disabled@0>: + 17325: 55 push %ebp + 17326: 89 e5 mov %esp,%ebp + 17328: a1 30 c1 01 00 mov 0x1c130,%eax + 1732d: 5d pop %ebp + 1732e: c3 ret + +0001732f <_usb_init>: + 1732f: 55 push %ebp + 17330: 89 e5 mov %esp,%ebp + 17332: 83 ec 08 sub $0x8,%esp + 17335: 83 3d 30 c1 01 00 00 cmpl $0x0,0x1c130 + 1733c: 74 09 je 17347 <_usb_init+0x18> + 1733e: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) + 17345: eb 26 jmp 1736d <_usb_init+0x3e> + 17347: e8 30 00 00 00 call 1737c <_usb_major_init> + 1734c: e8 21 00 00 00 call 17372 <_usbfs_init> + 17351: e8 63 e3 ff ff call 156b9 <_usb_hub_init> + 17356: 83 ec 0c sub $0xc,%esp + 17359: 68 e0 a0 01 00 push $0x1a0e0 + 1735e: e8 79 24 00 00 call 197dc <_my_driver_register> + 17363: 83 c4 10 add $0x10,%esp + 17366: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) + 1736d: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 17370: c9 leave + 17371: c3 ret + +00017372 <_usbfs_init>: + 17372: 55 push %ebp + 17373: 89 e5 mov %esp,%ebp + 17375: b8 00 00 00 00 mov $0x0,%eax + 1737a: 5d pop %ebp + 1737b: c3 ret + +0001737c <_usb_major_init>: + 1737c: 55 push %ebp + 1737d: 89 e5 mov %esp,%ebp + 1737f: b8 00 00 00 00 mov $0x0,%eax + 17384: 5d pop %ebp + 17385: c3 ret + +00017386 <_usb_exit>: + 17386: 55 push %ebp + 17387: 89 e5 mov %esp,%ebp + 17389: 83 ec 08 sub $0x8,%esp + 1738c: 83 3d 30 c1 01 00 00 cmpl $0x0,0x1c130 + 17393: 74 02 je 17397 <_usb_exit+0x11> + 17395: eb 0f jmp 173a6 <_usb_exit+0x20> + 17397: e8 11 00 00 00 call 173ad <_usb_major_cleanup> + 1739c: e8 07 00 00 00 call 173a8 <_usbfs_cleanup> + 173a1: e8 80 e3 ff ff call 15726 <_usb_hub_cleanup> + 173a6: c9 leave + 173a7: c3 ret + +000173a8 <_usbfs_cleanup>: + 173a8: 55 push %ebp + 173a9: 89 e5 mov %esp,%ebp + 173ab: 5d pop %ebp + 173ac: c3 ret + +000173ad <_usb_major_cleanup>: + 173ad: 55 push %ebp + 173ae: 89 e5 mov %esp,%ebp + 173b0: 5d pop %ebp + 173b1: c3 ret + +000173b2 <_subsys_usb_init>: + 173b2: 55 push %ebp + 173b3: 89 e5 mov %esp,%ebp + 173b5: 83 ec 08 sub $0x8,%esp + 173b8: e8 72 ff ff ff call 1732f <_usb_init> + 173bd: c9 leave + 173be: c3 ret + +000173bf <_module_exit_usb_exit>: + 173bf: 55 push %ebp + 173c0: 89 e5 mov %esp,%ebp + 173c2: 83 ec 08 sub $0x8,%esp + 173c5: e8 bc ff ff ff call 17386 <_usb_exit> + 173ca: c9 leave + 173cb: c3 ret + 173cc: 90 nop + 173cd: 90 nop + 173ce: 90 nop + 173cf: 90 nop + +000173d0 <_usb_parse_endpoint>: + 173d0: 55 push %ebp + 173d1: 89 e5 mov %esp,%ebp + 173d3: 53 push %ebx + 173d4: 83 ec 24 sub $0x24,%esp + 173d7: c7 45 f0 00 00 00 00 movl $0x0,0xfffffff0(%ebp) + 173de: 8b 45 0c mov 0xc(%ebp),%eax + 173e1: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 173e4: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 173e7: 8a 00 mov (%eax),%al + 173e9: 25 ff 00 00 00 and $0xff,%eax + 173ee: 3b 45 10 cmp 0x10(%ebp),%eax + 173f1: 7e 0c jle 173ff <_usb_parse_endpoint+0x2f> + 173f3: c7 45 e4 ff ff ff ff movl $0xffffffff,0xffffffe4(%ebp) + 173fa: e9 7c 01 00 00 jmp 1757b <_usb_parse_endpoint+0x1ab> + 173ff: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 17402: 80 78 01 05 cmpb $0x5,0x1(%eax) + 17406: 74 0b je 17413 <_usb_parse_endpoint+0x43> + 17408: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 1740b: 89 45 e4 mov %eax,0xffffffe4(%ebp) + 1740e: e9 68 01 00 00 jmp 1757b <_usb_parse_endpoint+0x1ab> + 17413: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 17416: 80 38 09 cmpb $0x9,(%eax) + 17419: 75 15 jne 17430 <_usb_parse_endpoint+0x60> + 1741b: 83 ec 04 sub $0x4,%esp + 1741e: 6a 09 push $0x9 + 17420: ff 75 0c pushl 0xc(%ebp) + 17423: ff 75 08 pushl 0x8(%ebp) + 17426: e8 45 26 00 00 call 19a70 <_memcpy> + 1742b: 83 c4 10 add $0x10,%esp + 1742e: eb 13 jmp 17443 <_usb_parse_endpoint+0x73> + 17430: 83 ec 04 sub $0x4,%esp + 17433: 6a 07 push $0x7 + 17435: ff 75 0c pushl 0xc(%ebp) + 17438: ff 75 08 pushl 0x8(%ebp) + 1743b: e8 30 26 00 00 call 19a70 <_memcpy> + 17440: 83 c4 10 add $0x10,%esp + 17443: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 17446: ba 00 00 00 00 mov $0x0,%edx + 1744b: 8a 10 mov (%eax),%dl + 1744d: 8d 45 0c lea 0xc(%ebp),%eax + 17450: 01 10 add %edx,(%eax) + 17452: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 17455: ba 00 00 00 00 mov $0x0,%edx + 1745a: 8a 10 mov (%eax),%dl + 1745c: 8d 45 10 lea 0x10(%ebp),%eax + 1745f: 29 10 sub %edx,(%eax) + 17461: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 17464: ba 00 00 00 00 mov $0x0,%edx + 17469: 8a 10 mov (%eax),%dl + 1746b: 8d 45 f0 lea 0xfffffff0(%ebp),%eax + 1746e: 01 10 add %edx,(%eax) + 17470: 8b 45 0c mov 0xc(%ebp),%eax + 17473: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 17476: c7 45 e8 00 00 00 00 movl $0x0,0xffffffe8(%ebp) + 1747d: 83 7d 10 01 cmpl $0x1,0x10(%ebp) + 17481: 76 72 jbe 174f5 <_usb_parse_endpoint+0x125> + 17483: 8b 45 0c mov 0xc(%ebp),%eax + 17486: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 17489: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 1748c: 80 38 01 cmpb $0x1,(%eax) + 1748f: 77 0c ja 1749d <_usb_parse_endpoint+0xcd> + 17491: c7 45 e4 ff ff ff ff movl $0xffffffff,0xffffffe4(%ebp) + 17498: e9 de 00 00 00 jmp 1757b <_usb_parse_endpoint+0x1ab> + 1749d: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 174a0: 80 78 01 05 cmpb $0x5,0x1(%eax) + 174a4: 74 4f je 174f5 <_usb_parse_endpoint+0x125> + 174a6: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 174a9: 80 78 01 04 cmpb $0x4,0x1(%eax) + 174ad: 74 46 je 174f5 <_usb_parse_endpoint+0x125> + 174af: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 174b2: 80 78 01 02 cmpb $0x2,0x1(%eax) + 174b6: 74 3d je 174f5 <_usb_parse_endpoint+0x125> + 174b8: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 174bb: 80 78 01 01 cmpb $0x1,0x1(%eax) + 174bf: 74 34 je 174f5 <_usb_parse_endpoint+0x125> + 174c1: 8d 45 e8 lea 0xffffffe8(%ebp),%eax + 174c4: ff 00 incl (%eax) + 174c6: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 174c9: ba 00 00 00 00 mov $0x0,%edx + 174ce: 8a 10 mov (%eax),%dl + 174d0: 8d 45 0c lea 0xc(%ebp),%eax + 174d3: 01 10 add %edx,(%eax) + 174d5: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 174d8: ba 00 00 00 00 mov $0x0,%edx + 174dd: 8a 10 mov (%eax),%dl + 174df: 8d 45 10 lea 0x10(%ebp),%eax + 174e2: 29 10 sub %edx,(%eax) + 174e4: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 174e7: ba 00 00 00 00 mov $0x0,%edx + 174ec: 8a 10 mov (%eax),%dl + 174ee: 8d 45 f0 lea 0xfffffff0(%ebp),%eax + 174f1: 01 10 add %edx,(%eax) + 174f3: eb 88 jmp 1747d <_usb_parse_endpoint+0xad> + 174f5: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 174f8: 8b 55 0c mov 0xc(%ebp),%edx + 174fb: 29 c2 sub %eax,%edx + 174fd: 89 d0 mov %edx,%eax + 174ff: 89 45 ec mov %eax,0xffffffec(%ebp) + 17502: 83 7d ec 00 cmpl $0x0,0xffffffec(%ebp) + 17506: 75 1c jne 17524 <_usb_parse_endpoint+0x154> + 17508: 8b 45 08 mov 0x8(%ebp),%eax + 1750b: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) + 17512: 8b 45 08 mov 0x8(%ebp),%eax + 17515: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) + 1751c: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 1751f: 89 45 e4 mov %eax,0xffffffe4(%ebp) + 17522: eb 57 jmp 1757b <_usb_parse_endpoint+0x1ab> + 17524: 8b 5d 08 mov 0x8(%ebp),%ebx + 17527: 83 ec 08 sub $0x8,%esp + 1752a: ff 75 ec pushl 0xffffffec(%ebp) + 1752d: 6a 01 push $0x1 + 1752f: e8 fc 24 00 00 call 19a30 <_ExAllocatePool@8> + 17534: 83 c4 08 add $0x8,%esp + 17537: 89 43 0c mov %eax,0xc(%ebx) + 1753a: 8b 45 08 mov 0x8(%ebp),%eax + 1753d: 83 78 0c 00 cmpl $0x0,0xc(%eax) + 17541: 75 12 jne 17555 <_usb_parse_endpoint+0x185> + 17543: 8b 45 08 mov 0x8(%ebp),%eax + 17546: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) + 1754d: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 17550: 89 45 e4 mov %eax,0xffffffe4(%ebp) + 17553: eb 26 jmp 1757b <_usb_parse_endpoint+0x1ab> + 17555: 83 ec 04 sub $0x4,%esp + 17558: ff 75 ec pushl 0xffffffec(%ebp) + 1755b: ff 75 f4 pushl 0xfffffff4(%ebp) + 1755e: 8b 45 08 mov 0x8(%ebp),%eax + 17561: ff 70 0c pushl 0xc(%eax) + 17564: e8 07 25 00 00 call 19a70 <_memcpy> + 17569: 83 c4 10 add $0x10,%esp + 1756c: 8b 55 08 mov 0x8(%ebp),%edx + 1756f: 8b 45 ec mov 0xffffffec(%ebp),%eax + 17572: 89 42 10 mov %eax,0x10(%edx) + 17575: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 17578: 89 45 e4 mov %eax,0xffffffe4(%ebp) + 1757b: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 1757e: 8b 5d fc mov 0xfffffffc(%ebp),%ebx + 17581: c9 leave + 17582: c3 ret + +00017583 <_usb_parse_interface>: + 17583: 55 push %ebp + 17584: 89 e5 mov %esp,%ebp + 17586: 53 push %ebx + 17587: 83 ec 34 sub $0x34,%esp + 1758a: c7 45 e8 00 00 00 00 movl $0x0,0xffffffe8(%ebp) + 17591: 8b 45 08 mov 0x8(%ebp),%eax + 17594: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) + 1759b: 8b 45 08 mov 0x8(%ebp),%eax + 1759e: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) + 175a5: 8b 45 08 mov 0x8(%ebp),%eax + 175a8: c7 40 0c 04 00 00 00 movl $0x4,0xc(%eax) + 175af: 83 ec 0c sub $0xc,%esp + 175b2: 8b 45 08 mov 0x8(%ebp),%eax + 175b5: 83 c0 18 add $0x18,%eax + 175b8: 50 push %eax + 175b9: e8 a2 22 00 00 call 19860 <_my_device_initialize> + 175be: 83 c4 10 add $0x10,%esp + 175c1: 8b 5d 08 mov 0x8(%ebp),%ebx + 175c4: 83 ec 08 sub $0x8,%esp + 175c7: 8b 45 08 mov 0x8(%ebp),%eax + 175ca: 8b 50 0c mov 0xc(%eax),%edx + 175cd: 89 d0 mov %edx,%eax + 175cf: 01 c0 add %eax,%eax + 175d1: 01 d0 add %edx,%eax + 175d3: c1 e0 03 shl $0x3,%eax + 175d6: 50 push %eax + 175d7: 6a 01 push $0x1 + 175d9: e8 52 24 00 00 call 19a30 <_ExAllocatePool@8> + 175de: 83 c4 08 add $0x8,%esp + 175e1: 89 03 mov %eax,(%ebx) + 175e3: 8b 45 08 mov 0x8(%ebp),%eax + 175e6: 83 38 00 cmpl $0x0,(%eax) + 175e9: 75 0c jne 175f7 <_usb_parse_interface+0x74> + 175eb: c7 45 cc ff ff ff ff movl $0xffffffff,0xffffffcc(%ebp) + 175f2: e9 85 03 00 00 jmp 1797c <_usb_parse_interface+0x3f9> + 175f7: 83 7d 10 00 cmpl $0x0,0x10(%ebp) + 175fb: 0f 8e 75 03 00 00 jle 17976 <_usb_parse_interface+0x3f3> + 17601: 8b 45 08 mov 0x8(%ebp),%eax + 17604: 8b 55 08 mov 0x8(%ebp),%edx + 17607: 8b 40 08 mov 0x8(%eax),%eax + 1760a: 3b 42 0c cmp 0xc(%edx),%eax + 1760d: 0f 82 9a 00 00 00 jb 176ad <_usb_parse_interface+0x12a> + 17613: 8b 45 08 mov 0x8(%ebp),%eax + 17616: 8b 40 0c mov 0xc(%eax),%eax + 17619: 89 45 d0 mov %eax,0xffffffd0(%ebp) + 1761c: 8b 55 08 mov 0x8(%ebp),%edx + 1761f: 8b 45 08 mov 0x8(%ebp),%eax + 17622: 8b 40 0c mov 0xc(%eax),%eax + 17625: 83 c0 04 add $0x4,%eax + 17628: 89 42 0c mov %eax,0xc(%edx) + 1762b: 8b 45 08 mov 0x8(%ebp),%eax + 1762e: 81 78 0c 80 00 00 00 cmpl $0x80,0xc(%eax) + 17635: 76 0c jbe 17643 <_usb_parse_interface+0xc0> + 17637: c7 45 cc ff ff ff ff movl $0xffffffff,0xffffffcc(%ebp) + 1763e: e9 39 03 00 00 jmp 1797c <_usb_parse_interface+0x3f9> + 17643: 83 ec 08 sub $0x8,%esp + 17646: 8b 45 08 mov 0x8(%ebp),%eax + 17649: 8b 50 0c mov 0xc(%eax),%edx + 1764c: 89 d0 mov %edx,%eax + 1764e: 01 c0 add %eax,%eax + 17650: 01 d0 add %edx,%eax + 17652: c1 e0 03 shl $0x3,%eax + 17655: 50 push %eax + 17656: 6a 01 push $0x1 + 17658: e8 d3 23 00 00 call 19a30 <_ExAllocatePool@8> + 1765d: 83 c4 08 add $0x8,%esp + 17660: 89 45 d4 mov %eax,0xffffffd4(%ebp) + 17663: 83 7d d4 00 cmpl $0x0,0xffffffd4(%ebp) + 17667: 75 0c jne 17675 <_usb_parse_interface+0xf2> + 17669: c7 45 cc ff ff ff ff movl $0xffffffff,0xffffffcc(%ebp) + 17670: e9 07 03 00 00 jmp 1797c <_usb_parse_interface+0x3f9> + 17675: 83 ec 04 sub $0x4,%esp + 17678: 8b 55 d0 mov 0xffffffd0(%ebp),%edx + 1767b: 89 d0 mov %edx,%eax + 1767d: 01 c0 add %eax,%eax + 1767f: 01 d0 add %edx,%eax + 17681: c1 e0 03 shl $0x3,%eax + 17684: 50 push %eax + 17685: 8b 45 08 mov 0x8(%ebp),%eax + 17688: ff 30 pushl (%eax) + 1768a: ff 75 d4 pushl 0xffffffd4(%ebp) + 1768d: e8 de 23 00 00 call 19a70 <_memcpy> + 17692: 83 c4 10 add $0x10,%esp + 17695: 83 ec 0c sub $0xc,%esp + 17698: 8b 45 08 mov 0x8(%ebp),%eax + 1769b: ff 30 pushl (%eax) + 1769d: e8 9e 23 00 00 call 19a40 <_ExFreePool@4> + 176a2: 83 c4 0c add $0xc,%esp + 176a5: 8b 55 08 mov 0x8(%ebp),%edx + 176a8: 8b 45 d4 mov 0xffffffd4(%ebp),%eax + 176ab: 89 02 mov %eax,(%edx) + 176ad: 8b 4d 08 mov 0x8(%ebp),%ecx + 176b0: 8b 45 08 mov 0x8(%ebp),%eax + 176b3: 8b 50 08 mov 0x8(%eax),%edx + 176b6: 89 d0 mov %edx,%eax + 176b8: 01 c0 add %eax,%eax + 176ba: 01 d0 add %edx,%eax + 176bc: c1 e0 03 shl $0x3,%eax + 176bf: 03 01 add (%ecx),%eax + 176c1: 89 45 e0 mov %eax,0xffffffe0(%ebp) + 176c4: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 176c7: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) + 176ce: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 176d1: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) + 176d8: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 176db: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax) + 176e2: 8b 45 08 mov 0x8(%ebp),%eax + 176e5: ff 40 08 incl 0x8(%eax) + 176e8: 83 ec 04 sub $0x4,%esp + 176eb: 6a 09 push $0x9 + 176ed: ff 75 0c pushl 0xc(%ebp) + 176f0: ff 75 e0 pushl 0xffffffe0(%ebp) + 176f3: e8 78 23 00 00 call 19a70 <_memcpy> + 176f8: 83 c4 10 add $0x10,%esp + 176fb: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 176fe: ba 00 00 00 00 mov $0x0,%edx + 17703: 8a 10 mov (%eax),%dl + 17705: 8d 45 0c lea 0xc(%ebp),%eax + 17708: 01 10 add %edx,(%eax) + 1770a: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 1770d: ba 00 00 00 00 mov $0x0,%edx + 17712: 8a 10 mov (%eax),%dl + 17714: 8d 45 e8 lea 0xffffffe8(%ebp),%eax + 17717: 01 10 add %edx,(%eax) + 17719: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 1771c: ba 00 00 00 00 mov $0x0,%edx + 17721: 8a 10 mov (%eax),%dl + 17723: 8d 45 10 lea 0x10(%ebp),%eax + 17726: 29 10 sub %edx,(%eax) + 17728: 8b 45 0c mov 0xc(%ebp),%eax + 1772b: 89 45 dc mov %eax,0xffffffdc(%ebp) + 1772e: c7 45 f0 00 00 00 00 movl $0x0,0xfffffff0(%ebp) + 17735: 83 7d 10 01 cmpl $0x1,0x10(%ebp) + 17739: 76 72 jbe 177ad <_usb_parse_interface+0x22a> + 1773b: 8b 45 0c mov 0xc(%ebp),%eax + 1773e: 89 45 e4 mov %eax,0xffffffe4(%ebp) + 17741: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 17744: 80 38 01 cmpb $0x1,(%eax) + 17747: 77 0c ja 17755 <_usb_parse_interface+0x1d2> + 17749: c7 45 cc ff ff ff ff movl $0xffffffff,0xffffffcc(%ebp) + 17750: e9 27 02 00 00 jmp 1797c <_usb_parse_interface+0x3f9> + 17755: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 17758: 80 78 01 04 cmpb $0x4,0x1(%eax) + 1775c: 74 4f je 177ad <_usb_parse_interface+0x22a> + 1775e: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 17761: 80 78 01 05 cmpb $0x5,0x1(%eax) + 17765: 74 46 je 177ad <_usb_parse_interface+0x22a> + 17767: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 1776a: 80 78 01 02 cmpb $0x2,0x1(%eax) + 1776e: 74 3d je 177ad <_usb_parse_interface+0x22a> + 17770: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 17773: 80 78 01 01 cmpb $0x1,0x1(%eax) + 17777: 74 34 je 177ad <_usb_parse_interface+0x22a> + 17779: 8d 45 f0 lea 0xfffffff0(%ebp),%eax + 1777c: ff 00 incl (%eax) + 1777e: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 17781: ba 00 00 00 00 mov $0x0,%edx + 17786: 8a 10 mov (%eax),%dl + 17788: 8d 45 0c lea 0xc(%ebp),%eax + 1778b: 01 10 add %edx,(%eax) + 1778d: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 17790: ba 00 00 00 00 mov $0x0,%edx + 17795: 8a 10 mov (%eax),%dl + 17797: 8d 45 e8 lea 0xffffffe8(%ebp),%eax + 1779a: 01 10 add %edx,(%eax) + 1779c: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 1779f: ba 00 00 00 00 mov $0x0,%edx + 177a4: 8a 10 mov (%eax),%dl + 177a6: 8d 45 10 lea 0x10(%ebp),%eax + 177a9: 29 10 sub %edx,(%eax) + 177ab: eb 88 jmp 17735 <_usb_parse_interface+0x1b2> + 177ad: 8b 45 dc mov 0xffffffdc(%ebp),%eax + 177b0: 8b 55 0c mov 0xc(%ebp),%edx + 177b3: 29 c2 sub %eax,%edx + 177b5: 89 d0 mov %edx,%eax + 177b7: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 177ba: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) + 177be: 74 55 je 17815 <_usb_parse_interface+0x292> + 177c0: 8b 5d e0 mov 0xffffffe0(%ebp),%ebx + 177c3: 83 ec 08 sub $0x8,%esp + 177c6: ff 75 f4 pushl 0xfffffff4(%ebp) + 177c9: 6a 01 push $0x1 + 177cb: e8 60 22 00 00 call 19a30 <_ExAllocatePool@8> + 177d0: 83 c4 08 add $0x8,%esp + 177d3: 89 43 10 mov %eax,0x10(%ebx) + 177d6: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 177d9: 83 78 10 00 cmpl $0x0,0x10(%eax) + 177dd: 75 16 jne 177f5 <_usb_parse_interface+0x272> + 177df: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 177e2: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax) + 177e9: c7 45 cc ff ff ff ff movl $0xffffffff,0xffffffcc(%ebp) + 177f0: e9 87 01 00 00 jmp 1797c <_usb_parse_interface+0x3f9> + 177f5: 83 ec 04 sub $0x4,%esp + 177f8: ff 75 f4 pushl 0xfffffff4(%ebp) + 177fb: ff 75 dc pushl 0xffffffdc(%ebp) + 177fe: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 17801: ff 70 10 pushl 0x10(%eax) + 17804: e8 67 22 00 00 call 19a70 <_memcpy> + 17809: 83 c4 10 add $0x10,%esp + 1780c: 8b 55 e0 mov 0xffffffe0(%ebp),%edx + 1780f: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 17812: 89 42 14 mov %eax,0x14(%edx) + 17815: 8b 45 0c mov 0xc(%ebp),%eax + 17818: 89 45 e4 mov %eax,0xffffffe4(%ebp) + 1781b: 83 7d 10 01 cmpl $0x1,0x10(%ebp) + 1781f: 76 1f jbe 17840 <_usb_parse_interface+0x2bd> + 17821: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 17824: 80 78 01 02 cmpb $0x2,0x1(%eax) + 17828: 74 0b je 17835 <_usb_parse_interface+0x2b2> + 1782a: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 1782d: 80 78 01 01 cmpb $0x1,0x1(%eax) + 17831: 74 02 je 17835 <_usb_parse_interface+0x2b2> + 17833: eb 0b jmp 17840 <_usb_parse_interface+0x2bd> + 17835: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 17838: 89 45 cc mov %eax,0xffffffcc(%ebp) + 1783b: e9 3c 01 00 00 jmp 1797c <_usb_parse_interface+0x3f9> + 17840: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 17843: 80 78 04 1e cmpb $0x1e,0x4(%eax) + 17847: 76 0c jbe 17855 <_usb_parse_interface+0x2d2> + 17849: c7 45 cc ff ff ff ff movl $0xffffffff,0xffffffcc(%ebp) + 17850: e9 27 01 00 00 jmp 1797c <_usb_parse_interface+0x3f9> + 17855: 8b 5d e0 mov 0xffffffe0(%ebp),%ebx + 17858: 83 ec 08 sub $0x8,%esp + 1785b: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 1785e: ba 00 00 00 00 mov $0x0,%edx + 17863: 8a 50 04 mov 0x4(%eax),%dl + 17866: 89 d0 mov %edx,%eax + 17868: c1 e0 02 shl $0x2,%eax + 1786b: 01 d0 add %edx,%eax + 1786d: c1 e0 02 shl $0x2,%eax + 17870: 50 push %eax + 17871: 6a 01 push $0x1 + 17873: e8 b8 21 00 00 call 19a30 <_ExAllocatePool@8> + 17878: 83 c4 08 add $0x8,%esp + 1787b: 89 43 0c mov %eax,0xc(%ebx) + 1787e: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 17881: 83 78 0c 00 cmpl $0x0,0xc(%eax) + 17885: 75 0c jne 17893 <_usb_parse_interface+0x310> + 17887: c7 45 cc ff ff ff ff movl $0xffffffff,0xffffffcc(%ebp) + 1788e: e9 e9 00 00 00 jmp 1797c <_usb_parse_interface+0x3f9> + 17893: 83 ec 04 sub $0x4,%esp + 17896: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 17899: ba 00 00 00 00 mov $0x0,%edx + 1789e: 8a 50 04 mov 0x4(%eax),%dl + 178a1: 89 d0 mov %edx,%eax + 178a3: c1 e0 02 shl $0x2,%eax + 178a6: 01 d0 add %edx,%eax + 178a8: c1 e0 02 shl $0x2,%eax + 178ab: 50 push %eax + 178ac: 6a 00 push $0x0 + 178ae: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 178b1: ff 70 0c pushl 0xc(%eax) + 178b4: e8 97 21 00 00 call 19a50 <_memset> + 178b9: 83 c4 10 add $0x10,%esp + 178bc: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 178c3: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 178c6: 8a 40 04 mov 0x4(%eax),%al + 178c9: 25 ff 00 00 00 and $0xff,%eax + 178ce: 3b 45 f8 cmp 0xfffffff8(%ebp),%eax + 178d1: 7e 79 jle 1794c <_usb_parse_interface+0x3c9> + 178d3: 8b 45 0c mov 0xc(%ebp),%eax + 178d6: 89 45 e4 mov %eax,0xffffffe4(%ebp) + 178d9: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 178dc: 8a 00 mov (%eax),%al + 178de: 25 ff 00 00 00 and $0xff,%eax + 178e3: 3b 45 10 cmp 0x10(%ebp),%eax + 178e6: 7e 0c jle 178f4 <_usb_parse_interface+0x371> + 178e8: c7 45 cc ff ff ff ff movl $0xffffffff,0xffffffcc(%ebp) + 178ef: e9 88 00 00 00 jmp 1797c <_usb_parse_interface+0x3f9> + 178f4: 83 ec 04 sub $0x4,%esp + 178f7: ff 75 10 pushl 0x10(%ebp) + 178fa: ff 75 0c pushl 0xc(%ebp) + 178fd: 8b 4d e0 mov 0xffffffe0(%ebp),%ecx + 17900: 8b 55 f8 mov 0xfffffff8(%ebp),%edx + 17903: 89 d0 mov %edx,%eax + 17905: c1 e0 02 shl $0x2,%eax + 17908: 01 d0 add %edx,%eax + 1790a: c1 e0 02 shl $0x2,%eax + 1790d: 03 41 0c add 0xc(%ecx),%eax + 17910: 50 push %eax + 17911: e8 ba fa ff ff call 173d0 <_usb_parse_endpoint> + 17916: 83 c4 10 add $0x10,%esp + 17919: 89 45 ec mov %eax,0xffffffec(%ebp) + 1791c: 83 7d ec 00 cmpl $0x0,0xffffffec(%ebp) + 17920: 79 08 jns 1792a <_usb_parse_interface+0x3a7> + 17922: 8b 45 ec mov 0xffffffec(%ebp),%eax + 17925: 89 45 cc mov %eax,0xffffffcc(%ebp) + 17928: eb 52 jmp 1797c <_usb_parse_interface+0x3f9> + 1792a: 8b 55 ec mov 0xffffffec(%ebp),%edx + 1792d: 8d 45 0c lea 0xc(%ebp),%eax + 17930: 01 10 add %edx,(%eax) + 17932: 8b 55 ec mov 0xffffffec(%ebp),%edx + 17935: 8d 45 e8 lea 0xffffffe8(%ebp),%eax + 17938: 01 10 add %edx,(%eax) + 1793a: 8b 55 ec mov 0xffffffec(%ebp),%edx + 1793d: 8d 45 10 lea 0x10(%ebp),%eax + 17940: 29 10 sub %edx,(%eax) + 17942: 8d 45 f8 lea 0xfffffff8(%ebp),%eax + 17945: ff 00 incl (%eax) + 17947: e9 77 ff ff ff jmp 178c3 <_usb_parse_interface+0x340> + 1794c: 8b 45 0c mov 0xc(%ebp),%eax + 1794f: 89 45 d8 mov %eax,0xffffffd8(%ebp) + 17952: 83 7d 10 08 cmpl $0x8,0x10(%ebp) + 17956: 7e 16 jle 1796e <_usb_parse_interface+0x3eb> + 17958: 8b 45 d8 mov 0xffffffd8(%ebp),%eax + 1795b: 80 78 01 04 cmpb $0x4,0x1(%eax) + 1795f: 75 0d jne 1796e <_usb_parse_interface+0x3eb> + 17961: 8b 45 d8 mov 0xffffffd8(%ebp),%eax + 17964: 80 78 03 00 cmpb $0x0,0x3(%eax) + 17968: 0f 85 89 fc ff ff jne 175f7 <_usb_parse_interface+0x74> + 1796e: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 17971: 89 45 cc mov %eax,0xffffffcc(%ebp) + 17974: eb 06 jmp 1797c <_usb_parse_interface+0x3f9> + 17976: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 17979: 89 45 cc mov %eax,0xffffffcc(%ebp) + 1797c: 8b 45 cc mov 0xffffffcc(%ebp),%eax + 1797f: 8b 5d fc mov 0xfffffffc(%ebp),%ebx + 17982: c9 leave + 17983: c3 ret + +00017984 <_usb_parse_configuration>: + 17984: 55 push %ebp + 17985: 89 e5 mov %esp,%ebp + 17987: 53 push %ebx + 17988: 83 ec 24 sub $0x24,%esp + 1798b: 83 ec 04 sub $0x4,%esp + 1798e: 6a 09 push $0x9 + 17990: ff 75 0c pushl 0xc(%ebp) + 17993: ff 75 08 pushl 0x8(%ebp) + 17996: e8 d5 20 00 00 call 19a70 <_memcpy> + 1799b: 83 c4 10 add $0x10,%esp + 1799e: 8b 45 08 mov 0x8(%ebp),%eax + 179a1: 66 8b 40 02 mov 0x2(%eax),%ax + 179a5: 25 ff ff 00 00 and $0xffff,%eax + 179aa: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 179ad: 8b 45 08 mov 0x8(%ebp),%eax + 179b0: 80 78 04 20 cmpb $0x20,0x4(%eax) + 179b4: 76 0c jbe 179c2 <_usb_parse_configuration+0x3e> + 179b6: c7 45 dc ff ff ff ff movl $0xffffffff,0xffffffdc(%ebp) + 179bd: e9 2b 02 00 00 jmp 17bed <_usb_parse_configuration+0x269> + 179c2: 8b 5d 08 mov 0x8(%ebp),%ebx + 179c5: 83 ec 08 sub $0x8,%esp + 179c8: 8b 45 08 mov 0x8(%ebp),%eax + 179cb: b9 00 00 00 00 mov $0x0,%ecx + 179d0: 8a 48 04 mov 0x4(%eax),%cl + 179d3: 89 c8 mov %ecx,%eax + 179d5: c1 e0 02 shl $0x2,%eax + 179d8: 01 c8 add %ecx,%eax + 179da: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx + 179e1: 01 d0 add %edx,%eax + 179e3: 01 c0 add %eax,%eax + 179e5: 01 c8 add %ecx,%eax + 179e7: c1 e0 02 shl $0x2,%eax + 179ea: 50 push %eax + 179eb: 6a 01 push $0x1 + 179ed: e8 3e 20 00 00 call 19a30 <_ExAllocatePool@8> + 179f2: 83 c4 08 add $0x8,%esp + 179f5: 89 43 0c mov %eax,0xc(%ebx) + 179f8: 8b 45 08 mov 0x8(%ebp),%eax + 179fb: 83 78 0c 00 cmpl $0x0,0xc(%eax) + 179ff: 75 0c jne 17a0d <_usb_parse_configuration+0x89> + 17a01: c7 45 dc ff ff ff ff movl $0xffffffff,0xffffffdc(%ebp) + 17a08: e9 e0 01 00 00 jmp 17bed <_usb_parse_configuration+0x269> + 17a0d: 83 ec 04 sub $0x4,%esp + 17a10: 8b 45 08 mov 0x8(%ebp),%eax + 17a13: b9 00 00 00 00 mov $0x0,%ecx + 17a18: 8a 48 04 mov 0x4(%eax),%cl + 17a1b: 89 c8 mov %ecx,%eax + 17a1d: c1 e0 02 shl $0x2,%eax + 17a20: 01 c8 add %ecx,%eax + 17a22: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx + 17a29: 01 d0 add %edx,%eax + 17a2b: 01 c0 add %eax,%eax + 17a2d: 01 c8 add %ecx,%eax + 17a2f: c1 e0 02 shl $0x2,%eax + 17a32: 50 push %eax + 17a33: 6a 00 push $0x0 + 17a35: 8b 45 08 mov 0x8(%ebp),%eax + 17a38: ff 70 0c pushl 0xc(%eax) + 17a3b: e8 10 20 00 00 call 19a50 <_memset> + 17a40: 83 c4 10 add $0x10,%esp + 17a43: 8b 45 08 mov 0x8(%ebp),%eax + 17a46: ba 00 00 00 00 mov $0x0,%edx + 17a4b: 8a 10 mov (%eax),%dl + 17a4d: 8d 45 0c lea 0xc(%ebp),%eax + 17a50: 01 10 add %edx,(%eax) + 17a52: 8b 45 08 mov 0x8(%ebp),%eax + 17a55: ba 00 00 00 00 mov $0x0,%edx + 17a5a: 8a 10 mov (%eax),%dl + 17a5c: 8d 45 f0 lea 0xfffffff0(%ebp),%eax + 17a5f: 29 10 sub %edx,(%eax) + 17a61: 8b 45 08 mov 0x8(%ebp),%eax + 17a64: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) + 17a6b: 8b 45 08 mov 0x8(%ebp),%eax + 17a6e: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax) + 17a75: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 17a7c: 8b 45 08 mov 0x8(%ebp),%eax + 17a7f: 8a 40 04 mov 0x4(%eax),%al + 17a82: 25 ff 00 00 00 and $0xff,%eax + 17a87: 3b 45 f8 cmp 0xfffffff8(%ebp),%eax + 17a8a: 0f 8e 57 01 00 00 jle 17be7 <_usb_parse_configuration+0x263> + 17a90: 8b 45 0c mov 0xc(%ebp),%eax + 17a93: 89 45 e0 mov %eax,0xffffffe0(%ebp) + 17a96: c7 45 e8 00 00 00 00 movl $0x0,0xffffffe8(%ebp) + 17a9d: 83 7d f0 01 cmpl $0x1,0xfffffff0(%ebp) + 17aa1: 76 74 jbe 17b17 <_usb_parse_configuration+0x193> + 17aa3: 8b 45 0c mov 0xc(%ebp),%eax + 17aa6: 89 45 ec mov %eax,0xffffffec(%ebp) + 17aa9: 8b 45 ec mov 0xffffffec(%ebp),%eax + 17aac: 8a 00 mov (%eax),%al + 17aae: 25 ff 00 00 00 and $0xff,%eax + 17ab3: 3b 45 f0 cmp 0xfffffff0(%ebp),%eax + 17ab6: 7f 0a jg 17ac2 <_usb_parse_configuration+0x13e> + 17ab8: 8b 45 ec mov 0xffffffec(%ebp),%eax + 17abb: 80 38 01 cmpb $0x1,(%eax) + 17abe: 76 02 jbe 17ac2 <_usb_parse_configuration+0x13e> + 17ac0: eb 0c jmp 17ace <_usb_parse_configuration+0x14a> + 17ac2: c7 45 dc ff ff ff ff movl $0xffffffff,0xffffffdc(%ebp) + 17ac9: e9 1f 01 00 00 jmp 17bed <_usb_parse_configuration+0x269> + 17ace: 8b 45 ec mov 0xffffffec(%ebp),%eax + 17ad1: 80 78 01 05 cmpb $0x5,0x1(%eax) + 17ad5: 74 40 je 17b17 <_usb_parse_configuration+0x193> + 17ad7: 8b 45 ec mov 0xffffffec(%ebp),%eax + 17ada: 80 78 01 04 cmpb $0x4,0x1(%eax) + 17ade: 74 37 je 17b17 <_usb_parse_configuration+0x193> + 17ae0: 8b 45 ec mov 0xffffffec(%ebp),%eax + 17ae3: 80 78 01 02 cmpb $0x2,0x1(%eax) + 17ae7: 74 2e je 17b17 <_usb_parse_configuration+0x193> + 17ae9: 8b 45 ec mov 0xffffffec(%ebp),%eax + 17aec: 80 78 01 01 cmpb $0x1,0x1(%eax) + 17af0: 74 25 je 17b17 <_usb_parse_configuration+0x193> + 17af2: 8d 45 e8 lea 0xffffffe8(%ebp),%eax + 17af5: ff 00 incl (%eax) + 17af7: 8b 45 ec mov 0xffffffec(%ebp),%eax + 17afa: ba 00 00 00 00 mov $0x0,%edx + 17aff: 8a 10 mov (%eax),%dl + 17b01: 8d 45 0c lea 0xc(%ebp),%eax + 17b04: 01 10 add %edx,(%eax) + 17b06: 8b 45 ec mov 0xffffffec(%ebp),%eax + 17b09: ba 00 00 00 00 mov $0x0,%edx + 17b0e: 8a 10 mov (%eax),%dl + 17b10: 8d 45 f0 lea 0xfffffff0(%ebp),%eax + 17b13: 29 10 sub %edx,(%eax) + 17b15: eb 86 jmp 17a9d <_usb_parse_configuration+0x119> + 17b17: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 17b1a: 8b 55 0c mov 0xc(%ebp),%edx + 17b1d: 29 c2 sub %eax,%edx + 17b1f: 89 d0 mov %edx,%eax + 17b21: 89 45 e4 mov %eax,0xffffffe4(%ebp) + 17b24: 83 7d e4 00 cmpl $0x0,0xffffffe4(%ebp) + 17b28: 74 60 je 17b8a <_usb_parse_configuration+0x206> + 17b2a: 8b 45 08 mov 0x8(%ebp),%eax + 17b2d: 83 78 14 00 cmpl $0x0,0x14(%eax) + 17b31: 74 02 je 17b35 <_usb_parse_configuration+0x1b1> + 17b33: eb 55 jmp 17b8a <_usb_parse_configuration+0x206> + 17b35: 8b 5d 08 mov 0x8(%ebp),%ebx + 17b38: 83 ec 08 sub $0x8,%esp + 17b3b: ff 75 e4 pushl 0xffffffe4(%ebp) + 17b3e: 6a 01 push $0x1 + 17b40: e8 eb 1e 00 00 call 19a30 <_ExAllocatePool@8> + 17b45: 83 c4 08 add $0x8,%esp + 17b48: 89 43 10 mov %eax,0x10(%ebx) + 17b4b: 8b 45 08 mov 0x8(%ebp),%eax + 17b4e: 83 78 10 00 cmpl $0x0,0x10(%eax) + 17b52: 75 16 jne 17b6a <_usb_parse_configuration+0x1e6> + 17b54: 8b 45 08 mov 0x8(%ebp),%eax + 17b57: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax) + 17b5e: c7 45 dc ff ff ff ff movl $0xffffffff,0xffffffdc(%ebp) + 17b65: e9 83 00 00 00 jmp 17bed <_usb_parse_configuration+0x269> + 17b6a: 83 ec 04 sub $0x4,%esp + 17b6d: ff 75 e4 pushl 0xffffffe4(%ebp) + 17b70: ff 75 e0 pushl 0xffffffe0(%ebp) + 17b73: 8b 45 08 mov 0x8(%ebp),%eax + 17b76: ff 70 10 pushl 0x10(%eax) + 17b79: e8 f2 1e 00 00 call 19a70 <_memcpy> + 17b7e: 83 c4 10 add $0x10,%esp + 17b81: 8b 55 08 mov 0x8(%ebp),%edx + 17b84: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 17b87: 89 42 14 mov %eax,0x14(%edx) + 17b8a: 83 ec 04 sub $0x4,%esp + 17b8d: ff 75 f0 pushl 0xfffffff0(%ebp) + 17b90: ff 75 0c pushl 0xc(%ebp) + 17b93: 8b 5d 08 mov 0x8(%ebp),%ebx + 17b96: 8b 4d f8 mov 0xfffffff8(%ebp),%ecx + 17b99: 89 c8 mov %ecx,%eax + 17b9b: c1 e0 02 shl $0x2,%eax + 17b9e: 01 c8 add %ecx,%eax + 17ba0: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx + 17ba7: 01 d0 add %edx,%eax + 17ba9: 01 c0 add %eax,%eax + 17bab: 01 c8 add %ecx,%eax + 17bad: c1 e0 02 shl $0x2,%eax + 17bb0: 03 43 0c add 0xc(%ebx),%eax + 17bb3: 50 push %eax + 17bb4: e8 ca f9 ff ff call 17583 <_usb_parse_interface> + 17bb9: 83 c4 10 add $0x10,%esp + 17bbc: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 17bbf: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) + 17bc3: 79 08 jns 17bcd <_usb_parse_configuration+0x249> + 17bc5: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 17bc8: 89 45 dc mov %eax,0xffffffdc(%ebp) + 17bcb: eb 20 jmp 17bed <_usb_parse_configuration+0x269> + 17bcd: 8b 55 f4 mov 0xfffffff4(%ebp),%edx + 17bd0: 8d 45 0c lea 0xc(%ebp),%eax + 17bd3: 01 10 add %edx,(%eax) + 17bd5: 8b 55 f4 mov 0xfffffff4(%ebp),%edx + 17bd8: 8d 45 f0 lea 0xfffffff0(%ebp),%eax + 17bdb: 29 10 sub %edx,(%eax) + 17bdd: 8d 45 f8 lea 0xfffffff8(%ebp),%eax + 17be0: ff 00 incl (%eax) + 17be2: e9 95 fe ff ff jmp 17a7c <_usb_parse_configuration+0xf8> + 17be7: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 17bea: 89 45 dc mov %eax,0xffffffdc(%ebp) + 17bed: 8b 45 dc mov 0xffffffdc(%ebp),%eax + 17bf0: 8b 5d fc mov 0xfffffffc(%ebp),%ebx + 17bf3: c9 leave + 17bf4: c3 ret + +00017bf5 <_usb_destroy_configuration>: + 17bf5: 55 push %ebp + 17bf6: 89 e5 mov %esp,%ebp + 17bf8: 53 push %ebx + 17bf9: 83 ec 24 sub $0x24,%esp + 17bfc: 8b 45 08 mov 0x8(%ebp),%eax + 17bff: 83 b8 84 01 00 00 00 cmpl $0x0,0x184(%eax) + 17c06: 75 05 jne 17c0d <_usb_destroy_configuration+0x18> + 17c08: e9 06 02 00 00 jmp 17e13 <_usb_destroy_configuration+0x21e> + 17c0d: 8b 45 08 mov 0x8(%ebp),%eax + 17c10: 83 b8 8c 01 00 00 00 cmpl $0x0,0x18c(%eax) + 17c17: 74 56 je 17c6f <_usb_destroy_configuration+0x7a> + 17c19: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) + 17c20: 8b 45 08 mov 0x8(%ebp),%eax + 17c23: 8a 80 81 01 00 00 mov 0x181(%eax),%al + 17c29: 25 ff 00 00 00 and $0xff,%eax + 17c2e: 3b 45 f4 cmp 0xfffffff4(%ebp),%eax + 17c31: 7e 28 jle 17c5b <_usb_destroy_configuration+0x66> + 17c33: 83 ec 0c sub $0xc,%esp + 17c36: 8b 4d 08 mov 0x8(%ebp),%ecx + 17c39: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 17c3c: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx + 17c43: 8b 81 8c 01 00 00 mov 0x18c(%ecx),%eax + 17c49: ff 34 02 pushl (%edx,%eax,1) + 17c4c: e8 ef 1d 00 00 call 19a40 <_ExFreePool@4> + 17c51: 83 c4 0c add $0xc,%esp + 17c54: 8d 45 f4 lea 0xfffffff4(%ebp),%eax + 17c57: ff 00 incl (%eax) + 17c59: eb c5 jmp 17c20 <_usb_destroy_configuration+0x2b> + 17c5b: 83 ec 0c sub $0xc,%esp + 17c5e: 8b 45 08 mov 0x8(%ebp),%eax + 17c61: ff b0 8c 01 00 00 pushl 0x18c(%eax) + 17c67: e8 d4 1d 00 00 call 19a40 <_ExFreePool@4> + 17c6c: 83 c4 0c add $0xc,%esp + 17c6f: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 17c76: 8b 45 08 mov 0x8(%ebp),%eax + 17c79: 8a 80 81 01 00 00 mov 0x181(%eax),%al + 17c7f: 25 ff 00 00 00 and $0xff,%eax + 17c84: 3b 45 f8 cmp 0xfffffff8(%ebp),%eax + 17c87: 0f 8e 72 01 00 00 jle 17dff <_usb_destroy_configuration+0x20a> + 17c8d: 8b 4d 08 mov 0x8(%ebp),%ecx + 17c90: 8b 55 f8 mov 0xfffffff8(%ebp),%edx + 17c93: 89 d0 mov %edx,%eax + 17c95: 01 c0 add %eax,%eax + 17c97: 01 d0 add %edx,%eax + 17c99: c1 e0 03 shl $0x3,%eax + 17c9c: 03 81 84 01 00 00 add 0x184(%ecx),%eax + 17ca2: 89 45 e8 mov %eax,0xffffffe8(%ebp) + 17ca5: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 17ca8: 83 78 0c 00 cmpl $0x0,0xc(%eax) + 17cac: 75 05 jne 17cb3 <_usb_destroy_configuration+0xbe> + 17cae: e9 4c 01 00 00 jmp 17dff <_usb_destroy_configuration+0x20a> + 17cb3: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) + 17cba: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 17cbd: 8a 40 04 mov 0x4(%eax),%al + 17cc0: 25 ff 00 00 00 and $0xff,%eax + 17cc5: 3b 45 f4 cmp 0xfffffff4(%ebp),%eax + 17cc8: 0f 8e 16 01 00 00 jle 17de4 <_usb_destroy_configuration+0x1ef> + 17cce: 8b 5d e8 mov 0xffffffe8(%ebp),%ebx + 17cd1: 8b 4d f4 mov 0xfffffff4(%ebp),%ecx + 17cd4: 89 c8 mov %ecx,%eax + 17cd6: c1 e0 02 shl $0x2,%eax + 17cd9: 01 c8 add %ecx,%eax + 17cdb: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx + 17ce2: 01 d0 add %edx,%eax + 17ce4: 01 c0 add %eax,%eax + 17ce6: 01 c8 add %ecx,%eax + 17ce8: c1 e0 02 shl $0x2,%eax + 17ceb: 03 43 0c add 0xc(%ebx),%eax + 17cee: 89 45 e4 mov %eax,0xffffffe4(%ebp) + 17cf1: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 17cf4: 83 38 00 cmpl $0x0,(%eax) + 17cf7: 75 05 jne 17cfe <_usb_destroy_configuration+0x109> + 17cf9: e9 e6 00 00 00 jmp 17de4 <_usb_destroy_configuration+0x1ef> + 17cfe: c7 45 f0 00 00 00 00 movl $0x0,0xfffffff0(%ebp) + 17d05: 8b 55 e4 mov 0xffffffe4(%ebp),%edx + 17d08: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 17d0b: 3b 42 08 cmp 0x8(%edx),%eax + 17d0e: 0f 83 b6 00 00 00 jae 17dca <_usb_destroy_configuration+0x1d5> + 17d14: 8b 4d e4 mov 0xffffffe4(%ebp),%ecx + 17d17: 8b 55 f0 mov 0xfffffff0(%ebp),%edx + 17d1a: 89 d0 mov %edx,%eax + 17d1c: 01 c0 add %eax,%eax + 17d1e: 01 d0 add %edx,%eax + 17d20: c1 e0 03 shl $0x3,%eax + 17d23: 03 01 add (%ecx),%eax + 17d25: 89 45 e0 mov %eax,0xffffffe0(%ebp) + 17d28: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 17d2b: 83 78 10 00 cmpl $0x0,0x10(%eax) + 17d2f: 74 11 je 17d42 <_usb_destroy_configuration+0x14d> + 17d31: 83 ec 0c sub $0xc,%esp + 17d34: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 17d37: ff 70 10 pushl 0x10(%eax) + 17d3a: e8 01 1d 00 00 call 19a40 <_ExFreePool@4> + 17d3f: 83 c4 0c add $0xc,%esp + 17d42: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 17d45: 83 78 0c 00 cmpl $0x0,0xc(%eax) + 17d49: 75 02 jne 17d4d <_usb_destroy_configuration+0x158> + 17d4b: eb 7d jmp 17dca <_usb_destroy_configuration+0x1d5> + 17d4d: c7 45 ec 00 00 00 00 movl $0x0,0xffffffec(%ebp) + 17d54: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 17d57: 8a 40 04 mov 0x4(%eax),%al + 17d5a: 25 ff 00 00 00 and $0xff,%eax + 17d5f: 3b 45 ec cmp 0xffffffec(%ebp),%eax + 17d62: 7e 4b jle 17daf <_usb_destroy_configuration+0x1ba> + 17d64: 8b 4d e0 mov 0xffffffe0(%ebp),%ecx + 17d67: 8b 55 ec mov 0xffffffec(%ebp),%edx + 17d6a: 89 d0 mov %edx,%eax + 17d6c: c1 e0 02 shl $0x2,%eax + 17d6f: 01 d0 add %edx,%eax + 17d71: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx + 17d78: 8b 41 0c mov 0xc(%ecx),%eax + 17d7b: 83 7c 02 0c 00 cmpl $0x0,0xc(%edx,%eax,1) + 17d80: 74 26 je 17da8 <_usb_destroy_configuration+0x1b3> + 17d82: 83 ec 0c sub $0xc,%esp + 17d85: 8b 4d e0 mov 0xffffffe0(%ebp),%ecx + 17d88: 8b 55 ec mov 0xffffffec(%ebp),%edx + 17d8b: 89 d0 mov %edx,%eax + 17d8d: c1 e0 02 shl $0x2,%eax + 17d90: 01 d0 add %edx,%eax + 17d92: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx + 17d99: 8b 41 0c mov 0xc(%ecx),%eax + 17d9c: ff 74 02 0c pushl 0xc(%edx,%eax,1) + 17da0: e8 9b 1c 00 00 call 19a40 <_ExFreePool@4> + 17da5: 83 c4 0c add $0xc,%esp + 17da8: 8d 45 ec lea 0xffffffec(%ebp),%eax + 17dab: ff 00 incl (%eax) + 17dad: eb a5 jmp 17d54 <_usb_destroy_configuration+0x15f> + 17daf: 83 ec 0c sub $0xc,%esp + 17db2: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 17db5: ff 70 0c pushl 0xc(%eax) + 17db8: e8 83 1c 00 00 call 19a40 <_ExFreePool@4> + 17dbd: 83 c4 0c add $0xc,%esp + 17dc0: 8d 45 f0 lea 0xfffffff0(%ebp),%eax + 17dc3: ff 00 incl (%eax) + 17dc5: e9 3b ff ff ff jmp 17d05 <_usb_destroy_configuration+0x110> + 17dca: 83 ec 0c sub $0xc,%esp + 17dcd: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 17dd0: ff 30 pushl (%eax) + 17dd2: e8 69 1c 00 00 call 19a40 <_ExFreePool@4> + 17dd7: 83 c4 0c add $0xc,%esp + 17dda: 8d 45 f4 lea 0xfffffff4(%ebp),%eax + 17ddd: ff 00 incl (%eax) + 17ddf: e9 d6 fe ff ff jmp 17cba <_usb_destroy_configuration+0xc5> + 17de4: 83 ec 0c sub $0xc,%esp + 17de7: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 17dea: ff 70 0c pushl 0xc(%eax) + 17ded: e8 4e 1c 00 00 call 19a40 <_ExFreePool@4> + 17df2: 83 c4 0c add $0xc,%esp + 17df5: 8d 45 f8 lea 0xfffffff8(%ebp),%eax + 17df8: ff 00 incl (%eax) + 17dfa: e9 77 fe ff ff jmp 17c76 <_usb_destroy_configuration+0x81> + 17dff: 83 ec 0c sub $0xc,%esp + 17e02: 8b 45 08 mov 0x8(%ebp),%eax + 17e05: ff b0 84 01 00 00 pushl 0x184(%eax) + 17e0b: e8 30 1c 00 00 call 19a40 <_ExFreePool@4> + 17e10: 83 c4 0c add $0xc,%esp + 17e13: 8b 5d fc mov 0xfffffffc(%ebp),%ebx + 17e16: c9 leave + 17e17: c3 ret + +00017e18 <_usb_get_configuration>: + 17e18: 55 push %ebp + 17e19: 89 e5 mov %esp,%ebp + 17e1b: 53 push %ebx + 17e1c: 83 ec 24 sub $0x24,%esp + 17e1f: 8b 45 08 mov 0x8(%ebp),%eax + 17e22: 80 b8 81 01 00 00 08 cmpb $0x8,0x181(%eax) + 17e29: 76 0c jbe 17e37 <_usb_get_configuration+0x1f> + 17e2b: c7 45 e0 ea ff ff ff movl $0xffffffea,0xffffffe0(%ebp) + 17e32: e9 78 02 00 00 jmp 180af <_usb_get_configuration+0x297> + 17e37: 8b 45 08 mov 0x8(%ebp),%eax + 17e3a: 80 b8 81 01 00 00 00 cmpb $0x0,0x181(%eax) + 17e41: 75 0c jne 17e4f <_usb_get_configuration+0x37> + 17e43: c7 45 e0 ea ff ff ff movl $0xffffffea,0xffffffe0(%ebp) + 17e4a: e9 60 02 00 00 jmp 180af <_usb_get_configuration+0x297> + 17e4f: 8b 5d 08 mov 0x8(%ebp),%ebx + 17e52: 83 ec 08 sub $0x8,%esp + 17e55: 8b 45 08 mov 0x8(%ebp),%eax + 17e58: ba 00 00 00 00 mov $0x0,%edx + 17e5d: 8a 90 81 01 00 00 mov 0x181(%eax),%dl + 17e63: 89 d0 mov %edx,%eax + 17e65: 01 c0 add %eax,%eax + 17e67: 01 d0 add %edx,%eax + 17e69: c1 e0 03 shl $0x3,%eax + 17e6c: 50 push %eax + 17e6d: 6a 01 push $0x1 + 17e6f: e8 bc 1b 00 00 call 19a30 <_ExAllocatePool@8> + 17e74: 83 c4 08 add $0x8,%esp + 17e77: 89 83 84 01 00 00 mov %eax,0x184(%ebx) + 17e7d: 8b 45 08 mov 0x8(%ebp),%eax + 17e80: 83 b8 84 01 00 00 00 cmpl $0x0,0x184(%eax) + 17e87: 75 0c jne 17e95 <_usb_get_configuration+0x7d> + 17e89: c7 45 e0 f4 ff ff ff movl $0xfffffff4,0xffffffe0(%ebp) + 17e90: e9 1a 02 00 00 jmp 180af <_usb_get_configuration+0x297> + 17e95: 83 ec 04 sub $0x4,%esp + 17e98: 8b 45 08 mov 0x8(%ebp),%eax + 17e9b: ba 00 00 00 00 mov $0x0,%edx + 17ea0: 8a 90 81 01 00 00 mov 0x181(%eax),%dl + 17ea6: 89 d0 mov %edx,%eax + 17ea8: 01 c0 add %eax,%eax + 17eaa: 01 d0 add %edx,%eax + 17eac: c1 e0 03 shl $0x3,%eax + 17eaf: 50 push %eax + 17eb0: 6a 00 push $0x0 + 17eb2: 8b 45 08 mov 0x8(%ebp),%eax + 17eb5: ff b0 84 01 00 00 pushl 0x184(%eax) + 17ebb: e8 90 1b 00 00 call 19a50 <_memset> + 17ec0: 83 c4 10 add $0x10,%esp + 17ec3: 8b 5d 08 mov 0x8(%ebp),%ebx + 17ec6: 83 ec 08 sub $0x8,%esp + 17ec9: 8b 45 08 mov 0x8(%ebp),%eax + 17ecc: 8a 80 81 01 00 00 mov 0x181(%eax),%al + 17ed2: 25 ff 00 00 00 and $0xff,%eax + 17ed7: c1 e0 02 shl $0x2,%eax + 17eda: 50 push %eax + 17edb: 6a 01 push $0x1 + 17edd: e8 4e 1b 00 00 call 19a30 <_ExAllocatePool@8> + 17ee2: 83 c4 08 add $0x8,%esp + 17ee5: 89 83 8c 01 00 00 mov %eax,0x18c(%ebx) + 17eeb: 8b 45 08 mov 0x8(%ebp),%eax + 17eee: 83 b8 8c 01 00 00 00 cmpl $0x0,0x18c(%eax) + 17ef5: 75 0c jne 17f03 <_usb_get_configuration+0xeb> + 17ef7: c7 45 e0 f4 ff ff ff movl $0xfffffff4,0xffffffe0(%ebp) + 17efe: e9 ac 01 00 00 jmp 180af <_usb_get_configuration+0x297> + 17f03: 83 ec 08 sub $0x8,%esp + 17f06: 6a 08 push $0x8 + 17f08: 6a 01 push $0x1 + 17f0a: e8 21 1b 00 00 call 19a30 <_ExAllocatePool@8> + 17f0f: 83 c4 08 add $0x8,%esp + 17f12: 89 45 ec mov %eax,0xffffffec(%ebp) + 17f15: 83 7d ec 00 cmpl $0x0,0xffffffec(%ebp) + 17f19: 75 0c jne 17f27 <_usb_get_configuration+0x10f> + 17f1b: c7 45 e0 f4 ff ff ff movl $0xfffffff4,0xffffffe0(%ebp) + 17f22: e9 88 01 00 00 jmp 180af <_usb_get_configuration+0x297> + 17f27: 8b 45 ec mov 0xffffffec(%ebp),%eax + 17f2a: 89 45 e4 mov %eax,0xffffffe4(%ebp) + 17f2d: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) + 17f34: 8b 45 08 mov 0x8(%ebp),%eax + 17f37: 8a 80 81 01 00 00 mov 0x181(%eax),%al + 17f3d: 25 ff 00 00 00 and $0xff,%eax + 17f42: 3b 45 f4 cmp 0xfffffff4(%ebp),%eax + 17f45: 0f 86 2d 01 00 00 jbe 18078 <_usb_get_configuration+0x260> + 17f4b: 83 ec 0c sub $0xc,%esp + 17f4e: 6a 08 push $0x8 + 17f50: ff 75 ec pushl 0xffffffec(%ebp) + 17f53: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 17f56: 25 ff 00 00 00 and $0xff,%eax + 17f5b: 50 push %eax + 17f5c: 6a 02 push $0x2 + 17f5e: ff 75 08 pushl 0x8(%ebp) + 17f61: e8 f6 93 ff ff call 1135c <_usb_get_descriptor> + 17f66: 83 c4 20 add $0x20,%esp + 17f69: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 17f6c: 83 7d f8 07 cmpl $0x7,0xfffffff8(%ebp) + 17f70: 7f 17 jg 17f89 <_usb_get_configuration+0x171> + 17f72: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) + 17f76: 79 05 jns 17f7d <_usb_get_configuration+0x165> + 17f78: e9 12 01 00 00 jmp 1808f <_usb_get_configuration+0x277> + 17f7d: c7 45 f8 ea ff ff ff movl $0xffffffea,0xfffffff8(%ebp) + 17f84: e9 06 01 00 00 jmp 1808f <_usb_get_configuration+0x277> + 17f89: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 17f8c: 66 8b 40 02 mov 0x2(%eax),%ax + 17f90: 25 ff ff 00 00 and $0xffff,%eax + 17f95: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 17f98: 83 ec 08 sub $0x8,%esp + 17f9b: ff 75 f0 pushl 0xfffffff0(%ebp) + 17f9e: 6a 01 push $0x1 + 17fa0: e8 8b 1a 00 00 call 19a30 <_ExAllocatePool@8> + 17fa5: 83 c4 08 add $0x8,%esp + 17fa8: 89 45 e8 mov %eax,0xffffffe8(%ebp) + 17fab: 83 7d e8 00 cmpl $0x0,0xffffffe8(%ebp) + 17faf: 75 0c jne 17fbd <_usb_get_configuration+0x1a5> + 17fb1: c7 45 f8 f4 ff ff ff movl $0xfffffff4,0xfffffff8(%ebp) + 17fb8: e9 d2 00 00 00 jmp 1808f <_usb_get_configuration+0x277> + 17fbd: 83 ec 0c sub $0xc,%esp + 17fc0: ff 75 f0 pushl 0xfffffff0(%ebp) + 17fc3: ff 75 e8 pushl 0xffffffe8(%ebp) + 17fc6: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 17fc9: 25 ff 00 00 00 and $0xff,%eax + 17fce: 50 push %eax + 17fcf: 6a 02 push $0x2 + 17fd1: ff 75 08 pushl 0x8(%ebp) + 17fd4: e8 83 93 ff ff call 1135c <_usb_get_descriptor> + 17fd9: 83 c4 20 add $0x20,%esp + 17fdc: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 17fdf: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) + 17fe3: 79 13 jns 17ff8 <_usb_get_configuration+0x1e0> + 17fe5: 83 ec 0c sub $0xc,%esp + 17fe8: ff 75 e8 pushl 0xffffffe8(%ebp) + 17feb: e8 50 1a 00 00 call 19a40 <_ExFreePool@4> + 17ff0: 83 c4 0c add $0xc,%esp + 17ff3: e9 97 00 00 00 jmp 1808f <_usb_get_configuration+0x277> + 17ff8: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 17ffb: 3b 45 f0 cmp 0xfffffff0(%ebp),%eax + 17ffe: 73 17 jae 18017 <_usb_get_configuration+0x1ff> + 18000: c7 45 f8 ea ff ff ff movl $0xffffffea,0xfffffff8(%ebp) + 18007: 83 ec 0c sub $0xc,%esp + 1800a: ff 75 e8 pushl 0xffffffe8(%ebp) + 1800d: e8 2e 1a 00 00 call 19a40 <_ExFreePool@4> + 18012: 83 c4 0c add $0xc,%esp + 18015: eb 78 jmp 1808f <_usb_get_configuration+0x277> + 18017: 8b 55 08 mov 0x8(%ebp),%edx + 1801a: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 1801d: 8d 0c 85 00 00 00 00 lea 0x0(,%eax,4),%ecx + 18024: 8b 92 8c 01 00 00 mov 0x18c(%edx),%edx + 1802a: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 1802d: 89 04 11 mov %eax,(%ecx,%edx,1) + 18030: 83 ec 08 sub $0x8,%esp + 18033: ff 75 e8 pushl 0xffffffe8(%ebp) + 18036: 8b 4d 08 mov 0x8(%ebp),%ecx + 18039: 8b 55 f4 mov 0xfffffff4(%ebp),%edx + 1803c: 89 d0 mov %edx,%eax + 1803e: 01 c0 add %eax,%eax + 18040: 01 d0 add %edx,%eax + 18042: c1 e0 03 shl $0x3,%eax + 18045: 03 81 84 01 00 00 add 0x184(%ecx),%eax + 1804b: 50 push %eax + 1804c: e8 33 f9 ff ff call 17984 <_usb_parse_configuration> + 18051: 83 c4 10 add $0x10,%esp + 18054: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 18057: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) + 1805b: 7e 02 jle 1805f <_usb_get_configuration+0x247> + 1805d: eb 0f jmp 1806e <_usb_get_configuration+0x256> + 1805f: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) + 18063: 79 09 jns 1806e <_usb_get_configuration+0x256> + 18065: c7 45 f8 ea ff ff ff movl $0xffffffea,0xfffffff8(%ebp) + 1806c: eb 21 jmp 1808f <_usb_get_configuration+0x277> + 1806e: 8d 45 f4 lea 0xfffffff4(%ebp),%eax + 18071: ff 00 incl (%eax) + 18073: e9 bc fe ff ff jmp 17f34 <_usb_get_configuration+0x11c> + 18078: 83 ec 0c sub $0xc,%esp + 1807b: ff 75 ec pushl 0xffffffec(%ebp) + 1807e: e8 bd 19 00 00 call 19a40 <_ExFreePool@4> + 18083: 83 c4 0c add $0xc,%esp + 18086: c7 45 e0 00 00 00 00 movl $0x0,0xffffffe0(%ebp) + 1808d: eb 20 jmp 180af <_usb_get_configuration+0x297> + 1808f: 83 ec 0c sub $0xc,%esp + 18092: ff 75 ec pushl 0xffffffec(%ebp) + 18095: e8 a6 19 00 00 call 19a40 <_ExFreePool@4> + 1809a: 83 c4 0c add $0xc,%esp + 1809d: 8b 45 08 mov 0x8(%ebp),%eax + 180a0: 8b 55 f4 mov 0xfffffff4(%ebp),%edx + 180a3: 88 90 81 01 00 00 mov %dl,0x181(%eax) + 180a9: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 180ac: 89 45 e0 mov %eax,0xffffffe0(%ebp) + 180af: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 180b2: 8b 5d fc mov 0xfffffffc(%ebp),%ebx + 180b5: c9 leave + 180b6: c3 ret + 180b7: 90 nop + 180b8: 90 nop + 180b9: 90 nop + 180ba: 90 nop + 180bb: 90 nop + 180bc: 90 nop + 180bd: 90 nop + 180be: 90 nop + 180bf: 90 nop + +000180c0 <_usb_init_urb@4>: + 180c0: 55 push %ebp + 180c1: 89 e5 mov %esp,%ebp + 180c3: 83 ec 08 sub $0x8,%esp + 180c6: 83 7d 08 00 cmpl $0x0,0x8(%ebp) + 180ca: 74 1c je 180e8 <_usb_init_urb@4+0x28> + 180cc: 83 ec 04 sub $0x4,%esp + 180cf: 6a 5c push $0x5c + 180d1: 6a 00 push $0x0 + 180d3: ff 75 08 pushl 0x8(%ebp) + 180d6: e8 75 19 00 00 call 19a50 <_memset> + 180db: 83 c4 10 add $0x10,%esp + 180de: 8b 45 08 mov 0x8(%ebp),%eax + 180e1: c7 40 04 01 00 00 00 movl $0x1,0x4(%eax) + 180e8: c9 leave + 180e9: c2 04 00 ret $0x4 + +000180ec <_usb_alloc_urb@8>: + 180ec: 55 push %ebp + 180ed: 89 e5 mov %esp,%ebp + 180ef: 83 ec 08 sub $0x8,%esp + 180f2: 83 ec 08 sub $0x8,%esp + 180f5: 8b 45 08 mov 0x8(%ebp),%eax + 180f8: c1 e0 04 shl $0x4,%eax + 180fb: 83 c0 5c add $0x5c,%eax + 180fe: 50 push %eax + 180ff: 6a 01 push $0x1 + 18101: e8 2a 19 00 00 call 19a30 <_ExAllocatePool@8> + 18106: 83 c4 08 add $0x8,%esp + 18109: 89 45 fc mov %eax,0xfffffffc(%ebp) + 1810c: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) + 18110: 75 09 jne 1811b <_usb_alloc_urb@8+0x2f> + 18112: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 18119: eb 14 jmp 1812f <_usb_alloc_urb@8+0x43> + 1811b: 83 ec 0c sub $0xc,%esp + 1811e: ff 75 fc pushl 0xfffffffc(%ebp) + 18121: e8 9a ff ff ff call 180c0 <_usb_init_urb@4> + 18126: 83 c4 0c add $0xc,%esp + 18129: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 1812c: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 1812f: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 18132: c9 leave + 18133: c2 08 00 ret $0x8 + +00018136 <_usb_free_urb@4>: + 18136: 55 push %ebp + 18137: 89 e5 mov %esp,%ebp + 18139: 83 ec 08 sub $0x8,%esp + 1813c: 83 7d 08 00 cmpl $0x0,0x8(%ebp) + 18140: 74 2a je 1816c <_usb_free_urb@4+0x36> + 18142: 8b 55 08 mov 0x8(%ebp),%edx + 18145: 83 c2 04 add $0x4,%edx + 18148: 8b 45 08 mov 0x8(%ebp),%eax + 1814b: 83 c0 04 add $0x4,%eax + 1814e: 8b 00 mov (%eax),%eax + 18150: 48 dec %eax + 18151: 89 02 mov %eax,(%edx) + 18153: 8b 45 08 mov 0x8(%ebp),%eax + 18156: 83 c0 04 add $0x4,%eax + 18159: 83 38 00 cmpl $0x0,(%eax) + 1815c: 75 0e jne 1816c <_usb_free_urb@4+0x36> + 1815e: 83 ec 0c sub $0xc,%esp + 18161: ff 75 08 pushl 0x8(%ebp) + 18164: e8 d7 18 00 00 call 19a40 <_ExFreePool@4> + 18169: 83 c4 0c add $0xc,%esp + 1816c: c9 leave + 1816d: c2 04 00 ret $0x4 + +00018170 <_usb_get_urb@4>: + 18170: 55 push %ebp + 18171: 89 e5 mov %esp,%ebp + 18173: 83 ec 04 sub $0x4,%esp + 18176: 83 7d 08 00 cmpl $0x0,0x8(%ebp) + 1817a: 74 19 je 18195 <_usb_get_urb@4+0x25> + 1817c: 8b 55 08 mov 0x8(%ebp),%edx + 1817f: 83 c2 04 add $0x4,%edx + 18182: 8b 45 08 mov 0x8(%ebp),%eax + 18185: 83 c0 04 add $0x4,%eax + 18188: 8b 00 mov (%eax),%eax + 1818a: 40 inc %eax + 1818b: 89 02 mov %eax,(%edx) + 1818d: 8b 45 08 mov 0x8(%ebp),%eax + 18190: 89 45 fc mov %eax,0xfffffffc(%ebp) + 18193: eb 07 jmp 1819c <_usb_get_urb@4+0x2c> + 18195: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) + 1819c: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 1819f: c9 leave + 181a0: c2 04 00 ret $0x4 + +000181a3 <_usb_submit_urb@8>: + 181a3: 55 push %ebp + 181a4: 89 e5 mov %esp,%ebp + 181a6: 53 push %ebx + 181a7: 83 ec 34 sub $0x34,%esp + 181aa: 83 7d 08 00 cmpl $0x0,0x8(%ebp) + 181ae: 74 12 je 181c2 <_usb_submit_urb@8+0x1f> + 181b0: 8b 45 08 mov 0x8(%ebp),%eax + 181b3: 83 78 08 00 cmpl $0x0,0x8(%eax) + 181b7: 75 09 jne 181c2 <_usb_submit_urb@8+0x1f> + 181b9: 8b 45 08 mov 0x8(%ebp),%eax + 181bc: 83 78 58 00 cmpl $0x0,0x58(%eax) + 181c0: 75 0c jne 181ce <_usb_submit_urb@8+0x2b> + 181c2: c7 45 d4 ea ff ff ff movl $0xffffffea,0xffffffd4(%ebp) + 181c9: e9 e2 02 00 00 jmp 184b0 <_usb_submit_urb@8+0x30d> + 181ce: 8b 45 08 mov 0x8(%ebp),%eax + 181d1: 8b 40 14 mov 0x14(%eax),%eax + 181d4: 89 45 ec mov %eax,0xffffffec(%ebp) + 181d7: 85 c0 test %eax,%eax + 181d9: 74 1f je 181fa <_usb_submit_urb@8+0x57> + 181db: 8b 45 ec mov 0xffffffec(%ebp),%eax + 181de: 83 78 14 02 cmpl $0x2,0x14(%eax) + 181e2: 76 16 jbe 181fa <_usb_submit_urb@8+0x57> + 181e4: 8b 45 ec mov 0xffffffec(%ebp),%eax + 181e7: 83 b8 bc 00 00 00 00 cmpl $0x0,0xbc(%eax) + 181ee: 74 0a je 181fa <_usb_submit_urb@8+0x57> + 181f0: 8b 45 ec mov 0xffffffec(%ebp),%eax + 181f3: 83 38 00 cmpl $0x0,(%eax) + 181f6: 7e 02 jle 181fa <_usb_submit_urb@8+0x57> + 181f8: eb 0c jmp 18206 <_usb_submit_urb@8+0x63> + 181fa: c7 45 d4 ed ff ff ff movl $0xffffffed,0xffffffd4(%ebp) + 18201: e9 aa 02 00 00 jmp 184b0 <_usb_submit_urb@8+0x30d> + 18206: 8b 45 ec mov 0xffffffec(%ebp),%eax + 18209: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 1820f: 8b 40 20 mov 0x20(%eax),%eax + 18212: 89 45 e8 mov %eax,0xffffffe8(%ebp) + 18215: 85 c0 test %eax,%eax + 18217: 74 09 je 18222 <_usb_submit_urb@8+0x7f> + 18219: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 1821c: 83 78 0c 00 cmpl $0x0,0xc(%eax) + 18220: 75 0c jne 1822e <_usb_submit_urb@8+0x8b> + 18222: c7 45 d4 ed ff ff ff movl $0xffffffed,0xffffffd4(%ebp) + 18229: e9 82 02 00 00 jmp 184b0 <_usb_submit_urb@8+0x30d> + 1822e: 8b 45 08 mov 0x8(%ebp),%eax + 18231: c7 40 1c 8d ff ff ff movl $0xffffff8d,0x1c(%eax) + 18238: 8b 45 08 mov 0x8(%ebp),%eax + 1823b: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) + 18242: 8b 45 08 mov 0x8(%ebp),%eax + 18245: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) + 1824c: 8b 45 08 mov 0x8(%ebp),%eax + 1824f: 8b 40 18 mov 0x18(%eax),%eax + 18252: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 18255: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 18258: c1 f8 1e sar $0x1e,%eax + 1825b: 83 e0 03 and $0x3,%eax + 1825e: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 18261: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 18264: c1 e8 07 shr $0x7,%eax + 18267: 83 f0 01 xor $0x1,%eax + 1826a: 83 e0 01 and $0x1,%eax + 1826d: 89 45 e4 mov %eax,0xffffffe4(%ebp) + 18270: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 18273: c1 f8 1e sar $0x1e,%eax + 18276: 83 e0 03 and $0x3,%eax + 18279: 83 f8 02 cmp $0x2,%eax + 1827c: 74 15 je 18293 <_usb_submit_urb@8+0xf0> + 1827e: 8b 45 ec mov 0xffffffec(%ebp),%eax + 18281: 83 78 14 04 cmpl $0x4,0x14(%eax) + 18285: 77 0c ja 18293 <_usb_submit_urb@8+0xf0> + 18287: c7 45 d4 ed ff ff ff movl $0xffffffed,0xffffffd4(%ebp) + 1828e: e9 1d 02 00 00 jmp 184b0 <_usb_submit_urb@8+0x30d> + 18293: 8b 55 ec mov 0xffffffec(%ebp),%edx + 18296: 8b 5d e4 mov 0xffffffe4(%ebp),%ebx + 18299: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 1829c: c1 f8 0f sar $0xf,%eax + 1829f: 89 c1 mov %eax,%ecx + 182a1: 83 e1 0f and $0xf,%ecx + 182a4: b8 01 00 00 00 mov $0x1,%eax + 182a9: d3 e0 shl %cl,%eax + 182ab: 23 44 9a 30 and 0x30(%edx,%ebx,4),%eax + 182af: 85 c0 test %eax,%eax + 182b1: 74 0c je 182bf <_usb_submit_urb@8+0x11c> + 182b3: c7 45 d4 e0 ff ff ff movl $0xffffffe0,0xffffffd4(%ebp) + 182ba: e9 f1 01 00 00 jmp 184b0 <_usb_submit_urb@8+0x30d> + 182bf: 83 7d e4 00 cmpl $0x0,0xffffffe4(%ebp) + 182c3: 74 15 je 182da <_usb_submit_urb@8+0x137> + 182c5: 8b 55 ec mov 0xffffffec(%ebp),%edx + 182c8: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 182cb: c1 f8 0f sar $0xf,%eax + 182ce: 83 e0 0f and $0xf,%eax + 182d1: 8b 44 82 78 mov 0x78(%edx,%eax,4),%eax + 182d5: 89 45 d0 mov %eax,0xffffffd0(%ebp) + 182d8: eb 13 jmp 182ed <_usb_submit_urb@8+0x14a> + 182da: 8b 55 ec mov 0xffffffec(%ebp),%edx + 182dd: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 182e0: c1 f8 0f sar $0xf,%eax + 182e3: 83 e0 0f and $0xf,%eax + 182e6: 8b 44 82 38 mov 0x38(%edx,%eax,4),%eax + 182ea: 89 45 d0 mov %eax,0xffffffd0(%ebp) + 182ed: 8b 45 d0 mov 0xffffffd0(%ebp),%eax + 182f0: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 182f3: 83 7d f0 00 cmpl $0x0,0xfffffff0(%ebp) + 182f7: 7f 0c jg 18305 <_usb_submit_urb@8+0x162> + 182f9: c7 45 d4 a6 ff ff ff movl $0xffffffa6,0xffffffd4(%ebp) + 18300: e9 ab 01 00 00 jmp 184b0 <_usb_submit_urb@8+0x30d> + 18305: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) + 18309: 0f 85 ae 00 00 00 jne 183bd <_usb_submit_urb@8+0x21a> + 1830f: 8b 45 ec mov 0xffffffec(%ebp),%eax + 18312: 83 78 18 03 cmpl $0x3,0x18(%eax) + 18316: 75 20 jne 18338 <_usb_submit_urb@8+0x195> + 18318: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 1831b: c1 f8 0b sar $0xb,%eax + 1831e: 83 e0 03 and $0x3,%eax + 18321: 40 inc %eax + 18322: 89 45 d8 mov %eax,0xffffffd8(%ebp) + 18325: 8d 45 f0 lea 0xfffffff0(%ebp),%eax + 18328: 81 20 ff 03 00 00 andl $0x3ff,(%eax) + 1832e: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 18331: 0f af 45 d8 imul 0xffffffd8(%ebp),%eax + 18335: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 18338: 8b 45 08 mov 0x8(%ebp),%eax + 1833b: 83 78 44 00 cmpl $0x0,0x44(%eax) + 1833f: 7f 0c jg 1834d <_usb_submit_urb@8+0x1aa> + 18341: c7 45 d4 ea ff ff ff movl $0xffffffea,0xffffffd4(%ebp) + 18348: e9 63 01 00 00 jmp 184b0 <_usb_submit_urb@8+0x30d> + 1834d: c7 45 e0 00 00 00 00 movl $0x0,0xffffffe0(%ebp) + 18354: 8b 45 08 mov 0x8(%ebp),%eax + 18357: 8b 40 44 mov 0x44(%eax),%eax + 1835a: 3b 45 e0 cmp 0xffffffe0(%ebp),%eax + 1835d: 7e 5e jle 183bd <_usb_submit_urb@8+0x21a> + 1835f: 8b 55 08 mov 0x8(%ebp),%edx + 18362: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 18365: c1 e0 04 shl $0x4,%eax + 18368: 01 d0 add %edx,%eax + 1836a: 83 c0 60 add $0x60,%eax + 1836d: 8b 00 mov (%eax),%eax + 1836f: 89 45 dc mov %eax,0xffffffdc(%ebp) + 18372: 83 7d dc 00 cmpl $0x0,0xffffffdc(%ebp) + 18376: 78 0a js 18382 <_usb_submit_urb@8+0x1df> + 18378: 8b 45 dc mov 0xffffffdc(%ebp),%eax + 1837b: 3b 45 f0 cmp 0xfffffff0(%ebp),%eax + 1837e: 7f 02 jg 18382 <_usb_submit_urb@8+0x1df> + 18380: eb 0c jmp 1838e <_usb_submit_urb@8+0x1eb> + 18382: c7 45 d4 a6 ff ff ff movl $0xffffffa6,0xffffffd4(%ebp) + 18389: e9 22 01 00 00 jmp 184b0 <_usb_submit_urb@8+0x30d> + 1838e: 8b 55 08 mov 0x8(%ebp),%edx + 18391: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 18394: c1 e0 04 shl $0x4,%eax + 18397: 01 d0 add %edx,%eax + 18399: 83 c0 68 add $0x68,%eax + 1839c: c7 00 ee ff ff ff movl $0xffffffee,(%eax) + 183a2: 8b 55 08 mov 0x8(%ebp),%edx + 183a5: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 183a8: c1 e0 04 shl $0x4,%eax + 183ab: 01 d0 add %edx,%eax + 183ad: 83 c0 64 add $0x64,%eax + 183b0: c7 00 00 00 00 00 movl $0x0,(%eax) + 183b6: 8d 45 e0 lea 0xffffffe0(%ebp),%eax + 183b9: ff 00 incl (%eax) + 183bb: eb 97 jmp 18354 <_usb_submit_urb@8+0x1b1> + 183bd: 8b 45 08 mov 0x8(%ebp),%eax + 183c0: 83 78 2c 00 cmpl $0x0,0x2c(%eax) + 183c4: 79 0c jns 183d2 <_usb_submit_urb@8+0x22f> + 183c6: c7 45 d4 a6 ff ff ff movl $0xffffffa6,0xffffffd4(%ebp) + 183cd: e9 de 00 00 00 jmp 184b0 <_usb_submit_urb@8+0x30d> + 183d2: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 183d5: 83 c0 00 add $0x0,%eax + 183d8: 83 f8 01 cmp $0x1,%eax + 183db: 0f 87 b8 00 00 00 ja 18499 <_usb_submit_urb@8+0x2f6> + 183e1: 8b 45 08 mov 0x8(%ebp),%eax + 183e4: 83 78 48 00 cmpl $0x0,0x48(%eax) + 183e8: 7f 0c jg 183f6 <_usb_submit_urb@8+0x253> + 183ea: c7 45 d4 ea ff ff ff movl $0xffffffea,0xffffffd4(%ebp) + 183f1: e9 ba 00 00 00 jmp 184b0 <_usb_submit_urb@8+0x30d> + 183f6: 8b 45 ec mov 0xffffffec(%ebp),%eax + 183f9: 8b 40 18 mov 0x18(%eax),%eax + 183fc: 89 45 cc mov %eax,0xffffffcc(%ebp) + 183ff: 83 7d cc 01 cmpl $0x1,0xffffffcc(%ebp) + 18403: 72 70 jb 18475 <_usb_submit_urb@8+0x2d2> + 18405: 83 7d cc 02 cmpl $0x2,0xffffffcc(%ebp) + 18409: 76 27 jbe 18432 <_usb_submit_urb@8+0x28f> + 1840b: 83 7d cc 03 cmpl $0x3,0xffffffcc(%ebp) + 1840f: 74 02 je 18413 <_usb_submit_urb@8+0x270> + 18411: eb 62 jmp 18475 <_usb_submit_urb@8+0x2d2> + 18413: 8b 45 08 mov 0x8(%ebp),%eax + 18416: 81 78 48 00 20 00 00 cmpl $0x2000,0x48(%eax) + 1841d: 7e 0a jle 18429 <_usb_submit_urb@8+0x286> + 1841f: 8b 45 08 mov 0x8(%ebp),%eax + 18422: c7 40 48 00 20 00 00 movl $0x2000,0x48(%eax) + 18429: c7 45 f4 00 20 00 00 movl $0x2000,0xfffffff4(%ebp) + 18430: eb 4c jmp 1847e <_usb_submit_urb@8+0x2db> + 18432: 83 7d f4 01 cmpl $0x1,0xfffffff4(%ebp) + 18436: 75 1e jne 18456 <_usb_submit_urb@8+0x2b3> + 18438: 8b 45 08 mov 0x8(%ebp),%eax + 1843b: 81 78 48 ff 00 00 00 cmpl $0xff,0x48(%eax) + 18442: 7e 09 jle 1844d <_usb_submit_urb@8+0x2aa> + 18444: c7 45 d4 ea ff ff ff movl $0xffffffea,0xffffffd4(%ebp) + 1844b: eb 63 jmp 184b0 <_usb_submit_urb@8+0x30d> + 1844d: c7 45 f4 80 00 00 00 movl $0x80,0xfffffff4(%ebp) + 18454: eb 28 jmp 1847e <_usb_submit_urb@8+0x2db> + 18456: 8b 45 08 mov 0x8(%ebp),%eax + 18459: 81 78 48 00 04 00 00 cmpl $0x400,0x48(%eax) + 18460: 7e 0a jle 1846c <_usb_submit_urb@8+0x2c9> + 18462: 8b 45 08 mov 0x8(%ebp),%eax + 18465: c7 40 48 00 04 00 00 movl $0x400,0x48(%eax) + 1846c: c7 45 f4 00 04 00 00 movl $0x400,0xfffffff4(%ebp) + 18473: eb 09 jmp 1847e <_usb_submit_urb@8+0x2db> + 18475: c7 45 d4 ea ff ff ff movl $0xffffffea,0xffffffd4(%ebp) + 1847c: eb 32 jmp 184b0 <_usb_submit_urb@8+0x30d> + 1847e: 8b 45 08 mov 0x8(%ebp),%eax + 18481: 8b 40 48 mov 0x48(%eax),%eax + 18484: 3b 45 f4 cmp 0xfffffff4(%ebp),%eax + 18487: 7d 07 jge 18490 <_usb_submit_urb@8+0x2ed> + 18489: 8d 45 f4 lea 0xfffffff4(%ebp),%eax + 1848c: d1 38 sarl (%eax) + 1848e: eb ee jmp 1847e <_usb_submit_urb@8+0x2db> + 18490: 8b 55 08 mov 0x8(%ebp),%edx + 18493: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 18496: 89 42 48 mov %eax,0x48(%edx) + 18499: 83 ec 08 sub $0x8,%esp + 1849c: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 1849f: ff 75 0c pushl 0xc(%ebp) + 184a2: ff 75 08 pushl 0x8(%ebp) + 184a5: 8b 40 0c mov 0xc(%eax),%eax + 184a8: ff d0 call *%eax + 184aa: 83 c4 10 add $0x10,%esp + 184ad: 89 45 d4 mov %eax,0xffffffd4(%ebp) + 184b0: 8b 45 d4 mov 0xffffffd4(%ebp),%eax + 184b3: 8b 5d fc mov 0xfffffffc(%ebp),%ebx + 184b6: c9 leave + 184b7: c2 08 00 ret $0x8 + +000184ba <_usb_unlink_urb@4>: + 184ba: 55 push %ebp + 184bb: 89 e5 mov %esp,%ebp + 184bd: 83 ec 08 sub $0x8,%esp + 184c0: 83 7d 08 00 cmpl $0x0,0x8(%ebp) + 184c4: 74 4c je 18512 <_usb_unlink_urb@4+0x58> + 184c6: 8b 45 08 mov 0x8(%ebp),%eax + 184c9: 83 78 14 00 cmpl $0x0,0x14(%eax) + 184cd: 74 43 je 18512 <_usb_unlink_urb@4+0x58> + 184cf: 8b 45 08 mov 0x8(%ebp),%eax + 184d2: 8b 40 14 mov 0x14(%eax),%eax + 184d5: 83 b8 bc 00 00 00 00 cmpl $0x0,0xbc(%eax) + 184dc: 74 34 je 18512 <_usb_unlink_urb@4+0x58> + 184de: 8b 45 08 mov 0x8(%ebp),%eax + 184e1: 8b 40 14 mov 0x14(%eax),%eax + 184e4: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 184ea: 83 78 20 00 cmpl $0x0,0x20(%eax) + 184ee: 74 22 je 18512 <_usb_unlink_urb@4+0x58> + 184f0: 83 ec 0c sub $0xc,%esp + 184f3: 8b 45 08 mov 0x8(%ebp),%eax + 184f6: 8b 40 14 mov 0x14(%eax),%eax + 184f9: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax + 184ff: 8b 40 20 mov 0x20(%eax),%eax + 18502: ff 75 08 pushl 0x8(%ebp) + 18505: 8b 40 10 mov 0x10(%eax),%eax + 18508: ff d0 call *%eax + 1850a: 83 c4 10 add $0x10,%esp + 1850d: 89 45 fc mov %eax,0xfffffffc(%ebp) + 18510: eb 07 jmp 18519 <_usb_unlink_urb@4+0x5f> + 18512: c7 45 fc ed ff ff ff movl $0xffffffed,0xfffffffc(%ebp) + 18519: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 1851c: c9 leave + 1851d: c2 04 00 ret $0x4 + +00018520 <_hcd_buffer_create>: + 18520: 55 push %ebp + 18521: 89 e5 mov %esp,%ebp + 18523: b8 00 00 00 00 mov $0x0,%eax + 18528: 5d pop %ebp + 18529: c3 ret + +0001852a <_hcd_buffer_destroy>: + 1852a: 55 push %ebp + 1852b: 89 e5 mov %esp,%ebp + 1852d: 5d pop %ebp + 1852e: c3 ret + +0001852f <_hcd_buffer_alloc>: + 1852f: 55 push %ebp + 18530: 89 e5 mov %esp,%ebp + 18532: 83 ec 08 sub $0x8,%esp + 18535: 83 ec 08 sub $0x8,%esp + 18538: ff 75 0c pushl 0xc(%ebp) + 1853b: 6a 01 push $0x1 + 1853d: e8 ee 14 00 00 call 19a30 <_ExAllocatePool@8> + 18542: 83 c4 08 add $0x8,%esp + 18545: c9 leave + 18546: c3 ret + +00018547 <_hcd_buffer_free>: + 18547: 55 push %ebp + 18548: 89 e5 mov %esp,%ebp + 1854a: 83 ec 08 sub $0x8,%esp + 1854d: 83 ec 0c sub $0xc,%esp + 18550: ff 75 10 pushl 0x10(%ebp) + 18553: e8 e8 14 00 00 call 19a40 <_ExFreePool@4> + 18558: 83 c4 0c add $0xc,%esp + 1855b: c9 leave + 1855c: c3 ret + 1855d: 90 nop + 1855e: 90 nop + 1855f: 90 nop + +00018560 <_usb_show_endpoint>: + 18560: 55 push %ebp + 18561: 89 e5 mov %esp,%ebp + 18563: 83 ec 08 sub $0x8,%esp + 18566: 83 ec 0c sub $0xc,%esp + 18569: ff 75 08 pushl 0x8(%ebp) + 1856c: e8 86 09 00 00 call 18ef7 <_usb_show_endpoint_descriptor> + 18571: 83 c4 10 add $0x10,%esp + 18574: c9 leave + 18575: c3 ret + +00018576 <_usb_show_interface>: + 18576: 55 push %ebp + 18577: 89 e5 mov %esp,%ebp + 18579: 83 ec 08 sub $0x8,%esp + 1857c: 83 ec 0c sub $0xc,%esp + 1857f: ff 75 08 pushl 0x8(%ebp) + 18582: e8 89 07 00 00 call 18d10 <_usb_show_interface_descriptor> + 18587: 83 c4 10 add $0x10,%esp + 1858a: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) + 18591: 8b 45 08 mov 0x8(%ebp),%eax + 18594: 8a 40 04 mov 0x4(%eax),%al + 18597: 25 ff 00 00 00 and $0xff,%eax + 1859c: 3b 45 fc cmp 0xfffffffc(%ebp),%eax + 1859f: 7e 26 jle 185c7 <_usb_show_interface+0x51> + 185a1: 83 ec 0c sub $0xc,%esp + 185a4: 8b 4d 08 mov 0x8(%ebp),%ecx + 185a7: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 185aa: 89 d0 mov %edx,%eax + 185ac: c1 e0 02 shl $0x2,%eax + 185af: 01 d0 add %edx,%eax + 185b1: c1 e0 02 shl $0x2,%eax + 185b4: 03 41 0c add 0xc(%ecx),%eax + 185b7: 50 push %eax + 185b8: e8 a3 ff ff ff call 18560 <_usb_show_endpoint> + 185bd: 83 c4 10 add $0x10,%esp + 185c0: 8d 45 fc lea 0xfffffffc(%ebp),%eax + 185c3: ff 00 incl (%eax) + 185c5: eb ca jmp 18591 <_usb_show_interface+0x1b> + 185c7: c9 leave + 185c8: c3 ret + +000185c9 <_usb_show_config>: + 185c9: 55 push %ebp + 185ca: 89 e5 mov %esp,%ebp + 185cc: 53 push %ebx + 185cd: 83 ec 14 sub $0x14,%esp + 185d0: 83 ec 0c sub $0xc,%esp + 185d3: ff 75 08 pushl 0x8(%ebp) + 185d6: e8 45 05 00 00 call 18b20 <_usb_show_config_descriptor> + 185db: 83 c4 10 add $0x10,%esp + 185de: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 185e5: 8b 45 08 mov 0x8(%ebp),%eax + 185e8: 8a 40 04 mov 0x4(%eax),%al + 185eb: 25 ff 00 00 00 and $0xff,%eax + 185f0: 3b 45 f8 cmp 0xfffffff8(%ebp),%eax + 185f3: 0f 8e 95 00 00 00 jle 1868e <_usb_show_config+0xc5> + 185f9: 8b 5d 08 mov 0x8(%ebp),%ebx + 185fc: 8b 4d f8 mov 0xfffffff8(%ebp),%ecx + 185ff: 89 c8 mov %ecx,%eax + 18601: c1 e0 02 shl $0x2,%eax + 18604: 01 c8 add %ecx,%eax + 18606: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx + 1860d: 01 d0 add %edx,%eax + 1860f: 01 c0 add %eax,%eax + 18611: 01 c8 add %ecx,%eax + 18613: c1 e0 02 shl $0x2,%eax + 18616: 03 43 0c add 0xc(%ebx),%eax + 18619: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 1861c: 83 7d f0 00 cmpl $0x0,0xfffffff0(%ebp) + 18620: 75 02 jne 18624 <_usb_show_config+0x5b> + 18622: eb 6a jmp 1868e <_usb_show_config+0xc5> + 18624: 83 ec 04 sub $0x4,%esp + 18627: 6a 32 push $0x32 + 18629: 68 c4 b2 01 00 push $0x1b2c4 + 1862e: 68 d0 b2 01 00 push $0x1b2d0 + 18633: e8 28 14 00 00 call 19a60 <_DbgPrint> + 18638: 83 c4 10 add $0x10,%esp + 1863b: 83 ec 08 sub $0x8,%esp + 1863e: ff 75 f8 pushl 0xfffffff8(%ebp) + 18641: 68 d9 b2 01 00 push $0x1b2d9 + 18646: e8 15 14 00 00 call 19a60 <_DbgPrint> + 1864b: 83 c4 10 add $0x10,%esp + 1864e: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) + 18655: 8b 55 f0 mov 0xfffffff0(%ebp),%edx + 18658: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 1865b: 3b 42 08 cmp 0x8(%edx),%eax + 1865e: 73 24 jae 18684 <_usb_show_config+0xbb> + 18660: 83 ec 0c sub $0xc,%esp + 18663: 8b 4d f0 mov 0xfffffff0(%ebp),%ecx + 18666: 8b 55 f4 mov 0xfffffff4(%ebp),%edx + 18669: 89 d0 mov %edx,%eax + 1866b: 01 c0 add %eax,%eax + 1866d: 01 d0 add %edx,%eax + 1866f: c1 e0 03 shl $0x3,%eax + 18672: 03 01 add (%ecx),%eax + 18674: 50 push %eax + 18675: e8 fc fe ff ff call 18576 <_usb_show_interface> + 1867a: 83 c4 10 add $0x10,%esp + 1867d: 8d 45 f4 lea 0xfffffff4(%ebp),%eax + 18680: ff 00 incl (%eax) + 18682: eb d1 jmp 18655 <_usb_show_config+0x8c> + 18684: 8d 45 f8 lea 0xfffffff8(%ebp),%eax + 18687: ff 00 incl (%eax) + 18689: e9 57 ff ff ff jmp 185e5 <_usb_show_config+0x1c> + 1868e: 8b 5d fc mov 0xfffffffc(%ebp),%ebx + 18691: c9 leave + 18692: c3 ret + +00018693 <_usb_show_device>: + 18693: 55 push %ebp + 18694: 89 e5 mov %esp,%ebp + 18696: 83 ec 08 sub $0x8,%esp + 18699: 83 ec 0c sub $0xc,%esp + 1869c: 8b 45 08 mov 0x8(%ebp),%eax + 1869f: 05 70 01 00 00 add $0x170,%eax + 186a4: 50 push %eax + 186a5: e8 47 00 00 00 call 186f1 <_usb_show_device_descriptor> + 186aa: 83 c4 10 add $0x10,%esp + 186ad: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) + 186b4: 8b 45 08 mov 0x8(%ebp),%eax + 186b7: 8a 80 81 01 00 00 mov 0x181(%eax),%al + 186bd: 25 ff 00 00 00 and $0xff,%eax + 186c2: 3b 45 fc cmp 0xfffffffc(%ebp),%eax + 186c5: 7e 28 jle 186ef <_usb_show_device+0x5c> + 186c7: 83 ec 0c sub $0xc,%esp + 186ca: 8b 4d 08 mov 0x8(%ebp),%ecx + 186cd: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 186d0: 89 d0 mov %edx,%eax + 186d2: 01 c0 add %eax,%eax + 186d4: 01 d0 add %edx,%eax + 186d6: c1 e0 03 shl $0x3,%eax + 186d9: 03 81 84 01 00 00 add 0x184(%ecx),%eax + 186df: 50 push %eax + 186e0: e8 e4 fe ff ff call 185c9 <_usb_show_config> + 186e5: 83 c4 10 add $0x10,%esp + 186e8: 8d 45 fc lea 0xfffffffc(%ebp),%eax + 186eb: ff 00 incl (%eax) + 186ed: eb c5 jmp 186b4 <_usb_show_device+0x21> + 186ef: c9 leave + 186f0: c3 ret + +000186f1 <_usb_show_device_descriptor>: + 186f1: 55 push %ebp + 186f2: 89 e5 mov %esp,%ebp + 186f4: 83 ec 08 sub $0x8,%esp + 186f7: 83 7d 08 00 cmpl $0x0,0x8(%ebp) + 186fb: 75 2c jne 18729 <_usb_show_device_descriptor+0x38> + 186fd: 83 ec 04 sub $0x4,%esp + 18700: 6a 48 push $0x48 + 18702: 68 c4 b2 01 00 push $0x1b2c4 + 18707: 68 d0 b2 01 00 push $0x1b2d0 + 1870c: e8 4f 13 00 00 call 19a60 <_DbgPrint> + 18711: 83 c4 10 add $0x10,%esp + 18714: 83 ec 0c sub $0xc,%esp + 18717: 68 ec b2 01 00 push $0x1b2ec + 1871c: e8 3f 13 00 00 call 19a60 <_DbgPrint> + 18721: 83 c4 10 add $0x10,%esp + 18724: e9 f5 03 00 00 jmp 18b1e <_usb_show_device_descriptor+0x42d> + 18729: 83 ec 04 sub $0x4,%esp + 1872c: 6a 4c push $0x4c + 1872e: 68 c4 b2 01 00 push $0x1b2c4 + 18733: 68 d0 b2 01 00 push $0x1b2d0 + 18738: e8 23 13 00 00 call 19a60 <_DbgPrint> + 1873d: 83 c4 10 add $0x10,%esp + 18740: 83 ec 04 sub $0x4,%esp + 18743: 8b 45 08 mov 0x8(%ebp),%eax + 18746: 80 38 12 cmpb $0x12,(%eax) + 18749: 75 09 jne 18754 <_usb_show_device_descriptor+0x63> + 1874b: c7 45 fc 1a b3 01 00 movl $0x1b31a,0xfffffffc(%ebp) + 18752: eb 07 jmp 1875b <_usb_show_device_descriptor+0x6a> + 18754: c7 45 fc 1b b3 01 00 movl $0x1b31b,0xfffffffc(%ebp) + 1875b: ff 75 fc pushl 0xfffffffc(%ebp) + 1875e: 8b 45 08 mov 0x8(%ebp),%eax + 18761: 8a 00 mov (%eax),%al + 18763: 25 ff 00 00 00 and $0xff,%eax + 18768: 50 push %eax + 18769: 68 24 b3 01 00 push $0x1b324 + 1876e: e8 ed 12 00 00 call 19a60 <_DbgPrint> + 18773: 83 c4 10 add $0x10,%esp + 18776: 83 ec 04 sub $0x4,%esp + 18779: 6a 4d push $0x4d + 1877b: 68 c4 b2 01 00 push $0x1b2c4 + 18780: 68 d0 b2 01 00 push $0x1b2d0 + 18785: e8 d6 12 00 00 call 19a60 <_DbgPrint> + 1878a: 83 c4 10 add $0x10,%esp + 1878d: 83 ec 08 sub $0x8,%esp + 18790: 8b 45 08 mov 0x8(%ebp),%eax + 18793: 8a 40 01 mov 0x1(%eax),%al + 18796: 25 ff 00 00 00 and $0xff,%eax + 1879b: 50 push %eax + 1879c: 68 43 b3 01 00 push $0x1b343 + 187a1: e8 ba 12 00 00 call 19a60 <_DbgPrint> + 187a6: 83 c4 10 add $0x10,%esp + 187a9: 83 ec 04 sub $0x4,%esp + 187ac: 6a 50 push $0x50 + 187ae: 68 c4 b2 01 00 push $0x1b2c4 + 187b3: 68 d0 b2 01 00 push $0x1b2d0 + 187b8: e8 a3 12 00 00 call 19a60 <_DbgPrint> + 187bd: 83 c4 10 add $0x10,%esp + 187c0: 83 ec 04 sub $0x4,%esp + 187c3: 8b 45 08 mov 0x8(%ebp),%eax + 187c6: 66 8b 40 02 mov 0x2(%eax),%ax + 187ca: 25 ff ff 00 00 and $0xffff,%eax + 187cf: 25 ff 00 00 00 and $0xff,%eax + 187d4: 50 push %eax + 187d5: 8b 45 08 mov 0x8(%ebp),%eax + 187d8: 66 8b 40 02 mov 0x2(%eax),%ax + 187dc: 66 c1 e8 08 shr $0x8,%ax + 187e0: 25 ff ff 00 00 and $0xffff,%eax + 187e5: 50 push %eax + 187e6: 68 64 b3 01 00 push $0x1b364 + 187eb: e8 70 12 00 00 call 19a60 <_DbgPrint> + 187f0: 83 c4 10 add $0x10,%esp + 187f3: 83 ec 04 sub $0x4,%esp + 187f6: 6a 52 push $0x52 + 187f8: 68 c4 b2 01 00 push $0x1b2c4 + 187fd: 68 d0 b2 01 00 push $0x1b2d0 + 18802: e8 59 12 00 00 call 19a60 <_DbgPrint> + 18807: 83 c4 10 add $0x10,%esp + 1880a: 83 ec 04 sub $0x4,%esp + 1880d: 8b 45 08 mov 0x8(%ebp),%eax + 18810: 66 8b 40 0a mov 0xa(%eax),%ax + 18814: 25 ff ff 00 00 and $0xffff,%eax + 18819: 50 push %eax + 1881a: 8b 45 08 mov 0x8(%ebp),%eax + 1881d: 66 8b 40 08 mov 0x8(%eax),%ax + 18821: 25 ff ff 00 00 and $0xffff,%eax + 18826: 50 push %eax + 18827: 68 88 b3 01 00 push $0x1b388 + 1882c: e8 2f 12 00 00 call 19a60 <_DbgPrint> + 18831: 83 c4 10 add $0x10,%esp + 18834: 83 ec 04 sub $0x4,%esp + 18837: 6a 53 push $0x53 + 18839: 68 c4 b2 01 00 push $0x1b2c4 + 1883e: 68 d0 b2 01 00 push $0x1b2d0 + 18843: e8 18 12 00 00 call 19a60 <_DbgPrint> + 18848: 83 c4 10 add $0x10,%esp + 1884b: 83 ec 08 sub $0x8,%esp + 1884e: 8b 45 08 mov 0x8(%ebp),%eax + 18851: 8a 40 07 mov 0x7(%eax),%al + 18854: 25 ff 00 00 00 and $0xff,%eax + 18859: 50 push %eax + 1885a: 68 ab b3 01 00 push $0x1b3ab + 1885f: e8 fc 11 00 00 call 19a60 <_DbgPrint> + 18864: 83 c4 10 add $0x10,%esp + 18867: 83 ec 04 sub $0x4,%esp + 1886a: 6a 54 push $0x54 + 1886c: 68 c4 b2 01 00 push $0x1b2c4 + 18871: 68 d0 b2 01 00 push $0x1b2d0 + 18876: e8 e5 11 00 00 call 19a60 <_DbgPrint> + 1887b: 83 c4 10 add $0x10,%esp + 1887e: 83 ec 08 sub $0x8,%esp + 18881: 8b 45 08 mov 0x8(%ebp),%eax + 18884: 8a 40 11 mov 0x11(%eax),%al + 18887: 25 ff 00 00 00 and $0xff,%eax + 1888c: 50 push %eax + 1888d: 68 c7 b3 01 00 push $0x1b3c7 + 18892: e8 c9 11 00 00 call 19a60 <_DbgPrint> + 18897: 83 c4 10 add $0x10,%esp + 1889a: 83 ec 04 sub $0x4,%esp + 1889d: 6a 56 push $0x56 + 1889f: 68 c4 b2 01 00 push $0x1b2c4 + 188a4: 68 d0 b2 01 00 push $0x1b2d0 + 188a9: e8 b2 11 00 00 call 19a60 <_DbgPrint> + 188ae: 83 c4 10 add $0x10,%esp + 188b1: 83 ec 04 sub $0x4,%esp + 188b4: 8b 45 08 mov 0x8(%ebp),%eax + 188b7: 66 8b 40 0c mov 0xc(%eax),%ax + 188bb: 25 ff ff 00 00 and $0xffff,%eax + 188c0: 25 ff 00 00 00 and $0xff,%eax + 188c5: 50 push %eax + 188c6: 8b 45 08 mov 0x8(%ebp),%eax + 188c9: 66 8b 40 0c mov 0xc(%eax),%ax + 188cd: 66 c1 e8 08 shr $0x8,%ax + 188d1: 25 ff ff 00 00 and $0xffff,%eax + 188d6: 50 push %eax + 188d7: 68 e4 b3 01 00 push $0x1b3e4 + 188dc: e8 7f 11 00 00 call 19a60 <_DbgPrint> + 188e1: 83 c4 10 add $0x10,%esp + 188e4: 83 ec 04 sub $0x4,%esp + 188e7: 6a 59 push $0x59 + 188e9: 68 c4 b2 01 00 push $0x1b2c4 + 188ee: 68 d0 b2 01 00 push $0x1b2d0 + 188f3: e8 68 11 00 00 call 19a60 <_DbgPrint> + 188f8: 83 c4 10 add $0x10,%esp + 188fb: 8b 45 08 mov 0x8(%ebp),%eax + 188fe: 8a 40 06 mov 0x6(%eax),%al + 18901: 25 ff 00 00 00 and $0xff,%eax + 18906: 50 push %eax + 18907: 8b 45 08 mov 0x8(%ebp),%eax + 1890a: 8a 40 05 mov 0x5(%eax),%al + 1890d: 25 ff 00 00 00 and $0xff,%eax + 18912: 50 push %eax + 18913: 8b 45 08 mov 0x8(%ebp),%eax + 18916: 8a 40 04 mov 0x4(%eax),%al + 18919: 25 ff 00 00 00 and $0xff,%eax + 1891e: 50 push %eax + 1891f: 68 08 b4 01 00 push $0x1b408 + 18924: e8 37 11 00 00 call 19a60 <_DbgPrint> + 18929: 83 c4 10 add $0x10,%esp + 1892c: 8b 45 08 mov 0x8(%ebp),%eax + 1892f: ba 00 00 00 00 mov $0x0,%edx + 18934: 8a 50 04 mov 0x4(%eax),%dl + 18937: 89 55 f8 mov %edx,0xfffffff8(%ebp) + 1893a: 83 7d f8 03 cmpl $0x3,0xfffffff8(%ebp) + 1893e: 0f 84 e0 00 00 00 je 18a24 <_usb_show_device_descriptor+0x333> + 18944: 83 7d f8 03 cmpl $0x3,0xfffffff8(%ebp) + 18948: 7f 1b jg 18965 <_usb_show_device_descriptor+0x274> + 1894a: 83 7d f8 01 cmpl $0x1,0xfffffff8(%ebp) + 1894e: 74 7c je 189cc <_usb_show_device_descriptor+0x2db> + 18950: 83 7d f8 01 cmpl $0x1,0xfffffff8(%ebp) + 18954: 0f 8f 9e 00 00 00 jg 189f8 <_usb_show_device_descriptor+0x307> + 1895a: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) + 1895e: 74 40 je 189a0 <_usb_show_device_descriptor+0x2af> + 18960: e9 92 01 00 00 jmp 18af7 <_usb_show_device_descriptor+0x406> + 18965: 83 7d f8 08 cmpl $0x8,0xfffffff8(%ebp) + 18969: 0f 84 0d 01 00 00 je 18a7c <_usb_show_device_descriptor+0x38b> + 1896f: 83 7d f8 08 cmpl $0x8,0xfffffff8(%ebp) + 18973: 7f 0f jg 18984 <_usb_show_device_descriptor+0x293> + 18975: 83 7d f8 07 cmpl $0x7,0xfffffff8(%ebp) + 18979: 0f 84 d1 00 00 00 je 18a50 <_usb_show_device_descriptor+0x35f> + 1897f: e9 73 01 00 00 jmp 18af7 <_usb_show_device_descriptor+0x406> + 18984: 83 7d f8 09 cmpl $0x9,0xfffffff8(%ebp) + 18988: 0f 84 17 01 00 00 je 18aa5 <_usb_show_device_descriptor+0x3b4> + 1898e: 81 7d f8 ff 00 00 00 cmpl $0xff,0xfffffff8(%ebp) + 18995: 0f 84 33 01 00 00 je 18ace <_usb_show_device_descriptor+0x3dd> + 1899b: e9 57 01 00 00 jmp 18af7 <_usb_show_device_descriptor+0x406> + 189a0: 83 ec 04 sub $0x4,%esp + 189a3: 6a 5c push $0x5c + 189a5: 68 c4 b2 01 00 push $0x1b2c4 + 189aa: 68 d0 b2 01 00 push $0x1b2d0 + 189af: e8 ac 10 00 00 call 19a60 <_DbgPrint> + 189b4: 83 c4 10 add $0x10,%esp + 189b7: 83 ec 0c sub $0xc,%esp + 189ba: 68 3b b4 01 00 push $0x1b43b + 189bf: e8 9c 10 00 00 call 19a60 <_DbgPrint> + 189c4: 83 c4 10 add $0x10,%esp + 189c7: e9 52 01 00 00 jmp 18b1e <_usb_show_device_descriptor+0x42d> + 189cc: 83 ec 04 sub $0x4,%esp + 189cf: 6a 5f push $0x5f + 189d1: 68 c4 b2 01 00 push $0x1b2c4 + 189d6: 68 d0 b2 01 00 push $0x1b2d0 + 189db: e8 80 10 00 00 call 19a60 <_DbgPrint> + 189e0: 83 c4 10 add $0x10,%esp + 189e3: 83 ec 0c sub $0xc,%esp + 189e6: 68 56 b4 01 00 push $0x1b456 + 189eb: e8 70 10 00 00 call 19a60 <_DbgPrint> + 189f0: 83 c4 10 add $0x10,%esp + 189f3: e9 26 01 00 00 jmp 18b1e <_usb_show_device_descriptor+0x42d> + 189f8: 83 ec 04 sub $0x4,%esp + 189fb: 6a 62 push $0x62 + 189fd: 68 c4 b2 01 00 push $0x1b2c4 + 18a02: 68 d0 b2 01 00 push $0x1b2d0 + 18a07: e8 54 10 00 00 call 19a60 <_DbgPrint> + 18a0c: 83 c4 10 add $0x10,%esp + 18a0f: 83 ec 0c sub $0xc,%esp + 18a12: 68 6e b4 01 00 push $0x1b46e + 18a17: e8 44 10 00 00 call 19a60 <_DbgPrint> + 18a1c: 83 c4 10 add $0x10,%esp + 18a1f: e9 fa 00 00 00 jmp 18b1e <_usb_show_device_descriptor+0x42d> + 18a24: 83 ec 04 sub $0x4,%esp + 18a27: 6a 65 push $0x65 + 18a29: 68 c4 b2 01 00 push $0x1b2c4 + 18a2e: 68 d0 b2 01 00 push $0x1b2d0 + 18a33: e8 28 10 00 00 call 19a60 <_DbgPrint> + 18a38: 83 c4 10 add $0x10,%esp + 18a3b: 83 ec 0c sub $0xc,%esp + 18a3e: 68 88 b4 01 00 push $0x1b488 + 18a43: e8 18 10 00 00 call 19a60 <_DbgPrint> + 18a48: 83 c4 10 add $0x10,%esp + 18a4b: e9 ce 00 00 00 jmp 18b1e <_usb_show_device_descriptor+0x42d> + 18a50: 83 ec 04 sub $0x4,%esp + 18a53: 6a 68 push $0x68 + 18a55: 68 c4 b2 01 00 push $0x1b2c4 + 18a5a: 68 d0 b2 01 00 push $0x1b2d0 + 18a5f: e8 fc 0f 00 00 call 19a60 <_DbgPrint> + 18a64: 83 c4 10 add $0x10,%esp + 18a67: 83 ec 0c sub $0xc,%esp + 18a6a: 68 ab b4 01 00 push $0x1b4ab + 18a6f: e8 ec 0f 00 00 call 19a60 <_DbgPrint> + 18a74: 83 c4 10 add $0x10,%esp + 18a77: e9 a2 00 00 00 jmp 18b1e <_usb_show_device_descriptor+0x42d> + 18a7c: 83 ec 04 sub $0x4,%esp + 18a7f: 6a 6b push $0x6b + 18a81: 68 c4 b2 01 00 push $0x1b2c4 + 18a86: 68 d0 b2 01 00 push $0x1b2d0 + 18a8b: e8 d0 0f 00 00 call 19a60 <_DbgPrint> + 18a90: 83 c4 10 add $0x10,%esp + 18a93: 83 ec 0c sub $0xc,%esp + 18a96: 68 c8 b4 01 00 push $0x1b4c8 + 18a9b: e8 c0 0f 00 00 call 19a60 <_DbgPrint> + 18aa0: 83 c4 10 add $0x10,%esp + 18aa3: eb 79 jmp 18b1e <_usb_show_device_descriptor+0x42d> + 18aa5: 83 ec 04 sub $0x4,%esp + 18aa8: 6a 6e push $0x6e + 18aaa: 68 c4 b2 01 00 push $0x1b2c4 + 18aaf: 68 d0 b2 01 00 push $0x1b2d0 + 18ab4: e8 a7 0f 00 00 call 19a60 <_DbgPrint> + 18ab9: 83 c4 10 add $0x10,%esp + 18abc: 83 ec 0c sub $0xc,%esp + 18abf: 68 e7 b4 01 00 push $0x1b4e7 + 18ac4: e8 97 0f 00 00 call 19a60 <_DbgPrint> + 18ac9: 83 c4 10 add $0x10,%esp + 18acc: eb 50 jmp 18b1e <_usb_show_device_descriptor+0x42d> + 18ace: 83 ec 04 sub $0x4,%esp + 18ad1: 6a 71 push $0x71 + 18ad3: 68 c4 b2 01 00 push $0x1b2c4 + 18ad8: 68 d0 b2 01 00 push $0x1b2d0 + 18add: e8 7e 0f 00 00 call 19a60 <_DbgPrint> + 18ae2: 83 c4 10 add $0x10,%esp + 18ae5: 83 ec 0c sub $0xc,%esp + 18ae8: 68 fd b4 01 00 push $0x1b4fd + 18aed: e8 6e 0f 00 00 call 19a60 <_DbgPrint> + 18af2: 83 c4 10 add $0x10,%esp + 18af5: eb 27 jmp 18b1e <_usb_show_device_descriptor+0x42d> + 18af7: 83 ec 04 sub $0x4,%esp + 18afa: 6a 74 push $0x74 + 18afc: 68 c4 b2 01 00 push $0x1b2c4 + 18b01: 68 d0 b2 01 00 push $0x1b2d0 + 18b06: e8 55 0f 00 00 call 19a60 <_DbgPrint> + 18b0b: 83 c4 10 add $0x10,%esp + 18b0e: 83 ec 0c sub $0xc,%esp + 18b11: 68 0f b5 01 00 push $0x1b50f + 18b16: e8 45 0f 00 00 call 19a60 <_DbgPrint> + 18b1b: 83 c4 10 add $0x10,%esp + 18b1e: c9 leave + 18b1f: c3 ret + +00018b20 <_usb_show_config_descriptor>: + 18b20: 55 push %ebp + 18b21: 89 e5 mov %esp,%ebp + 18b23: 83 ec 08 sub $0x8,%esp + 18b26: 83 ec 04 sub $0x4,%esp + 18b29: 6a 7a push $0x7a + 18b2b: 68 c4 b2 01 00 push $0x1b2c4 + 18b30: 68 d0 b2 01 00 push $0x1b2d0 + 18b35: e8 26 0f 00 00 call 19a60 <_DbgPrint> + 18b3a: 83 c4 10 add $0x10,%esp + 18b3d: 83 ec 0c sub $0xc,%esp + 18b40: 68 22 b5 01 00 push $0x1b522 + 18b45: e8 16 0f 00 00 call 19a60 <_DbgPrint> + 18b4a: 83 c4 10 add $0x10,%esp + 18b4d: 83 ec 04 sub $0x4,%esp + 18b50: 6a 7c push $0x7c + 18b52: 68 c4 b2 01 00 push $0x1b2c4 + 18b57: 68 d0 b2 01 00 push $0x1b2d0 + 18b5c: e8 ff 0e 00 00 call 19a60 <_DbgPrint> + 18b61: 83 c4 10 add $0x10,%esp + 18b64: 83 ec 04 sub $0x4,%esp + 18b67: 8b 45 08 mov 0x8(%ebp),%eax + 18b6a: 80 38 09 cmpb $0x9,(%eax) + 18b6d: 75 09 jne 18b78 <_usb_show_config_descriptor+0x58> + 18b6f: c7 45 fc 1a b3 01 00 movl $0x1b31a,0xfffffffc(%ebp) + 18b76: eb 07 jmp 18b7f <_usb_show_config_descriptor+0x5f> + 18b78: c7 45 fc 1b b3 01 00 movl $0x1b31b,0xfffffffc(%ebp) + 18b7f: ff 75 fc pushl 0xfffffffc(%ebp) + 18b82: 8b 45 08 mov 0x8(%ebp),%eax + 18b85: 8a 00 mov (%eax),%al + 18b87: 25 ff 00 00 00 and $0xff,%eax + 18b8c: 50 push %eax + 18b8d: 68 34 b5 01 00 push $0x1b534 + 18b92: e8 c9 0e 00 00 call 19a60 <_DbgPrint> + 18b97: 83 c4 10 add $0x10,%esp + 18b9a: 83 ec 04 sub $0x4,%esp + 18b9d: 6a 7d push $0x7d + 18b9f: 68 c4 b2 01 00 push $0x1b2c4 + 18ba4: 68 d0 b2 01 00 push $0x1b2d0 + 18ba9: e8 b2 0e 00 00 call 19a60 <_DbgPrint> + 18bae: 83 c4 10 add $0x10,%esp + 18bb1: 83 ec 08 sub $0x8,%esp + 18bb4: 8b 45 08 mov 0x8(%ebp),%eax + 18bb7: 8a 40 01 mov 0x1(%eax),%al + 18bba: 25 ff 00 00 00 and $0xff,%eax + 18bbf: 50 push %eax + 18bc0: 68 54 b5 01 00 push $0x1b554 + 18bc5: e8 96 0e 00 00 call 19a60 <_DbgPrint> + 18bca: 83 c4 10 add $0x10,%esp + 18bcd: 83 ec 04 sub $0x4,%esp + 18bd0: 6a 7e push $0x7e + 18bd2: 68 c4 b2 01 00 push $0x1b2c4 + 18bd7: 68 d0 b2 01 00 push $0x1b2d0 + 18bdc: e8 7f 0e 00 00 call 19a60 <_DbgPrint> + 18be1: 83 c4 10 add $0x10,%esp + 18be4: 83 ec 08 sub $0x8,%esp + 18be7: 8b 45 08 mov 0x8(%ebp),%eax + 18bea: 66 8b 40 02 mov 0x2(%eax),%ax + 18bee: 25 ff ff 00 00 and $0xffff,%eax + 18bf3: 50 push %eax + 18bf4: 68 74 b5 01 00 push $0x1b574 + 18bf9: e8 62 0e 00 00 call 19a60 <_DbgPrint> + 18bfe: 83 c4 10 add $0x10,%esp + 18c01: 83 ec 04 sub $0x4,%esp + 18c04: 6a 7f push $0x7f + 18c06: 68 c4 b2 01 00 push $0x1b2c4 + 18c0b: 68 d0 b2 01 00 push $0x1b2d0 + 18c10: e8 4b 0e 00 00 call 19a60 <_DbgPrint> + 18c15: 83 c4 10 add $0x10,%esp + 18c18: 83 ec 08 sub $0x8,%esp + 18c1b: 8b 45 08 mov 0x8(%ebp),%eax + 18c1e: 8a 40 04 mov 0x4(%eax),%al + 18c21: 25 ff 00 00 00 and $0xff,%eax + 18c26: 50 push %eax + 18c27: 68 94 b5 01 00 push $0x1b594 + 18c2c: e8 2f 0e 00 00 call 19a60 <_DbgPrint> + 18c31: 83 c4 10 add $0x10,%esp + 18c34: 83 ec 04 sub $0x4,%esp + 18c37: 68 80 00 00 00 push $0x80 + 18c3c: 68 c4 b2 01 00 push $0x1b2c4 + 18c41: 68 d0 b2 01 00 push $0x1b2d0 + 18c46: e8 15 0e 00 00 call 19a60 <_DbgPrint> + 18c4b: 83 c4 10 add $0x10,%esp + 18c4e: 83 ec 08 sub $0x8,%esp + 18c51: 8b 45 08 mov 0x8(%ebp),%eax + 18c54: 8a 40 05 mov 0x5(%eax),%al + 18c57: 25 ff 00 00 00 and $0xff,%eax + 18c5c: 50 push %eax + 18c5d: 68 b4 b5 01 00 push $0x1b5b4 + 18c62: e8 f9 0d 00 00 call 19a60 <_DbgPrint> + 18c67: 83 c4 10 add $0x10,%esp + 18c6a: 83 ec 04 sub $0x4,%esp + 18c6d: 68 81 00 00 00 push $0x81 + 18c72: 68 c4 b2 01 00 push $0x1b2c4 + 18c77: 68 d0 b2 01 00 push $0x1b2d0 + 18c7c: e8 df 0d 00 00 call 19a60 <_DbgPrint> + 18c81: 83 c4 10 add $0x10,%esp + 18c84: 83 ec 08 sub $0x8,%esp + 18c87: 8b 45 08 mov 0x8(%ebp),%eax + 18c8a: 8a 40 06 mov 0x6(%eax),%al + 18c8d: 25 ff 00 00 00 and $0xff,%eax + 18c92: 50 push %eax + 18c93: 68 d4 b5 01 00 push $0x1b5d4 + 18c98: e8 c3 0d 00 00 call 19a60 <_DbgPrint> + 18c9d: 83 c4 10 add $0x10,%esp + 18ca0: 83 ec 04 sub $0x4,%esp + 18ca3: 68 82 00 00 00 push $0x82 + 18ca8: 68 c4 b2 01 00 push $0x1b2c4 + 18cad: 68 d0 b2 01 00 push $0x1b2d0 + 18cb2: e8 a9 0d 00 00 call 19a60 <_DbgPrint> + 18cb7: 83 c4 10 add $0x10,%esp + 18cba: 83 ec 08 sub $0x8,%esp + 18cbd: 8b 45 08 mov 0x8(%ebp),%eax + 18cc0: 8a 40 07 mov 0x7(%eax),%al + 18cc3: 25 ff 00 00 00 and $0xff,%eax + 18cc8: 50 push %eax + 18cc9: 68 f4 b5 01 00 push $0x1b5f4 + 18cce: e8 8d 0d 00 00 call 19a60 <_DbgPrint> + 18cd3: 83 c4 10 add $0x10,%esp + 18cd6: 83 ec 04 sub $0x4,%esp + 18cd9: 68 83 00 00 00 push $0x83 + 18cde: 68 c4 b2 01 00 push $0x1b2c4 + 18ce3: 68 d0 b2 01 00 push $0x1b2d0 + 18ce8: e8 73 0d 00 00 call 19a60 <_DbgPrint> + 18ced: 83 c4 10 add $0x10,%esp + 18cf0: 83 ec 08 sub $0x8,%esp + 18cf3: 8b 45 08 mov 0x8(%ebp),%eax + 18cf6: 8a 40 08 mov 0x8(%eax),%al + 18cf9: 25 ff 00 00 00 and $0xff,%eax + 18cfe: 01 c0 add %eax,%eax + 18d00: 50 push %eax + 18d01: 68 14 b6 01 00 push $0x1b614 + 18d06: e8 55 0d 00 00 call 19a60 <_DbgPrint> + 18d0b: 83 c4 10 add $0x10,%esp + 18d0e: c9 leave + 18d0f: c3 ret + +00018d10 <_usb_show_interface_descriptor>: + 18d10: 55 push %ebp + 18d11: 89 e5 mov %esp,%ebp + 18d13: 83 ec 08 sub $0x8,%esp + 18d16: 83 ec 04 sub $0x4,%esp + 18d19: 68 88 00 00 00 push $0x88 + 18d1e: 68 c4 b2 01 00 push $0x1b2c4 + 18d23: 68 d0 b2 01 00 push $0x1b2d0 + 18d28: e8 33 0d 00 00 call 19a60 <_DbgPrint> + 18d2d: 83 c4 10 add $0x10,%esp + 18d30: 83 ec 08 sub $0x8,%esp + 18d33: 8b 45 08 mov 0x8(%ebp),%eax + 18d36: 8a 40 03 mov 0x3(%eax),%al + 18d39: 25 ff 00 00 00 and $0xff,%eax + 18d3e: 50 push %eax + 18d3f: 68 34 b6 01 00 push $0x1b634 + 18d44: e8 17 0d 00 00 call 19a60 <_DbgPrint> + 18d49: 83 c4 10 add $0x10,%esp + 18d4c: 83 ec 04 sub $0x4,%esp + 18d4f: 68 8a 00 00 00 push $0x8a + 18d54: 68 c4 b2 01 00 push $0x1b2c4 + 18d59: 68 d0 b2 01 00 push $0x1b2d0 + 18d5e: e8 fd 0c 00 00 call 19a60 <_DbgPrint> + 18d63: 83 c4 10 add $0x10,%esp + 18d66: 83 ec 04 sub $0x4,%esp + 18d69: 8b 45 08 mov 0x8(%ebp),%eax + 18d6c: 80 38 09 cmpb $0x9,(%eax) + 18d6f: 75 09 jne 18d7a <_usb_show_interface_descriptor+0x6a> + 18d71: c7 45 fc 1a b3 01 00 movl $0x1b31a,0xfffffffc(%ebp) + 18d78: eb 07 jmp 18d81 <_usb_show_interface_descriptor+0x71> + 18d7a: c7 45 fc 1b b3 01 00 movl $0x1b31b,0xfffffffc(%ebp) + 18d81: ff 75 fc pushl 0xfffffffc(%ebp) + 18d84: 8b 45 08 mov 0x8(%ebp),%eax + 18d87: 8a 00 mov (%eax),%al + 18d89: 25 ff 00 00 00 and $0xff,%eax + 18d8e: 50 push %eax + 18d8f: 68 50 b6 01 00 push $0x1b650 + 18d94: e8 c7 0c 00 00 call 19a60 <_DbgPrint> + 18d99: 83 c4 10 add $0x10,%esp + 18d9c: 83 ec 04 sub $0x4,%esp + 18d9f: 68 8b 00 00 00 push $0x8b + 18da4: 68 c4 b2 01 00 push $0x1b2c4 + 18da9: 68 d0 b2 01 00 push $0x1b2d0 + 18dae: e8 ad 0c 00 00 call 19a60 <_DbgPrint> + 18db3: 83 c4 10 add $0x10,%esp + 18db6: 83 ec 08 sub $0x8,%esp + 18db9: 8b 45 08 mov 0x8(%ebp),%eax + 18dbc: 8a 40 01 mov 0x1(%eax),%al + 18dbf: 25 ff 00 00 00 and $0xff,%eax + 18dc4: 50 push %eax + 18dc5: 68 74 b6 01 00 push $0x1b674 + 18dca: e8 91 0c 00 00 call 19a60 <_DbgPrint> + 18dcf: 83 c4 10 add $0x10,%esp + 18dd2: 83 ec 04 sub $0x4,%esp + 18dd5: 68 8c 00 00 00 push $0x8c + 18dda: 68 c4 b2 01 00 push $0x1b2c4 + 18ddf: 68 d0 b2 01 00 push $0x1b2d0 + 18de4: e8 77 0c 00 00 call 19a60 <_DbgPrint> + 18de9: 83 c4 10 add $0x10,%esp + 18dec: 83 ec 08 sub $0x8,%esp + 18def: 8b 45 08 mov 0x8(%ebp),%eax + 18df2: 8a 40 02 mov 0x2(%eax),%al + 18df5: 25 ff 00 00 00 and $0xff,%eax + 18dfa: 50 push %eax + 18dfb: 68 98 b6 01 00 push $0x1b698 + 18e00: e8 5b 0c 00 00 call 19a60 <_DbgPrint> + 18e05: 83 c4 10 add $0x10,%esp + 18e08: 83 ec 04 sub $0x4,%esp + 18e0b: 68 8d 00 00 00 push $0x8d + 18e10: 68 c4 b2 01 00 push $0x1b2c4 + 18e15: 68 d0 b2 01 00 push $0x1b2d0 + 18e1a: e8 41 0c 00 00 call 19a60 <_DbgPrint> + 18e1f: 83 c4 10 add $0x10,%esp + 18e22: 83 ec 08 sub $0x8,%esp + 18e25: 8b 45 08 mov 0x8(%ebp),%eax + 18e28: 8a 40 03 mov 0x3(%eax),%al + 18e2b: 25 ff 00 00 00 and $0xff,%eax + 18e30: 50 push %eax + 18e31: 68 bc b6 01 00 push $0x1b6bc + 18e36: e8 25 0c 00 00 call 19a60 <_DbgPrint> + 18e3b: 83 c4 10 add $0x10,%esp + 18e3e: 83 ec 04 sub $0x4,%esp + 18e41: 68 8e 00 00 00 push $0x8e + 18e46: 68 c4 b2 01 00 push $0x1b2c4 + 18e4b: 68 d0 b2 01 00 push $0x1b2d0 + 18e50: e8 0b 0c 00 00 call 19a60 <_DbgPrint> + 18e55: 83 c4 10 add $0x10,%esp + 18e58: 83 ec 08 sub $0x8,%esp + 18e5b: 8b 45 08 mov 0x8(%ebp),%eax + 18e5e: 8a 40 04 mov 0x4(%eax),%al + 18e61: 25 ff 00 00 00 and $0xff,%eax + 18e66: 50 push %eax + 18e67: 68 e0 b6 01 00 push $0x1b6e0 + 18e6c: e8 ef 0b 00 00 call 19a60 <_DbgPrint> + 18e71: 83 c4 10 add $0x10,%esp + 18e74: 83 ec 04 sub $0x4,%esp + 18e77: 68 90 00 00 00 push $0x90 + 18e7c: 68 c4 b2 01 00 push $0x1b2c4 + 18e81: 68 d0 b2 01 00 push $0x1b2d0 + 18e86: e8 d5 0b 00 00 call 19a60 <_DbgPrint> + 18e8b: 83 c4 10 add $0x10,%esp + 18e8e: 8b 45 08 mov 0x8(%ebp),%eax + 18e91: 8a 40 07 mov 0x7(%eax),%al + 18e94: 25 ff 00 00 00 and $0xff,%eax + 18e99: 50 push %eax + 18e9a: 8b 45 08 mov 0x8(%ebp),%eax + 18e9d: 8a 40 06 mov 0x6(%eax),%al + 18ea0: 25 ff 00 00 00 and $0xff,%eax + 18ea5: 50 push %eax + 18ea6: 8b 45 08 mov 0x8(%ebp),%eax + 18ea9: 8a 40 05 mov 0x5(%eax),%al + 18eac: 25 ff 00 00 00 and $0xff,%eax + 18eb1: 50 push %eax + 18eb2: 68 04 b7 01 00 push $0x1b704 + 18eb7: e8 a4 0b 00 00 call 19a60 <_DbgPrint> + 18ebc: 83 c4 10 add $0x10,%esp + 18ebf: 83 ec 04 sub $0x4,%esp + 18ec2: 68 91 00 00 00 push $0x91 + 18ec7: 68 c4 b2 01 00 push $0x1b2c4 + 18ecc: 68 d0 b2 01 00 push $0x1b2d0 + 18ed1: e8 8a 0b 00 00 call 19a60 <_DbgPrint> + 18ed6: 83 c4 10 add $0x10,%esp + 18ed9: 83 ec 08 sub $0x8,%esp + 18edc: 8b 45 08 mov 0x8(%ebp),%eax + 18edf: 8a 40 08 mov 0x8(%eax),%al + 18ee2: 25 ff 00 00 00 and $0xff,%eax + 18ee7: 50 push %eax + 18ee8: 68 40 b7 01 00 push $0x1b740 + 18eed: e8 6e 0b 00 00 call 19a60 <_DbgPrint> + 18ef2: 83 c4 10 add $0x10,%esp + 18ef5: c9 leave + 18ef6: c3 ret + +00018ef7 <_usb_show_endpoint_descriptor>: + 18ef7: 55 push %ebp + 18ef8: 89 e5 mov %esp,%ebp + 18efa: 83 ec 38 sub $0x38,%esp + 18efd: 8b 45 08 mov 0x8(%ebp),%eax + 18f00: 80 38 09 cmpb $0x9,(%eax) + 18f03: 74 1a je 18f1f <_usb_show_endpoint_descriptor+0x28> + 18f05: 8b 45 08 mov 0x8(%ebp),%eax + 18f08: 80 38 07 cmpb $0x7,(%eax) + 18f0b: 75 09 jne 18f16 <_usb_show_endpoint_descriptor+0x1f> + 18f0d: c7 45 d4 1a b3 01 00 movl $0x1b31a,0xffffffd4(%ebp) + 18f14: eb 10 jmp 18f26 <_usb_show_endpoint_descriptor+0x2f> + 18f16: c7 45 d4 1b b3 01 00 movl $0x1b31b,0xffffffd4(%ebp) + 18f1d: eb 07 jmp 18f26 <_usb_show_endpoint_descriptor+0x2f> + 18f1f: c7 45 d4 62 b7 01 00 movl $0x1b762,0xffffffd4(%ebp) + 18f26: 8b 45 d4 mov 0xffffffd4(%ebp),%eax + 18f29: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 18f2c: c7 45 d8 6b b7 01 00 movl $0x1b76b,0xffffffd8(%ebp) + 18f33: c7 45 dc 73 b7 01 00 movl $0x1b773,0xffffffdc(%ebp) + 18f3a: c7 45 e0 7f b7 01 00 movl $0x1b77f,0xffffffe0(%ebp) + 18f41: c7 45 e4 84 b7 01 00 movl $0x1b784,0xffffffe4(%ebp) + 18f48: 83 ec 04 sub $0x4,%esp + 18f4b: 68 9b 00 00 00 push $0x9b + 18f50: 68 c4 b2 01 00 push $0x1b2c4 + 18f55: 68 d0 b2 01 00 push $0x1b2d0 + 18f5a: e8 01 0b 00 00 call 19a60 <_DbgPrint> + 18f5f: 83 c4 10 add $0x10,%esp + 18f62: 83 ec 0c sub $0xc,%esp + 18f65: 68 8e b7 01 00 push $0x1b78e + 18f6a: e8 f1 0a 00 00 call 19a60 <_DbgPrint> + 18f6f: 83 c4 10 add $0x10,%esp + 18f72: 83 ec 04 sub $0x4,%esp + 18f75: 68 9d 00 00 00 push $0x9d + 18f7a: 68 c4 b2 01 00 push $0x1b2c4 + 18f7f: 68 d0 b2 01 00 push $0x1b2d0 + 18f84: e8 d7 0a 00 00 call 19a60 <_DbgPrint> + 18f89: 83 c4 10 add $0x10,%esp + 18f8c: 83 ec 04 sub $0x4,%esp + 18f8f: ff 75 f4 pushl 0xfffffff4(%ebp) + 18f92: 8b 45 08 mov 0x8(%ebp),%eax + 18f95: 8a 00 mov (%eax),%al + 18f97: 25 ff 00 00 00 and $0xff,%eax + 18f9c: 50 push %eax + 18f9d: 68 a0 b7 01 00 push $0x1b7a0 + 18fa2: e8 b9 0a 00 00 call 19a60 <_DbgPrint> + 18fa7: 83 c4 10 add $0x10,%esp + 18faa: 83 ec 04 sub $0x4,%esp + 18fad: 68 9e 00 00 00 push $0x9e + 18fb2: 68 c4 b2 01 00 push $0x1b2c4 + 18fb7: 68 d0 b2 01 00 push $0x1b2d0 + 18fbc: e8 9f 0a 00 00 call 19a60 <_DbgPrint> + 18fc1: 83 c4 10 add $0x10,%esp + 18fc4: 83 ec 08 sub $0x8,%esp + 18fc7: 8b 45 08 mov 0x8(%ebp),%eax + 18fca: 8a 40 01 mov 0x1(%eax),%al + 18fcd: 25 ff 00 00 00 and $0xff,%eax + 18fd2: 50 push %eax + 18fd3: 68 c4 b7 01 00 push $0x1b7c4 + 18fd8: e8 83 0a 00 00 call 19a60 <_DbgPrint> + 18fdd: 83 c4 10 add $0x10,%esp + 18fe0: 83 ec 04 sub $0x4,%esp + 18fe3: 68 a2 00 00 00 push $0xa2 + 18fe8: 68 c4 b2 01 00 push $0x1b2c4 + 18fed: 68 d0 b2 01 00 push $0x1b2d0 + 18ff2: e8 69 0a 00 00 call 19a60 <_DbgPrint> + 18ff7: 83 c4 10 add $0x10,%esp + 18ffa: 83 ec 04 sub $0x4,%esp + 18ffd: 8b 45 08 mov 0x8(%ebp),%eax + 19000: 8a 40 03 mov 0x3(%eax),%al + 19003: 25 ff 00 00 00 and $0xff,%eax + 19008: 83 e0 03 and $0x3,%eax + 1900b: 85 c0 test %eax,%eax + 1900d: 74 21 je 19030 <_usb_show_endpoint_descriptor+0x139> + 1900f: 8b 45 08 mov 0x8(%ebp),%eax + 19012: 80 78 02 00 cmpb $0x0,0x2(%eax) + 19016: 79 09 jns 19021 <_usb_show_endpoint_descriptor+0x12a> + 19018: c7 45 cc e8 b7 01 00 movl $0x1b7e8,0xffffffcc(%ebp) + 1901f: eb 07 jmp 19028 <_usb_show_endpoint_descriptor+0x131> + 19021: c7 45 cc eb b7 01 00 movl $0x1b7eb,0xffffffcc(%ebp) + 19028: 8b 45 cc mov 0xffffffcc(%ebp),%eax + 1902b: 89 45 d0 mov %eax,0xffffffd0(%ebp) + 1902e: eb 07 jmp 19037 <_usb_show_endpoint_descriptor+0x140> + 19030: c7 45 d0 ef b7 01 00 movl $0x1b7ef,0xffffffd0(%ebp) + 19037: ff 75 d0 pushl 0xffffffd0(%ebp) + 1903a: 8b 45 08 mov 0x8(%ebp),%eax + 1903d: 8a 40 02 mov 0x2(%eax),%al + 19040: 25 ff 00 00 00 and $0xff,%eax + 19045: 50 push %eax + 19046: 68 f4 b7 01 00 push $0x1b7f4 + 1904b: e8 10 0a 00 00 call 19a60 <_DbgPrint> + 19050: 83 c4 10 add $0x10,%esp + 19053: 83 ec 04 sub $0x4,%esp + 19056: 68 a4 00 00 00 push $0xa4 + 1905b: 68 c4 b2 01 00 push $0x1b2c4 + 19060: 68 d0 b2 01 00 push $0x1b2d0 + 19065: e8 f6 09 00 00 call 19a60 <_DbgPrint> + 1906a: 83 c4 10 add $0x10,%esp + 1906d: 83 ec 04 sub $0x4,%esp + 19070: 8b 45 08 mov 0x8(%ebp),%eax + 19073: 8a 40 03 mov 0x3(%eax),%al + 19076: 25 ff 00 00 00 and $0xff,%eax + 1907b: 83 e0 03 and $0x3,%eax + 1907e: ff 74 85 d8 pushl 0xffffffd8(%ebp,%eax,4) + 19082: 8b 45 08 mov 0x8(%ebp),%eax + 19085: 8a 40 03 mov 0x3(%eax),%al + 19088: 25 ff 00 00 00 and $0xff,%eax + 1908d: 50 push %eax + 1908e: 68 20 b8 01 00 push $0x1b820 + 19093: e8 c8 09 00 00 call 19a60 <_DbgPrint> + 19098: 83 c4 10 add $0x10,%esp + 1909b: 83 ec 04 sub $0x4,%esp + 1909e: 68 a5 00 00 00 push $0xa5 + 190a3: 68 c4 b2 01 00 push $0x1b2c4 + 190a8: 68 d0 b2 01 00 push $0x1b2d0 + 190ad: e8 ae 09 00 00 call 19a60 <_DbgPrint> + 190b2: 83 c4 10 add $0x10,%esp + 190b5: 83 ec 08 sub $0x8,%esp + 190b8: 8b 45 08 mov 0x8(%ebp),%eax + 190bb: 66 8b 40 04 mov 0x4(%eax),%ax + 190bf: 25 ff ff 00 00 and $0xffff,%eax + 190c4: 50 push %eax + 190c5: 68 4c b8 01 00 push $0x1b84c + 190ca: e8 91 09 00 00 call 19a60 <_DbgPrint> + 190cf: 83 c4 10 add $0x10,%esp + 190d2: 83 ec 04 sub $0x4,%esp + 190d5: 68 a6 00 00 00 push $0xa6 + 190da: 68 c4 b2 01 00 push $0x1b2c4 + 190df: 68 d0 b2 01 00 push $0x1b2d0 + 190e4: e8 77 09 00 00 call 19a60 <_DbgPrint> + 190e9: 83 c4 10 add $0x10,%esp + 190ec: 83 ec 08 sub $0x8,%esp + 190ef: 8b 45 08 mov 0x8(%ebp),%eax + 190f2: 8a 40 06 mov 0x6(%eax),%al + 190f5: 25 ff 00 00 00 and $0xff,%eax + 190fa: 50 push %eax + 190fb: 68 70 b8 01 00 push $0x1b870 + 19100: e8 5b 09 00 00 call 19a60 <_DbgPrint> + 19105: 83 c4 10 add $0x10,%esp + 19108: 8b 45 08 mov 0x8(%ebp),%eax + 1910b: 80 38 09 cmpb $0x9,(%eax) + 1910e: 75 6c jne 1917c <_usb_show_endpoint_descriptor+0x285> + 19110: 83 ec 04 sub $0x4,%esp + 19113: 68 aa 00 00 00 push $0xaa + 19118: 68 c4 b2 01 00 push $0x1b2c4 + 1911d: 68 d0 b2 01 00 push $0x1b2d0 + 19122: e8 39 09 00 00 call 19a60 <_DbgPrint> + 19127: 83 c4 10 add $0x10,%esp + 1912a: 83 ec 08 sub $0x8,%esp + 1912d: 8b 45 08 mov 0x8(%ebp),%eax + 19130: 8a 40 07 mov 0x7(%eax),%al + 19133: 25 ff 00 00 00 and $0xff,%eax + 19138: 50 push %eax + 19139: 68 94 b8 01 00 push $0x1b894 + 1913e: e8 1d 09 00 00 call 19a60 <_DbgPrint> + 19143: 83 c4 10 add $0x10,%esp + 19146: 83 ec 04 sub $0x4,%esp + 19149: 68 ab 00 00 00 push $0xab + 1914e: 68 c4 b2 01 00 push $0x1b2c4 + 19153: 68 d0 b2 01 00 push $0x1b2d0 + 19158: e8 03 09 00 00 call 19a60 <_DbgPrint> + 1915d: 83 c4 10 add $0x10,%esp + 19160: 83 ec 08 sub $0x8,%esp + 19163: 8b 45 08 mov 0x8(%ebp),%eax + 19166: 8a 40 08 mov 0x8(%eax),%al + 19169: 25 ff 00 00 00 and $0xff,%eax + 1916e: 50 push %eax + 1916f: 68 b8 b8 01 00 push $0x1b8b8 + 19174: e8 e7 08 00 00 call 19a60 <_DbgPrint> + 19179: 83 c4 10 add $0x10,%esp + 1917c: c9 leave + 1917d: c3 ret + +0001917e <_usb_show_string>: + 1917e: 55 push %ebp + 1917f: 89 e5 mov %esp,%ebp + 19181: 83 ec 08 sub $0x8,%esp + 19184: 83 7d 10 00 cmpl $0x0,0x10(%ebp) + 19188: 75 02 jne 1918c <_usb_show_string+0xe> + 1918a: eb 42 jmp 191ce <_usb_show_string+0x50> + 1918c: 83 ec 08 sub $0x8,%esp + 1918f: 68 00 01 00 00 push $0x100 + 19194: 6a 01 push $0x1 + 19196: e8 95 08 00 00 call 19a30 <_ExAllocatePool@8> + 1919b: 83 c4 08 add $0x8,%esp + 1919e: 89 45 fc mov %eax,0xfffffffc(%ebp) + 191a1: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 191a4: 85 c0 test %eax,%eax + 191a6: 75 02 jne 191aa <_usb_show_string+0x2c> + 191a8: eb 24 jmp 191ce <_usb_show_string+0x50> + 191aa: 68 00 01 00 00 push $0x100 + 191af: ff 75 fc pushl 0xfffffffc(%ebp) + 191b2: ff 75 10 pushl 0x10(%ebp) + 191b5: ff 75 08 pushl 0x8(%ebp) + 191b8: e8 26 8a ff ff call 11be3 <_usb_string> + 191bd: 83 c4 10 add $0x10,%esp + 191c0: 83 ec 0c sub $0xc,%esp + 191c3: ff 75 fc pushl 0xfffffffc(%ebp) + 191c6: e8 75 08 00 00 call 19a40 <_ExFreePool@4> + 191cb: 83 c4 0c add $0xc,%esp + 191ce: c9 leave + 191cf: c3 ret + +000191d0 <_usb_dump_urb>: + 191d0: 55 push %ebp + 191d1: 89 e5 mov %esp,%ebp + 191d3: 83 ec 08 sub $0x8,%esp + 191d6: 83 ec 04 sub $0x4,%esp + 191d9: 68 be 00 00 00 push $0xbe + 191de: 68 c4 b2 01 00 push $0x1b2c4 + 191e3: 68 d0 b2 01 00 push $0x1b2d0 + 191e8: e8 73 08 00 00 call 19a60 <_DbgPrint> + 191ed: 83 c4 10 add $0x10,%esp + 191f0: 83 ec 08 sub $0x8,%esp + 191f3: ff 75 08 pushl 0x8(%ebp) + 191f6: 68 dc b8 01 00 push $0x1b8dc + 191fb: e8 60 08 00 00 call 19a60 <_DbgPrint> + 19200: 83 c4 10 add $0x10,%esp + 19203: 83 ec 04 sub $0x4,%esp + 19206: 68 bf 00 00 00 push $0xbf + 1920b: 68 c4 b2 01 00 push $0x1b2c4 + 19210: 68 d0 b2 01 00 push $0x1b2d0 + 19215: e8 46 08 00 00 call 19a60 <_DbgPrint> + 1921a: 83 c4 10 add $0x10,%esp + 1921d: 83 ec 08 sub $0x8,%esp + 19220: 8b 45 08 mov 0x8(%ebp),%eax + 19223: ff 70 14 pushl 0x14(%eax) + 19226: 68 f7 b8 01 00 push $0x1b8f7 + 1922b: e8 30 08 00 00 call 19a60 <_DbgPrint> + 19230: 83 c4 10 add $0x10,%esp + 19233: 83 ec 04 sub $0x4,%esp + 19236: 68 c0 00 00 00 push $0xc0 + 1923b: 68 c4 b2 01 00 push $0x1b2c4 + 19240: 68 d0 b2 01 00 push $0x1b2d0 + 19245: e8 16 08 00 00 call 19a60 <_DbgPrint> + 1924a: 83 c4 10 add $0x10,%esp + 1924d: 83 ec 08 sub $0x8,%esp + 19250: 8b 45 08 mov 0x8(%ebp),%eax + 19253: ff 70 18 pushl 0x18(%eax) + 19256: 68 12 b9 01 00 push $0x1b912 + 1925b: e8 00 08 00 00 call 19a60 <_DbgPrint> + 19260: 83 c4 10 add $0x10,%esp + 19263: 83 ec 04 sub $0x4,%esp + 19266: 68 c1 00 00 00 push $0xc1 + 1926b: 68 c4 b2 01 00 push $0x1b2c4 + 19270: 68 d0 b2 01 00 push $0x1b2d0 + 19275: e8 e6 07 00 00 call 19a60 <_DbgPrint> + 1927a: 83 c4 10 add $0x10,%esp + 1927d: 83 ec 08 sub $0x8,%esp + 19280: 8b 45 08 mov 0x8(%ebp),%eax + 19283: ff 70 1c pushl 0x1c(%eax) + 19286: 68 2f b9 01 00 push $0x1b92f + 1928b: e8 d0 07 00 00 call 19a60 <_DbgPrint> + 19290: 83 c4 10 add $0x10,%esp + 19293: 83 ec 04 sub $0x4,%esp + 19296: 68 c2 00 00 00 push $0xc2 + 1929b: 68 c4 b2 01 00 push $0x1b2c4 + 192a0: 68 d0 b2 01 00 push $0x1b2d0 + 192a5: e8 b6 07 00 00 call 19a60 <_DbgPrint> + 192aa: 83 c4 10 add $0x10,%esp + 192ad: 83 ec 08 sub $0x8,%esp + 192b0: 8b 45 08 mov 0x8(%ebp),%eax + 192b3: ff 70 20 pushl 0x20(%eax) + 192b6: 68 4a b9 01 00 push $0x1b94a + 192bb: e8 a0 07 00 00 call 19a60 <_DbgPrint> + 192c0: 83 c4 10 add $0x10,%esp + 192c3: 83 ec 04 sub $0x4,%esp + 192c6: 68 c3 00 00 00 push $0xc3 + 192cb: 68 c4 b2 01 00 push $0x1b2c4 + 192d0: 68 d0 b2 01 00 push $0x1b2d0 + 192d5: e8 86 07 00 00 call 19a60 <_DbgPrint> + 192da: 83 c4 10 add $0x10,%esp + 192dd: 83 ec 08 sub $0x8,%esp + 192e0: 8b 45 08 mov 0x8(%ebp),%eax + 192e3: ff 70 24 pushl 0x24(%eax) + 192e6: 68 67 b9 01 00 push $0x1b967 + 192eb: e8 70 07 00 00 call 19a60 <_DbgPrint> + 192f0: 83 c4 10 add $0x10,%esp + 192f3: 83 ec 04 sub $0x4,%esp + 192f6: 68 c4 00 00 00 push $0xc4 + 192fb: 68 c4 b2 01 00 push $0x1b2c4 + 19300: 68 d0 b2 01 00 push $0x1b2d0 + 19305: e8 56 07 00 00 call 19a60 <_DbgPrint> + 1930a: 83 c4 10 add $0x10,%esp + 1930d: 83 ec 08 sub $0x8,%esp + 19310: 8b 45 08 mov 0x8(%ebp),%eax + 19313: ff 70 2c pushl 0x2c(%eax) + 19316: 68 82 b9 01 00 push $0x1b982 + 1931b: e8 40 07 00 00 call 19a60 <_DbgPrint> + 19320: 83 c4 10 add $0x10,%esp + 19323: 83 ec 04 sub $0x4,%esp + 19326: 68 c5 00 00 00 push $0xc5 + 1932b: 68 c4 b2 01 00 push $0x1b2c4 + 19330: 68 d0 b2 01 00 push $0x1b2d0 + 19335: e8 26 07 00 00 call 19a60 <_DbgPrint> + 1933a: 83 c4 10 add $0x10,%esp + 1933d: 83 ec 08 sub $0x8,%esp + 19340: 8b 45 08 mov 0x8(%ebp),%eax + 19343: ff 70 30 pushl 0x30(%eax) + 19346: 68 9d b9 01 00 push $0x1b99d + 1934b: e8 10 07 00 00 call 19a60 <_DbgPrint> + 19350: 83 c4 10 add $0x10,%esp + 19353: 83 ec 04 sub $0x4,%esp + 19356: 68 c6 00 00 00 push $0xc6 + 1935b: 68 c4 b2 01 00 push $0x1b2c4 + 19360: 68 d0 b2 01 00 push $0x1b2d0 + 19365: e8 f6 06 00 00 call 19a60 <_DbgPrint> + 1936a: 83 c4 10 add $0x10,%esp + 1936d: 83 ec 08 sub $0x8,%esp + 19370: 8b 45 08 mov 0x8(%ebp),%eax + 19373: ff 70 38 pushl 0x38(%eax) + 19376: 68 b8 b9 01 00 push $0x1b9b8 + 1937b: e8 e0 06 00 00 call 19a60 <_DbgPrint> + 19380: 83 c4 10 add $0x10,%esp + 19383: 83 ec 04 sub $0x4,%esp + 19386: 68 c7 00 00 00 push $0xc7 + 1938b: 68 c4 b2 01 00 push $0x1b2c4 + 19390: 68 d0 b2 01 00 push $0x1b2d0 + 19395: e8 c6 06 00 00 call 19a60 <_DbgPrint> + 1939a: 83 c4 10 add $0x10,%esp + 1939d: 83 ec 08 sub $0x8,%esp + 193a0: 8b 45 08 mov 0x8(%ebp),%eax + 193a3: ff 70 40 pushl 0x40(%eax) + 193a6: 68 d3 b9 01 00 push $0x1b9d3 + 193ab: e8 b0 06 00 00 call 19a60 <_DbgPrint> + 193b0: 83 c4 10 add $0x10,%esp + 193b3: 83 ec 04 sub $0x4,%esp + 193b6: 68 c8 00 00 00 push $0xc8 + 193bb: 68 c4 b2 01 00 push $0x1b2c4 + 193c0: 68 d0 b2 01 00 push $0x1b2d0 + 193c5: e8 96 06 00 00 call 19a60 <_DbgPrint> + 193ca: 83 c4 10 add $0x10,%esp + 193cd: 83 ec 08 sub $0x8,%esp + 193d0: 8b 45 08 mov 0x8(%ebp),%eax + 193d3: ff 70 44 pushl 0x44(%eax) + 193d6: 68 ee b9 01 00 push $0x1b9ee + 193db: e8 80 06 00 00 call 19a60 <_DbgPrint> + 193e0: 83 c4 10 add $0x10,%esp + 193e3: 83 ec 04 sub $0x4,%esp + 193e6: 68 c9 00 00 00 push $0xc9 + 193eb: 68 c4 b2 01 00 push $0x1b2c4 + 193f0: 68 d0 b2 01 00 push $0x1b2d0 + 193f5: e8 66 06 00 00 call 19a60 <_DbgPrint> + 193fa: 83 c4 10 add $0x10,%esp + 193fd: 83 ec 08 sub $0x8,%esp + 19400: 8b 45 08 mov 0x8(%ebp),%eax + 19403: ff 70 48 pushl 0x48(%eax) + 19406: 68 09 ba 01 00 push $0x1ba09 + 1940b: e8 50 06 00 00 call 19a60 <_DbgPrint> + 19410: 83 c4 10 add $0x10,%esp + 19413: 83 ec 04 sub $0x4,%esp + 19416: 68 ca 00 00 00 push $0xca + 1941b: 68 c4 b2 01 00 push $0x1b2c4 + 19420: 68 d0 b2 01 00 push $0x1b2d0 + 19425: e8 36 06 00 00 call 19a60 <_DbgPrint> + 1942a: 83 c4 10 add $0x10,%esp + 1942d: 83 ec 08 sub $0x8,%esp + 19430: 8b 45 08 mov 0x8(%ebp),%eax + 19433: ff 70 4c pushl 0x4c(%eax) + 19436: 68 24 ba 01 00 push $0x1ba24 + 1943b: e8 20 06 00 00 call 19a60 <_DbgPrint> + 19440: 83 c4 10 add $0x10,%esp + 19443: 83 ec 04 sub $0x4,%esp + 19446: 68 cb 00 00 00 push $0xcb + 1944b: 68 c4 b2 01 00 push $0x1b2c4 + 19450: 68 d0 b2 01 00 push $0x1b2d0 + 19455: e8 06 06 00 00 call 19a60 <_DbgPrint> + 1945a: 83 c4 10 add $0x10,%esp + 1945d: 83 ec 08 sub $0x8,%esp + 19460: 8b 45 08 mov 0x8(%ebp),%eax + 19463: ff 70 54 pushl 0x54(%eax) + 19466: 68 3f ba 01 00 push $0x1ba3f + 1946b: e8 f0 05 00 00 call 19a60 <_DbgPrint> + 19470: 83 c4 10 add $0x10,%esp + 19473: 83 ec 04 sub $0x4,%esp + 19476: 68 cc 00 00 00 push $0xcc + 1947b: 68 c4 b2 01 00 push $0x1b2c4 + 19480: 68 d0 b2 01 00 push $0x1b2d0 + 19485: e8 d6 05 00 00 call 19a60 <_DbgPrint> + 1948a: 83 c4 10 add $0x10,%esp + 1948d: 83 ec 08 sub $0x8,%esp + 19490: 8b 45 08 mov 0x8(%ebp),%eax + 19493: ff 70 58 pushl 0x58(%eax) + 19496: 68 5a ba 01 00 push $0x1ba5a + 1949b: e8 c0 05 00 00 call 19a60 <_DbgPrint> + 194a0: 83 c4 10 add $0x10,%esp + 194a3: c9 leave + 194a4: c3 ret + 194a5: 90 nop + 194a6: 90 nop + 194a7: 90 nop + 194a8: 90 nop + 194a9: 90 nop + 194aa: 90 nop + 194ab: 90 nop + 194ac: 90 nop + 194ad: 90 nop + 194ae: 90 nop + 194af: 90 nop + +000194b0 <_wait_ms>: + 194b0: 55 push %ebp + 194b1: 89 e5 mov %esp,%ebp + 194b3: 83 ec 08 sub $0x8,%esp + 194b6: 8b 55 08 mov 0x8(%ebp),%edx + 194b9: 89 d0 mov %edx,%eax + 194bb: c1 e0 02 shl $0x2,%eax + 194be: 01 d0 add %edx,%eax + 194c0: 01 c0 add %eax,%eax + 194c2: f7 d8 neg %eax + 194c4: 99 cltd + 194c5: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 194c8: 89 55 fc mov %edx,0xfffffffc(%ebp) + 194cb: 83 ec 04 sub $0x4,%esp + 194ce: 8d 45 f8 lea 0xfffffff8(%ebp),%eax + 194d1: 50 push %eax + 194d2: 6a 00 push $0x0 + 194d4: 6a 00 push $0x0 + 194d6: e8 f5 05 00 00 call 19ad0 <_KeDelayExecutionThread@12> + 194db: 83 c4 04 add $0x4,%esp + 194de: c9 leave + 194df: c3 ret + +000194e0 <_init_wrapper>: + 194e0: 55 push %ebp + 194e1: 89 e5 mov %esp,%ebp + 194e3: 83 ec 04 sub $0x4,%esp + 194e6: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) + 194ed: 83 7d fc 13 cmpl $0x13,0xfffffffc(%ebp) + 194f1: 7f 15 jg 19508 <_init_wrapper+0x28> + 194f3: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 194f6: c7 04 85 60 c1 01 00 movl $0x0,0x1c160(,%eax,4) + 194fd: 00 00 00 00 + 19501: 8d 45 fc lea 0xfffffffc(%ebp),%eax + 19504: ff 00 incl (%eax) + 19506: eb e5 jmp 194ed <_init_wrapper+0xd> + 19508: c7 05 40 c2 01 00 00 movl $0x0,0x1c240 + 1950f: 00 00 00 + 19512: c7 05 40 c1 01 00 00 movl $0x0,0x1c140 + 19519: 00 00 00 + 1951c: c7 05 30 c2 01 00 80 movl $0x1c080,0x1c230 + 19523: c0 01 00 + 19526: c7 05 88 c0 01 00 00 movl $0x0,0x1c088 + 1952d: 00 00 00 + 19530: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) + 19537: 83 7d fc 07 cmpl $0x7,0xfffffffc(%ebp) + 1953b: 7f 33 jg 19570 <_init_wrapper+0x90> + 1953d: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 19540: 89 d0 mov %edx,%eax + 19542: 01 c0 add %eax,%eax + 19544: 01 d0 add %edx,%eax + 19546: c1 e0 02 shl $0x2,%eax + 19549: c7 80 d0 c1 01 00 00 movl $0x0,0x1c1d0(%eax) + 19550: 00 00 00 + 19553: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 19556: 89 d0 mov %edx,%eax + 19558: 01 c0 add %eax,%eax + 1955a: 01 d0 add %edx,%eax + 1955c: c1 e0 02 shl $0x2,%eax + 1955f: c7 80 d4 c1 01 00 ff movl $0xffffffff,0x1c1d4(%eax) + 19566: ff ff ff + 19569: 8d 45 fc lea 0xfffffffc(%ebp),%eax + 1956c: ff 00 incl (%eax) + 1956e: eb c7 jmp 19537 <_init_wrapper+0x57> + 19570: c7 05 b8 c0 01 00 00 movl $0x0,0x1c0b8 + 19577: 00 00 00 + 1957a: c7 05 c0 c1 01 00 00 movl $0x0,0x1c1c0 + 19581: 00 00 00 + 19584: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) + 1958b: 83 7d fc 07 cmpl $0x7,0xfffffffc(%ebp) + 1958f: 7f 15 jg 195a6 <_init_wrapper+0xc6> + 19591: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 19594: c7 04 85 98 c0 01 00 movl $0x0,0x1c098(,%eax,4) + 1959b: 00 00 00 00 + 1959f: 8d 45 fc lea 0xfffffffc(%ebp),%eax + 195a2: ff 00 incl (%eax) + 195a4: eb e5 jmp 1958b <_init_wrapper+0xab> + 195a6: c9 leave + 195a7: c3 ret + +000195a8 <_handle_irqs>: + 195a8: 55 push %ebp + 195a9: 89 e5 mov %esp,%ebp + 195ab: 83 ec 08 sub $0x8,%esp + 195ae: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) + 195b5: 83 7d fc 07 cmpl $0x7,0xfffffffc(%ebp) + 195b9: 0f 8f 86 00 00 00 jg 19645 <_handle_irqs+0x9d> + 195bf: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 195c2: 89 c2 mov %eax,%edx + 195c4: 01 d2 add %edx,%edx + 195c6: 01 c2 add %eax,%edx + 195c8: 8d 04 95 00 00 00 00 lea 0x0(,%edx,4),%eax + 195cf: 83 b8 d0 c1 01 00 00 cmpl $0x0,0x1c1d0(%eax) + 195d6: 74 63 je 1963b <_handle_irqs+0x93> + 195d8: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 195db: 89 d0 mov %edx,%eax + 195dd: 01 c0 add %eax,%eax + 195df: 01 d0 add %edx,%eax + 195e1: c1 e0 02 shl $0x2,%eax + 195e4: 8b 80 d4 c1 01 00 mov 0x1c1d4(%eax),%eax + 195ea: 3b 45 08 cmp 0x8(%ebp),%eax + 195ed: 74 08 je 195f7 <_handle_irqs+0x4f> + 195ef: 83 7d 08 ff cmpl $0xffffffff,0x8(%ebp) + 195f3: 74 02 je 195f7 <_handle_irqs+0x4f> + 195f5: eb 44 jmp 1963b <_handle_irqs+0x93> + 195f7: 83 ec 04 sub $0x4,%esp + 195fa: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 195fd: 89 d0 mov %edx,%eax + 195ff: 01 c0 add %eax,%eax + 19601: 01 d0 add %edx,%eax + 19603: 8d 0c 85 00 00 00 00 lea 0x0(,%eax,4),%ecx + 1960a: 6a 00 push $0x0 + 1960c: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 1960f: 89 d0 mov %edx,%eax + 19611: 01 c0 add %eax,%eax + 19613: 01 d0 add %edx,%eax + 19615: c1 e0 02 shl $0x2,%eax + 19618: ff b0 d8 c1 01 00 pushl 0x1c1d8(%eax) + 1961e: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 19621: 89 d0 mov %edx,%eax + 19623: 01 c0 add %eax,%eax + 19625: 01 d0 add %edx,%eax + 19627: c1 e0 02 shl $0x2,%eax + 1962a: ff b0 d4 c1 01 00 pushl 0x1c1d4(%eax) + 19630: 8b 81 d0 c1 01 00 mov 0x1c1d0(%ecx),%eax + 19636: ff d0 call *%eax + 19638: 83 c4 10 add $0x10,%esp + 1963b: 8d 45 fc lea 0xfffffffc(%ebp),%eax + 1963e: ff 00 incl (%eax) + 19640: e9 70 ff ff ff jmp 195b5 <_handle_irqs+0xd> + 19645: c9 leave + 19646: c3 ret + +00019647 <_inc_jiffies>: + 19647: 55 push %ebp + 19648: 89 e5 mov %esp,%ebp + 1964a: 8b 45 08 mov 0x8(%ebp),%eax + 1964d: 01 05 40 c2 01 00 add %eax,0x1c240 + 19653: 5d pop %ebp + 19654: c3 ret + +00019655 <_do_all_timers>: + 19655: 55 push %ebp + 19656: 89 e5 mov %esp,%ebp + 19658: 83 ec 18 sub $0x18,%esp + 1965b: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) + 19662: 83 7d fc 13 cmpl $0x13,0xfffffffc(%ebp) + 19666: 0f 8f 82 00 00 00 jg 196ee <_do_all_timers+0x99> + 1966c: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 1966f: 83 3c 85 60 c1 01 00 cmpl $0x0,0x1c160(,%eax,4) + 19676: 00 + 19677: 74 6b je 196e4 <_do_all_timers+0x8f> + 19679: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 1967c: 8b 04 85 60 c1 01 00 mov 0x1c160(,%eax,4),%eax + 19683: 83 38 00 cmpl $0x0,(%eax) + 19686: 74 5c je 196e4 <_do_all_timers+0x8f> + 19688: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 1968b: 8b 04 85 60 c1 01 00 mov 0x1c160(,%eax,4),%eax + 19692: 83 78 08 00 cmpl $0x0,0x8(%eax) + 19696: 74 4c je 196e4 <_do_all_timers+0x8f> + 19698: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 1969b: 8b 04 85 60 c1 01 00 mov 0x1c160(,%eax,4),%eax + 196a2: 8b 00 mov (%eax),%eax + 196a4: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 196a7: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 196aa: 8b 04 85 60 c1 01 00 mov 0x1c160(,%eax,4),%eax + 196b1: 8b 40 04 mov 0x4(%eax),%eax + 196b4: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 196b7: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 196ba: 8b 04 85 60 c1 01 00 mov 0x1c160(,%eax,4),%eax + 196c1: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) + 196c8: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 196cb: c7 04 85 60 c1 01 00 movl $0x0,0x1c160(,%eax,4) + 196d2: 00 00 00 00 + 196d6: 83 ec 0c sub $0xc,%esp + 196d9: ff 75 f4 pushl 0xfffffff4(%ebp) + 196dc: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 196df: ff d0 call *%eax + 196e1: 83 c4 10 add $0x10,%esp + 196e4: 8d 45 fc lea 0xfffffffc(%ebp),%eax + 196e7: ff 00 incl (%eax) + 196e9: e9 74 ff ff ff jmp 19662 <_do_all_timers+0xd> + 196ee: c9 leave + 196ef: c3 ret + +000196f0 <_my_kernel_thread>: + 196f0: 55 push %ebp + 196f1: 89 e5 mov %esp,%ebp + 196f3: 8b 45 08 mov 0x8(%ebp),%eax + 196f6: a3 50 c1 01 00 mov %eax,0x1c150 + 196fb: 8b 45 0c mov 0xc(%ebp),%eax + 196fe: a3 b0 c1 01 00 mov %eax,0x1c1b0 + 19703: b8 2a 00 00 00 mov $0x2a,%eax + 19708: 5d pop %ebp + 19709: c3 ret + +0001970a <_my_device_add>: + 1970a: 55 push %ebp + 1970b: 89 e5 mov %esp,%ebp + 1970d: 83 ec 18 sub $0x18,%esp + 19710: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 19717: 8b 45 08 mov 0x8(%ebp),%eax + 1971a: 83 b8 98 00 00 00 00 cmpl $0x0,0x98(%eax) + 19721: 74 32 je 19755 <_my_device_add+0x4b> + 19723: 8b 45 08 mov 0x8(%ebp),%eax + 19726: 8b 80 98 00 00 00 mov 0x98(%eax),%eax + 1972c: 83 78 08 00 cmpl $0x0,0x8(%eax) + 19730: 0f 84 8d 00 00 00 je 197c3 <_my_device_add+0xb9> + 19736: 83 ec 0c sub $0xc,%esp + 19739: 8b 45 08 mov 0x8(%ebp),%eax + 1973c: 8b 80 98 00 00 00 mov 0x98(%eax),%eax + 19742: ff 75 08 pushl 0x8(%ebp) + 19745: 8b 40 08 mov 0x8(%eax),%eax + 19748: ff d0 call *%eax + 1974a: 83 c4 10 add $0x10,%esp + 1974d: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 19750: e9 82 00 00 00 jmp 197d7 <_my_device_add+0xcd> + 19755: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) + 1975c: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 1975f: 3b 05 b8 c0 01 00 cmp 0x1c0b8,%eax + 19765: 7d 4d jge 197b4 <_my_device_add+0xaa> + 19767: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 1976a: 8b 04 85 98 c0 01 00 mov 0x1c098(,%eax,4),%eax + 19771: 83 78 08 00 cmpl $0x0,0x8(%eax) + 19775: 74 36 je 197ad <_my_device_add+0xa3> + 19777: 8b 55 08 mov 0x8(%ebp),%edx + 1977a: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 1977d: 8b 04 85 98 c0 01 00 mov 0x1c098(,%eax,4),%eax + 19784: 89 82 98 00 00 00 mov %eax,0x98(%edx) + 1978a: 83 ec 0c sub $0xc,%esp + 1978d: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 19790: 8b 04 85 98 c0 01 00 mov 0x1c098(,%eax,4),%eax + 19797: ff 75 08 pushl 0x8(%ebp) + 1979a: 8b 40 08 mov 0x8(%eax),%eax + 1979d: ff d0 call *%eax + 1979f: 83 c4 10 add $0x10,%esp + 197a2: 85 c0 test %eax,%eax + 197a4: 75 07 jne 197ad <_my_device_add+0xa3> + 197a6: c7 45 f8 01 00 00 00 movl $0x1,0xfffffff8(%ebp) + 197ad: 8d 45 fc lea 0xfffffffc(%ebp),%eax + 197b0: ff 00 incl (%eax) + 197b2: eb a8 jmp 1975c <_my_device_add+0x52> + 197b4: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) + 197b8: 74 09 je 197c3 <_my_device_add+0xb9> + 197ba: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) + 197c1: eb 14 jmp 197d7 <_my_device_add+0xcd> + 197c3: 8b 45 08 mov 0x8(%ebp),%eax + 197c6: c7 80 98 00 00 00 00 movl $0x0,0x98(%eax) + 197cd: 00 00 00 + 197d0: c7 45 f4 ed ff ff ff movl $0xffffffed,0xfffffff4(%ebp) + 197d7: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 197da: c9 leave + 197db: c3 ret + +000197dc <_my_driver_register>: + 197dc: 55 push %ebp + 197dd: 89 e5 mov %esp,%ebp + 197df: 83 ec 04 sub $0x4,%esp + 197e2: 83 3d b8 c0 01 00 07 cmpl $0x7,0x1c0b8 + 197e9: 7f 20 jg 1980b <_my_driver_register+0x2f> + 197eb: a1 b8 c0 01 00 mov 0x1c0b8,%eax + 197f0: 89 c2 mov %eax,%edx + 197f2: 8b 45 08 mov 0x8(%ebp),%eax + 197f5: 89 04 95 98 c0 01 00 mov %eax,0x1c098(,%edx,4) + 197fc: ff 05 b8 c0 01 00 incl 0x1c0b8 + 19802: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) + 19809: eb 07 jmp 19812 <_my_driver_register+0x36> + 1980b: c7 45 fc ff ff ff ff movl $0xffffffff,0xfffffffc(%ebp) + 19812: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 19815: c9 leave + 19816: c3 ret + +00019817 <_my_device_unregister>: + 19817: 55 push %ebp + 19818: 89 e5 mov %esp,%ebp + 1981a: 83 ec 08 sub $0x8,%esp + 1981d: 8b 45 08 mov 0x8(%ebp),%eax + 19820: 83 b8 98 00 00 00 00 cmpl $0x0,0x98(%eax) + 19827: 74 26 je 1984f <_my_device_unregister+0x38> + 19829: 8b 45 08 mov 0x8(%ebp),%eax + 1982c: 8b 80 98 00 00 00 mov 0x98(%eax),%eax + 19832: 83 78 0c 00 cmpl $0x0,0xc(%eax) + 19836: 74 17 je 1984f <_my_device_unregister+0x38> + 19838: 83 ec 0c sub $0xc,%esp + 1983b: 8b 45 08 mov 0x8(%ebp),%eax + 1983e: 8b 80 98 00 00 00 mov 0x98(%eax),%eax + 19844: ff 75 08 pushl 0x8(%ebp) + 19847: 8b 40 0c mov 0xc(%eax),%eax + 1984a: ff d0 call *%eax + 1984c: 83 c4 10 add $0x10,%esp + 1984f: b8 00 00 00 00 mov $0x0,%eax + 19854: c9 leave + 19855: c3 ret + +00019856 <_my_get_device>: + 19856: 55 push %ebp + 19857: 89 e5 mov %esp,%ebp + 19859: b8 00 00 00 00 mov $0x0,%eax + 1985e: 5d pop %ebp + 1985f: c3 ret + +00019860 <_my_device_initialize>: + 19860: 55 push %ebp + 19861: 89 e5 mov %esp,%ebp + 19863: 5d pop %ebp + 19864: c3 ret + +00019865 <_my_wake_up>: + 19865: 55 push %ebp + 19866: 89 e5 mov %esp,%ebp + 19868: c7 05 c0 c1 01 00 01 movl $0x1,0x1c1c0 + 1986f: 00 00 00 + 19872: 5d pop %ebp + 19873: c3 ret + +00019874 <_my_schedule_timeout>: + 19874: 55 push %ebp + 19875: 89 e5 mov %esp,%ebp + 19877: 83 ec 08 sub $0x8,%esp + 1987a: c7 45 fc 01 00 00 00 movl $0x1,0xfffffffc(%ebp) + 19881: 83 45 08 0a addl $0xa,0x8(%ebp) + 19885: 83 7d 08 00 cmpl $0x0,0x8(%ebp) + 19889: 7e 3e jle 198c9 <_my_schedule_timeout+0x55> + 1988b: e8 c5 fd ff ff call 19655 <_do_all_timers> + 19890: 83 ec 0c sub $0xc,%esp + 19893: 6a ff push $0xffffffff + 19895: e8 0e fd ff ff call 195a8 <_handle_irqs> + 1989a: 83 c4 10 add $0x10,%esp + 1989d: 83 3d c0 c1 01 00 00 cmpl $0x0,0x1c1c0 + 198a4: 74 02 je 198a8 <_my_schedule_timeout+0x34> + 198a6: eb 21 jmp 198c9 <_my_schedule_timeout+0x55> + 198a8: 83 ec 0c sub $0xc,%esp + 198ab: ff 75 fc pushl 0xfffffffc(%ebp) + 198ae: e8 fd fb ff ff call 194b0 <_wait_ms> + 198b3: 83 c4 10 add $0x10,%esp + 198b6: ff 75 fc pushl 0xfffffffc(%ebp) + 198b9: e8 89 fd ff ff call 19647 <_inc_jiffies> + 198be: 83 c4 04 add $0x4,%esp + 198c1: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 198c4: 29 45 08 sub %eax,0x8(%ebp) + 198c7: eb bc jmp 19885 <_my_schedule_timeout+0x11> + 198c9: c7 05 c0 c1 01 00 00 movl $0x0,0x1c1c0 + 198d0: 00 00 00 + 198d3: 8b 45 08 mov 0x8(%ebp),%eax + 198d6: c9 leave + 198d7: c3 ret + +000198d8 <_my_wait_for_completion>: + 198d8: 55 push %ebp + 198d9: 89 e5 mov %esp,%ebp + 198db: 83 ec 08 sub $0x8,%esp + 198de: c7 45 fc 64 00 00 00 movl $0x64,0xfffffffc(%ebp) + 198e5: 8b 45 08 mov 0x8(%ebp),%eax + 198e8: 83 38 00 cmpl $0x0,(%eax) + 198eb: 75 2c jne 19919 <_my_wait_for_completion+0x41> + 198ed: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) + 198f1: 7e 26 jle 19919 <_my_wait_for_completion+0x41> + 198f3: e8 5d fd ff ff call 19655 <_do_all_timers> + 198f8: 83 ec 0c sub $0xc,%esp + 198fb: 6a ff push $0xffffffff + 198fd: e8 a6 fc ff ff call 195a8 <_handle_irqs> + 19902: 83 c4 10 add $0x10,%esp + 19905: 83 ec 0c sub $0xc,%esp + 19908: 6a 0a push $0xa + 1990a: e8 a1 fb ff ff call 194b0 <_wait_ms> + 1990f: 83 c4 10 add $0x10,%esp + 19912: 8d 45 fc lea 0xfffffffc(%ebp),%eax + 19915: ff 08 decl (%eax) + 19917: eb cc jmp 198e5 <_my_wait_for_completion+0xd> + 19919: c9 leave + 1991a: c3 ret + +0001991b <_my_pci_module_init>: + 1991b: 55 push %ebp + 1991c: 89 e5 mov %esp,%ebp + 1991e: 83 ec 18 sub $0x18,%esp + 19921: a1 88 c0 01 00 mov 0x1c088,%eax + 19926: 89 45 fc mov %eax,0xfffffffc(%ebp) + 19929: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 19930: 83 3d 88 c0 01 00 00 cmpl $0x0,0x1c088 + 19937: 75 33 jne 1996c <_my_pci_module_init+0x51> + 19939: 83 ec 04 sub $0x4,%esp + 1993c: 68 ef 00 00 00 push $0xef + 19941: 68 78 ba 01 00 push $0x1ba78 + 19946: 68 8e ba 01 00 push $0x1ba8e + 1994b: e8 10 01 00 00 call 19a60 <_DbgPrint> + 19950: 83 c4 10 add $0x10,%esp + 19953: 83 ec 0c sub $0xc,%esp + 19956: 68 97 ba 01 00 push $0x1ba97 + 1995b: e8 00 01 00 00 call 19a60 <_DbgPrint> + 19960: 83 c4 10 add $0x10,%esp + 19963: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) + 1996a: eb 1b jmp 19987 <_my_pci_module_init+0x6c> + 1996c: 83 ec 08 sub $0x8,%esp + 1996f: 8b 45 08 mov 0x8(%ebp),%eax + 19972: ff 75 f8 pushl 0xfffffff8(%ebp) + 19975: ff 75 fc pushl 0xfffffffc(%ebp) + 19978: 8b 40 10 mov 0x10(%eax),%eax + 1997b: ff d0 call *%eax + 1997d: 83 c4 10 add $0x10,%esp + 19980: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) + 19987: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 1998a: c9 leave + 1998b: c3 ret + +0001998c <_my_pci_find_slot>: + 1998c: 55 push %ebp + 1998d: 89 e5 mov %esp,%ebp + 1998f: b8 00 00 00 00 mov $0x0,%eax + 19994: 5d pop %ebp + 19995: c3 ret + +00019996 <_my_request_irq>: + 19996: 55 push %ebp + 19997: 89 e5 mov %esp,%ebp + 19999: 83 ec 04 sub $0x4,%esp + 1999c: 83 3d 40 c1 01 00 07 cmpl $0x7,0x1c140 + 199a3: 7f 63 jg 19a08 <_my_request_irq+0x72> + 199a5: 8b 15 40 c1 01 00 mov 0x1c140,%edx + 199ab: 89 d0 mov %edx,%eax + 199ad: 01 c0 add %eax,%eax + 199af: 01 d0 add %edx,%eax + 199b1: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx + 199b8: 8b 45 0c mov 0xc(%ebp),%eax + 199bb: 89 82 d0 c1 01 00 mov %eax,0x1c1d0(%edx) + 199c1: 8b 15 40 c1 01 00 mov 0x1c140,%edx + 199c7: 89 d0 mov %edx,%eax + 199c9: 01 c0 add %eax,%eax + 199cb: 01 d0 add %edx,%eax + 199cd: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx + 199d4: 8b 45 08 mov 0x8(%ebp),%eax + 199d7: 89 82 d4 c1 01 00 mov %eax,0x1c1d4(%edx) + 199dd: 8b 15 40 c1 01 00 mov 0x1c140,%edx + 199e3: 89 d0 mov %edx,%eax + 199e5: 01 c0 add %eax,%eax + 199e7: 01 d0 add %edx,%eax + 199e9: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx + 199f0: 8b 45 18 mov 0x18(%ebp),%eax + 199f3: 89 82 d8 c1 01 00 mov %eax,0x1c1d8(%edx) + 199f9: ff 05 40 c1 01 00 incl 0x1c140 + 199ff: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) + 19a06: eb 07 jmp 19a0f <_my_request_irq+0x79> + 19a08: c7 45 fc 01 00 00 00 movl $0x1,0xfffffffc(%ebp) + 19a0f: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 19a12: c9 leave + 19a13: c3 ret + +00019a14 <_my_free_irq>: + 19a14: 55 push %ebp + 19a15: 89 e5 mov %esp,%ebp + 19a17: b8 00 00 00 00 mov $0x0,%eax + 19a1c: 5d pop %ebp + 19a1d: c3 ret + 19a1e: 90 nop + 19a1f: 90 nop + +00019a20 <_DriverEntry@8>: + 19a20: 55 push %ebp + 19a21: 89 e5 mov %esp,%ebp + 19a23: b8 00 00 00 00 mov $0x0,%eax + 19a28: 5d pop %ebp + 19a29: c2 08 00 ret $0x8 + 19a2c: 90 nop + 19a2d: 90 nop + 19a2e: 90 nop + 19a2f: 90 nop + +00019a30 <_ExAllocatePool@8>: + 19a30: ff 25 64 e0 01 00 jmp *0x1e064 + 19a36: 90 nop + 19a37: 90 nop + ... + +00019a40 <_ExFreePool@4>: + 19a40: ff 25 68 e0 01 00 jmp *0x1e068 + 19a46: 90 nop + 19a47: 90 nop + ... + +00019a50 <_memset>: + 19a50: ff 25 7c e0 01 00 jmp *0x1e07c + 19a56: 90 nop + 19a57: 90 nop + ... + +00019a60 <_DbgPrint>: + 19a60: ff 25 60 e0 01 00 jmp *0x1e060 + 19a66: 90 nop + 19a67: 90 nop + ... + +00019a70 <_memcpy>: + 19a70: ff 25 78 e0 01 00 jmp *0x1e078 + 19a76: 90 nop + 19a77: 90 nop + ... + +00019a80 <_strlen>: + 19a80: ff 25 88 e0 01 00 jmp *0x1e088 + 19a86: 90 nop + 19a87: 90 nop + ... + +00019a90 <_sprintf>: + 19a90: ff 25 80 e0 01 00 jmp *0x1e080 + 19a96: 90 nop + 19a97: 90 nop + ... + +00019aa0 <_strcpy>: + 19aa0: ff 25 84 e0 01 00 jmp *0x1e084 + 19aa6: 90 nop + 19aa7: 90 nop + ... + +00019ab0 <_RtlCompareMemory@12>: + 19ab0: ff 25 70 e0 01 00 jmp *0x1e070 + 19ab6: 90 nop + 19ab7: 90 nop + ... + +00019ac0 <__snprintf>: + 19ac0: ff 25 74 e0 01 00 jmp *0x1e074 + 19ac6: 90 nop + 19ac7: 90 nop + ... + +00019ad0 <_KeDelayExecutionThread@12>: + 19ad0: ff 25 6c e0 01 00 jmp *0x1e06c + 19ad6: 90 nop + 19ad7: 90 nop + ... + +00019ae0 <__CTOR_LIST__>: + 19ae0: ff (bad) + 19ae1: ff (bad) + 19ae2: ff (bad) + 19ae3: ff 00 incl (%eax) + 19ae5: 00 00 add %al,(%eax) + ... + +00019ae8 <__DTOR_LIST__>: + 19ae8: ff (bad) + 19ae9: ff (bad) + 19aea: ff (bad) + 19aeb: ff 00 incl (%eax) + 19aed: 00 00 add %al,(%eax) + ... + +00019af0 : + ... diff --git a/reactos/drivers/usb/cromwell/core/usbcore.nostrip.sys b/reactos/drivers/usb/cromwell/core/usbcore.nostrip.sys new file mode 100644 index 0000000000000000000000000000000000000000..23844dbb11d3636f4bd483d8c15784760eb6d11c GIT binary patch literal 81469 zcmeFa4R~BtwLg3&nY7a~kQ4$GtTKfbS}Y}P(>6`|F-<#Cw1rq2s6b8Ad~_1hBqlQ@ z722kq7CRk_6+yU)UcM9*y;kIEMYuPuKoPm#0##9ZHCKD(gozq8O1wt$|NYk9`+TG+ zc=`L@_kG?c^JFIHtiATyYp=cb+H0@9&pxZJ-*4qwmKDTzXvne-;y*u8`F-o3P9&dk z!4qd#kB|Ge$p-@~|84S`ctd-nwXJ1iTlJ<$O?7i~OCqwNF4C54jx;n!mS25MWK&CR z-OSTZA3sHtu83LI%0S3^@!Wx>mKCs8=U7&^HRi(80y!ntejxSXTVPp{>_efSSN z!uTcMxRd|*2bfCx%~t{fM^1%HWahy~{vEZfhfo#@vl1lGhyN7BNuPjqK2hQ|C_Is2Hxh|Qe9tFJytekX z8o)%xeYhZAH@==vRPgGWT7alzj!F}c_?}PnBu+euqnD!+7?r@N1V$w=DuGc6j7nfs z0;3WbmB6S3MkO$!1S-@2mFf*;VxdfQO*%H1i47i!207PE^@fL%gZ9!rxO}?cd*2nr ziAQ3CBm?|?l>_ODHOSj&4JAYNbsr&KC>`rhZSA)b=SlXE{c9D#xCt3*oH3etyBR;pvtzQp2GZ?G{Iw+;lX_;~!- z_opS>P!i-rL#>nKcVfJdX}eV#K$++yFqMsHhMvXj7YrSV_1`fxG?X3ZV5GJdSc%gz zv4TuxD6_gKU7#~e@YWy`>oby&nm1bZ!!0C;iVq6A{zBm)pxc8n68DVWT~!s+rt zxhP1NPn3(oba{zfOiY(gk&8*`@)>dwNtdsciz(^yHS5@n*ItwAjYvfcGpi-ZdvfIe z8+*zFxB#>D>2iYVGck}U4+^jkS7ShMC^-!knaVg5svQ|h_9~&+Uy{m4(lJ}4-fMqB zR00iar(-8Fu@n3125$JUa1S!6t%cSWFf#Bu1^pq@67Oyv-Vy`CX$cj_G={$=E^t~x znn@bstiPIuKodx7i}*$qx{@`7u4E0ND_KM6O4g~~iD<7(Wx<}<(4NXS!E+vq> zouJw{Ms>wYrBb2O0qcaALv~1{TcrEub`;a!oyf_49Id75hhAbG>JDWp!-sy6KklfJ zv*Nry9eZ<65U4kviN2WEii%e> zT8#lR{vD$hv`ZdT5l>?d#0NE2r8QdM{y^tA2n5w91u;wS8D8$-AQ@5Rq905`ivXVn zEz`LNW$%p!g+f_uApiC&r4>S%dzg}0HIRPpP_|fL@cqUli#!I*ux-*Dd2j{_U@_^vV-yWXNHzoLuUBcP7@oH<}}? zq`LFbbOOlLfZW|($(dBkRfN}P$TaGmUcR?uL}*EN6Yx4aa;%OyIz#%7Xigk`cUdW^ADoAt(UvsIC|0YyQig> ze`DG^&RvAuMMq*b=%EhwzPkP!K3wHWVWH^VlT3_8WTfgAGs%&{{?T%=47xT+j9JHM z@OpM5bc>p$Izj;fl6FrkfE>a)PR~?A4-3l5L+v?PC(j3&tnG@DXIROTT3cD5RCZtC zGo+OX>|LItG_3-nK1~Vxn8?;6?8pABg?%Em^@IrfL^^h?=QZgnBX$Kx4xS!h=imNm zmbt1oQ)%l?p!-*5X&8*;?1}w6|6gK1f8*#O`+{`rmDJX5D{(HQq)pDxY2u)uLr2Am z{=74iZ&K2+qnQ}H6fRO*U$GMTnaZQNm7#Ry3#r%(9of^7nj6E=##@Y^FC1Y|+}anj zp|aOP)Jl{b#XM3n9s3lu>HZ(pW?zg9Q@xU}P$Mf}`8HYDyXxmB>7ZMy=Q1&xopkIu zQ>*8sR!^s5PfM+ylUnh%GOG=@5O zRSFJc>Q(AK*KOR}xdRHKP3+*d6`572^q^n=cI*NQnm$jXg_Gxd(bxcjLceb8zS!W9 zmHh&}&g2;J8^hv(o~f>n#CoOE{9gElCs`OwETMHsEC5sN=WyH3*giwL-JqyapQsW5 z7<9s7SkT+FdaN%mygam5_4#(>pmr(P&JSUKvES6$ia~*qlhGDFM;I z%hh6n0*h!KMpjsiXUS$L&Q&wGeTCa_>$mrSI!gUdT)W;e`?86;^1c6y0_LC{fno$B#F9(6`c|G3%A_!_~^ny6G>3hf%=37%un43R2U+!5|BN20V$TT(hHh7b=$8 z8nTilq7|5=6fh$ylIvb#m^M&_a3r>in%?s@l{=86jYe@pt)YFfJr(vGsYgL}HAv^U zi7O@X9Gy59iMh#(QFX~#5&z-=%=RAT&jI`h?oV%_Kq6U80LZD8jb_%tecppi74}yp zu^`X|UD}firla6G6Dv&FInb2?Kr4jEGvbhhai5Ou%HVIEu70X_3X0A|OV9#NC&K*{ zuLn0^bcwz=T4rxFAnG{oD4gX#0RWFI2bXZpcp1dy@73iPT=vl|IlSW+;(f)!Wfe2F z<@H<%bwa^MqLWxB__9D!K3#bc-0VM@4C%__JGLGVK;!dwU4T6LW_x*R>+!t&U15ND zwf#K&2J&~&!r>}6f7kDE)$@6EJ1&3MFV)p)`MZ9?gx&Z7sWF{cp}kpOY=0Lna*>d~ z>z`G!#pJS{wd!s>?(%mPyEogH{CC=?RAOCoV*+%{@szFakC}6su$V5Yj>^$vF zq75scIobEnQs}gxq~-7WA@U)81JdD~pGhh&;KzfhshkC@eG2P5Vtr9%On5+_V#ak& ztHCL;WiZiI5@TiGE0d3c^s=HX+7zO&vIuYRzZOaMYS55=6UtO1j0%t#=hNC_iz%8F zR13%KWy(u9L`BleCS@@^P?5T6SYu%XPppIj$*9C>d;%^#lzK*4?8H`tKzPY{Hnr|V zy1Yo{rzd23ZrktgV1Gk61e0hzU0+v7P*6M)({uDpH(HqK#MTS6p9F%o1XHp8v6yHc z8pw@GduVr*X$KA2);@YWo5X*H*>6bleab*-te>AjWA3YqfQeEez%Ww2#nW(d{KB06ujP?K^5VD%jqbk~9V(dR_`$ZgW7Vchu2y7?e zB4Tt2rGt0z-nbV(7TbvOQin-0)fI-%w_I)#pew#4A0IMg#ypCa17RWJ?N* z>nMcYqTPXwn@Rifchm2~O@;z|lGjm8*avoZ*ppD!lBS1i|kB)o}A=4F7lZF zrpJQ78=Ofvuylz`U<61Wt)jbU6j2G1-AttB?HthwUXi@xii(=85G7lYIkP-n;6!Dp zcPn(VwE~Jrg{NiA{k7RnX5nI@#C={{lZq)&h|rS;!C9JExh8B%Rr2^aJ05{hNlFp*Q~ zrP+5&Ee7o+C|x|CK}aE85s|hWU?+A-(M`$8ntHz~I#%FGhtUc&M&kwO3ijjRR~nk- zE!jQ^d`JSLuhN~g#tve_M=9Q{G?r-AeK0!|-?R$*d__i!daSzBMVdB(K0xD!inKmT z%uff=G1~?u&MDbD3PfhW6@Zwl93djMIF$dWx)bACaA+V;;zJafW6}yz-Ix}usCzj( z5<)`O%k~>b^PlWW<{gZHKiCoZ|K3iFo@a;V}sL=ns7iY zJpCw!ph5dwRafy~2H@GkiB$nEQMBt2)hU!o7h}XgwX)DsxL6mY4;|{sfSJ|!miI3h;Gjx9>rwXGl{)PFvL1j!;Voxfj>I7I%zCezB zd-^|q!CNr#Yt6)~BA@~cw6{aHe=|EiPFw~l2JoA+Z_nrdkb8>KWpWOWW-xDML|mXO zLjQw14p+mePgi0#fK{-8o@LA!Kx`uP!Om<_Qt;(^)~dbVboC{h>wFbf+ZZJF%T4}j)AcOUgSij zg;P6GSr`%ED<=U?)SX>2K@-#E1gDD87bI?UwlaB#Y{sKA%XfCbOb&eF8BM1e(sGd1pj_AhW9bAKuuq9JRm==K3M$%iLQEl!xSqRmcxe47M0?YzuDFbK#S)NH zF6>}>Co7Cf5D&95<5;oA9mQ5+DytjSE~%?+AS9zmYoWanzJ!@`Fu1`fM1?(x#mdwM zZa=g_2C)JAB1qo2Z$NcMp*tkDr^aWg2B~Az(d=-ZF>Lx^AY@;hgaL{EAykSc>6IqA z*;_O3BqITD!qYT}DhcC5sLiZ7!Z&>dcphD$3X~%ix*Wt%Azjlfmq$-MV*=KlXlgbn z7v9midwY7MA!L|-sY0ZXMy2pqIe@B_l}|}dm2QcOMpDlO)8!EvGcjxq*gyM&cH{@M zTczTWLw1guFM&Z+t&_wL?!vE?SS%RMEFve#)kl(EUBbxBP=2~%At0%a8CJqcnqrcs ziGv505^B8W)GInoPrXD%6L2r38ZTZg)zEiOtC@+aEk<8yI?zCegMUD;^Cy24uh*ku zp58JjZGcH4%Ej*_Dbb4>U0W6lCox4cj>J4Alj|u>VpgdZ9}y(LD(&$hMGJBlPj8SdvFY zA8jVMQ&?#U#IMD!L<_Z4`*HHDbzR-&b%Bn!k;A$MoG5HlK_t9S`ob|G z^KL~3D{BfU4C%m<>_GvS$NFfV{s6L40(2}_=@@GD3ZM$SRt!GMggoKBVg|J~Z?=Rk z_QhU-CxGKV6d?hzZ13AYcAOjhqFRr!}+@&0V4XGI0~FnsP*Tv zn2pU4+rZcyfXp&spcL^JlH8I?uD{rOHw z(v-by$~9`{p{afA146B*2WlY5Va0aOa-#|fj-CnV0%j4a#bHwVrO}I|_j!VEGCE6# z)1x!kRAcj9QteZX&1iHPo3kJBv>Jv@$4e?w0~4$OExnmMJ zy(lb591$g8`$&}s?H|-=0s2N#7G^=~jhE)mo)tQLe9v)R(74JsR6#Uxzy?#|cF2|{aR9RKldh$#E2!cksH6;I*x8L*VD_9qyE-{l z++on3#Tv?{GU_qLM2|_O%R)n_$l`aR(9{@MG8G#L5y11vz*JH6xGakeCRQSs__0c< zg==1t4aCd_L|xFMuoYmEC}5vfK#q1GHIV&xmP?}9FHy)*m?h30B_8Y|qrBE5*4p`q zq-vAhT49fsI+<9?I4( z*|!k$>4M!|Tb#^4K`LwAflYr7@M!@;ULhT=r<`7R_O}6`OamcX3yT64ho;rDiDpK~n)I zejSxM*HlUkj^jA{m+gzX&8I8!(g`9%2o|WlgyOuX(5xQ%FI1@t8Tw_U|1AZC(6|OI zWRzAU;OW2w^x02Q{!bV5Jj$4z(@LLHP%YFpX(Py@my)|lr*YFFB7O_i4(sMmh_N?`~yywq0PN+8}GrofXJ zGNyyYcdbos4vaROTdT&{Y1Xqv$ZhN?(}K~3SEYXKZ9<4Az*;S9-hSB{_{nXw;1 zUq)_ERl-sgUCAvb4Eq2JWGU2TxCx#KZe=*V{{)f`;;Yt2{?;oQ@57m0JCB{56Ec)B zL)-{;<GtS%hM!_ zl7_frj&T>FgZA@R2!@lJJSn^N8>;EkC>+|zDe6#bhke_P1{=hT*-I2l>aF&1$stQ{ zA^Tlaou@-k3~KVZ`p&i$)$DBMIlyLTvMvi#AP?}D3bn%isNn=HJZOL3+rp+!N?%R5 zl#T&gP>%>Eq;IyY>g|{qley(~I{Nl~thL^ndJe9^xVsH>)61-h+K!1<9B~^eq}f=@ z{UzR=GZC{1@Vlz^?k2$VJtS2FtK9Gb%mS*}GkTFBvTZn#AHL-B^|nNERXZ#gPGtW{ zMAXJr%<~`}$VWt@RpKwIAzaa{K6UN_r!FA!Amyuxd~-OF(|tr#gg~Zv^akL&a`?I@ zf7e&pF1Xr`4MKf)=I{C(?z08Belvg9Csmr2m`n|dPE2)79Jj3o*IdL*UXKfQvDK5( z6@|Dy5}gQq!c?DjV+GO z5wr)QqBs)6z`RX`-KAk*K>zO+TBvm=JD<~_jc{TdS09{4E9@7fiGvtxKgxPXqsl#_ z9Mw4VZ3>GK9gHNIPTDq^|DCw3OD=njD<3kd*oXZgS}$p0FI4$qQFY0h?p z23+S7(d7bcD0#C!jfj@%B`8}F$Nm7lJ3G!n7Q6Yy9^4_55KkZM`S)SEj)|fhbYgQ# zjs9m#AC#YH7#Is-^)X-{mR5yO`{5u%f_XhJgEX!oJ@B0B2uc`;Gg3GR4DtLBt|1xe_DCCKD`tY=}%YMpz6p~8UXp!a&b;#?2c6@c&Y$4 zU1Nl*Pgh`|a_6MbVUn%StPbyZ-s&70B7)NvkPH+djKE&M3En~O0xYcX1wmvK;>^Se z>@-N|$1KW9S9DZ_BGD@1svIOS!|Va)y4@r?nBZU_it-2T4YDCu9vrZ;FA5tfhuSt7 z=&G>)T|#IDuEIc8Mk_I>4VWU)L~Qa_PI~OC6JYA?Tcj)I*jQ{ao(XaF}Nnqp!yKRoIg*$X4 z)-78O_rQ}yKI#!xbM22-GD9f6j9jET3RH#;PloH<45uT*l_tXs$uL7@xW|*>Vq~Cj zv2+6|%phA+B-UDhFb+2ybFOmypOK^IFXG!$(AZ61u$jF6yP_oXpyTv(X$t!7D@l|S zkv^@aZfmA@a*GTK0~rVrd##5o%LFU2+X`y$1e5yJewwn_EBUu`NQdu{i(Sw*OwR#D zAsu@p6MF^s52dy~WO2vML)dZi5O&;TRz30rvRHf9gvO>T?^9U!W-9MZSKgD_dXM1V z1KfLni68%{j`+U-aVTki1eyEQ(Ny0B=BI$ zojHlqu~&<+D(p}x#v%-agf5Mx3r5LGltu8#E!DkV<}GYN?5D*3zTcpK;Hek03B+x| z*Vuv!MD$_Pv!pL?lRcwi6Cp<%cEJRKl2{u;@5H^kHng8>Lp~tZhW2M-`&BF`cQb6) z3ADb^S`5y1Csw9KYef#Qb)x2j9woe=8DijTjN00YI>hZIe1Hsg3Tg>g(S}~hbXAg9eX^3KfPg6x!39PLb<>!X`){x@VYL;g%#mmmsx~CXly#FwbWqh)*F=F~Uxa3~9;$?Qi`CRNx!HLF5cK$@h08r|Gc&(&ClE#)kRQvYBX zi#HP|0G^yL03_pSOG;KUVW|PTuT-WP_5;!oywf|)1qbVP4o-o+&4W|m(7`g@Jdu|2 zKRBN4c)d%Nf*B;}K${wKSKBXMEMk!&Ld-709JDV{WM$kybEFPqvgPk2?ti;(U8y5jal1@O^hV(X30D}Pp zBYKc7k56&9lINFlvOmP-UK&j@%q?KKKj z2*nCo0bGmJVKj9g98tEU=Z>p}7`m{~W@2pt>9-Ua|SR68bq(9buic# zdPEHCVEhOOEWGF?C|5#l7UTjkb_JR>%mM5d+m2PY{v(hJdUh2qxyW{h*mLw09hSsq zqOw@;wkXpO9C&gkf>>Cmh2T(DFM{--yzU6JlYKPAo)3mS<>^5l#9g$y>Co zbnNV(N)>GG=`sD7wHVPkaoh`9ePgxh56wcag(?`H7$=8r4`9OrcHrlcg9>}*d7|O+ z6k7I4ikNODqei%9*ZijHiQIZhH5tm@sQbW!m{G!Hs4$C4T1p;iZ4oaj6x*VSTwhGw zkQdi9TfRI-0D1OP%#ecD8PgL4wP5&ur=o~9vlUp!xzvA%e%F51hbu$y0#B;t3OMQD zm7zO4ZI^w@SB5+pg1FIg@%w}5lQIc`4S)j`rY{+?|3R%W`FuX4qU$+6AJk0Uj^y*n zvp<8Z;f}3?e*mZXpRn*NqAavmyieHU!_NC+e?o!qk3#l`AZ@YO%FjecWh`r`=LevI zsf*g$tOA=%139bbG5kP=;x8#5#mRQJH`^gw?eR|5IFw$rRfZ2bkVE!(O#^)c^Hz@7 z+3B9-alT|Sz{NVE!pnn))`wp!I~fbuXKjO47e0quY=FT=xm0&V-iy+)D zQbLws{wGv4DcA^&((Q2jZ$&2F2gYsn>?ArbP;$eLsnk;=+ zW>DgV=ou6;4Zs9s!Gy3XPfqoG1TxpU@6k>cf_?hBkjH+bn+pBSJcm0?7vm38@7Ox< z32FZOAPY2q<9YV`m+RL5JzBrdwEhjoI}_!ne{D@4-53lZJj!K~X(t$Mb-Fo<=?F-=t@;|}HzCaZkG<4ueB(lU(cpP+Tv6_Ijbj;@~frO`|WxCj( z-t|ct1Texx3)x>}D8%B4aQhpz5(>Ul1i#;&If2x|Jq1#d%%ILWTR^n&e1_qC8FR4F z0*~2GGS_(0K9WVt^wXbATp+k`Eb&}2ngj!CvB3>TfeAdXHv%W4D8a>UQ4+W(sjgr} zybOae^#)6A*t+mp3F1cJ+VdF_bcpy;U-~U7$jc}Li`4Wpo$D!#&ihdD^iEzY>E(3+ zfIiS~pQCKHEZZyfuzOKHs!HLN1V)4;2gAdQN`pO^Hl$6;UY zh1mDSjt`+J#p+1V%?^nsB8COW;G@8}pP@Kd7mChCw7U=8!d2{7FljVSn{YW`UqQWN zj0@|Ig?Nrqzj@h2E01tAg+X`s)>naGQcI??@N=(@;2E_~qady)Q=;|B@`|ams zfdqq|&acsuOC5-^E$}_i*e9HhjM(U@itbWVD1%_8`3W&k*jl7ZzDkwsqN!~qiHpb} zrokHR5{0H^{&j6tbm3;$Q?v`6OuvV171PJ3^7pa#d#B2M_J1fcSd-1`IRwKDAI>9I z1ZHI#)o(W`Iwsk%MEhvWF@fYpNc;N5q8`kILmc|;`6`pA4 z0^J{MIO{-@4?bAb#VFGN31;!Qq9(OQkC_r-0Kq9*&oU5eDog33<@JeJ`?V;E)1JTlL!! zAw>$%kD;Dhq!jVpt`TDmpF|dNx4?uN3Qzec{7fVS^NOvm$9qZ@fyVLnyoE+`jb}nf z&`NUN$M>IL`@_~Mvg&-Gel2H1g-XVjWkyI?ofu-Dkdk24@^{$~r>?<=Rrzukvhyx7 zrPBXQeMdA=6*l4K*{Fjw*ptkT=VYjpMfUA1O}1zrktdZQ44I}j3l}1c7pDk{;X0~I zyZb_2+DK%v*J3zXK&+l~@k=fc1G$4w!Ke4reb*GPR2+i^!Ogn$+#Dr21Q=9V%(FMD z;=nL#A$whyr>=5VgEYvOK*7;J9bIt`C+W+-eFqT8jy?dT@2w6%Igwd)0v2a@1fUyj zg{YC4utTiQ!6w4m@1FFrh6<3i>;zHto;oNV>I*i&$8k641Z4>2>t{AlYb~H%%F3gU zi=WEpq_I9J21BNq?v*@HgHEDGJ#JTFH9PM?Iq+vV_S*oW*UH`~4vmaVgE{oV-t3hk z=mBhnWx)J&Oo5>y+7FVmDUbo$iA1d9>Lqd&jzDw^B@Lv@IedZ?YOAfwL@*$Qj?4)v z#8`JCf(y*bxK}2DIVj}7TPaB`#v8;5;1OUtYD-{dz@XHAxGh^$bO_4ANy7j;dA33s zU2J_ymy;#zC>nr$m8(eq_4;bct{dFVLWo)1AptIkKrf%$r%8ih_YwsxWl96se?S>> z1^ehemU)uu4Qy*+d%V@TJLZs(W#LRP#|;aFld=Kwt#Z=a=7~N1R5G4UbBidMnV`dX zs-VQR;L)A9pTuK-{_S-Tou~ikLihS^^ z8LYv*Rb{>GjzFIc0ookbrYdK*AH$jI_+ODL%=mhC;0mLsa0d_l=>qRTVCV%G%KqV; zET#vv3g}v*`REg2--_HwflSyY$qn_Fp*_p3-t1@jcbNx9lqumh2OeB^A*KN6Zw$oX zIEV0&C_Hv9zq7D=phi$0-NUeYuC}wu@ZOV;vG46eq_jNR+eXI;*Qan|QxaW1+}SbS zk`g;RPRDbefXK>MUXPk%g|RZ{@z~IDp(yGUg0h_*?BIDlx3IlHQ)3zj*u@Rjm+j;{ z54czRaUGx4MIHm>TYK2=!C8bjLxCQQa`f*zN}o5Yg#_MUjz1#;p#FNjY3M>*oU# z=&j%YOYFT_dc0CX_Fl*8n8BxT$JVgWbb?18WLI)YqZhCmrlbKB4DvEmnqhDZCjpM* zDPbr`T*4_jmaIxU$ZjM&rMWJd8f!jHN?3Ow-5>NRE8ampbeUD&r zzX+B%+r`f+f?^^U{$ zA~VVIzpU*H1IYr9c_br(D7u_=i5w1$gRv!}KA?I8G*56&H0DM|o9uk4LrB-**<$TT zhy?iDn9gn{;0#TfVM-0E&Xds6Tx=GNOS5I3#=@aAn!8j-#7fL?Zn;Frc({t3`)i>0 zK8qN!mF-+%O^IBEfb30&lxVr!J!t58w={D|I>ekEIb;7wGQPt>d^$rJVFvj`wK&?@_n+BRz2 zJ5>v*1)~?hWa=P&3@cIP*efug<~EMQvyD%w8Aq{qBxl69d$tG}AwKx4@5YuhD1$2M z5n43{7(oh=s7c_=jeVMWyGX2K)pQu#OTtY;$H=-Ey_zX$!n982pDcN2Gl zv;&YsAMR9zDeJm@+l9!{7#IPs$-#5-ixv!S+m3@`2BUPFX@%G@9Aj__a5**&4sPF$ zKo#n&nP8c;3i*nhbj87Rj@d*ip4#Z)22d#3o#sE>078Tg@$njU7)~_-9fi5_93n1) zGFxK+iBGJks2k&4vdKexcidi;7l-gWIsG5|2yI`H8Cqe3Ft3w?>CmKlgi;4QPean) z&TVL2{k$|39DwaE08WN6;$rhu$Jb_DL(p09*B4)@mbJBRPgc6kA)n_uVaWg5<?yhaHJQH3rX4BC&)q%hO~3JW|%kC{jEPGHoLIXE}Qz-?I%v9JX@*W!X+o7_ZkV`l1| zO}IH+qf=<4Tf1bwPJtv;gbtZH53WFxmBiUVa6f|;_@^uu7RKYB(``qT3cF62!}1qd z$aL;Pw)D>BNMas7?!!%1fwl;Kb2d-FFZX1e2|E!5X7+4cgm?j`?u0}>f0~P|B!*pH zCFY_7Xu#qkAC{b+!<8O_u@O12y-4H~vVUxXJTf+QemP||jDe}AVBiT(7uoG6=HSe13JSfDre1YREi*r?LksB3 z!WDus4(A2r>? zNOTKMLH7$n7u_{vHmQPFHcA&-x56%)=H-}=lw)#qqNfG9v|>pE_#FsDany#uw+_G< zC!&{|ToAS!w#~^#(8MsJ=MvZ)(|G`V@q-+A6cQJz8w1tpL-ztIwXjVLi{0>~-uR&O z#@@X9fL>w$_)^w1g5jeRVaddFZMAyo+W@#XitXh@6#J*-Ert?~GUWAEC57T&Q6-6+ z)S}9fTteLbvDz^vYwH1rrJB1baKVs?W2=V1lA&w`o&*xaF?0G2z%I>81_rcDwD9Z7i@^@(ixs33`%CN;fRnZIFf*Y{UsUZvgcOR5J{Mi=h0YVIpRc5T*FGnC1rhjob1;K z*)i4cvzVd>8^>y3k=Z`#nN9`@K+>6A7EJfu_AwP4VH=`N_IOV1<~D~(PG=qNekSZI z?ygpB1{3d77deSV>LQRR#x?<-PV1H#emfSjdt~AgR_9j9Qe%=zaU>chQ*u?Ht|*i2 zb?V^*cz$qM2c<#r^Z~RJ-2ow9S}q+2Rzl3er^F*(@cQU0^O4Q5Q$-7;`}U^GAp{cU zVwrpFY_SvL2DPBWNXWSg6DXz_!vp594_v5-%99Z&C{q!3w%+30c6+tvG?$EGJ^{({ z@g<<>CCDpFtUf@QnpWjkyV9IKnIs@EslDPGD?yXe|&& ziH^kZ;$Oaq?7=|Eu@r9UVea!xuWKxkm`e&b)dqk2@!ZAeScuX`( z3OQN1$G96yicZ_%O1B-ZBnCm^c!(T&tCYFh?og#5o1>_rH14fU9dd6)jUkcajz8+? zEn89Rt&;8~;<=qbuL>rhx4g)s-tt29mKUP8SjY$1&w_g^EV#E|fqHu!K>($qh=nQtoejW zflsweqNLX&IvzYlR>%wdhV8qB0KAO>pcCjWS`Td7qPPdU`jlpE^i%F2$itPl!tn_gO3hU&Pak%3?{NvKQepC^M$eLhUxC;{crQlm z6{-Nwx5Y)SmA^a9c#a5;k5N#78T`2hV2Z1vA^V3BiU{q9xi((|0(VYLv?1&Wg?(JQ z@_TbAY$!MT#kVPpy(@yJ2!c`ai-oM$dO4)J(Qe@2Z=nN;i&-mhnDi@g$hqyK{dcV+ zuB1yk4Hxn>T>kCXQFW+#-Ol*X7ucK-P%oOnY0tjx2x0W1+ijL3$doKDklek}-=a)r z51g+qauSR_O2@-WqYN0m4wKUN-COXSy$w3$^faFDVkOq2BI5q!WYOs;as&Y&(k#x# zrJZvhM?>4Y6;-^Y&@$5Lu$8S_q*q}7UNSCsU(QkRM(Otw$j%<$YPe+^>Zv}G_j}&Y^$KvqSXwjDoF}#SWb4U6Q}kVq~2{Gz_EWY7Q+_R zmxfcf=3qsc0jN_T3?*{H_Gc$)nes7;FPPH9cFMppjP#Vj8c5O!44Mrlh0%u}sW}=X zNW*!RN#eE#Ip3DG!9B)WuT4T?=fNFF4AJOxOY8<~($o|M7r#Qm<+(gHpCF4bL9EK&4LDIlrKKDF~fUD=_LNidV0n=~E1Nm>|*ib0sX5*K;Ovpf`v_$4Ch$yry34OCPF`IbR8kaZp=0m$#bryo7q7 z$;D)#gZPR}d5g5Rz-b4bZC41XaL?V;ad~q^`?;D0jWJVUWIMzv^_xvAcPR1M>7d$G zgieNz+V3>1dL0Yi@nGzdgys+r%a_VJk?hGTZt$du8}!;w$@4iBHF&c0Tl#wKFDfuv z48`mbEds;J)f4q}UV)*{pOA?i)TZ%9^^ki~2&lm)2fxF zsBl!(x-*#-Ubwr8OBkPF-{NT|CQ^P_pT?_V8ka&;slyyM;U#CR74TB!l19cHi1Oo! zY{Rg_gKRoUV5f~YC!d(*gnp27+(ELy>7rWTg|#l0*)t~_vK4KdT&xv^P-iUtLUl`7 zmhVNd0iGMqFDuO1jPa<~L_s)if-^J?WUh{G`m*Hf)e#o1&i7qdTb#KFIyHK`nC|lrYs%t%0RFC6z999R~;W*wLvt6}=Fv25feCY8b z7M{CNK_5e+_6Q5W-uP~e26qb+Gh`#Ms*IX6a)nW)*UmmUbApgal@+4hdY71pe_^JC$KJ@G{XAWwHLPcyz7*#ggoAL;{$DtdMSMt4IT;qdLTQ z4D&!50Dm7`2|D7NEfa#~d`KRi0JcTn>6VW#tOhl<m zF~Jux&SBV&-@u)P^Jn5PVlfJATcB9UQTtED=D?JM?Ayi>-8qjz&_i~5tU#Sk?{SI; zw<-4kW)SblGIJ=IraTB9K}#Ou%04d~z)C2ig?LS#rYW`zHFjMk_*!?NLT~3~>W%`p zrjd4acKm4shT})^V^5R%VU~{3ZXo^>g3eYTGeGje*?zu)4wD*qH+{arB2Zxuas(jr zbQE7yZt8Uux}FXxk%4W!yZZ_-41AA>yyNen*VT$6byPk1c3Ij$G zPiO}lS9mIR^;uF3c#ik7R!h`<&mYnCiM!H+dy&DV>F+E#Q{vU1ELEyuJRE3kpXjPGH(;Ah%aN7CrnzfvBHz(K?jU1j_05p4-Kh5 zWMd%!eY7H8OG>Rymd4c{N*{8-D&KgON8K0#dr07N2ea`S4}pmWthgVmn20~hEQ9Jv z0akd8C(C~su*xz)XF0+w-!o~!#%n!U9&^BoGj(c?x58mhg-?*ub|*{Yhdh+x3JfyN zVGDAtH_XemnpjlCLyv>bd?y2qr?nRWjY_&WIBLI}nu)9J@4{~&aVvlGKk<15wGz>u zJ7CrU4CU|Qkz%~sPOoTe{;n5+BpYjRi#IZH>p%7w(WK_@nuD7j&W9eV+QQE5o?&`(NT>PdQtJiY_1?#cCYlcI9zgHPhenCrVH zEg0YF&-EpfqH-B?)6ZP{Oj=ORyz-RQZcS^ydBZZ#)bNu=B z`%&Y?%zds&3&!{QbNv-d3esKwRt=~iy(3Ppc*alft0qO&LcMkl4a!`fG-<*3$Njl( zHYqBXdaZCp{2u1I!K4M_`~10RYEf}Y*_2g=BQberI zK`NMAafz6xtneYq7i^HB1YXGE0-jGy^!;9CY7j34sj|4L1H zz>LtJ6u+GKM-4O>KkUchWMQZ8jOF>k6&+66#k0%xF>*LVW7eI^M3q!CPm?| zj87qc#6W}b@B8t`m=uM-CccFDeQHul<$S@9|09#4@Ylw#Cw`ZL`rde};(dq`=;?5v z>y20b0ec+e1WX(@G{Bv&mie3K+UxWZNs zbyWmdXBSL<-X8o4%%L=P`y82-tHp|(Bb`TeHb3+jpqSa>u{KUXj~vN6Xei}%nQ}Zd zHFx)DB+Z?%6mC7n=6~Wg@PoRf4+mZf9Nrh?q#my~5iSxnUM4b~WCG8u@r1n)Ruy{f@5YJq33^s zJ{*`$>Gy0VZo-Xz=Of~gi5oq)+|q`Kj!Bls5InbdGL=v0n&czu4U7PI-We%Y5l90b zMiU-JAFNg45kAc_xUG$PbAJtXQ3rqaSJmuTp z!;0#fgQqfS?yaj7zid?!!SQU23$h9X;q^j>rU7|~!un&>9iaLtZFmIpMR{VkA0R7R z2u{@QLf#?*qoP-4Q&=#yh#EI`d*pupmp4M=?WQbuNSM>iO4x#m3cifGfwGap#ZGv8U{c=#S8Cx^VWJZ}bvVsLsalzmbaz~aG|sQ}8TRS<^bXYk~QZ5P|?oN~U1 zHF-6g##Z0^6>SPRlzl;yn0P;XKE`3aERb3xmLNHYR_wQ+9q)jtir-FqB}dn&x%u6^ zw@^P&*FiCPvnqI#ed+ShHbagkVx}Lxais?OsYSFzW4G62&gO+$ZZV6lSSR1ft~g>E z9%z%!I#Rxg>7DG_Lt^HyT5hV{rX|| z9mDST47=|fcE4-bee1CM#IXA&|2;ICj8d}|$D_Za5*U@hs02nOAQHF_W}n|ve5T@< zt?$kaSf7~{u%5;1{aR)Rtjl)?tSj)16$h*+^76~GPx&4GL1RPIJNkF4zl| z>-C!6a;(KHdw;~k*9WZE@iia90~^$R3;s`Nchd~c z=>Jg(j7nfs0;3WbmB6S3MkO#Rfl&#JN?=q1qY@aE!2e$)u&J)Sy?SHa%o=Oj)b`S; zwbLV(64%rt9k-j3WHYv@!7 z;mh!`)|Owr)|!e!`DcN@sfg{zYiciRt!eP_zr6g4QlOMZYFe5TZ7oerb#0OArnb83 z+AWcWX4I^1yyf83wY9ahMK)Epwl*|xjBKjg)Y7&E^>EUgTOtjYw?x|NHa4_0w@0cs zS2r|OZ)oz801u$w)KU|vN8)&keAQGpUy@MJ>O@^6p4<>=X!}THL$bcUt_?L-={Ids z`IxLlsxeMZudQpZX=`Xrw6y8WtdJ1)q>xa&x;>I;X+fQuw?tZ7+7j)Pb&id73CW;} zvT9nAO|?EY8=4c4N3t~$Nw#fp)7z69HZ>#+hfG?L+<>N-iJIaMg|a!U%4^CawRM{t zYU(0Wi;6o+`2(y7G;6y29|>Xlh}m?W+RM<=Q~3+kWEr@^A6gN7)h?A|gen{R4vxw+YZd{QlCgGM47MowBCw#E zI}*8hO-rJ>$xnm=E*6DBezc~ez3s?|k2n7YA5+&>Hzn(Q=?%X05%O(Eplg*siHdBw#qv!)8;}koI=c(Kv4@A&ujR0OHu7 zm~o|`aU51OCn*0U9Au9**S5AmcT9Cp!g0!qEIVZnPz~tq15)1xH!rI%AD4b)n)HO} z7TScPk#%KzOHI73rMV^9Zj~pSZh~FXR@Y)y!>Op6K;BNG%=LCU*U)TX2)8hlDY*gP z6tuLqwhdkYX&A1>{A$}JwBJHshU4Dsvr^1Wx~^{XeuGpQ)|fZ?W6D-m0ywMd>cN-K z>Yjvi&6ehxxTgZ3<>FwVGQ>UqOQ*Juw=hh3K;}}C#K|!b=RX>~WbJrM57G`;U0`q; zZzbBQo7*wCSJgLFZ!~Ha(fOQ2HN5NmQr@tnswNq0gk*J1B3a#}Ax@c+)LxfJwpO*u zXyBxvG}H||wk4|S+p0I|p-9ptSF`k^s+M}4Q?V&Y4OBvZiy)sQiHlSPZ=qQaOD@40 z=yY9&7tAzaqo!q3Yf~LegzqCsuoE+9Uf#Z?{qm-U=48jsZScP8+PtH;xS$owt~3U_ zxdrY=U1GB6B(jfwMkO#Rfl&#JO5pDxffvsmSV}U}j$%5F{}c7M825ML+mA2iST!we zbu(eKtxXqO)|L&H)!S)VKbvY@v&x=0?jpFbzi|wBz(N;LY2C!$vtKtgv;ub%vF16<8CjGp)0%LhEen9P3=xy-MckRU6>4xp#0PJa?QH zGYvRZ4b2S+xv8mcsu2idC<+pll7$ z#{lhcP}|VXD1=OkG1k}BIVo~un8A#{%3Q~5s%jf_4umYKHa2Xo+W-f`gHT(ASV~oE zTgwK;EYS#QLs(?90VP73)~ab#*K>RkUE` z1fM;Cy${n}b3Zlb19i*mnyRQw$HLA;h1FenUq_M%WJJ`tSbD*tkt->(z@EZ3insy z_kFnL=c(Xt-(%3v2X2zAV=Fxm5tySP84mYOtEEjiA;NKE{{ji8N3sPNRm7wg|D6`0#i`opAomWOt?5+qv zriw0GjeMDQq{9rmt3UoB_{OKwJKO_~Fv1LJ}Rh%ovYmB6S3MkO#R zfl&#JN?=q1qY@aEz^DX9CGfv50ZjP0-~a1H-z<8mXx*&WXaD2khZcWnF{Vp0U;brL z?yTvv7S8(G?5^44=bS(1)j8)BXNo^loS2)M`>T0F^DdtM(~{-|Ab`m=XZ)X^-8g4_ z$zMvW1qBPvUhu&M*Dk1EaMOZ|OW#{sRvIn6tu#~m+0y$;_mn+c_Lnj%if0axr=#c- zMRylJSN!MV_s(55w{709=WUz+`T02|;gXeQx0L~*g7YfNI&03HIlrEhTm0R5C+7Wi z-Wl`f&%a`RVBtjzFIzZ&p|u|S4uJE`S>tD4H21Q(>q<{6D=lj%dk`gcmHk`UPs?5_ zJ8xn0l7|^sXvJOy{F_j8&YbCU=Fho)&h2xoPRru?y_e3rd|vsy-1(vT6X#z(zj*#t z^RJuVIRDo9JLZ3G{@3O|KL54(f1dy5{AnenB}+h8j>E)$MO0O-wq4cKGouwZuy}R_$(gUSkrN>Ht zQrc7c*V3G_Gs|X_%_>`3c1_vZvbM5Y%5E>auj~tDhss_qd!_7;Wn&kH7fxHaXkq!n z4=-$A*s<`=gv+tk%t=TWk zesT6|vj=Af=A1ic#++Gmu9$PVO<&zmuC_Pnd- zwawc;@Ai40pZC>yPtE(myf>he)$=#a@0|as`6uT0&L2Q)HJ1Ei$@fbxTrhh<`GPAJ zT({u!3m#tZ)PnCW_{oBwFZknvzbu$tT3))kbVF$y+UJha2TC6+JzV-yDHP;BJcELN zR#C7h0y#`8no(3#R9sY2w6G{zw7h6V(aNHGA(KanzEX6c=y6EpM3G(8TQmUa1ZRb2 zG3)4OR05+C7?r@N1V$w=DuGc6j7nfs0;3WbmB9a3BrvnSp@}QsJm>69ydh;{puYO1 zVY}3uagq%ABY$W0{ z+l9pZi_NEQB%e!MkD& zhqDyZhddC)^bb4`#q_Hlh+_IR4@5Ej2MGM4h#q?z!h+?|bh0Inw zzt00vJYVO5D4sWYAd2Ud2cmes!-3$OLy-o5z&6@_CJ+13FoE!A*k@*Kb)s6sK+4J; z31>q)G(&y396lmWol8jM6SyDbv@+;XCxmZq;6}57L}2_e8Xm*7(s1|8 zO9u%TW?4R9MMmU@xRdc^PZ1mfuT@(imHs>+JA9D;0^}<`$R7duvkwvicdcW*WlaQR z^H?wBy?|VS^OszH$^rT1X$Eq#ZhYf(3nyrJKYusfXmfRgGR_UC-9)~!v}M~1plWxV zW`Q%NhJR>R_<=y6;ry%vq(a{*ND`0@KFIBWuqR0A_-|Pc1G3Kt=>nt+GLZJd^+=!Z z1Ah7$8b=U*1V}jF3!xQx-p8)xt4-!E0Pe03xb2=a&_CYQHWJRGD=Tbo0e2}?- zeANeu0dhW?(QWq|0l7g#lzf^1`Lqvb3m{+dL2d)&XFkZM0oinpm-54a9P~lH1;{H7 zgom8qs8-pf=C;@Of%AcLz4iJjAQe8y2|$`1NEM#+s@l+yxXXc1^nJj2&<6>kdRHJk z?)JFz06Cx`K*#5DK;HD>lmZey&zox{AQOC$YXK?uK{f!gRzno!TL5{)2l*r*hbDO? z_6Q&!d$$+T1;|T2$WH;8`W`PoJ%G%=zzg{!AfNL=f)MbtK1d-TJ0^Q`T?EKy97vTq zwq@2c4utYq0GzxFy}8~GNQDow29OpXq!y6a6mPDN0`lFdUdSFmcHsOVw{`9W@q|X3w;#fFwWjHR+ zvbH&pssj8?xwEh4~?vV_E+0EyyCI1~uqzPrK)DFB3C zqMPeofJBWnPN5t0H})7Dp?o=Vea;6d2jo>BVqOp?zND zgM1sguF(+68d{06D&a=Exe5Wf-UoRJx!Qe@Za{wJgY*G%b+MPu5Fm@-`YXzm4^P>8 z*nzP03GmLobam_C7CU z5I7I}AR$Z$)`K3)QIz?X^80*{3jz7I&ZYR_JI*h@!pq@OO~=*4s{yI>;m`+o?EPMT z8i5lInGQ<^+DQ=doiwm2szx($@b??B#u0$M35q71=wf&A2X(`ML(w` zasz#S1l$?>a|v*i{lQswBiNtYQHyR<(^J@u&jIIkgCiw19B6 zeZVXEUjg!aAEY0U`juWej~{1QH))7!!Sex0`XKKGWa26><)wgp>nbmVedjd|QQEQ& zIDhfsBmn9Bpf}eZKmw~3MCJMnAT2(~!+>nj5XIp^KpL;{(s>4u@Ax3c06DB7it>K} zvU-iTtUmxUw$e){2<7PXK`sR30Uu;BAQP_j=DG@y2e0!|ranL7gVX@$n;Md18UML$ ztv46_=T0Al{__+lwQEV*KxdzZC~2es8GpSO=d*x(>IMZ-IFAC-3LSBK)6;;gTkp;F zBS1E2h{|OH@{$koXF%pwdnu2@{Pl^Fba4gV>!8j8TduV^?Zyc?6hg1 zz>}&jjn!HKBDnzN25vbSN6+!+!V)Q~g#)Sa4us)`YaVKG)JOxkBYoZvoK&5+y{Z7& z)!>yz2OxjE$qV@uAQPJn#K=dLMV?X!9f=U%|3XlS-=y(=`}b~)b|0I_YqSsf?frr)dzVUkOzH`K|r2Jm|R90 zs&q}K#uw#oGbs%m+Lqn5p-eELn&(jkbMp; z!`h(U?&t5OKYEV#v}0|)4v)b9F+NhOBl)(L_A2-EdSX}IT#fT_H?<$wrEB5iR?#!{ zQaG$v5fc1}f46#REAa`3=V3?gE0(OekbL)B@JzI2z}bWUVv!`@YCsP9AU6VXj}NjD zkVkf#Hf6R1AXnVxh3o*N(g)cONS_b#03hQ(=FRnWK#uz$&j4~RSafylRY0!wL0$)B zy$^yTpRI%sayB5Z_#l@7@~*U(@=`!P?t@$d$ftdf8bAv7dULe`Qs+=MnxG_4O<0WC z{5%TD`MfhtSmES17iK)=D`wPqy1*nk|BZ(K%F!0s7CHADgQw?nD{2uj_3|sOV3~R; z9M%g1!?4f)q+UmnSG4Xe$|@3mShtfXTV_0U=vXrwxPmZc{z6b31M0}7AaiSR=Ytfp zclsdn?sXx0MJ)P`N{^mYdfcU~_$fwUU|8t~T!=2c;vJQ~=A_bZbt&u8sYm|0bFD~2 zbm{BgQRyWv9WD9w!^C;c&>j<1R#(-t~@3UwKmLaF+dTQ5+o(nb+q+ zbm>RmQR$p1_}jh7rL48CWH@AAmkZIp1Xmx`Z0qE`B5}Q0#O=BDiFmRZbEfq!9bJoV zQwz`={yE8pkA$OR??;jOl%s>H7vi?M?twyF4V!~#O}Np)AvOO;j}FDt02Uc?A%57$ zjGlS$Ax|YAGcx`!*1dS`Tk)*x{_(fRnO|%4CjiHN*k@*2JHr<8q2sJ1oPnQU`WNTA zSP=r`@$o91aU^xnrm|z0p9;=1z~P5?3UUk(TWgDg{1On3o@@mL`86OMo7`Mu3M?z) zqjNqXzFe09auhf&ouza(}n=K7ysRwo<9M%fV!p62BgR*vE_gmYojDq3CICo=^Frv zI=QNsw|**D7ONKAGfUC0tt8^cM{_8Q>BktZS_gx%fLC{ltqgF3W!@%=Hh{@ z6~0{m0h}&}XS_0#8RbJRRlQyZP62LR`Md#$>2V4t?@Y_;L=N`l91E{0lYLEnK7I;; zQvr0<7FBo~TUAZ6jk(;`i2%p=Y>IL*ApWwJ0kR&sR9U#Nt^tG}#bFg+1-Jq2<tlc%_3``wDLaxUoqr~dkMh3)!WyU+tg3<((aQX|GCT&HA{64* zv>On&4_4`8aqsiB&ToKoE9kg94+7E$h)XB`ES6N@(Uxg|uw+-G<^f_nB30Anfb0T} zOL;XQX8ck(?SPPwTh>-U1^{Hb!pQ&<#ifgLHy~ZUT08)V%MZna?DBEt^8|4Cae4l} zhPWL5<|Lf)9DJNylp&83?(~&@A#kX@E{Agfar*`HR{~ zcN5;oiTCx%`}c4nvPx911(fgv-v}fb`RZwf%56NG zsyozc5EZBfuNP{oidQ!!TokD$Ul;6xRGe79D_4Ux4}9qnCx=y(q$JI*YK!wdN5lD< zHEX1V`gTH90lpmZQzcZl*EBTDPU1*v<}|V(5xjQFw2e+<<>fs|Rn@h%ReY^fn#*qgOHNcrWOaWwyw#8hgO1ieY5q6`I1m z!F!ZAv1$NVRZV#774N7x?sa_wELJm2cGXAg z+FH1g%c>GseM1}YT_APF|MD!Bp;Sb20fEgWueb7)h)O#p$~6f&teW>(MN3pAeJ}Zn z&YGv8{ug~Y$o_YIIp`<77b`kzwpB%4R5IiS0Jgi{WTi#J){&Qu38v>QT8^};5_l)M zBE;S!uLZ4A?*Rop^`0&Bs!oVTzqC_j@Vtgg=))4qOLXxbF?su#!jdKx_N0aCHnk?U zC=rl*?_0*CN)#m%u;D}HZ>`4LpiKsOMHw5Zy(V5)n{2A9y1AuI^+L(zyq}En$mXAm}3^W|yiLDXt!h&LVYm~Bb6!Pv-qTZyAyPzLwI!E3;)@3099 z19eR`_;Lw(k<^RQG%?zB{pvIg5&NrPbi`d-M{>66tIKtLi3h7=eXFw;=^4cx|vYk$~326erujf&z)vaA1_IA7Y3Z!@_%? zrBMZQj8W_)5>+<|%j#B@0-%1$y^KNR4j|nrll6FouEK8R3#hBuj6~trl*?;lz_t8j zyn>xqrjZEHQQ*is^rReChsXXaO`#T&eHX$!>dkjjRzpiog8c?iXb6oRFQpNEq$Qiz z+ByIkYCU;HQp4}vp2Xrw2XC^+mOJW&LrK@8swQ6Dyiq5JSYaWFlu)lckn0B6dTN(S zscpkc{vc23bih=$!rW2j&B<1yFm)Xb3A`UrkXz$h+VPI||I^pCEj13qP(F!I*j?HO zW?0za^6Ux4rGX~SBS|Yy%{&Gosi7UINIvRyRry}sPa8c42Uf}bK zgoSPe;cm%Aryf(@df<{QV-pd&qx^OiFmRrtnX{ZYAm=HZlgWjhrQS6v zlF3`q3|_^+46kVyj*ATv(qeyvrrV?YB7_pkLWsG&0OrsQ8m`zX_>%=i>ntWe-Xl=#m)DwYNb~~_5=|r>6SKq%*BPD|YEZHjkVE2zM%!=PTf5!1_}8C%3CvRU zW`SmRLf9XB-Zd;Tfnwf4l6f{GO0}@93^JBOpB*?j%|lA6l;@%NaQW>g+yJO4UF3}@ z@HzsbMBpv#t-K3^&eY26$Bap7;!vl3(9tnjltdMy1eURJ#J?mFeJ9bySVX1s@xj0mm6OIp7kc&>y!?>>Pfhv6bQD}&h zZ(do~7=DuHH=%knl?O&&`;H+Q)bqgjT0;!!y?+6c-#yW$Ab~y05?3Wc6nU|7m6KhJ zi~`Dq4(`n8d`cy7u&hn+v#7?EH_aaJy7QH|6#IO2RBr`r+z@TCuHH@^URR2(i2`rY;K9ZZ6ky60Fz%r%fr(U)~8=hHrgVnI)K97EJM PzR0ZVJ0alx`JeEA)a9-_ literal 0 HcmV?d00001 diff --git a/reactos/drivers/usb/cromwell/core/usbcore.rc b/reactos/drivers/usb/cromwell/core/usbcore.rc new file mode 100644 index 00000000000..bccb64ac3d2 --- /dev/null +++ b/reactos/drivers/usb/cromwell/core/usbcore.rc @@ -0,0 +1,5 @@ +#define REACTOS_VERSION_DLL +#define REACTOS_STR_FILE_DESCRIPTION "USB Core Device Driver\0" +#define REACTOS_STR_INTERNAL_NAME "usbcore\0" +#define REACTOS_STR_ORIGINAL_FILENAME "usbcore.sys\0" +#include diff --git a/reactos/drivers/usb/cromwell/core/usbcore.sym b/reactos/drivers/usb/cromwell/core/usbcore.sym new file mode 100644 index 0000000000000000000000000000000000000000..12d9665979571ae1babe6e83f7ead51191a5551b GIT binary patch literal 7904 zcmZwL3$RsH83*t!N~U6gnm97j%|s$4gb*L&<0=?FP_G&0pt9I!?{)6k+;jHc?8m)a za_AChPAWY}2-9q$2`os*(j+8N!$zmHVH|a;L7Wxnt%Ka?#Fo4na>#K!<`Ky8PHfE6kX1rng=`ga z5b`e}haKX1>G8Zh$3X@sa+wO5eLe#oV#@R%P%G9iycwh4J2a^e)5%Z}k|kQT~OP&dNRLDh;mxU~ZTrrjRB82n_i6L<z&{ue#T-bw+NX8dE#_F zKC>WSoX+KP$Q~gfWXdOadveHGGq`*na<7oJkf()w3$kh^&$SJ5cP*-n+fh6)b9XJ& zi>DAXb{5a|0;EsKUPvP3FOW-S^IV4=hO*A&atvhE94?a~>z&v!JPWc<$UMmPXYpKD zLsmGkxfVlCIh)6HAZIwSF<*eR&f_ubAS-K8QBuYoKfSFM8jVee`I?X)LGBUq6y$qC zUV=O-=6Vp7(-~lOcPB%z+#bav9{`PHayVWcmfXrzxaY$Y%8IHX&;e zbFYvMklzaV0i@?bUh+&6anB>_y4P zUc__#8S=0YTDjvc<}tK#&lfW0eV%u%6FkHZ&7XyHc`jNzi-b%q0brM9fympM*RH`Mb#V z9AwQ6y!KZie-rXoNb^Qs``Gt;-hdNZ`-dQ} z#3YcZis!l$@);rDgpBw+<^jkd4J)?fCm@NC=ODvQY%gAcEDd-$`yo4oybXEMi7k2D z5uW$ykk@r0Xh z2V~a>mwO=lg=~Y&S;b>^LQ)~WglrPB7xL3JJl6q8&n;XI9p`x;7cvntL&!A9d?DvT zmN>C1?n=m@5Fhf4kPNc!R$lvR$U!0ZL3(cIF*_jR@8t3u$Xjc<{1dYBt6Yva8tf{f8oySZ>%swGgAY1O@F|#1^*K@fLvQWrXkOM-NK#ttNb0v`930V!9_zfPj z5ptc7Es!Nbeg@G(o`n=bUV*$Ug4s+Lg(^jh*?q##RTcFmv$vDvbK)B5hiIC#YOWgOp1(heY+Ma`C62`s}@z}4dthi zYP6GJAd34{kaW_vE}|s%%)`9!v%78vKqWwvr5MMzv)0(F<-5=$c63m*pqOKv6 zr`mW(DSD0F&&?AFVqnF^|l$&#d?yMFK4ZUXpi(?>J1y))-HZRub@HT*anio&8*2ea^Hq^X)8=04l4km(`9o1;5!jI4yDv0KCGxIxI#bu{K z^Tz&(pjxCZO?i~oahN8U+A554ztMJ4=9QY}nL2eREr#t7m`bBT-N0(0 zR`pVsXej9czBbxgQa_H|#A*d7T8A`Q@}Q-|vaQunk_~ior9q_9ENN&OPfF0z3bVn` zFMO;JH;DAAXcwviIzG)YdX8C*8N#1uI#0?BOTXFn`!VIJGO%&haZ!RP;-@N30w3+_ z7Q}<7vbr$ZVNLb5nBCBtj%oBTGil3_eX~=M27rpAH&%C!67+qWZ*Feyfi|(nl^II2 zWHx}>Xpp2-g;je5rNyQ}H5G*#(1SY0@}i_I8Q3VBO*4JyRoXbWrrZOD3MG_&knLja~2VqzVja+)%3S8duCO+rmZ7AK}kni#geC@FQKCA@sz#XSwrX3vE!b4gfyxTXEW>gdwF@gVNc0>>TIQP}s%|f4eC1N;9$371 zH_58j(Q?7LiAjM;MhP2Rmt9}dVm;)ZnRdIwmzQi;yFG?%-<;6KF92JlNQc;W*`XqiAETE`hFOmvJ@4YAAPemq=n zlvJKNT0XEPnU?w(=}YD&8RDu*Szw}&c2_xz_UbZEQxV{g=gTziF? z76|E1nY@(@jT#_BqsGUW9Uj{&1AKZisAo6b`{^~Y-0%IYuI;@aS1<6rpYpE|VcALT z;bmUKQ0Av89g*1bLrf7|cCZekI8aNYW;4=Agb6JvdmBfxGmNt~i|Kyujsu8WwB`a# z$!hzvcV?5xg_Lo3r$!{b+G>!x0MEMm4ck z_%}N^T}|BFcMHLq+4J&tVslrQEpyRBE;Id1VxH;8CHMk3OjB)MqrZ>7fa1!X$M&nJ F_kYh>(~6_7x=p)Mw1wC|P=T7J`O{5ElbGz5 zRA`%ai*&mdE25yH7eoa`uT>E%;x(;65K#+OMd{V3z4ELZHENW2jpXayr1kRn|+=$XU?2CbLPyMGxN-|>iPp#zGYcKe20fE>kxkViOT<1|JQ}&GtPhP z4C|2z-@D*YVCDBNSQ~Hbh_to0Zf>vH5~;0eX=zPFHq}SklP!_PmdNsJ)c!cpw zzHukN_yJ6%U3*EMz>!no5}A4Mk)NZM^(mBv!mI=d^y8O;IO!9xZX6YU65{^|Fe_2t znLv*IefUR)4(MO}n9oMb+BmDOCQ$*QR4bnb=TIG|0JTsxLg89I}`0#pM%4-}$y6PVR{f zkqq$nuNzEPtwr7@Yd9IQuX{J~Lh0B*YWskdI9IZV>>suf9L~fB(y{*RH%WJU*h-wA z+CF3@6;jylyIsmi$HM)o

PqUL;boPLSS(vQnK>_9w1L^#z+^aqD2ficiEpdskYr z4JSc9G~6~t{!fknyffy?Ze5*!^z^|WD)p; zpeWN)is1=x6x<&hs2WaAA@JT;hKC{ObZjuSebCy5CK-gta^sZfOu=L>7EV_d%SBPT za6riTa(8`ZZhzPz_G zfD16&kgg=CArk|c%Af%IaWxJEhm+G$k!g%Gq1ut*WS{aLAeBptIw>V5W;q7rCW zI~_ZbiJjPAKX}8tgnN)lZ7;UAfsw)AQqb=-E%Bz7ku5POoR(2>Ok?<4;(Vtiq?x24 z&iaRG2sDATwuo<3p(|NK=t|ZQx{@`7u4J9+n~e6#tSj0Z8{WI_74TfZBKv|Uj~%Dj zK20hA{@CC!DmFNrXoLvj1L%U8*kmKB;wBZC+ZP*7A36N1kVNVB#a;;8FDFR>2yhBE8IhksQ#;i!?b;=Cap zdu8vse~iWz8u=B)fM)0)1q>#R!qbP*Qs^ZvPYIE7iSA7yP;WXDeX*bo6|ZWtngV3} z8%8Z?mprH(Ci0*ayZ;nXh+523lOANIa{^rGc=PfsuZ%JkQr zy9BvQdSW){p$_)``hgqXRqaY)k?7syOpHckr0Nwj$&teT@p9TTj0jSjB*v^`G*r!=h!qCQOt`Dx;VV1e7 zFSE|poj~`m%+fFz$=e(IMd5$Me)00r!}j^<*bAxcy;kBJNJ*QVU(m!sL5Gh*R{LYW z=!z7YlyvN9CdMv>i`4cPtVCgE-O>DYq4c_EQ?X||bEhLUKZc==w-`U4?O{;d+8?u_ zve!b?N|YSMJW?_p`xLe5{U6mvF--MJzCev!_rll7!oF3%I7tWHT0NbK(d?vSPn%jj zEwy?g6?;Nz^|aKAw`HdgY(r*wp0XL4bx)-8UW)-yV5c6prGjsG+H=$o)?V`ASm?f#_x{}4O_WS z)9Xx*6TdMm9_X3sx+m5ro#s!%FFeWOU}6caLt-JAVn2u5cE-+`((Q&smHI`M0KlLV z7Q=$xrqzpOeP2vws3$s;mF=mV&L0D#ZwFY3z+ylu<_eX!>(Q9$&WD~jLG`Y!gKB&P zt}X7j>g6D?vmpBwAcCN#MlXm{n}OFL^EYV#ry_Z|*8Q>K z;gA+AynNaUc!(9T{;e?#PZhD^_PksLR3$$)6zwXr5~xLAKIOUuLmKqv9Nedm^?I9~! zCR%|>N)a=nBKhtmhG_#;2tBbq)b#8ZRqjBNHX6kZw}tk{_Ey=;q#i}N)gYbcCa#pk zi*@2WB<3eCM%5)}Rs1stG245X{|@4x;J)V;3M7)l1c01cxoBns4F6tasP*boEnxQ&Ds#T80*IIuY)tdOf&7 zqf7L~(K7p@0a3>ZN8v306##f-dANjg#>*fs|D-O*;j*7@$&p>Z67MS(uBe*1qab?~ z)CmRmM5nM$@MVFde7edKxY>U-8Pe;H@7jJm0F5u)b3XFuo1K-Z?Z*oW_k;oB)y{MA zKTx=b77kbWg?s*ltL!J#?S#TTzgAbL74G>d6K=ylkQ−Ei#m+b4A|DBbd%miY zEhblF*Q>jUxGUUK>fY=;0~zSLC1zwb*xE&$$-v28h=0)Er!06{Hk!rCRy&aFTDcsM z8c(z6%Eo$kVWdZO60Q1zH;+bG;aHOPj90;c7nWXY8{&_Gpm9v1gUtyg~tk0;72@mLl%(%g6H8>@< z3?{ltVyx_YW%5y!URIJrn?e*;4&e>{YLVow0S)Olp-ff6r~rv^KCL~rn4(!lwQ$T{ zrm~DfR3yD@N)E#V6{(koH5Nwj#7ZcTj7prwC*aaUsb^NiPHaaAgqNIWQ|nHoD@$a4 zdP1h>w*9tF_BVt>Fp1XF^$o=Y1;ryVJx9-Uqs5u7&!Z`5W-%mh3#MWN<1x`ZJeVJq z_!5TT^;Yt1#n}ENd@#kx(5-pw(rQk>PAotu)xEaLruUBW(JDRBwePwppoTn5$2rx$ zzvM{3N_C%`uDsEcWwOq~`h?PzFxrEFK*(x7kE&>ciLw8zofmPmS#(?EFxXDQMa1Y5 zN(Vp0d*fdGL~J9nw)e zqTPXwn<@JXZ=>Ibn+yf`IIp9aun*qWUAX7pBxNwu)r$*J-DE+Q+eSoD21QYZhTEnN zCkHc?rQ)bS`aK0!cRDoo~}w85KM z8gzh^&eECyXKB!0gI)to@XXCQ1hbQ{$#k#^ai5UAM=Y+v^fkc6tanfvpduDZqN#^^ z)GgUHZE(zZGNLh)58H1}_2#Dr1IdeY^MY}$pIb}_heC%eaWAite6KL?uXeGm)CNb3`Y3Me@2UDr&Yulx#)j%*u3;6P2OftNVRDtT+HVr6w9t*BB#_@<_G&IXwvU3Xf zkOW3wr8{Yj9m0f~=%w5H)J{^MC$g zV#3@jhf;qC7CwG-#xD-Plppx-^taPT;bf(sMs3oJeWza#>NZEF*oo8=#W$$P30O3} z63wwvF{PVhp}A8{3rP>R1?@K&sPvAns!>=snHKa{l%U-PMB{{pOEiJWiU96BHa-ZT zB~@26Oq*hCaLI67PzD{0#J>)Y0f2%P=yp~1L0MW*9kCdm3=O*07;c7Cx{4pEf!C?BDSGb3hC|>P64gUj);_M0W{rchSor$aLkK`7MEn73|iWynSpTU2S>7j=| z_qj`7-qM$T4l|9zgXgE8nQ_F4KjupiQsS2q;6xsYOBT#PSabj0)AJ(Mp&zc=RP=K8 z@PCg(Ky>hYW>(`{!GB=DfhuJ;qU_fyb;eWZL39z1gfgJny4!rOD zS7G9Jnu!-hKt&j6?|^LoX?A>^xC~MZ;5Tpo-cS5F{}iRm20d%fQ$F1~=s6mP@4jXMaHL;@tmTuT`>9hH+X2P-U2c1OIraPFMO@ zP!)UJ{sa4A)s!YE2vi_<ZlLI$3Ysw5)RTB2#Qq4z}NsUa~`u5Ov2iRp5JQ>Ew&bZL@rP$uuN&3JTX`R-1boZML>fMoy)onY4mZq1MO6=wgB8Y1^99;y(a_LoAemR>NJY zv&3SQy8m}*vTV0P^Ln_D#I8fVfZv9%V1ARB3<`7PJ%C^M3ZK4-_K*Xg@fFl6Ydc0- zg@d`tko_Nm2FFtzKe*`f%dvJSbp#e2A*K*VT+dx4JhTB6qP^);b5hQQiH=sJB(47+7Q{%H#gVZtVXm&Wy7%_b?5V9{$!k|R|pz>&vK53Ghy*2Yr zG7|76JWYeBk}y7u+RUCSeA8Ee=g}RiLOD{Q%Rvkk(lyO-dGypXCScu#re=e3;T@g3 zFPoKykYW1yDv?4OmBQb;K~$}xa%ys#bW2n;l6pFru8hc-iD7fl{`sG^BR`beE)|a) zw)50{2@IlYT_k>J5B^(;D+I%tMdT&9`bg5N%NUs%E=*S~0wmQr(@Ho=Q%%xzaqz%W zLXFp)dPS$}sh6l|0`8?$6^?Fpy(_4n5 z4KPVWx%fXtO7x;e*H^^CNlejzHm&)yh)M4 z%9;WSLprb|dr-jTv3{DTKZC5403FL$I)+-k0H^}57lV&7Ay0U(m_e;Cm?NQ!{jnDy zN&!uQQ5a^l2FX+I!8J@vhAkLMvbmrQ7;NmsA4RS8noI8OB3|I3A(`$rgQ5iRetmte91!|W6WQrKL?_0RoDG-Dr{QCT$HpXZb$P1(n$ zT&rdtn%dXiF4VGFsDU7d72Db6MimkqJrmFc%pz2a!=wyIqnAkU^90{ybe0aMM`y69 z#^w)6wNEuRqtRt-&b`~yY8W;hFR4TgOt1p9^k%+=4G7H19+F$&jG$m|$bRfkqOc&* zBTB&bktz?_zpvE-^o^t}%!1Y%FU_4jfnL}?poe0*c&^XsUb#kh>!;n3j zHIz+d)MJc^9+OI!g@#a(#sA4dQ)6JsRBRwb0M8=>Q$^9^vLZH=SczQX$10^3u6ao| z5HlMTbwQ89R)8s@fc;tlIog5LVD1Mjmqc@)rI4dAOPoDQJlI7>d2Kz``UQxjYLneo zWsjFSnOMpOv+5)voHF~j<#5=#6SRk7InRc>Ze~Adjmany8p33;p)X^0D=HAOZz1Lr zMYnZtb29%FsjPJ;HvKukCjq>*qEAgt3|zJ!%QS(|C*D01ZKH) z2LAYRHzi;=gjWf!z1Z{wX;NI-+^NW*Me`VL#pa#dhq$XliE68-QsEJmn*1eH>g8(T z!iZ`Ds6hp(Ysv?jp~y=ohzuiGp!O1q^PWPpdgy;%kpj;OSV8)C8~U;aEo78dB;e`5 z1oYeAr2L;K%0A4PozqGmS5Pg~c4;HXqK}fhNvCnsA|ieX*{I0QQduRJq4e%OU`<_T zqL^J_tO71N3wB$sbg#MFk>=Y<@9shdVW`i3;woVXGrZJx+e#qb9HzjN7&4}c0m#mi z_D3^dCK-;eMLlK6{n)!Cqap*k!)@5i7Vn)efg@nry&H%S;Z`YV5xtSzCk>bI(mLh3 zKV5mNT%5qx0GF%2EKM^w!B7>6FsLcKb1i^lWgH2xJ)9wV?kW)!gpm8}htQXi+f$XW zR7F>En+d~yk_EC9>N4B}&jfc}IDOy*k`Ljl)<^!?D;e*@nLWFYotzUglrclx2zBMq zck(@Paz1E^R4rt4aZ;>?nqL-VPX|C04GX`Rtq=9c0Khpaa$r+imHor%l0`{F+%d6kjZ~c{ zLQo89@;Um>wiVUf9OgO5W@oZ43sWEu@Yf2p%6^aG1T8#df5O|srcO#83}<#q=8_I<3i-kN$guEDsw4Rp&7SrfG#6RkMvHdIKnsgCiM;RBcjRI_LFB12@yNFqOa-sS5xiR7zxSU8f%fs=@+jjNdF zK{}9+h(@c#-&I4nqFH_F+(k}ZK;!|+R}*=3B$3m7L{x-8rg-!Q;Jb48x~Fi@7uYVi z+KCN9{dX1a`8e)#MYw*YaL)%+nw7YK8Wf$J>YO}bM=h?oh?%?|7wlrIr=+WjaorQ0 z41D8{tIm#nCx}_Fz;L zM`9S5x2dqZGz<*r|J_0hweDo+b2_vUPK@K~gVSi0{j4-`5M%9oSnp_5xo2ji>$ks7 zVKJhEktEYa+a~kB6PI<%WuI~7Lq-+*u|GuXB~9#wDnBf$E?G=Tzx~zqq#Mq5fC1OJ zM0B|b8%kbjNF$@6L{Mki~9(u?Kg`B*fDPvp*Q2>zF9IK_@n+)aZY< z^g;QFhJmpVRv!cQucTEW)B!likYGXfhain>NDn-xI)f4h;*1my0>iw0u)#pUJPyMd zMqgyqdxr5mL6{3&1c}iIHk?)&Zb&bML&@3rGfv5Jq5czy$A%iWgV;f*>*qac1HKb{Zx0 zV-{tlD>^Ddk!TfhRSuGvY4(6~-EImUOmHw5MfpSaCfSgSoln?coqJB$P&w4L$v}6N z{R0W16}bunSsAUwpf+fVL=&;e+c@d5uTgaAQ}aQTyxhfVc?&*JL&j>La{&EDQMlzU zr#z>RsNEHa1SF(YOi5_neqGW4=kj!+!rY;sPci=ITSULo%Oru37wonySPpntA z9PWiDi+t20tmfJuUB?We^fGdh>MT+jIz1V#b2FTd42>qkOvx})Ww^(a;bLT_9CNO6{Hw^3{k!1qE z+2<(u;VveId!v+ccT^U(-8;nK3C3oCvzF489iXMO_U+vYL8MpRmD+w+Ab|%{?#fG? zj=frpRbhupDHdTMBy?#kT`)>krYwR_ZmHglGH+oEVm~GJ_x&FI15dq}O(1RyzQh(> zD54LWo+W*GhwK>@n+Q4DunQ&-#I+&xPTad|LkGAvj}qR`3^DLEPHk;P9pd&9K0pRL1+|2$XhW~$I%w|#Hf8}7 zPZde>8I#KCp4*@|LN1#>IF26FY$&zn4C45dFJqq*#$-MCRwB<#& zB9Gbdu-Xb#rY9POstt=VW!>Zv9aJ^dJy~Gb7oiz#K&$#3ct{Q!p~pP#MntM($6=P0 z>oGxfb6F9Zs(^ZZ$lS^7M^dI#**`O@LRdhWqJSFR+)>ZfScWa-EQV5lM+J*F6DI&3 zUmyS^<7rDuRx)9!0lTkMrkVB;X$aowo#ujrbvp;A$o_-}r^um$WxDwyE#-f3Jlpl# zZdD3qke~x?YRX@2KX6F&aLXqFiVY;+@M9Ec5db&j(VZ$R0&2r!a#0=hP=w}}E63?LYhMY=pb z#oXK0e)pFB$P7HumXJNsu+ z1)F<%Oh0BVMs-dc_kvd6SZ(@4v(amz3Wg`f$)VeW*sy>d_yy#k%AR$uXt;8c9;b-u zW-@AoYj({?RZryBQ>w{u?nd1Q9>9zeCPRf;RMJxNNNbCDQL)$-P2_r6unl=}O|uos zV+4?=gqR@(uQR462x`IbZB9iIZDuR5j`OJh5dEG5tPfX);02yk%N20a!7D>|bOyia zD?^?PLELD$`29ijNtuMe2Ec&|)0Yg{A5m*eKA#V%=z5ON2Q^c-qxpRD?9UJtY1j6l zKZDc4_gnZcqAa#oyj3^C00!s3qCogZA^V+>wpeWCXQHDrmNlIHKB!>oqP8}xz$Vi` z&dPon{~$y0mz0my8_v%#Qcd(n#H*}Gdb#8VIO7oPXy6y=Sj{U~4v21Mag%@8? zH{Nsz8O>`Z+%yJ`!GbY#3@=)JBC>l+AGBLl>0(C1BTQCUOxB<_S+^96yigf6dzZ>2 zF;CFOi}hvU>&weL*JpGsGhUqdC)#rqxJyRA$!=?>W=F7 zQPSUeGKf3H?T!Iz5Q57@INkyg+cNh&Gx`;AE5}xY#X90{0}<9juC1U@)fMV5tpT z7d|FI+z4EIK0|^I5nt*{zeNRk8D(IRntrBhBZbj*A1a>S&1)sSf^GoN2L|l3mCcrA zo26nX2kc8lqBLo202w*6x1zC>*7T@h6)BzuUZn(SR22Taq;EeC`*JVDzCU(+7)>cw zM}ls4NHh^KEI0=50ml6d#lgBzbT*>h{pc31V!wb%qjB1V%R&1}>K$WTSa&SObCd$^ zx91s`#%a>ClyjYJQGE?|le{4xG=f*!#bJ5gksS}k-w1)>aZ?zK-$GbeyMk=|6Y_%W zEDAVgd&UAh$f0hlpw+)sK`^yr&#q8n%55_!W;lqmn@&Pk=Ri1MKP?L+81!_0jh0;M zK$LBP?}5fX;dErgMo(3Ax0*s31T)P~h^UZ7WG!LA~6Kt!PK0cMdpS|BZRqnU{Q<1@%Y(e%g3^RN#q>?U?v>mFkmlGnKZ}4eZoridSnr$r3+P}{ix69m?(Qf=y%IZ z(6hk}OC89?NsTA|8;;)x{k1PHkWx_vjDOHXcycjH4s-ALgVzEfKPm`xf3V@K6HPw! zKuI^FOoJqt!{dsY)LKPKlR>x8oePfJ%@XpUfBP0>)xco|l(rhMqe6-lpdZ88Tci~6 z-PVY)hEF03x!Yhu4TW#|D7+#Pf_cSO*W+29?F-UP6YcqnjO3cmgpQz<cT+=c9di%hBXKU3cjO;m+V zx_J)jAPx37v*S4#>ST$12TPMJnmzKQGK3-1)E41Fgz?-|K`~rMb!m5Bs7o7-EcRNA zBnya@JqQ2E1!5p~@+tWA0lM#+;#G=cupqcOx1Jx4k{kjIsx0Q&7gcd!n6;3-q1#he zIjcb$(=i2x zifBJb&Za;HXeSb}j;oi*RX76CEtE8vuH^6uQmC!AE|bB46goO5s1Re_i3lz*E8||7 z1m>WS18=1ywHR*@CxJ(R>8LG%nE``R`;oS6@qxoo7ET%l*~xQN%IIS2Q@WBYVMoy* z?5kWw2CmmvQ}^89ZWcn!;!X*0K?HjF+&)bj47-;oU@21?!2UDJkSo|n_p!{ARBv!c zE8FAM&fPJGge(hZf_ZLOAe@v9kgt}L-ZoF{8K9E!beda4$;<>D##03)t_6?o#Qh{5 z2MX_~hv+>0M;AIUS})ljzD<;P4O**{VT!v=oj8kA*;mbd1J<|t{fA`)&&5d@ z=FFnL!aI1znn!m3G`Z3zg}?B**!!U$1~MXEeuf;xA^|sUFIJBi(8yp7?$s*mWp@<% zYzWZixHe5Wy8{@`RLB3kTw%tS-GwWRp28hG^e2kE2Z5m%Tqyg8^KzIT&?=y7iRPnE zgncV=qXjZynj|Ox(hJ{K!0N(2FE#sd!q2zx%|$; z?tvOXd2|oM>bcs^Cc}HS5M$qKhe&C8w6~3p6K+W1#HJ*=e7LJ~q9rAEb)JsrJOPoF zuY#LQN= z@~yzyTA(Ag4q>w)I^iORG;&8l_Ad~ZhYQDJZK|QT} zcT%DL+ep-L%1wvgtf+>|cXOo)f#REeB=w>w4ESB?h~h72fpf9}lvXfmrfd$DMXSG+h0B+?uGPntaJ`N6%Cfi7>xA{dU|q=y?z`ValPxvy~s?m{FSwx5g=LM zF^^E|J55aWJ-I)CW|LfaVF#$;RBsXp>tYbqMJ?JXNY436TJw8`Ig%1e~EM zGfb&L)p-(Hnv2b%acQ>9(^xo^Mst_yj97`8&MlV+84p*HbAJu=-e(abwz8cgtSOPJ z5Rkp)uo5koyNB$v<`cuSy#XD{*_@)=5==H^x@eCYDq^oBF<<9BZ4T~-_}Gd#)X$@j zh(k4)+vHRj=1IF=6xQ$~vKV30lT<_{N-FzYF}&nHZ5$Nk z5@HZB0X{vl-*2I_p&1d{^$vi?5V@hDF>Y8lpuCl<*=&{b~1P`Jqj}0d$ zAxudwv2vyK3=gQ8Giw4UCpM_I1t1t2o>7$htR?}Tr8xLKv`91-5}QY8uS0qTrl{;Q z+S3L2MghapM8r5aTZC}bL@^MJdxIEa;ZB^v(B}zss?aL?kJ>hB+q+c@sRg5F!DQ+X zeGDs6?bs_YpyoD?!?S}=sToJHZ!~AbxO=t;86iISt8c=VGbn>9>LFS+1{gsKk*F!) z%#D4Tqrv*%NFz2Q-5N#U0 zbH|0q(G(a3ui3$K@{1M>?bwNfVuqr0n`wpEFdSoW3UDPh4G!(xi9i+VteIe$vpRZVfH#aG{|5qbhWvsom-K}tL=uJy zER>4QC{OB5k%Q?}ESOcg`ej0z`&@;z$Rc$zdQ_nc2SfJr zvnU=lfWiV#)njH)!3m5yG6(0z7`QDPAr`h^*LqygYm=KOZp=)*s~I;(YIO>YbX&K~ z*C~*MiqIib*P#_ivXVF(2<~UF3O~wXVPQP}aou)A!PZ7$4$EI;A=9-7+0wh0BZ+zV zxDPj31==I{pSN`q{&P>pnXnU4VCLR{ix4m1)SZyX=g;zymBg^itIS+<0u5MP0EoCw}8+s9PBO$jW$VB7?|Hb@p|J56)j_ zaacq0&dVvQ5e!T_1p|+9y2x%nIS*%MQ&8xIH1(=mYMJ?AomxPj6Rr@9Ay<<|E%x7K zG3DfXFGI1K%HIn`mWqnCZ8YZNr=ao=@M#7E1~Gl1$mbuH{;26DMx$GF3c8;by6CPU zvq=@avQfIxx>a_?bT7wzq#To@6WLbe(uySw;CCPp#ZemqUp)Y0oQOVdazWT`#5N}z zK@-D>o=aeJOxHp1#Se1eQAk{)WS9~EOx__dgBAq8~Y0G1A3Kx^QEk5 z1j9!c!jg#@+G_RDw*hcp6x+**DE3duTMQ)}WytH*N(#k4uSya(sZf<8xrDg=6SZSZ z*5b2YpmVESb{?Jw&&FBNJK^(OpbVV%Brsof9z(?%hv^NRlrZq3I)_Y3@MHnTKNXXq zdD2N$5oc=zfNCC+sVvqZRyS0m%UcH|GYPuNp(2x@a_3gco6PC-#V&00f_#r|!s|hm zXkTCe&1qzLiRl2yx+vD7k%9-(mCKChArlb3Ou=!i8>^>$^Ck2d^{E8ncB8kic2646 z&xcQ^c~XXe49n36C_rZ5&YmLSNNVOjD4V#{FeDQ9GlW2r!%$w%T~%YvL|`5|tf^G2 zY<4MUWc5sXNS5;$oFY*cFs%N$+Q zo~K1vuh+)xDPT|>X2X(wsp5R!PmmL}aHHl*MK8ADw_ElF{8#&H=@oH~%=R`o`O+^0 z50w*HFxa4oxmT=+CYzTlw6VZu$uqci7wAbYDc!JOw?i6Qupt|3D7ew<9m;voAtpp^ z;KG^7Uq!5F2ghKFGJ7j(h$PI%3ur8{9C0EW*RZk)Nm-wsAp12!c1-pA9H!{OrtunB zVz!TZrjvmpkaT93MKgT2{Y(W%*oJ6R1U#p9YrBBRB&V|ucRxqE;qDrB5lp;QUF0Pe ztBXLQ6x#%NI;~q~__bKb?Ujj3Se;uXON~h?MNc$LrsS$fT~Q{v>(s*s@ciJiPMO9A z#nT7SPIL!^cxkzG99Ri42cHs;c){zVugpg_$4e&VJ@ut4Ap{cUVwrpFY^f9D2DPBW zNXWSg6DXz_!vp59pS)01OEHInGF4$`>n+Z0x7$VaLg{=miunX2%g2{+emtEU8~{{! zM-o@eiM|>QRaAxxcYhRR5W+VW95v=9jNu5gJivE#hP!~V)uFXe93?suBa8p@MM_XH zIhMjLeZ1tr-rA!sx5&=Nw2#?8mrN?MNB`_U8)(KO03Il=!NCr8hXI) zx=@LnPsa4h`T#=ZMhvF)Z$}Ro{lxO*aU^3KsJ&S-LO&r&IOG_GP+1&nfm&h|Q=G#> zD9-b8xWv5m+3X@Q7I>{h@XfA9Ttc8Q%K(PMT>erV%Ji7H z3)I=M?j!@Xgr7OQBkHUs>vtN9j z!q~SWc#0qxCI2oV>$P4Esa~`jIQVDiK;mN7svIW$N*r=-`)U7O>xe7ql1{^gJPlWP z$8}U4s$Q=%KJ*8+CIr-nW^mfGe`GucoM9qk;=q{3olOE8>{BdBn+Y84HAlmO>~By_vv|)(LHqH_l)}`b zfN~>?S!UPIv7ph!q9(Adf>w)G^8!^RNr4T^%WZe!)Ex8vDQbaTrBb~%35i{Y*ia!FonDFEU`?8uqTu3JD7YN@X^fHTT?d%eX-`_9 z<8NejLg^Gs6n#?)Nb0gr?L1Idc4%}G%%u4}Dzu6m1L#pHG&f6YF{M!lr8HhBo~5+U z;}%_6-gLH9BP+vCk3~O!DtR#ooNzSHue}3>@4ZauAVvhg4?ROozxk?)kp0&WGT>o? zL_5!suv9_zOyods5Q&bH5>9wcz1Ww2RN>+Cl)xAVwS{wet6BDW)B{Z}CIcPBS7gdt zq_quBJMe6~O-O~acT>mZ%@rNzXcjca)e0lmDOPE~Y+AWfiO)_4)vh9RGIZ1dr(xCW zSgP!~#x6-{4)L%;sjL&pzCgtd9yf7=KKnoA`5cNGJX!iJeSP**3XB#*F?&Uez_4=l zL_M8XVCeHFWMT)kX}VE8+=Q2$u~xuKl}j2Kb0Esgli7x0hX>holE6+I zZ%#fj%L)Au=eR>;fzw5`zzb_#Dzj%!He@T>1i4r*3Zc$e`jzUIvMk?+U;{iioL^R) zw-vrfpNWES+yrN68pvE7-Sj!h*QX;aT*mah&wBTe;_h zODvdkIrY4~geL~oTeq+yLnb{sDK(hKr~k-ekh4C00v`)OENue}G7t;Buj9IC`A16_ zL;-FuILQ8yeU3vj9??aoBf4{Z>rpjRdl!|LEgA)0LMBo)L-hqF9ykSh#@xBa_R z1`Of(fe6Nf!-J>c@xmzHIfcP=SA+*k0b2M)9N@>D5NLT$e|!|Fsk9LJkucB*y|M&$h%Ui5g6h39Tm(8rLd>tO-d z8{dl&_HJQfrfdXOl~I#sJh))tVEn?{4*^whR(KetS%uuCrJhY~e>TwGhW~k6FTsCC z?KdIEuFe%!#IkmPO*F1t)Aj+BTgm8r5|2U5F#c15{&JQsZ-By*2WJQP3OY<`;NA5528%$IJ;V`!%+pbPPPwVqQRsR) z1k$RZ^zQB}K@|8N5qZ7GA;%{*ZxW-|CeCA(eZmyQS9d*WB4#wENj#w)Y+B)|*yXAg zC_3K9TAi=%vwuO?C+F+8#Q{vU2Z7c+!k5c$Y*O9F)sX44uEfkE{&fb>{!KVC5rf0$X0o3volT2GcI4Omrp zlFrh@ET1)L!KQ0HS?+YeiZgX;j<>>LPlZpAQniz%>75=*D-;-HoWmC6T5p(_Yc;W` ziiaKnopYQFG@jNz1T@ys#lcbgz0^!x?R+Et2NJjPf8qN-p`cbGn!QuTm%&is9v&%% zo&6fSLIK!1-1eVmJaA<_SOhHjN$)2$w~UpQdsR2O3E82N@? z%|?`x*k_$wP1`-h?lfS(jabVpTTNQ9X@@6EwE;7WV7@LV8c;=g4?4Nx89%-KCPmdky><=_%3SX@X~FpW{JE|(DJqwG zt#DQR9_FerX~Fn@f36Emipphb{5W$Jn6zO04u7uPX<8O4m(ibI=K6t2Q)l*jr2AEs zBBob2s9bB6kZYquQyzo4HK236Jze?;OwGc}#jI z9F1cf!8w#4+k}iD?(mC-&fndipUxBfp%eB@vF_0Sx;&bC1n6 ze$1~qDQeBg@fq%8zK=MmagHk`x8f2p zPg&tZl+W5ALkT>a!v$j1m_YIN=pS%9oIEO-jVcYW$bRMCQWT%^7x`l+#b4xb;x0GIpkoxhhl|=+Qto zlljm2bD!(aZS2im%>56n&*`53us_$YO^RO)4>4DdN^`6Y7USS&<75Zt^{ZbM3`PSm z50PiYr|J!Gc%rL_bBT-hi3^Q^l|hOR3BK8V4d*!+{|`SuYaD)%JARyO@ZDva`EU7= zFE%M;9*?=jUnYK$fd=Ea4;pAN ze#DReVUwcpBk{Kpzso>_@o)R_8%&DApBmpx{3-(t#-H%x&o?Owe`b6)@goKrj6dne zA7@e&eo6e}#P1*H$nz;b{*O(H!Y_*-B7V1l1~Jw5b2RR?2PcFA`AWNi91Obn?DlP)(r!tEYf(lH{kS;ApqGvHi z-#J%i=5C{5B(INnAzg7Hcmi$dI}C1N(EgygUj7`!`(d^Npoi`g$J|n z{qJR2h)Ny_JRdl+KgdZvUT-2?Bx=1(WV*-%o>}7wdm*eU@SJe0z?;`@hi_w6Y#%ld z1R919K7>4e2&rUtu>gsd2yfXo)J@ofr3i=+b(93h%s4_Xd_R3SFq>MW-m{sw2{-zk zkBCPmZuH!8OB*6OCRrXs@Z93bR6e0=l6%w}7yZ<33C4OX{@*T*sqPphbsY052`zpmR zTa`p`JR1XjtO7xJy^x`4Kpvv7{up%!sar}L9>RQ4p4gRGORgB4sNIFYV2n*gugs>f zU}`ZnZv4*3{rr_TLgVeGEO%I#)67cPf{F^hjJkock;27JedW<(Zgh1Z!mNtW9U>2s zU9Lo`@~=maX#CFF%o}*2mRroCD|dpkD~_6m2il~wj+Sq7dN;fFu$Vb- z>z;=Xyr{hkr` zi4pgE{rAvl;Zy$#(_{a}Brqm{F$s)Gz~UpV@;!wtrs0^aZ_f)@ADtbrp2F+>TIU3; z%Wn%#QTfq9pih%X_ z+XI$?pOj$~zzXE$Qy0D02dv-XYd(YrHmUno{7&j{(+tko@0bL}Brqm{F$s)GU`zsI z5*U-fm;}ZoFeZU935-eL|1T2QQs2>0v$=j&tu=jGNBOk684=5htzKOoNp@^1kF?j+ z*4IT6ja%wllZly;w#K&lNJ;0k&PYe1CXwujOjC)G=K6*NZm_Z7%z%|Q!3tod*s==p z^78_LGXq5dO!7UD33=yQ0fY^#3D^zHG;4gpuKYY}_*4nu%kZ(*S6;K;nubF8XMw+I zi0#K~>n>}nZS?WKyz1t}x3{)O zw$!w>HMVSyY^mSU+P)3-aMD{^BaN50M%wE)H@3EPL~6FyG&a|4YW9)<51`-NS{rFV z;zWyl)z-9Jl2Fi^M13Tl+!SeSe|Kb4vZ0~A9W_?zH*Hb*n5;#rF-}getM907Z){7n zw(HESkP!BykWjp)Ba&!sMV(rwIiBwj>~rWLqMV zY~SRjcO*A$X-pUnnY1Fg2~9BzHN_taWph~T)>KC7>bEx5)<>q5ly;W$AFv|OtQqn< z8p4cGv*|o_m!YMn@jq0PW#9^bXhrbZ0Of?z;c*_o>*_ZpH+!{UVkB~v!GbnWH?L~h zTGQNE7xA#+iY_w!>UAquMyjs4>gu(z)iZz|nSQ|q7tBCgMItNfTQ(=+5#MKVWZIm% zX&n=hyxeJ;wcF4`g1MXtt}0Wo0IJ|2~pKZ1VymkWKdeg$HK_+ zHO{i;nvRb0HOWot0_-GOYg?O13-v*p>VGUV5~-?hzszlnTIQ`6kwhX(lXZ=)Mjs?a zWm(p`WlOT9u~u{GNm-GE%DSzlx$cN~P^#Lcv=L-Q#uQISM`R5;2n^Z?4Dt${9R;ey z?k!_o%S|nH*#M*_Y|H%XOYjd`O#rfg*;fU~;30etza?nyXnwzbs8Jrw{g7Y75C zA@2DtpVl_f!Z76lnM+9$C&xgXUo?8z`iYhvq#dxjz~D5|O0?IsbYO6=ZfLIAY}72G z^EruXc-Q%*yb(#&%`(;q$(q_kvZh%>oH8Y;qdt*rt8SCgz)3-As2g}}PgFOw*KE;4 zk)%tm7U@UTtqnS-VpEbDsf7L(K|V@jT!OXG>H1DDm}$aBZR?h{=6aY2 z-$#;QCuYsMyklF(<;{&P$=I_GcqxilDXCHqUM}(J@S=N6qvaD|8 z{YI^2y#So`$p1X@J^;MO_E^?bJQ+6!-zdIU<9h?XTkze5?}zZcAKyptJ&f=7@qH2B zm+<{FzMpXlf!?zsYx8i#pzFY83;d>{(tYw~+k7tn!u!VU%LK73LiPmXW*gD-h z!z#3jtV!0H)>&4u^#m1g-TIT81o8Yp!cW@#+cbpb84LH?}EsY7esjX?Q6$oP} z3KFlcy{URrO-tR)jdh8*f;HDPZW#${ZE2~mRaENg8Gh)%0PS#4*Vw@*giMMt*4NiN zDRN_&!HmD!T*qsx>l$?qgen6o4(FkcrSY)dLv1(3^ zwq&B(NZ}+F9YA|)Yob~Q2|%j3zNQ20`Xrzt3=Z973mgN*7@KSCGbVvC35-c#OafyP z7?Z%51jZyVCV?>tj7eZj0{_<%nAz)+sQaa5ZS>r`DeCF~((c9gAimxB9>=#I-ywWM z$XkqW1mBtXn$Q0uMwUnj@A3me_Il*9XGYNG|#H~s_Xth|IL9Nkhw(3E-#cHsy#nD;@gZIZGzQ;w1~A<@U{qF z*J6)Az~O;8IzWNEwE?#gIaSDD9Vk{JFH3I+mZ9DVY<0&xEUjJW&cVI}m+rL!@9@wo zwdPo}thv@@pnEN9!A}WxGXz8q3BhkcZJIqbOoBJ;?AILN#p~7uz+Va6&4NkZ+8`5h zve}A*e@poF!y?vfNOhrAhO+0N%o1xJYBN%HUKvHPyCMLYD!Obn@@3kMcd7;a{LKQl z+we8*R)zen7B)Rd3%y#qU4vRsjy2K()R73JL|T-KYPV96m7nHFDVL0p@NxWa@^f$5UWmw#Q7KYPaPMYF#+r+d!Cx#!J& zaqiirnbMDzCg!E){bv5~{EHX-tgK}r2w-x}8UH8dG|in@_V+StVbQ`jEPThpYZo>w zylLUZpkD36xEw>(q+vGV)M_f|Yu@%IWVif0axr?ce!C3lxTUHZ4ux6E5MuYLaS z=I>bWi3NFO;j)z#@2vnr73Wo!b=KUubALBCzx3PlPt5Td&gX>%d(0BmUZd;%jZ|l&tDK)FnPh{3rZJUz2Le9O$%;auxr7`7kqKS zBMV+y@V5o8ESO$aUbdv{hO#YX?PYhA-BEx){cN%^(qH zqF*dJu_$lx`HQD6jxJue`1-|(#oHGjSp4b5pIiLY;ujb9E*@Gu>58+jm~+LISFF4u ze#Q1Hc3<(8E1tgMdsk$yC|Yvvk_(qyzGVKA#Y>hidB>7#mozN7Wl7hPPb~S$l0!?5 zEy*tV{SxZ{VlR-#8%w5^%q_XHhbV2FL(sz_@F1@vMSLxl* ziHY-y=e>E}h4ZG*d;7eadF}IVop<-V=jQ!p-g)z9&Yv^?n)&VXch0|K{wL;tVg5Jg ze}DeV(8-zwTNZRJ_~3#Q3;GreqP3dJ{;ll0Wfv}-v#@gEl?$(1_=$xNF8t=gZ!i4m z!e1=>%fi1eoKs#|zPfxMdCHF!m50!krVQ0^z?ApILP^i5d+9DJy?8oJ}3j4E5o1_^3Gb zE+LUm;C_(P%AoVk!f67nI7Nb=5We|=8_fn1fti11$vt32MlFkY7vRg&{se~r>}jy9 zx!|4<*2I!ME1%a8RZu;k{XU$nfc!hq-CTPBxd7-c<+}kPr!EfP9vJ|eE)HKceYS?E z(w_ljmk;t^fPCHu`3oR_^Fc!3u5FyRtjU0E9q)y_1&}Lowvx+FB_O{(%|K3W_ph98 z;dBh|=U>+D?QXkM#`yuYQ^;EuuW1kXL1m$t{A>WEO5Z6+5|B+k$Q^)CgM~7FE$cx* z_WK~+fOMmN(iXTL?eks0Pd`KB2*Qs62^V@H?EP;&(+l}4Ab<2h0%+P9XL)f>2jpEo z$oYV*DE8u93P`&TG7pe1_#iPr&O;NqZF(ahH)x2GPctAN_Tg*;Rd$!T?e$&Yy!{++y?zErl@D?PkQN70jVH9KH#H_c zV*n*dp_ zA&T-XfIQ@bd;pNcQ@j#;2$0*~Rg20rF7?Qmu|#nf;^#p?nqsr{F?wuD1bF<%6sRq}2zh10*)po9jJ*e0!P~ zvKNqDIQPeGox1?}u!blZegTkPALKDW)?eby^&}wg(GZpE7$8&OrYOqBYN@_VOVW5A z+MShiJ||nPDAN4L%*{G!w2C4VGw*-bR6AY-AospyYc_z58q@P0a)lr@?Qao;z~*v$T)Dh!Urh=gkG7O>y3a!O-)bH z?(_ln8XTc~IdXm62dM<)MIYo^Kq63TS6kwM)cYWvfIQ$pcotJNPNTLR2n$OChuZ7% zOl$mgRKulAYy1-*gnjuHALK)za~2#>H`k{C`Kk{>yBdZ|>f+F@F7`pbj$CUrgtCUl zp{#XqTism6fL!l`Jda!*K1eShzwtr(0lB8sOJ^96#c;J1Wy*)AT0Q7MSo$P*OyBT9 zE&$}sSSND%nG47qA0!6IG9QF*p?(~znr^Ne07>CYG#A46S9dJ-LT&}*CqBr2K$czM z#rY&4jZ3_cF9R|usvt^+PXJP?A=G{aH1&7&2=jv z-5Mv)nYpMwNSkmk#^ZM)hx<9%w%mop(Z_-aQlzW^`;7l%#)9?e=afW#px=+6@9qGH zy`~nYun8Xr&TkEl;#>|$gAY;($TxkEcLMT~57Gk2q*^bBy8xM{A$h2cWqkmU%Y8T>1Ek#t zc@U6WeUPsK@?Ib0Fdz^4AV&fDf)B!(@s~A3l|BH-w|tO^VavMY8gJdF1G3hE7;i^e z09uK@$(9B4?fDps)C(BP$q&rLe{@{W$9Shsn+A$Jsp`^Lq!l2N4^V#KmXmM@m=6w* znwp-%BE1bbsd{f)R0Fc7(Oc6_K>l)*7xF~aHp*C$vA|34%E9LAoiV8dEJizr_bOBnePHJ|J{aXf?foq%?J4{AP@K;Lx4P% zFu6=kRq3qhMli}Ya6kXbnx28UMI`y^HN5~hml_;lV;&%v`yf{Wa-{- zm+Lqn5p)^RA1P}PkfQBg$T??N*2_B##7Iolf)a}rqIW}=-Os#!U*jD zRNq{Kb6dA`9NeQh^l_qa4bKXPJeMHBkNB_RnI+DH#Cl(aAL1+n&R+aV?=kxknd4-eTTo}#dYfaR+v(O~@es2Yb5yP`z;RMg{tZ>LPjO>Wd z|AgnG$SWH4DrJ=jKjix)%9a^-96HvlMnwSLUid>udDP$CzW33Qdazw(xUjJG5=l{qD$ZSx=N3p zRC?T{tV_qFe?;jAU5GBd?RAx2byDe_E@fT%@{y4FLoP&@-u1dl$BWVZ^_th_Qr4v- zz~IN3f82%W(ht0@($}6;`mHWyT{>-pzumbmr6IcX`(9V+%UwFEta;5N%PK7!37OyR zLUic|Usvfjo>clCm$I&V)kw(vh?`57-u=2tU+L1(b%*0=q^e7gj)ctbcOkm;qpz#< zjVG0kL1skhm}L7Q^Jlub^xlJ?19Gap2XVdmz_nTpiFmRFbBm2GWnGJ2Qwz`=`8mmk zkA|b;#z&F)l%s=^D&ms5UV&m7IaK~Jn6Jj+3kVht} zbjDKD!Hp%N37G2%&Xd65hj$8c3=msui-PgFCc6? zmFqG<`hAe4fNJ#P|j0d-5C14xxmV#@(B)<)HR9UyJK(l-IJ(aBX^UDw=P zUCpX{D7OKJAGfUA1QPH-?jpqDr&=G|+2)hR=YZ4Yltqf)0>rH;bMb)B1HN4U$y^T4 zcm*Rf%7-%J3NJpb)pFy@0rVuv#CpdeGN8 zzXy)-B@~B4fE4-Y6rRPBiagpf9T1l6YSer{%-E#pEC*x{a9nAu2E=#{3a0~*h_9^e zfD9rR(-lqzkP;ux-GFraYVk=xTz)7XWS5UCpT~g1kIVCSHN@rc_b1^@HRhyqD~XZIe0Cp-K!d`dEiTQI617QBqeE1b$gue%^Ath?AfCwG;|QE3h?EKpDLlI zqqebeP7+5PGpCUSiQqLxrfqZ@D=+WesjjK3tLAHp+AVp1k-0{;_IkcX7=)ChwzN8k zb@k02JhT$D``yX(NcBqyoSjD z%&U*gz4Ou`(9|%g%Mpm`J8XDVy?*gea z{+BVa45cEH3kYm3d0mpHL{!=-QLahIVb#1JDO#o~>3eBZboP7=^}jgELH55p%0WNr zJxkHqbF6CWqLLvOxY_P{^N$t{TSs1AC77PKGC9(!PT(EaiV%B`yk@dmy;lcv}{811@# z6_^dI@BSbhdz1eG@lC zz`~;2kOC9DHdvcTKpS9+lkH$Zfy8P!FiO@BF~p2v;l0n&sDe4hD0UKw>YIdRb*oAN zP`@-?#vpPBknWV~ee1$<8((N#&1NJDzouMX8w0N8C*u|DyfTeMfQ|x3-pMBAusS?O zUTF%oknFn<=234_ld>9HYZL4@fI>rP?06}S=p!xJyw=tM$WZIaE0P*{@Af1XPda!r zI<|{ZFC0p`9@Vw+nwHHvLBt9RNu-22LSL>MVe6?~Dy6O+FO7rZOQ!>-vK8izGH*$? z8HK6uY)s&NbAsF!-`0V5emASi`&1R?7`5mqLD$=&kfl-%&gS}-`u4_JBTRFv-$^Ib z4b01)>J26rS=113Mq`7eTv+a88=A8o)5!YT#u_x2%I3qWZft-Y2NfzUBUk}eb-Aro7QS3*)Hkrrks|EI5OTWTAKp?p$5p_KT68A>`3o;8LzV1jMN z4h`wo_Z&%kGbV3cS-aM*j-<107>&#kWug~9_Jg2mjtS?UrNokGB$E9)j*VT+uf5tbc0 zJ?pP93oRz~KzYlFbFt2iLhK#woMZ4R?7YL{&mZ=N7;4y7{5RO@>o8_x#+>RyD~2PN zGsP%EX-6wh-JmT7Qpf7Z`6`VIp4RFFei1%cZuU_QEcD_0z4`Z0n+bY_b$Ka0jJKMwva zo~j$XmAA1Ct$xq}(FEz3$PzE4b3C!spam!(2jYf7+ds)`yW6$+D>B&*3{ksTVA!2d z_Q#%g4X;d)cy>@S&tX8RHA>Yhw0)>_8TksA87FG7OIRt2m*``RVGmH{>{b6@1pu&*A%1t8Q0Z z+g+)&XU2h|u`dlWecD&qs39ot+H({I8?(C=lb0Xs>nUaU$TH%HZ`yD3~$+bvPmPS369H z6F(}IPR{|Fph*wurjU{Kt`{4B0?ZJzcf;(M6*Dk}x~~w)!U9*h z8XqX^?x{WnP~luSdN2LHLrCya_ZV7INe$Z!eQ7WGdiKnqn8{-thZ1!r7kN~jGXmM4 He`EX~wy91N literal 0 HcmV?d00001 diff --git a/reactos/drivers/usb/cromwell/host/makefile b/reactos/drivers/usb/cromwell/host/makefile new file mode 100644 index 00000000000..0cc14867050 --- /dev/null +++ b/reactos/drivers/usb/cromwell/host/makefile @@ -0,0 +1,16 @@ +PATH_TO_TOP = ../../../.. + +TARGET_TYPE = export_driver + +TARGET_NAME = ohci + +TARGET_DDKLIBS = ntoskrnl.a usbcore.a + +TARGET_CFLAGS = -Wall -I$(PATH_TO_TOP)/ntoskrnl/include + +TARGET_OBJECTS = \ + ohci-hcd.o ohci_main.o ../sys/ros_wrapper.o ../sys/linuxwrapper.o + +include $(PATH_TO_TOP)/rules.mak + +include $(TOOLS_PATH)/helper.mk diff --git a/reactos/drivers/usb/cromwell/host/makefile.crom b/reactos/drivers/usb/cromwell/host/makefile.crom new file mode 100644 index 00000000000..c23390585ae --- /dev/null +++ b/reactos/drivers/usb/cromwell/host/makefile.crom @@ -0,0 +1,3 @@ +O_TARGET := ohci-hcd.o + +include $(TOPDIR)/Rules.make diff --git a/reactos/drivers/usb/cromwell/host/ohci-dbg.c b/reactos/drivers/usb/cromwell/host/ohci-dbg.c new file mode 100644 index 00000000000..6c9661b6738 --- /dev/null +++ b/reactos/drivers/usb/cromwell/host/ohci-dbg.c @@ -0,0 +1,666 @@ +/* + * OHCI HCD (Host Controller Driver) for USB. + * + * (C) Copyright 1999 Roman Weissgaerber + * (C) Copyright 2000-2002 David Brownell + * + * This file is licenced under the GPL. + */ + +/*-------------------------------------------------------------------------*/ + +#ifdef DEBUG + +#define edstring(ed_type) ({ char *temp; \ + switch (ed_type) { \ + case PIPE_CONTROL: temp = "ctrl"; break; \ + case PIPE_BULK: temp = "bulk"; break; \ + case PIPE_INTERRUPT: temp = "intr"; break; \ + default: temp = "isoc"; break; \ + }; temp;}) +#define pipestring(pipe) edstring(usb_pipetype(pipe)) + +/* debug| print the main components of an URB + * small: 0) header + data packets 1) just header + */ +static void __attribute__((unused)) +urb_print (struct urb * urb, char * str, int small) +{ + unsigned int pipe= urb->pipe; + + if (!urb->dev || !urb->dev->bus) { + dbg("%s URB: no dev", str); + return; + } + +#ifndef OHCI_VERBOSE_DEBUG + if (urb->status != 0) +#endif + dbg("%s %p dev=%d ep=%d%s-%s flags=%x len=%d/%d stat=%d", + str, + urb, + usb_pipedevice (pipe), + usb_pipeendpoint (pipe), + usb_pipeout (pipe)? "out" : "in", + pipestring (pipe), + urb->transfer_flags, + urb->actual_length, + urb->transfer_buffer_length, + urb->status); + +#ifdef OHCI_VERBOSE_DEBUG + if (!small) { + int i, len; + + if (usb_pipecontrol (pipe)) { + printk (KERN_DEBUG __FILE__ ": setup(8):"); + for (i = 0; i < 8 ; i++) + printk (" %02x", ((__u8 *) urb->setup_packet) [i]); + printk ("\n"); + } + if (urb->transfer_buffer_length > 0 && urb->transfer_buffer) { + printk (KERN_DEBUG __FILE__ ": data(%d/%d):", + urb->actual_length, + urb->transfer_buffer_length); + len = usb_pipeout (pipe)? + urb->transfer_buffer_length: urb->actual_length; + for (i = 0; i < 16 && i < len; i++) + printk (" %02x", ((__u8 *) urb->transfer_buffer) [i]); + printk ("%s stat:%d\n", i < len? "...": "", urb->status); + } + } +#endif +} + +#define ohci_dbg_sw(ohci, next, size, format, arg...) \ + do { \ + if (next) { \ + unsigned s_len; \ + s_len = snprintf (*next, *size, format, ## arg ); \ + *size -= s_len; *next += s_len; \ + } else \ + ohci_dbg(ohci,format, ## arg ); \ + } while (0); + + +static void ohci_dump_intr_mask ( + struct ohci_hcd *ohci, + char *label, + u32 mask, + char **next, + unsigned *size) +{ + ohci_dbg_sw (ohci, next, size, "%s 0x%08x%s%s%s%s%s%s%s%s%s\n", + label, + mask, + (mask & OHCI_INTR_MIE) ? " MIE" : "", + (mask & OHCI_INTR_OC) ? " OC" : "", + (mask & OHCI_INTR_RHSC) ? " RHSC" : "", + (mask & OHCI_INTR_FNO) ? " FNO" : "", + (mask & OHCI_INTR_UE) ? " UE" : "", + (mask & OHCI_INTR_RD) ? " RD" : "", + (mask & OHCI_INTR_SF) ? " SF" : "", + (mask & OHCI_INTR_WDH) ? " WDH" : "", + (mask & OHCI_INTR_SO) ? " SO" : "" + ); +} + +static void maybe_print_eds ( + struct ohci_hcd *ohci, + char *label, + u32 value, + char **next, + unsigned *size) +{ + if (value) + ohci_dbg_sw (ohci, next, size, "%s %08x\n", label, value); +} + +static char *hcfs2string (int state) +{ + switch (state) { + case OHCI_USB_RESET: return "reset"; + case OHCI_USB_RESUME: return "resume"; + case OHCI_USB_OPER: return "operational"; + case OHCI_USB_SUSPEND: return "suspend"; + } + return "?"; +} + +// dump control and status registers +static void +ohci_dump_status (struct ohci_hcd *controller, char **next, unsigned *size) +{ + struct ohci_regs *regs = controller->regs; + u32 temp; + + temp = readl (®s->revision) & 0xff; + ohci_dbg_sw (controller, next, size, + "OHCI %d.%d, %s legacy support registers\n", + 0x03 & (temp >> 4), (temp & 0x0f), + (temp & 0x10) ? "with" : "NO"); + + temp = readl (®s->control); + ohci_dbg_sw (controller, next, size, + "control 0x%03x%s%s%s HCFS=%s%s%s%s%s CBSR=%d\n", + temp, + (temp & OHCI_CTRL_RWE) ? " RWE" : "", + (temp & OHCI_CTRL_RWC) ? " RWC" : "", + (temp & OHCI_CTRL_IR) ? " IR" : "", + hcfs2string (temp & OHCI_CTRL_HCFS), + (temp & OHCI_CTRL_BLE) ? " BLE" : "", + (temp & OHCI_CTRL_CLE) ? " CLE" : "", + (temp & OHCI_CTRL_IE) ? " IE" : "", + (temp & OHCI_CTRL_PLE) ? " PLE" : "", + temp & OHCI_CTRL_CBSR + ); + + temp = readl (®s->cmdstatus); + ohci_dbg_sw (controller, next, size, + "cmdstatus 0x%05x SOC=%d%s%s%s%s\n", temp, + (temp & OHCI_SOC) >> 16, + (temp & OHCI_OCR) ? " OCR" : "", + (temp & OHCI_BLF) ? " BLF" : "", + (temp & OHCI_CLF) ? " CLF" : "", + (temp & OHCI_HCR) ? " HCR" : "" + ); + + ohci_dump_intr_mask (controller, "intrstatus", + readl (®s->intrstatus), next, size); + ohci_dump_intr_mask (controller, "intrenable", + readl (®s->intrenable), next, size); + // intrdisable always same as intrenable + + maybe_print_eds (controller, "ed_periodcurrent", + readl (®s->ed_periodcurrent), next, size); + + maybe_print_eds (controller, "ed_controlhead", + readl (®s->ed_controlhead), next, size); + maybe_print_eds (controller, "ed_controlcurrent", + readl (®s->ed_controlcurrent), next, size); + + maybe_print_eds (controller, "ed_bulkhead", + readl (®s->ed_bulkhead), next, size); + maybe_print_eds (controller, "ed_bulkcurrent", + readl (®s->ed_bulkcurrent), next, size); + + maybe_print_eds (controller, "donehead", + readl (®s->donehead), next, size); +} + +#define dbg_port_sw(hc,num,value,next,size) \ + ohci_dbg_sw (hc, next, size, \ + "roothub.portstatus [%d] " \ + "0x%08x%s%s%s%s%s%s%s%s%s%s%s%s\n", \ + num, temp, \ + (temp & RH_PS_PRSC) ? " PRSC" : "", \ + (temp & RH_PS_OCIC) ? " OCIC" : "", \ + (temp & RH_PS_PSSC) ? " PSSC" : "", \ + (temp & RH_PS_PESC) ? " PESC" : "", \ + (temp & RH_PS_CSC) ? " CSC" : "", \ + \ + (temp & RH_PS_LSDA) ? " LSDA" : "", \ + (temp & RH_PS_PPS) ? " PPS" : "", \ + (temp & RH_PS_PRS) ? " PRS" : "", \ + (temp & RH_PS_POCI) ? " POCI" : "", \ + (temp & RH_PS_PSS) ? " PSS" : "", \ + \ + (temp & RH_PS_PES) ? " PES" : "", \ + (temp & RH_PS_CCS) ? " CCS" : "" \ + ); + + +static void +ohci_dump_roothub ( + struct ohci_hcd *controller, + int verbose, + char **next, + unsigned *size) +{ + u32 temp, ndp, i; + + temp = roothub_a (controller); + if (temp == ~(u32)0) + return; + ndp = (temp & RH_A_NDP); + + if (verbose) { + ohci_dbg_sw (controller, next, size, + "roothub.a %08x POTPGT=%d%s%s%s%s%s NDP=%d\n", temp, + ((temp & RH_A_POTPGT) >> 24) & 0xff, + (temp & RH_A_NOCP) ? " NOCP" : "", + (temp & RH_A_OCPM) ? " OCPM" : "", + (temp & RH_A_DT) ? " DT" : "", + (temp & RH_A_NPS) ? " NPS" : "", + (temp & RH_A_PSM) ? " PSM" : "", + ndp + ); + temp = roothub_b (controller); + ohci_dbg_sw (controller, next, size, + "roothub.b %08x PPCM=%04x DR=%04x\n", + temp, + (temp & RH_B_PPCM) >> 16, + (temp & RH_B_DR) + ); + temp = roothub_status (controller); + ohci_dbg_sw (controller, next, size, + "roothub.status %08x%s%s%s%s%s%s\n", + temp, + (temp & RH_HS_CRWE) ? " CRWE" : "", + (temp & RH_HS_OCIC) ? " OCIC" : "", + (temp & RH_HS_LPSC) ? " LPSC" : "", + (temp & RH_HS_DRWE) ? " DRWE" : "", + (temp & RH_HS_OCI) ? " OCI" : "", + (temp & RH_HS_LPS) ? " LPS" : "" + ); + } + + for (i = 0; i < ndp; i++) { + temp = roothub_portstatus (controller, i); + dbg_port_sw (controller, i, temp, next, size); + } +} + +static void ohci_dump (struct ohci_hcd *controller, int verbose) +{ + ohci_dbg (controller, "OHCI controller state\n"); + + // dumps some of the state we know about + ohci_dump_status (controller, NULL, 0); + if (controller->hcca) + ohci_dbg (controller, + "hcca frame #%04x\n", controller->hcca->frame_no); + ohci_dump_roothub (controller, 1, NULL, 0); +} + +static const char data0 [] = "DATA0"; +static const char data1 [] = "DATA1"; + +static void ohci_dump_td (struct ohci_hcd *ohci, char *label, struct td *td) +{ + u32 tmp = le32_to_cpup (&td->hwINFO); + + ohci_dbg (ohci, "%s td %p%s; urb %p index %d; hw next td %08x", + label, td, + (tmp & TD_DONE) ? " (DONE)" : "", + td->urb, td->index, + le32_to_cpup (&td->hwNextTD)); + if ((tmp & TD_ISO) == 0) { + const char *toggle, *pid; + u32 cbp, be; + + switch (tmp & TD_T) { + case TD_T_DATA0: toggle = data0; break; + case TD_T_DATA1: toggle = data1; break; + case TD_T_TOGGLE: toggle = "(CARRY)"; break; + default: toggle = "(?)"; break; + } + switch (tmp & TD_DP) { + case TD_DP_SETUP: pid = "SETUP"; break; + case TD_DP_IN: pid = "IN"; break; + case TD_DP_OUT: pid = "OUT"; break; + default: pid = "(bad pid)"; break; + } + ohci_dbg (ohci, " info %08x CC=%x %s DI=%d %s %s", tmp, + TD_CC_GET(tmp), /* EC, */ toggle, + (tmp & TD_DI) >> 21, pid, + (tmp & TD_R) ? "R" : ""); + cbp = le32_to_cpup (&td->hwCBP); + be = le32_to_cpup (&td->hwBE); + ohci_dbg (ohci, " cbp %08x be %08x (len %d)", cbp, be, + cbp ? (be + 1 - cbp) : 0); + } else { + unsigned i; + ohci_dbg (ohci, " info %08x CC=%x FC=%d DI=%d SF=%04x", tmp, + TD_CC_GET(tmp), + (tmp >> 24) & 0x07, + (tmp & TD_DI) >> 21, + tmp & 0x0000ffff); + ohci_dbg (ohci, " bp0 %08x be %08x", + le32_to_cpup (&td->hwCBP) & ~0x0fff, + le32_to_cpup (&td->hwBE)); + for (i = 0; i < MAXPSW; i++) { + u16 psw = le16_to_cpup (&td->hwPSW [i]); + int cc = (psw >> 12) & 0x0f; + ohci_dbg (ohci, " psw [%d] = %2x, CC=%x %s=%d", i, + psw, cc, + (cc >= 0x0e) ? "OFFSET" : "SIZE", + psw & 0x0fff); + } + } +} + +/* caller MUST own hcd spinlock if verbose is set! */ +static void __attribute__((unused)) +ohci_dump_ed (struct ohci_hcd *ohci, char *label, struct ed *ed, int verbose) +{ + u32 tmp = ed->hwINFO; + char *type = ""; + + ohci_dbg (ohci, "%s, ed %p state 0x%x type %s; next ed %08x", + label, + ed, ed->state, edstring (ed->type), + le32_to_cpup (&ed->hwNextED)); + switch (tmp & (ED_IN|ED_OUT)) { + case ED_OUT: type = "-OUT"; break; + case ED_IN: type = "-IN"; break; + /* else from TDs ... control */ + } + ohci_dbg (ohci, + " info %08x MAX=%d%s%s%s%s EP=%d%s DEV=%d", le32_to_cpu (tmp), + 0x03ff & (le32_to_cpu (tmp) >> 16), + (tmp & ED_DEQUEUE) ? " DQ" : "", + (tmp & ED_ISO) ? " ISO" : "", + (tmp & ED_SKIP) ? " SKIP" : "", + (tmp & ED_LOWSPEED) ? " LOW" : "", + 0x000f & (le32_to_cpu (tmp) >> 7), + type, + 0x007f & le32_to_cpu (tmp)); + ohci_dbg (ohci, " tds: head %08x %s%s tail %08x%s", + tmp = le32_to_cpup (&ed->hwHeadP), + (ed->hwHeadP & ED_C) ? data1 : data0, + (ed->hwHeadP & ED_H) ? " HALT" : "", + le32_to_cpup (&ed->hwTailP), + verbose ? "" : " (not listing)"); + if (verbose) { + struct list_head *tmp; + + /* use ed->td_list because HC concurrently modifies + * hwNextTD as it accumulates ed_donelist. + */ + list_for_each (tmp, &ed->td_list) { + struct td *td; + td = list_entry (tmp, struct td, td_list); + ohci_dump_td (ohci, " ->", td); + } + } +} + +#else +static inline void ohci_dump (struct ohci_hcd *controller, int verbose) {} + +#undef OHCI_VERBOSE_DEBUG + +#endif /* DEBUG */ + +/*-------------------------------------------------------------------------*/ + +#ifdef STUB_DEBUG_FILES + +static inline void create_debug_files (struct ohci_hcd *bus) { } +static inline void remove_debug_files (struct ohci_hcd *bus) { } + +#else + +static inline struct ohci_hcd *dev_to_ohci (struct device *dev) +{ + struct usb_hcd *hcd = dev_get_drvdata (dev); + + return hcd_to_ohci (hcd); +} + +static ssize_t +show_list (struct ohci_hcd *ohci, char *buf, size_t count, struct ed *ed) +{ + unsigned temp, size = count; + + if (!ed) + return 0; + + /* print first --> last */ + while (ed->ed_prev) + ed = ed->ed_prev; + + /* dump a snapshot of the bulk or control schedule */ + while (ed) { + u32 info = ed->hwINFO; + u32 scratch = cpu_to_le32p (&ed->hwINFO); + struct list_head *entry; + struct td *td; + + temp = snprintf (buf, size, + "ed/%p %cs dev%d ep%d%s max %d %08x%s%s %s", + ed, + (info & ED_LOWSPEED) ? 'l' : 'f', + scratch & 0x7f, + (scratch >> 7) & 0xf, + (info & ED_IN) ? "in" : "out", + 0x03ff & (scratch >> 16), + scratch, + (info & ED_SKIP) ? " s" : "", + (ed->hwHeadP & ED_H) ? " H" : "", + (ed->hwHeadP & ED_C) ? data1 : data0); + size -= temp; + buf += temp; + + list_for_each (entry, &ed->td_list) { + u32 cbp, be; + + td = list_entry (entry, struct td, td_list); + scratch = cpu_to_le32p (&td->hwINFO); + cbp = le32_to_cpup (&td->hwCBP); + be = le32_to_cpup (&td->hwBE); + temp = snprintf (buf, size, + "\n\ttd %p %s %d cc=%x urb %p (%08x)", + td, + ({ char *pid; + switch (scratch & TD_DP) { + case TD_DP_SETUP: pid = "setup"; break; + case TD_DP_IN: pid = "in"; break; + case TD_DP_OUT: pid = "out"; break; + default: pid = "(?)"; break; + } pid;}), + cbp ? (be + 1 - cbp) : 0, + TD_CC_GET (scratch), td->urb, scratch); + size -= temp; + buf += temp; + } + + temp = snprintf (buf, size, "\n"); + size -= temp; + buf += temp; + + ed = ed->ed_next; + } + return count - size; +} + +static ssize_t +show_async (struct device *dev, char *buf) +{ + struct ohci_hcd *ohci; + size_t temp; + unsigned long flags; + + ohci = dev_to_ohci(dev); + + /* display control and bulk lists together, for simplicity */ + spin_lock_irqsave (&ohci->lock, flags); + temp = show_list (ohci, buf, PAGE_SIZE, ohci->ed_controltail); + temp += show_list (ohci, buf + temp, PAGE_SIZE - temp, ohci->ed_bulktail); + spin_unlock_irqrestore (&ohci->lock, flags); + + return temp; +} +static DEVICE_ATTR (async, S_IRUGO, show_async, NULL); + + +#define DBG_SCHED_LIMIT 64 + +static ssize_t +show_periodic (struct device *dev, char *buf) +{ + struct ohci_hcd *ohci; + struct ed **seen, *ed; + unsigned long flags; + unsigned temp, size, seen_count; + char *next; + unsigned i; + + if (!(seen = kmalloc (DBG_SCHED_LIMIT * sizeof *seen, SLAB_ATOMIC))) + return 0; + seen_count = 0; + + ohci = dev_to_ohci(dev); + next = buf; + size = PAGE_SIZE; + + temp = snprintf (next, size, "size = %d\n", NUM_INTS); + size -= temp; + next += temp; + + /* dump a snapshot of the periodic schedule (and load) */ + spin_lock_irqsave (&ohci->lock, flags); + for (i = 0; i < NUM_INTS; i++) { + if (!(ed = ohci->periodic [i])) + continue; + + temp = snprintf (next, size, "%2d [%3d]:", i, ohci->load [i]); + size -= temp; + next += temp; + + do { + temp = snprintf (next, size, " ed%d/%p", + ed->interval, ed); + size -= temp; + next += temp; + for (temp = 0; temp < seen_count; temp++) { + if (seen [temp] == ed) + break; + } + + /* show more info the first time around */ + if (temp == seen_count) { + u32 info = ed->hwINFO; + u32 scratch = cpu_to_le32p (&ed->hwINFO); + + temp = snprintf (next, size, + " (%cs dev%d%s ep%d%s" + " max %d %08x%s%s)", + (info & ED_LOWSPEED) ? 'l' : 'f', + scratch & 0x7f, + (info & ED_ISO) ? " iso" : "", + (scratch >> 7) & 0xf, + (info & ED_IN) ? "in" : "out", + 0x03ff & (scratch >> 16), + scratch, + (info & ED_SKIP) ? " s" : "", + (ed->hwHeadP & ED_H) ? " H" : ""); + size -= temp; + next += temp; + + // FIXME some TD info too + + if (seen_count < DBG_SCHED_LIMIT) + seen [seen_count++] = ed; + + ed = ed->ed_next; + + } else { + /* we've seen it and what's after */ + temp = 0; + ed = 0; + } + + } while (ed); + + temp = snprintf (next, size, "\n"); + size -= temp; + next += temp; + } + spin_unlock_irqrestore (&ohci->lock, flags); + kfree (seen); + + return PAGE_SIZE - size; +} +static DEVICE_ATTR (periodic, S_IRUGO, show_periodic, NULL); + + +#undef DBG_SCHED_LIMIT + +static ssize_t +show_registers (struct device *dev, char *buf) +{ + struct ohci_hcd *ohci; + struct ohci_regs *regs; + unsigned long flags; + unsigned temp, size; + char *next; + u32 rdata; + + ohci = dev_to_ohci(dev); + regs = ohci->regs; + next = buf; + size = PAGE_SIZE; + + spin_lock_irqsave (&ohci->lock, flags); + + /* dump driver info, then registers in spec order */ + + ohci_dbg_sw (ohci, &next, &size, + "%s version " DRIVER_VERSION "\n", hcd_name); + + ohci_dump_status(ohci, &next, &size); + + /* hcca */ + if (ohci->hcca) + ohci_dbg_sw (ohci, &next, &size, + "hcca frame 0x%04x\n", ohci->hcca->frame_no); + + /* other registers mostly affect frame timings */ + rdata = readl (®s->fminterval); + temp = snprintf (next, size, + "fmintvl 0x%08x %sFSMPS=0x%04x FI=0x%04x\n", + rdata, (rdata >> 31) ? " FIT" : "", + (rdata >> 16) & 0xefff, rdata & 0xffff); + size -= temp; + next += temp; + + rdata = readl (®s->fmremaining); + temp = snprintf (next, size, "fmremaining 0x%08x %sFR=0x%04x\n", + rdata, (rdata >> 31) ? " FRT" : "", + rdata & 0x3fff); + size -= temp; + next += temp; + + rdata = readl (®s->periodicstart); + temp = snprintf (next, size, "periodicstart 0x%04x\n", + rdata & 0x3fff); + size -= temp; + next += temp; + + rdata = readl (®s->lsthresh); + temp = snprintf (next, size, "lsthresh 0x%04x\n", + rdata & 0x3fff); + size -= temp; + next += temp; + + /* roothub */ + ohci_dump_roothub (ohci, 1, &next, &size); + + spin_unlock_irqrestore (&ohci->lock, flags); + + return PAGE_SIZE - size; +} +static DEVICE_ATTR (registers, S_IRUGO, show_registers, NULL); + + +static inline void create_debug_files (struct ohci_hcd *bus) +{ + device_create_file (bus->hcd.controller, &dev_attr_async); + device_create_file (bus->hcd.controller, &dev_attr_periodic); + device_create_file (bus->hcd.controller, &dev_attr_registers); + ohci_dbg (bus, "created debug files\n"); +} + +static inline void remove_debug_files (struct ohci_hcd *bus) +{ + device_remove_file (bus->hcd.controller, &dev_attr_async); + device_remove_file (bus->hcd.controller, &dev_attr_periodic); + device_remove_file (bus->hcd.controller, &dev_attr_registers); +} + +#endif + +/*-------------------------------------------------------------------------*/ + diff --git a/reactos/drivers/usb/cromwell/host/ohci-hcd.c b/reactos/drivers/usb/cromwell/host/ohci-hcd.c new file mode 100644 index 00000000000..fec58a01b5a --- /dev/null +++ b/reactos/drivers/usb/cromwell/host/ohci-hcd.c @@ -0,0 +1,703 @@ +/* + * OHCI HCD (Host Controller Driver) for USB. + * + * (C) Copyright 1999 Roman Weissgaerber + * (C) Copyright 2000-2002 David Brownell + * + * [ Initialisation is based on Linus' ] + * [ uhci code and gregs ohci fragments ] + * [ (C) Copyright 1999 Linus Torvalds ] + * [ (C) Copyright 1999 Gregory P. Smith] + * + * + * OHCI is the main "non-Intel/VIA" standard for USB 1.1 host controller + * interfaces (though some non-x86 Intel chips use it). It supports + * smarter hardware than UHCI. A download link for the spec available + * through the http://www.usb.org website. + * + * History: + * + * 2003/02/24 show registers in sysfs (Kevin Brosius) + * + * 2002/09/03 get rid of ed hashtables, rework periodic scheduling and + * bandwidth accounting; if debugging, show schedules in driverfs + * 2002/07/19 fixes to management of ED and schedule state. + * 2002/06/09 SA-1111 support (Christopher Hoover) + * 2002/06/01 remember frame when HC won't see EDs any more; use that info + * to fix urb unlink races caused by interrupt latency assumptions; + * minor ED field and function naming updates + * 2002/01/18 package as a patch for 2.5.3; this should match the + * 2.4.17 kernel modulo some bugs being fixed. + * + * 2001/10/18 merge pmac cleanup (Benjamin Herrenschmidt) and bugfixes + * from post-2.4.5 patches. + * 2001/09/20 URB_ZERO_PACKET support; hcca_dma portability, OPTi warning + * 2001/09/07 match PCI PM changes, errnos from Linus' tree + * 2001/05/05 fork 2.4.5 version into "hcd" framework, cleanup, simplify; + * pbook pci quirks gone (please fix pbook pci sw!) (db) + * + * 2001/04/08 Identify version on module load (gb) + * 2001/03/24 td/ed hashing to remove bus_to_virt (Steve Longerbeam); + pci_map_single (db) + * 2001/03/21 td and dev/ed allocation uses new pci_pool API (db) + * 2001/03/07 hcca allocation uses pci_alloc_consistent (Steve Longerbeam) + * + * 2000/09/26 fixed races in removing the private portion of the urb + * 2000/09/07 disable bulk and control lists when unlinking the last + * endpoint descriptor in order to avoid unrecoverable errors on + * the Lucent chips. (rwc@sgi) + * 2000/08/29 use bandwidth claiming hooks (thanks Randy!), fix some + * urb unlink probs, indentation fixes + * 2000/08/11 various oops fixes mostly affecting iso and cleanup from + * device unplugs. + * 2000/06/28 use PCI hotplug framework, for better power management + * and for Cardbus support (David Brownell) + * 2000/earlier: fixes for NEC/Lucent chips; suspend/resume handling + * when the controller loses power; handle UE; cleanup; ... + * + * v5.2 1999/12/07 URB 3rd preview, + * v5.1 1999/11/30 URB 2nd preview, cpia, (usb-scsi) + * v5.0 1999/11/22 URB Technical preview, Paul Mackerras powerbook susp/resume + * i386: HUB, Keyboard, Mouse, Printer + * + * v4.3 1999/10/27 multiple HCs, bulk_request + * v4.2 1999/09/05 ISO API alpha, new dev alloc, neg Error-codes + * v4.1 1999/08/27 Randy Dunlap's - ISO API first impl. + * v4.0 1999/08/18 + * v3.0 1999/06/25 + * v2.1 1999/05/09 code clean up + * v2.0 1999/05/04 + * v1.0 1999/04/27 initial release + * + * This file is licenced under the GPL. + */ + +#if 0 +#include + +#ifdef CONFIG_USB_DEBUG +# define DEBUG +#else +# undef DEBUG +#endif + + + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include /* for in_interrupt () */ +#include +#include "../core/hcd.h" + +#include +#include +#include +#include +#include +#else +#include "ohci_config.h" + +#include "../usb_wrapper.h" +#include "../core/hcd.h" + +//#define OHCI_VERBOSE_DEBUG +#endif + +/* + * TO DO: + * + * - "disabled" and "sleeping" should be in hcd->state + * - lots more testing!! + */ + +#define DRIVER_VERSION "2003 Feb 24" +#define DRIVER_AUTHOR "Roman Weissgaerber, David Brownell" +#define DRIVER_DESC "USB 1.1 'Open' Host Controller (OHCI) Driver" + +/*-------------------------------------------------------------------------*/ + +// #define OHCI_VERBOSE_DEBUG /* not always helpful */ + +/* For initializing controller (mask in an HCFS mode too) */ +#define OHCI_CONTROL_INIT \ + (OHCI_CTRL_CBSR & 0x3) | OHCI_CTRL_IE | OHCI_CTRL_PLE + +#define OHCI_UNLINK_TIMEOUT (HZ / 10) + +/*-------------------------------------------------------------------------*/ + +static const char hcd_name [] = "ohci-hcd"; + +#include "ohci.h" + +static inline void disable (struct ohci_hcd *ohci) +{ + ohci->disabled = 1; + ohci->hcd.state = USB_STATE_HALT; +} + +#include "ohci-hub.c" +#include "ohci-dbg.c" +#include "ohci-mem.c" +#include "ohci-q.c" + +/*-------------------------------------------------------------------------*/ + +/* + * queue up an urb for anything except the root hub + */ +static int ohci_urb_enqueue ( + struct usb_hcd *hcd, + struct urb *urb, + int mem_flags +) { + struct ohci_hcd *ohci = hcd_to_ohci (hcd); + struct ed *ed; + urb_priv_t *urb_priv; + unsigned int pipe = urb->pipe; + int i, size = 0; + unsigned long flags; + int retval = 0; + +#ifdef OHCI_VERBOSE_DEBUG + urb_print (urb, "SUB", usb_pipein (pipe)); +#endif + + /* every endpoint has a ed, locate and maybe (re)initialize it */ + if (! (ed = ed_get (ohci, urb->dev, pipe, urb->interval))) + return -ENOMEM; + + /* for the private part of the URB we need the number of TDs (size) */ + switch (ed->type) { + case PIPE_CONTROL: + /* td_submit_urb() doesn't yet handle these */ + if (urb->transfer_buffer_length > 4096) + return -EMSGSIZE; + + /* 1 TD for setup, 1 for ACK, plus ... */ + size = 2; + /* FALLTHROUGH */ + // case PIPE_INTERRUPT: + // case PIPE_BULK: + default: + /* one TD for every 4096 Bytes (can be upto 8K) */ + size += urb->transfer_buffer_length / 4096; + /* ... and for any remaining bytes ... */ + if ((urb->transfer_buffer_length % 4096) != 0) + size++; + /* ... and maybe a zero length packet to wrap it up */ + if (size == 0) + size++; + else if ((urb->transfer_flags & URB_ZERO_PACKET) != 0 + && (urb->transfer_buffer_length + % usb_maxpacket (urb->dev, pipe, + usb_pipeout (pipe))) == 0) + size++; + break; + case PIPE_ISOCHRONOUS: /* number of packets from URB */ + size = urb->number_of_packets; + break; + } + + /* allocate the private part of the URB */ + urb_priv = kmalloc (sizeof (urb_priv_t) + size * sizeof (struct td *), + mem_flags); + if (!urb_priv) + return -ENOMEM; + memset (urb_priv, 0, sizeof (urb_priv_t) + size * sizeof (struct td *)); + + /* fill the private part of the URB */ + urb_priv->length = size; + urb_priv->ed = ed; + + /* allocate the TDs (deferring hash chain updates) */ + for (i = 0; i < size; i++) { + urb_priv->td [i] = td_alloc (ohci, mem_flags); + if (!urb_priv->td [i]) { + urb_priv->length = i; + urb_free_priv (ohci, urb_priv); + return -ENOMEM; + } + } + + spin_lock_irqsave (&ohci->lock, flags); + + /* don't submit to a dead HC */ + if (ohci->disabled || ohci->sleeping) { + retval = -ENODEV; + goto fail; + } + + /* schedule the ed if needed */ + if (ed->state == ED_IDLE) { + retval = ed_schedule (ohci, ed); + if (retval < 0) + goto fail; + if (ed->type == PIPE_ISOCHRONOUS) { + u16 frame = le16_to_cpu (ohci->hcca->frame_no); + + /* delay a few frames before the first TD */ + frame += max_t (u16, 8, ed->interval); + frame &= ~(ed->interval - 1); + frame |= ed->branch; + urb->start_frame = frame; + + /* yes, only URB_ISO_ASAP is supported, and + * urb->start_frame is never used as input. + */ + } + } else if (ed->type == PIPE_ISOCHRONOUS) + urb->start_frame = ed->last_iso + ed->interval; + + /* fill the TDs and link them to the ed; and + * enable that part of the schedule, if needed + * and update count of queued periodic urbs + */ + urb->hcpriv = urb_priv; + td_submit_urb (ohci, urb); + +fail: + if (retval) + urb_free_priv (ohci, urb_priv); + spin_unlock_irqrestore (&ohci->lock, flags); + return retval; +} + +/* + * decouple the URB from the HC queues (TDs, urb_priv); it's + * already marked using urb->status. reporting is always done + * asynchronously, and we might be dealing with an urb that's + * partially transferred, or an ED with other urbs being unlinked. + */ +static int ohci_urb_dequeue (struct usb_hcd *hcd, struct urb *urb) +{ + struct ohci_hcd *ohci = hcd_to_ohci (hcd); + unsigned long flags; + +#ifdef OHCI_VERBOSE_DEBUG + urb_print (urb, "UNLINK", 1); +#endif + + spin_lock_irqsave (&ohci->lock, flags); + if (!ohci->disabled) { + urb_priv_t *urb_priv; + + /* Unless an IRQ completed the unlink while it was being + * handed to us, flag it for unlink and giveback, and force + * some upcoming INTR_SF to call finish_unlinks() + */ + urb_priv = urb->hcpriv; + if (urb_priv) { + urb_priv->state = URB_DEL; + if (urb_priv->ed->state == ED_OPER) + start_urb_unlink (ohci, urb_priv->ed); + } + } else { + /* + * with HC dead, we won't respect hc queue pointers + * any more ... just clean up every urb's memory. + */ + if (urb->hcpriv) { + spin_unlock (&ohci->lock); + finish_urb (ohci, urb, NULL); + spin_lock (&ohci->lock); + } + } + spin_unlock_irqrestore (&ohci->lock, flags); + return 0; +} + +/*-------------------------------------------------------------------------*/ + +/* frees config/altsetting state for endpoints, + * including ED memory, dummy TD, and bulk/intr data toggle + */ + +static void +ohci_endpoint_disable (struct usb_hcd *hcd, struct hcd_dev *dev, int ep) +{ + struct ohci_hcd *ohci = hcd_to_ohci (hcd); + int epnum = ep & USB_ENDPOINT_NUMBER_MASK; + unsigned long flags; + struct ed *ed; + + /* ASSERT: any requests/urbs are being unlinked */ + /* ASSERT: nobody can be submitting urbs for this any more */ + + epnum <<= 1; + if (epnum != 0 && !(ep & USB_DIR_IN)) + epnum |= 1; + +rescan: + spin_lock_irqsave (&ohci->lock, flags); + ed = dev->ep [epnum]; + if (!ed) + goto done; + + if (!HCD_IS_RUNNING (ohci->hcd.state) || ohci->disabled) + ed->state = ED_IDLE; + switch (ed->state) { + case ED_UNLINK: /* wait for hw to finish? */ + spin_unlock_irqrestore (&ohci->lock, flags); + set_current_state (TASK_UNINTERRUPTIBLE); + schedule_timeout (1); + goto rescan; + case ED_IDLE: /* fully unlinked */ + if (list_empty (&ed->td_list)) { + td_free (ohci, ed->dummy); + ed_free (ohci, ed); + break; + } + /* else FALL THROUGH */ + default: + /* caller was supposed to have unlinked any requests; + * that's not our job. can't recover; must leak ed. + */ + ohci_err (ohci, "ed %p (#%d) state %d%s\n", + ed, epnum, ed->state, + list_empty (&ed->td_list) ? "" : "(has tds)"); + td_free (ohci, ed->dummy); + break; + } + dev->ep [epnum] = 0; +done: + spin_unlock_irqrestore (&ohci->lock, flags); + return; +} + +static int ohci_get_frame (struct usb_hcd *hcd) +{ + struct ohci_hcd *ohci = hcd_to_ohci (hcd); + + return le16_to_cpu (ohci->hcca->frame_no); +} + +/*-------------------------------------------------------------------------* + * HC functions + *-------------------------------------------------------------------------*/ + +/* reset the HC and BUS */ + +static int hc_reset (struct ohci_hcd *ohci) +{ + u32 temp; + u32 ints; + u32 control; + + /* Disable HC interrupts */ + writel (OHCI_INTR_MIE, &ohci->regs->intrdisable); + // acknowledge all pending interrupts + ints = readl(&ohci->regs->intrstatus); + writel (ints, &ohci->regs->intrstatus); + + if (readl (&ohci->regs->control) & OHCI_CTRL_IR) { + // takeover without negotiation - there is noone to negotiate with + control = readl (&ohci->regs->control) & ~OHCI_CTRL_IR; + writel (control, &ohci->regs->control); + } + + ohci_dbg (ohci, "USB HC reset_hc %s: ctrl = 0x%x ;\n", + hcd_to_bus (&ohci->hcd)->bus_name, + readl (&ohci->regs->control)); + + /* Reset USB (needed by some controllers); RemoteWakeupConnected + * saved if boot firmware (BIOS/SMM/...) told us it's connected + */ + ohci->hc_control = readl (&ohci->regs->control); + ohci->hc_control &= OHCI_CTRL_RWC; /* hcfs 0 = RESET */ + writel (ohci->hc_control, &ohci->regs->control); + // flush those pci writes + (void) readl (&ohci->regs->control); + wait_ms (50); + + /* HC Reset requires max 10 us delay */ + writel (OHCI_HCR, &ohci->regs->cmdstatus); + temp = 30; /* ... allow extra time */ + while ((readl (&ohci->regs->cmdstatus) & OHCI_HCR) != 0) { + if (--temp == 0) { + ohci_err (ohci, "USB HC reset timed out!\n"); + return -1; + } + udelay (1); + } + + /* now we're in the SUSPEND state ... must go OPERATIONAL + * within 2msec else HC enters RESUME + * + * ... but some hardware won't init fmInterval "by the book" + * (SiS, OPTi ...), so reset again instead. SiS doesn't need + * this if we write fmInterval after we're OPERATIONAL. + */ + writel (ohci->hc_control, &ohci->regs->control); + // flush those pci writes + (void) readl (&ohci->regs->control); + + return 0; +} + +/*-------------------------------------------------------------------------*/ + +#define FI 0x2edf /* 12000 bits per frame (-1) */ +#define LSTHRESH 0x628 /* lowspeed bit threshold */ + +/* Start an OHCI controller, set the BUS operational + * enable interrupts + * connect the virtual root hub + */ +static int hc_start (struct ohci_hcd *ohci) +{ + u32 mask, tmp; + struct usb_device *udev; + struct usb_bus *bus; + + spin_lock_init (&ohci->lock); + ohci->disabled = 1; + ohci->sleeping = 0; + + /* Tell the controller where the control and bulk lists are + * The lists are empty now. */ + writel (0, &ohci->regs->ed_controlhead); + writel (0, &ohci->regs->ed_bulkhead); + + /* a reset clears this */ + writel ((u32) ohci->hcca_dma, &ohci->regs->hcca); +// usbprintk("HCCA: %p \n",ohci->regs->hcca); + + /* force default fmInterval (we won't adjust it); init thresholds + * for last FS and LS packets, reserve 90% for periodic. + */ + writel ((((6 * (FI - 210)) / 7) << 16) | FI, &ohci->regs->fminterval); + writel (((9 * FI) / 10) & 0x3fff, &ohci->regs->periodicstart); + writel (LSTHRESH, &ohci->regs->lsthresh); + + /* some OHCI implementations are finicky about how they init. + * bogus values here mean not even enumeration could work. + */ + if ((readl (&ohci->regs->fminterval) & 0x3fff0000) == 0 + || !readl (&ohci->regs->periodicstart)) { + ohci_err (ohci, "init err\n"); + return -EOVERFLOW; + } + + /* start controller operations */ + ohci->hc_control &= OHCI_CTRL_RWC; + ohci->hc_control |= OHCI_CONTROL_INIT | OHCI_USB_OPER; + ohci->disabled = 0; + writel (ohci->hc_control, &ohci->regs->control); + + /* Choose the interrupts we care about now, others later on demand */ + mask = OHCI_INTR_MIE | OHCI_INTR_UE | OHCI_INTR_WDH; + writel (mask, &ohci->regs->intrstatus); + writel (mask, &ohci->regs->intrenable); + + /* handle root hub init quirks ... */ + tmp = roothub_a (ohci); + tmp &= ~(RH_A_PSM | RH_A_OCPM); + if (ohci->flags & OHCI_QUIRK_SUPERIO) { + /* NSC 87560 and maybe others */ + tmp |= RH_A_NOCP; + tmp &= ~(RH_A_POTPGT | RH_A_NPS); + } else { + /* hub power always on; required for AMD-756 and some + * Mac platforms, use this mode everywhere by default + */ + tmp |= RH_A_NPS; + } + writel (tmp, &ohci->regs->roothub.a); + writel (RH_HS_LPSC, &ohci->regs->roothub.status); + writel (0, &ohci->regs->roothub.b); + // flush those pci writes + (void) readl (&ohci->regs->control); + + // POTPGT delay is bits 24-31, in 2 ms units. + mdelay ((roothub_a (ohci) >> 23) & 0x1fe); + + /* connect the virtual root hub */ + bus = hcd_to_bus (&ohci->hcd); + bus->root_hub = udev = usb_alloc_dev (NULL, bus); + ohci->hcd.state = USB_STATE_READY; + if (!udev) { + disable (ohci); + ohci->hc_control &= ~OHCI_CTRL_HCFS; + writel (ohci->hc_control, &ohci->regs->control); + ohci_err(ohci,"out of mem"); + return -ENOMEM; + } + + usb_connect (udev); + udev->speed = USB_SPEED_FULL; + if (hcd_register_root (&ohci->hcd) != 0) { + usb_put_dev (udev); + bus->root_hub = NULL; + disable (ohci); + ohci->hc_control &= ~OHCI_CTRL_HCFS; + writel (ohci->hc_control, &ohci->regs->control); + return -ENODEV; + } + create_debug_files (ohci); + return 0; +} + +/*-------------------------------------------------------------------------*/ + +/* an interrupt happens */ + +static void ohci_irq (struct usb_hcd *hcd, struct pt_regs *ptregs) +{ + struct ohci_hcd *ohci = hcd_to_ohci (hcd); + struct ohci_regs *regs = ohci->regs; + int ints; + + /* we can eliminate a (slow) readl() if _only_ WDH caused this irq */ + if ((ohci->hcca->done_head != 0) + && ! (le32_to_cpup (&ohci->hcca->done_head) & 0x01)) { + ints = OHCI_INTR_WDH; + + /* cardbus/... hardware gone before remove() */ + } else if ((ints = readl (®s->intrstatus)) == ~(u32)0) { + disable (ohci); + ohci_dbg (ohci, "device removed!\n"); + return; + + /* interrupt for some other device? */ + } else if ((ints &= readl (®s->intrenable)) == 0) { + return; + } + + if (ints & OHCI_INTR_UE) { + disable (ohci); + ohci_err (ohci, "OHCI Unrecoverable Error, disabled\n"); + // e.g. due to PCI Master/Target Abort + + ohci_dump (ohci, 1); + hc_reset (ohci); + } + + if (ints & OHCI_INTR_WDH) { + writel (OHCI_INTR_WDH, ®s->intrdisable); + dl_done_list (ohci, dl_reverse_done_list (ohci), ptregs); + writel (OHCI_INTR_WDH, ®s->intrenable); + } + + /* could track INTR_SO to reduce available PCI/... bandwidth */ + + /* handle any pending URB/ED unlinks, leaving INTR_SF enabled + * when there's still unlinking to be done (next frame). + */ + spin_lock (&ohci->lock); + if (ohci->ed_rm_list) + finish_unlinks (ohci, le16_to_cpu (ohci->hcca->frame_no), + ptregs); + if ((ints & OHCI_INTR_SF) != 0 && !ohci->ed_rm_list) + writel (OHCI_INTR_SF, ®s->intrdisable); + spin_unlock (&ohci->lock); + + writel (ints, ®s->intrstatus); + writel (OHCI_INTR_MIE, ®s->intrenable); + // flush those pci writes + (void) readl (&ohci->regs->control); +} + +/*-------------------------------------------------------------------------*/ + +static void ohci_stop (struct usb_hcd *hcd) +{ + struct ohci_hcd *ohci = hcd_to_ohci (hcd); + struct ohci_regs *regs = ohci->regs; + int ints; + + ohci_dbg (ohci, "stop %s controller%s\n", + hcfs2string (ohci->hc_control & OHCI_CTRL_HCFS), + ohci->disabled ? " (disabled)" : "" + ); + ohci_dump (ohci, 1); + + if (!ohci->disabled) + hc_reset (ohci); + + // Disable all interrupts + writel (OHCI_INTR_MIE, ®s->intrdisable); + // acknowledge all pending interrupts + ints = readl(®s->intrstatus); + writel (ints, ®s->intrstatus); + // flush register writes + (void) readl (&ohci->regs->control); + + remove_debug_files (ohci); + ohci_mem_cleanup (ohci); + if (ohci->hcca) { + pci_free_consistent (ohci->hcd.pdev, sizeof *ohci->hcca, + ohci->hcca, ohci->hcca_dma); + ohci->hcca = NULL; + ohci->hcca_dma = 0; + } +} + +/*-------------------------------------------------------------------------*/ + +// FIXME: this restart logic should be generic, +// and handle full hcd state cleanup + +/* controller died; cleanup debris, then restart */ +/* must not be called from interrupt context */ + +#ifdef CONFIG_PM +static int hc_restart (struct ohci_hcd *ohci) +{ + int temp; + int i; + + ohci->disabled = 1; + ohci->sleeping = 0; + if (hcd_to_bus (&ohci->hcd)->root_hub) + usb_disconnect (&hcd_to_bus (&ohci->hcd)->root_hub); + + /* empty the interrupt branches */ + for (i = 0; i < NUM_INTS; i++) ohci->load [i] = 0; + for (i = 0; i < NUM_INTS; i++) ohci->hcca->int_table [i] = 0; + + /* no EDs to remove */ + ohci->ed_rm_list = NULL; + + /* empty control and bulk lists */ + ohci->ed_controltail = NULL; + ohci->ed_bulktail = NULL; + + if ((temp = hc_reset (ohci)) < 0 || (temp = hc_start (ohci)) < 0) { + ohci_err (ohci, "can't restart, %d\n", temp); + return temp; + } else + ohci_dbg (ohci, "restart complete\n"); + return 0; +} +#endif + +/*-------------------------------------------------------------------------*/ + +#define DRIVER_INFO DRIVER_VERSION " " DRIVER_DESC + +MODULE_AUTHOR (DRIVER_AUTHOR); +MODULE_DESCRIPTION (DRIVER_INFO); +MODULE_LICENSE ("GPL"); + +#ifdef CONFIG_PCI +#include "ohci-pci.c" +#endif + +#ifdef CONFIG_SA1111 +#include "ohci-sa1111.c" +#endif + +#if !(defined(CONFIG_PCI) || defined(CONFIG_SA1111)) +#error "missing bus glue for ohci-hcd" +#endif diff --git a/reactos/drivers/usb/cromwell/host/ohci-hub.c b/reactos/drivers/usb/cromwell/host/ohci-hub.c new file mode 100644 index 00000000000..03be82741e0 --- /dev/null +++ b/reactos/drivers/usb/cromwell/host/ohci-hub.c @@ -0,0 +1,271 @@ +/* + * OHCI HCD (Host Controller Driver) for USB. + * + * (C) Copyright 1999 Roman Weissgaerber + * (C) Copyright 2000-2002 David Brownell + * + * This file is licenced under GPL + */ + +/*-------------------------------------------------------------------------*/ + +/* + * OHCI Root Hub ... the nonsharable stuff + * + * Registers don't need cpu_to_le32, that happens transparently + */ + +/* AMD-756 (D2 rev) reports corrupt register contents in some cases. + * The erratum (#4) description is incorrect. AMD's workaround waits + * till some bits (mostly reserved) are clear; ok for all revs. + */ +#define read_roothub(hc, register, mask) ({ \ + u32 temp = readl (&hc->regs->roothub.register); \ + if (temp == -1) \ + disable (hc); \ + else if (hc->flags & OHCI_QUIRK_AMD756) \ + while (temp & mask) \ + temp = readl (&hc->regs->roothub.register); \ + temp; }) + +static u32 roothub_a (struct ohci_hcd *hc) + { return read_roothub (hc, a, 0xfc0fe000); } +static inline u32 roothub_b (struct ohci_hcd *hc) + { return readl (&hc->regs->roothub.b); } +static inline u32 roothub_status (struct ohci_hcd *hc) + { return readl (&hc->regs->roothub.status); } +static u32 roothub_portstatus (struct ohci_hcd *hc, int i) + { return read_roothub (hc, portstatus [i], 0xffe0fce0); } + +/*-------------------------------------------------------------------------*/ + +#define dbg_port(hc,label,num,value) \ + ohci_dbg (hc, \ + "%s roothub.portstatus [%d] " \ + "= 0x%08x%s%s%s%s%s%s%s%s%s%s%s%s\n", \ + label, num, temp, \ + (temp & RH_PS_PRSC) ? " PRSC" : "", \ + (temp & RH_PS_OCIC) ? " OCIC" : "", \ + (temp & RH_PS_PSSC) ? " PSSC" : "", \ + (temp & RH_PS_PESC) ? " PESC" : "", \ + (temp & RH_PS_CSC) ? " CSC" : "", \ + \ + (temp & RH_PS_LSDA) ? " LSDA" : "", \ + (temp & RH_PS_PPS) ? " PPS" : "", \ + (temp & RH_PS_PRS) ? " PRS" : "", \ + (temp & RH_PS_POCI) ? " POCI" : "", \ + (temp & RH_PS_PSS) ? " PSS" : "", \ + \ + (temp & RH_PS_PES) ? " PES" : "", \ + (temp & RH_PS_CCS) ? " CCS" : "" \ + ); + + +/*-------------------------------------------------------------------------*/ + +/* build "status change" packet (one or two bytes) from HC registers */ + +static int +ohci_hub_status_data (struct usb_hcd *hcd, char *buf) +{ + struct ohci_hcd *ohci = hcd_to_ohci (hcd); + int ports, i, changed = 0, length = 1; + + ports = roothub_a (ohci) & RH_A_NDP; + if (ports > MAX_ROOT_PORTS) { + if (ohci->disabled) + return -ESHUTDOWN; + ohci_err (ohci, "bogus NDP=%d, rereads as NDP=%d\n", + ports, readl (&ohci->regs->roothub.a) & RH_A_NDP); + /* retry later; "should not happen" */ + return 0; + } + + /* init status */ + if (roothub_status (ohci) & (RH_HS_LPSC | RH_HS_OCIC)) + buf [0] = changed = 1; + else + buf [0] = 0; + if (ports > 7) { + buf [1] = 0; + length++; + } + + /* look at each port */ + for (i = 0; i < ports; i++) { + u32 status = roothub_portstatus (ohci, i); + + status &= RH_PS_CSC | RH_PS_PESC | RH_PS_PSSC + | RH_PS_OCIC | RH_PS_PRSC; + if (status) { + changed = 1; + if (i < 7) + buf [0] |= 1 << (i + 1); + else + buf [1] |= 1 << (i - 7); + } + } + return changed ? length : 0; +} + +/*-------------------------------------------------------------------------*/ + +static void +ohci_hub_descriptor ( + struct ohci_hcd *ohci, + struct usb_hub_descriptor *desc +) { + u32 rh = roothub_a (ohci); + int ports = rh & RH_A_NDP; + u16 temp; + + desc->bDescriptorType = 0x29; + desc->bPwrOn2PwrGood = (rh & RH_A_POTPGT) >> 24; + desc->bHubContrCurrent = 0; + + desc->bNbrPorts = ports; + temp = 1 + (ports / 8); + desc->bDescLength = 7 + 2 * temp; + + temp = 0; + if (rh & RH_A_PSM) /* per-port power switching? */ + temp |= 0x0001; + if (rh & RH_A_NOCP) /* no overcurrent reporting? */ + temp |= 0x0010; + else if (rh & RH_A_OCPM) /* per-port overcurrent reporting? */ + temp |= 0x0008; + desc->wHubCharacteristics = cpu_to_le16 (temp); + + /* two bitmaps: ports removable, and usb 1.0 legacy PortPwrCtrlMask */ + rh = roothub_b (ohci); + desc->bitmap [0] = rh & RH_B_DR; + if (ports > 7) { + desc->bitmap [1] = (rh & RH_B_DR) >> 8; + desc->bitmap [2] = desc->bitmap [3] = 0xff; + } else + desc->bitmap [1] = 0xff; +} + +/*-------------------------------------------------------------------------*/ + +static int ohci_hub_control ( + struct usb_hcd *hcd, + u16 typeReq, + u16 wValue, + u16 wIndex, + char *buf, + u16 wLength +) { + struct ohci_hcd *ohci = hcd_to_ohci (hcd); + int ports = hcd_to_bus (hcd)->root_hub->maxchild; + u32 temp; + int retval = 0; + + switch (typeReq) { + case ClearHubFeature: + switch (wValue) { + case C_HUB_OVER_CURRENT: + writel (RH_HS_OCIC, &ohci->regs->roothub.status); + case C_HUB_LOCAL_POWER: + break; + default: + goto error; + } + break; + case ClearPortFeature: + if (!wIndex || wIndex > ports) + goto error; + wIndex--; + + switch (wValue) { + case USB_PORT_FEAT_ENABLE: + temp = RH_PS_CCS; + break; + case USB_PORT_FEAT_C_ENABLE: + temp = RH_PS_PESC; + break; + case USB_PORT_FEAT_SUSPEND: + temp = RH_PS_POCI; + break; + case USB_PORT_FEAT_C_SUSPEND: + temp = RH_PS_PSSC; + break; + case USB_PORT_FEAT_POWER: + temp = RH_PS_LSDA; + break; + case USB_PORT_FEAT_C_CONNECTION: + temp = RH_PS_CSC; + break; + case USB_PORT_FEAT_C_OVER_CURRENT: + temp = RH_PS_OCIC; + break; + case USB_PORT_FEAT_C_RESET: + temp = RH_PS_PRSC; + break; + default: + goto error; + } + writel (temp, &ohci->regs->roothub.portstatus [wIndex]); + // readl (&ohci->regs->roothub.portstatus [wIndex]); + break; + case GetHubDescriptor: + ohci_hub_descriptor (ohci, (struct usb_hub_descriptor *) buf); + break; + case GetHubStatus: + temp = roothub_status (ohci) & ~(RH_HS_CRWE | RH_HS_DRWE); + *(u32 *) buf = cpu_to_le32 (temp); + break; + case GetPortStatus: + if (!wIndex || wIndex > ports) + goto error; + wIndex--; + temp = roothub_portstatus (ohci, wIndex); + *(u32 *) buf = cpu_to_le32 (temp); + +#ifndef OHCI_VERBOSE_DEBUG + if (*(u16*)(buf+2)) /* only if wPortChange is interesting */ +#endif + dbg_port (ohci, "GetStatus", wIndex + 1, temp); + break; + case SetHubFeature: + switch (wValue) { + case C_HUB_OVER_CURRENT: + // FIXME: this can be cleared, yes? + case C_HUB_LOCAL_POWER: + break; + default: + goto error; + } + break; + case SetPortFeature: + if (!wIndex || wIndex > ports) + goto error; + wIndex--; + switch (wValue) { + case USB_PORT_FEAT_SUSPEND: + writel (RH_PS_PSS, + &ohci->regs->roothub.portstatus [wIndex]); + break; + case USB_PORT_FEAT_POWER: + writel (RH_PS_PPS, + &ohci->regs->roothub.portstatus [wIndex]); + break; + case USB_PORT_FEAT_RESET: + temp = readl (&ohci->regs->roothub.portstatus [wIndex]); + if (temp & RH_PS_CCS) + writel (RH_PS_PRS, + &ohci->regs->roothub.portstatus [wIndex]); + break; + default: + goto error; + } + break; + + default: +error: + /* "protocol stall" on error */ + retval = -EPIPE; + } + return retval; +} + diff --git a/reactos/drivers/usb/cromwell/host/ohci-mem.c b/reactos/drivers/usb/cromwell/host/ohci-mem.c new file mode 100644 index 00000000000..85371e9756a --- /dev/null +++ b/reactos/drivers/usb/cromwell/host/ohci-mem.c @@ -0,0 +1,146 @@ +/* + * OHCI HCD (Host Controller Driver) for USB. + * + * (C) Copyright 1999 Roman Weissgaerber + * (C) Copyright 2000-2002 David Brownell + * + * This file is licenced under the GPL. + */ + +/*-------------------------------------------------------------------------*/ + +/* + * There's basically three types of memory: + * - data used only by the HCD ... kmalloc is fine + * - async and periodic schedules, shared by HC and HCD ... these + * need to use pci_pool or pci_alloc_consistent + * - driver buffers, read/written by HC ... the hcd glue or the + * device driver provides us with dma addresses + * + * There's also PCI "register" data, which is memory mapped. + * No memory seen by this driver is pagable. + */ + +/*-------------------------------------------------------------------------*/ + +static struct usb_hcd *ohci_hcd_alloc (void) +{ + struct ohci_hcd *ohci; + + ohci = (struct ohci_hcd *) kmalloc (sizeof *ohci, GFP_KERNEL); + if (ohci != 0) { + memset (ohci, 0, sizeof (struct ohci_hcd)); + return &ohci->hcd; + } + return 0; +} + +static void ohci_hcd_free (struct usb_hcd *hcd) +{ + kfree (hcd_to_ohci (hcd)); +} + +/*-------------------------------------------------------------------------*/ + +static int ohci_mem_init (struct ohci_hcd *ohci) +{ + ohci->td_cache = pci_pool_create ("ohci_td", ohci->hcd.pdev, + sizeof (struct td), + 32 /* byte alignment */, + 0 /* no page-crossing issues */); + if (!ohci->td_cache) + return -ENOMEM; + ohci->ed_cache = pci_pool_create ("ohci_ed", ohci->hcd.pdev, + sizeof (struct ed), + 16 /* byte alignment */, + 0 /* no page-crossing issues */); + if (!ohci->ed_cache) { + pci_pool_destroy (ohci->td_cache); + return -ENOMEM; + } + return 0; +} + +static void ohci_mem_cleanup (struct ohci_hcd *ohci) +{ + if (ohci->td_cache) { + pci_pool_destroy (ohci->td_cache); + ohci->td_cache = 0; + } + if (ohci->ed_cache) { + pci_pool_destroy (ohci->ed_cache); + ohci->ed_cache = 0; + } +} + +/*-------------------------------------------------------------------------*/ + +/* ohci "done list" processing needs this mapping */ +static inline struct td * +dma_to_td (struct ohci_hcd *hc, dma_addr_t td_dma) +{ + struct td *td; + + td_dma &= TD_MASK; + td = hc->td_hash [TD_HASH_FUNC(td_dma)]; + while (td && td->td_dma != td_dma) + td = td->td_hash; + return td; +} + +/* TDs ... */ +static struct td * +td_alloc (struct ohci_hcd *hc, int mem_flags) +{ + dma_addr_t dma; + struct td *td; + + td = pci_pool_alloc (hc->td_cache, mem_flags, &dma); + if (td) { + /* in case hc fetches it, make it look dead */ + memset (td, 0, sizeof *td); + td->hwNextTD = cpu_to_le32 (dma); + td->td_dma = dma; + /* hashed in td_fill */ + } + return td; +} + +static void +td_free (struct ohci_hcd *hc, struct td *td) +{ + struct td **prev = &hc->td_hash [TD_HASH_FUNC (td->td_dma)]; + + while (*prev && *prev != td) + prev = &(*prev)->td_hash; + if (*prev) + *prev = td->td_hash; + else if ((td->hwINFO & TD_DONE) != 0) + ohci_dbg (hc, "no hash for td %p\n", td); + pci_pool_free (hc->td_cache, td, td->td_dma); +} + +/*-------------------------------------------------------------------------*/ + +/* EDs ... */ +static struct ed * +ed_alloc (struct ohci_hcd *hc, int mem_flags) +{ + dma_addr_t dma; + struct ed *ed; + + ed = pci_pool_alloc (hc->ed_cache, mem_flags, &dma); + if (ed) { + memset (ed, 0, sizeof (*ed)); + INIT_LIST_HEAD (&ed->td_list); + ed->dma = dma; + } + return ed; +} + +static void +ed_free (struct ohci_hcd *hc, struct ed *ed) +{ + pci_pool_free (hc->ed_cache, ed, ed->dma); +} + diff --git a/reactos/drivers/usb/cromwell/host/ohci-pci.c b/reactos/drivers/usb/cromwell/host/ohci-pci.c new file mode 100644 index 00000000000..1e7fd945f21 --- /dev/null +++ b/reactos/drivers/usb/cromwell/host/ohci-pci.c @@ -0,0 +1,405 @@ +/* + * OHCI HCD (Host Controller Driver) for USB. + * + * (C) Copyright 1999 Roman Weissgaerber + * (C) Copyright 2000-2002 David Brownell + * + * [ Initialisation is based on Linus' ] + * [ uhci code and gregs ohci fragments ] + * [ (C) Copyright 1999 Linus Torvalds ] + * [ (C) Copyright 1999 Gregory P. Smith] + * + * PCI Bus Glue + * + * This file is licenced under the GPL. + */ + +#ifdef CONFIG_PMAC_PBOOK +#include +#include +#include +#include +#ifndef CONFIG_PM +# define CONFIG_PM +#endif +#endif + +#ifndef CONFIG_PCI +#error "This file is PCI bus glue. CONFIG_PCI must be defined." +#endif + +#include "../linux/pci_ids.h" + +/*-------------------------------------------------------------------------*/ + +static int __devinit +ohci_pci_start (struct usb_hcd *hcd) +{ + struct ohci_hcd *ohci = hcd_to_ohci (hcd); + int ret; + + if (hcd->pdev) { + ohci->hcca = pci_alloc_consistent (hcd->pdev, + sizeof *ohci->hcca, &ohci->hcca_dma); + if (!ohci->hcca) + return -ENOMEM; + + /* AMD 756, for most chips (early revs), corrupts register + * values on read ... so enable the vendor workaround. + */ + if (hcd->pdev->vendor == PCI_VENDOR_ID_AMD + && hcd->pdev->device == 0x740c) { + ohci->flags = OHCI_QUIRK_AMD756; + ohci_info (ohci, "AMD756 erratum 4 workaround\n"); + } + + /* FIXME for some of the early AMD 760 southbridges, OHCI + * won't work at all. blacklist them. + */ + + /* Apple's OHCI driver has a lot of bizarre workarounds + * for this chip. Evidently control and bulk lists + * can get confused. (B&W G3 models, and ...) + */ + else if (hcd->pdev->vendor == PCI_VENDOR_ID_OPTI + && hcd->pdev->device == 0xc861) { + ohci_info (ohci, + "WARNING: OPTi workarounds unavailable\n"); + } + + /* Check for NSC87560. We have to look at the bridge (fn1) to + * identify the USB (fn2). This quirk might apply to more or + * even all NSC stuff. + */ + else if (hcd->pdev->vendor == PCI_VENDOR_ID_NS) { + struct pci_dev *b, *hc; + + hc = hcd->pdev; + b = pci_find_slot (hc->bus->number, + PCI_DEVFN (PCI_SLOT (hc->devfn), 1)); + if (b && b->device == PCI_DEVICE_ID_NS_87560_LIO + && b->vendor == PCI_VENDOR_ID_NS) { + ohci->flags |= OHCI_QUIRK_SUPERIO; + ohci_info (ohci, "Using NSC SuperIO setup\n"); + } + } + + } + + memset (ohci->hcca, 0, sizeof (struct ohci_hcca)); + if ((ret = ohci_mem_init (ohci)) < 0) { + ohci_stop (hcd); + return ret; + } + ohci->regs = hcd->regs; + + if (hc_reset (ohci) < 0) { + ohci_stop (hcd); + return -ENODEV; + } + + if (hc_start (ohci) < 0) { + ohci_err (ohci, "can't start\n"); + ohci_stop (hcd); + return -EBUSY; + } + +#ifdef DEBUG + ohci_dump (ohci, 1); +#endif + return 0; +} + +#ifdef CONFIG_PM + +static int ohci_pci_suspend (struct usb_hcd *hcd, u32 state) +{ + struct ohci_hcd *ohci = hcd_to_ohci (hcd); + unsigned long flags; + u16 cmd; + + if ((ohci->hc_control & OHCI_CTRL_HCFS) != OHCI_USB_OPER) { + ohci_dbg (ohci, "can't suspend (state is %s)\n", + hcfs2string (ohci->hc_control & OHCI_CTRL_HCFS)); + return -EIO; + } + + /* act as if usb suspend can always be used */ + ohci_dbg (ohci, "suspend to %d\n", state); + ohci->sleeping = 1; + + /* First stop processing */ + spin_lock_irqsave (&ohci->lock, flags); + ohci->hc_control &= + ~(OHCI_CTRL_PLE|OHCI_CTRL_CLE|OHCI_CTRL_BLE|OHCI_CTRL_IE); + writel (ohci->hc_control, &ohci->regs->control); + writel (OHCI_INTR_SF, &ohci->regs->intrstatus); + (void) readl (&ohci->regs->intrstatus); + spin_unlock_irqrestore (&ohci->lock, flags); + + /* Wait a frame or two */ + mdelay (1); + if (!readl (&ohci->regs->intrstatus) & OHCI_INTR_SF) + mdelay (1); + +#ifdef CONFIG_PMAC_PBOOK + if (_machine == _MACH_Pmac) + disable_irq (hcd->pdev->irq); + /* else, 2.4 assumes shared irqs -- don't disable */ +#endif + + /* Enable remote wakeup */ + writel (readl (&ohci->regs->intrenable) | OHCI_INTR_RD, + &ohci->regs->intrenable); + + /* Suspend chip and let things settle down a bit */ + ohci->hc_control = OHCI_USB_SUSPEND; + writel (ohci->hc_control, &ohci->regs->control); + (void) readl (&ohci->regs->control); + mdelay (500); /* No schedule here ! */ + + switch (readl (&ohci->regs->control) & OHCI_CTRL_HCFS) { + case OHCI_USB_RESET: + ohci_dbg (ohci, "suspend->reset ?\n"); + break; + case OHCI_USB_RESUME: + ohci_dbg (ohci, "suspend->resume ?\n"); + break; + case OHCI_USB_OPER: + ohci_dbg (ohci, "suspend->operational ?\n"); + break; + case OHCI_USB_SUSPEND: + ohci_dbg (ohci, "suspended\n"); + break; + } + + /* In some rare situations, Apple's OHCI have happily trashed + * memory during sleep. We disable its bus master bit during + * suspend + */ + pci_read_config_word (hcd->pdev, PCI_COMMAND, &cmd); + cmd &= ~PCI_COMMAND_MASTER; + pci_write_config_word (hcd->pdev, PCI_COMMAND, cmd); +#ifdef CONFIG_PMAC_PBOOK + { + struct device_node *of_node; + + /* Disable USB PAD & cell clock */ + of_node = pci_device_to_OF_node (hcd->pdev); + if (of_node) + pmac_call_feature(PMAC_FTR_USB_ENABLE, of_node, 0, 0); + } +#endif + return 0; +} + + +static int ohci_pci_resume (struct usb_hcd *hcd) +{ + struct ohci_hcd *ohci = hcd_to_ohci (hcd); + int temp; + int retval = 0; + unsigned long flags; + +#ifdef CONFIG_PMAC_PBOOK + { + struct device_node *of_node; + + /* Re-enable USB PAD & cell clock */ + of_node = pci_device_to_OF_node (hcd->pdev); + if (of_node) + pmac_call_feature (PMAC_FTR_USB_ENABLE, of_node, 0, 1); + } +#endif + /* did we suspend, or were we powered off? */ + ohci->hc_control = readl (&ohci->regs->control); + temp = ohci->hc_control & OHCI_CTRL_HCFS; + +#ifdef DEBUG + /* the registers may look crazy here */ + ohci_dump_status (ohci, 0, 0); +#endif + + /* Re-enable bus mastering */ + pci_set_master (ohci->hcd.pdev); + + switch (temp) { + + case OHCI_USB_RESET: // lost power + ohci_info (ohci, "USB restart\n"); + retval = hc_restart (ohci); + break; + + case OHCI_USB_SUSPEND: // host wakeup + case OHCI_USB_RESUME: // remote wakeup + ohci_info (ohci, "USB continue from %s wakeup\n", + (temp == OHCI_USB_SUSPEND) + ? "host" : "remote"); + ohci->hc_control = OHCI_USB_RESUME; + writel (ohci->hc_control, &ohci->regs->control); + (void) readl (&ohci->regs->control); + mdelay (20); /* no schedule here ! */ + /* Some controllers (lucent) need a longer delay here */ + mdelay (15); + + temp = readl (&ohci->regs->control); + temp = ohci->hc_control & OHCI_CTRL_HCFS; + if (temp != OHCI_USB_RESUME) { + ohci_err (ohci, "controller won't resume\n"); + ohci->disabled = 1; + retval = -EIO; + break; + } + + /* Some chips likes being resumed first */ + writel (OHCI_USB_OPER, &ohci->regs->control); + (void) readl (&ohci->regs->control); + mdelay (3); + + /* Then re-enable operations */ + spin_lock_irqsave (&ohci->lock, flags); + ohci->disabled = 0; + ohci->sleeping = 0; + ohci->hc_control = OHCI_CONTROL_INIT | OHCI_USB_OPER; + if (!ohci->ed_rm_list) { + if (ohci->ed_controltail) + ohci->hc_control |= OHCI_CTRL_CLE; + if (ohci->ed_bulktail) + ohci->hc_control |= OHCI_CTRL_BLE; + } + hcd->state = USB_STATE_READY; + writel (ohci->hc_control, &ohci->regs->control); + + /* trigger a start-frame interrupt (why?) */ + writel (OHCI_INTR_SF, &ohci->regs->intrstatus); + writel (OHCI_INTR_SF, &ohci->regs->intrenable); + + /* Check for a pending done list */ + writel (OHCI_INTR_WDH, &ohci->regs->intrdisable); + (void) readl (&ohci->regs->intrdisable); + spin_unlock_irqrestore (&ohci->lock, flags); + +#ifdef CONFIG_PMAC_PBOOK + if (_machine == _MACH_Pmac) + enable_irq (hcd->pdev->irq); +#endif + if (ohci->hcca->done_head) + dl_done_list (ohci, dl_reverse_done_list (ohci), NULL); + writel (OHCI_INTR_WDH, &ohci->regs->intrenable); + + /* assume there are TDs on the bulk and control lists */ + writel (OHCI_BLF | OHCI_CLF, &ohci->regs->cmdstatus); + +// ohci_dump_status (ohci); +ohci_dbg (ohci, "sleeping = %d, disabled = %d\n", + ohci->sleeping, ohci->disabled); + break; + + default: + ohci_warn (ohci, "odd PCI resume\n"); + } + return retval; +} + +#endif /* CONFIG_PM */ + + +/*-------------------------------------------------------------------------*/ + +static const struct hc_driver ohci_pci_hc_driver = { + .description = hcd_name, + + /* + * generic hardware linkage + */ + .irq = ohci_irq, + .flags = HCD_MEMORY | HCD_USB11, + + /* + * basic lifecycle operations + */ + .start = ohci_pci_start, +#ifdef CONFIG_PM + .suspend = ohci_pci_suspend, + .resume = ohci_pci_resume, +#endif + .stop = ohci_stop, + + /* + * memory lifecycle (except per-request) + */ + .hcd_alloc = ohci_hcd_alloc, + .hcd_free = ohci_hcd_free, + + /* + * managing i/o requests and associated device resources + */ + .urb_enqueue = ohci_urb_enqueue, + .urb_dequeue = ohci_urb_dequeue, + .endpoint_disable = ohci_endpoint_disable, + + /* + * scheduling support + */ + .get_frame_number = ohci_get_frame, + + /* + * root hub support + */ + .hub_status_data = ohci_hub_status_data, + .hub_control = ohci_hub_control, +}; + +/*-------------------------------------------------------------------------*/ + +static const struct pci_device_id __devinitdata pci_ids [] = { { + + /* handle any USB OHCI controller */ + .class = (PCI_CLASS_SERIAL_USB << 8) | 0x10, + .class_mask = ~0, + .driver_data = (unsigned long) &ohci_pci_hc_driver, + + /* no matter who makes it */ + .vendor = PCI_ANY_ID, + .device = PCI_ANY_ID, + .subvendor = PCI_ANY_ID, + .subdevice = PCI_ANY_ID, + + }, { /* end: all zeroes */ } +}; +MODULE_DEVICE_TABLE (pci, pci_ids); + +/* pci driver glue; this is a "new style" PCI driver module */ +static struct pci_driver ohci_pci_driver = { + .name = (char *) hcd_name, + .id_table = pci_ids, + + .probe = usb_hcd_pci_probe, + .remove = usb_hcd_pci_remove, + +#ifdef CONFIG_PM + .suspend = usb_hcd_pci_suspend, + .resume = usb_hcd_pci_resume, +#endif +}; + + +static int __init ohci_hcd_pci_init (void) +{ + printk (KERN_DEBUG "%s: " DRIVER_INFO " (PCI)\n", hcd_name); + if (usb_disabled()) + return -ENODEV; + + printk (KERN_DEBUG "%s: block sizes: ed %Zd td %Zd\n", hcd_name, + sizeof (struct ed), sizeof (struct td)); + return pci_module_init (&ohci_pci_driver); +} +module_init (ohci_hcd_pci_init); + +/*-------------------------------------------------------------------------*/ + +static void __exit ohci_hcd_pci_cleanup (void) +{ + pci_unregister_driver (&ohci_pci_driver); +} +module_exit (ohci_hcd_pci_cleanup); diff --git a/reactos/drivers/usb/cromwell/host/ohci-q.c b/reactos/drivers/usb/cromwell/host/ohci-q.c new file mode 100644 index 00000000000..71e6350b87b --- /dev/null +++ b/reactos/drivers/usb/cromwell/host/ohci-q.c @@ -0,0 +1,1014 @@ +/* + * OHCI HCD (Host Controller Driver) for USB. + * + * (C) Copyright 1999 Roman Weissgaerber + * (C) Copyright 2000-2002 David Brownell + * + * This file is licenced under the GPL. + */ + +static void urb_free_priv (struct ohci_hcd *hc, urb_priv_t *urb_priv) +{ + int last = urb_priv->length - 1; + + if (last >= 0) { + int i; + struct td *td; + + for (i = 0; i <= last; i++) { + td = urb_priv->td [i]; + if (td) + td_free (hc, td); + } + } + + kfree (urb_priv); +} + +/*-------------------------------------------------------------------------*/ + +/* + * URB goes back to driver, and isn't reissued. + * It's completely gone from HC data structures. + * PRECONDITION: no locks held, irqs blocked (Giveback can call into HCD.) + */ +static void +finish_urb (struct ohci_hcd *ohci, struct urb *urb, struct pt_regs *regs) +{ + // ASSERT (urb->hcpriv != 0); + + urb_free_priv (ohci, urb->hcpriv); + urb->hcpriv = NULL; + + spin_lock (&urb->lock); + if (likely (urb->status == -EINPROGRESS)) + urb->status = 0; + spin_unlock (&urb->lock); + + // what lock protects these? + switch (usb_pipetype (urb->pipe)) { + case PIPE_ISOCHRONOUS: + hcd_to_bus (&ohci->hcd)->bandwidth_isoc_reqs--; + break; + case PIPE_INTERRUPT: + hcd_to_bus (&ohci->hcd)->bandwidth_int_reqs--; + break; + } + +#ifdef OHCI_VERBOSE_DEBUG + urb_print (urb, "RET", usb_pipeout (urb->pipe)); +#endif + usb_hcd_giveback_urb (&ohci->hcd, urb, regs); +} + + +/*-------------------------------------------------------------------------* + * ED handling functions + *-------------------------------------------------------------------------*/ + +/* search for the right schedule branch to use for a periodic ed. + * does some load balancing; returns the branch, or negative errno. + */ +static int balance (struct ohci_hcd *ohci, int interval, int load) +{ + int i, branch = -ENOSPC; + + /* iso periods can be huge; iso tds specify frame numbers */ + if (interval > NUM_INTS) + interval = NUM_INTS; + + /* search for the least loaded schedule branch of that period + * that has enough bandwidth left unreserved. + */ + for (i = 0; i < interval ; i++) { + if (branch < 0 || ohci->load [branch] > ohci->load [i]) { +#if 1 /* CONFIG_USB_BANDWIDTH */ + int j; + + /* usb 1.1 says 90% of one frame */ + for (j = i; j < NUM_INTS; j += interval) { + if ((ohci->load [j] + load) > 900) + break; + } + if (j < NUM_INTS) + continue; +#endif + branch = i; + } + } + return branch; +} + +/*-------------------------------------------------------------------------*/ + +/* both iso and interrupt requests have periods; this routine puts them + * into the schedule tree in the apppropriate place. most iso devices use + * 1msec periods, but that's not required. + */ +static void periodic_link (struct ohci_hcd *ohci, struct ed *ed) +{ + unsigned i; + + ohci_vdbg (ohci, "link %sed %p branch %d [%dus.], interval %d\n", + (ed->hwINFO & ED_ISO) ? "iso " : "", + ed, ed->branch, ed->load, ed->interval); + + for (i = ed->branch; i < NUM_INTS; i += ed->interval) { + struct ed **prev = &ohci->periodic [i]; + u32 *prev_p = &ohci->hcca->int_table [i]; + struct ed *here = *prev; + + /* sorting each branch by period (slow before fast) + * lets us share the faster parts of the tree. + * (plus maybe: put interrupt eds before iso) + */ + while (here && ed != here) { + if (ed->interval > here->interval) + break; + prev = &here->ed_next; + prev_p = &here->hwNextED; + here = *prev; + } + if (ed != here) { + ed->ed_next = here; + if (here) + ed->hwNextED = *prev_p; + wmb (); + *prev = ed; + *prev_p = cpu_to_le32p (&ed->dma); + } + ohci->load [i] += ed->load; + } + hcd_to_bus (&ohci->hcd)->bandwidth_allocated += ed->load / ed->interval; +} + +/* link an ed into one of the HC chains */ + +static int ed_schedule (struct ohci_hcd *ohci, struct ed *ed) +{ + int branch; + + ed->state = ED_OPER; + ed->ed_prev = 0; + ed->ed_next = 0; + ed->hwNextED = 0; + wmb (); + + /* we care about rm_list when setting CLE/BLE in case the HC was at + * work on some TD when CLE/BLE was turned off, and isn't quiesced + * yet. finish_unlinks() restarts as needed, some upcoming INTR_SF. + * + * control and bulk EDs are doubly linked (ed_next, ed_prev), but + * periodic ones are singly linked (ed_next). that's because the + * periodic schedule encodes a tree like figure 3-5 in the ohci + * spec: each qh can have several "previous" nodes, and the tree + * doesn't have unused/idle descriptors. + */ + switch (ed->type) { + case PIPE_CONTROL: + if (ohci->ed_controltail == NULL) { + writel (ed->dma, &ohci->regs->ed_controlhead); + } else { + ohci->ed_controltail->ed_next = ed; + ohci->ed_controltail->hwNextED = cpu_to_le32 (ed->dma); + } + ed->ed_prev = ohci->ed_controltail; + if (!ohci->ed_controltail && !ohci->ed_rm_list) { + ohci->hc_control |= OHCI_CTRL_CLE; + writel (0, &ohci->regs->ed_controlcurrent); + writel (ohci->hc_control, &ohci->regs->control); + } + ohci->ed_controltail = ed; + break; + + case PIPE_BULK: + if (ohci->ed_bulktail == NULL) { + writel (ed->dma, &ohci->regs->ed_bulkhead); + } else { + ohci->ed_bulktail->ed_next = ed; + ohci->ed_bulktail->hwNextED = cpu_to_le32 (ed->dma); + } + ed->ed_prev = ohci->ed_bulktail; + if (!ohci->ed_bulktail && !ohci->ed_rm_list) { + ohci->hc_control |= OHCI_CTRL_BLE; + writel (0, &ohci->regs->ed_bulkcurrent); + writel (ohci->hc_control, &ohci->regs->control); + } + ohci->ed_bulktail = ed; + break; + + // case PIPE_INTERRUPT: + // case PIPE_ISOCHRONOUS: + default: + branch = balance (ohci, ed->interval, ed->load); + if (branch < 0) { + ohci_dbg (ohci, + "ERR %d, interval %d msecs, load %d\n", + branch, ed->interval, ed->load); + // FIXME if there are TDs queued, fail them! + return branch; + } + ed->branch = branch; + periodic_link (ohci, ed); + } + + /* the HC may not see the schedule updates yet, but if it does + * then they'll be properly ordered. + */ + return 0; +} + +/*-------------------------------------------------------------------------*/ + +/* scan the periodic table to find and unlink this ED */ +static void periodic_unlink (struct ohci_hcd *ohci, struct ed *ed) +{ + int i; + + for (i = ed->branch; i < NUM_INTS; i += ed->interval) { + struct ed *temp; + struct ed **prev = &ohci->periodic [i]; + u32 *prev_p = &ohci->hcca->int_table [i]; + + while (*prev && (temp = *prev) != ed) { + prev_p = &temp->hwNextED; + prev = &temp->ed_next; + } + if (*prev) { + *prev_p = ed->hwNextED; + *prev = ed->ed_next; + } + ohci->load [i] -= ed->load; + } + hcd_to_bus (&ohci->hcd)->bandwidth_allocated -= ed->load / ed->interval; + + ohci_vdbg (ohci, "unlink %sed %p branch %d [%dus.], interval %d\n", + (ed->hwINFO & ED_ISO) ? "iso " : "", + ed, ed->branch, ed->load, ed->interval); +} + +/* unlink an ed from one of the HC chains. + * just the link to the ed is unlinked. + * the link from the ed still points to another operational ed or 0 + * so the HC can eventually finish the processing of the unlinked ed + */ +static void ed_deschedule (struct ohci_hcd *ohci, struct ed *ed) +{ + ed->hwINFO |= ED_SKIP; + + switch (ed->type) { + case PIPE_CONTROL: + if (ed->ed_prev == NULL) { + if (!ed->hwNextED) { + ohci->hc_control &= ~OHCI_CTRL_CLE; + writel (ohci->hc_control, &ohci->regs->control); + writel (0, &ohci->regs->ed_controlcurrent); + // post those pci writes + (void) readl (&ohci->regs->control); + } + writel (le32_to_cpup (&ed->hwNextED), + &ohci->regs->ed_controlhead); + } else { + ed->ed_prev->ed_next = ed->ed_next; + ed->ed_prev->hwNextED = ed->hwNextED; + } + if (ohci->ed_controltail == ed) { + ohci->ed_controltail = ed->ed_prev; + if (ohci->ed_controltail) + ohci->ed_controltail->ed_next = 0; + } else if (ed->ed_next) { + ed->ed_next->ed_prev = ed->ed_prev; + } + break; + + case PIPE_BULK: + if (ed->ed_prev == NULL) { + if (!ed->hwNextED) { + ohci->hc_control &= ~OHCI_CTRL_BLE; + writel (ohci->hc_control, &ohci->regs->control); + writel (0, &ohci->regs->ed_bulkcurrent); + // post those pci writes + (void) readl (&ohci->regs->control); + } + writel (le32_to_cpup (&ed->hwNextED), + &ohci->regs->ed_bulkhead); + } else { + ed->ed_prev->ed_next = ed->ed_next; + ed->ed_prev->hwNextED = ed->hwNextED; + } + if (ohci->ed_bulktail == ed) { + ohci->ed_bulktail = ed->ed_prev; + if (ohci->ed_bulktail) + ohci->ed_bulktail->ed_next = 0; + } else if (ed->ed_next) { + ed->ed_next->ed_prev = ed->ed_prev; + } + break; + + // case PIPE_INTERRUPT: + // case PIPE_ISOCHRONOUS: + default: + periodic_unlink (ohci, ed); + break; + } + + /* NOTE: Except for a couple of exceptionally clean unlink cases + * (like unlinking the only c/b ED, with no TDs) HCs may still be + * caching this operational ED (or its address). Safe unlinking + * involves not marking it ED_IDLE till INTR_SF; we always do that + * if td_list isn't empty. Otherwise the race is small; but ... + */ + if (ed->state == ED_OPER) { + ed->state = ED_IDLE; + ed->hwINFO &= ~(ED_SKIP | ED_DEQUEUE); + ed->hwHeadP &= ~ED_H; + wmb (); + } +} + + +/*-------------------------------------------------------------------------*/ + +/* get and maybe (re)init an endpoint. init _should_ be done only as part + * of usb_set_configuration() or usb_set_interface() ... but the USB stack + * isn't very stateful, so we re-init whenever the HC isn't looking. + */ +static struct ed *ed_get ( + struct ohci_hcd *ohci, + struct usb_device *udev, + unsigned int pipe, + int interval +) { + int is_out = !usb_pipein (pipe); + int type = usb_pipetype (pipe); + struct hcd_dev *dev = (struct hcd_dev *) udev->hcpriv; + struct ed *ed; + unsigned ep; + unsigned long flags; + + ep = usb_pipeendpoint (pipe) << 1; + if (type != PIPE_CONTROL && is_out) + ep |= 1; + + spin_lock_irqsave (&ohci->lock, flags); + + if (!(ed = dev->ep [ep])) { + struct td *td; + + ed = ed_alloc (ohci, SLAB_ATOMIC); + if (!ed) { + /* out of memory */ + goto done; + } + dev->ep [ep] = ed; + + /* dummy td; end of td list for ed */ + td = td_alloc (ohci, SLAB_ATOMIC); + if (!td) { + /* out of memory */ + ed_free (ohci, ed); + ed = 0; + goto done; + } + ed->dummy = td; + ed->hwTailP = cpu_to_le32 (td->td_dma); + ed->hwHeadP = ed->hwTailP; /* ED_C, ED_H zeroed */ + ed->state = ED_IDLE; + ed->type = type; + } + + /* NOTE: only ep0 currently needs this "re"init logic, during + * enumeration (after set_address, or if ep0 maxpacket >8). + */ + if (ed->state == ED_IDLE) { + u32 info; + + info = usb_pipedevice (pipe); + info |= (ep >> 1) << 7; + info |= usb_maxpacket (udev, pipe, is_out) << 16; + info = cpu_to_le32 (info); + if (udev->speed == USB_SPEED_LOW) + info |= ED_LOWSPEED; + /* only control transfers store pids in tds */ + if (type != PIPE_CONTROL) { + info |= is_out ? ED_OUT : ED_IN; + if (type != PIPE_BULK) { + /* periodic transfers... */ + if (type == PIPE_ISOCHRONOUS) + info |= ED_ISO; + else if (interval > 32) /* iso can be bigger */ + interval = 32; + ed->interval = interval; + ed->load = usb_calc_bus_time ( + udev->speed, !is_out, + type == PIPE_ISOCHRONOUS, + usb_maxpacket (udev, pipe, is_out)) + / 1000; + } + } + ed->hwINFO = info; + } + +done: + spin_unlock_irqrestore (&ohci->lock, flags); + return ed; +} + +/*-------------------------------------------------------------------------*/ + +/* request unlinking of an endpoint from an operational HC. + * put the ep on the rm_list + * real work is done at the next start frame (SF) hardware interrupt + */ +static void start_urb_unlink (struct ohci_hcd *ohci, struct ed *ed) +{ + ed->hwINFO |= ED_DEQUEUE; + ed->state = ED_UNLINK; + ed_deschedule (ohci, ed); + + /* SF interrupt might get delayed; record the frame counter value that + * indicates when the HC isn't looking at it, so concurrent unlinks + * behave. frame_no wraps every 2^16 msec, and changes right before + * SF is triggered. + */ + ed->tick = le16_to_cpu (ohci->hcca->frame_no) + 1; + + /* rm_list is just singly linked, for simplicity */ + ed->ed_next = ohci->ed_rm_list; + ed->ed_prev = 0; + ohci->ed_rm_list = ed; + + /* enable SOF interrupt */ + if (!ohci->sleeping) { + writel (OHCI_INTR_SF, &ohci->regs->intrstatus); + writel (OHCI_INTR_SF, &ohci->regs->intrenable); + // flush those pci writes + (void) readl (&ohci->regs->control); + } +} + +/*-------------------------------------------------------------------------* + * TD handling functions + *-------------------------------------------------------------------------*/ + +/* enqueue next TD for this URB (OHCI spec 5.2.8.2) */ + +static void +td_fill (struct ohci_hcd *ohci, u32 info, + dma_addr_t data, int len, + struct urb *urb, int index) +{ + struct td *td, *td_pt; + struct urb_priv *urb_priv = urb->hcpriv; + int is_iso = info & TD_ISO; + int hash; + + // ASSERT (index < urb_priv->length); + + /* aim for only one interrupt per urb. mostly applies to control + * and iso; other urbs rarely need more than one TD per urb. + * this way, only final tds (or ones with an error) cause IRQs. + * at least immediately; use DI=6 in case any control request is + * tempted to die part way through. + * + * NOTE: could delay interrupts even for the last TD, and get fewer + * interrupts ... increasing per-urb latency by sharing interrupts. + * Drivers that queue bulk urbs may request that behavior. + */ + if (index != (urb_priv->length - 1) + || (urb->transfer_flags & URB_NO_INTERRUPT)) + info |= TD_DI_SET (6); + + /* use this td as the next dummy */ + td_pt = urb_priv->td [index]; + + /* fill the old dummy TD */ + td = urb_priv->td [index] = urb_priv->ed->dummy; + urb_priv->ed->dummy = td_pt; + + td->ed = urb_priv->ed; + td->next_dl_td = NULL; + td->index = index; + td->urb = urb; + td->data_dma = data; + if (!len) + data = 0; + + td->hwINFO = cpu_to_le32 (info); + if (is_iso) { + td->hwCBP = cpu_to_le32 (data & 0xFFFFF000); + td->hwPSW [0] = cpu_to_le16 ((data & 0x0FFF) | 0xE000); + td->ed->last_iso = info & 0xffff; + } else { + td->hwCBP = cpu_to_le32 (data); + } + if (data) + td->hwBE = cpu_to_le32 (data + len - 1); + else + td->hwBE = 0; + td->hwNextTD = cpu_to_le32 (td_pt->td_dma); + + /* append to queue */ + list_add_tail (&td->td_list, &td->ed->td_list); + + /* hash it for later reverse mapping */ + hash = TD_HASH_FUNC (td->td_dma); + td->td_hash = ohci->td_hash [hash]; + ohci->td_hash [hash] = td; + + /* HC might read the TD (or cachelines) right away ... */ + wmb (); + td->ed->hwTailP = td->hwNextTD; +} + +/*-------------------------------------------------------------------------*/ + +/* Prepare all TDs of a transfer, and queue them onto the ED. + * Caller guarantees HC is active. + * Usually the ED is already on the schedule, so TDs might be + * processed as soon as they're queued. + */ +static void td_submit_urb ( + struct ohci_hcd *ohci, + struct urb *urb +) { + struct urb_priv *urb_priv = urb->hcpriv; + dma_addr_t data; + int data_len = urb->transfer_buffer_length; + int cnt = 0; + u32 info = 0; + int is_out = usb_pipeout (urb->pipe); + + /* OHCI handles the bulk/interrupt data toggles itself. We just + * use the device toggle bits for resetting, and rely on the fact + * that resetting toggle is meaningless if the endpoint is active. + */ + if (!usb_gettoggle (urb->dev, usb_pipeendpoint (urb->pipe), is_out)) { + usb_settoggle (urb->dev, usb_pipeendpoint (urb->pipe), + is_out, 1); + urb_priv->ed->hwHeadP &= ~ED_C; + } + + urb_priv->td_cnt = 0; + + if (data_len) + data = urb->transfer_dma; + else + data = 0; + + /* NOTE: TD_CC is set so we can tell which TDs the HC processed by + * using TD_CC_GET, as well as by seeing them on the done list. + * (CC = NotAccessed ... 0x0F, or 0x0E in PSWs for ISO.) + */ + switch (urb_priv->ed->type) { + + /* Bulk and interrupt are identical except for where in the schedule + * their EDs live. + */ + case PIPE_INTERRUPT: + /* ... and periodic urbs have extra accounting */ + hcd_to_bus (&ohci->hcd)->bandwidth_int_reqs++; + /* FALLTHROUGH */ + case PIPE_BULK: + info = is_out + ? TD_T_TOGGLE | TD_CC | TD_DP_OUT + : TD_T_TOGGLE | TD_CC | TD_DP_IN; + /* TDs _could_ transfer up to 8K each */ + while (data_len > 4096) { + td_fill (ohci, info, data, 4096, urb, cnt); + data += 4096; + data_len -= 4096; + cnt++; + } + /* maybe avoid ED halt on final TD short read */ + if (!(urb->transfer_flags & URB_SHORT_NOT_OK)) + info |= TD_R; + td_fill (ohci, info, data, data_len, urb, cnt); + cnt++; + if ((urb->transfer_flags & URB_ZERO_PACKET) + && cnt < urb_priv->length) { + td_fill (ohci, info, 0, 0, urb, cnt); + cnt++; + } + /* maybe kickstart bulk list */ + if (urb_priv->ed->type == PIPE_BULK) { + wmb (); + writel (OHCI_BLF, &ohci->regs->cmdstatus); + } + break; + + /* control manages DATA0/DATA1 toggle per-request; SETUP resets it, + * any DATA phase works normally, and the STATUS ack is special. + */ + case PIPE_CONTROL: + info = TD_CC | TD_DP_SETUP | TD_T_DATA0; + td_fill (ohci, info, urb->setup_dma, 8, urb, cnt++); + if (data_len > 0) { + info = TD_CC | TD_R | TD_T_DATA1; + info |= is_out ? TD_DP_OUT : TD_DP_IN; + /* NOTE: mishandles transfers >8K, some >4K */ + td_fill (ohci, info, data, data_len, urb, cnt++); + } + info = is_out + ? TD_CC | TD_DP_IN | TD_T_DATA1 + : TD_CC | TD_DP_OUT | TD_T_DATA1; + td_fill (ohci, info, data, 0, urb, cnt++); + /* maybe kickstart control list */ + wmb (); + writel (OHCI_CLF, &ohci->regs->cmdstatus); + break; + + /* ISO has no retransmit, so no toggle; and it uses special TDs. + * Each TD could handle multiple consecutive frames (interval 1); + * we could often reduce the number of TDs here. + */ + case PIPE_ISOCHRONOUS: + for (cnt = 0; cnt < urb->number_of_packets; cnt++) { + int frame = urb->start_frame; + + // FIXME scheduling should handle frame counter + // roll-around ... exotic case (and OHCI has + // a 2^16 iso range, vs other HCs max of 2^10) + frame += cnt * urb->interval; + frame &= 0xffff; + td_fill (ohci, TD_CC | TD_ISO | frame, + data + urb->iso_frame_desc [cnt].offset, + urb->iso_frame_desc [cnt].length, urb, cnt); + } + hcd_to_bus (&ohci->hcd)->bandwidth_isoc_reqs++; + break; + } + // ASSERT (urb_priv->length == cnt); +} + +/*-------------------------------------------------------------------------* + * Done List handling functions + *-------------------------------------------------------------------------*/ + +/* calculate transfer length/status and update the urb + * PRECONDITION: irqsafe (only for urb->status locking) + */ +static void td_done (struct ohci_hcd *ohci, struct urb *urb, struct td *td) +{ + u32 tdINFO = le32_to_cpup (&td->hwINFO); + int cc = 0; + + list_del (&td->td_list); + + /* ISO ... drivers see per-TD length/status */ + if (tdINFO & TD_ISO) { + u16 tdPSW = le16_to_cpu (td->hwPSW [0]); + int dlen = 0; + + /* NOTE: assumes FC in tdINFO == 0 (and MAXPSW == 1) */ + + cc = (tdPSW >> 12) & 0xF; + if (tdINFO & TD_CC) /* hc didn't touch? */ + return; + + if (usb_pipeout (urb->pipe)) + dlen = urb->iso_frame_desc [td->index].length; + else { + /* short reads are always OK for ISO */ + if (cc == TD_DATAUNDERRUN) + cc = TD_CC_NOERROR; + dlen = tdPSW & 0x3ff; + } + urb->actual_length += dlen; + urb->iso_frame_desc [td->index].actual_length = dlen; + urb->iso_frame_desc [td->index].status = cc_to_error [cc]; + + if (cc != TD_CC_NOERROR) + ohci_vdbg (ohci, + "urb %p iso td %p (%d) len %d cc %d\n", + urb, td, 1 + td->index, dlen, cc); + + /* BULK, INT, CONTROL ... drivers see aggregate length/status, + * except that "setup" bytes aren't counted and "short" transfers + * might not be reported as errors. + */ + } else { + int type = usb_pipetype (urb->pipe); + u32 tdBE = le32_to_cpup (&td->hwBE); + + cc = TD_CC_GET (tdINFO); + + /* control endpoints only have soft stalls */ + if (type != PIPE_CONTROL && cc == TD_CC_STALL) + usb_endpoint_halt (urb->dev, + usb_pipeendpoint (urb->pipe), + usb_pipeout (urb->pipe)); + + /* update packet status if needed (short is normally ok) */ + if (cc == TD_DATAUNDERRUN + && !(urb->transfer_flags & URB_SHORT_NOT_OK)) + cc = TD_CC_NOERROR; + if (cc != TD_CC_NOERROR && cc < 0x0E) { + spin_lock (&urb->lock); + if (urb->status == -EINPROGRESS) + urb->status = cc_to_error [cc]; + spin_unlock (&urb->lock); + } + + /* count all non-empty packets except control SETUP packet */ + if ((type != PIPE_CONTROL || td->index != 0) && tdBE != 0) { + if (td->hwCBP == 0) + urb->actual_length += tdBE - td->data_dma + 1; + else + urb->actual_length += + le32_to_cpup (&td->hwCBP) + - td->data_dma; + } + + if (cc != TD_CC_NOERROR && cc < 0x0E) + ohci_vdbg (ohci, + "urb %p td %p (%d) cc %d, len=%d/%d\n", + urb, td, 1 + td->index, cc, + urb->actual_length, + urb->transfer_buffer_length); + } +} + +/*-------------------------------------------------------------------------*/ + +static inline struct td * +ed_halted (struct ohci_hcd *ohci, struct td *td, int cc, struct td *rev) +{ + struct urb *urb = td->urb; + struct ed *ed = td->ed; + struct list_head *tmp = td->td_list.next; + u32 toggle = ed->hwHeadP & ED_C; + + /* clear ed halt; this is the td that caused it, but keep it inactive + * until its urb->complete() has a chance to clean up. + */ + ed->hwINFO |= ED_SKIP; + wmb (); + ed->hwHeadP &= ~ED_H; + + /* put any later tds from this urb onto the donelist, after 'td', + * order won't matter here: no errors, and nothing was transferred. + * also patch the ed so it looks as if those tds completed normally. + */ + while (tmp != &ed->td_list) { + struct td *next; + u32 info; + + next = list_entry (tmp, struct td, td_list); + tmp = next->td_list.next; + + if (next->urb != urb) + break; + + /* NOTE: if multi-td control DATA segments get supported, + * this urb had one of them, this td wasn't the last td + * in that segment (TD_R clear), this ed halted because + * of a short read, _and_ URB_SHORT_NOT_OK is clear ... + * then we need to leave the control STATUS packet queued + * and clear ED_SKIP. + */ + info = next->hwINFO; + info |= cpu_to_le32 (TD_DONE); + info &= ~cpu_to_le32 (TD_CC); + next->hwINFO = info; + + next->next_dl_td = rev; + rev = next; + + if (ed->hwTailP == cpu_to_le32 (next->td_dma)) + ed->hwTailP = next->hwNextTD; + ed->hwHeadP = next->hwNextTD | toggle; + } + + /* help for troubleshooting: report anything that + * looks odd ... that doesn't include protocol stalls + * (or maybe some other things) + */ + if (cc != TD_CC_STALL || !usb_pipecontrol (urb->pipe)) + ohci_dbg (ohci, + "urb %p path %s ep%d%s %08x cc %d --> status %d\n", + urb, urb->dev->devpath, + usb_pipeendpoint (urb->pipe), + usb_pipein (urb->pipe) ? "in" : "out", + le32_to_cpu (td->hwINFO), + cc, cc_to_error [cc]); + + return rev; +} + +/* replies to the request have to be on a FIFO basis so + * we unreverse the hc-reversed done-list + */ +static struct td *dl_reverse_done_list (struct ohci_hcd *ohci) +{ + u32 td_dma; + struct td *td_rev = NULL; + struct td *td = NULL; + unsigned long flags; + + spin_lock_irqsave (&ohci->lock, flags); + td_dma = le32_to_cpup (&ohci->hcca->done_head); + ohci->hcca->done_head = 0; + + /* get TD from hc's singly linked list, and + * prepend to ours. ed->td_list changes later. + */ + while (td_dma) { + int cc; + + td = dma_to_td (ohci, td_dma); + if (!td) { + ohci_err (ohci, "bad entry %8x\n", td_dma); + break; + } + + td->hwINFO |= cpu_to_le32 (TD_DONE); + cc = TD_CC_GET (le32_to_cpup (&td->hwINFO)); + + /* Non-iso endpoints can halt on error; un-halt, + * and dequeue any other TDs from this urb. + * No other TD could have caused the halt. + */ + if (cc != TD_CC_NOERROR && (td->ed->hwHeadP & ED_H)) + td_rev = ed_halted (ohci, td, cc, td_rev); + + td->next_dl_td = td_rev; + td_rev = td; + td_dma = le32_to_cpup (&td->hwNextTD); + } + spin_unlock_irqrestore (&ohci->lock, flags); + return td_rev; +} + +/*-------------------------------------------------------------------------*/ + +/* wrap-aware logic stolen from */ +#define tick_before(t1,t2) ((((s16)(t1))-((s16)(t2))) < 0) + +/* there are some urbs/eds to unlink; called in_irq(), with HCD locked */ +static void +finish_unlinks (struct ohci_hcd *ohci, u16 tick, struct pt_regs *regs) +{ + struct ed *ed, **last; + +rescan_all: + for (last = &ohci->ed_rm_list, ed = *last; ed != NULL; ed = *last) { + struct list_head *entry, *tmp; + int completed, modified; + u32 *prev; + + /* only take off EDs that the HC isn't using, accounting for + * frame counter wraps. + */ + if (tick_before (tick, ed->tick) && !ohci->disabled) { + last = &ed->ed_next; + continue; + } + + /* reentrancy: if we drop the schedule lock, someone might + * have modified this list. normally it's just prepending + * entries (which we'd ignore), but paranoia won't hurt. + */ + *last = ed->ed_next; + ed->ed_next = 0; + modified = 0; + + /* unlink urbs as requested, but rescan the list after + * we call a completion since it might have unlinked + * another (earlier) urb + */ +rescan_this: + completed = 0; + prev = &ed->hwHeadP; + list_for_each_safe (entry, tmp, &ed->td_list) { + struct td *td; + struct urb *urb; + urb_priv_t *urb_priv; + u32 savebits; + + td = list_entry (entry, struct td, td_list); + urb = td->urb; + urb_priv = td->urb->hcpriv; + + if (urb_priv->state != URB_DEL) { + prev = &td->hwNextTD; + continue; + } + + /* patch pointers hc uses ... tail, if we're removing + * an otherwise active td, and whatever td pointer + * points to this td + */ + if (ed->hwTailP == cpu_to_le32 (td->td_dma)) + ed->hwTailP = td->hwNextTD; + savebits = *prev & ~cpu_to_le32 (TD_MASK); + *prev = td->hwNextTD | savebits; + + /* HC may have partly processed this TD */ + td_done (ohci, urb, td); + urb_priv->td_cnt++; + + /* if URB is done, clean up */ + if (urb_priv->td_cnt == urb_priv->length) { + modified = completed = 1; + spin_unlock (&ohci->lock); + finish_urb (ohci, urb, regs); + spin_lock (&ohci->lock); + } + } + if (completed && !list_empty (&ed->td_list)) + goto rescan_this; + + /* ED's now officially unlinked, hc doesn't see */ + ed->state = ED_IDLE; + ed->hwINFO &= ~(ED_SKIP | ED_DEQUEUE); + ed->hwHeadP &= ~ED_H; + ed->hwNextED = 0; + + /* but if there's work queued, reschedule */ + if (!list_empty (&ed->td_list)) { + if (!ohci->disabled && !ohci->sleeping) + ed_schedule (ohci, ed); + } + + if (modified) + goto rescan_all; + } + + /* maybe reenable control and bulk lists */ + if (!ohci->disabled && !ohci->ed_rm_list) { + u32 command = 0, control = 0; + + if (ohci->ed_controltail) { + command |= OHCI_CLF; + if (!(ohci->hc_control & OHCI_CTRL_CLE)) { + control |= OHCI_CTRL_CLE; + writel (0, &ohci->regs->ed_controlcurrent); + } + } + if (ohci->ed_bulktail) { + command |= OHCI_BLF; + if (!(ohci->hc_control & OHCI_CTRL_BLE)) { + control |= OHCI_CTRL_BLE; + writel (0, &ohci->regs->ed_bulkcurrent); + } + } + + /* CLE/BLE to enable, CLF/BLF to (maybe) kickstart */ + if (control) { + ohci->hc_control |= control; + writel (ohci->hc_control, &ohci->regs->control); + } + if (command) + writel (command, &ohci->regs->cmdstatus); + } +} + + + +/*-------------------------------------------------------------------------*/ + +/* + * Process normal completions (error or success) and clean the schedules. + * + * This is the main path for handing urbs back to drivers. The only other + * path is finish_unlinks(), which unlinks URBs using ed_rm_list, instead of + * scanning the (re-reversed) donelist as this does. + */ +static void +dl_done_list (struct ohci_hcd *ohci, struct td *td, struct pt_regs *regs) +{ + unsigned long flags; + + spin_lock_irqsave (&ohci->lock, flags); + while (td) { + struct td *td_next = td->next_dl_td; + struct urb *urb = td->urb; + urb_priv_t *urb_priv = urb->hcpriv; + struct ed *ed = td->ed; + + /* update URB's length and status from TD */ + td_done (ohci, urb, td); + urb_priv->td_cnt++; + + /* If all this urb's TDs are done, call complete() */ + if (urb_priv->td_cnt == urb_priv->length) { + spin_unlock (&ohci->lock); + finish_urb (ohci, urb, regs); + spin_lock (&ohci->lock); + } + + /* clean schedule: unlink EDs that are no longer busy */ + if (list_empty (&ed->td_list)) + ed_deschedule (ohci, ed); + /* ... reenabling halted EDs only after fault cleanup */ + else if (!(ed->hwINFO & ED_DEQUEUE)) { + td = list_entry (ed->td_list.next, struct td, td_list); + if (!(td->hwINFO & TD_DONE)) + ed->hwINFO &= ~ED_SKIP; + } + + td = td_next; + } + spin_unlock_irqrestore (&ohci->lock, flags); +} diff --git a/reactos/drivers/usb/cromwell/host/ohci.a b/reactos/drivers/usb/cromwell/host/ohci.a new file mode 100644 index 0000000000000000000000000000000000000000..362d3402fcaf4f3c26dfdfcbe94e53927a6b192d GIT binary patch literal 22522 zcmeHve{|c$mG4NF9VHP+1Oui7qWppcLU2MF4B?03_}k6Cl7kDFZVRd6A9C!(zmUHQ z&MuDae4RGms9pja&X#w&Te@ZUbbEMxd4+AWJrwLT52w3nYeKfo*=9i$cPk<9qCR|x zma6D|?w$Gmkd>6}A3g8AbDoYR-?=k$=gyrwckbNzerM^O&GFWbyBFLNF8!=qSG)1H z+itsk-N(b>TF!F+hQqh7U#}|cSRjPBS%``^F8P=r@jw;Hrn0WmgtH_ zV*{Ofw6~+RGuqMG7VX3T)~;A{Pohs)CG_SNl%t%^wtf+9jrVpx7VGMYw)Xb4ckXl{ z;xRqGx2w0g&4r_6OLNa|7plIqw_o4e7ZcHemfnGAyt!LMA8Q5|-M=sDojsubSiHHf zFBTWkj^>^=bf`1_DBA1nX^rmcY;W(3A<@5rNTR0%yECS%%I-qMT4!@t=O05HsM_D!5#wPY z9(ofxBUw1@y>UpqyRR#zclP!$o`yt?B9XCi?VUYs(f+PpiHXM^O~m?j>MxgQkH@(4 ziuCSSl*YQbRgbnNi2vr!9w~un7rMlyYytHox|Q6(D~iWsJt%>0Dr`?I)`qd%9V3!b zXiD6mtkQkWaSZtHMT;7EFti@1VWduwQr`@vUfV0@x0=tckx)T2)LX59%>F<}Ai~kN&xp*nTagPwbb)c!}EkpGP{+i5R7&HE)=1)d^ z#`xBxFtvg)SSTh!#!R4?@TWJTpm8FUT|;GtYrRONJO{@0#YwHOQlx?fz@gIm*=gkc z;QJsA{N(U+Xc~Wl6V(-f@Yzn;#*8o7gvJ9CDQ`tR+JDe#{}O8a?~BEval)5fKd13! z)Of0pDx&c#FGM2yhQ-1I#>@)THnrKLHhc31@Na7QNo|IhnAFn5822=v{?&)nSZHMt zC=@paXM_7tHE$fF9tb@!sils9q0CvXn!>NhoWhT){{sS1A4Xk(uORw`cBtyB!jr8+ z@>LWVoSnBX062ogn3gVri5!YRI=M~S>|k3lkt-(h={J}eusuDdO^<|ySc0n4LcdFq zGzN23LsuoY2a-*JWm?_#gd&~o$8>4|(rq}|lsN167d_WsHu#P1n5#^)XMwohvB z6JLdiv|lRSyfN+lcEj&sTtMRHOI#>h&Dez{CH;zQyIEhMnBN5UFic=xvU{+8o-vr8 zx9?gcgWuuC4%SmWW`05O)%y9xEI36E{Y6WwSupo1!9c|}AV1j@N^Yx8ZeNVHi(@5v0wRMoRoBP453VrUV{ z2pgOEv@9pSM&+(Uxr_!34V=wS${0)`ljag2k6xKs#zk^cT_%MPUXi&1xOQXkeUz*q z&>GxL+D!0?Ux6@6Z>k_0Bv1 zETwY=wn8h5L&YIeODCIZWUX6~uX?zYz>*#YfssA5@r^{R^4CNR3gOVnq9+gotG+QV zjJzlKg(=`Nr}3j27$>l#fo}qH0TG@x2G9ER2k3WbA%4C3B^d)n0s8eN**__l0?h8D zpp`2dyGSOP@9fqKW|F~9LmYC}t+-&BNeCYVFb>lx*w3Uk?J_ZHA@D=|9W@m~?DAl+ zz%Gf1RwAJBK$YsJ`5duVEC{>tajx|E<%C-kdOB`G#(0pcH!F|01s zHX}jl{u(osmFr<(j=V9zC0%@$x_CdY@36(Pi**<5qH#QoZW-fYFy54RQuS~iWVg{P zSGVD|%xxSK7OP9d$5U*pQmlbH9JSe`6^3qN8=g-#91h6kU+9;y5NF91`Jwa<#yk|pW6!QFlZF}U`YIFL-q}b$%r4Fg_Z;+l_~{{fyHBq1)R57sv%x@k zAM`g6M!s7Pfx!;=C}QBc5w+-Yna$VCNh&;WHy2r>IFyzQ7vGMhtQ^%WR#dCezswiCly=E zDpoOih!^zH7wDhNSz|4rW7@1Il(`Or;0$5z172dx@1tyT8x#62IxgDJKe|S`L|ZnD z#qtk-P8kfC3HT$cFq5HOmIh5mYN!t50t#X(hZ)7$Y-S)N5_LR4*e$HVf^3`& znfnPK3be;qLH>bEQhQ{FWl54P%^$Ru`GqWD3{<;VTZK$FYnTEyYXq0FR&B8c5*K4F zT*}&-k7lhpyA3Vb1KlVSa*SZU{pqK9GD5p}@!E?Hk%OGQjy0=ru>MBOPAcbTC&TYd zJ)WVTE}sYFE-wi_@wY6IoNFGWSzL^vc`!|C4O_ev|7kwVkhO+bW?0ve3jjtto&BjQ zh>a7lkQ!@sn!y?jLc*UM%+Z|QP8v^LwKO+5`V8sw>M3*d6s)DTS5e1OmsH%UECMi$G7 zLlZ1Gx=7A8lu`3ELyG}3P1*19_<|zSrK*cFZ%W*6?cSRo-949D&*>h`sNbb~)zm#W zd5|xJ03M-VnEcg3zm2wsD6X|(I&I7j-GmVpS>C97m!(W1Av4%4~XrzLkam)vJ zQC>a3E@jmil70_w3}_5s!e^2VhvA6i4vYs6JO#O9Ehk^gpT7G%X)tBczBN&qnWABX zy{CmBXEr>ENQo+1`@SkVO?&mkwd_6Qh{z5}MD6u6V?=@$lxY$n18~7i@@RmheH1x$ zT24v?C~ThLj^-dL5j=1o>kT9TsbE7wQ~R~Fd3@sM*d9;M4{;Bry+Il3ezIZzz(fjN zNTJ2~S_*3+$<@iNQ@Ksk^P5m6#Y8ciYCH*Suct@+A`FQ@e!0EX`$PS+Z{d3s0nN8?@Uac|Yxh57$62sU7Tw)AXv)@q-f>H$4*qg5*Nov@-fbJD@ zcpEUaGug}MAnSlECe9G~;E{3m7#gXzoq!q?`)b$+H7Aa}zO5y6J~Qz_m3eX^zhw1s zb1K<%7VWN8g8(~|W8G5vCN2SYel|ZC0*_MJN95Lx%V4hi+mplSlR)^Qe!Ydn;z-JF zEy`*^3(+(=_H~S#NYJ)|7eaW0wCl2xq0%IbkkWS0t3hk5&jAEiJWy?@#4Ieca%eYc zixZ2uRG6j(#pe>=5=`b<9XTZk z)CzV-fLwgAeo?Xs0IXk_0rYkiMpPu=Nzxt802~8D!oh-9b?NXLdU@;qgv(_KJUutR7> z5o3H!WBOk3LZKBZhdgI@13Qr1hR6?Q*GzJBKksrj*RThR>0B^JpClAjBDPS~4{p>z z&=!V$Yp50gf4Wk(qBIAcp~6fX{*$zljKExjGVub(3p~^v<`W~DV_*$dWfk~Ah!Hf= zKCLk>6L*d_1!ey4-vxwo{qD>f|7o0sGtM6jp)2^Ha+k{_869 zxYdZHq%!AEnGG+)dgn+T;2ncaBlR0;joK$8RW$kGX0vA;Sp{j*=6go+jN;B>ebN{_ z>Ctbb-yt}iC$YqR0R7K=o_xZ=ldvQ;NCK+Rug*Lw{X?~7dHY@V8H$lQgoA{R4fz?& z#vHW-AOxYEfhijSAJDmd*z{n(HI0GkpmZ@YQ%t02bY5XkEDTdWLg60-OVT5&BruIV z+$-Gwu$(QJD=C^QJ{blgYQ;p_q1A8ELQPo@`(+vPSO+=TQ*o0vy)SGtv`f$u!py8M zApl7Y53H^T9vFZOECb+|1|ZW0oYaH=1xhfjjj*3Z5DM%<3c7cvqWK2fqc9D~zWca_ z?>&~-rOBq$2n@9!!NaL6#wrDS7J}J;*_$$(Qgg_b^whM7O39x>#rH_^0Q~PIwNsG% zoa)p^OXi=HwOw7p$coI9_)!|p(rX|&?Pf3nyU)N@^LX&THzC}8))T_dNSK13wkX-Y zPEVwKo+)E|N3qtG9&3CAlexm%nAFaqpPn51;S;>0!sydj9|A*4xjz4IO1bWIxt%;K z7sK?BkA&LJN|A40(Q9o0R==-z3cNC#vvFBK$v zqvc?=1w0ExO25YgZq07C)D(CIp+k{HypCCYBvz)g*CAFvpUf-IF`~|tR~E6wMn3k6 zQW6#QwdQ6il~PJ$jcw#+NKa~RRtH%@-+?gLLll&Pm^>7AAOfxh1VHXDxen<3Vt5ni z65JcF{wc8LOMH@Qz%sckmiemjuO31Sl%kItKWDUKzLe2f*zo7IX2T1$+*esg%}cA} zd}4v6X6BNiWuROdN5Qy23Ny*-r@14Ii;2Ai)IKykut;Df)F@!B-$R`l@QK97=-32; z!*Dmk)TLHWRcx+}m|JS$7a=Es%#bnRQ~4fbf1(z-%!6=g4V06of*_lTkSe3=KemCl$`q2tgnAcSa8o zL>3TdcK-BdFof)^(r%x+-pOk})_TkgFGVb9-FJ;64uWnVT%?*UJv;~fDnuB0MswWj zMxsydFFOw8Az+@&QWDXdaX)jGd6f5jRt%0DpkyS>ECZV;Xa@W!u$MR zh683y4f=(yfPimP{R)h=Ox^D{8-2-boTKFyVne;zpLq;a;EDJW7|3en1R#hRFv2Oh zx>L{;$<#fTE1^QxS4yvgcHmG$coEom7o1~JW2O!wg4OsCV~S7`%LU^CL9s_Wn!_*# zUui;iKKM#xJvpog#`k`VO3TB@#HB1Cke$tZo2D&!cyNel|BmBL83?j{3U-6J0(=fk zWD+g4mcyK;{}7Xub}l&j8pa!FmiRfG3GzUml>qxJXR!Pl1AdPV7S2HfKrv%-B?u42 zU1B|#lww7jI5l2E>(4ew4rHfD!XEag&J`19Np%x!urZgooq=(!Lio;? zpmQE{lNJ&BXT>?W;_y4X>!P`)!mAi%yK5Oz1@>94VS`Q`ZA^EA3bY!2a%JWmBD)ZP z+-pgVw0EDJbm^q>KV6iT+mx<%4UZfu>F{I6i}~bFZNV$6tm)nUSt|F~K(K4h}M*yE&;kuq@<~ zN!7tF9L_p|;#~BBbeXcSLOeoRa>57mhm!DS{OKNc6#Q94Heg^T($`2CVZk8d!}9~i z18d_%`ZAe?Q;-?5EQ^N!^%WD`wdf+IF*X1xlES1$ z0dEXG{JgDj%owN!^Jy=8#jq7Qjzb`je~ON&GRxr!py!U~J#Gw+Lz3q~29OsvatWx6 z46GsFcOTXJ8>*LuPlHCuKVv3fVaaC~d*_X4Cux(GY&tpd0Rs3b5BdTw5#$7xycpn$ zpq&zl1q^16SVXY@lx}fwblAdy@Cn#qduPg_d0G{YF_r=pruJeIg|@wz+>u0BnKxGdCcHvPyixU4mrP2fcOtbb)cmoe)y`hcZX@n*sOS?Fjn<3k;= zC4)mpA$ER-WHx>JmqZ#0hrr5Nv9~hwGaeEYTn)4GA}6r&TX77mM?YzYh4B+HOrJGC zoF;R;Njtpppshz^s#eIMRJ|P%bn7o>a1v?U7u*6MgNxbB-Go{}PM+8TC z5H=(5F24M6xJ?YWA~4Fp4&Ec=|(LWn>-Lfm!kzi5YGI)l`&S;`m@|C0tDltr~Nd z)RHDijO%SY^E@6K6Bh$vd*i}AU*#leotHAF^CH!Y4U^){wFB5eNcJO>;udTetYpKa zScQm@mE3@^K8({nP#ioQr)ngzqL3j@{~eh!evs%QLUy48PuQm(vOlCkL~^b(f=Rtd z2-XeCaZVbiNA%P&JnROUCd*hn07 z!D@f2R3FvBMv|b%mchM_K-F1{YQLY`hrw_uiV9i0evVl4k)OUDjt^$nj9m<~C5L%w zZdrlmCwaDG!eep9QN=yfuRW5k(q`7&75CWEyMVyb>{UENL`X6@#ScW6!@h#t1>n(` zVs4NSSt=I=PY3m6hg36Er!R=`=_X^^!BY`N+BYO3{5XP8rr>n4YvlZoa z<1!AY5d}*L>$qtcJvkKcZ3FD#7Sc!AL-aQim9JtHL50iWWP!?}Kh_4RKsyV5q6oER zKiw9VDLnWqMFISJrBS*9MX4t5nvHSr;3K;9P!6b&%_OOyIednhtUOI+i*3347ni^4 zKgJzi3pHi!by*1t=}K#dh(>IqZx2HW8yHC0w5obHID$AxG7tVU%bUA`ReB{#0LDW* zj-un3!B2evUTyfC9w;*^Hzmq{{y~D6JY=&k_I#a zyZ(IgDSj~gAH3#a2JpZhb($#V9mzuc`Sj3P7C+=i5vsjcstKNw&s>rg;SmKqh)6O` zMjmHh88acDo+meXh=W|E>O3#&z$mb-sAY6M9r_PeTvtKEE=UV0MYDOVvHh^j2xcGq zD1l1iyJV|?xLcu;1acIS5}X`iP8HyX6oaJh_H%R??v4Yf+EGV8TkxaQiQJ(M)D|80 zx{#a+n@JBFGV@!Az@ZBgz(ao#N#RQ_3g~P{7-X$xIND~jlWqrxj?$*zLvs7~4<9~E z-TO~}ewVU}sP+EDZ)@XuFhfuF(|?=;7N1gS!jTv71$<%l`1@V_pTPG|)wc` zbe zdN3c!*?3rxt|%hFqZ+j_GTxiYmE?xuE)$po2T*Jxm1Yv zR^VAUcrq-Mfuw0 z7QN-y3lZfSyKWHTa}2#;Lw~l~!hILegPgk@quIpJ1Arc4=xsosW+;F$mOWa$7LVgH zt{u=0hOWNF;^0$&q+A}dp@#uIB5T;V-8R%`=MDh+ESG!A&i!*6`m$Z_>o)Gc+0eJ_ z-0uNu0F^3n9MHo|4?l{lRW<}gRk&I}e}r$9*nr>9Fth`|^$fMyP=^h5*-)PiVaZW7 z25jhY8ydEuQ5!mFLtnI^!!~rphQ4G&U$&uVZRj~0`nnB0Z$n3IXdKX1e5=F>8+Xcv z&f3s98%o*Gv<;%f{*W*8WMvhAa$~c?4ww zms=R_S7%q(U)mTd(}OZMTw#?V%pfqID8ZP(blVuB)7IM)tGL=-i=2krp;iuue+A60 z63jP&87{$`0Or2M?pi+vX3e#3%s&GYFTuP6Oh?#V=6zrWOE5lY9Ic)XKUV@nYpH`F zt)!LJ!Q2B3t-lWDK4AW?1oIhSetCntOe-+ogROUJJqFD263iiBXvKHR906wM8aL)E zz>o*vl=%iQtFd-Cn3sVekHNwG2pAu1wS)O3Fyk0WIp6Kqqah>50?=Dw5EyUSq(%ks zufBxN5@22{!Q2hZ8zqe?#6)fSix}9aJ!ZGF$Om=@bCue*Y8= zT+l|j-#z7idFZK!WhHbdv4;rYLv7I)^9C496#hueUzB0~M;Ycs8Rn;Dn74qjK9cf# zWf%`Jt3I;K$I39ZWth!nn8q?pvLk4TU(=gZ!{K<_u`H0cyF)Xk!XoFJ78aLT<_PL z^#tC3r=>4S`4SQ3*O2W>Wu@9;{jKrNKHW{Z#YF}81(0hixd9U`P8+y+059J6wpyi; zCd;pq=o8-4rx)CrBTBY*sXGc_Csj?nkxnnf_x1L6StuB6m6?dQFvVyeUJ(~jydmG& z-w_2?L~$oTXK!0)D_(b}YYI@udI{f^m*}x`shjd8eL;eW>qI7M6`*(K>2iRm-rR|< zM)@Urd0PNj?N79H<0=AfmrJ(AoI(t@b>Ve-+$hi=WBae(!3R?v&0Ts7cMi05H`55} z0IgmyZx}D880+rS_o7&ryFSZ}*o^hyGJu37Si-c?^#C>|*3;J4+u4Jg3Z!qML{4`X zwBw=%RP1O4gQQ{vasQ!IxE(Qj5ApbtC}UazIbm- zY%Wp`w?#uKTwA1;ube2m+oGXmXJZ_iY3G*Sa$(I$?gw3*5%2A{uKeH&AU^8$hmE!C z!}3G7Kgb2;RhUt^hLzv`P>Z}T;`@>`weSphtuMR%L1mZxi@teKrbJngNI4q0gD=)jf(6qChfWxhR|jHIF#lM-HKNNOw0!lO^nH5RRU)i zZY+t6qIj~M$;rw(RnFCpeDfRJ&9k_xQH2zD>X;gD_!TIFN(P_!JRtPNJnlK|IX>ol znsbiPuh3iFOeBYi2|O)DuL1juIE`cDL0d@<6?i7zwk4rH`B{_m0QJli5 z1M`;YL*JM^#MnJ7MC)+IVfOOi6Z@$yj$!VUg4cH=fv1Iu7`{Jf#?SLr{!s^K?% zPZKLeW==6nCmDFJfU4S&f0q>KfkfF~dM^@>bFe*v^o?7KVtKj~-%&o>m)m&!vH<1Qj6ps-7MMC}V3=Ozs{s(bKhG_1i_d>lT!cI_?wd;4!G zSvFk93flem-x0>aKv>>N7VhcQ!|=_QE+EzrIuc=gs|3xkr3`Jr?=pt&#_w{5>hX(! z5z1|~q1}L1FmA+#C|W4XeHqY7&i#&!`xPKrqY6Ed&>c2J2WAp?zYX;QTFO+O0u*NG zD>g)NEQx#BhJI*6|6)V`ZbMgjg}9!nECED*P?Z<~BzdMQbR_hw4ZUDPz6vXsA~dob zU11`j>ul%{AldU*Z0N^;aLfRYD{JF!@>#fgK$6P+Hq-(L!8Y)>(}ubLA>;%qkJ-4# zZQRR%mT?V=5=iJ@0Igsg#Q-GkKWtpl#$5qbljW`fB+HfihI3R5bm;>k{JEHKNSQeJ z!Rtxz=hRn@YF!D2qEj^`81hU`;>(orUx+RE?!;(181h0AB^Wv{3VGdS9tGyc63j3# zg%ZpWU~U6@4&`qELoq7{^Y_3EmtcMj%#jkzG%)!R4EY0_AS8zl-N*EN31%5E-!8$d z2WA7t!l`u+Fb8bP;iK6$YlWv#m>Z~Zu~n&poZeV|pA7jjWq67#32LK;ia z2lpq8Y2>yF?mRaf5x-OPLHZ)c{Q{4i94=osoSwG28X-$UAGUCqPjf%z7A`Qih;a9X YCg6qQ1?3j5jEulhoQRfQ4Z7fe19ja>n*aa+ literal 0 HcmV?d00001 diff --git a/reactos/drivers/usb/cromwell/host/ohci.coff b/reactos/drivers/usb/cromwell/host/ohci.coff new file mode 100644 index 0000000000000000000000000000000000000000..678fc013e550e1b9e43d9feaf345e8e9fa9e1d2f GIT binary patch literal 968 zcmaKrPfHt76va=PDQ$Kxq}5#tt^`9&r=TLJ)rx{R;-A4?No|Y+<0MSdg1df(eu^%o z`$E5wTUVvOdnaS3vGj%a=iWK@yz|a`IjGfS?R#A+Rza1p z`pKlPFYdQ&w(Jb!ob<(_YToeef8-m1w8yt|`s{?8CF_te)`{LTzSA+QeMLGX-e=rp zZS6;J_sjOJYtiG9V#6aT;P+&*E~l|4PBd1oM49@qB}&zUIn$*E0FNBgR*33VdZ-Vk zA06}TwhiW5Lv_L5pr%XIbNXZEt}ft?P~6lG@n?EU#n4e1-dcmT`1dE9~3B)3)BAecHFG zKWl!DXu@kZW|~UBEGpbDwYBi?hHkC6uOn&)`lwHSGyl75!hfkXfR literal 0 HcmV?d00001 diff --git a/reactos/drivers/usb/cromwell/host/ohci.def b/reactos/drivers/usb/cromwell/host/ohci.def new file mode 100644 index 00000000000..9bc5544dd2f --- /dev/null +++ b/reactos/drivers/usb/cromwell/host/ohci.def @@ -0,0 +1,2 @@ +LIBRARY ohci.sys +EXPORTS diff --git a/reactos/drivers/usb/cromwell/host/ohci.h b/reactos/drivers/usb/cromwell/host/ohci.h new file mode 100644 index 00000000000..400b505e65a --- /dev/null +++ b/reactos/drivers/usb/cromwell/host/ohci.h @@ -0,0 +1,406 @@ +/* + * OHCI HCD (Host Controller Driver) for USB. + * + * (C) Copyright 1999 Roman Weissgaerber + * (C) Copyright 2000-2002 David Brownell + * + * This file is licenced under the GPL. + */ + +/* + * OHCI Endpoint Descriptor (ED) ... holds TD queue + * See OHCI spec, section 4.2 + * + * This is a "Queue Head" for those transfers, which is why + * both EHCI and UHCI call similar structures a "QH". + */ +struct ed { + /* first fields are hardware-specified, le32 */ + __u32 hwINFO; /* endpoint config bitmap */ + /* info bits defined by hcd */ +#define ED_DEQUEUE __constant_cpu_to_le32(1 << 27) + /* info bits defined by the hardware */ +#define ED_ISO __constant_cpu_to_le32(1 << 15) +#define ED_SKIP __constant_cpu_to_le32(1 << 14) +#define ED_LOWSPEED __constant_cpu_to_le32(1 << 13) +#define ED_OUT __constant_cpu_to_le32(0x01 << 11) +#define ED_IN __constant_cpu_to_le32(0x02 << 11) + __u32 hwTailP; /* tail of TD list */ + __u32 hwHeadP; /* head of TD list (hc r/w) */ +#define ED_C __constant_cpu_to_le32(0x02) /* toggle carry */ +#define ED_H __constant_cpu_to_le32(0x01) /* halted */ + __u32 hwNextED; /* next ED in list */ + + /* rest are purely for the driver's use */ + dma_addr_t dma; /* addr of ED */ + struct td *dummy; /* next TD to activate */ + + /* host's view of schedule */ + struct ed *ed_next; /* on schedule or rm_list */ + struct ed *ed_prev; /* for non-interrupt EDs */ + struct list_head td_list; /* "shadow list" of our TDs */ + + /* create --> IDLE --> OPER --> ... --> IDLE --> destroy + * usually: OPER --> UNLINK --> (IDLE | OPER) --> ... + * some special cases : OPER --> IDLE ... + */ + u8 state; /* ED_{IDLE,UNLINK,OPER} */ +#define ED_IDLE 0x00 /* NOT linked to HC */ +#define ED_UNLINK 0x01 /* being unlinked from hc */ +#define ED_OPER 0x02 /* IS linked to hc */ + + u8 type; /* PIPE_{BULK,...} */ + + /* periodic scheduling params (for intr and iso) */ + u8 branch; + u16 interval; + u16 load; + u16 last_iso; /* iso only */ + + /* HC may see EDs on rm_list until next frame (frame_no == tick) */ + u16 tick; +} __attribute__ ((aligned(16))); + +#define ED_MASK ((u32)~0x0f) /* strip hw status in low addr bits */ + + +/* + * OHCI Transfer Descriptor (TD) ... one per transfer segment + * See OHCI spec, sections 4.3.1 (general = control/bulk/interrupt) + * and 4.3.2 (iso) + */ +struct td { + /* first fields are hardware-specified, le32 */ + __u32 hwINFO; /* transfer info bitmask */ + + /* hwINFO bits for both general and iso tds: */ +#define TD_CC 0xf0000000 /* condition code */ +#define TD_CC_GET(td_p) ((td_p >>28) & 0x0f) +//#define TD_CC_SET(td_p, cc) (td_p) = ((td_p) & 0x0fffffff) | (((cc) & 0x0f) << 28) +#define TD_DI 0x00E00000 /* frames before interrupt */ +#define TD_DI_SET(X) (((X) & 0x07)<< 21) + /* these two bits are available for definition/use by HCDs in both + * general and iso tds ... others are available for only one type + */ +#define TD_DONE 0x00020000 /* retired to donelist */ +#define TD_ISO 0x00010000 /* copy of ED_ISO */ + + /* hwINFO bits for general tds: */ +#define TD_EC 0x0C000000 /* error count */ +#define TD_T 0x03000000 /* data toggle state */ +#define TD_T_DATA0 0x02000000 /* DATA0 */ +#define TD_T_DATA1 0x03000000 /* DATA1 */ +#define TD_T_TOGGLE 0x00000000 /* uses ED_C */ +#define TD_DP 0x00180000 /* direction/pid */ +#define TD_DP_SETUP 0x00000000 /* SETUP pid */ +#define TD_DP_IN 0x00100000 /* IN pid */ +#define TD_DP_OUT 0x00080000 /* OUT pid */ + /* 0x00180000 rsvd */ +#define TD_R 0x00040000 /* round: short packets OK? */ + + /* (no hwINFO #defines yet for iso tds) */ + + __u32 hwCBP; /* Current Buffer Pointer (or 0) */ + __u32 hwNextTD; /* Next TD Pointer */ + __u32 hwBE; /* Memory Buffer End Pointer */ + + /* PSW is only for ISO */ +#define MAXPSW 1 /* hardware allows 8 */ + __u16 hwPSW [MAXPSW]; + + /* rest are purely for the driver's use */ + __u8 index; + struct ed *ed; + struct td *td_hash; /* dma-->td hashtable */ + struct td *next_dl_td; + struct urb *urb; + + dma_addr_t td_dma; /* addr of this TD */ + dma_addr_t data_dma; /* addr of data it points to */ + + struct list_head td_list; /* "shadow list", TDs on same ED */ +} __attribute__ ((aligned(32))); /* c/b/i need 16; only iso needs 32 */ + +#define TD_MASK ((u32)~0x1f) /* strip hw status in low addr bits */ + +/* + * Hardware transfer status codes -- CC from td->hwINFO or td->hwPSW + */ +#define TD_CC_NOERROR 0x00 +#define TD_CC_CRC 0x01 +#define TD_CC_BITSTUFFING 0x02 +#define TD_CC_DATATOGGLEM 0x03 +#define TD_CC_STALL 0x04 +#define TD_DEVNOTRESP 0x05 +#define TD_PIDCHECKFAIL 0x06 +#define TD_UNEXPECTEDPID 0x07 +#define TD_DATAOVERRUN 0x08 +#define TD_DATAUNDERRUN 0x09 + /* 0x0A, 0x0B reserved for hardware */ +#define TD_BUFFEROVERRUN 0x0C +#define TD_BUFFERUNDERRUN 0x0D + /* 0x0E, 0x0F reserved for HCD */ +#define TD_NOTACCESSED 0x0F + + +/* map OHCI TD status codes (CC) to errno values */ +static const int cc_to_error [16] = { + /* No Error */ 0, + /* CRC Error */ -EILSEQ, + /* Bit Stuff */ -EPROTO, + /* Data Togg */ -EILSEQ, + /* Stall */ -EPIPE, + /* DevNotResp */ -ETIMEDOUT, + /* PIDCheck */ -EPROTO, + /* UnExpPID */ -EPROTO, + /* DataOver */ -EOVERFLOW, + /* DataUnder */ -EREMOTEIO, + /* (for hw) */ -EIO, + /* (for hw) */ -EIO, + /* BufferOver */ -ECOMM, + /* BuffUnder */ -ENOSR, + /* (for HCD) */ -EALREADY, + /* (for HCD) */ -EALREADY +}; + + +/* + * The HCCA (Host Controller Communications Area) is a 256 byte + * structure defined section 4.4.1 of the OHCI spec. The HC is + * told the base address of it. It must be 256-byte aligned. + */ +struct ohci_hcca { +#define NUM_INTS 32 + __u32 int_table [NUM_INTS]; /* periodic schedule */ + __u16 frame_no; /* current frame number */ + __u16 pad1; /* set to 0 on each frame_no change */ + __u32 done_head; /* info returned for an interrupt */ + u8 reserved_for_hc [116]; + u8 what [4]; /* spec only identifies 252 bytes :) */ +} __attribute__ ((aligned(256))); + + +/* + * This is the structure of the OHCI controller's memory mapped I/O region. + * You must use readl() and writel() (in ) to access these fields!! + * Layout is in section 7 (and appendix B) of the spec. + */ +struct ohci_regs { + /* control and status registers (section 7.1) */ + __u32 revision; + __u32 control; + __u32 cmdstatus; + __u32 intrstatus; + __u32 intrenable; + __u32 intrdisable; + + /* memory pointers (section 7.2) */ + __u32 hcca; + __u32 ed_periodcurrent; + __u32 ed_controlhead; + __u32 ed_controlcurrent; + __u32 ed_bulkhead; + __u32 ed_bulkcurrent; + __u32 donehead; + + /* frame counters (section 7.3) */ + __u32 fminterval; + __u32 fmremaining; + __u32 fmnumber; + __u32 periodicstart; + __u32 lsthresh; + + /* Root hub ports (section 7.4) */ + struct ohci_roothub_regs { + __u32 a; + __u32 b; + __u32 status; +#define MAX_ROOT_PORTS 15 /* maximum OHCI root hub ports (RH_A_NDP) */ + __u32 portstatus [MAX_ROOT_PORTS]; + } roothub; + + /* and optional "legacy support" registers (appendix B) at 0x0100 */ + +} __attribute__ ((aligned(32))); + + +/* OHCI CONTROL AND STATUS REGISTER MASKS */ + +/* + * HcControl (control) register masks + */ +#define OHCI_CTRL_CBSR (3 << 0) /* control/bulk service ratio */ +#define OHCI_CTRL_PLE (1 << 2) /* periodic list enable */ +#define OHCI_CTRL_IE (1 << 3) /* isochronous enable */ +#define OHCI_CTRL_CLE (1 << 4) /* control list enable */ +#define OHCI_CTRL_BLE (1 << 5) /* bulk list enable */ +#define OHCI_CTRL_HCFS (3 << 6) /* host controller functional state */ +#define OHCI_CTRL_IR (1 << 8) /* interrupt routing */ +#define OHCI_CTRL_RWC (1 << 9) /* remote wakeup connected */ +#define OHCI_CTRL_RWE (1 << 10) /* remote wakeup enable */ + +/* pre-shifted values for HCFS */ +# define OHCI_USB_RESET (0 << 6) +# define OHCI_USB_RESUME (1 << 6) +# define OHCI_USB_OPER (2 << 6) +# define OHCI_USB_SUSPEND (3 << 6) + +/* + * HcCommandStatus (cmdstatus) register masks + */ +#define OHCI_HCR (1 << 0) /* host controller reset */ +#define OHCI_CLF (1 << 1) /* control list filled */ +#define OHCI_BLF (1 << 2) /* bulk list filled */ +#define OHCI_OCR (1 << 3) /* ownership change request */ +#define OHCI_SOC (3 << 16) /* scheduling overrun count */ + +/* + * masks used with interrupt registers: + * HcInterruptStatus (intrstatus) + * HcInterruptEnable (intrenable) + * HcInterruptDisable (intrdisable) + */ +#define OHCI_INTR_SO (1 << 0) /* scheduling overrun */ +#define OHCI_INTR_WDH (1 << 1) /* writeback of done_head */ +#define OHCI_INTR_SF (1 << 2) /* start frame */ +#define OHCI_INTR_RD (1 << 3) /* resume detect */ +#define OHCI_INTR_UE (1 << 4) /* unrecoverable error */ +#define OHCI_INTR_FNO (1 << 5) /* frame number overflow */ +#define OHCI_INTR_RHSC (1 << 6) /* root hub status change */ +#define OHCI_INTR_OC (1 << 30) /* ownership change */ +#define OHCI_INTR_MIE (1 << 31) /* master interrupt enable */ + + +/* OHCI ROOT HUB REGISTER MASKS */ + +/* roothub.portstatus [i] bits */ +#define RH_PS_CCS 0x00000001 /* current connect status */ +#define RH_PS_PES 0x00000002 /* port enable status*/ +#define RH_PS_PSS 0x00000004 /* port suspend status */ +#define RH_PS_POCI 0x00000008 /* port over current indicator */ +#define RH_PS_PRS 0x00000010 /* port reset status */ +#define RH_PS_PPS 0x00000100 /* port power status */ +#define RH_PS_LSDA 0x00000200 /* low speed device attached */ +#define RH_PS_CSC 0x00010000 /* connect status change */ +#define RH_PS_PESC 0x00020000 /* port enable status change */ +#define RH_PS_PSSC 0x00040000 /* port suspend status change */ +#define RH_PS_OCIC 0x00080000 /* over current indicator change */ +#define RH_PS_PRSC 0x00100000 /* port reset status change */ + +/* roothub.status bits */ +#define RH_HS_LPS 0x00000001 /* local power status */ +#define RH_HS_OCI 0x00000002 /* over current indicator */ +#define RH_HS_DRWE 0x00008000 /* device remote wakeup enable */ +#define RH_HS_LPSC 0x00010000 /* local power status change */ +#define RH_HS_OCIC 0x00020000 /* over current indicator change */ +#define RH_HS_CRWE 0x80000000 /* clear remote wakeup enable */ + +/* roothub.b masks */ +#define RH_B_DR 0x0000ffff /* device removable flags */ +#define RH_B_PPCM 0xffff0000 /* port power control mask */ + +/* roothub.a masks */ +#define RH_A_NDP (0xff << 0) /* number of downstream ports */ +#define RH_A_PSM (1 << 8) /* power switching mode */ +#define RH_A_NPS (1 << 9) /* no power switching */ +#define RH_A_DT (1 << 10) /* device type (mbz) */ +#define RH_A_OCPM (1 << 11) /* over current protection mode */ +#define RH_A_NOCP (1 << 12) /* no over current protection */ +#define RH_A_POTPGT (0xff << 24) /* power on to power good time */ + + +/* hcd-private per-urb state */ +typedef struct urb_priv { + struct ed *ed; + __u16 length; // # tds in this request + __u16 td_cnt; // tds already serviced + int state; + struct td *td [0]; // all TDs in this request + +} urb_priv_t; + +#define URB_DEL 1 + +#define TD_HASH_SIZE 64 /* power'o'two */ +// sizeof (struct td) ~= 64 == 2^6 ... +#define TD_HASH_FUNC(td_dma) ((td_dma ^ (td_dma >> 6)) % TD_HASH_SIZE) + + +/* + * This is the full ohci controller description + * + * Note how the "proper" USB information is just + * a subset of what the full implementation needs. (Linus) + */ + +struct ohci_hcd { + spinlock_t lock; + + /* + * I/O memory used to communicate with the HC (dma-consistent) + */ + struct ohci_regs *regs; + + /* + * main memory used to communicate with the HC (dma-consistent). + * hcd adds to schedule for a live hc any time, but removals finish + * only at the start of the next frame. + */ + struct ohci_hcca *hcca; + dma_addr_t hcca_dma; + + struct ed *ed_rm_list; /* to be removed */ + + struct ed *ed_bulktail; /* last in bulk list */ + struct ed *ed_controltail; /* last in ctrl list */ + struct ed *periodic [NUM_INTS]; /* shadow int_table */ + + /* + * memory management for queue data structures + */ + struct pci_pool *td_cache; + struct pci_pool *ed_cache; + struct td *td_hash [TD_HASH_SIZE]; + + /* + * driver state + */ + int disabled; /* e.g. got a UE, we're hung */ + int sleeping; + int load [NUM_INTS]; + u32 hc_control; /* copy of hc control reg */ + + unsigned long flags; /* for HC bugs */ +#define OHCI_QUIRK_AMD756 0x01 /* erratum #4 */ +#define OHCI_QUIRK_SUPERIO 0x02 /* natsemi */ + // there are also chip quirks/bugs in init logic + + /* + * framework state + */ + struct usb_hcd hcd; +}; + +#define hcd_to_ohci(hcd_ptr) container_of(hcd_ptr, struct ohci_hcd, hcd) + +/*-------------------------------------------------------------------------*/ + +#ifndef DEBUG +#define STUB_DEBUG_FILES +#endif /* DEBUG */ + +#define ohci_dbg(ohci, fmt, args...) \ + dev_dbg ((ohci)->hcd.controller , fmt , ## args ) +#define ohci_err(ohci, fmt, args...) \ + dev_err ((ohci)->hcd.controller , fmt , ## args ) +#define ohci_info(ohci, fmt, args...) \ + dev_info ((ohci)->hcd.controller , fmt , ## args ) +#define ohci_warn(ohci, fmt, args...) \ + dev_warn ((ohci)->hcd.controller , fmt , ## args ) + +#ifdef OHCI_VERBOSE_DEBUG +# define ohci_vdbg ohci_dbg +#else +# define ohci_vdbg(ohci, fmt, args...) do { } while (0) +#endif + diff --git a/reactos/drivers/usb/cromwell/host/ohci.map b/reactos/drivers/usb/cromwell/host/ohci.map new file mode 100644 index 00000000000..05acb2430c0 --- /dev/null +++ b/reactos/drivers/usb/cromwell/host/ohci.map @@ -0,0 +1,4524 @@ + +ohci.nostrip.sys: file format pei-i386 + +Disassembly of section .text: + +00011000 <__end__>: + 11000: 55 push %ebp + 11001: 89 e5 mov %esp,%ebp + 11003: 83 ec 08 sub $0x8,%esp + 11006: 8b 45 08 mov 0x8(%ebp),%eax + 11009: 8b 40 04 mov 0x4(%eax),%eax + 1100c: 83 c0 48 add $0x48,%eax + 1100f: 8b 00 mov (%eax),%eax + 11011: 89 45 fc mov %eax,0xfffffffc(%ebp) + 11014: 83 7d fc ff cmpl $0xffffffff,0xfffffffc(%ebp) + 11018: 75 10 jne 1102a <__end__+0x2a> + 1101a: 83 ec 0c sub $0xc,%esp + 1101d: ff 75 08 pushl 0x8(%ebp) + 11020: e8 36 00 00 00 call 1105b <_disable> + 11025: 83 c4 10 add $0x10,%esp + 11028: eb 2c jmp 11056 <__end__+0x56> + 1102a: 8b 45 08 mov 0x8(%ebp),%eax + 1102d: 8b 80 30 02 00 00 mov 0x230(%eax),%eax + 11033: 83 e0 01 and $0x1,%eax + 11036: 85 c0 test %eax,%eax + 11038: 74 1c je 11056 <__end__+0x56> + 1103a: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 1103d: 25 00 e0 0f fc and $0xfc0fe000,%eax + 11042: 85 c0 test %eax,%eax + 11044: 74 10 je 11056 <__end__+0x56> + 11046: 8b 45 08 mov 0x8(%ebp),%eax + 11049: 8b 40 04 mov 0x4(%eax),%eax + 1104c: 83 c0 48 add $0x48,%eax + 1104f: 8b 00 mov (%eax),%eax + 11051: 89 45 fc mov %eax,0xfffffffc(%ebp) + 11054: eb e4 jmp 1103a <__end__+0x3a> + 11056: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 11059: c9 leave + 1105a: c3 ret + +0001105b <_disable>: + 1105b: 55 push %ebp + 1105c: 89 e5 mov %esp,%ebp + 1105e: 8b 45 08 mov 0x8(%ebp),%eax + 11061: c7 80 a4 01 00 00 01 movl $0x1,0x1a4(%eax) + 11068: 00 00 00 + 1106b: 8b 45 08 mov 0x8(%ebp),%eax + 1106e: c7 80 14 03 00 00 00 movl $0x0,0x314(%eax) + 11075: 00 00 00 + 11078: 5d pop %ebp + 11079: c3 ret + +0001107a <_roothub_portstatus>: + 1107a: 55 push %ebp + 1107b: 89 e5 mov %esp,%ebp + 1107d: 83 ec 04 sub $0x4,%esp + 11080: 8b 55 08 mov 0x8(%ebp),%edx + 11083: 8b 45 0c mov 0xc(%ebp),%eax + 11086: c1 e0 02 shl $0x2,%eax + 11089: 03 42 04 add 0x4(%edx),%eax + 1108c: 83 c0 54 add $0x54,%eax + 1108f: 8b 00 mov (%eax),%eax + 11091: 89 45 fc mov %eax,0xfffffffc(%ebp) + 11094: 83 7d fc ff cmpl $0xffffffff,0xfffffffc(%ebp) + 11098: 75 0d jne 110a7 <_roothub_portstatus+0x2d> + 1109a: ff 75 08 pushl 0x8(%ebp) + 1109d: e8 b9 ff ff ff call 1105b <_disable> + 110a2: 83 c4 04 add $0x4,%esp + 110a5: eb 32 jmp 110d9 <_roothub_portstatus+0x5f> + 110a7: 8b 45 08 mov 0x8(%ebp),%eax + 110aa: 8b 80 30 02 00 00 mov 0x230(%eax),%eax + 110b0: 83 e0 01 and $0x1,%eax + 110b3: 85 c0 test %eax,%eax + 110b5: 74 22 je 110d9 <_roothub_portstatus+0x5f> + 110b7: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 110ba: 25 e0 fc e0 ff and $0xffe0fce0,%eax + 110bf: 85 c0 test %eax,%eax + 110c1: 74 16 je 110d9 <_roothub_portstatus+0x5f> + 110c3: 8b 55 08 mov 0x8(%ebp),%edx + 110c6: 8b 45 0c mov 0xc(%ebp),%eax + 110c9: c1 e0 02 shl $0x2,%eax + 110cc: 03 42 04 add 0x4(%edx),%eax + 110cf: 83 c0 54 add $0x54,%eax + 110d2: 8b 00 mov (%eax),%eax + 110d4: 89 45 fc mov %eax,0xfffffffc(%ebp) + 110d7: eb de jmp 110b7 <_roothub_portstatus+0x3d> + 110d9: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 110dc: c9 leave + 110dd: c3 ret + +000110de <_ohci_hub_status_data>: + 110de: 55 push %ebp + 110df: 89 e5 mov %esp,%ebp + 110e1: 53 push %ebx + 110e2: 83 ec 24 sub $0x24,%esp + 110e5: 8b 45 08 mov 0x8(%ebp),%eax + 110e8: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 110eb: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 110ee: 2d 34 02 00 00 sub $0x234,%eax + 110f3: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 110f6: c7 45 ec 00 00 00 00 movl $0x0,0xffffffec(%ebp) + 110fd: c7 45 e8 01 00 00 00 movl $0x1,0xffffffe8(%ebp) + 11104: 83 ec 0c sub $0xc,%esp + 11107: ff 75 f8 pushl 0xfffffff8(%ebp) + 1110a: e8 f1 fe ff ff call 11000 <__end__> + 1110f: 83 c4 10 add $0x10,%esp + 11112: 25 ff 00 00 00 and $0xff,%eax + 11117: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 1111a: 83 7d f4 0f cmpl $0xf,0xfffffff4(%ebp) + 1111e: 7e 24 jle 11144 <_ohci_hub_status_data+0x66> + 11120: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 11123: 83 b8 a4 01 00 00 00 cmpl $0x0,0x1a4(%eax) + 1112a: 74 0c je 11138 <_ohci_hub_status_data+0x5a> + 1112c: c7 45 e0 94 ff ff ff movl $0xffffff94,0xffffffe0(%ebp) + 11133: e9 d8 00 00 00 jmp 11210 <_ohci_hub_status_data+0x132> + 11138: c7 45 e0 00 00 00 00 movl $0x0,0xffffffe0(%ebp) + 1113f: e9 cc 00 00 00 jmp 11210 <_ohci_hub_status_data+0x132> + 11144: 83 ec 0c sub $0xc,%esp + 11147: ff 75 f8 pushl 0xfffffff8(%ebp) + 1114a: e8 c9 00 00 00 call 11218 <_roothub_status> + 1114f: 83 c4 10 add $0x10,%esp + 11152: 25 00 00 03 00 and $0x30000,%eax + 11157: 85 c0 test %eax,%eax + 11159: 74 0f je 1116a <_ohci_hub_status_data+0x8c> + 1115b: 8b 45 0c mov 0xc(%ebp),%eax + 1115e: c7 45 ec 01 00 00 00 movl $0x1,0xffffffec(%ebp) + 11165: c6 00 01 movb $0x1,(%eax) + 11168: eb 06 jmp 11170 <_ohci_hub_status_data+0x92> + 1116a: 8b 45 0c mov 0xc(%ebp),%eax + 1116d: c6 00 00 movb $0x0,(%eax) + 11170: 83 7d f4 07 cmpl $0x7,0xfffffff4(%ebp) + 11174: 7e 0c jle 11182 <_ohci_hub_status_data+0xa4> + 11176: 8b 45 0c mov 0xc(%ebp),%eax + 11179: 40 inc %eax + 1117a: c6 00 00 movb $0x0,(%eax) + 1117d: 8d 45 e8 lea 0xffffffe8(%ebp),%eax + 11180: ff 00 incl (%eax) + 11182: c7 45 f0 00 00 00 00 movl $0x0,0xfffffff0(%ebp) + 11189: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 1118c: 3b 45 f4 cmp 0xfffffff4(%ebp),%eax + 1118f: 7d 64 jge 111f5 <_ohci_hub_status_data+0x117> + 11191: ff 75 f0 pushl 0xfffffff0(%ebp) + 11194: ff 75 f8 pushl 0xfffffff8(%ebp) + 11197: e8 de fe ff ff call 1107a <_roothub_portstatus> + 1119c: 83 c4 08 add $0x8,%esp + 1119f: 89 45 e4 mov %eax,0xffffffe4(%ebp) + 111a2: 8d 45 e4 lea 0xffffffe4(%ebp),%eax + 111a5: 81 20 00 00 1f 00 andl $0x1f0000,(%eax) + 111ab: 83 7d e4 00 cmpl $0x0,0xffffffe4(%ebp) + 111af: 74 3d je 111ee <_ohci_hub_status_data+0x110> + 111b1: c7 45 ec 01 00 00 00 movl $0x1,0xffffffec(%ebp) + 111b8: 83 7d f0 06 cmpl $0x6,0xfffffff0(%ebp) + 111bc: 7f 17 jg 111d5 <_ohci_hub_status_data+0xf7> + 111be: 8b 5d 0c mov 0xc(%ebp),%ebx + 111c1: 8b 55 0c mov 0xc(%ebp),%edx + 111c4: 8b 4d f0 mov 0xfffffff0(%ebp),%ecx + 111c7: 41 inc %ecx + 111c8: b8 01 00 00 00 mov $0x1,%eax + 111cd: d3 e0 shl %cl,%eax + 111cf: 0a 02 or (%edx),%al + 111d1: 88 03 mov %al,(%ebx) + 111d3: eb 19 jmp 111ee <_ohci_hub_status_data+0x110> + 111d5: 8b 5d 0c mov 0xc(%ebp),%ebx + 111d8: 43 inc %ebx + 111d9: 8b 55 0c mov 0xc(%ebp),%edx + 111dc: 42 inc %edx + 111dd: 8b 4d f0 mov 0xfffffff0(%ebp),%ecx + 111e0: 83 e9 07 sub $0x7,%ecx + 111e3: b8 01 00 00 00 mov $0x1,%eax + 111e8: d3 e0 shl %cl,%eax + 111ea: 0a 02 or (%edx),%al + 111ec: 88 03 mov %al,(%ebx) + 111ee: 8d 45 f0 lea 0xfffffff0(%ebp),%eax + 111f1: ff 00 incl (%eax) + 111f3: eb 94 jmp 11189 <_ohci_hub_status_data+0xab> + 111f5: 83 7d ec 00 cmpl $0x0,0xffffffec(%ebp) + 111f9: 74 08 je 11203 <_ohci_hub_status_data+0x125> + 111fb: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 111fe: 89 45 dc mov %eax,0xffffffdc(%ebp) + 11201: eb 07 jmp 1120a <_ohci_hub_status_data+0x12c> + 11203: c7 45 dc 00 00 00 00 movl $0x0,0xffffffdc(%ebp) + 1120a: 8b 45 dc mov 0xffffffdc(%ebp),%eax + 1120d: 89 45 e0 mov %eax,0xffffffe0(%ebp) + 11210: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 11213: 8b 5d fc mov 0xfffffffc(%ebp),%ebx + 11216: c9 leave + 11217: c3 ret + +00011218 <_roothub_status>: + 11218: 55 push %ebp + 11219: 89 e5 mov %esp,%ebp + 1121b: 8b 45 08 mov 0x8(%ebp),%eax + 1121e: 8b 40 04 mov 0x4(%eax),%eax + 11221: 83 c0 50 add $0x50,%eax + 11224: 8b 00 mov (%eax),%eax + 11226: 5d pop %ebp + 11227: c3 ret + +00011228 <_ohci_hub_descriptor>: + 11228: 55 push %ebp + 11229: 89 e5 mov %esp,%ebp + 1122b: 83 ec 18 sub $0x18,%esp + 1122e: 83 ec 0c sub $0xc,%esp + 11231: ff 75 08 pushl 0x8(%ebp) + 11234: e8 c7 fd ff ff call 11000 <__end__> + 11239: 83 c4 10 add $0x10,%esp + 1123c: 89 45 fc mov %eax,0xfffffffc(%ebp) + 1123f: 0f b6 45 fc movzbl 0xfffffffc(%ebp),%eax + 11243: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 11246: 8b 45 0c mov 0xc(%ebp),%eax + 11249: c6 40 01 29 movb $0x29,0x1(%eax) + 1124d: 8b 55 0c mov 0xc(%ebp),%edx + 11250: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 11253: 25 00 00 00 ff and $0xff000000,%eax + 11258: c1 e8 18 shr $0x18,%eax + 1125b: 88 42 05 mov %al,0x5(%edx) + 1125e: 8b 45 0c mov 0xc(%ebp),%eax + 11261: c6 40 06 00 movb $0x0,0x6(%eax) + 11265: 8b 55 0c mov 0xc(%ebp),%edx + 11268: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 1126b: 88 42 02 mov %al,0x2(%edx) + 1126e: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 11271: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 11274: 83 7d f0 00 cmpl $0x0,0xfffffff0(%ebp) + 11278: 79 04 jns 1127e <_ohci_hub_descriptor+0x56> + 1127a: 83 45 f0 07 addl $0x7,0xfffffff0(%ebp) + 1127e: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 11281: c1 f8 03 sar $0x3,%eax + 11284: 40 inc %eax + 11285: 66 89 45 f6 mov %ax,0xfffffff6(%ebp) + 11289: 8b 55 0c mov 0xc(%ebp),%edx + 1128c: 66 8b 45 f6 mov 0xfffffff6(%ebp),%ax + 11290: 25 ff ff 00 00 and $0xffff,%eax + 11295: 01 c0 add %eax,%eax + 11297: 83 c0 07 add $0x7,%eax + 1129a: 88 02 mov %al,(%edx) + 1129c: 66 c7 45 f6 00 00 movw $0x0,0xfffffff6(%ebp) + 112a2: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 112a5: c1 e8 08 shr $0x8,%eax + 112a8: 83 e0 01 and $0x1,%eax + 112ab: 85 c0 test %eax,%eax + 112ad: 74 07 je 112b6 <_ohci_hub_descriptor+0x8e> + 112af: 8d 45 f6 lea 0xfffffff6(%ebp),%eax + 112b2: 66 83 08 01 orw $0x1,(%eax) + 112b6: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 112b9: c1 e8 0c shr $0xc,%eax + 112bc: 83 e0 01 and $0x1,%eax + 112bf: 85 c0 test %eax,%eax + 112c1: 74 09 je 112cc <_ohci_hub_descriptor+0xa4> + 112c3: 8d 45 f6 lea 0xfffffff6(%ebp),%eax + 112c6: 66 83 08 10 orw $0x10,(%eax) + 112ca: eb 14 jmp 112e0 <_ohci_hub_descriptor+0xb8> + 112cc: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 112cf: c1 e8 0b shr $0xb,%eax + 112d2: 83 e0 01 and $0x1,%eax + 112d5: 85 c0 test %eax,%eax + 112d7: 74 07 je 112e0 <_ohci_hub_descriptor+0xb8> + 112d9: 8d 45 f6 lea 0xfffffff6(%ebp),%eax + 112dc: 66 83 08 08 orw $0x8,(%eax) + 112e0: 8b 55 0c mov 0xc(%ebp),%edx + 112e3: 66 8b 45 f6 mov 0xfffffff6(%ebp),%ax + 112e7: 66 89 42 03 mov %ax,0x3(%edx) + 112eb: 83 ec 0c sub $0xc,%esp + 112ee: ff 75 08 pushl 0x8(%ebp) + 112f1: e8 3b 00 00 00 call 11331 <_roothub_b> + 112f6: 83 c4 10 add $0x10,%esp + 112f9: 89 45 fc mov %eax,0xfffffffc(%ebp) + 112fc: 8b 55 0c mov 0xc(%ebp),%edx + 112ff: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 11302: 88 42 07 mov %al,0x7(%edx) + 11305: 83 7d f8 07 cmpl $0x7,0xfffffff8(%ebp) + 11309: 7e 1d jle 11328 <_ohci_hub_descriptor+0x100> + 1130b: 8b 55 0c mov 0xc(%ebp),%edx + 1130e: 0f b7 45 fc movzwl 0xfffffffc(%ebp),%eax + 11312: c1 e8 08 shr $0x8,%eax + 11315: 88 42 08 mov %al,0x8(%edx) + 11318: 8b 55 0c mov 0xc(%ebp),%edx + 1131b: 8b 45 0c mov 0xc(%ebp),%eax + 1131e: c6 40 0a ff movb $0xff,0xa(%eax) + 11322: c6 42 09 ff movb $0xff,0x9(%edx) + 11326: eb 07 jmp 1132f <_ohci_hub_descriptor+0x107> + 11328: 8b 45 0c mov 0xc(%ebp),%eax + 1132b: c6 40 08 ff movb $0xff,0x8(%eax) + 1132f: c9 leave + 11330: c3 ret + +00011331 <_roothub_b>: + 11331: 55 push %ebp + 11332: 89 e5 mov %esp,%ebp + 11334: 8b 45 08 mov 0x8(%ebp),%eax + 11337: 8b 40 04 mov 0x4(%eax),%eax + 1133a: 83 c0 4c add $0x4c,%eax + 1133d: 8b 00 mov (%eax),%eax + 1133f: 5d pop %ebp + 11340: c3 ret + +00011341 <_ohci_hub_control>: + 11341: 55 push %ebp + 11342: 89 e5 mov %esp,%ebp + 11344: 53 push %ebx + 11345: 83 ec 34 sub $0x34,%esp + 11348: 8b 45 0c mov 0xc(%ebp),%eax + 1134b: 8b 55 10 mov 0x10(%ebp),%edx + 1134e: 8b 4d 14 mov 0x14(%ebp),%ecx + 11351: 8b 5d 1c mov 0x1c(%ebp),%ebx + 11354: 66 89 45 fa mov %ax,0xfffffffa(%ebp) + 11358: 66 89 55 f8 mov %dx,0xfffffff8(%ebp) + 1135c: 66 89 4d f6 mov %cx,0xfffffff6(%ebp) + 11360: 66 89 5d f4 mov %bx,0xfffffff4(%ebp) + 11364: 8b 45 08 mov 0x8(%ebp),%eax + 11367: 89 45 ec mov %eax,0xffffffec(%ebp) + 1136a: 8b 45 ec mov 0xffffffec(%ebp),%eax + 1136d: 2d 34 02 00 00 sub $0x234,%eax + 11372: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 11375: 83 ec 0c sub $0xc,%esp + 11378: ff 75 08 pushl 0x8(%ebp) + 1137b: e8 fb 02 00 00 call 1167b <_hcd_to_bus> + 11380: 83 c4 10 add $0x10,%esp + 11383: 8b 40 24 mov 0x24(%eax),%eax + 11386: 8b 80 ac 01 00 00 mov 0x1ac(%eax),%eax + 1138c: 89 45 ec mov %eax,0xffffffec(%ebp) + 1138f: c7 45 e4 00 00 00 00 movl $0x0,0xffffffe4(%ebp) + 11396: 66 8b 45 fa mov 0xfffffffa(%ebp),%ax + 1139a: 89 c2 mov %eax,%edx + 1139c: 81 e2 ff ff 00 00 and $0xffff,%edx + 113a2: 89 55 d4 mov %edx,0xffffffd4(%ebp) + 113a5: 81 7d d4 03 23 00 00 cmpl $0x2303,0xffffffd4(%ebp) + 113ac: 0f 84 ef 01 00 00 je 115a1 <_ohci_hub_control+0x260> + 113b2: 81 7d d4 03 23 00 00 cmpl $0x2303,0xffffffd4(%ebp) + 113b9: 7f 32 jg 113ed <_ohci_hub_control+0xac> + 113bb: 81 7d d4 03 20 00 00 cmpl $0x2003,0xffffffd4(%ebp) + 113c2: 0f 84 c0 01 00 00 je 11588 <_ohci_hub_control+0x247> + 113c8: 81 7d d4 03 20 00 00 cmpl $0x2003,0xffffffd4(%ebp) + 113cf: 7f 0e jg 113df <_ohci_hub_control+0x9e> + 113d1: 81 7d d4 01 20 00 00 cmpl $0x2001,0xffffffd4(%ebp) + 113d8: 74 4d je 11427 <_ohci_hub_control+0xe6> + 113da: e9 8d 02 00 00 jmp 1166c <_ohci_hub_control+0x32b> + 113df: 81 7d d4 01 23 00 00 cmpl $0x2301,0xffffffd4(%ebp) + 113e6: 74 76 je 1145e <_ohci_hub_control+0x11d> + 113e8: e9 7f 02 00 00 jmp 1166c <_ohci_hub_control+0x32b> + 113ed: 81 7d d4 06 a0 00 00 cmpl $0xa006,0xffffffd4(%ebp) + 113f4: 0f 84 10 01 00 00 je 1150a <_ohci_hub_control+0x1c9> + 113fa: 81 7d d4 06 a0 00 00 cmpl $0xa006,0xffffffd4(%ebp) + 11401: 7f 12 jg 11415 <_ohci_hub_control+0xd4> + 11403: 81 7d d4 00 a0 00 00 cmpl $0xa000,0xffffffd4(%ebp) + 1140a: 0f 84 10 01 00 00 je 11520 <_ohci_hub_control+0x1df> + 11410: e9 57 02 00 00 jmp 1166c <_ohci_hub_control+0x32b> + 11415: 81 7d d4 00 a3 00 00 cmpl $0xa300,0xffffffd4(%ebp) + 1141c: 0f 84 1e 01 00 00 je 11540 <_ohci_hub_control+0x1ff> + 11422: e9 45 02 00 00 jmp 1166c <_ohci_hub_control+0x32b> + 11427: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 1142a: 89 c2 mov %eax,%edx + 1142c: 81 e2 ff ff 00 00 and $0xffff,%edx + 11432: 89 55 e0 mov %edx,0xffffffe0(%ebp) + 11435: 83 7d e0 00 cmpl $0x0,0xffffffe0(%ebp) + 11439: 0f 84 34 02 00 00 je 11673 <_ohci_hub_control+0x332> + 1143f: 83 7d e0 01 cmpl $0x1,0xffffffe0(%ebp) + 11443: 74 05 je 1144a <_ohci_hub_control+0x109> + 11445: e9 22 02 00 00 jmp 1166c <_ohci_hub_control+0x32b> + 1144a: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 1144d: 8b 40 04 mov 0x4(%eax),%eax + 11450: 83 c0 50 add $0x50,%eax + 11453: c7 00 00 00 02 00 movl $0x20000,(%eax) + 11459: e9 15 02 00 00 jmp 11673 <_ohci_hub_control+0x332> + 1145e: 66 83 7d f6 00 cmpw $0x0,0xfffffff6(%ebp) + 11463: 0f 84 03 02 00 00 je 1166c <_ohci_hub_control+0x32b> + 11469: 66 8b 45 f6 mov 0xfffffff6(%ebp),%ax + 1146d: 25 ff ff 00 00 and $0xffff,%eax + 11472: 3b 45 ec cmp 0xffffffec(%ebp),%eax + 11475: 0f 8f f1 01 00 00 jg 1166c <_ohci_hub_control+0x32b> + 1147b: 8d 45 f6 lea 0xfffffff6(%ebp),%eax + 1147e: 66 ff 08 decw (%eax) + 11481: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 11484: 89 c2 mov %eax,%edx + 11486: 81 e2 ff ff 00 00 and $0xffff,%edx + 1148c: 89 55 dc mov %edx,0xffffffdc(%ebp) + 1148f: 83 7d dc 14 cmpl $0x14,0xffffffdc(%ebp) + 11493: 0f 87 d3 01 00 00 ja 1166c <_ohci_hub_control+0x32b> + 11499: 8b 55 dc mov 0xffffffdc(%ebp),%edx + 1149c: 8b 04 95 60 60 01 00 mov 0x16060(,%edx,4),%eax + 114a3: ff e0 jmp *%eax + 114a5: c7 45 e8 01 00 00 00 movl $0x1,0xffffffe8(%ebp) + 114ac: eb 3d jmp 114eb <_ohci_hub_control+0x1aa> + 114ae: c7 45 e8 00 00 02 00 movl $0x20000,0xffffffe8(%ebp) + 114b5: eb 34 jmp 114eb <_ohci_hub_control+0x1aa> + 114b7: c7 45 e8 08 00 00 00 movl $0x8,0xffffffe8(%ebp) + 114be: eb 2b jmp 114eb <_ohci_hub_control+0x1aa> + 114c0: c7 45 e8 00 00 04 00 movl $0x40000,0xffffffe8(%ebp) + 114c7: eb 22 jmp 114eb <_ohci_hub_control+0x1aa> + 114c9: c7 45 e8 00 02 00 00 movl $0x200,0xffffffe8(%ebp) + 114d0: eb 19 jmp 114eb <_ohci_hub_control+0x1aa> + 114d2: c7 45 e8 00 00 01 00 movl $0x10000,0xffffffe8(%ebp) + 114d9: eb 10 jmp 114eb <_ohci_hub_control+0x1aa> + 114db: c7 45 e8 00 00 08 00 movl $0x80000,0xffffffe8(%ebp) + 114e2: eb 07 jmp 114eb <_ohci_hub_control+0x1aa> + 114e4: c7 45 e8 00 00 10 00 movl $0x100000,0xffffffe8(%ebp) + 114eb: 8b 55 f0 mov 0xfffffff0(%ebp),%edx + 114ee: 66 8b 45 f6 mov 0xfffffff6(%ebp),%ax + 114f2: 25 ff ff 00 00 and $0xffff,%eax + 114f7: c1 e0 02 shl $0x2,%eax + 114fa: 03 42 04 add 0x4(%edx),%eax + 114fd: 8d 50 54 lea 0x54(%eax),%edx + 11500: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 11503: 89 02 mov %eax,(%edx) + 11505: e9 69 01 00 00 jmp 11673 <_ohci_hub_control+0x332> + 1150a: 83 ec 08 sub $0x8,%esp + 1150d: ff 75 18 pushl 0x18(%ebp) + 11510: ff 75 f0 pushl 0xfffffff0(%ebp) + 11513: e8 10 fd ff ff call 11228 <_ohci_hub_descriptor> + 11518: 83 c4 10 add $0x10,%esp + 1151b: e9 53 01 00 00 jmp 11673 <_ohci_hub_control+0x332> + 11520: ff 75 f0 pushl 0xfffffff0(%ebp) + 11523: e8 f0 fc ff ff call 11218 <_roothub_status> + 11528: 83 c4 04 add $0x4,%esp + 1152b: 25 ff 7f ff 7f and $0x7fff7fff,%eax + 11530: 89 45 e8 mov %eax,0xffffffe8(%ebp) + 11533: 8b 55 18 mov 0x18(%ebp),%edx + 11536: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 11539: 89 02 mov %eax,(%edx) + 1153b: e9 33 01 00 00 jmp 11673 <_ohci_hub_control+0x332> + 11540: 66 83 7d f6 00 cmpw $0x0,0xfffffff6(%ebp) + 11545: 0f 84 21 01 00 00 je 1166c <_ohci_hub_control+0x32b> + 1154b: 66 8b 45 f6 mov 0xfffffff6(%ebp),%ax + 1154f: 25 ff ff 00 00 and $0xffff,%eax + 11554: 3b 45 ec cmp 0xffffffec(%ebp),%eax + 11557: 0f 8f 0f 01 00 00 jg 1166c <_ohci_hub_control+0x32b> + 1155d: 8d 45 f6 lea 0xfffffff6(%ebp),%eax + 11560: 66 ff 08 decw (%eax) + 11563: 66 8b 45 f6 mov 0xfffffff6(%ebp),%ax + 11567: 25 ff ff 00 00 and $0xffff,%eax + 1156c: 50 push %eax + 1156d: ff 75 f0 pushl 0xfffffff0(%ebp) + 11570: e8 05 fb ff ff call 1107a <_roothub_portstatus> + 11575: 83 c4 08 add $0x8,%esp + 11578: 89 45 e8 mov %eax,0xffffffe8(%ebp) + 1157b: 8b 55 18 mov 0x18(%ebp),%edx + 1157e: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 11581: 89 02 mov %eax,(%edx) + 11583: e9 eb 00 00 00 jmp 11673 <_ohci_hub_control+0x332> + 11588: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 1158b: 25 ff ff 00 00 and $0xffff,%eax + 11590: 83 c0 00 add $0x0,%eax + 11593: 83 f8 01 cmp $0x1,%eax + 11596: 0f 87 d0 00 00 00 ja 1166c <_ohci_hub_control+0x32b> + 1159c: e9 d2 00 00 00 jmp 11673 <_ohci_hub_control+0x332> + 115a1: 66 83 7d f6 00 cmpw $0x0,0xfffffff6(%ebp) + 115a6: 0f 84 c0 00 00 00 je 1166c <_ohci_hub_control+0x32b> + 115ac: 66 8b 45 f6 mov 0xfffffff6(%ebp),%ax + 115b0: 25 ff ff 00 00 and $0xffff,%eax + 115b5: 3b 45 ec cmp 0xffffffec(%ebp),%eax + 115b8: 0f 8f ae 00 00 00 jg 1166c <_ohci_hub_control+0x32b> + 115be: 8d 45 f6 lea 0xfffffff6(%ebp),%eax + 115c1: 66 ff 08 decw (%eax) + 115c4: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 115c7: 89 c2 mov %eax,%edx + 115c9: 81 e2 ff ff 00 00 and $0xffff,%edx + 115cf: 89 55 d8 mov %edx,0xffffffd8(%ebp) + 115d2: 83 7d d8 04 cmpl $0x4,0xffffffd8(%ebp) + 115d6: 74 53 je 1162b <_ohci_hub_control+0x2ea> + 115d8: 83 7d d8 04 cmpl $0x4,0xffffffd8(%ebp) + 115dc: 7f 0b jg 115e9 <_ohci_hub_control+0x2a8> + 115de: 83 7d d8 02 cmpl $0x2,0xffffffd8(%ebp) + 115e2: 74 0d je 115f1 <_ohci_hub_control+0x2b0> + 115e4: e9 83 00 00 00 jmp 1166c <_ohci_hub_control+0x32b> + 115e9: 83 7d d8 08 cmpl $0x8,0xffffffd8(%ebp) + 115ed: 74 1f je 1160e <_ohci_hub_control+0x2cd> + 115ef: eb 7b jmp 1166c <_ohci_hub_control+0x32b> + 115f1: 8b 55 f0 mov 0xfffffff0(%ebp),%edx + 115f4: 66 8b 45 f6 mov 0xfffffff6(%ebp),%ax + 115f8: 25 ff ff 00 00 and $0xffff,%eax + 115fd: c1 e0 02 shl $0x2,%eax + 11600: 03 42 04 add 0x4(%edx),%eax + 11603: 83 c0 54 add $0x54,%eax + 11606: c7 00 04 00 00 00 movl $0x4,(%eax) + 1160c: eb 65 jmp 11673 <_ohci_hub_control+0x332> + 1160e: 8b 55 f0 mov 0xfffffff0(%ebp),%edx + 11611: 66 8b 45 f6 mov 0xfffffff6(%ebp),%ax + 11615: 25 ff ff 00 00 and $0xffff,%eax + 1161a: c1 e0 02 shl $0x2,%eax + 1161d: 03 42 04 add 0x4(%edx),%eax + 11620: 83 c0 54 add $0x54,%eax + 11623: c7 00 00 01 00 00 movl $0x100,(%eax) + 11629: eb 48 jmp 11673 <_ohci_hub_control+0x332> + 1162b: 8b 55 f0 mov 0xfffffff0(%ebp),%edx + 1162e: 66 8b 45 f6 mov 0xfffffff6(%ebp),%ax + 11632: 25 ff ff 00 00 and $0xffff,%eax + 11637: c1 e0 02 shl $0x2,%eax + 1163a: 03 42 04 add 0x4(%edx),%eax + 1163d: 83 c0 54 add $0x54,%eax + 11640: 8b 00 mov (%eax),%eax + 11642: 89 45 e8 mov %eax,0xffffffe8(%ebp) + 11645: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 11648: 83 e0 01 and $0x1,%eax + 1164b: 85 c0 test %eax,%eax + 1164d: 74 24 je 11673 <_ohci_hub_control+0x332> + 1164f: 8b 55 f0 mov 0xfffffff0(%ebp),%edx + 11652: 66 8b 45 f6 mov 0xfffffff6(%ebp),%ax + 11656: 25 ff ff 00 00 and $0xffff,%eax + 1165b: c1 e0 02 shl $0x2,%eax + 1165e: 03 42 04 add 0x4(%edx),%eax + 11661: 83 c0 54 add $0x54,%eax + 11664: c7 00 10 00 00 00 movl $0x10,(%eax) + 1166a: eb 07 jmp 11673 <_ohci_hub_control+0x332> + 1166c: c7 45 e4 e0 ff ff ff movl $0xffffffe0,0xffffffe4(%ebp) + 11673: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 11676: 8b 5d fc mov 0xfffffffc(%ebp),%ebx + 11679: c9 leave + 1167a: c3 ret + +0001167b <_hcd_to_bus>: + 1167b: 55 push %ebp + 1167c: 89 e5 mov %esp,%ebp + 1167e: 8b 45 08 mov 0x8(%ebp),%eax + 11681: 5d pop %ebp + 11682: c3 ret + +00011683 <_ohci_hcd_alloc>: + 11683: 55 push %ebp + 11684: 89 e5 mov %esp,%ebp + 11686: 83 ec 08 sub $0x8,%esp + 11689: 83 ec 08 sub $0x8,%esp + 1168c: 68 18 03 00 00 push $0x318 + 11691: 6a 01 push $0x1 + 11693: e8 d8 2e 00 00 call 14570 <_ExAllocatePool@8> + 11698: 83 c4 08 add $0x8,%esp + 1169b: 89 45 fc mov %eax,0xfffffffc(%ebp) + 1169e: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) + 116a2: 74 22 je 116c6 <_ohci_hcd_alloc+0x43> + 116a4: 83 ec 04 sub $0x4,%esp + 116a7: 68 18 03 00 00 push $0x318 + 116ac: 6a 00 push $0x0 + 116ae: ff 75 fc pushl 0xfffffffc(%ebp) + 116b1: e8 ea 2e 00 00 call 145a0 <_memset> + 116b6: 83 c4 10 add $0x10,%esp + 116b9: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 116bc: 05 34 02 00 00 add $0x234,%eax + 116c1: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 116c4: eb 07 jmp 116cd <_ohci_hcd_alloc+0x4a> + 116c6: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 116cd: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 116d0: c9 leave + 116d1: c3 ret + +000116d2 <_ohci_hcd_free>: + 116d2: 55 push %ebp + 116d3: 89 e5 mov %esp,%ebp + 116d5: 83 ec 08 sub $0x8,%esp + 116d8: 8b 45 08 mov 0x8(%ebp),%eax + 116db: 89 45 fc mov %eax,0xfffffffc(%ebp) + 116de: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 116e1: 2d 34 02 00 00 sub $0x234,%eax + 116e6: 83 ec 0c sub $0xc,%esp + 116e9: 50 push %eax + 116ea: e8 91 2e 00 00 call 14580 <_ExFreePool@4> + 116ef: 83 c4 0c add $0xc,%esp + 116f2: c9 leave + 116f3: c3 ret + +000116f4 <_ohci_mem_init>: + 116f4: 55 push %ebp + 116f5: 89 e5 mov %esp,%ebp + 116f7: 83 ec 04 sub $0x4,%esp + 116fa: 8b 45 08 mov 0x8(%ebp),%eax + 116fd: c7 80 9c 00 00 00 01 movl $0x1,0x9c(%eax) + 11704: 00 00 00 + 11707: 8b 45 08 mov 0x8(%ebp),%eax + 1170a: 83 b8 9c 00 00 00 00 cmpl $0x0,0x9c(%eax) + 11711: 75 09 jne 1171c <_ohci_mem_init+0x28> + 11713: c7 45 fc f4 ff ff ff movl $0xfffffff4,0xfffffffc(%ebp) + 1171a: eb 29 jmp 11745 <_ohci_mem_init+0x51> + 1171c: 8b 45 08 mov 0x8(%ebp),%eax + 1171f: c7 80 a0 00 00 00 01 movl $0x1,0xa0(%eax) + 11726: 00 00 00 + 11729: 8b 45 08 mov 0x8(%ebp),%eax + 1172c: 83 b8 a0 00 00 00 00 cmpl $0x0,0xa0(%eax) + 11733: 75 09 jne 1173e <_ohci_mem_init+0x4a> + 11735: c7 45 fc f4 ff ff ff movl $0xfffffff4,0xfffffffc(%ebp) + 1173c: eb 07 jmp 11745 <_ohci_mem_init+0x51> + 1173e: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) + 11745: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 11748: c9 leave + 11749: c3 ret + +0001174a <_ohci_mem_cleanup>: + 1174a: 55 push %ebp + 1174b: 89 e5 mov %esp,%ebp + 1174d: 8b 45 08 mov 0x8(%ebp),%eax + 11750: 83 b8 9c 00 00 00 00 cmpl $0x0,0x9c(%eax) + 11757: 74 0d je 11766 <_ohci_mem_cleanup+0x1c> + 11759: 8b 45 08 mov 0x8(%ebp),%eax + 1175c: c7 80 9c 00 00 00 00 movl $0x0,0x9c(%eax) + 11763: 00 00 00 + 11766: 8b 45 08 mov 0x8(%ebp),%eax + 11769: 83 b8 a0 00 00 00 00 cmpl $0x0,0xa0(%eax) + 11770: 74 0d je 1177f <_ohci_mem_cleanup+0x35> + 11772: 8b 45 08 mov 0x8(%ebp),%eax + 11775: c7 80 a0 00 00 00 00 movl $0x0,0xa0(%eax) + 1177c: 00 00 00 + 1177f: 5d pop %ebp + 11780: c3 ret + +00011781 <_td_alloc>: + 11781: 55 push %ebp + 11782: 89 e5 mov %esp,%ebp + 11784: 83 ec 08 sub $0x8,%esp + 11787: 83 ec 04 sub $0x4,%esp + 1178a: 8d 45 fc lea 0xfffffffc(%ebp),%eax + 1178d: 50 push %eax + 1178e: ff 75 0c pushl 0xc(%ebp) + 11791: 8b 45 08 mov 0x8(%ebp),%eax + 11794: ff b0 9c 00 00 00 pushl 0x9c(%eax) + 1179a: e8 35 00 00 00 call 117d4 <_my_pci_pool_alloc> + 1179f: 83 c4 10 add $0x10,%esp + 117a2: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 117a5: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) + 117a9: 74 24 je 117cf <_td_alloc+0x4e> + 117ab: 83 ec 04 sub $0x4,%esp + 117ae: 6a 40 push $0x40 + 117b0: 6a 00 push $0x0 + 117b2: ff 75 f8 pushl 0xfffffff8(%ebp) + 117b5: e8 e6 2d 00 00 call 145a0 <_memset> + 117ba: 83 c4 10 add $0x10,%esp + 117bd: 8b 55 f8 mov 0xfffffff8(%ebp),%edx + 117c0: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 117c3: 89 42 08 mov %eax,0x8(%edx) + 117c6: 8b 55 f8 mov 0xfffffff8(%ebp),%edx + 117c9: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 117cc: 89 42 24 mov %eax,0x24(%edx) + 117cf: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 117d2: c9 leave + 117d3: c3 ret + +000117d4 <_my_pci_pool_alloc>: + 117d4: 55 push %ebp + 117d5: 89 e5 mov %esp,%ebp + 117d7: 83 ec 08 sub $0x8,%esp + 117da: 83 ec 08 sub $0x8,%esp + 117dd: ff 75 0c pushl 0xc(%ebp) + 117e0: 6a 01 push $0x1 + 117e2: e8 89 2d 00 00 call 14570 <_ExAllocatePool@8> + 117e7: 83 c4 08 add $0x8,%esp + 117ea: 89 45 fc mov %eax,0xfffffffc(%ebp) + 117ed: 8b 55 10 mov 0x10(%ebp),%edx + 117f0: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 117f3: 89 02 mov %eax,(%edx) + 117f5: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 117f8: c9 leave + 117f9: c3 ret + +000117fa <_td_free>: + 117fa: 55 push %ebp + 117fb: 89 e5 mov %esp,%ebp + 117fd: 83 ec 08 sub $0x8,%esp + 11800: 8b 55 0c mov 0xc(%ebp),%edx + 11803: 8b 45 0c mov 0xc(%ebp),%eax + 11806: 8b 40 24 mov 0x24(%eax),%eax + 11809: c1 e8 06 shr $0x6,%eax + 1180c: 33 42 24 xor 0x24(%edx),%eax + 1180f: 83 e0 3f and $0x3f,%eax + 11812: c1 e0 02 shl $0x2,%eax + 11815: 03 45 08 add 0x8(%ebp),%eax + 11818: 05 a4 00 00 00 add $0xa4,%eax + 1181d: 89 45 fc mov %eax,0xfffffffc(%ebp) + 11820: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 11823: 83 38 00 cmpl $0x0,(%eax) + 11826: 74 17 je 1183f <_td_free+0x45> + 11828: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 1182b: 8b 00 mov (%eax),%eax + 1182d: 3b 45 0c cmp 0xc(%ebp),%eax + 11830: 74 0d je 1183f <_td_free+0x45> + 11832: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 11835: 8b 00 mov (%eax),%eax + 11837: 83 c0 18 add $0x18,%eax + 1183a: 89 45 fc mov %eax,0xfffffffc(%ebp) + 1183d: eb e1 jmp 11820 <_td_free+0x26> + 1183f: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 11842: 83 38 00 cmpl $0x0,(%eax) + 11845: 74 0d je 11854 <_td_free+0x5a> + 11847: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 1184a: 8b 55 0c mov 0xc(%ebp),%edx + 1184d: 8b 52 18 mov 0x18(%edx),%edx + 11850: 89 10 mov %edx,(%eax) + 11852: eb 00 jmp 11854 <_td_free+0x5a> + 11854: 83 ec 0c sub $0xc,%esp + 11857: ff 75 0c pushl 0xc(%ebp) + 1185a: e8 21 2d 00 00 call 14580 <_ExFreePool@4> + 1185f: 83 c4 0c add $0xc,%esp + 11862: c9 leave + 11863: c3 ret + +00011864 <_ed_alloc>: + 11864: 55 push %ebp + 11865: 89 e5 mov %esp,%ebp + 11867: 83 ec 08 sub $0x8,%esp + 1186a: 83 ec 04 sub $0x4,%esp + 1186d: 8d 45 fc lea 0xfffffffc(%ebp),%eax + 11870: 50 push %eax + 11871: ff 75 0c pushl 0xc(%ebp) + 11874: 8b 45 08 mov 0x8(%ebp),%eax + 11877: ff b0 a0 00 00 00 pushl 0xa0(%eax) + 1187d: e8 52 ff ff ff call 117d4 <_my_pci_pool_alloc> + 11882: 83 c4 10 add $0x10,%esp + 11885: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 11888: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) + 1188c: 74 38 je 118c6 <_ed_alloc+0x62> + 1188e: 83 ec 04 sub $0x4,%esp + 11891: 6a 40 push $0x40 + 11893: 6a 00 push $0x0 + 11895: ff 75 f8 pushl 0xfffffff8(%ebp) + 11898: e8 03 2d 00 00 call 145a0 <_memset> + 1189d: 83 c4 10 add $0x10,%esp + 118a0: 8b 55 f8 mov 0xfffffff8(%ebp),%edx + 118a3: 83 c2 20 add $0x20,%edx + 118a6: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 118a9: 83 c0 20 add $0x20,%eax + 118ac: 89 02 mov %eax,(%edx) + 118ae: 8b 55 f8 mov 0xfffffff8(%ebp),%edx + 118b1: 83 c2 20 add $0x20,%edx + 118b4: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 118b7: 83 c0 20 add $0x20,%eax + 118ba: 89 42 04 mov %eax,0x4(%edx) + 118bd: 8b 55 f8 mov 0xfffffff8(%ebp),%edx + 118c0: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 118c3: 89 42 10 mov %eax,0x10(%edx) + 118c6: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 118c9: c9 leave + 118ca: c3 ret + +000118cb <_ed_free>: + 118cb: 55 push %ebp + 118cc: 89 e5 mov %esp,%ebp + 118ce: 83 ec 08 sub $0x8,%esp + 118d1: 83 ec 0c sub $0xc,%esp + 118d4: ff 75 0c pushl 0xc(%ebp) + 118d7: e8 a4 2c 00 00 call 14580 <_ExFreePool@4> + 118dc: 83 c4 0c add $0xc,%esp + 118df: c9 leave + 118e0: c3 ret + +000118e1 <_urb_free_priv>: + 118e1: 55 push %ebp + 118e2: 89 e5 mov %esp,%ebp + 118e4: 83 ec 18 sub $0x18,%esp + 118e7: 8b 45 0c mov 0xc(%ebp),%eax + 118ea: 66 8b 40 04 mov 0x4(%eax),%ax + 118ee: 25 ff ff 00 00 and $0xffff,%eax + 118f3: 48 dec %eax + 118f4: 89 45 fc mov %eax,0xfffffffc(%ebp) + 118f7: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) + 118fb: 78 3a js 11937 <_urb_free_priv+0x56> + 118fd: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 11904: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 11907: 3b 45 fc cmp 0xfffffffc(%ebp),%eax + 1190a: 7f 2b jg 11937 <_urb_free_priv+0x56> + 1190c: 8b 45 0c mov 0xc(%ebp),%eax + 1190f: 8b 55 f8 mov 0xfffffff8(%ebp),%edx + 11912: 8b 44 90 0c mov 0xc(%eax,%edx,4),%eax + 11916: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 11919: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) + 1191d: 74 11 je 11930 <_urb_free_priv+0x4f> + 1191f: 83 ec 08 sub $0x8,%esp + 11922: ff 75 f4 pushl 0xfffffff4(%ebp) + 11925: ff 75 08 pushl 0x8(%ebp) + 11928: e8 cd fe ff ff call 117fa <_td_free> + 1192d: 83 c4 10 add $0x10,%esp + 11930: 8d 45 f8 lea 0xfffffff8(%ebp),%eax + 11933: ff 00 incl (%eax) + 11935: eb cd jmp 11904 <_urb_free_priv+0x23> + 11937: 83 ec 0c sub $0xc,%esp + 1193a: ff 75 0c pushl 0xc(%ebp) + 1193d: e8 3e 2c 00 00 call 14580 <_ExFreePool@4> + 11942: 83 c4 0c add $0xc,%esp + 11945: c9 leave + 11946: c3 ret + +00011947 <_finish_urb>: + 11947: 55 push %ebp + 11948: 89 e5 mov %esp,%ebp + 1194a: 83 ec 08 sub $0x8,%esp + 1194d: 83 ec 08 sub $0x8,%esp + 11950: 8b 45 0c mov 0xc(%ebp),%eax + 11953: ff 70 08 pushl 0x8(%eax) + 11956: ff 75 08 pushl 0x8(%ebp) + 11959: e8 83 ff ff ff call 118e1 <_urb_free_priv> + 1195e: 83 c4 10 add $0x10,%esp + 11961: 8b 45 0c mov 0xc(%ebp),%eax + 11964: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) + 1196b: 8b 45 0c mov 0xc(%ebp),%eax + 1196e: c7 00 01 00 00 00 movl $0x1,(%eax) + 11974: 8b 45 0c mov 0xc(%ebp),%eax + 11977: 83 78 1c 8d cmpl $0xffffff8d,0x1c(%eax) + 1197b: 75 0a jne 11987 <_finish_urb+0x40> + 1197d: 8b 45 0c mov 0xc(%ebp),%eax + 11980: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) + 11987: 8b 45 0c mov 0xc(%ebp),%eax + 1198a: 8b 40 18 mov 0x18(%eax),%eax + 1198d: c1 e8 1e shr $0x1e,%eax + 11990: 83 e0 03 and $0x3,%eax + 11993: 89 45 fc mov %eax,0xfffffffc(%ebp) + 11996: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) + 1199a: 74 08 je 119a4 <_finish_urb+0x5d> + 1199c: 83 7d fc 01 cmpl $0x1,0xfffffffc(%ebp) + 119a0: 74 18 je 119ba <_finish_urb+0x73> + 119a2: eb 2a jmp 119ce <_finish_urb+0x87> + 119a4: 8b 45 08 mov 0x8(%ebp),%eax + 119a7: 05 34 02 00 00 add $0x234,%eax + 119ac: 50 push %eax + 119ad: e8 c9 fc ff ff call 1167b <_hcd_to_bus> + 119b2: 83 c4 04 add $0x4,%esp + 119b5: ff 48 3c decl 0x3c(%eax) + 119b8: eb 14 jmp 119ce <_finish_urb+0x87> + 119ba: 8b 45 08 mov 0x8(%ebp),%eax + 119bd: 05 34 02 00 00 add $0x234,%eax + 119c2: 50 push %eax + 119c3: e8 b3 fc ff ff call 1167b <_hcd_to_bus> + 119c8: 83 c4 04 add $0x4,%esp + 119cb: ff 48 38 decl 0x38(%eax) + 119ce: 83 ec 04 sub $0x4,%esp + 119d1: ff 75 10 pushl 0x10(%ebp) + 119d4: ff 75 0c pushl 0xc(%ebp) + 119d7: 8b 45 08 mov 0x8(%ebp),%eax + 119da: 05 34 02 00 00 add $0x234,%eax + 119df: 50 push %eax + 119e0: e8 db 2b 00 00 call 145c0 <_usb_hcd_giveback_urb@12> + 119e5: 83 c4 04 add $0x4,%esp + 119e8: c9 leave + 119e9: c3 ret + +000119ea <_balance>: + 119ea: 55 push %ebp + 119eb: 89 e5 mov %esp,%ebp + 119ed: 53 push %ebx + 119ee: 83 ec 0c sub $0xc,%esp + 119f1: c7 45 f4 e4 ff ff ff movl $0xffffffe4,0xfffffff4(%ebp) + 119f8: 83 7d 0c 20 cmpl $0x20,0xc(%ebp) + 119fc: 7e 07 jle 11a05 <_balance+0x1b> + 119fe: c7 45 0c 20 00 00 00 movl $0x20,0xc(%ebp) + 11a05: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 11a0c: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 11a0f: 3b 45 0c cmp 0xc(%ebp),%eax + 11a12: 7d 68 jge 11a7c <_balance+0x92> + 11a14: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) + 11a18: 78 1e js 11a38 <_balance+0x4e> + 11a1a: 8b 5d 08 mov 0x8(%ebp),%ebx + 11a1d: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 11a20: 8b 4d 08 mov 0x8(%ebp),%ecx + 11a23: 8b 55 f8 mov 0xfffffff8(%ebp),%edx + 11a26: 8b 84 83 ac 01 00 00 mov 0x1ac(%ebx,%eax,4),%eax + 11a2d: 3b 84 91 ac 01 00 00 cmp 0x1ac(%ecx,%edx,4),%eax + 11a34: 7f 02 jg 11a38 <_balance+0x4e> + 11a36: eb 3d jmp 11a75 <_balance+0x8b> + 11a38: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 11a3b: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 11a3e: 83 7d f0 1f cmpl $0x1f,0xfffffff0(%ebp) + 11a42: 7f 23 jg 11a67 <_balance+0x7d> + 11a44: 8b 4d 08 mov 0x8(%ebp),%ecx + 11a47: 8b 55 f0 mov 0xfffffff0(%ebp),%edx + 11a4a: 8b 45 10 mov 0x10(%ebp),%eax + 11a4d: 03 84 91 ac 01 00 00 add 0x1ac(%ecx,%edx,4),%eax + 11a54: 3d 84 03 00 00 cmp $0x384,%eax + 11a59: 7e 02 jle 11a5d <_balance+0x73> + 11a5b: eb 0a jmp 11a67 <_balance+0x7d> + 11a5d: 8b 55 0c mov 0xc(%ebp),%edx + 11a60: 8d 45 f0 lea 0xfffffff0(%ebp),%eax + 11a63: 01 10 add %edx,(%eax) + 11a65: eb d7 jmp 11a3e <_balance+0x54> + 11a67: 83 7d f0 1f cmpl $0x1f,0xfffffff0(%ebp) + 11a6b: 7f 02 jg 11a6f <_balance+0x85> + 11a6d: eb 06 jmp 11a75 <_balance+0x8b> + 11a6f: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 11a72: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 11a75: 8d 45 f8 lea 0xfffffff8(%ebp),%eax + 11a78: ff 00 incl (%eax) + 11a7a: eb 90 jmp 11a0c <_balance+0x22> + 11a7c: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 11a7f: 83 c4 0c add $0xc,%esp + 11a82: 5b pop %ebx + 11a83: 5d pop %ebp + 11a84: c3 ret + +00011a85 <_periodic_link>: + 11a85: 55 push %ebp + 11a86: 89 e5 mov %esp,%ebp + 11a88: 56 push %esi + 11a89: 53 push %ebx + 11a8a: 83 ec 10 sub $0x10,%esp + 11a8d: 8b 45 0c mov 0xc(%ebp),%eax + 11a90: 8a 40 2a mov 0x2a(%eax),%al + 11a93: 25 ff 00 00 00 and $0xff,%eax + 11a98: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 11a9b: 83 7d f4 1f cmpl $0x1f,0xfffffff4(%ebp) + 11a9f: 0f 87 d8 00 00 00 ja 11b7d <_periodic_link+0xf8> + 11aa5: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 11aa8: c1 e0 02 shl $0x2,%eax + 11aab: 03 45 08 add 0x8(%ebp),%eax + 11aae: 83 c0 1c add $0x1c,%eax + 11ab1: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 11ab4: 8b 55 08 mov 0x8(%ebp),%edx + 11ab7: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 11aba: c1 e0 02 shl $0x2,%eax + 11abd: 03 42 08 add 0x8(%edx),%eax + 11ac0: 89 45 ec mov %eax,0xffffffec(%ebp) + 11ac3: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 11ac6: 8b 00 mov (%eax),%eax + 11ac8: 89 45 e8 mov %eax,0xffffffe8(%ebp) + 11acb: 83 7d e8 00 cmpl $0x0,0xffffffe8(%ebp) + 11acf: 74 36 je 11b07 <_periodic_link+0x82> + 11ad1: 8b 45 0c mov 0xc(%ebp),%eax + 11ad4: 3b 45 e8 cmp 0xffffffe8(%ebp),%eax + 11ad7: 74 2e je 11b07 <_periodic_link+0x82> + 11ad9: 8b 45 0c mov 0xc(%ebp),%eax + 11adc: 8b 55 e8 mov 0xffffffe8(%ebp),%edx + 11adf: 66 8b 40 2c mov 0x2c(%eax),%ax + 11ae3: 66 3b 42 2c cmp 0x2c(%edx),%ax + 11ae7: 76 02 jbe 11aeb <_periodic_link+0x66> + 11ae9: eb 1c jmp 11b07 <_periodic_link+0x82> + 11aeb: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 11aee: 83 c0 18 add $0x18,%eax + 11af1: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 11af4: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 11af7: 83 c0 0c add $0xc,%eax + 11afa: 89 45 ec mov %eax,0xffffffec(%ebp) + 11afd: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 11b00: 8b 00 mov (%eax),%eax + 11b02: 89 45 e8 mov %eax,0xffffffe8(%ebp) + 11b05: eb c4 jmp 11acb <_periodic_link+0x46> + 11b07: 8b 45 0c mov 0xc(%ebp),%eax + 11b0a: 3b 45 e8 cmp 0xffffffe8(%ebp),%eax + 11b0d: 74 2f je 11b3e <_periodic_link+0xb9> + 11b0f: 8b 55 0c mov 0xc(%ebp),%edx + 11b12: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 11b15: 89 42 18 mov %eax,0x18(%edx) + 11b18: 83 7d e8 00 cmpl $0x0,0xffffffe8(%ebp) + 11b1c: 74 0b je 11b29 <_periodic_link+0xa4> + 11b1e: 8b 45 0c mov 0xc(%ebp),%eax + 11b21: 8b 55 ec mov 0xffffffec(%ebp),%edx + 11b24: 8b 12 mov (%edx),%edx + 11b26: 89 50 0c mov %edx,0xc(%eax) + 11b29: 8b 55 f0 mov 0xfffffff0(%ebp),%edx + 11b2c: 8b 45 0c mov 0xc(%ebp),%eax + 11b2f: 89 02 mov %eax,(%edx) + 11b31: 8b 55 ec mov 0xffffffec(%ebp),%edx + 11b34: 8b 45 0c mov 0xc(%ebp),%eax + 11b37: 83 c0 10 add $0x10,%eax + 11b3a: 8b 00 mov (%eax),%eax + 11b3c: 89 02 mov %eax,(%edx) + 11b3e: 8b 5d 08 mov 0x8(%ebp),%ebx + 11b41: 8b 75 f4 mov 0xfffffff4(%ebp),%esi + 11b44: 8b 55 08 mov 0x8(%ebp),%edx + 11b47: 8b 4d f4 mov 0xfffffff4(%ebp),%ecx + 11b4a: 8b 45 0c mov 0xc(%ebp),%eax + 11b4d: 66 8b 40 2e mov 0x2e(%eax),%ax + 11b51: 25 ff ff 00 00 and $0xffff,%eax + 11b56: 03 84 8a ac 01 00 00 add 0x1ac(%edx,%ecx,4),%eax + 11b5d: 89 84 b3 ac 01 00 00 mov %eax,0x1ac(%ebx,%esi,4) + 11b64: 8b 45 0c mov 0xc(%ebp),%eax + 11b67: 66 8b 40 2c mov 0x2c(%eax),%ax + 11b6b: 89 c2 mov %eax,%edx + 11b6d: 81 e2 ff ff 00 00 and $0xffff,%edx + 11b73: 8d 45 f4 lea 0xfffffff4(%ebp),%eax + 11b76: 01 10 add %edx,(%eax) + 11b78: e9 1e ff ff ff jmp 11a9b <_periodic_link+0x16> + 11b7d: 8b 45 08 mov 0x8(%ebp),%eax + 11b80: 05 34 02 00 00 add $0x234,%eax + 11b85: 50 push %eax + 11b86: e8 f0 fa ff ff call 1167b <_hcd_to_bus> + 11b8b: 83 c4 04 add $0x4,%esp + 11b8e: 89 c3 mov %eax,%ebx + 11b90: 8b 45 0c mov 0xc(%ebp),%eax + 11b93: 8b 4d 0c mov 0xc(%ebp),%ecx + 11b96: 66 8b 40 2e mov 0x2e(%eax),%ax + 11b9a: ba 00 00 00 00 mov $0x0,%edx + 11b9f: 66 f7 71 2c divw 0x2c(%ecx) + 11ba3: 25 ff ff 00 00 and $0xffff,%eax + 11ba8: 01 43 34 add %eax,0x34(%ebx) + 11bab: 8d 65 f8 lea 0xfffffff8(%ebp),%esp + 11bae: 5b pop %ebx + 11baf: 5e pop %esi + 11bb0: 5d pop %ebp + 11bb1: c3 ret + +00011bb2 <_ed_schedule>: + 11bb2: 55 push %ebp + 11bb3: 89 e5 mov %esp,%ebp + 11bb5: 83 ec 0c sub $0xc,%esp + 11bb8: 8b 45 0c mov 0xc(%ebp),%eax + 11bbb: c6 40 28 02 movb $0x2,0x28(%eax) + 11bbf: 8b 45 0c mov 0xc(%ebp),%eax + 11bc2: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) + 11bc9: 8b 45 0c mov 0xc(%ebp),%eax + 11bcc: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) + 11bd3: 8b 45 0c mov 0xc(%ebp),%eax + 11bd6: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) + 11bdd: 8b 45 0c mov 0xc(%ebp),%eax + 11be0: ba 00 00 00 00 mov $0x0,%edx + 11be5: 8a 50 29 mov 0x29(%eax),%dl + 11be8: 89 55 f4 mov %edx,0xfffffff4(%ebp) + 11beb: 83 7d f4 02 cmpl $0x2,0xfffffff4(%ebp) + 11bef: 74 0f je 11c00 <_ed_schedule+0x4e> + 11bf1: 83 7d f4 03 cmpl $0x3,0xfffffff4(%ebp) + 11bf5: 0f 84 a0 00 00 00 je 11c9b <_ed_schedule+0xe9> + 11bfb: e9 33 01 00 00 jmp 11d33 <_ed_schedule+0x181> + 11c00: 8b 45 08 mov 0x8(%ebp),%eax + 11c03: 83 78 18 00 cmpl $0x0,0x18(%eax) + 11c07: 75 13 jne 11c1c <_ed_schedule+0x6a> + 11c09: 8b 45 08 mov 0x8(%ebp),%eax + 11c0c: 8b 50 04 mov 0x4(%eax),%edx + 11c0f: 83 c2 20 add $0x20,%edx + 11c12: 8b 45 0c mov 0xc(%ebp),%eax + 11c15: 8b 40 10 mov 0x10(%eax),%eax + 11c18: 89 02 mov %eax,(%edx) + 11c1a: eb 1b jmp 11c37 <_ed_schedule+0x85> + 11c1c: 8b 45 08 mov 0x8(%ebp),%eax + 11c1f: 8b 50 18 mov 0x18(%eax),%edx + 11c22: 8b 45 0c mov 0xc(%ebp),%eax + 11c25: 89 42 18 mov %eax,0x18(%edx) + 11c28: 8b 45 08 mov 0x8(%ebp),%eax + 11c2b: 8b 50 18 mov 0x18(%eax),%edx + 11c2e: 8b 45 0c mov 0xc(%ebp),%eax + 11c31: 8b 40 10 mov 0x10(%eax),%eax + 11c34: 89 42 0c mov %eax,0xc(%edx) + 11c37: 8b 55 0c mov 0xc(%ebp),%edx + 11c3a: 8b 45 08 mov 0x8(%ebp),%eax + 11c3d: 8b 40 18 mov 0x18(%eax),%eax + 11c40: 89 42 1c mov %eax,0x1c(%edx) + 11c43: 8b 45 08 mov 0x8(%ebp),%eax + 11c46: 83 78 18 00 cmpl $0x0,0x18(%eax) + 11c4a: 75 41 jne 11c8d <_ed_schedule+0xdb> + 11c4c: 8b 45 08 mov 0x8(%ebp),%eax + 11c4f: 83 78 10 00 cmpl $0x0,0x10(%eax) + 11c53: 75 38 jne 11c8d <_ed_schedule+0xdb> + 11c55: 8b 55 08 mov 0x8(%ebp),%edx + 11c58: 8b 45 08 mov 0x8(%ebp),%eax + 11c5b: 8b 80 2c 02 00 00 mov 0x22c(%eax),%eax + 11c61: 83 c8 10 or $0x10,%eax + 11c64: 89 82 2c 02 00 00 mov %eax,0x22c(%edx) + 11c6a: 8b 45 08 mov 0x8(%ebp),%eax + 11c6d: 8b 40 04 mov 0x4(%eax),%eax + 11c70: 83 c0 24 add $0x24,%eax + 11c73: c7 00 00 00 00 00 movl $0x0,(%eax) + 11c79: 8b 45 08 mov 0x8(%ebp),%eax + 11c7c: 8b 50 04 mov 0x4(%eax),%edx + 11c7f: 83 c2 04 add $0x4,%edx + 11c82: 8b 45 08 mov 0x8(%ebp),%eax + 11c85: 8b 80 2c 02 00 00 mov 0x22c(%eax),%eax + 11c8b: 89 02 mov %eax,(%edx) + 11c8d: 8b 55 08 mov 0x8(%ebp),%edx + 11c90: 8b 45 0c mov 0xc(%ebp),%eax + 11c93: 89 42 18 mov %eax,0x18(%edx) + 11c96: e9 e5 00 00 00 jmp 11d80 <_ed_schedule+0x1ce> + 11c9b: 8b 45 08 mov 0x8(%ebp),%eax + 11c9e: 83 78 14 00 cmpl $0x0,0x14(%eax) + 11ca2: 75 13 jne 11cb7 <_ed_schedule+0x105> + 11ca4: 8b 45 08 mov 0x8(%ebp),%eax + 11ca7: 8b 50 04 mov 0x4(%eax),%edx + 11caa: 83 c2 28 add $0x28,%edx + 11cad: 8b 45 0c mov 0xc(%ebp),%eax + 11cb0: 8b 40 10 mov 0x10(%eax),%eax + 11cb3: 89 02 mov %eax,(%edx) + 11cb5: eb 1b jmp 11cd2 <_ed_schedule+0x120> + 11cb7: 8b 45 08 mov 0x8(%ebp),%eax + 11cba: 8b 50 14 mov 0x14(%eax),%edx + 11cbd: 8b 45 0c mov 0xc(%ebp),%eax + 11cc0: 89 42 18 mov %eax,0x18(%edx) + 11cc3: 8b 45 08 mov 0x8(%ebp),%eax + 11cc6: 8b 50 14 mov 0x14(%eax),%edx + 11cc9: 8b 45 0c mov 0xc(%ebp),%eax + 11ccc: 8b 40 10 mov 0x10(%eax),%eax + 11ccf: 89 42 0c mov %eax,0xc(%edx) + 11cd2: 8b 55 0c mov 0xc(%ebp),%edx + 11cd5: 8b 45 08 mov 0x8(%ebp),%eax + 11cd8: 8b 40 14 mov 0x14(%eax),%eax + 11cdb: 89 42 1c mov %eax,0x1c(%edx) + 11cde: 8b 45 08 mov 0x8(%ebp),%eax + 11ce1: 83 78 14 00 cmpl $0x0,0x14(%eax) + 11ce5: 75 41 jne 11d28 <_ed_schedule+0x176> + 11ce7: 8b 45 08 mov 0x8(%ebp),%eax + 11cea: 83 78 10 00 cmpl $0x0,0x10(%eax) + 11cee: 75 38 jne 11d28 <_ed_schedule+0x176> + 11cf0: 8b 55 08 mov 0x8(%ebp),%edx + 11cf3: 8b 45 08 mov 0x8(%ebp),%eax + 11cf6: 8b 80 2c 02 00 00 mov 0x22c(%eax),%eax + 11cfc: 83 c8 20 or $0x20,%eax + 11cff: 89 82 2c 02 00 00 mov %eax,0x22c(%edx) + 11d05: 8b 45 08 mov 0x8(%ebp),%eax + 11d08: 8b 40 04 mov 0x4(%eax),%eax + 11d0b: 83 c0 2c add $0x2c,%eax + 11d0e: c7 00 00 00 00 00 movl $0x0,(%eax) + 11d14: 8b 45 08 mov 0x8(%ebp),%eax + 11d17: 8b 50 04 mov 0x4(%eax),%edx + 11d1a: 83 c2 04 add $0x4,%edx + 11d1d: 8b 45 08 mov 0x8(%ebp),%eax + 11d20: 8b 80 2c 02 00 00 mov 0x22c(%eax),%eax + 11d26: 89 02 mov %eax,(%edx) + 11d28: 8b 55 08 mov 0x8(%ebp),%edx + 11d2b: 8b 45 0c mov 0xc(%ebp),%eax + 11d2e: 89 42 14 mov %eax,0x14(%edx) + 11d31: eb 4d jmp 11d80 <_ed_schedule+0x1ce> + 11d33: 8b 45 0c mov 0xc(%ebp),%eax + 11d36: 66 8b 40 2e mov 0x2e(%eax),%ax + 11d3a: 25 ff ff 00 00 and $0xffff,%eax + 11d3f: 50 push %eax + 11d40: 8b 45 0c mov 0xc(%ebp),%eax + 11d43: 66 8b 40 2c mov 0x2c(%eax),%ax + 11d47: 25 ff ff 00 00 and $0xffff,%eax + 11d4c: 50 push %eax + 11d4d: ff 75 08 pushl 0x8(%ebp) + 11d50: e8 95 fc ff ff call 119ea <_balance> + 11d55: 83 c4 0c add $0xc,%esp + 11d58: 89 45 fc mov %eax,0xfffffffc(%ebp) + 11d5b: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) + 11d5f: 79 08 jns 11d69 <_ed_schedule+0x1b7> + 11d61: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 11d64: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 11d67: eb 1e jmp 11d87 <_ed_schedule+0x1d5> + 11d69: 8b 55 0c mov 0xc(%ebp),%edx + 11d6c: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 11d6f: 88 42 2a mov %al,0x2a(%edx) + 11d72: ff 75 0c pushl 0xc(%ebp) + 11d75: ff 75 08 pushl 0x8(%ebp) + 11d78: e8 08 fd ff ff call 11a85 <_periodic_link> + 11d7d: 83 c4 08 add $0x8,%esp + 11d80: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 11d87: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 11d8a: c9 leave + 11d8b: c3 ret + +00011d8c <_periodic_unlink>: + 11d8c: 55 push %ebp + 11d8d: 89 e5 mov %esp,%ebp + 11d8f: 57 push %edi + 11d90: 56 push %esi + 11d91: 53 push %ebx + 11d92: 83 ec 10 sub $0x10,%esp + 11d95: 8b 45 0c mov 0xc(%ebp),%eax + 11d98: 8a 40 2a mov 0x2a(%eax),%al + 11d9b: 25 ff 00 00 00 and $0xff,%eax + 11da0: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 11da3: 83 7d f0 1f cmpl $0x1f,0xfffffff0(%ebp) + 11da7: 0f 8f a9 00 00 00 jg 11e56 <_periodic_unlink+0xca> + 11dad: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 11db0: c1 e0 02 shl $0x2,%eax + 11db3: 03 45 08 add 0x8(%ebp),%eax + 11db6: 83 c0 1c add $0x1c,%eax + 11db9: 89 45 e8 mov %eax,0xffffffe8(%ebp) + 11dbc: 8b 55 08 mov 0x8(%ebp),%edx + 11dbf: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 11dc2: c1 e0 02 shl $0x2,%eax + 11dc5: 03 42 08 add 0x8(%edx),%eax + 11dc8: 89 45 e4 mov %eax,0xffffffe4(%ebp) + 11dcb: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 11dce: 83 38 00 cmpl $0x0,(%eax) + 11dd1: 74 21 je 11df4 <_periodic_unlink+0x68> + 11dd3: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 11dd6: 8b 00 mov (%eax),%eax + 11dd8: 89 45 ec mov %eax,0xffffffec(%ebp) + 11ddb: 3b 45 0c cmp 0xc(%ebp),%eax + 11dde: 74 14 je 11df4 <_periodic_unlink+0x68> + 11de0: 8b 45 ec mov 0xffffffec(%ebp),%eax + 11de3: 83 c0 0c add $0xc,%eax + 11de6: 89 45 e4 mov %eax,0xffffffe4(%ebp) + 11de9: 8b 45 ec mov 0xffffffec(%ebp),%eax + 11dec: 83 c0 18 add $0x18,%eax + 11def: 89 45 e8 mov %eax,0xffffffe8(%ebp) + 11df2: eb d7 jmp 11dcb <_periodic_unlink+0x3f> + 11df4: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 11df7: 83 38 00 cmpl $0x0,(%eax) + 11dfa: 74 16 je 11e12 <_periodic_unlink+0x86> + 11dfc: 8b 55 e4 mov 0xffffffe4(%ebp),%edx + 11dff: 8b 45 0c mov 0xc(%ebp),%eax + 11e02: 8b 40 0c mov 0xc(%eax),%eax + 11e05: 89 02 mov %eax,(%edx) + 11e07: 8b 55 e8 mov 0xffffffe8(%ebp),%edx + 11e0a: 8b 45 0c mov 0xc(%ebp),%eax + 11e0d: 8b 40 18 mov 0x18(%eax),%eax + 11e10: 89 02 mov %eax,(%edx) + 11e12: 8b 75 08 mov 0x8(%ebp),%esi + 11e15: 8b 7d f0 mov 0xfffffff0(%ebp),%edi + 11e18: 8b 4d 08 mov 0x8(%ebp),%ecx + 11e1b: 8b 5d f0 mov 0xfffffff0(%ebp),%ebx + 11e1e: 8b 45 0c mov 0xc(%ebp),%eax + 11e21: 66 8b 40 2e mov 0x2e(%eax),%ax + 11e25: 89 c2 mov %eax,%edx + 11e27: 81 e2 ff ff 00 00 and $0xffff,%edx + 11e2d: 8b 84 99 ac 01 00 00 mov 0x1ac(%ecx,%ebx,4),%eax + 11e34: 29 d0 sub %edx,%eax + 11e36: 89 84 be ac 01 00 00 mov %eax,0x1ac(%esi,%edi,4) + 11e3d: 8b 45 0c mov 0xc(%ebp),%eax + 11e40: 66 8b 40 2c mov 0x2c(%eax),%ax + 11e44: 89 c2 mov %eax,%edx + 11e46: 81 e2 ff ff 00 00 and $0xffff,%edx + 11e4c: 8d 45 f0 lea 0xfffffff0(%ebp),%eax + 11e4f: 01 10 add %edx,(%eax) + 11e51: e9 4d ff ff ff jmp 11da3 <_periodic_unlink+0x17> + 11e56: 8b 45 08 mov 0x8(%ebp),%eax + 11e59: 05 34 02 00 00 add $0x234,%eax + 11e5e: 50 push %eax + 11e5f: e8 17 f8 ff ff call 1167b <_hcd_to_bus> + 11e64: 83 c4 04 add $0x4,%esp + 11e67: 89 c3 mov %eax,%ebx + 11e69: 8b 45 0c mov 0xc(%ebp),%eax + 11e6c: 8b 4d 0c mov 0xc(%ebp),%ecx + 11e6f: 66 8b 40 2e mov 0x2e(%eax),%ax + 11e73: ba 00 00 00 00 mov $0x0,%edx + 11e78: 66 f7 71 2c divw 0x2c(%ecx) + 11e7c: 25 ff ff 00 00 and $0xffff,%eax + 11e81: 29 43 34 sub %eax,0x34(%ebx) + 11e84: 8d 65 f4 lea 0xfffffff4(%ebp),%esp + 11e87: 5b pop %ebx + 11e88: 5e pop %esi + 11e89: 5f pop %edi + 11e8a: 5d pop %ebp + 11e8b: c3 ret + +00011e8c <_ed_deschedule>: + 11e8c: 55 push %ebp + 11e8d: 89 e5 mov %esp,%ebp + 11e8f: 83 ec 04 sub $0x4,%esp + 11e92: 8b 55 0c mov 0xc(%ebp),%edx + 11e95: 8b 45 0c mov 0xc(%ebp),%eax + 11e98: 8b 00 mov (%eax),%eax + 11e9a: 80 cc 40 or $0x40,%ah + 11e9d: 89 02 mov %eax,(%edx) + 11e9f: 8b 45 0c mov 0xc(%ebp),%eax + 11ea2: ba 00 00 00 00 mov $0x0,%edx + 11ea7: 8a 50 29 mov 0x29(%eax),%dl + 11eaa: 89 55 fc mov %edx,0xfffffffc(%ebp) + 11ead: 83 7d fc 02 cmpl $0x2,0xfffffffc(%ebp) + 11eb1: 74 0f je 11ec2 <_ed_deschedule+0x36> + 11eb3: 83 7d fc 03 cmpl $0x3,0xfffffffc(%ebp) + 11eb7: 0f 84 e4 00 00 00 je 11fa1 <_ed_deschedule+0x115> + 11ebd: e9 b0 01 00 00 jmp 12072 <_ed_deschedule+0x1e6> + 11ec2: 8b 45 0c mov 0xc(%ebp),%eax + 11ec5: 83 78 1c 00 cmpl $0x0,0x1c(%eax) + 11ec9: 75 61 jne 11f2c <_ed_deschedule+0xa0> + 11ecb: 8b 45 0c mov 0xc(%ebp),%eax + 11ece: 83 78 0c 00 cmpl $0x0,0xc(%eax) + 11ed2: 75 43 jne 11f17 <_ed_deschedule+0x8b> + 11ed4: 8b 55 08 mov 0x8(%ebp),%edx + 11ed7: 8b 45 08 mov 0x8(%ebp),%eax + 11eda: 8b 80 2c 02 00 00 mov 0x22c(%eax),%eax + 11ee0: 83 e0 ef and $0xffffffef,%eax + 11ee3: 89 82 2c 02 00 00 mov %eax,0x22c(%edx) + 11ee9: 8b 45 08 mov 0x8(%ebp),%eax + 11eec: 8b 50 04 mov 0x4(%eax),%edx + 11eef: 83 c2 04 add $0x4,%edx + 11ef2: 8b 45 08 mov 0x8(%ebp),%eax + 11ef5: 8b 80 2c 02 00 00 mov 0x22c(%eax),%eax + 11efb: 89 02 mov %eax,(%edx) + 11efd: 8b 45 08 mov 0x8(%ebp),%eax + 11f00: 8b 40 04 mov 0x4(%eax),%eax + 11f03: 83 c0 24 add $0x24,%eax + 11f06: c7 00 00 00 00 00 movl $0x0,(%eax) + 11f0c: 8b 45 08 mov 0x8(%ebp),%eax + 11f0f: 8b 40 04 mov 0x4(%eax),%eax + 11f12: 83 c0 04 add $0x4,%eax + 11f15: 8b 00 mov (%eax),%eax + 11f17: 8b 45 08 mov 0x8(%ebp),%eax + 11f1a: 8b 50 04 mov 0x4(%eax),%edx + 11f1d: 83 c2 20 add $0x20,%edx + 11f20: 8b 45 0c mov 0xc(%ebp),%eax + 11f23: 83 c0 0c add $0xc,%eax + 11f26: 8b 00 mov (%eax),%eax + 11f28: 89 02 mov %eax,(%edx) + 11f2a: eb 1e jmp 11f4a <_ed_deschedule+0xbe> + 11f2c: 8b 45 0c mov 0xc(%ebp),%eax + 11f2f: 8b 50 1c mov 0x1c(%eax),%edx + 11f32: 8b 45 0c mov 0xc(%ebp),%eax + 11f35: 8b 40 18 mov 0x18(%eax),%eax + 11f38: 89 42 18 mov %eax,0x18(%edx) + 11f3b: 8b 45 0c mov 0xc(%ebp),%eax + 11f3e: 8b 50 1c mov 0x1c(%eax),%edx + 11f41: 8b 45 0c mov 0xc(%ebp),%eax + 11f44: 8b 40 0c mov 0xc(%eax),%eax + 11f47: 89 42 0c mov %eax,0xc(%edx) + 11f4a: 8b 45 08 mov 0x8(%ebp),%eax + 11f4d: 8b 40 18 mov 0x18(%eax),%eax + 11f50: 3b 45 0c cmp 0xc(%ebp),%eax + 11f53: 75 2b jne 11f80 <_ed_deschedule+0xf4> + 11f55: 8b 55 08 mov 0x8(%ebp),%edx + 11f58: 8b 45 0c mov 0xc(%ebp),%eax + 11f5b: 8b 40 1c mov 0x1c(%eax),%eax + 11f5e: 89 42 18 mov %eax,0x18(%edx) + 11f61: 8b 45 08 mov 0x8(%ebp),%eax + 11f64: 83 78 18 00 cmpl $0x0,0x18(%eax) + 11f68: 0f 84 12 01 00 00 je 12080 <_ed_deschedule+0x1f4> + 11f6e: 8b 45 08 mov 0x8(%ebp),%eax + 11f71: 8b 40 18 mov 0x18(%eax),%eax + 11f74: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) + 11f7b: e9 00 01 00 00 jmp 12080 <_ed_deschedule+0x1f4> + 11f80: 8b 45 0c mov 0xc(%ebp),%eax + 11f83: 83 78 18 00 cmpl $0x0,0x18(%eax) + 11f87: 0f 84 f3 00 00 00 je 12080 <_ed_deschedule+0x1f4> + 11f8d: 8b 45 0c mov 0xc(%ebp),%eax + 11f90: 8b 50 18 mov 0x18(%eax),%edx + 11f93: 8b 45 0c mov 0xc(%ebp),%eax + 11f96: 8b 40 1c mov 0x1c(%eax),%eax + 11f99: 89 42 1c mov %eax,0x1c(%edx) + 11f9c: e9 df 00 00 00 jmp 12080 <_ed_deschedule+0x1f4> + 11fa1: 8b 45 0c mov 0xc(%ebp),%eax + 11fa4: 83 78 1c 00 cmpl $0x0,0x1c(%eax) + 11fa8: 75 61 jne 1200b <_ed_deschedule+0x17f> + 11faa: 8b 45 0c mov 0xc(%ebp),%eax + 11fad: 83 78 0c 00 cmpl $0x0,0xc(%eax) + 11fb1: 75 43 jne 11ff6 <_ed_deschedule+0x16a> + 11fb3: 8b 55 08 mov 0x8(%ebp),%edx + 11fb6: 8b 45 08 mov 0x8(%ebp),%eax + 11fb9: 8b 80 2c 02 00 00 mov 0x22c(%eax),%eax + 11fbf: 83 e0 df and $0xffffffdf,%eax + 11fc2: 89 82 2c 02 00 00 mov %eax,0x22c(%edx) + 11fc8: 8b 45 08 mov 0x8(%ebp),%eax + 11fcb: 8b 50 04 mov 0x4(%eax),%edx + 11fce: 83 c2 04 add $0x4,%edx + 11fd1: 8b 45 08 mov 0x8(%ebp),%eax + 11fd4: 8b 80 2c 02 00 00 mov 0x22c(%eax),%eax + 11fda: 89 02 mov %eax,(%edx) + 11fdc: 8b 45 08 mov 0x8(%ebp),%eax + 11fdf: 8b 40 04 mov 0x4(%eax),%eax + 11fe2: 83 c0 2c add $0x2c,%eax + 11fe5: c7 00 00 00 00 00 movl $0x0,(%eax) + 11feb: 8b 45 08 mov 0x8(%ebp),%eax + 11fee: 8b 40 04 mov 0x4(%eax),%eax + 11ff1: 83 c0 04 add $0x4,%eax + 11ff4: 8b 00 mov (%eax),%eax + 11ff6: 8b 45 08 mov 0x8(%ebp),%eax + 11ff9: 8b 50 04 mov 0x4(%eax),%edx + 11ffc: 83 c2 28 add $0x28,%edx + 11fff: 8b 45 0c mov 0xc(%ebp),%eax + 12002: 83 c0 0c add $0xc,%eax + 12005: 8b 00 mov (%eax),%eax + 12007: 89 02 mov %eax,(%edx) + 12009: eb 1e jmp 12029 <_ed_deschedule+0x19d> + 1200b: 8b 45 0c mov 0xc(%ebp),%eax + 1200e: 8b 50 1c mov 0x1c(%eax),%edx + 12011: 8b 45 0c mov 0xc(%ebp),%eax + 12014: 8b 40 18 mov 0x18(%eax),%eax + 12017: 89 42 18 mov %eax,0x18(%edx) + 1201a: 8b 45 0c mov 0xc(%ebp),%eax + 1201d: 8b 50 1c mov 0x1c(%eax),%edx + 12020: 8b 45 0c mov 0xc(%ebp),%eax + 12023: 8b 40 0c mov 0xc(%eax),%eax + 12026: 89 42 0c mov %eax,0xc(%edx) + 12029: 8b 45 08 mov 0x8(%ebp),%eax + 1202c: 8b 40 14 mov 0x14(%eax),%eax + 1202f: 3b 45 0c cmp 0xc(%ebp),%eax + 12032: 75 24 jne 12058 <_ed_deschedule+0x1cc> + 12034: 8b 55 08 mov 0x8(%ebp),%edx + 12037: 8b 45 0c mov 0xc(%ebp),%eax + 1203a: 8b 40 1c mov 0x1c(%eax),%eax + 1203d: 89 42 14 mov %eax,0x14(%edx) + 12040: 8b 45 08 mov 0x8(%ebp),%eax + 12043: 83 78 14 00 cmpl $0x0,0x14(%eax) + 12047: 74 37 je 12080 <_ed_deschedule+0x1f4> + 12049: 8b 45 08 mov 0x8(%ebp),%eax + 1204c: 8b 40 14 mov 0x14(%eax),%eax + 1204f: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) + 12056: eb 28 jmp 12080 <_ed_deschedule+0x1f4> + 12058: 8b 45 0c mov 0xc(%ebp),%eax + 1205b: 83 78 18 00 cmpl $0x0,0x18(%eax) + 1205f: 74 1f je 12080 <_ed_deschedule+0x1f4> + 12061: 8b 45 0c mov 0xc(%ebp),%eax + 12064: 8b 50 18 mov 0x18(%eax),%edx + 12067: 8b 45 0c mov 0xc(%ebp),%eax + 1206a: 8b 40 1c mov 0x1c(%eax),%eax + 1206d: 89 42 1c mov %eax,0x1c(%edx) + 12070: eb 0e jmp 12080 <_ed_deschedule+0x1f4> + 12072: ff 75 0c pushl 0xc(%ebp) + 12075: ff 75 08 pushl 0x8(%ebp) + 12078: e8 0f fd ff ff call 11d8c <_periodic_unlink> + 1207d: 83 c4 08 add $0x8,%esp + 12080: 8b 45 0c mov 0xc(%ebp),%eax + 12083: 80 78 28 02 cmpb $0x2,0x28(%eax) + 12087: 75 25 jne 120ae <_ed_deschedule+0x222> + 12089: 8b 45 0c mov 0xc(%ebp),%eax + 1208c: c6 40 28 00 movb $0x0,0x28(%eax) + 12090: 8b 55 0c mov 0xc(%ebp),%edx + 12093: 8b 45 0c mov 0xc(%ebp),%eax + 12096: 8b 00 mov (%eax),%eax + 12098: 25 ff bf ff f7 and $0xf7ffbfff,%eax + 1209d: 89 02 mov %eax,(%edx) + 1209f: 8b 55 0c mov 0xc(%ebp),%edx + 120a2: 8b 45 0c mov 0xc(%ebp),%eax + 120a5: 8b 40 08 mov 0x8(%eax),%eax + 120a8: 83 e0 fe and $0xfffffffe,%eax + 120ab: 89 42 08 mov %eax,0x8(%edx) + 120ae: c9 leave + 120af: c3 ret + +000120b0 <_ed_get>: + 120b0: 55 push %ebp + 120b1: 89 e5 mov %esp,%ebp + 120b3: 83 ec 38 sub $0x38,%esp + 120b6: 8b 45 10 mov 0x10(%ebp),%eax + 120b9: c1 e8 07 shr $0x7,%eax + 120bc: 83 f0 01 xor $0x1,%eax + 120bf: 83 e0 01 and $0x1,%eax + 120c2: 89 45 fc mov %eax,0xfffffffc(%ebp) + 120c5: 8b 45 10 mov 0x10(%ebp),%eax + 120c8: c1 e8 1e shr $0x1e,%eax + 120cb: 83 e0 03 and $0x3,%eax + 120ce: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 120d1: 8b 45 0c mov 0xc(%ebp),%eax + 120d4: 8b 80 98 01 00 00 mov 0x198(%eax),%eax + 120da: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 120dd: 8b 45 10 mov 0x10(%ebp),%eax + 120e0: c1 e8 0f shr $0xf,%eax + 120e3: 83 e0 0f and $0xf,%eax + 120e6: 01 c0 add %eax,%eax + 120e8: 89 45 ec mov %eax,0xffffffec(%ebp) + 120eb: 83 7d f8 02 cmpl $0x2,0xfffffff8(%ebp) + 120ef: 74 0c je 120fd <_ed_get+0x4d> + 120f1: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) + 120f5: 74 06 je 120fd <_ed_get+0x4d> + 120f7: 8d 45 ec lea 0xffffffec(%ebp),%eax + 120fa: 83 08 01 orl $0x1,(%eax) + 120fd: c7 45 e8 00 00 00 00 movl $0x0,0xffffffe8(%ebp) + 12104: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 12107: 8b 55 ec mov 0xffffffec(%ebp),%edx + 1210a: 8b 44 90 10 mov 0x10(%eax,%edx,4),%eax + 1210e: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 12111: 85 c0 test %eax,%eax + 12113: 0f 85 92 00 00 00 jne 121ab <_ed_get+0xfb> + 12119: 83 ec 08 sub $0x8,%esp + 1211c: 6a 00 push $0x0 + 1211e: ff 75 08 pushl 0x8(%ebp) + 12121: e8 3e f7 ff ff call 11864 <_ed_alloc> + 12126: 83 c4 10 add $0x10,%esp + 12129: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 1212c: 83 7d f0 00 cmpl $0x0,0xfffffff0(%ebp) + 12130: 75 05 jne 12137 <_ed_get+0x87> + 12132: e9 d0 01 00 00 jmp 12307 <_ed_get+0x257> + 12137: 8b 4d f4 mov 0xfffffff4(%ebp),%ecx + 1213a: 8b 55 ec mov 0xffffffec(%ebp),%edx + 1213d: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 12140: 89 44 91 10 mov %eax,0x10(%ecx,%edx,4) + 12144: 83 ec 08 sub $0x8,%esp + 12147: 6a 00 push $0x0 + 12149: ff 75 08 pushl 0x8(%ebp) + 1214c: e8 30 f6 ff ff call 11781 <_td_alloc> + 12151: 83 c4 10 add $0x10,%esp + 12154: 89 45 e4 mov %eax,0xffffffe4(%ebp) + 12157: 83 7d e4 00 cmpl $0x0,0xffffffe4(%ebp) + 1215b: 75 1d jne 1217a <_ed_get+0xca> + 1215d: 83 ec 08 sub $0x8,%esp + 12160: ff 75 f0 pushl 0xfffffff0(%ebp) + 12163: ff 75 08 pushl 0x8(%ebp) + 12166: e8 60 f7 ff ff call 118cb <_ed_free> + 1216b: 83 c4 10 add $0x10,%esp + 1216e: c7 45 f0 00 00 00 00 movl $0x0,0xfffffff0(%ebp) + 12175: e9 8d 01 00 00 jmp 12307 <_ed_get+0x257> + 1217a: 8b 55 f0 mov 0xfffffff0(%ebp),%edx + 1217d: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 12180: 89 42 14 mov %eax,0x14(%edx) + 12183: 8b 55 f0 mov 0xfffffff0(%ebp),%edx + 12186: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 12189: 8b 40 24 mov 0x24(%eax),%eax + 1218c: 89 42 04 mov %eax,0x4(%edx) + 1218f: 8b 55 f0 mov 0xfffffff0(%ebp),%edx + 12192: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 12195: 8b 40 04 mov 0x4(%eax),%eax + 12198: 89 42 08 mov %eax,0x8(%edx) + 1219b: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 1219e: c6 40 28 00 movb $0x0,0x28(%eax) + 121a2: 8b 55 f0 mov 0xfffffff0(%ebp),%edx + 121a5: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 121a8: 88 42 29 mov %al,0x29(%edx) + 121ab: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 121ae: 80 78 28 00 cmpb $0x0,0x28(%eax) + 121b2: 0f 85 4f 01 00 00 jne 12307 <_ed_get+0x257> + 121b8: 8b 45 10 mov 0x10(%ebp),%eax + 121bb: c1 e8 08 shr $0x8,%eax + 121be: 83 e0 7f and $0x7f,%eax + 121c1: 89 45 e4 mov %eax,0xffffffe4(%ebp) + 121c4: 8b 45 ec mov 0xffffffec(%ebp),%eax + 121c7: d1 e8 shr %eax + 121c9: 89 c2 mov %eax,%edx + 121cb: c1 e2 07 shl $0x7,%edx + 121ce: 8d 45 e4 lea 0xffffffe4(%ebp),%eax + 121d1: 09 10 or %edx,(%eax) + 121d3: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) + 121d7: 74 1e je 121f7 <_ed_get+0x147> + 121d9: 8b 55 0c mov 0xc(%ebp),%edx + 121dc: 8b 45 10 mov 0x10(%ebp),%eax + 121df: c1 e8 0f shr $0xf,%eax + 121e2: 83 e0 0f and $0xf,%eax + 121e5: 8b 44 82 78 mov 0x78(%edx,%eax,4),%eax + 121e9: c1 e0 10 shl $0x10,%eax + 121ec: 89 45 e0 mov %eax,0xffffffe0(%ebp) + 121ef: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 121f2: 09 45 e0 or %eax,0xffffffe0(%ebp) + 121f5: eb 1c jmp 12213 <_ed_get+0x163> + 121f7: 8b 55 0c mov 0xc(%ebp),%edx + 121fa: 8b 45 10 mov 0x10(%ebp),%eax + 121fd: c1 e8 0f shr $0xf,%eax + 12200: 83 e0 0f and $0xf,%eax + 12203: 8b 44 82 38 mov 0x38(%edx,%eax,4),%eax + 12207: c1 e0 10 shl $0x10,%eax + 1220a: 89 45 e0 mov %eax,0xffffffe0(%ebp) + 1220d: 8b 55 e4 mov 0xffffffe4(%ebp),%edx + 12210: 09 55 e0 or %edx,0xffffffe0(%ebp) + 12213: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 12216: 89 45 e4 mov %eax,0xffffffe4(%ebp) + 12219: 8b 45 0c mov 0xc(%ebp),%eax + 1221c: 83 78 18 01 cmpl $0x1,0x18(%eax) + 12220: 75 09 jne 1222b <_ed_get+0x17b> + 12222: 8d 45 e4 lea 0xffffffe4(%ebp),%eax + 12225: 81 08 00 20 00 00 orl $0x2000,(%eax) + 1222b: 83 7d f8 02 cmpl $0x2,0xfffffff8(%ebp) + 1222f: 0f 84 ca 00 00 00 je 122ff <_ed_get+0x24f> + 12235: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) + 12239: 74 0b je 12246 <_ed_get+0x196> + 1223b: 8b 55 e4 mov 0xffffffe4(%ebp),%edx + 1223e: 80 ce 08 or $0x8,%dh + 12241: 89 55 dc mov %edx,0xffffffdc(%ebp) + 12244: eb 09 jmp 1224f <_ed_get+0x19f> + 12246: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 12249: 80 cc 10 or $0x10,%ah + 1224c: 89 45 dc mov %eax,0xffffffdc(%ebp) + 1224f: 8b 55 dc mov 0xffffffdc(%ebp),%edx + 12252: 89 55 e4 mov %edx,0xffffffe4(%ebp) + 12255: 83 7d f8 03 cmpl $0x3,0xfffffff8(%ebp) + 12259: 0f 84 a0 00 00 00 je 122ff <_ed_get+0x24f> + 1225f: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) + 12263: 75 0b jne 12270 <_ed_get+0x1c0> + 12265: 8d 45 e4 lea 0xffffffe4(%ebp),%eax + 12268: 81 08 00 80 00 00 orl $0x8000,(%eax) + 1226e: eb 0d jmp 1227d <_ed_get+0x1cd> + 12270: 83 7d 14 20 cmpl $0x20,0x14(%ebp) + 12274: 7e 07 jle 1227d <_ed_get+0x1cd> + 12276: c7 45 14 20 00 00 00 movl $0x20,0x14(%ebp) + 1227d: 8b 55 f0 mov 0xfffffff0(%ebp),%edx + 12280: 8b 45 14 mov 0x14(%ebp),%eax + 12283: 66 89 42 2c mov %ax,0x2c(%edx) + 12287: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 1228a: 89 45 d8 mov %eax,0xffffffd8(%ebp) + 1228d: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) + 12291: 74 15 je 122a8 <_ed_get+0x1f8> + 12293: 8b 55 0c mov 0xc(%ebp),%edx + 12296: 8b 45 10 mov 0x10(%ebp),%eax + 12299: c1 e8 0f shr $0xf,%eax + 1229c: 83 e0 0f and $0xf,%eax + 1229f: 8b 44 82 78 mov 0x78(%edx,%eax,4),%eax + 122a3: 89 45 d4 mov %eax,0xffffffd4(%ebp) + 122a6: eb 13 jmp 122bb <_ed_get+0x20b> + 122a8: 8b 55 0c mov 0xc(%ebp),%edx + 122ab: 8b 45 10 mov 0x10(%ebp),%eax + 122ae: c1 e8 0f shr $0xf,%eax + 122b1: 83 e0 0f and $0xf,%eax + 122b4: 8b 44 82 38 mov 0x38(%edx,%eax,4),%eax + 122b8: 89 45 d4 mov %eax,0xffffffd4(%ebp) + 122bb: ff 75 d4 pushl 0xffffffd4(%ebp) + 122be: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) + 122c2: 0f 94 c0 sete %al + 122c5: 25 ff 00 00 00 and $0xff,%eax + 122ca: 50 push %eax + 122cb: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) + 122cf: 0f 94 c0 sete %al + 122d2: 25 ff 00 00 00 and $0xff,%eax + 122d7: 50 push %eax + 122d8: 8b 45 0c mov 0xc(%ebp),%eax + 122db: ff 70 18 pushl 0x18(%eax) + 122de: e8 ed 22 00 00 call 145d0 <_usb_calc_bus_time@16> + 122e3: 89 c1 mov %eax,%ecx + 122e5: b8 d3 4d 62 10 mov $0x10624dd3,%eax + 122ea: f7 e9 imul %ecx + 122ec: c1 fa 06 sar $0x6,%edx + 122ef: 89 c8 mov %ecx,%eax + 122f1: c1 f8 1f sar $0x1f,%eax + 122f4: 29 c2 sub %eax,%edx + 122f6: 89 d0 mov %edx,%eax + 122f8: 8b 55 d8 mov 0xffffffd8(%ebp),%edx + 122fb: 66 89 42 2e mov %ax,0x2e(%edx) + 122ff: 8b 55 f0 mov 0xfffffff0(%ebp),%edx + 12302: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 12305: 89 02 mov %eax,(%edx) + 12307: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 1230a: c9 leave + 1230b: c3 ret + +0001230c <_start_urb_unlink>: + 1230c: 55 push %ebp + 1230d: 89 e5 mov %esp,%ebp + 1230f: 8b 55 0c mov 0xc(%ebp),%edx + 12312: 8b 45 0c mov 0xc(%ebp),%eax + 12315: 8b 00 mov (%eax),%eax + 12317: 0d 00 00 00 08 or $0x8000000,%eax + 1231c: 89 02 mov %eax,(%edx) + 1231e: 8b 45 0c mov 0xc(%ebp),%eax + 12321: c6 40 28 01 movb $0x1,0x28(%eax) + 12325: ff 75 0c pushl 0xc(%ebp) + 12328: ff 75 08 pushl 0x8(%ebp) + 1232b: e8 5c fb ff ff call 11e8c <_ed_deschedule> + 12330: 83 c4 08 add $0x8,%esp + 12333: 8b 55 0c mov 0xc(%ebp),%edx + 12336: 8b 45 08 mov 0x8(%ebp),%eax + 12339: 8b 40 08 mov 0x8(%eax),%eax + 1233c: 66 8b 80 80 00 00 00 mov 0x80(%eax),%ax + 12343: 40 inc %eax + 12344: 66 89 42 32 mov %ax,0x32(%edx) + 12348: 8b 55 0c mov 0xc(%ebp),%edx + 1234b: 8b 45 08 mov 0x8(%ebp),%eax + 1234e: 8b 40 10 mov 0x10(%eax),%eax + 12351: 89 42 18 mov %eax,0x18(%edx) + 12354: 8b 45 0c mov 0xc(%ebp),%eax + 12357: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) + 1235e: 8b 55 08 mov 0x8(%ebp),%edx + 12361: 8b 45 0c mov 0xc(%ebp),%eax + 12364: 89 42 10 mov %eax,0x10(%edx) + 12367: 8b 45 08 mov 0x8(%ebp),%eax + 1236a: 83 b8 a8 01 00 00 00 cmpl $0x0,0x1a8(%eax) + 12371: 75 29 jne 1239c <_start_urb_unlink+0x90> + 12373: 8b 45 08 mov 0x8(%ebp),%eax + 12376: 8b 40 04 mov 0x4(%eax),%eax + 12379: 83 c0 0c add $0xc,%eax + 1237c: c7 00 04 00 00 00 movl $0x4,(%eax) + 12382: 8b 45 08 mov 0x8(%ebp),%eax + 12385: 8b 40 04 mov 0x4(%eax),%eax + 12388: 83 c0 10 add $0x10,%eax + 1238b: c7 00 04 00 00 00 movl $0x4,(%eax) + 12391: 8b 45 08 mov 0x8(%ebp),%eax + 12394: 8b 40 04 mov 0x4(%eax),%eax + 12397: 83 c0 04 add $0x4,%eax + 1239a: 8b 00 mov (%eax),%eax + 1239c: c9 leave + 1239d: c3 ret + +0001239e <_td_fill>: + 1239e: 55 push %ebp + 1239f: 89 e5 mov %esp,%ebp + 123a1: 83 ec 18 sub $0x18,%esp + 123a4: 8b 45 18 mov 0x18(%ebp),%eax + 123a7: 8b 40 08 mov 0x8(%eax),%eax + 123aa: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 123ad: 8b 45 0c mov 0xc(%ebp),%eax + 123b0: 25 00 00 01 00 and $0x10000,%eax + 123b5: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 123b8: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 123bb: 66 8b 40 04 mov 0x4(%eax),%ax + 123bf: 25 ff ff 00 00 and $0xffff,%eax + 123c4: 48 dec %eax + 123c5: 3b 45 1c cmp 0x1c(%ebp),%eax + 123c8: 75 12 jne 123dc <_td_fill+0x3e> + 123ca: 8b 45 18 mov 0x18(%ebp),%eax + 123cd: 8b 40 20 mov 0x20(%eax),%eax + 123d0: c1 e8 07 shr $0x7,%eax + 123d3: 83 e0 01 and $0x1,%eax + 123d6: 85 c0 test %eax,%eax + 123d8: 75 02 jne 123dc <_td_fill+0x3e> + 123da: eb 09 jmp 123e5 <_td_fill+0x47> + 123dc: 8d 45 0c lea 0xc(%ebp),%eax + 123df: 81 08 00 00 c0 00 orl $0xc00000,(%eax) + 123e5: 8b 55 f4 mov 0xfffffff4(%ebp),%edx + 123e8: 8b 45 1c mov 0x1c(%ebp),%eax + 123eb: 8b 44 82 0c mov 0xc(%edx,%eax,4),%eax + 123ef: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 123f2: 8b 55 f4 mov 0xfffffff4(%ebp),%edx + 123f5: 8b 4d 1c mov 0x1c(%ebp),%ecx + 123f8: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 123fb: 8b 00 mov (%eax),%eax + 123fd: 8b 40 14 mov 0x14(%eax),%eax + 12400: 89 44 8a 0c mov %eax,0xc(%edx,%ecx,4) + 12404: 89 45 fc mov %eax,0xfffffffc(%ebp) + 12407: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 1240a: 8b 10 mov (%eax),%edx + 1240c: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 1240f: 89 42 14 mov %eax,0x14(%edx) + 12412: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 12415: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 12418: 8b 00 mov (%eax),%eax + 1241a: 89 42 14 mov %eax,0x14(%edx) + 1241d: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 12420: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) + 12427: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 1242a: 8b 45 1c mov 0x1c(%ebp),%eax + 1242d: 88 42 12 mov %al,0x12(%edx) + 12430: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 12433: 8b 45 18 mov 0x18(%ebp),%eax + 12436: 89 42 20 mov %eax,0x20(%edx) + 12439: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 1243c: 8b 45 10 mov 0x10(%ebp),%eax + 1243f: 89 42 28 mov %eax,0x28(%edx) + 12442: 83 7d 14 00 cmpl $0x0,0x14(%ebp) + 12446: 75 07 jne 1244f <_td_fill+0xb1> + 12448: c7 45 10 00 00 00 00 movl $0x0,0x10(%ebp) + 1244f: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 12452: 8b 45 0c mov 0xc(%ebp),%eax + 12455: 89 02 mov %eax,(%edx) + 12457: 83 7d f0 00 cmpl $0x0,0xfffffff0(%ebp) + 1245b: 74 31 je 1248e <_td_fill+0xf0> + 1245d: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 12460: 8b 45 10 mov 0x10(%ebp),%eax + 12463: 25 00 f0 ff ff and $0xfffff000,%eax + 12468: 89 42 04 mov %eax,0x4(%edx) + 1246b: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 1246e: 8b 45 10 mov 0x10(%ebp),%eax + 12471: 25 ff 0f 00 00 and $0xfff,%eax + 12476: 0d 00 e0 ff ff or $0xffffe000,%eax + 1247b: 66 89 42 10 mov %ax,0x10(%edx) + 1247f: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 12482: 8b 50 14 mov 0x14(%eax),%edx + 12485: 8b 45 0c mov 0xc(%ebp),%eax + 12488: 66 89 42 30 mov %ax,0x30(%edx) + 1248c: eb 09 jmp 12497 <_td_fill+0xf9> + 1248e: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 12491: 8b 45 10 mov 0x10(%ebp),%eax + 12494: 89 42 04 mov %eax,0x4(%edx) + 12497: 83 7d 10 00 cmpl $0x0,0x10(%ebp) + 1249b: 74 0f je 124ac <_td_fill+0x10e> + 1249d: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 124a0: 8b 45 14 mov 0x14(%ebp),%eax + 124a3: 03 45 10 add 0x10(%ebp),%eax + 124a6: 48 dec %eax + 124a7: 89 42 0c mov %eax,0xc(%edx) + 124aa: eb 0a jmp 124b6 <_td_fill+0x118> + 124ac: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 124af: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) + 124b6: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 124b9: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 124bc: 8b 40 24 mov 0x24(%eax),%eax + 124bf: 89 42 08 mov %eax,0x8(%edx) + 124c2: 83 ec 08 sub $0x8,%esp + 124c5: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 124c8: 8b 40 14 mov 0x14(%eax),%eax + 124cb: 83 c0 20 add $0x20,%eax + 124ce: 50 push %eax + 124cf: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 124d2: 83 c0 2c add $0x2c,%eax + 124d5: 50 push %eax + 124d6: e8 4c 00 00 00 call 12527 <_list_add_tail> + 124db: 83 c4 10 add $0x10,%esp + 124de: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 124e1: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 124e4: 8b 40 24 mov 0x24(%eax),%eax + 124e7: c1 e8 06 shr $0x6,%eax + 124ea: 33 42 24 xor 0x24(%edx),%eax + 124ed: 83 e0 3f and $0x3f,%eax + 124f0: 89 45 ec mov %eax,0xffffffec(%ebp) + 124f3: 8b 4d fc mov 0xfffffffc(%ebp),%ecx + 124f6: 8b 55 08 mov 0x8(%ebp),%edx + 124f9: 8b 45 ec mov 0xffffffec(%ebp),%eax + 124fc: 8b 84 82 a4 00 00 00 mov 0xa4(%edx,%eax,4),%eax + 12503: 89 41 18 mov %eax,0x18(%ecx) + 12506: 8b 4d 08 mov 0x8(%ebp),%ecx + 12509: 8b 55 ec mov 0xffffffec(%ebp),%edx + 1250c: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 1250f: 89 84 91 a4 00 00 00 mov %eax,0xa4(%ecx,%edx,4) + 12516: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 12519: 8b 50 14 mov 0x14(%eax),%edx + 1251c: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 1251f: 8b 40 08 mov 0x8(%eax),%eax + 12522: 89 42 04 mov %eax,0x4(%edx) + 12525: c9 leave + 12526: c3 ret + +00012527 <_list_add_tail>: + 12527: 55 push %ebp + 12528: 89 e5 mov %esp,%ebp + 1252a: 83 ec 08 sub $0x8,%esp + 1252d: 83 ec 04 sub $0x4,%esp + 12530: ff 75 0c pushl 0xc(%ebp) + 12533: 8b 45 0c mov 0xc(%ebp),%eax + 12536: ff 70 04 pushl 0x4(%eax) + 12539: ff 75 08 pushl 0x8(%ebp) + 1253c: e8 05 00 00 00 call 12546 <___list_add> + 12541: 83 c4 10 add $0x10,%esp + 12544: c9 leave + 12545: c3 ret + +00012546 <___list_add>: + 12546: 55 push %ebp + 12547: 89 e5 mov %esp,%ebp + 12549: 8b 55 10 mov 0x10(%ebp),%edx + 1254c: 8b 45 08 mov 0x8(%ebp),%eax + 1254f: 89 42 04 mov %eax,0x4(%edx) + 12552: 8b 55 08 mov 0x8(%ebp),%edx + 12555: 8b 45 10 mov 0x10(%ebp),%eax + 12558: 89 02 mov %eax,(%edx) + 1255a: 8b 55 08 mov 0x8(%ebp),%edx + 1255d: 8b 45 0c mov 0xc(%ebp),%eax + 12560: 89 42 04 mov %eax,0x4(%edx) + 12563: 8b 55 0c mov 0xc(%ebp),%edx + 12566: 8b 45 08 mov 0x8(%ebp),%eax + 12569: 89 02 mov %eax,(%edx) + 1256b: 5d pop %ebp + 1256c: c3 ret + +0001256d <_td_submit_urb>: + 1256d: 55 push %ebp + 1256e: 89 e5 mov %esp,%ebp + 12570: 57 push %edi + 12571: 56 push %esi + 12572: 53 push %ebx + 12573: 83 ec 2c sub $0x2c,%esp + 12576: 8b 45 0c mov 0xc(%ebp),%eax + 12579: 8b 40 08 mov 0x8(%eax),%eax + 1257c: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 1257f: 8b 45 0c mov 0xc(%ebp),%eax + 12582: 8b 40 2c mov 0x2c(%eax),%eax + 12585: 89 45 e8 mov %eax,0xffffffe8(%ebp) + 12588: c7 45 e4 00 00 00 00 movl $0x0,0xffffffe4(%ebp) + 1258f: c7 45 e0 00 00 00 00 movl $0x0,0xffffffe0(%ebp) + 12596: 8b 45 0c mov 0xc(%ebp),%eax + 12599: 8b 40 18 mov 0x18(%eax),%eax + 1259c: c1 e8 07 shr $0x7,%eax + 1259f: 83 f0 01 xor $0x1,%eax + 125a2: 83 e0 01 and $0x1,%eax + 125a5: 89 45 dc mov %eax,0xffffffdc(%ebp) + 125a8: 8b 45 0c mov 0xc(%ebp),%eax + 125ab: 8b 58 14 mov 0x14(%eax),%ebx + 125ae: 8b 55 dc mov 0xffffffdc(%ebp),%edx + 125b1: 8b 45 0c mov 0xc(%ebp),%eax + 125b4: 8b 40 18 mov 0x18(%eax),%eax + 125b7: c1 e8 0f shr $0xf,%eax + 125ba: 89 c1 mov %eax,%ecx + 125bc: 83 e1 0f and $0xf,%ecx + 125bf: 8b 44 93 28 mov 0x28(%ebx,%edx,4),%eax + 125c3: d3 e8 shr %cl,%eax + 125c5: 83 e0 01 and $0x1,%eax + 125c8: 85 c0 test %eax,%eax + 125ca: 75 5d jne 12629 <_td_submit_urb+0xbc> + 125cc: 8b 45 0c mov 0xc(%ebp),%eax + 125cf: 8b 70 14 mov 0x14(%eax),%esi + 125d2: 8b 7d dc mov 0xffffffdc(%ebp),%edi + 125d5: 8b 45 0c mov 0xc(%ebp),%eax + 125d8: 8b 50 14 mov 0x14(%eax),%edx + 125db: 8b 5d dc mov 0xffffffdc(%ebp),%ebx + 125de: 8b 45 0c mov 0xc(%ebp),%eax + 125e1: 8b 40 18 mov 0x18(%eax),%eax + 125e4: c1 e8 0f shr $0xf,%eax + 125e7: 89 c1 mov %eax,%ecx + 125e9: 83 e1 0f and $0xf,%ecx + 125ec: b8 01 00 00 00 mov $0x1,%eax + 125f1: d3 e0 shl %cl,%eax + 125f3: f7 d0 not %eax + 125f5: 23 44 9a 28 and 0x28(%edx,%ebx,4),%eax + 125f9: 89 c2 mov %eax,%edx + 125fb: 8b 45 0c mov 0xc(%ebp),%eax + 125fe: 8b 40 18 mov 0x18(%eax),%eax + 12601: c1 e8 0f shr $0xf,%eax + 12604: 89 c1 mov %eax,%ecx + 12606: 83 e1 0f and $0xf,%ecx + 12609: b8 01 00 00 00 mov $0x1,%eax + 1260e: d3 e0 shl %cl,%eax + 12610: 09 d0 or %edx,%eax + 12612: 89 44 be 28 mov %eax,0x28(%esi,%edi,4) + 12616: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 12619: 8b 10 mov (%eax),%edx + 1261b: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 1261e: 8b 00 mov (%eax),%eax + 12620: 8b 40 08 mov 0x8(%eax),%eax + 12623: 83 e0 fd and $0xfffffffd,%eax + 12626: 89 42 08 mov %eax,0x8(%edx) + 12629: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 1262c: 66 c7 40 06 00 00 movw $0x0,0x6(%eax) + 12632: 83 7d e8 00 cmpl $0x0,0xffffffe8(%ebp) + 12636: 74 0b je 12643 <_td_submit_urb+0xd6> + 12638: 8b 45 0c mov 0xc(%ebp),%eax + 1263b: 8b 40 28 mov 0x28(%eax),%eax + 1263e: 89 45 ec mov %eax,0xffffffec(%ebp) + 12641: eb 07 jmp 1264a <_td_submit_urb+0xdd> + 12643: c7 45 ec 00 00 00 00 movl $0x0,0xffffffec(%ebp) + 1264a: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 1264d: 8b 00 mov (%eax),%eax + 1264f: ba 00 00 00 00 mov $0x0,%edx + 12654: 8a 50 29 mov 0x29(%eax),%dl + 12657: 89 55 c8 mov %edx,0xffffffc8(%ebp) + 1265a: 83 7d c8 01 cmpl $0x1,0xffffffc8(%ebp) + 1265e: 74 2a je 1268a <_td_submit_urb+0x11d> + 12660: 83 7d c8 01 cmpl $0x1,0xffffffc8(%ebp) + 12664: 7f 0f jg 12675 <_td_submit_urb+0x108> + 12666: 83 7d c8 00 cmpl $0x0,0xffffffc8(%ebp) + 1266a: 0f 84 fa 01 00 00 je 1286a <_td_submit_urb+0x2fd> + 12670: e9 86 02 00 00 jmp 128fb <_td_submit_urb+0x38e> + 12675: 83 7d c8 02 cmpl $0x2,0xffffffc8(%ebp) + 12679: 0f 84 18 01 00 00 je 12797 <_td_submit_urb+0x22a> + 1267f: 83 7d c8 03 cmpl $0x3,0xffffffc8(%ebp) + 12683: 74 19 je 1269e <_td_submit_urb+0x131> + 12685: e9 71 02 00 00 jmp 128fb <_td_submit_urb+0x38e> + 1268a: 8b 45 08 mov 0x8(%ebp),%eax + 1268d: 05 34 02 00 00 add $0x234,%eax + 12692: 50 push %eax + 12693: e8 e3 ef ff ff call 1167b <_hcd_to_bus> + 12698: 83 c4 04 add $0x4,%esp + 1269b: ff 40 38 incl 0x38(%eax) + 1269e: 83 7d dc 00 cmpl $0x0,0xffffffdc(%ebp) + 126a2: 74 09 je 126ad <_td_submit_urb+0x140> + 126a4: c7 45 d4 00 00 08 f0 movl $0xf0080000,0xffffffd4(%ebp) + 126ab: eb 07 jmp 126b4 <_td_submit_urb+0x147> + 126ad: c7 45 d4 00 00 10 f0 movl $0xf0100000,0xffffffd4(%ebp) + 126b4: 8b 45 d4 mov 0xffffffd4(%ebp),%eax + 126b7: 89 45 e0 mov %eax,0xffffffe0(%ebp) + 126ba: 81 7d e8 00 10 00 00 cmpl $0x1000,0xffffffe8(%ebp) + 126c1: 7e 38 jle 126fb <_td_submit_urb+0x18e> + 126c3: 83 ec 08 sub $0x8,%esp + 126c6: ff 75 e4 pushl 0xffffffe4(%ebp) + 126c9: ff 75 0c pushl 0xc(%ebp) + 126cc: 68 00 10 00 00 push $0x1000 + 126d1: ff 75 ec pushl 0xffffffec(%ebp) + 126d4: ff 75 e0 pushl 0xffffffe0(%ebp) + 126d7: ff 75 08 pushl 0x8(%ebp) + 126da: e8 bf fc ff ff call 1239e <_td_fill> + 126df: 83 c4 20 add $0x20,%esp + 126e2: 8d 45 ec lea 0xffffffec(%ebp),%eax + 126e5: 81 00 00 10 00 00 addl $0x1000,(%eax) + 126eb: 8d 45 e8 lea 0xffffffe8(%ebp),%eax + 126ee: 81 28 00 10 00 00 subl $0x1000,(%eax) + 126f4: 8d 45 e4 lea 0xffffffe4(%ebp),%eax + 126f7: ff 00 incl (%eax) + 126f9: eb bf jmp 126ba <_td_submit_urb+0x14d> + 126fb: 8b 45 0c mov 0xc(%ebp),%eax + 126fe: 8b 40 20 mov 0x20(%eax),%eax + 12701: 83 e0 01 and $0x1,%eax + 12704: 85 c0 test %eax,%eax + 12706: 75 09 jne 12711 <_td_submit_urb+0x1a4> + 12708: 8d 45 e0 lea 0xffffffe0(%ebp),%eax + 1270b: 81 08 00 00 04 00 orl $0x40000,(%eax) + 12711: 83 ec 08 sub $0x8,%esp + 12714: ff 75 e4 pushl 0xffffffe4(%ebp) + 12717: ff 75 0c pushl 0xc(%ebp) + 1271a: ff 75 e8 pushl 0xffffffe8(%ebp) + 1271d: ff 75 ec pushl 0xffffffec(%ebp) + 12720: ff 75 e0 pushl 0xffffffe0(%ebp) + 12723: ff 75 08 pushl 0x8(%ebp) + 12726: e8 73 fc ff ff call 1239e <_td_fill> + 1272b: 83 c4 20 add $0x20,%esp + 1272e: 8d 45 e4 lea 0xffffffe4(%ebp),%eax + 12731: ff 00 incl (%eax) + 12733: 8b 45 0c mov 0xc(%ebp),%eax + 12736: 8b 40 20 mov 0x20(%eax),%eax + 12739: c1 e8 06 shr $0x6,%eax + 1273c: 83 e0 01 and $0x1,%eax + 1273f: 85 c0 test %eax,%eax + 12741: 74 31 je 12774 <_td_submit_urb+0x207> + 12743: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 12746: 66 8b 40 04 mov 0x4(%eax),%ax + 1274a: 25 ff ff 00 00 and $0xffff,%eax + 1274f: 3b 45 e4 cmp 0xffffffe4(%ebp),%eax + 12752: 7e 20 jle 12774 <_td_submit_urb+0x207> + 12754: 83 ec 08 sub $0x8,%esp + 12757: ff 75 e4 pushl 0xffffffe4(%ebp) + 1275a: ff 75 0c pushl 0xc(%ebp) + 1275d: 6a 00 push $0x0 + 1275f: 6a 00 push $0x0 + 12761: ff 75 e0 pushl 0xffffffe0(%ebp) + 12764: ff 75 08 pushl 0x8(%ebp) + 12767: e8 32 fc ff ff call 1239e <_td_fill> + 1276c: 83 c4 20 add $0x20,%esp + 1276f: 8d 45 e4 lea 0xffffffe4(%ebp),%eax + 12772: ff 00 incl (%eax) + 12774: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 12777: 8b 00 mov (%eax),%eax + 12779: 80 78 29 03 cmpb $0x3,0x29(%eax) + 1277d: 0f 85 78 01 00 00 jne 128fb <_td_submit_urb+0x38e> + 12783: 8b 45 08 mov 0x8(%ebp),%eax + 12786: 8b 40 04 mov 0x4(%eax),%eax + 12789: 83 c0 08 add $0x8,%eax + 1278c: c7 00 04 00 00 00 movl $0x4,(%eax) + 12792: e9 64 01 00 00 jmp 128fb <_td_submit_urb+0x38e> + 12797: c7 45 e0 00 00 00 f2 movl $0xf2000000,0xffffffe0(%ebp) + 1279e: 83 ec 08 sub $0x8,%esp + 127a1: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 127a4: 50 push %eax + 127a5: 8d 45 e4 lea 0xffffffe4(%ebp),%eax + 127a8: ff 00 incl (%eax) + 127aa: ff 75 0c pushl 0xc(%ebp) + 127ad: 6a 08 push $0x8 + 127af: 8b 45 0c mov 0xc(%ebp),%eax + 127b2: ff 70 3c pushl 0x3c(%eax) + 127b5: ff 75 e0 pushl 0xffffffe0(%ebp) + 127b8: ff 75 08 pushl 0x8(%ebp) + 127bb: e8 de fb ff ff call 1239e <_td_fill> + 127c0: 83 c4 20 add $0x20,%esp + 127c3: 83 7d e8 00 cmpl $0x0,0xffffffe8(%ebp) + 127c7: 7e 4f jle 12818 <_td_submit_urb+0x2ab> + 127c9: c7 45 e0 00 00 04 f3 movl $0xf3040000,0xffffffe0(%ebp) + 127d0: 83 7d dc 00 cmpl $0x0,0xffffffdc(%ebp) + 127d4: 74 0e je 127e4 <_td_submit_urb+0x277> + 127d6: 8b 55 e0 mov 0xffffffe0(%ebp),%edx + 127d9: 81 ca 00 00 08 00 or $0x80000,%edx + 127df: 89 55 d0 mov %edx,0xffffffd0(%ebp) + 127e2: eb 0b jmp 127ef <_td_submit_urb+0x282> + 127e4: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 127e7: 0d 00 00 10 00 or $0x100000,%eax + 127ec: 89 45 d0 mov %eax,0xffffffd0(%ebp) + 127ef: 8b 55 d0 mov 0xffffffd0(%ebp),%edx + 127f2: 89 55 e0 mov %edx,0xffffffe0(%ebp) + 127f5: 83 ec 08 sub $0x8,%esp + 127f8: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 127fb: 50 push %eax + 127fc: 8d 45 e4 lea 0xffffffe4(%ebp),%eax + 127ff: ff 00 incl (%eax) + 12801: ff 75 0c pushl 0xc(%ebp) + 12804: ff 75 e8 pushl 0xffffffe8(%ebp) + 12807: ff 75 ec pushl 0xffffffec(%ebp) + 1280a: ff 75 e0 pushl 0xffffffe0(%ebp) + 1280d: ff 75 08 pushl 0x8(%ebp) + 12810: e8 89 fb ff ff call 1239e <_td_fill> + 12815: 83 c4 20 add $0x20,%esp + 12818: 83 7d dc 00 cmpl $0x0,0xffffffdc(%ebp) + 1281c: 74 09 je 12827 <_td_submit_urb+0x2ba> + 1281e: c7 45 cc 00 00 10 f3 movl $0xf3100000,0xffffffcc(%ebp) + 12825: eb 07 jmp 1282e <_td_submit_urb+0x2c1> + 12827: c7 45 cc 00 00 08 f3 movl $0xf3080000,0xffffffcc(%ebp) + 1282e: 8b 45 cc mov 0xffffffcc(%ebp),%eax + 12831: 89 45 e0 mov %eax,0xffffffe0(%ebp) + 12834: 83 ec 08 sub $0x8,%esp + 12837: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 1283a: 50 push %eax + 1283b: 8d 45 e4 lea 0xffffffe4(%ebp),%eax + 1283e: ff 00 incl (%eax) + 12840: ff 75 0c pushl 0xc(%ebp) + 12843: 6a 00 push $0x0 + 12845: ff 75 ec pushl 0xffffffec(%ebp) + 12848: ff 75 e0 pushl 0xffffffe0(%ebp) + 1284b: ff 75 08 pushl 0x8(%ebp) + 1284e: e8 4b fb ff ff call 1239e <_td_fill> + 12853: 83 c4 20 add $0x20,%esp + 12856: 8b 45 08 mov 0x8(%ebp),%eax + 12859: 8b 40 04 mov 0x4(%eax),%eax + 1285c: 83 c0 08 add $0x8,%eax + 1285f: c7 00 02 00 00 00 movl $0x2,(%eax) + 12865: e9 91 00 00 00 jmp 128fb <_td_submit_urb+0x38e> + 1286a: c7 45 e4 00 00 00 00 movl $0x0,0xffffffe4(%ebp) + 12871: 8b 45 0c mov 0xc(%ebp),%eax + 12874: 8b 40 44 mov 0x44(%eax),%eax + 12877: 3b 45 e4 cmp 0xffffffe4(%ebp),%eax + 1287a: 7e 6b jle 128e7 <_td_submit_urb+0x37a> + 1287c: 8b 45 0c mov 0xc(%ebp),%eax + 1287f: 8b 40 40 mov 0x40(%eax),%eax + 12882: 89 45 d8 mov %eax,0xffffffd8(%ebp) + 12885: 8b 45 0c mov 0xc(%ebp),%eax + 12888: 8b 40 48 mov 0x48(%eax),%eax + 1288b: 89 c2 mov %eax,%edx + 1288d: 0f af 55 e4 imul 0xffffffe4(%ebp),%edx + 12891: 8d 45 d8 lea 0xffffffd8(%ebp),%eax + 12894: 01 10 add %edx,(%eax) + 12896: 8d 45 d8 lea 0xffffffd8(%ebp),%eax + 12899: 81 20 ff ff 00 00 andl $0xffff,(%eax) + 1289f: 83 ec 08 sub $0x8,%esp + 128a2: ff 75 e4 pushl 0xffffffe4(%ebp) + 128a5: ff 75 0c pushl 0xc(%ebp) + 128a8: 8b 55 0c mov 0xc(%ebp),%edx + 128ab: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 128ae: c1 e0 04 shl $0x4,%eax + 128b1: 01 d0 add %edx,%eax + 128b3: 83 c0 60 add $0x60,%eax + 128b6: ff 30 pushl (%eax) + 128b8: 8b 55 0c mov 0xc(%ebp),%edx + 128bb: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 128be: c1 e0 04 shl $0x4,%eax + 128c1: 01 d0 add %edx,%eax + 128c3: 8d 50 5c lea 0x5c(%eax),%edx + 128c6: 8b 45 ec mov 0xffffffec(%ebp),%eax + 128c9: 03 02 add (%edx),%eax + 128cb: 50 push %eax + 128cc: 8b 45 d8 mov 0xffffffd8(%ebp),%eax + 128cf: 0d 00 00 01 f0 or $0xf0010000,%eax + 128d4: 50 push %eax + 128d5: ff 75 08 pushl 0x8(%ebp) + 128d8: e8 c1 fa ff ff call 1239e <_td_fill> + 128dd: 83 c4 20 add $0x20,%esp + 128e0: 8d 45 e4 lea 0xffffffe4(%ebp),%eax + 128e3: ff 00 incl (%eax) + 128e5: eb 8a jmp 12871 <_td_submit_urb+0x304> + 128e7: 8b 45 08 mov 0x8(%ebp),%eax + 128ea: 05 34 02 00 00 add $0x234,%eax + 128ef: 50 push %eax + 128f0: e8 86 ed ff ff call 1167b <_hcd_to_bus> + 128f5: 83 c4 04 add $0x4,%esp + 128f8: ff 40 3c incl 0x3c(%eax) + 128fb: 8d 65 f4 lea 0xfffffff4(%ebp),%esp + 128fe: 5b pop %ebx + 128ff: 5e pop %esi + 12900: 5f pop %edi + 12901: 5d pop %ebp + 12902: c3 ret + +00012903 <_td_done>: + 12903: 55 push %ebp + 12904: 89 e5 mov %esp,%ebp + 12906: 57 push %edi + 12907: 56 push %esi + 12908: 53 push %ebx + 12909: 83 ec 1c sub $0x1c,%esp + 1290c: 8b 45 10 mov 0x10(%ebp),%eax + 1290f: 8b 00 mov (%eax),%eax + 12911: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 12914: c7 45 ec 00 00 00 00 movl $0x0,0xffffffec(%ebp) + 1291b: 83 ec 0c sub $0xc,%esp + 1291e: 8b 45 10 mov 0x10(%ebp),%eax + 12921: 83 c0 2c add $0x2c,%eax + 12924: 50 push %eax + 12925: e8 0f 02 00 00 call 12b39 <_list_del> + 1292a: 83 c4 10 add $0x10,%esp + 1292d: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 12930: c1 e8 10 shr $0x10,%eax + 12933: 83 e0 01 and $0x1,%eax + 12936: 85 c0 test %eax,%eax + 12938: 0f 84 d2 00 00 00 je 12a10 <_td_done+0x10d> + 1293e: 8b 45 10 mov 0x10(%ebp),%eax + 12941: 66 8b 40 10 mov 0x10(%eax),%ax + 12945: 66 89 45 ea mov %ax,0xffffffea(%ebp) + 12949: c7 45 e4 00 00 00 00 movl $0x0,0xffffffe4(%ebp) + 12950: 66 8b 45 ea mov 0xffffffea(%ebp),%ax + 12954: 66 c1 e8 0c shr $0xc,%ax + 12958: 25 ff ff 00 00 and $0xffff,%eax + 1295d: 83 e0 0f and $0xf,%eax + 12960: 89 45 ec mov %eax,0xffffffec(%ebp) + 12963: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 12966: 25 00 00 00 f0 and $0xf0000000,%eax + 1296b: 85 c0 test %eax,%eax + 1296d: 74 05 je 12974 <_td_done+0x71> + 1296f: e9 bd 01 00 00 jmp 12b31 <_td_done+0x22e> + 12974: 8b 45 0c mov 0xc(%ebp),%eax + 12977: 8b 40 18 mov 0x18(%eax),%eax + 1297a: c1 e8 07 shr $0x7,%eax + 1297d: 83 e0 01 and $0x1,%eax + 12980: 85 c0 test %eax,%eax + 12982: 75 1d jne 129a1 <_td_done+0x9e> + 12984: 8b 55 0c mov 0xc(%ebp),%edx + 12987: 8b 45 10 mov 0x10(%ebp),%eax + 1298a: 8a 40 12 mov 0x12(%eax),%al + 1298d: 25 ff 00 00 00 and $0xff,%eax + 12992: c1 e0 04 shl $0x4,%eax + 12995: 01 d0 add %edx,%eax + 12997: 83 c0 60 add $0x60,%eax + 1299a: 8b 00 mov (%eax),%eax + 1299c: 89 45 e4 mov %eax,0xffffffe4(%ebp) + 1299f: eb 1e jmp 129bf <_td_done+0xbc> + 129a1: 83 7d ec 09 cmpl $0x9,0xffffffec(%ebp) + 129a5: 75 07 jne 129ae <_td_done+0xab> + 129a7: c7 45 ec 00 00 00 00 movl $0x0,0xffffffec(%ebp) + 129ae: 66 8b 45 ea mov 0xffffffea(%ebp),%ax + 129b2: 25 ff ff 00 00 and $0xffff,%eax + 129b7: 25 ff 03 00 00 and $0x3ff,%eax + 129bc: 89 45 e4 mov %eax,0xffffffe4(%ebp) + 129bf: 8b 4d 0c mov 0xc(%ebp),%ecx + 129c2: 8b 55 0c mov 0xc(%ebp),%edx + 129c5: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 129c8: 03 42 30 add 0x30(%edx),%eax + 129cb: 89 41 30 mov %eax,0x30(%ecx) + 129ce: 8b 55 0c mov 0xc(%ebp),%edx + 129d1: 8b 45 10 mov 0x10(%ebp),%eax + 129d4: 8a 40 12 mov 0x12(%eax),%al + 129d7: 25 ff 00 00 00 and $0xff,%eax + 129dc: c1 e0 04 shl $0x4,%eax + 129df: 01 d0 add %edx,%eax + 129e1: 8d 50 64 lea 0x64(%eax),%edx + 129e4: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 129e7: 89 02 mov %eax,(%edx) + 129e9: 8b 55 0c mov 0xc(%ebp),%edx + 129ec: 8b 45 10 mov 0x10(%ebp),%eax + 129ef: 8a 40 12 mov 0x12(%eax),%al + 129f2: 25 ff 00 00 00 and $0xff,%eax + 129f7: c1 e0 04 shl $0x4,%eax + 129fa: 01 d0 add %edx,%eax + 129fc: 8d 50 68 lea 0x68(%eax),%edx + 129ff: 8b 45 ec mov 0xffffffec(%ebp),%eax + 12a02: 8b 04 85 20 60 01 00 mov 0x16020(,%eax,4),%eax + 12a09: 89 02 mov %eax,(%edx) + 12a0b: e9 21 01 00 00 jmp 12b31 <_td_done+0x22e> + 12a10: 8b 45 0c mov 0xc(%ebp),%eax + 12a13: 8b 40 18 mov 0x18(%eax),%eax + 12a16: c1 e8 1e shr $0x1e,%eax + 12a19: 83 e0 03 and $0x3,%eax + 12a1c: 89 45 e4 mov %eax,0xffffffe4(%ebp) + 12a1f: 8b 45 10 mov 0x10(%ebp),%eax + 12a22: 83 c0 0c add $0xc,%eax + 12a25: 8b 00 mov (%eax),%eax + 12a27: 89 45 e0 mov %eax,0xffffffe0(%ebp) + 12a2a: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 12a2d: c1 e8 1c shr $0x1c,%eax + 12a30: 83 e0 0f and $0xf,%eax + 12a33: 89 45 ec mov %eax,0xffffffec(%ebp) + 12a36: 83 7d e4 02 cmpl $0x2,0xffffffe4(%ebp) + 12a3a: 74 51 je 12a8d <_td_done+0x18a> + 12a3c: 83 7d ec 04 cmpl $0x4,0xffffffec(%ebp) + 12a40: 75 4b jne 12a8d <_td_done+0x18a> + 12a42: 8b 45 0c mov 0xc(%ebp),%eax + 12a45: 8b 58 14 mov 0x14(%eax),%ebx + 12a48: 8b 45 0c mov 0xc(%ebp),%eax + 12a4b: 8b 40 18 mov 0x18(%eax),%eax + 12a4e: c1 e8 07 shr $0x7,%eax + 12a51: 83 f0 01 xor $0x1,%eax + 12a54: 89 c6 mov %eax,%esi + 12a56: 83 e6 01 and $0x1,%esi + 12a59: 8b 45 0c mov 0xc(%ebp),%eax + 12a5c: 8b 78 14 mov 0x14(%eax),%edi + 12a5f: 8b 45 0c mov 0xc(%ebp),%eax + 12a62: 8b 40 18 mov 0x18(%eax),%eax + 12a65: c1 e8 07 shr $0x7,%eax + 12a68: 83 f0 01 xor $0x1,%eax + 12a6b: 89 c2 mov %eax,%edx + 12a6d: 83 e2 01 and $0x1,%edx + 12a70: 8b 45 0c mov 0xc(%ebp),%eax + 12a73: 8b 40 18 mov 0x18(%eax),%eax + 12a76: c1 e8 0f shr $0xf,%eax + 12a79: 89 c1 mov %eax,%ecx + 12a7b: 83 e1 0f and $0xf,%ecx + 12a7e: b8 01 00 00 00 mov $0x1,%eax + 12a83: d3 e0 shl %cl,%eax + 12a85: 0b 44 97 30 or 0x30(%edi,%edx,4),%eax + 12a89: 89 44 b3 30 mov %eax,0x30(%ebx,%esi,4) + 12a8d: 83 7d ec 09 cmpl $0x9,0xffffffec(%ebp) + 12a91: 75 14 jne 12aa7 <_td_done+0x1a4> + 12a93: 8b 45 0c mov 0xc(%ebp),%eax + 12a96: 8b 40 20 mov 0x20(%eax),%eax + 12a99: 83 e0 01 and $0x1,%eax + 12a9c: 85 c0 test %eax,%eax + 12a9e: 75 07 jne 12aa7 <_td_done+0x1a4> + 12aa0: c7 45 ec 00 00 00 00 movl $0x0,0xffffffec(%ebp) + 12aa7: 83 7d ec 00 cmpl $0x0,0xffffffec(%ebp) + 12aab: 74 28 je 12ad5 <_td_done+0x1d2> + 12aad: 83 7d ec 0d cmpl $0xd,0xffffffec(%ebp) + 12ab1: 7f 22 jg 12ad5 <_td_done+0x1d2> + 12ab3: 8b 45 0c mov 0xc(%ebp),%eax + 12ab6: c7 00 01 00 00 00 movl $0x1,(%eax) + 12abc: 8b 45 0c mov 0xc(%ebp),%eax + 12abf: 83 78 1c 8d cmpl $0xffffff8d,0x1c(%eax) + 12ac3: 75 10 jne 12ad5 <_td_done+0x1d2> + 12ac5: 8b 45 0c mov 0xc(%ebp),%eax + 12ac8: 8b 55 ec mov 0xffffffec(%ebp),%edx + 12acb: 8b 14 95 20 60 01 00 mov 0x16020(,%edx,4),%edx + 12ad2: 89 50 1c mov %edx,0x1c(%eax) + 12ad5: 83 7d e4 02 cmpl $0x2,0xffffffe4(%ebp) + 12ad9: 75 0b jne 12ae6 <_td_done+0x1e3> + 12adb: 8b 45 10 mov 0x10(%ebp),%eax + 12ade: 80 78 12 00 cmpb $0x0,0x12(%eax) + 12ae2: 75 02 jne 12ae6 <_td_done+0x1e3> + 12ae4: eb 45 jmp 12b2b <_td_done+0x228> + 12ae6: 83 7d e0 00 cmpl $0x0,0xffffffe0(%ebp) + 12aea: 74 3f je 12b2b <_td_done+0x228> + 12aec: 8b 45 10 mov 0x10(%ebp),%eax + 12aef: 83 78 04 00 cmpl $0x0,0x4(%eax) + 12af3: 75 1a jne 12b0f <_td_done+0x20c> + 12af5: 8b 5d 0c mov 0xc(%ebp),%ebx + 12af8: 8b 4d 0c mov 0xc(%ebp),%ecx + 12afb: 8b 45 10 mov 0x10(%ebp),%eax + 12afe: 8b 50 28 mov 0x28(%eax),%edx + 12b01: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 12b04: 29 d0 sub %edx,%eax + 12b06: 03 41 30 add 0x30(%ecx),%eax + 12b09: 40 inc %eax + 12b0a: 89 43 30 mov %eax,0x30(%ebx) + 12b0d: eb 1c jmp 12b2b <_td_done+0x228> + 12b0f: 8b 5d 0c mov 0xc(%ebp),%ebx + 12b12: 8b 75 0c mov 0xc(%ebp),%esi + 12b15: 8b 4d 10 mov 0x10(%ebp),%ecx + 12b18: 83 c1 04 add $0x4,%ecx + 12b1b: 8b 45 10 mov 0x10(%ebp),%eax + 12b1e: 8b 50 28 mov 0x28(%eax),%edx + 12b21: 8b 01 mov (%ecx),%eax + 12b23: 29 d0 sub %edx,%eax + 12b25: 03 46 30 add 0x30(%esi),%eax + 12b28: 89 43 30 mov %eax,0x30(%ebx) + 12b2b: 83 7d ec 00 cmpl $0x0,0xffffffec(%ebp) + 12b2f: 74 00 je 12b31 <_td_done+0x22e> + 12b31: 8d 65 f4 lea 0xfffffff4(%ebp),%esp + 12b34: 5b pop %ebx + 12b35: 5e pop %esi + 12b36: 5f pop %edi + 12b37: 5d pop %ebp + 12b38: c3 ret + +00012b39 <_list_del>: + 12b39: 55 push %ebp + 12b3a: 89 e5 mov %esp,%ebp + 12b3c: 83 ec 08 sub $0x8,%esp + 12b3f: 83 ec 08 sub $0x8,%esp + 12b42: 8b 45 08 mov 0x8(%ebp),%eax + 12b45: ff 30 pushl (%eax) + 12b47: 8b 45 08 mov 0x8(%ebp),%eax + 12b4a: ff 70 04 pushl 0x4(%eax) + 12b4d: e8 18 00 00 00 call 12b6a <___list_del> + 12b52: 83 c4 10 add $0x10,%esp + 12b55: 8b 45 08 mov 0x8(%ebp),%eax + 12b58: c7 00 00 00 00 00 movl $0x0,(%eax) + 12b5e: 8b 45 08 mov 0x8(%ebp),%eax + 12b61: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) + 12b68: c9 leave + 12b69: c3 ret + +00012b6a <___list_del>: + 12b6a: 55 push %ebp + 12b6b: 89 e5 mov %esp,%ebp + 12b6d: 8b 55 0c mov 0xc(%ebp),%edx + 12b70: 8b 45 08 mov 0x8(%ebp),%eax + 12b73: 89 42 04 mov %eax,0x4(%edx) + 12b76: 8b 55 08 mov 0x8(%ebp),%edx + 12b79: 8b 45 0c mov 0xc(%ebp),%eax + 12b7c: 89 02 mov %eax,(%edx) + 12b7e: 5d pop %ebp + 12b7f: c3 ret + +00012b80 <_dl_reverse_done_list>: + 12b80: 55 push %ebp + 12b81: 89 e5 mov %esp,%ebp + 12b83: 83 ec 18 sub $0x18,%esp + 12b86: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 12b8d: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) + 12b94: c7 45 f0 00 00 00 00 movl $0x0,0xfffffff0(%ebp) + 12b9b: 8b 45 08 mov 0x8(%ebp),%eax + 12b9e: 8b 40 08 mov 0x8(%eax),%eax + 12ba1: 05 84 00 00 00 add $0x84,%eax + 12ba6: 8b 00 mov (%eax),%eax + 12ba8: 89 45 fc mov %eax,0xfffffffc(%ebp) + 12bab: 8b 45 08 mov 0x8(%ebp),%eax + 12bae: 8b 40 08 mov 0x8(%eax),%eax + 12bb1: c7 80 84 00 00 00 00 movl $0x0,0x84(%eax) + 12bb8: 00 00 00 + 12bbb: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) + 12bbf: 0f 84 85 00 00 00 je 12c4a <_dl_reverse_done_list+0xca> + 12bc5: 83 ec 08 sub $0x8,%esp + 12bc8: ff 75 fc pushl 0xfffffffc(%ebp) + 12bcb: ff 75 08 pushl 0x8(%ebp) + 12bce: e8 59 01 00 00 call 12d2c <_dma_to_td> + 12bd3: 83 c4 10 add $0x10,%esp + 12bd6: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 12bd9: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) + 12bdd: 75 02 jne 12be1 <_dl_reverse_done_list+0x61> + 12bdf: eb 69 jmp 12c4a <_dl_reverse_done_list+0xca> + 12be1: 8b 55 f4 mov 0xfffffff4(%ebp),%edx + 12be4: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 12be7: 8b 00 mov (%eax),%eax + 12be9: 0d 00 00 02 00 or $0x20000,%eax + 12bee: 89 02 mov %eax,(%edx) + 12bf0: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 12bf3: 8b 00 mov (%eax),%eax + 12bf5: c1 e8 1c shr $0x1c,%eax + 12bf8: 83 e0 0f and $0xf,%eax + 12bfb: 89 45 ec mov %eax,0xffffffec(%ebp) + 12bfe: 83 7d ec 00 cmpl $0x0,0xffffffec(%ebp) + 12c02: 74 27 je 12c2b <_dl_reverse_done_list+0xab> + 12c04: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 12c07: 8b 40 14 mov 0x14(%eax),%eax + 12c0a: 8b 40 08 mov 0x8(%eax),%eax + 12c0d: 83 e0 01 and $0x1,%eax + 12c10: 85 c0 test %eax,%eax + 12c12: 74 17 je 12c2b <_dl_reverse_done_list+0xab> + 12c14: ff 75 f8 pushl 0xfffffff8(%ebp) + 12c17: ff 75 ec pushl 0xffffffec(%ebp) + 12c1a: ff 75 f4 pushl 0xfffffff4(%ebp) + 12c1d: ff 75 08 pushl 0x8(%ebp) + 12c20: e8 2a 00 00 00 call 12c4f <_ed_halted> + 12c25: 83 c4 10 add $0x10,%esp + 12c28: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 12c2b: 8b 55 f4 mov 0xfffffff4(%ebp),%edx + 12c2e: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 12c31: 89 42 1c mov %eax,0x1c(%edx) + 12c34: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 12c37: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 12c3a: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 12c3d: 83 c0 08 add $0x8,%eax + 12c40: 8b 00 mov (%eax),%eax + 12c42: 89 45 fc mov %eax,0xfffffffc(%ebp) + 12c45: e9 71 ff ff ff jmp 12bbb <_dl_reverse_done_list+0x3b> + 12c4a: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 12c4d: c9 leave + 12c4e: c3 ret + +00012c4f <_ed_halted>: + 12c4f: 55 push %ebp + 12c50: 89 e5 mov %esp,%ebp + 12c52: 83 ec 18 sub $0x18,%esp + 12c55: 8b 45 0c mov 0xc(%ebp),%eax + 12c58: 8b 40 20 mov 0x20(%eax),%eax + 12c5b: 89 45 fc mov %eax,0xfffffffc(%ebp) + 12c5e: 8b 45 0c mov 0xc(%ebp),%eax + 12c61: 8b 40 14 mov 0x14(%eax),%eax + 12c64: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 12c67: 8b 45 0c mov 0xc(%ebp),%eax + 12c6a: 8b 40 2c mov 0x2c(%eax),%eax + 12c6d: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 12c70: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 12c73: 8b 40 08 mov 0x8(%eax),%eax + 12c76: 83 e0 02 and $0x2,%eax + 12c79: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 12c7c: 8b 55 f8 mov 0xfffffff8(%ebp),%edx + 12c7f: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 12c82: 8b 00 mov (%eax),%eax + 12c84: 80 cc 40 or $0x40,%ah + 12c87: 89 02 mov %eax,(%edx) + 12c89: 8b 55 f8 mov 0xfffffff8(%ebp),%edx + 12c8c: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 12c8f: 8b 40 08 mov 0x8(%eax),%eax + 12c92: 83 e0 fe and $0xfffffffe,%eax + 12c95: 89 42 08 mov %eax,0x8(%edx) + 12c98: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 12c9b: 83 c0 20 add $0x20,%eax + 12c9e: 3b 45 f4 cmp 0xfffffff4(%ebp),%eax + 12ca1: 74 7e je 12d21 <_ed_halted+0xd2> + 12ca3: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 12ca6: 83 e8 2c sub $0x2c,%eax + 12ca9: 89 45 ec mov %eax,0xffffffec(%ebp) + 12cac: 8b 45 ec mov 0xffffffec(%ebp),%eax + 12caf: 8b 40 2c mov 0x2c(%eax),%eax + 12cb2: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 12cb5: 8b 45 ec mov 0xffffffec(%ebp),%eax + 12cb8: 8b 40 20 mov 0x20(%eax),%eax + 12cbb: 3b 45 fc cmp 0xfffffffc(%ebp),%eax + 12cbe: 74 02 je 12cc2 <_ed_halted+0x73> + 12cc0: eb 5f jmp 12d21 <_ed_halted+0xd2> + 12cc2: 8b 45 ec mov 0xffffffec(%ebp),%eax + 12cc5: 8b 00 mov (%eax),%eax + 12cc7: 89 45 e8 mov %eax,0xffffffe8(%ebp) + 12cca: 8d 45 e8 lea 0xffffffe8(%ebp),%eax + 12ccd: 81 08 00 00 02 00 orl $0x20000,(%eax) + 12cd3: 8d 45 e8 lea 0xffffffe8(%ebp),%eax + 12cd6: 81 20 ff ff ff 0f andl $0xfffffff,(%eax) + 12cdc: 8b 55 ec mov 0xffffffec(%ebp),%edx + 12cdf: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 12ce2: 89 02 mov %eax,(%edx) + 12ce4: 8b 55 ec mov 0xffffffec(%ebp),%edx + 12ce7: 8b 45 14 mov 0x14(%ebp),%eax + 12cea: 89 42 1c mov %eax,0x1c(%edx) + 12ced: 8b 45 ec mov 0xffffffec(%ebp),%eax + 12cf0: 89 45 14 mov %eax,0x14(%ebp) + 12cf3: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 12cf6: 8b 55 ec mov 0xffffffec(%ebp),%edx + 12cf9: 8b 40 04 mov 0x4(%eax),%eax + 12cfc: 3b 42 24 cmp 0x24(%edx),%eax + 12cff: 75 0c jne 12d0d <_ed_halted+0xbe> + 12d01: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 12d04: 8b 55 ec mov 0xffffffec(%ebp),%edx + 12d07: 8b 52 08 mov 0x8(%edx),%edx + 12d0a: 89 50 04 mov %edx,0x4(%eax) + 12d0d: 8b 4d f8 mov 0xfffffff8(%ebp),%ecx + 12d10: 8b 55 ec mov 0xffffffec(%ebp),%edx + 12d13: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 12d16: 0b 42 08 or 0x8(%edx),%eax + 12d19: 89 41 08 mov %eax,0x8(%ecx) + 12d1c: e9 77 ff ff ff jmp 12c98 <_ed_halted+0x49> + 12d21: 83 7d 10 04 cmpl $0x4,0x10(%ebp) + 12d25: 75 00 jne 12d27 <_ed_halted+0xd8> + 12d27: 8b 45 14 mov 0x14(%ebp),%eax + 12d2a: c9 leave + 12d2b: c3 ret + +00012d2c <_dma_to_td>: + 12d2c: 55 push %ebp + 12d2d: 89 e5 mov %esp,%ebp + 12d2f: 83 ec 04 sub $0x4,%esp + 12d32: 8d 45 0c lea 0xc(%ebp),%eax + 12d35: 83 20 e0 andl $0xffffffe0,(%eax) + 12d38: 8b 55 08 mov 0x8(%ebp),%edx + 12d3b: 8b 45 0c mov 0xc(%ebp),%eax + 12d3e: c1 e8 06 shr $0x6,%eax + 12d41: 33 45 0c xor 0xc(%ebp),%eax + 12d44: 83 e0 3f and $0x3f,%eax + 12d47: 8b 84 82 a4 00 00 00 mov 0xa4(%edx,%eax,4),%eax + 12d4e: 89 45 fc mov %eax,0xfffffffc(%ebp) + 12d51: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) + 12d55: 74 16 je 12d6d <_dma_to_td+0x41> + 12d57: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 12d5a: 8b 40 24 mov 0x24(%eax),%eax + 12d5d: 3b 45 0c cmp 0xc(%ebp),%eax + 12d60: 74 0b je 12d6d <_dma_to_td+0x41> + 12d62: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 12d65: 8b 40 18 mov 0x18(%eax),%eax + 12d68: 89 45 fc mov %eax,0xfffffffc(%ebp) + 12d6b: eb e4 jmp 12d51 <_dma_to_td+0x25> + 12d6d: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 12d70: c9 leave + 12d71: c3 ret + +00012d72 <_finish_unlinks>: + 12d72: 55 push %ebp + 12d73: 89 e5 mov %esp,%ebp + 12d75: 83 ec 38 sub $0x38,%esp + 12d78: 8b 45 0c mov 0xc(%ebp),%eax + 12d7b: 66 89 45 fe mov %ax,0xfffffffe(%ebp) + 12d7f: 8b 45 08 mov 0x8(%ebp),%eax + 12d82: 83 c0 10 add $0x10,%eax + 12d85: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 12d88: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 12d8b: 8b 00 mov (%eax),%eax + 12d8d: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 12d90: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) + 12d94: 0f 84 f0 01 00 00 je 12f8a <_finish_unlinks+0x218> + 12d9a: 0f bf 55 fe movswl 0xfffffffe(%ebp),%edx + 12d9e: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 12da1: 0f bf 40 32 movswl 0x32(%eax),%eax + 12da5: 29 c2 sub %eax,%edx + 12da7: 89 d0 mov %edx,%eax + 12da9: 85 c0 test %eax,%eax + 12dab: 79 1a jns 12dc7 <_finish_unlinks+0x55> + 12dad: 8b 45 08 mov 0x8(%ebp),%eax + 12db0: 83 b8 a4 01 00 00 00 cmpl $0x0,0x1a4(%eax) + 12db7: 75 0e jne 12dc7 <_finish_unlinks+0x55> + 12db9: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 12dbc: 83 c0 18 add $0x18,%eax + 12dbf: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 12dc2: e9 b6 01 00 00 jmp 12f7d <_finish_unlinks+0x20b> + 12dc7: 8b 55 f4 mov 0xfffffff4(%ebp),%edx + 12dca: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 12dcd: 8b 40 18 mov 0x18(%eax),%eax + 12dd0: 89 02 mov %eax,(%edx) + 12dd2: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 12dd5: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) + 12ddc: c7 45 e4 00 00 00 00 movl $0x0,0xffffffe4(%ebp) + 12de3: c7 45 e8 00 00 00 00 movl $0x0,0xffffffe8(%ebp) + 12dea: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 12ded: 83 c0 08 add $0x8,%eax + 12df0: 89 45 e0 mov %eax,0xffffffe0(%ebp) + 12df3: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 12df6: 83 c0 20 add $0x20,%eax + 12df9: 8b 00 mov (%eax),%eax + 12dfb: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 12dfe: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 12e01: 8b 00 mov (%eax),%eax + 12e03: 89 45 ec mov %eax,0xffffffec(%ebp) + 12e06: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 12e09: 83 c0 20 add $0x20,%eax + 12e0c: 3b 45 f0 cmp 0xfffffff0(%ebp),%eax + 12e0f: 0f 84 d1 00 00 00 je 12ee6 <_finish_unlinks+0x174> + 12e15: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 12e18: 83 e8 2c sub $0x2c,%eax + 12e1b: 89 45 dc mov %eax,0xffffffdc(%ebp) + 12e1e: 8b 45 dc mov 0xffffffdc(%ebp),%eax + 12e21: 8b 40 20 mov 0x20(%eax),%eax + 12e24: 89 45 d8 mov %eax,0xffffffd8(%ebp) + 12e27: 8b 45 dc mov 0xffffffdc(%ebp),%eax + 12e2a: 8b 40 20 mov 0x20(%eax),%eax + 12e2d: 8b 40 08 mov 0x8(%eax),%eax + 12e30: 89 45 d4 mov %eax,0xffffffd4(%ebp) + 12e33: 8b 45 d4 mov 0xffffffd4(%ebp),%eax + 12e36: 83 78 08 01 cmpl $0x1,0x8(%eax) + 12e3a: 74 0e je 12e4a <_finish_unlinks+0xd8> + 12e3c: 8b 45 dc mov 0xffffffdc(%ebp),%eax + 12e3f: 83 c0 08 add $0x8,%eax + 12e42: 89 45 e0 mov %eax,0xffffffe0(%ebp) + 12e45: e9 89 00 00 00 jmp 12ed3 <_finish_unlinks+0x161> + 12e4a: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 12e4d: 8b 55 dc mov 0xffffffdc(%ebp),%edx + 12e50: 8b 40 04 mov 0x4(%eax),%eax + 12e53: 3b 42 24 cmp 0x24(%edx),%eax + 12e56: 75 0c jne 12e64 <_finish_unlinks+0xf2> + 12e58: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 12e5b: 8b 55 dc mov 0xffffffdc(%ebp),%edx + 12e5e: 8b 52 08 mov 0x8(%edx),%edx + 12e61: 89 50 04 mov %edx,0x4(%eax) + 12e64: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 12e67: 8b 00 mov (%eax),%eax + 12e69: 83 e0 1f and $0x1f,%eax + 12e6c: 89 45 d0 mov %eax,0xffffffd0(%ebp) + 12e6f: 8b 4d e0 mov 0xffffffe0(%ebp),%ecx + 12e72: 8b 55 dc mov 0xffffffdc(%ebp),%edx + 12e75: 8b 45 d0 mov 0xffffffd0(%ebp),%eax + 12e78: 0b 42 08 or 0x8(%edx),%eax + 12e7b: 89 01 mov %eax,(%ecx) + 12e7d: 83 ec 04 sub $0x4,%esp + 12e80: ff 75 dc pushl 0xffffffdc(%ebp) + 12e83: ff 75 d8 pushl 0xffffffd8(%ebp) + 12e86: ff 75 08 pushl 0x8(%ebp) + 12e89: e8 75 fa ff ff call 12903 <_td_done> + 12e8e: 83 c4 10 add $0x10,%esp + 12e91: 8b 45 d4 mov 0xffffffd4(%ebp),%eax + 12e94: 66 ff 40 06 incw 0x6(%eax) + 12e98: 8b 45 d4 mov 0xffffffd4(%ebp),%eax + 12e9b: 8b 55 d4 mov 0xffffffd4(%ebp),%edx + 12e9e: 66 8b 40 06 mov 0x6(%eax),%ax + 12ea2: 66 3b 42 04 cmp 0x4(%edx),%ax + 12ea6: 75 2b jne 12ed3 <_finish_unlinks+0x161> + 12ea8: c7 45 e8 01 00 00 00 movl $0x1,0xffffffe8(%ebp) + 12eaf: c7 45 e4 01 00 00 00 movl $0x1,0xffffffe4(%ebp) + 12eb6: 83 ec 04 sub $0x4,%esp + 12eb9: ff 75 10 pushl 0x10(%ebp) + 12ebc: ff 75 d8 pushl 0xffffffd8(%ebp) + 12ebf: ff 75 08 pushl 0x8(%ebp) + 12ec2: e8 80 ea ff ff call 11947 <_finish_urb> + 12ec7: 83 c4 10 add $0x10,%esp + 12eca: 8b 45 08 mov 0x8(%ebp),%eax + 12ecd: c7 00 01 00 00 00 movl $0x1,(%eax) + 12ed3: 8b 45 ec mov 0xffffffec(%ebp),%eax + 12ed6: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 12ed9: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 12edc: 8b 00 mov (%eax),%eax + 12ede: 89 45 ec mov %eax,0xffffffec(%ebp) + 12ee1: e9 20 ff ff ff jmp 12e06 <_finish_unlinks+0x94> + 12ee6: 83 7d e8 00 cmpl $0x0,0xffffffe8(%ebp) + 12eea: 74 1b je 12f07 <_finish_unlinks+0x195> + 12eec: 83 ec 0c sub $0xc,%esp + 12eef: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 12ef2: 83 c0 20 add $0x20,%eax + 12ef5: 50 push %eax + 12ef6: e8 6d 01 00 00 call 13068 <_list_empty> + 12efb: 83 c4 10 add $0x10,%esp + 12efe: 85 c0 test %eax,%eax + 12f00: 75 05 jne 12f07 <_finish_unlinks+0x195> + 12f02: e9 dc fe ff ff jmp 12de3 <_finish_unlinks+0x71> + 12f07: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 12f0a: c6 40 28 00 movb $0x0,0x28(%eax) + 12f0e: 8b 55 f8 mov 0xfffffff8(%ebp),%edx + 12f11: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 12f14: 8b 00 mov (%eax),%eax + 12f16: 25 ff bf ff f7 and $0xf7ffbfff,%eax + 12f1b: 89 02 mov %eax,(%edx) + 12f1d: 8b 55 f8 mov 0xfffffff8(%ebp),%edx + 12f20: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 12f23: 8b 40 08 mov 0x8(%eax),%eax + 12f26: 83 e0 fe and $0xfffffffe,%eax + 12f29: 89 42 08 mov %eax,0x8(%edx) + 12f2c: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 12f2f: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) + 12f36: 83 ec 0c sub $0xc,%esp + 12f39: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 12f3c: 83 c0 20 add $0x20,%eax + 12f3f: 50 push %eax + 12f40: e8 23 01 00 00 call 13068 <_list_empty> + 12f45: 83 c4 10 add $0x10,%esp + 12f48: 85 c0 test %eax,%eax + 12f4a: 75 26 jne 12f72 <_finish_unlinks+0x200> + 12f4c: 8b 45 08 mov 0x8(%ebp),%eax + 12f4f: 83 b8 a4 01 00 00 00 cmpl $0x0,0x1a4(%eax) + 12f56: 75 1a jne 12f72 <_finish_unlinks+0x200> + 12f58: 8b 45 08 mov 0x8(%ebp),%eax + 12f5b: 83 b8 a8 01 00 00 00 cmpl $0x0,0x1a8(%eax) + 12f62: 75 0e jne 12f72 <_finish_unlinks+0x200> + 12f64: ff 75 f8 pushl 0xfffffff8(%ebp) + 12f67: ff 75 08 pushl 0x8(%ebp) + 12f6a: e8 43 ec ff ff call 11bb2 <_ed_schedule> + 12f6f: 83 c4 08 add $0x8,%esp + 12f72: 83 7d e4 00 cmpl $0x0,0xffffffe4(%ebp) + 12f76: 74 05 je 12f7d <_finish_unlinks+0x20b> + 12f78: e9 02 fe ff ff jmp 12d7f <_finish_unlinks+0xd> + 12f7d: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 12f80: 8b 00 mov (%eax),%eax + 12f82: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 12f85: e9 06 fe ff ff jmp 12d90 <_finish_unlinks+0x1e> + 12f8a: 8b 45 08 mov 0x8(%ebp),%eax + 12f8d: 83 b8 a4 01 00 00 00 cmpl $0x0,0x1a4(%eax) + 12f94: 0f 85 cc 00 00 00 jne 13066 <_finish_unlinks+0x2f4> + 12f9a: 8b 45 08 mov 0x8(%ebp),%eax + 12f9d: 83 78 10 00 cmpl $0x0,0x10(%eax) + 12fa1: 0f 85 bf 00 00 00 jne 13066 <_finish_unlinks+0x2f4> + 12fa7: c7 45 d0 00 00 00 00 movl $0x0,0xffffffd0(%ebp) + 12fae: c7 45 d4 00 00 00 00 movl $0x0,0xffffffd4(%ebp) + 12fb5: 8b 45 08 mov 0x8(%ebp),%eax + 12fb8: 83 78 18 00 cmpl $0x0,0x18(%eax) + 12fbc: 74 2e je 12fec <_finish_unlinks+0x27a> + 12fbe: 8d 45 d0 lea 0xffffffd0(%ebp),%eax + 12fc1: 83 08 02 orl $0x2,(%eax) + 12fc4: 8b 45 08 mov 0x8(%ebp),%eax + 12fc7: 8b 80 2c 02 00 00 mov 0x22c(%eax),%eax + 12fcd: c1 e8 04 shr $0x4,%eax + 12fd0: 83 e0 01 and $0x1,%eax + 12fd3: 85 c0 test %eax,%eax + 12fd5: 75 15 jne 12fec <_finish_unlinks+0x27a> + 12fd7: 8d 45 d4 lea 0xffffffd4(%ebp),%eax + 12fda: 83 08 10 orl $0x10,(%eax) + 12fdd: 8b 45 08 mov 0x8(%ebp),%eax + 12fe0: 8b 40 04 mov 0x4(%eax),%eax + 12fe3: 83 c0 24 add $0x24,%eax + 12fe6: c7 00 00 00 00 00 movl $0x0,(%eax) + 12fec: 8b 45 08 mov 0x8(%ebp),%eax + 12fef: 83 78 14 00 cmpl $0x0,0x14(%eax) + 12ff3: 74 2e je 13023 <_finish_unlinks+0x2b1> + 12ff5: 8d 45 d0 lea 0xffffffd0(%ebp),%eax + 12ff8: 83 08 04 orl $0x4,(%eax) + 12ffb: 8b 45 08 mov 0x8(%ebp),%eax + 12ffe: 8b 80 2c 02 00 00 mov 0x22c(%eax),%eax + 13004: c1 e8 05 shr $0x5,%eax + 13007: 83 e0 01 and $0x1,%eax + 1300a: 85 c0 test %eax,%eax + 1300c: 75 15 jne 13023 <_finish_unlinks+0x2b1> + 1300e: 8d 45 d4 lea 0xffffffd4(%ebp),%eax + 13011: 83 08 20 orl $0x20,(%eax) + 13014: 8b 45 08 mov 0x8(%ebp),%eax + 13017: 8b 40 04 mov 0x4(%eax),%eax + 1301a: 83 c0 2c add $0x2c,%eax + 1301d: c7 00 00 00 00 00 movl $0x0,(%eax) + 13023: 83 7d d4 00 cmpl $0x0,0xffffffd4(%ebp) + 13027: 74 29 je 13052 <_finish_unlinks+0x2e0> + 13029: 8b 4d 08 mov 0x8(%ebp),%ecx + 1302c: 8b 55 08 mov 0x8(%ebp),%edx + 1302f: 8b 45 d4 mov 0xffffffd4(%ebp),%eax + 13032: 0b 82 2c 02 00 00 or 0x22c(%edx),%eax + 13038: 89 81 2c 02 00 00 mov %eax,0x22c(%ecx) + 1303e: 8b 45 08 mov 0x8(%ebp),%eax + 13041: 8b 50 04 mov 0x4(%eax),%edx + 13044: 83 c2 04 add $0x4,%edx + 13047: 8b 45 08 mov 0x8(%ebp),%eax + 1304a: 8b 80 2c 02 00 00 mov 0x22c(%eax),%eax + 13050: 89 02 mov %eax,(%edx) + 13052: 83 7d d0 00 cmpl $0x0,0xffffffd0(%ebp) + 13056: 74 0e je 13066 <_finish_unlinks+0x2f4> + 13058: 8b 45 08 mov 0x8(%ebp),%eax + 1305b: 8b 50 04 mov 0x4(%eax),%edx + 1305e: 83 c2 08 add $0x8,%edx + 13061: 8b 45 d0 mov 0xffffffd0(%ebp),%eax + 13064: 89 02 mov %eax,(%edx) + 13066: c9 leave + 13067: c3 ret + +00013068 <_list_empty>: + 13068: 55 push %ebp + 13069: 89 e5 mov %esp,%ebp + 1306b: 8b 45 08 mov 0x8(%ebp),%eax + 1306e: 8b 00 mov (%eax),%eax + 13070: 3b 45 08 cmp 0x8(%ebp),%eax + 13073: 0f 94 c0 sete %al + 13076: 25 ff 00 00 00 and $0xff,%eax + 1307b: 5d pop %ebp + 1307c: c3 ret + +0001307d <_dl_done_list>: + 1307d: 55 push %ebp + 1307e: 89 e5 mov %esp,%ebp + 13080: 83 ec 18 sub $0x18,%esp + 13083: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) + 1308a: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) + 1308e: 0f 84 d1 00 00 00 je 13165 <_dl_done_list+0xe8> + 13094: 8b 45 0c mov 0xc(%ebp),%eax + 13097: 8b 40 1c mov 0x1c(%eax),%eax + 1309a: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 1309d: 8b 45 0c mov 0xc(%ebp),%eax + 130a0: 8b 40 20 mov 0x20(%eax),%eax + 130a3: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 130a6: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 130a9: 8b 40 08 mov 0x8(%eax),%eax + 130ac: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 130af: 8b 45 0c mov 0xc(%ebp),%eax + 130b2: 8b 40 14 mov 0x14(%eax),%eax + 130b5: 89 45 ec mov %eax,0xffffffec(%ebp) + 130b8: 83 ec 04 sub $0x4,%esp + 130bb: ff 75 0c pushl 0xc(%ebp) + 130be: ff 75 f4 pushl 0xfffffff4(%ebp) + 130c1: ff 75 08 pushl 0x8(%ebp) + 130c4: e8 3a f8 ff ff call 12903 <_td_done> + 130c9: 83 c4 10 add $0x10,%esp + 130cc: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 130cf: 66 ff 40 06 incw 0x6(%eax) + 130d3: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 130d6: 8b 55 f0 mov 0xfffffff0(%ebp),%edx + 130d9: 66 8b 40 06 mov 0x6(%eax),%ax + 130dd: 66 3b 42 04 cmp 0x4(%edx),%ax + 130e1: 75 1d jne 13100 <_dl_done_list+0x83> + 130e3: 83 ec 04 sub $0x4,%esp + 130e6: ff 75 10 pushl 0x10(%ebp) + 130e9: ff 75 f4 pushl 0xfffffff4(%ebp) + 130ec: ff 75 08 pushl 0x8(%ebp) + 130ef: e8 53 e8 ff ff call 11947 <_finish_urb> + 130f4: 83 c4 10 add $0x10,%esp + 130f7: 8b 45 08 mov 0x8(%ebp),%eax + 130fa: c7 00 01 00 00 00 movl $0x1,(%eax) + 13100: 8b 45 ec mov 0xffffffec(%ebp),%eax + 13103: 83 c0 20 add $0x20,%eax + 13106: 50 push %eax + 13107: e8 5c ff ff ff call 13068 <_list_empty> + 1310c: 83 c4 04 add $0x4,%esp + 1310f: 85 c0 test %eax,%eax + 13111: 74 10 je 13123 <_dl_done_list+0xa6> + 13113: ff 75 ec pushl 0xffffffec(%ebp) + 13116: ff 75 08 pushl 0x8(%ebp) + 13119: e8 6e ed ff ff call 11e8c <_ed_deschedule> + 1311e: 83 c4 08 add $0x8,%esp + 13121: eb 37 jmp 1315a <_dl_done_list+0xdd> + 13123: 8b 45 ec mov 0xffffffec(%ebp),%eax + 13126: 8b 00 mov (%eax),%eax + 13128: c1 e8 1b shr $0x1b,%eax + 1312b: 83 e0 01 and $0x1,%eax + 1312e: 85 c0 test %eax,%eax + 13130: 75 28 jne 1315a <_dl_done_list+0xdd> + 13132: 8b 45 ec mov 0xffffffec(%ebp),%eax + 13135: 8b 40 20 mov 0x20(%eax),%eax + 13138: 83 e8 2c sub $0x2c,%eax + 1313b: 89 45 0c mov %eax,0xc(%ebp) + 1313e: 8b 45 0c mov 0xc(%ebp),%eax + 13141: 8b 00 mov (%eax),%eax + 13143: c1 e8 11 shr $0x11,%eax + 13146: 83 e0 01 and $0x1,%eax + 13149: 85 c0 test %eax,%eax + 1314b: 75 0d jne 1315a <_dl_done_list+0xdd> + 1314d: 8b 45 ec mov 0xffffffec(%ebp),%eax + 13150: 8b 55 ec mov 0xffffffec(%ebp),%edx + 13153: 8b 12 mov (%edx),%edx + 13155: 80 e6 bf and $0xbf,%dh + 13158: 89 10 mov %edx,(%eax) + 1315a: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 1315d: 89 45 0c mov %eax,0xc(%ebp) + 13160: e9 25 ff ff ff jmp 1308a <_dl_done_list+0xd> + 13165: c9 leave + 13166: c3 ret + +00013167 <_ohci_urb_enqueue>: + 13167: 55 push %ebp + 13168: 89 e5 mov %esp,%ebp + 1316a: 56 push %esi + 1316b: 53 push %ebx + 1316c: 83 ec 50 sub $0x50,%esp + 1316f: 8b 45 08 mov 0x8(%ebp),%eax + 13172: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 13175: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 13178: 2d 34 02 00 00 sub $0x234,%eax + 1317d: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 13180: 8b 45 0c mov 0xc(%ebp),%eax + 13183: 8b 40 18 mov 0x18(%eax),%eax + 13186: 89 45 e8 mov %eax,0xffffffe8(%ebp) + 13189: c7 45 e0 00 00 00 00 movl $0x0,0xffffffe0(%ebp) + 13190: c7 45 d8 00 00 00 00 movl $0x0,0xffffffd8(%ebp) + 13197: 8b 45 0c mov 0xc(%ebp),%eax + 1319a: ff 70 48 pushl 0x48(%eax) + 1319d: ff 75 e8 pushl 0xffffffe8(%ebp) + 131a0: 8b 45 0c mov 0xc(%ebp),%eax + 131a3: ff 70 14 pushl 0x14(%eax) + 131a6: ff 75 f4 pushl 0xfffffff4(%ebp) + 131a9: e8 02 ef ff ff call 120b0 <_ed_get> + 131ae: 83 c4 10 add $0x10,%esp + 131b1: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 131b4: 83 7d f0 00 cmpl $0x0,0xfffffff0(%ebp) + 131b8: 75 0c jne 131c6 <_ohci_urb_enqueue+0x5f> + 131ba: c7 45 cc f4 ff ff ff movl $0xfffffff4,0xffffffcc(%ebp) + 131c1: e9 23 03 00 00 jmp 134e9 <_ohci_urb_enqueue+0x382> + 131c6: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 131c9: ba 00 00 00 00 mov $0x0,%edx + 131ce: 8a 50 29 mov 0x29(%eax),%dl + 131d1: 89 55 c0 mov %edx,0xffffffc0(%ebp) + 131d4: 83 7d c0 00 cmpl $0x0,0xffffffc0(%ebp) + 131d8: 0f 84 f7 00 00 00 je 132d5 <_ohci_urb_enqueue+0x16e> + 131de: 83 7d c0 02 cmpl $0x2,0xffffffc0(%ebp) + 131e2: 74 02 je 131e6 <_ohci_urb_enqueue+0x7f> + 131e4: eb 1f jmp 13205 <_ohci_urb_enqueue+0x9e> + 131e6: 8b 45 0c mov 0xc(%ebp),%eax + 131e9: 81 78 2c 00 10 00 00 cmpl $0x1000,0x2c(%eax) + 131f0: 7e 0c jle 131fe <_ohci_urb_enqueue+0x97> + 131f2: c7 45 cc a6 ff ff ff movl $0xffffffa6,0xffffffcc(%ebp) + 131f9: e9 eb 02 00 00 jmp 134e9 <_ohci_urb_enqueue+0x382> + 131fe: c7 45 e0 02 00 00 00 movl $0x2,0xffffffe0(%ebp) + 13205: 8b 45 0c mov 0xc(%ebp),%eax + 13208: 8b 40 2c mov 0x2c(%eax),%eax + 1320b: 89 45 c8 mov %eax,0xffffffc8(%ebp) + 1320e: 83 7d c8 00 cmpl $0x0,0xffffffc8(%ebp) + 13212: 79 07 jns 1321b <_ohci_urb_enqueue+0xb4> + 13214: 81 45 c8 ff 0f 00 00 addl $0xfff,0xffffffc8(%ebp) + 1321b: 8b 55 c8 mov 0xffffffc8(%ebp),%edx + 1321e: c1 fa 0c sar $0xc,%edx + 13221: 8d 45 e0 lea 0xffffffe0(%ebp),%eax + 13224: 01 10 add %edx,(%eax) + 13226: 8b 45 0c mov 0xc(%ebp),%eax + 13229: 8b 40 2c mov 0x2c(%eax),%eax + 1322c: 25 ff 0f 00 00 and $0xfff,%eax + 13231: 85 c0 test %eax,%eax + 13233: 74 05 je 1323a <_ohci_urb_enqueue+0xd3> + 13235: 8d 45 e0 lea 0xffffffe0(%ebp),%eax + 13238: ff 00 incl (%eax) + 1323a: 83 7d e0 00 cmpl $0x0,0xffffffe0(%ebp) + 1323e: 75 0a jne 1324a <_ohci_urb_enqueue+0xe3> + 13240: 8d 45 e0 lea 0xffffffe0(%ebp),%eax + 13243: ff 00 incl (%eax) + 13245: e9 94 00 00 00 jmp 132de <_ohci_urb_enqueue+0x177> + 1324a: 8b 45 0c mov 0xc(%ebp),%eax + 1324d: 8b 40 20 mov 0x20(%eax),%eax + 13250: c1 e8 06 shr $0x6,%eax + 13253: 83 e0 01 and $0x1,%eax + 13256: 85 c0 test %eax,%eax + 13258: 0f 84 80 00 00 00 je 132de <_ohci_urb_enqueue+0x177> + 1325e: 8b 45 0c mov 0xc(%ebp),%eax + 13261: 8b 40 2c mov 0x2c(%eax),%eax + 13264: 89 45 c4 mov %eax,0xffffffc4(%ebp) + 13267: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 1326a: c1 e8 07 shr $0x7,%eax + 1326d: 83 e0 01 and $0x1,%eax + 13270: 85 c0 test %eax,%eax + 13272: 75 2e jne 132a2 <_ohci_urb_enqueue+0x13b> + 13274: 8b 45 0c mov 0xc(%ebp),%eax + 13277: 8b 40 14 mov 0x14(%eax),%eax + 1327a: 89 45 b8 mov %eax,0xffffffb8(%ebp) + 1327d: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 13280: c1 e8 0f shr $0xf,%eax + 13283: 83 e0 0f and $0xf,%eax + 13286: 89 45 b4 mov %eax,0xffffffb4(%ebp) + 13289: 8b 45 c4 mov 0xffffffc4(%ebp),%eax + 1328c: 8b 4d b4 mov 0xffffffb4(%ebp),%ecx + 1328f: 8b 5d b8 mov 0xffffffb8(%ebp),%ebx + 13292: 99 cltd + 13293: f7 7c 8b 78 idivl 0x78(%ebx,%ecx,4) + 13297: 89 55 b8 mov %edx,0xffffffb8(%ebp) + 1329a: 83 7d b8 00 cmpl $0x0,0xffffffb8(%ebp) + 1329e: 75 3e jne 132de <_ohci_urb_enqueue+0x177> + 132a0: eb 2c jmp 132ce <_ohci_urb_enqueue+0x167> + 132a2: 8b 45 0c mov 0xc(%ebp),%eax + 132a5: 8b 40 14 mov 0x14(%eax),%eax + 132a8: 89 45 b8 mov %eax,0xffffffb8(%ebp) + 132ab: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 132ae: c1 e8 0f shr $0xf,%eax + 132b1: 83 e0 0f and $0xf,%eax + 132b4: 89 45 b4 mov %eax,0xffffffb4(%ebp) + 132b7: 8b 45 c4 mov 0xffffffc4(%ebp),%eax + 132ba: 8b 4d b4 mov 0xffffffb4(%ebp),%ecx + 132bd: 8b 5d b8 mov 0xffffffb8(%ebp),%ebx + 132c0: 99 cltd + 132c1: f7 7c 8b 38 idivl 0x38(%ebx,%ecx,4) + 132c5: 89 55 b8 mov %edx,0xffffffb8(%ebp) + 132c8: 83 7d b8 00 cmpl $0x0,0xffffffb8(%ebp) + 132cc: 75 10 jne 132de <_ohci_urb_enqueue+0x177> + 132ce: 8d 45 e0 lea 0xffffffe0(%ebp),%eax + 132d1: ff 00 incl (%eax) + 132d3: eb 09 jmp 132de <_ohci_urb_enqueue+0x177> + 132d5: 8b 45 0c mov 0xc(%ebp),%eax + 132d8: 8b 40 44 mov 0x44(%eax),%eax + 132db: 89 45 e0 mov %eax,0xffffffe0(%ebp) + 132de: 83 ec 08 sub $0x8,%esp + 132e1: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 132e4: c1 e0 02 shl $0x2,%eax + 132e7: 83 c0 0c add $0xc,%eax + 132ea: 50 push %eax + 132eb: 6a 01 push $0x1 + 132ed: e8 7e 12 00 00 call 14570 <_ExAllocatePool@8> + 132f2: 83 c4 08 add $0x8,%esp + 132f5: 89 45 ec mov %eax,0xffffffec(%ebp) + 132f8: 83 7d ec 00 cmpl $0x0,0xffffffec(%ebp) + 132fc: 75 0c jne 1330a <_ohci_urb_enqueue+0x1a3> + 132fe: c7 45 cc f4 ff ff ff movl $0xfffffff4,0xffffffcc(%ebp) + 13305: e9 df 01 00 00 jmp 134e9 <_ohci_urb_enqueue+0x382> + 1330a: 83 ec 04 sub $0x4,%esp + 1330d: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 13310: c1 e0 02 shl $0x2,%eax + 13313: 83 c0 0c add $0xc,%eax + 13316: 50 push %eax + 13317: 6a 00 push $0x0 + 13319: ff 75 ec pushl 0xffffffec(%ebp) + 1331c: e8 7f 12 00 00 call 145a0 <_memset> + 13321: 83 c4 10 add $0x10,%esp + 13324: 8b 55 ec mov 0xffffffec(%ebp),%edx + 13327: 8b 45 e0 mov 0xffffffe0(%ebp),%eax + 1332a: 66 89 42 04 mov %ax,0x4(%edx) + 1332e: 8b 55 ec mov 0xffffffec(%ebp),%edx + 13331: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 13334: 89 02 mov %eax,(%edx) + 13336: c7 45 e4 00 00 00 00 movl $0x0,0xffffffe4(%ebp) + 1333d: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 13340: 3b 45 e0 cmp 0xffffffe0(%ebp),%eax + 13343: 7d 56 jge 1339b <_ohci_urb_enqueue+0x234> + 13345: 8b 5d ec mov 0xffffffec(%ebp),%ebx + 13348: 8b 75 e4 mov 0xffffffe4(%ebp),%esi + 1334b: 83 ec 08 sub $0x8,%esp + 1334e: ff 75 10 pushl 0x10(%ebp) + 13351: ff 75 f4 pushl 0xfffffff4(%ebp) + 13354: e8 28 e4 ff ff call 11781 <_td_alloc> + 13359: 83 c4 10 add $0x10,%esp + 1335c: 89 44 b3 0c mov %eax,0xc(%ebx,%esi,4) + 13360: 8b 55 ec mov 0xffffffec(%ebp),%edx + 13363: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 13366: 83 7c 82 0c 00 cmpl $0x0,0xc(%edx,%eax,4) + 1336b: 75 27 jne 13394 <_ohci_urb_enqueue+0x22d> + 1336d: 8b 55 ec mov 0xffffffec(%ebp),%edx + 13370: 8b 45 e4 mov 0xffffffe4(%ebp),%eax + 13373: 66 89 42 04 mov %ax,0x4(%edx) + 13377: 83 ec 08 sub $0x8,%esp + 1337a: ff 75 ec pushl 0xffffffec(%ebp) + 1337d: ff 75 f4 pushl 0xfffffff4(%ebp) + 13380: e8 5c e5 ff ff call 118e1 <_urb_free_priv> + 13385: 83 c4 10 add $0x10,%esp + 13388: c7 45 cc f4 ff ff ff movl $0xfffffff4,0xffffffcc(%ebp) + 1338f: e9 55 01 00 00 jmp 134e9 <_ohci_urb_enqueue+0x382> + 13394: 8d 45 e4 lea 0xffffffe4(%ebp),%eax + 13397: ff 00 incl (%eax) + 13399: eb a2 jmp 1333d <_ohci_urb_enqueue+0x1d6> + 1339b: c7 45 dc 00 00 00 00 movl $0x0,0xffffffdc(%ebp) + 133a2: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 133a5: 83 b8 a4 01 00 00 00 cmpl $0x0,0x1a4(%eax) + 133ac: 75 0e jne 133bc <_ohci_urb_enqueue+0x255> + 133ae: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 133b1: 83 b8 a8 01 00 00 00 cmpl $0x0,0x1a8(%eax) + 133b8: 75 02 jne 133bc <_ohci_urb_enqueue+0x255> + 133ba: eb 0c jmp 133c8 <_ohci_urb_enqueue+0x261> + 133bc: c7 45 d8 ed ff ff ff movl $0xffffffed,0xffffffd8(%ebp) + 133c3: e9 04 01 00 00 jmp 134cc <_ohci_urb_enqueue+0x365> + 133c8: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 133cb: 80 78 28 00 cmpb $0x0,0x28(%eax) + 133cf: 0f 85 b0 00 00 00 jne 13485 <_ohci_urb_enqueue+0x31e> + 133d5: ff 75 f0 pushl 0xfffffff0(%ebp) + 133d8: ff 75 f4 pushl 0xfffffff4(%ebp) + 133db: e8 d2 e7 ff ff call 11bb2 <_ed_schedule> + 133e0: 83 c4 08 add $0x8,%esp + 133e3: 89 45 d8 mov %eax,0xffffffd8(%ebp) + 133e6: 83 7d d8 00 cmpl $0x0,0xffffffd8(%ebp) + 133ea: 79 05 jns 133f1 <_ohci_urb_enqueue+0x28a> + 133ec: e9 db 00 00 00 jmp 134cc <_ohci_urb_enqueue+0x365> + 133f1: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 133f4: 80 78 29 00 cmpb $0x0,0x29(%eax) + 133f8: 0f 85 b4 00 00 00 jne 134b2 <_ohci_urb_enqueue+0x34b> + 133fe: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 13401: 8b 40 08 mov 0x8(%eax),%eax + 13404: 66 8b 80 80 00 00 00 mov 0x80(%eax),%ax + 1340b: 66 89 45 d6 mov %ax,0xffffffd6(%ebp) + 1340f: 66 c7 45 d4 08 00 movw $0x8,0xffffffd4(%ebp) + 13415: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 13418: 66 8b 40 2c mov 0x2c(%eax),%ax + 1341c: 66 89 45 d2 mov %ax,0xffffffd2(%ebp) + 13420: 8b 45 d4 mov 0xffffffd4(%ebp),%eax + 13423: 66 3b 45 d2 cmp 0xffffffd2(%ebp),%ax + 13427: 76 10 jbe 13439 <_ohci_urb_enqueue+0x2d2> + 13429: 8b 45 d4 mov 0xffffffd4(%ebp),%eax + 1342c: 89 c2 mov %eax,%edx + 1342e: 81 e2 ff ff 00 00 and $0xffff,%edx + 13434: 89 55 bc mov %edx,0xffffffbc(%ebp) + 13437: eb 0f jmp 13448 <_ohci_urb_enqueue+0x2e1> + 13439: 66 8b 45 d2 mov 0xffffffd2(%ebp),%ax + 1343d: 89 c1 mov %eax,%ecx + 1343f: 81 e1 ff ff 00 00 and $0xffff,%ecx + 13445: 89 4d bc mov %ecx,0xffffffbc(%ebp) + 13448: 8d 45 d6 lea 0xffffffd6(%ebp),%eax + 1344b: 8b 5d bc mov 0xffffffbc(%ebp),%ebx + 1344e: 66 01 18 add %bx,(%eax) + 13451: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 13454: 66 8b 40 2c mov 0x2c(%eax),%ax + 13458: 48 dec %eax + 13459: 89 c2 mov %eax,%edx + 1345b: f7 d2 not %edx + 1345d: 8d 45 d6 lea 0xffffffd6(%ebp),%eax + 13460: 66 21 10 and %dx,(%eax) + 13463: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 13466: ba 00 00 00 00 mov $0x0,%edx + 1346b: 8a 50 2a mov 0x2a(%eax),%dl + 1346e: 8d 45 d6 lea 0xffffffd6(%ebp),%eax + 13471: 66 09 10 or %dx,(%eax) + 13474: 8b 55 0c mov 0xc(%ebp),%edx + 13477: 66 8b 45 d6 mov 0xffffffd6(%ebp),%ax + 1347b: 25 ff ff 00 00 and $0xffff,%eax + 13480: 89 42 40 mov %eax,0x40(%edx) + 13483: eb 2d jmp 134b2 <_ohci_urb_enqueue+0x34b> + 13485: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 13488: 80 78 29 00 cmpb $0x0,0x29(%eax) + 1348c: 75 24 jne 134b2 <_ohci_urb_enqueue+0x34b> + 1348e: 8b 4d 0c mov 0xc(%ebp),%ecx + 13491: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 13494: 66 8b 40 30 mov 0x30(%eax),%ax + 13498: 89 c2 mov %eax,%edx + 1349a: 81 e2 ff ff 00 00 and $0xffff,%edx + 134a0: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 134a3: 66 8b 40 2c mov 0x2c(%eax),%ax + 134a7: 25 ff ff 00 00 and $0xffff,%eax + 134ac: 8d 04 02 lea (%edx,%eax,1),%eax + 134af: 89 41 40 mov %eax,0x40(%ecx) + 134b2: 8b 55 0c mov 0xc(%ebp),%edx + 134b5: 8b 45 ec mov 0xffffffec(%ebp),%eax + 134b8: 89 42 08 mov %eax,0x8(%edx) + 134bb: 83 ec 08 sub $0x8,%esp + 134be: ff 75 0c pushl 0xc(%ebp) + 134c1: ff 75 f4 pushl 0xfffffff4(%ebp) + 134c4: e8 a4 f0 ff ff call 1256d <_td_submit_urb> + 134c9: 83 c4 10 add $0x10,%esp + 134cc: 83 7d d8 00 cmpl $0x0,0xffffffd8(%ebp) + 134d0: 74 11 je 134e3 <_ohci_urb_enqueue+0x37c> + 134d2: 83 ec 08 sub $0x8,%esp + 134d5: ff 75 ec pushl 0xffffffec(%ebp) + 134d8: ff 75 f4 pushl 0xfffffff4(%ebp) + 134db: e8 01 e4 ff ff call 118e1 <_urb_free_priv> + 134e0: 83 c4 10 add $0x10,%esp + 134e3: 8b 45 d8 mov 0xffffffd8(%ebp),%eax + 134e6: 89 45 cc mov %eax,0xffffffcc(%ebp) + 134e9: 8b 45 cc mov 0xffffffcc(%ebp),%eax + 134ec: 8d 65 f8 lea 0xfffffff8(%ebp),%esp + 134ef: 5b pop %ebx + 134f0: 5e pop %esi + 134f1: 5d pop %ebp + 134f2: c3 ret + +000134f3 <_ohci_urb_dequeue>: + 134f3: 55 push %ebp + 134f4: 89 e5 mov %esp,%ebp + 134f6: 83 ec 18 sub $0x18,%esp + 134f9: 8b 45 08 mov 0x8(%ebp),%eax + 134fc: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 134ff: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 13502: 2d 34 02 00 00 sub $0x234,%eax + 13507: 89 45 fc mov %eax,0xfffffffc(%ebp) + 1350a: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 13511: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13514: 83 b8 a4 01 00 00 00 cmpl $0x0,0x1a4(%eax) + 1351b: 75 36 jne 13553 <_ohci_urb_dequeue+0x60> + 1351d: 8b 45 0c mov 0xc(%ebp),%eax + 13520: 8b 40 08 mov 0x8(%eax),%eax + 13523: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 13526: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) + 1352a: 74 4c je 13578 <_ohci_urb_dequeue+0x85> + 1352c: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 1352f: c7 40 08 01 00 00 00 movl $0x1,0x8(%eax) + 13536: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 13539: 8b 00 mov (%eax),%eax + 1353b: 80 78 28 02 cmpb $0x2,0x28(%eax) + 1353f: 75 37 jne 13578 <_ohci_urb_dequeue+0x85> + 13541: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 13544: ff 30 pushl (%eax) + 13546: ff 75 fc pushl 0xfffffffc(%ebp) + 13549: e8 be ed ff ff call 1230c <_start_urb_unlink> + 1354e: 83 c4 08 add $0x8,%esp + 13551: eb 25 jmp 13578 <_ohci_urb_dequeue+0x85> + 13553: 8b 45 0c mov 0xc(%ebp),%eax + 13556: 83 78 08 00 cmpl $0x0,0x8(%eax) + 1355a: 74 1c je 13578 <_ohci_urb_dequeue+0x85> + 1355c: 83 ec 04 sub $0x4,%esp + 1355f: 6a 00 push $0x0 + 13561: ff 75 0c pushl 0xc(%ebp) + 13564: ff 75 fc pushl 0xfffffffc(%ebp) + 13567: e8 db e3 ff ff call 11947 <_finish_urb> + 1356c: 83 c4 10 add $0x10,%esp + 1356f: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13572: c7 00 01 00 00 00 movl $0x1,(%eax) + 13578: b8 00 00 00 00 mov $0x0,%eax + 1357d: c9 leave + 1357e: c3 ret + +0001357f <_ohci_endpoint_disable>: + 1357f: 55 push %ebp + 13580: 89 e5 mov %esp,%ebp + 13582: 83 ec 18 sub $0x18,%esp + 13585: 8b 45 08 mov 0x8(%ebp),%eax + 13588: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 1358b: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 1358e: 2d 34 02 00 00 sub $0x234,%eax + 13593: 89 45 fc mov %eax,0xfffffffc(%ebp) + 13596: 8b 45 10 mov 0x10(%ebp),%eax + 13599: 83 e0 0f and $0xf,%eax + 1359c: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 1359f: 8d 45 f8 lea 0xfffffff8(%ebp),%eax + 135a2: d1 20 shll (%eax) + 135a4: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) + 135a8: 74 13 je 135bd <_ohci_endpoint_disable+0x3e> + 135aa: 8b 45 10 mov 0x10(%ebp),%eax + 135ad: c1 e8 07 shr $0x7,%eax + 135b0: 83 e0 01 and $0x1,%eax + 135b3: 85 c0 test %eax,%eax + 135b5: 75 06 jne 135bd <_ohci_endpoint_disable+0x3e> + 135b7: 8d 45 f8 lea 0xfffffff8(%ebp),%eax + 135ba: 83 08 01 orl $0x1,(%eax) + 135bd: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) + 135c4: 8b 45 0c mov 0xc(%ebp),%eax + 135c7: 8b 55 f8 mov 0xfffffff8(%ebp),%edx + 135ca: 8b 44 90 10 mov 0x10(%eax,%edx,4),%eax + 135ce: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 135d1: 83 7d f0 00 cmpl $0x0,0xfffffff0(%ebp) + 135d5: 75 05 jne 135dc <_ohci_endpoint_disable+0x5d> + 135d7: e9 ac 00 00 00 jmp 13688 <_ohci_endpoint_disable+0x109> + 135dc: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 135df: 8b 80 14 03 00 00 mov 0x314(%eax),%eax + 135e5: 83 e0 01 and $0x1,%eax + 135e8: 85 c0 test %eax,%eax + 135ea: 74 0e je 135fa <_ohci_endpoint_disable+0x7b> + 135ec: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 135ef: 83 b8 a4 01 00 00 00 cmpl $0x0,0x1a4(%eax) + 135f6: 75 02 jne 135fa <_ohci_endpoint_disable+0x7b> + 135f8: eb 07 jmp 13601 <_ohci_endpoint_disable+0x82> + 135fa: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 135fd: c6 40 28 00 movb $0x0,0x28(%eax) + 13601: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 13604: ba 00 00 00 00 mov $0x0,%edx + 13609: 8a 50 28 mov 0x28(%eax),%dl + 1360c: 89 55 ec mov %edx,0xffffffec(%ebp) + 1360f: 83 7d ec 00 cmpl $0x0,0xffffffec(%ebp) + 13613: 74 17 je 1362c <_ohci_endpoint_disable+0xad> + 13615: 83 7d ec 01 cmpl $0x1,0xffffffec(%ebp) + 13619: 74 02 je 1361d <_ohci_endpoint_disable+0x9e> + 1361b: eb 49 jmp 13666 <_ohci_endpoint_disable+0xe7> + 1361d: 83 ec 0c sub $0xc,%esp + 13620: 6a 01 push $0x1 + 13622: e8 9d 0d 00 00 call 143c4 <_my_schedule_timeout> + 13627: 83 c4 10 add $0x10,%esp + 1362a: eb 91 jmp 135bd <_ohci_endpoint_disable+0x3e> + 1362c: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 1362f: 83 c0 20 add $0x20,%eax + 13632: 50 push %eax + 13633: e8 30 fa ff ff call 13068 <_list_empty> + 13638: 83 c4 04 add $0x4,%esp + 1363b: 85 c0 test %eax,%eax + 1363d: 74 27 je 13666 <_ohci_endpoint_disable+0xe7> + 1363f: 83 ec 08 sub $0x8,%esp + 13642: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 13645: ff 70 14 pushl 0x14(%eax) + 13648: ff 75 fc pushl 0xfffffffc(%ebp) + 1364b: e8 aa e1 ff ff call 117fa <_td_free> + 13650: 83 c4 10 add $0x10,%esp + 13653: 83 ec 08 sub $0x8,%esp + 13656: ff 75 f0 pushl 0xfffffff0(%ebp) + 13659: ff 75 fc pushl 0xfffffffc(%ebp) + 1365c: e8 6a e2 ff ff call 118cb <_ed_free> + 13661: 83 c4 10 add $0x10,%esp + 13664: eb 14 jmp 1367a <_ohci_endpoint_disable+0xfb> + 13666: 83 ec 08 sub $0x8,%esp + 13669: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 1366c: ff 70 14 pushl 0x14(%eax) + 1366f: ff 75 fc pushl 0xfffffffc(%ebp) + 13672: e8 83 e1 ff ff call 117fa <_td_free> + 13677: 83 c4 10 add $0x10,%esp + 1367a: 8b 55 0c mov 0xc(%ebp),%edx + 1367d: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 13680: c7 44 82 10 00 00 00 movl $0x0,0x10(%edx,%eax,4) + 13687: 00 + 13688: c9 leave + 13689: c3 ret + +0001368a <_ohci_get_frame>: + 1368a: 55 push %ebp + 1368b: 89 e5 mov %esp,%ebp + 1368d: 83 ec 08 sub $0x8,%esp + 13690: 8b 45 08 mov 0x8(%ebp),%eax + 13693: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 13696: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 13699: 2d 34 02 00 00 sub $0x234,%eax + 1369e: 89 45 fc mov %eax,0xfffffffc(%ebp) + 136a1: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 136a4: 8b 40 08 mov 0x8(%eax),%eax + 136a7: 66 8b 80 80 00 00 00 mov 0x80(%eax),%ax + 136ae: 25 ff ff 00 00 and $0xffff,%eax + 136b3: c9 leave + 136b4: c3 ret + +000136b5 <_hc_reset>: + 136b5: 55 push %ebp + 136b6: 89 e5 mov %esp,%ebp + 136b8: 83 ec 18 sub $0x18,%esp + 136bb: 8b 45 08 mov 0x8(%ebp),%eax + 136be: 8b 40 04 mov 0x4(%eax),%eax + 136c1: 83 c0 14 add $0x14,%eax + 136c4: c7 00 00 00 00 80 movl $0x80000000,(%eax) + 136ca: 8b 45 08 mov 0x8(%ebp),%eax + 136cd: 8b 40 04 mov 0x4(%eax),%eax + 136d0: 83 c0 0c add $0xc,%eax + 136d3: 8b 00 mov (%eax),%eax + 136d5: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 136d8: 8b 45 08 mov 0x8(%ebp),%eax + 136db: 8b 50 04 mov 0x4(%eax),%edx + 136de: 83 c2 0c add $0xc,%edx + 136e1: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 136e4: 89 02 mov %eax,(%edx) + 136e6: 8b 45 08 mov 0x8(%ebp),%eax + 136e9: 8b 40 04 mov 0x4(%eax),%eax + 136ec: 83 c0 04 add $0x4,%eax + 136ef: 8b 00 mov (%eax),%eax + 136f1: c1 e8 08 shr $0x8,%eax + 136f4: 83 e0 01 and $0x1,%eax + 136f7: 85 c0 test %eax,%eax + 136f9: 74 1f je 1371a <_hc_reset+0x65> + 136fb: 8b 45 08 mov 0x8(%ebp),%eax + 136fe: 8b 40 04 mov 0x4(%eax),%eax + 13701: 83 c0 04 add $0x4,%eax + 13704: 8b 00 mov (%eax),%eax + 13706: 80 e4 fe and $0xfe,%ah + 13709: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 1370c: 8b 45 08 mov 0x8(%ebp),%eax + 1370f: 8b 50 04 mov 0x4(%eax),%edx + 13712: 83 c2 04 add $0x4,%edx + 13715: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 13718: 89 02 mov %eax,(%edx) + 1371a: 8b 55 08 mov 0x8(%ebp),%edx + 1371d: 8b 45 08 mov 0x8(%ebp),%eax + 13720: 8b 40 04 mov 0x4(%eax),%eax + 13723: 83 c0 04 add $0x4,%eax + 13726: 8b 00 mov (%eax),%eax + 13728: 89 82 2c 02 00 00 mov %eax,0x22c(%edx) + 1372e: 8b 55 08 mov 0x8(%ebp),%edx + 13731: 8b 45 08 mov 0x8(%ebp),%eax + 13734: 8b 80 2c 02 00 00 mov 0x22c(%eax),%eax + 1373a: 25 00 02 00 00 and $0x200,%eax + 1373f: 89 82 2c 02 00 00 mov %eax,0x22c(%edx) + 13745: 8b 45 08 mov 0x8(%ebp),%eax + 13748: 8b 50 04 mov 0x4(%eax),%edx + 1374b: 83 c2 04 add $0x4,%edx + 1374e: 8b 45 08 mov 0x8(%ebp),%eax + 13751: 8b 80 2c 02 00 00 mov 0x22c(%eax),%eax + 13757: 89 02 mov %eax,(%edx) + 13759: 8b 45 08 mov 0x8(%ebp),%eax + 1375c: 8b 40 04 mov 0x4(%eax),%eax + 1375f: 83 c0 04 add $0x4,%eax + 13762: 8b 00 mov (%eax),%eax + 13764: 83 ec 0c sub $0xc,%esp + 13767: 6a 32 push $0x32 + 13769: e8 92 08 00 00 call 14000 <_wait_ms> + 1376e: 83 c4 10 add $0x10,%esp + 13771: 8b 45 08 mov 0x8(%ebp),%eax + 13774: 8b 40 04 mov 0x4(%eax),%eax + 13777: 83 c0 08 add $0x8,%eax + 1377a: c7 00 01 00 00 00 movl $0x1,(%eax) + 13780: c7 45 fc 1e 00 00 00 movl $0x1e,0xfffffffc(%ebp) + 13787: 8b 45 08 mov 0x8(%ebp),%eax + 1378a: 8b 40 04 mov 0x4(%eax),%eax + 1378d: 83 c0 08 add $0x8,%eax + 13790: 8b 00 mov (%eax),%eax + 13792: 83 e0 01 and $0x1,%eax + 13795: 85 c0 test %eax,%eax + 13797: 74 23 je 137bc <_hc_reset+0x107> + 13799: 8d 45 fc lea 0xfffffffc(%ebp),%eax + 1379c: ff 08 decl (%eax) + 1379e: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) + 137a2: 75 09 jne 137ad <_hc_reset+0xf8> + 137a4: c7 45 f0 ff ff ff ff movl $0xffffffff,0xfffffff0(%ebp) + 137ab: eb 35 jmp 137e2 <_hc_reset+0x12d> + 137ad: 83 ec 0c sub $0xc,%esp + 137b0: 6a 01 push $0x1 + 137b2: e8 49 08 00 00 call 14000 <_wait_ms> + 137b7: 83 c4 10 add $0x10,%esp + 137ba: eb cb jmp 13787 <_hc_reset+0xd2> + 137bc: 8b 45 08 mov 0x8(%ebp),%eax + 137bf: 8b 50 04 mov 0x4(%eax),%edx + 137c2: 83 c2 04 add $0x4,%edx + 137c5: 8b 45 08 mov 0x8(%ebp),%eax + 137c8: 8b 80 2c 02 00 00 mov 0x22c(%eax),%eax + 137ce: 89 02 mov %eax,(%edx) + 137d0: 8b 45 08 mov 0x8(%ebp),%eax + 137d3: 8b 40 04 mov 0x4(%eax),%eax + 137d6: 83 c0 04 add $0x4,%eax + 137d9: 8b 00 mov (%eax),%eax + 137db: c7 45 f0 00 00 00 00 movl $0x0,0xfffffff0(%ebp) + 137e2: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 137e5: c9 leave + 137e6: c3 ret + +000137e7 <_hc_start>: + 137e7: 55 push %ebp + 137e8: 89 e5 mov %esp,%ebp + 137ea: 53 push %ebx + 137eb: 83 ec 14 sub $0x14,%esp + 137ee: 8b 45 08 mov 0x8(%ebp),%eax + 137f1: c7 80 a4 01 00 00 01 movl $0x1,0x1a4(%eax) + 137f8: 00 00 00 + 137fb: 8b 45 08 mov 0x8(%ebp),%eax + 137fe: c7 80 a8 01 00 00 00 movl $0x0,0x1a8(%eax) + 13805: 00 00 00 + 13808: 8b 45 08 mov 0x8(%ebp),%eax + 1380b: 8b 40 04 mov 0x4(%eax),%eax + 1380e: 83 c0 20 add $0x20,%eax + 13811: c7 00 00 00 00 00 movl $0x0,(%eax) + 13817: 8b 45 08 mov 0x8(%ebp),%eax + 1381a: 8b 40 04 mov 0x4(%eax),%eax + 1381d: 83 c0 28 add $0x28,%eax + 13820: c7 00 00 00 00 00 movl $0x0,(%eax) + 13826: 8b 45 08 mov 0x8(%ebp),%eax + 13829: 8b 50 04 mov 0x4(%eax),%edx + 1382c: 83 c2 18 add $0x18,%edx + 1382f: 8b 45 08 mov 0x8(%ebp),%eax + 13832: 8b 40 0c mov 0xc(%eax),%eax + 13835: 89 02 mov %eax,(%edx) + 13837: 8b 45 08 mov 0x8(%ebp),%eax + 1383a: 8b 40 04 mov 0x4(%eax),%eax + 1383d: 83 c0 34 add $0x34,%eax + 13840: c7 00 df 2e 78 27 movl $0x27782edf,(%eax) + 13846: 8b 45 08 mov 0x8(%ebp),%eax + 13849: 8b 40 04 mov 0x4(%eax),%eax + 1384c: 83 c0 40 add $0x40,%eax + 1384f: c7 00 2f 2a 00 00 movl $0x2a2f,(%eax) + 13855: 8b 45 08 mov 0x8(%ebp),%eax + 13858: 8b 40 04 mov 0x4(%eax),%eax + 1385b: 83 c0 44 add $0x44,%eax + 1385e: c7 00 28 06 00 00 movl $0x628,(%eax) + 13864: 8b 45 08 mov 0x8(%ebp),%eax + 13867: 8b 40 04 mov 0x4(%eax),%eax + 1386a: 83 c0 34 add $0x34,%eax + 1386d: 8b 00 mov (%eax),%eax + 1386f: 25 00 00 ff 3f and $0x3fff0000,%eax + 13874: 85 c0 test %eax,%eax + 13876: 74 0f je 13887 <_hc_start+0xa0> + 13878: 8b 45 08 mov 0x8(%ebp),%eax + 1387b: 8b 40 04 mov 0x4(%eax),%eax + 1387e: 83 c0 40 add $0x40,%eax + 13881: 8b 00 mov (%eax),%eax + 13883: 85 c0 test %eax,%eax + 13885: 75 0c jne 13893 <_hc_start+0xac> + 13887: c7 45 e8 b5 ff ff ff movl $0xffffffb5,0xffffffe8(%ebp) + 1388e: e9 22 02 00 00 jmp 13ab5 <_hc_start+0x2ce> + 13893: 8b 55 08 mov 0x8(%ebp),%edx + 13896: 8b 45 08 mov 0x8(%ebp),%eax + 13899: 8b 80 2c 02 00 00 mov 0x22c(%eax),%eax + 1389f: 25 00 02 00 00 and $0x200,%eax + 138a4: 89 82 2c 02 00 00 mov %eax,0x22c(%edx) + 138aa: 8b 55 08 mov 0x8(%ebp),%edx + 138ad: 8b 45 08 mov 0x8(%ebp),%eax + 138b0: 8b 80 2c 02 00 00 mov 0x22c(%eax),%eax + 138b6: 0c 8f or $0x8f,%al + 138b8: 89 82 2c 02 00 00 mov %eax,0x22c(%edx) + 138be: 8b 45 08 mov 0x8(%ebp),%eax + 138c1: c7 80 a4 01 00 00 00 movl $0x0,0x1a4(%eax) + 138c8: 00 00 00 + 138cb: 8b 45 08 mov 0x8(%ebp),%eax + 138ce: 8b 50 04 mov 0x4(%eax),%edx + 138d1: 83 c2 04 add $0x4,%edx + 138d4: 8b 45 08 mov 0x8(%ebp),%eax + 138d7: 8b 80 2c 02 00 00 mov 0x22c(%eax),%eax + 138dd: 89 02 mov %eax,(%edx) + 138df: c7 45 f8 12 00 00 80 movl $0x80000012,0xfffffff8(%ebp) + 138e6: 8b 45 08 mov 0x8(%ebp),%eax + 138e9: 8b 50 04 mov 0x4(%eax),%edx + 138ec: 83 c2 0c add $0xc,%edx + 138ef: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 138f2: 89 02 mov %eax,(%edx) + 138f4: 8b 45 08 mov 0x8(%ebp),%eax + 138f7: 8b 50 04 mov 0x4(%eax),%edx + 138fa: 83 c2 10 add $0x10,%edx + 138fd: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 13900: 89 02 mov %eax,(%edx) + 13902: 83 ec 0c sub $0xc,%esp + 13905: ff 75 08 pushl 0x8(%ebp) + 13908: e8 f3 d6 ff ff call 11000 <__end__> + 1390d: 83 c4 10 add $0x10,%esp + 13910: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 13913: 8d 45 f4 lea 0xfffffff4(%ebp),%eax + 13916: 81 20 ff f6 ff ff andl $0xfffff6ff,(%eax) + 1391c: 8b 45 08 mov 0x8(%ebp),%eax + 1391f: 8b 80 30 02 00 00 mov 0x230(%eax),%eax + 13925: d1 e8 shr %eax + 13927: 83 e0 01 and $0x1,%eax + 1392a: 85 c0 test %eax,%eax + 1392c: 74 14 je 13942 <_hc_start+0x15b> + 1392e: 8d 45 f4 lea 0xfffffff4(%ebp),%eax + 13931: 81 08 00 10 00 00 orl $0x1000,(%eax) + 13937: 8d 45 f4 lea 0xfffffff4(%ebp),%eax + 1393a: 81 20 ff fd ff 00 andl $0xfffdff,(%eax) + 13940: eb 09 jmp 1394b <_hc_start+0x164> + 13942: 8d 45 f4 lea 0xfffffff4(%ebp),%eax + 13945: 81 08 00 02 00 00 orl $0x200,(%eax) + 1394b: 8b 45 08 mov 0x8(%ebp),%eax + 1394e: 8b 50 04 mov 0x4(%eax),%edx + 13951: 83 c2 48 add $0x48,%edx + 13954: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 13957: 89 02 mov %eax,(%edx) + 13959: 8b 45 08 mov 0x8(%ebp),%eax + 1395c: 8b 40 04 mov 0x4(%eax),%eax + 1395f: 83 c0 50 add $0x50,%eax + 13962: c7 00 00 00 01 00 movl $0x10000,(%eax) + 13968: 8b 45 08 mov 0x8(%ebp),%eax + 1396b: 8b 40 04 mov 0x4(%eax),%eax + 1396e: 83 c0 4c add $0x4c,%eax + 13971: c7 00 00 00 00 00 movl $0x0,(%eax) + 13977: 8b 45 08 mov 0x8(%ebp),%eax + 1397a: 8b 40 04 mov 0x4(%eax),%eax + 1397d: 83 c0 04 add $0x4,%eax + 13980: 8b 00 mov (%eax),%eax + 13982: 83 ec 0c sub $0xc,%esp + 13985: ff 75 08 pushl 0x8(%ebp) + 13988: e8 73 d6 ff ff call 11000 <__end__> + 1398d: 83 c4 04 add $0x4,%esp + 13990: 6a 00 push $0x0 + 13992: e8 69 06 00 00 call 14000 <_wait_ms> + 13997: 83 c4 10 add $0x10,%esp + 1399a: 8b 45 08 mov 0x8(%ebp),%eax + 1399d: 05 34 02 00 00 add $0x234,%eax + 139a2: 50 push %eax + 139a3: e8 d3 dc ff ff call 1167b <_hcd_to_bus> + 139a8: 83 c4 04 add $0x4,%esp + 139ab: 89 45 ec mov %eax,0xffffffec(%ebp) + 139ae: 8b 5d ec mov 0xffffffec(%ebp),%ebx + 139b1: 83 ec 08 sub $0x8,%esp + 139b4: ff 75 ec pushl 0xffffffec(%ebp) + 139b7: 6a 00 push $0x0 + 139b9: e8 22 0c 00 00 call 145e0 <_usb_alloc_dev@8> + 139be: 83 c4 08 add $0x8,%esp + 139c1: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 139c4: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 139c7: 89 43 24 mov %eax,0x24(%ebx) + 139ca: 8b 45 08 mov 0x8(%ebp),%eax + 139cd: c7 80 14 03 00 00 03 movl $0x3,0x314(%eax) + 139d4: 00 00 00 + 139d7: 83 7d f0 00 cmpl $0x0,0xfffffff0(%ebp) + 139db: 75 3f jne 13a1c <_hc_start+0x235> + 139dd: ff 75 08 pushl 0x8(%ebp) + 139e0: e8 76 d6 ff ff call 1105b <_disable> + 139e5: 83 c4 04 add $0x4,%esp + 139e8: 8b 55 08 mov 0x8(%ebp),%edx + 139eb: 8b 45 08 mov 0x8(%ebp),%eax + 139ee: 8b 80 2c 02 00 00 mov 0x22c(%eax),%eax + 139f4: 24 3f and $0x3f,%al + 139f6: 89 82 2c 02 00 00 mov %eax,0x22c(%edx) + 139fc: 8b 45 08 mov 0x8(%ebp),%eax + 139ff: 8b 50 04 mov 0x4(%eax),%edx + 13a02: 83 c2 04 add $0x4,%edx + 13a05: 8b 45 08 mov 0x8(%ebp),%eax + 13a08: 8b 80 2c 02 00 00 mov 0x22c(%eax),%eax + 13a0e: 89 02 mov %eax,(%edx) + 13a10: c7 45 e8 f4 ff ff ff movl $0xfffffff4,0xffffffe8(%ebp) + 13a17: e9 99 00 00 00 jmp 13ab5 <_hc_start+0x2ce> + 13a1c: 83 ec 0c sub $0xc,%esp + 13a1f: ff 75 f0 pushl 0xfffffff0(%ebp) + 13a22: e8 c9 0b 00 00 call 145f0 <_usb_connect@4> + 13a27: 83 c4 0c add $0xc,%esp + 13a2a: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 13a2d: c7 40 18 02 00 00 00 movl $0x2,0x18(%eax) + 13a34: 83 ec 0c sub $0xc,%esp + 13a37: 8b 45 08 mov 0x8(%ebp),%eax + 13a3a: 05 34 02 00 00 add $0x234,%eax + 13a3f: 50 push %eax + 13a40: e8 7d 00 00 00 call 13ac2 <_hcd_register_root> + 13a45: 83 c4 10 add $0x10,%esp + 13a48: 85 c0 test %eax,%eax + 13a4a: 74 54 je 13aa0 <_hc_start+0x2b9> + 13a4c: 83 ec 0c sub $0xc,%esp + 13a4f: ff 75 f0 pushl 0xfffffff0(%ebp) + 13a52: e8 a9 0b 00 00 call 14600 <_usb_put_dev@4> + 13a57: 83 c4 0c add $0xc,%esp + 13a5a: 8b 45 ec mov 0xffffffec(%ebp),%eax + 13a5d: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) + 13a64: ff 75 08 pushl 0x8(%ebp) + 13a67: e8 ef d5 ff ff call 1105b <_disable> + 13a6c: 83 c4 04 add $0x4,%esp + 13a6f: 8b 55 08 mov 0x8(%ebp),%edx + 13a72: 8b 45 08 mov 0x8(%ebp),%eax + 13a75: 8b 80 2c 02 00 00 mov 0x22c(%eax),%eax + 13a7b: 24 3f and $0x3f,%al + 13a7d: 89 82 2c 02 00 00 mov %eax,0x22c(%edx) + 13a83: 8b 45 08 mov 0x8(%ebp),%eax + 13a86: 8b 50 04 mov 0x4(%eax),%edx + 13a89: 83 c2 04 add $0x4,%edx + 13a8c: 8b 45 08 mov 0x8(%ebp),%eax + 13a8f: 8b 80 2c 02 00 00 mov 0x22c(%eax),%eax + 13a95: 89 02 mov %eax,(%edx) + 13a97: c7 45 e8 ed ff ff ff movl $0xffffffed,0xffffffe8(%ebp) + 13a9e: eb 15 jmp 13ab5 <_hc_start+0x2ce> + 13aa0: 83 ec 0c sub $0xc,%esp + 13aa3: ff 75 08 pushl 0x8(%ebp) + 13aa6: e8 12 00 00 00 call 13abd <_create_debug_files> + 13aab: 83 c4 10 add $0x10,%esp + 13aae: c7 45 e8 00 00 00 00 movl $0x0,0xffffffe8(%ebp) + 13ab5: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 13ab8: 8b 5d fc mov 0xfffffffc(%ebp),%ebx + 13abb: c9 leave + 13abc: c3 ret + +00013abd <_create_debug_files>: + 13abd: 55 push %ebp + 13abe: 89 e5 mov %esp,%ebp + 13ac0: 5d pop %ebp + 13ac1: c3 ret + +00013ac2 <_hcd_register_root>: + 13ac2: 55 push %ebp + 13ac3: 89 e5 mov %esp,%ebp + 13ac5: 83 ec 08 sub $0x8,%esp + 13ac8: 83 ec 08 sub $0x8,%esp + 13acb: 8b 45 08 mov 0x8(%ebp),%eax + 13ace: ff b0 80 00 00 00 pushl 0x80(%eax) + 13ad4: ff 75 08 pushl 0x8(%ebp) + 13ad7: e8 9f db ff ff call 1167b <_hcd_to_bus> + 13adc: 83 c4 04 add $0x4,%esp + 13adf: ff 70 24 pushl 0x24(%eax) + 13ae2: e8 29 0b 00 00 call 14610 <_usb_register_root_hub@8> + 13ae7: 83 c4 08 add $0x8,%esp + 13aea: c9 leave + 13aeb: c3 ret + +00013aec <_ohci_irq>: + 13aec: 55 push %ebp + 13aed: 89 e5 mov %esp,%ebp + 13aef: 83 ec 18 sub $0x18,%esp + 13af2: 8b 45 08 mov 0x8(%ebp),%eax + 13af5: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 13af8: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 13afb: 2d 34 02 00 00 sub $0x234,%eax + 13b00: 89 45 fc mov %eax,0xfffffffc(%ebp) + 13b03: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13b06: 8b 40 04 mov 0x4(%eax),%eax + 13b09: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 13b0c: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13b0f: 8b 40 08 mov 0x8(%eax),%eax + 13b12: 83 b8 84 00 00 00 00 cmpl $0x0,0x84(%eax) + 13b19: 74 1d je 13b38 <_ohci_irq+0x4c> + 13b1b: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13b1e: 8b 40 08 mov 0x8(%eax),%eax + 13b21: 05 84 00 00 00 add $0x84,%eax + 13b26: 8b 00 mov (%eax),%eax + 13b28: 83 e0 01 and $0x1,%eax + 13b2b: 85 c0 test %eax,%eax + 13b2d: 75 09 jne 13b38 <_ohci_irq+0x4c> + 13b2f: c7 45 f4 02 00 00 00 movl $0x2,0xfffffff4(%ebp) + 13b36: eb 39 jmp 13b71 <_ohci_irq+0x85> + 13b38: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 13b3b: 83 c0 0c add $0xc,%eax + 13b3e: 8b 00 mov (%eax),%eax + 13b40: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 13b43: 83 f8 ff cmp $0xffffffff,%eax + 13b46: 75 10 jne 13b58 <_ohci_irq+0x6c> + 13b48: ff 75 fc pushl 0xfffffffc(%ebp) + 13b4b: e8 0b d5 ff ff call 1105b <_disable> + 13b50: 83 c4 04 add $0x4,%esp + 13b53: e9 0d 01 00 00 jmp 13c65 <_ohci_irq+0x179> + 13b58: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 13b5b: 83 c0 10 add $0x10,%eax + 13b5e: 8b 10 mov (%eax),%edx + 13b60: 8d 45 f4 lea 0xfffffff4(%ebp),%eax + 13b63: 21 10 and %edx,(%eax) + 13b65: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 13b68: 85 c0 test %eax,%eax + 13b6a: 75 05 jne 13b71 <_ohci_irq+0x85> + 13b6c: e9 f4 00 00 00 jmp 13c65 <_ohci_irq+0x179> + 13b71: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 13b74: c1 e8 04 shr $0x4,%eax + 13b77: 83 e0 01 and $0x1,%eax + 13b7a: 85 c0 test %eax,%eax + 13b7c: 74 29 je 13ba7 <_ohci_irq+0xbb> + 13b7e: ff 75 fc pushl 0xfffffffc(%ebp) + 13b81: e8 d5 d4 ff ff call 1105b <_disable> + 13b86: 83 c4 04 add $0x4,%esp + 13b89: 83 ec 08 sub $0x8,%esp + 13b8c: 6a 01 push $0x1 + 13b8e: ff 75 fc pushl 0xfffffffc(%ebp) + 13b91: e8 d1 00 00 00 call 13c67 <_ohci_dump> + 13b96: 83 c4 10 add $0x10,%esp + 13b99: 83 ec 0c sub $0xc,%esp + 13b9c: ff 75 fc pushl 0xfffffffc(%ebp) + 13b9f: e8 11 fb ff ff call 136b5 <_hc_reset> + 13ba4: 83 c4 10 add $0x10,%esp + 13ba7: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 13baa: d1 e8 shr %eax + 13bac: 83 e0 01 and $0x1,%eax + 13baf: 85 c0 test %eax,%eax + 13bb1: 74 38 je 13beb <_ohci_irq+0xff> + 13bb3: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 13bb6: 83 c0 14 add $0x14,%eax + 13bb9: c7 00 02 00 00 00 movl $0x2,(%eax) + 13bbf: 83 ec 04 sub $0x4,%esp + 13bc2: ff 75 0c pushl 0xc(%ebp) + 13bc5: 83 ec 04 sub $0x4,%esp + 13bc8: ff 75 fc pushl 0xfffffffc(%ebp) + 13bcb: e8 b0 ef ff ff call 12b80 <_dl_reverse_done_list> + 13bd0: 83 c4 08 add $0x8,%esp + 13bd3: 50 push %eax + 13bd4: ff 75 fc pushl 0xfffffffc(%ebp) + 13bd7: e8 a1 f4 ff ff call 1307d <_dl_done_list> + 13bdc: 83 c4 10 add $0x10,%esp + 13bdf: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 13be2: 83 c0 10 add $0x10,%eax + 13be5: c7 00 02 00 00 00 movl $0x2,(%eax) + 13beb: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13bee: c7 00 01 00 00 00 movl $0x1,(%eax) + 13bf4: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13bf7: 83 78 10 00 cmpl $0x0,0x10(%eax) + 13bfb: 74 24 je 13c21 <_ohci_irq+0x135> + 13bfd: 83 ec 04 sub $0x4,%esp + 13c00: ff 75 0c pushl 0xc(%ebp) + 13c03: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13c06: 8b 40 08 mov 0x8(%eax),%eax + 13c09: 66 8b 80 80 00 00 00 mov 0x80(%eax),%ax + 13c10: 25 ff ff 00 00 and $0xffff,%eax + 13c15: 50 push %eax + 13c16: ff 75 fc pushl 0xfffffffc(%ebp) + 13c19: e8 54 f1 ff ff call 12d72 <_finish_unlinks> + 13c1e: 83 c4 10 add $0x10,%esp + 13c21: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 13c24: c1 e8 02 shr $0x2,%eax + 13c27: 83 e0 01 and $0x1,%eax + 13c2a: 85 c0 test %eax,%eax + 13c2c: 74 15 je 13c43 <_ohci_irq+0x157> + 13c2e: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13c31: 83 78 10 00 cmpl $0x0,0x10(%eax) + 13c35: 75 0c jne 13c43 <_ohci_irq+0x157> + 13c37: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 13c3a: 83 c0 14 add $0x14,%eax + 13c3d: c7 00 04 00 00 00 movl $0x4,(%eax) + 13c43: 8b 55 f8 mov 0xfffffff8(%ebp),%edx + 13c46: 83 c2 0c add $0xc,%edx + 13c49: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 13c4c: 89 02 mov %eax,(%edx) + 13c4e: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 13c51: 83 c0 10 add $0x10,%eax + 13c54: c7 00 00 00 00 80 movl $0x80000000,(%eax) + 13c5a: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13c5d: 8b 40 04 mov 0x4(%eax),%eax + 13c60: 83 c0 04 add $0x4,%eax + 13c63: 8b 00 mov (%eax),%eax + 13c65: c9 leave + 13c66: c3 ret + +00013c67 <_ohci_dump>: + 13c67: 55 push %ebp + 13c68: 89 e5 mov %esp,%ebp + 13c6a: 5d pop %ebp + 13c6b: c3 ret + +00013c6c <_ohci_stop>: + 13c6c: 55 push %ebp + 13c6d: 89 e5 mov %esp,%ebp + 13c6f: 83 ec 18 sub $0x18,%esp + 13c72: 8b 45 08 mov 0x8(%ebp),%eax + 13c75: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 13c78: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 13c7b: 2d 34 02 00 00 sub $0x234,%eax + 13c80: 89 45 fc mov %eax,0xfffffffc(%ebp) + 13c83: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13c86: 8b 40 04 mov 0x4(%eax),%eax + 13c89: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 13c8c: 6a 01 push $0x1 + 13c8e: ff 75 fc pushl 0xfffffffc(%ebp) + 13c91: e8 d1 ff ff ff call 13c67 <_ohci_dump> + 13c96: 83 c4 08 add $0x8,%esp + 13c99: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13c9c: 83 b8 a4 01 00 00 00 cmpl $0x0,0x1a4(%eax) + 13ca3: 75 0e jne 13cb3 <_ohci_stop+0x47> + 13ca5: 83 ec 0c sub $0xc,%esp + 13ca8: ff 75 fc pushl 0xfffffffc(%ebp) + 13cab: e8 05 fa ff ff call 136b5 <_hc_reset> + 13cb0: 83 c4 10 add $0x10,%esp + 13cb3: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 13cb6: 83 c0 14 add $0x14,%eax + 13cb9: c7 00 00 00 00 80 movl $0x80000000,(%eax) + 13cbf: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 13cc2: 83 c0 0c add $0xc,%eax + 13cc5: 8b 00 mov (%eax),%eax + 13cc7: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 13cca: 8b 55 f8 mov 0xfffffff8(%ebp),%edx + 13ccd: 83 c2 0c add $0xc,%edx + 13cd0: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 13cd3: 89 02 mov %eax,(%edx) + 13cd5: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13cd8: 8b 40 04 mov 0x4(%eax),%eax + 13cdb: 83 c0 04 add $0x4,%eax + 13cde: 8b 00 mov (%eax),%eax + 13ce0: 83 ec 0c sub $0xc,%esp + 13ce3: ff 75 fc pushl 0xfffffffc(%ebp) + 13ce6: e8 3e 00 00 00 call 13d29 <_remove_debug_files> + 13ceb: 83 c4 10 add $0x10,%esp + 13cee: ff 75 fc pushl 0xfffffffc(%ebp) + 13cf1: e8 54 da ff ff call 1174a <_ohci_mem_cleanup> + 13cf6: 83 c4 04 add $0x4,%esp + 13cf9: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13cfc: 83 78 08 00 cmpl $0x0,0x8(%eax) + 13d00: 74 25 je 13d27 <_ohci_stop+0xbb> + 13d02: 83 ec 0c sub $0xc,%esp + 13d05: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13d08: ff 70 08 pushl 0x8(%eax) + 13d0b: e8 70 08 00 00 call 14580 <_ExFreePool@4> + 13d10: 83 c4 0c add $0xc,%esp + 13d13: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13d16: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) + 13d1d: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13d20: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) + 13d27: c9 leave + 13d28: c3 ret + +00013d29 <_remove_debug_files>: + 13d29: 55 push %ebp + 13d2a: 89 e5 mov %esp,%ebp + 13d2c: 5d pop %ebp + 13d2d: c3 ret + +00013d2e <_ohci_pci_start>: + 13d2e: 55 push %ebp + 13d2f: 89 e5 mov %esp,%ebp + 13d31: 53 push %ebx + 13d32: 83 ec 14 sub $0x14,%esp + 13d35: 8b 45 08 mov 0x8(%ebp),%eax + 13d38: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 13d3b: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 13d3e: 2d 34 02 00 00 sub $0x234,%eax + 13d43: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 13d46: 8b 45 08 mov 0x8(%ebp),%eax + 13d49: 83 b8 84 00 00 00 00 cmpl $0x0,0x84(%eax) + 13d50: 0f 84 ff 00 00 00 je 13e55 <_ohci_pci_start+0x127> + 13d56: 8b 5d f8 mov 0xfffffff8(%ebp),%ebx + 13d59: 83 ec 04 sub $0x4,%esp + 13d5c: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 13d5f: 83 c0 0c add $0xc,%eax + 13d62: 50 push %eax + 13d63: 68 00 01 00 00 push $0x100 + 13d68: 8b 45 08 mov 0x8(%ebp),%eax + 13d6b: ff b0 84 00 00 00 pushl 0x84(%eax) + 13d71: e8 8e 01 00 00 call 13f04 <_my_pci_alloc_consistent> + 13d76: 83 c4 10 add $0x10,%esp + 13d79: 89 43 08 mov %eax,0x8(%ebx) + 13d7c: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 13d7f: 83 78 08 00 cmpl $0x0,0x8(%eax) + 13d83: 75 0c jne 13d91 <_ohci_pci_start+0x63> + 13d85: c7 45 e8 f4 ff ff ff movl $0xfffffff4,0xffffffe8(%ebp) + 13d8c: e9 6b 01 00 00 jmp 13efc <_ohci_pci_start+0x1ce> + 13d91: 8b 45 08 mov 0x8(%ebp),%eax + 13d94: 8b 80 84 00 00 00 mov 0x84(%eax),%eax + 13d9a: 81 38 22 10 00 00 cmpl $0x1022,(%eax) + 13da0: 75 24 jne 13dc6 <_ohci_pci_start+0x98> + 13da2: 8b 45 08 mov 0x8(%ebp),%eax + 13da5: 8b 80 84 00 00 00 mov 0x84(%eax),%eax + 13dab: 81 78 04 0c 74 00 00 cmpl $0x740c,0x4(%eax) + 13db2: 75 12 jne 13dc6 <_ohci_pci_start+0x98> + 13db4: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 13db7: c7 80 30 02 00 00 01 movl $0x1,0x230(%eax) + 13dbe: 00 00 00 + 13dc1: e9 8f 00 00 00 jmp 13e55 <_ohci_pci_start+0x127> + 13dc6: 8b 45 08 mov 0x8(%ebp),%eax + 13dc9: 8b 80 84 00 00 00 mov 0x84(%eax),%eax + 13dcf: 81 38 45 10 00 00 cmpl $0x1045,(%eax) + 13dd5: 75 14 jne 13deb <_ohci_pci_start+0xbd> + 13dd7: 8b 45 08 mov 0x8(%ebp),%eax + 13dda: 8b 80 84 00 00 00 mov 0x84(%eax),%eax + 13de0: 81 78 04 61 c8 00 00 cmpl $0xc861,0x4(%eax) + 13de7: 75 02 jne 13deb <_ohci_pci_start+0xbd> + 13de9: eb 6a jmp 13e55 <_ohci_pci_start+0x127> + 13deb: 8b 45 08 mov 0x8(%ebp),%eax + 13dee: 8b 80 84 00 00 00 mov 0x84(%eax),%eax + 13df4: 81 38 0b 10 00 00 cmpl $0x100b,(%eax) + 13dfa: 75 59 jne 13e55 <_ohci_pci_start+0x127> + 13dfc: 8b 45 08 mov 0x8(%ebp),%eax + 13dff: 8b 80 84 00 00 00 mov 0x84(%eax),%eax + 13e05: 89 45 ec mov %eax,0xffffffec(%ebp) + 13e08: 83 ec 08 sub $0x8,%esp + 13e0b: 6a 00 push $0x0 + 13e0d: 8b 45 ec mov 0xffffffec(%ebp),%eax + 13e10: 8b 40 08 mov 0x8(%eax),%eax + 13e13: 8a 00 mov (%eax),%al + 13e15: 25 ff 00 00 00 and $0xff,%eax + 13e1a: 50 push %eax + 13e1b: e8 bc 06 00 00 call 144dc <_my_pci_find_slot> + 13e20: 83 c4 10 add $0x10,%esp + 13e23: 89 45 f0 mov %eax,0xfffffff0(%ebp) + 13e26: 83 7d f0 00 cmpl $0x0,0xfffffff0(%ebp) + 13e2a: 74 29 je 13e55 <_ohci_pci_start+0x127> + 13e2c: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 13e2f: 83 78 04 0e cmpl $0xe,0x4(%eax) + 13e33: 75 20 jne 13e55 <_ohci_pci_start+0x127> + 13e35: 8b 45 f0 mov 0xfffffff0(%ebp),%eax + 13e38: 81 38 0b 10 00 00 cmpl $0x100b,(%eax) + 13e3e: 75 15 jne 13e55 <_ohci_pci_start+0x127> + 13e40: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 13e43: 8b 55 f8 mov 0xfffffff8(%ebp),%edx + 13e46: 8b 92 30 02 00 00 mov 0x230(%edx),%edx + 13e4c: 83 ca 02 or $0x2,%edx + 13e4f: 89 90 30 02 00 00 mov %edx,0x230(%eax) + 13e55: 83 ec 04 sub $0x4,%esp + 13e58: 68 00 01 00 00 push $0x100 + 13e5d: 6a 00 push $0x0 + 13e5f: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 13e62: ff 70 08 pushl 0x8(%eax) + 13e65: e8 36 07 00 00 call 145a0 <_memset> + 13e6a: 83 c4 10 add $0x10,%esp + 13e6d: ff 75 f8 pushl 0xfffffff8(%ebp) + 13e70: e8 7f d8 ff ff call 116f4 <_ohci_mem_init> + 13e75: 83 c4 04 add $0x4,%esp + 13e78: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 13e7b: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) + 13e7f: 79 16 jns 13e97 <_ohci_pci_start+0x169> + 13e81: 83 ec 0c sub $0xc,%esp + 13e84: ff 75 08 pushl 0x8(%ebp) + 13e87: e8 e0 fd ff ff call 13c6c <_ohci_stop> + 13e8c: 83 c4 10 add $0x10,%esp + 13e8f: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 13e92: 89 45 e8 mov %eax,0xffffffe8(%ebp) + 13e95: eb 65 jmp 13efc <_ohci_pci_start+0x1ce> + 13e97: 8b 55 f8 mov 0xfffffff8(%ebp),%edx + 13e9a: 8b 45 08 mov 0x8(%ebp),%eax + 13e9d: 8b 40 7c mov 0x7c(%eax),%eax + 13ea0: 89 42 04 mov %eax,0x4(%edx) + 13ea3: 83 ec 0c sub $0xc,%esp + 13ea6: ff 75 f8 pushl 0xfffffff8(%ebp) + 13ea9: e8 07 f8 ff ff call 136b5 <_hc_reset> + 13eae: 83 c4 10 add $0x10,%esp + 13eb1: 85 c0 test %eax,%eax + 13eb3: 79 17 jns 13ecc <_ohci_pci_start+0x19e> + 13eb5: 83 ec 0c sub $0xc,%esp + 13eb8: ff 75 08 pushl 0x8(%ebp) + 13ebb: e8 ac fd ff ff call 13c6c <_ohci_stop> + 13ec0: 83 c4 10 add $0x10,%esp + 13ec3: c7 45 e8 ed ff ff ff movl $0xffffffed,0xffffffe8(%ebp) + 13eca: eb 30 jmp 13efc <_ohci_pci_start+0x1ce> + 13ecc: 83 ec 0c sub $0xc,%esp + 13ecf: ff 75 f8 pushl 0xfffffff8(%ebp) + 13ed2: e8 10 f9 ff ff call 137e7 <_hc_start> + 13ed7: 83 c4 10 add $0x10,%esp + 13eda: 85 c0 test %eax,%eax + 13edc: 79 17 jns 13ef5 <_ohci_pci_start+0x1c7> + 13ede: 83 ec 0c sub $0xc,%esp + 13ee1: ff 75 08 pushl 0x8(%ebp) + 13ee4: e8 83 fd ff ff call 13c6c <_ohci_stop> + 13ee9: 83 c4 10 add $0x10,%esp + 13eec: c7 45 e8 f0 ff ff ff movl $0xfffffff0,0xffffffe8(%ebp) + 13ef3: eb 07 jmp 13efc <_ohci_pci_start+0x1ce> + 13ef5: c7 45 e8 00 00 00 00 movl $0x0,0xffffffe8(%ebp) + 13efc: 8b 45 e8 mov 0xffffffe8(%ebp),%eax + 13eff: 8b 5d fc mov 0xfffffffc(%ebp),%ebx + 13f02: c9 leave + 13f03: c3 ret + +00013f04 <_my_pci_alloc_consistent>: + 13f04: 55 push %ebp + 13f05: 89 e5 mov %esp,%ebp + 13f07: 83 ec 08 sub $0x8,%esp + 13f0a: 83 ec 08 sub $0x8,%esp + 13f0d: 8b 45 0c mov 0xc(%ebp),%eax + 13f10: 05 00 01 00 00 add $0x100,%eax + 13f15: 50 push %eax + 13f16: 6a 01 push $0x1 + 13f18: e8 53 06 00 00 call 14570 <_ExAllocatePool@8> + 13f1d: 83 c4 08 add $0x8,%esp + 13f20: 89 45 fc mov %eax,0xfffffffc(%ebp) + 13f23: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13f26: 05 ff 00 00 00 add $0xff,%eax + 13f2b: b0 00 mov $0x0,%al + 13f2d: 89 45 fc mov %eax,0xfffffffc(%ebp) + 13f30: 8b 55 10 mov 0x10(%ebp),%edx + 13f33: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13f36: 25 ff ff ff 0f and $0xfffffff,%eax + 13f3b: 89 02 mov %eax,(%edx) + 13f3d: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13f40: c9 leave + 13f41: c3 ret + +00013f42 <_ohci_hcd_pci_init>: + 13f42: 55 push %ebp + 13f43: 89 e5 mov %esp,%ebp + 13f45: 83 ec 08 sub $0x8,%esp + 13f48: 83 ec 04 sub $0x4,%esp + 13f4b: 68 85 01 00 00 push $0x185 + 13f50: 68 38 61 01 00 push $0x16138 + 13f55: 68 43 61 01 00 push $0x16143 + 13f5a: e8 31 06 00 00 call 14590 <_DbgPrint> + 13f5f: 83 c4 10 add $0x10,%esp + 13f62: 83 ec 08 sub $0x8,%esp + 13f65: 68 00 60 01 00 push $0x16000 + 13f6a: 68 4c 61 01 00 push $0x1614c + 13f6f: e8 1c 06 00 00 call 14590 <_DbgPrint> + 13f74: 83 c4 10 add $0x10,%esp + 13f77: e8 c4 06 00 00 call 14640 <_usb_disabled@0> + 13f7c: 85 c0 test %eax,%eax + 13f7e: 74 09 je 13f89 <_ohci_hcd_pci_init+0x47> + 13f80: c7 45 fc ed ff ff ff movl $0xffffffed,0xfffffffc(%ebp) + 13f87: eb 43 jmp 13fcc <_ohci_hcd_pci_init+0x8a> + 13f89: 83 ec 04 sub $0x4,%esp + 13f8c: 68 8a 01 00 00 push $0x18a + 13f91: 68 38 61 01 00 push $0x16138 + 13f96: 68 43 61 01 00 push $0x16143 + 13f9b: e8 f0 05 00 00 call 14590 <_DbgPrint> + 13fa0: 83 c4 10 add $0x10,%esp + 13fa3: 6a 40 push $0x40 + 13fa5: 6a 40 push $0x40 + 13fa7: 68 00 60 01 00 push $0x16000 + 13fac: 68 98 61 01 00 push $0x16198 + 13fb1: e8 da 05 00 00 call 14590 <_DbgPrint> + 13fb6: 83 c4 10 add $0x10,%esp + 13fb9: 83 ec 0c sub $0xc,%esp + 13fbc: 68 20 50 01 00 push $0x15020 + 13fc1: e8 a5 04 00 00 call 1446b <_my_pci_module_init> + 13fc6: 83 c4 10 add $0x10,%esp + 13fc9: 89 45 fc mov %eax,0xfffffffc(%ebp) + 13fcc: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 13fcf: c9 leave + 13fd0: c3 ret + +00013fd1 <_module_init_ohci_hcd_pci_init>: + 13fd1: 55 push %ebp + 13fd2: 89 e5 mov %esp,%ebp + 13fd4: 83 ec 08 sub $0x8,%esp + 13fd7: e8 66 ff ff ff call 13f42 <_ohci_hcd_pci_init> + 13fdc: c9 leave + 13fdd: c3 ret + +00013fde <_ohci_hcd_pci_cleanup>: + 13fde: 55 push %ebp + 13fdf: 89 e5 mov %esp,%ebp + 13fe1: 5d pop %ebp + 13fe2: c3 ret + +00013fe3 <_module_exit_ohci_hcd_pci_cleanup>: + 13fe3: 55 push %ebp + 13fe4: 89 e5 mov %esp,%ebp + 13fe6: e8 f3 ff ff ff call 13fde <_ohci_hcd_pci_cleanup> + 13feb: 5d pop %ebp + 13fec: c3 ret + 13fed: 90 nop + 13fee: 90 nop + 13fef: 90 nop + +00013ff0 <_DriverEntry@8>: + 13ff0: 55 push %ebp + 13ff1: 89 e5 mov %esp,%ebp + 13ff3: b8 00 00 00 00 mov $0x0,%eax + 13ff8: 5d pop %ebp + 13ff9: c2 08 00 ret $0x8 + 13ffc: 90 nop + 13ffd: 90 nop + 13ffe: 90 nop + 13fff: 90 nop + +00014000 <_wait_ms>: + 14000: 55 push %ebp + 14001: 89 e5 mov %esp,%ebp + 14003: 83 ec 08 sub $0x8,%esp + 14006: 8b 55 08 mov 0x8(%ebp),%edx + 14009: 89 d0 mov %edx,%eax + 1400b: c1 e0 02 shl $0x2,%eax + 1400e: 01 d0 add %edx,%eax + 14010: 01 c0 add %eax,%eax + 14012: f7 d8 neg %eax + 14014: 99 cltd + 14015: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 14018: 89 55 fc mov %edx,0xfffffffc(%ebp) + 1401b: 83 ec 04 sub $0x4,%esp + 1401e: 8d 45 f8 lea 0xfffffff8(%ebp),%eax + 14021: 50 push %eax + 14022: 6a 00 push $0x0 + 14024: 6a 00 push $0x0 + 14026: e8 85 05 00 00 call 145b0 <_KeDelayExecutionThread@12> + 1402b: 83 c4 04 add $0x4,%esp + 1402e: c9 leave + 1402f: c3 ret + +00014030 <_init_wrapper>: + 14030: 55 push %ebp + 14031: 89 e5 mov %esp,%ebp + 14033: 83 ec 04 sub $0x4,%esp + 14036: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) + 1403d: 83 7d fc 13 cmpl $0x13,0xfffffffc(%ebp) + 14041: 7f 15 jg 14058 <_init_wrapper+0x28> + 14043: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 14046: c7 04 85 c0 70 01 00 movl $0x0,0x170c0(,%eax,4) + 1404d: 00 00 00 00 + 14051: 8d 45 fc lea 0xfffffffc(%ebp),%eax + 14054: ff 00 incl (%eax) + 14056: eb e5 jmp 1403d <_init_wrapper+0xd> + 14058: c7 05 a0 71 01 00 00 movl $0x0,0x171a0 + 1405f: 00 00 00 + 14062: c7 05 a0 70 01 00 00 movl $0x0,0x170a0 + 14069: 00 00 00 + 1406c: c7 05 90 71 01 00 00 movl $0x17000,0x17190 + 14073: 70 01 00 + 14076: c7 05 08 70 01 00 00 movl $0x0,0x17008 + 1407d: 00 00 00 + 14080: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) + 14087: 83 7d fc 07 cmpl $0x7,0xfffffffc(%ebp) + 1408b: 7f 33 jg 140c0 <_init_wrapper+0x90> + 1408d: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 14090: 89 d0 mov %edx,%eax + 14092: 01 c0 add %eax,%eax + 14094: 01 d0 add %edx,%eax + 14096: c1 e0 02 shl $0x2,%eax + 14099: c7 80 30 71 01 00 00 movl $0x0,0x17130(%eax) + 140a0: 00 00 00 + 140a3: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 140a6: 89 d0 mov %edx,%eax + 140a8: 01 c0 add %eax,%eax + 140aa: 01 d0 add %edx,%eax + 140ac: c1 e0 02 shl $0x2,%eax + 140af: c7 80 34 71 01 00 ff movl $0xffffffff,0x17134(%eax) + 140b6: ff ff ff + 140b9: 8d 45 fc lea 0xfffffffc(%ebp),%eax + 140bc: ff 00 incl (%eax) + 140be: eb c7 jmp 14087 <_init_wrapper+0x57> + 140c0: c7 05 38 70 01 00 00 movl $0x0,0x17038 + 140c7: 00 00 00 + 140ca: c7 05 20 71 01 00 00 movl $0x0,0x17120 + 140d1: 00 00 00 + 140d4: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) + 140db: 83 7d fc 07 cmpl $0x7,0xfffffffc(%ebp) + 140df: 7f 15 jg 140f6 <_init_wrapper+0xc6> + 140e1: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 140e4: c7 04 85 18 70 01 00 movl $0x0,0x17018(,%eax,4) + 140eb: 00 00 00 00 + 140ef: 8d 45 fc lea 0xfffffffc(%ebp),%eax + 140f2: ff 00 incl (%eax) + 140f4: eb e5 jmp 140db <_init_wrapper+0xab> + 140f6: c9 leave + 140f7: c3 ret + +000140f8 <_handle_irqs>: + 140f8: 55 push %ebp + 140f9: 89 e5 mov %esp,%ebp + 140fb: 83 ec 08 sub $0x8,%esp + 140fe: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) + 14105: 83 7d fc 07 cmpl $0x7,0xfffffffc(%ebp) + 14109: 0f 8f 86 00 00 00 jg 14195 <_handle_irqs+0x9d> + 1410f: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 14112: 89 c2 mov %eax,%edx + 14114: 01 d2 add %edx,%edx + 14116: 01 c2 add %eax,%edx + 14118: 8d 04 95 00 00 00 00 lea 0x0(,%edx,4),%eax + 1411f: 83 b8 30 71 01 00 00 cmpl $0x0,0x17130(%eax) + 14126: 74 63 je 1418b <_handle_irqs+0x93> + 14128: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 1412b: 89 d0 mov %edx,%eax + 1412d: 01 c0 add %eax,%eax + 1412f: 01 d0 add %edx,%eax + 14131: c1 e0 02 shl $0x2,%eax + 14134: 8b 80 34 71 01 00 mov 0x17134(%eax),%eax + 1413a: 3b 45 08 cmp 0x8(%ebp),%eax + 1413d: 74 08 je 14147 <_handle_irqs+0x4f> + 1413f: 83 7d 08 ff cmpl $0xffffffff,0x8(%ebp) + 14143: 74 02 je 14147 <_handle_irqs+0x4f> + 14145: eb 44 jmp 1418b <_handle_irqs+0x93> + 14147: 83 ec 04 sub $0x4,%esp + 1414a: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 1414d: 89 d0 mov %edx,%eax + 1414f: 01 c0 add %eax,%eax + 14151: 01 d0 add %edx,%eax + 14153: 8d 0c 85 00 00 00 00 lea 0x0(,%eax,4),%ecx + 1415a: 6a 00 push $0x0 + 1415c: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 1415f: 89 d0 mov %edx,%eax + 14161: 01 c0 add %eax,%eax + 14163: 01 d0 add %edx,%eax + 14165: c1 e0 02 shl $0x2,%eax + 14168: ff b0 38 71 01 00 pushl 0x17138(%eax) + 1416e: 8b 55 fc mov 0xfffffffc(%ebp),%edx + 14171: 89 d0 mov %edx,%eax + 14173: 01 c0 add %eax,%eax + 14175: 01 d0 add %edx,%eax + 14177: c1 e0 02 shl $0x2,%eax + 1417a: ff b0 34 71 01 00 pushl 0x17134(%eax) + 14180: 8b 81 30 71 01 00 mov 0x17130(%ecx),%eax + 14186: ff d0 call *%eax + 14188: 83 c4 10 add $0x10,%esp + 1418b: 8d 45 fc lea 0xfffffffc(%ebp),%eax + 1418e: ff 00 incl (%eax) + 14190: e9 70 ff ff ff jmp 14105 <_handle_irqs+0xd> + 14195: c9 leave + 14196: c3 ret + +00014197 <_inc_jiffies>: + 14197: 55 push %ebp + 14198: 89 e5 mov %esp,%ebp + 1419a: 8b 45 08 mov 0x8(%ebp),%eax + 1419d: 01 05 a0 71 01 00 add %eax,0x171a0 + 141a3: 5d pop %ebp + 141a4: c3 ret + +000141a5 <_do_all_timers>: + 141a5: 55 push %ebp + 141a6: 89 e5 mov %esp,%ebp + 141a8: 83 ec 18 sub $0x18,%esp + 141ab: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) + 141b2: 83 7d fc 13 cmpl $0x13,0xfffffffc(%ebp) + 141b6: 0f 8f 82 00 00 00 jg 1423e <_do_all_timers+0x99> + 141bc: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 141bf: 83 3c 85 c0 70 01 00 cmpl $0x0,0x170c0(,%eax,4) + 141c6: 00 + 141c7: 74 6b je 14234 <_do_all_timers+0x8f> + 141c9: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 141cc: 8b 04 85 c0 70 01 00 mov 0x170c0(,%eax,4),%eax + 141d3: 83 38 00 cmpl $0x0,(%eax) + 141d6: 74 5c je 14234 <_do_all_timers+0x8f> + 141d8: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 141db: 8b 04 85 c0 70 01 00 mov 0x170c0(,%eax,4),%eax + 141e2: 83 78 08 00 cmpl $0x0,0x8(%eax) + 141e6: 74 4c je 14234 <_do_all_timers+0x8f> + 141e8: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 141eb: 8b 04 85 c0 70 01 00 mov 0x170c0(,%eax,4),%eax + 141f2: 8b 00 mov (%eax),%eax + 141f4: 89 45 f8 mov %eax,0xfffffff8(%ebp) + 141f7: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 141fa: 8b 04 85 c0 70 01 00 mov 0x170c0(,%eax,4),%eax + 14201: 8b 40 04 mov 0x4(%eax),%eax + 14204: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 14207: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 1420a: 8b 04 85 c0 70 01 00 mov 0x170c0(,%eax,4),%eax + 14211: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) + 14218: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 1421b: c7 04 85 c0 70 01 00 movl $0x0,0x170c0(,%eax,4) + 14222: 00 00 00 00 + 14226: 83 ec 0c sub $0xc,%esp + 14229: ff 75 f4 pushl 0xfffffff4(%ebp) + 1422c: 8b 45 f8 mov 0xfffffff8(%ebp),%eax + 1422f: ff d0 call *%eax + 14231: 83 c4 10 add $0x10,%esp + 14234: 8d 45 fc lea 0xfffffffc(%ebp),%eax + 14237: ff 00 incl (%eax) + 14239: e9 74 ff ff ff jmp 141b2 <_do_all_timers+0xd> + 1423e: c9 leave + 1423f: c3 ret + +00014240 <_my_kernel_thread>: + 14240: 55 push %ebp + 14241: 89 e5 mov %esp,%ebp + 14243: 8b 45 08 mov 0x8(%ebp),%eax + 14246: a3 b0 70 01 00 mov %eax,0x170b0 + 1424b: 8b 45 0c mov 0xc(%ebp),%eax + 1424e: a3 10 71 01 00 mov %eax,0x17110 + 14253: b8 2a 00 00 00 mov $0x2a,%eax + 14258: 5d pop %ebp + 14259: c3 ret + +0001425a <_my_device_add>: + 1425a: 55 push %ebp + 1425b: 89 e5 mov %esp,%ebp + 1425d: 83 ec 18 sub $0x18,%esp + 14260: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 14267: 8b 45 08 mov 0x8(%ebp),%eax + 1426a: 83 b8 98 00 00 00 00 cmpl $0x0,0x98(%eax) + 14271: 74 32 je 142a5 <_my_device_add+0x4b> + 14273: 8b 45 08 mov 0x8(%ebp),%eax + 14276: 8b 80 98 00 00 00 mov 0x98(%eax),%eax + 1427c: 83 78 08 00 cmpl $0x0,0x8(%eax) + 14280: 0f 84 8d 00 00 00 je 14313 <_my_device_add+0xb9> + 14286: 83 ec 0c sub $0xc,%esp + 14289: 8b 45 08 mov 0x8(%ebp),%eax + 1428c: 8b 80 98 00 00 00 mov 0x98(%eax),%eax + 14292: ff 75 08 pushl 0x8(%ebp) + 14295: 8b 40 08 mov 0x8(%eax),%eax + 14298: ff d0 call *%eax + 1429a: 83 c4 10 add $0x10,%esp + 1429d: 89 45 f4 mov %eax,0xfffffff4(%ebp) + 142a0: e9 82 00 00 00 jmp 14327 <_my_device_add+0xcd> + 142a5: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) + 142ac: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 142af: 3b 05 38 70 01 00 cmp 0x17038,%eax + 142b5: 7d 4d jge 14304 <_my_device_add+0xaa> + 142b7: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 142ba: 8b 04 85 18 70 01 00 mov 0x17018(,%eax,4),%eax + 142c1: 83 78 08 00 cmpl $0x0,0x8(%eax) + 142c5: 74 36 je 142fd <_my_device_add+0xa3> + 142c7: 8b 55 08 mov 0x8(%ebp),%edx + 142ca: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 142cd: 8b 04 85 18 70 01 00 mov 0x17018(,%eax,4),%eax + 142d4: 89 82 98 00 00 00 mov %eax,0x98(%edx) + 142da: 83 ec 0c sub $0xc,%esp + 142dd: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 142e0: 8b 04 85 18 70 01 00 mov 0x17018(,%eax,4),%eax + 142e7: ff 75 08 pushl 0x8(%ebp) + 142ea: 8b 40 08 mov 0x8(%eax),%eax + 142ed: ff d0 call *%eax + 142ef: 83 c4 10 add $0x10,%esp + 142f2: 85 c0 test %eax,%eax + 142f4: 75 07 jne 142fd <_my_device_add+0xa3> + 142f6: c7 45 f8 01 00 00 00 movl $0x1,0xfffffff8(%ebp) + 142fd: 8d 45 fc lea 0xfffffffc(%ebp),%eax + 14300: ff 00 incl (%eax) + 14302: eb a8 jmp 142ac <_my_device_add+0x52> + 14304: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) + 14308: 74 09 je 14313 <_my_device_add+0xb9> + 1430a: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) + 14311: eb 14 jmp 14327 <_my_device_add+0xcd> + 14313: 8b 45 08 mov 0x8(%ebp),%eax + 14316: c7 80 98 00 00 00 00 movl $0x0,0x98(%eax) + 1431d: 00 00 00 + 14320: c7 45 f4 ed ff ff ff movl $0xffffffed,0xfffffff4(%ebp) + 14327: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 1432a: c9 leave + 1432b: c3 ret + +0001432c <_my_driver_register>: + 1432c: 55 push %ebp + 1432d: 89 e5 mov %esp,%ebp + 1432f: 83 ec 04 sub $0x4,%esp + 14332: 83 3d 38 70 01 00 07 cmpl $0x7,0x17038 + 14339: 7f 20 jg 1435b <_my_driver_register+0x2f> + 1433b: a1 38 70 01 00 mov 0x17038,%eax + 14340: 89 c2 mov %eax,%edx + 14342: 8b 45 08 mov 0x8(%ebp),%eax + 14345: 89 04 95 18 70 01 00 mov %eax,0x17018(,%edx,4) + 1434c: ff 05 38 70 01 00 incl 0x17038 + 14352: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) + 14359: eb 07 jmp 14362 <_my_driver_register+0x36> + 1435b: c7 45 fc ff ff ff ff movl $0xffffffff,0xfffffffc(%ebp) + 14362: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 14365: c9 leave + 14366: c3 ret + +00014367 <_my_device_unregister>: + 14367: 55 push %ebp + 14368: 89 e5 mov %esp,%ebp + 1436a: 83 ec 08 sub $0x8,%esp + 1436d: 8b 45 08 mov 0x8(%ebp),%eax + 14370: 83 b8 98 00 00 00 00 cmpl $0x0,0x98(%eax) + 14377: 74 26 je 1439f <_my_device_unregister+0x38> + 14379: 8b 45 08 mov 0x8(%ebp),%eax + 1437c: 8b 80 98 00 00 00 mov 0x98(%eax),%eax + 14382: 83 78 0c 00 cmpl $0x0,0xc(%eax) + 14386: 74 17 je 1439f <_my_device_unregister+0x38> + 14388: 83 ec 0c sub $0xc,%esp + 1438b: 8b 45 08 mov 0x8(%ebp),%eax + 1438e: 8b 80 98 00 00 00 mov 0x98(%eax),%eax + 14394: ff 75 08 pushl 0x8(%ebp) + 14397: 8b 40 0c mov 0xc(%eax),%eax + 1439a: ff d0 call *%eax + 1439c: 83 c4 10 add $0x10,%esp + 1439f: b8 00 00 00 00 mov $0x0,%eax + 143a4: c9 leave + 143a5: c3 ret + +000143a6 <_my_get_device>: + 143a6: 55 push %ebp + 143a7: 89 e5 mov %esp,%ebp + 143a9: b8 00 00 00 00 mov $0x0,%eax + 143ae: 5d pop %ebp + 143af: c3 ret + +000143b0 <_my_device_initialize>: + 143b0: 55 push %ebp + 143b1: 89 e5 mov %esp,%ebp + 143b3: 5d pop %ebp + 143b4: c3 ret + +000143b5 <_my_wake_up>: + 143b5: 55 push %ebp + 143b6: 89 e5 mov %esp,%ebp + 143b8: c7 05 20 71 01 00 01 movl $0x1,0x17120 + 143bf: 00 00 00 + 143c2: 5d pop %ebp + 143c3: c3 ret + +000143c4 <_my_schedule_timeout>: + 143c4: 55 push %ebp + 143c5: 89 e5 mov %esp,%ebp + 143c7: 83 ec 08 sub $0x8,%esp + 143ca: c7 45 fc 01 00 00 00 movl $0x1,0xfffffffc(%ebp) + 143d1: 83 45 08 0a addl $0xa,0x8(%ebp) + 143d5: 83 7d 08 00 cmpl $0x0,0x8(%ebp) + 143d9: 7e 3e jle 14419 <_my_schedule_timeout+0x55> + 143db: e8 c5 fd ff ff call 141a5 <_do_all_timers> + 143e0: 83 ec 0c sub $0xc,%esp + 143e3: 6a ff push $0xffffffff + 143e5: e8 0e fd ff ff call 140f8 <_handle_irqs> + 143ea: 83 c4 10 add $0x10,%esp + 143ed: 83 3d 20 71 01 00 00 cmpl $0x0,0x17120 + 143f4: 74 02 je 143f8 <_my_schedule_timeout+0x34> + 143f6: eb 21 jmp 14419 <_my_schedule_timeout+0x55> + 143f8: 83 ec 0c sub $0xc,%esp + 143fb: ff 75 fc pushl 0xfffffffc(%ebp) + 143fe: e8 fd fb ff ff call 14000 <_wait_ms> + 14403: 83 c4 10 add $0x10,%esp + 14406: ff 75 fc pushl 0xfffffffc(%ebp) + 14409: e8 89 fd ff ff call 14197 <_inc_jiffies> + 1440e: 83 c4 04 add $0x4,%esp + 14411: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 14414: 29 45 08 sub %eax,0x8(%ebp) + 14417: eb bc jmp 143d5 <_my_schedule_timeout+0x11> + 14419: c7 05 20 71 01 00 00 movl $0x0,0x17120 + 14420: 00 00 00 + 14423: 8b 45 08 mov 0x8(%ebp),%eax + 14426: c9 leave + 14427: c3 ret + +00014428 <_my_wait_for_completion>: + 14428: 55 push %ebp + 14429: 89 e5 mov %esp,%ebp + 1442b: 83 ec 08 sub $0x8,%esp + 1442e: c7 45 fc 64 00 00 00 movl $0x64,0xfffffffc(%ebp) + 14435: 8b 45 08 mov 0x8(%ebp),%eax + 14438: 83 38 00 cmpl $0x0,(%eax) + 1443b: 75 2c jne 14469 <_my_wait_for_completion+0x41> + 1443d: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) + 14441: 7e 26 jle 14469 <_my_wait_for_completion+0x41> + 14443: e8 5d fd ff ff call 141a5 <_do_all_timers> + 14448: 83 ec 0c sub $0xc,%esp + 1444b: 6a ff push $0xffffffff + 1444d: e8 a6 fc ff ff call 140f8 <_handle_irqs> + 14452: 83 c4 10 add $0x10,%esp + 14455: 83 ec 0c sub $0xc,%esp + 14458: 6a 0a push $0xa + 1445a: e8 a1 fb ff ff call 14000 <_wait_ms> + 1445f: 83 c4 10 add $0x10,%esp + 14462: 8d 45 fc lea 0xfffffffc(%ebp),%eax + 14465: ff 08 decl (%eax) + 14467: eb cc jmp 14435 <_my_wait_for_completion+0xd> + 14469: c9 leave + 1446a: c3 ret + +0001446b <_my_pci_module_init>: + 1446b: 55 push %ebp + 1446c: 89 e5 mov %esp,%ebp + 1446e: 83 ec 18 sub $0x18,%esp + 14471: a1 08 70 01 00 mov 0x17008,%eax + 14476: 89 45 fc mov %eax,0xfffffffc(%ebp) + 14479: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) + 14480: 83 3d 08 70 01 00 00 cmpl $0x0,0x17008 + 14487: 75 33 jne 144bc <_my_pci_module_init+0x51> + 14489: 83 ec 04 sub $0x4,%esp + 1448c: 68 ef 00 00 00 push $0xef + 14491: 68 c0 61 01 00 push $0x161c0 + 14496: 68 d6 61 01 00 push $0x161d6 + 1449b: e8 f0 00 00 00 call 14590 <_DbgPrint> + 144a0: 83 c4 10 add $0x10,%esp + 144a3: 83 ec 0c sub $0xc,%esp + 144a6: 68 df 61 01 00 push $0x161df + 144ab: e8 e0 00 00 00 call 14590 <_DbgPrint> + 144b0: 83 c4 10 add $0x10,%esp + 144b3: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) + 144ba: eb 1b jmp 144d7 <_my_pci_module_init+0x6c> + 144bc: 83 ec 08 sub $0x8,%esp + 144bf: 8b 45 08 mov 0x8(%ebp),%eax + 144c2: ff 75 f8 pushl 0xfffffff8(%ebp) + 144c5: ff 75 fc pushl 0xfffffffc(%ebp) + 144c8: 8b 40 10 mov 0x10(%eax),%eax + 144cb: ff d0 call *%eax + 144cd: 83 c4 10 add $0x10,%esp + 144d0: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) + 144d7: 8b 45 f4 mov 0xfffffff4(%ebp),%eax + 144da: c9 leave + 144db: c3 ret + +000144dc <_my_pci_find_slot>: + 144dc: 55 push %ebp + 144dd: 89 e5 mov %esp,%ebp + 144df: b8 00 00 00 00 mov $0x0,%eax + 144e4: 5d pop %ebp + 144e5: c3 ret + +000144e6 <_my_request_irq>: + 144e6: 55 push %ebp + 144e7: 89 e5 mov %esp,%ebp + 144e9: 83 ec 04 sub $0x4,%esp + 144ec: 83 3d a0 70 01 00 07 cmpl $0x7,0x170a0 + 144f3: 7f 63 jg 14558 <_my_request_irq+0x72> + 144f5: 8b 15 a0 70 01 00 mov 0x170a0,%edx + 144fb: 89 d0 mov %edx,%eax + 144fd: 01 c0 add %eax,%eax + 144ff: 01 d0 add %edx,%eax + 14501: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx + 14508: 8b 45 0c mov 0xc(%ebp),%eax + 1450b: 89 82 30 71 01 00 mov %eax,0x17130(%edx) + 14511: 8b 15 a0 70 01 00 mov 0x170a0,%edx + 14517: 89 d0 mov %edx,%eax + 14519: 01 c0 add %eax,%eax + 1451b: 01 d0 add %edx,%eax + 1451d: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx + 14524: 8b 45 08 mov 0x8(%ebp),%eax + 14527: 89 82 34 71 01 00 mov %eax,0x17134(%edx) + 1452d: 8b 15 a0 70 01 00 mov 0x170a0,%edx + 14533: 89 d0 mov %edx,%eax + 14535: 01 c0 add %eax,%eax + 14537: 01 d0 add %edx,%eax + 14539: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx + 14540: 8b 45 18 mov 0x18(%ebp),%eax + 14543: 89 82 38 71 01 00 mov %eax,0x17138(%edx) + 14549: ff 05 a0 70 01 00 incl 0x170a0 + 1454f: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) + 14556: eb 07 jmp 1455f <_my_request_irq+0x79> + 14558: c7 45 fc 01 00 00 00 movl $0x1,0xfffffffc(%ebp) + 1455f: 8b 45 fc mov 0xfffffffc(%ebp),%eax + 14562: c9 leave + 14563: c3 ret + +00014564 <_my_free_irq>: + 14564: 55 push %ebp + 14565: 89 e5 mov %esp,%ebp + 14567: b8 00 00 00 00 mov $0x0,%eax + 1456c: 5d pop %ebp + 1456d: c3 ret + 1456e: 90 nop + 1456f: 90 nop + +00014570 <_ExAllocatePool@8>: + 14570: ff 25 8c 80 01 00 jmp *0x1808c + 14576: 90 nop + 14577: 90 nop + ... + +00014580 <_ExFreePool@4>: + 14580: ff 25 90 80 01 00 jmp *0x18090 + 14586: 90 nop + 14587: 90 nop + ... + +00014590 <_DbgPrint>: + 14590: ff 25 88 80 01 00 jmp *0x18088 + 14596: 90 nop + 14597: 90 nop + ... + +000145a0 <_memset>: + 145a0: ff 25 98 80 01 00 jmp *0x18098 + 145a6: 90 nop + 145a7: 90 nop + ... + +000145b0 <_KeDelayExecutionThread@12>: + 145b0: ff 25 94 80 01 00 jmp *0x18094 + 145b6: 90 nop + 145b7: 90 nop + ... + +000145c0 <_usb_hcd_giveback_urb@12>: + 145c0: ff 25 b4 80 01 00 jmp *0x180b4 + 145c6: 90 nop + 145c7: 90 nop + ... + +000145d0 <_usb_calc_bus_time@16>: + 145d0: ff 25 a8 80 01 00 jmp *0x180a8 + 145d6: 90 nop + 145d7: 90 nop + ... + +000145e0 <_usb_alloc_dev@8>: + 145e0: ff 25 a4 80 01 00 jmp *0x180a4 + 145e6: 90 nop + 145e7: 90 nop + ... + +000145f0 <_usb_connect@4>: + 145f0: ff 25 ac 80 01 00 jmp *0x180ac + 145f6: 90 nop + 145f7: 90 nop + ... + +00014600 <_usb_put_dev@4>: + 14600: ff 25 c0 80 01 00 jmp *0x180c0 + 14606: 90 nop + 14607: 90 nop + ... + +00014610 <_usb_register_root_hub@8>: + 14610: ff 25 c4 80 01 00 jmp *0x180c4 + 14616: 90 nop + 14617: 90 nop + ... + +00014620 <_usb_hcd_pci_probe@8>: + 14620: ff 25 b8 80 01 00 jmp *0x180b8 + 14626: 90 nop + 14627: 90 nop + ... + +00014630 <_usb_hcd_pci_remove@4>: + 14630: ff 25 bc 80 01 00 jmp *0x180bc + 14636: 90 nop + 14637: 90 nop + ... + +00014640 <_usb_disabled@0>: + 14640: ff 25 b0 80 01 00 jmp *0x180b0 + 14646: 90 nop + 14647: 90 nop + ... + +00014650 <__CTOR_LIST__>: + 14650: ff (bad) + 14651: ff (bad) + 14652: ff (bad) + 14653: ff 00 incl (%eax) + 14655: 00 00 add %al,(%eax) + ... + +00014658 <__DTOR_LIST__>: + 14658: ff (bad) + 14659: ff (bad) + 1465a: ff (bad) + 1465b: ff 00 incl (%eax) + 1465d: 00 00 add %al,(%eax) + ... + +00014660 : + ... diff --git a/reactos/drivers/usb/cromwell/host/ohci.nostrip.sys b/reactos/drivers/usb/cromwell/host/ohci.nostrip.sys new file mode 100644 index 0000000000000000000000000000000000000000..4bb663b01921f02837016d67ff7230c95ee436da GIT binary patch literal 50449 zcmeHw4|JQwmG8)w6NLz@f&q7%5(ScyKrl*To0I@i9E*n6r16rNr7fxA*mA7I|B$8N zbaCuNP8*?m2`oK@_qyA(rCqj<*OzVSHtmCAr`ekBrrkiZ-JFsKYU{S2kh`eG2lS{~ zz2Chv-#bjLI^iLrIHZG@JmmSzc2hX zg5paSe)AIX)V%L4I_BE=y+vEQq67Z^Sl`ZATaUlJt+%%??%xsd#}d8%Xs^F{^A>+k zUq__w;)^d@tVp+ngxKhsE7n|DSSOAMvBxDuM$EZ-zN=z2GjSM*J|XgJ<*#U=ia-L4 zKEyY2{EHtUj^YFOM;>%BTnN9!B_RIMqkd#&M2MvoNFElVn-o$091&sxHSkA%>f({X zIB0Hf#1}CXRKNJqpY15F>u8I&0f4k%*$KCWGUgK$V!SRU5sSp@c6!p z7$DG5!t1Bh>}Q1NMI}Af4FF893_r;24#e6~%(^?Q@J8@!d4h}=>Fxs}>+%Q+i9f=( zJVD@DvQE;`fTICN1C9n94LBNbG~j5!(SV}?M+1%q{)ifAP5mr6?Ma6`>7Y9~z9B7A zp<;5VSW5Vk)810TqtW^_dBT@lPB;I63W3x1w?HM5dy$3GHt++rO9^|3;})N}h1%R+cq>H8q|o zW=d%MigS_3y`;0SB{{tqwNs&)bZF*=dhnkL6(&Q|#KvSuBgR=~|_!MDhs#Fwi7T}q<95S0RaRYNYcLsh>cT)8>O zeg_CcGjsQOkq#m=7Sc*!A`cX3C%+~%Gt^N^5$Xrx$s519XfY$@wgo0#tuBB)!lrM?gBgvs@5r^Kj zROoDO?qujJ>Vko@sZb`3f7^`CW20zE3)Ne-$|fd%%bJ3zRR4Xb2z`=lLDw?kg{%Tw zNfTP_p{6Q^&k+nS9BQh7HdCQIco%!!$xwbSgq|o=20K%s*MZZS4!ypFHlbYO$?>^| zDmo`auM=Oz3C$yoZths<_0FWn#W1gg&66-+u7;uWZI~WKwlmdKshD2__RvjWUb1_r zX>M|;Fn8a(k*)qZH+HCr>M`>dmA=z7uapC)kkC`ot(q0HQ7Hx{R*&*@t1rE&CcSL| z#Cfwb)mrFGZF;>kwGD=cewW5*3W}{brRmnQY4<0$Z+D4OMvc=P zj9(+#xq2i#XeM_(L);>FH6_qY?wt&AiJXrU9zh0N2)sPIg3=!`qQg}#U9-^i=%Aqe{01&c zx5D!lQ{=5=f~G5718mP;s58aLq)zfsz=s=_{F0v7&%p&vXmeIIEly_E($ENbsvbw{ zQiI9WB7P;Rq{W($m-t62IbMsx+>eo=Vg`cJowX@nPR@s3Z4tMt>l+ymvr46^xY^OuNszXVCh}@(VsVXmCPl|A}RbZk*NHQ};oDF&X`(VFbKbp7d!8_E2 z7)1s=vZjR<;z}$PB6PL|0Yi{sc!=}y@?5ZlkB4NjeD2NkZ67VSfudbk0^%$H-UI$ zDMm7^OShoOU@g^Qm{+Bk$^$LSQmquwR>Z6EU0FSP1jSjJzraFruvR24Ln7Vc=F#O% z2YsoE+`AY=LkIdW(p1*OQ75e#YEw)5j1C$^Nw8mIW z@qx@zd*p{DCh3;O4_eFqOkyMlYb>lSMWK~73;}~RO50hh(OCnD^Rec)v$p)LS*yuy zLQ6(Rx5$j_Be-vm_DLR$urBs7dm#`7$hoW7vWkbAuEXdgJP!vM9&_mN2>r9!?;dzVc5&auxCE}k+8CC zICV1av=})V1T!J8X~CpXw%{TxnBwFtonit7-c%&oIN=ouEPbGL-TX4InteRW-e#L5 zS*SbB#;T77=#R!ax)5x&z}%rS*gXvlJqt4g(=;BS^u+bjj?=*fa^TPas~){njyB+^ zahj#cfSIP^*SLQ{k?B&^1=*J+?1JLG{MO=G%(_fG8c~0Ucr_#*f;{LKN&t_rFAV+~ z5x; z{SI-CifvY7u9?v0Ci5@akly+BJ^xfGDaW?&Xkj&KR;D z7cUH`58%S5)6Itwh~y8BS08*BddFN&v6e@>?G3VEDx!63qAGiex()uGCW3sb`629- zDAd5~3U!Ls>WO!A^pGba+a(dT*3XU+37Sx*NQIn02$rIV20&UzQBW7kON{`8#WTXu zJX9sB4{m0=fd-%zEJ$c*Kd+^ZPy7VSYE2J-|Iff$F#C%C&1dE7^lS4HechrEOR6z~a=F3TwAuL@$_wq8{22-Kaxy#Cc zs{t$}P80d+N5(l~XrbCh24+y|uho8eH4I_m*bg@C@V$|pcymtbxrxHUWye#e(yeFE zZk_4`_?bN0ma;c-F}U-v`#~4Dl*!&Bmu`%MvF_>L7YeEYWmok>0 zh6U}D3Nzw})XbHubPiUybS4f;CB3~-8ZKDj^Yt;hk#X=Bj zLzBgH3)=A_6M!92br5wYhkOD%Xq2s~4EZ*|zapF@c4S~f1qB{5GUzTs6s!rW)I{>f7} zejR-eBj|h%Q{0=d|Ln&Q3L*oTW8Cjd8DV?a){7F=NjWmyh=e2a`Bs5=E zon+K?{(f28A`*I5WFNwpvT)X3GwEqJCxh_&oY;^$Uj08?vE6;f<-^y0KW%;*s$~B< zHIZ?ChR->B@5)KEW$0^gi|V1Ez6(?3c>8Zn1=&JSrE! z^-$oPR|bv6G9c_us>x{KPOx3A`MBGwM`?2o<>-1JHhf=E;$e^OmCgyxD>w5p)#PtN zd3bGs$O1d1&v1w9qnkZ7Z9Id}1Hnsq9@AwcR;F@SVXuB3xmO-zM4c%wDPf6?a;z1l zCMuf(sdZ8-c1mL{9TaBBNUFT3i@c!wpnp5&l!`2EVscj)8xaUCpa2SgDRhAF3lL2} zB!o8=@jnG??!^1420W9+W2L^6{JDz&gLd%o`-gdy6nj;|$Q2Hhg@CvK8?K%p-=;a24?6yF{|Df1vKRs-YYq2PfzV%M(UtHBYTt1!8Z8aE%io3Norj0ig~k@}R);vnc+f(2{X(<5?-Ux^(?9?`t- zbsf>C@RtJziV!ePW+;o@n{f|wmc5tPeEJ?71wiSbpIJtthLMrLJU7GBHl~ycn*3<{ zuAr~#qwIgb*;2UNlK zKL5(?faz2S_61Quz`dqvG5T8O?)0Qu-04kR63WlVf_j}NdmpGE5^*Qcku@p^z$T_Q z>Ced7oiaOINb}DoXbxmgk%nCyPn|6#&XDOQ*kNNVpYALLu~B$B-Fh0% zbq==g+zC48ftWOj(2u^)$rVRl;Z+xnHMPBpUN%I_k|}V^@-BAhBxsA)11hj;#K~3J zv)I{%0_0jtTBNc1pZOH9J z)Hs!@kP$LKI70B~Yc$jO6-g-UNFzp+<_Bkijb11p3BMX0X1olCGA%>#Qi6Td&AiD3 zar4r2;8`dnlcs}JID&O-iZkjKZI-dHLEJ-Da>5Pw2TVjW9<7%H1y2q;8*nfa+PkEV zFkz7M;qd|Ifw^%)dxtE-DabT=mPE_$U|y@>s2IK?&-)PA$UjNPRM~3~2|#i)@*YnPjYE@f zfDBR<@R18aW&hxE4wtFk7pYzjF%24}_>7r=hozWZ?47$m^c*eH(yh-;yon9`j0>`W zOKfriN>L18CD6`@#6_IUKB5!B`csC*)uSUi41`a>4;w2}-kPUb;TS_{gCZ4rDh;Gf zPo=jVd+d$-(}StjW67aoB5@nNcY?Mrh`n0JM%)O-XgdN`n&Fsudd^_a6hTZ2j>7g` zO2ZyqfCy$3Vs0A3(>ye9O*9+<#seH%E{`gE=uq38>#iTyw3R}?lqJr??5 zdfU^Tu3A+W(fk`P0NA+*HFe{>jsWwZPwXm(e#n7rswtSeftg<>u(L=}8MPhI+fw8h zcg$UpS{LLXY8oq2)*+T@Guq?WV1T|!N_Aw%s&&b3z_K6}I*Fx=^#BEYLNV|#1vL_j z#!h@uS2vv{@s!8GRD2@>5gg?~*-#K1H}6}*JIs^kx{0zGs6dQ*koVDQIMyD~v%FeC$IAH!_EeylNTOm>&3KmxPSF64O#O~$8CeH@ zV1}YbVuo8lHMPqwVSKQ)1fix5R*jics;x;<<4Wye1gB7jPE!Rdc!S_7?kd?5W=Ppt z*Wh)45@LlSzit5g#tR7zvOn&SgmV8xq{?Ssojh1JmJxDm6Vp!(O3U8IV`pMvz;7&E zSn{Q2mRgcJr}HAEnfgiba@`| zt&TrE8C;A~xImBg>c6lIe*haawdF2X+Ce8$E5?D1roTa?f=GQKesn~&_n8;Dy;A>T zZ5i{UpB<42+Z{hI(4bxT401KeW4yqQzguS2`ddbL*ovGX4dmVn(@`5EGf71EnD&d> zd?{o0VxEst?n@&gnV}hQhF2Qot&!Hl^!PHW^)IKHQ}pXD95fU)ihv<13trUT!5eBs zK{vwH+%%k?>-E68yv1=*P+X@^`5_2tGv?>Kg=_nbN_7}*ZXHx4SVu1n$ z_I^C*c1y%GZ}IG3eKlrA#6;wUsOJ7bw>J(5PI?NH?3aKpvJX;w2F_|ahe?p5H!8I~ z2S`P3mkC=vpO8Li0C+uxGfZCEcpkvvD`>W8PfJInRvcIYV*Vd=Uy|@6v0u`FMPSRM zkban74FAW9)L~BGg*_6QC>BVwjdNLMdUb91467gdqaCWfS8xY;w2XY`lB@`?DBwjz z(rG$)KgY^&Lj`TFT;yRNh)DyHCQ{nX)*v95Gu#M9 zAIB)(D&m`#3R_rsxC-pM6{|=gN3m0)UZKM%DOHoX8}HGfySomeYS-#Em*`rLFKvZX zALw?8?Er2h-~tKMPT&_llU_Dt=GPN}2kZp$IA4OL;HAHyr0^(F_>qJ{*e-ty@?XFh zBzs~;Rcz$ZI>Di7wAyRPZu|D(!-w(KJ%^s#j(Y^MlqbPkJ*iVzCb>?z#@{&e7<^%> zwFr(7X135FhIWt})epkl>b*yVCzlPAQ<%iUxgX5qp}0llel}TkN}Mif7UN|W=e9v!0;M-+H(18GDHn1#6^FqS1jmE>S@4R`kt-oYY% zsaJWa)yQ#$4oV$h>g?AQmW3#0VmN>T8K<;{CwP5DQ#(L{U#y&DPACf~jZgR`Wi#&N ztz>a?hy9cRhbBEj0ms3Kznz0%ltuWry0UCT=2XoAN8B0f|2*dFXlOyBGh?*OpwRRn>E!6jbuxx~85 zBre#rJwCCW&#uO4zvBWA>#e^%TGuX?E*ZFaNyjq3Xl{Dn&3E9zGGuie}q>Alv!p>H7WU*FdokM(tTM`He^n>Vb#W0}7>7TrU+7Gy4>W(`_9 zaBco>|3LJk5fF}a_?LXB!yo4##;dElabWMjjos1S#Nd6gw*LM|%*s;e&O2}RgQ&kF zvM1Ue@zWn<7>L9daor1u=M*^_a5Ug(z|nxC0Y?Ll1{@7I8gMk=Xu#3He=-dOM@)gV z{X!f<{vHc#0p7oU+>#e%&q!DkwuB0jaCp+Ad}uE%EsK6m5Oh0h2+kKpqpK2PJL zKYt85yF~Mjoh`9wFa0kW5gJ_AjkR-IJkrwF*G=sl0_^r!#Kih(%rT+6e$yAmKe0_3t!Z@h0{cdWO& zE;7ipYEb@GA5d@ai$&_N!2p8J<7mLqfTICN1C9n94LBNbG~j5!(SV}?M+5)SHSq8i zg>_N}7u{_mYUS!tSm7?f1LuIxb7OsvvbzssJxMpusHdi~9;v&;77@mGNZg6k9b&Wi z0P=U>`*x)1dB*+f?`VZxDd>NV3;fDwt@?EfH(zw3viuXTpr0)wE@C1odc{sqi;8X$ z0p(uNDf&>_!Z-m@53b*fPrcYd{DY5oqP6wF=@I>+4fuP(O&fB&EJk?*xpvUrj23XF zkNh5dx>2K_v3gPF7h4&xhZuo;SAwR_1JxJ+1>&tAxKY&XWxQ5UY(m}5(AawLs#A{w zJHk1tL#@Raex*(y`#NuR(BEEs=#l-^g1UX81G_rZGZ*Tw&5(ff*T$MB+wem>M2++z`>P%o zW4nZ%X1R6)WtwefZteozn8CSeZ9*)DoeEe5wcLx=x)ld{-_LU&B?RYjG~j5!(SV}? zM+1%q91S=ca5Ug(z|p|}I}KpLkBel*XK1vA|&9zXkp-a6E7_@Qc8r6^$!)t+;>1ffb)w zaeT!;uXt(2zpeP~ii=lXweo!{H?RD=mCvj^weqJc>sQ^fYQw4ztor7vS698OK30FA z{^9yh)&EWXztz7{e{sWQ4a*vCYzQ^HzaiFepyA<$&oz9d;dsLf4L@o4bwfqtrHxlN zu54^-#1al?;CKQ{1Iq(}Ks_z+w+pOj@dM7f0^NcBKpfoN9~cRY1`Y*25jY%pB=Bh9 z(}5#_#{*9Uo(vofj0aAD?=yk3flOd3parG_`M^w|5U5=NGS1^@z|nxC0Y?Ll1{@7I z8gMk=Xu#2cqX9<)jt2fyXrQh$+D#|l_!}wWcet^6r>nDVw>%0ru8I&DHt8bSDp)J$AIx_IUSFl6DJnIi}#Wc{)_~07R;igOVNsQ zDTRKo0sb?*<t`=d6<&B(oE zgJ8Qt&>zq-Yi$Q)sST0N&4M@@k`7$6c*dWgUGGl|B z1mwR!r6wKXcfSpy0dm@agyS9IPW%swHw_4i#c%NG@aS~H5sC9p283{`&}TokLFgif z_suhE?P%+6>ury`VnC>tA2?Fc7qk?TY%KrAm0bXeWMlU7l4eTCuyu#3jPl^(T)MIXYl~P z0S*+#?;S~>;Kfgqjm|XTkY8AO)Q=RT3uv`4slI zSw9SU9*{5CAQ?b{E3G)c2INCFhzk?y@>N!x%K_PGgIo{D7j2N60Xb@ev;cC#28jT& z6lW49heLquwm}{ODcOlcRDRh6Yult@qjykkk3;XPyafR_lfbXaPQiA)F{tUVPITP$q9-KpH-QoDEXn zTn=eGV?tD1H}bYxKRc`S!zN|PVZH9p3=SKoO&rzw;kVWL=~=BGGAXOpgXNIMlO{y9 ze&lVnPJfo%rssx7P0Ffu>Mt8kW35?BwSM$%wVpBQ$hI0DDQ~NOV>zU;XhM`<{a=8b zZxzth+lK$=%7=eSiq3dfqIb7E3siC`DaLgvz*qS*%bw4Lqvkln!q0^xC51myT6NVR zMdQkR)VOFE1&BE$hgJ3{ocdcXgroFBfBg4+`q4-3zoYE+TQ9`3vV>2+HO@^M%Lj7KV9BdeY_mf_{gl*gKw*KT3gyRf3&=<`mSOhoe!%YK2G=!k*iE@#K^hj(8HN9pI<3+PAp*#C~Q z*N@*zNufDZMYgmeI+`&9|q3y2=KNXQr<^dGC}FXBna z7XjIBqw@_wP5?rv66Xvhh2K)^*MLyVCY?*51{p2;Rjpb;XvCQu(qCZLXAnvGCP2n* zI2!<=$EpE-$jy~^5 z${z)Uv}*RwVL<$bT#?=mYMLJaRbTuSaJH+Qr1K>}^if$MBFaZ?x7pz_YRjM;ZflQ+ z+Y>P&ZT8Ly;5-h9$`9JWDT1w{A!vi12M>@e8cS_Fv6548~h6Y>#29s$JE{4gLRfS7br zfatTQZ0j*Vj@YF50w7P>=$rt=Y>SkEVtxoJ>6`@)JtjZDR1lLNANI@bILl{2nh9dF zge`!O{g_g80HVh&vh`s=%&|jld=?OW?NA~90Xe?5h*yf?_V#eRFC2-*`eK4FC&JxC z;Wjhb-xrGy#M|PD0THI-8oIkEECFHOC^0I{!s>_&w8x_TaVzB=7Ao!Xf@R4Kn7}nn zdMR#I;+vc-c{XMS7AG=c z9ibc7K84#lI>Pa`XtxN5K~(~n)q%v09_)kCB~!AXBVrjFcve_ z)z%%yomJtEo;K>iIFh;)%o}vcO+|Y8<9mVDZLQBeNo+=X?@dG!x?%~^5wSvG;Qf8L zt4lvmQ!2+%4b(?l4KO7zNOy2iiscvKc3jXE2g8vaiJjo8I|63trYzenSc+6McCSix zBzn++%-TS_4@r5cmYob2(~VoIDb>sJ-Y;0x09~_%yTv3OLIhhKd~vr0W&`MVcuAA$ z>7%Y@`%(t4uK2Q8oL7;4>pvUZHj5F>@n1Jr2v8=3oX`W>dx9**|(hr^Z&*Mjvl z#_nwWz}7o9g~BacLaoi4!*_-@ZeAbWc*mBln7I(SU>8=J4`;*8TQ}cnmUiK8Igl`) zj@{wj-8~pgJLsdXTO$`q%}Tq2f~Zr`WvYKnzF?Ac*&OlJ9_#D5FM^(mMPLQpeYnFe z9Hu+t!+o8^4{n=-s>mOJO9PqkcC?WvGKuOvWZWi4t(TFaK^fZ2G;*Kt z98ji0bAVw)o_mPF&G8fiW$NQfTC%-6;T;fr$JpyD#}cOt9gTBio1E-tdA!)iJxi%p z8s_M0isDZ}?Cpn}Glm!2sdaRj0Ce;gFE^L!%=90$NO zqNS}`Et|XrZkg=tZreG)ma4lmyNdOTCdrM3_PYCr$jQGS9f<9zHYllZ?o!c1=f literal 0 HcmV?d00001 diff --git a/reactos/drivers/usb/cromwell/host/ohci.rc b/reactos/drivers/usb/cromwell/host/ohci.rc new file mode 100644 index 00000000000..fa183242a97 --- /dev/null +++ b/reactos/drivers/usb/cromwell/host/ohci.rc @@ -0,0 +1,5 @@ +#define REACTOS_VERSION_DLL +#define REACTOS_STR_FILE_DESCRIPTION "USB OHCI Device Driver\0" +#define REACTOS_STR_INTERNAL_NAME "ohci\0" +#define REACTOS_STR_ORIGINAL_FILENAME "ohci.sys\0" +#include diff --git a/reactos/drivers/usb/cromwell/host/ohci.sym b/reactos/drivers/usb/cromwell/host/ohci.sym new file mode 100644 index 0000000000000000000000000000000000000000..4c3182f92e265542828ef2e9de5e779aaac9c06b GIT binary patch literal 2592 zcmZwIU5s8s7zglS+bfy~4Mng*qm3o4RH^vbtzD#=ko0aV8Rwjt_dT;a=giqTb9QZM zkP?YVNqXUm2qAITqL(5mi3>!CxFJO(MAHii7mN7#KXX2I25)lmp7Wb$p80y-^G>q% zGl{Q#^ZVHXuA>_nTjTqg-Ox4C*9DCI`S&E7U|gs=NwqvU2sNLF>rfJY2Rh9}Pk=XK;NN$#0N*FCBWNiB8H)o*9ICZ9Ipur!VVc zNH#;>x;&JtAl!d~w{rfvx3J&29uQ%JrejQI+3 zIFg?r-S_UQa=EB+o;(-x0>V2Dvekw;>zu3S&No?2Y6b$Y+uK1vwqb<_X5W?*xtb z?1ub22wzE*<3-J;+p*f1ImGOUh3V+ z1Y{h^hmbcS`4VzGlCzMLk*q;Jh-4Gqi`!}MBiRG_I+FV#KSXj6BId$8Ipl>w zcp-}#zuZ^W#Tw)CCglm^{cUBet6k!nnsJk7ic@OOca*Nk+lUs)w)Rwl(rw&Hwd{N){L#OB;x>}B!+w$&cD5$QJd<5t8{}Hn&A!+AO%&XJ4 zvNrvSO)3-%mYtM>##-0th{ zZ4cL;fBtz(l<4N55StwH#o9~r>%}1tbDNDJ;e@itS&yaGau*G45{fpp!D5Ao5j2Mxcy98G$kaWdzCylo9w7BG8ijRbtwm3c6DPS7Ll)N+g4Y z#9*Nq_a>%2#kgCe{b}NuH@kv(hW*$oC(@1swpA6Ka4f1d~G05YRNtq3J@U;#S0wZWOe_F_C&jOVqNSQ)52H5#1S=M!Qvs!oa6O-f{9 zFgI`L($qFjs>PGqoLhf{+WATPJm}4Qt0KE|fiOhUU(P%JN6xoLpgVQ1g+_hxz zbawt^@HFZ|fz!!gI)#7RjKO20Xif<=S~bchCf{PDU@BFAA1nY*>RZ6EoOB_pz){kK zR&%hilIimV)AI)#oj@}g%t3dt*Odt7=A+XS`HDbCGWa@pI#R*cm(n4WV>~fF|DdyD zGWa^_RhZD+(&*-o24C+;xE)OMNZJBP^Jc4=y3oeyR$@DnjTK7ywNMYk1m&f=2OH-n z2J`dpdmpk@-{!^+Hc~xS{=DK38W$9^&=fs%7j>&XyMc~gNUso^IveqfpmPSIEZi8qr+_x*yv zNVc5ZH+Zt*Dj}*yUImxR46UMskEr8{ipS4X><0 znV}28Lnm*Nn)wUKC%!_I%fXikfs~-3r1k<<`VTBgSrxSyxtE)c!6O^V}PN!U-+rHf)ifJ`ZvoL;* zWM}J;aHE;*2bkg#*()i5X0n$t#UZj@PPhdbIBIzzF=r?t9nNU;R+tndHMh8i%Pg{AVgSWpOdewYUL) zXHA6=yBwNU3v~%1T8TvLN-Pty2%}NZUg1(KIfY8)%}H_|T_g~Bg31+*W_Yl`a}E=( zS$m8tdK8C?m!mJB7CMKT?!*zwi1>oZU||MoW|uR^A*68m;%&UX!xzgg zuCa8n!sue+s1MyrjQgN?OWw>iB6yJ9Mz1X0M%d!fo?bx+>5XH;Vs#0)c#3U==44m{ zH<)I#Hdq+?0Q>NKs%gw4mwyp^4}&;Ep~#P9bTAssV+H*YdvK5T5nC%{!;n$zgClWk z3E4LgCIjTFU?rYOWlEmJz@pLkd0e(gm8AkT6WZm8bcIqc=7y4vSWWgCm;{@8v-U&j ziHaL1W89y$OiRm3;BgRm_u11-%ur{H77ijB4|^+KdEo4B|0FALlu62Xw?H8xvliUh{ksF^*cYF)?EK}$B) zu&{+JWIA%Hq?!V^B@0&au{$Eh)0%TCd0aP z3z`hnP#vauREnkC-@H88LIJHaR)z11s*yt|&d~Y=6%qqAB7PAPsb&|?E>9}pO**sh zWfDyt;9;bxtdXNm+B4K78-c47v7QrN5nsatgx$glEXaxHy~+KQAPKa`SVHlE%u;*g zhb1RrOY;Y?A%n2N`a2>hTQyi`nyl!sW$P5Bx17 zlC#VMjp1Sn&4Vd2Yxv?T@JsVyn!Gh&nPyu@DH3qnTJ~QRBQ{Q;0yVa3jgvJPgt$93 zn4>wpjVzwJs#|VqK4z=A1G&d^;}v+QlQNs@)SQf#dH zYyf^V*D-`ps~P4F$YA$0G4w3V5K7a00O;`#NIOmi7RiZ26Rc|FLOI*OqvmOb76VqA zieKaLg+!K1RTpJmmb9~W@8x&yp2e(7x<@nW-E^;-x`!YS_yPpz2>Zh1uNJZEx%<_s zYgrbIZpRigN@kz37byF$lJ<|{;eln&_);X`(BxJTcrPtJSA2s!0vkgB`@gpl=cw3b z4c3|oZGIx>K-h_y##y;^=Bd5mM}REWaHdx!(p8Re%m+kK&X|Wo%6X&6x*fbRpfP|8 zpH4N6ArQ$O7_U0;5OBv@PO+9-yZH^WU@D@0YrHaZf`$$Lo)&^!vgtvblqgpJ>xy-X z_UiHXarBTQA={-8wb###k_cK*rU*h#AOuTNL<1u2qbR5g<|HB@Ve^b|GzX|e)qyQ+ zH$VWWU_(Mv`vom|bmAA-9#1Xsau21y0S|RQ)wF+LB8@Jj(c*$&8fzipYL>21r7cqn zTELTLp_o=RjySg0Q~TV)2Sk8h)yO{*HWZdGg!>r&u{+svI=cX3hmS-4Y3$mPE$Dq- ztuYk2#urKv!`MWepBSv>xT6{ZB?Q&jo39`wgV?%2?!_g#4J3mnvlo>R*ML}zpCs{B z507)i&`hr4Wmy2#}|#ObRrfRP(6e597EVZ6JLJ`%HMVCD4p$s7ZJ5LiJhKXD*9I5GFJvwsO$$1oi#xLz zIS)n-&s3yZFclWT3a~8YDYF?~YzAH~P@QbLpVlhMLdiUvBj*Gqg9W1_ATB!Ccwwpq z33xvrC(zqv7*P>NBuNi+pd}PzJ)x-*TPb;#id?bCwv93zuT=@ai;W;)Lz9J6GurVW ze1$mw_GUzU#E7&14gC#M(qFLJnUFc|q z_)uo%L{g0(XQx+;iN2pPVh2 zD`}c5E_n<@(u#4-l+~}xLQPo@`(=6Nu@X2LQ*mu@>OP;L&@Mqs2rIM7CICnc4=k^! zIxqkXbO+#;4j|JGnzV!8LlRtTGb;?0b|DAbyHUw}iT#m}2IRgiT*LJmBX&WmCA|-h z+Kt1*6IqN^8ve`+w*j|zBH5BI5o_ydQWq+bKaPs85%Ng5UrPm#1NoBb)JGlj56jw? zE@5Ov=0SWZ3upA22&dhg48ZSmVq@}X)&FY2arY^Q7hn5)bogmN$^La}BJFaVNQ`eU z`Yrj<=DRSNE1b=#;3@Rek>fagf_GFHeH!cgP2>91Zuqd zP}rSRk_`agLhcmiYIwmxaJj_d1k-rJ%;I#!J3!Icb z%LA^@ZuZo4@C-rs2QK7wOz$J9GL^j?XY~unz49C*=`49^5nF7OW3MQYsA%*j*Gp9F zl17``Da??ORB2Hsc|q3!-*&7i&I}!5@=zED5eO{+0ENF4I-v855KW*<2ydLRKZk0r z_=l+mJd?#^C4Z3kwSx!)cJk50FPLn)FXeO=HhtcoYA|MxDj+U(E`=%=@B`^F2xBW&uBjPx`yOa_{)I< zMF^NDGnB>Y&A6L2%iPU-KK%@i0-#jD$0{RH&CEz(otxoh8%v6l7C$<^%j-Kmnb9MC z6kt8a9kJMb)R2a{m`KyQ5F}7oh&i(%q5>X`+&etD6YgCj=TSuXfGRlN=U;goFr5s- zzR(p2aII}zg0Ysl+uX@!S86kt1ak|qpFZ%SkN1i2=7G1{F@j0w6Jyl=3M&vBG*f zC1FLIxNE$a)}PHl4q{Ib!VZq7P8Z{+$aLfEurZfUb`%3RC_I^JISJ=F565?|INj$# zH)#=}AN`z@D-OTHyDpk*>Ub5SY;-L{rob`Fd)c8=N1L^7NP$%&POi+H#>p-Kkb5m@ zk;d+mvlg3F@ux-7RfeSZTZTstl??c?CyYfjWf~X~c-q{NOBb&;Rh(=rq<#@R>Rz=ureZcdsGJPU*MGhmUnscr>h)}o7;#@GO)35CfZ z9e88#5$A10V8)4RD6cs=Du%Df@i_zz@{iMPs?1f01kiIc@*YnNjswXzAOlp zB4npU{5(!(9@d3m|0%=bs*z!x2EoVRhmD;nAI;OMaD=IJK#>eSodVP5r&HUGJo?7H zsexq6k;LE;5x<$9J3-rLj)SJg0GHiXf&Lx57SqAx(P>0V0@b z5jQY=nI=i(pZ-H-d@{3h)2i(T3SmrQkzKGBf=w=^84fd6Od9w@ATlB_sXGoB@aQ#6RfQ*ZMsBkRBq%uv)w%5V#) zrcT)!Eo?!oT`z+ib9T9`xdz} zevs%4AX~_u2aLNOvOi=(B(f9^OltUWwhbyWt$}hF3)lugrRDy$pR%pO3~+xI`v)B5 zlR$pr@dbIp7OSQrw>&~3p0{YRku=zX-u^~uKB|MwgrLK~V3P@`x)-C`@8|a6Fti9A zvazA4^RSUNr*A{xgV{9=Hm8T!Fk5n%m&pxF(EKFNc1(CI&bU>vj{3Dn%2n3P zmb+w~f!-W|X&hBNN(f>O9Z zxAyA4a39`<8nm=!FIMPa5UCa8hK;5_L8O96eItH&She@1pK*J|z9rgatdD;0h)me- z_<4f{bm23|)g+Ga20QjXnN|C58R6k5a)uDdeh{Xk4n}4Yi0-lM7qo@4kD2p%Jw~}V zg@|N^R=^qFX^^)@S`X7>%c<7CoMcTguDfufp`cL&jIMIW3)*}5K#e5mM!1HXhSQTn zf!Nl=5pF>{%n_oynWQ|1QDh?`H6$K3w6owRicnkjQ{Bv956cp^{!U4NzE0_s zE(R;r#@fRL~qQ%sHSb@20ZH*2DcXLGqG{2!gk zF;3utJ?b<`%oDN=^SRIT=-SXJh9CIR3Dw?9c!1nmT0V10R)j|s@E{^#nhM;@u`=9H zUYjpBc{m5TRMmM>)`3%CU*TtRUi1DRHe3s1!eFF@luolXbP&oJZUnQBV-!y%=}lXO zHtsxJ1~2YztZY_Ala4|cmxI#e{HjJqDa8>5p4&hg(E?UsZU~BHsH3XqP;xB~_aL6ZB7JF8d8^gH zafMDw?q})j*ANP-`%oMcTX3o6Y|_$6gCuEb4bar1|K zkI^sPMs+7$pCeU@tejGoybSL7QB}i9SWuwDLfPNMfCtal&O*S$2pl0DxMfZ;s{A#{ z)=r&JNaIN|e)mHn=spitDek*j`v-D+*n1SU3#0=~+{9A^273jMXhC~Rh8MIhCYc9Y zn8Na)JNt}mfSQM%Zo*=%O{NJmP-8oJU^rz(MP9TeU0co8tQ+{0L^?|~9F743xbQSBpmjP3S z`gobBL4M*U@ki@M&=L z!B={WjTM(39CpC-qKvQN($AFS$4c^#l;j^S$v<9_f3hV1L`nYXlKiof{4*u_BPIF6 zCHZlC9u`j>Bg>aPEPs~~C?iltpo~BnfiePR1j-2fe}w=7>p$w+4nFYuZgB`NKIN;7 zKpBBD0%Zis2$T^hBTz=5j6fNIG6H1;$_SJZ_|JntZ)aQN+Riq*t9QohN!-h!H}TPL z8lQ($o@n&c-ly@wy*~bY7rztud{%wBE^&yjRy)ME@u76-=Z9yY>wGVw{2Ta;o1bLP}6pK z#df}THBRRpXSo=+zP3nhn^?BA|AwXQ%YCA$@k2NGknyeZ`&avJ3GeW&s`Itn-soFd zyV7^{mcDS$)xM3r{W0H$-kw;rx2r20^)1`7al@_4eNEBG9?CT%a~?Ho$l8I|=I{3P zM?M*b;BdQd>BriAG5%q`+S=>-_x4}c73ql&+!Jl>>kCJ%Dg|%5?FJu&`r5;LB5h$G z{XvHQaO?`MdzS8%i^>R;5hx>2Mxcy98G$kaWdzCylo2Q+P)6Xt7y^M|vqRcGAr2yc zmxZ9BvACweAfLgxlh=NN>;9 z&S<)Khr%d%6BHq6v)JoDq*hdSzLI(M^)~>eDj(C447U>R)`I6S#(-Ur^ zN((sO9_er0(G`Zo3pkI1me5Y@^mnwj?GDAGJMfkdgO0<55dL)HjxhdzA;~9RqD8~q zy?er>2i|1^dS5)oS_pynt|1={?~L@v!qHH)w>K8*j6>)!m`grAvEKgO(Vni_@BquI zM)^B^Aib?O8m`3w0|b_@G6H1;$_SJZC?iltpo~BnfiePR1j-1M5%|xJz(beh*ULWO z*?uHye=?>8SbI=#Ku)jyyonzQf(wk@0Rb5es)E(k>5yE#++=kSxVvG0)^0(sq z7NqHV*7fS!w8O3t^uNXhe&w}J{knvUUv#3f{1bE1&+Q^6q9P)C#7; zdQsZUJbqCJtv`rQo!CM8LyybQ+6M4+i$2i`{=Lwq6*=A(qdbgU8)R=m3%I9`{2qL| zP@|8zdQj#QTbZw$6hZ$kg-l%ss?iS#q+1_&BdFQKd@YdJh`L*V*aqmTOOJp%%sHw< ztwouC6;2UMxpy$V-y*M0tP-_iwYU~???5l;x<=3&EC`1f^Y@@PU6vm9icYi^VcrgL z1$Z}sZzppRDt*9%wAcwgI>(qz^NE!}^n+pz+Fb=q{h}Vam*Qr{=LYV_7A2QPjC9iR zqMSru*R2-#?Zt;KIbO}E+bh~}szW1lw(;769uR)5j6B(f59p9I!b6T%9bSy>5O$fR z==w{LZDMWifZV8|xoK@eEPNElj6fNIG6H1;$_SJZ zC?iltpo~Bnf&X_1V8f3W$%-%0cHJk_l{ftO2HGss-xdAyb$6`mShsuKL+d`j?um8( zbKSGFF%QtabRll_f6U+R@9{_d1OETv|2zLt|8f6s{8y}OSh;KEy({;x{L;#!EB|@r zODq3<Ga53Sm=>hD%PyXwTMU#_ZKedFqlt3R^(yQ^Pa{ocB0-Tu0V>ONoh zH+BDB_eS0M^%vDIufMK7SpVVrX#M{Bhw8sv|IPZN^)J@{qW<^w&V~ycu54J<(Aa=2 z9PWYR@-OqR@caFBw87slu%pEfH0$(t`TP7aXm_uF*gxVw=>Lp=%>S_e5&swbhy0KG zpYT8FKkOg(AA{bf{HOhC|CC?zPy2KJ8Gqhivl3#;R~dma0%Zis2$T^hBTz=5j6fNI zG6H1;$_SJZ_%DG#ZAYYw?tFg*pSSVG=ADj?*4^?}xY56^Ry(e$1q7CJF{tQb?bj_)i*#y*h;?-vu7eMLLE173u2w zYlA{OJ>a?eVx5O5gP`1Eqa;D;HYg;gy|*V^ahbK&BjEWU%*xd8%b@JCQN97nu#IvI zlr1=3Gi&`bC@bD)rTiNxQ5)qIP&$29p4UMcv{78JxSdy6c`gCvwIx;xS>@1DD`g!h z_rKpt*#gS9Y?P0J@|&xzJZ+#ni^q1%Ufcu9Q5)rcP^N8^he6r7!dmM~pmffR!E}1HcW1xH<=gHi6 zrn~^kS8bFuD1lX0p5KG=F&o8!MQ+7vE6>HC?6grn0Ls^Flp8=fY@;-Ta?C~vgR%_w z089-BLD_AiJP68Z8|5pY{Mtr&3Y7MGtDJFAzGbwfTb)FnM)_t;fdW=r9@YAx zb84Ob47d&F`bSL3s&yJK8&5-xSxdEk_?%i#n{s4Z^$(Y}Rkx{>(oirdD(Zd;lru%$ zojtAif2Dl0P4%K9)*0{FE$_YA?Ppx?1@tPtX4&&xJZjxBEPO5=*;Du|VBhPuo=s!VZZ?kc4;EHP`Td2vFwsCU&m1qsSB6&g>LwpG_&N@>_QtM&9b zwO%mgsMen-ZL4m3DWw4~h0}Fbeb1d!>+V^7f4a1-x~@`6L+7m4X)y%xU9Lp5_p~E_ zthBAVdrK(|&&+Dwdrqx;XSM!JX?s_QJJG~79>^}so`UOlVz@zS>H21+RnPnxYOPm5O~p3&3lE0O6p^p(is zTh!cX)_VbYrPrT&C8G65dQnQvy%HTVcw9)?FMTDt6J#l84jzTi;lf+vGuQ4f+8=F$47zZ*q!2z1kj9ZC#84U6&p{#IOCumDT&QxAQU&%q zm2F7M<)G*zC@HssqOazX@-a~Km_$@$}o7$*6A;v>#L`fd_5>*HlB^3 z&}G)T0~9-kdqL6HK`G|}s%7if-+(f#Rx8Q#9jaxM`~y(*6;1NI49b{MD->$)>I#K; z%`toWTkz0jQk*y!)Ynrf=W9I|29O0{gZ@kvk)gJ_P< z7$`YVBx2#7cBJJ+jz;S9MeuA_IZ63CDEh2)im>ug+ih(fp|&7IN)ENQ#X@cID9JWQ z=NNb%2gTIqXP}JPD6fK|uX?ieg>HahYwHS7Ons;gKPU%nasr@y#zwgll*7h&QLTPZ z>^Of46n!qs*1t(SM!%@mGoVnP( zC%g99eF-S~j!g0_0j19-`Fc>O8>am# z+#-2~Kr!bIwec7z`rg4Q{sB3DO%U%CLv3xLSZ^pCjrK+bzYGZP0t&U7$-drbtUuNo zi}#BVy}p><6%>+$5FeBnm1c3Zhx^;2k-nH!@(zoXHu*whsST9CYmxL)yv2y$oMg$< zT?UnfKL|y7A~8$0tt;Hx6Ympr-mYqP@8!eXKD@_CC*j~<72-8YeBS~uPm1gjp$>@a z@8p*&h43=uNN;Sbkjggp;&d`O|EQMOz z+e5L|NS6qOAXO4r)&BU7Zk%z_OPypvd)Q>+bbA-x)r7Y^_lNmD0&}raovmFlydx^q z-rY(g7(-I;1?vVZxv6k>Uu-Yfx~%niBuUM1&)xBGTnCmY?O`hg2Hw|;cVp@IxD@2L zeFFICr~#$~1?invl;Zx2P#a!|6@$Xz9r2yesw)g-=*?8Nw@xWhk?7qj)gJH00J3WR zv0fzQORVf-xR~B>rJ7QsEZ?&Qi|VJ>TH#$@QVuaft#*D5Oh>JH)+-g^UUgcPq{y)AD#@LRn29bHg&Pk*Q< z-Yr7iN_E1owWpo*ir$S(q^B*kE7H*sA!OTo$*TE{Vo_v)$nJ2oCk%>wF&R-?kVezr$lQaw%^{lYp-6XMC}erTS)h*Q*ljHz z*?Q~dV5s@_U`x}M&~3p@TQ-C?-Fo|0tXzm(a0)BUhqIxkty^w0OFQu{H;6E=_T8bL z-QAc>JLsccZ$>VXnw543fM`%LWNLg&y9~q z9_sBNeeiZSKt=ulS{ls6x1*IjkttLkA>-|B)Ov|1nv~H!VeVpg>n@A~oDE*e7K8I7 ze}dtlGUMfU%3742VKJcYS+wtNjr2$xQ$8q!<3B5mX9hj^ktS-21zO*K7g*U~Q5(Sb zSpcxViH|xc%{kQ98pX^YVKfb`FUAY3TqQ#0+xplRx+6X4dT+nA&nA$z*YQbpBHgV! z!=W9maJXbF{TMug3dX*(ryHJysb}u1>gU`eWLT^Iiobv#Ruje&Ll(^j&BiHXtWao! z%`ypZy~L1YGeFs~5(ErZ-D^p=O6ceynr{r0^T*yU3oz|OZ)CmYMTs;#bH5gm$As5_ z5(v!+h8a2c6oZ@NB?e&X^GaH>eK_GA5PL`2>nq0+qZcR|_i}ChWIxOE#Xj%3mujbB z&c4P7{`A7$KDaq!da<2aXO}sz$Y5B`S+E$`(K`^r(kaom8Up%Z_;k}m=QQ$=#6jAs zWj2S%Ti~sZ9bK(E``J=;cV>rJf3YLEv5=f1W-qMrWZA5C$Z*svC2gJ!{-PtYQ%AvS UUMB2ko;%7 + + +/* + * Standard DriverEntry method. + */ +NTSTATUS STDCALL +DriverEntry(IN PVOID Context1, IN PVOID Context2) +{ + return STATUS_SUCCESS; +} diff --git a/reactos/drivers/usb/cromwell/linux/asm/bitops.h b/reactos/drivers/usb/cromwell/linux/asm/bitops.h new file mode 100644 index 00000000000..f16396ad4ac --- /dev/null +++ b/reactos/drivers/usb/cromwell/linux/asm/bitops.h @@ -0,0 +1,384 @@ +#ifndef _I386_BITOPS_H +#define _I386_BITOPS_H + +/* + * Copyright 1992, Linus Torvalds. + */ + +//#include + +/* + * These have to be done with inline assembly: that way the bit-setting + * is guaranteed to be atomic. All bit operations return 0 if the bit + * was cleared before the operation and != 0 if it was not. + * + * bit 0 is the LSB of addr; bit 32 is the LSB of (addr+1). + */ + +#ifdef CONFIG_SMP +#define LOCK_PREFIX "lock ; " +#else +#define LOCK_PREFIX "" +#endif + +#define ADDR (*(volatile long *) addr) + +/** + * set_bit - Atomically set a bit in memory + * @nr: the bit to set + * @addr: the address to start counting from + * + * This function is atomic and may not be reordered. See __set_bit() + * if you do not require the atomic guarantees. + * Note that @nr may be almost arbitrarily large; this function is not + * restricted to acting on a single-word quantity. + */ +static __inline__ void set_bit(int nr, volatile void * addr) +{ + __asm__ __volatile__( LOCK_PREFIX + "btsl %1,%0" + :"=m" (ADDR) + :"Ir" (nr)); +} + +/** + * __set_bit - Set a bit in memory + * @nr: the bit to set + * @addr: the address to start counting from + * + * Unlike set_bit(), this function is non-atomic and may be reordered. + * If it's called on the same region of memory simultaneously, the effect + * may be that only one operation succeeds. + */ +static __inline__ void __set_bit(int nr, volatile void * addr) +{ + __asm__( + "btsl %1,%0" + :"=m" (ADDR) + :"Ir" (nr)); +} + +/** + * clear_bit - Clears a bit in memory + * @nr: Bit to clear + * @addr: Address to start counting from + * + * clear_bit() is atomic and may not be reordered. However, it does + * not contain a memory barrier, so if it is used for locking purposes, + * you should call smp_mb__before_clear_bit() and/or smp_mb__after_clear_bit() + * in order to ensure changes are visible on other processors. + */ +static __inline__ void clear_bit(int nr, volatile void * addr) +{ + __asm__ __volatile__( LOCK_PREFIX + "btrl %1,%0" + :"=m" (ADDR) + :"Ir" (nr)); +} +#define smp_mb__before_clear_bit() barrier() +#define smp_mb__after_clear_bit() barrier() + +/** + * __change_bit - Toggle a bit in memory + * @nr: the bit to set + * @addr: the address to start counting from + * + * Unlike change_bit(), this function is non-atomic and may be reordered. + * If it's called on the same region of memory simultaneously, the effect + * may be that only one operation succeeds. + */ +static __inline__ void __change_bit(int nr, volatile void * addr) +{ + __asm__ __volatile__( + "btcl %1,%0" + :"=m" (ADDR) + :"Ir" (nr)); +} + +/** + * change_bit - Toggle a bit in memory + * @nr: Bit to clear + * @addr: Address to start counting from + * + * change_bit() is atomic and may not be reordered. + * Note that @nr may be almost arbitrarily large; this function is not + * restricted to acting on a single-word quantity. + */ +static __inline__ void change_bit(int nr, volatile void * addr) +{ + __asm__ __volatile__( LOCK_PREFIX + "btcl %1,%0" + :"=m" (ADDR) + :"Ir" (nr)); +} + +/** + * test_and_set_bit - Set a bit and return its old value + * @nr: Bit to set + * @addr: Address to count from + * + * This operation is atomic and cannot be reordered. + * It also implies a memory barrier. + */ +static __inline__ int test_and_set_bit(int nr, volatile void * addr) +{ + int oldbit; + + __asm__ __volatile__( LOCK_PREFIX + "btsl %2,%1\n\tsbbl %0,%0" + :"=r" (oldbit),"=m" (ADDR) + :"Ir" (nr) : "memory"); + return oldbit; +} + +/** + * __test_and_set_bit - Set a bit and return its old value + * @nr: Bit to set + * @addr: Address to count from + * + * This operation is non-atomic and can be reordered. + * If two examples of this operation race, one can appear to succeed + * but actually fail. You must protect multiple accesses with a lock. + */ +static __inline__ int __test_and_set_bit(int nr, volatile void * addr) +{ + int oldbit; + + __asm__( + "btsl %2,%1\n\tsbbl %0,%0" + :"=r" (oldbit),"=m" (ADDR) + :"Ir" (nr)); + return oldbit; +} + +/** + * test_and_clear_bit - Clear a bit and return its old value + * @nr: Bit to set + * @addr: Address to count from + * + * This operation is atomic and cannot be reordered. + * It also implies a memory barrier. + */ +static __inline__ int test_and_clear_bit(int nr, volatile void * addr) +{ + int oldbit; + + __asm__ __volatile__( LOCK_PREFIX + "btrl %2,%1\n\tsbbl %0,%0" + :"=r" (oldbit),"=m" (ADDR) + :"Ir" (nr) : "memory"); + return oldbit; +} + +/** + * __test_and_clear_bit - Clear a bit and return its old value + * @nr: Bit to set + * @addr: Address to count from + * + * This operation is non-atomic and can be reordered. + * If two examples of this operation race, one can appear to succeed + * but actually fail. You must protect multiple accesses with a lock. + */ +static __inline__ int __test_and_clear_bit(int nr, volatile void * addr) +{ + int oldbit; + + __asm__( + "btrl %2,%1\n\tsbbl %0,%0" + :"=r" (oldbit),"=m" (ADDR) + :"Ir" (nr)); + return oldbit; +} + +/* WARNING: non atomic and it can be reordered! */ +static __inline__ int __test_and_change_bit(int nr, volatile void * addr) +{ + int oldbit; + + __asm__ __volatile__( + "btcl %2,%1\n\tsbbl %0,%0" + :"=r" (oldbit),"=m" (ADDR) + :"Ir" (nr) : "memory"); + return oldbit; +} + +/** + * test_and_change_bit - Change a bit and return its new value + * @nr: Bit to set + * @addr: Address to count from + * + * This operation is atomic and cannot be reordered. + * It also implies a memory barrier. + */ +static __inline__ int test_and_change_bit(int nr, volatile void * addr) +{ + int oldbit; + + __asm__ __volatile__( LOCK_PREFIX + "btcl %2,%1\n\tsbbl %0,%0" + :"=r" (oldbit),"=m" (ADDR) + :"Ir" (nr) : "memory"); + return oldbit; +} + +#if 0 /* Fool kernel-doc since it doesn't do macros yet */ +/** + * test_bit - Determine whether a bit is set + * @nr: bit number to test + * @addr: Address to start counting from + */ +static int test_bit(int nr, const volatile void * addr); +#endif + +static __inline__ int constant_test_bit(int nr, const volatile void * addr) +{ + return ((1UL << (nr & 31)) & (((const volatile unsigned int *) addr)[nr >> 5])) != 0; +} + +static __inline__ int variable_test_bit(int nr, volatile void * addr) +{ + int oldbit; + + __asm__ __volatile__( + "btl %2,%1\n\tsbbl %0,%0" + :"=r" (oldbit) + :"m" (ADDR),"Ir" (nr)); + return oldbit; +} + +#define test_bit(nr,addr) \ +(__builtin_constant_p(nr) ? \ + constant_test_bit((nr),(addr)) : \ + variable_test_bit((nr),(addr))) + +/** + * find_first_zero_bit - find the first zero bit in a memory region + * @addr: The address to start the search at + * @size: The maximum size to search + * + * Returns the bit-number of the first zero bit, not the number of the byte + * containing a bit. + */ +static __inline__ int find_first_zero_bit(void * addr, unsigned size) +{ + int d0, d1, d2; + int res; + + if (!size) + return 0; + /* This looks at memory. Mark it volatile to tell gcc not to move it around */ + __asm__ __volatile__( + "movl $-1,%%eax\n\t" + "xorl %%edx,%%edx\n\t" + "repe; scasl\n\t" + "je 1f\n\t" + "xorl -4(%%edi),%%eax\n\t" + "subl $4,%%edi\n\t" + "bsfl %%eax,%%edx\n" + "1:\tsubl %%ebx,%%edi\n\t" + "shll $3,%%edi\n\t" + "addl %%edi,%%edx" + :"=d" (res), "=&c" (d0), "=&D" (d1), "=&a" (d2) + :"1" ((size + 31) >> 5), "2" (addr), "b" (addr)); + return res; +} + +/** + * find_next_zero_bit - find the first zero bit in a memory region + * @addr: The address to base the search on + * @offset: The bitnumber to start searching at + * @size: The maximum size to search + */ +static __inline__ int find_next_zero_bit (void * addr, int size, int offset) +{ + unsigned long * p = ((unsigned long *) addr) + (offset >> 5); + int set = 0, bit = offset & 31, res; + + if (bit) { + /* + * Look for zero in first byte + */ + __asm__("bsfl %1,%0\n\t" + "jne 1f\n\t" + "movl $32, %0\n" + "1:" + : "=r" (set) + : "r" (~(*p >> bit))); + if (set < (32 - bit)) + return set + offset; + set = 32 - bit; + p++; + } + /* + * No zero yet, search remaining full bytes for a zero + */ + res = find_first_zero_bit (p, size - 32 * (p - (unsigned long *) addr)); + return (offset + set + res); +} + +/** + * ffz - find first zero in word. + * @word: The word to search + * + * Undefined if no zero exists, so code should check against ~0UL first. + */ +static __inline__ unsigned long ffz(unsigned long word) +{ + __asm__("bsfl %1,%0" + :"=r" (word) + :"r" (~word)); + return word; +} + +#ifdef __KERNEL__ + +/** + * ffs - find first bit set + * @x: the word to search + * + * This is defined the same way as + * the libc and compiler builtin ffs routines, therefore + * differs in spirit from the above ffz (man ffs). + */ +static __inline__ int ffs(int x) +{ + int r; + + __asm__("bsfl %1,%0\n\t" + "jnz 1f\n\t" + "movl $-1,%0\n" + "1:" : "=r" (r) : "rm" (x)); + return r+1; +} + +/** + * hweightN - returns the hamming weight of a N-bit word + * @x: the word to weigh + * + * The Hamming Weight of a number is the total number of bits set in it. + */ + +#define hweight32(x) generic_hweight32(x) +#define hweight16(x) generic_hweight16(x) +#define hweight8(x) generic_hweight8(x) + +#endif /* __KERNEL__ */ + +#ifdef __KERNEL__ + +#define ext2_set_bit __test_and_set_bit +#define ext2_clear_bit __test_and_clear_bit +#define ext2_test_bit test_bit +#define ext2_find_first_zero_bit find_first_zero_bit +#define ext2_find_next_zero_bit find_next_zero_bit + +/* Bitmap functions for the minix filesystem. */ +#define minix_test_and_set_bit(nr,addr) __test_and_set_bit(nr,addr) +#define minix_set_bit(nr,addr) __set_bit(nr,addr) +#define minix_test_and_clear_bit(nr,addr) __test_and_clear_bit(nr,addr) +#define minix_test_bit(nr,addr) test_bit(nr,addr) +#define minix_find_first_zero_bit(addr,size) find_first_zero_bit(addr,size) + +#endif /* __KERNEL__ */ + +#endif /* _I386_BITOPS_H */ diff --git a/reactos/drivers/usb/cromwell/linux/bitops.h b/reactos/drivers/usb/cromwell/linux/bitops.h new file mode 100644 index 00000000000..6509d07ba90 --- /dev/null +++ b/reactos/drivers/usb/cromwell/linux/bitops.h @@ -0,0 +1,72 @@ +#ifndef _LINUX_BITOPS_H +#define _LINUX_BITOPS_H + + +/* + * ffs: find first bit set. This is defined the same way as + * the libc and compiler builtin ffs routines, therefore + * differs in spirit from the above ffz (man ffs). + */ + +static inline int generic_ffs(int x) +{ + int r = 1; + + if (!x) + return 0; + if (!(x & 0xffff)) { + x >>= 16; + r += 16; + } + if (!(x & 0xff)) { + x >>= 8; + r += 8; + } + if (!(x & 0xf)) { + x >>= 4; + r += 4; + } + if (!(x & 3)) { + x >>= 2; + r += 2; + } + if (!(x & 1)) { + x >>= 1; + r += 1; + } + return r; +} + +/* + * hweightN: returns the hamming weight (i.e. the number + * of bits set) of a N-bit word + */ + +static inline unsigned int generic_hweight32(unsigned int w) +{ + unsigned int res = (w & 0x55555555) + ((w >> 1) & 0x55555555); + res = (res & 0x33333333) + ((res >> 2) & 0x33333333); + res = (res & 0x0F0F0F0F) + ((res >> 4) & 0x0F0F0F0F); + res = (res & 0x00FF00FF) + ((res >> 8) & 0x00FF00FF); + return (res & 0x0000FFFF) + ((res >> 16) & 0x0000FFFF); +} + +static inline unsigned int generic_hweight16(unsigned int w) +{ + unsigned int res = (w & 0x5555) + ((w >> 1) & 0x5555); + res = (res & 0x3333) + ((res >> 2) & 0x3333); + res = (res & 0x0F0F) + ((res >> 4) & 0x0F0F); + return (res & 0x00FF) + ((res >> 8) & 0x00FF); +} + +static inline unsigned int generic_hweight8(unsigned int w) +{ + unsigned int res = (w & 0x55) + ((w >> 1) & 0x55); + res = (res & 0x33) + ((res >> 2) & 0x33); + return (res & 0x0F) + ((res >> 4) & 0x0F); +} + +#include "asm/bitops.h" + + +#endif diff --git a/reactos/drivers/usb/cromwell/linux/boot.h b/reactos/drivers/usb/cromwell/linux/boot.h new file mode 100644 index 00000000000..d99b7f22427 --- /dev/null +++ b/reactos/drivers/usb/cromwell/linux/boot.h @@ -0,0 +1,337 @@ +#ifndef _Boot_H_ +#define _Boot_H_ + +#include "config.h" + +/*************************************************************************** + Includes used by XBox boot code + ***************************************************************************/ +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +///////////////////////////////// +// configuration + +#include "consts.h" +#include "stdint.h" +#include "cromwell_types.h" + + +unsigned int cromwell_config; +unsigned int cromwell_retryload; +unsigned int cromwell_loadbank; +unsigned int cromwell_Biostype; + +unsigned int xbox_ram; + +#define XROMWELL 0 +#define CROMWELL 1 + +#define ICON_WIDTH 64 +#define ICON_HEIGHT 64 +/* +static double min (double a, double b) +{ + if (a < b) return a; else return b; +} + +static inline double max (double a, double b) +{ + if (a > b) return a; else return b; +} +*/ +//#include "iso_fs.h" +//#include "BootVideo.h" + +//#define ASSERT(exp) { if(!(exp)) { bprintf("Assert failed file " __FILE__ " line %d\n", __LINE__); } } + +#if 0 +extern volatile CURRENT_VIDEO_MODE_DETAILS vmode; +unsigned int video_encoder; + +volatile u32 VIDEO_CURSOR_POSX; +volatile u32 VIDEO_CURSOR_POSY; +volatile u32 VIDEO_ATTR; +volatile u32 VIDEO_LUMASCALING; +volatile u32 VIDEO_RSCALING; +volatile u32 VIDEO_BSCALING; +volatile u32 BIOS_TICK_COUNT; +volatile u32 VIDEO_VSYNC_POSITION; +volatile u32 VIDEO_VSYNC_DIR; +volatile u32 DVD_TRAY_STATE; + +u8 VIDEO_AV_MODE ; + +#define DVD_CLOSED 0 +#define DVD_CLOSING 1 +#define DVD_OPEN 2 +#define DVD_OPENING 3 + +///////////////////////////////// +// Superfunky i386 internal structures + +typedef struct gdt_t { + unsigned short m_wSize __attribute__ ((packed)); + unsigned long m_dwBase32 __attribute__ ((packed)); + unsigned short m_wDummy __attribute__ ((packed)); +} ts_descriptor_pointer; + +typedef struct { // inside an 8-byte protected mode interrupt vector + u16 m_wHandlerHighAddressLow16; + u16 m_wSelector; + u16 m_wType; + u16 m_wHandlerLinearAddressHigh16; +} ts_pm_interrupt; + +typedef enum { + EDT_UNKNOWN= 0, + EDT_XBOXFS +} enumDriveType; + +typedef struct tsHarddiskInfo { // this is the retained knowledge about an IDE device after init + unsigned short m_fwPortBase; + unsigned short m_wCountHeads; + unsigned short m_wCountCylinders; + unsigned short m_wCountSectorsPerTrack; + unsigned long m_dwCountSectorsTotal; /* total */ + unsigned char m_bLbaMode; /* am i lba (0x40) or chs (0x00) */ + unsigned char m_szIdentityModelNumber[40]; + unsigned char term_space_1[2]; + unsigned char m_szSerial[20]; + unsigned char term_space_2[2]; + char m_szFirmware[8]; + unsigned char term_space_3[2]; + unsigned char m_fDriveExists; + unsigned char m_fAtapi; // true if a CDROM, etc + enumDriveType m_enumDriveType; + unsigned char m_bCableConductors; // valid for device 0 if present + unsigned short m_wAtaRevisionSupported; + unsigned char s_length; + unsigned char m_length; + unsigned char m_fHasMbr; + unsigned short m_securitySettings; //This contains the contents of the ATA security regs +} tsHarddiskInfo; + +///////////////////////////////// +// LED-flashing codes +// or these together as argument to I2cSetFrontpanelLed + +enum { + I2C_LED_RED0 = 0x80, + I2C_LED_RED1 = 0x40, + I2C_LED_RED2 = 0x20, + I2C_LED_RED3 = 0x10, + I2C_LED_GREEN0 = 0x08, + I2C_LED_GREEN1 = 0x04, + I2C_LED_GREEN2 = 0x02, + I2C_LED_GREEN3 = 0x01 +}; + +/////////////////////////////// +/* BIOS-wide error codes all have b31 set */ + +enum { + ERR_SUCCESS = 0, // completed without error + + ERR_I2C_ERROR_TIMEOUT = 0x80000001, // I2C action failed because it did not complete in a reasonable time + ERR_I2C_ERROR_BUS = 0x80000002, // I2C action failed due to non retryable bus error + + ERR_BOOT_PIC_ALG_BROKEN = 0x80000101 // PIC algorithm did not pass its self-test +}; + +///////////////////////////////// +// some Boot API prototypes + +//////// BootPerformPicChallengeResponseAction.c + +/* ---------------------------- IO primitives ----------------------------------------------------------- +*/ + +static __inline void IoOutputByte(u16 wAds, u8 bValue) { +// __asm__ (" out %%al,%%dx" : : "edx" (dwAds), "al" (bValue) ); + __asm__ __volatile__ ("outb %b0,%w1": :"a" (bValue), "Nd" (wAds)); +} + +static __inline void IoOutputWord(u16 wAds, u16 wValue) { +// __asm__ (" out %%ax,%%dx " : : "edx" (dwAds), "ax" (wValue) ); + __asm__ __volatile__ ("outw %0,%w1": :"a" (wValue), "Nd" (wAds)); + } + +static __inline void IoOutputDword(u16 wAds, u32 dwValue) { +// __asm__ (" out %%eax,%%dx " : : "edx" (dwAds), "ax" (wValue) ); + __asm__ __volatile__ ("outl %0,%w1": :"a" (dwValue), "Nd" (wAds)); +} + + +static __inline u8 IoInputByte(u16 wAds) { + unsigned char _v; + + __asm__ __volatile__ ("inb %w1,%0":"=a" (_v):"Nd" (wAds)); + return _v; +} + +static __inline u16 IoInputWord(u16 wAds) { + u16 _v; + + __asm__ __volatile__ ("inw %w1,%0":"=a" (_v):"Nd" (wAds)); + return _v; +} + +static __inline u32 IoInputDword(u16 wAds) { + u32 _v; + + __asm__ __volatile__ ("inl %w1,%0":"=a" (_v):"Nd" (wAds)); + return _v; +} + +#define rdmsr(msr,val1,val2) \ + __asm__ __volatile__("rdmsr" \ + : "=a" (val1), "=d" (val2) \ + : "c" (msr)) + +#define wrmsr(msr,val1,val2) \ + __asm__ __volatile__("wrmsr" \ + : /* no outputs */ \ + : "c" (msr), "a" (val1), "d" (val2)) + + +void BootPciInterruptEnable(void); + + // boot process +int BootPerformPicChallengeResponseAction(void); + // LED control (see associated enum above) +int I2cSetFrontpanelLed(u8 b); + +#define bprintf(...) + +#if PRINT_TRACE +#define TRACE bprintf(__FILE__ " :%d\n\r",__LINE__); +#else +#define TRACE +#endif + +typedef struct _LIST_ENTRY { + struct _LIST_ENTRY *m_plistentryNext; + struct _LIST_ENTRY *m_plistentryPrevious; +} LIST_ENTRY; + +void ListEntryInsertAfterCurrent(LIST_ENTRY *plistentryCurrent, LIST_ENTRY *plistentryNew); +void ListEntryRemove(LIST_ENTRY *plistentryCurrent); + +////////// BootPerformXCodeActions.c + +int BootPerformXCodeActions(void); + +#include "BootEEPROM.h" +#include "BootParser.h" + +////////// BootStartBios.c + +void StartBios(CONFIGENTRY *config,int nActivePartition, int nFATXPresent,int bootfrom); +int BootMenu(CONFIGENTRY *config,int nDrive,int nActivePartition, int nFATXPresent); + +////////// BootResetActions.c +void ClearIDT (void); +void BootResetAction(void); +void BootCpuCache(bool fEnable) ; +int printk(const char *szFormat, ...); +void BiosCmosWrite(u8 bAds, u8 bData); +u8 BiosCmosRead(u8 bAds); + + +///////// BootPciPeripheralInitialization.c +void BootPciPeripheralInitialization(void); +void BootAGPBUSInitialization(void); +void BootDetectMemorySize(void); +extern void ReadPCIByte(unsigned int bus, unsigned int dev, unsigned intfunc, unsigned int reg_off, unsigned char *pbyteval); +extern void WritePCIByte(unsigned int bus, unsigned int dev, unsigned int func, unsigned int reg_off, unsigned char byteval); +extern void ReadPCIDword(unsigned int bus, unsigned int dev, unsigned int func, unsigned int reg_off, unsigned int *pdwordval); +extern void WritePCIDword(unsigned int bus, unsigned int dev, unsigned int func, unsigned int reg_off, unsigned int dwordval); +extern void ReadPCIBlock(unsigned int bus, unsigned int dev, unsigned int func, unsigned int reg_off, unsigned char *buf, unsigned int nbytes); +extern void WritePCIBlock(unsigned int bus, unsigned int dev, unsigned int func, unsigned int reg_off, unsigned char *buf, unsigned int nbytes); + +void PciWriteByte (unsigned int bus, unsigned int dev, unsigned int func, + unsigned int reg_off, unsigned char byteval); +u8 PciReadByte(unsigned int bus, unsigned int dev, unsigned int func, unsigned int reg_off); +u32 PciWriteDword(unsigned int bus, unsigned int dev, unsigned int func, unsigned int reg_off, u32 dw); +u32 PciReadDword(unsigned int bus, unsigned int dev, unsigned int func, unsigned int reg_off); + +///////// BootPerformPicChallengeResponseAction.c + +int I2CTransmitWord(u8 bPicAddressI2cFormat, u16 wDataToWrite); +int I2CTransmitByteGetReturn(u8 bPicAddressI2cFormat, u8 bDataToWrite); +bool I2CGetTemperature(int *, int *); +void I2CModifyBits(u8 bAds, u8 bReg, u8 bData, u8 bMask); + +///////// BootIde.c + +extern tsHarddiskInfo tsaHarddiskInfo[]; // static struct stores data about attached drives +int BootIdeInit(void); +int BootIdeReadSector(int nDriveIndex, void * pbBuffer, unsigned int block, int byte_offset, int n_bytes); +int BootIdeBootSectorHddOrElTorito(int nDriveIndex, u8 * pbaResult); +int BootIdeAtapiAdditionalSenseCode(int nDrive, u8 * pba, int nLengthMaxReturn); +int BootIdeSetTransferMode(int nIndexDrive, int nMode); +int BootIdeWaitNotBusy(unsigned uIoBase); +bool BootIdeAtapiReportFriendlyError(int nDriveIndex, char * szErrorReturn, int nMaxLengthError); +void BootIdeAtapiPrintkFriendlyError(int nDriveIndex); + +///////// BootUSB.c + +void BootStopUSB(void); +void BootStartUSB(void); +void USBGetEvents(void); + +#include "xpad.h" + +extern struct xpad_data XPAD_current[4]; +extern struct xpad_data XPAD_last[4]; + +extern void wait_ms(u32 ticks); +extern void wait_us(u32 ticks); +extern void wait_smalldelay(void); + + +void * memcpy(void *dest, const void *src, size_t size); +void * memset(void *dest, int data, size_t size); +int memcmp(const void *buffer1, const void *buffer2, size_t num); +int _strncmp(const char *sz1, const char *sz2, int nMax); +char * strcpy(char *sz, const char *szc); +char * _strncpy (char * dest, const char * src, size_t n); +void chrreplace(char *string, char search, char ch); + +#define printf printk +#define sleep wait_ms +int tolower(int ch); +int isspace (int c); + +void MemoryManagementInitialization(void * pvStartAddress, u32 dwTotalMemoryAllocLength); +void * malloc(size_t size); +void free(void *); + +extern volatile int nCountI2cinterrupts, nCountUnusedInterrupts, nCountUnusedInterruptsPic2, nCountInterruptsSmc, nCountInterruptsIde; +extern volatile bool fSeenPowerdown; +typedef enum { + ETS_OPEN_OR_OPENING=0, + ETS_CLOSING, + ETS_CLOSED +} TRAY_STATE; +extern volatile TRAY_STATE traystate; + + +extern void BootInterruptsWriteIdt(void); +#endif +int copy_swap_trim(unsigned char *dst, unsigned char *src, int len); +void HMAC_SHA1( unsigned char *result, + unsigned char *key, int key_length, + unsigned char *text1, int text1_length, + unsigned char *text2, int text2_length ); + +char *strrchr0(char *string, char ch); + +#endif // _Boot_H_ diff --git a/reactos/drivers/usb/cromwell/linux/consts.h b/reactos/drivers/usb/cromwell/linux/consts.h new file mode 100644 index 00000000000..755bf6a5128 --- /dev/null +++ b/reactos/drivers/usb/cromwell/linux/consts.h @@ -0,0 +1,70 @@ +#ifndef _Consts_H_ +#define _Consts_H_ + +/* + * + * includes for startup code in a form usable by the .S files + * + */ + + /*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#define PCI_CFG_ADDR 0x0CF8 +#define PCI_CFG_DATA 0x0CFC + + +#define I2C_IO_BASE 0xc000 + +#define BUS_0 0 +#define BUS_1 1 + +#define DEV_0 0 +#define DEV_1 1 +#define DEV_2 2 +#define DEV_3 3 +#define DEV_4 4 +#define DEV_5 5 +#define DEV_6 6 +#define DEV_7 7 +#define DEV_8 8 +#define DEV_9 9 +#define DEV_a 0xa +#define DEV_b 0xb +#define DEV_c 0xc +#define DEV_d 0xd +#define DEV_e 0xe +#define DEV_f 0xf +#define DEV_10 0x10 +#define DEV_11 0x11 +#define DEV_12 0x12 +#define DEV_13 0x13 +#define DEV_14 0x14 +#define DEV_15 0x15 +#define DEV_16 0x16 +#define DEV_17 0x17 +#define DEV_18 0x18 +#define DEV_19 0x19 +#define DEV_1a 0x1a +#define DEV_1b 0x1b +#define DEV_1c 0x1c +#define DEV_1d 0x1d +#define DEV_1e 0x1e +#define DEV_1f 0x1f + +#define FUNC_0 0 +/* +#define boot_post_macro(value) \ + movb $(value), %al ;\ + outb %al, $0x80 +*/ + +#endif // _Consts_H_ + + diff --git a/reactos/drivers/usb/cromwell/linux/cromwell_types.h b/reactos/drivers/usb/cromwell/linux/cromwell_types.h new file mode 100644 index 00000000000..d03e9158393 --- /dev/null +++ b/reactos/drivers/usb/cromwell/linux/cromwell_types.h @@ -0,0 +1,27 @@ +#ifndef cromwell_types_h +#define cromwell_types_h + +///////////////////////////////// +// some typedefs to make for easy sizing + +//typedef unsigned long ULONG; +typedef unsigned int u32; +typedef unsigned short u16; +typedef unsigned char u8; +#ifndef bool_already_defined_ + typedef int bool; +#endif +typedef unsigned long RGBA; // LSB=R -> MSB = A +//typedef long long __int64; + +#define guint int +#define guint8 unsigned char + +#define true 1 +#define false 0 + +#ifndef NULL +#define NULL ((void *)0) +#endif + +#endif /* #ifndef cromwell_types_h */ diff --git a/reactos/drivers/usb/cromwell/linux/errno.h b/reactos/drivers/usb/cromwell/linux/errno.h new file mode 100644 index 00000000000..dcd2ede98d7 --- /dev/null +++ b/reactos/drivers/usb/cromwell/linux/errno.h @@ -0,0 +1,132 @@ +#ifndef _I386_ERRNO_H +#define _I386_ERRNO_H + +#define EPERM 1 /* Operation not permitted */ +#define ENOENT 2 /* No such file or directory */ +#define ESRCH 3 /* No such process */ +#define EINTR 4 /* Interrupted system call */ +#define EIO 5 /* I/O error */ +#define ENXIO 6 /* No such device or address */ +#define E2BIG 7 /* Argument list too long */ +#define ENOEXEC 8 /* Exec format error */ +#define EBADF 9 /* Bad file number */ +#define ECHILD 10 /* No child processes */ +#define EAGAIN 11 /* Try again */ +#define ENOMEM 12 /* Out of memory */ +#define EACCES 13 /* Permission denied */ +#define EFAULT 14 /* Bad address */ +#define ENOTBLK 15 /* Block device required */ +#define EBUSY 16 /* Device or resource busy */ +#define EEXIST 17 /* File exists */ +#define EXDEV 18 /* Cross-device link */ +#define ENODEV 19 /* No such device */ +#define ENOTDIR 20 /* Not a directory */ +#define EISDIR 21 /* Is a directory */ +#define EINVAL 22 /* Invalid argument */ +#define ENFILE 23 /* File table overflow */ +#define EMFILE 24 /* Too many open files */ +#define ENOTTY 25 /* Not a typewriter */ +#define ETXTBSY 26 /* Text file busy */ +#define EFBIG 27 /* File too large */ +#define ENOSPC 28 /* No space left on device */ +#define ESPIPE 29 /* Illegal seek */ +#define EROFS 30 /* Read-only file system */ +#define EMLINK 31 /* Too many links */ +#define EPIPE 32 /* Broken pipe */ +#define EDOM 33 /* Math argument out of domain of func */ +#define ERANGE 34 /* Math result not representable */ +#define EDEADLK 35 /* Resource deadlock would occur */ +#define ENAMETOOLONG 36 /* File name too long */ +#define ENOLCK 37 /* No record locks available */ +#define ENOSYS 38 /* Function not implemented */ +#define ENOTEMPTY 39 /* Directory not empty */ +#define ELOOP 40 /* Too many symbolic links encountered */ +#define EWOULDBLOCK EAGAIN /* Operation would block */ +#define ENOMSG 42 /* No message of desired type */ +#define EIDRM 43 /* Identifier removed */ +#define ECHRNG 44 /* Channel number out of range */ +#define EL2NSYNC 45 /* Level 2 not synchronized */ +#define EL3HLT 46 /* Level 3 halted */ +#define EL3RST 47 /* Level 3 reset */ +#define ELNRNG 48 /* Link number out of range */ +#define EUNATCH 49 /* Protocol driver not attached */ +#define ENOCSI 50 /* No CSI structure available */ +#define EL2HLT 51 /* Level 2 halted */ +#define EBADE 52 /* Invalid exchange */ +#define EBADR 53 /* Invalid request descriptor */ +#define EXFULL 54 /* Exchange full */ +#define ENOANO 55 /* No anode */ +#define EBADRQC 56 /* Invalid request code */ +#define EBADSLT 57 /* Invalid slot */ + +#define EDEADLOCK EDEADLK + +#define EBFONT 59 /* Bad font file format */ +#define ENOSTR 60 /* Device not a stream */ +#define ENODATA 61 /* No data available */ +#define ETIME 62 /* Timer expired */ +#define ENOSR 63 /* Out of streams resources */ +#define ENONET 64 /* Machine is not on the network */ +#define ENOPKG 65 /* Package not installed */ +#define EREMOTE 66 /* Object is remote */ +#define ENOLINK 67 /* Link has been severed */ +#define EADV 68 /* Advertise error */ +#define ESRMNT 69 /* Srmount error */ +#define ECOMM 70 /* Communication error on send */ +#define EPROTO 71 /* Protocol error */ +#define EMULTIHOP 72 /* Multihop attempted */ +#define EDOTDOT 73 /* RFS specific error */ +#define EBADMSG 74 /* Not a data message */ +#define EOVERFLOW 75 /* Value too large for defined data type */ +#define ENOTUNIQ 76 /* Name not unique on network */ +#define EBADFD 77 /* File descriptor in bad state */ +#define EREMCHG 78 /* Remote address changed */ +#define ELIBACC 79 /* Can not access a needed shared library */ +#define ELIBBAD 80 /* Accessing a corrupted shared library */ +#define ELIBSCN 81 /* .lib section in a.out corrupted */ +#define ELIBMAX 82 /* Attempting to link in too many shared libraries */ +#define ELIBEXEC 83 /* Cannot exec a shared library directly */ +#define EILSEQ 84 /* Illegal byte sequence */ +#define ERESTART 85 /* Interrupted system call should be restarted */ +#define ESTRPIPE 86 /* Streams pipe error */ +#define EUSERS 87 /* Too many users */ +#define ENOTSOCK 88 /* Socket operation on non-socket */ +#define EDESTADDRREQ 89 /* Destination address required */ +#define EMSGSIZE 90 /* Message too long */ +#define EPROTOTYPE 91 /* Protocol wrong type for socket */ +#define ENOPROTOOPT 92 /* Protocol not available */ +#define EPROTONOSUPPORT 93 /* Protocol not supported */ +#define ESOCKTNOSUPPORT 94 /* Socket type not supported */ +#define EOPNOTSUPP 95 /* Operation not supported on transport endpoint */ +#define EPFNOSUPPORT 96 /* Protocol family not supported */ +#define EAFNOSUPPORT 97 /* Address family not supported by protocol */ +#define EADDRINUSE 98 /* Address already in use */ +#define EADDRNOTAVAIL 99 /* Cannot assign requested address */ +#define ENETDOWN 100 /* Network is down */ +#define ENETUNREACH 101 /* Network is unreachable */ +#define ENETRESET 102 /* Network dropped connection because of reset */ +#define ECONNABORTED 103 /* Software caused connection abort */ +#define ECONNRESET 104 /* Connection reset by peer */ +#define ENOBUFS 105 /* No buffer space available */ +#define EISCONN 106 /* Transport endpoint is already connected */ +#define ENOTCONN 107 /* Transport endpoint is not connected */ +#define ESHUTDOWN 108 /* Cannot send after transport endpoint shutdown */ +#define ETOOMANYREFS 109 /* Too many references: cannot splice */ +#define ETIMEDOUT 110 /* Connection timed out */ +#define ECONNREFUSED 111 /* Connection refused */ +#define EHOSTDOWN 112 /* Host is down */ +#define EHOSTUNREACH 113 /* No route to host */ +#define EALREADY 114 /* Operation already in progress */ +#define EINPROGRESS 115 /* Operation now in progress */ +#define ESTALE 116 /* Stale NFS file handle */ +#define EUCLEAN 117 /* Structure needs cleaning */ +#define ENOTNAM 118 /* Not a XENIX named type file */ +#define ENAVAIL 119 /* No XENIX semaphores available */ +#define EISNAM 120 /* Is a named type file */ +#define EREMOTEIO 121 /* Remote I/O error */ +#define EDQUOT 122 /* Quota exceeded */ + +#define ENOMEDIUM 123 /* No medium found */ +#define EMEDIUMTYPE 124 /* Wrong medium type */ + +#endif diff --git a/reactos/drivers/usb/cromwell/linux/linux_wrapper.h b/reactos/drivers/usb/cromwell/linux/linux_wrapper.h new file mode 100644 index 00000000000..4518f9dcada --- /dev/null +++ b/reactos/drivers/usb/cromwell/linux/linux_wrapper.h @@ -0,0 +1,762 @@ +/* + * linux-wrapper.h + * + * Hard coded Linux kernel replacements for x86 + * + * (c) 2003 Georg Acher (georg@acher.org) + * + * Emulation of: + * typedefs + * structs + * macros + * + * All structs and prototypes are based on kernel source 2.5.72 + * + * #include + */ + +/*------------------------------------------------------------------------*/ +/* Typedefs */ +/*------------------------------------------------------------------------*/ +#include "cromwell_types.h" + +typedef unsigned int __u32; +//typedef __u32 u32; +typedef unsigned short __u16; +//typedef __u16 u16; +typedef unsigned char __u8; +//typedef __u8 u8; + +typedef short s16; + +typedef u32 dma_addr_t; + +typedef int spinlock_t; +typedef int atomic_t; +#ifndef STANDALONE +typedef int mode_t; +typedef int pid_t; +typedef int ssize_t; + +#endif +typedef int irqreturn_t; +typedef unsigned long kernel_ulong_t; + +typedef int wait_queue_head_t; +/*------------------------------------------------------------------------*/ +/* Stuff from xbox/linux environment */ +/*------------------------------------------------------------------------*/ + +#include "list.h" + +#ifndef STANDALONE +#ifdef MODULE +typedef int size_t; +#define NULL ((void*)0) +extern void * memset(void *,int,unsigned int); +extern void * memcpy(void *,const void *,unsigned int); +#if 0 +extern char * strcpy(char *,const char *); +#else +static inline char * strcpy(char * dest,const char *src) +{ +int d0, d1, d2; +__asm__ __volatile__( + "1:\tlodsb\n\t" + "stosb\n\t" + "testb %%al,%%al\n\t" + "jne 1b" + : "=&S" (d0), "=&D" (d1), "=&a" (d2) + :"0" (src),"1" (dest) : "memory"); +return dest; +} +#endif +extern size_t strlen(const char *); + +extern int memcmp(const void *,const void *,unsigned int); + +#else +#include "boot.h" +#include "config.h" +#endif +#else +#include +#include +#include +#include "consts.h" +#include +#endif + +/*------------------------------------------------------------------------*/ +/* General structs */ +/*------------------------------------------------------------------------*/ + +struct timer_list { + void (*function)(unsigned long); + unsigned long data; + int expires; + struct list_head timer_list; +}; + +struct work_struct { + void (*func)(void *); +}; +struct device { + char name[128]; + struct bus_type *bus; + int dma_mask; + char bus_id[16]; + struct device_driver* driver; + void *driver_data; + struct device *parent; + struct list_head driver_list; + void (*release)(struct device * dev); +}; +struct class_device{int a;}; +struct semaphore{int a;}; + +struct device_driver{ + char *name; + struct bus_type *bus; + int (*probe) (struct device * dev); + int (*remove) (struct device * dev); + struct list_head devices; +}; + +struct bus_type { + char * name; + int (*match)(struct device * dev, struct device_driver * drv); + struct device * (*add) (struct device * parent, char * bus_id); + int (*hotplug) (struct device *dev, char **envp, + int num_envp, char *buffer, int buffer_size); +}; + +struct dummy_process +{ + int flags; +}; + +struct pt_regs +{ + int a; +}; +struct completion { + unsigned int done; + wait_queue_head_t wait; +}; + +/* from mod_devicetable.h */ + +struct usb_device_id { + /* which fields to match against? */ + __u16 match_flags; + + /* Used for product specific matches; range is inclusive */ + __u16 idVendor; + __u16 idProduct; + __u16 bcdDevice_lo; + __u16 bcdDevice_hi; + + /* Used for device class matches */ + __u8 bDeviceClass; + __u8 bDeviceSubClass; + __u8 bDeviceProtocol; + + /* Used for interface class matches */ + __u8 bInterfaceClass; + __u8 bInterfaceSubClass; + __u8 bInterfaceProtocol; + + /* not matched against */ + kernel_ulong_t driver_info; +}; + +/* Some useful macros to use to create struct usb_device_id */ +#define USB_DEVICE_ID_MATCH_VENDOR 0x0001 +#define USB_DEVICE_ID_MATCH_PRODUCT 0x0002 +#define USB_DEVICE_ID_MATCH_DEV_LO 0x0004 +#define USB_DEVICE_ID_MATCH_DEV_HI 0x0008 +#define USB_DEVICE_ID_MATCH_DEV_CLASS 0x0010 +#define USB_DEVICE_ID_MATCH_DEV_SUBCLASS 0x0020 +#define USB_DEVICE_ID_MATCH_DEV_PROTOCOL 0x0040 +#define USB_DEVICE_ID_MATCH_INT_CLASS 0x0080 +#define USB_DEVICE_ID_MATCH_INT_SUBCLASS 0x0100 +#define USB_DEVICE_ID_MATCH_INT_PROTOCOL 0x0200 + +/*------------------------------------------------------------------------*/ +/* imported functions from top-level */ +/*------------------------------------------------------------------------*/ + +//void zxprintf(char* fmt, ...); +//void zxsprintf(char *buffer, char* fmt, ...); +//int zxsnprintf(char *buffer, size_t s, char* fmt, ...); + +/*------------------------------------------------------------------------*/ +/* PCI structs (taken from linux/pci.h et al., but slightly modified) */ +/*------------------------------------------------------------------------*/ + +struct pci_dev { + int vendor; + int device; + struct pci_bus *bus; + int irq; + char *slot_name; + struct device dev; + int base[4]; + int flags[4]; + void * data; +}; + +struct pci_bus { + unsigned char number; +}; + +struct pci_device_id { + __u32 vendor, device; /* Vendor and device ID or PCI_ANY_ID*/ + __u32 subvendor, subdevice; /* Subsystem ID's or PCI_ANY_ID */ + __u32 class, class_mask; /* (class,subclass,prog-if) triplet */ + kernel_ulong_t driver_data; /* Data private to the driver */ +}; + +struct pci_driver { + struct list_head node; + char *name; + const struct pci_device_id *id_table; /* must be non-NULL for probe to be called */ + int (*probe) (struct pci_dev *dev, const struct pci_device_id *id); /* New device inserted */ + void (*remove) (struct pci_dev *dev); /* Device removed (NULL if not a hot-plug capable driver) */ + int (*save_state) (struct pci_dev *dev, u32 state); /* Save Device Context */ + int (*suspend) (struct pci_dev *dev, u32 state); /* Device suspended */ + int (*resume) (struct pci_dev *dev); /* Device woken up */ + int (*enable_wake) (struct pci_dev *dev, u32 state, int enable); /* Enable wake event */ +}; + +struct scatterlist +{ + int page; + int offset; + int length; +}; + +struct usbdevfs_hub_portinfo +{ + int nports; + int port[8]; +}; + +/*------------------------------------------------------------------------*/ +/* constant defines */ +/*------------------------------------------------------------------------*/ + +#define TASK_UNINTERRUPTIBLE 0 +#define HZ 100 /* Don't rely on that... */ +#define KERN_DEBUG "DBG: " +#define KERN_ERR "ERR: " +#define KERN_WARNING "WRN: " +#define KERN_INFO "INF: " +#define GFP_KERNEL 0 +#define GFP_ATOMIC 0 +#define GFP_NOIO 0 +#define SLAB_ATOMIC 0 +#define PCI_ANY_ID (~0) +#define SIGKILL 9 +#define THIS_MODULE 0 +//#define PAGE_SIZE 4096 + + +#define CLONE_FS 0 +#define CLONE_FILES 0 +#define CLONE_SIGHAND 0 +#define PF_FREEZE 0 +#define PF_IOTHREAD 0 + + +#define USBDEVFS_HUB_PORTINFO 1234 +#define SA_SHIRQ 0 + +#undef PCI_COMMAND +#define PCI_COMMAND 0 +#undef PCI_COMMAND_MASTER +#define PCI_COMMAND_MASTER 0 +/*------------------------------------------------------------------------*/ +/* Module/export macros */ +/*------------------------------------------------------------------------*/ + +#define MODULE_AUTHOR(a) +#define MODULE_DESCRIPTION(a) +#define MODULE_LICENSE(a) +#define MODULE_DEVICE_TABLE(type,name) void* module_table_##name=&name + +#define __devinit +#define __exit +#define __init +#define __devinitdata +#define module_init(x) static void module_init_##x(void){ x();} +#define module_exit(x) void module_exit_##x(void){ x();} +#define EXPORT_SYMBOL_GPL(x) +#define EXPORT_SYMBOL(x) + +#define __setup(x,y) int setup_##y=(int)y +#define subsys_initcall(x) void subsys_##x(void){x();} + +/*------------------------------------------------------------------------*/ +/* Access macros */ +/*------------------------------------------------------------------------*/ + +#define dev_get_drvdata(a) (a)->driver_data +#define dev_set_drvdata(a,b) (a)->driver_data=(b) + +#define __io_virt(x) ((void *)(x)) +#define readl(addr) (*(volatile unsigned int *) __io_virt(addr)) +#define writel(b,addr) (*(volatile unsigned int *) __io_virt(addr) = (b)) +#define likely(x) (x) +#define unlikely(x) (x) +#define prefetch(x) 1 + +/* The kernel macro for list_for_each_entry makes nonsense (have no clue + * why, this is just the same definition...) */ + +#undef list_for_each_entry +#define list_for_each_entry(pos, head, member) \ + for (pos = list_entry((head)->next, typeof(*pos), member), \ + prefetch(pos->member.next); \ + &pos->member != (head); \ + pos = list_entry(pos->member.next, typeof(*pos), member), \ + prefetch(pos->member.next)) + +/*------------------------------------------------------------------------*/ +/* function wrapper macros */ +/*------------------------------------------------------------------------*/ +#define kmalloc(x,y) ExAllocatePool(PagedPool,x) +#define kfree(x) ExFreePool(x) + +//#define sprintf(a,b,format, arg...) zxsprintf((a),(b),format, ## arg) +//#define snprintf(a,b,format, arg...) zxsnprintf((a),(b),format, ##arg) +//#define printk(format, arg...) zxprintf(format, ## arg) +#define snprintf(a,b,format, arg...) _snprintf((a),(b),format, ##arg) +#define printk(format, arg...) DPRINT1(format, ## arg) +#define BUG(...) do {} while(0) + +/* Locks & friends */ + +#define DECLARE_MUTEX(x) struct semaphore x +#define init_MUTEX(x) + +#define SPIN_LOCK_UNLOCKED 0 +#define spin_lock_init(a) do {} while(0) +#define spin_lock(a) *(int*)a=1 +#define spin_unlock(a) do {} while(0) + +#define spin_lock_irqsave(a,b) b=0 +#define spin_unlock_irqrestore(a,b) + +#if 0 +#define local_irq_save(x) __asm__ __volatile__("pushfl ; popl %0 ; cli":"=g" (x): /* no input */ :"memory") +#define local_irq_restore(x) __asm__ __volatile__("pushl %0 ; popfl": /* no output */ :"g" (x):"memory", "cc") +#else +#define local_irq_save(x) do {} while(0) +#define local_irq_restore(x) do {} while(0) +#endif + +#define atomic_inc(x) *(x)+=1 +#define atomic_dec(x) *(x)-=1 +#define atomic_dec_and_test(x) (*(x)-=1,(*(x))==0) +#define atomic_set(x,a) *(x)=a +#define atomic_read(x) *(x) +#define ATOMIC_INIT(x) (x) + +#define down(x) do {} while(0) +#define up(x) do {} while(0) +#define down_trylock(a) 0 + +#define down_read(a) do {} while(0) +#define up_read(a) do {} while(0) + +#define DECLARE_WAIT_QUEUE_HEAD(x) int x + +#define DECLARE_COMPLETION(x) struct completion x + +/* driver */ + +#define driver_unregister(a) do {} while(0) +#define put_device(a) do {} while(0) + + +/* PCI */ +#define pci_pool_create(a,b,c,d,e) (void*)1 + +#define pci_pool_alloc(a,b,c) my_pci_pool_alloc(a,b,c) + +static void __inline__ *my_pci_pool_alloc(void* pool, size_t size, + dma_addr_t *dma_handle) +{ + void* a; + a=kmalloc(size,0); //FIXME +#ifdef MODULE + *dma_handle=((u32)a)&0xfffffff; +#else + *dma_handle=(u32)a; +#endif + return a; +} + + +#define pci_pool_free(a,b,c) kfree(b) +#define pci_alloc_consistent(a,b,c) my_pci_alloc_consistent(a,b,c) + +static void __inline__ *my_pci_alloc_consistent(struct pci_dev *hwdev, size_t size, + dma_addr_t *dma_handle) +{ + void* a; + + a=kmalloc(size+256,0); //FIXME + a=(void*)(((int)a+255)&~255); // 256 alignment + *dma_handle=((u32)a)&0xfffffff; + + return a; +} + +#define pci_free_consistent(a,b,c,d) kfree(c) +#define pci_pool_destroy(a) do {} while(0) + +#define pci_module_init(x) my_pci_module_init(x) +int my_pci_module_init(struct pci_driver *x); + +#define pci_unregister_driver(a) do {} while(0) + +#define bus_register(a) do {} while(0) +#define bus_unregister(a) do {} while(0) + +#define dma_map_single(a,b,c,d) ((u32)(b)&0xfffffff) +#define dma_unmap_single(a,b,c,d) do {} while(0) +#define pci_unmap_single(a,b,c,d) do {} while(0) +#define dma_sync_single(a,b,c,d) do {} while(0) +#define dma_sync_sg(a,b,c,d) do {} while(0) +#define dma_map_sg(a,b,c,d) 0 +#define dma_unmap_sg(a,b,c,d) do {} while(0) + +#define usb_create_driverfs_dev_files(a) do {} while(0) +#define usb_create_driverfs_intf_files(a) do {} while(0) +#define sg_dma_address(x) ((u32)((x)->page*4096 + (x)->offset)) +#define sg_dma_len(x) ((x)->length) + +#define page_address(x) ((void*)(x/4096)) + +#define DMA_TO_DEVICE 0 +#define DMA_FROM_DEVICE 0 +#define PCI_DMA_TODEVICE +#define PCI_DMA_FROMDEVICE +#define PCI_DMA_TODEVICE + +#define PCI_ROM_RESOURCE 0 +#define IORESOURCE_IO 1 + +#define DECLARE_WAITQUEUE(a,b) wait_queue_head_t a=0 +#define init_waitqueue_head(a) do {} while(0) +#define add_wait_queue(a,b) do {} while(0) +#define remove_wait_queue(a,b) do {} while(0) + +#define wmb() __asm__ __volatile__ ("": : :"memory") +#define rmb() __asm__ __volatile__ ("lock; addl $0,0(%%esp)": : :"memory") + +#define in_interrupt() 0 + +#define init_completion(x) (x)->done=0 +#define wait_for_completion(x) my_wait_for_completion(x) +void my_wait_for_completion(struct completion*); + +#define IRQ_NONE 0 +#define IRQ_HANDLED 1 + +#define INIT_WORK(a,b,c) (a)->func=b + +#define set_current_state(a) do {} while(0) + +#define might_sleep() do {} while(0) +#define daemonize(a) do {} while(0) +#define allow_signal(a) do {} while(0) +#define wait_event_interruptible(x,y) do {} while(0) +#define flush_scheduled_work() do {} while(0) +#define refrigerator(x) do {} while(0) +#define signal_pending(x) 1 // fall through threads +#define complete_and_exit(a,b) return 0 + +#define kill_proc(a,b,c) 0 +#define yield() do {} while(0) +#define cpu_relax() do {} while(0) + +/*------------------------------------------------------------------------*/ +/* Kernel macros */ +/*------------------------------------------------------------------------*/ + +#define LINUX_VERSION_CODE 0x020572 +#define UTS_SYSNAME "XBOX" +#define UTS_RELEASE "----" + +/* from linux/kernel.h */ +#define max_t(type,x,y) \ + ({ type __x = (x); type __y = (y); __x > __y ? __x: __y; }) + +#define min_t(type,x,y) \ + ({ type __x = (x); type __y = (y); __x < __y ? __x: __y; }) + +#define container_of(ptr, type, member) ({ \ + const typeof( ((type *)0)->member ) *__mptr = (ptr); \ + (type *)( (char *)__mptr - offsetof(type,member) );}) + +/* from linux/stddef.h */ + +#undef offsetof +#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) + +/*------------------------------------------------------------------------*/ +/* Conversion macros */ +/*------------------------------------------------------------------------*/ + +#define __constant_cpu_to_le32(x) (x) +#define cpu_to_le16(x) (x) +#define le16_to_cpu(x) (x) +#define cpu_to_le32(x) (x) +#define cpu_to_le32p(x) (*(__u32*)(x)) +#define le32_to_cpup(x) (*(__u32*)(x)) +#define le32_to_cpu(x) ((u32)x) +#define le16_to_cpus(x) do {} while (0) +#define le16_to_cpup(x) (*(__u16*)(x)) +#define cpu_to_le16p(x) (*(__u16*)(x)) + +/*------------------------------------------------------------------------*/ +/* Debug output */ +/*------------------------------------------------------------------------*/ +#ifdef DEBUG_MODE +#define dev_printk(lvl,x,f,arg...) printk(f, ## arg) +#define dev_dbg(x,f,arg...) do {} while (0) //printk(f, ## arg) +#define dev_info(x,f,arg...) printk(f,## arg) +#define dev_warn(x,f,arg...) printk(f,## arg) +#define dev_err(x,f,arg...) printk(f,## arg) +#define pr_debug(x,f,arg...) printk(f,## arg) +#define usbprintk printk +#endif + +#ifndef DEBUG_MODE +#define dev_printk(lvl,x,f,arg...) do {} while (0) +#define dev_dbg(x,f,arg...) do {} while (0) //printk(f, ## arg) +#define dev_info(x,f,arg...) do {} while (0) +#define dev_warn(x,f,arg...) do {} while (0) +#define dev_err(x,f,arg...) do {} while (0) +#define pr_debug(x,f,arg...) do {} while (0) +#define usbprintk +#endif + + + +#define PCI_DEVFN(a,b) 0 +#define PCI_SLOT(a) 0 + +/*------------------------------------------------------------------------*/ +/* Stuff from kernel */ +/*------------------------------------------------------------------------*/ + +#include "errno.h" +#include "bitops.h" +//#include "linux/pci_ids.h" + +/*------------------------------------------------------------------------*/ +/* global variables */ +/*------------------------------------------------------------------------*/ + +#define jiffies my_jiffies +extern int my_jiffies; +#define current my_current +extern struct dummy_process *my_current; + +extern struct list_head interrupt_list; + +/*------------------------------------------------------------------------*/ +/* Function prototypes */ +/*------------------------------------------------------------------------*/ +void STDCALL usb_hcd_pci_remove (struct pci_dev *dev); + +#define my_wait_ms(x) wait_ms(x) + +#define my_udelay(x) wait_ms(x) +#define udelay(x) my_udelay(x) + +#define my_mdelay(x) wait_ms(1+x/1000); +#define mdelay(x) my_mdelay(x); + +#define pci_find_slot(a,b) my_pci_find_slot(a,b) +struct pci_dev *my_pci_find_slot(int a,int b); + +/*------------------------------------------------------------------------*/ +/* Timer management */ +/*------------------------------------------------------------------------*/ + +#define MAX_TIMERS 20 +extern struct timer_list *main_timer_list[MAX_TIMERS]; + +static void __inline__ init_timer(struct timer_list* t) +{ + INIT_LIST_HEAD(&t->timer_list); + t->function=NULL; + t->expires=0; +} + +static void __inline__ add_timer(struct timer_list* t) +{ + int n; + for(n=0;nexpires=ex; + add_timer(t); +} + +/*------------------------------------------------------------------------*/ +/* Device driver and process related stuff */ +/*------------------------------------------------------------------------*/ + +static int __inline__ usb_major_init(void){return 0;} +static void __inline__ usb_major_cleanup(void){} +static void __inline__ schedule_work(void* p){} + +#define device_initialize(x) my_device_initialize(x) +void my_device_initialize(struct device *dev); + +#define get_device(x) my_get_device(x) +struct device *my_get_device(struct device *dev); + +#define device_add(x) my_device_add(x) +int my_device_add(struct device *dev); + +#define driver_register(x) my_driver_register(x) +int my_driver_register(struct device_driver *driver); + +#define device_unregister(a) my_device_unregister(a) +int my_device_unregister(struct device *dev); + +#define DEVICE_ATTR(a,b,c,d) int xxx_##a +#define device_create_file(a,b) do {} while(0) +#define device_remove_file(a,b) do {} while(0) + +#define schedule_timeout(x) my_schedule_timeout(x) +int my_schedule_timeout(int x); + +#define wake_up(x) my_wake_up(x) +void my_wake_up(void*); + +// cannot be mapped via macro due to collision with urb->complete +static void __inline__ complete(struct completion *p) +{ + /* Wake up x->wait */ + p->done++; + wake_up(&p->wait); +} + +#define kernel_thread(a,b,c) my_kernel_thread(a,b,c) +int my_kernel_thread(int (*handler)(void*), void* parm, int flags); + +/*------------------------------------------------------------------------*/ +/* PCI, simple and inlined... */ +/*------------------------------------------------------------------------*/ +static int __inline__ pci_enable_device(struct pci_dev *dev) {return 0;} + +static unsigned long __inline__ pci_resource_start (struct pci_dev *dev, int x) +{ + return dev->base[x]; +} + +static unsigned long __inline__ pci_resource_len (struct pci_dev *dev, int x){return 0;} + +static int __inline__ request_mem_region(unsigned long addr, unsigned long len, const char * d){return 1;} + +static void __inline__ *ioremap_nocache(unsigned long addr, unsigned long len) +{ + return (void*)addr; +} + +static int __inline__ release_mem_region(unsigned long addr, unsigned long len){return 0;} + +static int __inline__ pci_resource_flags(struct pci_dev *dev, int x) +{ + return dev->flags[x]; +} + +static int __inline__ request_region(unsigned long addr, unsigned long len, const char * d){return 0;} + +static int __inline__ pci_set_master(struct pci_dev *dev){return 0;} + +static int __inline__ iounmap(void* p){return 0;} + +static int __inline__ release_region(unsigned long addr, unsigned long len){return 0;} + +static int __inline__ pci_set_drvdata(struct pci_dev *dev, void* d) +{ + dev->data=(void*)d; + return 0; +} + +static void __inline__ *pci_get_drvdata(struct pci_dev *dev) +{ + return dev->data; +} + +/*------------------------------------------------------------------------*/ +/* IRQ handling */ +/*------------------------------------------------------------------------*/ + +#define request_irq(a,b,c,d,e) my_request_irq(a,b,c,d,e) +int my_request_irq(unsigned int irq, + int (*handler)(int, void *, struct pt_regs *), + unsigned long mode, const char *desc, void *data); + +#define free_irq(a,b) my_free_irq(a,b) +int free_irq(int irq, void* p); + + + +struct my_irqs { + int (*handler)(int, void *, struct pt_regs *); + int irq; + void* data; +}; + +#define MAX_IRQS 8 + +// Exported to top level + +void handle_irqs(int irq); +void inc_jiffies(int); +void init_wrapper(void); +void do_all_timers(void); + +#define __KERNEL_DS 0x18 + + diff --git a/reactos/drivers/usb/cromwell/linux/list.h b/reactos/drivers/usb/cromwell/linux/list.h new file mode 100644 index 00000000000..fbbfabed39a --- /dev/null +++ b/reactos/drivers/usb/cromwell/linux/list.h @@ -0,0 +1,224 @@ +#ifndef _BOOT_LIST_H +#define _BOOT_LIST_H + +/* + * Simple doubly linked list implementation. + * + * Some of the internal functions ("__xxx") are useful when + * manipulating whole lists rather than single entries, as + * sometimes we already know the next/prev entries and we can + * generate better code by using them directly rather than + * using the generic single-entry routines. + */ + +struct list_head { + struct list_head *next, *prev; +}; + +#define LIST_HEAD_INIT(name) { &(name), &(name) } + +#define LIST_HEAD(name) \ + struct list_head name = LIST_HEAD_INIT(name) + +#define INIT_LIST_HEAD(ptr) do { \ + (ptr)->next = (ptr); (ptr)->prev = (ptr); \ +} while (0) + +/* + * Insert a new entry between two known consecutive entries. + * + * This is only for internal list manipulation where we know + * the prev/next entries already! + */ +static inline void __list_add(struct list_head *new, + struct list_head *prev, + struct list_head *next) +{ + next->prev = new; + new->next = next; + new->prev = prev; + prev->next = new; +} + +/** + * list_add - add a new entry + * @new: new entry to be added + * @head: list head to add it after + * + * Insert a new entry after the specified head. + * This is good for implementing stacks. + */ +static inline void list_add(struct list_head *new, struct list_head *head) +{ + __list_add(new, head, head->next); +} + +/** + * list_add_tail - add a new entry + * @new: new entry to be added + * @head: list head to add it before + * + * Insert a new entry before the specified head. + * This is useful for implementing queues. + */ +static inline void list_add_tail(struct list_head *new, struct list_head *head) +{ + __list_add(new, head->prev, head); +} + +/* + * Delete a list entry by making the prev/next entries + * point to each other. + * + * This is only for internal list manipulation where we know + * the prev/next entries already! + */ +static inline void __list_del(struct list_head *prev, struct list_head *next) +{ + next->prev = prev; + prev->next = next; +} + +/** + * list_del - deletes entry from list. + * @entry: the element to delete from the list. + * Note: list_empty on entry does not return true after this, the entry is in an undefined state. + */ +static inline void list_del(struct list_head *entry) +{ + __list_del(entry->prev, entry->next); + entry->next = (void *) 0; + entry->prev = (void *) 0; +} + +/** + * list_del_init - deletes entry from list and reinitialize it. + * @entry: the element to delete from the list. + */ +static inline void list_del_init(struct list_head *entry) +{ + __list_del(entry->prev, entry->next); + INIT_LIST_HEAD(entry); +} + +/** + * list_move - delete from one list and add as another's head + * @list: the entry to move + * @head: the head that will precede our entry + */ +static inline void list_move(struct list_head *list, struct list_head *head) +{ + __list_del(list->prev, list->next); + list_add(list, head); +} + +/** + * list_move_tail - delete from one list and add as another's tail + * @list: the entry to move + * @head: the head that will follow our entry + */ +static inline void list_move_tail(struct list_head *list, + struct list_head *head) +{ + __list_del(list->prev, list->next); + list_add_tail(list, head); +} + +/** + * list_empty - tests whether a list is empty + * @head: the list to test. + */ +static inline int list_empty(struct list_head *head) +{ + return head->next == head; +} + +static inline void __list_splice(struct list_head *list, + struct list_head *head) +{ + struct list_head *first = list->next; + struct list_head *last = list->prev; + struct list_head *at = head->next; + + first->prev = head; + head->next = first; + + last->next = at; + at->prev = last; +} + +/** + * list_splice - join two lists + * @list: the new list to add. + * @head: the place to add it in the first list. + */ +static inline void list_splice(struct list_head *list, struct list_head *head) +{ + if (!list_empty(list)) + __list_splice(list, head); +} + +/** + * list_splice_init - join two lists and reinitialise the emptied list. + * @list: the new list to add. + * @head: the place to add it in the first list. + * + * The list at @list is reinitialised + */ +static inline void list_splice_init(struct list_head *list, + struct list_head *head) +{ + if (!list_empty(list)) { + __list_splice(list, head); + INIT_LIST_HEAD(list); + } +} + +/** + * list_entry - get the struct for this entry + * @ptr: the &struct list_head pointer. + * @type: the type of the struct this is embedded in. + * @member: the name of the list_struct within the struct. + */ +#define list_entry(ptr, type, member) \ + ((type *)((char *)(ptr)-(unsigned long)(&((type *)0)->member))) + +/** + * list_for_each - iterate over a list + * @pos: the &struct list_head to use as a loop counter. + * @head: the head for your list. + */ +#define list_for_each(pos, head) \ + for (pos = (head)->next; pos != (head); \ + pos = pos->next) +/** + * list_for_each_prev - iterate over a list backwards + * @pos: the &struct list_head to use as a loop counter. + * @head: the head for your list. + */ +#define list_for_each_prev(pos, head) \ + for (pos = (head)->prev; pos != (head); \ + pos = pos->prev) + +/** + * list_for_each_safe - iterate over a list safe against removal of list entry + * @pos: the &struct list_head to use as a loop counter. + * @n: another &struct list_head to use as temporary storage + * @head: the head for your list. + */ +#define list_for_each_safe(pos, n, head) \ + for (pos = (head)->next, n = pos->next; pos != (head); \ + pos = n, n = pos->next) + +/** + * list_for_each_entry - iterate over list of given type + * @pos: the type * to use as a loop counter. + * @head: the head for your list. + * @member: the name of the list_struct within the struct. + */ +#define list_for_each_entry(pos, head, member) \ + for (pos = list_entry((head)->next, typeof(*pos), member) \ + &pos->member != (head); \ + pos = list_entry(pos->member.next, typeof(*pos), member)) + +#endif diff --git a/reactos/drivers/usb/cromwell/linux/pci_ids.h b/reactos/drivers/usb/cromwell/linux/pci_ids.h new file mode 100644 index 00000000000..73c93372e04 --- /dev/null +++ b/reactos/drivers/usb/cromwell/linux/pci_ids.h @@ -0,0 +1,11 @@ +#ifndef PCI_IDS__H +#define PCI_IDS__H + +#define PCI_VENDOR_ID_NS 0x100b +#define PCI_DEVICE_ID_NS_87560_LIO 0x000e +#define PCI_VENDOR_ID_AMD 0x1022 +#define PCI_VENDOR_ID_OPTI 0x1045 + +#define PCI_CLASS_SERIAL_USB (PCI_CLASS_SERIAL_BUS_CTLR << 8 + PCI_SUBCLASS_SB_USB) + +#endif \ No newline at end of file diff --git a/reactos/drivers/usb/cromwell/linux/usb.h b/reactos/drivers/usb/cromwell/linux/usb.h new file mode 100644 index 00000000000..530d7ad1f7b --- /dev/null +++ b/reactos/drivers/usb/cromwell/linux/usb.h @@ -0,0 +1,1032 @@ +#ifndef __LINUX_USB_H +#define __LINUX_USB_H + + +#include "usb_ch9.h" + +#define USB_MAJOR 180 + + +#ifdef __KERNEL__ +#if 0 +#include +#include /* for -ENODEV */ +#include /* for mdelay() */ +#include /* for in_interrupt() */ +#include /* for struct list_head */ +#include /* for struct device */ +#include /* for struct file_operations */ +#include /* for struct completion */ +#include /* for current && schedule_timeout */ + + +static __inline__ void wait_ms(unsigned int ms) +{ + if(!in_interrupt()) { + current->state = TASK_UNINTERRUPTIBLE; + schedule_timeout(1 + ms * HZ / 1000); + } + else + mdelay(ms); +} +#endif +struct usb_device; + +/*-------------------------------------------------------------------------*/ + +/* + * Host-side wrappers for standard USB descriptors ... these are parsed + * from the data provided by devices. Parsing turns them from a flat + * sequence of descriptors into a hierarchy: + * + * - devices have one (usually) or more configs; + * - configs have one (often) or more interfaces; + * - interfaces have one (usually) or more settings; + * - each interface setting has zero or (usually) more endpoints. + * + * And there might be other descriptors mixed in with those. + * + * Devices may also have class-specific or vendor-specific descriptors. + */ + +/* host-side wrapper for parsed endpoint descriptors */ +struct usb_host_endpoint { + struct usb_endpoint_descriptor desc; + + unsigned char *extra; /* Extra descriptors */ + int extralen; +}; + +/* host-side wrapper for one interface setting's parsed descriptors */ +struct usb_host_interface { + struct usb_interface_descriptor desc; + + /* array of desc.bNumEndpoint endpoints associated with this + * interface setting. these will be in no particular order. + */ + struct usb_host_endpoint *endpoint; + + unsigned char *extra; /* Extra descriptors */ + int extralen; +}; + +/** + * struct usb_interface - what usb device drivers talk to + * @altsetting: array of interface descriptors, one for each alternate + * setting that may be selected. Each one includes a set of + * endpoint configurations and will be in numberic order, + * 0..num_altsetting. + * @num_altsetting: number of altsettings defined. + * @act_altsetting: index of current altsetting. this number is always + * less than num_altsetting. after the device is configured, each + * interface uses its default setting of zero. + * @max_altsetting: + * @minor: the minor number assigned to this interface, if this + * interface is bound to a driver that uses the USB major number. + * If this interface does not use the USB major, this field should + * be unused. The driver should set this value in the probe() + * function of the driver, after it has been assigned a minor + * number from the USB core by calling usb_register_dev(). + * @dev: driver model's view of this device + * @class_dev: driver model's class view of this device. + * + * USB device drivers attach to interfaces on a physical device. Each + * interface encapsulates a single high level function, such as feeding + * an audio stream to a speaker or reporting a change in a volume control. + * Many USB devices only have one interface. The protocol used to talk to + * an interface's endpoints can be defined in a usb "class" specification, + * or by a product's vendor. The (default) control endpoint is part of + * every interface, but is never listed among the interface's descriptors. + * + * The driver that is bound to the interface can use standard driver model + * calls such as dev_get_drvdata() on the dev member of this structure. + * + * Each interface may have alternate settings. The initial configuration + * of a device sets the first of these, but the device driver can change + * that setting using usb_set_interface(). Alternate settings are often + * used to control the the use of periodic endpoints, such as by having + * different endpoints use different amounts of reserved USB bandwidth. + * All standards-conformant USB devices that use isochronous endpoints + * will use them in non-default settings. + */ +struct usb_interface { + /* array of alternate settings for this interface. + * these will be in numeric order, 0..num_altsettting + */ + struct usb_host_interface *altsetting; + + unsigned act_altsetting; /* active alternate setting */ + unsigned num_altsetting; /* number of alternate settings */ + unsigned max_altsetting; /* total memory allocated */ + + struct usb_driver *driver; /* driver */ + int minor; /* minor number this interface is bound to */ + struct device dev; /* interface specific device info */ + struct class_device class_dev; +}; +#define to_usb_interface(d) container_of(d, struct usb_interface, dev) +#define class_dev_to_usb_interface(d) container_of(d, struct usb_interface, class_dev) +#define interface_to_usbdev(intf) \ + container_of(intf->dev.parent, struct usb_device, dev) + +static inline void *usb_get_intfdata (struct usb_interface *intf) +{ + return dev_get_drvdata (&intf->dev); +} + +static inline void usb_set_intfdata (struct usb_interface *intf, void *data) +{ + dev_set_drvdata(&intf->dev, data); +} + +/* USB_DT_CONFIG: Configuration descriptor information. + * + * USB_DT_OTHER_SPEED_CONFIG is the same descriptor, except that the + * descriptor type is different. Highspeed-capable devices can look + * different depending on what speed they're currently running. Only + * devices with a USB_DT_DEVICE_QUALIFIER have an OTHER_SPEED_CONFIG. + */ +struct usb_host_config { + struct usb_config_descriptor desc; + + /* the interfaces associated with this configuration + * these will be in numeric order, 0..desc.bNumInterfaces + */ + struct usb_interface *interface; + + unsigned char *extra; /* Extra descriptors */ + int extralen; +}; + +// FIXME remove; exported only for drivers/usb/misc/auserwald.c +// prefer usb_device->epnum[0..31] +extern struct usb_endpoint_descriptor * + usb_epnum_to_ep_desc(struct usb_device *dev, unsigned epnum); + +int __usb_get_extra_descriptor(char *buffer, unsigned size, + unsigned char type, void **ptr); +#define usb_get_extra_descriptor(ifpoint,type,ptr)\ + __usb_get_extra_descriptor((ifpoint)->extra,(ifpoint)->extralen,\ + type,(void**)ptr) + +/* -------------------------------------------------------------------------- */ + +struct usb_operations; + +/* USB device number allocation bitmap */ +struct usb_devmap { + unsigned long devicemap[128 / (8*sizeof(unsigned long))]; +}; + +/* + * Allocated per bus (tree of devices) we have: + */ +struct usb_bus { + struct device *controller; /* host/master side hardware */ + int busnum; /* Bus number (in order of reg) */ + char *bus_name; /* stable id (PCI slot_name etc) */ + + int devnum_next; /* Next open device number in round-robin allocation */ + + struct usb_devmap devmap; /* device address allocation map */ + struct usb_operations *op; /* Operations (specific to the HC) */ + struct usb_device *root_hub; /* Root hub */ + struct list_head bus_list; /* list of busses */ + void *hcpriv; /* Host Controller private data */ + + int bandwidth_allocated; /* on this bus: how much of the time + * reserved for periodic (intr/iso) + * requests is used, on average? + * Units: microseconds/frame. + * Limits: Full/low speed reserve 90%, + * while high speed reserves 80%. + */ + int bandwidth_int_reqs; /* number of Interrupt requests */ + int bandwidth_isoc_reqs; /* number of Isoc. requests */ + + struct dentry *usbfs_dentry; /* usbfs dentry entry for the bus */ + struct dentry *usbdevfs_dentry; /* usbdevfs dentry entry for the bus */ + + atomic_t refcnt; +}; + + +/* -------------------------------------------------------------------------- */ + +/* This is arbitrary. + * From USB 2.0 spec Table 11-13, offset 7, a hub can + * have up to 255 ports. The most yet reported is 10. + */ +#define USB_MAXCHILDREN (16) + +struct usb_tt; + +struct usb_device { + int devnum; /* Address on USB bus */ + char devpath [16]; /* Use in messages: /port/port/... */ + enum usb_device_state state; /* configured, not attached, etc */ + enum usb_device_speed speed; /* high/full/low (or error) */ + + struct usb_tt *tt; /* low/full speed dev, highspeed hub */ + int ttport; /* device port on that tt hub */ + + struct semaphore serialize; + + unsigned int toggle[2]; /* one bit for each endpoint ([0] = IN, [1] = OUT) */ + unsigned int halted[2]; /* endpoint halts; one bit per endpoint # & direction; */ + /* [0] = IN, [1] = OUT */ + int epmaxpacketin[16]; /* INput endpoint specific maximums */ + int epmaxpacketout[16]; /* OUTput endpoint specific maximums */ + + struct usb_device *parent; /* our hub, unless we're the root */ + struct usb_bus *bus; /* Bus we're part of */ + + struct device dev; /* Generic device interface */ + + struct usb_device_descriptor descriptor;/* Descriptor */ + struct usb_host_config *config; /* All of the configs */ + struct usb_host_config *actconfig;/* the active configuration */ + + char **rawdescriptors; /* Raw descriptors for each config */ + + int have_langid; /* whether string_langid is valid yet */ + int string_langid; /* language ID for strings */ + + void *hcpriv; /* Host Controller private data */ + + struct list_head filelist; + struct dentry *usbfs_dentry; /* usbfs dentry entry for the device */ + struct dentry *usbdevfs_dentry; /* usbdevfs dentry entry for the device */ + + /* + * Child devices - these can be either new devices + * (if this is a hub device), or different instances + * of this same device. + * + * Each instance needs its own set of data structures. + */ + + int maxchild; /* Number of ports if hub */ + struct usb_device *children[USB_MAXCHILDREN]; +}; +#define to_usb_device(d) container_of(d, struct usb_device, dev) + +extern struct usb_device STDCALL *usb_alloc_dev(struct usb_device *parent, struct usb_bus *); +extern struct usb_device *usb_get_dev(struct usb_device *dev); +extern void STDCALL usb_put_dev(struct usb_device *dev); + +/* mostly for devices emulating SCSI over USB */ +extern int usb_reset_device(struct usb_device *dev); + +extern struct usb_device *usb_find_device(u16 vendor_id, u16 product_id); + +/* for drivers using iso endpoints */ +extern int usb_get_current_frame_number (struct usb_device *usb_dev); + +/* used these for multi-interface device registration */ +extern void usb_driver_claim_interface(struct usb_driver *driver, + struct usb_interface *iface, void* priv); +extern int usb_interface_claimed(struct usb_interface *iface); +extern void usb_driver_release_interface(struct usb_driver *driver, + struct usb_interface *iface); +const struct usb_device_id *usb_match_id(struct usb_interface *interface, + const struct usb_device_id *id); + +extern struct usb_interface *usb_find_interface(struct usb_driver *drv, int minor); +extern struct usb_interface *usb_ifnum_to_if(struct usb_device *dev, unsigned ifnum); + + +/** + * usb_make_path - returns stable device path in the usb tree + * @dev: the device whose path is being constructed + * @buf: where to put the string + * @size: how big is "buf"? + * + * Returns length of the string (> 0) or negative if size was too small. + * + * This identifier is intended to be "stable", reflecting physical paths in + * hardware such as physical bus addresses for host controllers or ports on + * USB hubs. That makes it stay the same until systems are physically + * reconfigured, by re-cabling a tree of USB devices or by moving USB host + * controllers. Adding and removing devices, including virtual root hubs + * in host controller driver modules, does not change these path identifers; + * neither does rebooting or re-enumerating. These are more useful identifiers + * than changeable ("unstable") ones like bus numbers or device addresses. + * + * With a partial exception for devices connected to USB 2.0 root hubs, these + * identifiers are also predictable. So long as the device tree isn't changed, + * plugging any USB device into a given hub port always gives it the same path. + * Because of the use of "companion" controllers, devices connected to ports on + * USB 2.0 root hubs (EHCI host controllers) will get one path ID if they are + * high speed, and a different one if they are full or low speed. + */ +static inline int usb_make_path (struct usb_device *dev, char *buf, size_t size) +{ + int actual; + actual = snprintf (buf, size, "usb-%s-%s", dev->bus->bus_name, dev->devpath); + return (actual >= size) ? -1 : actual; +} + +/*-------------------------------------------------------------------------*/ + +#define USB_DEVICE_ID_MATCH_DEVICE (USB_DEVICE_ID_MATCH_VENDOR | USB_DEVICE_ID_MATCH_PRODUCT) +#define USB_DEVICE_ID_MATCH_DEV_RANGE (USB_DEVICE_ID_MATCH_DEV_LO | USB_DEVICE_ID_MATCH_DEV_HI) +#define USB_DEVICE_ID_MATCH_DEVICE_AND_VERSION (USB_DEVICE_ID_MATCH_DEVICE | USB_DEVICE_ID_MATCH_DEV_RANGE) +#define USB_DEVICE_ID_MATCH_DEV_INFO \ + (USB_DEVICE_ID_MATCH_DEV_CLASS | USB_DEVICE_ID_MATCH_DEV_SUBCLASS | USB_DEVICE_ID_MATCH_DEV_PROTOCOL) +#define USB_DEVICE_ID_MATCH_INT_INFO \ + (USB_DEVICE_ID_MATCH_INT_CLASS | USB_DEVICE_ID_MATCH_INT_SUBCLASS | USB_DEVICE_ID_MATCH_INT_PROTOCOL) + +/** + * USB_DEVICE - macro used to describe a specific usb device + * @vend: the 16 bit USB Vendor ID + * @prod: the 16 bit USB Product ID + * + * This macro is used to create a struct usb_device_id that matches a + * specific device. + */ +#define USB_DEVICE(vend,prod) \ + .match_flags = USB_DEVICE_ID_MATCH_DEVICE, .idVendor = (vend), .idProduct = (prod) +/** + * USB_DEVICE_VER - macro used to describe a specific usb device with a version range + * @vend: the 16 bit USB Vendor ID + * @prod: the 16 bit USB Product ID + * @lo: the bcdDevice_lo value + * @hi: the bcdDevice_hi value + * + * This macro is used to create a struct usb_device_id that matches a + * specific device, with a version range. + */ +#define USB_DEVICE_VER(vend,prod,lo,hi) \ + .match_flags = USB_DEVICE_ID_MATCH_DEVICE_AND_VERSION, .idVendor = (vend), .idProduct = (prod), .bcdDevice_lo = (lo), .bcdDevice_hi = (hi) + +/** + * USB_DEVICE_INFO - macro used to describe a class of usb devices + * @cl: bDeviceClass value + * @sc: bDeviceSubClass value + * @pr: bDeviceProtocol value + * + * This macro is used to create a struct usb_device_id that matches a + * specific class of devices. + */ +#define USB_DEVICE_INFO(cl,sc,pr) \ + .match_flags = USB_DEVICE_ID_MATCH_DEV_INFO, .bDeviceClass = (cl), .bDeviceSubClass = (sc), .bDeviceProtocol = (pr) + +/** + * USB_INTERFACE_INFO - macro used to describe a class of usb interfaces + * @cl: bInterfaceClass value + * @sc: bInterfaceSubClass value + * @pr: bInterfaceProtocol value + * + * This macro is used to create a struct usb_device_id that matches a + * specific class of interfaces. + */ +#define USB_INTERFACE_INFO(cl,sc,pr) \ + .match_flags = USB_DEVICE_ID_MATCH_INT_INFO, .bInterfaceClass = (cl), .bInterfaceSubClass = (sc), .bInterfaceProtocol = (pr) + +/* -------------------------------------------------------------------------- */ + +/** + * struct usb_driver - identifies USB driver to usbcore + * @owner: Pointer to the module owner of this driver; initialize + * it using THIS_MODULE. + * @name: The driver name should be unique among USB drivers, + * and should normally be the same as the module name. + * @probe: Called to see if the driver is willing to manage a particular + * interface on a device. If it is, probe returns zero and uses + * dev_set_drvdata() to associate driver-specific data with the + * interface. It may also use usb_set_interface() to specify the + * appropriate altsetting. If unwilling to manage the interface, + * return a negative errno value. + * @disconnect: Called when the interface is no longer accessible, usually + * because its device has been (or is being) disconnected or the + * driver module is being unloaded. + * @ioctl: Used for drivers that want to talk to userspace through + * the "usbfs" filesystem. This lets devices provide ways to + * expose information to user space regardless of where they + * do (or don't) show up otherwise in the filesystem. + * @id_table: USB drivers use ID table to support hotplugging. + * Export this with MODULE_DEVICE_TABLE(usb,...). This must be set + * or your driver's probe function will never get called. + * + * USB drivers must provide a name, probe() and disconnect() methods, + * and an id_table. Other driver fields are optional. + * + * The id_table is used in hotplugging. It holds a set of descriptors, + * and specialized data may be associated with each entry. That table + * is used by both user and kernel mode hotplugging support. + * + * The probe() and disconnect() methods are called in a context where + * they can sleep, but they should avoid abusing the privilege. Most + * work to connect to a device should be done when the device is opened, + * and undone at the last close. The disconnect code needs to address + * concurrency issues with respect to open() and close() methods, as + * well as forcing all pending I/O requests to complete (by unlinking + * them as necessary, and blocking until the unlinks complete). + */ +struct usb_driver { + struct module *owner; + + const char *name; + + int (*probe) (struct usb_interface *intf, + const struct usb_device_id *id); + + void (*disconnect) (struct usb_interface *intf); + + int (*ioctl) (struct usb_interface *intf, unsigned int code, void *buf); + + const struct usb_device_id *id_table; + + struct device_driver driver; + + struct semaphore serialize; +}; +#define to_usb_driver(d) container_of(d, struct usb_driver, driver) + +extern struct bus_type usb_bus_type; + +/** + * struct usb_class_driver - identifies a USB driver that wants to use the USB major number + * @name: devfs name for this driver. Will also be used by the driver + * class code to create a usb class device. + * @fops: pointer to the struct file_operations of this driver. + * @mode: the mode for the devfs file to be created for this driver. + * @minor_base: the start of the minor range for this driver. + * + * This structure is used for the usb_register_dev() and + * usb_unregister_dev() functions, to consolodate a number of the + * paramaters used for them. + */ +struct usb_class_driver { + char *name; + struct file_operations *fops; + mode_t mode; + int minor_base; +}; + +/* + * use these in module_init()/module_exit() + * and don't forget MODULE_DEVICE_TABLE(usb, ...) + */ +extern int usb_register(struct usb_driver *); +extern void usb_deregister(struct usb_driver *); + +extern int usb_register_dev(struct usb_interface *intf, + struct usb_class_driver *class_driver); +extern void usb_deregister_dev(struct usb_interface *intf, + struct usb_class_driver *class_driver); + +extern int usb_device_probe(struct device *dev); +extern int usb_device_remove(struct device *dev); +extern int STDCALL usb_disabled(void); + +/* -------------------------------------------------------------------------- */ + +/* + * URB support, for asynchronous request completions + */ + +/* + * urb->transfer_flags: + */ +#define URB_SHORT_NOT_OK 0x0001 /* report short reads as errors */ +#define URB_ISO_ASAP 0x0002 /* iso-only, urb->start_frame ignored */ +#define URB_NO_DMA_MAP 0x0004 /* urb->*_dma are valid on submit */ +#define URB_ASYNC_UNLINK 0x0008 /* usb_unlink_urb() returns asap */ +#define URB_NO_FSBR 0x0020 /* UHCI-specific */ +#define URB_ZERO_PACKET 0x0040 /* Finish bulk OUTs with short packet */ +#define URB_NO_INTERRUPT 0x0080 /* HINT: no non-error interrupt needed */ + +struct usb_iso_packet_descriptor { + unsigned int offset; + unsigned int length; /* expected length */ + unsigned int actual_length; + unsigned int status; +}; + +struct urb; +struct pt_regs; + +typedef void (*usb_complete_t)(struct urb *, struct pt_regs *); + +/** + * struct urb - USB Request Block + * @urb_list: For use by current owner of the URB. + * @pipe: Holds endpoint number, direction, type, and more. + * Create these values with the eight macros available; + * usb_{snd,rcv}TYPEpipe(dev,endpoint), where the type is "ctrl" + * (control), "bulk", "int" (interrupt), or "iso" (isochronous). + * For example usb_sndbulkpipe() or usb_rcvintpipe(). Endpoint + * numbers range from zero to fifteen. Note that "in" endpoint two + * is a different endpoint (and pipe) from "out" endpoint two. + * The current configuration controls the existence, type, and + * maximum packet size of any given endpoint. + * @dev: Identifies the USB device to perform the request. + * @status: This is read in non-iso completion functions to get the + * status of the particular request. ISO requests only use it + * to tell whether the URB was unlinked; detailed status for + * each frame is in the fields of the iso_frame-desc. + * @transfer_flags: A variety of flags may be used to affect how URB + * submission, unlinking, or operation are handled. Different + * kinds of URB can use different flags. + * @transfer_buffer: This identifies the buffer to (or from) which + * the I/O request will be performed (unless URB_NO_DMA_MAP is set). + * This buffer must be suitable for DMA; allocate it with kmalloc() + * or equivalent. For transfers to "in" endpoints, contents of + * this buffer will be modified. This buffer is used for data + * phases of control transfers. + * @transfer_dma: When transfer_flags includes URB_NO_DMA_MAP, the device + * driver is saying that it provided this DMA address, which the host + * controller driver should use instead of the transfer_buffer. + * @transfer_buffer_length: How big is transfer_buffer. The transfer may + * be broken up into chunks according to the current maximum packet + * size for the endpoint, which is a function of the configuration + * and is encoded in the pipe. When the length is zero, neither + * transfer_buffer nor transfer_dma is used. + * @actual_length: This is read in non-iso completion functions, and + * it tells how many bytes (out of transfer_buffer_length) were + * transferred. It will normally be the same as requested, unless + * either an error was reported or a short read was performed. + * The URB_SHORT_NOT_OK transfer flag may be used to make such + * short reads be reported as errors. + * @setup_packet: Only used for control transfers, this points to eight bytes + * of setup data. Control transfers always start by sending this data + * to the device. Then transfer_buffer is read or written, if needed. + * (Not used when URB_NO_DMA_MAP is set.) + * @setup_dma: For control transfers with URB_NO_DMA_MAP set, the device + * driver has provided this DMA address for the setup packet. The + * host controller driver should use this instead of setup_buffer. + * If there is a data phase, its buffer is identified by transfer_dma. + * @start_frame: Returns the initial frame for interrupt or isochronous + * transfers. + * @number_of_packets: Lists the number of ISO transfer buffers. + * @interval: Specifies the polling interval for interrupt or isochronous + * transfers. The units are frames (milliseconds) for for full and low + * speed devices, and microframes (1/8 millisecond) for highspeed ones. + * @error_count: Returns the number of ISO transfers that reported errors. + * @context: For use in completion functions. This normally points to + * request-specific driver context. + * @complete: Completion handler. This URB is passed as the parameter to the + * completion function. The completion function may then do what + * it likes with the URB, including resubmitting or freeing it. + * @iso_frame_desc: Used to provide arrays of ISO transfer buffers and to + * collect the transfer status for each buffer. + * + * This structure identifies USB transfer requests. URBs must be allocated by + * calling usb_alloc_urb() and freed with a call to usb_free_urb(). + * Initialization may be done using various usb_fill_*_urb() functions. URBs + * are submitted using usb_submit_urb(), and pending requests may be canceled + * using usb_unlink_urb(). + * + * Data Transfer Buffers: + * + * Normally drivers provide I/O buffers allocated with kmalloc() or otherwise + * taken from the general page pool. That is provided by transfer_buffer + * (control requests also use setup_packet), and host controller drivers + * perform a dma mapping (and unmapping) for each buffer transferred. Those + * mapping operations can be expensive on some platforms (perhaps using a dma + * bounce buffer or talking to an IOMMU), + * although they're cheap on commodity x86 and ppc hardware. + * + * Alternatively, drivers may pass the URB_NO_DMA_MAP transfer flag, which + * tells the host controller driver that no such mapping is needed since + * the device driver is DMA-aware. For example, they might allocate a DMA + * buffer with usb_buffer_alloc(), or call usb_buffer_map(). + * When this transfer flag is provided, host controller drivers will use the + * dma addresses found in the transfer_dma and/or setup_dma fields rather than + * determing a dma address themselves. + * + * Initialization: + * + * All URBs submitted must initialize dev, pipe, + * transfer_flags (may be zero), complete, timeout (may be zero). + * The URB_ASYNC_UNLINK transfer flag affects later invocations of + * the usb_unlink_urb() routine. + * + * All URBs must also initialize + * transfer_buffer and transfer_buffer_length. They may provide the + * URB_SHORT_NOT_OK transfer flag, indicating that short reads are + * to be treated as errors; that flag is invalid for write requests. + * + * Bulk URBs may + * use the URB_ZERO_PACKET transfer flag, indicating that bulk OUT transfers + * should always terminate with a short packet, even if it means adding an + * extra zero length packet. + * + * Control URBs must provide a setup_packet. + * + * Interrupt UBS must provide an interval, saying how often (in milliseconds + * or, for highspeed devices, 125 microsecond units) + * to poll for transfers. After the URB has been submitted, the interval + * and start_frame fields reflect how the transfer was actually scheduled. + * The polling interval may be more frequent than requested. + * For example, some controllers have a maximum interval of 32 microseconds, + * while others support intervals of up to 1024 microseconds. + * Isochronous URBs also have transfer intervals. (Note that for isochronous + * endpoints, as well as high speed interrupt endpoints, the encoding of + * the transfer interval in the endpoint descriptor is logarithmic.) + * + * Isochronous URBs normally use the URB_ISO_ASAP transfer flag, telling + * the host controller to schedule the transfer as soon as bandwidth + * utilization allows, and then set start_frame to reflect the actual frame + * selected during submission. Otherwise drivers must specify the start_frame + * and handle the case where the transfer can't begin then. However, drivers + * won't know how bandwidth is currently allocated, and while they can + * find the current frame using usb_get_current_frame_number () they can't + * know the range for that frame number. (Ranges for frame counter values + * are HC-specific, and can go from 256 to 65536 frames from "now".) + * + * Isochronous URBs have a different data transfer model, in part because + * the quality of service is only "best effort". Callers provide specially + * allocated URBs, with number_of_packets worth of iso_frame_desc structures + * at the end. Each such packet is an individual ISO transfer. Isochronous + * URBs are normally queued, submitted by drivers to arrange that + * transfers are at least double buffered, and then explicitly resubmitted + * in completion handlers, so + * that data (such as audio or video) streams at as constant a rate as the + * host controller scheduler can support. + * + * Completion Callbacks: + * + * The completion callback is made in_interrupt(), and one of the first + * things that a completion handler should do is check the status field. + * The status field is provided for all URBs. It is used to report + * unlinked URBs, and status for all non-ISO transfers. It should not + * be examined before the URB is returned to the completion handler. + * + * The context field is normally used to link URBs back to the relevant + * driver or request state. + * + * When completion callback is invoked for non-isochronous URBs, the + * actual_length field tells how many bytes were transferred. + * + * ISO transfer status is reported in the status and actual_length fields + * of the iso_frame_desc array, and the number of errors is reported in + * error_count. Completion callbacks for ISO transfers will normally + * (re)submit URBs to ensure a constant transfer rate. + */ +struct urb +{ + spinlock_t lock; /* lock for the URB */ + atomic_t count; /* reference count of the URB */ + void *hcpriv; /* private data for host controller */ + struct list_head urb_list; /* list pointer to all active urbs */ + struct usb_device *dev; /* (in) pointer to associated device */ + unsigned int pipe; /* (in) pipe information */ + int status; /* (return) non-ISO status */ + unsigned int transfer_flags; /* (in) URB_SHORT_NOT_OK | ...*/ + void *transfer_buffer; /* (in) associated data buffer */ + dma_addr_t transfer_dma; /* (in) dma addr for transfer_buffer */ + int transfer_buffer_length; /* (in) data buffer length */ + int actual_length; /* (return) actual transfer length */ + int bandwidth; /* bandwidth for INT/ISO request */ + unsigned char *setup_packet; /* (in) setup packet (control only) */ + dma_addr_t setup_dma; /* (in) dma addr for setup_packet */ + int start_frame; /* (modify) start frame (INT/ISO) */ + int number_of_packets; /* (in) number of ISO packets */ + int interval; /* (in) transfer interval (INT/ISO) */ + int error_count; /* (return) number of ISO errors */ + int timeout; /* (in) timeout, in jiffies */ + void *context; /* (in) context for completion */ + usb_complete_t complete; /* (in) completion routine */ + struct usb_iso_packet_descriptor iso_frame_desc[0]; /* (in) ISO ONLY */ +}; + +/* -------------------------------------------------------------------------- */ + +/** + * usb_fill_control_urb - initializes a control urb + * @urb: pointer to the urb to initialize. + * @dev: pointer to the struct usb_device for this urb. + * @pipe: the endpoint pipe + * @setup_packet: pointer to the setup_packet buffer + * @transfer_buffer: pointer to the transfer buffer + * @buffer_length: length of the transfer buffer + * @complete: pointer to the usb_complete_t function + * @context: what to set the urb context to. + * + * Initializes a control urb with the proper information needed to submit + * it to a device. + */ +static inline void usb_fill_control_urb (struct urb *urb, + struct usb_device *dev, + unsigned int pipe, + unsigned char *setup_packet, + void *transfer_buffer, + int buffer_length, + usb_complete_t complete, + void *context) +{ + spin_lock_init(&urb->lock); + urb->dev = dev; + urb->pipe = pipe; + urb->setup_packet = setup_packet; + urb->transfer_buffer = transfer_buffer; + urb->transfer_buffer_length = buffer_length; + urb->complete = complete; + urb->context = context; +} + +/** + * usb_fill_bulk_urb - macro to help initialize a bulk urb + * @urb: pointer to the urb to initialize. + * @dev: pointer to the struct usb_device for this urb. + * @pipe: the endpoint pipe + * @transfer_buffer: pointer to the transfer buffer + * @buffer_length: length of the transfer buffer + * @complete: pointer to the usb_complete_t function + * @context: what to set the urb context to. + * + * Initializes a bulk urb with the proper information needed to submit it + * to a device. + */ +static inline void usb_fill_bulk_urb (struct urb *urb, + struct usb_device *dev, + unsigned int pipe, + void *transfer_buffer, + int buffer_length, + usb_complete_t complete, + void *context) +{ + spin_lock_init(&urb->lock); + urb->dev = dev; + urb->pipe = pipe; + urb->transfer_buffer = transfer_buffer; + urb->transfer_buffer_length = buffer_length; + urb->complete = complete; + urb->context = context; +} + +/** + * usb_fill_int_urb - macro to help initialize a interrupt urb + * @urb: pointer to the urb to initialize. + * @dev: pointer to the struct usb_device for this urb. + * @pipe: the endpoint pipe + * @transfer_buffer: pointer to the transfer buffer + * @buffer_length: length of the transfer buffer + * @complete: pointer to the usb_complete_t function + * @context: what to set the urb context to. + * @interval: what to set the urb interval to, encoded like + * the endpoint descriptor's bInterval value. + * + * Initializes a interrupt urb with the proper information needed to submit + * it to a device. + * Note that high speed interrupt endpoints use a logarithmic encoding of + * the endpoint interval, and express polling intervals in microframes + * (eight per millisecond) rather than in frames (one per millisecond). + */ +static inline void usb_fill_int_urb (struct urb *urb, + struct usb_device *dev, + unsigned int pipe, + void *transfer_buffer, + int buffer_length, + usb_complete_t complete, + void *context, + int interval) +{ + spin_lock_init(&urb->lock); + urb->dev = dev; + urb->pipe = pipe; + urb->transfer_buffer = transfer_buffer; + urb->transfer_buffer_length = buffer_length; + urb->complete = complete; + urb->context = context; + if (dev->speed == USB_SPEED_HIGH) + urb->interval = 1 << (interval - 1); + else + urb->interval = interval; + urb->start_frame = -1; +} + +extern void STDCALL usb_init_urb(struct urb *urb); +extern struct urb STDCALL *usb_alloc_urb(int iso_packets, int mem_flags); +extern void STDCALL usb_free_urb(struct urb *urb); +#define usb_put_urb usb_free_urb +extern struct urb STDCALL *usb_get_urb(struct urb *urb); +extern int STDCALL usb_submit_urb(struct urb *urb, int mem_flags); +extern int STDCALL usb_unlink_urb(struct urb *urb); + +#define HAVE_USB_BUFFERS +void *usb_buffer_alloc (struct usb_device *dev, size_t size, + int mem_flags, dma_addr_t *dma); +void usb_buffer_free (struct usb_device *dev, size_t size, + void *addr, dma_addr_t dma); + +struct urb *usb_buffer_map (struct urb *urb); +void usb_buffer_dmasync (struct urb *urb); +void usb_buffer_unmap (struct urb *urb); + +struct scatterlist; +int usb_buffer_map_sg (struct usb_device *dev, unsigned pipe, + struct scatterlist *sg, int nents); +void usb_buffer_dmasync_sg (struct usb_device *dev, unsigned pipe, + struct scatterlist *sg, int n_hw_ents); +void usb_buffer_unmap_sg (struct usb_device *dev, unsigned pipe, + struct scatterlist *sg, int n_hw_ents); + +/*-------------------------------------------------------------------* + * SYNCHRONOUS CALL SUPPORT * + *-------------------------------------------------------------------*/ + +extern int usb_control_msg(struct usb_device *dev, unsigned int pipe, + __u8 request, __u8 requesttype, __u16 value, __u16 index, + void *data, __u16 size, int timeout); +extern int usb_bulk_msg(struct usb_device *usb_dev, unsigned int pipe, + void *data, int len, int *actual_length, + int timeout); + +/* wrappers around usb_control_msg() for the most common standard requests */ +extern int usb_get_descriptor(struct usb_device *dev, unsigned char desctype, + unsigned char descindex, void *buf, int size); +extern int usb_get_device_descriptor(struct usb_device *dev); +extern int usb_get_status(struct usb_device *dev, + int type, int target, void *data); +extern int usb_get_string(struct usb_device *dev, + unsigned short langid, unsigned char index, void *buf, int size); +extern int usb_string(struct usb_device *dev, int index, + char *buf, size_t size); + +/* wrappers that also update important state inside usbcore */ +extern int usb_clear_halt(struct usb_device *dev, int pipe); +extern int usb_set_configuration(struct usb_device *dev, int configuration); +extern int usb_set_interface(struct usb_device *dev, int ifnum, int alternate); + +/* + * timeouts, in seconds, used for sending/receiving control messages + * they typically complete within a few frames (msec) after they're issued + * USB identifies 5 second timeouts, maybe more in a few cases, and a few + * slow devices (like some MGE Ellipse UPSes) actually push that limit. + */ +#define USB_CTRL_GET_TIMEOUT 5 +#define USB_CTRL_SET_TIMEOUT 5 + + +/** + * struct usb_sg_request - support for scatter/gather I/O + * @status: zero indicates success, else negative errno + * @bytes: counts bytes transferred. + * + * These requests are initialized using usb_sg_init(), and then are used + * as request handles passed to usb_sg_wait() or usb_sg_cancel(). Most + * members of the request object aren't for driver access. + * + * The status and bytecount values are valid only after usb_sg_wait() + * returns. If the status is zero, then the bytecount matches the total + * from the request. + * + * After an error completion, drivers may need to clear a halt condition + * on the endpoint. + */ +struct usb_sg_request { + int status; + size_t bytes; + + // members not documented above are private to usbcore, + // and are not provided for driver access! + spinlock_t lock; + + struct usb_device *dev; + int pipe; + struct scatterlist *sg; + int nents; + + int entries; + struct urb **urbs; + + int count; + struct completion complete; +}; + +int usb_sg_init ( + struct usb_sg_request *io, + struct usb_device *dev, + unsigned pipe, + unsigned period, + struct scatterlist *sg, + int nents, + size_t length, + int mem_flags +); +void usb_sg_cancel (struct usb_sg_request *io); +void usb_sg_wait (struct usb_sg_request *io); + + +/* -------------------------------------------------------------------------- */ + +/* + * Calling this entity a "pipe" is glorifying it. A USB pipe + * is something embarrassingly simple: it basically consists + * of the following information: + * - device number (7 bits) + * - endpoint number (4 bits) + * - current Data0/1 state (1 bit) [Historical; now gone] + * - direction (1 bit) + * - speed (1 bit) [Historical and specific to USB 1.1; now gone.] + * - max packet size (2 bits: 8, 16, 32 or 64) [Historical; now gone.] + * - pipe type (2 bits: control, interrupt, bulk, isochronous) + * + * That's 18 bits. Really. Nothing more. And the USB people have + * documented these eighteen bits as some kind of glorious + * virtual data structure. + * + * Let's not fall in that trap. We'll just encode it as a simple + * unsigned int. The encoding is: + * + * - max size: bits 0-1 [Historical; now gone.] + * - direction: bit 7 (0 = Host-to-Device [Out], + * 1 = Device-to-Host [In] ... + * like endpoint bEndpointAddress) + * - device: bits 8-14 ... bit positions known to uhci-hcd + * - endpoint: bits 15-18 ... bit positions known to uhci-hcd + * - Data0/1: bit 19 [Historical; now gone. ] + * - lowspeed: bit 26 [Historical; now gone. ] + * - pipe type: bits 30-31 (00 = isochronous, 01 = interrupt, + * 10 = control, 11 = bulk) + * + * Why? Because it's arbitrary, and whatever encoding we select is really + * up to us. This one happens to share a lot of bit positions with the UHCI + * specification, so that much of the uhci driver can just mask the bits + * appropriately. + */ + +/* NOTE: these are not the standard USB_ENDPOINT_XFER_* values!! */ +#define PIPE_ISOCHRONOUS 0 +#define PIPE_INTERRUPT 1 +#define PIPE_CONTROL 2 +#define PIPE_BULK 3 + +#define usb_maxpacket(dev, pipe, out) (out \ + ? (dev)->epmaxpacketout[usb_pipeendpoint(pipe)] \ + : (dev)->epmaxpacketin [usb_pipeendpoint(pipe)] ) + +#define usb_pipein(pipe) ((pipe) & USB_DIR_IN) +#define usb_pipeout(pipe) (!usb_pipein(pipe)) +#define usb_pipedevice(pipe) (((pipe) >> 8) & 0x7f) +#define usb_pipeendpoint(pipe) (((pipe) >> 15) & 0xf) +#define usb_pipetype(pipe) (((pipe) >> 30) & 3) +#define usb_pipeisoc(pipe) (usb_pipetype((pipe)) == PIPE_ISOCHRONOUS) +#define usb_pipeint(pipe) (usb_pipetype((pipe)) == PIPE_INTERRUPT) +#define usb_pipecontrol(pipe) (usb_pipetype((pipe)) == PIPE_CONTROL) +#define usb_pipebulk(pipe) (usb_pipetype((pipe)) == PIPE_BULK) + +/* The D0/D1 toggle bits ... USE WITH CAUTION (they're almost hcd-internal) */ +#define usb_gettoggle(dev, ep, out) (((dev)->toggle[out] >> (ep)) & 1) +#define usb_dotoggle(dev, ep, out) ((dev)->toggle[out] ^= (1 << (ep))) +#define usb_settoggle(dev, ep, out, bit) ((dev)->toggle[out] = ((dev)->toggle[out] & ~(1 << (ep))) | ((bit) << (ep))) + +/* Endpoint halt control/status ... likewise USE WITH CAUTION */ +#define usb_endpoint_running(dev, ep, out) ((dev)->halted[out] &= ~(1 << (ep))) +#define usb_endpoint_halted(dev, ep, out) ((dev)->halted[out] & (1 << (ep))) + + +static inline unsigned int __create_pipe(struct usb_device *dev, unsigned int endpoint) +{ + return (dev->devnum << 8) | (endpoint << 15); +} + +/* Create various pipes... */ +#define usb_sndctrlpipe(dev,endpoint) ((PIPE_CONTROL << 30) | __create_pipe(dev,endpoint)) +#define usb_rcvctrlpipe(dev,endpoint) ((PIPE_CONTROL << 30) | __create_pipe(dev,endpoint) | USB_DIR_IN) +#define usb_sndisocpipe(dev,endpoint) ((PIPE_ISOCHRONOUS << 30) | __create_pipe(dev,endpoint)) +#define usb_rcvisocpipe(dev,endpoint) ((PIPE_ISOCHRONOUS << 30) | __create_pipe(dev,endpoint) | USB_DIR_IN) +#define usb_sndbulkpipe(dev,endpoint) ((PIPE_BULK << 30) | __create_pipe(dev,endpoint)) +#define usb_rcvbulkpipe(dev,endpoint) ((PIPE_BULK << 30) | __create_pipe(dev,endpoint) | USB_DIR_IN) +#define usb_sndintpipe(dev,endpoint) ((PIPE_INTERRUPT << 30) | __create_pipe(dev,endpoint)) +#define usb_rcvintpipe(dev,endpoint) ((PIPE_INTERRUPT << 30) | __create_pipe(dev,endpoint) | USB_DIR_IN) + +/* -------------------------------------------------------------------------- */ + +/* + * Debugging and troubleshooting/diagnostic helpers. + */ +void usb_show_device_descriptor(struct usb_device_descriptor *); +void usb_show_config_descriptor(struct usb_config_descriptor *); +void usb_show_interface_descriptor(struct usb_interface_descriptor *); +void usb_show_endpoint_descriptor(struct usb_endpoint_descriptor *); +void usb_show_device(struct usb_device *); +void usb_show_string(struct usb_device *dev, char *id, int index); + +#ifdef DEBUG +#define dbg(format, arg...) printk(KERN_DEBUG "%s: " format "\n" , __FILE__ , ## arg) +#else +#define dbg(format, arg...) do {} while (0) +#endif + + + +#ifdef DEBUG_MODE +#define info(format, arg...) printk(KERN_INFO __FILE__ ": " format "\n" , ## arg) +#define err(format, arg...) printk(KERN_ERR __FILE__ ": " format "\n" , ## arg) +#define warn(format, arg...) printk(KERN_WARNING __FILE__ ": " format "\n" , ## arg) +#endif + +#ifndef DEBUG_MODE +#define info(format, arg...) do {} while (0) +#define err(format, arg...) do {} while (0) +#define warn(format, arg...) do {} while (0) +#endif + +#endif /* __KERNEL__ */ + +#endif diff --git a/reactos/drivers/usb/cromwell/linux/usb_ch9.h b/reactos/drivers/usb/cromwell/linux/usb_ch9.h new file mode 100644 index 00000000000..a679168973a --- /dev/null +++ b/reactos/drivers/usb/cromwell/linux/usb_ch9.h @@ -0,0 +1,315 @@ +/* + * This file holds USB constants and structures that are needed for USB + * device APIs. These are used by the USB device model, which is defined + * in chapter 9 of the USB 2.0 specification. Linux has several APIs in C + * that need these: + * + * - the master/host side Linux-USB kernel driver API; + * - the "usbfs" user space API; and + * - (eventually) a Linux "gadget" slave/device side driver API. + * + * USB 2.0 adds an additional "On The Go" (OTG) mode, which lets systems + * act either as a USB master/host or as a USB slave/device. That means + * the master and slave side APIs will benefit from working well together. + */ + +#ifndef __LINUX_USB_CH9_H +#define __LINUX_USB_CH9_H +#if 0 +#include /* __u8 etc */ +#endif +/*-------------------------------------------------------------------------*/ + +/* CONTROL REQUEST SUPPORT */ + +/* + * USB directions + * + * This bit flag is used in endpoint descriptors' bEndpointAddress field. + * It's also one of three fields in control requests bRequestType. + */ +#define USB_DIR_OUT 0 /* to device */ +#define USB_DIR_IN 0x80 /* to host */ + +/* + * USB types, the second of three bRequestType fields + */ +#define USB_TYPE_MASK (0x03 << 5) +#define USB_TYPE_STANDARD (0x00 << 5) +#define USB_TYPE_CLASS (0x01 << 5) +#define USB_TYPE_VENDOR (0x02 << 5) +#define USB_TYPE_RESERVED (0x03 << 5) + +/* + * USB recipients, the third of three bRequestType fields + */ +#define USB_RECIP_MASK 0x1f +#define USB_RECIP_DEVICE 0x00 +#define USB_RECIP_INTERFACE 0x01 +#define USB_RECIP_ENDPOINT 0x02 +#define USB_RECIP_OTHER 0x03 + +/* + * Standard requests, for the bRequest field of a SETUP packet. + * + * These are qualified by the bRequestType field, so that for example + * TYPE_CLASS or TYPE_VENDOR specific feature flags could be retrieved + * by a GET_STATUS request. + */ +#define USB_REQ_GET_STATUS 0x00 +#define USB_REQ_CLEAR_FEATURE 0x01 +#define USB_REQ_SET_FEATURE 0x03 +#define USB_REQ_SET_ADDRESS 0x05 +#define USB_REQ_GET_DESCRIPTOR 0x06 +#define USB_REQ_SET_DESCRIPTOR 0x07 +#define USB_REQ_GET_CONFIGURATION 0x08 +#define USB_REQ_SET_CONFIGURATION 0x09 +#define USB_REQ_GET_INTERFACE 0x0A +#define USB_REQ_SET_INTERFACE 0x0B +#define USB_REQ_SYNCH_FRAME 0x0C + + +/** + * struct usb_ctrlrequest - SETUP data for a USB device control request + * @bRequestType: matches the USB bmRequestType field + * @bRequest: matches the USB bRequest field + * @wValue: matches the USB wValue field (le16 byte order) + * @wIndex: matches the USB wIndex field (le16 byte order) + * @wLength: matches the USB wLength field (le16 byte order) + * + * This structure is used to send control requests to a USB device. It matches + * the different fields of the USB 2.0 Spec section 9.3, table 9-2. See the + * USB spec for a fuller description of the different fields, and what they are + * used for. + * + * Note that the driver for any interface can issue control requests. + * For most devices, interfaces don't coordinate with each other, so + * such requests may be made at any time. + */ +struct usb_ctrlrequest { + __u8 bRequestType; + __u8 bRequest; + __u16 wValue; + __u16 wIndex; + __u16 wLength; +} __attribute__ ((packed)); + +/*-------------------------------------------------------------------------*/ + +/* + * STANDARD DESCRIPTORS ... as returned by GET_DESCRIPTOR, or + * (rarely) accepted by SET_DESCRIPTOR. + * + * Note that all multi-byte values here are encoded in little endian + * byte order "on the wire". But when exposed through Linux-USB APIs, + * they've been converted to cpu byte order. + */ + +/* + * Descriptor types ... USB 2.0 spec table 9.5 + */ +#define USB_DT_DEVICE 0x01 +#define USB_DT_CONFIG 0x02 +#define USB_DT_STRING 0x03 +#define USB_DT_INTERFACE 0x04 +#define USB_DT_ENDPOINT 0x05 +#define USB_DT_DEVICE_QUALIFIER 0x06 +#define USB_DT_OTHER_SPEED_CONFIG 0x07 +#define USB_DT_INTERFACE_POWER 0x08 + +/* All standard descriptors have these 2 fields at the beginning */ +struct usb_descriptor_header { + __u8 bLength; + __u8 bDescriptorType; +} __attribute__ ((packed)); + + +/*-------------------------------------------------------------------------*/ + +/* USB_DT_DEVICE: Device descriptor */ +struct usb_device_descriptor { + __u8 bLength; + __u8 bDescriptorType; + + __u16 bcdUSB; + __u8 bDeviceClass; + __u8 bDeviceSubClass; + __u8 bDeviceProtocol; + __u8 bMaxPacketSize0; + __u16 idVendor; + __u16 idProduct; + __u16 bcdDevice; + __u8 iManufacturer; + __u8 iProduct; + __u8 iSerialNumber; + __u8 bNumConfigurations; +} __attribute__ ((packed)); + +#define USB_DT_DEVICE_SIZE 18 + + +/* + * Device and/or Interface Class codes + * as found in bDeviceClass or bInterfaceClass + * and defined by www.usb.org documents + */ +#define USB_CLASS_PER_INTERFACE 0 /* for DeviceClass */ +#define USB_CLASS_AUDIO 1 +#define USB_CLASS_COMM 2 +#define USB_CLASS_HID 3 +#define USB_CLASS_PHYSICAL 5 +#define USB_CLASS_STILL_IMAGE 6 +#define USB_CLASS_PRINTER 7 +#define USB_CLASS_MASS_STORAGE 8 +#define USB_CLASS_HUB 9 +#define USB_CLASS_CDC_DATA 0x0a +#define USB_CLASS_CSCID 0x0b /* chip+ smart card */ +#define USB_CLASS_CONTENT_SEC 0x0d /* content security */ +#define USB_CLASS_APP_SPEC 0xfe +#define USB_CLASS_VENDOR_SPEC 0xff + +/*-------------------------------------------------------------------------*/ + +/* USB_DT_CONFIG: Configuration descriptor information. + * + * USB_DT_OTHER_SPEED_CONFIG is the same descriptor, except that the + * descriptor type is different. Highspeed-capable devices can look + * different depending on what speed they're currently running. Only + * devices with a USB_DT_DEVICE_QUALIFIER have any OTHER_SPEED_CONFIG + * descriptors. + */ +struct usb_config_descriptor { + __u8 bLength; + __u8 bDescriptorType; + + __u16 wTotalLength; + __u8 bNumInterfaces; + __u8 bConfigurationValue; + __u8 iConfiguration; + __u8 bmAttributes; + __u8 bMaxPower; +} __attribute__ ((packed)); + +#define USB_DT_CONFIG_SIZE 9 + +/* from config descriptor bmAttributes */ +#define USB_CONFIG_ATT_ONE (1 << 7) /* must be set */ +#define USB_CONFIG_ATT_SELFPOWER (1 << 6) /* self powered */ +#define USB_CONFIG_ATT_WAKEUP (1 << 5) /* can wakeup */ + +/*-------------------------------------------------------------------------*/ + +/* USB_DT_STRING: String descriptor */ +struct usb_string_descriptor { + __u8 bLength; + __u8 bDescriptorType; + + __u16 wData[1]; /* UTF-16LE encoded */ +} __attribute__ ((packed)); + +/* note that "string" zero is special, it holds language codes that + * the device supports, not Unicode characters. + */ + +/*-------------------------------------------------------------------------*/ + +/* USB_DT_INTERFACE: Interface descriptor */ +struct usb_interface_descriptor { + __u8 bLength; + __u8 bDescriptorType; + + __u8 bInterfaceNumber; + __u8 bAlternateSetting; + __u8 bNumEndpoints; + __u8 bInterfaceClass; + __u8 bInterfaceSubClass; + __u8 bInterfaceProtocol; + __u8 iInterface; +} __attribute__ ((packed)); + +#define USB_DT_INTERFACE_SIZE 9 + +/*-------------------------------------------------------------------------*/ + +/* USB_DT_ENDPOINT: Endpoint descriptor */ +struct usb_endpoint_descriptor { + __u8 bLength; + __u8 bDescriptorType; + + __u8 bEndpointAddress; + __u8 bmAttributes; + __u16 wMaxPacketSize; + __u8 bInterval; + + // NOTE: these two are _only_ in audio endpoints. + // use USB_DT_ENDPOINT*_SIZE in bLength, not sizeof. + __u8 bRefresh; + __u8 bSynchAddress; +} __attribute__ ((packed)); + +#define USB_DT_ENDPOINT_SIZE 7 +#define USB_DT_ENDPOINT_AUDIO_SIZE 9 /* Audio extension */ + + +/* + * Endpoints + */ +#define USB_ENDPOINT_NUMBER_MASK 0x0f /* in bEndpointAddress */ +#define USB_ENDPOINT_DIR_MASK 0x80 + +#define USB_ENDPOINT_XFERTYPE_MASK 0x03 /* in bmAttributes */ +#define USB_ENDPOINT_XFER_CONTROL 0 +#define USB_ENDPOINT_XFER_ISOC 1 +#define USB_ENDPOINT_XFER_BULK 2 +#define USB_ENDPOINT_XFER_INT 3 + + +/*-------------------------------------------------------------------------*/ + +/* USB_DT_DEVICE_QUALIFIER: Device Qualifier descriptor */ +struct usb_qualifier_descriptor { + __u8 bLength; + __u8 bDescriptorType; + + __u16 bcdUSB; + __u8 bDeviceClass; + __u8 bDeviceSubClass; + __u8 bDeviceProtocol; + __u8 bMaxPacketSize0; + __u8 bNumConfigurations; + __u8 bRESERVED; +} __attribute__ ((packed)); + + +/*-------------------------------------------------------------------------*/ + +/* USB 2.0 defines three speeds, here's how Linux identifies them */ + +enum usb_device_speed { + USB_SPEED_UNKNOWN = 0, /* enumerating */ + USB_SPEED_LOW, USB_SPEED_FULL, /* usb 1.1 */ + USB_SPEED_HIGH /* usb 2.0 */ +}; + +enum usb_device_state { + /* NOTATTACHED isn't in the USB spec, and this state acts + * the same as ATTACHED ... but it's clearer this way. + */ + USB_STATE_NOTATTACHED = 0, + + /* the chapter 9 device states */ + USB_STATE_ATTACHED, + USB_STATE_POWERED, + USB_STATE_DEFAULT, /* limited function */ + USB_STATE_ADDRESS, + USB_STATE_CONFIGURED, /* most functions */ + + USB_STATE_SUSPENDED + + /* NOTE: there are actually four different SUSPENDED + * states, returning to POWERED, DEFAULT, ADDRESS, or + * CONFIGURED respectively when SOF tokens flow again. + */ +}; + +#endif /* __LINUX_USB_CH9_H */ diff --git a/reactos/drivers/usb/cromwell/sys/BootUSB.c b/reactos/drivers/usb/cromwell/sys/BootUSB.c new file mode 100644 index 00000000000..2f582c5925a --- /dev/null +++ b/reactos/drivers/usb/cromwell/sys/BootUSB.c @@ -0,0 +1,90 @@ +/* + * USB support for XBOX, based on Linux kernel source + * + * 2003-06-21 Georg Acher (georg@acher.org) + * +*/ + +#include "../usb_wrapper.h" + +void subsys_usb_init(void); +void module_exit_usb_exit(void); + +extern struct pci_device_id *module_table_pci_ids; + +// straigth call... +int usb_hcd_pci_probe (struct pci_dev *dev, const struct pci_device_id *id); +void usb_hcd_pci_remove (struct pci_dev *dev); + +void XPADInit(void); +void XPADRemove(void); +void XRemoteInit(void); +void XRemoteRemove(void); + +extern int (*thread_handler)(void*); +int (*hub_thread_handler)(void*); + +extern int nousb; +extern int xpad_num; + +struct pci_dev xx_ohci_dev={ + .vendor = 0, + .device = 0, + .bus = NULL, + .irq = 1, // currently not used... + .slot_name = "OHCI", + .dev = {.name = "PCI",.dma_mask=1}, + .base = {0xfed00000}, + .flags = {} +}; + +/*------------------------------------------------------------------------*/ +void BootStartUSB(void) +{ + int n; + + nousb=0; + + init_wrapper(); + subsys_usb_init(); + hub_thread_handler=thread_handler; + usb_hcd_pci_probe(&xx_ohci_dev, module_table_pci_ids); + XPADInit(); + + XRemoteInit(); + + UsbKeyBoardInit(); + + for(n=0;n<30;n++) { + USBGetEvents(); + wait_ms(1); + } +} +/*------------------------------------------------------------------------*/ +void USBGetEvents(void) +{ + inc_jiffies(1); + do_all_timers(); + hub_thread_handler(NULL); + handle_irqs(-1); +} +/*------------------------------------------------------------------------*/ +void BootStopUSB(void) +{ + int n; + + XPADRemove(); + XRemoteRemove(); + UsbKeyBoardRemove(); + + for(n=0;n<100;n++) + { + USBGetEvents(); + wait_ms(1); + } + + module_exit_usb_exit(); + usb_hcd_pci_remove(&xx_ohci_dev); + +} +/*------------------------------------------------------------------------*/ diff --git a/reactos/drivers/usb/cromwell/sys/Makefile b/reactos/drivers/usb/cromwell/sys/Makefile new file mode 100644 index 00000000000..a57d8cec5c6 --- /dev/null +++ b/reactos/drivers/usb/cromwell/sys/Makefile @@ -0,0 +1,4 @@ + +O_TARGET := usbwrapper.o BootUSB.o linuxwrapper.o xpad.o xremote.o usbkey.o risefall.o + +include $(TOPDIR)/Rules.make diff --git a/reactos/drivers/usb/cromwell/sys/linuxwrapper.c b/reactos/drivers/usb/cromwell/sys/linuxwrapper.c new file mode 100644 index 00000000000..fce04d21250 --- /dev/null +++ b/reactos/drivers/usb/cromwell/sys/linuxwrapper.c @@ -0,0 +1,271 @@ +/* + * USB support based on Linux kernel source + * + * 2003-06-21 Georg Acher (georg@acher.org) + * + * Concept: + * + * 1) Forget all device interrupts, scheduling, semaphores, threads etc. + * 1a) Forget all DMA and PCI helper functions + * 2) Forget usbdevfs, procfs and ioctls + * 3) Emulate OHCI interrupts and root hub timer by polling + * 4) Emulate hub kernel thread by polling + * 5) Emulate synchronous USB-messages (usb_*_msg) with busy waiting + * + * To be done: + * 6) Remove code bloat + * + */ + +#include "../usb_wrapper.h" + +/* internal state */ + +static struct pci_dev *pci_probe_dev; +extern int (*thread_handler)(void*); +extern void* thread_parm; + +struct my_irqs reg_irqs[MAX_IRQS]; +int num_irqs; +int need_wakeup; + +int my_jiffies; + +struct timer_list *main_timer_list[MAX_TIMERS]; +struct dummy_process act_cur={0}; +struct dummy_process *my_current; + +int (*thread_handler)(void*); +void* thread_parm; + +#define MAX_DRVS 8 +static struct device_driver *m_drivers[MAX_DRVS]; +static int drvs_num; + +/*------------------------------------------------------------------------*/ +/* + * Helper functions for top-level system + */ +/*------------------------------------------------------------------------*/ +void init_wrapper(void) +{ + int n; + for(n=0;nfunction && main_timer_list[n]->expires) + { + void (*function)(unsigned long)=main_timer_list[n]->function; + unsigned long data=main_timer_list[n]->data; + main_timer_list[n]->expires=0; + + main_timer_list[n]=NULL; // remove timer +// printk("do timer %i fn %p\n",n,function); + + function(data); + } + } +} +/*------------------------------------------------------------------------*/ +// Purpose: Remember thread procedure and data in global var +int my_kernel_thread(int (*handler)(void*), void* parm, int flags) +{ + thread_handler=handler; + thread_parm=parm; + return 42; // PID :-) +} +/*------------------------------------------------------------------------*/ +/* Device management + * As simple as possible, but as complete as necessary ... + */ +/*------------------------------------------------------------------------*/ + + +/* calls probe function for hotplug (which does device matching), this is the +only link between usbcore and the registered device drivers! */ +int my_device_add(struct device *dev) +{ + int n,found=0; +// printk("drv_num %i %p %p\n",drvs_num,m_drivers[0]->probe,m_drivers[1]->probe); + if (dev->driver) + { + if (dev->driver->probe) + return dev->driver->probe(dev); + } + else + { + for(n=0;nprobe) + { + dev->driver=m_drivers[n]; +// printk("probe%i %p ",n,m_drivers[n]->probe); + if (m_drivers[n]->probe(dev) == 0) + { +// return 0; + found=1; + } + } + } + if (found) return 0; + } + dev->driver=NULL; + return -ENODEV; +} +/*------------------------------------------------------------------------*/ +int my_driver_register(struct device_driver *driver) +{ + + if (drvs_numprobe); + m_drivers[drvs_num++]=driver; + return 0; + } + return -1; +} +/*------------------------------------------------------------------------*/ +int my_device_unregister(struct device *dev) +{ + if (dev->driver && dev->driver->remove) + dev->driver->remove(dev); + return 0; + +} +/*------------------------------------------------------------------------*/ +struct device *my_get_device(struct device *dev) +{ + return NULL; +} +/*------------------------------------------------------------------------*/ +void my_device_initialize(struct device *dev) +{ +} +/*------------------------------------------------------------------------*/ +void my_wake_up(void* p) +{ + need_wakeup=1; +} +/*------------------------------------------------------------------------*/ +/* wait until woken up (only one wait allowed!) */ +int my_schedule_timeout(int x) +{ + int wait=1; + x+=10; // safety +// printk("schedule_timeout %i\n",x); + while(x>0) + { + do_all_timers(); +#ifndef HAVE_IRQS + handle_irqs(-1); + +#endif + if (need_wakeup) + break; + wait_ms(wait); + inc_jiffies(wait); + x-=wait; + } + need_wakeup=0; +// printk("schedule DONE!!!!!!\n"); + return x; +} +/*------------------------------------------------------------------------*/ +void my_wait_for_completion(struct completion *x) +{ + int n=100; +// printk("wait for completion\n"); + while(!x->done && (n>0)) + { + do_all_timers(); +#ifndef HAVE_IRQS + handle_irqs(-1); + +#endif + wait_ms(10); + n--; + } +// printk("wait for completion done %i\n",x->done); +} +/*------------------------------------------------------------------------*/ +// Helper for pci_module_init +/*------------------------------------------------------------------------*/ +int my_pci_module_init(struct pci_driver *x) +{ + struct pci_dev *dev=pci_probe_dev; + const struct pci_device_id *id=NULL; + if (!pci_probe_dev) + { + printk(KERN_ERR "PCI device not set!\n"); + return 0; + } + x->probe(dev, id); + return 0; +} +/*------------------------------------------------------------------------*/ +struct pci_dev *my_pci_find_slot(int a,int b) +{ + return NULL; +} +/*------------------------------------------------------------------------*/ +int my_request_irq(unsigned int irq, + int (*handler)(int,void *, struct pt_regs *), + unsigned long mode, const char *desc, void *data) +{ + if (num_irqs0x30)&&(xpad_button_history[selected_Button]==0)) { + // Button Rising Edge + xpad_button_history[selected_Button] = 1; + return 1; + } + + if ((Button==0x00)&&(xpad_button_history[selected_Button]==1)) { + // Button Falling Edge + xpad_button_history[selected_Button] = 0; + return -1; + } + } + + if ((selected_Button > 5) & (selected_Button < 10) ) { + + unsigned char Buttonmask; + + switch (selected_Button) { + case TRIGGER_XPAD_PAD_UP : + Buttonmask = XPAD_PAD_UP; + break; + case TRIGGER_XPAD_PAD_DOWN : + Buttonmask = XPAD_PAD_DOWN; + break; + case TRIGGER_XPAD_PAD_LEFT : + Buttonmask = XPAD_PAD_LEFT; + break; + case TRIGGER_XPAD_PAD_RIGHT : + Buttonmask = XPAD_PAD_RIGHT; + break; + } + + // Rising Edge + if (((XPAD_current[0].pad&Buttonmask) != 0) & ((xpad_button_history[6]&Buttonmask) == 0)) { + xpad_button_history[6] ^= Buttonmask; // Flip the Bit + return 1; + } + // Falling Edge + if (((XPAD_current[0].pad&Buttonmask) == 0) & ((xpad_button_history[6]&Buttonmask) != 0)) { + xpad_button_history[6] ^= Buttonmask; // Flip the Bit + return -1; + } + } + return 0; +} diff --git a/reactos/drivers/usb/cromwell/sys/ros_wrapper.c b/reactos/drivers/usb/cromwell/sys/ros_wrapper.c new file mode 100644 index 00000000000..d97f1c6aa40 --- /dev/null +++ b/reactos/drivers/usb/cromwell/sys/ros_wrapper.c @@ -0,0 +1,10 @@ +#include "../usb_wrapper.h" + + +void wait_ms(int mils) +{ + LARGE_INTEGER Interval; + + Interval.QuadPart = -mils*10; + KeDelayExecutionThread(KernelMode, FALSE, &Interval); +} diff --git a/reactos/drivers/usb/cromwell/sys/usbkey.c b/reactos/drivers/usb/cromwell/sys/usbkey.c new file mode 100644 index 00000000000..efb237d49a9 --- /dev/null +++ b/reactos/drivers/usb/cromwell/sys/usbkey.c @@ -0,0 +1,123 @@ +#include "../usb_wrapper.h" + +#define keyboarddebug 0 + +#if keyboarddebug +extern int printe(const char *szFormat, ...); +int ycoffset = 0; +#endif + +unsigned int current_keyboard_key; + +struct usb_kbd_info { + struct urb *urb; + unsigned char kbd_pkt[8]; + unsigned char old[8]; + + /* + struct input_dev dev; + struct usb_device *usbdev; + struct urb irq, led; + struct usb_ctrlrequest dr; + unsigned char leds, newleds; + char name[128]; + int open; + */ +}; + +static void usb_kbd_irq(struct urb *urb, struct pt_regs *regs) +{ + struct usb_kbd_info *kbd = urb->context; + int i; + + if (urb->status) return; + + memcpy(kbd->kbd_pkt, urb->transfer_buffer, 8); + + current_keyboard_key = kbd->kbd_pkt[2]; + + + #if keyboarddebug + ycoffset += 15; + ycoffset = ycoffset % 600; + VIDEO_CURSOR_POSX=20; + VIDEO_CURSOR_POSY=ycoffset; + printe(" -%02x %02x %02x %02x %02x %02x\n",kbd->kbd_pkt[0],kbd->kbd_pkt[1],kbd->kbd_pkt[2],kbd->kbd_pkt[3],kbd->kbd_pkt[4],kbd->kbd_pkt[5]); + #endif + + usb_submit_urb(urb,GFP_ATOMIC); + +} + +static int usb_kbd_probe(struct usb_interface *intf, const struct usb_device_id *id) +{ + struct urb *urb; + struct usb_device *udev = interface_to_usbdev (intf); + struct usb_endpoint_descriptor *ep_irq_in; + struct usb_endpoint_descriptor *ep_irq_out; + struct usb_kbd_info *usbk; + + int i, pipe, maxp; + char *buf; + + usbk=(struct usb_kbd_info *)kmalloc(sizeof(struct usb_kbd_info),0); + if (!usbk) return -1; + + urb=usb_alloc_urb(0,0); + if (!urb) return -1; + + usbk->urb=urb; + + ep_irq_in = &intf->altsetting[0].endpoint[0].desc; + usb_fill_int_urb(urb, udev, + usb_rcvintpipe(udev, ep_irq_in->bEndpointAddress), + usbk->kbd_pkt, 8, usb_kbd_irq, + usbk, 8); + + usb_submit_urb(urb,GFP_ATOMIC); + usb_set_intfdata(intf,usbk); + #if keyboarddebug + printe("USB Keyboard Connected\n"); + #endif +} + + +static void usb_kbd_disconnect(struct usb_interface *intf) +{ + struct usb_kbd_info *usbk = usb_get_intfdata (intf); + usbprintk("Keyboard disconnected\n "); + usb_unlink_urb(usbk->urb); + usb_free_urb(usbk->urb); + kfree(usbk); +} + +static struct usb_device_id usb_kbd_id_table [] = { + { USB_INTERFACE_INFO(3, 1, 1) }, + { } /* Terminating entry */ +}; + + +static struct usb_driver usb_kbd_driver = { + .owner = THIS_MODULE, + .name = "keyboard", + .probe = usb_kbd_probe, + .disconnect = usb_kbd_disconnect, + .id_table = usb_kbd_id_table, +}; + +void UsbKeyBoardInit(void) +{ + + //current_remote_key=0; + //sbprintk("Keyboard probe %p ",xremote_probe); + if (usb_register(&usb_kbd_driver) < 0) { + #if keyboarddebug + printe("Unable to register Keyboard driver"); + #endif + return; + } +} + +void UsbKeyBoardRemove(void) { + usb_deregister(&usb_kbd_driver); +} diff --git a/reactos/drivers/usb/cromwell/sys/usbwrapper.c b/reactos/drivers/usb/cromwell/sys/usbwrapper.c new file mode 100644 index 00000000000..f2de2204543 --- /dev/null +++ b/reactos/drivers/usb/cromwell/sys/usbwrapper.c @@ -0,0 +1,65 @@ +/* + * Interface calls to BIOS + * + * 2003-06-21 Georg Acher (georg@acher.org) + * + */ + +#include "boot.h" +#include +#include "video.h" + +/*------------------------------------------------------------------------*/ +// Output window for USB messages +int usb_curs_x=0; +int usb_curs_y=0; + +void zxprintf(char* fmt, ...) +{ + va_list ap; + char buffer[1024]; + int tmp_x, tmp_y; + tmp_x=VIDEO_CURSOR_POSX; + tmp_y=VIDEO_CURSOR_POSY; + + VIDEO_CURSOR_POSX=usb_curs_x; + VIDEO_CURSOR_POSY=usb_curs_y; + + if ((VIDEO_CURSOR_POSY==0) || (VIDEO_CURSOR_POSY > (vmode.height -16))) + { + BootVideoClearScreen(&jpegBackdrop, 3*vmode.height/4, + vmode.height); + VIDEO_CURSOR_POSY=3*vmode.height/4; + } + + va_start(ap, fmt); + vsprintf(buffer,fmt,ap); + //printk(buffer); + va_end(ap); + + usb_curs_x=VIDEO_CURSOR_POSX; + usb_curs_y=VIDEO_CURSOR_POSY; + VIDEO_CURSOR_POSX=tmp_x; + VIDEO_CURSOR_POSY=tmp_y; +} +/*------------------------------------------------------------------------*/ +int zxsnprintf(char *buffer, size_t s, char* fmt, ...) +{ + va_list ap; + int x; + va_start(ap, fmt); + x=vsprintf(buffer,fmt,ap); + va_end(ap); + return x; +} +/*------------------------------------------------------------------------*/ +int zxsprintf(char *buffer, char* fmt, ...) +{ + va_list ap; + int x; + va_start(ap, fmt); + x=vsprintf(buffer,fmt,ap); + va_end(ap); + return x; +} +/*------------------------------------------------------------------------*/ diff --git a/reactos/drivers/usb/cromwell/sys/xpad.c b/reactos/drivers/usb/cromwell/sys/xpad.c new file mode 100644 index 00000000000..e6d3122c80f --- /dev/null +++ b/reactos/drivers/usb/cromwell/sys/xpad.c @@ -0,0 +1,183 @@ +/* + * Simple XPAD driver for XBOX + * + * (c) 2003-07-04, Georg Acher (georg@acher.org) + * + * Inspired by linux/drivers/usb/input/xpad.c + * by Marko Friedemann + * + */ + + + +#include "../usb_wrapper.h" +#include "config.h" + +// history for the Rising - falling events +unsigned char xpad_button_history[7]; + +/* Stores time and XPAD state */ +struct xpad_data XPAD_current[4]; +struct xpad_data XPAD_last[4]; + +struct xpad_info +{ + struct urb *urb; + int num; + unsigned char data[32]; +}; + +int xpad_num=0; +/*------------------------------------------------------------------------*/ +static void xpad_irq(struct urb *urb, struct pt_regs *regs) +{ + struct xpad_info *xpi = urb->context; + unsigned char* data= urb->transfer_buffer; + +// struct xpad_data *xp=&XPAD_current[xpi->num]; +// struct xpad_data *xpo=&XPAD_last[xpi->num]; + + /* This hack means the xpad event always gets posted to the + * first xpad - avoids problems iterating over multiple xpads + * as the xpi->num entries are not reused when xpads are + * connected, then removed */ + + struct xpad_data *xp=&XPAD_current[0]; + struct xpad_data *xpo=&XPAD_last[0]; + + if (xpi->num<0 || xpi->num>3) + return; + + memcpy(xpo,xp,sizeof(struct xpad_data)); + + xp->stick_left_x=(short) (((short)data[13] << 8) | data[12]); + xp->stick_left_y=(short) (((short)data[15] << 8) | data[14]); + xp->stick_right_x=(short) (((short)data[17] << 8) | data[16]); + xp->stick_right_y=(short) (((short)data[19] << 8) | data[18]); + xp->trig_left= data[10]; + xp->trig_right= data[11]; + xp->pad = data[2]&0xf; + xp->state = (data[2]>>4)&0xf; + xp->keys[0] = data[4]; // a + xp->keys[1] = data[5]; // b + xp->keys[2] = data[6]; // x + xp->keys[3] = data[7]; // y + xp->keys[4] = data[8]; // black + xp->keys[5] = data[9]; // white + xp->timestamp=jiffies; // FIXME: A more uniform flowing time would be better... + usb_submit_urb(urb,GFP_ATOMIC); + +} +/*------------------------------------------------------------------------*/ +static int xpad_probe(struct usb_interface *intf, const struct usb_device_id *id) +{ + struct urb *urb; + struct usb_device *udev = interface_to_usbdev (intf); + struct usb_endpoint_descriptor *ep_irq_in; + struct usb_endpoint_descriptor *ep_irq_out; + struct xpad_info *xpi; + + xpi=kmalloc(sizeof(struct xpad_info),GFP_KERNEL); + if (!xpi) return -1; + + urb=usb_alloc_urb(0,0); + if (!urb) return -1; + + xpi->urb=urb; + xpi->num=xpad_num; + ep_irq_in = &intf->altsetting[0].endpoint[0].desc; + usb_fill_int_urb(urb, udev, + usb_rcvintpipe(udev, ep_irq_in->bEndpointAddress), + xpi->data, 32, xpad_irq, + xpi, 32); + + usb_submit_urb(urb,GFP_ATOMIC); + + usb_set_intfdata(intf,xpi); + usbprintk("XPAD #%i connected\n",xpad_num); + #ifdef XPAD_VIBRA_STARTUP + { + // Brum Brum + char data1[6]={0,6,0,120,0,120}; + char data2[6]={0,6,0,0,0,0}; + int dummy; + + usb_bulk_msg(udev, usb_sndbulkpipe(udev,2), + data1, 6, &dummy, 500); + wait_ms(500); + usb_bulk_msg(udev, usb_sndbulkpipe(udev,2), + data2, 6, &dummy, 500); + } + #endif + xpad_num++; + return 0; +} +/*------------------------------------------------------------------------*/ +static void xpad_disconnect(struct usb_interface *intf) +{ + struct xpad_info *xpi=usb_get_intfdata (intf); + usb_unlink_urb(xpi->urb); + usb_free_urb(xpi->urb); + kfree(xpi); + xpad_num--; +} +/*------------------------------------------------------------------------*/ +static struct usb_device_id xpad_ids [] = { + { USB_DEVICE(0x044f, 0x0f07) },//Thrustmaster, Inc. Controller + { USB_DEVICE(0x045e, 0x0202) },//Microsoft Xbox Controller + { USB_DEVICE(0x045e, 0x0285) },//Microsoft Xbox Controller S + { USB_DEVICE(0x045e, 0x0289) },//Microsoft Xbox Controller S + { USB_DEVICE(0x046d, 0xca88) },//Logitech Compact Controller for Xbox + { USB_DEVICE(0x05fd, 0x1007) },//???Mad Catz Controller??? + { USB_DEVICE(0x05fd, 0x107a) },//InterAct PowerPad Pro + { USB_DEVICE(0x0738, 0x4516) },//Mad Catz Control Pad + { USB_DEVICE(0x0738, 0x4522) },//Mad Catz LumiCON + { USB_DEVICE(0x0738, 0x4526) },//Mad Catz Control Pad Pro + { USB_DEVICE(0x0738, 0x4536) },//Mad Catz MicroCON + { USB_DEVICE(0x0738, 0x4556) },//Mad Catz Lynx Wireless Controller + { USB_DEVICE(0x0c12, 0x9902) },//HAMA VibraX - *FAULTY HARDWARE* + { USB_DEVICE(0x0e4c, 0x1097) },//Radica Gamester Controller + { USB_DEVICE(0x0e4c, 0x2390) },//Radica Games Jtech Controller + { USB_DEVICE(0x0e6f, 0x0003) },//Logic3 Freebird wireless Controller + { USB_DEVICE(0x0e6f, 0x0005) },//Eclipse wireless Controlle + { USB_DEVICE(0x0f30, 0x0202) },//Joytech Advanced Controller + { USB_DEVICE(0xffff, 0xffff) },//Chinese-made Xbox Controller + { USB_DEVICE(0x0000, 0x0000) }, // nothing detected - FAIL + { } /* Terminating entry */ +}; + + +static struct usb_driver xpad_driver = { + .owner = THIS_MODULE, + .name = "XPAD", + .probe = xpad_probe, + .disconnect = xpad_disconnect, + .id_table = xpad_ids, +}; + +/*------------------------------------------------------------------------*/ +void XPADInit(void) +{ + int n; + for(n=0;n<4;n++) + { + memset(&XPAD_current[n], 0, sizeof(struct xpad_data)); + memset(&XPAD_last[n], 0, sizeof(struct xpad_data)); + } + memset(&xpad_button_history, 0, sizeof(xpad_button_history)); + + usbprintk("XPAD probe %p ",xpad_probe); + if (usb_register(&xpad_driver) < 0) { + err("Unable to register XPAD driver"); + return; + } +} +/*------------------------------------------------------------------------*/ +void XPADRemove(void) { + usb_deregister(&xpad_driver); +} + +/*------------------------------------------------------------------------*/ + + + diff --git a/reactos/drivers/usb/cromwell/sys/xremote.c b/reactos/drivers/usb/cromwell/sys/xremote.c new file mode 100644 index 00000000000..7f53f211cc7 --- /dev/null +++ b/reactos/drivers/usb/cromwell/sys/xremote.c @@ -0,0 +1,142 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* + * $Id: xremote.c,v 1.5 2004/11/22 19:10:57 davidmpye Exp $ + * + * Copyright (c) 2002 Steven Toth + * + * XBOX DVD dongle infrared device driver for the input driver suite. + * + * This work was derived from the usbkbd.c kernel module. + * + * History: + * + * 2002_08_31 - 0.1 - Initial release + * 2002_09_02 - 0.2 - Added IOCTL support enabling user space administration + * of the translation matrix. + * + */ + +#include "../usb_wrapper.h" + + +u16 current_remote_key; +u8 remotekeyIsRepeat; + +struct xremote_info +{ + struct urb *urb; + unsigned char irpkt[8]; +}; + +/* USB callback completion handler + * Code in transfer_buffer is received as six unsigned chars + * Example PLAY=00 06 ea 0a 40 00 + * The command is located in byte[2], the rest are ignored. + * Key position is byte[4] bit0 (7-0 format) 0=down, 1=up + * All other bits are unknown / now required. + */ + +static void xremote_irq(struct urb *urb, struct pt_regs *regs) +{ + struct xremote_info *xri = urb->context; + + if (urb->status) return; + if (urb->actual_length < 6) return; + + /* Messy/unnecessary, fix this */ + memcpy(xri->irpkt, urb->transfer_buffer, 6); + + /* Set the key action based in the sent action */ + current_remote_key = ((xri->irpkt[2] & 0xff)<<8) | (xri->irpkt[3] & 0xff); + + if (((xri->irpkt[4] & 0xff) + ((xri->irpkt[5] & 0xff ) << 8))>0x41) { + remotekeyIsRepeat=0; + } + else remotekeyIsRepeat=1; + + usb_submit_urb(urb,GFP_ATOMIC); +} + +static int xremote_probe(struct usb_interface *intf, const struct usb_device_id *id) +{ + struct urb *urb; + struct usb_device *udev = interface_to_usbdev (intf); + struct usb_endpoint_descriptor *ep_irq_in; + struct usb_endpoint_descriptor *ep_irq_out; + struct xremote_info *xri; + + xri=(struct xremote_info *)kmalloc(sizeof(struct xremote_info),0); + if (!xri) return -1; + + urb=usb_alloc_urb(0,0); + if (!urb) return -1; + + xri->urb=urb; + + ep_irq_in = &intf->altsetting[0].endpoint[0].desc; + usb_fill_int_urb(urb, udev, + usb_rcvintpipe(udev, ep_irq_in->bEndpointAddress), + xri->irpkt, 8, xremote_irq, + xri, 8); + + usb_submit_urb(urb,GFP_ATOMIC); + usb_set_intfdata(intf,xri); + + usbprintk("DVD Remote connected\n"); + return 0; +} + +static void xremote_disconnect(struct usb_interface *intf) +{ + struct xremote_info *xri = usb_get_intfdata (intf); + usbprintk("DVD Remote disconnected\n "); + usb_unlink_urb(xri->urb); + usb_free_urb(xri->urb); + kfree(xri); +} + +static struct usb_device_id xremote_id_table [] = { + { USB_DEVICE(0x040b, 0x6521) }, /* Gamester Xbox DVD Movie Playback Kit IR */ + { USB_DEVICE(0x045e, 0x0284) }, /* Microsoft Xbox DVD Movie Playback Kit IR */ + { USB_DEVICE(0x0000, 0x0000) }, // nothing detected - FAIL + { } /* Terminating entry */ +}; + +static struct usb_driver xremote_driver = { + .owner = THIS_MODULE, + .name = "XRemote", + .probe = xremote_probe, + .disconnect = xremote_disconnect, + .id_table = xremote_id_table, +}; + +void XRemoteInit(void) +{ + + current_remote_key=0; + usbprintk("XRemote probe %p ",xremote_probe); + if (usb_register(&xremote_driver) < 0) { + err("Unable to register XRemote driver"); + return; + } +} + +void XRemoteRemove(void) { + usb_deregister(&xremote_driver); +} diff --git a/reactos/drivers/usb/cromwell/usb_wrapper.h b/reactos/drivers/usb/cromwell/usb_wrapper.h new file mode 100644 index 00000000000..47e0d9bbb83 --- /dev/null +++ b/reactos/drivers/usb/cromwell/usb_wrapper.h @@ -0,0 +1,14 @@ +//#include +//#include +//#include +#include +#include + +void wait_ms(int mils); + +#include "linux/linux_wrapper.h" +#define __KERNEL__ +#undef CONFIG_PCI +#define CONFIG_PCI + +#include "linux/usb.h" From 9627e4ac70c9d66b9328bf7dc7bc40a501e151e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20van=20Geldorp?= Date: Wed, 26 Jan 2005 23:30:50 +0000 Subject: [PATCH 028/185] Avoid crash if import directory is messed up svn path=/trunk/; revision=13325 --- reactos/ntoskrnl/ldr/loader.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/reactos/ntoskrnl/ldr/loader.c b/reactos/ntoskrnl/ldr/loader.c index c1afd7c11aa..c1f7a8ab78a 100644 --- a/reactos/ntoskrnl/ldr/loader.c +++ b/reactos/ntoskrnl/ldr/loader.c @@ -1577,6 +1577,12 @@ LdrPEFixupImports(PMODULE_OBJECT Module) DPRINT("Processeing import directory at %p\n", ImportModuleDirectory); while (ImportModuleDirectory->Name) { + if (Module->Length <= ImportModuleDirectory->Name) + { + DPRINT1("Invalid import directory in %wZ\n", &Module->FullName); + return STATUS_SECTION_NOT_IMAGE; + } + /* Check to make sure that import lib is kernel */ ImportedName = (PCHAR) Module->Base + ImportModuleDirectory->Name; From 47335997a6689bb8516ab1b74803995d7ff830f5 Mon Sep 17 00:00:00 2001 From: Martin Fuchs Date: Thu, 27 Jan 2005 00:09:43 +0000 Subject: [PATCH 029/185] - rename some Explorer strings to IBrowser - fix child window size svn path=/trunk/; revision=13326 --- reactos/subsys/system/ibrowser/ibrowser.cpp | 2 +- .../subsys/system/ibrowser/ibrowser_intres.rc | 24 +++++++++---------- reactos/subsys/system/ibrowser/mainframe.cpp | 6 ++--- reactos/subsys/system/ibrowser/webchild.cpp | 2 +- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/reactos/subsys/system/ibrowser/ibrowser.cpp b/reactos/subsys/system/ibrowser/ibrowser.cpp index 7165a4e8946..064f7d5ed2c 100644 --- a/reactos/subsys/system/ibrowser/ibrowser.cpp +++ b/reactos/subsys/system/ibrowser/ibrowser.cpp @@ -370,7 +370,7 @@ PopupMenu::PopupMenu(UINT nid) } - /// "About Explorer" Dialog + /// "About" Dialog struct ExplorerAboutDlg : public CtlColorParent< OwnerDrawParent

diff --git a/reactos/subsys/system/ibrowser/ibrowser_intres.rc b/reactos/subsys/system/ibrowser/ibrowser_intres.rc index bdf80344995..a1857e6ade3 100644 --- a/reactos/subsys/system/ibrowser/ibrowser_intres.rc +++ b/reactos/subsys/system/ibrowser/ibrowser_intres.rc @@ -43,8 +43,8 @@ BEGIN END POPUP "&Ajutor" BEGIN - MENUITEM "Explorer &FAQ...", ID_IBROWSER_FAQ - MENUITEM "&Despre Explorer...", ID_ABOUT_IBROWSER + MENUITEM "IBrowser &FAQ...", ID_IBROWSER_FAQ + MENUITEM "&Despre IBrowser...", ID_ABOUT_IBROWSER MENUITEM "Despre &OS...", ID_ABOUT_WINDOWS END END @@ -116,8 +116,8 @@ BEGIN END POPUP "&Hilfe" BEGIN - MENUITEM "Explorer &FAQ...", ID_IBROWSER_FAQ - MENUITEM "&About Explorer...", ID_ABOUT_IBROWSER + MENUITEM "IBrowser &FAQ...", ID_IBROWSER_FAQ + MENUITEM "&About IBrowser...", ID_ABOUT_IBROWSER MENUITEM "About &OS...", ID_ABOUT_WINDOWS END END @@ -188,9 +188,9 @@ BEGIN "BEGIN\r\n" "IDS_VERSION_STR """"\r\n" "#ifdef UNICODE\r\n" - "IDS_IBROWSER_VERSION_STR ""ROS Explorer%0s""\r\n" + "IDS_IBROWSER_VERSION_STR ""ROS IBrowser%0s""\r\n" "#else\r\n" - "IDS_IBROWSER_VERSION_STR ""ROS Explorer Ansi%0s""\r\n" + "IDS_IBROWSER_VERSION_STR ""ROS IBrowser Ansi%0s""\r\n" "#endif\r\n" "END\r\n" "#endif\r\n" @@ -265,8 +265,8 @@ BEGIN END POPUP "&Help" BEGIN - MENUITEM "Explorer &FAQ...", ID_IBROWSER_FAQ - MENUITEM "&About Explorer...", ID_ABOUT_IBROWSER + MENUITEM "IBrowser &FAQ...", ID_IBROWSER_FAQ + MENUITEM "&About IBrowser...", ID_ABOUT_IBROWSER MENUITEM "About &OS...", ID_ABOUT_WINDOWS END END @@ -323,8 +323,8 @@ BEGIN END POPUP "&Ayuda" BEGIN - MENUITEM "Explorer &FAQ...", ID_IBROWSER_FAQ - MENUITEM "&Acerca de Explorer...", ID_ABOUT_IBROWSER + MENUITEM "IBrowser &FAQ...", ID_IBROWSER_FAQ + MENUITEM "&Acerca de IBrowser...", ID_ABOUT_IBROWSER MENUITEM "Acerca de &OS...", ID_ABOUT_WINDOWS END END @@ -386,9 +386,9 @@ STRINGTABLE DISCARDABLE BEGIN IDS_VERSION_STR "" #ifdef UNICODE -IDS_IBROWSER_VERSION_STR "ROS Explorer%0s" +IDS_IBROWSER_VERSION_STR "ROS IBrowser%0s" #else -IDS_IBROWSER_VERSION_STR "ROS Explorer Ansi%0s" +IDS_IBROWSER_VERSION_STR "ROS IBrowser Ansi%0s" #endif END #endif diff --git a/reactos/subsys/system/ibrowser/mainframe.cpp b/reactos/subsys/system/ibrowser/mainframe.cpp index ba34da97ec7..f6112bc10bb 100644 --- a/reactos/subsys/system/ibrowser/mainframe.cpp +++ b/reactos/subsys/system/ibrowser/mainframe.cpp @@ -672,9 +672,9 @@ LRESULT MainFrame::WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam) if (!url || !*url) #ifdef _DEBUG - url = _T("http://localhost"); + url = TEXT("http://localhost"); #else - url = _T("about:blank"); + url = TEXT("about:blank"); #endif if (!_right_hwnd) { @@ -764,7 +764,7 @@ void MainFrame::resize_children() } if (_right_hwnd) - hdwp = DeferWindowPos(hdwp, _right_hwnd, 0, _clnt_rect.left+cx+1, _clnt_rect.top, _clnt_rect.right-cx, _clnt_rect.bottom-_clnt_rect.top, SWP_NOZORDER|SWP_NOACTIVATE); + hdwp = DeferWindowPos(hdwp, _right_hwnd, 0, _clnt_rect.left+cx, _clnt_rect.top, _clnt_rect.right-cx, _clnt_rect.bottom-_clnt_rect.top, SWP_NOZORDER|SWP_NOACTIVATE); EndDeferWindowPos(hdwp); } diff --git a/reactos/subsys/system/ibrowser/webchild.cpp b/reactos/subsys/system/ibrowser/webchild.cpp index 78cc3c0f72a..4b4bb484b4c 100644 --- a/reactos/subsys/system/ibrowser/webchild.cpp +++ b/reactos/subsys/system/ibrowser/webchild.cpp @@ -222,8 +222,8 @@ WebChildWindow::WebChildWindow(HWND hwnd, const WebChildWndInfo& info) _connector = auto_ptr(new EventConnector(_control, DIID_DWebBrowserEvents2, this)); + // We need to call Navigate() here to initialize the browser control (see _browser_initialized) _control->Navigate(BStr(info._url), &vtMissing, &vtMissing, &vtMissing, &vtMissing); - //browser->Navigate2(&Variant(info._url), &vtMissing, &vtMissing, &vtMissing, &vtMissing); } } From 9e0b60cb02bee854acdadcbfccd17e2b06332dd2 Mon Sep 17 00:00:00 2001 From: Martin Fuchs Date: Thu, 27 Jan 2005 00:18:30 +0000 Subject: [PATCH 030/185] store start URL statically svn path=/trunk/; revision=13327 --- reactos/subsys/system/ibrowser/mainframe.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/reactos/subsys/system/ibrowser/mainframe.cpp b/reactos/subsys/system/ibrowser/mainframe.cpp index f6112bc10bb..35e2fb12d94 100644 --- a/reactos/subsys/system/ibrowser/mainframe.cpp +++ b/reactos/subsys/system/ibrowser/mainframe.cpp @@ -44,10 +44,8 @@ HWND MainFrameBase::Create(LPCTSTR url, UINT cmdshow) //@@hMainFrame = MainFrame::Create(url); if (hMainFrame) { - String sPath; - if (url) { - sPath = url; // copy url to avoid accessing freed memory + static String sPath = url; // copy url to avoid accessing freed memory url = sPath; } From 0fc75e8bd1af2e5ed992d6ef9e7e6cdde21c2bf5 Mon Sep 17 00:00:00 2001 From: Martin Fuchs Date: Thu, 27 Jan 2005 00:20:40 +0000 Subject: [PATCH 031/185] store startup path statically svn path=/trunk/; revision=13328 --- reactos/subsys/system/explorer/shell/mainframe.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/reactos/subsys/system/explorer/shell/mainframe.cpp b/reactos/subsys/system/explorer/shell/mainframe.cpp index 38df78cd364..fadbec1907a 100644 --- a/reactos/subsys/system/explorer/shell/mainframe.cpp +++ b/reactos/subsys/system/explorer/shell/mainframe.cpp @@ -50,13 +50,12 @@ HWND MainFrameBase::Create(LPCTSTR path, bool mdi, UINT cmdshow) hMainFrame = SDIMainFrame::Create(); if (hMainFrame) { - String sPath; HWND hwndOld = g_Globals._hMainWnd; g_Globals._hMainWnd = hMainFrame; if (path) { - sPath = path; // copy path to avoid accessing freed memory + static String sPath = path; // copy path to avoid accessing freed memory path = sPath; } From 002ed92443f0b34f1114805e77e4615afa4eb626 Mon Sep 17 00:00:00 2001 From: Martin Fuchs Date: Thu, 27 Jan 2005 00:21:34 +0000 Subject: [PATCH 032/185] fix typos svn path=/trunk/; revision=13329 --- reactos/subsys/system/explorer/explorer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reactos/subsys/system/explorer/explorer.cpp b/reactos/subsys/system/explorer/explorer.cpp index b55ed0aa4cd..8a7b5ddcc63 100644 --- a/reactos/subsys/system/explorer/explorer.cpp +++ b/reactos/subsys/system/explorer/explorer.cpp @@ -635,10 +635,10 @@ static void InitInstance(HINSTANCE hInstance) // register frame window class g_Globals._hframeClass = IconWindowClass(CLASSNAME_FRAME,IDI_EXPLORER); - // register child windows class + // register child window class WindowClass(CLASSNAME_CHILDWND, CS_CLASSDC|CS_DBLCLKS|CS_VREDRAW).Register(); - // register tree windows class + // register tree window class WindowClass(CLASSNAME_WINEFILETREE, CS_CLASSDC|CS_DBLCLKS|CS_VREDRAW).Register(); g_Globals._cfStrFName = RegisterClipboardFormat(CFSTR_FILENAME); From fb5a8b1c3ce615a0e28ed259d92538d20549d141 Mon Sep 17 00:00:00 2001 From: Thomas Bluemel Date: Thu, 27 Jan 2005 00:29:12 +0000 Subject: [PATCH 033/185] don't optimize reading/writing from/to vga memory away in optimized builds. this fixes bug #490 svn path=/trunk/; revision=13330 --- reactos/drivers/video/displays/vga/vgavideo/vgavideo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reactos/drivers/video/displays/vga/vgavideo/vgavideo.c b/reactos/drivers/video/displays/vga/vgavideo/vgavideo.c index 620dbfd7431..2f06df440a2 100644 --- a/reactos/drivers/video/displays/vga/vgavideo/vgavideo.c +++ b/reactos/drivers/video/displays/vga/vgavideo/vgavideo.c @@ -18,8 +18,8 @@ static unsigned char leftMask; static int byteCounter; static unsigned char rightMask; -#define READ_REGISTER_UCHAR(p) (*((PUCHAR)(p))) -#define WRITE_REGISTER_UCHAR(p,c) (*((PCHAR)(p))) = (c) +#define READ_REGISTER_UCHAR(p) (*((volatile UCHAR *)(p))) +#define WRITE_REGISTER_UCHAR(p,c) (*((volatile CHAR *)(p))) = (c) INT abs(INT nm) { From 15476f2d69b391ac900d8781452195d9c2cab34a Mon Sep 17 00:00:00 2001 From: Martin Fuchs Date: Thu, 27 Jan 2005 00:33:05 +0000 Subject: [PATCH 034/185] fix UNICODE command line handling for MinGW builds svn path=/trunk/; revision=13331 --- reactos/subsys/system/explorer/explorer.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/reactos/subsys/system/explorer/explorer.cpp b/reactos/subsys/system/explorer/explorer.cpp index 8a7b5ddcc63..90e91efff22 100644 --- a/reactos/subsys/system/explorer/explorer.cpp +++ b/reactos/subsys/system/explorer/explorer.cpp @@ -696,6 +696,9 @@ int main(int argc, char* argv[]) while(*cmdline && !_istspace(*cmdline)) ++cmdline; + while(_istspace(*cmdline)) + ++cmdline; + return wWinMain(GetModuleHandle(NULL), 0, cmdline, nShowCmd); } From f99bb4b97d68521584d1928342ecf3a14a370d00 Mon Sep 17 00:00:00 2001 From: Martin Fuchs Date: Thu, 27 Jan 2005 00:33:11 +0000 Subject: [PATCH 035/185] fix UNICODE command line handling for MinGW builds svn path=/trunk/; revision=13332 --- reactos/subsys/system/ibrowser/ibrowser.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/reactos/subsys/system/ibrowser/ibrowser.cpp b/reactos/subsys/system/ibrowser/ibrowser.cpp index 064f7d5ed2c..a70c3d57c98 100644 --- a/reactos/subsys/system/ibrowser/ibrowser.cpp +++ b/reactos/subsys/system/ibrowser/ibrowser.cpp @@ -482,6 +482,9 @@ int main(int argc, char* argv[]) while(*cmdline && !_istspace(*cmdline)) ++cmdline; + while(_istspace(*cmdline)) + ++cmdline; + return wWinMain(GetModuleHandle(NULL), 0, cmdline, nShowCmd); } From a84129a69ec8030cbfa9fcba57171899cc8193eb Mon Sep 17 00:00:00 2001 From: Thomas Bluemel Date: Thu, 27 Jan 2005 00:49:24 +0000 Subject: [PATCH 036/185] This patch removes the cursor location from the window station object and always uses it in the GDIDEVICE. Patch by tinus. Fixes bug #484 svn path=/trunk/; revision=13333 --- reactos/include/win32k/dc.h | 8 ++- reactos/subsys/win32k/eng/mouse.c | 39 ++++++------ reactos/subsys/win32k/include/cursoricon.h | 3 +- reactos/subsys/win32k/ntuser/cursoricon.c | 70 ++++++++++++++++++---- reactos/subsys/win32k/ntuser/input.c | 28 ++++----- reactos/subsys/win32k/ntuser/message.c | 6 +- reactos/subsys/win32k/ntuser/misc.c | 5 +- reactos/subsys/win32k/ntuser/winsta.c | 2 - 8 files changed, 100 insertions(+), 61 deletions(-) diff --git a/reactos/include/win32k/dc.h b/reactos/include/win32k/dc.h index 8de7bed3f93..d85424d2c2e 100644 --- a/reactos/include/win32k/dc.h +++ b/reactos/include/win32k/dc.h @@ -124,9 +124,6 @@ typedef struct _GDIPOINTER /* should stay private to ENG */ RECTL Exclude; /* required publicly for SPS_ACCEPT_EXCLUDE */ PGD_MOVEPOINTER MovePointer; ULONG Status; - UINT SafetyRemoveLevel; /* at what level was the cursor removed? - 0 for not removed */ - UINT SafetyRemoveCount; } GDIPOINTER, *PGDIPOINTER; typedef struct @@ -141,6 +138,11 @@ typedef struct PFILE_OBJECT VideoFileObject; GDIPOINTER Pointer; + + /* Stuff to keep track of software cursors; win32k gdi part */ + UINT SafetyRemoveLevel; /* at what level was the cursor removed? + 0 for not removed */ + UINT SafetyRemoveCount; } GDIDEVICE; /* Internal functions */ diff --git a/reactos/subsys/win32k/eng/mouse.c b/reactos/subsys/win32k/eng/mouse.c index 0bf3df28977..6ed83be1fbd 100644 --- a/reactos/subsys/win32k/eng/mouse.c +++ b/reactos/subsys/win32k/eng/mouse.c @@ -68,9 +68,9 @@ MouseSafetyOnDrawStart(SURFOBJ *SurfObj, LONG HazardX1, tmp = HazardY2; HazardY2 = HazardY1; HazardY1 = tmp; } - pgp->SafetyRemoveCount++; + ppdev->SafetyRemoveCount++; - if (pgp->SafetyRemoveLevel) + if (ppdev->SafetyRemoveLevel) { /* already hidden */ return FALSE; @@ -81,7 +81,7 @@ MouseSafetyOnDrawStart(SURFOBJ *SurfObj, LONG HazardX1, && pgp->Exclude.bottom >= HazardY1 && pgp->Exclude.top <= HazardY2) { - pgp->SafetyRemoveLevel = pgp->SafetyRemoveCount; + ppdev->SafetyRemoveLevel = ppdev->SafetyRemoveCount; if (pgp->MovePointer) pgp->MovePointer(SurfObj, -1, -1, NULL); else @@ -100,6 +100,8 @@ MouseSafetyOnDrawEnd(SURFOBJ *SurfObj) GDIDEVICE *ppdev; GDIPOINTER *pgp; + ASSERT(WinSta); + ASSERT(SurfObj != NULL); ppdev = GDIDEV(SurfObj); @@ -117,22 +119,16 @@ MouseSafetyOnDrawEnd(SURFOBJ *SurfObj) return FALSE; } - if (--pgp->SafetyRemoveCount >= pgp->SafetyRemoveLevel) + if (--ppdev->SafetyRemoveCount >= ppdev->SafetyRemoveLevel) { return FALSE; } - /* FIXME - this is wrong!!!!!! we must NOT access pgp->Pos from here, it's - a private field for ENG/driver. This will paint the cursor to the - wrong screen coordinates when a driver overrides DrvMovePointer()! - We should store the coordinates before calling Drv/EngMovePointer() - and Drv/EngSetPointerShape() separately in the GDIDEVICE structure - or somewhere where ntuser can access it! */ if (pgp->MovePointer) pgp->MovePointer(SurfObj, pgp->Pos.x, pgp->Pos.y, &pgp->Exclude); else EngMovePointer(SurfObj, pgp->Pos.x, pgp->Pos.y, &pgp->Exclude); - pgp->SafetyRemoveLevel = 0; + ppdev->SafetyRemoveLevel = 0; return(TRUE); } @@ -368,6 +364,8 @@ EngSetPointerShape( pgp->HotSpot.x = xHot; pgp->HotSpot.y = yHot; + /* Actually this should be set by 'the other side', but it would be + * done right after this. It helps IntShowMousePointer. */ if (x != -1) { pgp->Pos.x = x; @@ -472,14 +470,13 @@ EngSetPointerShape( if (prcl != NULL) { - prcl->left = pgp->Pos.x - pgp->HotSpot.x; - prcl->top = pgp->Pos.y - pgp->HotSpot.x; + prcl->left = x - pgp->HotSpot.x; + prcl->top = y - pgp->HotSpot.x; prcl->right = prcl->left + pgp->Size.cx; prcl->bottom = prcl->top + pgp->Size.cy; } - } - - /* FIXME - touch prcl when x == -1? */ + } else if (prcl != NULL) + prcl->left = prcl->top = prcl->right = prcl->bottom = -1; return SPS_ACCEPT_EXCLUDE; } @@ -509,19 +506,21 @@ EngMovePointer( IntHideMousePointer(ppdev, pso); if (x != -1) { + /* Actually this should be set by 'the other side', but it would be + * done right after this. It helps IntShowMousePointer. */ pgp->Pos.x = x; pgp->Pos.y = y; IntShowMousePointer(ppdev, pso); if (prcl != NULL) { - prcl->left = pgp->Pos.x - pgp->HotSpot.x; - prcl->top = pgp->Pos.y - pgp->HotSpot.x; + prcl->left = x - pgp->HotSpot.x; + prcl->top = y - pgp->HotSpot.x; prcl->right = prcl->left + pgp->Size.cx; prcl->bottom = prcl->top + pgp->Size.cy; } - } + } else if (prcl != NULL) + prcl->left = prcl->top = prcl->right = prcl->bottom = -1; - /* FIXME - touch prcl when x == -1? */ } /* EOF */ diff --git a/reactos/subsys/win32k/include/cursoricon.h b/reactos/subsys/win32k/include/cursoricon.h index 8507630cc96..29dca570731 100644 --- a/reactos/subsys/win32k/include/cursoricon.h +++ b/reactos/subsys/win32k/include/cursoricon.h @@ -37,7 +37,6 @@ typedef struct _SYSTEM_CURSORINFO BOOL Enabled; BOOL SwapButtons; UINT ButtonsDown; - LONG x, y; FAST_MUTEX CursorMutex; CURSORCLIP_INFO CursorClipInfo; PCURICON_OBJECT CurrentCursorObject; @@ -57,6 +56,8 @@ PCURICON_OBJECT FASTCALL IntGetCurIconObject(PWINSTATION_OBJECT WinStaObject, HA PCURICON_OBJECT FASTCALL IntCreateCurIconHandle(PWINSTATION_OBJECT WinStaObject); VOID FASTCALL IntCleanupCurIcons(struct _EPROCESS *Process, PW32PROCESS Win32Process); +BOOL FASTCALL IntGetCursorLocation(PWINSTATION_OBJECT WinStaObject, POINT *loc); + #define IntGetSysCursorInfo(WinStaObj) \ (PSYSTEM_CURSORINFO)((WinStaObj)->SystemCursor) diff --git a/reactos/subsys/win32k/ntuser/cursoricon.c b/reactos/subsys/win32k/ntuser/cursoricon.c index d7157dc77d7..65fe5467d3b 100644 --- a/reactos/subsys/win32k/ntuser/cursoricon.c +++ b/reactos/subsys/win32k/ntuser/cursoricon.c @@ -42,6 +42,40 @@ static PAGED_LOOKASIDE_LIST ProcessLookasideList; static LIST_ENTRY CurIconList; static FAST_MUTEX CurIconListLock; +/* Look up the location of the cursor in the GDIDEVICE structure + * when all we know is the window station object + * Actually doesn't use the window station, but should... */ +BOOL FASTCALL +IntGetCursorLocation(PWINSTATION_OBJECT WinStaObject, POINT *loc) +{ + HDC hDC; + PDC dc; + HBITMAP hBitmap; + BITMAPOBJ *BitmapObj; + SURFOBJ *SurfObj; + +#if 1 + /* FIXME - get the screen dc from the window station or desktop */ + if (!(hDC = IntGetScreenDC())) + return FALSE; +#endif + + if (!(dc = DC_LockDc(hDC))) + return FALSE; + + hBitmap = dc->w.hBitmap; + DC_UnlockDc(hDC); + if (!(BitmapObj = BITMAPOBJ_LockBitmap(hBitmap))) + return FALSE; + + SurfObj = &BitmapObj->SurfObj; + loc->x = GDIDEV(SurfObj)->Pointer.Pos.x; + loc->y = GDIDEV(SurfObj)->Pointer.Pos.y; + + BITMAPOBJ_UnlockBitmap(hBitmap); + return TRUE; +} + PCURICON_OBJECT FASTCALL IntGetCurIconObject(PWINSTATION_OBJECT WinStaObject, HANDLE Handle) { @@ -116,10 +150,9 @@ IntSetCursor(PWINSTATION_OBJECT WinStaObject, PCURICON_OBJECT NewCursor, { /* Remove the cursor if it was displayed */ if (GDIDEV(SurfObj)->Pointer.MovePointer) - GDIDEV(SurfObj)->Pointer.MovePointer(SurfObj, -1, -1, NULL); + GDIDEV(SurfObj)->Pointer.MovePointer(SurfObj, -1, -1, &GDIDEV(SurfObj)->Pointer.Exclude); else - EngMovePointer(SurfObj, -1, -1, NULL); - GDIDEV(SurfObj)->Pointer.Exclude.right = -1; + EngMovePointer(SurfObj, -1, -1, &GDIDEV(SurfObj)->Pointer.Exclude); } GDIDEV(SurfObj)->Pointer.Status = SPS_ACCEPT_NOEXCLUDE; @@ -218,8 +251,8 @@ IntSetCursor(PWINSTATION_OBJECT WinStaObject, PCURICON_OBJECT NewCursor, SurfObj, soMask, soColor, XlateObj, NewCursor->IconInfo.xHotspot, NewCursor->IconInfo.yHotspot, - CurInfo->x, - CurInfo->y, + GDIDEV(SurfObj)->Pointer.Pos.x, + GDIDEV(SurfObj)->Pointer.Pos.y, &(GDIDEV(SurfObj)->Pointer.Exclude), SPS_CHANGE); DPRINT("SetCursor: DrvSetPointerShape() returned %x\n", @@ -236,8 +269,8 @@ IntSetCursor(PWINSTATION_OBJECT WinStaObject, PCURICON_OBJECT NewCursor, SurfObj, soMask, soColor, XlateObj, NewCursor->IconInfo.xHotspot, NewCursor->IconInfo.yHotspot, - CurInfo->x, - CurInfo->y, + GDIDEV(SurfObj)->Pointer.Pos.x, + GDIDEV(SurfObj)->Pointer.Pos.y, &(GDIDEV(SurfObj)->Pointer.Exclude), SPS_CHANGE); GDIDEV(SurfObj)->Pointer.MovePointer = EngMovePointer; @@ -760,6 +793,16 @@ NtUserGetCursorInfo( PWINSTATION_OBJECT WinStaObject; NTSTATUS Status; PCURICON_OBJECT CursorObject; + +#if 1 + HDC hDC; + + /* FIXME - get the screen dc from the window station or desktop */ + if (!(hDC = IntGetScreenDC())) + { + return FALSE; + } +#endif Status = MmCopyFromCaller(&SafeCi.cbSize, pci, sizeof(DWORD)); if(!NT_SUCCESS(Status)) @@ -785,9 +828,9 @@ NtUserGetCursorInfo( SafeCi.flags = ((CurInfo->ShowingCursor && CursorObject) ? CURSOR_SHOWING : 0); SafeCi.hCursor = (CursorObject ? (HCURSOR)CursorObject->Self : (HCURSOR)0); - SafeCi.ptScreenPos.x = CurInfo->x; - SafeCi.ptScreenPos.y = CurInfo->y; - + + IntGetCursorLocation(WinStaObject, &SafeCi.ptScreenPos); + Status = MmCopyToCaller(pci, &SafeCi, sizeof(CURSORINFO)); if(!NT_SUCCESS(Status)) { @@ -815,6 +858,7 @@ NtUserClipCursor( PSYSTEM_CURSORINFO CurInfo; RECT Rect; PWINDOW_OBJECT DesktopWindow = NULL; + POINT MousePos; WinStaObject = IntGetWinStaObj(); if (WinStaObject == NULL) @@ -830,6 +874,8 @@ NtUserClipCursor( } CurInfo = IntGetSysCursorInfo(WinStaObject); + IntGetCursorLocation(WinStaObject, &MousePos); + if(WinStaObject->ActiveDesktop) DesktopWindow = IntGetWindowObject(WinStaObject->ActiveDesktop->DesktopWindow); @@ -845,8 +891,8 @@ NtUserClipCursor( CurInfo->CursorClipInfo.Bottom = min(Rect.bottom - 1, DesktopWindow->WindowRect.bottom - 1); IntReleaseWindowObject(DesktopWindow); - mi.dx = CurInfo->x; - mi.dy = CurInfo->y; + mi.dx = MousePos.x; + mi.dy = MousePos.y; mi.mouseData = 0; mi.dwFlags = MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_MOVE; mi.time = 0; diff --git a/reactos/subsys/win32k/ntuser/input.c b/reactos/subsys/win32k/ntuser/input.c index 1544141599d..735f789e994 100644 --- a/reactos/subsys/win32k/ntuser/input.c +++ b/reactos/subsys/win32k/ntuser/input.c @@ -540,7 +540,7 @@ IntMouseInput(MOUSEINPUT *mi) const UINT SwapBtnMsg[2][2] = {{WM_LBUTTONDOWN, WM_RBUTTONDOWN}, {WM_LBUTTONUP, WM_RBUTTONUP}}; const WPARAM SwapBtn[2] = {MK_LBUTTON, MK_RBUTTON}; - POINT MousePos; + POINT MousePos, OrgPos; PSYSTEM_CURSORINFO CurInfo; PWINSTATION_OBJECT WinSta; BOOL DoMove, SwapButtons; @@ -586,8 +586,10 @@ IntMouseInput(MOUSEINPUT *mi) DoMove = FALSE; ExAcquireFastMutex(&CurInfo->CursorMutex); - MousePos.x = CurInfo->x; - MousePos.y = CurInfo->y; + IntGetCursorLocation(WinSta, &MousePos); + OrgPos.x = MousePos.x; + OrgPos.y = MousePos.y; + if(mi->dwFlags & MOUSEEVENTF_MOVE) { if(mi->dwFlags & MOUSEEVENTF_ABSOLUTE) @@ -631,12 +633,7 @@ IntMouseInput(MOUSEINPUT *mi) MousePos.y = (LONG)CurInfo->CursorClipInfo.Top; } - DoMove = (MousePos.x != CurInfo->x || MousePos.y != CurInfo->y); - if(DoMove) - { - CurInfo->x = MousePos.x; - CurInfo->y = MousePos.y; - } + DoMove = (MousePos.x != OrgPos.x || MousePos.y != OrgPos.y); } ExReleaseFastMutex(&CurInfo->CursorMutex); @@ -657,12 +654,13 @@ IntMouseInput(MOUSEINPUT *mi) if (GDIDEV(SurfObj)->Pointer.MovePointer) { GDIDEV(SurfObj)->Pointer.MovePointer(SurfObj, MousePos.x, MousePos.y, &(GDIDEV(SurfObj)->Pointer.Exclude)); - } - /* FIXME - That's a bad thing! We should't access private gdi pointer fields - from here. However it is required so MouseSafetyOnDrawEnd() can - properly paint the mouse cursor to the screen again. See the - comment in MouseSafetyOnDrawEnd() to fix this problem! */ - GDIDEV(SurfObj)->Pointer.Pos = MousePos; + } else { + EngMovePointer(SurfObj, MousePos.x, MousePos.y, &(GDIDEV(SurfObj)->Pointer.Exclude)); + } + /* Only now, update the info in the GDIDEVICE, so EngMovePointer can + * use the old values to move the pointer image */ + GDIDEV(SurfObj)->Pointer.Pos.x = MousePos.x; + GDIDEV(SurfObj)->Pointer.Pos.y = MousePos.y; BITMAPOBJ_UnlockBitmap(hBitmap); } diff --git a/reactos/subsys/win32k/ntuser/message.c b/reactos/subsys/win32k/ntuser/message.c index 32248449f6a..3ec02fa815a 100644 --- a/reactos/subsys/win32k/ntuser/message.c +++ b/reactos/subsys/win32k/ntuser/message.c @@ -1123,7 +1123,6 @@ NtUserPostMessage(HWND Wnd, } else { - PSYSTEM_CURSORINFO CurInfo; Window = IntGetWindowObject(Wnd); if (NULL == Window) { @@ -1149,9 +1148,8 @@ NtUserPostMessage(HWND Wnd, SetLastWin32Error(ERROR_INVALID_PARAMETER); return FALSE; } - CurInfo = IntGetSysCursorInfo(PsGetWin32Thread()->Desktop->WindowStation); - KernelModeMsg.pt.x = CurInfo->x; - KernelModeMsg.pt.y = CurInfo->y; + IntGetCursorLocation(PsGetWin32Thread()->Desktop->WindowStation, + &KernelModeMsg.pt); KeQueryTickCount(&LargeTickCount); KernelModeMsg.time = LargeTickCount.u.LowPart; MsqPostMessage(Window->MessageQueue, &KernelModeMsg, diff --git a/reactos/subsys/win32k/ntuser/misc.c b/reactos/subsys/win32k/ntuser/misc.c index a0d666297d4..b8acc8802d1 100644 --- a/reactos/subsys/win32k/ntuser/misc.c +++ b/reactos/subsys/win32k/ntuser/misc.c @@ -263,7 +263,6 @@ NtUserCallOneParam( case ONEPARAM_ROUTINE_GETCURSORPOSITION: { - PSYSTEM_CURSORINFO CurInfo; PWINSTATION_OBJECT WinStaObject; NTSTATUS Status; POINT Pos; @@ -277,10 +276,8 @@ NtUserCallOneParam( if (!NT_SUCCESS(Status)) return (DWORD)FALSE; - CurInfo = IntGetSysCursorInfo(WinStaObject); /* FIXME - check if process has WINSTA_READATTRIBUTES */ - Pos.x = CurInfo->x; - Pos.y = CurInfo->y; + IntGetCursorLocation(WinStaObject, &Pos); Status = MmCopyToCaller((PPOINT)Param, &Pos, sizeof(POINT)); if(!NT_SUCCESS(Status)) diff --git a/reactos/subsys/win32k/ntuser/winsta.c b/reactos/subsys/win32k/ntuser/winsta.c index 8d87948e2b6..76755d5ff30 100644 --- a/reactos/subsys/win32k/ntuser/winsta.c +++ b/reactos/subsys/win32k/ntuser/winsta.c @@ -389,8 +389,6 @@ NtUserCreateWindowStation( ExInitializeFastMutex(&CurInfo->CursorMutex); CurInfo->Enabled = FALSE; CurInfo->ButtonsDown = 0; - CurInfo->x = (LONG)0; - CurInfo->y = (LONG)0; CurInfo->CursorClipInfo.IsClipped = FALSE; CurInfo->LastBtnDown = 0; CurInfo->CurrentCursorObject = NULL; From 46a940fddb7b77bd4ec87ae47892d3311d8b140b Mon Sep 17 00:00:00 2001 From: Martin Fuchs Date: Thu, 27 Jan 2005 01:03:37 +0000 Subject: [PATCH 037/185] move address bar into top rebar svn path=/trunk/; revision=13334 --- reactos/subsys/system/ibrowser/mainframe.cpp | 25 +++++++------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/reactos/subsys/system/ibrowser/mainframe.cpp b/reactos/subsys/system/ibrowser/mainframe.cpp index 35e2fb12d94..d33c9ece145 100644 --- a/reactos/subsys/system/ibrowser/mainframe.cpp +++ b/reactos/subsys/system/ibrowser/mainframe.cpp @@ -124,7 +124,7 @@ MainFrameBase::MainFrameBase(HWND hwnd) CheckMenuItem(_menu_info._hMenuView, ID_VIEW_SIDE_BAR, MF_BYCOMMAND|MF_UNCHECKED/*MF_CHECKED*/); - // create rebar window to manage toolbar and drivebar + // create rebar window to manage toolbar and address bar #ifndef _NO_REBAR _hwndrebar = CreateWindowEx(WS_EX_TOOLWINDOW, REBARCLASSNAME, NULL, WS_CHILD|WS_VISIBLE|WS_CLIPSIBLINGS|WS_CLIPCHILDREN| @@ -149,10 +149,17 @@ MainFrameBase::MainFrameBase(HWND hwnd) rbBand.cyMaxChild = 0; rbBand.cyIntegral = btn_hgt; - rbBand.lpText = NULL;//TEXT("Toolbar"); + rbBand.lpText = TEXT("Toolbar"); rbBand.hwndChild = _htoolbar; rbBand.cxMinChild = 0; rbBand.cyMinChild = btn_hgt + 4; + rbBand.cx = 182; + SendMessage(_hwndrebar, RB_INSERTBAND, (WPARAM)-1, (LPARAM)&rbBand); + + rbBand.lpText = TEXT("Address"); + rbBand.hwndChild = _haddressedit; + rbBand.cxMinChild = 0; + rbBand.cyMinChild = btn_hgt - 2; rbBand.cx = 284; SendMessage(_hwndrebar, RB_INSERTBAND, (WPARAM)-1, (LPARAM)&rbBand); #endif @@ -395,13 +402,6 @@ void MainFrameBase::resize_frame(int cx, int cy) rect.bottom -= rt.bottom; } - if (IsWindowVisible(_haddressedit)) { - ClientRect rt(_haddressedit); - rect.bottom -= rt.bottom; - - SetWindowPos(_haddressedit, 0, 0, rect.bottom, rect.right-rect.left, rt.bottom, SWP_NOACTIVATE|SWP_NOZORDER); - } - if (IsWindowVisible(_hsidebar)) { WindowRect rt(_hsidebar); rect.left += rt.right-rt.left; @@ -727,13 +727,6 @@ void MainFrame::resize_frame(int cx, int cy) rect.bottom -= rt.bottom; } - if (IsWindowVisible(_haddressedit)) { - ClientRect rt(_haddressedit); - rect.bottom -= rt.bottom; - - SetWindowPos(_haddressedit, 0, 0, rect.bottom, rect.right-rect.left, rt.bottom, SWP_NOACTIVATE|SWP_NOZORDER); - } - if (IsWindowVisible(_hsidebar)) { WindowRect rt(_hsidebar); rect.left += rt.right-rt.left; From 6a5c36c54ad4d7b7a46c1002ce2b3248adf26241 Mon Sep 17 00:00:00 2001 From: Art Yerkes Date: Thu, 27 Jan 2005 04:15:14 +0000 Subject: [PATCH 038/185] There is no WinSta in here. svn path=/trunk/; revision=13335 --- reactos/subsys/win32k/eng/mouse.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/reactos/subsys/win32k/eng/mouse.c b/reactos/subsys/win32k/eng/mouse.c index 6ed83be1fbd..9d3ab01a73e 100644 --- a/reactos/subsys/win32k/eng/mouse.c +++ b/reactos/subsys/win32k/eng/mouse.c @@ -100,8 +100,6 @@ MouseSafetyOnDrawEnd(SURFOBJ *SurfObj) GDIDEVICE *ppdev; GDIPOINTER *pgp; - ASSERT(WinSta); - ASSERT(SurfObj != NULL); ppdev = GDIDEV(SurfObj); From 466fa48bd1449bdef6b3d82ddc48dc86c28c3e73 Mon Sep 17 00:00:00 2001 From: Thomas Bluemel Date: Thu, 27 Jan 2005 14:11:19 +0000 Subject: [PATCH 039/185] 1. fixed prototypes of NtQueryPerformanceCounter() and NtDelayExecution() and made them safely access buffers 2. moved the implementation of Sleep(Ex)() into more a appropriate file svn path=/trunk/; revision=13337 --- reactos/drivers/net/afd/afd/main.c | 2 - reactos/include/ntos/zw.h | 18 ++-- reactos/lib/kernel32/process/proc.c | 45 ---------- reactos/lib/kernel32/thread/thread.c | 45 ++++++++++ reactos/ntoskrnl/ke/timer.c | 124 ++++++++++++++++++--------- 5 files changed, 136 insertions(+), 98 deletions(-) diff --git a/reactos/drivers/net/afd/afd/main.c b/reactos/drivers/net/afd/afd/main.c index e12fe5488aa..25fde50d880 100644 --- a/reactos/drivers/net/afd/afd/main.c +++ b/reactos/drivers/net/afd/afd/main.c @@ -19,8 +19,6 @@ #ifdef DBG -extern NTSTATUS DDKAPI MmCopyFromCaller( PVOID Dst, PVOID Src, UINT Size ); - /* See debug.h for debug/trace constants */ //DWORD DebugTraceLevel = DEBUG_ULTRA; DWORD DebugTraceLevel = 0; diff --git a/reactos/include/ntos/zw.h b/reactos/include/ntos/zw.h index 5afa4421dc8..2682b07454d 100755 --- a/reactos/include/ntos/zw.h +++ b/reactos/include/ntos/zw.h @@ -3014,8 +3014,8 @@ ZwQueryMutant( /* * FUNCTION: Queries the system ( high-resolution ) performance counter. * ARGUMENTS: - * Counter = Performance counter - * Frequency = Performance frequency + * PerformanceCounter = Performance counter + * PerformanceFrequency = Performance frequency * REMARKS: This procedure queries a tick count faster than 10ms ( The resolution for Intel®-based CPUs is about 0.8 microseconds.) This procedure maps to the win32 QueryPerformanceCounter, QueryPerformanceFrequency @@ -3025,15 +3025,15 @@ ZwQueryMutant( NTSTATUS STDCALL NtQueryPerformanceCounter( - IN PLARGE_INTEGER Counter, - IN PLARGE_INTEGER Frequency + OUT PLARGE_INTEGER PerformanceCounter, + OUT PLARGE_INTEGER PerformanceFrequency OPTIONAL ); NTSTATUS STDCALL ZwQueryPerformanceCounter( - IN PLARGE_INTEGER Counter, - IN PLARGE_INTEGER Frequency + OUT PLARGE_INTEGER PerformanceCounter, + OUT PLARGE_INTEGER PerformanceFrequency OPTIONAL ); /* @@ -5240,8 +5240,8 @@ NtCreateThread( NTSTATUS STDCALL NtDelayExecution( - IN ULONG Alertable, - IN LARGE_INTEGER *Interval + IN BOOLEAN Alertable, + IN PLARGE_INTEGER DelayInterval ); /* @@ -6439,7 +6439,7 @@ NTSTATUS STDCALL ZwDelayExecution( IN BOOLEAN Alertable, - IN TIME *Interval + IN PLARGE_INTEGER DelayInterval ); /* diff --git a/reactos/lib/kernel32/process/proc.c b/reactos/lib/kernel32/process/proc.c index 104b837a3e6..83cf6788544 100644 --- a/reactos/lib/kernel32/process/proc.c +++ b/reactos/lib/kernel32/process/proc.c @@ -438,51 +438,6 @@ WaitForInputIdle ( } -/* - * @implemented - */ -VOID STDCALL -Sleep(DWORD dwMilliseconds) -{ - SleepEx(dwMilliseconds, FALSE); - return; -} - - -/* - * @implemented - */ -DWORD STDCALL -SleepEx(DWORD dwMilliseconds, - BOOL bAlertable) -{ - LARGE_INTEGER Interval; - NTSTATUS errCode; - - if (dwMilliseconds != INFINITE) - { - /* - * System time units are 100 nanoseconds (a nanosecond is a billionth of - * a second). - */ - Interval.QuadPart = -((ULONGLONG)dwMilliseconds * 10000); - } - else - { - /* Approximately 292000 years hence */ - Interval.QuadPart = -0x7FFFFFFFFFFFFFFFLL; - } - - errCode = NtDelayExecution (bAlertable, &Interval); - if (!NT_SUCCESS(errCode)) - { - SetLastErrorByStatus (errCode); - return -1; - } - return 0; -} - - /* * @implemented */ diff --git a/reactos/lib/kernel32/thread/thread.c b/reactos/lib/kernel32/thread/thread.c index 57124e35117..c273c65fd84 100644 --- a/reactos/lib/kernel32/thread/thread.c +++ b/reactos/lib/kernel32/thread/thread.c @@ -852,4 +852,49 @@ GetThreadIOPendingFlag(HANDLE hThread, return FALSE; } + +/* + * @implemented + */ +VOID STDCALL +Sleep(DWORD dwMilliseconds) +{ + SleepEx(dwMilliseconds, FALSE); + return; +} + + +/* + * @implemented + */ +DWORD STDCALL +SleepEx(DWORD dwMilliseconds, + BOOL bAlertable) +{ + LARGE_INTEGER Interval; + NTSTATUS errCode; + + if (dwMilliseconds != INFINITE) + { + /* + * System time units are 100 nanoseconds (a nanosecond is a billionth of + * a second). + */ + Interval.QuadPart = -((ULONGLONG)dwMilliseconds * 10000); + } + else + { + /* Approximately 292000 years hence */ + Interval.QuadPart = -0x7FFFFFFFFFFFFFFFLL; + } + + errCode = NtDelayExecution ((bAlertable ? TRUE : FALSE), &Interval); + if (!NT_SUCCESS(errCode)) + { + SetLastErrorByStatus (errCode); + return -1; + } + return 0; +} + /* EOF */ diff --git a/reactos/ntoskrnl/ke/timer.c b/reactos/ntoskrnl/ke/timer.c index 61a99c2d0a7..46ec4198975 100644 --- a/reactos/ntoskrnl/ke/timer.c +++ b/reactos/ntoskrnl/ke/timer.c @@ -71,8 +71,6 @@ static KDPC ExpireTimerDpc; /* must raise IRQL to PROFILE_LEVEL and grab spin lock there, to sync with ISR */ -extern HANDLE PsIdleThreadHandle; - #define MICROSECONDS_PER_TICK (10000) #define TICKS_TO_CALIBRATE (1) #define CALIBRATE_PERIOD (MICROSECONDS_PER_TICK * TICKS_TO_CALIBRATE) @@ -104,58 +102,100 @@ NtSetTimerResolution(IN ULONG DesiredResolution, NTSTATUS STDCALL -NtQueryPerformanceCounter(IN PLARGE_INTEGER Counter, - IN PLARGE_INTEGER Frequency) +NtQueryPerformanceCounter(OUT PLARGE_INTEGER PerformanceCounter, + OUT PLARGE_INTEGER PerformanceFrequency OPTIONAL) { LARGE_INTEGER PerfCounter; LARGE_INTEGER PerfFrequency; - NTSTATUS Status; - - PerfCounter = KeQueryPerformanceCounter(&PerfFrequency); - - if (Counter != NULL) - { - Status = MmCopyToCaller(&Counter->QuadPart, &PerfCounter.QuadPart, sizeof(PerfCounter.QuadPart)); - if (!NT_SUCCESS(Status)) - { - return(Status); - } - } - - if (Frequency != NULL) + KPROCESSOR_MODE PreviousMode; + NTSTATUS Status = STATUS_SUCCESS; + + PreviousMode = ExGetPreviousMode(); + + if(PreviousMode != KernelMode) { - Status = MmCopyToCaller(&Frequency->QuadPart, &PerfFrequency.QuadPart, sizeof(PerfFrequency.QuadPart)); - if (!NT_SUCCESS(Status)) - { - return(Status); - } + _SEH_TRY + { + ProbeForWrite(PerformanceCounter, + sizeof(LARGE_INTEGER), + sizeof(ULONG)); + if(PerformanceFrequency != NULL) + { + ProbeForWrite(PerformanceFrequency, + sizeof(LARGE_INTEGER), + sizeof(ULONG)); + } + } + _SEH_HANDLE + { + Status = _SEH_GetExceptionCode(); + } + _SEH_END; + + if(!NT_SUCCESS(Status)) + { + return Status; + } } - return(STATUS_SUCCESS); + PerfCounter = KeQueryPerformanceCounter(&PerfFrequency); + + _SEH_TRY + { + *PerformanceCounter = PerfCounter; + if(PerformanceFrequency != NULL) + { + *PerformanceFrequency = PerfFrequency; + } + } + _SEH_HANDLE + { + Status = _SEH_GetExceptionCode(); + } + _SEH_END; + + return Status; } NTSTATUS STDCALL -NtDelayExecution(IN ULONG Alertable, - IN LARGE_INTEGER* Interval) +NtDelayExecution(IN BOOLEAN Alertable, + IN PLARGE_INTEGER DelayInterval) { - NTSTATUS Status; - LARGE_INTEGER Timeout; - - Status = MmCopyFromCaller(&Timeout, Interval, sizeof(Timeout)); - if (!NT_SUCCESS(Status)) - { - return(Status); - } - - Timeout = *((PLARGE_INTEGER)Interval); - DPRINT("NtDelayExecution(Alertable %d, Internal %x) IntervalP %x\n", - Alertable, Internal, Timeout); + KPROCESSOR_MODE PreviousMode; + LARGE_INTEGER SafeInterval; - DPRINT("Execution delay is %d/%d\n", - Timeout.u.HighPart, Timeout.u.LowPart); - Status = KeDelayExecutionThread(UserMode, (BOOLEAN)Alertable, &Timeout); - return(Status); + PreviousMode = ExGetPreviousMode(); + + if(PreviousMode != KernelMode) + { + NTSTATUS Status = STATUS_SUCCESS; + + _SEH_TRY + { + ProbeForRead(DelayInterval, + sizeof(LARGE_INTEGER), + sizeof(ULONG)); + /* make a copy on the kernel stack and let DelayInterval point to it so + we don't need to wrap KeDelayExecutionThread in SEH! */ + SafeInterval = *DelayInterval; + DelayInterval = &SafeInterval; + } + _SEH_HANDLE + { + Status = _SEH_GetExceptionCode(); + } + _SEH_END; + + if(!NT_SUCCESS(Status)) + { + return Status; + } + } + + return KeDelayExecutionThread(PreviousMode, + Alertable, + DelayInterval); } From 2829fb845f4c18ff573f8b10eb8307ab73b7778e Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Thu, 27 Jan 2005 15:28:08 +0000 Subject: [PATCH 040/185] CreateNamedPipeW(): Set access rights according to the given open mode. svn path=/trunk/; revision=13338 --- reactos/lib/kernel32/file/npipe.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/reactos/lib/kernel32/file/npipe.c b/reactos/lib/kernel32/file/npipe.c index b2bb35f2341..32a8e7d8cb9 100644 --- a/reactos/lib/kernel32/file/npipe.c +++ b/reactos/lib/kernel32/file/npipe.c @@ -123,14 +123,17 @@ CreateNamedPipeW(LPCWSTR lpName, if (dwOpenMode & PIPE_ACCESS_DUPLEX) { CreateOptions = CreateOptions | FILE_PIPE_FULL_DUPLEX; + DesiredAccess |= (FILE_GENERIC_READ | FILE_GENERIC_WRITE); } else if (dwOpenMode & PIPE_ACCESS_INBOUND) { CreateOptions = CreateOptions | FILE_PIPE_INBOUND; + DesiredAccess |= FILE_GENERIC_READ; } else if (dwOpenMode & PIPE_ACCESS_OUTBOUND) { CreateOptions = CreateOptions | FILE_PIPE_OUTBOUND; + DesiredAccess |= FILE_GENERIC_WRITE; } if (dwPipeMode & PIPE_TYPE_BYTE) From 60d9e9aa6745f868d7c6c7deada47b8e9e60e89d Mon Sep 17 00:00:00 2001 From: Mike Nordell Date: Thu, 27 Jan 2005 21:12:05 +0000 Subject: [PATCH 041/185] Help freeloader stop crashing from divide-by-zero, provoked by drain-bamaged BIOS. svn path=/trunk/; revision=13339 --- reactos/boot/freeldr/freeldr/arch/i386/pcdisk.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/reactos/boot/freeldr/freeldr/arch/i386/pcdisk.c b/reactos/boot/freeldr/freeldr/arch/i386/pcdisk.c index b915141c399..af2a8930cd0 100644 --- a/reactos/boot/freeldr/freeldr/arch/i386/pcdisk.c +++ b/reactos/boot/freeldr/freeldr/arch/i386/pcdisk.c @@ -146,7 +146,9 @@ static BOOL PcDiskReadLogicalSectorsCHS(U32 DriveNumber, U64 SectorNumber, U32 S // // Get the drive geometry // - if (!MachDiskGetDriveGeometry(DriveNumber, &DriveGeometry)) + if (!MachDiskGetDriveGeometry(DriveNumber, &DriveGeometry) || + DriveGeometry.Sectors == 0 || + DriveGeometry.Heads == 0) { return FALSE; } From b9d18ec3d7c0847eb1a7142d1e53276fd58bbe5b Mon Sep 17 00:00:00 2001 From: Gunnar Dalsnes Date: Thu, 27 Jan 2005 21:16:41 +0000 Subject: [PATCH 042/185] build msvcrt and crtdll from same source via lib\crt fix problem with scanf/printf reading/printing doubles svn path=/trunk/; revision=13340 --- reactos/lib/msvcrt/Makefile | 464 +------- reactos/lib/msvcrt/README.txt | 13 - reactos/lib/msvcrt/conio/cgets.c | 74 -- reactos/lib/msvcrt/conio/cprintf.c | 28 - reactos/lib/msvcrt/conio/cputs.c | 28 - reactos/lib/msvcrt/conio/cscanf.c | 29 - reactos/lib/msvcrt/conio/getch.c | 54 - reactos/lib/msvcrt/conio/getche.c | 31 - reactos/lib/msvcrt/conio/kbhit.c | 33 - reactos/lib/msvcrt/conio/putch.c | 25 - reactos/lib/msvcrt/conio/ungetch.c | 32 - reactos/lib/msvcrt/ctype/ctype.c | 271 ----- reactos/lib/msvcrt/ctype/isalnum.c | 29 - reactos/lib/msvcrt/ctype/isalpha.c | 31 - reactos/lib/msvcrt/ctype/isascii.c | 27 - reactos/lib/msvcrt/ctype/iscntrl.c | 27 - reactos/lib/msvcrt/ctype/iscsym.c | 27 - reactos/lib/msvcrt/ctype/isctype.c | 60 - reactos/lib/msvcrt/ctype/isdigit.c | 28 - reactos/lib/msvcrt/ctype/isgraph.c | 27 - reactos/lib/msvcrt/ctype/islower.c | 27 - reactos/lib/msvcrt/ctype/isprint.c | 26 - reactos/lib/msvcrt/ctype/ispunct.c | 27 - reactos/lib/msvcrt/ctype/isspace.c | 30 - reactos/lib/msvcrt/ctype/isupper.c | 26 - reactos/lib/msvcrt/ctype/isxdigit.c | 28 - reactos/lib/msvcrt/ctype/toascii.c | 17 - reactos/lib/msvcrt/ctype/tolower.c | 51 - reactos/lib/msvcrt/ctype/toupper.c | 47 - reactos/lib/msvcrt/direct/chdir.c | 16 - reactos/lib/msvcrt/direct/chdrive.c | 34 - reactos/lib/msvcrt/direct/getcwd.c | 31 - reactos/lib/msvcrt/direct/getdcwd.c | 27 - reactos/lib/msvcrt/direct/getdfree.c | 23 - reactos/lib/msvcrt/direct/getdrive.c | 30 - reactos/lib/msvcrt/direct/mkdir.c | 16 - reactos/lib/msvcrt/direct/rmdir.c | 16 - reactos/lib/msvcrt/direct/wchdir.c | 17 - reactos/lib/msvcrt/direct/wgetcwd.c | 28 - reactos/lib/msvcrt/direct/wgetdcwd.c | 32 - reactos/lib/msvcrt/direct/wmkdir.c | 16 - reactos/lib/msvcrt/direct/wrmdir.c | 16 - reactos/lib/msvcrt/{misc => }/dllmain.c | 6 +- reactos/lib/msvcrt/except/abnorter.c | 18 - reactos/lib/msvcrt/except/exhand2.c | 33 - reactos/lib/msvcrt/except/matherr.c | 42 - reactos/lib/msvcrt/except/seh.s | 379 ------ reactos/lib/msvcrt/except/unwind.c | 76 -- reactos/lib/msvcrt/except/xcptfil.c | 15 - reactos/lib/msvcrt/float/chgsign.c | 23 - reactos/lib/msvcrt/float/clearfp.c | 17 - reactos/lib/msvcrt/float/cntrlfp.c | 174 --- reactos/lib/msvcrt/float/copysign.c | 26 - reactos/lib/msvcrt/float/fpclass.c | 71 -- reactos/lib/msvcrt/float/fpecode.c | 14 - reactos/lib/msvcrt/float/fpreset.c | 12 - reactos/lib/msvcrt/float/isnan.c | 98 -- reactos/lib/msvcrt/float/logb.c | 34 - reactos/lib/msvcrt/float/nafter.c | 16 - reactos/lib/msvcrt/float/scalb.c | 20 - reactos/lib/msvcrt/float/statfp.c | 19 - reactos/lib/msvcrt/io/access.c | 33 - reactos/lib/msvcrt/io/chmod.c | 46 - reactos/lib/msvcrt/io/chsize.c | 18 - reactos/lib/msvcrt/io/close.c | 19 - reactos/lib/msvcrt/io/commit.c | 18 - reactos/lib/msvcrt/io/create.c | 15 - reactos/lib/msvcrt/io/dup.c | 40 - reactos/lib/msvcrt/io/dup2.c | 10 - reactos/lib/msvcrt/io/eof.c | 17 - reactos/lib/msvcrt/io/filelen.c | 20 - reactos/lib/msvcrt/io/fileleni.c | 22 - reactos/lib/msvcrt/io/find.c | 89 -- reactos/lib/msvcrt/io/fmode.c | 14 - reactos/lib/msvcrt/io/isatty.c | 19 - reactos/lib/msvcrt/io/locking.c | 20 - reactos/lib/msvcrt/io/lseek.c | 20 - reactos/lib/msvcrt/io/lseeki64.c | 42 - reactos/lib/msvcrt/io/mktemp.c | 78 -- reactos/lib/msvcrt/io/open.c | 423 ------- reactos/lib/msvcrt/io/pipe.c | 51 - reactos/lib/msvcrt/io/read.c | 102 -- reactos/lib/msvcrt/io/setmode.c | 27 - reactos/lib/msvcrt/io/sopen.c | 10 - reactos/lib/msvcrt/io/stubs.c | 1 - reactos/lib/msvcrt/io/tell.c | 12 - reactos/lib/msvcrt/io/telli64.c | 11 - reactos/lib/msvcrt/io/umask.c | 14 - reactos/lib/msvcrt/io/unlink.c | 29 - reactos/lib/msvcrt/io/utime.c | 25 - reactos/lib/msvcrt/io/waccess.c | 32 - reactos/lib/msvcrt/io/wchmod.c | 47 - reactos/lib/msvcrt/io/wcreate.c | 15 - reactos/lib/msvcrt/io/wfind.c | 226 ---- reactos/lib/msvcrt/io/wmktemp.c | 78 -- reactos/lib/msvcrt/io/wopen.c | 148 --- reactos/lib/msvcrt/io/write.c | 103 -- reactos/lib/msvcrt/io/wunlink.c | 29 - reactos/lib/msvcrt/io/wutime.c | 25 - reactos/lib/msvcrt/locale/locale.c | 203 ---- reactos/lib/msvcrt/math/acos.c | 27 - reactos/lib/msvcrt/math/adjust.c | 7 - reactos/lib/msvcrt/math/asin.c | 27 - reactos/lib/msvcrt/math/atan.c | 37 - reactos/lib/msvcrt/math/atan2.c | 21 - reactos/lib/msvcrt/math/cabs.c | 14 - reactos/lib/msvcrt/math/ceil.c | 21 - reactos/lib/msvcrt/math/cos.c | 19 - reactos/lib/msvcrt/math/cosh.c | 12 - reactos/lib/msvcrt/math/exp.c | 47 - reactos/lib/msvcrt/math/fabs.c | 36 - reactos/lib/msvcrt/math/floor.c | 40 - reactos/lib/msvcrt/math/fmod.c | 39 - reactos/lib/msvcrt/math/frexp.c | 29 - reactos/lib/msvcrt/math/huge_val.c | 6 - reactos/lib/msvcrt/math/hypot.c | 101 -- reactos/lib/msvcrt/math/j0_y0.c | 18 - reactos/lib/msvcrt/math/j1_y1.c | 18 - reactos/lib/msvcrt/math/jn_yn.c | 18 - reactos/lib/msvcrt/math/ldexp.c | 36 - reactos/lib/msvcrt/math/log.c | 38 - reactos/lib/msvcrt/math/log10.c | 38 - reactos/lib/msvcrt/math/math.c | 120 -- reactos/lib/msvcrt/math/modf.c | 158 --- reactos/lib/msvcrt/math/pow.c | 97 -- reactos/lib/msvcrt/math/sin.c | 36 - reactos/lib/msvcrt/math/sinh.c | 19 - reactos/lib/msvcrt/math/sqrt.c | 35 - reactos/lib/msvcrt/math/stubs.c | 133 --- reactos/lib/msvcrt/math/tan.c | 37 - reactos/lib/msvcrt/math/tanh.c | 20 - reactos/lib/msvcrt/mbstring/hanzen.c | 107 -- reactos/lib/msvcrt/mbstring/ischira.c | 46 - reactos/lib/msvcrt/mbstring/iskana.c | 20 - reactos/lib/msvcrt/mbstring/iskmoji.c | 6 - reactos/lib/msvcrt/mbstring/iskpun.c | 18 - reactos/lib/msvcrt/mbstring/islead.c | 11 - reactos/lib/msvcrt/mbstring/islwr.c | 27 - reactos/lib/msvcrt/mbstring/ismbal.c | 20 - reactos/lib/msvcrt/mbstring/ismbaln.c | 12 - reactos/lib/msvcrt/mbstring/ismbc.c | 135 --- reactos/lib/msvcrt/mbstring/ismbgra.c | 11 - reactos/lib/msvcrt/mbstring/ismbkaln.c | 19 - reactos/lib/msvcrt/mbstring/ismblead.c | 65 - reactos/lib/msvcrt/mbstring/ismbpri.c | 11 - reactos/lib/msvcrt/mbstring/ismbpun.c | 18 - reactos/lib/msvcrt/mbstring/ismbtrl.c | 45 - reactos/lib/msvcrt/mbstring/isuppr.c | 27 - reactos/lib/msvcrt/mbstring/jistojms.c | 27 - reactos/lib/msvcrt/mbstring/jmstojis.c | 28 - reactos/lib/msvcrt/mbstring/mbbtype.c | 52 - reactos/lib/msvcrt/mbstring/mbccpy.c | 15 - reactos/lib/msvcrt/mbstring/mbclen.c | 33 - reactos/lib/msvcrt/mbstring/mbscat.c | 9 - reactos/lib/msvcrt/mbstring/mbschr.c | 9 - reactos/lib/msvcrt/mbstring/mbscmp.c | 10 - reactos/lib/msvcrt/mbstring/mbscoll.c | 100 -- reactos/lib/msvcrt/mbstring/mbscpy.c | 10 - reactos/lib/msvcrt/mbstring/mbscspn.c | 23 - reactos/lib/msvcrt/mbstring/mbsdec.c | 17 - reactos/lib/msvcrt/mbstring/mbsdup.c | 28 - reactos/lib/msvcrt/mbstring/mbsicmp.c | 65 - reactos/lib/msvcrt/mbstring/mbsicoll.c | 58 - reactos/lib/msvcrt/mbstring/mbsinc.c | 13 - reactos/lib/msvcrt/mbstring/mbslen.c | 18 - reactos/lib/msvcrt/mbstring/mbslwr.c | 45 - reactos/lib/msvcrt/mbstring/mbsncat.c | 64 - reactos/lib/msvcrt/mbstring/mbsnccnt.c | 35 - reactos/lib/msvcrt/mbstring/mbsncmp.c | 109 -- reactos/lib/msvcrt/mbstring/mbsncoll.c | 115 -- reactos/lib/msvcrt/mbstring/mbsncpy.c | 91 -- reactos/lib/msvcrt/mbstring/mbsnextc.c | 19 - reactos/lib/msvcrt/mbstring/mbsnicmp.c | 47 - reactos/lib/msvcrt/mbstring/mbsnicoll.c | 17 - reactos/lib/msvcrt/mbstring/mbsninc.c | 16 - reactos/lib/msvcrt/mbstring/mbsnset.c | 70 -- reactos/lib/msvcrt/mbstring/mbspbrk.c | 25 - reactos/lib/msvcrt/mbstring/mbsrchr.c | 33 - reactos/lib/msvcrt/mbstring/mbsrev.c | 33 - reactos/lib/msvcrt/mbstring/mbsset.c | 40 - reactos/lib/msvcrt/mbstring/mbsspn.c | 20 - reactos/lib/msvcrt/mbstring/mbsspnp.c | 19 - reactos/lib/msvcrt/mbstring/mbsstr.c | 23 - reactos/lib/msvcrt/mbstring/mbstok.c | 56 - reactos/lib/msvcrt/mbstring/mbstrlen.c | 19 - reactos/lib/msvcrt/mbstring/mbsupr.c | 56 - reactos/lib/msvcrt/misc/amsg.c | 54 - reactos/lib/msvcrt/misc/assert.c | 17 - reactos/lib/msvcrt/misc/crtmain.c | 92 -- reactos/lib/msvcrt/misc/environ.c | 452 ------- reactos/lib/msvcrt/misc/getargs.c | 176 --- reactos/lib/msvcrt/misc/initterm.c | 20 - reactos/lib/msvcrt/misc/lock.c | 135 --- reactos/lib/msvcrt/misc/purecall.c | 10 - reactos/lib/msvcrt/misc/stubs.c | 113 -- reactos/lib/msvcrt/misc/tls.c | 100 -- reactos/lib/msvcrt/msvcrt.def | 16 +- reactos/lib/msvcrt/process/_cwait.c | 36 - reactos/lib/msvcrt/process/_system.c | 122 -- reactos/lib/msvcrt/process/dll.c | 41 - reactos/lib/msvcrt/process/process.c | 622 ---------- reactos/lib/msvcrt/process/procid.c | 11 - reactos/lib/msvcrt/process/thread.c | 26 - reactos/lib/msvcrt/process/threadid.c | 19 - reactos/lib/msvcrt/process/threadx.c | 48 - reactos/lib/msvcrt/search/lfind.c | 21 - reactos/lib/msvcrt/search/lsearch.c | 24 - reactos/lib/msvcrt/setjmp/i386/setjmp.s | 111 -- reactos/lib/msvcrt/signal/signal.c | 113 -- reactos/lib/msvcrt/stdio/allocfil.c | 101 -- reactos/lib/msvcrt/stdio/clearerr.c | 22 - reactos/lib/msvcrt/stdio/fclose.c | 54 - reactos/lib/msvcrt/stdio/fdopen.c | 57 - reactos/lib/msvcrt/stdio/feof.c | 22 - reactos/lib/msvcrt/stdio/ferror.c | 18 - reactos/lib/msvcrt/stdio/fflush.c | 119 -- reactos/lib/msvcrt/stdio/fgetc.c | 29 - reactos/lib/msvcrt/stdio/fgetchar.c | 38 - reactos/lib/msvcrt/stdio/fgetpos.c | 17 - reactos/lib/msvcrt/stdio/fgets.c | 47 - reactos/lib/msvcrt/stdio/fgetws.c | 58 - reactos/lib/msvcrt/stdio/filbuf.c | 125 -- reactos/lib/msvcrt/stdio/fileno.c | 17 - reactos/lib/msvcrt/stdio/flsbuf.c | 160 --- reactos/lib/msvcrt/stdio/fopen.c | 163 --- reactos/lib/msvcrt/stdio/fprintf.c | 62 - reactos/lib/msvcrt/stdio/fputc.c | 23 - reactos/lib/msvcrt/stdio/fputchar.c | 38 - reactos/lib/msvcrt/stdio/fputs.c | 95 -- reactos/lib/msvcrt/stdio/fread.c | 90 -- reactos/lib/msvcrt/stdio/freopen.c | 128 -- reactos/lib/msvcrt/stdio/fscanf.c | 65 - reactos/lib/msvcrt/stdio/fseek.c | 57 - reactos/lib/msvcrt/stdio/fsetpos.c | 18 - reactos/lib/msvcrt/stdio/fsopen.c | 183 --- reactos/lib/msvcrt/stdio/ftell.c | 48 - reactos/lib/msvcrt/stdio/fwalk.c | 18 - reactos/lib/msvcrt/stdio/fwrite.c | 114 -- reactos/lib/msvcrt/stdio/getc.c | 134 --- reactos/lib/msvcrt/stdio/getchar.c | 46 - reactos/lib/msvcrt/stdio/gets.c | 146 --- reactos/lib/msvcrt/stdio/getw.c | 39 - reactos/lib/msvcrt/stdio/perror.c | 26 - reactos/lib/msvcrt/stdio/popen.c | 224 ---- reactos/lib/msvcrt/stdio/printf.c | 50 - reactos/lib/msvcrt/stdio/putc.c | 146 --- reactos/lib/msvcrt/stdio/putchar.c | 38 - reactos/lib/msvcrt/stdio/puts.c | 35 - reactos/lib/msvcrt/stdio/putw.c | 34 - reactos/lib/msvcrt/stdio/remove.c | 30 - reactos/lib/msvcrt/stdio/rename.c | 18 - reactos/lib/msvcrt/stdio/rewind.c | 18 - reactos/lib/msvcrt/stdio/rmtmp.c | 72 -- reactos/lib/msvcrt/stdio/scanf.c | 64 - reactos/lib/msvcrt/stdio/setbuf.c | 15 - reactos/lib/msvcrt/stdio/setvbuf.c | 69 -- reactos/lib/msvcrt/stdio/sprintf.c | 96 -- reactos/lib/msvcrt/stdio/sscanf.c | 71 -- reactos/lib/msvcrt/stdio/stdhnd.c | 45 - reactos/lib/msvcrt/stdio/tempnam.c | 30 - reactos/lib/msvcrt/stdio/tmpfile.c | 70 -- reactos/lib/msvcrt/stdio/tmpnam.c | 19 - reactos/lib/msvcrt/stdio/ungetc.c | 76 -- reactos/lib/msvcrt/stdio/vfprintf.c | 1111 ----------------- reactos/lib/msvcrt/stdio/vfscanf.c | 1208 ------------------- reactos/lib/msvcrt/stdio/vfwprint.c | 1088 ----------------- reactos/lib/msvcrt/stdio/vprintf.c | 83 -- reactos/lib/msvcrt/stdio/vscanf.c | 34 - reactos/lib/msvcrt/stdio/vsprintf.c | 80 -- reactos/lib/msvcrt/stdio/vsscanf.c | 50 - reactos/lib/msvcrt/stdio/wfdopen.c | 57 - reactos/lib/msvcrt/stdio/wrename.c | 18 - reactos/lib/msvcrt/stdio/wtempnam.c | 25 - reactos/lib/msvcrt/stdio/wtmpnam.c | 19 - reactos/lib/msvcrt/stdlib/_exit.c | 58 - reactos/lib/msvcrt/stdlib/abort.c | 19 - reactos/lib/msvcrt/stdlib/abs.c | 12 - reactos/lib/msvcrt/stdlib/atexit.c | 59 - reactos/lib/msvcrt/stdlib/atof.c | 11 - reactos/lib/msvcrt/stdlib/atoi.c | 11 - reactos/lib/msvcrt/stdlib/atoi64.c | 34 - reactos/lib/msvcrt/stdlib/atol.c | 11 - reactos/lib/msvcrt/stdlib/atold.c | 8 - reactos/lib/msvcrt/stdlib/bsearch.c | 28 - reactos/lib/msvcrt/stdlib/div.c | 27 - reactos/lib/msvcrt/stdlib/doserrmap.h | 82 -- reactos/lib/msvcrt/stdlib/ecvt.c | 15 - reactos/lib/msvcrt/stdlib/ecvtbuf.c | 108 -- reactos/lib/msvcrt/stdlib/errno.c | 81 -- reactos/lib/msvcrt/stdlib/fcvt.c | 15 - reactos/lib/msvcrt/stdlib/fcvtbuf.c | 61 - reactos/lib/msvcrt/stdlib/fullpath.c | 26 - reactos/lib/msvcrt/stdlib/gcvt.c | 34 - reactos/lib/msvcrt/stdlib/getenv.c | 43 - reactos/lib/msvcrt/stdlib/itoa.c | 143 --- reactos/lib/msvcrt/stdlib/itow.c | 156 --- reactos/lib/msvcrt/stdlib/labs.c | 12 - reactos/lib/msvcrt/stdlib/ldiv.c | 28 - reactos/lib/msvcrt/stdlib/makepath.c | 36 - reactos/lib/msvcrt/stdlib/malloc.c | 118 -- reactos/lib/msvcrt/stdlib/mbstowcs.c | 123 -- reactos/lib/msvcrt/stdlib/mbtowc.c | 55 - reactos/lib/msvcrt/stdlib/obsol.c | 33 - reactos/lib/msvcrt/stdlib/putenv.c | 27 - reactos/lib/msvcrt/stdlib/qsort.c | 243 ---- reactos/lib/msvcrt/stdlib/rand.c | 34 - reactos/lib/msvcrt/stdlib/rot.c | 69 -- reactos/lib/msvcrt/stdlib/senv.c | 36 - reactos/lib/msvcrt/stdlib/splitp.c | 69 -- reactos/lib/msvcrt/stdlib/strtod.c | 100 -- reactos/lib/msvcrt/stdlib/strtol.c | 95 -- reactos/lib/msvcrt/stdlib/strtold.c | 126 -- reactos/lib/msvcrt/stdlib/strtoll.c | 84 -- reactos/lib/msvcrt/stdlib/strtoul.c | 77 -- reactos/lib/msvcrt/stdlib/strtoull.c | 76 -- reactos/lib/msvcrt/stdlib/swab.c | 18 - reactos/lib/msvcrt/stdlib/wcstod.c | 98 -- reactos/lib/msvcrt/stdlib/wcstol.c | 37 - reactos/lib/msvcrt/stdlib/wcstom.c | 20 - reactos/lib/msvcrt/stdlib/wcstomb.c | 118 -- reactos/lib/msvcrt/stdlib/wcstombs.c | 160 --- reactos/lib/msvcrt/stdlib/wcstoul.c | 104 -- reactos/lib/msvcrt/stdlib/wctomb.c | 151 --- reactos/lib/msvcrt/stdlib/wfulpath.c | 26 - reactos/lib/msvcrt/stdlib/witoa.c | 98 -- reactos/lib/msvcrt/stdlib/witow.c | 96 -- reactos/lib/msvcrt/stdlib/wmakpath.c | 37 - reactos/lib/msvcrt/stdlib/wputenv.c | 17 - reactos/lib/msvcrt/stdlib/wsenv.c | 35 - reactos/lib/msvcrt/stdlib/wsplitp.c | 69 -- reactos/lib/msvcrt/stdlib/wtoi.c | 17 - reactos/lib/msvcrt/stdlib/wtoi64.c | 31 - reactos/lib/msvcrt/string/lasttok.c | 19 - reactos/lib/msvcrt/string/memicmp.c | 23 - reactos/lib/msvcrt/string/strcoll.c | 36 - reactos/lib/msvcrt/string/strdup.c | 19 - reactos/lib/msvcrt/string/strerror.c | 114 -- reactos/lib/msvcrt/string/stricmp.c | 28 - reactos/lib/msvcrt/string/strlwr.c | 26 - reactos/lib/msvcrt/string/strncoll.c | 23 - reactos/lib/msvcrt/string/strnicmp.c | 20 - reactos/lib/msvcrt/string/strpbrk.c | 21 - reactos/lib/msvcrt/string/strrev.c | 22 - reactos/lib/msvcrt/string/strset.c | 35 - reactos/lib/msvcrt/string/strstr.c | 25 - reactos/lib/msvcrt/string/strtok.c | 64 - reactos/lib/msvcrt/string/strupr.c | 27 - reactos/lib/msvcrt/string/strxfrm.c | 24 - reactos/lib/msvcrt/sys_stat/fstat.c | 85 -- reactos/lib/msvcrt/sys_stat/fstati64.c | 86 -- reactos/lib/msvcrt/sys_stat/futime.c | 43 - reactos/lib/msvcrt/sys_stat/stat.c | 117 -- reactos/lib/msvcrt/sys_stat/wstat.c | 116 -- reactos/lib/msvcrt/time/clock.c | 32 - reactos/lib/msvcrt/time/ctime.c | 1439 ----------------------- reactos/lib/msvcrt/time/difftime.c | 11 - reactos/lib/msvcrt/time/ftime.c | 34 - reactos/lib/msvcrt/time/posixrul.h | 49 - reactos/lib/msvcrt/time/strdate.c | 33 - reactos/lib/msvcrt/time/strftime.c | 260 ---- reactos/lib/msvcrt/time/strtime.c | 33 - reactos/lib/msvcrt/time/time.c | 226 ---- reactos/lib/msvcrt/time/tz_vars.c | 21 - reactos/lib/msvcrt/time/tzfile.h | 160 --- reactos/lib/msvcrt/time/wctime.c | 75 -- reactos/lib/msvcrt/time/wstrdate.c | 33 - reactos/lib/msvcrt/time/wstrtime.c | 33 - reactos/lib/msvcrt/wine/cpp.c | 1251 -------------------- reactos/lib/msvcrt/wine/cppexcept.c | 443 ------- reactos/lib/msvcrt/wine/cppexcept.h | 124 -- reactos/lib/msvcrt/wine/eh.h | 53 - reactos/lib/msvcrt/wine/heap.c | 121 -- reactos/lib/msvcrt/wine/msvcrt.h | 128 -- reactos/lib/msvcrt/wine/thread.c | 108 -- reactos/lib/msvcrt/wstring/wcscoll.c | 38 - reactos/lib/msvcrt/wstring/wcscspn.c | 23 - reactos/lib/msvcrt/wstring/wcsdup.c | 21 - reactos/lib/msvcrt/wstring/wcsicmp.c | 20 - reactos/lib/msvcrt/wstring/wcslwr.c | 25 - reactos/lib/msvcrt/wstring/wcsnicmp.c | 17 - reactos/lib/msvcrt/wstring/wcspbrk.c | 19 - reactos/lib/msvcrt/wstring/wcsrev.c | 21 - reactos/lib/msvcrt/wstring/wcsset.c | 33 - reactos/lib/msvcrt/wstring/wcsspn.c | 23 - reactos/lib/msvcrt/wstring/wcsstr.c | 26 - reactos/lib/msvcrt/wstring/wcstok.c | 62 - reactos/lib/msvcrt/wstring/wcsupr.c | 16 - reactos/lib/msvcrt/wstring/wcsxfrm.c | 26 - reactos/lib/msvcrt/wstring/wlasttok.c | 14 - 389 files changed, 15 insertions(+), 27905 deletions(-) delete mode 100644 reactos/lib/msvcrt/README.txt delete mode 100644 reactos/lib/msvcrt/conio/cgets.c delete mode 100644 reactos/lib/msvcrt/conio/cprintf.c delete mode 100644 reactos/lib/msvcrt/conio/cputs.c delete mode 100644 reactos/lib/msvcrt/conio/cscanf.c delete mode 100644 reactos/lib/msvcrt/conio/getch.c delete mode 100644 reactos/lib/msvcrt/conio/getche.c delete mode 100644 reactos/lib/msvcrt/conio/kbhit.c delete mode 100644 reactos/lib/msvcrt/conio/putch.c delete mode 100644 reactos/lib/msvcrt/conio/ungetch.c delete mode 100644 reactos/lib/msvcrt/ctype/ctype.c delete mode 100644 reactos/lib/msvcrt/ctype/isalnum.c delete mode 100644 reactos/lib/msvcrt/ctype/isalpha.c delete mode 100644 reactos/lib/msvcrt/ctype/isascii.c delete mode 100644 reactos/lib/msvcrt/ctype/iscntrl.c delete mode 100644 reactos/lib/msvcrt/ctype/iscsym.c delete mode 100644 reactos/lib/msvcrt/ctype/isctype.c delete mode 100644 reactos/lib/msvcrt/ctype/isdigit.c delete mode 100644 reactos/lib/msvcrt/ctype/isgraph.c delete mode 100644 reactos/lib/msvcrt/ctype/islower.c delete mode 100644 reactos/lib/msvcrt/ctype/isprint.c delete mode 100644 reactos/lib/msvcrt/ctype/ispunct.c delete mode 100644 reactos/lib/msvcrt/ctype/isspace.c delete mode 100644 reactos/lib/msvcrt/ctype/isupper.c delete mode 100644 reactos/lib/msvcrt/ctype/isxdigit.c delete mode 100644 reactos/lib/msvcrt/ctype/toascii.c delete mode 100644 reactos/lib/msvcrt/ctype/tolower.c delete mode 100644 reactos/lib/msvcrt/ctype/toupper.c delete mode 100644 reactos/lib/msvcrt/direct/chdir.c delete mode 100644 reactos/lib/msvcrt/direct/chdrive.c delete mode 100644 reactos/lib/msvcrt/direct/getcwd.c delete mode 100644 reactos/lib/msvcrt/direct/getdcwd.c delete mode 100644 reactos/lib/msvcrt/direct/getdfree.c delete mode 100644 reactos/lib/msvcrt/direct/getdrive.c delete mode 100644 reactos/lib/msvcrt/direct/mkdir.c delete mode 100644 reactos/lib/msvcrt/direct/rmdir.c delete mode 100644 reactos/lib/msvcrt/direct/wchdir.c delete mode 100644 reactos/lib/msvcrt/direct/wgetcwd.c delete mode 100644 reactos/lib/msvcrt/direct/wgetdcwd.c delete mode 100644 reactos/lib/msvcrt/direct/wmkdir.c delete mode 100644 reactos/lib/msvcrt/direct/wrmdir.c rename reactos/lib/msvcrt/{misc => }/dllmain.c (96%) delete mode 100644 reactos/lib/msvcrt/except/abnorter.c delete mode 100644 reactos/lib/msvcrt/except/exhand2.c delete mode 100644 reactos/lib/msvcrt/except/matherr.c delete mode 100755 reactos/lib/msvcrt/except/seh.s delete mode 100644 reactos/lib/msvcrt/except/unwind.c delete mode 100644 reactos/lib/msvcrt/except/xcptfil.c delete mode 100644 reactos/lib/msvcrt/float/chgsign.c delete mode 100644 reactos/lib/msvcrt/float/clearfp.c delete mode 100644 reactos/lib/msvcrt/float/cntrlfp.c delete mode 100644 reactos/lib/msvcrt/float/copysign.c delete mode 100644 reactos/lib/msvcrt/float/fpclass.c delete mode 100644 reactos/lib/msvcrt/float/fpecode.c delete mode 100644 reactos/lib/msvcrt/float/fpreset.c delete mode 100644 reactos/lib/msvcrt/float/isnan.c delete mode 100644 reactos/lib/msvcrt/float/logb.c delete mode 100644 reactos/lib/msvcrt/float/nafter.c delete mode 100644 reactos/lib/msvcrt/float/scalb.c delete mode 100644 reactos/lib/msvcrt/float/statfp.c delete mode 100644 reactos/lib/msvcrt/io/access.c delete mode 100644 reactos/lib/msvcrt/io/chmod.c delete mode 100644 reactos/lib/msvcrt/io/chsize.c delete mode 100644 reactos/lib/msvcrt/io/close.c delete mode 100644 reactos/lib/msvcrt/io/commit.c delete mode 100644 reactos/lib/msvcrt/io/create.c delete mode 100644 reactos/lib/msvcrt/io/dup.c delete mode 100644 reactos/lib/msvcrt/io/dup2.c delete mode 100644 reactos/lib/msvcrt/io/eof.c delete mode 100644 reactos/lib/msvcrt/io/filelen.c delete mode 100644 reactos/lib/msvcrt/io/fileleni.c delete mode 100644 reactos/lib/msvcrt/io/find.c delete mode 100644 reactos/lib/msvcrt/io/fmode.c delete mode 100644 reactos/lib/msvcrt/io/isatty.c delete mode 100644 reactos/lib/msvcrt/io/locking.c delete mode 100644 reactos/lib/msvcrt/io/lseek.c delete mode 100644 reactos/lib/msvcrt/io/lseeki64.c delete mode 100644 reactos/lib/msvcrt/io/mktemp.c delete mode 100644 reactos/lib/msvcrt/io/open.c delete mode 100644 reactos/lib/msvcrt/io/pipe.c delete mode 100644 reactos/lib/msvcrt/io/read.c delete mode 100644 reactos/lib/msvcrt/io/setmode.c delete mode 100644 reactos/lib/msvcrt/io/sopen.c delete mode 100644 reactos/lib/msvcrt/io/stubs.c delete mode 100644 reactos/lib/msvcrt/io/tell.c delete mode 100644 reactos/lib/msvcrt/io/telli64.c delete mode 100644 reactos/lib/msvcrt/io/umask.c delete mode 100644 reactos/lib/msvcrt/io/unlink.c delete mode 100644 reactos/lib/msvcrt/io/utime.c delete mode 100644 reactos/lib/msvcrt/io/waccess.c delete mode 100644 reactos/lib/msvcrt/io/wchmod.c delete mode 100644 reactos/lib/msvcrt/io/wcreate.c delete mode 100644 reactos/lib/msvcrt/io/wfind.c delete mode 100644 reactos/lib/msvcrt/io/wmktemp.c delete mode 100644 reactos/lib/msvcrt/io/wopen.c delete mode 100644 reactos/lib/msvcrt/io/write.c delete mode 100644 reactos/lib/msvcrt/io/wunlink.c delete mode 100644 reactos/lib/msvcrt/io/wutime.c delete mode 100644 reactos/lib/msvcrt/locale/locale.c delete mode 100644 reactos/lib/msvcrt/math/acos.c delete mode 100644 reactos/lib/msvcrt/math/adjust.c delete mode 100644 reactos/lib/msvcrt/math/asin.c delete mode 100644 reactos/lib/msvcrt/math/atan.c delete mode 100644 reactos/lib/msvcrt/math/atan2.c delete mode 100644 reactos/lib/msvcrt/math/cabs.c delete mode 100644 reactos/lib/msvcrt/math/ceil.c delete mode 100644 reactos/lib/msvcrt/math/cos.c delete mode 100644 reactos/lib/msvcrt/math/cosh.c delete mode 100644 reactos/lib/msvcrt/math/exp.c delete mode 100644 reactos/lib/msvcrt/math/fabs.c delete mode 100644 reactos/lib/msvcrt/math/floor.c delete mode 100644 reactos/lib/msvcrt/math/fmod.c delete mode 100644 reactos/lib/msvcrt/math/frexp.c delete mode 100644 reactos/lib/msvcrt/math/huge_val.c delete mode 100644 reactos/lib/msvcrt/math/hypot.c delete mode 100644 reactos/lib/msvcrt/math/j0_y0.c delete mode 100644 reactos/lib/msvcrt/math/j1_y1.c delete mode 100644 reactos/lib/msvcrt/math/jn_yn.c delete mode 100644 reactos/lib/msvcrt/math/ldexp.c delete mode 100644 reactos/lib/msvcrt/math/log.c delete mode 100644 reactos/lib/msvcrt/math/log10.c delete mode 100644 reactos/lib/msvcrt/math/math.c delete mode 100644 reactos/lib/msvcrt/math/modf.c delete mode 100644 reactos/lib/msvcrt/math/pow.c delete mode 100644 reactos/lib/msvcrt/math/sin.c delete mode 100644 reactos/lib/msvcrt/math/sinh.c delete mode 100644 reactos/lib/msvcrt/math/sqrt.c delete mode 100644 reactos/lib/msvcrt/math/stubs.c delete mode 100644 reactos/lib/msvcrt/math/tan.c delete mode 100644 reactos/lib/msvcrt/math/tanh.c delete mode 100644 reactos/lib/msvcrt/mbstring/hanzen.c delete mode 100644 reactos/lib/msvcrt/mbstring/ischira.c delete mode 100644 reactos/lib/msvcrt/mbstring/iskana.c delete mode 100644 reactos/lib/msvcrt/mbstring/iskmoji.c delete mode 100644 reactos/lib/msvcrt/mbstring/iskpun.c delete mode 100644 reactos/lib/msvcrt/mbstring/islead.c delete mode 100644 reactos/lib/msvcrt/mbstring/islwr.c delete mode 100644 reactos/lib/msvcrt/mbstring/ismbal.c delete mode 100644 reactos/lib/msvcrt/mbstring/ismbaln.c delete mode 100644 reactos/lib/msvcrt/mbstring/ismbc.c delete mode 100644 reactos/lib/msvcrt/mbstring/ismbgra.c delete mode 100644 reactos/lib/msvcrt/mbstring/ismbkaln.c delete mode 100644 reactos/lib/msvcrt/mbstring/ismblead.c delete mode 100644 reactos/lib/msvcrt/mbstring/ismbpri.c delete mode 100644 reactos/lib/msvcrt/mbstring/ismbpun.c delete mode 100644 reactos/lib/msvcrt/mbstring/ismbtrl.c delete mode 100644 reactos/lib/msvcrt/mbstring/isuppr.c delete mode 100644 reactos/lib/msvcrt/mbstring/jistojms.c delete mode 100644 reactos/lib/msvcrt/mbstring/jmstojis.c delete mode 100644 reactos/lib/msvcrt/mbstring/mbbtype.c delete mode 100644 reactos/lib/msvcrt/mbstring/mbccpy.c delete mode 100644 reactos/lib/msvcrt/mbstring/mbclen.c delete mode 100644 reactos/lib/msvcrt/mbstring/mbscat.c delete mode 100644 reactos/lib/msvcrt/mbstring/mbschr.c delete mode 100644 reactos/lib/msvcrt/mbstring/mbscmp.c delete mode 100644 reactos/lib/msvcrt/mbstring/mbscoll.c delete mode 100644 reactos/lib/msvcrt/mbstring/mbscpy.c delete mode 100644 reactos/lib/msvcrt/mbstring/mbscspn.c delete mode 100644 reactos/lib/msvcrt/mbstring/mbsdec.c delete mode 100644 reactos/lib/msvcrt/mbstring/mbsdup.c delete mode 100644 reactos/lib/msvcrt/mbstring/mbsicmp.c delete mode 100644 reactos/lib/msvcrt/mbstring/mbsicoll.c delete mode 100644 reactos/lib/msvcrt/mbstring/mbsinc.c delete mode 100644 reactos/lib/msvcrt/mbstring/mbslen.c delete mode 100644 reactos/lib/msvcrt/mbstring/mbslwr.c delete mode 100644 reactos/lib/msvcrt/mbstring/mbsncat.c delete mode 100644 reactos/lib/msvcrt/mbstring/mbsnccnt.c delete mode 100644 reactos/lib/msvcrt/mbstring/mbsncmp.c delete mode 100644 reactos/lib/msvcrt/mbstring/mbsncoll.c delete mode 100644 reactos/lib/msvcrt/mbstring/mbsncpy.c delete mode 100644 reactos/lib/msvcrt/mbstring/mbsnextc.c delete mode 100644 reactos/lib/msvcrt/mbstring/mbsnicmp.c delete mode 100644 reactos/lib/msvcrt/mbstring/mbsnicoll.c delete mode 100644 reactos/lib/msvcrt/mbstring/mbsninc.c delete mode 100644 reactos/lib/msvcrt/mbstring/mbsnset.c delete mode 100644 reactos/lib/msvcrt/mbstring/mbspbrk.c delete mode 100644 reactos/lib/msvcrt/mbstring/mbsrchr.c delete mode 100644 reactos/lib/msvcrt/mbstring/mbsrev.c delete mode 100644 reactos/lib/msvcrt/mbstring/mbsset.c delete mode 100644 reactos/lib/msvcrt/mbstring/mbsspn.c delete mode 100644 reactos/lib/msvcrt/mbstring/mbsspnp.c delete mode 100644 reactos/lib/msvcrt/mbstring/mbsstr.c delete mode 100644 reactos/lib/msvcrt/mbstring/mbstok.c delete mode 100644 reactos/lib/msvcrt/mbstring/mbstrlen.c delete mode 100644 reactos/lib/msvcrt/mbstring/mbsupr.c delete mode 100644 reactos/lib/msvcrt/misc/amsg.c delete mode 100644 reactos/lib/msvcrt/misc/assert.c delete mode 100644 reactos/lib/msvcrt/misc/crtmain.c delete mode 100644 reactos/lib/msvcrt/misc/environ.c delete mode 100644 reactos/lib/msvcrt/misc/getargs.c delete mode 100644 reactos/lib/msvcrt/misc/initterm.c delete mode 100644 reactos/lib/msvcrt/misc/lock.c delete mode 100644 reactos/lib/msvcrt/misc/purecall.c delete mode 100644 reactos/lib/msvcrt/misc/stubs.c delete mode 100644 reactos/lib/msvcrt/misc/tls.c delete mode 100644 reactos/lib/msvcrt/process/_cwait.c delete mode 100644 reactos/lib/msvcrt/process/_system.c delete mode 100644 reactos/lib/msvcrt/process/dll.c delete mode 100644 reactos/lib/msvcrt/process/process.c delete mode 100644 reactos/lib/msvcrt/process/procid.c delete mode 100644 reactos/lib/msvcrt/process/thread.c delete mode 100644 reactos/lib/msvcrt/process/threadid.c delete mode 100644 reactos/lib/msvcrt/process/threadx.c delete mode 100644 reactos/lib/msvcrt/search/lfind.c delete mode 100644 reactos/lib/msvcrt/search/lsearch.c delete mode 100644 reactos/lib/msvcrt/setjmp/i386/setjmp.s delete mode 100644 reactos/lib/msvcrt/signal/signal.c delete mode 100644 reactos/lib/msvcrt/stdio/allocfil.c delete mode 100644 reactos/lib/msvcrt/stdio/clearerr.c delete mode 100644 reactos/lib/msvcrt/stdio/fclose.c delete mode 100644 reactos/lib/msvcrt/stdio/fdopen.c delete mode 100644 reactos/lib/msvcrt/stdio/feof.c delete mode 100644 reactos/lib/msvcrt/stdio/ferror.c delete mode 100644 reactos/lib/msvcrt/stdio/fflush.c delete mode 100644 reactos/lib/msvcrt/stdio/fgetc.c delete mode 100644 reactos/lib/msvcrt/stdio/fgetchar.c delete mode 100644 reactos/lib/msvcrt/stdio/fgetpos.c delete mode 100644 reactos/lib/msvcrt/stdio/fgets.c delete mode 100644 reactos/lib/msvcrt/stdio/fgetws.c delete mode 100644 reactos/lib/msvcrt/stdio/filbuf.c delete mode 100644 reactos/lib/msvcrt/stdio/fileno.c delete mode 100644 reactos/lib/msvcrt/stdio/flsbuf.c delete mode 100644 reactos/lib/msvcrt/stdio/fopen.c delete mode 100644 reactos/lib/msvcrt/stdio/fprintf.c delete mode 100644 reactos/lib/msvcrt/stdio/fputc.c delete mode 100644 reactos/lib/msvcrt/stdio/fputchar.c delete mode 100644 reactos/lib/msvcrt/stdio/fputs.c delete mode 100644 reactos/lib/msvcrt/stdio/fread.c delete mode 100644 reactos/lib/msvcrt/stdio/freopen.c delete mode 100644 reactos/lib/msvcrt/stdio/fscanf.c delete mode 100644 reactos/lib/msvcrt/stdio/fseek.c delete mode 100644 reactos/lib/msvcrt/stdio/fsetpos.c delete mode 100644 reactos/lib/msvcrt/stdio/fsopen.c delete mode 100644 reactos/lib/msvcrt/stdio/ftell.c delete mode 100644 reactos/lib/msvcrt/stdio/fwalk.c delete mode 100644 reactos/lib/msvcrt/stdio/fwrite.c delete mode 100644 reactos/lib/msvcrt/stdio/getc.c delete mode 100644 reactos/lib/msvcrt/stdio/getchar.c delete mode 100644 reactos/lib/msvcrt/stdio/gets.c delete mode 100644 reactos/lib/msvcrt/stdio/getw.c delete mode 100644 reactos/lib/msvcrt/stdio/perror.c delete mode 100644 reactos/lib/msvcrt/stdio/popen.c delete mode 100644 reactos/lib/msvcrt/stdio/printf.c delete mode 100644 reactos/lib/msvcrt/stdio/putc.c delete mode 100644 reactos/lib/msvcrt/stdio/putchar.c delete mode 100644 reactos/lib/msvcrt/stdio/puts.c delete mode 100644 reactos/lib/msvcrt/stdio/putw.c delete mode 100644 reactos/lib/msvcrt/stdio/remove.c delete mode 100644 reactos/lib/msvcrt/stdio/rename.c delete mode 100644 reactos/lib/msvcrt/stdio/rewind.c delete mode 100644 reactos/lib/msvcrt/stdio/rmtmp.c delete mode 100644 reactos/lib/msvcrt/stdio/scanf.c delete mode 100644 reactos/lib/msvcrt/stdio/setbuf.c delete mode 100644 reactos/lib/msvcrt/stdio/setvbuf.c delete mode 100644 reactos/lib/msvcrt/stdio/sprintf.c delete mode 100644 reactos/lib/msvcrt/stdio/sscanf.c delete mode 100644 reactos/lib/msvcrt/stdio/stdhnd.c delete mode 100644 reactos/lib/msvcrt/stdio/tempnam.c delete mode 100644 reactos/lib/msvcrt/stdio/tmpfile.c delete mode 100644 reactos/lib/msvcrt/stdio/tmpnam.c delete mode 100644 reactos/lib/msvcrt/stdio/ungetc.c delete mode 100644 reactos/lib/msvcrt/stdio/vfprintf.c delete mode 100644 reactos/lib/msvcrt/stdio/vfscanf.c delete mode 100644 reactos/lib/msvcrt/stdio/vfwprint.c delete mode 100644 reactos/lib/msvcrt/stdio/vprintf.c delete mode 100644 reactos/lib/msvcrt/stdio/vscanf.c delete mode 100644 reactos/lib/msvcrt/stdio/vsprintf.c delete mode 100644 reactos/lib/msvcrt/stdio/vsscanf.c delete mode 100644 reactos/lib/msvcrt/stdio/wfdopen.c delete mode 100644 reactos/lib/msvcrt/stdio/wrename.c delete mode 100644 reactos/lib/msvcrt/stdio/wtempnam.c delete mode 100644 reactos/lib/msvcrt/stdio/wtmpnam.c delete mode 100644 reactos/lib/msvcrt/stdlib/_exit.c delete mode 100644 reactos/lib/msvcrt/stdlib/abort.c delete mode 100644 reactos/lib/msvcrt/stdlib/abs.c delete mode 100644 reactos/lib/msvcrt/stdlib/atexit.c delete mode 100644 reactos/lib/msvcrt/stdlib/atof.c delete mode 100644 reactos/lib/msvcrt/stdlib/atoi.c delete mode 100644 reactos/lib/msvcrt/stdlib/atoi64.c delete mode 100644 reactos/lib/msvcrt/stdlib/atol.c delete mode 100644 reactos/lib/msvcrt/stdlib/atold.c delete mode 100644 reactos/lib/msvcrt/stdlib/bsearch.c delete mode 100644 reactos/lib/msvcrt/stdlib/div.c delete mode 100644 reactos/lib/msvcrt/stdlib/doserrmap.h delete mode 100644 reactos/lib/msvcrt/stdlib/ecvt.c delete mode 100644 reactos/lib/msvcrt/stdlib/ecvtbuf.c delete mode 100644 reactos/lib/msvcrt/stdlib/errno.c delete mode 100644 reactos/lib/msvcrt/stdlib/fcvt.c delete mode 100644 reactos/lib/msvcrt/stdlib/fcvtbuf.c delete mode 100644 reactos/lib/msvcrt/stdlib/fullpath.c delete mode 100644 reactos/lib/msvcrt/stdlib/gcvt.c delete mode 100644 reactos/lib/msvcrt/stdlib/getenv.c delete mode 100644 reactos/lib/msvcrt/stdlib/itoa.c delete mode 100644 reactos/lib/msvcrt/stdlib/itow.c delete mode 100644 reactos/lib/msvcrt/stdlib/labs.c delete mode 100644 reactos/lib/msvcrt/stdlib/ldiv.c delete mode 100644 reactos/lib/msvcrt/stdlib/makepath.c delete mode 100644 reactos/lib/msvcrt/stdlib/malloc.c delete mode 100644 reactos/lib/msvcrt/stdlib/mbstowcs.c delete mode 100644 reactos/lib/msvcrt/stdlib/mbtowc.c delete mode 100644 reactos/lib/msvcrt/stdlib/obsol.c delete mode 100644 reactos/lib/msvcrt/stdlib/putenv.c delete mode 100644 reactos/lib/msvcrt/stdlib/qsort.c delete mode 100644 reactos/lib/msvcrt/stdlib/rand.c delete mode 100644 reactos/lib/msvcrt/stdlib/rot.c delete mode 100644 reactos/lib/msvcrt/stdlib/senv.c delete mode 100644 reactos/lib/msvcrt/stdlib/splitp.c delete mode 100644 reactos/lib/msvcrt/stdlib/strtod.c delete mode 100644 reactos/lib/msvcrt/stdlib/strtol.c delete mode 100644 reactos/lib/msvcrt/stdlib/strtold.c delete mode 100644 reactos/lib/msvcrt/stdlib/strtoll.c delete mode 100644 reactos/lib/msvcrt/stdlib/strtoul.c delete mode 100644 reactos/lib/msvcrt/stdlib/strtoull.c delete mode 100644 reactos/lib/msvcrt/stdlib/swab.c delete mode 100644 reactos/lib/msvcrt/stdlib/wcstod.c delete mode 100644 reactos/lib/msvcrt/stdlib/wcstol.c delete mode 100644 reactos/lib/msvcrt/stdlib/wcstom.c delete mode 100644 reactos/lib/msvcrt/stdlib/wcstomb.c delete mode 100644 reactos/lib/msvcrt/stdlib/wcstombs.c delete mode 100644 reactos/lib/msvcrt/stdlib/wcstoul.c delete mode 100644 reactos/lib/msvcrt/stdlib/wctomb.c delete mode 100644 reactos/lib/msvcrt/stdlib/wfulpath.c delete mode 100644 reactos/lib/msvcrt/stdlib/witoa.c delete mode 100644 reactos/lib/msvcrt/stdlib/witow.c delete mode 100644 reactos/lib/msvcrt/stdlib/wmakpath.c delete mode 100644 reactos/lib/msvcrt/stdlib/wputenv.c delete mode 100644 reactos/lib/msvcrt/stdlib/wsenv.c delete mode 100644 reactos/lib/msvcrt/stdlib/wsplitp.c delete mode 100644 reactos/lib/msvcrt/stdlib/wtoi.c delete mode 100644 reactos/lib/msvcrt/stdlib/wtoi64.c delete mode 100644 reactos/lib/msvcrt/string/lasttok.c delete mode 100644 reactos/lib/msvcrt/string/memicmp.c delete mode 100644 reactos/lib/msvcrt/string/strcoll.c delete mode 100644 reactos/lib/msvcrt/string/strdup.c delete mode 100644 reactos/lib/msvcrt/string/strerror.c delete mode 100644 reactos/lib/msvcrt/string/stricmp.c delete mode 100644 reactos/lib/msvcrt/string/strlwr.c delete mode 100644 reactos/lib/msvcrt/string/strncoll.c delete mode 100644 reactos/lib/msvcrt/string/strnicmp.c delete mode 100644 reactos/lib/msvcrt/string/strpbrk.c delete mode 100644 reactos/lib/msvcrt/string/strrev.c delete mode 100644 reactos/lib/msvcrt/string/strset.c delete mode 100644 reactos/lib/msvcrt/string/strstr.c delete mode 100644 reactos/lib/msvcrt/string/strtok.c delete mode 100644 reactos/lib/msvcrt/string/strupr.c delete mode 100644 reactos/lib/msvcrt/string/strxfrm.c delete mode 100644 reactos/lib/msvcrt/sys_stat/fstat.c delete mode 100644 reactos/lib/msvcrt/sys_stat/fstati64.c delete mode 100644 reactos/lib/msvcrt/sys_stat/futime.c delete mode 100644 reactos/lib/msvcrt/sys_stat/stat.c delete mode 100644 reactos/lib/msvcrt/sys_stat/wstat.c delete mode 100644 reactos/lib/msvcrt/time/clock.c delete mode 100644 reactos/lib/msvcrt/time/ctime.c delete mode 100644 reactos/lib/msvcrt/time/difftime.c delete mode 100644 reactos/lib/msvcrt/time/ftime.c delete mode 100644 reactos/lib/msvcrt/time/posixrul.h delete mode 100644 reactos/lib/msvcrt/time/strdate.c delete mode 100644 reactos/lib/msvcrt/time/strftime.c delete mode 100644 reactos/lib/msvcrt/time/strtime.c delete mode 100644 reactos/lib/msvcrt/time/time.c delete mode 100644 reactos/lib/msvcrt/time/tz_vars.c delete mode 100644 reactos/lib/msvcrt/time/tzfile.h delete mode 100644 reactos/lib/msvcrt/time/wctime.c delete mode 100644 reactos/lib/msvcrt/time/wstrdate.c delete mode 100644 reactos/lib/msvcrt/time/wstrtime.c delete mode 100644 reactos/lib/msvcrt/wine/cpp.c delete mode 100644 reactos/lib/msvcrt/wine/cppexcept.c delete mode 100644 reactos/lib/msvcrt/wine/cppexcept.h delete mode 100644 reactos/lib/msvcrt/wine/eh.h delete mode 100644 reactos/lib/msvcrt/wine/heap.c delete mode 100644 reactos/lib/msvcrt/wine/msvcrt.h delete mode 100644 reactos/lib/msvcrt/wine/thread.c delete mode 100644 reactos/lib/msvcrt/wstring/wcscoll.c delete mode 100644 reactos/lib/msvcrt/wstring/wcscspn.c delete mode 100644 reactos/lib/msvcrt/wstring/wcsdup.c delete mode 100644 reactos/lib/msvcrt/wstring/wcsicmp.c delete mode 100644 reactos/lib/msvcrt/wstring/wcslwr.c delete mode 100644 reactos/lib/msvcrt/wstring/wcsnicmp.c delete mode 100644 reactos/lib/msvcrt/wstring/wcspbrk.c delete mode 100644 reactos/lib/msvcrt/wstring/wcsrev.c delete mode 100644 reactos/lib/msvcrt/wstring/wcsset.c delete mode 100644 reactos/lib/msvcrt/wstring/wcsspn.c delete mode 100644 reactos/lib/msvcrt/wstring/wcsstr.c delete mode 100644 reactos/lib/msvcrt/wstring/wcstok.c delete mode 100644 reactos/lib/msvcrt/wstring/wcsupr.c delete mode 100644 reactos/lib/msvcrt/wstring/wcsxfrm.c delete mode 100644 reactos/lib/msvcrt/wstring/wlasttok.c diff --git a/reactos/lib/msvcrt/Makefile b/reactos/lib/msvcrt/Makefile index 0c3976c27c0..d30005860cb 100644 --- a/reactos/lib/msvcrt/Makefile +++ b/reactos/lib/msvcrt/Makefile @@ -15,9 +15,9 @@ TARGET_BASE = $(TARGET_BASE_LIB_MSVCRT) # don't remove @nn from exported symbols - needed so dlltool doesn't mess up mangled c++ exports RM_AT_FROM_SYMBOLS = no -TARGET_LFLAGS = -nostartfiles --enable-stdcall-fixup +TARGET_LFLAGS = -nostartfiles -nostdlib --enable-stdcall-fixup -TARGET_SDKLIBS = wine.a string.a kernel32.a ntdll.a +TARGET_SDKLIBS = crt.a string.a kernel32.a ntdll.a wine.a TARGET_GCCLIBS = gcc @@ -35,472 +35,16 @@ TARGET_CFLAGS += \ TARGET_OBJECTS = $(TARGET_NAME).o -TARGET_CLEAN = \ - conio/*.o \ - ctype/*.o \ - direct/*.o \ - except/*.o \ - float/*.o \ - io/*.o \ - locale/*.o \ - math/*.o \ - mbstring/*.o \ - misc/*.o \ - process/*.o \ - search/*.o \ - setjmp/*.o \ - setjmp/i386/*.o \ - signal/*.o \ - stdio/*.o \ - stdlib/*.o \ - string/*.o \ - sys_stat/*.o \ - time/*.o \ - wine/*.o \ - wstring/*.o - +TARGET_CLEAN = dllmain.o include $(PATH_TO_TOP)/rules.mak include $(TOOLS_PATH)/helper.mk -CONIO_OBJECTS = \ - conio/cgets.o \ - conio/cprintf.o \ - conio/cputs.o \ - conio/cscanf.o \ - conio/getch.o \ - conio/getche.o \ - conio/kbhit.o \ - conio/putch.o \ - conio/ungetch.o -CTYPE_OBJECTS = \ - ctype/ctype.o \ - ctype/isalnum.o \ - ctype/isalpha.o \ - ctype/isascii.o \ - ctype/iscntrl.o \ - ctype/isdigit.o \ - ctype/isgraph.o \ - ctype/islower.o \ - ctype/isprint.o \ - ctype/ispunct.o \ - ctype/isspace.o \ - ctype/isupper.o \ - ctype/isxdigit.o \ - ctype/toascii.o \ - ctype/tolower.o \ - ctype/toupper.o \ - ctype/iscsym.o \ - ctype/isctype.o -DIRECT_OBJECTS = \ - direct/chdir.o \ - direct/chdrive.o \ - direct/getcwd.o \ - direct/getdcwd.o \ - direct/getdfree.o \ - direct/getdrive.o \ - direct/mkdir.o \ - direct/rmdir.o \ - direct/wchdir.o \ - direct/wgetcwd.o \ - direct/wgetdcwd.o \ - direct/wmkdir.o \ - direct/wrmdir.o - -EXCEPT_OBJECTS = \ - except/seh.o \ - except/abnorter.o \ - except/exhand2.o \ - except/matherr.o \ - except/unwind.o \ - except/xcptfil.o - -FLOAT_OBJECTS = \ - float/chgsign.o \ - float/clearfp.o \ - float/cntrlfp.o \ - float/copysign.o \ - float/fpclass.o \ - float/fpecode.o \ - float/fpreset.o \ - float/isnan.o \ - float/logb.o \ - float/nafter.o \ - float/scalb.o \ - float/statfp.o - -IO_OBJECTS = \ - io/access.o \ - io/chmod.o \ - io/chsize.o \ - io/close.o \ - io/commit.o \ - io/create.o \ - io/dup.o \ - io/dup2.o \ - io/eof.o \ - io/filelen.o \ - io/fileleni.o \ - io/find.o \ - io/fmode.o \ - io/isatty.o \ - io/locking.o \ - io/lseek.o \ - io/lseeki64.o \ - io/mktemp.o \ - io/open.o \ - io/pipe.o \ - io/read.o \ - io/setmode.o \ - io/sopen.o \ - io/stubs.o \ - io/tell.o \ - io/telli64.o \ - io/umask.o \ - io/unlink.o \ - io/utime.o \ - io/waccess.o \ - io/wchmod.o \ - io/wcreate.o \ - io/wfind.o \ - io/wmktemp.o \ - io/wopen.o \ - io/write.o \ - io/wunlink.o \ - io/wutime.o - -LOCALE_OBJECTS = \ - locale/locale.o - -MATH_OBJECTS = \ - math/acos.o \ - math/adjust.o \ - math/asin.o \ - math/atan.o \ - math/atan2.o \ - math/cabs.o \ - math/ceil.o \ - math/cos.o \ - math/cosh.o \ - math/exp.o \ - math/fabs.o \ - math/floor.o \ - math/fmod.o \ - math/frexp.o \ - math/huge_val.o \ - math/hypot.o \ - math/j0_y0.o \ - math/j1_y1.o \ - math/jn_yn.o \ - math/ldexp.o \ - math/log.o \ - math/log10.o \ - math/modf.o \ - math/pow.o \ - math/sin.o \ - math/sinh.o \ - math/sqrt.o \ - math/stubs.o \ - math/tan.o \ - math/tanh.o - -MBSTRING_OBJECTS = \ - mbstring/hanzen.o \ - mbstring/ischira.o \ - mbstring/iskana.o \ - mbstring/iskpun.o \ - mbstring/islead.o \ - mbstring/islwr.o \ - mbstring/ismbal.o \ - mbstring/ismbaln.o \ - mbstring/ismbc.o \ - mbstring/ismbgra.o \ - mbstring/ismbkaln.o \ - mbstring/ismblead.o \ - mbstring/ismbpri.o \ - mbstring/ismbpun.o \ - mbstring/ismbtrl.o \ - mbstring/isuppr.o \ - mbstring/jistojms.o \ - mbstring/jmstojis.o \ - mbstring/mbbtype.o \ - mbstring/mbccpy.o \ - mbstring/mbclen.o \ - mbstring/mbscat.o \ - mbstring/mbschr.o \ - mbstring/mbscmp.o \ - mbstring/mbscoll.o \ - mbstring/mbscpy.o \ - mbstring/mbscspn.o \ - mbstring/mbsdec.o \ - mbstring/mbsdup.o \ - mbstring/mbsicmp.o \ - mbstring/mbsicoll.o \ - mbstring/mbsinc.o \ - mbstring/mbslen.o \ - mbstring/mbslwr.o \ - mbstring/mbsncat.o \ - mbstring/mbsnccnt.o \ - mbstring/mbsncmp.o \ - mbstring/mbsncoll.o \ - mbstring/mbsncpy.o \ - mbstring/mbsnextc.o \ - mbstring/mbsnicmp.o \ - mbstring/mbsnicoll.o \ - mbstring/mbsninc.o \ - mbstring/mbsnset.o \ - mbstring/mbspbrk.o \ - mbstring/mbsrchr.o \ - mbstring/mbsrev.o \ - mbstring/mbsset.o \ - mbstring/mbsspn.o \ - mbstring/mbsspnp.o \ - mbstring/mbsstr.o \ - mbstring/mbstok.o \ - mbstring/mbstrlen.o \ - mbstring/mbsupr.o - -MISC_OBJECTS = \ - misc/amsg.o \ - misc/assert.o \ - misc/crtmain.o \ - misc/dllmain.o \ - misc/environ.o \ - misc/getargs.o \ - misc/initterm.o \ - misc/lock.o \ - misc/purecall.o \ - misc/stubs.o \ - misc/tls.o - -PROCESS_OBJECTS = \ - process/_cwait.o \ - process/_system.o \ - process/dll.o \ - process/process.o \ - process/procid.o \ - process/thread.o \ - process/threadid.o \ - process/threadx.o - -SEARCH_OBJECTS = \ - search/lfind.o \ - search/lsearch.o - -SETJMP_OBJECTS = \ - setjmp/i386/setjmp.o - -SIGNAL_OBJECTS = \ - signal/signal.o - -STDIO_OBJECTS = \ - stdio/allocfil.o \ - stdio/clearerr.o \ - stdio/fclose.o \ - stdio/fdopen.o \ - stdio/feof.o \ - stdio/ferror.o \ - stdio/fflush.o \ - stdio/fgetc.o \ - stdio/fgetchar.o \ - stdio/fgetpos.o \ - stdio/fgets.o \ - stdio/fgetws.o \ - stdio/filbuf.o \ - stdio/fileno.o \ - stdio/flsbuf.o \ - stdio/fopen.o \ - stdio/fprintf.o \ - stdio/fputc.o \ - stdio/fputchar.o \ - stdio/fputs.o \ - stdio/fread.o \ - stdio/freopen.o \ - stdio/fscanf.o \ - stdio/fseek.o \ - stdio/fsetpos.o \ - stdio/fsopen.o \ - stdio/ftell.o \ - stdio/fwalk.o \ - stdio/fwrite.o \ - stdio/getc.o \ - stdio/getchar.o \ - stdio/gets.o \ - stdio/getw.o \ - stdio/perror.o \ - stdio/popen.o \ - stdio/printf.o \ - stdio/putc.o \ - stdio/putchar.o \ - stdio/puts.o \ - stdio/putw.o \ - stdio/remove.o \ - stdio/rename.o \ - stdio/rewind.o \ - stdio/rmtmp.o \ - stdio/scanf.o \ - stdio/setbuf.o \ - stdio/setvbuf.o \ - stdio/sprintf.o \ - stdio/sscanf.o \ - stdio/stdhnd.o \ - stdio/tempnam.o \ - stdio/tmpfile.o \ - stdio/tmpnam.o \ - stdio/ungetc.o \ - stdio/vfprintf.o \ - stdio/vfscanf.o \ - stdio/vfwprint.o \ - stdio/vprintf.o \ - stdio/vscanf.o \ - stdio/vsprintf.o \ - stdio/vsscanf.o \ - stdio/wfdopen.o \ - stdio/wrename.o \ - stdio/wtempnam.o \ - stdio/wtmpnam.o - -STDLIB_OBJECTS = \ - stdlib/_exit.o \ - stdlib/abort.o \ - stdlib/abs.o \ - stdlib/atexit.o \ - stdlib/atof.o \ - stdlib/atoi.o \ - stdlib/atoi64.o \ - stdlib/atol.o \ - stdlib/bsearch.o \ - stdlib/div.o \ - stdlib/ecvt.o \ - stdlib/ecvtbuf.o \ - stdlib/errno.o \ - stdlib/fcvt.o \ - stdlib/fcvtbuf.o \ - stdlib/fullpath.o \ - stdlib/gcvt.o \ - stdlib/getenv.o \ - stdlib/itoa.o \ - stdlib/itow.o \ - stdlib/labs.o \ - stdlib/ldiv.o \ - stdlib/makepath.o \ - stdlib/malloc.o \ - stdlib/mbstowcs.o \ - stdlib/mbtowc.o \ - stdlib/obsol.o \ - stdlib/putenv.o \ - stdlib/qsort.o \ - stdlib/rand.o \ - stdlib/rot.o \ - stdlib/senv.o \ - stdlib/splitp.o \ - stdlib/strtod.o \ - stdlib/strtol.o \ - stdlib/strtoul.o \ - stdlib/swab.o \ - stdlib/wcstod.o \ - stdlib/wcstol.o \ - stdlib/wcstombs.o \ - stdlib/wcstoul.o \ - stdlib/wctomb.o \ - stdlib/wfulpath.o \ - stdlib/witoa.o \ - stdlib/witow.o \ - stdlib/wputenv.o \ - stdlib/wsenv.o \ - stdlib/wsplitp.o \ - stdlib/wmakpath.o \ - stdlib/wtoi.o \ - stdlib/wtoi64.o - -STRING_OBJECTS = \ - string/lasttok.o \ - string/memicmp.o \ - string/strcoll.o \ - string/strdup.o \ - string/strerror.o \ - string/stricmp.o \ - string/strlwr.o \ - string/strncoll.o \ - string/strnicmp.o \ - string/strpbrk.o \ - string/strrev.o\ - string/strset.o \ - string/strstr.o \ - string/strtok.o \ - string/strupr.o \ - string/strxfrm.o - -SYS_STAT_OBJECTS = \ - sys_stat/fstat.o \ - sys_stat/fstati64.o \ - sys_stat/futime.o \ - sys_stat/stat.o \ - sys_stat/wstat.o - -TIME_OBJECTS = \ - time/clock.o \ - time/ctime.o \ - time/difftime.o \ - time/ftime.o \ - time/strdate.o \ - time/strftime.o \ - time/strtime.o \ - time/time.o \ - time/tz_vars.o \ - time/wctime.o \ - time/wstrdate.o \ - time/wstrtime.o - -WINE_OBJECTS = \ - wine/cpp.o \ - wine/cppexcept.o \ - wine/heap.o \ - wine/thread.o - -WSTRING_OBJECTS = \ - wstring/wcscoll.o \ - wstring/wcscspn.o \ - wstring/wcsdup.o \ - wstring/wcsicmp.o \ - wstring/wcslwr.o \ - wstring/wcsnicmp.o \ - wstring/wcspbrk.o \ - wstring/wcsrev.o \ - wstring/wcsset.o \ - wstring/wcsspn.o \ - wstring/wcsstr.o \ - wstring/wcstok.o \ - wstring/wcsupr.o \ - wstring/wcsxfrm.o \ - wstring/wlasttok.o - -OBJECTS = \ - $(CONIO_OBJECTS) \ - $(CTYPE_OBJECTS) \ - $(DIRECT_OBJECTS) \ - $(EXCEPT_OBJECTS) \ - $(FLOAT_OBJECTS) \ - $(IO_OBJECTS) \ - $(LOCALE_OBJECTS) \ - $(MATH_OBJECTS) \ - $(MBSTRING_OBJECTS) \ - $(MISC_OBJECTS) \ - $(PROCESS_OBJECTS) \ - $(SEARCH_OBJECTS) \ - $(SETJMP_OBJECTS) \ - $(SIGNAL_OBJECTS) \ - $(STDIO_OBJECTS) \ - $(STDLIB_OBJECTS) \ - $(STRING_OBJECTS) \ - $(SYS_STAT_OBJECTS) \ - $(TIME_OBJECTS) \ - $(WINE_OBJECTS) \ - $(WSTRING_OBJECTS) +OBJECTS = dllmain.o $(TARGET_NAME).o: $(OBJECTS) $(LD) -r $(OBJECTS) -o $(TARGET_NAME).o diff --git a/reactos/lib/msvcrt/README.txt b/reactos/lib/msvcrt/README.txt deleted file mode 100644 index 8853dceee74..00000000000 --- a/reactos/lib/msvcrt/README.txt +++ /dev/null @@ -1,13 +0,0 @@ -This file contains information about the status the MSVCRT runtime in ReactOS. - -Please note that all of the MSVCRT.DLL runtime sources are license GPL unless -otherwise noted. The sources from WINE are dual licensed GPL/LGPL. -If you update a function in the ~/wine directory please send a patch to wine-patches@winehq.com - -TODO List: -Implement the remaining functions that are commented out in the .def file -Update source code headers for the license information. -Compleate the W32API conversion for all source files. -Write a decent regression test suite. -Convert all C++ style comments to C style comments. -???? diff --git a/reactos/lib/msvcrt/conio/cgets.c b/reactos/lib/msvcrt/conio/cgets.c deleted file mode 100644 index dfdb99bf1b0..00000000000 --- a/reactos/lib/msvcrt/conio/cgets.c +++ /dev/null @@ -1,74 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: msvcrt/conio/cgets.c - * PURPOSE: C Runtime - * PROGRAMMER: Eric Kohl (Imported from DJGPP) - */ - -#include -#include - -/* - * @implemented - */ -char *_cgets(char *string) -{ - unsigned len = 0; - unsigned int maxlen_wanted; - char *sp; - int c; - /* - * Be smart and check for NULL pointer. - * Don't know wether TURBOC does this. - */ - if (!string) - return(NULL); - maxlen_wanted = (unsigned int)((unsigned char)string[0]); - sp = &(string[2]); - /* - * Should the string be shorter maxlen_wanted including or excluding - * the trailing '\0' ? We don't take any risk. - */ - while(len < maxlen_wanted-1) - { - c=_getch(); - /* - * shold we check for backspace here? - * TURBOC does (just checked) but doesn't in cscanf (thats harder - * or even impossible). We do the same. - */ - if (c == '\b') - { - if (len > 0) - { - _cputs("\b \b"); /* go back, clear char on screen with space - and go back again */ - len--; - sp[len] = '\0'; /* clear the character in the string */ - } - } - else if (c == '\r') - { - sp[len] = '\0'; - break; - } - else if (c == 0) - { - /* special character ends input */ - sp[len] = '\0'; - _ungetch(c); /* keep the char for later processing */ - break; - } - else - { - sp[len] = _putch(c); - len++; - } - } - sp[maxlen_wanted-1] = '\0'; - string[1] = (char)((unsigned char)len); - return(sp); -} - - diff --git a/reactos/lib/msvcrt/conio/cprintf.c b/reactos/lib/msvcrt/conio/cprintf.c deleted file mode 100644 index b8e487edca3..00000000000 --- a/reactos/lib/msvcrt/conio/cprintf.c +++ /dev/null @@ -1,28 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: msvcrt/conio/cprintf.c - * PURPOSE: C Runtime - * PROGRAMMER: Eric Kohl (Imported from DJGPP) - */ - -#include -#include - -/* - * @unimplemented - */ -int -_cprintf(const char *fmt, ...) -{ - int cnt; - char buf[ 2048 ]; /* this is buggy, because buffer might be too small. */ - va_list ap; - - va_start(ap, fmt); - cnt = vsprintf(buf, fmt, ap); - va_end(ap); - - _cputs(buf); - return cnt; -} diff --git a/reactos/lib/msvcrt/conio/cputs.c b/reactos/lib/msvcrt/conio/cputs.c deleted file mode 100644 index 008afd39781..00000000000 --- a/reactos/lib/msvcrt/conio/cputs.c +++ /dev/null @@ -1,28 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/msvcrt/conio/cputs.c - * PURPOSE: Writes a character to stdout - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 28/12/98: Created - */ - -#include "precomp.h" -#include -#include -#include -#include - - -/* - * @implemented - */ -int _cputs(const char *_str) -{ - int len = strlen(_str); - DWORD written = 0; - if (!WriteFile(filehnd(stdout->_file),_str,len,&written,NULL)) - return -1; - return 0; -} diff --git a/reactos/lib/msvcrt/conio/cscanf.c b/reactos/lib/msvcrt/conio/cscanf.c deleted file mode 100644 index f508c18d212..00000000000 --- a/reactos/lib/msvcrt/conio/cscanf.c +++ /dev/null @@ -1,29 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: msvcrt/conio/cscanf.c - * PURPOSE: C Runtime - * PROGRAMMER: Eric Kohl (Imported from DJGPP) - */ - -#include -#include -#include -#include - -/* - * @unimplemented - */ -int _cscanf(char *fmt, ...) -{ - int cnt; - - va_list ap; - - //fixme cscanf should scan the console's keyboard - va_start(ap, fmt); - cnt = __vscanf(fmt, ap); - va_end(ap); - - return cnt; -} diff --git a/reactos/lib/msvcrt/conio/getch.c b/reactos/lib/msvcrt/conio/getch.c deleted file mode 100644 index bcbe825f5c2..00000000000 --- a/reactos/lib/msvcrt/conio/getch.c +++ /dev/null @@ -1,54 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/msvcrt/conio/getch.c - * PURPOSE: Writes a character to stdout - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 28/12/98: Created - */ - -#include "precomp.h" -#include -#include -#include -#include - - -/* - * @implemented - */ -int _getch(void) -{ - DWORD NumberOfCharsRead = 0; - char c; - if (char_avail) { - c = ungot_char; - char_avail = 0; - } else { - ReadConsoleA(_get_osfhandle(stdin->_file), - &c, - 1, - &NumberOfCharsRead, - NULL); - } - if (c == 10) - c = 13; - putchar(c); - return c; -} - -#if 0 -/* - * @unimplemented - */ -int _getche(void) -{ - int c; - - c = _getch(); - _putch(c); - - return c; -} -#endif diff --git a/reactos/lib/msvcrt/conio/getche.c b/reactos/lib/msvcrt/conio/getche.c deleted file mode 100644 index b9fb42a8094..00000000000 --- a/reactos/lib/msvcrt/conio/getche.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details - * PROJECT: ReactOS system libraries - * FILE: lib/msvcrt/conio/getche.c - * PURPOSE: Reads a character from stdin - * PROGRAMER: DJ Delorie - Boudewijn Dekker - * UPDATE HISTORY: - * 28/12/98: Created - */ - -#include -#include - - -int getche(void) -{ - if (char_avail) - /* - * We don't know, wether the ungot char was already echoed - * we assume yes (for example in cscanf, probably the only - * place where ungetch is ever called. - * There is no way to check for this really, because - * ungetch could have been called with a character that - * hasn't been got by a conio function. - * We don't echo again. - */ - return(getch()); - return (_putch(getch())); -} diff --git a/reactos/lib/msvcrt/conio/kbhit.c b/reactos/lib/msvcrt/conio/kbhit.c deleted file mode 100644 index b61000d3e25..00000000000 --- a/reactos/lib/msvcrt/conio/kbhit.c +++ /dev/null @@ -1,33 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/msvcrt/conio/kbhit.c - * PURPOSE: Checks for keyboard hits - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 28/12/98: Created - */ - -#include "precomp.h" -#include -#include - - -/* - * FIXME PeekConsoleInput returns more than keyboard hits - * - * @unimplemented - */ -int _kbhit(void) -{ - //INPUT_RECORD InputRecord; - DWORD NumberRead=0; - if (char_avail) - return(1); - else { - //FIXME PeekConsoleInput might do DeviceIo - //PeekConsoleInput((HANDLE)stdin->_file,&InputRecord,1,&NumberRead); - return NumberRead; - } - return 0; -} diff --git a/reactos/lib/msvcrt/conio/putch.c b/reactos/lib/msvcrt/conio/putch.c deleted file mode 100644 index dc95ffedb6c..00000000000 --- a/reactos/lib/msvcrt/conio/putch.c +++ /dev/null @@ -1,25 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/msvcrt/conio/putch.c - * PURPOSE: Writes a character to stdout - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 28/12/98: Created - */ - -#include "precomp.h" -#include - -/* - * @implemented - */ -int _putch(int c) -{ - DWORD NumberOfCharsWritten; - - if (WriteFile(GetStdHandle(STD_OUTPUT_HANDLE),&c,1,&NumberOfCharsWritten,NULL)) { - return -1; - } - return NumberOfCharsWritten; -} diff --git a/reactos/lib/msvcrt/conio/ungetch.c b/reactos/lib/msvcrt/conio/ungetch.c deleted file mode 100644 index e767b6efa4f..00000000000 --- a/reactos/lib/msvcrt/conio/ungetch.c +++ /dev/null @@ -1,32 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details - * PROJECT: ReactOS system libraries - * FILE: lib/msvcrt/conio/ungetch.c - * PURPOSE: Ungets a character from stdin - * PROGRAMER: DJ Delorie - Boudewijn Dekker [ Adapted from djgpp libc ] - * UPDATE HISTORY: - * 28/12/98: Created - */ - -#include -#include - -#define EOF -1 - -int char_avail = 0; -int ungot_char = 0; - - -/* - * @implemented - */ -int _ungetch(int c) -{ - if (char_avail) - return(EOF); - ungot_char = c; - char_avail = 1; - return(c); -} diff --git a/reactos/lib/msvcrt/ctype/ctype.c b/reactos/lib/msvcrt/ctype/ctype.c deleted file mode 100644 index 3c88c06e704..00000000000 --- a/reactos/lib/msvcrt/ctype/ctype.c +++ /dev/null @@ -1,271 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: msvcrt/ctype/ctype.c - * PURPOSE: C Runtime - * PROGRAMMER: Copyright (C) 1995 DJ Delorie - */ - -#include - -unsigned short _ctype[] = { - 0, /* , 0xFFFF */ - _CONTROL, /* CTRL+@, 0x00 */ - _CONTROL, /* CTRL+A, 0x01 */ - _CONTROL, /* CTRL+B, 0x02 */ - _CONTROL, /* CTRL+C, 0x03 */ - _CONTROL, /* CTRL+D, 0x04 */ - _CONTROL, /* CTRL+E, 0x05 */ - _CONTROL, /* CTRL+F, 0x06 */ - _CONTROL, /* CTRL+G, 0x07 */ - _CONTROL, /* CTRL+H, 0x08 */ - _CONTROL | _SPACE, /* CTRL+I, 0x09 */ - _CONTROL | _SPACE, /* CTRL+J, 0x0a */ - _CONTROL | _SPACE, /* CTRL+K, 0x0b */ - _CONTROL | _SPACE, /* CTRL+L, 0x0c */ - _CONTROL | _SPACE, /* CTRL+M, 0x0d */ - _CONTROL, /* CTRL+N, 0x0e */ - _CONTROL, /* CTRL+O, 0x0f */ - _CONTROL, /* CTRL+P, 0x10 */ - _CONTROL, /* CTRL+Q, 0x11 */ - _CONTROL, /* CTRL+R, 0x12 */ - _CONTROL, /* CTRL+S, 0x13 */ - _CONTROL, /* CTRL+T, 0x14 */ - _CONTROL, /* CTRL+U, 0x15 */ - _CONTROL, /* CTRL+V, 0x16 */ - _CONTROL, /* CTRL+W, 0x17 */ - _CONTROL, /* CTRL+X, 0x18 */ - _CONTROL, /* CTRL+Y, 0x19 */ - _CONTROL, /* CTRL+Z, 0x1a */ - _CONTROL, /* CTRL+[, 0x1b */ - _CONTROL, /* CTRL+\, 0x1c */ - _CONTROL, /* CTRL+], 0x1d */ - _CONTROL, /* CTRL+^, 0x1e */ - _CONTROL, /* CTRL+_, 0x1f */ - _SPACE | _BLANK, /* ` ', 0x20 */ - _PUNCT, /* `!', 0x21 */ - _PUNCT, /* 0x22 */ - _PUNCT, /* `#', 0x23 */ - _PUNCT, /* `$', 0x24 */ - _PUNCT, /* `%', 0x25 */ - _PUNCT, /* `&', 0x26 */ - _PUNCT, /* 0x27 */ - _PUNCT, /* `(', 0x28 */ - _PUNCT, /* `)', 0x29 */ - _PUNCT, /* `*', 0x2a */ - _PUNCT, /* `+', 0x2b */ - _PUNCT, /* `,', 0x2c */ - _PUNCT, /* `-', 0x2d */ - _PUNCT, /* `.', 0x2e */ - _PUNCT, /* `/', 0x2f */ - _DIGIT | _HEX, /* `0', 0x30 */ - _DIGIT | _HEX, /* `1', 0x31 */ - _DIGIT | _HEX, /* `2', 0x32 */ - _DIGIT | _HEX, /* `3', 0x33 */ - _DIGIT | _HEX, /* `4', 0x34 */ - _DIGIT | _HEX, /* `5', 0x35 */ - _DIGIT | _HEX, /* `6', 0x36 */ - _DIGIT | _HEX, /* `7', 0x37 */ - _DIGIT | _HEX, /* `8', 0x38 */ - _DIGIT | _HEX, /* `9', 0x39 */ - _PUNCT, /* `:', 0x3a */ - _PUNCT, /* `;', 0x3b */ - _PUNCT, /* `<', 0x3c */ - _PUNCT, /* `=', 0x3d */ - _PUNCT, /* `>', 0x3e */ - _PUNCT, /* `?', 0x3f */ - _PUNCT, /* `@', 0x40 */ - _UPPER | _HEX, /* `A', 0x41 */ - _UPPER | _HEX, /* `B', 0x42 */ - _UPPER | _HEX, /* `C', 0x43 */ - _UPPER | _HEX, /* `D', 0x44 */ - _UPPER | _HEX, /* `E', 0x45 */ - _UPPER | _HEX, /* `F', 0x46 */ - _UPPER, /* `G', 0x47 */ - _UPPER, /* `H', 0x48 */ - _UPPER, /* `I', 0x49 */ - _UPPER, /* `J', 0x4a */ - _UPPER, /* `K', 0x4b */ - _UPPER, /* `L', 0x4c */ - _UPPER, /* `M', 0x4d */ - _UPPER, /* `N', 0x4e */ - _UPPER, /* `O', 0x4f */ - _UPPER, /* `P', 0x50 */ - _UPPER, /* `Q', 0x51 */ - _UPPER, /* `R', 0x52 */ - _UPPER, /* `S', 0x53 */ - _UPPER, /* `T', 0x54 */ - _UPPER, /* `U', 0x55 */ - _UPPER, /* `V', 0x56 */ - _UPPER, /* `W', 0x57 */ - _UPPER, /* `X', 0x58 */ - _UPPER, /* `Y', 0x59 */ - _UPPER, /* `Z', 0x5a */ - _PUNCT, /* `[', 0x5b */ - _PUNCT, /* 0x5c */ - _PUNCT, /* `]', 0x5d */ - _PUNCT, /* `^', 0x5e */ - _PUNCT, /* `_', 0x5f */ - _PUNCT, /* 0x60 */ - _LOWER | _HEX, /* `a', 0x61 */ - _LOWER | _HEX, /* `b', 0x62 */ - _LOWER | _HEX, /* `c', 0x63 */ - _LOWER | _HEX, /* `d', 0x64 */ - _LOWER | _HEX, /* `e', 0x65 */ - _LOWER | _HEX, /* `f', 0x66 */ - _LOWER, /* `g', 0x67 */ - _LOWER, /* `h', 0x68 */ - _LOWER, /* `i', 0x69 */ - _LOWER, /* `j', 0x6a */ - _LOWER, /* `k', 0x6b */ - _LOWER, /* `l', 0x6c */ - _LOWER, /* `m', 0x6d */ - _LOWER, /* `n', 0x6e */ - _LOWER, /* `o', 0x6f */ - _LOWER, /* `p', 0x70 */ - _LOWER, /* `q', 0x71 */ - _LOWER, /* `r', 0x72 */ - _LOWER, /* `s', 0x73 */ - _LOWER, /* `t', 0x74 */ - _LOWER, /* `u', 0x75 */ - _LOWER, /* `v', 0x76 */ - _LOWER, /* `w', 0x77 */ - _LOWER, /* `x', 0x78 */ - _LOWER, /* `y', 0x79 */ - _LOWER, /* `z', 0x7a */ - _PUNCT, /* `{', 0x7b */ - _PUNCT, /* `|', 0x7c */ - _PUNCT, /* `}', 0x7d */ - _PUNCT, /* `~', 0x7e */ - _CONTROL, /* 0x7f */ - 0, /* 0x80 */ - 0, /* 0x81 */ - 0, /* 0x82 */ - 0, /* 0x83 */ - 0, /* 0x84 */ - 0, /* 0x85 */ - 0, /* 0x86 */ - 0, /* 0x87 */ - 0, /* 0x88 */ - 0, /* 0x89 */ - 0, /* 0x8a */ - 0, /* 0x8b */ - 0, /* 0x8c */ - 0, /* 0x8d */ - 0, /* 0x8e */ - 0, /* 0x8f */ - 0, /* 0x90 */ - 0, /* 0x91 */ - 0, /* 0x92 */ - 0, /* 0x93 */ - 0, /* 0x94 */ - 0, /* 0x95 */ - 0, /* 0x96 */ - 0, /* 0x97 */ - 0, /* 0x98 */ - 0, /* 0x99 */ - 0, /* 0x9a */ - 0, /* 0x9b */ - 0, /* 0x9c */ - 0, /* 0x9d */ - 0, /* 0x9e */ - 0, /* 0x9f */ - 0, /* 0xa0 */ - 0, /* 0xa1 */ - 0, /* 0xa2 */ - 0, /* 0xa3 */ - 0, /* 0xa4 */ - 0, /* 0xa5 */ - 0, /* 0xa6 */ - 0, /* 0xa7 */ - 0, /* 0xa8 */ - 0, /* 0xa9 */ - 0, /* 0xaa */ - 0, /* 0xab */ - 0, /* 0xac */ - 0, /* 0xad */ - 0, /* 0xae */ - 0, /* 0xaf */ - 0, /* 0xb0 */ - 0, /* 0xb1 */ - 0, /* 0xb2 */ - 0, /* 0xb3 */ - 0, /* 0xb4 */ - 0, /* 0xb5 */ - 0, /* 0xb6 */ - 0, /* 0xb7 */ - 0, /* 0xb8 */ - 0, /* 0xb9 */ - 0, /* 0xba */ - 0, /* 0xbb */ - 0, /* 0xbc */ - 0, /* 0xbd */ - 0, /* 0xbe */ - 0, /* 0xbf */ - 0, /* 0xc0 */ - 0, /* 0xc1 */ - 0, /* 0xc2 */ - 0, /* 0xc3 */ - 0, /* 0xc4 */ - 0, /* 0xc5 */ - 0, /* 0xc6 */ - 0, /* 0xc7 */ - 0, /* 0xc8 */ - 0, /* 0xc9 */ - 0, /* 0xca */ - 0, /* 0xcb */ - 0, /* 0xcc */ - 0, /* 0xcd */ - 0, /* 0xce */ - 0, /* 0xcf */ - 0, /* 0xd0 */ - 0, /* 0xd1 */ - 0, /* 0xd2 */ - 0, /* 0xd3 */ - 0, /* 0xd4 */ - 0, /* 0xd5 */ - 0, /* 0xd6 */ - 0, /* 0xd7 */ - 0, /* 0xd8 */ - 0, /* 0xd9 */ - 0, /* 0xda */ - 0, /* 0xdb */ - 0, /* 0xdc */ - 0, /* 0xdd */ - 0, /* 0xde */ - 0, /* 0xdf */ - 0, /* 0xe0 */ - 0, /* 0xe1 */ - 0, /* 0xe2 */ - 0, /* 0xe3 */ - 0, /* 0xe4 */ - 0, /* 0xe5 */ - 0, /* 0xe6 */ - 0, /* 0xe7 */ - 0, /* 0xe8 */ - 0, /* 0xe9 */ - 0, /* 0xea */ - 0, /* 0xeb */ - 0, /* 0xec */ - 0, /* 0xed */ - 0, /* 0xee */ - 0, /* 0xef */ - 0, /* 0xf0 */ - 0, /* 0xf1 */ - 0, /* 0xf2 */ - 0, /* 0xf3 */ - 0, /* 0xf4 */ - 0, /* 0xf5 */ - 0, /* 0xf6 */ - 0, /* 0xf7 */ - 0, /* 0xf8 */ - 0, /* 0xf9 */ - 0, /* 0xfa */ - 0, /* 0xfb */ - 0, /* 0xfc */ - 0, /* 0xfd */ - 0, /* 0xfe */ - 0 /* 0xff */ -}; - -/* EOF */ diff --git a/reactos/lib/msvcrt/ctype/isalnum.c b/reactos/lib/msvcrt/ctype/isalnum.c deleted file mode 100644 index 4aa76701247..00000000000 --- a/reactos/lib/msvcrt/ctype/isalnum.c +++ /dev/null @@ -1,29 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/msvcrt/ctype/isalnum.c - * PURPOSE: Test for a alpha numeric character - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 28/12/98: Created - */ -#include - - -#undef isalnum -/* - * @implemented - */ -int isalnum(int c) -{ - return _isctype(c, _ALPHA | _DIGIT); -} - -#undef iswalnum -/* - * @implemented - */ -int iswalnum(wint_t c) -{ - return iswctype(c, _ALPHA | _DIGIT); -} diff --git a/reactos/lib/msvcrt/ctype/isalpha.c b/reactos/lib/msvcrt/ctype/isalpha.c deleted file mode 100644 index 9fc0cb0093f..00000000000 --- a/reactos/lib/msvcrt/ctype/isalpha.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/mscvrt/ctype/isalpha.c - * PURPOSE: Checks if a character is alphanumeric - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 28/12/98: Created - */ - -#include - - -#undef isalpha - -/* - * @implemented - */ -int isalpha(int c) -{ - return _isctype(c, _ALPHA); -} - -#undef iswalpha -/* - * @implemented - */ -int iswalpha(wint_t c) -{ - return iswctype(c, _ALPHA); -} diff --git a/reactos/lib/msvcrt/ctype/isascii.c b/reactos/lib/msvcrt/ctype/isascii.c deleted file mode 100644 index 742d39dbbc5..00000000000 --- a/reactos/lib/msvcrt/ctype/isascii.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/msvcrt/ctype/isascii.c - * PURPOSE: Checks if a character is ascii - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 28/12/98: Created - */ - -#include - -/* - * @implemented - */ -int __isascii(int c) -{ - return (!((c)&(~0x7f))); -} - -/* - * @implemented - */ -int iswascii(wint_t c) -{ - return __isascii(c); -} diff --git a/reactos/lib/msvcrt/ctype/iscntrl.c b/reactos/lib/msvcrt/ctype/iscntrl.c deleted file mode 100644 index c7e64b861d9..00000000000 --- a/reactos/lib/msvcrt/ctype/iscntrl.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: msvcrt/ctype/iscntrl.c - * PURPOSE: C Runtime - * PROGRAMMER: Copyright (C) 1995 DJ Delorie - */ - -#include - -#undef iscntrl -/* - * @implemented - */ -int iscntrl(int c) -{ - return _isctype(c, _CONTROL); -} - -#undef iswcntrl -/* - * @implemented - */ -int iswcntrl(wint_t c) -{ - return iswctype(c, _CONTROL); -} diff --git a/reactos/lib/msvcrt/ctype/iscsym.c b/reactos/lib/msvcrt/ctype/iscsym.c deleted file mode 100644 index 8608062b8e8..00000000000 --- a/reactos/lib/msvcrt/ctype/iscsym.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/msvcrt/ctype/iscsym.c - * PURPOSE: Check for a valid characters in a c symbol - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 28/12/98: Created - */ -#include - - -/* - * @implemented - */ -int __iscsymf(int c) -{ - return (isalpha(c) || ( c == '_' )) ; -} - -/* - * @implemented - */ -int __iscsym(int c) -{ - return (isalnum(c) || ( c == '_' )) ; -} diff --git a/reactos/lib/msvcrt/ctype/isctype.c b/reactos/lib/msvcrt/ctype/isctype.c deleted file mode 100644 index 7542a609d00..00000000000 --- a/reactos/lib/msvcrt/ctype/isctype.c +++ /dev/null @@ -1,60 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: msvcrt/ctype/isctype.c - * PURPOSE: C Runtime - * PROGRAMMER: Copyright (C) 1995 DJ Delorie - */ - -#include - - -extern unsigned short _ctype[]; - -unsigned short *_pctype = _ctype + 1; -unsigned short *_pwctype = _ctype + 1; - - -/* - * @implemented - */ -unsigned short **__p__pctype(void) -{ - return &_pctype; -} - -/* - * @implemented - */ -unsigned short **__p__pwctype(void) -{ - return &_pwctype; -} - -/* - * @implemented - */ -int _isctype(unsigned int c, int ctypeFlags) -{ - return (_pctype[(unsigned char)(c & 0xFF)] & ctypeFlags); -} - -/* - * @implemented - */ -int iswctype(wint_t wc, wctype_t wctypeFlags) -{ - return (_pwctype[(unsigned char)(wc & 0xFF)] & wctypeFlags); -} - -/* - * obsolete - * - * @implemented - */ -int is_wctype(wint_t wc, wctype_t wctypeFlags) -{ - return (_pwctype[(unsigned char)(wc & 0xFF)] & wctypeFlags); -} - -/* EOF */ diff --git a/reactos/lib/msvcrt/ctype/isdigit.c b/reactos/lib/msvcrt/ctype/isdigit.c deleted file mode 100644 index 36783d43587..00000000000 --- a/reactos/lib/msvcrt/ctype/isdigit.c +++ /dev/null @@ -1,28 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: msvcrt/ctype/isdigit.c - * PURPOSE: C Runtime - * PROGRAMMER: Copyright (C) 1995 DJ Delorie - */ - -#include - - -#undef isdigit -/* - * @implemented - */ -int isdigit(int c) -{ - return _isctype(c, _DIGIT); -} - -#undef iswdigit -/* - * @implemented - */ -int iswdigit(wint_t c) -{ - return iswctype(c, _DIGIT); -} diff --git a/reactos/lib/msvcrt/ctype/isgraph.c b/reactos/lib/msvcrt/ctype/isgraph.c deleted file mode 100644 index 9b614805a0f..00000000000 --- a/reactos/lib/msvcrt/ctype/isgraph.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: msvcrt/ctype/isgraph.c - * PURPOSE: C Runtime - * PROGRAMMER: Copyright (C) 1995 DJ Delorie - */ - -#include - -#undef isgraph -/* - * @implemented - */ -int isgraph(int c) -{ - return _isctype(c,_PUNCT | _ALPHA | _DIGIT); -} - -#undef iswgraph -/* - * @implemented - */ -int iswgraph(wint_t c) -{ - return iswctype(c,_PUNCT | _ALPHA | _DIGIT); -} diff --git a/reactos/lib/msvcrt/ctype/islower.c b/reactos/lib/msvcrt/ctype/islower.c deleted file mode 100644 index c91e5dde091..00000000000 --- a/reactos/lib/msvcrt/ctype/islower.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: msvcrt/ctype/islower.c - * PURPOSE: C Runtime - * PROGRAMMER: Copyright (C) 1995 DJ Delorie - */ - -#include - - -#undef islower -/* - * @implemented - */ -int islower(int c) -{ - return _isctype(c, _LOWER); -} - -/* - * @implemented - */ -int iswlower(wint_t c) -{ - return iswctype(c, _LOWER); -} diff --git a/reactos/lib/msvcrt/ctype/isprint.c b/reactos/lib/msvcrt/ctype/isprint.c deleted file mode 100644 index 1f234240254..00000000000 --- a/reactos/lib/msvcrt/ctype/isprint.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: msvcrt/ctype/isprint.c - * PURPOSE: C Runtime - * PROGRAMMER: Copyright (C) 1995 DJ Delorie - */ - -#include - -#undef isprint -/* - * @implemented - */ -int isprint(int c) -{ - return _isctype(c,_BLANK | _PUNCT | _ALPHA | _DIGIT); -} - -/* - * @implemented - */ -int iswprint(wint_t c) -{ - return iswctype((unsigned short)c,_BLANK | _PUNCT | _ALPHA | _DIGIT); -} diff --git a/reactos/lib/msvcrt/ctype/ispunct.c b/reactos/lib/msvcrt/ctype/ispunct.c deleted file mode 100644 index 51fe12e3693..00000000000 --- a/reactos/lib/msvcrt/ctype/ispunct.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: msvcrt/ctype/ispunct.c - * PURPOSE: C Runtime - * PROGRAMMER: Copyright (C) 1995 DJ Delorie - */ - -#include - -#undef ispunct -/* - * @implemented - */ -int ispunct(int c) -{ - return _isctype(c, _PUNCT); -} - -#undef iswpunct -/* - * @implemented - */ -int iswpunct(wint_t c) -{ - return iswctype(c, _PUNCT); -} diff --git a/reactos/lib/msvcrt/ctype/isspace.c b/reactos/lib/msvcrt/ctype/isspace.c deleted file mode 100644 index 6f74756b1ed..00000000000 --- a/reactos/lib/msvcrt/ctype/isspace.c +++ /dev/null @@ -1,30 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/msvcrt/ctype/isspace.c - * PURPOSE: Test for a space character - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 28/12/98: Created - */ - -#include - - -#undef isspace -/* - * @implemented - */ -int isspace(int c) -{ - return _isctype(c,_SPACE); -} - -#undef iswspace -/* - * @implemented - */ -int iswspace(wint_t c) -{ - return iswctype(c,_SPACE); -} diff --git a/reactos/lib/msvcrt/ctype/isupper.c b/reactos/lib/msvcrt/ctype/isupper.c deleted file mode 100644 index 6e090255de9..00000000000 --- a/reactos/lib/msvcrt/ctype/isupper.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: msvcrt/ctype/isupper.c - * PURPOSE: C Runtime - * PROGRAMMER: Copyright (C) 1995 DJ Delorie - */ - -#include - -#undef isupper -/* - * @implemented - */ -int isupper(int c) -{ - return _isctype(c, _UPPER); -} - -/* - * @implemented - */ -int iswupper(wint_t c) -{ - return iswctype(c, _UPPER); -} diff --git a/reactos/lib/msvcrt/ctype/isxdigit.c b/reactos/lib/msvcrt/ctype/isxdigit.c deleted file mode 100644 index 3490c07924f..00000000000 --- a/reactos/lib/msvcrt/ctype/isxdigit.c +++ /dev/null @@ -1,28 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: msvcrt/ctype/isxdigit.c - * PURPOSE: C Runtime - * PROGRAMMER: Copyright (C) 1995 DJ Delorie - */ - -#include - -#undef isxdigit -/* - * @implemented - */ -int isxdigit(int c) -{ - return _isctype(c, _HEX); -} - -#undef iswxdigit -/* - * @implemented - */ -int iswxdigit(wint_t c) -{ - return iswctype(c, _HEX); -} - diff --git a/reactos/lib/msvcrt/ctype/toascii.c b/reactos/lib/msvcrt/ctype/toascii.c deleted file mode 100644 index 8ad09e23c83..00000000000 --- a/reactos/lib/msvcrt/ctype/toascii.c +++ /dev/null @@ -1,17 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: msvcrt/ctype/toascii.c - * PURPOSE: C Runtime - * PROGRAMMER: Copyright (C) 1995 DJ Delorie - */ - -#include - -/* - * @implemented - */ -int __toascii(int c) -{ - return((unsigned)(c) & 0x7F); -} diff --git a/reactos/lib/msvcrt/ctype/tolower.c b/reactos/lib/msvcrt/ctype/tolower.c deleted file mode 100644 index 48c8788020f..00000000000 --- a/reactos/lib/msvcrt/ctype/tolower.c +++ /dev/null @@ -1,51 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: msvcrt/ctype/tolower.c - * PURPOSE: C Runtime - * PROGRAMMER: Copyright (C) 1995 DJ Delorie - */ - -#include - -#undef tolower -/* - * @implemented - */ -int tolower(int c) -{ - if (_isctype (c, _UPPER)) - return (c - ('A' - 'a')); - return(c); -} - -#undef towlower -/* - * @implemented - */ -wchar_t towlower(wchar_t c) -{ - if (iswctype (c, _UPPER)) - return (c - (L'A' - L'a')); - return(c); -} - -/* - * @implemented - */ -int _tolower(int c) -{ - return (c - ('A' - 'a')); -} - -/* -int towlower(wint_t); -int towupper(wint_t); - -wchar_t _towlower(wchar_t c) -{ - return (c - (L'A' - L'a')); -} -*/ - - diff --git a/reactos/lib/msvcrt/ctype/toupper.c b/reactos/lib/msvcrt/ctype/toupper.c deleted file mode 100644 index 7e21e65e226..00000000000 --- a/reactos/lib/msvcrt/ctype/toupper.c +++ /dev/null @@ -1,47 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: msvcrt/ctype/toupper.c - * PURPOSE: C Runtime - * PROGRAMMER: Copyright (C) 1995 DJ Delorie - */ - -#include - -#undef toupper -/* - * @implemented - */ -int toupper(int c) -{ - if (_isctype (c, _LOWER)) - return (c + ('A' - 'a')); - return(c); -} - -#undef towupper -/* - * @implemented - */ -wchar_t towupper(wchar_t c) -{ - if (iswctype (c, _LOWER)) - return (c + (L'A' - L'a')); - return(c); -} - -/* - * @implemented - */ -int _toupper(int c) -{ - return (c + ('A' - 'a')); -} - -/* -wchar_t _towupper(wchar_t c) -{ - return (c + (L'A' - L'a')); -} -*/ - diff --git a/reactos/lib/msvcrt/direct/chdir.c b/reactos/lib/msvcrt/direct/chdir.c deleted file mode 100644 index 2a48e5cad53..00000000000 --- a/reactos/lib/msvcrt/direct/chdir.c +++ /dev/null @@ -1,16 +0,0 @@ -#include "precomp.h" -#include -#include -#include - -/* - * @implemented - */ -int _chdir(const char* _path) -{ - if (!SetCurrentDirectoryA((char*)_path)) { - _dosmaperr(GetLastError()); - return -1; - } - return 0; -} diff --git a/reactos/lib/msvcrt/direct/chdrive.c b/reactos/lib/msvcrt/direct/chdrive.c deleted file mode 100644 index 250aace5d2c..00000000000 --- a/reactos/lib/msvcrt/direct/chdrive.c +++ /dev/null @@ -1,34 +0,0 @@ -#include "precomp.h" -#include -#include -#include -#include -#include - - -int cur_drive = 0; - - -/* - * @implemented - */ -int _chdrive(int drive) -{ - char d[3]; - - if (!( drive >= 1 && drive <= 26)) { - __set_errno(EINVAL); - return -1; - } - if (cur_drive != drive) { - cur_drive = drive; - d[0] = toupper(cur_drive + '@'); - d[1] = ':'; - d[2] = 0; - if (!SetCurrentDirectoryA(d)) { - _dosmaperr(GetLastError()); - return -1; - } - } - return 0; -} diff --git a/reactos/lib/msvcrt/direct/getcwd.c b/reactos/lib/msvcrt/direct/getcwd.c deleted file mode 100644 index a9801b6e8eb..00000000000 --- a/reactos/lib/msvcrt/direct/getcwd.c +++ /dev/null @@ -1,31 +0,0 @@ -#include "precomp.h" -#include -#include -#include -#include - - -/* - * @implemented - */ -char *_getcwd(char* buffer, int maxlen) -{ - char *cwd; - int len; - - if (buffer == NULL) { - if ( (cwd = malloc(MAX_PATH)) == NULL ) { - __set_errno(ENOMEM); - return NULL; - } - len = MAX_PATH; - } else { - cwd = buffer; - len = maxlen; - } - if (GetCurrentDirectoryA(len, cwd) == 0) { - _dosmaperr(GetLastError()); - return NULL; - } - return cwd; -} diff --git a/reactos/lib/msvcrt/direct/getdcwd.c b/reactos/lib/msvcrt/direct/getdcwd.c deleted file mode 100644 index 3dab6d665b5..00000000000 --- a/reactos/lib/msvcrt/direct/getdcwd.c +++ /dev/null @@ -1,27 +0,0 @@ -#include "precomp.h" -#include -#include - -/* - * @implemented - */ -char* _getdcwd(int nDrive, char* caBuffer, int nBufLen) -{ - int i =0; - int dr = _getdrive(); - - if (nDrive < 1 || nDrive > 26) - return NULL; - if (dr != nDrive) { - if ( _chdrive(nDrive) != 0 ) - return NULL; - } - i = GetCurrentDirectoryA(nBufLen, caBuffer); - if (i == nBufLen) - return NULL; - if (dr != nDrive) { - if ( _chdrive(dr) != 0 ) - return NULL; - } - return caBuffer; -} diff --git a/reactos/lib/msvcrt/direct/getdfree.c b/reactos/lib/msvcrt/direct/getdfree.c deleted file mode 100644 index 84601c43eeb..00000000000 --- a/reactos/lib/msvcrt/direct/getdfree.c +++ /dev/null @@ -1,23 +0,0 @@ -#include "precomp.h" -#include -#include - - -/* - * @implemented - */ -unsigned int _getdiskfree(unsigned int _drive, struct _diskfree_t* _diskspace) -{ - char RootPathName[10]; - - RootPathName[0] = toupper(_drive +'@'); - RootPathName[1] = ':'; - RootPathName[2] = '\\'; - RootPathName[3] = 0; - if (_diskspace == NULL) - return 0; - if (!GetDiskFreeSpaceA(RootPathName,(LPDWORD)&_diskspace->sectors_per_cluster,(LPDWORD)&_diskspace->bytes_per_sector, - (LPDWORD )&_diskspace->avail_clusters,(LPDWORD )&_diskspace->total_clusters)) - return 0; - return _diskspace->avail_clusters; -} diff --git a/reactos/lib/msvcrt/direct/getdrive.c b/reactos/lib/msvcrt/direct/getdrive.c deleted file mode 100644 index 4074bafbd18..00000000000 --- a/reactos/lib/msvcrt/direct/getdrive.c +++ /dev/null @@ -1,30 +0,0 @@ -#include "precomp.h" -#include -#include - - -extern int cur_drive; - -/* - * @implemented - */ -int _getdrive(void) -{ - char Buffer[MAX_PATH]; - - if (cur_drive == 0) { - GetCurrentDirectoryA(MAX_PATH, Buffer); - cur_drive = toupper(Buffer[0] - '@'); - } - return cur_drive; -} - -/* - * @unimplemented - */ -unsigned long _getdrives(void) -{ - //fixme get logical drives - //return GetLogicalDrives(); - return 5; // drive A and C -} diff --git a/reactos/lib/msvcrt/direct/mkdir.c b/reactos/lib/msvcrt/direct/mkdir.c deleted file mode 100644 index bb160d45c68..00000000000 --- a/reactos/lib/msvcrt/direct/mkdir.c +++ /dev/null @@ -1,16 +0,0 @@ -#include "precomp.h" -#include -#include - - -/* - * @implemented - */ -int _mkdir(const char* _path) -{ - if (!CreateDirectoryA(_path, NULL)) { - _dosmaperr(GetLastError()); - return -1; - } - return 0; -} diff --git a/reactos/lib/msvcrt/direct/rmdir.c b/reactos/lib/msvcrt/direct/rmdir.c deleted file mode 100644 index 5f89e80ad5e..00000000000 --- a/reactos/lib/msvcrt/direct/rmdir.c +++ /dev/null @@ -1,16 +0,0 @@ -#include "precomp.h" -#include -#include - - -/* - * @implemented - */ -int _rmdir(const char* _path) -{ - if (!RemoveDirectoryA(_path)) { - _dosmaperr(GetLastError()); - return -1; - } - return 0; -} diff --git a/reactos/lib/msvcrt/direct/wchdir.c b/reactos/lib/msvcrt/direct/wchdir.c deleted file mode 100644 index 1c92c20f22f..00000000000 --- a/reactos/lib/msvcrt/direct/wchdir.c +++ /dev/null @@ -1,17 +0,0 @@ -#include "precomp.h" -#include -#include -#include -#include - -/* - * @implemented - */ -int _wchdir (const wchar_t *_path) -{ - if (!SetCurrentDirectoryW((wchar_t *)_path)) { - _dosmaperr(GetLastError()); - return -1; - } - return 0; -} diff --git a/reactos/lib/msvcrt/direct/wgetcwd.c b/reactos/lib/msvcrt/direct/wgetcwd.c deleted file mode 100644 index f1e62f4ea70..00000000000 --- a/reactos/lib/msvcrt/direct/wgetcwd.c +++ /dev/null @@ -1,28 +0,0 @@ -#include "precomp.h" -#include -#include -#include -#include - - -/* - * @implemented - */ -wchar_t* _wgetcwd(wchar_t* buffer, int maxlen) -{ - wchar_t *cwd; - int len; - if (buffer == NULL) { - if ( (cwd = malloc(MAX_PATH * sizeof(wchar_t))) == NULL ) { - __set_errno(ENOMEM); - return NULL; - } - len = MAX_PATH; - } else { - cwd = buffer; - len = maxlen; - } - if (GetCurrentDirectoryW(len, cwd) == 0) - return NULL; - return cwd; -} diff --git a/reactos/lib/msvcrt/direct/wgetdcwd.c b/reactos/lib/msvcrt/direct/wgetdcwd.c deleted file mode 100644 index 4de0744cf2e..00000000000 --- a/reactos/lib/msvcrt/direct/wgetdcwd.c +++ /dev/null @@ -1,32 +0,0 @@ -#include "precomp.h" -#include -#include - - -/* - * @implemented - */ -wchar_t* _wgetdcwd(int nDrive, wchar_t* caBuffer, int nBufLen) -{ - int i =0; - int dr = _getdrive(); - - if (nDrive < 1 || nDrive > 26) - return NULL; - - if (dr != nDrive) { - if ( _chdrive(nDrive) != 0 ) - return NULL; - } - - i = GetCurrentDirectoryW(nBufLen, caBuffer); - if (i == nBufLen) - return NULL; - - if (dr != nDrive) { - if ( _chdrive(dr) != 0 ) - return NULL; - } - - return caBuffer; -} diff --git a/reactos/lib/msvcrt/direct/wmkdir.c b/reactos/lib/msvcrt/direct/wmkdir.c deleted file mode 100644 index 21faa789bd9..00000000000 --- a/reactos/lib/msvcrt/direct/wmkdir.c +++ /dev/null @@ -1,16 +0,0 @@ -#include "precomp.h" -#include -#include - - -/* - * @implemented - */ -int _wmkdir(const wchar_t* _path) -{ - if (!CreateDirectoryW(_path, NULL)) { - _dosmaperr(GetLastError()); - return -1; - } - return 0; -} diff --git a/reactos/lib/msvcrt/direct/wrmdir.c b/reactos/lib/msvcrt/direct/wrmdir.c deleted file mode 100644 index 97e7d4b2065..00000000000 --- a/reactos/lib/msvcrt/direct/wrmdir.c +++ /dev/null @@ -1,16 +0,0 @@ -#include "precomp.h" -#include -#include - - -/* - * @implemented - */ -int _wrmdir(const wchar_t* _path) -{ - if (!RemoveDirectoryW(_path)) { - _dosmaperr(GetLastError()); - return -1; - } - return 0; -} diff --git a/reactos/lib/msvcrt/misc/dllmain.c b/reactos/lib/msvcrt/dllmain.c similarity index 96% rename from reactos/lib/msvcrt/misc/dllmain.c rename to reactos/lib/msvcrt/dllmain.c index ad14d56245a..091f5ebc09f 100644 --- a/reactos/lib/msvcrt/misc/dllmain.c +++ b/reactos/lib/msvcrt/dllmain.c @@ -23,7 +23,7 @@ #include "precomp.h" #include #include -#include "../wine/msvcrt.h" +#include #define NDEBUG #include @@ -91,8 +91,8 @@ DllMain(PVOID hinstDll, ULONG dwReason, PVOID reserved) return FALSE; } - _acmdln = strdup(GetCommandLineA()); - _wcmdln = wcsdup(GetCommandLineW()); + _acmdln = _strdup(GetCommandLineA()); + _wcmdln = _wcsdup(GetCommandLineW()); /* FIXME: more initializations... */ diff --git a/reactos/lib/msvcrt/except/abnorter.c b/reactos/lib/msvcrt/except/abnorter.c deleted file mode 100644 index a939e846ffe..00000000000 --- a/reactos/lib/msvcrt/except/abnorter.c +++ /dev/null @@ -1,18 +0,0 @@ -#include "precomp.h" -#include - - -#ifdef __GNUC__ - -/* - * @unimplemented - */ -int _abnormal_termination(void) -{ - printf("Abnormal Termination\n"); -// return AbnormalTermination(); - return 0; -} - -#else -#endif diff --git a/reactos/lib/msvcrt/except/exhand2.c b/reactos/lib/msvcrt/except/exhand2.c deleted file mode 100644 index c5244874e65..00000000000 --- a/reactos/lib/msvcrt/except/exhand2.c +++ /dev/null @@ -1,33 +0,0 @@ -#include "precomp.h" -#include - -#ifdef __GNUC__ -#else -ULONG DbgPrint(PCH Format,...) -{ - return 0; -} -#endif - -VOID STDCALL -MsvcrtDebug(ULONG Value) -{ - //DbgPrint("MsvcrtDebug 0x%.08x\n", Value); -} - -struct _EXCEPTION_RECORD; -struct _CONTEXT; - -/* - * @implemented - */ -EXCEPTION_DISPOSITION -_except_handler2( -struct _EXCEPTION_RECORD *ExceptionRecord, -void *Frame, -struct _CONTEXT *ContextRecord, -void *DispatcherContext) -{ - //printf("_except_handler2()\n"); - return 0; -} diff --git a/reactos/lib/msvcrt/except/matherr.c b/reactos/lib/msvcrt/except/matherr.c deleted file mode 100644 index f751c300956..00000000000 --- a/reactos/lib/msvcrt/except/matherr.c +++ /dev/null @@ -1,42 +0,0 @@ -#include "precomp.h" -#include - - -struct _exception { - int type; - char* name; - double arg1; - double arg2; - double retval; -} ; - - -int _matherr(struct _exception* e) -{ - return 0; -} - -/* - * not exported by NTDLL - * - * @unimplemented - */ -void __setusermatherr(int (*handler)(struct _exception*)) -{ - -} - - -#define _FPIEEE_RECORD void - -/* - * @unimplemented - */ -int _fpieee_flt( - unsigned long exception_code, - struct _EXCEPTION_POINTERS* ExceptionPointer, - int (*handler)(_FPIEEE_RECORD*) - ) -{ - return 0; -} diff --git a/reactos/lib/msvcrt/except/seh.s b/reactos/lib/msvcrt/except/seh.s deleted file mode 100755 index 5e8e7855cb4..00000000000 --- a/reactos/lib/msvcrt/except/seh.s +++ /dev/null @@ -1,379 +0,0 @@ -/* $Id$ - * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS MSVCRT Runtime Library - * PURPOSE: Runtime library exception support for IA-32 - * FILE: lib/msvcrt/except/seh.s - * PROGRAMER: Casper S. Hornstrup (chorns@users.sourceforge.net) - * NOTES: This file is shared with ntoskrnl/rtl/i386/seh.s. - * Please keep them in sync. - */ - -#define ExceptionContinueExecution 0 -#define ExceptionContinueSearch 1 -#define ExceptionNestedException 2 -#define ExceptionCollidedUnwind 3 - -#define EXCEPTION_NONCONTINUABLE 0x01 -#define EXCEPTION_UNWINDING 0x02 -#define EXCEPTION_EXIT_UNWIND 0x04 -#define EXCEPTION_STACK_INVALID 0x08 -#define EXCEPTION_NESTED_CALL 0x10 -#define EXCEPTION_TARGET_UNWIND 0x20 -#define EXCEPTION_COLLIDED_UNWIND 0x40 - -#define EXCEPTION_UNWIND_MODE \ -( EXCEPTION_UNWINDING \ - | EXCEPTION_EXIT_UNWIND \ - | EXCEPTION_TARGET_UNWIND \ - | EXCEPTION_COLLIDED_UNWIND) - -#define EREC_CODE 0x00 -#define EREC_FLAGS 0x04 -#define EREC_RECORD 0x08 -#define EREC_ADDRESS 0x0C -#define EREC_NUMPARAMS 0x10 -#define EREC_INFO 0x14 - -#define TRYLEVEL_NONE -1 -#define TRYLEVEL_INVALID -2 - -#define ER_STANDARDESP -0x08 -#define ER_EPOINTERS -0x04 -#define ER_PREVFRAME 0x00 -#define ER_HANDLER 0x04 -#define ER_SCOPETABLE 0x08 -#define ER_TRYLEVEL 0x0C -#define ER_EBP 0x10 - -#define ST_TRYLEVEL 0x00 -#define ST_FILTER 0x04 -#define ST_HANDLER 0x08 - -#define CONTEXT_EDI 0x9C -#define CONTEXT_EBX 0xA4 -#define CONTEXT_EIP 0xB8 - -.globl __local_unwind2 -.globl __except_handler3 -.globl __EH_prolog - -// EAX = value to print -_do_debug: - pushal - pushl %eax - call _MsvcrtDebug@4 - popal - ret - -#define LU2_TRYLEVEL 0x08 -#define LU2_REGFRAME 0x04 - -// -// void -// _local_unwind2(PEXCEPTION_REGISTRATION RegistrationFrame, -// LONG TryLevel) -// -// Parameters: -// [EDX+08h] - PEXCEPTION_REGISTRATION RegistrationFrame -// [EDX+04h] - LONG TryLevel -// Registers: -// EBP - EBP of call frame we are unwinding -// Returns: -// Nothing -// Notes: -// Run all termination handlers for a call frame from the current -// try-level up to (but not including) the given stop try-level. -__local_unwind2: - // Setup our call frame so we can access parameters using EDX - //pushl %ebp - movl %esp, %edx - - // FIXME: Setup an EXCEPTION_REGISTRATION entry to protect the - // unwinding in case something goes wrong - -.lu2_next_scope: - - // Keep a pointer to the exception registration in EBX - movl LU2_REGFRAME(%edx), %ebx - - // If we have reached the end of the chain or we're asked to stop here - // by the caller then exit - movl ER_TRYLEVEL(%ebx), %eax - - cmpl $-1, %eax - je .lu2_done - - cmpl LU2_TRYLEVEL(%edx), %eax - je .lu2_done - - // Keep a pointer to the scopetable in ESI - movl ER_SCOPETABLE(%ebx), %esi - - // Compute the offset of the entry in the scopetable that describes - // the scope that is to be unwound. Put the offset in EDI. - movl ST_TRYLEVEL(%esi), %edi - lea (%edi, %edi, 2), %edi - shll $2, %edi - addl %esi, %edi - - // If this is not a termination handler then skip it - cmpl $0, ST_FILTER(%edi) - jne .lu2_next_scope - - // Save the previous try-level in the exception registration structure - movl ST_TRYLEVEL(%edi), %eax - movl %eax, ER_TRYLEVEL(%ebx) - - // Fetch the address of the termination handler - movl ST_HANDLER(%edi), %eax - - // Termination handlers may trash all registers so save the - // important ones and then call the handler - pushl %edx - call *%eax - - // Get our base pointer back - popl %edx - - jmp .lu2_next_scope - -.lu2_done: - - // FIXME: Tear down the EXCEPTION_REGISTRATION entry setup to protect - // the unwinding - - //movl %esi, %esp - //popl %ebp - ret - -#define EH3_DISPCONTEXT 0x14 -#define EH3_CONTEXT 0x10 -#define EH3_REGFRAME 0x0C -#define EH3_ERECORD 0x08 - -// Parameters: -// [ESP+14h] - PVOID DispatcherContext -// [ESP+10h] - PCONTEXT Context -// [ESP+0Ch] - PEXCEPTION_REGISTRATION RegistrationFrame -// [ESP+08h] - PEXCEPTION_RECORD ExceptionRecord -// Registers: -// Unknown -// Returns: -// EXCEPTION_DISPOSITION - How this handler handled the exception -// Notes: -// Try to find an exception handler that will handle the exception. -// Traverse the entries in the scopetable that is associated with the -// exception registration passed as a parameter to this function. -// If an exception handler that will handle the exception is found, it -// is called and this function never returns -__except_handler3: - // Setup our call frame so we can access parameters using EBP - pushl %ebp // Standard ESP in frame (considered part of EXCEPTION_REGISTRATION) - movl %esp, %ebp - - // Don't trust the direction flag to be cleared - cld - - // Either we're called to handle an exception or we're called to unwind - movl EH3_ERECORD(%ebp), %eax - testl $EXCEPTION_UNWIND_MODE, EREC_FLAGS(%eax) - jnz .eh3_unwind - - // Keep a pointer to the exception registration in EBX - movl EH3_REGFRAME(%ebp), %ebx - - // Build an EXCEPTION_POINTERS structure on the stack and store it's - // address in the EXCEPTION_REGISTRATION structure - movl EH3_CONTEXT(%esp), %eax - pushl %ebx // Registration frame - pushl %eax // Context - movl %esp, ER_EPOINTERS(%ebx) // Pointer to EXCEPTION_REGISTRATION on the stack - - // Keep current try-level in EDI - movl ER_TRYLEVEL(%ebx), %edi - - // Keep a pointer to the scopetable in ESI - movl ER_SCOPETABLE(%ebx), %esi - -.eh3_next_scope: - - // If we have reached the end of the chain then exit - cmpl $-1, %edi - je .eh3_search - - // Compute the offset of the entry in the scopetable and store - // the absolute address in EAX - lea (%edi, %edi, 2), %eax - shll $2, %eax - addl %esi, %eax - - // Fetch the address of the filter routine - movl ST_FILTER(%eax), %eax - - // If this is a termination handler then skip it - cmpl $0, %eax - je .eh3_continue - - // Filter routines may trash all registers so save the important - // ones before restoring the call frame ebp and calling the handler - pushl %ebp - pushl %edi // Stop try-level - lea ER_EBP(%ebx), %ebp - call *%eax - popl %edi // Stop try-level - popl %ebp - - // Reload EBX with registration frame address - movl EH3_REGFRAME(%ebp), %ebx - - // Be more flexible here by checking if the return value is less than - // zero, equal to zero, or larger than zero instead of the defined - // values: - // -1 (EXCEPTION_CONTINUE_EXECUTION) - // 0 (EXCEPTION_CONTINUE_SEARCH) - // +1 (EXCEPTION_EXECUTE_HANDLER) - orl %eax, %eax - jz .eh3_continue - js .eh3_dismiss - - // Filter returned: EXCEPTION_EXECUTE_HANDLER - - // Ask the OS to perform global unwinding. - pushl %edi // Save stop try-level - pushl %ebx // Save registration frame address - pushl %ebx // Registration frame address - call __global_unwind2 - popl %eax // Remove parameter to __global_unwind2 - popl %ebx // Restore registration frame address - popl %edi // Restore stop try-level - - // Change the context structure so _except_finish is called in the - // correct context since we return ExceptionContinueExecution. - movl EH3_CONTEXT(%ebp), %eax - - movl %edi, CONTEXT_EDI(%eax) // Stop try-level - movl %ebx, CONTEXT_EBX(%eax) // Registration frame address - movl $_except_finish, CONTEXT_EIP(%eax) - - movl $ExceptionContinueExecution, %eax - jmp .eh3_return - - // Filter returned: EXCEPTION_CONTINUE_SEARCH -.eh3_continue: - - // Reload ESI because the filter routine may have trashed it - movl ER_SCOPETABLE(%ebx), %esi - - // Go one try-level closer to the top - lea (%edi, %edi, 2), %edi - shll $2, %edi - addl %esi, %edi - movl ST_TRYLEVEL(%edi), %edi - - jmp .eh3_next_scope - - // Filter returned: EXCEPTION_CONTINUE_EXECUTION - // Continue execution like nothing happened -.eh3_dismiss: - movl $ExceptionContinueExecution, %eax - jmp .eh3_return - - // Tell the OS to search for another handler that will handle the exception -.eh3_search: - - movl $ExceptionContinueSearch, %eax - jmp .eh3_return - - // Perform local unwinding -.eh3_unwind: - - movl $ExceptionContinueSearch, %eax - testl $EXCEPTION_TARGET_UNWIND, EREC_FLAGS(%eax) - jnz .eh3_return - - // Save some important registers - pushl %ebp - - lea ER_EBP(%ebx), %ebp - pushl $-1 - pushl %ebx - call __local_unwind2 - addl $8, %esp - - // Restore some important registers - popl %ebp - - movl $ExceptionContinueSearch, %eax - - // Get me out of here -.eh3_return: - - movl %ebp, %esp - popl %ebp - ret - -// Parameters: -// None -// Registers: -// EBX - Pointer to exception registration structure -// EDI - Stop try-level -// Returns: -// - -// Notes: -// - -_except_finish: - - // Setup EBP for the exception handler. By doing this the exception - // handler can access local variables as normal - lea ER_EBP(%ebx), %ebp - - // Save some important registers - pushl %ebp - pushl %ebx - pushl %edi - - // Stop try-level - pushl %edi - - // Pointer to exception registration structure - pushl %ebx - call __local_unwind2 - addl $8, %esp - - // Restore some important registers - popl %edi - popl %ebx - popl %ebp - - // Keep a pointer to the scopetable in ESI - movl ER_SCOPETABLE(%ebx), %esi - - // Compute the offset of the entry in the scopetable and store - // the absolute address in EDI - lea (%edi, %edi, 2), %edi - shll $2, %edi - addl %esi, %edi - - // Set the current try-level to the previous try-level and call - // the exception handler - movl ST_TRYLEVEL(%edi), %eax - movl %eax, ER_TRYLEVEL(%ebx) - movl ST_HANDLER(%edi), %eax - - call *%eax - - // We should never get here - ret - -// Copied from Wine. -__EH_prolog: - pushl $-1 - pushl %eax - pushl %fs:0 - movl %esp, %fs:0 - movl 12(%esp), %eax - movl %ebp, 12(%esp) - leal 12(%esp), %ebp - pushl %eax - ret diff --git a/reactos/lib/msvcrt/except/unwind.c b/reactos/lib/msvcrt/except/unwind.c deleted file mode 100644 index 2b8b9d5fcbf..00000000000 --- a/reactos/lib/msvcrt/except/unwind.c +++ /dev/null @@ -1,76 +0,0 @@ -#include "precomp.h" -#include -#include - -/* - * @implemented - */ -void __cdecl -_global_unwind2(PEXCEPTION_REGISTRATION RegistrationFrame) -{ -#ifdef __GNUC__ - RtlUnwind(RegistrationFrame, &&__ret_label, NULL, 0); -__ret_label: - // return is important - return; -#else -#endif -} - - -// This is dragged over from WINE: - -typedef struct __EXCEPTION_FRAME -{ - struct __EXCEPTION_FRAME *Prev; - PEXCEPTION_HANDLER Handler; -} EXCEPTION_FRAME, *PEXCEPTION_FRAME; - -/* VC++ extensions to Win32 SEH */ -typedef struct _SCOPETABLE -{ - int previousTryLevel; - int (*lpfnFilter)(PEXCEPTION_POINTERS); - int (*lpfnHandler)(void); -} SCOPETABLE, *PSCOPETABLE; - -typedef struct _MSVCRT_EXCEPTION_FRAME -{ - EXCEPTION_FRAME *prev; - void (*handler)(PEXCEPTION_RECORD, PEXCEPTION_FRAME, - PCONTEXT, PEXCEPTION_RECORD); - PSCOPETABLE scopetable; - int trylevel; - int _ebp; - PEXCEPTION_POINTERS xpointers; -} MSVCRT_EXCEPTION_FRAME; - - -typedef struct __JUMP_BUFFER -{ - unsigned long Ebp; - unsigned long Ebx; - unsigned long Edi; - unsigned long Esi; - unsigned long Esp; - unsigned long Eip; - unsigned long Registration; - unsigned long TryLevel; - /* Start of new struct members */ - unsigned long Cookie; - unsigned long UnwindFunc; - unsigned long UnwindData[6]; -} _JUMP_BUFFER; - -void -_local_unwind2(MSVCRT_EXCEPTION_FRAME *RegistrationFrame, - LONG TryLevel); - -/* - * @implemented -*/ - -void __stdcall _seh_longjmp_unwind(_JUMP_BUFFER *jmp) -{ - _local_unwind2((MSVCRT_EXCEPTION_FRAME*) jmp->Registration, jmp->TryLevel); -} diff --git a/reactos/lib/msvcrt/except/xcptfil.c b/reactos/lib/msvcrt/except/xcptfil.c deleted file mode 100644 index 9415d6820fe..00000000000 --- a/reactos/lib/msvcrt/except/xcptfil.c +++ /dev/null @@ -1,15 +0,0 @@ -#include "precomp.h" - - -/* - * @unimplemented - */ -int -_XcptFilter(DWORD ExceptionCode, - struct _EXCEPTION_POINTERS * ExceptionInfo) -{ - //fixme XcptFilter -// return UnhandledExceptionFilter(ExceptionInfo); - return 0; -} - diff --git a/reactos/lib/msvcrt/float/chgsign.c b/reactos/lib/msvcrt/float/chgsign.c deleted file mode 100644 index e2a0c806309..00000000000 --- a/reactos/lib/msvcrt/float/chgsign.c +++ /dev/null @@ -1,23 +0,0 @@ -#include -#include - - -/* - * @implemented - */ -double _chgsign( double __x ) -{ - union - { - double* __x; - double_t *x; - } u; - u.__x = &__x; - - if ( u.x->sign == 1 ) - u.x->sign = 0; - else - u.x->sign = 1; - - return __x; -} diff --git a/reactos/lib/msvcrt/float/clearfp.c b/reactos/lib/msvcrt/float/clearfp.c deleted file mode 100644 index 8832b3b447e..00000000000 --- a/reactos/lib/msvcrt/float/clearfp.c +++ /dev/null @@ -1,17 +0,0 @@ -#include - -/* - * @implemented - */ -unsigned int _clearfp (void) -{ - unsigned short __res = _statusfp(); -#ifdef __GNUC__ -__asm__ __volatile__ ( - "fclex \n\t" - ); -#else -#endif /*__GNUC__*/ - return __res; -} - diff --git a/reactos/lib/msvcrt/float/cntrlfp.c b/reactos/lib/msvcrt/float/cntrlfp.c deleted file mode 100644 index c093d827e64..00000000000 --- a/reactos/lib/msvcrt/float/cntrlfp.c +++ /dev/null @@ -1,174 +0,0 @@ -/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ - -#include - -#define X87_CW_IM (1<<0) /* Invalid operation mask */ -#define X87_CW_DM (1<<1) /* Denormal operand mask */ -#define X87_CW_ZM (1<<2) /* Zero divide mask */ -#define X87_CW_OM (1<<3) /* Overflow mask */ -#define X87_CW_UM (1<<4) /* Underflow mask */ -#define X87_CW_PM (1<<5) /* Precision mask */ - -#define X87_CW_PC_MASK (3<<8) /* precision control mask */ -#define X87_CW_PC24 (0<<8) /* 24 bit precision */ -#define X87_CW_PC53 (2<<8) /* 53 bit precision */ -#define X87_CW_PC64 (3<<8) /* 64 bit precision */ - -#define X87_CW_RC_MASK (3<<10) /* rounding control mask */ -#define X87_CW_RC_NEAREST (0<<10) /* round to nearest */ -#define X87_CW_RC_DOWN (1<<10) /* round down */ -#define X87_CW_RC_UP (2<<10) /* round up */ -#define X87_CW_RC_ZERO (3<<10) /* round toward zero (chop) */ - -#define X87_CW_IC (1<<12) /* infinity control flag */ - -/* - * @implemented - */ -unsigned int _controlfp(unsigned int unNew, unsigned int unMask) -{ - return _control87(unNew,unMask); -} - -/* - * @implemented - */ -unsigned int _control87(unsigned int unNew, unsigned int unMask) -{ - unsigned int FpuCw; - unsigned int DummyCw = 0; - - /* get the controlword */ - asm volatile("fstcw %0\n\t" : "=m"(FpuCw)); - FpuCw &= 0x0000ffff; - - /* translate it into _control87 format */ - if (FpuCw & X87_CW_IM) - DummyCw |= _EM_INVALID; - if (FpuCw & X87_CW_DM) - DummyCw |= _EM_DENORMAL; - if (FpuCw & X87_CW_ZM) - DummyCw |= _EM_ZERODIVIDE; - if (FpuCw & X87_CW_OM) - DummyCw |= _EM_OVERFLOW; - if (FpuCw & X87_CW_UM) - DummyCw |= _EM_UNDERFLOW; - if (FpuCw & X87_CW_PM) - DummyCw |= _EM_INEXACT; - - switch (FpuCw & X87_CW_PC_MASK) - { - case X87_CW_PC24: - DummyCw |= _PC_24; - break; - case X87_CW_PC53: - DummyCw |= _PC_53; - break; - case X87_CW_PC64: - DummyCw |= _PC_64; - break; - } - - switch (FpuCw & X87_CW_RC_MASK) - { - case X87_CW_RC_NEAREST: - DummyCw |= _RC_NEAR; - break; - case X87_CW_RC_DOWN: - DummyCw |= _RC_DOWN; - break; - case X87_CW_RC_UP: - DummyCw |= _RC_UP; - break; - case X87_CW_RC_ZERO: - DummyCw |= _RC_CHOP; - break; - } - - /* unset (un)masked bits */ - DummyCw &= ~unMask; - unNew &= unMask; - - /* set new bits */ - DummyCw |= unNew; - - /* translate back into x87 format - * FIXME: translate infinity control! - */ - FpuCw = 0; - if (DummyCw & _EM_INVALID) - FpuCw |= X87_CW_IM; - if (DummyCw & _EM_DENORMAL) - FpuCw |= X87_CW_DM; - if (DummyCw & _EM_ZERODIVIDE) - FpuCw |= X87_CW_ZM; - if (DummyCw & _EM_OVERFLOW) - FpuCw |= X87_CW_OM; - if (DummyCw & _EM_UNDERFLOW) - FpuCw |= X87_CW_UM; - if (DummyCw & _EM_INEXACT) - FpuCw |= X87_CW_PM; - - switch (DummyCw & _MCW_PC) - { - case _PC_24: - FpuCw |= X87_CW_PC24; - break; - case _PC_53: - FpuCw |= X87_CW_PC53; - break; - case _PC_64: - default: - FpuCw |= X87_CW_PC64; - break; - } - - switch (DummyCw & _MCW_RC) - { - case _RC_NEAR: - FpuCw |= X87_CW_RC_NEAREST; - break; - case _RC_DOWN: - FpuCw |= X87_CW_RC_DOWN; - break; - case _RC_UP: - FpuCw |= X87_CW_RC_UP; - break; - case _RC_CHOP: - FpuCw |= X87_CW_RC_ZERO; - break; - } - - /* set controlword */ - asm volatile("fldcw %0" : : "m"(FpuCw)); - - return DummyCw; - -#if 0 /* The follwing is the original code, broken I think! -blight */ -register unsigned int __res; -#ifdef __GNUC__ -__asm__ __volatile__ ( - "pushl %%eax \n\t" /* make room on stack */ - "fstcw (%%esp) \n\t" - "fwait \n\t" - "popl %%eax \n\t" - "andl $0xffff, %%eax \n\t" /* OK; we have the old value ready */ - - "movl %1, %%ecx \n\t" - "notl %%ecx \n\t" - "andl %%eax, %%ecx \n\t" /* the bits we want to keep */ - - "movl %2, %%edx \n\t" - "andl %1, %%edx \n\t" /* the bits we want to change */ - - "orl %%ecx, %%edx\n\t" /* the new value */ - "pushl %%edx \n\t" - "fldcw (%%esp) \n\t" - "popl %%edx \n\t" - - :"=a" (__res):"r" (unNew),"r" (unMask): "dx", "cx"); -#else -#endif /*__GNUC__*/ - return __res; -#endif -} diff --git a/reactos/lib/msvcrt/float/copysign.c b/reactos/lib/msvcrt/float/copysign.c deleted file mode 100644 index 17bb869ab5c..00000000000 --- a/reactos/lib/msvcrt/float/copysign.c +++ /dev/null @@ -1,26 +0,0 @@ -#include -#include - -/* - * @implemented - */ -double _copysign (double __d, double __s) -{ - union - { - double* __d; - double_t* d; - } d; - union - { - double* __s; - double_t* s; - } s; - d.__d = &__d; - s.__s = &__s; - - d.d->sign = s.s->sign; - - return __d; -} - diff --git a/reactos/lib/msvcrt/float/fpclass.c b/reactos/lib/msvcrt/float/fpclass.c deleted file mode 100644 index 5dac73d020e..00000000000 --- a/reactos/lib/msvcrt/float/fpclass.c +++ /dev/null @@ -1,71 +0,0 @@ -#include -#include -#include - - -#define _FPCLASS_SNAN 0x0001 /* signaling NaN */ -#define _FPCLASS_QNAN 0x0002 /* quiet NaN */ -#define _FPCLASS_NINF 0x0004 /* negative infinity */ -#define _FPCLASS_NN 0x0008 /* negative normal */ -#define _FPCLASS_ND 0x0010 /* negative denormal */ -#define _FPCLASS_NZ 0x0020 /* -0 */ -#define _FPCLASS_PZ 0x0040 /* +0 */ -#define _FPCLASS_PD 0x0080 /* positive denormal */ -#define _FPCLASS_PN 0x0100 /* positive normal */ -#define _FPCLASS_PINF 0x0200 /* positive infinity */ - -#define FP_SNAN 0x0001 // signaling NaN -#define FP_QNAN 0x0002 // quiet NaN -#define FP_NINF 0x0004 // negative infinity -#define FP_PINF 0x0200 // positive infinity -#define FP_NDENORM 0x0008 // negative denormalized non-zero -#define FP_PDENORM 0x0010 // positive denormalized non-zero -#define FP_NZERO 0x0020 // negative zero -#define FP_PZERO 0x0040 // positive zero -#define FP_NNORM 0x0080 // negative normalized non-zero -#define FP_PNORM 0x0100 // positive normalized non-zero - -typedef int fpclass_t; - -/* - * @implemented - */ -fpclass_t _fpclass(double __d) -{ - union - { - double* __d; - double_t* d; - } d; - d.__d = &__d; - - if ( d.d->exponent == 0 ) { - if ( d.d->mantissah == 0 && d.d->mantissal == 0 ) { - if ( d.d->sign ==0 ) - return FP_NZERO; - else - return FP_PZERO; - } else { - if ( d.d->sign ==0 ) - return FP_NDENORM; - else - return FP_PDENORM; - } - } - if (d.d->exponent == 0x7ff ) { - if ( d.d->mantissah == 0 && d.d->mantissal == 0 ) { - if ( d.d->sign ==0 ) - return FP_NINF; - else - return FP_PINF; - } - else if ( d.d->mantissah == 0 && d.d->mantissal != 0 ) { - return FP_QNAN; - } - else if ( d.d->mantissah == 0 && d.d->mantissal != 0 ) { - return FP_SNAN; - } - - } - return 0; -} diff --git a/reactos/lib/msvcrt/float/fpecode.c b/reactos/lib/msvcrt/float/fpecode.c deleted file mode 100644 index bcf5339e7dc..00000000000 --- a/reactos/lib/msvcrt/float/fpecode.c +++ /dev/null @@ -1,14 +0,0 @@ -#ifdef __USE_W32API -#undef __USE_W32API -#endif - -#include -#include - -/* - * @implemented - */ -int * __fpecode(void) -{ - return(&(GetThreadData()->fpecode)); -} diff --git a/reactos/lib/msvcrt/float/fpreset.c b/reactos/lib/msvcrt/float/fpreset.c deleted file mode 100644 index 7322097d958..00000000000 --- a/reactos/lib/msvcrt/float/fpreset.c +++ /dev/null @@ -1,12 +0,0 @@ -#include - - -/* - * @unimplemented - */ -void _fpreset(void) -{ - /* FIXME: This causes an exception */ -// __asm__ __volatile__("fninit\n\t"); - return; -} diff --git a/reactos/lib/msvcrt/float/isnan.c b/reactos/lib/msvcrt/float/isnan.c deleted file mode 100644 index e522fcb97ce..00000000000 --- a/reactos/lib/msvcrt/float/isnan.c +++ /dev/null @@ -1,98 +0,0 @@ -/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc. -This file is part of the GNU C Library. - -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -The GNU C 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include -#include -#include - - -/* - * @implemented - */ -int _isnan(double __x) -{ - union - { - double* __x; - double_t* x; - } x; - x.__x = &__x; - return ( x.x->exponent == 0x7ff && ( x.x->mantissah != 0 || x.x->mantissal != 0 )); -} - -int _isnanl(long double __x) -{ - /* Intel's extended format has the normally implicit 1 explicit - present. Sigh! */ - union - { - long double* __x; - long_double_t* x; - } x; - x.__x = &__x; - - - /* IEEE 854 NaN's have the maximum possible - exponent and a nonzero mantissa. */ - - return (( x.x->exponent == 0x7fff) - && ( (x.x->mantissah & 0x80000000) != 0) - && ( (x.x->mantissah & (unsigned int)0x7fffffff) != 0 || x.x->mantissal != 0 )); -} - -int _isinf(double __x) -{ - union - { - double* __x; - double_t* x; - } x; - - x.__x = &__x; - return ( x.x->exponent == 0x7ff && ( x.x->mantissah == 0 && x.x->mantissal == 0 )); -} - -/* - * @implemented - */ -int _finite( double x ) -{ - return !_isinf(x); -} - -int _isinfl(long double __x) -{ - /* Intel's extended format has the normally implicit 1 explicit - present. Sigh! */ - union - { - long double* __x; - long_double_t* x; - } x; - - x.__x = &__x; - - - /* An IEEE 854 infinity has an exponent with the - maximum possible value and a zero mantissa. */ - - - if ( x.x->exponent == 0x7fff && ( (x.x->mantissah == 0x80000000 ) && x.x->mantissal == 0 )) - return x.x->sign ? -1 : 1; - return 0; -} diff --git a/reactos/lib/msvcrt/float/logb.c b/reactos/lib/msvcrt/float/logb.c deleted file mode 100644 index d71c654ee77..00000000000 --- a/reactos/lib/msvcrt/float/logb.c +++ /dev/null @@ -1,34 +0,0 @@ -/* Math functions for i387. - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by John C. Bowman , 1995. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - The GNU C 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include - -double _logb (double __x) -{ - register double __value; -#ifdef __GNUC__ - register double __junk; - __asm __volatile__ - ("fxtract\n\t" - : "=t" (__junk), "=u" (__value) : "0" (__x)); -#else -#endif /*__GNUC__*/ - return __value; -} diff --git a/reactos/lib/msvcrt/float/nafter.c b/reactos/lib/msvcrt/float/nafter.c deleted file mode 100644 index 9b5ddd7cef2..00000000000 --- a/reactos/lib/msvcrt/float/nafter.c +++ /dev/null @@ -1,16 +0,0 @@ -#include - - -/* - * @implemented - */ -double _nextafter( double x, double y ) -{ - if ( x == y) - return x; - - if ( isnan(x) || isnan(y) ) - return x; - - return x; -} diff --git a/reactos/lib/msvcrt/float/scalb.c b/reactos/lib/msvcrt/float/scalb.c deleted file mode 100644 index cf2e673f2f0..00000000000 --- a/reactos/lib/msvcrt/float/scalb.c +++ /dev/null @@ -1,20 +0,0 @@ -#include -#include - -/* - * @implemented - */ -double _scalb( double __x, long e ) -{ - union - { - double* __x; - double_t* x; - } x; - - x.__x = &__x; - - x.x->exponent += e; - - return __x; -} diff --git a/reactos/lib/msvcrt/float/statfp.c b/reactos/lib/msvcrt/float/statfp.c deleted file mode 100644 index e2d2112afb6..00000000000 --- a/reactos/lib/msvcrt/float/statfp.c +++ /dev/null @@ -1,19 +0,0 @@ -#include - -/* - * @implemented - */ -unsigned int _statusfp (void) -{ - -register unsigned short __res; -#ifdef __GNUC__ -__asm__ __volatile__ ( - "fstsw %0 \n\t" -// "movzwl %ax, %eax" - :"=a" (__res) - ); -#else -#endif /*__GNUC__*/ - return __res; -} diff --git a/reactos/lib/msvcrt/io/access.c b/reactos/lib/msvcrt/io/access.c deleted file mode 100644 index 4a3698a1fec..00000000000 --- a/reactos/lib/msvcrt/io/access.c +++ /dev/null @@ -1,33 +0,0 @@ -#include "precomp.h" -#include -#include -#define NDEBUG -#include - - -/* - * @implemented - */ -int _access( const char *_path, int _amode ) -{ - DWORD Attributes = GetFileAttributesA(_path); - DPRINT("_access('%s', %x)\n", _path, _amode); - - if (Attributes == -1) { - _dosmaperr(GetLastError()); - return -1; - } - if ((_amode & W_OK) == W_OK) { - if ((Attributes & FILE_ATTRIBUTE_READONLY) == FILE_ATTRIBUTE_READONLY) { - __set_errno(EACCES); - return -1; - } - } - if ((_amode & D_OK) == D_OK) { - if ((Attributes & FILE_ATTRIBUTE_DIRECTORY) != FILE_ATTRIBUTE_DIRECTORY) { - __set_errno(EACCES); - return -1; - } - } - return 0; -} diff --git a/reactos/lib/msvcrt/io/chmod.c b/reactos/lib/msvcrt/io/chmod.c deleted file mode 100644 index 65f912d3ee3..00000000000 --- a/reactos/lib/msvcrt/io/chmod.c +++ /dev/null @@ -1,46 +0,0 @@ -#include "precomp.h" -#include -#include - -#define NDEBUG -#include - -#define mode_t int - - -/* - * @implemented - */ -int _chmod(const char* filename, mode_t mode) -{ - DWORD FileAttributes = 0; - BOOLEAN Set = FALSE; - - DPRINT("_chmod('%s', %x)\n", filename, mode); - - FileAttributes = GetFileAttributesA(filename); - if ( FileAttributes == -1 ) { - _dosmaperr(GetLastError()); - return -1; - } - - if ( mode == 0 ) - return -1; - - if (mode & _S_IWRITE) { - if (FileAttributes & FILE_ATTRIBUTE_READONLY) { - FileAttributes &= ~FILE_ATTRIBUTE_READONLY; - Set = TRUE; - } - } else { - if (!(FileAttributes & FILE_ATTRIBUTE_READONLY)) { - FileAttributes |= FILE_ATTRIBUTE_READONLY; - Set = TRUE; - } - } - if (Set && SetFileAttributesA(filename, FileAttributes) == FALSE) { - _dosmaperr(GetLastError()); - return -1; - } - return 0; -} diff --git a/reactos/lib/msvcrt/io/chsize.c b/reactos/lib/msvcrt/io/chsize.c deleted file mode 100644 index 678c0f5e24e..00000000000 --- a/reactos/lib/msvcrt/io/chsize.c +++ /dev/null @@ -1,18 +0,0 @@ -/* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */ -#include - -#define NDEBUG -#include - -/* - * @implemented - */ -int _chsize(int _fd, long size) -{ - DPRINT("_chsize(fd %d, size %d)\n", _fd, size); - if (lseek(_fd, size, 0) == -1) - return -1; - if (_write(_fd, 0, 0) < 0) - return -1; - return 0; -} diff --git a/reactos/lib/msvcrt/io/close.c b/reactos/lib/msvcrt/io/close.c deleted file mode 100644 index 9388877e866..00000000000 --- a/reactos/lib/msvcrt/io/close.c +++ /dev/null @@ -1,19 +0,0 @@ -#include "precomp.h" -#include -#include - -#define NDEBUG -#include - -/* - * @implemented - */ -int _close(int _fd) -{ - DPRINT("_close(fd %d)\n", _fd); - if (_fd == -1) - return -1; - if (CloseHandle(_get_osfhandle(_fd)) == FALSE) - return -1; - return __fileno_close(_fd); -} diff --git a/reactos/lib/msvcrt/io/commit.c b/reactos/lib/msvcrt/io/commit.c deleted file mode 100644 index 3eaa4b4e585..00000000000 --- a/reactos/lib/msvcrt/io/commit.c +++ /dev/null @@ -1,18 +0,0 @@ -#include "precomp.h" -#include -#include -#include - - -/* - * @implemented - */ -int _commit(int _fd) -{ - if (! FlushFileBuffers(_get_osfhandle(_fd)) ) { - __set_errno(EBADF); - return -1; - } - - return 0; -} diff --git a/reactos/lib/msvcrt/io/create.c b/reactos/lib/msvcrt/io/create.c deleted file mode 100644 index b8e0bd0c8c1..00000000000 --- a/reactos/lib/msvcrt/io/create.c +++ /dev/null @@ -1,15 +0,0 @@ -#include -#include - -#define NDEBUG -#include - - -/* - * @implemented - */ -int _creat(const char* filename, int mode) -{ - DPRINT("_creat('%s', mode %x)\n", filename, mode); - return _open(filename,_O_CREAT|_O_TRUNC,mode); -} diff --git a/reactos/lib/msvcrt/io/dup.c b/reactos/lib/msvcrt/io/dup.c deleted file mode 100644 index bd9a55e4f6b..00000000000 --- a/reactos/lib/msvcrt/io/dup.c +++ /dev/null @@ -1,40 +0,0 @@ -#include "precomp.h" -#include -#include -#include - - -/* - * @implemented - */ -int _dup(int handle) -{ - HANDLE hFile; - HANDLE hProcess = GetCurrentProcess(); - BOOL result; - int fd; - - hFile = _get_osfhandle(handle); - if (hFile == INVALID_HANDLE_VALUE) { - __set_errno(EBADF); - return -1; - } - result = DuplicateHandle(hProcess, - hFile, - hProcess, - &hFile, - 0, - TRUE, - DUPLICATE_SAME_ACCESS); - if (result == FALSE) { - _dosmaperr(GetLastError()); - return -1; - } - - fd = __fileno_alloc(hFile, __fileno_getmode(handle)); - if (fd < 0) - { - CloseHandle(hFile); - } - return fd; -} diff --git a/reactos/lib/msvcrt/io/dup2.c b/reactos/lib/msvcrt/io/dup2.c deleted file mode 100644 index 1571b54543d..00000000000 --- a/reactos/lib/msvcrt/io/dup2.c +++ /dev/null @@ -1,10 +0,0 @@ -#include -#include - -/* - * @implemented - */ -int _dup2(int handle1, int handle2) -{ - return __fileno_dup2(handle1, handle2); -} diff --git a/reactos/lib/msvcrt/io/eof.c b/reactos/lib/msvcrt/io/eof.c deleted file mode 100644 index 827df20bf71..00000000000 --- a/reactos/lib/msvcrt/io/eof.c +++ /dev/null @@ -1,17 +0,0 @@ -#include - -/* - * @implemented - */ -int _eof(int _fd) -{ - __int64 cur_pos = _lseeki64(_fd, 0, SEEK_CUR); - __int64 end_pos = _lseeki64(_fd, 0, SEEK_END); - if ( cur_pos == -1 || end_pos == -1) - return -1; - - if (cur_pos == end_pos) - return 1; - - return 0; -} diff --git a/reactos/lib/msvcrt/io/filelen.c b/reactos/lib/msvcrt/io/filelen.c deleted file mode 100644 index d54547ad93c..00000000000 --- a/reactos/lib/msvcrt/io/filelen.c +++ /dev/null @@ -1,20 +0,0 @@ -#include "precomp.h" -#include -#include - - -/* - * @implemented - */ -long _filelength(int _fd) -{ - DWORD len = GetFileSize(_get_osfhandle(_fd), NULL); - if (len == INVALID_FILE_SIZE) { - DWORD oserror = GetLastError(); - if (oserror != 0) { - _dosmaperr(oserror); - return -1L; - } - } - return (long)len; -} diff --git a/reactos/lib/msvcrt/io/fileleni.c b/reactos/lib/msvcrt/io/fileleni.c deleted file mode 100644 index 5012eca585b..00000000000 --- a/reactos/lib/msvcrt/io/fileleni.c +++ /dev/null @@ -1,22 +0,0 @@ -#include "precomp.h" -#include -#include - - -/* - * @implemented - */ -__int64 _filelengthi64(int _fd) -{ - DWORD lo_length, hi_length; - - lo_length = GetFileSize(_get_osfhandle(_fd), &hi_length); - if (lo_length == INVALID_FILE_SIZE) { - DWORD oserror = GetLastError(); - if (oserror != 0) { - _dosmaperr(oserror); - return (__int64)-1; - } - } - return((((__int64)hi_length) << 32) + lo_length); -} diff --git a/reactos/lib/msvcrt/io/find.c b/reactos/lib/msvcrt/io/find.c deleted file mode 100644 index ba06105fc0b..00000000000 --- a/reactos/lib/msvcrt/io/find.c +++ /dev/null @@ -1,89 +0,0 @@ -#include "precomp.h" -#include -#include -#include - - -/* - * @implemented - */ -int _findclose(int handle) -{ - // check no wildcards or invalid handle - if (handle == 0 || handle == -1) - return 0; - return FindClose((void*)handle); -} - -/* - * @implemented - */ -int _findfirst(const char* _name, struct _finddata_t* result) -{ - WIN32_FIND_DATAA FindFileData; - char dir[MAX_PATH]; - long hFindFile; - int len = 0; - - if (_name == NULL || _name[0] == 0) { - len = GetCurrentDirectoryA(MAX_PATH-4,dir); - if (dir[len-1] != '\\') { - dir[len] = '\\'; - dir[len+1] = 0; - } - strcat(dir,"*.*"); - } else { - strcpy(dir,_name); - } - - hFindFile = (long)FindFirstFileA(dir, &FindFileData); - if (hFindFile == -1) { - memset(result,0,sizeof(struct _finddata_t)); - _dosmaperr(GetLastError()); - return -1; - } - - result->attrib = FindFileData.dwFileAttributes; - result->time_create = FileTimeToUnixTime(&FindFileData.ftCreationTime,NULL); - result->time_access = FileTimeToUnixTime(&FindFileData.ftLastAccessTime,NULL); - result->time_write = FileTimeToUnixTime(&FindFileData.ftLastWriteTime,NULL); - result->size = FindFileData.nFileSizeLow; - strncpy(result->name,FindFileData.cFileName,MAX_PATH); - - // if no wildcard the find file handle can be closed right away - // a return value of 0 can flag this. - - if (!strchr(dir,'*') && !strchr(dir,'?')) { - _findclose(hFindFile); - return 0; - } - - return hFindFile; -} - -/* - * @implemented - */ -int _findnext(int handle, struct _finddata_t* result) -{ - WIN32_FIND_DATAA FindFileData; - - // check no wildcards or invalid handle - if (handle == 0 || handle == -1) - return 0; - - if (!FindNextFileA((void*)handle, &FindFileData)) { - _dosmaperr(GetLastError()); - return -1; - } - - result->attrib = FindFileData.dwFileAttributes; - result->time_create = FileTimeToUnixTime(&FindFileData.ftCreationTime,NULL); - result->time_access = FileTimeToUnixTime(&FindFileData.ftLastAccessTime,NULL); - result->time_write = FileTimeToUnixTime(&FindFileData.ftLastWriteTime,NULL); - result->size = FindFileData.nFileSizeLow; - strncpy(result->name,FindFileData.cFileName, MAX_PATH); - - return 0; -} - diff --git a/reactos/lib/msvcrt/io/fmode.c b/reactos/lib/msvcrt/io/fmode.c deleted file mode 100644 index 811f361b184..00000000000 --- a/reactos/lib/msvcrt/io/fmode.c +++ /dev/null @@ -1,14 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include -#include - -#undef _fmode -unsigned int _fmode = O_TEXT; - -/* - * @implemented - */ -unsigned int *__p__fmode(void) -{ - return &_fmode; -} diff --git a/reactos/lib/msvcrt/io/isatty.c b/reactos/lib/msvcrt/io/isatty.c deleted file mode 100644 index a1d67b85289..00000000000 --- a/reactos/lib/msvcrt/io/isatty.c +++ /dev/null @@ -1,19 +0,0 @@ -#include -#include - -#define NDEBUG -#include - -/* - * @implemented - */ -int _isatty( int fd ) -{ - struct stat buf; - DPRINT("_isatty(fd %d)\n", fd); - if (_fstat (fd, &buf) < 0) - return 0; - if (S_ISCHR (buf.st_mode)) - return 1; - return 0; -} diff --git a/reactos/lib/msvcrt/io/locking.c b/reactos/lib/msvcrt/io/locking.c deleted file mode 100644 index 6d82811ef21..00000000000 --- a/reactos/lib/msvcrt/io/locking.c +++ /dev/null @@ -1,20 +0,0 @@ -#include "precomp.h" -#include -#include - - -/* - * @implemented - */ -int _locking(int _fd, int mode, long nbytes) -{ - long offset = _lseek(_fd, 0L, 1); - if (offset == -1L) - return -1; - if (!LockFile(_get_osfhandle(_fd),offset,0,nbytes,0)) { - _dosmaperr(GetLastError()); - return -1; - } - - return 0; -} diff --git a/reactos/lib/msvcrt/io/lseek.c b/reactos/lib/msvcrt/io/lseek.c deleted file mode 100644 index 2cd2599ea44..00000000000 --- a/reactos/lib/msvcrt/io/lseek.c +++ /dev/null @@ -1,20 +0,0 @@ -#include "precomp.h" -#include -#include - - -/* - * @implemented - */ -long _lseek(int _fildes, long _offset, int _whence) -{ - DWORD newpos = SetFilePointer((HANDLE)filehnd(_fildes), _offset, NULL, _whence); - if (newpos == INVALID_SET_FILE_POINTER) { - DWORD oserror = GetLastError(); - if (oserror != 0) { - _dosmaperr(oserror); - return -1L; - } - } - return newpos; -} diff --git a/reactos/lib/msvcrt/io/lseeki64.c b/reactos/lib/msvcrt/io/lseeki64.c deleted file mode 100644 index 78bfa0507d9..00000000000 --- a/reactos/lib/msvcrt/io/lseeki64.c +++ /dev/null @@ -1,42 +0,0 @@ -#include "precomp.h" -#include -#include - - -//#define SETFILEPOINTEREX_AVAILABLE - -/* - * @implemented - */ -__int64 _lseeki64(int _fildes, __int64 _offset, int _whence) -{ -#ifdef SETFILEPOINTEREX_AVAILABLE - LARGE_INTEGER new_pos; - LARGE_INTEGER offset; - offset.QuadPart = _offset; - -// if (invalid_filehnd(_fildes)) { -// __set_errno ( EBADF ); -// return -1L; -// } - if (SetFilePointerEx((HANDLE)filehnd(_fildes), offset, &new_pos, _whence)) { - } else { - _dosmaperr(error); - return -1L; - } - return new_pos.QuadPart; -#else - //ULONG lo_pos; - //DWORD hi_pos = 0; // must equal 0 or -1 if supplied, -1 for negative 32 seek value - //lo_pos = SetFilePointer((HANDLE)filehnd(_fildes), _offset, &hi_pos, _whence); - //return((((__int64)hi_pos) << 32) + lo_pos); - - LARGE_INTEGER offset; - offset.QuadPart = _offset; - - offset.u.LowPart = SetFilePointer((HANDLE)filehnd(_fildes), - offset.u.LowPart, &offset.u.HighPart, _whence); - return ((((__int64)offset.u.HighPart) << 32) + offset.u.LowPart); - -#endif /*SETFILEPOINTEREX_AVAILABLE*/ -} diff --git a/reactos/lib/msvcrt/io/mktemp.c b/reactos/lib/msvcrt/io/mktemp.c deleted file mode 100644 index b895fa0655a..00000000000 --- a/reactos/lib/msvcrt/io/mktemp.c +++ /dev/null @@ -1,78 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details - * PROJECT: ReactOS system libraries - * FILE: lib/msvcrt/io/mktemp.c - * PURPOSE: Makes a temp file based on a template - * PROGRAMER: DJ Delorie - Boudewijn Dekker - * UPDATE HISTORY: - * 28/12/98: Appropriated for the Reactos Kernel - */ - -/* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */ -/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ - -#include -#include -#include - -#define NDEBUG -#include - - -/* - * @implemented - */ -char* _mktemp(char* _template) -{ - static int count = 0; - char *cp, *dp; - int i, len, xcount, loopcnt; - - DPRINT("_mktemp('%s')\n", _template); - len = strlen (_template); - cp = _template + len; - - xcount = 0; - while (xcount < 6 && cp > _template && cp[-1] == 'X') - xcount++, cp--; - - if (xcount) { - dp = cp; - while (dp > _template && dp[-1] != '/' && dp[-1] != '\\' && dp[-1] != ':') - dp--; - - /* Keep the first characters of the template, but turn the rest into - Xs. */ - while (cp > dp + 8 - xcount) { - *--cp = 'X'; - xcount = (xcount >= 6) ? 6 : 1 + xcount; - } - - /* If dots occur too early -- squash them. */ - while (dp < cp) { - if (*dp == '.') *dp = 'a'; - dp++; - } - - /* Try to add ".tmp" to the filename. Truncate unused Xs. */ - if (cp + xcount + 3 < _template + len) - strcpy (cp + xcount, ".tmp"); - else - cp[xcount] = 0; - - /* This loop can run up to 2<<(5*6) times, or about 10^9 times. */ - for (loopcnt = 0; loopcnt < (1 << (5 * xcount)); loopcnt++) { - int c = count++; - for (i = 0; i < xcount; i++, c >>= 5) - cp[i] = "abcdefghijklmnopqrstuvwxyz012345"[c & 0x1f]; - if (_access(_template,0) == -1) - return _template; - } - } - - /* Failure: truncate the template and return NULL. */ - *_template = 0; - return 0; -} diff --git a/reactos/lib/msvcrt/io/open.c b/reactos/lib/msvcrt/io/open.c deleted file mode 100644 index 96f784e0bfb..00000000000 --- a/reactos/lib/msvcrt/io/open.c +++ /dev/null @@ -1,423 +0,0 @@ -/* $Id$ - * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/msvcrt/io/open.c - * PURPOSE: Opens a file and translates handles to fileno - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 28/12/98: Created - */ - -// rember to interlock the allocation of fileno when making this thread safe - -// possibly store extra information at the handle - -#include "precomp.h" -#if !defined(NDEBUG) && defined(DBG) -#include -#endif -#include -#include -#include -#include -#include -#include -#include -#include - -#define NDEBUG -#include - -//#define _OLD_BUILD_ - -#define STD_AUX_HANDLE 3 -#define STD_PRINTER_HANDLE 4 - - -///////////////////////////////////////// -#if 0 // from perl sources - -#ifndef _INTPTR_T_DEFINED -typedef int intptr_t; -#define _INTPTR_T_DEFINED -#endif - -#ifndef _UINTPTR_T_DEFINED -typedef unsigned int uintptr_t; -#define _UINTPTR_T_DEFINED -#endif - -/* - * Control structure for lowio file handles - */ -typedef struct { - intptr_t osfhnd;/* underlying OS file HANDLE */ - char osfile; /* attributes of file (e.g., open in text mode?) */ - char pipech; /* one char buffer for handles opened on pipes */ - int lockinitflag; - //CRITICAL_SECTION lock; -} ioinfo; - -/* - * Array of arrays of control structures for lowio files. - */ -//ioinfo* __pioinfo[]; -//ioinfo* __pioinfo[] = { NULL }; - -#endif -///////////////////////////////////////// - -typedef struct _fileno_modes_type -{ - HANDLE hFile; - int mode; - char pipech; /* one char buffer for handles opened on pipes */ - int lockinitflag; - /*CRITICAL_SECTION*/int lock; - int fd; -} fileno_modes_type; - -//static fileno_modes_type* fileno_modes = NULL; -fileno_modes_type* __pioinfo = NULL; - -///////////////////////////////////////// -int maxfno = 0; - -char __is_text_file(FILE* p) -{ - if ( p == NULL || __pioinfo == NULL ) - return FALSE; - return (!((p)->_flag&_IOSTRG) && (__pioinfo[(p)->_file].mode&O_TEXT)); -} - -/* - * @implemented - */ -int _open(const char* _path, int _oflag,...) -{ -#if !defined(NDEBUG) && defined(DBG) - va_list arg; - int pmode; -#endif - HANDLE hFile; - DWORD dwDesiredAccess = 0; - DWORD dwShareMode = 0; - DWORD dwCreationDistribution = 0; - DWORD dwFlagsAndAttributes = 0; - SECURITY_ATTRIBUTES sa = {sizeof(SECURITY_ATTRIBUTES), NULL, TRUE}; - -#if !defined(NDEBUG) && defined(DBG) - va_start(arg, _oflag); - pmode = va_arg(arg, int); -#endif - -// DPRINT("_open('%s', %x, (%x))\n", _path, _oflag, pmode); - - if ((_oflag & S_IREAD ) == S_IREAD) - dwShareMode = FILE_SHARE_READ; - else if ((_oflag & S_IWRITE) == S_IWRITE) { - dwShareMode = FILE_SHARE_READ | FILE_SHARE_WRITE; - } - /* - * - * _O_BINARY Opens file in binary (untranslated) mode. (See fopen for a description of binary mode.) - * _O_TEXT Opens file in text (translated) mode. (For more information, see Text and Binary Mode File I/O and fopen.) - * - * _O_APPEND Moves file pointer to end of file before every write operation. - */ -#ifdef _OLD_BUILD_ - if ((_oflag & _O_RDWR) == _O_RDWR) - dwDesiredAccess |= GENERIC_WRITE|GENERIC_READ; - else if ((_oflag & O_RDONLY) == O_RDONLY) - dwDesiredAccess |= GENERIC_READ; - else if ((_oflag & _O_WRONLY) == _O_WRONLY) - dwDesiredAccess |= GENERIC_WRITE ; -#else - if ((_oflag & _O_WRONLY) == _O_WRONLY ) - dwDesiredAccess |= GENERIC_WRITE ; - else if ((_oflag & _O_RDWR) == _O_RDWR ) - dwDesiredAccess |= GENERIC_WRITE|GENERIC_READ; - else //if ((_oflag & O_RDONLY) == O_RDONLY) - dwDesiredAccess |= GENERIC_READ; -#endif - - if (( _oflag & (_O_CREAT | _O_EXCL)) == (_O_CREAT | _O_EXCL)) - dwCreationDistribution |= CREATE_NEW; - - else if ((_oflag & O_TRUNC ) == O_TRUNC) { - if ((_oflag & O_CREAT ) == O_CREAT) - dwCreationDistribution |= CREATE_ALWAYS; - else if ((_oflag & O_RDONLY ) != O_RDONLY) - dwCreationDistribution |= TRUNCATE_EXISTING; - } - else if ((_oflag & _O_APPEND) == _O_APPEND) - dwCreationDistribution |= OPEN_EXISTING; - else if ((_oflag & _O_CREAT) == _O_CREAT) - dwCreationDistribution |= OPEN_ALWAYS; - else - dwCreationDistribution |= OPEN_EXISTING; - - if ((_oflag & _O_RANDOM) == _O_RANDOM ) - dwFlagsAndAttributes |= FILE_FLAG_RANDOM_ACCESS; - if ((_oflag & _O_SEQUENTIAL) == _O_SEQUENTIAL) - dwFlagsAndAttributes |= FILE_FLAG_SEQUENTIAL_SCAN; - if ((_oflag & _O_TEMPORARY) == _O_TEMPORARY) { - dwFlagsAndAttributes |= FILE_FLAG_DELETE_ON_CLOSE; - DPRINT("FILE_FLAG_DELETE_ON_CLOSE\n"); - } - if ((_oflag & _O_SHORT_LIVED) == _O_SHORT_LIVED) { - dwFlagsAndAttributes |= FILE_FLAG_DELETE_ON_CLOSE; - DPRINT("FILE_FLAG_DELETE_ON_CLOSE\n"); - } - if (_oflag & _O_NOINHERIT) - sa.bInheritHandle = FALSE; - - if (dwCreationDistribution == OPEN_EXISTING && - (dwDesiredAccess & (GENERIC_WRITE|GENERIC_READ)) == GENERIC_READ) { - /* Allow always shared read for a file which is opened for read only */ - dwShareMode |= FILE_SHARE_READ; - } - - hFile = CreateFileA(_path, - dwDesiredAccess, - dwShareMode, - &sa, - dwCreationDistribution, - dwFlagsAndAttributes, - NULL); - if (hFile == (HANDLE)-1) { - _dosmaperr(GetLastError()); - return -1; - } - DPRINT("OK\n"); - if (!(_oflag & (_O_TEXT|_O_BINARY))) { - _oflag |= _fmode; - } - return __fileno_alloc(hFile,_oflag); -} - - -int __fileno_alloc(HANDLE hFile, int mode) -{ - int i; - /* Check for bogus values */ - if (hFile < 0) - return -1; - - for (i = 5; i < maxfno; i++) { - if (__pioinfo[i].fd == -1 ) { - __pioinfo[i].fd = i; - __pioinfo[i].mode = mode; - __pioinfo[i].hFile = hFile; - return i; - } - } - - /* See if we need to expand the tables. Check this BEFORE it might fail, - so that when we hit the count'th request, we've already up'd it. */ - if (i == maxfno) { - int oldcount = maxfno; - fileno_modes_type* old_fileno_modes = __pioinfo; - maxfno += 255; - __pioinfo = (fileno_modes_type*)malloc(maxfno * sizeof(fileno_modes_type)); - if (old_fileno_modes != NULL) { - memcpy(__pioinfo, old_fileno_modes, oldcount * sizeof(fileno_modes_type)); - free(old_fileno_modes); - } - memset(__pioinfo + oldcount, -1, (maxfno-oldcount)*sizeof(fileno_modes_type)); - } - - /* Fill in the value */ - __pioinfo[i].fd = i; - __pioinfo[i].mode = mode; - __pioinfo[i].hFile = hFile; - return i; -} - -void* filehnd(int fileno) -{ - if (fileno < 0 || fileno >= maxfno || __pioinfo[fileno].fd == -1) { - return (void*)-1; - } - return __pioinfo[fileno].hFile; -} - -int __fileno_setmode(int _fd, int _newmode) -{ - int m; - if (_fd < 0 || _fd >= maxfno) { - __set_errno(EBADF); - return -1; - } - m = __pioinfo[_fd].mode; - __pioinfo[_fd].mode = _newmode; - return m; -} - -int __fileno_getmode(int _fd) -{ - if (_fd < 0 || _fd >= maxfno) { - __set_errno(EBADF); - return -1; - } - return __pioinfo[_fd].mode; - -} - -int __fileno_close(int _fd) -{ - if (_fd < 0 || _fd >= maxfno) { - __set_errno(EBADF); - return -1; - } - __pioinfo[_fd].fd = -1; - __pioinfo[_fd].hFile = (HANDLE)-1; - return 0; -} - -/* - * @implemented - */ -int _open_osfhandle(void* osfhandle, int flags) -{ - return __fileno_alloc((HANDLE)osfhandle, flags); -} - -/* - * @implemented - */ -void* _get_osfhandle( int fileno ) -{ - return filehnd(fileno); -} - -int __fileno_dup2(int handle1, int handle2) -{ - HANDLE hProcess; - BOOL result; - if (handle1 >= maxfno || handle1 < 0 || handle2 >= maxfno || handle2 < 0) { - __set_errno(EBADF); - return -1; - } - if (__pioinfo[handle1].fd == -1) { - __set_errno(EBADF); - return -1; - } - if (handle1 == handle2) - return handle1; - if (__pioinfo[handle2].fd != -1) { - _close(handle2); - } - hProcess = GetCurrentProcess(); - result = DuplicateHandle(hProcess, - __pioinfo[handle1].hFile, - hProcess, - &__pioinfo[handle2].hFile, - 0, - TRUE, - DUPLICATE_SAME_ACCESS); - if (result) { - __pioinfo[handle2].fd = handle2; - __pioinfo[handle2].mode = __pioinfo[handle1].mode; - switch (handle2) { - case 0: - SetStdHandle(STD_INPUT_HANDLE, __pioinfo[handle2].hFile); - break; - case 1: - SetStdHandle(STD_OUTPUT_HANDLE, __pioinfo[handle2].hFile); - break; - case 2: - SetStdHandle(STD_ERROR_HANDLE, __pioinfo[handle2].hFile); - break; - case 3: - SetStdHandle(STD_AUX_HANDLE, __pioinfo[handle2].hFile); - break; - case 4: - SetStdHandle(STD_AUX_HANDLE, __pioinfo[handle2].hFile); - break; - } - return handle1; - } else { - __set_errno(EMFILE); // Is this the correct error no.? - return -1; - } -} - - -void* malloc(size_t sizeObject); - -BOOL __fileno_init(void) -{ - ULONG count = 0, i; - HANDLE* pFile; - char* pmode; - STARTUPINFOA StInfo; - - GetStartupInfoA(&StInfo); - if (StInfo.lpReserved2 && StInfo.cbReserved2 >= sizeof(ULONG)) { - count = *(ULONG*)StInfo.lpReserved2; -/* - if (sizeof(ULONG) + count * (sizeof(HANDLE) + sizeof(char)) != StInfo.cbReserved2) - { - count = 0; - } -*/ - } - maxfno = 255; - while(count >= maxfno) - maxfno += 255; - - { -#ifdef _OLD_BUILD_ - // why was this here ???? - robd. - int result; - result = malloc(50); -#endif - } - //__pioinfo = (fileno_modes_type*)malloc(sizeof(fileno_modes_type) * maxfno); - __pioinfo = malloc(sizeof(fileno_modes_type) * maxfno); - if (__pioinfo == NULL) { - return FALSE; - } - memset(__pioinfo, -1, sizeof(fileno_modes_type) * maxfno); - if (count) { - pFile = (HANDLE*)(StInfo.lpReserved2 + sizeof(ULONG) + count * sizeof(char)); - pmode = (char*)(StInfo.lpReserved2 + sizeof(ULONG)); - for (i = 0; i < count; i++) { - if (*pFile != INVALID_HANDLE_VALUE) { - __pioinfo[i].fd = i; - __pioinfo[i].mode = ((*pmode << 8) & (_O_TEXT|_O_BINARY)) | (*pmode & _O_ACCMODE); - __pioinfo[i].hFile = *pFile; - } - pFile++; - pmode++; - } - } - if (__pioinfo[0].fd == -1) { - __pioinfo[0].fd = 0; - __pioinfo[0].hFile = GetStdHandle(STD_INPUT_HANDLE); - __pioinfo[0].mode = _O_RDONLY|_O_TEXT; - } - if (__pioinfo[1].fd == -1) { - __pioinfo[1].fd = 1; - __pioinfo[1].hFile = GetStdHandle(STD_OUTPUT_HANDLE); - __pioinfo[1].mode = _O_WRONLY|_O_TEXT; - } - if (__pioinfo[2].fd == -1) { - __pioinfo[2].fd = 2; - __pioinfo[2].hFile = GetStdHandle(STD_ERROR_HANDLE); - __pioinfo[2].mode = _O_WRONLY|_O_TEXT; - } - if (__pioinfo[3].fd == -1) { - __pioinfo[3].fd = 3; - __pioinfo[3].hFile = GetStdHandle(STD_AUX_HANDLE); - __pioinfo[3].mode = _O_WRONLY|_O_TEXT; - } - if (__pioinfo[4].fd == -1) { - __pioinfo[4].fd = 4; - __pioinfo[4].hFile = GetStdHandle(STD_PRINTER_HANDLE); - __pioinfo[4].mode = _O_WRONLY|_O_TEXT; - } - return TRUE; -} diff --git a/reactos/lib/msvcrt/io/pipe.c b/reactos/lib/msvcrt/io/pipe.c deleted file mode 100644 index d0fdb0247a7..00000000000 --- a/reactos/lib/msvcrt/io/pipe.c +++ /dev/null @@ -1,51 +0,0 @@ -/* $Id$ - * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/msvcrt/io/pipe.c - * PURPOSE: Creates a pipe - * PROGRAMER: DJ Delorie - * UPDATE HISTORY: - * 28/12/98: Appropriated for Reactos - */ - -#include "precomp.h" -#include -#include -#include - - -/* - * @implemented - */ -int _pipe(int _fildes[2], unsigned int size, int mode ) -{ - HANDLE hReadPipe, hWritePipe; - SECURITY_ATTRIBUTES sa = {sizeof(SECURITY_ATTRIBUTES), NULL, TRUE}; - - if (mode & O_NOINHERIT) - sa.bInheritHandle = FALSE; - - if (!CreatePipe(&hReadPipe,&hWritePipe,&sa,size)) { - _dosmaperr(GetLastError()); - return -1; - } - - if ((_fildes[0] = __fileno_alloc(hReadPipe, mode)) < 0) - { - CloseHandle(hReadPipe); - CloseHandle(hWritePipe); - __set_errno(EMFILE); - return -1; - } - - if ((_fildes[1] = __fileno_alloc(hWritePipe, mode)) < 0) - { - __fileno_close(_fildes[0]); - CloseHandle(hReadPipe); - CloseHandle(hWritePipe); - __set_errno(EMFILE); - return -1; - } - return 0; -} diff --git a/reactos/lib/msvcrt/io/read.c b/reactos/lib/msvcrt/io/read.c deleted file mode 100644 index c996ae88f07..00000000000 --- a/reactos/lib/msvcrt/io/read.c +++ /dev/null @@ -1,102 +0,0 @@ -/* $Id$ - * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/msvcrt/io/read.c - * PURPOSE: Reads a file - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 28/12/1998: Created - * 03/05/2002: made _read() non-greedy - it now returns as soon as - * any amount of data has been read. It's the expected - * behavior for line-buffered streams (KJK::Hyperion) - */ - -#include "precomp.h" -#include -#include - -#define NDEBUG -#include - -/* - * @implemented - */ -size_t _read(int _fd, void *_buf, size_t _nbyte) -{ - DWORD _rbyte = 0, nbyte = _nbyte; - char *bufp = (char*)_buf; - HANDLE hfile; - int istext, error; - - DPRINT("_read(fd %d, buf %x, nbyte %d)\n", _fd, _buf, _nbyte); - - /* null read */ - if(_nbyte == 0) - return 0; - - hfile = _get_osfhandle(_fd); - istext = __fileno_getmode(_fd) & O_TEXT; - - /* read data */ - if (!ReadFile(hfile, bufp, nbyte, &_rbyte, NULL)) - { - /* failure */ - error = GetLastError(); - if (error == ERROR_BROKEN_PIPE) - { - return 0; - } - _dosmaperr(error); - return -1; - } - - /* text mode */ - if (_rbyte && istext) - { - int found_cr = 0; - int cr = 0; - DWORD count = _rbyte; - - /* repeat for all bytes in the buffer */ - for(; count; bufp++, count--) - { -#if 1 - /* carriage return */ - if (*bufp == '\r') { - found_cr = 1; - if (cr != 0) { - *(bufp - cr) = *bufp; - } - continue; - } - if (found_cr) { - found_cr = 0; - if (*bufp == '\n') { - cr++; - *(bufp - cr) = *bufp; - } else { - } - } else if (cr != 0) { - *(bufp - cr) = *bufp; - } -#else - /* carriage return */ - if (*bufp == '\r') { - cr++; - } - /* shift characters back, to ignore carriage returns */ - else if (cr != 0) { - *(bufp - cr) = *bufp; - } -#endif - } - if (found_cr) { - cr++; - } - /* ignore the carriage returns */ - _rbyte -= cr; - } - DPRINT("%d\n", _rbyte); - return _rbyte; -} diff --git a/reactos/lib/msvcrt/io/setmode.c b/reactos/lib/msvcrt/io/setmode.c deleted file mode 100644 index a64c9394fc7..00000000000 --- a/reactos/lib/msvcrt/io/setmode.c +++ /dev/null @@ -1,27 +0,0 @@ -/* $Id$ - * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/msvcrt/io/setmode.c - * PURPOSE: Sets the file translation mode - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 28/12/98: Created - */ - -#include -#include -#include - -#define NDEBUG -#include - - -/* - * @implemented - */ -int _setmode(int _fd, int _newmode) -{ - DPRINT("_setmod(fd %d, newmode %x)\n", _fd, _newmode); - return __fileno_setmode(_fd, _newmode); -} diff --git a/reactos/lib/msvcrt/io/sopen.c b/reactos/lib/msvcrt/io/sopen.c deleted file mode 100644 index a28f374c256..00000000000 --- a/reactos/lib/msvcrt/io/sopen.c +++ /dev/null @@ -1,10 +0,0 @@ -#include - - -/* - * @implemented - */ -int _sopen(char *path, int access, int shflag, int mode) -{ - return _open((path), (access)|(shflag), (mode)); -} diff --git a/reactos/lib/msvcrt/io/stubs.c b/reactos/lib/msvcrt/io/stubs.c deleted file mode 100644 index aadc2411f4c..00000000000 --- a/reactos/lib/msvcrt/io/stubs.c +++ /dev/null @@ -1 +0,0 @@ -void *__badioinfo; diff --git a/reactos/lib/msvcrt/io/tell.c b/reactos/lib/msvcrt/io/tell.c deleted file mode 100644 index b21c29b4fb9..00000000000 --- a/reactos/lib/msvcrt/io/tell.c +++ /dev/null @@ -1,12 +0,0 @@ -/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ -#include -#include - - -/* - * @implemented - */ -off_t _tell(int _file) -{ - return _lseek(_file, 0, SEEK_CUR); -} diff --git a/reactos/lib/msvcrt/io/telli64.c b/reactos/lib/msvcrt/io/telli64.c deleted file mode 100644 index 9f584d8931d..00000000000 --- a/reactos/lib/msvcrt/io/telli64.c +++ /dev/null @@ -1,11 +0,0 @@ -#include -#include - - -/* - * @implemented - */ -__int64 _telli64(int _file) -{ - return _lseeki64(_file, 0, SEEK_CUR); -} diff --git a/reactos/lib/msvcrt/io/umask.c b/reactos/lib/msvcrt/io/umask.c deleted file mode 100644 index 58bc2f12db8..00000000000 --- a/reactos/lib/msvcrt/io/umask.c +++ /dev/null @@ -1,14 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include - -unsigned _unMode_dll = 022; - -/* - * @implemented - */ -unsigned _umask (unsigned unMode) -{ - unsigned old_mask = _unMode_dll; - _unMode_dll = unMode; - return old_mask; -} diff --git a/reactos/lib/msvcrt/io/unlink.c b/reactos/lib/msvcrt/io/unlink.c deleted file mode 100644 index 48e777f233a..00000000000 --- a/reactos/lib/msvcrt/io/unlink.c +++ /dev/null @@ -1,29 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/msvcrt/io/unlink.c - * PURPOSE: Deletes a file - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 28/12/98: Created - */ - -#include "precomp.h" -#include - -#define NDEBUG -#include - - -/* - * @implemented - */ -int _unlink(const char* filename) -{ - DPRINT("_unlink('%s')\n", filename); - if (!DeleteFileA(filename)) { - _dosmaperr(GetLastError()); - return -1; - } - return 0; -} diff --git a/reactos/lib/msvcrt/io/utime.c b/reactos/lib/msvcrt/io/utime.c deleted file mode 100644 index 326e1fdae1e..00000000000 --- a/reactos/lib/msvcrt/io/utime.c +++ /dev/null @@ -1,25 +0,0 @@ -#include -#include -#include -#include -#include - - -/* - * @implemented - */ -int _utime(const char* filename, struct _utimbuf* buf) -{ - int fn; - int ret; - - fn = _open(filename, _O_RDWR); - if (fn == -1) { - __set_errno(EBADF); - return -1; - } - ret = _futime(fn, buf); - if (_close(fn) < 0) - return -1; - return ret; -} diff --git a/reactos/lib/msvcrt/io/waccess.c b/reactos/lib/msvcrt/io/waccess.c deleted file mode 100644 index eb673ba14db..00000000000 --- a/reactos/lib/msvcrt/io/waccess.c +++ /dev/null @@ -1,32 +0,0 @@ -#include "precomp.h" -#include -#include -#define NDEBUG -#include - - -/* - * @implemented - */ -int _waccess(const wchar_t *_path, int _amode) -{ - DWORD Attributes = GetFileAttributesW(_path); - - if (Attributes == -1) { - _dosmaperr(GetLastError()); - return -1; - } - if ((_amode & W_OK) == W_OK) { - if ((Attributes & FILE_ATTRIBUTE_READONLY) == FILE_ATTRIBUTE_READONLY) { - __set_errno(EACCES); - return -1; - } - } - if ((_amode & D_OK) == D_OK) { - if ((Attributes & FILE_ATTRIBUTE_DIRECTORY) != FILE_ATTRIBUTE_DIRECTORY) { - __set_errno(EACCES); - return -1; - } - } - return 0; -} diff --git a/reactos/lib/msvcrt/io/wchmod.c b/reactos/lib/msvcrt/io/wchmod.c deleted file mode 100644 index a4df3ed67c0..00000000000 --- a/reactos/lib/msvcrt/io/wchmod.c +++ /dev/null @@ -1,47 +0,0 @@ -#include "precomp.h" -#include - -#define NDEBUG -#include - -#define mode_t int - - -/* - * @implemented - */ -int _wchmod(const wchar_t* filename, mode_t mode) -{ - DWORD FileAttributes = 0; - BOOLEAN Set = FALSE; - - DPRINT("_wchmod('%S', %x)\n", filename, mode); - - FileAttributes = GetFileAttributesW(filename); - if ( FileAttributes == -1 ) { - _dosmaperr(GetLastError()); - return -1; - } - - if ( mode == 0 ) - return -1; - - if (mode & _S_IWRITE) { - if (FileAttributes & FILE_ATTRIBUTE_READONLY) { - FileAttributes &= ~FILE_ATTRIBUTE_READONLY; - Set = TRUE; - } - } else { - if (!(FileAttributes & FILE_ATTRIBUTE_READONLY)) { - FileAttributes |= FILE_ATTRIBUTE_READONLY; - Set = TRUE; - } - } - - if (Set && SetFileAttributesW(filename, FileAttributes) == FALSE) { - _dosmaperr(GetLastError()); - return -1; - } - - return 0; -} diff --git a/reactos/lib/msvcrt/io/wcreate.c b/reactos/lib/msvcrt/io/wcreate.c deleted file mode 100644 index b61d88f9e36..00000000000 --- a/reactos/lib/msvcrt/io/wcreate.c +++ /dev/null @@ -1,15 +0,0 @@ -#include -#include - -#define NDEBUG -#include - - -/* - * @implemented - */ -int _wcreat(const wchar_t* filename, int mode) -{ - DPRINT("_wcreat('%S', mode %x)\n", filename, mode); - return _wopen(filename,_O_CREAT|_O_TRUNC,mode); -} diff --git a/reactos/lib/msvcrt/io/wfind.c b/reactos/lib/msvcrt/io/wfind.c deleted file mode 100644 index 4ade252ae3f..00000000000 --- a/reactos/lib/msvcrt/io/wfind.c +++ /dev/null @@ -1,226 +0,0 @@ -#include "precomp.h" -#include -#include -#include - - -/* - * @implemented - */ -int _wfindfirst(const wchar_t* _name, struct _wfinddata_t* result) -{ - WIN32_FIND_DATAW FindFileData; - wchar_t dir[MAX_PATH]; - long hFindFile; - int len = 0; - - if ( _name == NULL || _name[0] == 0 ) { - len = GetCurrentDirectoryW(MAX_PATH-4, dir); - if (dir[len-1] != L'\\') { - dir[len] = L'\\'; - dir[len+1] = 0; - } - wcscat(dir, L"*.*"); - } else { - wcscpy(dir, _name); - } - - hFindFile = (long)FindFirstFileW(dir, &FindFileData); - if (hFindFile == -1) { - memset(result,0,sizeof(struct _wfinddata_t)); - _dosmaperr(GetLastError()); - return -1; - } - - result->attrib = FindFileData.dwFileAttributes; - result->time_create = FileTimeToUnixTime(&FindFileData.ftCreationTime,NULL); - result->time_access = FileTimeToUnixTime(&FindFileData.ftLastAccessTime,NULL); - result->time_write = FileTimeToUnixTime(&FindFileData.ftLastWriteTime,NULL); - result->size = FindFileData.nFileSizeLow; - wcsncpy(result->name,FindFileData.cFileName,MAX_PATH); - - // if no wildcard the find file handle can be closed right away - // a return value of 0 can flag this. - if (!wcschr(dir, L'*') && !wcschr(dir, L'?')) { - _findclose(hFindFile); - return 0; - } - - return hFindFile; -} - -/* - * @implemented - */ -int _findfirsti64(const char *_name, struct _finddatai64_t *result) -{ - WIN32_FIND_DATAA FindFileData; - char dir[MAX_PATH]; - long hFindFile; - int len = 0; - - if ( _name == NULL || _name[0] == 0 ) - { - len = GetCurrentDirectoryA(MAX_PATH-4,dir); - if (dir[len-1] != '\\') - { - dir[len] = '\\'; - dir[len+1] = 0; - } - strcat(dir, "*.*"); - } - else - strcpy(dir, _name); - - hFindFile = (long)FindFirstFileA(dir, &FindFileData); - if (hFindFile == -1) - { - memset(result,0,sizeof(struct _finddatai64_t)); - _dosmaperr(GetLastError()); - return -1; - } - - result->attrib = FindFileData.dwFileAttributes; - result->time_create = FileTimeToUnixTime(&FindFileData.ftCreationTime,NULL); - result->time_access = FileTimeToUnixTime(&FindFileData.ftLastAccessTime,NULL); - result->time_write = FileTimeToUnixTime(&FindFileData.ftLastWriteTime,NULL); - result->size = - (((__int64)FindFileData.nFileSizeLow)<<32) + FindFileData.nFileSizeLow; - strncpy(result->name,FindFileData.cFileName,MAX_PATH); - - // if no wildcard the find file handle can be closed right away - // a return value of 0 can flag this. - - if (!strchr(dir,'*') && !strchr(dir,'?')) { - _findclose(hFindFile); - return 0; - } - return hFindFile; -} - -/* - * @implemented - */ -int _findnexti64(int handle, struct _finddatai64_t *result) -{ - WIN32_FIND_DATAA FindFileData; - - // check no wildcards or invalid handle - if (handle == 0 || handle == -1) - return 0; - - if (!FindNextFileA((void *)handle, &FindFileData)) { - _dosmaperr(GetLastError()); - return -1; - } - - result->attrib = FindFileData.dwFileAttributes; - result->time_create = FileTimeToUnixTime(&FindFileData.ftCreationTime,NULL); - result->time_access = FileTimeToUnixTime(&FindFileData.ftLastAccessTime,NULL); - result->time_write = FileTimeToUnixTime(&FindFileData.ftLastWriteTime,NULL); - result->size = - (((__int64)FindFileData.nFileSizeLow)<<32) + FindFileData.nFileSizeLow; - strncpy(result->name,FindFileData.cFileName,MAX_PATH); - - return 0; -} - -/* - * @implemented - */ -int _wfindfirsti64(const wchar_t *_name, struct _wfinddatai64_t *result) -{ - WIN32_FIND_DATAW FindFileData; - wchar_t dir[MAX_PATH]; - long hFindFile; - int len = 0; - - if (_name == NULL || _name[0] == 0) - { - len = GetCurrentDirectoryW(MAX_PATH-4,dir); - if (dir[len-1] != L'\\') - { - dir[len] = L'\\'; - dir[len+1] = 0; - } - wcscat(dir, L"*.*"); - } - else - wcscpy(dir, _name); - - hFindFile = (long)FindFirstFileW(dir, &FindFileData); - if (hFindFile == -1) - { - memset(result,0,sizeof(struct _wfinddatai64_t)); - _dosmaperr(GetLastError()); - return -1; - } - - result->attrib = FindFileData.dwFileAttributes; - result->time_create = FileTimeToUnixTime(&FindFileData.ftCreationTime,NULL); - result->time_access = FileTimeToUnixTime(&FindFileData.ftLastAccessTime,NULL); - result->time_write = FileTimeToUnixTime(&FindFileData.ftLastWriteTime,NULL); - result->size = - (((__int64)FindFileData.nFileSizeLow)<<32) + FindFileData.nFileSizeLow; - wcsncpy(result->name,FindFileData.cFileName,MAX_PATH); - - // if no wildcard the find file handle can be closed right away - // a return value of 0 can flag this. - - if (!wcschr(dir,L'*') && !wcschr(dir,L'?')) - { - _findclose(hFindFile); - return 0; - } - - return hFindFile; -} - -/* - * @implemented - */ -int _wfindnext(int handle, struct _wfinddata_t *result) -{ - WIN32_FIND_DATAW FindFileData; - - // check no wildcards or invalid handle - if (handle == 0 || handle == -1) - return 0; - - if (!FindNextFileW((void *)handle, &FindFileData)) - return -1; - - result->attrib = FindFileData.dwFileAttributes; - result->time_create = FileTimeToUnixTime(&FindFileData.ftCreationTime,NULL); - result->time_access = FileTimeToUnixTime(&FindFileData.ftLastAccessTime,NULL); - result->time_write = FileTimeToUnixTime(&FindFileData.ftLastWriteTime,NULL); - result->size = FindFileData.nFileSizeLow; - wcsncpy(result->name,FindFileData.cFileName, MAX_PATH); - - return 0; -} - -/* - * @implemented - */ -int _wfindnexti64(int handle, struct _wfinddatai64_t *result) -{ - WIN32_FIND_DATAW FindFileData; - - // check no wildcards or invalid handle - if (handle == 0 || handle == -1) - return 0; - - if (!FindNextFileW((void *)handle, &FindFileData)) - return -1; - - result->attrib = FindFileData.dwFileAttributes; - result->time_create = FileTimeToUnixTime(&FindFileData.ftCreationTime,NULL); - result->time_access = FileTimeToUnixTime(&FindFileData.ftLastAccessTime,NULL); - result->time_write = FileTimeToUnixTime(&FindFileData.ftLastWriteTime,NULL); - result->size = - (((__int64)FindFileData.nFileSizeLow)<<32) + FindFileData.nFileSizeLow; - wcsncpy(result->name,FindFileData.cFileName,MAX_PATH); - - return 0; -} diff --git a/reactos/lib/msvcrt/io/wmktemp.c b/reactos/lib/msvcrt/io/wmktemp.c deleted file mode 100644 index 75edf72bbe9..00000000000 --- a/reactos/lib/msvcrt/io/wmktemp.c +++ /dev/null @@ -1,78 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details - * PROJECT: ReactOS system libraries - * FILE: lib/msvcrt/io/mktemp.c - * PURPOSE: Makes a temp file based on a template - * PROGRAMER: DJ Delorie - Boudewijn Dekker - * UPDATE HISTORY: - * 28/12/98: Appropriated for the Reactos Kernel - */ - -/* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */ -/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ - -#include -#include -#include - -#define NDEBUG -#include - - -/* - * @implemented - */ -wchar_t* _wmktemp (wchar_t *_template) -{ - static int count = 0; - wchar_t *cp, *dp; - int i, len, xcount, loopcnt; - - DPRINT("_wmktemp('%S')\n", _template); - len = wcslen (_template); - cp = _template + len; - - xcount = 0; - while (xcount < 6 && cp > _template && cp[-1] == L'X') - xcount++, cp--; - - if (xcount) { - dp = cp; - while (dp > _template && dp[-1] != L'/' && dp[-1] != L'\\' && dp[-1] != L':') - dp--; - - /* Keep the first characters of the template, but turn the rest into - Xs. */ - while (cp > dp + 8 - xcount) { - *--cp = L'X'; - xcount = (xcount >= 6) ? 6 : 1 + xcount; - } - - /* If dots occur too early -- squash them. */ - while (dp < cp) { - if (*dp == L'.') *dp = L'a'; - dp++; - } - - /* Try to add ".tmp" to the filename. Truncate unused Xs. */ - if (cp + xcount + 3 < _template + len) - wcscpy (cp + xcount, L".tmp"); - else - cp[xcount] = 0; - - /* This loop can run up to 2<<(5*6) times, or about 10^9 times. */ - for (loopcnt = 0; loopcnt < (1 << (5 * xcount)); loopcnt++) { - int c = count++; - for (i = 0; i < xcount; i++, c >>= 5) - cp[i] = L"abcdefghijklmnopqrstuvwxyz012345"[c & 0x1f]; - if (_waccess(_template,0) == -1) - return _template; - } - } - - /* Failure: truncate the template and return NULL. */ - *_template = 0; - return 0; -} diff --git a/reactos/lib/msvcrt/io/wopen.c b/reactos/lib/msvcrt/io/wopen.c deleted file mode 100644 index f5c2fa398da..00000000000 --- a/reactos/lib/msvcrt/io/wopen.c +++ /dev/null @@ -1,148 +0,0 @@ -/* $Id$ - * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/msvcrt/io/open.c - * PURPOSE: Opens a file and translates handles to fileno - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 28/12/98: Created - */ - -// rember to interlock the allocation of fileno when making this thread safe -// possibly store extra information at the handle - -#include "precomp.h" -#if !defined(NDEBUG) && defined(DBG) -#include -#endif -#include -#include -#include -#include -#include -#include -#include -#include - -#define NDEBUG -#include - - -/* - * @implemented - */ -int _wopen(const wchar_t* _path, int _oflag, ...) -{ -#if !defined(NDEBUG) && defined(DBG) - va_list arg; - int pmode; -#endif - HANDLE hFile; - DWORD dwDesiredAccess = 0; - DWORD dwShareMode = 0; - DWORD dwCreationDistribution = 0; - DWORD dwFlagsAndAttributes = 0; - SECURITY_ATTRIBUTES sa = {sizeof(SECURITY_ATTRIBUTES), NULL, TRUE}; - -#if !defined(NDEBUG) && defined(DBG) - va_start(arg, _oflag); - pmode = va_arg(arg, int); -#endif - -// DPRINT("_wopen('%S', %x, (%x))\n", _path, _oflag, pmode); - - if ((_oflag & S_IREAD) == S_IREAD) - dwShareMode = FILE_SHARE_READ; - else if ( ( _oflag & S_IWRITE) == S_IWRITE) { - dwShareMode = FILE_SHARE_READ | FILE_SHARE_WRITE; - } - - /* - * - * _O_BINARY Opens file in binary (untranslated) mode. (See fopen for a description of binary mode.) - * _O_TEXT Opens file in text (translated) mode. (For more information, see Text and Binary Mode File I/O and fopen.) - * - * _O_APPEND Moves file pointer to end of file before every write operation. - */ -#if 0 - if ((_oflag & _O_RDWR) == _O_RDWR) - dwDesiredAccess |= GENERIC_WRITE|GENERIC_READ | FILE_READ_DATA | - FILE_WRITE_DATA | FILE_READ_ATTRIBUTES | - FILE_WRITE_ATTRIBUTES; - else if ((_oflag & O_RDONLY) == O_RDONLY) - dwDesiredAccess |= GENERIC_READ | FILE_READ_DATA | FILE_READ_ATTRIBUTES | - FILE_WRITE_ATTRIBUTES; - else if ((_oflag & _O_WRONLY) == _O_WRONLY) - dwDesiredAccess |= GENERIC_WRITE | FILE_WRITE_DATA | - FILE_READ_ATTRIBUTES | FILE_WRITE_ATTRIBUTES; -#else - if ((_oflag & _O_WRONLY) == _O_WRONLY) - dwDesiredAccess |= GENERIC_WRITE | FILE_WRITE_DATA | - FILE_READ_ATTRIBUTES | FILE_WRITE_ATTRIBUTES; - else if ((_oflag & _O_RDWR) == _O_RDWR) - dwDesiredAccess |= GENERIC_WRITE|GENERIC_READ | FILE_READ_DATA | - FILE_WRITE_DATA | FILE_READ_ATTRIBUTES | - FILE_WRITE_ATTRIBUTES; - else //if ((_oflag & O_RDONLY) == O_RDONLY) - dwDesiredAccess |= GENERIC_READ | FILE_READ_DATA | FILE_READ_ATTRIBUTES | - FILE_WRITE_ATTRIBUTES; -#endif - - if ((_oflag & S_IREAD) == S_IREAD) - dwShareMode |= FILE_SHARE_READ; - - if ((_oflag & S_IWRITE) == S_IWRITE) - dwShareMode |= FILE_SHARE_WRITE; - - if ((_oflag & (_O_CREAT | _O_EXCL)) == (_O_CREAT | _O_EXCL)) - dwCreationDistribution |= CREATE_NEW; - - else if ((_oflag & O_TRUNC) == O_TRUNC) { - if ((_oflag & O_CREAT) == O_CREAT) - dwCreationDistribution |= CREATE_ALWAYS; - else if ((_oflag & O_RDONLY) != O_RDONLY) - dwCreationDistribution |= TRUNCATE_EXISTING; - } - else if ((_oflag & _O_APPEND) == _O_APPEND) - dwCreationDistribution |= OPEN_EXISTING; - else if ((_oflag & _O_CREAT) == _O_CREAT) - dwCreationDistribution |= OPEN_ALWAYS; - else - dwCreationDistribution |= OPEN_EXISTING; - - if ((_oflag & _O_RANDOM) == _O_RANDOM) - dwFlagsAndAttributes |= FILE_FLAG_RANDOM_ACCESS; - if ((_oflag & _O_SEQUENTIAL) == _O_SEQUENTIAL) - dwFlagsAndAttributes |= FILE_FLAG_SEQUENTIAL_SCAN; - - if ((_oflag & _O_TEMPORARY) == _O_TEMPORARY) - dwFlagsAndAttributes |= FILE_FLAG_DELETE_ON_CLOSE; - - if ((_oflag & _O_SHORT_LIVED) == _O_SHORT_LIVED) - dwFlagsAndAttributes |= FILE_FLAG_DELETE_ON_CLOSE; - - if (_oflag & _O_NOINHERIT) - sa.bInheritHandle = FALSE; - - hFile = CreateFileW(_path, - dwDesiredAccess, - dwShareMode, - &sa, - dwCreationDistribution, - dwFlagsAndAttributes, - NULL); - if (hFile == (HANDLE)-1) { - _dosmaperr(GetLastError()); - return -1; - } - return __fileno_alloc(hFile,_oflag); -} - -/* - * @implemented - */ -int _wsopen(wchar_t* path, int access, int shflag, int mode) -{ - return _wopen((path), (access)|(shflag), (mode)); -} diff --git a/reactos/lib/msvcrt/io/write.c b/reactos/lib/msvcrt/io/write.c deleted file mode 100644 index f17924ee955..00000000000 --- a/reactos/lib/msvcrt/io/write.c +++ /dev/null @@ -1,103 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/msvcrt/io/write.c - * PURPOSE: Writes to a file - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 28/12/98: Created - */ - -#include "precomp.h" -#include -#include -#include -#include -#include - -#define NDEBUG -#include - -#define BUFSIZE 4096 -/* -void ReportLastError(void) -{ - DWORD error = GetLastError(); - if (error != ERROR_SUCCESS) { - PTSTR msg; - if (FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER|FORMAT_MESSAGE_FROM_SYSTEM, - 0, error, MAKELANGID(LANG_NEUTRAL,SUBLANG_DEFAULT), (PTSTR)&msg, 0, NULL)) { - printf("ReportLastError() %d - %s\n", error, msg); - } else { - printf("ReportLastError() %d - unknown error\n", error); - } - LocalFree(msg); - } -} - */ -/* - * @implemented - */ -size_t _write(int _fd, const void* _buf, size_t _nbyte) -{ - char *tmp, *in, *out; - int result; - unsigned int count; - DWORD wbyte; - - DPRINT("_write(fd %d, buf %x, nbyte %d)\n", _fd, _buf, _nbyte); - if (__fileno_getmode(_fd) & O_TEXT) { - result = _nbyte; - tmp = (char*) malloc(BUFSIZE); - if (tmp == NULL) { - __set_errno(ENOMEM); - return -1; - } - count = BUFSIZE; - out = tmp; - in = (char*) _buf; - while (_nbyte--) { - if (*in == 0x0a) { - *out++ = 0x0d; - count--; - if (count == 0) { - if (!WriteFile(_get_osfhandle(_fd), tmp, BUFSIZE, &wbyte, NULL)) { - //ReportLastError(); - _dosmaperr(GetLastError()); - result = -1; - break; - } - if (wbyte < BUFSIZE) { - result = in - (char*)_buf; - break; - } - count = BUFSIZE; - out = tmp; - } - } - *out++ = *in++; - count--; - if (count == 0 || _nbyte == 0) { - if (!WriteFile(_get_osfhandle(_fd), tmp, BUFSIZE - count, &wbyte, NULL)) { - _dosmaperr(GetLastError()); - result = -1; - break; - } - if (wbyte < (BUFSIZE - count)) { - result = in - (char*)_buf; - break; - } - count = BUFSIZE; - out = tmp; - } - } - free(tmp); - return result; - } else { - if(!WriteFile(_get_osfhandle(_fd), _buf, _nbyte, &wbyte, NULL)) { - _dosmaperr(GetLastError()); - return -1; - } - return wbyte; - } -} diff --git a/reactos/lib/msvcrt/io/wunlink.c b/reactos/lib/msvcrt/io/wunlink.c deleted file mode 100644 index c59186ddc58..00000000000 --- a/reactos/lib/msvcrt/io/wunlink.c +++ /dev/null @@ -1,29 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/msvcrt/io/unlink.c - * PURPOSE: Deletes a file - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 28/12/98: Created - */ - -#include "precomp.h" -#include - -#define NDEBUG -#include -#include - -/* - * @implemented - */ -int _wunlink(const wchar_t* filename) -{ - DPRINT("_wunlink('%S')\n", filename); - if (!DeleteFileW(filename)) { - _dosmaperr(GetLastError()); - return -1; - } - return 0; -} diff --git a/reactos/lib/msvcrt/io/wutime.c b/reactos/lib/msvcrt/io/wutime.c deleted file mode 100644 index 452769b884a..00000000000 --- a/reactos/lib/msvcrt/io/wutime.c +++ /dev/null @@ -1,25 +0,0 @@ -#include -#include -#include -#include -#include - - -/* - * @implemented - */ -int _wutime(const wchar_t* filename, struct _utimbuf* buf) -{ - int fn; - int ret; - - fn = _wopen(filename, _O_RDWR); - if (fn == -1) { - __set_errno(EBADF); - return -1; - } - ret = _futime(fn, buf); - if (_close(fn) < 0) - return -1; - return ret; -} diff --git a/reactos/lib/msvcrt/locale/locale.c b/reactos/lib/msvcrt/locale/locale.c deleted file mode 100644 index 642f22011fd..00000000000 --- a/reactos/lib/msvcrt/locale/locale.c +++ /dev/null @@ -1,203 +0,0 @@ -#include "precomp.h" -#include -#include -#include -#include -#include -#include - -#define NDEBUG -#include - -unsigned int __setlc_active; -unsigned int __unguarded_readlc_active; -int _current_category; /* used by setlocale */ -const char *_current_locale; - -int parse_locale(char *locale, char *lang, char *country, char *code_page); - -/* - * @unimplemented - */ -char *setlocale(int category, const char *locale) -{ - char lang[100]; - char country[100]; - char code_page[100]; - if (NULL != locale) { - parse_locale((char *)locale,lang,country,code_page); - } - - //printf("%s %s %s %s\n",locale,lang,country,code_page); - - - switch ( category ) - { - case LC_COLLATE: - break; - case LC_CTYPE: - break; - case LC_MONETARY: - break; - case LC_NUMERIC: - break; - case LC_TIME: - break; - case LC_ALL: - break; - default: - break; - } - - return "C"; - -} - -/* - -locale "lang[_country[.code_page]]" - | ".code_page" - | "" - | NULL - -*/ -int parse_locale(char *locale, char *lang, char *country, char *code_page) -{ - while ( *locale != 0 && *locale != '.' && *locale != '_' ) - { - *lang = *locale; - lang++; - locale++; - } - *lang = 0; - if ( *locale == '_' ) { - locale++; - while ( *locale != 0 && *locale != '.' ) - { - *country = *locale; - country++; - locale++; - } - } - *country = 0; - - - if ( *locale == '.' ) { - locale++; - while ( *locale != 0 && *locale != '.' ) - { - *code_page = *locale; - code_page++; - locale++; - } - } - - *code_page = 0; - return 0; -} - -const struct map_lcid2str { - short langid; - const char *langname; - const char *country; -} languages[]={ - {0x0409,"English", "United States"}, - {0x0809,"English", "United Kingdom"}, - {0x0000,"Unknown", "Unknown"} - -}; - -const struct map_cntr { - const char *abrev; - const char *country; -} abrev[] = { - {"britain", "united kingdom"}, - {"england", "united kingdom"}, - {"gbr", "united kingdom"}, - {"great britain", "united kingdom"}, - {"uk", "united kingdom"}, - {"united kingdom", "united kingdom"}, - {"united-kingdom", "united kingdom"}, - {"america", "united states" }, - {"united states", "united states"}, - {"united-states", "united states"}, - {"us", "united states"}, - {"usa" "united states"} -}; - - -struct lconv _lconv = { -".", // decimal_point -",", // thousands_sep -"", // grouping; -"DOL", // int_curr_symbol -"$", // currency_symbol -".", // mon_decimal_point -",", // mon_thousands_sep -"", // mon_grouping; -"+", // positive_sign -"-", // negative_sign -127, // int_frac_digits -127, // frac_digits -127, // p_cs_precedes -127, // p_sep_by_space -127, // n_cs_precedes -127, // n_sep_by_space -127, // p_sign_posn; -127 // n_sign_posn; -}; - -/* - * @implemented - */ -struct lconv *localeconv(void) -{ - return (struct lconv *) &_lconv; -} - -/********************************************************************* - * _setmbcp (MSVCRT.@) - * - * @unimplemented - */ -void _setmbcp(int cp) -{ -DPRINT1("_setmbcp - stub\n"); -return; -} - - -/********************************************************************* - * __lc_collate_cp (MSVCRT.@) - * - * @unimplemented - */ -void __lc_collate_cp(int cp) -{ -DPRINT1("__lc_collate_cp - stub\n"); -return; -} - - -/********************************************************************* - * __lc_handle (MSVCRT.@) - * - * @unimplemented - */ -void __lc_handle(void) -{ -DPRINT1("__lc_handle - stub\n"); -return; -} - - -/********************************************************************* - * __lc_codepage (MSVCRT.@) - * - * @unimplemented - */ -void __lc_codepage(void) -{ -DPRINT1("__lc_codepage - stub\n"); -return; -} diff --git a/reactos/lib/msvcrt/math/acos.c b/reactos/lib/msvcrt/math/acos.c deleted file mode 100644 index 23376a6116c..00000000000 --- a/reactos/lib/msvcrt/math/acos.c +++ /dev/null @@ -1,27 +0,0 @@ -/* Math functions for i387. - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by John C. Bowman , 1995. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - The GNU C 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include - - -double acos(double __x) -{ - return atan2(sqrt(1.0 - __x * __x), __x); -} diff --git a/reactos/lib/msvcrt/math/adjust.c b/reactos/lib/msvcrt/math/adjust.c deleted file mode 100644 index f27c82511de..00000000000 --- a/reactos/lib/msvcrt/math/adjust.c +++ /dev/null @@ -1,7 +0,0 @@ -/* $Id$ - * - */ - -int _adjust_fdiv = 0; - -/* EOF */ diff --git a/reactos/lib/msvcrt/math/asin.c b/reactos/lib/msvcrt/math/asin.c deleted file mode 100644 index fa57df2850c..00000000000 --- a/reactos/lib/msvcrt/math/asin.c +++ /dev/null @@ -1,27 +0,0 @@ -/* Math functions for i387. - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by John C. Bowman , 1995. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - The GNU C 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include - - -double asin(double __x) -{ - return atan2(__x, sqrt(1.0 - __x * __x)); -} diff --git a/reactos/lib/msvcrt/math/atan.c b/reactos/lib/msvcrt/math/atan.c deleted file mode 100644 index af0e219e728..00000000000 --- a/reactos/lib/msvcrt/math/atan.c +++ /dev/null @@ -1,37 +0,0 @@ -/* Math functions for i387. - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by John C. Bowman , 1995. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - The GNU C 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include - -double atan (double __x); - -double atan (double __x) -{ - register double __value; -#ifdef __GNUC__ - __asm __volatile__ - ("fld1\n\t" - "fpatan" - : "=t" (__value) : "0" (__x)); -#else - __value = linkme_atan(__x); -#endif /*__GNUC__*/ - return __value; -} diff --git a/reactos/lib/msvcrt/math/atan2.c b/reactos/lib/msvcrt/math/atan2.c deleted file mode 100644 index 8ce57f1e433..00000000000 --- a/reactos/lib/msvcrt/math/atan2.c +++ /dev/null @@ -1,21 +0,0 @@ - -#include - -double atan2 (double __y, double __x); - -/* - * @implemented - */ -double atan2 (double __y, double __x) -{ - register double __value; -#ifdef __GNUC__ - __asm __volatile__ - ("fpatan\n\t" - "fld %%st(0)" - : "=t" (__value) : "0" (__x), "u" (__y)); -#else - __value = linkme_atan2(__x, __y); -#endif /*__GNUC__*/ - return __value; -} diff --git a/reactos/lib/msvcrt/math/cabs.c b/reactos/lib/msvcrt/math/cabs.c deleted file mode 100644 index ca9e8426c73..00000000000 --- a/reactos/lib/msvcrt/math/cabs.c +++ /dev/null @@ -1,14 +0,0 @@ -#include - -/* - * @implemented - */ -double _cabs( struct _complex z ) -{ - return sqrt( z.x*z.x + z.y*z.y ); -// return hypot(z.x,z.y); -} - - - - diff --git a/reactos/lib/msvcrt/math/ceil.c b/reactos/lib/msvcrt/math/ceil.c deleted file mode 100644 index 5a1b1113910..00000000000 --- a/reactos/lib/msvcrt/math/ceil.c +++ /dev/null @@ -1,21 +0,0 @@ -#include - -/* - * @implemented - */ -double ceil (double __x) -{ - register double __value; -#ifdef __GNUC__ - __volatile unsigned short int __cw, __cwtmp; - - __asm __volatile ("fnstcw %0" : "=m" (__cw)); - __cwtmp = (__cw & 0xf3ff) | 0x0800; /* rounding up */ - __asm __volatile ("fldcw %0" : : "m" (__cwtmp)); - __asm __volatile ("frndint" : "=t" (__value) : "0" (__x)); - __asm __volatile ("fldcw %0" : : "m" (__cw)); -#else - __value = linkme_ceil(__x); -#endif /*__GNUC__*/ - return __value; -} diff --git a/reactos/lib/msvcrt/math/cos.c b/reactos/lib/msvcrt/math/cos.c deleted file mode 100644 index 131fa2dbdb0..00000000000 --- a/reactos/lib/msvcrt/math/cos.c +++ /dev/null @@ -1,19 +0,0 @@ -#include - -double cos (double __x); - -/* - * @implemented - */ -double cos (double __x) -{ - register double __value; -#ifdef __GNUC__ - __asm __volatile__ - ("fcos" - : "=t" (__value): "0" (__x)); -#else - __value = linkme_cos(__x); -#endif /*__GNUC__*/ - return __value; -} diff --git a/reactos/lib/msvcrt/math/cosh.c b/reactos/lib/msvcrt/math/cosh.c deleted file mode 100644 index a21e717cadc..00000000000 --- a/reactos/lib/msvcrt/math/cosh.c +++ /dev/null @@ -1,12 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include - - -/* - * @implemented - */ -double cosh(double x) -{ - const double ebig = exp(fabs(x)); - return (ebig + 1.0/ebig) / 2.0; -} diff --git a/reactos/lib/msvcrt/math/exp.c b/reactos/lib/msvcrt/math/exp.c deleted file mode 100644 index 2707cf8ca3a..00000000000 --- a/reactos/lib/msvcrt/math/exp.c +++ /dev/null @@ -1,47 +0,0 @@ -/* Math functions for i387. - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by John C. Bowman , 1995. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - The GNU C 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include - -double exp (double __x); - -double exp (double __x) -{ -#ifdef __GNUC__ - register double __value, __exponent; - __asm __volatile__ - ("fldl2e # e^x = 2^(x * log2(e))\n\t" - "fmul %%st(1) # x * log2(e)\n\t" - "fst %%st(1)\n\t" - "frndint # int(x * log2(e))\n\t" - "fxch\n\t" - "fsub %%st(1) # fract(x * log2(e))\n\t" - "f2xm1 # 2^(fract(x * log2(e))) - 1\n\t" - : "=t" (__value), "=u" (__exponent) : "0" (__x)); - __value += 1.0; - __asm __volatile__ - ("fscale" - : "=t" (__value) : "0" (__value), "u" (__exponent)); - - return __value; -#else - return linkme_exp(__x); -#endif /*__GNUC__*/ -} diff --git a/reactos/lib/msvcrt/math/fabs.c b/reactos/lib/msvcrt/math/fabs.c deleted file mode 100644 index 5db505ad11b..00000000000 --- a/reactos/lib/msvcrt/math/fabs.c +++ /dev/null @@ -1,36 +0,0 @@ -/* Math functions for i387. - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by John C. Bowman , 1995. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - The GNU C 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include - -double fabs (double __x); - -double fabs (double __x) -{ - register double __value; -#ifdef __GNUC__ - __asm __volatile__ - ("fabs" - : "=t" (__value) : "0" (__x)); -#else - __value = linkme_fabs(__x); -#endif /*__GNUC__*/ - return __value; -} diff --git a/reactos/lib/msvcrt/math/floor.c b/reactos/lib/msvcrt/math/floor.c deleted file mode 100644 index 4635ad86b3f..00000000000 --- a/reactos/lib/msvcrt/math/floor.c +++ /dev/null @@ -1,40 +0,0 @@ -/* Math functions for i387. - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by John C. Bowman , 1995. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - The GNU C 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include - -double floor (double __x); - -double floor (double __x) -{ - register double __value; -#ifdef __GNUC__ - __volatile unsigned short int __cw, __cwtmp; - - __asm __volatile ("fnstcw %0" : "=m" (__cw)); - __cwtmp = (__cw & 0xf3ff) | 0x0400; /* rounding down */ - __asm __volatile ("fldcw %0" : : "m" (__cwtmp)); - __asm __volatile ("frndint" : "=t" (__value) : "0" (__x)); - __asm __volatile ("fldcw %0" : : "m" (__cw)); -#else - __value = linkme_floor(__x); -#endif /*__GNUC__*/ - return __value; -} diff --git a/reactos/lib/msvcrt/math/fmod.c b/reactos/lib/msvcrt/math/fmod.c deleted file mode 100644 index 263d6878829..00000000000 --- a/reactos/lib/msvcrt/math/fmod.c +++ /dev/null @@ -1,39 +0,0 @@ -/* Math functions for i387. - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by John C. Bowman , 1995. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - The GNU C 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include - -double fmod (double __x, double __y); - -double fmod (double __x, double __y) -{ - register double __value; -#ifdef __GNUC__ - __asm __volatile__ - ("1: fprem\n\t" - "fstsw %%ax\n\t" - "sahf\n\t" - "jp 1b" - : "=t" (__value) : "0" (__x), "u" (__y) : "ax", "cc"); -#else - __value = linkme_fmod(__x, __y); -#endif /*__GNUC__*/ - return __value; -} diff --git a/reactos/lib/msvcrt/math/frexp.c b/reactos/lib/msvcrt/math/frexp.c deleted file mode 100644 index 47e1800c98d..00000000000 --- a/reactos/lib/msvcrt/math/frexp.c +++ /dev/null @@ -1,29 +0,0 @@ -#include -#include -#include - -/* - * @implemented - */ -double -frexp(double __x, int *exptr) -{ - union - { - double* __x; - double_t* x; - } x; - - x.__x = &__x; - - if ( exptr != NULL ) - *exptr = x.x->exponent - 0x3FE; - - - x.x->exponent = 0x3FE; - - return __x; -} - - - diff --git a/reactos/lib/msvcrt/math/huge_val.c b/reactos/lib/msvcrt/math/huge_val.c deleted file mode 100644 index aaa50d0e81e..00000000000 --- a/reactos/lib/msvcrt/math/huge_val.c +++ /dev/null @@ -1,6 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ - -#include - -#undef _HUGE -double_t _HUGE = { 0x00000, 0x00000, 0x7ff, 0x0 }; diff --git a/reactos/lib/msvcrt/math/hypot.c b/reactos/lib/msvcrt/math/hypot.c deleted file mode 100644 index de078a140e8..00000000000 --- a/reactos/lib/msvcrt/math/hypot.c +++ /dev/null @@ -1,101 +0,0 @@ -/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ -/* - * hypot() function for DJGPP. - * - * hypot() computes sqrt(x^2 + y^2). The problem with the obvious - * naive implementation is that it might fail for very large or - * very small arguments. For instance, for large x or y the result - * might overflow even if the value of the function should not, - * because squaring a large number might trigger an overflow. For - * very small numbers, their square might underflow and will be - * silently replaced by zero; this won't cause an exception, but might - * have an adverse effect on the accuracy of the result. - * - * This implementation tries to avoid the above pitfals, without - * inflicting too much of a performance hit. - * - */ - -#include -#include -#include - -/* Approximate square roots of DBL_MAX and DBL_MIN. Numbers - between these two shouldn't neither overflow nor underflow - when squared. */ -#define __SQRT_DBL_MAX 1.3e+154 -#define __SQRT_DBL_MIN 2.3e-162 - -/* - * @implemented - */ -double -_hypot(double x, double y) -{ - double abig = fabs(x), asmall = fabs(y); - double ratio; - - /* Make abig = max(|x|, |y|), asmall = min(|x|, |y|). */ - if (abig < asmall) - { - double temp = abig; - - abig = asmall; - asmall = temp; - } - - /* Trivial case. */ - if (asmall == 0.) - return abig; - - /* Scale the numbers as much as possible by using its ratio. - For example, if both ABIG and ASMALL are VERY small, then - X^2 + Y^2 might be VERY inaccurate due to loss of - significant digits. Dividing ASMALL by ABIG scales them - to a certain degree, so that accuracy is better. */ - - if ((ratio = asmall / abig) > __SQRT_DBL_MIN && abig < __SQRT_DBL_MAX) - return abig * sqrt(1.0 + ratio*ratio); - else - { - /* Slower but safer algorithm due to Moler and Morrison. Never - produces any intermediate result greater than roughly the - larger of X and Y. Should converge to machine-precision - accuracy in 3 iterations. */ - - double r = ratio*ratio, t, s, p = abig, q = asmall; - - do { - t = 4. + r; - if (t == 4.) - break; - s = r / t; - p += 2. * s * p; - q *= s; - r = (q / p) * (q / p); - } while (1); - - return p; - } -} - -#ifdef TEST - -#include - -int -main(void) -{ - printf("hypot(3, 4) =\t\t\t %25.17e\n", _hypot(3., 4.)); - printf("hypot(3*10^150, 4*10^150) =\t %25.17g\n", _hypot(3.e+150, 4.e+150)); - printf("hypot(3*10^306, 4*10^306) =\t %25.17g\n", _hypot(3.e+306, 4.e+306)); - printf("hypot(3*10^-320, 4*10^-320) =\t %25.17g\n",_hypot(3.e-320, 4.e-320)); - printf("hypot(0.7*DBL_MAX, 0.7*DBL_MAX) =%25.17g\n",_hypot(0.7*DBL_MAX, 0.7*DBL_MAX)); - printf("hypot(DBL_MAX, 1.0) =\t\t %25.17g\n", _hypot(DBL_MAX, 1.0)); - printf("hypot(1.0, DBL_MAX) =\t\t %25.17g\n", _hypot(1.0, DBL_MAX)); - printf("hypot(0.0, DBL_MAX) =\t\t %25.17g\n", _hypot(0.0, DBL_MAX)); - - return 0; -} - -#endif diff --git a/reactos/lib/msvcrt/math/j0_y0.c b/reactos/lib/msvcrt/math/j0_y0.c deleted file mode 100644 index 01143ef3dcc..00000000000 --- a/reactos/lib/msvcrt/math/j0_y0.c +++ /dev/null @@ -1,18 +0,0 @@ -#include - - -/* - * @unimplemented - */ -double _j0(double x) -{ - return x; -} - -/* - * @unimplemented - */ -double _y0(double x) -{ - return x; -} diff --git a/reactos/lib/msvcrt/math/j1_y1.c b/reactos/lib/msvcrt/math/j1_y1.c deleted file mode 100644 index 3c899886491..00000000000 --- a/reactos/lib/msvcrt/math/j1_y1.c +++ /dev/null @@ -1,18 +0,0 @@ -#include - - -/* - * @unimplemented - */ -double _j1(double x) -{ - return x; -} - -/* - * @unimplemented - */ -double _y1(double x) -{ - return x; -} diff --git a/reactos/lib/msvcrt/math/jn_yn.c b/reactos/lib/msvcrt/math/jn_yn.c deleted file mode 100644 index a9304720a2e..00000000000 --- a/reactos/lib/msvcrt/math/jn_yn.c +++ /dev/null @@ -1,18 +0,0 @@ -#include - - -/* - * @unimplemented - */ -double _jn(int n, double x) -{ - return x; -} - -/* - * @unimplemented - */ -double _yn(int n, double x) -{ - return x; -} diff --git a/reactos/lib/msvcrt/math/ldexp.c b/reactos/lib/msvcrt/math/ldexp.c deleted file mode 100644 index 9c603445509..00000000000 --- a/reactos/lib/msvcrt/math/ldexp.c +++ /dev/null @@ -1,36 +0,0 @@ -/* Math functions for i387. - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by John C. Bowman , 1995. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - The GNU C 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include - -double ldexp (double __x, int __y); - -double ldexp (double __x, int __y) -{ - register double __value; -#ifdef __GNUC__ - __asm __volatile__ - ("fscale" - : "=t" (__value) : "0" (__x), "u" ((double) __y)); -#else - __value = linkme_ldexp(__x, __y); -#endif /*__GNUC__*/ - return __value; -} diff --git a/reactos/lib/msvcrt/math/log.c b/reactos/lib/msvcrt/math/log.c deleted file mode 100644 index 014c78a2304..00000000000 --- a/reactos/lib/msvcrt/math/log.c +++ /dev/null @@ -1,38 +0,0 @@ -/* Math functions for i387. - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by John C. Bowman , 1995. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - The GNU C 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include - -double log (double __x); - -double log (double __x) -{ - register double __value; -#ifdef __GNUC__ - __asm __volatile__ - ("fldln2\n\t" - "fxch\n\t" - "fyl2x" - : "=t" (__value) : "0" (__x)); -#else - __value = linkme_log(__x); -#endif /*__GNUC__*/ - return __value; -} diff --git a/reactos/lib/msvcrt/math/log10.c b/reactos/lib/msvcrt/math/log10.c deleted file mode 100644 index 58e8cd6ebc9..00000000000 --- a/reactos/lib/msvcrt/math/log10.c +++ /dev/null @@ -1,38 +0,0 @@ -/* Math functions for i387. - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by John C. Bowman , 1995. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - The GNU C 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include - -double log10 (double __x); - -double log10 (double __x) -{ - register double __value; -#ifdef __GNUC__ - __asm __volatile__ - ("fldlg2\n\t" - "fxch\n\t" - "fyl2x" - : "=t" (__value) : "0" (__x)); -#else - __value = linkme_log10(__x); -#endif /*__GNUC__*/ - return __value; -} diff --git a/reactos/lib/msvcrt/math/math.c b/reactos/lib/msvcrt/math/math.c deleted file mode 100644 index 157b72fd9b8..00000000000 --- a/reactos/lib/msvcrt/math/math.c +++ /dev/null @@ -1,120 +0,0 @@ -#include - -#pragma function(fmod,sqrt) -#pragma function(log,log10,pow,exp) -#pragma function(tan,atan,atan2,tanh) -#pragma function(cos,acos,cosh) -#pragma function(sin,asin,sinh) - - -double linkme_ceil(double __x) -{ - return ceil(__x); -} - -double linkme_fabs(double __x) -{ - return fabs(__x); -} - -double linkme_floor(double __x) -{ - return floor(__x); -} - -double linkme_ldexp(double __x, int __y) -{ - return ldexp(__x, __y); -} - -double linkme_log2(double __x) -{ - //return log2(__x); - return 0; -} - -double linkme_fmod(double __x, double __y) -{ - return fmod(__x, __y); -} - -double linkme_sqrt(double __x) -{ - return sqrt(__x); -} - -double linkme_log(double __x) -{ - return log(__x); -} - -double linkme_log10(double __x) -{ - return log10(__x); -} - -double linkme_pow(double __x, double __y) -{ - return pow(__x, __y); -} - -double linkme_exp(double __x) -{ - return exp(__x); -} - -double linkme_tan(double __x) -{ - return tan(__x); -} - -double linkme_atan(double __x) -{ - return atan(__x); -} - -double linkme_atan2(double __x, double __y) -{ - return atan2(__x, __y); -} - -double linkme_tanh(double __x) -{ - return tanh(__x); -} - -double linkme_cos(double __x) -{ - return cos(__x); -} - -double linkme_acos(double __x) -{ - return acos(__x); -} - -double linkme_cosh(double __x) -{ - return cosh(__x); -} - -double linkme_sin(double __x) -{ - return sin(__x); -} - -double linkme_asin(double __x) -{ - return asin(__x); -} - -double linkme_sinh(double __x) -{ - return sinh(__x); -} -/* -linkme_log2 -linkme_floor -_linkme_ldexp -_linkme_pow - */ diff --git a/reactos/lib/msvcrt/math/modf.c b/reactos/lib/msvcrt/math/modf.c deleted file mode 100644 index fe1d80f4d02..00000000000 --- a/reactos/lib/msvcrt/math/modf.c +++ /dev/null @@ -1,158 +0,0 @@ -/* @(#)s_modf.c 1.3 95/01/18 */ -/* - * ==================================================== - * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. - * - * Developed at SunSoft, a Sun Microsystems, Inc. business. - * Permission to use, copy, modify, and distribute this - * software is freely granted, provided that this notice - * is preserved. - * ==================================================== - */ - -#include -#include -#include - - - -//static const double one = 1.0; - -double modf(double __x, double *__i) -{ - union - { - double* __x; - double_t* x; - } x; - union - { - double* __i; - double_t* iptr; - } iptr; - - int j0; - unsigned int i; - - x.__x = &__x; - iptr.__i = __i; - - - j0 = x.x->exponent - 0x3ff; /* exponent of x */ - if(j0<20) { /* integer part in high x */ - if(j0<0) { /* |x|<1 */ - *__i = 0.0; - iptr.iptr->sign = x.x->sign; - return __x; - } else { - - if ( x.x->mantissah == 0 && x.x->mantissal == 0 ) { - *__i = __x; - return 0.0; - } - - i = (0x000fffff)>>j0; - iptr.iptr->sign = x.x->sign; - iptr.iptr->exponent = x.x->exponent; - iptr.iptr->mantissah = x.x->mantissah&(~i); - iptr.iptr->mantissal = 0; - if ( __x == *__i ) { - __x = 0.0; - x.x->sign = iptr.iptr->sign; - return __x; - } - return __x - *__i; - } - } else if (j0>51) { /* no fraction part */ - *__i = __x; - if ( _isnan(__x) || _isinf(__x) ) - return __x; - - __x = 0.0; - x.x->sign = iptr.iptr->sign; - return __x; - } else { /* fraction part in low x */ - - i = ((unsigned)(0xffffffff))>>(j0-20); - iptr.iptr->sign = x.x->sign; - iptr.iptr->exponent = x.x->exponent; - iptr.iptr->mantissah = x.x->mantissah; - iptr.iptr->mantissal = x.x->mantissal&(~i); - if ( __x == *__i ) { - __x = 0.0; - x.x->sign = iptr.iptr->sign; - return __x; - } - return __x - *__i; - } -} - - -long double modfl(long double __x, long double *__i) -{ - union - { - long double* __x; - long_double_t* x; - } x; - union - { - long double* __i; - long_double_t* iptr; - } iptr; - - int j0; - unsigned int i; - - x.__x = &__x; - iptr.__i = __i; - - - j0 = x.x->exponent - 0x3fff; /* exponent of x */ - - if(j0<32) { /* integer part in high x */ - if(j0<0) { /* |x|<1 */ - *__i = 0.0L; - iptr.iptr->sign = x.x->sign; - return __x; - } else { - - i = ((unsigned int)(0xffffffff))>>(j0+1); - if ( x.x->mantissal == 0 && (x.x->mantissal & i) == 0 ) { - *__i = __x; - __x = 0.0L; - x.x->sign = iptr.iptr->sign; - return __x; - } - iptr.iptr->sign = x.x->sign; - iptr.iptr->exponent = x.x->exponent; - iptr.iptr->mantissah = x.x->mantissah&((~i)); - iptr.iptr->mantissal = 0; - - return __x - *__i; - } - } else if (j0>63) { /* no fraction part */ - *__i = __x; - if ( _isnanl(__x) || _isinfl(__x) ) - return __x; - - __x = 0.0L; - x.x->sign = iptr.iptr->sign; - return __x; - } else { /* fraction part in low x */ - - i = ((unsigned int)(0xffffffff))>>(j0-32); - if ( x.x->mantissal == 0 ) { - *__i = __x; - __x = 0.0L; - x.x->sign = iptr.iptr->sign; - return __x; - } - iptr.iptr->sign = x.x->sign; - iptr.iptr->exponent = x.x->exponent; - iptr.iptr->mantissah = x.x->mantissah; - iptr.iptr->mantissal = x.x->mantissal&(~i); - - return __x - *__i; - } -} diff --git a/reactos/lib/msvcrt/math/pow.c b/reactos/lib/msvcrt/math/pow.c deleted file mode 100644 index 91e07216944..00000000000 --- a/reactos/lib/msvcrt/math/pow.c +++ /dev/null @@ -1,97 +0,0 @@ -/* Math functions for i387. - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by John C. Bowman , 1995. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - The GNU C 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include - -double pow (double __x, double __y); - -double __log2 (double __x); - -double __log2 (double __x) -{ - register double __value; -#ifdef __GNUC__ - __asm __volatile__ - ("fld1\n\t" - "fxch\n\t" - "fyl2x" - : "=t" (__value) : "0" (__x)); -#else - //__value = linkme_log2(__x); - __value = 0; -#endif /*__GNUC__*/ - return __value; -} - -/* - * @implemented - */ -double pow (double __x, double __y) -{ - register double __value; -#ifdef __GNUC__ - register double __exponent; - long __p = (long) __y; - - if (__x == 0.0 && __y > 0.0) - return 0.0; - if (__y == (double) __p) - { - double __r = 1.0; - if (__p == 0) - return 1.0; - if (__p < 0) - { - __p = -__p; - __x = 1.0 / __x; - } - while (1) - { - if (__p & 1) - __r *= __x; - __p >>= 1; - if (__p == 0) - return __r; - __x *= __x; - } - /* NOTREACHED */ - } - __asm __volatile__ - ("fmul %%st(1) # y * log2(x)\n\t" - "fst %%st(1)\n\t" - "frndint # int(y * log2(x))\n\t" - "fxch\n\t" - "fsub %%st(1) # fract(y * log2(x))\n\t" - "f2xm1 # 2^(fract(y * log2(x))) - 1\n\t" - : "=t" (__value), "=u" (__exponent) : "0" (__log2 (__x)), "1" (__y)); - __value += 1.0; - __asm __volatile__ - ("fscale" - : "=t" (__value) : "0" (__value), "u" (__exponent)); -#else - __value = linkme_pow(__x, __y); -#endif /*__GNUC__*/ - return __value; -} - -long double powl (long double __x,long double __y) -{ - return pow(__x,__y/2)*pow(__x,__y/2); -} diff --git a/reactos/lib/msvcrt/math/sin.c b/reactos/lib/msvcrt/math/sin.c deleted file mode 100644 index db070a31d17..00000000000 --- a/reactos/lib/msvcrt/math/sin.c +++ /dev/null @@ -1,36 +0,0 @@ -/* Math functions for i387. - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by John C. Bowman , 1995. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - The GNU C 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include - -double sin (double __x); - -double sin (double __x) -{ - register double __value; -#ifdef __GNUC__ - __asm __volatile__ - ("fsin" - : "=t" (__value) : "0" (__x)); -#else - __value = linkme_sin(__x); -#endif /*__GNUC__*/ - return __value; -} diff --git a/reactos/lib/msvcrt/math/sinh.c b/reactos/lib/msvcrt/math/sinh.c deleted file mode 100644 index f977a6acfa5..00000000000 --- a/reactos/lib/msvcrt/math/sinh.c +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include - -/* - * @implemented - */ -double sinh(double x) -{ - if(x >= 0.0) - { - const double epos = exp(x); - return (epos - 1.0/epos) / 2.0; - } - else - { - const double eneg = exp(-x); - return (1.0/eneg - eneg) / 2.0; - } -} diff --git a/reactos/lib/msvcrt/math/sqrt.c b/reactos/lib/msvcrt/math/sqrt.c deleted file mode 100644 index d414fcdbc2e..00000000000 --- a/reactos/lib/msvcrt/math/sqrt.c +++ /dev/null @@ -1,35 +0,0 @@ -/* Math functions for i387. - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by John C. Bowman , 1995. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - The GNU C 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ -#include - -double sqrt (double __x); - -double sqrt (double __x) -{ - register double __value; -#ifdef __GNUC__ - __asm __volatile__ - ("fsqrt" - : "=t" (__value) : "0" (__x)); -#else - __value = linkme_sqrt(__x); -#endif /*__GNUC__*/ - return __value; -} diff --git a/reactos/lib/msvcrt/math/stubs.c b/reactos/lib/msvcrt/math/stubs.c deleted file mode 100644 index 82fe881ebc0..00000000000 --- a/reactos/lib/msvcrt/math/stubs.c +++ /dev/null @@ -1,133 +0,0 @@ -#include - - -double _CIsin(double x); -double _CIcos(double x); -double _CItan(double x); -double _CIsinh(double x); -double _CIcosh(double x); -double _CItanh(double x); -double _CIasin(double x); -double _CIacos(double x); -double _CIatan(double x); -double _CIatan2(double y, double x); -double _CIexp(double x); -double _CIlog(double x); -double _CIlog10(double x); -double _CIpow(double x, double y); -double _CIsqrt(double x); -double _CIfmod(double x, double y); - - -/* - * @implemented - */ -double _CIsin(double x) -{ - return sin(x); -} -/* - * @implemented - */ -double _CIcos(double x) -{ - return cos(x); -} -/* - * @implemented - */ -double _CItan(double x) -{ - return tan(x); -} -/* - * @implemented - */ -double _CIsinh(double x) -{ - return sinh(x); -} -/* - * @implemented - */ -double _CIcosh(double x) -{ - return cosh(x); -} -/* - * @implemented - */ -double _CItanh(double x) -{ - return tanh(x); -} -/* - * @implemented - */ -double _CIasin(double x) -{ - return asin(x); -} -/* - * @implemented - */ -double _CIacos(double x) -{ - return acos(x); -} -/* - * @implemented - */ -double _CIatan(double x) -{ - return atan(x); -} -/* - * @implemented - */ -double _CIatan2(double y, double x) -{ - return atan2(y, x); -} -/* - * @implemented - */ -double _CIexp(double x) -{ - return exp(x); -} -/* - * @implemented - */ -double _CIlog(double x) -{ - return log(x); -} -/* - * @implemented - */ -double _CIlog10(double x) -{ - return log10(x); -} -/* - * @implemented - */ -double _CIpow(double x, double y) -{ - return pow(x, y); -} -/* - * @implemented - */ -double _CIsqrt(double x) -{ - return sqrt(x); -} -/* - * @implemented - */ -double _CIfmod(double x, double y) -{ - return fmod(x, y); -} diff --git a/reactos/lib/msvcrt/math/tan.c b/reactos/lib/msvcrt/math/tan.c deleted file mode 100644 index 1acc03619f9..00000000000 --- a/reactos/lib/msvcrt/math/tan.c +++ /dev/null @@ -1,37 +0,0 @@ -/* Math functions for i387. - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by John C. Bowman , 1995. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - The GNU C 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include - -double tan (double __x); - -double tan (double __x) -{ - register double __value; -#ifdef __GNUC__ - register double __value2 __attribute__ ((unused)); - __asm __volatile__ - ("fptan" - : "=t" (__value2), "=u" (__value) : "0" (__x)); -#else - __value = linkme_tan(__x); -#endif /*__GNUC__*/ - return __value; -} diff --git a/reactos/lib/msvcrt/math/tanh.c b/reactos/lib/msvcrt/math/tanh.c deleted file mode 100644 index 88b9acca5ae..00000000000 --- a/reactos/lib/msvcrt/math/tanh.c +++ /dev/null @@ -1,20 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ - -#include - -/* - * @implemented - */ -double tanh(double x) -{ - if (x > 50) - return 1; - else if (x < -50) - return -1; - else - { - const double ebig = exp(x); - const double esmall = 1.0/ebig; - return (ebig - esmall) / (ebig + esmall); - } -} diff --git a/reactos/lib/msvcrt/mbstring/hanzen.c b/reactos/lib/msvcrt/mbstring/hanzen.c deleted file mode 100644 index bbf22611f23..00000000000 --- a/reactos/lib/msvcrt/mbstring/hanzen.c +++ /dev/null @@ -1,107 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/msvcrt/mbstring/hanzen.c - * PURPOSE: Multibyte conversion routines formerly called hantozen and zentohan - * PROGRAMER: Boudewijn Dekker, Taiji Yamada - * UPDATE HISTORY: - Modified from Taiji Yamada japanese code system utilities - * 12/04/99: Created - */ - -#include - -static unsigned short han_to_zen_ascii_table[0x5f] = { - 0x8140, 0x8149, 0x8168, 0x8194, 0x8190, 0x8193, 0x8195, 0x8166, - 0x8169, 0x816a, 0x8196, 0x817b, 0x8143, 0x817c, 0x8144, 0x815e, - 0x824f, 0x8250, 0x8251, 0x8252, 0x8253, 0x8254, 0x8255, 0x8256, - 0x8257, 0x8258, 0x8146, 0x8147, 0x8183, 0x8181, 0x8184, 0x8148, - 0x8197, 0x8260, 0x8261, 0x8262, 0x8263, 0x8264, 0x8265, 0x8266, - 0x8267, 0x8268, 0x8269, 0x826a, 0x826b, 0x826c, 0x826d, 0x826e, - 0x826f, 0x8270, 0x8271, 0x8272, 0x8273, 0x8274, 0x8275, 0x8276, - 0x8277, 0x8278, 0x8279, 0x816d, 0x818f, 0x816e, 0x814f, 0x8151, - 0x8165, 0x8281, 0x8282, 0x8283, 0x8284, 0x8285, 0x8286, 0x8287, - 0x8288, 0x8289, 0x828a, 0x828b, 0x828c, 0x828d, 0x828e, 0x828f, - 0x8290, 0x8291, 0x8292, 0x8293, 0x8294, 0x8295, 0x8296, 0x8297, - 0x8298, 0x8299, 0x829a, 0x816f, 0x8162, 0x8170, 0x8150 -}; -static unsigned short han_to_zen_kana_table[0x40] = { - 0x8140, 0x8142, 0x8175, 0x8176, 0x8141, 0x8145, 0x8392, 0x8340, - 0x8342, 0x8344, 0x8346, 0x8348, 0x8383, 0x8385, 0x8387, 0x8362, - 0x815b, 0x8341, 0x8343, 0x8345, 0x8347, 0x8349, 0x834a, 0x834c, - 0x834e, 0x8350, 0x8352, 0x8354, 0x8356, 0x8358, 0x835a, 0x835c, - 0x835e, 0x8360, 0x8363, 0x8365, 0x8367, 0x8369, 0x836a, 0x836b, - 0x836c, 0x836d, 0x836e, 0x8371, 0x8374, 0x8377, 0x837a, 0x837d, - 0x837e, 0x8380, 0x8381, 0x8382, 0x8384, 0x8386, 0x8388, 0x8389, - 0x838a, 0x838b, 0x838c, 0x838d, 0x838f, 0x8393, 0x814a, 0x814b -}; -static unsigned char zen_to_han_kana_table[0x8396-0x8340+1] = { - 0xa7, 0xb1, 0xa8, 0xb2, 0xa9, 0xb3, 0xaa, 0xb4, - 0xab, 0xb5, 0xb6, 0xb6, 0xb7, 0xb7, 0xb8, 0xb8, - 0xb9, 0xb9, 0xba, 0xba, 0xbb, 0xbb, 0xbc, 0xbc, - 0xbd, 0xbd, 0xbe, 0xbe, 0xbf, 0xbf, 0xc0, 0xc0, - 0xc1, 0xc1, 0xaf, 0xc2, 0xc2, 0xc3, 0xc3, 0xc4, - 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xca, - 0xca, 0xcb, 0xcb, 0xcb, 0xcc, 0xcc, 0xcc, 0xcd, - 0xcd, 0xcd, 0xce, 0xce, 0xce, 0xcf, 0xd0, 0, - 0xd1, 0xd2, 0xd3, 0xac, 0xd4, 0xad, 0xd5, 0xae, - 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdc, - 0xb2, 0xb4, 0xa6, 0xdd, 0xb3, 0xb6, 0xb9 -}; -#define ZTOH_SYMBOLS 9 -static unsigned short zen_to_han_symbol_table_1[ZTOH_SYMBOLS] = { - 0x8142, 0x8175, 0x8176, 0x8141, 0x8145, 0x815b, 0x814a, 0x814b -}; -static unsigned char zen_to_han_symbol_table_2[ZTOH_SYMBOLS] = { - 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xb0, 0xde, 0xdf -}; -#define ISKANA(c) ((c) >= 0xa1 && (c) <= 0xdf) -#define JISHIRA(c) ((c) >= 0x829f && (c) <= 0x82f1) -#define JISKANA(c) ((c) >= 0x8340 && (c) <= 0x8396 && (c) != 0x837f) -#define JTOKANA(c) ((c) <= 0x82dd ? (c) + 0xa1 : (c) + 0xa2) - - -/* - * @implemented - */ -unsigned short _mbbtombc(unsigned short c) -{ - if (c >= 0x20 && c <= 0x7e) { - return han_to_zen_ascii_table[c - 0x20]; - } else if (ISKANA(c)) { - return han_to_zen_kana_table[c - 0xa0]; - } - return c; -} - - -/* - * @implemented - */ -unsigned short _mbctombb(unsigned short c) -{ - int i; - unsigned short *p; - - if (JISKANA(c)) { - return zen_to_han_kana_table[c - 0x8340]; - } else if (JISHIRA(c)) { - c = JTOKANA(c); - return zen_to_han_kana_table[c - 0x8340]; - } else if (c <= 0x8396) { - for (i = 0x20, p = han_to_zen_ascii_table; i <= 0x7e; i++, p++) { - if (*p == c) { - return i; - } - } - for (i = 0; i < ZTOH_SYMBOLS; i++) { - if (zen_to_han_symbol_table_1[i] == c) { - return zen_to_han_symbol_table_2[i]; - } - } - } - return c; -} - - - diff --git a/reactos/lib/msvcrt/mbstring/ischira.c b/reactos/lib/msvcrt/mbstring/ischira.c deleted file mode 100644 index 7ea5d269bcb..00000000000 --- a/reactos/lib/msvcrt/mbstring/ischira.c +++ /dev/null @@ -1,46 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/msvcrt/mbstring/ischira.c - * PURPOSE: - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 12/04/99: Created - */ - -#include -#include - - -/* - * @implemented - */ -int _ismbchira( unsigned int c ) -{ - return ((c>=0x829F) && (c<=0x82F1)); -} - -/* - * @implemented - */ -int _ismbckata( unsigned int c ) -{ - return ((c>=0x8340) && (c<=0x8396)); -} - -/* - * @unimplemented - */ -unsigned int _mbctohira( unsigned int c ) -{ - return c; -} - -/* - * @unimplemented - */ -unsigned int _mbctokata( unsigned int c ) -{ - return c; -} - diff --git a/reactos/lib/msvcrt/mbstring/iskana.c b/reactos/lib/msvcrt/mbstring/iskana.c deleted file mode 100644 index 0bdb7848554..00000000000 --- a/reactos/lib/msvcrt/mbstring/iskana.c +++ /dev/null @@ -1,20 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/msvcrt/mbstring/iskana.c - * PURPOSE: Checks for kana character - * PROGRAMER: Boudewijn Dekker, Taiji Yamada - * UPDATE HISTORY: - Modified from Taiji Yamada japanese code system utilities - * 12/04/99: Created - */ -#include -#include - -/* - * @implemented - */ -int _ismbbkana(unsigned char c) -{ - return ((_jctype+1)[(unsigned char)(c)] & (_KNJ_M|_KNJ_P)); -} diff --git a/reactos/lib/msvcrt/mbstring/iskmoji.c b/reactos/lib/msvcrt/mbstring/iskmoji.c deleted file mode 100644 index c47d5badec1..00000000000 --- a/reactos/lib/msvcrt/mbstring/iskmoji.c +++ /dev/null @@ -1,6 +0,0 @@ -#include - -int _ismbbkalpha(unsigned char c) -{ - return (0xA7 <= c && c <= 0xDF); -} diff --git a/reactos/lib/msvcrt/mbstring/iskpun.c b/reactos/lib/msvcrt/mbstring/iskpun.c deleted file mode 100644 index f3a12bbaf1a..00000000000 --- a/reactos/lib/msvcrt/mbstring/iskpun.c +++ /dev/null @@ -1,18 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/msvcrt/mbstring/iskpun.c - * PURPOSE: - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 12/04/99: Created - */ -#include - -/* - * @implemented - */ -int _ismbbkpunct( unsigned int c ) -{ - return ((_jctype+1)[(unsigned char)(c)] & (_KNJ_P)); -} diff --git a/reactos/lib/msvcrt/mbstring/islead.c b/reactos/lib/msvcrt/mbstring/islead.c deleted file mode 100644 index f6c9e5bd0e1..00000000000 --- a/reactos/lib/msvcrt/mbstring/islead.c +++ /dev/null @@ -1,11 +0,0 @@ -#include "precomp.h" -#include - -/* - * @unimplemented - */ -int isleadbyte(int byte) -{ - return 0; - //return IsDBCSLeadByteEx(0,*c); -} diff --git a/reactos/lib/msvcrt/mbstring/islwr.c b/reactos/lib/msvcrt/mbstring/islwr.c deleted file mode 100644 index e63c6aa1e3d..00000000000 --- a/reactos/lib/msvcrt/mbstring/islwr.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/msvcrt/mbstring/islwr.c - * PURPOSE: - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 12/04/99: Created - */ - -#include -#include - -/* - * code page 952 only - * - * @implemented - */ -int _ismbclower( unsigned int c ) -{ - if ((c & 0xFF00) != 0) { - if ( c >= 0x829A && c<= 0x829A ) - return 1; - } - - return islower(c); -} diff --git a/reactos/lib/msvcrt/mbstring/ismbal.c b/reactos/lib/msvcrt/mbstring/ismbal.c deleted file mode 100644 index f1bbd3bbbf6..00000000000 --- a/reactos/lib/msvcrt/mbstring/ismbal.c +++ /dev/null @@ -1,20 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/msvcrt/mbstring/ismbal.c - * PURPOSE: Checks for alphabetic multibyte character - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 12/04/99: Created - */ -#include -#include - -/* - * @implemented - */ -int _ismbbalpha(unsigned char c) -{ - return (isalpha(c) || _ismbbkalnum(c)); -} - diff --git a/reactos/lib/msvcrt/mbstring/ismbaln.c b/reactos/lib/msvcrt/mbstring/ismbaln.c deleted file mode 100644 index 71d263de87d..00000000000 --- a/reactos/lib/msvcrt/mbstring/ismbaln.c +++ /dev/null @@ -1,12 +0,0 @@ -#include -#include - - -/* - * @implemented - */ -int _ismbbalnum(unsigned char c) -{ - return (isalnum(c) || _ismbbkalnum(c)); -} - diff --git a/reactos/lib/msvcrt/mbstring/ismbc.c b/reactos/lib/msvcrt/mbstring/ismbc.c deleted file mode 100644 index 4035ff5580d..00000000000 --- a/reactos/lib/msvcrt/mbstring/ismbc.c +++ /dev/null @@ -1,135 +0,0 @@ -#include - -int _ismbbalpha(unsigned char c); -int _ismbbalnum(unsigned char c); - -/* - * @implemented - */ -int _ismbcalnum( unsigned int c ) -{ - if ((c & 0xFF00) != 0) { - // true multibyte character - return 0; - } - else - return _ismbbalnum(c); - - return 0; -} - -/* - * @implemented - */ -int _ismbcalpha( unsigned int c ) -{ - if ((c & 0xFF00) != 0) { - // true multibyte character - return 0; - } - else - return _ismbbalpha(c); - - return 0; -} - -/* - * @implemented - */ -int _ismbcdigit( unsigned int c ) -{ - if ((c & 0xFF00) != 0) { - // true multibyte character - return 0; - } - else - return 0; -// return _ismbbdigit(c); - - return 0; -} - -/* - * @unimplemented - */ -int _ismbcprint( unsigned int c ) -{ - if ((c & 0xFF00) != 0) { - // true multibyte character - return 0; - } - else - return 0; -// return _ismbbdigit(c); - - return 0; -} - -/* - * @unimplemented - */ -int _ismbcsymbol( unsigned int c ) -{ - if ((c & 0xFF00) != 0) { - // true multibyte character - return 0; - } - else - return 0; -// return _ismbbdigit(c); - - return 0; -} - -/* - * @unimplemented - */ -int _ismbcspace( unsigned int c ) -{ - if ((c & 0xFF00) != 0) { - // true multibyte character - return 0; - } - else - return 0; -// return _ismbbdigit(c); - - return 0; -} -/* - * @implemented - */ -int _ismbclegal(unsigned int c) -{ - if ((c & 0xFF00) != 0) { - return _ismbblead(c>>8) && _ismbbtrail(c&0xFF); - } - else - return _ismbbtrail(c&0xFF); - - return 0; -} - -/* - * @unimplemented - */ -int _ismbcl0(unsigned int c) -{ - return 0; -} - -/* - * @unimplemented - */ -int _ismbcl1(unsigned int c) -{ - return 0; -} - -/* - * @unimplemented - */ -int _ismbcl2(unsigned int c) -{ - return 0; -} diff --git a/reactos/lib/msvcrt/mbstring/ismbgra.c b/reactos/lib/msvcrt/mbstring/ismbgra.c deleted file mode 100644 index 8de506a2007..00000000000 --- a/reactos/lib/msvcrt/mbstring/ismbgra.c +++ /dev/null @@ -1,11 +0,0 @@ -#include -#include -#include - -/* - * @implemented - */ -int _ismbbgraph(unsigned char c) -{ - return (isgraph(c) || _ismbbkana(c)); -} diff --git a/reactos/lib/msvcrt/mbstring/ismbkaln.c b/reactos/lib/msvcrt/mbstring/ismbkaln.c deleted file mode 100644 index 6840f59a33c..00000000000 --- a/reactos/lib/msvcrt/mbstring/ismbkaln.c +++ /dev/null @@ -1,19 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/msvcrt/mbstring/ismbkaln.c - * PURPOSE: - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 12/04/99: Created - */ -#include -#include - -/* - * @implemented - */ -int _ismbbkalnum( unsigned int c ) -{ - return ((_jctype+1)[(unsigned char)(c)] & (_KNJ_P)); -} diff --git a/reactos/lib/msvcrt/mbstring/ismblead.c b/reactos/lib/msvcrt/mbstring/ismblead.c deleted file mode 100644 index ca6da76883c..00000000000 --- a/reactos/lib/msvcrt/mbstring/ismblead.c +++ /dev/null @@ -1,65 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/msvcrt/mbstring/ismblead.c - * PURPOSE: Checks for a lead byte - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * Modified from Taiji Yamada japanese code system utilities - * 12/04/99: Created - */ - -#include -#include -#include - -size_t _mbclen2(const unsigned int s); - -char _jctype[257] = { -/*-1*/ ___, -/*0x*/ ___,___,___,___,___,___,___,___,___,___,___,___,___,___,___,___, -/*1x*/ ___,___,___,___,___,___,___,___,___,___,___,___,___,___,___,___, -/*2x*/ ___,___,___,___,___,___,___,___,___,___,___,___,___,___,___,___, -/*3x*/ ___,___,___,___,___,___,___,___,___,___,___,___,___,___,___,___, -/*4x*/ __2,__2,__2,__2,__2,__2,__2,__2,__2,__2,__2,__2,__2,__2,__2,__2, -/*5x*/ __2,__2,__2,__2,__2,__2,__2,__2,__2,__2,__2,__2,__2,__2,__2,__2, -/*6x*/ __2,__2,__2,__2,__2,__2,__2,__2,__2,__2,__2,__2,__2,__2,__2,__2, -/*7x*/ __2,__2,__2,__2,__2,__2,__2,__2,__2,__2,__2,__2,__2,__2,__2,___, -/*8x*/ __2,_12,_12,_12,_12,_12,_12,_12,_12,_12,_12,_12,_12,_12,_12,_12, -/*9x*/ _12,_12,_12,_12,_12,_12,_12,_12,_12,_12,_12,_12,_12,_12,_12,_12, -/*Ax*/ __2,_P2,_P2,_P2,_P2,_P2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2, -/*Bx*/ _M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2, -/*Cx*/ _M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2, -/*Dx*/ _M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2, -/*Ex*/ _12,_12,_12,_12,_12,_12,_12,_12,_12,_12,_12,_12,_12,_12,_12,_12, -/*Fx*/ _12,_12,_12,_12,_12,_12,_12,_12,_12,_12,_12,_12,_12,___,___,___ -}; - -char *_mbctype = _jctype; -/* - * @implemented - */ -int _ismbblead(unsigned int c) -{ - return ((_jctype+1)[(unsigned char)(c)] & _KNJ_1); -} -//int _ismbblead(unsigned int byte) -//{ -// -// return (int)IsDBCSLeadByte(byte) -//} - -/* - * @implemented - */ -int _ismbslead( const unsigned char *str, const unsigned char *t) -{ - unsigned char *s = (unsigned char *)str; - while(*s != 0 && s != t) - { - - s+= _mbclen2(*s); - } - return _ismbblead( *s); -} - diff --git a/reactos/lib/msvcrt/mbstring/ismbpri.c b/reactos/lib/msvcrt/mbstring/ismbpri.c deleted file mode 100644 index 637372086b6..00000000000 --- a/reactos/lib/msvcrt/mbstring/ismbpri.c +++ /dev/null @@ -1,11 +0,0 @@ -#include -#include -#include - -/* - * @implemented - */ -int _ismbbprint(unsigned char c) -{ - return (isprint(c) || _ismbbkana(c)); -} diff --git a/reactos/lib/msvcrt/mbstring/ismbpun.c b/reactos/lib/msvcrt/mbstring/ismbpun.c deleted file mode 100644 index f66eb4ea4ec..00000000000 --- a/reactos/lib/msvcrt/mbstring/ismbpun.c +++ /dev/null @@ -1,18 +0,0 @@ - -#include -#include -#include - - -/* - * @implemented - */ -int _ismbbpunct(unsigned char c) -{ -// (0xA1 <= c <= 0xA6) - return (ispunct(c) || _ismbbkana(c)); -} - - //iskana() :(0xA1 <= c <= 0xDF) - //iskpun() :(0xA1 <= c <= 0xA6) - //iskmoji() :(0xA7 <= c <= 0xDF) diff --git a/reactos/lib/msvcrt/mbstring/ismbtrl.c b/reactos/lib/msvcrt/mbstring/ismbtrl.c deleted file mode 100644 index 865fd4de1b8..00000000000 --- a/reactos/lib/msvcrt/mbstring/ismbtrl.c +++ /dev/null @@ -1,45 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/msvcrt/mbstring/ismbtrl.c - * PURPOSE: Checks for a trailing byte - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 12/04/99: Created - */ - -#include -#include - -size_t _mbclen2(const unsigned int s); - -// iskanji2() : (0x40 <= c <= 0x7E 0x80 <= c <= 0xFC) - -/* - * @implemented - */ -int _ismbbtrail(unsigned int c) -{ - return ((_jctype+1)[(unsigned char)(c)] & _KNJ_2); -} - -//int _ismbbtrail( unsigned int b) -//{ -// return ((b >= 0x40 && b <= 0x7e ) || (b >= 0x80 && b <= 0xfc ) ); -//} - - -/* - * @implemented - */ -int _ismbstrail( const unsigned char *str, const unsigned char *t) -{ - unsigned char *s = (unsigned char *)str; - while(*s != 0 && s != t) - { - - s+= _mbclen2(*s); - } - - return _ismbbtrail(*s); -} diff --git a/reactos/lib/msvcrt/mbstring/isuppr.c b/reactos/lib/msvcrt/mbstring/isuppr.c deleted file mode 100644 index d68acc603db..00000000000 --- a/reactos/lib/msvcrt/mbstring/isuppr.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/msvcrt/mbstring/isuppr.c - * PURPOSE: - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 12/04/99: Created - */ - -#include -#include - -/* - * code page 952 only - * - * @implemented - */ -int _ismbcupper( unsigned int c ) -{ - if ((c & 0xFF00) != 0) { - if ( c >= 0x8260 && c<= 0x8279 ) - return 1; - } - - return isupper(c); -} diff --git a/reactos/lib/msvcrt/mbstring/jistojms.c b/reactos/lib/msvcrt/mbstring/jistojms.c deleted file mode 100644 index c47b223a58a..00000000000 --- a/reactos/lib/msvcrt/mbstring/jistojms.c +++ /dev/null @@ -1,27 +0,0 @@ -#include - -/* - * @implemented - */ -unsigned short _mbcjistojms(unsigned short c) -{ - int c1, c2; - - c2 = (unsigned char)c; - c1 = c >> 8; - if (c1 >= 0x21 && c1 <= 0x7e && c2 >= 0x21 && c2 <= 0x7e) { - if (c1 & 0x01) { - c2 += 0x1f; - if (c2 >= 0x7f) - c2 ++; - } else { - c2 += 0x7e; - } - c1 += 0xe1; - c1 >>= 1; - if (c1 >= 0xa0) - c1 += 0x40; - return ((c1 << 8) | c2); - } - return 0; -} diff --git a/reactos/lib/msvcrt/mbstring/jmstojis.c b/reactos/lib/msvcrt/mbstring/jmstojis.c deleted file mode 100644 index cf349f673db..00000000000 --- a/reactos/lib/msvcrt/mbstring/jmstojis.c +++ /dev/null @@ -1,28 +0,0 @@ -#include - -/* - * @implemented - */ -unsigned short _mbcjmstojis(unsigned short c) -{ - int c1, c2; - - c2 = (unsigned char)c; - c1 = c >> 8; - if (c1 < 0xf0 && _ismbblead(c1) && _ismbbtrail(c2)) { - if (c1 >= 0xe0) - c1 -= 0x40; - c1 -= 0x70; - c1 <<= 1; - if (c2 < 0x9f) { - c1 --; - c2 -= 0x1f; - if (c2 >= (0x80-0x1f)) - c2 --; - } else { - c2 -= 0x7e; - } - return ((c1 << 8) | c2); - } - return 0; -} diff --git a/reactos/lib/msvcrt/mbstring/mbbtype.c b/reactos/lib/msvcrt/mbstring/mbbtype.c deleted file mode 100644 index e4e02b96546..00000000000 --- a/reactos/lib/msvcrt/mbstring/mbbtype.c +++ /dev/null @@ -1,52 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/msvcrt/mbstring/mbbtype.c - * PURPOSE: Determines the type of a multibyte character - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 12/04/99: Created - */ - -#include -#include - -/* - * @implemented - */ -int _mbbtype(unsigned char c , int type) -{ - if ( type == 1 ) { - if ((c >= 0x40 && c <= 0x7e ) || (c >= 0x80 && c <= 0xfc ) ) - { - return _MBC_TRAIL; - } - else if (( c >= 0x20 && c >= 0x7E ) || ( c >= 0xA1 && c <= 0xDF ) || - ( c >= 0x81 && c <= 0x9F ) || ( c >= 0xE0 && c <= 0xFC ) ) - return _MBC_ILLEGAL; - else - return 0; - } else { - if (( c >= 0x20 && c <= 0x7E ) || ( c >= 0xA1 && c <= 0xDF )) { - return _MBC_SINGLE; - } - else if ( (c >= 0x81 && c <= 0x9F ) || ( c >= 0xE0 && c <= 0xFC) ) - return _MBC_LEAD; - else if (( c >= 0x20 && c >= 0x7E ) || ( c >= 0xA1 && c <= 0xDF ) || - ( c >= 0x81 && c <= 0x9F ) || ( c >= 0xE0 && c <= 0xFC ) ) - return _MBC_ILLEGAL; - else - return 0; - } - return 0; -} - -/* - * @implemented - */ -int _mbsbtype( const unsigned char *str, size_t n ) -{ - if ( str == NULL ) - return -1; - return _mbbtype(*(str+n),1); -} diff --git a/reactos/lib/msvcrt/mbstring/mbccpy.c b/reactos/lib/msvcrt/mbstring/mbccpy.c deleted file mode 100644 index 1db6243c0ae..00000000000 --- a/reactos/lib/msvcrt/mbstring/mbccpy.c +++ /dev/null @@ -1,15 +0,0 @@ -#include -#include - -size_t _mbclen2(const unsigned int s); - -/* - * @implemented - */ -void _mbccpy(unsigned char *dst, const unsigned char *src) -{ - if (!_ismbblead(*src) ) - return; - - memcpy(dst,src,_mbclen2(*src)); -} diff --git a/reactos/lib/msvcrt/mbstring/mbclen.c b/reactos/lib/msvcrt/mbstring/mbclen.c deleted file mode 100644 index d1e4c82ffa6..00000000000 --- a/reactos/lib/msvcrt/mbstring/mbclen.c +++ /dev/null @@ -1,33 +0,0 @@ -#include -#include - - -/* - * @implemented - */ -size_t _mbclen(const unsigned char *s) -{ - return (_ismbblead(*s>>8) && _ismbbtrail(*s&0x00FF)) ? 2 : 1; -} - -size_t _mbclen2(const unsigned int s) -{ - return (_ismbblead(s>>8) && _ismbbtrail(s&0x00FF)) ? 2 : 1; -} - -/* - * assume MB_CUR_MAX == 2 - * - * @implemented - */ -int mblen( const char *s, size_t count ) -{ - size_t l; - if ( s == NULL ) - return 0; - - l = _mbclen((const unsigned char *)s); - if ( l < count ) - return -1; - return l; -} diff --git a/reactos/lib/msvcrt/mbstring/mbscat.c b/reactos/lib/msvcrt/mbstring/mbscat.c deleted file mode 100644 index 85c6aab86bd..00000000000 --- a/reactos/lib/msvcrt/mbstring/mbscat.c +++ /dev/null @@ -1,9 +0,0 @@ -#include - -/* - * @implemented - */ -unsigned char * _mbscat(unsigned char *dst, const unsigned char *src) -{ - return (unsigned char *)strcat((char*)dst,(const char*)src); -} diff --git a/reactos/lib/msvcrt/mbstring/mbschr.c b/reactos/lib/msvcrt/mbstring/mbschr.c deleted file mode 100644 index 5b359bbcb0c..00000000000 --- a/reactos/lib/msvcrt/mbstring/mbschr.c +++ /dev/null @@ -1,9 +0,0 @@ -#include - -/* - * @implemented - */ -unsigned char * _mbschr(const unsigned char *str, unsigned int c) -{ - return (unsigned char *)strchr((const char*)str, c); -} diff --git a/reactos/lib/msvcrt/mbstring/mbscmp.c b/reactos/lib/msvcrt/mbstring/mbscmp.c deleted file mode 100644 index 8f5d0b3e4de..00000000000 --- a/reactos/lib/msvcrt/mbstring/mbscmp.c +++ /dev/null @@ -1,10 +0,0 @@ -#include -#include - -/* - * @implemented - */ -int _mbscmp(const unsigned char *str1, const unsigned char *str2) -{ - return strcmp((const char*)str1, (char*)str2); -} diff --git a/reactos/lib/msvcrt/mbstring/mbscoll.c b/reactos/lib/msvcrt/mbstring/mbscoll.c deleted file mode 100644 index 86265316d94..00000000000 --- a/reactos/lib/msvcrt/mbstring/mbscoll.c +++ /dev/null @@ -1,100 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/msvcrt/mbstring/mbscoll.c - * PURPOSE: - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 12/04/99: Created - */ - -#include - -int colldif(unsigned short c1, unsigned short c2); - -/* - * @implemented - */ -int _mbscoll(const unsigned char *str1, const unsigned char *str2) -{ - unsigned char *s1 = (unsigned char *)str1; - unsigned char *s2 = (unsigned char *)str2; - - unsigned short *short_s1, *short_s2; - - int l1, l2; - - while ( *s1 != 0 ) { - - if (*s1 == 0) - break; - - l1 = _ismbblead(*s1); - l2 = _ismbblead(*s2); - if ( !l1 && !l2 ) { - - if (*s1 != *s2) - return colldif(*s1, *s2); - else { - s1 += 1; - s2 += 1; - } - } - else if ( l1 && l2 ){ - short_s1 = (unsigned short *)s1; - short_s2 = (unsigned short *)s2; - if ( *short_s1 != *short_s2 ) - return colldif(*short_s1, *short_s2); - else { - s1 += 2; - s2 += 2; - - } - } - else - return colldif(*s1, *s2); - } ; - return 0; -} - -#if 0 -int _mbsbcoll(const unsigned char *str1, const unsigned char *str2) -{ - unsigned char *s1 = (unsigned char *)str1; - unsigned char *s2 = (unsigned char *)str2; - - unsigned short *short_s1, *short_s2; - - int l1, l2; - - - while ( *s1 != 0 ) { - - - l1 = _ismbblead(*s1); - l2 = _ismbblead(*s2); - if ( !l1 && !l2 ) { - - if (*s1 != *s2) - return colldif(*s1, *s2); - else { - s1 += 1; - s2 += 1; - } - } - else if ( l1 && l2 ){ - short_s1 = (unsigned short *)s1; - short_s2 = (unsigned short *)s2; - if ( *short_s1 != *short_s2 ) - return colldif(*short_s1, *short_s2); - else { - s1 += 2; - s2 += 2; - } - } - else - return colldif(*s1, *s2); - } ; - return 0; -} -#endif diff --git a/reactos/lib/msvcrt/mbstring/mbscpy.c b/reactos/lib/msvcrt/mbstring/mbscpy.c deleted file mode 100644 index 89007c27ffc..00000000000 --- a/reactos/lib/msvcrt/mbstring/mbscpy.c +++ /dev/null @@ -1,10 +0,0 @@ -#include -#include - -/* - * @implemented - */ -unsigned char * _mbscpy(unsigned char *dst, const unsigned char *str) -{ - return (unsigned char*)strcpy((char*)dst,(const char*)str); -} diff --git a/reactos/lib/msvcrt/mbstring/mbscspn.c b/reactos/lib/msvcrt/mbstring/mbscspn.c deleted file mode 100644 index da27e5e9960..00000000000 --- a/reactos/lib/msvcrt/mbstring/mbscspn.c +++ /dev/null @@ -1,23 +0,0 @@ -#include - -/* - * FIXME not correct - * - * @unimplemented - */ -size_t _mbscspn(const unsigned char *s1, const unsigned char *s2) -{ - const unsigned char *p, *spanp; - char c, sc; - - for (p = s1;;) - { - c = *p++; - spanp = s2; - do { - if ((sc = *spanp++) == c) - return (size_t)(p - 1) - (size_t)s1; - } while (sc != 0); - } - /* NOTREACHED */ -} diff --git a/reactos/lib/msvcrt/mbstring/mbsdec.c b/reactos/lib/msvcrt/mbstring/mbsdec.c deleted file mode 100644 index 14c228c81c5..00000000000 --- a/reactos/lib/msvcrt/mbstring/mbsdec.c +++ /dev/null @@ -1,17 +0,0 @@ -#include - -/* - * @implemented - */ -unsigned char * _mbsdec(const unsigned char *str, const unsigned char *cur) -{ - unsigned char *s = (unsigned char *)cur; - if ( str >= cur ) - return NULL; - - s--; - if (_ismbblead(*(s-1)) ) - s--; - - return s; -} diff --git a/reactos/lib/msvcrt/mbstring/mbsdup.c b/reactos/lib/msvcrt/mbstring/mbsdup.c deleted file mode 100644 index db251c1c342..00000000000 --- a/reactos/lib/msvcrt/mbstring/mbsdup.c +++ /dev/null @@ -1,28 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/msvcrt/mbstring/mbsdup.c - * PURPOSE: Duplicates a multi byte string - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - Modified from DJGPP strdup - * 12/04/99: Created - */ - -#include -#include - -/* - * @implemented - */ -unsigned char * _mbsdup(const unsigned char *_s) -{ - unsigned char *rv; - if (_s == 0) - return 0; - rv = (unsigned char *)malloc(_mbslen(_s) + 1); - if (rv == 0) - return 0; - _mbscpy(rv, _s); - return rv; -} diff --git a/reactos/lib/msvcrt/mbstring/mbsicmp.c b/reactos/lib/msvcrt/mbstring/mbsicmp.c deleted file mode 100644 index 563b2a75dc0..00000000000 --- a/reactos/lib/msvcrt/mbstring/mbsicmp.c +++ /dev/null @@ -1,65 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/msvcrt/mbstring/mbsicmp.c - * PURPOSE: Duplicates a multi byte string - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 12/04/99: Created - */ -#include -#include -#include - -/* - * @implemented - */ -int _mbsicmp(const unsigned char *str1, const unsigned char *str2) -{ - unsigned char *s1 = (unsigned char *)str1; - unsigned char *s2 = (unsigned char *)str2; - - unsigned short *short_s1, *short_s2; - - int l1, l2; - - do { - - if (*s1 == 0) - break; - - l1 = _ismbblead(*s1); - l2 = _ismbblead(*s2); - if ( !l1 && !l2 ) { - - if (toupper(*s1) != toupper(*s2)) - return toupper(*s1) - toupper(*s2); - else { - s1 += 1; - s2 += 1; - } - } - else if ( l1 && l2 ){ - short_s1 = (unsigned short *)s1; - short_s2 = (unsigned short *)s2; - if ( _mbctoupper(*short_s1) != _mbctoupper(*short_s2 )) - return _mbctoupper(*short_s1) - _mbctoupper(*short_s2); - else { - s1 += 2; - s2 += 2; - } - } - else - return *s1 - *s2; - } while (*s1 != 0); - return 0; - - while (toupper(*s1) == toupper(*s2)) - { - if (*s1 == 0) - return 0; - s1++; - s2++; - } - return toupper(*(unsigned const char *)s1) - toupper(*(unsigned const char *)(s2)); -} diff --git a/reactos/lib/msvcrt/mbstring/mbsicoll.c b/reactos/lib/msvcrt/mbstring/mbsicoll.c deleted file mode 100644 index d07f4a6afe6..00000000000 --- a/reactos/lib/msvcrt/mbstring/mbsicoll.c +++ /dev/null @@ -1,58 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/msvcrt/mbstring/mbsicoll.c - * PURPOSE: - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 12/04/99: Created - */ -#include -#include -#include - -int colldif(unsigned short c1, unsigned short c2); -/* - * @implemented - */ -int _mbsicoll(const unsigned char *str1, const unsigned char *str2) -{ - unsigned char *s1 = (unsigned char *)str1; - unsigned char *s2 = (unsigned char *)str2; - - unsigned short *short_s1, *short_s2; - - int l1, l2; - - while ( *s1 != 0 ) { - - if (*s1 == 0) - break; - - l1 = _ismbblead(*s1); - l2 = _ismbblead(*s2); - if ( !l1 && !l2 ) { - - if (toupper(*s1) != toupper(*s2)) - return colldif(*s1, *s2); - else { - s1 += 1; - s2 += 1; - } - } - else if ( l1 && l2 ){ - short_s1 = (unsigned short *)s1; - short_s2 = (unsigned short *)s2; - if ( _mbctoupper(*short_s1) != _mbctoupper(*short_s2 )) - return colldif(*short_s1, *short_s2); - else { - s1 += 2; - s2 += 2; - - } - } - else - return colldif(*s1, *s2); - } ; - return 0; -} diff --git a/reactos/lib/msvcrt/mbstring/mbsinc.c b/reactos/lib/msvcrt/mbstring/mbsinc.c deleted file mode 100644 index 98a5fb5dbd9..00000000000 --- a/reactos/lib/msvcrt/mbstring/mbsinc.c +++ /dev/null @@ -1,13 +0,0 @@ -#include - -/* - * @implemented - */ -unsigned char * _mbsinc(const unsigned char *s) -{ - unsigned char *c = (unsigned char *)s; - if (_ismbblead(*s) ) - c++; - c++; - return c; -} diff --git a/reactos/lib/msvcrt/mbstring/mbslen.c b/reactos/lib/msvcrt/mbstring/mbslen.c deleted file mode 100644 index 8529fbf27f5..00000000000 --- a/reactos/lib/msvcrt/mbstring/mbslen.c +++ /dev/null @@ -1,18 +0,0 @@ -#include - -size_t _mbclen2(const unsigned int s); - -/* - * @implemented - */ -size_t _mbslen(const unsigned char *str) -{ - int i = 0; - unsigned char *s; - - if (str == 0) - return 0; - - for (s = (unsigned char *)str; *s; s+=_mbclen2(*s),i++); - return i; -} diff --git a/reactos/lib/msvcrt/mbstring/mbslwr.c b/reactos/lib/msvcrt/mbstring/mbslwr.c deleted file mode 100644 index 071a7659ca1..00000000000 --- a/reactos/lib/msvcrt/mbstring/mbslwr.c +++ /dev/null @@ -1,45 +0,0 @@ -#include -#include - -unsigned int _mbbtolower(unsigned int c) -{ - if (!_ismbblead(c) ) - return tolower(c); - return c; -} - -// code page 952 -#define CASE_DIFF (0x8281 - 0x8260) - -/* - * @implemented - */ -unsigned int _mbctolower(unsigned int c) -{ - if ((c & 0xFF00) != 0) { - // true multibyte case conversion needed - if (_ismbclower(c)) - return c + CASE_DIFF; - } else { - return _mbbtolower(c); - } - return 0; -} - -/* - * @implemented - */ -unsigned char * _mbslwr(unsigned char *x) -{ - unsigned char *y=x; - - while (*y) { - if (!_ismbblead(*y)) { - *y = tolower(*y); - } else { - *y=_mbctolower(*(unsigned short *)y); - y++; - } - } - return x; -} diff --git a/reactos/lib/msvcrt/mbstring/mbsncat.c b/reactos/lib/msvcrt/mbstring/mbsncat.c deleted file mode 100644 index 4eb97b2349b..00000000000 --- a/reactos/lib/msvcrt/mbstring/mbsncat.c +++ /dev/null @@ -1,64 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/msvcrt/mbstring/mbsncat.c - * PURPOSE: Concatenate two multi byte string to maximum of n characters or bytes - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 12/04/99: Created - */ - -#include -#include - -size_t _mbclen2(const unsigned int s); - -/* - * @implemented - */ -unsigned char * _mbsncat(unsigned char *dst, const unsigned char *src, size_t n) -{ - unsigned char *d = dst; - const unsigned char *s = src; - if (n != 0) { - d = dst + _mbslen(dst); // get the end of string - d += _mbclen2(*d); // move 1 or 2 up - - do { - if ((*d++ = *s++) == 0) - { - while (--n != 0) - *d++ = 0; - break; - } - if (!_ismbblead(*s) ) - n--; - } while (n > 0); - } - return dst; -} - -/* - * @implemented - */ -unsigned char * _mbsnbcat(unsigned char *dst, const unsigned char *src, size_t n) -{ - unsigned char *d; - const unsigned char *s = src; - if (n != 0) { - d = dst + _mbslen(dst); // get the end of string - d += _mbclen2(*d); // move 1 or 2 up - - do { - if ((*d++ = *s++) == 0) - { - while (--n != 0) - *d++ = 0; - break; - } - if ( !(n==1 && _ismbblead(*s)) ) - n--; - } while (n > 0); - } - return dst; -} diff --git a/reactos/lib/msvcrt/mbstring/mbsnccnt.c b/reactos/lib/msvcrt/mbstring/mbsnccnt.c deleted file mode 100644 index af739200fd0..00000000000 --- a/reactos/lib/msvcrt/mbstring/mbsnccnt.c +++ /dev/null @@ -1,35 +0,0 @@ -#include - -/* - * @implemented - */ -size_t _mbsnccnt(const unsigned char *str, size_t n) -{ - unsigned char *s = (unsigned char *)str; - size_t cnt = 0; - while(*s != 0 && n > 0) { - if (_ismbblead(*s) ) - s++; - else - n--; - s++; - cnt++; - } - - return cnt; -} - -/* - * @implemented - */ -size_t _mbsnbcnt(const unsigned char *str, size_t n) -{ - unsigned char *s = (unsigned char *)str; - while(*s != 0 && n > 0) { - if (!_ismbblead(*s) ) - n--; - s++; - } - - return (size_t)(s - str); -} diff --git a/reactos/lib/msvcrt/mbstring/mbsncmp.c b/reactos/lib/msvcrt/mbstring/mbsncmp.c deleted file mode 100644 index d108898a438..00000000000 --- a/reactos/lib/msvcrt/mbstring/mbsncmp.c +++ /dev/null @@ -1,109 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/msvcrt/mbstring/mbsncmp.c - * PURPOSE: Compares two strings to a maximum of n bytes or characters - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 12/04/99: Created - */ - -#include - -/* - * @implemented - */ -int _mbsncmp(const unsigned char *str1, const unsigned char *str2, size_t n) -{ - unsigned char *s1 = (unsigned char *)str1; - unsigned char *s2 = (unsigned char *)str2; - - unsigned short *short_s1, *short_s2; - - int l1, l2; - - if (n == 0) - return 0; - do { - - if (*s1 == 0) - break; - - l1 = _ismbblead(*s1); - l2 = _ismbblead(*s2); - if ( !l1 && !l2 ) { - - if (*s1 != *s2) - return *s1 - *s2; - else { - s1 += 1; - s2 += 1; - n--; - } - } - else if ( l1 && l2 ){ - short_s1 = (unsigned short *)s1; - short_s2 = (unsigned short *)s2; - if ( *short_s1 != *short_s2 ) - return *short_s1 - *short_s2; - else { - s1 += 2; - s2 += 2; - n--; - - } - } - else - return *s1 - *s2; - } while (n > 0); - return 0; -} - -/* - * @implemented - */ -int _mbsnbcmp(const unsigned char *str1, const unsigned char *str2, size_t n) -{ - unsigned char *s1 = (unsigned char *)str1; - unsigned char *s2 = (unsigned char *)str2; - - unsigned short *short_s1, *short_s2; - - int l1, l2; - - if (n == 0) - return 0; - do { - - if (*s1 == 0) - break; - - l1 = _ismbblead(*s1); - l2 = _ismbblead(*s2); - if ( !l1 && !l2 ) { - - if (*s1 != *s2) - return *s1 - *s2; - else { - s1 += 1; - s2 += 1; - n--; - } - } - else if ( l1 && l2 ){ - short_s1 = (unsigned short *)s1; - short_s2 = (unsigned short *)s2; - if ( *short_s1 != *short_s2 ) - return *short_s1 - *short_s2; - else { - s1 += 2; - s2 += 2; - n-=2; - - } - } - else - return *s1 - *s2; - } while (n > 0); - return 0; -} diff --git a/reactos/lib/msvcrt/mbstring/mbsncoll.c b/reactos/lib/msvcrt/mbstring/mbsncoll.c deleted file mode 100644 index f9af6ebce83..00000000000 --- a/reactos/lib/msvcrt/mbstring/mbsncoll.c +++ /dev/null @@ -1,115 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/msvcrt/mbstring/mbsncoll.c - * PURPOSE: - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 12/04/99: Created - */ -#include - -int colldif(unsigned short c1, unsigned short c2); - -/* - * @implemented - */ -int _mbsncoll(const unsigned char *str1, const unsigned char *str2, size_t n) -{ - unsigned char *s1 = (unsigned char *)str1; - unsigned char *s2 = (unsigned char *)str2; - - unsigned short *short_s1, *short_s2; - - int l1, l2; - - if (n == 0) - return 0; - do { - - if (*s1 == 0) - break; - - l1 = _ismbblead(*s1); - l2 = _ismbblead(*s2); - if ( !l1 && !l2 ) { - - if (*s1 != *s2) - return colldif(*s1, *s2); - else { - s1 += 1; - s2 += 1; - n--; - } - } - else if ( l1 && l2 ){ - short_s1 = (unsigned short *)s1; - short_s2 = (unsigned short *)s2; - if ( *short_s1 != *short_s2 ) - return colldif(*short_s1, *short_s2); - else { - s1 += 2; - s2 += 2; - n--; - - } - } - else - return colldif(*s1, *s2); - } while (n > 0); - return 0; -} - -/* - * @implemented - */ -int _mbsnbcoll(const unsigned char *str1, const unsigned char *str2, size_t n) -{ - unsigned char *s1 = (unsigned char *)str1; - unsigned char *s2 = (unsigned char *)str2; - - unsigned short *short_s1, *short_s2; - - int l1, l2; - - if (n == 0) - return 0; - do { - - if (*s1 == 0) - break; - - l1 = _ismbblead(*s1); - l2 = _ismbblead(*s2); - if ( !l1 && !l2 ) { - - if (*s1 != *s2) - return colldif(*s1, *s2); - else { - s1 += 1; - s2 += 1; - n--; - } - } - else if ( l1 && l2 ){ - short_s1 = (unsigned short *)s1; - short_s2 = (unsigned short *)s2; - if ( *short_s1 != *short_s2 ) - return colldif(*short_s1, *short_s2); - else { - s1 += 2; - s2 += 2; - n-=2; - - } - } - else - return colldif(*s1, *s2); - } while (n > 0); - return 0; -} - -int colldif(unsigned short c1, unsigned short c2) -{ - return c1 - c2; -} diff --git a/reactos/lib/msvcrt/mbstring/mbsncpy.c b/reactos/lib/msvcrt/mbstring/mbsncpy.c deleted file mode 100644 index 5b4a2c9238d..00000000000 --- a/reactos/lib/msvcrt/mbstring/mbsncpy.c +++ /dev/null @@ -1,91 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/msvcrt/mbstring/mbsncpy.c - * PURPOSE: Copies a string to a maximum of n bytes or characters - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 12/04/99: Created - */ - -#include - - -/* - * @implemented - */ -unsigned char* _mbsncpy(unsigned char *str1, const unsigned char *str2, size_t n) -{ - unsigned char *s1 = (unsigned char *)str1; - unsigned char *s2 = (unsigned char *)str2; - - unsigned short *short_s1, *short_s2; - - if (n == 0) - return 0; - do { - - if (*s2 == 0) - break; - - if ( !_ismbblead(*s2) ) { - - *s1 = *s2; - s1 += 1; - s2 += 1; - n--; - } - else { - short_s1 = (unsigned short *)s1; - short_s2 = (unsigned short *)s2; - *short_s1 = *short_s2; - s1 += 2; - s2 += 2; - n--; - } - } while (n > 0); - return str1; -} - - -/* - * The _mbsnbcpy function copies count bytes from src to dest. If src is shorter - * than dest, the string is padded with null characters. If dest is less than or - * equal to count it is not terminated with a null character. - * - * @implemented - */ -unsigned char * _mbsnbcpy(unsigned char *str1, const unsigned char *str2, size_t n) -{ - unsigned char *s1 = (unsigned char *)str1; - unsigned char *s2 = (unsigned char *)str2; - - unsigned short *short_s1, *short_s2; - - if (n == 0) - return 0; - do { - - if (*s2 == 0) { - *s1 = *s2; - break; - } - - if ( !_ismbblead(*s2) ) { - - *s1 = *s2; - s1 += 1; - s2 += 1; - n--; - } - else { - short_s1 = (unsigned short *)s1; - short_s2 = (unsigned short *)s2; - *short_s1 = *short_s2; - s1 += 2; - s2 += 2; - n-=2; - } - } while (n > 0); - return str1; -} diff --git a/reactos/lib/msvcrt/mbstring/mbsnextc.c b/reactos/lib/msvcrt/mbstring/mbsnextc.c deleted file mode 100644 index 4e163daabc3..00000000000 --- a/reactos/lib/msvcrt/mbstring/mbsnextc.c +++ /dev/null @@ -1,19 +0,0 @@ -#include - -/* - * @implemented - */ -unsigned int _mbsnextc (const unsigned char *src) -{ - unsigned char *char_src = (unsigned char *)src; - unsigned short *short_src = (unsigned short *)src; - - if (src == NULL) - return 0; - - if (!_ismbblead(*src)) - return *char_src; - else - return *short_src; - return 0; -} diff --git a/reactos/lib/msvcrt/mbstring/mbsnicmp.c b/reactos/lib/msvcrt/mbstring/mbsnicmp.c deleted file mode 100644 index 0ece47523f9..00000000000 --- a/reactos/lib/msvcrt/mbstring/mbsnicmp.c +++ /dev/null @@ -1,47 +0,0 @@ -#include - - -size_t _mbclen2(const unsigned int s); -unsigned int _mbbtoupper(unsigned int c); - - -/* - * @implemented - */ -int _mbsnicmp(const unsigned char *s1, const unsigned char *s2, size_t n) -{ - if (n == 0) - return 0; - do { - if (_mbbtoupper(*s1) != _mbbtoupper(*s2)) - return _mbbtoupper(*(unsigned const char *)s1) - _mbbtoupper(*(unsigned const char *)s2); - s1 += _mbclen2(*s1); - s2 += _mbclen2(*s2); - - if (*s1 == 0) - break; - if (!_ismbblead(*s1)) - n--; - } while (n > 0); - return 0; -} - -/* - * @implemented - */ -int _mbsnbicmp(const unsigned char *s1, const unsigned char *s2, size_t n) -{ - if (n == 0) - return 0; - do { - if (_mbbtoupper(*s1) != _mbbtoupper(*s2)) - return _mbbtoupper(*(unsigned const char *)s1) - _mbbtoupper(*(unsigned const char *)s2); - s1 += _mbclen2(*s1); - s2 += _mbclen2(*s2); - - if (*s1 == 0) - break; - n--; - } while (n > 0); - return 0; -} diff --git a/reactos/lib/msvcrt/mbstring/mbsnicoll.c b/reactos/lib/msvcrt/mbstring/mbsnicoll.c deleted file mode 100644 index df778069f92..00000000000 --- a/reactos/lib/msvcrt/mbstring/mbsnicoll.c +++ /dev/null @@ -1,17 +0,0 @@ -#include - -/* - * @unimplemented - */ -int _mbsnicoll(const unsigned char *s1, const unsigned char *s2, size_t n) -{ - return 0; -} - -/* - * @unimplemented - */ -int _mbsnbicoll(const unsigned char *s1, const unsigned char *s2, size_t n) -{ - return 0; -} diff --git a/reactos/lib/msvcrt/mbstring/mbsninc.c b/reactos/lib/msvcrt/mbstring/mbsninc.c deleted file mode 100644 index bf8a50caf5b..00000000000 --- a/reactos/lib/msvcrt/mbstring/mbsninc.c +++ /dev/null @@ -1,16 +0,0 @@ -#include - -/* - * @implemented - */ -unsigned char * _mbsninc(const unsigned char *str, size_t n) -{ - unsigned char *s = (unsigned char *)str; - while(*s != 0 && n > 0) { - if (!_ismbblead(*s) ) - n--; - s++; - } - - return s; -} diff --git a/reactos/lib/msvcrt/mbstring/mbsnset.c b/reactos/lib/msvcrt/mbstring/mbsnset.c deleted file mode 100644 index 37be2754ffc..00000000000 --- a/reactos/lib/msvcrt/mbstring/mbsnset.c +++ /dev/null @@ -1,70 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/msvcrt/mbstring/mbsnset.c - * PURPOSE: Fills a string with a multibyte character - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 12/04/99: Created - */ -#include - -size_t _mbclen2(const unsigned int s); - -/* - * @implemented - */ -unsigned char * _mbsnset(unsigned char *src, unsigned int val, size_t count) -{ - unsigned char *char_src = (unsigned char *)src; - unsigned short *short_src = (unsigned short *)src; - - if ( _mbclen2(val) == 1 ) { - - while(count > 0) { - *char_src = val; - char_src++; - count--; - } - *char_src = 0; - } - else { - while(count > 0) { - *short_src = val; - short_src++; - count-=2; - } - *short_src = 0; - } - - return src; -} - -/* - * @implemented - */ -unsigned char * _mbsnbset(unsigned char *src, unsigned int val, size_t count) -{ - unsigned char *char_src = (unsigned char *)src; - unsigned short *short_src = (unsigned short *)src; - - if ( _mbclen2(val) == 1 ) { - - while(count > 0) { - *char_src = val; - char_src++; - count--; - } - *char_src = 0; - } - else { - while(count > 0) { - *short_src = val; - short_src++; - count-=2; - } - *short_src = 0; - } - - return src; -} diff --git a/reactos/lib/msvcrt/mbstring/mbspbrk.c b/reactos/lib/msvcrt/mbstring/mbspbrk.c deleted file mode 100644 index ed0b9d4b6de..00000000000 --- a/reactos/lib/msvcrt/mbstring/mbspbrk.c +++ /dev/null @@ -1,25 +0,0 @@ -#include - -int isleadbyte(int byte); - -/* - * not correct - * - * @implemented - */ -unsigned char * _mbspbrk(const unsigned char *s1, const unsigned char *s2) -{ - const unsigned char* p; - - while (*s1) - { - for (p = s2; *p; p += (isleadbyte(*p) ? 2 : 1)) - { - if (*p == *s1) - if (!isleadbyte(*p) || (*(p+1) == *(s1 + 1))) - return (unsigned char*)s1; - } - s1 += (isleadbyte(*s1) ? 2 : 1); - } - return NULL; -} diff --git a/reactos/lib/msvcrt/mbstring/mbsrchr.c b/reactos/lib/msvcrt/mbstring/mbsrchr.c deleted file mode 100644 index c0f66f36376..00000000000 --- a/reactos/lib/msvcrt/mbstring/mbsrchr.c +++ /dev/null @@ -1,33 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/msvcrt/mbstring/mbsrchr.c - * PURPOSE: Searches for a character in reverse - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 12/04/99: Created - */ - -#include - -/* - * @implemented - */ -unsigned char * _mbsrchr(const unsigned char *src, unsigned int val) -{ - unsigned int c; - unsigned char *match = NULL; - - if (!src) - return NULL; - - while (1) - { - c = _mbsnextc(src); - if (c == val) - match = (unsigned char*)src; - if (!c) - return match; - src += (c > 255) ? 2 : 1; - } -} diff --git a/reactos/lib/msvcrt/mbstring/mbsrev.c b/reactos/lib/msvcrt/mbstring/mbsrev.c deleted file mode 100644 index f30cb10cd04..00000000000 --- a/reactos/lib/msvcrt/mbstring/mbsrev.c +++ /dev/null @@ -1,33 +0,0 @@ -#include - -/* - * @implemented - */ -unsigned char * _mbsrev(unsigned char *s) -{ - unsigned char *e; - unsigned char a; - unsigned char *e2; - e=s; - while (*e) { - if ( _ismbblead(*e) ) { - a = *e; - e2 = e; - *e2 = *++e; - if ( *e == 0 ) - break; - *e = a; - } - e++; - } - while (s - -size_t _mbclen2(const unsigned int s); - -/* - * @implemented - */ -unsigned char * _mbsset(unsigned char *src, unsigned int c) -{ - unsigned char *char_src = src; - unsigned short *short_src = (unsigned short *)src; - - if ( _mbclen2(c) == 1 ) { - - while(*char_src != 0) { - *char_src = c; - char_src++; - } - *char_src = 0; - } - else { - while(*short_src != 0) { - *short_src = c; - short_src++; - } - *short_src = 0; - } - - return src; -} diff --git a/reactos/lib/msvcrt/mbstring/mbsspn.c b/reactos/lib/msvcrt/mbstring/mbsspn.c deleted file mode 100644 index 0eb8ec0238d..00000000000 --- a/reactos/lib/msvcrt/mbstring/mbsspn.c +++ /dev/null @@ -1,20 +0,0 @@ -#include - -/* - * FIXME not correct - * - * @unimplemented - */ -size_t _mbsspn(const unsigned char *s1, const unsigned char *s2) -{ - const unsigned char *p = s1, *spanp; - char c, sc; - - cont: - c = *p++; - for (spanp = s2; (sc = *spanp++) != 0;) - if (sc == c) - goto cont; - return (size_t)(p - 1) - (size_t)s1; -// - (char *)s1); -} diff --git a/reactos/lib/msvcrt/mbstring/mbsspnp.c b/reactos/lib/msvcrt/mbstring/mbsspnp.c deleted file mode 100644 index c82fcf8b9ca..00000000000 --- a/reactos/lib/msvcrt/mbstring/mbsspnp.c +++ /dev/null @@ -1,19 +0,0 @@ -#include - -/* - * FIXME not correct - * - * @unimplemented - */ -unsigned char * _mbsspnp(const unsigned char *s1, const unsigned char *s2) -{ - const unsigned char *p = s1, *spanp; - char c, sc; - - cont: - c = *p++; - for (spanp = s2; (sc = *spanp++) != 0;) - if (sc == c) - goto cont; - return (unsigned char *)p; -} diff --git a/reactos/lib/msvcrt/mbstring/mbsstr.c b/reactos/lib/msvcrt/mbstring/mbsstr.c deleted file mode 100644 index cbf9f396925..00000000000 --- a/reactos/lib/msvcrt/mbstring/mbsstr.c +++ /dev/null @@ -1,23 +0,0 @@ -#include -#include - -/* - * @implemented - */ -unsigned char *_mbsstr(const unsigned char *src1,const unsigned char *src2) -{ - int len; - - if (src2 ==NULL || *src2 == 0) - return (unsigned char *)src1; - - len = _mbslen(src2); - - while(*src1) - { - if ((*src1 == *src2) && (_mbsncmp(src1,src2,len) == 0)) - return (unsigned char *)src1; - src1 = (unsigned char *)_mbsinc(src1); - } - return NULL; -} diff --git a/reactos/lib/msvcrt/mbstring/mbstok.c b/reactos/lib/msvcrt/mbstring/mbstok.c deleted file mode 100644 index 79015a8b787..00000000000 --- a/reactos/lib/msvcrt/mbstring/mbstok.c +++ /dev/null @@ -1,56 +0,0 @@ -#include - -/* - * @implemented - */ -unsigned char * _mbstok(unsigned char *s, unsigned char *delim) -{ - const unsigned char *spanp; - int c, sc; - unsigned char *tok; - static unsigned char *last; - - - if (s == NULL && (s = last) == NULL) - return (NULL); - - /* - * Skip (span) leading delimiters (s += strspn(s, delim), sort of). - */ - cont: - c = *s; - s = _mbsinc(s); - - for (spanp = delim; (sc = *spanp) != 0; spanp = _mbsinc(spanp)) { - if (c == sc) - goto cont; - } - - if (c == 0) { /* no non-delimiter characters */ - last = NULL; - return (NULL); - } - tok = s - 1; - - /* - * Scan token (scan for delimiters: s += strcspn(s, delim), sort of). - * Note that delim must have one NUL; we stop if we see that, too. - */ - for (;;) { - c = *s; - s = _mbsinc(s); - spanp = delim; - do { - if ((sc = *spanp) == c) { - if (c == 0) - s = NULL; - else - s[-1] = 0; - last = s; - return (tok); - } - spanp = _mbsinc(spanp); - } while (sc != 0); - } - /* NOTREACHED */ -} diff --git a/reactos/lib/msvcrt/mbstring/mbstrlen.c b/reactos/lib/msvcrt/mbstring/mbstrlen.c deleted file mode 100644 index b8c64cce6f1..00000000000 --- a/reactos/lib/msvcrt/mbstring/mbstrlen.c +++ /dev/null @@ -1,19 +0,0 @@ -#include -#include - -/* - * @implemented - */ -size_t _mbstrlen( const char *string ) -{ - char *s = (char *)string; - size_t i = 0; - - while ( *s != 0 ) { - if ( _ismbblead(*s) ) - s++; - s++; - i++; - } - return i; -} diff --git a/reactos/lib/msvcrt/mbstring/mbsupr.c b/reactos/lib/msvcrt/mbstring/mbsupr.c deleted file mode 100644 index 1899b7fcc3c..00000000000 --- a/reactos/lib/msvcrt/mbstring/mbsupr.c +++ /dev/null @@ -1,56 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/msvcrt/mbstring/mbsupr.c - * PURPOSE: - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 12/04/99: Created - */ -#include -#include - -unsigned int _mbbtoupper(unsigned int c) -{ - if (!_ismbblead(c) ) - return toupper(c); - - return c; -} - -// codepage 952 -#define CASE_DIFF (0x8281 - 0x8260) - -/* - * @implemented - */ -unsigned int _mbctoupper(unsigned int c) -{ - - if ((c & 0xFF00) != 0) { -// true multibyte case conversion needed - if ( _ismbcupper(c) ) - return c + CASE_DIFF; - - } else - return _mbbtoupper(c); - - return 0; -} - -/* - * @implemented - */ -unsigned char * _mbsupr(unsigned char *x) -{ - unsigned char *y=x; - while (*y) { - if (!_ismbblead(*y) ) - *y = toupper(*y); - else { - *y=_mbctoupper(*(unsigned short *)y); - y++; - } - } - return x; -} diff --git a/reactos/lib/msvcrt/misc/amsg.c b/reactos/lib/msvcrt/misc/amsg.c deleted file mode 100644 index b8b288afa23..00000000000 --- a/reactos/lib/msvcrt/misc/amsg.c +++ /dev/null @@ -1,54 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/msvcrt/misc/amsg.c - * PURPOSE: Print runtime error messages - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 28/12/98: Created - */ - -#include -#include - - -static char *__rt_err_msg[] = -{ - "stack overflow", /* _RT_STACK */ - "null pointer assignment", /* _RT_NULLPTR */ - "floating point not loaded", /* _RT_FLOAT */ - "integer divide by 0", /* _RT_INTDIV */ - "not enough space for arguments", /* _RT_SPACEARG */ - "not enough space for environment", /* _RT_SPACEENV */ - "abnormal program termination", /* _RT_ABORT */ - "not enough space for thread data", /* _RT_THREAD */ - "unexpected multithread lock error", /* _RT_LOCK */ - "unexpected heap error", /* _RT_HEAP */ - "unable to open console device", /* _RT_OPENCON */ - "non-continuable exception", /* _RT_NONCONT */ - "invalid exception disposition", /* _RT_INVALDISP */ - "not enough space for _onexit/atexit table", /* _RT_ONEXIT */ - "pure virtual function call", /* _RT_PUREVIRT */ - "not enough space for stdio initialization", /* _RT_STDIOINIT */ - "not enough space for lowio initialization", /* _RT_LOWIOINIT */ -}; - - -/* - * @implemented - */ -int _aexit_rtn(int exitcode) -{ - _exit(exitcode); - return 0; -} - -/* - * @implemented - */ -void _amsg_exit(int errnum) -{ - fprintf(stderr, "runtime error - %s\n", __rt_err_msg[errnum]); - _aexit_rtn(-1); -} - diff --git a/reactos/lib/msvcrt/misc/assert.c b/reactos/lib/msvcrt/misc/assert.c deleted file mode 100644 index 0e416a894c7..00000000000 --- a/reactos/lib/msvcrt/misc/assert.c +++ /dev/null @@ -1,17 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include -#include -#include -#include - - -/* - * @implemented - */ -void _assert(const char *msg, const char *file, int line) -{ - /* Assertion failed at foo.c line 45: x - -#ifndef __GNUC__ - -/* GLOBAL VARIABLES *******************************************************/ - -int _fltused; - - -/* FUNCTIONS **************************************************************/ - -/* - * @unimplemented - */ -int -STDCALL -_except_handler3(void) -{ - return 0; -} - -/* - * @unimplemented - */ -int -STDCALL -_local_unwind2(void) -{ - return 0; -} - -#else /*__GNUC__*/ - -#endif /*__GNUC__*/ - - -/* -int __cdecl _allmul(void) -{ - return 0; -} - -int __cdecl _allshl(void) -{ - return 0; -} - -void __cdecl _chkesp(int value1, int value2) -{ -} - -int __cdecl _alloca_probe(void) -{ - return 0; -} - -int STDCALL _abnormal_termination(void) -{ - return 0; -} - -int STDCALL _setjmp(void) -{ - return 0; -} -*/ -/* -BOOL WINAPI DllMain(HANDLE hInst, ULONG ul_reason_for_call, LPVOID lpReserved); - -int STDCALL _DllMainCRTStartup(HANDLE hInst, ULONG ul_reason_for_call, LPVOID lpReserved) -{ - BOOL result; - - //__fileno_init(); - //result = DllMain(hInst, ul_reason_for_call, lpReserved); - - result = DllMain(hInst, DLL_PROCESS_ATTACH, lpReserved); - - - return (result ? 1 : 0); -} - */ - -/* EOF */ diff --git a/reactos/lib/msvcrt/misc/environ.c b/reactos/lib/msvcrt/misc/environ.c deleted file mode 100644 index 152f82e79f9..00000000000 --- a/reactos/lib/msvcrt/misc/environ.c +++ /dev/null @@ -1,452 +0,0 @@ -/* $Id$ - * - * dllmain.c - * - * ReactOS MSVCRT.DLL Compatibility Library - */ - -#include "precomp.h" -#include -#include -#include - -#define NDEBUG -#include - - -unsigned int _osver = 0; -unsigned int _winminor = 0; -unsigned int _winmajor = 0; -unsigned int _winver = 0; - -char *_acmdln = NULL; /* pointer to ascii command line */ -wchar_t *_wcmdln = NULL; /* pointer to wide character command line */ -#undef _environ -#undef _wenviron -char **_environ = NULL; /* pointer to environment block */ -wchar_t **_wenviron = NULL; /* pointer to environment block */ -char **__initenv = NULL; /* pointer to initial environment block */ -wchar_t **__winitenv = NULL; /* pointer to initial environment block */ -#undef _pgmptr -char *_pgmptr = NULL; /* pointer to program name */ -int __app_type = 0; //_UNKNOWN_APP; /* application type */ -int __mb_cur_max = 1; - -int _commode = _IOCOMMIT; - - -int BlockEnvToEnvironA(void) -{ - char *ptr, *environment_strings; - char **envptr; - int count = 1, len; - - DPRINT("BlockEnvToEnvironA()\n"); - - environment_strings = GetEnvironmentStringsA(); - if (environment_strings == NULL) { - return -1; - } - - for (ptr = environment_strings; *ptr; ptr += len) - { - len = strlen(ptr) + 1; - /* Skip drive letter settings. */ - if (*ptr != '=') - count++; - } - - __initenv = _environ = malloc(count * sizeof(char*)); - if (_environ) - { - for (ptr = environment_strings, envptr = _environ; count > 1; ptr += len) - { - len = strlen(ptr) + 1; - /* Skip drive letter settings. */ - if (*ptr != '=') - { - if ((*envptr = malloc(len)) == NULL) - { - for (envptr--; envptr >= _environ; envptr--); - free(*envptr); - FreeEnvironmentStringsA(environment_strings); - free(_environ); - __initenv = _environ = NULL; - return -1; - } - memcpy(*envptr++, ptr, len); - count--; - } - } - /* Add terminating NULL entry. */ - *envptr = NULL; - } - - FreeEnvironmentStringsA(environment_strings); - return _environ ? 0 : -1; -} - -int BlockEnvToEnvironW(void) -{ - wchar_t *ptr, *environment_strings; - wchar_t **envptr; - int count = 1, len; - - DPRINT("BlockEnvToEnvironW()\n"); - - environment_strings = GetEnvironmentStringsW(); - if (environment_strings == NULL) { - return -1; - } - - for (ptr = environment_strings; *ptr; ptr += len) - { - len = wcslen(ptr) + 1; - /* Skip drive letter settings. */ - if (*ptr != '=') - count++; - } - - __winitenv = _wenviron = malloc(count * sizeof(wchar_t*)); - if (_wenviron) - { - for (ptr = environment_strings, envptr = _wenviron; count > 1; ptr += len) - { - len = wcslen(ptr) + 1; - /* Skip drive letter settings. */ - if (*ptr != '=') - { - if ((*envptr = malloc(len * sizeof(wchar_t))) == NULL) - { - for (envptr--; envptr >= _wenviron; envptr--); - free(*envptr); - FreeEnvironmentStringsW(environment_strings); - free(_wenviron); - __winitenv = _wenviron = NULL; - return -1; - } - memcpy(*envptr++, ptr, len * sizeof(wchar_t)); - count--; - } - } - /* Add terminating NULL entry. */ - *envptr = NULL; - } - - FreeEnvironmentStringsW(environment_strings); - return _wenviron ? 0 : -1; -} - -/** - * Internal function to duplicate environment block. Although it's - * parameter are defined as char**, it's able to work also with - * wide character environment block which are of type wchar_t**. - * - * @param original_environment - * Environment to duplicate. - * @param wide - * Set to zero for multibyte environments, non-zero otherwise. - * - * @return Original environment in case of failure, otherwise - * pointer to new environment block. - */ -char **DuplicateEnvironment(char **original_environment, int wide) -{ - int count = 1; - char **envptr, **newenvptr, **newenv; - - for (envptr = original_environment; *envptr != NULL; envptr++, count++) - ; - - newenvptr = newenv = malloc(count * sizeof(char*)); - if (newenv == NULL) - return original_environment; - - for (envptr = original_environment; count > 1; newenvptr++, count--) - { - if (wide) - *newenvptr = (char*)wcsdup((wchar_t*)*envptr++); - else - *newenvptr = strdup(*envptr++); - if (*newenvptr == NULL) - { - for (newenvptr--; newenvptr >= newenv; newenvptr--); - free(*newenvptr); - free(newenv); - return original_environment; - } - } - - return newenv; -} - -/** - * Internal function to deallocate environment block. Although it's - * parameter are defined as char**, it's able to work also with - * wide character environment block which are of type wchar_t**. - * - * @param environment - * Environment to free. - */ -void FreeEnvironment(char **environment) -{ - char **envptr; - for (envptr = environment; *envptr != NULL; envptr++) - free(*envptr); - free(environment); -} - -/** - * Internal version of _wputenv and _putenv. It works duplicates the - * original envirnments created during initilization if needed to prevent - * having spurious pointers floating around. Then it updates the internal - * environment tables (_environ and _wenviron) and at last updates the - * OS environemnt. - * - * Note that there can happen situation when the internal [_w]environ - * arrays will be updated, but the OS environment update will fail. In - * this case we don't undo the changes to the [_w]environ tables to - * comply with the Microsoft behaviour (and it's also much easier :-). - */ -int SetEnv(const wchar_t *option) -{ - wchar_t *epos, *name; - wchar_t **wenvptr; - wchar_t *woption; - char *mboption; - int remove, index, count, size, result = 0, found = 0; - - if (option == NULL || (epos = wcschr(option, L'=')) == NULL) - return -1; - remove = (epos[1] == 0); - - /* Duplicate environment if needed. */ - if (_environ == __initenv) - { - if ((_environ = DuplicateEnvironment(_environ, 0)) == __initenv) - return -1; - } - if (_wenviron == __winitenv) - { - if ((_wenviron = (wchar_t**)DuplicateEnvironment((char**)_wenviron, 1)) == - __winitenv) - return -1; - } - - /* Create a copy of the option name. */ - name = malloc((epos - option + 1) * sizeof(wchar_t)); - if (name == NULL) - return -1; - memcpy(name, option, (epos - option) * sizeof(wchar_t)); - name[epos - option] = 0; - - /* Find the option we're trying to modify. */ - for (index = 0, wenvptr = _wenviron; *wenvptr != NULL; wenvptr++, index++) - { - if (!wcsnicmp(*wenvptr, option, epos - option)) - { - found = 1; - break; - } - } - - if (remove) - { - if (!found) - { - free(name); - return -1; - } - - /* Remove the option from wide character environment. */ - free(*wenvptr); - for (count = index; *wenvptr != NULL; wenvptr++, count++) - *wenvptr = *(wenvptr + 1); - _wenviron = realloc(_wenviron, count * sizeof(wchar_t*)); - - /* Remove the option from multibyte environment. We assume - * the environments are in sync and the option is at the - * same position. */ - free(_environ[index]); - for (; _environ[index] != NULL; index++) - _environ[index] = _environ[index + 1]; - _environ = realloc(_environ, count * sizeof(char*)); - - result = SetEnvironmentVariableW(name, NULL) ? 0 : -1; - } - else - { - /* Make a copy of the option that we will store in the environment block. */ - woption = wcsdup((wchar_t*)option); - if (woption == NULL) - { - free(name); - return -1; - } - - /* Create a multibyte copy of the option. */ - size = WideCharToMultiByte(CP_ACP, 0, option, -1, NULL, 0, NULL, NULL); - mboption = malloc(size); - if (mboption == NULL) - { - free(name); - free(woption); - return -1; - } - WideCharToMultiByte(CP_ACP, 0, option, -1, mboption, size, NULL, NULL); - - if (found) - { - /* Replace the current entry. */ - free(*wenvptr); - *wenvptr = woption; - free(_environ[index]); - _environ[index] = mboption; - } - else - { - wchar_t **wnewenv; - char **mbnewenv; - - /* Get the size of the original environment. */ - for (count = index; *wenvptr != NULL; wenvptr++, count++) - ; - - /* Create a new entry. */ - if ((wnewenv = realloc(_wenviron, (count + 2) * sizeof(wchar_t*))) == NULL) - { - free(name); - free(mboption); - free(woption); - return -1; - } - _wenviron = wnewenv; - if ((mbnewenv = realloc(_environ, (count + 2) * sizeof(char*))) == NULL) - { - free(name); - free(mboption); - free(woption); - return -1; - } - _environ = mbnewenv; - - /* Set the last entry to our option. */ - _wenviron[count] = woption; - _environ[count] = mboption; - _wenviron[count + 1] = NULL; - _environ[count + 1] = NULL; - } - - /* And finally update the OS environment. */ - result = SetEnvironmentVariableW(name, epos + 1) ? 0 : -1; - } - free(name); - - return result; -} - -/* - * @implemented - */ -int *__p__commode(void) // not exported by NTDLL -{ - return &_commode; -} - -/* - * @implemented - */ -void __set_app_type(int app_type) -{ - __app_type = app_type; -} - -/* - * @implemented - */ -char **__p__acmdln(void) -{ - return &_acmdln; -} - -/* - * @implemented - */ -char ***__p__environ(void) -{ - return &_environ; -} - -/* - * @implemented - */ -wchar_t ***__p__wenviron(void) -{ - return &_wenviron; -} - -/* - * @implemented - */ -char ***__p___initenv(void) -{ - return &__initenv; -} - -/* - * @implemented - */ -wchar_t ***__p___winitenv(void) -{ - return &__winitenv; -} - -/* - * @implemented - */ -int *__p___mb_cur_max(void) -{ - return &__mb_cur_max; -} - -/* - * @implemented - */ -unsigned int *__p__osver(void) -{ - return &_osver; -} - -/* - * @implemented - */ -char **__p__pgmptr(void) -{ - return &_pgmptr; -} - -/* - * @implemented - */ -unsigned int *__p__winmajor(void) -{ - return &_winmajor; -} - -/* - * @implemented - */ -unsigned int *__p__winminor(void) -{ - return &_winminor; -} - -/* - * @implemented - */ -unsigned int *__p__winver(void) -{ - return &_winver; -} - -/* EOF */ diff --git a/reactos/lib/msvcrt/misc/getargs.c b/reactos/lib/msvcrt/misc/getargs.c deleted file mode 100644 index 3a57cea4e74..00000000000 --- a/reactos/lib/msvcrt/misc/getargs.c +++ /dev/null @@ -1,176 +0,0 @@ -#include "precomp.h" -#include -#include - - -extern char*_acmdln; -extern char*_pgmptr; -#undef _environ -extern char**_environ; - -#undef __argv -#undef __argc - -char**__argv = NULL; -#undef __wargv -wchar_t**__wargv = NULL; -int __argc = 0; - -extern HANDLE hHeap; - -char* strndup(char* name, int len) -{ - char *s = malloc(len + 1); - if (s != NULL) { - strncpy(s, name, len); - name[len] = 0; - } - return s; -} - -#define SIZE (4096 / sizeof(char*)) - -int add(char* name) -{ - char** _new; - if ((__argc % SIZE) == 0) { - if (__argv == NULL) - _new = malloc(sizeof(char*) * SIZE); - else - _new = realloc(__argv, sizeof(char*) * (__argc + SIZE)); - if (_new == NULL) - return -1; - __argv = _new; - } - __argv[__argc++] = name; - return 0; -} - -int expand(char* name, int flag) -{ - char* s; - WIN32_FIND_DATAA fd; - HANDLE hFile; - BOOLEAN first = TRUE; - char buffer[256]; - int pos; - - s = strpbrk(name, "*?"); - if (s && flag) { - hFile = FindFirstFileA(name, &fd); - if (hFile != INVALID_HANDLE_VALUE) { - while(s != name && *s != '/' && *s != '\\') - s--; - pos = s - name; - if (*s == '/' || *s == '\\') - pos++; - strncpy(buffer, name, pos); - do { - if (!(fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) { - strcpy(&buffer[pos], fd.cFileName); - if (add(strdup(buffer)) < 0) { - FindClose(hFile); - return -1; - } - first = FALSE; - } - } - while(FindNextFileA(hFile, &fd)); - FindClose(hFile); - } - } - if (first) { - if (add(name) < 0) - return -1; - } - else - free(name); - return 0; -} - -/* - * @unimplemented - */ -int __getmainargs(int* argc, char*** argv, char*** env, int flag) -{ - int i, afterlastspace, ignorespace, len, doexpand; - - /* missing threading init */ - - i = 0; - afterlastspace = 0; - ignorespace = 0; - doexpand = flag; - - len = strlen(_acmdln); - - while (_acmdln[i]) { - if (_acmdln[i] == '"') { - if(ignorespace) { - ignorespace = 0; - } else { - ignorespace = 1; - doexpand = 0; - } - memmove(_acmdln + i, _acmdln + i + 1, len - i); - len--; - continue; - } - - if (_acmdln[i] == ' ' && !ignorespace) { - expand(strndup(_acmdln + afterlastspace, i - afterlastspace), doexpand); - i++; - while (_acmdln[i]==' ') - i++; - afterlastspace=i; - doexpand = flag; - } else { - i++; - } - } - - if (_acmdln[afterlastspace] != 0) { - expand(strndup(_acmdln+afterlastspace, i - afterlastspace), doexpand); - } - HeapValidate(hHeap, 0, NULL); - *argc = __argc; - *argv = __argv; - *env = _environ; - _pgmptr = strdup((char*)argv[0]); - return 0; -} - -/* - * @unimplemented - */ -void __wgetmainargs(int* argc, wchar_t*** wargv, wchar_t*** wenv, - int expand_wildcards, int* new_mode) -{ - extern wchar_t **__winitenv; - *argc = 0; - *wargv = NULL; - *wenv = __winitenv; -} - -/* - * @implemented - */ -int* __p___argc(void) -{ - return &__argc; -} - -/* - * @implemented - */ -char*** __p___argv(void) -{ - return &__argv; -} - -#if 0 -int _chkstk(void) -{ - return 0; -} -#endif diff --git a/reactos/lib/msvcrt/misc/initterm.c b/reactos/lib/msvcrt/misc/initterm.c deleted file mode 100644 index 26f66a1c924..00000000000 --- a/reactos/lib/msvcrt/misc/initterm.c +++ /dev/null @@ -1,20 +0,0 @@ -#include - - -/* - * @implemented - */ -void _initterm(void (*fStart[])(void), void (*fEnd[])(void)) -{ - int i = 0; - - if ( fStart == NULL || fEnd == NULL ) - return; - - while ( &fStart[i] < fEnd ) - { - if ( fStart[i] != NULL ) - (*fStart[i])(); - i++; - } -} diff --git a/reactos/lib/msvcrt/misc/lock.c b/reactos/lib/msvcrt/misc/lock.c deleted file mode 100644 index 100cef02d54..00000000000 --- a/reactos/lib/msvcrt/misc/lock.c +++ /dev/null @@ -1,135 +0,0 @@ -/* - * Copyright (c) 2002, TransGaming Technologies Inc. - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include "precomp.h" - -#define NDEBUG -#include -#include - -typedef struct -{ - BOOL bInit; - CRITICAL_SECTION crit; -} LOCKTABLEENTRY; - -static LOCKTABLEENTRY lock_table[ _TOTAL_LOCKS ]; - -static inline void msvcrt_mlock_set_entry_initialized( int locknum, BOOL initialized ) -{ - lock_table[ locknum ].bInit = initialized; -} - -static inline void msvcrt_initialize_mlock( int locknum ) -{ - InitializeCriticalSection( &(lock_table[ locknum ].crit) ); - msvcrt_mlock_set_entry_initialized( locknum, TRUE ); -} - -static inline void msvcrt_uninitialize_mlock( int locknum ) -{ - DeleteCriticalSection( &(lock_table[ locknum ].crit) ); - msvcrt_mlock_set_entry_initialized( locknum, FALSE ); -} - -/********************************************************************** - * msvcrt_init_mt_locks (internal) - * - * Initialize the table lock. All other locks will be initialized - * upon first use. - * - */ -void msvcrt_init_mt_locks(void) -{ - int i; - - DPRINT( "initializing mtlocks\n" ); - - /* Initialize the table */ - for( i=0; i < _TOTAL_LOCKS; i++ ) - { - msvcrt_mlock_set_entry_initialized( i, FALSE ); - } - - /* Initialize our lock table lock */ - msvcrt_initialize_mlock( _LOCKTAB_LOCK ); -} - -/********************************************************************** - * msvcrt_free_mt_locks (internal) - * - * Uninitialize all mt locks. Assume that neither _lock or _unlock will - * be called once we're calling this routine (ie _LOCKTAB_LOCK can be deleted) - * - */ -void msvcrt_free_mt_locks(void) -{ - int i; - - DPRINT(": uninitializing all mtlocks\n" ); - - /* Uninitialize the table */ - for( i=0; i < _TOTAL_LOCKS; i++ ) - { - if( lock_table[ i ].bInit == TRUE ) - { - msvcrt_uninitialize_mlock( i ); - } - } -} - - -/********************************************************************** - * _lock (MSVCRT.@) - */ -void _lock( int locknum ) -{ - DPRINT( "(%d)\n", locknum ); - - /* If the lock doesn't exist yet, create it */ - if( lock_table[ locknum ].bInit == FALSE ) - { - /* Lock while we're changing the lock table */ - _lock( _LOCKTAB_LOCK ); - - /* Check again if we've got a bit of a race on lock creation */ - if( lock_table[ locknum ].bInit == FALSE ) - { - DPRINT( ": creating lock #%d\n", locknum ); - msvcrt_initialize_mlock( locknum ); - } - - /* Unlock ourselves */ - _unlock( _LOCKTAB_LOCK ); - } - - EnterCriticalSection( &(lock_table[ locknum ].crit) ); -} - -/********************************************************************** - * _unlock (MSVCRT.@) - * - * NOTE: There is no error detection to make sure the lock exists and is acquired. - */ -void _unlock( int locknum ) -{ - DPRINT( "(%d)\n", locknum ); - - LeaveCriticalSection( &(lock_table[ locknum ].crit) ); -} - diff --git a/reactos/lib/msvcrt/misc/purecall.c b/reactos/lib/msvcrt/misc/purecall.c deleted file mode 100644 index 4b50cbfd528..00000000000 --- a/reactos/lib/msvcrt/misc/purecall.c +++ /dev/null @@ -1,10 +0,0 @@ - -#include - -/* - * @implemented - */ -void _purecall(void) -{ - _amsg_exit(_RT_PUREVIRT); -} diff --git a/reactos/lib/msvcrt/misc/stubs.c b/reactos/lib/msvcrt/misc/stubs.c deleted file mode 100644 index e2e40baa841..00000000000 --- a/reactos/lib/msvcrt/misc/stubs.c +++ /dev/null @@ -1,113 +0,0 @@ -#include "precomp.h" - -#define NDEBUG -#include - -/********************************************************************* - * $I10_OUTPUT (MSVCRT.@) - * Function not really understood but needed to make the DLL work - */ -void MSVCRT_I10_OUTPUT(void) -{ - /* FIXME: This is probably data, not a function */ -} - -/*********************************************************************** - * _adj_fdiv_m32 (MSVCRT.@) - * - * NOTE - * I _think_ this function is intended to work around the Pentium - * fdiv bug. - */ -void __stdcall _adj_fdiv_m32( unsigned int arg ) -{ - DPRINT1("_adj_fdiv_m32 stub\n"); -} - -/*********************************************************************** - * _adj_fdiv_m32i (MSVCRT.@) - * - * NOTE - * I _think_ this function is intended to work around the Pentium - * fdiv bug. - */ -void __stdcall _adj_fdiv_m32i( int arg ) -{ - DPRINT1("_adj_fdiv_m32i stub\n"); -} - -/*********************************************************************** - * _adj_fdiv_m64 (MSVCRT.@) - * - * NOTE - * I _think_ this function is intended to work around the Pentium - * fdiv bug. - */ -void __stdcall _adj_fdiv_m64( unsigned __int64 arg ) -{ - DPRINT1("_adj_fdiv_m64 stub\n"); -} - -/*********************************************************************** - * _adj_fdiv_r (MSVCRT.@) - * FIXME - * This function is likely to have the wrong number of arguments. - * - * NOTE - * I _think_ this function is intended to work around the Pentium - * fdiv bug. - */ -void _adj_fdiv_r(void) -{ - DPRINT1("_adj_fdiv_r stub\n"); -} - -/*********************************************************************** - * _adj_fdivr_m32 (MSVCRT.@) - * - * NOTE - * I _think_ this function is intended to work around the Pentium - * fdiv bug. - */ -void __stdcall _adj_fdivr_m32( unsigned int arg ) -{ - DPRINT1("_adj_fdivr_m32i stub\n"); -} - -/*********************************************************************** - * _adj_fdivr_m32i (MSVCRT.@) - * - * NOTE - * I _think_ this function is intended to work around the Pentium - * fdiv bug. - */ -void __stdcall _adj_fdivr_m32i( int arg ) -{ - DPRINT1("_adj_fdivr_m32i stub\n"); -} - -/*********************************************************************** - * _adj_fdivr_m64 (MSVCRT.@) - * - * NOTE - * I _think_ this function is intended to work around the Pentium - * fdiv bug. - */ -void __stdcall _adj_fdivr_m64( unsigned __int64 arg ) -{ - DPRINT1("_adj_fdivr_m64 stub\n"); -} - -/*********************************************************************** - * _adj_fpatan (MSVCRT.@) - * FIXME - * This function is likely to have the wrong number of arguments. - * - * NOTE - * I _think_ this function is intended to work around the Pentium - * fdiv bug. - */ -void _adj_fpatan(void) -{ - DPRINT1("_adj_fpatan stub\n"); -} diff --git a/reactos/lib/msvcrt/misc/tls.c b/reactos/lib/msvcrt/misc/tls.c deleted file mode 100644 index 84938534acc..00000000000 --- a/reactos/lib/msvcrt/misc/tls.c +++ /dev/null @@ -1,100 +0,0 @@ -#include "precomp.h" -#include -#include -#include - - -static unsigned long TlsIndex = (unsigned long)-1; - - -static void InitThreadData(PTHREADDATA ThreadData) -{ - ThreadData->terrno = 0; - ThreadData->tdoserrno = 0; - - ThreadData->fpecode = 0; - - /* FIXME: init more thread local data */ - -} - - -int CreateThreadData(void) -{ - PTHREADDATA ThreadData; - - TlsIndex = TlsAlloc(); - if (TlsIndex == (unsigned long)-1) - return FALSE; - - ThreadData = (PTHREADDATA)calloc(1, sizeof(THREADDATA)); - if (ThreadData == NULL) - return FALSE; - - if(!TlsSetValue(TlsIndex, (LPVOID)ThreadData)) - return FALSE; - - InitThreadData(ThreadData); - - return TRUE; -} - - -void DestroyThreadData(void) -{ - if (TlsIndex != (unsigned long)-1) - { - TlsFree(TlsIndex); - TlsIndex = (unsigned long)-1; - } -} - - -void FreeThreadData(PTHREADDATA ThreadData) -{ - if (TlsIndex != (unsigned long)-1) - { - if (ThreadData == NULL) - ThreadData = TlsGetValue(TlsIndex); - - if (ThreadData != NULL) - { - /* FIXME: free more thread local data */ - - free(ThreadData); - } - - TlsSetValue(TlsIndex, NULL); - } -} - - -PTHREADDATA GetThreadData(void) -{ - PTHREADDATA ThreadData; - DWORD LastError; - - LastError = GetLastError(); - ThreadData = TlsGetValue(TlsIndex); - if (ThreadData == NULL) - { - ThreadData = (PTHREADDATA)calloc(1, sizeof(THREADDATA)); - if (ThreadData != NULL) - { - TlsSetValue(TlsIndex, (LPVOID)ThreadData); - - InitThreadData(ThreadData); - } - else - { - _amsg_exit(_RT_THREAD); /* write message and die */ - } - } - - SetLastError(LastError); - - return ThreadData; -} - -/* EOF */ - diff --git a/reactos/lib/msvcrt/msvcrt.def b/reactos/lib/msvcrt/msvcrt.def index a5f55ab449e..d94d1fb1e90 100644 --- a/reactos/lib/msvcrt/msvcrt.def +++ b/reactos/lib/msvcrt/msvcrt.def @@ -108,7 +108,7 @@ __RTtypeid=MSVCRT___RTtypeid __argc DATA __argv DATA __badioinfo DATA -__crtCompareStringA ;=NTDLL.RtlCompareString +;__crtCompareStringA ;=NTDLL.RtlCompareString ;__crtGetLocaleInfoW __crtLCMapStringA __dllonexit @@ -126,7 +126,7 @@ __lc_handle __mb_cur_max DATA __p___argc __p___argv -__p___wargv +;__p___wargv __p___initenv __p___mb_cur_max __p___winitenv @@ -154,14 +154,14 @@ __p__winminor __p__winver ;__p__wpgmptr __pioinfo -;__pxcptinfoptrs +__pxcptinfoptrs __set_app_type __setlc_active DATA __setusermatherr __threadhandle __threadid __toascii -__unDName +;__unDName ;__unDNameEx __unguarded_readlc_active DATA __wargv @@ -281,7 +281,7 @@ _findnexti64 _finite _flsbuf _flushall -_fmode DATA +_fmode=__fmode DATA _fpclass _fpieee_flt _fpreset @@ -311,7 +311,7 @@ _getdrives ;_getmaxstdio ;_getmbcp _getpid -;_getsystime +_getsystime _getw ;_getwch ;_getwche @@ -481,7 +481,7 @@ _scalb ;_scprintf ;_scwprintf _searchenv -_seh_longjmp_unwind +_seh_longjmp_unwind@4 ;_set_error_mode ;_set_SSE2_enable ;_set_sbh_threshold @@ -491,7 +491,7 @@ _setjmp3 ;_setmaxstdio _setmbcp _setmode -;_setsystime +_setsystime _sleep _snprintf ;_snscanf diff --git a/reactos/lib/msvcrt/process/_cwait.c b/reactos/lib/msvcrt/process/_cwait.c deleted file mode 100644 index aa940452e21..00000000000 --- a/reactos/lib/msvcrt/process/_cwait.c +++ /dev/null @@ -1,36 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/msvcrt/process/cwait.c - * PURPOSE: Waits for a process to exit - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 04/03/99: Created - */ - -#include "precomp.h" -#include -#include -#include - - -/* - * @implemented - */ -int _cwait(int* pnStatus, int hProc, int nAction) -{ - DWORD ExitCode; - - nAction = 0; - if (WaitForSingleObject((void*)hProc, INFINITE) != WAIT_OBJECT_0) { - __set_errno(ECHILD); - return -1; - } - - if (!GetExitCodeProcess((void*)hProc, &ExitCode)) - return -1; - if (pnStatus != NULL) - *pnStatus = (int)ExitCode; - CloseHandle((HANDLE)hProc); - return hProc; -} diff --git a/reactos/lib/msvcrt/process/_system.c b/reactos/lib/msvcrt/process/_system.c deleted file mode 100644 index ddea6879a00..00000000000 --- a/reactos/lib/msvcrt/process/_system.c +++ /dev/null @@ -1,122 +0,0 @@ -/* $Id$ - * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/msvcrt/process/system.c - * PURPOSE: Excutes a shell command - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 04/03/99: Created - */ - -#include "precomp.h" -#include -#include -#include -#include -#include - -/* - * @implemented - */ -int system(const char *command) -{ - char *szCmdLine = NULL; - char *szComSpec = NULL; - - PROCESS_INFORMATION ProcessInformation; - STARTUPINFOA StartupInfo; - char *s; - BOOL result; - - int nStatus; - - szComSpec = getenv("COMSPEC"); - -// system should return 0 if command is null and the shell is found - - if (command == NULL) { - if (szComSpec == NULL) - return 0; - else - return -1; - } - -// should return 127 or 0 ( MS ) if the shell is not found -// __set_errno(ENOENT); - - if (szComSpec == NULL) - { - szComSpec = strdup("cmd.exe"); - if (szComSpec == NULL) - { - __set_errno(ENOMEM); - return -1; - } - } - - s = max(strchr(szComSpec, '\\'), strchr(szComSpec, '/')); - if (s == NULL) - s = szComSpec; - else - s++; - - szCmdLine = malloc(strlen(s) + 4 + strlen(command) + 1); - if (szCmdLine == NULL) - { - free (szComSpec); - __set_errno(ENOMEM); - return -1; - } - - strcpy(szCmdLine, s); - s = strrchr(szCmdLine, '.'); - if (s) - *s = 0; - strcat(szCmdLine, " /C "); - strcat(szCmdLine, command); - -//command file has invalid format ENOEXEC - - memset (&StartupInfo, 0, sizeof(StartupInfo)); - StartupInfo.cb = sizeof(StartupInfo); - StartupInfo.lpReserved= NULL; - StartupInfo.dwFlags = 0; - StartupInfo.wShowWindow = SW_SHOWDEFAULT; - StartupInfo.lpReserved2 = NULL; - StartupInfo.cbReserved2 = 0; - -// According to ansi standards the new process should ignore SIGINT and SIGQUIT -// In order to disable ctr-c the process is created with CREATE_NEW_PROCESS_GROUP, -// thus SetConsoleCtrlHandler(NULL,TRUE) is made on behalf of the new process. - - -//SIGCHILD should be blocked aswell - - result = CreateProcessA(szComSpec, - szCmdLine, - NULL, - NULL, - TRUE, - 0, - NULL, - NULL, - &StartupInfo, - &ProcessInformation); - free(szCmdLine); - free(szComSpec); - - if (result == FALSE) - { - _dosmaperr(GetLastError()); - return -1; - } - - CloseHandle(ProcessInformation.hThread); - -// system should wait untill the calling process is finished - _cwait(&nStatus,(int)ProcessInformation.hProcess,0); - CloseHandle(ProcessInformation.hProcess); - - return nStatus; -} diff --git a/reactos/lib/msvcrt/process/dll.c b/reactos/lib/msvcrt/process/dll.c deleted file mode 100644 index 5e3db761f6a..00000000000 --- a/reactos/lib/msvcrt/process/dll.c +++ /dev/null @@ -1,41 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/msvcrt/process/dll.c - * PURPOSE: Dll support routines - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 04/03/99: Created - */ - -#include "precomp.h" -#include - - -/* - * @implemented - */ -void* _loaddll(char* name) -{ - return LoadLibraryA(name); -} - -/* - * @implemented - */ -int _unloaddll(void* handle) -{ - return FreeLibrary(handle); -} - -/* - * @implemented - */ -FARPROC _getdllprocaddr(void* hModule, char* lpProcName, int iOrdinal) -{ - if (lpProcName != NULL) - return GetProcAddress(hModule, lpProcName); - else - return GetProcAddress(hModule, (LPSTR)iOrdinal); - return (NULL); -} diff --git a/reactos/lib/msvcrt/process/process.c b/reactos/lib/msvcrt/process/process.c deleted file mode 100644 index 8a375430aa3..00000000000 --- a/reactos/lib/msvcrt/process/process.c +++ /dev/null @@ -1,622 +0,0 @@ -#include "precomp.h" -#include -#include -#include -#include -#include - -#define NDEBUG -#include - -extern int maxfno; - -char const* ext[] = -{ - "", - ".bat", - ".cmd", - ".com", - ".exe" -}; - -const char* find_exec(const char* path, char* rpath) -{ - char *rp; - const char *rd; - int i, found = 0; - - DPRINT("find_exec('%s', %x)\n", path, rpath); - - if (path == NULL) - { - return NULL; - } - if (strlen(path) > FILENAME_MAX - 1) - { - return path; - } - /* copy path in rpath */ - for (rd = path, rp = rpath; *rd; *rp++ = *rd++); - *rp = 0; - /* try first with the name as is */ - for (i = 0; i < sizeof(ext) / sizeof(*ext); i++) - { - strcpy(rp, ext[i]); - - DPRINT("trying '%s'\n", rpath); - - if (_access(rpath, F_OK) == 0 && _access(rpath, D_OK) != 0) - { - found = 1; - break; - } - } - if (!found) - { - char* env = getenv("PATH"); - if (env) - { - char* ep = env; - while (*ep && !found) - { - if (*ep == ';') ep++; - rp=rpath; - for (; *ep && (*ep != ';'); *rp++ = *ep++); - if (rp > rpath) - { - rp--; - if (*rp != '/' && *rp != '\\') - { - *++rp = '\\'; - } - rp++; - } - for (rd=path; *rd; *rp++ = *rd++); - for (i = 0; i < sizeof(ext) / sizeof(*ext); i++) - { - strcpy(rp, ext[i]); - - DPRINT("trying '%s'\n", rpath); - - if (_access(rpath, F_OK) == 0 && _access(rpath, D_OK) != 0) - { - found = 1; - break; - } - } - } - } - } - - return found ? rpath : path; -} - -static char* -argvtos(char* const* argv, char delim) -{ - int i, len; - char *ptr, *str; - - if (argv == NULL) - return NULL; - - for (i = 0, len = 0; argv[i]; i++) - { - len += strlen(argv[i]) + 1; - } - - str = ptr = (char*) malloc(len + 1); - if (str == NULL) - return NULL; - - for(i = 0; argv[i]; i++) - { - len = strlen(argv[i]); - memcpy(ptr, argv[i], len); - ptr += len; - *ptr++ = delim; - } - *ptr = 0; - - return str; -} - -static char* -valisttos(const char* arg0, va_list alist, char delim) -{ - va_list alist2 = alist; - char *ptr, *str; - int len; - - if (arg0 == NULL) - return NULL; - - ptr = (char*)arg0; - len = 0; - do - { - len += strlen(ptr) + 1; - ptr = va_arg(alist, char*); - } - while(ptr != NULL); - - str = (char*) malloc(len + 1); - if (str == NULL) - return NULL; - - ptr = str; - do - { - len = strlen(arg0); - memcpy(ptr, arg0, len); - ptr += len; - *ptr++ = delim; - arg0 = va_arg(alist2, char*); - } - while(arg0 != NULL); - *ptr = 0; - - return str; -} - -static int -do_spawn(int mode, const char* cmdname, const char* args, const char* envp) -{ - STARTUPINFOA StartupInfo; - PROCESS_INFORMATION ProcessInformation; - char* fmode; - HANDLE* hFile; - int i, last; - BOOL bResult; - DWORD dwExitCode; - DWORD dwError; - - DPRINT("do_spawn('%s')\n", cmdname); - - if (mode != _P_NOWAIT && mode != _P_NOWAITO && mode != _P_WAIT && mode != _P_DETACH && mode != _P_OVERLAY) - { - __set_errno ( EINVAL ); - return -1; - } - - if (0 != _access(cmdname, F_OK)) - { - __set_errno ( ENOENT ); - return -1; - } - if (0 == _access(cmdname, D_OK)) - { - __set_errno ( EISDIR ); - return -1; - } - - memset (&StartupInfo, 0, sizeof(StartupInfo)); - StartupInfo.cb = sizeof(StartupInfo); - - for (last = i = 0; i < maxfno; i++) - { - if ((void*)-1 != _get_osfhandle(i)) - { - last = i + 1; - } - } - - if (last) - { - StartupInfo.cbReserved2 = sizeof(ULONG) + last * (sizeof(char) + sizeof(HANDLE)); - StartupInfo.lpReserved2 = malloc(StartupInfo.cbReserved2); - if (StartupInfo.lpReserved2 == NULL) - { - __set_errno ( ENOMEM ); - return -1; - } - - *(DWORD*)StartupInfo.lpReserved2 = last; - fmode = (char*)(StartupInfo.lpReserved2 + sizeof(ULONG)); - hFile = (HANDLE*)(StartupInfo.lpReserved2 + sizeof(ULONG) + last * sizeof(char)); - for (i = 0; i < last; i++) - { - int _mode = __fileno_getmode(i); - HANDLE h = _get_osfhandle(i); - /* FIXME: The test of console handles (((ULONG)Handle) & 0x10000003) == 0x3) - * is possible wrong - */ - if ((((ULONG)h) & 0x10000003) == 0x3 || _mode & _O_NOINHERIT || (i < 3 && mode == _P_DETACH)) - { - *hFile = INVALID_HANDLE_VALUE; - *fmode = 0; - } - else - { - DWORD dwFlags; - BOOL bFlag; - bFlag = GetHandleInformation(h, &dwFlags); - if (bFlag && (dwFlags & HANDLE_FLAG_INHERIT)) - { - *hFile = h; - *fmode = (_O_ACCMODE & _mode) | (((_O_TEXT | _O_BINARY) & _mode) >> 8); - } - else - { - *hFile = INVALID_HANDLE_VALUE; - *fmode = 0; - } - } - fmode++; - hFile++; - } - } - - bResult = CreateProcessA((char *)cmdname, - (char *)args, - NULL, - NULL, - TRUE, - mode == _P_DETACH ? DETACHED_PROCESS : 0, - (LPVOID)envp, - NULL, - &StartupInfo, - &ProcessInformation); - if (StartupInfo.lpReserved2) - { - free(StartupInfo.lpReserved2); - } - - if (!bResult) - { - dwError = GetLastError(); - DPRINT("%x\n", dwError); - __set_errno(dwError); - return -1; - } - CloseHandle(ProcessInformation.hThread); - switch(mode) - { - case _P_OVERLAY: - _exit(0); - case _P_WAIT: - WaitForSingleObject(ProcessInformation.hProcess, INFINITE); - GetExitCodeProcess(ProcessInformation.hProcess, &dwExitCode); - CloseHandle(ProcessInformation.hProcess); - return (int)dwExitCode; - case _P_DETACH: - CloseHandle(ProcessInformation.hProcess); - return 0; - } - return (int)ProcessInformation.hProcess; -} - -/* - * @implemented - */ -int _spawnl(int mode, const char *cmdname, const char* arg0, ...) -{ - va_list argp; - char* args; - int ret = -1; - - DPRINT("_spawnl('%s')\n", cmdname); - - va_start(argp, arg0); - args = valisttos(arg0, argp, ' '); - - if (args) - { - ret = do_spawn(mode, cmdname, args, NULL); - free(args); - } - return ret; -} - -/* - * @implemented - */ -int _spawnv(int mode, const char *cmdname, char* const* argv) -{ - char* args; - int ret = -1; - - DPRINT("_spawnv('%s')\n", cmdname); - - args = argvtos(argv, ' '); - - if (args) - { - ret = do_spawn(mode, cmdname, args, NULL); - free(args); - } - return ret; -} - -/* - * @implemented - */ -int _spawnle(int mode, const char *cmdname, const char* arg0, ... /*, NULL, const char* const* envp*/) -{ - va_list argp; - char* args; - char* envs; - char* const* ptr; - int ret = -1; - - DPRINT("_spawnle('%s')\n", cmdname); - - va_start(argp, arg0); - args = valisttos(arg0, argp, ' '); - do - { - ptr = (char* const*)va_arg(argp, char*); - } - while (ptr != NULL); - ptr = (char* const*)va_arg(argp, char*); - envs = argvtos(ptr, 0); - if (args) - { - ret = do_spawn(mode, cmdname, args, envs); - free(args); - } - if (envs) - { - free(envs); - } - return ret; - -} - -/* - * @implemented - */ -int _spawnve(int mode, const char *cmdname, char* const* argv, char* const* envp) -{ - char *args; - char *envs; - int ret = -1; - - DPRINT("_spawnve('%s')\n", cmdname); - - args = argvtos(argv, ' '); - envs = argvtos(envp, 0); - - if (args) - { - ret = do_spawn(mode, cmdname, args, envs); - free(args); - } - if (envs) - { - free(envs); - } - return ret; -} - -/* - * @implemented - */ -int _spawnvp(int mode, const char* cmdname, char* const* argv) -{ - char pathname[FILENAME_MAX]; - - DPRINT("_spawnvp('%s')\n", cmdname); - - return _spawnv(mode, find_exec(cmdname, pathname), argv); -} - -/* - * @implemented - */ -int _spawnlp(int mode, const char* cmdname, const char* arg0, .../*, NULL*/) -{ - va_list argp; - char* args; - int ret = -1; - char pathname[FILENAME_MAX]; - - DPRINT("_spawnlp('%s')\n", cmdname); - - va_start(argp, arg0); - args = valisttos(arg0, argp, ' '); - if (args) - { - ret = do_spawn(mode, find_exec(cmdname, pathname), args, NULL); - free(args); - } - return ret; -} - - -/* - * @implemented - */ -int _spawnlpe(int mode, const char* cmdname, const char* arg0, .../*, NULL, const char* const* envp*/) -{ - va_list argp; - char* args; - char* envs; - char* const * ptr; - int ret = -1; - char pathname[FILENAME_MAX]; - - DPRINT("_spawnlpe('%s')\n", cmdname); - - va_start(argp, arg0); - args = valisttos(arg0, argp, ' '); - do - { - ptr = (char* const*)va_arg(argp, char*); - } - while (ptr != NULL); - ptr = (char* const*)va_arg(argp, char*); - envs = argvtos(ptr, 0); - if (args) - { - ret = do_spawn(mode, find_exec(cmdname, pathname), args, envs); - free(args); - } - if (envs) - { - free(envs); - } - return ret; -} - -/* - * @implemented - */ -int _spawnvpe(int mode, const char* cmdname, char* const* argv, char* const* envp) -{ - char pathname[FILENAME_MAX]; - - DPRINT("_spawnvpe('%s')\n", cmdname); - - return _spawnve(mode, find_exec(cmdname, pathname), argv, envp); -} - -/* - * @implemented - */ -int _execl(const char* cmdname, const char* arg0, ...) -{ - char* args; - va_list argp; - int ret = -1; - - DPRINT("_execl('%s')\n", cmdname); - - va_start(argp, arg0); - args = valisttos(arg0, argp, ' '); - - if (args) - { - ret = do_spawn(P_OVERLAY, cmdname, args, NULL); - free(args); - } - return ret; -} - -/* - * @implemented - */ -int _execv(const char* cmdname, char* const* argv) -{ - DPRINT("_execv('%s')\n", cmdname); - return _spawnv(P_OVERLAY, cmdname, argv); -} - -/* - * @implemented - */ -int _execle(const char* cmdname, const char* arg0, ... /*, NULL, char* const* envp */) -{ - va_list argp; - char* args; - char* envs; - char* const* ptr; - int ret = -1; - - DPRINT("_execle('%s')\n", cmdname); - - va_start(argp, arg0); - args = valisttos(arg0, argp, ' '); - do - { - ptr = (char* const*)va_arg(argp, char*); - } - while (ptr != NULL); - ptr = (char* const*)va_arg(argp, char*); - envs = argvtos(ptr, 0); - if (args) - { - ret = do_spawn(P_OVERLAY, cmdname, args, envs); - free(args); - } - if (envs) - { - free(envs); - } - return ret; -} - -/* - * @implemented - */ -int _execve(const char* cmdname, char* const* argv, char* const* envp) -{ - DPRINT("_execve('%s')\n", cmdname); - return _spawnve(P_OVERLAY, cmdname, argv, envp); -} - -/* - * @implemented - */ -int _execlp(const char* cmdname, const char* arg0, ...) -{ - char* args; - va_list argp; - int ret = -1; - char pathname[FILENAME_MAX]; - - DPRINT("_execlp('%s')\n", cmdname); - - va_start(argp, arg0); - args = valisttos(arg0, argp, ' '); - - if (args) - { - ret = do_spawn(P_OVERLAY, find_exec(cmdname, pathname), args, NULL); - free(args); - } - return ret; -} - -/* - * @implemented - */ -int _execvp(const char* cmdname, char* const* argv) -{ - DPRINT("_execvp('%s')\n", cmdname); - return _spawnvp(P_OVERLAY, cmdname, argv); -} - -/* - * @implemented - */ -int _execlpe(const char* cmdname, const char* arg0, ... /*, NULL, char* const* envp */) -{ - va_list argp; - char* args; - char* envs; - char* const* ptr; - int ret = -1; - char pathname[FILENAME_MAX]; - - DPRINT("_execlpe('%s')\n", cmdname); - - va_start(argp, arg0); - args = valisttos(arg0, argp, ' '); - do - { - ptr = (char* const*)va_arg(argp, char*); - } - while (ptr != NULL); - ptr = (char* const*)va_arg(argp, char*); - envs = argvtos(ptr, 0); - if (args) - { - ret = do_spawn(P_OVERLAY, find_exec(cmdname, pathname), args, envs); - free(args); - } - if (envs) - { - free(envs); - } - return ret; -} - -/* - * @implemented - */ -int _execvpe(const char* cmdname, char* const* argv, char* const* envp) -{ - DPRINT("_execvpe('%s')\n", cmdname); - return _spawnvpe(P_OVERLAY, cmdname, argv, envp); -} diff --git a/reactos/lib/msvcrt/process/procid.c b/reactos/lib/msvcrt/process/procid.c deleted file mode 100644 index 87c145828c6..00000000000 --- a/reactos/lib/msvcrt/process/procid.c +++ /dev/null @@ -1,11 +0,0 @@ -#include "precomp.h" -#include - -/* - * @implemented - */ -int _getpid (void) -{ - return (int)GetCurrentProcessId(); -} - diff --git a/reactos/lib/msvcrt/process/thread.c b/reactos/lib/msvcrt/process/thread.c deleted file mode 100644 index 1c601745c3f..00000000000 --- a/reactos/lib/msvcrt/process/thread.c +++ /dev/null @@ -1,26 +0,0 @@ -#include "precomp.h" -#include -#include -#include - -#if 0 -/* - * @unimplemented - */ -unsigned long _beginthread( - void (__cdecl *start_address)(void*), - unsigned stack_size, - void* arglist) -{ - __set_errno ( ENOSYS ); - return (unsigned long)-1; -} -#endif -/* - * @unimplemented - */ -void _endthread(void) -{ -} - -/* EOF */ diff --git a/reactos/lib/msvcrt/process/threadid.c b/reactos/lib/msvcrt/process/threadid.c deleted file mode 100644 index 5d225c73f33..00000000000 --- a/reactos/lib/msvcrt/process/threadid.c +++ /dev/null @@ -1,19 +0,0 @@ -#include "precomp.h" -#include - - -/* - * @implemented - */ -unsigned long __threadid (void) -{ - return GetCurrentThreadId(); -} - -/* - * @implemented - */ -void *__threadhandle(void) -{ - return GetCurrentThread(); -} diff --git a/reactos/lib/msvcrt/process/threadx.c b/reactos/lib/msvcrt/process/threadx.c deleted file mode 100644 index d86d62e27e7..00000000000 --- a/reactos/lib/msvcrt/process/threadx.c +++ /dev/null @@ -1,48 +0,0 @@ -#include "precomp.h" -#include -#include -#include - - -/* - * @unimplemented - */ -unsigned long _beginthreadex( - void* security, - unsigned stack_size, - unsigned (__stdcall *start_address)(void*), - void* arglist, - unsigned initflag, - unsigned* thrdaddr) -{ - HANDLE NewThread; - - /* - * Just call the API function. Any CRT specific processing is done in - * DllMain DLL_THREAD_ATTACH - */ - NewThread = CreateThread ( security, stack_size, - (LPTHREAD_START_ROUTINE)start_address, - arglist, initflag, (PULONG)thrdaddr ); - if (NULL == NewThread) - { - _dosmaperr( GetLastError() ); - } - - return (unsigned long) NewThread; -} - - -/* - * @implemented - */ -void _endthreadex(unsigned retval) -{ - /* - * Just call the API function. Any CRT specific processing is done in - * DllMain DLL_THREAD_DETACH - */ - ExitThread(retval); -} - -/* EOF */ diff --git a/reactos/lib/msvcrt/search/lfind.c b/reactos/lib/msvcrt/search/lfind.c deleted file mode 100644 index e89efa63c9b..00000000000 --- a/reactos/lib/msvcrt/search/lfind.c +++ /dev/null @@ -1,21 +0,0 @@ -#include -#include - - -/* - * @implemented - */ -void *_lfind(const void *key, const void *base, size_t *nelp, - size_t width, int (*compar)(const void *, const void *)) -{ - char* char_base = (char*)base; - int i; - - for (i = 0; i < *nelp; i++) { - if (compar(key, char_base) == 0) - return char_base; - char_base += width; - } - return NULL; -} - diff --git a/reactos/lib/msvcrt/search/lsearch.c b/reactos/lib/msvcrt/search/lsearch.c deleted file mode 100644 index a8465ae7853..00000000000 --- a/reactos/lib/msvcrt/search/lsearch.c +++ /dev/null @@ -1,24 +0,0 @@ -#include -#include -#include - -/* - * @implemented - */ -void *_lsearch(const void *key, void *base, size_t *nelp, size_t width, - int (*compar)(const void *, const void *)) -{ - void *ret_find = _lfind(key,base,nelp,width,compar); - - if (ret_find != NULL) - return ret_find; - -#ifdef __GNUC__ - memcpy(base + (*nelp*width), key, width); -#else - memcpy((int*)base + (*nelp*width), key, width); -#endif - (*nelp)++; - return base; -} - diff --git a/reactos/lib/msvcrt/setjmp/i386/setjmp.s b/reactos/lib/msvcrt/setjmp/i386/setjmp.s deleted file mode 100644 index 7cf257cca24..00000000000 --- a/reactos/lib/msvcrt/setjmp/i386/setjmp.s +++ /dev/null @@ -1,111 +0,0 @@ -/* $Id$ - * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * PURPOSE: Implementation of _setjmp/longjmp - * FILE: lib/msvcrt/i386/setjmp.s - * PROGRAMMER: Ge van Geldorp (ge@gse.nl) - * NOTES: Implementation is not complete, see Wine source for a more - * complete implementation - */ - -#define JB_BP 0 -#define JB_BX 1 -#define JB_DI 2 -#define JB_SI 3 -#define JB_SP 4 -#define JB_IP 5 - -#define PCOFF 0 - -#define JMPBUF 4 - -/* - * int - * _setjmp(jmp_buf env); - * - * Parameters: - * [ESP+04h] - jmp_buf env - * Registers: - * None - * Returns: - * 0 - * Notes: - * Sets up the jmp_buf - */ -.globl __setjmp -__setjmp: - xorl %eax, %eax - movl JMPBUF(%esp), %edx - - /* Save registers. */ - movl %ebp, (JB_BP*4)(%edx) /* Save caller's frame pointer. */ - movl %ebx, (JB_BX*4)(%edx) - movl %edi, (JB_DI*4)(%edx) - movl %esi, (JB_SI*4)(%edx) - leal JMPBUF(%esp), %ecx /* Save SP as it will be after we return. */ - movl %ecx, (JB_SP*4)(%edx) - movl PCOFF(%esp), %ecx /* Save PC we are returning to now. */ - movl %ecx, (JB_IP*4)(%edx) - ret - -/* - * int - * _setjmp3(jmp_buf env, int nb_args, ...); - * - * Parameters: - * [ESP+04h] - jmp_buf env - * Registers: - * None - * Returns: - * 0 - * Notes: - * Sets up the jmp_buf - */ -.globl __setjmp3 -__setjmp3: - xorl %eax, %eax - movl JMPBUF(%esp), %edx - - /* Save registers. */ - movl %ebp, (JB_BP*4)(%edx) /* Save caller's frame pointer. */ - movl %ebx, (JB_BX*4)(%edx) - movl %edi, (JB_DI*4)(%edx) - movl %esi, (JB_SI*4)(%edx) - leal JMPBUF(%esp), %ecx /* Save SP as it will be after we return. */ - movl %ecx, (JB_SP*4)(%edx) - movl PCOFF(%esp), %ecx /* Save PC we are returning to now. */ - movl %ecx, (JB_IP*4)(%edx) - ret - -#define VAL 8 - -/* - * void - * longjmp(jmp_buf env, int value); - * - * Parameters: - * [ESP+04h] - jmp_buf setup by _setjmp - * [ESP+08h] - int value to return - * Registers: - * None - * Returns: - * Doesn't return - * Notes: - * Non-local goto - */ -.globl _longjmp -_longjmp: - movl JMPBUF(%esp), %ecx /* User's jmp_buf in %ecx. */ - - movl VAL(%esp), %eax /* Second argument is return value. */ - /* Save the return address now. */ - movl (JB_IP*4)(%ecx), %edx - /* Restore registers. */ - movl (JB_BP*4)(%ecx), %ebp - movl (JB_BX*4)(%ecx), %ebx - movl (JB_DI*4)(%ecx), %edi - movl (JB_SI*4)(%ecx), %esi - movl (JB_SP*4)(%ecx), %esp - /* Jump to saved PC. */ - jmp *%edx diff --git a/reactos/lib/msvcrt/signal/signal.c b/reactos/lib/msvcrt/signal/signal.c deleted file mode 100644 index 6272b2f6854..00000000000 --- a/reactos/lib/msvcrt/signal/signal.c +++ /dev/null @@ -1,113 +0,0 @@ -#include -#include -#include -#include -#include - -void _default_handler(int signal); - -typedef struct _sig_element -{ - int signal; - char *signame; - _p_sig_fn_t handler; -} sig_element; - -static sig_element signal_list[SIGMAX] = - { - { 0, "Signal 0", SIG_DFL }, - { SIGABRT, "Aborted",SIG_DFL }, - { SIGFPE, "Erroneous arithmetic operation",SIG_DFL }, - { SIGILL, "Illegal instruction",SIG_DFL }, - { SIGINT, "Interrupt",SIG_DFL }, - { SIGSEGV, "Invalid access to storage",SIG_DFL }, - { SIGTERM, "Terminated",SIG_DFL }, - { SIGHUP, "Hangup",SIG_DFL }, - { SIGQUIT, "Quit",SIG_DFL }, - { SIGPIPE, "Broken pipe",SIG_DFL }, - { SIGKILL, "Killed",SIG_DFL }, - { SIGALRM, "Alarm clock",SIG_DFL }, - { 0, "Stopped (signal)",SIG_DFL }, - { 0, "Stopped",SIG_DFL }, - { 0, "Continued",SIG_DFL }, - { 0, "Child exited",SIG_DFL }, - { 0, "Stopped (tty input)",SIG_DFL }, - { 0, "Stopped (tty output)",SIG_DFL }, - { 0, NULL, SIG_DFL } - }; - -int nsignal = 21; - -/* - * @implemented - */ -_p_sig_fn_t signal(int sig, _p_sig_fn_t func) -{ - _p_sig_fn_t temp; - int i; - if(sig <= 0 || sig > SIGMAX || sig == SIGKILL) - { - __set_errno(EINVAL); - return SIG_ERR; - } -// check with IsBadCodePtr - - if ( func < (_p_sig_fn_t)4096 ) { - __set_errno(EINVAL); - return SIG_ERR; - } - - for(i=0;i SIGMAX) - return -1; - for(i=0;i -#include -#include -#include - - -FILE * __alloc_file(void); - -char __validfp (FILE *f) -{ - if ( (unsigned int)f < 256) - return FALSE; - - if( f == NULL || (int)f== -1 ) - return FALSE; - - return TRUE; -} - -/* A FILE* is considered "free" if its flag is zero. */ - -FILE *__alloc_file(void) -{ - __file_rec *fr = __file_rec_list; - __file_rec **last_fr = &__file_rec_list; - FILE *rv=0; - int i; - - /* Try to find an empty slot */ - while (fr) - { - last_fr = &(fr->next); - - /* If one of the existing slots is available, return it */ - for (i=0; icount; i++) - { - if (fr->files[i]->_flag == 0) - { - return fr->files[i]; - } - } - - /* If this one is full, go to the next */ - if (fr->count == __FILE_REC_MAX) - fr = fr->next; - else - /* it isn't full, we can add to it */ - break; - } - if (!fr) - { - /* add another one to the end, make it empty */ - fr = *last_fr = (__file_rec *)malloc(sizeof(__file_rec)); - if (fr == 0) - return 0; - fr->next = 0; - fr->count = 0; - } - /* fr is a pointer to a rec with empty slots in it */ - rv = fr->files[fr->count] = (FILE *)malloc(sizeof(FILE)); - if (rv == 0) - return 0; - memset(rv, 0, sizeof(FILE)); - fr->count ++; - return rv; -} - - -/* - * @implemented - */ -int _fcloseall( void ) -{ - __file_rec *fr = __file_rec_list; - __file_rec **last_fr = &__file_rec_list; - - int total_closed = 0; - int i = 0; - - /* Try to find an empty slot */ - while (fr) - { - last_fr = &(fr->next); - - /* If one of the existing slots is available, return it */ - for (i=0; icount; i++) - if (fr->files[i]->_flag != 0) { - fclose(fr->files[i]); - total_closed++; - } - - /* If this one is full, go to the next */ - if (fr->count == __FILE_REC_MAX) - fr = fr->next; - else - /* it isn't full, we can add to it */ - break; - } - return total_closed; -} diff --git a/reactos/lib/msvcrt/stdio/clearerr.c b/reactos/lib/msvcrt/stdio/clearerr.c deleted file mode 100644 index 29ff9120475..00000000000 --- a/reactos/lib/msvcrt/stdio/clearerr.c +++ /dev/null @@ -1,22 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include -#include -#include - -#ifdef clearerr -#undef clearerr -void clearerr(FILE *stream); -#endif - -/* - * @implemented - */ -void -clearerr(FILE *f) -{ - if (!__validfp (f)) { - __set_errno (EINVAL); - return; - } - f->_flag &= ~(_IOERR|_IOEOF); -} diff --git a/reactos/lib/msvcrt/stdio/fclose.c b/reactos/lib/msvcrt/stdio/fclose.c deleted file mode 100644 index f39c21f1a91..00000000000 --- a/reactos/lib/msvcrt/stdio/fclose.c +++ /dev/null @@ -1,54 +0,0 @@ -/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ - -#include -#include -#include -#include -#include -#include -#include - -// changed check for writable stream - - -/* - * @implemented - */ -int -fclose(FILE *f) -{ - int r = 0; - - if (f == NULL) { - __set_errno (EINVAL); - return EOF; - } - - - -// flush only if stream was opened for writing - if ( !(f->_flag&_IOSTRG) ) { - if ( OPEN4WRITING(f) ) - r = fflush(f); - - if (_close(fileno(f)) < 0) - r = EOF; - if (f->_flag&_IOMYBUF) - free(f->_base); - -// Kernel might do this later - if (f->_flag & _IORMONCL && f->_name_to_remove) - { - remove(f->_name_to_remove); - free(f->_name_to_remove); - f->_name_to_remove = 0; - } - } - f->_cnt = 0; - f->_base = 0; - f->_ptr = 0; - f->_bufsiz = 0; - f->_flag = 0; - f->_file = -1; - return r; -} diff --git a/reactos/lib/msvcrt/stdio/fdopen.c b/reactos/lib/msvcrt/stdio/fdopen.c deleted file mode 100644 index f6d44ace5b4..00000000000 --- a/reactos/lib/msvcrt/stdio/fdopen.c +++ /dev/null @@ -1,57 +0,0 @@ -#include -#include - -FILE* __alloc_file(void); - - -/* - * @implemented - */ -FILE* _fdopen(int handle, char* mode) -{ - FILE* file; - int rw; - - if (handle == 0) - return stdin; - - if (handle == 1) - return stdout; - - if (handle == 2) - return stderr; - - if (handle == 3) - return stdaux; - - if (handle == 4) - return stdprn; - - file = __alloc_file(); - if (file == NULL) - return NULL; - file->_file = handle; - - rw = (mode[1] == '+') || (mode[1] && (mode[2] == '+')); - - if (*mode == 'a') - _lseek(handle, 0, SEEK_END); - - file->_cnt = 0; - file->_file = handle; - file->_bufsiz = 0; - -// The mode of the stream must be compatible with the mode of the file descriptor. -// this should be checked. - - if (rw) - file->_flag = _IOREAD | _IOWRT; - else if (*mode == 'r') - file->_flag = _IOREAD; - else - file->_flag = _IOWRT; - - file->_base = file->_ptr = NULL; - - return file; -} diff --git a/reactos/lib/msvcrt/stdio/feof.c b/reactos/lib/msvcrt/stdio/feof.c deleted file mode 100644 index 9591e213705..00000000000 --- a/reactos/lib/msvcrt/stdio/feof.c +++ /dev/null @@ -1,22 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include -#include -#include - -#ifdef feof -#undef feof -int feof(FILE *stream); -#endif - -/* - * @implemented - */ -int feof(FILE *stream) -{ - if (stream == NULL) { - __set_errno (EINVAL); - return EOF; - } - - return stream->_flag & _IOEOF; -} diff --git a/reactos/lib/msvcrt/stdio/ferror.c b/reactos/lib/msvcrt/stdio/ferror.c deleted file mode 100644 index f9381703ca8..00000000000 --- a/reactos/lib/msvcrt/stdio/ferror.c +++ /dev/null @@ -1,18 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include -#include - -#ifdef ferror -#undef ferror -int ferror(FILE *stream); -#endif - -int *_errno(void); - -/* - * @implemented - */ -int ferror(FILE *stream) -{ - return stream->_flag & _IOERR; -} diff --git a/reactos/lib/msvcrt/stdio/fflush.c b/reactos/lib/msvcrt/stdio/fflush.c deleted file mode 100644 index e70e4cf41ef..00000000000 --- a/reactos/lib/msvcrt/stdio/fflush.c +++ /dev/null @@ -1,119 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/msvcrt/stdio/fflush.c - * PURPOSE: Checks for keyboard hits - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 28/12/98: Created - */ -/* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ -/* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */ -/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ - -#include -#include -#include -#include -#include -#include -#include - - -/* - * @implemented - */ -int fflush(FILE *f) -{ - char *base; - int n, rn; - - - - if (f == NULL) - { - int e = *_errno(); - - __set_errno(0); - _fwalk((void (*)(FILE *))fflush); - if (*_errno()) - return EOF; - __set_errno(e); - return 0; - } - - -// nothing to do if stream can not be written to - - if ( !OPEN4WRITING(f) ) { - __set_errno (EINVAL); - return 0; - } - -// discard any unget characters - - f->_flag &= ~_IOUNGETC; - - -// check for buffered dirty block - - if ( (f->_flag&(_IODIRTY|_IONBF)) ==_IODIRTY && f->_base != NULL) - { - - base = f->_base; - - -// if the buffer is read ahead and dirty we will flush it entirely -// else the buffer is appended to the file to the extend it has valid bytes - - if ( (f->_flag & _IOAHEAD) == _IOAHEAD ) - rn = n = f->_ptr - base + f->_cnt; - else - rn = n = f->_ptr - base; - - f->_ptr = base; - - if ((f->_flag & _IOFBF) == _IOFBF) { - if ( (f->_flag & _IOAHEAD) == _IOAHEAD ) - _lseek(fileno(f),-rn, SEEK_CUR); - } - - f->_flag &= ~_IOAHEAD; - - - f->_cnt = (f->_flag&(_IO_LBF|_IONBF)) ? 0 : f->_bufsiz; - -// how can write return less than rn without being on error ??? - -// possibly commit the flushed data -// better open the file in write through mode - - while (rn > 0) { - n = _write(fileno(f), base, rn); - if (n <= 0) { - f->_flag |= _IOERR; - return EOF; - } - rn -= n; - base += n; - }; - f->_flag &= ~_IODIRTY; - -// commit flushed data -// _commit(fileno(f)); - } - if (OPEN4READING(f) && OPEN4WRITING(f) ) - { - f->_cnt = 0; - f->_ptr = f->_base; - } - return 0; -} - -/* - * @implemented - */ -int _flushall( void ) -{ - return fflush(NULL); -} diff --git a/reactos/lib/msvcrt/stdio/fgetc.c b/reactos/lib/msvcrt/stdio/fgetc.c deleted file mode 100644 index e26fe17615d..00000000000 --- a/reactos/lib/msvcrt/stdio/fgetc.c +++ /dev/null @@ -1,29 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/msvcrt/stdio/fgetc.c - * PURPOSE: Get a character string from stdin - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 28/12/98: Appropriated for Reactos - 25/02/99: Added fgetwc - */ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include -#include - -/* - * @implemented - */ -int fgetc(FILE *f) -{ - return getc(f); -} - -/* - * @implemented - */ -wint_t fgetwc(FILE *f) -{ - return getwc(f); -} diff --git a/reactos/lib/msvcrt/stdio/fgetchar.c b/reactos/lib/msvcrt/stdio/fgetchar.c deleted file mode 100644 index 7dd752a82d5..00000000000 --- a/reactos/lib/msvcrt/stdio/fgetchar.c +++ /dev/null @@ -1,38 +0,0 @@ -/* $Id$ - * - * ReactOS msvcrt library - * - * fgetchar.c - * - * Copyright (C) 2002 Robert Dickenson - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include -#include - -int _fgetchar(void) -{ - return getc(stdin); -} - -/* - * @implemented - */ -wint_t _fgetwchar(void) -{ - return getwc(stdin); -} diff --git a/reactos/lib/msvcrt/stdio/fgetpos.c b/reactos/lib/msvcrt/stdio/fgetpos.c deleted file mode 100644 index b4b61247e98..00000000000 --- a/reactos/lib/msvcrt/stdio/fgetpos.c +++ /dev/null @@ -1,17 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include -#include - -/* - * @implemented - */ -int fgetpos(FILE *stream, fpos_t *pos) -{ - if (stream && pos) - { - *pos = (fpos_t)ftell(stream); - return 0; - } - //__set_errno ( EFAULT ); - return 1; -} diff --git a/reactos/lib/msvcrt/stdio/fgets.c b/reactos/lib/msvcrt/stdio/fgets.c deleted file mode 100644 index 403f4629ea9..00000000000 --- a/reactos/lib/msvcrt/stdio/fgets.c +++ /dev/null @@ -1,47 +0,0 @@ -/* $Id$ - * - * ReactOS msvcrt library - * - * fgets.c - * - * Copyright (C) 2002 Robert Dickenson - * - * Based on original work Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details - * 28/12/1998: Appropriated for Reactos - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ - -#include -#include - - -char* fgets(char* s, int n, FILE* f) -{ - int c = 0; - char* cs; - - cs = s; - while (--n>0 && (c = getc(f)) != EOF) { - *cs++ = c; - if (c == '\n') - break; - } - if (c == EOF && cs == s) - return NULL; - *cs++ = '\0'; - return s; -} diff --git a/reactos/lib/msvcrt/stdio/fgetws.c b/reactos/lib/msvcrt/stdio/fgetws.c deleted file mode 100644 index 0f2dae645dd..00000000000 --- a/reactos/lib/msvcrt/stdio/fgetws.c +++ /dev/null @@ -1,58 +0,0 @@ -/* $Id$ - * - * ReactOS msvcrt library - * - * fgets.c - * - * Copyright (C) 2002 Robert Dickenson - * - * Based on original work Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details - * 28/12/1998: Appropriated for Reactos - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ - -#include -#include - - -//#include -#ifndef WEOF -#define WEOF (wchar_t)(0xFFFF) -#endif - -wchar_t* fgetws(wchar_t* s, int n, FILE* f) -{ - wchar_t c = 0; - wchar_t* cs; - - cs = s; - //while (--n > 0 && (c = getwc(f)) != WEOF) { - while (n > 0) { - c = getwc(f); - if (c == WEOF) - break; - n--; - *cs++ = c; - if (c == L'\n') - break; - } - if (c == WEOF && cs == s) { - return NULL; - } - *cs++ = L'\0'; - return s; -} diff --git a/reactos/lib/msvcrt/stdio/filbuf.c b/reactos/lib/msvcrt/stdio/filbuf.c deleted file mode 100644 index 64b2134f5c3..00000000000 --- a/reactos/lib/msvcrt/stdio/filbuf.c +++ /dev/null @@ -1,125 +0,0 @@ -/* Copyright (C) 1997 DJ Delorie, see COPYING.DJ for details */ -/* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */ -/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ - -#include -#include -#include -#include -#include -#include -#include -#include - -int _readcnv(int fn, void* buf, size_t siz); - -/* - * @implemented - */ -int _filbuf(FILE* f) -{ - int size; - char c; - - if ( !OPEN4READING(f)) { - __set_errno (EINVAL); - return EOF; - } - if (f->_flag&(_IOSTRG|_IOEOF)) - return EOF; - f->_flag &= ~_IOUNGETC; - - if (f->_base == NULL && (f->_flag & _IONBF) == 0) { - size = 4096; - if ((f->_base = malloc(size+1)) == NULL) { - // error ENOMEM - f->_flag |= _IONBF; - f->_flag &= ~(_IOFBF|_IO_LBF); - } else { - f->_flag |= _IOMYBUF; - f->_bufsiz = size; - } - } - if (f->_flag&_IONBF) - f->_base = &c; - - // flush stdout before reading from stdin - if (f == stdin) { - if (stdout->_flag&_IO_LBF) - fflush(stdout); - if (stderr->_flag&_IO_LBF) - fflush(stderr); - } - - // if we have a dirty stream we flush it - if ((f->_flag &_IODIRTY) == _IODIRTY) - fflush(f); - - - - f->_cnt = _read(fileno(f), f->_base, f->_flag & _IONBF ? 1 : f->_bufsiz ); - f->_flag |= _IOAHEAD; - - if(__is_text_file(f) && f->_cnt>0) - { - /* truncate text file at Ctrl-Z */ - char *cz=memchr(f->_base, 0x1A, f->_cnt); - if(cz) - { - int newcnt = cz - f->_base; - lseek(fileno(f), -(f->_cnt - newcnt), SEEK_CUR); - f->_cnt = newcnt; - } - } - - f->_ptr = f->_base; - - if (f->_flag & _IONBF) - f->_base = NULL; // statically allocated buffer for sprintf - - -//check for error - if (f->_cnt <= 0) { - if (f->_cnt == 0) { - f->_flag |= _IOEOF; - } else - f->_flag |= _IOERR; - f->_cnt = 0; - -// FIXME should set errno - - return EOF; - } - - f->_cnt--; - - return *f->_ptr++ & 0377; -} - -wint_t _filwbuf(FILE *fp) -{ - return (wint_t )_filbuf(fp); -} - -// convert the carriage return line feed pairs -/* -int _readcnv(int fn, void *buf, size_t siz ) -{ - char *bufp = (char *)buf; - int _bufsiz = siz; - int cr = 0; - int n; - - n = _read(fn, buf, siz ); - - while (_bufsiz > 0) { - if (*bufp == '\r') - cr++; - else if ( cr != 0 ) - *bufp = *(bufp + cr); - bufp++; - _bufsiz--; - } - return n + cr; -} - */ diff --git a/reactos/lib/msvcrt/stdio/fileno.c b/reactos/lib/msvcrt/stdio/fileno.c deleted file mode 100644 index 9c6900ed71b..00000000000 --- a/reactos/lib/msvcrt/stdio/fileno.c +++ /dev/null @@ -1,17 +0,0 @@ -#include - -#if 0 -#undef fileno -int fileno(FILE *f) -{ - return f->_file; -} -#endif - -/* - * @implemented - */ -int _fileno(FILE *f) -{ - return f->_file; -} diff --git a/reactos/lib/msvcrt/stdio/flsbuf.c b/reactos/lib/msvcrt/stdio/flsbuf.c deleted file mode 100644 index 2ca113c15be..00000000000 --- a/reactos/lib/msvcrt/stdio/flsbuf.c +++ /dev/null @@ -1,160 +0,0 @@ -/* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */ -/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ - -#include -#include -#include -#include -#include -#include -#include - - -int cntcr(char* bufp, int bufsiz); -int convert(char* endp, int bufsiz, int n); -int _writecnv(int fn, void* buf, size_t bufsiz); - - -/* - * @implemented - */ -int _flsbuf(int c, FILE* f) -{ - char* base; - int n, rn; - char c1; - int size; - - if (!OPEN4WRITING(f)) { - __set_errno(EINVAL); - return EOF; - } - - // no file associated with buffer, this is a memory stream - if (fileno(f) == -1) { - return c; - } - - /* if the buffer is not yet allocated, allocate it */ - if ((base = f->_base) == NULL && (f->_flag & _IONBF) == 0) { - size = 4096; - if ((f->_base = base = malloc(size)) == NULL) { - f->_flag |= _IONBF; - f->_flag &= ~(_IOFBF|_IO_LBF); - } else { - f->_flag |= _IOMYBUF; - f->_cnt = f->_bufsiz = size; - f->_ptr = base; - rn = 0; - if (f == stdout && isatty(fileno(stdout))) { - f->_flag |= _IO_LBF; - } - } - } - - if (f->_flag & _IO_LBF) { - /* in line-buffering mode we get here on each character */ - *f->_ptr++ = c; - rn = f->_ptr - base; - if (c == '\n' || rn >= f->_bufsiz) { - /* time for real flush */ - f->_ptr = base; - f->_cnt = 0; - } else { - /* we got here because _cnt is wrong, so fix it */ - /* Negative _cnt causes all output functions to call */ - /* _flsbuf for each character, thus realizing line-buffering */ - f->_cnt = -rn; - return c; - } - } else if (f->_flag & _IONBF) { - c1 = c; - rn = 1; - base = &c1; - f->_cnt = 0; - } else { /* _IOFBF */ - rn = f->_ptr - base; - f->_ptr = base; - if ((f->_flag & _IOAHEAD) == _IOAHEAD) - _lseek(fileno(f), -(rn+f->_cnt), SEEK_CUR); - f->_cnt = f->_bufsiz; - f->_flag &= ~_IOAHEAD; - } - f->_flag &= ~_IODIRTY; - while (rn > 0) { - n = _write(fileno(f), base, rn); - if (n <= 0) { - f->_flag |= _IOERR; - return EOF; - } - rn -= n; - base += n; - } - if ((f->_flag & (_IO_LBF|_IONBF)) == 0) { - f->_cnt--; - *f->_ptr++ = c; - f->_flag |= _IODIRTY; - } - return c; -} - -wint_t _flswbuf(wchar_t c, FILE* fp) -{ - int result; - - result = _flsbuf((int)c, fp); - if (result == EOF) - return WEOF; - return (wint_t)result; -} - -int _writecnv(int fn, void* buf, size_t siz) -{ - char* bufp = (char*)buf; - int bufsiz = siz; - char* tmp; - int cr1 = 0; - int cr2 = 0; - int n; - - cr1 = cntcr(bufp, bufsiz); - tmp = malloc(cr1); - memcpy(tmp, bufp + bufsiz - cr1, cr1); - cr2 = cntcr(tmp, cr1); - convert(bufp, bufsiz - cr2, cr1 - cr2); - n = _write(fn, bufp, bufsiz + cr1); - convert(tmp, cr1, cr2); - n += _write(fn, tmp, cr1 + cr2); - free(tmp); - return n; -} - -int convert(char* endp, int bufsiz, int n) -{ - endp = endp + bufsiz + n; - while (bufsiz > 0) { - *endp = *(endp - n); - if (*endp == '\n') { - *endp--; - n--; - *endp = '\r'; - } - endp--; - bufsiz--; - } - return n; -} - -int cntcr(char* bufp, int bufsiz) -{ - int cr = 0; - - while (bufsiz > 0) { - if (*bufp == '\n') { - cr++; - } - bufp++; - bufsiz--; - } - return cr; -} diff --git a/reactos/lib/msvcrt/stdio/fopen.c b/reactos/lib/msvcrt/stdio/fopen.c deleted file mode 100644 index 176ed6eff3b..00000000000 --- a/reactos/lib/msvcrt/stdio/fopen.c +++ /dev/null @@ -1,163 +0,0 @@ -/* $Id$ - * - * ReactOS msvcrt library - * - * fopen.c - * - * Copyright (C) 2002 Robert Dickenson - * - * Based on original work Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details - * 28/12/1998: Appropriated for Reactos - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ -/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ - -#include -#include -#include -#include -#include -//#include - -//might change fopen(file,mode) -> fsopen(file,mode,_SH_DENYNO); - -#undef _fmode -extern unsigned int _fmode; - -FILE* __alloc_file(void); - -//extern int _fmode; - - -FILE* fopen(const char *file, const char *mode) -{ - FILE *f; - int fd, rw, oflags = 0; - - if (file == 0) - return 0; - if (mode == 0) - return 0; - - f = __alloc_file(); - if (f == NULL) - return NULL; - - rw = (strchr(mode, '+') == NULL) ? 0 : 1; - if (strchr(mode, 'a')) - oflags = O_CREAT | (rw ? O_RDWR : O_WRONLY); - if (strchr(mode, 'r')) - oflags = rw ? O_RDWR : O_RDONLY; - if (strchr(mode, 'w')) - oflags = O_TRUNC | O_CREAT | (rw ? O_RDWR : O_WRONLY); - if (strchr(mode, 't')) - oflags |= O_TEXT; - else if (strchr(mode, 'b')) - oflags |= O_BINARY; - else - oflags |= (_fmode & (O_TEXT|O_BINARY)); - - fd = _open(file, oflags, 0); - if (fd < 0) - return NULL; - -// msvcrt ensures that writes will end up at the end of file in append mode -// we just move the file pointer to the end of file initially - - if (strchr(mode, 'a')) - lseek(fd, 0, SEEK_END); - - f->_cnt = 0; - f->_file = fd; - f->_bufsiz = 0; - if (rw) - f->_flag = _IOREAD | _IOWRT; - else if (strchr(mode, 'r')) - f->_flag = _IOREAD; - else - f->_flag = _IOWRT; - - if (strchr(mode, 't')) - f->_flag |= _IOTEXT; - else if (strchr(mode, 'b')) - f->_flag |= _IOBINARY; - else if (_fmode & O_BINARY) - f->_flag |= _IOBINARY; - - f->_base = f->_ptr = NULL; - return f; -} - -/* - * @implemented - */ -FILE* _wfopen(const wchar_t *file, const wchar_t *mode) -{ - FILE *f; - int fd, rw, oflags = 0; - - if (file == 0) - return 0; - if (mode == 0) - return 0; - - f = __alloc_file(); - if (f == NULL) - return NULL; - - rw = (wcschr(mode, L'+') == NULL) ? 0 : 1; - if (wcschr(mode, L'a')) - oflags = O_CREAT | (rw ? O_RDWR : O_WRONLY); - if (wcschr(mode, L'r')) - oflags = rw ? O_RDWR : O_RDONLY; - if (wcschr(mode, L'w')) - oflags = O_TRUNC | O_CREAT | (rw ? O_RDWR : O_WRONLY); - if (wcschr(mode, L't')) - oflags |= O_TEXT; - else if (wcschr(mode, L'b')) - oflags |= O_BINARY; - else - oflags |= (_fmode & (O_TEXT|O_BINARY)); - - fd = _wopen(file, oflags, 0); - if (fd < 0) - return NULL; - -// msvcrt ensures that writes will end up at the end of file in append mode -// we just move the file pointer to the end of file initially - if (wcschr(mode, 'a')) - lseek(fd, 0, SEEK_END); - - f->_cnt = 0; - f->_file = fd; - f->_bufsiz = 0; - if (rw) - f->_flag = _IOREAD | _IOWRT; - else if (wcschr(mode, L'r')) - f->_flag = _IOREAD; - else - f->_flag = _IOWRT; - - if (wcschr(mode, L't')) - f->_flag |= _IOTEXT; - else if (wcschr(mode, L'b')) - f->_flag |= _IOBINARY; - else if (_fmode & O_BINARY) - f->_flag |= _IOBINARY; - - f->_base = f->_ptr = NULL; - return f; -} diff --git a/reactos/lib/msvcrt/stdio/fprintf.c b/reactos/lib/msvcrt/stdio/fprintf.c deleted file mode 100644 index a5589b6de6a..00000000000 --- a/reactos/lib/msvcrt/stdio/fprintf.c +++ /dev/null @@ -1,62 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include -#include -#include - -/* - * @implemented - */ -int -fprintf(register FILE *iop, const char *fmt, ...) -{ - int len; - char localbuf[BUFSIZ]; - va_list a=0; - - - va_start( a, fmt ); - if (iop->_flag & _IONBF) - { - iop->_flag &= ~_IONBF; - iop->_ptr = iop->_base = localbuf; - iop->_bufsiz = BUFSIZ; - len = vfprintf(iop,fmt,a); - fflush(iop); - iop->_flag |= _IONBF; - iop->_base = NULL; - iop->_bufsiz = 0; - iop->_cnt = 0; - } - else - len = vfprintf(iop, fmt, a); - return ferror(iop) ? EOF : len; -} - -/* - * @implemented - */ -int -fwprintf(register FILE *iop, const wchar_t *fmt, ...) -{ - int len; - wchar_t localbuf[BUFSIZ]; - va_list a=0; - - - va_start( a, fmt ); - if (iop->_flag & _IONBF) - { - iop->_flag &= ~_IONBF; - iop->_ptr = iop->_base = (char *)localbuf; - iop->_bufsiz = BUFSIZ; - len = vfwprintf(iop,fmt,a); - fflush(iop); - iop->_flag |= _IONBF; - iop->_base = NULL; - iop->_bufsiz = 0; - iop->_cnt = 0; - } - else - len = vfwprintf(iop, fmt, a); - return ferror(iop) ? EOF : len; -} diff --git a/reactos/lib/msvcrt/stdio/fputc.c b/reactos/lib/msvcrt/stdio/fputc.c deleted file mode 100644 index c08cccec557..00000000000 --- a/reactos/lib/msvcrt/stdio/fputc.c +++ /dev/null @@ -1,23 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include -#include -#include - -/* - * @implemented - */ -int -fputc(int c, FILE *fp) -{ - return putc(c, fp); -} - -/* - * @implemented - */ -wint_t -fputwc(wchar_t c, FILE *fp) -{ - return putwc(c,fp); -} - diff --git a/reactos/lib/msvcrt/stdio/fputchar.c b/reactos/lib/msvcrt/stdio/fputchar.c deleted file mode 100644 index 7faa7be615b..00000000000 --- a/reactos/lib/msvcrt/stdio/fputchar.c +++ /dev/null @@ -1,38 +0,0 @@ -/* $Id$ - * - * ReactOS msvcrt library - * - * fputchar.c - * - * Copyright (C) 2002 Robert Dickenson - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include - - -int _fputchar(int c) -{ - return putc(c, stdout); -} - -/* - * @implemented - */ -int _fputwchar(wchar_t c) -{ - return putwc(c, stdout); -} diff --git a/reactos/lib/msvcrt/stdio/fputs.c b/reactos/lib/msvcrt/stdio/fputs.c deleted file mode 100644 index de54fd02ebc..00000000000 --- a/reactos/lib/msvcrt/stdio/fputs.c +++ /dev/null @@ -1,95 +0,0 @@ -/* $Id$ - * - * ReactOS msvcrt library - * - * fputs.c - * - * Copyright (C) 2002 Robert Dickenson - * - * Based on original work Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details - * 28/12/1998: Appropriated for Reactos - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ - -#include "precomp.h" -#include -#include -#include - -int -fputs(const char *s, FILE *f) -{ - int r = 0; - int c; - int unbuffered; - char localbuf[BUFSIZ]; - - unbuffered = f->_flag & _IONBF; - if (unbuffered) - { - f->_flag &= ~_IONBF; - f->_ptr = f->_base = localbuf; - f->_bufsiz = BUFSIZ; - } - - while ((c = *s++)) - r = putc(c, f); - - if (unbuffered) - { - fflush(f); - f->_flag |= _IONBF; - f->_base = NULL; - f->_bufsiz = 0; - f->_cnt = 0; - } - - return(r); -} - -/* - * @implemented - */ -int -fputws(const wchar_t* s, FILE* f) -{ - int r = 0; - int unbuffered; - wchar_t c; - wchar_t localbuf[BUFSIZ]; - - unbuffered = f->_flag & _IONBF; - if (unbuffered) - { - f->_flag &= ~_IONBF; - f->_ptr = f->_base = (char*)localbuf; - f->_bufsiz = BUFSIZ; - } - - while ((c = *s++)) - r = putwc(c, f); - - if (unbuffered) - { - fflush(f); - f->_flag |= _IONBF; - f->_base = NULL; - f->_bufsiz = 0; - f->_cnt = 0; - } - return(r); -} diff --git a/reactos/lib/msvcrt/stdio/fread.c b/reactos/lib/msvcrt/stdio/fread.c deleted file mode 100644 index 8f6136cc629..00000000000 --- a/reactos/lib/msvcrt/stdio/fread.c +++ /dev/null @@ -1,90 +0,0 @@ -#include -#include -#include -#include -#include - - -/* - * @implemented - */ -size_t fread(void *vptr, size_t size, size_t count, FILE *iop) -{ - unsigned char *ptr = (unsigned char *)vptr; - size_t to_read ,n_read; - int c, copy; - - to_read = size * count; - - if (!OPEN4READING(iop)) - { - __set_errno (EINVAL); - return 0; - } - - if (!__validfp (iop) ) - { - __set_errno (EINVAL); - return 0; - } - if (feof (iop) || ferror (iop)) - return 0; - - if (vptr == NULL || to_read == 0) - return 0; - - if (iop->_base == NULL) - { - int c = _filbuf(iop); - if (c == EOF) - return 0; - *ptr++ = c; - if (--to_read == 0) - return 1; - } - - if (iop->_cnt > 0 && to_read > 0) - { - copy = min(iop->_cnt, to_read); - memcpy(ptr, iop->_ptr, copy); - ptr += copy; - iop->_ptr += copy; - iop->_cnt -= copy; - to_read -= copy; - if (to_read == 0) - return count; - } - - if (to_read > 0) - { - - if (to_read >= iop->_bufsiz) - { - n_read = _read(fileno(iop), ptr, to_read); - if (n_read < 0) - iop->_flag |= _IOERR; - else if (n_read == 0) - iop->_flag |= _IOEOF; - else - to_read -= n_read; - - // the file buffer is empty and there is no read ahead information anymore. - iop->_flag &= ~_IOAHEAD; - } - else - { - c = _filbuf(iop); - if (c != EOF) - { - *ptr++ = c; - to_read--; - copy = min(iop->_cnt, to_read); - memcpy(ptr, iop->_ptr, copy); - iop->_ptr += copy; - iop->_cnt -= copy; - to_read -= copy; - } - } - } - return count - (to_read/size); -} diff --git a/reactos/lib/msvcrt/stdio/freopen.c b/reactos/lib/msvcrt/stdio/freopen.c deleted file mode 100644 index 06f003f47a0..00000000000 --- a/reactos/lib/msvcrt/stdio/freopen.c +++ /dev/null @@ -1,128 +0,0 @@ -/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ - -#include -#include -#include -#include -#include - - -/* - * @implemented - */ -FILE *freopen(const char *file, const char *mode, FILE *f) -{ - int fd, rw, oflags=0; - char tbchar; - - if (file == 0 || mode == 0 || f == 0) - return 0; - - rw = (mode[1] == '+'); - - fclose(f); - - switch (*mode) { - case 'a': - oflags = O_CREAT | (rw ? O_RDWR : O_WRONLY); - break; - case 'r': - oflags = rw ? O_RDWR : O_RDONLY; - break; - case 'w': - oflags = O_TRUNC | O_CREAT | (rw ? O_RDWR : O_WRONLY); - break; - default: - return NULL; - } - if (mode[1] == '+') - tbchar = mode[2]; - else - tbchar = mode[1]; - if (tbchar == 't') - oflags |= O_TEXT; - else if (tbchar == 'b') - oflags |= O_BINARY; - else - oflags |= (_fmode & (O_TEXT|O_BINARY)); - - fd = _open(file, oflags, 0666); - if (fd < 0) - return NULL; - - if (*mode == 'a') - lseek(fd, 0, SEEK_END); - - f->_cnt = 0; - f->_file = fd; - f->_bufsiz = 0; - if (rw) - f->_flag = _IOREAD | _IOWRT; - else if (*mode == 'r') - f->_flag = _IOREAD; - else - f->_flag = _IOWRT; - - f->_base = f->_ptr = NULL; - return f; -} - -/* - * @implemented - */ -FILE *_wfreopen(const wchar_t *file, const wchar_t *mode, FILE *f) -{ - int fd, rw, oflags=0; - wchar_t tbchar; - - if (file == 0 || mode == 0 || f == 0) - return 0; - - rw = (mode[1] == L'+'); - - fclose(f); - - switch (*mode) { - case L'a': - oflags = O_CREAT | (rw ? O_RDWR : O_WRONLY); - break; - case L'r': - oflags = rw ? O_RDWR : O_RDONLY; - break; - case L'w': - oflags = O_TRUNC | O_CREAT | (rw ? O_RDWR : O_WRONLY); - break; - default: - return NULL; - } - if (mode[1] == L'+') - tbchar = mode[2]; - else - tbchar = mode[1]; - if (tbchar == L't') - oflags |= O_TEXT; - else if (tbchar == L'b') - oflags |= O_BINARY; - else - oflags |= (_fmode & (O_TEXT|O_BINARY)); - - fd = _wopen(file, oflags, 0666); - if (fd < 0) - return NULL; - - if (*mode == L'a') - lseek(fd, 0, SEEK_END); - - f->_cnt = 0; - f->_file = fd; - f->_bufsiz = 0; - if (rw) - f->_flag = _IOREAD | _IOWRT; - else if (*mode == L'r') - f->_flag = _IOREAD; - else - f->_flag = _IOWRT; - - f->_base = f->_ptr = NULL; - return f; -} diff --git a/reactos/lib/msvcrt/stdio/fscanf.c b/reactos/lib/msvcrt/stdio/fscanf.c deleted file mode 100644 index 8170ce1603f..00000000000 --- a/reactos/lib/msvcrt/stdio/fscanf.c +++ /dev/null @@ -1,65 +0,0 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. -This file is part of the GNU C Library. - -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -The GNU C 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - - -#include -#include -#include -#include -#include - - -/* Read formatted input from STREAM according to the format string FORMAT. */ -/* VARARGS2 */ -/* - * @implemented - */ -int fscanf(FILE *stream,const char *format, ...) -{ - va_list arg; - int done; - - va_start(arg, format); - done = __vfscanf(stream, format, arg); - va_end(arg); - - return done; -} - -/* - * @implemented - */ -int -fwscanf(FILE *stream, const wchar_t *fmt, ...) -{ - va_list arg; - int done; - char *cf; - int i,len = wcslen(fmt); - - cf = malloc(len+1); - for(i=0;i -#include -#include -#include -#include - - -/* - * @implemented - */ -int fseek(FILE *f, long offset, int ptrname) -{ - long p = -1; /* can't happen? */ - if ( f == NULL ) { - __set_errno (EINVAL); - return -1; - } - - f->_flag &= ~_IOEOF; - if (!OPEN4WRITING(f)) - { - if (f->_base && !(f->_flag & _IONBF)) - { - p = ftell(f); - if (ptrname == SEEK_CUR) - { - offset += p; - ptrname = SEEK_SET; - } - /* check if the target position is in the buffer and - optimize seek by moving inside the buffer */ - if (ptrname == SEEK_SET && (f->_flag & (_IOUNGETC|_IOREAD|_IOWRT )) == 0 - && p-offset <= f->_ptr-f->_base && offset-p <= f->_cnt) - { - f->_ptr+=offset-p; - f->_cnt+=p-offset; - return 0; - } - } - - p = lseek(fileno(f), offset, ptrname); - f->_cnt = 0; - f->_ptr = f->_base; - f->_flag &= ~_IOUNGETC; - } - else - { - p = fflush(f); - return lseek(fileno(f), offset, ptrname) == -1 || p == EOF ? - -1 : 0; - } - return p==-1 ? -1 : 0; -} diff --git a/reactos/lib/msvcrt/stdio/fsetpos.c b/reactos/lib/msvcrt/stdio/fsetpos.c deleted file mode 100644 index 9bb8e56ca27..00000000000 --- a/reactos/lib/msvcrt/stdio/fsetpos.c +++ /dev/null @@ -1,18 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include -#include -#include - -/* - * @implemented - */ -int fsetpos(FILE *stream,const fpos_t *pos) -{ - if (stream && pos) - { - fseek(stream, (long)(*pos), SEEK_SET); - return 0; - } - __set_errno(EFAULT); - return -1; -} diff --git a/reactos/lib/msvcrt/stdio/fsopen.c b/reactos/lib/msvcrt/stdio/fsopen.c deleted file mode 100644 index 7d7268f7d11..00000000000 --- a/reactos/lib/msvcrt/stdio/fsopen.c +++ /dev/null @@ -1,183 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/msvcrt/stdio/fsopen.c - * PURPOSE: Checks for keyboard hits - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 28/12/98: Created - */ -/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ - -#include -#include -#include -#include -#include -#include - - -FILE * __alloc_file(void); - - -/* - * @implemented - */ -FILE* _fsopen(const char *file, const char *mode, int shflag) -{ - FILE *f; - int fd, rw, oflags = 0; - char tbchar; - - int shf; - - if (file == 0) - return 0; - if (mode == 0) - return 0; - - f = __alloc_file(); - if (f == NULL) - return NULL; - - rw = (mode[1] == '+') || (mode[1] && (mode[2] == '+')); - - switch (*mode) - { - case 'a': - oflags = O_CREAT | (rw ? O_RDWR : O_WRONLY); - break; - case 'r': - oflags = rw ? O_RDWR : O_RDONLY; - break; - case 'w': - oflags = O_TRUNC | O_CREAT | (rw ? O_RDWR : O_WRONLY); - break; - default: - return (NULL); - } - if (mode[1] == '+') - tbchar = mode[2]; - else - tbchar = mode[1]; - if (tbchar == 't') - oflags |= O_TEXT; - else if (tbchar == 'b') - oflags |= O_BINARY; - else - oflags |= (_fmode & (O_TEXT|O_BINARY)); - - if ( shflag == _SH_DENYNO ) - shf = _S_IREAD | _S_IWRITE; - else if( shflag == _SH_DENYRD ) - shf = _S_IWRITE; - else if( shflag == _SH_DENYRW ) - shf = 0; - else if( shflag == _SH_DENYWR ) - shf = _S_IREAD; - else - shf = _S_IREAD | _S_IWRITE; - - fd = _open(file, oflags, shf); - if (fd < 0) - return NULL; - -// msvcrt ensures that writes will end up at the end of file in append mode -// we just move the file pointer to the end of file initially - if (*mode == 'a') - lseek(fd, 0, SEEK_END); - - f->_cnt = 0; - f->_file = fd; - f->_bufsiz = 0; - if (rw) - f->_flag = _IOREAD | _IOWRT; - else if (*mode == 'r') - f->_flag = _IOREAD; - else - f->_flag = _IOWRT; - - f->_base = f->_ptr = NULL; - return f; -} - -/* - * @implemented - */ -FILE* _wfsopen(const wchar_t *file, const wchar_t *mode, int shflag) -{ - FILE *f; - int fd, rw, oflags = 0; - wchar_t tbchar; - - int shf; - - if (file == 0) - return 0; - if (mode == 0) - return 0; - - f = __alloc_file(); - if (f == NULL) - return NULL; - - rw = (mode[1] == L'+') || (mode[1] && (mode[2] == L'+')); - - switch (*mode) - { - case L'a': - oflags = O_CREAT | (rw ? O_RDWR : O_WRONLY); - break; - case L'r': - oflags = rw ? O_RDWR : O_RDONLY; - break; - case L'w': - oflags = O_TRUNC | O_CREAT | (rw ? O_RDWR : O_WRONLY); - break; - default: - return (NULL); - } - if (mode[1] == L'+') - tbchar = mode[2]; - else - tbchar = mode[1]; - if (tbchar == L't') - oflags |= O_TEXT; - else if (tbchar == L'b') - oflags |= O_BINARY; - else - oflags |= (_fmode & (O_TEXT|O_BINARY)); - - if ( shflag == _SH_DENYNO ) - shf = _S_IREAD | _S_IWRITE; - else if( shflag == _SH_DENYRD ) - shf = _S_IWRITE; - else if( shflag == _SH_DENYRW ) - shf = 0; - else if( shflag == _SH_DENYWR ) - shf = _S_IREAD; - else - shf = _S_IREAD | _S_IWRITE; - - fd = _wopen(file, oflags, shf); - if (fd < 0) - return NULL; - -// msvcrt ensures that writes will end up at the end of file in append mode -// we just move the file pointer to the end of file initially - if (*mode == L'a') - lseek(fd, 0, SEEK_END); - - f->_cnt = 0; - f->_file = fd; - f->_bufsiz = 0; - if (rw) - f->_flag = _IOREAD | _IOWRT; - else if (*mode == L'r') - f->_flag = _IOREAD; - else - f->_flag = _IOWRT; - - f->_base = f->_ptr = NULL; - return f; -} diff --git a/reactos/lib/msvcrt/stdio/ftell.c b/reactos/lib/msvcrt/stdio/ftell.c deleted file mode 100644 index 93c048c7daf..00000000000 --- a/reactos/lib/msvcrt/stdio/ftell.c +++ /dev/null @@ -1,48 +0,0 @@ -/* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */ -/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ - -#include -#include -#include -#include -#include - - -/* - * @implemented - */ -long ftell(FILE *f) -{ - long tres; - int adjust=0; - - if (!f) - { - __set_errno(EBADF); - return -1; - } - - if (f->_cnt < 0) - f->_cnt = 0; - else if (f->_flag&(_IOWRT)) - { - if (f->_base && (f->_flag&_IONBF)==0) - adjust = f->_ptr - f->_base; - } - else if (f->_flag&_IOREAD) - { - adjust = - f->_cnt; - } - else - return -1; - - tres = lseek(fileno(f), 0L, SEEK_CUR); - if (tres<0) - return tres; - tres += adjust; - - //f->_cnt = f->_bufsiz - tres; - //f->_ptr = f->_base + tres; - - return tres; -} diff --git a/reactos/lib/msvcrt/stdio/fwalk.c b/reactos/lib/msvcrt/stdio/fwalk.c deleted file mode 100644 index f1e117ffd1b..00000000000 --- a/reactos/lib/msvcrt/stdio/fwalk.c +++ /dev/null @@ -1,18 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include -#include - - -// not exported by msvcrt or crtdll -__file_rec *__file_rec_list; - -void _fwalk(void (*func)(FILE *)) -{ - __file_rec *fr; - int i; - - for (fr=__file_rec_list; fr; fr=fr->next) - for (i=0; icount; i++) - if (fr->files[i]->_flag) - func(fr->files[i]); -} diff --git a/reactos/lib/msvcrt/stdio/fwrite.c b/reactos/lib/msvcrt/stdio/fwrite.c deleted file mode 100644 index 24d5739a01c..00000000000 --- a/reactos/lib/msvcrt/stdio/fwrite.c +++ /dev/null @@ -1,114 +0,0 @@ -#include -#include -#include -#include -#include -#define NDEBUG -#include - - -/* - * @implemented - */ -size_t fwrite(const void *vptr, size_t size, size_t count, FILE *iop) -{ - size_t to_write, n_written; - unsigned char *ptr = (unsigned char *)vptr; - int copy; - - DPRINT("fwrite(%x, %d, %d, %x)\n", vptr, size, count, iop); - - to_write = size*count; - if (!OPEN4WRITING(iop)) - { - __set_errno (EINVAL); - return 0; - } - - if (iop == NULL) - { - __set_errno (EINVAL); - return 0; - } - - if (ferror (iop)) - return 0; - if (vptr == NULL || to_write == 0) - return 0; - - if (iop->_base == NULL && !(iop->_flag&_IONBF)) - { - if (EOF == _flsbuf(*ptr++, iop)) - return 0; - if (--to_write == 0) - return 1; - } - - if (iop->_flag & _IO_LBF) - { - while (to_write > 0) - { - if (EOF == putc(*ptr++, iop)) - { - iop->_flag |= _IOERR; - break; - } - to_write--; - } - } - else - { - if (iop->_cnt > 0 && to_write > 0) - { - copy = min(iop->_cnt, to_write); - memcpy(iop->_ptr, ptr, copy); - ptr += copy; - iop->_ptr += copy; - iop->_cnt -= copy; - to_write -= copy; - iop->_flag |= _IODIRTY; - } - - if (to_write > 0) - { - // if the buffer is dirty it will have to be written now - // otherwise the file pointer won't match anymore. - fflush(iop); - if (to_write >= iop->_bufsiz) - { - while (to_write > 0) - { - n_written = _write(fileno(iop), ptr, to_write); - if (n_written <= 0) - { - iop->_flag |= _IOERR; - break; - } - to_write -= n_written; - ptr += n_written; - } - - // check to see if this will work with in combination with ungetc - - // the file buffer is empty and there is no read ahead information anymore. - iop->_flag &= ~_IOAHEAD; - } - else - { - if (EOF != _flsbuf(*ptr++, iop)) - { - if (--to_write > 0) - { - memcpy(iop->_ptr, ptr, to_write); - iop->_ptr += to_write; - iop->_cnt -= to_write; - iop->_flag |= _IODIRTY; - return count; - } - } - } - } - } - - return count - (to_write/size); -} diff --git a/reactos/lib/msvcrt/stdio/getc.c b/reactos/lib/msvcrt/stdio/getc.c deleted file mode 100644 index 83a30053152..00000000000 --- a/reactos/lib/msvcrt/stdio/getc.c +++ /dev/null @@ -1,134 +0,0 @@ -/* $Id$ - * - * ReactOS msvcrt library - * - * getc.c - * - * Copyright (C) 2002 Robert Dickenson - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include "precomp.h" -#include -#include -#include -#include - -//getc can be a macro -#undef getc -#undef getwc - -#ifndef MB_CUR_MAX -#define MB_CUR_MAX 10 -#endif - -int getc(FILE *fp) -{ - int c = -1; - - // check for invalid stream - if ( !__validfp (fp) ) { - __set_errno(EINVAL); - return EOF; - } - // check for read access on stream - if ( !OPEN4READING(fp) ) { - __set_errno(EINVAL); - return EOF; - } - if(fp->_cnt > 0) { - fp->_cnt--; - c = (int)(*fp->_ptr++ & 0377); - } else { - c = _filbuf(fp); - } - return c; -} - -/* - * @implemented - */ -wint_t getwc(FILE *fp) -{ - wint_t c = -1; - - // check for invalid stream - if (!__validfp(fp)) { - __set_errno(EINVAL); - return WEOF; - } - // check for read access on stream -//#define OPEN4READING(f) ((((f)->_flag & _IOREAD) == _IOREAD ) ) - if (!OPEN4READING(fp)) { - __set_errno(EINVAL); - return WEOF; - } - // might check on multi bytes if text mode - if (fp->_flag & _IOBINARY) { - if (fp->_cnt > 1) { - fp->_cnt -= sizeof(wchar_t); - c = *((wchar_t*)fp->_ptr); - fp->_ptr += sizeof(wchar_t); - } else { - c = _filwbuf(fp); - // need to fix by one values of fp->_ptr and fp->_cnt - fp->_ptr++; - fp->_cnt--; - } - } else { -#if 0 - BOOL get_bytes = 0; - int mb_cnt = 0; - int found_cr = 0; - //int count; - char mbchar[MB_CUR_MAX]; - - do { - if (fp->_cnt > 0) { - fp->_cnt--; - mbchar[mb_cnt] = *fp->_ptr++ & 0377; - } else { - mbchar[mb_cnt] = _filbuf(fp); - } - if (isleadbyte(mbchar[mb_cnt])) { - get_bytes = 1; - } else { - get_bytes = 0; - } - if (_ismbblead(mbchar[mb_cnt])) { - } - ++mb_cnt; - //} - } while (get_bytes); - - // Convert a multibyte character to a corresponding wide character. - mb_cnt = mbtowc(&c, mbchar, mb_cnt); - if (mb_cnt == -1) { - fp->_flag |= _IOERR; - return WEOF; - } -#else - if (fp->_cnt > 0) { - fp->_cnt--; - c = *fp->_ptr++ &0377; - } else { - c = _filbuf(fp); - } -#endif - } - return c; -} - diff --git a/reactos/lib/msvcrt/stdio/getchar.c b/reactos/lib/msvcrt/stdio/getchar.c deleted file mode 100644 index 31aecbfd89a..00000000000 --- a/reactos/lib/msvcrt/stdio/getchar.c +++ /dev/null @@ -1,46 +0,0 @@ -/* $Id$ - * - * ReactOS msvcrt library - * - * getchar.c - * - * Copyright (C) 2002 Robert Dickenson - * - * Based on original work Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details - * 28/12/1998: Appropriated for Reactos - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include -#include - -#undef getchar -#undef getwchar - -int -getchar(void) -{ - return getc(stdin); -} - -/* - * @implemented - */ -wint_t -getwchar(void) -{ - return getwc(stdin); -} diff --git a/reactos/lib/msvcrt/stdio/gets.c b/reactos/lib/msvcrt/stdio/gets.c deleted file mode 100644 index 579590928ba..00000000000 --- a/reactos/lib/msvcrt/stdio/gets.c +++ /dev/null @@ -1,146 +0,0 @@ -/* $Id$ - * - * ReactOS msvcrt library - * - * gets.c - * - * Copyright (C) 2002 Robert Dickenson - * - * Based on original work Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details - * 28/12/1998: Appropriated for Reactos - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ - -#include - -char* gets(char* s) -{ - int c; - char* cs; - - cs = s; - while ((c = getc(stdin)) != '\n' && c != EOF) - *cs++ = c; - if (c == EOF && cs == s) - return NULL; - *cs++ = '\0'; - return s; -} - -#ifndef WEOF -#define WEOF (wchar_t)(0xFFFF) -#endif - -/* - * Get a line from the stdin stream. - * - * @implemented - */ -wchar_t* _getws(wchar_t* s) -{ - wchar_t c; - wchar_t* cs; - - cs = s; - while ((c = getwc(stdin)) != L'\n' && c != WEOF) - *cs++ = c; - if (c == WEOF && cs == s) - return NULL; - *cs++ = L'\0'; - return s; -} - -#if 0 -/* Copyright (C) 1991, 1994, 1995, 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. - -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -The GNU C 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include -#include -#include - -link_warning (gets, "the `gets' function is dangerous and should not be used.") - - -/* Read a newline-terminated multibyte string from stdin into S, - removing the trailing newline. Return S or NULL. */ - -char * -gets (s) - char *s; -{ - register char *p = s; - register int c; - FILE *stream = stdin; - int l; - - if (!__validfp (stream) || p == NULL) - { - __set_errno (EINVAL); - return NULL; - } - - if (feof (stream) || ferror (stream)) - return NULL; - - while ((c = getc(stdin)) != EOF) { - if (c == '\n') - break; - if ( isascii(c) ) - *cs++ = c; -#ifdef _MULTIBYTE - else if ( isleadbyte(c) ) { - l = mblen(c); - while(l > 0 ) { - c = getchar(); - if ( isleadbyte(c) || c == EOF ) - return NULL; // encoding error - *cs++ = c; - l--; - } - } -#endif - else - return NULL; // suspicious input - } - - *p = '\0'; - - /* Return null if we had an error, or if we got EOF - before writing any characters. */ - - if (ferror (stream) || (feof (stream) && p == s)) - return NULL; - - return s; -} - -#endif diff --git a/reactos/lib/msvcrt/stdio/getw.c b/reactos/lib/msvcrt/stdio/getw.c deleted file mode 100644 index e5eff56ecfe..00000000000 --- a/reactos/lib/msvcrt/stdio/getw.c +++ /dev/null @@ -1,39 +0,0 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. -This file is part of the GNU C Library. - -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -The GNU C 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include - - -/* - * Read a word (int) from STREAM. - * - * @implemented - */ -int _getw(FILE *stream) -{ - int w; - - /* Is there a better way? */ - if (fread( &w, sizeof(w), 1, stream) != 1) { - // EOF is a legitimate integer value so users must - // check feof or ferror to verify an EOF return. - return(EOF); - } - return(w); -} - diff --git a/reactos/lib/msvcrt/stdio/perror.c b/reactos/lib/msvcrt/stdio/perror.c deleted file mode 100644 index 369e5053e5f..00000000000 --- a/reactos/lib/msvcrt/stdio/perror.c +++ /dev/null @@ -1,26 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include -#include -#include - - -#ifdef perror -#undef perror -void perror(const char *s); -#endif - -/* - * @implemented - */ -void perror(const char *s) -{ - fprintf(stderr, "%s: %s\n", s, _strerror(NULL)); -} - -/* - * @implemented - */ -void _wperror(const wchar_t *s) -{ - fwprintf(stderr, L"%s: %S\n", s, _strerror(NULL)); -} diff --git a/reactos/lib/msvcrt/stdio/popen.c b/reactos/lib/msvcrt/stdio/popen.c deleted file mode 100644 index 5c9b5583877..00000000000 --- a/reactos/lib/msvcrt/stdio/popen.c +++ /dev/null @@ -1,224 +0,0 @@ -#include "precomp.h" -#include -#include -#include -#include -#include -#include -#define NDEBUG -#include - - -/* - * @implemented - */ -FILE *_popen (const char *cm, const char *md) /* program name, pipe mode */ -{ - char *szCmdLine=NULL; - char *szComSpec=NULL; - char *s; - FILE *pf; - HANDLE hReadPipe, hWritePipe; - BOOL result; - STARTUPINFOA StartupInfo; - PROCESS_INFORMATION ProcessInformation; - SECURITY_ATTRIBUTES sa = {sizeof(SECURITY_ATTRIBUTES), NULL, TRUE}; - - DPRINT("_popen('%s', '%s')\n", cm, md); - - if (cm == NULL) - return NULL; - - szComSpec = getenv("COMSPEC"); - if (szComSpec == NULL) - { - szComSpec = "cmd.exe"; - } - - s = max(strrchr(szComSpec, '\\'), strrchr(szComSpec, '/')); - if (s == NULL) - s = szComSpec; - else - s++; - - szCmdLine = malloc(strlen(s) + 4 + strlen(cm) + 1); - if (szCmdLine == NULL) - { - return NULL; - } - - strcpy(szCmdLine, s); - s = strrchr(szCmdLine, '.'); - if (s) - *s = 0; - strcat(szCmdLine, " /C "); - strcat(szCmdLine, cm); - - if ( !CreatePipe(&hReadPipe,&hWritePipe,&sa,1024)) - { - free (szCmdLine); - return NULL; - } - - memset(&StartupInfo, 0, sizeof(STARTUPINFOA)); - StartupInfo.cb = sizeof(STARTUPINFOA); - - if (*md == 'r' ) { - StartupInfo.hStdOutput = hWritePipe; - StartupInfo.dwFlags |= STARTF_USESTDHANDLES; - } - else if ( *md == 'w' ) { - StartupInfo.hStdInput = hReadPipe; - StartupInfo.dwFlags |= STARTF_USESTDHANDLES; - } - - result = CreateProcessA(szComSpec, - szCmdLine, - NULL, - NULL, - TRUE, - 0, - NULL, - NULL, - &StartupInfo, - &ProcessInformation); - free (szCmdLine); - - if (result == FALSE) - { - CloseHandle(hReadPipe); - CloseHandle(hWritePipe); - return NULL; - } - - CloseHandle(ProcessInformation.hThread); - - if ( *md == 'r' ) - { - pf = _fdopen(__fileno_alloc(hReadPipe, _fmode) , "r"); - CloseHandle(hWritePipe); - } - else - { - pf = _fdopen( __fileno_alloc(hWritePipe, _fmode) , "w"); - CloseHandle(hReadPipe); - } - - pf->_name_to_remove = ProcessInformation.hProcess; - - return pf; -} - - -/* - * @implemented - */ -int _pclose (FILE *pp) -{ - fclose(pp); - if (!TerminateProcess(pp->_name_to_remove,0)) - return -1; - return 0; -} - - -/* - * @implemented - */ -FILE *_wpopen (const wchar_t *cm, const wchar_t *md) /* program name, pipe mode */ -{ - wchar_t *szCmdLine=NULL; - wchar_t *szComSpec=NULL; - wchar_t *s; - FILE *pf; - HANDLE hReadPipe, hWritePipe; - BOOL result; - STARTUPINFOW StartupInfo; - PROCESS_INFORMATION ProcessInformation; - SECURITY_ATTRIBUTES sa = {sizeof(SECURITY_ATTRIBUTES), NULL, TRUE}; - - DPRINT("_wpopen('%S', '%S')\n", cm, md); - - if (cm == NULL) - return NULL; - - szComSpec = _wgetenv(L"COMSPEC"); - - if (szComSpec == NULL) - { - szComSpec = L"cmd.exe"; - } - - s = max(wcsrchr(szComSpec, L'\\'), wcsrchr(szComSpec, L'/')); - if (s == NULL) - s = szComSpec; - else - s++; - - szCmdLine = malloc((wcslen(s) + 4 + wcslen(cm) + 1) * sizeof(wchar_t)); - if (szCmdLine == NULL) - { - return NULL; - } - - wcscpy(szCmdLine, s); - s = wcsrchr(szCmdLine, L'.'); - if (s) - *s = 0; - wcscat(szCmdLine, L" /C "); - wcscat(szCmdLine, cm); - - if ( !CreatePipe(&hReadPipe,&hWritePipe,&sa,1024)) - { - free (szCmdLine); - return NULL; - } - - memset(&StartupInfo, 0, sizeof(STARTUPINFOW)); - StartupInfo.cb = sizeof(STARTUPINFOW); - - if (*md == L'r' ) { - StartupInfo.hStdOutput = hWritePipe; - StartupInfo.dwFlags |= STARTF_USESTDHANDLES; - } - else if ( *md == L'w' ) { - StartupInfo.hStdInput = hReadPipe; - StartupInfo.dwFlags |= STARTF_USESTDHANDLES; - } - - result = CreateProcessW(szComSpec, - szCmdLine, - NULL, - NULL, - TRUE, - 0, - NULL, - NULL, - &StartupInfo, - &ProcessInformation); - free (szCmdLine); - - if (result == FALSE) - { - CloseHandle(hReadPipe); - CloseHandle(hWritePipe); - return NULL; - } - - CloseHandle(ProcessInformation.hThread); - - if ( *md == L'r' ) - { - pf = _wfdopen(__fileno_alloc(hReadPipe, _fmode) , L"r"); - CloseHandle(hWritePipe); - } - else - { - pf = _wfdopen( __fileno_alloc(hWritePipe, _fmode) , L"w"); - CloseHandle(hReadPipe); - } - - pf->_name_to_remove = ProcessInformation.hProcess; - - return pf; -} diff --git a/reactos/lib/msvcrt/stdio/printf.c b/reactos/lib/msvcrt/stdio/printf.c deleted file mode 100644 index 9d57e14c1c9..00000000000 --- a/reactos/lib/msvcrt/stdio/printf.c +++ /dev/null @@ -1,50 +0,0 @@ -/* Copyright (C) 1991, 1995, 1996 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - The GNU C 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include -#include -#include - - -/* - * @implemented - */ -int printf(const char* format, ...) -{ - va_list arg; - int done; - - va_start(arg, format); - done = vprintf(format, arg); - va_end(arg); - return done; -} - -/* - * @implemented - */ -int wprintf(const wchar_t* format, ...) -{ - va_list arg; - int done; - - va_start(arg, format); - done = vwprintf(format, arg); - va_end(arg); - return done; -} diff --git a/reactos/lib/msvcrt/stdio/putc.c b/reactos/lib/msvcrt/stdio/putc.c deleted file mode 100644 index 99915bb8e6e..00000000000 --- a/reactos/lib/msvcrt/stdio/putc.c +++ /dev/null @@ -1,146 +0,0 @@ -/* $Id$ - * - * ReactOS msvcrt library - * - * putc.c - * - * Copyright (C) 2002 Robert Dickenson - * - * Based on original work Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ - -#include "precomp.h" -#include -#include -#include -#include - -// putc can be a macro -#undef putc -#undef putwc - -#ifndef MB_CUR_MAX_CONST -#define MB_CUR_MAX_CONST 10 -#endif - -int putc(int c, FILE* fp) -{ - // valid stream macro should check that fp is dword aligned - if (!__validfp(fp)) { - __set_errno(EINVAL); - return EOF; - } - // check for write access on fp - if (!OPEN4WRITING(fp)) { - __set_errno(EINVAL); - return EOF; - } - fp->_flag |= _IODIRTY; - if (fp->_cnt > 0) { - fp->_cnt--; - *(fp)->_ptr++ = (unsigned char)c; - return (int)(unsigned char)c; - } else { - return _flsbuf((unsigned char)c, fp); - } - return EOF; -} - -//wint_t putwc(wint_t c, FILE* fp) -/* - * @implemented - */ -int putwc(wint_t c, FILE* fp) -{ - // valid stream macro should check that fp is dword aligned - if (!__validfp(fp)) { - __set_errno(EINVAL); - return WEOF; - } - // check for write access on fp - if (!OPEN4WRITING(fp)) { - __set_errno(EINVAL); - return WEOF; - } - // might check on multi bytes if text mode - if (fp->_flag & _IOBINARY) { - //if (1) { - - fp->_flag |= _IODIRTY; - if (fp->_cnt > 0) { - fp->_cnt -= sizeof(wchar_t); - //*((wchar_t*)(fp->_ptr))++ = c; - *((wchar_t*)(fp->_ptr)) = c; - fp->_ptr += sizeof(wchar_t); - return (wint_t)c; - } else { -#if 1 - wint_t result; - result = _flsbuf(c, fp); - if (result == (wint_t)EOF) - return WEOF; - result = _flsbuf((int)(c >> 8), fp); - if (result == (wint_t)EOF) - return WEOF; - return result; -#else - return _flswbuf(c, fp); -#endif - } - - } else { -#if 0 - int i; - int mb_cnt; - char mbchar[MB_CUR_MAX_CONST]; - - // Convert wide character to the corresponding multibyte character. - mb_cnt = wctomb(mbchar, (wchar_t)c); - if (mb_cnt == -1) { - fp->_flag |= _IOERR; - return WEOF; - } - if (mb_cnt > MB_CUR_MAX_CONST) { - // BARF(); - } - for (i = 0; i < mb_cnt; i++) { - fp->_flag |= _IODIRTY; - if (fp->_cnt > 0) { - fp->_cnt--; - *(fp)->_ptr++ = (unsigned char)mbchar[i]; - } else { - if (_flsbuf((unsigned char)mbchar[i], fp) == EOF) { - return WEOF; - } - } - } -#else - fp->_flag |= _IODIRTY; - if (fp->_cnt > 0) { - fp->_cnt--; - *(fp)->_ptr++ = (unsigned char)c; - } else { - if (_flsbuf(c, fp) == EOF) { - return WEOF; - } - } -#endif - return c; - } - return WEOF; -} diff --git a/reactos/lib/msvcrt/stdio/putchar.c b/reactos/lib/msvcrt/stdio/putchar.c deleted file mode 100644 index 7c3030cc9c4..00000000000 --- a/reactos/lib/msvcrt/stdio/putchar.c +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/msvcrt/stdio/putchar.c - * PURPOSE: Writes a character to stdout - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 28/12/98: Created - */ -#include - -#undef putc -#undef putchar -#undef putwc -#undef putwchar - -/* - * @implemented - */ -int putchar(int c) -{ - int r = putc(c, stdout); - if (stdout->_flag & _IO_LBF) - fflush(stdout); - return r; -} - -/* - * @implemented - */ -wint_t putwchar(wint_t c) -{ - wint_t r = putwc(c, stdout); - if (stdout->_flag & _IO_LBF) - fflush(stdout); - return r; -} diff --git a/reactos/lib/msvcrt/stdio/puts.c b/reactos/lib/msvcrt/stdio/puts.c deleted file mode 100644 index 6b1867c1706..00000000000 --- a/reactos/lib/msvcrt/stdio/puts.c +++ /dev/null @@ -1,35 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include "precomp.h" -#include -#include -#include - -#undef putchar -#undef putwchar - - -/* - * @implemented - */ -int puts(const char *s) -{ - int c; - - while ((c = *s++)) { - putchar(c); - } - return putchar('\n'); -} - -/* - * @implemented - */ -int _putws(const wchar_t *s) -{ - wint_t c; - - while ((c = *s++)) { - putwchar(c); - } - return putwchar(L'\n'); -} diff --git a/reactos/lib/msvcrt/stdio/putw.c b/reactos/lib/msvcrt/stdio/putw.c deleted file mode 100644 index dab2f31ee0c..00000000000 --- a/reactos/lib/msvcrt/stdio/putw.c +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. - * This file is part of the GNU C Library. - * - * The GNU C Library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * The GNU C 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with the GNU C Library; see the file COPYING.LIB. If - * not, write to the Free Software Foundation, Inc., 675 Mass Ave, - * Cambridge, MA 02139, USA. */ - - -#include - - -/* - * Write the word (int) W to STREAM. - * - * @implemented - */ -int _putw(int w,FILE *stream) -{ - /* Is there a better way? */ - if (fwrite( &w, sizeof(w), 1, stream) < 1) - return(EOF); - return(0); -} diff --git a/reactos/lib/msvcrt/stdio/remove.c b/reactos/lib/msvcrt/stdio/remove.c deleted file mode 100644 index 3f946b400f0..00000000000 --- a/reactos/lib/msvcrt/stdio/remove.c +++ /dev/null @@ -1,30 +0,0 @@ -#include "precomp.h" -#include -#include - -#define NDEBUG -#include - -/* - * @implemented - */ -int remove(const char *fn) -{ - int result = 0; - DPRINT("remove('%s')\n", fn); - if (!DeleteFileA(fn)) - result = -1; - DPRINT("%d\n", result); - return result; -} - -/* - * @implemented - */ -int _wremove(const wchar_t *fn) -{ - DPRINT("_wremove('%S')\n", fn); - if (!DeleteFileW(fn)) - return -1; - return 0; -} diff --git a/reactos/lib/msvcrt/stdio/rename.c b/reactos/lib/msvcrt/stdio/rename.c deleted file mode 100644 index fff877c8eb9..00000000000 --- a/reactos/lib/msvcrt/stdio/rename.c +++ /dev/null @@ -1,18 +0,0 @@ -#include "precomp.h" -#include -#include - - -/* - * @implemented - */ -int rename(const char* old_, const char* new_) -{ - if (old_ == NULL || new_ == NULL) - return -1; - - if (!MoveFileA(old_, new_)) - return -1; - - return 0; -} diff --git a/reactos/lib/msvcrt/stdio/rewind.c b/reactos/lib/msvcrt/stdio/rewind.c deleted file mode 100644 index e3b6703e43e..00000000000 --- a/reactos/lib/msvcrt/stdio/rewind.c +++ /dev/null @@ -1,18 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ - -#include -#include -#include - - -/* - * @implemented - */ -void rewind(FILE *f) -{ - fflush(f); - lseek(fileno(f), 0L, SEEK_SET); - f->_cnt = 0; - f->_ptr = f->_base; - f->_flag &= ~(_IOERR|_IOEOF|_IOAHEAD); -} diff --git a/reactos/lib/msvcrt/stdio/rmtmp.c b/reactos/lib/msvcrt/stdio/rmtmp.c deleted file mode 100644 index 1d2a8c51c99..00000000000 --- a/reactos/lib/msvcrt/stdio/rmtmp.c +++ /dev/null @@ -1,72 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/msvcrt/stdio/rmtmp.c - * PURPOSE: remove temporary files in current directory - * PROGRAMMER: Boudewijn ( ariadne@xs4all.nl) - * UPDATE HISTORY: - * Created 19/01/99 - * NOTE Not tested. - */ - -#include -#include -#include - -#ifndef F_OK - #define F_OK 0x01 -#endif -#ifndef R_OK - #define R_OK 0x02 -#endif -#ifndef W_OK - #define W_OK 0x04 -#endif -#ifndef X_OK - #define X_OK 0x08 -#endif -#ifndef D_OK - #define D_OK 0x10 -#endif - -// should be replace by a closure of the tmp files -extern __file_rec *__file_rec_list; - -int _rmtmp( void ) -{ -/* -loop files and check for name_to_remove -*/ - __file_rec *fr = __file_rec_list; - __file_rec **last_fr = &__file_rec_list; - - int total_closed = 0; - int i = 0; - char temp_name[260]; - - /* Try to find an empty slot */ - while (fr) - { - last_fr = &(fr->next); - - /* If one of the existing slots is available, return it */ - for (i=0; icount; i++) { - if (fr->files[i]->_name_to_remove != NULL) { - if ( _access(fr->files[i]->_name_to_remove,W_OK) ) { - strcpy(temp_name,fr->files[i]->_name_to_remove); - fclose(fr->files[i]); - remove(temp_name); - total_closed++; - } - } - } - - /* If this one is full, go to the next */ - if (fr->count == __FILE_REC_MAX) - fr = fr->next; - else - /* it isn't full, we can add to it */ - break; - } - return total_closed; -} diff --git a/reactos/lib/msvcrt/stdio/scanf.c b/reactos/lib/msvcrt/stdio/scanf.c deleted file mode 100644 index 9cdc4d82172..00000000000 --- a/reactos/lib/msvcrt/stdio/scanf.c +++ /dev/null @@ -1,64 +0,0 @@ -/* Copyright (C) 1991, 1995, 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. - -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -The GNU C 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include -#include -#include -#include -#include - - -/* Read formatted input from stdin according to the format string FORMAT. */ -/* VARARGS1 */ -/* - * @implemented - */ -int scanf(const char *format, ...) -{ - va_list arg; - int done; - - va_start(arg, format); - done = __vscanf(format, arg); - va_end(arg); - - return done; -} - -/* - * @implemented - */ -int -wscanf(const wchar_t *fmt, ...) -{ - va_list arg; - int done; - char *f; - int i, len = wcslen(fmt); - - f = malloc(len+1); - for(i=0;i -#include -#include - -/* - * @implemented - */ -void setbuf(FILE *f, char *buf) -{ - if (buf) - setvbuf(f, buf, _IOFBF, BUFSIZ); - else - setvbuf(f, 0, _IONBF, BUFSIZ); -} diff --git a/reactos/lib/msvcrt/stdio/setvbuf.c b/reactos/lib/msvcrt/stdio/setvbuf.c deleted file mode 100644 index d0dadf0c786..00000000000 --- a/reactos/lib/msvcrt/stdio/setvbuf.c +++ /dev/null @@ -1,69 +0,0 @@ -/* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ -/* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include -#include -#include -#include -#include - - -/* - * @implemented - */ -int setvbuf(FILE *f, char *buf, int type, size_t len) -{ - int mine=0; - if (!__validfp (f) ) { - __set_errno (EINVAL); - return 0; - } - if ( f->_base != NULL ) - fflush(f); - /* Cannot use _IOLBF as flag value because _IOLBF is equal to _IOSTRG */ - if (type == _IOLBF) - type = _IO_LBF; - - switch (type) - { - case _IOFBF: - case _IO_LBF: - if (len <= 0) { - __set_errno (EINVAL); - return EOF; - } - if (buf == 0) - { - buf = (char *)malloc(len+1); - if (buf == NULL) { - __set_errno (ENOMEM); - return -1; - } - mine = 1; - } - /* FALLTHROUGH */ - case _IONBF: - if (f->_base != NULL && f->_flag & _IOMYBUF) - free(f->_base); - f->_cnt = 0; - - f->_flag &= ~(_IONBF|_IOFBF|_IO_LBF|_IOUNGETC); - f->_flag |= type; - if (type != _IONBF) - { - if (mine) - f->_flag |= _IOMYBUF; - f->_ptr = f->_base = buf; - f->_bufsiz = len; - } - else - { - f->_base = 0; - f->_bufsiz = 0; - } - return 0; - default: - __set_errno (EINVAL); - return EOF; - } -} diff --git a/reactos/lib/msvcrt/stdio/sprintf.c b/reactos/lib/msvcrt/stdio/sprintf.c deleted file mode 100644 index 6a020ae06d8..00000000000 --- a/reactos/lib/msvcrt/stdio/sprintf.c +++ /dev/null @@ -1,96 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ - -/* Copyright (C) 1991, 1995 Free Software Foundation, Inc. -This file is part of the GNU C Library. - -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -The GNU C 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include -#include -#include -#include -#include - -#undef sprintf -#undef wsprintf -/* - * @implemented - */ -int -sprintf(char *str, const char *fmt, ...) -{ - va_list arg; - int done; - - va_start (arg, fmt); - done = vsprintf (str, fmt, arg); - va_end (arg); - return done; -} - -/* - * @implemented - */ -int -swprintf(wchar_t *str, const wchar_t *fmt, ...) -{ - va_list arg; - int done; - - va_start (arg, fmt); - done = vswprintf (str, fmt, arg); - va_end (arg); - return done; -} - - - -/* Write formatted output into S, according to the format - string FORMAT, writing no more than MAXLEN characters. */ -/* VARARGS3 */ -/* - * @implemented - */ -int -_snprintf (char *s, size_t maxlen,const char *format, ...) -{ - va_list arg; - int done; - - va_start (arg, format); - done = _vsnprintf (s, maxlen, format, arg); - va_end (arg); - - return done; -} - -/* - * @implemented - */ -int -_snwprintf (wchar_t *s, size_t maxlen,const wchar_t *format, ...) -{ - va_list arg; - int done; - - va_start (arg, format); - done = _vsnwprintf (s, maxlen, format, arg); - va_end (arg); - - return done; -} - - diff --git a/reactos/lib/msvcrt/stdio/sscanf.c b/reactos/lib/msvcrt/stdio/sscanf.c deleted file mode 100644 index 7868addf516..00000000000 --- a/reactos/lib/msvcrt/stdio/sscanf.c +++ /dev/null @@ -1,71 +0,0 @@ -/* Copyright (C) 1991, 1995, 1996 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - The GNU C 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include -#include -#include -#include -#include - - -/* Read formatted input from S, according to the format string FORMAT. */ -/* VARARGS2 */ -/* - * @implemented - */ -int sscanf (const char *s,const char *format, ...) -{ - va_list arg; - int done; - - va_start (arg, format); - done = __vsscanf (s, format, arg); - va_end (arg); - - return done; -} - -/* - * @implemented - */ -int swscanf(const wchar_t *str, const wchar_t *fmt, ...) -{ - va_list arg; - int done; - char *f , *s; - int i,len = wcslen(fmt); - - f = malloc(len+1); - for(i=0;i -#include - -FILE _iob[5] = -{ - // stdin -{ - NULL, 0, NULL, - _IOREAD | _IO_LBF , - 0, 0,0, NULL -}, - // stdout -{ - NULL, 0, NULL, - _IOWRT | _IO_LBF |_IOSTRG, - 1,0,0, NULL -}, - // stderr -{ - NULL, 0, NULL, - _IOWRT | _IONBF, - 2,0,0, NULL -}, - // stdaux -{ - NULL, 0, NULL, - _IOREAD | _IOWRT | _IONBF, - 3,0,0, NULL -}, - // stdprn -{ - NULL, 0, NULL, - _IOWRT | _IONBF, - 4, 0,0,NULL -} -}; - -/* - * @implemented - */ -FILE *__p__iob(void) -{ - return &_iob[0]; -} diff --git a/reactos/lib/msvcrt/stdio/tempnam.c b/reactos/lib/msvcrt/stdio/tempnam.c deleted file mode 100644 index 294a51cc202..00000000000 --- a/reactos/lib/msvcrt/stdio/tempnam.c +++ /dev/null @@ -1,30 +0,0 @@ -#include "precomp.h" -#include -#include - - -/* - * @implemented - */ -char* _tempnam(const char* dir,const char* prefix) -{ - char* TempFileName = malloc(MAX_PATH); - char* d; - - if (dir == NULL) - d = getenv("TMP"); - else - d = (char*)dir; - -#ifdef _MSVCRT_LIB_ // TODO: check on difference? - if (GetTempFileNameA(d, prefix, 1, TempFileName) == 0) { -#else// TODO: FIXME: review which is correct - if (GetTempFileNameA(d, prefix, 0, TempFileName) == 0) { -#endif /*_MSVCRT_LIB_*/ - - free(TempFileName); - return NULL; - } - - return TempFileName; -} diff --git a/reactos/lib/msvcrt/stdio/tmpfile.c b/reactos/lib/msvcrt/stdio/tmpfile.c deleted file mode 100644 index b188dece4a3..00000000000 --- a/reactos/lib/msvcrt/stdio/tmpfile.c +++ /dev/null @@ -1,70 +0,0 @@ -/* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ -/* Copyright (C) 1997 DJ Delorie, see COPYING.DJ for details */ -/* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ -/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ - -#include -#include -#include -#include -#include -//#include -#include -#include -#include - - -FILE * __alloc_file(void); - -/* - * @implemented - */ -FILE * -tmpfile(void) -{ - int temp_fd; - FILE *f; - char *temp_name = tmpnam(0); - char *n_t_r = (char *)malloc(L_tmpnam); - - if (!n_t_r) - return 0; - - /* We could have a race condition, whereby another program - (in another virtual machine, or if the temporary file is - in a directory which is shared via a network) opens the - file returned by `tmpnam' between the call above and the - moment when we actually open the file below. This loop - retries the call to `tmpnam' until we actually succeed - to create the file which didn't exist before. */ - do { - // __set_errno ( 0 ); - temp_fd = _open(temp_name, 0, SH_DENYRW); - // if ( *_errno() == ENOENT ) -// break; - } while (temp_fd == -1 && (temp_name = tmpnam(0)) != 0); - - if (temp_name == 0) - return 0; - - /* This should have been fdopen(temp_fd, "wb+"), but `fdopen' - is non-ANSI. So we need to dump some of its guts here. Sigh... */ - f = __alloc_file(); - if (f) - { - f->_file = temp_fd; - f->_cnt = 0; - f->_bufsiz = 0; - f->_flag = _IORMONCL | _IOREAD | _IOWRT; - f->_name_to_remove = n_t_r; - strcpy(f->_name_to_remove, temp_name); - f->_base = f->_ptr = NULL; - } - else - { - close(temp_fd); - remove(temp_name); - free(n_t_r); - } - return f; -} diff --git a/reactos/lib/msvcrt/stdio/tmpnam.c b/reactos/lib/msvcrt/stdio/tmpnam.c deleted file mode 100644 index b59075335c6..00000000000 --- a/reactos/lib/msvcrt/stdio/tmpnam.c +++ /dev/null @@ -1,19 +0,0 @@ -#include "precomp.h" -#include -#include - - -/* - * @implemented - */ -char* tmpnam(char* s) -{ - char PathName[MAX_PATH]; - static char static_buf[MAX_PATH]; - - GetTempPathA(MAX_PATH, PathName); - GetTempFileNameA(PathName, "ARI", 007, static_buf); - strcpy(s,static_buf); - - return s; -} diff --git a/reactos/lib/msvcrt/stdio/ungetc.c b/reactos/lib/msvcrt/stdio/ungetc.c deleted file mode 100644 index cb5340bd66e..00000000000 --- a/reactos/lib/msvcrt/stdio/ungetc.c +++ /dev/null @@ -1,76 +0,0 @@ -/* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include -#include -#include -#include - - -/* - * @implemented - */ -int ungetc(int c, FILE *f) -{ - if (!__validfp (f) || !OPEN4READING(f)) { - __set_errno (EINVAL); - return EOF; - } - - if (c == EOF) - return EOF; - - if (f->_ptr == NULL || f->_base == NULL) - return EOF; - - if (f->_ptr == f->_base) - { - if (f->_cnt == 0) - f->_ptr++; - else - return EOF; - } - - f->_cnt++; - f->_ptr--; - if (*f->_ptr != c) - { - f->_flag |= _IOUNGETC; - *f->_ptr = c; - } - return c; -} - - -/* - * @implemented - */ -wint_t -ungetwc(wchar_t c, FILE *f) -{ - if (!__validfp (f) || !OPEN4READING(f)) { - __set_errno(EINVAL); - return EOF; - } - - if (c == (wchar_t)EOF) - return EOF; - - if (f->_ptr == NULL || f->_base == NULL) - return EOF; - - if (f->_ptr == f->_base) - { - if (f->_cnt == 0) - f->_ptr+=sizeof(wchar_t); - else - return EOF; - } - - f->_cnt+=sizeof(wchar_t); - f->_ptr-=sizeof(wchar_t); - - f->_flag |= _IOUNGETC; - *((wchar_t *)(f->_ptr)) = c; - - return c; -} diff --git a/reactos/lib/msvcrt/stdio/vfprintf.c b/reactos/lib/msvcrt/stdio/vfprintf.c deleted file mode 100644 index a6a060134ed..00000000000 --- a/reactos/lib/msvcrt/stdio/vfprintf.c +++ /dev/null @@ -1,1111 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include -#include -#include -#include - -#ifdef __USE_W32API -#include -#endif - -int _isnanl(double x); -int _isinfl(double x); -int _isnan(double x); -int _isinf(double x); - - - -int __vfprintf(FILE*, const char*, va_list); - - -/* - * @implemented - */ -int vfprintf(FILE* f, const char* fmt, va_list ap) -{ - int len; - char localbuf[BUFSIZ]; - -#if 0 - __fileno_lock(fileno(f)); -#endif - if (f->_flag & _IONBF) { - f->_flag &= ~_IONBF; - f->_ptr = f->_base = localbuf; - f->_bufsiz = BUFSIZ; - len = __vfprintf(f, fmt, ap); - (void)fflush(f); - f->_flag |= _IONBF; - f->_base = NULL; - f->_bufsiz = 0; - f->_cnt = 0; - } else { - len = __vfprintf(f,fmt, ap); - } -#if 0 - __fileno_unlock(fileno(f)); -#endif - return (ferror(f) ? EOF : len); -} - - -/* - * linux/lib/vsprintf.c - * - * Copyright (C) 1991, 1992 Linus Torvalds - */ - -/* vsprintf.c -- Lars Wirzenius & Linus Torvalds. */ -/* - * Wirzenius wrote this portably, Torvalds fucked it up :-) - */ - -/* - * Appropiated for the reactos kernel, March 1998 -- David Welch - */ - -#include - -#include -#include -#include -#include -#include -#include - - -#define ZEROPAD 1 /* pad with zero */ -#define SIGN 2 /* unsigned/signed long */ -#define PLUS 4 /* show plus */ -#define SPACE 8 /* space if plus */ -#define LEFT 16 /* left justified */ -#define SPECIAL 32 /* 0x */ -#define LARGE 64 /* use 'ABCDEF' instead of 'abcdef' */ -#define ZEROTRUNC 128 /* truncate zero 's */ - - -static int skip_atoi(const char **s) -{ - int i=0; - - while (isdigit(**s)) - i = i*10 + *((*s)++) - '0'; - return i; -} - - -static int do_div(LONGLONG *n,int base) -{ - int __res = ((ULONGLONG) *n) % (unsigned) base; - *n = ((ULONGLONG) *n) / (unsigned) base; - return __res; -} - - -static int number(FILE * f, LONGLONG num, int base, int size, int precision ,int type) -{ - char c,sign,tmp[66]; - const char *digits="0123456789abcdefghijklmnopqrstuvwxyz"; - int i, done = 0; - - if (type & LARGE) - digits = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; - if (type & LEFT) - type &= ~ZEROPAD; - if (base < 2 || base > 36) - return done; - c = (type & ZEROPAD) ? '0' : ' '; - sign = 0; - if (type & SIGN) { - if (num < 0) { - sign = '-'; - num = -num; - size--; - } else if (type & PLUS) { - sign = '+'; - size--; - } else if (type & SPACE) { - sign = ' '; - size--; - } - } - if (type & SPECIAL) { - if (base == 16) - size -= 2; - else if (base == 8) - size--; - } - i = 0; - if (num == 0) - tmp[i++]='0'; - else while (num != 0) - tmp[i++] = digits[do_div(&num,base)]; - if (i > precision) - precision = i; - size -= precision; - if (!(type&(ZEROPAD+LEFT))) - while(size-->0) - { - if (putc(' ',f) == EOF) - return -1; - done++; - } - if (sign) - { - if (putc(sign,f) == EOF) - return -1; - done++; - } - if (type & SPECIAL) { - if (base==8) { - if (putc('0',f) == EOF) - return -1; - done++; - } - else if (base==16) { - if (putc('0', f) == EOF) - return -1; - done++; - if (putc(digits[33],f) == EOF) - return -1; - done++; - } - } - if (!(type & LEFT)) - while (size-- > 0) - { - if (putc(c,f) == EOF) - return -1; - done++; - } - while (i < precision--) - { - if (putc('0', f) == EOF) - return -1; - done++; - } - while (i-- > 0) - { - if (putc(tmp[i],f) == EOF) - return -1; - done++; - } - while (size-- > 0) - { - if (putc(' ', f) == EOF) - return -1; - done++; - } - return done; -} - - -static int numberf(FILE * f, double __n, char exp_sign, int size, int precision, int type) -{ - double exponent = 0.0; - double e; - long ie; - - //int x; - char *buf, *tmp; - int i = 0; - int j = 0; - //int k = 0; - - double frac, intr; - double p; - char sign; - char c; - char ro = 0; - int result, done = 0; - - union - { - double* __n; - double_t* n; - } n; - - n.__n = &__n; - - if ( exp_sign == 'g' || exp_sign == 'G' || exp_sign == 'e' || exp_sign == 'E' ) { - ie = ((unsigned int)n.n->exponent - (unsigned int)0x3ff); - exponent = ie/3.321928; - } - - if ( exp_sign == 'g' || exp_sign == 'G' ) { - type |= ZEROTRUNC; - if ( exponent < -4 || fabs(exponent) >= precision ) - exp_sign -= 2; // g -> e and G -> E - } - - if ( exp_sign == 'e' || exp_sign == 'E' ) { - frac = modf(exponent,&e); - if ( frac > 0.5 ) - e++; - else if ( frac < -0.5 ) - e--; - - result = numberf(f,__n/pow(10.0L,e),'f',size-4, precision, type); - if (result < 0) - return -1; - done += result; - if (putc( exp_sign,f) == EOF) - return -1; - done++; - size--; - ie = (long)e; - type = LEFT | PLUS; - if ( ie < 0 ) - type |= SIGN; - - result = number(f,ie, 10,2, 2,type ); - if (result < 0) - return -1; - done += result; - return done; - } - - if ( exp_sign == 'f' ) { - buf = alloca(4096); - if (type & LEFT) { - type &= ~ZEROPAD; - } - - c = (type & ZEROPAD) ? '0' : ' '; - sign = 0; - if (type & SIGN) { - if (__n < 0) { - sign = '-'; - __n = fabs(__n); - size--; - } else if (type & PLUS) { - sign = '+'; - size--; - } else if (type & SPACE) { - sign = ' '; - size--; - } - } - - frac = modf(__n,&intr); - - // # flags forces a . and prevents trucation of trailing zero's - - if ( precision > 0 ) { - //frac = modfl(__n,&intr); - i = precision-1; - while ( i >= 0 ) { - frac*=10.0L; - frac = modf(frac, &p); - buf[i] = (int)p + '0'; - i--; - } - i = precision; - size -= precision; - - ro = 0; - if ( frac > 0.5 ) { - ro = 1; - } - - if ( precision >= 1 || type & SPECIAL) { - buf[i++] = '.'; - size--; - } - } - - if ( intr == 0.0 ) { - buf[i++] = '0'; - size--; - } - else { - while ( intr > 0.0 ) { - p = intr; - intr/=10.0L; - modf(intr, &intr); - - p -= 10.0*intr; - - buf[i++] = (int)p + '0'; - size--; - } - } - - j = 0; - while ( j < i && ro == 1) { - if ( buf[j] >= '0' && buf[j] <= '8' ) { - buf[j]++; - ro = 0; - } - else if ( buf[j] == '9' ) { - buf[j] = '0'; - } - j++; - } - if ( ro == 1 ) - buf[i++] = '1'; - - buf[i] = 0; - - size -= precision; - if (!(type&(ZEROPAD+LEFT))) - while(size-->0) - { - if (putc(' ',f) == EOF) - return -1; - done++; - } - if (sign) - { - if (putc( sign,f) == EOF) - return -1; - done++; - } - - if (!(type&(ZEROPAD+LEFT))) - while(size-->0) - { - if (putc(' ',f) == EOF) - return -1; - done++; - } - if (type & SPECIAL) { - } - - if (!(type & LEFT)) - while (size-- > 0) - { - if (putc(c,f) == EOF) - return -1; - done++; - } - - tmp = buf; - if ( type & ZEROTRUNC && ((type & SPECIAL) != SPECIAL) ) { - j = 0; - while ( j < i && ( *tmp == '0' || *tmp == '.' )) { - tmp++; - i--; - } - } -// else -// while (i < precision--) -// putc('0', f); - while (i-- > 0) - { - if (putc(tmp[i],f) == EOF) - return -1; - done++; - } - while (size-- > 0) - { - if (putc(' ', f) == EOF) - return -1; - done++; - } - } - return done; -} - - -static int numberfl(FILE * f, long double __n, char exp_sign, int size, int precision, int type) -{ - long double exponent = 0.0; - long double e; - long ie; - - //int x; - char *buf, *tmp; - int i = 0; - int j = 0; - //int k = 0; - - long double frac, intr; - long double p; - char sign; - char c; - char ro = 0; - - int result, done = 0; - - union - { - long double* __n; - long_double_t* n; - } n; - - n.__n = &__n; - - if ( exp_sign == 'g' || exp_sign == 'G' || exp_sign == 'e' || exp_sign == 'E' ) { - ie = ((unsigned int)n.n->exponent - (unsigned int)0x3fff); - exponent = ie/3.321928; - } - - if ( exp_sign == 'g' || exp_sign == 'G' ) { - type |= ZEROTRUNC; - if ( exponent < -4 || fabs(exponent) >= precision ) - exp_sign -= 2; // g -> e and G -> E - } - - if ( exp_sign == 'e' || exp_sign == 'E' ) { - frac = modfl(exponent,&e); - if ( frac > 0.5 ) - e++; - else if ( frac < -0.5 ) - e--; - - result = numberf(f,__n/powl(10.0L,e),'f',size-4, precision, type); - if (result < 0) - return -1; - done += result; - if (putc( exp_sign,f) == EOF) - return -1; - done++; - size--; - ie = (long)e; - type = LEFT | PLUS; - if ( ie < 0 ) - type |= SIGN; - - result = number(f,ie, 10,2, 2,type ); - if (result < 0) - return -1; - done += result; - return done; - } - - if ( exp_sign == 'f' ) { - - buf = alloca(4096); - if (type & LEFT) { - type &= ~ZEROPAD; - } - - c = (type & ZEROPAD) ? '0' : ' '; - sign = 0; - if (type & SIGN) { - if (__n < 0) { - sign = '-'; - __n = fabs(__n); - size--; - } else if (type & PLUS) { - sign = '+'; - size--; - } else if (type & SPACE) { - sign = ' '; - size--; - } - } - - frac = modfl(__n,&intr); - - // # flags forces a . and prevents trucation of trailing zero's - if ( precision > 0 ) { - //frac = modfl(__n,&intr); - - i = precision-1; - while ( i >= 0 ) { - frac*=10.0L; - frac = modfl((long double)frac, &p); - buf[i] = (int)p + '0'; - i--; - } - i = precision; - size -= precision; - - ro = 0; - if ( frac > 0.5 ) { - ro = 1; - } - - if ( precision >= 1 || type & SPECIAL) { - buf[i++] = '.'; - size--; - } - } - - if ( intr == 0.0 ) { - buf[i++] = '0'; - size--; - } - else { - while ( intr > 0.0 ) { - p=intr; - intr/=10.0L; - modfl(intr, &intr); - - p -= 10.0L*intr; - - buf[i++] = (int)p + '0'; - size--; - } - } - - j = 0; - while ( j < i && ro == 1) { - if ( buf[j] >= '0' && buf[j] <= '8' ) { - buf[j]++; - ro = 0; - } - else if ( buf[j] == '9' ) { - buf[j] = '0'; - } - j++; - } - if ( ro == 1 ) - buf[i++] = '1'; - - buf[i] = 0; - - size -= precision; - if (!(type&(ZEROPAD+LEFT))) - while(size-->0) - { - if (putc(' ',f) == EOF) - return -1; - done++; - } - if (sign) - { - if (putc(sign,f) == EOF) - return -1; - done++; - } - - if (!(type&(ZEROPAD+LEFT))) - while(size-->0) - { - if (putc(' ',f) == EOF) - return -1; - done++; - } - if (type & SPECIAL) { - } - - if (!(type & LEFT)) - while (size-- > 0) - { - if (putc(c,f) == EOF) - return -1; - done++; - } - tmp = buf; - if ( type & ZEROTRUNC && ((type & SPECIAL) != SPECIAL) ) { - j = 0; - while ( j < i && ( *tmp == '0' || *tmp == '.' )) { - tmp++; - i--; - } - } -// else -// while (i < precision--) -// putc( '0', f); - while (i-- > 0) - { - if ( putc(tmp[i],f) == EOF) - return -1; - done++; - } - while (size-- > 0) - { - if (putc(' ', f) == EOF) - return -1; - done++; - } - } - return done; -} - -static int string(FILE *f, const char* s, int len, int field_width, int precision, int flags) -{ - int i, done = 0; - if (s == NULL) - { - s = ""; - len = 6; - } - else - { - if (len == -1) - { - len = 0; - while ((unsigned int)len < (unsigned int)precision && s[len]) - len++; - } - else - { - if ((unsigned int)len > (unsigned int)precision) - len = precision; - } - } - if (!(flags & LEFT)) - while (len < field_width--) - { - if (putc(' ', f) == EOF) - return -1; - done++; - } - for (i = 0; i < len; ++i) - { - if (putc(*s++, f) == EOF) - return -1; - done++; - } - while (len < field_width--) - { - if (putc(' ', f) == EOF) - return -1; - done++; - } - return done; -} - -static int stringw(FILE *f, const wchar_t* sw, int len, int field_width, int precision, int flags) -{ - int i, done = 0; - if (sw == NULL) - { - sw = L""; - len = 6; - } - else - { - if (len == -1) - { - len = 0; - while ((unsigned int)len < (unsigned int)precision && sw[len]) - len++; - } - else - { - if ((unsigned int)len > (unsigned int)precision) - len = precision; - } - } - if (!(flags & LEFT)) - while (len < field_width--) - { - if (putc(' ', f) == EOF) - return -1; - done++; - } - for (i = 0; i < len; ++i) - { -#define MB_CUR_MAX 1 - char mb[MB_CUR_MAX]; - int mbcount, j; - mbcount = wctomb(mb, *sw++); - if (mbcount <= 0) - { - break; - } - for (j = 0; j < mbcount; j++) - { - if (putc(mb[j], f) == EOF) - return -1; - done++; - } - } - while (len < field_width--) - { - if (putc(' ', f) == EOF) - return -1; - done++; - } - return done; -} - -int __vfprintf(FILE *f, const char *fmt, va_list args) -{ - int len; - ULONGLONG num; - int base; - long double _ldouble; - double _double; - const char *s; - const wchar_t *sw; - int result, done = 0; - - int flags; /* flags to number() */ - - int field_width; /* width of output field */ - int precision; /* min. # of digits for integers; max - number of chars for from string */ - int qualifier = 0; /* 'h', 'l', 'L' or 'I64' for integer fields */ - - for (; *fmt ; ++fmt) { - if (*fmt != '%') { - if (putc(*fmt,f) == EOF) - return -1; - done++; - continue; - } - - /* process flags */ - flags = 0; - repeat: - ++fmt; /* this also skips first '%' */ - switch (*fmt) { - case '-': flags |= LEFT; goto repeat; - case '+': flags |= PLUS; goto repeat; - case ' ': flags |= SPACE; goto repeat; - case '#': flags |= SPECIAL; goto repeat; - case '0': flags |= ZEROPAD; goto repeat; - } - - /* get field width */ - field_width = -1; - if (isdigit(*fmt)) - field_width = skip_atoi(&fmt); - else if (*fmt == '*') { - ++fmt; - /* it's the next argument */ - field_width = va_arg(args, int); - if (field_width < 0) { - field_width = -field_width; - flags |= LEFT; - } - } - - /* get the precision */ - precision = -1; - if (*fmt == '.') { - ++fmt; - if (isdigit(*fmt)) - precision = skip_atoi(&fmt); - else if (*fmt == '*') { - ++fmt; - /* it's the next argument */ - precision = va_arg(args, int); - } - if (precision < 0) - precision = 0; - } - - /* get the conversion qualifier */ - qualifier = 0; - // %Z can be just stand alone or as size_t qualifier - if ( *fmt == 'Z' ) { - qualifier = *fmt; - switch ( *(fmt+1)) { - case 'o': - case 'b': - case 'X': - case 'x': - case 'd': - case 'i': - case 'u': - ++fmt; - break; - default: - break; - } - } else if (*fmt == 'h' || *fmt == 'l' || *fmt == 'L' || *fmt == 'w') { - qualifier = *fmt; - ++fmt; - } else if (*fmt == 'I' && *(fmt+1) == '6' && *(fmt+2) == '4') { - qualifier = *fmt; - fmt += 3; - } - - // go fine with ll instead of L - if ( *fmt == 'l' ) { - ++fmt; - qualifier = 'L'; - } - - /* default base */ - base = 10; - - switch (*fmt) { - case 'c': - if (!(flags & LEFT)) - while (--field_width > 0) - { - if (putc(' ', f) == EOF) - return -1; - done++; - } - if (qualifier == 'l' || qualifier == 'w') - { - if (putc((unsigned char)(wchar_t) va_arg(args, int), f) == EOF) - return -1; - done++; - } - else - { - if (putc((unsigned char) va_arg(args, int), f) == EOF) - return -1; - done++; - } - while (--field_width > 0) - { - if (putc(' ', f) == EOF) - return -1; - done++; - } - continue; - - case 'C': - if (!(flags & LEFT)) - while (--field_width > 0) - { - if (putc(' ', f) == EOF) - return -1; - done++; - } - if (qualifier == 'h') - { - if (putc((unsigned char) va_arg(args, int), f) == EOF) - return -1; - done++; - } - else - { - if (putc((unsigned char)(wchar_t) va_arg(args, int), f) == EOF) - return -1; - done++; - } - while (--field_width > 0) - { - if (putc(' ', f) == EOF) - return -1; - done++; - } - continue; - - case 's': - if (qualifier == 'l' || qualifier == 'w') { - /* print unicode string */ - sw = va_arg(args, wchar_t *); - result = stringw(f, sw, -1, field_width, precision, flags); - } else { - /* print ascii string */ - s = va_arg(args, char *); - result = string(f, s, -1, field_width, precision, flags); - } - if (result < 0) - return -1; - done += result; - continue; - - case 'S': - if (qualifier == 'h') { - /* print ascii string */ - s = va_arg(args, char *); - result = string(f, s, -1, field_width, precision, flags); - } else { - /* print unicode string */ - sw = va_arg(args, wchar_t *); - result = stringw(f, sw, -1, field_width, precision, flags); - } - if (result < 0) - return -1; - done += result; - continue; - - case 'Z': - if (qualifier == 'w') { - /* print counted unicode string */ - PUNICODE_STRING pus = va_arg(args, PUNICODE_STRING); - if ((pus == NULL) || (pus->Buffer == NULL)) { - sw = NULL; - len = -1; - } else { - sw = pus->Buffer; - len = pus->Length / sizeof(WCHAR); - } - result = stringw(f, sw, len, field_width, precision, flags); - } else { - /* print counted ascii string */ - PANSI_STRING pas = va_arg(args, PANSI_STRING); - if ((pas == NULL) || (pas->Buffer == NULL)) { - s = NULL; - len = -1; - } else { - s = pas->Buffer; - len = pas->Length; - } - result = string(f, s, -1, field_width, precision, flags); - } - if (result < 0) - return -1; - done += result; - continue; - - case 'e': - case 'E': - case 'f': - case 'g': - case 'G': - if (qualifier == 'l' || qualifier == 'L' ) { - _ldouble = va_arg(args, long double); - - if ( _isnanl(_ldouble) ) { - s = "Nan"; - len = 3; - while ( len > 0 ) { - if (putc(*s++,f) == EOF) - return -1; - done++; - len --; - } - } - else if ( _isinfl(_ldouble) < 0 ) { - s = "-Inf"; - len = 4; - while ( len > 0 ) { - if (putc(*s++,f) == EOF) - return -1; - done++; - len --; - } - } - else if ( _isinfl(_ldouble) > 0 ) { - s = "+Inf"; - len = 4; - while ( len > 0 ) { - if (putc(*s++,f) == EOF) - return -1; - done++; - len --; - } - } else { - if ( precision == -1 ) - precision = 6; - result = numberfl(f,_ldouble,*fmt,field_width,precision,flags); - if (result < 0) - return -1; - done += result; - } - } else { - _double = (double)va_arg(args, double); - - if ( _isnan(_double) ) { - s = "Nan"; - len = 3; - while ( len > 0 ) { - if (putc(*s++,f) == EOF) - return -1; - done++; - len --; - } - } else if ( _isinf(_double) < 0 ) { - s = "-Inf"; - len = 4; - while ( len > 0 ) { - if (putc(*s++,f) == EOF) - return -1; - done++; - len --; - } - } else if ( _isinf(_double) > 0 ) { - s = "+Inf"; - len = 4; - while ( len > 0 ) { - if (putc(*s++,f) == EOF) - return -1; - done++; - len --; - } - } else { - if ( precision == -1 ) - precision = 6; - result = numberf(f,_double,*fmt,field_width,precision,flags); - if (result < 0) - return -1; - done += result; - } - } - continue; - - case 'p': - if (field_width == -1) { - field_width = 2*sizeof(void *); - flags |= ZEROPAD; - } - result = number(f, - (unsigned long) va_arg(args, void *), 16, - field_width, precision, flags); - if (result < 0) - return -1; - done += result; - continue; - - case 'n': - if (qualifier == 'l') { - long * ip = va_arg(args, long *); - *ip = 0; - } else { - int * ip = va_arg(args, int *); - *ip = 0; - } - continue; - - /* integer number formats - set up the flags and "break" */ - case 'o': - base = 8; - break; - - case 'b': - base = 2; - break; - - case 'X': - flags |= LARGE; - case 'x': - base = 16; - break; - - case 'd': - case 'i': - flags |= SIGN; - case 'u': - break; - - default: - if (*fmt != '%') - { - if (putc('%', f) == EOF) - return -1; - done++; - } - if (*fmt) - { - if (putc(*fmt, f) == EOF) - return -1; - done++; - } - else - --fmt; - continue; - } - - if (qualifier == 'I') - num = va_arg(args, ULONGLONG); - else if (qualifier == 'l') { - if (flags & SIGN) - num = va_arg(args, long); - else - num = va_arg(args, unsigned long); - } - else if (qualifier == 'h') { - if (flags & SIGN) - num = va_arg(args, int); - else - num = va_arg(args, unsigned int); - } - else if (flags & SIGN) - num = va_arg(args, int); - else - num = va_arg(args, unsigned int); - result = number(f, num, base, field_width, precision, flags); - if (result < 0) - return -1; - done += result; - } - //putc('\0',f); - return done; -} - -/* EOF */ diff --git a/reactos/lib/msvcrt/stdio/vfscanf.c b/reactos/lib/msvcrt/stdio/vfscanf.c deleted file mode 100644 index 8bd49b7d001..00000000000 --- a/reactos/lib/msvcrt/stdio/vfscanf.c +++ /dev/null @@ -1,1208 +0,0 @@ -/* Copyright (C) 1991, 92, 93, 94, 95, 96, 97 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - The GNU C 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef __USE_W32API -int __set_errno(int err); -#else -#include -#endif - -/* The internal entry points for `strtoX' take an extra flag argument - saying whether or not to parse locale-dependent number grouping. */ - -double __strtod_internal (const char *__nptr,char **__endptr, int __group); -float __strtof_internal (const char *__nptr, char **__endptr,int __group); -long double __strtold_internal (const char *__nptr,char **__endptr, int __group); -long int __strtol_internal (const char *__nptr, char **__endptr, int __base, int __group); -unsigned long int __strtoul_internal (const char *__nptr, char **__endptr, int __base, int __group); - - -#include // robd -//#ifdef __GNUC__ -//#define HAVE_LONGLONG -//#define LONGLONG LONGLONG -//#else -//#define LONGLONG long -//#endif - -/* Those are flags in the conversion format. */ -# define LONG 0x001 /* l: long or double */ -# define LONGDBL 0x002 /* L: LONGLONG or long double */ -# define SHORT 0x004 /* h: short */ -# define SUPPRESS 0x008 /* *: suppress assignment */ -# define POINTER 0x010 /* weird %p pointer (`fake hex') */ -# define NOSKIP 0x020 /* do not skip blanks */ -# define WIDTH 0x040 /* width was given */ -# define GROUP 0x080 /* ': group numbers */ -# define MALLOC 0x100 /* a: malloc strings */ - -# define TYPEMOD (LONG|LONGDBL|SHORT) - - -# define UNGETC(c, s) ((void) (((wint_t)c) != ((wint_t)EOF) && --read_in), ungetc (c, s)) -# define inchar() ((c = getc (s)), (void) (c != EOF && ++read_in), c) -# define encode_error() do { \ - funlockfile (s); \ - __set_errno (EILSEQ); \ - return done; \ - } while (0) -# define conv_error() do { \ - funlockfile (s); \ - return done; \ - } while (0) -# define input_error() do { \ - funlockfile (s); \ - return done ? 0 : EOF; \ - } while (0) -# define memory_error() do { \ - funlockfile (s); \ - __set_errno (ENOMEM); \ - return EOF; \ - } while (0) -# define ARGCHECK(s, format) \ - do \ - { \ - /* Check file argument for consistence. */ \ - if (!__validfp (s) || !s->__mode.__read) \ - { \ - __set_errno (EBADF); \ - return EOF; \ - } \ - else if (format == NULL) \ - { \ - __set_errno (EINVAL); \ - return EOF; \ - } \ - } while (0) - -# define flockfile(S) /* nothing */ -# define funlockfile(S) /* nothing */ - -# define ADDW(Ch) \ -do{ \ - if (wpsize == wpmax) \ - { \ - char *old = wp; \ - wpmax = UCHAR_MAX > 2 * wpmax ? UCHAR_MAX : 2 * wpmax; \ - wp = (char *) malloc (wpmax); \ - if (old != NULL) \ - { \ - memcpy (wp, old, wpsize); \ - free(old); \ - } \ - } \ - wp[wpsize++] = (Ch); \ -}while(0) - - -int __vfscanf (FILE *s, const char *format, va_list argptr) -{ - va_list arg; - register const char *f = format; - register unsigned char fc; /* Current character of the format. */ - register size_t done = 0; /* Assignments done. */ - register size_t read_in = 0; /* Chars read in. */ - register int c = 0; /* Last char read. */ - register int width; /* Maximum field width. */ - register int flags; /* Modifiers for current format element. */ - - /* Status for reading F-P nums. */ - char got_dot, got_e, negative; - /* If a [...] is a [^...]. */ - char not_in; - /* Base for integral numbers. */ - int base; - /* Signedness for integral numbers. */ - int number_signed; - /* Decimal point character. */ - wchar_t decimal = '.'; - /* The thousands character of the current locale. */ - wchar_t thousands = ','; - /* Integral holding variables. */ - union - { - LONGLONG q; - ULONGLONG uq; - long int l; - unsigned long int ul; - } num; - /* Character-buffer pointer. */ - char *str = NULL; - wchar_t *wstr = NULL; - char **strptr = NULL; - size_t strsize = 0; - /* We must not react on white spaces immediately because they can - possibly be matched even if in the input stream no character is - available anymore. */ - int skip_space = 0; - /* Workspace. */ - char *wp = NULL; /* Workspace. */ - size_t wpmax = 0; /* Maximal size of workspace. */ - size_t wpsize = 0; /* Currently used bytes in workspace. */ - char *tw; /* Temporary pointer. */ - -#ifdef __va_copy - __va_copy (arg, argptr); -#else - arg = (va_list) argptr; -#endif - - - - /* Run through the format string. */ - while (*f != '\0') - { - unsigned int argpos; - /* Extract the next argument, which is of type TYPE. - For a %N$... spec, this is the Nth argument from the beginning; - otherwise it is the next argument after the state now in ARG. */ -#define ARG(type) va_arg(argptr,type) - - if (!isascii (*f)) - { - /* Non-ASCII, may be a multibyte. */ - // int len = mblen (f, strlen (f)); - int len =1; - if (len > 0) - { - do - { - c = inchar (); - if (c == EOF) - input_error (); - else if (c != *f++) - { - UNGETC (c, s); - conv_error (); - } - } - while (--len > 0); - continue; - } - } - - fc = *f++; - if (fc != '%') - { - /* Remember to skip spaces. */ - if (isspace (fc)) - { - skip_space = 1; - continue; - } - - /* Read a character. */ - c = inchar (); - - /* Characters other than format specs must just match. */ - if (c == EOF) - input_error (); - - /* We saw white space char as the last character in the format - string. Now it's time to skip all leading white space. */ - if (skip_space) - { - while (isspace (c)) - if (inchar () == EOF && *_errno() == EINTR) - conv_error (); - skip_space = 0; - } - - if (c != fc) - { - UNGETC (c, s); - conv_error (); - } - - continue; - } - - /* This is the start of the conversion string. */ - flags = 0; - - /* Initialize state of modifiers. */ - argpos = 0; - - /* Prepare temporary buffer. */ - wpsize = 0; - - /* Check for a positional parameter specification. */ - if (isdigit (*f)) - { - argpos = *f++ - '0'; - while (isdigit (*f)) - argpos = argpos * 10 + (*f++ - '0'); - if (*f == '$') - ++f; - else - { - /* Oops; that was actually the field width. */ - width = argpos; - flags |= WIDTH; - argpos = 0; - goto got_width; - } - } - - /* Check for the assignment-suppressing and the number grouping flag. */ - while (*f == '*' || *f == '\'') - switch (*f++) - { - case '*': - flags |= SUPPRESS; - break; - case '\'': - flags |= GROUP; - break; - } - - /* We have seen width. */ - if (isdigit (*f)) - flags |= WIDTH; - - /* Find the maximum field width. */ - width = 0; - while (isdigit (*f)) - { - width *= 10; - width += *f++ - '0'; - } - got_width: - if (width == 0) - width = -1; - - /* Check for type modifiers. */ - while (*f == 'h' || *f == 'l' || *f == 'L' || *f == 'a' || *f == 'q') - switch (*f++) - { - case 'h': - /* int's are short int's. */ - if (flags & TYPEMOD) - /* Signal illegal format element. */ - conv_error (); - flags |= SHORT; - break; - case 'l': - if (flags & (SHORT|LONGDBL)) - conv_error (); - else if (flags & LONG) - { - /* A double `l' is equivalent to an `L'. */ - flags &= ~LONG; - flags |= LONGDBL; - } - else - /* int's are long int's. */ - flags |= LONG; - break; - case 'q': - case 'L': - /* double's are long double's, and int's are LONGLONG int's. */ - if (flags & TYPEMOD) - /* Signal illegal format element. */ - conv_error (); - flags |= LONGDBL; - break; - case 'a': - if (flags & TYPEMOD) - /* Signal illegal format element. */ - conv_error (); - /* String conversions (%s, %[) take a `char **' - arg and fill it in with a malloc'd pointer. */ - flags |= MALLOC; - break; - } - - /* End of the format string? */ - if (*f == '\0') - conv_error (); - - /* We must take care for EINTR errors. */ - if (c == EOF && *_errno() == EINTR) - input_error (); - - /* Find the conversion specifier. */ - fc = *f++; - if (skip_space || (fc != '[' && fc != 'c' && fc != 'C' && fc != 'n')) - { - /* Eat whitespace. */ - do - if (inchar () == EOF && *_errno() == EINTR) - input_error (); - while (isspace (c)); - UNGETC (c, s); - skip_space = 0; - } - - switch (fc) - { - case '%': /* Must match a literal '%'. */ - c = inchar (); - if (c != fc) - { - UNGETC (c, s); - conv_error (); - } - break; - - case 'n': /* Answer number of assignments done. */ - /* Corrigendum 1 to ISO C 1990 describes the allowed flags - with the 'n' conversion specifier. */ - if (!(flags & SUPPRESS)) - { - /* Don't count the read-ahead. */ - if (flags & LONGDBL) - *ARG (long int *) = read_in; - else if (flags & LONG) - *ARG (long int *) = read_in; - else if (flags & SHORT) - *ARG (short int *) = read_in; - else - *ARG (int *) = read_in; - -#ifdef NO_BUG_IN_ISO_C_CORRIGENDUM_1 - /* We have a severe problem here. The ISO C standard - contradicts itself in explaining the effect of the %n - format in `scanf'. While in ISO C:1990 and the ISO C - Amendement 1:1995 the result is described as - - Execution of a %n directive does not effect the - assignment count returned at the completion of - execution of the f(w)scanf function. - - in ISO C Corrigendum 1:1994 the following was added: - - Subclause 7.9.6.2 - Add the following fourth example: - In: - #include - int d1, d2, n1, n2, i; - i = sscanf("123", "%d%n%n%d", &d1, &n1, &n2, &d2); - the value 123 is assigned to d1 and the value3 to n1. - Because %n can never get an input failure the value - of 3 is also assigned to n2. The value of d2 is not - affected. The value 3 is assigned to i. - - We go for now with the historically correct code fro ISO C, - i.e., we don't count the %n assignments. When it ever - should proof to be wrong just remove the #ifdef above. */ - ++done; -#endif - } - break; - - case 'c': /* Match characters. */ - if ((flags & LONG) == 0) - { - if (!(flags & SUPPRESS)) - { - str = ARG (char *); - if (str == NULL) - conv_error (); - } - - c = inchar (); - if (c == EOF) - input_error (); - - if (width == -1) - width = 1; - - if (!(flags & SUPPRESS)) - { - do - *str++ = c; - while (--width > 0 && inchar () != EOF); - } - else - while (--width > 0 && inchar () != EOF); - - if (width > 0) - /* I.e., EOF was read. */ - --read_in; - - if (!(flags & SUPPRESS)) - ++done; - - break; - } - /* FALLTHROUGH */ - case 'C': - /* Get UTF-8 encoded wide character. Here we assume (as in - other parts of the libc) that we only have to handle - UTF-8. */ - { - wint_t val; - size_t cnt = 0; - int first = 1; - - if (!(flags & SUPPRESS)) - { - wstr = ARG (wchar_t *); - if (str == NULL) - conv_error (); - } - - do - { -#define NEXT_WIDE_CHAR(First) \ - c = inchar (); \ - if (c == EOF) { \ - /* EOF is only an error for the first character. */ \ - if (First) { \ - input_error (); \ - } \ - else \ - { \ - --read_in; \ - break; \ - } \ - } \ - val = c; \ - if (val >= 0x80) \ - { \ - if ((c & 0xc0) == 0x80 || (c & 0xfe) == 0xfe) \ - encode_error (); \ - if ((c & 0xe0) == 0xc0) \ - { \ - /* We expect two bytes. */ \ - cnt = 1; \ - val &= 0x1f; \ - } \ - else if ((c & 0xf0) == 0xe0) \ - { \ - /* We expect three bytes. */ \ - cnt = 2; \ - val &= 0x0f; \ - } \ - else if ((c & 0xf8) == 0xf0) \ - { \ - /* We expect four bytes. */ \ - cnt = 3; \ - val &= 0x07; \ - } \ - else if ((c & 0xfc) == 0xf8) \ - { \ - /* We expect five bytes. */ \ - cnt = 4; \ - val &= 0x03; \ - } \ - else \ - { \ - /* We expect six bytes. */ \ - cnt = 5; \ - val &= 0x01; \ - } \ - \ - do \ - { \ - c = inchar (); \ - if (c == EOF \ - || (c & 0xc0) == 0x80 || (c & 0xfe) == 0xfe) \ - encode_error (); \ - val <<= 6; \ - val |= c & 0x3f; \ - } \ - while (--cnt > 0); \ - } \ - \ - if (!(flags & SUPPRESS)) \ - *wstr++ = val; \ - first = 0 - - NEXT_WIDE_CHAR (first); - } - while (--width > 0); - - if (width > 0) - /* I.e., EOF was read. */ - --read_in; - - if (!(flags & SUPPRESS)) - ++done; - } - break; - - case 's': /* Read a string. */ - if (flags & LONG) - /* We have to process a wide character string. */ - goto wide_char_string; - -#define STRING_ARG(Str, Type) \ - if (!(flags & SUPPRESS)) \ - { \ - if (flags & MALLOC) \ - { \ - /* The string is to be stored in a malloc'd buffer. */ \ - strptr = ARG (char **); \ - if (strptr == NULL) \ - conv_error (); \ - /* Allocate an initial buffer. */ \ - strsize = 100; \ - *strptr = malloc (strsize * sizeof (Type)); \ - Str = (Type *) *strptr; \ - } \ - else \ - Str = ARG (Type *); \ - if (Str == NULL) \ - conv_error (); \ - } - STRING_ARG (str, char); - - c = inchar (); - if (c == EOF) - input_error (); - - do - { - if (isspace (c)) - { - UNGETC (c, s); - break; - } -#define STRING_ADD_CHAR(Str, c, Type) \ - if (!(flags & SUPPRESS)) \ - { \ - *Str++ = c; \ - if ((flags & MALLOC) && (char *) Str == *strptr + strsize) \ - { \ - /* Enlarge the buffer. */ \ - Str = realloc (*strptr, strsize * 2 * sizeof (Type)); \ - if (Str == NULL) \ - { \ - /* Can't allocate that much. Last-ditch effort. */\ - Str = realloc (*strptr, \ - (strsize + 1) * sizeof (Type)); \ - if (Str == NULL) \ - { \ - /* We lose. Oh well. \ - Terminate the string and stop converting, \ - so at least we don't skip any input. */ \ - ((Type *) (*strptr))[strsize] = '\0'; \ - ++done; \ - conv_error (); \ - } \ - else \ - { \ - *strptr = (char *) Str; \ - Str = ((Type *) *strptr) + strsize; \ - ++strsize; \ - } \ - } \ - else \ - { \ - *strptr = (char *) Str; \ - Str = ((Type *) *strptr) + strsize; \ - strsize *= 2; \ - } \ - } \ - } - STRING_ADD_CHAR (str, c, char); - } while ((width <= 0 || --width > 0) && inchar () != EOF); - - if (!(flags & SUPPRESS)) - { - *str = '\0'; - ++done; - } - break; - - case 'S': - /* Wide character string. */ - wide_char_string: - { - wint_t val; - int first = 1; - STRING_ARG (wstr, wchar_t); - - do - { - size_t cnt = 0; - NEXT_WIDE_CHAR (first); - - if (iswspace (val)) - { - /* XXX We would have to push back the whole wide char - with possibly many bytes. But since scanf does - not make a difference for white space characters - we can simply push back a simple which is - guaranteed to be in the [:space:] class. */ - UNGETC (' ', s); - break; - } - - STRING_ADD_CHAR (wstr, val, wchar_t); - first = 0; - } - while (width <= 0 || --width > 0); - - if (!(flags & SUPPRESS)) - { - *wstr = L'\0'; - ++done; - } - } - break; - - case 'x': /* Hexadecimal integer. */ - case 'X': /* Ditto. */ - base = 16; - number_signed = 0; - goto number; - - case 'o': /* Octal integer. */ - base = 8; - number_signed = 0; - goto number; - - case 'u': /* Unsigned decimal integer. */ - base = 10; - number_signed = 0; - goto number; - - case 'd': /* Signed decimal integer. */ - base = 10; - number_signed = 1; - goto number; - - case 'i': /* Generic number. */ - base = 0; - number_signed = 1; - - number: - c = inchar (); - if (c == EOF) - input_error (); - - /* Check for a sign. */ - if (c == '-' || c == '+') - { - ADDW (c); - if (width > 0) - --width; - c = inchar (); - } - - /* Look for a leading indication of base. */ - if (width != 0 && c == '0') - { - if (width > 0) - --width; - - ADDW (c); - c = inchar (); - - if (width != 0 && tolower (c) == 'x') - { - if (base == 0) - base = 16; - if (base == 16) - { - if (width > 0) - --width; - c = inchar (); - } - } - else if (base == 0) - base = 8; - } - - if (base == 0) - base = 10; - - /* Read the number into workspace. */ - while (c != EOF && width != 0) - { - if (base == 16 ? !isxdigit (c) : - ((!isdigit (c) || c - '0' >= base) && - !((flags & GROUP) && base == 10 && c == thousands))) - break; - ADDW (c); - if (width > 0) - --width; - - c = inchar (); - } - - /* The just read character is not part of the number anymore. */ - UNGETC (c, s); - - if (wpsize == 0 || - (wpsize == 1 && (wp[0] == '+' || wp[0] == '-'))) - /* There was no number. */ - conv_error (); - - /* Convert the number. */ - ADDW ('\0'); - if (flags & LONGDBL) - { -// if (number_signed) -// num.q = __strtoq_internal (wp, &tw, base, flags & GROUP); -// else -// num.uq = __strtouq_internal (wp, &tw, base, flags & GROUP); - } - else - { - if (number_signed) - num.l = __strtol_internal (wp, &tw, base, flags & GROUP); - else - num.ul = __strtoul_internal (wp, &tw, base, flags & GROUP); - } - if (wp == tw) - conv_error (); - - if (!(flags & SUPPRESS)) - { - if (! number_signed) - { - if (flags & LONGDBL) { - *ARG (ULONGLONG*) = num.uq; - } - else if (flags & LONG) - *ARG (unsigned long int*) = num.ul; - else if (flags & SHORT) - *ARG (unsigned short int*) = (unsigned short int) num.ul; - else - *ARG (unsigned int*) = (unsigned int) num.ul; - } - else - { - if (flags & LONGDBL) { - *ARG (LONGLONG*) = num.q; - } - else if (flags & LONG) - *ARG (long int *) = num.l; - else if (flags & SHORT) - *ARG (short int *) = (short int) num.l; - else - *ARG (int *) = (int) num.l; - } - ++done; - } - break; - - case 'e': /* Floating-point numbers. */ - case 'E': - case 'f': - case 'g': - case 'G': - c = inchar (); - if (c == EOF) - input_error (); - - /* Check for a sign. */ - if (c == '-' || c == '+') - { - negative = c == '-'; - if (inchar () == EOF) - /* EOF is only an input error before we read any chars. */ - conv_error (); - if (width > 0) - --width; - } - else - negative = 0; - - got_dot = got_e = 0; - do - { - if (isdigit (c)) - ADDW (c); - else if (got_e && wp[wpsize - 1] == 'e' - && (c == '-' || c == '+')) - ADDW (c); - else if (wpsize > 0 && !got_e && tolower (c) == 'e') - { - ADDW ('e'); - got_e = got_dot = 1; - } - else if (c == decimal && !got_dot) - { - ADDW (c); - got_dot = 1; - } - else if ((flags & GROUP) && c == thousands && !got_dot) - ADDW (c); - else - { - /* The last read character is not part of the number - anymore. */ - UNGETC (c, s); - break; - } - if (width > 0) - --width; - } - while (width != 0 && inchar () != EOF); - - if (wpsize == 0) - conv_error (); - - /* Convert the number. */ - ADDW ('\0'); - if (flags & LONGDBL) - { - long double d = __strtold_internal (wp, &tw, flags & GROUP); - if (!(flags & SUPPRESS) && tw != wp) - *ARG (long double *) = negative ? -d : d; - } - else if (flags & LONG) - { - double d = __strtod_internal (wp, &tw, flags & GROUP); - if (!(flags & SUPPRESS) && tw != wp) - *ARG (double *) = negative ? -d : d; - } - else - { - float d = __strtof_internal (wp, &tw, flags & GROUP); - if (!(flags & SUPPRESS) && tw != wp) - *ARG (float *) = negative ? -d : d; - } - - if (tw == wp) - conv_error (); - - if (!(flags & SUPPRESS)) - ++done; - break; - - case '[': /* Character class. */ - if (flags & LONG) - { - STRING_ARG (wstr, wchar_t); - c = '\0'; /* This is to keep gcc quiet. */ - } - else - { - STRING_ARG (str, char); - - c = inchar (); - if (c == EOF) - input_error (); - } - - if (*f == '^') - { - ++f; - not_in = 1; - } - else - not_in = 0; - - /* Fill WP with byte flags indexed by character. - We will use this flag map for matching input characters. */ - if (wpmax < UCHAR_MAX) - { - wpmax = UCHAR_MAX; - wp = (char *) alloca (wpmax); - } - memset (wp, 0, UCHAR_MAX); - - fc = *f; - if (fc == ']' || fc == '-') - { - /* If ] or - appears before any char in the set, it is not - the terminator or separator, but the first char in the - set. */ - wp[fc] = 1; - ++f; - } - - while ((fc = *f++) != '\0' && fc != ']') - { - if (fc == '-' && *f != '\0' && *f != ']' && - (unsigned char) f[-2] <= (unsigned char) *f) - { - /* Add all characters from the one before the '-' - up to (but not including) the next format char. */ - for (fc = f[-2]; fc < *f; ++fc) - wp[fc] = 1; - } - else - /* Add the character to the flag map. */ - wp[fc] = 1; - } - if (fc == '\0') - { - if (!(flags & LONG)) - UNGETC (c, s); - conv_error(); - } - - if (flags & LONG) - { - wint_t val; - int first = 1; - - do - { - size_t cnt = 0; - NEXT_WIDE_CHAR (first); - if (val > 255 || wp[val] == not_in) - { - /* XXX We have a problem here. We read a wide - character and this possibly took several - bytes. But we can only push back one single - character. To be sure we don't create wrong - input we push it back only in case it is - representable within one byte. */ - if (val < 0x80) - UNGETC (val, s); - break; - } - STRING_ADD_CHAR (wstr, val, wchar_t); - if (width > 0) - --width; - first = 0; - } - while (width != 0); - - if (first) - conv_error (); - - if (!(flags & SUPPRESS)) - { - *wstr = L'\0'; - ++done; - } - } - else - { - num.ul = read_in - 1; /* -1 because we already read one char. */ - do - { - if (wp[c] == not_in) - { - UNGETC (c, s); - break; - } - STRING_ADD_CHAR (str, c, char); - if (width > 0) - --width; - } - while (width != 0 && inchar () != EOF); - - if (read_in == num.ul) - conv_error (); - - if (!(flags & SUPPRESS)) - { - *str = '\0'; - ++done; - } - } - break; - - case 'p': /* Generic pointer. */ - base = 16; - /* A PTR must be the same size as a `long int'. */ - flags &= ~(SHORT|LONGDBL); - flags |= LONG; - number_signed = 0; - goto number; - } - } - - /* The last thing we saw int the format string was a white space. - Consume the last white spaces. */ - if (skip_space) - { - do - c = inchar (); - while (isspace (c)); - UNGETC (c, s); - } - - - return done; -} - - - -int -xfscanf(FILE *f, const char *fmt, ...) -{ - int r; - va_list a=0; - va_start(a, fmt); - r = __vfscanf(f, fmt, a); - va_end(a); - return r; -} - - -double __strtod_internal (const char *__nptr,char **__endptr, int __group) -{ - return strtod(__nptr,__endptr); -} -float __strtof_internal (const char *__nptr, char **__endptr,int __group) -{ - return (float)strtod(__nptr,__endptr); -} -static double powten[] = -{ - 1e1L, 1e2L, 1e4L, 1e8L, 1e16L, 1e32L, 1e64L, 1e128L, 1e256L, -#ifdef __GNUC__ - 1e512L, 1e512L*1e512L, 1e2048L, 1e4096L -#else - 1e256L, 1e256L, 1e256L, 1e256L -#endif -}; - -long double __strtold_internal (const char *s,char **sret, int __group) -{ - - long double r; /* result */ - int e, ne; /* exponent */ - int sign; /* +- 1.0 */ - int esign; - int flags=0; - int l2powm1; - - r = 0.0L; - sign = 1; - e = ne = 0; - esign = 1; - - while(*s && isspace(*s)) - s++; - - if (*s == '+') - s++; - else if (*s == '-') - { - sign = -1; - s++; - } - - while ((*s >= '0') && (*s <= '9')) - { - flags |= 1; - r *= 10.0L; - r += *s - '0'; - s++; - } - - if (*s == '.') - { - s++; - while ((*s >= '0') && (*s <= '9')) - { - flags |= 2; - r *= 10.0L; - r += *s - '0'; - s++; - ne++; - } - } - if (flags == 0) - { - if (sret) - *sret = (char *)s; - return 0.0L; - } - - if ((*s == 'e') || (*s == 'E')) - { - s++; - if (*s == '+') - s++; - else if (*s == '-') - { - s++; - esign = -1; - } - while ((*s >= '0') && (*s <= '9')) - { - e *= 10; - e += *s - '0'; - s++; - } - } - if (esign < 0) - { - esign = -esign; - e = -e; - } - e = e - ne; - if (e < -4096) - { - /* possibly subnormal number, 10^e would overflow */ - r *= 1.0e-2048L; - e += 2048; - } - if (e < 0) - { - e = -e; - esign = -esign; - } - if (e >= 8192) - e = 8191; - if (e) - { - double d = 1.0L; - l2powm1 = 0; - while (e) - { - if (e & 1) - d *= powten[l2powm1]; - e >>= 1; - l2powm1++; - } - if (esign > 0) - r *= d; - else - r /= d; - } - if (sret) - *sret = (char *)s; - return r * sign; - - return 0; -} -long int __strtol_internal (const char *__nptr, char **__endptr, int __base, int __group) -{ - return strtol(__nptr,__endptr, __base); -} -unsigned long int __strtoul_internal (const char *__nptr, char **__endptr, int __base, int __group) -{ - return strtoul(__nptr,__endptr, __base); -} - - - - - - - - - diff --git a/reactos/lib/msvcrt/stdio/vfwprint.c b/reactos/lib/msvcrt/stdio/vfwprint.c deleted file mode 100644 index ad5261c5c88..00000000000 --- a/reactos/lib/msvcrt/stdio/vfwprint.c +++ /dev/null @@ -1,1088 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ - -#ifdef __USE_W32API -#undef __USE_W32API -#endif - -//#include -#include // robd -#include // robd - -#include -#include -#include - - -int _isnanl(double x); -int _isinfl(double x); -int _isnan(double x); -int _isinf(double x); - - -int -__vfwprintf(FILE *fp, const wchar_t *fmt0, va_list argp); - - -/* - * @implemented - */ -int -vfwprintf(FILE *f, const wchar_t *fmt, va_list ap) -{ - int len; - wchar_t localbuf[BUFSIZ]; - -#if 0 - __fileno_lock(fileno(f)); -#endif - if (f->_flag & _IONBF) { - f->_flag &= ~_IONBF; - f->_ptr = f->_base = (char *)localbuf; - f->_bufsiz = BUFSIZ; - len = __vfwprintf(f,fmt,ap); - (void)fflush(f); - f->_flag |= _IONBF; - f->_base = NULL; - f->_bufsiz = 0; - f->_cnt = 0; - } else - len = __vfwprintf(f,fmt,ap); -#if 0 - __fileno_unlock(fileno(f)); -#endif - return (ferror(f) ? EOF : len); -} - - - -/* - * linux/lib/vsprintf.c - * - * Copyright (C) 1991, 1992 Linus Torvalds - */ - -/* vsprintf.c -- Lars Wirzenius & Linus Torvalds. */ -/* - * Wirzenius wrote this portably, Torvalds fucked it up :-) - */ - -/* - * Appropiated for the reactos kernel, March 1998 -- David Welch - */ - -#include - -#include -#include -#include -#include -#include -#include - - -#define ZEROPAD 1 /* pad with zero */ -#define SIGN 2 /* unsigned/signed long */ -#define PLUS 4 /* show plus */ -#define SPACE 8 /* space if plus */ -#define LEFT 16 /* left justified */ -#define SPECIAL 32 /* 0x */ -#define LARGE 64 /* use 'ABCDEF' instead of 'abcdef' */ -#define ZEROTRUNC 128 /* truncate zero 's */ - - -static int skip_wtoi(const wchar_t **s) -{ - int i=0; - - while (iswdigit(**s)) - i = i*10 + *((*s)++) - L'0'; - return i; -} - - -static int do_div(LONGLONG *n,int base) -{ - int __res = ((ULONGLONG) *n) % (unsigned) base; - *n = ((ULONGLONG) *n) / (unsigned) base; - return __res; -} - - -static int number(FILE * f, LONGLONG num, int base, int size, int precision ,int type) -{ - wchar_t c,sign,tmp[66]; - const wchar_t *digits=L"0123456789abcdefghijklmnopqrstuvwxyz"; - int i, done = 0; - - if (type & LARGE) - digits = L"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; - if (type & LEFT) - type &= ~ZEROPAD; - if (base < 2 || base > 36) - return done; - c = (type & ZEROPAD) ? L'0' : L' '; - sign = 0; - if (type & SIGN) { - if (num < 0) { - sign = L'-'; - num = -num; - size--; - } else if (type & PLUS) { - sign = L'+'; - size--; - } else if (type & SPACE) { - sign = L' '; - size--; - } - } - if (type & SPECIAL) { - if (base == 16) - size -= 2; - else if (base == 8) - size--; - } - i = 0; - if (num == 0) - tmp[i++]=L'0'; - else while (num != 0) - tmp[i++] = digits[do_div(&num,base)]; - if (i > precision) - precision = i; - size -= precision; - if (!(type&(ZEROPAD+LEFT))) - while(size-->0) - { - if (putwc(L' ',f) == WEOF) - return -1; - done++; - } - - if (sign) - { - if (putwc(sign,f) == WEOF) - return -1; - done++; - } - if (type & SPECIAL) { - if (base==8) { - if (putwc(L'0',f) == WEOF) - return -1; - done++; - } - else if (base==16) { - if (putwc(L'0', f) == WEOF) - return -1; - done++; - if (putwc(digits[33],f) == WEOF) - return -1; - done++; - } - } - if (!(type & LEFT)) - while (size-- > 0) - { - if (putwc(c,f) == WEOF) - return -1; - done++; - } - while (i < precision--) - { - if (putwc(L'0', f) == WEOF) - return -1; - done++; - } - while (i-- > 0) - { - if (putwc(tmp[i],f) == WEOF) - return -1; - done++; - } - while (size-- > 0) - { - if (putwc(L' ', f) == WEOF) - return -1; - done++; - } - return done; -} - - -static int numberf(FILE * f, double __n, wchar_t exp_sign, int size, int precision, int type) -{ - double exponent = 0.0; - double e; - long ie; - - //int x; - char *buf, *tmp; - int i = 0; - int j = 0; - //int k = 0; - - double frac, intr; - double p; - wchar_t sign; - wchar_t c; - char ro = 0; - int result, done = 0; - - union - { - double* __n; - double_t* n; - } n; - - n.__n = &__n; - - if ( exp_sign == L'g' || exp_sign == L'G' || exp_sign == L'e' || exp_sign == L'E' ) { - ie = ((unsigned int)n.n->exponent - (unsigned int)0x3ff); - exponent = ie/3.321928; - } - - if ( exp_sign == L'g' || exp_sign == L'G' ) { - type |= ZEROTRUNC; - if ( exponent < -4 || fabs(exponent) >= precision ) - exp_sign -= 2; // g -> e and G -> E - } - - if ( exp_sign == L'e' || exp_sign == L'E' ) { - frac = modf(exponent,&e); - if ( frac > 0.5 ) - e++; - else if ( frac < -0.5 ) - e--; - - result = numberf(f,__n/pow(10.0L,e),L'f',size-4, precision, type); - if (result < 0) - return -1; - done += result; - if (putwc( exp_sign,f) == WEOF) - return -1; - done++; - size--; - ie = (long)e; - type = LEFT | PLUS; - if ( ie < 0 ) - type |= SIGN; - - result = number(f,ie, 10,2, 2,type ); - if (result < 0) - return -1; - done += result; - return done; - } - - if ( exp_sign == 'f' ) { - buf = alloca(4096); - if (type & LEFT) { - type &= ~ZEROPAD; - } - - c = (type & ZEROPAD) ? L'0' : L' '; - sign = 0; - if (type & SIGN) { - if (__n < 0) { - sign = L'-'; - __n = fabs(__n); - size--; - } else if (type & PLUS) { - sign = L'+'; - size--; - } else if (type & SPACE) { - sign = L' '; - size--; - } - } - - frac = modf(__n,&intr); - - // # flags forces a . and prevents trucation of trailing zero's - - if ( precision > 0 ) { - //frac = modfl(__n,&intr); - i = precision-1; - while ( i >= 0 ) { - frac*=10.0L; - frac = modf(frac, &p); - buf[i] = (int)p + L'0'; - i--; - } - i = precision; - size -= precision; - - ro = 0; - if ( frac > 0.5 ) { - ro = 1; - } - - if ( precision >= 1 || type & SPECIAL) { - buf[i++] = '.'; - size--; - } - } - - if ( intr == 0.0 ) { - buf[i++] = L'0'; - size--; - } - else { - while ( intr > 0.0 ) { - p = intr; - intr/=10.0L; - modf(intr, &intr); - - p -= 10.0*intr; - - buf[i++] = (int)p + L'0'; - size--; - } - } - - j = 0; - while ( j < i && ro == 1 ) { - if ( buf[j] >= L'0' && buf[j] <= L'8' ) { - buf[j]++; - ro = 0; - } - else if ( buf[j] == L'9' ) { - buf[j] = L'0'; - } - j++; - } - if ( ro == 1 ) - buf[i++] = L'1'; - - buf[i] = 0; - - size -= precision; - if (!(type&(ZEROPAD+LEFT))) - while(size-->0) - { - if (putwc(L' ',f) == WEOF) - return -1; - done++; - } - if (sign) - { - if (putwc( sign,f) == WEOF) - return -1; - done++; - } - - if (!(type&(ZEROPAD+LEFT))) - while(size-->0) - { - if (putwc(L' ',f) == WEOF) - return -1; - done++; - } - if (type & SPECIAL) { - } - - if (!(type & LEFT)) - while (size-- > 0) - { - if (putwc(c,f) == WEOF) - return -1; - done++; - } - - tmp = buf; - if ( type & ZEROTRUNC && ((type & SPECIAL) != SPECIAL) ) { - j = 0; - while ( j < i && ( *tmp == L'0' || *tmp == L'.' )) { - tmp++; - i--; - } - } -// else -// while (i < precision--) -// putwc(L'0', f); - while (i-- > 0) - { - if (putwc(tmp[i],f) == WEOF) - return -1; - done++; - } - while (size-- > 0) - { - if (putwc(L' ', f) == WEOF) - return -1; - done++; - } - } - return done; -} - - -static int numberfl(FILE * f, long double __n, wchar_t exp_sign, int size, int precision, int type) -{ - long double exponent = 0.0; - long double e; - long ie; - - //int x; - wchar_t *buf, *tmp; - int i = 0; - int j = 0; - //int k = 0; - - long double frac, intr; - long double p; - wchar_t sign; - wchar_t c; - char ro = 0; - - int result, done = 0; - - union - { - long double* __n; - long_double_t* n; - } n; - - n.__n = &__n; - - if ( exp_sign == L'g' || exp_sign == L'G' || exp_sign == L'e' || exp_sign == L'E' ) { - ie = ((unsigned int)n.n->exponent - (unsigned int)0x3fff); - exponent = ie/3.321928; - } - - if ( exp_sign == L'g' || exp_sign == L'G' ) { - type |= ZEROTRUNC; - if ( exponent < -4 || fabs(exponent) >= precision ) - exp_sign -= 2; // g -> e and G -> E - } - - if ( exp_sign == L'e' || exp_sign == L'E' ) { - frac = modfl(exponent,&e); - if ( frac > 0.5 ) - e++; - else if ( frac < -0.5 ) - e--; - - result = numberf(f,__n/powl(10.0L,e),L'f',size-4, precision, type); - if (result < 0) - return -1; - done += result; - if (putwc( exp_sign,f) == WEOF) - return -1; - done++; - size--; - ie = (long)e; - type = LEFT | PLUS; - if ( ie < 0 ) - type |= SIGN; - - result = number(f,ie, 10,2, 2,type ); - if (result < 0) - return -1; - done += result; - return done; - } - - if ( exp_sign == L'f' ) { - buf = alloca(4096); - if (type & LEFT) { - type &= ~ZEROPAD; - } - - c = (type & ZEROPAD) ? L'0' : L' '; - sign = 0; - if (type & SIGN) { - if (__n < 0) { - sign = L'-'; - __n = fabs(__n); - size--; - } else if (type & PLUS) { - sign = L'+'; - size--; - } else if (type & SPACE) { - sign = L' '; - size--; - } - } - - frac = modfl(__n,&intr); - - // # flags forces a . and prevents trucation of trailing zero's - if ( precision > 0 ) { - //frac = modfl(__n,&intr); - - i = precision-1; - while ( i >= 0 ) { - frac*=10.0L; - frac = modfl((long double)frac, &p); - buf[i] = (int)p + L'0'; - i--; - } - i = precision; - size -= precision; - - ro = 0; - if ( frac > 0.5 ) { - ro = 1; - } - - if ( precision >= 1 || type & SPECIAL) { - buf[i++] = L'.'; - size--; - } - } - - if ( intr == 0.0 ) { - buf[i++] = L'0'; - size--; - } - else { - while ( intr > 0.0 ) { - p = intr; - intr/=10.0L; - modfl(intr, &intr); - - p -=10.0*intr; - - buf[i++] = (int)p + L'0'; - size--; - } - } - - j = 0; - while ( j < i && ro == 1) { - if ( buf[j] >= L'0' && buf[j] <= L'8' ) { - buf[j]++; - ro = 0; - } - else if ( buf[j] == L'9' ) { - buf[j] = L'0'; - } - j++; - } - if ( ro == 1 ) - buf[i++] = L'1'; - - buf[i] = 0; - - size -= precision; - if (!(type&(ZEROPAD+LEFT))) - while(size-->0) - putwc(L' ',f); - if (sign) - putwc(sign,f); - - if (!(type&(ZEROPAD+LEFT))) - while(size-->0) - putwc(L' ',f); - if (type & SPECIAL) { - } - - if (!(type & LEFT)) - while (size-- > 0) - putwc(c,f); - - tmp = buf; - if ( type & ZEROTRUNC && ((type & SPECIAL) != SPECIAL) ) { - j = 0; - while ( j < i && ( *tmp == L'0' || *tmp == L'.' )) { - tmp++; - i--; - } - } -// else -// while (i < precision--) -// putc( '0', f); - while (i-- > 0) - { - if (putwc(tmp[i],f) == WEOF) - return -1; - done++; - } - while (size-- > 0) - { - if (putwc(L' ', f) == WEOF) - return -1; - done++; - } - } - return done; -} - -static int string(FILE *f, const char* s, int len, int field_width, int precision, int flags) -{ - int i, done = 0; - if (s == NULL) - { - s = ""; - len = 6; - } - else - { - if (len == -1) - { - len = 0; - while ((unsigned int)len < (unsigned int)precision && s[len]) - len++; - } - else - { - if ((unsigned int)len > (unsigned int)precision) - len = precision; - } - } - if (!(flags & LEFT)) - while (len < field_width--) - { - if (putwc(L' ', f) == WEOF) - return -1; - done++; - } - for (i = 0; i < len; ++i) - { - if (putwc(*s++, f) == WEOF) - return -1; - done++; - } - while (len < field_width--) - { - if (putwc(L' ', f) == WEOF) - return -1; - done++; - } - return done; -} - -static int stringw(FILE *f, const wchar_t* sw, int len, int field_width, int precision, int flags) -{ - int i, done = 0; - if (sw == NULL) - { - sw = L""; - len = 6; - } - else - { - if (len == -1) - { - len = 0; - while ((unsigned int)len < (unsigned int)precision && sw[len]) - len++; - } - else - { - if ((unsigned int)len > (unsigned int)precision) - len = precision; - } - } - if (!(flags & LEFT)) - while (len < field_width--) - { - if (putwc(L' ', f) == WEOF) - return -1; - done++; - } - for (i = 0; i < len; ++i) - { - if (putwc(*sw++, f) == WEOF) - return -1; - done++; - } - while (len < field_width--) - { - if (putwc(L' ', f) == WEOF) - return -1; - done++; - } - return done; -} - -int __vfwprintf(FILE *f, const wchar_t *fmt, va_list args) -{ - int len = 0; - ULONGLONG num; - int base; - long double _ldouble; - double _double; - const char *s; - const wchar_t* sw; - int result, done = 0; - - int flags; /* flags to number() */ - - int field_width; /* width of output field */ - int precision; /* min. # of digits for integers; max - number of chars for from string */ - int qualifier = 0; /* 'h', 'l', 'L' or 'I64' for integer fields */ - - for (; *fmt ; ++fmt) { - if (*fmt != L'%') { - if (putwc(*fmt,f) == WEOF) - return -1; - done++; - continue; - } - - /* process flags */ - flags = 0; - repeat: - ++fmt; /* this also skips first '%' */ - switch (*fmt) { - case L'-': flags |= LEFT; goto repeat; - case L'+': flags |= PLUS; goto repeat; - case L' ': flags |= SPACE; goto repeat; - case L'#': flags |= SPECIAL; goto repeat; - case L'0': flags |= ZEROPAD; goto repeat; - } - - /* get field width */ - field_width = -1; - if (isxdigit(*fmt)) - field_width = skip_wtoi(&fmt); - else if (*fmt == L'*') { - ++fmt; - /* it's the next argument */ - field_width = va_arg(args, int); - if (field_width < 0) { - field_width = -field_width; - flags |= LEFT; - } - } - - /* get the precision */ - precision = -1; - if (*fmt == L'.') { - ++fmt; - if (iswdigit(*fmt)) - precision = skip_wtoi(&fmt); - else if (*fmt == L'*') { - ++fmt; - /* it's the next argument */ - precision = va_arg(args, int); - } - if (precision < 0) - precision = 0; - } - - /* get the conversion qualifier */ - qualifier=0; - // %Z can be just stand alone or as size_t qualifier - if ( *fmt == 'Z' ) { - qualifier = *fmt; - switch ( *(fmt+1)) { - case L'o': - case L'b': - case L'X': - case L'x': - case L'd': - case L'i': - case L'u': - ++fmt; - break; - default: - break; - } - } else if (*fmt == L'h' || *fmt == L'l' || *fmt == L'L' || *fmt == L'w') { - qualifier = *fmt; - ++fmt; - } else if (*fmt == L'I' && *(fmt+1) == L'6' && *(fmt+2) == L'4') { - qualifier = *fmt; - fmt += 3; - } - - // go fine with ll instead of L - if ( *fmt == L'l' ) { - ++fmt; - qualifier = L'L'; - } - - /* default base */ - base = 10; - - switch (*fmt) { - case L'c': /* finished */ - if (!(flags & LEFT)) - while (--field_width > 0) - { - if (putwc(L' ', f) == WEOF) - return -1; - done++; - } - if (qualifier == L'h') - { - if (putwc((wchar_t) va_arg(args, int), f) == WEOF) - return -1; - } - else - { - if (putwc((wchar_t) va_arg(args, int), f) == WEOF) - return -1; - } - done++; - while (--field_width > 0) - { - if (putwc(L' ', f) == WEOF) - return -1; - done++; - } - continue; - - case L'C': /* finished */ - if (!(flags & LEFT)) - while (--field_width > 0) - { - if (putwc(L' ', f) == WEOF) - return -1; - done++; - } - if (qualifier == L'l' || qualifier == L'w') - { - if (putwc((unsigned char) va_arg(args, int), f) == WEOF) - return -1; - } - else - { - if (putwc((unsigned char) va_arg(args, int), f) == WEOF) - return -1; - } - done++; - while (--field_width > 0) - { - if (putwc(L' ', f) == WEOF) - return -1; - done++; - } - continue; - - case L's': /* finished */ - if (qualifier == L'h') { - /* print ascii string */ - s = va_arg(args, char *); - result = string(f, s, -1, field_width, precision, flags); - } else { - /* print unicode string */ - sw = va_arg(args, wchar_t *); - result = stringw(f, sw, -1, field_width, precision, flags); - } - if (result < 0) - return -1; - done += result; - continue; - - case L'S': - if (qualifier == L'l' || qualifier == L'w') { - /* print unicode string */ - sw = va_arg(args, wchar_t *); - result = stringw(f, sw, -1, field_width, precision, flags); - } else { - /* print ascii string */ - s = va_arg(args, char *); - result = string(f, s, -1, field_width, precision, flags); - } - if (result < 0) - return -1; - done += result; - continue; - - case L'Z': /* finished */ - if (qualifier == L'w') { - /* print counted unicode string */ - PUNICODE_STRING pus = va_arg(args, PUNICODE_STRING); - if ((pus == NULL) || (pus->Buffer)) { - sw = NULL; - len = -1; - } else { - sw = pus->Buffer; - } - result = stringw(f, sw, len, field_width, precision, flags); - } else { - /* print counted ascii string */ - PANSI_STRING pus = va_arg(args, PANSI_STRING); - if ((pus == NULL) || (pus->Buffer)) { - s = NULL; - len = -1; - } else { - s = pus->Buffer; - len = pus->Length; - } - result = string(f, s, len, field_width, precision, flags); - } - if (result < 0) - return -1; - done += result; - continue; - - case L'e': /* finished */ - case L'E': - case L'f': - case L'g': - case L'G': - if (qualifier == L'l' || qualifier == L'L' ) { - _ldouble = va_arg(args, long double); - - if ( _isnanl(_ldouble) ) { - sw = L"Nan"; - len = 3; - while ( len > 0 ) { - if (putwc(*sw++,f) == WEOF) - return -1; - done++; - len --; - } - } - else if ( _isinfl(_ldouble) < 0 ) { - sw = L"-Inf"; - len = 4; - while ( len > 0 ) { - if (putwc(*sw++,f) == WEOF) - return -1; - done++; - len --; - } - } - else if ( _isinfl(_ldouble) > 0 ) { - sw = L"+Inf"; - len = 4; - while ( len > 0 ) { - if (putwc(*sw++,f) == WEOF) - return -1; - done++; - len --; - } - } else { - if ( precision == -1 ) - precision = 6; - result = numberfl(f,_ldouble,*fmt,field_width,precision,flags); - if (result < 0) - return -1; - done += result; - } - } else { - _double = (double)va_arg(args, double); - - if ( _isnan(_double) ) { - sw = L"Nan"; - len = 3; - while ( len > 0 ) { - if (putwc(*sw++,f) == WEOF) - return -1; - done++; - len --; - } - } else if ( _isinf(_double) < 0 ) { - sw = L"-Inf"; - len = 4; - while ( len > 0 ) { - if (putwc(*sw++,f) == WEOF) - return -1; - done++; - len --; - } - } else if ( _isinf(_double) > 0 ) { - sw = L"+Inf"; - len = 4; - while ( len > 0 ) { - if (putwc(*sw++,f) == WEOF) - return -1; - done++; - len --; - } - } else { - if ( precision == -1 ) - precision = 6; - result = numberf(f,_double,*fmt,field_width,precision,flags); - if (result < 0) - return -1; - done += result; - } - } - continue; - - case L'p': - if (field_width == -1) { - field_width = 2*sizeof(void *); - flags |= ZEROPAD; - } - result = number(f, - (unsigned long) va_arg(args, void *), 16, - field_width, precision, flags); - if (result < 0) - return -1; - done += result; - continue; - - case L'n': - if (qualifier == L'l') { - long * ip = va_arg(args, long *); - *ip = 0; - } else { - int * ip = va_arg(args, int *); - *ip = 0; - } - continue; - - /* integer number formats - set up the flags and "break" */ - case L'o': - base = 8; - break; - - case L'b': - base = 2; - break; - - case L'X': - flags |= LARGE; - case L'x': - base = 16; - break; - - case L'd': - case L'i': - flags |= SIGN; - case L'u': - break; - - default: - if (*fmt != L'%') - { - if (putwc(L'%', f) == WEOF) - return -1; - done++; - } - if (*fmt) - { - if (putwc(*fmt, f) == WEOF) - return -1; - done++; - } - else - --fmt; - continue; - } - - if (qualifier == L'I') - num = va_arg(args, ULONGLONG); - else if (qualifier == L'l') { - if (flags & SIGN) - num = va_arg(args, long); - else - num = va_arg(args, unsigned long); - } - else if (qualifier == L'h') { - if (flags & SIGN) - num = va_arg(args, int); - else - num = va_arg(args, unsigned int); - } - else if (flags & SIGN) - num = va_arg(args, int); - else - num = va_arg(args, unsigned int); - result = number(f, num, base, field_width, precision, flags); - if (result < 0) - return -1; - done += result; - } - //putwc(L'\0',f); - return done; -} - -/* EOF */ diff --git a/reactos/lib/msvcrt/stdio/vprintf.c b/reactos/lib/msvcrt/stdio/vprintf.c deleted file mode 100644 index f487414ec8f..00000000000 --- a/reactos/lib/msvcrt/stdio/vprintf.c +++ /dev/null @@ -1,83 +0,0 @@ -/* Copyright (C) 1991, 1993, 1995 Free Software Foundation, Inc. -This file is part of the GNU C Library. - -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -The GNU C 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include -#undef __OPTIMIZE__ /* Avoid inline `vprintf' function. */ -#include -#include - - -#undef vprintf -#undef vwprintf - -//#define _USE_VARARG_ - -#ifndef _USE_VARARG_ - -/* - * @implemented - */ -int vprintf(const char* format, va_list arg) -{ - int ret; - - ret = vfprintf(stdout, format, arg); - fflush(stdout); - return ret; -} - -/* - * @implemented - */ -int vwprintf(const wchar_t* format, va_list arg) -{ - int ret; - - ret = vfwprintf(stdout, format, arg); - fflush(stdout); - return ret; -} - -#else - -int vprintf(const char* format, ...) -{ - va_list arg; - int ret; - - va_start(arg, format); - ret = vfprintf(stdout, format, arg); - va_end(arg); - - fflush(stdout); - return ret; -} - -int vwprintf(const wchar_t* format, ...) -{ - va_list arg; - int ret; - - va_start(arg, format); - ret = vfwprintf(stdout, format, arg); - va_end(arg); - fflush(stdout); - return ret; -} - -#endif diff --git a/reactos/lib/msvcrt/stdio/vscanf.c b/reactos/lib/msvcrt/stdio/vscanf.c deleted file mode 100644 index 4c6b7968964..00000000000 --- a/reactos/lib/msvcrt/stdio/vscanf.c +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright (C) 1991, 1992, 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. - -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -The GNU C 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include -#include -#include -#include - - -#undef vscanf - - -/* Read formatted input from stdin according to the format - string in FORMAT, using the argument list in ARG. */ -int __vscanf (const char *format, va_list arg) -{ - return __vfscanf(stdin, format, arg); -} - diff --git a/reactos/lib/msvcrt/stdio/vsprintf.c b/reactos/lib/msvcrt/stdio/vsprintf.c deleted file mode 100644 index 9209bb1b3f3..00000000000 --- a/reactos/lib/msvcrt/stdio/vsprintf.c +++ /dev/null @@ -1,80 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include -#include -#include -#include - -/* - * @implemented - */ -int -vsprintf(char *str, const char *fmt, va_list ap) -{ - FILE f; - int len; - - f._flag = _IOWRT|_IOSTRG|_IOBINARY; - f._ptr = str; - f._cnt = INT_MAX; - f._file = -1; - len = vfprintf(&f,fmt, ap); - *f._ptr = 0; - return len; -} - -/* - * @implemented - */ -int -vswprintf(wchar_t *str, const wchar_t *fmt, va_list ap) -{ - FILE f; - int len; - - f._flag = _IOWRT|_IOSTRG|_IOBINARY; - f._ptr = (char*)str; - f._cnt = INT_MAX; - f._file = -1; - len = vfwprintf(&f,fmt, ap); - *(wchar_t*)f._ptr = 0; - return len; -} - - -/* - * @implemented - */ -int -_vsnprintf(char *str, size_t maxlen, const char *fmt, va_list ap) -{ - FILE f; - int len; - f._flag = _IOWRT|_IOSTRG|_IOBINARY; - f._ptr = str; - f._cnt = maxlen; - f._file = -1; - len = vfprintf(&f,fmt, ap); - // what if the buffer is full ?? - *f._ptr = 0; - return len; -} - -/* - * @implemented - */ -int -_vsnwprintf(wchar_t *str, size_t maxlen, const wchar_t *fmt, va_list ap) -{ - FILE f; - int len; - f._flag = _IOWRT|_IOSTRG|_IOBINARY; - f._ptr = (char*)str; - f._cnt = maxlen; - f._file = -1; - len = vfwprintf(&f,fmt, ap); - // what if the buffer is full ?? - *(wchar_t*)f._ptr = 0; - return len; -} - - diff --git a/reactos/lib/msvcrt/stdio/vsscanf.c b/reactos/lib/msvcrt/stdio/vsscanf.c deleted file mode 100644 index b24fe72f620..00000000000 --- a/reactos/lib/msvcrt/stdio/vsscanf.c +++ /dev/null @@ -1,50 +0,0 @@ -/* Copyright (C) 1991, 1992, 1995, 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. - -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -The GNU C 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include -#include -#include -#include -#include -#include - -#undef vsscanf - -/* Read formatted input from S according to the format - string FORMAT, using the argument list in ARG. */ -int __vsscanf(const char *s,const char *format,va_list arg) -{ - FILE f; - - if (s == NULL) - { - __set_errno(EINVAL); - return -1; - } - - memset((void *) &f, 0, sizeof (f)); - - f._flag = _IOREAD|_IOSTRG|_IOBINARY; - f._ptr = (char *)s; - f._base = (char *)s; - f._bufsiz = strlen(s); - f._cnt = f._bufsiz; - - return __vfscanf(&f, format, arg); -} - diff --git a/reactos/lib/msvcrt/stdio/wfdopen.c b/reactos/lib/msvcrt/stdio/wfdopen.c deleted file mode 100644 index 08bbeb9455c..00000000000 --- a/reactos/lib/msvcrt/stdio/wfdopen.c +++ /dev/null @@ -1,57 +0,0 @@ -#include -#include - -FILE* __alloc_file(void); - - -/* - * @implemented - */ -FILE* _wfdopen(int handle, wchar_t* mode) -{ - FILE* file; - int rw; - - if (handle == 0) - return stdin; - - if (handle == 1) - return stdout; - - if (handle == 2) - return stderr; - - if (handle == 3) - return stdaux; - - if (handle == 4) - return stdprn; - - file = __alloc_file(); - if (file == NULL) - return NULL; - file->_file = handle; - - rw = (mode[1] == L'+') || (mode[1] && (mode[2] == L'+')); - - if (*mode == L'a') - _lseek(handle, 0, SEEK_END); - - file->_cnt = 0; - file->_file = handle; - file->_bufsiz = 0; - -// The mode of the stream must be compatible with the mode of the file descriptor. -// this should be checked. - - if (rw) - file->_flag = _IOREAD | _IOWRT; - else if (*mode == L'r') - file->_flag = _IOREAD; - else - file->_flag = _IOWRT; - - file->_base = file->_ptr = NULL; - - return file; -} diff --git a/reactos/lib/msvcrt/stdio/wrename.c b/reactos/lib/msvcrt/stdio/wrename.c deleted file mode 100644 index 1c78865ea2d..00000000000 --- a/reactos/lib/msvcrt/stdio/wrename.c +++ /dev/null @@ -1,18 +0,0 @@ -#include "precomp.h" -#include -#include - - -/* - * @implemented - */ -int _wrename(const wchar_t* old_, const wchar_t* new_) -{ - if (old_ == NULL || new_ == NULL) - return -1; - - if (!MoveFileW(old_, new_)) - return -1; - - return 0; -} diff --git a/reactos/lib/msvcrt/stdio/wtempnam.c b/reactos/lib/msvcrt/stdio/wtempnam.c deleted file mode 100644 index 4f73f8c9d0d..00000000000 --- a/reactos/lib/msvcrt/stdio/wtempnam.c +++ /dev/null @@ -1,25 +0,0 @@ -#include "precomp.h" -#include -#include - - -/* - * @implemented - */ -wchar_t* _wtempnam(const wchar_t* dir, const wchar_t* prefix) -{ - wchar_t* TempFileName = malloc(MAX_PATH); - wchar_t* d; - - if (dir == NULL) - d = _wgetenv(L"TMP"); - else - d = (wchar_t*)dir; - - if (GetTempFileNameW(d, prefix, 1, TempFileName) == 0) { - free(TempFileName); - return NULL; - } - - return TempFileName; -} diff --git a/reactos/lib/msvcrt/stdio/wtmpnam.c b/reactos/lib/msvcrt/stdio/wtmpnam.c deleted file mode 100644 index 770e6ecacb0..00000000000 --- a/reactos/lib/msvcrt/stdio/wtmpnam.c +++ /dev/null @@ -1,19 +0,0 @@ -#include "precomp.h" -#include -#include - - -/* - * @implemented - */ -wchar_t* _wtmpnam(wchar_t* s) -{ - wchar_t PathName[MAX_PATH]; - static wchar_t static_buf[MAX_PATH]; - - GetTempPathW(MAX_PATH, PathName); - GetTempFileNameW(PathName, L"ARI", 007, static_buf); - wcscpy(s, static_buf); - - return s; -} diff --git a/reactos/lib/msvcrt/stdlib/_exit.c b/reactos/lib/msvcrt/stdlib/_exit.c deleted file mode 100644 index cb7b5e1a37b..00000000000 --- a/reactos/lib/msvcrt/stdlib/_exit.c +++ /dev/null @@ -1,58 +0,0 @@ -#include "precomp.h" -#include -#include -#include -#include - -struct __atexit *__atexit_ptr = 0; - -/* - * @implemented - */ -void exit(int status) -{ - //int i; - struct __atexit *a = __atexit_ptr; - __atexit_ptr = 0; /* to prevent infinite loops */ - while (a) - { - (a->__function)(); - a = a->__next; - } -/* - if (__stdio_cleanup_hook) - __stdio_cleanup_hook(); - for (i=0; i -#include -#include -#include - -char *msg ="Abort\n\r"; - -/* - * @implemented - */ -void abort() -{ - fflush(NULL); - fcloseall(); - raise(SIGABRT); - _write(stderr->_file, msg, sizeof(msg)-1); - exit(3); -} - diff --git a/reactos/lib/msvcrt/stdlib/abs.c b/reactos/lib/msvcrt/stdlib/abs.c deleted file mode 100644 index 3efdce831fd..00000000000 --- a/reactos/lib/msvcrt/stdlib/abs.c +++ /dev/null @@ -1,12 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include -#include - -/* - * @implemented - */ -int -abs(int j) -{ - return j<0 ? -j : j; -} diff --git a/reactos/lib/msvcrt/stdlib/atexit.c b/reactos/lib/msvcrt/stdlib/atexit.c deleted file mode 100644 index 6d08dfd160f..00000000000 --- a/reactos/lib/msvcrt/stdlib/atexit.c +++ /dev/null @@ -1,59 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include -#include - -typedef int (* _onexit_t)(void); - -/* - * @implemented - * - * Ported from WINE - * Copyright (C) 2000 Jon Griffiths - */ -_onexit_t __dllonexit(_onexit_t func, _onexit_t **start, _onexit_t **end) -{ - _onexit_t *tmp; - int len; - - if (!start || !*start || !end || !*end) - return NULL; - - len = (*end - *start); - if (++len <= 0) - return NULL; - - tmp = (_onexit_t *)realloc(*start, len * sizeof(tmp)); - if (!tmp) - return NULL; - - *start = tmp; - *end = tmp + len; - tmp[len - 1] = func; - - return func; -} - -/* - * @implemented - */ -_onexit_t _onexit(_onexit_t a) -{ - struct __atexit *ap; - if (a == 0) - return NULL; - ap = (struct __atexit *)malloc(sizeof(struct __atexit)); - if (!ap) - return NULL; - ap->__next = __atexit_ptr; - ap->__function = (void (*)(void))a; - __atexit_ptr = ap; - return a; -} - -/* - * @implemented - */ -int atexit(void (*a)(void)) -{ - return _onexit((_onexit_t)a) == (_onexit_t)a ? 0 : -1; -} diff --git a/reactos/lib/msvcrt/stdlib/atof.c b/reactos/lib/msvcrt/stdlib/atof.c deleted file mode 100644 index e3021084b92..00000000000 --- a/reactos/lib/msvcrt/stdlib/atof.c +++ /dev/null @@ -1,11 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include - -/* - * @implemented - */ -double -atof(const char *ascii) -{ - return strtod(ascii, 0); -} diff --git a/reactos/lib/msvcrt/stdlib/atoi.c b/reactos/lib/msvcrt/stdlib/atoi.c deleted file mode 100644 index df6a0c47002..00000000000 --- a/reactos/lib/msvcrt/stdlib/atoi.c +++ /dev/null @@ -1,11 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include - -/* - * @implemented - */ -int -atoi(const char *str) -{ - return (int)strtol(str, 0, 10); -} diff --git a/reactos/lib/msvcrt/stdlib/atoi64.c b/reactos/lib/msvcrt/stdlib/atoi64.c deleted file mode 100644 index 6855b90fbcd..00000000000 --- a/reactos/lib/msvcrt/stdlib/atoi64.c +++ /dev/null @@ -1,34 +0,0 @@ - -#include -#include - -/* - * @implemented - */ -__int64 -_atoi64(const char *nptr) -{ - char *s = (char *)nptr; - __int64 acc = 0; - int neg = 0; - - while(isspace((int)*s)) - s++; - if (*s == '-') - { - neg = 1; - s++; - } - else if (*s == '+') - s++; - - while (isdigit((int)*s)) - { - acc = 10 * acc + ((int)*s - '0'); - s++; - } - - if (neg) - acc *= -1; - return acc; -} diff --git a/reactos/lib/msvcrt/stdlib/atol.c b/reactos/lib/msvcrt/stdlib/atol.c deleted file mode 100644 index 663301d95fc..00000000000 --- a/reactos/lib/msvcrt/stdlib/atol.c +++ /dev/null @@ -1,11 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include - -/* - * @implemented - */ -long -atol(const char *str) -{ - return strtol(str, 0, 10); -} diff --git a/reactos/lib/msvcrt/stdlib/atold.c b/reactos/lib/msvcrt/stdlib/atold.c deleted file mode 100644 index c9b511684a4..00000000000 --- a/reactos/lib/msvcrt/stdlib/atold.c +++ /dev/null @@ -1,8 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include - -long double -_atold(const char *ascii) -{ - return _strtold(ascii, 0); -} diff --git a/reactos/lib/msvcrt/stdlib/bsearch.c b/reactos/lib/msvcrt/stdlib/bsearch.c deleted file mode 100644 index 7efbdbd9897..00000000000 --- a/reactos/lib/msvcrt/stdlib/bsearch.c +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include - -/* - * @implemented - */ -void * -bsearch(const void *key, const void *base0, size_t nelem, - size_t size, int (*cmp)(const void *ck, const void *ce)) -{ - char *base = (char *)base0; - int lim, cmpval; - void *p; - - for (lim = nelem; lim != 0; lim >>= 1) - { - p = base + (lim >> 1) * size; - cmpval = (*cmp)(key, p); - if (cmpval == 0) - return p; - if (cmpval > 0) - { /* key > p: move right */ - base = (char *)p + size; - lim--; - } /* else move left */ - } - return 0; -} diff --git a/reactos/lib/msvcrt/stdlib/div.c b/reactos/lib/msvcrt/stdlib/div.c deleted file mode 100644 index 56b8b4422f8..00000000000 --- a/reactos/lib/msvcrt/stdlib/div.c +++ /dev/null @@ -1,27 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include - -/* - * @implemented - */ -div_t -div(int num, int denom) -{ - div_t r; - - if (num > 0 && denom < 0) { - num = -num; - denom = -denom; - } - r.quot = num / denom; - r.rem = num % denom; - if (num < 0 && denom > 0) - { - if (r.rem > 0) - { - r.quot++; - r.rem -= denom; - } - } - return r; -} diff --git a/reactos/lib/msvcrt/stdlib/doserrmap.h b/reactos/lib/msvcrt/stdlib/doserrmap.h deleted file mode 100644 index 3b1307146f4..00000000000 --- a/reactos/lib/msvcrt/stdlib/doserrmap.h +++ /dev/null @@ -1,82 +0,0 @@ -/* doserrmap.h: auto-generated from winerror.h and errno.h using undoc'd _dosmaperr. */ - -#ifndef doserrmap_h -#define doserrmap_h - -struct { - unsigned long winerr; - int en; -} doserrmap[] = { - { ERROR_FILE_NOT_FOUND, ENOENT }, - { ERROR_PATH_NOT_FOUND, ENOENT }, - { ERROR_TOO_MANY_OPEN_FILES, EMFILE }, - { ERROR_ACCESS_DENIED, EACCES }, - { ERROR_INVALID_HANDLE, EBADF }, - { ERROR_ARENA_TRASHED, ENOMEM }, - { ERROR_NOT_ENOUGH_MEMORY, ENOMEM }, - { ERROR_INVALID_BLOCK, ENOMEM }, - { ERROR_BAD_ENVIRONMENT, E2BIG }, - { ERROR_BAD_FORMAT, ENOEXEC }, - { ERROR_INVALID_DRIVE, ENOENT }, - { ERROR_CURRENT_DIRECTORY, EACCES }, - { ERROR_NOT_SAME_DEVICE, EXDEV }, - { ERROR_NO_MORE_FILES, ENOENT }, - { ERROR_WRITE_PROTECT, EACCES }, - { ERROR_BAD_UNIT, EACCES }, - { ERROR_NOT_READY, EACCES }, - { ERROR_BAD_COMMAND, EACCES }, - { ERROR_CRC, EACCES }, - { ERROR_BAD_LENGTH, EACCES }, - { ERROR_SEEK, EACCES }, - { ERROR_NOT_DOS_DISK, EACCES }, - { ERROR_SECTOR_NOT_FOUND, EACCES }, - { ERROR_OUT_OF_PAPER, EACCES }, - { ERROR_WRITE_FAULT, EACCES }, - { ERROR_READ_FAULT, EACCES }, - { ERROR_GEN_FAILURE, EACCES }, - { ERROR_SHARING_VIOLATION, EACCES }, - { ERROR_LOCK_VIOLATION, EACCES }, - { ERROR_WRONG_DISK, EACCES }, - { ERROR_SHARING_BUFFER_EXCEEDED, EACCES }, - { ERROR_BAD_NETPATH, ENOENT }, - { ERROR_NETWORK_ACCESS_DENIED, EACCES }, - { ERROR_BAD_NET_NAME, ENOENT }, - { ERROR_FILE_EXISTS, EEXIST }, - { ERROR_CANNOT_MAKE, EACCES }, - { ERROR_FAIL_I24, EACCES }, - { ERROR_NO_PROC_SLOTS, EAGAIN }, - { ERROR_DRIVE_LOCKED, EACCES }, - { ERROR_BROKEN_PIPE, EPIPE }, - { ERROR_DISK_FULL, ENOSPC }, - { ERROR_INVALID_TARGET_HANDLE, EBADF }, - { ERROR_WAIT_NO_CHILDREN, ECHILD }, - { ERROR_CHILD_NOT_COMPLETE, ECHILD }, - { ERROR_DIRECT_ACCESS_HANDLE, EBADF }, - { ERROR_SEEK_ON_DEVICE, EACCES }, - { ERROR_DIR_NOT_EMPTY, ENOTEMPTY }, - { ERROR_NOT_LOCKED, EACCES }, - { ERROR_BAD_PATHNAME, ENOENT }, - { ERROR_MAX_THRDS_REACHED, EAGAIN }, - { ERROR_LOCK_FAILED, EACCES }, - { ERROR_ALREADY_EXISTS, EEXIST }, - { ERROR_INVALID_STARTING_CODESEG, ENOEXEC }, - { ERROR_INVALID_STACKSEG, ENOEXEC }, - { ERROR_INVALID_MODULETYPE, ENOEXEC }, - { ERROR_INVALID_EXE_SIGNATURE, ENOEXEC }, - { ERROR_EXE_MARKED_INVALID, ENOEXEC }, - { ERROR_BAD_EXE_FORMAT, ENOEXEC }, - { ERROR_ITERATED_DATA_EXCEEDS_64k, ENOEXEC }, - { ERROR_INVALID_MINALLOCSIZE, ENOEXEC }, - { ERROR_DYNLINK_FROM_INVALID_RING, ENOEXEC }, - { ERROR_IOPL_NOT_ENABLED, ENOEXEC }, - { ERROR_INVALID_SEGDPL, ENOEXEC }, - { ERROR_AUTODATASEG_EXCEEDS_64k, ENOEXEC }, - { ERROR_RING2SEG_MUST_BE_MOVABLE, ENOEXEC }, - { ERROR_RELOC_CHAIN_XEEDS_SEGLIM, ENOEXEC }, - { ERROR_INFLOOP_IN_RELOC_CHAIN, ENOEXEC }, - { ERROR_FILENAME_EXCED_RANGE, ENOENT }, - { ERROR_NESTING_NOT_ALLOWED, EAGAIN }, - { ERROR_NOT_ENOUGH_QUOTA, ENOMEM } -}; - -#endif /* doserrmap_h */ diff --git a/reactos/lib/msvcrt/stdlib/ecvt.c b/reactos/lib/msvcrt/stdlib/ecvt.c deleted file mode 100644 index 940ffb2ed27..00000000000 --- a/reactos/lib/msvcrt/stdlib/ecvt.c +++ /dev/null @@ -1,15 +0,0 @@ -/* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ -#include -#include - -char *ecvtbuf (double, int, int *, int *, char *); - -/* - * @implemented - */ -char * -_ecvt (double value, int ndigits, int *decpt, int *sign) -{ - static char ecvt_buf[DBL_MAX_10_EXP + 10]; - return ecvtbuf (value, ndigits, decpt, sign, ecvt_buf); -} diff --git a/reactos/lib/msvcrt/stdlib/ecvtbuf.c b/reactos/lib/msvcrt/stdlib/ecvtbuf.c deleted file mode 100644 index 1d0f65fbba8..00000000000 --- a/reactos/lib/msvcrt/stdlib/ecvtbuf.c +++ /dev/null @@ -1,108 +0,0 @@ -/* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ -#include -#include -#include -#include -#include -// #include - -void __ecvround (char *, char *, const char *, int *); - -void -__ecvround (char *numbuf, char *last_digit, const char *after_last, int *decpt) -{ - char *p; - int carry = 0; - - /* Do we have at all to round the last digit? */ - if (*after_last > '4') - { - p = last_digit; - carry = 1; - - /* Propagate the rounding through trailing '9' digits. */ - do { - int sum = *p + carry; - carry = sum > '9'; - *p-- = sum - carry * 10; - } while (carry && p >= numbuf); - - /* We have 9999999... which needs to be rounded to 100000.. */ - if (carry && p == numbuf) - { - *p = '1'; - *decpt += 1; - } - } -} - -char * -ecvtbuf (double value, int ndigits, int *decpt, int *sign, char *buf) -{ - static char INFINITY[] = "Infinity"; - char decimal = '.' /* localeconv()->decimal_point[0] */; - char *cvtbuf = (char *)alloca (ndigits + 20); /* +3 for sign, dot, null; */ - /* two extra for rounding */ - /* 15 extra for alignment */ - char *s = cvtbuf, *d = buf; - - /* Produce two extra digits, so we could round properly. */ - sprintf (cvtbuf, "%-+.*E", ndigits + 2, value); - *decpt = 0; - - /* The sign. */ - if (*s++ == '-') - *sign = 1; - else - *sign = 0; - - /* Special values get special treatment. */ - if (strncmp (s, "Inf", 3) == 0) - { - /* SunOS docs says we have return "Infinity" for NDIGITS >= 8. */ - memcpy (buf, INFINITY, ndigits >= 8 ? 9 : 3); - if (ndigits < 8) - buf[3] = '\0'; - } - else if (strcmp (s, "NaN") == 0) - memcpy (buf, s, 4); - else - { - char *last_digit, *digit_after_last; - - /* Copy (the single) digit before the decimal. */ - while (*s && *s != decimal && d - buf < ndigits) - *d++ = *s++; - - /* If we don't see any exponent, here's our decimal point. */ - *decpt = d - buf; - if (*s) - s++; - - /* Copy the fraction digits. */ - while (*s && *s != 'E' && d - buf < ndigits) - *d++ = *s++; - - /* Remember the last digit copied and the one after it. */ - last_digit = d > buf ? d - 1 : d; - digit_after_last = s; - - /* Get past the E in exponent field. */ - while (*s && *s++ != 'E') - ; - - /* Adjust the decimal point by the exponent value. */ - *decpt += atoi (s); - - /* Pad with zeroes if needed. */ - while (d - buf < ndigits) - *d++ = '0'; - - /* Zero-terminate. */ - *d = '\0'; - - /* Round if necessary. */ - __ecvround (buf, last_digit, digit_after_last, decpt); - } - return buf; -} diff --git a/reactos/lib/msvcrt/stdlib/errno.c b/reactos/lib/msvcrt/stdlib/errno.c deleted file mode 100644 index cb3b00b4ecd..00000000000 --- a/reactos/lib/msvcrt/stdlib/errno.c +++ /dev/null @@ -1,81 +0,0 @@ -/* $Id$ - * - */ -#ifdef __USE_W32API -#undef __USE_W32API -#endif - -#include -#include -#include - -#include "doserrmap.h" - -/* - * @implemented - */ -int* __doserrno(void) -{ - return (int*)(&GetThreadData()->tdoserrno); -} - -/* - * @implemented - */ -int *_errno(void) -{ - return(&GetThreadData()->terrno); -} - - -int __set_doserrno(int error) -{ - PTHREADDATA ThreadData; - - ThreadData = GetThreadData(); - if (ThreadData) - ThreadData->tdoserrno = error; - - return(error); -} - -int __set_errno(int error) -{ - PTHREADDATA ThreadData; - - ThreadData = GetThreadData(); - if (ThreadData) - ThreadData->terrno = error; - - return(error); -} - -/* - * This function sets both doserrno to the passed in OS error code - * and also maps this to an appropriate errno code. The mapping - * has been deduced automagically by running this functions, which - * exists in MSVCRT but is undocumented, on all the error codes in - * winerror.h. - */ -void _dosmaperr(unsigned long oserror) -{ - int pos, base, lim; - - __set_doserrno(oserror); - - /* Use binary chop to find the corresponding errno code */ - for (base=0, lim=sizeof(doserrmap)/sizeof(doserrmap[0]); lim; lim >>= 1) { - pos = base+(lim >> 1); - if (doserrmap[pos].winerr == oserror) { - __set_errno(doserrmap[pos].en); - return; - } else if (doserrmap[pos].winerr < oserror) { - base = pos + 1; - --lim; - } - } - /* EINVAL appears to be the default */ - __set_errno(EINVAL); -} - -/* EOF */ diff --git a/reactos/lib/msvcrt/stdlib/fcvt.c b/reactos/lib/msvcrt/stdlib/fcvt.c deleted file mode 100644 index 423b7f2380d..00000000000 --- a/reactos/lib/msvcrt/stdlib/fcvt.c +++ /dev/null @@ -1,15 +0,0 @@ -/* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ -#include -#include - -char *fcvtbuf (double, int, int *, int *, char *); - -/* - * @implemented - */ -char * -_fcvt (double value, int ndigits, int *decpt, int *sign) -{ - static char fcvt_buf[2 * DBL_MAX_10_EXP + 10]; - return fcvtbuf (value, ndigits, decpt, sign, fcvt_buf); -} diff --git a/reactos/lib/msvcrt/stdlib/fcvtbuf.c b/reactos/lib/msvcrt/stdlib/fcvtbuf.c deleted file mode 100644 index 2bf85aa6483..00000000000 --- a/reactos/lib/msvcrt/stdlib/fcvtbuf.c +++ /dev/null @@ -1,61 +0,0 @@ -/* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ -#include -#include -#include -#include -#include -// #include - -void __ecvround (char *, char *, const char *, int *); -char *ecvtbuf (double, int, int *, int *, char *); - -char * -fcvtbuf (double value, int ndigits, int *decpt, int *sign, char *buf) -{ - static char INFINITY[] = "Infinity"; - char decimal = '.' /* localeconv()->decimal_point[0] */; - int digits = ndigits >= 0 ? ndigits : 0; - char *cvtbuf = (char *)alloca (2*DBL_MAX_10_EXP + 16); - char *s = cvtbuf; - char *dot; - - sprintf (cvtbuf, "%-+#.*f", DBL_MAX_10_EXP + digits + 1, value); - - /* The sign. */ - if (*s++ == '-') - *sign = 1; - else - *sign = 0; - - /* Where's the decimal point? */ - dot = strchr (s, decimal); - *decpt = dot ? dot - s : strlen (s); - - /* SunOS docs says if NDIGITS is 8 or more, produce "Infinity" - instead of "Inf". */ - if (strncmp (s, "Inf", 3) == 0) - { - memcpy (buf, INFINITY, ndigits >= 8 ? 9 : 3); - if (ndigits < 8) - buf[3] = '\0'; - return buf; - } - else if (ndigits < 0) - return ecvtbuf (value, *decpt + ndigits, decpt, sign, buf); - else if (*s == '0' && value != 0.0) - return ecvtbuf (value, ndigits, decpt, sign, buf); - else - { - memcpy (buf, s, *decpt); - if (s[*decpt] == decimal) - { - memcpy (buf + *decpt, s + *decpt + 1, ndigits); - buf[*decpt + ndigits] = '\0'; - } - else - buf[*decpt] = '\0'; - __ecvround (buf, buf + *decpt + ndigits - 1, - s + *decpt + ndigits + 1, decpt); - return buf; - } -} diff --git a/reactos/lib/msvcrt/stdlib/fullpath.c b/reactos/lib/msvcrt/stdlib/fullpath.c deleted file mode 100644 index 8f61c94e76e..00000000000 --- a/reactos/lib/msvcrt/stdlib/fullpath.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/msvcrt/stdlib/fullpath.c - * PURPOSE: Gets the fullpathname - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 28/12/98: Created - */ - -#include "precomp.h" -#include - - -/* - * @implemented - */ -char* _fullpath(char* absPath, const char* relPath, size_t maxLength) -{ - char* lpFilePart; - - if (GetFullPathNameA(relPath,maxLength,absPath,&lpFilePart) == 0) - return NULL; - - return absPath; -} diff --git a/reactos/lib/msvcrt/stdlib/gcvt.c b/reactos/lib/msvcrt/stdlib/gcvt.c deleted file mode 100644 index c077566c83a..00000000000 --- a/reactos/lib/msvcrt/stdlib/gcvt.c +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ -#include -#include -#include - -/* - * @implemented - */ -char * -_gcvt (double value, int ndigits, char *buf) -{ - char *p = buf; - - sprintf (buf, "%-#.*g", ndigits, value); - - /* It seems they expect us to return .XXXX instead of 0.XXXX */ - if (*p == '-') - p++; - if (*p == '0' && p[1] == '.') - memmove (p, p + 1, strlen (p + 1) + 1); - - /* They want Xe-YY, not X.e-YY, and XXXX instead of XXXX. */ - p = strchr (buf, 'e'); - if (!p) - { - p = buf + strlen (buf); - /* They don't want trailing zeroes. */ - while (p[-1] == '0' && p > buf + 2) - *--p = '\0'; - } - if (p > buf && p[-1] == '.') - memmove (p - 1, p, strlen (p) + 1); - return buf; -} diff --git a/reactos/lib/msvcrt/stdlib/getenv.c b/reactos/lib/msvcrt/stdlib/getenv.c deleted file mode 100644 index ba704782643..00000000000 --- a/reactos/lib/msvcrt/stdlib/getenv.c +++ /dev/null @@ -1,43 +0,0 @@ -#include "precomp.h" -#include - -#define NDEBUG -#include - -#undef environ - -/* - * @implemented - */ -char *getenv(const char *name) -{ - char **environ; - unsigned int length = strlen(name); - - for (environ = *__p__environ(); *environ; environ++) - { - char *str = *environ; - char *pos = strchr(str,'='); - if (pos && ((pos - str) == length) && !strnicmp(str, name, length)) - return pos + 1; - } - return NULL; -} - -/* - * @implemented - */ -wchar_t *_wgetenv(const wchar_t *name) -{ - wchar_t **environ; - unsigned int length = wcslen(name); - - for (environ = *__p__wenviron(); *environ; environ++) - { - wchar_t *str = *environ; - wchar_t *pos = wcschr(str, L'='); - if (pos && ((pos - str) == length) && !wcsnicmp(str, name, length)) - return pos + 1; - } - return NULL; -} diff --git a/reactos/lib/msvcrt/stdlib/itoa.c b/reactos/lib/msvcrt/stdlib/itoa.c deleted file mode 100644 index 004efc7ac6c..00000000000 --- a/reactos/lib/msvcrt/stdlib/itoa.c +++ /dev/null @@ -1,143 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/msvcrt/stdlib/itoa.c - * PURPOSE: converts a integer to ascii - * PROGRAMER: - * UPDATE HISTORY: - * 1995: Created - * 1998: Added ltoa Boudewijn Dekker - */ -/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ - -#include -#include -#include - - -/* - * @implemented - */ -char* _itoa(int value, char* string, int radix) -{ - char tmp[33]; - char* tp = tmp; - int i; - unsigned v; - int sign; - char* sp; - - if (radix > 36 || radix <= 1) - { - __set_errno(EDOM); - return 0; - } - - sign = (radix == 10 && value < 0); - if (sign) - v = -value; - else - v = (unsigned)value; - while (v || tp == tmp) - { - i = v % radix; - v = v / radix; - if (i < 10) - *tp++ = i+'0'; - else - *tp++ = i + 'a' - 10; - } - - if (string == 0) - string = (char*)malloc((tp-tmp)+sign+1); - sp = string; - - if (sign) - *sp++ = '-'; - while (tp > tmp) - *sp++ = *--tp; - *sp = 0; - return string; -} - -/* - * @implemented - */ -char* _ltoa(long value, char* string, int radix) -{ - char tmp[33]; - char* tp = tmp; - long i; - unsigned long v; - int sign; - char* sp; - - if (radix > 36 || radix <= 1) - { - __set_errno(EDOM); - return 0; - } - - sign = (radix == 10 && value < 0); - if (sign) - v = -value; - else - v = (unsigned long)value; - while (v || tp == tmp) - { - i = v % radix; - v = v / radix; - if (i < 10) - *tp++ = i+'0'; - else - *tp++ = i + 'a' - 10; - } - - if (string == 0) - string = (char*)malloc((tp-tmp)+sign+1); - sp = string; - - if (sign) - *sp++ = '-'; - while (tp > tmp) - *sp++ = *--tp; - *sp = 0; - return string; -} - -/* - * @implemented - */ -char* _ultoa(unsigned long value, char* string, int radix) -{ - char tmp[33]; - char* tp = tmp; - long i; - unsigned long v = value; - char* sp; - - if (radix > 36 || radix <= 1) - { - __set_errno(EDOM); - return 0; - } - - while (v || tp == tmp) - { - i = v % radix; - v = v / radix; - if (i < 10) - *tp++ = i+'0'; - else - *tp++ = i + 'a' - 10; - } - - if (string == 0) - string = (char*)malloc((tp-tmp)+1); - sp = string; - - while (tp > tmp) - *sp++ = *--tp; - *sp = 0; - return string; -} diff --git a/reactos/lib/msvcrt/stdlib/itow.c b/reactos/lib/msvcrt/stdlib/itow.c deleted file mode 100644 index 1939d1a6ff0..00000000000 --- a/reactos/lib/msvcrt/stdlib/itow.c +++ /dev/null @@ -1,156 +0,0 @@ -/* $Id$ - * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/msvcrt/stdlib/itow.c - * PURPOSE: converts a integer to wchar_t - * PROGRAMER: - * UPDATE HISTORY: - * 1995: Created - * 1998: Added ltoa Boudewijn Dekker - * 2000: derived from ./itoa.c by ea - */ -/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ - -#include -#include -#include - - -/* - * @implemented - */ -wchar_t* _itow(int value, wchar_t* string, int radix) -{ - wchar_t tmp [33]; - wchar_t * tp = tmp; - int i; - unsigned int v; - int sign; - wchar_t * sp; - - if (radix > 36 || radix <= 1) - { - __set_errno(EDOM); - return 0; - } - - sign = ((radix == 10) && (value < 0)); - if (sign) { - v = -value; - } else { - v = (unsigned) value; - } - while (v || tp == tmp) { - i = v % radix; - v = v / radix; - if (i < 10) { - *tp++ = i+ (wchar_t) '0'; - } else { - *tp++ = i + (wchar_t) 'a' - 10; - } - } - - if (string == 0) { - string = (wchar_t*) malloc((tp-tmp) + (sign + 1) * sizeof(wchar_t)); - } - sp = string; - - if (sign) { - *sp++ = (wchar_t) '-'; - } - while (tp > tmp) { - *sp++ = *--tp; - } - *sp = (wchar_t) 0; - return string; -} - -/* - * @implemented - */ -wchar_t* _ltow(long value, wchar_t* string, int radix) -{ - wchar_t tmp [33]; - wchar_t* tp = tmp; - long int i; - unsigned long int v; - int sign; - wchar_t* sp; - - if (radix > 36 || radix <= 1) { - __set_errno(EDOM); - return 0; - } - - sign = ((radix == 10) && (value < 0)); - if (sign) { - v = -value; - } else { - v = (unsigned long) value; - } - while (v || tp == tmp) { - i = v % radix; - v = v / radix; - if (i < 10) { - *tp++ = i + (wchar_t) '0'; - } else { - *tp++ = i + (wchar_t) 'a' - 10; - } - } - - if (string == 0) { - string = (wchar_t*) malloc((tp - tmp) + (sign + 1) * sizeof(wchar_t)); - } - sp = string; - - if (sign) { - *sp++ = (wchar_t) '-'; - } - while (tp > tmp) { - *sp++ = *--tp; - } - *sp = (wchar_t) 0; - return string; -} - -/* - * @unimplemented - */ -wchar_t* _ultow(unsigned long value, wchar_t* string, int radix) -{ - wchar_t tmp [33]; - wchar_t* tp = tmp; - long int i; - unsigned long int v = value; - wchar_t* sp; - - if (radix > 36 || radix <= 1) { - __set_errno(EDOM); - return 0; - } - while (v || tp == tmp) { - i = v % radix; - v = v / radix; - if (i < 10) { - *tp++ = i + (wchar_t) '0'; - } else { - *tp++ = i + (wchar_t) 'a' - 10; - } - } - - if (string == 0) { -#ifdef _MSVCRT_LIB_ // TODO: check on difference? - string = (wchar_t*)malloc(((tp-tmp)+1)*sizeof(wchar_t)); -#else // TODO: FIXME: review which is correct - string = (wchar_t*)malloc((tp - tmp) + sizeof(wchar_t)); -#endif /*_MSVCRT_LIB_*/ - } - sp = string; - - while (tp > tmp) { - *sp++ = *--tp; - } - *sp = (wchar_t) 0; - return string; -} diff --git a/reactos/lib/msvcrt/stdlib/labs.c b/reactos/lib/msvcrt/stdlib/labs.c deleted file mode 100644 index 8c1d3fff3f0..00000000000 --- a/reactos/lib/msvcrt/stdlib/labs.c +++ /dev/null @@ -1,12 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include -#include - -/* - * @implemented - */ -long -labs(long j) -{ - return j<0 ? -j : j; -} diff --git a/reactos/lib/msvcrt/stdlib/ldiv.c b/reactos/lib/msvcrt/stdlib/ldiv.c deleted file mode 100644 index a40597d0e95..00000000000 --- a/reactos/lib/msvcrt/stdlib/ldiv.c +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include - -/* - * @implemented - */ -ldiv_t -ldiv(long num, long denom) -{ - ldiv_t r; - - if (num > 0 && denom < 0) - { - num = -num; - denom = -denom; - } - r.quot = num / denom; - r.rem = num % denom; - if (num < 0 && denom > 0) - { - if (r.rem > 0) - { - r.quot++; - r.rem -= denom; - } - } - return r; -} diff --git a/reactos/lib/msvcrt/stdlib/makepath.c b/reactos/lib/msvcrt/stdlib/makepath.c deleted file mode 100644 index 2ca367f1307..00000000000 --- a/reactos/lib/msvcrt/stdlib/makepath.c +++ /dev/null @@ -1,36 +0,0 @@ -/* $Id$ - */ -#include -#include - -/* - * @implemented - */ -void _makepath(char* path, const char* drive, const char* dir, const char* fname, const char* ext) -{ - int dir_len; - - if ((drive != NULL) && (*drive)) { - path[0] = *drive; - path[1] = ':'; - path[2] = 0; - } else { - (*path)=0; - } - - if (dir != NULL) { - strcat(path, dir); - dir_len = strlen(dir); - if (dir_len && *(dir + dir_len - 1) != '\\') - strcat(path, "\\"); - } - - if (fname != NULL) { - strcat(path, fname); - if (ext != NULL && *ext != 0) { - if (*ext != '.') - strcat(path, "."); - strcat(path, ext); - } - } -} diff --git a/reactos/lib/msvcrt/stdlib/malloc.c b/reactos/lib/msvcrt/stdlib/malloc.c deleted file mode 100644 index 95e715ae76f..00000000000 --- a/reactos/lib/msvcrt/stdlib/malloc.c +++ /dev/null @@ -1,118 +0,0 @@ -/* - * msvcrt.dll heap functions - * - * Copyright 2000 Jon Griffiths - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * Note: Win32 heap operations are MT safe. We only lock the new - * handler and non atomic heap operations - */ - -#include "precomp.h" -#include -#include - -extern HANDLE hHeap; - -/* - * @implemented - */ -void* malloc(size_t _size) -{ - return HeapAlloc(hHeap, HEAP_ZERO_MEMORY, _size); -} - -/* - * @implemented - */ -void free(void* _ptr) -{ - HeapFree(hHeap,0,_ptr); -} - -/* - * @implemented - */ -void* calloc(size_t _nmemb, size_t _size) -{ - return HeapAlloc(hHeap, HEAP_ZERO_MEMORY, _nmemb*_size); -} - -/* - * @implemented - */ -void* realloc(void* _ptr, size_t _size) -{ - if (!_ptr) - return HeapAlloc(hHeap, 0, _size); - return HeapReAlloc(hHeap, 0, _ptr, _size); -} - -/* - * @implemented - */ -void* _expand(void* _ptr, size_t _size) -{ - return HeapReAlloc(hHeap, HEAP_REALLOC_IN_PLACE_ONLY, _ptr, _size); -} - -/* - * @implemented - */ -size_t _msize(void* _ptr) -{ - return HeapSize(hHeap, 0, _ptr); -} - -/* - * @implemented - */ -int _heapchk(void) -{ - if (!HeapValidate(hHeap, 0, NULL)) - return -1; - return 0; -} - -/* - * @implemented - */ -int _heapmin(void) -{ - if (!HeapCompact(hHeap, 0)) - return -1; - return 0; -} - -/* - * @implemented - */ -int _heapset(unsigned int unFill) -{ - if (_heapchk() == -1) - return -1; - return 0; - -} - -/* - * @implemented - */ -int _heapwalk(struct _heapinfo* entry) -{ - return 0; -} - diff --git a/reactos/lib/msvcrt/stdlib/mbstowcs.c b/reactos/lib/msvcrt/stdlib/mbstowcs.c deleted file mode 100644 index 823d61a8231..00000000000 --- a/reactos/lib/msvcrt/stdlib/mbstowcs.c +++ /dev/null @@ -1,123 +0,0 @@ -#include "precomp.h" -#include -#include -#include - -#if 1 -/* - * @unimplemented - */ -size_t mbstowcs(wchar_t* wcstr, const char* mbstr, size_t count) -{ - size_t size; - int i; - - printf("\nmbstowcs(%p, %p, %d) called.\n\n", wcstr, mbstr, count); - - if (count <= 0 || !mbstr) - return 0; - - if (!*mbstr) - return 0; - - - if (wcstr == NULL) { - // return required size for the converted string - return strlen(mbstr); // TODO: fixme - } - for (size = 0, i = 0; i < count; size++) { - int result; - -////int mbtowc( wchar_t *wchar, const char *mbchar, size_t count ) -//// result = mbtowc(wcstr + size, mbstr + i, count - i); -// result = mbtowc(wcstr + size, mbstr + i, 1); - -///////////////////////////////////////// - if (mbstr[i] == 0) { - result = 0; - } else { - wcstr[size] = mbstr[i]; - result = 1; - } -///////////////////////////////////////// - if (result == -1) { - return -1; - } else if (result == 0) { - wcstr[size] = L'\0'; - break; - } else { - i += result; - } - - } - return size; -} - -#else -#if 1 - -//int mbtowc(wchar_t *dst, const char *str, size_t n) -size_t mbstowcs(wchar_t* wcstr, const char* mbstr, size_t count) -{ - size_t len; - - if (count <= 0 || !mbstr) - return 0; - len = MultiByteToWideChar(CP_ACP, 0, mbstr, count, wcstr, (wcstr == NULL) ? 0 : count); - - if (!len) { - DWORD err = GetLastError(); - switch (err) { - case ERROR_INSUFFICIENT_BUFFER: - break; - case ERROR_INVALID_FLAGS: - break; - case ERROR_INVALID_PARAMETER: - break; - case ERROR_NO_UNICODE_TRANSLATION: - break; - default: - return 1; - } - return -1; - } - /* return the number of bytes from src that have been used */ - if (!*mbstr) - return 0; -// if (count >= 2 && isleadbyte(*mbstr) && mbstr[1]) -// return 2; - return len; -} - -#else - -size_t mbstowcs(wchar_t* wcstr, const char* mbstr, size_t count) -{ - size_t size; - int i; - - if (wcstr == NULL) { - // return required size for the converted string - return strlen(mbstr); // TODO: fixme - } - for (size = 0, i = 0; i < count; size++) { - int result; - -//int mbtowc( wchar_t *wchar, const char *mbchar, size_t count ) -// result = mbtowc(wcstr + size, mbstr + i, count - i); - result = mbtowc(wcstr + size, mbstr + i, 1); - if (result == -1) { - return -1; - } else if (result == 0) { - wcstr[size] = L'\0'; - break; - } else { - i += result; - } - - } - return (size_t)size; -} - -#endif -#endif diff --git a/reactos/lib/msvcrt/stdlib/mbtowc.c b/reactos/lib/msvcrt/stdlib/mbtowc.c deleted file mode 100644 index 8530f55db0d..00000000000 --- a/reactos/lib/msvcrt/stdlib/mbtowc.c +++ /dev/null @@ -1,55 +0,0 @@ -#include "precomp.h" -#include -#include - - -#if 1 - -/* - * @implemented - */ -int mbtowc(wchar_t *dst, const char *str, size_t n) -{ -// printf("\t\t\tmbtowc(%p, %p, %d) called.\n", dst, str, n); - - if (n <= 0 || !str) - return 0; - - *dst = *str; - - if (!*str) - return 0; - return 1; -} - -#else - -int mbtowc(wchar_t *dst, const char *str, size_t n) -{ - if (n <= 0 || !str) - return 0; - if (!MultiByteToWideChar(CP_ACP, 0, str, n, dst, (dst == NULL) ? 0 : 1)) { - DWORD err = GetLastError(); - switch (err) { - case ERROR_INSUFFICIENT_BUFFER: - break; - case ERROR_INVALID_FLAGS: - break; - case ERROR_INVALID_PARAMETER: - break; - case ERROR_NO_UNICODE_TRANSLATION: - break; - default: - return 1; - } - return -1; - } - /* return the number of bytes from src that have been used */ - if (!*str) - return 0; - if (n >= 2 && isleadbyte(*str) && str[1]) - return 2; - return 1; -} - -#endif diff --git a/reactos/lib/msvcrt/stdlib/obsol.c b/reactos/lib/msvcrt/stdlib/obsol.c deleted file mode 100644 index 48e465fc2d0..00000000000 --- a/reactos/lib/msvcrt/stdlib/obsol.c +++ /dev/null @@ -1,33 +0,0 @@ -#include "precomp.h" -#include - -#undef _cpumode -unsigned char _cpumode = 0; -unsigned char *_cpumode_dll = &_cpumode; - -/* - * @implemented - */ -void _seterrormode(int nMode) -{ - SetErrorMode(nMode); - return; -} - -/* - * @implemented - */ -void _beep(unsigned nFreq, unsigned nDur) -{ - Beep(nFreq,nDur); - return; -} - -/* - * @implemented - */ -void _sleep(unsigned long ulTime) -{ - Sleep(ulTime); - return; -} diff --git a/reactos/lib/msvcrt/stdlib/putenv.c b/reactos/lib/msvcrt/stdlib/putenv.c deleted file mode 100644 index 8921ee78cac..00000000000 --- a/reactos/lib/msvcrt/stdlib/putenv.c +++ /dev/null @@ -1,27 +0,0 @@ -#include "precomp.h" -#include -#include - -#define NDEBUG -#include - -/* misc/environ.c */ -int SetEnv(const wchar_t *option); - -/* - * @implemented - */ -int _putenv(const char* val) -{ - int size, result; - wchar_t *woption; - - size = MultiByteToWideChar(CP_ACP, 0, val, -1, NULL, 0); - woption = malloc(size* sizeof(wchar_t)); - if (woption == NULL) - return -1; - MultiByteToWideChar(CP_ACP, 0, val, -1, woption, size); - result = SetEnv(woption); - free(woption); - return result; -} diff --git a/reactos/lib/msvcrt/stdlib/qsort.c b/reactos/lib/msvcrt/stdlib/qsort.c deleted file mode 100644 index e5e662ad881..00000000000 --- a/reactos/lib/msvcrt/stdlib/qsort.c +++ /dev/null @@ -1,243 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#ifdef __USE_W32API -#undef __USE_W32API -#endif - -#include -#include - -/*- - * Copyright (c) 1980, 1983 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that: (1) source distributions retain this entire copyright - * notice and comment, and (2) distributions including binaries display - * the following acknowledgement: ``This product includes software - * developed by the University of California, Berkeley and its contributors'' - * in the documentation or other materials provided with the distribution - * and in all advertising materials mentioning features or use of this - * software. Neither the name of the University nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -/* - * qsort.c: - * Our own version of the system qsort routine which is faster by an average - * of 25%, with lows and highs of 10% and 50%. - * The THRESHold below is the insertion sort threshold, and has been adjusted - * for records of size 48 bytes. - * The MTHREShold is where we stop finding a better median. - */ - -#define THRESH 4 /* threshold for insertion */ -#define MTHRESH 6 /* threshold for median */ - -/* - * qst: - * Do a quicksort - * First, find the median element, and put that one in the first place as the - * discriminator. (This "median" is just the median of the first, last and - * middle elements). (Using this median instead of the first element is a big - * win). Then, the usual partitioning/swapping, followed by moving the - * discriminator into the right place. Then, figure out the sizes of the two - * partions, do the smaller one recursively and the larger one via a repeat of - * this code. Stopping when there are less than THRESH elements in a partition - * and cleaning up with an insertion sort (in our caller) is a huge win. - * All data swaps are done in-line, which is space-losing but time-saving. - * (And there are only three places where this is done). - */ - -static void -qst(PTHREADDATA pThreadData, char *base, char *max) -{ - char c, *i, *j, *jj; - int ii; - char *mid, *tmp; - int lo, hi; - - /* - * At the top here, lo is the number of characters of elements in the - * current partition. (Which should be max - base). - * Find the median of the first, last, and middle element and make - * that the middle element. Set j to largest of first and middle. - * If max is larger than that guy, then it's that guy, else compare - * max with loser of first and take larger. Things are set up to - * prefer the middle, then the first in case of ties. - */ - lo = max - base; /* number of elements as chars */ - do { - mid = i = base + pThreadData->qsz * ((lo / pThreadData->qsz) >> 1); - if (lo >= pThreadData->mthresh) - { - j = (pThreadData->qcmp((jj = base), i) > 0 ? jj : i); - if (pThreadData->qcmp(j, (tmp = max - pThreadData->qsz)) > 0) - { - /* switch to first loser */ - j = (j == jj ? i : jj); - if (pThreadData->qcmp(j, tmp) < 0) - j = tmp; - } - if (j != i) - { - ii = pThreadData->qsz; - do { - c = *i; - *i++ = *j; - *j++ = c; - } while (--ii); - } - } - /* - * Semi-standard quicksort partitioning/swapping - */ - for (i = base, j = max - pThreadData->qsz; ; ) - { - while (i < mid && pThreadData->qcmp(i, mid) <= 0) - i += pThreadData->qsz; - while (j > mid) - { - if (pThreadData->qcmp(mid, j) <= 0) - { - j -= pThreadData->qsz; - continue; - } - tmp = i + pThreadData->qsz; /* value of i after swap */ - if (i == mid) - { - /* j <-> mid, new mid is j */ - mid = jj = j; - } - else - { - /* i <-> j */ - jj = j; - j -= pThreadData->qsz; - } - goto swap; - } - if (i == mid) - { - break; - } - else - { - /* i <-> mid, new mid is i */ - jj = mid; - tmp = mid = i; /* value of i after swap */ - j -= pThreadData->qsz; - } - swap: - ii = pThreadData->qsz; - do { - c = *i; - *i++ = *jj; - *jj++ = c; - } while (--ii); - i = tmp; - } - /* - * Look at sizes of the two partitions, do the smaller - * one first by recursion, then do the larger one by - * making sure lo is its size, base and max are update - * correctly, and branching back. But only repeat - * (recursively or by branching) if the partition is - * of at least size THRESH. - */ - i = (j = mid) + pThreadData->qsz; - if ((lo = j - base) <= (hi = max - i)) - { - if (lo >= pThreadData->thresh) - qst(pThreadData, base, j); - base = i; - lo = hi; - } - else - { - if (hi >= pThreadData->thresh) - qst(pThreadData, i, max); - max = j; - } - } while (lo >= pThreadData->thresh); -} - -/* - * qsort: - * First, set up some global parameters for qst to share. Then, quicksort - * with qst(), and then a cleanup insertion sort ourselves. Sound simple? - * It's not... - * - * @implemented - */ -void -qsort(const void *base0, size_t n, size_t size, _pfunccmp_t compar) -{ - PTHREADDATA pThreadData; - char *base = (char *)base0; - char c, *i, *j, *lo, *hi; - char *min, *max; - - if (n <= 1) - return; - - pThreadData = GetThreadData(); - - pThreadData->qsz = size; - pThreadData->qcmp = compar; - pThreadData->thresh = pThreadData->qsz * THRESH; - pThreadData->mthresh = pThreadData->qsz * MTHRESH; - max = base + n * pThreadData->qsz; - if (n >= THRESH) - { - qst(pThreadData, base, max); - hi = base + pThreadData->thresh; - } - else - { - hi = max; - } - /* - * First put smallest element, which must be in the first THRESH, in - * the first position as a sentinel. This is done just by searching - * the first THRESH elements (or the first n if n < THRESH), finding - * the min, and swapping it into the first position. - */ - for (j = lo = base; (lo += pThreadData->qsz) < hi; ) - if (pThreadData->qcmp(j, lo) > 0) - j = lo; - if (j != base) - { - /* swap j into place */ - for (i = base, hi = base + pThreadData->qsz; i < hi; ) - { - c = *j; - *j++ = *i; - *i++ = c; - } - } - /* - * With our sentinel in place, we now run the following hyper-fast - * insertion sort. For each remaining element, min, from [1] to [n-1], - * set hi to the index of the element AFTER which this one goes. - * Then, do the standard insertion sort shift on a character at a time - * basis for each element in the frob. - */ - for (min = base; (hi = min += pThreadData->qsz) < max; ) - { - while (pThreadData->qcmp(hi -= pThreadData->qsz, min) > 0) - /* void */; - if ((hi += pThreadData->qsz) != min) { - for (lo = min + pThreadData->qsz; --lo >= min; ) - { - c = *lo; - for (i = j = lo; (j -= pThreadData->qsz) >= hi; i = j) - *i = *j; - *i = c; - } - } - } -} diff --git a/reactos/lib/msvcrt/stdlib/rand.c b/reactos/lib/msvcrt/stdlib/rand.c deleted file mode 100644 index fd4e9ead5ed..00000000000 --- a/reactos/lib/msvcrt/stdlib/rand.c +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#ifdef __USE_W32API -#undef __USE_W32API -#endif - -#include -#include - -/* - * @implemented - */ -int -rand(void) -{ - PTHREADDATA ThreadData = GetThreadData(); - -#ifdef HAVE_LONGLONG - ThreadData->tnext = ThreadData->tnext * 0x5deece66dLL + 11; -#else - ThreadData->tnext = ThreadData->tnext * 0x5deece66dL + 11; -#endif - return (int)((ThreadData->tnext >> 16) & RAND_MAX); -} - -/* - * @implemented - */ -void -srand(unsigned int seed) -{ - PTHREADDATA ThreadData = GetThreadData(); - - ThreadData->tnext = (ULONGLONG)seed; -} diff --git a/reactos/lib/msvcrt/stdlib/rot.c b/reactos/lib/msvcrt/stdlib/rot.c deleted file mode 100644 index c5f67aa200a..00000000000 --- a/reactos/lib/msvcrt/stdlib/rot.c +++ /dev/null @@ -1,69 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/msvcrt/stdlib/rot.c - * PURPOSE: Performs a bitwise rotation - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 03/04/99: Created - */ - -#include -#include - -/* - * @implemented - */ -unsigned int _rotl( unsigned int value, int shift ) -{ - int max_bits = sizeof(unsigned int)<<3; - if ( shift < 0 ) - return _rotr(value,-shift); - - if ( shift > max_bits ) - shift = shift % max_bits; - return (value << shift) | (value >> (max_bits-shift)); -} - -/* - * @implemented - */ -unsigned int _rotr( unsigned int value, int shift ) -{ - int max_bits = sizeof(unsigned int)<<3; - if ( shift < 0 ) - return _rotl(value,-shift); - - if ( shift > max_bits<<3 ) - shift = shift % max_bits; - return (value >> shift) | (value << (max_bits-shift)); -} - - -/* - * @implemented - */ -unsigned long _lrotl( unsigned long value, int shift ) -{ - int max_bits = sizeof(unsigned long)<<3; - if ( shift < 0 ) - return _lrotr(value,-shift); - - if ( shift > max_bits ) - shift = shift % max_bits; - return (value << shift) | (value >> (max_bits-shift)); -} - -/* - * @implemented - */ -unsigned long _lrotr( unsigned long value, int shift ) -{ - int max_bits = sizeof(unsigned long)<<3; - if ( shift < 0 ) - return _lrotl(value,-shift); - - if ( shift > max_bits ) - shift = shift % max_bits; - return (value >> shift) | (value << (max_bits-shift)); -} diff --git a/reactos/lib/msvcrt/stdlib/senv.c b/reactos/lib/msvcrt/stdlib/senv.c deleted file mode 100644 index be6e7e7e003..00000000000 --- a/reactos/lib/msvcrt/stdlib/senv.c +++ /dev/null @@ -1,36 +0,0 @@ -#include "precomp.h" -#include -#include - -#define NDEBUG -#include - - -/* - * @implemented - */ -void _searchenv(const char* file,const char* var,char* path) -{ - char* env = getenv(var); - char* x; - char* y; - char* FilePart; - - DPRINT("_searchenv()\n"); - - x = strchr(env,'='); - if ( x != NULL ) { - *x = 0; - x++; - } - y = strchr(env,';'); - while ( y != NULL ) { - *y = 0; - if ( SearchPathA(x,file,NULL,MAX_PATH,path,&FilePart) > 0 ) { - return; - } - x = y+1; - y = strchr(env,';'); - } - return; -} diff --git a/reactos/lib/msvcrt/stdlib/splitp.c b/reactos/lib/msvcrt/stdlib/splitp.c deleted file mode 100644 index b523c9514ab..00000000000 --- a/reactos/lib/msvcrt/stdlib/splitp.c +++ /dev/null @@ -1,69 +0,0 @@ -#include -#include - - -/* - * @implemented - */ -void _splitpath(const char* path, char* drive, char* dir, char* fname, char* ext) -{ - char* tmp_drive; - char* tmp_dir; - char* tmp_ext; - - tmp_drive = (char*)strchr(path,':'); - if (drive) - { - if (tmp_drive) - { - strncpy(drive,tmp_drive-1,2); - *(drive+2) = 0; - } - else - { - *drive = 0; - } - } - if (!tmp_drive) - { - tmp_drive = (char*)path - 1; - } - - tmp_dir = (char*)strrchr(path,'\\'); - if (dir) - { - if (tmp_dir) - { - strncpy(dir,tmp_drive+1,tmp_dir-tmp_drive); - *(dir+(tmp_dir-tmp_drive)) = 0; - } - else - { - *dir =0; - } - } - - tmp_ext = (char*)strrchr(path,'.'); - if (!tmp_ext) - { - tmp_ext = (char*)path+strlen(path); - } - if (ext) - { - strcpy(ext,tmp_ext); - } - - if (fname) - { - if (tmp_dir) - { - strncpy(fname,tmp_dir+1,tmp_ext-tmp_dir-1); - *(fname+(tmp_ext-tmp_dir-1)) = 0; - } - else - { - strncpy(fname,tmp_drive+1,tmp_ext-tmp_drive-1); - *(fname+(tmp_ext-path))=0; - } - } -} diff --git a/reactos/lib/msvcrt/stdlib/strtod.c b/reactos/lib/msvcrt/stdlib/strtod.c deleted file mode 100644 index 29d936ebdd0..00000000000 --- a/reactos/lib/msvcrt/stdlib/strtod.c +++ /dev/null @@ -1,100 +0,0 @@ -/* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ - -#include - - -/* - * @implemented - */ -double -strtod(const char *s, char **sret) -{ - long double r; /* result */ - int e; /* exponent */ - long double d; /* scale */ - int sign; /* +- 1.0 */ - int esign; - int i; - int flags=0; - - r = 0.0; - sign = 1; - e = 0; - esign = 1; - - while ((*s == ' ') || (*s == '\t')) - s++; - - if (*s == '+') - s++; - else if (*s == '-') - { - sign = -1; - s++; - } - - while ((*s >= '0') && (*s <= '9')) - { - flags |= 1; - r *= 10.0; - r += *s - '0'; - s++; - } - - if (*s == '.') - { - d = 0.1L; - s++; - while ((*s >= '0') && (*s <= '9')) - { - flags |= 2; - r += d * (*s - '0'); - s++; - d *= 0.1L; - } - } - - if (flags == 0) - { - if (sret) - *sret = (char *)s; - return 0; - } - - if ((*s == 'e') || (*s == 'E')) - { - s++; - if (*s == '+') - s++; - else if (*s == '-') - { - s++; - esign = -1; - } - if ((*s < '0') || (*s > '9')) - { - if (sret) - *sret = (char *)s; - return r; - } - - while ((*s >= '0') && (*s <= '9')) - { - e *= 10; - e += *s - '0'; - s++; - } - } - - if (esign < 0) - for (i = 1; i <= e; i++) - r *= 0.1L; - else - for (i = 1; i <= e; i++) - r *= 10.0; - - if (sret) - *sret = (char *)s; - return r * sign; -} diff --git a/reactos/lib/msvcrt/stdlib/strtol.c b/reactos/lib/msvcrt/stdlib/strtol.c deleted file mode 100644 index 40262d5e819..00000000000 --- a/reactos/lib/msvcrt/stdlib/strtol.c +++ /dev/null @@ -1,95 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include -#include -#include -#include -#include - - -/* - * @implemented - */ -long -strtol(const char *nptr, char **endptr, int base) -{ - const char *s = nptr; - unsigned long acc; - int c; - unsigned long cutoff; - int neg = 0, any, cutlim; - - /* - * Skip white space and pick up leading +/- sign if any. - * If base is 0, allow 0x for hex and 0 for octal, else - * assume decimal; if base is already 16, allow 0x. - */ - do { - c = *s++; - } while (isspace(c)); - if (c == '-') - { - neg = 1; - c = *s++; - } - else if (c == '+') - c = *s++; - if ((base == 0 || base == 16) && - c == '0' && (*s == 'x' || *s == 'X')) - { - c = s[1]; - s += 2; - base = 16; - } - if (base == 0) - base = c == '0' ? 8 : 10; - - /* - * Compute the cutoff value between legal numbers and illegal - * numbers. That is the largest legal value, divided by the - * base. An input number that is greater than this value, if - * followed by a legal input character, is too big. One that - * is equal to this value may be valid or not; the limit - * between valid and invalid numbers is then based on the last - * digit. For instance, if the range for longs is - * [-2147483648..2147483647] and the input base is 10, - * cutoff will be set to 214748364 and cutlim to either - * 7 (neg==0) or 8 (neg==1), meaning that if we have accumulated - * a value > 214748364, or equal but the next digit is > 7 (or 8), - * the number is too big, and we will return a range error. - * - * Set any if any `digits' consumed; make it negative to indicate - * overflow. - */ - cutoff = neg ? -(unsigned long)LONG_MIN : LONG_MAX; - cutlim = cutoff % (unsigned long)base; - cutoff /= (unsigned long)base; - for (acc = 0, any = 0;; c = *s++) - { - if (isdigit(c)) - c -= '0'; - else if (isalpha(c)) - c -= isupper(c) ? 'A' - 10 : 'a' - 10; - else - break; - if (c >= base) - break; - if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim)) - any = -1; - else - { - any = 1; - acc *= base; - acc += c; - } - } - if (any < 0) - { - acc = neg ? LONG_MIN : LONG_MAX; - __set_errno(ERANGE); - } - else if (neg) - acc = -acc; - if (endptr != 0) - *endptr = any ? (char *)s - 1 : (char *)nptr; - return acc; -} diff --git a/reactos/lib/msvcrt/stdlib/strtold.c b/reactos/lib/msvcrt/stdlib/strtold.c deleted file mode 100644 index 5588206f937..00000000000 --- a/reactos/lib/msvcrt/stdlib/strtold.c +++ /dev/null @@ -1,126 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include -#include -//#include - -static double powten[] = -{ - 1e1L, 1e2L, 1e4L, 1e8L, 1e16L, 1e32L, 1e64L, 1e128L, 1e256L, -#ifdef __GNUC__ - 1e512L, 1e512L*1e512L, 1e2048L, 1e4096L -#else - 1e256L, 1e256L, 1e256L, 1e256L -#endif -}; - -long double -_strtold(const char *s, char **sret) -{ - double r; /* result */ - int e, ne; /* exponent */ - int sign; /* +- 1.0 */ - int esign; - int flags=0; - int l2powm1; - - r = 0.0L; - sign = 1; - e = ne = 0; - esign = 1; - - while(*s && isspace(*s)) - s++; - - if (*s == '+') - s++; - else if (*s == '-') - { - sign = -1; - s++; - } - - while ((*s >= '0') && (*s <= '9')) - { - flags |= 1; - r *= 10.0L; - r += *s - '0'; - s++; - } - - if (*s == '.') - { - s++; - while ((*s >= '0') && (*s <= '9')) - { - flags |= 2; - r *= 10.0L; - r += *s - '0'; - s++; - ne++; - } - } - if (flags == 0) - { - if (sret) - *sret = (char *)s; - return 0.0L; - } - - if ((*s == 'e') || (*s == 'E')) - { - s++; - if (*s == '+') - s++; - else if (*s == '-') - { - s++; - esign = -1; - } - while ((*s >= '0') && (*s <= '9')) - { - e *= 10; - e += *s - '0'; - s++; - } - } - if (esign < 0) - { - esign = -esign; - e = -e; - } - e = e - ne; - if (e < -4096) - { - /* possibly subnormal number, 10^e would overflow */ - r *= 1.0e-2048L; - e += 2048; - } - if (e < 0) - { - e = -e; - esign = -esign; - } - if (e >= 8192) - e = 8191; - if (e) - { - double d = 1.0L; - l2powm1 = 0; - while (e) - { - if (e & 1) - d *= powten[l2powm1]; - e >>= 1; - l2powm1++; - } - if (esign > 0) - r *= d; - else - r /= d; - } - if (sret) - *sret = (char *)s; - return r * sign; - - return 0; -} diff --git a/reactos/lib/msvcrt/stdlib/strtoll.c b/reactos/lib/msvcrt/stdlib/strtoll.c deleted file mode 100644 index 6115580be3a..00000000000 --- a/reactos/lib/msvcrt/stdlib/strtoll.c +++ /dev/null @@ -1,84 +0,0 @@ -/* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include -#include -#include -#include -//#include - -/* constants used in Solaris */ -#define LLONG_MIN -9223372036854775807L-1L -#define LLONG_MAX 9223372036854775807L -#define ULLONG_MAX 18446744073709551615UL - -long -strtoll(const char *nptr, char **endptr, int base) -{ - const char *s = nptr; - unsigned long acc; - int c; - unsigned long cutoff; - int neg = 0, any, cutlim; - - /* - * See strtol for comments as to the logic used. - */ - do { - c = *s++; - } while (isspace(c)); - if (c == '-') - { - neg = 1; - c = *s++; - } - else if (c == '+') - c = *s++; - if ((base == 0 || base == 16) && - c == '0' && (*s == 'x' || *s == 'X')) - { - c = s[1]; - s += 2; - base = 16; - } - if (base == 0) - base = c == '0' ? 8 : 10; - -/* to prevent overflow, we take max-1 and add 1 after division */ - cutoff = neg ? -(LLONG_MIN+1) : LLONG_MAX-1; - cutlim = cutoff % base; - cutoff /= base; - if (++cutlim == base) - { - cutlim = 0; - cutoff++; - } - for (acc = 0, any = 0;; c = *s++) - { - if (isdigit(c)) - c -= '0'; - else if (isalpha(c)) - c -= isupper(c) ? 'A' - 10 : 'a' - 10; - else - break; - if (c >= base) - break; - if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim)) - any = -1; - else - { - any = 1; - acc *= base; - acc += c; - } - } - if (any < 0) - { - acc = neg ? LLONG_MIN : LLONG_MAX; - __set_errno ( ERANGE ); - } - else if (neg) - acc *= -1; - if (endptr != 0) - *endptr = any ? (char *)s - 1 : (char *)nptr; - return acc; -} diff --git a/reactos/lib/msvcrt/stdlib/strtoul.c b/reactos/lib/msvcrt/stdlib/strtoul.c deleted file mode 100644 index 59fbe38b3f3..00000000000 --- a/reactos/lib/msvcrt/stdlib/strtoul.c +++ /dev/null @@ -1,77 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include -#include -#include -#include -#include - -/* - * Convert a string to an unsigned long integer. - * - * Ignores `locale' stuff. Assumes that the upper and lower case - * alphabets and digits are each contiguous. - * - * @implemented - */ -unsigned long -strtoul(const char *nptr, char **endptr, int base) -{ - const char *s = nptr; - unsigned long acc; - int c; - unsigned long cutoff; - int neg = 0, any, cutlim; - - /* - * See strtol for comments as to the logic used. - */ - do { - c = *s++; - } while (isspace(c)); - if (c == '-') - { - neg = 1; - c = *s++; - } - else if (c == '+') - c = *s++; - if ((base == 0 || base == 16) && - c == '0' && (*s == 'x' || *s == 'X')) - { - c = s[1]; - s += 2; - base = 16; - } - if (base == 0) - base = c == '0' ? 8 : 10; - cutoff = (unsigned long)ULONG_MAX / (unsigned long)base; - cutlim = (unsigned long)ULONG_MAX % (unsigned long)base; - for (acc = 0, any = 0;; c = *s++) - { - if (isdigit(c)) - c -= '0'; - else if (isalpha(c)) - c -= isupper(c) ? 'A' - 10 : 'a' - 10; - else - break; - if (c >= base) - break; - if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim)) - any = -1; - else { - any = 1; - acc *= base; - acc += c; - } - } - if (any < 0) - { - acc = ULONG_MAX; - __set_errno(ERANGE); - } - else if (neg) - acc = -acc; - if (endptr != 0) - *endptr = any ? (char *)s - 1 : (char *)nptr; - return acc; -} diff --git a/reactos/lib/msvcrt/stdlib/strtoull.c b/reactos/lib/msvcrt/stdlib/strtoull.c deleted file mode 100644 index 031b9103a57..00000000000 --- a/reactos/lib/msvcrt/stdlib/strtoull.c +++ /dev/null @@ -1,76 +0,0 @@ -/* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include -#include -#include -#include -//#include - -/* - * Convert a string to an unsigned long integer. - * - * Ignores `locale' stuff. Assumes that the upper and lower case - * alphabets and digits are each contiguous. - */ -unsigned long -strtoull(const char *nptr, char **endptr, int base) -{ - const char *s = nptr; - unsigned long acc; - int c; - unsigned long cutoff; - int neg = 0, any, cutlim; - - /* - * See strtol for comments as to the logic used. - */ - do { - c = *s++; - } while (isspace(c)); - if (c == '-') - { - neg = 1; - c = *s++; - } - else if (c == '+') - c = *s++; - if ((base == 0 || base == 16) && - c == '0' && (*s == 'x' || *s == 'X')) - { - c = s[1]; - s += 2; - base = 16; - } - if (base == 0) - base = c == '0' ? 8 : 10; - cutoff = (unsigned long)ULONG_MAX / base; - cutlim = (unsigned long)ULONG_MAX % base; - for (acc = 0, any = 0;; c = *s++) - { - if (isdigit(c)) - c -= '0'; - else if (isalpha(c)) - c -= isupper(c) ? 'A' - 10 : 'a' - 10; - else - break; - if (c >= base) - break; - if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim)) - any = -1; - else { - any = 1; - acc *= base; - acc += c; - } - } - if (any < 0) - { - acc = ULONG_MAX; - __set_errno ( ERANGE ); - } - else if (neg) - acc = -acc; - if (endptr != 0) - *endptr = any ? (char *)s - 1 : (char *)nptr; - return acc; -} diff --git a/reactos/lib/msvcrt/stdlib/swab.c b/reactos/lib/msvcrt/stdlib/swab.c deleted file mode 100644 index c3c1c09017e..00000000000 --- a/reactos/lib/msvcrt/stdlib/swab.c +++ /dev/null @@ -1,18 +0,0 @@ -#include - -/* - * @implemented - */ -void _swab (const char* caFrom, char* caTo, size_t sizeToCopy) -{ - if (sizeToCopy > 1) - { - sizeToCopy = sizeToCopy >> 1; - - while (sizeToCopy--) { - *caTo++ = caFrom[1]; - *caTo++ = *caFrom++; - caFrom++; - } - } -} diff --git a/reactos/lib/msvcrt/stdlib/wcstod.c b/reactos/lib/msvcrt/stdlib/wcstod.c deleted file mode 100644 index 14988abb220..00000000000 --- a/reactos/lib/msvcrt/stdlib/wcstod.c +++ /dev/null @@ -1,98 +0,0 @@ -/* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include - - -/* - * @implemented - */ -double wcstod(const wchar_t *s, wchar_t **sret) -{ - long double r; /* result */ - int e; /* exponent */ - long double d; /* scale */ - int sign; /* +- 1.0 */ - int esign; - int i; - int flags=0; - - r = 0.0; - sign = 1; - e = 0; - esign = 1; - - while ((*s == L' ') || (*s == L'\t')) - s++; - - if (*s == L'+') - s++; - else if (*s == L'-') - { - sign = -1; - s++; - } - - while ((*s >= L'0') && (*s <= L'9')) - { - flags |= 1; - r *= 10.0; - r += *s - L'0'; - s++; - } - - if (*s == L'.') - { - d = 0.1L; - s++; - while ((*s >= L'0') && (*s <= L'9')) - { - flags |= 2; - r += d * (*s - L'0'); - s++; - d *= 0.1L; - } - } - - if (flags == 0) - { - if (sret) - *sret = (wchar_t *)s; - return 0; - } - - if ((*s == L'e') || (*s == L'E')) - { - s++; - if (*s == L'+') - s++; - else if (*s == L'-') - { - s++; - esign = -1; - } - if ((*s < L'0') || (*s > L'9')) - { - if (sret) - *sret = (wchar_t *)s; - return r; - } - - while ((*s >= L'0') && (*s <= L'9')) - { - e *= 10; - e += *s - L'0'; - s++; - } - } - - if (esign < 0) - for (i = 1; i <= e; i++) - r *= 0.1L; - else - for (i = 1; i <= e; i++) - r *= 10.0; - - if (sret) - *sret = (wchar_t *)s; - return r * sign; -} diff --git a/reactos/lib/msvcrt/stdlib/wcstol.c b/reactos/lib/msvcrt/stdlib/wcstol.c deleted file mode 100644 index 3f601e19131..00000000000 --- a/reactos/lib/msvcrt/stdlib/wcstol.c +++ /dev/null @@ -1,37 +0,0 @@ -#include -#include - - -/* - * @implemented - */ -long wcstol(const wchar_t *cp,wchar_t **endp,int base) -{ - long result = 0,value; - int sign = 1; - - if ( *cp == L'-' ) { - sign = -1; - cp++; - } - - if (!base) { - base = 10; - if (*cp == L'0') { - base = 8; - cp++; - if ((*cp == L'x') && iswxdigit(cp[1])) { - cp++; - base = 16; - } - } - } - while (iswxdigit(*cp) && (value = iswdigit(*cp) ? *cp-L'0' : (iswlower(*cp) - ? towupper(*cp) : *cp)-L'A'+10) < base) { - result = result*base + value; - cp++; - } - if (endp) - *endp = (wchar_t *)cp; - return result * sign; -} diff --git a/reactos/lib/msvcrt/stdlib/wcstom.c b/reactos/lib/msvcrt/stdlib/wcstom.c deleted file mode 100644 index b9dd5d2cb02..00000000000 --- a/reactos/lib/msvcrt/stdlib/wcstom.c +++ /dev/null @@ -1,20 +0,0 @@ -#include - -/* - * @unimplemented - */ -size_t wcstombs (char* mbsDest, const wchar_t* wsConvert, size_t size) -{ - return 0; -} - -/* - * @unimplemented - */ -int wctomb (char* mbDest, wchar_t wc) -{ - return 0; -} - - - diff --git a/reactos/lib/msvcrt/stdlib/wcstomb.c b/reactos/lib/msvcrt/stdlib/wcstomb.c deleted file mode 100644 index c0b5d997b18..00000000000 --- a/reactos/lib/msvcrt/stdlib/wcstomb.c +++ /dev/null @@ -1,118 +0,0 @@ -/* Copyright (C) 1991, 1992, 1995, 1996, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - The GNU C 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include -#include - -#include -#include -#include - -#ifndef EILSEQ -#define EILSEQ EINVAL -#endif - -static const wchar_t encoding_mask[] = -{ - (wchar_t)~0x7ff, (wchar_t)~0xffff, (wchar_t)~0x1fffff, (wchar_t)~0x3ffffff -}; - -static const unsigned char encoding_byte[] = -{ - 0xc0, 0xe0, 0xf0, 0xf8, 0xfc -}; - -/* The state is for this UTF8 encoding not used. */ -//static mbstate_t internal; - - -//extern mbstate_t __no_r_state; /* Defined in mbtowc.c. */ - -size_t -__wcrtomb (char *s, wchar_t wc); - -/* - * Convert WCHAR into its multibyte character representation, - * putting this in S and returning its length. - * - * Attention: this function should NEVER be intentionally used. - * The interface is completely stupid. The state is shared between - * all conversion functions. You should use instead the restartable - * version `wcrtomb'. - * - * @implemented - */ -int -wctomb (char *s, wchar_t wchar) -{ - /* If S is NULL the function has to return null or not null - depending on the encoding having a state depending encoding or - not. This is nonsense because any multibyte encoding has a - state. The ISO C amendment 1 corrects this while introducing the - restartable functions. We simply say here all encodings have a - state. */ - if (s == NULL) - return 1; - - return __wcrtomb (s, wchar); -} - - -size_t -__wcrtomb (char *s, wchar_t wc) -{ - char fake[1]; - size_t written = 0; - - - - if (s == NULL) - { - s = fake; - wc = L'\0'; - } - - if (wc < 0x80) - { - /* It's a one byte sequence. */ - if (s != NULL) - *s = (char) wc; - return 1; - } - - for (written = 2; written < 6; ++written) - if ((wc & encoding_mask[written - 2]) == 0) - break; - - if (s != NULL) - { - size_t cnt = written; - s[0] = encoding_byte[cnt - 2]; - - --cnt; - do - { - s[cnt] = 0x80 | (wc & 0x3f); - wc >>= 6; - } - while (--cnt > 0); - s[0] |= wc; - } - - return written; -} diff --git a/reactos/lib/msvcrt/stdlib/wcstombs.c b/reactos/lib/msvcrt/stdlib/wcstombs.c deleted file mode 100644 index 06054eeada9..00000000000 --- a/reactos/lib/msvcrt/stdlib/wcstombs.c +++ /dev/null @@ -1,160 +0,0 @@ -/* Copyright (C) 1991, 1992, 1995, 1996, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - The GNU C 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include -#include - -#include -#include - -#ifndef EILSEQ -#define EILSEQ EINVAL -#endif - - -static const wchar_t encoding_mask[] = -{ - (~0x7ff&WCHAR_MAX), (~0xffff&WCHAR_MAX), (~0x1fffff&WCHAR_MAX), (~0x3ffffff&WCHAR_MAX) -}; - -static const unsigned char encoding_byte[] = -{ - 0xc0, 0xe0, 0xf0, 0xf8, 0xfc -}; - -/* We don't need the state really because we don't have shift states - to maintain between calls to this function. */ -typedef int mbstate_t; -static mbstate_t mbstate_internal; - - -mbstate_t __no_r_state; /* Now defined in wcstombs.c. */ -//extern mbstate_t __no_r_state; /* Defined in mbtowc.c. */ - -size_t -__wcsrtombs (char *dst, const wchar_t **src, size_t len, mbstate_t *ps); - -/* - * Convert the `wchar_t' string in PWCS to a multibyte character string - * in S, writing no more than N characters. Return the number of bytes - * written, or (size_t) -1 if an invalid `wchar_t' was found. - * - * Attention: this function should NEVER be intentionally used. - * The interface is completely stupid. The state is shared between - * all conversion functions. You should use instead the restartable - * version `wcsrtombs'. - * - * @implemented - */ -size_t -wcstombs (char *s, const wchar_t *pwcs, size_t n) -{ - mbstate_t save_shift = __no_r_state; - size_t written; - - written = __wcsrtombs (s, &pwcs, n, &__no_r_state); - - /* Restore the old shift state. */ - __no_r_state = save_shift; - - /* Return how many we wrote (or maybe an error). */ - return written; -} - -size_t -__wcsrtombs (char *dst, const wchar_t **src, size_t len, mbstate_t *ps) -{ - size_t written = 0; - const wchar_t *run = *src; - - if (ps == NULL) - ps = &mbstate_internal; - - if (dst == NULL) - /* The LEN parameter has to be ignored if we don't actually write - anything. */ - len = ~0; - - while (written < len) - { - wchar_t wc = *run++; - -#if 0 - if (wc < 0 || wc > WCHAR_MAX) - { - /* This is no correct ISO 10646 character. */ - __set_errno (EILSEQ); - return (size_t) -1; - } -#endif - - if (wc == L'\0') - { - /* Found the end. */ - if (dst != NULL) - *dst = '\0'; - *src = NULL; - return written; - } - else if (wc < 0x80) - { - /* It's an one byte sequence. */ - if (dst != NULL) - *dst++ = (char) wc; - ++written; - } - else - { - size_t step; - - for (step = 2; step < 6; ++step) - if ((wc & encoding_mask[step - 2]) == 0) - break; - - if (written + step >= len) - /* Too long. */ - break; - - if (dst != NULL) - { - size_t cnt = step; - - dst[0] = encoding_byte[cnt - 2]; - - --cnt; - do - { - dst[cnt] = 0x80 | (wc & 0x3f); - wc >>= 6; - } - while (--cnt > 0); - dst[0] |= wc; - - dst += step; - } - - written += step; - } - } - - /* Store position of first unprocessed word. */ - *src = run; - - return written; -} -//weak_alias (__wcsrtombs, wcsrtombs) diff --git a/reactos/lib/msvcrt/stdlib/wcstoul.c b/reactos/lib/msvcrt/stdlib/wcstoul.c deleted file mode 100644 index 54a309615d2..00000000000 --- a/reactos/lib/msvcrt/stdlib/wcstoul.c +++ /dev/null @@ -1,104 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include -#include -#include -#include -#include - -/* - * Convert a unicode string to an unsigned long integer. - * - * Ignores `locale' stuff. Assumes that the upper and lower case - * alphabets and digits are each contiguous. - * - * @implemented - */ -unsigned long -wcstoul(const wchar_t *nptr, wchar_t **endptr, int base) -{ - const wchar_t *s = nptr; - unsigned long acc; - int c; - unsigned long cutoff; - int neg = 0, any, cutlim; - - /* - * See strtol for comments as to the logic used. - */ - do { - c = *s++; - } while (iswspace(c)); - if (c == L'-') - { - neg = 1; - c = *s++; - } - else if (c == L'+') - c = *s++; - if ((base == 0 || base == 16) && - c == L'0' && (*s == L'x' || *s == L'X')) - { - c = s[1]; - s += 2; - base = 16; - } - if (base == 0) - base = c == L'0' ? 8 : 10; - cutoff = (unsigned long)ULONG_MAX / (unsigned long)base; - cutlim = (unsigned long)ULONG_MAX % (unsigned long)base; - for (acc = 0, any = 0;; c = *s++) - { - if (iswdigit(c)) - c -= L'0'; - else if (iswalpha(c)) - c -= iswupper(c) ? L'A' - 10 : L'a' - 10; - else - break; - if (c >= base) - break; - if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim)) - any = -1; - else { - any = 1; - acc *= base; - acc += c; - } - } - if (any < 0) - { - acc = ULONG_MAX; - __set_errno(ERANGE); - } - else if (neg) - acc = -acc; - if (endptr != 0) - *endptr = any ? (wchar_t *)s - 1 : (wchar_t *)nptr; - return acc; -} - -#if 0 -unsigned long wcstoul(const wchar_t *cp,wchar_t **endp,int base) -{ - unsigned long result = 0,value; - - if (!base) { - base = 10; - if (*cp == L'0') { - base = 8; - cp++; - if ((*cp == L'x') && iswxdigit(cp[1])) { - cp++; - base = 16; - } - } - } - while (iswxdigit(*cp) && (value = iswdigit(*cp) ? *cp-L'0' : (iswlower(*cp) - ? towupper(*cp) : *cp)-L'A'+10) < base) { - result = result*base + value; - cp++; - } - if (endp) - *endp = (wchar_t *)cp; - return result; -} -#endif diff --git a/reactos/lib/msvcrt/stdlib/wctomb.c b/reactos/lib/msvcrt/stdlib/wctomb.c deleted file mode 100644 index a38cffad4c0..00000000000 --- a/reactos/lib/msvcrt/stdlib/wctomb.c +++ /dev/null @@ -1,151 +0,0 @@ -/* Copyright (C) 1991, 1992, 1995, 1996, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - The GNU C 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include "precomp.h" -#include -#include -#include -#include -#include - - -int -STDCALL -WideCharToMultiByte( - UINT CodePage, - DWORD dwFlags, - LPCWSTR lpWideCharStr, - int cchWideChar, - LPSTR lpMultiByteStr, - int cchMultiByte, - LPCSTR lpDefaultChar, - LPBOOL lpUsedDefaultChar); - - -/* - * @unimplemented - */ -int wctomb(char* dst, wchar_t ch) -{ -#if 0 - return WideCharToMultiByte(CP_ACP, 0, &ch, 1, dst, 6, NULL, NULL); -#else - if (dst == NULL) { - return 1; - } else if (0 != (ch & 0xff00)) { - return -1; - } - *dst = ch; - return 1; -#endif -} - - -#if 0 - -#ifndef EILSEQ -#define EILSEQ EINVAL -#endif - -static const wchar_t encoding_mask[] = -{ - /* This reflects the sources *nix origin where type wchar_t - was 32 bits wide. Since our type wchar_t is only 16 bits - wide all this module will need to be reviewed. - Simplest option may well be to forward this modules work - on to the kernel which already has support for this. - */ - ~0x7ff, ~0xffff, ~0x1fffff, ~0x3ffffff - //~0x0000-07ff, ~0x0000-ffff, ~0x001f-ffff, ~0x03ff-ffff -}; - -static const unsigned char encoding_byte[] = -{ - 0xc0, 0xe0, 0xf0, 0xf8, 0xfc -}; - -/* The state is for this UTF8 encoding not used. */ -//static mbstate_t internal; -//extern mbstate_t __no_r_state; /* Defined in mbtowc.c. */ - -size_t __wcrtomb(char *s, wchar_t wc); - -/* Convert WCHAR into its multibyte character representation, - putting this in S and returning its length. - - Attention: this function should NEVER be intentionally used. - The interface is completely stupid. The state is shared between - all conversion functions. You should use instead the restartable - version `wcrtomb'. */ - -int wctomb(char *s, wchar_t wchar) -{ - /* If S is NULL the function has to return null or not null - depending on the encoding having a state depending encoding or - not. This is nonsense because any multibyte encoding has a - state. The ISO C amendment 1 corrects this while introducing the - restartable functions. We simply say here all encodings have a - state. */ - if (s == NULL) { - return 1; - } - return __wcrtomb(s, wchar); -} - -size_t __wcrtomb(char *s, wchar_t wc) -{ - char fake[1]; - size_t written = 0; - - if (s == NULL) { - s = fake; - wc = L'\0'; - } - /* Store the UTF8 representation of WC. */ - //if (wc < 0 || wc > 0x7fffffff) { - if (wc < 0 || wc > 0x7fff) { - /* This is no correct ISO 10646 character. */ - __set_errno (EILSEQ); - return (size_t) -1; - } - if (wc < 0x80) { - /* It's a one byte sequence. */ - if (s != NULL) { - *s = (char)wc; - } - return 1; - } - for (written = 2; written < 6; ++written) { - if ((wc & encoding_mask[written - 2]) == 0) { - break; - } - } - if (s != NULL) { - size_t cnt = written; - s[0] = encoding_byte[cnt - 2]; - --cnt; - do { - s[cnt] = 0x80 | (wc & 0x3f); - wc >>= 6; - } while (--cnt > 0); - s[0] |= wc; - } - return written; -} - -#endif diff --git a/reactos/lib/msvcrt/stdlib/wfulpath.c b/reactos/lib/msvcrt/stdlib/wfulpath.c deleted file mode 100644 index 47d90bb12b7..00000000000 --- a/reactos/lib/msvcrt/stdlib/wfulpath.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/msvcrt/stdlib/fullpath.c - * PURPOSE: Gets the fullpathname - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 28/12/98: Created - */ - -#include "precomp.h" -#include - - -/* - * @implemented - */ -wchar_t* _wfullpath(wchar_t* absPath, const wchar_t* relPath, size_t maxLength) -{ - wchar_t* lpFilePart; - - if (GetFullPathNameW(relPath,maxLength,absPath,&lpFilePart) == 0) - return NULL; - - return absPath; -} diff --git a/reactos/lib/msvcrt/stdlib/witoa.c b/reactos/lib/msvcrt/stdlib/witoa.c deleted file mode 100644 index 4e6d85aa488..00000000000 --- a/reactos/lib/msvcrt/stdlib/witoa.c +++ /dev/null @@ -1,98 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/msvcrt/stdlib/itoa.c - * PURPOSE: converts a integer to ascii - * PROGRAMER: - * UPDATE HISTORY: - * 1995: Created - * 1998: Added ltoa Boudewijn Dekker - */ -/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ - -#include -#include -#include - - -/* - * @implemented - */ -char* _i64toa(__int64 value, char* string, int radix) -{ - char tmp[65]; - char *tp = tmp; - int i; - unsigned v; - int sign; - char *sp; - - if (radix > 36 || radix <= 1) - { - __set_errno(EDOM); - return 0; - } - - sign = (radix == 10 && value < 0); - if (sign) - v = -value; - else - v = (unsigned)value; - while (v || tp == tmp) - { - i = v % radix; - v = v / radix; - if (i < 10) - *tp++ = i+'0'; - else - *tp++ = i + 'a' - 10; - } - - if (string == 0) - string = (char *)malloc((tp-tmp)+sign+1); - sp = string; - - if (sign) - *sp++ = '-'; - while (tp > tmp) - *sp++ = *--tp; - *sp = 0; - return string; -} - -/* - * @implemented - */ -char* _ui64toa(unsigned __int64 value, char* string, int radix) -{ - char tmp[65]; - char *tp = tmp; - long i; - unsigned long v = value; - char *sp; - - if (radix > 36 || radix <= 1) - { - __set_errno(EDOM); - return 0; - } - - while (v || tp == tmp) - { - i = v % radix; - v = v / radix; - if (i < 10) - *tp++ = i+'0'; - else - *tp++ = i + 'a' - 10; - } - - if (string == 0) - string = (char *)malloc((tp-tmp)+1); - sp = string; - - while (tp > tmp) - *sp++ = *--tp; - *sp = 0; - return string; -} diff --git a/reactos/lib/msvcrt/stdlib/witow.c b/reactos/lib/msvcrt/stdlib/witow.c deleted file mode 100644 index 245802a9e5a..00000000000 --- a/reactos/lib/msvcrt/stdlib/witow.c +++ /dev/null @@ -1,96 +0,0 @@ -/* $Id$ - * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/msvcrt/stdlib/itow.c - * PURPOSE: converts a integer to wchar_t - * PROGRAMER: - * UPDATE HISTORY: - * 1995: Created - * 1998: Added ltoa Boudewijn Dekker - * 2000: derived from ./itoa.c by ea - */ -/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ - -#include -#include -#include - - -/* - * @implemented - */ -wchar_t* _i64tow(__int64 value, wchar_t* string, int radix) -{ - wchar_t tmp[65]; - wchar_t* tp = tmp; - int i; - unsigned v; - int sign; - wchar_t* sp; - - if (radix > 36 || radix <= 1) { - __set_errno(EDOM); - return 0; - } - - sign = (radix == 10 && value < 0); - if (sign) - v = -value; - else - v = (unsigned)value; - while (v || tp == tmp) { - i = v % radix; - v = v / radix; - if (i < 10) - *tp++ = i+L'0'; - else - *tp++ = i + L'a' - 10; - } - - if (string == 0) - string = (wchar_t*)malloc(((tp-tmp)+sign+1)*sizeof(wchar_t)); - sp = string; - - if (sign) - *sp++ = L'-'; - while (tp > tmp) - *sp++ = *--tp; - *sp = 0; - return string; -} - -/* - * @implemented - */ -wchar_t* _ui64tow(unsigned __int64 value, wchar_t* string, int radix) -{ - wchar_t tmp[65]; - wchar_t* tp = tmp; - long i; - unsigned long v = value; - wchar_t* sp; - - if (radix > 36 || radix <= 1) { - __set_errno(EDOM); - return 0; - } - - while (v || tp == tmp) { - i = v % radix; - v = v / radix; - if (i < 10) - *tp++ = i+L'0'; - else - *tp++ = i + L'a' - 10; - } - - if (string == 0) - string = (wchar_t*)malloc(((tp-tmp)+1)*sizeof(wchar_t)); - sp = string; - - while (tp > tmp) - *sp++ = *--tp; - *sp = 0; - return string; -} diff --git a/reactos/lib/msvcrt/stdlib/wmakpath.c b/reactos/lib/msvcrt/stdlib/wmakpath.c deleted file mode 100644 index 5026ca3416d..00000000000 --- a/reactos/lib/msvcrt/stdlib/wmakpath.c +++ /dev/null @@ -1,37 +0,0 @@ -/* $Id$ - */ -#include -#include - - -/* - * @implemented - */ -void _wmakepath(wchar_t* path, const wchar_t* drive, const wchar_t* dir, const wchar_t* fname, const wchar_t* ext) -{ - int dir_len; - - if ((drive != NULL) && (*drive)) { - path[0] = *drive; - path[1] = L':'; - path[2] = 0; - } else { - (*path) = 0; - } - - if (dir != NULL) { - wcscat(path, dir); - dir_len = wcslen(dir); - if (dir_len && *(dir + dir_len - 1) != L'\\') - wcscat(path, L"\\"); - } - - if (fname != NULL) { - wcscat(path, fname); - if (ext != NULL && *ext != 0) { - if (*ext != L'.') - wcscat(path, L"."); - wcscat(path, ext); - } - } -} diff --git a/reactos/lib/msvcrt/stdlib/wputenv.c b/reactos/lib/msvcrt/stdlib/wputenv.c deleted file mode 100644 index 8b34b510a96..00000000000 --- a/reactos/lib/msvcrt/stdlib/wputenv.c +++ /dev/null @@ -1,17 +0,0 @@ -#include "precomp.h" -#include -#include - -#define NDEBUG -#include - -/* misc/environ.c */ -int SetEnv(const wchar_t *option); - -/* - * @implemented - */ -int _wputenv(const wchar_t* val) -{ - return SetEnv(val); -} diff --git a/reactos/lib/msvcrt/stdlib/wsenv.c b/reactos/lib/msvcrt/stdlib/wsenv.c deleted file mode 100644 index 0ebc7f1cde2..00000000000 --- a/reactos/lib/msvcrt/stdlib/wsenv.c +++ /dev/null @@ -1,35 +0,0 @@ -#include "precomp.h" -#include -#include - -#define NDEBUG -#include - - -/* - * @implemented - */ -void _wsearchenv(const wchar_t* file,const wchar_t* var,wchar_t* path) -{ - wchar_t* env = _wgetenv(var); - wchar_t* x; - wchar_t* y; - wchar_t* FilePart; - - DPRINT("_wsearchenv()\n"); - x = wcschr(env,L'='); - if ( x != NULL ) { - *x = 0; - x++; - } - y = wcschr(env,L';'); - while ( y != NULL ) { - *y = 0; - if ( SearchPathW(x,file,NULL,MAX_PATH,path,&FilePart) > 0 ) { - return; - } - x = y+1; - y = wcschr(env,L';'); - } - return; -} diff --git a/reactos/lib/msvcrt/stdlib/wsplitp.c b/reactos/lib/msvcrt/stdlib/wsplitp.c deleted file mode 100644 index 8a3520884b7..00000000000 --- a/reactos/lib/msvcrt/stdlib/wsplitp.c +++ /dev/null @@ -1,69 +0,0 @@ -#include -#include - - -/* - * @implemented - */ -void _wsplitpath(const wchar_t* path, wchar_t* drive, wchar_t* dir, wchar_t* fname, wchar_t* ext) -{ - wchar_t* tmp_drive; - wchar_t* tmp_dir; - wchar_t* tmp_ext; - - tmp_drive = (wchar_t*)wcschr(path,L':'); - if (drive) - { - if (tmp_drive) - { - wcsncpy(drive,tmp_drive-1,2); - *(drive+2) = 0; - } - else - { - *drive = 0; - } - } - if (!tmp_drive) - { - tmp_drive = (wchar_t*)path - 1; - } - - tmp_dir = (wchar_t*)wcsrchr(path,L'\\'); - if (dir) - { - if (tmp_dir) - { - wcsncpy(dir,tmp_drive+1,tmp_dir-tmp_drive); - *(dir+(tmp_dir-tmp_drive)) = 0; - } - else - { - *dir =0; - } - } - - tmp_ext = (wchar_t*)wcsrchr(path,L'.'); - if (! tmp_ext) - { - tmp_ext = (wchar_t*)path+wcslen(path); - } - if (ext) - { - wcscpy(ext,tmp_ext); - } - - if (fname) - { - if (tmp_dir) - { - wcsncpy(fname,tmp_dir+1,tmp_ext-tmp_dir-1); - *(fname+(tmp_ext-tmp_dir-1)) = 0; - } - else - { - wcsncpy(fname,tmp_drive+1,tmp_ext-tmp_drive-1); - *(fname+(tmp_ext-path))=0; - } - } -} diff --git a/reactos/lib/msvcrt/stdlib/wtoi.c b/reactos/lib/msvcrt/stdlib/wtoi.c deleted file mode 100644 index f8282056ef6..00000000000 --- a/reactos/lib/msvcrt/stdlib/wtoi.c +++ /dev/null @@ -1,17 +0,0 @@ -#include - -/* - * @implemented - */ -int _wtoi( const wchar_t *str ) -{ - return (int)wcstol(str, 0, 10); -} - -/* - * @implemented - */ -long _wtol( const wchar_t *str ) -{ - return (int)wcstol(str, 0, 10); -} diff --git a/reactos/lib/msvcrt/stdlib/wtoi64.c b/reactos/lib/msvcrt/stdlib/wtoi64.c deleted file mode 100644 index a59513dadd2..00000000000 --- a/reactos/lib/msvcrt/stdlib/wtoi64.c +++ /dev/null @@ -1,31 +0,0 @@ -#include -#include - - -/* - * @implemented - */ -__int64 _wtoi64(const wchar_t* nptr) -{ - wchar_t* s = (wchar_t*)nptr; - __int64 acc = 0; - int neg = 0; - - while (iswspace((int)*s)) - s++; - if (*s == '-') { - neg = 1; - s++; - } - else if (*s == '+') - s++; - - while (iswdigit((int)*s)) { - acc = 10 * acc + ((int)*s - '0'); - s++; - } - - if (neg) - acc *= -1; - return acc; -} diff --git a/reactos/lib/msvcrt/string/lasttok.c b/reactos/lib/msvcrt/string/lasttok.c deleted file mode 100644 index 2713e4c954b..00000000000 --- a/reactos/lib/msvcrt/string/lasttok.c +++ /dev/null @@ -1,19 +0,0 @@ -#ifdef __USE_W32API -#undef __USE_W32API -#endif - -#include -#include - -/* - * This is an MSVCRT internal function to return the lasttoken - * bit of data used by strtok. The reason for it's existence is - * so that CRTDLL can use the strtok source code in the same - * file. - */ -char** _lasttoken() -{ - PTHREADDATA ptd = GetThreadData(); - assert(ptd); - return &(ptd->lasttoken); -} diff --git a/reactos/lib/msvcrt/string/memicmp.c b/reactos/lib/msvcrt/string/memicmp.c deleted file mode 100644 index 3cbff006c09..00000000000 --- a/reactos/lib/msvcrt/string/memicmp.c +++ /dev/null @@ -1,23 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include -#include - -/* - * @implemented - */ -int -_memicmp(const void *s1, const void *s2, size_t n) -{ - if (n != 0) - { - const unsigned char *p1 = s1, *p2 = s2; - - do { - if (toupper(*p1) != toupper(*p2)) - return (*p1 - *p2); - p1++; - p2++; - } while (--n != 0); - } - return 0; -} diff --git a/reactos/lib/msvcrt/string/strcoll.c b/reactos/lib/msvcrt/string/strcoll.c deleted file mode 100644 index 1571b4ae3c0..00000000000 --- a/reactos/lib/msvcrt/string/strcoll.c +++ /dev/null @@ -1,36 +0,0 @@ -#include "precomp.h" -#include - -/* Compare S1 and S2, returning less than, equal to or - greater than zero if the collated form of S1 is lexicographically - less than, equal to or greater than the collated form of S2. */ - -#if 1 -/* - * @unimplemented - */ -int strcoll(const char* s1, const char* s2) -{ - return strcmp(s1, s2); -} - -/* - * @unimplemented - */ -int _stricoll(const char* s1, const char* s2) -{ - return _stricmp(s1, s2); -} - -#else -int strcoll (const char* s1,const char* s2) -{ - int ret; - ret = CompareStringA(LOCALE_USER_DEFAULT,0,s1,strlen(s1),s2,strlen(s2)); - if (ret == 0) - return 0; - else - return ret - 2; - return 0; -} -#endif diff --git a/reactos/lib/msvcrt/string/strdup.c b/reactos/lib/msvcrt/string/strdup.c deleted file mode 100644 index c728585819b..00000000000 --- a/reactos/lib/msvcrt/string/strdup.c +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ -#include -#include - - -/* - * @implemented - */ -char *_strdup(const char *_s) -{ - char *rv; - if (_s == 0) - return 0; - rv = (char *)malloc(strlen(_s) + 1); - if (rv == 0) - return 0; - strcpy(rv, _s); - return rv; -} diff --git a/reactos/lib/msvcrt/string/strerror.c b/reactos/lib/msvcrt/string/strerror.c deleted file mode 100644 index fa8d9d0083b..00000000000 --- a/reactos/lib/msvcrt/string/strerror.c +++ /dev/null @@ -1,114 +0,0 @@ -/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ -#include -#include -#include - - -char __syserr00[] = "No Error"; -char __syserr01[] = "Operation not permitted (EPERM)"; -char __syserr02[] = "No such file or directory (ENOENT)"; -char __syserr03[] = "No such process (ESRCH)"; -char __syserr04[] = "Interrupted system call (EINTR)"; -char __syserr05[] = "Input or output error (EIO)"; -char __syserr06[] = "No such device or address (ENXIO)"; -char __syserr07[] = "Argument list too long (E2BIG)"; -char __syserr08[] = "Unable to execute file (ENOEXEC)"; -char __syserr09[] = "Bad file descriptor (EBADF)"; -char __syserr10[] = "No child processes (ECHILD)"; -char __syserr11[] = "Resource temporarily unavailable (EAGAIN)"; -char __syserr12[] = "Not enough memory (ENOMEM)"; -char __syserr13[] = "Permission denied (EACCES)"; -char __syserr14[] = "Bad address (EFAULT)"; -char __syserr15[] = "Unknown Error: 15"; -char __syserr16[] = "Resource busy (EBUSY)"; -char __syserr17[] = "File exists (EEXIST)"; -char __syserr18[] = "Improper link (EXDEV)"; -char __syserr19[] = "No such device (ENODEV)"; -char __syserr20[] = "Not a directory (ENOTDIR)"; -char __syserr21[] = "Is a directory (EISDIR)"; -char __syserr22[] = "Invalid argument (EINVAL)"; -char __syserr23[] = "Too many open files in system (ENFILE)"; -char __syserr24[] = "Too many open files (EMFILE)"; -char __syserr25[] = "Inappropriate I/O control operation (ENOTTY)"; -char __syserr26[] = "Unknown error: 26"; -char __syserr27[] = "File too large (EFBIG)"; -char __syserr28[] = "No space left on drive (ENOSPC)"; -char __syserr29[] = "Invalid seek (ESPIPE)"; -char __syserr30[] = "Read-only file system (EROFS)"; -char __syserr31[] = "Too many links (EMLINK)"; -char __syserr32[] = "Broken pipe (EPIPE)"; -char __syserr33[] = "Input to function out of range (EDOM)"; -char __syserr34[] = "Output of function out of range (ERANGE)"; -char __syserr35[] = "Unknown error: 35"; -char __syserr36[] = "Resource deadlock avoided (EDEADLK)"; -char __syserr37[] = "Unknown error: 37"; -char __syserr38[] = "File name too long (ENAMETOOLONG)"; -char __syserr39[] = "No locks available (ENOLCK)"; -char __syserr40[] = "Function not implemented (ENOSYS)"; -char __syserr41[] = "Directory not empty (ENOTEMPTY)"; -char __syserr42[] = "Illegal byte sequence (EILSEQ)"; - - - - -const char *_sys_errlist[] = { -__syserr00, __syserr01, __syserr02, __syserr03, __syserr04, -__syserr05, __syserr06, __syserr07, __syserr08, __syserr09, -__syserr10, __syserr11, __syserr12, __syserr13, __syserr14, -__syserr15, __syserr16, __syserr17, __syserr18, __syserr19, -__syserr20, __syserr21, __syserr22, __syserr23, __syserr24, -__syserr25, __syserr26, __syserr27, __syserr28, __syserr29, -__syserr30, __syserr31, __syserr32, __syserr33, __syserr34, -__syserr35, __syserr36, __syserr37, __syserr38, __syserr39, -__syserr40, __syserr41, __syserr42 -}; - -int __sys_nerr = sizeof(_sys_errlist) / sizeof(_sys_errlist[0]); - -int* _sys_nerr = &__sys_nerr; - -/* - * @implemented - */ -char *strerror(int errnum) -{ - static char ebuf[40]; /* 64-bit number + slop */ - char *cp; - int v=1000000, lz=0; - - if (errnum >= 0 && errnum < __sys_nerr) - return((char *)_sys_errlist[errnum]); - - strcpy(ebuf, "Unknown error: "); - cp = ebuf + 15; - if (errnum < 0) - { - *cp++ = '-'; - errnum = -errnum; - } - while (v) - { - int d = errnum / v; - if (d || lz || (v == 1)) - { - *cp++ = d+'0'; - lz = 1; - } - errnum %= v; - v /= 10; - } - - return ebuf; -} - - -/* - * @implemented - */ -char *_strerror(const char *s) -{ - if ( s == NULL ) - return strerror(*_errno()); - - return strerror(atoi(s)); -} diff --git a/reactos/lib/msvcrt/string/stricmp.c b/reactos/lib/msvcrt/string/stricmp.c deleted file mode 100644 index cfecfb81931..00000000000 --- a/reactos/lib/msvcrt/string/stricmp.c +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include -#include - -/* - * @implemented - */ -int -_stricmp(const char *s1, const char *s2) -{ - while (toupper(*s1) == toupper(*s2)) - { - if (*s1 == 0) - return 0; - s1++; - s2++; - } - return toupper(*(unsigned const char *)s1) - toupper(*(unsigned const char *)(s2)); -} - -/* - * @implemented - */ -int -_strcmpi(const char *s1, const char *s2) -{ - return _stricmp(s1,s2); -} diff --git a/reactos/lib/msvcrt/string/strlwr.c b/reactos/lib/msvcrt/string/strlwr.c deleted file mode 100644 index 6ddba9c7a2a..00000000000 --- a/reactos/lib/msvcrt/string/strlwr.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * The C RunTime DLL - * - * Implements C run-time functionality as known from UNIX. - * - * Copyright 1996,1998 Marcus Meissner - * Copyright 1996 Jukka Iivonen - * Copyright 1997 Uwe Bonnes - */ - -#include -#include - -/* - * @implemented - */ -char * _strlwr(char *x) -{ - char *y=x; - - while (*y) { - *y=tolower(*y); - y++; - } - return x; -} diff --git a/reactos/lib/msvcrt/string/strncoll.c b/reactos/lib/msvcrt/string/strncoll.c deleted file mode 100644 index 304c52b1e5e..00000000000 --- a/reactos/lib/msvcrt/string/strncoll.c +++ /dev/null @@ -1,23 +0,0 @@ -#include "precomp.h" -#include - -/* Compare S1 and S2, returning less than, equal to or - greater than zero if the collated form of S1 is lexicographically - less than, equal to or greater than the collated form of S2. */ - - -/* - * @unimplemented - */ -int _strncoll(const char* s1, const char* s2, size_t c) -{ - return strncmp(s1, s2, c); -} - -/* - * @unimplemented - */ -int _strnicoll(const char* s1, const char* s2, size_t c) -{ - return _strnicmp(s1, s2, c); -} diff --git a/reactos/lib/msvcrt/string/strnicmp.c b/reactos/lib/msvcrt/string/strnicmp.c deleted file mode 100644 index d6ff2c0d2d1..00000000000 --- a/reactos/lib/msvcrt/string/strnicmp.c +++ /dev/null @@ -1,20 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include -#include - -/* - * @implemented - */ -int _strnicmp(const char *s1, const char *s2, size_t n) -{ - - if (n == 0) - return 0; - do { - if (toupper(*s1) != toupper(*s2++)) - return toupper(*(unsigned const char *)s1) - toupper(*(unsigned const char *)--s2); - if (*s1++ == 0) - break; - } while (--n != 0); - return 0; -} diff --git a/reactos/lib/msvcrt/string/strpbrk.c b/reactos/lib/msvcrt/string/strpbrk.c deleted file mode 100644 index 72079d0aa8a..00000000000 --- a/reactos/lib/msvcrt/string/strpbrk.c +++ /dev/null @@ -1,21 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include - - -/* - * @implemented - */ -char * -strpbrk(const char *s1, const char *s2) -{ - const char *scanp; - int c, sc; - - while ((c = *s1++) != 0) - { - for (scanp = s2; (sc = *scanp++) != 0;) - if (sc == c) - return (char *)(s1 - 1); - } - return 0; -} diff --git a/reactos/lib/msvcrt/string/strrev.c b/reactos/lib/msvcrt/string/strrev.c deleted file mode 100644 index 8827c3b5bb5..00000000000 --- a/reactos/lib/msvcrt/string/strrev.c +++ /dev/null @@ -1,22 +0,0 @@ -#include - -/* - * @implemented - */ -char * _strrev(char *s) -{ - char a, *b, *e; - b=e=s; - while (*e) - e++; - e--; /* start at last char, not NULL char */ - while ( b < e ) - { - a=*b; - *b=*e; - *e=a; - b++; - e--; - } - return s; /* return ptr to beginning of string */ -} diff --git a/reactos/lib/msvcrt/string/strset.c b/reactos/lib/msvcrt/string/strset.c deleted file mode 100644 index 6de8d49b3bb..00000000000 --- a/reactos/lib/msvcrt/string/strset.c +++ /dev/null @@ -1,35 +0,0 @@ -#include -#include -#include - -/* - * @implemented - */ -char* _strnset (char* szToFill, int szFill, size_t sizeMaxFill) -{ - char *t = szToFill; - int i = 0; - while( *szToFill != 0 && i < sizeMaxFill) - { - *szToFill = szFill; - szToFill++; - i++; - - } - return t; -} - -/* - * @implemented - */ -char* _strset (char* szToFill, int szFill) -{ - char *t = szToFill; - while( *szToFill != 0 ) - { - *szToFill = szFill; - szToFill++; - - } - return t; -} diff --git a/reactos/lib/msvcrt/string/strstr.c b/reactos/lib/msvcrt/string/strstr.c deleted file mode 100644 index 430358fd196..00000000000 --- a/reactos/lib/msvcrt/string/strstr.c +++ /dev/null @@ -1,25 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include - - -/* - * @implemented - */ -char *strstr(const char *s, const char *find) -{ - char c, sc; - size_t len; - - if ((c = *find++) != 0) - { - len = strlen(find); - do { - do { - if ((sc = *s++) == 0) - return 0; - } while (sc != c); - } while (strncmp(s, find, len) != 0); - s--; - } - return (char *)s; -} diff --git a/reactos/lib/msvcrt/string/strtok.c b/reactos/lib/msvcrt/string/strtok.c deleted file mode 100644 index 2423f4ae840..00000000000 --- a/reactos/lib/msvcrt/string/strtok.c +++ /dev/null @@ -1,64 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#ifdef __USE_W32API -#undef __USE_W32API -#endif - -#include -#include - -char** _lasttoken(); /* lasttok.c */ - -/* - * @implemented - */ -char* strtok(char* s, const char* delim) -{ - const char *spanp; - int c, sc; - char *tok; -#if 1 - char ** lasttoken = _lasttoken(); -#else - PTHREADDATA ThreadData = GetThreadData(); - char ** lasttoken = &ThreadData->lasttoken; -#endif - - if (s == NULL && (s = *lasttoken) == NULL) - return (NULL); - - /* - * Skip (span) leading delimiters (s += strspn(s, delim), sort of). - */ - cont: - c = *s++; - for (spanp = delim; (sc = *spanp++) != 0;) { - if (c == sc) - goto cont; - } - - if (c == 0) { /* no non-delimiter characters */ - *lasttoken = NULL; - return (NULL); - } - tok = s - 1; - - /* - * Scan token (scan for delimiters: s += strcspn(s, delim), sort of). - * Note that delim must have one NUL; we stop if we see that, too. - */ - for (;;) { - c = *s++; - spanp = delim; - do { - if ((sc = *spanp++) == c) { - if (c == 0) - s = NULL; - else - s[-1] = 0; - *lasttoken = s; - return (tok); - } - } while (sc != 0); - } - /* NOTREACHED */ -} diff --git a/reactos/lib/msvcrt/string/strupr.c b/reactos/lib/msvcrt/string/strupr.c deleted file mode 100644 index 413f585b21a..00000000000 --- a/reactos/lib/msvcrt/string/strupr.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - * The C RunTime DLL - * - * Implements C run-time functionality as known from UNIX. - * - * Copyright 1996,1998 Marcus Meissner - * Copyright 1996 Jukka Iivonen - * Copyright 1997 Uwe Bonnes - */ - - -#include -#include - -/* - * @implemented - */ -char *_strupr(char *x) -{ - char *y=x; - - while (*y) { - *y=toupper(*y); - y++; - } - return x; -} diff --git a/reactos/lib/msvcrt/string/strxfrm.c b/reactos/lib/msvcrt/string/strxfrm.c deleted file mode 100644 index dca7a645414..00000000000 --- a/reactos/lib/msvcrt/string/strxfrm.c +++ /dev/null @@ -1,24 +0,0 @@ -#include "precomp.h" -#include - -#if 1 -/* - * @implemented - */ -size_t strxfrm( char *dest, const char *src, size_t n ) -{ - strncpy(dest, src, n); - return (strlen(dest)); -} -#else -size_t strxfrm( char *dest, const char *src, size_t n ) -{ - int ret = LCMapStringA(LOCALE_USER_DEFAULT,LCMAP_LOWERCASE, - src, strlen(src), dest, strlen(dest)); - - if ( ret == 0 ) - return -1; - return ret; - -} -#endif diff --git a/reactos/lib/msvcrt/sys_stat/fstat.c b/reactos/lib/msvcrt/sys_stat/fstat.c deleted file mode 100644 index cc2addd351f..00000000000 --- a/reactos/lib/msvcrt/sys_stat/fstat.c +++ /dev/null @@ -1,85 +0,0 @@ -/* $Id$ - * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/msvcrt/sys/fstat.c - * PURPOSE: Gather file information - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 28/12/98: Created - */ - -#include "precomp.h" -#include -#include -#include -#include -#include -#include - - -/* - * @implemented - */ -int _fstat(int fd, struct stat* statbuf) -{ - BY_HANDLE_FILE_INFORMATION FileInformation; - DWORD dwFileType; - void* handle; - - if (!statbuf) { - __set_errno(EINVAL); - return -1; - } - - if ((void*)-1 == (handle = _get_osfhandle(fd))) - { - __set_errno(EBADF); - return -1; - } - - fflush(NULL); - - memset (statbuf, 0, sizeof(struct stat)); - - dwFileType = GetFileType(handle); - - if (dwFileType == FILE_TYPE_DISK) - { - if (!GetFileInformationByHandle(handle,&FileInformation)) - { - __set_errno(EBADF); - return -1; - } - statbuf->st_ctime = FileTimeToUnixTime(&FileInformation.ftCreationTime,NULL); - statbuf->st_atime = FileTimeToUnixTime(&FileInformation.ftLastAccessTime,NULL); - statbuf->st_mtime = FileTimeToUnixTime(&FileInformation.ftLastWriteTime,NULL); - - statbuf->st_dev = fd; - statbuf->st_size = FileInformation.nFileSizeLow; - statbuf->st_mode = S_IREAD; - if (FileInformation.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) - statbuf->st_mode |= S_IFDIR; - else - statbuf->st_mode |= S_IFREG; - if (!(FileInformation.dwFileAttributes & FILE_ATTRIBUTE_READONLY)) - statbuf->st_mode |= S_IWRITE; - } - else if (dwFileType == FILE_TYPE_CHAR) - { - statbuf->st_dev = fd; - statbuf->st_mode = S_IFCHR; - } - else if (dwFileType == FILE_TYPE_PIPE) - { - statbuf->st_dev = fd; - statbuf->st_mode = S_IFIFO; - } - else - { - // dwFileType is FILE_TYPE_UNKNOWN or has a bad value - __set_errno(EBADF); - return -1; - } - return 0; -} diff --git a/reactos/lib/msvcrt/sys_stat/fstati64.c b/reactos/lib/msvcrt/sys_stat/fstati64.c deleted file mode 100644 index ba7a053143f..00000000000 --- a/reactos/lib/msvcrt/sys_stat/fstati64.c +++ /dev/null @@ -1,86 +0,0 @@ -/* $Id$ - * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/msvcrt/sys/fstat.c - * PURPOSE: Gather file information - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 28/12/98: Created - */ - -#include "precomp.h" -#include -#include -#include -#include -#include -#include - - -/* - * @implemented - */ -__int64 _fstati64(int fd, struct _stati64* statbuf) -{ - BY_HANDLE_FILE_INFORMATION FileInformation; - DWORD dwFileType; - void *handle; - - if (!statbuf) - { - __set_errno(EINVAL); - return -1; - } - - if ((void*)-1 == (handle = _get_osfhandle(fd))) - { - __set_errno(EBADF); - return -1; - } - - fflush(NULL); - - memset(statbuf, 0, sizeof(struct _stati64)); - - dwFileType = GetFileType(handle); - - if (dwFileType == FILE_TYPE_DISK) - { - if (!GetFileInformationByHandle(handle,&FileInformation)) - { - __set_errno(EBADF); - return -1; - } - statbuf->st_ctime = FileTimeToUnixTime(&FileInformation.ftCreationTime,NULL); - statbuf->st_atime = FileTimeToUnixTime(&FileInformation.ftLastAccessTime,NULL); - statbuf->st_mtime = FileTimeToUnixTime(&FileInformation.ftLastWriteTime,NULL); - - statbuf->st_dev = fd; - statbuf->st_size = (((__int64)FileInformation.nFileSizeHigh) << 32) + - FileInformation.nFileSizeLow; - statbuf->st_mode = S_IREAD; - if (FileInformation.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) - statbuf->st_mode |= S_IFDIR; - else - statbuf->st_mode |= S_IFREG; - if (!(FileInformation.dwFileAttributes & FILE_ATTRIBUTE_READONLY)) statbuf->st_mode |= S_IWRITE; - } - else if (dwFileType == FILE_TYPE_CHAR) - { - statbuf->st_dev = fd; - statbuf->st_mode = S_IFCHR; - } - else if (dwFileType == FILE_TYPE_PIPE) - { - statbuf->st_dev = fd; - statbuf->st_mode = S_IFIFO; - } - else - { - // dwFileType is FILE_TYPE_UNKNOWN or has a bad value - __set_errno(EBADF); - return -1; - } - return 0; -} diff --git a/reactos/lib/msvcrt/sys_stat/futime.c b/reactos/lib/msvcrt/sys_stat/futime.c deleted file mode 100644 index ed3c37a9a66..00000000000 --- a/reactos/lib/msvcrt/sys_stat/futime.c +++ /dev/null @@ -1,43 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include - - -/* - * @implemented - */ -int _futime (int nHandle, struct _utimbuf *pTimes) -{ - FILETIME LastAccessTime; - FILETIME LastWriteTime; - - // check for stdin / stdout handles ?? - if (nHandle == -1) { - __set_errno(EBADF); - return -1; - } - - if (pTimes == NULL) { - pTimes = alloca(sizeof(struct _utimbuf)); - time(&pTimes->actime); - time(&pTimes->modtime); - } - - if (pTimes->actime < pTimes->modtime) { - __set_errno(EINVAL); - return -1; - } - - UnixTimeToFileTime(pTimes->actime,&LastAccessTime,0); - UnixTimeToFileTime(pTimes->modtime,&LastWriteTime,0); - if (!SetFileTime(_get_osfhandle(nHandle),NULL, &LastAccessTime, &LastWriteTime)) { - __set_errno(EBADF); - return -1; - } - - return 0; -} diff --git a/reactos/lib/msvcrt/sys_stat/stat.c b/reactos/lib/msvcrt/sys_stat/stat.c deleted file mode 100644 index a1f5af85835..00000000000 --- a/reactos/lib/msvcrt/sys_stat/stat.c +++ /dev/null @@ -1,117 +0,0 @@ -#include "precomp.h" -#include -#include -#include -#include -#include -#include -#include - - -/* - * @implemented - */ -int _stat(const char* path, struct stat* buffer) -{ - WIN32_FILE_ATTRIBUTE_DATA fileAttributeData; - char* ext; - - if (!buffer) - { - __set_errno(EINVAL); - return -1; - } - - if (strchr(path, '*') || strchr(path, '?')) - { - __set_errno(ENOENT); - return -1; - } - - if (!GetFileAttributesExA(path, GetFileExInfoStandard, &fileAttributeData)) - { - __set_errno(ENOENT); - return -1; - } - - memset (buffer, 0, sizeof(struct stat)); - - buffer->st_ctime = FileTimeToUnixTime(&fileAttributeData.ftCreationTime,NULL); - buffer->st_atime = FileTimeToUnixTime(&fileAttributeData.ftLastAccessTime,NULL); - buffer->st_mtime = FileTimeToUnixTime(&fileAttributeData.ftLastWriteTime,NULL); - -// statbuf->st_dev = fd; - buffer->st_size = fileAttributeData.nFileSizeLow; - buffer->st_mode = S_IREAD; - if (fileAttributeData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) - buffer->st_mode |= S_IFDIR; - else - { - buffer->st_mode |= S_IFREG; - ext = strrchr(path, '.'); - if (ext && (!_stricmp(ext, ".exe") || - !_stricmp(ext, ".com") || - !_stricmp(ext, ".bat") || - !_stricmp(ext, ".cmd"))) - buffer->st_mode |= S_IEXEC; - } - if (!(fileAttributeData.dwFileAttributes & FILE_ATTRIBUTE_READONLY)) - buffer->st_mode |= S_IWRITE; - - return 0; -} - -/* - * @implemented - */ -__int64 _stati64 (const char *path, struct _stati64 *buffer) -{ - WIN32_FILE_ATTRIBUTE_DATA fileAttributeData; - char* ext; - - if (!buffer) - { - __set_errno(EINVAL); - return -1; - } - - if(strchr(path, '*') || strchr(path, '?')) - { - __set_errno(ENOENT); - return -1; - } - - if (!GetFileAttributesExA(path, GetFileExInfoStandard, &fileAttributeData)) - { - __set_errno(ENOENT); - return -1; - } - - memset (buffer, 0, sizeof(struct _stati64)); - - buffer->st_ctime = FileTimeToUnixTime(&fileAttributeData.ftCreationTime,NULL); - buffer->st_atime = FileTimeToUnixTime(&fileAttributeData.ftLastAccessTime,NULL); - buffer->st_mtime = FileTimeToUnixTime(&fileAttributeData.ftLastWriteTime,NULL); - -// statbuf->st_dev = fd; - buffer->st_size = ((((__int64)fileAttributeData.nFileSizeHigh) << 16) << 16) + - fileAttributeData.nFileSizeLow; - buffer->st_mode = S_IREAD; - if (fileAttributeData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) - buffer->st_mode |= S_IFDIR; - else - { - buffer->st_mode |= S_IFREG; - ext = strrchr(path, '.'); - if (ext && (!_stricmp(ext, ".exe") || - !_stricmp(ext, ".com") || - !_stricmp(ext, ".bat") || - !_stricmp(ext, ".cmd"))) - buffer->st_mode |= S_IEXEC; - } - if (!(fileAttributeData.dwFileAttributes & FILE_ATTRIBUTE_READONLY)) - buffer->st_mode |= S_IWRITE; - - return 0; -} - diff --git a/reactos/lib/msvcrt/sys_stat/wstat.c b/reactos/lib/msvcrt/sys_stat/wstat.c deleted file mode 100644 index 5cbdc4360df..00000000000 --- a/reactos/lib/msvcrt/sys_stat/wstat.c +++ /dev/null @@ -1,116 +0,0 @@ -#include "precomp.h" -#include -#include -#include -#include -#include -#include -#include - - -/* - * @implemented - */ -int _wstat (const wchar_t *path, struct stat *buffer) -{ - WIN32_FILE_ATTRIBUTE_DATA fileAttributeData; - wchar_t *ext; - - if (!buffer) - { - __set_errno(EINVAL); - return -1; - } - - if(wcschr(path, L'*') || wcschr(path, L'?')) - { - __set_errno(ENOENT); - return -1; - } - - if (!GetFileAttributesExW(path, GetFileExInfoStandard, &fileAttributeData)) - { - __set_errno(ENOENT); - return -1; - } - - memset (buffer, 0, sizeof(struct stat)); - - buffer->st_ctime = FileTimeToUnixTime(&fileAttributeData.ftCreationTime,NULL); - buffer->st_atime = FileTimeToUnixTime(&fileAttributeData.ftLastAccessTime,NULL); - buffer->st_mtime = FileTimeToUnixTime(&fileAttributeData.ftLastWriteTime,NULL); - -// statbuf->st_dev = fd; - buffer->st_size = fileAttributeData.nFileSizeLow; - buffer->st_mode = S_IREAD; - if (fileAttributeData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) - buffer->st_mode |= S_IFDIR; - else - { - buffer->st_mode |= S_IFREG; - ext = wcsrchr(path, L'.'); - if (ext && (!_wcsicmp(ext, L".exe") || - !_wcsicmp(ext, L".com") || - !_wcsicmp(ext, L".bat") || - !_wcsicmp(ext, L".cmd"))) - buffer->st_mode |= S_IEXEC; - } - if (!(fileAttributeData.dwFileAttributes & FILE_ATTRIBUTE_READONLY)) - buffer->st_mode |= S_IWRITE; - - return 0; -} - -/* - * @implemented - */ -__int64 _wstati64 (const wchar_t *path, struct _stati64 *buffer) -{ - WIN32_FILE_ATTRIBUTE_DATA fileAttributeData; - wchar_t *ext; - - if (!buffer) - { - __set_errno(EINVAL); - return -1; - } - - if(wcschr(path, L'*') || wcschr(path, L'?')) - { - __set_errno(ENOENT); - return -1; - } - - if (!GetFileAttributesExW(path, GetFileExInfoStandard, &fileAttributeData)) - { - __set_errno(ENOENT); - return -1; - } - - memset (buffer, 0, sizeof(struct _stati64)); - - buffer->st_ctime = FileTimeToUnixTime(&fileAttributeData.ftCreationTime,NULL); - buffer->st_atime = FileTimeToUnixTime(&fileAttributeData.ftLastAccessTime,NULL); - buffer->st_mtime = FileTimeToUnixTime(&fileAttributeData.ftLastWriteTime,NULL); - -// statbuf->st_dev = fd; - buffer->st_size = ((((__int64)fileAttributeData.nFileSizeHigh) << 16) << 16) + - fileAttributeData.nFileSizeLow; - buffer->st_mode = S_IREAD; - if (fileAttributeData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) - buffer->st_mode |= S_IFDIR; - else - { - buffer->st_mode |= S_IFREG; - ext = wcsrchr(path, L'.'); - if (ext && (!_wcsicmp(ext, L".exe") || - !_wcsicmp(ext, L".com") || - !_wcsicmp(ext, L".bat") || - !_wcsicmp(ext, L".cmd"))) - buffer->st_mode |= S_IEXEC; - } - if (!(fileAttributeData.dwFileAttributes & FILE_ATTRIBUTE_READONLY)) - buffer->st_mode |= S_IWRITE; - - return 0; -} diff --git a/reactos/lib/msvcrt/time/clock.c b/reactos/lib/msvcrt/time/clock.c deleted file mode 100644 index cd9e77a41c8..00000000000 --- a/reactos/lib/msvcrt/time/clock.c +++ /dev/null @@ -1,32 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/msvcrt/time/clock.c - * PURPOSE: Get elapsed time - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 28/12/98: Created - */ - -#include "precomp.h" -#include -#include - -VOID STDCALL GetSystemTimeAsFileTime(LPFILETIME lpSystemTimeAsFileTime ); - -/* - * @implemented - */ -clock_t clock ( void ) -{ - FILETIME CreationTime; - FILETIME ExitTime; - FILETIME KernelTime; - FILETIME UserTime; - DWORD Remainder; - - if (!GetProcessTimes(GetCurrentProcess(),&CreationTime,&ExitTime,&KernelTime,&UserTime)) - return -1; - - return FileTimeToUnixTime(&KernelTime,&Remainder) + FileTimeToUnixTime(&UserTime,&Remainder); -} diff --git a/reactos/lib/msvcrt/time/ctime.c b/reactos/lib/msvcrt/time/ctime.c deleted file mode 100644 index fcadb68f1a3..00000000000 --- a/reactos/lib/msvcrt/time/ctime.c +++ /dev/null @@ -1,1439 +0,0 @@ - -// fix djdir - -/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ -/* This file has been modified by DJ Delorie. These modifications are -** Copyright (C) 1995 DJ Delorie, 24 Kirsten Ave, Rochester NH, -** 03867-2954, USA. -*/ - -/* - * Copyright (c) 1987, 1989 Regents of the University of California. - * All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * Arthur David Olson of the National Cancer Institute. - * - * Redistribution and use in source and binary forms are permitted provided - * that: (1) source distributions retain this entire copyright notice and - * comment, and (2) distributions including binaries display the following - * acknowledgement: ``This product includes software developed by the - * University of California, Berkeley and its contributors'' in the - * documentation or other materials provided with the distribution and in - * all advertising materials mentioning features or use of this software. - * Neither the name of the University nor the names of its contributors may - * be used to endorse or promote products derived from this software without - * specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -/* -** Leap second handling from Bradley White (bww@k.gp.cs.cmu.edu). -** POSIX-style TZ environment variable handling from Guy Harris -** (guy@auspex.com). -*/ - -#include "precomp.h" -#include -#include -#include -#include -#include -#include - -#include "tzfile.h" - -#include - -#include "posixrul.h" - - -#ifdef __cplusplus -#define CPP_CONST const -#else -#define CPP_CONST -#endif - -#define P(s) s -#define alloc_size_t size_t -#define qsort_size_t size_t -#define fread_size_t size_t -#define fwrite_size_t size_t - -#define ACCESS_MODE O_RDONLY|O_BINARY -#define OPEN_MODE O_RDONLY|O_BINARY - -/* -** Someone might make incorrect use of a time zone abbreviation: -** 1. They might reference tzname[0] before calling tzset (explicitly -** or implicitly). -** 2. They might reference tzname[1] before calling tzset (explicitly -** or implicitly). -** 3. They might reference tzname[1] after setting to a time zone -** in which Daylight Saving Time is never observed. -** 4. They might reference tzname[0] after setting to a time zone -** in which Standard Time is never observed. -** 5. They might reference tm.TM_ZONE after calling offtime. -** What's best to do in the above cases is open to debate; -** for now, we just set things up so that in any of the five cases -** WILDABBR is used. Another possibility: initialize tzname[0] to the -** string "tzname[0] used before set", and similarly for the other cases. -** And another: initialize tzname[0] to "ERA", with an explanation in the -** manual page of what this "time zone abbreviation" means (doing this so -** that tzname[0] has the "normal" length of three characters). -*/ - -void _set_daylight_export(int); -void _set_timezone_export(int); - - -/* buffers must hold 64 characters! */ -static char TZ_NAME[64] = "PST"; -static char TZ_DST_NAME[64] = "PDT"; - -#ifndef TRUE -#define TRUE 1 -#define FALSE 0 -#endif /* !defined TRUE */ - -static const char GMT[] = "GMT"; - -struct ttinfo { /* time type information */ - long tt_gmtoff; /* GMT offset in seconds */ - int tt_isdst; /* used to set tm_isdst */ - int tt_abbrind; /* abbreviation list index */ - int tt_ttisstd; /* TRUE if transition is std time */ -}; - -struct lsinfo { /* leap second information */ - time_t ls_trans; /* transition time */ - long ls_corr; /* correction to apply */ -}; - -struct state { - int leapcnt; - int timecnt; - int typecnt; - int charcnt; - time_t ats[TZ_MAX_TIMES]; - unsigned char types[TZ_MAX_TIMES]; - struct ttinfo ttis[TZ_MAX_TYPES]; - char chars[(TZ_MAX_CHARS + 1 > sizeof GMT) ? TZ_MAX_CHARS + 1 : sizeof GMT]; - struct lsinfo lsis[TZ_MAX_LEAPS]; -}; - -struct rule { - int r_type; /* type of rule--see below */ - int r_day; /* day number of rule */ - int r_week; /* week number of rule */ - int r_mon; /* month number of rule */ - long r_time; /* transition time of rule */ -}; - -#define JULIAN_DAY 0 /* Jn - Julian day */ -#define DAY_OF_YEAR 1 /* n - day of year */ -#define MONTH_NTH_DAY_OF_WEEK 2 /* Mm.n.d - month, week, day of week */ - -/* -** Prototypes for static functions. -*/ -#if 0 -static long detzcode P((const char * codep)); -static const char * getzname P((const char * strp)); -static const char * getnum P((const char * strp, int * nump, int min, int max)); -static const char * getsecs P((const char * strp, long * secsp)); -static const char * getoffset P((const char * strp, long * offsetp)); -static const char * getrule P((const char * strp, struct rule * rulep)); -static void gmtload P((struct state * sp)); -static void gmtsub P((const time_t * timep, long offset, struct tm * tmp)); -static void localsub P((const time_t * timep, long offset, struct tm * tmp)); -static void normalize P((int * tensptr, int * unitsptr, int base)); -static void settzname P((void)); -static time_t time1 P((struct tm * tmp, void (* funcp)(const time_t * CPP_CONST, const long, struct tm * CPP_CONST), long offset)); -static time_t time2 P((struct tm *tmp, void (* funcp)(const time_t * CPP_CONST, const long, struct tm * CPP_CONST), long offset, int * okayp)); -static void timesub P((const time_t * timep, long offset, const struct state * sp, struct tm * tmp)); -static int tmcomp P((const struct tm * atmp, const struct tm * btmp)); -static time_t transtime P((time_t janfirst, int year, const struct rule * rulep, long offset)); -static int tzload P((const char * name, struct state * sp)); -static int tzparse P((const char * name, struct state * sp, int lastditch)); -static void tzsetwall(void); - -#else - -static const char * getnum(const char * strp, int * CPP_CONST nump, const int min, const int max); -static void timesub(const time_t * CPP_CONST timep, const long offset, const struct state * CPP_CONST sp, struct tm * CPP_CONST tmp); -static time_t transtime(const time_t janfirst, const int year, const struct rule * CPP_CONST rulep, const long offset); -static void tzsetwall(void); - -#endif - -#ifdef ALL_STATE -static struct state *lclptr; -static struct state *gmtptr; -#endif /* defined ALL_STATE */ - -#ifndef ALL_STATE -static struct state lclmem; -static struct state gmtmem; -#define lclptr (&lclmem) -#define gmtptr (&gmtmem) -#endif /* State Farm */ - -static int lcl_is_set; -static int gmt_is_set; - -char * _tzname[2] = { - TZ_NAME, - TZ_DST_NAME, -}; - -static long -detzcode(const char * CPP_CONST codep) -{ - long result; - int i; - - result = 0; - for (i = 0; i < 4; ++i) - result = (result << 8) | (codep[i] & 0xff); - return result; -} - -static void -settzname(void) -{ - const struct state * CPP_CONST sp = lclptr; - int i; - - _tzname[0] = TZ_NAME; - _tzname[1] = TZ_DST_NAME; -#ifdef ALL_STATE - if (sp == NULL) - { - _tzname[0] = _tzname[1] = GMT; - return; - } -#endif /* defined ALL_STATE */ - for (i = 0; i < sp->typecnt; ++i) - { - register const struct ttinfo * CPP_CONST ttisp = &sp->ttis[i]; - - _tzname[ttisp->tt_isdst] = - (char *)&sp->chars[ttisp->tt_abbrind]; -#if 0 - if (ttisp->tt_isdst) { - //_daylight = 1; - _set_daylight_export(1); - } - if (i == 0 || !ttisp->tt_isdst) { - //_timezone_dll = -(ttisp->tt_gmtoff); - _set_timezone_export(-(ttisp->tt_gmtoff)); - } - if (i == 0 || ttisp->tt_isdst) { - _altzone = -(ttisp->tt_gmtoff); - } -#endif - } - /* - ** And to get the latest zone names into tzname. . . - */ - for (i = 0; i < sp->timecnt; ++i) - { - const struct ttinfo * CPP_CONST ttisp = &sp->ttis[sp->types[i]]; - - _tzname[ttisp->tt_isdst] = (char *)&sp->chars[ttisp->tt_abbrind]; - } -} - -static char* tzdir(void) -{ - static char dir[80]={0}, *cp; - if (dir[0] == 0) - { - if ((cp = getenv("TZDIR"))) - { - strcpy(dir, cp); - } - else if ((cp = getenv("DJDIR"))) - { - strcpy(dir, cp); - strcat(dir, "/zoneinfo"); - } - else - strcpy(dir, "./"); - } - return dir; -} - -static int tzload(const char* name, struct state* CPP_CONST sp) -{ - const char * p; - int i; - int fid; - char fullname[FILENAME_MAX + 1]; - const struct tzhead * tzhp; - char buf[sizeof *sp + sizeof *tzhp]; - int ttisstdcnt; - - if (name == NULL && (name = TZDEFAULT) == NULL) - return -1; - - if (name[0] == ':') - ++name; - if (name[0] != '/') - { - if ((p = tzdir()) == NULL) - return -1; - if ((strlen(p) + strlen(name) + 1) >= sizeof fullname) - return -1; - strcpy(fullname, p); - strcat(fullname, "/"); - strcat(fullname, name); - name = fullname; - } - - if ((fid = open(name, OPEN_MODE)) == -1) - { - const char *base = strrchr(name, '/'); - if (base) - base++; - else - base = name; - if (strcmp(base, "posixrules")) - return -1; - - /* We've got a built-in copy of posixrules just in case */ - memcpy(buf, _posixrules_data, sizeof(_posixrules_data)); - i = sizeof(_posixrules_data); - } - else - { - i = read(fid, buf, sizeof buf); - if (close(fid) != 0 || i < sizeof *tzhp) - return -1; - } - - tzhp = (struct tzhead *) buf; - ttisstdcnt = (int) detzcode(tzhp->tzh_ttisstdcnt); - sp->leapcnt = (int) detzcode(tzhp->tzh_leapcnt); - sp->timecnt = (int) detzcode(tzhp->tzh_timecnt); - sp->typecnt = (int) detzcode(tzhp->tzh_typecnt); - sp->charcnt = (int) detzcode(tzhp->tzh_charcnt); - if (sp->leapcnt < 0 || sp->leapcnt > TZ_MAX_LEAPS || - sp->typecnt <= 0 || sp->typecnt > TZ_MAX_TYPES || - sp->timecnt < 0 || sp->timecnt > TZ_MAX_TIMES || - sp->charcnt < 0 || sp->charcnt > TZ_MAX_CHARS || - (ttisstdcnt != sp->typecnt && ttisstdcnt != 0)) - return -1; - if (i < sizeof *tzhp + - sp->timecnt * (4 + sizeof (char)) + - sp->typecnt * (4 + 2 * sizeof (char)) + - sp->charcnt * sizeof (char) + - sp->leapcnt * 2 * 4 + - ttisstdcnt * sizeof (char)) - return -1; - p = buf + sizeof *tzhp; - for (i = 0; i < sp->timecnt; ++i) - { - sp->ats[i] = detzcode(p); - p += 4; - } - for (i = 0; i < sp->timecnt; ++i) - { - sp->types[i] = (unsigned char) *p++; - if (sp->types[i] >= sp->typecnt) - return -1; - } - for (i = 0; i < sp->typecnt; ++i) - { - struct ttinfo * ttisp; - - ttisp = &sp->ttis[i]; - ttisp->tt_gmtoff = detzcode(p); - p += 4; - ttisp->tt_isdst = (unsigned char) *p++; - if (ttisp->tt_isdst != 0 && ttisp->tt_isdst != 1) - return -1; - ttisp->tt_abbrind = (unsigned char) *p++; - if (ttisp->tt_abbrind < 0 || - ttisp->tt_abbrind > sp->charcnt) - return -1; - } - for (i = 0; i < sp->charcnt; ++i) - sp->chars[i] = *p++; - sp->chars[i] = '\0'; /* ensure '\0' at end */ - for (i = 0; i < sp->leapcnt; ++i) - { - struct lsinfo * lsisp; - - lsisp = &sp->lsis[i]; - lsisp->ls_trans = detzcode(p); - p += 4; - lsisp->ls_corr = detzcode(p); - p += 4; - } - for (i = 0; i < sp->typecnt; ++i) - { - struct ttinfo * ttisp; - - ttisp = &sp->ttis[i]; - if (ttisstdcnt == 0) - ttisp->tt_ttisstd = FALSE; - else - { - ttisp->tt_ttisstd = *p++; - if (ttisp->tt_ttisstd != TRUE && - ttisp->tt_ttisstd != FALSE) - return -1; - } - } - return 0; -} - -static const int mon_lengths[2][MONSPERYEAR] = { -{ 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }, -{ 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 } -}; - -static const int year_lengths[2] = { -DAYSPERNYEAR, DAYSPERLYEAR -}; - -/* -** Given a pointer into a time zone string, scan until a character that is not -** a valid character in a zone name is found. Return a pointer to that -** character. -*/ - -static const char* -getzname(const char* strp) -{ - char c; - - while ((c = *strp) != '\0' && !isdigit(c) && c != ',' && c != '-' && - c != '+') - ++strp; - return strp; -} - -/* -** Given a pointer into a time zone string, extract a number from that string. -** Check that the number is within a specified range; if it is not, return -** NULL. -** Otherwise, return a pointer to the first character not part of the number. -*/ - -static const char* -getnum(const char* strp, int* CPP_CONST nump, const int min, const int max) -{ - char c; - int num; - - if (strp == NULL || !isdigit(*strp)) - return NULL; - num = 0; - while ((c = *strp) != '\0' && isdigit(c)) - { - num = num * 10 + (c - '0'); - if (num > max) - return NULL; - ++strp; - } - if (num < min) - return NULL; - *nump = num; - return strp; -} - -/* -** Given a pointer into a time zone string, extract a number of seconds, -** in hh[:mm[:ss]] form, from the string. -** If any error occurs, return NULL. -** Otherwise, return a pointer to the first character not part of the number -** of seconds. -*/ - -static const char * -getsecs(const char *strp, long * CPP_CONST secsp) -{ - int num; - - strp = getnum(strp, &num, 0, HOURSPERDAY); - if (strp == NULL) - return NULL; - *secsp = num * SECSPERHOUR; - if (*strp == ':') - { - ++strp; - strp = getnum(strp, &num, 0, MINSPERHOUR - 1); - if (strp == NULL) - return NULL; - *secsp += num * SECSPERMIN; - if (*strp == ':') - { - ++strp; - strp = getnum(strp, &num, 0, SECSPERMIN - 1); - if (strp == NULL) - return NULL; - *secsp += num; - } - } - return strp; -} - -/* -** Given a pointer into a time zone string, extract an offset, in -** [+-]hh[:mm[:ss]] form, from the string. -** If any error occurs, return NULL. -** Otherwise, return a pointer to the first character not part of the time. -*/ - -static const char * -getoffset(const char *strp, long * CPP_CONST offsetp) -{ - int neg; - - if (*strp == '-') - { - neg = 1; - ++strp; - } - else if (isdigit(*strp) || *strp++ == '+') - neg = 0; - else - return NULL; /* illegal offset */ - strp = getsecs(strp, offsetp); - if (strp == NULL) - return NULL; /* illegal time */ - if (neg) - *offsetp = -*offsetp; - return strp; -} - -/* -** Given a pointer into a time zone string, extract a rule in the form -** date[/time]. See POSIX section 8 for the format of "date" and "time". -** If a valid rule is not found, return NULL. -** Otherwise, return a pointer to the first character not part of the rule. -*/ - -static const char * -getrule(const char *strp, struct rule * CPP_CONST rulep) -{ - if (*strp == 'J') - { - /* - ** Julian day. - */ - rulep->r_type = JULIAN_DAY; - ++strp; - strp = getnum(strp, &rulep->r_day, 1, DAYSPERNYEAR); - } - else if (*strp == 'M') - { - /* - ** Month, week, day. - */ - rulep->r_type = MONTH_NTH_DAY_OF_WEEK; - ++strp; - strp = getnum(strp, &rulep->r_mon, 1, MONSPERYEAR); - if (strp == NULL) - return NULL; - if (*strp++ != '.') - return NULL; - strp = getnum(strp, &rulep->r_week, 1, 5); - if (strp == NULL) - return NULL; - if (*strp++ != '.') - return NULL; - strp = getnum(strp, &rulep->r_day, 0, DAYSPERWEEK - 1); - } - else if (isdigit(*strp)) - { - /* - ** Day of year. - */ - rulep->r_type = DAY_OF_YEAR; - strp = getnum(strp, &rulep->r_day, 0, DAYSPERLYEAR - 1); - } - else - return NULL; /* invalid format */ - if (strp == NULL) - return NULL; - if (*strp == '/') - { - /* - ** Time specified. - */ - ++strp; - strp = getsecs(strp, &rulep->r_time); - } - else - rulep->r_time = 2 * SECSPERHOUR; /* default = 2:00:00 */ - return strp; -} - -/* -** Given the Epoch-relative time of January 1, 00:00:00 GMT, in a year, the -** year, a rule, and the offset from GMT at the time that rule takes effect, -** calculate the Epoch-relative time that rule takes effect. -*/ - -static time_t -transtime(const time_t janfirst, const int year, const struct rule * CPP_CONST rulep, const long offset) -{ - int leapyear; - time_t value=0; - int i; - int d, m1, yy0, yy1, yy2, dow; - - leapyear = isleap(year); - switch (rulep->r_type) - { - - case JULIAN_DAY: - /* - ** Jn - Julian day, 1 == January 1, 60 == March 1 even in leap - ** years. - ** In non-leap years, or if the day number is 59 or less, just - ** add SECSPERDAY times the day number-1 to the time of - ** January 1, midnight, to get the day. - */ - value = janfirst + (rulep->r_day - 1) * SECSPERDAY; - if (leapyear && rulep->r_day >= 60) - value += SECSPERDAY; - break; - - case DAY_OF_YEAR: - /* - ** n - day of year. - ** Just add SECSPERDAY times the day number to the time of - ** January 1, midnight, to get the day. - */ - value = janfirst + rulep->r_day * SECSPERDAY; - break; - - case MONTH_NTH_DAY_OF_WEEK: - /* - ** Mm.n.d - nth "dth day" of month m. - */ - value = janfirst; - for (i = 0; i < rulep->r_mon - 1; ++i) - value += mon_lengths[leapyear][i] * SECSPERDAY; - - /* - ** Use Zeller's Congruence to get day-of-week of first day of - ** month. - */ - m1 = (rulep->r_mon + 9) % 12 + 1; - yy0 = (rulep->r_mon <= 2) ? (year - 1) : year; - yy1 = yy0 / 100; - yy2 = yy0 % 100; - dow = ((26 * m1 - 2) / 10 + - 1 + yy2 + yy2 / 4 + yy1 / 4 - 2 * yy1) % 7; - if (dow < 0) - dow += DAYSPERWEEK; - - /* - ** "dow" is the day-of-week of the first day of the month. Get - ** the day-of-month (zero-origin) of the first "dow" day of the - ** month. - */ - d = rulep->r_day - dow; - if (d < 0) - d += DAYSPERWEEK; - for (i = 1; i < rulep->r_week; ++i) - { - if (d + DAYSPERWEEK >= - mon_lengths[leapyear][rulep->r_mon - 1]) - break; - d += DAYSPERWEEK; - } - - /* - ** "d" is the day-of-month (zero-origin) of the day we want. - */ - value += d * SECSPERDAY; - break; - } - - /* - ** "value" is the Epoch-relative time of 00:00:00 GMT on the day in - ** question. To get the Epoch-relative time of the specified local - ** time on that day, add the transition time and the current offset - ** from GMT. - */ - return value + rulep->r_time + offset; -} - -/* -** Given a POSIX section 8-style TZ string, fill in the rule tables as -** appropriate. -*/ - -static int -tzparse(const char *name, struct state * CPP_CONST sp, const int lastditch) -{ - const char * stdname; - const char * dstname=0; - int stdlen; - int dstlen; - long stdoffset; - long dstoffset; - time_t * atp; - unsigned char * typep; - char * cp; - int load_result; - - stdname = name; - if (lastditch) - { - stdlen = strlen(name); /* length of standard zone name */ - name += stdlen; - if (stdlen >= sizeof sp->chars) - stdlen = (sizeof sp->chars) - 1; - } - else - { - name = getzname(name); - stdlen = name - stdname; - if (stdlen < 3) - return -1; - } - if (*name == '\0') - return -1; - else - { - name = getoffset(name, &stdoffset); - if (name == NULL) - return -1; - } - load_result = tzload(TZDEFRULES, sp); - if (load_result != 0) - sp->leapcnt = 0; /* so, we're off a little */ - if (*name != '\0') - { - dstname = name; - name = getzname(name); - dstlen = name - dstname; /* length of DST zone name */ - if (dstlen < 3) - return -1; - if (*name != '\0' && *name != ',' && *name != ';') - { - name = getoffset(name, &dstoffset); - if (name == NULL) - return -1; - } - else - dstoffset = stdoffset - SECSPERHOUR; - if (*name == ',' || *name == ';') - { - struct rule start; - struct rule end; - int year; - time_t janfirst; - time_t starttime; - time_t endtime; - - ++name; - if ((name = getrule(name, &start)) == NULL) - return -1; - if (*name++ != ',') - return -1; - if ((name = getrule(name, &end)) == NULL) - return -1; - if (*name != '\0') - return -1; - sp->typecnt = 2; /* standard time and DST */ - /* - ** Two transitions per year, from EPOCH_YEAR to 2037. - */ - sp->timecnt = 2 * (2037 - EPOCH_YEAR + 1); - if (sp->timecnt > TZ_MAX_TIMES) - return -1; - sp->ttis[0].tt_gmtoff = -dstoffset; - sp->ttis[0].tt_isdst = 1; - sp->ttis[0].tt_abbrind = stdlen + 1; - sp->ttis[1].tt_gmtoff = -stdoffset; - sp->ttis[1].tt_isdst = 0; - sp->ttis[1].tt_abbrind = 0; - atp = sp->ats; - typep = sp->types; - janfirst = 0; - for (year = EPOCH_YEAR; year <= 2037; ++year) - { - starttime = transtime(janfirst, year, &start, - stdoffset); - endtime = transtime(janfirst, year, &end, - dstoffset); - if (starttime > endtime) - { - *atp++ = endtime; - *typep++ = 1; /* DST ends */ - *atp++ = starttime; - *typep++ = 0; /* DST begins */ - } - else - { - *atp++ = starttime; - *typep++ = 0; /* DST begins */ - *atp++ = endtime; - *typep++ = 1; /* DST ends */ - } - janfirst += - year_lengths[isleap(year)] * SECSPERDAY; - } - } - else - { - int sawstd; - int sawdst; - long stdfix; - long dstfix; - long oldfix; - int isdst; - int i; - - if (*name != '\0') - return -1; - if (load_result != 0) - return -1; - /* - ** Compute the difference between the real and - ** prototype standard and summer time offsets - ** from GMT, and put the real standard and summer - ** time offsets into the rules in place of the - ** prototype offsets. - */ - sawstd = FALSE; - sawdst = FALSE; - stdfix = 0; - dstfix = 0; - for (i = 0; i < sp->typecnt; ++i) - { - if (sp->ttis[i].tt_isdst) - { - oldfix = dstfix; - dstfix = - sp->ttis[i].tt_gmtoff + dstoffset; - if (sawdst && (oldfix != dstfix)) - return -1; - sp->ttis[i].tt_gmtoff = -dstoffset; - sp->ttis[i].tt_abbrind = stdlen + 1; - sawdst = TRUE; - } - else - { - oldfix = stdfix; - stdfix = - sp->ttis[i].tt_gmtoff + stdoffset; - if (sawstd && (oldfix != stdfix)) - return -1; - sp->ttis[i].tt_gmtoff = -stdoffset; - sp->ttis[i].tt_abbrind = 0; - sawstd = TRUE; - } - } - /* - ** Make sure we have both standard and summer time. - */ - if (!sawdst || !sawstd) - return -1; - /* - ** Now correct the transition times by shifting - ** them by the difference between the real and - ** prototype offsets. Note that this difference - ** can be different in standard and summer time; - ** the prototype probably has a 1-hour difference - ** between standard and summer time, but a different - ** difference can be specified in TZ. - */ - isdst = FALSE; /* we start in standard time */ - for (i = 0; i < sp->timecnt; ++i) - { - const struct ttinfo * ttisp; - - /* - ** If summer time is in effect, and the - ** transition time was not specified as - ** standard time, add the summer time - ** offset to the transition time; - ** otherwise, add the standard time offset - ** to the transition time. - */ - ttisp = &sp->ttis[sp->types[i]]; - sp->ats[i] += - (isdst && !ttisp->tt_ttisstd) ? - dstfix : stdfix; - isdst = ttisp->tt_isdst; - } - } - } - else - { - dstlen = 0; - sp->typecnt = 1; /* only standard time */ - sp->timecnt = 0; - sp->ttis[0].tt_gmtoff = -stdoffset; - sp->ttis[0].tt_isdst = 0; - sp->ttis[0].tt_abbrind = 0; - } - sp->charcnt = stdlen + 1; - if (dstlen != 0) - sp->charcnt += dstlen + 1; - if (sp->charcnt > sizeof sp->chars) - return -1; - cp = sp->chars; - (void) strncpy(cp, stdname, stdlen); - cp += stdlen; - *cp++ = '\0'; - if (dstlen != 0) - { - (void) strncpy(cp, dstname, dstlen); - *(cp + dstlen) = '\0'; - } - return 0; -} - -static void -gmtload(struct state * CPP_CONST sp) -{ - if (tzload(GMT, sp) != 0) - (void) tzparse(GMT, sp, TRUE); -} - -/* - * @implemented - */ -void -_tzset(void) -{ - const char * name; - - name = getenv("TZ"); - if (name == NULL) - { - tzsetwall(); - return; - } - lcl_is_set = TRUE; -#ifdef ALL_STATE - if (lclptr == NULL) - { - lclptr = (struct state *) malloc(sizeof *lclptr); - if (lclptr == NULL) - { - settzname(); /* all we can do */ - return; - } - } -#endif /* defined ALL_STATE */ - if (*name == '\0') - { - /* - ** User wants it fast rather than right. - */ - lclptr->leapcnt = 0; /* so, we're off a little */ - lclptr->timecnt = 0; - lclptr->ttis[0].tt_gmtoff = 0; - lclptr->ttis[0].tt_abbrind = 0; - (void) strcpy(lclptr->chars, GMT); - } - else if (tzload(name, lclptr) != 0) - if (name[0] == ':' || tzparse(name, lclptr, FALSE) != 0) - gmtload(lclptr); - settzname(); -} - -void -tzsetwall(void) -{ - lcl_is_set = TRUE; -#ifdef ALL_STATE - if (lclptr == NULL) - { - lclptr = (struct state *) malloc(sizeof *lclptr); - if (lclptr == NULL) - { - settzname(); /* all we can do */ - return; - } - } -#endif /* defined ALL_STATE */ - if (tzload((char *) NULL, lclptr) != 0) - gmtload(lclptr); - settzname(); -} - -/* -** The easy way to behave "as if no library function calls" localtime -** is to not call it--so we drop its guts into "localsub", which can be -** freely called. (And no, the PANS doesn't require the above behavior-- -** but it *is* desirable.) -** -** The unused offset argument is for the benefit of mktime variants. -*/ - -/*ARGSUSED*/ -static void -localsub(const time_t * CPP_CONST timep, const long offset, struct tm * CPP_CONST tmp) -{ - const struct state * sp; - const struct ttinfo * ttisp; - int i; - const time_t t = *timep; - - if (!lcl_is_set) - _tzset(); - sp = lclptr; -#ifdef ALL_STATE - if (sp == NULL) - { - gmtsub(timep, offset, tmp); - return; - } -#endif /* defined ALL_STATE */ - if (sp->timecnt == 0 || t < sp->ats[0]) - { - i = 0; - while (sp->ttis[i].tt_isdst) - if (++i >= sp->typecnt) - { - i = 0; - break; - } - } - else - { - for (i = 1; i < sp->timecnt; ++i) - if (t < sp->ats[i]) - break; - i = sp->types[i - 1]; - } - ttisp = &sp->ttis[i]; - /* - ** To get (wrong) behavior that's compatible with System V Release 2.0 - ** you'd replace the statement below with - ** t += ttisp->tt_gmtoff; - ** timesub(&t, 0L, sp, tmp); - */ - timesub(&t, ttisp->tt_gmtoff, sp, tmp); - tmp->tm_isdst = ttisp->tt_isdst; - _tzname[tmp->tm_isdst] = (char *)&sp->chars[ttisp->tt_abbrind]; - tmp->tm_zone = (char *)&sp->chars[ttisp->tt_abbrind]; -} - -/* - * @implemented - */ -struct tm * -localtime(const time_t * CPP_CONST timep) -{ - static struct tm tm; - - localsub(timep, 0L, &tm); - return &tm; -} - -/* -** gmtsub is to gmtime as localsub is to localtime. -*/ - -static void -gmtsub(const time_t * CPP_CONST timep, const long offset, struct tm * CPP_CONST tmp) -{ - if (!gmt_is_set) - { - gmt_is_set = TRUE; -#ifdef ALL_STATE - gmtptr = (struct state *) malloc(sizeof *gmtptr); - if (gmtptr != NULL) -#endif /* defined ALL_STATE */ - gmtload(gmtptr); - } - timesub(timep, offset, gmtptr, tmp); - /* - ** Could get fancy here and deliver something such as - ** "GMT+xxxx" or "GMT-xxxx" if offset is non-zero, - ** but this is no time for a treasure hunt. - */ - if (offset != 0) - tmp->tm_zone = TZ_NAME; - else - { -#ifdef ALL_STATE - if (gmtptr == NULL) - tmp->TM_ZONE = GMT; - else - tmp->TM_ZONE = gmtptr->chars; -#endif /* defined ALL_STATE */ -#ifndef ALL_STATE - tmp->tm_zone = gmtptr->chars; -#endif /* State Farm */ - } -} - -/* - * @implemented - */ -struct tm * -gmtime(const time_t * CPP_CONST timep) -{ - static struct tm tm; - - gmtsub(timep, 0L, &tm); - return &tm; -} - -static void -timesub(const time_t * CPP_CONST timep, const long offset, const struct state * CPP_CONST sp, struct tm * CPP_CONST tmp) -{ - const struct lsinfo * lp; - long days; - long rem; - int y; - int yleap; - const int * ip; - long corr; - int hit; - int i; - - corr = 0; - hit = FALSE; -#ifdef ALL_STATE - i = (sp == NULL) ? 0 : sp->leapcnt; -#endif /* defined ALL_STATE */ -#ifndef ALL_STATE - i = sp->leapcnt; -#endif /* State Farm */ - while (--i >= 0) - { - lp = &sp->lsis[i]; - if (*timep >= lp->ls_trans) - { - if (*timep == lp->ls_trans) - hit = ((i == 0 && lp->ls_corr > 0) || - lp->ls_corr > sp->lsis[i - 1].ls_corr); - corr = lp->ls_corr; - break; - } - } - days = *timep / SECSPERDAY; - rem = *timep % SECSPERDAY; -#ifdef mc68k - if (*timep == 0x80000000) - { - /* - ** A 3B1 muffs the division on the most negative number. - */ - days = -24855; - rem = -11648; - } -#endif /* mc68k */ - rem += (offset - corr); - while (rem < 0) - { - rem += SECSPERDAY; - --days; - } - while (rem >= SECSPERDAY) - { - rem -= SECSPERDAY; - ++days; - } - tmp->tm_hour = (int) (rem / SECSPERHOUR); - rem = rem % SECSPERHOUR; - tmp->tm_min = (int) (rem / SECSPERMIN); - tmp->tm_sec = (int) (rem % SECSPERMIN); - if (hit) - /* - ** A positive leap second requires a special - ** representation. This uses "... ??:59:60". - */ - ++(tmp->tm_sec); - tmp->tm_wday = (int) ((EPOCH_WDAY + days) % DAYSPERWEEK); - if (tmp->tm_wday < 0) - tmp->tm_wday += DAYSPERWEEK; - y = EPOCH_YEAR; - if (days >= 0) - for ( ; ; ) - { - yleap = isleap(y); - if (days < (long) year_lengths[yleap]) - break; - ++y; - days = days - (long) year_lengths[yleap]; - } - else - do { - --y; - yleap = isleap(y); - days = days + (long) year_lengths[yleap]; - } while (days < 0); - tmp->tm_year = y - TM_YEAR_BASE; - tmp->tm_yday = (int) days; - ip = mon_lengths[yleap]; - for (tmp->tm_mon = 0; days >= (long) ip[tmp->tm_mon]; ++(tmp->tm_mon)) - days = days - (long) ip[tmp->tm_mon]; - tmp->tm_mday = (int) (days + 1); - tmp->tm_isdst = 0; - tmp->tm_gmtoff = offset; -} - -/* -** A la X3J11 -*/ - -/* - * @implemented - */ -char * -asctime(const struct tm *timeptr) -{ - static const char wday_name[DAYSPERWEEK][3] = { - "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" - }; - static const char mon_name[MONSPERYEAR][3] = { - "Jan", "Feb", "Mar", "Apr", "May", "Jun", - "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" - }; - static char result[26]; - - (void) sprintf(result, "%.3s %.3s%3d %02d:%02d:%02d %d\n", - wday_name[timeptr->tm_wday], - mon_name[timeptr->tm_mon], - timeptr->tm_mday, timeptr->tm_hour, - timeptr->tm_min, timeptr->tm_sec, - TM_YEAR_BASE + timeptr->tm_year); - return result; -} - -/* - * @implemented - */ -char * -ctime(const time_t * CPP_CONST timep) -{ - return asctime(localtime(timep)); -} - -/* -** Adapted from code provided by Robert Elz, who writes: -** The "best" way to do mktime I think is based on an idea of Bob -** Kridle's (so its said...) from a long time ago. (mtxinu!kridle now). -** It does a binary search of the time_t space. Since time_t's are -** just 32 bits, its a max of 32 iterations (even at 64 bits it -** would still be very reasonable). -*/ - -#ifndef WRONG -#define WRONG (-1) -#endif /* !defined WRONG */ - -static void -normalize(int * CPP_CONST tensptr, int * CPP_CONST unitsptr, const int base) -{ - if (*unitsptr >= base) - { - *tensptr += *unitsptr / base; - *unitsptr %= base; - } - else if (*unitsptr < 0) - { - --*tensptr; - *unitsptr += base; - if (*unitsptr < 0) - { - *tensptr -= 1 + (-*unitsptr) / base; - *unitsptr = base - (-*unitsptr) % base; - } - } -} - -static int -tmcomp(const struct tm * CPP_CONST atmp, const struct tm * CPP_CONST btmp) -{ - int result; - - if ((result = (atmp->tm_year - btmp->tm_year)) == 0 && - (result = (atmp->tm_mon - btmp->tm_mon)) == 0 && - (result = (atmp->tm_mday - btmp->tm_mday)) == 0 && - (result = (atmp->tm_hour - btmp->tm_hour)) == 0 && - (result = (atmp->tm_min - btmp->tm_min)) == 0) - result = atmp->tm_sec - btmp->tm_sec; - return result; -} - -static time_t -time2(struct tm *tmp, void (*const funcp)(const time_t * CPP_CONST, const long, struct tm *), const long offset, int * CPP_CONST okayp) -{ - const struct state * sp; - int dir; - int bits; - int i, j ; - int saved_seconds; - time_t newt; - time_t t; - struct tm yourtm, mytm; - - *okayp = FALSE; - yourtm = *tmp; - if (yourtm.tm_sec >= SECSPERMIN + 2 || yourtm.tm_sec < 0) - normalize(&yourtm.tm_min, &yourtm.tm_sec, SECSPERMIN); - normalize(&yourtm.tm_hour, &yourtm.tm_min, MINSPERHOUR); - normalize(&yourtm.tm_mday, &yourtm.tm_hour, HOURSPERDAY); - normalize(&yourtm.tm_year, &yourtm.tm_mon, MONSPERYEAR); - while (yourtm.tm_mday <= 0) - { - --yourtm.tm_year; - yourtm.tm_mday += - year_lengths[isleap(yourtm.tm_year + TM_YEAR_BASE)]; - } - for ( ; ; ) - { - i = mon_lengths[isleap(yourtm.tm_year + - TM_YEAR_BASE)][yourtm.tm_mon]; - if (yourtm.tm_mday <= i) - break; - yourtm.tm_mday -= i; - if (++yourtm.tm_mon >= MONSPERYEAR) - { - yourtm.tm_mon = 0; - ++yourtm.tm_year; - } - } - saved_seconds = yourtm.tm_sec; - yourtm.tm_sec = 0; - /* - ** Calculate the number of magnitude bits in a time_t - ** (this works regardless of whether time_t is - ** signed or unsigned, though lint complains if unsigned). - */ - for (bits = 0, t = 1; t > 0; ++bits, t <<= 1) - ; - /* - ** If time_t is signed, then 0 is the median value, - ** if time_t is unsigned, then 1 << bits is median. - */ -#ifdef _MSVCRT_LIB_ - t = (time_t) ((1 << bits) - 1); -#else // TODO: FIXME: review which is correct - t = (time_t) 1 << bits; -#endif /*_MSVCRT_LIB_*/ - - for ( ; ; ) - { - (*funcp)(&t, offset, &mytm); - dir = tmcomp(&mytm, &yourtm); - if (dir != 0) - { - if (bits-- < 0) - return WRONG; - if (bits < 0) - --t; - else if (dir > 0) - t -= (time_t) 1 << bits; - else t += (time_t) 1 << bits; - continue; - } - if (yourtm.tm_isdst < 0 || mytm.tm_isdst == yourtm.tm_isdst) - break; - /* - ** Right time, wrong type. - ** Hunt for right time, right type. - ** It's okay to guess wrong since the guess - ** gets checked. - */ - sp = (const struct state *) - ((funcp == localsub) ? lclptr : gmtptr); -#ifdef ALL_STATE - if (sp == NULL) - return WRONG; -#endif /* defined ALL_STATE */ - for (i = 0; i < sp->typecnt; ++i) - { - if (sp->ttis[i].tt_isdst != yourtm.tm_isdst) - continue; - for (j = 0; j < sp->typecnt; ++j) - { - if (sp->ttis[j].tt_isdst == yourtm.tm_isdst) - continue; - newt = t + sp->ttis[j].tt_gmtoff - - sp->ttis[i].tt_gmtoff; - (*funcp)(&newt, offset, &mytm); - if (tmcomp(&mytm, &yourtm) != 0) - continue; - if (mytm.tm_isdst != yourtm.tm_isdst) - continue; - /* - ** We have a match. - */ - t = newt; - goto label; - } - } - return WRONG; - } - label: - t += saved_seconds; - (*funcp)(&t, offset, tmp); - *okayp = TRUE; - return t; -} - -static time_t -time1(struct tm * CPP_CONST tmp, void (*const funcp)(const time_t * CPP_CONST, const long, struct tm *), const long offset) -{ - time_t t; - const struct state * sp; - int samei, otheri; - int okay; - - if (tmp->tm_isdst > 1) - tmp->tm_isdst = 1; - t = time2(tmp, funcp, offset, &okay); - if (okay || tmp->tm_isdst < 0) - return t; - /* - ** We're supposed to assume that somebody took a time of one type - ** and did some math on it that yielded a "struct tm" that's bad. - ** We try to divine the type they started from and adjust to the - ** type they need. - */ - sp = (const struct state *) ((funcp == localsub) ? lclptr : gmtptr); -#ifdef ALL_STATE - if (sp == NULL) - return WRONG; -#endif /* defined ALL_STATE */ - for (samei = 0; samei < sp->typecnt; ++samei) - { - if (sp->ttis[samei].tt_isdst != tmp->tm_isdst) - continue; - for (otheri = 0; otheri < sp->typecnt; ++otheri) - { - if (sp->ttis[otheri].tt_isdst == tmp->tm_isdst) - continue; - tmp->tm_sec += sp->ttis[otheri].tt_gmtoff - - sp->ttis[samei].tt_gmtoff; - tmp->tm_isdst = !tmp->tm_isdst; - t = time2(tmp, funcp, offset, &okay); - if (okay) - return t; - tmp->tm_sec -= sp->ttis[otheri].tt_gmtoff - - sp->ttis[samei].tt_gmtoff; - tmp->tm_isdst = !tmp->tm_isdst; - } - } - return WRONG; -} - -/* - * @implemented - */ -time_t -mktime(struct tm * tmp) -{ - return time1(tmp, localsub, 0L); -} diff --git a/reactos/lib/msvcrt/time/difftime.c b/reactos/lib/msvcrt/time/difftime.c deleted file mode 100644 index 9e9d590a2cb..00000000000 --- a/reactos/lib/msvcrt/time/difftime.c +++ /dev/null @@ -1,11 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include - -/* - * @implemented - */ -double -difftime(time_t time1, time_t time0) -{ - return time1-time0; -} diff --git a/reactos/lib/msvcrt/time/ftime.c b/reactos/lib/msvcrt/time/ftime.c deleted file mode 100644 index 8db083b3cff..00000000000 --- a/reactos/lib/msvcrt/time/ftime.c +++ /dev/null @@ -1,34 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/msvcrt/time/ftime.c - * PURPOSE: Deprecated BSD library call - * PROGRAMER: Art Yerkes - * UPDATE HISTORY: - * 07/15/03 -- Created - */ - -#include "precomp.h" -#include -#include - -/* ftime (3) -- Obsolete BSD library function included in the SUS for copat. - * Also present in msvcrt.dll as _ftime - * See: http://www.opengroup.org/onlinepubs/007904957/functions/ftime.html */ -/* - * @implemented - */ -void _ftime( struct timeb *tm ) -{ - int ret = 0; - SYSTEMTIME syst; - - GetSystemTime( &syst ); - - if( ret == 0 ) { - time( &tm->time ); - tm->millitm = syst.wMilliseconds; - tm->_timezone = 0; /* According to the open group, timezone and dstflag */ - tm->dstflag = 0; /* exist for compatibility, but are unspecified. */ - } -} diff --git a/reactos/lib/msvcrt/time/posixrul.h b/reactos/lib/msvcrt/time/posixrul.h deleted file mode 100644 index 48c5ceeab0d..00000000000 --- a/reactos/lib/msvcrt/time/posixrul.h +++ /dev/null @@ -1,49 +0,0 @@ -/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ -/* generated with bin2h from DJGPP/zoneinfo/posixrules */ - -unsigned char _posixrules_data[] = { -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0, -0,1,16,0,0,0,2,0,0,0,8,0,151,254,240,1,135,225,224,2,119,224,240,3,112,254,96,4,96,253,112,5,80, -224,96,6,64,223,112,7,48,194,96,7,141,25,112,9,16,164,96,9,173,148,240,10,240,134,96,11,224,133,112,12,217,162, -224,13,192,103,112,14,185,132,224,15,169,131,240,16,153,102,224,17,137,101,240,18,121,72,224,19,105,71,240,20,89,42,224, -21,73,41,240,22,57,12,224,23,41,11,240,24,34,41,96,25,8,237,240,26,2,11,96,26,242,10,112,27,225,237,96,28, -209,236,112,29,193,207,96,30,177,206,112,31,161,177,96,32,118,0,240,33,129,147,96,34,85,226,240,35,106,175,224,36,53, -196,240,37,74,145,224,38,21,166,240,39,42,115,224,39,254,195,112,41,10,85,224,41,222,165,112,42,234,55,224,43,190,135, -112,44,211,84,96,45,158,105,112,46,179,54,96,47,126,75,112,48,147,24,96,49,103,103,240,50,114,250,96,51,71,73,240, -52,82,220,96,53,39,43,240,54,50,190,96,55,7,13,240,56,27,218,224,56,230,239,240,57,251,188,224,58,198,209,240,59, -219,158,224,60,175,238,112,61,187,128,224,62,143,208,112,63,155,98,224,64,111,178,112,65,132,127,96,66,79,148,112,67,100, -97,96,68,47,118,112,69,68,67,96,70,15,88,112,71,36,37,96,71,248,116,240,73,4,7,96,73,216,86,240,74,227,233, -96,75,184,56,240,76,205,5,224,77,152,26,240,78,172,231,224,79,119,252,240,80,140,201,224,81,97,25,112,82,108,171,224, -83,64,251,112,84,76,141,224,85,32,221,112,86,44,111,224,87,0,191,112,88,21,140,96,88,224,161,112,89,245,110,96,90, -192,131,112,91,213,80,96,92,169,159,240,93,181,50,96,94,137,129,240,95,149,20,96,96,105,99,240,97,126,48,224,98,73, -69,240,99,94,18,224,100,41,39,240,101,61,244,224,102,18,68,112,103,29,214,224,103,242,38,112,104,253,184,224,105,210,8, -112,106,221,154,224,107,177,234,112,108,198,183,96,109,145,204,112,110,166,153,96,111,113,174,112,112,134,123,96,113,90,202,240, -114,102,93,96,115,58,172,240,116,70,63,96,117,26,142,240,118,47,91,224,118,250,112,240,120,15,61,224,120,218,82,240,121, -239,31,224,122,186,52,240,123,207,1,224,124,163,81,112,125,174,227,224,126,131,51,112,127,142,197,224,128,99,21,112,129,119, -226,96,130,66,247,112,131,87,196,96,132,34,217,112,133,55,166,96,134,11,245,240,135,23,136,96,135,235,215,240,136,247,106, -96,137,203,185,240,138,215,76,96,139,171,155,240,140,192,104,224,141,139,125,240,142,160,74,224,143,107,95,240,144,128,44,224, -145,84,124,112,146,96,14,224,147,52,94,112,148,63,240,224,149,20,64,112,150,41,13,96,150,244,34,112,152,8,239,96,152, -212,4,112,153,232,209,96,154,189,32,240,155,200,179,96,156,157,2,240,157,168,149,96,158,124,228,240,159,136,119,96,160,92, -198,240,161,113,147,224,162,60,168,240,163,81,117,224,164,28,138,240,165,49,87,224,166,5,167,112,167,17,57,224,167,229,137, -112,168,241,27,224,169,197,107,112,170,218,56,96,171,165,77,112,172,186,26,96,173,133,47,112,174,153,252,96,175,101,17,112, -176,121,222,96,177,78,45,240,178,89,192,96,179,46,15,240,180,57,162,96,181,13,241,240,182,34,190,224,182,237,211,240,184, -2,160,224,184,205,181,240,185,226,130,224,186,182,210,112,187,194,100,224,188,150,180,112,189,162,70,224,190,118,150,112,191,130, -40,224,192,86,120,112,193,107,69,96,194,54,90,112,195,75,39,96,196,22,60,112,197,43,9,96,197,255,88,240,199,10,235, -96,199,223,58,240,200,234,205,96,201,191,28,240,202,211,233,224,203,158,254,240,204,179,203,224,205,126,224,240,206,147,173,224, -207,103,253,112,208,115,143,224,209,71,223,112,210,83,113,224,211,39,193,112,212,51,83,224,213,7,163,112,214,28,112,96,214, -231,133,112,215,252,82,96,216,199,103,112,217,220,52,96,218,176,131,240,219,188,22,96,220,144,101,240,221,155,248,96,222,112, -71,240,223,133,20,224,224,80,41,240,225,100,246,224,226,48,11,240,227,68,216,224,228,15,237,240,229,36,186,224,229,249,10, -112,231,4,156,224,231,216,236,112,232,228,126,224,233,184,206,112,234,205,155,96,235,152,176,112,236,173,125,96,237,120,146,112, -238,141,95,96,239,97,174,240,240,109,65,96,241,65,144,240,242,77,35,96,243,33,114,240,244,45,5,96,245,1,84,240,246, -22,33,224,246,225,54,240,247,246,3,224,248,193,24,240,249,213,229,224,250,160,250,240,251,181,199,224,252,138,23,112,253,149, -169,224,254,105,249,112,255,117,139,224,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0, -1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1, -0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0, -1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1, -0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0, -1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1, -0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0, -1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1, -0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,255,255,199,192,1,0,255,255,185,176,0,4,69,68,84, -0,69,83,84,0,0,0 -}; diff --git a/reactos/lib/msvcrt/time/strdate.c b/reactos/lib/msvcrt/time/strdate.c deleted file mode 100644 index 204e07d28d4..00000000000 --- a/reactos/lib/msvcrt/time/strdate.c +++ /dev/null @@ -1,33 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/msvcrt/time/strtime.c - * PURPOSE: Fills a buffer with a formatted date representation - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 28/12/98: Created - */ -#include -#include -#include -#include - - -/* - * @implemented - */ -char* _strdate(const char* datestr) -{ - time_t t; - struct tm* d; - char* dt = (char*)datestr; - - if (datestr == NULL) { - __set_errno(EINVAL); - return NULL; - } - t = time(NULL); - d = localtime(&t); - sprintf(dt,"%d/%d/%d",d->tm_mday,d->tm_mon+1,d->tm_year); - return dt; -} diff --git a/reactos/lib/msvcrt/time/strftime.c b/reactos/lib/msvcrt/time/strftime.c deleted file mode 100644 index bb7553e399c..00000000000 --- a/reactos/lib/msvcrt/time/strftime.c +++ /dev/null @@ -1,260 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include -#include -#include -#include - - -#define TM_YEAR_BASE 1900 - -static const char *afmt[] = { - "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", -}; -static const char *Afmt[] = { - "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", - "Saturday", -}; -static const char *bfmt[] = { - "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", - "Oct", "Nov", "Dec", -}; -static const char *Bfmt[] = { - "January", "February", "March", "April", "May", "June", "July", - "August", "September", "October", "November", "December", -}; - -static size_t gsize; -static char *pt; - - -static int _add(const char* str) -{ - for (;; ++pt, --gsize) - { - if (!gsize) - return 0; - if (!(*pt = *str++)) - return 1; - } -} - -static int _conv(int n, int digits, char pad) -{ - static char buf[10]; - char *p; - - for (p = buf + sizeof(buf) - 2; n > 0 && p > buf; n /= 10, --digits) - *p-- = n % 10 + '0'; - while (p > buf && digits-- > 0) - *p-- = pad; - return _add(++p); -} - -static size_t _fmt(const char* format, const struct tm* t) -{ - for (; *format; ++format) - { - if (*format == '%') { - if (*(format+1) == '#' ) {format++;} - - switch(*++format) { - case '\0': - --format; - break; - case 'A': - if (t->tm_wday < 0 || t->tm_wday > 6) - return 0; - if (!_add(Afmt[t->tm_wday])) - return 0; - continue; - case 'a': - if (t->tm_wday < 0 || t->tm_wday > 6) - return 0; - if (!_add(afmt[t->tm_wday])) - return 0; - continue; - case 'B': - if (t->tm_mon < 0 || t->tm_mon > 11) - return 0; - if (!_add(Bfmt[t->tm_mon])) - return 0; - continue; - case 'b': - case 'h': - if (t->tm_mon < 0 || t->tm_mon > 11) - return 0; - if (!_add(bfmt[t->tm_mon])) - return 0; - continue; - case 'C': - if (!_fmt("%a %b %e %H:%M:%S %Y", t)) - return 0; - continue; - case 'c': - if (!_fmt("%m/%d/%y %H:%M:%S", t)) - return 0; - continue; - case 'e': - if (!_conv(t->tm_mday, 2, ' ')) - return 0; - continue; - case 'D': - if (!_fmt("%m/%d/%y", t)) - return 0; - continue; - case 'd': - if (!_conv(t->tm_mday, 2, '0')) - return 0; - continue; - case 'H': - if (!_conv(t->tm_hour, 2, '0')) - return 0; - continue; - case 'I': - if (!_conv(t->tm_hour % 12 ? t->tm_hour % 12 : 12, 2, '0')) - return 0; - continue; - case 'j': - if (!_conv(t->tm_yday + 1, 3, '0')) - return 0; - continue; - case 'k': - if (!_conv(t->tm_hour, 2, ' ')) - return 0; - continue; - case 'l': - if (!_conv(t->tm_hour % 12 ? t->tm_hour % 12 : 12, 2, ' ')) - return 0; - continue; - case 'M': - if (!_conv(t->tm_min, 2, '0')) - return 0; - continue; - case 'm': - if (!_conv(t->tm_mon + 1, 2, '0')) - return 0; - continue; - case 'n': - if (!_add("\n")) - return 0; - continue; - case 'p': - if (!_add(t->tm_hour >= 12 ? "PM" : "AM")) - return 0; - continue; - case 'R': - if (!_fmt("%H:%M", t)) - return 0; - continue; - case 'r': - if (!_fmt("%I:%M:%S %p", t)) - return 0; - continue; - case 'S': - if (!_conv(t->tm_sec, 2, '0')) - return 0; - continue; - case 'T': - case 'X': - if (!_fmt("%H:%M:%S", t)) - return 0; - continue; - case 't': - if (!_add("\t")) - return 0; - continue; - case 'U': - if (!_conv((t->tm_yday + 7 - t->tm_wday) / 7, 2, '0')) - return 0; - continue; - case 'W': - if (!_conv((t->tm_yday + 7 - (t->tm_wday ? (t->tm_wday - 1) : 6)) / 7, 2, '0')) - return 0; - continue; - case 'w': - if (!_conv(t->tm_wday, 1, '0')) - return 0; - continue; - case 'x': - if (!_fmt("%m/%d/%y", t)) - return 0; - continue; - case 'y': - if (!_conv((t->tm_year + TM_YEAR_BASE) % 100, 2, '0')) - return 0; - continue; - case 'Y': - if (!_conv(t->tm_year + TM_YEAR_BASE, 4, '0')) - return 0; - continue; - case 'Z': - if (!t->tm_zone || !_add(t->tm_zone)) - return 0; - continue; - case '%': - /* - * X311J/88-090 (4.12.3.5): if conversion char is - * undefined, behavior is undefined. Print out the - * character itself as printf(3) does. - */ - default: - break; - } - } - if (!gsize--) - return 0; - *pt++ = *format; - } - return gsize; -} - -/* - * @implemented - */ -size_t -strftime(char *s, size_t maxsize, const char *format, const struct tm *t) -{ - pt = s; - if ((gsize = maxsize) < 1) - return 0; - if (_fmt(format, t)) - { - *pt = '\0'; - return maxsize - gsize; - } - return 0; -} - -/* - * @implemented - */ -size_t wcsftime(wchar_t* s, size_t maxsize, const wchar_t* format, const struct tm* t) -{ - char *x; - char *f; - int i,j; - x = malloc(maxsize); - j = wcslen(format); - f = malloc(j+1); - for(i=0;i -#include -#include -#include - - -/* - * @implemented - */ -char* _strtime(char* buf) -{ - time_t t; - struct tm *d; - char* dt = (char*)buf; - - if ( buf == NULL ) { - __set_errno(EINVAL); - return NULL; - } - t = time(NULL); - d = localtime(&t); - sprintf(dt,"%d:%d:%d",d->tm_hour,d->tm_min,d->tm_sec); - return dt; -} diff --git a/reactos/lib/msvcrt/time/time.c b/reactos/lib/msvcrt/time/time.c deleted file mode 100644 index bc459d54f7c..00000000000 --- a/reactos/lib/msvcrt/time/time.c +++ /dev/null @@ -1,226 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/msvcrt/time/time.c - * PURPOSE: Get system time - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 28/12/98: Created - */ - -/* - * DOS file system functions - * - * Copyright 1993 Erik Bos - * Copyright 1996 Alexandre Julliard - */ - -#include "precomp.h" -#include -#include - - -VOID STDCALL GetSystemTimeAsFileTime(LPFILETIME lpSystemTimeAsFileTime); - -/* - * @implemented - */ -time_t time(time_t* t) -{ - FILETIME SystemTime; - DWORD Remainder; - time_t tt; - GetSystemTimeAsFileTime(&SystemTime); - tt = FileTimeToUnixTime(&SystemTime,&Remainder); - if (t) - *t = tt; - return tt; -} - -/*********************************************************************** - * DOSFS_UnixTimeToFileTime - * - * Convert a Unix time to FILETIME format. - * The FILETIME structure is a 64-bit value representing the number of - * 100-nanosecond intervals since January 1, 1601, 0:00. - * 'remainder' is the nonnegative number of 100-ns intervals - * corresponding to the time fraction smaller than 1 second that - * couldn't be stored in the time_t value. - */ -void UnixTimeToFileTime( time_t unix_time, FILETIME *filetime, - DWORD remainder ) -{ - /* NOTES: - - CONSTANTS: - The time difference between 1 January 1601, 00:00:00 and - 1 January 1970, 00:00:00 is 369 years, plus the leap years - from 1604 to 1968, excluding 1700, 1800, 1900. - This makes (1968 - 1600) / 4 - 3 = 89 leap days, and a total - of 134774 days. - - Any day in that period had 24 * 60 * 60 = 86400 seconds. - - The time difference is 134774 * 86400 * 10000000, which can be written - 116444736000000000 - 27111902 * 2^32 + 3577643008 - 413 * 2^48 + 45534 * 2^32 + 54590 * 2^16 + 32768 - - If you find that these constants are buggy, please change them in all - instances in both conversion functions. - - VERSIONS: - There are two versions, one of them uses long long variables and - is presumably faster but not ISO C. The other one uses standard C - data types and operations but relies on the assumption that negative - numbers are stored as 2's complement (-1 is 0xffff....). If this - assumption is violated, dates before 1970 will not convert correctly. - This should however work on any reasonable architecture where WINE - will run. - - DETAILS: - - Take care not to remove the casts. I have tested these functions - (in both versions) for a lot of numbers. I would be interested in - results on other compilers than GCC. - - The operations have been designed to account for the possibility - of 64-bit time_t in future UNICES. Even the versions without - internal long long numbers will work if time_t only is 64 bit. - A 32-bit shift, which was necessary for that operation, turned out - not to work correctly in GCC, besides giving the warning. So I - used a double 16-bit shift instead. Numbers are in the ISO version - represented by three limbs, the most significant with 32 bit, the - other two with 16 bit each. - - As the modulo-operator % is not well-defined for negative numbers, - negative divisors have been avoided in DOSFS_FileTimeToUnixTime. - - There might be quicker ways to do this in C. Certainly so in - assembler. - - Claus Fischer, fischer@iue.tuwien.ac.at - */ - - - - - unsigned long a0; /* 16 bit, low bits */ - unsigned long a1; /* 16 bit, medium bits */ - unsigned long a2; /* 32 bit, high bits */ - - /* Copy the unix time to a2/a1/a0 */ - a0 = unix_time & 0xffff; - a1 = (unix_time >> 16) & 0xffff; - /* This is obsolete if unix_time is only 32 bits, but it does not hurt. - Do not replace this by >> 32, it gives a compiler warning and it does - not work. */ - a2 = (unix_time >= 0 ? (unix_time >> 16) >> 16 : - ~((~unix_time >> 16) >> 16)); - - /* Multiply a by 10000000 (a = a2/a1/a0) - Split the factor into 10000 * 1000 which are both less than 0xffff. */ - a0 *= 10000; - a1 = a1 * 10000 + (a0 >> 16); - a2 = a2 * 10000 + (a1 >> 16); - a0 &= 0xffff; - a1 &= 0xffff; - - a0 *= 1000; - a1 = a1 * 1000 + (a0 >> 16); - a2 = a2 * 1000 + (a1 >> 16); - a0 &= 0xffff; - a1 &= 0xffff; - - /* Add the time difference and the remainder */ - a0 += 32768 + (remainder & 0xffff); - a1 += 54590 + (remainder >> 16 ) + (a0 >> 16); - a2 += 27111902 + (a1 >> 16); - a0 &= 0xffff; - a1 &= 0xffff; - - /* Set filetime */ - filetime->dwLowDateTime = (a1 << 16) + a0; - filetime->dwHighDateTime = a2; -} - - -/*********************************************************************** - * DOSFS_FileTimeToUnixTime - * - * Convert a FILETIME format to Unix time. - * If not NULL, 'remainder' contains the fractional part of the filetime, - * in the range of [0..9999999] (even if time_t is negative). - */ -time_t FileTimeToUnixTime( const FILETIME *filetime, DWORD *remainder ) -{ - /* Read the comment in the function DOSFS_UnixTimeToFileTime. */ - - unsigned long a0; /* 16 bit, low bits */ - unsigned long a1; /* 16 bit, medium bits */ - unsigned long a2; /* 32 bit, high bits */ - unsigned long r; /* remainder of division */ - unsigned int carry; /* carry bit for subtraction */ - int negative; /* whether a represents a negative value */ - - /* Copy the time values to a2/a1/a0 */ - a2 = (unsigned long)filetime->dwHighDateTime; - a1 = ((unsigned long)filetime->dwLowDateTime ) >> 16; - a0 = ((unsigned long)filetime->dwLowDateTime ) & 0xffff; - - /* Subtract the time difference */ - if (a0 >= 32768 ) a0 -= 32768 , carry = 0; - else a0 += (1 << 16) - 32768 , carry = 1; - - if (a1 >= 54590 + carry) a1 -= 54590 + carry, carry = 0; - else a1 += (1 << 16) - 54590 - carry, carry = 1; - - a2 -= 27111902 + carry; - - /* If a is negative, replace a by (-1-a) */ - negative = (a2 >= ((unsigned long)1) << 31); - if (negative) - { - /* Set a to -a - 1 (a is a2/a1/a0) */ - a0 = 0xffff - a0; - a1 = 0xffff - a1; - a2 = ~a2; - } - - /* Divide a by 10000000 (a = a2/a1/a0), put the rest into r. - Split the divisor into 10000 * 1000 which are both less than 0xffff. */ - a1 += (a2 % 10000) << 16; - a2 /= 10000; - a0 += (a1 % 10000) << 16; - a1 /= 10000; - r = a0 % 10000; - a0 /= 10000; - - a1 += (a2 % 1000) << 16; - a2 /= 1000; - a0 += (a1 % 1000) << 16; - a1 /= 1000; - r += (a0 % 1000) * 10000; - a0 /= 1000; - - /* If a was negative, replace a by (-1-a) and r by (9999999 - r) */ - if (negative) - { - /* Set a to -a - 1 (a is a2/a1/a0) */ - a0 = 0xffff - a0; - a1 = 0xffff - a1; - a2 = ~a2; - - r = 9999999 - r; - } - - if (remainder) *remainder = r; - - /* Do not replace this by << 32, it gives a compiler warning and it does - not work. */ - return ((((time_t)a2) << 16) << 16) + (a1 << 16) + a0; - -} - - - diff --git a/reactos/lib/msvcrt/time/tz_vars.c b/reactos/lib/msvcrt/time/tz_vars.c deleted file mode 100644 index aad68dcb156..00000000000 --- a/reactos/lib/msvcrt/time/tz_vars.c +++ /dev/null @@ -1,21 +0,0 @@ -#include -#include -#include - - -int _daylight; -int _timezone; - - -void _set_daylight_export(int value) -{ - _daylight = value; -} - -void _set_timezone_export(int value) -{ - _timezone = value; -} - - - diff --git a/reactos/lib/msvcrt/time/tzfile.h b/reactos/lib/msvcrt/time/tzfile.h deleted file mode 100644 index 3999029adb9..00000000000 --- a/reactos/lib/msvcrt/time/tzfile.h +++ /dev/null @@ -1,160 +0,0 @@ -/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ -#ifndef __dj_include_tzfile_h__ -#define __dj_include_tzfile_h__ - -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef __dj_ENFORCE_ANSI_FREESTANDING - -#ifndef __STRICT_ANSI__ - -#ifndef _POSIX_SOURCE - -/* - * Copyright (c) 1988 Regents of the University of California. - * All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * Arthur David Olson of the National Cancer Institute. - * - * Redistribution and use in source and binary forms are permitted provided - * that: (1) source distributions retain this entire copyright notice and - * comment, and (2) distributions including binaries display the following - * acknowledgement: ``This product includes software developed by the - * University of California, Berkeley and its contributors'' in the - * documentation or other materials provided with the distribution and in - * all advertising materials mentioning features or use of this software. - * Neither the name of the University nor the names of its contributors may - * be used to endorse or promote products derived from this software without - * specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * @(#)tzfile.h 5.9 (Berkeley) 6/11/90 - */ - -/* -** Information about time zone files. -*/ - - /* Time zone object file directory */ -#define TZDIR "/usr/share/zoneinfo" -#define TZDEFAULT "/etc/localtime" -#define TZDEFRULES "posixrules" - -/* -** Each file begins with. . . -*/ - -struct tzhead { - char tzh_reserved[24]; /* reserved for future use */ - char tzh_ttisstdcnt[4]; /* coded number of trans. time flags */ - char tzh_leapcnt[4]; /* coded number of leap seconds */ - char tzh_timecnt[4]; /* coded number of transition times */ - char tzh_typecnt[4]; /* coded number of local time types */ - char tzh_charcnt[4]; /* coded number of abbr. chars */ -}; - -/* -** . . .followed by. . . -** -** tzh_timecnt (char [4])s coded transition times a la time(2) -** tzh_timecnt (unsigned char)s types of local time starting at above -** tzh_typecnt repetitions of -** one (char [4]) coded GMT offset in seconds -** one (unsigned char) used to set tm_isdst -** one (unsigned char) that's an abbreviation list index -** tzh_charcnt (char)s '\0'-terminated zone abbreviations -** tzh_leapcnt repetitions of -** one (char [4]) coded leap second transition times -** one (char [4]) total correction after above -** tzh_ttisstdcnt (char)s indexed by type; if TRUE, transition -** time is standard time, if FALSE, -** transition time is wall clock time -** if absent, transition times are -** assumed to be wall clock time -*/ - -/* -** In the current implementation, "tzset()" refuses to deal with files that -** exceed any of the limits below. -*/ - -/* -** The TZ_MAX_TIMES value below is enough to handle a bit more than a -** year's worth of solar time (corrected daily to the nearest second) or -** 138 years of Pacific Presidential Election time -** (where there are three time zone transitions every fourth year). -*/ -#define TZ_MAX_TIMES 370 - -#define NOSOLAR /* 4BSD doesn't currently handle solar time */ - -#ifndef NOSOLAR -#define TZ_MAX_TYPES 256 /* Limited by what (unsigned char)'s can hold */ -#else -#define TZ_MAX_TYPES 10 /* Maximum number of local time types */ -#endif - -#define TZ_MAX_CHARS 50 /* Maximum number of abbreviation characters */ - -#define TZ_MAX_LEAPS 50 /* Maximum number of leap second corrections */ - -#define SECSPERMIN 60 -#define MINSPERHOUR 60 -#define HOURSPERDAY 24 -#define DAYSPERWEEK 7 -#define DAYSPERNYEAR 365 -#define DAYSPERLYEAR 366 -#define SECSPERHOUR (SECSPERMIN * MINSPERHOUR) -#define SECSPERDAY ((long) SECSPERHOUR * HOURSPERDAY) -#define MONSPERYEAR 12 - -#define TM_SUNDAY 0 -#define TM_MONDAY 1 -#define TM_TUESDAY 2 -#define TM_WEDNESDAY 3 -#define TM_THURSDAY 4 -#define TM_FRIDAY 5 -#define TM_SATURDAY 6 - -#define TM_JANUARY 0 -#define TM_FEBRUARY 1 -#define TM_MARCH 2 -#define TM_APRIL 3 -#define TM_MAY 4 -#define TM_JUNE 5 -#define TM_JULY 6 -#define TM_AUGUST 7 -#define TM_SEPTEMBER 8 -#define TM_OCTOBER 9 -#define TM_NOVEMBER 10 -#define TM_DECEMBER 11 - -#define TM_YEAR_BASE 1900 - -#define EPOCH_YEAR 1970 -#define EPOCH_WDAY TM_THURSDAY - -/* -** Accurate only for the past couple of centuries; -** that will probably do. -*/ - -#define isleap(y) ((((y) % 4) == 0 && ((y) % 100) != 0) || ((y) % 400) == 0) - -#endif /* !_POSIX_SOURCE */ -#endif /* !__STRICT_ANSI__ */ -#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ - -#ifndef __dj_ENFORCE_FUNCTION_CALLS -#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ - -#ifdef __cplusplus -} -#endif - -#endif /* __dj_include_tzfile_h__ */ diff --git a/reactos/lib/msvcrt/time/wctime.c b/reactos/lib/msvcrt/time/wctime.c deleted file mode 100644 index 033595cfe1d..00000000000 --- a/reactos/lib/msvcrt/time/wctime.c +++ /dev/null @@ -1,75 +0,0 @@ -/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ -/* This file has been modified by DJ Delorie. These modifications are -** Copyright (C) 1995 DJ Delorie, 24 Kirsten Ave, Rochester NH, -** 03867-2954, USA. -*/ - -/* - * Copyright (c) 1987, 1989 Regents of the University of California. - * All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * Arthur David Olson of the National Cancer Institute. - * - * Redistribution and use in source and binary forms are permitted provided - * that: (1) source distributions retain this entire copyright notice and - * comment, and (2) distributions including binaries display the following - * acknowledgement: ``This product includes software developed by the - * University of California, Berkeley and its contributors'' in the - * documentation or other materials provided with the distribution and in - * all advertising materials mentioning features or use of this software. - * Neither the name of the University nor the names of its contributors may - * be used to endorse or promote products derived from this software without - * specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -#include "precomp.h" -#include -#include -#include "tzfile.h" - - -/* - * @implemented - */ -wchar_t* _wasctime(const struct tm* timeptr) -{ -#ifdef __GNUC__ - static const wchar_t wday_name[DAYSPERWEEK][3] = { - L"Sun", L"Mon", L"Tue", L"Wed", L"Thu", L"Fri", L"Sat" - }; - static const wchar_t mon_name[MONSPERYEAR][3] = { - L"Jan", L"Feb", L"Mar", L"Apr", L"May", L"Jun", - L"Jul", L"Aug", L"Sep", L"Oct", L"Nov", L"Dec" - }; -#else - static const wchar_t wday_name[DAYSPERWEEK][4] = { - L"Sun", L"Mon", L"Tue", L"Wed", L"Thu", L"Fri", L"Sat" - }; - static const wchar_t mon_name[MONSPERYEAR][4] = { - L"Jan", L"Feb", L"Mar", L"Apr", L"May", L"Jun", - L"Jul", L"Aug", L"Sep", L"Oct", L"Nov", L"Dec" - }; -#endif - static wchar_t result[26]; - - (void)swprintf(result, L"%.3s %.3s%3d %02d:%02d:%02d %d\n", - wday_name[timeptr->tm_wday], - mon_name[timeptr->tm_mon], - timeptr->tm_mday, timeptr->tm_hour, - timeptr->tm_min, timeptr->tm_sec, - TM_YEAR_BASE + timeptr->tm_year); - return result; -} - - -/* - * @implemented - */ -wchar_t* _wctime(const time_t* const timep) -{ - return _wasctime(localtime(timep)); -} diff --git a/reactos/lib/msvcrt/time/wstrdate.c b/reactos/lib/msvcrt/time/wstrdate.c deleted file mode 100644 index a6a9d955985..00000000000 --- a/reactos/lib/msvcrt/time/wstrdate.c +++ /dev/null @@ -1,33 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/msvcrt/time/strtime.c - * PURPOSE: Fills a buffer with a formatted date representation - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 28/12/98: Created - */ -#include -#include -#include -#include - - -/* - * @implemented - */ -wchar_t* _wstrdate(const wchar_t* datestr) -{ - time_t t; - struct tm* d; - wchar_t* dt = (wchar_t*)datestr; - - if (datestr == NULL) { - __set_errno(EINVAL); - return NULL; - } - t = time(NULL); - d = localtime(&t); - swprintf(dt,L"%d/%d/%d",d->tm_mday,d->tm_mon+1,d->tm_year); - return dt; -} diff --git a/reactos/lib/msvcrt/time/wstrtime.c b/reactos/lib/msvcrt/time/wstrtime.c deleted file mode 100644 index 8f5b2ace481..00000000000 --- a/reactos/lib/msvcrt/time/wstrtime.c +++ /dev/null @@ -1,33 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/msvcrt/time/strtime.c - * PURPOSE: Fills a buffer with a formatted time representation - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 28/12/98: Created - */ -#include -#include -#include -#include - - -/* - * @implemented - */ -wchar_t* _wstrtime(wchar_t* buf) -{ - time_t t; - struct tm* d; - wchar_t* dt = (wchar_t*)buf; - - if ( buf == NULL ) { - __set_errno(EINVAL); - return NULL; - } - t = time(NULL); - d = localtime(&t); - swprintf(dt,L"%d:%d:%d",d->tm_hour,d->tm_min,d->tm_sec); - return dt; -} diff --git a/reactos/lib/msvcrt/wine/cpp.c b/reactos/lib/msvcrt/wine/cpp.c deleted file mode 100644 index 1f6ea81d37a..00000000000 --- a/reactos/lib/msvcrt/wine/cpp.c +++ /dev/null @@ -1,1251 +0,0 @@ -/* - * msvcrt.dll C++ objects - * - * Copyright 2000 Jon Griffiths - * Copyright 2003 Alexandre Julliard - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include "wine/config.h" -#include "wine/port.h" - -#include - -#include "windef.h" -#include "winbase.h" -#include "winreg.h" -#include "wine/winternl.h" -#include "wine/exception.h" -#include "winnt.h" -#include "excpt.h" -#include "wine/debug.h" -#include "msvcrt/malloc.h" -#include "msvcrt/stdlib.h" - -#include "msvcrt.h" -#include "cppexcept.h" -#include - -WINE_DEFAULT_DEBUG_CHANNEL(msvcrt); - -/* - * exception object: base for exception, bad_cast, bad_typeid, __non_rtti_object - */ -typedef struct -{ - void* pfn_vector_dtor; - void* pfn_what; -} exception_vtable; - -typedef struct __exception -{ - const exception_vtable *vtable; - char *name; /* Name of this exception, always a new copy for each object */ - int do_free; /* Whether to free 'name' in our dtor */ -} exception; - -typedef exception bad_cast; -typedef exception bad_typeid; -typedef exception __non_rtti_object; - -typedef struct _rtti_base_descriptor -{ - type_info *type_descriptor; - int num_base_classes; - int base_class_offset; - unsigned int flags; - int unknown1; - int unknown2; -} rtti_base_descriptor; - -typedef struct _rtti_base_array -{ - const rtti_base_descriptor *bases[3]; /* First element is the class itself */ -} rtti_base_array; - -typedef struct _rtti_object_hierachy -{ - int unknown1; - int unknown2; - int array_len; /* Size of the array pointed to by 'base_classes' */ - const rtti_base_array *base_classes; -} rtti_object_hierachy; - -typedef struct _rtti_object_locator -{ - int unknown1; - int base_class_offset; - unsigned int flags; - type_info *type_descriptor; - const rtti_object_hierachy *type_hierachy; -} rtti_object_locator; - - -#ifdef __i386__ /* thiscall functions are i386-specific */ - -#define DEFINE_THISCALL_WRAPPER0(func) \ - extern void __thiscall_ ## func(); \ - __ASM_GLOBAL_FUNC(__thiscall_ ## func, \ - "popl %eax\n\t" \ - "pushl %ecx\n\t" \ - "pushl %eax\n\t" \ - "jmp " __ASM_NAME(#func) "@4" ) -#define DEFINE_THISCALL_WRAPPER1(func) \ - extern void __thiscall_ ## func(); \ - __ASM_GLOBAL_FUNC(__thiscall_ ## func, \ - "popl %eax\n\t" \ - "pushl %ecx\n\t" \ - "pushl %eax\n\t" \ - "jmp " __ASM_NAME(#func) "@8" ) - -const exception_vtable MSVCRT_exception_vtable; -const exception_vtable MSVCRT_bad_typeid_vtable; -const exception_vtable MSVCRT_bad_cast_vtable; -const exception_vtable MSVCRT___non_rtti_object_vtable; -static const exception_vtable MSVCRT_type_info_vtable; - -/* Internal common ctor for exception */ -static void WINAPI EXCEPTION_ctor(exception *_this, const char** name) -{ - _this->vtable = &MSVCRT_exception_vtable; - if (*name) - { - size_t name_len = strlen(*name) + 1; -// _this->name = MSVCRT_malloc(name_len); - _this->name = malloc(name_len); - memcpy(_this->name, *name, name_len); - _this->do_free = TRUE; - } - else - { - _this->name = NULL; - _this->do_free = FALSE; - } -} - -/****************************************************************** - * ??0exception@@QAE@ABQBD@Z (MSVCRT.@) - */ -DEFINE_THISCALL_WRAPPER1(MSVCRT_exception_ctor); -exception * __stdcall MSVCRT_exception_ctor(exception * _this, const char ** name) -{ - TRACE("(%p,%s)\n", _this, *name); - EXCEPTION_ctor(_this, name); - return _this; -} - -/****************************************************************** - * ??0exception@@QAE@ABV0@@Z (MSVCRT.@) - */ -DEFINE_THISCALL_WRAPPER1(MSVCRT_exception_copy_ctor); -exception * __stdcall MSVCRT_exception_copy_ctor(exception * _this, const exception * rhs) -{ - TRACE("(%p,%p)\n", _this, rhs); - - if (!rhs->do_free) - { - _this->vtable = &MSVCRT_exception_vtable; - _this->name = rhs->name; - _this->do_free = FALSE; - } - else - EXCEPTION_ctor(_this, (const char**)&rhs->name); - TRACE("name = %s\n", _this->name); - return _this; -} - -/****************************************************************** - * ??0exception@@QAE@XZ (MSVCRT.@) - */ -DEFINE_THISCALL_WRAPPER0(MSVCRT_exception_default_ctor); -exception * __stdcall MSVCRT_exception_default_ctor(exception * _this) -{ - static const char* empty = NULL; - - TRACE("(%p)\n", _this); - EXCEPTION_ctor(_this, &empty); - return _this; -} - -/****************************************************************** - * ??1exception@@UAE@XZ (MSVCRT.@) - */ -DEFINE_THISCALL_WRAPPER0(MSVCRT_exception_dtor); -void __stdcall MSVCRT_exception_dtor(exception * _this) -{ - TRACE("(%p)\n", _this); - _this->vtable = &MSVCRT_exception_vtable; -// if (_this->do_free) MSVCRT_free(_this->name); - if (_this->do_free) free(_this->name); -} - -/****************************************************************** - * ??4exception@@QAEAAV0@ABV0@@Z (MSVCRT.@) - */ -DEFINE_THISCALL_WRAPPER1(MSVCRT_exception_opequals); -exception * __stdcall MSVCRT_exception_opequals(exception * _this, const exception * rhs) -{ - TRACE("(%p %p)\n", _this, rhs); - if (_this != rhs) - { - MSVCRT_exception_dtor(_this); - MSVCRT_exception_copy_ctor(_this, rhs); - } - TRACE("name = %s\n", _this->name); - return _this; -} - -/****************************************************************** - * ??_Eexception@@UAEPAXI@Z (MSVCRT.@) - */ -DEFINE_THISCALL_WRAPPER1(MSVCRT_exception_vector_dtor); -void * __stdcall MSVCRT_exception_vector_dtor(exception * _this, unsigned int flags) -{ - TRACE("(%p %x)\n", _this, flags); - if (flags & 2) - { - /* we have an array, with the number of elements stored before the first object */ - int i, *ptr = (int *)_this - 1; - - for (i = *ptr - 1; i >= 0; i--) MSVCRT_exception_dtor(_this + i); - MSVCRT_operator_delete(ptr); - } - else - { - MSVCRT_exception_dtor(_this); - if (flags & 1) MSVCRT_operator_delete(_this); - } - return _this; -} - -/****************************************************************** - * ??_Gexception@@UAEPAXI@Z (MSVCRT.@) - */ -DEFINE_THISCALL_WRAPPER1(MSVCRT_exception_scalar_dtor); -void * __stdcall MSVCRT_exception_scalar_dtor(exception * _this, unsigned int flags) -{ - TRACE("(%p %x)\n", _this, flags); - MSVCRT_exception_dtor(_this); - if (flags & 1) MSVCRT_operator_delete(_this); - return _this; -} - -/****************************************************************** - * ?what@exception@@UBEPBDXZ (MSVCRT.@) - */ -DEFINE_THISCALL_WRAPPER0(MSVCRT_what_exception); -const char * __stdcall MSVCRT_what_exception(exception * _this) -{ - TRACE("(%p) returning %s\n", _this, _this->name); - return _this->name ? _this->name : "Unknown exception"; -} - -/****************************************************************** - * ??0bad_typeid@@QAE@ABV0@@Z (MSVCRT.@) - */ -DEFINE_THISCALL_WRAPPER1(MSVCRT_bad_typeid_copy_ctor); -bad_typeid * __stdcall MSVCRT_bad_typeid_copy_ctor(bad_typeid * _this, const bad_typeid * rhs) -{ - TRACE("(%p %p)\n", _this, rhs); - MSVCRT_exception_copy_ctor(_this, rhs); - _this->vtable = &MSVCRT_bad_typeid_vtable; - return _this; -} - -/****************************************************************** - * ??0bad_typeid@@QAE@PBD@Z (MSVCRT.@) - */ -DEFINE_THISCALL_WRAPPER1(MSVCRT_bad_typeid_ctor); -bad_typeid * __stdcall MSVCRT_bad_typeid_ctor(bad_typeid * _this, const char * name) -{ - TRACE("(%p %s)\n", _this, name); - EXCEPTION_ctor(_this, &name); - _this->vtable = &MSVCRT_bad_typeid_vtable; - return _this; -} - -/****************************************************************** - * ??1bad_typeid@@UAE@XZ (MSVCRT.@) - */ -DEFINE_THISCALL_WRAPPER0(MSVCRT_bad_typeid_dtor); -void __stdcall MSVCRT_bad_typeid_dtor(bad_typeid * _this) -{ - TRACE("(%p)\n", _this); - MSVCRT_exception_dtor(_this); -} - -/****************************************************************** - * ??4bad_typeid@@QAEAAV0@ABV0@@Z (MSVCRT.@) - */ -DEFINE_THISCALL_WRAPPER1(MSVCRT_bad_typeid_opequals); -bad_typeid * __stdcall MSVCRT_bad_typeid_opequals(bad_typeid * _this, const bad_typeid * rhs) -{ - TRACE("(%p %p)\n", _this, rhs); - MSVCRT_exception_opequals(_this, rhs); - return _this; -} - -/****************************************************************** - * ??_Ebad_typeid@@UAEPAXI@Z (MSVCRT.@) - */ -DEFINE_THISCALL_WRAPPER1(MSVCRT_bad_typeid_vector_dtor); -void * __stdcall MSVCRT_bad_typeid_vector_dtor(bad_typeid * _this, unsigned int flags) -{ - TRACE("(%p %x)\n", _this, flags); - if (flags & 2) - { - /* we have an array, with the number of elements stored before the first object */ - int i, *ptr = (int *)_this - 1; - - for (i = *ptr - 1; i >= 0; i--) MSVCRT_bad_typeid_dtor(_this + i); - MSVCRT_operator_delete(ptr); - } - else - { - MSVCRT_bad_typeid_dtor(_this); - if (flags & 1) MSVCRT_operator_delete(_this); - } - return _this; -} - -/****************************************************************** - * ??_Gbad_typeid@@UAEPAXI@Z (MSVCRT.@) - */ -DEFINE_THISCALL_WRAPPER1(MSVCRT_bad_typeid_scalar_dtor); -void * __stdcall MSVCRT_bad_typeid_scalar_dtor(bad_typeid * _this, unsigned int flags) -{ - TRACE("(%p %x)\n", _this, flags); - MSVCRT_bad_typeid_dtor(_this); - if (flags & 1) MSVCRT_operator_delete(_this); - return _this; -} - -/****************************************************************** - * ??0__non_rtti_object@@QAE@ABV0@@Z (MSVCRT.@) - */ -DEFINE_THISCALL_WRAPPER1(MSVCRT___non_rtti_object_copy_ctor); -__non_rtti_object * __stdcall MSVCRT___non_rtti_object_copy_ctor(__non_rtti_object * _this, - const __non_rtti_object * rhs) -{ - TRACE("(%p %p)\n", _this, rhs); - MSVCRT_bad_typeid_copy_ctor(_this, rhs); - _this->vtable = &MSVCRT___non_rtti_object_vtable; - return _this; -} - -/****************************************************************** - * ??0__non_rtti_object@@QAE@PBD@Z (MSVCRT.@) - */ -DEFINE_THISCALL_WRAPPER1(MSVCRT___non_rtti_object_ctor); -__non_rtti_object * __stdcall MSVCRT___non_rtti_object_ctor(__non_rtti_object * _this, - const char * name) -{ - TRACE("(%p %s)\n", _this, name); - EXCEPTION_ctor(_this, &name); - _this->vtable = &MSVCRT___non_rtti_object_vtable; - return _this; -} - -/****************************************************************** - * ??1__non_rtti_object@@UAE@XZ (MSVCRT.@) - */ -DEFINE_THISCALL_WRAPPER0(MSVCRT___non_rtti_object_dtor); -void __stdcall MSVCRT___non_rtti_object_dtor(__non_rtti_object * _this) -{ - TRACE("(%p)\n", _this); - MSVCRT_bad_typeid_dtor(_this); -} - -/****************************************************************** - * ??4__non_rtti_object@@QAEAAV0@ABV0@@Z (MSVCRT.@) - */ -DEFINE_THISCALL_WRAPPER1(MSVCRT___non_rtti_object_opequals); -__non_rtti_object * __stdcall MSVCRT___non_rtti_object_opequals(__non_rtti_object * _this, - const __non_rtti_object *rhs) -{ - TRACE("(%p %p)\n", _this, rhs); - MSVCRT_bad_typeid_opequals(_this, rhs); - return _this; -} - -/****************************************************************** - * ??_E__non_rtti_object@@UAEPAXI@Z (MSVCRT.@) - */ -DEFINE_THISCALL_WRAPPER1(MSVCRT___non_rtti_object_vector_dtor); -void * __stdcall MSVCRT___non_rtti_object_vector_dtor(__non_rtti_object * _this, unsigned int flags) -{ - TRACE("(%p %x)\n", _this, flags); - if (flags & 2) - { - /* we have an array, with the number of elements stored before the first object */ - int i, *ptr = (int *)_this - 1; - - for (i = *ptr - 1; i >= 0; i--) MSVCRT___non_rtti_object_dtor(_this + i); - MSVCRT_operator_delete(ptr); - } - else - { - MSVCRT___non_rtti_object_dtor(_this); - if (flags & 1) MSVCRT_operator_delete(_this); - } - return _this; -} - -/****************************************************************** - * ??_G__non_rtti_object@@UAEPAXI@Z (MSVCRT.@) - */ -DEFINE_THISCALL_WRAPPER1(MSVCRT___non_rtti_object_scalar_dtor); -void * __stdcall MSVCRT___non_rtti_object_scalar_dtor(__non_rtti_object * _this, unsigned int flags) -{ - TRACE("(%p %x)\n", _this, flags); - MSVCRT___non_rtti_object_dtor(_this); - if (flags & 1) MSVCRT_operator_delete(_this); - return _this; -} - -/****************************************************************** - * ??0bad_cast@@QAE@ABQBD@Z (MSVCRT.@) - */ -DEFINE_THISCALL_WRAPPER1(MSVCRT_bad_cast_ctor); -bad_cast * __stdcall MSVCRT_bad_cast_ctor(bad_cast * _this, const char ** name) -{ - TRACE("(%p %s)\n", _this, *name); - EXCEPTION_ctor(_this, name); - _this->vtable = &MSVCRT_bad_cast_vtable; - return _this; -} - -/****************************************************************** - * ??0bad_cast@@QAE@ABV0@@Z (MSVCRT.@) - */ -DEFINE_THISCALL_WRAPPER1(MSVCRT_bad_cast_copy_ctor); -bad_cast * __stdcall MSVCRT_bad_cast_copy_ctor(bad_cast * _this, const bad_cast * rhs) -{ - TRACE("(%p %p)\n", _this, rhs); - MSVCRT_exception_copy_ctor(_this, rhs); - _this->vtable = &MSVCRT_bad_cast_vtable; - return _this; -} - -/****************************************************************** - * ??1bad_cast@@UAE@XZ (MSVCRT.@) - */ -DEFINE_THISCALL_WRAPPER0(MSVCRT_bad_cast_dtor); -void __stdcall MSVCRT_bad_cast_dtor(bad_cast * _this) -{ - TRACE("(%p)\n", _this); - MSVCRT_exception_dtor(_this); -} - -/****************************************************************** - * ??4bad_cast@@QAEAAV0@ABV0@@Z (MSVCRT.@) - */ -DEFINE_THISCALL_WRAPPER1(MSVCRT_bad_cast_opequals); -bad_cast * __stdcall MSVCRT_bad_cast_opequals(bad_cast * _this, const bad_cast * rhs) -{ - TRACE("(%p %p)\n", _this, rhs); - MSVCRT_exception_opequals(_this, rhs); - return _this; -} - -/****************************************************************** - * ??_Ebad_cast@@UAEPAXI@Z (MSVCRT.@) - */ -DEFINE_THISCALL_WRAPPER1(MSVCRT_bad_cast_vector_dtor); -void * __stdcall MSVCRT_bad_cast_vector_dtor(bad_cast * _this, unsigned int flags) -{ - TRACE("(%p %x)\n", _this, flags); - if (flags & 2) - { - /* we have an array, with the number of elements stored before the first object */ - int i, *ptr = (int *)_this - 1; - - for (i = *ptr - 1; i >= 0; i--) MSVCRT_bad_cast_dtor(_this + i); - MSVCRT_operator_delete(ptr); - } - else - { - MSVCRT_bad_cast_dtor(_this); - if (flags & 1) MSVCRT_operator_delete(_this); - } - return _this; -} - -/****************************************************************** - * ??_Gbad_cast@@UAEPAXI@Z (MSVCRT.@) - */ -DEFINE_THISCALL_WRAPPER1(MSVCRT_bad_cast_scalar_dtor); -void * __stdcall MSVCRT_bad_cast_scalar_dtor(bad_cast * _this, unsigned int flags) -{ - TRACE("(%p %x)\n", _this, flags); - MSVCRT_bad_cast_dtor(_this); - if (flags & 1) MSVCRT_operator_delete(_this); - return _this; -} - -/****************************************************************** - * ??8type_info@@QBEHABV0@@Z (MSVCRT.@) - */ -DEFINE_THISCALL_WRAPPER1(MSVCRT_type_info_opequals_equals); -int __stdcall MSVCRT_type_info_opequals_equals(type_info * _this, const type_info * rhs) -{ - int ret = !strcmp(_this->mangled + 1, rhs->mangled + 1); - TRACE("(%p %p) returning %d\n", _this, rhs, ret); - return ret; -} - -/****************************************************************** - * ??9type_info@@QBEHABV0@@Z (MSVCRT.@) - */ -DEFINE_THISCALL_WRAPPER1(MSVCRT_type_info_opnot_equals); -int __stdcall MSVCRT_type_info_opnot_equals(type_info * _this, const type_info * rhs) -{ - int ret = !!strcmp(_this->mangled + 1, rhs->mangled + 1); - TRACE("(%p %p) returning %d\n", _this, rhs, ret); - return ret; -} - -/****************************************************************** - * ?before@type_info@@QBEHABV1@@Z (MSVCRT.@) - */ -DEFINE_THISCALL_WRAPPER1(MSVCRT_type_info_before); -int __stdcall MSVCRT_type_info_before(type_info * _this, const type_info * rhs) -{ - int ret = strcmp(_this->mangled + 1, rhs->mangled + 1) < 0; - TRACE("(%p %p) returning %d\n", _this, rhs, ret); - return ret; -} - -/****************************************************************** - * ??1type_info@@UAE@XZ (MSVCRT.@) - */ -DEFINE_THISCALL_WRAPPER0(MSVCRT_type_info_dtor); -void __stdcall MSVCRT_type_info_dtor(type_info * _this) -{ - TRACE("(%p)\n", _this); - if (_this->name) -// MSVCRT_free(_this->name); - free(_this->name); -} -#if 0 /* __REACTOS__ */ -/****************************************************************** - * ?name@type_info@@QBEPBDXZ (MSVCRT.@) - */ -DEFINE_THISCALL_WRAPPER0(MSVCRT_type_info_name); -const char * __stdcall MSVCRT_type_info_name(type_info * _this) -{ - if (!_this->name) - { - /* Create and set the demangled name */ - char* name = MSVCRT___unDName(0, _this->mangled, 0, - (MSVCRT_malloc_func)malloc, - (MSVCRT_free_func)free, 0x2800); - - if (name) - { - unsigned int len = strlen(name); - - /* It seems _unDName may leave blanks at the end of the demangled name */ - if (name[len] == ' ') - name[len] = '\0'; - - _mlock(_EXIT_LOCK2); - - if (_this->name) - { - /* Another thread set this member since we checked above - use it */ -// MSVCRT_free(name); - free(name); - } - else - _this->name = name; - - _munlock(_EXIT_LOCK2); - } - } - TRACE("(%p) returning %s\n", _this, _this->name); - return _this->name; -} -#endif -/****************************************************************** - * ?raw_name@type_info@@QBEPBDXZ (MSVCRT.@) - */ -DEFINE_THISCALL_WRAPPER0(MSVCRT_type_info_raw_name); -const char * __stdcall MSVCRT_type_info_raw_name(type_info * _this) -{ - TRACE("(%p) returning %s\n", _this, _this->mangled); - return _this->mangled; -} - -/* Unexported */ -DEFINE_THISCALL_WRAPPER1(MSVCRT_type_info_vector_dtor); -void * __stdcall MSVCRT_type_info_vector_dtor(type_info * _this, unsigned int flags) -{ - TRACE("(%p %x)\n", _this, flags); - if (flags & 2) - { - /* we have an array, with the number of elements stored before the first object */ - int i, *ptr = (int *)_this - 1; - - for (i = *ptr - 1; i >= 0; i--) MSVCRT_type_info_dtor(_this + i); - MSVCRT_operator_delete(ptr); - } - else - { - MSVCRT_type_info_dtor(_this); - if (flags & 1) MSVCRT_operator_delete(_this); - } - return _this; -} - -/* vtables */ - -const exception_vtable MSVCRT_exception_vtable = -{ - __thiscall_MSVCRT_exception_vector_dtor, - __thiscall_MSVCRT_what_exception -}; - -const exception_vtable MSVCRT_bad_typeid_vtable = -{ - __thiscall_MSVCRT_bad_typeid_vector_dtor, - __thiscall_MSVCRT_what_exception -}; - -const exception_vtable MSVCRT_bad_cast_vtable = -{ - __thiscall_MSVCRT_bad_cast_vector_dtor, - __thiscall_MSVCRT_what_exception -}; - -const exception_vtable MSVCRT___non_rtti_object_vtable = -{ - __thiscall_MSVCRT___non_rtti_object_vector_dtor, - __thiscall_MSVCRT_what_exception -}; - -static const exception_vtable MSVCRT_type_info_vtable = -{ - __thiscall_MSVCRT_type_info_vector_dtor, - NULL -}; - -/* Static RTTI for exported objects */ - -static type_info exception_type_info = -{ - (void*)&MSVCRT_type_info_vtable, - NULL, - ".?AVexception@@" -}; - -static const rtti_base_descriptor exception_rtti_base_descriptor = -{ - &exception_type_info, - 0, - 0, - 0, - 0, - 0 -}; - -static const rtti_base_array exception_rtti_base_array = -{ - { - &exception_rtti_base_descriptor, - NULL, - NULL - } -}; - -static const rtti_object_hierachy exception_type_hierachy = -{ - 0, - 0, - 1, - &exception_rtti_base_array -}; - -static const rtti_object_locator exception_rtti = -{ - 0, - 0, - 0, - &exception_type_info, - &exception_type_hierachy -}; - -static const cxx_type_info exception_cxx_type_info = -{ - 0, - &exception_type_info, - 0, - -1, - 0, - sizeof(exception), - (cxx_copy_ctor)__thiscall_MSVCRT_exception_copy_ctor -}; - -static type_info bad_typeid_type_info = -{ - (void*)&MSVCRT_type_info_vtable, - NULL, - ".?AVbad_typeid@@" -}; - -static const rtti_base_descriptor bad_typeid_rtti_base_descriptor = -{ - &bad_typeid_type_info, - 1, - 0, - 0xffffffff, - 0, - 0 -}; - -static const rtti_base_array bad_typeid_rtti_base_array = -{ - { - &bad_typeid_rtti_base_descriptor, - &exception_rtti_base_descriptor, - NULL - } -}; - -static const rtti_object_hierachy bad_typeid_type_hierachy = -{ - 0, - 0, - 2, - &bad_typeid_rtti_base_array -}; - -static const rtti_object_locator bad_typeid_rtti = -{ - 0, - 0, - 0, - &bad_typeid_type_info, - &bad_typeid_type_hierachy -}; - -static const cxx_type_info bad_typeid_cxx_type_info = -{ - 0, - &bad_typeid_type_info, - 0, - -1, - 0, - sizeof(exception), - (cxx_copy_ctor)__thiscall_MSVCRT_bad_typeid_copy_ctor -}; - -static type_info bad_cast_type_info = -{ - (void*)&MSVCRT_type_info_vtable, - NULL, - ".?AVbad_cast@@" -}; - -static const rtti_base_descriptor bad_cast_rtti_base_descriptor = -{ - &bad_cast_type_info, - 1, - 0, - 0xffffffff, - 0, - 0 -}; - -static const rtti_base_array bad_cast_rtti_base_array = -{ - { - &bad_cast_rtti_base_descriptor, - &exception_rtti_base_descriptor, - NULL - } -}; - -static const rtti_object_hierachy bad_cast_type_hierachy = -{ - 0, - 0, - 2, - &bad_cast_rtti_base_array -}; - -static const rtti_object_locator bad_cast_rtti = -{ - 0, - 0, - 0, - &bad_cast_type_info, - &bad_cast_type_hierachy -}; - -static const cxx_type_info bad_cast_cxx_type_info = -{ - 0, - &bad_cast_type_info, - 0, - -1, - 0, - sizeof(exception), - (cxx_copy_ctor)__thiscall_MSVCRT_bad_cast_copy_ctor -}; - -static type_info __non_rtti_object_type_info = -{ - (void*)&MSVCRT_type_info_vtable, - NULL, - ".?AV__non_rtti_object@@" -}; - -static const rtti_base_descriptor __non_rtti_object_rtti_base_descriptor = -{ - &__non_rtti_object_type_info, - 2, - 0, - 0xffffffff, - 0, - 0 -}; - -static const rtti_base_array __non_rtti_object_rtti_base_array = -{ - { - &__non_rtti_object_rtti_base_descriptor, - &bad_typeid_rtti_base_descriptor, - &exception_rtti_base_descriptor - } -}; - -static const rtti_object_hierachy __non_rtti_object_type_hierachy = -{ - 0, - 0, - 3, - &__non_rtti_object_rtti_base_array -}; - -static const rtti_object_locator __non_rtti_object_rtti = -{ - 0, - 0, - 0, - &__non_rtti_object_type_info, - &__non_rtti_object_type_hierachy -}; - -static const cxx_type_info __non_rtti_object_cxx_type_info = -{ - 0, - &__non_rtti_object_type_info, - 0, - -1, - 0, - sizeof(exception), - (cxx_copy_ctor)__thiscall_MSVCRT___non_rtti_object_copy_ctor -}; - -static type_info type_info_type_info = -{ - (void*)&MSVCRT_type_info_vtable, - NULL, - ".?AVtype_info@@" -}; - -static const rtti_base_descriptor type_info_rtti_base_descriptor = -{ - &type_info_type_info, - 0, - 0, - 0xffffffff, - 0, - 0 -}; - -static const rtti_base_array type_info_rtti_base_array = -{ - { - &type_info_rtti_base_descriptor, - NULL, - NULL - } -}; - -static const rtti_object_hierachy type_info_type_hierachy = -{ - 0, - 0, - 1, - &type_info_rtti_base_array -}; - -static const rtti_object_locator type_info_rtti = -{ - 0, - 0, - 0, - &type_info_type_info, - &type_info_type_hierachy -}; - -/* - * Exception RTTI for cpp objects - */ -static const cxx_type_info_table bad_cast_type_info_table = -{ - 3, - { - &__non_rtti_object_cxx_type_info, - &bad_typeid_cxx_type_info, - &exception_cxx_type_info - } -}; - -static const cxx_exception_type bad_cast_exception_type = -{ - 0, - (void*)__thiscall_MSVCRT_bad_cast_dtor, - NULL, - &bad_cast_type_info_table -}; - -static const cxx_type_info_table bad_typeid_type_info_table = -{ - 2, - { - &bad_cast_cxx_type_info, - &exception_cxx_type_info, - NULL - } -}; - -static const cxx_exception_type bad_typeid_exception_type = -{ - 0, - (void*)__thiscall_MSVCRT_bad_typeid_dtor, - NULL, - &bad_cast_type_info_table -}; - -static const cxx_exception_type __non_rtti_object_exception_type = -{ - 0, - (void*)__thiscall_MSVCRT___non_rtti_object_dtor, - NULL, - &bad_typeid_type_info_table -}; - -#endif /* __i386__ */ - - -/****************************************************************** - * ?set_terminate@@YAP6AXXZP6AXXZ@Z (MSVCRT.@) - * - * Install a handler to be called when terminate() is called. - * - * PARAMS - * func [I] Handler function to install - * - * RETURNS - * The previously installed handler function, if any. - */ -terminate_function MSVCRT_set_terminate(terminate_function func) -{ - MSVCRT_thread_data *data = msvcrt_get_thread_data(); - terminate_function previous = data->terminate_handler; - TRACE("(%p) returning %p\n",func,previous); - data->terminate_handler = func; - return previous; -} - -/****************************************************************** - * ?set_unexpected@@YAP6AXXZP6AXXZ@Z (MSVCRT.@) - * - * Install a handler to be called when unexpected() is called. - * - * PARAMS - * func [I] Handler function to install - * - * RETURNS - * The previously installed handler function, if any. - */ -unexpected_function MSVCRT_set_unexpected(unexpected_function func) -{ - MSVCRT_thread_data *data = msvcrt_get_thread_data(); - unexpected_function previous = data->unexpected_handler; - TRACE("(%p) returning %p\n",func,previous); - data->unexpected_handler = func; - return previous; -} - -/****************************************************************** - * ?_set_se_translator@@YAP6AXIPAU_EXCEPTION_POINTERS@@@ZP6AXI0@Z@Z (MSVCRT.@) - */ -_se_translator_function MSVCRT__set_se_translator(_se_translator_function func) -{ - MSVCRT_thread_data *data = msvcrt_get_thread_data(); - _se_translator_function previous = data->se_translator; - TRACE("(%p) returning %p\n",func,previous); - data->se_translator = func; - return previous; -} - -/****************************************************************** - * ?terminate@@YAXXZ (MSVCRT.@) - * - * Default handler for an unhandled exception. - * - * PARAMS - * None. - * - * RETURNS - * This function does not return. Either control resumes from any - * handler installed by calling set_terminate(), or (by default) abort() - * is called. - */ -void MSVCRT_terminate(void) -{ - MSVCRT_thread_data *data = msvcrt_get_thread_data(); - if (data->terminate_handler) data->terminate_handler(); - abort(); -} - -/****************************************************************** - * ?unexpected@@YAXXZ (MSVCRT.@) - */ -void MSVCRT_unexpected(void) -{ - MSVCRT_thread_data *data = msvcrt_get_thread_data(); - if (data->unexpected_handler) data->unexpected_handler(); - MSVCRT_terminate(); -} - -/* Get type info from an object (internal) */ -static const rtti_object_locator* RTTI_GetObjectLocator(type_info *cppobj) -{ - const rtti_object_locator *obj_locator = NULL; - -#ifdef __i386__ - const exception_vtable* vtable = (const exception_vtable*)cppobj->vtable; - - /* Perhaps this is one of classes we export? */ - if (vtable == &MSVCRT_exception_vtable) - { - TRACE("returning exception_rtti\n"); - return &exception_rtti; - } - else if (vtable == &MSVCRT_bad_typeid_vtable) - { - TRACE("returning bad_typeid_rtti\n"); - return &bad_typeid_rtti; - } - else if (vtable == &MSVCRT_bad_cast_vtable) - { - TRACE("returning bad_cast_rtti\n"); - return &bad_cast_rtti; - } - else if (vtable == &MSVCRT___non_rtti_object_vtable) - { - TRACE("returning __non_rtti_object_rtti\n"); - return &__non_rtti_object_rtti; - } - else if (vtable == &MSVCRT_type_info_vtable) - { - TRACE("returning type_info_rtti\n"); - return &type_info_rtti; - } -#endif - - if (!IsBadReadPtr(cppobj, sizeof(void *)) && - !IsBadReadPtr(cppobj->vtable - 1,sizeof(void *)) && - !IsBadReadPtr((void*)cppobj->vtable[-1], sizeof(rtti_object_locator))) - { - obj_locator = (rtti_object_locator *)cppobj->vtable[-1]; - TRACE("returning type_info from vtable (%p)\n", obj_locator); - } - - return obj_locator; -} - -/****************************************************************** - * __RTtypeid (MSVCRT.@) - * - * Retrieve the Run Time Type Information (RTTI) for a C++ object. - * - * PARAMS - * cppobj [I] C++ object to get type information for. - * - * RETURNS - * Success: A type_info object describing cppobj. - * Failure: If the object to be cast has no RTTI, a __non_rtti_object - * exception is thrown. If cppobj is NULL, a bad_typeid exception - * is thrown. In either case, this function does not return. - * - * NOTES - * This function is usually called by compiler generated code as a result - * of using one of the C++ dynamic cast statements. - */ -type_info* MSVCRT___RTtypeid(type_info *cppobj) -{ - const rtti_object_locator *obj_locator = RTTI_GetObjectLocator(cppobj); - -#ifdef __i386__ - if (!obj_locator) - { - static const char* szNullPtr = "Attempted a typeid of NULL pointer!"; - static const char* szBadPtr = "Bad read pointer - no RTTI data!"; - const cxx_exception_type *e_type; - exception e; - - /* Throw a bad_typeid or __non_rtti_object exception */ - if (!cppobj) - { - EXCEPTION_ctor(&e, &szNullPtr); - e.vtable = &MSVCRT_bad_typeid_vtable; - e_type = &bad_typeid_exception_type; - } - else - { - EXCEPTION_ctor(&e, &szBadPtr); - e.vtable = &MSVCRT___non_rtti_object_vtable; - e_type = &__non_rtti_object_exception_type; - } - - _CxxThrowException(&e, e_type); - DebugBreak(); - } - return obj_locator->type_descriptor; -#else - return NULL; -#endif -} - -/****************************************************************** - * __RTDynamicCast (MSVCRT.@) - * - * Dynamically cast a C++ object to one of its base classes. - * - * PARAMS - * cppobj [I] Any C++ object to cast - * unknown [I] Reserved, set to 0 - * src [I] type_info object describing cppobj - * dst [I] type_info object describing the base class to cast to - * do_throw [I] TRUE = throw an exception if the cast fails, FALSE = don't - * - * RETURNS - * Success: The address of cppobj, cast to the object described by dst. - * Failure: NULL, If the object to be cast has no RTTI, or dst is not a - * valid cast for cppobj. If do_throw is TRUE, a bad_cast exception - * is thrown and this function does not return. - * - * NOTES - * This function is usually called by compiler generated code as a result - * of using one of the C++ dynamic cast statements. - */ -void* MSVCRT___RTDynamicCast(type_info *cppobj, int unknown, - type_info *src, type_info *dst, - int do_throw) -{ - const rtti_object_locator *obj_locator; - - /* Note: cppobj _isn't_ a type_info, we use that struct for its vtable ptr */ - TRACE("(%p,%d,%p,%p,%d)\n", cppobj, unknown, src, dst, do_throw); - if (!cppobj) - return 0; - obj_locator= RTTI_GetObjectLocator(cppobj); - if (unknown) - FIXME("Unknown parameter is non-zero: please report\n"); - - /* To cast an object at runtime: - * 1.Find out the true type of the object from the typeinfo at vtable[-1] - * 2.Search for the destination type in the class heirachy - * 3.If destination type is found, return base object address + dest offset - * Otherwise, fail the cast - */ - if (obj_locator) - { - int count = 0; - const rtti_object_hierachy *obj_bases = obj_locator->type_hierachy; - const rtti_base_descriptor **base_desc = obj_bases->base_classes->bases; - int src_offset = obj_locator->base_class_offset, dst_offset = -1; - - while (count < obj_bases->array_len) - { - const type_info *typ = (*base_desc)->type_descriptor; - - if (!strcmp(typ->mangled, dst->mangled)) - { - dst_offset = (*base_desc)->base_class_offset; - break; - } - base_desc++; - count++; - } - if (dst_offset >= 0) - return (void*)((unsigned long)cppobj - src_offset + dst_offset); - } - -#ifdef __i386__ - /* VC++ sets do_throw to 1 when the result of a dynamic_cast is assigned - * to a reference, since references cannot be NULL. - */ - if (do_throw) - { - static const char* exception_text = "Bad dynamic_cast!"; - exception e; - - /* Throw a bad_cast exception */ - EXCEPTION_ctor(&e, &exception_text); - e.vtable = &MSVCRT_bad_cast_vtable; - _CxxThrowException(&e, &bad_cast_exception_type); - DebugBreak(); - } -#endif - return NULL; -} - - -/****************************************************************** - * __RTCastToVoid (MSVCRT.@) - * - * Dynamically cast a C++ object to a void*. - * - * PARAMS - * cppobj [I] The C++ object to cast - * - * RETURNS - * Success: The base address of the object as a void*. - * Failure: NULL, if cppobj is NULL or has no RTTI. - * - * NOTES - * This function is usually called by compiler generated code as a result - * of using one of the C++ dynamic cast statements. - */ -void* MSVCRT___RTCastToVoid(type_info *cppobj) -{ - const rtti_object_locator *obj_locator = RTTI_GetObjectLocator(cppobj); - - /* Note: cppobj _isn't_ a type_info, we use that struct for its vtable ptr */ - TRACE("(%p)\n", cppobj); - - /* Casts to void* simply cast to the base object */ - if (obj_locator) - return (void*)((unsigned long)cppobj - obj_locator->base_class_offset); - return NULL; -} diff --git a/reactos/lib/msvcrt/wine/cppexcept.c b/reactos/lib/msvcrt/wine/cppexcept.c deleted file mode 100644 index e8bb106fe29..00000000000 --- a/reactos/lib/msvcrt/wine/cppexcept.c +++ /dev/null @@ -1,443 +0,0 @@ -/* - * msvcrt C++ exception handling - * - * Copyright 2002 Alexandre Julliard - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * NOTES - * A good reference is the article "How a C++ compiler implements - * exception handling" by Vishal Kochhar, available on - * www.thecodeproject.com. - */ - -#include "wine/config.h" -#include "wine/port.h" - -#include - -#include "windef.h" -#include "winbase.h" -#include "winreg.h" -#include "wine/winternl.h" -#include "msvcrt.h" -#include "wine/exception.h" -#include "excpt.h" -#include "wine/debug.h" - -#include "cppexcept.h" - -WINE_DEFAULT_DEBUG_CHANNEL(seh); - -#ifdef __i386__ /* CxxFrameHandler is not supported on non-i386 */ -#define CONTEXT86 CONTEXT //Mingw Hack - -static DWORD cxx_frame_handler( PEXCEPTION_RECORD rec, cxx_exception_frame* frame, - PCONTEXT exc_context, EXCEPTION_REGISTRATION_RECORD** dispatch, - cxx_function_descr *descr, EXCEPTION_REGISTRATION_RECORD* nested_frame, - int nested_trylevel, CONTEXT86 *context ); - -/* call a function with a given ebp */ -inline static void *call_ebp_func( void *func, void *ebp ) -{ - void *ret; - __asm__ __volatile__ ("pushl %%ebp; movl %2,%%ebp; call *%%eax; popl %%ebp" \ - : "=a" (ret) : "0" (func), "g" (ebp) : "ecx", "edx", "memory" ); - return ret; -} - -/* call a copy constructor */ -inline static void call_copy_ctor( void *func, void *this, void *src, int has_vbase ) -{ - TRACE( "calling copy ctor %p object %p src %p\n", func, this, src ); - if (has_vbase) - /* in that case copy ctor takes an extra bool indicating whether to copy the base class */ - __asm__ __volatile__("pushl $1; pushl %2; call *%0" - : : "r" (func), "c" (this), "g" (src) : "eax", "edx", "memory" ); - else - __asm__ __volatile__("pushl %2; call *%0" - : : "r" (func), "c" (this), "g" (src) : "eax", "edx", "memory" ); -} - -/* call the destructor of the exception object */ -inline static void call_dtor( void *func, void *object ) -{ - __asm__ __volatile__("call *%0" : : "r" (func), "c" (object) : "eax", "edx", "memory" ); -} - -static void dump_type( const cxx_type_info *type ) -{ - DPRINTF( "flags %x type %p", type->flags, type->type_info ); - if (type->type_info) DPRINTF( " (%p %s)", type->type_info->name, type->type_info->mangled ); - DPRINTF( " offset %d vbase %d,%d size %d copy ctor %p\n", type->this_offset, - type->vbase_descr, type->vbase_offset, type->size, type->copy_ctor ); -} - -static void dump_exception_type( const cxx_exception_type *type ) -{ - UINT i; - - DPRINTF( "exception type:\n" ); - DPRINTF( "flags %x destr %p handler %p type info %p\n", - type->flags, type->destructor, type->custom_handler, type->type_info_table ); - for (i = 0; i < type->type_info_table->count; i++) - { - DPRINTF( " %d: ", i ); - dump_type( type->type_info_table->info[i] ); - } -} - -static void dump_function_descr( const cxx_function_descr *descr, const cxx_exception_type *info ) -{ - UINT i; - int j; - - DPRINTF( "function descr:\n" ); - DPRINTF( "magic %x\n", descr->magic ); - DPRINTF( "unwind table: %p %d\n", descr->unwind_table, descr->unwind_count ); - for (i = 0; i < descr->unwind_count; i++) - { - DPRINTF( " %d: prev %d func %p\n", i, - descr->unwind_table[i].prev, descr->unwind_table[i].handler ); - } - DPRINTF( "try table: %p %d\n", descr->tryblock, descr->tryblock_count ); - for (i = 0; i < descr->tryblock_count; i++) - { - DPRINTF( " %d: start %d end %d catchlevel %d catch %p %d\n", i, - descr->tryblock[i].start_level, descr->tryblock[i].end_level, - descr->tryblock[i].catch_level, descr->tryblock[i].catchblock, - descr->tryblock[i].catchblock_count ); - for (j = 0; j < descr->tryblock[i].catchblock_count; j++) - { - catchblock_info *ptr = &descr->tryblock[i].catchblock[j]; - DPRINTF( " %d: flags %x offset %d handler %p type %p", - j, ptr->flags, ptr->offset, ptr->handler, ptr->type_info ); - if (ptr->type_info) DPRINTF( " (%p %s)", ptr->type_info->name, ptr->type_info->mangled ); - DPRINTF( "\n" ); - } - } -} - -/* compute the this pointer for a base class of a given type */ -static void *get_this_pointer( const cxx_type_info *type, void *object ) -{ - void *this_ptr; - int *offset_ptr; - - if (!object) return NULL; - this_ptr = (char *)object + type->this_offset; - if (type->vbase_descr >= 0) - { - /* move this ptr to vbase descriptor */ - this_ptr = (char *)this_ptr + type->vbase_descr; - /* and fetch additional offset from vbase descriptor */ - offset_ptr = (int *)(*(char **)this_ptr + type->vbase_offset); - this_ptr = (char *)this_ptr + *offset_ptr; - } - return this_ptr; -} - -/* check if the exception type is caught by a given catch block, and return the type that matched */ -static const cxx_type_info *find_caught_type( cxx_exception_type *exc_type, catchblock_info *catchblock ) -{ - UINT i; - - for (i = 0; i < exc_type->type_info_table->count; i++) - { - const cxx_type_info *type = exc_type->type_info_table->info[i]; - - if (!catchblock->type_info) return type; /* catch(...) matches any type */ - if (catchblock->type_info != type->type_info) - { - if (strcmp( catchblock->type_info->mangled, type->type_info->mangled )) continue; - } - /* type is the same, now check the flags */ - if ((exc_type->flags & TYPE_FLAG_CONST) && - !(catchblock->flags & TYPE_FLAG_CONST)) continue; - if ((exc_type->flags & TYPE_FLAG_VOLATILE) && - !(catchblock->flags & TYPE_FLAG_VOLATILE)) continue; - return type; /* it matched */ - } - return NULL; -} - - -/* copy the exception object where the catch block wants it */ -static void copy_exception( void *object, cxx_exception_frame *frame, - catchblock_info *catchblock, const cxx_type_info *type ) -{ - void **dest_ptr; - - if (!catchblock->type_info || !catchblock->type_info->mangled[0]) return; - if (!catchblock->offset) return; - dest_ptr = (void **)((char *)&frame->ebp + catchblock->offset); - - if (catchblock->flags & TYPE_FLAG_REFERENCE) - { - *dest_ptr = get_this_pointer( type, object ); - } - else if (type->flags & CLASS_IS_SIMPLE_TYPE) - { - memmove( dest_ptr, object, type->size ); - /* if it is a pointer, adjust it */ - if (type->size == sizeof(void *)) *dest_ptr = get_this_pointer( type, *dest_ptr ); - } - else /* copy the object */ - { - if (type->copy_ctor) - call_copy_ctor( type->copy_ctor, dest_ptr, get_this_pointer(type,object), - (type->flags & CLASS_HAS_VIRTUAL_BASE_CLASS) ); - else - memmove( dest_ptr, get_this_pointer(type,object), type->size ); - } -} - -/* unwind the local function up to a given trylevel */ -static void cxx_local_unwind( cxx_exception_frame* frame, cxx_function_descr *descr, int last_level) -{ - void (*handler)(); - int trylevel = frame->trylevel; - - while (trylevel != last_level) - { - if (trylevel < 0 || trylevel >= descr->unwind_count) - { - ERR( "invalid trylevel %d\n", trylevel ); - MSVCRT_terminate(); - } - handler = descr->unwind_table[trylevel].handler; - if (handler) - { - TRACE( "calling unwind handler %p trylevel %d last %d ebp %p\n", - handler, trylevel, last_level, &frame->ebp ); - call_ebp_func( handler, &frame->ebp ); - } - trylevel = descr->unwind_table[trylevel].prev; - } - frame->trylevel = last_level; -} - -/* exception frame for nested exceptions in catch block */ -struct catch_func_nested_frame -{ - EXCEPTION_REGISTRATION_RECORD frame; /* standard exception frame */ - EXCEPTION_RECORD *prev_rec; /* previous record to restore in thread data */ - cxx_exception_frame *cxx_frame; /* frame of parent exception */ - cxx_function_descr *descr; /* descriptor of parent exception */ - int trylevel; /* current try level */ -}; - -/* handler for exceptions happening while calling a catch function */ -static DWORD catch_function_nested_handler( EXCEPTION_RECORD *rec, EXCEPTION_REGISTRATION_RECORD *frame, - CONTEXT *context, EXCEPTION_REGISTRATION_RECORD **dispatcher ) -{ - struct catch_func_nested_frame *nested_frame = (struct catch_func_nested_frame *)frame; - - if (rec->ExceptionFlags & (EH_UNWINDING | EH_EXIT_UNWIND)) - { - msvcrt_get_thread_data()->exc_record = nested_frame->prev_rec; - return ExceptionContinueSearch; - } - else - { - TRACE( "got nested exception in catch function\n" ); - return cxx_frame_handler( rec, nested_frame->cxx_frame, context, - NULL, nested_frame->descr, &nested_frame->frame, - nested_frame->trylevel, context ); - } -} - -/* find and call the appropriate catch block for an exception */ -/* returns the address to continue execution to after the catch block was called */ -inline static void *call_catch_block( PEXCEPTION_RECORD rec, cxx_exception_frame *frame, - cxx_function_descr *descr, int nested_trylevel, - cxx_exception_type *info ) -{ - UINT i; - int j; - void *addr, *object = (void *)rec->ExceptionInformation[1]; - struct catch_func_nested_frame nested_frame; - int trylevel = frame->trylevel; - MSVCRT_thread_data *thread_data = msvcrt_get_thread_data(); - - for (i = 0; i < descr->tryblock_count; i++) - { - tryblock_info *tryblock = &descr->tryblock[i]; - - if (trylevel < tryblock->start_level) continue; - if (trylevel > tryblock->end_level) continue; - - /* got a try block */ - for (j = 0; j < tryblock->catchblock_count; j++) - { - catchblock_info *catchblock = &tryblock->catchblock[j]; - const cxx_type_info *type = find_caught_type( info, catchblock ); - if (!type) continue; - - TRACE( "matched type %p in tryblock %d catchblock %d\n", type, i, j ); - - /* copy the exception to its destination on the stack */ - copy_exception( object, frame, catchblock, type ); - - /* unwind the stack */ - RtlUnwind( frame, 0, rec, 0 ); - cxx_local_unwind( frame, descr, tryblock->start_level ); - frame->trylevel = tryblock->end_level + 1; - - /* call the catch block */ - TRACE( "calling catch block %p for type %p addr %p ebp %p\n", - catchblock, type, catchblock->handler, &frame->ebp ); - - /* setup an exception block for nested exceptions */ - - //nested_frame.frame.Handler = catch_function_nested_handler; - nested_frame.frame.handler = (PEXCEPTION_HANDLER)catch_function_nested_handler; - nested_frame.prev_rec = thread_data->exc_record; - nested_frame.cxx_frame = frame; - nested_frame.descr = descr; - nested_frame.trylevel = nested_trylevel + 1; - - __wine_push_frame( &nested_frame.frame ); - thread_data->exc_record = rec; - addr = call_ebp_func( catchblock->handler, &frame->ebp ); - thread_data->exc_record = nested_frame.prev_rec; - __wine_pop_frame( &nested_frame.frame ); - - if (info->destructor) call_dtor( info->destructor, object ); - TRACE( "done, continuing at %p\n", addr ); - return addr; - } - } - return NULL; -} - - -/********************************************************************* - * cxx_frame_handler - * - * Implementation of __CxxFrameHandler. - */ -static DWORD cxx_frame_handler( PEXCEPTION_RECORD rec, cxx_exception_frame* frame, - PCONTEXT exc_context, EXCEPTION_REGISTRATION_RECORD** dispatch, - cxx_function_descr *descr, EXCEPTION_REGISTRATION_RECORD* nested_frame, - int nested_trylevel, CONTEXT86 *context ) -{ - cxx_exception_type *exc_type; - void *next_ip; - - if (descr->magic != CXX_FRAME_MAGIC) - { - ERR( "invalid frame magic %x\n", descr->magic ); - return ExceptionContinueSearch; - } - if (rec->ExceptionFlags & (EH_UNWINDING|EH_EXIT_UNWIND)) - { - if (descr->unwind_count && !nested_trylevel) cxx_local_unwind( frame, descr, -1 ); - return ExceptionContinueSearch; - } - if (!descr->tryblock_count) return ExceptionContinueSearch; - - exc_type = (cxx_exception_type *)rec->ExceptionInformation[2]; - if (rec->ExceptionCode == CXX_EXCEPTION && - rec->ExceptionInformation[0] > CXX_FRAME_MAGIC && - exc_type->custom_handler) - { - return exc_type->custom_handler( rec, frame, exc_context, dispatch, - descr, nested_trylevel, nested_frame, 0 ); - } - - if (!exc_type) /* nested exception, fetch info from original exception */ - { - rec = msvcrt_get_thread_data()->exc_record; - exc_type = (cxx_exception_type *)rec->ExceptionInformation[2]; - } - - if (TRACE_ON(seh)) - { - TRACE("handling C++ exception rec %p frame %p trylevel %d descr %p nested_frame %p\n", - rec, frame, frame->trylevel, descr, nested_frame ); - dump_exception_type( exc_type ); - dump_function_descr( descr, exc_type ); - } - - next_ip = call_catch_block( rec, frame, descr, frame->trylevel, exc_type ); - - if (!next_ip) return ExceptionContinueSearch; - rec->ExceptionFlags &= ~EH_NONCONTINUABLE; - context->Eip = (DWORD)next_ip; - context->Ebp = (DWORD)&frame->ebp; - context->Esp = ((DWORD*)frame)[-1]; - return ExceptionContinueExecution; -} - - -/********************************************************************* - * __CxxFrameHandler (MSVCRT.@) - */ -void __CxxFrameHandler( PEXCEPTION_RECORD rec, EXCEPTION_REGISTRATION_RECORD* frame, - PCONTEXT exc_context, EXCEPTION_REGISTRATION_RECORD** dispatch, - CONTEXT86 *context ) -{ - cxx_function_descr *descr = (cxx_function_descr *)context->Eax; - context->Eax = cxx_frame_handler( rec, (cxx_exception_frame *)frame, - exc_context, dispatch, descr, NULL, 0, context ); -} -//DEFINE_REGS_ENTRYPOINT( __CxxFrameHandler, MSVCRT__CxxFrameHandler, 16, 0 ); -// ROS -#endif /* __i386__ */ - -/********************************************************************* - * _CxxThrowException (MSVCRT.@) - */ -void _CxxThrowException( void *object, const cxx_exception_type *type ) -{ - DWORD args[3]; - - args[0] = CXX_FRAME_MAGIC; - args[1] = (DWORD)object; - args[2] = (DWORD)type; - RaiseException( CXX_EXCEPTION, EH_NONCONTINUABLE, 3, args ); -} - -/********************************************************************* - * __CxxDetectRethrow (MSVCRT.@) - */ -BOOL __CxxDetectRethrow(PEXCEPTION_POINTERS ptrs) -{ - PEXCEPTION_RECORD rec; - - if (!ptrs) - return FALSE; - - rec = ptrs->ExceptionRecord; - - if (rec->ExceptionCode == CXX_EXCEPTION && - rec->NumberParameters == 3 && - rec->ExceptionInformation[0] == CXX_FRAME_MAGIC && - rec->ExceptionInformation[2]) - { - ptrs->ExceptionRecord = msvcrt_get_thread_data()->exc_record; - return TRUE; - } - return (msvcrt_get_thread_data()->exc_record == rec); -} - -/********************************************************************* - * __CxxQueryExceptionSize (MSVCRT.@) - */ -unsigned int __CxxQueryExceptionSize(void) -{ - return sizeof(cxx_exception_type); -} diff --git a/reactos/lib/msvcrt/wine/cppexcept.h b/reactos/lib/msvcrt/wine/cppexcept.h deleted file mode 100644 index 3a822ed9ec0..00000000000 --- a/reactos/lib/msvcrt/wine/cppexcept.h +++ /dev/null @@ -1,124 +0,0 @@ -/* - * msvcrt C++ exception handling - * - * Copyright 2002 Alexandre Julliard - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#ifndef __MSVCRT_CPPEXCEPT_H -#define __MSVCRT_CPPEXCEPT_H - -#define CXX_FRAME_MAGIC 0x19930520 -#define CXX_EXCEPTION 0xe06d7363 - -typedef void (*vtable_ptr)(); - -/* type_info object, see cpp.c for inplementation */ -typedef struct __type_info -{ - vtable_ptr *vtable; - char *name; /* Unmangled name, allocated lazily */ - char mangled[32]; /* Variable length, but we declare it large enough for static RTTI */ -} type_info; - -/* the exception frame used by CxxFrameHandler */ -typedef struct __cxx_exception_frame -{ - EXCEPTION_REGISTRATION_RECORD frame; /* the standard exception frame */ - int trylevel; - DWORD ebp; -} cxx_exception_frame; - -/* info about a single catch {} block */ -typedef struct __catchblock_info -{ - UINT flags; /* flags (see below) */ - type_info *type_info; /* C++ type caught by this block */ - int offset; /* stack offset to copy exception object to */ - void (*handler)(); /* catch block handler code */ -} catchblock_info; -#define TYPE_FLAG_CONST 1 -#define TYPE_FLAG_VOLATILE 2 -#define TYPE_FLAG_REFERENCE 8 - -/* info about a single try {} block */ -typedef struct __tryblock_info -{ - int start_level; /* start trylevel of that block */ - int end_level; /* end trylevel of that block */ - int catch_level; /* initial trylevel of the catch block */ - int catchblock_count; /* count of catch blocks in array */ - catchblock_info *catchblock; /* array of catch blocks */ -} tryblock_info; - -/* info about the unwind handler for a given trylevel */ -typedef struct __unwind_info -{ - int prev; /* prev trylevel unwind handler, to run after this one */ - void (*handler)(); /* unwind handler */ -} unwind_info; - -/* descriptor of all try blocks of a given function */ -typedef struct __cxx_function_descr -{ - UINT magic; /* must be CXX_FRAME_MAGIC */ - UINT unwind_count; /* number of unwind handlers */ - unwind_info *unwind_table; /* array of unwind handlers */ - UINT tryblock_count; /* number of try blocks */ - tryblock_info *tryblock; /* array of try blocks */ - UINT unknown[3]; -} cxx_function_descr; - -typedef void (*cxx_copy_ctor)(void); - -/* complete information about a C++ type */ -typedef struct __cxx_type_info -{ - UINT flags; /* flags (see CLASS_* flags below) */ - type_info *type_info; /* C++ type info */ - int this_offset; /* offset of base class this pointer from start of object */ - int vbase_descr; /* offset of virtual base class descriptor */ - int vbase_offset; /* offset of this pointer offset in virtual base class descriptor */ - size_t size; /* object size */ - cxx_copy_ctor copy_ctor; /* copy constructor */ -} cxx_type_info; -#define CLASS_IS_SIMPLE_TYPE 1 -#define CLASS_HAS_VIRTUAL_BASE_CLASS 4 - -/* table of C++ types that apply for a given object */ -typedef struct __cxx_type_info_table -{ - UINT count; /* number of types */ - const cxx_type_info *info[3]; /* variable length, we declare it large enough for static RTTI */ -} cxx_type_info_table; - -typedef DWORD (*cxx_exc_custom_handler)( PEXCEPTION_RECORD, cxx_exception_frame*, - PCONTEXT, EXCEPTION_REGISTRATION_RECORD**, - cxx_function_descr*, int nested_trylevel, - EXCEPTION_REGISTRATION_RECORD *nested_frame, DWORD unknown3 ); - -/* type information for an exception object */ -typedef struct __cxx_exception_type -{ - UINT flags; /* TYPE_FLAG flags */ - void (*destructor)(); /* exception object destructor */ - cxx_exc_custom_handler custom_handler; /* custom handler for this exception */ - const cxx_type_info_table *type_info_table; /* list of types for this exception object */ -} cxx_exception_type; - -void _CxxThrowException(void*,const cxx_exception_type*); - -#endif /* __MSVCRT_CPPEXCEPT_H */ diff --git a/reactos/lib/msvcrt/wine/eh.h b/reactos/lib/msvcrt/wine/eh.h deleted file mode 100644 index 14201fb0676..00000000000 --- a/reactos/lib/msvcrt/wine/eh.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * C++ exception handling facility - * - * Copyright 2000 Francois Gouget. - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ -#ifndef __WINE_EH_H -#define __WINE_EH_H -#ifndef __WINE_USE_MSVCRT -#define __WINE_USE_MSVCRT -#endif - -#if !defined(__cplusplus) && !defined(USE_MSVCRT_PREFIX) -#error "eh.h is meant only for C++ applications" -#endif - -#ifndef MSVCRT -# ifdef USE_MSVCRT_PREFIX -# define MSVCRT(x) MSVCRT_##x -# else -# define MSVCRT(x) x -# endif -#endif - -struct _EXCEPTION_POINTERS; - -typedef void (*terminate_handler)(); -typedef void (*terminate_function)(); -typedef void (*unexpected_handler)(); -typedef void (*unexpected_function)(); -typedef void (*_se_translator_function)(unsigned int code, struct _EXCEPTION_POINTERS *info); - -terminate_function MSVCRT(set_terminate)(terminate_function func); -unexpected_function MSVCRT(set_unexpected)(unexpected_function func); -_se_translator_function MSVCRT(_set_se_translator)(_se_translator_function func); - -void MSVCRT(terminate)(); -void MSVCRT(unexpected)(); - -#endif /* __WINE_EH_H */ diff --git a/reactos/lib/msvcrt/wine/heap.c b/reactos/lib/msvcrt/wine/heap.c deleted file mode 100644 index 77217e23127..00000000000 --- a/reactos/lib/msvcrt/wine/heap.c +++ /dev/null @@ -1,121 +0,0 @@ -/* - * msvcrt.dll heap functions - * - * Copyright 2000 Jon Griffiths - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * Note: Win32 heap operations are MT safe. We only lock the new - * handler and non atomic heap operations - */ - -#include "precomp.h" - -#include "msvcrt/errno.h" -#include "msvcrt/malloc.h" -#include "msvcrt/stdlib.h" -#include - -#include "wine/debug.h" - -WINE_DEFAULT_DEBUG_CHANNEL(msvcrt); - -/* MT */ -#define LOCK_HEAP _mlock( _HEAP_LOCK ) -#define UNLOCK_HEAP _munlock( _HEAP_LOCK ) - - -typedef void (*MSVCRT_new_handler_func)(unsigned long size); - -static MSVCRT_new_handler_func MSVCRT_new_handler; -static int MSVCRT_new_mode; - - -/********************************************************************* - * ??2@YAPAXI@Z (MSVCRT.@) - */ -void* MSVCRT_operator_new(unsigned long size) -{ - void *retval = malloc(size); - TRACE("(%ld) returning %p\n", size, retval); - LOCK_HEAP; - if(!retval && MSVCRT_new_handler) - (*MSVCRT_new_handler)(size); - UNLOCK_HEAP; - return retval; -} - -/********************************************************************* - * ??3@YAXPAX@Z (MSVCRT.@) - */ -void MSVCRT_operator_delete(void *mem) -{ - TRACE("(%p)\n", mem); - free(mem); -} - - -/********************************************************************* - * ?_query_new_handler@@YAP6AHI@ZXZ (MSVCRT.@) - */ -MSVCRT_new_handler_func MSVCRT__query_new_handler(void) -{ - return MSVCRT_new_handler; -} - - -/********************************************************************* - * ?_query_new_mode@@YAHXZ (MSVCRT.@) - */ -int MSVCRT__query_new_mode(void) -{ - return MSVCRT_new_mode; -} - -/********************************************************************* - * ?_set_new_handler@@YAP6AHI@ZP6AHI@Z@Z (MSVCRT.@) - */ -MSVCRT_new_handler_func MSVCRT__set_new_handler(MSVCRT_new_handler_func func) -{ - MSVCRT_new_handler_func old_handler; - LOCK_HEAP; - old_handler = MSVCRT_new_handler; - MSVCRT_new_handler = func; - UNLOCK_HEAP; - return old_handler; -} - -/********************************************************************* - * ?set_new_handler@@YAP6AXXZP6AXXZ@Z (MSVCRT.@) - */ -MSVCRT_new_handler_func MSVCRT_set_new_handler(void *func) -{ - TRACE("(%p)\n",func); - MSVCRT__set_new_handler(NULL); - return NULL; -} - -/********************************************************************* - * ?_set_new_mode@@YAHH@Z (MSVCRT.@) - */ -int MSVCRT__set_new_mode(int mode) -{ - int old_mode; - LOCK_HEAP; - old_mode = MSVCRT_new_mode; - MSVCRT_new_mode = mode; - UNLOCK_HEAP; - return old_mode; -} diff --git a/reactos/lib/msvcrt/wine/msvcrt.h b/reactos/lib/msvcrt/wine/msvcrt.h deleted file mode 100644 index d6ae272a5d9..00000000000 --- a/reactos/lib/msvcrt/wine/msvcrt.h +++ /dev/null @@ -1,128 +0,0 @@ -/* - * Copyright 2001 Jon Griffiths - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#ifndef __WINE_MSVCRT_H -#define __WINE_MSVCRT_H - -#include -#include -#include - -#include "windef.h" -#include "winbase.h" -#include "winerror.h" -#include "winnls.h" - -#include "msvcrt/string.h" -#include "eh.h" - -/* TLS data */ -extern DWORD MSVCRT_tls_index; - -typedef struct __MSVCRT_thread_data -{ - int _errno; // ros - unsigned long doserrno; - char *mbstok_next; /* next ptr for mbstok() */ - char *efcvt_buffer; /* buffer for ecvt/fcvt */ - terminate_function terminate_handler; - unexpected_function unexpected_handler; - _se_translator_function se_translator; - EXCEPTION_RECORD *exc_record; -} MSVCRT_thread_data; - -extern MSVCRT_thread_data *msvcrt_get_thread_data(void); - -extern int MSVCRT_current_lc_all_cp; - -void _purecall(void); -void MSVCRT__set_errno(int); -char* msvcrt_strndup(const char*,unsigned int); -#ifndef __REACTOS__ -MSVCRT_wchar_t *msvcrt_wstrndup(const MSVCRT_wchar_t*, unsigned int); -#endif -void MSVCRT__amsg_exit(int errnum); - -extern char **MSVCRT__environ; -#ifndef __REACTOS__ -extern MSVCRT_wchar_t **MSVCRT__wenviron; -extern char ** msvcrt_SnapshotOfEnvironmentA(char **); -extern MSVCRT_wchar_t ** msvcrt_SnapshotOfEnvironmentW(MSVCRT_wchar_t **); -#endif - -/* FIXME: This should be declared in new.h but it's not an extern "C" so - * it would not be much use anyway. Even for Winelib applications. - */ -int MSVCRT__set_new_mode(int mode); - -void* MSVCRT_operator_new(unsigned long size); -void MSVCRT_operator_delete(void*); -#ifndef __REACTOS__ -typedef void* (*MSVCRT_malloc_func)(MSVCRT_size_t); -#endif -typedef void (*MSVCRT_free_func)(void*); -#ifndef __REACTOS__ -extern char* MSVCRT___unDName(int,const char*,int,MSVCRT_malloc_func,MSVCRT_free_func,unsigned int); -#endif - -/* Setup and teardown multi threaded locks */ -extern void msvcrt_init_mt_locks(void); -extern void msvcrt_free_mt_locks(void); - -extern void msvcrt_init_io(void); -extern void msvcrt_free_io(void); -extern void msvcrt_init_console(void); -extern void msvcrt_free_console(void); -extern void msvcrt_init_args(void); -extern void msvcrt_free_args(void); - -/* run-time error codes */ -#define _RT_STACK 0 -#define _RT_NULLPTR 1 -#define _RT_FLOAT 2 -#define _RT_INTDIV 3 -#define _RT_EXECMEM 5 -#define _RT_EXECFORM 6 -#define _RT_EXECENV 7 -#define _RT_SPACEARG 8 -#define _RT_SPACEENV 9 -#define _RT_ABORT 10 -#define _RT_NPTR 12 -#define _RT_FPTR 13 -#define _RT_BREAK 14 -#define _RT_INT 15 -#define _RT_THREAD 16 -#define _RT_LOCK 17 -#define _RT_HEAP 18 -#define _RT_OPENCON 19 -#define _RT_QWIN 20 -#define _RT_NOMAIN 21 -#define _RT_NONCONT 22 -#define _RT_INVALDISP 23 -#define _RT_ONEXIT 24 -#define _RT_PUREVIRT 25 -#define _RT_STDIOINIT 26 -#define _RT_LOWIOINIT 27 -#define _RT_HEAPINIT 28 -#define _RT_DOMAIN 120 -#define _RT_SING 121 -#define _RT_TLOSS 122 -#define _RT_CRNL 252 -#define _RT_BANNER 255 - -#endif /* __WINE_MSVCRT_H */ diff --git a/reactos/lib/msvcrt/wine/thread.c b/reactos/lib/msvcrt/wine/thread.c deleted file mode 100644 index 92ee285e591..00000000000 --- a/reactos/lib/msvcrt/wine/thread.c +++ /dev/null @@ -1,108 +0,0 @@ -/* - * msvcrt.dll thread functions - * - * Copyright 2000 Jon Griffiths - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include "precomp.h" -#include "msvcrt.h" - -#include "msvcrt/malloc.h" -#include "msvcrt/process.h" - -#include "wine/debug.h" - -WINE_DEFAULT_DEBUG_CHANNEL(msvcrt); - -void _amsg_exit (int errnum); -/* Index to TLS */ -DWORD MSVCRT_tls_index; - -typedef void (*_beginthread_start_routine_t)(void *); -typedef unsigned int (__stdcall *_beginthreadex_start_routine_t)(void *); - -/********************************************************************/ - -typedef struct { - _beginthread_start_routine_t start_address; - void *arglist; -} _beginthread_trampoline_t; - -/********************************************************************* - * msvcrt_get_thread_data - * - * Return the thread local storage structure. - */ -MSVCRT_thread_data *msvcrt_get_thread_data(void) -{ - MSVCRT_thread_data *ptr; - DWORD err = GetLastError(); /* need to preserve last error */ - - if (!(ptr = TlsGetValue( MSVCRT_tls_index ))) - { - if (!(ptr = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*ptr) ))) - _amsg_exit( _RT_THREAD ); - if (!TlsSetValue( MSVCRT_tls_index, ptr )) - _amsg_exit( _RT_THREAD ); - if (!TlsSetValue( MSVCRT_tls_index, ptr )) - _amsg_exit( _RT_THREAD ); - } - SetLastError( err ); - return ptr; -} - -/********************************************************************* - * _beginthread_trampoline - */ -static DWORD CALLBACK _beginthread_trampoline(LPVOID arg) -{ - _beginthread_trampoline_t local_trampoline; - - /* Maybe it's just being paranoid, but freeing arg right - * away seems safer. - */ - memcpy(&local_trampoline,arg,sizeof(local_trampoline)); - free(arg); - - local_trampoline.start_address(local_trampoline.arglist); - return 0; -} - -/********************************************************************* - * _beginthread (MSVCRT.@) - */ -unsigned long _beginthread( - _beginthread_start_routine_t start_address, /* [in] Start address of routine that begins execution of new thread */ - unsigned int stack_size, /* [in] Stack size for new thread or 0 */ - void *arglist) /* [in] Argument list to be passed to new thread or NULL */ -{ - _beginthread_trampoline_t* trampoline; - - TRACE("(%p, %d, %p)\n", start_address, stack_size, arglist); - - /* Allocate the trampoline here so that it is still valid when the thread - * starts... typically after this function has returned. - * _beginthread_trampoline is responsible for freeing the trampoline - */ - trampoline=malloc(sizeof(*trampoline)); - trampoline->start_address = start_address; - trampoline->arglist = arglist; - - /* FIXME */ - return (unsigned long)CreateThread(NULL, stack_size, _beginthread_trampoline, - trampoline, 0, NULL); -} diff --git a/reactos/lib/msvcrt/wstring/wcscoll.c b/reactos/lib/msvcrt/wstring/wcscoll.c deleted file mode 100644 index e1c27270ed2..00000000000 --- a/reactos/lib/msvcrt/wstring/wcscoll.c +++ /dev/null @@ -1,38 +0,0 @@ - -#include - -/* - * @unimplemented - */ -int wcscoll(const wchar_t *a1,const wchar_t *a2) -{ - /* FIXME: handle collates */ - return wcscmp(a1,a2); -} - -/* - * @unimplemented - */ -int _wcsicoll(const wchar_t *a1,const wchar_t *a2) -{ - /* FIXME: handle collates */ - return _wcsicmp(a1,a2); -} - -/* - * @unimplemented - */ -int _wcsncoll (const wchar_t *s1, const wchar_t *s2, size_t c) -{ - /* FIXME: handle collates */ - return wcsncmp(s1,s2,c); -} - -/* - * @unimplemented - */ -int _wcsnicoll (const wchar_t *s1, const wchar_t *s2, size_t c) -{ - /* FIXME: handle collates */ - return _wcsnicmp(s1,s2,c); -} diff --git a/reactos/lib/msvcrt/wstring/wcscspn.c b/reactos/lib/msvcrt/wstring/wcscspn.c deleted file mode 100644 index 44f66b70b61..00000000000 --- a/reactos/lib/msvcrt/wstring/wcscspn.c +++ /dev/null @@ -1,23 +0,0 @@ -#include - -/* - * @implemented - */ -size_t wcscspn(const wchar_t *str,const wchar_t *reject) -{ - wchar_t *s; - wchar_t *t; - s=(wchar_t *)str; - do { - t=(wchar_t *)reject; - while (*t) { - if (*t==*s) - break; - t++; - } - if (*t) - break; - s++; - } while (*s); - return s-str; /* nr of wchars */ -} diff --git a/reactos/lib/msvcrt/wstring/wcsdup.c b/reactos/lib/msvcrt/wstring/wcsdup.c deleted file mode 100644 index 9c150a44acb..00000000000 --- a/reactos/lib/msvcrt/wstring/wcsdup.c +++ /dev/null @@ -1,21 +0,0 @@ -#include -#include -#include -#include - - -/* - * @implemented - */ -wchar_t* _wcsdup(const wchar_t* ptr) -{ - wchar_t* dup; - - dup = malloc((wcslen(ptr) + 1) * sizeof(wchar_t)); - if (dup == NULL) { - __set_errno(ENOMEM); - return NULL; - } - wcscpy(dup, ptr); - return dup; -} diff --git a/reactos/lib/msvcrt/wstring/wcsicmp.c b/reactos/lib/msvcrt/wstring/wcsicmp.c deleted file mode 100644 index 82feea78558..00000000000 --- a/reactos/lib/msvcrt/wstring/wcsicmp.c +++ /dev/null @@ -1,20 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ - -#include -#include - - -/* - * @implemented - */ -int _wcsicmp(const wchar_t* cs,const wchar_t * ct) -{ - while (towlower(*cs) == towlower(*ct)) - { - if (*cs == 0) - return 0; - cs++; - ct++; - } - return towlower(*cs) - towlower(*ct); -} diff --git a/reactos/lib/msvcrt/wstring/wcslwr.c b/reactos/lib/msvcrt/wstring/wcslwr.c deleted file mode 100644 index 176af2fceeb..00000000000 --- a/reactos/lib/msvcrt/wstring/wcslwr.c +++ /dev/null @@ -1,25 +0,0 @@ -/* - * The C RunTime DLL - * - * Implements C run-time functionality as known from UNIX. - * - * Copyright 1996,1998 Marcus Meissner - * Copyright 1996 Jukka Iivonen - * Copyright 1997 Uwe Bonnes - */ - -#include - -/* - * @implemented - */ -wchar_t * _wcslwr(wchar_t *x) -{ - wchar_t *y=x; - - while (*y) { - *y=towlower(*y); - y++; - } - return x; -} diff --git a/reactos/lib/msvcrt/wstring/wcsnicmp.c b/reactos/lib/msvcrt/wstring/wcsnicmp.c deleted file mode 100644 index 4a99c8c492a..00000000000 --- a/reactos/lib/msvcrt/wstring/wcsnicmp.c +++ /dev/null @@ -1,17 +0,0 @@ -#include - -/* - * @implemented - */ -int _wcsnicmp (const wchar_t *cs, const wchar_t *ct, size_t count) -{ - if (count == 0) - return 0; - do { - if (towupper(*cs) != towupper(*ct++)) - return towupper(*cs) - towupper(*--ct); - if (*cs++ == 0) - break; - } while (--count != 0); - return 0; -} diff --git a/reactos/lib/msvcrt/wstring/wcspbrk.c b/reactos/lib/msvcrt/wstring/wcspbrk.c deleted file mode 100644 index e65ec33c2e0..00000000000 --- a/reactos/lib/msvcrt/wstring/wcspbrk.c +++ /dev/null @@ -1,19 +0,0 @@ -#include - -/* - * @implemented - */ -wchar_t *wcspbrk(const wchar_t *s1, const wchar_t *s2) -{ - const wchar_t *scanp; - int c, sc; - - while ((c = *s1++) != 0) - { - for (scanp = s2; (sc = *scanp++) != 0;) - if (sc == c) { - return (wchar_t *)(--s1); - } - } - return 0; -} diff --git a/reactos/lib/msvcrt/wstring/wcsrev.c b/reactos/lib/msvcrt/wstring/wcsrev.c deleted file mode 100644 index 4c213c5bf62..00000000000 --- a/reactos/lib/msvcrt/wstring/wcsrev.c +++ /dev/null @@ -1,21 +0,0 @@ -#include - -/* - * @implemented - */ -wchar_t * _wcsrev(wchar_t *s) -{ - wchar_t *e; - wchar_t a; - e=s; - while (*e) - e++; - while (s - -/* - * @implemented - */ -wchar_t* _wcsnset (wchar_t* wsToFill, wchar_t wcFill, size_t sizeMaxFill) -{ - wchar_t *t = wsToFill; - int i = 0; - while( *wsToFill != 0 && i < sizeMaxFill) - { - *wsToFill = wcFill; - wsToFill++; - i++; - - } - return t; -} - -/* - * @implemented - */ -wchar_t* _wcsset (wchar_t* wsToFill, wchar_t wcFill) -{ - wchar_t *t = wsToFill; - while( *wsToFill != 0 ) - { - *wsToFill = wcFill; - wsToFill++; - - } - return t; -} diff --git a/reactos/lib/msvcrt/wstring/wcsspn.c b/reactos/lib/msvcrt/wstring/wcsspn.c deleted file mode 100644 index 1025c8c1c2a..00000000000 --- a/reactos/lib/msvcrt/wstring/wcsspn.c +++ /dev/null @@ -1,23 +0,0 @@ -#include - -/* - * @implemented - */ -size_t wcsspn(const wchar_t *str,const wchar_t *accept) -{ - wchar_t *s; - wchar_t *t; - s=(wchar_t *)str; - do { - t=(wchar_t *)accept; - while (*t) { - if (*t==*s) - break; - t++; - } - if (!*t) - break; - s++; - } while (*s); - return s-str; /* nr of wchars */ -} diff --git a/reactos/lib/msvcrt/wstring/wcsstr.c b/reactos/lib/msvcrt/wstring/wcsstr.c deleted file mode 100644 index 7167f946c56..00000000000 --- a/reactos/lib/msvcrt/wstring/wcsstr.c +++ /dev/null @@ -1,26 +0,0 @@ -#include - -/* - * @implemented - */ -wchar_t *wcsstr(const wchar_t *s,const wchar_t *b) -{ - wchar_t *x; - wchar_t *y; - wchar_t *c; - x=(wchar_t *)s; - while (*x) { - if (*x==*b) { - y=x; - c=(wchar_t *)b; - while (*y && *c && *y==*c) { - c++; - y++; - } - if (!*c) - return x; - } - x++; - } - return NULL; -} diff --git a/reactos/lib/msvcrt/wstring/wcstok.c b/reactos/lib/msvcrt/wstring/wcstok.c deleted file mode 100644 index 72cc6000a7c..00000000000 --- a/reactos/lib/msvcrt/wstring/wcstok.c +++ /dev/null @@ -1,62 +0,0 @@ -#include -#include - -wchar_t** _wlasttoken(); /* wlasttok.c */ - -/* - * @implemented - */ -wchar_t *wcstok(wchar_t *s, const wchar_t *ct) -{ - const wchar_t *spanp; - int c, sc; - wchar_t *tok; -#if 1 - wchar_t ** wlasttoken = _wlasttoken(); -#else - PTHREADDATA ThreadData = GetThreadData(); - wchar_t ** wlasttoken = &ThreadData->wlasttoken; -#endif - - if (s == NULL && (s = *wlasttoken) == NULL) - return (NULL); - - /* - * Skip (span) leading ctiters (s += strspn(s, ct), sort of). - */ - cont: - c = *s; - s++; - for (spanp = ct; (sc = *spanp) != 0;spanp++) { - if (c == sc) - goto cont; - } - - if (c == 0) { /* no non-ctiter characters */ - *wlasttoken = NULL; - return (NULL); - } - tok = s - 1; - - /* - * Scan token (scan for ctiters: s += strcspn(s, ct), sort of). - * Note that ct must have one NUL; we stop if we see that, too. - */ - for (;;) { - c = *s; - s++; - spanp = ct; - do { - if ((sc = *spanp) == c) { - if (c == 0) - s = NULL; - else - s[-1] = 0; - *wlasttoken = s; - return (tok); - } - spanp++; - } while (sc != 0); - } - /* NOTREACHED */ -} diff --git a/reactos/lib/msvcrt/wstring/wcsupr.c b/reactos/lib/msvcrt/wstring/wcsupr.c deleted file mode 100644 index 4a5dd8ad198..00000000000 --- a/reactos/lib/msvcrt/wstring/wcsupr.c +++ /dev/null @@ -1,16 +0,0 @@ -#include -#include - -/* - * @implemented - */ -wchar_t *_wcsupr(wchar_t *x) -{ - wchar_t *y = x; - - while (*y) { - *y = towupper(*y); - y++; - } - return x; -} diff --git a/reactos/lib/msvcrt/wstring/wcsxfrm.c b/reactos/lib/msvcrt/wstring/wcsxfrm.c deleted file mode 100644 index 9e5cb52ac99..00000000000 --- a/reactos/lib/msvcrt/wstring/wcsxfrm.c +++ /dev/null @@ -1,26 +0,0 @@ -#include - -/* - * @implemented - */ -size_t wcsxfrm(wchar_t *dst,const wchar_t *src, size_t n) -{ - size_t r = 0; - int c; - - if (n != 0) { - while ((c = *src++) != 0) - { - r++; - if (--n == 0) - { - while (*src++ != 0) - r++; - break; - } - *dst++ = c; - } - *dst = 0; - } - return r; -} diff --git a/reactos/lib/msvcrt/wstring/wlasttok.c b/reactos/lib/msvcrt/wstring/wlasttok.c deleted file mode 100644 index fcc80c06d0e..00000000000 --- a/reactos/lib/msvcrt/wstring/wlasttok.c +++ /dev/null @@ -1,14 +0,0 @@ -#include -#include -/* - * This is an MSVCRT internal function to return the lasttoken - * bit of data used by wcstok. The reason for it's existence is - * so that CRTDLL can use the wcstok source code in the same - * file. - */ -wchar_t** _wlasttoken() -{ - PTHREADDATA ptd = GetThreadData(); - assert(ptd); - return &(ptd->wlasttoken); -} From 5379bfaa412b8cf9e7b2435b053ad03a8c7f81ca Mon Sep 17 00:00:00 2001 From: Gunnar Dalsnes Date: Thu, 27 Jan 2005 21:17:28 +0000 Subject: [PATCH 043/185] build msvcrt and crtdll from same source via lib\crt fix problem with scanf/printf reading/printing doubles svn path=/trunk/; revision=13341 --- reactos/lib/crtdll/crtdll.def | 86 +++--- reactos/lib/crtdll/dllmain.c | 296 +++++++++++++++++++++ reactos/lib/crtdll/makefile | 486 ++-------------------------------- 3 files changed, 357 insertions(+), 511 deletions(-) create mode 100644 reactos/lib/crtdll/dllmain.c diff --git a/reactos/lib/crtdll/crtdll.def b/reactos/lib/crtdll/crtdll.def index 785391ce8cc..22c89ef9969 100644 --- a/reactos/lib/crtdll/crtdll.def +++ b/reactos/lib/crtdll/crtdll.def @@ -35,16 +35,16 @@ ; __builtin_new ; __builtin_delete ; _set_new_handler__FPFUi_i -; +; I commented out these, cause i dont get why they were added. -Gunnar ; LIBRARY CRTDLL.DLL EXPORTS -__builtin_new -__builtin_delete -??2@YAPAXI@Z=malloc -??3@YAXPAX@Z=free -?_set_new_handler@@YAP6AHI@ZP6AHI@Z@Z=_set_new_handler__FPFUi_i -_set_new_handler__FPFUi_i +;__builtin_new +;__builtin_delete +??2@YAPAXI@Z=MSVCRT_operator_new +??3@YAXPAX@Z=MSVCRT_operator_delete +?_set_new_handler@@YAP6AHI@ZP6AHI@Z@Z=MSVCRT__set_new_handler +;_set_new_handler__FPFUi_i _CIacos _CIasin _CIatan @@ -61,31 +61,31 @@ _CIsinh _CIsqrt _CItan _CItanh -_HUGE_dll +_HUGE_dll=_HUGE DATA _XcptFilter __GetMainArgs -__argc_dll -__argv_dll +__argc_dll=__argc DATA +__argv_dll=__argv DATA __dllonexit __doserrno __fpecode __isascii __iscsym=NTDLL.__iscsym __iscsymf=NTDLL.__iscsymf -__mb_cur_max_dll +__mb_cur_max_dll=__mb_cur_max DATA __pxcptinfoptrs __threadhandle __threadid __toascii=NTDLL.__toascii _abnormal_termination _access -_acmdln_dll -_aexit_rtn_dll +_acmdln_dll=_acmdln DATA +_aexit_rtn_dll=_aexit_rtn DATA _amsg_exit _assert -_basemajor_dll -_baseminor_dll -_baseversion_dll +_basemajor_dll=CRTDLL__basemajor_dll DATA +_baseminor_dll=CRTDLL__baseminor_dll DATA +_baseversion_dll=CRTDLL__baseversion_dll DATA _beep _beginthread _c_exit @@ -100,23 +100,23 @@ _chsize _clearfp _close _commit -_commode_dll +_commode_dll=_commode DATA _control87 _controlfp _copysign _cprintf -_cpumode_dll +_cpumode_dll=_cpumode DATA ;fixme: wine has CRTDLL__cpumode_dll _cputs _creat _cscanf -_ctype +_ctype DATA _cwait -_daylight_dll +_daylight_dll=_daylight DATA _dup _dup2 _ecvt _endthread -_environ_dll +_environ_dll=_environ DATA _eof _errno _except_handler2 @@ -136,23 +136,23 @@ _fdopen _fgetchar _fgetwchar _filbuf -_fileinfo_dll +;_fileinfo_dll=_fileinfo DATA _filelength -_fileno +_fileno DATA _findclose _findfirst _findnext _finite _flsbuf _flushall -_fmode_dll +_fmode_dll=__fmode DATA _fpclass _fpieee_flt _fpreset _fputchar _fputwchar _fsopen -_fstat +_fstat=CRTDLL__fstat _ftime _ftol=NTDLL._ftol _fullpath @@ -177,7 +177,7 @@ _heapset _heapwalk _hypot _initterm -_iob +_iob DATA _isatty _isctype _ismbbalnum @@ -236,7 +236,7 @@ _mbctokata _mbctolower _mbctombb _mbctoupper -_mbctype +_mbctype DATA _mbsbtype _mbscat _mbschr @@ -282,21 +282,21 @@ _nextafter _onexit _open _open_osfhandle -_osmajor_dll -_osminor_dll -_osmode_dll -_osver_dll -_osversion_dll +_osmajor_dll=CRTDLL__osmajor_dll DATA +_osminor_dll=CRTDLL__osminor_dll DATA +_osmode_dll=CRTDLL__osmode_dll DATA +_osver_dll=_osver DATA +_osversion_dll=CRTDLL__osversion_dll DATA _pclose -_pctype_dll -_pgmptr_dll +_pctype_dll=_pctype DATA +_pgmptr_dll=_pgmptr DATA _pipe _popen _purecall _putch _putenv _putw -_pwctype_dll +_pwctype_dll=_pwctype DATA _read _rmdir _rmtmp @@ -321,7 +321,7 @@ _spawnve _spawnvp _spawnvpe _splitpath -_stat +_stat=CRTDLL__stat _statusfp _strcmpi=NTDLL._strcmpi _strdate @@ -343,14 +343,14 @@ _strspnp _strtime _strupr=NTDLL._strupr _swab -_sys_errlist -_sys_nerr_dll +_sys_errlist DATA +_sys_nerr_dll=_sys_nerr DATA _tell _tempnam -_timezone_dll +_timezone_dll=_timezone _tolower=NTDLL._tolower _toupper=NTDLL._toupper -_tzname +_tzname DATA _tzset _ultoa=NTDLL._ultoa _ultow=NTDLL._ultow @@ -370,9 +370,9 @@ _wcsnset _wcsrev _wcsset _wcsupr -_winmajor_dll -_winminor_dll -_winver_dll +_winmajor_dll=_winmajor DATA +_winminor_dll=_winminor DATA +_winver_dll=_winver DATA _write _wtoi=NTDLL._wtoi _wtol=NTDLL._wtol diff --git a/reactos/lib/crtdll/dllmain.c b/reactos/lib/crtdll/dllmain.c new file mode 100644 index 00000000000..3607c4b9fb1 --- /dev/null +++ b/reactos/lib/crtdll/dllmain.c @@ -0,0 +1,296 @@ +/* $Id: dllmain.c 12852 2005-01-06 13:58:04Z mf $ + * + * dllmain.c + * + * ReactOS MSVCRT.DLL Compatibility Library + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRENTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAMED. This includes but is not limited to warrenties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * $Revision: 1.24 $ + * $Author: mf $ + * $Date: 2005-01-06 14:58:04 +0100 (Thu, 06 Jan 2005) $ + * + */ + +#include "precomp.h" +#include +#include +#include +#include + +#define NDEBUG +#include + + +/* EXTERNAL PROTOTYPES ********************************************************/ + +//void __fileno_init(void); +extern BOOL __fileno_init(void); +extern int BlockEnvToEnvironA(void); +extern int BlockEnvToEnvironW(void); +extern void FreeEnvironment(char **environment); + +extern unsigned int _osver; +extern unsigned int _winminor; +extern unsigned int _winmajor; +extern unsigned int _winver; + +unsigned int CRTDLL__basemajor_dll; +unsigned int CRTDLL__baseminor_dll; +unsigned int CRTDLL__baseversion_dll; +unsigned int CRTDLL__cpumode_dll; +unsigned int CRTDLL__osmajor_dll; +unsigned int CRTDLL__osminor_dll; +unsigned int CRTDLL__osmode_dll; +unsigned int CRTDLL__osversion_dll; + +extern char* _acmdln; /* pointer to ascii command line */ +extern wchar_t* _wcmdln; /* pointer to wide character command line */ +#undef _environ +extern char** _environ; /* pointer to environment block */ +extern char** __initenv; /* pointer to initial environment block */ +extern wchar_t** _wenviron; /* pointer to environment block */ +extern wchar_t** __winitenv; /* pointer to initial environment block */ + + + +/* dev_t is a short in crtdll but an unsigned int in msvcrt */ +typedef short crtdll_dev_t; + +struct crtdll_stat +{ + crtdll_dev_t st_dev; + _ino_t st_ino; + unsigned short st_mode; + short st_nlink; + short st_uid; + short st_gid; + crtdll_dev_t st_rdev; + _off_t st_size; + time_t st_atime; + time_t st_mtime; + time_t st_ctime; +}; + +/* convert struct _stat from crtdll format to msvcrt format */ +static void convert_struct_stat( struct crtdll_stat *dst, const struct _stat *src ) +{ + dst->st_dev = src->st_dev; + dst->st_ino = src->st_ino; + dst->st_mode = src->st_mode; + dst->st_nlink = src->st_nlink; + dst->st_uid = src->st_uid; + dst->st_gid = src->st_gid; + dst->st_rdev = src->st_rdev; + dst->st_size = src->st_size; + dst->st_atime = src->st_atime; + dst->st_mtime = src->st_mtime; + dst->st_ctime = src->st_ctime; +} + +/* from msvcrt */ +extern void __getmainargs( int *argc, char ***argv, char ***envp, + int expand_wildcards, int *new_mode ); + +/* LIBRARY GLOBAL VARIABLES ***************************************************/ + +HANDLE hHeap = NULL; /* handle for heap */ + + +/* LIBRARY ENTRY POINT ********************************************************/ + +BOOL +STDCALL +DllMain(PVOID hinstDll, ULONG dwReason, PVOID reserved) +{ + switch (dwReason) + { + case DLL_PROCESS_ATTACH://1 + /* initialize version info */ + DPRINT("Attach %d\n", nAttachCount); + + _osver = GetVersion(); + + CRTDLL__basemajor_dll = (_osver >> 24) & 0xFF; + CRTDLL__baseminor_dll = (_osver >> 16) & 0xFF; + CRTDLL__baseversion_dll = (_osver >> 16); + CRTDLL__cpumode_dll = 1; /* FIXME */ + CRTDLL__osmajor_dll = (_osver >>8) & 0xFF; + CRTDLL__osminor_dll = (_osver & 0xFF); + CRTDLL__osmode_dll = 1; /* FIXME */ + CRTDLL__osversion_dll = (_osver & 0xFFFF); + + _winmajor = (_osver >> 8) & 0xFF; + _winminor = _osver & 0xFF; + _winver = (_winmajor << 8) + _winminor; + _osver = (_osver >> 16) & 0xFFFF; + hHeap = HeapCreate(0, 100000, 0); + if (hHeap == NULL) + return FALSE; + if (!__fileno_init()) + return FALSE; + + /* create tls stuff */ + if (!CreateThreadData()) + return FALSE; + + if (BlockEnvToEnvironA() < 0) + return FALSE; + + if (BlockEnvToEnvironW() < 0) + { + FreeEnvironment((char**)_wenviron); + return FALSE; + } + + _acmdln = _strdup(GetCommandLineA()); + _wcmdln = _wcsdup(GetCommandLineW()); + + /* FIXME: more initializations... */ + + /* FIXME: Initialization of the WINE code */ + msvcrt_init_mt_locks(); + + DPRINT("Attach done\n"); + break; + + case DLL_THREAD_ATTACH://2 + break; + + case DLL_THREAD_DETACH://4 + FreeThreadData(NULL); + break; + + case DLL_PROCESS_DETACH://0 + DPRINT("Detach %d\n", nAttachCount); + /* FIXME: more cleanup... */ + _fcloseall(); + + /* destroy tls stuff */ + DestroyThreadData(); + + if (__winitenv && __winitenv != _wenviron) + FreeEnvironment((char**)__winitenv); + if (_wenviron) + FreeEnvironment((char**)_wenviron); + + if (__initenv && __initenv != _environ) + FreeEnvironment(__initenv); + if (_environ) + FreeEnvironment(_environ); + + /* destroy heap */ + HeapDestroy(hHeap); + + DPRINT("Detach done\n"); + break; + } + + return TRUE; +} + + + + +/********************************************************************* + * __GetMainArgs (CRTDLL.@) + */ +void __GetMainArgs( int *argc, char ***argv, char ***envp, int expand_wildcards ) +{ + int new_mode = 0; + __getmainargs( argc, argv, envp, expand_wildcards, &new_mode ); +} + + +/********************************************************************* + * _fstat (CRTDLL.@) + */ +int CRTDLL__fstat(int fd, struct crtdll_stat* buf) +{ + extern int _fstat(int,struct _stat*); + struct _stat st; + int ret; + + if (!(ret = _fstat( fd, &st ))) convert_struct_stat( buf, &st ); + return ret; +} + + +/********************************************************************* + * _stat (CRTDLL.@) + */ +int CRTDLL__stat(const char* path, struct crtdll_stat * buf) +{ + extern int _stat(const char*,struct _stat*); + struct _stat st; + int ret; + + if (!(ret = _stat( path, &st ))) convert_struct_stat( buf, &st ); + return ret; +} + + +/********************************************************************* + * _strdec (CRTDLL.@) + */ +char *_strdec(const char *str1, const char *str2) +{ + return (char *)(str2 - 1); +} + + +/********************************************************************* + * _strinc (CRTDLL.@) + */ +char *_strinc(const char *str) +{ + return (char *)(str + 1); +} + + +/********************************************************************* + * _strncnt (CRTDLL.@) + */ +size_t _strncnt(const char *str, size_t maxlen) +{ + size_t len = strlen(str); + return (len > maxlen) ? maxlen : len; +} + + +/********************************************************************* + * _strnextc (CRTDLL.@) + */ +unsigned int _strnextc(const char *str) +{ + return (unsigned int)str[0]; +} + + +/********************************************************************* + * _strninc (CRTDLL.@) + */ +char *_strninc(const char *str, size_t len) +{ + return (char *)(str + len); +} + + +/********************************************************************* + * _strspnp (CRTDLL.@) + */ +char *_strspnp( const char *str1, const char *str2) +{ + str1 += strspn( str1, str2 ); + return *str1 ? (char*)str1 : NULL; +} + +/* EOF */ diff --git a/reactos/lib/crtdll/makefile b/reactos/lib/crtdll/makefile index da7fd6874cb..ef83d41b95b 100644 --- a/reactos/lib/crtdll/makefile +++ b/reactos/lib/crtdll/makefile @@ -2,7 +2,7 @@ PATH_TO_TOP = ../.. -PATH_TO_MSVCRT = ../msvcrt +TARGET_DEFONLY = yes TARGET_TYPE = dynlink @@ -15,489 +15,39 @@ TARGET_BASE = $(TARGET_BASE_LIB_CRTDLL) # don't remove @nn from exported symbols - needed so dlltool doesn't mess up mangled c++ exports RM_AT_FROM_SYMBOLS = no -TARGET_LFLAGS = -nostartfiles -nostdlib +TARGET_LFLAGS = -nostartfiles -nostdlib --enable-stdcall-fixup -TARGET_CFLAGS = -D_MSVCRT_LIB_ -Werror -Wall - -# require os code to explicitly request A/W version of structs/functions -TARGET_CFLAGS += -D_DISABLE_TIDENTS - -TARGET_SDKLIBS = string.a kernel32.a ntdll.a +TARGET_SDKLIBS = crt.a string.a kernel32.a ntdll.a wine.a TARGET_GCCLIBS = gcc +TARGET_CFLAGS = -D__USE_W32API -Wall -Werror + +# require os code to explicitly request A/W version of structs/functions +TARGET_CFLAGS += \ + -D_DISABLE_TIDENTS \ + -D__USE_W32API \ + -D__REACTOS__ \ + -D_WIN32_IE=0x600 \ + -D_WIN32_WINNT=0x501 \ + -DUSE_MSVCRT_PREFIX \ + -D_MT + TARGET_OBJECTS = $(TARGET_NAME).o -TARGET_CLEAN = \ - conio/*.o \ - ctype/*.o \ - direct/*.o \ - dirent/*.o \ - except/*.o \ - float/*.o \ - io/*.o \ - libc/*.o \ - malloc/*.o \ - math/*.o \ - mbstring/*.o \ - misc/*.o \ - process/*.o \ - quad/*.o \ - search/*.o \ - setjmp/*.o \ - signal/*.o \ - stdio/*.o \ - stdlib/*.o \ - string/*.o \ - sys_stat/*.o \ - tchar/*.o \ - time/*.o \ - wchar/*.o - +TARGET_CLEAN = dllmain.o include $(PATH_TO_TOP)/rules.mak include $(TOOLS_PATH)/helper.mk -CONIO_OBJECTS = \ - $(PATH_TO_MSVCRT)/conio/cgets.o \ - $(PATH_TO_MSVCRT)/conio/cprintf.o \ - $(PATH_TO_MSVCRT)/conio/cputs.o \ - $(PATH_TO_MSVCRT)/conio/cscanf.o \ - $(PATH_TO_MSVCRT)/conio/getch.o \ - $(PATH_TO_MSVCRT)/conio/getche.o \ - $(PATH_TO_MSVCRT)/conio/kbhit.o \ - $(PATH_TO_MSVCRT)/conio/putch.o \ - $(PATH_TO_MSVCRT)/conio/ungetch.o - -CTYPE_OBJECTS = \ - $(PATH_TO_MSVCRT)/ctype/ctype.o \ - $(PATH_TO_MSVCRT)/ctype/isalnum.o \ - $(PATH_TO_MSVCRT)/ctype/isascii.o \ - $(PATH_TO_MSVCRT)/ctype/iscntrl.o \ - ctype/isctype.o \ - $(PATH_TO_MSVCRT)/ctype/isgraph.o \ - $(PATH_TO_MSVCRT)/ctype/isprint.o \ - $(PATH_TO_MSVCRT)/ctype/ispunct.o \ - $(PATH_TO_MSVCRT)/ctype/isupper.o - -# REMOVED CTYPE ENTRIES: -# $(PATH_TO_MSVCRT)/ctype/isalpha.o \ -# $(PATH_TO_MSVCRT)/ctype/iscsym.o \ -# $(PATH_TO_MSVCRT)/ctype/isdigit.o \ -# $(PATH_TO_MSVCRT)/ctype/islower.o \ -# $(PATH_TO_MSVCRT)/ctype/isspace.o \ -# $(PATH_TO_MSVCRT)/ctype/isxdigit.o \ -# $(PATH_TO_MSVCRT)/ctype/toascii.o \ -# $(PATH_TO_MSVCRT)/ctype/tolower.o \ -# $(PATH_TO_MSVCRT)/ctype/toupper.o \ - -DIRECT_OBJECTS = \ - $(PATH_TO_MSVCRT)/direct/chdir.o \ - $(PATH_TO_MSVCRT)/direct/chdrive.o \ - $(PATH_TO_MSVCRT)/direct/getcwd.o \ - $(PATH_TO_MSVCRT)/direct/getdcwd.o \ - $(PATH_TO_MSVCRT)/direct/getdfree.o \ - $(PATH_TO_MSVCRT)/direct/getdrive.o \ - $(PATH_TO_MSVCRT)/direct/mkdir.o \ - $(PATH_TO_MSVCRT)/direct/rmdir.o - -EXCEPT_OBJECTS = \ - except/abnorter.o \ - except/exhand2.o \ - except/matherr.o \ - except/unwind.o - -FLOAT_OBJECTS = \ - $(PATH_TO_MSVCRT)/float/chgsign.o \ - $(PATH_TO_MSVCRT)/float/clearfp.o \ - $(PATH_TO_MSVCRT)/float/cntrlfp.o \ - $(PATH_TO_MSVCRT)/float/copysign.o \ - $(PATH_TO_MSVCRT)/float/fpclass.o \ - $(PATH_TO_MSVCRT)/float/fpreset.o \ - $(PATH_TO_MSVCRT)/float/isnan.o \ - $(PATH_TO_MSVCRT)/float/logb.o \ - $(PATH_TO_MSVCRT)/float/nafter.o \ - $(PATH_TO_MSVCRT)/float/scalb.o \ - $(PATH_TO_MSVCRT)/float/statfp.o - -IO_OBJECTS = \ - $(PATH_TO_MSVCRT)/io/access.o \ - $(PATH_TO_MSVCRT)/io/chmod.o \ - $(PATH_TO_MSVCRT)/io/chsize.o \ - $(PATH_TO_MSVCRT)/io/close.o \ - $(PATH_TO_MSVCRT)/io/commit.o \ - io/create.o \ - io/dup.o \ - $(PATH_TO_MSVCRT)/io/dup2.o \ - io/eof.o \ - $(PATH_TO_MSVCRT)/io/filelen.o \ - io/find.o \ - io/fmode.o \ - $(PATH_TO_MSVCRT)/io/isatty.o \ - $(PATH_TO_MSVCRT)/io/locking.o \ - io/lseek.o \ - $(PATH_TO_MSVCRT)/io/mktemp.o \ - io/open.o \ - io/pipe.o \ - io/read.o \ - $(PATH_TO_MSVCRT)/io/setmode.o \ - $(PATH_TO_MSVCRT)/io/sopen.o \ - $(PATH_TO_MSVCRT)/io/tell.o \ - $(PATH_TO_MSVCRT)/io/umask.o \ - io/unlink.o \ - $(PATH_TO_MSVCRT)/io/utime.o \ - io/write.o - -LOCALE_OBJECTS = \ - $(PATH_TO_MSVCRT)/locale/locale.o - -MATH_OBJECTS = \ - $(PATH_TO_MSVCRT)/math/acos.o \ - math/acosh.o \ - $(PATH_TO_MSVCRT)/math/asin.o \ - math/asinh.o \ - $(PATH_TO_MSVCRT)/math/atan.o \ - $(PATH_TO_MSVCRT)/math/atan2.o\ - math/atanh.o \ - $(PATH_TO_MSVCRT)/math/cabs.o \ - math/ceil.o \ - $(PATH_TO_MSVCRT)/math/cos.o \ - $(PATH_TO_MSVCRT)/math/cosh.o \ - $(PATH_TO_MSVCRT)/math/exp.o \ - $(PATH_TO_MSVCRT)/math/fabs.o\ - math/floor.o \ - $(PATH_TO_MSVCRT)/math/fmod.o \ - $(PATH_TO_MSVCRT)/math/frexp.o \ - math/huge_val.o \ - $(PATH_TO_MSVCRT)/math/hypot.o \ - $(PATH_TO_MSVCRT)/math/j0_y0.o \ - $(PATH_TO_MSVCRT)/math/j1_y1.o \ - $(PATH_TO_MSVCRT)/math/jn_yn.o \ - $(PATH_TO_MSVCRT)/math/ldexp.o \ - $(PATH_TO_MSVCRT)/math/log.o \ - $(PATH_TO_MSVCRT)/math/log10.o \ - $(PATH_TO_MSVCRT)/math/modf.o \ - $(PATH_TO_MSVCRT)/math/pow.o \ - $(PATH_TO_MSVCRT)/math/sin.o \ - $(PATH_TO_MSVCRT)/math/sinh.o \ - $(PATH_TO_MSVCRT)/math/sqrt.o \ - $(PATH_TO_MSVCRT)/math/stubs.o \ - $(PATH_TO_MSVCRT)/math/tan.o \ - $(PATH_TO_MSVCRT)/math/tanh.o - -MALLOC_OBJECTS = \ - malloc/expand.o \ - malloc/heap.o - -MBSTRING_OBJECTS = \ - $(PATH_TO_MSVCRT)/mbstring/hanzen.o \ - $(PATH_TO_MSVCRT)/mbstring/ischira.o \ - $(PATH_TO_MSVCRT)/mbstring/iskana.o \ - $(PATH_TO_MSVCRT)/mbstring/iskpun.o \ - $(PATH_TO_MSVCRT)/mbstring/islead.o \ - $(PATH_TO_MSVCRT)/mbstring/islwr.o \ - $(PATH_TO_MSVCRT)/mbstring/iskmoji.o \ - $(PATH_TO_MSVCRT)/mbstring/ismbal.o \ - $(PATH_TO_MSVCRT)/mbstring/ismbaln.o \ - $(PATH_TO_MSVCRT)/mbstring/ismbc.o \ - $(PATH_TO_MSVCRT)/mbstring/ismbgra.o \ - $(PATH_TO_MSVCRT)/mbstring/ismbkaln.o \ - $(PATH_TO_MSVCRT)/mbstring/ismblead.o \ - $(PATH_TO_MSVCRT)/mbstring/ismbpri.o \ - $(PATH_TO_MSVCRT)/mbstring/ismbpun.o \ - $(PATH_TO_MSVCRT)/mbstring/ismbtrl.o \ - $(PATH_TO_MSVCRT)/mbstring/isuppr.o \ - $(PATH_TO_MSVCRT)/mbstring/jistojms.o \ - $(PATH_TO_MSVCRT)/mbstring/jmstojis.o \ - $(PATH_TO_MSVCRT)/mbstring/mbbtype.o \ - $(PATH_TO_MSVCRT)/mbstring/mbccpy.o \ - $(PATH_TO_MSVCRT)/mbstring/mbclen.o \ - $(PATH_TO_MSVCRT)/mbstring/mbscat.o \ - $(PATH_TO_MSVCRT)/mbstring/mbschr.o \ - $(PATH_TO_MSVCRT)/mbstring/mbscmp.o \ - $(PATH_TO_MSVCRT)/mbstring/mbscoll.o \ - $(PATH_TO_MSVCRT)/mbstring/mbscpy.o \ - $(PATH_TO_MSVCRT)/mbstring/mbscspn.o \ - $(PATH_TO_MSVCRT)/mbstring/mbsdec.o \ - $(PATH_TO_MSVCRT)/mbstring/mbsdup.o \ - $(PATH_TO_MSVCRT)/mbstring/mbsicmp.o \ - $(PATH_TO_MSVCRT)/mbstring/mbsicoll.o \ - $(PATH_TO_MSVCRT)/mbstring/mbsinc.o \ - $(PATH_TO_MSVCRT)/mbstring/mbslen.o \ - $(PATH_TO_MSVCRT)/mbstring/mbslwr.o \ - $(PATH_TO_MSVCRT)/mbstring/mbsncat.o \ - $(PATH_TO_MSVCRT)/mbstring/mbsnccnt.o \ - $(PATH_TO_MSVCRT)/mbstring/mbsncmp.o \ - $(PATH_TO_MSVCRT)/mbstring/mbsncoll.o \ - $(PATH_TO_MSVCRT)/mbstring/mbsncpy.o \ - $(PATH_TO_MSVCRT)/mbstring/mbsnextc.o \ - $(PATH_TO_MSVCRT)/mbstring/mbsnicmp.o \ - $(PATH_TO_MSVCRT)/mbstring/mbsnicoll.o \ - $(PATH_TO_MSVCRT)/mbstring/mbsninc.o \ - $(PATH_TO_MSVCRT)/mbstring/mbsnset.o \ - $(PATH_TO_MSVCRT)/mbstring/mbspbrk.o \ - $(PATH_TO_MSVCRT)/mbstring/mbsrchr.o \ - $(PATH_TO_MSVCRT)/mbstring/mbsrev.o \ - $(PATH_TO_MSVCRT)/mbstring/mbsset.o \ - $(PATH_TO_MSVCRT)/mbstring/mbsspn.o \ - $(PATH_TO_MSVCRT)/mbstring/mbsspnp.o \ - $(PATH_TO_MSVCRT)/mbstring/mbsstr.o \ - $(PATH_TO_MSVCRT)/mbstring/mbstok.o \ - $(PATH_TO_MSVCRT)/mbstring/mbstrlen.o \ - $(PATH_TO_MSVCRT)/mbstring/mbsupr.o - -MISC_OBJECTS = \ - misc/amsg.o \ - $(PATH_TO_MSVCRT)/misc/assert.o \ - misc/debug.o \ - misc/dllmain.o \ - misc/GetArgs.o \ - $(PATH_TO_MSVCRT)/misc/initterm.o \ - misc/purecall.o \ - misc/setnew.o - -PROCESS_OBJECTS = \ - process/_cwait.o \ - process/_system.o\ - $(PATH_TO_MSVCRT)/process/dll.o \ - process/spawnl.o \ - process/spawnlp.o \ - process/spawnlpe.o \ - process/spawnvp.o \ - process/spawnv.o \ - process/spawnve.o \ - process/spawnle.o \ - process/execl.o \ - process/execlp.o \ - process/execlpe.o \ - process/execvpe.o \ - process/execvp.o \ - process/execv.o \ - process/execle.o \ - process/execve.o \ - $(PATH_TO_MSVCRT)/process/procid.o \ - process/thread.o \ - $(PATH_TO_MSVCRT)/process/threadid.o - -QUAD_OBJECTS = \ - quad/qdivrem.o \ - quad/divdi3.o \ - quad/moddi3.o \ - quad/udivdi3.o \ - quad/umoddi3.o - -SEARCH_OBJECTS = \ - $(PATH_TO_MSVCRT)/search/lfind.o \ - $(PATH_TO_MSVCRT)/search/lsearch.o - -SETJMP_OBJECTS = \ - $(PATH_TO_MSVCRT)/setjmp/i386/setjmp.o - -SIGNAL_OBJECTS = \ - signal/xcptfil.o \ - signal/xcptinfo.o \ - $(PATH_TO_MSVCRT)/signal/signal.o - -STDIO_OBJECTS = \ - $(PATH_TO_MSVCRT)/stdio/allocfil.o \ - stdio/getenv.o \ - $(PATH_TO_MSVCRT)/stdio/clearerr.o \ - $(PATH_TO_MSVCRT)/stdio/fclose.o \ - $(PATH_TO_MSVCRT)/stdio/fdopen.o \ - $(PATH_TO_MSVCRT)/stdio/feof.o \ - stdio/ferror.o \ - stdio/fflush.o \ - $(PATH_TO_MSVCRT)/stdio/fgetc.o \ - stdio/fgetchar.o \ - $(PATH_TO_MSVCRT)/stdio/fgetpos.o \ - stdio/fgets.o \ - stdio/filbuf.o \ - stdio/fileno.o \ - $(PATH_TO_MSVCRT)/stdio/flsbuf.o \ - stdio/fopen.o \ - $(PATH_TO_MSVCRT)/stdio/fprintf.o \ - $(PATH_TO_MSVCRT)/stdio/fputc.o \ - stdio/fputchar.o\ - stdio/fputs.o \ - stdio/fread.o \ - stdio/freopen.o \ - stdio/fscanf.o \ - $(PATH_TO_MSVCRT)/stdio/fseek.o \ - $(PATH_TO_MSVCRT)/stdio/fsetpos.o \ - stdio/frlist.o \ - stdio/fsopen.o \ - stdio/ftell.o \ - $(PATH_TO_MSVCRT)/stdio/fwalk.o \ - stdio/fwrite.o \ - stdio/getc.o \ - stdio/getchar.o \ - stdio/gets.o \ - $(PATH_TO_MSVCRT)/stdio/getw.o \ - stdio/perror.o \ - stdio/popen.o \ - stdio/printf.o \ - stdio/putc.o \ - stdio/putchar.o \ - stdio/puts.o \ - $(PATH_TO_MSVCRT)/stdio/putw.o \ - stdio/remove.o \ - $(PATH_TO_MSVCRT)/stdio/rename.o \ - $(PATH_TO_MSVCRT)/stdio/rewind.o \ - $(PATH_TO_MSVCRT)/stdio/rmtmp.o \ - $(PATH_TO_MSVCRT)/stdio/scanf.o \ - $(PATH_TO_MSVCRT)/stdio/setbuf.o \ - stdio/setbuffe.o \ - stdio/setlineb.o \ - $(PATH_TO_MSVCRT)/stdio/setvbuf.o \ - $(PATH_TO_MSVCRT)/stdio/sprintf.o \ - $(PATH_TO_MSVCRT)/stdio/sscanf.o \ - $(PATH_TO_MSVCRT)/stdio/stdhnd.o \ - stdio/stdiohk.o \ - $(PATH_TO_MSVCRT)/stdio/tempnam.o \ - $(PATH_TO_MSVCRT)/stdio/tmpfile.o \ - $(PATH_TO_MSVCRT)/stdio/tmpnam.o \ - $(PATH_TO_MSVCRT)/stdio/ungetc.o \ - $(PATH_TO_MSVCRT)/stdio/vfprintf.o \ - $(PATH_TO_MSVCRT)/stdio/vfscanf.o \ - $(PATH_TO_MSVCRT)/stdio/vfwprint.o \ - $(PATH_TO_MSVCRT)/stdio/vprintf.o \ - $(PATH_TO_MSVCRT)/stdio/vscanf.o \ - $(PATH_TO_MSVCRT)/stdio/vsprintf.o \ - $(PATH_TO_MSVCRT)/stdio/vsscanf.o - -STDLIB_OBJECTS = \ - $(PATH_TO_MSVCRT)/stdlib/_exit.o \ - $(PATH_TO_MSVCRT)/stdlib/abort.o \ - $(PATH_TO_MSVCRT)/stdlib/abs.o \ - $(PATH_TO_MSVCRT)/stdlib/atexit.o \ - $(PATH_TO_MSVCRT)/stdlib/atof.o \ - $(PATH_TO_MSVCRT)/stdlib/atoi.o \ - $(PATH_TO_MSVCRT)/stdlib/atol.o \ - $(PATH_TO_MSVCRT)/stdlib/bsearch.o \ - $(PATH_TO_MSVCRT)/stdlib/div.o \ - $(PATH_TO_MSVCRT)/stdlib/ecvt.o \ - $(PATH_TO_MSVCRT)/stdlib/ecvtbuf.o \ - stdlib/errno.o \ - $(PATH_TO_MSVCRT)/stdlib/fcvt.o \ - $(PATH_TO_MSVCRT)/stdlib/fcvtbuf.o \ - stdlib/fullpath.o \ - $(PATH_TO_MSVCRT)/stdlib/gcvt.o \ - $(PATH_TO_MSVCRT)/stdlib/itoa.o \ - stdlib/itow.o \ - $(PATH_TO_MSVCRT)/stdlib/labs.o \ - $(PATH_TO_MSVCRT)/stdlib/ldiv.o \ - $(PATH_TO_MSVCRT)/stdlib/makepath.o \ - stdlib/malloc.o \ - stdlib/mbstowcs.o \ - $(PATH_TO_MSVCRT)/stdlib/obsol.o \ - stdlib/putenv.o \ - stdlib/qsort.o \ - stdlib/rand.o \ - $(PATH_TO_MSVCRT)/stdlib/rot.o \ - $(PATH_TO_MSVCRT)/stdlib/senv.o \ - $(PATH_TO_MSVCRT)/stdlib/splitp.o \ - $(PATH_TO_MSVCRT)/stdlib/strtod.o \ - $(PATH_TO_MSVCRT)/stdlib/strtol.o \ - $(PATH_TO_MSVCRT)/stdlib/strtoul.o \ - $(PATH_TO_MSVCRT)/stdlib/swab.o \ - $(PATH_TO_MSVCRT)/stdlib/wcstod.o \ - stdlib/wcstomb.o - -STRING_OBJECTS = \ - string/lasttok.o \ - $(PATH_TO_MSVCRT)/string/strcoll.o \ - $(PATH_TO_MSVCRT)/string/strdup.o \ - string/strerror.o \ - $(PATH_TO_MSVCRT)/string/strrev.o \ - $(PATH_TO_MSVCRT)/string/strset.o \ - $(PATH_TO_MSVCRT)/string/strtok.o \ - $(PATH_TO_MSVCRT)/string/strxfrm.o - -# string/str_old.o \ -# $(PATH_TO_MSVCRT)/string/memicmp.o \ -# $(PATH_TO_MSVCRT)/string/stricmp.o \ -# $(PATH_TO_MSVCRT)/string/strlwr.o \ -# $(PATH_TO_MSVCRT)/string/strnicmp.o \ -# $(PATH_TO_MSVCRT)/string/strpbrk.o \ -# $(PATH_TO_MSVCRT)/string/strstr.o \ -# $(PATH_TO_MSVCRT)/string/strupr.o \ - -SYS_STAT_OBJECTS = \ - sys_stat/fstat.o \ - $(PATH_TO_MSVCRT)/sys_stat/futime.o \ - sys_stat/ftime.o \ - sys_stat/systime.o \ - sys_stat/stat.o - -TCHAR_OBJECTS = \ - tchar/strdec.o \ - tchar/strinc.o \ - tchar/strninc.o \ - tchar/strncnt.o \ - tchar/strnextc.o \ - tchar/strspnp.o - -TIME_OBJECTS = \ - $(PATH_TO_MSVCRT)/time/time.o \ - $(PATH_TO_MSVCRT)/time/clock.o \ - $(PATH_TO_MSVCRT)/time/ctime.o \ - $(PATH_TO_MSVCRT)/time/difftime.o \ - $(PATH_TO_MSVCRT)/time/strdate.o \ - $(PATH_TO_MSVCRT)/time/strftime.o \ - $(PATH_TO_MSVCRT)/time/strtime.o \ - time/tz_vars.o - -WSTRING_OBJECTS = \ - wchar/wlasttok.o \ - wchar/wcscoll.o \ - $(PATH_TO_MSVCRT)/wstring/wcsdup.o \ - $(PATH_TO_MSVCRT)/wstring/wcsrev.o \ - $(PATH_TO_MSVCRT)/wstring/wcsset.o \ - $(PATH_TO_MSVCRT)/wstring/wcstok.o \ - $(PATH_TO_MSVCRT)/wstring/wcsxfrm.o - -# wchar/wcstod.o \ -# wchar/wcstok.o \ -# wchar/wcstol.o \ -# wchar/wtoi.o \ -# $(PATH_TO_MSVCRT)/wstring/wcscspn.o \ -# $(PATH_TO_MSVCRT)/wstring/wcsicmp.o \ -# $(PATH_TO_MSVCRT)/wstring/wcslwr.o \ -# $(PATH_TO_MSVCRT)/wstring/wcspbrk.o \ -# $(PATH_TO_MSVCRT)/wstring/wcsspn.o \ -# $(PATH_TO_MSVCRT)/wstring/wcsstr.o \ -# $(PATH_TO_MSVCRT)/wstring/wcsupr.o \ -# wchar/wcstombs.o \ -# $(PATH_TO_MSVCRT)/wstring/wcsnicmp.o -OBJECTS = \ - $(CONIO_OBJECTS) \ - $(CTYPE_OBJECTS) \ - $(DIRECT_OBJECTS) \ - $(EXCEPT_OBJECTS) \ - $(FLOAT_OBJECTS) \ - $(IO_OBJECTS) \ - $(LOCALE_OBJECTS) \ - $(MALLOC_OBJECTS) \ - $(MATH_OBJECTS) \ - $(MBSTRING_OBJECTS)\ - $(MISC_OBJECTS) \ - $(PROCESS_OBJECTS) \ - $(SEARCH_OBJECTS) \ - $(SETJMP_OBJECTS) \ - $(SIGNAL_OBJECTS) \ - $(STDIO_OBJECTS) \ - $(STDLIB_OBJECTS) \ - $(STRING_OBJECTS) \ - $(SYS_STAT_OBJECTS) \ - $(TCHAR_OBJECTS) \ - $(TIME_OBJECTS) \ - $(WSTRING_OBJECTS) +OBJECTS = dllmain.o $(TARGET_NAME).o: $(OBJECTS) $(LD) -r $(OBJECTS) -o $(TARGET_NAME).o + # EOF From b6a8b98ef03763a226809f989da68bc1fad3f393 Mon Sep 17 00:00:00 2001 From: Gunnar Dalsnes Date: Thu, 27 Jan 2005 21:18:04 +0000 Subject: [PATCH 044/185] build msvcrt and crtdll from same source via lib\crt fix problem with scanf/printf reading/printing doubles svn path=/trunk/; revision=13342 --- reactos/lib/crt/README.txt | 13 + reactos/lib/crt/conio/cgets.c | 74 ++ reactos/lib/crt/conio/cprintf.c | 28 + reactos/lib/crt/conio/cputs.c | 28 + reactos/lib/crt/conio/cscanf.c | 29 + reactos/lib/crt/conio/getch.c | 54 + reactos/lib/crt/conio/getche.c | 31 + reactos/lib/crt/conio/kbhit.c | 33 + reactos/lib/crt/conio/putch.c | 25 + reactos/lib/crt/conio/ungetch.c | 32 + reactos/lib/crt/ctype/ctype.c | 271 +++++ reactos/lib/crt/ctype/isalnum.c | 29 + reactos/lib/crt/ctype/isalpha.c | 31 + reactos/lib/crt/ctype/isascii.c | 27 + reactos/lib/crt/ctype/iscntrl.c | 27 + reactos/lib/crt/ctype/iscsym.c | 27 + reactos/lib/crt/ctype/isctype.c | 60 ++ reactos/lib/crt/ctype/isdigit.c | 28 + reactos/lib/crt/ctype/isgraph.c | 27 + reactos/lib/crt/ctype/islower.c | 27 + reactos/lib/crt/ctype/isprint.c | 26 + reactos/lib/crt/ctype/ispunct.c | 27 + reactos/lib/crt/ctype/isspace.c | 30 + reactos/lib/crt/ctype/isupper.c | 26 + reactos/lib/crt/ctype/isxdigit.c | 28 + reactos/lib/crt/ctype/toascii.c | 17 + reactos/lib/crt/ctype/tolower.c | 51 + reactos/lib/crt/ctype/toupper.c | 47 + reactos/lib/crt/direct/chdir.c | 16 + reactos/lib/crt/direct/chdrive.c | 34 + reactos/lib/crt/direct/getcwd.c | 31 + reactos/lib/crt/direct/getdcwd.c | 27 + reactos/lib/crt/direct/getdfree.c | 23 + reactos/lib/crt/direct/getdrive.c | 30 + reactos/lib/crt/direct/mkdir.c | 16 + reactos/lib/crt/direct/rmdir.c | 16 + reactos/lib/crt/direct/wchdir.c | 17 + reactos/lib/crt/direct/wgetcwd.c | 28 + reactos/lib/crt/direct/wgetdcwd.c | 32 + reactos/lib/crt/direct/wmkdir.c | 16 + reactos/lib/crt/direct/wrmdir.c | 16 + reactos/lib/crt/except/abnorter.c | 18 + reactos/lib/crt/except/exhand2.c | 33 + reactos/lib/crt/except/matherr.c | 42 + reactos/lib/crt/except/seh.s | 379 +++++++ reactos/lib/crt/except/unwind.c | 76 ++ reactos/lib/crt/except/xcptfil.c | 15 + reactos/lib/crt/float/chgsign.c | 23 + reactos/lib/crt/float/clearfp.c | 17 + reactos/lib/crt/float/cntrlfp.c | 174 ++++ reactos/lib/crt/float/copysign.c | 26 + reactos/lib/crt/float/fpclass.c | 71 ++ reactos/lib/crt/float/fpecode.c | 14 + reactos/lib/crt/float/fpreset.c | 12 + reactos/lib/crt/float/isnan.c | 98 ++ reactos/lib/crt/float/logb.c | 34 + reactos/lib/crt/float/nafter.c | 16 + reactos/lib/crt/float/scalb.c | 20 + reactos/lib/crt/float/statfp.c | 19 + reactos/lib/crt/io/access.c | 33 + reactos/lib/crt/io/chmod.c | 46 + reactos/lib/crt/io/chsize.c | 18 + reactos/lib/crt/io/close.c | 19 + reactos/lib/crt/io/commit.c | 18 + reactos/lib/crt/io/create.c | 15 + reactos/lib/crt/io/dup.c | 40 + reactos/lib/crt/io/dup2.c | 10 + reactos/lib/crt/io/eof.c | 17 + reactos/lib/crt/io/filelen.c | 20 + reactos/lib/crt/io/fileleni.c | 22 + reactos/lib/crt/io/find.c | 89 ++ reactos/lib/crt/io/fmode.c | 14 + reactos/lib/crt/io/isatty.c | 19 + reactos/lib/crt/io/locking.c | 20 + reactos/lib/crt/io/lseek.c | 20 + reactos/lib/crt/io/lseeki64.c | 42 + reactos/lib/crt/io/mktemp.c | 78 ++ reactos/lib/crt/io/open.c | 423 ++++++++ reactos/lib/crt/io/pipe.c | 51 + reactos/lib/crt/io/read.c | 102 ++ reactos/lib/crt/io/setmode.c | 27 + reactos/lib/crt/io/sopen.c | 10 + reactos/lib/crt/io/stubs.c | 1 + reactos/lib/crt/io/tell.c | 12 + reactos/lib/crt/io/telli64.c | 11 + reactos/lib/crt/io/umask.c | 14 + reactos/lib/crt/io/unlink.c | 29 + reactos/lib/crt/io/utime.c | 25 + reactos/lib/crt/io/waccess.c | 32 + reactos/lib/crt/io/wchmod.c | 47 + reactos/lib/crt/io/wcreate.c | 15 + reactos/lib/crt/io/wfind.c | 226 ++++ reactos/lib/crt/io/wmktemp.c | 78 ++ reactos/lib/crt/io/wopen.c | 148 +++ reactos/lib/crt/io/write.c | 103 ++ reactos/lib/crt/io/wunlink.c | 29 + reactos/lib/crt/io/wutime.c | 25 + reactos/lib/crt/locale/locale.c | 280 +++++ reactos/lib/crt/makefile | 475 +++++++++ reactos/lib/crt/math/acos.c | 27 + reactos/lib/crt/math/adjust.c | 7 + reactos/lib/crt/math/asin.c | 27 + reactos/lib/crt/math/atan.c | 37 + reactos/lib/crt/math/atan2.c | 21 + reactos/lib/crt/math/cabs.c | 14 + reactos/lib/crt/math/ceil.c | 21 + reactos/lib/crt/math/cos.c | 19 + reactos/lib/crt/math/cosh.c | 12 + reactos/lib/crt/math/exp.c | 47 + reactos/lib/crt/math/fabs.c | 36 + reactos/lib/crt/math/floor.c | 40 + reactos/lib/crt/math/fmod.c | 39 + reactos/lib/crt/math/frexp.c | 29 + reactos/lib/crt/math/huge_val.c | 6 + reactos/lib/crt/math/hypot.c | 101 ++ reactos/lib/crt/math/j0_y0.c | 18 + reactos/lib/crt/math/j1_y1.c | 18 + reactos/lib/crt/math/jn_yn.c | 18 + reactos/lib/crt/math/ldexp.c | 36 + reactos/lib/crt/math/log.c | 38 + reactos/lib/crt/math/log10.c | 38 + reactos/lib/crt/math/math.c | 120 +++ reactos/lib/crt/math/modf.c | 158 +++ reactos/lib/crt/math/pow.c | 97 ++ reactos/lib/crt/math/sin.c | 36 + reactos/lib/crt/math/sinh.c | 19 + reactos/lib/crt/math/sqrt.c | 35 + reactos/lib/crt/math/stubs.c | 133 +++ reactos/lib/crt/math/tan.c | 37 + reactos/lib/crt/math/tanh.c | 20 + reactos/lib/crt/mbstring/hanzen.c | 107 ++ reactos/lib/crt/mbstring/ischira.c | 46 + reactos/lib/crt/mbstring/iskana.c | 20 + reactos/lib/crt/mbstring/iskmoji.c | 6 + reactos/lib/crt/mbstring/iskpun.c | 18 + reactos/lib/crt/mbstring/islead.c | 11 + reactos/lib/crt/mbstring/islwr.c | 27 + reactos/lib/crt/mbstring/ismbal.c | 20 + reactos/lib/crt/mbstring/ismbaln.c | 12 + reactos/lib/crt/mbstring/ismbc.c | 135 +++ reactos/lib/crt/mbstring/ismbgra.c | 11 + reactos/lib/crt/mbstring/ismbkaln.c | 19 + reactos/lib/crt/mbstring/ismblead.c | 65 ++ reactos/lib/crt/mbstring/ismbpri.c | 11 + reactos/lib/crt/mbstring/ismbpun.c | 18 + reactos/lib/crt/mbstring/ismbtrl.c | 45 + reactos/lib/crt/mbstring/isuppr.c | 27 + reactos/lib/crt/mbstring/jistojms.c | 27 + reactos/lib/crt/mbstring/jmstojis.c | 28 + reactos/lib/crt/mbstring/mbbtype.c | 52 + reactos/lib/crt/mbstring/mbccpy.c | 15 + reactos/lib/crt/mbstring/mbclen.c | 33 + reactos/lib/crt/mbstring/mbscat.c | 9 + reactos/lib/crt/mbstring/mbschr.c | 9 + reactos/lib/crt/mbstring/mbscmp.c | 10 + reactos/lib/crt/mbstring/mbscoll.c | 100 ++ reactos/lib/crt/mbstring/mbscpy.c | 10 + reactos/lib/crt/mbstring/mbscspn.c | 23 + reactos/lib/crt/mbstring/mbsdec.c | 17 + reactos/lib/crt/mbstring/mbsdup.c | 28 + reactos/lib/crt/mbstring/mbsicmp.c | 65 ++ reactos/lib/crt/mbstring/mbsicoll.c | 58 ++ reactos/lib/crt/mbstring/mbsinc.c | 13 + reactos/lib/crt/mbstring/mbslen.c | 18 + reactos/lib/crt/mbstring/mbslwr.c | 45 + reactos/lib/crt/mbstring/mbsncat.c | 64 ++ reactos/lib/crt/mbstring/mbsnccnt.c | 35 + reactos/lib/crt/mbstring/mbsncmp.c | 109 ++ reactos/lib/crt/mbstring/mbsncoll.c | 115 ++ reactos/lib/crt/mbstring/mbsncpy.c | 91 ++ reactos/lib/crt/mbstring/mbsnextc.c | 19 + reactos/lib/crt/mbstring/mbsnicmp.c | 47 + reactos/lib/crt/mbstring/mbsnicoll.c | 17 + reactos/lib/crt/mbstring/mbsninc.c | 16 + reactos/lib/crt/mbstring/mbsnset.c | 70 ++ reactos/lib/crt/mbstring/mbspbrk.c | 25 + reactos/lib/crt/mbstring/mbsrchr.c | 33 + reactos/lib/crt/mbstring/mbsrev.c | 33 + reactos/lib/crt/mbstring/mbsset.c | 40 + reactos/lib/crt/mbstring/mbsspn.c | 20 + reactos/lib/crt/mbstring/mbsspnp.c | 19 + reactos/lib/crt/mbstring/mbsstr.c | 23 + reactos/lib/crt/mbstring/mbstok.c | 56 + reactos/lib/crt/mbstring/mbstrlen.c | 19 + reactos/lib/crt/mbstring/mbsupr.c | 56 + reactos/lib/crt/misc/amsg.c | 54 + reactos/lib/crt/misc/assert.c | 17 + reactos/lib/crt/misc/crtmain.c | 92 ++ reactos/lib/crt/misc/environ.c | 453 ++++++++ reactos/lib/crt/misc/getargs.c | 176 ++++ reactos/lib/crt/misc/initterm.c | 20 + reactos/lib/crt/misc/lock.c | 135 +++ reactos/lib/crt/misc/purecall.c | 10 + reactos/lib/crt/misc/stubs.c | 113 ++ reactos/lib/crt/misc/tls.c | 100 ++ reactos/lib/crt/precomp.h | 1 + reactos/lib/crt/process/_cwait.c | 36 + reactos/lib/crt/process/_system.c | 122 +++ reactos/lib/crt/process/dll.c | 41 + reactos/lib/crt/process/process.c | 622 +++++++++++ reactos/lib/crt/process/procid.c | 11 + reactos/lib/crt/process/thread.c | 26 + reactos/lib/crt/process/threadid.c | 19 + reactos/lib/crt/process/threadx.c | 48 + reactos/lib/crt/search/lfind.c | 21 + reactos/lib/crt/search/lsearch.c | 24 + reactos/lib/crt/setjmp/i386/setjmp.s | 111 ++ reactos/lib/crt/signal/signal.c | 113 ++ reactos/lib/crt/signal/xcptinfo.c | 9 + reactos/lib/crt/stdio/allocfil.c | 101 ++ reactos/lib/crt/stdio/clearerr.c | 22 + reactos/lib/crt/stdio/fclose.c | 54 + reactos/lib/crt/stdio/fdopen.c | 57 + reactos/lib/crt/stdio/feof.c | 22 + reactos/lib/crt/stdio/ferror.c | 18 + reactos/lib/crt/stdio/fflush.c | 119 +++ reactos/lib/crt/stdio/fgetc.c | 29 + reactos/lib/crt/stdio/fgetchar.c | 38 + reactos/lib/crt/stdio/fgetpos.c | 17 + reactos/lib/crt/stdio/fgets.c | 47 + reactos/lib/crt/stdio/fgetws.c | 58 ++ reactos/lib/crt/stdio/filbuf.c | 125 +++ reactos/lib/crt/stdio/fileno.c | 17 + reactos/lib/crt/stdio/flsbuf.c | 160 +++ reactos/lib/crt/stdio/fopen.c | 158 +++ reactos/lib/crt/stdio/fprintf.c | 62 ++ reactos/lib/crt/stdio/fputc.c | 23 + reactos/lib/crt/stdio/fputchar.c | 38 + reactos/lib/crt/stdio/fputs.c | 95 ++ reactos/lib/crt/stdio/fread.c | 90 ++ reactos/lib/crt/stdio/freopen.c | 128 +++ reactos/lib/crt/stdio/fscanf.c | 65 ++ reactos/lib/crt/stdio/fseek.c | 57 + reactos/lib/crt/stdio/fsetpos.c | 18 + reactos/lib/crt/stdio/fsopen.c | 183 ++++ reactos/lib/crt/stdio/ftell.c | 48 + reactos/lib/crt/stdio/fwalk.c | 18 + reactos/lib/crt/stdio/fwrite.c | 114 ++ reactos/lib/crt/stdio/getc.c | 134 +++ reactos/lib/crt/stdio/getchar.c | 46 + reactos/lib/crt/stdio/gets.c | 146 +++ reactos/lib/crt/stdio/getw.c | 39 + reactos/lib/crt/stdio/perror.c | 26 + reactos/lib/crt/stdio/popen.c | 224 ++++ reactos/lib/crt/stdio/printf.c | 50 + reactos/lib/crt/stdio/putc.c | 146 +++ reactos/lib/crt/stdio/putchar.c | 38 + reactos/lib/crt/stdio/puts.c | 35 + reactos/lib/crt/stdio/putw.c | 34 + reactos/lib/crt/stdio/remove.c | 30 + reactos/lib/crt/stdio/rename.c | 18 + reactos/lib/crt/stdio/rewind.c | 18 + reactos/lib/crt/stdio/rmtmp.c | 72 ++ reactos/lib/crt/stdio/scanf.c | 64 ++ reactos/lib/crt/stdio/setbuf.c | 15 + reactos/lib/crt/stdio/setvbuf.c | 69 ++ reactos/lib/crt/stdio/sprintf.c | 96 ++ reactos/lib/crt/stdio/sscanf.c | 71 ++ reactos/lib/crt/stdio/stdhnd.c | 45 + reactos/lib/crt/stdio/tempnam.c | 30 + reactos/lib/crt/stdio/tmpfile.c | 70 ++ reactos/lib/crt/stdio/tmpnam.c | 19 + reactos/lib/crt/stdio/ungetc.c | 76 ++ reactos/lib/crt/stdio/vfprintf.c | 862 +++++++++++++++ reactos/lib/crt/stdio/vfscanf.c | 1235 ++++++++++++++++++++++ reactos/lib/crt/stdio/vfwprint.c | 854 +++++++++++++++ reactos/lib/crt/stdio/vprintf.c | 83 ++ reactos/lib/crt/stdio/vscanf.c | 34 + reactos/lib/crt/stdio/vsprintf.c | 80 ++ reactos/lib/crt/stdio/vsscanf.c | 50 + reactos/lib/crt/stdio/wfdopen.c | 57 + reactos/lib/crt/stdio/wrename.c | 18 + reactos/lib/crt/stdio/wtempnam.c | 25 + reactos/lib/crt/stdio/wtmpnam.c | 19 + reactos/lib/crt/stdlib/_exit.c | 58 ++ reactos/lib/crt/stdlib/abort.c | 19 + reactos/lib/crt/stdlib/abs.c | 12 + reactos/lib/crt/stdlib/atexit.c | 59 ++ reactos/lib/crt/stdlib/atof.c | 11 + reactos/lib/crt/stdlib/atoi.c | 11 + reactos/lib/crt/stdlib/atoi64.c | 34 + reactos/lib/crt/stdlib/atol.c | 11 + reactos/lib/crt/stdlib/atold.c | 8 + reactos/lib/crt/stdlib/bsearch.c | 28 + reactos/lib/crt/stdlib/div.c | 27 + reactos/lib/crt/stdlib/doserrmap.h | 82 ++ reactos/lib/crt/stdlib/ecvt.c | 15 + reactos/lib/crt/stdlib/ecvtbuf.c | 108 ++ reactos/lib/crt/stdlib/errno.c | 81 ++ reactos/lib/crt/stdlib/fcvt.c | 15 + reactos/lib/crt/stdlib/fcvtbuf.c | 61 ++ reactos/lib/crt/stdlib/fullpath.c | 26 + reactos/lib/crt/stdlib/gcvt.c | 34 + reactos/lib/crt/stdlib/getenv.c | 43 + reactos/lib/crt/stdlib/itoa.c | 143 +++ reactos/lib/crt/stdlib/itow.c | 156 +++ reactos/lib/crt/stdlib/labs.c | 12 + reactos/lib/crt/stdlib/ldiv.c | 28 + reactos/lib/crt/stdlib/makepath.c | 36 + reactos/lib/crt/stdlib/malloc.c | 118 +++ reactos/lib/crt/stdlib/mbstowcs.c | 123 +++ reactos/lib/crt/stdlib/mbtowc.c | 55 + reactos/lib/crt/stdlib/obsol.c | 33 + reactos/lib/crt/stdlib/putenv.c | 27 + reactos/lib/crt/stdlib/qsort.c | 243 +++++ reactos/lib/crt/stdlib/rand.c | 34 + reactos/lib/crt/stdlib/rot.c | 69 ++ reactos/lib/crt/stdlib/senv.c | 36 + reactos/lib/crt/stdlib/splitp.c | 69 ++ reactos/lib/crt/stdlib/strtod.c | 100 ++ reactos/lib/crt/stdlib/strtol.c | 95 ++ reactos/lib/crt/stdlib/strtold.c | 126 +++ reactos/lib/crt/stdlib/strtoll.c | 84 ++ reactos/lib/crt/stdlib/strtoul.c | 77 ++ reactos/lib/crt/stdlib/strtoull.c | 76 ++ reactos/lib/crt/stdlib/swab.c | 18 + reactos/lib/crt/stdlib/wcstod.c | 98 ++ reactos/lib/crt/stdlib/wcstol.c | 37 + reactos/lib/crt/stdlib/wcstom.c | 20 + reactos/lib/crt/stdlib/wcstomb.c | 118 +++ reactos/lib/crt/stdlib/wcstombs.c | 160 +++ reactos/lib/crt/stdlib/wcstoul.c | 104 ++ reactos/lib/crt/stdlib/wctomb.c | 151 +++ reactos/lib/crt/stdlib/wfulpath.c | 26 + reactos/lib/crt/stdlib/witoa.c | 98 ++ reactos/lib/crt/stdlib/witow.c | 96 ++ reactos/lib/crt/stdlib/wmakpath.c | 37 + reactos/lib/crt/stdlib/wputenv.c | 17 + reactos/lib/crt/stdlib/wsenv.c | 35 + reactos/lib/crt/stdlib/wsplitp.c | 69 ++ reactos/lib/crt/stdlib/wtoi.c | 17 + reactos/lib/crt/stdlib/wtoi64.c | 31 + reactos/lib/crt/string/lasttok.c | 19 + reactos/lib/crt/string/memicmp.c | 23 + reactos/lib/crt/string/strcoll.c | 36 + reactos/lib/crt/string/strdup.c | 19 + reactos/lib/crt/string/strerror.c | 114 ++ reactos/lib/crt/string/stricmp.c | 28 + reactos/lib/crt/string/strlwr.c | 26 + reactos/lib/crt/string/strncoll.c | 23 + reactos/lib/crt/string/strnicmp.c | 20 + reactos/lib/crt/string/strpbrk.c | 21 + reactos/lib/crt/string/strrev.c | 22 + reactos/lib/crt/string/strset.c | 35 + reactos/lib/crt/string/strstr.c | 25 + reactos/lib/crt/string/strtok.c | 64 ++ reactos/lib/crt/string/strupr.c | 27 + reactos/lib/crt/string/strxfrm.c | 24 + reactos/lib/crt/sys_stat/fstat.c | 85 ++ reactos/lib/crt/sys_stat/fstati64.c | 86 ++ reactos/lib/crt/sys_stat/futime.c | 43 + reactos/lib/crt/sys_stat/stat.c | 117 +++ reactos/lib/crt/sys_stat/systime.c | 70 ++ reactos/lib/crt/sys_stat/wstat.c | 116 +++ reactos/lib/crt/time/clock.c | 32 + reactos/lib/crt/time/ctime.c | 1439 ++++++++++++++++++++++++++ reactos/lib/crt/time/difftime.c | 11 + reactos/lib/crt/time/ftime.c | 34 + reactos/lib/crt/time/posixrul.h | 49 + reactos/lib/crt/time/strdate.c | 33 + reactos/lib/crt/time/strftime.c | 260 +++++ reactos/lib/crt/time/strtime.c | 33 + reactos/lib/crt/time/time.c | 226 ++++ reactos/lib/crt/time/tz_vars.c | 21 + reactos/lib/crt/time/tzfile.h | 160 +++ reactos/lib/crt/time/wctime.c | 75 ++ reactos/lib/crt/time/wstrdate.c | 33 + reactos/lib/crt/time/wstrtime.c | 33 + reactos/lib/crt/wine/cpp.c | 1251 ++++++++++++++++++++++ reactos/lib/crt/wine/cppexcept.c | 443 ++++++++ reactos/lib/crt/wine/heap.c | 131 +++ reactos/lib/crt/wine/thread.c | 108 ++ reactos/lib/crt/wstring/wcscoll.c | 38 + reactos/lib/crt/wstring/wcscspn.c | 23 + reactos/lib/crt/wstring/wcsdup.c | 21 + reactos/lib/crt/wstring/wcsicmp.c | 20 + reactos/lib/crt/wstring/wcslwr.c | 25 + reactos/lib/crt/wstring/wcsnicmp.c | 17 + reactos/lib/crt/wstring/wcspbrk.c | 19 + reactos/lib/crt/wstring/wcsrev.c | 21 + reactos/lib/crt/wstring/wcsset.c | 33 + reactos/lib/crt/wstring/wcsspn.c | 23 + reactos/lib/crt/wstring/wcsstr.c | 26 + reactos/lib/crt/wstring/wcstok.c | 62 ++ reactos/lib/crt/wstring/wcsupr.c | 16 + reactos/lib/crt/wstring/wcsxfrm.c | 26 + reactos/lib/crt/wstring/wlasttok.c | 14 + 387 files changed, 27311 insertions(+) create mode 100644 reactos/lib/crt/README.txt create mode 100644 reactos/lib/crt/conio/cgets.c create mode 100644 reactos/lib/crt/conio/cprintf.c create mode 100644 reactos/lib/crt/conio/cputs.c create mode 100644 reactos/lib/crt/conio/cscanf.c create mode 100644 reactos/lib/crt/conio/getch.c create mode 100644 reactos/lib/crt/conio/getche.c create mode 100644 reactos/lib/crt/conio/kbhit.c create mode 100644 reactos/lib/crt/conio/putch.c create mode 100644 reactos/lib/crt/conio/ungetch.c create mode 100644 reactos/lib/crt/ctype/ctype.c create mode 100644 reactos/lib/crt/ctype/isalnum.c create mode 100644 reactos/lib/crt/ctype/isalpha.c create mode 100644 reactos/lib/crt/ctype/isascii.c create mode 100644 reactos/lib/crt/ctype/iscntrl.c create mode 100644 reactos/lib/crt/ctype/iscsym.c create mode 100644 reactos/lib/crt/ctype/isctype.c create mode 100644 reactos/lib/crt/ctype/isdigit.c create mode 100644 reactos/lib/crt/ctype/isgraph.c create mode 100644 reactos/lib/crt/ctype/islower.c create mode 100644 reactos/lib/crt/ctype/isprint.c create mode 100644 reactos/lib/crt/ctype/ispunct.c create mode 100644 reactos/lib/crt/ctype/isspace.c create mode 100644 reactos/lib/crt/ctype/isupper.c create mode 100644 reactos/lib/crt/ctype/isxdigit.c create mode 100644 reactos/lib/crt/ctype/toascii.c create mode 100644 reactos/lib/crt/ctype/tolower.c create mode 100644 reactos/lib/crt/ctype/toupper.c create mode 100644 reactos/lib/crt/direct/chdir.c create mode 100644 reactos/lib/crt/direct/chdrive.c create mode 100644 reactos/lib/crt/direct/getcwd.c create mode 100644 reactos/lib/crt/direct/getdcwd.c create mode 100644 reactos/lib/crt/direct/getdfree.c create mode 100644 reactos/lib/crt/direct/getdrive.c create mode 100644 reactos/lib/crt/direct/mkdir.c create mode 100644 reactos/lib/crt/direct/rmdir.c create mode 100644 reactos/lib/crt/direct/wchdir.c create mode 100644 reactos/lib/crt/direct/wgetcwd.c create mode 100644 reactos/lib/crt/direct/wgetdcwd.c create mode 100644 reactos/lib/crt/direct/wmkdir.c create mode 100644 reactos/lib/crt/direct/wrmdir.c create mode 100644 reactos/lib/crt/except/abnorter.c create mode 100644 reactos/lib/crt/except/exhand2.c create mode 100644 reactos/lib/crt/except/matherr.c create mode 100755 reactos/lib/crt/except/seh.s create mode 100644 reactos/lib/crt/except/unwind.c create mode 100644 reactos/lib/crt/except/xcptfil.c create mode 100644 reactos/lib/crt/float/chgsign.c create mode 100644 reactos/lib/crt/float/clearfp.c create mode 100644 reactos/lib/crt/float/cntrlfp.c create mode 100644 reactos/lib/crt/float/copysign.c create mode 100644 reactos/lib/crt/float/fpclass.c create mode 100644 reactos/lib/crt/float/fpecode.c create mode 100644 reactos/lib/crt/float/fpreset.c create mode 100644 reactos/lib/crt/float/isnan.c create mode 100644 reactos/lib/crt/float/logb.c create mode 100644 reactos/lib/crt/float/nafter.c create mode 100644 reactos/lib/crt/float/scalb.c create mode 100644 reactos/lib/crt/float/statfp.c create mode 100644 reactos/lib/crt/io/access.c create mode 100644 reactos/lib/crt/io/chmod.c create mode 100644 reactos/lib/crt/io/chsize.c create mode 100644 reactos/lib/crt/io/close.c create mode 100644 reactos/lib/crt/io/commit.c create mode 100644 reactos/lib/crt/io/create.c create mode 100644 reactos/lib/crt/io/dup.c create mode 100644 reactos/lib/crt/io/dup2.c create mode 100644 reactos/lib/crt/io/eof.c create mode 100644 reactos/lib/crt/io/filelen.c create mode 100644 reactos/lib/crt/io/fileleni.c create mode 100644 reactos/lib/crt/io/find.c create mode 100644 reactos/lib/crt/io/fmode.c create mode 100644 reactos/lib/crt/io/isatty.c create mode 100644 reactos/lib/crt/io/locking.c create mode 100644 reactos/lib/crt/io/lseek.c create mode 100644 reactos/lib/crt/io/lseeki64.c create mode 100644 reactos/lib/crt/io/mktemp.c create mode 100644 reactos/lib/crt/io/open.c create mode 100644 reactos/lib/crt/io/pipe.c create mode 100644 reactos/lib/crt/io/read.c create mode 100644 reactos/lib/crt/io/setmode.c create mode 100644 reactos/lib/crt/io/sopen.c create mode 100644 reactos/lib/crt/io/stubs.c create mode 100644 reactos/lib/crt/io/tell.c create mode 100644 reactos/lib/crt/io/telli64.c create mode 100644 reactos/lib/crt/io/umask.c create mode 100644 reactos/lib/crt/io/unlink.c create mode 100644 reactos/lib/crt/io/utime.c create mode 100644 reactos/lib/crt/io/waccess.c create mode 100644 reactos/lib/crt/io/wchmod.c create mode 100644 reactos/lib/crt/io/wcreate.c create mode 100644 reactos/lib/crt/io/wfind.c create mode 100644 reactos/lib/crt/io/wmktemp.c create mode 100644 reactos/lib/crt/io/wopen.c create mode 100644 reactos/lib/crt/io/write.c create mode 100644 reactos/lib/crt/io/wunlink.c create mode 100644 reactos/lib/crt/io/wutime.c create mode 100644 reactos/lib/crt/locale/locale.c create mode 100644 reactos/lib/crt/makefile create mode 100644 reactos/lib/crt/math/acos.c create mode 100644 reactos/lib/crt/math/adjust.c create mode 100644 reactos/lib/crt/math/asin.c create mode 100644 reactos/lib/crt/math/atan.c create mode 100644 reactos/lib/crt/math/atan2.c create mode 100644 reactos/lib/crt/math/cabs.c create mode 100644 reactos/lib/crt/math/ceil.c create mode 100644 reactos/lib/crt/math/cos.c create mode 100644 reactos/lib/crt/math/cosh.c create mode 100644 reactos/lib/crt/math/exp.c create mode 100644 reactos/lib/crt/math/fabs.c create mode 100644 reactos/lib/crt/math/floor.c create mode 100644 reactos/lib/crt/math/fmod.c create mode 100644 reactos/lib/crt/math/frexp.c create mode 100644 reactos/lib/crt/math/huge_val.c create mode 100644 reactos/lib/crt/math/hypot.c create mode 100644 reactos/lib/crt/math/j0_y0.c create mode 100644 reactos/lib/crt/math/j1_y1.c create mode 100644 reactos/lib/crt/math/jn_yn.c create mode 100644 reactos/lib/crt/math/ldexp.c create mode 100644 reactos/lib/crt/math/log.c create mode 100644 reactos/lib/crt/math/log10.c create mode 100644 reactos/lib/crt/math/math.c create mode 100644 reactos/lib/crt/math/modf.c create mode 100644 reactos/lib/crt/math/pow.c create mode 100644 reactos/lib/crt/math/sin.c create mode 100644 reactos/lib/crt/math/sinh.c create mode 100644 reactos/lib/crt/math/sqrt.c create mode 100644 reactos/lib/crt/math/stubs.c create mode 100644 reactos/lib/crt/math/tan.c create mode 100644 reactos/lib/crt/math/tanh.c create mode 100644 reactos/lib/crt/mbstring/hanzen.c create mode 100644 reactos/lib/crt/mbstring/ischira.c create mode 100644 reactos/lib/crt/mbstring/iskana.c create mode 100644 reactos/lib/crt/mbstring/iskmoji.c create mode 100644 reactos/lib/crt/mbstring/iskpun.c create mode 100644 reactos/lib/crt/mbstring/islead.c create mode 100644 reactos/lib/crt/mbstring/islwr.c create mode 100644 reactos/lib/crt/mbstring/ismbal.c create mode 100644 reactos/lib/crt/mbstring/ismbaln.c create mode 100644 reactos/lib/crt/mbstring/ismbc.c create mode 100644 reactos/lib/crt/mbstring/ismbgra.c create mode 100644 reactos/lib/crt/mbstring/ismbkaln.c create mode 100644 reactos/lib/crt/mbstring/ismblead.c create mode 100644 reactos/lib/crt/mbstring/ismbpri.c create mode 100644 reactos/lib/crt/mbstring/ismbpun.c create mode 100644 reactos/lib/crt/mbstring/ismbtrl.c create mode 100644 reactos/lib/crt/mbstring/isuppr.c create mode 100644 reactos/lib/crt/mbstring/jistojms.c create mode 100644 reactos/lib/crt/mbstring/jmstojis.c create mode 100644 reactos/lib/crt/mbstring/mbbtype.c create mode 100644 reactos/lib/crt/mbstring/mbccpy.c create mode 100644 reactos/lib/crt/mbstring/mbclen.c create mode 100644 reactos/lib/crt/mbstring/mbscat.c create mode 100644 reactos/lib/crt/mbstring/mbschr.c create mode 100644 reactos/lib/crt/mbstring/mbscmp.c create mode 100644 reactos/lib/crt/mbstring/mbscoll.c create mode 100644 reactos/lib/crt/mbstring/mbscpy.c create mode 100644 reactos/lib/crt/mbstring/mbscspn.c create mode 100644 reactos/lib/crt/mbstring/mbsdec.c create mode 100644 reactos/lib/crt/mbstring/mbsdup.c create mode 100644 reactos/lib/crt/mbstring/mbsicmp.c create mode 100644 reactos/lib/crt/mbstring/mbsicoll.c create mode 100644 reactos/lib/crt/mbstring/mbsinc.c create mode 100644 reactos/lib/crt/mbstring/mbslen.c create mode 100644 reactos/lib/crt/mbstring/mbslwr.c create mode 100644 reactos/lib/crt/mbstring/mbsncat.c create mode 100644 reactos/lib/crt/mbstring/mbsnccnt.c create mode 100644 reactos/lib/crt/mbstring/mbsncmp.c create mode 100644 reactos/lib/crt/mbstring/mbsncoll.c create mode 100644 reactos/lib/crt/mbstring/mbsncpy.c create mode 100644 reactos/lib/crt/mbstring/mbsnextc.c create mode 100644 reactos/lib/crt/mbstring/mbsnicmp.c create mode 100644 reactos/lib/crt/mbstring/mbsnicoll.c create mode 100644 reactos/lib/crt/mbstring/mbsninc.c create mode 100644 reactos/lib/crt/mbstring/mbsnset.c create mode 100644 reactos/lib/crt/mbstring/mbspbrk.c create mode 100644 reactos/lib/crt/mbstring/mbsrchr.c create mode 100644 reactos/lib/crt/mbstring/mbsrev.c create mode 100644 reactos/lib/crt/mbstring/mbsset.c create mode 100644 reactos/lib/crt/mbstring/mbsspn.c create mode 100644 reactos/lib/crt/mbstring/mbsspnp.c create mode 100644 reactos/lib/crt/mbstring/mbsstr.c create mode 100644 reactos/lib/crt/mbstring/mbstok.c create mode 100644 reactos/lib/crt/mbstring/mbstrlen.c create mode 100644 reactos/lib/crt/mbstring/mbsupr.c create mode 100644 reactos/lib/crt/misc/amsg.c create mode 100644 reactos/lib/crt/misc/assert.c create mode 100644 reactos/lib/crt/misc/crtmain.c create mode 100644 reactos/lib/crt/misc/environ.c create mode 100644 reactos/lib/crt/misc/getargs.c create mode 100644 reactos/lib/crt/misc/initterm.c create mode 100644 reactos/lib/crt/misc/lock.c create mode 100644 reactos/lib/crt/misc/purecall.c create mode 100644 reactos/lib/crt/misc/stubs.c create mode 100644 reactos/lib/crt/misc/tls.c create mode 100644 reactos/lib/crt/precomp.h create mode 100644 reactos/lib/crt/process/_cwait.c create mode 100644 reactos/lib/crt/process/_system.c create mode 100644 reactos/lib/crt/process/dll.c create mode 100644 reactos/lib/crt/process/process.c create mode 100644 reactos/lib/crt/process/procid.c create mode 100644 reactos/lib/crt/process/thread.c create mode 100644 reactos/lib/crt/process/threadid.c create mode 100644 reactos/lib/crt/process/threadx.c create mode 100644 reactos/lib/crt/search/lfind.c create mode 100644 reactos/lib/crt/search/lsearch.c create mode 100644 reactos/lib/crt/setjmp/i386/setjmp.s create mode 100644 reactos/lib/crt/signal/signal.c create mode 100644 reactos/lib/crt/signal/xcptinfo.c create mode 100644 reactos/lib/crt/stdio/allocfil.c create mode 100644 reactos/lib/crt/stdio/clearerr.c create mode 100644 reactos/lib/crt/stdio/fclose.c create mode 100644 reactos/lib/crt/stdio/fdopen.c create mode 100644 reactos/lib/crt/stdio/feof.c create mode 100644 reactos/lib/crt/stdio/ferror.c create mode 100644 reactos/lib/crt/stdio/fflush.c create mode 100644 reactos/lib/crt/stdio/fgetc.c create mode 100644 reactos/lib/crt/stdio/fgetchar.c create mode 100644 reactos/lib/crt/stdio/fgetpos.c create mode 100644 reactos/lib/crt/stdio/fgets.c create mode 100644 reactos/lib/crt/stdio/fgetws.c create mode 100644 reactos/lib/crt/stdio/filbuf.c create mode 100644 reactos/lib/crt/stdio/fileno.c create mode 100644 reactos/lib/crt/stdio/flsbuf.c create mode 100644 reactos/lib/crt/stdio/fopen.c create mode 100644 reactos/lib/crt/stdio/fprintf.c create mode 100644 reactos/lib/crt/stdio/fputc.c create mode 100644 reactos/lib/crt/stdio/fputchar.c create mode 100644 reactos/lib/crt/stdio/fputs.c create mode 100644 reactos/lib/crt/stdio/fread.c create mode 100644 reactos/lib/crt/stdio/freopen.c create mode 100644 reactos/lib/crt/stdio/fscanf.c create mode 100644 reactos/lib/crt/stdio/fseek.c create mode 100644 reactos/lib/crt/stdio/fsetpos.c create mode 100644 reactos/lib/crt/stdio/fsopen.c create mode 100644 reactos/lib/crt/stdio/ftell.c create mode 100644 reactos/lib/crt/stdio/fwalk.c create mode 100644 reactos/lib/crt/stdio/fwrite.c create mode 100644 reactos/lib/crt/stdio/getc.c create mode 100644 reactos/lib/crt/stdio/getchar.c create mode 100644 reactos/lib/crt/stdio/gets.c create mode 100644 reactos/lib/crt/stdio/getw.c create mode 100644 reactos/lib/crt/stdio/perror.c create mode 100644 reactos/lib/crt/stdio/popen.c create mode 100644 reactos/lib/crt/stdio/printf.c create mode 100644 reactos/lib/crt/stdio/putc.c create mode 100644 reactos/lib/crt/stdio/putchar.c create mode 100644 reactos/lib/crt/stdio/puts.c create mode 100644 reactos/lib/crt/stdio/putw.c create mode 100644 reactos/lib/crt/stdio/remove.c create mode 100644 reactos/lib/crt/stdio/rename.c create mode 100644 reactos/lib/crt/stdio/rewind.c create mode 100644 reactos/lib/crt/stdio/rmtmp.c create mode 100644 reactos/lib/crt/stdio/scanf.c create mode 100644 reactos/lib/crt/stdio/setbuf.c create mode 100644 reactos/lib/crt/stdio/setvbuf.c create mode 100644 reactos/lib/crt/stdio/sprintf.c create mode 100644 reactos/lib/crt/stdio/sscanf.c create mode 100644 reactos/lib/crt/stdio/stdhnd.c create mode 100644 reactos/lib/crt/stdio/tempnam.c create mode 100644 reactos/lib/crt/stdio/tmpfile.c create mode 100644 reactos/lib/crt/stdio/tmpnam.c create mode 100644 reactos/lib/crt/stdio/ungetc.c create mode 100644 reactos/lib/crt/stdio/vfprintf.c create mode 100644 reactos/lib/crt/stdio/vfscanf.c create mode 100644 reactos/lib/crt/stdio/vfwprint.c create mode 100644 reactos/lib/crt/stdio/vprintf.c create mode 100644 reactos/lib/crt/stdio/vscanf.c create mode 100644 reactos/lib/crt/stdio/vsprintf.c create mode 100644 reactos/lib/crt/stdio/vsscanf.c create mode 100644 reactos/lib/crt/stdio/wfdopen.c create mode 100644 reactos/lib/crt/stdio/wrename.c create mode 100644 reactos/lib/crt/stdio/wtempnam.c create mode 100644 reactos/lib/crt/stdio/wtmpnam.c create mode 100644 reactos/lib/crt/stdlib/_exit.c create mode 100644 reactos/lib/crt/stdlib/abort.c create mode 100644 reactos/lib/crt/stdlib/abs.c create mode 100644 reactos/lib/crt/stdlib/atexit.c create mode 100644 reactos/lib/crt/stdlib/atof.c create mode 100644 reactos/lib/crt/stdlib/atoi.c create mode 100644 reactos/lib/crt/stdlib/atoi64.c create mode 100644 reactos/lib/crt/stdlib/atol.c create mode 100644 reactos/lib/crt/stdlib/atold.c create mode 100644 reactos/lib/crt/stdlib/bsearch.c create mode 100644 reactos/lib/crt/stdlib/div.c create mode 100644 reactos/lib/crt/stdlib/doserrmap.h create mode 100644 reactos/lib/crt/stdlib/ecvt.c create mode 100644 reactos/lib/crt/stdlib/ecvtbuf.c create mode 100644 reactos/lib/crt/stdlib/errno.c create mode 100644 reactos/lib/crt/stdlib/fcvt.c create mode 100644 reactos/lib/crt/stdlib/fcvtbuf.c create mode 100644 reactos/lib/crt/stdlib/fullpath.c create mode 100644 reactos/lib/crt/stdlib/gcvt.c create mode 100644 reactos/lib/crt/stdlib/getenv.c create mode 100644 reactos/lib/crt/stdlib/itoa.c create mode 100644 reactos/lib/crt/stdlib/itow.c create mode 100644 reactos/lib/crt/stdlib/labs.c create mode 100644 reactos/lib/crt/stdlib/ldiv.c create mode 100644 reactos/lib/crt/stdlib/makepath.c create mode 100644 reactos/lib/crt/stdlib/malloc.c create mode 100644 reactos/lib/crt/stdlib/mbstowcs.c create mode 100644 reactos/lib/crt/stdlib/mbtowc.c create mode 100644 reactos/lib/crt/stdlib/obsol.c create mode 100644 reactos/lib/crt/stdlib/putenv.c create mode 100644 reactos/lib/crt/stdlib/qsort.c create mode 100644 reactos/lib/crt/stdlib/rand.c create mode 100644 reactos/lib/crt/stdlib/rot.c create mode 100644 reactos/lib/crt/stdlib/senv.c create mode 100644 reactos/lib/crt/stdlib/splitp.c create mode 100644 reactos/lib/crt/stdlib/strtod.c create mode 100644 reactos/lib/crt/stdlib/strtol.c create mode 100644 reactos/lib/crt/stdlib/strtold.c create mode 100644 reactos/lib/crt/stdlib/strtoll.c create mode 100644 reactos/lib/crt/stdlib/strtoul.c create mode 100644 reactos/lib/crt/stdlib/strtoull.c create mode 100644 reactos/lib/crt/stdlib/swab.c create mode 100644 reactos/lib/crt/stdlib/wcstod.c create mode 100644 reactos/lib/crt/stdlib/wcstol.c create mode 100644 reactos/lib/crt/stdlib/wcstom.c create mode 100644 reactos/lib/crt/stdlib/wcstomb.c create mode 100644 reactos/lib/crt/stdlib/wcstombs.c create mode 100644 reactos/lib/crt/stdlib/wcstoul.c create mode 100644 reactos/lib/crt/stdlib/wctomb.c create mode 100644 reactos/lib/crt/stdlib/wfulpath.c create mode 100644 reactos/lib/crt/stdlib/witoa.c create mode 100644 reactos/lib/crt/stdlib/witow.c create mode 100644 reactos/lib/crt/stdlib/wmakpath.c create mode 100644 reactos/lib/crt/stdlib/wputenv.c create mode 100644 reactos/lib/crt/stdlib/wsenv.c create mode 100644 reactos/lib/crt/stdlib/wsplitp.c create mode 100644 reactos/lib/crt/stdlib/wtoi.c create mode 100644 reactos/lib/crt/stdlib/wtoi64.c create mode 100644 reactos/lib/crt/string/lasttok.c create mode 100644 reactos/lib/crt/string/memicmp.c create mode 100644 reactos/lib/crt/string/strcoll.c create mode 100644 reactos/lib/crt/string/strdup.c create mode 100644 reactos/lib/crt/string/strerror.c create mode 100644 reactos/lib/crt/string/stricmp.c create mode 100644 reactos/lib/crt/string/strlwr.c create mode 100644 reactos/lib/crt/string/strncoll.c create mode 100644 reactos/lib/crt/string/strnicmp.c create mode 100644 reactos/lib/crt/string/strpbrk.c create mode 100644 reactos/lib/crt/string/strrev.c create mode 100644 reactos/lib/crt/string/strset.c create mode 100644 reactos/lib/crt/string/strstr.c create mode 100644 reactos/lib/crt/string/strtok.c create mode 100644 reactos/lib/crt/string/strupr.c create mode 100644 reactos/lib/crt/string/strxfrm.c create mode 100644 reactos/lib/crt/sys_stat/fstat.c create mode 100644 reactos/lib/crt/sys_stat/fstati64.c create mode 100644 reactos/lib/crt/sys_stat/futime.c create mode 100644 reactos/lib/crt/sys_stat/stat.c create mode 100644 reactos/lib/crt/sys_stat/systime.c create mode 100644 reactos/lib/crt/sys_stat/wstat.c create mode 100644 reactos/lib/crt/time/clock.c create mode 100644 reactos/lib/crt/time/ctime.c create mode 100644 reactos/lib/crt/time/difftime.c create mode 100644 reactos/lib/crt/time/ftime.c create mode 100644 reactos/lib/crt/time/posixrul.h create mode 100644 reactos/lib/crt/time/strdate.c create mode 100644 reactos/lib/crt/time/strftime.c create mode 100644 reactos/lib/crt/time/strtime.c create mode 100644 reactos/lib/crt/time/time.c create mode 100644 reactos/lib/crt/time/tz_vars.c create mode 100644 reactos/lib/crt/time/tzfile.h create mode 100644 reactos/lib/crt/time/wctime.c create mode 100644 reactos/lib/crt/time/wstrdate.c create mode 100644 reactos/lib/crt/time/wstrtime.c create mode 100644 reactos/lib/crt/wine/cpp.c create mode 100644 reactos/lib/crt/wine/cppexcept.c create mode 100644 reactos/lib/crt/wine/heap.c create mode 100644 reactos/lib/crt/wine/thread.c create mode 100644 reactos/lib/crt/wstring/wcscoll.c create mode 100644 reactos/lib/crt/wstring/wcscspn.c create mode 100644 reactos/lib/crt/wstring/wcsdup.c create mode 100644 reactos/lib/crt/wstring/wcsicmp.c create mode 100644 reactos/lib/crt/wstring/wcslwr.c create mode 100644 reactos/lib/crt/wstring/wcsnicmp.c create mode 100644 reactos/lib/crt/wstring/wcspbrk.c create mode 100644 reactos/lib/crt/wstring/wcsrev.c create mode 100644 reactos/lib/crt/wstring/wcsset.c create mode 100644 reactos/lib/crt/wstring/wcsspn.c create mode 100644 reactos/lib/crt/wstring/wcsstr.c create mode 100644 reactos/lib/crt/wstring/wcstok.c create mode 100644 reactos/lib/crt/wstring/wcsupr.c create mode 100644 reactos/lib/crt/wstring/wcsxfrm.c create mode 100644 reactos/lib/crt/wstring/wlasttok.c diff --git a/reactos/lib/crt/README.txt b/reactos/lib/crt/README.txt new file mode 100644 index 00000000000..8853dceee74 --- /dev/null +++ b/reactos/lib/crt/README.txt @@ -0,0 +1,13 @@ +This file contains information about the status the MSVCRT runtime in ReactOS. + +Please note that all of the MSVCRT.DLL runtime sources are license GPL unless +otherwise noted. The sources from WINE are dual licensed GPL/LGPL. +If you update a function in the ~/wine directory please send a patch to wine-patches@winehq.com + +TODO List: +Implement the remaining functions that are commented out in the .def file +Update source code headers for the license information. +Compleate the W32API conversion for all source files. +Write a decent regression test suite. +Convert all C++ style comments to C style comments. +???? diff --git a/reactos/lib/crt/conio/cgets.c b/reactos/lib/crt/conio/cgets.c new file mode 100644 index 00000000000..dfdb99bf1b0 --- /dev/null +++ b/reactos/lib/crt/conio/cgets.c @@ -0,0 +1,74 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: msvcrt/conio/cgets.c + * PURPOSE: C Runtime + * PROGRAMMER: Eric Kohl (Imported from DJGPP) + */ + +#include +#include + +/* + * @implemented + */ +char *_cgets(char *string) +{ + unsigned len = 0; + unsigned int maxlen_wanted; + char *sp; + int c; + /* + * Be smart and check for NULL pointer. + * Don't know wether TURBOC does this. + */ + if (!string) + return(NULL); + maxlen_wanted = (unsigned int)((unsigned char)string[0]); + sp = &(string[2]); + /* + * Should the string be shorter maxlen_wanted including or excluding + * the trailing '\0' ? We don't take any risk. + */ + while(len < maxlen_wanted-1) + { + c=_getch(); + /* + * shold we check for backspace here? + * TURBOC does (just checked) but doesn't in cscanf (thats harder + * or even impossible). We do the same. + */ + if (c == '\b') + { + if (len > 0) + { + _cputs("\b \b"); /* go back, clear char on screen with space + and go back again */ + len--; + sp[len] = '\0'; /* clear the character in the string */ + } + } + else if (c == '\r') + { + sp[len] = '\0'; + break; + } + else if (c == 0) + { + /* special character ends input */ + sp[len] = '\0'; + _ungetch(c); /* keep the char for later processing */ + break; + } + else + { + sp[len] = _putch(c); + len++; + } + } + sp[maxlen_wanted-1] = '\0'; + string[1] = (char)((unsigned char)len); + return(sp); +} + + diff --git a/reactos/lib/crt/conio/cprintf.c b/reactos/lib/crt/conio/cprintf.c new file mode 100644 index 00000000000..b8e487edca3 --- /dev/null +++ b/reactos/lib/crt/conio/cprintf.c @@ -0,0 +1,28 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: msvcrt/conio/cprintf.c + * PURPOSE: C Runtime + * PROGRAMMER: Eric Kohl (Imported from DJGPP) + */ + +#include +#include + +/* + * @unimplemented + */ +int +_cprintf(const char *fmt, ...) +{ + int cnt; + char buf[ 2048 ]; /* this is buggy, because buffer might be too small. */ + va_list ap; + + va_start(ap, fmt); + cnt = vsprintf(buf, fmt, ap); + va_end(ap); + + _cputs(buf); + return cnt; +} diff --git a/reactos/lib/crt/conio/cputs.c b/reactos/lib/crt/conio/cputs.c new file mode 100644 index 00000000000..008afd39781 --- /dev/null +++ b/reactos/lib/crt/conio/cputs.c @@ -0,0 +1,28 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: lib/msvcrt/conio/cputs.c + * PURPOSE: Writes a character to stdout + * PROGRAMER: Boudewijn Dekker + * UPDATE HISTORY: + * 28/12/98: Created + */ + +#include "precomp.h" +#include +#include +#include +#include + + +/* + * @implemented + */ +int _cputs(const char *_str) +{ + int len = strlen(_str); + DWORD written = 0; + if (!WriteFile(filehnd(stdout->_file),_str,len,&written,NULL)) + return -1; + return 0; +} diff --git a/reactos/lib/crt/conio/cscanf.c b/reactos/lib/crt/conio/cscanf.c new file mode 100644 index 00000000000..f508c18d212 --- /dev/null +++ b/reactos/lib/crt/conio/cscanf.c @@ -0,0 +1,29 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: msvcrt/conio/cscanf.c + * PURPOSE: C Runtime + * PROGRAMMER: Eric Kohl (Imported from DJGPP) + */ + +#include +#include +#include +#include + +/* + * @unimplemented + */ +int _cscanf(char *fmt, ...) +{ + int cnt; + + va_list ap; + + //fixme cscanf should scan the console's keyboard + va_start(ap, fmt); + cnt = __vscanf(fmt, ap); + va_end(ap); + + return cnt; +} diff --git a/reactos/lib/crt/conio/getch.c b/reactos/lib/crt/conio/getch.c new file mode 100644 index 00000000000..bcbe825f5c2 --- /dev/null +++ b/reactos/lib/crt/conio/getch.c @@ -0,0 +1,54 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: lib/msvcrt/conio/getch.c + * PURPOSE: Writes a character to stdout + * PROGRAMER: Boudewijn Dekker + * UPDATE HISTORY: + * 28/12/98: Created + */ + +#include "precomp.h" +#include +#include +#include +#include + + +/* + * @implemented + */ +int _getch(void) +{ + DWORD NumberOfCharsRead = 0; + char c; + if (char_avail) { + c = ungot_char; + char_avail = 0; + } else { + ReadConsoleA(_get_osfhandle(stdin->_file), + &c, + 1, + &NumberOfCharsRead, + NULL); + } + if (c == 10) + c = 13; + putchar(c); + return c; +} + +#if 0 +/* + * @unimplemented + */ +int _getche(void) +{ + int c; + + c = _getch(); + _putch(c); + + return c; +} +#endif diff --git a/reactos/lib/crt/conio/getche.c b/reactos/lib/crt/conio/getche.c new file mode 100644 index 00000000000..b9fb42a8094 --- /dev/null +++ b/reactos/lib/crt/conio/getche.c @@ -0,0 +1,31 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details + * PROJECT: ReactOS system libraries + * FILE: lib/msvcrt/conio/getche.c + * PURPOSE: Reads a character from stdin + * PROGRAMER: DJ Delorie + Boudewijn Dekker + * UPDATE HISTORY: + * 28/12/98: Created + */ + +#include +#include + + +int getche(void) +{ + if (char_avail) + /* + * We don't know, wether the ungot char was already echoed + * we assume yes (for example in cscanf, probably the only + * place where ungetch is ever called. + * There is no way to check for this really, because + * ungetch could have been called with a character that + * hasn't been got by a conio function. + * We don't echo again. + */ + return(getch()); + return (_putch(getch())); +} diff --git a/reactos/lib/crt/conio/kbhit.c b/reactos/lib/crt/conio/kbhit.c new file mode 100644 index 00000000000..b61000d3e25 --- /dev/null +++ b/reactos/lib/crt/conio/kbhit.c @@ -0,0 +1,33 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: lib/msvcrt/conio/kbhit.c + * PURPOSE: Checks for keyboard hits + * PROGRAMER: Boudewijn Dekker + * UPDATE HISTORY: + * 28/12/98: Created + */ + +#include "precomp.h" +#include +#include + + +/* + * FIXME PeekConsoleInput returns more than keyboard hits + * + * @unimplemented + */ +int _kbhit(void) +{ + //INPUT_RECORD InputRecord; + DWORD NumberRead=0; + if (char_avail) + return(1); + else { + //FIXME PeekConsoleInput might do DeviceIo + //PeekConsoleInput((HANDLE)stdin->_file,&InputRecord,1,&NumberRead); + return NumberRead; + } + return 0; +} diff --git a/reactos/lib/crt/conio/putch.c b/reactos/lib/crt/conio/putch.c new file mode 100644 index 00000000000..dc95ffedb6c --- /dev/null +++ b/reactos/lib/crt/conio/putch.c @@ -0,0 +1,25 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: lib/msvcrt/conio/putch.c + * PURPOSE: Writes a character to stdout + * PROGRAMER: Boudewijn Dekker + * UPDATE HISTORY: + * 28/12/98: Created + */ + +#include "precomp.h" +#include + +/* + * @implemented + */ +int _putch(int c) +{ + DWORD NumberOfCharsWritten; + + if (WriteFile(GetStdHandle(STD_OUTPUT_HANDLE),&c,1,&NumberOfCharsWritten,NULL)) { + return -1; + } + return NumberOfCharsWritten; +} diff --git a/reactos/lib/crt/conio/ungetch.c b/reactos/lib/crt/conio/ungetch.c new file mode 100644 index 00000000000..e767b6efa4f --- /dev/null +++ b/reactos/lib/crt/conio/ungetch.c @@ -0,0 +1,32 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details + * PROJECT: ReactOS system libraries + * FILE: lib/msvcrt/conio/ungetch.c + * PURPOSE: Ungets a character from stdin + * PROGRAMER: DJ Delorie + Boudewijn Dekker [ Adapted from djgpp libc ] + * UPDATE HISTORY: + * 28/12/98: Created + */ + +#include +#include + +#define EOF -1 + +int char_avail = 0; +int ungot_char = 0; + + +/* + * @implemented + */ +int _ungetch(int c) +{ + if (char_avail) + return(EOF); + ungot_char = c; + char_avail = 1; + return(c); +} diff --git a/reactos/lib/crt/ctype/ctype.c b/reactos/lib/crt/ctype/ctype.c new file mode 100644 index 00000000000..3c88c06e704 --- /dev/null +++ b/reactos/lib/crt/ctype/ctype.c @@ -0,0 +1,271 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: msvcrt/ctype/ctype.c + * PURPOSE: C Runtime + * PROGRAMMER: Copyright (C) 1995 DJ Delorie + */ + +#include + +unsigned short _ctype[] = { + 0, /* , 0xFFFF */ + _CONTROL, /* CTRL+@, 0x00 */ + _CONTROL, /* CTRL+A, 0x01 */ + _CONTROL, /* CTRL+B, 0x02 */ + _CONTROL, /* CTRL+C, 0x03 */ + _CONTROL, /* CTRL+D, 0x04 */ + _CONTROL, /* CTRL+E, 0x05 */ + _CONTROL, /* CTRL+F, 0x06 */ + _CONTROL, /* CTRL+G, 0x07 */ + _CONTROL, /* CTRL+H, 0x08 */ + _CONTROL | _SPACE, /* CTRL+I, 0x09 */ + _CONTROL | _SPACE, /* CTRL+J, 0x0a */ + _CONTROL | _SPACE, /* CTRL+K, 0x0b */ + _CONTROL | _SPACE, /* CTRL+L, 0x0c */ + _CONTROL | _SPACE, /* CTRL+M, 0x0d */ + _CONTROL, /* CTRL+N, 0x0e */ + _CONTROL, /* CTRL+O, 0x0f */ + _CONTROL, /* CTRL+P, 0x10 */ + _CONTROL, /* CTRL+Q, 0x11 */ + _CONTROL, /* CTRL+R, 0x12 */ + _CONTROL, /* CTRL+S, 0x13 */ + _CONTROL, /* CTRL+T, 0x14 */ + _CONTROL, /* CTRL+U, 0x15 */ + _CONTROL, /* CTRL+V, 0x16 */ + _CONTROL, /* CTRL+W, 0x17 */ + _CONTROL, /* CTRL+X, 0x18 */ + _CONTROL, /* CTRL+Y, 0x19 */ + _CONTROL, /* CTRL+Z, 0x1a */ + _CONTROL, /* CTRL+[, 0x1b */ + _CONTROL, /* CTRL+\, 0x1c */ + _CONTROL, /* CTRL+], 0x1d */ + _CONTROL, /* CTRL+^, 0x1e */ + _CONTROL, /* CTRL+_, 0x1f */ + _SPACE | _BLANK, /* ` ', 0x20 */ + _PUNCT, /* `!', 0x21 */ + _PUNCT, /* 0x22 */ + _PUNCT, /* `#', 0x23 */ + _PUNCT, /* `$', 0x24 */ + _PUNCT, /* `%', 0x25 */ + _PUNCT, /* `&', 0x26 */ + _PUNCT, /* 0x27 */ + _PUNCT, /* `(', 0x28 */ + _PUNCT, /* `)', 0x29 */ + _PUNCT, /* `*', 0x2a */ + _PUNCT, /* `+', 0x2b */ + _PUNCT, /* `,', 0x2c */ + _PUNCT, /* `-', 0x2d */ + _PUNCT, /* `.', 0x2e */ + _PUNCT, /* `/', 0x2f */ + _DIGIT | _HEX, /* `0', 0x30 */ + _DIGIT | _HEX, /* `1', 0x31 */ + _DIGIT | _HEX, /* `2', 0x32 */ + _DIGIT | _HEX, /* `3', 0x33 */ + _DIGIT | _HEX, /* `4', 0x34 */ + _DIGIT | _HEX, /* `5', 0x35 */ + _DIGIT | _HEX, /* `6', 0x36 */ + _DIGIT | _HEX, /* `7', 0x37 */ + _DIGIT | _HEX, /* `8', 0x38 */ + _DIGIT | _HEX, /* `9', 0x39 */ + _PUNCT, /* `:', 0x3a */ + _PUNCT, /* `;', 0x3b */ + _PUNCT, /* `<', 0x3c */ + _PUNCT, /* `=', 0x3d */ + _PUNCT, /* `>', 0x3e */ + _PUNCT, /* `?', 0x3f */ + _PUNCT, /* `@', 0x40 */ + _UPPER | _HEX, /* `A', 0x41 */ + _UPPER | _HEX, /* `B', 0x42 */ + _UPPER | _HEX, /* `C', 0x43 */ + _UPPER | _HEX, /* `D', 0x44 */ + _UPPER | _HEX, /* `E', 0x45 */ + _UPPER | _HEX, /* `F', 0x46 */ + _UPPER, /* `G', 0x47 */ + _UPPER, /* `H', 0x48 */ + _UPPER, /* `I', 0x49 */ + _UPPER, /* `J', 0x4a */ + _UPPER, /* `K', 0x4b */ + _UPPER, /* `L', 0x4c */ + _UPPER, /* `M', 0x4d */ + _UPPER, /* `N', 0x4e */ + _UPPER, /* `O', 0x4f */ + _UPPER, /* `P', 0x50 */ + _UPPER, /* `Q', 0x51 */ + _UPPER, /* `R', 0x52 */ + _UPPER, /* `S', 0x53 */ + _UPPER, /* `T', 0x54 */ + _UPPER, /* `U', 0x55 */ + _UPPER, /* `V', 0x56 */ + _UPPER, /* `W', 0x57 */ + _UPPER, /* `X', 0x58 */ + _UPPER, /* `Y', 0x59 */ + _UPPER, /* `Z', 0x5a */ + _PUNCT, /* `[', 0x5b */ + _PUNCT, /* 0x5c */ + _PUNCT, /* `]', 0x5d */ + _PUNCT, /* `^', 0x5e */ + _PUNCT, /* `_', 0x5f */ + _PUNCT, /* 0x60 */ + _LOWER | _HEX, /* `a', 0x61 */ + _LOWER | _HEX, /* `b', 0x62 */ + _LOWER | _HEX, /* `c', 0x63 */ + _LOWER | _HEX, /* `d', 0x64 */ + _LOWER | _HEX, /* `e', 0x65 */ + _LOWER | _HEX, /* `f', 0x66 */ + _LOWER, /* `g', 0x67 */ + _LOWER, /* `h', 0x68 */ + _LOWER, /* `i', 0x69 */ + _LOWER, /* `j', 0x6a */ + _LOWER, /* `k', 0x6b */ + _LOWER, /* `l', 0x6c */ + _LOWER, /* `m', 0x6d */ + _LOWER, /* `n', 0x6e */ + _LOWER, /* `o', 0x6f */ + _LOWER, /* `p', 0x70 */ + _LOWER, /* `q', 0x71 */ + _LOWER, /* `r', 0x72 */ + _LOWER, /* `s', 0x73 */ + _LOWER, /* `t', 0x74 */ + _LOWER, /* `u', 0x75 */ + _LOWER, /* `v', 0x76 */ + _LOWER, /* `w', 0x77 */ + _LOWER, /* `x', 0x78 */ + _LOWER, /* `y', 0x79 */ + _LOWER, /* `z', 0x7a */ + _PUNCT, /* `{', 0x7b */ + _PUNCT, /* `|', 0x7c */ + _PUNCT, /* `}', 0x7d */ + _PUNCT, /* `~', 0x7e */ + _CONTROL, /* 0x7f */ + 0, /* 0x80 */ + 0, /* 0x81 */ + 0, /* 0x82 */ + 0, /* 0x83 */ + 0, /* 0x84 */ + 0, /* 0x85 */ + 0, /* 0x86 */ + 0, /* 0x87 */ + 0, /* 0x88 */ + 0, /* 0x89 */ + 0, /* 0x8a */ + 0, /* 0x8b */ + 0, /* 0x8c */ + 0, /* 0x8d */ + 0, /* 0x8e */ + 0, /* 0x8f */ + 0, /* 0x90 */ + 0, /* 0x91 */ + 0, /* 0x92 */ + 0, /* 0x93 */ + 0, /* 0x94 */ + 0, /* 0x95 */ + 0, /* 0x96 */ + 0, /* 0x97 */ + 0, /* 0x98 */ + 0, /* 0x99 */ + 0, /* 0x9a */ + 0, /* 0x9b */ + 0, /* 0x9c */ + 0, /* 0x9d */ + 0, /* 0x9e */ + 0, /* 0x9f */ + 0, /* 0xa0 */ + 0, /* 0xa1 */ + 0, /* 0xa2 */ + 0, /* 0xa3 */ + 0, /* 0xa4 */ + 0, /* 0xa5 */ + 0, /* 0xa6 */ + 0, /* 0xa7 */ + 0, /* 0xa8 */ + 0, /* 0xa9 */ + 0, /* 0xaa */ + 0, /* 0xab */ + 0, /* 0xac */ + 0, /* 0xad */ + 0, /* 0xae */ + 0, /* 0xaf */ + 0, /* 0xb0 */ + 0, /* 0xb1 */ + 0, /* 0xb2 */ + 0, /* 0xb3 */ + 0, /* 0xb4 */ + 0, /* 0xb5 */ + 0, /* 0xb6 */ + 0, /* 0xb7 */ + 0, /* 0xb8 */ + 0, /* 0xb9 */ + 0, /* 0xba */ + 0, /* 0xbb */ + 0, /* 0xbc */ + 0, /* 0xbd */ + 0, /* 0xbe */ + 0, /* 0xbf */ + 0, /* 0xc0 */ + 0, /* 0xc1 */ + 0, /* 0xc2 */ + 0, /* 0xc3 */ + 0, /* 0xc4 */ + 0, /* 0xc5 */ + 0, /* 0xc6 */ + 0, /* 0xc7 */ + 0, /* 0xc8 */ + 0, /* 0xc9 */ + 0, /* 0xca */ + 0, /* 0xcb */ + 0, /* 0xcc */ + 0, /* 0xcd */ + 0, /* 0xce */ + 0, /* 0xcf */ + 0, /* 0xd0 */ + 0, /* 0xd1 */ + 0, /* 0xd2 */ + 0, /* 0xd3 */ + 0, /* 0xd4 */ + 0, /* 0xd5 */ + 0, /* 0xd6 */ + 0, /* 0xd7 */ + 0, /* 0xd8 */ + 0, /* 0xd9 */ + 0, /* 0xda */ + 0, /* 0xdb */ + 0, /* 0xdc */ + 0, /* 0xdd */ + 0, /* 0xde */ + 0, /* 0xdf */ + 0, /* 0xe0 */ + 0, /* 0xe1 */ + 0, /* 0xe2 */ + 0, /* 0xe3 */ + 0, /* 0xe4 */ + 0, /* 0xe5 */ + 0, /* 0xe6 */ + 0, /* 0xe7 */ + 0, /* 0xe8 */ + 0, /* 0xe9 */ + 0, /* 0xea */ + 0, /* 0xeb */ + 0, /* 0xec */ + 0, /* 0xed */ + 0, /* 0xee */ + 0, /* 0xef */ + 0, /* 0xf0 */ + 0, /* 0xf1 */ + 0, /* 0xf2 */ + 0, /* 0xf3 */ + 0, /* 0xf4 */ + 0, /* 0xf5 */ + 0, /* 0xf6 */ + 0, /* 0xf7 */ + 0, /* 0xf8 */ + 0, /* 0xf9 */ + 0, /* 0xfa */ + 0, /* 0xfb */ + 0, /* 0xfc */ + 0, /* 0xfd */ + 0, /* 0xfe */ + 0 /* 0xff */ +}; + +/* EOF */ diff --git a/reactos/lib/crt/ctype/isalnum.c b/reactos/lib/crt/ctype/isalnum.c new file mode 100644 index 00000000000..4aa76701247 --- /dev/null +++ b/reactos/lib/crt/ctype/isalnum.c @@ -0,0 +1,29 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: lib/msvcrt/ctype/isalnum.c + * PURPOSE: Test for a alpha numeric character + * PROGRAMER: Boudewijn Dekker + * UPDATE HISTORY: + * 28/12/98: Created + */ +#include + + +#undef isalnum +/* + * @implemented + */ +int isalnum(int c) +{ + return _isctype(c, _ALPHA | _DIGIT); +} + +#undef iswalnum +/* + * @implemented + */ +int iswalnum(wint_t c) +{ + return iswctype(c, _ALPHA | _DIGIT); +} diff --git a/reactos/lib/crt/ctype/isalpha.c b/reactos/lib/crt/ctype/isalpha.c new file mode 100644 index 00000000000..9fc0cb0093f --- /dev/null +++ b/reactos/lib/crt/ctype/isalpha.c @@ -0,0 +1,31 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: lib/mscvrt/ctype/isalpha.c + * PURPOSE: Checks if a character is alphanumeric + * PROGRAMER: Boudewijn Dekker + * UPDATE HISTORY: + * 28/12/98: Created + */ + +#include + + +#undef isalpha + +/* + * @implemented + */ +int isalpha(int c) +{ + return _isctype(c, _ALPHA); +} + +#undef iswalpha +/* + * @implemented + */ +int iswalpha(wint_t c) +{ + return iswctype(c, _ALPHA); +} diff --git a/reactos/lib/crt/ctype/isascii.c b/reactos/lib/crt/ctype/isascii.c new file mode 100644 index 00000000000..742d39dbbc5 --- /dev/null +++ b/reactos/lib/crt/ctype/isascii.c @@ -0,0 +1,27 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: lib/msvcrt/ctype/isascii.c + * PURPOSE: Checks if a character is ascii + * PROGRAMER: Boudewijn Dekker + * UPDATE HISTORY: + * 28/12/98: Created + */ + +#include + +/* + * @implemented + */ +int __isascii(int c) +{ + return (!((c)&(~0x7f))); +} + +/* + * @implemented + */ +int iswascii(wint_t c) +{ + return __isascii(c); +} diff --git a/reactos/lib/crt/ctype/iscntrl.c b/reactos/lib/crt/ctype/iscntrl.c new file mode 100644 index 00000000000..c7e64b861d9 --- /dev/null +++ b/reactos/lib/crt/ctype/iscntrl.c @@ -0,0 +1,27 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: msvcrt/ctype/iscntrl.c + * PURPOSE: C Runtime + * PROGRAMMER: Copyright (C) 1995 DJ Delorie + */ + +#include + +#undef iscntrl +/* + * @implemented + */ +int iscntrl(int c) +{ + return _isctype(c, _CONTROL); +} + +#undef iswcntrl +/* + * @implemented + */ +int iswcntrl(wint_t c) +{ + return iswctype(c, _CONTROL); +} diff --git a/reactos/lib/crt/ctype/iscsym.c b/reactos/lib/crt/ctype/iscsym.c new file mode 100644 index 00000000000..8608062b8e8 --- /dev/null +++ b/reactos/lib/crt/ctype/iscsym.c @@ -0,0 +1,27 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: lib/msvcrt/ctype/iscsym.c + * PURPOSE: Check for a valid characters in a c symbol + * PROGRAMER: Boudewijn Dekker + * UPDATE HISTORY: + * 28/12/98: Created + */ +#include + + +/* + * @implemented + */ +int __iscsymf(int c) +{ + return (isalpha(c) || ( c == '_' )) ; +} + +/* + * @implemented + */ +int __iscsym(int c) +{ + return (isalnum(c) || ( c == '_' )) ; +} diff --git a/reactos/lib/crt/ctype/isctype.c b/reactos/lib/crt/ctype/isctype.c new file mode 100644 index 00000000000..7542a609d00 --- /dev/null +++ b/reactos/lib/crt/ctype/isctype.c @@ -0,0 +1,60 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: msvcrt/ctype/isctype.c + * PURPOSE: C Runtime + * PROGRAMMER: Copyright (C) 1995 DJ Delorie + */ + +#include + + +extern unsigned short _ctype[]; + +unsigned short *_pctype = _ctype + 1; +unsigned short *_pwctype = _ctype + 1; + + +/* + * @implemented + */ +unsigned short **__p__pctype(void) +{ + return &_pctype; +} + +/* + * @implemented + */ +unsigned short **__p__pwctype(void) +{ + return &_pwctype; +} + +/* + * @implemented + */ +int _isctype(unsigned int c, int ctypeFlags) +{ + return (_pctype[(unsigned char)(c & 0xFF)] & ctypeFlags); +} + +/* + * @implemented + */ +int iswctype(wint_t wc, wctype_t wctypeFlags) +{ + return (_pwctype[(unsigned char)(wc & 0xFF)] & wctypeFlags); +} + +/* + * obsolete + * + * @implemented + */ +int is_wctype(wint_t wc, wctype_t wctypeFlags) +{ + return (_pwctype[(unsigned char)(wc & 0xFF)] & wctypeFlags); +} + +/* EOF */ diff --git a/reactos/lib/crt/ctype/isdigit.c b/reactos/lib/crt/ctype/isdigit.c new file mode 100644 index 00000000000..36783d43587 --- /dev/null +++ b/reactos/lib/crt/ctype/isdigit.c @@ -0,0 +1,28 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: msvcrt/ctype/isdigit.c + * PURPOSE: C Runtime + * PROGRAMMER: Copyright (C) 1995 DJ Delorie + */ + +#include + + +#undef isdigit +/* + * @implemented + */ +int isdigit(int c) +{ + return _isctype(c, _DIGIT); +} + +#undef iswdigit +/* + * @implemented + */ +int iswdigit(wint_t c) +{ + return iswctype(c, _DIGIT); +} diff --git a/reactos/lib/crt/ctype/isgraph.c b/reactos/lib/crt/ctype/isgraph.c new file mode 100644 index 00000000000..9b614805a0f --- /dev/null +++ b/reactos/lib/crt/ctype/isgraph.c @@ -0,0 +1,27 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: msvcrt/ctype/isgraph.c + * PURPOSE: C Runtime + * PROGRAMMER: Copyright (C) 1995 DJ Delorie + */ + +#include + +#undef isgraph +/* + * @implemented + */ +int isgraph(int c) +{ + return _isctype(c,_PUNCT | _ALPHA | _DIGIT); +} + +#undef iswgraph +/* + * @implemented + */ +int iswgraph(wint_t c) +{ + return iswctype(c,_PUNCT | _ALPHA | _DIGIT); +} diff --git a/reactos/lib/crt/ctype/islower.c b/reactos/lib/crt/ctype/islower.c new file mode 100644 index 00000000000..c91e5dde091 --- /dev/null +++ b/reactos/lib/crt/ctype/islower.c @@ -0,0 +1,27 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: msvcrt/ctype/islower.c + * PURPOSE: C Runtime + * PROGRAMMER: Copyright (C) 1995 DJ Delorie + */ + +#include + + +#undef islower +/* + * @implemented + */ +int islower(int c) +{ + return _isctype(c, _LOWER); +} + +/* + * @implemented + */ +int iswlower(wint_t c) +{ + return iswctype(c, _LOWER); +} diff --git a/reactos/lib/crt/ctype/isprint.c b/reactos/lib/crt/ctype/isprint.c new file mode 100644 index 00000000000..1f234240254 --- /dev/null +++ b/reactos/lib/crt/ctype/isprint.c @@ -0,0 +1,26 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: msvcrt/ctype/isprint.c + * PURPOSE: C Runtime + * PROGRAMMER: Copyright (C) 1995 DJ Delorie + */ + +#include + +#undef isprint +/* + * @implemented + */ +int isprint(int c) +{ + return _isctype(c,_BLANK | _PUNCT | _ALPHA | _DIGIT); +} + +/* + * @implemented + */ +int iswprint(wint_t c) +{ + return iswctype((unsigned short)c,_BLANK | _PUNCT | _ALPHA | _DIGIT); +} diff --git a/reactos/lib/crt/ctype/ispunct.c b/reactos/lib/crt/ctype/ispunct.c new file mode 100644 index 00000000000..51fe12e3693 --- /dev/null +++ b/reactos/lib/crt/ctype/ispunct.c @@ -0,0 +1,27 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: msvcrt/ctype/ispunct.c + * PURPOSE: C Runtime + * PROGRAMMER: Copyright (C) 1995 DJ Delorie + */ + +#include + +#undef ispunct +/* + * @implemented + */ +int ispunct(int c) +{ + return _isctype(c, _PUNCT); +} + +#undef iswpunct +/* + * @implemented + */ +int iswpunct(wint_t c) +{ + return iswctype(c, _PUNCT); +} diff --git a/reactos/lib/crt/ctype/isspace.c b/reactos/lib/crt/ctype/isspace.c new file mode 100644 index 00000000000..6f74756b1ed --- /dev/null +++ b/reactos/lib/crt/ctype/isspace.c @@ -0,0 +1,30 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: lib/msvcrt/ctype/isspace.c + * PURPOSE: Test for a space character + * PROGRAMER: Boudewijn Dekker + * UPDATE HISTORY: + * 28/12/98: Created + */ + +#include + + +#undef isspace +/* + * @implemented + */ +int isspace(int c) +{ + return _isctype(c,_SPACE); +} + +#undef iswspace +/* + * @implemented + */ +int iswspace(wint_t c) +{ + return iswctype(c,_SPACE); +} diff --git a/reactos/lib/crt/ctype/isupper.c b/reactos/lib/crt/ctype/isupper.c new file mode 100644 index 00000000000..6e090255de9 --- /dev/null +++ b/reactos/lib/crt/ctype/isupper.c @@ -0,0 +1,26 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: msvcrt/ctype/isupper.c + * PURPOSE: C Runtime + * PROGRAMMER: Copyright (C) 1995 DJ Delorie + */ + +#include + +#undef isupper +/* + * @implemented + */ +int isupper(int c) +{ + return _isctype(c, _UPPER); +} + +/* + * @implemented + */ +int iswupper(wint_t c) +{ + return iswctype(c, _UPPER); +} diff --git a/reactos/lib/crt/ctype/isxdigit.c b/reactos/lib/crt/ctype/isxdigit.c new file mode 100644 index 00000000000..3490c07924f --- /dev/null +++ b/reactos/lib/crt/ctype/isxdigit.c @@ -0,0 +1,28 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: msvcrt/ctype/isxdigit.c + * PURPOSE: C Runtime + * PROGRAMMER: Copyright (C) 1995 DJ Delorie + */ + +#include + +#undef isxdigit +/* + * @implemented + */ +int isxdigit(int c) +{ + return _isctype(c, _HEX); +} + +#undef iswxdigit +/* + * @implemented + */ +int iswxdigit(wint_t c) +{ + return iswctype(c, _HEX); +} + diff --git a/reactos/lib/crt/ctype/toascii.c b/reactos/lib/crt/ctype/toascii.c new file mode 100644 index 00000000000..8ad09e23c83 --- /dev/null +++ b/reactos/lib/crt/ctype/toascii.c @@ -0,0 +1,17 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: msvcrt/ctype/toascii.c + * PURPOSE: C Runtime + * PROGRAMMER: Copyright (C) 1995 DJ Delorie + */ + +#include + +/* + * @implemented + */ +int __toascii(int c) +{ + return((unsigned)(c) & 0x7F); +} diff --git a/reactos/lib/crt/ctype/tolower.c b/reactos/lib/crt/ctype/tolower.c new file mode 100644 index 00000000000..48c8788020f --- /dev/null +++ b/reactos/lib/crt/ctype/tolower.c @@ -0,0 +1,51 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: msvcrt/ctype/tolower.c + * PURPOSE: C Runtime + * PROGRAMMER: Copyright (C) 1995 DJ Delorie + */ + +#include + +#undef tolower +/* + * @implemented + */ +int tolower(int c) +{ + if (_isctype (c, _UPPER)) + return (c - ('A' - 'a')); + return(c); +} + +#undef towlower +/* + * @implemented + */ +wchar_t towlower(wchar_t c) +{ + if (iswctype (c, _UPPER)) + return (c - (L'A' - L'a')); + return(c); +} + +/* + * @implemented + */ +int _tolower(int c) +{ + return (c - ('A' - 'a')); +} + +/* +int towlower(wint_t); +int towupper(wint_t); + +wchar_t _towlower(wchar_t c) +{ + return (c - (L'A' - L'a')); +} +*/ + + diff --git a/reactos/lib/crt/ctype/toupper.c b/reactos/lib/crt/ctype/toupper.c new file mode 100644 index 00000000000..7e21e65e226 --- /dev/null +++ b/reactos/lib/crt/ctype/toupper.c @@ -0,0 +1,47 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: msvcrt/ctype/toupper.c + * PURPOSE: C Runtime + * PROGRAMMER: Copyright (C) 1995 DJ Delorie + */ + +#include + +#undef toupper +/* + * @implemented + */ +int toupper(int c) +{ + if (_isctype (c, _LOWER)) + return (c + ('A' - 'a')); + return(c); +} + +#undef towupper +/* + * @implemented + */ +wchar_t towupper(wchar_t c) +{ + if (iswctype (c, _LOWER)) + return (c + (L'A' - L'a')); + return(c); +} + +/* + * @implemented + */ +int _toupper(int c) +{ + return (c + ('A' - 'a')); +} + +/* +wchar_t _towupper(wchar_t c) +{ + return (c + (L'A' - L'a')); +} +*/ + diff --git a/reactos/lib/crt/direct/chdir.c b/reactos/lib/crt/direct/chdir.c new file mode 100644 index 00000000000..2a48e5cad53 --- /dev/null +++ b/reactos/lib/crt/direct/chdir.c @@ -0,0 +1,16 @@ +#include "precomp.h" +#include +#include +#include + +/* + * @implemented + */ +int _chdir(const char* _path) +{ + if (!SetCurrentDirectoryA((char*)_path)) { + _dosmaperr(GetLastError()); + return -1; + } + return 0; +} diff --git a/reactos/lib/crt/direct/chdrive.c b/reactos/lib/crt/direct/chdrive.c new file mode 100644 index 00000000000..250aace5d2c --- /dev/null +++ b/reactos/lib/crt/direct/chdrive.c @@ -0,0 +1,34 @@ +#include "precomp.h" +#include +#include +#include +#include +#include + + +int cur_drive = 0; + + +/* + * @implemented + */ +int _chdrive(int drive) +{ + char d[3]; + + if (!( drive >= 1 && drive <= 26)) { + __set_errno(EINVAL); + return -1; + } + if (cur_drive != drive) { + cur_drive = drive; + d[0] = toupper(cur_drive + '@'); + d[1] = ':'; + d[2] = 0; + if (!SetCurrentDirectoryA(d)) { + _dosmaperr(GetLastError()); + return -1; + } + } + return 0; +} diff --git a/reactos/lib/crt/direct/getcwd.c b/reactos/lib/crt/direct/getcwd.c new file mode 100644 index 00000000000..a9801b6e8eb --- /dev/null +++ b/reactos/lib/crt/direct/getcwd.c @@ -0,0 +1,31 @@ +#include "precomp.h" +#include +#include +#include +#include + + +/* + * @implemented + */ +char *_getcwd(char* buffer, int maxlen) +{ + char *cwd; + int len; + + if (buffer == NULL) { + if ( (cwd = malloc(MAX_PATH)) == NULL ) { + __set_errno(ENOMEM); + return NULL; + } + len = MAX_PATH; + } else { + cwd = buffer; + len = maxlen; + } + if (GetCurrentDirectoryA(len, cwd) == 0) { + _dosmaperr(GetLastError()); + return NULL; + } + return cwd; +} diff --git a/reactos/lib/crt/direct/getdcwd.c b/reactos/lib/crt/direct/getdcwd.c new file mode 100644 index 00000000000..3dab6d665b5 --- /dev/null +++ b/reactos/lib/crt/direct/getdcwd.c @@ -0,0 +1,27 @@ +#include "precomp.h" +#include +#include + +/* + * @implemented + */ +char* _getdcwd(int nDrive, char* caBuffer, int nBufLen) +{ + int i =0; + int dr = _getdrive(); + + if (nDrive < 1 || nDrive > 26) + return NULL; + if (dr != nDrive) { + if ( _chdrive(nDrive) != 0 ) + return NULL; + } + i = GetCurrentDirectoryA(nBufLen, caBuffer); + if (i == nBufLen) + return NULL; + if (dr != nDrive) { + if ( _chdrive(dr) != 0 ) + return NULL; + } + return caBuffer; +} diff --git a/reactos/lib/crt/direct/getdfree.c b/reactos/lib/crt/direct/getdfree.c new file mode 100644 index 00000000000..84601c43eeb --- /dev/null +++ b/reactos/lib/crt/direct/getdfree.c @@ -0,0 +1,23 @@ +#include "precomp.h" +#include +#include + + +/* + * @implemented + */ +unsigned int _getdiskfree(unsigned int _drive, struct _diskfree_t* _diskspace) +{ + char RootPathName[10]; + + RootPathName[0] = toupper(_drive +'@'); + RootPathName[1] = ':'; + RootPathName[2] = '\\'; + RootPathName[3] = 0; + if (_diskspace == NULL) + return 0; + if (!GetDiskFreeSpaceA(RootPathName,(LPDWORD)&_diskspace->sectors_per_cluster,(LPDWORD)&_diskspace->bytes_per_sector, + (LPDWORD )&_diskspace->avail_clusters,(LPDWORD )&_diskspace->total_clusters)) + return 0; + return _diskspace->avail_clusters; +} diff --git a/reactos/lib/crt/direct/getdrive.c b/reactos/lib/crt/direct/getdrive.c new file mode 100644 index 00000000000..4074bafbd18 --- /dev/null +++ b/reactos/lib/crt/direct/getdrive.c @@ -0,0 +1,30 @@ +#include "precomp.h" +#include +#include + + +extern int cur_drive; + +/* + * @implemented + */ +int _getdrive(void) +{ + char Buffer[MAX_PATH]; + + if (cur_drive == 0) { + GetCurrentDirectoryA(MAX_PATH, Buffer); + cur_drive = toupper(Buffer[0] - '@'); + } + return cur_drive; +} + +/* + * @unimplemented + */ +unsigned long _getdrives(void) +{ + //fixme get logical drives + //return GetLogicalDrives(); + return 5; // drive A and C +} diff --git a/reactos/lib/crt/direct/mkdir.c b/reactos/lib/crt/direct/mkdir.c new file mode 100644 index 00000000000..bb160d45c68 --- /dev/null +++ b/reactos/lib/crt/direct/mkdir.c @@ -0,0 +1,16 @@ +#include "precomp.h" +#include +#include + + +/* + * @implemented + */ +int _mkdir(const char* _path) +{ + if (!CreateDirectoryA(_path, NULL)) { + _dosmaperr(GetLastError()); + return -1; + } + return 0; +} diff --git a/reactos/lib/crt/direct/rmdir.c b/reactos/lib/crt/direct/rmdir.c new file mode 100644 index 00000000000..5f89e80ad5e --- /dev/null +++ b/reactos/lib/crt/direct/rmdir.c @@ -0,0 +1,16 @@ +#include "precomp.h" +#include +#include + + +/* + * @implemented + */ +int _rmdir(const char* _path) +{ + if (!RemoveDirectoryA(_path)) { + _dosmaperr(GetLastError()); + return -1; + } + return 0; +} diff --git a/reactos/lib/crt/direct/wchdir.c b/reactos/lib/crt/direct/wchdir.c new file mode 100644 index 00000000000..1c92c20f22f --- /dev/null +++ b/reactos/lib/crt/direct/wchdir.c @@ -0,0 +1,17 @@ +#include "precomp.h" +#include +#include +#include +#include + +/* + * @implemented + */ +int _wchdir (const wchar_t *_path) +{ + if (!SetCurrentDirectoryW((wchar_t *)_path)) { + _dosmaperr(GetLastError()); + return -1; + } + return 0; +} diff --git a/reactos/lib/crt/direct/wgetcwd.c b/reactos/lib/crt/direct/wgetcwd.c new file mode 100644 index 00000000000..f1e62f4ea70 --- /dev/null +++ b/reactos/lib/crt/direct/wgetcwd.c @@ -0,0 +1,28 @@ +#include "precomp.h" +#include +#include +#include +#include + + +/* + * @implemented + */ +wchar_t* _wgetcwd(wchar_t* buffer, int maxlen) +{ + wchar_t *cwd; + int len; + if (buffer == NULL) { + if ( (cwd = malloc(MAX_PATH * sizeof(wchar_t))) == NULL ) { + __set_errno(ENOMEM); + return NULL; + } + len = MAX_PATH; + } else { + cwd = buffer; + len = maxlen; + } + if (GetCurrentDirectoryW(len, cwd) == 0) + return NULL; + return cwd; +} diff --git a/reactos/lib/crt/direct/wgetdcwd.c b/reactos/lib/crt/direct/wgetdcwd.c new file mode 100644 index 00000000000..4de0744cf2e --- /dev/null +++ b/reactos/lib/crt/direct/wgetdcwd.c @@ -0,0 +1,32 @@ +#include "precomp.h" +#include +#include + + +/* + * @implemented + */ +wchar_t* _wgetdcwd(int nDrive, wchar_t* caBuffer, int nBufLen) +{ + int i =0; + int dr = _getdrive(); + + if (nDrive < 1 || nDrive > 26) + return NULL; + + if (dr != nDrive) { + if ( _chdrive(nDrive) != 0 ) + return NULL; + } + + i = GetCurrentDirectoryW(nBufLen, caBuffer); + if (i == nBufLen) + return NULL; + + if (dr != nDrive) { + if ( _chdrive(dr) != 0 ) + return NULL; + } + + return caBuffer; +} diff --git a/reactos/lib/crt/direct/wmkdir.c b/reactos/lib/crt/direct/wmkdir.c new file mode 100644 index 00000000000..21faa789bd9 --- /dev/null +++ b/reactos/lib/crt/direct/wmkdir.c @@ -0,0 +1,16 @@ +#include "precomp.h" +#include +#include + + +/* + * @implemented + */ +int _wmkdir(const wchar_t* _path) +{ + if (!CreateDirectoryW(_path, NULL)) { + _dosmaperr(GetLastError()); + return -1; + } + return 0; +} diff --git a/reactos/lib/crt/direct/wrmdir.c b/reactos/lib/crt/direct/wrmdir.c new file mode 100644 index 00000000000..97e7d4b2065 --- /dev/null +++ b/reactos/lib/crt/direct/wrmdir.c @@ -0,0 +1,16 @@ +#include "precomp.h" +#include +#include + + +/* + * @implemented + */ +int _wrmdir(const wchar_t* _path) +{ + if (!RemoveDirectoryW(_path)) { + _dosmaperr(GetLastError()); + return -1; + } + return 0; +} diff --git a/reactos/lib/crt/except/abnorter.c b/reactos/lib/crt/except/abnorter.c new file mode 100644 index 00000000000..a939e846ffe --- /dev/null +++ b/reactos/lib/crt/except/abnorter.c @@ -0,0 +1,18 @@ +#include "precomp.h" +#include + + +#ifdef __GNUC__ + +/* + * @unimplemented + */ +int _abnormal_termination(void) +{ + printf("Abnormal Termination\n"); +// return AbnormalTermination(); + return 0; +} + +#else +#endif diff --git a/reactos/lib/crt/except/exhand2.c b/reactos/lib/crt/except/exhand2.c new file mode 100644 index 00000000000..c5244874e65 --- /dev/null +++ b/reactos/lib/crt/except/exhand2.c @@ -0,0 +1,33 @@ +#include "precomp.h" +#include + +#ifdef __GNUC__ +#else +ULONG DbgPrint(PCH Format,...) +{ + return 0; +} +#endif + +VOID STDCALL +MsvcrtDebug(ULONG Value) +{ + //DbgPrint("MsvcrtDebug 0x%.08x\n", Value); +} + +struct _EXCEPTION_RECORD; +struct _CONTEXT; + +/* + * @implemented + */ +EXCEPTION_DISPOSITION +_except_handler2( +struct _EXCEPTION_RECORD *ExceptionRecord, +void *Frame, +struct _CONTEXT *ContextRecord, +void *DispatcherContext) +{ + //printf("_except_handler2()\n"); + return 0; +} diff --git a/reactos/lib/crt/except/matherr.c b/reactos/lib/crt/except/matherr.c new file mode 100644 index 00000000000..f751c300956 --- /dev/null +++ b/reactos/lib/crt/except/matherr.c @@ -0,0 +1,42 @@ +#include "precomp.h" +#include + + +struct _exception { + int type; + char* name; + double arg1; + double arg2; + double retval; +} ; + + +int _matherr(struct _exception* e) +{ + return 0; +} + +/* + * not exported by NTDLL + * + * @unimplemented + */ +void __setusermatherr(int (*handler)(struct _exception*)) +{ + +} + + +#define _FPIEEE_RECORD void + +/* + * @unimplemented + */ +int _fpieee_flt( + unsigned long exception_code, + struct _EXCEPTION_POINTERS* ExceptionPointer, + int (*handler)(_FPIEEE_RECORD*) + ) +{ + return 0; +} diff --git a/reactos/lib/crt/except/seh.s b/reactos/lib/crt/except/seh.s new file mode 100755 index 00000000000..5e8e7855cb4 --- /dev/null +++ b/reactos/lib/crt/except/seh.s @@ -0,0 +1,379 @@ +/* $Id$ + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS MSVCRT Runtime Library + * PURPOSE: Runtime library exception support for IA-32 + * FILE: lib/msvcrt/except/seh.s + * PROGRAMER: Casper S. Hornstrup (chorns@users.sourceforge.net) + * NOTES: This file is shared with ntoskrnl/rtl/i386/seh.s. + * Please keep them in sync. + */ + +#define ExceptionContinueExecution 0 +#define ExceptionContinueSearch 1 +#define ExceptionNestedException 2 +#define ExceptionCollidedUnwind 3 + +#define EXCEPTION_NONCONTINUABLE 0x01 +#define EXCEPTION_UNWINDING 0x02 +#define EXCEPTION_EXIT_UNWIND 0x04 +#define EXCEPTION_STACK_INVALID 0x08 +#define EXCEPTION_NESTED_CALL 0x10 +#define EXCEPTION_TARGET_UNWIND 0x20 +#define EXCEPTION_COLLIDED_UNWIND 0x40 + +#define EXCEPTION_UNWIND_MODE \ +( EXCEPTION_UNWINDING \ + | EXCEPTION_EXIT_UNWIND \ + | EXCEPTION_TARGET_UNWIND \ + | EXCEPTION_COLLIDED_UNWIND) + +#define EREC_CODE 0x00 +#define EREC_FLAGS 0x04 +#define EREC_RECORD 0x08 +#define EREC_ADDRESS 0x0C +#define EREC_NUMPARAMS 0x10 +#define EREC_INFO 0x14 + +#define TRYLEVEL_NONE -1 +#define TRYLEVEL_INVALID -2 + +#define ER_STANDARDESP -0x08 +#define ER_EPOINTERS -0x04 +#define ER_PREVFRAME 0x00 +#define ER_HANDLER 0x04 +#define ER_SCOPETABLE 0x08 +#define ER_TRYLEVEL 0x0C +#define ER_EBP 0x10 + +#define ST_TRYLEVEL 0x00 +#define ST_FILTER 0x04 +#define ST_HANDLER 0x08 + +#define CONTEXT_EDI 0x9C +#define CONTEXT_EBX 0xA4 +#define CONTEXT_EIP 0xB8 + +.globl __local_unwind2 +.globl __except_handler3 +.globl __EH_prolog + +// EAX = value to print +_do_debug: + pushal + pushl %eax + call _MsvcrtDebug@4 + popal + ret + +#define LU2_TRYLEVEL 0x08 +#define LU2_REGFRAME 0x04 + +// +// void +// _local_unwind2(PEXCEPTION_REGISTRATION RegistrationFrame, +// LONG TryLevel) +// +// Parameters: +// [EDX+08h] - PEXCEPTION_REGISTRATION RegistrationFrame +// [EDX+04h] - LONG TryLevel +// Registers: +// EBP - EBP of call frame we are unwinding +// Returns: +// Nothing +// Notes: +// Run all termination handlers for a call frame from the current +// try-level up to (but not including) the given stop try-level. +__local_unwind2: + // Setup our call frame so we can access parameters using EDX + //pushl %ebp + movl %esp, %edx + + // FIXME: Setup an EXCEPTION_REGISTRATION entry to protect the + // unwinding in case something goes wrong + +.lu2_next_scope: + + // Keep a pointer to the exception registration in EBX + movl LU2_REGFRAME(%edx), %ebx + + // If we have reached the end of the chain or we're asked to stop here + // by the caller then exit + movl ER_TRYLEVEL(%ebx), %eax + + cmpl $-1, %eax + je .lu2_done + + cmpl LU2_TRYLEVEL(%edx), %eax + je .lu2_done + + // Keep a pointer to the scopetable in ESI + movl ER_SCOPETABLE(%ebx), %esi + + // Compute the offset of the entry in the scopetable that describes + // the scope that is to be unwound. Put the offset in EDI. + movl ST_TRYLEVEL(%esi), %edi + lea (%edi, %edi, 2), %edi + shll $2, %edi + addl %esi, %edi + + // If this is not a termination handler then skip it + cmpl $0, ST_FILTER(%edi) + jne .lu2_next_scope + + // Save the previous try-level in the exception registration structure + movl ST_TRYLEVEL(%edi), %eax + movl %eax, ER_TRYLEVEL(%ebx) + + // Fetch the address of the termination handler + movl ST_HANDLER(%edi), %eax + + // Termination handlers may trash all registers so save the + // important ones and then call the handler + pushl %edx + call *%eax + + // Get our base pointer back + popl %edx + + jmp .lu2_next_scope + +.lu2_done: + + // FIXME: Tear down the EXCEPTION_REGISTRATION entry setup to protect + // the unwinding + + //movl %esi, %esp + //popl %ebp + ret + +#define EH3_DISPCONTEXT 0x14 +#define EH3_CONTEXT 0x10 +#define EH3_REGFRAME 0x0C +#define EH3_ERECORD 0x08 + +// Parameters: +// [ESP+14h] - PVOID DispatcherContext +// [ESP+10h] - PCONTEXT Context +// [ESP+0Ch] - PEXCEPTION_REGISTRATION RegistrationFrame +// [ESP+08h] - PEXCEPTION_RECORD ExceptionRecord +// Registers: +// Unknown +// Returns: +// EXCEPTION_DISPOSITION - How this handler handled the exception +// Notes: +// Try to find an exception handler that will handle the exception. +// Traverse the entries in the scopetable that is associated with the +// exception registration passed as a parameter to this function. +// If an exception handler that will handle the exception is found, it +// is called and this function never returns +__except_handler3: + // Setup our call frame so we can access parameters using EBP + pushl %ebp // Standard ESP in frame (considered part of EXCEPTION_REGISTRATION) + movl %esp, %ebp + + // Don't trust the direction flag to be cleared + cld + + // Either we're called to handle an exception or we're called to unwind + movl EH3_ERECORD(%ebp), %eax + testl $EXCEPTION_UNWIND_MODE, EREC_FLAGS(%eax) + jnz .eh3_unwind + + // Keep a pointer to the exception registration in EBX + movl EH3_REGFRAME(%ebp), %ebx + + // Build an EXCEPTION_POINTERS structure on the stack and store it's + // address in the EXCEPTION_REGISTRATION structure + movl EH3_CONTEXT(%esp), %eax + pushl %ebx // Registration frame + pushl %eax // Context + movl %esp, ER_EPOINTERS(%ebx) // Pointer to EXCEPTION_REGISTRATION on the stack + + // Keep current try-level in EDI + movl ER_TRYLEVEL(%ebx), %edi + + // Keep a pointer to the scopetable in ESI + movl ER_SCOPETABLE(%ebx), %esi + +.eh3_next_scope: + + // If we have reached the end of the chain then exit + cmpl $-1, %edi + je .eh3_search + + // Compute the offset of the entry in the scopetable and store + // the absolute address in EAX + lea (%edi, %edi, 2), %eax + shll $2, %eax + addl %esi, %eax + + // Fetch the address of the filter routine + movl ST_FILTER(%eax), %eax + + // If this is a termination handler then skip it + cmpl $0, %eax + je .eh3_continue + + // Filter routines may trash all registers so save the important + // ones before restoring the call frame ebp and calling the handler + pushl %ebp + pushl %edi // Stop try-level + lea ER_EBP(%ebx), %ebp + call *%eax + popl %edi // Stop try-level + popl %ebp + + // Reload EBX with registration frame address + movl EH3_REGFRAME(%ebp), %ebx + + // Be more flexible here by checking if the return value is less than + // zero, equal to zero, or larger than zero instead of the defined + // values: + // -1 (EXCEPTION_CONTINUE_EXECUTION) + // 0 (EXCEPTION_CONTINUE_SEARCH) + // +1 (EXCEPTION_EXECUTE_HANDLER) + orl %eax, %eax + jz .eh3_continue + js .eh3_dismiss + + // Filter returned: EXCEPTION_EXECUTE_HANDLER + + // Ask the OS to perform global unwinding. + pushl %edi // Save stop try-level + pushl %ebx // Save registration frame address + pushl %ebx // Registration frame address + call __global_unwind2 + popl %eax // Remove parameter to __global_unwind2 + popl %ebx // Restore registration frame address + popl %edi // Restore stop try-level + + // Change the context structure so _except_finish is called in the + // correct context since we return ExceptionContinueExecution. + movl EH3_CONTEXT(%ebp), %eax + + movl %edi, CONTEXT_EDI(%eax) // Stop try-level + movl %ebx, CONTEXT_EBX(%eax) // Registration frame address + movl $_except_finish, CONTEXT_EIP(%eax) + + movl $ExceptionContinueExecution, %eax + jmp .eh3_return + + // Filter returned: EXCEPTION_CONTINUE_SEARCH +.eh3_continue: + + // Reload ESI because the filter routine may have trashed it + movl ER_SCOPETABLE(%ebx), %esi + + // Go one try-level closer to the top + lea (%edi, %edi, 2), %edi + shll $2, %edi + addl %esi, %edi + movl ST_TRYLEVEL(%edi), %edi + + jmp .eh3_next_scope + + // Filter returned: EXCEPTION_CONTINUE_EXECUTION + // Continue execution like nothing happened +.eh3_dismiss: + movl $ExceptionContinueExecution, %eax + jmp .eh3_return + + // Tell the OS to search for another handler that will handle the exception +.eh3_search: + + movl $ExceptionContinueSearch, %eax + jmp .eh3_return + + // Perform local unwinding +.eh3_unwind: + + movl $ExceptionContinueSearch, %eax + testl $EXCEPTION_TARGET_UNWIND, EREC_FLAGS(%eax) + jnz .eh3_return + + // Save some important registers + pushl %ebp + + lea ER_EBP(%ebx), %ebp + pushl $-1 + pushl %ebx + call __local_unwind2 + addl $8, %esp + + // Restore some important registers + popl %ebp + + movl $ExceptionContinueSearch, %eax + + // Get me out of here +.eh3_return: + + movl %ebp, %esp + popl %ebp + ret + +// Parameters: +// None +// Registers: +// EBX - Pointer to exception registration structure +// EDI - Stop try-level +// Returns: +// - +// Notes: +// - +_except_finish: + + // Setup EBP for the exception handler. By doing this the exception + // handler can access local variables as normal + lea ER_EBP(%ebx), %ebp + + // Save some important registers + pushl %ebp + pushl %ebx + pushl %edi + + // Stop try-level + pushl %edi + + // Pointer to exception registration structure + pushl %ebx + call __local_unwind2 + addl $8, %esp + + // Restore some important registers + popl %edi + popl %ebx + popl %ebp + + // Keep a pointer to the scopetable in ESI + movl ER_SCOPETABLE(%ebx), %esi + + // Compute the offset of the entry in the scopetable and store + // the absolute address in EDI + lea (%edi, %edi, 2), %edi + shll $2, %edi + addl %esi, %edi + + // Set the current try-level to the previous try-level and call + // the exception handler + movl ST_TRYLEVEL(%edi), %eax + movl %eax, ER_TRYLEVEL(%ebx) + movl ST_HANDLER(%edi), %eax + + call *%eax + + // We should never get here + ret + +// Copied from Wine. +__EH_prolog: + pushl $-1 + pushl %eax + pushl %fs:0 + movl %esp, %fs:0 + movl 12(%esp), %eax + movl %ebp, 12(%esp) + leal 12(%esp), %ebp + pushl %eax + ret diff --git a/reactos/lib/crt/except/unwind.c b/reactos/lib/crt/except/unwind.c new file mode 100644 index 00000000000..2b8b9d5fcbf --- /dev/null +++ b/reactos/lib/crt/except/unwind.c @@ -0,0 +1,76 @@ +#include "precomp.h" +#include +#include + +/* + * @implemented + */ +void __cdecl +_global_unwind2(PEXCEPTION_REGISTRATION RegistrationFrame) +{ +#ifdef __GNUC__ + RtlUnwind(RegistrationFrame, &&__ret_label, NULL, 0); +__ret_label: + // return is important + return; +#else +#endif +} + + +// This is dragged over from WINE: + +typedef struct __EXCEPTION_FRAME +{ + struct __EXCEPTION_FRAME *Prev; + PEXCEPTION_HANDLER Handler; +} EXCEPTION_FRAME, *PEXCEPTION_FRAME; + +/* VC++ extensions to Win32 SEH */ +typedef struct _SCOPETABLE +{ + int previousTryLevel; + int (*lpfnFilter)(PEXCEPTION_POINTERS); + int (*lpfnHandler)(void); +} SCOPETABLE, *PSCOPETABLE; + +typedef struct _MSVCRT_EXCEPTION_FRAME +{ + EXCEPTION_FRAME *prev; + void (*handler)(PEXCEPTION_RECORD, PEXCEPTION_FRAME, + PCONTEXT, PEXCEPTION_RECORD); + PSCOPETABLE scopetable; + int trylevel; + int _ebp; + PEXCEPTION_POINTERS xpointers; +} MSVCRT_EXCEPTION_FRAME; + + +typedef struct __JUMP_BUFFER +{ + unsigned long Ebp; + unsigned long Ebx; + unsigned long Edi; + unsigned long Esi; + unsigned long Esp; + unsigned long Eip; + unsigned long Registration; + unsigned long TryLevel; + /* Start of new struct members */ + unsigned long Cookie; + unsigned long UnwindFunc; + unsigned long UnwindData[6]; +} _JUMP_BUFFER; + +void +_local_unwind2(MSVCRT_EXCEPTION_FRAME *RegistrationFrame, + LONG TryLevel); + +/* + * @implemented +*/ + +void __stdcall _seh_longjmp_unwind(_JUMP_BUFFER *jmp) +{ + _local_unwind2((MSVCRT_EXCEPTION_FRAME*) jmp->Registration, jmp->TryLevel); +} diff --git a/reactos/lib/crt/except/xcptfil.c b/reactos/lib/crt/except/xcptfil.c new file mode 100644 index 00000000000..9415d6820fe --- /dev/null +++ b/reactos/lib/crt/except/xcptfil.c @@ -0,0 +1,15 @@ +#include "precomp.h" + + +/* + * @unimplemented + */ +int +_XcptFilter(DWORD ExceptionCode, + struct _EXCEPTION_POINTERS * ExceptionInfo) +{ + //fixme XcptFilter +// return UnhandledExceptionFilter(ExceptionInfo); + return 0; +} + diff --git a/reactos/lib/crt/float/chgsign.c b/reactos/lib/crt/float/chgsign.c new file mode 100644 index 00000000000..e2a0c806309 --- /dev/null +++ b/reactos/lib/crt/float/chgsign.c @@ -0,0 +1,23 @@ +#include +#include + + +/* + * @implemented + */ +double _chgsign( double __x ) +{ + union + { + double* __x; + double_t *x; + } u; + u.__x = &__x; + + if ( u.x->sign == 1 ) + u.x->sign = 0; + else + u.x->sign = 1; + + return __x; +} diff --git a/reactos/lib/crt/float/clearfp.c b/reactos/lib/crt/float/clearfp.c new file mode 100644 index 00000000000..8832b3b447e --- /dev/null +++ b/reactos/lib/crt/float/clearfp.c @@ -0,0 +1,17 @@ +#include + +/* + * @implemented + */ +unsigned int _clearfp (void) +{ + unsigned short __res = _statusfp(); +#ifdef __GNUC__ +__asm__ __volatile__ ( + "fclex \n\t" + ); +#else +#endif /*__GNUC__*/ + return __res; +} + diff --git a/reactos/lib/crt/float/cntrlfp.c b/reactos/lib/crt/float/cntrlfp.c new file mode 100644 index 00000000000..c093d827e64 --- /dev/null +++ b/reactos/lib/crt/float/cntrlfp.c @@ -0,0 +1,174 @@ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ + +#include + +#define X87_CW_IM (1<<0) /* Invalid operation mask */ +#define X87_CW_DM (1<<1) /* Denormal operand mask */ +#define X87_CW_ZM (1<<2) /* Zero divide mask */ +#define X87_CW_OM (1<<3) /* Overflow mask */ +#define X87_CW_UM (1<<4) /* Underflow mask */ +#define X87_CW_PM (1<<5) /* Precision mask */ + +#define X87_CW_PC_MASK (3<<8) /* precision control mask */ +#define X87_CW_PC24 (0<<8) /* 24 bit precision */ +#define X87_CW_PC53 (2<<8) /* 53 bit precision */ +#define X87_CW_PC64 (3<<8) /* 64 bit precision */ + +#define X87_CW_RC_MASK (3<<10) /* rounding control mask */ +#define X87_CW_RC_NEAREST (0<<10) /* round to nearest */ +#define X87_CW_RC_DOWN (1<<10) /* round down */ +#define X87_CW_RC_UP (2<<10) /* round up */ +#define X87_CW_RC_ZERO (3<<10) /* round toward zero (chop) */ + +#define X87_CW_IC (1<<12) /* infinity control flag */ + +/* + * @implemented + */ +unsigned int _controlfp(unsigned int unNew, unsigned int unMask) +{ + return _control87(unNew,unMask); +} + +/* + * @implemented + */ +unsigned int _control87(unsigned int unNew, unsigned int unMask) +{ + unsigned int FpuCw; + unsigned int DummyCw = 0; + + /* get the controlword */ + asm volatile("fstcw %0\n\t" : "=m"(FpuCw)); + FpuCw &= 0x0000ffff; + + /* translate it into _control87 format */ + if (FpuCw & X87_CW_IM) + DummyCw |= _EM_INVALID; + if (FpuCw & X87_CW_DM) + DummyCw |= _EM_DENORMAL; + if (FpuCw & X87_CW_ZM) + DummyCw |= _EM_ZERODIVIDE; + if (FpuCw & X87_CW_OM) + DummyCw |= _EM_OVERFLOW; + if (FpuCw & X87_CW_UM) + DummyCw |= _EM_UNDERFLOW; + if (FpuCw & X87_CW_PM) + DummyCw |= _EM_INEXACT; + + switch (FpuCw & X87_CW_PC_MASK) + { + case X87_CW_PC24: + DummyCw |= _PC_24; + break; + case X87_CW_PC53: + DummyCw |= _PC_53; + break; + case X87_CW_PC64: + DummyCw |= _PC_64; + break; + } + + switch (FpuCw & X87_CW_RC_MASK) + { + case X87_CW_RC_NEAREST: + DummyCw |= _RC_NEAR; + break; + case X87_CW_RC_DOWN: + DummyCw |= _RC_DOWN; + break; + case X87_CW_RC_UP: + DummyCw |= _RC_UP; + break; + case X87_CW_RC_ZERO: + DummyCw |= _RC_CHOP; + break; + } + + /* unset (un)masked bits */ + DummyCw &= ~unMask; + unNew &= unMask; + + /* set new bits */ + DummyCw |= unNew; + + /* translate back into x87 format + * FIXME: translate infinity control! + */ + FpuCw = 0; + if (DummyCw & _EM_INVALID) + FpuCw |= X87_CW_IM; + if (DummyCw & _EM_DENORMAL) + FpuCw |= X87_CW_DM; + if (DummyCw & _EM_ZERODIVIDE) + FpuCw |= X87_CW_ZM; + if (DummyCw & _EM_OVERFLOW) + FpuCw |= X87_CW_OM; + if (DummyCw & _EM_UNDERFLOW) + FpuCw |= X87_CW_UM; + if (DummyCw & _EM_INEXACT) + FpuCw |= X87_CW_PM; + + switch (DummyCw & _MCW_PC) + { + case _PC_24: + FpuCw |= X87_CW_PC24; + break; + case _PC_53: + FpuCw |= X87_CW_PC53; + break; + case _PC_64: + default: + FpuCw |= X87_CW_PC64; + break; + } + + switch (DummyCw & _MCW_RC) + { + case _RC_NEAR: + FpuCw |= X87_CW_RC_NEAREST; + break; + case _RC_DOWN: + FpuCw |= X87_CW_RC_DOWN; + break; + case _RC_UP: + FpuCw |= X87_CW_RC_UP; + break; + case _RC_CHOP: + FpuCw |= X87_CW_RC_ZERO; + break; + } + + /* set controlword */ + asm volatile("fldcw %0" : : "m"(FpuCw)); + + return DummyCw; + +#if 0 /* The follwing is the original code, broken I think! -blight */ +register unsigned int __res; +#ifdef __GNUC__ +__asm__ __volatile__ ( + "pushl %%eax \n\t" /* make room on stack */ + "fstcw (%%esp) \n\t" + "fwait \n\t" + "popl %%eax \n\t" + "andl $0xffff, %%eax \n\t" /* OK; we have the old value ready */ + + "movl %1, %%ecx \n\t" + "notl %%ecx \n\t" + "andl %%eax, %%ecx \n\t" /* the bits we want to keep */ + + "movl %2, %%edx \n\t" + "andl %1, %%edx \n\t" /* the bits we want to change */ + + "orl %%ecx, %%edx\n\t" /* the new value */ + "pushl %%edx \n\t" + "fldcw (%%esp) \n\t" + "popl %%edx \n\t" + + :"=a" (__res):"r" (unNew),"r" (unMask): "dx", "cx"); +#else +#endif /*__GNUC__*/ + return __res; +#endif +} diff --git a/reactos/lib/crt/float/copysign.c b/reactos/lib/crt/float/copysign.c new file mode 100644 index 00000000000..17bb869ab5c --- /dev/null +++ b/reactos/lib/crt/float/copysign.c @@ -0,0 +1,26 @@ +#include +#include + +/* + * @implemented + */ +double _copysign (double __d, double __s) +{ + union + { + double* __d; + double_t* d; + } d; + union + { + double* __s; + double_t* s; + } s; + d.__d = &__d; + s.__s = &__s; + + d.d->sign = s.s->sign; + + return __d; +} + diff --git a/reactos/lib/crt/float/fpclass.c b/reactos/lib/crt/float/fpclass.c new file mode 100644 index 00000000000..5dac73d020e --- /dev/null +++ b/reactos/lib/crt/float/fpclass.c @@ -0,0 +1,71 @@ +#include +#include +#include + + +#define _FPCLASS_SNAN 0x0001 /* signaling NaN */ +#define _FPCLASS_QNAN 0x0002 /* quiet NaN */ +#define _FPCLASS_NINF 0x0004 /* negative infinity */ +#define _FPCLASS_NN 0x0008 /* negative normal */ +#define _FPCLASS_ND 0x0010 /* negative denormal */ +#define _FPCLASS_NZ 0x0020 /* -0 */ +#define _FPCLASS_PZ 0x0040 /* +0 */ +#define _FPCLASS_PD 0x0080 /* positive denormal */ +#define _FPCLASS_PN 0x0100 /* positive normal */ +#define _FPCLASS_PINF 0x0200 /* positive infinity */ + +#define FP_SNAN 0x0001 // signaling NaN +#define FP_QNAN 0x0002 // quiet NaN +#define FP_NINF 0x0004 // negative infinity +#define FP_PINF 0x0200 // positive infinity +#define FP_NDENORM 0x0008 // negative denormalized non-zero +#define FP_PDENORM 0x0010 // positive denormalized non-zero +#define FP_NZERO 0x0020 // negative zero +#define FP_PZERO 0x0040 // positive zero +#define FP_NNORM 0x0080 // negative normalized non-zero +#define FP_PNORM 0x0100 // positive normalized non-zero + +typedef int fpclass_t; + +/* + * @implemented + */ +fpclass_t _fpclass(double __d) +{ + union + { + double* __d; + double_t* d; + } d; + d.__d = &__d; + + if ( d.d->exponent == 0 ) { + if ( d.d->mantissah == 0 && d.d->mantissal == 0 ) { + if ( d.d->sign ==0 ) + return FP_NZERO; + else + return FP_PZERO; + } else { + if ( d.d->sign ==0 ) + return FP_NDENORM; + else + return FP_PDENORM; + } + } + if (d.d->exponent == 0x7ff ) { + if ( d.d->mantissah == 0 && d.d->mantissal == 0 ) { + if ( d.d->sign ==0 ) + return FP_NINF; + else + return FP_PINF; + } + else if ( d.d->mantissah == 0 && d.d->mantissal != 0 ) { + return FP_QNAN; + } + else if ( d.d->mantissah == 0 && d.d->mantissal != 0 ) { + return FP_SNAN; + } + + } + return 0; +} diff --git a/reactos/lib/crt/float/fpecode.c b/reactos/lib/crt/float/fpecode.c new file mode 100644 index 00000000000..bcf5339e7dc --- /dev/null +++ b/reactos/lib/crt/float/fpecode.c @@ -0,0 +1,14 @@ +#ifdef __USE_W32API +#undef __USE_W32API +#endif + +#include +#include + +/* + * @implemented + */ +int * __fpecode(void) +{ + return(&(GetThreadData()->fpecode)); +} diff --git a/reactos/lib/crt/float/fpreset.c b/reactos/lib/crt/float/fpreset.c new file mode 100644 index 00000000000..7322097d958 --- /dev/null +++ b/reactos/lib/crt/float/fpreset.c @@ -0,0 +1,12 @@ +#include + + +/* + * @unimplemented + */ +void _fpreset(void) +{ + /* FIXME: This causes an exception */ +// __asm__ __volatile__("fninit\n\t"); + return; +} diff --git a/reactos/lib/crt/float/isnan.c b/reactos/lib/crt/float/isnan.c new file mode 100644 index 00000000000..e522fcb97ce --- /dev/null +++ b/reactos/lib/crt/float/isnan.c @@ -0,0 +1,98 @@ +/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc. +This file is part of the GNU C Library. + +The GNU C Library is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +The GNU C 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include + + +/* + * @implemented + */ +int _isnan(double __x) +{ + union + { + double* __x; + double_t* x; + } x; + x.__x = &__x; + return ( x.x->exponent == 0x7ff && ( x.x->mantissah != 0 || x.x->mantissal != 0 )); +} + +int _isnanl(long double __x) +{ + /* Intel's extended format has the normally implicit 1 explicit + present. Sigh! */ + union + { + long double* __x; + long_double_t* x; + } x; + x.__x = &__x; + + + /* IEEE 854 NaN's have the maximum possible + exponent and a nonzero mantissa. */ + + return (( x.x->exponent == 0x7fff) + && ( (x.x->mantissah & 0x80000000) != 0) + && ( (x.x->mantissah & (unsigned int)0x7fffffff) != 0 || x.x->mantissal != 0 )); +} + +int _isinf(double __x) +{ + union + { + double* __x; + double_t* x; + } x; + + x.__x = &__x; + return ( x.x->exponent == 0x7ff && ( x.x->mantissah == 0 && x.x->mantissal == 0 )); +} + +/* + * @implemented + */ +int _finite( double x ) +{ + return !_isinf(x); +} + +int _isinfl(long double __x) +{ + /* Intel's extended format has the normally implicit 1 explicit + present. Sigh! */ + union + { + long double* __x; + long_double_t* x; + } x; + + x.__x = &__x; + + + /* An IEEE 854 infinity has an exponent with the + maximum possible value and a zero mantissa. */ + + + if ( x.x->exponent == 0x7fff && ( (x.x->mantissah == 0x80000000 ) && x.x->mantissal == 0 )) + return x.x->sign ? -1 : 1; + return 0; +} diff --git a/reactos/lib/crt/float/logb.c b/reactos/lib/crt/float/logb.c new file mode 100644 index 00000000000..d71c654ee77 --- /dev/null +++ b/reactos/lib/crt/float/logb.c @@ -0,0 +1,34 @@ +/* Math functions for i387. + Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by John C. Bowman , 1995. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The GNU C 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +double _logb (double __x) +{ + register double __value; +#ifdef __GNUC__ + register double __junk; + __asm __volatile__ + ("fxtract\n\t" + : "=t" (__junk), "=u" (__value) : "0" (__x)); +#else +#endif /*__GNUC__*/ + return __value; +} diff --git a/reactos/lib/crt/float/nafter.c b/reactos/lib/crt/float/nafter.c new file mode 100644 index 00000000000..9b5ddd7cef2 --- /dev/null +++ b/reactos/lib/crt/float/nafter.c @@ -0,0 +1,16 @@ +#include + + +/* + * @implemented + */ +double _nextafter( double x, double y ) +{ + if ( x == y) + return x; + + if ( isnan(x) || isnan(y) ) + return x; + + return x; +} diff --git a/reactos/lib/crt/float/scalb.c b/reactos/lib/crt/float/scalb.c new file mode 100644 index 00000000000..cf2e673f2f0 --- /dev/null +++ b/reactos/lib/crt/float/scalb.c @@ -0,0 +1,20 @@ +#include +#include + +/* + * @implemented + */ +double _scalb( double __x, long e ) +{ + union + { + double* __x; + double_t* x; + } x; + + x.__x = &__x; + + x.x->exponent += e; + + return __x; +} diff --git a/reactos/lib/crt/float/statfp.c b/reactos/lib/crt/float/statfp.c new file mode 100644 index 00000000000..e2d2112afb6 --- /dev/null +++ b/reactos/lib/crt/float/statfp.c @@ -0,0 +1,19 @@ +#include + +/* + * @implemented + */ +unsigned int _statusfp (void) +{ + +register unsigned short __res; +#ifdef __GNUC__ +__asm__ __volatile__ ( + "fstsw %0 \n\t" +// "movzwl %ax, %eax" + :"=a" (__res) + ); +#else +#endif /*__GNUC__*/ + return __res; +} diff --git a/reactos/lib/crt/io/access.c b/reactos/lib/crt/io/access.c new file mode 100644 index 00000000000..4a3698a1fec --- /dev/null +++ b/reactos/lib/crt/io/access.c @@ -0,0 +1,33 @@ +#include "precomp.h" +#include +#include +#define NDEBUG +#include + + +/* + * @implemented + */ +int _access( const char *_path, int _amode ) +{ + DWORD Attributes = GetFileAttributesA(_path); + DPRINT("_access('%s', %x)\n", _path, _amode); + + if (Attributes == -1) { + _dosmaperr(GetLastError()); + return -1; + } + if ((_amode & W_OK) == W_OK) { + if ((Attributes & FILE_ATTRIBUTE_READONLY) == FILE_ATTRIBUTE_READONLY) { + __set_errno(EACCES); + return -1; + } + } + if ((_amode & D_OK) == D_OK) { + if ((Attributes & FILE_ATTRIBUTE_DIRECTORY) != FILE_ATTRIBUTE_DIRECTORY) { + __set_errno(EACCES); + return -1; + } + } + return 0; +} diff --git a/reactos/lib/crt/io/chmod.c b/reactos/lib/crt/io/chmod.c new file mode 100644 index 00000000000..65f912d3ee3 --- /dev/null +++ b/reactos/lib/crt/io/chmod.c @@ -0,0 +1,46 @@ +#include "precomp.h" +#include +#include + +#define NDEBUG +#include + +#define mode_t int + + +/* + * @implemented + */ +int _chmod(const char* filename, mode_t mode) +{ + DWORD FileAttributes = 0; + BOOLEAN Set = FALSE; + + DPRINT("_chmod('%s', %x)\n", filename, mode); + + FileAttributes = GetFileAttributesA(filename); + if ( FileAttributes == -1 ) { + _dosmaperr(GetLastError()); + return -1; + } + + if ( mode == 0 ) + return -1; + + if (mode & _S_IWRITE) { + if (FileAttributes & FILE_ATTRIBUTE_READONLY) { + FileAttributes &= ~FILE_ATTRIBUTE_READONLY; + Set = TRUE; + } + } else { + if (!(FileAttributes & FILE_ATTRIBUTE_READONLY)) { + FileAttributes |= FILE_ATTRIBUTE_READONLY; + Set = TRUE; + } + } + if (Set && SetFileAttributesA(filename, FileAttributes) == FALSE) { + _dosmaperr(GetLastError()); + return -1; + } + return 0; +} diff --git a/reactos/lib/crt/io/chsize.c b/reactos/lib/crt/io/chsize.c new file mode 100644 index 00000000000..678c0f5e24e --- /dev/null +++ b/reactos/lib/crt/io/chsize.c @@ -0,0 +1,18 @@ +/* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */ +#include + +#define NDEBUG +#include + +/* + * @implemented + */ +int _chsize(int _fd, long size) +{ + DPRINT("_chsize(fd %d, size %d)\n", _fd, size); + if (lseek(_fd, size, 0) == -1) + return -1; + if (_write(_fd, 0, 0) < 0) + return -1; + return 0; +} diff --git a/reactos/lib/crt/io/close.c b/reactos/lib/crt/io/close.c new file mode 100644 index 00000000000..9388877e866 --- /dev/null +++ b/reactos/lib/crt/io/close.c @@ -0,0 +1,19 @@ +#include "precomp.h" +#include +#include + +#define NDEBUG +#include + +/* + * @implemented + */ +int _close(int _fd) +{ + DPRINT("_close(fd %d)\n", _fd); + if (_fd == -1) + return -1; + if (CloseHandle(_get_osfhandle(_fd)) == FALSE) + return -1; + return __fileno_close(_fd); +} diff --git a/reactos/lib/crt/io/commit.c b/reactos/lib/crt/io/commit.c new file mode 100644 index 00000000000..3eaa4b4e585 --- /dev/null +++ b/reactos/lib/crt/io/commit.c @@ -0,0 +1,18 @@ +#include "precomp.h" +#include +#include +#include + + +/* + * @implemented + */ +int _commit(int _fd) +{ + if (! FlushFileBuffers(_get_osfhandle(_fd)) ) { + __set_errno(EBADF); + return -1; + } + + return 0; +} diff --git a/reactos/lib/crt/io/create.c b/reactos/lib/crt/io/create.c new file mode 100644 index 00000000000..b8e0bd0c8c1 --- /dev/null +++ b/reactos/lib/crt/io/create.c @@ -0,0 +1,15 @@ +#include +#include + +#define NDEBUG +#include + + +/* + * @implemented + */ +int _creat(const char* filename, int mode) +{ + DPRINT("_creat('%s', mode %x)\n", filename, mode); + return _open(filename,_O_CREAT|_O_TRUNC,mode); +} diff --git a/reactos/lib/crt/io/dup.c b/reactos/lib/crt/io/dup.c new file mode 100644 index 00000000000..bd9a55e4f6b --- /dev/null +++ b/reactos/lib/crt/io/dup.c @@ -0,0 +1,40 @@ +#include "precomp.h" +#include +#include +#include + + +/* + * @implemented + */ +int _dup(int handle) +{ + HANDLE hFile; + HANDLE hProcess = GetCurrentProcess(); + BOOL result; + int fd; + + hFile = _get_osfhandle(handle); + if (hFile == INVALID_HANDLE_VALUE) { + __set_errno(EBADF); + return -1; + } + result = DuplicateHandle(hProcess, + hFile, + hProcess, + &hFile, + 0, + TRUE, + DUPLICATE_SAME_ACCESS); + if (result == FALSE) { + _dosmaperr(GetLastError()); + return -1; + } + + fd = __fileno_alloc(hFile, __fileno_getmode(handle)); + if (fd < 0) + { + CloseHandle(hFile); + } + return fd; +} diff --git a/reactos/lib/crt/io/dup2.c b/reactos/lib/crt/io/dup2.c new file mode 100644 index 00000000000..1571b54543d --- /dev/null +++ b/reactos/lib/crt/io/dup2.c @@ -0,0 +1,10 @@ +#include +#include + +/* + * @implemented + */ +int _dup2(int handle1, int handle2) +{ + return __fileno_dup2(handle1, handle2); +} diff --git a/reactos/lib/crt/io/eof.c b/reactos/lib/crt/io/eof.c new file mode 100644 index 00000000000..827df20bf71 --- /dev/null +++ b/reactos/lib/crt/io/eof.c @@ -0,0 +1,17 @@ +#include + +/* + * @implemented + */ +int _eof(int _fd) +{ + __int64 cur_pos = _lseeki64(_fd, 0, SEEK_CUR); + __int64 end_pos = _lseeki64(_fd, 0, SEEK_END); + if ( cur_pos == -1 || end_pos == -1) + return -1; + + if (cur_pos == end_pos) + return 1; + + return 0; +} diff --git a/reactos/lib/crt/io/filelen.c b/reactos/lib/crt/io/filelen.c new file mode 100644 index 00000000000..d54547ad93c --- /dev/null +++ b/reactos/lib/crt/io/filelen.c @@ -0,0 +1,20 @@ +#include "precomp.h" +#include +#include + + +/* + * @implemented + */ +long _filelength(int _fd) +{ + DWORD len = GetFileSize(_get_osfhandle(_fd), NULL); + if (len == INVALID_FILE_SIZE) { + DWORD oserror = GetLastError(); + if (oserror != 0) { + _dosmaperr(oserror); + return -1L; + } + } + return (long)len; +} diff --git a/reactos/lib/crt/io/fileleni.c b/reactos/lib/crt/io/fileleni.c new file mode 100644 index 00000000000..5012eca585b --- /dev/null +++ b/reactos/lib/crt/io/fileleni.c @@ -0,0 +1,22 @@ +#include "precomp.h" +#include +#include + + +/* + * @implemented + */ +__int64 _filelengthi64(int _fd) +{ + DWORD lo_length, hi_length; + + lo_length = GetFileSize(_get_osfhandle(_fd), &hi_length); + if (lo_length == INVALID_FILE_SIZE) { + DWORD oserror = GetLastError(); + if (oserror != 0) { + _dosmaperr(oserror); + return (__int64)-1; + } + } + return((((__int64)hi_length) << 32) + lo_length); +} diff --git a/reactos/lib/crt/io/find.c b/reactos/lib/crt/io/find.c new file mode 100644 index 00000000000..ba06105fc0b --- /dev/null +++ b/reactos/lib/crt/io/find.c @@ -0,0 +1,89 @@ +#include "precomp.h" +#include +#include +#include + + +/* + * @implemented + */ +int _findclose(int handle) +{ + // check no wildcards or invalid handle + if (handle == 0 || handle == -1) + return 0; + return FindClose((void*)handle); +} + +/* + * @implemented + */ +int _findfirst(const char* _name, struct _finddata_t* result) +{ + WIN32_FIND_DATAA FindFileData; + char dir[MAX_PATH]; + long hFindFile; + int len = 0; + + if (_name == NULL || _name[0] == 0) { + len = GetCurrentDirectoryA(MAX_PATH-4,dir); + if (dir[len-1] != '\\') { + dir[len] = '\\'; + dir[len+1] = 0; + } + strcat(dir,"*.*"); + } else { + strcpy(dir,_name); + } + + hFindFile = (long)FindFirstFileA(dir, &FindFileData); + if (hFindFile == -1) { + memset(result,0,sizeof(struct _finddata_t)); + _dosmaperr(GetLastError()); + return -1; + } + + result->attrib = FindFileData.dwFileAttributes; + result->time_create = FileTimeToUnixTime(&FindFileData.ftCreationTime,NULL); + result->time_access = FileTimeToUnixTime(&FindFileData.ftLastAccessTime,NULL); + result->time_write = FileTimeToUnixTime(&FindFileData.ftLastWriteTime,NULL); + result->size = FindFileData.nFileSizeLow; + strncpy(result->name,FindFileData.cFileName,MAX_PATH); + + // if no wildcard the find file handle can be closed right away + // a return value of 0 can flag this. + + if (!strchr(dir,'*') && !strchr(dir,'?')) { + _findclose(hFindFile); + return 0; + } + + return hFindFile; +} + +/* + * @implemented + */ +int _findnext(int handle, struct _finddata_t* result) +{ + WIN32_FIND_DATAA FindFileData; + + // check no wildcards or invalid handle + if (handle == 0 || handle == -1) + return 0; + + if (!FindNextFileA((void*)handle, &FindFileData)) { + _dosmaperr(GetLastError()); + return -1; + } + + result->attrib = FindFileData.dwFileAttributes; + result->time_create = FileTimeToUnixTime(&FindFileData.ftCreationTime,NULL); + result->time_access = FileTimeToUnixTime(&FindFileData.ftLastAccessTime,NULL); + result->time_write = FileTimeToUnixTime(&FindFileData.ftLastWriteTime,NULL); + result->size = FindFileData.nFileSizeLow; + strncpy(result->name,FindFileData.cFileName, MAX_PATH); + + return 0; +} + diff --git a/reactos/lib/crt/io/fmode.c b/reactos/lib/crt/io/fmode.c new file mode 100644 index 00000000000..2306d60a40f --- /dev/null +++ b/reactos/lib/crt/io/fmode.c @@ -0,0 +1,14 @@ +/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ +#include +#include + + +int __fmode = O_TEXT; + +/* + * @implemented + */ +int *__p__fmode(void) +{ + return &__fmode; +} diff --git a/reactos/lib/crt/io/isatty.c b/reactos/lib/crt/io/isatty.c new file mode 100644 index 00000000000..a1d67b85289 --- /dev/null +++ b/reactos/lib/crt/io/isatty.c @@ -0,0 +1,19 @@ +#include +#include + +#define NDEBUG +#include + +/* + * @implemented + */ +int _isatty( int fd ) +{ + struct stat buf; + DPRINT("_isatty(fd %d)\n", fd); + if (_fstat (fd, &buf) < 0) + return 0; + if (S_ISCHR (buf.st_mode)) + return 1; + return 0; +} diff --git a/reactos/lib/crt/io/locking.c b/reactos/lib/crt/io/locking.c new file mode 100644 index 00000000000..6d82811ef21 --- /dev/null +++ b/reactos/lib/crt/io/locking.c @@ -0,0 +1,20 @@ +#include "precomp.h" +#include +#include + + +/* + * @implemented + */ +int _locking(int _fd, int mode, long nbytes) +{ + long offset = _lseek(_fd, 0L, 1); + if (offset == -1L) + return -1; + if (!LockFile(_get_osfhandle(_fd),offset,0,nbytes,0)) { + _dosmaperr(GetLastError()); + return -1; + } + + return 0; +} diff --git a/reactos/lib/crt/io/lseek.c b/reactos/lib/crt/io/lseek.c new file mode 100644 index 00000000000..2cd2599ea44 --- /dev/null +++ b/reactos/lib/crt/io/lseek.c @@ -0,0 +1,20 @@ +#include "precomp.h" +#include +#include + + +/* + * @implemented + */ +long _lseek(int _fildes, long _offset, int _whence) +{ + DWORD newpos = SetFilePointer((HANDLE)filehnd(_fildes), _offset, NULL, _whence); + if (newpos == INVALID_SET_FILE_POINTER) { + DWORD oserror = GetLastError(); + if (oserror != 0) { + _dosmaperr(oserror); + return -1L; + } + } + return newpos; +} diff --git a/reactos/lib/crt/io/lseeki64.c b/reactos/lib/crt/io/lseeki64.c new file mode 100644 index 00000000000..78bfa0507d9 --- /dev/null +++ b/reactos/lib/crt/io/lseeki64.c @@ -0,0 +1,42 @@ +#include "precomp.h" +#include +#include + + +//#define SETFILEPOINTEREX_AVAILABLE + +/* + * @implemented + */ +__int64 _lseeki64(int _fildes, __int64 _offset, int _whence) +{ +#ifdef SETFILEPOINTEREX_AVAILABLE + LARGE_INTEGER new_pos; + LARGE_INTEGER offset; + offset.QuadPart = _offset; + +// if (invalid_filehnd(_fildes)) { +// __set_errno ( EBADF ); +// return -1L; +// } + if (SetFilePointerEx((HANDLE)filehnd(_fildes), offset, &new_pos, _whence)) { + } else { + _dosmaperr(error); + return -1L; + } + return new_pos.QuadPart; +#else + //ULONG lo_pos; + //DWORD hi_pos = 0; // must equal 0 or -1 if supplied, -1 for negative 32 seek value + //lo_pos = SetFilePointer((HANDLE)filehnd(_fildes), _offset, &hi_pos, _whence); + //return((((__int64)hi_pos) << 32) + lo_pos); + + LARGE_INTEGER offset; + offset.QuadPart = _offset; + + offset.u.LowPart = SetFilePointer((HANDLE)filehnd(_fildes), + offset.u.LowPart, &offset.u.HighPart, _whence); + return ((((__int64)offset.u.HighPart) << 32) + offset.u.LowPart); + +#endif /*SETFILEPOINTEREX_AVAILABLE*/ +} diff --git a/reactos/lib/crt/io/mktemp.c b/reactos/lib/crt/io/mktemp.c new file mode 100644 index 00000000000..b895fa0655a --- /dev/null +++ b/reactos/lib/crt/io/mktemp.c @@ -0,0 +1,78 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details + * PROJECT: ReactOS system libraries + * FILE: lib/msvcrt/io/mktemp.c + * PURPOSE: Makes a temp file based on a template + * PROGRAMER: DJ Delorie + Boudewijn Dekker + * UPDATE HISTORY: + * 28/12/98: Appropriated for the Reactos Kernel + */ + +/* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ + +#include +#include +#include + +#define NDEBUG +#include + + +/* + * @implemented + */ +char* _mktemp(char* _template) +{ + static int count = 0; + char *cp, *dp; + int i, len, xcount, loopcnt; + + DPRINT("_mktemp('%s')\n", _template); + len = strlen (_template); + cp = _template + len; + + xcount = 0; + while (xcount < 6 && cp > _template && cp[-1] == 'X') + xcount++, cp--; + + if (xcount) { + dp = cp; + while (dp > _template && dp[-1] != '/' && dp[-1] != '\\' && dp[-1] != ':') + dp--; + + /* Keep the first characters of the template, but turn the rest into + Xs. */ + while (cp > dp + 8 - xcount) { + *--cp = 'X'; + xcount = (xcount >= 6) ? 6 : 1 + xcount; + } + + /* If dots occur too early -- squash them. */ + while (dp < cp) { + if (*dp == '.') *dp = 'a'; + dp++; + } + + /* Try to add ".tmp" to the filename. Truncate unused Xs. */ + if (cp + xcount + 3 < _template + len) + strcpy (cp + xcount, ".tmp"); + else + cp[xcount] = 0; + + /* This loop can run up to 2<<(5*6) times, or about 10^9 times. */ + for (loopcnt = 0; loopcnt < (1 << (5 * xcount)); loopcnt++) { + int c = count++; + for (i = 0; i < xcount; i++, c >>= 5) + cp[i] = "abcdefghijklmnopqrstuvwxyz012345"[c & 0x1f]; + if (_access(_template,0) == -1) + return _template; + } + } + + /* Failure: truncate the template and return NULL. */ + *_template = 0; + return 0; +} diff --git a/reactos/lib/crt/io/open.c b/reactos/lib/crt/io/open.c new file mode 100644 index 00000000000..1921fa4ef06 --- /dev/null +++ b/reactos/lib/crt/io/open.c @@ -0,0 +1,423 @@ +/* $Id$ + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: lib/msvcrt/io/open.c + * PURPOSE: Opens a file and translates handles to fileno + * PROGRAMER: Boudewijn Dekker + * UPDATE HISTORY: + * 28/12/98: Created + */ + +// rember to interlock the allocation of fileno when making this thread safe + +// possibly store extra information at the handle + +#include "precomp.h" +#if !defined(NDEBUG) && defined(DBG) +#include +#endif +#include +#include +#include +#include +#include +#include +#include +#include + +#define NDEBUG +#include + +//#define _OLD_BUILD_ + +#define STD_AUX_HANDLE 3 +#define STD_PRINTER_HANDLE 4 + + +///////////////////////////////////////// +#if 0 // from perl sources + +#ifndef _INTPTR_T_DEFINED +typedef int intptr_t; +#define _INTPTR_T_DEFINED +#endif + +#ifndef _UINTPTR_T_DEFINED +typedef unsigned int uintptr_t; +#define _UINTPTR_T_DEFINED +#endif + +/* + * Control structure for lowio file handles + */ +typedef struct { + intptr_t osfhnd;/* underlying OS file HANDLE */ + char osfile; /* attributes of file (e.g., open in text mode?) */ + char pipech; /* one char buffer for handles opened on pipes */ + int lockinitflag; + //CRITICAL_SECTION lock; +} ioinfo; + +/* + * Array of arrays of control structures for lowio files. + */ +//ioinfo* __pioinfo[]; +//ioinfo* __pioinfo[] = { NULL }; + +#endif +///////////////////////////////////////// + +typedef struct _fileno_modes_type +{ + HANDLE hFile; + int mode; + char pipech; /* one char buffer for handles opened on pipes */ + int lockinitflag; + /*CRITICAL_SECTION*/int lock; + int fd; +} fileno_modes_type; + +//static fileno_modes_type* fileno_modes = NULL; +fileno_modes_type* __pioinfo = NULL; + +///////////////////////////////////////// +int maxfno = 0; + +char __is_text_file(FILE* p) +{ + if ( p == NULL || __pioinfo == NULL ) + return FALSE; + return (!((p)->_flag&_IOSTRG) && (__pioinfo[(p)->_file].mode&O_TEXT)); +} + +/* + * @implemented + */ +int _open(const char* _path, int _oflag,...) +{ +#if !defined(NDEBUG) && defined(DBG) + va_list arg; + int pmode; +#endif + HANDLE hFile; + DWORD dwDesiredAccess = 0; + DWORD dwShareMode = 0; + DWORD dwCreationDistribution = 0; + DWORD dwFlagsAndAttributes = 0; + SECURITY_ATTRIBUTES sa = {sizeof(SECURITY_ATTRIBUTES), NULL, TRUE}; + +#if !defined(NDEBUG) && defined(DBG) + va_start(arg, _oflag); + pmode = va_arg(arg, int); +#endif + +// DPRINT("_open('%s', %x, (%x))\n", _path, _oflag, pmode); + + if ((_oflag & S_IREAD ) == S_IREAD) + dwShareMode = FILE_SHARE_READ; + else if ((_oflag & S_IWRITE) == S_IWRITE) { + dwShareMode = FILE_SHARE_READ | FILE_SHARE_WRITE; + } + /* + * + * _O_BINARY Opens file in binary (untranslated) mode. (See fopen for a description of binary mode.) + * _O_TEXT Opens file in text (translated) mode. (For more information, see Text and Binary Mode File I/O and fopen.) + * + * _O_APPEND Moves file pointer to end of file before every write operation. + */ +#ifdef _OLD_BUILD_ + if ((_oflag & _O_RDWR) == _O_RDWR) + dwDesiredAccess |= GENERIC_WRITE|GENERIC_READ; + else if ((_oflag & O_RDONLY) == O_RDONLY) + dwDesiredAccess |= GENERIC_READ; + else if ((_oflag & _O_WRONLY) == _O_WRONLY) + dwDesiredAccess |= GENERIC_WRITE ; +#else + if ((_oflag & _O_WRONLY) == _O_WRONLY ) + dwDesiredAccess |= GENERIC_WRITE ; + else if ((_oflag & _O_RDWR) == _O_RDWR ) + dwDesiredAccess |= GENERIC_WRITE|GENERIC_READ; + else //if ((_oflag & O_RDONLY) == O_RDONLY) + dwDesiredAccess |= GENERIC_READ; +#endif + + if (( _oflag & (_O_CREAT | _O_EXCL)) == (_O_CREAT | _O_EXCL)) + dwCreationDistribution |= CREATE_NEW; + + else if ((_oflag & O_TRUNC ) == O_TRUNC) { + if ((_oflag & O_CREAT ) == O_CREAT) + dwCreationDistribution |= CREATE_ALWAYS; + else if ((_oflag & O_RDONLY ) != O_RDONLY) + dwCreationDistribution |= TRUNCATE_EXISTING; + } + else if ((_oflag & _O_APPEND) == _O_APPEND) + dwCreationDistribution |= OPEN_EXISTING; + else if ((_oflag & _O_CREAT) == _O_CREAT) + dwCreationDistribution |= OPEN_ALWAYS; + else + dwCreationDistribution |= OPEN_EXISTING; + + if ((_oflag & _O_RANDOM) == _O_RANDOM ) + dwFlagsAndAttributes |= FILE_FLAG_RANDOM_ACCESS; + if ((_oflag & _O_SEQUENTIAL) == _O_SEQUENTIAL) + dwFlagsAndAttributes |= FILE_FLAG_SEQUENTIAL_SCAN; + if ((_oflag & _O_TEMPORARY) == _O_TEMPORARY) { + dwFlagsAndAttributes |= FILE_FLAG_DELETE_ON_CLOSE; + DPRINT("FILE_FLAG_DELETE_ON_CLOSE\n"); + } + if ((_oflag & _O_SHORT_LIVED) == _O_SHORT_LIVED) { + dwFlagsAndAttributes |= FILE_FLAG_DELETE_ON_CLOSE; + DPRINT("FILE_FLAG_DELETE_ON_CLOSE\n"); + } + if (_oflag & _O_NOINHERIT) + sa.bInheritHandle = FALSE; + + if (dwCreationDistribution == OPEN_EXISTING && + (dwDesiredAccess & (GENERIC_WRITE|GENERIC_READ)) == GENERIC_READ) { + /* Allow always shared read for a file which is opened for read only */ + dwShareMode |= FILE_SHARE_READ; + } + + hFile = CreateFileA(_path, + dwDesiredAccess, + dwShareMode, + &sa, + dwCreationDistribution, + dwFlagsAndAttributes, + NULL); + if (hFile == (HANDLE)-1) { + _dosmaperr(GetLastError()); + return -1; + } + DPRINT("OK\n"); + if (!(_oflag & (_O_TEXT|_O_BINARY))) { + _oflag |= __fmode; + } + return __fileno_alloc(hFile,_oflag); +} + + +int __fileno_alloc(HANDLE hFile, int mode) +{ + int i; + /* Check for bogus values */ + if (hFile < 0) + return -1; + + for (i = 5; i < maxfno; i++) { + if (__pioinfo[i].fd == -1 ) { + __pioinfo[i].fd = i; + __pioinfo[i].mode = mode; + __pioinfo[i].hFile = hFile; + return i; + } + } + + /* See if we need to expand the tables. Check this BEFORE it might fail, + so that when we hit the count'th request, we've already up'd it. */ + if (i == maxfno) { + int oldcount = maxfno; + fileno_modes_type* old_fileno_modes = __pioinfo; + maxfno += 255; + __pioinfo = (fileno_modes_type*)malloc(maxfno * sizeof(fileno_modes_type)); + if (old_fileno_modes != NULL) { + memcpy(__pioinfo, old_fileno_modes, oldcount * sizeof(fileno_modes_type)); + free(old_fileno_modes); + } + memset(__pioinfo + oldcount, -1, (maxfno-oldcount)*sizeof(fileno_modes_type)); + } + + /* Fill in the value */ + __pioinfo[i].fd = i; + __pioinfo[i].mode = mode; + __pioinfo[i].hFile = hFile; + return i; +} + +void* filehnd(int fileno) +{ + if (fileno < 0 || fileno >= maxfno || __pioinfo[fileno].fd == -1) { + return (void*)-1; + } + return __pioinfo[fileno].hFile; +} + +int __fileno_setmode(int _fd, int _newmode) +{ + int m; + if (_fd < 0 || _fd >= maxfno) { + __set_errno(EBADF); + return -1; + } + m = __pioinfo[_fd].mode; + __pioinfo[_fd].mode = _newmode; + return m; +} + +int __fileno_getmode(int _fd) +{ + if (_fd < 0 || _fd >= maxfno) { + __set_errno(EBADF); + return -1; + } + return __pioinfo[_fd].mode; + +} + +int __fileno_close(int _fd) +{ + if (_fd < 0 || _fd >= maxfno) { + __set_errno(EBADF); + return -1; + } + __pioinfo[_fd].fd = -1; + __pioinfo[_fd].hFile = (HANDLE)-1; + return 0; +} + +/* + * @implemented + */ +int _open_osfhandle(void* osfhandle, int flags) +{ + return __fileno_alloc((HANDLE)osfhandle, flags); +} + +/* + * @implemented + */ +void* _get_osfhandle( int fileno ) +{ + return filehnd(fileno); +} + +int __fileno_dup2(int handle1, int handle2) +{ + HANDLE hProcess; + BOOL result; + if (handle1 >= maxfno || handle1 < 0 || handle2 >= maxfno || handle2 < 0) { + __set_errno(EBADF); + return -1; + } + if (__pioinfo[handle1].fd == -1) { + __set_errno(EBADF); + return -1; + } + if (handle1 == handle2) + return handle1; + if (__pioinfo[handle2].fd != -1) { + _close(handle2); + } + hProcess = GetCurrentProcess(); + result = DuplicateHandle(hProcess, + __pioinfo[handle1].hFile, + hProcess, + &__pioinfo[handle2].hFile, + 0, + TRUE, + DUPLICATE_SAME_ACCESS); + if (result) { + __pioinfo[handle2].fd = handle2; + __pioinfo[handle2].mode = __pioinfo[handle1].mode; + switch (handle2) { + case 0: + SetStdHandle(STD_INPUT_HANDLE, __pioinfo[handle2].hFile); + break; + case 1: + SetStdHandle(STD_OUTPUT_HANDLE, __pioinfo[handle2].hFile); + break; + case 2: + SetStdHandle(STD_ERROR_HANDLE, __pioinfo[handle2].hFile); + break; + case 3: + SetStdHandle(STD_AUX_HANDLE, __pioinfo[handle2].hFile); + break; + case 4: + SetStdHandle(STD_AUX_HANDLE, __pioinfo[handle2].hFile); + break; + } + return handle1; + } else { + __set_errno(EMFILE); // Is this the correct error no.? + return -1; + } +} + + +void* malloc(size_t sizeObject); + +BOOL __fileno_init(void) +{ + ULONG count = 0, i; + HANDLE* pFile; + char* pmode; + STARTUPINFOA StInfo; + + GetStartupInfoA(&StInfo); + if (StInfo.lpReserved2 && StInfo.cbReserved2 >= sizeof(ULONG)) { + count = *(ULONG*)StInfo.lpReserved2; +/* + if (sizeof(ULONG) + count * (sizeof(HANDLE) + sizeof(char)) != StInfo.cbReserved2) + { + count = 0; + } +*/ + } + maxfno = 255; + while(count >= maxfno) + maxfno += 255; + + { +#ifdef _OLD_BUILD_ + // why was this here ???? - robd. + int result; + result = malloc(50); +#endif + } + //__pioinfo = (fileno_modes_type*)malloc(sizeof(fileno_modes_type) * maxfno); + __pioinfo = malloc(sizeof(fileno_modes_type) * maxfno); + if (__pioinfo == NULL) { + return FALSE; + } + memset(__pioinfo, -1, sizeof(fileno_modes_type) * maxfno); + if (count) { + pFile = (HANDLE*)(StInfo.lpReserved2 + sizeof(ULONG) + count * sizeof(char)); + pmode = (char*)(StInfo.lpReserved2 + sizeof(ULONG)); + for (i = 0; i < count; i++) { + if (*pFile != INVALID_HANDLE_VALUE) { + __pioinfo[i].fd = i; + __pioinfo[i].mode = ((*pmode << 8) & (_O_TEXT|_O_BINARY)) | (*pmode & _O_ACCMODE); + __pioinfo[i].hFile = *pFile; + } + pFile++; + pmode++; + } + } + if (__pioinfo[0].fd == -1) { + __pioinfo[0].fd = 0; + __pioinfo[0].hFile = GetStdHandle(STD_INPUT_HANDLE); + __pioinfo[0].mode = _O_RDONLY|_O_TEXT; + } + if (__pioinfo[1].fd == -1) { + __pioinfo[1].fd = 1; + __pioinfo[1].hFile = GetStdHandle(STD_OUTPUT_HANDLE); + __pioinfo[1].mode = _O_WRONLY|_O_TEXT; + } + if (__pioinfo[2].fd == -1) { + __pioinfo[2].fd = 2; + __pioinfo[2].hFile = GetStdHandle(STD_ERROR_HANDLE); + __pioinfo[2].mode = _O_WRONLY|_O_TEXT; + } + if (__pioinfo[3].fd == -1) { + __pioinfo[3].fd = 3; + __pioinfo[3].hFile = GetStdHandle(STD_AUX_HANDLE); + __pioinfo[3].mode = _O_WRONLY|_O_TEXT; + } + if (__pioinfo[4].fd == -1) { + __pioinfo[4].fd = 4; + __pioinfo[4].hFile = GetStdHandle(STD_PRINTER_HANDLE); + __pioinfo[4].mode = _O_WRONLY|_O_TEXT; + } + return TRUE; +} diff --git a/reactos/lib/crt/io/pipe.c b/reactos/lib/crt/io/pipe.c new file mode 100644 index 00000000000..d0fdb0247a7 --- /dev/null +++ b/reactos/lib/crt/io/pipe.c @@ -0,0 +1,51 @@ +/* $Id$ + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: lib/msvcrt/io/pipe.c + * PURPOSE: Creates a pipe + * PROGRAMER: DJ Delorie + * UPDATE HISTORY: + * 28/12/98: Appropriated for Reactos + */ + +#include "precomp.h" +#include +#include +#include + + +/* + * @implemented + */ +int _pipe(int _fildes[2], unsigned int size, int mode ) +{ + HANDLE hReadPipe, hWritePipe; + SECURITY_ATTRIBUTES sa = {sizeof(SECURITY_ATTRIBUTES), NULL, TRUE}; + + if (mode & O_NOINHERIT) + sa.bInheritHandle = FALSE; + + if (!CreatePipe(&hReadPipe,&hWritePipe,&sa,size)) { + _dosmaperr(GetLastError()); + return -1; + } + + if ((_fildes[0] = __fileno_alloc(hReadPipe, mode)) < 0) + { + CloseHandle(hReadPipe); + CloseHandle(hWritePipe); + __set_errno(EMFILE); + return -1; + } + + if ((_fildes[1] = __fileno_alloc(hWritePipe, mode)) < 0) + { + __fileno_close(_fildes[0]); + CloseHandle(hReadPipe); + CloseHandle(hWritePipe); + __set_errno(EMFILE); + return -1; + } + return 0; +} diff --git a/reactos/lib/crt/io/read.c b/reactos/lib/crt/io/read.c new file mode 100644 index 00000000000..6e9229df1e8 --- /dev/null +++ b/reactos/lib/crt/io/read.c @@ -0,0 +1,102 @@ +/* $Id$ + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: lib/msvcrt/io/read.c + * PURPOSE: Reads a file + * PROGRAMER: Boudewijn Dekker + * UPDATE HISTORY: + * 28/12/1998: Created + * 03/05/2002: made _read() non-greedy - it now returns as soon as + * any amount of data has been read. It's the expected + * behavior for line-buffered streams (KJK::Hyperion) + */ + +#include +#include +#include + +#define NDEBUG +#include + +/* + * @implemented + */ +size_t _read(int _fd, void *_buf, size_t _nbyte) +{ + DWORD _rbyte = 0, nbyte = _nbyte; + char *bufp = (char*)_buf; + HANDLE hfile; + int istext, error; + + DPRINT("_read(fd %d, buf %x, nbyte %d)\n", _fd, _buf, _nbyte); + + /* null read */ + if(_nbyte == 0) + return 0; + + hfile = _get_osfhandle(_fd); + istext = __fileno_getmode(_fd) & O_TEXT; + + /* read data */ + if (!ReadFile(hfile, bufp, nbyte, &_rbyte, NULL)) + { + /* failure */ + error = GetLastError(); + if (error == ERROR_BROKEN_PIPE) + { + return 0; + } + _dosmaperr(error); + return -1; + } + + /* text mode */ + if (_rbyte && istext) + { + int found_cr = 0; + int cr = 0; + DWORD count = _rbyte; + + /* repeat for all bytes in the buffer */ + for(; count; bufp++, count--) + { +#if 1 + /* carriage return */ + if (*bufp == '\r') { + found_cr = 1; + if (cr != 0) { + *(bufp - cr) = *bufp; + } + continue; + } + if (found_cr) { + found_cr = 0; + if (*bufp == '\n') { + cr++; + *(bufp - cr) = *bufp; + } else { + } + } else if (cr != 0) { + *(bufp - cr) = *bufp; + } +#else + /* carriage return */ + if (*bufp == '\r') { + cr++; + } + /* shift characters back, to ignore carriage returns */ + else if (cr != 0) { + *(bufp - cr) = *bufp; + } +#endif + } + if (found_cr) { + cr++; + } + /* ignore the carriage returns */ + _rbyte -= cr; + } + DPRINT("%d\n", _rbyte); + return _rbyte; +} diff --git a/reactos/lib/crt/io/setmode.c b/reactos/lib/crt/io/setmode.c new file mode 100644 index 00000000000..a64c9394fc7 --- /dev/null +++ b/reactos/lib/crt/io/setmode.c @@ -0,0 +1,27 @@ +/* $Id$ + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: lib/msvcrt/io/setmode.c + * PURPOSE: Sets the file translation mode + * PROGRAMER: Boudewijn Dekker + * UPDATE HISTORY: + * 28/12/98: Created + */ + +#include +#include +#include + +#define NDEBUG +#include + + +/* + * @implemented + */ +int _setmode(int _fd, int _newmode) +{ + DPRINT("_setmod(fd %d, newmode %x)\n", _fd, _newmode); + return __fileno_setmode(_fd, _newmode); +} diff --git a/reactos/lib/crt/io/sopen.c b/reactos/lib/crt/io/sopen.c new file mode 100644 index 00000000000..a28f374c256 --- /dev/null +++ b/reactos/lib/crt/io/sopen.c @@ -0,0 +1,10 @@ +#include + + +/* + * @implemented + */ +int _sopen(char *path, int access, int shflag, int mode) +{ + return _open((path), (access)|(shflag), (mode)); +} diff --git a/reactos/lib/crt/io/stubs.c b/reactos/lib/crt/io/stubs.c new file mode 100644 index 00000000000..aadc2411f4c --- /dev/null +++ b/reactos/lib/crt/io/stubs.c @@ -0,0 +1 @@ +void *__badioinfo; diff --git a/reactos/lib/crt/io/tell.c b/reactos/lib/crt/io/tell.c new file mode 100644 index 00000000000..b21c29b4fb9 --- /dev/null +++ b/reactos/lib/crt/io/tell.c @@ -0,0 +1,12 @@ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#include +#include + + +/* + * @implemented + */ +off_t _tell(int _file) +{ + return _lseek(_file, 0, SEEK_CUR); +} diff --git a/reactos/lib/crt/io/telli64.c b/reactos/lib/crt/io/telli64.c new file mode 100644 index 00000000000..9f584d8931d --- /dev/null +++ b/reactos/lib/crt/io/telli64.c @@ -0,0 +1,11 @@ +#include +#include + + +/* + * @implemented + */ +__int64 _telli64(int _file) +{ + return _lseeki64(_file, 0, SEEK_CUR); +} diff --git a/reactos/lib/crt/io/umask.c b/reactos/lib/crt/io/umask.c new file mode 100644 index 00000000000..58bc2f12db8 --- /dev/null +++ b/reactos/lib/crt/io/umask.c @@ -0,0 +1,14 @@ +/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ +#include + +unsigned _unMode_dll = 022; + +/* + * @implemented + */ +unsigned _umask (unsigned unMode) +{ + unsigned old_mask = _unMode_dll; + _unMode_dll = unMode; + return old_mask; +} diff --git a/reactos/lib/crt/io/unlink.c b/reactos/lib/crt/io/unlink.c new file mode 100644 index 00000000000..48e777f233a --- /dev/null +++ b/reactos/lib/crt/io/unlink.c @@ -0,0 +1,29 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: lib/msvcrt/io/unlink.c + * PURPOSE: Deletes a file + * PROGRAMER: Boudewijn Dekker + * UPDATE HISTORY: + * 28/12/98: Created + */ + +#include "precomp.h" +#include + +#define NDEBUG +#include + + +/* + * @implemented + */ +int _unlink(const char* filename) +{ + DPRINT("_unlink('%s')\n", filename); + if (!DeleteFileA(filename)) { + _dosmaperr(GetLastError()); + return -1; + } + return 0; +} diff --git a/reactos/lib/crt/io/utime.c b/reactos/lib/crt/io/utime.c new file mode 100644 index 00000000000..326e1fdae1e --- /dev/null +++ b/reactos/lib/crt/io/utime.c @@ -0,0 +1,25 @@ +#include +#include +#include +#include +#include + + +/* + * @implemented + */ +int _utime(const char* filename, struct _utimbuf* buf) +{ + int fn; + int ret; + + fn = _open(filename, _O_RDWR); + if (fn == -1) { + __set_errno(EBADF); + return -1; + } + ret = _futime(fn, buf); + if (_close(fn) < 0) + return -1; + return ret; +} diff --git a/reactos/lib/crt/io/waccess.c b/reactos/lib/crt/io/waccess.c new file mode 100644 index 00000000000..eb673ba14db --- /dev/null +++ b/reactos/lib/crt/io/waccess.c @@ -0,0 +1,32 @@ +#include "precomp.h" +#include +#include +#define NDEBUG +#include + + +/* + * @implemented + */ +int _waccess(const wchar_t *_path, int _amode) +{ + DWORD Attributes = GetFileAttributesW(_path); + + if (Attributes == -1) { + _dosmaperr(GetLastError()); + return -1; + } + if ((_amode & W_OK) == W_OK) { + if ((Attributes & FILE_ATTRIBUTE_READONLY) == FILE_ATTRIBUTE_READONLY) { + __set_errno(EACCES); + return -1; + } + } + if ((_amode & D_OK) == D_OK) { + if ((Attributes & FILE_ATTRIBUTE_DIRECTORY) != FILE_ATTRIBUTE_DIRECTORY) { + __set_errno(EACCES); + return -1; + } + } + return 0; +} diff --git a/reactos/lib/crt/io/wchmod.c b/reactos/lib/crt/io/wchmod.c new file mode 100644 index 00000000000..a4df3ed67c0 --- /dev/null +++ b/reactos/lib/crt/io/wchmod.c @@ -0,0 +1,47 @@ +#include "precomp.h" +#include + +#define NDEBUG +#include + +#define mode_t int + + +/* + * @implemented + */ +int _wchmod(const wchar_t* filename, mode_t mode) +{ + DWORD FileAttributes = 0; + BOOLEAN Set = FALSE; + + DPRINT("_wchmod('%S', %x)\n", filename, mode); + + FileAttributes = GetFileAttributesW(filename); + if ( FileAttributes == -1 ) { + _dosmaperr(GetLastError()); + return -1; + } + + if ( mode == 0 ) + return -1; + + if (mode & _S_IWRITE) { + if (FileAttributes & FILE_ATTRIBUTE_READONLY) { + FileAttributes &= ~FILE_ATTRIBUTE_READONLY; + Set = TRUE; + } + } else { + if (!(FileAttributes & FILE_ATTRIBUTE_READONLY)) { + FileAttributes |= FILE_ATTRIBUTE_READONLY; + Set = TRUE; + } + } + + if (Set && SetFileAttributesW(filename, FileAttributes) == FALSE) { + _dosmaperr(GetLastError()); + return -1; + } + + return 0; +} diff --git a/reactos/lib/crt/io/wcreate.c b/reactos/lib/crt/io/wcreate.c new file mode 100644 index 00000000000..b61d88f9e36 --- /dev/null +++ b/reactos/lib/crt/io/wcreate.c @@ -0,0 +1,15 @@ +#include +#include + +#define NDEBUG +#include + + +/* + * @implemented + */ +int _wcreat(const wchar_t* filename, int mode) +{ + DPRINT("_wcreat('%S', mode %x)\n", filename, mode); + return _wopen(filename,_O_CREAT|_O_TRUNC,mode); +} diff --git a/reactos/lib/crt/io/wfind.c b/reactos/lib/crt/io/wfind.c new file mode 100644 index 00000000000..4ade252ae3f --- /dev/null +++ b/reactos/lib/crt/io/wfind.c @@ -0,0 +1,226 @@ +#include "precomp.h" +#include +#include +#include + + +/* + * @implemented + */ +int _wfindfirst(const wchar_t* _name, struct _wfinddata_t* result) +{ + WIN32_FIND_DATAW FindFileData; + wchar_t dir[MAX_PATH]; + long hFindFile; + int len = 0; + + if ( _name == NULL || _name[0] == 0 ) { + len = GetCurrentDirectoryW(MAX_PATH-4, dir); + if (dir[len-1] != L'\\') { + dir[len] = L'\\'; + dir[len+1] = 0; + } + wcscat(dir, L"*.*"); + } else { + wcscpy(dir, _name); + } + + hFindFile = (long)FindFirstFileW(dir, &FindFileData); + if (hFindFile == -1) { + memset(result,0,sizeof(struct _wfinddata_t)); + _dosmaperr(GetLastError()); + return -1; + } + + result->attrib = FindFileData.dwFileAttributes; + result->time_create = FileTimeToUnixTime(&FindFileData.ftCreationTime,NULL); + result->time_access = FileTimeToUnixTime(&FindFileData.ftLastAccessTime,NULL); + result->time_write = FileTimeToUnixTime(&FindFileData.ftLastWriteTime,NULL); + result->size = FindFileData.nFileSizeLow; + wcsncpy(result->name,FindFileData.cFileName,MAX_PATH); + + // if no wildcard the find file handle can be closed right away + // a return value of 0 can flag this. + if (!wcschr(dir, L'*') && !wcschr(dir, L'?')) { + _findclose(hFindFile); + return 0; + } + + return hFindFile; +} + +/* + * @implemented + */ +int _findfirsti64(const char *_name, struct _finddatai64_t *result) +{ + WIN32_FIND_DATAA FindFileData; + char dir[MAX_PATH]; + long hFindFile; + int len = 0; + + if ( _name == NULL || _name[0] == 0 ) + { + len = GetCurrentDirectoryA(MAX_PATH-4,dir); + if (dir[len-1] != '\\') + { + dir[len] = '\\'; + dir[len+1] = 0; + } + strcat(dir, "*.*"); + } + else + strcpy(dir, _name); + + hFindFile = (long)FindFirstFileA(dir, &FindFileData); + if (hFindFile == -1) + { + memset(result,0,sizeof(struct _finddatai64_t)); + _dosmaperr(GetLastError()); + return -1; + } + + result->attrib = FindFileData.dwFileAttributes; + result->time_create = FileTimeToUnixTime(&FindFileData.ftCreationTime,NULL); + result->time_access = FileTimeToUnixTime(&FindFileData.ftLastAccessTime,NULL); + result->time_write = FileTimeToUnixTime(&FindFileData.ftLastWriteTime,NULL); + result->size = + (((__int64)FindFileData.nFileSizeLow)<<32) + FindFileData.nFileSizeLow; + strncpy(result->name,FindFileData.cFileName,MAX_PATH); + + // if no wildcard the find file handle can be closed right away + // a return value of 0 can flag this. + + if (!strchr(dir,'*') && !strchr(dir,'?')) { + _findclose(hFindFile); + return 0; + } + return hFindFile; +} + +/* + * @implemented + */ +int _findnexti64(int handle, struct _finddatai64_t *result) +{ + WIN32_FIND_DATAA FindFileData; + + // check no wildcards or invalid handle + if (handle == 0 || handle == -1) + return 0; + + if (!FindNextFileA((void *)handle, &FindFileData)) { + _dosmaperr(GetLastError()); + return -1; + } + + result->attrib = FindFileData.dwFileAttributes; + result->time_create = FileTimeToUnixTime(&FindFileData.ftCreationTime,NULL); + result->time_access = FileTimeToUnixTime(&FindFileData.ftLastAccessTime,NULL); + result->time_write = FileTimeToUnixTime(&FindFileData.ftLastWriteTime,NULL); + result->size = + (((__int64)FindFileData.nFileSizeLow)<<32) + FindFileData.nFileSizeLow; + strncpy(result->name,FindFileData.cFileName,MAX_PATH); + + return 0; +} + +/* + * @implemented + */ +int _wfindfirsti64(const wchar_t *_name, struct _wfinddatai64_t *result) +{ + WIN32_FIND_DATAW FindFileData; + wchar_t dir[MAX_PATH]; + long hFindFile; + int len = 0; + + if (_name == NULL || _name[0] == 0) + { + len = GetCurrentDirectoryW(MAX_PATH-4,dir); + if (dir[len-1] != L'\\') + { + dir[len] = L'\\'; + dir[len+1] = 0; + } + wcscat(dir, L"*.*"); + } + else + wcscpy(dir, _name); + + hFindFile = (long)FindFirstFileW(dir, &FindFileData); + if (hFindFile == -1) + { + memset(result,0,sizeof(struct _wfinddatai64_t)); + _dosmaperr(GetLastError()); + return -1; + } + + result->attrib = FindFileData.dwFileAttributes; + result->time_create = FileTimeToUnixTime(&FindFileData.ftCreationTime,NULL); + result->time_access = FileTimeToUnixTime(&FindFileData.ftLastAccessTime,NULL); + result->time_write = FileTimeToUnixTime(&FindFileData.ftLastWriteTime,NULL); + result->size = + (((__int64)FindFileData.nFileSizeLow)<<32) + FindFileData.nFileSizeLow; + wcsncpy(result->name,FindFileData.cFileName,MAX_PATH); + + // if no wildcard the find file handle can be closed right away + // a return value of 0 can flag this. + + if (!wcschr(dir,L'*') && !wcschr(dir,L'?')) + { + _findclose(hFindFile); + return 0; + } + + return hFindFile; +} + +/* + * @implemented + */ +int _wfindnext(int handle, struct _wfinddata_t *result) +{ + WIN32_FIND_DATAW FindFileData; + + // check no wildcards or invalid handle + if (handle == 0 || handle == -1) + return 0; + + if (!FindNextFileW((void *)handle, &FindFileData)) + return -1; + + result->attrib = FindFileData.dwFileAttributes; + result->time_create = FileTimeToUnixTime(&FindFileData.ftCreationTime,NULL); + result->time_access = FileTimeToUnixTime(&FindFileData.ftLastAccessTime,NULL); + result->time_write = FileTimeToUnixTime(&FindFileData.ftLastWriteTime,NULL); + result->size = FindFileData.nFileSizeLow; + wcsncpy(result->name,FindFileData.cFileName, MAX_PATH); + + return 0; +} + +/* + * @implemented + */ +int _wfindnexti64(int handle, struct _wfinddatai64_t *result) +{ + WIN32_FIND_DATAW FindFileData; + + // check no wildcards or invalid handle + if (handle == 0 || handle == -1) + return 0; + + if (!FindNextFileW((void *)handle, &FindFileData)) + return -1; + + result->attrib = FindFileData.dwFileAttributes; + result->time_create = FileTimeToUnixTime(&FindFileData.ftCreationTime,NULL); + result->time_access = FileTimeToUnixTime(&FindFileData.ftLastAccessTime,NULL); + result->time_write = FileTimeToUnixTime(&FindFileData.ftLastWriteTime,NULL); + result->size = + (((__int64)FindFileData.nFileSizeLow)<<32) + FindFileData.nFileSizeLow; + wcsncpy(result->name,FindFileData.cFileName,MAX_PATH); + + return 0; +} diff --git a/reactos/lib/crt/io/wmktemp.c b/reactos/lib/crt/io/wmktemp.c new file mode 100644 index 00000000000..75edf72bbe9 --- /dev/null +++ b/reactos/lib/crt/io/wmktemp.c @@ -0,0 +1,78 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details + * PROJECT: ReactOS system libraries + * FILE: lib/msvcrt/io/mktemp.c + * PURPOSE: Makes a temp file based on a template + * PROGRAMER: DJ Delorie + Boudewijn Dekker + * UPDATE HISTORY: + * 28/12/98: Appropriated for the Reactos Kernel + */ + +/* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ + +#include +#include +#include + +#define NDEBUG +#include + + +/* + * @implemented + */ +wchar_t* _wmktemp (wchar_t *_template) +{ + static int count = 0; + wchar_t *cp, *dp; + int i, len, xcount, loopcnt; + + DPRINT("_wmktemp('%S')\n", _template); + len = wcslen (_template); + cp = _template + len; + + xcount = 0; + while (xcount < 6 && cp > _template && cp[-1] == L'X') + xcount++, cp--; + + if (xcount) { + dp = cp; + while (dp > _template && dp[-1] != L'/' && dp[-1] != L'\\' && dp[-1] != L':') + dp--; + + /* Keep the first characters of the template, but turn the rest into + Xs. */ + while (cp > dp + 8 - xcount) { + *--cp = L'X'; + xcount = (xcount >= 6) ? 6 : 1 + xcount; + } + + /* If dots occur too early -- squash them. */ + while (dp < cp) { + if (*dp == L'.') *dp = L'a'; + dp++; + } + + /* Try to add ".tmp" to the filename. Truncate unused Xs. */ + if (cp + xcount + 3 < _template + len) + wcscpy (cp + xcount, L".tmp"); + else + cp[xcount] = 0; + + /* This loop can run up to 2<<(5*6) times, or about 10^9 times. */ + for (loopcnt = 0; loopcnt < (1 << (5 * xcount)); loopcnt++) { + int c = count++; + for (i = 0; i < xcount; i++, c >>= 5) + cp[i] = L"abcdefghijklmnopqrstuvwxyz012345"[c & 0x1f]; + if (_waccess(_template,0) == -1) + return _template; + } + } + + /* Failure: truncate the template and return NULL. */ + *_template = 0; + return 0; +} diff --git a/reactos/lib/crt/io/wopen.c b/reactos/lib/crt/io/wopen.c new file mode 100644 index 00000000000..f5c2fa398da --- /dev/null +++ b/reactos/lib/crt/io/wopen.c @@ -0,0 +1,148 @@ +/* $Id$ + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: lib/msvcrt/io/open.c + * PURPOSE: Opens a file and translates handles to fileno + * PROGRAMER: Boudewijn Dekker + * UPDATE HISTORY: + * 28/12/98: Created + */ + +// rember to interlock the allocation of fileno when making this thread safe +// possibly store extra information at the handle + +#include "precomp.h" +#if !defined(NDEBUG) && defined(DBG) +#include +#endif +#include +#include +#include +#include +#include +#include +#include +#include + +#define NDEBUG +#include + + +/* + * @implemented + */ +int _wopen(const wchar_t* _path, int _oflag, ...) +{ +#if !defined(NDEBUG) && defined(DBG) + va_list arg; + int pmode; +#endif + HANDLE hFile; + DWORD dwDesiredAccess = 0; + DWORD dwShareMode = 0; + DWORD dwCreationDistribution = 0; + DWORD dwFlagsAndAttributes = 0; + SECURITY_ATTRIBUTES sa = {sizeof(SECURITY_ATTRIBUTES), NULL, TRUE}; + +#if !defined(NDEBUG) && defined(DBG) + va_start(arg, _oflag); + pmode = va_arg(arg, int); +#endif + +// DPRINT("_wopen('%S', %x, (%x))\n", _path, _oflag, pmode); + + if ((_oflag & S_IREAD) == S_IREAD) + dwShareMode = FILE_SHARE_READ; + else if ( ( _oflag & S_IWRITE) == S_IWRITE) { + dwShareMode = FILE_SHARE_READ | FILE_SHARE_WRITE; + } + + /* + * + * _O_BINARY Opens file in binary (untranslated) mode. (See fopen for a description of binary mode.) + * _O_TEXT Opens file in text (translated) mode. (For more information, see Text and Binary Mode File I/O and fopen.) + * + * _O_APPEND Moves file pointer to end of file before every write operation. + */ +#if 0 + if ((_oflag & _O_RDWR) == _O_RDWR) + dwDesiredAccess |= GENERIC_WRITE|GENERIC_READ | FILE_READ_DATA | + FILE_WRITE_DATA | FILE_READ_ATTRIBUTES | + FILE_WRITE_ATTRIBUTES; + else if ((_oflag & O_RDONLY) == O_RDONLY) + dwDesiredAccess |= GENERIC_READ | FILE_READ_DATA | FILE_READ_ATTRIBUTES | + FILE_WRITE_ATTRIBUTES; + else if ((_oflag & _O_WRONLY) == _O_WRONLY) + dwDesiredAccess |= GENERIC_WRITE | FILE_WRITE_DATA | + FILE_READ_ATTRIBUTES | FILE_WRITE_ATTRIBUTES; +#else + if ((_oflag & _O_WRONLY) == _O_WRONLY) + dwDesiredAccess |= GENERIC_WRITE | FILE_WRITE_DATA | + FILE_READ_ATTRIBUTES | FILE_WRITE_ATTRIBUTES; + else if ((_oflag & _O_RDWR) == _O_RDWR) + dwDesiredAccess |= GENERIC_WRITE|GENERIC_READ | FILE_READ_DATA | + FILE_WRITE_DATA | FILE_READ_ATTRIBUTES | + FILE_WRITE_ATTRIBUTES; + else //if ((_oflag & O_RDONLY) == O_RDONLY) + dwDesiredAccess |= GENERIC_READ | FILE_READ_DATA | FILE_READ_ATTRIBUTES | + FILE_WRITE_ATTRIBUTES; +#endif + + if ((_oflag & S_IREAD) == S_IREAD) + dwShareMode |= FILE_SHARE_READ; + + if ((_oflag & S_IWRITE) == S_IWRITE) + dwShareMode |= FILE_SHARE_WRITE; + + if ((_oflag & (_O_CREAT | _O_EXCL)) == (_O_CREAT | _O_EXCL)) + dwCreationDistribution |= CREATE_NEW; + + else if ((_oflag & O_TRUNC) == O_TRUNC) { + if ((_oflag & O_CREAT) == O_CREAT) + dwCreationDistribution |= CREATE_ALWAYS; + else if ((_oflag & O_RDONLY) != O_RDONLY) + dwCreationDistribution |= TRUNCATE_EXISTING; + } + else if ((_oflag & _O_APPEND) == _O_APPEND) + dwCreationDistribution |= OPEN_EXISTING; + else if ((_oflag & _O_CREAT) == _O_CREAT) + dwCreationDistribution |= OPEN_ALWAYS; + else + dwCreationDistribution |= OPEN_EXISTING; + + if ((_oflag & _O_RANDOM) == _O_RANDOM) + dwFlagsAndAttributes |= FILE_FLAG_RANDOM_ACCESS; + if ((_oflag & _O_SEQUENTIAL) == _O_SEQUENTIAL) + dwFlagsAndAttributes |= FILE_FLAG_SEQUENTIAL_SCAN; + + if ((_oflag & _O_TEMPORARY) == _O_TEMPORARY) + dwFlagsAndAttributes |= FILE_FLAG_DELETE_ON_CLOSE; + + if ((_oflag & _O_SHORT_LIVED) == _O_SHORT_LIVED) + dwFlagsAndAttributes |= FILE_FLAG_DELETE_ON_CLOSE; + + if (_oflag & _O_NOINHERIT) + sa.bInheritHandle = FALSE; + + hFile = CreateFileW(_path, + dwDesiredAccess, + dwShareMode, + &sa, + dwCreationDistribution, + dwFlagsAndAttributes, + NULL); + if (hFile == (HANDLE)-1) { + _dosmaperr(GetLastError()); + return -1; + } + return __fileno_alloc(hFile,_oflag); +} + +/* + * @implemented + */ +int _wsopen(wchar_t* path, int access, int shflag, int mode) +{ + return _wopen((path), (access)|(shflag), (mode)); +} diff --git a/reactos/lib/crt/io/write.c b/reactos/lib/crt/io/write.c new file mode 100644 index 00000000000..f17924ee955 --- /dev/null +++ b/reactos/lib/crt/io/write.c @@ -0,0 +1,103 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: lib/msvcrt/io/write.c + * PURPOSE: Writes to a file + * PROGRAMER: Boudewijn Dekker + * UPDATE HISTORY: + * 28/12/98: Created + */ + +#include "precomp.h" +#include +#include +#include +#include +#include + +#define NDEBUG +#include + +#define BUFSIZE 4096 +/* +void ReportLastError(void) +{ + DWORD error = GetLastError(); + if (error != ERROR_SUCCESS) { + PTSTR msg; + if (FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER|FORMAT_MESSAGE_FROM_SYSTEM, + 0, error, MAKELANGID(LANG_NEUTRAL,SUBLANG_DEFAULT), (PTSTR)&msg, 0, NULL)) { + printf("ReportLastError() %d - %s\n", error, msg); + } else { + printf("ReportLastError() %d - unknown error\n", error); + } + LocalFree(msg); + } +} + */ +/* + * @implemented + */ +size_t _write(int _fd, const void* _buf, size_t _nbyte) +{ + char *tmp, *in, *out; + int result; + unsigned int count; + DWORD wbyte; + + DPRINT("_write(fd %d, buf %x, nbyte %d)\n", _fd, _buf, _nbyte); + if (__fileno_getmode(_fd) & O_TEXT) { + result = _nbyte; + tmp = (char*) malloc(BUFSIZE); + if (tmp == NULL) { + __set_errno(ENOMEM); + return -1; + } + count = BUFSIZE; + out = tmp; + in = (char*) _buf; + while (_nbyte--) { + if (*in == 0x0a) { + *out++ = 0x0d; + count--; + if (count == 0) { + if (!WriteFile(_get_osfhandle(_fd), tmp, BUFSIZE, &wbyte, NULL)) { + //ReportLastError(); + _dosmaperr(GetLastError()); + result = -1; + break; + } + if (wbyte < BUFSIZE) { + result = in - (char*)_buf; + break; + } + count = BUFSIZE; + out = tmp; + } + } + *out++ = *in++; + count--; + if (count == 0 || _nbyte == 0) { + if (!WriteFile(_get_osfhandle(_fd), tmp, BUFSIZE - count, &wbyte, NULL)) { + _dosmaperr(GetLastError()); + result = -1; + break; + } + if (wbyte < (BUFSIZE - count)) { + result = in - (char*)_buf; + break; + } + count = BUFSIZE; + out = tmp; + } + } + free(tmp); + return result; + } else { + if(!WriteFile(_get_osfhandle(_fd), _buf, _nbyte, &wbyte, NULL)) { + _dosmaperr(GetLastError()); + return -1; + } + return wbyte; + } +} diff --git a/reactos/lib/crt/io/wunlink.c b/reactos/lib/crt/io/wunlink.c new file mode 100644 index 00000000000..c59186ddc58 --- /dev/null +++ b/reactos/lib/crt/io/wunlink.c @@ -0,0 +1,29 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: lib/msvcrt/io/unlink.c + * PURPOSE: Deletes a file + * PROGRAMER: Boudewijn Dekker + * UPDATE HISTORY: + * 28/12/98: Created + */ + +#include "precomp.h" +#include + +#define NDEBUG +#include +#include + +/* + * @implemented + */ +int _wunlink(const wchar_t* filename) +{ + DPRINT("_wunlink('%S')\n", filename); + if (!DeleteFileW(filename)) { + _dosmaperr(GetLastError()); + return -1; + } + return 0; +} diff --git a/reactos/lib/crt/io/wutime.c b/reactos/lib/crt/io/wutime.c new file mode 100644 index 00000000000..452769b884a --- /dev/null +++ b/reactos/lib/crt/io/wutime.c @@ -0,0 +1,25 @@ +#include +#include +#include +#include +#include + + +/* + * @implemented + */ +int _wutime(const wchar_t* filename, struct _utimbuf* buf) +{ + int fn; + int ret; + + fn = _wopen(filename, _O_RDWR); + if (fn == -1) { + __set_errno(EBADF); + return -1; + } + ret = _futime(fn, buf); + if (_close(fn) < 0) + return -1; + return ret; +} diff --git a/reactos/lib/crt/locale/locale.c b/reactos/lib/crt/locale/locale.c new file mode 100644 index 00000000000..3486b70eb98 --- /dev/null +++ b/reactos/lib/crt/locale/locale.c @@ -0,0 +1,280 @@ +/* + * Some stuff takem from wine msvcrt\locale.c + * + * Copyright 2000 Jon Griffiths + */ + +#include "precomp.h" +#include +#include +#include +#include +#include +#include + +#define NDEBUG +#include + +unsigned int __setlc_active; +unsigned int __unguarded_readlc_active; +int _current_category; /* used by setlocale */ +const char *_current_locale; + +int parse_locale(char *locale, char *lang, char *country, char *code_page); + +/* + * @unimplemented + */ +char *setlocale(int category, const char *locale) +{ + char lang[100]; + char country[100]; + char code_page[100]; + if (NULL != locale) { + parse_locale((char *)locale,lang,country,code_page); + } + + //printf("%s %s %s %s\n",locale,lang,country,code_page); + + + switch ( category ) + { + case LC_COLLATE: + break; + case LC_CTYPE: + break; + case LC_MONETARY: + break; + case LC_NUMERIC: + break; + case LC_TIME: + break; + case LC_ALL: + break; + default: + break; + } + + return "C"; + +} + +/* + +locale "lang[_country[.code_page]]" + | ".code_page" + | "" + | NULL + +*/ +int parse_locale(char *locale, char *lang, char *country, char *code_page) +{ + while ( *locale != 0 && *locale != '.' && *locale != '_' ) + { + *lang = *locale; + lang++; + locale++; + } + *lang = 0; + if ( *locale == '_' ) { + locale++; + while ( *locale != 0 && *locale != '.' ) + { + *country = *locale; + country++; + locale++; + } + } + *country = 0; + + + if ( *locale == '.' ) { + locale++; + while ( *locale != 0 && *locale != '.' ) + { + *code_page = *locale; + code_page++; + locale++; + } + } + + *code_page = 0; + return 0; +} + +const struct map_lcid2str { + short langid; + const char *langname; + const char *country; +} languages[]={ + {0x0409,"English", "United States"}, + {0x0809,"English", "United Kingdom"}, + {0x0000,"Unknown", "Unknown"} + +}; + +const struct map_cntr { + const char *abrev; + const char *country; +} abrev[] = { + {"britain", "united kingdom"}, + {"england", "united kingdom"}, + {"gbr", "united kingdom"}, + {"great britain", "united kingdom"}, + {"uk", "united kingdom"}, + {"united kingdom", "united kingdom"}, + {"united-kingdom", "united kingdom"}, + {"america", "united states" }, + {"united states", "united states"}, + {"united-states", "united states"}, + {"us", "united states"}, + {"usa" "united states"} +}; + + +struct lconv _lconv = { +".", // decimal_point +",", // thousands_sep +"", // grouping; +"DOL", // int_curr_symbol +"$", // currency_symbol +".", // mon_decimal_point +",", // mon_thousands_sep +"", // mon_grouping; +"+", // positive_sign +"-", // negative_sign +127, // int_frac_digits +127, // frac_digits +127, // p_cs_precedes +127, // p_sep_by_space +127, // n_cs_precedes +127, // n_sep_by_space +127, // p_sign_posn; +127 // n_sign_posn; +}; + +/* + * @implemented + */ +struct lconv *localeconv(void) +{ + return (struct lconv *) &_lconv; +} + +/********************************************************************* + * _setmbcp (MSVCRT.@) + * + * @unimplemented + */ +void _setmbcp(int cp) +{ +DPRINT1("_setmbcp - stub\n"); +return; +} + + +/********************************************************************* + * __lc_collate_cp (MSVCRT.@) + * + * @unimplemented + */ +void __lc_collate_cp(int cp) +{ +DPRINT1("__lc_collate_cp - stub\n"); +return; +} + + +/********************************************************************* + * __lc_handle (MSVCRT.@) + * + * @unimplemented + */ +void __lc_handle(void) +{ +DPRINT1("__lc_handle - stub\n"); +return; +} + + +/********************************************************************* + * __lc_codepage (MSVCRT.@) + * + * @unimplemented + */ +void __lc_codepage(void) +{ +DPRINT1("__lc_codepage - stub\n"); +return; +} + + +/********************************************************************* + * _Gettnames (MSVCRT.@) + */ +void *_Gettnames(void) +{ + DPRINT1("(void), stub!\n"); + return NULL; +} + +/********************************************************************* + * __lconv_init (MSVCRT.@) + */ +void __lconv_init(void) +{ + DPRINT1(" stub\n"); +} + + +/********************************************************************* + * _Strftime (MSVCRT.@) + */ +const char* _Strftime(char *out, unsigned int len, const char *fmt, + const void *tm, void *foo) +{ + /* FIXME: */ + DPRINT1("(%p %d %s %p %p) stub\n", out, len, fmt, tm, foo); + return ""; +} + + +/********************************************************************* + * _Getdays (MSVCRT.@) + */ +const char* _Getdays(void) +{ + static const char *MSVCRT_days = ":Sun:Sunday:Mon:Monday:Tue:Tuesday:Wed:" + "Wednesday:Thu:Thursday:Fri:Friday:Sat:Saturday"; + /* FIXME: Use locale */ + DPRINT1("(void) semi-stub\n"); + return MSVCRT_days; +} + +/********************************************************************* + * _Getmonths (MSVCRT.@) + */ +const char* _Getmonths(void) +{ + static const char *MSVCRT_months = ":Jan:January:Feb:February:Mar:March:Apr:" + "April:May:May:Jun:June:Jul:July:Aug:August:Sep:September:Oct:" + "October:Nov:November:Dec:December"; + /* FIXME: Use locale */ + DPRINT1("(void) semi-stub\n"); + return MSVCRT_months; +} + +/********************************************************************* + * __crtLCMapStringA (MSVCRT.@) + */ +int __crtLCMapStringA( + LCID lcid, DWORD mapflags, const char* src, int srclen, char* dst, + int dstlen, unsigned int codepage, int xflag +) { + DPRINT1("(lcid %lx, flags %lx, %s(%d), %p(%d), %x, %d), partial stub!\n", + lcid,mapflags,src,srclen,dst,dstlen,codepage,xflag); + /* FIXME: A bit incorrect. But msvcrt itself just converts its + * arguments to wide strings and then calls LCMapStringW + */ + return LCMapStringA(lcid,mapflags,src,srclen,dst,dstlen); +} diff --git a/reactos/lib/crt/makefile b/reactos/lib/crt/makefile new file mode 100644 index 00000000000..053fc66731a --- /dev/null +++ b/reactos/lib/crt/makefile @@ -0,0 +1,475 @@ +# $Id: Makefile 12852 2005-01-06 13:58:04Z mf $ + +PATH_TO_TOP = ../.. + +TARGET_DEFONLY = yes + +TARGET_TYPE = library + +TARGET_NAME = crt + +TARGET_PCH = precomp.h + +TARGET_CFLAGS = -D_MSVCRT_LIB_ -Wall -Werror + +# require os code to explicitly request A/W version of structs/functions +TARGET_CFLAGS += \ + -D_DISABLE_TIDENTS \ + -D__USE_W32API \ + -D__REACTOS__ \ + -D_WIN32_IE=0x600 \ + -D_WIN32_WINNT=0x501 \ + -DUSE_MSVCRT_PREFIX \ + -D_MT + +CONIO_OBJECTS = \ + conio/cgets.o \ + conio/cprintf.o \ + conio/cputs.o \ + conio/cscanf.o \ + conio/getch.o \ + conio/getche.o \ + conio/kbhit.o \ + conio/putch.o \ + conio/ungetch.o + +CTYPE_OBJECTS = \ + ctype/ctype.o \ + ctype/isalnum.o \ + ctype/isalpha.o \ + ctype/isascii.o \ + ctype/iscntrl.o \ + ctype/isdigit.o \ + ctype/isgraph.o \ + ctype/islower.o \ + ctype/isprint.o \ + ctype/ispunct.o \ + ctype/isspace.o \ + ctype/isupper.o \ + ctype/isxdigit.o \ + ctype/toascii.o \ + ctype/tolower.o \ + ctype/toupper.o \ + ctype/iscsym.o \ + ctype/isctype.o + +DIRECT_OBJECTS = \ + direct/chdir.o \ + direct/chdrive.o \ + direct/getcwd.o \ + direct/getdcwd.o \ + direct/getdfree.o \ + direct/getdrive.o \ + direct/mkdir.o \ + direct/rmdir.o \ + direct/wchdir.o \ + direct/wgetcwd.o \ + direct/wgetdcwd.o \ + direct/wmkdir.o \ + direct/wrmdir.o + +EXCEPT_OBJECTS = \ + except/seh.o \ + except/abnorter.o \ + except/exhand2.o \ + except/matherr.o \ + except/unwind.o \ + except/xcptfil.o + +FLOAT_OBJECTS = \ + float/chgsign.o \ + float/clearfp.o \ + float/cntrlfp.o \ + float/copysign.o \ + float/fpclass.o \ + float/fpecode.o \ + float/fpreset.o \ + float/isnan.o \ + float/logb.o \ + float/nafter.o \ + float/scalb.o \ + float/statfp.o + +IO_OBJECTS = \ + io/access.o \ + io/chmod.o \ + io/chsize.o \ + io/close.o \ + io/commit.o \ + io/create.o \ + io/dup.o \ + io/dup2.o \ + io/eof.o \ + io/filelen.o \ + io/fileleni.o \ + io/find.o \ + io/fmode.o \ + io/isatty.o \ + io/locking.o \ + io/lseek.o \ + io/lseeki64.o \ + io/mktemp.o \ + io/open.o \ + io/pipe.o \ + io/read.o \ + io/setmode.o \ + io/sopen.o \ + io/stubs.o \ + io/tell.o \ + io/telli64.o \ + io/umask.o \ + io/unlink.o \ + io/utime.o \ + io/waccess.o \ + io/wchmod.o \ + io/wcreate.o \ + io/wfind.o \ + io/wmktemp.o \ + io/wopen.o \ + io/write.o \ + io/wunlink.o \ + io/wutime.o + +LOCALE_OBJECTS = \ + locale/locale.o + +MATH_OBJECTS = \ + math/acos.o \ + math/adjust.o \ + math/asin.o \ + math/atan.o \ + math/atan2.o \ + math/cabs.o \ + math/ceil.o \ + math/cos.o \ + math/cosh.o \ + math/exp.o \ + math/fabs.o \ + math/floor.o \ + math/fmod.o \ + math/frexp.o \ + math/huge_val.o \ + math/hypot.o \ + math/j0_y0.o \ + math/j1_y1.o \ + math/jn_yn.o \ + math/ldexp.o \ + math/log.o \ + math/log10.o \ + math/modf.o \ + math/pow.o \ + math/sin.o \ + math/sinh.o \ + math/sqrt.o \ + math/stubs.o \ + math/tan.o \ + math/tanh.o + +MBSTRING_OBJECTS = \ + mbstring/hanzen.o \ + mbstring/ischira.o \ + mbstring/iskana.o \ + mbstring/iskpun.o \ + mbstring/islead.o \ + mbstring/islwr.o \ + mbstring/ismbal.o \ + mbstring/ismbaln.o \ + mbstring/ismbc.o \ + mbstring/ismbgra.o \ + mbstring/ismbkaln.o \ + mbstring/ismblead.o \ + mbstring/ismbpri.o \ + mbstring/ismbpun.o \ + mbstring/ismbtrl.o \ + mbstring/isuppr.o \ + mbstring/jistojms.o \ + mbstring/jmstojis.o \ + mbstring/mbbtype.o \ + mbstring/mbccpy.o \ + mbstring/mbclen.o \ + mbstring/mbscat.o \ + mbstring/mbschr.o \ + mbstring/mbscmp.o \ + mbstring/mbscoll.o \ + mbstring/mbscpy.o \ + mbstring/mbscspn.o \ + mbstring/mbsdec.o \ + mbstring/mbsdup.o \ + mbstring/mbsicmp.o \ + mbstring/mbsicoll.o \ + mbstring/mbsinc.o \ + mbstring/mbslen.o \ + mbstring/mbslwr.o \ + mbstring/mbsncat.o \ + mbstring/mbsnccnt.o \ + mbstring/mbsncmp.o \ + mbstring/mbsncoll.o \ + mbstring/mbsncpy.o \ + mbstring/mbsnextc.o \ + mbstring/mbsnicmp.o \ + mbstring/mbsnicoll.o \ + mbstring/mbsninc.o \ + mbstring/mbsnset.o \ + mbstring/mbspbrk.o \ + mbstring/mbsrchr.o \ + mbstring/mbsrev.o \ + mbstring/mbsset.o \ + mbstring/mbsspn.o \ + mbstring/mbsspnp.o \ + mbstring/mbsstr.o \ + mbstring/mbstok.o \ + mbstring/mbstrlen.o \ + mbstring/mbsupr.o + +MISC_OBJECTS = \ + misc/amsg.o \ + misc/assert.o \ + misc/crtmain.o \ + misc/environ.o \ + misc/getargs.o \ + misc/initterm.o \ + misc/lock.o \ + misc/purecall.o \ + misc/stubs.o \ + misc/tls.o + +PROCESS_OBJECTS = \ + process/_cwait.o \ + process/_system.o \ + process/dll.o \ + process/process.o \ + process/procid.o \ + process/thread.o \ + process/threadid.o \ + process/threadx.o + +SEARCH_OBJECTS = \ + search/lfind.o \ + search/lsearch.o + +SETJMP_OBJECTS = \ + setjmp/i386/setjmp.o + +SIGNAL_OBJECTS = \ + signal/signal.o \ + signal/xcptinfo.o + +STDIO_OBJECTS = \ + stdio/allocfil.o \ + stdio/clearerr.o \ + stdio/fclose.o \ + stdio/fdopen.o \ + stdio/feof.o \ + stdio/ferror.o \ + stdio/fflush.o \ + stdio/fgetc.o \ + stdio/fgetchar.o \ + stdio/fgetpos.o \ + stdio/fgets.o \ + stdio/fgetws.o \ + stdio/filbuf.o \ + stdio/fileno.o \ + stdio/flsbuf.o \ + stdio/fopen.o \ + stdio/fprintf.o \ + stdio/fputc.o \ + stdio/fputchar.o \ + stdio/fputs.o \ + stdio/fread.o \ + stdio/freopen.o \ + stdio/fscanf.o \ + stdio/fseek.o \ + stdio/fsetpos.o \ + stdio/fsopen.o \ + stdio/ftell.o \ + stdio/fwalk.o \ + stdio/fwrite.o \ + stdio/getc.o \ + stdio/getchar.o \ + stdio/gets.o \ + stdio/getw.o \ + stdio/perror.o \ + stdio/popen.o \ + stdio/printf.o \ + stdio/putc.o \ + stdio/putchar.o \ + stdio/puts.o \ + stdio/putw.o \ + stdio/remove.o \ + stdio/rename.o \ + stdio/rewind.o \ + stdio/rmtmp.o \ + stdio/scanf.o \ + stdio/setbuf.o \ + stdio/setvbuf.o \ + stdio/sprintf.o \ + stdio/sscanf.o \ + stdio/stdhnd.o \ + stdio/tempnam.o \ + stdio/tmpfile.o \ + stdio/tmpnam.o \ + stdio/ungetc.o \ + stdio/vfprintf.o \ + stdio/vfscanf.o \ + stdio/vfwprint.o \ + stdio/vprintf.o \ + stdio/vscanf.o \ + stdio/vsprintf.o \ + stdio/vsscanf.o \ + stdio/wfdopen.o \ + stdio/wrename.o \ + stdio/wtempnam.o \ + stdio/wtmpnam.o + +STDLIB_OBJECTS = \ + stdlib/_exit.o \ + stdlib/abort.o \ + stdlib/abs.o \ + stdlib/atexit.o \ + stdlib/atof.o \ + stdlib/atoi.o \ + stdlib/atoi64.o \ + stdlib/atol.o \ + stdlib/bsearch.o \ + stdlib/div.o \ + stdlib/ecvt.o \ + stdlib/ecvtbuf.o \ + stdlib/errno.o \ + stdlib/fcvt.o \ + stdlib/fcvtbuf.o \ + stdlib/fullpath.o \ + stdlib/gcvt.o \ + stdlib/getenv.o \ + stdlib/itoa.o \ + stdlib/itow.o \ + stdlib/labs.o \ + stdlib/ldiv.o \ + stdlib/makepath.o \ + stdlib/malloc.o \ + stdlib/mbstowcs.o \ + stdlib/mbtowc.o \ + stdlib/obsol.o \ + stdlib/putenv.o \ + stdlib/qsort.o \ + stdlib/rand.o \ + stdlib/rot.o \ + stdlib/senv.o \ + stdlib/splitp.o \ + stdlib/strtod.o \ + stdlib/strtol.o \ + stdlib/strtoul.o \ + stdlib/swab.o \ + stdlib/wcstod.o \ + stdlib/wcstol.o \ + stdlib/wcstombs.o \ + stdlib/wcstoul.o \ + stdlib/wctomb.o \ + stdlib/wfulpath.o \ + stdlib/witoa.o \ + stdlib/witow.o \ + stdlib/wputenv.o \ + stdlib/wsenv.o \ + stdlib/wsplitp.o \ + stdlib/wmakpath.o \ + stdlib/wtoi.o \ + stdlib/wtoi64.o + +STRING_OBJECTS = \ + string/lasttok.o \ + string/memicmp.o \ + string/strcoll.o \ + string/strdup.o \ + string/strerror.o \ + string/stricmp.o \ + string/strlwr.o \ + string/strncoll.o \ + string/strnicmp.o \ + string/strpbrk.o \ + string/strrev.o\ + string/strset.o \ + string/strstr.o \ + string/strtok.o \ + string/strupr.o \ + string/strxfrm.o + +SYS_STAT_OBJECTS = \ + sys_stat/fstat.o \ + sys_stat/fstati64.o \ + sys_stat/futime.o \ + sys_stat/stat.o \ + sys_stat/wstat.o \ + sys_stat/systime.o + +TIME_OBJECTS = \ + time/clock.o \ + time/ctime.o \ + time/difftime.o \ + time/ftime.o \ + time/strdate.o \ + time/strftime.o \ + time/strtime.o \ + time/time.o \ + time/tz_vars.o \ + time/wctime.o \ + time/wstrdate.o \ + time/wstrtime.o + + + +WSTRING_OBJECTS = \ + wstring/wcscoll.o \ + wstring/wcscspn.o \ + wstring/wcsdup.o \ + wstring/wcsicmp.o \ + wstring/wcslwr.o \ + wstring/wcsnicmp.o \ + wstring/wcspbrk.o \ + wstring/wcsrev.o \ + wstring/wcsset.o \ + wstring/wcsspn.o \ + wstring/wcsstr.o \ + wstring/wcstok.o \ + wstring/wcsupr.o \ + wstring/wcsxfrm.o \ + wstring/wlasttok.o + +WINE_OBJECTS = \ + wine/cpp.o \ + wine/cppexcept.o \ + wine/heap.o \ + wine/thread.o + +TARGET_OBJECTS = \ + $(CONIO_OBJECTS) \ + $(CTYPE_OBJECTS) \ + $(DIRECT_OBJECTS) \ + $(EXCEPT_OBJECTS) \ + $(FLOAT_OBJECTS) \ + $(IO_OBJECTS) \ + $(LOCALE_OBJECTS) \ + $(MATH_OBJECTS) \ + $(MBSTRING_OBJECTS) \ + $(MISC_OBJECTS) \ + $(PROCESS_OBJECTS) \ + $(SEARCH_OBJECTS) \ + $(SETJMP_OBJECTS) \ + $(SIGNAL_OBJECTS) \ + $(STDIO_OBJECTS) \ + $(STDLIB_OBJECTS) \ + $(STRING_OBJECTS) \ + $(SYS_STAT_OBJECTS) \ + $(TIME_OBJECTS) \ + $(WSTRING_OBJECTS) \ + $(WINE_OBJECTS) + +include $(PATH_TO_TOP)/rules.mak + +include $(TOOLS_PATH)/helper.mk + +DEP_OBJECTS := $(TARGET_OBJECTS) + +TARGET_CLEAN = $(DEP_FILES) + +include $(PATH_TO_TOP)/tools/depend.mk + +# EOF diff --git a/reactos/lib/crt/math/acos.c b/reactos/lib/crt/math/acos.c new file mode 100644 index 00000000000..23376a6116c --- /dev/null +++ b/reactos/lib/crt/math/acos.c @@ -0,0 +1,27 @@ +/* Math functions for i387. + Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by John C. Bowman , 1995. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The GNU C 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + + +double acos(double __x) +{ + return atan2(sqrt(1.0 - __x * __x), __x); +} diff --git a/reactos/lib/crt/math/adjust.c b/reactos/lib/crt/math/adjust.c new file mode 100644 index 00000000000..f27c82511de --- /dev/null +++ b/reactos/lib/crt/math/adjust.c @@ -0,0 +1,7 @@ +/* $Id$ + * + */ + +int _adjust_fdiv = 0; + +/* EOF */ diff --git a/reactos/lib/crt/math/asin.c b/reactos/lib/crt/math/asin.c new file mode 100644 index 00000000000..fa57df2850c --- /dev/null +++ b/reactos/lib/crt/math/asin.c @@ -0,0 +1,27 @@ +/* Math functions for i387. + Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by John C. Bowman , 1995. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The GNU C 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + + +double asin(double __x) +{ + return atan2(__x, sqrt(1.0 - __x * __x)); +} diff --git a/reactos/lib/crt/math/atan.c b/reactos/lib/crt/math/atan.c new file mode 100644 index 00000000000..af0e219e728 --- /dev/null +++ b/reactos/lib/crt/math/atan.c @@ -0,0 +1,37 @@ +/* Math functions for i387. + Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by John C. Bowman , 1995. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The GNU C 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +double atan (double __x); + +double atan (double __x) +{ + register double __value; +#ifdef __GNUC__ + __asm __volatile__ + ("fld1\n\t" + "fpatan" + : "=t" (__value) : "0" (__x)); +#else + __value = linkme_atan(__x); +#endif /*__GNUC__*/ + return __value; +} diff --git a/reactos/lib/crt/math/atan2.c b/reactos/lib/crt/math/atan2.c new file mode 100644 index 00000000000..8ce57f1e433 --- /dev/null +++ b/reactos/lib/crt/math/atan2.c @@ -0,0 +1,21 @@ + +#include + +double atan2 (double __y, double __x); + +/* + * @implemented + */ +double atan2 (double __y, double __x) +{ + register double __value; +#ifdef __GNUC__ + __asm __volatile__ + ("fpatan\n\t" + "fld %%st(0)" + : "=t" (__value) : "0" (__x), "u" (__y)); +#else + __value = linkme_atan2(__x, __y); +#endif /*__GNUC__*/ + return __value; +} diff --git a/reactos/lib/crt/math/cabs.c b/reactos/lib/crt/math/cabs.c new file mode 100644 index 00000000000..ca9e8426c73 --- /dev/null +++ b/reactos/lib/crt/math/cabs.c @@ -0,0 +1,14 @@ +#include + +/* + * @implemented + */ +double _cabs( struct _complex z ) +{ + return sqrt( z.x*z.x + z.y*z.y ); +// return hypot(z.x,z.y); +} + + + + diff --git a/reactos/lib/crt/math/ceil.c b/reactos/lib/crt/math/ceil.c new file mode 100644 index 00000000000..5a1b1113910 --- /dev/null +++ b/reactos/lib/crt/math/ceil.c @@ -0,0 +1,21 @@ +#include + +/* + * @implemented + */ +double ceil (double __x) +{ + register double __value; +#ifdef __GNUC__ + __volatile unsigned short int __cw, __cwtmp; + + __asm __volatile ("fnstcw %0" : "=m" (__cw)); + __cwtmp = (__cw & 0xf3ff) | 0x0800; /* rounding up */ + __asm __volatile ("fldcw %0" : : "m" (__cwtmp)); + __asm __volatile ("frndint" : "=t" (__value) : "0" (__x)); + __asm __volatile ("fldcw %0" : : "m" (__cw)); +#else + __value = linkme_ceil(__x); +#endif /*__GNUC__*/ + return __value; +} diff --git a/reactos/lib/crt/math/cos.c b/reactos/lib/crt/math/cos.c new file mode 100644 index 00000000000..131fa2dbdb0 --- /dev/null +++ b/reactos/lib/crt/math/cos.c @@ -0,0 +1,19 @@ +#include + +double cos (double __x); + +/* + * @implemented + */ +double cos (double __x) +{ + register double __value; +#ifdef __GNUC__ + __asm __volatile__ + ("fcos" + : "=t" (__value): "0" (__x)); +#else + __value = linkme_cos(__x); +#endif /*__GNUC__*/ + return __value; +} diff --git a/reactos/lib/crt/math/cosh.c b/reactos/lib/crt/math/cosh.c new file mode 100644 index 00000000000..a21e717cadc --- /dev/null +++ b/reactos/lib/crt/math/cosh.c @@ -0,0 +1,12 @@ +/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ +#include + + +/* + * @implemented + */ +double cosh(double x) +{ + const double ebig = exp(fabs(x)); + return (ebig + 1.0/ebig) / 2.0; +} diff --git a/reactos/lib/crt/math/exp.c b/reactos/lib/crt/math/exp.c new file mode 100644 index 00000000000..2707cf8ca3a --- /dev/null +++ b/reactos/lib/crt/math/exp.c @@ -0,0 +1,47 @@ +/* Math functions for i387. + Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by John C. Bowman , 1995. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The GNU C 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +double exp (double __x); + +double exp (double __x) +{ +#ifdef __GNUC__ + register double __value, __exponent; + __asm __volatile__ + ("fldl2e # e^x = 2^(x * log2(e))\n\t" + "fmul %%st(1) # x * log2(e)\n\t" + "fst %%st(1)\n\t" + "frndint # int(x * log2(e))\n\t" + "fxch\n\t" + "fsub %%st(1) # fract(x * log2(e))\n\t" + "f2xm1 # 2^(fract(x * log2(e))) - 1\n\t" + : "=t" (__value), "=u" (__exponent) : "0" (__x)); + __value += 1.0; + __asm __volatile__ + ("fscale" + : "=t" (__value) : "0" (__value), "u" (__exponent)); + + return __value; +#else + return linkme_exp(__x); +#endif /*__GNUC__*/ +} diff --git a/reactos/lib/crt/math/fabs.c b/reactos/lib/crt/math/fabs.c new file mode 100644 index 00000000000..5db505ad11b --- /dev/null +++ b/reactos/lib/crt/math/fabs.c @@ -0,0 +1,36 @@ +/* Math functions for i387. + Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by John C. Bowman , 1995. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The GNU C 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +double fabs (double __x); + +double fabs (double __x) +{ + register double __value; +#ifdef __GNUC__ + __asm __volatile__ + ("fabs" + : "=t" (__value) : "0" (__x)); +#else + __value = linkme_fabs(__x); +#endif /*__GNUC__*/ + return __value; +} diff --git a/reactos/lib/crt/math/floor.c b/reactos/lib/crt/math/floor.c new file mode 100644 index 00000000000..4635ad86b3f --- /dev/null +++ b/reactos/lib/crt/math/floor.c @@ -0,0 +1,40 @@ +/* Math functions for i387. + Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by John C. Bowman , 1995. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The GNU C 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +double floor (double __x); + +double floor (double __x) +{ + register double __value; +#ifdef __GNUC__ + __volatile unsigned short int __cw, __cwtmp; + + __asm __volatile ("fnstcw %0" : "=m" (__cw)); + __cwtmp = (__cw & 0xf3ff) | 0x0400; /* rounding down */ + __asm __volatile ("fldcw %0" : : "m" (__cwtmp)); + __asm __volatile ("frndint" : "=t" (__value) : "0" (__x)); + __asm __volatile ("fldcw %0" : : "m" (__cw)); +#else + __value = linkme_floor(__x); +#endif /*__GNUC__*/ + return __value; +} diff --git a/reactos/lib/crt/math/fmod.c b/reactos/lib/crt/math/fmod.c new file mode 100644 index 00000000000..263d6878829 --- /dev/null +++ b/reactos/lib/crt/math/fmod.c @@ -0,0 +1,39 @@ +/* Math functions for i387. + Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by John C. Bowman , 1995. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The GNU C 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +double fmod (double __x, double __y); + +double fmod (double __x, double __y) +{ + register double __value; +#ifdef __GNUC__ + __asm __volatile__ + ("1: fprem\n\t" + "fstsw %%ax\n\t" + "sahf\n\t" + "jp 1b" + : "=t" (__value) : "0" (__x), "u" (__y) : "ax", "cc"); +#else + __value = linkme_fmod(__x, __y); +#endif /*__GNUC__*/ + return __value; +} diff --git a/reactos/lib/crt/math/frexp.c b/reactos/lib/crt/math/frexp.c new file mode 100644 index 00000000000..47e1800c98d --- /dev/null +++ b/reactos/lib/crt/math/frexp.c @@ -0,0 +1,29 @@ +#include +#include +#include + +/* + * @implemented + */ +double +frexp(double __x, int *exptr) +{ + union + { + double* __x; + double_t* x; + } x; + + x.__x = &__x; + + if ( exptr != NULL ) + *exptr = x.x->exponent - 0x3FE; + + + x.x->exponent = 0x3FE; + + return __x; +} + + + diff --git a/reactos/lib/crt/math/huge_val.c b/reactos/lib/crt/math/huge_val.c new file mode 100644 index 00000000000..aaa50d0e81e --- /dev/null +++ b/reactos/lib/crt/math/huge_val.c @@ -0,0 +1,6 @@ +/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ + +#include + +#undef _HUGE +double_t _HUGE = { 0x00000, 0x00000, 0x7ff, 0x0 }; diff --git a/reactos/lib/crt/math/hypot.c b/reactos/lib/crt/math/hypot.c new file mode 100644 index 00000000000..de078a140e8 --- /dev/null +++ b/reactos/lib/crt/math/hypot.c @@ -0,0 +1,101 @@ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +/* + * hypot() function for DJGPP. + * + * hypot() computes sqrt(x^2 + y^2). The problem with the obvious + * naive implementation is that it might fail for very large or + * very small arguments. For instance, for large x or y the result + * might overflow even if the value of the function should not, + * because squaring a large number might trigger an overflow. For + * very small numbers, their square might underflow and will be + * silently replaced by zero; this won't cause an exception, but might + * have an adverse effect on the accuracy of the result. + * + * This implementation tries to avoid the above pitfals, without + * inflicting too much of a performance hit. + * + */ + +#include +#include +#include + +/* Approximate square roots of DBL_MAX and DBL_MIN. Numbers + between these two shouldn't neither overflow nor underflow + when squared. */ +#define __SQRT_DBL_MAX 1.3e+154 +#define __SQRT_DBL_MIN 2.3e-162 + +/* + * @implemented + */ +double +_hypot(double x, double y) +{ + double abig = fabs(x), asmall = fabs(y); + double ratio; + + /* Make abig = max(|x|, |y|), asmall = min(|x|, |y|). */ + if (abig < asmall) + { + double temp = abig; + + abig = asmall; + asmall = temp; + } + + /* Trivial case. */ + if (asmall == 0.) + return abig; + + /* Scale the numbers as much as possible by using its ratio. + For example, if both ABIG and ASMALL are VERY small, then + X^2 + Y^2 might be VERY inaccurate due to loss of + significant digits. Dividing ASMALL by ABIG scales them + to a certain degree, so that accuracy is better. */ + + if ((ratio = asmall / abig) > __SQRT_DBL_MIN && abig < __SQRT_DBL_MAX) + return abig * sqrt(1.0 + ratio*ratio); + else + { + /* Slower but safer algorithm due to Moler and Morrison. Never + produces any intermediate result greater than roughly the + larger of X and Y. Should converge to machine-precision + accuracy in 3 iterations. */ + + double r = ratio*ratio, t, s, p = abig, q = asmall; + + do { + t = 4. + r; + if (t == 4.) + break; + s = r / t; + p += 2. * s * p; + q *= s; + r = (q / p) * (q / p); + } while (1); + + return p; + } +} + +#ifdef TEST + +#include + +int +main(void) +{ + printf("hypot(3, 4) =\t\t\t %25.17e\n", _hypot(3., 4.)); + printf("hypot(3*10^150, 4*10^150) =\t %25.17g\n", _hypot(3.e+150, 4.e+150)); + printf("hypot(3*10^306, 4*10^306) =\t %25.17g\n", _hypot(3.e+306, 4.e+306)); + printf("hypot(3*10^-320, 4*10^-320) =\t %25.17g\n",_hypot(3.e-320, 4.e-320)); + printf("hypot(0.7*DBL_MAX, 0.7*DBL_MAX) =%25.17g\n",_hypot(0.7*DBL_MAX, 0.7*DBL_MAX)); + printf("hypot(DBL_MAX, 1.0) =\t\t %25.17g\n", _hypot(DBL_MAX, 1.0)); + printf("hypot(1.0, DBL_MAX) =\t\t %25.17g\n", _hypot(1.0, DBL_MAX)); + printf("hypot(0.0, DBL_MAX) =\t\t %25.17g\n", _hypot(0.0, DBL_MAX)); + + return 0; +} + +#endif diff --git a/reactos/lib/crt/math/j0_y0.c b/reactos/lib/crt/math/j0_y0.c new file mode 100644 index 00000000000..01143ef3dcc --- /dev/null +++ b/reactos/lib/crt/math/j0_y0.c @@ -0,0 +1,18 @@ +#include + + +/* + * @unimplemented + */ +double _j0(double x) +{ + return x; +} + +/* + * @unimplemented + */ +double _y0(double x) +{ + return x; +} diff --git a/reactos/lib/crt/math/j1_y1.c b/reactos/lib/crt/math/j1_y1.c new file mode 100644 index 00000000000..3c899886491 --- /dev/null +++ b/reactos/lib/crt/math/j1_y1.c @@ -0,0 +1,18 @@ +#include + + +/* + * @unimplemented + */ +double _j1(double x) +{ + return x; +} + +/* + * @unimplemented + */ +double _y1(double x) +{ + return x; +} diff --git a/reactos/lib/crt/math/jn_yn.c b/reactos/lib/crt/math/jn_yn.c new file mode 100644 index 00000000000..a9304720a2e --- /dev/null +++ b/reactos/lib/crt/math/jn_yn.c @@ -0,0 +1,18 @@ +#include + + +/* + * @unimplemented + */ +double _jn(int n, double x) +{ + return x; +} + +/* + * @unimplemented + */ +double _yn(int n, double x) +{ + return x; +} diff --git a/reactos/lib/crt/math/ldexp.c b/reactos/lib/crt/math/ldexp.c new file mode 100644 index 00000000000..9c603445509 --- /dev/null +++ b/reactos/lib/crt/math/ldexp.c @@ -0,0 +1,36 @@ +/* Math functions for i387. + Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by John C. Bowman , 1995. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The GNU C 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +double ldexp (double __x, int __y); + +double ldexp (double __x, int __y) +{ + register double __value; +#ifdef __GNUC__ + __asm __volatile__ + ("fscale" + : "=t" (__value) : "0" (__x), "u" ((double) __y)); +#else + __value = linkme_ldexp(__x, __y); +#endif /*__GNUC__*/ + return __value; +} diff --git a/reactos/lib/crt/math/log.c b/reactos/lib/crt/math/log.c new file mode 100644 index 00000000000..014c78a2304 --- /dev/null +++ b/reactos/lib/crt/math/log.c @@ -0,0 +1,38 @@ +/* Math functions for i387. + Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by John C. Bowman , 1995. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The GNU C 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +double log (double __x); + +double log (double __x) +{ + register double __value; +#ifdef __GNUC__ + __asm __volatile__ + ("fldln2\n\t" + "fxch\n\t" + "fyl2x" + : "=t" (__value) : "0" (__x)); +#else + __value = linkme_log(__x); +#endif /*__GNUC__*/ + return __value; +} diff --git a/reactos/lib/crt/math/log10.c b/reactos/lib/crt/math/log10.c new file mode 100644 index 00000000000..58e8cd6ebc9 --- /dev/null +++ b/reactos/lib/crt/math/log10.c @@ -0,0 +1,38 @@ +/* Math functions for i387. + Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by John C. Bowman , 1995. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The GNU C 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +double log10 (double __x); + +double log10 (double __x) +{ + register double __value; +#ifdef __GNUC__ + __asm __volatile__ + ("fldlg2\n\t" + "fxch\n\t" + "fyl2x" + : "=t" (__value) : "0" (__x)); +#else + __value = linkme_log10(__x); +#endif /*__GNUC__*/ + return __value; +} diff --git a/reactos/lib/crt/math/math.c b/reactos/lib/crt/math/math.c new file mode 100644 index 00000000000..157b72fd9b8 --- /dev/null +++ b/reactos/lib/crt/math/math.c @@ -0,0 +1,120 @@ +#include + +#pragma function(fmod,sqrt) +#pragma function(log,log10,pow,exp) +#pragma function(tan,atan,atan2,tanh) +#pragma function(cos,acos,cosh) +#pragma function(sin,asin,sinh) + + +double linkme_ceil(double __x) +{ + return ceil(__x); +} + +double linkme_fabs(double __x) +{ + return fabs(__x); +} + +double linkme_floor(double __x) +{ + return floor(__x); +} + +double linkme_ldexp(double __x, int __y) +{ + return ldexp(__x, __y); +} + +double linkme_log2(double __x) +{ + //return log2(__x); + return 0; +} + +double linkme_fmod(double __x, double __y) +{ + return fmod(__x, __y); +} + +double linkme_sqrt(double __x) +{ + return sqrt(__x); +} + +double linkme_log(double __x) +{ + return log(__x); +} + +double linkme_log10(double __x) +{ + return log10(__x); +} + +double linkme_pow(double __x, double __y) +{ + return pow(__x, __y); +} + +double linkme_exp(double __x) +{ + return exp(__x); +} + +double linkme_tan(double __x) +{ + return tan(__x); +} + +double linkme_atan(double __x) +{ + return atan(__x); +} + +double linkme_atan2(double __x, double __y) +{ + return atan2(__x, __y); +} + +double linkme_tanh(double __x) +{ + return tanh(__x); +} + +double linkme_cos(double __x) +{ + return cos(__x); +} + +double linkme_acos(double __x) +{ + return acos(__x); +} + +double linkme_cosh(double __x) +{ + return cosh(__x); +} + +double linkme_sin(double __x) +{ + return sin(__x); +} + +double linkme_asin(double __x) +{ + return asin(__x); +} + +double linkme_sinh(double __x) +{ + return sinh(__x); +} +/* +linkme_log2 +linkme_floor +_linkme_ldexp +_linkme_pow + */ diff --git a/reactos/lib/crt/math/modf.c b/reactos/lib/crt/math/modf.c new file mode 100644 index 00000000000..fe1d80f4d02 --- /dev/null +++ b/reactos/lib/crt/math/modf.c @@ -0,0 +1,158 @@ +/* @(#)s_modf.c 1.3 95/01/18 */ +/* + * ==================================================== + * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. + * + * Developed at SunSoft, a Sun Microsystems, Inc. business. + * Permission to use, copy, modify, and distribute this + * software is freely granted, provided that this notice + * is preserved. + * ==================================================== + */ + +#include +#include +#include + + + +//static const double one = 1.0; + +double modf(double __x, double *__i) +{ + union + { + double* __x; + double_t* x; + } x; + union + { + double* __i; + double_t* iptr; + } iptr; + + int j0; + unsigned int i; + + x.__x = &__x; + iptr.__i = __i; + + + j0 = x.x->exponent - 0x3ff; /* exponent of x */ + if(j0<20) { /* integer part in high x */ + if(j0<0) { /* |x|<1 */ + *__i = 0.0; + iptr.iptr->sign = x.x->sign; + return __x; + } else { + + if ( x.x->mantissah == 0 && x.x->mantissal == 0 ) { + *__i = __x; + return 0.0; + } + + i = (0x000fffff)>>j0; + iptr.iptr->sign = x.x->sign; + iptr.iptr->exponent = x.x->exponent; + iptr.iptr->mantissah = x.x->mantissah&(~i); + iptr.iptr->mantissal = 0; + if ( __x == *__i ) { + __x = 0.0; + x.x->sign = iptr.iptr->sign; + return __x; + } + return __x - *__i; + } + } else if (j0>51) { /* no fraction part */ + *__i = __x; + if ( _isnan(__x) || _isinf(__x) ) + return __x; + + __x = 0.0; + x.x->sign = iptr.iptr->sign; + return __x; + } else { /* fraction part in low x */ + + i = ((unsigned)(0xffffffff))>>(j0-20); + iptr.iptr->sign = x.x->sign; + iptr.iptr->exponent = x.x->exponent; + iptr.iptr->mantissah = x.x->mantissah; + iptr.iptr->mantissal = x.x->mantissal&(~i); + if ( __x == *__i ) { + __x = 0.0; + x.x->sign = iptr.iptr->sign; + return __x; + } + return __x - *__i; + } +} + + +long double modfl(long double __x, long double *__i) +{ + union + { + long double* __x; + long_double_t* x; + } x; + union + { + long double* __i; + long_double_t* iptr; + } iptr; + + int j0; + unsigned int i; + + x.__x = &__x; + iptr.__i = __i; + + + j0 = x.x->exponent - 0x3fff; /* exponent of x */ + + if(j0<32) { /* integer part in high x */ + if(j0<0) { /* |x|<1 */ + *__i = 0.0L; + iptr.iptr->sign = x.x->sign; + return __x; + } else { + + i = ((unsigned int)(0xffffffff))>>(j0+1); + if ( x.x->mantissal == 0 && (x.x->mantissal & i) == 0 ) { + *__i = __x; + __x = 0.0L; + x.x->sign = iptr.iptr->sign; + return __x; + } + iptr.iptr->sign = x.x->sign; + iptr.iptr->exponent = x.x->exponent; + iptr.iptr->mantissah = x.x->mantissah&((~i)); + iptr.iptr->mantissal = 0; + + return __x - *__i; + } + } else if (j0>63) { /* no fraction part */ + *__i = __x; + if ( _isnanl(__x) || _isinfl(__x) ) + return __x; + + __x = 0.0L; + x.x->sign = iptr.iptr->sign; + return __x; + } else { /* fraction part in low x */ + + i = ((unsigned int)(0xffffffff))>>(j0-32); + if ( x.x->mantissal == 0 ) { + *__i = __x; + __x = 0.0L; + x.x->sign = iptr.iptr->sign; + return __x; + } + iptr.iptr->sign = x.x->sign; + iptr.iptr->exponent = x.x->exponent; + iptr.iptr->mantissah = x.x->mantissah; + iptr.iptr->mantissal = x.x->mantissal&(~i); + + return __x - *__i; + } +} diff --git a/reactos/lib/crt/math/pow.c b/reactos/lib/crt/math/pow.c new file mode 100644 index 00000000000..91e07216944 --- /dev/null +++ b/reactos/lib/crt/math/pow.c @@ -0,0 +1,97 @@ +/* Math functions for i387. + Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by John C. Bowman , 1995. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The GNU C 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +double pow (double __x, double __y); + +double __log2 (double __x); + +double __log2 (double __x) +{ + register double __value; +#ifdef __GNUC__ + __asm __volatile__ + ("fld1\n\t" + "fxch\n\t" + "fyl2x" + : "=t" (__value) : "0" (__x)); +#else + //__value = linkme_log2(__x); + __value = 0; +#endif /*__GNUC__*/ + return __value; +} + +/* + * @implemented + */ +double pow (double __x, double __y) +{ + register double __value; +#ifdef __GNUC__ + register double __exponent; + long __p = (long) __y; + + if (__x == 0.0 && __y > 0.0) + return 0.0; + if (__y == (double) __p) + { + double __r = 1.0; + if (__p == 0) + return 1.0; + if (__p < 0) + { + __p = -__p; + __x = 1.0 / __x; + } + while (1) + { + if (__p & 1) + __r *= __x; + __p >>= 1; + if (__p == 0) + return __r; + __x *= __x; + } + /* NOTREACHED */ + } + __asm __volatile__ + ("fmul %%st(1) # y * log2(x)\n\t" + "fst %%st(1)\n\t" + "frndint # int(y * log2(x))\n\t" + "fxch\n\t" + "fsub %%st(1) # fract(y * log2(x))\n\t" + "f2xm1 # 2^(fract(y * log2(x))) - 1\n\t" + : "=t" (__value), "=u" (__exponent) : "0" (__log2 (__x)), "1" (__y)); + __value += 1.0; + __asm __volatile__ + ("fscale" + : "=t" (__value) : "0" (__value), "u" (__exponent)); +#else + __value = linkme_pow(__x, __y); +#endif /*__GNUC__*/ + return __value; +} + +long double powl (long double __x,long double __y) +{ + return pow(__x,__y/2)*pow(__x,__y/2); +} diff --git a/reactos/lib/crt/math/sin.c b/reactos/lib/crt/math/sin.c new file mode 100644 index 00000000000..db070a31d17 --- /dev/null +++ b/reactos/lib/crt/math/sin.c @@ -0,0 +1,36 @@ +/* Math functions for i387. + Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by John C. Bowman , 1995. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The GNU C 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +double sin (double __x); + +double sin (double __x) +{ + register double __value; +#ifdef __GNUC__ + __asm __volatile__ + ("fsin" + : "=t" (__value) : "0" (__x)); +#else + __value = linkme_sin(__x); +#endif /*__GNUC__*/ + return __value; +} diff --git a/reactos/lib/crt/math/sinh.c b/reactos/lib/crt/math/sinh.c new file mode 100644 index 00000000000..f977a6acfa5 --- /dev/null +++ b/reactos/lib/crt/math/sinh.c @@ -0,0 +1,19 @@ +/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ +#include + +/* + * @implemented + */ +double sinh(double x) +{ + if(x >= 0.0) + { + const double epos = exp(x); + return (epos - 1.0/epos) / 2.0; + } + else + { + const double eneg = exp(-x); + return (1.0/eneg - eneg) / 2.0; + } +} diff --git a/reactos/lib/crt/math/sqrt.c b/reactos/lib/crt/math/sqrt.c new file mode 100644 index 00000000000..d414fcdbc2e --- /dev/null +++ b/reactos/lib/crt/math/sqrt.c @@ -0,0 +1,35 @@ +/* Math functions for i387. + Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by John C. Bowman , 1995. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The GNU C 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ +#include + +double sqrt (double __x); + +double sqrt (double __x) +{ + register double __value; +#ifdef __GNUC__ + __asm __volatile__ + ("fsqrt" + : "=t" (__value) : "0" (__x)); +#else + __value = linkme_sqrt(__x); +#endif /*__GNUC__*/ + return __value; +} diff --git a/reactos/lib/crt/math/stubs.c b/reactos/lib/crt/math/stubs.c new file mode 100644 index 00000000000..82fe881ebc0 --- /dev/null +++ b/reactos/lib/crt/math/stubs.c @@ -0,0 +1,133 @@ +#include + + +double _CIsin(double x); +double _CIcos(double x); +double _CItan(double x); +double _CIsinh(double x); +double _CIcosh(double x); +double _CItanh(double x); +double _CIasin(double x); +double _CIacos(double x); +double _CIatan(double x); +double _CIatan2(double y, double x); +double _CIexp(double x); +double _CIlog(double x); +double _CIlog10(double x); +double _CIpow(double x, double y); +double _CIsqrt(double x); +double _CIfmod(double x, double y); + + +/* + * @implemented + */ +double _CIsin(double x) +{ + return sin(x); +} +/* + * @implemented + */ +double _CIcos(double x) +{ + return cos(x); +} +/* + * @implemented + */ +double _CItan(double x) +{ + return tan(x); +} +/* + * @implemented + */ +double _CIsinh(double x) +{ + return sinh(x); +} +/* + * @implemented + */ +double _CIcosh(double x) +{ + return cosh(x); +} +/* + * @implemented + */ +double _CItanh(double x) +{ + return tanh(x); +} +/* + * @implemented + */ +double _CIasin(double x) +{ + return asin(x); +} +/* + * @implemented + */ +double _CIacos(double x) +{ + return acos(x); +} +/* + * @implemented + */ +double _CIatan(double x) +{ + return atan(x); +} +/* + * @implemented + */ +double _CIatan2(double y, double x) +{ + return atan2(y, x); +} +/* + * @implemented + */ +double _CIexp(double x) +{ + return exp(x); +} +/* + * @implemented + */ +double _CIlog(double x) +{ + return log(x); +} +/* + * @implemented + */ +double _CIlog10(double x) +{ + return log10(x); +} +/* + * @implemented + */ +double _CIpow(double x, double y) +{ + return pow(x, y); +} +/* + * @implemented + */ +double _CIsqrt(double x) +{ + return sqrt(x); +} +/* + * @implemented + */ +double _CIfmod(double x, double y) +{ + return fmod(x, y); +} diff --git a/reactos/lib/crt/math/tan.c b/reactos/lib/crt/math/tan.c new file mode 100644 index 00000000000..1acc03619f9 --- /dev/null +++ b/reactos/lib/crt/math/tan.c @@ -0,0 +1,37 @@ +/* Math functions for i387. + Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by John C. Bowman , 1995. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The GNU C 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include + +double tan (double __x); + +double tan (double __x) +{ + register double __value; +#ifdef __GNUC__ + register double __value2 __attribute__ ((unused)); + __asm __volatile__ + ("fptan" + : "=t" (__value2), "=u" (__value) : "0" (__x)); +#else + __value = linkme_tan(__x); +#endif /*__GNUC__*/ + return __value; +} diff --git a/reactos/lib/crt/math/tanh.c b/reactos/lib/crt/math/tanh.c new file mode 100644 index 00000000000..88b9acca5ae --- /dev/null +++ b/reactos/lib/crt/math/tanh.c @@ -0,0 +1,20 @@ +/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ + +#include + +/* + * @implemented + */ +double tanh(double x) +{ + if (x > 50) + return 1; + else if (x < -50) + return -1; + else + { + const double ebig = exp(x); + const double esmall = 1.0/ebig; + return (ebig - esmall) / (ebig + esmall); + } +} diff --git a/reactos/lib/crt/mbstring/hanzen.c b/reactos/lib/crt/mbstring/hanzen.c new file mode 100644 index 00000000000..bbf22611f23 --- /dev/null +++ b/reactos/lib/crt/mbstring/hanzen.c @@ -0,0 +1,107 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: lib/msvcrt/mbstring/hanzen.c + * PURPOSE: Multibyte conversion routines formerly called hantozen and zentohan + * PROGRAMER: Boudewijn Dekker, Taiji Yamada + * UPDATE HISTORY: + Modified from Taiji Yamada japanese code system utilities + * 12/04/99: Created + */ + +#include + +static unsigned short han_to_zen_ascii_table[0x5f] = { + 0x8140, 0x8149, 0x8168, 0x8194, 0x8190, 0x8193, 0x8195, 0x8166, + 0x8169, 0x816a, 0x8196, 0x817b, 0x8143, 0x817c, 0x8144, 0x815e, + 0x824f, 0x8250, 0x8251, 0x8252, 0x8253, 0x8254, 0x8255, 0x8256, + 0x8257, 0x8258, 0x8146, 0x8147, 0x8183, 0x8181, 0x8184, 0x8148, + 0x8197, 0x8260, 0x8261, 0x8262, 0x8263, 0x8264, 0x8265, 0x8266, + 0x8267, 0x8268, 0x8269, 0x826a, 0x826b, 0x826c, 0x826d, 0x826e, + 0x826f, 0x8270, 0x8271, 0x8272, 0x8273, 0x8274, 0x8275, 0x8276, + 0x8277, 0x8278, 0x8279, 0x816d, 0x818f, 0x816e, 0x814f, 0x8151, + 0x8165, 0x8281, 0x8282, 0x8283, 0x8284, 0x8285, 0x8286, 0x8287, + 0x8288, 0x8289, 0x828a, 0x828b, 0x828c, 0x828d, 0x828e, 0x828f, + 0x8290, 0x8291, 0x8292, 0x8293, 0x8294, 0x8295, 0x8296, 0x8297, + 0x8298, 0x8299, 0x829a, 0x816f, 0x8162, 0x8170, 0x8150 +}; +static unsigned short han_to_zen_kana_table[0x40] = { + 0x8140, 0x8142, 0x8175, 0x8176, 0x8141, 0x8145, 0x8392, 0x8340, + 0x8342, 0x8344, 0x8346, 0x8348, 0x8383, 0x8385, 0x8387, 0x8362, + 0x815b, 0x8341, 0x8343, 0x8345, 0x8347, 0x8349, 0x834a, 0x834c, + 0x834e, 0x8350, 0x8352, 0x8354, 0x8356, 0x8358, 0x835a, 0x835c, + 0x835e, 0x8360, 0x8363, 0x8365, 0x8367, 0x8369, 0x836a, 0x836b, + 0x836c, 0x836d, 0x836e, 0x8371, 0x8374, 0x8377, 0x837a, 0x837d, + 0x837e, 0x8380, 0x8381, 0x8382, 0x8384, 0x8386, 0x8388, 0x8389, + 0x838a, 0x838b, 0x838c, 0x838d, 0x838f, 0x8393, 0x814a, 0x814b +}; +static unsigned char zen_to_han_kana_table[0x8396-0x8340+1] = { + 0xa7, 0xb1, 0xa8, 0xb2, 0xa9, 0xb3, 0xaa, 0xb4, + 0xab, 0xb5, 0xb6, 0xb6, 0xb7, 0xb7, 0xb8, 0xb8, + 0xb9, 0xb9, 0xba, 0xba, 0xbb, 0xbb, 0xbc, 0xbc, + 0xbd, 0xbd, 0xbe, 0xbe, 0xbf, 0xbf, 0xc0, 0xc0, + 0xc1, 0xc1, 0xaf, 0xc2, 0xc2, 0xc3, 0xc3, 0xc4, + 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xca, + 0xca, 0xcb, 0xcb, 0xcb, 0xcc, 0xcc, 0xcc, 0xcd, + 0xcd, 0xcd, 0xce, 0xce, 0xce, 0xcf, 0xd0, 0, + 0xd1, 0xd2, 0xd3, 0xac, 0xd4, 0xad, 0xd5, 0xae, + 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdc, + 0xb2, 0xb4, 0xa6, 0xdd, 0xb3, 0xb6, 0xb9 +}; +#define ZTOH_SYMBOLS 9 +static unsigned short zen_to_han_symbol_table_1[ZTOH_SYMBOLS] = { + 0x8142, 0x8175, 0x8176, 0x8141, 0x8145, 0x815b, 0x814a, 0x814b +}; +static unsigned char zen_to_han_symbol_table_2[ZTOH_SYMBOLS] = { + 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xb0, 0xde, 0xdf +}; +#define ISKANA(c) ((c) >= 0xa1 && (c) <= 0xdf) +#define JISHIRA(c) ((c) >= 0x829f && (c) <= 0x82f1) +#define JISKANA(c) ((c) >= 0x8340 && (c) <= 0x8396 && (c) != 0x837f) +#define JTOKANA(c) ((c) <= 0x82dd ? (c) + 0xa1 : (c) + 0xa2) + + +/* + * @implemented + */ +unsigned short _mbbtombc(unsigned short c) +{ + if (c >= 0x20 && c <= 0x7e) { + return han_to_zen_ascii_table[c - 0x20]; + } else if (ISKANA(c)) { + return han_to_zen_kana_table[c - 0xa0]; + } + return c; +} + + +/* + * @implemented + */ +unsigned short _mbctombb(unsigned short c) +{ + int i; + unsigned short *p; + + if (JISKANA(c)) { + return zen_to_han_kana_table[c - 0x8340]; + } else if (JISHIRA(c)) { + c = JTOKANA(c); + return zen_to_han_kana_table[c - 0x8340]; + } else if (c <= 0x8396) { + for (i = 0x20, p = han_to_zen_ascii_table; i <= 0x7e; i++, p++) { + if (*p == c) { + return i; + } + } + for (i = 0; i < ZTOH_SYMBOLS; i++) { + if (zen_to_han_symbol_table_1[i] == c) { + return zen_to_han_symbol_table_2[i]; + } + } + } + return c; +} + + + diff --git a/reactos/lib/crt/mbstring/ischira.c b/reactos/lib/crt/mbstring/ischira.c new file mode 100644 index 00000000000..7ea5d269bcb --- /dev/null +++ b/reactos/lib/crt/mbstring/ischira.c @@ -0,0 +1,46 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: lib/msvcrt/mbstring/ischira.c + * PURPOSE: + * PROGRAMER: Boudewijn Dekker + * UPDATE HISTORY: + * 12/04/99: Created + */ + +#include +#include + + +/* + * @implemented + */ +int _ismbchira( unsigned int c ) +{ + return ((c>=0x829F) && (c<=0x82F1)); +} + +/* + * @implemented + */ +int _ismbckata( unsigned int c ) +{ + return ((c>=0x8340) && (c<=0x8396)); +} + +/* + * @unimplemented + */ +unsigned int _mbctohira( unsigned int c ) +{ + return c; +} + +/* + * @unimplemented + */ +unsigned int _mbctokata( unsigned int c ) +{ + return c; +} + diff --git a/reactos/lib/crt/mbstring/iskana.c b/reactos/lib/crt/mbstring/iskana.c new file mode 100644 index 00000000000..0bdb7848554 --- /dev/null +++ b/reactos/lib/crt/mbstring/iskana.c @@ -0,0 +1,20 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: lib/msvcrt/mbstring/iskana.c + * PURPOSE: Checks for kana character + * PROGRAMER: Boudewijn Dekker, Taiji Yamada + * UPDATE HISTORY: + Modified from Taiji Yamada japanese code system utilities + * 12/04/99: Created + */ +#include +#include + +/* + * @implemented + */ +int _ismbbkana(unsigned char c) +{ + return ((_jctype+1)[(unsigned char)(c)] & (_KNJ_M|_KNJ_P)); +} diff --git a/reactos/lib/crt/mbstring/iskmoji.c b/reactos/lib/crt/mbstring/iskmoji.c new file mode 100644 index 00000000000..c47d5badec1 --- /dev/null +++ b/reactos/lib/crt/mbstring/iskmoji.c @@ -0,0 +1,6 @@ +#include + +int _ismbbkalpha(unsigned char c) +{ + return (0xA7 <= c && c <= 0xDF); +} diff --git a/reactos/lib/crt/mbstring/iskpun.c b/reactos/lib/crt/mbstring/iskpun.c new file mode 100644 index 00000000000..f3a12bbaf1a --- /dev/null +++ b/reactos/lib/crt/mbstring/iskpun.c @@ -0,0 +1,18 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: lib/msvcrt/mbstring/iskpun.c + * PURPOSE: + * PROGRAMER: Boudewijn Dekker + * UPDATE HISTORY: + * 12/04/99: Created + */ +#include + +/* + * @implemented + */ +int _ismbbkpunct( unsigned int c ) +{ + return ((_jctype+1)[(unsigned char)(c)] & (_KNJ_P)); +} diff --git a/reactos/lib/crt/mbstring/islead.c b/reactos/lib/crt/mbstring/islead.c new file mode 100644 index 00000000000..f6c9e5bd0e1 --- /dev/null +++ b/reactos/lib/crt/mbstring/islead.c @@ -0,0 +1,11 @@ +#include "precomp.h" +#include + +/* + * @unimplemented + */ +int isleadbyte(int byte) +{ + return 0; + //return IsDBCSLeadByteEx(0,*c); +} diff --git a/reactos/lib/crt/mbstring/islwr.c b/reactos/lib/crt/mbstring/islwr.c new file mode 100644 index 00000000000..e63c6aa1e3d --- /dev/null +++ b/reactos/lib/crt/mbstring/islwr.c @@ -0,0 +1,27 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: lib/msvcrt/mbstring/islwr.c + * PURPOSE: + * PROGRAMER: Boudewijn Dekker + * UPDATE HISTORY: + * 12/04/99: Created + */ + +#include +#include + +/* + * code page 952 only + * + * @implemented + */ +int _ismbclower( unsigned int c ) +{ + if ((c & 0xFF00) != 0) { + if ( c >= 0x829A && c<= 0x829A ) + return 1; + } + + return islower(c); +} diff --git a/reactos/lib/crt/mbstring/ismbal.c b/reactos/lib/crt/mbstring/ismbal.c new file mode 100644 index 00000000000..f1bbd3bbbf6 --- /dev/null +++ b/reactos/lib/crt/mbstring/ismbal.c @@ -0,0 +1,20 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: lib/msvcrt/mbstring/ismbal.c + * PURPOSE: Checks for alphabetic multibyte character + * PROGRAMER: Boudewijn Dekker + * UPDATE HISTORY: + * 12/04/99: Created + */ +#include +#include + +/* + * @implemented + */ +int _ismbbalpha(unsigned char c) +{ + return (isalpha(c) || _ismbbkalnum(c)); +} + diff --git a/reactos/lib/crt/mbstring/ismbaln.c b/reactos/lib/crt/mbstring/ismbaln.c new file mode 100644 index 00000000000..71d263de87d --- /dev/null +++ b/reactos/lib/crt/mbstring/ismbaln.c @@ -0,0 +1,12 @@ +#include +#include + + +/* + * @implemented + */ +int _ismbbalnum(unsigned char c) +{ + return (isalnum(c) || _ismbbkalnum(c)); +} + diff --git a/reactos/lib/crt/mbstring/ismbc.c b/reactos/lib/crt/mbstring/ismbc.c new file mode 100644 index 00000000000..4035ff5580d --- /dev/null +++ b/reactos/lib/crt/mbstring/ismbc.c @@ -0,0 +1,135 @@ +#include + +int _ismbbalpha(unsigned char c); +int _ismbbalnum(unsigned char c); + +/* + * @implemented + */ +int _ismbcalnum( unsigned int c ) +{ + if ((c & 0xFF00) != 0) { + // true multibyte character + return 0; + } + else + return _ismbbalnum(c); + + return 0; +} + +/* + * @implemented + */ +int _ismbcalpha( unsigned int c ) +{ + if ((c & 0xFF00) != 0) { + // true multibyte character + return 0; + } + else + return _ismbbalpha(c); + + return 0; +} + +/* + * @implemented + */ +int _ismbcdigit( unsigned int c ) +{ + if ((c & 0xFF00) != 0) { + // true multibyte character + return 0; + } + else + return 0; +// return _ismbbdigit(c); + + return 0; +} + +/* + * @unimplemented + */ +int _ismbcprint( unsigned int c ) +{ + if ((c & 0xFF00) != 0) { + // true multibyte character + return 0; + } + else + return 0; +// return _ismbbdigit(c); + + return 0; +} + +/* + * @unimplemented + */ +int _ismbcsymbol( unsigned int c ) +{ + if ((c & 0xFF00) != 0) { + // true multibyte character + return 0; + } + else + return 0; +// return _ismbbdigit(c); + + return 0; +} + +/* + * @unimplemented + */ +int _ismbcspace( unsigned int c ) +{ + if ((c & 0xFF00) != 0) { + // true multibyte character + return 0; + } + else + return 0; +// return _ismbbdigit(c); + + return 0; +} +/* + * @implemented + */ +int _ismbclegal(unsigned int c) +{ + if ((c & 0xFF00) != 0) { + return _ismbblead(c>>8) && _ismbbtrail(c&0xFF); + } + else + return _ismbbtrail(c&0xFF); + + return 0; +} + +/* + * @unimplemented + */ +int _ismbcl0(unsigned int c) +{ + return 0; +} + +/* + * @unimplemented + */ +int _ismbcl1(unsigned int c) +{ + return 0; +} + +/* + * @unimplemented + */ +int _ismbcl2(unsigned int c) +{ + return 0; +} diff --git a/reactos/lib/crt/mbstring/ismbgra.c b/reactos/lib/crt/mbstring/ismbgra.c new file mode 100644 index 00000000000..8de506a2007 --- /dev/null +++ b/reactos/lib/crt/mbstring/ismbgra.c @@ -0,0 +1,11 @@ +#include +#include +#include + +/* + * @implemented + */ +int _ismbbgraph(unsigned char c) +{ + return (isgraph(c) || _ismbbkana(c)); +} diff --git a/reactos/lib/crt/mbstring/ismbkaln.c b/reactos/lib/crt/mbstring/ismbkaln.c new file mode 100644 index 00000000000..6840f59a33c --- /dev/null +++ b/reactos/lib/crt/mbstring/ismbkaln.c @@ -0,0 +1,19 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: lib/msvcrt/mbstring/ismbkaln.c + * PURPOSE: + * PROGRAMER: Boudewijn Dekker + * UPDATE HISTORY: + * 12/04/99: Created + */ +#include +#include + +/* + * @implemented + */ +int _ismbbkalnum( unsigned int c ) +{ + return ((_jctype+1)[(unsigned char)(c)] & (_KNJ_P)); +} diff --git a/reactos/lib/crt/mbstring/ismblead.c b/reactos/lib/crt/mbstring/ismblead.c new file mode 100644 index 00000000000..ca6da76883c --- /dev/null +++ b/reactos/lib/crt/mbstring/ismblead.c @@ -0,0 +1,65 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: lib/msvcrt/mbstring/ismblead.c + * PURPOSE: Checks for a lead byte + * PROGRAMER: Boudewijn Dekker + * UPDATE HISTORY: + * Modified from Taiji Yamada japanese code system utilities + * 12/04/99: Created + */ + +#include +#include +#include + +size_t _mbclen2(const unsigned int s); + +char _jctype[257] = { +/*-1*/ ___, +/*0x*/ ___,___,___,___,___,___,___,___,___,___,___,___,___,___,___,___, +/*1x*/ ___,___,___,___,___,___,___,___,___,___,___,___,___,___,___,___, +/*2x*/ ___,___,___,___,___,___,___,___,___,___,___,___,___,___,___,___, +/*3x*/ ___,___,___,___,___,___,___,___,___,___,___,___,___,___,___,___, +/*4x*/ __2,__2,__2,__2,__2,__2,__2,__2,__2,__2,__2,__2,__2,__2,__2,__2, +/*5x*/ __2,__2,__2,__2,__2,__2,__2,__2,__2,__2,__2,__2,__2,__2,__2,__2, +/*6x*/ __2,__2,__2,__2,__2,__2,__2,__2,__2,__2,__2,__2,__2,__2,__2,__2, +/*7x*/ __2,__2,__2,__2,__2,__2,__2,__2,__2,__2,__2,__2,__2,__2,__2,___, +/*8x*/ __2,_12,_12,_12,_12,_12,_12,_12,_12,_12,_12,_12,_12,_12,_12,_12, +/*9x*/ _12,_12,_12,_12,_12,_12,_12,_12,_12,_12,_12,_12,_12,_12,_12,_12, +/*Ax*/ __2,_P2,_P2,_P2,_P2,_P2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2, +/*Bx*/ _M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2, +/*Cx*/ _M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2, +/*Dx*/ _M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2, +/*Ex*/ _12,_12,_12,_12,_12,_12,_12,_12,_12,_12,_12,_12,_12,_12,_12,_12, +/*Fx*/ _12,_12,_12,_12,_12,_12,_12,_12,_12,_12,_12,_12,_12,___,___,___ +}; + +char *_mbctype = _jctype; +/* + * @implemented + */ +int _ismbblead(unsigned int c) +{ + return ((_jctype+1)[(unsigned char)(c)] & _KNJ_1); +} +//int _ismbblead(unsigned int byte) +//{ +// +// return (int)IsDBCSLeadByte(byte) +//} + +/* + * @implemented + */ +int _ismbslead( const unsigned char *str, const unsigned char *t) +{ + unsigned char *s = (unsigned char *)str; + while(*s != 0 && s != t) + { + + s+= _mbclen2(*s); + } + return _ismbblead( *s); +} + diff --git a/reactos/lib/crt/mbstring/ismbpri.c b/reactos/lib/crt/mbstring/ismbpri.c new file mode 100644 index 00000000000..637372086b6 --- /dev/null +++ b/reactos/lib/crt/mbstring/ismbpri.c @@ -0,0 +1,11 @@ +#include +#include +#include + +/* + * @implemented + */ +int _ismbbprint(unsigned char c) +{ + return (isprint(c) || _ismbbkana(c)); +} diff --git a/reactos/lib/crt/mbstring/ismbpun.c b/reactos/lib/crt/mbstring/ismbpun.c new file mode 100644 index 00000000000..f66eb4ea4ec --- /dev/null +++ b/reactos/lib/crt/mbstring/ismbpun.c @@ -0,0 +1,18 @@ + +#include +#include +#include + + +/* + * @implemented + */ +int _ismbbpunct(unsigned char c) +{ +// (0xA1 <= c <= 0xA6) + return (ispunct(c) || _ismbbkana(c)); +} + + //iskana() :(0xA1 <= c <= 0xDF) + //iskpun() :(0xA1 <= c <= 0xA6) + //iskmoji() :(0xA7 <= c <= 0xDF) diff --git a/reactos/lib/crt/mbstring/ismbtrl.c b/reactos/lib/crt/mbstring/ismbtrl.c new file mode 100644 index 00000000000..865fd4de1b8 --- /dev/null +++ b/reactos/lib/crt/mbstring/ismbtrl.c @@ -0,0 +1,45 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: lib/msvcrt/mbstring/ismbtrl.c + * PURPOSE: Checks for a trailing byte + * PROGRAMER: Boudewijn Dekker + * UPDATE HISTORY: + * 12/04/99: Created + */ + +#include +#include + +size_t _mbclen2(const unsigned int s); + +// iskanji2() : (0x40 <= c <= 0x7E 0x80 <= c <= 0xFC) + +/* + * @implemented + */ +int _ismbbtrail(unsigned int c) +{ + return ((_jctype+1)[(unsigned char)(c)] & _KNJ_2); +} + +//int _ismbbtrail( unsigned int b) +//{ +// return ((b >= 0x40 && b <= 0x7e ) || (b >= 0x80 && b <= 0xfc ) ); +//} + + +/* + * @implemented + */ +int _ismbstrail( const unsigned char *str, const unsigned char *t) +{ + unsigned char *s = (unsigned char *)str; + while(*s != 0 && s != t) + { + + s+= _mbclen2(*s); + } + + return _ismbbtrail(*s); +} diff --git a/reactos/lib/crt/mbstring/isuppr.c b/reactos/lib/crt/mbstring/isuppr.c new file mode 100644 index 00000000000..d68acc603db --- /dev/null +++ b/reactos/lib/crt/mbstring/isuppr.c @@ -0,0 +1,27 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: lib/msvcrt/mbstring/isuppr.c + * PURPOSE: + * PROGRAMER: Boudewijn Dekker + * UPDATE HISTORY: + * 12/04/99: Created + */ + +#include +#include + +/* + * code page 952 only + * + * @implemented + */ +int _ismbcupper( unsigned int c ) +{ + if ((c & 0xFF00) != 0) { + if ( c >= 0x8260 && c<= 0x8279 ) + return 1; + } + + return isupper(c); +} diff --git a/reactos/lib/crt/mbstring/jistojms.c b/reactos/lib/crt/mbstring/jistojms.c new file mode 100644 index 00000000000..c47b223a58a --- /dev/null +++ b/reactos/lib/crt/mbstring/jistojms.c @@ -0,0 +1,27 @@ +#include + +/* + * @implemented + */ +unsigned short _mbcjistojms(unsigned short c) +{ + int c1, c2; + + c2 = (unsigned char)c; + c1 = c >> 8; + if (c1 >= 0x21 && c1 <= 0x7e && c2 >= 0x21 && c2 <= 0x7e) { + if (c1 & 0x01) { + c2 += 0x1f; + if (c2 >= 0x7f) + c2 ++; + } else { + c2 += 0x7e; + } + c1 += 0xe1; + c1 >>= 1; + if (c1 >= 0xa0) + c1 += 0x40; + return ((c1 << 8) | c2); + } + return 0; +} diff --git a/reactos/lib/crt/mbstring/jmstojis.c b/reactos/lib/crt/mbstring/jmstojis.c new file mode 100644 index 00000000000..cf349f673db --- /dev/null +++ b/reactos/lib/crt/mbstring/jmstojis.c @@ -0,0 +1,28 @@ +#include + +/* + * @implemented + */ +unsigned short _mbcjmstojis(unsigned short c) +{ + int c1, c2; + + c2 = (unsigned char)c; + c1 = c >> 8; + if (c1 < 0xf0 && _ismbblead(c1) && _ismbbtrail(c2)) { + if (c1 >= 0xe0) + c1 -= 0x40; + c1 -= 0x70; + c1 <<= 1; + if (c2 < 0x9f) { + c1 --; + c2 -= 0x1f; + if (c2 >= (0x80-0x1f)) + c2 --; + } else { + c2 -= 0x7e; + } + return ((c1 << 8) | c2); + } + return 0; +} diff --git a/reactos/lib/crt/mbstring/mbbtype.c b/reactos/lib/crt/mbstring/mbbtype.c new file mode 100644 index 00000000000..e4e02b96546 --- /dev/null +++ b/reactos/lib/crt/mbstring/mbbtype.c @@ -0,0 +1,52 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: lib/msvcrt/mbstring/mbbtype.c + * PURPOSE: Determines the type of a multibyte character + * PROGRAMER: Boudewijn Dekker + * UPDATE HISTORY: + * 12/04/99: Created + */ + +#include +#include + +/* + * @implemented + */ +int _mbbtype(unsigned char c , int type) +{ + if ( type == 1 ) { + if ((c >= 0x40 && c <= 0x7e ) || (c >= 0x80 && c <= 0xfc ) ) + { + return _MBC_TRAIL; + } + else if (( c >= 0x20 && c >= 0x7E ) || ( c >= 0xA1 && c <= 0xDF ) || + ( c >= 0x81 && c <= 0x9F ) || ( c >= 0xE0 && c <= 0xFC ) ) + return _MBC_ILLEGAL; + else + return 0; + } else { + if (( c >= 0x20 && c <= 0x7E ) || ( c >= 0xA1 && c <= 0xDF )) { + return _MBC_SINGLE; + } + else if ( (c >= 0x81 && c <= 0x9F ) || ( c >= 0xE0 && c <= 0xFC) ) + return _MBC_LEAD; + else if (( c >= 0x20 && c >= 0x7E ) || ( c >= 0xA1 && c <= 0xDF ) || + ( c >= 0x81 && c <= 0x9F ) || ( c >= 0xE0 && c <= 0xFC ) ) + return _MBC_ILLEGAL; + else + return 0; + } + return 0; +} + +/* + * @implemented + */ +int _mbsbtype( const unsigned char *str, size_t n ) +{ + if ( str == NULL ) + return -1; + return _mbbtype(*(str+n),1); +} diff --git a/reactos/lib/crt/mbstring/mbccpy.c b/reactos/lib/crt/mbstring/mbccpy.c new file mode 100644 index 00000000000..1db6243c0ae --- /dev/null +++ b/reactos/lib/crt/mbstring/mbccpy.c @@ -0,0 +1,15 @@ +#include +#include + +size_t _mbclen2(const unsigned int s); + +/* + * @implemented + */ +void _mbccpy(unsigned char *dst, const unsigned char *src) +{ + if (!_ismbblead(*src) ) + return; + + memcpy(dst,src,_mbclen2(*src)); +} diff --git a/reactos/lib/crt/mbstring/mbclen.c b/reactos/lib/crt/mbstring/mbclen.c new file mode 100644 index 00000000000..d1e4c82ffa6 --- /dev/null +++ b/reactos/lib/crt/mbstring/mbclen.c @@ -0,0 +1,33 @@ +#include +#include + + +/* + * @implemented + */ +size_t _mbclen(const unsigned char *s) +{ + return (_ismbblead(*s>>8) && _ismbbtrail(*s&0x00FF)) ? 2 : 1; +} + +size_t _mbclen2(const unsigned int s) +{ + return (_ismbblead(s>>8) && _ismbbtrail(s&0x00FF)) ? 2 : 1; +} + +/* + * assume MB_CUR_MAX == 2 + * + * @implemented + */ +int mblen( const char *s, size_t count ) +{ + size_t l; + if ( s == NULL ) + return 0; + + l = _mbclen((const unsigned char *)s); + if ( l < count ) + return -1; + return l; +} diff --git a/reactos/lib/crt/mbstring/mbscat.c b/reactos/lib/crt/mbstring/mbscat.c new file mode 100644 index 00000000000..85c6aab86bd --- /dev/null +++ b/reactos/lib/crt/mbstring/mbscat.c @@ -0,0 +1,9 @@ +#include + +/* + * @implemented + */ +unsigned char * _mbscat(unsigned char *dst, const unsigned char *src) +{ + return (unsigned char *)strcat((char*)dst,(const char*)src); +} diff --git a/reactos/lib/crt/mbstring/mbschr.c b/reactos/lib/crt/mbstring/mbschr.c new file mode 100644 index 00000000000..5b359bbcb0c --- /dev/null +++ b/reactos/lib/crt/mbstring/mbschr.c @@ -0,0 +1,9 @@ +#include + +/* + * @implemented + */ +unsigned char * _mbschr(const unsigned char *str, unsigned int c) +{ + return (unsigned char *)strchr((const char*)str, c); +} diff --git a/reactos/lib/crt/mbstring/mbscmp.c b/reactos/lib/crt/mbstring/mbscmp.c new file mode 100644 index 00000000000..8f5d0b3e4de --- /dev/null +++ b/reactos/lib/crt/mbstring/mbscmp.c @@ -0,0 +1,10 @@ +#include +#include + +/* + * @implemented + */ +int _mbscmp(const unsigned char *str1, const unsigned char *str2) +{ + return strcmp((const char*)str1, (char*)str2); +} diff --git a/reactos/lib/crt/mbstring/mbscoll.c b/reactos/lib/crt/mbstring/mbscoll.c new file mode 100644 index 00000000000..86265316d94 --- /dev/null +++ b/reactos/lib/crt/mbstring/mbscoll.c @@ -0,0 +1,100 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: lib/msvcrt/mbstring/mbscoll.c + * PURPOSE: + * PROGRAMER: Boudewijn Dekker + * UPDATE HISTORY: + * 12/04/99: Created + */ + +#include + +int colldif(unsigned short c1, unsigned short c2); + +/* + * @implemented + */ +int _mbscoll(const unsigned char *str1, const unsigned char *str2) +{ + unsigned char *s1 = (unsigned char *)str1; + unsigned char *s2 = (unsigned char *)str2; + + unsigned short *short_s1, *short_s2; + + int l1, l2; + + while ( *s1 != 0 ) { + + if (*s1 == 0) + break; + + l1 = _ismbblead(*s1); + l2 = _ismbblead(*s2); + if ( !l1 && !l2 ) { + + if (*s1 != *s2) + return colldif(*s1, *s2); + else { + s1 += 1; + s2 += 1; + } + } + else if ( l1 && l2 ){ + short_s1 = (unsigned short *)s1; + short_s2 = (unsigned short *)s2; + if ( *short_s1 != *short_s2 ) + return colldif(*short_s1, *short_s2); + else { + s1 += 2; + s2 += 2; + + } + } + else + return colldif(*s1, *s2); + } ; + return 0; +} + +#if 0 +int _mbsbcoll(const unsigned char *str1, const unsigned char *str2) +{ + unsigned char *s1 = (unsigned char *)str1; + unsigned char *s2 = (unsigned char *)str2; + + unsigned short *short_s1, *short_s2; + + int l1, l2; + + + while ( *s1 != 0 ) { + + + l1 = _ismbblead(*s1); + l2 = _ismbblead(*s2); + if ( !l1 && !l2 ) { + + if (*s1 != *s2) + return colldif(*s1, *s2); + else { + s1 += 1; + s2 += 1; + } + } + else if ( l1 && l2 ){ + short_s1 = (unsigned short *)s1; + short_s2 = (unsigned short *)s2; + if ( *short_s1 != *short_s2 ) + return colldif(*short_s1, *short_s2); + else { + s1 += 2; + s2 += 2; + } + } + else + return colldif(*s1, *s2); + } ; + return 0; +} +#endif diff --git a/reactos/lib/crt/mbstring/mbscpy.c b/reactos/lib/crt/mbstring/mbscpy.c new file mode 100644 index 00000000000..89007c27ffc --- /dev/null +++ b/reactos/lib/crt/mbstring/mbscpy.c @@ -0,0 +1,10 @@ +#include +#include + +/* + * @implemented + */ +unsigned char * _mbscpy(unsigned char *dst, const unsigned char *str) +{ + return (unsigned char*)strcpy((char*)dst,(const char*)str); +} diff --git a/reactos/lib/crt/mbstring/mbscspn.c b/reactos/lib/crt/mbstring/mbscspn.c new file mode 100644 index 00000000000..da27e5e9960 --- /dev/null +++ b/reactos/lib/crt/mbstring/mbscspn.c @@ -0,0 +1,23 @@ +#include + +/* + * FIXME not correct + * + * @unimplemented + */ +size_t _mbscspn(const unsigned char *s1, const unsigned char *s2) +{ + const unsigned char *p, *spanp; + char c, sc; + + for (p = s1;;) + { + c = *p++; + spanp = s2; + do { + if ((sc = *spanp++) == c) + return (size_t)(p - 1) - (size_t)s1; + } while (sc != 0); + } + /* NOTREACHED */ +} diff --git a/reactos/lib/crt/mbstring/mbsdec.c b/reactos/lib/crt/mbstring/mbsdec.c new file mode 100644 index 00000000000..14c228c81c5 --- /dev/null +++ b/reactos/lib/crt/mbstring/mbsdec.c @@ -0,0 +1,17 @@ +#include + +/* + * @implemented + */ +unsigned char * _mbsdec(const unsigned char *str, const unsigned char *cur) +{ + unsigned char *s = (unsigned char *)cur; + if ( str >= cur ) + return NULL; + + s--; + if (_ismbblead(*(s-1)) ) + s--; + + return s; +} diff --git a/reactos/lib/crt/mbstring/mbsdup.c b/reactos/lib/crt/mbstring/mbsdup.c new file mode 100644 index 00000000000..db251c1c342 --- /dev/null +++ b/reactos/lib/crt/mbstring/mbsdup.c @@ -0,0 +1,28 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: lib/msvcrt/mbstring/mbsdup.c + * PURPOSE: Duplicates a multi byte string + * PROGRAMER: Boudewijn Dekker + * UPDATE HISTORY: + Modified from DJGPP strdup + * 12/04/99: Created + */ + +#include +#include + +/* + * @implemented + */ +unsigned char * _mbsdup(const unsigned char *_s) +{ + unsigned char *rv; + if (_s == 0) + return 0; + rv = (unsigned char *)malloc(_mbslen(_s) + 1); + if (rv == 0) + return 0; + _mbscpy(rv, _s); + return rv; +} diff --git a/reactos/lib/crt/mbstring/mbsicmp.c b/reactos/lib/crt/mbstring/mbsicmp.c new file mode 100644 index 00000000000..563b2a75dc0 --- /dev/null +++ b/reactos/lib/crt/mbstring/mbsicmp.c @@ -0,0 +1,65 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: lib/msvcrt/mbstring/mbsicmp.c + * PURPOSE: Duplicates a multi byte string + * PROGRAMER: Boudewijn Dekker + * UPDATE HISTORY: + * 12/04/99: Created + */ +#include +#include +#include + +/* + * @implemented + */ +int _mbsicmp(const unsigned char *str1, const unsigned char *str2) +{ + unsigned char *s1 = (unsigned char *)str1; + unsigned char *s2 = (unsigned char *)str2; + + unsigned short *short_s1, *short_s2; + + int l1, l2; + + do { + + if (*s1 == 0) + break; + + l1 = _ismbblead(*s1); + l2 = _ismbblead(*s2); + if ( !l1 && !l2 ) { + + if (toupper(*s1) != toupper(*s2)) + return toupper(*s1) - toupper(*s2); + else { + s1 += 1; + s2 += 1; + } + } + else if ( l1 && l2 ){ + short_s1 = (unsigned short *)s1; + short_s2 = (unsigned short *)s2; + if ( _mbctoupper(*short_s1) != _mbctoupper(*short_s2 )) + return _mbctoupper(*short_s1) - _mbctoupper(*short_s2); + else { + s1 += 2; + s2 += 2; + } + } + else + return *s1 - *s2; + } while (*s1 != 0); + return 0; + + while (toupper(*s1) == toupper(*s2)) + { + if (*s1 == 0) + return 0; + s1++; + s2++; + } + return toupper(*(unsigned const char *)s1) - toupper(*(unsigned const char *)(s2)); +} diff --git a/reactos/lib/crt/mbstring/mbsicoll.c b/reactos/lib/crt/mbstring/mbsicoll.c new file mode 100644 index 00000000000..d07f4a6afe6 --- /dev/null +++ b/reactos/lib/crt/mbstring/mbsicoll.c @@ -0,0 +1,58 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: lib/msvcrt/mbstring/mbsicoll.c + * PURPOSE: + * PROGRAMER: Boudewijn Dekker + * UPDATE HISTORY: + * 12/04/99: Created + */ +#include +#include +#include + +int colldif(unsigned short c1, unsigned short c2); +/* + * @implemented + */ +int _mbsicoll(const unsigned char *str1, const unsigned char *str2) +{ + unsigned char *s1 = (unsigned char *)str1; + unsigned char *s2 = (unsigned char *)str2; + + unsigned short *short_s1, *short_s2; + + int l1, l2; + + while ( *s1 != 0 ) { + + if (*s1 == 0) + break; + + l1 = _ismbblead(*s1); + l2 = _ismbblead(*s2); + if ( !l1 && !l2 ) { + + if (toupper(*s1) != toupper(*s2)) + return colldif(*s1, *s2); + else { + s1 += 1; + s2 += 1; + } + } + else if ( l1 && l2 ){ + short_s1 = (unsigned short *)s1; + short_s2 = (unsigned short *)s2; + if ( _mbctoupper(*short_s1) != _mbctoupper(*short_s2 )) + return colldif(*short_s1, *short_s2); + else { + s1 += 2; + s2 += 2; + + } + } + else + return colldif(*s1, *s2); + } ; + return 0; +} diff --git a/reactos/lib/crt/mbstring/mbsinc.c b/reactos/lib/crt/mbstring/mbsinc.c new file mode 100644 index 00000000000..98a5fb5dbd9 --- /dev/null +++ b/reactos/lib/crt/mbstring/mbsinc.c @@ -0,0 +1,13 @@ +#include + +/* + * @implemented + */ +unsigned char * _mbsinc(const unsigned char *s) +{ + unsigned char *c = (unsigned char *)s; + if (_ismbblead(*s) ) + c++; + c++; + return c; +} diff --git a/reactos/lib/crt/mbstring/mbslen.c b/reactos/lib/crt/mbstring/mbslen.c new file mode 100644 index 00000000000..8529fbf27f5 --- /dev/null +++ b/reactos/lib/crt/mbstring/mbslen.c @@ -0,0 +1,18 @@ +#include + +size_t _mbclen2(const unsigned int s); + +/* + * @implemented + */ +size_t _mbslen(const unsigned char *str) +{ + int i = 0; + unsigned char *s; + + if (str == 0) + return 0; + + for (s = (unsigned char *)str; *s; s+=_mbclen2(*s),i++); + return i; +} diff --git a/reactos/lib/crt/mbstring/mbslwr.c b/reactos/lib/crt/mbstring/mbslwr.c new file mode 100644 index 00000000000..071a7659ca1 --- /dev/null +++ b/reactos/lib/crt/mbstring/mbslwr.c @@ -0,0 +1,45 @@ +#include +#include + +unsigned int _mbbtolower(unsigned int c) +{ + if (!_ismbblead(c) ) + return tolower(c); + return c; +} + +// code page 952 +#define CASE_DIFF (0x8281 - 0x8260) + +/* + * @implemented + */ +unsigned int _mbctolower(unsigned int c) +{ + if ((c & 0xFF00) != 0) { + // true multibyte case conversion needed + if (_ismbclower(c)) + return c + CASE_DIFF; + } else { + return _mbbtolower(c); + } + return 0; +} + +/* + * @implemented + */ +unsigned char * _mbslwr(unsigned char *x) +{ + unsigned char *y=x; + + while (*y) { + if (!_ismbblead(*y)) { + *y = tolower(*y); + } else { + *y=_mbctolower(*(unsigned short *)y); + y++; + } + } + return x; +} diff --git a/reactos/lib/crt/mbstring/mbsncat.c b/reactos/lib/crt/mbstring/mbsncat.c new file mode 100644 index 00000000000..4eb97b2349b --- /dev/null +++ b/reactos/lib/crt/mbstring/mbsncat.c @@ -0,0 +1,64 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: lib/msvcrt/mbstring/mbsncat.c + * PURPOSE: Concatenate two multi byte string to maximum of n characters or bytes + * PROGRAMER: Boudewijn Dekker + * UPDATE HISTORY: + * 12/04/99: Created + */ + +#include +#include + +size_t _mbclen2(const unsigned int s); + +/* + * @implemented + */ +unsigned char * _mbsncat(unsigned char *dst, const unsigned char *src, size_t n) +{ + unsigned char *d = dst; + const unsigned char *s = src; + if (n != 0) { + d = dst + _mbslen(dst); // get the end of string + d += _mbclen2(*d); // move 1 or 2 up + + do { + if ((*d++ = *s++) == 0) + { + while (--n != 0) + *d++ = 0; + break; + } + if (!_ismbblead(*s) ) + n--; + } while (n > 0); + } + return dst; +} + +/* + * @implemented + */ +unsigned char * _mbsnbcat(unsigned char *dst, const unsigned char *src, size_t n) +{ + unsigned char *d; + const unsigned char *s = src; + if (n != 0) { + d = dst + _mbslen(dst); // get the end of string + d += _mbclen2(*d); // move 1 or 2 up + + do { + if ((*d++ = *s++) == 0) + { + while (--n != 0) + *d++ = 0; + break; + } + if ( !(n==1 && _ismbblead(*s)) ) + n--; + } while (n > 0); + } + return dst; +} diff --git a/reactos/lib/crt/mbstring/mbsnccnt.c b/reactos/lib/crt/mbstring/mbsnccnt.c new file mode 100644 index 00000000000..af739200fd0 --- /dev/null +++ b/reactos/lib/crt/mbstring/mbsnccnt.c @@ -0,0 +1,35 @@ +#include + +/* + * @implemented + */ +size_t _mbsnccnt(const unsigned char *str, size_t n) +{ + unsigned char *s = (unsigned char *)str; + size_t cnt = 0; + while(*s != 0 && n > 0) { + if (_ismbblead(*s) ) + s++; + else + n--; + s++; + cnt++; + } + + return cnt; +} + +/* + * @implemented + */ +size_t _mbsnbcnt(const unsigned char *str, size_t n) +{ + unsigned char *s = (unsigned char *)str; + while(*s != 0 && n > 0) { + if (!_ismbblead(*s) ) + n--; + s++; + } + + return (size_t)(s - str); +} diff --git a/reactos/lib/crt/mbstring/mbsncmp.c b/reactos/lib/crt/mbstring/mbsncmp.c new file mode 100644 index 00000000000..d108898a438 --- /dev/null +++ b/reactos/lib/crt/mbstring/mbsncmp.c @@ -0,0 +1,109 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: lib/msvcrt/mbstring/mbsncmp.c + * PURPOSE: Compares two strings to a maximum of n bytes or characters + * PROGRAMER: Boudewijn Dekker + * UPDATE HISTORY: + * 12/04/99: Created + */ + +#include + +/* + * @implemented + */ +int _mbsncmp(const unsigned char *str1, const unsigned char *str2, size_t n) +{ + unsigned char *s1 = (unsigned char *)str1; + unsigned char *s2 = (unsigned char *)str2; + + unsigned short *short_s1, *short_s2; + + int l1, l2; + + if (n == 0) + return 0; + do { + + if (*s1 == 0) + break; + + l1 = _ismbblead(*s1); + l2 = _ismbblead(*s2); + if ( !l1 && !l2 ) { + + if (*s1 != *s2) + return *s1 - *s2; + else { + s1 += 1; + s2 += 1; + n--; + } + } + else if ( l1 && l2 ){ + short_s1 = (unsigned short *)s1; + short_s2 = (unsigned short *)s2; + if ( *short_s1 != *short_s2 ) + return *short_s1 - *short_s2; + else { + s1 += 2; + s2 += 2; + n--; + + } + } + else + return *s1 - *s2; + } while (n > 0); + return 0; +} + +/* + * @implemented + */ +int _mbsnbcmp(const unsigned char *str1, const unsigned char *str2, size_t n) +{ + unsigned char *s1 = (unsigned char *)str1; + unsigned char *s2 = (unsigned char *)str2; + + unsigned short *short_s1, *short_s2; + + int l1, l2; + + if (n == 0) + return 0; + do { + + if (*s1 == 0) + break; + + l1 = _ismbblead(*s1); + l2 = _ismbblead(*s2); + if ( !l1 && !l2 ) { + + if (*s1 != *s2) + return *s1 - *s2; + else { + s1 += 1; + s2 += 1; + n--; + } + } + else if ( l1 && l2 ){ + short_s1 = (unsigned short *)s1; + short_s2 = (unsigned short *)s2; + if ( *short_s1 != *short_s2 ) + return *short_s1 - *short_s2; + else { + s1 += 2; + s2 += 2; + n-=2; + + } + } + else + return *s1 - *s2; + } while (n > 0); + return 0; +} diff --git a/reactos/lib/crt/mbstring/mbsncoll.c b/reactos/lib/crt/mbstring/mbsncoll.c new file mode 100644 index 00000000000..f9af6ebce83 --- /dev/null +++ b/reactos/lib/crt/mbstring/mbsncoll.c @@ -0,0 +1,115 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: lib/msvcrt/mbstring/mbsncoll.c + * PURPOSE: + * PROGRAMER: Boudewijn Dekker + * UPDATE HISTORY: + * 12/04/99: Created + */ +#include + +int colldif(unsigned short c1, unsigned short c2); + +/* + * @implemented + */ +int _mbsncoll(const unsigned char *str1, const unsigned char *str2, size_t n) +{ + unsigned char *s1 = (unsigned char *)str1; + unsigned char *s2 = (unsigned char *)str2; + + unsigned short *short_s1, *short_s2; + + int l1, l2; + + if (n == 0) + return 0; + do { + + if (*s1 == 0) + break; + + l1 = _ismbblead(*s1); + l2 = _ismbblead(*s2); + if ( !l1 && !l2 ) { + + if (*s1 != *s2) + return colldif(*s1, *s2); + else { + s1 += 1; + s2 += 1; + n--; + } + } + else if ( l1 && l2 ){ + short_s1 = (unsigned short *)s1; + short_s2 = (unsigned short *)s2; + if ( *short_s1 != *short_s2 ) + return colldif(*short_s1, *short_s2); + else { + s1 += 2; + s2 += 2; + n--; + + } + } + else + return colldif(*s1, *s2); + } while (n > 0); + return 0; +} + +/* + * @implemented + */ +int _mbsnbcoll(const unsigned char *str1, const unsigned char *str2, size_t n) +{ + unsigned char *s1 = (unsigned char *)str1; + unsigned char *s2 = (unsigned char *)str2; + + unsigned short *short_s1, *short_s2; + + int l1, l2; + + if (n == 0) + return 0; + do { + + if (*s1 == 0) + break; + + l1 = _ismbblead(*s1); + l2 = _ismbblead(*s2); + if ( !l1 && !l2 ) { + + if (*s1 != *s2) + return colldif(*s1, *s2); + else { + s1 += 1; + s2 += 1; + n--; + } + } + else if ( l1 && l2 ){ + short_s1 = (unsigned short *)s1; + short_s2 = (unsigned short *)s2; + if ( *short_s1 != *short_s2 ) + return colldif(*short_s1, *short_s2); + else { + s1 += 2; + s2 += 2; + n-=2; + + } + } + else + return colldif(*s1, *s2); + } while (n > 0); + return 0; +} + +int colldif(unsigned short c1, unsigned short c2) +{ + return c1 - c2; +} diff --git a/reactos/lib/crt/mbstring/mbsncpy.c b/reactos/lib/crt/mbstring/mbsncpy.c new file mode 100644 index 00000000000..5b4a2c9238d --- /dev/null +++ b/reactos/lib/crt/mbstring/mbsncpy.c @@ -0,0 +1,91 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: lib/msvcrt/mbstring/mbsncpy.c + * PURPOSE: Copies a string to a maximum of n bytes or characters + * PROGRAMER: Boudewijn Dekker + * UPDATE HISTORY: + * 12/04/99: Created + */ + +#include + + +/* + * @implemented + */ +unsigned char* _mbsncpy(unsigned char *str1, const unsigned char *str2, size_t n) +{ + unsigned char *s1 = (unsigned char *)str1; + unsigned char *s2 = (unsigned char *)str2; + + unsigned short *short_s1, *short_s2; + + if (n == 0) + return 0; + do { + + if (*s2 == 0) + break; + + if ( !_ismbblead(*s2) ) { + + *s1 = *s2; + s1 += 1; + s2 += 1; + n--; + } + else { + short_s1 = (unsigned short *)s1; + short_s2 = (unsigned short *)s2; + *short_s1 = *short_s2; + s1 += 2; + s2 += 2; + n--; + } + } while (n > 0); + return str1; +} + + +/* + * The _mbsnbcpy function copies count bytes from src to dest. If src is shorter + * than dest, the string is padded with null characters. If dest is less than or + * equal to count it is not terminated with a null character. + * + * @implemented + */ +unsigned char * _mbsnbcpy(unsigned char *str1, const unsigned char *str2, size_t n) +{ + unsigned char *s1 = (unsigned char *)str1; + unsigned char *s2 = (unsigned char *)str2; + + unsigned short *short_s1, *short_s2; + + if (n == 0) + return 0; + do { + + if (*s2 == 0) { + *s1 = *s2; + break; + } + + if ( !_ismbblead(*s2) ) { + + *s1 = *s2; + s1 += 1; + s2 += 1; + n--; + } + else { + short_s1 = (unsigned short *)s1; + short_s2 = (unsigned short *)s2; + *short_s1 = *short_s2; + s1 += 2; + s2 += 2; + n-=2; + } + } while (n > 0); + return str1; +} diff --git a/reactos/lib/crt/mbstring/mbsnextc.c b/reactos/lib/crt/mbstring/mbsnextc.c new file mode 100644 index 00000000000..4e163daabc3 --- /dev/null +++ b/reactos/lib/crt/mbstring/mbsnextc.c @@ -0,0 +1,19 @@ +#include + +/* + * @implemented + */ +unsigned int _mbsnextc (const unsigned char *src) +{ + unsigned char *char_src = (unsigned char *)src; + unsigned short *short_src = (unsigned short *)src; + + if (src == NULL) + return 0; + + if (!_ismbblead(*src)) + return *char_src; + else + return *short_src; + return 0; +} diff --git a/reactos/lib/crt/mbstring/mbsnicmp.c b/reactos/lib/crt/mbstring/mbsnicmp.c new file mode 100644 index 00000000000..0ece47523f9 --- /dev/null +++ b/reactos/lib/crt/mbstring/mbsnicmp.c @@ -0,0 +1,47 @@ +#include + + +size_t _mbclen2(const unsigned int s); +unsigned int _mbbtoupper(unsigned int c); + + +/* + * @implemented + */ +int _mbsnicmp(const unsigned char *s1, const unsigned char *s2, size_t n) +{ + if (n == 0) + return 0; + do { + if (_mbbtoupper(*s1) != _mbbtoupper(*s2)) + return _mbbtoupper(*(unsigned const char *)s1) - _mbbtoupper(*(unsigned const char *)s2); + s1 += _mbclen2(*s1); + s2 += _mbclen2(*s2); + + if (*s1 == 0) + break; + if (!_ismbblead(*s1)) + n--; + } while (n > 0); + return 0; +} + +/* + * @implemented + */ +int _mbsnbicmp(const unsigned char *s1, const unsigned char *s2, size_t n) +{ + if (n == 0) + return 0; + do { + if (_mbbtoupper(*s1) != _mbbtoupper(*s2)) + return _mbbtoupper(*(unsigned const char *)s1) - _mbbtoupper(*(unsigned const char *)s2); + s1 += _mbclen2(*s1); + s2 += _mbclen2(*s2); + + if (*s1 == 0) + break; + n--; + } while (n > 0); + return 0; +} diff --git a/reactos/lib/crt/mbstring/mbsnicoll.c b/reactos/lib/crt/mbstring/mbsnicoll.c new file mode 100644 index 00000000000..df778069f92 --- /dev/null +++ b/reactos/lib/crt/mbstring/mbsnicoll.c @@ -0,0 +1,17 @@ +#include + +/* + * @unimplemented + */ +int _mbsnicoll(const unsigned char *s1, const unsigned char *s2, size_t n) +{ + return 0; +} + +/* + * @unimplemented + */ +int _mbsnbicoll(const unsigned char *s1, const unsigned char *s2, size_t n) +{ + return 0; +} diff --git a/reactos/lib/crt/mbstring/mbsninc.c b/reactos/lib/crt/mbstring/mbsninc.c new file mode 100644 index 00000000000..bf8a50caf5b --- /dev/null +++ b/reactos/lib/crt/mbstring/mbsninc.c @@ -0,0 +1,16 @@ +#include + +/* + * @implemented + */ +unsigned char * _mbsninc(const unsigned char *str, size_t n) +{ + unsigned char *s = (unsigned char *)str; + while(*s != 0 && n > 0) { + if (!_ismbblead(*s) ) + n--; + s++; + } + + return s; +} diff --git a/reactos/lib/crt/mbstring/mbsnset.c b/reactos/lib/crt/mbstring/mbsnset.c new file mode 100644 index 00000000000..37be2754ffc --- /dev/null +++ b/reactos/lib/crt/mbstring/mbsnset.c @@ -0,0 +1,70 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: lib/msvcrt/mbstring/mbsnset.c + * PURPOSE: Fills a string with a multibyte character + * PROGRAMER: Boudewijn Dekker + * UPDATE HISTORY: + * 12/04/99: Created + */ +#include + +size_t _mbclen2(const unsigned int s); + +/* + * @implemented + */ +unsigned char * _mbsnset(unsigned char *src, unsigned int val, size_t count) +{ + unsigned char *char_src = (unsigned char *)src; + unsigned short *short_src = (unsigned short *)src; + + if ( _mbclen2(val) == 1 ) { + + while(count > 0) { + *char_src = val; + char_src++; + count--; + } + *char_src = 0; + } + else { + while(count > 0) { + *short_src = val; + short_src++; + count-=2; + } + *short_src = 0; + } + + return src; +} + +/* + * @implemented + */ +unsigned char * _mbsnbset(unsigned char *src, unsigned int val, size_t count) +{ + unsigned char *char_src = (unsigned char *)src; + unsigned short *short_src = (unsigned short *)src; + + if ( _mbclen2(val) == 1 ) { + + while(count > 0) { + *char_src = val; + char_src++; + count--; + } + *char_src = 0; + } + else { + while(count > 0) { + *short_src = val; + short_src++; + count-=2; + } + *short_src = 0; + } + + return src; +} diff --git a/reactos/lib/crt/mbstring/mbspbrk.c b/reactos/lib/crt/mbstring/mbspbrk.c new file mode 100644 index 00000000000..ed0b9d4b6de --- /dev/null +++ b/reactos/lib/crt/mbstring/mbspbrk.c @@ -0,0 +1,25 @@ +#include + +int isleadbyte(int byte); + +/* + * not correct + * + * @implemented + */ +unsigned char * _mbspbrk(const unsigned char *s1, const unsigned char *s2) +{ + const unsigned char* p; + + while (*s1) + { + for (p = s2; *p; p += (isleadbyte(*p) ? 2 : 1)) + { + if (*p == *s1) + if (!isleadbyte(*p) || (*(p+1) == *(s1 + 1))) + return (unsigned char*)s1; + } + s1 += (isleadbyte(*s1) ? 2 : 1); + } + return NULL; +} diff --git a/reactos/lib/crt/mbstring/mbsrchr.c b/reactos/lib/crt/mbstring/mbsrchr.c new file mode 100644 index 00000000000..c0f66f36376 --- /dev/null +++ b/reactos/lib/crt/mbstring/mbsrchr.c @@ -0,0 +1,33 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: lib/msvcrt/mbstring/mbsrchr.c + * PURPOSE: Searches for a character in reverse + * PROGRAMER: Boudewijn Dekker + * UPDATE HISTORY: + * 12/04/99: Created + */ + +#include + +/* + * @implemented + */ +unsigned char * _mbsrchr(const unsigned char *src, unsigned int val) +{ + unsigned int c; + unsigned char *match = NULL; + + if (!src) + return NULL; + + while (1) + { + c = _mbsnextc(src); + if (c == val) + match = (unsigned char*)src; + if (!c) + return match; + src += (c > 255) ? 2 : 1; + } +} diff --git a/reactos/lib/crt/mbstring/mbsrev.c b/reactos/lib/crt/mbstring/mbsrev.c new file mode 100644 index 00000000000..f30cb10cd04 --- /dev/null +++ b/reactos/lib/crt/mbstring/mbsrev.c @@ -0,0 +1,33 @@ +#include + +/* + * @implemented + */ +unsigned char * _mbsrev(unsigned char *s) +{ + unsigned char *e; + unsigned char a; + unsigned char *e2; + e=s; + while (*e) { + if ( _ismbblead(*e) ) { + a = *e; + e2 = e; + *e2 = *++e; + if ( *e == 0 ) + break; + *e = a; + } + e++; + } + while (s + +size_t _mbclen2(const unsigned int s); + +/* + * @implemented + */ +unsigned char * _mbsset(unsigned char *src, unsigned int c) +{ + unsigned char *char_src = src; + unsigned short *short_src = (unsigned short *)src; + + if ( _mbclen2(c) == 1 ) { + + while(*char_src != 0) { + *char_src = c; + char_src++; + } + *char_src = 0; + } + else { + while(*short_src != 0) { + *short_src = c; + short_src++; + } + *short_src = 0; + } + + return src; +} diff --git a/reactos/lib/crt/mbstring/mbsspn.c b/reactos/lib/crt/mbstring/mbsspn.c new file mode 100644 index 00000000000..0eb8ec0238d --- /dev/null +++ b/reactos/lib/crt/mbstring/mbsspn.c @@ -0,0 +1,20 @@ +#include + +/* + * FIXME not correct + * + * @unimplemented + */ +size_t _mbsspn(const unsigned char *s1, const unsigned char *s2) +{ + const unsigned char *p = s1, *spanp; + char c, sc; + + cont: + c = *p++; + for (spanp = s2; (sc = *spanp++) != 0;) + if (sc == c) + goto cont; + return (size_t)(p - 1) - (size_t)s1; +// - (char *)s1); +} diff --git a/reactos/lib/crt/mbstring/mbsspnp.c b/reactos/lib/crt/mbstring/mbsspnp.c new file mode 100644 index 00000000000..c82fcf8b9ca --- /dev/null +++ b/reactos/lib/crt/mbstring/mbsspnp.c @@ -0,0 +1,19 @@ +#include + +/* + * FIXME not correct + * + * @unimplemented + */ +unsigned char * _mbsspnp(const unsigned char *s1, const unsigned char *s2) +{ + const unsigned char *p = s1, *spanp; + char c, sc; + + cont: + c = *p++; + for (spanp = s2; (sc = *spanp++) != 0;) + if (sc == c) + goto cont; + return (unsigned char *)p; +} diff --git a/reactos/lib/crt/mbstring/mbsstr.c b/reactos/lib/crt/mbstring/mbsstr.c new file mode 100644 index 00000000000..cbf9f396925 --- /dev/null +++ b/reactos/lib/crt/mbstring/mbsstr.c @@ -0,0 +1,23 @@ +#include +#include + +/* + * @implemented + */ +unsigned char *_mbsstr(const unsigned char *src1,const unsigned char *src2) +{ + int len; + + if (src2 ==NULL || *src2 == 0) + return (unsigned char *)src1; + + len = _mbslen(src2); + + while(*src1) + { + if ((*src1 == *src2) && (_mbsncmp(src1,src2,len) == 0)) + return (unsigned char *)src1; + src1 = (unsigned char *)_mbsinc(src1); + } + return NULL; +} diff --git a/reactos/lib/crt/mbstring/mbstok.c b/reactos/lib/crt/mbstring/mbstok.c new file mode 100644 index 00000000000..79015a8b787 --- /dev/null +++ b/reactos/lib/crt/mbstring/mbstok.c @@ -0,0 +1,56 @@ +#include + +/* + * @implemented + */ +unsigned char * _mbstok(unsigned char *s, unsigned char *delim) +{ + const unsigned char *spanp; + int c, sc; + unsigned char *tok; + static unsigned char *last; + + + if (s == NULL && (s = last) == NULL) + return (NULL); + + /* + * Skip (span) leading delimiters (s += strspn(s, delim), sort of). + */ + cont: + c = *s; + s = _mbsinc(s); + + for (spanp = delim; (sc = *spanp) != 0; spanp = _mbsinc(spanp)) { + if (c == sc) + goto cont; + } + + if (c == 0) { /* no non-delimiter characters */ + last = NULL; + return (NULL); + } + tok = s - 1; + + /* + * Scan token (scan for delimiters: s += strcspn(s, delim), sort of). + * Note that delim must have one NUL; we stop if we see that, too. + */ + for (;;) { + c = *s; + s = _mbsinc(s); + spanp = delim; + do { + if ((sc = *spanp) == c) { + if (c == 0) + s = NULL; + else + s[-1] = 0; + last = s; + return (tok); + } + spanp = _mbsinc(spanp); + } while (sc != 0); + } + /* NOTREACHED */ +} diff --git a/reactos/lib/crt/mbstring/mbstrlen.c b/reactos/lib/crt/mbstring/mbstrlen.c new file mode 100644 index 00000000000..b8c64cce6f1 --- /dev/null +++ b/reactos/lib/crt/mbstring/mbstrlen.c @@ -0,0 +1,19 @@ +#include +#include + +/* + * @implemented + */ +size_t _mbstrlen( const char *string ) +{ + char *s = (char *)string; + size_t i = 0; + + while ( *s != 0 ) { + if ( _ismbblead(*s) ) + s++; + s++; + i++; + } + return i; +} diff --git a/reactos/lib/crt/mbstring/mbsupr.c b/reactos/lib/crt/mbstring/mbsupr.c new file mode 100644 index 00000000000..1899b7fcc3c --- /dev/null +++ b/reactos/lib/crt/mbstring/mbsupr.c @@ -0,0 +1,56 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: lib/msvcrt/mbstring/mbsupr.c + * PURPOSE: + * PROGRAMER: Boudewijn Dekker + * UPDATE HISTORY: + * 12/04/99: Created + */ +#include +#include + +unsigned int _mbbtoupper(unsigned int c) +{ + if (!_ismbblead(c) ) + return toupper(c); + + return c; +} + +// codepage 952 +#define CASE_DIFF (0x8281 - 0x8260) + +/* + * @implemented + */ +unsigned int _mbctoupper(unsigned int c) +{ + + if ((c & 0xFF00) != 0) { +// true multibyte case conversion needed + if ( _ismbcupper(c) ) + return c + CASE_DIFF; + + } else + return _mbbtoupper(c); + + return 0; +} + +/* + * @implemented + */ +unsigned char * _mbsupr(unsigned char *x) +{ + unsigned char *y=x; + while (*y) { + if (!_ismbblead(*y) ) + *y = toupper(*y); + else { + *y=_mbctoupper(*(unsigned short *)y); + y++; + } + } + return x; +} diff --git a/reactos/lib/crt/misc/amsg.c b/reactos/lib/crt/misc/amsg.c new file mode 100644 index 00000000000..b8b288afa23 --- /dev/null +++ b/reactos/lib/crt/misc/amsg.c @@ -0,0 +1,54 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: lib/msvcrt/misc/amsg.c + * PURPOSE: Print runtime error messages + * PROGRAMER: Boudewijn Dekker + * UPDATE HISTORY: + * 28/12/98: Created + */ + +#include +#include + + +static char *__rt_err_msg[] = +{ + "stack overflow", /* _RT_STACK */ + "null pointer assignment", /* _RT_NULLPTR */ + "floating point not loaded", /* _RT_FLOAT */ + "integer divide by 0", /* _RT_INTDIV */ + "not enough space for arguments", /* _RT_SPACEARG */ + "not enough space for environment", /* _RT_SPACEENV */ + "abnormal program termination", /* _RT_ABORT */ + "not enough space for thread data", /* _RT_THREAD */ + "unexpected multithread lock error", /* _RT_LOCK */ + "unexpected heap error", /* _RT_HEAP */ + "unable to open console device", /* _RT_OPENCON */ + "non-continuable exception", /* _RT_NONCONT */ + "invalid exception disposition", /* _RT_INVALDISP */ + "not enough space for _onexit/atexit table", /* _RT_ONEXIT */ + "pure virtual function call", /* _RT_PUREVIRT */ + "not enough space for stdio initialization", /* _RT_STDIOINIT */ + "not enough space for lowio initialization", /* _RT_LOWIOINIT */ +}; + + +/* + * @implemented + */ +int _aexit_rtn(int exitcode) +{ + _exit(exitcode); + return 0; +} + +/* + * @implemented + */ +void _amsg_exit(int errnum) +{ + fprintf(stderr, "runtime error - %s\n", __rt_err_msg[errnum]); + _aexit_rtn(-1); +} + diff --git a/reactos/lib/crt/misc/assert.c b/reactos/lib/crt/misc/assert.c new file mode 100644 index 00000000000..0e416a894c7 --- /dev/null +++ b/reactos/lib/crt/misc/assert.c @@ -0,0 +1,17 @@ +/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ +#include +#include +#include +#include + + +/* + * @implemented + */ +void _assert(const char *msg, const char *file, int line) +{ + /* Assertion failed at foo.c line 45: x + +#ifndef __GNUC__ + +/* GLOBAL VARIABLES *******************************************************/ + +int _fltused; + + +/* FUNCTIONS **************************************************************/ + +/* + * @unimplemented + */ +int +STDCALL +_except_handler3(void) +{ + return 0; +} + +/* + * @unimplemented + */ +int +STDCALL +_local_unwind2(void) +{ + return 0; +} + +#else /*__GNUC__*/ + +#endif /*__GNUC__*/ + + +/* +int __cdecl _allmul(void) +{ + return 0; +} + +int __cdecl _allshl(void) +{ + return 0; +} + +void __cdecl _chkesp(int value1, int value2) +{ +} + +int __cdecl _alloca_probe(void) +{ + return 0; +} + +int STDCALL _abnormal_termination(void) +{ + return 0; +} + +int STDCALL _setjmp(void) +{ + return 0; +} +*/ +/* +BOOL WINAPI DllMain(HANDLE hInst, ULONG ul_reason_for_call, LPVOID lpReserved); + +int STDCALL _DllMainCRTStartup(HANDLE hInst, ULONG ul_reason_for_call, LPVOID lpReserved) +{ + BOOL result; + + //__fileno_init(); + //result = DllMain(hInst, ul_reason_for_call, lpReserved); + + result = DllMain(hInst, DLL_PROCESS_ATTACH, lpReserved); + + + return (result ? 1 : 0); +} + */ + +/* EOF */ diff --git a/reactos/lib/crt/misc/environ.c b/reactos/lib/crt/misc/environ.c new file mode 100644 index 00000000000..7847d2aa3bf --- /dev/null +++ b/reactos/lib/crt/misc/environ.c @@ -0,0 +1,453 @@ +/* $Id$ + * + * dllmain.c + * + * ReactOS MSVCRT.DLL Compatibility Library + */ + +#include "precomp.h" +#include +#include +#include + +#define NDEBUG +#include + + +unsigned int _osver = 0; +unsigned int _winminor = 0; +unsigned int _winmajor = 0; +unsigned int _winver = 0; + + +char *_acmdln = NULL; /* pointer to ascii command line */ +wchar_t *_wcmdln = NULL; /* pointer to wide character command line */ +#undef _environ +#undef _wenviron +char **_environ = NULL; /* pointer to environment block */ +wchar_t **_wenviron = NULL; /* pointer to environment block */ +char **__initenv = NULL; /* pointer to initial environment block */ +wchar_t **__winitenv = NULL; /* pointer to initial environment block */ +#undef _pgmptr +char *_pgmptr = NULL; /* pointer to program name */ +int __app_type = 0; //_UNKNOWN_APP; /* application type */ +int __mb_cur_max = 1; + +int _commode = _IOCOMMIT; + + +int BlockEnvToEnvironA(void) +{ + char *ptr, *environment_strings; + char **envptr; + int count = 1, len; + + DPRINT("BlockEnvToEnvironA()\n"); + + environment_strings = GetEnvironmentStringsA(); + if (environment_strings == NULL) { + return -1; + } + + for (ptr = environment_strings; *ptr; ptr += len) + { + len = strlen(ptr) + 1; + /* Skip drive letter settings. */ + if (*ptr != '=') + count++; + } + + __initenv = _environ = malloc(count * sizeof(char*)); + if (_environ) + { + for (ptr = environment_strings, envptr = _environ; count > 1; ptr += len) + { + len = strlen(ptr) + 1; + /* Skip drive letter settings. */ + if (*ptr != '=') + { + if ((*envptr = malloc(len)) == NULL) + { + for (envptr--; envptr >= _environ; envptr--); + free(*envptr); + FreeEnvironmentStringsA(environment_strings); + free(_environ); + __initenv = _environ = NULL; + return -1; + } + memcpy(*envptr++, ptr, len); + count--; + } + } + /* Add terminating NULL entry. */ + *envptr = NULL; + } + + FreeEnvironmentStringsA(environment_strings); + return _environ ? 0 : -1; +} + +int BlockEnvToEnvironW(void) +{ + wchar_t *ptr, *environment_strings; + wchar_t **envptr; + int count = 1, len; + + DPRINT("BlockEnvToEnvironW()\n"); + + environment_strings = GetEnvironmentStringsW(); + if (environment_strings == NULL) { + return -1; + } + + for (ptr = environment_strings; *ptr; ptr += len) + { + len = wcslen(ptr) + 1; + /* Skip drive letter settings. */ + if (*ptr != '=') + count++; + } + + __winitenv = _wenviron = malloc(count * sizeof(wchar_t*)); + if (_wenviron) + { + for (ptr = environment_strings, envptr = _wenviron; count > 1; ptr += len) + { + len = wcslen(ptr) + 1; + /* Skip drive letter settings. */ + if (*ptr != '=') + { + if ((*envptr = malloc(len * sizeof(wchar_t))) == NULL) + { + for (envptr--; envptr >= _wenviron; envptr--); + free(*envptr); + FreeEnvironmentStringsW(environment_strings); + free(_wenviron); + __winitenv = _wenviron = NULL; + return -1; + } + memcpy(*envptr++, ptr, len * sizeof(wchar_t)); + count--; + } + } + /* Add terminating NULL entry. */ + *envptr = NULL; + } + + FreeEnvironmentStringsW(environment_strings); + return _wenviron ? 0 : -1; +} + +/** + * Internal function to duplicate environment block. Although it's + * parameter are defined as char**, it's able to work also with + * wide character environment block which are of type wchar_t**. + * + * @param original_environment + * Environment to duplicate. + * @param wide + * Set to zero for multibyte environments, non-zero otherwise. + * + * @return Original environment in case of failure, otherwise + * pointer to new environment block. + */ +char **DuplicateEnvironment(char **original_environment, int wide) +{ + int count = 1; + char **envptr, **newenvptr, **newenv; + + for (envptr = original_environment; *envptr != NULL; envptr++, count++) + ; + + newenvptr = newenv = malloc(count * sizeof(char*)); + if (newenv == NULL) + return original_environment; + + for (envptr = original_environment; count > 1; newenvptr++, count--) + { + if (wide) + *newenvptr = (char*)_wcsdup((wchar_t*)*envptr++); + else + *newenvptr = _strdup(*envptr++); + if (*newenvptr == NULL) + { + for (newenvptr--; newenvptr >= newenv; newenvptr--); + free(*newenvptr); + free(newenv); + return original_environment; + } + } + + return newenv; +} + +/** + * Internal function to deallocate environment block. Although it's + * parameter are defined as char**, it's able to work also with + * wide character environment block which are of type wchar_t**. + * + * @param environment + * Environment to free. + */ +void FreeEnvironment(char **environment) +{ + char **envptr; + for (envptr = environment; *envptr != NULL; envptr++) + free(*envptr); + free(environment); +} + +/** + * Internal version of _wputenv and _putenv. It works duplicates the + * original envirnments created during initilization if needed to prevent + * having spurious pointers floating around. Then it updates the internal + * environment tables (_environ and _wenviron) and at last updates the + * OS environemnt. + * + * Note that there can happen situation when the internal [_w]environ + * arrays will be updated, but the OS environment update will fail. In + * this case we don't undo the changes to the [_w]environ tables to + * comply with the Microsoft behaviour (and it's also much easier :-). + */ +int SetEnv(const wchar_t *option) +{ + wchar_t *epos, *name; + wchar_t **wenvptr; + wchar_t *woption; + char *mboption; + int remove, index, count, size, result = 0, found = 0; + + if (option == NULL || (epos = wcschr(option, L'=')) == NULL) + return -1; + remove = (epos[1] == 0); + + /* Duplicate environment if needed. */ + if (_environ == __initenv) + { + if ((_environ = DuplicateEnvironment(_environ, 0)) == __initenv) + return -1; + } + if (_wenviron == __winitenv) + { + if ((_wenviron = (wchar_t**)DuplicateEnvironment((char**)_wenviron, 1)) == + __winitenv) + return -1; + } + + /* Create a copy of the option name. */ + name = malloc((epos - option + 1) * sizeof(wchar_t)); + if (name == NULL) + return -1; + memcpy(name, option, (epos - option) * sizeof(wchar_t)); + name[epos - option] = 0; + + /* Find the option we're trying to modify. */ + for (index = 0, wenvptr = _wenviron; *wenvptr != NULL; wenvptr++, index++) + { + if (!_wcsnicmp(*wenvptr, option, epos - option)) + { + found = 1; + break; + } + } + + if (remove) + { + if (!found) + { + free(name); + return -1; + } + + /* Remove the option from wide character environment. */ + free(*wenvptr); + for (count = index; *wenvptr != NULL; wenvptr++, count++) + *wenvptr = *(wenvptr + 1); + _wenviron = realloc(_wenviron, count * sizeof(wchar_t*)); + + /* Remove the option from multibyte environment. We assume + * the environments are in sync and the option is at the + * same position. */ + free(_environ[index]); + for (; _environ[index] != NULL; index++) + _environ[index] = _environ[index + 1]; + _environ = realloc(_environ, count * sizeof(char*)); + + result = SetEnvironmentVariableW(name, NULL) ? 0 : -1; + } + else + { + /* Make a copy of the option that we will store in the environment block. */ + woption = _wcsdup((wchar_t*)option); + if (woption == NULL) + { + free(name); + return -1; + } + + /* Create a multibyte copy of the option. */ + size = WideCharToMultiByte(CP_ACP, 0, option, -1, NULL, 0, NULL, NULL); + mboption = malloc(size); + if (mboption == NULL) + { + free(name); + free(woption); + return -1; + } + WideCharToMultiByte(CP_ACP, 0, option, -1, mboption, size, NULL, NULL); + + if (found) + { + /* Replace the current entry. */ + free(*wenvptr); + *wenvptr = woption; + free(_environ[index]); + _environ[index] = mboption; + } + else + { + wchar_t **wnewenv; + char **mbnewenv; + + /* Get the size of the original environment. */ + for (count = index; *wenvptr != NULL; wenvptr++, count++) + ; + + /* Create a new entry. */ + if ((wnewenv = realloc(_wenviron, (count + 2) * sizeof(wchar_t*))) == NULL) + { + free(name); + free(mboption); + free(woption); + return -1; + } + _wenviron = wnewenv; + if ((mbnewenv = realloc(_environ, (count + 2) * sizeof(char*))) == NULL) + { + free(name); + free(mboption); + free(woption); + return -1; + } + _environ = mbnewenv; + + /* Set the last entry to our option. */ + _wenviron[count] = woption; + _environ[count] = mboption; + _wenviron[count + 1] = NULL; + _environ[count + 1] = NULL; + } + + /* And finally update the OS environment. */ + result = SetEnvironmentVariableW(name, epos + 1) ? 0 : -1; + } + free(name); + + return result; +} + +/* + * @implemented + */ +int *__p__commode(void) // not exported by NTDLL +{ + return &_commode; +} + +/* + * @implemented + */ +void __set_app_type(int app_type) +{ + __app_type = app_type; +} + +/* + * @implemented + */ +char **__p__acmdln(void) +{ + return &_acmdln; +} + +/* + * @implemented + */ +char ***__p__environ(void) +{ + return &_environ; +} + +/* + * @implemented + */ +wchar_t ***__p__wenviron(void) +{ + return &_wenviron; +} + +/* + * @implemented + */ +char ***__p___initenv(void) +{ + return &__initenv; +} + +/* + * @implemented + */ +wchar_t ***__p___winitenv(void) +{ + return &__winitenv; +} + +/* + * @implemented + */ +int *__p___mb_cur_max(void) +{ + return &__mb_cur_max; +} + +/* + * @implemented + */ +unsigned int *__p__osver(void) +{ + return &_osver; +} + +/* + * @implemented + */ +char **__p__pgmptr(void) +{ + return &_pgmptr; +} + +/* + * @implemented + */ +unsigned int *__p__winmajor(void) +{ + return &_winmajor; +} + +/* + * @implemented + */ +unsigned int *__p__winminor(void) +{ + return &_winminor; +} + +/* + * @implemented + */ +unsigned int *__p__winver(void) +{ + return &_winver; +} + +/* EOF */ diff --git a/reactos/lib/crt/misc/getargs.c b/reactos/lib/crt/misc/getargs.c new file mode 100644 index 00000000000..b68db68d6dc --- /dev/null +++ b/reactos/lib/crt/misc/getargs.c @@ -0,0 +1,176 @@ +#include "precomp.h" +#include +#include + + +extern char*_acmdln; +extern char*_pgmptr; +#undef _environ +extern char**_environ; + +#undef __argv +#undef __argc + +char**__argv = NULL; +#undef __wargv +wchar_t**__wargv = NULL; +int __argc = 0; + +extern HANDLE hHeap; + +char* strndup(char* name, int len) +{ + char *s = malloc(len + 1); + if (s != NULL) { + strncpy(s, name, len); + name[len] = 0; + } + return s; +} + +#define SIZE (4096 / sizeof(char*)) + +int add(char* name) +{ + char** _new; + if ((__argc % SIZE) == 0) { + if (__argv == NULL) + _new = malloc(sizeof(char*) * SIZE); + else + _new = realloc(__argv, sizeof(char*) * (__argc + SIZE)); + if (_new == NULL) + return -1; + __argv = _new; + } + __argv[__argc++] = name; + return 0; +} + +int expand(char* name, int flag) +{ + char* s; + WIN32_FIND_DATAA fd; + HANDLE hFile; + BOOLEAN first = TRUE; + char buffer[256]; + int pos; + + s = strpbrk(name, "*?"); + if (s && flag) { + hFile = FindFirstFileA(name, &fd); + if (hFile != INVALID_HANDLE_VALUE) { + while(s != name && *s != '/' && *s != '\\') + s--; + pos = s - name; + if (*s == '/' || *s == '\\') + pos++; + strncpy(buffer, name, pos); + do { + if (!(fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) { + strcpy(&buffer[pos], fd.cFileName); + if (add(_strdup(buffer)) < 0) { + FindClose(hFile); + return -1; + } + first = FALSE; + } + } + while(FindNextFileA(hFile, &fd)); + FindClose(hFile); + } + } + if (first) { + if (add(name) < 0) + return -1; + } + else + free(name); + return 0; +} + +/* + * @unimplemented + */ +int __getmainargs(int* argc, char*** argv, char*** env, int flag) +{ + int i, afterlastspace, ignorespace, len, doexpand; + + /* missing threading init */ + + i = 0; + afterlastspace = 0; + ignorespace = 0; + doexpand = flag; + + len = strlen(_acmdln); + + while (_acmdln[i]) { + if (_acmdln[i] == '"') { + if(ignorespace) { + ignorespace = 0; + } else { + ignorespace = 1; + doexpand = 0; + } + memmove(_acmdln + i, _acmdln + i + 1, len - i); + len--; + continue; + } + + if (_acmdln[i] == ' ' && !ignorespace) { + expand(strndup(_acmdln + afterlastspace, i - afterlastspace), doexpand); + i++; + while (_acmdln[i]==' ') + i++; + afterlastspace=i; + doexpand = flag; + } else { + i++; + } + } + + if (_acmdln[afterlastspace] != 0) { + expand(strndup(_acmdln+afterlastspace, i - afterlastspace), doexpand); + } + HeapValidate(hHeap, 0, NULL); + *argc = __argc; + *argv = __argv; + *env = _environ; + _pgmptr = _strdup((char*)argv[0]); + return 0; +} + +/* + * @unimplemented + */ +void __wgetmainargs(int* argc, wchar_t*** wargv, wchar_t*** wenv, + int expand_wildcards, int* new_mode) +{ + extern wchar_t **__winitenv; + *argc = 0; + *wargv = NULL; + *wenv = __winitenv; +} + +/* + * @implemented + */ +int* __p___argc(void) +{ + return &__argc; +} + +/* + * @implemented + */ +char*** __p___argv(void) +{ + return &__argv; +} + +#if 0 +int _chkstk(void) +{ + return 0; +} +#endif diff --git a/reactos/lib/crt/misc/initterm.c b/reactos/lib/crt/misc/initterm.c new file mode 100644 index 00000000000..26f66a1c924 --- /dev/null +++ b/reactos/lib/crt/misc/initterm.c @@ -0,0 +1,20 @@ +#include + + +/* + * @implemented + */ +void _initterm(void (*fStart[])(void), void (*fEnd[])(void)) +{ + int i = 0; + + if ( fStart == NULL || fEnd == NULL ) + return; + + while ( &fStart[i] < fEnd ) + { + if ( fStart[i] != NULL ) + (*fStart[i])(); + i++; + } +} diff --git a/reactos/lib/crt/misc/lock.c b/reactos/lib/crt/misc/lock.c new file mode 100644 index 00000000000..100cef02d54 --- /dev/null +++ b/reactos/lib/crt/misc/lock.c @@ -0,0 +1,135 @@ +/* + * Copyright (c) 2002, TransGaming Technologies Inc. + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "precomp.h" + +#define NDEBUG +#include +#include + +typedef struct +{ + BOOL bInit; + CRITICAL_SECTION crit; +} LOCKTABLEENTRY; + +static LOCKTABLEENTRY lock_table[ _TOTAL_LOCKS ]; + +static inline void msvcrt_mlock_set_entry_initialized( int locknum, BOOL initialized ) +{ + lock_table[ locknum ].bInit = initialized; +} + +static inline void msvcrt_initialize_mlock( int locknum ) +{ + InitializeCriticalSection( &(lock_table[ locknum ].crit) ); + msvcrt_mlock_set_entry_initialized( locknum, TRUE ); +} + +static inline void msvcrt_uninitialize_mlock( int locknum ) +{ + DeleteCriticalSection( &(lock_table[ locknum ].crit) ); + msvcrt_mlock_set_entry_initialized( locknum, FALSE ); +} + +/********************************************************************** + * msvcrt_init_mt_locks (internal) + * + * Initialize the table lock. All other locks will be initialized + * upon first use. + * + */ +void msvcrt_init_mt_locks(void) +{ + int i; + + DPRINT( "initializing mtlocks\n" ); + + /* Initialize the table */ + for( i=0; i < _TOTAL_LOCKS; i++ ) + { + msvcrt_mlock_set_entry_initialized( i, FALSE ); + } + + /* Initialize our lock table lock */ + msvcrt_initialize_mlock( _LOCKTAB_LOCK ); +} + +/********************************************************************** + * msvcrt_free_mt_locks (internal) + * + * Uninitialize all mt locks. Assume that neither _lock or _unlock will + * be called once we're calling this routine (ie _LOCKTAB_LOCK can be deleted) + * + */ +void msvcrt_free_mt_locks(void) +{ + int i; + + DPRINT(": uninitializing all mtlocks\n" ); + + /* Uninitialize the table */ + for( i=0; i < _TOTAL_LOCKS; i++ ) + { + if( lock_table[ i ].bInit == TRUE ) + { + msvcrt_uninitialize_mlock( i ); + } + } +} + + +/********************************************************************** + * _lock (MSVCRT.@) + */ +void _lock( int locknum ) +{ + DPRINT( "(%d)\n", locknum ); + + /* If the lock doesn't exist yet, create it */ + if( lock_table[ locknum ].bInit == FALSE ) + { + /* Lock while we're changing the lock table */ + _lock( _LOCKTAB_LOCK ); + + /* Check again if we've got a bit of a race on lock creation */ + if( lock_table[ locknum ].bInit == FALSE ) + { + DPRINT( ": creating lock #%d\n", locknum ); + msvcrt_initialize_mlock( locknum ); + } + + /* Unlock ourselves */ + _unlock( _LOCKTAB_LOCK ); + } + + EnterCriticalSection( &(lock_table[ locknum ].crit) ); +} + +/********************************************************************** + * _unlock (MSVCRT.@) + * + * NOTE: There is no error detection to make sure the lock exists and is acquired. + */ +void _unlock( int locknum ) +{ + DPRINT( "(%d)\n", locknum ); + + LeaveCriticalSection( &(lock_table[ locknum ].crit) ); +} + diff --git a/reactos/lib/crt/misc/purecall.c b/reactos/lib/crt/misc/purecall.c new file mode 100644 index 00000000000..4b50cbfd528 --- /dev/null +++ b/reactos/lib/crt/misc/purecall.c @@ -0,0 +1,10 @@ + +#include + +/* + * @implemented + */ +void _purecall(void) +{ + _amsg_exit(_RT_PUREVIRT); +} diff --git a/reactos/lib/crt/misc/stubs.c b/reactos/lib/crt/misc/stubs.c new file mode 100644 index 00000000000..e2e40baa841 --- /dev/null +++ b/reactos/lib/crt/misc/stubs.c @@ -0,0 +1,113 @@ +#include "precomp.h" + +#define NDEBUG +#include + +/********************************************************************* + * $I10_OUTPUT (MSVCRT.@) + * Function not really understood but needed to make the DLL work + */ +void MSVCRT_I10_OUTPUT(void) +{ + /* FIXME: This is probably data, not a function */ +} + +/*********************************************************************** + * _adj_fdiv_m32 (MSVCRT.@) + * + * NOTE + * I _think_ this function is intended to work around the Pentium + * fdiv bug. + */ +void __stdcall _adj_fdiv_m32( unsigned int arg ) +{ + DPRINT1("_adj_fdiv_m32 stub\n"); +} + +/*********************************************************************** + * _adj_fdiv_m32i (MSVCRT.@) + * + * NOTE + * I _think_ this function is intended to work around the Pentium + * fdiv bug. + */ +void __stdcall _adj_fdiv_m32i( int arg ) +{ + DPRINT1("_adj_fdiv_m32i stub\n"); +} + +/*********************************************************************** + * _adj_fdiv_m64 (MSVCRT.@) + * + * NOTE + * I _think_ this function is intended to work around the Pentium + * fdiv bug. + */ +void __stdcall _adj_fdiv_m64( unsigned __int64 arg ) +{ + DPRINT1("_adj_fdiv_m64 stub\n"); +} + +/*********************************************************************** + * _adj_fdiv_r (MSVCRT.@) + * FIXME + * This function is likely to have the wrong number of arguments. + * + * NOTE + * I _think_ this function is intended to work around the Pentium + * fdiv bug. + */ +void _adj_fdiv_r(void) +{ + DPRINT1("_adj_fdiv_r stub\n"); +} + +/*********************************************************************** + * _adj_fdivr_m32 (MSVCRT.@) + * + * NOTE + * I _think_ this function is intended to work around the Pentium + * fdiv bug. + */ +void __stdcall _adj_fdivr_m32( unsigned int arg ) +{ + DPRINT1("_adj_fdivr_m32i stub\n"); +} + +/*********************************************************************** + * _adj_fdivr_m32i (MSVCRT.@) + * + * NOTE + * I _think_ this function is intended to work around the Pentium + * fdiv bug. + */ +void __stdcall _adj_fdivr_m32i( int arg ) +{ + DPRINT1("_adj_fdivr_m32i stub\n"); +} + +/*********************************************************************** + * _adj_fdivr_m64 (MSVCRT.@) + * + * NOTE + * I _think_ this function is intended to work around the Pentium + * fdiv bug. + */ +void __stdcall _adj_fdivr_m64( unsigned __int64 arg ) +{ + DPRINT1("_adj_fdivr_m64 stub\n"); +} + +/*********************************************************************** + * _adj_fpatan (MSVCRT.@) + * FIXME + * This function is likely to have the wrong number of arguments. + * + * NOTE + * I _think_ this function is intended to work around the Pentium + * fdiv bug. + */ +void _adj_fpatan(void) +{ + DPRINT1("_adj_fpatan stub\n"); +} diff --git a/reactos/lib/crt/misc/tls.c b/reactos/lib/crt/misc/tls.c new file mode 100644 index 00000000000..84938534acc --- /dev/null +++ b/reactos/lib/crt/misc/tls.c @@ -0,0 +1,100 @@ +#include "precomp.h" +#include +#include +#include + + +static unsigned long TlsIndex = (unsigned long)-1; + + +static void InitThreadData(PTHREADDATA ThreadData) +{ + ThreadData->terrno = 0; + ThreadData->tdoserrno = 0; + + ThreadData->fpecode = 0; + + /* FIXME: init more thread local data */ + +} + + +int CreateThreadData(void) +{ + PTHREADDATA ThreadData; + + TlsIndex = TlsAlloc(); + if (TlsIndex == (unsigned long)-1) + return FALSE; + + ThreadData = (PTHREADDATA)calloc(1, sizeof(THREADDATA)); + if (ThreadData == NULL) + return FALSE; + + if(!TlsSetValue(TlsIndex, (LPVOID)ThreadData)) + return FALSE; + + InitThreadData(ThreadData); + + return TRUE; +} + + +void DestroyThreadData(void) +{ + if (TlsIndex != (unsigned long)-1) + { + TlsFree(TlsIndex); + TlsIndex = (unsigned long)-1; + } +} + + +void FreeThreadData(PTHREADDATA ThreadData) +{ + if (TlsIndex != (unsigned long)-1) + { + if (ThreadData == NULL) + ThreadData = TlsGetValue(TlsIndex); + + if (ThreadData != NULL) + { + /* FIXME: free more thread local data */ + + free(ThreadData); + } + + TlsSetValue(TlsIndex, NULL); + } +} + + +PTHREADDATA GetThreadData(void) +{ + PTHREADDATA ThreadData; + DWORD LastError; + + LastError = GetLastError(); + ThreadData = TlsGetValue(TlsIndex); + if (ThreadData == NULL) + { + ThreadData = (PTHREADDATA)calloc(1, sizeof(THREADDATA)); + if (ThreadData != NULL) + { + TlsSetValue(TlsIndex, (LPVOID)ThreadData); + + InitThreadData(ThreadData); + } + else + { + _amsg_exit(_RT_THREAD); /* write message and die */ + } + } + + SetLastError(LastError); + + return ThreadData; +} + +/* EOF */ + diff --git a/reactos/lib/crt/precomp.h b/reactos/lib/crt/precomp.h new file mode 100644 index 00000000000..f6d254553a6 --- /dev/null +++ b/reactos/lib/crt/precomp.h @@ -0,0 +1 @@ +#include diff --git a/reactos/lib/crt/process/_cwait.c b/reactos/lib/crt/process/_cwait.c new file mode 100644 index 00000000000..aa940452e21 --- /dev/null +++ b/reactos/lib/crt/process/_cwait.c @@ -0,0 +1,36 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: lib/msvcrt/process/cwait.c + * PURPOSE: Waits for a process to exit + * PROGRAMER: Boudewijn Dekker + * UPDATE HISTORY: + * 04/03/99: Created + */ + +#include "precomp.h" +#include +#include +#include + + +/* + * @implemented + */ +int _cwait(int* pnStatus, int hProc, int nAction) +{ + DWORD ExitCode; + + nAction = 0; + if (WaitForSingleObject((void*)hProc, INFINITE) != WAIT_OBJECT_0) { + __set_errno(ECHILD); + return -1; + } + + if (!GetExitCodeProcess((void*)hProc, &ExitCode)) + return -1; + if (pnStatus != NULL) + *pnStatus = (int)ExitCode; + CloseHandle((HANDLE)hProc); + return hProc; +} diff --git a/reactos/lib/crt/process/_system.c b/reactos/lib/crt/process/_system.c new file mode 100644 index 00000000000..9041e41bfc6 --- /dev/null +++ b/reactos/lib/crt/process/_system.c @@ -0,0 +1,122 @@ +/* $Id$ + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: lib/msvcrt/process/system.c + * PURPOSE: Excutes a shell command + * PROGRAMER: Boudewijn Dekker + * UPDATE HISTORY: + * 04/03/99: Created + */ + +#include "precomp.h" +#include +#include +#include +#include +#include + +/* + * @implemented + */ +int system(const char *command) +{ + char *szCmdLine = NULL; + char *szComSpec = NULL; + + PROCESS_INFORMATION ProcessInformation; + STARTUPINFOA StartupInfo; + char *s; + BOOL result; + + int nStatus; + + szComSpec = getenv("COMSPEC"); + +// system should return 0 if command is null and the shell is found + + if (command == NULL) { + if (szComSpec == NULL) + return 0; + else + return -1; + } + +// should return 127 or 0 ( MS ) if the shell is not found +// __set_errno(ENOENT); + + if (szComSpec == NULL) + { + szComSpec = _strdup("cmd.exe"); + if (szComSpec == NULL) + { + __set_errno(ENOMEM); + return -1; + } + } + + s = max(strchr(szComSpec, '\\'), strchr(szComSpec, '/')); + if (s == NULL) + s = szComSpec; + else + s++; + + szCmdLine = malloc(strlen(s) + 4 + strlen(command) + 1); + if (szCmdLine == NULL) + { + free (szComSpec); + __set_errno(ENOMEM); + return -1; + } + + strcpy(szCmdLine, s); + s = strrchr(szCmdLine, '.'); + if (s) + *s = 0; + strcat(szCmdLine, " /C "); + strcat(szCmdLine, command); + +//command file has invalid format ENOEXEC + + memset (&StartupInfo, 0, sizeof(StartupInfo)); + StartupInfo.cb = sizeof(StartupInfo); + StartupInfo.lpReserved= NULL; + StartupInfo.dwFlags = 0; + StartupInfo.wShowWindow = SW_SHOWDEFAULT; + StartupInfo.lpReserved2 = NULL; + StartupInfo.cbReserved2 = 0; + +// According to ansi standards the new process should ignore SIGINT and SIGQUIT +// In order to disable ctr-c the process is created with CREATE_NEW_PROCESS_GROUP, +// thus SetConsoleCtrlHandler(NULL,TRUE) is made on behalf of the new process. + + +//SIGCHILD should be blocked aswell + + result = CreateProcessA(szComSpec, + szCmdLine, + NULL, + NULL, + TRUE, + 0, + NULL, + NULL, + &StartupInfo, + &ProcessInformation); + free(szCmdLine); + free(szComSpec); + + if (result == FALSE) + { + _dosmaperr(GetLastError()); + return -1; + } + + CloseHandle(ProcessInformation.hThread); + +// system should wait untill the calling process is finished + _cwait(&nStatus,(int)ProcessInformation.hProcess,0); + CloseHandle(ProcessInformation.hProcess); + + return nStatus; +} diff --git a/reactos/lib/crt/process/dll.c b/reactos/lib/crt/process/dll.c new file mode 100644 index 00000000000..5e3db761f6a --- /dev/null +++ b/reactos/lib/crt/process/dll.c @@ -0,0 +1,41 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: lib/msvcrt/process/dll.c + * PURPOSE: Dll support routines + * PROGRAMER: Boudewijn Dekker + * UPDATE HISTORY: + * 04/03/99: Created + */ + +#include "precomp.h" +#include + + +/* + * @implemented + */ +void* _loaddll(char* name) +{ + return LoadLibraryA(name); +} + +/* + * @implemented + */ +int _unloaddll(void* handle) +{ + return FreeLibrary(handle); +} + +/* + * @implemented + */ +FARPROC _getdllprocaddr(void* hModule, char* lpProcName, int iOrdinal) +{ + if (lpProcName != NULL) + return GetProcAddress(hModule, lpProcName); + else + return GetProcAddress(hModule, (LPSTR)iOrdinal); + return (NULL); +} diff --git a/reactos/lib/crt/process/process.c b/reactos/lib/crt/process/process.c new file mode 100644 index 00000000000..8a375430aa3 --- /dev/null +++ b/reactos/lib/crt/process/process.c @@ -0,0 +1,622 @@ +#include "precomp.h" +#include +#include +#include +#include +#include + +#define NDEBUG +#include + +extern int maxfno; + +char const* ext[] = +{ + "", + ".bat", + ".cmd", + ".com", + ".exe" +}; + +const char* find_exec(const char* path, char* rpath) +{ + char *rp; + const char *rd; + int i, found = 0; + + DPRINT("find_exec('%s', %x)\n", path, rpath); + + if (path == NULL) + { + return NULL; + } + if (strlen(path) > FILENAME_MAX - 1) + { + return path; + } + /* copy path in rpath */ + for (rd = path, rp = rpath; *rd; *rp++ = *rd++); + *rp = 0; + /* try first with the name as is */ + for (i = 0; i < sizeof(ext) / sizeof(*ext); i++) + { + strcpy(rp, ext[i]); + + DPRINT("trying '%s'\n", rpath); + + if (_access(rpath, F_OK) == 0 && _access(rpath, D_OK) != 0) + { + found = 1; + break; + } + } + if (!found) + { + char* env = getenv("PATH"); + if (env) + { + char* ep = env; + while (*ep && !found) + { + if (*ep == ';') ep++; + rp=rpath; + for (; *ep && (*ep != ';'); *rp++ = *ep++); + if (rp > rpath) + { + rp--; + if (*rp != '/' && *rp != '\\') + { + *++rp = '\\'; + } + rp++; + } + for (rd=path; *rd; *rp++ = *rd++); + for (i = 0; i < sizeof(ext) / sizeof(*ext); i++) + { + strcpy(rp, ext[i]); + + DPRINT("trying '%s'\n", rpath); + + if (_access(rpath, F_OK) == 0 && _access(rpath, D_OK) != 0) + { + found = 1; + break; + } + } + } + } + } + + return found ? rpath : path; +} + +static char* +argvtos(char* const* argv, char delim) +{ + int i, len; + char *ptr, *str; + + if (argv == NULL) + return NULL; + + for (i = 0, len = 0; argv[i]; i++) + { + len += strlen(argv[i]) + 1; + } + + str = ptr = (char*) malloc(len + 1); + if (str == NULL) + return NULL; + + for(i = 0; argv[i]; i++) + { + len = strlen(argv[i]); + memcpy(ptr, argv[i], len); + ptr += len; + *ptr++ = delim; + } + *ptr = 0; + + return str; +} + +static char* +valisttos(const char* arg0, va_list alist, char delim) +{ + va_list alist2 = alist; + char *ptr, *str; + int len; + + if (arg0 == NULL) + return NULL; + + ptr = (char*)arg0; + len = 0; + do + { + len += strlen(ptr) + 1; + ptr = va_arg(alist, char*); + } + while(ptr != NULL); + + str = (char*) malloc(len + 1); + if (str == NULL) + return NULL; + + ptr = str; + do + { + len = strlen(arg0); + memcpy(ptr, arg0, len); + ptr += len; + *ptr++ = delim; + arg0 = va_arg(alist2, char*); + } + while(arg0 != NULL); + *ptr = 0; + + return str; +} + +static int +do_spawn(int mode, const char* cmdname, const char* args, const char* envp) +{ + STARTUPINFOA StartupInfo; + PROCESS_INFORMATION ProcessInformation; + char* fmode; + HANDLE* hFile; + int i, last; + BOOL bResult; + DWORD dwExitCode; + DWORD dwError; + + DPRINT("do_spawn('%s')\n", cmdname); + + if (mode != _P_NOWAIT && mode != _P_NOWAITO && mode != _P_WAIT && mode != _P_DETACH && mode != _P_OVERLAY) + { + __set_errno ( EINVAL ); + return -1; + } + + if (0 != _access(cmdname, F_OK)) + { + __set_errno ( ENOENT ); + return -1; + } + if (0 == _access(cmdname, D_OK)) + { + __set_errno ( EISDIR ); + return -1; + } + + memset (&StartupInfo, 0, sizeof(StartupInfo)); + StartupInfo.cb = sizeof(StartupInfo); + + for (last = i = 0; i < maxfno; i++) + { + if ((void*)-1 != _get_osfhandle(i)) + { + last = i + 1; + } + } + + if (last) + { + StartupInfo.cbReserved2 = sizeof(ULONG) + last * (sizeof(char) + sizeof(HANDLE)); + StartupInfo.lpReserved2 = malloc(StartupInfo.cbReserved2); + if (StartupInfo.lpReserved2 == NULL) + { + __set_errno ( ENOMEM ); + return -1; + } + + *(DWORD*)StartupInfo.lpReserved2 = last; + fmode = (char*)(StartupInfo.lpReserved2 + sizeof(ULONG)); + hFile = (HANDLE*)(StartupInfo.lpReserved2 + sizeof(ULONG) + last * sizeof(char)); + for (i = 0; i < last; i++) + { + int _mode = __fileno_getmode(i); + HANDLE h = _get_osfhandle(i); + /* FIXME: The test of console handles (((ULONG)Handle) & 0x10000003) == 0x3) + * is possible wrong + */ + if ((((ULONG)h) & 0x10000003) == 0x3 || _mode & _O_NOINHERIT || (i < 3 && mode == _P_DETACH)) + { + *hFile = INVALID_HANDLE_VALUE; + *fmode = 0; + } + else + { + DWORD dwFlags; + BOOL bFlag; + bFlag = GetHandleInformation(h, &dwFlags); + if (bFlag && (dwFlags & HANDLE_FLAG_INHERIT)) + { + *hFile = h; + *fmode = (_O_ACCMODE & _mode) | (((_O_TEXT | _O_BINARY) & _mode) >> 8); + } + else + { + *hFile = INVALID_HANDLE_VALUE; + *fmode = 0; + } + } + fmode++; + hFile++; + } + } + + bResult = CreateProcessA((char *)cmdname, + (char *)args, + NULL, + NULL, + TRUE, + mode == _P_DETACH ? DETACHED_PROCESS : 0, + (LPVOID)envp, + NULL, + &StartupInfo, + &ProcessInformation); + if (StartupInfo.lpReserved2) + { + free(StartupInfo.lpReserved2); + } + + if (!bResult) + { + dwError = GetLastError(); + DPRINT("%x\n", dwError); + __set_errno(dwError); + return -1; + } + CloseHandle(ProcessInformation.hThread); + switch(mode) + { + case _P_OVERLAY: + _exit(0); + case _P_WAIT: + WaitForSingleObject(ProcessInformation.hProcess, INFINITE); + GetExitCodeProcess(ProcessInformation.hProcess, &dwExitCode); + CloseHandle(ProcessInformation.hProcess); + return (int)dwExitCode; + case _P_DETACH: + CloseHandle(ProcessInformation.hProcess); + return 0; + } + return (int)ProcessInformation.hProcess; +} + +/* + * @implemented + */ +int _spawnl(int mode, const char *cmdname, const char* arg0, ...) +{ + va_list argp; + char* args; + int ret = -1; + + DPRINT("_spawnl('%s')\n", cmdname); + + va_start(argp, arg0); + args = valisttos(arg0, argp, ' '); + + if (args) + { + ret = do_spawn(mode, cmdname, args, NULL); + free(args); + } + return ret; +} + +/* + * @implemented + */ +int _spawnv(int mode, const char *cmdname, char* const* argv) +{ + char* args; + int ret = -1; + + DPRINT("_spawnv('%s')\n", cmdname); + + args = argvtos(argv, ' '); + + if (args) + { + ret = do_spawn(mode, cmdname, args, NULL); + free(args); + } + return ret; +} + +/* + * @implemented + */ +int _spawnle(int mode, const char *cmdname, const char* arg0, ... /*, NULL, const char* const* envp*/) +{ + va_list argp; + char* args; + char* envs; + char* const* ptr; + int ret = -1; + + DPRINT("_spawnle('%s')\n", cmdname); + + va_start(argp, arg0); + args = valisttos(arg0, argp, ' '); + do + { + ptr = (char* const*)va_arg(argp, char*); + } + while (ptr != NULL); + ptr = (char* const*)va_arg(argp, char*); + envs = argvtos(ptr, 0); + if (args) + { + ret = do_spawn(mode, cmdname, args, envs); + free(args); + } + if (envs) + { + free(envs); + } + return ret; + +} + +/* + * @implemented + */ +int _spawnve(int mode, const char *cmdname, char* const* argv, char* const* envp) +{ + char *args; + char *envs; + int ret = -1; + + DPRINT("_spawnve('%s')\n", cmdname); + + args = argvtos(argv, ' '); + envs = argvtos(envp, 0); + + if (args) + { + ret = do_spawn(mode, cmdname, args, envs); + free(args); + } + if (envs) + { + free(envs); + } + return ret; +} + +/* + * @implemented + */ +int _spawnvp(int mode, const char* cmdname, char* const* argv) +{ + char pathname[FILENAME_MAX]; + + DPRINT("_spawnvp('%s')\n", cmdname); + + return _spawnv(mode, find_exec(cmdname, pathname), argv); +} + +/* + * @implemented + */ +int _spawnlp(int mode, const char* cmdname, const char* arg0, .../*, NULL*/) +{ + va_list argp; + char* args; + int ret = -1; + char pathname[FILENAME_MAX]; + + DPRINT("_spawnlp('%s')\n", cmdname); + + va_start(argp, arg0); + args = valisttos(arg0, argp, ' '); + if (args) + { + ret = do_spawn(mode, find_exec(cmdname, pathname), args, NULL); + free(args); + } + return ret; +} + + +/* + * @implemented + */ +int _spawnlpe(int mode, const char* cmdname, const char* arg0, .../*, NULL, const char* const* envp*/) +{ + va_list argp; + char* args; + char* envs; + char* const * ptr; + int ret = -1; + char pathname[FILENAME_MAX]; + + DPRINT("_spawnlpe('%s')\n", cmdname); + + va_start(argp, arg0); + args = valisttos(arg0, argp, ' '); + do + { + ptr = (char* const*)va_arg(argp, char*); + } + while (ptr != NULL); + ptr = (char* const*)va_arg(argp, char*); + envs = argvtos(ptr, 0); + if (args) + { + ret = do_spawn(mode, find_exec(cmdname, pathname), args, envs); + free(args); + } + if (envs) + { + free(envs); + } + return ret; +} + +/* + * @implemented + */ +int _spawnvpe(int mode, const char* cmdname, char* const* argv, char* const* envp) +{ + char pathname[FILENAME_MAX]; + + DPRINT("_spawnvpe('%s')\n", cmdname); + + return _spawnve(mode, find_exec(cmdname, pathname), argv, envp); +} + +/* + * @implemented + */ +int _execl(const char* cmdname, const char* arg0, ...) +{ + char* args; + va_list argp; + int ret = -1; + + DPRINT("_execl('%s')\n", cmdname); + + va_start(argp, arg0); + args = valisttos(arg0, argp, ' '); + + if (args) + { + ret = do_spawn(P_OVERLAY, cmdname, args, NULL); + free(args); + } + return ret; +} + +/* + * @implemented + */ +int _execv(const char* cmdname, char* const* argv) +{ + DPRINT("_execv('%s')\n", cmdname); + return _spawnv(P_OVERLAY, cmdname, argv); +} + +/* + * @implemented + */ +int _execle(const char* cmdname, const char* arg0, ... /*, NULL, char* const* envp */) +{ + va_list argp; + char* args; + char* envs; + char* const* ptr; + int ret = -1; + + DPRINT("_execle('%s')\n", cmdname); + + va_start(argp, arg0); + args = valisttos(arg0, argp, ' '); + do + { + ptr = (char* const*)va_arg(argp, char*); + } + while (ptr != NULL); + ptr = (char* const*)va_arg(argp, char*); + envs = argvtos(ptr, 0); + if (args) + { + ret = do_spawn(P_OVERLAY, cmdname, args, envs); + free(args); + } + if (envs) + { + free(envs); + } + return ret; +} + +/* + * @implemented + */ +int _execve(const char* cmdname, char* const* argv, char* const* envp) +{ + DPRINT("_execve('%s')\n", cmdname); + return _spawnve(P_OVERLAY, cmdname, argv, envp); +} + +/* + * @implemented + */ +int _execlp(const char* cmdname, const char* arg0, ...) +{ + char* args; + va_list argp; + int ret = -1; + char pathname[FILENAME_MAX]; + + DPRINT("_execlp('%s')\n", cmdname); + + va_start(argp, arg0); + args = valisttos(arg0, argp, ' '); + + if (args) + { + ret = do_spawn(P_OVERLAY, find_exec(cmdname, pathname), args, NULL); + free(args); + } + return ret; +} + +/* + * @implemented + */ +int _execvp(const char* cmdname, char* const* argv) +{ + DPRINT("_execvp('%s')\n", cmdname); + return _spawnvp(P_OVERLAY, cmdname, argv); +} + +/* + * @implemented + */ +int _execlpe(const char* cmdname, const char* arg0, ... /*, NULL, char* const* envp */) +{ + va_list argp; + char* args; + char* envs; + char* const* ptr; + int ret = -1; + char pathname[FILENAME_MAX]; + + DPRINT("_execlpe('%s')\n", cmdname); + + va_start(argp, arg0); + args = valisttos(arg0, argp, ' '); + do + { + ptr = (char* const*)va_arg(argp, char*); + } + while (ptr != NULL); + ptr = (char* const*)va_arg(argp, char*); + envs = argvtos(ptr, 0); + if (args) + { + ret = do_spawn(P_OVERLAY, find_exec(cmdname, pathname), args, envs); + free(args); + } + if (envs) + { + free(envs); + } + return ret; +} + +/* + * @implemented + */ +int _execvpe(const char* cmdname, char* const* argv, char* const* envp) +{ + DPRINT("_execvpe('%s')\n", cmdname); + return _spawnvpe(P_OVERLAY, cmdname, argv, envp); +} diff --git a/reactos/lib/crt/process/procid.c b/reactos/lib/crt/process/procid.c new file mode 100644 index 00000000000..87c145828c6 --- /dev/null +++ b/reactos/lib/crt/process/procid.c @@ -0,0 +1,11 @@ +#include "precomp.h" +#include + +/* + * @implemented + */ +int _getpid (void) +{ + return (int)GetCurrentProcessId(); +} + diff --git a/reactos/lib/crt/process/thread.c b/reactos/lib/crt/process/thread.c new file mode 100644 index 00000000000..1c601745c3f --- /dev/null +++ b/reactos/lib/crt/process/thread.c @@ -0,0 +1,26 @@ +#include "precomp.h" +#include +#include +#include + +#if 0 +/* + * @unimplemented + */ +unsigned long _beginthread( + void (__cdecl *start_address)(void*), + unsigned stack_size, + void* arglist) +{ + __set_errno ( ENOSYS ); + return (unsigned long)-1; +} +#endif +/* + * @unimplemented + */ +void _endthread(void) +{ +} + +/* EOF */ diff --git a/reactos/lib/crt/process/threadid.c b/reactos/lib/crt/process/threadid.c new file mode 100644 index 00000000000..5d225c73f33 --- /dev/null +++ b/reactos/lib/crt/process/threadid.c @@ -0,0 +1,19 @@ +#include "precomp.h" +#include + + +/* + * @implemented + */ +unsigned long __threadid (void) +{ + return GetCurrentThreadId(); +} + +/* + * @implemented + */ +void *__threadhandle(void) +{ + return GetCurrentThread(); +} diff --git a/reactos/lib/crt/process/threadx.c b/reactos/lib/crt/process/threadx.c new file mode 100644 index 00000000000..d86d62e27e7 --- /dev/null +++ b/reactos/lib/crt/process/threadx.c @@ -0,0 +1,48 @@ +#include "precomp.h" +#include +#include +#include + + +/* + * @unimplemented + */ +unsigned long _beginthreadex( + void* security, + unsigned stack_size, + unsigned (__stdcall *start_address)(void*), + void* arglist, + unsigned initflag, + unsigned* thrdaddr) +{ + HANDLE NewThread; + + /* + * Just call the API function. Any CRT specific processing is done in + * DllMain DLL_THREAD_ATTACH + */ + NewThread = CreateThread ( security, stack_size, + (LPTHREAD_START_ROUTINE)start_address, + arglist, initflag, (PULONG)thrdaddr ); + if (NULL == NewThread) + { + _dosmaperr( GetLastError() ); + } + + return (unsigned long) NewThread; +} + + +/* + * @implemented + */ +void _endthreadex(unsigned retval) +{ + /* + * Just call the API function. Any CRT specific processing is done in + * DllMain DLL_THREAD_DETACH + */ + ExitThread(retval); +} + +/* EOF */ diff --git a/reactos/lib/crt/search/lfind.c b/reactos/lib/crt/search/lfind.c new file mode 100644 index 00000000000..e89efa63c9b --- /dev/null +++ b/reactos/lib/crt/search/lfind.c @@ -0,0 +1,21 @@ +#include +#include + + +/* + * @implemented + */ +void *_lfind(const void *key, const void *base, size_t *nelp, + size_t width, int (*compar)(const void *, const void *)) +{ + char* char_base = (char*)base; + int i; + + for (i = 0; i < *nelp; i++) { + if (compar(key, char_base) == 0) + return char_base; + char_base += width; + } + return NULL; +} + diff --git a/reactos/lib/crt/search/lsearch.c b/reactos/lib/crt/search/lsearch.c new file mode 100644 index 00000000000..a8465ae7853 --- /dev/null +++ b/reactos/lib/crt/search/lsearch.c @@ -0,0 +1,24 @@ +#include +#include +#include + +/* + * @implemented + */ +void *_lsearch(const void *key, void *base, size_t *nelp, size_t width, + int (*compar)(const void *, const void *)) +{ + void *ret_find = _lfind(key,base,nelp,width,compar); + + if (ret_find != NULL) + return ret_find; + +#ifdef __GNUC__ + memcpy(base + (*nelp*width), key, width); +#else + memcpy((int*)base + (*nelp*width), key, width); +#endif + (*nelp)++; + return base; +} + diff --git a/reactos/lib/crt/setjmp/i386/setjmp.s b/reactos/lib/crt/setjmp/i386/setjmp.s new file mode 100644 index 00000000000..7cf257cca24 --- /dev/null +++ b/reactos/lib/crt/setjmp/i386/setjmp.s @@ -0,0 +1,111 @@ +/* $Id$ + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * PURPOSE: Implementation of _setjmp/longjmp + * FILE: lib/msvcrt/i386/setjmp.s + * PROGRAMMER: Ge van Geldorp (ge@gse.nl) + * NOTES: Implementation is not complete, see Wine source for a more + * complete implementation + */ + +#define JB_BP 0 +#define JB_BX 1 +#define JB_DI 2 +#define JB_SI 3 +#define JB_SP 4 +#define JB_IP 5 + +#define PCOFF 0 + +#define JMPBUF 4 + +/* + * int + * _setjmp(jmp_buf env); + * + * Parameters: + * [ESP+04h] - jmp_buf env + * Registers: + * None + * Returns: + * 0 + * Notes: + * Sets up the jmp_buf + */ +.globl __setjmp +__setjmp: + xorl %eax, %eax + movl JMPBUF(%esp), %edx + + /* Save registers. */ + movl %ebp, (JB_BP*4)(%edx) /* Save caller's frame pointer. */ + movl %ebx, (JB_BX*4)(%edx) + movl %edi, (JB_DI*4)(%edx) + movl %esi, (JB_SI*4)(%edx) + leal JMPBUF(%esp), %ecx /* Save SP as it will be after we return. */ + movl %ecx, (JB_SP*4)(%edx) + movl PCOFF(%esp), %ecx /* Save PC we are returning to now. */ + movl %ecx, (JB_IP*4)(%edx) + ret + +/* + * int + * _setjmp3(jmp_buf env, int nb_args, ...); + * + * Parameters: + * [ESP+04h] - jmp_buf env + * Registers: + * None + * Returns: + * 0 + * Notes: + * Sets up the jmp_buf + */ +.globl __setjmp3 +__setjmp3: + xorl %eax, %eax + movl JMPBUF(%esp), %edx + + /* Save registers. */ + movl %ebp, (JB_BP*4)(%edx) /* Save caller's frame pointer. */ + movl %ebx, (JB_BX*4)(%edx) + movl %edi, (JB_DI*4)(%edx) + movl %esi, (JB_SI*4)(%edx) + leal JMPBUF(%esp), %ecx /* Save SP as it will be after we return. */ + movl %ecx, (JB_SP*4)(%edx) + movl PCOFF(%esp), %ecx /* Save PC we are returning to now. */ + movl %ecx, (JB_IP*4)(%edx) + ret + +#define VAL 8 + +/* + * void + * longjmp(jmp_buf env, int value); + * + * Parameters: + * [ESP+04h] - jmp_buf setup by _setjmp + * [ESP+08h] - int value to return + * Registers: + * None + * Returns: + * Doesn't return + * Notes: + * Non-local goto + */ +.globl _longjmp +_longjmp: + movl JMPBUF(%esp), %ecx /* User's jmp_buf in %ecx. */ + + movl VAL(%esp), %eax /* Second argument is return value. */ + /* Save the return address now. */ + movl (JB_IP*4)(%ecx), %edx + /* Restore registers. */ + movl (JB_BP*4)(%ecx), %ebp + movl (JB_BX*4)(%ecx), %ebx + movl (JB_DI*4)(%ecx), %edi + movl (JB_SI*4)(%ecx), %esi + movl (JB_SP*4)(%ecx), %esp + /* Jump to saved PC. */ + jmp *%edx diff --git a/reactos/lib/crt/signal/signal.c b/reactos/lib/crt/signal/signal.c new file mode 100644 index 00000000000..6272b2f6854 --- /dev/null +++ b/reactos/lib/crt/signal/signal.c @@ -0,0 +1,113 @@ +#include +#include +#include +#include +#include + +void _default_handler(int signal); + +typedef struct _sig_element +{ + int signal; + char *signame; + _p_sig_fn_t handler; +} sig_element; + +static sig_element signal_list[SIGMAX] = + { + { 0, "Signal 0", SIG_DFL }, + { SIGABRT, "Aborted",SIG_DFL }, + { SIGFPE, "Erroneous arithmetic operation",SIG_DFL }, + { SIGILL, "Illegal instruction",SIG_DFL }, + { SIGINT, "Interrupt",SIG_DFL }, + { SIGSEGV, "Invalid access to storage",SIG_DFL }, + { SIGTERM, "Terminated",SIG_DFL }, + { SIGHUP, "Hangup",SIG_DFL }, + { SIGQUIT, "Quit",SIG_DFL }, + { SIGPIPE, "Broken pipe",SIG_DFL }, + { SIGKILL, "Killed",SIG_DFL }, + { SIGALRM, "Alarm clock",SIG_DFL }, + { 0, "Stopped (signal)",SIG_DFL }, + { 0, "Stopped",SIG_DFL }, + { 0, "Continued",SIG_DFL }, + { 0, "Child exited",SIG_DFL }, + { 0, "Stopped (tty input)",SIG_DFL }, + { 0, "Stopped (tty output)",SIG_DFL }, + { 0, NULL, SIG_DFL } + }; + +int nsignal = 21; + +/* + * @implemented + */ +_p_sig_fn_t signal(int sig, _p_sig_fn_t func) +{ + _p_sig_fn_t temp; + int i; + if(sig <= 0 || sig > SIGMAX || sig == SIGKILL) + { + __set_errno(EINVAL); + return SIG_ERR; + } +// check with IsBadCodePtr + + if ( func < (_p_sig_fn_t)4096 ) { + __set_errno(EINVAL); + return SIG_ERR; + } + + for(i=0;i SIGMAX) + return -1; + for(i=0;i + +/* + * @unimplemented + */ +void **__pxcptinfoptrs (void) +{ + return NULL; +} diff --git a/reactos/lib/crt/stdio/allocfil.c b/reactos/lib/crt/stdio/allocfil.c new file mode 100644 index 00000000000..d1e08f2f2c7 --- /dev/null +++ b/reactos/lib/crt/stdio/allocfil.c @@ -0,0 +1,101 @@ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#include +#include +#include +#include + + +FILE * __alloc_file(void); + +char __validfp (FILE *f) +{ + if ( (unsigned int)f < 256) + return FALSE; + + if( f == NULL || (int)f== -1 ) + return FALSE; + + return TRUE; +} + +/* A FILE* is considered "free" if its flag is zero. */ + +FILE *__alloc_file(void) +{ + __file_rec *fr = __file_rec_list; + __file_rec **last_fr = &__file_rec_list; + FILE *rv=0; + int i; + + /* Try to find an empty slot */ + while (fr) + { + last_fr = &(fr->next); + + /* If one of the existing slots is available, return it */ + for (i=0; icount; i++) + { + if (fr->files[i]->_flag == 0) + { + return fr->files[i]; + } + } + + /* If this one is full, go to the next */ + if (fr->count == __FILE_REC_MAX) + fr = fr->next; + else + /* it isn't full, we can add to it */ + break; + } + if (!fr) + { + /* add another one to the end, make it empty */ + fr = *last_fr = (__file_rec *)malloc(sizeof(__file_rec)); + if (fr == 0) + return 0; + fr->next = 0; + fr->count = 0; + } + /* fr is a pointer to a rec with empty slots in it */ + rv = fr->files[fr->count] = (FILE *)malloc(sizeof(FILE)); + if (rv == 0) + return 0; + memset(rv, 0, sizeof(FILE)); + fr->count ++; + return rv; +} + + +/* + * @implemented + */ +int _fcloseall( void ) +{ + __file_rec *fr = __file_rec_list; + __file_rec **last_fr = &__file_rec_list; + + int total_closed = 0; + int i = 0; + + /* Try to find an empty slot */ + while (fr) + { + last_fr = &(fr->next); + + /* If one of the existing slots is available, return it */ + for (i=0; icount; i++) + if (fr->files[i]->_flag != 0) { + fclose(fr->files[i]); + total_closed++; + } + + /* If this one is full, go to the next */ + if (fr->count == __FILE_REC_MAX) + fr = fr->next; + else + /* it isn't full, we can add to it */ + break; + } + return total_closed; +} diff --git a/reactos/lib/crt/stdio/clearerr.c b/reactos/lib/crt/stdio/clearerr.c new file mode 100644 index 00000000000..29ff9120475 --- /dev/null +++ b/reactos/lib/crt/stdio/clearerr.c @@ -0,0 +1,22 @@ +/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ +#include +#include +#include + +#ifdef clearerr +#undef clearerr +void clearerr(FILE *stream); +#endif + +/* + * @implemented + */ +void +clearerr(FILE *f) +{ + if (!__validfp (f)) { + __set_errno (EINVAL); + return; + } + f->_flag &= ~(_IOERR|_IOEOF); +} diff --git a/reactos/lib/crt/stdio/fclose.c b/reactos/lib/crt/stdio/fclose.c new file mode 100644 index 00000000000..f39c21f1a91 --- /dev/null +++ b/reactos/lib/crt/stdio/fclose.c @@ -0,0 +1,54 @@ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ + +#include +#include +#include +#include +#include +#include +#include + +// changed check for writable stream + + +/* + * @implemented + */ +int +fclose(FILE *f) +{ + int r = 0; + + if (f == NULL) { + __set_errno (EINVAL); + return EOF; + } + + + +// flush only if stream was opened for writing + if ( !(f->_flag&_IOSTRG) ) { + if ( OPEN4WRITING(f) ) + r = fflush(f); + + if (_close(fileno(f)) < 0) + r = EOF; + if (f->_flag&_IOMYBUF) + free(f->_base); + +// Kernel might do this later + if (f->_flag & _IORMONCL && f->_name_to_remove) + { + remove(f->_name_to_remove); + free(f->_name_to_remove); + f->_name_to_remove = 0; + } + } + f->_cnt = 0; + f->_base = 0; + f->_ptr = 0; + f->_bufsiz = 0; + f->_flag = 0; + f->_file = -1; + return r; +} diff --git a/reactos/lib/crt/stdio/fdopen.c b/reactos/lib/crt/stdio/fdopen.c new file mode 100644 index 00000000000..f6d44ace5b4 --- /dev/null +++ b/reactos/lib/crt/stdio/fdopen.c @@ -0,0 +1,57 @@ +#include +#include + +FILE* __alloc_file(void); + + +/* + * @implemented + */ +FILE* _fdopen(int handle, char* mode) +{ + FILE* file; + int rw; + + if (handle == 0) + return stdin; + + if (handle == 1) + return stdout; + + if (handle == 2) + return stderr; + + if (handle == 3) + return stdaux; + + if (handle == 4) + return stdprn; + + file = __alloc_file(); + if (file == NULL) + return NULL; + file->_file = handle; + + rw = (mode[1] == '+') || (mode[1] && (mode[2] == '+')); + + if (*mode == 'a') + _lseek(handle, 0, SEEK_END); + + file->_cnt = 0; + file->_file = handle; + file->_bufsiz = 0; + +// The mode of the stream must be compatible with the mode of the file descriptor. +// this should be checked. + + if (rw) + file->_flag = _IOREAD | _IOWRT; + else if (*mode == 'r') + file->_flag = _IOREAD; + else + file->_flag = _IOWRT; + + file->_base = file->_ptr = NULL; + + return file; +} diff --git a/reactos/lib/crt/stdio/feof.c b/reactos/lib/crt/stdio/feof.c new file mode 100644 index 00000000000..9591e213705 --- /dev/null +++ b/reactos/lib/crt/stdio/feof.c @@ -0,0 +1,22 @@ +/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ +#include +#include +#include + +#ifdef feof +#undef feof +int feof(FILE *stream); +#endif + +/* + * @implemented + */ +int feof(FILE *stream) +{ + if (stream == NULL) { + __set_errno (EINVAL); + return EOF; + } + + return stream->_flag & _IOEOF; +} diff --git a/reactos/lib/crt/stdio/ferror.c b/reactos/lib/crt/stdio/ferror.c new file mode 100644 index 00000000000..f9381703ca8 --- /dev/null +++ b/reactos/lib/crt/stdio/ferror.c @@ -0,0 +1,18 @@ +/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ +#include +#include + +#ifdef ferror +#undef ferror +int ferror(FILE *stream); +#endif + +int *_errno(void); + +/* + * @implemented + */ +int ferror(FILE *stream) +{ + return stream->_flag & _IOERR; +} diff --git a/reactos/lib/crt/stdio/fflush.c b/reactos/lib/crt/stdio/fflush.c new file mode 100644 index 00000000000..e70e4cf41ef --- /dev/null +++ b/reactos/lib/crt/stdio/fflush.c @@ -0,0 +1,119 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: lib/msvcrt/stdio/fflush.c + * PURPOSE: Checks for keyboard hits + * PROGRAMER: Boudewijn Dekker + * UPDATE HISTORY: + * 28/12/98: Created + */ +/* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ + +#include +#include +#include +#include +#include +#include +#include + + +/* + * @implemented + */ +int fflush(FILE *f) +{ + char *base; + int n, rn; + + + + if (f == NULL) + { + int e = *_errno(); + + __set_errno(0); + _fwalk((void (*)(FILE *))fflush); + if (*_errno()) + return EOF; + __set_errno(e); + return 0; + } + + +// nothing to do if stream can not be written to + + if ( !OPEN4WRITING(f) ) { + __set_errno (EINVAL); + return 0; + } + +// discard any unget characters + + f->_flag &= ~_IOUNGETC; + + +// check for buffered dirty block + + if ( (f->_flag&(_IODIRTY|_IONBF)) ==_IODIRTY && f->_base != NULL) + { + + base = f->_base; + + +// if the buffer is read ahead and dirty we will flush it entirely +// else the buffer is appended to the file to the extend it has valid bytes + + if ( (f->_flag & _IOAHEAD) == _IOAHEAD ) + rn = n = f->_ptr - base + f->_cnt; + else + rn = n = f->_ptr - base; + + f->_ptr = base; + + if ((f->_flag & _IOFBF) == _IOFBF) { + if ( (f->_flag & _IOAHEAD) == _IOAHEAD ) + _lseek(fileno(f),-rn, SEEK_CUR); + } + + f->_flag &= ~_IOAHEAD; + + + f->_cnt = (f->_flag&(_IO_LBF|_IONBF)) ? 0 : f->_bufsiz; + +// how can write return less than rn without being on error ??? + +// possibly commit the flushed data +// better open the file in write through mode + + while (rn > 0) { + n = _write(fileno(f), base, rn); + if (n <= 0) { + f->_flag |= _IOERR; + return EOF; + } + rn -= n; + base += n; + }; + f->_flag &= ~_IODIRTY; + +// commit flushed data +// _commit(fileno(f)); + } + if (OPEN4READING(f) && OPEN4WRITING(f) ) + { + f->_cnt = 0; + f->_ptr = f->_base; + } + return 0; +} + +/* + * @implemented + */ +int _flushall( void ) +{ + return fflush(NULL); +} diff --git a/reactos/lib/crt/stdio/fgetc.c b/reactos/lib/crt/stdio/fgetc.c new file mode 100644 index 00000000000..e26fe17615d --- /dev/null +++ b/reactos/lib/crt/stdio/fgetc.c @@ -0,0 +1,29 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: lib/msvcrt/stdio/fgetc.c + * PURPOSE: Get a character string from stdin + * PROGRAMER: Boudewijn Dekker + * UPDATE HISTORY: + * 28/12/98: Appropriated for Reactos + 25/02/99: Added fgetwc + */ +/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ +#include +#include + +/* + * @implemented + */ +int fgetc(FILE *f) +{ + return getc(f); +} + +/* + * @implemented + */ +wint_t fgetwc(FILE *f) +{ + return getwc(f); +} diff --git a/reactos/lib/crt/stdio/fgetchar.c b/reactos/lib/crt/stdio/fgetchar.c new file mode 100644 index 00000000000..7dd752a82d5 --- /dev/null +++ b/reactos/lib/crt/stdio/fgetchar.c @@ -0,0 +1,38 @@ +/* $Id$ + * + * ReactOS msvcrt library + * + * fgetchar.c + * + * Copyright (C) 2002 Robert Dickenson + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include +#include + +int _fgetchar(void) +{ + return getc(stdin); +} + +/* + * @implemented + */ +wint_t _fgetwchar(void) +{ + return getwc(stdin); +} diff --git a/reactos/lib/crt/stdio/fgetpos.c b/reactos/lib/crt/stdio/fgetpos.c new file mode 100644 index 00000000000..b4b61247e98 --- /dev/null +++ b/reactos/lib/crt/stdio/fgetpos.c @@ -0,0 +1,17 @@ +/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ +#include +#include + +/* + * @implemented + */ +int fgetpos(FILE *stream, fpos_t *pos) +{ + if (stream && pos) + { + *pos = (fpos_t)ftell(stream); + return 0; + } + //__set_errno ( EFAULT ); + return 1; +} diff --git a/reactos/lib/crt/stdio/fgets.c b/reactos/lib/crt/stdio/fgets.c new file mode 100644 index 00000000000..403f4629ea9 --- /dev/null +++ b/reactos/lib/crt/stdio/fgets.c @@ -0,0 +1,47 @@ +/* $Id$ + * + * ReactOS msvcrt library + * + * fgets.c + * + * Copyright (C) 2002 Robert Dickenson + * + * Based on original work Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details + * 28/12/1998: Appropriated for Reactos + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ + +#include +#include + + +char* fgets(char* s, int n, FILE* f) +{ + int c = 0; + char* cs; + + cs = s; + while (--n>0 && (c = getc(f)) != EOF) { + *cs++ = c; + if (c == '\n') + break; + } + if (c == EOF && cs == s) + return NULL; + *cs++ = '\0'; + return s; +} diff --git a/reactos/lib/crt/stdio/fgetws.c b/reactos/lib/crt/stdio/fgetws.c new file mode 100644 index 00000000000..0f2dae645dd --- /dev/null +++ b/reactos/lib/crt/stdio/fgetws.c @@ -0,0 +1,58 @@ +/* $Id$ + * + * ReactOS msvcrt library + * + * fgets.c + * + * Copyright (C) 2002 Robert Dickenson + * + * Based on original work Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details + * 28/12/1998: Appropriated for Reactos + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ + +#include +#include + + +//#include +#ifndef WEOF +#define WEOF (wchar_t)(0xFFFF) +#endif + +wchar_t* fgetws(wchar_t* s, int n, FILE* f) +{ + wchar_t c = 0; + wchar_t* cs; + + cs = s; + //while (--n > 0 && (c = getwc(f)) != WEOF) { + while (n > 0) { + c = getwc(f); + if (c == WEOF) + break; + n--; + *cs++ = c; + if (c == L'\n') + break; + } + if (c == WEOF && cs == s) { + return NULL; + } + *cs++ = L'\0'; + return s; +} diff --git a/reactos/lib/crt/stdio/filbuf.c b/reactos/lib/crt/stdio/filbuf.c new file mode 100644 index 00000000000..64b2134f5c3 --- /dev/null +++ b/reactos/lib/crt/stdio/filbuf.c @@ -0,0 +1,125 @@ +/* Copyright (C) 1997 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ + +#include +#include +#include +#include +#include +#include +#include +#include + +int _readcnv(int fn, void* buf, size_t siz); + +/* + * @implemented + */ +int _filbuf(FILE* f) +{ + int size; + char c; + + if ( !OPEN4READING(f)) { + __set_errno (EINVAL); + return EOF; + } + if (f->_flag&(_IOSTRG|_IOEOF)) + return EOF; + f->_flag &= ~_IOUNGETC; + + if (f->_base == NULL && (f->_flag & _IONBF) == 0) { + size = 4096; + if ((f->_base = malloc(size+1)) == NULL) { + // error ENOMEM + f->_flag |= _IONBF; + f->_flag &= ~(_IOFBF|_IO_LBF); + } else { + f->_flag |= _IOMYBUF; + f->_bufsiz = size; + } + } + if (f->_flag&_IONBF) + f->_base = &c; + + // flush stdout before reading from stdin + if (f == stdin) { + if (stdout->_flag&_IO_LBF) + fflush(stdout); + if (stderr->_flag&_IO_LBF) + fflush(stderr); + } + + // if we have a dirty stream we flush it + if ((f->_flag &_IODIRTY) == _IODIRTY) + fflush(f); + + + + f->_cnt = _read(fileno(f), f->_base, f->_flag & _IONBF ? 1 : f->_bufsiz ); + f->_flag |= _IOAHEAD; + + if(__is_text_file(f) && f->_cnt>0) + { + /* truncate text file at Ctrl-Z */ + char *cz=memchr(f->_base, 0x1A, f->_cnt); + if(cz) + { + int newcnt = cz - f->_base; + lseek(fileno(f), -(f->_cnt - newcnt), SEEK_CUR); + f->_cnt = newcnt; + } + } + + f->_ptr = f->_base; + + if (f->_flag & _IONBF) + f->_base = NULL; // statically allocated buffer for sprintf + + +//check for error + if (f->_cnt <= 0) { + if (f->_cnt == 0) { + f->_flag |= _IOEOF; + } else + f->_flag |= _IOERR; + f->_cnt = 0; + +// FIXME should set errno + + return EOF; + } + + f->_cnt--; + + return *f->_ptr++ & 0377; +} + +wint_t _filwbuf(FILE *fp) +{ + return (wint_t )_filbuf(fp); +} + +// convert the carriage return line feed pairs +/* +int _readcnv(int fn, void *buf, size_t siz ) +{ + char *bufp = (char *)buf; + int _bufsiz = siz; + int cr = 0; + int n; + + n = _read(fn, buf, siz ); + + while (_bufsiz > 0) { + if (*bufp == '\r') + cr++; + else if ( cr != 0 ) + *bufp = *(bufp + cr); + bufp++; + _bufsiz--; + } + return n + cr; +} + */ diff --git a/reactos/lib/crt/stdio/fileno.c b/reactos/lib/crt/stdio/fileno.c new file mode 100644 index 00000000000..9c6900ed71b --- /dev/null +++ b/reactos/lib/crt/stdio/fileno.c @@ -0,0 +1,17 @@ +#include + +#if 0 +#undef fileno +int fileno(FILE *f) +{ + return f->_file; +} +#endif + +/* + * @implemented + */ +int _fileno(FILE *f) +{ + return f->_file; +} diff --git a/reactos/lib/crt/stdio/flsbuf.c b/reactos/lib/crt/stdio/flsbuf.c new file mode 100644 index 00000000000..2ca113c15be --- /dev/null +++ b/reactos/lib/crt/stdio/flsbuf.c @@ -0,0 +1,160 @@ +/* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ + +#include +#include +#include +#include +#include +#include +#include + + +int cntcr(char* bufp, int bufsiz); +int convert(char* endp, int bufsiz, int n); +int _writecnv(int fn, void* buf, size_t bufsiz); + + +/* + * @implemented + */ +int _flsbuf(int c, FILE* f) +{ + char* base; + int n, rn; + char c1; + int size; + + if (!OPEN4WRITING(f)) { + __set_errno(EINVAL); + return EOF; + } + + // no file associated with buffer, this is a memory stream + if (fileno(f) == -1) { + return c; + } + + /* if the buffer is not yet allocated, allocate it */ + if ((base = f->_base) == NULL && (f->_flag & _IONBF) == 0) { + size = 4096; + if ((f->_base = base = malloc(size)) == NULL) { + f->_flag |= _IONBF; + f->_flag &= ~(_IOFBF|_IO_LBF); + } else { + f->_flag |= _IOMYBUF; + f->_cnt = f->_bufsiz = size; + f->_ptr = base; + rn = 0; + if (f == stdout && isatty(fileno(stdout))) { + f->_flag |= _IO_LBF; + } + } + } + + if (f->_flag & _IO_LBF) { + /* in line-buffering mode we get here on each character */ + *f->_ptr++ = c; + rn = f->_ptr - base; + if (c == '\n' || rn >= f->_bufsiz) { + /* time for real flush */ + f->_ptr = base; + f->_cnt = 0; + } else { + /* we got here because _cnt is wrong, so fix it */ + /* Negative _cnt causes all output functions to call */ + /* _flsbuf for each character, thus realizing line-buffering */ + f->_cnt = -rn; + return c; + } + } else if (f->_flag & _IONBF) { + c1 = c; + rn = 1; + base = &c1; + f->_cnt = 0; + } else { /* _IOFBF */ + rn = f->_ptr - base; + f->_ptr = base; + if ((f->_flag & _IOAHEAD) == _IOAHEAD) + _lseek(fileno(f), -(rn+f->_cnt), SEEK_CUR); + f->_cnt = f->_bufsiz; + f->_flag &= ~_IOAHEAD; + } + f->_flag &= ~_IODIRTY; + while (rn > 0) { + n = _write(fileno(f), base, rn); + if (n <= 0) { + f->_flag |= _IOERR; + return EOF; + } + rn -= n; + base += n; + } + if ((f->_flag & (_IO_LBF|_IONBF)) == 0) { + f->_cnt--; + *f->_ptr++ = c; + f->_flag |= _IODIRTY; + } + return c; +} + +wint_t _flswbuf(wchar_t c, FILE* fp) +{ + int result; + + result = _flsbuf((int)c, fp); + if (result == EOF) + return WEOF; + return (wint_t)result; +} + +int _writecnv(int fn, void* buf, size_t siz) +{ + char* bufp = (char*)buf; + int bufsiz = siz; + char* tmp; + int cr1 = 0; + int cr2 = 0; + int n; + + cr1 = cntcr(bufp, bufsiz); + tmp = malloc(cr1); + memcpy(tmp, bufp + bufsiz - cr1, cr1); + cr2 = cntcr(tmp, cr1); + convert(bufp, bufsiz - cr2, cr1 - cr2); + n = _write(fn, bufp, bufsiz + cr1); + convert(tmp, cr1, cr2); + n += _write(fn, tmp, cr1 + cr2); + free(tmp); + return n; +} + +int convert(char* endp, int bufsiz, int n) +{ + endp = endp + bufsiz + n; + while (bufsiz > 0) { + *endp = *(endp - n); + if (*endp == '\n') { + *endp--; + n--; + *endp = '\r'; + } + endp--; + bufsiz--; + } + return n; +} + +int cntcr(char* bufp, int bufsiz) +{ + int cr = 0; + + while (bufsiz > 0) { + if (*bufp == '\n') { + cr++; + } + bufp++; + bufsiz--; + } + return cr; +} diff --git a/reactos/lib/crt/stdio/fopen.c b/reactos/lib/crt/stdio/fopen.c new file mode 100644 index 00000000000..eb309c9f798 --- /dev/null +++ b/reactos/lib/crt/stdio/fopen.c @@ -0,0 +1,158 @@ +/* $Id$ + * + * ReactOS msvcrt library + * + * fopen.c + * + * Copyright (C) 2002 Robert Dickenson + * + * Based on original work Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details + * 28/12/1998: Appropriated for Reactos + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ + +#include +#include +#include +#include +#include +#include + +//might change fopen(file,mode) -> fsopen(file,mode,_SH_DENYNO); + +FILE* __alloc_file(void); + + +FILE* fopen(const char *file, const char *mode) +{ + FILE *f; + int fd, rw, oflags = 0; + + if (file == 0) + return 0; + if (mode == 0) + return 0; + + f = __alloc_file(); + if (f == NULL) + return NULL; + + rw = (strchr(mode, '+') == NULL) ? 0 : 1; + if (strchr(mode, 'a')) + oflags = O_CREAT | (rw ? O_RDWR : O_WRONLY); + if (strchr(mode, 'r')) + oflags = rw ? O_RDWR : O_RDONLY; + if (strchr(mode, 'w')) + oflags = O_TRUNC | O_CREAT | (rw ? O_RDWR : O_WRONLY); + if (strchr(mode, 't')) + oflags |= O_TEXT; + else if (strchr(mode, 'b')) + oflags |= O_BINARY; + else + oflags |= (__fmode & (O_TEXT|O_BINARY)); + + fd = _open(file, oflags, 0); + if (fd < 0) + return NULL; + +// msvcrt ensures that writes will end up at the end of file in append mode +// we just move the file pointer to the end of file initially + + if (strchr(mode, 'a')) + lseek(fd, 0, SEEK_END); + + f->_cnt = 0; + f->_file = fd; + f->_bufsiz = 0; + if (rw) + f->_flag = _IOREAD | _IOWRT; + else if (strchr(mode, 'r')) + f->_flag = _IOREAD; + else + f->_flag = _IOWRT; + + if (strchr(mode, 't')) + f->_flag |= _IOTEXT; + else if (strchr(mode, 'b')) + f->_flag |= _IOBINARY; + else if (__fmode & O_BINARY) + f->_flag |= _IOBINARY; + + f->_base = f->_ptr = NULL; + return f; +} + +/* + * @implemented + */ +FILE* _wfopen(const wchar_t *file, const wchar_t *mode) +{ + FILE *f; + int fd, rw, oflags = 0; + + if (file == 0) + return 0; + if (mode == 0) + return 0; + + f = __alloc_file(); + if (f == NULL) + return NULL; + + rw = (wcschr(mode, L'+') == NULL) ? 0 : 1; + if (wcschr(mode, L'a')) + oflags = O_CREAT | (rw ? O_RDWR : O_WRONLY); + if (wcschr(mode, L'r')) + oflags = rw ? O_RDWR : O_RDONLY; + if (wcschr(mode, L'w')) + oflags = O_TRUNC | O_CREAT | (rw ? O_RDWR : O_WRONLY); + if (wcschr(mode, L't')) + oflags |= O_TEXT; + else if (wcschr(mode, L'b')) + oflags |= O_BINARY; + else + oflags |= (__fmode & (O_TEXT|O_BINARY)); + + fd = _wopen(file, oflags, 0); + if (fd < 0) + return NULL; + +// msvcrt ensures that writes will end up at the end of file in append mode +// we just move the file pointer to the end of file initially + if (wcschr(mode, 'a')) + lseek(fd, 0, SEEK_END); + + f->_cnt = 0; + f->_file = fd; + f->_bufsiz = 0; + if (rw) + f->_flag = _IOREAD | _IOWRT; + else if (wcschr(mode, L'r')) + f->_flag = _IOREAD; + else + f->_flag = _IOWRT; + + if (wcschr(mode, L't')) + f->_flag |= _IOTEXT; + else if (wcschr(mode, L'b')) + f->_flag |= _IOBINARY; + else if (__fmode & O_BINARY) + f->_flag |= _IOBINARY; + + f->_base = f->_ptr = NULL; + return f; +} diff --git a/reactos/lib/crt/stdio/fprintf.c b/reactos/lib/crt/stdio/fprintf.c new file mode 100644 index 00000000000..a5589b6de6a --- /dev/null +++ b/reactos/lib/crt/stdio/fprintf.c @@ -0,0 +1,62 @@ +/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ +#include +#include +#include + +/* + * @implemented + */ +int +fprintf(register FILE *iop, const char *fmt, ...) +{ + int len; + char localbuf[BUFSIZ]; + va_list a=0; + + + va_start( a, fmt ); + if (iop->_flag & _IONBF) + { + iop->_flag &= ~_IONBF; + iop->_ptr = iop->_base = localbuf; + iop->_bufsiz = BUFSIZ; + len = vfprintf(iop,fmt,a); + fflush(iop); + iop->_flag |= _IONBF; + iop->_base = NULL; + iop->_bufsiz = 0; + iop->_cnt = 0; + } + else + len = vfprintf(iop, fmt, a); + return ferror(iop) ? EOF : len; +} + +/* + * @implemented + */ +int +fwprintf(register FILE *iop, const wchar_t *fmt, ...) +{ + int len; + wchar_t localbuf[BUFSIZ]; + va_list a=0; + + + va_start( a, fmt ); + if (iop->_flag & _IONBF) + { + iop->_flag &= ~_IONBF; + iop->_ptr = iop->_base = (char *)localbuf; + iop->_bufsiz = BUFSIZ; + len = vfwprintf(iop,fmt,a); + fflush(iop); + iop->_flag |= _IONBF; + iop->_base = NULL; + iop->_bufsiz = 0; + iop->_cnt = 0; + } + else + len = vfwprintf(iop, fmt, a); + return ferror(iop) ? EOF : len; +} diff --git a/reactos/lib/crt/stdio/fputc.c b/reactos/lib/crt/stdio/fputc.c new file mode 100644 index 00000000000..c08cccec557 --- /dev/null +++ b/reactos/lib/crt/stdio/fputc.c @@ -0,0 +1,23 @@ +/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ +#include +#include +#include + +/* + * @implemented + */ +int +fputc(int c, FILE *fp) +{ + return putc(c, fp); +} + +/* + * @implemented + */ +wint_t +fputwc(wchar_t c, FILE *fp) +{ + return putwc(c,fp); +} + diff --git a/reactos/lib/crt/stdio/fputchar.c b/reactos/lib/crt/stdio/fputchar.c new file mode 100644 index 00000000000..7faa7be615b --- /dev/null +++ b/reactos/lib/crt/stdio/fputchar.c @@ -0,0 +1,38 @@ +/* $Id$ + * + * ReactOS msvcrt library + * + * fputchar.c + * + * Copyright (C) 2002 Robert Dickenson + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include + + +int _fputchar(int c) +{ + return putc(c, stdout); +} + +/* + * @implemented + */ +int _fputwchar(wchar_t c) +{ + return putwc(c, stdout); +} diff --git a/reactos/lib/crt/stdio/fputs.c b/reactos/lib/crt/stdio/fputs.c new file mode 100644 index 00000000000..de54fd02ebc --- /dev/null +++ b/reactos/lib/crt/stdio/fputs.c @@ -0,0 +1,95 @@ +/* $Id$ + * + * ReactOS msvcrt library + * + * fputs.c + * + * Copyright (C) 2002 Robert Dickenson + * + * Based on original work Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details + * 28/12/1998: Appropriated for Reactos + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ + +#include "precomp.h" +#include +#include +#include + +int +fputs(const char *s, FILE *f) +{ + int r = 0; + int c; + int unbuffered; + char localbuf[BUFSIZ]; + + unbuffered = f->_flag & _IONBF; + if (unbuffered) + { + f->_flag &= ~_IONBF; + f->_ptr = f->_base = localbuf; + f->_bufsiz = BUFSIZ; + } + + while ((c = *s++)) + r = putc(c, f); + + if (unbuffered) + { + fflush(f); + f->_flag |= _IONBF; + f->_base = NULL; + f->_bufsiz = 0; + f->_cnt = 0; + } + + return(r); +} + +/* + * @implemented + */ +int +fputws(const wchar_t* s, FILE* f) +{ + int r = 0; + int unbuffered; + wchar_t c; + wchar_t localbuf[BUFSIZ]; + + unbuffered = f->_flag & _IONBF; + if (unbuffered) + { + f->_flag &= ~_IONBF; + f->_ptr = f->_base = (char*)localbuf; + f->_bufsiz = BUFSIZ; + } + + while ((c = *s++)) + r = putwc(c, f); + + if (unbuffered) + { + fflush(f); + f->_flag |= _IONBF; + f->_base = NULL; + f->_bufsiz = 0; + f->_cnt = 0; + } + return(r); +} diff --git a/reactos/lib/crt/stdio/fread.c b/reactos/lib/crt/stdio/fread.c new file mode 100644 index 00000000000..8f6136cc629 --- /dev/null +++ b/reactos/lib/crt/stdio/fread.c @@ -0,0 +1,90 @@ +#include +#include +#include +#include +#include + + +/* + * @implemented + */ +size_t fread(void *vptr, size_t size, size_t count, FILE *iop) +{ + unsigned char *ptr = (unsigned char *)vptr; + size_t to_read ,n_read; + int c, copy; + + to_read = size * count; + + if (!OPEN4READING(iop)) + { + __set_errno (EINVAL); + return 0; + } + + if (!__validfp (iop) ) + { + __set_errno (EINVAL); + return 0; + } + if (feof (iop) || ferror (iop)) + return 0; + + if (vptr == NULL || to_read == 0) + return 0; + + if (iop->_base == NULL) + { + int c = _filbuf(iop); + if (c == EOF) + return 0; + *ptr++ = c; + if (--to_read == 0) + return 1; + } + + if (iop->_cnt > 0 && to_read > 0) + { + copy = min(iop->_cnt, to_read); + memcpy(ptr, iop->_ptr, copy); + ptr += copy; + iop->_ptr += copy; + iop->_cnt -= copy; + to_read -= copy; + if (to_read == 0) + return count; + } + + if (to_read > 0) + { + + if (to_read >= iop->_bufsiz) + { + n_read = _read(fileno(iop), ptr, to_read); + if (n_read < 0) + iop->_flag |= _IOERR; + else if (n_read == 0) + iop->_flag |= _IOEOF; + else + to_read -= n_read; + + // the file buffer is empty and there is no read ahead information anymore. + iop->_flag &= ~_IOAHEAD; + } + else + { + c = _filbuf(iop); + if (c != EOF) + { + *ptr++ = c; + to_read--; + copy = min(iop->_cnt, to_read); + memcpy(ptr, iop->_ptr, copy); + iop->_ptr += copy; + iop->_cnt -= copy; + to_read -= copy; + } + } + } + return count - (to_read/size); +} diff --git a/reactos/lib/crt/stdio/freopen.c b/reactos/lib/crt/stdio/freopen.c new file mode 100644 index 00000000000..881e765e889 --- /dev/null +++ b/reactos/lib/crt/stdio/freopen.c @@ -0,0 +1,128 @@ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ + +#include +#include +#include +#include +#include + + +/* + * @implemented + */ +FILE *freopen(const char *file, const char *mode, FILE *f) +{ + int fd, rw, oflags=0; + char tbchar; + + if (file == 0 || mode == 0 || f == 0) + return 0; + + rw = (mode[1] == '+'); + + fclose(f); + + switch (*mode) { + case 'a': + oflags = O_CREAT | (rw ? O_RDWR : O_WRONLY); + break; + case 'r': + oflags = rw ? O_RDWR : O_RDONLY; + break; + case 'w': + oflags = O_TRUNC | O_CREAT | (rw ? O_RDWR : O_WRONLY); + break; + default: + return NULL; + } + if (mode[1] == '+') + tbchar = mode[2]; + else + tbchar = mode[1]; + if (tbchar == 't') + oflags |= O_TEXT; + else if (tbchar == 'b') + oflags |= O_BINARY; + else + oflags |= (__fmode & (O_TEXT|O_BINARY)); + + fd = _open(file, oflags, 0666); + if (fd < 0) + return NULL; + + if (*mode == 'a') + lseek(fd, 0, SEEK_END); + + f->_cnt = 0; + f->_file = fd; + f->_bufsiz = 0; + if (rw) + f->_flag = _IOREAD | _IOWRT; + else if (*mode == 'r') + f->_flag = _IOREAD; + else + f->_flag = _IOWRT; + + f->_base = f->_ptr = NULL; + return f; +} + +/* + * @implemented + */ +FILE *_wfreopen(const wchar_t *file, const wchar_t *mode, FILE *f) +{ + int fd, rw, oflags=0; + wchar_t tbchar; + + if (file == 0 || mode == 0 || f == 0) + return 0; + + rw = (mode[1] == L'+'); + + fclose(f); + + switch (*mode) { + case L'a': + oflags = O_CREAT | (rw ? O_RDWR : O_WRONLY); + break; + case L'r': + oflags = rw ? O_RDWR : O_RDONLY; + break; + case L'w': + oflags = O_TRUNC | O_CREAT | (rw ? O_RDWR : O_WRONLY); + break; + default: + return NULL; + } + if (mode[1] == L'+') + tbchar = mode[2]; + else + tbchar = mode[1]; + if (tbchar == L't') + oflags |= O_TEXT; + else if (tbchar == L'b') + oflags |= O_BINARY; + else + oflags |= (__fmode & (O_TEXT|O_BINARY)); + + fd = _wopen(file, oflags, 0666); + if (fd < 0) + return NULL; + + if (*mode == L'a') + lseek(fd, 0, SEEK_END); + + f->_cnt = 0; + f->_file = fd; + f->_bufsiz = 0; + if (rw) + f->_flag = _IOREAD | _IOWRT; + else if (*mode == L'r') + f->_flag = _IOREAD; + else + f->_flag = _IOWRT; + + f->_base = f->_ptr = NULL; + return f; +} diff --git a/reactos/lib/crt/stdio/fscanf.c b/reactos/lib/crt/stdio/fscanf.c new file mode 100644 index 00000000000..8170ce1603f --- /dev/null +++ b/reactos/lib/crt/stdio/fscanf.c @@ -0,0 +1,65 @@ +/* Copyright (C) 1991 Free Software Foundation, Inc. +This file is part of the GNU C Library. + +The GNU C Library is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +The GNU C 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + + +#include +#include +#include +#include +#include + + +/* Read formatted input from STREAM according to the format string FORMAT. */ +/* VARARGS2 */ +/* + * @implemented + */ +int fscanf(FILE *stream,const char *format, ...) +{ + va_list arg; + int done; + + va_start(arg, format); + done = __vfscanf(stream, format, arg); + va_end(arg); + + return done; +} + +/* + * @implemented + */ +int +fwscanf(FILE *stream, const wchar_t *fmt, ...) +{ + va_list arg; + int done; + char *cf; + int i,len = wcslen(fmt); + + cf = malloc(len+1); + for(i=0;i +#include +#include +#include +#include + + +/* + * @implemented + */ +int fseek(FILE *f, long offset, int ptrname) +{ + long p = -1; /* can't happen? */ + if ( f == NULL ) { + __set_errno (EINVAL); + return -1; + } + + f->_flag &= ~_IOEOF; + if (!OPEN4WRITING(f)) + { + if (f->_base && !(f->_flag & _IONBF)) + { + p = ftell(f); + if (ptrname == SEEK_CUR) + { + offset += p; + ptrname = SEEK_SET; + } + /* check if the target position is in the buffer and + optimize seek by moving inside the buffer */ + if (ptrname == SEEK_SET && (f->_flag & (_IOUNGETC|_IOREAD|_IOWRT )) == 0 + && p-offset <= f->_ptr-f->_base && offset-p <= f->_cnt) + { + f->_ptr+=offset-p; + f->_cnt+=p-offset; + return 0; + } + } + + p = lseek(fileno(f), offset, ptrname); + f->_cnt = 0; + f->_ptr = f->_base; + f->_flag &= ~_IOUNGETC; + } + else + { + p = fflush(f); + return lseek(fileno(f), offset, ptrname) == -1 || p == EOF ? + -1 : 0; + } + return p==-1 ? -1 : 0; +} diff --git a/reactos/lib/crt/stdio/fsetpos.c b/reactos/lib/crt/stdio/fsetpos.c new file mode 100644 index 00000000000..9bb8e56ca27 --- /dev/null +++ b/reactos/lib/crt/stdio/fsetpos.c @@ -0,0 +1,18 @@ +/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ +#include +#include +#include + +/* + * @implemented + */ +int fsetpos(FILE *stream,const fpos_t *pos) +{ + if (stream && pos) + { + fseek(stream, (long)(*pos), SEEK_SET); + return 0; + } + __set_errno(EFAULT); + return -1; +} diff --git a/reactos/lib/crt/stdio/fsopen.c b/reactos/lib/crt/stdio/fsopen.c new file mode 100644 index 00000000000..94d39aa1c90 --- /dev/null +++ b/reactos/lib/crt/stdio/fsopen.c @@ -0,0 +1,183 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: lib/msvcrt/stdio/fsopen.c + * PURPOSE: Checks for keyboard hits + * PROGRAMER: Boudewijn Dekker + * UPDATE HISTORY: + * 28/12/98: Created + */ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ + +#include +#include +#include +#include +#include +#include + + +FILE * __alloc_file(void); + + +/* + * @implemented + */ +FILE* _fsopen(const char *file, const char *mode, int shflag) +{ + FILE *f; + int fd, rw, oflags = 0; + char tbchar; + + int shf; + + if (file == 0) + return 0; + if (mode == 0) + return 0; + + f = __alloc_file(); + if (f == NULL) + return NULL; + + rw = (mode[1] == '+') || (mode[1] && (mode[2] == '+')); + + switch (*mode) + { + case 'a': + oflags = O_CREAT | (rw ? O_RDWR : O_WRONLY); + break; + case 'r': + oflags = rw ? O_RDWR : O_RDONLY; + break; + case 'w': + oflags = O_TRUNC | O_CREAT | (rw ? O_RDWR : O_WRONLY); + break; + default: + return (NULL); + } + if (mode[1] == '+') + tbchar = mode[2]; + else + tbchar = mode[1]; + if (tbchar == 't') + oflags |= O_TEXT; + else if (tbchar == 'b') + oflags |= O_BINARY; + else + oflags |= (__fmode & (O_TEXT|O_BINARY)); + + if ( shflag == _SH_DENYNO ) + shf = _S_IREAD | _S_IWRITE; + else if( shflag == _SH_DENYRD ) + shf = _S_IWRITE; + else if( shflag == _SH_DENYRW ) + shf = 0; + else if( shflag == _SH_DENYWR ) + shf = _S_IREAD; + else + shf = _S_IREAD | _S_IWRITE; + + fd = _open(file, oflags, shf); + if (fd < 0) + return NULL; + +// msvcrt ensures that writes will end up at the end of file in append mode +// we just move the file pointer to the end of file initially + if (*mode == 'a') + lseek(fd, 0, SEEK_END); + + f->_cnt = 0; + f->_file = fd; + f->_bufsiz = 0; + if (rw) + f->_flag = _IOREAD | _IOWRT; + else if (*mode == 'r') + f->_flag = _IOREAD; + else + f->_flag = _IOWRT; + + f->_base = f->_ptr = NULL; + return f; +} + +/* + * @implemented + */ +FILE* _wfsopen(const wchar_t *file, const wchar_t *mode, int shflag) +{ + FILE *f; + int fd, rw, oflags = 0; + wchar_t tbchar; + + int shf; + + if (file == 0) + return 0; + if (mode == 0) + return 0; + + f = __alloc_file(); + if (f == NULL) + return NULL; + + rw = (mode[1] == L'+') || (mode[1] && (mode[2] == L'+')); + + switch (*mode) + { + case L'a': + oflags = O_CREAT | (rw ? O_RDWR : O_WRONLY); + break; + case L'r': + oflags = rw ? O_RDWR : O_RDONLY; + break; + case L'w': + oflags = O_TRUNC | O_CREAT | (rw ? O_RDWR : O_WRONLY); + break; + default: + return (NULL); + } + if (mode[1] == L'+') + tbchar = mode[2]; + else + tbchar = mode[1]; + if (tbchar == L't') + oflags |= O_TEXT; + else if (tbchar == L'b') + oflags |= O_BINARY; + else + oflags |= (__fmode & (O_TEXT|O_BINARY)); + + if ( shflag == _SH_DENYNO ) + shf = _S_IREAD | _S_IWRITE; + else if( shflag == _SH_DENYRD ) + shf = _S_IWRITE; + else if( shflag == _SH_DENYRW ) + shf = 0; + else if( shflag == _SH_DENYWR ) + shf = _S_IREAD; + else + shf = _S_IREAD | _S_IWRITE; + + fd = _wopen(file, oflags, shf); + if (fd < 0) + return NULL; + +// msvcrt ensures that writes will end up at the end of file in append mode +// we just move the file pointer to the end of file initially + if (*mode == L'a') + lseek(fd, 0, SEEK_END); + + f->_cnt = 0; + f->_file = fd; + f->_bufsiz = 0; + if (rw) + f->_flag = _IOREAD | _IOWRT; + else if (*mode == L'r') + f->_flag = _IOREAD; + else + f->_flag = _IOWRT; + + f->_base = f->_ptr = NULL; + return f; +} diff --git a/reactos/lib/crt/stdio/ftell.c b/reactos/lib/crt/stdio/ftell.c new file mode 100644 index 00000000000..93c048c7daf --- /dev/null +++ b/reactos/lib/crt/stdio/ftell.c @@ -0,0 +1,48 @@ +/* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ + +#include +#include +#include +#include +#include + + +/* + * @implemented + */ +long ftell(FILE *f) +{ + long tres; + int adjust=0; + + if (!f) + { + __set_errno(EBADF); + return -1; + } + + if (f->_cnt < 0) + f->_cnt = 0; + else if (f->_flag&(_IOWRT)) + { + if (f->_base && (f->_flag&_IONBF)==0) + adjust = f->_ptr - f->_base; + } + else if (f->_flag&_IOREAD) + { + adjust = - f->_cnt; + } + else + return -1; + + tres = lseek(fileno(f), 0L, SEEK_CUR); + if (tres<0) + return tres; + tres += adjust; + + //f->_cnt = f->_bufsiz - tres; + //f->_ptr = f->_base + tres; + + return tres; +} diff --git a/reactos/lib/crt/stdio/fwalk.c b/reactos/lib/crt/stdio/fwalk.c new file mode 100644 index 00000000000..f1e117ffd1b --- /dev/null +++ b/reactos/lib/crt/stdio/fwalk.c @@ -0,0 +1,18 @@ +/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ +#include +#include + + +// not exported by msvcrt or crtdll +__file_rec *__file_rec_list; + +void _fwalk(void (*func)(FILE *)) +{ + __file_rec *fr; + int i; + + for (fr=__file_rec_list; fr; fr=fr->next) + for (i=0; icount; i++) + if (fr->files[i]->_flag) + func(fr->files[i]); +} diff --git a/reactos/lib/crt/stdio/fwrite.c b/reactos/lib/crt/stdio/fwrite.c new file mode 100644 index 00000000000..24d5739a01c --- /dev/null +++ b/reactos/lib/crt/stdio/fwrite.c @@ -0,0 +1,114 @@ +#include +#include +#include +#include +#include +#define NDEBUG +#include + + +/* + * @implemented + */ +size_t fwrite(const void *vptr, size_t size, size_t count, FILE *iop) +{ + size_t to_write, n_written; + unsigned char *ptr = (unsigned char *)vptr; + int copy; + + DPRINT("fwrite(%x, %d, %d, %x)\n", vptr, size, count, iop); + + to_write = size*count; + if (!OPEN4WRITING(iop)) + { + __set_errno (EINVAL); + return 0; + } + + if (iop == NULL) + { + __set_errno (EINVAL); + return 0; + } + + if (ferror (iop)) + return 0; + if (vptr == NULL || to_write == 0) + return 0; + + if (iop->_base == NULL && !(iop->_flag&_IONBF)) + { + if (EOF == _flsbuf(*ptr++, iop)) + return 0; + if (--to_write == 0) + return 1; + } + + if (iop->_flag & _IO_LBF) + { + while (to_write > 0) + { + if (EOF == putc(*ptr++, iop)) + { + iop->_flag |= _IOERR; + break; + } + to_write--; + } + } + else + { + if (iop->_cnt > 0 && to_write > 0) + { + copy = min(iop->_cnt, to_write); + memcpy(iop->_ptr, ptr, copy); + ptr += copy; + iop->_ptr += copy; + iop->_cnt -= copy; + to_write -= copy; + iop->_flag |= _IODIRTY; + } + + if (to_write > 0) + { + // if the buffer is dirty it will have to be written now + // otherwise the file pointer won't match anymore. + fflush(iop); + if (to_write >= iop->_bufsiz) + { + while (to_write > 0) + { + n_written = _write(fileno(iop), ptr, to_write); + if (n_written <= 0) + { + iop->_flag |= _IOERR; + break; + } + to_write -= n_written; + ptr += n_written; + } + + // check to see if this will work with in combination with ungetc + + // the file buffer is empty and there is no read ahead information anymore. + iop->_flag &= ~_IOAHEAD; + } + else + { + if (EOF != _flsbuf(*ptr++, iop)) + { + if (--to_write > 0) + { + memcpy(iop->_ptr, ptr, to_write); + iop->_ptr += to_write; + iop->_cnt -= to_write; + iop->_flag |= _IODIRTY; + return count; + } + } + } + } + } + + return count - (to_write/size); +} diff --git a/reactos/lib/crt/stdio/getc.c b/reactos/lib/crt/stdio/getc.c new file mode 100644 index 00000000000..83a30053152 --- /dev/null +++ b/reactos/lib/crt/stdio/getc.c @@ -0,0 +1,134 @@ +/* $Id$ + * + * ReactOS msvcrt library + * + * getc.c + * + * Copyright (C) 2002 Robert Dickenson + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "precomp.h" +#include +#include +#include +#include + +//getc can be a macro +#undef getc +#undef getwc + +#ifndef MB_CUR_MAX +#define MB_CUR_MAX 10 +#endif + +int getc(FILE *fp) +{ + int c = -1; + + // check for invalid stream + if ( !__validfp (fp) ) { + __set_errno(EINVAL); + return EOF; + } + // check for read access on stream + if ( !OPEN4READING(fp) ) { + __set_errno(EINVAL); + return EOF; + } + if(fp->_cnt > 0) { + fp->_cnt--; + c = (int)(*fp->_ptr++ & 0377); + } else { + c = _filbuf(fp); + } + return c; +} + +/* + * @implemented + */ +wint_t getwc(FILE *fp) +{ + wint_t c = -1; + + // check for invalid stream + if (!__validfp(fp)) { + __set_errno(EINVAL); + return WEOF; + } + // check for read access on stream +//#define OPEN4READING(f) ((((f)->_flag & _IOREAD) == _IOREAD ) ) + if (!OPEN4READING(fp)) { + __set_errno(EINVAL); + return WEOF; + } + // might check on multi bytes if text mode + if (fp->_flag & _IOBINARY) { + if (fp->_cnt > 1) { + fp->_cnt -= sizeof(wchar_t); + c = *((wchar_t*)fp->_ptr); + fp->_ptr += sizeof(wchar_t); + } else { + c = _filwbuf(fp); + // need to fix by one values of fp->_ptr and fp->_cnt + fp->_ptr++; + fp->_cnt--; + } + } else { +#if 0 + BOOL get_bytes = 0; + int mb_cnt = 0; + int found_cr = 0; + //int count; + char mbchar[MB_CUR_MAX]; + + do { + if (fp->_cnt > 0) { + fp->_cnt--; + mbchar[mb_cnt] = *fp->_ptr++ & 0377; + } else { + mbchar[mb_cnt] = _filbuf(fp); + } + if (isleadbyte(mbchar[mb_cnt])) { + get_bytes = 1; + } else { + get_bytes = 0; + } + if (_ismbblead(mbchar[mb_cnt])) { + } + ++mb_cnt; + //} + } while (get_bytes); + + // Convert a multibyte character to a corresponding wide character. + mb_cnt = mbtowc(&c, mbchar, mb_cnt); + if (mb_cnt == -1) { + fp->_flag |= _IOERR; + return WEOF; + } +#else + if (fp->_cnt > 0) { + fp->_cnt--; + c = *fp->_ptr++ &0377; + } else { + c = _filbuf(fp); + } +#endif + } + return c; +} + diff --git a/reactos/lib/crt/stdio/getchar.c b/reactos/lib/crt/stdio/getchar.c new file mode 100644 index 00000000000..31aecbfd89a --- /dev/null +++ b/reactos/lib/crt/stdio/getchar.c @@ -0,0 +1,46 @@ +/* $Id$ + * + * ReactOS msvcrt library + * + * getchar.c + * + * Copyright (C) 2002 Robert Dickenson + * + * Based on original work Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details + * 28/12/1998: Appropriated for Reactos + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include +#include + +#undef getchar +#undef getwchar + +int +getchar(void) +{ + return getc(stdin); +} + +/* + * @implemented + */ +wint_t +getwchar(void) +{ + return getwc(stdin); +} diff --git a/reactos/lib/crt/stdio/gets.c b/reactos/lib/crt/stdio/gets.c new file mode 100644 index 00000000000..579590928ba --- /dev/null +++ b/reactos/lib/crt/stdio/gets.c @@ -0,0 +1,146 @@ +/* $Id$ + * + * ReactOS msvcrt library + * + * gets.c + * + * Copyright (C) 2002 Robert Dickenson + * + * Based on original work Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details + * 28/12/1998: Appropriated for Reactos + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ + +#include + +char* gets(char* s) +{ + int c; + char* cs; + + cs = s; + while ((c = getc(stdin)) != '\n' && c != EOF) + *cs++ = c; + if (c == EOF && cs == s) + return NULL; + *cs++ = '\0'; + return s; +} + +#ifndef WEOF +#define WEOF (wchar_t)(0xFFFF) +#endif + +/* + * Get a line from the stdin stream. + * + * @implemented + */ +wchar_t* _getws(wchar_t* s) +{ + wchar_t c; + wchar_t* cs; + + cs = s; + while ((c = getwc(stdin)) != L'\n' && c != WEOF) + *cs++ = c; + if (c == WEOF && cs == s) + return NULL; + *cs++ = L'\0'; + return s; +} + +#if 0 +/* Copyright (C) 1991, 1994, 1995, 1996 Free Software Foundation, Inc. +This file is part of the GNU C Library. + +The GNU C Library is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +The GNU C 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include + +link_warning (gets, "the `gets' function is dangerous and should not be used.") + + +/* Read a newline-terminated multibyte string from stdin into S, + removing the trailing newline. Return S or NULL. */ + +char * +gets (s) + char *s; +{ + register char *p = s; + register int c; + FILE *stream = stdin; + int l; + + if (!__validfp (stream) || p == NULL) + { + __set_errno (EINVAL); + return NULL; + } + + if (feof (stream) || ferror (stream)) + return NULL; + + while ((c = getc(stdin)) != EOF) { + if (c == '\n') + break; + if ( isascii(c) ) + *cs++ = c; +#ifdef _MULTIBYTE + else if ( isleadbyte(c) ) { + l = mblen(c); + while(l > 0 ) { + c = getchar(); + if ( isleadbyte(c) || c == EOF ) + return NULL; // encoding error + *cs++ = c; + l--; + } + } +#endif + else + return NULL; // suspicious input + } + + *p = '\0'; + + /* Return null if we had an error, or if we got EOF + before writing any characters. */ + + if (ferror (stream) || (feof (stream) && p == s)) + return NULL; + + return s; +} + +#endif diff --git a/reactos/lib/crt/stdio/getw.c b/reactos/lib/crt/stdio/getw.c new file mode 100644 index 00000000000..e5eff56ecfe --- /dev/null +++ b/reactos/lib/crt/stdio/getw.c @@ -0,0 +1,39 @@ +/* Copyright (C) 1991 Free Software Foundation, Inc. +This file is part of the GNU C Library. + +The GNU C Library is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +The GNU C 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include + + +/* + * Read a word (int) from STREAM. + * + * @implemented + */ +int _getw(FILE *stream) +{ + int w; + + /* Is there a better way? */ + if (fread( &w, sizeof(w), 1, stream) != 1) { + // EOF is a legitimate integer value so users must + // check feof or ferror to verify an EOF return. + return(EOF); + } + return(w); +} + diff --git a/reactos/lib/crt/stdio/perror.c b/reactos/lib/crt/stdio/perror.c new file mode 100644 index 00000000000..369e5053e5f --- /dev/null +++ b/reactos/lib/crt/stdio/perror.c @@ -0,0 +1,26 @@ +/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ +#include +#include +#include + + +#ifdef perror +#undef perror +void perror(const char *s); +#endif + +/* + * @implemented + */ +void perror(const char *s) +{ + fprintf(stderr, "%s: %s\n", s, _strerror(NULL)); +} + +/* + * @implemented + */ +void _wperror(const wchar_t *s) +{ + fwprintf(stderr, L"%s: %S\n", s, _strerror(NULL)); +} diff --git a/reactos/lib/crt/stdio/popen.c b/reactos/lib/crt/stdio/popen.c new file mode 100644 index 00000000000..2959fb439d9 --- /dev/null +++ b/reactos/lib/crt/stdio/popen.c @@ -0,0 +1,224 @@ +#include "precomp.h" +#include +#include +#include +#include +#include +#include +#define NDEBUG +#include + + +/* + * @implemented + */ +FILE *_popen (const char *cm, const char *md) /* program name, pipe mode */ +{ + char *szCmdLine=NULL; + char *szComSpec=NULL; + char *s; + FILE *pf; + HANDLE hReadPipe, hWritePipe; + BOOL result; + STARTUPINFOA StartupInfo; + PROCESS_INFORMATION ProcessInformation; + SECURITY_ATTRIBUTES sa = {sizeof(SECURITY_ATTRIBUTES), NULL, TRUE}; + + DPRINT("_popen('%s', '%s')\n", cm, md); + + if (cm == NULL) + return NULL; + + szComSpec = getenv("COMSPEC"); + if (szComSpec == NULL) + { + szComSpec = "cmd.exe"; + } + + s = max(strrchr(szComSpec, '\\'), strrchr(szComSpec, '/')); + if (s == NULL) + s = szComSpec; + else + s++; + + szCmdLine = malloc(strlen(s) + 4 + strlen(cm) + 1); + if (szCmdLine == NULL) + { + return NULL; + } + + strcpy(szCmdLine, s); + s = strrchr(szCmdLine, '.'); + if (s) + *s = 0; + strcat(szCmdLine, " /C "); + strcat(szCmdLine, cm); + + if ( !CreatePipe(&hReadPipe,&hWritePipe,&sa,1024)) + { + free (szCmdLine); + return NULL; + } + + memset(&StartupInfo, 0, sizeof(STARTUPINFOA)); + StartupInfo.cb = sizeof(STARTUPINFOA); + + if (*md == 'r' ) { + StartupInfo.hStdOutput = hWritePipe; + StartupInfo.dwFlags |= STARTF_USESTDHANDLES; + } + else if ( *md == 'w' ) { + StartupInfo.hStdInput = hReadPipe; + StartupInfo.dwFlags |= STARTF_USESTDHANDLES; + } + + result = CreateProcessA(szComSpec, + szCmdLine, + NULL, + NULL, + TRUE, + 0, + NULL, + NULL, + &StartupInfo, + &ProcessInformation); + free (szCmdLine); + + if (result == FALSE) + { + CloseHandle(hReadPipe); + CloseHandle(hWritePipe); + return NULL; + } + + CloseHandle(ProcessInformation.hThread); + + if ( *md == 'r' ) + { + pf = _fdopen(__fileno_alloc(hReadPipe, __fmode) , "r"); + CloseHandle(hWritePipe); + } + else + { + pf = _fdopen( __fileno_alloc(hWritePipe, __fmode) , "w"); + CloseHandle(hReadPipe); + } + + pf->_name_to_remove = ProcessInformation.hProcess; + + return pf; +} + + +/* + * @implemented + */ +int _pclose (FILE *pp) +{ + fclose(pp); + if (!TerminateProcess(pp->_name_to_remove,0)) + return -1; + return 0; +} + + +/* + * @implemented + */ +FILE *_wpopen (const wchar_t *cm, const wchar_t *md) /* program name, pipe mode */ +{ + wchar_t *szCmdLine=NULL; + wchar_t *szComSpec=NULL; + wchar_t *s; + FILE *pf; + HANDLE hReadPipe, hWritePipe; + BOOL result; + STARTUPINFOW StartupInfo; + PROCESS_INFORMATION ProcessInformation; + SECURITY_ATTRIBUTES sa = {sizeof(SECURITY_ATTRIBUTES), NULL, TRUE}; + + DPRINT("_wpopen('%S', '%S')\n", cm, md); + + if (cm == NULL) + return NULL; + + szComSpec = _wgetenv(L"COMSPEC"); + + if (szComSpec == NULL) + { + szComSpec = L"cmd.exe"; + } + + s = max(wcsrchr(szComSpec, L'\\'), wcsrchr(szComSpec, L'/')); + if (s == NULL) + s = szComSpec; + else + s++; + + szCmdLine = malloc((wcslen(s) + 4 + wcslen(cm) + 1) * sizeof(wchar_t)); + if (szCmdLine == NULL) + { + return NULL; + } + + wcscpy(szCmdLine, s); + s = wcsrchr(szCmdLine, L'.'); + if (s) + *s = 0; + wcscat(szCmdLine, L" /C "); + wcscat(szCmdLine, cm); + + if ( !CreatePipe(&hReadPipe,&hWritePipe,&sa,1024)) + { + free (szCmdLine); + return NULL; + } + + memset(&StartupInfo, 0, sizeof(STARTUPINFOW)); + StartupInfo.cb = sizeof(STARTUPINFOW); + + if (*md == L'r' ) { + StartupInfo.hStdOutput = hWritePipe; + StartupInfo.dwFlags |= STARTF_USESTDHANDLES; + } + else if ( *md == L'w' ) { + StartupInfo.hStdInput = hReadPipe; + StartupInfo.dwFlags |= STARTF_USESTDHANDLES; + } + + result = CreateProcessW(szComSpec, + szCmdLine, + NULL, + NULL, + TRUE, + 0, + NULL, + NULL, + &StartupInfo, + &ProcessInformation); + free (szCmdLine); + + if (result == FALSE) + { + CloseHandle(hReadPipe); + CloseHandle(hWritePipe); + return NULL; + } + + CloseHandle(ProcessInformation.hThread); + + if ( *md == L'r' ) + { + pf = _wfdopen(__fileno_alloc(hReadPipe, __fmode) , L"r"); + CloseHandle(hWritePipe); + } + else + { + pf = _wfdopen( __fileno_alloc(hWritePipe, __fmode) , L"w"); + CloseHandle(hReadPipe); + } + + pf->_name_to_remove = ProcessInformation.hProcess; + + return pf; +} diff --git a/reactos/lib/crt/stdio/printf.c b/reactos/lib/crt/stdio/printf.c new file mode 100644 index 00000000000..9d57e14c1c9 --- /dev/null +++ b/reactos/lib/crt/stdio/printf.c @@ -0,0 +1,50 @@ +/* Copyright (C) 1991, 1995, 1996 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The GNU C 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include +#include + + +/* + * @implemented + */ +int printf(const char* format, ...) +{ + va_list arg; + int done; + + va_start(arg, format); + done = vprintf(format, arg); + va_end(arg); + return done; +} + +/* + * @implemented + */ +int wprintf(const wchar_t* format, ...) +{ + va_list arg; + int done; + + va_start(arg, format); + done = vwprintf(format, arg); + va_end(arg); + return done; +} diff --git a/reactos/lib/crt/stdio/putc.c b/reactos/lib/crt/stdio/putc.c new file mode 100644 index 00000000000..99915bb8e6e --- /dev/null +++ b/reactos/lib/crt/stdio/putc.c @@ -0,0 +1,146 @@ +/* $Id$ + * + * ReactOS msvcrt library + * + * putc.c + * + * Copyright (C) 2002 Robert Dickenson + * + * Based on original work Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ + +#include "precomp.h" +#include +#include +#include +#include + +// putc can be a macro +#undef putc +#undef putwc + +#ifndef MB_CUR_MAX_CONST +#define MB_CUR_MAX_CONST 10 +#endif + +int putc(int c, FILE* fp) +{ + // valid stream macro should check that fp is dword aligned + if (!__validfp(fp)) { + __set_errno(EINVAL); + return EOF; + } + // check for write access on fp + if (!OPEN4WRITING(fp)) { + __set_errno(EINVAL); + return EOF; + } + fp->_flag |= _IODIRTY; + if (fp->_cnt > 0) { + fp->_cnt--; + *(fp)->_ptr++ = (unsigned char)c; + return (int)(unsigned char)c; + } else { + return _flsbuf((unsigned char)c, fp); + } + return EOF; +} + +//wint_t putwc(wint_t c, FILE* fp) +/* + * @implemented + */ +int putwc(wint_t c, FILE* fp) +{ + // valid stream macro should check that fp is dword aligned + if (!__validfp(fp)) { + __set_errno(EINVAL); + return WEOF; + } + // check for write access on fp + if (!OPEN4WRITING(fp)) { + __set_errno(EINVAL); + return WEOF; + } + // might check on multi bytes if text mode + if (fp->_flag & _IOBINARY) { + //if (1) { + + fp->_flag |= _IODIRTY; + if (fp->_cnt > 0) { + fp->_cnt -= sizeof(wchar_t); + //*((wchar_t*)(fp->_ptr))++ = c; + *((wchar_t*)(fp->_ptr)) = c; + fp->_ptr += sizeof(wchar_t); + return (wint_t)c; + } else { +#if 1 + wint_t result; + result = _flsbuf(c, fp); + if (result == (wint_t)EOF) + return WEOF; + result = _flsbuf((int)(c >> 8), fp); + if (result == (wint_t)EOF) + return WEOF; + return result; +#else + return _flswbuf(c, fp); +#endif + } + + } else { +#if 0 + int i; + int mb_cnt; + char mbchar[MB_CUR_MAX_CONST]; + + // Convert wide character to the corresponding multibyte character. + mb_cnt = wctomb(mbchar, (wchar_t)c); + if (mb_cnt == -1) { + fp->_flag |= _IOERR; + return WEOF; + } + if (mb_cnt > MB_CUR_MAX_CONST) { + // BARF(); + } + for (i = 0; i < mb_cnt; i++) { + fp->_flag |= _IODIRTY; + if (fp->_cnt > 0) { + fp->_cnt--; + *(fp)->_ptr++ = (unsigned char)mbchar[i]; + } else { + if (_flsbuf((unsigned char)mbchar[i], fp) == EOF) { + return WEOF; + } + } + } +#else + fp->_flag |= _IODIRTY; + if (fp->_cnt > 0) { + fp->_cnt--; + *(fp)->_ptr++ = (unsigned char)c; + } else { + if (_flsbuf(c, fp) == EOF) { + return WEOF; + } + } +#endif + return c; + } + return WEOF; +} diff --git a/reactos/lib/crt/stdio/putchar.c b/reactos/lib/crt/stdio/putchar.c new file mode 100644 index 00000000000..7c3030cc9c4 --- /dev/null +++ b/reactos/lib/crt/stdio/putchar.c @@ -0,0 +1,38 @@ +/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: lib/msvcrt/stdio/putchar.c + * PURPOSE: Writes a character to stdout + * PROGRAMER: Boudewijn Dekker + * UPDATE HISTORY: + * 28/12/98: Created + */ +#include + +#undef putc +#undef putchar +#undef putwc +#undef putwchar + +/* + * @implemented + */ +int putchar(int c) +{ + int r = putc(c, stdout); + if (stdout->_flag & _IO_LBF) + fflush(stdout); + return r; +} + +/* + * @implemented + */ +wint_t putwchar(wint_t c) +{ + wint_t r = putwc(c, stdout); + if (stdout->_flag & _IO_LBF) + fflush(stdout); + return r; +} diff --git a/reactos/lib/crt/stdio/puts.c b/reactos/lib/crt/stdio/puts.c new file mode 100644 index 00000000000..6b1867c1706 --- /dev/null +++ b/reactos/lib/crt/stdio/puts.c @@ -0,0 +1,35 @@ +/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ +#include "precomp.h" +#include +#include +#include + +#undef putchar +#undef putwchar + + +/* + * @implemented + */ +int puts(const char *s) +{ + int c; + + while ((c = *s++)) { + putchar(c); + } + return putchar('\n'); +} + +/* + * @implemented + */ +int _putws(const wchar_t *s) +{ + wint_t c; + + while ((c = *s++)) { + putwchar(c); + } + return putwchar(L'\n'); +} diff --git a/reactos/lib/crt/stdio/putw.c b/reactos/lib/crt/stdio/putw.c new file mode 100644 index 00000000000..dab2f31ee0c --- /dev/null +++ b/reactos/lib/crt/stdio/putw.c @@ -0,0 +1,34 @@ +/* Copyright (C) 1991 Free Software Foundation, Inc. + * This file is part of the GNU C Library. + * + * The GNU C Library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * The GNU C 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 + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with the GNU C Library; see the file COPYING.LIB. If + * not, write to the Free Software Foundation, Inc., 675 Mass Ave, + * Cambridge, MA 02139, USA. */ + + +#include + + +/* + * Write the word (int) W to STREAM. + * + * @implemented + */ +int _putw(int w,FILE *stream) +{ + /* Is there a better way? */ + if (fwrite( &w, sizeof(w), 1, stream) < 1) + return(EOF); + return(0); +} diff --git a/reactos/lib/crt/stdio/remove.c b/reactos/lib/crt/stdio/remove.c new file mode 100644 index 00000000000..3f946b400f0 --- /dev/null +++ b/reactos/lib/crt/stdio/remove.c @@ -0,0 +1,30 @@ +#include "precomp.h" +#include +#include + +#define NDEBUG +#include + +/* + * @implemented + */ +int remove(const char *fn) +{ + int result = 0; + DPRINT("remove('%s')\n", fn); + if (!DeleteFileA(fn)) + result = -1; + DPRINT("%d\n", result); + return result; +} + +/* + * @implemented + */ +int _wremove(const wchar_t *fn) +{ + DPRINT("_wremove('%S')\n", fn); + if (!DeleteFileW(fn)) + return -1; + return 0; +} diff --git a/reactos/lib/crt/stdio/rename.c b/reactos/lib/crt/stdio/rename.c new file mode 100644 index 00000000000..fff877c8eb9 --- /dev/null +++ b/reactos/lib/crt/stdio/rename.c @@ -0,0 +1,18 @@ +#include "precomp.h" +#include +#include + + +/* + * @implemented + */ +int rename(const char* old_, const char* new_) +{ + if (old_ == NULL || new_ == NULL) + return -1; + + if (!MoveFileA(old_, new_)) + return -1; + + return 0; +} diff --git a/reactos/lib/crt/stdio/rewind.c b/reactos/lib/crt/stdio/rewind.c new file mode 100644 index 00000000000..e3b6703e43e --- /dev/null +++ b/reactos/lib/crt/stdio/rewind.c @@ -0,0 +1,18 @@ +/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ + +#include +#include +#include + + +/* + * @implemented + */ +void rewind(FILE *f) +{ + fflush(f); + lseek(fileno(f), 0L, SEEK_SET); + f->_cnt = 0; + f->_ptr = f->_base; + f->_flag &= ~(_IOERR|_IOEOF|_IOAHEAD); +} diff --git a/reactos/lib/crt/stdio/rmtmp.c b/reactos/lib/crt/stdio/rmtmp.c new file mode 100644 index 00000000000..1d2a8c51c99 --- /dev/null +++ b/reactos/lib/crt/stdio/rmtmp.c @@ -0,0 +1,72 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: lib/msvcrt/stdio/rmtmp.c + * PURPOSE: remove temporary files in current directory + * PROGRAMMER: Boudewijn ( ariadne@xs4all.nl) + * UPDATE HISTORY: + * Created 19/01/99 + * NOTE Not tested. + */ + +#include +#include +#include + +#ifndef F_OK + #define F_OK 0x01 +#endif +#ifndef R_OK + #define R_OK 0x02 +#endif +#ifndef W_OK + #define W_OK 0x04 +#endif +#ifndef X_OK + #define X_OK 0x08 +#endif +#ifndef D_OK + #define D_OK 0x10 +#endif + +// should be replace by a closure of the tmp files +extern __file_rec *__file_rec_list; + +int _rmtmp( void ) +{ +/* +loop files and check for name_to_remove +*/ + __file_rec *fr = __file_rec_list; + __file_rec **last_fr = &__file_rec_list; + + int total_closed = 0; + int i = 0; + char temp_name[260]; + + /* Try to find an empty slot */ + while (fr) + { + last_fr = &(fr->next); + + /* If one of the existing slots is available, return it */ + for (i=0; icount; i++) { + if (fr->files[i]->_name_to_remove != NULL) { + if ( _access(fr->files[i]->_name_to_remove,W_OK) ) { + strcpy(temp_name,fr->files[i]->_name_to_remove); + fclose(fr->files[i]); + remove(temp_name); + total_closed++; + } + } + } + + /* If this one is full, go to the next */ + if (fr->count == __FILE_REC_MAX) + fr = fr->next; + else + /* it isn't full, we can add to it */ + break; + } + return total_closed; +} diff --git a/reactos/lib/crt/stdio/scanf.c b/reactos/lib/crt/stdio/scanf.c new file mode 100644 index 00000000000..9cdc4d82172 --- /dev/null +++ b/reactos/lib/crt/stdio/scanf.c @@ -0,0 +1,64 @@ +/* Copyright (C) 1991, 1995, 1996 Free Software Foundation, Inc. +This file is part of the GNU C Library. + +The GNU C Library is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +The GNU C 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include +#include +#include + + +/* Read formatted input from stdin according to the format string FORMAT. */ +/* VARARGS1 */ +/* + * @implemented + */ +int scanf(const char *format, ...) +{ + va_list arg; + int done; + + va_start(arg, format); + done = __vscanf(format, arg); + va_end(arg); + + return done; +} + +/* + * @implemented + */ +int +wscanf(const wchar_t *fmt, ...) +{ + va_list arg; + int done; + char *f; + int i, len = wcslen(fmt); + + f = malloc(len+1); + for(i=0;i +#include +#include + +/* + * @implemented + */ +void setbuf(FILE *f, char *buf) +{ + if (buf) + setvbuf(f, buf, _IOFBF, BUFSIZ); + else + setvbuf(f, 0, _IONBF, BUFSIZ); +} diff --git a/reactos/lib/crt/stdio/setvbuf.c b/reactos/lib/crt/stdio/setvbuf.c new file mode 100644 index 00000000000..d0dadf0c786 --- /dev/null +++ b/reactos/lib/crt/stdio/setvbuf.c @@ -0,0 +1,69 @@ +/* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ +#include +#include +#include +#include +#include + + +/* + * @implemented + */ +int setvbuf(FILE *f, char *buf, int type, size_t len) +{ + int mine=0; + if (!__validfp (f) ) { + __set_errno (EINVAL); + return 0; + } + if ( f->_base != NULL ) + fflush(f); + /* Cannot use _IOLBF as flag value because _IOLBF is equal to _IOSTRG */ + if (type == _IOLBF) + type = _IO_LBF; + + switch (type) + { + case _IOFBF: + case _IO_LBF: + if (len <= 0) { + __set_errno (EINVAL); + return EOF; + } + if (buf == 0) + { + buf = (char *)malloc(len+1); + if (buf == NULL) { + __set_errno (ENOMEM); + return -1; + } + mine = 1; + } + /* FALLTHROUGH */ + case _IONBF: + if (f->_base != NULL && f->_flag & _IOMYBUF) + free(f->_base); + f->_cnt = 0; + + f->_flag &= ~(_IONBF|_IOFBF|_IO_LBF|_IOUNGETC); + f->_flag |= type; + if (type != _IONBF) + { + if (mine) + f->_flag |= _IOMYBUF; + f->_ptr = f->_base = buf; + f->_bufsiz = len; + } + else + { + f->_base = 0; + f->_bufsiz = 0; + } + return 0; + default: + __set_errno (EINVAL); + return EOF; + } +} diff --git a/reactos/lib/crt/stdio/sprintf.c b/reactos/lib/crt/stdio/sprintf.c new file mode 100644 index 00000000000..6a020ae06d8 --- /dev/null +++ b/reactos/lib/crt/stdio/sprintf.c @@ -0,0 +1,96 @@ +/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ + +/* Copyright (C) 1991, 1995 Free Software Foundation, Inc. +This file is part of the GNU C Library. + +The GNU C Library is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +The GNU C 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include +#include +#include + +#undef sprintf +#undef wsprintf +/* + * @implemented + */ +int +sprintf(char *str, const char *fmt, ...) +{ + va_list arg; + int done; + + va_start (arg, fmt); + done = vsprintf (str, fmt, arg); + va_end (arg); + return done; +} + +/* + * @implemented + */ +int +swprintf(wchar_t *str, const wchar_t *fmt, ...) +{ + va_list arg; + int done; + + va_start (arg, fmt); + done = vswprintf (str, fmt, arg); + va_end (arg); + return done; +} + + + +/* Write formatted output into S, according to the format + string FORMAT, writing no more than MAXLEN characters. */ +/* VARARGS3 */ +/* + * @implemented + */ +int +_snprintf (char *s, size_t maxlen,const char *format, ...) +{ + va_list arg; + int done; + + va_start (arg, format); + done = _vsnprintf (s, maxlen, format, arg); + va_end (arg); + + return done; +} + +/* + * @implemented + */ +int +_snwprintf (wchar_t *s, size_t maxlen,const wchar_t *format, ...) +{ + va_list arg; + int done; + + va_start (arg, format); + done = _vsnwprintf (s, maxlen, format, arg); + va_end (arg); + + return done; +} + + diff --git a/reactos/lib/crt/stdio/sscanf.c b/reactos/lib/crt/stdio/sscanf.c new file mode 100644 index 00000000000..7868addf516 --- /dev/null +++ b/reactos/lib/crt/stdio/sscanf.c @@ -0,0 +1,71 @@ +/* Copyright (C) 1991, 1995, 1996 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The GNU C 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include +#include +#include +#include + + +/* Read formatted input from S, according to the format string FORMAT. */ +/* VARARGS2 */ +/* + * @implemented + */ +int sscanf (const char *s,const char *format, ...) +{ + va_list arg; + int done; + + va_start (arg, format); + done = __vsscanf (s, format, arg); + va_end (arg); + + return done; +} + +/* + * @implemented + */ +int swscanf(const wchar_t *str, const wchar_t *fmt, ...) +{ + va_list arg; + int done; + char *f , *s; + int i,len = wcslen(fmt); + + f = malloc(len+1); + for(i=0;i +#include + +FILE _iob[5] = +{ + // stdin +{ + NULL, 0, NULL, + _IOREAD | _IO_LBF , + 0, 0,0, NULL +}, + // stdout +{ + NULL, 0, NULL, + _IOWRT | _IO_LBF |_IOSTRG, + 1,0,0, NULL +}, + // stderr +{ + NULL, 0, NULL, + _IOWRT | _IONBF, + 2,0,0, NULL +}, + // stdaux +{ + NULL, 0, NULL, + _IOREAD | _IOWRT | _IONBF, + 3,0,0, NULL +}, + // stdprn +{ + NULL, 0, NULL, + _IOWRT | _IONBF, + 4, 0,0,NULL +} +}; + +/* + * @implemented + */ +FILE *__p__iob(void) +{ + return &_iob[0]; +} diff --git a/reactos/lib/crt/stdio/tempnam.c b/reactos/lib/crt/stdio/tempnam.c new file mode 100644 index 00000000000..294a51cc202 --- /dev/null +++ b/reactos/lib/crt/stdio/tempnam.c @@ -0,0 +1,30 @@ +#include "precomp.h" +#include +#include + + +/* + * @implemented + */ +char* _tempnam(const char* dir,const char* prefix) +{ + char* TempFileName = malloc(MAX_PATH); + char* d; + + if (dir == NULL) + d = getenv("TMP"); + else + d = (char*)dir; + +#ifdef _MSVCRT_LIB_ // TODO: check on difference? + if (GetTempFileNameA(d, prefix, 1, TempFileName) == 0) { +#else// TODO: FIXME: review which is correct + if (GetTempFileNameA(d, prefix, 0, TempFileName) == 0) { +#endif /*_MSVCRT_LIB_*/ + + free(TempFileName); + return NULL; + } + + return TempFileName; +} diff --git a/reactos/lib/crt/stdio/tmpfile.c b/reactos/lib/crt/stdio/tmpfile.c new file mode 100644 index 00000000000..b188dece4a3 --- /dev/null +++ b/reactos/lib/crt/stdio/tmpfile.c @@ -0,0 +1,70 @@ +/* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1997 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ + +#include +#include +#include +#include +#include +//#include +#include +#include +#include + + +FILE * __alloc_file(void); + +/* + * @implemented + */ +FILE * +tmpfile(void) +{ + int temp_fd; + FILE *f; + char *temp_name = tmpnam(0); + char *n_t_r = (char *)malloc(L_tmpnam); + + if (!n_t_r) + return 0; + + /* We could have a race condition, whereby another program + (in another virtual machine, or if the temporary file is + in a directory which is shared via a network) opens the + file returned by `tmpnam' between the call above and the + moment when we actually open the file below. This loop + retries the call to `tmpnam' until we actually succeed + to create the file which didn't exist before. */ + do { + // __set_errno ( 0 ); + temp_fd = _open(temp_name, 0, SH_DENYRW); + // if ( *_errno() == ENOENT ) +// break; + } while (temp_fd == -1 && (temp_name = tmpnam(0)) != 0); + + if (temp_name == 0) + return 0; + + /* This should have been fdopen(temp_fd, "wb+"), but `fdopen' + is non-ANSI. So we need to dump some of its guts here. Sigh... */ + f = __alloc_file(); + if (f) + { + f->_file = temp_fd; + f->_cnt = 0; + f->_bufsiz = 0; + f->_flag = _IORMONCL | _IOREAD | _IOWRT; + f->_name_to_remove = n_t_r; + strcpy(f->_name_to_remove, temp_name); + f->_base = f->_ptr = NULL; + } + else + { + close(temp_fd); + remove(temp_name); + free(n_t_r); + } + return f; +} diff --git a/reactos/lib/crt/stdio/tmpnam.c b/reactos/lib/crt/stdio/tmpnam.c new file mode 100644 index 00000000000..b59075335c6 --- /dev/null +++ b/reactos/lib/crt/stdio/tmpnam.c @@ -0,0 +1,19 @@ +#include "precomp.h" +#include +#include + + +/* + * @implemented + */ +char* tmpnam(char* s) +{ + char PathName[MAX_PATH]; + static char static_buf[MAX_PATH]; + + GetTempPathA(MAX_PATH, PathName); + GetTempFileNameA(PathName, "ARI", 007, static_buf); + strcpy(s,static_buf); + + return s; +} diff --git a/reactos/lib/crt/stdio/ungetc.c b/reactos/lib/crt/stdio/ungetc.c new file mode 100644 index 00000000000..cb5340bd66e --- /dev/null +++ b/reactos/lib/crt/stdio/ungetc.c @@ -0,0 +1,76 @@ +/* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ +#include +#include +#include +#include + + +/* + * @implemented + */ +int ungetc(int c, FILE *f) +{ + if (!__validfp (f) || !OPEN4READING(f)) { + __set_errno (EINVAL); + return EOF; + } + + if (c == EOF) + return EOF; + + if (f->_ptr == NULL || f->_base == NULL) + return EOF; + + if (f->_ptr == f->_base) + { + if (f->_cnt == 0) + f->_ptr++; + else + return EOF; + } + + f->_cnt++; + f->_ptr--; + if (*f->_ptr != c) + { + f->_flag |= _IOUNGETC; + *f->_ptr = c; + } + return c; +} + + +/* + * @implemented + */ +wint_t +ungetwc(wchar_t c, FILE *f) +{ + if (!__validfp (f) || !OPEN4READING(f)) { + __set_errno(EINVAL); + return EOF; + } + + if (c == (wchar_t)EOF) + return EOF; + + if (f->_ptr == NULL || f->_base == NULL) + return EOF; + + if (f->_ptr == f->_base) + { + if (f->_cnt == 0) + f->_ptr+=sizeof(wchar_t); + else + return EOF; + } + + f->_cnt+=sizeof(wchar_t); + f->_ptr-=sizeof(wchar_t); + + f->_flag |= _IOUNGETC; + *((wchar_t *)(f->_ptr)) = c; + + return c; +} diff --git a/reactos/lib/crt/stdio/vfprintf.c b/reactos/lib/crt/stdio/vfprintf.c new file mode 100644 index 00000000000..8d2c0f3d510 --- /dev/null +++ b/reactos/lib/crt/stdio/vfprintf.c @@ -0,0 +1,862 @@ +/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ +#include +#include +#include +#include + +#ifdef __USE_W32API +#include +#endif + +int _isnanl(double x); +int _isinfl(double x); +int _isnan(double x); +int _isinf(double x); + + + +int __vfprintf(FILE*, const char*, va_list); + + +/* + * @implemented + */ +int vfprintf(FILE* f, const char* fmt, va_list ap) +{ + int len; + char localbuf[BUFSIZ]; + +#if 0 + __fileno_lock(fileno(f)); +#endif + if (f->_flag & _IONBF) { + f->_flag &= ~_IONBF; + f->_ptr = f->_base = localbuf; + f->_bufsiz = BUFSIZ; + len = __vfprintf(f, fmt, ap); + (void)fflush(f); + f->_flag |= _IONBF; + f->_base = NULL; + f->_bufsiz = 0; + f->_cnt = 0; + } else { + len = __vfprintf(f,fmt, ap); + } +#if 0 + __fileno_unlock(fileno(f)); +#endif + return (ferror(f) ? EOF : len); +} + + +/* + * linux/lib/vsprintf.c + * + * Copyright (C) 1991, 1992 Linus Torvalds + */ + +/* vsprintf.c -- Lars Wirzenius & Linus Torvalds. */ +/* + * Wirzenius wrote this portably, Torvalds fucked it up :-) + */ + +/* + * Appropiated for the reactos kernel, March 1998 -- David Welch + */ + +#include + +#include +#include +#include +#include +#include +#include + + +#define ZEROPAD 1 /* pad with zero */ +#define SIGN 2 /* unsigned/signed long */ +#define PLUS 4 /* show plus */ +#define SPACE 8 /* space if plus */ +#define LEFT 16 /* left justified */ +#define SPECIAL 32 /* 0x */ +#define LARGE 64 /* use 'ABCDEF' instead of 'abcdef' */ +#define ZEROTRUNC 128 /* truncate zero 's */ + + +static int skip_atoi(const char **s) +{ + int i=0; + + while (isdigit(**s)) + i = i*10 + *((*s)++) - '0'; + return i; +} + + +static int do_div(LONGLONG *n,int base) +{ + int __res = ((ULONGLONG) *n) % (unsigned) base; + *n = ((ULONGLONG) *n) / (unsigned) base; + return __res; +} + + +static int number(FILE * f, LONGLONG num, int base, int size, int precision ,int type) +{ + char c,sign,tmp[66]; + const char *digits="0123456789abcdefghijklmnopqrstuvwxyz"; + int i, done = 0; + + if (type & LARGE) + digits = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; + if (type & LEFT) + type &= ~ZEROPAD; + if (base < 2 || base > 36) + return done; + c = (type & ZEROPAD) ? '0' : ' '; + sign = 0; + if (type & SIGN) { + if (num < 0) { + sign = '-'; + num = -num; + size--; + } else if (type & PLUS) { + sign = '+'; + size--; + } else if (type & SPACE) { + sign = ' '; + size--; + } + } + if (type & SPECIAL) { + if (base == 16) + size -= 2; + else if (base == 8) + size--; + } + i = 0; + if (num == 0) + tmp[i++]='0'; + else while (num != 0) + tmp[i++] = digits[do_div(&num,base)]; + if (i > precision) + precision = i; + size -= precision; + if (!(type&(ZEROPAD+LEFT))) + while(size-->0) + { + if (putc(' ',f) == EOF) + return -1; + done++; + } + if (sign) + { + if (putc(sign,f) == EOF) + return -1; + done++; + } + if (type & SPECIAL) { + if (base==8) { + if (putc('0',f) == EOF) + return -1; + done++; + } + else if (base==16) { + if (putc('0', f) == EOF) + return -1; + done++; + if (putc(digits[33],f) == EOF) + return -1; + done++; + } + } + if (!(type & LEFT)) + while (size-- > 0) + { + if (putc(c,f) == EOF) + return -1; + done++; + } + while (i < precision--) + { + if (putc('0', f) == EOF) + return -1; + done++; + } + while (i-- > 0) + { + if (putc(tmp[i],f) == EOF) + return -1; + done++; + } + while (size-- > 0) + { + if (putc(' ', f) == EOF) + return -1; + done++; + } + return done; +} + + +static int numberf(FILE * f, double __n, char exp_sign, int size, int precision, int type) +{ + double exponent = 0.0; + double e; + long ie; + + //int x; + char *buf, *tmp; + int i = 0; + int j = 0; + //int k = 0; + + double frac, intr; + double p; + char sign; + char c; + char ro = 0; + int result, done = 0; + + union + { + double* __n; + double_t* n; + } n; + + n.__n = &__n; + + if ( exp_sign == 'g' || exp_sign == 'G' || exp_sign == 'e' || exp_sign == 'E' ) { + ie = ((unsigned int)n.n->exponent - (unsigned int)0x3ff); + exponent = ie/3.321928; + } + + if ( exp_sign == 'g' || exp_sign == 'G' ) { + type |= ZEROTRUNC; + if ( exponent < -4 || fabs(exponent) >= precision ) + exp_sign -= 2; // g -> e and G -> E + } + + if ( exp_sign == 'e' || exp_sign == 'E' ) { + frac = modf(exponent,&e); + if ( frac > 0.5 ) + e++; + else if ( frac < -0.5 ) + e--; + + result = numberf(f,__n/pow(10.0L,e),'f',size-4, precision, type); + if (result < 0) + return -1; + done += result; + if (putc( exp_sign,f) == EOF) + return -1; + done++; + size--; + ie = (long)e; + type = LEFT | PLUS; + if ( ie < 0 ) + type |= SIGN; + + result = number(f,ie, 10,2, 2,type ); + if (result < 0) + return -1; + done += result; + return done; + } + + if ( exp_sign == 'f' ) { + buf = alloca(4096); + if (type & LEFT) { + type &= ~ZEROPAD; + } + + c = (type & ZEROPAD) ? '0' : ' '; + sign = 0; + if (type & SIGN) { + if (__n < 0) { + sign = '-'; + __n = fabs(__n); + size--; + } else if (type & PLUS) { + sign = '+'; + size--; + } else if (type & SPACE) { + sign = ' '; + size--; + } + } + + frac = modf(__n,&intr); + + // # flags forces a . and prevents trucation of trailing zero's + + if ( precision > 0 ) { + //frac = modfl(__n,&intr); + i = precision-1; + while ( i >= 0 ) { + frac*=10.0L; + frac = modf(frac, &p); + buf[i] = (int)p + '0'; + i--; + } + i = precision; + size -= precision; + + ro = 0; + if ( frac > 0.5 ) { + ro = 1; + } + + if ( precision >= 1 || type & SPECIAL) { + buf[i++] = '.'; + size--; + } + } + + if ( intr == 0.0 ) { + buf[i++] = '0'; + size--; + } + else { + while ( intr > 0.0 ) { + p = intr; + intr/=10.0L; + modf(intr, &intr); + + p -= 10.0*intr; + + buf[i++] = (int)p + '0'; + size--; + } + } + + j = 0; + while ( j < i && ro == 1) { + if ( buf[j] >= '0' && buf[j] <= '8' ) { + buf[j]++; + ro = 0; + } + else if ( buf[j] == '9' ) { + buf[j] = '0'; + } + j++; + } + if ( ro == 1 ) + buf[i++] = '1'; + + buf[i] = 0; + + size -= precision; + if (!(type&(ZEROPAD+LEFT))) + while(size-->0) + { + if (putc(' ',f) == EOF) + return -1; + done++; + } + if (sign) + { + if (putc( sign,f) == EOF) + return -1; + done++; + } + + if (!(type&(ZEROPAD+LEFT))) + while(size-->0) + { + if (putc(' ',f) == EOF) + return -1; + done++; + } + if (type & SPECIAL) { + } + + if (!(type & LEFT)) + while (size-- > 0) + { + if (putc(c,f) == EOF) + return -1; + done++; + } + + tmp = buf; + if ( type & ZEROTRUNC && ((type & SPECIAL) != SPECIAL) ) { + j = 0; + while ( j < i && ( *tmp == '0' || *tmp == '.' )) { + tmp++; + i--; + } + } +// else +// while (i < precision--) +// putc('0', f); + while (i-- > 0) + { + if (putc(tmp[i],f) == EOF) + return -1; + done++; + } + while (size-- > 0) + { + if (putc(' ', f) == EOF) + return -1; + done++; + } + } + return done; +} + + + + +static int string(FILE *f, const char* s, int len, int field_width, int precision, int flags) +{ + int i, done = 0; + if (s == NULL) + { + s = ""; + len = 6; + } + else + { + if (len == -1) + { + len = 0; + while ((unsigned int)len < (unsigned int)precision && s[len]) + len++; + } + else + { + if ((unsigned int)len > (unsigned int)precision) + len = precision; + } + } + if (!(flags & LEFT)) + while (len < field_width--) + { + if (putc(' ', f) == EOF) + return -1; + done++; + } + for (i = 0; i < len; ++i) + { + if (putc(*s++, f) == EOF) + return -1; + done++; + } + while (len < field_width--) + { + if (putc(' ', f) == EOF) + return -1; + done++; + } + return done; +} + +static int stringw(FILE *f, const wchar_t* sw, int len, int field_width, int precision, int flags) +{ + int i, done = 0; + if (sw == NULL) + { + sw = L""; + len = 6; + } + else + { + if (len == -1) + { + len = 0; + while ((unsigned int)len < (unsigned int)precision && sw[len]) + len++; + } + else + { + if ((unsigned int)len > (unsigned int)precision) + len = precision; + } + } + if (!(flags & LEFT)) + while (len < field_width--) + { + if (putc(' ', f) == EOF) + return -1; + done++; + } + for (i = 0; i < len; ++i) + { +#define MB_CUR_MAX 1 + char mb[MB_CUR_MAX]; + int mbcount, j; + mbcount = wctomb(mb, *sw++); + if (mbcount <= 0) + { + break; + } + for (j = 0; j < mbcount; j++) + { + if (putc(mb[j], f) == EOF) + return -1; + done++; + } + } + while (len < field_width--) + { + if (putc(' ', f) == EOF) + return -1; + done++; + } + return done; +} + +int __vfprintf(FILE *f, const char *fmt, va_list args) +{ + int len; + ULONGLONG num; + int base; + double _double; + const char *s; + const wchar_t *sw; + int result, done = 0; + + int flags; /* flags to number() */ + + int field_width; /* width of output field */ + int precision; /* min. # of digits for integers; max + number of chars for from string */ + int qualifier = 0; /* 'h', 'l', 'L' or 'I64' for integer fields */ + + for (; *fmt ; ++fmt) { + if (*fmt != '%') { + if (putc(*fmt,f) == EOF) + return -1; + done++; + continue; + } + + /* process flags */ + flags = 0; + repeat: + ++fmt; /* this also skips first '%' */ + switch (*fmt) { + case '-': flags |= LEFT; goto repeat; + case '+': flags |= PLUS; goto repeat; + case ' ': flags |= SPACE; goto repeat; + case '#': flags |= SPECIAL; goto repeat; + case '0': flags |= ZEROPAD; goto repeat; + } + + /* get field width */ + field_width = -1; + if (isdigit(*fmt)) + field_width = skip_atoi(&fmt); + else if (*fmt == '*') { + ++fmt; + /* it's the next argument */ + field_width = va_arg(args, int); + if (field_width < 0) { + field_width = -field_width; + flags |= LEFT; + } + } + + /* get the precision */ + precision = -1; + if (*fmt == '.') { + ++fmt; + if (isdigit(*fmt)) + precision = skip_atoi(&fmt); + else if (*fmt == '*') { + ++fmt; + /* it's the next argument */ + precision = va_arg(args, int); + } + if (precision < 0) + precision = 0; + } + + /* get the conversion qualifier */ + qualifier = 0; + // %Z can be just stand alone or as size_t qualifier + if ( *fmt == 'Z' ) { + qualifier = *fmt; + switch ( *(fmt+1)) { + case 'o': + case 'b': + case 'X': + case 'x': + case 'd': + case 'i': + case 'u': + ++fmt; + break; + default: + break; + } + } else if (*fmt == 'h' || *fmt == 'l' || *fmt == 'L' || *fmt == 'w') { + qualifier = *fmt; + ++fmt; + } else if (*fmt == 'I' && *(fmt+1) == '6' && *(fmt+2) == '4') { + qualifier = *fmt; + fmt += 3; + } + + // go fine with ll instead of L + if ( *fmt == 'l' ) { + ++fmt; + qualifier = 'L'; + } + + /* default base */ + base = 10; + + switch (*fmt) { + case 'c': + if (!(flags & LEFT)) + while (--field_width > 0) + { + if (putc(' ', f) == EOF) + return -1; + done++; + } + if (qualifier == 'l' || qualifier == 'w') + { + if (putc((unsigned char)(wchar_t) va_arg(args, int), f) == EOF) + return -1; + done++; + } + else + { + if (putc((unsigned char) va_arg(args, int), f) == EOF) + return -1; + done++; + } + while (--field_width > 0) + { + if (putc(' ', f) == EOF) + return -1; + done++; + } + continue; + + case 'C': + if (!(flags & LEFT)) + while (--field_width > 0) + { + if (putc(' ', f) == EOF) + return -1; + done++; + } + if (qualifier == 'h') + { + if (putc((unsigned char) va_arg(args, int), f) == EOF) + return -1; + done++; + } + else + { + if (putc((unsigned char)(wchar_t) va_arg(args, int), f) == EOF) + return -1; + done++; + } + while (--field_width > 0) + { + if (putc(' ', f) == EOF) + return -1; + done++; + } + continue; + + case 's': + if (qualifier == 'l' || qualifier == 'w') { + /* print unicode string */ + sw = va_arg(args, wchar_t *); + result = stringw(f, sw, -1, field_width, precision, flags); + } else { + /* print ascii string */ + s = va_arg(args, char *); + result = string(f, s, -1, field_width, precision, flags); + } + if (result < 0) + return -1; + done += result; + continue; + + case 'S': + if (qualifier == 'h') { + /* print ascii string */ + s = va_arg(args, char *); + result = string(f, s, -1, field_width, precision, flags); + } else { + /* print unicode string */ + sw = va_arg(args, wchar_t *); + result = stringw(f, sw, -1, field_width, precision, flags); + } + if (result < 0) + return -1; + done += result; + continue; + + case 'Z': + if (qualifier == 'w') { + /* print counted unicode string */ + PUNICODE_STRING pus = va_arg(args, PUNICODE_STRING); + if ((pus == NULL) || (pus->Buffer == NULL)) { + sw = NULL; + len = -1; + } else { + sw = pus->Buffer; + len = pus->Length / sizeof(WCHAR); + } + result = stringw(f, sw, len, field_width, precision, flags); + } else { + /* print counted ascii string */ + PANSI_STRING pas = va_arg(args, PANSI_STRING); + if ((pas == NULL) || (pas->Buffer == NULL)) { + s = NULL; + len = -1; + } else { + s = pas->Buffer; + len = pas->Length; + } + result = string(f, s, -1, field_width, precision, flags); + } + if (result < 0) + return -1; + done += result; + continue; + + case 'e': + case 'E': + case 'f': + case 'g': + case 'G': + _double = (double)va_arg(args, double); + + if ( _isnan(_double) ) { + s = "Nan"; + len = 3; + while ( len > 0 ) { + if (putc(*s++,f) == EOF) + return -1; + done++; + len --; + } + } else if ( _isinf(_double) < 0 ) { + s = "-Inf"; + len = 4; + while ( len > 0 ) { + if (putc(*s++,f) == EOF) + return -1; + done++; + len --; + } + } else if ( _isinf(_double) > 0 ) { + s = "+Inf"; + len = 4; + while ( len > 0 ) { + if (putc(*s++,f) == EOF) + return -1; + done++; + len --; + } + } else { + if ( precision == -1 ) + precision = 6; + result = numberf(f,_double,*fmt,field_width,precision,flags); + if (result < 0) + return -1; + done += result; + } + continue; + + case 'p': + if (field_width == -1) { + field_width = 2*sizeof(void *); + flags |= ZEROPAD; + } + result = number(f, + (unsigned long) va_arg(args, void *), 16, + field_width, precision, flags); + if (result < 0) + return -1; + done += result; + continue; + + case 'n': + if (qualifier == 'l') { + long * ip = va_arg(args, long *); + *ip = 0; + } else { + int * ip = va_arg(args, int *); + *ip = 0; + } + continue; + + /* integer number formats - set up the flags and "break" */ + case 'o': + base = 8; + break; + + case 'b': + base = 2; + break; + + case 'X': + flags |= LARGE; + case 'x': + base = 16; + break; + + case 'd': + case 'i': + flags |= SIGN; + case 'u': + break; + + default: + if (*fmt != '%') + { + if (putc('%', f) == EOF) + return -1; + done++; + } + if (*fmt) + { + if (putc(*fmt, f) == EOF) + return -1; + done++; + } + else + --fmt; + continue; + } + + if (qualifier == 'I') + num = va_arg(args, ULONGLONG); + else if (qualifier == 'l') { + if (flags & SIGN) + num = va_arg(args, long); + else + num = va_arg(args, unsigned long); + } + else if (qualifier == 'h') { + if (flags & SIGN) + num = va_arg(args, int); + else + num = va_arg(args, unsigned int); + } + else if (flags & SIGN) + num = va_arg(args, int); + else + num = va_arg(args, unsigned int); + result = number(f, num, base, field_width, precision, flags); + if (result < 0) + return -1; + done += result; + } + //putc('\0',f); + return done; +} + +/* EOF */ diff --git a/reactos/lib/crt/stdio/vfscanf.c b/reactos/lib/crt/stdio/vfscanf.c new file mode 100644 index 00000000000..d9ceb2f8ba5 --- /dev/null +++ b/reactos/lib/crt/stdio/vfscanf.c @@ -0,0 +1,1235 @@ +/* Copyright (C) 1991, 92, 93, 94, 95, 96, 97 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The GNU C 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include "precomp.h" + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define CHECKPOINT1 do{ char a[30]; sprintf(a,"%i\n",__LINE__); OutputDebugStringA(a); } while(0) + +#ifdef __USE_W32API +int __set_errno(int err); +#else +#include +#endif + +/* The internal entry points for `strtoX' take an extra flag argument + saying whether or not to parse locale-dependent number grouping. */ + +double __strtod_internal (const char *__nptr,char **__endptr, int __group); +float __strtof_internal (const char *__nptr, char **__endptr,int __group); +long double __strtold_internal (const char *__nptr,char **__endptr, int __group); +long int __strtol_internal (const char *__nptr, char **__endptr, int __base, int __group); +unsigned long int __strtoul_internal (const char *__nptr, char **__endptr, int __base, int __group); + + +#include // robd +//#ifdef __GNUC__ +//#define HAVE_LONGLONG +//#define LONGLONG LONGLONG +//#else +//#define LONGLONG long +//#endif + +/* Those are flags in the conversion format. */ +# define LONG 0x001 /* l: long or double */ +# define LONGDBL 0x002 /* L: LONGLONG or long double */ +# define SHORT 0x004 /* h: short */ +# define SUPPRESS 0x008 /* *: suppress assignment */ +# define POINTER 0x010 /* weird %p pointer (`fake hex') */ +# define NOSKIP 0x020 /* do not skip blanks */ +# define WIDTH 0x040 /* width was given */ +# define GROUP 0x080 /* ': group numbers */ +# define MALLOC 0x100 /* a: malloc strings */ + +# define TYPEMOD (LONG|LONGDBL|SHORT) + + +# define UNGETC(c, s) ((void) (((wint_t)c) != ((wint_t)EOF) && --read_in), ungetc (c, s)) +# define inchar() ((c = getc (s)), (void) (c != EOF && ++read_in), c) +# define encode_error() do { \ + funlockfile (s); \ + __set_errno (EILSEQ); \ + return done; \ + } while (0) +# define conv_error() do { \ + funlockfile (s); \ + CHECKPOINT1; \ + return done; \ + } while (0) +# define input_error() do { \ + funlockfile (s); \ + return done ? 0 : EOF; \ + } while (0) +# define memory_error() do { \ + funlockfile (s); \ + __set_errno (ENOMEM); \ + return EOF; \ + } while (0) +# define ARGCHECK(s, format) \ + do \ + { \ + /* Check file argument for consistence. */ \ + if (!__validfp (s) || !s->__mode.__read) \ + { \ + __set_errno (EBADF); \ + return EOF; \ + } \ + else if (format == NULL) \ + { \ + __set_errno (EINVAL); \ + return EOF; \ + } \ + } while (0) + +# define flockfile(S) /* nothing */ +# define funlockfile(S) /* nothing */ + +# define ADDW(Ch) \ +do{ \ + if (wpsize == wpmax) \ + { \ + char *old = wp; \ + wpmax = UCHAR_MAX > 2 * wpmax ? UCHAR_MAX : 2 * wpmax; \ + wp = (char *) malloc (wpmax); \ + if (old != NULL) \ + { \ + memcpy (wp, old, wpsize); \ + free(old); \ + } \ + } \ + wp[wpsize++] = (Ch); \ +}while(0) + + +int __vfscanf (FILE *s, const char *format, va_list argptr) +{ + va_list arg; + register const char *f = format; + register unsigned char fc; /* Current character of the format. */ + register size_t done = 0; /* Assignments done. */ + register size_t read_in = 0; /* Chars read in. */ + register int c = 0; /* Last char read. */ + register int width; /* Maximum field width. */ + register int flags; /* Modifiers for current format element. */ + + /* Status for reading F-P nums. */ + char got_dot, got_e, negative; + /* If a [...] is a [^...]. */ + char not_in; + /* Base for integral numbers. */ + int base; + /* Signedness for integral numbers. */ + int number_signed; + /* Decimal point character. */ + wchar_t decimal = '.'; + /* The thousands character of the current locale. */ + wchar_t thousands = ','; + /* Integral holding variables. */ + union + { + LONGLONG q; + ULONGLONG uq; + long int l; + unsigned long int ul; + } num; + /* Character-buffer pointer. */ + char *str = NULL; + wchar_t *wstr = NULL; + char **strptr = NULL; + size_t strsize = 0; + /* We must not react on white spaces immediately because they can + possibly be matched even if in the input stream no character is + available anymore. */ + int skip_space = 0; + /* Workspace. */ + char *wp = NULL; /* Workspace. */ + size_t wpmax = 0; /* Maximal size of workspace. */ + size_t wpsize = 0; /* Currently used bytes in workspace. */ + char *tw; /* Temporary pointer. */ + +#ifdef __va_copy + + __va_copy (arg, argptr); +#else + + arg = (va_list) argptr; +#endif + + + + /* Run through the format string. */ + while (*f != '\0') + { + unsigned int argpos; + /* Extract the next argument, which is of type TYPE. + For a %N$... spec, this is the Nth argument from the beginning; + otherwise it is the next argument after the state now in ARG. */ +#define ARG(type) va_arg(argptr,type) + + if (!isascii (*f)) + { + /* Non-ASCII, may be a multibyte. */ + // int len = mblen (f, strlen (f)); + int len =1; + if (len > 0) + { + do + { + c = inchar (); + if (c == EOF) + input_error (); + else if (c != *f++) + { + UNGETC (c, s); + conv_error (); + } + } + while (--len > 0); + continue; + } + } + + fc = *f++; + if (fc != '%') + { + /* Remember to skip spaces. */ + if (isspace (fc)) + { + skip_space = 1; + continue; + } + + /* Read a character. */ + c = inchar (); + + /* Characters other than format specs must just match. */ + if (c == EOF) + input_error (); + + /* We saw white space char as the last character in the format + string. Now it's time to skip all leading white space. */ + if (skip_space) + { + while (isspace (c)) + if (inchar () == EOF && *_errno() == EINTR) + conv_error (); + skip_space = 0; + } + + if (c != fc) + { + UNGETC (c, s); + conv_error (); + } + + continue; + } + + /* This is the start of the conversion string. */ + flags = 0; + + /* Initialize state of modifiers. */ + argpos = 0; + + /* Prepare temporary buffer. */ + wpsize = 0; + + /* Check for a positional parameter specification. */ + if (isdigit (*f)) + { + argpos = *f++ - '0'; + while (isdigit (*f)) + argpos = argpos * 10 + (*f++ - '0'); + if (*f == '$') + ++f; + else + { + /* Oops; that was actually the field width. */ + width = argpos; + flags |= WIDTH; + argpos = 0; + goto got_width; + } + } + + /* Check for the assignment-suppressing and the number grouping flag. */ + while (*f == '*' || *f == '\'') + switch (*f++) + { + case '*': + flags |= SUPPRESS; + break; + case '\'': + flags |= GROUP; + break; + } + + /* We have seen width. */ + if (isdigit (*f)) + flags |= WIDTH; + + /* Find the maximum field width. */ + width = 0; + while (isdigit (*f)) + { + width *= 10; + width += *f++ - '0'; + } +got_width: + if (width == 0) + width = -1; + + /* Check for type modifiers. */ + while (*f == 'h' || *f == 'l' || *f == 'L' || *f == 'a' || *f == 'q') + switch (*f++) + { + case 'h': + /* int's are short int's. */ + if (flags & TYPEMOD) + /* Signal illegal format element. */ + conv_error (); + flags |= SHORT; + break; + case 'l': + if (flags & (SHORT|LONGDBL)) + conv_error (); + else if (flags & LONG) + { + /* A double `l' is equivalent to an `L'. */ + flags &= ~LONG; + flags |= LONGDBL; + } + else + /* int's are long int's. */ + flags |= LONG; + break; + case 'q': + case 'L': + /* double's are long double's, and int's are LONGLONG int's. */ + if (flags & TYPEMOD) + /* Signal illegal format element. */ + conv_error (); + flags |= LONGDBL; + break; + case 'a': + if (flags & TYPEMOD) + /* Signal illegal format element. */ + conv_error (); + /* String conversions (%s, %[) take a `char **' + arg and fill it in with a malloc'd pointer. */ + flags |= MALLOC; + break; + } + + /* End of the format string? */ + if (*f == '\0') + conv_error (); + + /* We must take care for EINTR errors. */ + if (c == EOF && *_errno() == EINTR) + input_error (); + + /* Find the conversion specifier. */ + fc = *f++; + if (skip_space || (fc != '[' && fc != 'c' && fc != 'C' && fc != 'n')) + { + /* Eat whitespace. */ + do + if (inchar () == EOF && *_errno() == EINTR) + input_error (); + while (isspace (c)) + ; + UNGETC (c, s); + skip_space = 0; + } + + switch (fc) + { + case '%': /* Must match a literal '%'. */ + c = inchar (); + if (c != fc) + { + UNGETC (c, s); + conv_error (); + } + break; + + case 'n': /* Answer number of assignments done. */ + /* Corrigendum 1 to ISO C 1990 describes the allowed flags + with the 'n' conversion specifier. */ + if (!(flags & SUPPRESS)) + { + /* Don't count the read-ahead. */ + if (flags & LONGDBL) + *ARG (long int *) = read_in; + else if (flags & LONG) + *ARG (long int *) = read_in; + else if (flags & SHORT) + *ARG (short int *) = read_in; + else + *ARG (int *) = read_in; + +#ifdef NO_BUG_IN_ISO_C_CORRIGENDUM_1 + /* We have a severe problem here. The ISO C standard + contradicts itself in explaining the effect of the %n + format in `scanf'. While in ISO C:1990 and the ISO C + Amendement 1:1995 the result is described as + + Execution of a %n directive does not effect the + assignment count returned at the completion of + execution of the f(w)scanf function. + + in ISO C Corrigendum 1:1994 the following was added: + + Subclause 7.9.6.2 + Add the following fourth example: + In: + #include + int d1, d2, n1, n2, i; + i = sscanf("123", "%d%n%n%d", &d1, &n1, &n2, &d2); + the value 123 is assigned to d1 and the value3 to n1. + Because %n can never get an input failure the value + of 3 is also assigned to n2. The value of d2 is not + affected. The value 3 is assigned to i. + + We go for now with the historically correct code fro ISO C, + i.e., we don't count the %n assignments. When it ever + should proof to be wrong just remove the #ifdef above. */ + ++done; +#endif + + } + break; + + case 'c': /* Match characters. */ + if ((flags & LONG) == 0) + { + if (!(flags & SUPPRESS)) + { + str = ARG (char *); + if (str == NULL) + conv_error (); + } + + c = inchar (); + if (c == EOF) + input_error (); + + if (width == -1) + width = 1; + + if (!(flags & SUPPRESS)) + { + do + *str++ = c; + while (--width > 0 && inchar () != EOF); + } + else + while (--width > 0 && inchar () != EOF) + ; + + if (width > 0) + /* I.e., EOF was read. */ + --read_in; + + if (!(flags & SUPPRESS)) + ++done; + + break; + } + /* FALLTHROUGH */ + case 'C': + /* Get UTF-8 encoded wide character. Here we assume (as in + other parts of the libc) that we only have to handle + UTF-8. */ + { + wint_t val; + size_t cnt = 0; + int first = 1; + + if (!(flags & SUPPRESS)) + { + wstr = ARG (wchar_t *); + if (str == NULL) + conv_error (); + } + + do + { +#define NEXT_WIDE_CHAR(First) \ + c = inchar (); \ + if (c == EOF) { \ + /* EOF is only an error for the first character. */ \ + if (First) { \ + input_error (); \ + } \ + else \ + { \ + --read_in; \ + break; \ + } \ + } \ + val = c; \ + if (val >= 0x80) \ + { \ + if ((c & 0xc0) == 0x80 || (c & 0xfe) == 0xfe) \ + encode_error (); \ + if ((c & 0xe0) == 0xc0) \ + { \ + /* We expect two bytes. */ \ + cnt = 1; \ + val &= 0x1f; \ + } \ + else if ((c & 0xf0) == 0xe0) \ + { \ + /* We expect three bytes. */ \ + cnt = 2; \ + val &= 0x0f; \ + } \ + else if ((c & 0xf8) == 0xf0) \ + { \ + /* We expect four bytes. */ \ + cnt = 3; \ + val &= 0x07; \ + } \ + else if ((c & 0xfc) == 0xf8) \ + { \ + /* We expect five bytes. */ \ + cnt = 4; \ + val &= 0x03; \ + } \ + else \ + { \ + /* We expect six bytes. */ \ + cnt = 5; \ + val &= 0x01; \ + } \ + \ + do \ + { \ + c = inchar (); \ + if (c == EOF \ + || (c & 0xc0) == 0x80 || (c & 0xfe) == 0xfe) \ + encode_error (); \ + val <<= 6; \ + val |= c & 0x3f; \ + } \ + while (--cnt > 0); \ + } \ + \ + if (!(flags & SUPPRESS)) \ + *wstr++ = val; \ + first = 0 + + NEXT_WIDE_CHAR (first); + } + while (--width > 0); + + if (width > 0) + /* I.e., EOF was read. */ + --read_in; + + if (!(flags & SUPPRESS)) + ++done; + } + break; + + case 's': /* Read a string. */ + if (flags & LONG) + /* We have to process a wide character string. */ + goto wide_char_string; + +#define STRING_ARG(Str, Type) \ + if (!(flags & SUPPRESS)) \ + { \ + if (flags & MALLOC) \ + { \ + /* The string is to be stored in a malloc'd buffer. */ \ + strptr = ARG (char **); \ + if (strptr == NULL) \ + conv_error (); \ + /* Allocate an initial buffer. */ \ + strsize = 100; \ + *strptr = malloc (strsize * sizeof (Type)); \ + Str = (Type *) *strptr; \ + } \ + else \ + Str = ARG (Type *); \ + if (Str == NULL) \ + conv_error (); \ + } + + STRING_ARG (str, char); + + c = inchar (); + if (c == EOF) + input_error (); + + do + { + if (isspace (c)) + { + UNGETC (c, s); + break; + } +#define STRING_ADD_CHAR(Str, c, Type) \ + if (!(flags & SUPPRESS)) \ + { \ + *Str++ = c; \ + if ((flags & MALLOC) && (char *) Str == *strptr + strsize) \ + { \ + /* Enlarge the buffer. */ \ + Str = realloc (*strptr, strsize * 2 * sizeof (Type)); \ + if (Str == NULL) \ + { \ + /* Can't allocate that much. Last-ditch effort. */\ + Str = realloc (*strptr, \ + (strsize + 1) * sizeof (Type)); \ + if (Str == NULL) \ + { \ + /* We lose. Oh well. \ + Terminate the string and stop converting, \ + so at least we don't skip any input. */ \ + ((Type *) (*strptr))[strsize] = '\0'; \ + ++done; \ + conv_error (); \ + } \ + else \ + { \ + *strptr = (char *) Str; \ + Str = ((Type *) *strptr) + strsize; \ + ++strsize; \ + } \ + } \ + else \ + { \ + *strptr = (char *) Str; \ + Str = ((Type *) *strptr) + strsize; \ + strsize *= 2; \ + } \ + } \ + } + + STRING_ADD_CHAR (str, c, char); + } + while ((width <= 0 || --width > 0) && inchar () != EOF); + + if (!(flags & SUPPRESS)) + { + *str = '\0'; + ++done; + } + break; + + case 'S': + /* Wide character string. */ +wide_char_string: + { + wint_t val; + int first = 1; + STRING_ARG (wstr, wchar_t); + + do + { + size_t cnt = 0; + NEXT_WIDE_CHAR (first); + + if (iswspace (val)) + { + /* XXX We would have to push back the whole wide char + with possibly many bytes. But since scanf does + not make a difference for white space characters + we can simply push back a simple which is + guaranteed to be in the [:space:] class. */ + UNGETC (' ', s); + break; + } + + STRING_ADD_CHAR (wstr, val, wchar_t); + first = 0; + } + while (width <= 0 || --width > 0); + + if (!(flags & SUPPRESS)) + { + *wstr = L'\0'; + ++done; + } + } + break; + + case 'x': /* Hexadecimal integer. */ + case 'X': /* Ditto. */ + base = 16; + number_signed = 0; + goto number; + + case 'o': /* Octal integer. */ + base = 8; + number_signed = 0; + goto number; + + case 'u': /* Unsigned decimal integer. */ + base = 10; + number_signed = 0; + goto number; + + case 'd': /* Signed decimal integer. */ + base = 10; + number_signed = 1; + goto number; + + case 'i': /* Generic number. */ + base = 0; + number_signed = 1; + +number: + c = inchar (); + if (c == EOF) + input_error (); + + /* Check for a sign. */ + if (c == '-' || c == '+') + { + ADDW (c); + if (width > 0) + --width; + c = inchar (); + } + + /* Look for a leading indication of base. */ + if (width != 0 && c == '0') + { + if (width > 0) + --width; + + ADDW (c); + c = inchar (); + + if (width != 0 && tolower (c) == 'x') + { + if (base == 0) + base = 16; + if (base == 16) + { + if (width > 0) + --width; + c = inchar (); + } + } + else if (base == 0) + base = 8; + } + + if (base == 0) + base = 10; + + /* Read the number into workspace. */ + while (c != EOF && width != 0) + { + if (base == 16 ? !isxdigit (c) : + ((!isdigit (c) || c - '0' >= base) && + !((flags & GROUP) && base == 10 && c == thousands))) + break; + ADDW (c); + if (width > 0) + --width; + + c = inchar (); + } + + /* The just read character is not part of the number anymore. */ + UNGETC (c, s); + + if (wpsize == 0 || + (wpsize == 1 && (wp[0] == '+' || wp[0] == '-'))) + /* There was no number. */ + conv_error (); + + /* Convert the number. */ + ADDW ('\0'); + if (flags & LONGDBL) + { + // if (number_signed) + // num.q = __strtoq_internal (wp, &tw, base, flags & GROUP); + // else + // num.uq = __strtouq_internal (wp, &tw, base, flags & GROUP); + } + else + { + if (number_signed) + num.l = __strtol_internal (wp, &tw, base, flags & GROUP); + else + num.ul = __strtoul_internal (wp, &tw, base, flags & GROUP); + } + if (wp == tw) + conv_error (); + + if (!(flags & SUPPRESS)) + { + if (! number_signed) + { + if (flags & LONGDBL) + { + *ARG (ULONGLONG*) = num.uq; + } + else if (flags & LONG) + *ARG (unsigned long int*) = num.ul; + else if (flags & SHORT) + *ARG (unsigned short int*) = (unsigned short int) num.ul; + else + *ARG (unsigned int*) = (unsigned int) num.ul; + } + else + { + if (flags & LONGDBL) + { + *ARG (LONGLONG*) = num.q; + } + else if (flags & LONG) + *ARG (long int *) = num.l; + else if (flags & SHORT) + *ARG (short int *) = (short int) num.l; + else + *ARG (int *) = (int) num.l; + } + ++done; + } + break; + + case 'e': /* Floating-point numbers. */ + case 'E': + case 'f': + case 'g': + case 'G': + c = inchar (); + if (c == EOF) + input_error (); + + /* Check for a sign. */ + if (c == '-' || c == '+') + { + negative = c == '-'; + if (inchar () == EOF) + /* EOF is only an input error before we read any chars. */ + conv_error (); + if (width > 0) + --width; + } + else + negative = 0; + + got_dot = got_e = 0; + do + { + if (isdigit (c)) + ADDW (c); + else if (got_e && wp[wpsize - 1] == 'e' + && (c == '-' || c == '+')) + ADDW (c); + else if (wpsize > 0 && !got_e && tolower (c) == 'e') + { + ADDW ('e'); + got_e = got_dot = 1; + } + else if (c == decimal && !got_dot) + { + ADDW (c); + got_dot = 1; + } + else if ((flags & GROUP) && c == thousands && !got_dot) + ADDW (c); + else + { + /* The last read character is not part of the number + anymore. */ + UNGETC (c, s); + break; + } + if (width > 0) + --width; + } + while (width != 0 && inchar () != EOF); + + if (wpsize == 0) + conv_error (); + + /* Convert the number. */ + ADDW ('\0'); +#if 0 + + if (flags & LONGDBL) + { + long double d = __strtold_internal (wp, &tw, flags & GROUP); + if (!(flags & SUPPRESS) && tw != wp) + *ARG (long double *) = negative ? -d : d; + } +#endif + /* + double = long double in windows world. -Gunnar + */ + if (flags & (LONG|LONGDBL)) + { + double d = __strtod_internal (wp, &tw, flags & GROUP); + CHECKPOINT1; + if (!(flags & SUPPRESS) && tw != wp){ + CHECKPOINT1; + *ARG (double *) = negative ? -d : d; + } + } + else + { + float d = __strtof_internal (wp, &tw, flags & GROUP); + CHECKPOINT1; + if (!(flags & SUPPRESS) && tw != wp){ + CHECKPOINT1; + *ARG (float *) = negative ? -d : d; + } + } + + if (tw == wp) + conv_error (); + + if (!(flags & SUPPRESS)) + ++done; + break; + + case '[': /* Character class. */ + if (flags & LONG) + { + STRING_ARG (wstr, wchar_t); + c = '\0'; /* This is to keep gcc quiet. */ + } + else + { + STRING_ARG (str, char); + + c = inchar (); + if (c == EOF) + input_error (); + } + + if (*f == '^') + { + ++f; + not_in = 1; + } + else + not_in = 0; + + /* Fill WP with byte flags indexed by character. + We will use this flag map for matching input characters. */ + if (wpmax < UCHAR_MAX) + { + wpmax = UCHAR_MAX; + wp = (char *) alloca (wpmax); + } + memset (wp, 0, UCHAR_MAX); + + fc = *f; + if (fc == ']' || fc == '-') + { + /* If ] or - appears before any char in the set, it is not + the terminator or separator, but the first char in the + set. */ + wp[fc] = 1; + ++f; + } + + while ((fc = *f++) != '\0' && fc != ']') + { + if (fc == '-' && *f != '\0' && *f != ']' && + (unsigned char) f[-2] <= (unsigned char) *f) + { + /* Add all characters from the one before the '-' + up to (but not including) the next format char. */ + for (fc = f[-2]; fc < *f; ++fc) + wp[fc] = 1; + } + else + /* Add the character to the flag map. */ + wp[fc] = 1; + } + if (fc == '\0') + { + if (!(flags & LONG)) + UNGETC (c, s); + conv_error(); + } + + if (flags & LONG) + { + wint_t val; + int first = 1; + + do + { + size_t cnt = 0; + NEXT_WIDE_CHAR (first); + if (val > 255 || wp[val] == not_in) + { + /* XXX We have a problem here. We read a wide + character and this possibly took several + bytes. But we can only push back one single + character. To be sure we don't create wrong + input we push it back only in case it is + representable within one byte. */ + if (val < 0x80) + UNGETC (val, s); + break; + } + STRING_ADD_CHAR (wstr, val, wchar_t); + if (width > 0) + --width; + first = 0; + } + while (width != 0); + + if (first) + conv_error (); + + if (!(flags & SUPPRESS)) + { + *wstr = L'\0'; + ++done; + } + } + else + { + num.ul = read_in - 1; /* -1 because we already read one char. */ + do + { + if (wp[c] == not_in) + { + UNGETC (c, s); + break; + } + STRING_ADD_CHAR (str, c, char); + if (width > 0) + --width; + } + while (width != 0 && inchar () != EOF); + + if (read_in == num.ul) + conv_error (); + + if (!(flags & SUPPRESS)) + { + *str = '\0'; + ++done; + } + } + break; + + case 'p': /* Generic pointer. */ + base = 16; + /* A PTR must be the same size as a `long int'. */ + flags &= ~(SHORT|LONGDBL); + flags |= LONG; + number_signed = 0; + goto number; + } + } + + /* The last thing we saw int the format string was a white space. + Consume the last white spaces. */ + if (skip_space) + { + do + c = inchar (); + while (isspace (c)); + UNGETC (c, s); + } + + + return done; +} + + + +int +xfscanf(FILE *f, const char *fmt, ...) +{ + int r; + va_list a=0; + va_start(a, fmt); + r = __vfscanf(f, fmt, a); + va_end(a); + return r; +} + + +double __strtod_internal (const char *__nptr,char **__endptr, int __group) +{ + return strtod(__nptr,__endptr); +} +float __strtof_internal (const char *__nptr, char **__endptr,int __group) +{ + return (float)strtod(__nptr,__endptr); +} +static double powten[] = + { + 1e1L, 1e2L, 1e4L, 1e8L, 1e16L, 1e32L, 1e64L, 1e128L, 1e256L, +#ifdef __GNUC__ + 1e512L, 1e512L*1e512L, 1e2048L, 1e4096L +#else + 1e256L, 1e256L, 1e256L, 1e256L +#endif + }; + +long double __strtold_internal (const char *s,char **sret, int __group) +{ + + long double r; /* result */ + int e, ne; /* exponent */ + int sign; /* +- 1.0 */ + int esign; + int flags=0; + int l2powm1; + + r = 0.0L; + sign = 1; + e = ne = 0; + esign = 1; + + while(*s && isspace(*s)) + s++; + + if (*s == '+') + s++; + else if (*s == '-') + { + sign = -1; + s++; + } + + while ((*s >= '0') && (*s <= '9')) + { + flags |= 1; + r *= 10.0L; + r += *s - '0'; + s++; + } + + if (*s == '.') + { + s++; + while ((*s >= '0') && (*s <= '9')) + { + flags |= 2; + r *= 10.0L; + r += *s - '0'; + s++; + ne++; + } + } + if (flags == 0) + { + if (sret) + *sret = (char *)s; + return 0.0L; + } + + if ((*s == 'e') || (*s == 'E')) + { + s++; + if (*s == '+') + s++; + else if (*s == '-') + { + s++; + esign = -1; + } + while ((*s >= '0') && (*s <= '9')) + { + e *= 10; + e += *s - '0'; + s++; + } + } + if (esign < 0) + { + esign = -esign; + e = -e; + } + e = e - ne; + if (e < -4096) + { + /* possibly subnormal number, 10^e would overflow */ + r *= 1.0e-2048L; + e += 2048; + } + if (e < 0) + { + e = -e; + esign = -esign; + } + if (e >= 8192) + e = 8191; + if (e) + { + double d = 1.0L; + l2powm1 = 0; + while (e) + { + if (e & 1) + d *= powten[l2powm1]; + e >>= 1; + l2powm1++; + } + if (esign > 0) + r *= d; + else + r /= d; + } + if (sret) + *sret = (char *)s; + return r * sign; + + return 0; +} +long int __strtol_internal (const char *__nptr, char **__endptr, int __base, int __group) +{ + return strtol(__nptr,__endptr, __base); +} +unsigned long int __strtoul_internal (const char *__nptr, char **__endptr, int __base, int __group) +{ + return strtoul(__nptr,__endptr, __base); +} + + + + + + + + + diff --git a/reactos/lib/crt/stdio/vfwprint.c b/reactos/lib/crt/stdio/vfwprint.c new file mode 100644 index 00000000000..4e58b29bf95 --- /dev/null +++ b/reactos/lib/crt/stdio/vfwprint.c @@ -0,0 +1,854 @@ +/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ + +#ifdef __USE_W32API +#undef __USE_W32API +#endif + +//#include +#include // robd +#include // robd + +#include +#include +#include + + +int _isnanl(double x); +int _isinfl(double x); +int _isnan(double x); +int _isinf(double x); + + +int +__vfwprintf(FILE *fp, const wchar_t *fmt0, va_list argp); + + +/* + * @implemented + */ +int +vfwprintf(FILE *f, const wchar_t *fmt, va_list ap) +{ + int len; + wchar_t localbuf[BUFSIZ]; + +#if 0 + __fileno_lock(fileno(f)); +#endif + if (f->_flag & _IONBF) { + f->_flag &= ~_IONBF; + f->_ptr = f->_base = (char *)localbuf; + f->_bufsiz = BUFSIZ; + len = __vfwprintf(f,fmt,ap); + (void)fflush(f); + f->_flag |= _IONBF; + f->_base = NULL; + f->_bufsiz = 0; + f->_cnt = 0; + } else + len = __vfwprintf(f,fmt,ap); +#if 0 + __fileno_unlock(fileno(f)); +#endif + return (ferror(f) ? EOF : len); +} + + + +/* + * linux/lib/vsprintf.c + * + * Copyright (C) 1991, 1992 Linus Torvalds + */ + +/* vsprintf.c -- Lars Wirzenius & Linus Torvalds. */ +/* + * Wirzenius wrote this portably, Torvalds fucked it up :-) + */ + +/* + * Appropiated for the reactos kernel, March 1998 -- David Welch + */ + +#include + +#include +#include +#include +#include +#include +#include + + +#define ZEROPAD 1 /* pad with zero */ +#define SIGN 2 /* unsigned/signed long */ +#define PLUS 4 /* show plus */ +#define SPACE 8 /* space if plus */ +#define LEFT 16 /* left justified */ +#define SPECIAL 32 /* 0x */ +#define LARGE 64 /* use 'ABCDEF' instead of 'abcdef' */ +#define ZEROTRUNC 128 /* truncate zero 's */ + + +static int skip_wtoi(const wchar_t **s) +{ + int i=0; + + while (iswdigit(**s)) + i = i*10 + *((*s)++) - L'0'; + return i; +} + + +static int do_div(LONGLONG *n,int base) +{ + int __res = ((ULONGLONG) *n) % (unsigned) base; + *n = ((ULONGLONG) *n) / (unsigned) base; + return __res; +} + + +static int number(FILE * f, LONGLONG num, int base, int size, int precision ,int type) +{ + wchar_t c,sign,tmp[66]; + const wchar_t *digits=L"0123456789abcdefghijklmnopqrstuvwxyz"; + int i, done = 0; + + if (type & LARGE) + digits = L"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; + if (type & LEFT) + type &= ~ZEROPAD; + if (base < 2 || base > 36) + return done; + c = (type & ZEROPAD) ? L'0' : L' '; + sign = 0; + if (type & SIGN) { + if (num < 0) { + sign = L'-'; + num = -num; + size--; + } else if (type & PLUS) { + sign = L'+'; + size--; + } else if (type & SPACE) { + sign = L' '; + size--; + } + } + if (type & SPECIAL) { + if (base == 16) + size -= 2; + else if (base == 8) + size--; + } + i = 0; + if (num == 0) + tmp[i++]=L'0'; + else while (num != 0) + tmp[i++] = digits[do_div(&num,base)]; + if (i > precision) + precision = i; + size -= precision; + if (!(type&(ZEROPAD+LEFT))) + while(size-->0) + { + if (putwc(L' ',f) == WEOF) + return -1; + done++; + } + + if (sign) + { + if (putwc(sign,f) == WEOF) + return -1; + done++; + } + if (type & SPECIAL) { + if (base==8) { + if (putwc(L'0',f) == WEOF) + return -1; + done++; + } + else if (base==16) { + if (putwc(L'0', f) == WEOF) + return -1; + done++; + if (putwc(digits[33],f) == WEOF) + return -1; + done++; + } + } + if (!(type & LEFT)) + while (size-- > 0) + { + if (putwc(c,f) == WEOF) + return -1; + done++; + } + while (i < precision--) + { + if (putwc(L'0', f) == WEOF) + return -1; + done++; + } + while (i-- > 0) + { + if (putwc(tmp[i],f) == WEOF) + return -1; + done++; + } + while (size-- > 0) + { + if (putwc(L' ', f) == WEOF) + return -1; + done++; + } + return done; +} + + +static int numberf(FILE * f, double __n, wchar_t exp_sign, int size, int precision, int type) +{ + double exponent = 0.0; + double e; + long ie; + + //int x; + char *buf, *tmp; + int i = 0; + int j = 0; + //int k = 0; + + double frac, intr; + double p; + wchar_t sign; + wchar_t c; + char ro = 0; + int result, done = 0; + + union + { + double* __n; + double_t* n; + } n; + + n.__n = &__n; + + if ( exp_sign == L'g' || exp_sign == L'G' || exp_sign == L'e' || exp_sign == L'E' ) { + ie = ((unsigned int)n.n->exponent - (unsigned int)0x3ff); + exponent = ie/3.321928; + } + + if ( exp_sign == L'g' || exp_sign == L'G' ) { + type |= ZEROTRUNC; + if ( exponent < -4 || fabs(exponent) >= precision ) + exp_sign -= 2; // g -> e and G -> E + } + + if ( exp_sign == L'e' || exp_sign == L'E' ) { + frac = modf(exponent,&e); + if ( frac > 0.5 ) + e++; + else if ( frac < -0.5 ) + e--; + + result = numberf(f,__n/pow(10.0L,e),L'f',size-4, precision, type); + if (result < 0) + return -1; + done += result; + if (putwc( exp_sign,f) == WEOF) + return -1; + done++; + size--; + ie = (long)e; + type = LEFT | PLUS; + if ( ie < 0 ) + type |= SIGN; + + result = number(f,ie, 10,2, 2,type ); + if (result < 0) + return -1; + done += result; + return done; + } + + if ( exp_sign == 'f' ) { + buf = alloca(4096); + if (type & LEFT) { + type &= ~ZEROPAD; + } + + c = (type & ZEROPAD) ? L'0' : L' '; + sign = 0; + if (type & SIGN) { + if (__n < 0) { + sign = L'-'; + __n = fabs(__n); + size--; + } else if (type & PLUS) { + sign = L'+'; + size--; + } else if (type & SPACE) { + sign = L' '; + size--; + } + } + + frac = modf(__n,&intr); + + // # flags forces a . and prevents trucation of trailing zero's + + if ( precision > 0 ) { + //frac = modfl(__n,&intr); + i = precision-1; + while ( i >= 0 ) { + frac*=10.0L; + frac = modf(frac, &p); + buf[i] = (int)p + L'0'; + i--; + } + i = precision; + size -= precision; + + ro = 0; + if ( frac > 0.5 ) { + ro = 1; + } + + if ( precision >= 1 || type & SPECIAL) { + buf[i++] = '.'; + size--; + } + } + + if ( intr == 0.0 ) { + buf[i++] = L'0'; + size--; + } + else { + while ( intr > 0.0 ) { + p = intr; + intr/=10.0L; + modf(intr, &intr); + + p -= 10.0*intr; + + buf[i++] = (int)p + L'0'; + size--; + } + } + + j = 0; + while ( j < i && ro == 1 ) { + if ( buf[j] >= L'0' && buf[j] <= L'8' ) { + buf[j]++; + ro = 0; + } + else if ( buf[j] == L'9' ) { + buf[j] = L'0'; + } + j++; + } + if ( ro == 1 ) + buf[i++] = L'1'; + + buf[i] = 0; + + size -= precision; + if (!(type&(ZEROPAD+LEFT))) + while(size-->0) + { + if (putwc(L' ',f) == WEOF) + return -1; + done++; + } + if (sign) + { + if (putwc( sign,f) == WEOF) + return -1; + done++; + } + + if (!(type&(ZEROPAD+LEFT))) + while(size-->0) + { + if (putwc(L' ',f) == WEOF) + return -1; + done++; + } + if (type & SPECIAL) { + } + + if (!(type & LEFT)) + while (size-- > 0) + { + if (putwc(c,f) == WEOF) + return -1; + done++; + } + + tmp = buf; + if ( type & ZEROTRUNC && ((type & SPECIAL) != SPECIAL) ) { + j = 0; + while ( j < i && ( *tmp == L'0' || *tmp == L'.' )) { + tmp++; + i--; + } + } +// else +// while (i < precision--) +// putwc(L'0', f); + while (i-- > 0) + { + if (putwc(tmp[i],f) == WEOF) + return -1; + done++; + } + while (size-- > 0) + { + if (putwc(L' ', f) == WEOF) + return -1; + done++; + } + } + return done; +} + + + +static int string(FILE *f, const char* s, int len, int field_width, int precision, int flags) +{ + int i, done = 0; + if (s == NULL) + { + s = ""; + len = 6; + } + else + { + if (len == -1) + { + len = 0; + while ((unsigned int)len < (unsigned int)precision && s[len]) + len++; + } + else + { + if ((unsigned int)len > (unsigned int)precision) + len = precision; + } + } + if (!(flags & LEFT)) + while (len < field_width--) + { + if (putwc(L' ', f) == WEOF) + return -1; + done++; + } + for (i = 0; i < len; ++i) + { + if (putwc(*s++, f) == WEOF) + return -1; + done++; + } + while (len < field_width--) + { + if (putwc(L' ', f) == WEOF) + return -1; + done++; + } + return done; +} + +static int stringw(FILE *f, const wchar_t* sw, int len, int field_width, int precision, int flags) +{ + int i, done = 0; + if (sw == NULL) + { + sw = L""; + len = 6; + } + else + { + if (len == -1) + { + len = 0; + while ((unsigned int)len < (unsigned int)precision && sw[len]) + len++; + } + else + { + if ((unsigned int)len > (unsigned int)precision) + len = precision; + } + } + if (!(flags & LEFT)) + while (len < field_width--) + { + if (putwc(L' ', f) == WEOF) + return -1; + done++; + } + for (i = 0; i < len; ++i) + { + if (putwc(*sw++, f) == WEOF) + return -1; + done++; + } + while (len < field_width--) + { + if (putwc(L' ', f) == WEOF) + return -1; + done++; + } + return done; +} + +int __vfwprintf(FILE *f, const wchar_t *fmt, va_list args) +{ + int len = 0; + ULONGLONG num; + int base; + double _double; + const char *s; + const wchar_t* sw; + int result, done = 0; + + int flags; /* flags to number() */ + + int field_width; /* width of output field */ + int precision; /* min. # of digits for integers; max + number of chars for from string */ + int qualifier = 0; /* 'h', 'l', 'L' or 'I64' for integer fields */ + + for (; *fmt ; ++fmt) { + if (*fmt != L'%') { + if (putwc(*fmt,f) == WEOF) + return -1; + done++; + continue; + } + + /* process flags */ + flags = 0; + repeat: + ++fmt; /* this also skips first '%' */ + switch (*fmt) { + case L'-': flags |= LEFT; goto repeat; + case L'+': flags |= PLUS; goto repeat; + case L' ': flags |= SPACE; goto repeat; + case L'#': flags |= SPECIAL; goto repeat; + case L'0': flags |= ZEROPAD; goto repeat; + } + + /* get field width */ + field_width = -1; + if (isxdigit(*fmt)) + field_width = skip_wtoi(&fmt); + else if (*fmt == L'*') { + ++fmt; + /* it's the next argument */ + field_width = va_arg(args, int); + if (field_width < 0) { + field_width = -field_width; + flags |= LEFT; + } + } + + /* get the precision */ + precision = -1; + if (*fmt == L'.') { + ++fmt; + if (iswdigit(*fmt)) + precision = skip_wtoi(&fmt); + else if (*fmt == L'*') { + ++fmt; + /* it's the next argument */ + precision = va_arg(args, int); + } + if (precision < 0) + precision = 0; + } + + /* get the conversion qualifier */ + qualifier=0; + // %Z can be just stand alone or as size_t qualifier + if ( *fmt == 'Z' ) { + qualifier = *fmt; + switch ( *(fmt+1)) { + case L'o': + case L'b': + case L'X': + case L'x': + case L'd': + case L'i': + case L'u': + ++fmt; + break; + default: + break; + } + } else if (*fmt == L'h' || *fmt == L'l' || *fmt == L'L' || *fmt == L'w') { + qualifier = *fmt; + ++fmt; + } else if (*fmt == L'I' && *(fmt+1) == L'6' && *(fmt+2) == L'4') { + qualifier = *fmt; + fmt += 3; + } + + // go fine with ll instead of L + if ( *fmt == L'l' ) { + ++fmt; + qualifier = L'L'; + } + + /* default base */ + base = 10; + + switch (*fmt) { + case L'c': /* finished */ + if (!(flags & LEFT)) + while (--field_width > 0) + { + if (putwc(L' ', f) == WEOF) + return -1; + done++; + } + if (qualifier == L'h') + { + if (putwc((wchar_t) va_arg(args, int), f) == WEOF) + return -1; + } + else + { + if (putwc((wchar_t) va_arg(args, int), f) == WEOF) + return -1; + } + done++; + while (--field_width > 0) + { + if (putwc(L' ', f) == WEOF) + return -1; + done++; + } + continue; + + case L'C': /* finished */ + if (!(flags & LEFT)) + while (--field_width > 0) + { + if (putwc(L' ', f) == WEOF) + return -1; + done++; + } + if (qualifier == L'l' || qualifier == L'w') + { + if (putwc((unsigned char) va_arg(args, int), f) == WEOF) + return -1; + } + else + { + if (putwc((unsigned char) va_arg(args, int), f) == WEOF) + return -1; + } + done++; + while (--field_width > 0) + { + if (putwc(L' ', f) == WEOF) + return -1; + done++; + } + continue; + + case L's': /* finished */ + if (qualifier == L'h') { + /* print ascii string */ + s = va_arg(args, char *); + result = string(f, s, -1, field_width, precision, flags); + } else { + /* print unicode string */ + sw = va_arg(args, wchar_t *); + result = stringw(f, sw, -1, field_width, precision, flags); + } + if (result < 0) + return -1; + done += result; + continue; + + case L'S': + if (qualifier == L'l' || qualifier == L'w') { + /* print unicode string */ + sw = va_arg(args, wchar_t *); + result = stringw(f, sw, -1, field_width, precision, flags); + } else { + /* print ascii string */ + s = va_arg(args, char *); + result = string(f, s, -1, field_width, precision, flags); + } + if (result < 0) + return -1; + done += result; + continue; + + case L'Z': /* finished */ + if (qualifier == L'w') { + /* print counted unicode string */ + PUNICODE_STRING pus = va_arg(args, PUNICODE_STRING); + if ((pus == NULL) || (pus->Buffer)) { + sw = NULL; + len = -1; + } else { + sw = pus->Buffer; + } + result = stringw(f, sw, len, field_width, precision, flags); + } else { + /* print counted ascii string */ + PANSI_STRING pus = va_arg(args, PANSI_STRING); + if ((pus == NULL) || (pus->Buffer)) { + s = NULL; + len = -1; + } else { + s = pus->Buffer; + len = pus->Length; + } + result = string(f, s, len, field_width, precision, flags); + } + if (result < 0) + return -1; + done += result; + continue; + + case L'e': /* finished */ + case L'E': + case L'f': + case L'g': + case L'G': + _double = (double)va_arg(args, double); + + if ( _isnan(_double) ) { + sw = L"Nan"; + len = 3; + while ( len > 0 ) { + if (putwc(*sw++,f) == WEOF) + return -1; + done++; + len --; + } + } else if ( _isinf(_double) < 0 ) { + sw = L"-Inf"; + len = 4; + while ( len > 0 ) { + if (putwc(*sw++,f) == WEOF) + return -1; + done++; + len --; + } + } else if ( _isinf(_double) > 0 ) { + sw = L"+Inf"; + len = 4; + while ( len > 0 ) { + if (putwc(*sw++,f) == WEOF) + return -1; + done++; + len --; + } + } else { + if ( precision == -1 ) + precision = 6; + result = numberf(f,_double,*fmt,field_width,precision,flags); + if (result < 0) + return -1; + done += result; + } + continue; + + case L'p': + if (field_width == -1) { + field_width = 2*sizeof(void *); + flags |= ZEROPAD; + } + result = number(f, + (unsigned long) va_arg(args, void *), 16, + field_width, precision, flags); + if (result < 0) + return -1; + done += result; + continue; + + case L'n': + if (qualifier == L'l') { + long * ip = va_arg(args, long *); + *ip = 0; + } else { + int * ip = va_arg(args, int *); + *ip = 0; + } + continue; + + /* integer number formats - set up the flags and "break" */ + case L'o': + base = 8; + break; + + case L'b': + base = 2; + break; + + case L'X': + flags |= LARGE; + case L'x': + base = 16; + break; + + case L'd': + case L'i': + flags |= SIGN; + case L'u': + break; + + default: + if (*fmt != L'%') + { + if (putwc(L'%', f) == WEOF) + return -1; + done++; + } + if (*fmt) + { + if (putwc(*fmt, f) == WEOF) + return -1; + done++; + } + else + --fmt; + continue; + } + + if (qualifier == L'I') + num = va_arg(args, ULONGLONG); + else if (qualifier == L'l') { + if (flags & SIGN) + num = va_arg(args, long); + else + num = va_arg(args, unsigned long); + } + else if (qualifier == L'h') { + if (flags & SIGN) + num = va_arg(args, int); + else + num = va_arg(args, unsigned int); + } + else if (flags & SIGN) + num = va_arg(args, int); + else + num = va_arg(args, unsigned int); + result = number(f, num, base, field_width, precision, flags); + if (result < 0) + return -1; + done += result; + } + //putwc(L'\0',f); + return done; +} + +/* EOF */ diff --git a/reactos/lib/crt/stdio/vprintf.c b/reactos/lib/crt/stdio/vprintf.c new file mode 100644 index 00000000000..f487414ec8f --- /dev/null +++ b/reactos/lib/crt/stdio/vprintf.c @@ -0,0 +1,83 @@ +/* Copyright (C) 1991, 1993, 1995 Free Software Foundation, Inc. +This file is part of the GNU C Library. + +The GNU C Library is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +The GNU C 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#undef __OPTIMIZE__ /* Avoid inline `vprintf' function. */ +#include +#include + + +#undef vprintf +#undef vwprintf + +//#define _USE_VARARG_ + +#ifndef _USE_VARARG_ + +/* + * @implemented + */ +int vprintf(const char* format, va_list arg) +{ + int ret; + + ret = vfprintf(stdout, format, arg); + fflush(stdout); + return ret; +} + +/* + * @implemented + */ +int vwprintf(const wchar_t* format, va_list arg) +{ + int ret; + + ret = vfwprintf(stdout, format, arg); + fflush(stdout); + return ret; +} + +#else + +int vprintf(const char* format, ...) +{ + va_list arg; + int ret; + + va_start(arg, format); + ret = vfprintf(stdout, format, arg); + va_end(arg); + + fflush(stdout); + return ret; +} + +int vwprintf(const wchar_t* format, ...) +{ + va_list arg; + int ret; + + va_start(arg, format); + ret = vfwprintf(stdout, format, arg); + va_end(arg); + fflush(stdout); + return ret; +} + +#endif diff --git a/reactos/lib/crt/stdio/vscanf.c b/reactos/lib/crt/stdio/vscanf.c new file mode 100644 index 00000000000..4c6b7968964 --- /dev/null +++ b/reactos/lib/crt/stdio/vscanf.c @@ -0,0 +1,34 @@ +/* Copyright (C) 1991, 1992, 1996 Free Software Foundation, Inc. +This file is part of the GNU C Library. + +The GNU C Library is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +The GNU C 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include +#include + + +#undef vscanf + + +/* Read formatted input from stdin according to the format + string in FORMAT, using the argument list in ARG. */ +int __vscanf (const char *format, va_list arg) +{ + return __vfscanf(stdin, format, arg); +} + diff --git a/reactos/lib/crt/stdio/vsprintf.c b/reactos/lib/crt/stdio/vsprintf.c new file mode 100644 index 00000000000..9209bb1b3f3 --- /dev/null +++ b/reactos/lib/crt/stdio/vsprintf.c @@ -0,0 +1,80 @@ +/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ +#include +#include +#include +#include + +/* + * @implemented + */ +int +vsprintf(char *str, const char *fmt, va_list ap) +{ + FILE f; + int len; + + f._flag = _IOWRT|_IOSTRG|_IOBINARY; + f._ptr = str; + f._cnt = INT_MAX; + f._file = -1; + len = vfprintf(&f,fmt, ap); + *f._ptr = 0; + return len; +} + +/* + * @implemented + */ +int +vswprintf(wchar_t *str, const wchar_t *fmt, va_list ap) +{ + FILE f; + int len; + + f._flag = _IOWRT|_IOSTRG|_IOBINARY; + f._ptr = (char*)str; + f._cnt = INT_MAX; + f._file = -1; + len = vfwprintf(&f,fmt, ap); + *(wchar_t*)f._ptr = 0; + return len; +} + + +/* + * @implemented + */ +int +_vsnprintf(char *str, size_t maxlen, const char *fmt, va_list ap) +{ + FILE f; + int len; + f._flag = _IOWRT|_IOSTRG|_IOBINARY; + f._ptr = str; + f._cnt = maxlen; + f._file = -1; + len = vfprintf(&f,fmt, ap); + // what if the buffer is full ?? + *f._ptr = 0; + return len; +} + +/* + * @implemented + */ +int +_vsnwprintf(wchar_t *str, size_t maxlen, const wchar_t *fmt, va_list ap) +{ + FILE f; + int len; + f._flag = _IOWRT|_IOSTRG|_IOBINARY; + f._ptr = (char*)str; + f._cnt = maxlen; + f._file = -1; + len = vfwprintf(&f,fmt, ap); + // what if the buffer is full ?? + *(wchar_t*)f._ptr = 0; + return len; +} + + diff --git a/reactos/lib/crt/stdio/vsscanf.c b/reactos/lib/crt/stdio/vsscanf.c new file mode 100644 index 00000000000..b24fe72f620 --- /dev/null +++ b/reactos/lib/crt/stdio/vsscanf.c @@ -0,0 +1,50 @@ +/* Copyright (C) 1991, 1992, 1995, 1996 Free Software Foundation, Inc. +This file is part of the GNU C Library. + +The GNU C Library is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +The GNU C 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include +#include +#include +#include + +#undef vsscanf + +/* Read formatted input from S according to the format + string FORMAT, using the argument list in ARG. */ +int __vsscanf(const char *s,const char *format,va_list arg) +{ + FILE f; + + if (s == NULL) + { + __set_errno(EINVAL); + return -1; + } + + memset((void *) &f, 0, sizeof (f)); + + f._flag = _IOREAD|_IOSTRG|_IOBINARY; + f._ptr = (char *)s; + f._base = (char *)s; + f._bufsiz = strlen(s); + f._cnt = f._bufsiz; + + return __vfscanf(&f, format, arg); +} + diff --git a/reactos/lib/crt/stdio/wfdopen.c b/reactos/lib/crt/stdio/wfdopen.c new file mode 100644 index 00000000000..08bbeb9455c --- /dev/null +++ b/reactos/lib/crt/stdio/wfdopen.c @@ -0,0 +1,57 @@ +#include +#include + +FILE* __alloc_file(void); + + +/* + * @implemented + */ +FILE* _wfdopen(int handle, wchar_t* mode) +{ + FILE* file; + int rw; + + if (handle == 0) + return stdin; + + if (handle == 1) + return stdout; + + if (handle == 2) + return stderr; + + if (handle == 3) + return stdaux; + + if (handle == 4) + return stdprn; + + file = __alloc_file(); + if (file == NULL) + return NULL; + file->_file = handle; + + rw = (mode[1] == L'+') || (mode[1] && (mode[2] == L'+')); + + if (*mode == L'a') + _lseek(handle, 0, SEEK_END); + + file->_cnt = 0; + file->_file = handle; + file->_bufsiz = 0; + +// The mode of the stream must be compatible with the mode of the file descriptor. +// this should be checked. + + if (rw) + file->_flag = _IOREAD | _IOWRT; + else if (*mode == L'r') + file->_flag = _IOREAD; + else + file->_flag = _IOWRT; + + file->_base = file->_ptr = NULL; + + return file; +} diff --git a/reactos/lib/crt/stdio/wrename.c b/reactos/lib/crt/stdio/wrename.c new file mode 100644 index 00000000000..1c78865ea2d --- /dev/null +++ b/reactos/lib/crt/stdio/wrename.c @@ -0,0 +1,18 @@ +#include "precomp.h" +#include +#include + + +/* + * @implemented + */ +int _wrename(const wchar_t* old_, const wchar_t* new_) +{ + if (old_ == NULL || new_ == NULL) + return -1; + + if (!MoveFileW(old_, new_)) + return -1; + + return 0; +} diff --git a/reactos/lib/crt/stdio/wtempnam.c b/reactos/lib/crt/stdio/wtempnam.c new file mode 100644 index 00000000000..4f73f8c9d0d --- /dev/null +++ b/reactos/lib/crt/stdio/wtempnam.c @@ -0,0 +1,25 @@ +#include "precomp.h" +#include +#include + + +/* + * @implemented + */ +wchar_t* _wtempnam(const wchar_t* dir, const wchar_t* prefix) +{ + wchar_t* TempFileName = malloc(MAX_PATH); + wchar_t* d; + + if (dir == NULL) + d = _wgetenv(L"TMP"); + else + d = (wchar_t*)dir; + + if (GetTempFileNameW(d, prefix, 1, TempFileName) == 0) { + free(TempFileName); + return NULL; + } + + return TempFileName; +} diff --git a/reactos/lib/crt/stdio/wtmpnam.c b/reactos/lib/crt/stdio/wtmpnam.c new file mode 100644 index 00000000000..770e6ecacb0 --- /dev/null +++ b/reactos/lib/crt/stdio/wtmpnam.c @@ -0,0 +1,19 @@ +#include "precomp.h" +#include +#include + + +/* + * @implemented + */ +wchar_t* _wtmpnam(wchar_t* s) +{ + wchar_t PathName[MAX_PATH]; + static wchar_t static_buf[MAX_PATH]; + + GetTempPathW(MAX_PATH, PathName); + GetTempFileNameW(PathName, L"ARI", 007, static_buf); + wcscpy(s, static_buf); + + return s; +} diff --git a/reactos/lib/crt/stdlib/_exit.c b/reactos/lib/crt/stdlib/_exit.c new file mode 100644 index 00000000000..cb7b5e1a37b --- /dev/null +++ b/reactos/lib/crt/stdlib/_exit.c @@ -0,0 +1,58 @@ +#include "precomp.h" +#include +#include +#include +#include + +struct __atexit *__atexit_ptr = 0; + +/* + * @implemented + */ +void exit(int status) +{ + //int i; + struct __atexit *a = __atexit_ptr; + __atexit_ptr = 0; /* to prevent infinite loops */ + while (a) + { + (a->__function)(); + a = a->__next; + } +/* + if (__stdio_cleanup_hook) + __stdio_cleanup_hook(); + for (i=0; i +#include +#include +#include + +char *msg ="Abort\n\r"; + +/* + * @implemented + */ +void abort() +{ + fflush(NULL); + fcloseall(); + raise(SIGABRT); + _write(stderr->_file, msg, sizeof(msg)-1); + exit(3); +} + diff --git a/reactos/lib/crt/stdlib/abs.c b/reactos/lib/crt/stdlib/abs.c new file mode 100644 index 00000000000..3efdce831fd --- /dev/null +++ b/reactos/lib/crt/stdlib/abs.c @@ -0,0 +1,12 @@ +/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ +#include +#include + +/* + * @implemented + */ +int +abs(int j) +{ + return j<0 ? -j : j; +} diff --git a/reactos/lib/crt/stdlib/atexit.c b/reactos/lib/crt/stdlib/atexit.c new file mode 100644 index 00000000000..6d08dfd160f --- /dev/null +++ b/reactos/lib/crt/stdlib/atexit.c @@ -0,0 +1,59 @@ +/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ +#include +#include + +typedef int (* _onexit_t)(void); + +/* + * @implemented + * + * Ported from WINE + * Copyright (C) 2000 Jon Griffiths + */ +_onexit_t __dllonexit(_onexit_t func, _onexit_t **start, _onexit_t **end) +{ + _onexit_t *tmp; + int len; + + if (!start || !*start || !end || !*end) + return NULL; + + len = (*end - *start); + if (++len <= 0) + return NULL; + + tmp = (_onexit_t *)realloc(*start, len * sizeof(tmp)); + if (!tmp) + return NULL; + + *start = tmp; + *end = tmp + len; + tmp[len - 1] = func; + + return func; +} + +/* + * @implemented + */ +_onexit_t _onexit(_onexit_t a) +{ + struct __atexit *ap; + if (a == 0) + return NULL; + ap = (struct __atexit *)malloc(sizeof(struct __atexit)); + if (!ap) + return NULL; + ap->__next = __atexit_ptr; + ap->__function = (void (*)(void))a; + __atexit_ptr = ap; + return a; +} + +/* + * @implemented + */ +int atexit(void (*a)(void)) +{ + return _onexit((_onexit_t)a) == (_onexit_t)a ? 0 : -1; +} diff --git a/reactos/lib/crt/stdlib/atof.c b/reactos/lib/crt/stdlib/atof.c new file mode 100644 index 00000000000..e3021084b92 --- /dev/null +++ b/reactos/lib/crt/stdlib/atof.c @@ -0,0 +1,11 @@ +/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ +#include + +/* + * @implemented + */ +double +atof(const char *ascii) +{ + return strtod(ascii, 0); +} diff --git a/reactos/lib/crt/stdlib/atoi.c b/reactos/lib/crt/stdlib/atoi.c new file mode 100644 index 00000000000..df6a0c47002 --- /dev/null +++ b/reactos/lib/crt/stdlib/atoi.c @@ -0,0 +1,11 @@ +/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ +#include + +/* + * @implemented + */ +int +atoi(const char *str) +{ + return (int)strtol(str, 0, 10); +} diff --git a/reactos/lib/crt/stdlib/atoi64.c b/reactos/lib/crt/stdlib/atoi64.c new file mode 100644 index 00000000000..6855b90fbcd --- /dev/null +++ b/reactos/lib/crt/stdlib/atoi64.c @@ -0,0 +1,34 @@ + +#include +#include + +/* + * @implemented + */ +__int64 +_atoi64(const char *nptr) +{ + char *s = (char *)nptr; + __int64 acc = 0; + int neg = 0; + + while(isspace((int)*s)) + s++; + if (*s == '-') + { + neg = 1; + s++; + } + else if (*s == '+') + s++; + + while (isdigit((int)*s)) + { + acc = 10 * acc + ((int)*s - '0'); + s++; + } + + if (neg) + acc *= -1; + return acc; +} diff --git a/reactos/lib/crt/stdlib/atol.c b/reactos/lib/crt/stdlib/atol.c new file mode 100644 index 00000000000..663301d95fc --- /dev/null +++ b/reactos/lib/crt/stdlib/atol.c @@ -0,0 +1,11 @@ +/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ +#include + +/* + * @implemented + */ +long +atol(const char *str) +{ + return strtol(str, 0, 10); +} diff --git a/reactos/lib/crt/stdlib/atold.c b/reactos/lib/crt/stdlib/atold.c new file mode 100644 index 00000000000..c9b511684a4 --- /dev/null +++ b/reactos/lib/crt/stdlib/atold.c @@ -0,0 +1,8 @@ +/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ +#include + +long double +_atold(const char *ascii) +{ + return _strtold(ascii, 0); +} diff --git a/reactos/lib/crt/stdlib/bsearch.c b/reactos/lib/crt/stdlib/bsearch.c new file mode 100644 index 00000000000..7efbdbd9897 --- /dev/null +++ b/reactos/lib/crt/stdlib/bsearch.c @@ -0,0 +1,28 @@ +/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ +#include + +/* + * @implemented + */ +void * +bsearch(const void *key, const void *base0, size_t nelem, + size_t size, int (*cmp)(const void *ck, const void *ce)) +{ + char *base = (char *)base0; + int lim, cmpval; + void *p; + + for (lim = nelem; lim != 0; lim >>= 1) + { + p = base + (lim >> 1) * size; + cmpval = (*cmp)(key, p); + if (cmpval == 0) + return p; + if (cmpval > 0) + { /* key > p: move right */ + base = (char *)p + size; + lim--; + } /* else move left */ + } + return 0; +} diff --git a/reactos/lib/crt/stdlib/div.c b/reactos/lib/crt/stdlib/div.c new file mode 100644 index 00000000000..56b8b4422f8 --- /dev/null +++ b/reactos/lib/crt/stdlib/div.c @@ -0,0 +1,27 @@ +/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ +#include + +/* + * @implemented + */ +div_t +div(int num, int denom) +{ + div_t r; + + if (num > 0 && denom < 0) { + num = -num; + denom = -denom; + } + r.quot = num / denom; + r.rem = num % denom; + if (num < 0 && denom > 0) + { + if (r.rem > 0) + { + r.quot++; + r.rem -= denom; + } + } + return r; +} diff --git a/reactos/lib/crt/stdlib/doserrmap.h b/reactos/lib/crt/stdlib/doserrmap.h new file mode 100644 index 00000000000..3b1307146f4 --- /dev/null +++ b/reactos/lib/crt/stdlib/doserrmap.h @@ -0,0 +1,82 @@ +/* doserrmap.h: auto-generated from winerror.h and errno.h using undoc'd _dosmaperr. */ + +#ifndef doserrmap_h +#define doserrmap_h + +struct { + unsigned long winerr; + int en; +} doserrmap[] = { + { ERROR_FILE_NOT_FOUND, ENOENT }, + { ERROR_PATH_NOT_FOUND, ENOENT }, + { ERROR_TOO_MANY_OPEN_FILES, EMFILE }, + { ERROR_ACCESS_DENIED, EACCES }, + { ERROR_INVALID_HANDLE, EBADF }, + { ERROR_ARENA_TRASHED, ENOMEM }, + { ERROR_NOT_ENOUGH_MEMORY, ENOMEM }, + { ERROR_INVALID_BLOCK, ENOMEM }, + { ERROR_BAD_ENVIRONMENT, E2BIG }, + { ERROR_BAD_FORMAT, ENOEXEC }, + { ERROR_INVALID_DRIVE, ENOENT }, + { ERROR_CURRENT_DIRECTORY, EACCES }, + { ERROR_NOT_SAME_DEVICE, EXDEV }, + { ERROR_NO_MORE_FILES, ENOENT }, + { ERROR_WRITE_PROTECT, EACCES }, + { ERROR_BAD_UNIT, EACCES }, + { ERROR_NOT_READY, EACCES }, + { ERROR_BAD_COMMAND, EACCES }, + { ERROR_CRC, EACCES }, + { ERROR_BAD_LENGTH, EACCES }, + { ERROR_SEEK, EACCES }, + { ERROR_NOT_DOS_DISK, EACCES }, + { ERROR_SECTOR_NOT_FOUND, EACCES }, + { ERROR_OUT_OF_PAPER, EACCES }, + { ERROR_WRITE_FAULT, EACCES }, + { ERROR_READ_FAULT, EACCES }, + { ERROR_GEN_FAILURE, EACCES }, + { ERROR_SHARING_VIOLATION, EACCES }, + { ERROR_LOCK_VIOLATION, EACCES }, + { ERROR_WRONG_DISK, EACCES }, + { ERROR_SHARING_BUFFER_EXCEEDED, EACCES }, + { ERROR_BAD_NETPATH, ENOENT }, + { ERROR_NETWORK_ACCESS_DENIED, EACCES }, + { ERROR_BAD_NET_NAME, ENOENT }, + { ERROR_FILE_EXISTS, EEXIST }, + { ERROR_CANNOT_MAKE, EACCES }, + { ERROR_FAIL_I24, EACCES }, + { ERROR_NO_PROC_SLOTS, EAGAIN }, + { ERROR_DRIVE_LOCKED, EACCES }, + { ERROR_BROKEN_PIPE, EPIPE }, + { ERROR_DISK_FULL, ENOSPC }, + { ERROR_INVALID_TARGET_HANDLE, EBADF }, + { ERROR_WAIT_NO_CHILDREN, ECHILD }, + { ERROR_CHILD_NOT_COMPLETE, ECHILD }, + { ERROR_DIRECT_ACCESS_HANDLE, EBADF }, + { ERROR_SEEK_ON_DEVICE, EACCES }, + { ERROR_DIR_NOT_EMPTY, ENOTEMPTY }, + { ERROR_NOT_LOCKED, EACCES }, + { ERROR_BAD_PATHNAME, ENOENT }, + { ERROR_MAX_THRDS_REACHED, EAGAIN }, + { ERROR_LOCK_FAILED, EACCES }, + { ERROR_ALREADY_EXISTS, EEXIST }, + { ERROR_INVALID_STARTING_CODESEG, ENOEXEC }, + { ERROR_INVALID_STACKSEG, ENOEXEC }, + { ERROR_INVALID_MODULETYPE, ENOEXEC }, + { ERROR_INVALID_EXE_SIGNATURE, ENOEXEC }, + { ERROR_EXE_MARKED_INVALID, ENOEXEC }, + { ERROR_BAD_EXE_FORMAT, ENOEXEC }, + { ERROR_ITERATED_DATA_EXCEEDS_64k, ENOEXEC }, + { ERROR_INVALID_MINALLOCSIZE, ENOEXEC }, + { ERROR_DYNLINK_FROM_INVALID_RING, ENOEXEC }, + { ERROR_IOPL_NOT_ENABLED, ENOEXEC }, + { ERROR_INVALID_SEGDPL, ENOEXEC }, + { ERROR_AUTODATASEG_EXCEEDS_64k, ENOEXEC }, + { ERROR_RING2SEG_MUST_BE_MOVABLE, ENOEXEC }, + { ERROR_RELOC_CHAIN_XEEDS_SEGLIM, ENOEXEC }, + { ERROR_INFLOOP_IN_RELOC_CHAIN, ENOEXEC }, + { ERROR_FILENAME_EXCED_RANGE, ENOENT }, + { ERROR_NESTING_NOT_ALLOWED, EAGAIN }, + { ERROR_NOT_ENOUGH_QUOTA, ENOMEM } +}; + +#endif /* doserrmap_h */ diff --git a/reactos/lib/crt/stdlib/ecvt.c b/reactos/lib/crt/stdlib/ecvt.c new file mode 100644 index 00000000000..940ffb2ed27 --- /dev/null +++ b/reactos/lib/crt/stdlib/ecvt.c @@ -0,0 +1,15 @@ +/* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ +#include +#include + +char *ecvtbuf (double, int, int *, int *, char *); + +/* + * @implemented + */ +char * +_ecvt (double value, int ndigits, int *decpt, int *sign) +{ + static char ecvt_buf[DBL_MAX_10_EXP + 10]; + return ecvtbuf (value, ndigits, decpt, sign, ecvt_buf); +} diff --git a/reactos/lib/crt/stdlib/ecvtbuf.c b/reactos/lib/crt/stdlib/ecvtbuf.c new file mode 100644 index 00000000000..1d0f65fbba8 --- /dev/null +++ b/reactos/lib/crt/stdlib/ecvtbuf.c @@ -0,0 +1,108 @@ +/* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ +#include +#include +#include +#include +#include +// #include + +void __ecvround (char *, char *, const char *, int *); + +void +__ecvround (char *numbuf, char *last_digit, const char *after_last, int *decpt) +{ + char *p; + int carry = 0; + + /* Do we have at all to round the last digit? */ + if (*after_last > '4') + { + p = last_digit; + carry = 1; + + /* Propagate the rounding through trailing '9' digits. */ + do { + int sum = *p + carry; + carry = sum > '9'; + *p-- = sum - carry * 10; + } while (carry && p >= numbuf); + + /* We have 9999999... which needs to be rounded to 100000.. */ + if (carry && p == numbuf) + { + *p = '1'; + *decpt += 1; + } + } +} + +char * +ecvtbuf (double value, int ndigits, int *decpt, int *sign, char *buf) +{ + static char INFINITY[] = "Infinity"; + char decimal = '.' /* localeconv()->decimal_point[0] */; + char *cvtbuf = (char *)alloca (ndigits + 20); /* +3 for sign, dot, null; */ + /* two extra for rounding */ + /* 15 extra for alignment */ + char *s = cvtbuf, *d = buf; + + /* Produce two extra digits, so we could round properly. */ + sprintf (cvtbuf, "%-+.*E", ndigits + 2, value); + *decpt = 0; + + /* The sign. */ + if (*s++ == '-') + *sign = 1; + else + *sign = 0; + + /* Special values get special treatment. */ + if (strncmp (s, "Inf", 3) == 0) + { + /* SunOS docs says we have return "Infinity" for NDIGITS >= 8. */ + memcpy (buf, INFINITY, ndigits >= 8 ? 9 : 3); + if (ndigits < 8) + buf[3] = '\0'; + } + else if (strcmp (s, "NaN") == 0) + memcpy (buf, s, 4); + else + { + char *last_digit, *digit_after_last; + + /* Copy (the single) digit before the decimal. */ + while (*s && *s != decimal && d - buf < ndigits) + *d++ = *s++; + + /* If we don't see any exponent, here's our decimal point. */ + *decpt = d - buf; + if (*s) + s++; + + /* Copy the fraction digits. */ + while (*s && *s != 'E' && d - buf < ndigits) + *d++ = *s++; + + /* Remember the last digit copied and the one after it. */ + last_digit = d > buf ? d - 1 : d; + digit_after_last = s; + + /* Get past the E in exponent field. */ + while (*s && *s++ != 'E') + ; + + /* Adjust the decimal point by the exponent value. */ + *decpt += atoi (s); + + /* Pad with zeroes if needed. */ + while (d - buf < ndigits) + *d++ = '0'; + + /* Zero-terminate. */ + *d = '\0'; + + /* Round if necessary. */ + __ecvround (buf, last_digit, digit_after_last, decpt); + } + return buf; +} diff --git a/reactos/lib/crt/stdlib/errno.c b/reactos/lib/crt/stdlib/errno.c new file mode 100644 index 00000000000..cb3b00b4ecd --- /dev/null +++ b/reactos/lib/crt/stdlib/errno.c @@ -0,0 +1,81 @@ +/* $Id$ + * + */ +#ifdef __USE_W32API +#undef __USE_W32API +#endif + +#include +#include +#include + +#include "doserrmap.h" + +/* + * @implemented + */ +int* __doserrno(void) +{ + return (int*)(&GetThreadData()->tdoserrno); +} + +/* + * @implemented + */ +int *_errno(void) +{ + return(&GetThreadData()->terrno); +} + + +int __set_doserrno(int error) +{ + PTHREADDATA ThreadData; + + ThreadData = GetThreadData(); + if (ThreadData) + ThreadData->tdoserrno = error; + + return(error); +} + +int __set_errno(int error) +{ + PTHREADDATA ThreadData; + + ThreadData = GetThreadData(); + if (ThreadData) + ThreadData->terrno = error; + + return(error); +} + +/* + * This function sets both doserrno to the passed in OS error code + * and also maps this to an appropriate errno code. The mapping + * has been deduced automagically by running this functions, which + * exists in MSVCRT but is undocumented, on all the error codes in + * winerror.h. + */ +void _dosmaperr(unsigned long oserror) +{ + int pos, base, lim; + + __set_doserrno(oserror); + + /* Use binary chop to find the corresponding errno code */ + for (base=0, lim=sizeof(doserrmap)/sizeof(doserrmap[0]); lim; lim >>= 1) { + pos = base+(lim >> 1); + if (doserrmap[pos].winerr == oserror) { + __set_errno(doserrmap[pos].en); + return; + } else if (doserrmap[pos].winerr < oserror) { + base = pos + 1; + --lim; + } + } + /* EINVAL appears to be the default */ + __set_errno(EINVAL); +} + +/* EOF */ diff --git a/reactos/lib/crt/stdlib/fcvt.c b/reactos/lib/crt/stdlib/fcvt.c new file mode 100644 index 00000000000..423b7f2380d --- /dev/null +++ b/reactos/lib/crt/stdlib/fcvt.c @@ -0,0 +1,15 @@ +/* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ +#include +#include + +char *fcvtbuf (double, int, int *, int *, char *); + +/* + * @implemented + */ +char * +_fcvt (double value, int ndigits, int *decpt, int *sign) +{ + static char fcvt_buf[2 * DBL_MAX_10_EXP + 10]; + return fcvtbuf (value, ndigits, decpt, sign, fcvt_buf); +} diff --git a/reactos/lib/crt/stdlib/fcvtbuf.c b/reactos/lib/crt/stdlib/fcvtbuf.c new file mode 100644 index 00000000000..2bf85aa6483 --- /dev/null +++ b/reactos/lib/crt/stdlib/fcvtbuf.c @@ -0,0 +1,61 @@ +/* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ +#include +#include +#include +#include +#include +// #include + +void __ecvround (char *, char *, const char *, int *); +char *ecvtbuf (double, int, int *, int *, char *); + +char * +fcvtbuf (double value, int ndigits, int *decpt, int *sign, char *buf) +{ + static char INFINITY[] = "Infinity"; + char decimal = '.' /* localeconv()->decimal_point[0] */; + int digits = ndigits >= 0 ? ndigits : 0; + char *cvtbuf = (char *)alloca (2*DBL_MAX_10_EXP + 16); + char *s = cvtbuf; + char *dot; + + sprintf (cvtbuf, "%-+#.*f", DBL_MAX_10_EXP + digits + 1, value); + + /* The sign. */ + if (*s++ == '-') + *sign = 1; + else + *sign = 0; + + /* Where's the decimal point? */ + dot = strchr (s, decimal); + *decpt = dot ? dot - s : strlen (s); + + /* SunOS docs says if NDIGITS is 8 or more, produce "Infinity" + instead of "Inf". */ + if (strncmp (s, "Inf", 3) == 0) + { + memcpy (buf, INFINITY, ndigits >= 8 ? 9 : 3); + if (ndigits < 8) + buf[3] = '\0'; + return buf; + } + else if (ndigits < 0) + return ecvtbuf (value, *decpt + ndigits, decpt, sign, buf); + else if (*s == '0' && value != 0.0) + return ecvtbuf (value, ndigits, decpt, sign, buf); + else + { + memcpy (buf, s, *decpt); + if (s[*decpt] == decimal) + { + memcpy (buf + *decpt, s + *decpt + 1, ndigits); + buf[*decpt + ndigits] = '\0'; + } + else + buf[*decpt] = '\0'; + __ecvround (buf, buf + *decpt + ndigits - 1, + s + *decpt + ndigits + 1, decpt); + return buf; + } +} diff --git a/reactos/lib/crt/stdlib/fullpath.c b/reactos/lib/crt/stdlib/fullpath.c new file mode 100644 index 00000000000..8f61c94e76e --- /dev/null +++ b/reactos/lib/crt/stdlib/fullpath.c @@ -0,0 +1,26 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: lib/msvcrt/stdlib/fullpath.c + * PURPOSE: Gets the fullpathname + * PROGRAMER: Boudewijn Dekker + * UPDATE HISTORY: + * 28/12/98: Created + */ + +#include "precomp.h" +#include + + +/* + * @implemented + */ +char* _fullpath(char* absPath, const char* relPath, size_t maxLength) +{ + char* lpFilePart; + + if (GetFullPathNameA(relPath,maxLength,absPath,&lpFilePart) == 0) + return NULL; + + return absPath; +} diff --git a/reactos/lib/crt/stdlib/gcvt.c b/reactos/lib/crt/stdlib/gcvt.c new file mode 100644 index 00000000000..c077566c83a --- /dev/null +++ b/reactos/lib/crt/stdlib/gcvt.c @@ -0,0 +1,34 @@ +/* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ +#include +#include +#include + +/* + * @implemented + */ +char * +_gcvt (double value, int ndigits, char *buf) +{ + char *p = buf; + + sprintf (buf, "%-#.*g", ndigits, value); + + /* It seems they expect us to return .XXXX instead of 0.XXXX */ + if (*p == '-') + p++; + if (*p == '0' && p[1] == '.') + memmove (p, p + 1, strlen (p + 1) + 1); + + /* They want Xe-YY, not X.e-YY, and XXXX instead of XXXX. */ + p = strchr (buf, 'e'); + if (!p) + { + p = buf + strlen (buf); + /* They don't want trailing zeroes. */ + while (p[-1] == '0' && p > buf + 2) + *--p = '\0'; + } + if (p > buf && p[-1] == '.') + memmove (p - 1, p, strlen (p) + 1); + return buf; +} diff --git a/reactos/lib/crt/stdlib/getenv.c b/reactos/lib/crt/stdlib/getenv.c new file mode 100644 index 00000000000..71d91b18afc --- /dev/null +++ b/reactos/lib/crt/stdlib/getenv.c @@ -0,0 +1,43 @@ +#include "precomp.h" +#include + +#define NDEBUG +#include + +#undef environ + +/* + * @implemented + */ +char *getenv(const char *name) +{ + char **environ; + unsigned int length = strlen(name); + + for (environ = *__p__environ(); *environ; environ++) + { + char *str = *environ; + char *pos = strchr(str,'='); + if (pos && ((pos - str) == length) && !_strnicmp(str, name, length)) + return pos + 1; + } + return NULL; +} + +/* + * @implemented + */ +wchar_t *_wgetenv(const wchar_t *name) +{ + wchar_t **environ; + unsigned int length = wcslen(name); + + for (environ = *__p__wenviron(); *environ; environ++) + { + wchar_t *str = *environ; + wchar_t *pos = wcschr(str, L'='); + if (pos && ((pos - str) == length) && !_wcsnicmp(str, name, length)) + return pos + 1; + } + return NULL; +} diff --git a/reactos/lib/crt/stdlib/itoa.c b/reactos/lib/crt/stdlib/itoa.c new file mode 100644 index 00000000000..004efc7ac6c --- /dev/null +++ b/reactos/lib/crt/stdlib/itoa.c @@ -0,0 +1,143 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: lib/msvcrt/stdlib/itoa.c + * PURPOSE: converts a integer to ascii + * PROGRAMER: + * UPDATE HISTORY: + * 1995: Created + * 1998: Added ltoa Boudewijn Dekker + */ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ + +#include +#include +#include + + +/* + * @implemented + */ +char* _itoa(int value, char* string, int radix) +{ + char tmp[33]; + char* tp = tmp; + int i; + unsigned v; + int sign; + char* sp; + + if (radix > 36 || radix <= 1) + { + __set_errno(EDOM); + return 0; + } + + sign = (radix == 10 && value < 0); + if (sign) + v = -value; + else + v = (unsigned)value; + while (v || tp == tmp) + { + i = v % radix; + v = v / radix; + if (i < 10) + *tp++ = i+'0'; + else + *tp++ = i + 'a' - 10; + } + + if (string == 0) + string = (char*)malloc((tp-tmp)+sign+1); + sp = string; + + if (sign) + *sp++ = '-'; + while (tp > tmp) + *sp++ = *--tp; + *sp = 0; + return string; +} + +/* + * @implemented + */ +char* _ltoa(long value, char* string, int radix) +{ + char tmp[33]; + char* tp = tmp; + long i; + unsigned long v; + int sign; + char* sp; + + if (radix > 36 || radix <= 1) + { + __set_errno(EDOM); + return 0; + } + + sign = (radix == 10 && value < 0); + if (sign) + v = -value; + else + v = (unsigned long)value; + while (v || tp == tmp) + { + i = v % radix; + v = v / radix; + if (i < 10) + *tp++ = i+'0'; + else + *tp++ = i + 'a' - 10; + } + + if (string == 0) + string = (char*)malloc((tp-tmp)+sign+1); + sp = string; + + if (sign) + *sp++ = '-'; + while (tp > tmp) + *sp++ = *--tp; + *sp = 0; + return string; +} + +/* + * @implemented + */ +char* _ultoa(unsigned long value, char* string, int radix) +{ + char tmp[33]; + char* tp = tmp; + long i; + unsigned long v = value; + char* sp; + + if (radix > 36 || radix <= 1) + { + __set_errno(EDOM); + return 0; + } + + while (v || tp == tmp) + { + i = v % radix; + v = v / radix; + if (i < 10) + *tp++ = i+'0'; + else + *tp++ = i + 'a' - 10; + } + + if (string == 0) + string = (char*)malloc((tp-tmp)+1); + sp = string; + + while (tp > tmp) + *sp++ = *--tp; + *sp = 0; + return string; +} diff --git a/reactos/lib/crt/stdlib/itow.c b/reactos/lib/crt/stdlib/itow.c new file mode 100644 index 00000000000..1939d1a6ff0 --- /dev/null +++ b/reactos/lib/crt/stdlib/itow.c @@ -0,0 +1,156 @@ +/* $Id$ + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: lib/msvcrt/stdlib/itow.c + * PURPOSE: converts a integer to wchar_t + * PROGRAMER: + * UPDATE HISTORY: + * 1995: Created + * 1998: Added ltoa Boudewijn Dekker + * 2000: derived from ./itoa.c by ea + */ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ + +#include +#include +#include + + +/* + * @implemented + */ +wchar_t* _itow(int value, wchar_t* string, int radix) +{ + wchar_t tmp [33]; + wchar_t * tp = tmp; + int i; + unsigned int v; + int sign; + wchar_t * sp; + + if (radix > 36 || radix <= 1) + { + __set_errno(EDOM); + return 0; + } + + sign = ((radix == 10) && (value < 0)); + if (sign) { + v = -value; + } else { + v = (unsigned) value; + } + while (v || tp == tmp) { + i = v % radix; + v = v / radix; + if (i < 10) { + *tp++ = i+ (wchar_t) '0'; + } else { + *tp++ = i + (wchar_t) 'a' - 10; + } + } + + if (string == 0) { + string = (wchar_t*) malloc((tp-tmp) + (sign + 1) * sizeof(wchar_t)); + } + sp = string; + + if (sign) { + *sp++ = (wchar_t) '-'; + } + while (tp > tmp) { + *sp++ = *--tp; + } + *sp = (wchar_t) 0; + return string; +} + +/* + * @implemented + */ +wchar_t* _ltow(long value, wchar_t* string, int radix) +{ + wchar_t tmp [33]; + wchar_t* tp = tmp; + long int i; + unsigned long int v; + int sign; + wchar_t* sp; + + if (radix > 36 || radix <= 1) { + __set_errno(EDOM); + return 0; + } + + sign = ((radix == 10) && (value < 0)); + if (sign) { + v = -value; + } else { + v = (unsigned long) value; + } + while (v || tp == tmp) { + i = v % radix; + v = v / radix; + if (i < 10) { + *tp++ = i + (wchar_t) '0'; + } else { + *tp++ = i + (wchar_t) 'a' - 10; + } + } + + if (string == 0) { + string = (wchar_t*) malloc((tp - tmp) + (sign + 1) * sizeof(wchar_t)); + } + sp = string; + + if (sign) { + *sp++ = (wchar_t) '-'; + } + while (tp > tmp) { + *sp++ = *--tp; + } + *sp = (wchar_t) 0; + return string; +} + +/* + * @unimplemented + */ +wchar_t* _ultow(unsigned long value, wchar_t* string, int radix) +{ + wchar_t tmp [33]; + wchar_t* tp = tmp; + long int i; + unsigned long int v = value; + wchar_t* sp; + + if (radix > 36 || radix <= 1) { + __set_errno(EDOM); + return 0; + } + while (v || tp == tmp) { + i = v % radix; + v = v / radix; + if (i < 10) { + *tp++ = i + (wchar_t) '0'; + } else { + *tp++ = i + (wchar_t) 'a' - 10; + } + } + + if (string == 0) { +#ifdef _MSVCRT_LIB_ // TODO: check on difference? + string = (wchar_t*)malloc(((tp-tmp)+1)*sizeof(wchar_t)); +#else // TODO: FIXME: review which is correct + string = (wchar_t*)malloc((tp - tmp) + sizeof(wchar_t)); +#endif /*_MSVCRT_LIB_*/ + } + sp = string; + + while (tp > tmp) { + *sp++ = *--tp; + } + *sp = (wchar_t) 0; + return string; +} diff --git a/reactos/lib/crt/stdlib/labs.c b/reactos/lib/crt/stdlib/labs.c new file mode 100644 index 00000000000..8c1d3fff3f0 --- /dev/null +++ b/reactos/lib/crt/stdlib/labs.c @@ -0,0 +1,12 @@ +/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ +#include +#include + +/* + * @implemented + */ +long +labs(long j) +{ + return j<0 ? -j : j; +} diff --git a/reactos/lib/crt/stdlib/ldiv.c b/reactos/lib/crt/stdlib/ldiv.c new file mode 100644 index 00000000000..a40597d0e95 --- /dev/null +++ b/reactos/lib/crt/stdlib/ldiv.c @@ -0,0 +1,28 @@ +/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ +#include + +/* + * @implemented + */ +ldiv_t +ldiv(long num, long denom) +{ + ldiv_t r; + + if (num > 0 && denom < 0) + { + num = -num; + denom = -denom; + } + r.quot = num / denom; + r.rem = num % denom; + if (num < 0 && denom > 0) + { + if (r.rem > 0) + { + r.quot++; + r.rem -= denom; + } + } + return r; +} diff --git a/reactos/lib/crt/stdlib/makepath.c b/reactos/lib/crt/stdlib/makepath.c new file mode 100644 index 00000000000..2ca367f1307 --- /dev/null +++ b/reactos/lib/crt/stdlib/makepath.c @@ -0,0 +1,36 @@ +/* $Id$ + */ +#include +#include + +/* + * @implemented + */ +void _makepath(char* path, const char* drive, const char* dir, const char* fname, const char* ext) +{ + int dir_len; + + if ((drive != NULL) && (*drive)) { + path[0] = *drive; + path[1] = ':'; + path[2] = 0; + } else { + (*path)=0; + } + + if (dir != NULL) { + strcat(path, dir); + dir_len = strlen(dir); + if (dir_len && *(dir + dir_len - 1) != '\\') + strcat(path, "\\"); + } + + if (fname != NULL) { + strcat(path, fname); + if (ext != NULL && *ext != 0) { + if (*ext != '.') + strcat(path, "."); + strcat(path, ext); + } + } +} diff --git a/reactos/lib/crt/stdlib/malloc.c b/reactos/lib/crt/stdlib/malloc.c new file mode 100644 index 00000000000..95e715ae76f --- /dev/null +++ b/reactos/lib/crt/stdlib/malloc.c @@ -0,0 +1,118 @@ +/* + * msvcrt.dll heap functions + * + * Copyright 2000 Jon Griffiths + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Note: Win32 heap operations are MT safe. We only lock the new + * handler and non atomic heap operations + */ + +#include "precomp.h" +#include +#include + +extern HANDLE hHeap; + +/* + * @implemented + */ +void* malloc(size_t _size) +{ + return HeapAlloc(hHeap, HEAP_ZERO_MEMORY, _size); +} + +/* + * @implemented + */ +void free(void* _ptr) +{ + HeapFree(hHeap,0,_ptr); +} + +/* + * @implemented + */ +void* calloc(size_t _nmemb, size_t _size) +{ + return HeapAlloc(hHeap, HEAP_ZERO_MEMORY, _nmemb*_size); +} + +/* + * @implemented + */ +void* realloc(void* _ptr, size_t _size) +{ + if (!_ptr) + return HeapAlloc(hHeap, 0, _size); + return HeapReAlloc(hHeap, 0, _ptr, _size); +} + +/* + * @implemented + */ +void* _expand(void* _ptr, size_t _size) +{ + return HeapReAlloc(hHeap, HEAP_REALLOC_IN_PLACE_ONLY, _ptr, _size); +} + +/* + * @implemented + */ +size_t _msize(void* _ptr) +{ + return HeapSize(hHeap, 0, _ptr); +} + +/* + * @implemented + */ +int _heapchk(void) +{ + if (!HeapValidate(hHeap, 0, NULL)) + return -1; + return 0; +} + +/* + * @implemented + */ +int _heapmin(void) +{ + if (!HeapCompact(hHeap, 0)) + return -1; + return 0; +} + +/* + * @implemented + */ +int _heapset(unsigned int unFill) +{ + if (_heapchk() == -1) + return -1; + return 0; + +} + +/* + * @implemented + */ +int _heapwalk(struct _heapinfo* entry) +{ + return 0; +} + diff --git a/reactos/lib/crt/stdlib/mbstowcs.c b/reactos/lib/crt/stdlib/mbstowcs.c new file mode 100644 index 00000000000..823d61a8231 --- /dev/null +++ b/reactos/lib/crt/stdlib/mbstowcs.c @@ -0,0 +1,123 @@ +#include "precomp.h" +#include +#include +#include + +#if 1 +/* + * @unimplemented + */ +size_t mbstowcs(wchar_t* wcstr, const char* mbstr, size_t count) +{ + size_t size; + int i; + + printf("\nmbstowcs(%p, %p, %d) called.\n\n", wcstr, mbstr, count); + + if (count <= 0 || !mbstr) + return 0; + + if (!*mbstr) + return 0; + + + if (wcstr == NULL) { + // return required size for the converted string + return strlen(mbstr); // TODO: fixme + } + for (size = 0, i = 0; i < count; size++) { + int result; + +////int mbtowc( wchar_t *wchar, const char *mbchar, size_t count ) +//// result = mbtowc(wcstr + size, mbstr + i, count - i); +// result = mbtowc(wcstr + size, mbstr + i, 1); + +///////////////////////////////////////// + if (mbstr[i] == 0) { + result = 0; + } else { + wcstr[size] = mbstr[i]; + result = 1; + } +///////////////////////////////////////// + if (result == -1) { + return -1; + } else if (result == 0) { + wcstr[size] = L'\0'; + break; + } else { + i += result; + } + + } + return size; +} + +#else +#if 1 + +//int mbtowc(wchar_t *dst, const char *str, size_t n) +size_t mbstowcs(wchar_t* wcstr, const char* mbstr, size_t count) +{ + size_t len; + + if (count <= 0 || !mbstr) + return 0; + len = MultiByteToWideChar(CP_ACP, 0, mbstr, count, wcstr, (wcstr == NULL) ? 0 : count); + + if (!len) { + DWORD err = GetLastError(); + switch (err) { + case ERROR_INSUFFICIENT_BUFFER: + break; + case ERROR_INVALID_FLAGS: + break; + case ERROR_INVALID_PARAMETER: + break; + case ERROR_NO_UNICODE_TRANSLATION: + break; + default: + return 1; + } + return -1; + } + /* return the number of bytes from src that have been used */ + if (!*mbstr) + return 0; +// if (count >= 2 && isleadbyte(*mbstr) && mbstr[1]) +// return 2; + return len; +} + +#else + +size_t mbstowcs(wchar_t* wcstr, const char* mbstr, size_t count) +{ + size_t size; + int i; + + if (wcstr == NULL) { + // return required size for the converted string + return strlen(mbstr); // TODO: fixme + } + for (size = 0, i = 0; i < count; size++) { + int result; + +//int mbtowc( wchar_t *wchar, const char *mbchar, size_t count ) +// result = mbtowc(wcstr + size, mbstr + i, count - i); + result = mbtowc(wcstr + size, mbstr + i, 1); + if (result == -1) { + return -1; + } else if (result == 0) { + wcstr[size] = L'\0'; + break; + } else { + i += result; + } + + } + return (size_t)size; +} + +#endif +#endif diff --git a/reactos/lib/crt/stdlib/mbtowc.c b/reactos/lib/crt/stdlib/mbtowc.c new file mode 100644 index 00000000000..8530f55db0d --- /dev/null +++ b/reactos/lib/crt/stdlib/mbtowc.c @@ -0,0 +1,55 @@ +#include "precomp.h" +#include +#include + + +#if 1 + +/* + * @implemented + */ +int mbtowc(wchar_t *dst, const char *str, size_t n) +{ +// printf("\t\t\tmbtowc(%p, %p, %d) called.\n", dst, str, n); + + if (n <= 0 || !str) + return 0; + + *dst = *str; + + if (!*str) + return 0; + return 1; +} + +#else + +int mbtowc(wchar_t *dst, const char *str, size_t n) +{ + if (n <= 0 || !str) + return 0; + if (!MultiByteToWideChar(CP_ACP, 0, str, n, dst, (dst == NULL) ? 0 : 1)) { + DWORD err = GetLastError(); + switch (err) { + case ERROR_INSUFFICIENT_BUFFER: + break; + case ERROR_INVALID_FLAGS: + break; + case ERROR_INVALID_PARAMETER: + break; + case ERROR_NO_UNICODE_TRANSLATION: + break; + default: + return 1; + } + return -1; + } + /* return the number of bytes from src that have been used */ + if (!*str) + return 0; + if (n >= 2 && isleadbyte(*str) && str[1]) + return 2; + return 1; +} + +#endif diff --git a/reactos/lib/crt/stdlib/obsol.c b/reactos/lib/crt/stdlib/obsol.c new file mode 100644 index 00000000000..48e465fc2d0 --- /dev/null +++ b/reactos/lib/crt/stdlib/obsol.c @@ -0,0 +1,33 @@ +#include "precomp.h" +#include + +#undef _cpumode +unsigned char _cpumode = 0; +unsigned char *_cpumode_dll = &_cpumode; + +/* + * @implemented + */ +void _seterrormode(int nMode) +{ + SetErrorMode(nMode); + return; +} + +/* + * @implemented + */ +void _beep(unsigned nFreq, unsigned nDur) +{ + Beep(nFreq,nDur); + return; +} + +/* + * @implemented + */ +void _sleep(unsigned long ulTime) +{ + Sleep(ulTime); + return; +} diff --git a/reactos/lib/crt/stdlib/putenv.c b/reactos/lib/crt/stdlib/putenv.c new file mode 100644 index 00000000000..8921ee78cac --- /dev/null +++ b/reactos/lib/crt/stdlib/putenv.c @@ -0,0 +1,27 @@ +#include "precomp.h" +#include +#include + +#define NDEBUG +#include + +/* misc/environ.c */ +int SetEnv(const wchar_t *option); + +/* + * @implemented + */ +int _putenv(const char* val) +{ + int size, result; + wchar_t *woption; + + size = MultiByteToWideChar(CP_ACP, 0, val, -1, NULL, 0); + woption = malloc(size* sizeof(wchar_t)); + if (woption == NULL) + return -1; + MultiByteToWideChar(CP_ACP, 0, val, -1, woption, size); + result = SetEnv(woption); + free(woption); + return result; +} diff --git a/reactos/lib/crt/stdlib/qsort.c b/reactos/lib/crt/stdlib/qsort.c new file mode 100644 index 00000000000..e5e662ad881 --- /dev/null +++ b/reactos/lib/crt/stdlib/qsort.c @@ -0,0 +1,243 @@ +/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ +#ifdef __USE_W32API +#undef __USE_W32API +#endif + +#include +#include + +/*- + * Copyright (c) 1980, 1983 The Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms are permitted + * provided that: (1) source distributions retain this entire copyright + * notice and comment, and (2) distributions including binaries display + * the following acknowledgement: ``This product includes software + * developed by the University of California, Berkeley and its contributors'' + * in the documentation or other materials provided with the distribution + * and in all advertising materials mentioning features or use of this + * software. Neither the name of the University nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + */ + +/* + * qsort.c: + * Our own version of the system qsort routine which is faster by an average + * of 25%, with lows and highs of 10% and 50%. + * The THRESHold below is the insertion sort threshold, and has been adjusted + * for records of size 48 bytes. + * The MTHREShold is where we stop finding a better median. + */ + +#define THRESH 4 /* threshold for insertion */ +#define MTHRESH 6 /* threshold for median */ + +/* + * qst: + * Do a quicksort + * First, find the median element, and put that one in the first place as the + * discriminator. (This "median" is just the median of the first, last and + * middle elements). (Using this median instead of the first element is a big + * win). Then, the usual partitioning/swapping, followed by moving the + * discriminator into the right place. Then, figure out the sizes of the two + * partions, do the smaller one recursively and the larger one via a repeat of + * this code. Stopping when there are less than THRESH elements in a partition + * and cleaning up with an insertion sort (in our caller) is a huge win. + * All data swaps are done in-line, which is space-losing but time-saving. + * (And there are only three places where this is done). + */ + +static void +qst(PTHREADDATA pThreadData, char *base, char *max) +{ + char c, *i, *j, *jj; + int ii; + char *mid, *tmp; + int lo, hi; + + /* + * At the top here, lo is the number of characters of elements in the + * current partition. (Which should be max - base). + * Find the median of the first, last, and middle element and make + * that the middle element. Set j to largest of first and middle. + * If max is larger than that guy, then it's that guy, else compare + * max with loser of first and take larger. Things are set up to + * prefer the middle, then the first in case of ties. + */ + lo = max - base; /* number of elements as chars */ + do { + mid = i = base + pThreadData->qsz * ((lo / pThreadData->qsz) >> 1); + if (lo >= pThreadData->mthresh) + { + j = (pThreadData->qcmp((jj = base), i) > 0 ? jj : i); + if (pThreadData->qcmp(j, (tmp = max - pThreadData->qsz)) > 0) + { + /* switch to first loser */ + j = (j == jj ? i : jj); + if (pThreadData->qcmp(j, tmp) < 0) + j = tmp; + } + if (j != i) + { + ii = pThreadData->qsz; + do { + c = *i; + *i++ = *j; + *j++ = c; + } while (--ii); + } + } + /* + * Semi-standard quicksort partitioning/swapping + */ + for (i = base, j = max - pThreadData->qsz; ; ) + { + while (i < mid && pThreadData->qcmp(i, mid) <= 0) + i += pThreadData->qsz; + while (j > mid) + { + if (pThreadData->qcmp(mid, j) <= 0) + { + j -= pThreadData->qsz; + continue; + } + tmp = i + pThreadData->qsz; /* value of i after swap */ + if (i == mid) + { + /* j <-> mid, new mid is j */ + mid = jj = j; + } + else + { + /* i <-> j */ + jj = j; + j -= pThreadData->qsz; + } + goto swap; + } + if (i == mid) + { + break; + } + else + { + /* i <-> mid, new mid is i */ + jj = mid; + tmp = mid = i; /* value of i after swap */ + j -= pThreadData->qsz; + } + swap: + ii = pThreadData->qsz; + do { + c = *i; + *i++ = *jj; + *jj++ = c; + } while (--ii); + i = tmp; + } + /* + * Look at sizes of the two partitions, do the smaller + * one first by recursion, then do the larger one by + * making sure lo is its size, base and max are update + * correctly, and branching back. But only repeat + * (recursively or by branching) if the partition is + * of at least size THRESH. + */ + i = (j = mid) + pThreadData->qsz; + if ((lo = j - base) <= (hi = max - i)) + { + if (lo >= pThreadData->thresh) + qst(pThreadData, base, j); + base = i; + lo = hi; + } + else + { + if (hi >= pThreadData->thresh) + qst(pThreadData, i, max); + max = j; + } + } while (lo >= pThreadData->thresh); +} + +/* + * qsort: + * First, set up some global parameters for qst to share. Then, quicksort + * with qst(), and then a cleanup insertion sort ourselves. Sound simple? + * It's not... + * + * @implemented + */ +void +qsort(const void *base0, size_t n, size_t size, _pfunccmp_t compar) +{ + PTHREADDATA pThreadData; + char *base = (char *)base0; + char c, *i, *j, *lo, *hi; + char *min, *max; + + if (n <= 1) + return; + + pThreadData = GetThreadData(); + + pThreadData->qsz = size; + pThreadData->qcmp = compar; + pThreadData->thresh = pThreadData->qsz * THRESH; + pThreadData->mthresh = pThreadData->qsz * MTHRESH; + max = base + n * pThreadData->qsz; + if (n >= THRESH) + { + qst(pThreadData, base, max); + hi = base + pThreadData->thresh; + } + else + { + hi = max; + } + /* + * First put smallest element, which must be in the first THRESH, in + * the first position as a sentinel. This is done just by searching + * the first THRESH elements (or the first n if n < THRESH), finding + * the min, and swapping it into the first position. + */ + for (j = lo = base; (lo += pThreadData->qsz) < hi; ) + if (pThreadData->qcmp(j, lo) > 0) + j = lo; + if (j != base) + { + /* swap j into place */ + for (i = base, hi = base + pThreadData->qsz; i < hi; ) + { + c = *j; + *j++ = *i; + *i++ = c; + } + } + /* + * With our sentinel in place, we now run the following hyper-fast + * insertion sort. For each remaining element, min, from [1] to [n-1], + * set hi to the index of the element AFTER which this one goes. + * Then, do the standard insertion sort shift on a character at a time + * basis for each element in the frob. + */ + for (min = base; (hi = min += pThreadData->qsz) < max; ) + { + while (pThreadData->qcmp(hi -= pThreadData->qsz, min) > 0) + /* void */; + if ((hi += pThreadData->qsz) != min) { + for (lo = min + pThreadData->qsz; --lo >= min; ) + { + c = *lo; + for (i = j = lo; (j -= pThreadData->qsz) >= hi; i = j) + *i = *j; + *i = c; + } + } + } +} diff --git a/reactos/lib/crt/stdlib/rand.c b/reactos/lib/crt/stdlib/rand.c new file mode 100644 index 00000000000..fd4e9ead5ed --- /dev/null +++ b/reactos/lib/crt/stdlib/rand.c @@ -0,0 +1,34 @@ +/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ +#ifdef __USE_W32API +#undef __USE_W32API +#endif + +#include +#include + +/* + * @implemented + */ +int +rand(void) +{ + PTHREADDATA ThreadData = GetThreadData(); + +#ifdef HAVE_LONGLONG + ThreadData->tnext = ThreadData->tnext * 0x5deece66dLL + 11; +#else + ThreadData->tnext = ThreadData->tnext * 0x5deece66dL + 11; +#endif + return (int)((ThreadData->tnext >> 16) & RAND_MAX); +} + +/* + * @implemented + */ +void +srand(unsigned int seed) +{ + PTHREADDATA ThreadData = GetThreadData(); + + ThreadData->tnext = (ULONGLONG)seed; +} diff --git a/reactos/lib/crt/stdlib/rot.c b/reactos/lib/crt/stdlib/rot.c new file mode 100644 index 00000000000..c5f67aa200a --- /dev/null +++ b/reactos/lib/crt/stdlib/rot.c @@ -0,0 +1,69 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: lib/msvcrt/stdlib/rot.c + * PURPOSE: Performs a bitwise rotation + * PROGRAMER: Boudewijn Dekker + * UPDATE HISTORY: + * 03/04/99: Created + */ + +#include +#include + +/* + * @implemented + */ +unsigned int _rotl( unsigned int value, int shift ) +{ + int max_bits = sizeof(unsigned int)<<3; + if ( shift < 0 ) + return _rotr(value,-shift); + + if ( shift > max_bits ) + shift = shift % max_bits; + return (value << shift) | (value >> (max_bits-shift)); +} + +/* + * @implemented + */ +unsigned int _rotr( unsigned int value, int shift ) +{ + int max_bits = sizeof(unsigned int)<<3; + if ( shift < 0 ) + return _rotl(value,-shift); + + if ( shift > max_bits<<3 ) + shift = shift % max_bits; + return (value >> shift) | (value << (max_bits-shift)); +} + + +/* + * @implemented + */ +unsigned long _lrotl( unsigned long value, int shift ) +{ + int max_bits = sizeof(unsigned long)<<3; + if ( shift < 0 ) + return _lrotr(value,-shift); + + if ( shift > max_bits ) + shift = shift % max_bits; + return (value << shift) | (value >> (max_bits-shift)); +} + +/* + * @implemented + */ +unsigned long _lrotr( unsigned long value, int shift ) +{ + int max_bits = sizeof(unsigned long)<<3; + if ( shift < 0 ) + return _lrotl(value,-shift); + + if ( shift > max_bits ) + shift = shift % max_bits; + return (value >> shift) | (value << (max_bits-shift)); +} diff --git a/reactos/lib/crt/stdlib/senv.c b/reactos/lib/crt/stdlib/senv.c new file mode 100644 index 00000000000..be6e7e7e003 --- /dev/null +++ b/reactos/lib/crt/stdlib/senv.c @@ -0,0 +1,36 @@ +#include "precomp.h" +#include +#include + +#define NDEBUG +#include + + +/* + * @implemented + */ +void _searchenv(const char* file,const char* var,char* path) +{ + char* env = getenv(var); + char* x; + char* y; + char* FilePart; + + DPRINT("_searchenv()\n"); + + x = strchr(env,'='); + if ( x != NULL ) { + *x = 0; + x++; + } + y = strchr(env,';'); + while ( y != NULL ) { + *y = 0; + if ( SearchPathA(x,file,NULL,MAX_PATH,path,&FilePart) > 0 ) { + return; + } + x = y+1; + y = strchr(env,';'); + } + return; +} diff --git a/reactos/lib/crt/stdlib/splitp.c b/reactos/lib/crt/stdlib/splitp.c new file mode 100644 index 00000000000..b523c9514ab --- /dev/null +++ b/reactos/lib/crt/stdlib/splitp.c @@ -0,0 +1,69 @@ +#include +#include + + +/* + * @implemented + */ +void _splitpath(const char* path, char* drive, char* dir, char* fname, char* ext) +{ + char* tmp_drive; + char* tmp_dir; + char* tmp_ext; + + tmp_drive = (char*)strchr(path,':'); + if (drive) + { + if (tmp_drive) + { + strncpy(drive,tmp_drive-1,2); + *(drive+2) = 0; + } + else + { + *drive = 0; + } + } + if (!tmp_drive) + { + tmp_drive = (char*)path - 1; + } + + tmp_dir = (char*)strrchr(path,'\\'); + if (dir) + { + if (tmp_dir) + { + strncpy(dir,tmp_drive+1,tmp_dir-tmp_drive); + *(dir+(tmp_dir-tmp_drive)) = 0; + } + else + { + *dir =0; + } + } + + tmp_ext = (char*)strrchr(path,'.'); + if (!tmp_ext) + { + tmp_ext = (char*)path+strlen(path); + } + if (ext) + { + strcpy(ext,tmp_ext); + } + + if (fname) + { + if (tmp_dir) + { + strncpy(fname,tmp_dir+1,tmp_ext-tmp_dir-1); + *(fname+(tmp_ext-tmp_dir-1)) = 0; + } + else + { + strncpy(fname,tmp_drive+1,tmp_ext-tmp_drive-1); + *(fname+(tmp_ext-path))=0; + } + } +} diff --git a/reactos/lib/crt/stdlib/strtod.c b/reactos/lib/crt/stdlib/strtod.c new file mode 100644 index 00000000000..29d936ebdd0 --- /dev/null +++ b/reactos/lib/crt/stdlib/strtod.c @@ -0,0 +1,100 @@ +/* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ + +#include + + +/* + * @implemented + */ +double +strtod(const char *s, char **sret) +{ + long double r; /* result */ + int e; /* exponent */ + long double d; /* scale */ + int sign; /* +- 1.0 */ + int esign; + int i; + int flags=0; + + r = 0.0; + sign = 1; + e = 0; + esign = 1; + + while ((*s == ' ') || (*s == '\t')) + s++; + + if (*s == '+') + s++; + else if (*s == '-') + { + sign = -1; + s++; + } + + while ((*s >= '0') && (*s <= '9')) + { + flags |= 1; + r *= 10.0; + r += *s - '0'; + s++; + } + + if (*s == '.') + { + d = 0.1L; + s++; + while ((*s >= '0') && (*s <= '9')) + { + flags |= 2; + r += d * (*s - '0'); + s++; + d *= 0.1L; + } + } + + if (flags == 0) + { + if (sret) + *sret = (char *)s; + return 0; + } + + if ((*s == 'e') || (*s == 'E')) + { + s++; + if (*s == '+') + s++; + else if (*s == '-') + { + s++; + esign = -1; + } + if ((*s < '0') || (*s > '9')) + { + if (sret) + *sret = (char *)s; + return r; + } + + while ((*s >= '0') && (*s <= '9')) + { + e *= 10; + e += *s - '0'; + s++; + } + } + + if (esign < 0) + for (i = 1; i <= e; i++) + r *= 0.1L; + else + for (i = 1; i <= e; i++) + r *= 10.0; + + if (sret) + *sret = (char *)s; + return r * sign; +} diff --git a/reactos/lib/crt/stdlib/strtol.c b/reactos/lib/crt/stdlib/strtol.c new file mode 100644 index 00000000000..40262d5e819 --- /dev/null +++ b/reactos/lib/crt/stdlib/strtol.c @@ -0,0 +1,95 @@ +/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ +#include +#include +#include +#include +#include + + +/* + * @implemented + */ +long +strtol(const char *nptr, char **endptr, int base) +{ + const char *s = nptr; + unsigned long acc; + int c; + unsigned long cutoff; + int neg = 0, any, cutlim; + + /* + * Skip white space and pick up leading +/- sign if any. + * If base is 0, allow 0x for hex and 0 for octal, else + * assume decimal; if base is already 16, allow 0x. + */ + do { + c = *s++; + } while (isspace(c)); + if (c == '-') + { + neg = 1; + c = *s++; + } + else if (c == '+') + c = *s++; + if ((base == 0 || base == 16) && + c == '0' && (*s == 'x' || *s == 'X')) + { + c = s[1]; + s += 2; + base = 16; + } + if (base == 0) + base = c == '0' ? 8 : 10; + + /* + * Compute the cutoff value between legal numbers and illegal + * numbers. That is the largest legal value, divided by the + * base. An input number that is greater than this value, if + * followed by a legal input character, is too big. One that + * is equal to this value may be valid or not; the limit + * between valid and invalid numbers is then based on the last + * digit. For instance, if the range for longs is + * [-2147483648..2147483647] and the input base is 10, + * cutoff will be set to 214748364 and cutlim to either + * 7 (neg==0) or 8 (neg==1), meaning that if we have accumulated + * a value > 214748364, or equal but the next digit is > 7 (or 8), + * the number is too big, and we will return a range error. + * + * Set any if any `digits' consumed; make it negative to indicate + * overflow. + */ + cutoff = neg ? -(unsigned long)LONG_MIN : LONG_MAX; + cutlim = cutoff % (unsigned long)base; + cutoff /= (unsigned long)base; + for (acc = 0, any = 0;; c = *s++) + { + if (isdigit(c)) + c -= '0'; + else if (isalpha(c)) + c -= isupper(c) ? 'A' - 10 : 'a' - 10; + else + break; + if (c >= base) + break; + if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim)) + any = -1; + else + { + any = 1; + acc *= base; + acc += c; + } + } + if (any < 0) + { + acc = neg ? LONG_MIN : LONG_MAX; + __set_errno(ERANGE); + } + else if (neg) + acc = -acc; + if (endptr != 0) + *endptr = any ? (char *)s - 1 : (char *)nptr; + return acc; +} diff --git a/reactos/lib/crt/stdlib/strtold.c b/reactos/lib/crt/stdlib/strtold.c new file mode 100644 index 00000000000..5588206f937 --- /dev/null +++ b/reactos/lib/crt/stdlib/strtold.c @@ -0,0 +1,126 @@ +/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ +#include +#include +//#include + +static double powten[] = +{ + 1e1L, 1e2L, 1e4L, 1e8L, 1e16L, 1e32L, 1e64L, 1e128L, 1e256L, +#ifdef __GNUC__ + 1e512L, 1e512L*1e512L, 1e2048L, 1e4096L +#else + 1e256L, 1e256L, 1e256L, 1e256L +#endif +}; + +long double +_strtold(const char *s, char **sret) +{ + double r; /* result */ + int e, ne; /* exponent */ + int sign; /* +- 1.0 */ + int esign; + int flags=0; + int l2powm1; + + r = 0.0L; + sign = 1; + e = ne = 0; + esign = 1; + + while(*s && isspace(*s)) + s++; + + if (*s == '+') + s++; + else if (*s == '-') + { + sign = -1; + s++; + } + + while ((*s >= '0') && (*s <= '9')) + { + flags |= 1; + r *= 10.0L; + r += *s - '0'; + s++; + } + + if (*s == '.') + { + s++; + while ((*s >= '0') && (*s <= '9')) + { + flags |= 2; + r *= 10.0L; + r += *s - '0'; + s++; + ne++; + } + } + if (flags == 0) + { + if (sret) + *sret = (char *)s; + return 0.0L; + } + + if ((*s == 'e') || (*s == 'E')) + { + s++; + if (*s == '+') + s++; + else if (*s == '-') + { + s++; + esign = -1; + } + while ((*s >= '0') && (*s <= '9')) + { + e *= 10; + e += *s - '0'; + s++; + } + } + if (esign < 0) + { + esign = -esign; + e = -e; + } + e = e - ne; + if (e < -4096) + { + /* possibly subnormal number, 10^e would overflow */ + r *= 1.0e-2048L; + e += 2048; + } + if (e < 0) + { + e = -e; + esign = -esign; + } + if (e >= 8192) + e = 8191; + if (e) + { + double d = 1.0L; + l2powm1 = 0; + while (e) + { + if (e & 1) + d *= powten[l2powm1]; + e >>= 1; + l2powm1++; + } + if (esign > 0) + r *= d; + else + r /= d; + } + if (sret) + *sret = (char *)s; + return r * sign; + + return 0; +} diff --git a/reactos/lib/crt/stdlib/strtoll.c b/reactos/lib/crt/stdlib/strtoll.c new file mode 100644 index 00000000000..6115580be3a --- /dev/null +++ b/reactos/lib/crt/stdlib/strtoll.c @@ -0,0 +1,84 @@ +/* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ +#include +#include +#include +#include +//#include + +/* constants used in Solaris */ +#define LLONG_MIN -9223372036854775807L-1L +#define LLONG_MAX 9223372036854775807L +#define ULLONG_MAX 18446744073709551615UL + +long +strtoll(const char *nptr, char **endptr, int base) +{ + const char *s = nptr; + unsigned long acc; + int c; + unsigned long cutoff; + int neg = 0, any, cutlim; + + /* + * See strtol for comments as to the logic used. + */ + do { + c = *s++; + } while (isspace(c)); + if (c == '-') + { + neg = 1; + c = *s++; + } + else if (c == '+') + c = *s++; + if ((base == 0 || base == 16) && + c == '0' && (*s == 'x' || *s == 'X')) + { + c = s[1]; + s += 2; + base = 16; + } + if (base == 0) + base = c == '0' ? 8 : 10; + +/* to prevent overflow, we take max-1 and add 1 after division */ + cutoff = neg ? -(LLONG_MIN+1) : LLONG_MAX-1; + cutlim = cutoff % base; + cutoff /= base; + if (++cutlim == base) + { + cutlim = 0; + cutoff++; + } + for (acc = 0, any = 0;; c = *s++) + { + if (isdigit(c)) + c -= '0'; + else if (isalpha(c)) + c -= isupper(c) ? 'A' - 10 : 'a' - 10; + else + break; + if (c >= base) + break; + if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim)) + any = -1; + else + { + any = 1; + acc *= base; + acc += c; + } + } + if (any < 0) + { + acc = neg ? LLONG_MIN : LLONG_MAX; + __set_errno ( ERANGE ); + } + else if (neg) + acc *= -1; + if (endptr != 0) + *endptr = any ? (char *)s - 1 : (char *)nptr; + return acc; +} diff --git a/reactos/lib/crt/stdlib/strtoul.c b/reactos/lib/crt/stdlib/strtoul.c new file mode 100644 index 00000000000..59fbe38b3f3 --- /dev/null +++ b/reactos/lib/crt/stdlib/strtoul.c @@ -0,0 +1,77 @@ +/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ +#include +#include +#include +#include +#include + +/* + * Convert a string to an unsigned long integer. + * + * Ignores `locale' stuff. Assumes that the upper and lower case + * alphabets and digits are each contiguous. + * + * @implemented + */ +unsigned long +strtoul(const char *nptr, char **endptr, int base) +{ + const char *s = nptr; + unsigned long acc; + int c; + unsigned long cutoff; + int neg = 0, any, cutlim; + + /* + * See strtol for comments as to the logic used. + */ + do { + c = *s++; + } while (isspace(c)); + if (c == '-') + { + neg = 1; + c = *s++; + } + else if (c == '+') + c = *s++; + if ((base == 0 || base == 16) && + c == '0' && (*s == 'x' || *s == 'X')) + { + c = s[1]; + s += 2; + base = 16; + } + if (base == 0) + base = c == '0' ? 8 : 10; + cutoff = (unsigned long)ULONG_MAX / (unsigned long)base; + cutlim = (unsigned long)ULONG_MAX % (unsigned long)base; + for (acc = 0, any = 0;; c = *s++) + { + if (isdigit(c)) + c -= '0'; + else if (isalpha(c)) + c -= isupper(c) ? 'A' - 10 : 'a' - 10; + else + break; + if (c >= base) + break; + if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim)) + any = -1; + else { + any = 1; + acc *= base; + acc += c; + } + } + if (any < 0) + { + acc = ULONG_MAX; + __set_errno(ERANGE); + } + else if (neg) + acc = -acc; + if (endptr != 0) + *endptr = any ? (char *)s - 1 : (char *)nptr; + return acc; +} diff --git a/reactos/lib/crt/stdlib/strtoull.c b/reactos/lib/crt/stdlib/strtoull.c new file mode 100644 index 00000000000..031b9103a57 --- /dev/null +++ b/reactos/lib/crt/stdlib/strtoull.c @@ -0,0 +1,76 @@ +/* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ +#include +#include +#include +#include +//#include + +/* + * Convert a string to an unsigned long integer. + * + * Ignores `locale' stuff. Assumes that the upper and lower case + * alphabets and digits are each contiguous. + */ +unsigned long +strtoull(const char *nptr, char **endptr, int base) +{ + const char *s = nptr; + unsigned long acc; + int c; + unsigned long cutoff; + int neg = 0, any, cutlim; + + /* + * See strtol for comments as to the logic used. + */ + do { + c = *s++; + } while (isspace(c)); + if (c == '-') + { + neg = 1; + c = *s++; + } + else if (c == '+') + c = *s++; + if ((base == 0 || base == 16) && + c == '0' && (*s == 'x' || *s == 'X')) + { + c = s[1]; + s += 2; + base = 16; + } + if (base == 0) + base = c == '0' ? 8 : 10; + cutoff = (unsigned long)ULONG_MAX / base; + cutlim = (unsigned long)ULONG_MAX % base; + for (acc = 0, any = 0;; c = *s++) + { + if (isdigit(c)) + c -= '0'; + else if (isalpha(c)) + c -= isupper(c) ? 'A' - 10 : 'a' - 10; + else + break; + if (c >= base) + break; + if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim)) + any = -1; + else { + any = 1; + acc *= base; + acc += c; + } + } + if (any < 0) + { + acc = ULONG_MAX; + __set_errno ( ERANGE ); + } + else if (neg) + acc = -acc; + if (endptr != 0) + *endptr = any ? (char *)s - 1 : (char *)nptr; + return acc; +} diff --git a/reactos/lib/crt/stdlib/swab.c b/reactos/lib/crt/stdlib/swab.c new file mode 100644 index 00000000000..c3c1c09017e --- /dev/null +++ b/reactos/lib/crt/stdlib/swab.c @@ -0,0 +1,18 @@ +#include + +/* + * @implemented + */ +void _swab (const char* caFrom, char* caTo, size_t sizeToCopy) +{ + if (sizeToCopy > 1) + { + sizeToCopy = sizeToCopy >> 1; + + while (sizeToCopy--) { + *caTo++ = caFrom[1]; + *caTo++ = *caFrom++; + caFrom++; + } + } +} diff --git a/reactos/lib/crt/stdlib/wcstod.c b/reactos/lib/crt/stdlib/wcstod.c new file mode 100644 index 00000000000..14988abb220 --- /dev/null +++ b/reactos/lib/crt/stdlib/wcstod.c @@ -0,0 +1,98 @@ +/* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */ +/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ +#include + + +/* + * @implemented + */ +double wcstod(const wchar_t *s, wchar_t **sret) +{ + long double r; /* result */ + int e; /* exponent */ + long double d; /* scale */ + int sign; /* +- 1.0 */ + int esign; + int i; + int flags=0; + + r = 0.0; + sign = 1; + e = 0; + esign = 1; + + while ((*s == L' ') || (*s == L'\t')) + s++; + + if (*s == L'+') + s++; + else if (*s == L'-') + { + sign = -1; + s++; + } + + while ((*s >= L'0') && (*s <= L'9')) + { + flags |= 1; + r *= 10.0; + r += *s - L'0'; + s++; + } + + if (*s == L'.') + { + d = 0.1L; + s++; + while ((*s >= L'0') && (*s <= L'9')) + { + flags |= 2; + r += d * (*s - L'0'); + s++; + d *= 0.1L; + } + } + + if (flags == 0) + { + if (sret) + *sret = (wchar_t *)s; + return 0; + } + + if ((*s == L'e') || (*s == L'E')) + { + s++; + if (*s == L'+') + s++; + else if (*s == L'-') + { + s++; + esign = -1; + } + if ((*s < L'0') || (*s > L'9')) + { + if (sret) + *sret = (wchar_t *)s; + return r; + } + + while ((*s >= L'0') && (*s <= L'9')) + { + e *= 10; + e += *s - L'0'; + s++; + } + } + + if (esign < 0) + for (i = 1; i <= e; i++) + r *= 0.1L; + else + for (i = 1; i <= e; i++) + r *= 10.0; + + if (sret) + *sret = (wchar_t *)s; + return r * sign; +} diff --git a/reactos/lib/crt/stdlib/wcstol.c b/reactos/lib/crt/stdlib/wcstol.c new file mode 100644 index 00000000000..3f601e19131 --- /dev/null +++ b/reactos/lib/crt/stdlib/wcstol.c @@ -0,0 +1,37 @@ +#include +#include + + +/* + * @implemented + */ +long wcstol(const wchar_t *cp,wchar_t **endp,int base) +{ + long result = 0,value; + int sign = 1; + + if ( *cp == L'-' ) { + sign = -1; + cp++; + } + + if (!base) { + base = 10; + if (*cp == L'0') { + base = 8; + cp++; + if ((*cp == L'x') && iswxdigit(cp[1])) { + cp++; + base = 16; + } + } + } + while (iswxdigit(*cp) && (value = iswdigit(*cp) ? *cp-L'0' : (iswlower(*cp) + ? towupper(*cp) : *cp)-L'A'+10) < base) { + result = result*base + value; + cp++; + } + if (endp) + *endp = (wchar_t *)cp; + return result * sign; +} diff --git a/reactos/lib/crt/stdlib/wcstom.c b/reactos/lib/crt/stdlib/wcstom.c new file mode 100644 index 00000000000..b9dd5d2cb02 --- /dev/null +++ b/reactos/lib/crt/stdlib/wcstom.c @@ -0,0 +1,20 @@ +#include + +/* + * @unimplemented + */ +size_t wcstombs (char* mbsDest, const wchar_t* wsConvert, size_t size) +{ + return 0; +} + +/* + * @unimplemented + */ +int wctomb (char* mbDest, wchar_t wc) +{ + return 0; +} + + + diff --git a/reactos/lib/crt/stdlib/wcstomb.c b/reactos/lib/crt/stdlib/wcstomb.c new file mode 100644 index 00000000000..c0b5d997b18 --- /dev/null +++ b/reactos/lib/crt/stdlib/wcstomb.c @@ -0,0 +1,118 @@ +/* Copyright (C) 1991, 1992, 1995, 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The GNU C 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include + +#include +#include +#include + +#ifndef EILSEQ +#define EILSEQ EINVAL +#endif + +static const wchar_t encoding_mask[] = +{ + (wchar_t)~0x7ff, (wchar_t)~0xffff, (wchar_t)~0x1fffff, (wchar_t)~0x3ffffff +}; + +static const unsigned char encoding_byte[] = +{ + 0xc0, 0xe0, 0xf0, 0xf8, 0xfc +}; + +/* The state is for this UTF8 encoding not used. */ +//static mbstate_t internal; + + +//extern mbstate_t __no_r_state; /* Defined in mbtowc.c. */ + +size_t +__wcrtomb (char *s, wchar_t wc); + +/* + * Convert WCHAR into its multibyte character representation, + * putting this in S and returning its length. + * + * Attention: this function should NEVER be intentionally used. + * The interface is completely stupid. The state is shared between + * all conversion functions. You should use instead the restartable + * version `wcrtomb'. + * + * @implemented + */ +int +wctomb (char *s, wchar_t wchar) +{ + /* If S is NULL the function has to return null or not null + depending on the encoding having a state depending encoding or + not. This is nonsense because any multibyte encoding has a + state. The ISO C amendment 1 corrects this while introducing the + restartable functions. We simply say here all encodings have a + state. */ + if (s == NULL) + return 1; + + return __wcrtomb (s, wchar); +} + + +size_t +__wcrtomb (char *s, wchar_t wc) +{ + char fake[1]; + size_t written = 0; + + + + if (s == NULL) + { + s = fake; + wc = L'\0'; + } + + if (wc < 0x80) + { + /* It's a one byte sequence. */ + if (s != NULL) + *s = (char) wc; + return 1; + } + + for (written = 2; written < 6; ++written) + if ((wc & encoding_mask[written - 2]) == 0) + break; + + if (s != NULL) + { + size_t cnt = written; + s[0] = encoding_byte[cnt - 2]; + + --cnt; + do + { + s[cnt] = 0x80 | (wc & 0x3f); + wc >>= 6; + } + while (--cnt > 0); + s[0] |= wc; + } + + return written; +} diff --git a/reactos/lib/crt/stdlib/wcstombs.c b/reactos/lib/crt/stdlib/wcstombs.c new file mode 100644 index 00000000000..06054eeada9 --- /dev/null +++ b/reactos/lib/crt/stdlib/wcstombs.c @@ -0,0 +1,160 @@ +/* Copyright (C) 1991, 1992, 1995, 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The GNU C 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include + +#include +#include + +#ifndef EILSEQ +#define EILSEQ EINVAL +#endif + + +static const wchar_t encoding_mask[] = +{ + (~0x7ff&WCHAR_MAX), (~0xffff&WCHAR_MAX), (~0x1fffff&WCHAR_MAX), (~0x3ffffff&WCHAR_MAX) +}; + +static const unsigned char encoding_byte[] = +{ + 0xc0, 0xe0, 0xf0, 0xf8, 0xfc +}; + +/* We don't need the state really because we don't have shift states + to maintain between calls to this function. */ +typedef int mbstate_t; +static mbstate_t mbstate_internal; + + +mbstate_t __no_r_state; /* Now defined in wcstombs.c. */ +//extern mbstate_t __no_r_state; /* Defined in mbtowc.c. */ + +size_t +__wcsrtombs (char *dst, const wchar_t **src, size_t len, mbstate_t *ps); + +/* + * Convert the `wchar_t' string in PWCS to a multibyte character string + * in S, writing no more than N characters. Return the number of bytes + * written, or (size_t) -1 if an invalid `wchar_t' was found. + * + * Attention: this function should NEVER be intentionally used. + * The interface is completely stupid. The state is shared between + * all conversion functions. You should use instead the restartable + * version `wcsrtombs'. + * + * @implemented + */ +size_t +wcstombs (char *s, const wchar_t *pwcs, size_t n) +{ + mbstate_t save_shift = __no_r_state; + size_t written; + + written = __wcsrtombs (s, &pwcs, n, &__no_r_state); + + /* Restore the old shift state. */ + __no_r_state = save_shift; + + /* Return how many we wrote (or maybe an error). */ + return written; +} + +size_t +__wcsrtombs (char *dst, const wchar_t **src, size_t len, mbstate_t *ps) +{ + size_t written = 0; + const wchar_t *run = *src; + + if (ps == NULL) + ps = &mbstate_internal; + + if (dst == NULL) + /* The LEN parameter has to be ignored if we don't actually write + anything. */ + len = ~0; + + while (written < len) + { + wchar_t wc = *run++; + +#if 0 + if (wc < 0 || wc > WCHAR_MAX) + { + /* This is no correct ISO 10646 character. */ + __set_errno (EILSEQ); + return (size_t) -1; + } +#endif + + if (wc == L'\0') + { + /* Found the end. */ + if (dst != NULL) + *dst = '\0'; + *src = NULL; + return written; + } + else if (wc < 0x80) + { + /* It's an one byte sequence. */ + if (dst != NULL) + *dst++ = (char) wc; + ++written; + } + else + { + size_t step; + + for (step = 2; step < 6; ++step) + if ((wc & encoding_mask[step - 2]) == 0) + break; + + if (written + step >= len) + /* Too long. */ + break; + + if (dst != NULL) + { + size_t cnt = step; + + dst[0] = encoding_byte[cnt - 2]; + + --cnt; + do + { + dst[cnt] = 0x80 | (wc & 0x3f); + wc >>= 6; + } + while (--cnt > 0); + dst[0] |= wc; + + dst += step; + } + + written += step; + } + } + + /* Store position of first unprocessed word. */ + *src = run; + + return written; +} +//weak_alias (__wcsrtombs, wcsrtombs) diff --git a/reactos/lib/crt/stdlib/wcstoul.c b/reactos/lib/crt/stdlib/wcstoul.c new file mode 100644 index 00000000000..54a309615d2 --- /dev/null +++ b/reactos/lib/crt/stdlib/wcstoul.c @@ -0,0 +1,104 @@ +/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ +#include +#include +#include +#include +#include + +/* + * Convert a unicode string to an unsigned long integer. + * + * Ignores `locale' stuff. Assumes that the upper and lower case + * alphabets and digits are each contiguous. + * + * @implemented + */ +unsigned long +wcstoul(const wchar_t *nptr, wchar_t **endptr, int base) +{ + const wchar_t *s = nptr; + unsigned long acc; + int c; + unsigned long cutoff; + int neg = 0, any, cutlim; + + /* + * See strtol for comments as to the logic used. + */ + do { + c = *s++; + } while (iswspace(c)); + if (c == L'-') + { + neg = 1; + c = *s++; + } + else if (c == L'+') + c = *s++; + if ((base == 0 || base == 16) && + c == L'0' && (*s == L'x' || *s == L'X')) + { + c = s[1]; + s += 2; + base = 16; + } + if (base == 0) + base = c == L'0' ? 8 : 10; + cutoff = (unsigned long)ULONG_MAX / (unsigned long)base; + cutlim = (unsigned long)ULONG_MAX % (unsigned long)base; + for (acc = 0, any = 0;; c = *s++) + { + if (iswdigit(c)) + c -= L'0'; + else if (iswalpha(c)) + c -= iswupper(c) ? L'A' - 10 : L'a' - 10; + else + break; + if (c >= base) + break; + if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim)) + any = -1; + else { + any = 1; + acc *= base; + acc += c; + } + } + if (any < 0) + { + acc = ULONG_MAX; + __set_errno(ERANGE); + } + else if (neg) + acc = -acc; + if (endptr != 0) + *endptr = any ? (wchar_t *)s - 1 : (wchar_t *)nptr; + return acc; +} + +#if 0 +unsigned long wcstoul(const wchar_t *cp,wchar_t **endp,int base) +{ + unsigned long result = 0,value; + + if (!base) { + base = 10; + if (*cp == L'0') { + base = 8; + cp++; + if ((*cp == L'x') && iswxdigit(cp[1])) { + cp++; + base = 16; + } + } + } + while (iswxdigit(*cp) && (value = iswdigit(*cp) ? *cp-L'0' : (iswlower(*cp) + ? towupper(*cp) : *cp)-L'A'+10) < base) { + result = result*base + value; + cp++; + } + if (endp) + *endp = (wchar_t *)cp; + return result; +} +#endif diff --git a/reactos/lib/crt/stdlib/wctomb.c b/reactos/lib/crt/stdlib/wctomb.c new file mode 100644 index 00000000000..a38cffad4c0 --- /dev/null +++ b/reactos/lib/crt/stdlib/wctomb.c @@ -0,0 +1,151 @@ +/* Copyright (C) 1991, 1992, 1995, 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The GNU C 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include "precomp.h" +#include +#include +#include +#include +#include + + +int +STDCALL +WideCharToMultiByte( + UINT CodePage, + DWORD dwFlags, + LPCWSTR lpWideCharStr, + int cchWideChar, + LPSTR lpMultiByteStr, + int cchMultiByte, + LPCSTR lpDefaultChar, + LPBOOL lpUsedDefaultChar); + + +/* + * @unimplemented + */ +int wctomb(char* dst, wchar_t ch) +{ +#if 0 + return WideCharToMultiByte(CP_ACP, 0, &ch, 1, dst, 6, NULL, NULL); +#else + if (dst == NULL) { + return 1; + } else if (0 != (ch & 0xff00)) { + return -1; + } + *dst = ch; + return 1; +#endif +} + + +#if 0 + +#ifndef EILSEQ +#define EILSEQ EINVAL +#endif + +static const wchar_t encoding_mask[] = +{ + /* This reflects the sources *nix origin where type wchar_t + was 32 bits wide. Since our type wchar_t is only 16 bits + wide all this module will need to be reviewed. + Simplest option may well be to forward this modules work + on to the kernel which already has support for this. + */ + ~0x7ff, ~0xffff, ~0x1fffff, ~0x3ffffff + //~0x0000-07ff, ~0x0000-ffff, ~0x001f-ffff, ~0x03ff-ffff +}; + +static const unsigned char encoding_byte[] = +{ + 0xc0, 0xe0, 0xf0, 0xf8, 0xfc +}; + +/* The state is for this UTF8 encoding not used. */ +//static mbstate_t internal; +//extern mbstate_t __no_r_state; /* Defined in mbtowc.c. */ + +size_t __wcrtomb(char *s, wchar_t wc); + +/* Convert WCHAR into its multibyte character representation, + putting this in S and returning its length. + + Attention: this function should NEVER be intentionally used. + The interface is completely stupid. The state is shared between + all conversion functions. You should use instead the restartable + version `wcrtomb'. */ + +int wctomb(char *s, wchar_t wchar) +{ + /* If S is NULL the function has to return null or not null + depending on the encoding having a state depending encoding or + not. This is nonsense because any multibyte encoding has a + state. The ISO C amendment 1 corrects this while introducing the + restartable functions. We simply say here all encodings have a + state. */ + if (s == NULL) { + return 1; + } + return __wcrtomb(s, wchar); +} + +size_t __wcrtomb(char *s, wchar_t wc) +{ + char fake[1]; + size_t written = 0; + + if (s == NULL) { + s = fake; + wc = L'\0'; + } + /* Store the UTF8 representation of WC. */ + //if (wc < 0 || wc > 0x7fffffff) { + if (wc < 0 || wc > 0x7fff) { + /* This is no correct ISO 10646 character. */ + __set_errno (EILSEQ); + return (size_t) -1; + } + if (wc < 0x80) { + /* It's a one byte sequence. */ + if (s != NULL) { + *s = (char)wc; + } + return 1; + } + for (written = 2; written < 6; ++written) { + if ((wc & encoding_mask[written - 2]) == 0) { + break; + } + } + if (s != NULL) { + size_t cnt = written; + s[0] = encoding_byte[cnt - 2]; + --cnt; + do { + s[cnt] = 0x80 | (wc & 0x3f); + wc >>= 6; + } while (--cnt > 0); + s[0] |= wc; + } + return written; +} + +#endif diff --git a/reactos/lib/crt/stdlib/wfulpath.c b/reactos/lib/crt/stdlib/wfulpath.c new file mode 100644 index 00000000000..47d90bb12b7 --- /dev/null +++ b/reactos/lib/crt/stdlib/wfulpath.c @@ -0,0 +1,26 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: lib/msvcrt/stdlib/fullpath.c + * PURPOSE: Gets the fullpathname + * PROGRAMER: Boudewijn Dekker + * UPDATE HISTORY: + * 28/12/98: Created + */ + +#include "precomp.h" +#include + + +/* + * @implemented + */ +wchar_t* _wfullpath(wchar_t* absPath, const wchar_t* relPath, size_t maxLength) +{ + wchar_t* lpFilePart; + + if (GetFullPathNameW(relPath,maxLength,absPath,&lpFilePart) == 0) + return NULL; + + return absPath; +} diff --git a/reactos/lib/crt/stdlib/witoa.c b/reactos/lib/crt/stdlib/witoa.c new file mode 100644 index 00000000000..4e6d85aa488 --- /dev/null +++ b/reactos/lib/crt/stdlib/witoa.c @@ -0,0 +1,98 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: lib/msvcrt/stdlib/itoa.c + * PURPOSE: converts a integer to ascii + * PROGRAMER: + * UPDATE HISTORY: + * 1995: Created + * 1998: Added ltoa Boudewijn Dekker + */ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ + +#include +#include +#include + + +/* + * @implemented + */ +char* _i64toa(__int64 value, char* string, int radix) +{ + char tmp[65]; + char *tp = tmp; + int i; + unsigned v; + int sign; + char *sp; + + if (radix > 36 || radix <= 1) + { + __set_errno(EDOM); + return 0; + } + + sign = (radix == 10 && value < 0); + if (sign) + v = -value; + else + v = (unsigned)value; + while (v || tp == tmp) + { + i = v % radix; + v = v / radix; + if (i < 10) + *tp++ = i+'0'; + else + *tp++ = i + 'a' - 10; + } + + if (string == 0) + string = (char *)malloc((tp-tmp)+sign+1); + sp = string; + + if (sign) + *sp++ = '-'; + while (tp > tmp) + *sp++ = *--tp; + *sp = 0; + return string; +} + +/* + * @implemented + */ +char* _ui64toa(unsigned __int64 value, char* string, int radix) +{ + char tmp[65]; + char *tp = tmp; + long i; + unsigned long v = value; + char *sp; + + if (radix > 36 || radix <= 1) + { + __set_errno(EDOM); + return 0; + } + + while (v || tp == tmp) + { + i = v % radix; + v = v / radix; + if (i < 10) + *tp++ = i+'0'; + else + *tp++ = i + 'a' - 10; + } + + if (string == 0) + string = (char *)malloc((tp-tmp)+1); + sp = string; + + while (tp > tmp) + *sp++ = *--tp; + *sp = 0; + return string; +} diff --git a/reactos/lib/crt/stdlib/witow.c b/reactos/lib/crt/stdlib/witow.c new file mode 100644 index 00000000000..245802a9e5a --- /dev/null +++ b/reactos/lib/crt/stdlib/witow.c @@ -0,0 +1,96 @@ +/* $Id$ + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: lib/msvcrt/stdlib/itow.c + * PURPOSE: converts a integer to wchar_t + * PROGRAMER: + * UPDATE HISTORY: + * 1995: Created + * 1998: Added ltoa Boudewijn Dekker + * 2000: derived from ./itoa.c by ea + */ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ + +#include +#include +#include + + +/* + * @implemented + */ +wchar_t* _i64tow(__int64 value, wchar_t* string, int radix) +{ + wchar_t tmp[65]; + wchar_t* tp = tmp; + int i; + unsigned v; + int sign; + wchar_t* sp; + + if (radix > 36 || radix <= 1) { + __set_errno(EDOM); + return 0; + } + + sign = (radix == 10 && value < 0); + if (sign) + v = -value; + else + v = (unsigned)value; + while (v || tp == tmp) { + i = v % radix; + v = v / radix; + if (i < 10) + *tp++ = i+L'0'; + else + *tp++ = i + L'a' - 10; + } + + if (string == 0) + string = (wchar_t*)malloc(((tp-tmp)+sign+1)*sizeof(wchar_t)); + sp = string; + + if (sign) + *sp++ = L'-'; + while (tp > tmp) + *sp++ = *--tp; + *sp = 0; + return string; +} + +/* + * @implemented + */ +wchar_t* _ui64tow(unsigned __int64 value, wchar_t* string, int radix) +{ + wchar_t tmp[65]; + wchar_t* tp = tmp; + long i; + unsigned long v = value; + wchar_t* sp; + + if (radix > 36 || radix <= 1) { + __set_errno(EDOM); + return 0; + } + + while (v || tp == tmp) { + i = v % radix; + v = v / radix; + if (i < 10) + *tp++ = i+L'0'; + else + *tp++ = i + L'a' - 10; + } + + if (string == 0) + string = (wchar_t*)malloc(((tp-tmp)+1)*sizeof(wchar_t)); + sp = string; + + while (tp > tmp) + *sp++ = *--tp; + *sp = 0; + return string; +} diff --git a/reactos/lib/crt/stdlib/wmakpath.c b/reactos/lib/crt/stdlib/wmakpath.c new file mode 100644 index 00000000000..5026ca3416d --- /dev/null +++ b/reactos/lib/crt/stdlib/wmakpath.c @@ -0,0 +1,37 @@ +/* $Id$ + */ +#include +#include + + +/* + * @implemented + */ +void _wmakepath(wchar_t* path, const wchar_t* drive, const wchar_t* dir, const wchar_t* fname, const wchar_t* ext) +{ + int dir_len; + + if ((drive != NULL) && (*drive)) { + path[0] = *drive; + path[1] = L':'; + path[2] = 0; + } else { + (*path) = 0; + } + + if (dir != NULL) { + wcscat(path, dir); + dir_len = wcslen(dir); + if (dir_len && *(dir + dir_len - 1) != L'\\') + wcscat(path, L"\\"); + } + + if (fname != NULL) { + wcscat(path, fname); + if (ext != NULL && *ext != 0) { + if (*ext != L'.') + wcscat(path, L"."); + wcscat(path, ext); + } + } +} diff --git a/reactos/lib/crt/stdlib/wputenv.c b/reactos/lib/crt/stdlib/wputenv.c new file mode 100644 index 00000000000..8b34b510a96 --- /dev/null +++ b/reactos/lib/crt/stdlib/wputenv.c @@ -0,0 +1,17 @@ +#include "precomp.h" +#include +#include + +#define NDEBUG +#include + +/* misc/environ.c */ +int SetEnv(const wchar_t *option); + +/* + * @implemented + */ +int _wputenv(const wchar_t* val) +{ + return SetEnv(val); +} diff --git a/reactos/lib/crt/stdlib/wsenv.c b/reactos/lib/crt/stdlib/wsenv.c new file mode 100644 index 00000000000..0ebc7f1cde2 --- /dev/null +++ b/reactos/lib/crt/stdlib/wsenv.c @@ -0,0 +1,35 @@ +#include "precomp.h" +#include +#include + +#define NDEBUG +#include + + +/* + * @implemented + */ +void _wsearchenv(const wchar_t* file,const wchar_t* var,wchar_t* path) +{ + wchar_t* env = _wgetenv(var); + wchar_t* x; + wchar_t* y; + wchar_t* FilePart; + + DPRINT("_wsearchenv()\n"); + x = wcschr(env,L'='); + if ( x != NULL ) { + *x = 0; + x++; + } + y = wcschr(env,L';'); + while ( y != NULL ) { + *y = 0; + if ( SearchPathW(x,file,NULL,MAX_PATH,path,&FilePart) > 0 ) { + return; + } + x = y+1; + y = wcschr(env,L';'); + } + return; +} diff --git a/reactos/lib/crt/stdlib/wsplitp.c b/reactos/lib/crt/stdlib/wsplitp.c new file mode 100644 index 00000000000..8a3520884b7 --- /dev/null +++ b/reactos/lib/crt/stdlib/wsplitp.c @@ -0,0 +1,69 @@ +#include +#include + + +/* + * @implemented + */ +void _wsplitpath(const wchar_t* path, wchar_t* drive, wchar_t* dir, wchar_t* fname, wchar_t* ext) +{ + wchar_t* tmp_drive; + wchar_t* tmp_dir; + wchar_t* tmp_ext; + + tmp_drive = (wchar_t*)wcschr(path,L':'); + if (drive) + { + if (tmp_drive) + { + wcsncpy(drive,tmp_drive-1,2); + *(drive+2) = 0; + } + else + { + *drive = 0; + } + } + if (!tmp_drive) + { + tmp_drive = (wchar_t*)path - 1; + } + + tmp_dir = (wchar_t*)wcsrchr(path,L'\\'); + if (dir) + { + if (tmp_dir) + { + wcsncpy(dir,tmp_drive+1,tmp_dir-tmp_drive); + *(dir+(tmp_dir-tmp_drive)) = 0; + } + else + { + *dir =0; + } + } + + tmp_ext = (wchar_t*)wcsrchr(path,L'.'); + if (! tmp_ext) + { + tmp_ext = (wchar_t*)path+wcslen(path); + } + if (ext) + { + wcscpy(ext,tmp_ext); + } + + if (fname) + { + if (tmp_dir) + { + wcsncpy(fname,tmp_dir+1,tmp_ext-tmp_dir-1); + *(fname+(tmp_ext-tmp_dir-1)) = 0; + } + else + { + wcsncpy(fname,tmp_drive+1,tmp_ext-tmp_drive-1); + *(fname+(tmp_ext-path))=0; + } + } +} diff --git a/reactos/lib/crt/stdlib/wtoi.c b/reactos/lib/crt/stdlib/wtoi.c new file mode 100644 index 00000000000..f8282056ef6 --- /dev/null +++ b/reactos/lib/crt/stdlib/wtoi.c @@ -0,0 +1,17 @@ +#include + +/* + * @implemented + */ +int _wtoi( const wchar_t *str ) +{ + return (int)wcstol(str, 0, 10); +} + +/* + * @implemented + */ +long _wtol( const wchar_t *str ) +{ + return (int)wcstol(str, 0, 10); +} diff --git a/reactos/lib/crt/stdlib/wtoi64.c b/reactos/lib/crt/stdlib/wtoi64.c new file mode 100644 index 00000000000..a59513dadd2 --- /dev/null +++ b/reactos/lib/crt/stdlib/wtoi64.c @@ -0,0 +1,31 @@ +#include +#include + + +/* + * @implemented + */ +__int64 _wtoi64(const wchar_t* nptr) +{ + wchar_t* s = (wchar_t*)nptr; + __int64 acc = 0; + int neg = 0; + + while (iswspace((int)*s)) + s++; + if (*s == '-') { + neg = 1; + s++; + } + else if (*s == '+') + s++; + + while (iswdigit((int)*s)) { + acc = 10 * acc + ((int)*s - '0'); + s++; + } + + if (neg) + acc *= -1; + return acc; +} diff --git a/reactos/lib/crt/string/lasttok.c b/reactos/lib/crt/string/lasttok.c new file mode 100644 index 00000000000..2713e4c954b --- /dev/null +++ b/reactos/lib/crt/string/lasttok.c @@ -0,0 +1,19 @@ +#ifdef __USE_W32API +#undef __USE_W32API +#endif + +#include +#include + +/* + * This is an MSVCRT internal function to return the lasttoken + * bit of data used by strtok. The reason for it's existence is + * so that CRTDLL can use the strtok source code in the same + * file. + */ +char** _lasttoken() +{ + PTHREADDATA ptd = GetThreadData(); + assert(ptd); + return &(ptd->lasttoken); +} diff --git a/reactos/lib/crt/string/memicmp.c b/reactos/lib/crt/string/memicmp.c new file mode 100644 index 00000000000..3cbff006c09 --- /dev/null +++ b/reactos/lib/crt/string/memicmp.c @@ -0,0 +1,23 @@ +/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ +#include +#include + +/* + * @implemented + */ +int +_memicmp(const void *s1, const void *s2, size_t n) +{ + if (n != 0) + { + const unsigned char *p1 = s1, *p2 = s2; + + do { + if (toupper(*p1) != toupper(*p2)) + return (*p1 - *p2); + p1++; + p2++; + } while (--n != 0); + } + return 0; +} diff --git a/reactos/lib/crt/string/strcoll.c b/reactos/lib/crt/string/strcoll.c new file mode 100644 index 00000000000..1571b4ae3c0 --- /dev/null +++ b/reactos/lib/crt/string/strcoll.c @@ -0,0 +1,36 @@ +#include "precomp.h" +#include + +/* Compare S1 and S2, returning less than, equal to or + greater than zero if the collated form of S1 is lexicographically + less than, equal to or greater than the collated form of S2. */ + +#if 1 +/* + * @unimplemented + */ +int strcoll(const char* s1, const char* s2) +{ + return strcmp(s1, s2); +} + +/* + * @unimplemented + */ +int _stricoll(const char* s1, const char* s2) +{ + return _stricmp(s1, s2); +} + +#else +int strcoll (const char* s1,const char* s2) +{ + int ret; + ret = CompareStringA(LOCALE_USER_DEFAULT,0,s1,strlen(s1),s2,strlen(s2)); + if (ret == 0) + return 0; + else + return ret - 2; + return 0; +} +#endif diff --git a/reactos/lib/crt/string/strdup.c b/reactos/lib/crt/string/strdup.c new file mode 100644 index 00000000000..c728585819b --- /dev/null +++ b/reactos/lib/crt/string/strdup.c @@ -0,0 +1,19 @@ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#include +#include + + +/* + * @implemented + */ +char *_strdup(const char *_s) +{ + char *rv; + if (_s == 0) + return 0; + rv = (char *)malloc(strlen(_s) + 1); + if (rv == 0) + return 0; + strcpy(rv, _s); + return rv; +} diff --git a/reactos/lib/crt/string/strerror.c b/reactos/lib/crt/string/strerror.c new file mode 100644 index 00000000000..fa8d9d0083b --- /dev/null +++ b/reactos/lib/crt/string/strerror.c @@ -0,0 +1,114 @@ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#include +#include +#include + + +char __syserr00[] = "No Error"; +char __syserr01[] = "Operation not permitted (EPERM)"; +char __syserr02[] = "No such file or directory (ENOENT)"; +char __syserr03[] = "No such process (ESRCH)"; +char __syserr04[] = "Interrupted system call (EINTR)"; +char __syserr05[] = "Input or output error (EIO)"; +char __syserr06[] = "No such device or address (ENXIO)"; +char __syserr07[] = "Argument list too long (E2BIG)"; +char __syserr08[] = "Unable to execute file (ENOEXEC)"; +char __syserr09[] = "Bad file descriptor (EBADF)"; +char __syserr10[] = "No child processes (ECHILD)"; +char __syserr11[] = "Resource temporarily unavailable (EAGAIN)"; +char __syserr12[] = "Not enough memory (ENOMEM)"; +char __syserr13[] = "Permission denied (EACCES)"; +char __syserr14[] = "Bad address (EFAULT)"; +char __syserr15[] = "Unknown Error: 15"; +char __syserr16[] = "Resource busy (EBUSY)"; +char __syserr17[] = "File exists (EEXIST)"; +char __syserr18[] = "Improper link (EXDEV)"; +char __syserr19[] = "No such device (ENODEV)"; +char __syserr20[] = "Not a directory (ENOTDIR)"; +char __syserr21[] = "Is a directory (EISDIR)"; +char __syserr22[] = "Invalid argument (EINVAL)"; +char __syserr23[] = "Too many open files in system (ENFILE)"; +char __syserr24[] = "Too many open files (EMFILE)"; +char __syserr25[] = "Inappropriate I/O control operation (ENOTTY)"; +char __syserr26[] = "Unknown error: 26"; +char __syserr27[] = "File too large (EFBIG)"; +char __syserr28[] = "No space left on drive (ENOSPC)"; +char __syserr29[] = "Invalid seek (ESPIPE)"; +char __syserr30[] = "Read-only file system (EROFS)"; +char __syserr31[] = "Too many links (EMLINK)"; +char __syserr32[] = "Broken pipe (EPIPE)"; +char __syserr33[] = "Input to function out of range (EDOM)"; +char __syserr34[] = "Output of function out of range (ERANGE)"; +char __syserr35[] = "Unknown error: 35"; +char __syserr36[] = "Resource deadlock avoided (EDEADLK)"; +char __syserr37[] = "Unknown error: 37"; +char __syserr38[] = "File name too long (ENAMETOOLONG)"; +char __syserr39[] = "No locks available (ENOLCK)"; +char __syserr40[] = "Function not implemented (ENOSYS)"; +char __syserr41[] = "Directory not empty (ENOTEMPTY)"; +char __syserr42[] = "Illegal byte sequence (EILSEQ)"; + + + + +const char *_sys_errlist[] = { +__syserr00, __syserr01, __syserr02, __syserr03, __syserr04, +__syserr05, __syserr06, __syserr07, __syserr08, __syserr09, +__syserr10, __syserr11, __syserr12, __syserr13, __syserr14, +__syserr15, __syserr16, __syserr17, __syserr18, __syserr19, +__syserr20, __syserr21, __syserr22, __syserr23, __syserr24, +__syserr25, __syserr26, __syserr27, __syserr28, __syserr29, +__syserr30, __syserr31, __syserr32, __syserr33, __syserr34, +__syserr35, __syserr36, __syserr37, __syserr38, __syserr39, +__syserr40, __syserr41, __syserr42 +}; + +int __sys_nerr = sizeof(_sys_errlist) / sizeof(_sys_errlist[0]); + +int* _sys_nerr = &__sys_nerr; + +/* + * @implemented + */ +char *strerror(int errnum) +{ + static char ebuf[40]; /* 64-bit number + slop */ + char *cp; + int v=1000000, lz=0; + + if (errnum >= 0 && errnum < __sys_nerr) + return((char *)_sys_errlist[errnum]); + + strcpy(ebuf, "Unknown error: "); + cp = ebuf + 15; + if (errnum < 0) + { + *cp++ = '-'; + errnum = -errnum; + } + while (v) + { + int d = errnum / v; + if (d || lz || (v == 1)) + { + *cp++ = d+'0'; + lz = 1; + } + errnum %= v; + v /= 10; + } + + return ebuf; +} + + +/* + * @implemented + */ +char *_strerror(const char *s) +{ + if ( s == NULL ) + return strerror(*_errno()); + + return strerror(atoi(s)); +} diff --git a/reactos/lib/crt/string/stricmp.c b/reactos/lib/crt/string/stricmp.c new file mode 100644 index 00000000000..cfecfb81931 --- /dev/null +++ b/reactos/lib/crt/string/stricmp.c @@ -0,0 +1,28 @@ +/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ +#include +#include + +/* + * @implemented + */ +int +_stricmp(const char *s1, const char *s2) +{ + while (toupper(*s1) == toupper(*s2)) + { + if (*s1 == 0) + return 0; + s1++; + s2++; + } + return toupper(*(unsigned const char *)s1) - toupper(*(unsigned const char *)(s2)); +} + +/* + * @implemented + */ +int +_strcmpi(const char *s1, const char *s2) +{ + return _stricmp(s1,s2); +} diff --git a/reactos/lib/crt/string/strlwr.c b/reactos/lib/crt/string/strlwr.c new file mode 100644 index 00000000000..6ddba9c7a2a --- /dev/null +++ b/reactos/lib/crt/string/strlwr.c @@ -0,0 +1,26 @@ +/* + * The C RunTime DLL + * + * Implements C run-time functionality as known from UNIX. + * + * Copyright 1996,1998 Marcus Meissner + * Copyright 1996 Jukka Iivonen + * Copyright 1997 Uwe Bonnes + */ + +#include +#include + +/* + * @implemented + */ +char * _strlwr(char *x) +{ + char *y=x; + + while (*y) { + *y=tolower(*y); + y++; + } + return x; +} diff --git a/reactos/lib/crt/string/strncoll.c b/reactos/lib/crt/string/strncoll.c new file mode 100644 index 00000000000..304c52b1e5e --- /dev/null +++ b/reactos/lib/crt/string/strncoll.c @@ -0,0 +1,23 @@ +#include "precomp.h" +#include + +/* Compare S1 and S2, returning less than, equal to or + greater than zero if the collated form of S1 is lexicographically + less than, equal to or greater than the collated form of S2. */ + + +/* + * @unimplemented + */ +int _strncoll(const char* s1, const char* s2, size_t c) +{ + return strncmp(s1, s2, c); +} + +/* + * @unimplemented + */ +int _strnicoll(const char* s1, const char* s2, size_t c) +{ + return _strnicmp(s1, s2, c); +} diff --git a/reactos/lib/crt/string/strnicmp.c b/reactos/lib/crt/string/strnicmp.c new file mode 100644 index 00000000000..d6ff2c0d2d1 --- /dev/null +++ b/reactos/lib/crt/string/strnicmp.c @@ -0,0 +1,20 @@ +/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ +#include +#include + +/* + * @implemented + */ +int _strnicmp(const char *s1, const char *s2, size_t n) +{ + + if (n == 0) + return 0; + do { + if (toupper(*s1) != toupper(*s2++)) + return toupper(*(unsigned const char *)s1) - toupper(*(unsigned const char *)--s2); + if (*s1++ == 0) + break; + } while (--n != 0); + return 0; +} diff --git a/reactos/lib/crt/string/strpbrk.c b/reactos/lib/crt/string/strpbrk.c new file mode 100644 index 00000000000..72079d0aa8a --- /dev/null +++ b/reactos/lib/crt/string/strpbrk.c @@ -0,0 +1,21 @@ +/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ +#include + + +/* + * @implemented + */ +char * +strpbrk(const char *s1, const char *s2) +{ + const char *scanp; + int c, sc; + + while ((c = *s1++) != 0) + { + for (scanp = s2; (sc = *scanp++) != 0;) + if (sc == c) + return (char *)(s1 - 1); + } + return 0; +} diff --git a/reactos/lib/crt/string/strrev.c b/reactos/lib/crt/string/strrev.c new file mode 100644 index 00000000000..8827c3b5bb5 --- /dev/null +++ b/reactos/lib/crt/string/strrev.c @@ -0,0 +1,22 @@ +#include + +/* + * @implemented + */ +char * _strrev(char *s) +{ + char a, *b, *e; + b=e=s; + while (*e) + e++; + e--; /* start at last char, not NULL char */ + while ( b < e ) + { + a=*b; + *b=*e; + *e=a; + b++; + e--; + } + return s; /* return ptr to beginning of string */ +} diff --git a/reactos/lib/crt/string/strset.c b/reactos/lib/crt/string/strset.c new file mode 100644 index 00000000000..6de8d49b3bb --- /dev/null +++ b/reactos/lib/crt/string/strset.c @@ -0,0 +1,35 @@ +#include +#include +#include + +/* + * @implemented + */ +char* _strnset (char* szToFill, int szFill, size_t sizeMaxFill) +{ + char *t = szToFill; + int i = 0; + while( *szToFill != 0 && i < sizeMaxFill) + { + *szToFill = szFill; + szToFill++; + i++; + + } + return t; +} + +/* + * @implemented + */ +char* _strset (char* szToFill, int szFill) +{ + char *t = szToFill; + while( *szToFill != 0 ) + { + *szToFill = szFill; + szToFill++; + + } + return t; +} diff --git a/reactos/lib/crt/string/strstr.c b/reactos/lib/crt/string/strstr.c new file mode 100644 index 00000000000..430358fd196 --- /dev/null +++ b/reactos/lib/crt/string/strstr.c @@ -0,0 +1,25 @@ +/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ +#include + + +/* + * @implemented + */ +char *strstr(const char *s, const char *find) +{ + char c, sc; + size_t len; + + if ((c = *find++) != 0) + { + len = strlen(find); + do { + do { + if ((sc = *s++) == 0) + return 0; + } while (sc != c); + } while (strncmp(s, find, len) != 0); + s--; + } + return (char *)s; +} diff --git a/reactos/lib/crt/string/strtok.c b/reactos/lib/crt/string/strtok.c new file mode 100644 index 00000000000..2423f4ae840 --- /dev/null +++ b/reactos/lib/crt/string/strtok.c @@ -0,0 +1,64 @@ +/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ +#ifdef __USE_W32API +#undef __USE_W32API +#endif + +#include +#include + +char** _lasttoken(); /* lasttok.c */ + +/* + * @implemented + */ +char* strtok(char* s, const char* delim) +{ + const char *spanp; + int c, sc; + char *tok; +#if 1 + char ** lasttoken = _lasttoken(); +#else + PTHREADDATA ThreadData = GetThreadData(); + char ** lasttoken = &ThreadData->lasttoken; +#endif + + if (s == NULL && (s = *lasttoken) == NULL) + return (NULL); + + /* + * Skip (span) leading delimiters (s += strspn(s, delim), sort of). + */ + cont: + c = *s++; + for (spanp = delim; (sc = *spanp++) != 0;) { + if (c == sc) + goto cont; + } + + if (c == 0) { /* no non-delimiter characters */ + *lasttoken = NULL; + return (NULL); + } + tok = s - 1; + + /* + * Scan token (scan for delimiters: s += strcspn(s, delim), sort of). + * Note that delim must have one NUL; we stop if we see that, too. + */ + for (;;) { + c = *s++; + spanp = delim; + do { + if ((sc = *spanp++) == c) { + if (c == 0) + s = NULL; + else + s[-1] = 0; + *lasttoken = s; + return (tok); + } + } while (sc != 0); + } + /* NOTREACHED */ +} diff --git a/reactos/lib/crt/string/strupr.c b/reactos/lib/crt/string/strupr.c new file mode 100644 index 00000000000..413f585b21a --- /dev/null +++ b/reactos/lib/crt/string/strupr.c @@ -0,0 +1,27 @@ +/* + * The C RunTime DLL + * + * Implements C run-time functionality as known from UNIX. + * + * Copyright 1996,1998 Marcus Meissner + * Copyright 1996 Jukka Iivonen + * Copyright 1997 Uwe Bonnes + */ + + +#include +#include + +/* + * @implemented + */ +char *_strupr(char *x) +{ + char *y=x; + + while (*y) { + *y=toupper(*y); + y++; + } + return x; +} diff --git a/reactos/lib/crt/string/strxfrm.c b/reactos/lib/crt/string/strxfrm.c new file mode 100644 index 00000000000..dca7a645414 --- /dev/null +++ b/reactos/lib/crt/string/strxfrm.c @@ -0,0 +1,24 @@ +#include "precomp.h" +#include + +#if 1 +/* + * @implemented + */ +size_t strxfrm( char *dest, const char *src, size_t n ) +{ + strncpy(dest, src, n); + return (strlen(dest)); +} +#else +size_t strxfrm( char *dest, const char *src, size_t n ) +{ + int ret = LCMapStringA(LOCALE_USER_DEFAULT,LCMAP_LOWERCASE, + src, strlen(src), dest, strlen(dest)); + + if ( ret == 0 ) + return -1; + return ret; + +} +#endif diff --git a/reactos/lib/crt/sys_stat/fstat.c b/reactos/lib/crt/sys_stat/fstat.c new file mode 100644 index 00000000000..cc2addd351f --- /dev/null +++ b/reactos/lib/crt/sys_stat/fstat.c @@ -0,0 +1,85 @@ +/* $Id$ + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: lib/msvcrt/sys/fstat.c + * PURPOSE: Gather file information + * PROGRAMER: Boudewijn Dekker + * UPDATE HISTORY: + * 28/12/98: Created + */ + +#include "precomp.h" +#include +#include +#include +#include +#include +#include + + +/* + * @implemented + */ +int _fstat(int fd, struct stat* statbuf) +{ + BY_HANDLE_FILE_INFORMATION FileInformation; + DWORD dwFileType; + void* handle; + + if (!statbuf) { + __set_errno(EINVAL); + return -1; + } + + if ((void*)-1 == (handle = _get_osfhandle(fd))) + { + __set_errno(EBADF); + return -1; + } + + fflush(NULL); + + memset (statbuf, 0, sizeof(struct stat)); + + dwFileType = GetFileType(handle); + + if (dwFileType == FILE_TYPE_DISK) + { + if (!GetFileInformationByHandle(handle,&FileInformation)) + { + __set_errno(EBADF); + return -1; + } + statbuf->st_ctime = FileTimeToUnixTime(&FileInformation.ftCreationTime,NULL); + statbuf->st_atime = FileTimeToUnixTime(&FileInformation.ftLastAccessTime,NULL); + statbuf->st_mtime = FileTimeToUnixTime(&FileInformation.ftLastWriteTime,NULL); + + statbuf->st_dev = fd; + statbuf->st_size = FileInformation.nFileSizeLow; + statbuf->st_mode = S_IREAD; + if (FileInformation.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) + statbuf->st_mode |= S_IFDIR; + else + statbuf->st_mode |= S_IFREG; + if (!(FileInformation.dwFileAttributes & FILE_ATTRIBUTE_READONLY)) + statbuf->st_mode |= S_IWRITE; + } + else if (dwFileType == FILE_TYPE_CHAR) + { + statbuf->st_dev = fd; + statbuf->st_mode = S_IFCHR; + } + else if (dwFileType == FILE_TYPE_PIPE) + { + statbuf->st_dev = fd; + statbuf->st_mode = S_IFIFO; + } + else + { + // dwFileType is FILE_TYPE_UNKNOWN or has a bad value + __set_errno(EBADF); + return -1; + } + return 0; +} diff --git a/reactos/lib/crt/sys_stat/fstati64.c b/reactos/lib/crt/sys_stat/fstati64.c new file mode 100644 index 00000000000..ba7a053143f --- /dev/null +++ b/reactos/lib/crt/sys_stat/fstati64.c @@ -0,0 +1,86 @@ +/* $Id$ + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: lib/msvcrt/sys/fstat.c + * PURPOSE: Gather file information + * PROGRAMER: Boudewijn Dekker + * UPDATE HISTORY: + * 28/12/98: Created + */ + +#include "precomp.h" +#include +#include +#include +#include +#include +#include + + +/* + * @implemented + */ +__int64 _fstati64(int fd, struct _stati64* statbuf) +{ + BY_HANDLE_FILE_INFORMATION FileInformation; + DWORD dwFileType; + void *handle; + + if (!statbuf) + { + __set_errno(EINVAL); + return -1; + } + + if ((void*)-1 == (handle = _get_osfhandle(fd))) + { + __set_errno(EBADF); + return -1; + } + + fflush(NULL); + + memset(statbuf, 0, sizeof(struct _stati64)); + + dwFileType = GetFileType(handle); + + if (dwFileType == FILE_TYPE_DISK) + { + if (!GetFileInformationByHandle(handle,&FileInformation)) + { + __set_errno(EBADF); + return -1; + } + statbuf->st_ctime = FileTimeToUnixTime(&FileInformation.ftCreationTime,NULL); + statbuf->st_atime = FileTimeToUnixTime(&FileInformation.ftLastAccessTime,NULL); + statbuf->st_mtime = FileTimeToUnixTime(&FileInformation.ftLastWriteTime,NULL); + + statbuf->st_dev = fd; + statbuf->st_size = (((__int64)FileInformation.nFileSizeHigh) << 32) + + FileInformation.nFileSizeLow; + statbuf->st_mode = S_IREAD; + if (FileInformation.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) + statbuf->st_mode |= S_IFDIR; + else + statbuf->st_mode |= S_IFREG; + if (!(FileInformation.dwFileAttributes & FILE_ATTRIBUTE_READONLY)) statbuf->st_mode |= S_IWRITE; + } + else if (dwFileType == FILE_TYPE_CHAR) + { + statbuf->st_dev = fd; + statbuf->st_mode = S_IFCHR; + } + else if (dwFileType == FILE_TYPE_PIPE) + { + statbuf->st_dev = fd; + statbuf->st_mode = S_IFIFO; + } + else + { + // dwFileType is FILE_TYPE_UNKNOWN or has a bad value + __set_errno(EBADF); + return -1; + } + return 0; +} diff --git a/reactos/lib/crt/sys_stat/futime.c b/reactos/lib/crt/sys_stat/futime.c new file mode 100644 index 00000000000..ed3c37a9a66 --- /dev/null +++ b/reactos/lib/crt/sys_stat/futime.c @@ -0,0 +1,43 @@ +#include +#include +#include +#include +#include +#include +#include + + +/* + * @implemented + */ +int _futime (int nHandle, struct _utimbuf *pTimes) +{ + FILETIME LastAccessTime; + FILETIME LastWriteTime; + + // check for stdin / stdout handles ?? + if (nHandle == -1) { + __set_errno(EBADF); + return -1; + } + + if (pTimes == NULL) { + pTimes = alloca(sizeof(struct _utimbuf)); + time(&pTimes->actime); + time(&pTimes->modtime); + } + + if (pTimes->actime < pTimes->modtime) { + __set_errno(EINVAL); + return -1; + } + + UnixTimeToFileTime(pTimes->actime,&LastAccessTime,0); + UnixTimeToFileTime(pTimes->modtime,&LastWriteTime,0); + if (!SetFileTime(_get_osfhandle(nHandle),NULL, &LastAccessTime, &LastWriteTime)) { + __set_errno(EBADF); + return -1; + } + + return 0; +} diff --git a/reactos/lib/crt/sys_stat/stat.c b/reactos/lib/crt/sys_stat/stat.c new file mode 100644 index 00000000000..a1f5af85835 --- /dev/null +++ b/reactos/lib/crt/sys_stat/stat.c @@ -0,0 +1,117 @@ +#include "precomp.h" +#include +#include +#include +#include +#include +#include +#include + + +/* + * @implemented + */ +int _stat(const char* path, struct stat* buffer) +{ + WIN32_FILE_ATTRIBUTE_DATA fileAttributeData; + char* ext; + + if (!buffer) + { + __set_errno(EINVAL); + return -1; + } + + if (strchr(path, '*') || strchr(path, '?')) + { + __set_errno(ENOENT); + return -1; + } + + if (!GetFileAttributesExA(path, GetFileExInfoStandard, &fileAttributeData)) + { + __set_errno(ENOENT); + return -1; + } + + memset (buffer, 0, sizeof(struct stat)); + + buffer->st_ctime = FileTimeToUnixTime(&fileAttributeData.ftCreationTime,NULL); + buffer->st_atime = FileTimeToUnixTime(&fileAttributeData.ftLastAccessTime,NULL); + buffer->st_mtime = FileTimeToUnixTime(&fileAttributeData.ftLastWriteTime,NULL); + +// statbuf->st_dev = fd; + buffer->st_size = fileAttributeData.nFileSizeLow; + buffer->st_mode = S_IREAD; + if (fileAttributeData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) + buffer->st_mode |= S_IFDIR; + else + { + buffer->st_mode |= S_IFREG; + ext = strrchr(path, '.'); + if (ext && (!_stricmp(ext, ".exe") || + !_stricmp(ext, ".com") || + !_stricmp(ext, ".bat") || + !_stricmp(ext, ".cmd"))) + buffer->st_mode |= S_IEXEC; + } + if (!(fileAttributeData.dwFileAttributes & FILE_ATTRIBUTE_READONLY)) + buffer->st_mode |= S_IWRITE; + + return 0; +} + +/* + * @implemented + */ +__int64 _stati64 (const char *path, struct _stati64 *buffer) +{ + WIN32_FILE_ATTRIBUTE_DATA fileAttributeData; + char* ext; + + if (!buffer) + { + __set_errno(EINVAL); + return -1; + } + + if(strchr(path, '*') || strchr(path, '?')) + { + __set_errno(ENOENT); + return -1; + } + + if (!GetFileAttributesExA(path, GetFileExInfoStandard, &fileAttributeData)) + { + __set_errno(ENOENT); + return -1; + } + + memset (buffer, 0, sizeof(struct _stati64)); + + buffer->st_ctime = FileTimeToUnixTime(&fileAttributeData.ftCreationTime,NULL); + buffer->st_atime = FileTimeToUnixTime(&fileAttributeData.ftLastAccessTime,NULL); + buffer->st_mtime = FileTimeToUnixTime(&fileAttributeData.ftLastWriteTime,NULL); + +// statbuf->st_dev = fd; + buffer->st_size = ((((__int64)fileAttributeData.nFileSizeHigh) << 16) << 16) + + fileAttributeData.nFileSizeLow; + buffer->st_mode = S_IREAD; + if (fileAttributeData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) + buffer->st_mode |= S_IFDIR; + else + { + buffer->st_mode |= S_IFREG; + ext = strrchr(path, '.'); + if (ext && (!_stricmp(ext, ".exe") || + !_stricmp(ext, ".com") || + !_stricmp(ext, ".bat") || + !_stricmp(ext, ".cmd"))) + buffer->st_mode |= S_IEXEC; + } + if (!(fileAttributeData.dwFileAttributes & FILE_ATTRIBUTE_READONLY)) + buffer->st_mode |= S_IWRITE; + + return 0; +} + diff --git a/reactos/lib/crt/sys_stat/systime.c b/reactos/lib/crt/sys_stat/systime.c new file mode 100644 index 00000000000..59ecdc9d9ac --- /dev/null +++ b/reactos/lib/crt/sys_stat/systime.c @@ -0,0 +1,70 @@ +#include "precomp.h" +#include + + +int month[12] = { 31,28,31,30,31,30,31,31,30,31,30,31}; + +/* + * @unimplemented + */ +unsigned int _getsystime(struct tm* tp) +{ + SYSTEMTIME Time; + int i; + + GetLocalTime(&Time); + + tp->tm_year = Time.wYear - 1900; + tp->tm_mon = Time.wMonth - 1; + tp->tm_wday = Time.wDayOfWeek; + tp->tm_mday = Time.wDay; + tp->tm_hour = Time.wHour; + tp->tm_min = Time.wMinute; + tp->tm_sec = Time.wSecond; + + tp->tm_isdst = -1; + + //FIXME GetTimeZoneInformation currently not in kernel32 + + //TimeZoneId = GetTimeZoneInformation(&TimeZoneInformation ); + //if ( TimeZoneId == TIME_ZONE_ID_DAYLIGHT ) { + // tp->tm_isdst = 1; + //} + //else + // tp->tm_isdst = 0; + + if (tp->tm_year % 4 == 0) { + if (tp->tm_year % 100 != 0) + tp->tm_yday = 1; + else if ((tp->tm_year-100) % 1000 == 0) + tp->tm_yday = 1; + } + + for (i = 0; i <= tp->tm_mon; i++) + tp->tm_yday += month[i]; + + return Time.wMilliseconds; +} + + +/* + * @implemented + */ +unsigned int _setsystime(struct tm* tp, unsigned int ms) +{ + SYSTEMTIME Time; + + Time.wYear = tp->tm_year + 1900; + Time.wMonth = tp->tm_mon + 1; + Time.wDayOfWeek = tp->tm_wday; + Time.wDay = tp->tm_mday; + Time.wHour = tp->tm_hour; + Time.wMinute = tp->tm_min; + Time.wSecond = tp->tm_sec; + Time.wMilliseconds = ms; + + if (!SetLocalTime(&Time)) + return -1; + + return 0; +} diff --git a/reactos/lib/crt/sys_stat/wstat.c b/reactos/lib/crt/sys_stat/wstat.c new file mode 100644 index 00000000000..5cbdc4360df --- /dev/null +++ b/reactos/lib/crt/sys_stat/wstat.c @@ -0,0 +1,116 @@ +#include "precomp.h" +#include +#include +#include +#include +#include +#include +#include + + +/* + * @implemented + */ +int _wstat (const wchar_t *path, struct stat *buffer) +{ + WIN32_FILE_ATTRIBUTE_DATA fileAttributeData; + wchar_t *ext; + + if (!buffer) + { + __set_errno(EINVAL); + return -1; + } + + if(wcschr(path, L'*') || wcschr(path, L'?')) + { + __set_errno(ENOENT); + return -1; + } + + if (!GetFileAttributesExW(path, GetFileExInfoStandard, &fileAttributeData)) + { + __set_errno(ENOENT); + return -1; + } + + memset (buffer, 0, sizeof(struct stat)); + + buffer->st_ctime = FileTimeToUnixTime(&fileAttributeData.ftCreationTime,NULL); + buffer->st_atime = FileTimeToUnixTime(&fileAttributeData.ftLastAccessTime,NULL); + buffer->st_mtime = FileTimeToUnixTime(&fileAttributeData.ftLastWriteTime,NULL); + +// statbuf->st_dev = fd; + buffer->st_size = fileAttributeData.nFileSizeLow; + buffer->st_mode = S_IREAD; + if (fileAttributeData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) + buffer->st_mode |= S_IFDIR; + else + { + buffer->st_mode |= S_IFREG; + ext = wcsrchr(path, L'.'); + if (ext && (!_wcsicmp(ext, L".exe") || + !_wcsicmp(ext, L".com") || + !_wcsicmp(ext, L".bat") || + !_wcsicmp(ext, L".cmd"))) + buffer->st_mode |= S_IEXEC; + } + if (!(fileAttributeData.dwFileAttributes & FILE_ATTRIBUTE_READONLY)) + buffer->st_mode |= S_IWRITE; + + return 0; +} + +/* + * @implemented + */ +__int64 _wstati64 (const wchar_t *path, struct _stati64 *buffer) +{ + WIN32_FILE_ATTRIBUTE_DATA fileAttributeData; + wchar_t *ext; + + if (!buffer) + { + __set_errno(EINVAL); + return -1; + } + + if(wcschr(path, L'*') || wcschr(path, L'?')) + { + __set_errno(ENOENT); + return -1; + } + + if (!GetFileAttributesExW(path, GetFileExInfoStandard, &fileAttributeData)) + { + __set_errno(ENOENT); + return -1; + } + + memset (buffer, 0, sizeof(struct _stati64)); + + buffer->st_ctime = FileTimeToUnixTime(&fileAttributeData.ftCreationTime,NULL); + buffer->st_atime = FileTimeToUnixTime(&fileAttributeData.ftLastAccessTime,NULL); + buffer->st_mtime = FileTimeToUnixTime(&fileAttributeData.ftLastWriteTime,NULL); + +// statbuf->st_dev = fd; + buffer->st_size = ((((__int64)fileAttributeData.nFileSizeHigh) << 16) << 16) + + fileAttributeData.nFileSizeLow; + buffer->st_mode = S_IREAD; + if (fileAttributeData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) + buffer->st_mode |= S_IFDIR; + else + { + buffer->st_mode |= S_IFREG; + ext = wcsrchr(path, L'.'); + if (ext && (!_wcsicmp(ext, L".exe") || + !_wcsicmp(ext, L".com") || + !_wcsicmp(ext, L".bat") || + !_wcsicmp(ext, L".cmd"))) + buffer->st_mode |= S_IEXEC; + } + if (!(fileAttributeData.dwFileAttributes & FILE_ATTRIBUTE_READONLY)) + buffer->st_mode |= S_IWRITE; + + return 0; +} diff --git a/reactos/lib/crt/time/clock.c b/reactos/lib/crt/time/clock.c new file mode 100644 index 00000000000..cd9e77a41c8 --- /dev/null +++ b/reactos/lib/crt/time/clock.c @@ -0,0 +1,32 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: lib/msvcrt/time/clock.c + * PURPOSE: Get elapsed time + * PROGRAMER: Boudewijn Dekker + * UPDATE HISTORY: + * 28/12/98: Created + */ + +#include "precomp.h" +#include +#include + +VOID STDCALL GetSystemTimeAsFileTime(LPFILETIME lpSystemTimeAsFileTime ); + +/* + * @implemented + */ +clock_t clock ( void ) +{ + FILETIME CreationTime; + FILETIME ExitTime; + FILETIME KernelTime; + FILETIME UserTime; + DWORD Remainder; + + if (!GetProcessTimes(GetCurrentProcess(),&CreationTime,&ExitTime,&KernelTime,&UserTime)) + return -1; + + return FileTimeToUnixTime(&KernelTime,&Remainder) + FileTimeToUnixTime(&UserTime,&Remainder); +} diff --git a/reactos/lib/crt/time/ctime.c b/reactos/lib/crt/time/ctime.c new file mode 100644 index 00000000000..fcadb68f1a3 --- /dev/null +++ b/reactos/lib/crt/time/ctime.c @@ -0,0 +1,1439 @@ + +// fix djdir + +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +/* This file has been modified by DJ Delorie. These modifications are +** Copyright (C) 1995 DJ Delorie, 24 Kirsten Ave, Rochester NH, +** 03867-2954, USA. +*/ + +/* + * Copyright (c) 1987, 1989 Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Arthur David Olson of the National Cancer Institute. + * + * Redistribution and use in source and binary forms are permitted provided + * that: (1) source distributions retain this entire copyright notice and + * comment, and (2) distributions including binaries display the following + * acknowledgement: ``This product includes software developed by the + * University of California, Berkeley and its contributors'' in the + * documentation or other materials provided with the distribution and in + * all advertising materials mentioning features or use of this software. + * Neither the name of the University nor the names of its contributors may + * be used to endorse or promote products derived from this software without + * specific prior written permission. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + */ + +/* +** Leap second handling from Bradley White (bww@k.gp.cs.cmu.edu). +** POSIX-style TZ environment variable handling from Guy Harris +** (guy@auspex.com). +*/ + +#include "precomp.h" +#include +#include +#include +#include +#include +#include + +#include "tzfile.h" + +#include + +#include "posixrul.h" + + +#ifdef __cplusplus +#define CPP_CONST const +#else +#define CPP_CONST +#endif + +#define P(s) s +#define alloc_size_t size_t +#define qsort_size_t size_t +#define fread_size_t size_t +#define fwrite_size_t size_t + +#define ACCESS_MODE O_RDONLY|O_BINARY +#define OPEN_MODE O_RDONLY|O_BINARY + +/* +** Someone might make incorrect use of a time zone abbreviation: +** 1. They might reference tzname[0] before calling tzset (explicitly +** or implicitly). +** 2. They might reference tzname[1] before calling tzset (explicitly +** or implicitly). +** 3. They might reference tzname[1] after setting to a time zone +** in which Daylight Saving Time is never observed. +** 4. They might reference tzname[0] after setting to a time zone +** in which Standard Time is never observed. +** 5. They might reference tm.TM_ZONE after calling offtime. +** What's best to do in the above cases is open to debate; +** for now, we just set things up so that in any of the five cases +** WILDABBR is used. Another possibility: initialize tzname[0] to the +** string "tzname[0] used before set", and similarly for the other cases. +** And another: initialize tzname[0] to "ERA", with an explanation in the +** manual page of what this "time zone abbreviation" means (doing this so +** that tzname[0] has the "normal" length of three characters). +*/ + +void _set_daylight_export(int); +void _set_timezone_export(int); + + +/* buffers must hold 64 characters! */ +static char TZ_NAME[64] = "PST"; +static char TZ_DST_NAME[64] = "PDT"; + +#ifndef TRUE +#define TRUE 1 +#define FALSE 0 +#endif /* !defined TRUE */ + +static const char GMT[] = "GMT"; + +struct ttinfo { /* time type information */ + long tt_gmtoff; /* GMT offset in seconds */ + int tt_isdst; /* used to set tm_isdst */ + int tt_abbrind; /* abbreviation list index */ + int tt_ttisstd; /* TRUE if transition is std time */ +}; + +struct lsinfo { /* leap second information */ + time_t ls_trans; /* transition time */ + long ls_corr; /* correction to apply */ +}; + +struct state { + int leapcnt; + int timecnt; + int typecnt; + int charcnt; + time_t ats[TZ_MAX_TIMES]; + unsigned char types[TZ_MAX_TIMES]; + struct ttinfo ttis[TZ_MAX_TYPES]; + char chars[(TZ_MAX_CHARS + 1 > sizeof GMT) ? TZ_MAX_CHARS + 1 : sizeof GMT]; + struct lsinfo lsis[TZ_MAX_LEAPS]; +}; + +struct rule { + int r_type; /* type of rule--see below */ + int r_day; /* day number of rule */ + int r_week; /* week number of rule */ + int r_mon; /* month number of rule */ + long r_time; /* transition time of rule */ +}; + +#define JULIAN_DAY 0 /* Jn - Julian day */ +#define DAY_OF_YEAR 1 /* n - day of year */ +#define MONTH_NTH_DAY_OF_WEEK 2 /* Mm.n.d - month, week, day of week */ + +/* +** Prototypes for static functions. +*/ +#if 0 +static long detzcode P((const char * codep)); +static const char * getzname P((const char * strp)); +static const char * getnum P((const char * strp, int * nump, int min, int max)); +static const char * getsecs P((const char * strp, long * secsp)); +static const char * getoffset P((const char * strp, long * offsetp)); +static const char * getrule P((const char * strp, struct rule * rulep)); +static void gmtload P((struct state * sp)); +static void gmtsub P((const time_t * timep, long offset, struct tm * tmp)); +static void localsub P((const time_t * timep, long offset, struct tm * tmp)); +static void normalize P((int * tensptr, int * unitsptr, int base)); +static void settzname P((void)); +static time_t time1 P((struct tm * tmp, void (* funcp)(const time_t * CPP_CONST, const long, struct tm * CPP_CONST), long offset)); +static time_t time2 P((struct tm *tmp, void (* funcp)(const time_t * CPP_CONST, const long, struct tm * CPP_CONST), long offset, int * okayp)); +static void timesub P((const time_t * timep, long offset, const struct state * sp, struct tm * tmp)); +static int tmcomp P((const struct tm * atmp, const struct tm * btmp)); +static time_t transtime P((time_t janfirst, int year, const struct rule * rulep, long offset)); +static int tzload P((const char * name, struct state * sp)); +static int tzparse P((const char * name, struct state * sp, int lastditch)); +static void tzsetwall(void); + +#else + +static const char * getnum(const char * strp, int * CPP_CONST nump, const int min, const int max); +static void timesub(const time_t * CPP_CONST timep, const long offset, const struct state * CPP_CONST sp, struct tm * CPP_CONST tmp); +static time_t transtime(const time_t janfirst, const int year, const struct rule * CPP_CONST rulep, const long offset); +static void tzsetwall(void); + +#endif + +#ifdef ALL_STATE +static struct state *lclptr; +static struct state *gmtptr; +#endif /* defined ALL_STATE */ + +#ifndef ALL_STATE +static struct state lclmem; +static struct state gmtmem; +#define lclptr (&lclmem) +#define gmtptr (&gmtmem) +#endif /* State Farm */ + +static int lcl_is_set; +static int gmt_is_set; + +char * _tzname[2] = { + TZ_NAME, + TZ_DST_NAME, +}; + +static long +detzcode(const char * CPP_CONST codep) +{ + long result; + int i; + + result = 0; + for (i = 0; i < 4; ++i) + result = (result << 8) | (codep[i] & 0xff); + return result; +} + +static void +settzname(void) +{ + const struct state * CPP_CONST sp = lclptr; + int i; + + _tzname[0] = TZ_NAME; + _tzname[1] = TZ_DST_NAME; +#ifdef ALL_STATE + if (sp == NULL) + { + _tzname[0] = _tzname[1] = GMT; + return; + } +#endif /* defined ALL_STATE */ + for (i = 0; i < sp->typecnt; ++i) + { + register const struct ttinfo * CPP_CONST ttisp = &sp->ttis[i]; + + _tzname[ttisp->tt_isdst] = + (char *)&sp->chars[ttisp->tt_abbrind]; +#if 0 + if (ttisp->tt_isdst) { + //_daylight = 1; + _set_daylight_export(1); + } + if (i == 0 || !ttisp->tt_isdst) { + //_timezone_dll = -(ttisp->tt_gmtoff); + _set_timezone_export(-(ttisp->tt_gmtoff)); + } + if (i == 0 || ttisp->tt_isdst) { + _altzone = -(ttisp->tt_gmtoff); + } +#endif + } + /* + ** And to get the latest zone names into tzname. . . + */ + for (i = 0; i < sp->timecnt; ++i) + { + const struct ttinfo * CPP_CONST ttisp = &sp->ttis[sp->types[i]]; + + _tzname[ttisp->tt_isdst] = (char *)&sp->chars[ttisp->tt_abbrind]; + } +} + +static char* tzdir(void) +{ + static char dir[80]={0}, *cp; + if (dir[0] == 0) + { + if ((cp = getenv("TZDIR"))) + { + strcpy(dir, cp); + } + else if ((cp = getenv("DJDIR"))) + { + strcpy(dir, cp); + strcat(dir, "/zoneinfo"); + } + else + strcpy(dir, "./"); + } + return dir; +} + +static int tzload(const char* name, struct state* CPP_CONST sp) +{ + const char * p; + int i; + int fid; + char fullname[FILENAME_MAX + 1]; + const struct tzhead * tzhp; + char buf[sizeof *sp + sizeof *tzhp]; + int ttisstdcnt; + + if (name == NULL && (name = TZDEFAULT) == NULL) + return -1; + + if (name[0] == ':') + ++name; + if (name[0] != '/') + { + if ((p = tzdir()) == NULL) + return -1; + if ((strlen(p) + strlen(name) + 1) >= sizeof fullname) + return -1; + strcpy(fullname, p); + strcat(fullname, "/"); + strcat(fullname, name); + name = fullname; + } + + if ((fid = open(name, OPEN_MODE)) == -1) + { + const char *base = strrchr(name, '/'); + if (base) + base++; + else + base = name; + if (strcmp(base, "posixrules")) + return -1; + + /* We've got a built-in copy of posixrules just in case */ + memcpy(buf, _posixrules_data, sizeof(_posixrules_data)); + i = sizeof(_posixrules_data); + } + else + { + i = read(fid, buf, sizeof buf); + if (close(fid) != 0 || i < sizeof *tzhp) + return -1; + } + + tzhp = (struct tzhead *) buf; + ttisstdcnt = (int) detzcode(tzhp->tzh_ttisstdcnt); + sp->leapcnt = (int) detzcode(tzhp->tzh_leapcnt); + sp->timecnt = (int) detzcode(tzhp->tzh_timecnt); + sp->typecnt = (int) detzcode(tzhp->tzh_typecnt); + sp->charcnt = (int) detzcode(tzhp->tzh_charcnt); + if (sp->leapcnt < 0 || sp->leapcnt > TZ_MAX_LEAPS || + sp->typecnt <= 0 || sp->typecnt > TZ_MAX_TYPES || + sp->timecnt < 0 || sp->timecnt > TZ_MAX_TIMES || + sp->charcnt < 0 || sp->charcnt > TZ_MAX_CHARS || + (ttisstdcnt != sp->typecnt && ttisstdcnt != 0)) + return -1; + if (i < sizeof *tzhp + + sp->timecnt * (4 + sizeof (char)) + + sp->typecnt * (4 + 2 * sizeof (char)) + + sp->charcnt * sizeof (char) + + sp->leapcnt * 2 * 4 + + ttisstdcnt * sizeof (char)) + return -1; + p = buf + sizeof *tzhp; + for (i = 0; i < sp->timecnt; ++i) + { + sp->ats[i] = detzcode(p); + p += 4; + } + for (i = 0; i < sp->timecnt; ++i) + { + sp->types[i] = (unsigned char) *p++; + if (sp->types[i] >= sp->typecnt) + return -1; + } + for (i = 0; i < sp->typecnt; ++i) + { + struct ttinfo * ttisp; + + ttisp = &sp->ttis[i]; + ttisp->tt_gmtoff = detzcode(p); + p += 4; + ttisp->tt_isdst = (unsigned char) *p++; + if (ttisp->tt_isdst != 0 && ttisp->tt_isdst != 1) + return -1; + ttisp->tt_abbrind = (unsigned char) *p++; + if (ttisp->tt_abbrind < 0 || + ttisp->tt_abbrind > sp->charcnt) + return -1; + } + for (i = 0; i < sp->charcnt; ++i) + sp->chars[i] = *p++; + sp->chars[i] = '\0'; /* ensure '\0' at end */ + for (i = 0; i < sp->leapcnt; ++i) + { + struct lsinfo * lsisp; + + lsisp = &sp->lsis[i]; + lsisp->ls_trans = detzcode(p); + p += 4; + lsisp->ls_corr = detzcode(p); + p += 4; + } + for (i = 0; i < sp->typecnt; ++i) + { + struct ttinfo * ttisp; + + ttisp = &sp->ttis[i]; + if (ttisstdcnt == 0) + ttisp->tt_ttisstd = FALSE; + else + { + ttisp->tt_ttisstd = *p++; + if (ttisp->tt_ttisstd != TRUE && + ttisp->tt_ttisstd != FALSE) + return -1; + } + } + return 0; +} + +static const int mon_lengths[2][MONSPERYEAR] = { +{ 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }, +{ 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 } +}; + +static const int year_lengths[2] = { +DAYSPERNYEAR, DAYSPERLYEAR +}; + +/* +** Given a pointer into a time zone string, scan until a character that is not +** a valid character in a zone name is found. Return a pointer to that +** character. +*/ + +static const char* +getzname(const char* strp) +{ + char c; + + while ((c = *strp) != '\0' && !isdigit(c) && c != ',' && c != '-' && + c != '+') + ++strp; + return strp; +} + +/* +** Given a pointer into a time zone string, extract a number from that string. +** Check that the number is within a specified range; if it is not, return +** NULL. +** Otherwise, return a pointer to the first character not part of the number. +*/ + +static const char* +getnum(const char* strp, int* CPP_CONST nump, const int min, const int max) +{ + char c; + int num; + + if (strp == NULL || !isdigit(*strp)) + return NULL; + num = 0; + while ((c = *strp) != '\0' && isdigit(c)) + { + num = num * 10 + (c - '0'); + if (num > max) + return NULL; + ++strp; + } + if (num < min) + return NULL; + *nump = num; + return strp; +} + +/* +** Given a pointer into a time zone string, extract a number of seconds, +** in hh[:mm[:ss]] form, from the string. +** If any error occurs, return NULL. +** Otherwise, return a pointer to the first character not part of the number +** of seconds. +*/ + +static const char * +getsecs(const char *strp, long * CPP_CONST secsp) +{ + int num; + + strp = getnum(strp, &num, 0, HOURSPERDAY); + if (strp == NULL) + return NULL; + *secsp = num * SECSPERHOUR; + if (*strp == ':') + { + ++strp; + strp = getnum(strp, &num, 0, MINSPERHOUR - 1); + if (strp == NULL) + return NULL; + *secsp += num * SECSPERMIN; + if (*strp == ':') + { + ++strp; + strp = getnum(strp, &num, 0, SECSPERMIN - 1); + if (strp == NULL) + return NULL; + *secsp += num; + } + } + return strp; +} + +/* +** Given a pointer into a time zone string, extract an offset, in +** [+-]hh[:mm[:ss]] form, from the string. +** If any error occurs, return NULL. +** Otherwise, return a pointer to the first character not part of the time. +*/ + +static const char * +getoffset(const char *strp, long * CPP_CONST offsetp) +{ + int neg; + + if (*strp == '-') + { + neg = 1; + ++strp; + } + else if (isdigit(*strp) || *strp++ == '+') + neg = 0; + else + return NULL; /* illegal offset */ + strp = getsecs(strp, offsetp); + if (strp == NULL) + return NULL; /* illegal time */ + if (neg) + *offsetp = -*offsetp; + return strp; +} + +/* +** Given a pointer into a time zone string, extract a rule in the form +** date[/time]. See POSIX section 8 for the format of "date" and "time". +** If a valid rule is not found, return NULL. +** Otherwise, return a pointer to the first character not part of the rule. +*/ + +static const char * +getrule(const char *strp, struct rule * CPP_CONST rulep) +{ + if (*strp == 'J') + { + /* + ** Julian day. + */ + rulep->r_type = JULIAN_DAY; + ++strp; + strp = getnum(strp, &rulep->r_day, 1, DAYSPERNYEAR); + } + else if (*strp == 'M') + { + /* + ** Month, week, day. + */ + rulep->r_type = MONTH_NTH_DAY_OF_WEEK; + ++strp; + strp = getnum(strp, &rulep->r_mon, 1, MONSPERYEAR); + if (strp == NULL) + return NULL; + if (*strp++ != '.') + return NULL; + strp = getnum(strp, &rulep->r_week, 1, 5); + if (strp == NULL) + return NULL; + if (*strp++ != '.') + return NULL; + strp = getnum(strp, &rulep->r_day, 0, DAYSPERWEEK - 1); + } + else if (isdigit(*strp)) + { + /* + ** Day of year. + */ + rulep->r_type = DAY_OF_YEAR; + strp = getnum(strp, &rulep->r_day, 0, DAYSPERLYEAR - 1); + } + else + return NULL; /* invalid format */ + if (strp == NULL) + return NULL; + if (*strp == '/') + { + /* + ** Time specified. + */ + ++strp; + strp = getsecs(strp, &rulep->r_time); + } + else + rulep->r_time = 2 * SECSPERHOUR; /* default = 2:00:00 */ + return strp; +} + +/* +** Given the Epoch-relative time of January 1, 00:00:00 GMT, in a year, the +** year, a rule, and the offset from GMT at the time that rule takes effect, +** calculate the Epoch-relative time that rule takes effect. +*/ + +static time_t +transtime(const time_t janfirst, const int year, const struct rule * CPP_CONST rulep, const long offset) +{ + int leapyear; + time_t value=0; + int i; + int d, m1, yy0, yy1, yy2, dow; + + leapyear = isleap(year); + switch (rulep->r_type) + { + + case JULIAN_DAY: + /* + ** Jn - Julian day, 1 == January 1, 60 == March 1 even in leap + ** years. + ** In non-leap years, or if the day number is 59 or less, just + ** add SECSPERDAY times the day number-1 to the time of + ** January 1, midnight, to get the day. + */ + value = janfirst + (rulep->r_day - 1) * SECSPERDAY; + if (leapyear && rulep->r_day >= 60) + value += SECSPERDAY; + break; + + case DAY_OF_YEAR: + /* + ** n - day of year. + ** Just add SECSPERDAY times the day number to the time of + ** January 1, midnight, to get the day. + */ + value = janfirst + rulep->r_day * SECSPERDAY; + break; + + case MONTH_NTH_DAY_OF_WEEK: + /* + ** Mm.n.d - nth "dth day" of month m. + */ + value = janfirst; + for (i = 0; i < rulep->r_mon - 1; ++i) + value += mon_lengths[leapyear][i] * SECSPERDAY; + + /* + ** Use Zeller's Congruence to get day-of-week of first day of + ** month. + */ + m1 = (rulep->r_mon + 9) % 12 + 1; + yy0 = (rulep->r_mon <= 2) ? (year - 1) : year; + yy1 = yy0 / 100; + yy2 = yy0 % 100; + dow = ((26 * m1 - 2) / 10 + + 1 + yy2 + yy2 / 4 + yy1 / 4 - 2 * yy1) % 7; + if (dow < 0) + dow += DAYSPERWEEK; + + /* + ** "dow" is the day-of-week of the first day of the month. Get + ** the day-of-month (zero-origin) of the first "dow" day of the + ** month. + */ + d = rulep->r_day - dow; + if (d < 0) + d += DAYSPERWEEK; + for (i = 1; i < rulep->r_week; ++i) + { + if (d + DAYSPERWEEK >= + mon_lengths[leapyear][rulep->r_mon - 1]) + break; + d += DAYSPERWEEK; + } + + /* + ** "d" is the day-of-month (zero-origin) of the day we want. + */ + value += d * SECSPERDAY; + break; + } + + /* + ** "value" is the Epoch-relative time of 00:00:00 GMT on the day in + ** question. To get the Epoch-relative time of the specified local + ** time on that day, add the transition time and the current offset + ** from GMT. + */ + return value + rulep->r_time + offset; +} + +/* +** Given a POSIX section 8-style TZ string, fill in the rule tables as +** appropriate. +*/ + +static int +tzparse(const char *name, struct state * CPP_CONST sp, const int lastditch) +{ + const char * stdname; + const char * dstname=0; + int stdlen; + int dstlen; + long stdoffset; + long dstoffset; + time_t * atp; + unsigned char * typep; + char * cp; + int load_result; + + stdname = name; + if (lastditch) + { + stdlen = strlen(name); /* length of standard zone name */ + name += stdlen; + if (stdlen >= sizeof sp->chars) + stdlen = (sizeof sp->chars) - 1; + } + else + { + name = getzname(name); + stdlen = name - stdname; + if (stdlen < 3) + return -1; + } + if (*name == '\0') + return -1; + else + { + name = getoffset(name, &stdoffset); + if (name == NULL) + return -1; + } + load_result = tzload(TZDEFRULES, sp); + if (load_result != 0) + sp->leapcnt = 0; /* so, we're off a little */ + if (*name != '\0') + { + dstname = name; + name = getzname(name); + dstlen = name - dstname; /* length of DST zone name */ + if (dstlen < 3) + return -1; + if (*name != '\0' && *name != ',' && *name != ';') + { + name = getoffset(name, &dstoffset); + if (name == NULL) + return -1; + } + else + dstoffset = stdoffset - SECSPERHOUR; + if (*name == ',' || *name == ';') + { + struct rule start; + struct rule end; + int year; + time_t janfirst; + time_t starttime; + time_t endtime; + + ++name; + if ((name = getrule(name, &start)) == NULL) + return -1; + if (*name++ != ',') + return -1; + if ((name = getrule(name, &end)) == NULL) + return -1; + if (*name != '\0') + return -1; + sp->typecnt = 2; /* standard time and DST */ + /* + ** Two transitions per year, from EPOCH_YEAR to 2037. + */ + sp->timecnt = 2 * (2037 - EPOCH_YEAR + 1); + if (sp->timecnt > TZ_MAX_TIMES) + return -1; + sp->ttis[0].tt_gmtoff = -dstoffset; + sp->ttis[0].tt_isdst = 1; + sp->ttis[0].tt_abbrind = stdlen + 1; + sp->ttis[1].tt_gmtoff = -stdoffset; + sp->ttis[1].tt_isdst = 0; + sp->ttis[1].tt_abbrind = 0; + atp = sp->ats; + typep = sp->types; + janfirst = 0; + for (year = EPOCH_YEAR; year <= 2037; ++year) + { + starttime = transtime(janfirst, year, &start, + stdoffset); + endtime = transtime(janfirst, year, &end, + dstoffset); + if (starttime > endtime) + { + *atp++ = endtime; + *typep++ = 1; /* DST ends */ + *atp++ = starttime; + *typep++ = 0; /* DST begins */ + } + else + { + *atp++ = starttime; + *typep++ = 0; /* DST begins */ + *atp++ = endtime; + *typep++ = 1; /* DST ends */ + } + janfirst += + year_lengths[isleap(year)] * SECSPERDAY; + } + } + else + { + int sawstd; + int sawdst; + long stdfix; + long dstfix; + long oldfix; + int isdst; + int i; + + if (*name != '\0') + return -1; + if (load_result != 0) + return -1; + /* + ** Compute the difference between the real and + ** prototype standard and summer time offsets + ** from GMT, and put the real standard and summer + ** time offsets into the rules in place of the + ** prototype offsets. + */ + sawstd = FALSE; + sawdst = FALSE; + stdfix = 0; + dstfix = 0; + for (i = 0; i < sp->typecnt; ++i) + { + if (sp->ttis[i].tt_isdst) + { + oldfix = dstfix; + dstfix = + sp->ttis[i].tt_gmtoff + dstoffset; + if (sawdst && (oldfix != dstfix)) + return -1; + sp->ttis[i].tt_gmtoff = -dstoffset; + sp->ttis[i].tt_abbrind = stdlen + 1; + sawdst = TRUE; + } + else + { + oldfix = stdfix; + stdfix = + sp->ttis[i].tt_gmtoff + stdoffset; + if (sawstd && (oldfix != stdfix)) + return -1; + sp->ttis[i].tt_gmtoff = -stdoffset; + sp->ttis[i].tt_abbrind = 0; + sawstd = TRUE; + } + } + /* + ** Make sure we have both standard and summer time. + */ + if (!sawdst || !sawstd) + return -1; + /* + ** Now correct the transition times by shifting + ** them by the difference between the real and + ** prototype offsets. Note that this difference + ** can be different in standard and summer time; + ** the prototype probably has a 1-hour difference + ** between standard and summer time, but a different + ** difference can be specified in TZ. + */ + isdst = FALSE; /* we start in standard time */ + for (i = 0; i < sp->timecnt; ++i) + { + const struct ttinfo * ttisp; + + /* + ** If summer time is in effect, and the + ** transition time was not specified as + ** standard time, add the summer time + ** offset to the transition time; + ** otherwise, add the standard time offset + ** to the transition time. + */ + ttisp = &sp->ttis[sp->types[i]]; + sp->ats[i] += + (isdst && !ttisp->tt_ttisstd) ? + dstfix : stdfix; + isdst = ttisp->tt_isdst; + } + } + } + else + { + dstlen = 0; + sp->typecnt = 1; /* only standard time */ + sp->timecnt = 0; + sp->ttis[0].tt_gmtoff = -stdoffset; + sp->ttis[0].tt_isdst = 0; + sp->ttis[0].tt_abbrind = 0; + } + sp->charcnt = stdlen + 1; + if (dstlen != 0) + sp->charcnt += dstlen + 1; + if (sp->charcnt > sizeof sp->chars) + return -1; + cp = sp->chars; + (void) strncpy(cp, stdname, stdlen); + cp += stdlen; + *cp++ = '\0'; + if (dstlen != 0) + { + (void) strncpy(cp, dstname, dstlen); + *(cp + dstlen) = '\0'; + } + return 0; +} + +static void +gmtload(struct state * CPP_CONST sp) +{ + if (tzload(GMT, sp) != 0) + (void) tzparse(GMT, sp, TRUE); +} + +/* + * @implemented + */ +void +_tzset(void) +{ + const char * name; + + name = getenv("TZ"); + if (name == NULL) + { + tzsetwall(); + return; + } + lcl_is_set = TRUE; +#ifdef ALL_STATE + if (lclptr == NULL) + { + lclptr = (struct state *) malloc(sizeof *lclptr); + if (lclptr == NULL) + { + settzname(); /* all we can do */ + return; + } + } +#endif /* defined ALL_STATE */ + if (*name == '\0') + { + /* + ** User wants it fast rather than right. + */ + lclptr->leapcnt = 0; /* so, we're off a little */ + lclptr->timecnt = 0; + lclptr->ttis[0].tt_gmtoff = 0; + lclptr->ttis[0].tt_abbrind = 0; + (void) strcpy(lclptr->chars, GMT); + } + else if (tzload(name, lclptr) != 0) + if (name[0] == ':' || tzparse(name, lclptr, FALSE) != 0) + gmtload(lclptr); + settzname(); +} + +void +tzsetwall(void) +{ + lcl_is_set = TRUE; +#ifdef ALL_STATE + if (lclptr == NULL) + { + lclptr = (struct state *) malloc(sizeof *lclptr); + if (lclptr == NULL) + { + settzname(); /* all we can do */ + return; + } + } +#endif /* defined ALL_STATE */ + if (tzload((char *) NULL, lclptr) != 0) + gmtload(lclptr); + settzname(); +} + +/* +** The easy way to behave "as if no library function calls" localtime +** is to not call it--so we drop its guts into "localsub", which can be +** freely called. (And no, the PANS doesn't require the above behavior-- +** but it *is* desirable.) +** +** The unused offset argument is for the benefit of mktime variants. +*/ + +/*ARGSUSED*/ +static void +localsub(const time_t * CPP_CONST timep, const long offset, struct tm * CPP_CONST tmp) +{ + const struct state * sp; + const struct ttinfo * ttisp; + int i; + const time_t t = *timep; + + if (!lcl_is_set) + _tzset(); + sp = lclptr; +#ifdef ALL_STATE + if (sp == NULL) + { + gmtsub(timep, offset, tmp); + return; + } +#endif /* defined ALL_STATE */ + if (sp->timecnt == 0 || t < sp->ats[0]) + { + i = 0; + while (sp->ttis[i].tt_isdst) + if (++i >= sp->typecnt) + { + i = 0; + break; + } + } + else + { + for (i = 1; i < sp->timecnt; ++i) + if (t < sp->ats[i]) + break; + i = sp->types[i - 1]; + } + ttisp = &sp->ttis[i]; + /* + ** To get (wrong) behavior that's compatible with System V Release 2.0 + ** you'd replace the statement below with + ** t += ttisp->tt_gmtoff; + ** timesub(&t, 0L, sp, tmp); + */ + timesub(&t, ttisp->tt_gmtoff, sp, tmp); + tmp->tm_isdst = ttisp->tt_isdst; + _tzname[tmp->tm_isdst] = (char *)&sp->chars[ttisp->tt_abbrind]; + tmp->tm_zone = (char *)&sp->chars[ttisp->tt_abbrind]; +} + +/* + * @implemented + */ +struct tm * +localtime(const time_t * CPP_CONST timep) +{ + static struct tm tm; + + localsub(timep, 0L, &tm); + return &tm; +} + +/* +** gmtsub is to gmtime as localsub is to localtime. +*/ + +static void +gmtsub(const time_t * CPP_CONST timep, const long offset, struct tm * CPP_CONST tmp) +{ + if (!gmt_is_set) + { + gmt_is_set = TRUE; +#ifdef ALL_STATE + gmtptr = (struct state *) malloc(sizeof *gmtptr); + if (gmtptr != NULL) +#endif /* defined ALL_STATE */ + gmtload(gmtptr); + } + timesub(timep, offset, gmtptr, tmp); + /* + ** Could get fancy here and deliver something such as + ** "GMT+xxxx" or "GMT-xxxx" if offset is non-zero, + ** but this is no time for a treasure hunt. + */ + if (offset != 0) + tmp->tm_zone = TZ_NAME; + else + { +#ifdef ALL_STATE + if (gmtptr == NULL) + tmp->TM_ZONE = GMT; + else + tmp->TM_ZONE = gmtptr->chars; +#endif /* defined ALL_STATE */ +#ifndef ALL_STATE + tmp->tm_zone = gmtptr->chars; +#endif /* State Farm */ + } +} + +/* + * @implemented + */ +struct tm * +gmtime(const time_t * CPP_CONST timep) +{ + static struct tm tm; + + gmtsub(timep, 0L, &tm); + return &tm; +} + +static void +timesub(const time_t * CPP_CONST timep, const long offset, const struct state * CPP_CONST sp, struct tm * CPP_CONST tmp) +{ + const struct lsinfo * lp; + long days; + long rem; + int y; + int yleap; + const int * ip; + long corr; + int hit; + int i; + + corr = 0; + hit = FALSE; +#ifdef ALL_STATE + i = (sp == NULL) ? 0 : sp->leapcnt; +#endif /* defined ALL_STATE */ +#ifndef ALL_STATE + i = sp->leapcnt; +#endif /* State Farm */ + while (--i >= 0) + { + lp = &sp->lsis[i]; + if (*timep >= lp->ls_trans) + { + if (*timep == lp->ls_trans) + hit = ((i == 0 && lp->ls_corr > 0) || + lp->ls_corr > sp->lsis[i - 1].ls_corr); + corr = lp->ls_corr; + break; + } + } + days = *timep / SECSPERDAY; + rem = *timep % SECSPERDAY; +#ifdef mc68k + if (*timep == 0x80000000) + { + /* + ** A 3B1 muffs the division on the most negative number. + */ + days = -24855; + rem = -11648; + } +#endif /* mc68k */ + rem += (offset - corr); + while (rem < 0) + { + rem += SECSPERDAY; + --days; + } + while (rem >= SECSPERDAY) + { + rem -= SECSPERDAY; + ++days; + } + tmp->tm_hour = (int) (rem / SECSPERHOUR); + rem = rem % SECSPERHOUR; + tmp->tm_min = (int) (rem / SECSPERMIN); + tmp->tm_sec = (int) (rem % SECSPERMIN); + if (hit) + /* + ** A positive leap second requires a special + ** representation. This uses "... ??:59:60". + */ + ++(tmp->tm_sec); + tmp->tm_wday = (int) ((EPOCH_WDAY + days) % DAYSPERWEEK); + if (tmp->tm_wday < 0) + tmp->tm_wday += DAYSPERWEEK; + y = EPOCH_YEAR; + if (days >= 0) + for ( ; ; ) + { + yleap = isleap(y); + if (days < (long) year_lengths[yleap]) + break; + ++y; + days = days - (long) year_lengths[yleap]; + } + else + do { + --y; + yleap = isleap(y); + days = days + (long) year_lengths[yleap]; + } while (days < 0); + tmp->tm_year = y - TM_YEAR_BASE; + tmp->tm_yday = (int) days; + ip = mon_lengths[yleap]; + for (tmp->tm_mon = 0; days >= (long) ip[tmp->tm_mon]; ++(tmp->tm_mon)) + days = days - (long) ip[tmp->tm_mon]; + tmp->tm_mday = (int) (days + 1); + tmp->tm_isdst = 0; + tmp->tm_gmtoff = offset; +} + +/* +** A la X3J11 +*/ + +/* + * @implemented + */ +char * +asctime(const struct tm *timeptr) +{ + static const char wday_name[DAYSPERWEEK][3] = { + "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" + }; + static const char mon_name[MONSPERYEAR][3] = { + "Jan", "Feb", "Mar", "Apr", "May", "Jun", + "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" + }; + static char result[26]; + + (void) sprintf(result, "%.3s %.3s%3d %02d:%02d:%02d %d\n", + wday_name[timeptr->tm_wday], + mon_name[timeptr->tm_mon], + timeptr->tm_mday, timeptr->tm_hour, + timeptr->tm_min, timeptr->tm_sec, + TM_YEAR_BASE + timeptr->tm_year); + return result; +} + +/* + * @implemented + */ +char * +ctime(const time_t * CPP_CONST timep) +{ + return asctime(localtime(timep)); +} + +/* +** Adapted from code provided by Robert Elz, who writes: +** The "best" way to do mktime I think is based on an idea of Bob +** Kridle's (so its said...) from a long time ago. (mtxinu!kridle now). +** It does a binary search of the time_t space. Since time_t's are +** just 32 bits, its a max of 32 iterations (even at 64 bits it +** would still be very reasonable). +*/ + +#ifndef WRONG +#define WRONG (-1) +#endif /* !defined WRONG */ + +static void +normalize(int * CPP_CONST tensptr, int * CPP_CONST unitsptr, const int base) +{ + if (*unitsptr >= base) + { + *tensptr += *unitsptr / base; + *unitsptr %= base; + } + else if (*unitsptr < 0) + { + --*tensptr; + *unitsptr += base; + if (*unitsptr < 0) + { + *tensptr -= 1 + (-*unitsptr) / base; + *unitsptr = base - (-*unitsptr) % base; + } + } +} + +static int +tmcomp(const struct tm * CPP_CONST atmp, const struct tm * CPP_CONST btmp) +{ + int result; + + if ((result = (atmp->tm_year - btmp->tm_year)) == 0 && + (result = (atmp->tm_mon - btmp->tm_mon)) == 0 && + (result = (atmp->tm_mday - btmp->tm_mday)) == 0 && + (result = (atmp->tm_hour - btmp->tm_hour)) == 0 && + (result = (atmp->tm_min - btmp->tm_min)) == 0) + result = atmp->tm_sec - btmp->tm_sec; + return result; +} + +static time_t +time2(struct tm *tmp, void (*const funcp)(const time_t * CPP_CONST, const long, struct tm *), const long offset, int * CPP_CONST okayp) +{ + const struct state * sp; + int dir; + int bits; + int i, j ; + int saved_seconds; + time_t newt; + time_t t; + struct tm yourtm, mytm; + + *okayp = FALSE; + yourtm = *tmp; + if (yourtm.tm_sec >= SECSPERMIN + 2 || yourtm.tm_sec < 0) + normalize(&yourtm.tm_min, &yourtm.tm_sec, SECSPERMIN); + normalize(&yourtm.tm_hour, &yourtm.tm_min, MINSPERHOUR); + normalize(&yourtm.tm_mday, &yourtm.tm_hour, HOURSPERDAY); + normalize(&yourtm.tm_year, &yourtm.tm_mon, MONSPERYEAR); + while (yourtm.tm_mday <= 0) + { + --yourtm.tm_year; + yourtm.tm_mday += + year_lengths[isleap(yourtm.tm_year + TM_YEAR_BASE)]; + } + for ( ; ; ) + { + i = mon_lengths[isleap(yourtm.tm_year + + TM_YEAR_BASE)][yourtm.tm_mon]; + if (yourtm.tm_mday <= i) + break; + yourtm.tm_mday -= i; + if (++yourtm.tm_mon >= MONSPERYEAR) + { + yourtm.tm_mon = 0; + ++yourtm.tm_year; + } + } + saved_seconds = yourtm.tm_sec; + yourtm.tm_sec = 0; + /* + ** Calculate the number of magnitude bits in a time_t + ** (this works regardless of whether time_t is + ** signed or unsigned, though lint complains if unsigned). + */ + for (bits = 0, t = 1; t > 0; ++bits, t <<= 1) + ; + /* + ** If time_t is signed, then 0 is the median value, + ** if time_t is unsigned, then 1 << bits is median. + */ +#ifdef _MSVCRT_LIB_ + t = (time_t) ((1 << bits) - 1); +#else // TODO: FIXME: review which is correct + t = (time_t) 1 << bits; +#endif /*_MSVCRT_LIB_*/ + + for ( ; ; ) + { + (*funcp)(&t, offset, &mytm); + dir = tmcomp(&mytm, &yourtm); + if (dir != 0) + { + if (bits-- < 0) + return WRONG; + if (bits < 0) + --t; + else if (dir > 0) + t -= (time_t) 1 << bits; + else t += (time_t) 1 << bits; + continue; + } + if (yourtm.tm_isdst < 0 || mytm.tm_isdst == yourtm.tm_isdst) + break; + /* + ** Right time, wrong type. + ** Hunt for right time, right type. + ** It's okay to guess wrong since the guess + ** gets checked. + */ + sp = (const struct state *) + ((funcp == localsub) ? lclptr : gmtptr); +#ifdef ALL_STATE + if (sp == NULL) + return WRONG; +#endif /* defined ALL_STATE */ + for (i = 0; i < sp->typecnt; ++i) + { + if (sp->ttis[i].tt_isdst != yourtm.tm_isdst) + continue; + for (j = 0; j < sp->typecnt; ++j) + { + if (sp->ttis[j].tt_isdst == yourtm.tm_isdst) + continue; + newt = t + sp->ttis[j].tt_gmtoff - + sp->ttis[i].tt_gmtoff; + (*funcp)(&newt, offset, &mytm); + if (tmcomp(&mytm, &yourtm) != 0) + continue; + if (mytm.tm_isdst != yourtm.tm_isdst) + continue; + /* + ** We have a match. + */ + t = newt; + goto label; + } + } + return WRONG; + } + label: + t += saved_seconds; + (*funcp)(&t, offset, tmp); + *okayp = TRUE; + return t; +} + +static time_t +time1(struct tm * CPP_CONST tmp, void (*const funcp)(const time_t * CPP_CONST, const long, struct tm *), const long offset) +{ + time_t t; + const struct state * sp; + int samei, otheri; + int okay; + + if (tmp->tm_isdst > 1) + tmp->tm_isdst = 1; + t = time2(tmp, funcp, offset, &okay); + if (okay || tmp->tm_isdst < 0) + return t; + /* + ** We're supposed to assume that somebody took a time of one type + ** and did some math on it that yielded a "struct tm" that's bad. + ** We try to divine the type they started from and adjust to the + ** type they need. + */ + sp = (const struct state *) ((funcp == localsub) ? lclptr : gmtptr); +#ifdef ALL_STATE + if (sp == NULL) + return WRONG; +#endif /* defined ALL_STATE */ + for (samei = 0; samei < sp->typecnt; ++samei) + { + if (sp->ttis[samei].tt_isdst != tmp->tm_isdst) + continue; + for (otheri = 0; otheri < sp->typecnt; ++otheri) + { + if (sp->ttis[otheri].tt_isdst == tmp->tm_isdst) + continue; + tmp->tm_sec += sp->ttis[otheri].tt_gmtoff - + sp->ttis[samei].tt_gmtoff; + tmp->tm_isdst = !tmp->tm_isdst; + t = time2(tmp, funcp, offset, &okay); + if (okay) + return t; + tmp->tm_sec -= sp->ttis[otheri].tt_gmtoff - + sp->ttis[samei].tt_gmtoff; + tmp->tm_isdst = !tmp->tm_isdst; + } + } + return WRONG; +} + +/* + * @implemented + */ +time_t +mktime(struct tm * tmp) +{ + return time1(tmp, localsub, 0L); +} diff --git a/reactos/lib/crt/time/difftime.c b/reactos/lib/crt/time/difftime.c new file mode 100644 index 00000000000..9e9d590a2cb --- /dev/null +++ b/reactos/lib/crt/time/difftime.c @@ -0,0 +1,11 @@ +/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ +#include + +/* + * @implemented + */ +double +difftime(time_t time1, time_t time0) +{ + return time1-time0; +} diff --git a/reactos/lib/crt/time/ftime.c b/reactos/lib/crt/time/ftime.c new file mode 100644 index 00000000000..8db083b3cff --- /dev/null +++ b/reactos/lib/crt/time/ftime.c @@ -0,0 +1,34 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: lib/msvcrt/time/ftime.c + * PURPOSE: Deprecated BSD library call + * PROGRAMER: Art Yerkes + * UPDATE HISTORY: + * 07/15/03 -- Created + */ + +#include "precomp.h" +#include +#include + +/* ftime (3) -- Obsolete BSD library function included in the SUS for copat. + * Also present in msvcrt.dll as _ftime + * See: http://www.opengroup.org/onlinepubs/007904957/functions/ftime.html */ +/* + * @implemented + */ +void _ftime( struct timeb *tm ) +{ + int ret = 0; + SYSTEMTIME syst; + + GetSystemTime( &syst ); + + if( ret == 0 ) { + time( &tm->time ); + tm->millitm = syst.wMilliseconds; + tm->_timezone = 0; /* According to the open group, timezone and dstflag */ + tm->dstflag = 0; /* exist for compatibility, but are unspecified. */ + } +} diff --git a/reactos/lib/crt/time/posixrul.h b/reactos/lib/crt/time/posixrul.h new file mode 100644 index 00000000000..48c5ceeab0d --- /dev/null +++ b/reactos/lib/crt/time/posixrul.h @@ -0,0 +1,49 @@ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +/* generated with bin2h from DJGPP/zoneinfo/posixrules */ + +unsigned char _posixrules_data[] = { +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0, +0,1,16,0,0,0,2,0,0,0,8,0,151,254,240,1,135,225,224,2,119,224,240,3,112,254,96,4,96,253,112,5,80, +224,96,6,64,223,112,7,48,194,96,7,141,25,112,9,16,164,96,9,173,148,240,10,240,134,96,11,224,133,112,12,217,162, +224,13,192,103,112,14,185,132,224,15,169,131,240,16,153,102,224,17,137,101,240,18,121,72,224,19,105,71,240,20,89,42,224, +21,73,41,240,22,57,12,224,23,41,11,240,24,34,41,96,25,8,237,240,26,2,11,96,26,242,10,112,27,225,237,96,28, +209,236,112,29,193,207,96,30,177,206,112,31,161,177,96,32,118,0,240,33,129,147,96,34,85,226,240,35,106,175,224,36,53, +196,240,37,74,145,224,38,21,166,240,39,42,115,224,39,254,195,112,41,10,85,224,41,222,165,112,42,234,55,224,43,190,135, +112,44,211,84,96,45,158,105,112,46,179,54,96,47,126,75,112,48,147,24,96,49,103,103,240,50,114,250,96,51,71,73,240, +52,82,220,96,53,39,43,240,54,50,190,96,55,7,13,240,56,27,218,224,56,230,239,240,57,251,188,224,58,198,209,240,59, +219,158,224,60,175,238,112,61,187,128,224,62,143,208,112,63,155,98,224,64,111,178,112,65,132,127,96,66,79,148,112,67,100, +97,96,68,47,118,112,69,68,67,96,70,15,88,112,71,36,37,96,71,248,116,240,73,4,7,96,73,216,86,240,74,227,233, +96,75,184,56,240,76,205,5,224,77,152,26,240,78,172,231,224,79,119,252,240,80,140,201,224,81,97,25,112,82,108,171,224, +83,64,251,112,84,76,141,224,85,32,221,112,86,44,111,224,87,0,191,112,88,21,140,96,88,224,161,112,89,245,110,96,90, +192,131,112,91,213,80,96,92,169,159,240,93,181,50,96,94,137,129,240,95,149,20,96,96,105,99,240,97,126,48,224,98,73, +69,240,99,94,18,224,100,41,39,240,101,61,244,224,102,18,68,112,103,29,214,224,103,242,38,112,104,253,184,224,105,210,8, +112,106,221,154,224,107,177,234,112,108,198,183,96,109,145,204,112,110,166,153,96,111,113,174,112,112,134,123,96,113,90,202,240, +114,102,93,96,115,58,172,240,116,70,63,96,117,26,142,240,118,47,91,224,118,250,112,240,120,15,61,224,120,218,82,240,121, +239,31,224,122,186,52,240,123,207,1,224,124,163,81,112,125,174,227,224,126,131,51,112,127,142,197,224,128,99,21,112,129,119, +226,96,130,66,247,112,131,87,196,96,132,34,217,112,133,55,166,96,134,11,245,240,135,23,136,96,135,235,215,240,136,247,106, +96,137,203,185,240,138,215,76,96,139,171,155,240,140,192,104,224,141,139,125,240,142,160,74,224,143,107,95,240,144,128,44,224, +145,84,124,112,146,96,14,224,147,52,94,112,148,63,240,224,149,20,64,112,150,41,13,96,150,244,34,112,152,8,239,96,152, +212,4,112,153,232,209,96,154,189,32,240,155,200,179,96,156,157,2,240,157,168,149,96,158,124,228,240,159,136,119,96,160,92, +198,240,161,113,147,224,162,60,168,240,163,81,117,224,164,28,138,240,165,49,87,224,166,5,167,112,167,17,57,224,167,229,137, +112,168,241,27,224,169,197,107,112,170,218,56,96,171,165,77,112,172,186,26,96,173,133,47,112,174,153,252,96,175,101,17,112, +176,121,222,96,177,78,45,240,178,89,192,96,179,46,15,240,180,57,162,96,181,13,241,240,182,34,190,224,182,237,211,240,184, +2,160,224,184,205,181,240,185,226,130,224,186,182,210,112,187,194,100,224,188,150,180,112,189,162,70,224,190,118,150,112,191,130, +40,224,192,86,120,112,193,107,69,96,194,54,90,112,195,75,39,96,196,22,60,112,197,43,9,96,197,255,88,240,199,10,235, +96,199,223,58,240,200,234,205,96,201,191,28,240,202,211,233,224,203,158,254,240,204,179,203,224,205,126,224,240,206,147,173,224, +207,103,253,112,208,115,143,224,209,71,223,112,210,83,113,224,211,39,193,112,212,51,83,224,213,7,163,112,214,28,112,96,214, +231,133,112,215,252,82,96,216,199,103,112,217,220,52,96,218,176,131,240,219,188,22,96,220,144,101,240,221,155,248,96,222,112, +71,240,223,133,20,224,224,80,41,240,225,100,246,224,226,48,11,240,227,68,216,224,228,15,237,240,229,36,186,224,229,249,10, +112,231,4,156,224,231,216,236,112,232,228,126,224,233,184,206,112,234,205,155,96,235,152,176,112,236,173,125,96,237,120,146,112, +238,141,95,96,239,97,174,240,240,109,65,96,241,65,144,240,242,77,35,96,243,33,114,240,244,45,5,96,245,1,84,240,246, +22,33,224,246,225,54,240,247,246,3,224,248,193,24,240,249,213,229,224,250,160,250,240,251,181,199,224,252,138,23,112,253,149, +169,224,254,105,249,112,255,117,139,224,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0, +1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1, +0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0, +1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1, +0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0, +1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1, +0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0, +1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1, +0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,255,255,199,192,1,0,255,255,185,176,0,4,69,68,84, +0,69,83,84,0,0,0 +}; diff --git a/reactos/lib/crt/time/strdate.c b/reactos/lib/crt/time/strdate.c new file mode 100644 index 00000000000..204e07d28d4 --- /dev/null +++ b/reactos/lib/crt/time/strdate.c @@ -0,0 +1,33 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: lib/msvcrt/time/strtime.c + * PURPOSE: Fills a buffer with a formatted date representation + * PROGRAMER: Boudewijn Dekker + * UPDATE HISTORY: + * 28/12/98: Created + */ +#include +#include +#include +#include + + +/* + * @implemented + */ +char* _strdate(const char* datestr) +{ + time_t t; + struct tm* d; + char* dt = (char*)datestr; + + if (datestr == NULL) { + __set_errno(EINVAL); + return NULL; + } + t = time(NULL); + d = localtime(&t); + sprintf(dt,"%d/%d/%d",d->tm_mday,d->tm_mon+1,d->tm_year); + return dt; +} diff --git a/reactos/lib/crt/time/strftime.c b/reactos/lib/crt/time/strftime.c new file mode 100644 index 00000000000..bb7553e399c --- /dev/null +++ b/reactos/lib/crt/time/strftime.c @@ -0,0 +1,260 @@ +/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ +#include +#include +#include +#include + + +#define TM_YEAR_BASE 1900 + +static const char *afmt[] = { + "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", +}; +static const char *Afmt[] = { + "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", + "Saturday", +}; +static const char *bfmt[] = { + "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", + "Oct", "Nov", "Dec", +}; +static const char *Bfmt[] = { + "January", "February", "March", "April", "May", "June", "July", + "August", "September", "October", "November", "December", +}; + +static size_t gsize; +static char *pt; + + +static int _add(const char* str) +{ + for (;; ++pt, --gsize) + { + if (!gsize) + return 0; + if (!(*pt = *str++)) + return 1; + } +} + +static int _conv(int n, int digits, char pad) +{ + static char buf[10]; + char *p; + + for (p = buf + sizeof(buf) - 2; n > 0 && p > buf; n /= 10, --digits) + *p-- = n % 10 + '0'; + while (p > buf && digits-- > 0) + *p-- = pad; + return _add(++p); +} + +static size_t _fmt(const char* format, const struct tm* t) +{ + for (; *format; ++format) + { + if (*format == '%') { + if (*(format+1) == '#' ) {format++;} + + switch(*++format) { + case '\0': + --format; + break; + case 'A': + if (t->tm_wday < 0 || t->tm_wday > 6) + return 0; + if (!_add(Afmt[t->tm_wday])) + return 0; + continue; + case 'a': + if (t->tm_wday < 0 || t->tm_wday > 6) + return 0; + if (!_add(afmt[t->tm_wday])) + return 0; + continue; + case 'B': + if (t->tm_mon < 0 || t->tm_mon > 11) + return 0; + if (!_add(Bfmt[t->tm_mon])) + return 0; + continue; + case 'b': + case 'h': + if (t->tm_mon < 0 || t->tm_mon > 11) + return 0; + if (!_add(bfmt[t->tm_mon])) + return 0; + continue; + case 'C': + if (!_fmt("%a %b %e %H:%M:%S %Y", t)) + return 0; + continue; + case 'c': + if (!_fmt("%m/%d/%y %H:%M:%S", t)) + return 0; + continue; + case 'e': + if (!_conv(t->tm_mday, 2, ' ')) + return 0; + continue; + case 'D': + if (!_fmt("%m/%d/%y", t)) + return 0; + continue; + case 'd': + if (!_conv(t->tm_mday, 2, '0')) + return 0; + continue; + case 'H': + if (!_conv(t->tm_hour, 2, '0')) + return 0; + continue; + case 'I': + if (!_conv(t->tm_hour % 12 ? t->tm_hour % 12 : 12, 2, '0')) + return 0; + continue; + case 'j': + if (!_conv(t->tm_yday + 1, 3, '0')) + return 0; + continue; + case 'k': + if (!_conv(t->tm_hour, 2, ' ')) + return 0; + continue; + case 'l': + if (!_conv(t->tm_hour % 12 ? t->tm_hour % 12 : 12, 2, ' ')) + return 0; + continue; + case 'M': + if (!_conv(t->tm_min, 2, '0')) + return 0; + continue; + case 'm': + if (!_conv(t->tm_mon + 1, 2, '0')) + return 0; + continue; + case 'n': + if (!_add("\n")) + return 0; + continue; + case 'p': + if (!_add(t->tm_hour >= 12 ? "PM" : "AM")) + return 0; + continue; + case 'R': + if (!_fmt("%H:%M", t)) + return 0; + continue; + case 'r': + if (!_fmt("%I:%M:%S %p", t)) + return 0; + continue; + case 'S': + if (!_conv(t->tm_sec, 2, '0')) + return 0; + continue; + case 'T': + case 'X': + if (!_fmt("%H:%M:%S", t)) + return 0; + continue; + case 't': + if (!_add("\t")) + return 0; + continue; + case 'U': + if (!_conv((t->tm_yday + 7 - t->tm_wday) / 7, 2, '0')) + return 0; + continue; + case 'W': + if (!_conv((t->tm_yday + 7 - (t->tm_wday ? (t->tm_wday - 1) : 6)) / 7, 2, '0')) + return 0; + continue; + case 'w': + if (!_conv(t->tm_wday, 1, '0')) + return 0; + continue; + case 'x': + if (!_fmt("%m/%d/%y", t)) + return 0; + continue; + case 'y': + if (!_conv((t->tm_year + TM_YEAR_BASE) % 100, 2, '0')) + return 0; + continue; + case 'Y': + if (!_conv(t->tm_year + TM_YEAR_BASE, 4, '0')) + return 0; + continue; + case 'Z': + if (!t->tm_zone || !_add(t->tm_zone)) + return 0; + continue; + case '%': + /* + * X311J/88-090 (4.12.3.5): if conversion char is + * undefined, behavior is undefined. Print out the + * character itself as printf(3) does. + */ + default: + break; + } + } + if (!gsize--) + return 0; + *pt++ = *format; + } + return gsize; +} + +/* + * @implemented + */ +size_t +strftime(char *s, size_t maxsize, const char *format, const struct tm *t) +{ + pt = s; + if ((gsize = maxsize) < 1) + return 0; + if (_fmt(format, t)) + { + *pt = '\0'; + return maxsize - gsize; + } + return 0; +} + +/* + * @implemented + */ +size_t wcsftime(wchar_t* s, size_t maxsize, const wchar_t* format, const struct tm* t) +{ + char *x; + char *f; + int i,j; + x = malloc(maxsize); + j = wcslen(format); + f = malloc(j+1); + for(i=0;i +#include +#include +#include + + +/* + * @implemented + */ +char* _strtime(char* buf) +{ + time_t t; + struct tm *d; + char* dt = (char*)buf; + + if ( buf == NULL ) { + __set_errno(EINVAL); + return NULL; + } + t = time(NULL); + d = localtime(&t); + sprintf(dt,"%d:%d:%d",d->tm_hour,d->tm_min,d->tm_sec); + return dt; +} diff --git a/reactos/lib/crt/time/time.c b/reactos/lib/crt/time/time.c new file mode 100644 index 00000000000..bc459d54f7c --- /dev/null +++ b/reactos/lib/crt/time/time.c @@ -0,0 +1,226 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: lib/msvcrt/time/time.c + * PURPOSE: Get system time + * PROGRAMER: Boudewijn Dekker + * UPDATE HISTORY: + * 28/12/98: Created + */ + +/* + * DOS file system functions + * + * Copyright 1993 Erik Bos + * Copyright 1996 Alexandre Julliard + */ + +#include "precomp.h" +#include +#include + + +VOID STDCALL GetSystemTimeAsFileTime(LPFILETIME lpSystemTimeAsFileTime); + +/* + * @implemented + */ +time_t time(time_t* t) +{ + FILETIME SystemTime; + DWORD Remainder; + time_t tt; + GetSystemTimeAsFileTime(&SystemTime); + tt = FileTimeToUnixTime(&SystemTime,&Remainder); + if (t) + *t = tt; + return tt; +} + +/*********************************************************************** + * DOSFS_UnixTimeToFileTime + * + * Convert a Unix time to FILETIME format. + * The FILETIME structure is a 64-bit value representing the number of + * 100-nanosecond intervals since January 1, 1601, 0:00. + * 'remainder' is the nonnegative number of 100-ns intervals + * corresponding to the time fraction smaller than 1 second that + * couldn't be stored in the time_t value. + */ +void UnixTimeToFileTime( time_t unix_time, FILETIME *filetime, + DWORD remainder ) +{ + /* NOTES: + + CONSTANTS: + The time difference between 1 January 1601, 00:00:00 and + 1 January 1970, 00:00:00 is 369 years, plus the leap years + from 1604 to 1968, excluding 1700, 1800, 1900. + This makes (1968 - 1600) / 4 - 3 = 89 leap days, and a total + of 134774 days. + + Any day in that period had 24 * 60 * 60 = 86400 seconds. + + The time difference is 134774 * 86400 * 10000000, which can be written + 116444736000000000 + 27111902 * 2^32 + 3577643008 + 413 * 2^48 + 45534 * 2^32 + 54590 * 2^16 + 32768 + + If you find that these constants are buggy, please change them in all + instances in both conversion functions. + + VERSIONS: + There are two versions, one of them uses long long variables and + is presumably faster but not ISO C. The other one uses standard C + data types and operations but relies on the assumption that negative + numbers are stored as 2's complement (-1 is 0xffff....). If this + assumption is violated, dates before 1970 will not convert correctly. + This should however work on any reasonable architecture where WINE + will run. + + DETAILS: + + Take care not to remove the casts. I have tested these functions + (in both versions) for a lot of numbers. I would be interested in + results on other compilers than GCC. + + The operations have been designed to account for the possibility + of 64-bit time_t in future UNICES. Even the versions without + internal long long numbers will work if time_t only is 64 bit. + A 32-bit shift, which was necessary for that operation, turned out + not to work correctly in GCC, besides giving the warning. So I + used a double 16-bit shift instead. Numbers are in the ISO version + represented by three limbs, the most significant with 32 bit, the + other two with 16 bit each. + + As the modulo-operator % is not well-defined for negative numbers, + negative divisors have been avoided in DOSFS_FileTimeToUnixTime. + + There might be quicker ways to do this in C. Certainly so in + assembler. + + Claus Fischer, fischer@iue.tuwien.ac.at + */ + + + + + unsigned long a0; /* 16 bit, low bits */ + unsigned long a1; /* 16 bit, medium bits */ + unsigned long a2; /* 32 bit, high bits */ + + /* Copy the unix time to a2/a1/a0 */ + a0 = unix_time & 0xffff; + a1 = (unix_time >> 16) & 0xffff; + /* This is obsolete if unix_time is only 32 bits, but it does not hurt. + Do not replace this by >> 32, it gives a compiler warning and it does + not work. */ + a2 = (unix_time >= 0 ? (unix_time >> 16) >> 16 : + ~((~unix_time >> 16) >> 16)); + + /* Multiply a by 10000000 (a = a2/a1/a0) + Split the factor into 10000 * 1000 which are both less than 0xffff. */ + a0 *= 10000; + a1 = a1 * 10000 + (a0 >> 16); + a2 = a2 * 10000 + (a1 >> 16); + a0 &= 0xffff; + a1 &= 0xffff; + + a0 *= 1000; + a1 = a1 * 1000 + (a0 >> 16); + a2 = a2 * 1000 + (a1 >> 16); + a0 &= 0xffff; + a1 &= 0xffff; + + /* Add the time difference and the remainder */ + a0 += 32768 + (remainder & 0xffff); + a1 += 54590 + (remainder >> 16 ) + (a0 >> 16); + a2 += 27111902 + (a1 >> 16); + a0 &= 0xffff; + a1 &= 0xffff; + + /* Set filetime */ + filetime->dwLowDateTime = (a1 << 16) + a0; + filetime->dwHighDateTime = a2; +} + + +/*********************************************************************** + * DOSFS_FileTimeToUnixTime + * + * Convert a FILETIME format to Unix time. + * If not NULL, 'remainder' contains the fractional part of the filetime, + * in the range of [0..9999999] (even if time_t is negative). + */ +time_t FileTimeToUnixTime( const FILETIME *filetime, DWORD *remainder ) +{ + /* Read the comment in the function DOSFS_UnixTimeToFileTime. */ + + unsigned long a0; /* 16 bit, low bits */ + unsigned long a1; /* 16 bit, medium bits */ + unsigned long a2; /* 32 bit, high bits */ + unsigned long r; /* remainder of division */ + unsigned int carry; /* carry bit for subtraction */ + int negative; /* whether a represents a negative value */ + + /* Copy the time values to a2/a1/a0 */ + a2 = (unsigned long)filetime->dwHighDateTime; + a1 = ((unsigned long)filetime->dwLowDateTime ) >> 16; + a0 = ((unsigned long)filetime->dwLowDateTime ) & 0xffff; + + /* Subtract the time difference */ + if (a0 >= 32768 ) a0 -= 32768 , carry = 0; + else a0 += (1 << 16) - 32768 , carry = 1; + + if (a1 >= 54590 + carry) a1 -= 54590 + carry, carry = 0; + else a1 += (1 << 16) - 54590 - carry, carry = 1; + + a2 -= 27111902 + carry; + + /* If a is negative, replace a by (-1-a) */ + negative = (a2 >= ((unsigned long)1) << 31); + if (negative) + { + /* Set a to -a - 1 (a is a2/a1/a0) */ + a0 = 0xffff - a0; + a1 = 0xffff - a1; + a2 = ~a2; + } + + /* Divide a by 10000000 (a = a2/a1/a0), put the rest into r. + Split the divisor into 10000 * 1000 which are both less than 0xffff. */ + a1 += (a2 % 10000) << 16; + a2 /= 10000; + a0 += (a1 % 10000) << 16; + a1 /= 10000; + r = a0 % 10000; + a0 /= 10000; + + a1 += (a2 % 1000) << 16; + a2 /= 1000; + a0 += (a1 % 1000) << 16; + a1 /= 1000; + r += (a0 % 1000) * 10000; + a0 /= 1000; + + /* If a was negative, replace a by (-1-a) and r by (9999999 - r) */ + if (negative) + { + /* Set a to -a - 1 (a is a2/a1/a0) */ + a0 = 0xffff - a0; + a1 = 0xffff - a1; + a2 = ~a2; + + r = 9999999 - r; + } + + if (remainder) *remainder = r; + + /* Do not replace this by << 32, it gives a compiler warning and it does + not work. */ + return ((((time_t)a2) << 16) << 16) + (a1 << 16) + a0; + +} + + + diff --git a/reactos/lib/crt/time/tz_vars.c b/reactos/lib/crt/time/tz_vars.c new file mode 100644 index 00000000000..aad68dcb156 --- /dev/null +++ b/reactos/lib/crt/time/tz_vars.c @@ -0,0 +1,21 @@ +#include +#include +#include + + +int _daylight; +int _timezone; + + +void _set_daylight_export(int value) +{ + _daylight = value; +} + +void _set_timezone_export(int value) +{ + _timezone = value; +} + + + diff --git a/reactos/lib/crt/time/tzfile.h b/reactos/lib/crt/time/tzfile.h new file mode 100644 index 00000000000..3999029adb9 --- /dev/null +++ b/reactos/lib/crt/time/tzfile.h @@ -0,0 +1,160 @@ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +#ifndef __dj_include_tzfile_h__ +#define __dj_include_tzfile_h__ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __dj_ENFORCE_ANSI_FREESTANDING + +#ifndef __STRICT_ANSI__ + +#ifndef _POSIX_SOURCE + +/* + * Copyright (c) 1988 Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Arthur David Olson of the National Cancer Institute. + * + * Redistribution and use in source and binary forms are permitted provided + * that: (1) source distributions retain this entire copyright notice and + * comment, and (2) distributions including binaries display the following + * acknowledgement: ``This product includes software developed by the + * University of California, Berkeley and its contributors'' in the + * documentation or other materials provided with the distribution and in + * all advertising materials mentioning features or use of this software. + * Neither the name of the University nor the names of its contributors may + * be used to endorse or promote products derived from this software without + * specific prior written permission. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * @(#)tzfile.h 5.9 (Berkeley) 6/11/90 + */ + +/* +** Information about time zone files. +*/ + + /* Time zone object file directory */ +#define TZDIR "/usr/share/zoneinfo" +#define TZDEFAULT "/etc/localtime" +#define TZDEFRULES "posixrules" + +/* +** Each file begins with. . . +*/ + +struct tzhead { + char tzh_reserved[24]; /* reserved for future use */ + char tzh_ttisstdcnt[4]; /* coded number of trans. time flags */ + char tzh_leapcnt[4]; /* coded number of leap seconds */ + char tzh_timecnt[4]; /* coded number of transition times */ + char tzh_typecnt[4]; /* coded number of local time types */ + char tzh_charcnt[4]; /* coded number of abbr. chars */ +}; + +/* +** . . .followed by. . . +** +** tzh_timecnt (char [4])s coded transition times a la time(2) +** tzh_timecnt (unsigned char)s types of local time starting at above +** tzh_typecnt repetitions of +** one (char [4]) coded GMT offset in seconds +** one (unsigned char) used to set tm_isdst +** one (unsigned char) that's an abbreviation list index +** tzh_charcnt (char)s '\0'-terminated zone abbreviations +** tzh_leapcnt repetitions of +** one (char [4]) coded leap second transition times +** one (char [4]) total correction after above +** tzh_ttisstdcnt (char)s indexed by type; if TRUE, transition +** time is standard time, if FALSE, +** transition time is wall clock time +** if absent, transition times are +** assumed to be wall clock time +*/ + +/* +** In the current implementation, "tzset()" refuses to deal with files that +** exceed any of the limits below. +*/ + +/* +** The TZ_MAX_TIMES value below is enough to handle a bit more than a +** year's worth of solar time (corrected daily to the nearest second) or +** 138 years of Pacific Presidential Election time +** (where there are three time zone transitions every fourth year). +*/ +#define TZ_MAX_TIMES 370 + +#define NOSOLAR /* 4BSD doesn't currently handle solar time */ + +#ifndef NOSOLAR +#define TZ_MAX_TYPES 256 /* Limited by what (unsigned char)'s can hold */ +#else +#define TZ_MAX_TYPES 10 /* Maximum number of local time types */ +#endif + +#define TZ_MAX_CHARS 50 /* Maximum number of abbreviation characters */ + +#define TZ_MAX_LEAPS 50 /* Maximum number of leap second corrections */ + +#define SECSPERMIN 60 +#define MINSPERHOUR 60 +#define HOURSPERDAY 24 +#define DAYSPERWEEK 7 +#define DAYSPERNYEAR 365 +#define DAYSPERLYEAR 366 +#define SECSPERHOUR (SECSPERMIN * MINSPERHOUR) +#define SECSPERDAY ((long) SECSPERHOUR * HOURSPERDAY) +#define MONSPERYEAR 12 + +#define TM_SUNDAY 0 +#define TM_MONDAY 1 +#define TM_TUESDAY 2 +#define TM_WEDNESDAY 3 +#define TM_THURSDAY 4 +#define TM_FRIDAY 5 +#define TM_SATURDAY 6 + +#define TM_JANUARY 0 +#define TM_FEBRUARY 1 +#define TM_MARCH 2 +#define TM_APRIL 3 +#define TM_MAY 4 +#define TM_JUNE 5 +#define TM_JULY 6 +#define TM_AUGUST 7 +#define TM_SEPTEMBER 8 +#define TM_OCTOBER 9 +#define TM_NOVEMBER 10 +#define TM_DECEMBER 11 + +#define TM_YEAR_BASE 1900 + +#define EPOCH_YEAR 1970 +#define EPOCH_WDAY TM_THURSDAY + +/* +** Accurate only for the past couple of centuries; +** that will probably do. +*/ + +#define isleap(y) ((((y) % 4) == 0 && ((y) % 100) != 0) || ((y) % 400) == 0) + +#endif /* !_POSIX_SOURCE */ +#endif /* !__STRICT_ANSI__ */ +#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ + +#ifndef __dj_ENFORCE_FUNCTION_CALLS +#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ + +#ifdef __cplusplus +} +#endif + +#endif /* __dj_include_tzfile_h__ */ diff --git a/reactos/lib/crt/time/wctime.c b/reactos/lib/crt/time/wctime.c new file mode 100644 index 00000000000..033595cfe1d --- /dev/null +++ b/reactos/lib/crt/time/wctime.c @@ -0,0 +1,75 @@ +/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ +/* This file has been modified by DJ Delorie. These modifications are +** Copyright (C) 1995 DJ Delorie, 24 Kirsten Ave, Rochester NH, +** 03867-2954, USA. +*/ + +/* + * Copyright (c) 1987, 1989 Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Arthur David Olson of the National Cancer Institute. + * + * Redistribution and use in source and binary forms are permitted provided + * that: (1) source distributions retain this entire copyright notice and + * comment, and (2) distributions including binaries display the following + * acknowledgement: ``This product includes software developed by the + * University of California, Berkeley and its contributors'' in the + * documentation or other materials provided with the distribution and in + * all advertising materials mentioning features or use of this software. + * Neither the name of the University nor the names of its contributors may + * be used to endorse or promote products derived from this software without + * specific prior written permission. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + */ + +#include "precomp.h" +#include +#include +#include "tzfile.h" + + +/* + * @implemented + */ +wchar_t* _wasctime(const struct tm* timeptr) +{ +#ifdef __GNUC__ + static const wchar_t wday_name[DAYSPERWEEK][3] = { + L"Sun", L"Mon", L"Tue", L"Wed", L"Thu", L"Fri", L"Sat" + }; + static const wchar_t mon_name[MONSPERYEAR][3] = { + L"Jan", L"Feb", L"Mar", L"Apr", L"May", L"Jun", + L"Jul", L"Aug", L"Sep", L"Oct", L"Nov", L"Dec" + }; +#else + static const wchar_t wday_name[DAYSPERWEEK][4] = { + L"Sun", L"Mon", L"Tue", L"Wed", L"Thu", L"Fri", L"Sat" + }; + static const wchar_t mon_name[MONSPERYEAR][4] = { + L"Jan", L"Feb", L"Mar", L"Apr", L"May", L"Jun", + L"Jul", L"Aug", L"Sep", L"Oct", L"Nov", L"Dec" + }; +#endif + static wchar_t result[26]; + + (void)swprintf(result, L"%.3s %.3s%3d %02d:%02d:%02d %d\n", + wday_name[timeptr->tm_wday], + mon_name[timeptr->tm_mon], + timeptr->tm_mday, timeptr->tm_hour, + timeptr->tm_min, timeptr->tm_sec, + TM_YEAR_BASE + timeptr->tm_year); + return result; +} + + +/* + * @implemented + */ +wchar_t* _wctime(const time_t* const timep) +{ + return _wasctime(localtime(timep)); +} diff --git a/reactos/lib/crt/time/wstrdate.c b/reactos/lib/crt/time/wstrdate.c new file mode 100644 index 00000000000..a6a9d955985 --- /dev/null +++ b/reactos/lib/crt/time/wstrdate.c @@ -0,0 +1,33 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: lib/msvcrt/time/strtime.c + * PURPOSE: Fills a buffer with a formatted date representation + * PROGRAMER: Boudewijn Dekker + * UPDATE HISTORY: + * 28/12/98: Created + */ +#include +#include +#include +#include + + +/* + * @implemented + */ +wchar_t* _wstrdate(const wchar_t* datestr) +{ + time_t t; + struct tm* d; + wchar_t* dt = (wchar_t*)datestr; + + if (datestr == NULL) { + __set_errno(EINVAL); + return NULL; + } + t = time(NULL); + d = localtime(&t); + swprintf(dt,L"%d/%d/%d",d->tm_mday,d->tm_mon+1,d->tm_year); + return dt; +} diff --git a/reactos/lib/crt/time/wstrtime.c b/reactos/lib/crt/time/wstrtime.c new file mode 100644 index 00000000000..8f5b2ace481 --- /dev/null +++ b/reactos/lib/crt/time/wstrtime.c @@ -0,0 +1,33 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: lib/msvcrt/time/strtime.c + * PURPOSE: Fills a buffer with a formatted time representation + * PROGRAMER: Boudewijn Dekker + * UPDATE HISTORY: + * 28/12/98: Created + */ +#include +#include +#include +#include + + +/* + * @implemented + */ +wchar_t* _wstrtime(wchar_t* buf) +{ + time_t t; + struct tm* d; + wchar_t* dt = (wchar_t*)buf; + + if ( buf == NULL ) { + __set_errno(EINVAL); + return NULL; + } + t = time(NULL); + d = localtime(&t); + swprintf(dt,L"%d:%d:%d",d->tm_hour,d->tm_min,d->tm_sec); + return dt; +} diff --git a/reactos/lib/crt/wine/cpp.c b/reactos/lib/crt/wine/cpp.c new file mode 100644 index 00000000000..1065cdc7c61 --- /dev/null +++ b/reactos/lib/crt/wine/cpp.c @@ -0,0 +1,1251 @@ +/* + * msvcrt.dll C++ objects + * + * Copyright 2000 Jon Griffiths + * Copyright 2003 Alexandre Julliard + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "wine/config.h" +#include "wine/port.h" + +#include + +#include "windef.h" +#include "winbase.h" +#include "winreg.h" +#include "wine/winternl.h" +#include "wine/exception.h" +#include "winnt.h" +#include "excpt.h" +#include "wine/debug.h" +#include "msvcrt/malloc.h" +#include "msvcrt/stdlib.h" + +#include +#include +#include + +WINE_DEFAULT_DEBUG_CHANNEL(msvcrt); + +/* + * exception object: base for exception, bad_cast, bad_typeid, __non_rtti_object + */ +typedef struct +{ + void* pfn_vector_dtor; + void* pfn_what; +} exception_vtable; + +typedef struct __exception +{ + const exception_vtable *vtable; + char *name; /* Name of this exception, always a new copy for each object */ + int do_free; /* Whether to free 'name' in our dtor */ +} exception; + +typedef exception bad_cast; +typedef exception bad_typeid; +typedef exception __non_rtti_object; + +typedef struct _rtti_base_descriptor +{ + type_info *type_descriptor; + int num_base_classes; + int base_class_offset; + unsigned int flags; + int unknown1; + int unknown2; +} rtti_base_descriptor; + +typedef struct _rtti_base_array +{ + const rtti_base_descriptor *bases[3]; /* First element is the class itself */ +} rtti_base_array; + +typedef struct _rtti_object_hierachy +{ + int unknown1; + int unknown2; + int array_len; /* Size of the array pointed to by 'base_classes' */ + const rtti_base_array *base_classes; +} rtti_object_hierachy; + +typedef struct _rtti_object_locator +{ + int unknown1; + int base_class_offset; + unsigned int flags; + type_info *type_descriptor; + const rtti_object_hierachy *type_hierachy; +} rtti_object_locator; + + +#ifdef __i386__ /* thiscall functions are i386-specific */ + +#define DEFINE_THISCALL_WRAPPER0(func) \ + extern void __thiscall_ ## func(); \ + __ASM_GLOBAL_FUNC(__thiscall_ ## func, \ + "popl %eax\n\t" \ + "pushl %ecx\n\t" \ + "pushl %eax\n\t" \ + "jmp " __ASM_NAME(#func) "@4" ) +#define DEFINE_THISCALL_WRAPPER1(func) \ + extern void __thiscall_ ## func(); \ + __ASM_GLOBAL_FUNC(__thiscall_ ## func, \ + "popl %eax\n\t" \ + "pushl %ecx\n\t" \ + "pushl %eax\n\t" \ + "jmp " __ASM_NAME(#func) "@8" ) + +const exception_vtable MSVCRT_exception_vtable; +const exception_vtable MSVCRT_bad_typeid_vtable; +const exception_vtable MSVCRT_bad_cast_vtable; +const exception_vtable MSVCRT___non_rtti_object_vtable; +static const exception_vtable MSVCRT_type_info_vtable; + +/* Internal common ctor for exception */ +static void WINAPI EXCEPTION_ctor(exception *_this, const char** name) +{ + _this->vtable = &MSVCRT_exception_vtable; + if (*name) + { + size_t name_len = strlen(*name) + 1; +// _this->name = MSVCRT_malloc(name_len); + _this->name = malloc(name_len); + memcpy(_this->name, *name, name_len); + _this->do_free = TRUE; + } + else + { + _this->name = NULL; + _this->do_free = FALSE; + } +} + +/****************************************************************** + * ??0exception@@QAE@ABQBD@Z (MSVCRT.@) + */ +DEFINE_THISCALL_WRAPPER1(MSVCRT_exception_ctor); +exception * __stdcall MSVCRT_exception_ctor(exception * _this, const char ** name) +{ + TRACE("(%p,%s)\n", _this, *name); + EXCEPTION_ctor(_this, name); + return _this; +} + +/****************************************************************** + * ??0exception@@QAE@ABV0@@Z (MSVCRT.@) + */ +DEFINE_THISCALL_WRAPPER1(MSVCRT_exception_copy_ctor); +exception * __stdcall MSVCRT_exception_copy_ctor(exception * _this, const exception * rhs) +{ + TRACE("(%p,%p)\n", _this, rhs); + + if (!rhs->do_free) + { + _this->vtable = &MSVCRT_exception_vtable; + _this->name = rhs->name; + _this->do_free = FALSE; + } + else + EXCEPTION_ctor(_this, (const char**)&rhs->name); + TRACE("name = %s\n", _this->name); + return _this; +} + +/****************************************************************** + * ??0exception@@QAE@XZ (MSVCRT.@) + */ +DEFINE_THISCALL_WRAPPER0(MSVCRT_exception_default_ctor); +exception * __stdcall MSVCRT_exception_default_ctor(exception * _this) +{ + static const char* empty = NULL; + + TRACE("(%p)\n", _this); + EXCEPTION_ctor(_this, &empty); + return _this; +} + +/****************************************************************** + * ??1exception@@UAE@XZ (MSVCRT.@) + */ +DEFINE_THISCALL_WRAPPER0(MSVCRT_exception_dtor); +void __stdcall MSVCRT_exception_dtor(exception * _this) +{ + TRACE("(%p)\n", _this); + _this->vtable = &MSVCRT_exception_vtable; +// if (_this->do_free) MSVCRT_free(_this->name); + if (_this->do_free) free(_this->name); +} + +/****************************************************************** + * ??4exception@@QAEAAV0@ABV0@@Z (MSVCRT.@) + */ +DEFINE_THISCALL_WRAPPER1(MSVCRT_exception_opequals); +exception * __stdcall MSVCRT_exception_opequals(exception * _this, const exception * rhs) +{ + TRACE("(%p %p)\n", _this, rhs); + if (_this != rhs) + { + MSVCRT_exception_dtor(_this); + MSVCRT_exception_copy_ctor(_this, rhs); + } + TRACE("name = %s\n", _this->name); + return _this; +} + +/****************************************************************** + * ??_Eexception@@UAEPAXI@Z (MSVCRT.@) + */ +DEFINE_THISCALL_WRAPPER1(MSVCRT_exception_vector_dtor); +void * __stdcall MSVCRT_exception_vector_dtor(exception * _this, unsigned int flags) +{ + TRACE("(%p %x)\n", _this, flags); + if (flags & 2) + { + /* we have an array, with the number of elements stored before the first object */ + int i, *ptr = (int *)_this - 1; + + for (i = *ptr - 1; i >= 0; i--) MSVCRT_exception_dtor(_this + i); + MSVCRT_operator_delete(ptr); + } + else + { + MSVCRT_exception_dtor(_this); + if (flags & 1) MSVCRT_operator_delete(_this); + } + return _this; +} + +/****************************************************************** + * ??_Gexception@@UAEPAXI@Z (MSVCRT.@) + */ +DEFINE_THISCALL_WRAPPER1(MSVCRT_exception_scalar_dtor); +void * __stdcall MSVCRT_exception_scalar_dtor(exception * _this, unsigned int flags) +{ + TRACE("(%p %x)\n", _this, flags); + MSVCRT_exception_dtor(_this); + if (flags & 1) MSVCRT_operator_delete(_this); + return _this; +} + +/****************************************************************** + * ?what@exception@@UBEPBDXZ (MSVCRT.@) + */ +DEFINE_THISCALL_WRAPPER0(MSVCRT_what_exception); +const char * __stdcall MSVCRT_what_exception(exception * _this) +{ + TRACE("(%p) returning %s\n", _this, _this->name); + return _this->name ? _this->name : "Unknown exception"; +} + +/****************************************************************** + * ??0bad_typeid@@QAE@ABV0@@Z (MSVCRT.@) + */ +DEFINE_THISCALL_WRAPPER1(MSVCRT_bad_typeid_copy_ctor); +bad_typeid * __stdcall MSVCRT_bad_typeid_copy_ctor(bad_typeid * _this, const bad_typeid * rhs) +{ + TRACE("(%p %p)\n", _this, rhs); + MSVCRT_exception_copy_ctor(_this, rhs); + _this->vtable = &MSVCRT_bad_typeid_vtable; + return _this; +} + +/****************************************************************** + * ??0bad_typeid@@QAE@PBD@Z (MSVCRT.@) + */ +DEFINE_THISCALL_WRAPPER1(MSVCRT_bad_typeid_ctor); +bad_typeid * __stdcall MSVCRT_bad_typeid_ctor(bad_typeid * _this, const char * name) +{ + TRACE("(%p %s)\n", _this, name); + EXCEPTION_ctor(_this, &name); + _this->vtable = &MSVCRT_bad_typeid_vtable; + return _this; +} + +/****************************************************************** + * ??1bad_typeid@@UAE@XZ (MSVCRT.@) + */ +DEFINE_THISCALL_WRAPPER0(MSVCRT_bad_typeid_dtor); +void __stdcall MSVCRT_bad_typeid_dtor(bad_typeid * _this) +{ + TRACE("(%p)\n", _this); + MSVCRT_exception_dtor(_this); +} + +/****************************************************************** + * ??4bad_typeid@@QAEAAV0@ABV0@@Z (MSVCRT.@) + */ +DEFINE_THISCALL_WRAPPER1(MSVCRT_bad_typeid_opequals); +bad_typeid * __stdcall MSVCRT_bad_typeid_opequals(bad_typeid * _this, const bad_typeid * rhs) +{ + TRACE("(%p %p)\n", _this, rhs); + MSVCRT_exception_opequals(_this, rhs); + return _this; +} + +/****************************************************************** + * ??_Ebad_typeid@@UAEPAXI@Z (MSVCRT.@) + */ +DEFINE_THISCALL_WRAPPER1(MSVCRT_bad_typeid_vector_dtor); +void * __stdcall MSVCRT_bad_typeid_vector_dtor(bad_typeid * _this, unsigned int flags) +{ + TRACE("(%p %x)\n", _this, flags); + if (flags & 2) + { + /* we have an array, with the number of elements stored before the first object */ + int i, *ptr = (int *)_this - 1; + + for (i = *ptr - 1; i >= 0; i--) MSVCRT_bad_typeid_dtor(_this + i); + MSVCRT_operator_delete(ptr); + } + else + { + MSVCRT_bad_typeid_dtor(_this); + if (flags & 1) MSVCRT_operator_delete(_this); + } + return _this; +} + +/****************************************************************** + * ??_Gbad_typeid@@UAEPAXI@Z (MSVCRT.@) + */ +DEFINE_THISCALL_WRAPPER1(MSVCRT_bad_typeid_scalar_dtor); +void * __stdcall MSVCRT_bad_typeid_scalar_dtor(bad_typeid * _this, unsigned int flags) +{ + TRACE("(%p %x)\n", _this, flags); + MSVCRT_bad_typeid_dtor(_this); + if (flags & 1) MSVCRT_operator_delete(_this); + return _this; +} + +/****************************************************************** + * ??0__non_rtti_object@@QAE@ABV0@@Z (MSVCRT.@) + */ +DEFINE_THISCALL_WRAPPER1(MSVCRT___non_rtti_object_copy_ctor); +__non_rtti_object * __stdcall MSVCRT___non_rtti_object_copy_ctor(__non_rtti_object * _this, + const __non_rtti_object * rhs) +{ + TRACE("(%p %p)\n", _this, rhs); + MSVCRT_bad_typeid_copy_ctor(_this, rhs); + _this->vtable = &MSVCRT___non_rtti_object_vtable; + return _this; +} + +/****************************************************************** + * ??0__non_rtti_object@@QAE@PBD@Z (MSVCRT.@) + */ +DEFINE_THISCALL_WRAPPER1(MSVCRT___non_rtti_object_ctor); +__non_rtti_object * __stdcall MSVCRT___non_rtti_object_ctor(__non_rtti_object * _this, + const char * name) +{ + TRACE("(%p %s)\n", _this, name); + EXCEPTION_ctor(_this, &name); + _this->vtable = &MSVCRT___non_rtti_object_vtable; + return _this; +} + +/****************************************************************** + * ??1__non_rtti_object@@UAE@XZ (MSVCRT.@) + */ +DEFINE_THISCALL_WRAPPER0(MSVCRT___non_rtti_object_dtor); +void __stdcall MSVCRT___non_rtti_object_dtor(__non_rtti_object * _this) +{ + TRACE("(%p)\n", _this); + MSVCRT_bad_typeid_dtor(_this); +} + +/****************************************************************** + * ??4__non_rtti_object@@QAEAAV0@ABV0@@Z (MSVCRT.@) + */ +DEFINE_THISCALL_WRAPPER1(MSVCRT___non_rtti_object_opequals); +__non_rtti_object * __stdcall MSVCRT___non_rtti_object_opequals(__non_rtti_object * _this, + const __non_rtti_object *rhs) +{ + TRACE("(%p %p)\n", _this, rhs); + MSVCRT_bad_typeid_opequals(_this, rhs); + return _this; +} + +/****************************************************************** + * ??_E__non_rtti_object@@UAEPAXI@Z (MSVCRT.@) + */ +DEFINE_THISCALL_WRAPPER1(MSVCRT___non_rtti_object_vector_dtor); +void * __stdcall MSVCRT___non_rtti_object_vector_dtor(__non_rtti_object * _this, unsigned int flags) +{ + TRACE("(%p %x)\n", _this, flags); + if (flags & 2) + { + /* we have an array, with the number of elements stored before the first object */ + int i, *ptr = (int *)_this - 1; + + for (i = *ptr - 1; i >= 0; i--) MSVCRT___non_rtti_object_dtor(_this + i); + MSVCRT_operator_delete(ptr); + } + else + { + MSVCRT___non_rtti_object_dtor(_this); + if (flags & 1) MSVCRT_operator_delete(_this); + } + return _this; +} + +/****************************************************************** + * ??_G__non_rtti_object@@UAEPAXI@Z (MSVCRT.@) + */ +DEFINE_THISCALL_WRAPPER1(MSVCRT___non_rtti_object_scalar_dtor); +void * __stdcall MSVCRT___non_rtti_object_scalar_dtor(__non_rtti_object * _this, unsigned int flags) +{ + TRACE("(%p %x)\n", _this, flags); + MSVCRT___non_rtti_object_dtor(_this); + if (flags & 1) MSVCRT_operator_delete(_this); + return _this; +} + +/****************************************************************** + * ??0bad_cast@@QAE@ABQBD@Z (MSVCRT.@) + */ +DEFINE_THISCALL_WRAPPER1(MSVCRT_bad_cast_ctor); +bad_cast * __stdcall MSVCRT_bad_cast_ctor(bad_cast * _this, const char ** name) +{ + TRACE("(%p %s)\n", _this, *name); + EXCEPTION_ctor(_this, name); + _this->vtable = &MSVCRT_bad_cast_vtable; + return _this; +} + +/****************************************************************** + * ??0bad_cast@@QAE@ABV0@@Z (MSVCRT.@) + */ +DEFINE_THISCALL_WRAPPER1(MSVCRT_bad_cast_copy_ctor); +bad_cast * __stdcall MSVCRT_bad_cast_copy_ctor(bad_cast * _this, const bad_cast * rhs) +{ + TRACE("(%p %p)\n", _this, rhs); + MSVCRT_exception_copy_ctor(_this, rhs); + _this->vtable = &MSVCRT_bad_cast_vtable; + return _this; +} + +/****************************************************************** + * ??1bad_cast@@UAE@XZ (MSVCRT.@) + */ +DEFINE_THISCALL_WRAPPER0(MSVCRT_bad_cast_dtor); +void __stdcall MSVCRT_bad_cast_dtor(bad_cast * _this) +{ + TRACE("(%p)\n", _this); + MSVCRT_exception_dtor(_this); +} + +/****************************************************************** + * ??4bad_cast@@QAEAAV0@ABV0@@Z (MSVCRT.@) + */ +DEFINE_THISCALL_WRAPPER1(MSVCRT_bad_cast_opequals); +bad_cast * __stdcall MSVCRT_bad_cast_opequals(bad_cast * _this, const bad_cast * rhs) +{ + TRACE("(%p %p)\n", _this, rhs); + MSVCRT_exception_opequals(_this, rhs); + return _this; +} + +/****************************************************************** + * ??_Ebad_cast@@UAEPAXI@Z (MSVCRT.@) + */ +DEFINE_THISCALL_WRAPPER1(MSVCRT_bad_cast_vector_dtor); +void * __stdcall MSVCRT_bad_cast_vector_dtor(bad_cast * _this, unsigned int flags) +{ + TRACE("(%p %x)\n", _this, flags); + if (flags & 2) + { + /* we have an array, with the number of elements stored before the first object */ + int i, *ptr = (int *)_this - 1; + + for (i = *ptr - 1; i >= 0; i--) MSVCRT_bad_cast_dtor(_this + i); + MSVCRT_operator_delete(ptr); + } + else + { + MSVCRT_bad_cast_dtor(_this); + if (flags & 1) MSVCRT_operator_delete(_this); + } + return _this; +} + +/****************************************************************** + * ??_Gbad_cast@@UAEPAXI@Z (MSVCRT.@) + */ +DEFINE_THISCALL_WRAPPER1(MSVCRT_bad_cast_scalar_dtor); +void * __stdcall MSVCRT_bad_cast_scalar_dtor(bad_cast * _this, unsigned int flags) +{ + TRACE("(%p %x)\n", _this, flags); + MSVCRT_bad_cast_dtor(_this); + if (flags & 1) MSVCRT_operator_delete(_this); + return _this; +} + +/****************************************************************** + * ??8type_info@@QBEHABV0@@Z (MSVCRT.@) + */ +DEFINE_THISCALL_WRAPPER1(MSVCRT_type_info_opequals_equals); +int __stdcall MSVCRT_type_info_opequals_equals(type_info * _this, const type_info * rhs) +{ + int ret = !strcmp(_this->mangled + 1, rhs->mangled + 1); + TRACE("(%p %p) returning %d\n", _this, rhs, ret); + return ret; +} + +/****************************************************************** + * ??9type_info@@QBEHABV0@@Z (MSVCRT.@) + */ +DEFINE_THISCALL_WRAPPER1(MSVCRT_type_info_opnot_equals); +int __stdcall MSVCRT_type_info_opnot_equals(type_info * _this, const type_info * rhs) +{ + int ret = !!strcmp(_this->mangled + 1, rhs->mangled + 1); + TRACE("(%p %p) returning %d\n", _this, rhs, ret); + return ret; +} + +/****************************************************************** + * ?before@type_info@@QBEHABV1@@Z (MSVCRT.@) + */ +DEFINE_THISCALL_WRAPPER1(MSVCRT_type_info_before); +int __stdcall MSVCRT_type_info_before(type_info * _this, const type_info * rhs) +{ + int ret = strcmp(_this->mangled + 1, rhs->mangled + 1) < 0; + TRACE("(%p %p) returning %d\n", _this, rhs, ret); + return ret; +} + +/****************************************************************** + * ??1type_info@@UAE@XZ (MSVCRT.@) + */ +DEFINE_THISCALL_WRAPPER0(MSVCRT_type_info_dtor); +void __stdcall MSVCRT_type_info_dtor(type_info * _this) +{ + TRACE("(%p)\n", _this); + if (_this->name) +// MSVCRT_free(_this->name); + free(_this->name); +} +#if 0 /* __REACTOS__ */ +/****************************************************************** + * ?name@type_info@@QBEPBDXZ (MSVCRT.@) + */ +DEFINE_THISCALL_WRAPPER0(MSVCRT_type_info_name); +const char * __stdcall MSVCRT_type_info_name(type_info * _this) +{ + if (!_this->name) + { + /* Create and set the demangled name */ + char* name = MSVCRT___unDName(0, _this->mangled, 0, + (MSVCRT_malloc_func)malloc, + (MSVCRT_free_func)free, 0x2800); + + if (name) + { + unsigned int len = strlen(name); + + /* It seems _unDName may leave blanks at the end of the demangled name */ + if (name[len] == ' ') + name[len] = '\0'; + + _mlock(_EXIT_LOCK2); + + if (_this->name) + { + /* Another thread set this member since we checked above - use it */ +// MSVCRT_free(name); + free(name); + } + else + _this->name = name; + + _munlock(_EXIT_LOCK2); + } + } + TRACE("(%p) returning %s\n", _this, _this->name); + return _this->name; +} +#endif +/****************************************************************** + * ?raw_name@type_info@@QBEPBDXZ (MSVCRT.@) + */ +DEFINE_THISCALL_WRAPPER0(MSVCRT_type_info_raw_name); +const char * __stdcall MSVCRT_type_info_raw_name(type_info * _this) +{ + TRACE("(%p) returning %s\n", _this, _this->mangled); + return _this->mangled; +} + +/* Unexported */ +DEFINE_THISCALL_WRAPPER1(MSVCRT_type_info_vector_dtor); +void * __stdcall MSVCRT_type_info_vector_dtor(type_info * _this, unsigned int flags) +{ + TRACE("(%p %x)\n", _this, flags); + if (flags & 2) + { + /* we have an array, with the number of elements stored before the first object */ + int i, *ptr = (int *)_this - 1; + + for (i = *ptr - 1; i >= 0; i--) MSVCRT_type_info_dtor(_this + i); + MSVCRT_operator_delete(ptr); + } + else + { + MSVCRT_type_info_dtor(_this); + if (flags & 1) MSVCRT_operator_delete(_this); + } + return _this; +} + +/* vtables */ + +const exception_vtable MSVCRT_exception_vtable = +{ + __thiscall_MSVCRT_exception_vector_dtor, + __thiscall_MSVCRT_what_exception +}; + +const exception_vtable MSVCRT_bad_typeid_vtable = +{ + __thiscall_MSVCRT_bad_typeid_vector_dtor, + __thiscall_MSVCRT_what_exception +}; + +const exception_vtable MSVCRT_bad_cast_vtable = +{ + __thiscall_MSVCRT_bad_cast_vector_dtor, + __thiscall_MSVCRT_what_exception +}; + +const exception_vtable MSVCRT___non_rtti_object_vtable = +{ + __thiscall_MSVCRT___non_rtti_object_vector_dtor, + __thiscall_MSVCRT_what_exception +}; + +static const exception_vtable MSVCRT_type_info_vtable = +{ + __thiscall_MSVCRT_type_info_vector_dtor, + NULL +}; + +/* Static RTTI for exported objects */ + +static type_info exception_type_info = +{ + (void*)&MSVCRT_type_info_vtable, + NULL, + ".?AVexception@@" +}; + +static const rtti_base_descriptor exception_rtti_base_descriptor = +{ + &exception_type_info, + 0, + 0, + 0, + 0, + 0 +}; + +static const rtti_base_array exception_rtti_base_array = +{ + { + &exception_rtti_base_descriptor, + NULL, + NULL + } +}; + +static const rtti_object_hierachy exception_type_hierachy = +{ + 0, + 0, + 1, + &exception_rtti_base_array +}; + +static const rtti_object_locator exception_rtti = +{ + 0, + 0, + 0, + &exception_type_info, + &exception_type_hierachy +}; + +static const cxx_type_info exception_cxx_type_info = +{ + 0, + &exception_type_info, + 0, + -1, + 0, + sizeof(exception), + (cxx_copy_ctor)__thiscall_MSVCRT_exception_copy_ctor +}; + +static type_info bad_typeid_type_info = +{ + (void*)&MSVCRT_type_info_vtable, + NULL, + ".?AVbad_typeid@@" +}; + +static const rtti_base_descriptor bad_typeid_rtti_base_descriptor = +{ + &bad_typeid_type_info, + 1, + 0, + 0xffffffff, + 0, + 0 +}; + +static const rtti_base_array bad_typeid_rtti_base_array = +{ + { + &bad_typeid_rtti_base_descriptor, + &exception_rtti_base_descriptor, + NULL + } +}; + +static const rtti_object_hierachy bad_typeid_type_hierachy = +{ + 0, + 0, + 2, + &bad_typeid_rtti_base_array +}; + +static const rtti_object_locator bad_typeid_rtti = +{ + 0, + 0, + 0, + &bad_typeid_type_info, + &bad_typeid_type_hierachy +}; + +static const cxx_type_info bad_typeid_cxx_type_info = +{ + 0, + &bad_typeid_type_info, + 0, + -1, + 0, + sizeof(exception), + (cxx_copy_ctor)__thiscall_MSVCRT_bad_typeid_copy_ctor +}; + +static type_info bad_cast_type_info = +{ + (void*)&MSVCRT_type_info_vtable, + NULL, + ".?AVbad_cast@@" +}; + +static const rtti_base_descriptor bad_cast_rtti_base_descriptor = +{ + &bad_cast_type_info, + 1, + 0, + 0xffffffff, + 0, + 0 +}; + +static const rtti_base_array bad_cast_rtti_base_array = +{ + { + &bad_cast_rtti_base_descriptor, + &exception_rtti_base_descriptor, + NULL + } +}; + +static const rtti_object_hierachy bad_cast_type_hierachy = +{ + 0, + 0, + 2, + &bad_cast_rtti_base_array +}; + +static const rtti_object_locator bad_cast_rtti = +{ + 0, + 0, + 0, + &bad_cast_type_info, + &bad_cast_type_hierachy +}; + +static const cxx_type_info bad_cast_cxx_type_info = +{ + 0, + &bad_cast_type_info, + 0, + -1, + 0, + sizeof(exception), + (cxx_copy_ctor)__thiscall_MSVCRT_bad_cast_copy_ctor +}; + +static type_info __non_rtti_object_type_info = +{ + (void*)&MSVCRT_type_info_vtable, + NULL, + ".?AV__non_rtti_object@@" +}; + +static const rtti_base_descriptor __non_rtti_object_rtti_base_descriptor = +{ + &__non_rtti_object_type_info, + 2, + 0, + 0xffffffff, + 0, + 0 +}; + +static const rtti_base_array __non_rtti_object_rtti_base_array = +{ + { + &__non_rtti_object_rtti_base_descriptor, + &bad_typeid_rtti_base_descriptor, + &exception_rtti_base_descriptor + } +}; + +static const rtti_object_hierachy __non_rtti_object_type_hierachy = +{ + 0, + 0, + 3, + &__non_rtti_object_rtti_base_array +}; + +static const rtti_object_locator __non_rtti_object_rtti = +{ + 0, + 0, + 0, + &__non_rtti_object_type_info, + &__non_rtti_object_type_hierachy +}; + +static const cxx_type_info __non_rtti_object_cxx_type_info = +{ + 0, + &__non_rtti_object_type_info, + 0, + -1, + 0, + sizeof(exception), + (cxx_copy_ctor)__thiscall_MSVCRT___non_rtti_object_copy_ctor +}; + +static type_info type_info_type_info = +{ + (void*)&MSVCRT_type_info_vtable, + NULL, + ".?AVtype_info@@" +}; + +static const rtti_base_descriptor type_info_rtti_base_descriptor = +{ + &type_info_type_info, + 0, + 0, + 0xffffffff, + 0, + 0 +}; + +static const rtti_base_array type_info_rtti_base_array = +{ + { + &type_info_rtti_base_descriptor, + NULL, + NULL + } +}; + +static const rtti_object_hierachy type_info_type_hierachy = +{ + 0, + 0, + 1, + &type_info_rtti_base_array +}; + +static const rtti_object_locator type_info_rtti = +{ + 0, + 0, + 0, + &type_info_type_info, + &type_info_type_hierachy +}; + +/* + * Exception RTTI for cpp objects + */ +static const cxx_type_info_table bad_cast_type_info_table = +{ + 3, + { + &__non_rtti_object_cxx_type_info, + &bad_typeid_cxx_type_info, + &exception_cxx_type_info + } +}; + +static const cxx_exception_type bad_cast_exception_type = +{ + 0, + (void*)__thiscall_MSVCRT_bad_cast_dtor, + NULL, + &bad_cast_type_info_table +}; + +static const cxx_type_info_table bad_typeid_type_info_table = +{ + 2, + { + &bad_cast_cxx_type_info, + &exception_cxx_type_info, + NULL + } +}; + +static const cxx_exception_type bad_typeid_exception_type = +{ + 0, + (void*)__thiscall_MSVCRT_bad_typeid_dtor, + NULL, + &bad_cast_type_info_table +}; + +static const cxx_exception_type __non_rtti_object_exception_type = +{ + 0, + (void*)__thiscall_MSVCRT___non_rtti_object_dtor, + NULL, + &bad_typeid_type_info_table +}; + +#endif /* __i386__ */ + + +/****************************************************************** + * ?set_terminate@@YAP6AXXZP6AXXZ@Z (MSVCRT.@) + * + * Install a handler to be called when terminate() is called. + * + * PARAMS + * func [I] Handler function to install + * + * RETURNS + * The previously installed handler function, if any. + */ +terminate_function MSVCRT_set_terminate(terminate_function func) +{ + MSVCRT_thread_data *data = msvcrt_get_thread_data(); + terminate_function previous = data->terminate_handler; + TRACE("(%p) returning %p\n",func,previous); + data->terminate_handler = func; + return previous; +} + +/****************************************************************** + * ?set_unexpected@@YAP6AXXZP6AXXZ@Z (MSVCRT.@) + * + * Install a handler to be called when unexpected() is called. + * + * PARAMS + * func [I] Handler function to install + * + * RETURNS + * The previously installed handler function, if any. + */ +unexpected_function MSVCRT_set_unexpected(unexpected_function func) +{ + MSVCRT_thread_data *data = msvcrt_get_thread_data(); + unexpected_function previous = data->unexpected_handler; + TRACE("(%p) returning %p\n",func,previous); + data->unexpected_handler = func; + return previous; +} + +/****************************************************************** + * ?_set_se_translator@@YAP6AXIPAU_EXCEPTION_POINTERS@@@ZP6AXI0@Z@Z (MSVCRT.@) + */ +_se_translator_function MSVCRT__set_se_translator(_se_translator_function func) +{ + MSVCRT_thread_data *data = msvcrt_get_thread_data(); + _se_translator_function previous = data->se_translator; + TRACE("(%p) returning %p\n",func,previous); + data->se_translator = func; + return previous; +} + +/****************************************************************** + * ?terminate@@YAXXZ (MSVCRT.@) + * + * Default handler for an unhandled exception. + * + * PARAMS + * None. + * + * RETURNS + * This function does not return. Either control resumes from any + * handler installed by calling set_terminate(), or (by default) abort() + * is called. + */ +void MSVCRT_terminate(void) +{ + MSVCRT_thread_data *data = msvcrt_get_thread_data(); + if (data->terminate_handler) data->terminate_handler(); + abort(); +} + +/****************************************************************** + * ?unexpected@@YAXXZ (MSVCRT.@) + */ +void MSVCRT_unexpected(void) +{ + MSVCRT_thread_data *data = msvcrt_get_thread_data(); + if (data->unexpected_handler) data->unexpected_handler(); + MSVCRT_terminate(); +} + +/* Get type info from an object (internal) */ +static const rtti_object_locator* RTTI_GetObjectLocator(type_info *cppobj) +{ + const rtti_object_locator *obj_locator = NULL; + +#ifdef __i386__ + const exception_vtable* vtable = (const exception_vtable*)cppobj->vtable; + + /* Perhaps this is one of classes we export? */ + if (vtable == &MSVCRT_exception_vtable) + { + TRACE("returning exception_rtti\n"); + return &exception_rtti; + } + else if (vtable == &MSVCRT_bad_typeid_vtable) + { + TRACE("returning bad_typeid_rtti\n"); + return &bad_typeid_rtti; + } + else if (vtable == &MSVCRT_bad_cast_vtable) + { + TRACE("returning bad_cast_rtti\n"); + return &bad_cast_rtti; + } + else if (vtable == &MSVCRT___non_rtti_object_vtable) + { + TRACE("returning __non_rtti_object_rtti\n"); + return &__non_rtti_object_rtti; + } + else if (vtable == &MSVCRT_type_info_vtable) + { + TRACE("returning type_info_rtti\n"); + return &type_info_rtti; + } +#endif + + if (!IsBadReadPtr(cppobj, sizeof(void *)) && + !IsBadReadPtr(cppobj->vtable - 1,sizeof(void *)) && + !IsBadReadPtr((void*)cppobj->vtable[-1], sizeof(rtti_object_locator))) + { + obj_locator = (rtti_object_locator *)cppobj->vtable[-1]; + TRACE("returning type_info from vtable (%p)\n", obj_locator); + } + + return obj_locator; +} + +/****************************************************************** + * __RTtypeid (MSVCRT.@) + * + * Retrieve the Run Time Type Information (RTTI) for a C++ object. + * + * PARAMS + * cppobj [I] C++ object to get type information for. + * + * RETURNS + * Success: A type_info object describing cppobj. + * Failure: If the object to be cast has no RTTI, a __non_rtti_object + * exception is thrown. If cppobj is NULL, a bad_typeid exception + * is thrown. In either case, this function does not return. + * + * NOTES + * This function is usually called by compiler generated code as a result + * of using one of the C++ dynamic cast statements. + */ +type_info* MSVCRT___RTtypeid(type_info *cppobj) +{ + const rtti_object_locator *obj_locator = RTTI_GetObjectLocator(cppobj); + +#ifdef __i386__ + if (!obj_locator) + { + static const char* szNullPtr = "Attempted a typeid of NULL pointer!"; + static const char* szBadPtr = "Bad read pointer - no RTTI data!"; + const cxx_exception_type *e_type; + exception e; + + /* Throw a bad_typeid or __non_rtti_object exception */ + if (!cppobj) + { + EXCEPTION_ctor(&e, &szNullPtr); + e.vtable = &MSVCRT_bad_typeid_vtable; + e_type = &bad_typeid_exception_type; + } + else + { + EXCEPTION_ctor(&e, &szBadPtr); + e.vtable = &MSVCRT___non_rtti_object_vtable; + e_type = &__non_rtti_object_exception_type; + } + + _CxxThrowException(&e, e_type); + DebugBreak(); + } + return obj_locator->type_descriptor; +#else + return NULL; +#endif +} + +/****************************************************************** + * __RTDynamicCast (MSVCRT.@) + * + * Dynamically cast a C++ object to one of its base classes. + * + * PARAMS + * cppobj [I] Any C++ object to cast + * unknown [I] Reserved, set to 0 + * src [I] type_info object describing cppobj + * dst [I] type_info object describing the base class to cast to + * do_throw [I] TRUE = throw an exception if the cast fails, FALSE = don't + * + * RETURNS + * Success: The address of cppobj, cast to the object described by dst. + * Failure: NULL, If the object to be cast has no RTTI, or dst is not a + * valid cast for cppobj. If do_throw is TRUE, a bad_cast exception + * is thrown and this function does not return. + * + * NOTES + * This function is usually called by compiler generated code as a result + * of using one of the C++ dynamic cast statements. + */ +void* MSVCRT___RTDynamicCast(type_info *cppobj, int unknown, + type_info *src, type_info *dst, + int do_throw) +{ + const rtti_object_locator *obj_locator; + + /* Note: cppobj _isn't_ a type_info, we use that struct for its vtable ptr */ + TRACE("(%p,%d,%p,%p,%d)\n", cppobj, unknown, src, dst, do_throw); + if (!cppobj) + return 0; + obj_locator= RTTI_GetObjectLocator(cppobj); + if (unknown) + FIXME("Unknown parameter is non-zero: please report\n"); + + /* To cast an object at runtime: + * 1.Find out the true type of the object from the typeinfo at vtable[-1] + * 2.Search for the destination type in the class heirachy + * 3.If destination type is found, return base object address + dest offset + * Otherwise, fail the cast + */ + if (obj_locator) + { + int count = 0; + const rtti_object_hierachy *obj_bases = obj_locator->type_hierachy; + const rtti_base_descriptor **base_desc = obj_bases->base_classes->bases; + int src_offset = obj_locator->base_class_offset, dst_offset = -1; + + while (count < obj_bases->array_len) + { + const type_info *typ = (*base_desc)->type_descriptor; + + if (!strcmp(typ->mangled, dst->mangled)) + { + dst_offset = (*base_desc)->base_class_offset; + break; + } + base_desc++; + count++; + } + if (dst_offset >= 0) + return (void*)((unsigned long)cppobj - src_offset + dst_offset); + } + +#ifdef __i386__ + /* VC++ sets do_throw to 1 when the result of a dynamic_cast is assigned + * to a reference, since references cannot be NULL. + */ + if (do_throw) + { + static const char* exception_text = "Bad dynamic_cast!"; + exception e; + + /* Throw a bad_cast exception */ + EXCEPTION_ctor(&e, &exception_text); + e.vtable = &MSVCRT_bad_cast_vtable; + _CxxThrowException(&e, &bad_cast_exception_type); + DebugBreak(); + } +#endif + return NULL; +} + + +/****************************************************************** + * __RTCastToVoid (MSVCRT.@) + * + * Dynamically cast a C++ object to a void*. + * + * PARAMS + * cppobj [I] The C++ object to cast + * + * RETURNS + * Success: The base address of the object as a void*. + * Failure: NULL, if cppobj is NULL or has no RTTI. + * + * NOTES + * This function is usually called by compiler generated code as a result + * of using one of the C++ dynamic cast statements. + */ +void* MSVCRT___RTCastToVoid(type_info *cppobj) +{ + const rtti_object_locator *obj_locator = RTTI_GetObjectLocator(cppobj); + + /* Note: cppobj _isn't_ a type_info, we use that struct for its vtable ptr */ + TRACE("(%p)\n", cppobj); + + /* Casts to void* simply cast to the base object */ + if (obj_locator) + return (void*)((unsigned long)cppobj - obj_locator->base_class_offset); + return NULL; +} diff --git a/reactos/lib/crt/wine/cppexcept.c b/reactos/lib/crt/wine/cppexcept.c new file mode 100644 index 00000000000..98c4bcf7660 --- /dev/null +++ b/reactos/lib/crt/wine/cppexcept.c @@ -0,0 +1,443 @@ +/* + * msvcrt C++ exception handling + * + * Copyright 2002 Alexandre Julliard + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * NOTES + * A good reference is the article "How a C++ compiler implements + * exception handling" by Vishal Kochhar, available on + * www.thecodeproject.com. + */ + +#include "wine/config.h" +#include "wine/port.h" + +#include + +#include "windef.h" +#include "winbase.h" +#include "winreg.h" +#include "wine/winternl.h" +#include +#include "wine/exception.h" +#include "excpt.h" +#include "wine/debug.h" + +#include + +WINE_DEFAULT_DEBUG_CHANNEL(seh); + +#ifdef __i386__ /* CxxFrameHandler is not supported on non-i386 */ +#define CONTEXT86 CONTEXT //Mingw Hack + +static DWORD cxx_frame_handler( PEXCEPTION_RECORD rec, cxx_exception_frame* frame, + PCONTEXT exc_context, EXCEPTION_REGISTRATION_RECORD** dispatch, + cxx_function_descr *descr, EXCEPTION_REGISTRATION_RECORD* nested_frame, + int nested_trylevel, CONTEXT86 *context ); + +/* call a function with a given ebp */ +inline static void *call_ebp_func( void *func, void *ebp ) +{ + void *ret; + __asm__ __volatile__ ("pushl %%ebp; movl %2,%%ebp; call *%%eax; popl %%ebp" \ + : "=a" (ret) : "0" (func), "g" (ebp) : "ecx", "edx", "memory" ); + return ret; +} + +/* call a copy constructor */ +inline static void call_copy_ctor( void *func, void *this, void *src, int has_vbase ) +{ + TRACE( "calling copy ctor %p object %p src %p\n", func, this, src ); + if (has_vbase) + /* in that case copy ctor takes an extra bool indicating whether to copy the base class */ + __asm__ __volatile__("pushl $1; pushl %2; call *%0" + : : "r" (func), "c" (this), "g" (src) : "eax", "edx", "memory" ); + else + __asm__ __volatile__("pushl %2; call *%0" + : : "r" (func), "c" (this), "g" (src) : "eax", "edx", "memory" ); +} + +/* call the destructor of the exception object */ +inline static void call_dtor( void *func, void *object ) +{ + __asm__ __volatile__("call *%0" : : "r" (func), "c" (object) : "eax", "edx", "memory" ); +} + +static void dump_type( const cxx_type_info *type ) +{ + DPRINTF( "flags %x type %p", type->flags, type->type_info ); + if (type->type_info) DPRINTF( " (%p %s)", type->type_info->name, type->type_info->mangled ); + DPRINTF( " offset %d vbase %d,%d size %d copy ctor %p\n", type->this_offset, + type->vbase_descr, type->vbase_offset, type->size, type->copy_ctor ); +} + +static void dump_exception_type( const cxx_exception_type *type ) +{ + UINT i; + + DPRINTF( "exception type:\n" ); + DPRINTF( "flags %x destr %p handler %p type info %p\n", + type->flags, type->destructor, type->custom_handler, type->type_info_table ); + for (i = 0; i < type->type_info_table->count; i++) + { + DPRINTF( " %d: ", i ); + dump_type( type->type_info_table->info[i] ); + } +} + +static void dump_function_descr( const cxx_function_descr *descr, const cxx_exception_type *info ) +{ + UINT i; + int j; + + DPRINTF( "function descr:\n" ); + DPRINTF( "magic %x\n", descr->magic ); + DPRINTF( "unwind table: %p %d\n", descr->unwind_table, descr->unwind_count ); + for (i = 0; i < descr->unwind_count; i++) + { + DPRINTF( " %d: prev %d func %p\n", i, + descr->unwind_table[i].prev, descr->unwind_table[i].handler ); + } + DPRINTF( "try table: %p %d\n", descr->tryblock, descr->tryblock_count ); + for (i = 0; i < descr->tryblock_count; i++) + { + DPRINTF( " %d: start %d end %d catchlevel %d catch %p %d\n", i, + descr->tryblock[i].start_level, descr->tryblock[i].end_level, + descr->tryblock[i].catch_level, descr->tryblock[i].catchblock, + descr->tryblock[i].catchblock_count ); + for (j = 0; j < descr->tryblock[i].catchblock_count; j++) + { + catchblock_info *ptr = &descr->tryblock[i].catchblock[j]; + DPRINTF( " %d: flags %x offset %d handler %p type %p", + j, ptr->flags, ptr->offset, ptr->handler, ptr->type_info ); + if (ptr->type_info) DPRINTF( " (%p %s)", ptr->type_info->name, ptr->type_info->mangled ); + DPRINTF( "\n" ); + } + } +} + +/* compute the this pointer for a base class of a given type */ +static void *get_this_pointer( const cxx_type_info *type, void *object ) +{ + void *this_ptr; + int *offset_ptr; + + if (!object) return NULL; + this_ptr = (char *)object + type->this_offset; + if (type->vbase_descr >= 0) + { + /* move this ptr to vbase descriptor */ + this_ptr = (char *)this_ptr + type->vbase_descr; + /* and fetch additional offset from vbase descriptor */ + offset_ptr = (int *)(*(char **)this_ptr + type->vbase_offset); + this_ptr = (char *)this_ptr + *offset_ptr; + } + return this_ptr; +} + +/* check if the exception type is caught by a given catch block, and return the type that matched */ +static const cxx_type_info *find_caught_type( cxx_exception_type *exc_type, catchblock_info *catchblock ) +{ + UINT i; + + for (i = 0; i < exc_type->type_info_table->count; i++) + { + const cxx_type_info *type = exc_type->type_info_table->info[i]; + + if (!catchblock->type_info) return type; /* catch(...) matches any type */ + if (catchblock->type_info != type->type_info) + { + if (strcmp( catchblock->type_info->mangled, type->type_info->mangled )) continue; + } + /* type is the same, now check the flags */ + if ((exc_type->flags & TYPE_FLAG_CONST) && + !(catchblock->flags & TYPE_FLAG_CONST)) continue; + if ((exc_type->flags & TYPE_FLAG_VOLATILE) && + !(catchblock->flags & TYPE_FLAG_VOLATILE)) continue; + return type; /* it matched */ + } + return NULL; +} + + +/* copy the exception object where the catch block wants it */ +static void copy_exception( void *object, cxx_exception_frame *frame, + catchblock_info *catchblock, const cxx_type_info *type ) +{ + void **dest_ptr; + + if (!catchblock->type_info || !catchblock->type_info->mangled[0]) return; + if (!catchblock->offset) return; + dest_ptr = (void **)((char *)&frame->ebp + catchblock->offset); + + if (catchblock->flags & TYPE_FLAG_REFERENCE) + { + *dest_ptr = get_this_pointer( type, object ); + } + else if (type->flags & CLASS_IS_SIMPLE_TYPE) + { + memmove( dest_ptr, object, type->size ); + /* if it is a pointer, adjust it */ + if (type->size == sizeof(void *)) *dest_ptr = get_this_pointer( type, *dest_ptr ); + } + else /* copy the object */ + { + if (type->copy_ctor) + call_copy_ctor( type->copy_ctor, dest_ptr, get_this_pointer(type,object), + (type->flags & CLASS_HAS_VIRTUAL_BASE_CLASS) ); + else + memmove( dest_ptr, get_this_pointer(type,object), type->size ); + } +} + +/* unwind the local function up to a given trylevel */ +static void cxx_local_unwind( cxx_exception_frame* frame, cxx_function_descr *descr, int last_level) +{ + void (*handler)(); + int trylevel = frame->trylevel; + + while (trylevel != last_level) + { + if (trylevel < 0 || trylevel >= descr->unwind_count) + { + ERR( "invalid trylevel %d\n", trylevel ); + MSVCRT_terminate(); + } + handler = descr->unwind_table[trylevel].handler; + if (handler) + { + TRACE( "calling unwind handler %p trylevel %d last %d ebp %p\n", + handler, trylevel, last_level, &frame->ebp ); + call_ebp_func( handler, &frame->ebp ); + } + trylevel = descr->unwind_table[trylevel].prev; + } + frame->trylevel = last_level; +} + +/* exception frame for nested exceptions in catch block */ +struct catch_func_nested_frame +{ + EXCEPTION_REGISTRATION_RECORD frame; /* standard exception frame */ + EXCEPTION_RECORD *prev_rec; /* previous record to restore in thread data */ + cxx_exception_frame *cxx_frame; /* frame of parent exception */ + cxx_function_descr *descr; /* descriptor of parent exception */ + int trylevel; /* current try level */ +}; + +/* handler for exceptions happening while calling a catch function */ +static DWORD catch_function_nested_handler( EXCEPTION_RECORD *rec, EXCEPTION_REGISTRATION_RECORD *frame, + CONTEXT *context, EXCEPTION_REGISTRATION_RECORD **dispatcher ) +{ + struct catch_func_nested_frame *nested_frame = (struct catch_func_nested_frame *)frame; + + if (rec->ExceptionFlags & (EH_UNWINDING | EH_EXIT_UNWIND)) + { + msvcrt_get_thread_data()->exc_record = nested_frame->prev_rec; + return ExceptionContinueSearch; + } + else + { + TRACE( "got nested exception in catch function\n" ); + return cxx_frame_handler( rec, nested_frame->cxx_frame, context, + NULL, nested_frame->descr, &nested_frame->frame, + nested_frame->trylevel, context ); + } +} + +/* find and call the appropriate catch block for an exception */ +/* returns the address to continue execution to after the catch block was called */ +inline static void *call_catch_block( PEXCEPTION_RECORD rec, cxx_exception_frame *frame, + cxx_function_descr *descr, int nested_trylevel, + cxx_exception_type *info ) +{ + UINT i; + int j; + void *addr, *object = (void *)rec->ExceptionInformation[1]; + struct catch_func_nested_frame nested_frame; + int trylevel = frame->trylevel; + MSVCRT_thread_data *thread_data = msvcrt_get_thread_data(); + + for (i = 0; i < descr->tryblock_count; i++) + { + tryblock_info *tryblock = &descr->tryblock[i]; + + if (trylevel < tryblock->start_level) continue; + if (trylevel > tryblock->end_level) continue; + + /* got a try block */ + for (j = 0; j < tryblock->catchblock_count; j++) + { + catchblock_info *catchblock = &tryblock->catchblock[j]; + const cxx_type_info *type = find_caught_type( info, catchblock ); + if (!type) continue; + + TRACE( "matched type %p in tryblock %d catchblock %d\n", type, i, j ); + + /* copy the exception to its destination on the stack */ + copy_exception( object, frame, catchblock, type ); + + /* unwind the stack */ + RtlUnwind( frame, 0, rec, 0 ); + cxx_local_unwind( frame, descr, tryblock->start_level ); + frame->trylevel = tryblock->end_level + 1; + + /* call the catch block */ + TRACE( "calling catch block %p for type %p addr %p ebp %p\n", + catchblock, type, catchblock->handler, &frame->ebp ); + + /* setup an exception block for nested exceptions */ + + //nested_frame.frame.Handler = catch_function_nested_handler; + nested_frame.frame.handler = (PEXCEPTION_HANDLER)catch_function_nested_handler; + nested_frame.prev_rec = thread_data->exc_record; + nested_frame.cxx_frame = frame; + nested_frame.descr = descr; + nested_frame.trylevel = nested_trylevel + 1; + + __wine_push_frame( &nested_frame.frame ); + thread_data->exc_record = rec; + addr = call_ebp_func( catchblock->handler, &frame->ebp ); + thread_data->exc_record = nested_frame.prev_rec; + __wine_pop_frame( &nested_frame.frame ); + + if (info->destructor) call_dtor( info->destructor, object ); + TRACE( "done, continuing at %p\n", addr ); + return addr; + } + } + return NULL; +} + + +/********************************************************************* + * cxx_frame_handler + * + * Implementation of __CxxFrameHandler. + */ +static DWORD cxx_frame_handler( PEXCEPTION_RECORD rec, cxx_exception_frame* frame, + PCONTEXT exc_context, EXCEPTION_REGISTRATION_RECORD** dispatch, + cxx_function_descr *descr, EXCEPTION_REGISTRATION_RECORD* nested_frame, + int nested_trylevel, CONTEXT86 *context ) +{ + cxx_exception_type *exc_type; + void *next_ip; + + if (descr->magic != CXX_FRAME_MAGIC) + { + ERR( "invalid frame magic %x\n", descr->magic ); + return ExceptionContinueSearch; + } + if (rec->ExceptionFlags & (EH_UNWINDING|EH_EXIT_UNWIND)) + { + if (descr->unwind_count && !nested_trylevel) cxx_local_unwind( frame, descr, -1 ); + return ExceptionContinueSearch; + } + if (!descr->tryblock_count) return ExceptionContinueSearch; + + exc_type = (cxx_exception_type *)rec->ExceptionInformation[2]; + if (rec->ExceptionCode == CXX_EXCEPTION && + rec->ExceptionInformation[0] > CXX_FRAME_MAGIC && + exc_type->custom_handler) + { + return exc_type->custom_handler( rec, frame, exc_context, dispatch, + descr, nested_trylevel, nested_frame, 0 ); + } + + if (!exc_type) /* nested exception, fetch info from original exception */ + { + rec = msvcrt_get_thread_data()->exc_record; + exc_type = (cxx_exception_type *)rec->ExceptionInformation[2]; + } + + if (TRACE_ON(seh)) + { + TRACE("handling C++ exception rec %p frame %p trylevel %d descr %p nested_frame %p\n", + rec, frame, frame->trylevel, descr, nested_frame ); + dump_exception_type( exc_type ); + dump_function_descr( descr, exc_type ); + } + + next_ip = call_catch_block( rec, frame, descr, frame->trylevel, exc_type ); + + if (!next_ip) return ExceptionContinueSearch; + rec->ExceptionFlags &= ~EH_NONCONTINUABLE; + context->Eip = (DWORD)next_ip; + context->Ebp = (DWORD)&frame->ebp; + context->Esp = ((DWORD*)frame)[-1]; + return ExceptionContinueExecution; +} + + +/********************************************************************* + * __CxxFrameHandler (MSVCRT.@) + */ +void __CxxFrameHandler( PEXCEPTION_RECORD rec, EXCEPTION_REGISTRATION_RECORD* frame, + PCONTEXT exc_context, EXCEPTION_REGISTRATION_RECORD** dispatch, + CONTEXT86 *context ) +{ + cxx_function_descr *descr = (cxx_function_descr *)context->Eax; + context->Eax = cxx_frame_handler( rec, (cxx_exception_frame *)frame, + exc_context, dispatch, descr, NULL, 0, context ); +} +//DEFINE_REGS_ENTRYPOINT( __CxxFrameHandler, MSVCRT__CxxFrameHandler, 16, 0 ); +// ROS +#endif /* __i386__ */ + +/********************************************************************* + * _CxxThrowException (MSVCRT.@) + */ +void _CxxThrowException( void *object, const cxx_exception_type *type ) +{ + DWORD args[3]; + + args[0] = CXX_FRAME_MAGIC; + args[1] = (DWORD)object; + args[2] = (DWORD)type; + RaiseException( CXX_EXCEPTION, EH_NONCONTINUABLE, 3, args ); +} + +/********************************************************************* + * __CxxDetectRethrow (MSVCRT.@) + */ +BOOL __CxxDetectRethrow(PEXCEPTION_POINTERS ptrs) +{ + PEXCEPTION_RECORD rec; + + if (!ptrs) + return FALSE; + + rec = ptrs->ExceptionRecord; + + if (rec->ExceptionCode == CXX_EXCEPTION && + rec->NumberParameters == 3 && + rec->ExceptionInformation[0] == CXX_FRAME_MAGIC && + rec->ExceptionInformation[2]) + { + ptrs->ExceptionRecord = msvcrt_get_thread_data()->exc_record; + return TRUE; + } + return (msvcrt_get_thread_data()->exc_record == rec); +} + +/********************************************************************* + * __CxxQueryExceptionSize (MSVCRT.@) + */ +unsigned int __CxxQueryExceptionSize(void) +{ + return sizeof(cxx_exception_type); +} diff --git a/reactos/lib/crt/wine/heap.c b/reactos/lib/crt/wine/heap.c new file mode 100644 index 00000000000..54f7a762ae7 --- /dev/null +++ b/reactos/lib/crt/wine/heap.c @@ -0,0 +1,131 @@ +/* + * msvcrt.dll heap functions + * + * Copyright 2000 Jon Griffiths + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Note: Win32 heap operations are MT safe. We only lock the new + * handler and non atomic heap operations + */ + +#include "precomp.h" + +#include "msvcrt/errno.h" +#include "msvcrt/malloc.h" +#include "msvcrt/stdlib.h" +#include + +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(msvcrt); + +/* MT */ +#define LOCK_HEAP _mlock( _HEAP_LOCK ) +#define UNLOCK_HEAP _munlock( _HEAP_LOCK ) + + +typedef void (*MSVCRT_new_handler_func)(unsigned long size); + +static MSVCRT_new_handler_func MSVCRT_new_handler; +static int MSVCRT_new_mode; + + +/********************************************************************* + * ??2@YAPAXI@Z (MSVCRT.@) + */ +void* MSVCRT_operator_new(unsigned long size) +{ + void *retval = malloc(size); + TRACE("(%ld) returning %p\n", size, retval); + LOCK_HEAP; + if(!retval && MSVCRT_new_handler) + (*MSVCRT_new_handler)(size); + UNLOCK_HEAP; + return retval; +} + +/********************************************************************* + * ??3@YAXPAX@Z (MSVCRT.@) + */ +void MSVCRT_operator_delete(void *mem) +{ + TRACE("(%p)\n", mem); + free(mem); +} + + +/********************************************************************* + * ?_query_new_handler@@YAP6AHI@ZXZ (MSVCRT.@) + */ +MSVCRT_new_handler_func MSVCRT__query_new_handler(void) +{ + return MSVCRT_new_handler; +} + + +/********************************************************************* + * ?_query_new_mode@@YAHXZ (MSVCRT.@) + */ +int MSVCRT__query_new_mode(void) +{ + return MSVCRT_new_mode; +} + +/********************************************************************* + * ?_set_new_handler@@YAP6AHI@ZP6AHI@Z@Z (MSVCRT.@) + */ +MSVCRT_new_handler_func MSVCRT__set_new_handler(MSVCRT_new_handler_func func) +{ + MSVCRT_new_handler_func old_handler; + LOCK_HEAP; + old_handler = MSVCRT_new_handler; + MSVCRT_new_handler = func; + UNLOCK_HEAP; + return old_handler; +} + +/********************************************************************* + * ?set_new_handler@@YAP6AXXZP6AXXZ@Z (MSVCRT.@) + */ +MSVCRT_new_handler_func MSVCRT_set_new_handler(void *func) +{ + TRACE("(%p)\n",func); + MSVCRT__set_new_handler(NULL); + return NULL; +} + +/********************************************************************* + * ?_set_new_mode@@YAHH@Z (MSVCRT.@) + */ +int MSVCRT__set_new_mode(int mode) +{ + int old_mode; + LOCK_HEAP; + old_mode = MSVCRT_new_mode; + MSVCRT_new_mode = mode; + UNLOCK_HEAP; + return old_mode; +} + +/********************************************************************* + * _heapadd (MSVCRT.@) + */ +int _heapadd(void* mem, size_t size) +{ + TRACE("(%p,%d) unsupported in Win32\n", mem,size); + *_errno() = ENOSYS; + return -1; +} diff --git a/reactos/lib/crt/wine/thread.c b/reactos/lib/crt/wine/thread.c new file mode 100644 index 00000000000..f8b9a579574 --- /dev/null +++ b/reactos/lib/crt/wine/thread.c @@ -0,0 +1,108 @@ +/* + * msvcrt.dll thread functions + * + * Copyright 2000 Jon Griffiths + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "precomp.h" +#include + +#include "msvcrt/malloc.h" +#include "msvcrt/process.h" + +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(msvcrt); + +void _amsg_exit (int errnum); +/* Index to TLS */ +DWORD MSVCRT_tls_index; + +typedef void (*_beginthread_start_routine_t)(void *); +typedef unsigned int (__stdcall *_beginthreadex_start_routine_t)(void *); + +/********************************************************************/ + +typedef struct { + _beginthread_start_routine_t start_address; + void *arglist; +} _beginthread_trampoline_t; + +/********************************************************************* + * msvcrt_get_thread_data + * + * Return the thread local storage structure. + */ +MSVCRT_thread_data *msvcrt_get_thread_data(void) +{ + MSVCRT_thread_data *ptr; + DWORD err = GetLastError(); /* need to preserve last error */ + + if (!(ptr = TlsGetValue( MSVCRT_tls_index ))) + { + if (!(ptr = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*ptr) ))) + _amsg_exit( _RT_THREAD ); + if (!TlsSetValue( MSVCRT_tls_index, ptr )) + _amsg_exit( _RT_THREAD ); + if (!TlsSetValue( MSVCRT_tls_index, ptr )) + _amsg_exit( _RT_THREAD ); + } + SetLastError( err ); + return ptr; +} + +/********************************************************************* + * _beginthread_trampoline + */ +static DWORD CALLBACK _beginthread_trampoline(LPVOID arg) +{ + _beginthread_trampoline_t local_trampoline; + + /* Maybe it's just being paranoid, but freeing arg right + * away seems safer. + */ + memcpy(&local_trampoline,arg,sizeof(local_trampoline)); + free(arg); + + local_trampoline.start_address(local_trampoline.arglist); + return 0; +} + +/********************************************************************* + * _beginthread (MSVCRT.@) + */ +unsigned long _beginthread( + _beginthread_start_routine_t start_address, /* [in] Start address of routine that begins execution of new thread */ + unsigned int stack_size, /* [in] Stack size for new thread or 0 */ + void *arglist) /* [in] Argument list to be passed to new thread or NULL */ +{ + _beginthread_trampoline_t* trampoline; + + TRACE("(%p, %d, %p)\n", start_address, stack_size, arglist); + + /* Allocate the trampoline here so that it is still valid when the thread + * starts... typically after this function has returned. + * _beginthread_trampoline is responsible for freeing the trampoline + */ + trampoline=malloc(sizeof(*trampoline)); + trampoline->start_address = start_address; + trampoline->arglist = arglist; + + /* FIXME */ + return (unsigned long)CreateThread(NULL, stack_size, _beginthread_trampoline, + trampoline, 0, NULL); +} diff --git a/reactos/lib/crt/wstring/wcscoll.c b/reactos/lib/crt/wstring/wcscoll.c new file mode 100644 index 00000000000..e1c27270ed2 --- /dev/null +++ b/reactos/lib/crt/wstring/wcscoll.c @@ -0,0 +1,38 @@ + +#include + +/* + * @unimplemented + */ +int wcscoll(const wchar_t *a1,const wchar_t *a2) +{ + /* FIXME: handle collates */ + return wcscmp(a1,a2); +} + +/* + * @unimplemented + */ +int _wcsicoll(const wchar_t *a1,const wchar_t *a2) +{ + /* FIXME: handle collates */ + return _wcsicmp(a1,a2); +} + +/* + * @unimplemented + */ +int _wcsncoll (const wchar_t *s1, const wchar_t *s2, size_t c) +{ + /* FIXME: handle collates */ + return wcsncmp(s1,s2,c); +} + +/* + * @unimplemented + */ +int _wcsnicoll (const wchar_t *s1, const wchar_t *s2, size_t c) +{ + /* FIXME: handle collates */ + return _wcsnicmp(s1,s2,c); +} diff --git a/reactos/lib/crt/wstring/wcscspn.c b/reactos/lib/crt/wstring/wcscspn.c new file mode 100644 index 00000000000..44f66b70b61 --- /dev/null +++ b/reactos/lib/crt/wstring/wcscspn.c @@ -0,0 +1,23 @@ +#include + +/* + * @implemented + */ +size_t wcscspn(const wchar_t *str,const wchar_t *reject) +{ + wchar_t *s; + wchar_t *t; + s=(wchar_t *)str; + do { + t=(wchar_t *)reject; + while (*t) { + if (*t==*s) + break; + t++; + } + if (*t) + break; + s++; + } while (*s); + return s-str; /* nr of wchars */ +} diff --git a/reactos/lib/crt/wstring/wcsdup.c b/reactos/lib/crt/wstring/wcsdup.c new file mode 100644 index 00000000000..9c150a44acb --- /dev/null +++ b/reactos/lib/crt/wstring/wcsdup.c @@ -0,0 +1,21 @@ +#include +#include +#include +#include + + +/* + * @implemented + */ +wchar_t* _wcsdup(const wchar_t* ptr) +{ + wchar_t* dup; + + dup = malloc((wcslen(ptr) + 1) * sizeof(wchar_t)); + if (dup == NULL) { + __set_errno(ENOMEM); + return NULL; + } + wcscpy(dup, ptr); + return dup; +} diff --git a/reactos/lib/crt/wstring/wcsicmp.c b/reactos/lib/crt/wstring/wcsicmp.c new file mode 100644 index 00000000000..82feea78558 --- /dev/null +++ b/reactos/lib/crt/wstring/wcsicmp.c @@ -0,0 +1,20 @@ +/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ + +#include +#include + + +/* + * @implemented + */ +int _wcsicmp(const wchar_t* cs,const wchar_t * ct) +{ + while (towlower(*cs) == towlower(*ct)) + { + if (*cs == 0) + return 0; + cs++; + ct++; + } + return towlower(*cs) - towlower(*ct); +} diff --git a/reactos/lib/crt/wstring/wcslwr.c b/reactos/lib/crt/wstring/wcslwr.c new file mode 100644 index 00000000000..176af2fceeb --- /dev/null +++ b/reactos/lib/crt/wstring/wcslwr.c @@ -0,0 +1,25 @@ +/* + * The C RunTime DLL + * + * Implements C run-time functionality as known from UNIX. + * + * Copyright 1996,1998 Marcus Meissner + * Copyright 1996 Jukka Iivonen + * Copyright 1997 Uwe Bonnes + */ + +#include + +/* + * @implemented + */ +wchar_t * _wcslwr(wchar_t *x) +{ + wchar_t *y=x; + + while (*y) { + *y=towlower(*y); + y++; + } + return x; +} diff --git a/reactos/lib/crt/wstring/wcsnicmp.c b/reactos/lib/crt/wstring/wcsnicmp.c new file mode 100644 index 00000000000..4a99c8c492a --- /dev/null +++ b/reactos/lib/crt/wstring/wcsnicmp.c @@ -0,0 +1,17 @@ +#include + +/* + * @implemented + */ +int _wcsnicmp (const wchar_t *cs, const wchar_t *ct, size_t count) +{ + if (count == 0) + return 0; + do { + if (towupper(*cs) != towupper(*ct++)) + return towupper(*cs) - towupper(*--ct); + if (*cs++ == 0) + break; + } while (--count != 0); + return 0; +} diff --git a/reactos/lib/crt/wstring/wcspbrk.c b/reactos/lib/crt/wstring/wcspbrk.c new file mode 100644 index 00000000000..e65ec33c2e0 --- /dev/null +++ b/reactos/lib/crt/wstring/wcspbrk.c @@ -0,0 +1,19 @@ +#include + +/* + * @implemented + */ +wchar_t *wcspbrk(const wchar_t *s1, const wchar_t *s2) +{ + const wchar_t *scanp; + int c, sc; + + while ((c = *s1++) != 0) + { + for (scanp = s2; (sc = *scanp++) != 0;) + if (sc == c) { + return (wchar_t *)(--s1); + } + } + return 0; +} diff --git a/reactos/lib/crt/wstring/wcsrev.c b/reactos/lib/crt/wstring/wcsrev.c new file mode 100644 index 00000000000..4c213c5bf62 --- /dev/null +++ b/reactos/lib/crt/wstring/wcsrev.c @@ -0,0 +1,21 @@ +#include + +/* + * @implemented + */ +wchar_t * _wcsrev(wchar_t *s) +{ + wchar_t *e; + wchar_t a; + e=s; + while (*e) + e++; + while (s + +/* + * @implemented + */ +wchar_t* _wcsnset (wchar_t* wsToFill, wchar_t wcFill, size_t sizeMaxFill) +{ + wchar_t *t = wsToFill; + int i = 0; + while( *wsToFill != 0 && i < sizeMaxFill) + { + *wsToFill = wcFill; + wsToFill++; + i++; + + } + return t; +} + +/* + * @implemented + */ +wchar_t* _wcsset (wchar_t* wsToFill, wchar_t wcFill) +{ + wchar_t *t = wsToFill; + while( *wsToFill != 0 ) + { + *wsToFill = wcFill; + wsToFill++; + + } + return t; +} diff --git a/reactos/lib/crt/wstring/wcsspn.c b/reactos/lib/crt/wstring/wcsspn.c new file mode 100644 index 00000000000..1025c8c1c2a --- /dev/null +++ b/reactos/lib/crt/wstring/wcsspn.c @@ -0,0 +1,23 @@ +#include + +/* + * @implemented + */ +size_t wcsspn(const wchar_t *str,const wchar_t *accept) +{ + wchar_t *s; + wchar_t *t; + s=(wchar_t *)str; + do { + t=(wchar_t *)accept; + while (*t) { + if (*t==*s) + break; + t++; + } + if (!*t) + break; + s++; + } while (*s); + return s-str; /* nr of wchars */ +} diff --git a/reactos/lib/crt/wstring/wcsstr.c b/reactos/lib/crt/wstring/wcsstr.c new file mode 100644 index 00000000000..7167f946c56 --- /dev/null +++ b/reactos/lib/crt/wstring/wcsstr.c @@ -0,0 +1,26 @@ +#include + +/* + * @implemented + */ +wchar_t *wcsstr(const wchar_t *s,const wchar_t *b) +{ + wchar_t *x; + wchar_t *y; + wchar_t *c; + x=(wchar_t *)s; + while (*x) { + if (*x==*b) { + y=x; + c=(wchar_t *)b; + while (*y && *c && *y==*c) { + c++; + y++; + } + if (!*c) + return x; + } + x++; + } + return NULL; +} diff --git a/reactos/lib/crt/wstring/wcstok.c b/reactos/lib/crt/wstring/wcstok.c new file mode 100644 index 00000000000..72cc6000a7c --- /dev/null +++ b/reactos/lib/crt/wstring/wcstok.c @@ -0,0 +1,62 @@ +#include +#include + +wchar_t** _wlasttoken(); /* wlasttok.c */ + +/* + * @implemented + */ +wchar_t *wcstok(wchar_t *s, const wchar_t *ct) +{ + const wchar_t *spanp; + int c, sc; + wchar_t *tok; +#if 1 + wchar_t ** wlasttoken = _wlasttoken(); +#else + PTHREADDATA ThreadData = GetThreadData(); + wchar_t ** wlasttoken = &ThreadData->wlasttoken; +#endif + + if (s == NULL && (s = *wlasttoken) == NULL) + return (NULL); + + /* + * Skip (span) leading ctiters (s += strspn(s, ct), sort of). + */ + cont: + c = *s; + s++; + for (spanp = ct; (sc = *spanp) != 0;spanp++) { + if (c == sc) + goto cont; + } + + if (c == 0) { /* no non-ctiter characters */ + *wlasttoken = NULL; + return (NULL); + } + tok = s - 1; + + /* + * Scan token (scan for ctiters: s += strcspn(s, ct), sort of). + * Note that ct must have one NUL; we stop if we see that, too. + */ + for (;;) { + c = *s; + s++; + spanp = ct; + do { + if ((sc = *spanp) == c) { + if (c == 0) + s = NULL; + else + s[-1] = 0; + *wlasttoken = s; + return (tok); + } + spanp++; + } while (sc != 0); + } + /* NOTREACHED */ +} diff --git a/reactos/lib/crt/wstring/wcsupr.c b/reactos/lib/crt/wstring/wcsupr.c new file mode 100644 index 00000000000..4a5dd8ad198 --- /dev/null +++ b/reactos/lib/crt/wstring/wcsupr.c @@ -0,0 +1,16 @@ +#include +#include + +/* + * @implemented + */ +wchar_t *_wcsupr(wchar_t *x) +{ + wchar_t *y = x; + + while (*y) { + *y = towupper(*y); + y++; + } + return x; +} diff --git a/reactos/lib/crt/wstring/wcsxfrm.c b/reactos/lib/crt/wstring/wcsxfrm.c new file mode 100644 index 00000000000..9e5cb52ac99 --- /dev/null +++ b/reactos/lib/crt/wstring/wcsxfrm.c @@ -0,0 +1,26 @@ +#include + +/* + * @implemented + */ +size_t wcsxfrm(wchar_t *dst,const wchar_t *src, size_t n) +{ + size_t r = 0; + int c; + + if (n != 0) { + while ((c = *src++) != 0) + { + r++; + if (--n == 0) + { + while (*src++ != 0) + r++; + break; + } + *dst++ = c; + } + *dst = 0; + } + return r; +} diff --git a/reactos/lib/crt/wstring/wlasttok.c b/reactos/lib/crt/wstring/wlasttok.c new file mode 100644 index 00000000000..fcc80c06d0e --- /dev/null +++ b/reactos/lib/crt/wstring/wlasttok.c @@ -0,0 +1,14 @@ +#include +#include +/* + * This is an MSVCRT internal function to return the lasttoken + * bit of data used by wcstok. The reason for it's existence is + * so that CRTDLL can use the wcstok source code in the same + * file. + */ +wchar_t** _wlasttoken() +{ + PTHREADDATA ptd = GetThreadData(); + assert(ptd); + return &(ptd->wlasttoken); +} From 4b5d7852584eb57c9de5bb51e50e987c7f4f8c13 Mon Sep 17 00:00:00 2001 From: Gunnar Dalsnes Date: Thu, 27 Jan 2005 21:23:43 +0000 Subject: [PATCH 045/185] build msvcrt and crtdll from same source via lib\crt fix problem with scanf/printf reading/printing doubles svn path=/trunk/; revision=13343 --- reactos/Makefile | 2 +- reactos/include/msvcrt/internal/file.h | 2 + reactos/include/msvcrt/wine/cppexcept.h | 124 +++++++++++++++++++++++ reactos/include/msvcrt/wine/eh.h | 53 ++++++++++ reactos/include/msvcrt/wine/msvcrt.h | 128 ++++++++++++++++++++++++ 5 files changed, 308 insertions(+), 1 deletion(-) create mode 100644 reactos/include/msvcrt/wine/cppexcept.h create mode 100644 reactos/include/msvcrt/wine/eh.h create mode 100644 reactos/include/msvcrt/wine/msvcrt.h diff --git a/reactos/Makefile b/reactos/Makefile index 052718c2a0f..295fd800933 100644 --- a/reactos/Makefile +++ b/reactos/Makefile @@ -42,7 +42,7 @@ BUS = acpi isapnp pci LIB_FSLIB = vfatlib # Static libraries -LIB_STATIC = string rosrtl epsapi uuid libwine zlib rtl tgetopt pseh adns dxguid strmiids +LIB_STATIC = string rosrtl epsapi uuid libwine zlib rtl tgetopt pseh adns dxguid strmiids crt # Keyboard layout libraries DLLS_KBD = kbdda kbddv kbdes kbdfr kbdgr kbdse kbduk kbdus diff --git a/reactos/include/msvcrt/internal/file.h b/reactos/include/msvcrt/internal/file.h index 73358805391..6630ffa66d3 100644 --- a/reactos/include/msvcrt/internal/file.h +++ b/reactos/include/msvcrt/internal/file.h @@ -70,6 +70,8 @@ extern __file_rec* __file_rec_list; void _dosmaperr(unsigned long oserrcode); +extern int __fmode; + #ifdef __cplusplus } #endif diff --git a/reactos/include/msvcrt/wine/cppexcept.h b/reactos/include/msvcrt/wine/cppexcept.h new file mode 100644 index 00000000000..3a822ed9ec0 --- /dev/null +++ b/reactos/include/msvcrt/wine/cppexcept.h @@ -0,0 +1,124 @@ +/* + * msvcrt C++ exception handling + * + * Copyright 2002 Alexandre Julliard + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef __MSVCRT_CPPEXCEPT_H +#define __MSVCRT_CPPEXCEPT_H + +#define CXX_FRAME_MAGIC 0x19930520 +#define CXX_EXCEPTION 0xe06d7363 + +typedef void (*vtable_ptr)(); + +/* type_info object, see cpp.c for inplementation */ +typedef struct __type_info +{ + vtable_ptr *vtable; + char *name; /* Unmangled name, allocated lazily */ + char mangled[32]; /* Variable length, but we declare it large enough for static RTTI */ +} type_info; + +/* the exception frame used by CxxFrameHandler */ +typedef struct __cxx_exception_frame +{ + EXCEPTION_REGISTRATION_RECORD frame; /* the standard exception frame */ + int trylevel; + DWORD ebp; +} cxx_exception_frame; + +/* info about a single catch {} block */ +typedef struct __catchblock_info +{ + UINT flags; /* flags (see below) */ + type_info *type_info; /* C++ type caught by this block */ + int offset; /* stack offset to copy exception object to */ + void (*handler)(); /* catch block handler code */ +} catchblock_info; +#define TYPE_FLAG_CONST 1 +#define TYPE_FLAG_VOLATILE 2 +#define TYPE_FLAG_REFERENCE 8 + +/* info about a single try {} block */ +typedef struct __tryblock_info +{ + int start_level; /* start trylevel of that block */ + int end_level; /* end trylevel of that block */ + int catch_level; /* initial trylevel of the catch block */ + int catchblock_count; /* count of catch blocks in array */ + catchblock_info *catchblock; /* array of catch blocks */ +} tryblock_info; + +/* info about the unwind handler for a given trylevel */ +typedef struct __unwind_info +{ + int prev; /* prev trylevel unwind handler, to run after this one */ + void (*handler)(); /* unwind handler */ +} unwind_info; + +/* descriptor of all try blocks of a given function */ +typedef struct __cxx_function_descr +{ + UINT magic; /* must be CXX_FRAME_MAGIC */ + UINT unwind_count; /* number of unwind handlers */ + unwind_info *unwind_table; /* array of unwind handlers */ + UINT tryblock_count; /* number of try blocks */ + tryblock_info *tryblock; /* array of try blocks */ + UINT unknown[3]; +} cxx_function_descr; + +typedef void (*cxx_copy_ctor)(void); + +/* complete information about a C++ type */ +typedef struct __cxx_type_info +{ + UINT flags; /* flags (see CLASS_* flags below) */ + type_info *type_info; /* C++ type info */ + int this_offset; /* offset of base class this pointer from start of object */ + int vbase_descr; /* offset of virtual base class descriptor */ + int vbase_offset; /* offset of this pointer offset in virtual base class descriptor */ + size_t size; /* object size */ + cxx_copy_ctor copy_ctor; /* copy constructor */ +} cxx_type_info; +#define CLASS_IS_SIMPLE_TYPE 1 +#define CLASS_HAS_VIRTUAL_BASE_CLASS 4 + +/* table of C++ types that apply for a given object */ +typedef struct __cxx_type_info_table +{ + UINT count; /* number of types */ + const cxx_type_info *info[3]; /* variable length, we declare it large enough for static RTTI */ +} cxx_type_info_table; + +typedef DWORD (*cxx_exc_custom_handler)( PEXCEPTION_RECORD, cxx_exception_frame*, + PCONTEXT, EXCEPTION_REGISTRATION_RECORD**, + cxx_function_descr*, int nested_trylevel, + EXCEPTION_REGISTRATION_RECORD *nested_frame, DWORD unknown3 ); + +/* type information for an exception object */ +typedef struct __cxx_exception_type +{ + UINT flags; /* TYPE_FLAG flags */ + void (*destructor)(); /* exception object destructor */ + cxx_exc_custom_handler custom_handler; /* custom handler for this exception */ + const cxx_type_info_table *type_info_table; /* list of types for this exception object */ +} cxx_exception_type; + +void _CxxThrowException(void*,const cxx_exception_type*); + +#endif /* __MSVCRT_CPPEXCEPT_H */ diff --git a/reactos/include/msvcrt/wine/eh.h b/reactos/include/msvcrt/wine/eh.h new file mode 100644 index 00000000000..14201fb0676 --- /dev/null +++ b/reactos/include/msvcrt/wine/eh.h @@ -0,0 +1,53 @@ +/* + * C++ exception handling facility + * + * Copyright 2000 Francois Gouget. + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#ifndef __WINE_EH_H +#define __WINE_EH_H +#ifndef __WINE_USE_MSVCRT +#define __WINE_USE_MSVCRT +#endif + +#if !defined(__cplusplus) && !defined(USE_MSVCRT_PREFIX) +#error "eh.h is meant only for C++ applications" +#endif + +#ifndef MSVCRT +# ifdef USE_MSVCRT_PREFIX +# define MSVCRT(x) MSVCRT_##x +# else +# define MSVCRT(x) x +# endif +#endif + +struct _EXCEPTION_POINTERS; + +typedef void (*terminate_handler)(); +typedef void (*terminate_function)(); +typedef void (*unexpected_handler)(); +typedef void (*unexpected_function)(); +typedef void (*_se_translator_function)(unsigned int code, struct _EXCEPTION_POINTERS *info); + +terminate_function MSVCRT(set_terminate)(terminate_function func); +unexpected_function MSVCRT(set_unexpected)(unexpected_function func); +_se_translator_function MSVCRT(_set_se_translator)(_se_translator_function func); + +void MSVCRT(terminate)(); +void MSVCRT(unexpected)(); + +#endif /* __WINE_EH_H */ diff --git a/reactos/include/msvcrt/wine/msvcrt.h b/reactos/include/msvcrt/wine/msvcrt.h new file mode 100644 index 00000000000..d6ae272a5d9 --- /dev/null +++ b/reactos/include/msvcrt/wine/msvcrt.h @@ -0,0 +1,128 @@ +/* + * Copyright 2001 Jon Griffiths + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef __WINE_MSVCRT_H +#define __WINE_MSVCRT_H + +#include +#include +#include + +#include "windef.h" +#include "winbase.h" +#include "winerror.h" +#include "winnls.h" + +#include "msvcrt/string.h" +#include "eh.h" + +/* TLS data */ +extern DWORD MSVCRT_tls_index; + +typedef struct __MSVCRT_thread_data +{ + int _errno; // ros + unsigned long doserrno; + char *mbstok_next; /* next ptr for mbstok() */ + char *efcvt_buffer; /* buffer for ecvt/fcvt */ + terminate_function terminate_handler; + unexpected_function unexpected_handler; + _se_translator_function se_translator; + EXCEPTION_RECORD *exc_record; +} MSVCRT_thread_data; + +extern MSVCRT_thread_data *msvcrt_get_thread_data(void); + +extern int MSVCRT_current_lc_all_cp; + +void _purecall(void); +void MSVCRT__set_errno(int); +char* msvcrt_strndup(const char*,unsigned int); +#ifndef __REACTOS__ +MSVCRT_wchar_t *msvcrt_wstrndup(const MSVCRT_wchar_t*, unsigned int); +#endif +void MSVCRT__amsg_exit(int errnum); + +extern char **MSVCRT__environ; +#ifndef __REACTOS__ +extern MSVCRT_wchar_t **MSVCRT__wenviron; +extern char ** msvcrt_SnapshotOfEnvironmentA(char **); +extern MSVCRT_wchar_t ** msvcrt_SnapshotOfEnvironmentW(MSVCRT_wchar_t **); +#endif + +/* FIXME: This should be declared in new.h but it's not an extern "C" so + * it would not be much use anyway. Even for Winelib applications. + */ +int MSVCRT__set_new_mode(int mode); + +void* MSVCRT_operator_new(unsigned long size); +void MSVCRT_operator_delete(void*); +#ifndef __REACTOS__ +typedef void* (*MSVCRT_malloc_func)(MSVCRT_size_t); +#endif +typedef void (*MSVCRT_free_func)(void*); +#ifndef __REACTOS__ +extern char* MSVCRT___unDName(int,const char*,int,MSVCRT_malloc_func,MSVCRT_free_func,unsigned int); +#endif + +/* Setup and teardown multi threaded locks */ +extern void msvcrt_init_mt_locks(void); +extern void msvcrt_free_mt_locks(void); + +extern void msvcrt_init_io(void); +extern void msvcrt_free_io(void); +extern void msvcrt_init_console(void); +extern void msvcrt_free_console(void); +extern void msvcrt_init_args(void); +extern void msvcrt_free_args(void); + +/* run-time error codes */ +#define _RT_STACK 0 +#define _RT_NULLPTR 1 +#define _RT_FLOAT 2 +#define _RT_INTDIV 3 +#define _RT_EXECMEM 5 +#define _RT_EXECFORM 6 +#define _RT_EXECENV 7 +#define _RT_SPACEARG 8 +#define _RT_SPACEENV 9 +#define _RT_ABORT 10 +#define _RT_NPTR 12 +#define _RT_FPTR 13 +#define _RT_BREAK 14 +#define _RT_INT 15 +#define _RT_THREAD 16 +#define _RT_LOCK 17 +#define _RT_HEAP 18 +#define _RT_OPENCON 19 +#define _RT_QWIN 20 +#define _RT_NOMAIN 21 +#define _RT_NONCONT 22 +#define _RT_INVALDISP 23 +#define _RT_ONEXIT 24 +#define _RT_PUREVIRT 25 +#define _RT_STDIOINIT 26 +#define _RT_LOWIOINIT 27 +#define _RT_HEAPINIT 28 +#define _RT_DOMAIN 120 +#define _RT_SING 121 +#define _RT_TLOSS 122 +#define _RT_CRNL 252 +#define _RT_BANNER 255 + +#endif /* __WINE_MSVCRT_H */ From d2f23650e6f329d8bc94985d21871dd076364597 Mon Sep 17 00:00:00 2001 From: Royce Mitchell III Date: Fri, 28 Jan 2005 06:07:48 +0000 Subject: [PATCH 046/185] bug fix: use the requested default os when timeout is 0 instead of defaulting to the first OS in the list. svn path=/trunk/; revision=13344 --- reactos/boot/freeldr/freeldr/bootmgr.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/reactos/boot/freeldr/freeldr/bootmgr.c b/reactos/boot/freeldr/freeldr/bootmgr.c index 23fc12ed148..d00d3c83c05 100644 --- a/reactos/boot/freeldr/freeldr/bootmgr.c +++ b/reactos/boot/freeldr/freeldr/bootmgr.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ - + #include #include #include @@ -70,14 +70,14 @@ VOID RunLoader(VOID) MachConsGetCh(); return; } - + if (!InitOperatingSystemList(&OperatingSystemSectionNames, &OperatingSystemDisplayNames, &OperatingSystemCount)) { UiMessageBox("Press ENTER to reboot.\n"); goto reboot; } - + if (OperatingSystemCount == 0) { UiMessageBox("There were no operating systems listed in freeldr.ini.\nPress ENTER to reboot."); @@ -85,7 +85,7 @@ VOID RunLoader(VOID) } DefaultOperatingSystem = GetDefaultOperatingSystem(OperatingSystemSectionNames, OperatingSystemCount); - + // // Find all the message box settings and run them // @@ -93,12 +93,13 @@ VOID RunLoader(VOID) for (;;) { - + /* If Timeout is 0, don't even bother loading any gui */ if (!UserInterfaceUp) { + SelectedOperatingSystem = DefaultOperatingSystem; goto NoGui; } - + // Redraw the backdrop UiDrawBackdrop(); @@ -108,10 +109,9 @@ VOID RunLoader(VOID) UiMessageBox("Press ENTER to reboot.\n"); goto reboot; } - + NoGui: TimeOut = -1; - DefaultOperatingSystem = SelectedOperatingSystem; // Try to open the operating system section in the .ini file if (!IniOpenSection(OperatingSystemSectionNames[SelectedOperatingSystem], &SectionId)) @@ -153,7 +153,7 @@ NoGui: } } - + reboot: UiUnInitialize("Rebooting..."); return; From c6e6ddf2d437d620ec8aab96b5fe3bc3c56cfdab Mon Sep 17 00:00:00 2001 From: Royce Mitchell III Date: Fri, 28 Jan 2005 06:10:01 +0000 Subject: [PATCH 047/185] allow oring multiple DebugPort values svn path=/trunk/; revision=13345 --- reactos/boot/freeldr/freeldr/debug.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/reactos/boot/freeldr/freeldr/debug.c b/reactos/boot/freeldr/freeldr/debug.c index abd8ec38aab..ac953ea45d2 100644 --- a/reactos/boot/freeldr/freeldr/debug.c +++ b/reactos/boot/freeldr/freeldr/debug.c @@ -46,9 +46,9 @@ U32 DebugPrintMask = DPRINT_WARNING|DPRINT_FILESYSTEM|DPRINT_MEMORY|DPRINT_LINU U32 DebugPrintMask = 0; #endif -#define SCREEN 0 -#define RS232 1 -#define BOCHS 2 +#define SCREEN 1 +#define RS232 2 +#define BOCHS 4 #define COM1 1 #define COM2 2 @@ -60,6 +60,7 @@ U32 DebugPrintMask = 0; U32 DebugPort = RS232; //U32 DebugPort = SCREEN; //U32 DebugPort = BOCHS; +//U32 DebugPort = SCREEN|BOCHS; U32 ComPort = COM1; //U32 BaudRate = 19200; U32 BaudRate = 115200; @@ -81,7 +82,7 @@ VOID DebugPrintChar(UCHAR Character) DebugStartOfLine = TRUE; } - if (DebugPort == RS232) + if (DebugPort & RS232) { if (Character == '\n') { @@ -89,11 +90,11 @@ VOID DebugPrintChar(UCHAR Character) } Rs232PortPutByte(Character); } - else if (DebugPort == BOCHS) + if (DebugPort & BOCHS) { WRITE_PORT_UCHAR((PUCHAR)BOCHS_OUTPUT_PORT, Character); } - else + if (DebugPort & SCREEN) { MachConsPutChar(Character); } @@ -257,7 +258,7 @@ static VOID DebugPrintV(char *format, int *dataptr) switch (c = *(format++)) { case 'd': case 'u': case 'x': - + if (ll) { *convert_i64_to_ascii(str, c, *((unsigned long long*) dataptr)) = 0; @@ -311,7 +312,7 @@ static VOID DebugPrintV(char *format, int *dataptr) VOID DebugPrint(U32 Mask, char *format, ...) { int *dataptr = (int *) &format; - + // Mask out unwanted debug messages if (!(Mask & DebugPrintMask)) { @@ -340,7 +341,7 @@ VOID DebugDumpBuffer(U32 Mask, PVOID Buffer, U32 Length) PUCHAR BufPtr = (PUCHAR)Buffer; U32 Idx; U32 Idx2; - + // Mask out unwanted debug messages if (!(Mask & DebugPrintMask)) { From fef48ab3fafe62c96621a3862be75c74719916c3 Mon Sep 17 00:00:00 2001 From: Thomas Bluemel Date: Fri, 28 Jan 2005 11:37:09 +0000 Subject: [PATCH 048/185] 1. fixed InbvPutPixels() to save the ebx register which caused bootvid to crash when built with optimizations 2. build bootvid with optimizations when enabled svn path=/trunk/; revision=13346 --- reactos/drivers/dd/bootvid/bootvid.c | 4 ++-- reactos/drivers/dd/bootvid/pixelsup_i386.S | 4 +++- reactos/tools/helper.mk | 6 ++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/reactos/drivers/dd/bootvid/bootvid.c b/reactos/drivers/dd/bootvid/bootvid.c index c1e468da2e4..20807f34d26 100644 --- a/reactos/drivers/dd/bootvid/bootvid.c +++ b/reactos/drivers/dd/bootvid/bootvid.c @@ -66,7 +66,6 @@ PUCHAR VideoMemory; /* Must be 4 bytes per entry */ long maskbit[640]; -static HANDLE BitmapThreadHandle; static CLIENT_ID BitmapThreadId; static PUCHAR BootimageBitmap; @@ -556,6 +555,7 @@ STATIC BOOLEAN STDCALL VidInitialize(VOID) { NTSTATUS Status; + HANDLE BitmapThreadHandle; InbvMapVideoMemory(); InbvInitVGAMode(); @@ -574,7 +574,7 @@ VidInitialize(VOID) return FALSE; } - NtClose(BitmapThreadHandle); + ZwClose(BitmapThreadHandle); return TRUE; } diff --git a/reactos/drivers/dd/bootvid/pixelsup_i386.S b/reactos/drivers/dd/bootvid/pixelsup_i386.S index 34244ec4ddb..343cff78705 100644 --- a/reactos/drivers/dd/bootvid/pixelsup_i386.S +++ b/reactos/drivers/dd/bootvid/pixelsup_i386.S @@ -28,6 +28,7 @@ _InbvPutPixels: pushl %ebp movl %esp, %ebp + pushl %ebx /* Compute mask and put it in EBX mask = maskbit[x] */ @@ -66,7 +67,7 @@ _InbvPutPixels: (UCHAR) READ_REGISTER_UCHAR(VideoMemory + offset+0); */ movl (_VideoMemory), %esi addl %ebx, %esi - movb 0x0(%esi), %bl + movb 0x0(%esi), %bl /* Write color index for first pixel *((PUCHAR)(VideoMemory + offset+0)) = (c >> 0*8) & 0xff; */ movl 0x10(%ebp), %eax @@ -96,6 +97,7 @@ _InbvPutPixels: shrl $0x8, %eax movb %al, 0x3(%esi) + popl %ebx popl %ebp ret diff --git a/reactos/tools/helper.mk b/reactos/tools/helper.mk index 34fc17fa129..ca0e8d48b64 100644 --- a/reactos/tools/helper.mk +++ b/reactos/tools/helper.mk @@ -618,10 +618,8 @@ endif # if needed, until their problems can be found # ifeq ($(OPTIMIZED), 1) - ifneq ($(TARGET_NAME), bootvid) - MK_CFLAGS += -O2 -Wno-strict-aliasing - MK_CPPFLAGS += -O2 -Wno-strict-aliasing - endif + MK_CFLAGS += -O2 -Wno-strict-aliasing + MK_CPPFLAGS += -O2 -Wno-strict-aliasing endif ifneq ($(TARGET_LIBS),) From 38e941330dbd65595df734a031c3b7f1bee4fc6b Mon Sep 17 00:00:00 2001 From: Thomas Bluemel Date: Fri, 28 Jan 2005 12:04:37 +0000 Subject: [PATCH 049/185] removed double definition of Nt/ZwSecureConnectPort svn path=/trunk/; revision=13347 --- reactos/include/funcs.h | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/reactos/include/funcs.h b/reactos/include/funcs.h index 573b18eecd6..930a718e70b 100644 --- a/reactos/include/funcs.h +++ b/reactos/include/funcs.h @@ -1532,20 +1532,6 @@ NtResumeProcess( IN HANDLE Process ); -NTSTATUS -STDCALL -NtSecureConnectPort( - OUT PHANDLE PortHandle, - IN PUNICODE_STRING PortName, - IN PSECURITY_QUALITY_OF_SERVICE SecurityQos, - IN OUT PPORT_SECTION_WRITE WriteSection OPTIONAL, - IN PSID ServerSid OPTIONAL, - IN OUT PPORT_SECTION_READ ReadSection OPTIONAL, - OUT PULONG MaxMessageSize OPTIONAL, - IN OUT PVOID ConnectData OPTIONAL, - IN OUT PULONG ConnectDataLength OPTIONAL - ); - NTSTATUS STDCALL NtSetHighWaitLowThread( @@ -1978,20 +1964,6 @@ ZwResumeProcess( IN HANDLE Process ); -NTSTATUS -STDCALL -ZwSecureConnectPort( - OUT PHANDLE PortHandle, - IN PUNICODE_STRING PortName, - IN PSECURITY_QUALITY_OF_SERVICE SecurityQos, - IN OUT PPORT_SECTION_WRITE WriteSection OPTIONAL, - IN PSID ServerSid OPTIONAL, - IN OUT PPORT_SECTION_READ ReadSection OPTIONAL, - OUT PULONG MaxMessageSize OPTIONAL, - IN OUT PVOID ConnectData OPTIONAL, - IN OUT PULONG ConnectDataLength OPTIONAL - ); - NTSTATUS STDCALL ZwSetHighWaitLowThread( From 747952fbac2e193dc31f7822faafe2c82ce333f1 Mon Sep 17 00:00:00 2001 From: Thomas Bluemel Date: Fri, 28 Jan 2005 12:06:50 +0000 Subject: [PATCH 050/185] removed double definition of Nt/ZwSecureConnectPort svn path=/trunk/; revision=13348 --- reactos/include/ntos/zw.h | 54 +++++++++++++++++++++++++++------------ 1 file changed, 38 insertions(+), 16 deletions(-) diff --git a/reactos/include/ntos/zw.h b/reactos/include/ntos/zw.h index 2682b07454d..e9682430895 100755 --- a/reactos/include/ntos/zw.h +++ b/reactos/include/ntos/zw.h @@ -465,24 +465,46 @@ ZwCompleteConnectPort (HANDLE PortHandle); NTSTATUS STDCALL -NtConnectPort (PHANDLE PortHandle, - PUNICODE_STRING PortName, - PSECURITY_QUALITY_OF_SERVICE SecurityQos, - PLPC_SECTION_WRITE SectionInfo, - PLPC_SECTION_READ MapInfo, - PULONG MaxMessageSize, - PVOID ConnectInfo, - PULONG ConnectInfoLength); +NtConnectPort(OUT PHANDLE PortHandle, + IN PUNICODE_STRING PortName, + IN PSECURITY_QUALITY_OF_SERVICE SecurityQos, + IN OUT PLPC_SECTION_WRITE ClientSharedMemory OPTIONAL, + OUT PLPC_SECTION_READ ServerSharedMemory OPTIONAL, + OUT PULONG MaxMessageSize OPTIONAL, + IN PVOID ConnectInfo OPTIONAL, + IN PULONG ConnectInfoLength OPTIONAL); NTSTATUS STDCALL -ZwConnectPort (PHANDLE PortHandle, - PUNICODE_STRING PortName, - PSECURITY_QUALITY_OF_SERVICE SecurityQos, - PLPC_SECTION_WRITE SectionInfo, - PLPC_SECTION_READ MapInfo, - PULONG MaxMessageSize, - PVOID ConnectInfo, - PULONG ConnectInfoLength); +ZwConnectPort(OUT PHANDLE PortHandle, + IN PUNICODE_STRING PortName, + IN PSECURITY_QUALITY_OF_SERVICE SecurityQos, + IN OUT PLPC_SECTION_WRITE ClientSharedMemory OPTIONAL, + OUT PLPC_SECTION_READ ServerSharedMemory OPTIONAL, + OUT PULONG MaxMessageSize OPTIONAL, + IN PVOID ConnectInfo OPTIONAL, + IN PULONG ConnectInfoLength OPTIONAL); + +NTSTATUS STDCALL +NtSecureConnectPort(OUT PHANDLE PortHandle, + IN PUNICODE_STRING PortName, + IN PSECURITY_QUALITY_OF_SERVICE SecurityQos, + IN OUT PLPC_SECTION_WRITE ClientSharedMemory OPTIONAL, + IN PSID ServerSid OPTIONAL, + OUT PLPC_SECTION_READ ServerSharedMemory OPTIONAL, + OUT PULONG MaxMessageSize OPTIONAL, + IN PVOID ConnectInfo OPTIONAL, + IN PULONG ConnectInfoLength OPTIONAL); + +NTSTATUS STDCALL +ZwSecureConnectPort(OUT PHANDLE PortHandle, + IN PUNICODE_STRING PortName, + IN PSECURITY_QUALITY_OF_SERVICE SecurityQos, + IN OUT PLPC_SECTION_WRITE ClientSharedMemory OPTIONAL, + IN PSID ServerSid OPTIONAL, + OUT PLPC_SECTION_READ ServerSharedMemory OPTIONAL, + OUT PULONG MaxMessageSize OPTIONAL, + IN PVOID ConnectInfo OPTIONAL, + IN PULONG ConnectInfoLength OPTIONAL); /* * FUNCTION: Creates a directory object From 91337fece19f7ab617b9afd925170b6502225454 Mon Sep 17 00:00:00 2001 From: Thomas Bluemel Date: Fri, 28 Jan 2005 12:12:42 +0000 Subject: [PATCH 051/185] reverted my previous two commits, they are part of not yet committed changes... svn path=/trunk/; revision=13349 --- reactos/include/funcs.h | 28 ++++++++++++++++++++ reactos/include/ntos/zw.h | 54 ++++++++++++--------------------------- 2 files changed, 44 insertions(+), 38 deletions(-) diff --git a/reactos/include/funcs.h b/reactos/include/funcs.h index 930a718e70b..573b18eecd6 100644 --- a/reactos/include/funcs.h +++ b/reactos/include/funcs.h @@ -1532,6 +1532,20 @@ NtResumeProcess( IN HANDLE Process ); +NTSTATUS +STDCALL +NtSecureConnectPort( + OUT PHANDLE PortHandle, + IN PUNICODE_STRING PortName, + IN PSECURITY_QUALITY_OF_SERVICE SecurityQos, + IN OUT PPORT_SECTION_WRITE WriteSection OPTIONAL, + IN PSID ServerSid OPTIONAL, + IN OUT PPORT_SECTION_READ ReadSection OPTIONAL, + OUT PULONG MaxMessageSize OPTIONAL, + IN OUT PVOID ConnectData OPTIONAL, + IN OUT PULONG ConnectDataLength OPTIONAL + ); + NTSTATUS STDCALL NtSetHighWaitLowThread( @@ -1964,6 +1978,20 @@ ZwResumeProcess( IN HANDLE Process ); +NTSTATUS +STDCALL +ZwSecureConnectPort( + OUT PHANDLE PortHandle, + IN PUNICODE_STRING PortName, + IN PSECURITY_QUALITY_OF_SERVICE SecurityQos, + IN OUT PPORT_SECTION_WRITE WriteSection OPTIONAL, + IN PSID ServerSid OPTIONAL, + IN OUT PPORT_SECTION_READ ReadSection OPTIONAL, + OUT PULONG MaxMessageSize OPTIONAL, + IN OUT PVOID ConnectData OPTIONAL, + IN OUT PULONG ConnectDataLength OPTIONAL + ); + NTSTATUS STDCALL ZwSetHighWaitLowThread( diff --git a/reactos/include/ntos/zw.h b/reactos/include/ntos/zw.h index e9682430895..2682b07454d 100755 --- a/reactos/include/ntos/zw.h +++ b/reactos/include/ntos/zw.h @@ -465,46 +465,24 @@ ZwCompleteConnectPort (HANDLE PortHandle); NTSTATUS STDCALL -NtConnectPort(OUT PHANDLE PortHandle, - IN PUNICODE_STRING PortName, - IN PSECURITY_QUALITY_OF_SERVICE SecurityQos, - IN OUT PLPC_SECTION_WRITE ClientSharedMemory OPTIONAL, - OUT PLPC_SECTION_READ ServerSharedMemory OPTIONAL, - OUT PULONG MaxMessageSize OPTIONAL, - IN PVOID ConnectInfo OPTIONAL, - IN PULONG ConnectInfoLength OPTIONAL); +NtConnectPort (PHANDLE PortHandle, + PUNICODE_STRING PortName, + PSECURITY_QUALITY_OF_SERVICE SecurityQos, + PLPC_SECTION_WRITE SectionInfo, + PLPC_SECTION_READ MapInfo, + PULONG MaxMessageSize, + PVOID ConnectInfo, + PULONG ConnectInfoLength); NTSTATUS STDCALL -ZwConnectPort(OUT PHANDLE PortHandle, - IN PUNICODE_STRING PortName, - IN PSECURITY_QUALITY_OF_SERVICE SecurityQos, - IN OUT PLPC_SECTION_WRITE ClientSharedMemory OPTIONAL, - OUT PLPC_SECTION_READ ServerSharedMemory OPTIONAL, - OUT PULONG MaxMessageSize OPTIONAL, - IN PVOID ConnectInfo OPTIONAL, - IN PULONG ConnectInfoLength OPTIONAL); - -NTSTATUS STDCALL -NtSecureConnectPort(OUT PHANDLE PortHandle, - IN PUNICODE_STRING PortName, - IN PSECURITY_QUALITY_OF_SERVICE SecurityQos, - IN OUT PLPC_SECTION_WRITE ClientSharedMemory OPTIONAL, - IN PSID ServerSid OPTIONAL, - OUT PLPC_SECTION_READ ServerSharedMemory OPTIONAL, - OUT PULONG MaxMessageSize OPTIONAL, - IN PVOID ConnectInfo OPTIONAL, - IN PULONG ConnectInfoLength OPTIONAL); - -NTSTATUS STDCALL -ZwSecureConnectPort(OUT PHANDLE PortHandle, - IN PUNICODE_STRING PortName, - IN PSECURITY_QUALITY_OF_SERVICE SecurityQos, - IN OUT PLPC_SECTION_WRITE ClientSharedMemory OPTIONAL, - IN PSID ServerSid OPTIONAL, - OUT PLPC_SECTION_READ ServerSharedMemory OPTIONAL, - OUT PULONG MaxMessageSize OPTIONAL, - IN PVOID ConnectInfo OPTIONAL, - IN PULONG ConnectInfoLength OPTIONAL); +ZwConnectPort (PHANDLE PortHandle, + PUNICODE_STRING PortName, + PSECURITY_QUALITY_OF_SERVICE SecurityQos, + PLPC_SECTION_WRITE SectionInfo, + PLPC_SECTION_READ MapInfo, + PULONG MaxMessageSize, + PVOID ConnectInfo, + PULONG ConnectInfoLength); /* * FUNCTION: Creates a directory object From 9f44705b10307a4267d7c1ef3a3ad0f544df2c75 Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Fri, 28 Jan 2005 13:28:56 +0000 Subject: [PATCH 052/185] Use the service contol pipe to send a start command in order to start a service thread. svn path=/trunk/; revision=13350 --- reactos/include/services/services.h | 24 ++ reactos/lib/advapi32/service/sctrl.c | 133 ++++++++- reactos/subsys/system/services/database.c | 344 +++++++++++++--------- 3 files changed, 353 insertions(+), 148 deletions(-) create mode 100644 reactos/include/services/services.h diff --git a/reactos/include/services/services.h b/reactos/include/services/services.h new file mode 100644 index 00000000000..95818c026a3 --- /dev/null +++ b/reactos/include/services/services.h @@ -0,0 +1,24 @@ +/* $Id$ + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: include/services/services.h + * PURPOSE: Private interface between SERVICES.EXE and ADVAPI32.DLL + * PROGRAMMER: Eric Kohl + */ + +#ifndef __SERVICES_SERVICES_H__ +#define __SERVICES_SERVICES_H__ + +#define SCM_START_COMMAND 1 + +typedef struct _SCM_START_PACKET +{ + ULONG Command; + ULONG Size; + WCHAR Arguments[1]; +} SCM_START_PACKET, *PSCM_START_PACKET; + +#endif /* __SERVICES_SERVICES_H__ */ + +/* EOF */ diff --git a/reactos/lib/advapi32/service/sctrl.c b/reactos/lib/advapi32/service/sctrl.c index 7b033a5341f..defa64c0152 100644 --- a/reactos/lib/advapi32/service/sctrl.c +++ b/reactos/lib/advapi32/service/sctrl.c @@ -13,6 +13,8 @@ /* INCLUDES ******************************************************************/ #include "advapi32.h" +#include + #define NDEBUG #include @@ -23,9 +25,15 @@ typedef struct _ACTIVE_SERVICE { DWORD ThreadId; UNICODE_STRING ServiceName; - LPSERVICE_MAIN_FUNCTIONW MainFunction; + union + { + LPSERVICE_MAIN_FUNCTIONA lpFuncA; + LPSERVICE_MAIN_FUNCTIONW lpFuncW; + } Main; LPHANDLER_FUNCTION HandlerFunction; SERVICE_STATUS ServiceStatus; + BOOL bUnicode; + LPWSTR Arguments; } ACTIVE_SERVICE, *PACTIVE_SERVICE; @@ -33,7 +41,6 @@ typedef struct _ACTIVE_SERVICE static DWORD dwActiveServiceCount = 0; static PACTIVE_SERVICE lpActiveServices = NULL; -/* static PHANDLE ActiveServicesThreadHandles; */ /* uncomment when in use */ /* FUNCTIONS *****************************************************************/ @@ -80,15 +87,53 @@ static DWORD WINAPI ScServiceMainStub(LPVOID Context) { PACTIVE_SERVICE lpService; + DWORD dwArgCount = 0; + DWORD dwLength = 0; lpService = (PACTIVE_SERVICE)Context; DPRINT("ScServiceMainStub() called\n"); - /* FIXME: Send argc and argv (from command line) as arguments */ + /* Count arguments */ + while (lpService->Arguments[dwLength]) + { + dwLength += wcslen(&lpService->Arguments[dwLength]) + 1; + dwArgCount++; + } + /* Build the argument vector and call the main service routine */ + if (lpService->bUnicode) + { + LPWSTR *lpArgVector; + LPWSTR Ptr; - (lpService->MainFunction)(0, NULL); + lpArgVector = HeapAlloc(GetProcessHeap(), + HEAP_ZERO_MEMORY, + (dwArgCount + 1) * sizeof(LPWSTR)); + if (lpArgVector == NULL) + return ERROR_OUTOFMEMORY; + + dwArgCount = 0; + Ptr = lpService->Arguments; + while (*Ptr) + { + lpArgVector[dwArgCount] = Ptr; + + dwArgCount++; + Ptr += (wcslen(Ptr) + 1); + } + lpArgVector[dwArgCount] = NULL; + + (lpService->Main.lpFuncW)(dwArgCount, lpArgVector); + + HeapFree(GetProcessHeap(), + 0, + lpArgVector); + } + else + { + (lpService->Main.lpFuncA)(0, NULL); + } return ERROR_SUCCESS; } @@ -141,17 +186,29 @@ ScConnectControlPipe(HANDLE *hPipe) } -static BOOL -ScServiceDispatcher(HANDLE hPipe, - PUCHAR lpBuffer, - DWORD dwBufferSize) + +static DWORD +ScStartService(PSCM_START_PACKET StartPacket) { PACTIVE_SERVICE lpService; HANDLE ThreadHandle; - DPRINT("ScDispatcherLoop() called\n"); + DPRINT("Size: %lu\n", StartPacket->Size); + DPRINT("Service: %S\n", &StartPacket->Arguments[0]); - lpService = &lpActiveServices[0]; + lpService = ScLookupServiceByServiceName(&StartPacket->Arguments[0]); + if (lpService == NULL) + return ERROR_SERVICE_DOES_NOT_EXIST; + + lpService->Arguments = HeapAlloc(GetProcessHeap(), + HEAP_ZERO_MEMORY, + StartPacket->Size); + if (lpService->Arguments == NULL) + return ERROR_OUTOFMEMORY; + + memcpy(lpService->Arguments, + StartPacket->Arguments, + StartPacket->Size * sizeof(WCHAR)); ThreadHandle = CreateThread(NULL, 0, @@ -160,21 +217,63 @@ ScServiceDispatcher(HANDLE hPipe, CREATE_SUSPENDED, &lpService->ThreadId); if (ThreadHandle == NULL) - return FALSE; + return ERROR_SERVICE_NO_THREAD; ResumeThread(ThreadHandle); - CloseHandle(ThreadHandle); -#if 0 + return ERROR_SUCCESS; +} + + +static BOOL +ScServiceDispatcher(HANDLE hPipe, + PUCHAR lpBuffer, + DWORD dwBufferSize) +{ + LPDWORD Buffer; + DWORD Count; + BOOL bResult; + + DPRINT("ScDispatcherLoop() called\n"); + + Buffer = HeapAlloc(GetProcessHeap(), + HEAP_ZERO_MEMORY, + 1024); + if (Buffer == NULL) + return FALSE; + while (TRUE) { /* Read command from the control pipe */ + bResult = ReadFile(hPipe, + Buffer, + 1024, + &Count, + NULL); + if (bResult == FALSE) + { + DPRINT1("Pipe read failed\n"); + return FALSE; + } /* Execute command */ + switch (Buffer[0]) + { + case SCM_START_COMMAND: + DPRINT("Start command\n"); + ScStartService((PSCM_START_PACKET)Buffer); + break; + default: + DPRINT1("Unknown command %lu", Buffer[0]); + break; + } } -#endif + + HeapFree(GetProcessHeap(), + 0, + Buffer); return TRUE; } @@ -324,7 +423,8 @@ StartServiceCtrlDispatcherA(LPSERVICE_TABLE_ENTRYA lpServiceStartTable) { RtlCreateUnicodeStringFromAsciiz(&lpActiveServices[i].ServiceName, lpServiceStartTable[i].lpServiceName); - lpActiveServices[i].MainFunction = (LPSERVICE_MAIN_FUNCTIONW)lpServiceStartTable[i].lpServiceProc; + lpActiveServices[i].Main.lpFuncA = lpServiceStartTable[i].lpServiceProc; + lpActiveServices[i].bUnicode = FALSE; } dwError = ScConnectControlPipe(&hPipe); @@ -400,7 +500,8 @@ StartServiceCtrlDispatcherW(LPSERVICE_TABLE_ENTRYW lpServiceStartTable) { RtlCreateUnicodeString(&lpActiveServices[i].ServiceName, lpServiceStartTable[i].lpServiceName); - lpActiveServices[i].MainFunction = lpServiceStartTable[i].lpServiceProc; + lpActiveServices[i].Main.lpFuncW = lpServiceStartTable[i].lpServiceProc; + lpActiveServices[i].bUnicode = TRUE; } dwError = ScConnectControlPipe(&hPipe); diff --git a/reactos/subsys/system/services/database.c b/reactos/subsys/system/services/database.c index 6348f3d0707..033e01916e1 100644 --- a/reactos/subsys/system/services/database.c +++ b/reactos/subsys/system/services/database.c @@ -32,6 +32,7 @@ #include #include +#include #include "services.h" #define NDEBUG @@ -521,8 +522,72 @@ ScmGetBootAndSystemDriverState(VOID) static NTSTATUS -ScmStartService(PSERVICE Service, - PSERVICE_GROUP Group) +ScmSendStartCommand(PSERVICE Service, LPWSTR Arguments) +{ + PSCM_START_PACKET StartPacket; + DWORD TotalLength; +#if 0 + DWORD Length; +#endif + PWSTR Ptr; + DWORD Count; + + DPRINT("ScmSendStartCommand() called\n"); + + /* Calculate the total length of the start command line */ + TotalLength = wcslen(Service->ServiceName.Buffer) + 1; +#if 0 + if (Arguments != NULL) + { + Ptr = Arguments; + while (*Ptr) + { + Length = wcslen(Ptr) + 1; + TotalLength += Length; + Ptr += Length; + } + } +#endif + TotalLength++; + + /* Allocate start command packet */ + StartPacket = HeapAlloc(GetProcessHeap(), + HEAP_ZERO_MEMORY, + sizeof(SCM_START_PACKET) + (TotalLength - 1) * sizeof(WCHAR)); + if (StartPacket == NULL) + return STATUS_INSUFFICIENT_RESOURCES; + + StartPacket->Command = SCM_START_COMMAND; + StartPacket->Size = TotalLength; + Ptr = &StartPacket->Arguments[0]; + wcscpy(Ptr, Service->ServiceName.Buffer); + Ptr += (wcslen(Service->ServiceName.Buffer) + 1); + + /* FIXME: Copy argument list */ + + *Ptr = 0; + + /* Send the start command */ + WriteFile(Service->ControlPipeHandle, + StartPacket, + sizeof(SCM_START_PACKET) + (TotalLength - 1) * sizeof(WCHAR), + &Count, + NULL); + + /* FIXME: Read the reply */ + + HeapFree(GetProcessHeap(), + 0, + StartPacket); + + DPRINT("ScmSendStartCommand() done\n"); + + return STATUS_SUCCESS; +} + + +static NTSTATUS +ScmStartUserModeService(PSERVICE Service) { RTL_QUERY_REGISTRY_TABLE QueryTable[3]; PROCESS_INFORMATION ProcessInformation; @@ -532,6 +597,149 @@ ScmStartService(PSERVICE Service, BOOL Result; NTSTATUS Status; + RtlInitUnicodeString(&ImagePath, NULL); + + /* Get service data */ + RtlZeroMemory(&QueryTable, + sizeof(QueryTable)); + + QueryTable[0].Name = L"Type"; + QueryTable[0].Flags = RTL_QUERY_REGISTRY_DIRECT | RTL_QUERY_REGISTRY_REQUIRED; + QueryTable[0].EntryContext = &Type; + + QueryTable[1].Name = L"ImagePath"; + QueryTable[1].Flags = RTL_QUERY_REGISTRY_DIRECT | RTL_QUERY_REGISTRY_REQUIRED; + QueryTable[1].EntryContext = &ImagePath; + + Status = RtlQueryRegistryValues(RTL_REGISTRY_SERVICES, + Service->ServiceName.Buffer, + QueryTable, + NULL, + NULL); + if (!NT_SUCCESS(Status)) + { + DPRINT1("RtlQueryRegistryValues() failed (Status %lx)\n", Status); + return Status; + } + DPRINT("ImagePath: '%S'\n", ImagePath.Buffer); + DPRINT("Type: %lx\n", Type); + + /* Create '\\.\pipe\net\NtControlPipe' instance */ + Service->ControlPipeHandle = CreateNamedPipeW(L"\\\\.\\pipe\\net\\NtControlPipe", + PIPE_ACCESS_DUPLEX, + PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE | PIPE_WAIT, + 100, + 8000, + 4, + 30000, + NULL); + DPRINT("CreateNamedPipeW() done\n"); + if (Service->ControlPipeHandle == INVALID_HANDLE_VALUE) + { + DPRINT1("Failed to create control pipe!\n"); + return STATUS_UNSUCCESSFUL; + } + + StartupInfo.cb = sizeof(StartupInfo); + StartupInfo.lpReserved = NULL; + StartupInfo.lpDesktop = NULL; + StartupInfo.lpTitle = NULL; + StartupInfo.dwFlags = 0; + StartupInfo.cbReserved2 = 0; + StartupInfo.lpReserved2 = 0; + + Result = CreateProcessW(ImagePath.Buffer, + NULL, + NULL, + NULL, + FALSE, + DETACHED_PROCESS | CREATE_SUSPENDED, + NULL, + NULL, + &StartupInfo, + &ProcessInformation); + RtlFreeUnicodeString(&ImagePath); + + if (!Result) + { + /* Close control pipe */ + CloseHandle(Service->ControlPipeHandle); + Service->ControlPipeHandle = INVALID_HANDLE_VALUE; + + DPRINT1("Starting '%S' failed!\n", Service->ServiceName.Buffer); + return STATUS_UNSUCCESSFUL; + } + + DPRINT("Process Id: %lu Handle %lx\n", + ProcessInformation.dwProcessId, + ProcessInformation.hProcess); + DPRINT("Thread Id: %lu Handle %lx\n", + ProcessInformation.dwThreadId, + ProcessInformation.hThread); + + /* Get process and thread ids */ + Service->ProcessId = ProcessInformation.dwProcessId; + Service->ThreadId = ProcessInformation.dwThreadId; + + /* Resume Thread */ + ResumeThread(ProcessInformation.hThread); + + /* Connect control pipe */ + if (ConnectNamedPipe(Service->ControlPipeHandle, NULL)) + { + DWORD dwProcessId = 0; + DWORD dwRead = 0; + + DPRINT("Control pipe connected!\n"); + + /* Read thread id from pipe */ + if (!ReadFile(Service->ControlPipeHandle, + (LPVOID)&dwProcessId, + sizeof(DWORD), + &dwRead, + NULL)) + { + DPRINT1("Reading the service control pipe failed (Error %lu)\n", + GetLastError()); + Status = STATUS_UNSUCCESSFUL; + } + else + { + DPRINT("Received process id %lu\n", dwProcessId); + + /* FIXME: Send start command */ + + Status = STATUS_SUCCESS; + } + } + else + { + DPRINT("Connecting control pipe failed!\n"); + + /* Close control pipe */ + CloseHandle(Service->ControlPipeHandle); + Service->ControlPipeHandle = INVALID_HANDLE_VALUE; + Service->ProcessId = 0; + Service->ThreadId = 0; + Status = STATUS_UNSUCCESSFUL; + } + + ScmSendStartCommand(Service, NULL); + + /* Close process and thread handle */ + CloseHandle(ProcessInformation.hThread); + CloseHandle(ProcessInformation.hProcess); + + return Status; +} + + +static NTSTATUS +ScmStartService(PSERVICE Service, + PSERVICE_GROUP Group) +{ + NTSTATUS Status; + DPRINT("ScmStartService() called\n"); Service->ControlPipeHandle = INVALID_HANDLE_VALUE; @@ -547,138 +755,10 @@ ScmStartService(PSERVICE Service, } else { - RtlInitUnicodeString(&ImagePath, NULL); - - /* Get service data */ - RtlZeroMemory(&QueryTable, - sizeof(QueryTable)); - - QueryTable[0].Name = L"Type"; - QueryTable[0].Flags = RTL_QUERY_REGISTRY_DIRECT | RTL_QUERY_REGISTRY_REQUIRED; - QueryTable[0].EntryContext = &Type; - - QueryTable[1].Name = L"ImagePath"; - QueryTable[1].Flags = RTL_QUERY_REGISTRY_DIRECT | RTL_QUERY_REGISTRY_REQUIRED; - QueryTable[1].EntryContext = &ImagePath; - - Status = RtlQueryRegistryValues(RTL_REGISTRY_SERVICES, - Service->ServiceName.Buffer, - QueryTable, - NULL, - NULL); - if (NT_SUCCESS(Status)) - { - DPRINT("ImagePath: '%S'\n", ImagePath.Buffer); - DPRINT("Type: %lx\n", Type); - - /* FIXME: create '\\.\pipe\net\NtControlPipe' instance */ - Service->ControlPipeHandle = CreateNamedPipeW(L"\\\\.\\pipe\\net\\NtControlPipe", - PIPE_ACCESS_DUPLEX, - PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE | PIPE_WAIT, - 100, - 8000, - 4, - 30000, - NULL); - DPRINT("CreateNamedPipeW() done\n"); - if (Service->ControlPipeHandle == INVALID_HANDLE_VALUE) - { - DPRINT1("Failed to create control pipe!\n"); - Status = STATUS_UNSUCCESSFUL; - goto Done; - } - - StartupInfo.cb = sizeof(StartupInfo); - StartupInfo.lpReserved = NULL; - StartupInfo.lpDesktop = NULL; - StartupInfo.lpTitle = NULL; - StartupInfo.dwFlags = 0; - StartupInfo.cbReserved2 = 0; - StartupInfo.lpReserved2 = 0; - - Result = CreateProcessW(ImagePath.Buffer, - NULL, - NULL, - NULL, - FALSE, - DETACHED_PROCESS | CREATE_SUSPENDED, - NULL, - NULL, - &StartupInfo, - &ProcessInformation); - RtlFreeUnicodeString(&ImagePath); - - if (!Result) - { - /* Close control pipe */ - CloseHandle(Service->ControlPipeHandle); - Service->ControlPipeHandle = INVALID_HANDLE_VALUE; - - DPRINT1("Starting '%S' failed!\n", Service->ServiceName.Buffer); - Status = STATUS_UNSUCCESSFUL; - } - else - { - DPRINT("Process Id: %lu Handle %lx\n", - ProcessInformation.dwProcessId, - ProcessInformation.hProcess); - DPRINT("Thread Id: %lu Handle %lx\n", - ProcessInformation.dwThreadId, - ProcessInformation.hThread); - - /* Get process and thread ids */ - Service->ProcessId = ProcessInformation.dwProcessId; - Service->ThreadId = ProcessInformation.dwThreadId; - - /* Resume Thread */ - ResumeThread(ProcessInformation.hThread); - - /* Connect control pipe */ - if (ConnectNamedPipe(Service->ControlPipeHandle, NULL)) - { - DWORD dwProcessId = 0; - DWORD dwRead = 0; - - DPRINT("Control pipe connected!\n"); - - /* FIXME: Read thread id from pipe */ - if (!ReadFile(Service->ControlPipeHandle, - (LPVOID)&dwProcessId, - sizeof(DWORD), - &dwRead, - NULL)) - { - DPRINT1("Reading the service control pipe failed (Error %lu)\n", GetLastError()); - } - else - { - DPRINT("Received process id %lu\n", dwProcessId); - - /* FIXME: Send start command */ - - Status = STATUS_SUCCESS; - } - } - else - { - DPRINT("Connecting control pipe failed!\n"); - - /* Close control pipe */ - CloseHandle(Service->ControlPipeHandle); - Service->ControlPipeHandle = INVALID_HANDLE_VALUE; - Service->ProcessId = 0; - Service->ThreadId = 0; - Status = STATUS_UNSUCCESSFUL; - } - - /* Close process and thread handle */ - CloseHandle(ProcessInformation.hThread); - CloseHandle(ProcessInformation.hProcess); - } - } + /* Start user-mode service */ + Status = ScmStartUserModeService(Service); } -Done: DPRINT("ScmStartService() done (Status %lx)\n", Status); if (NT_SUCCESS(Status)) From 22501b78f9676c53555ac5d00c857e13226d0d63 Mon Sep 17 00:00:00 2001 From: Thomas Bluemel Date: Fri, 28 Jan 2005 18:29:13 +0000 Subject: [PATCH 053/185] When a toolbar doesn't have the TBSTYLE_FLAT style redrawing the buttons when moving the mouse is not necessary. Merged back from winehq. Fixes bug #404 svn path=/trunk/; revision=13351 --- reactos/lib/comctl32/toolbar.c | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/reactos/lib/comctl32/toolbar.c b/reactos/lib/comctl32/toolbar.c index 6987331d482..58f8b0e105c 100644 --- a/reactos/lib/comctl32/toolbar.c +++ b/reactos/lib/comctl32/toolbar.c @@ -6081,23 +6081,25 @@ TOOLBAR_MouseMove (HWND hwnd, WPARAM wParam, LPARAM lParam) INT nHit; TBUTTON_INFO *btnPtr; - /* fill in the TRACKMOUSEEVENT struct */ - trackinfo.cbSize = sizeof(TRACKMOUSEEVENT); - trackinfo.dwFlags = TME_QUERY; - trackinfo.hwndTrack = hwnd; - trackinfo.dwHoverTime = HOVER_DEFAULT; + if (infoPtr->dwStyle & TBSTYLE_FLAT) { + /* fill in the TRACKMOUSEEVENT struct */ + trackinfo.cbSize = sizeof(TRACKMOUSEEVENT); + trackinfo.dwFlags = TME_QUERY; + trackinfo.hwndTrack = hwnd; + trackinfo.dwHoverTime = HOVER_DEFAULT; - /* call _TrackMouseEvent to see if we are currently tracking for this hwnd */ - _TrackMouseEvent(&trackinfo); - - /* Make sure tracking is enabled so we receive a WM_MOUSELEAVE message */ - if(!(trackinfo.dwFlags & TME_LEAVE)) { - trackinfo.dwFlags = TME_LEAVE; /* notify upon leaving */ - - /* call TRACKMOUSEEVENT so we receive a WM_MOUSELEAVE message */ - /* and can properly deactivate the hot toolbar button */ + /* call _TrackMouseEvent to see if we are currently tracking for this hwnd */ _TrackMouseEvent(&trackinfo); - } + + /* Make sure tracking is enabled so we receive a WM_MOUSELEAVE message */ + if(!(trackinfo.dwFlags & TME_LEAVE)) { + trackinfo.dwFlags = TME_LEAVE; /* notify upon leaving */ + + /* call TRACKMOUSEEVENT so we receive a WM_MOUSELEAVE message */ + /* and can properly deactivate the hot toolbar button */ + _TrackMouseEvent(&trackinfo); + } + } if (infoPtr->hwndToolTip) TOOLBAR_RelayEvent (infoPtr->hwndToolTip, hwnd, @@ -6108,7 +6110,7 @@ TOOLBAR_MouseMove (HWND hwnd, WPARAM wParam, LPARAM lParam) nHit = TOOLBAR_InternalHitTest (hwnd, &pt); - if (!infoPtr->bAnchor || (nHit >= 0)) + if ((infoPtr->dwStyle & TBSTYLE_FLAT) && (!infoPtr->bAnchor || (nHit >= 0))) TOOLBAR_SetHotItemEx(infoPtr, nHit, HICF_MOUSE); if (infoPtr->nOldHit != nHit) From 919a5257b4fbee37256181af2e0b331ed9f4c53b Mon Sep 17 00:00:00 2001 From: Thomas Bluemel Date: Fri, 28 Jan 2005 18:35:21 +0000 Subject: [PATCH 054/185] also save the esi register. Thx to d_layer svn path=/trunk/; revision=13352 --- reactos/drivers/dd/bootvid/pixelsup_i386.S | 2 ++ 1 file changed, 2 insertions(+) diff --git a/reactos/drivers/dd/bootvid/pixelsup_i386.S b/reactos/drivers/dd/bootvid/pixelsup_i386.S index 343cff78705..3fd07c40375 100644 --- a/reactos/drivers/dd/bootvid/pixelsup_i386.S +++ b/reactos/drivers/dd/bootvid/pixelsup_i386.S @@ -28,6 +28,7 @@ _InbvPutPixels: pushl %ebp movl %esp, %ebp + pushl %esi pushl %ebx /* Compute mask and put it in EBX @@ -98,6 +99,7 @@ _InbvPutPixels: movb %al, 0x3(%esi) popl %ebx + popl %esi popl %ebp ret From 87e189fd3116324db15f3123e42283b2c35bad9b Mon Sep 17 00:00:00 2001 From: Thomas Bluemel Date: Fri, 28 Jan 2005 19:28:24 +0000 Subject: [PATCH 055/185] GetTempPathW should write an empty string to the buffer in case it wasn't large enough svn path=/trunk/; revision=13354 --- reactos/lib/kernel32/file/curdir.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/reactos/lib/kernel32/file/curdir.c b/reactos/lib/kernel32/file/curdir.c index be9d32b4252..1084bd4359c 100644 --- a/reactos/lib/kernel32/file/curdir.c +++ b/reactos/lib/kernel32/file/curdir.c @@ -308,7 +308,7 @@ GetTempPathW ( if (nBufferLength < Value->Length / sizeof(WCHAR) + 2) Length++; - if (lpBuffer != NULL) + if (nBufferLength >= Value->Length /sizeof(WCHAR) + 1) { if (nBufferLength < Value->Length / sizeof(WCHAR) + 2) { @@ -324,6 +324,9 @@ GetTempPathW ( lpBuffer[Value->Length / sizeof(WCHAR)] = L'\\'; lpBuffer[Value->Length / sizeof(WCHAR) + 1] = 0; } + } else if (nBufferLength > 0) + { + lpBuffer[0] = L'\0'; } return Length; From 5149504971c66ad2b307af95fb9d4377d4ffdd04 Mon Sep 17 00:00:00 2001 From: Thomas Bluemel Date: Fri, 28 Jan 2005 20:48:43 +0000 Subject: [PATCH 056/185] securely access buffers in NtImpersonateThread() svn path=/trunk/; revision=13355 --- reactos/ntoskrnl/ps/create.c | 103 ++++++++++++++++++++--------------- 1 file changed, 60 insertions(+), 43 deletions(-) diff --git a/reactos/ntoskrnl/ps/create.c b/reactos/ntoskrnl/ps/create.c index 79d0c73c4c2..2f5660f0c87 100644 --- a/reactos/ntoskrnl/ps/create.c +++ b/reactos/ntoskrnl/ps/create.c @@ -177,56 +177,73 @@ NtImpersonateThread(IN HANDLE ThreadHandle, IN HANDLE ThreadToImpersonateHandle, IN PSECURITY_QUALITY_OF_SERVICE SecurityQualityOfService) { + SECURITY_QUALITY_OF_SERVICE SafeServiceQoS; SECURITY_CLIENT_CONTEXT ClientContext; PETHREAD Thread; PETHREAD ThreadToImpersonate; - NTSTATUS Status; + KPROCESSOR_MODE PreviousMode; + NTSTATUS Status = STATUS_SUCCESS; + + PreviousMode = ExGetPreviousMode(); + + if(PreviousMode != KernelMode) + { + _SEH_TRY + { + ProbeForRead(SecurityQualityOfService, + sizeof(SECURITY_QUALITY_OF_SERVICE), + sizeof(ULONG)); + SafeServiceQoS = *SecurityQualityOfService; + SecurityQualityOfService = &SafeServiceQoS; + } + _SEH_HANDLE + { + Status = _SEH_GetExceptionCode(); + } + _SEH_END; + + if(!NT_SUCCESS(Status)) + { + return Status; + } + } - Status = ObReferenceObjectByHandle (ThreadHandle, + Status = ObReferenceObjectByHandle(ThreadHandle, + THREAD_IMPERSONATE, + PsThreadType, + PreviousMode, + (PVOID*)&Thread, + NULL); + if(NT_SUCCESS(Status)) + { + Status = ObReferenceObjectByHandle(ThreadToImpersonateHandle, + THREAD_DIRECT_IMPERSONATION, + PsThreadType, + PreviousMode, + (PVOID*)&ThreadToImpersonate, + NULL); + if(NT_SUCCESS(Status)) + { + Status = SeCreateClientSecurity(ThreadToImpersonate, + SecurityQualityOfService, 0, - PsThreadType, - UserMode, - (PVOID*)&Thread, - NULL); - if (!NT_SUCCESS (Status)) - { - return Status; + &ClientContext); + if(NT_SUCCESS(Status)) + { + SeImpersonateClient(&ClientContext, + Thread); + if(ClientContext.ClientToken != NULL) + { + ObDereferenceObject (ClientContext.ClientToken); + } + } + + ObDereferenceObject(ThreadToImpersonate); } + ObDereferenceObject(Thread); + } - Status = ObReferenceObjectByHandle (ThreadToImpersonateHandle, - 0, - PsThreadType, - UserMode, - (PVOID*)&ThreadToImpersonate, - NULL); - if (!NT_SUCCESS(Status)) - { - ObDereferenceObject (Thread); - return Status; - } - - Status = SeCreateClientSecurity (ThreadToImpersonate, - SecurityQualityOfService, - 0, - &ClientContext); - if (!NT_SUCCESS(Status)) - { - ObDereferenceObject (ThreadToImpersonate); - ObDereferenceObject (Thread); - return Status; - } - - SeImpersonateClient (&ClientContext, - Thread); - if (ClientContext.ClientToken != NULL) - { - ObDereferenceObject (ClientContext.ClientToken); - } - - ObDereferenceObject (ThreadToImpersonate); - ObDereferenceObject (Thread); - - return STATUS_SUCCESS; + return Status; } /* From 66044ade6ba491d41fbb3b35fd2a9082f85b9db5 Mon Sep 17 00:00:00 2001 From: Steven Edwards Date: Fri, 28 Jan 2005 21:04:12 +0000 Subject: [PATCH 057/185] setupapi was sync'd to winehq. svn path=/trunk/; revision=13356 --- reactos/doc/README.WINE | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/reactos/doc/README.WINE b/reactos/doc/README.WINE index 483b4cca05a..e1009d7acb4 100644 --- a/reactos/doc/README.WINE +++ b/reactos/doc/README.WINE @@ -55,7 +55,7 @@ reactos/lib/oledlg # Synced to Wine-20050111 reactos/lib/olepro32 # Synced to Wine-20050111 reactos/lib/richedit # Synced to Wine-20050111 reactos/lib/rpcrt4 # Synced to Wine-20050111 -reactos/lib/setupapi # Out of sync +reactos/lib/setupapi # Synced to Wine-20050125 # CVS reactos/lib/shell32 # Synced to Wine-20050111 reactos/lib/shdocvw # Synced to Wine-20050111 reactos/lib/shlwapi # Synced to Wine-20050111 @@ -100,5 +100,3 @@ User32 - reactos/lib/user32/misc/wsprintf.c # Out of sync reactos/lib/user32/windows/mdi.c # Out of sync - - ` \ No newline at end of file From 00ae7e938d0ff279abef874c17d35a9e5f37f6cf Mon Sep 17 00:00:00 2001 From: Filip Navara Date: Fri, 28 Jan 2005 21:17:11 +0000 Subject: [PATCH 058/185] =?UTF-8?q?Herv=C3=A9=20Poussineau=20=20Use=20fast=20mutexes=20instead=20of=20spin=20locks?= =?UTF-8?q?=20because=20the=20file=20system=20callbacks=20shouldn't=20be?= =?UTF-8?q?=20called=20at=20DISPATCH=5FLEVEL.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit svn path=/trunk/; revision=13357 --- reactos/ntoskrnl/io/fs.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/reactos/ntoskrnl/io/fs.c b/reactos/ntoskrnl/io/fs.c index 273b58c6868..d3f661ce924 100644 --- a/reactos/ntoskrnl/io/fs.c +++ b/reactos/ntoskrnl/io/fs.c @@ -1,4 +1,4 @@ -/* $Id:$ +/* $Id$ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -35,7 +35,7 @@ typedef struct _FS_CHANGE_NOTIFY_ENTRY static ERESOURCE FileSystemListLock; static LIST_ENTRY FileSystemListHead; -static KSPIN_LOCK FsChangeNotifyListLock; +static FAST_MUTEX FsChangeNotifyListLock; static LIST_ENTRY FsChangeNotifyListHead; #define TAG_FILE_SYSTEM TAG('F', 'S', 'Y', 'S') @@ -178,7 +178,7 @@ IoInitFileSystemImplementation(VOID) ExInitializeResourceLite(&FileSystemListLock); InitializeListHead(&FsChangeNotifyListHead); - KeInitializeSpinLock(&FsChangeNotifyListLock); + ExInitializeFastMutex(&FsChangeNotifyListLock); } @@ -709,9 +709,8 @@ IopNotifyFileSystemChange(PDEVICE_OBJECT DeviceObject, { PFS_CHANGE_NOTIFY_ENTRY ChangeEntry; PLIST_ENTRY Entry; - KIRQL oldlvl; - KeAcquireSpinLock(&FsChangeNotifyListLock,&oldlvl); + ExAcquireFastMutex(&FsChangeNotifyListLock); Entry = FsChangeNotifyListHead.Flink; while (Entry != &FsChangeNotifyListHead) { @@ -721,7 +720,7 @@ IopNotifyFileSystemChange(PDEVICE_OBJECT DeviceObject, Entry = Entry->Flink; } - KeReleaseSpinLock(&FsChangeNotifyListLock,oldlvl); + ExReleaseFastMutex(&FsChangeNotifyListLock); } @@ -743,9 +742,10 @@ IoRegisterFsRegistrationChange(IN PDRIVER_OBJECT DriverObject, Entry->DriverObject = DriverObject; Entry->FSDNotificationProc = FSDNotificationProc; - ExInterlockedInsertHeadList(&FsChangeNotifyListHead, - &Entry->FsChangeNotifyList, - &FsChangeNotifyListLock); + ExAcquireFastMutex(&FsChangeNotifyListLock); + InsertHeadList(&FsChangeNotifyListHead, + &Entry->FsChangeNotifyList); + ExReleaseFastMutex(&FsChangeNotifyListLock); return(STATUS_SUCCESS); } @@ -760,7 +760,6 @@ IoUnregisterFsRegistrationChange(IN PDRIVER_OBJECT DriverObject, { PFS_CHANGE_NOTIFY_ENTRY ChangeEntry; PLIST_ENTRY Entry; - KIRQL oldlvl; Entry = FsChangeNotifyListHead.Flink; while (Entry != &FsChangeNotifyListHead) @@ -769,9 +768,9 @@ IoUnregisterFsRegistrationChange(IN PDRIVER_OBJECT DriverObject, if (ChangeEntry->DriverObject == DriverObject && ChangeEntry->FSDNotificationProc == FSDNotificationProc) { - KeAcquireSpinLock(&FsChangeNotifyListLock,&oldlvl); + ExAcquireFastMutex(&FsChangeNotifyListLock); RemoveEntryList(Entry); - KeReleaseSpinLock(&FsChangeNotifyListLock,oldlvl); + ExReleaseFastMutex(&FsChangeNotifyListLock); ExFreePool(Entry); return; From 48bc6a5e5339cca08cfef1763a49c4b9b6aa385c Mon Sep 17 00:00:00 2001 From: Thomas Bluemel Date: Fri, 28 Jan 2005 22:43:13 +0000 Subject: [PATCH 059/185] added buffer checks to NtCreateThread() svn path=/trunk/; revision=13358 --- reactos/ntoskrnl/ps/create.c | 100 ++++++++++++++++++++++++++--------- 1 file changed, 74 insertions(+), 26 deletions(-) diff --git a/reactos/ntoskrnl/ps/create.c b/reactos/ntoskrnl/ps/create.c index 2f5660f0c87..d1256576320 100644 --- a/reactos/ntoskrnl/ps/create.c +++ b/reactos/ntoskrnl/ps/create.c @@ -421,7 +421,7 @@ PsInitializeThread(PEPROCESS Process, Status = ObCreateObject(UserMode, PsThreadType, ThreadAttributes, - UserMode, + KernelMode, NULL, sizeof(ETHREAD), 0, @@ -443,19 +443,6 @@ PsInitializeThread(PEPROCESS Process, } Thread->ThreadsProcess = Process; Thread->Cid.UniqueProcess = (HANDLE)Thread->ThreadsProcess->UniqueProcessId; - - Status = ObInsertObject ((PVOID)Thread, - NULL, - DesiredAccess, - 0, - NULL, - ThreadHandle); - if (!NT_SUCCESS(Status)) - { - ObDereferenceObject (Thread); - ObDereferenceObject (Process); - return Status; - } DPRINT("Thread = %x\n",Thread); @@ -488,8 +475,14 @@ PsInitializeThread(PEPROCESS Process, KeReleaseDispatcherDatabaseLock(oldIrql); *ThreadPtr = Thread; - - return(STATUS_SUCCESS); + + Status = ObInsertObject((PVOID)Thread, + NULL, + DesiredAccess, + 0, + NULL, + ThreadHandle); + return(Status); } @@ -663,17 +656,64 @@ NtCreateThread(OUT PHANDLE ThreadHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL, IN HANDLE ProcessHandle, - OUT PCLIENT_ID Client, + OUT PCLIENT_ID ClientId, IN PCONTEXT ThreadContext, IN PINITIAL_TEB InitialTeb, IN BOOLEAN CreateSuspended) { + HANDLE hThread; + CONTEXT SafeContext; + INITIAL_TEB SafeInitialTeb; PEPROCESS Process; PETHREAD Thread; PTEB TebBase; - NTSTATUS Status; PKAPC LdrInitApc; KIRQL oldIrql; + KPROCESSOR_MODE PreviousMode; + NTSTATUS Status = STATUS_SUCCESS; + + if(ThreadContext == NULL) + { + return STATUS_INVALID_PARAMETER; + } + + PreviousMode = ExGetPreviousMode(); + + if(PreviousMode != KernelMode) + { + _SEH_TRY + { + ProbeForWrite(ThreadHandle, + sizeof(HANDLE), + sizeof(ULONG)); + if(ClientId != NULL) + { + ProbeForWrite(ClientId, + sizeof(CLIENT_ID), + sizeof(ULONG)); + } + ProbeForRead(ThreadContext, + sizeof(CONTEXT), + sizeof(ULONG)); + SafeContext = *ThreadContext; + ThreadContext = &SafeContext; + ProbeForRead(InitialTeb, + sizeof(INITIAL_TEB), + sizeof(ULONG)); + SafeInitialTeb = *InitialTeb; + InitialTeb = &SafeInitialTeb; + } + _SEH_HANDLE + { + Status = _SEH_GetExceptionCode(); + } + _SEH_END; + + if(!NT_SUCCESS(Status)) + { + return Status; + } + } DPRINT("NtCreateThread(ThreadHandle %x, PCONTEXT %x)\n", ThreadHandle,ThreadContext); @@ -681,7 +721,7 @@ NtCreateThread(OUT PHANDLE ThreadHandle, Status = ObReferenceObjectByHandle(ProcessHandle, PROCESS_CREATE_THREAD, PsProcessType, - UserMode, + PreviousMode, (PVOID*)&Process, NULL); if(!NT_SUCCESS(Status)) @@ -691,7 +731,7 @@ NtCreateThread(OUT PHANDLE ThreadHandle, Status = PsInitializeThread(Process, &Thread, - ThreadHandle, + &hThread, DesiredAccess, ObjectAttributes, FALSE); @@ -721,11 +761,6 @@ NtCreateThread(OUT PHANDLE ThreadHandle, Thread->StartAddress = NULL; - if (Client != NULL) - { - *Client = Thread->Cid; - } - /* * Maybe send a message to the process's debugger */ @@ -767,8 +802,21 @@ NtCreateThread(OUT PHANDLE ThreadHandle, PsUnblockThread(Thread, NULL, 0); KeReleaseDispatcherDatabaseLock(oldIrql); + _SEH_TRY + { + if(ClientId != NULL) + { + *ClientId = Thread->Cid; + } + *ThreadHandle = hThread; + } + _SEH_HANDLE + { + Status = _SEH_GetExceptionCode(); + } + _SEH_END; - return(STATUS_SUCCESS); + return Status; } From 1291972098eb2acca89ebd612a0cedf2d584b2b4 Mon Sep 17 00:00:00 2001 From: Royce Mitchell III Date: Sat, 29 Jan 2005 03:15:05 +0000 Subject: [PATCH 060/185] remove eol whitespace svn path=/trunk/; revision=13359 --- reactos/ntoskrnl/mm/marea.c | 48 ++++++++++++++++++------------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/reactos/ntoskrnl/mm/marea.c b/reactos/ntoskrnl/mm/marea.c index 284a9a8c96f..6830f995a38 100644 --- a/reactos/ntoskrnl/mm/marea.c +++ b/reactos/ntoskrnl/mm/marea.c @@ -1,4 +1,4 @@ -/* $Id:$ +/* $Id$ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -60,13 +60,13 @@ static PMEMORY_AREA MmIterateNextNode(PMEMORY_AREA Node) else { PMEMORY_AREA TempNode = NULL; - + do { /* Check if we're at the end of tree. */ if (Node->Parent == NULL) return NULL; - + TempNode = Node; Node = Node->Parent; } @@ -113,13 +113,13 @@ static PMEMORY_AREA MmIteratePrevNode(PMEMORY_AREA Node) else { PMEMORY_AREA TempNode = NULL; - + do { /* Check if we're at the end of tree. */ if (Node->Parent == NULL) return NULL; - + TempNode = Node; Node = Node->Parent; } @@ -134,7 +134,7 @@ static VOID MmVerifyMemoryAreas(PMADDRESS_SPACE AddressSpace) PMEMORY_AREA Node; ASSERT(AddressSpace != NULL); - + /* Special case for empty tree. */ if (AddressSpace->MemoryAreaRoot == NULL) return; @@ -152,7 +152,7 @@ static VOID MmVerifyMemoryAreas(PMADDRESS_SPACE AddressSpace) } } #else -#define MmVerifyMemoryAreas(x) +#define MmVerifyMemoryAreas(x) #endif VOID STDCALL @@ -161,7 +161,7 @@ MmDumpMemoryAreas(PMADDRESS_SPACE AddressSpace) PMEMORY_AREA Node; DbgPrint("MmDumpMemoryAreas()\n"); - + /* Special case for empty tree. */ if (AddressSpace->MemoryAreaRoot == NULL) return; @@ -268,13 +268,13 @@ MmLocateMemoryAreaByRegion( * @name MmCompressHelper * * This is helper of MmRebalanceTree. Performs a compression transformation - * count times, starting at root. + * count times, starting at root. */ static VOID MmCompressHelper( PMADDRESS_SPACE AddressSpace, - ULONG Count) + ULONG Count) { PMEMORY_AREA Root = NULL; PMEMORY_AREA Red = AddressSpace->MemoryAreaRoot; @@ -328,13 +328,13 @@ MmRebalanceTree( CurrentNode = AddressSpace->MemoryAreaRoot; while (CurrentNode != NULL) { - if (CurrentNode->RightChild == NULL) + if (CurrentNode->RightChild == NULL) { PreviousNode = CurrentNode; CurrentNode = CurrentNode->LeftChild; NodeCount++; } - else + else { TempNode = CurrentNode->RightChild; @@ -358,7 +358,7 @@ MmRebalanceTree( /* Transform Vine back into a balanced tree. */ Leaves = NodeCount + 1; - for (;;) + for (;;) { ULONG Next = Leaves & (Leaves - 1); if (Next == 0) @@ -371,7 +371,7 @@ MmRebalanceTree( Vine = NodeCount - Leaves; Height = 1 + (Leaves > 0); - while (Vine > 1) + while (Vine > 1) { MmCompressHelper(AddressSpace, Vine / 2); Vine /= 2; @@ -407,14 +407,14 @@ MmInsertMemoryArea( ASSERT(marea->EndingAddress <= Node->StartingAddress || marea->StartingAddress >= Node->EndingAddress); ASSERT(marea->StartingAddress != Node->StartingAddress); - + PreviousNode = Node; - + if (marea->StartingAddress < Node->StartingAddress) Node = Node->LeftChild; else Node = Node->RightChild; - + if (Node) { Depth++; @@ -569,7 +569,7 @@ MmFindGapTopDown( /* Check for overflow. */ if (AlignedAddress > PreviousNode->StartingAddress) return NULL; - + if (Node->EndingAddress <= AlignedAddress) { DPRINT("MmFindGapTopDown: %p\n", AlignedAddress); @@ -689,7 +689,7 @@ MmInitMemoryAreas(VOID) * * Free an existing memory area. * - * @param AddressSpace + * @param AddressSpace * Address space to free the area from. * @param MemoryArea * Memory area we're about to free. @@ -721,7 +721,7 @@ MmFreeMemoryArea( KeAttachProcess(&AddressSpace->Process->Pcb); } - EndAddress = MM_ROUND_UP(MemoryArea->EndingAddress, PAGE_SIZE); + EndAddress = MM_ROUND_UP(MemoryArea->EndingAddress, PAGE_SIZE); for (Address = (ULONG_PTR)MemoryArea->StartingAddress; Address < (ULONG_PTR)EndAddress; Address += PAGE_SIZE) @@ -758,7 +758,7 @@ MmFreeMemoryArea( KeDetachProcess(); } - /* Remove the tree item. */ + /* Remove the tree item. */ { if (MemoryArea->Parent != NULL) { @@ -824,7 +824,7 @@ MmFreeMemoryArea( * * Free an existing memory area given a pointer inside it. * - * @param AddressSpace + * @param AddressSpace * Address space to free the area from. * @param BaseAddress * Address in the memory area we're about to free. @@ -875,7 +875,7 @@ MmFreeMemoryAreaByPtr( * * Create a memory area. * - * @param AddressSpace + * @param AddressSpace * Address space to create the area in. * @param Type * Type of the memory area. @@ -1000,7 +1000,7 @@ MmReleaseMemoryAreaIfDecommitted(PEPROCESS Process, PLIST_ENTRY Entry; PMM_REGION Region; BOOLEAN Reserved; - + MmVerifyMemoryAreas(AddressSpace); MemoryArea = MmLocateMemoryAreaByAddress(AddressSpace, BaseAddress); From a725df1b30397ab49ac4d34cde4ef1ba2b501ba9 Mon Sep 17 00:00:00 2001 From: Thomas Bluemel Date: Sat, 29 Jan 2005 12:24:15 +0000 Subject: [PATCH 061/185] securely access buffers in NtSetContextThread() and NtGetContextThread() svn path=/trunk/; revision=13360 --- reactos/ntoskrnl/ps/debug.c | 128 ++++++++++++++++++++++-------------- 1 file changed, 79 insertions(+), 49 deletions(-) diff --git a/reactos/ntoskrnl/ps/debug.c b/reactos/ntoskrnl/ps/debug.c index 07351e02b6f..0a74fe8cbc8 100644 --- a/reactos/ntoskrnl/ps/debug.c +++ b/reactos/ntoskrnl/ps/debug.c @@ -186,28 +186,43 @@ NtGetContextThread(IN HANDLE ThreadHandle, OUT PCONTEXT ThreadContext) { PETHREAD Thread; - NTSTATUS Status; CONTEXT Context; KAPC Apc; KEVENT Event; - NTSTATUS AStatus; + KPROCESSOR_MODE PreviousMode; + NTSTATUS Status = STATUS_SUCCESS; + + PreviousMode = ExGetPreviousMode(); - Status = MmCopyFromCaller(&Context, ThreadContext, sizeof(CONTEXT)); - if (! NT_SUCCESS(Status)) + if(PreviousMode != KernelMode) + { + _SEH_TRY + { + ProbeForWrite(ThreadContext, + sizeof(CONTEXT), + sizeof(ULONG)); + } + _SEH_HANDLE + { + Status = _SEH_GetExceptionCode(); + } + _SEH_END; + + if(!NT_SUCCESS(Status)) { return Status; } + } + Status = ObReferenceObjectByHandle(ThreadHandle, THREAD_GET_CONTEXT, PsThreadType, - UserMode, + PreviousMode, (PVOID*)&Thread, NULL); - if (! NT_SUCCESS(Status)) - { - return Status; - } - if (Thread == PsGetCurrentThread()) + if(NT_SUCCESS(Status)) + { + if(Thread == PsGetCurrentThread()) { /* * I don't know if trying to get your own context makes much @@ -215,15 +230,13 @@ NtGetContextThread(IN HANDLE ThreadHandle, */ KeTrapFrameToContext(Thread->Tcb.TrapFrame, &Context); - Status = STATUS_SUCCESS; } - else + else { KeInitializeEvent(&Event, NotificationEvent, - FALSE); - AStatus = STATUS_SUCCESS; - + FALSE); + KeInitializeApc(&Apc, &Thread->Tcb, OriginalApcEnvironment, @@ -234,7 +247,7 @@ NtGetContextThread(IN HANDLE ThreadHandle, (PVOID)&Context); if (!KeInsertQueueApc(&Apc, (PVOID)&Event, - (PVOID)&AStatus, + (PVOID)&Status, IO_NO_INCREMENT)) { Status = STATUS_THREAD_IS_TERMINATING; @@ -243,21 +256,27 @@ NtGetContextThread(IN HANDLE ThreadHandle, { Status = KeWaitForSingleObject(&Event, 0, - UserMode, + KernelMode, FALSE, NULL); - if (NT_SUCCESS(Status) && !NT_SUCCESS(AStatus)) - { - Status = AStatus; - } } } - if (NT_SUCCESS(Status)) + ObDereferenceObject(Thread); + + if(NT_SUCCESS(Status)) { - Status = MmCopyToCaller(ThreadContext, &Context, sizeof(Context)); + _SEH_TRY + { + *ThreadContext = Context; + } + _SEH_HANDLE + { + Status = _SEH_GetExceptionCode(); + } + _SEH_END; } - - ObDereferenceObject(Thread); + } + return Status; } @@ -291,29 +310,45 @@ NtSetContextThread(IN HANDLE ThreadHandle, IN PCONTEXT ThreadContext) { PETHREAD Thread; - NTSTATUS Status; KAPC Apc; KEVENT Event; - NTSTATUS AStatus; CONTEXT Context; - - Status = MmCopyFromCaller(&Context, ThreadContext, sizeof(CONTEXT)); - if (! NT_SUCCESS(Status)) + KPROCESSOR_MODE PreviousMode; + NTSTATUS Status = STATUS_SUCCESS; + + PreviousMode = ExGetPreviousMode(); + + if(PreviousMode != KernelMode) + { + _SEH_TRY + { + ProbeForRead(ThreadContext, + sizeof(CONTEXT), + sizeof(ULONG)); + Context = *ThreadContext; + ThreadContext = &Context; + } + _SEH_HANDLE + { + Status = _SEH_GetExceptionCode(); + } + _SEH_END; + + if(!NT_SUCCESS(Status)) { return Status; } + } + Status = ObReferenceObjectByHandle(ThreadHandle, THREAD_SET_CONTEXT, PsThreadType, - UserMode, + PreviousMode, (PVOID*)&Thread, NULL); - if (!NT_SUCCESS(Status)) - { - return Status; - } - - if (Thread == PsGetCurrentThread()) + if(NT_SUCCESS(Status)) + { + if (Thread == PsGetCurrentThread()) { /* * I don't know if trying to set your own context makes much @@ -321,14 +356,12 @@ NtSetContextThread(IN HANDLE ThreadHandle, */ KeContextToTrapFrame(&Context, Thread->Tcb.TrapFrame); - Status = STATUS_SUCCESS; } - else + else { KeInitializeEvent(&Event, NotificationEvent, FALSE); - AStatus = STATUS_SUCCESS; KeInitializeApc(&Apc, &Thread->Tcb, @@ -340,7 +373,7 @@ NtSetContextThread(IN HANDLE ThreadHandle, (PVOID)&Context); if (!KeInsertQueueApc(&Apc, (PVOID)&Event, - (PVOID)&AStatus, + (PVOID)&Status, IO_NO_INCREMENT)) { Status = STATUS_THREAD_IS_TERMINATING; @@ -349,17 +382,14 @@ NtSetContextThread(IN HANDLE ThreadHandle, { Status = KeWaitForSingleObject(&Event, 0, - UserMode, + KernelMode, FALSE, - NULL); - if (NT_SUCCESS(Status) && !NT_SUCCESS(AStatus)) - { - Status = AStatus; - } + NULL); } } - - ObDereferenceObject(Thread); + ObDereferenceObject(Thread); + } + return Status; } From b3f22aba55849ed96ec7b940e31c5de29a4977cc Mon Sep 17 00:00:00 2001 From: Thomas Bluemel Date: Sat, 29 Jan 2005 15:29:20 +0000 Subject: [PATCH 062/185] fixed compiling with optimizations svn path=/trunk/; revision=13361 --- reactos/lib/rosky/libskygi/libskygi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reactos/lib/rosky/libskygi/libskygi.c b/reactos/lib/rosky/libskygi/libskygi.c index 0d0e25c23bf..5f7c433b62d 100644 --- a/reactos/lib/rosky/libskygi/libskygi.c +++ b/reactos/lib/rosky/libskygi/libskygi.c @@ -900,7 +900,7 @@ GC_blit_from_DIB(GC *Gc, { int Result; HDC hSrcDC; - HBITMAP hOldBitmap; + HBITMAP hOldBitmap = NULL; DBG("GC_blit_from_DIB(0x%x, 0x%x, 0x%x, 0x%x)\n", Gc, Dib, X, Y); @@ -1165,7 +1165,7 @@ GI_messagebox(s_window *Window, MbFlags = MB_YESNOCANCEL; else if (Flags & WGF_MB_YESNO) MbFlags = MB_YESNO; - else if (Flags & WGF_MB_OK) + else /* if (Flags & WGF_MB_OK) */ MbFlags = MB_OK; MbFlags |= (Flags & WGF_MB_ICON_INFO) ? MB_ICONASTERISK : 0; MbFlags |= (Flags & WGF_MB_ICON_ASK) ? MB_ICONQUESTION : 0; From 5f08703823a2c573ee9de98a2be8088de8e0613d Mon Sep 17 00:00:00 2001 From: Martin Fuchs Date: Sat, 29 Jan 2005 17:39:09 +0000 Subject: [PATCH 063/185] border for address bar svn path=/trunk/; revision=13362 --- reactos/subsys/system/ibrowser/mainframe.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/subsys/system/ibrowser/mainframe.cpp b/reactos/subsys/system/ibrowser/mainframe.cpp index d33c9ece145..dc1af6b52f7 100644 --- a/reactos/subsys/system/ibrowser/mainframe.cpp +++ b/reactos/subsys/system/ibrowser/mainframe.cpp @@ -102,7 +102,7 @@ MainFrameBase::MainFrameBase(HWND hwnd) DrawText(canvas, TEXT("My"), -1, &rect, DT_SINGLELINE|DT_NOPREFIX|DT_CALCRECT); HFONT hfont = GetStockFont(DEFAULT_GUI_FONT); - _haddressedit = CreateWindow(TEXT("EDIT"), NULL, WS_CHILD|WS_VISIBLE, 0, 0, 0, rect.bottom, + _haddressedit = CreateWindow(TEXT("EDIT"), NULL, WS_CHILD|WS_VISIBLE|WS_BORDER, 0, 0, 0, rect.bottom, hwnd, (HMENU)IDW_ADDRESSBAR, g_hInstance, 0); SetWindowFont(_haddressedit, hfont, FALSE); new EditController(_haddressedit); From deee81164bcadb96815f3da76d09b2271d2e87ec Mon Sep 17 00:00:00 2001 From: Steven Edwards Date: Sat, 29 Jan 2005 20:16:48 +0000 Subject: [PATCH 064/185] Allow IntEngExtEscape stub to return something. svn path=/trunk/; revision=13363 --- reactos/subsys/win32k/objects/print.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/subsys/win32k/objects/print.c b/reactos/subsys/win32k/objects/print.c index ded76b90b20..29dd8beca4c 100644 --- a/reactos/subsys/win32k/objects/print.c +++ b/reactos/subsys/win32k/objects/print.c @@ -93,7 +93,7 @@ IntEngExtEscape( if (Escape == 0x1101) return 0; - UNIMPLEMENTED; + DPRINT1("IntEngExtEscape is nimplemented. - Keep going and have a nice day\n"); return -1; } From 7aefb1c881622a61eccf4c20da3cc5e2c6fb60eb Mon Sep 17 00:00:00 2001 From: Gunnar Dalsnes Date: Sat, 29 Jan 2005 22:36:52 +0000 Subject: [PATCH 065/185] msvcrt: fix incorrect export misc svn path=/trunk/; revision=13364 --- reactos/lib/crt/stdio/vfscanf.c | 6 ------ reactos/lib/crtdll/makefile | 15 ++------------- reactos/lib/msvcrt/Makefile | 15 ++------------- reactos/lib/msvcrt/msvcrt.def | 2 +- 4 files changed, 5 insertions(+), 33 deletions(-) diff --git a/reactos/lib/crt/stdio/vfscanf.c b/reactos/lib/crt/stdio/vfscanf.c index d9ceb2f8ba5..d4e7de6cb5d 100644 --- a/reactos/lib/crt/stdio/vfscanf.c +++ b/reactos/lib/crt/stdio/vfscanf.c @@ -32,7 +32,6 @@ #include #include -#define CHECKPOINT1 do{ char a[30]; sprintf(a,"%i\n",__LINE__); OutputDebugStringA(a); } while(0) #ifdef __USE_W32API int __set_errno(int err); @@ -81,7 +80,6 @@ unsigned long int __strtoul_internal (const char *__nptr, char **__endptr, int } while (0) # define conv_error() do { \ funlockfile (s); \ - CHECKPOINT1; \ return done; \ } while (0) # define input_error() do { \ @@ -899,18 +897,14 @@ number: if (flags & (LONG|LONGDBL)) { double d = __strtod_internal (wp, &tw, flags & GROUP); - CHECKPOINT1; if (!(flags & SUPPRESS) && tw != wp){ - CHECKPOINT1; *ARG (double *) = negative ? -d : d; } } else { float d = __strtof_internal (wp, &tw, flags & GROUP); - CHECKPOINT1; if (!(flags & SUPPRESS) && tw != wp){ - CHECKPOINT1; *ARG (float *) = negative ? -d : d; } } diff --git a/reactos/lib/crtdll/makefile b/reactos/lib/crtdll/makefile index ef83d41b95b..1145c2aba1a 100644 --- a/reactos/lib/crtdll/makefile +++ b/reactos/lib/crtdll/makefile @@ -15,7 +15,7 @@ TARGET_BASE = $(TARGET_BASE_LIB_CRTDLL) # don't remove @nn from exported symbols - needed so dlltool doesn't mess up mangled c++ exports RM_AT_FROM_SYMBOLS = no -TARGET_LFLAGS = -nostartfiles -nostdlib --enable-stdcall-fixup +TARGET_LFLAGS = -nostartfiles -nostdlib TARGET_SDKLIBS = crt.a string.a kernel32.a ntdll.a wine.a @@ -33,21 +33,10 @@ TARGET_CFLAGS += \ -DUSE_MSVCRT_PREFIX \ -D_MT -TARGET_OBJECTS = $(TARGET_NAME).o - -TARGET_CLEAN = dllmain.o +TARGET_OBJECTS = dllmain.o include $(PATH_TO_TOP)/rules.mak include $(TOOLS_PATH)/helper.mk - - - -OBJECTS = dllmain.o - -$(TARGET_NAME).o: $(OBJECTS) - $(LD) -r $(OBJECTS) -o $(TARGET_NAME).o - - # EOF diff --git a/reactos/lib/msvcrt/Makefile b/reactos/lib/msvcrt/Makefile index d30005860cb..86fed1639d3 100644 --- a/reactos/lib/msvcrt/Makefile +++ b/reactos/lib/msvcrt/Makefile @@ -15,7 +15,7 @@ TARGET_BASE = $(TARGET_BASE_LIB_MSVCRT) # don't remove @nn from exported symbols - needed so dlltool doesn't mess up mangled c++ exports RM_AT_FROM_SYMBOLS = no -TARGET_LFLAGS = -nostartfiles -nostdlib --enable-stdcall-fixup +TARGET_LFLAGS = -nostartfiles -nostdlib TARGET_SDKLIBS = crt.a string.a kernel32.a ntdll.a wine.a @@ -33,21 +33,10 @@ TARGET_CFLAGS += \ -DUSE_MSVCRT_PREFIX \ -D_MT -TARGET_OBJECTS = $(TARGET_NAME).o - -TARGET_CLEAN = dllmain.o +TARGET_OBJECTS = dllmain.o include $(PATH_TO_TOP)/rules.mak include $(TOOLS_PATH)/helper.mk - - - -OBJECTS = dllmain.o - -$(TARGET_NAME).o: $(OBJECTS) - $(LD) -r $(OBJECTS) -o $(TARGET_NAME).o - - # EOF diff --git a/reactos/lib/msvcrt/msvcrt.def b/reactos/lib/msvcrt/msvcrt.def index d94d1fb1e90..cc17d63d370 100644 --- a/reactos/lib/msvcrt/msvcrt.def +++ b/reactos/lib/msvcrt/msvcrt.def @@ -481,7 +481,7 @@ _scalb ;_scprintf ;_scwprintf _searchenv -_seh_longjmp_unwind@4 +_seh_longjmp_unwind=_seh_longjmp_unwind@4 ;_set_error_mode ;_set_SSE2_enable ;_set_sbh_threshold From fb168220551ff9eb945f151f03b4700351003461 Mon Sep 17 00:00:00 2001 From: Filip Navara Date: Sun, 30 Jan 2005 09:46:15 +0000 Subject: [PATCH 066/185] Don't shutdown devices before flushing registry and shutting down filesystems. svn path=/trunk/; revision=13365 --- reactos/ntoskrnl/ex/power.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reactos/ntoskrnl/ex/power.c b/reactos/ntoskrnl/ex/power.c index 8d33ce70927..6603c8a3c54 100644 --- a/reactos/ntoskrnl/ex/power.c +++ b/reactos/ntoskrnl/ex/power.c @@ -1,4 +1,4 @@ -/* $Id:$ +/* $Id$ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -45,9 +45,9 @@ ShutdownThreadMain(PVOID Context) /* Run the thread on the boot processor */ KeSetSystemAffinityThread(1); - IoShutdownRegisteredDevices(); CmShutdownRegistry(); IoShutdownRegisteredFileSystems(); + IoShutdownRegisteredDevices(); PiShutdownProcessManager(); MiShutdownMemoryManager(); From fe2f2f66fc6ba6e0636806ad5eb04bbcdbf7a881 Mon Sep 17 00:00:00 2001 From: Filip Navara Date: Sun, 30 Jan 2005 12:56:12 +0000 Subject: [PATCH 067/185] Attempt to solve the imfamous WM_NCPAINT handle leak. The message handler isn't required to delete the region handle while it's also valid to delete it (eg. by calling GetDCEx with it). Thus we have to send the WM_NCPAINT message only synchronously and verify the handle after the SendMessage call. svn path=/trunk/; revision=13366 --- reactos/include/win32k/gdiobj.h | 2 + reactos/subsys/win32k/ntuser/painting.c | 73 ++++++++++++++----------- reactos/subsys/win32k/objects/gdiobj.c | 23 +++++--- 3 files changed, 57 insertions(+), 41 deletions(-) diff --git a/reactos/include/win32k/gdiobj.h b/reactos/include/win32k/gdiobj.h index 71c699a6e8d..8d94dfa85a2 100644 --- a/reactos/include/win32k/gdiobj.h +++ b/reactos/include/win32k/gdiobj.h @@ -51,6 +51,8 @@ #define GDI_OBJECT_TYPE_MEMDC 0x00750000 #define GDI_OBJECT_TYPE_DCE 0x00770000 #define GDI_OBJECT_TYPE_DONTCARE 0x007f0000 +/** Not really an object type. Forces GDI_FreeObj to be silent. */ +#define GDI_OBJECT_TYPE_SILENT 0x80000000 /*@}*/ typedef PVOID PGDIOBJ; diff --git a/reactos/subsys/win32k/ntuser/painting.c b/reactos/subsys/win32k/ntuser/painting.c index 3dd765ba674..9fb5e70aecd 100644 --- a/reactos/subsys/win32k/ntuser/painting.c +++ b/reactos/subsys/win32k/ntuser/painting.c @@ -105,6 +105,11 @@ IntPaintWindows(PWINDOW_OBJECT Window, ULONG Flags) MsqDecPaintCountQueue(Window->MessageQueue); IntUnLockWindowUpdate(Window); IntSendMessage(hWnd, WM_NCPAINT, (WPARAM)TempRegion, 0); + if ((HANDLE) 1 != TempRegion && NULL != TempRegion) + { + /* NOTE: The region can already be deleted! */ + GDIOBJ_FreeObj(TempRegion, GDI_OBJECT_TYPE_REGION | GDI_OBJECT_TYPE_SILENT); + } } if (Window->Flags & WINDOWOBJECT_NEED_ERASEBKGND) @@ -630,29 +635,9 @@ IntGetPaintMessage(HWND hWnd, UINT MsgFilterMin, UINT MsgFilterMax, if (Window != NULL) { IntLockWindowUpdate(Window); - if (0 != (Window->Flags & WINDOWOBJECT_NEED_NCPAINT) - && ((0 == MsgFilterMin && 0 == MsgFilterMax) || - (MsgFilterMin <= WM_NCPAINT && - WM_NCPAINT <= MsgFilterMax))) - { - Message->message = WM_NCPAINT; - Message->wParam = (WPARAM)Window->NCUpdateRegion; - Message->lParam = 0; - if (Remove) - { - if ((HANDLE) 1 != Window->NCUpdateRegion && - NULL != Window->NCUpdateRegion) - { - GDIOBJ_SetOwnership(Window->NCUpdateRegion, PsGetCurrentProcess()); - } - IntValidateParent(Window, Window->NCUpdateRegion); - Window->NCUpdateRegion = NULL; - Window->Flags &= ~WINDOWOBJECT_NEED_NCPAINT; - MsqDecPaintCountQueue(Window->MessageQueue); - } - } else if ((0 == MsgFilterMin && 0 == MsgFilterMax) || - (MsgFilterMin <= WM_PAINT && - WM_PAINT <= MsgFilterMax)) + + if ((MsgFilterMin == 0 && MsgFilterMax == 0) || + (MsgFilterMin <= WM_PAINT && WM_PAINT <= MsgFilterMax)) { Message->message = WM_PAINT; Message->wParam = Message->lParam = 0; @@ -737,6 +722,28 @@ NtUserBeginPaint(HWND hWnd, PAINTSTRUCT* UnsafePs) NtUserHideCaret(hWnd); + if (Window->Flags & WINDOWOBJECT_NEED_NCPAINT) + { + HRGN hRgn; + + if (Window->NCUpdateRegion != (HANDLE)1 && + Window->NCUpdateRegion != NULL) + { + GDIOBJ_SetOwnership(Window->NCUpdateRegion, PsGetCurrentProcess()); + } + hRgn = Window->NCUpdateRegion; + IntValidateParent(Window, Window->NCUpdateRegion); + Window->NCUpdateRegion = NULL; + Window->Flags &= ~WINDOWOBJECT_NEED_NCPAINT; + MsqDecPaintCountQueue(Window->MessageQueue); + IntSendMessage(hWnd, WM_NCPAINT, (WPARAM)hRgn, 0); + if (hRgn != (HANDLE)1 && hRgn != NULL) + { + /* NOTE: The region can already by deleted! */ + GDIOBJ_FreeObj(hRgn, GDI_OBJECT_TYPE_REGION | GDI_OBJECT_TYPE_SILENT); + } + } + RtlZeroMemory(&Ps, sizeof(PAINTSTRUCT)); Ps.hdc = NtUserGetDCEx(hWnd, 0, DCX_INTERSECTUPDATE | DCX_WINDOWPAINT | DCX_USESTYLE); @@ -754,17 +761,17 @@ NtUserBeginPaint(HWND hWnd, PAINTSTRUCT* UnsafePs) IntValidateParent(Window, Window->UpdateRegion); Rgn = RGNDATA_LockRgn(Window->UpdateRegion); if (NULL != Rgn) - { - UnsafeIntGetRgnBox(Rgn, &Ps.rcPaint); - RGNDATA_UnlockRgn(Window->UpdateRegion); - IntGdiOffsetRect(&Ps.rcPaint, - Window->WindowRect.left - Window->ClientRect.left, - Window->WindowRect.top - Window->ClientRect.top); - } + { + UnsafeIntGetRgnBox(Rgn, &Ps.rcPaint); + RGNDATA_UnlockRgn(Window->UpdateRegion); + IntGdiOffsetRect(&Ps.rcPaint, + Window->WindowRect.left - Window->ClientRect.left, + Window->WindowRect.top - Window->ClientRect.top); + } else - { - IntGetClientRect(Window, &Ps.rcPaint); - } + { + IntGetClientRect(Window, &Ps.rcPaint); + } GDIOBJ_SetOwnership(Window->UpdateRegion, PsGetCurrentProcess()); NtGdiDeleteObject(Window->UpdateRegion); Window->UpdateRegion = NULL; diff --git a/reactos/subsys/win32k/objects/gdiobj.c b/reactos/subsys/win32k/objects/gdiobj.c index 0be5dc8e9d7..79902d92b1e 100644 --- a/reactos/subsys/win32k/objects/gdiobj.c +++ b/reactos/subsys/win32k/objects/gdiobj.c @@ -467,6 +467,7 @@ GDIOBJ_FreeObj(HGDIOBJ hObj, DWORD ObjectType) PPAGED_LOOKASIDE_LIST LookasideList; HANDLE ProcessId, LockedProcessId, PrevProcId; LONG ExpectedType; + BOOL Silent; #ifdef GDI_DEBUG ULONG Attempts = 0; #endif @@ -485,6 +486,9 @@ GDIOBJ_FreeObj(HGDIOBJ hObj, DWORD ObjectType) ProcessId = PsGetCurrentProcessId(); LockedProcessId = (HANDLE)((ULONG_PTR)ProcessId | 0x1); + Silent = (ObjectType & GDI_OBJECT_TYPE_SILENT); + ObjectType &= ~GDI_OBJECT_TYPE_SILENT; + ExpectedType = ((ObjectType != GDI_OBJECT_TYPE_DONTCARE) ? ObjectType : 0); Entry = GDI_HANDLE_GET_ENTRY(HandleTable, hObj); @@ -577,17 +581,20 @@ LockHandle: } else { - if(((ULONG_PTR)PrevProcId & 0x1) == 0) + if(!Silent) { - DPRINT1("Attempted to free global gdi handle 0x%x, caller needs to get ownership first!!!", hObj); - } - else - { - DPRINT1("Attempted to free foreign handle: 0x%x Owner: 0x%x from Caller: 0x%x\n", hObj, (ULONG_PTR)PrevProcId & ~0x1, (ULONG_PTR)ProcessId & ~0x1); - } + if(((ULONG_PTR)PrevProcId & ~0x1) == 0) + { + DPRINT1("Attempted to free global gdi handle 0x%x, caller needs to get ownership first!!!\n", hObj); + } + else + { + DPRINT1("Attempted to free foreign handle: 0x%x Owner: 0x%x from Caller: 0x%x\n", hObj, (ULONG_PTR)PrevProcId & ~0x1, (ULONG_PTR)ProcessId & ~0x1); + } #ifdef GDI_DEBUG - DPRINT1("-> called from %s:%i\n", file, line); + DPRINT1("-> called from %s:%i\n", file, line); #endif + } } return FALSE; From 84b7df286110e6ddd6adee3b426acddadfa6432c Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Sun, 30 Jan 2005 13:48:51 +0000 Subject: [PATCH 068/185] - Implement IsUserAdmin (untested), MultiByteToUnicode and UnicodeToMultiByte. - Sort prototypes in setupapi.h. svn path=/trunk/; revision=13367 --- reactos/include/wine/setupapi.h | 161 +++++++++++++------------- reactos/lib/setupapi/misc.c | 176 ++++++++++++++++++++++++++++- reactos/lib/setupapi/setupapi.spec | 10 +- 3 files changed, 261 insertions(+), 86 deletions(-) diff --git a/reactos/include/wine/setupapi.h b/reactos/include/wine/setupapi.h index a64f2cb6aa3..bc534e23962 100644 --- a/reactos/include/wine/setupapi.h +++ b/reactos/include/wine/setupapi.h @@ -664,90 +664,26 @@ DECL_WINELIB_SETUPAPI_TYPE_AW(PFILEPATHS) #define SPDRP_INSTALL_STATE 0x00000022 #define SPDRP_MAXIMUM_PROPERTY 0x00000023 -void WINAPI InstallHinfSectionA( HWND hwnd, HINSTANCE handle, LPCSTR cmdline, INT show ); -void WINAPI InstallHinfSectionW( HWND hwnd, HINSTANCE handle, LPCWSTR cmdline, INT show ); + +LONG WINAPI AddTagToGroupOrderList(PCWSTR lpGroupName, DWORD dwUnknown2, DWORD dwUnknown3); +PWSTR WINAPI DuplicateString(PCWSTR lpSrc); +void WINAPI InstallHinfSectionA( HWND hwnd, HINSTANCE handle, PCSTR cmdline, INT show ); +void WINAPI InstallHinfSectionW( HWND hwnd, HINSTANCE handle, PCWSTR cmdline, INT show ); #define InstallHinfSection WINELIB_NAME_AW(InstallHinfSection) -HINF WINAPI SetupOpenInfFileA( PCSTR name, PCSTR pszclass, DWORD style, UINT *error ); -HINF WINAPI SetupOpenInfFileW( PCWSTR name, PCWSTR pszclass, DWORD style, UINT *error ); -#define SetupOpenInfFile WINELIB_NAME_AW(SetupOpenInfFile) -BOOL WINAPI SetupOpenAppendInfFileA( PCSTR, HINF, UINT * ); -BOOL WINAPI SetupOpenAppendInfFileW( PCWSTR, HINF, UINT * ); -#define SetupOpenAppendInfFile WINELIB_NAME_AW(SetupOpenAppendInfFile) -HINF WINAPI SetupOpenMasterInf( VOID ); -void WINAPI SetupCloseInfFile( HINF hinf ); -BOOL WINAPI SetupGetLineByIndexA( HINF, PCSTR, DWORD, INFCONTEXT * ); -BOOL WINAPI SetupGetLineByIndexW( HINF, PCWSTR, DWORD, INFCONTEXT * ); -#define SetupGetLineByIndex WINELIB_NAME_AW(SetupGetLineByIndex) -LONG WINAPI SetupGetLineCountA( HINF hinf, PCSTR section ); -LONG WINAPI SetupGetLineCountW( HINF hinf, PCWSTR section ); -#define SetupGetLineCount WINELIB_NAME_AW(SetupGetLineCount) -BOOL WINAPI SetupFindFirstLineA( HINF hinf, PCSTR section, PCSTR key, INFCONTEXT *context ); -BOOL WINAPI SetupFindFirstLineW( HINF hinf, PCWSTR section, PCWSTR key, INFCONTEXT *context ); -#define SetupFindFirstLine WINELIB_NAME_AW(SetupFindFirstLine) -BOOL WINAPI SetupFindNextLine( PINFCONTEXT context_in, PINFCONTEXT context_out ); -BOOL WINAPI SetupFindNextMatchLineA( PINFCONTEXT context_in, PCSTR key, PINFCONTEXT context_out ); -BOOL WINAPI SetupFindNextMatchLineW( PINFCONTEXT context_in, PCWSTR key, PINFCONTEXT context_out ); -#define SetupFindNextMatchLine WINELIB_NAME_AW(SetupFindNextMatchLine) -BOOL WINAPI SetupGetLineTextA( PINFCONTEXT context, HINF hinf, PCSTR section_name,PCSTR key_name, PSTR buffer, DWORD size, PDWORD required ); -BOOL WINAPI SetupGetLineTextW( PINFCONTEXT context, HINF hinf, PCWSTR section_name, PCWSTR key_name, PWSTR buffer, DWORD size, PDWORD required ); -#define SetupGetLineText WINELIB_NAME_AW(SetupGetLineText) -DWORD WINAPI SetupGetFieldCount( PINFCONTEXT context ); -BOOL WINAPI SetupGetIntField( PINFCONTEXT context, DWORD index, PINT result ); -BOOL WINAPI SetupGetStringFieldA( PINFCONTEXT context, DWORD index, PSTR buffer, DWORD size, PDWORD required ); -BOOL WINAPI SetupGetStringFieldW( PINFCONTEXT context, DWORD index, PWSTR buffer, DWORD size, PDWORD required ); -#define SetupGetStringField WINELIB_NAME_AW(SetupGetStringField) -BOOL WINAPI SetupGetBinaryField( PINFCONTEXT context, DWORD index, BYTE *buffer, DWORD size, LPDWORD required ); -BOOL WINAPI SetupGetMultiSzFieldA( PINFCONTEXT context, DWORD index, PSTR buffer, DWORD size, LPDWORD required ); -BOOL WINAPI SetupGetMultiSzFieldW( PINFCONTEXT context, DWORD index, PWSTR buffer, DWORD size, LPDWORD required ); -#define SetupGetMultiSzField WINELIB_NAME_AW(SetupGetMultiSzField) -BOOL WINAPI SetupSetDirectoryIdA( HINF, DWORD, PCSTR ); -BOOL WINAPI SetupSetDirectoryIdW( HINF, DWORD, PCWSTR ); -#define SetupSetDirectoryId WINELIB_NAME_AW(SetupSetDirectoryId) -HSPFILEQ WINAPI SetupOpenFileQueue(void); +BOOL WINAPI IsUserAdmin(VOID); +PWSTR WINAPI MultiByteToUnicode(PCSTR lpMultiByteStr, UINT uCodePage); +VOID WINAPI MyFree(PVOID lpMem); +PVOID WINAPI MyMalloc(DWORD dwSize); +PVOID WINAPI MyRealloc(PVOID lpSrc, DWORD dwSize); +LONG WINAPI QueryRegistryValue(HKEY, PCWSTR, PBYTE *, PDWORD, PDWORD); BOOL WINAPI SetupCloseFileQueue( HSPFILEQ ); -BOOL WINAPI SetupSetFileQueueAlternatePlatformA( HSPFILEQ, PSP_ALTPLATFORM_INFO, PCSTR ); -BOOL WINAPI SetupSetFileQueueAlternatePlatformW( HSPFILEQ, PSP_ALTPLATFORM_INFO, PCWSTR ); -#define SetupSetFileQueueAlternatePlatform WINELIB_NAME_AW(SetupSetFileQueueAlternatePlatform) -BOOL WINAPI SetupQueueCopyA(HSPFILEQ,PCSTR,PCSTR,PCSTR,PCSTR,PCSTR,PCSTR,PCSTR,DWORD); -BOOL WINAPI SetupQueueCopyW(HSPFILEQ,PCWSTR,PCWSTR,PCWSTR,PCWSTR,PCWSTR,PCWSTR,PCWSTR,DWORD); -#define SetupQueueCopy WINELIB_NAME_AW(SetupQueueCopy) -BOOL WINAPI SetupQueueCopyIndirectA( PSP_FILE_COPY_PARAMS_A ); -BOOL WINAPI SetupQueueCopyIndirectW( PSP_FILE_COPY_PARAMS_W ); -#define SetupQueueCopyIndirect WINELIB_NAME_AW(SetupQueueCopyIndirect) -BOOL WINAPI SetupQueueDefaultCopyA( HSPFILEQ, HINF, PCSTR, PCSTR, PCSTR, DWORD ); -BOOL WINAPI SetupQueueDefaultCopyW( HSPFILEQ, HINF, PCWSTR, PCWSTR, PCWSTR, DWORD ); -#define SetupQueueDefaultCopy WINELIB_NAME_AW(SetupQueueDefaultCopy) -BOOL WINAPI SetupQueueDeleteA( HSPFILEQ, PCSTR, PCSTR ); -BOOL WINAPI SetupQueueDeleteW( HSPFILEQ, PCWSTR, PCWSTR ); -#define SetupQueueDelete WINELIB_NAME_AW(SetupQueueDelete) -BOOL WINAPI SetupQueueRenameA( HSPFILEQ, PCSTR, PCSTR, PCSTR, PCSTR ); -BOOL WINAPI SetupQueueRenameW( HSPFILEQ, PCWSTR, PCWSTR, PCWSTR, PCWSTR ); -#define SetupQueueRename WINELIB_NAME_AW(SetupQueueRename) +void WINAPI SetupCloseInfFile( HINF hinf ); BOOL WINAPI SetupCommitFileQueueA( HWND, HSPFILEQ, PSP_FILE_CALLBACK_A, PVOID ); BOOL WINAPI SetupCommitFileQueueW( HWND, HSPFILEQ, PSP_FILE_CALLBACK_W, PVOID ); #define SetupCommitFileQueue WINELIB_NAME_AW(SetupCommitFileQueue) -BOOL WINAPI SetupScanFileQueueA( HSPFILEQ, DWORD, HWND, PSP_FILE_CALLBACK_A, PVOID, PDWORD ); -BOOL WINAPI SetupScanFileQueueW( HSPFILEQ, DWORD, HWND, PSP_FILE_CALLBACK_W, PVOID, PDWORD ); -#define SetupScanFileQueue WINELIB_NAME_AW(SetupScanFileQueue) -BOOL WINAPI SetupGetFileQueueCount( HSPFILEQ, UINT, PUINT ); -BOOL WINAPI SetupGetFileQueueFlags( HSPFILEQ, PDWORD ); -BOOL WINAPI SetupSetFileQueueFlags( HSPFILEQ, DWORD, DWORD ); -BOOL WINAPI SetupQueueCopySectionA( HSPFILEQ, PCSTR, HINF, HINF, PCSTR, DWORD ); -BOOL WINAPI SetupQueueCopySectionW( HSPFILEQ, PCWSTR, HINF, HINF, PCWSTR, DWORD ); -#define SetupQueueCopySection WINELIB_NAME_AW(SetupQueueCopySection) -BOOL WINAPI SetupQueueDeleteSectionA( HSPFILEQ, HINF, HINF, PCSTR ); -BOOL WINAPI SetupQueueDeleteSectionW( HSPFILEQ, HINF, HINF, PCWSTR ); -#define SetupQueueDeleteSection WINELIB_NAME_AW(SetupQueueDeleteSection) -BOOL WINAPI SetupQueueRenameSectionA( HSPFILEQ, HINF, HINF, PCSTR ); -BOOL WINAPI SetupQueueRenameSectionW( HSPFILEQ, HINF, HINF, PCWSTR ); -#define SetupQueueRenameSection WINELIB_NAME_AW(SetupQueueRenameSection) -PVOID WINAPI SetupInitDefaultQueueCallback( HWND ); -PVOID WINAPI SetupInitDefaultQueueCallbackEx( HWND, HWND, UINT, DWORD, PVOID ); -void WINAPI SetupTermDefaultQueueCallback( PVOID ); UINT WINAPI SetupDefaultQueueCallbackA( PVOID, UINT, UINT_PTR, UINT_PTR ); UINT WINAPI SetupDefaultQueueCallbackW( PVOID, UINT, UINT_PTR, UINT_PTR ); #define SetupDefaultQueueCallback WINELIB_NAME_AW(SetupDefaultQueueCallback) - BOOL WINAPI SetupDiBuildClassInfoList(DWORD, LPGUID, DWORD, PDWORD); BOOL WINAPI SetupDiBuildClassInfoListExA(DWORD, LPGUID, DWORD, PDWORD, PCSTR, PVOID); BOOL WINAPI SetupDiBuildClassInfoListExW(DWORD, LPGUID, DWORD, PDWORD, PCWSTR, PVOID); @@ -795,6 +731,35 @@ HKEY WINAPI SetupDiOpenClassRegKey(const GUID*, REGSAM); HKEY WINAPI SetupDiOpenClassRegKeyExA(const GUID*, REGSAM, DWORD, PCSTR, PVOID); HKEY WINAPI SetupDiOpenClassRegKeyExW(const GUID*, REGSAM, DWORD, PCWSTR, PVOID); #define SetupDiOpenClassRegKeyEx WINELIB_NAME_AW(SetupDiOpenClassRegKeyEx) +BOOL WINAPI SetupFindFirstLineA( HINF hinf, PCSTR section, PCSTR key, INFCONTEXT *context ); +BOOL WINAPI SetupFindFirstLineW( HINF hinf, PCWSTR section, PCWSTR key, INFCONTEXT *context ); +#define SetupFindFirstLine WINELIB_NAME_AW(SetupFindFirstLine) +BOOL WINAPI SetupFindNextLine( PINFCONTEXT context_in, PINFCONTEXT context_out ); +BOOL WINAPI SetupFindNextMatchLineA( PINFCONTEXT context_in, PCSTR key, PINFCONTEXT context_out ); +BOOL WINAPI SetupFindNextMatchLineW( PINFCONTEXT context_in, PCWSTR key, PINFCONTEXT context_out ); +#define SetupFindNextMatchLine WINELIB_NAME_AW(SetupFindNextMatchLine) +BOOL WINAPI SetupGetBinaryField( PINFCONTEXT context, DWORD index, BYTE *buffer, DWORD size, LPDWORD required ); +DWORD WINAPI SetupGetFieldCount( PINFCONTEXT context ); +BOOL WINAPI SetupGetFileQueueCount( HSPFILEQ, UINT, PUINT ); +BOOL WINAPI SetupGetFileQueueFlags( HSPFILEQ, PDWORD ); +BOOL WINAPI SetupGetIntField( PINFCONTEXT context, DWORD index, PINT result ); +BOOL WINAPI SetupGetLineByIndexA( HINF, PCSTR, DWORD, INFCONTEXT * ); +BOOL WINAPI SetupGetLineByIndexW( HINF, PCWSTR, DWORD, INFCONTEXT * ); +#define SetupGetLineByIndex WINELIB_NAME_AW(SetupGetLineByIndex) +LONG WINAPI SetupGetLineCountA( HINF hinf, PCSTR section ); +LONG WINAPI SetupGetLineCountW( HINF hinf, PCWSTR section ); +#define SetupGetLineCount WINELIB_NAME_AW(SetupGetLineCount) +BOOL WINAPI SetupGetLineTextA( PINFCONTEXT context, HINF hinf, PCSTR section_name,PCSTR key_name, PSTR buffer, DWORD size, PDWORD required ); +BOOL WINAPI SetupGetLineTextW( PINFCONTEXT context, HINF hinf, PCWSTR section_name, PCWSTR key_name, PWSTR buffer, DWORD size, PDWORD required ); +#define SetupGetLineText WINELIB_NAME_AW(SetupGetLineText) +BOOL WINAPI SetupGetMultiSzFieldA( PINFCONTEXT context, DWORD index, PSTR buffer, DWORD size, LPDWORD required ); +BOOL WINAPI SetupGetMultiSzFieldW( PINFCONTEXT context, DWORD index, PWSTR buffer, DWORD size, LPDWORD required ); +#define SetupGetMultiSzField WINELIB_NAME_AW(SetupGetMultiSzField) +BOOL WINAPI SetupGetStringFieldA( PINFCONTEXT context, DWORD index, PSTR buffer, DWORD size, PDWORD required ); +BOOL WINAPI SetupGetStringFieldW( PINFCONTEXT context, DWORD index, PWSTR buffer, DWORD size, PDWORD required ); +#define SetupGetStringField WINELIB_NAME_AW(SetupGetStringField) +PVOID WINAPI SetupInitDefaultQueueCallback( HWND ); +PVOID WINAPI SetupInitDefaultQueueCallbackEx( HWND, HWND, UINT, DWORD, PVOID ); BOOL WINAPI SetupInstallFilesFromInfSectionA( HINF, HINF, HSPFILEQ, PCSTR, PCSTR, UINT ); BOOL WINAPI SetupInstallFilesFromInfSectionW( HINF, HINF, HSPFILEQ, PCWSTR, PCWSTR, UINT ); #define SetupInstallFilesFromInfSection WINELIB_NAME_AW(SetupInstallFilesFromInfSection) @@ -806,6 +771,50 @@ BOOL WINAPI SetupInstallFromInfSectionW(HWND,HINF,PCWSTR,UINT,HKEY,PCWSTR,UI BOOL WINAPI SetupIterateCabinetA(PCSTR, DWORD, PSP_FILE_CALLBACK_A, PVOID); BOOL WINAPI SetupIterateCabinetW(PCWSTR, DWORD, PSP_FILE_CALLBACK_W, PVOID); #define SetupIterateCabinet WINELIB_NAME_AW(SetupIterateCabinet) +BOOL WINAPI SetupOpenAppendInfFileA( PCSTR, HINF, UINT * ); +BOOL WINAPI SetupOpenAppendInfFileW( PCWSTR, HINF, UINT * ); +#define SetupOpenAppendInfFile WINELIB_NAME_AW(SetupOpenAppendInfFile) +HSPFILEQ WINAPI SetupOpenFileQueue(void); +HINF WINAPI SetupOpenInfFileA( PCSTR name, PCSTR pszclass, DWORD style, UINT *error ); +HINF WINAPI SetupOpenInfFileW( PCWSTR name, PCWSTR pszclass, DWORD style, UINT *error ); +#define SetupOpenInfFile WINELIB_NAME_AW(SetupOpenInfFile) +HINF WINAPI SetupOpenMasterInf( VOID ); +BOOL WINAPI SetupQueueCopyA(HSPFILEQ,PCSTR,PCSTR,PCSTR,PCSTR,PCSTR,PCSTR,PCSTR,DWORD); +BOOL WINAPI SetupQueueCopyW(HSPFILEQ,PCWSTR,PCWSTR,PCWSTR,PCWSTR,PCWSTR,PCWSTR,PCWSTR,DWORD); +#define SetupQueueCopy WINELIB_NAME_AW(SetupQueueCopy) +BOOL WINAPI SetupQueueCopyIndirectA( PSP_FILE_COPY_PARAMS_A ); +BOOL WINAPI SetupQueueCopyIndirectW( PSP_FILE_COPY_PARAMS_W ); +#define SetupQueueCopyIndirect WINELIB_NAME_AW(SetupQueueCopyIndirect) +BOOL WINAPI SetupQueueCopySectionA( HSPFILEQ, PCSTR, HINF, HINF, PCSTR, DWORD ); +BOOL WINAPI SetupQueueCopySectionW( HSPFILEQ, PCWSTR, HINF, HINF, PCWSTR, DWORD ); +#define SetupQueueCopySection WINELIB_NAME_AW(SetupQueueCopySection) +BOOL WINAPI SetupQueueDefaultCopyA( HSPFILEQ, HINF, PCSTR, PCSTR, PCSTR, DWORD ); +BOOL WINAPI SetupQueueDefaultCopyW( HSPFILEQ, HINF, PCWSTR, PCWSTR, PCWSTR, DWORD ); +#define SetupQueueDefaultCopy WINELIB_NAME_AW(SetupQueueDefaultCopy) +BOOL WINAPI SetupQueueDeleteA( HSPFILEQ, PCSTR, PCSTR ); +BOOL WINAPI SetupQueueDeleteW( HSPFILEQ, PCWSTR, PCWSTR ); +#define SetupQueueDelete WINELIB_NAME_AW(SetupQueueDelete) +BOOL WINAPI SetupQueueDeleteSectionA( HSPFILEQ, HINF, HINF, PCSTR ); +BOOL WINAPI SetupQueueDeleteSectionW( HSPFILEQ, HINF, HINF, PCWSTR ); +#define SetupQueueDeleteSection WINELIB_NAME_AW(SetupQueueDeleteSection) +BOOL WINAPI SetupQueueRenameA( HSPFILEQ, PCSTR, PCSTR, PCSTR, PCSTR ); +BOOL WINAPI SetupQueueRenameW( HSPFILEQ, PCWSTR, PCWSTR, PCWSTR, PCWSTR ); +#define SetupQueueRename WINELIB_NAME_AW(SetupQueueRename) +BOOL WINAPI SetupQueueRenameSectionA( HSPFILEQ, HINF, HINF, PCSTR ); +BOOL WINAPI SetupQueueRenameSectionW( HSPFILEQ, HINF, HINF, PCWSTR ); +#define SetupQueueRenameSection WINELIB_NAME_AW(SetupQueueRenameSection) +BOOL WINAPI SetupScanFileQueueA( HSPFILEQ, DWORD, HWND, PSP_FILE_CALLBACK_A, PVOID, PDWORD ); +BOOL WINAPI SetupScanFileQueueW( HSPFILEQ, DWORD, HWND, PSP_FILE_CALLBACK_W, PVOID, PDWORD ); +#define SetupScanFileQueue WINELIB_NAME_AW(SetupScanFileQueue) +BOOL WINAPI SetupSetDirectoryIdA( HINF, DWORD, PCSTR ); +BOOL WINAPI SetupSetDirectoryIdW( HINF, DWORD, PCWSTR ); +#define SetupSetDirectoryId WINELIB_NAME_AW(SetupSetDirectoryId) +BOOL WINAPI SetupSetFileQueueAlternatePlatformA( HSPFILEQ, PSP_ALTPLATFORM_INFO, PCSTR ); +BOOL WINAPI SetupSetFileQueueAlternatePlatformW( HSPFILEQ, PSP_ALTPLATFORM_INFO, PCWSTR ); +#define SetupSetFileQueueAlternatePlatform WINELIB_NAME_AW(SetupSetFileQueueAlternatePlatform) +BOOL WINAPI SetupSetFileQueueFlags( HSPFILEQ, DWORD, DWORD ); +void WINAPI SetupTermDefaultQueueCallback( PVOID ); +PSTR WINAPI UnicodeToMultiByte(PCWSTR lpUnicodeStr, UINT uCodePage); #undef DECL_WINELIB_SETUPAPI_TYPE_AW diff --git a/reactos/lib/setupapi/misc.c b/reactos/lib/setupapi/misc.c index dfbe49bb047..56d6bd39c54 100644 --- a/reactos/lib/setupapi/misc.c +++ b/reactos/lib/setupapi/misc.c @@ -28,6 +28,9 @@ #include "setupapi.h" #include "wine/unicode.h" +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(setupapi); /************************************************************************** @@ -41,9 +44,9 @@ * RETURNS * None */ - VOID WINAPI MyFree(LPVOID lpMem) { + TRACE("%p\n", lpMem); HeapFree(GetProcessHeap(), 0, lpMem); } @@ -60,9 +63,9 @@ VOID WINAPI MyFree(LPVOID lpMem) * Success: pointer to allocated memory block * Failure: NULL */ - LPVOID WINAPI MyMalloc(DWORD dwSize) { + TRACE("%lu\n", dwSize); return HeapAlloc(GetProcessHeap(), 0, dwSize); } @@ -85,9 +88,10 @@ LPVOID WINAPI MyMalloc(DWORD dwSize) * If lpSrc is a NULL-pointer, then MyRealloc allocates a memory * block like MyMalloc. */ - LPVOID WINAPI MyRealloc(LPVOID lpSrc, DWORD dwSize) { + TRACE("%p %lu\n", lpSrc, dwSize); + if (lpSrc == NULL) return HeapAlloc(GetProcessHeap(), 0, dwSize); @@ -110,11 +114,12 @@ LPVOID WINAPI MyRealloc(LPVOID lpSrc, DWORD dwSize) * NOTES * Call MyFree() to release the duplicated string. */ - LPWSTR WINAPI DuplicateString(LPCWSTR lpSrc) { LPWSTR lpDst; + TRACE("%s\n", debugstr_w(lpSrc)); + lpDst = MyMalloc((lstrlenW(lpSrc) + 1) * sizeof(WCHAR)); if (lpDst == NULL) return NULL; @@ -145,7 +150,6 @@ LPWSTR WINAPI DuplicateString(LPCWSTR lpSrc) * NOTES * Use MyFree to release the lpData buffer. */ - LONG WINAPI QueryRegistryValue(HKEY hKey, LPCWSTR lpValueName, LPBYTE *lpData, @@ -154,6 +158,9 @@ LONG WINAPI QueryRegistryValue(HKEY hKey, { LONG lError; + TRACE("%lx %s %p %p %p\n", + hKey, debugstr_w(lpValueName), lpData, lpType, lpcbData); + /* Get required buffer size */ *lpcbData = 0; lError = RegQueryValueExW(hKey, lpValueName, 0, lpType, NULL, lpcbData); @@ -172,3 +179,162 @@ LONG WINAPI QueryRegistryValue(HKEY hKey, return lError; } + + +/************************************************************************** + * IsUserAdmin [SETUPAPI.@] + * + * Checks whether the current user is a member of the Administrators group. + * + * PARAMS + * None + * + * RETURNS + * Success: TRUE + * Failure: FALSE + */ +BOOL WINAPI IsUserAdmin(VOID) +{ + SID_IDENTIFIER_AUTHORITY Authority = {SECURITY_NT_AUTHORITY}; + HANDLE hToken; + DWORD dwSize; + PTOKEN_GROUPS lpGroups; + PSID lpSid; + DWORD i; + BOOL bResult = FALSE; + + TRACE("\n"); + + if (!OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &hToken)) + return FALSE; + + if (!GetTokenInformation(hToken, TokenGroups, NULL, 0, &dwSize)) + { + CloseHandle(hToken); + return FALSE; + } + + lpGroups = MyMalloc(dwSize); + if (lpGroups == NULL) + { + CloseHandle(hToken); + return FALSE; + } + + if (!GetTokenInformation(hToken, TokenGroups, lpGroups, dwSize, &dwSize)) + { + MyFree(lpGroups); + CloseHandle(hToken); + return FALSE; + } + + CloseHandle(hToken); + + if (!AllocateAndInitializeSid(&Authority, 2, SECURITY_BUILTIN_DOMAIN_RID, + DOMAIN_ALIAS_RID_ADMINS, 0, 0, 0, 0, 0, 0, + &lpSid)) + { + MyFree(lpGroups); + return FALSE; + } + + for (i = 0; i < lpGroups->GroupCount; i++) + { + if (EqualSid(lpSid, &lpGroups->Groups[i].Sid)) + { + bResult = TRUE; + break; + } + } + + FreeSid(lpSid); + MyFree(lpGroups); + + return bResult; +} + + +/************************************************************************** + * MultiByteToUnicode [SETUPAPI.@] + * + * Converts a multi-byte string to a Unicode string. + * + * PARAMS + * lpMultiByteStr [I] Multi-byte string to be converted + * uCodePage [I] Code page + * + * RETURNS + * Success: pointer to the converted Unicode string + * Failure: NULL + * + * NOTE + * Use MyFree to release the returned Unicode string. + */ +LPWSTR WINAPI MultiByteToUnicode(LPCSTR lpMultiByteStr, UINT uCodePage) +{ + LPWSTR lpUnicodeStr; + int nLength; + + TRACE("%s %lu\n", debugstr_a(lpMultiByteStr), uCodePage); + + nLength = MultiByteToWideChar(uCodePage, 0, lpMultiByteStr, + -1, NULL, 0); + if (nLength == 0) + return NULL; + + lpUnicodeStr = MyMalloc(nLength * sizeof(WCHAR)); + if (lpUnicodeStr == NULL) + return NULL; + + if (!MultiByteToWideChar(uCodePage, 0, lpMultiByteStr, + nLength, lpUnicodeStr, nLength)) + { + MyFree(lpUnicodeStr); + return NULL; + } + + return lpUnicodeStr; +} + + +/************************************************************************** + * UnicodeToMultiByte [SETUPAPI.@] + * + * Converts a Unicode string to a multi-byte string. + * + * PARAMS + * lpUnicodeStr [I] Unicode string to be converted + * uCodePage [I] Code page + * + * RETURNS + * Success: pointer to the converted multi-byte string + * Failure: NULL + * + * NOTE + * Use MyFree to release the returned multi-byte string. + */ +LPSTR WINAPI UnicodeToMultiByte(LPCWSTR lpUnicodeStr, UINT uCodePage) +{ + LPSTR lpMultiByteStr; + int nLength; + + TRACE("%s %lu\n", debugstr_w(lpUnicodeStr), uCodePage); + + nLength = WideCharToMultiByte(uCodePage, 0, lpUnicodeStr, -1, + NULL, 0, NULL, NULL); + if (nLength == 0) + return NULL; + + lpMultiByteStr = MyMalloc(nLength); + if (lpMultiByteStr == NULL) + return NULL; + + if (!WideCharToMultiByte(uCodePage, 0, lpUnicodeStr, -1, + lpMultiByteStr, nLength, NULL, NULL)) + { + MyFree(lpMultiByteStr); + return NULL; + } + + return lpMultiByteStr; +} diff --git a/reactos/lib/setupapi/setupapi.spec b/reactos/lib/setupapi/setupapi.spec index 22a164c6716..bed0ba5f6d0 100644 --- a/reactos/lib/setupapi/setupapi.spec +++ b/reactos/lib/setupapi/setupapi.spec @@ -97,8 +97,6 @@ @ stub CM_Get_Device_Interface_List_SizeW @ stub CM_Get_Device_Interface_List_Size_ExA @ stub CM_Get_Device_Interface_List_Size_ExW -@ stub CM_Request_Device_EjectA -@ stub CM_Request_Device_EjectW @ stub CM_Get_First_Log_Conf @ stub CM_Get_First_Log_Conf_Ex @ stub CM_Get_Global_State @@ -164,6 +162,8 @@ @ stub CM_Remove_SubTree_Ex @ stub CM_Remove_Unmarked_Children @ stub CM_Remove_Unmarked_Children_Ex +@ stub CM_Request_Device_EjectA +@ stub CM_Request_Device_EjectW @ stub CM_Request_Eject_PC @ stub CM_Reset_Children_Marks @ stub CM_Reset_Children_Marks_Ex @@ -214,10 +214,10 @@ @ stdcall InstallHinfSectionW(long long wstr long) @ stub InstallStop @ stub InstallStopEx -@ stub IsUserAdmin +@ stdcall IsUserAdmin() @ stub LookUpStringInTable @ stub MemoryInitialize -@ stub MultiByteToUnicode +@ stdcall MultiByteToUnicode(str long) @ stub MultiSzFromSearchControl @ stdcall MyFree(ptr) @ stub MyGetFileTitle @@ -527,7 +527,7 @@ @ stub StringTableStringFromId @ stub StringTableTrim @ stub TakeOwnershipOfFile -@ stub UnicodeToMultiByte +@ stdcall UnicodeToMultiByte(wstr long) @ stub UnmapAndCloseFile @ stub VerifyCatalogFile @ stub VerifyFile From 36cdd4e24b99634ff2d65af0630c5ecaf55e62ba Mon Sep 17 00:00:00 2001 From: Thomas Bluemel Date: Sun, 30 Jan 2005 15:27:13 +0000 Subject: [PATCH 069/185] fixed warnings when compiling with DBG:=1 and OPTIMIZE:=1 svn path=/trunk/; revision=13368 --- reactos/lib/kjs/ksrc/ejumps.h | 2 ++ reactos/lib/kjs/ksrc/eswitch.h | 2 ++ reactos/lib/kjs/ksrc/eswt0.h | 2 ++ 3 files changed, 6 insertions(+) diff --git a/reactos/lib/kjs/ksrc/ejumps.h b/reactos/lib/kjs/ksrc/ejumps.h index d5c0183790a..4717d66fddc 100644 --- a/reactos/lib/kjs/ksrc/ejumps.h +++ b/reactos/lib/kjs/ksrc/ejumps.h @@ -1175,6 +1175,7 @@ op_div: case JS_NAN: default: nan = 1; + l = 0.0; break; } @@ -1202,6 +1203,7 @@ op_div: case JS_NAN: default: nan = 1; + r = 0.0; break; } diff --git a/reactos/lib/kjs/ksrc/eswitch.h b/reactos/lib/kjs/ksrc/eswitch.h index 2836a8f84d5..41c6634b35b 100644 --- a/reactos/lib/kjs/ksrc/eswitch.h +++ b/reactos/lib/kjs/ksrc/eswitch.h @@ -1135,6 +1135,7 @@ case 41: case JS_NAN: default: nan = 1; + l = 0.0; break; } @@ -1162,6 +1163,7 @@ case 41: case JS_NAN: default: nan = 1; + r = 0.0; break; } diff --git a/reactos/lib/kjs/ksrc/eswt0.h b/reactos/lib/kjs/ksrc/eswt0.h index d0dc1acc68c..60b593ec3ed 100644 --- a/reactos/lib/kjs/ksrc/eswt0.h +++ b/reactos/lib/kjs/ksrc/eswt0.h @@ -1133,6 +1133,7 @@ case 41: case JS_NAN: default: nan = 1; + l = 0.0; break; } @@ -1160,6 +1161,7 @@ case 41: case JS_NAN: default: nan = 1; + r = 0.0; break; } From 418a089cb368f12dfe7928065f083a8e08becd26 Mon Sep 17 00:00:00 2001 From: Filip Navara Date: Sun, 30 Jan 2005 19:40:24 +0000 Subject: [PATCH 070/185] Force non-inlining of ctype functions even in OPTIMIZED builds. Fixes bug #497. svn path=/trunk/; revision=13369 --- reactos/lib/kjs/makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/lib/kjs/makefile b/reactos/lib/kjs/makefile index 8568accd506..7a0295ca8d9 100644 --- a/reactos/lib/kjs/makefile +++ b/reactos/lib/kjs/makefile @@ -18,7 +18,7 @@ TARGET_TYPE = library TARGET_NAME = kjs -TARGET_CFLAGS = -g -D__NTKJS__ -Werror -Wall -I. -Isrc -Iinclude +TARGET_CFLAGS = -g -D__NTKJS__ -D__NO_INLINE__ -Werror -Wall -I. -Isrc -Iinclude # require os code to explicitly request A/W version of structs/functions TARGET_CFLAGS += -D_DISABLE_TIDENTS From 949f9a7ff637c8b3b4facb2ae7baca211af42917 Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Mon, 31 Jan 2005 12:49:46 +0000 Subject: [PATCH 071/185] - Implement DoesUserHavePrivilege and EnablePrivilege. - Fix IsUserAdmin. svn path=/trunk/; revision=13370 --- reactos/include/wine/setupapi.h | 2 + reactos/lib/setupapi/misc.c | 124 ++++++++++++++++++++++++++++- reactos/lib/setupapi/setupapi.spec | 4 +- 3 files changed, 126 insertions(+), 4 deletions(-) diff --git a/reactos/include/wine/setupapi.h b/reactos/include/wine/setupapi.h index bc534e23962..763b07202e7 100644 --- a/reactos/include/wine/setupapi.h +++ b/reactos/include/wine/setupapi.h @@ -666,7 +666,9 @@ DECL_WINELIB_SETUPAPI_TYPE_AW(PFILEPATHS) LONG WINAPI AddTagToGroupOrderList(PCWSTR lpGroupName, DWORD dwUnknown2, DWORD dwUnknown3); +BOOL WINAPI DoesUserHavePrivilege(PCWSTR lpPrivilegeName); PWSTR WINAPI DuplicateString(PCWSTR lpSrc); +BOOL WINAPI EnablePrivilege(PCWSTR lpPrivilegeName, BOOL bEnable); void WINAPI InstallHinfSectionA( HWND hwnd, HINSTANCE handle, PCSTR cmdline, INT show ); void WINAPI InstallHinfSectionW( HWND hwnd, HINSTANCE handle, PCWSTR cmdline, INT show ); #define InstallHinfSection WINELIB_NAME_AW(InstallHinfSection) diff --git a/reactos/lib/setupapi/misc.c b/reactos/lib/setupapi/misc.c index 56d6bd39c54..4a07712a991 100644 --- a/reactos/lib/setupapi/misc.c +++ b/reactos/lib/setupapi/misc.c @@ -206,12 +206,17 @@ BOOL WINAPI IsUserAdmin(VOID) TRACE("\n"); if (!OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &hToken)) + { return FALSE; + } if (!GetTokenInformation(hToken, TokenGroups, NULL, 0, &dwSize)) { - CloseHandle(hToken); - return FALSE; + if (GetLastError() != ERROR_INSUFFICIENT_BUFFER) + { + CloseHandle(hToken); + return FALSE; + } } lpGroups = MyMalloc(dwSize); @@ -338,3 +343,118 @@ LPSTR WINAPI UnicodeToMultiByte(LPCWSTR lpUnicodeStr, UINT uCodePage) return lpMultiByteStr; } + + +/************************************************************************** + * DoesUserHavePrivilege [SETUPAPI.@] + * + * Check whether the current user has got a given privilege. + * + * PARAMS + * lpPrivilegeName [I] Name of the privilege to be checked + * + * RETURNS + * Success: TRUE + * Failure: FALSE + */ +BOOL WINAPI DoesUserHavePrivilege(LPCWSTR lpPrivilegeName) +{ + HANDLE hToken; + DWORD dwSize; + PTOKEN_PRIVILEGES lpPrivileges; + LUID PrivilegeLuid; + DWORD i; + BOOL bResult = FALSE; + + TRACE("%s\n", debugstr_w(lpPrivilegeName)); + + if (!OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &hToken)) + return FALSE; + + if (!GetTokenInformation(hToken, TokenPrivileges, NULL, 0, &dwSize)) + { + if (GetLastError() != ERROR_INSUFFICIENT_BUFFER) + { + CloseHandle(hToken); + return FALSE; + } + } + + lpPrivileges = MyMalloc(dwSize); + if (lpPrivileges == NULL) + { + CloseHandle(hToken); + return FALSE; + } + + if (!GetTokenInformation(hToken, TokenPrivileges, lpPrivileges, dwSize, &dwSize)) + { + MyFree(lpPrivileges); + CloseHandle(hToken); + return FALSE; + } + + CloseHandle(hToken); + + if (!LookupPrivilegeValueW(NULL, lpPrivilegeName, &PrivilegeLuid)) + { + MyFree(lpPrivileges); + return FALSE; + } + + for (i = 0; i < lpPrivileges->PrivilegeCount; i++) + { + if (lpPrivileges->Privileges[i].Luid.HighPart == PrivilegeLuid.HighPart && + lpPrivileges->Privileges[i].Luid.LowPart == PrivilegeLuid.LowPart) + { + bResult = TRUE; + } + } + + MyFree(lpPrivileges); + + return bResult; +} + + +/************************************************************************** + * EnablePrivilege [SETUPAPI.@] + * + * Enables or disables one of the current users privileges. + * + * PARAMS + * lpPrivilegeName [I] Name of the privilege to be changed + * bEnable [I] TRUE: Enables the privilege + * FALSE: Disables the privilege + * + * RETURNS + * Success: TRUE + * Failure: FALSE + */ +BOOL WINAPI EnablePrivilege(LPCWSTR lpPrivilegeName, BOOL bEnable) +{ + TOKEN_PRIVILEGES Privileges; + HANDLE hToken; + BOOL bResult; + + TRACE("%s %s\n", debugstr_w(lpPrivilegeName), bEnable ? "TRUE" : "FALSE"); + + if (!OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &hToken)) + return FALSE; + + Privileges.PrivilegeCount = 1; + Privileges.Privileges[0].Attributes = (bEnable) ? SE_PRIVILEGE_ENABLED : 0; + + if (!LookupPrivilegeValueW(NULL, lpPrivilegeName, + &Privileges.Privileges[0].Luid)) + { + CloseHandle(hToken); + return FALSE; + } + + bResult = AdjustTokenPrivileges(hToken, FALSE, &Privileges, 0, NULL, NULL); + + CloseHandle(hToken); + + return bResult; +} diff --git a/reactos/lib/setupapi/setupapi.spec b/reactos/lib/setupapi/setupapi.spec index bed0ba5f6d0..9ecca648230 100644 --- a/reactos/lib/setupapi/setupapi.spec +++ b/reactos/lib/setupapi/setupapi.spec @@ -197,9 +197,9 @@ @ stub DelayedMove @ stub DelimStringToMultiSz @ stub DestroyTextFileReadBuffer -@ stub DoesUserHavePrivilege +@ stdcall DoesUserHavePrivilege(wstr) @ stdcall DuplicateString(wstr) -@ stub EnablePrivilege +@ stdcall EnablePrivilege(wstr long) @ stub ExtensionPropSheetPageProc @ stub FileExists @ stub FreeStringArray From cf5aa86154e13e7884fa55052c1070ec6d419a92 Mon Sep 17 00:00:00 2001 From: Gunnar Dalsnes Date: Mon, 31 Jan 2005 22:13:43 +0000 Subject: [PATCH 072/185] remove obvious duplicates svn path=/trunk/; revision=13372 --- reactos/lib/crtdll/conio/cgets.c | 67 ------ reactos/lib/crtdll/conio/cprintf.c | 20 -- reactos/lib/crtdll/conio/cputs.c | 26 --- reactos/lib/crtdll/conio/cscanf.c | 21 -- reactos/lib/crtdll/conio/getch.c | 53 ----- reactos/lib/crtdll/conio/getche.c | 31 --- reactos/lib/crtdll/conio/kbhit.c | 33 --- reactos/lib/crtdll/conio/putch.c | 25 --- reactos/lib/crtdll/conio/ungetch.c | 32 --- reactos/lib/crtdll/ctype/isctype.c | 35 ---- reactos/lib/crtdll/direct/getdfree.c | 23 --- reactos/lib/crtdll/direct/getdrive.c | 30 --- reactos/lib/crtdll/direct/mkdir.c | 13 -- reactos/lib/crtdll/except/abnorter.c | 17 -- reactos/lib/crtdll/except/exhand2.c | 33 --- reactos/lib/crtdll/except/matherr.c | 42 ---- reactos/lib/crtdll/except/unwind.c | 20 -- reactos/lib/crtdll/float/clearfp.c | 17 -- reactos/lib/crtdll/float/cntrlfp.c | 174 ---------------- reactos/lib/crtdll/float/fpreset.c | 12 -- reactos/lib/crtdll/float/logb.c | 34 ---- reactos/lib/crtdll/float/nafter.c | 16 -- reactos/lib/crtdll/float/statfp.c | 19 -- reactos/lib/crtdll/io/chsize.c | 18 -- reactos/lib/crtdll/io/close.c | 19 -- reactos/lib/crtdll/io/commit.c | 18 -- reactos/lib/crtdll/io/dup2.c | 10 - reactos/lib/crtdll/io/isatty.c | 19 -- reactos/lib/crtdll/io/mktemp.c | 78 ------- reactos/lib/crtdll/io/setmode.c | 27 --- reactos/lib/crtdll/io/sopen.c | 10 - reactos/lib/crtdll/io/tell.c | 12 -- reactos/lib/crtdll/io/umask.c | 14 -- reactos/lib/crtdll/io/utime.c | 25 --- reactos/lib/crtdll/math/acos.c | 27 --- reactos/lib/crtdll/math/asin.c | 27 --- reactos/lib/crtdll/math/atan.c | 37 ---- reactos/lib/crtdll/math/atan2.c | 21 -- reactos/lib/crtdll/math/cabs.c | 14 -- reactos/lib/crtdll/math/cos.c | 19 -- reactos/lib/crtdll/math/cosh.c | 12 -- reactos/lib/crtdll/math/exp.c | 47 ----- reactos/lib/crtdll/math/fabs.c | 36 ---- reactos/lib/crtdll/math/fmod.c | 39 ---- reactos/lib/crtdll/math/hypot.c | 101 --------- reactos/lib/crtdll/math/j0_y0.c | 18 -- reactos/lib/crtdll/math/j1_y1.c | 18 -- reactos/lib/crtdll/math/jn_yn.c | 18 -- reactos/lib/crtdll/math/ldexp.c | 36 ---- reactos/lib/crtdll/math/log.c | 38 ---- reactos/lib/crtdll/math/log10.c | 38 ---- reactos/lib/crtdll/math/pow.c | 97 --------- reactos/lib/crtdll/math/sin.c | 36 ---- reactos/lib/crtdll/math/sinh.c | 19 -- reactos/lib/crtdll/math/sqrt.c | 35 ---- reactos/lib/crtdll/math/stubs.c | 133 ------------ reactos/lib/crtdll/math/tan.c | 37 ---- reactos/lib/crtdll/math/tanh.c | 20 -- reactos/lib/crtdll/mbstring/hanzen.c | 107 ---------- reactos/lib/crtdll/mbstring/ischira.c | 46 ----- reactos/lib/crtdll/mbstring/iskana.c | 20 -- reactos/lib/crtdll/mbstring/iskmoji.c | 6 - reactos/lib/crtdll/mbstring/iskpun.c | 18 -- reactos/lib/crtdll/mbstring/islwr.c | 27 --- reactos/lib/crtdll/mbstring/ismbal.c | 20 -- reactos/lib/crtdll/mbstring/ismbaln.c | 12 -- reactos/lib/crtdll/mbstring/ismbc.c | 132 ------------ reactos/lib/crtdll/mbstring/ismbgra.c | 11 - reactos/lib/crtdll/mbstring/ismbkaln.c | 19 -- reactos/lib/crtdll/mbstring/ismblead.c | 65 ------ reactos/lib/crtdll/mbstring/ismbpri.c | 11 - reactos/lib/crtdll/mbstring/ismbpun.c | 18 -- reactos/lib/crtdll/mbstring/ismbtrl.c | 45 ---- reactos/lib/crtdll/mbstring/isuppr.c | 27 --- reactos/lib/crtdll/mbstring/jistojms.c | 27 --- reactos/lib/crtdll/mbstring/jmstojis.c | 28 --- reactos/lib/crtdll/mbstring/mbbtype.c | 57 ------ reactos/lib/crtdll/mbstring/mbccpy.c | 15 -- reactos/lib/crtdll/mbstring/mbscoll.c | 97 --------- reactos/lib/crtdll/mbstring/mbsdec.c | 17 -- reactos/lib/crtdll/mbstring/mbsicmp.c | 65 ------ reactos/lib/crtdll/mbstring/mbsicoll.c | 55 ----- reactos/lib/crtdll/mbstring/mbsinc.c | 13 -- reactos/lib/crtdll/mbstring/mbslen.c | 18 -- reactos/lib/crtdll/mbstring/mbslwr.c | 45 ---- reactos/lib/crtdll/mbstring/mbsnccnt.c | 35 ---- reactos/lib/crtdll/mbstring/mbsncmp.c | 109 ---------- reactos/lib/crtdll/mbstring/mbsncoll.c | 109 ---------- reactos/lib/crtdll/mbstring/mbsncpy.c | 92 --------- reactos/lib/crtdll/mbstring/mbsnextc.c | 19 -- reactos/lib/crtdll/mbstring/mbsnicmp.c | 47 ----- reactos/lib/crtdll/mbstring/mbsnicoll.c | 11 - reactos/lib/crtdll/mbstring/mbsninc.c | 16 -- reactos/lib/crtdll/mbstring/mbsnset.c | 70 ------- reactos/lib/crtdll/mbstring/mbsset.c | 40 ---- reactos/lib/crtdll/mbstring/mbstrlen.c | 19 -- reactos/lib/crtdll/mbstring/mbsupr.c | 56 ----- reactos/lib/crtdll/process/dll.c | 41 ---- reactos/lib/crtdll/process/procid.c | 11 - reactos/lib/crtdll/process/threadid.c | 18 -- reactos/lib/crtdll/search/lfind.c | 21 -- reactos/lib/crtdll/search/lsearch.c | 24 --- reactos/lib/crtdll/signal/signal.c | 113 ---------- reactos/lib/crtdll/signal/xcptfil.c | 15 -- reactos/lib/crtdll/signal/xcptinfo.c | 9 - reactos/lib/crtdll/stdio/allocfil.c | 101 --------- reactos/lib/crtdll/stdio/clearerr.c | 22 -- reactos/lib/crtdll/stdio/fclose.c | 54 ----- reactos/lib/crtdll/stdio/fdopen.c | 57 ------ reactos/lib/crtdll/stdio/feof.c | 22 -- reactos/lib/crtdll/stdio/ferror.c | 16 -- reactos/lib/crtdll/stdio/fflush.c | 119 ----------- reactos/lib/crtdll/stdio/fgetc.c | 29 --- reactos/lib/crtdll/stdio/fgetchar.c | 38 ---- reactos/lib/crtdll/stdio/fgetpos.c | 17 -- reactos/lib/crtdll/stdio/fgets.c | 47 ----- reactos/lib/crtdll/stdio/fileno.c | 16 -- reactos/lib/crtdll/stdio/fopen.c | 80 -------- reactos/lib/crtdll/stdio/fprintf.c | 62 ------ reactos/lib/crtdll/stdio/fputc.c | 23 --- reactos/lib/crtdll/stdio/fputs.c | 43 ---- reactos/lib/crtdll/stdio/freopen.c | 68 ------- reactos/lib/crtdll/stdio/fscanf.c | 65 ------ reactos/lib/crtdll/stdio/fseek.c | 57 ------ reactos/lib/crtdll/stdio/fsetpos.c | 18 -- reactos/lib/crtdll/stdio/fsopen.c | 102 ---------- reactos/lib/crtdll/stdio/ftell.c | 48 ----- reactos/lib/crtdll/stdio/fwalk.c | 18 -- reactos/lib/crtdll/stdio/getc.c | 61 ------ reactos/lib/crtdll/stdio/gets.c | 109 ---------- reactos/lib/crtdll/stdio/getw.c | 39 ---- reactos/lib/crtdll/stdio/perror.c | 19 -- reactos/lib/crtdll/stdio/printf.c | 60 ------ reactos/lib/crtdll/stdio/puts.c | 21 -- reactos/lib/crtdll/stdio/putw.c | 34 ---- reactos/lib/crtdll/stdio/remove.c | 12 -- reactos/lib/crtdll/stdio/rename.c | 18 -- reactos/lib/crtdll/stdio/rewind.c | 18 -- reactos/lib/crtdll/stdio/rmtmp.c | 72 ------- reactos/lib/crtdll/stdio/setbuf.c | 15 -- reactos/lib/crtdll/stdio/sprintf.c | 96 --------- reactos/lib/crtdll/stdio/sscanf.c | 71 ------- reactos/lib/crtdll/stdio/tempnam.c | 30 --- reactos/lib/crtdll/stdio/tmpfile.c | 70 ------- reactos/lib/crtdll/stdio/tmpnam.c | 19 -- reactos/lib/crtdll/stdio/ungetc.c | 76 ------- reactos/lib/crtdll/stdio/vscanf.c | 34 ---- reactos/lib/crtdll/stdlib/_exit.c | 58 ------ reactos/lib/crtdll/stdlib/abort.c | 19 -- reactos/lib/crtdll/stdlib/abs.c | 12 -- reactos/lib/crtdll/stdlib/atof.c | 11 - reactos/lib/crtdll/stdlib/atoi.c | 11 - reactos/lib/crtdll/stdlib/atol.c | 11 - reactos/lib/crtdll/stdlib/atold.c | 8 - reactos/lib/crtdll/stdlib/bsearch.c | 28 --- reactos/lib/crtdll/stdlib/div.c | 27 --- reactos/lib/crtdll/stdlib/ecvt.c | 15 -- reactos/lib/crtdll/stdlib/ecvtbuf.c | 108 ---------- reactos/lib/crtdll/stdlib/fcvt.c | 15 -- reactos/lib/crtdll/stdlib/fcvtbuf.c | 61 ------ reactos/lib/crtdll/stdlib/gcvt.c | 34 ---- reactos/lib/crtdll/stdlib/labs.c | 12 -- reactos/lib/crtdll/stdlib/ldiv.c | 28 --- reactos/lib/crtdll/stdlib/obsol.c | 33 --- reactos/lib/crtdll/stdlib/rot.c | 69 ------- reactos/lib/crtdll/stdlib/senv.c | 36 ---- reactos/lib/crtdll/stdlib/strtod.c | 100 --------- reactos/lib/crtdll/stdlib/strtol.c | 94 --------- reactos/lib/crtdll/stdlib/strtold.c | 126 ------------ reactos/lib/crtdll/stdlib/strtoll.c | 84 -------- reactos/lib/crtdll/stdlib/strtoul.c | 76 ------- reactos/lib/crtdll/sys_stat/futime.c | 43 ---- reactos/lib/crtdll/sys_stat/systime.c | 70 ------- reactos/lib/crtdll/time/clock.c | 32 --- reactos/lib/crtdll/time/difftime.c | 11 - reactos/lib/crtdll/time/posixrul.h | 49 ----- reactos/lib/crtdll/time/strdate.c | 33 --- reactos/lib/crtdll/time/strftime.c | 260 ------------------------ reactos/lib/crtdll/time/strtime.c | 33 --- reactos/lib/crtdll/time/time.c | 226 -------------------- reactos/lib/crtdll/time/tz_vars.c | 21 -- reactos/lib/crtdll/time/tzfile.h | 160 --------------- reactos/lib/crtdll/wchar/wcscoll.c | 22 -- 183 files changed, 7894 deletions(-) delete mode 100644 reactos/lib/crtdll/conio/cgets.c delete mode 100644 reactos/lib/crtdll/conio/cprintf.c delete mode 100644 reactos/lib/crtdll/conio/cputs.c delete mode 100644 reactos/lib/crtdll/conio/cscanf.c delete mode 100644 reactos/lib/crtdll/conio/getch.c delete mode 100644 reactos/lib/crtdll/conio/getche.c delete mode 100644 reactos/lib/crtdll/conio/kbhit.c delete mode 100644 reactos/lib/crtdll/conio/putch.c delete mode 100644 reactos/lib/crtdll/conio/ungetch.c delete mode 100644 reactos/lib/crtdll/ctype/isctype.c delete mode 100644 reactos/lib/crtdll/direct/getdfree.c delete mode 100644 reactos/lib/crtdll/direct/getdrive.c delete mode 100644 reactos/lib/crtdll/direct/mkdir.c delete mode 100644 reactos/lib/crtdll/except/abnorter.c delete mode 100644 reactos/lib/crtdll/except/exhand2.c delete mode 100644 reactos/lib/crtdll/except/matherr.c delete mode 100644 reactos/lib/crtdll/except/unwind.c delete mode 100644 reactos/lib/crtdll/float/clearfp.c delete mode 100644 reactos/lib/crtdll/float/cntrlfp.c delete mode 100644 reactos/lib/crtdll/float/fpreset.c delete mode 100644 reactos/lib/crtdll/float/logb.c delete mode 100644 reactos/lib/crtdll/float/nafter.c delete mode 100644 reactos/lib/crtdll/float/statfp.c delete mode 100644 reactos/lib/crtdll/io/chsize.c delete mode 100644 reactos/lib/crtdll/io/close.c delete mode 100644 reactos/lib/crtdll/io/commit.c delete mode 100644 reactos/lib/crtdll/io/dup2.c delete mode 100644 reactos/lib/crtdll/io/isatty.c delete mode 100644 reactos/lib/crtdll/io/mktemp.c delete mode 100644 reactos/lib/crtdll/io/setmode.c delete mode 100644 reactos/lib/crtdll/io/sopen.c delete mode 100644 reactos/lib/crtdll/io/tell.c delete mode 100644 reactos/lib/crtdll/io/umask.c delete mode 100644 reactos/lib/crtdll/io/utime.c delete mode 100644 reactos/lib/crtdll/math/acos.c delete mode 100644 reactos/lib/crtdll/math/asin.c delete mode 100644 reactos/lib/crtdll/math/atan.c delete mode 100644 reactos/lib/crtdll/math/atan2.c delete mode 100644 reactos/lib/crtdll/math/cabs.c delete mode 100644 reactos/lib/crtdll/math/cos.c delete mode 100644 reactos/lib/crtdll/math/cosh.c delete mode 100644 reactos/lib/crtdll/math/exp.c delete mode 100644 reactos/lib/crtdll/math/fabs.c delete mode 100644 reactos/lib/crtdll/math/fmod.c delete mode 100644 reactos/lib/crtdll/math/hypot.c delete mode 100644 reactos/lib/crtdll/math/j0_y0.c delete mode 100644 reactos/lib/crtdll/math/j1_y1.c delete mode 100644 reactos/lib/crtdll/math/jn_yn.c delete mode 100644 reactos/lib/crtdll/math/ldexp.c delete mode 100644 reactos/lib/crtdll/math/log.c delete mode 100644 reactos/lib/crtdll/math/log10.c delete mode 100644 reactos/lib/crtdll/math/pow.c delete mode 100644 reactos/lib/crtdll/math/sin.c delete mode 100644 reactos/lib/crtdll/math/sinh.c delete mode 100644 reactos/lib/crtdll/math/sqrt.c delete mode 100644 reactos/lib/crtdll/math/stubs.c delete mode 100644 reactos/lib/crtdll/math/tan.c delete mode 100644 reactos/lib/crtdll/math/tanh.c delete mode 100644 reactos/lib/crtdll/mbstring/hanzen.c delete mode 100644 reactos/lib/crtdll/mbstring/ischira.c delete mode 100644 reactos/lib/crtdll/mbstring/iskana.c delete mode 100644 reactos/lib/crtdll/mbstring/iskmoji.c delete mode 100644 reactos/lib/crtdll/mbstring/iskpun.c delete mode 100644 reactos/lib/crtdll/mbstring/islwr.c delete mode 100644 reactos/lib/crtdll/mbstring/ismbal.c delete mode 100644 reactos/lib/crtdll/mbstring/ismbaln.c delete mode 100644 reactos/lib/crtdll/mbstring/ismbc.c delete mode 100644 reactos/lib/crtdll/mbstring/ismbgra.c delete mode 100644 reactos/lib/crtdll/mbstring/ismbkaln.c delete mode 100644 reactos/lib/crtdll/mbstring/ismblead.c delete mode 100644 reactos/lib/crtdll/mbstring/ismbpri.c delete mode 100644 reactos/lib/crtdll/mbstring/ismbpun.c delete mode 100644 reactos/lib/crtdll/mbstring/ismbtrl.c delete mode 100644 reactos/lib/crtdll/mbstring/isuppr.c delete mode 100644 reactos/lib/crtdll/mbstring/jistojms.c delete mode 100644 reactos/lib/crtdll/mbstring/jmstojis.c delete mode 100644 reactos/lib/crtdll/mbstring/mbbtype.c delete mode 100644 reactos/lib/crtdll/mbstring/mbccpy.c delete mode 100644 reactos/lib/crtdll/mbstring/mbscoll.c delete mode 100644 reactos/lib/crtdll/mbstring/mbsdec.c delete mode 100644 reactos/lib/crtdll/mbstring/mbsicmp.c delete mode 100644 reactos/lib/crtdll/mbstring/mbsicoll.c delete mode 100644 reactos/lib/crtdll/mbstring/mbsinc.c delete mode 100644 reactos/lib/crtdll/mbstring/mbslen.c delete mode 100644 reactos/lib/crtdll/mbstring/mbslwr.c delete mode 100644 reactos/lib/crtdll/mbstring/mbsnccnt.c delete mode 100644 reactos/lib/crtdll/mbstring/mbsncmp.c delete mode 100644 reactos/lib/crtdll/mbstring/mbsncoll.c delete mode 100644 reactos/lib/crtdll/mbstring/mbsncpy.c delete mode 100644 reactos/lib/crtdll/mbstring/mbsnextc.c delete mode 100644 reactos/lib/crtdll/mbstring/mbsnicmp.c delete mode 100644 reactos/lib/crtdll/mbstring/mbsnicoll.c delete mode 100644 reactos/lib/crtdll/mbstring/mbsninc.c delete mode 100644 reactos/lib/crtdll/mbstring/mbsnset.c delete mode 100644 reactos/lib/crtdll/mbstring/mbsset.c delete mode 100644 reactos/lib/crtdll/mbstring/mbstrlen.c delete mode 100644 reactos/lib/crtdll/mbstring/mbsupr.c delete mode 100644 reactos/lib/crtdll/process/dll.c delete mode 100644 reactos/lib/crtdll/process/procid.c delete mode 100644 reactos/lib/crtdll/process/threadid.c delete mode 100644 reactos/lib/crtdll/search/lfind.c delete mode 100644 reactos/lib/crtdll/search/lsearch.c delete mode 100644 reactos/lib/crtdll/signal/signal.c delete mode 100644 reactos/lib/crtdll/signal/xcptfil.c delete mode 100644 reactos/lib/crtdll/signal/xcptinfo.c delete mode 100644 reactos/lib/crtdll/stdio/allocfil.c delete mode 100644 reactos/lib/crtdll/stdio/clearerr.c delete mode 100644 reactos/lib/crtdll/stdio/fclose.c delete mode 100644 reactos/lib/crtdll/stdio/fdopen.c delete mode 100644 reactos/lib/crtdll/stdio/feof.c delete mode 100644 reactos/lib/crtdll/stdio/ferror.c delete mode 100644 reactos/lib/crtdll/stdio/fflush.c delete mode 100644 reactos/lib/crtdll/stdio/fgetc.c delete mode 100644 reactos/lib/crtdll/stdio/fgetchar.c delete mode 100644 reactos/lib/crtdll/stdio/fgetpos.c delete mode 100644 reactos/lib/crtdll/stdio/fgets.c delete mode 100644 reactos/lib/crtdll/stdio/fileno.c delete mode 100644 reactos/lib/crtdll/stdio/fopen.c delete mode 100644 reactos/lib/crtdll/stdio/fprintf.c delete mode 100644 reactos/lib/crtdll/stdio/fputc.c delete mode 100644 reactos/lib/crtdll/stdio/fputs.c delete mode 100644 reactos/lib/crtdll/stdio/freopen.c delete mode 100644 reactos/lib/crtdll/stdio/fscanf.c delete mode 100644 reactos/lib/crtdll/stdio/fseek.c delete mode 100644 reactos/lib/crtdll/stdio/fsetpos.c delete mode 100644 reactos/lib/crtdll/stdio/fsopen.c delete mode 100644 reactos/lib/crtdll/stdio/ftell.c delete mode 100644 reactos/lib/crtdll/stdio/fwalk.c delete mode 100644 reactos/lib/crtdll/stdio/getc.c delete mode 100644 reactos/lib/crtdll/stdio/gets.c delete mode 100644 reactos/lib/crtdll/stdio/getw.c delete mode 100644 reactos/lib/crtdll/stdio/perror.c delete mode 100644 reactos/lib/crtdll/stdio/printf.c delete mode 100644 reactos/lib/crtdll/stdio/puts.c delete mode 100644 reactos/lib/crtdll/stdio/putw.c delete mode 100644 reactos/lib/crtdll/stdio/remove.c delete mode 100644 reactos/lib/crtdll/stdio/rename.c delete mode 100644 reactos/lib/crtdll/stdio/rewind.c delete mode 100644 reactos/lib/crtdll/stdio/rmtmp.c delete mode 100644 reactos/lib/crtdll/stdio/setbuf.c delete mode 100644 reactos/lib/crtdll/stdio/sprintf.c delete mode 100644 reactos/lib/crtdll/stdio/sscanf.c delete mode 100644 reactos/lib/crtdll/stdio/tempnam.c delete mode 100644 reactos/lib/crtdll/stdio/tmpfile.c delete mode 100644 reactos/lib/crtdll/stdio/tmpnam.c delete mode 100644 reactos/lib/crtdll/stdio/ungetc.c delete mode 100644 reactos/lib/crtdll/stdio/vscanf.c delete mode 100644 reactos/lib/crtdll/stdlib/_exit.c delete mode 100644 reactos/lib/crtdll/stdlib/abort.c delete mode 100644 reactos/lib/crtdll/stdlib/abs.c delete mode 100644 reactos/lib/crtdll/stdlib/atof.c delete mode 100644 reactos/lib/crtdll/stdlib/atoi.c delete mode 100644 reactos/lib/crtdll/stdlib/atol.c delete mode 100644 reactos/lib/crtdll/stdlib/atold.c delete mode 100644 reactos/lib/crtdll/stdlib/bsearch.c delete mode 100644 reactos/lib/crtdll/stdlib/div.c delete mode 100644 reactos/lib/crtdll/stdlib/ecvt.c delete mode 100644 reactos/lib/crtdll/stdlib/ecvtbuf.c delete mode 100644 reactos/lib/crtdll/stdlib/fcvt.c delete mode 100644 reactos/lib/crtdll/stdlib/fcvtbuf.c delete mode 100644 reactos/lib/crtdll/stdlib/gcvt.c delete mode 100644 reactos/lib/crtdll/stdlib/labs.c delete mode 100644 reactos/lib/crtdll/stdlib/ldiv.c delete mode 100644 reactos/lib/crtdll/stdlib/obsol.c delete mode 100644 reactos/lib/crtdll/stdlib/rot.c delete mode 100644 reactos/lib/crtdll/stdlib/senv.c delete mode 100644 reactos/lib/crtdll/stdlib/strtod.c delete mode 100644 reactos/lib/crtdll/stdlib/strtol.c delete mode 100644 reactos/lib/crtdll/stdlib/strtold.c delete mode 100644 reactos/lib/crtdll/stdlib/strtoll.c delete mode 100644 reactos/lib/crtdll/stdlib/strtoul.c delete mode 100644 reactos/lib/crtdll/sys_stat/futime.c delete mode 100644 reactos/lib/crtdll/sys_stat/systime.c delete mode 100644 reactos/lib/crtdll/time/clock.c delete mode 100644 reactos/lib/crtdll/time/difftime.c delete mode 100644 reactos/lib/crtdll/time/posixrul.h delete mode 100644 reactos/lib/crtdll/time/strdate.c delete mode 100644 reactos/lib/crtdll/time/strftime.c delete mode 100644 reactos/lib/crtdll/time/strtime.c delete mode 100644 reactos/lib/crtdll/time/time.c delete mode 100644 reactos/lib/crtdll/time/tz_vars.c delete mode 100644 reactos/lib/crtdll/time/tzfile.h delete mode 100644 reactos/lib/crtdll/wchar/wcscoll.c diff --git a/reactos/lib/crtdll/conio/cgets.c b/reactos/lib/crtdll/conio/cgets.c deleted file mode 100644 index fed3024a259..00000000000 --- a/reactos/lib/crtdll/conio/cgets.c +++ /dev/null @@ -1,67 +0,0 @@ -#include -#include - - -/* - * @implemented - */ -char* _cgets(char *string) -{ - unsigned len = 0; - unsigned int maxlen_wanted; - char *sp; - int c; - /* - * Be smart and check for NULL pointer. - * Don't know wether TURBOC does this. - */ - if (!string) - return(NULL); - maxlen_wanted = (unsigned int)((unsigned char)string[0]); - sp = &(string[2]); - /* - * Should the string be shorter maxlen_wanted including or excluding - * the trailing '\0' ? We don't take any risk. - */ - while(len < maxlen_wanted-1) - { - c=_getch(); - /* - * shold we check for backspace here? - * TURBOC does (just checked) but doesn't in cscanf (thats harder - * or even impossible). We do the same. - */ - if (c == '\b') - { - if (len > 0) - { - _cputs("\b \b"); /* go back, clear char on screen with space - and go back again */ - len--; - sp[len] = '\0'; /* clear the character in the string */ - } - } - else if (c == '\r') - { - sp[len] = '\0'; - break; - } - else if (c == 0) - { - /* special character ends input */ - sp[len] = '\0'; - _ungetch(c); /* keep the char for later processing */ - break; - } - else - { - sp[len] = _putch(c); - len++; - } - } - sp[maxlen_wanted-1] = '\0'; - string[1] = (char)((unsigned char)len); - return(sp); -} - - diff --git a/reactos/lib/crtdll/conio/cprintf.c b/reactos/lib/crtdll/conio/cprintf.c deleted file mode 100644 index b668157a39d..00000000000 --- a/reactos/lib/crtdll/conio/cprintf.c +++ /dev/null @@ -1,20 +0,0 @@ -#include -#include - -/* - * @unimplemented - */ -int -_cprintf(const char *fmt, ...) -{ - int cnt; - char buf[ 2048 ]; /* this is buggy, because buffer might be too small. */ - va_list ap; - - va_start(ap, fmt); - cnt = vsprintf(buf, fmt, ap); - va_end(ap); - - _cputs(buf); - return cnt; -} diff --git a/reactos/lib/crtdll/conio/cputs.c b/reactos/lib/crtdll/conio/cputs.c deleted file mode 100644 index 4f7ad5558c1..00000000000 --- a/reactos/lib/crtdll/conio/cputs.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/crtdll/conio/cputs.c - * PURPOSE: Writes a character to stdout - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 28/12/98: Created - */ -#include "precomp.h" -#include -#include -#include -#include - -/* - * @implemented - */ -int _cputs(const char *_str) -{ - int len = strlen(_str); - DWORD written = 0; - if (!WriteFile(filehnd(stdout->_file),_str,len,&written,NULL)) - return -1; - return 0; -} diff --git a/reactos/lib/crtdll/conio/cscanf.c b/reactos/lib/crtdll/conio/cscanf.c deleted file mode 100644 index 4839931aef7..00000000000 --- a/reactos/lib/crtdll/conio/cscanf.c +++ /dev/null @@ -1,21 +0,0 @@ -#include -#include -#include -#include - -/* - * @unimplemented - */ -int _cscanf(char *fmt, ...) -{ - int cnt; - - va_list ap; - - //fixme cscanf should scan the console's keyboard - va_start(ap, fmt); - cnt = __vscanf(fmt, ap); - va_end(ap); - - return cnt; -} diff --git a/reactos/lib/crtdll/conio/getch.c b/reactos/lib/crtdll/conio/getch.c deleted file mode 100644 index 02b2906ae3c..00000000000 --- a/reactos/lib/crtdll/conio/getch.c +++ /dev/null @@ -1,53 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/crtdll/conio/getch.c - * PURPOSE: Writes a character to stdout - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 28/12/98: Created - */ -#include "precomp.h" -#include -#include -#include -#include - - -/* - * @implemented - */ -int _getch(void) -{ - DWORD NumberOfCharsRead = 0; - char c; - if (char_avail) { - c = ungot_char; - char_avail = 0; - } else { - ReadConsoleA(_get_osfhandle(stdin->_file), - &c, - 1, - &NumberOfCharsRead, - NULL); - } - if (c == 10) - c = 13; - putchar(c); - return c; -} - -#if 0 -/* - * @unimplemented - */ -int _getche(void) -{ - int c; - - c = _getch(); - _putch(c); - - return c; -} -#endif diff --git a/reactos/lib/crtdll/conio/getche.c b/reactos/lib/crtdll/conio/getche.c deleted file mode 100644 index f994649e73d..00000000000 --- a/reactos/lib/crtdll/conio/getche.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details - * PROJECT: ReactOS system libraries - * FILE: lib/crtdll/conio/getche.c - * PURPOSE: Reads a character from stdin - * PROGRAMER: DJ Delorie - Boudewijn Dekker - * UPDATE HISTORY: - * 28/12/98: Created - */ - -#include -#include - - -int getche(void) -{ - if (char_avail) - /* - * We don't know, wether the ungot char was already echoed - * we assume yes (for example in cscanf, probably the only - * place where ungetch is ever called. - * There is no way to check for this really, because - * ungetch could have been called with a character that - * hasn't been got by a conio function. - * We don't echo again. - */ - return(getch()); - return (_putch(getch())); -} diff --git a/reactos/lib/crtdll/conio/kbhit.c b/reactos/lib/crtdll/conio/kbhit.c deleted file mode 100644 index 4c28e4b61f4..00000000000 --- a/reactos/lib/crtdll/conio/kbhit.c +++ /dev/null @@ -1,33 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/crtdll/conio/kbhit.c - * PURPOSE: Checks for keyboard hits - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 28/12/98: Created - */ - -#include "precomp.h" -#include -#include - - -// FIXME PeekCosoleInput returns more than keyboard hits - -/* - * @unimplemented - */ -int _kbhit(void) -{ - //INPUT_RECORD InputRecord; - DWORD NumberRead=0; - if (char_avail) - return(1); - else { - //FIXME PeekConsoleInput might do DeviceIo - //PeekConsoleInput((HANDLE)stdin->_file,&InputRecord,1,&NumberRead); - return NumberRead; - } - return 0; -} diff --git a/reactos/lib/crtdll/conio/putch.c b/reactos/lib/crtdll/conio/putch.c deleted file mode 100644 index 5cf65255a96..00000000000 --- a/reactos/lib/crtdll/conio/putch.c +++ /dev/null @@ -1,25 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/crtdll/conio/putch.c - * PURPOSE: Writes a character to stdout - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 28/12/98: Created - */ - -#include "precomp.h" -#include - -/* - * @implemented - */ -int _putch( int c ) -{ - DWORD NumberOfCharsWritten; - - if ( WriteFile(GetStdHandle(STD_OUTPUT_HANDLE),&c,1,&NumberOfCharsWritten,NULL) ) { - return -1; - } - return NumberOfCharsWritten; -} diff --git a/reactos/lib/crtdll/conio/ungetch.c b/reactos/lib/crtdll/conio/ungetch.c deleted file mode 100644 index 6439f9e505a..00000000000 --- a/reactos/lib/crtdll/conio/ungetch.c +++ /dev/null @@ -1,32 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details - * PROJECT: ReactOS system libraries - * FILE: lib/crtdll/conio/ungetch.c - * PURPOSE: Ungets a character from stdin - * PROGRAMER: DJ Delorie - Boudewijn Dekker [ Adapted from djgpp libc ] - * UPDATE HISTORY: - * 28/12/98: Created - */ - -#include -#include - -#define EOF -1 - -int char_avail = 0; -int ungot_char = 0; - - -/* - * @implemented - */ -int _ungetch(int c) -{ - if (char_avail) - return(EOF); - ungot_char = c; - char_avail = 1; - return(c); -} diff --git a/reactos/lib/crtdll/ctype/isctype.c b/reactos/lib/crtdll/ctype/isctype.c deleted file mode 100644 index 2629ccfb9b0..00000000000 --- a/reactos/lib/crtdll/ctype/isctype.c +++ /dev/null @@ -1,35 +0,0 @@ -/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ -#include - - -extern unsigned short _ctype[]; - -unsigned short *_pctype_dll = _ctype + 1; -unsigned short *_pwctype_dll = _ctype + 1; - - -/* - * @implemented - */ -int _isctype(unsigned int c, int ctypeFlags) -{ - return (_pctype_dll[(unsigned char)(c & 0xFF)] & ctypeFlags); -} - -/* - * @implemented - */ -int iswctype(wint_t wc, wctype_t wctypeFlags) -{ - return (_pwctype_dll[(unsigned char)(wc & 0xFF)] & wctypeFlags); -} - -/* - * @implemented - */ -int is_wctype(wint_t wc, wctype_t wctypeFlags) -{ - return (_pwctype_dll[(unsigned char)(wc & 0xFF)] & wctypeFlags); -} - -/* EOF */ diff --git a/reactos/lib/crtdll/direct/getdfree.c b/reactos/lib/crtdll/direct/getdfree.c deleted file mode 100644 index 84601c43eeb..00000000000 --- a/reactos/lib/crtdll/direct/getdfree.c +++ /dev/null @@ -1,23 +0,0 @@ -#include "precomp.h" -#include -#include - - -/* - * @implemented - */ -unsigned int _getdiskfree(unsigned int _drive, struct _diskfree_t* _diskspace) -{ - char RootPathName[10]; - - RootPathName[0] = toupper(_drive +'@'); - RootPathName[1] = ':'; - RootPathName[2] = '\\'; - RootPathName[3] = 0; - if (_diskspace == NULL) - return 0; - if (!GetDiskFreeSpaceA(RootPathName,(LPDWORD)&_diskspace->sectors_per_cluster,(LPDWORD)&_diskspace->bytes_per_sector, - (LPDWORD )&_diskspace->avail_clusters,(LPDWORD )&_diskspace->total_clusters)) - return 0; - return _diskspace->avail_clusters; -} diff --git a/reactos/lib/crtdll/direct/getdrive.c b/reactos/lib/crtdll/direct/getdrive.c deleted file mode 100644 index 4074bafbd18..00000000000 --- a/reactos/lib/crtdll/direct/getdrive.c +++ /dev/null @@ -1,30 +0,0 @@ -#include "precomp.h" -#include -#include - - -extern int cur_drive; - -/* - * @implemented - */ -int _getdrive(void) -{ - char Buffer[MAX_PATH]; - - if (cur_drive == 0) { - GetCurrentDirectoryA(MAX_PATH, Buffer); - cur_drive = toupper(Buffer[0] - '@'); - } - return cur_drive; -} - -/* - * @unimplemented - */ -unsigned long _getdrives(void) -{ - //fixme get logical drives - //return GetLogicalDrives(); - return 5; // drive A and C -} diff --git a/reactos/lib/crtdll/direct/mkdir.c b/reactos/lib/crtdll/direct/mkdir.c deleted file mode 100644 index 15e85d3f197..00000000000 --- a/reactos/lib/crtdll/direct/mkdir.c +++ /dev/null @@ -1,13 +0,0 @@ -#include "precomp.h" -#include - - -/* - * @implemented - */ -int _mkdir(const char* _path) -{ - if (!CreateDirectoryA(_path, NULL)) - return -1; - return 0; -} diff --git a/reactos/lib/crtdll/except/abnorter.c b/reactos/lib/crtdll/except/abnorter.c deleted file mode 100644 index 3f27a81208c..00000000000 --- a/reactos/lib/crtdll/except/abnorter.c +++ /dev/null @@ -1,17 +0,0 @@ -#include "precomp.h" -#include - -#ifdef __GNUC__ - -/* - * @unimplemented - */ -int _abnormal_termination(void) -{ - printf("Abnormal Termination\n"); -// return AbnormalTermination(); - return 0; -} - -#else -#endif diff --git a/reactos/lib/crtdll/except/exhand2.c b/reactos/lib/crtdll/except/exhand2.c deleted file mode 100644 index 49001483225..00000000000 --- a/reactos/lib/crtdll/except/exhand2.c +++ /dev/null @@ -1,33 +0,0 @@ -#include "precomp.h" -#include - - -#ifdef __GNUC__ -#else -#endif - -ULONG DbgPrint(PCH Format, ...) -{ - return 0; -} - -VOID STDCALL -MsvcrtDebug(ULONG Value) -{ - //DbgPrint("MsvcrtDebug 0x%.08x\n", Value); -} - -struct _EXCEPTION_RECORD; -struct _CONTEXT; - -/* - * @unimplemented - */ -EXCEPTION_DISPOSITION -_except_handler2( - struct _EXCEPTION_RECORD* ExceptionRecord, void* Frame, - struct _CONTEXT *ContextRecord, void* DispatcherContext) -{ - //printf("_except_handler2()\n"); - return 0; -} diff --git a/reactos/lib/crtdll/except/matherr.c b/reactos/lib/crtdll/except/matherr.c deleted file mode 100644 index c800b2c920c..00000000000 --- a/reactos/lib/crtdll/except/matherr.c +++ /dev/null @@ -1,42 +0,0 @@ -#include "precomp.h" -#include - - -struct _exception { - int type; - char* name; - double arg1; - double arg2; - double retval; -} ; - - -/* - * @unimplemented - */ -int _matherr(struct _exception* e) -{ - return 0; -} - - -// not exported by NTDLL -void __setusermatherr(int (*handler)(struct _exception*)) -{ - -} - - -#define _FPIEEE_RECORD void - -/* - * @unimplemented - */ -int _fpieee_flt( - unsigned long exception_code, - struct _EXCEPTION_POINTERS* ExceptionPointer, - int (*handler)(_FPIEEE_RECORD*) - ) -{ - return 0; -} diff --git a/reactos/lib/crtdll/except/unwind.c b/reactos/lib/crtdll/except/unwind.c deleted file mode 100644 index de846f957fe..00000000000 --- a/reactos/lib/crtdll/except/unwind.c +++ /dev/null @@ -1,20 +0,0 @@ -#include "precomp.h" -#define PEXCEPTION_FRAME void* - -/* - * @unimplemented - */ -void _global_unwind2( PEXCEPTION_FRAME frame ) -{ - //RtlUnwind( frame, 0, NULL, 0 ); -} - - -/* - * @unimplemented - */ -void _local_unwind2( PEXCEPTION_FRAME endframe, DWORD nr ) -{ - //TRACE(crtdll,"(%p,%ld)\n",endframe,nr); - return; -} diff --git a/reactos/lib/crtdll/float/clearfp.c b/reactos/lib/crtdll/float/clearfp.c deleted file mode 100644 index 9e65bd29285..00000000000 --- a/reactos/lib/crtdll/float/clearfp.c +++ /dev/null @@ -1,17 +0,0 @@ -#include - -/* - * @implemented - */ -unsigned int _clearfp (void) -{ -unsigned short __res = _statusfp(); -#ifdef __GNUC__ -__asm__ __volatile__ ( - "fclex \n\t" - ); -#else -#endif /*__GNUC__*/ - return __res; -} - diff --git a/reactos/lib/crtdll/float/cntrlfp.c b/reactos/lib/crtdll/float/cntrlfp.c deleted file mode 100644 index c093d827e64..00000000000 --- a/reactos/lib/crtdll/float/cntrlfp.c +++ /dev/null @@ -1,174 +0,0 @@ -/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ - -#include - -#define X87_CW_IM (1<<0) /* Invalid operation mask */ -#define X87_CW_DM (1<<1) /* Denormal operand mask */ -#define X87_CW_ZM (1<<2) /* Zero divide mask */ -#define X87_CW_OM (1<<3) /* Overflow mask */ -#define X87_CW_UM (1<<4) /* Underflow mask */ -#define X87_CW_PM (1<<5) /* Precision mask */ - -#define X87_CW_PC_MASK (3<<8) /* precision control mask */ -#define X87_CW_PC24 (0<<8) /* 24 bit precision */ -#define X87_CW_PC53 (2<<8) /* 53 bit precision */ -#define X87_CW_PC64 (3<<8) /* 64 bit precision */ - -#define X87_CW_RC_MASK (3<<10) /* rounding control mask */ -#define X87_CW_RC_NEAREST (0<<10) /* round to nearest */ -#define X87_CW_RC_DOWN (1<<10) /* round down */ -#define X87_CW_RC_UP (2<<10) /* round up */ -#define X87_CW_RC_ZERO (3<<10) /* round toward zero (chop) */ - -#define X87_CW_IC (1<<12) /* infinity control flag */ - -/* - * @implemented - */ -unsigned int _controlfp(unsigned int unNew, unsigned int unMask) -{ - return _control87(unNew,unMask); -} - -/* - * @implemented - */ -unsigned int _control87(unsigned int unNew, unsigned int unMask) -{ - unsigned int FpuCw; - unsigned int DummyCw = 0; - - /* get the controlword */ - asm volatile("fstcw %0\n\t" : "=m"(FpuCw)); - FpuCw &= 0x0000ffff; - - /* translate it into _control87 format */ - if (FpuCw & X87_CW_IM) - DummyCw |= _EM_INVALID; - if (FpuCw & X87_CW_DM) - DummyCw |= _EM_DENORMAL; - if (FpuCw & X87_CW_ZM) - DummyCw |= _EM_ZERODIVIDE; - if (FpuCw & X87_CW_OM) - DummyCw |= _EM_OVERFLOW; - if (FpuCw & X87_CW_UM) - DummyCw |= _EM_UNDERFLOW; - if (FpuCw & X87_CW_PM) - DummyCw |= _EM_INEXACT; - - switch (FpuCw & X87_CW_PC_MASK) - { - case X87_CW_PC24: - DummyCw |= _PC_24; - break; - case X87_CW_PC53: - DummyCw |= _PC_53; - break; - case X87_CW_PC64: - DummyCw |= _PC_64; - break; - } - - switch (FpuCw & X87_CW_RC_MASK) - { - case X87_CW_RC_NEAREST: - DummyCw |= _RC_NEAR; - break; - case X87_CW_RC_DOWN: - DummyCw |= _RC_DOWN; - break; - case X87_CW_RC_UP: - DummyCw |= _RC_UP; - break; - case X87_CW_RC_ZERO: - DummyCw |= _RC_CHOP; - break; - } - - /* unset (un)masked bits */ - DummyCw &= ~unMask; - unNew &= unMask; - - /* set new bits */ - DummyCw |= unNew; - - /* translate back into x87 format - * FIXME: translate infinity control! - */ - FpuCw = 0; - if (DummyCw & _EM_INVALID) - FpuCw |= X87_CW_IM; - if (DummyCw & _EM_DENORMAL) - FpuCw |= X87_CW_DM; - if (DummyCw & _EM_ZERODIVIDE) - FpuCw |= X87_CW_ZM; - if (DummyCw & _EM_OVERFLOW) - FpuCw |= X87_CW_OM; - if (DummyCw & _EM_UNDERFLOW) - FpuCw |= X87_CW_UM; - if (DummyCw & _EM_INEXACT) - FpuCw |= X87_CW_PM; - - switch (DummyCw & _MCW_PC) - { - case _PC_24: - FpuCw |= X87_CW_PC24; - break; - case _PC_53: - FpuCw |= X87_CW_PC53; - break; - case _PC_64: - default: - FpuCw |= X87_CW_PC64; - break; - } - - switch (DummyCw & _MCW_RC) - { - case _RC_NEAR: - FpuCw |= X87_CW_RC_NEAREST; - break; - case _RC_DOWN: - FpuCw |= X87_CW_RC_DOWN; - break; - case _RC_UP: - FpuCw |= X87_CW_RC_UP; - break; - case _RC_CHOP: - FpuCw |= X87_CW_RC_ZERO; - break; - } - - /* set controlword */ - asm volatile("fldcw %0" : : "m"(FpuCw)); - - return DummyCw; - -#if 0 /* The follwing is the original code, broken I think! -blight */ -register unsigned int __res; -#ifdef __GNUC__ -__asm__ __volatile__ ( - "pushl %%eax \n\t" /* make room on stack */ - "fstcw (%%esp) \n\t" - "fwait \n\t" - "popl %%eax \n\t" - "andl $0xffff, %%eax \n\t" /* OK; we have the old value ready */ - - "movl %1, %%ecx \n\t" - "notl %%ecx \n\t" - "andl %%eax, %%ecx \n\t" /* the bits we want to keep */ - - "movl %2, %%edx \n\t" - "andl %1, %%edx \n\t" /* the bits we want to change */ - - "orl %%ecx, %%edx\n\t" /* the new value */ - "pushl %%edx \n\t" - "fldcw (%%esp) \n\t" - "popl %%edx \n\t" - - :"=a" (__res):"r" (unNew),"r" (unMask): "dx", "cx"); -#else -#endif /*__GNUC__*/ - return __res; -#endif -} diff --git a/reactos/lib/crtdll/float/fpreset.c b/reactos/lib/crtdll/float/fpreset.c deleted file mode 100644 index 1a4efe4f31c..00000000000 --- a/reactos/lib/crtdll/float/fpreset.c +++ /dev/null @@ -1,12 +0,0 @@ -#include - - -/* - * @unimplemented - */ -void _fpreset(void) -{ - /* FIXME: This causes an exception */ -// __asm__ __volatile__("fninit\n\t"); - return; -} diff --git a/reactos/lib/crtdll/float/logb.c b/reactos/lib/crtdll/float/logb.c deleted file mode 100644 index d71c654ee77..00000000000 --- a/reactos/lib/crtdll/float/logb.c +++ /dev/null @@ -1,34 +0,0 @@ -/* Math functions for i387. - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by John C. Bowman , 1995. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - The GNU C 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include - -double _logb (double __x) -{ - register double __value; -#ifdef __GNUC__ - register double __junk; - __asm __volatile__ - ("fxtract\n\t" - : "=t" (__junk), "=u" (__value) : "0" (__x)); -#else -#endif /*__GNUC__*/ - return __value; -} diff --git a/reactos/lib/crtdll/float/nafter.c b/reactos/lib/crtdll/float/nafter.c deleted file mode 100644 index dd007322e4b..00000000000 --- a/reactos/lib/crtdll/float/nafter.c +++ /dev/null @@ -1,16 +0,0 @@ -#include - - -/* - * @implemented - */ -double _nextafter(double x, double y) -{ - if (x == y) - return x; - - if (isnan(x) || isnan(y)) - return x; - - return x; -} diff --git a/reactos/lib/crtdll/float/statfp.c b/reactos/lib/crtdll/float/statfp.c deleted file mode 100644 index e2d2112afb6..00000000000 --- a/reactos/lib/crtdll/float/statfp.c +++ /dev/null @@ -1,19 +0,0 @@ -#include - -/* - * @implemented - */ -unsigned int _statusfp (void) -{ - -register unsigned short __res; -#ifdef __GNUC__ -__asm__ __volatile__ ( - "fstsw %0 \n\t" -// "movzwl %ax, %eax" - :"=a" (__res) - ); -#else -#endif /*__GNUC__*/ - return __res; -} diff --git a/reactos/lib/crtdll/io/chsize.c b/reactos/lib/crtdll/io/chsize.c deleted file mode 100644 index 678c0f5e24e..00000000000 --- a/reactos/lib/crtdll/io/chsize.c +++ /dev/null @@ -1,18 +0,0 @@ -/* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */ -#include - -#define NDEBUG -#include - -/* - * @implemented - */ -int _chsize(int _fd, long size) -{ - DPRINT("_chsize(fd %d, size %d)\n", _fd, size); - if (lseek(_fd, size, 0) == -1) - return -1; - if (_write(_fd, 0, 0) < 0) - return -1; - return 0; -} diff --git a/reactos/lib/crtdll/io/close.c b/reactos/lib/crtdll/io/close.c deleted file mode 100644 index 9388877e866..00000000000 --- a/reactos/lib/crtdll/io/close.c +++ /dev/null @@ -1,19 +0,0 @@ -#include "precomp.h" -#include -#include - -#define NDEBUG -#include - -/* - * @implemented - */ -int _close(int _fd) -{ - DPRINT("_close(fd %d)\n", _fd); - if (_fd == -1) - return -1; - if (CloseHandle(_get_osfhandle(_fd)) == FALSE) - return -1; - return __fileno_close(_fd); -} diff --git a/reactos/lib/crtdll/io/commit.c b/reactos/lib/crtdll/io/commit.c deleted file mode 100644 index d4024a6cd0c..00000000000 --- a/reactos/lib/crtdll/io/commit.c +++ /dev/null @@ -1,18 +0,0 @@ -#include "precomp.h" -#include -#include -#include - - -/* - * @implemented - */ -int _commit(int _fd) -{ - if (! FlushFileBuffers(_get_osfhandle(_fd)) ) { - __set_errno(EBADF); - return -1; - } - - return 0; -} diff --git a/reactos/lib/crtdll/io/dup2.c b/reactos/lib/crtdll/io/dup2.c deleted file mode 100644 index 995e48b00cd..00000000000 --- a/reactos/lib/crtdll/io/dup2.c +++ /dev/null @@ -1,10 +0,0 @@ -#include -#include - -/* - * @implemented - */ -int _dup2( int handle1, int handle2 ) -{ - return __fileno_dup2( handle1, handle2 ); -} diff --git a/reactos/lib/crtdll/io/isatty.c b/reactos/lib/crtdll/io/isatty.c deleted file mode 100644 index a1d67b85289..00000000000 --- a/reactos/lib/crtdll/io/isatty.c +++ /dev/null @@ -1,19 +0,0 @@ -#include -#include - -#define NDEBUG -#include - -/* - * @implemented - */ -int _isatty( int fd ) -{ - struct stat buf; - DPRINT("_isatty(fd %d)\n", fd); - if (_fstat (fd, &buf) < 0) - return 0; - if (S_ISCHR (buf.st_mode)) - return 1; - return 0; -} diff --git a/reactos/lib/crtdll/io/mktemp.c b/reactos/lib/crtdll/io/mktemp.c deleted file mode 100644 index a47f8d09b61..00000000000 --- a/reactos/lib/crtdll/io/mktemp.c +++ /dev/null @@ -1,78 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details - * PROJECT: ReactOS system libraries - * FILE: lib/crtdll/io/mktemp.c - * PURPOSE: Makes a temp file based on a template - * PROGRAMER: DJ Delorie - Boudewijn Dekker - * UPDATE HISTORY: - * 28/12/98: Appropriated for the Reactos Kernel - */ - -/* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */ -/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ - -#include -#include -#include - -#define NDEBUG -#include - - -/* - * @implemented - */ -char* _mktemp (char *_template) -{ - static int count = 0; - char *cp, *dp; - int i, len, xcount, loopcnt; - - DPRINT("_mktemp('%s')\n", _template); - len = strlen (_template); - cp = _template + len; - - xcount = 0; - while (xcount < 6 && cp > _template && cp[-1] == 'X') - xcount++, cp--; - - if (xcount) { - dp = cp; - while (dp > _template && dp[-1] != '/' && dp[-1] != '\\' && dp[-1] != ':') - dp--; - - /* Keep the first characters of the template, but turn the rest into - Xs. */ - while (cp > dp + 8 - xcount) { - *--cp = 'X'; - xcount = (xcount >= 6) ? 6 : 1 + xcount; - } - - /* If dots occur too early -- squash them. */ - while (dp < cp) { - if (*dp == '.') *dp = 'a'; - dp++; - } - - /* Try to add ".tmp" to the filename. Truncate unused Xs. */ - if (cp + xcount + 3 < _template + len) - strcpy (cp + xcount, ".tmp"); - else - cp[xcount] = 0; - - /* This loop can run up to 2<<(5*6) times, or about 10^9 times. */ - for (loopcnt = 0; loopcnt < (1 << (5 * xcount)); loopcnt++) { - int c = count++; - for (i = 0; i < xcount; i++, c >>= 5) - cp[i] = "abcdefghijklmnopqrstuvwxyz012345"[c & 0x1f]; - if (_access(_template,0) == -1) - return _template; - } - } - - /* Failure: truncate the template and return NULL. */ - *_template = 0; - return 0; -} diff --git a/reactos/lib/crtdll/io/setmode.c b/reactos/lib/crtdll/io/setmode.c deleted file mode 100644 index 0fe6ac54dfb..00000000000 --- a/reactos/lib/crtdll/io/setmode.c +++ /dev/null @@ -1,27 +0,0 @@ -/* $Id$ - * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/crtdll/io/setmode.c - * PURPOSE: Sets the file translation mode - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 28/12/98: Created - */ - -#include -#include -#include - -#define NDEBUG -#include - - -/* - * @implemented - */ -int _setmode(int _fd, int _newmode) -{ - DPRINT("_setmod(fd %d, newmode %x)\n", _fd, _newmode); - return __fileno_setmode(_fd, _newmode); -} diff --git a/reactos/lib/crtdll/io/sopen.c b/reactos/lib/crtdll/io/sopen.c deleted file mode 100644 index 8ebadea6a83..00000000000 --- a/reactos/lib/crtdll/io/sopen.c +++ /dev/null @@ -1,10 +0,0 @@ -#include - - -/* - * @implemented - */ -int _sopen(char *path,int access,int shflag,int mode) -{ - return _open((path), (access)|(shflag), (mode)); -} diff --git a/reactos/lib/crtdll/io/tell.c b/reactos/lib/crtdll/io/tell.c deleted file mode 100644 index 4f81bc83e1e..00000000000 --- a/reactos/lib/crtdll/io/tell.c +++ /dev/null @@ -1,12 +0,0 @@ -/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ -#include -#include - - -/* - * @implemented - */ -off_t _tell(int _file) -{ - return _lseek(_file, 0, SEEK_CUR); -} diff --git a/reactos/lib/crtdll/io/umask.c b/reactos/lib/crtdll/io/umask.c deleted file mode 100644 index b5419310899..00000000000 --- a/reactos/lib/crtdll/io/umask.c +++ /dev/null @@ -1,14 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include - -unsigned _unMode_dll = 022; - -/* - * @implemented - */ -unsigned _umask (unsigned unMode) -{ - unsigned old_mask = _unMode_dll; - _unMode_dll = unMode; - return old_mask; -} diff --git a/reactos/lib/crtdll/io/utime.c b/reactos/lib/crtdll/io/utime.c deleted file mode 100644 index 593ca7e1538..00000000000 --- a/reactos/lib/crtdll/io/utime.c +++ /dev/null @@ -1,25 +0,0 @@ -#include -#include -#include -#include -#include - - -/* - * @implemented - */ -int _utime(const char* filename, struct _utimbuf* buf) -{ - int fn; - int ret; - - fn = _open(filename, _O_RDWR); - if ( fn == -1 ) { - __set_errno(EBADF); - return -1; - } - ret = _futime(fn,buf); - if ( _close(fn) < 0 ) - return -1; - return ret; -} diff --git a/reactos/lib/crtdll/math/acos.c b/reactos/lib/crtdll/math/acos.c deleted file mode 100644 index 23376a6116c..00000000000 --- a/reactos/lib/crtdll/math/acos.c +++ /dev/null @@ -1,27 +0,0 @@ -/* Math functions for i387. - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by John C. Bowman , 1995. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - The GNU C 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include - - -double acos(double __x) -{ - return atan2(sqrt(1.0 - __x * __x), __x); -} diff --git a/reactos/lib/crtdll/math/asin.c b/reactos/lib/crtdll/math/asin.c deleted file mode 100644 index fa57df2850c..00000000000 --- a/reactos/lib/crtdll/math/asin.c +++ /dev/null @@ -1,27 +0,0 @@ -/* Math functions for i387. - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by John C. Bowman , 1995. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - The GNU C 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include - - -double asin(double __x) -{ - return atan2(__x, sqrt(1.0 - __x * __x)); -} diff --git a/reactos/lib/crtdll/math/atan.c b/reactos/lib/crtdll/math/atan.c deleted file mode 100644 index af0e219e728..00000000000 --- a/reactos/lib/crtdll/math/atan.c +++ /dev/null @@ -1,37 +0,0 @@ -/* Math functions for i387. - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by John C. Bowman , 1995. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - The GNU C 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include - -double atan (double __x); - -double atan (double __x) -{ - register double __value; -#ifdef __GNUC__ - __asm __volatile__ - ("fld1\n\t" - "fpatan" - : "=t" (__value) : "0" (__x)); -#else - __value = linkme_atan(__x); -#endif /*__GNUC__*/ - return __value; -} diff --git a/reactos/lib/crtdll/math/atan2.c b/reactos/lib/crtdll/math/atan2.c deleted file mode 100644 index 8ce57f1e433..00000000000 --- a/reactos/lib/crtdll/math/atan2.c +++ /dev/null @@ -1,21 +0,0 @@ - -#include - -double atan2 (double __y, double __x); - -/* - * @implemented - */ -double atan2 (double __y, double __x) -{ - register double __value; -#ifdef __GNUC__ - __asm __volatile__ - ("fpatan\n\t" - "fld %%st(0)" - : "=t" (__value) : "0" (__x), "u" (__y)); -#else - __value = linkme_atan2(__x, __y); -#endif /*__GNUC__*/ - return __value; -} diff --git a/reactos/lib/crtdll/math/cabs.c b/reactos/lib/crtdll/math/cabs.c deleted file mode 100644 index ca9e8426c73..00000000000 --- a/reactos/lib/crtdll/math/cabs.c +++ /dev/null @@ -1,14 +0,0 @@ -#include - -/* - * @implemented - */ -double _cabs( struct _complex z ) -{ - return sqrt( z.x*z.x + z.y*z.y ); -// return hypot(z.x,z.y); -} - - - - diff --git a/reactos/lib/crtdll/math/cos.c b/reactos/lib/crtdll/math/cos.c deleted file mode 100644 index 131fa2dbdb0..00000000000 --- a/reactos/lib/crtdll/math/cos.c +++ /dev/null @@ -1,19 +0,0 @@ -#include - -double cos (double __x); - -/* - * @implemented - */ -double cos (double __x) -{ - register double __value; -#ifdef __GNUC__ - __asm __volatile__ - ("fcos" - : "=t" (__value): "0" (__x)); -#else - __value = linkme_cos(__x); -#endif /*__GNUC__*/ - return __value; -} diff --git a/reactos/lib/crtdll/math/cosh.c b/reactos/lib/crtdll/math/cosh.c deleted file mode 100644 index a21e717cadc..00000000000 --- a/reactos/lib/crtdll/math/cosh.c +++ /dev/null @@ -1,12 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include - - -/* - * @implemented - */ -double cosh(double x) -{ - const double ebig = exp(fabs(x)); - return (ebig + 1.0/ebig) / 2.0; -} diff --git a/reactos/lib/crtdll/math/exp.c b/reactos/lib/crtdll/math/exp.c deleted file mode 100644 index 2707cf8ca3a..00000000000 --- a/reactos/lib/crtdll/math/exp.c +++ /dev/null @@ -1,47 +0,0 @@ -/* Math functions for i387. - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by John C. Bowman , 1995. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - The GNU C 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include - -double exp (double __x); - -double exp (double __x) -{ -#ifdef __GNUC__ - register double __value, __exponent; - __asm __volatile__ - ("fldl2e # e^x = 2^(x * log2(e))\n\t" - "fmul %%st(1) # x * log2(e)\n\t" - "fst %%st(1)\n\t" - "frndint # int(x * log2(e))\n\t" - "fxch\n\t" - "fsub %%st(1) # fract(x * log2(e))\n\t" - "f2xm1 # 2^(fract(x * log2(e))) - 1\n\t" - : "=t" (__value), "=u" (__exponent) : "0" (__x)); - __value += 1.0; - __asm __volatile__ - ("fscale" - : "=t" (__value) : "0" (__value), "u" (__exponent)); - - return __value; -#else - return linkme_exp(__x); -#endif /*__GNUC__*/ -} diff --git a/reactos/lib/crtdll/math/fabs.c b/reactos/lib/crtdll/math/fabs.c deleted file mode 100644 index 5db505ad11b..00000000000 --- a/reactos/lib/crtdll/math/fabs.c +++ /dev/null @@ -1,36 +0,0 @@ -/* Math functions for i387. - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by John C. Bowman , 1995. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - The GNU C 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include - -double fabs (double __x); - -double fabs (double __x) -{ - register double __value; -#ifdef __GNUC__ - __asm __volatile__ - ("fabs" - : "=t" (__value) : "0" (__x)); -#else - __value = linkme_fabs(__x); -#endif /*__GNUC__*/ - return __value; -} diff --git a/reactos/lib/crtdll/math/fmod.c b/reactos/lib/crtdll/math/fmod.c deleted file mode 100644 index 263d6878829..00000000000 --- a/reactos/lib/crtdll/math/fmod.c +++ /dev/null @@ -1,39 +0,0 @@ -/* Math functions for i387. - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by John C. Bowman , 1995. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - The GNU C 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include - -double fmod (double __x, double __y); - -double fmod (double __x, double __y) -{ - register double __value; -#ifdef __GNUC__ - __asm __volatile__ - ("1: fprem\n\t" - "fstsw %%ax\n\t" - "sahf\n\t" - "jp 1b" - : "=t" (__value) : "0" (__x), "u" (__y) : "ax", "cc"); -#else - __value = linkme_fmod(__x, __y); -#endif /*__GNUC__*/ - return __value; -} diff --git a/reactos/lib/crtdll/math/hypot.c b/reactos/lib/crtdll/math/hypot.c deleted file mode 100644 index de078a140e8..00000000000 --- a/reactos/lib/crtdll/math/hypot.c +++ /dev/null @@ -1,101 +0,0 @@ -/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ -/* - * hypot() function for DJGPP. - * - * hypot() computes sqrt(x^2 + y^2). The problem with the obvious - * naive implementation is that it might fail for very large or - * very small arguments. For instance, for large x or y the result - * might overflow even if the value of the function should not, - * because squaring a large number might trigger an overflow. For - * very small numbers, their square might underflow and will be - * silently replaced by zero; this won't cause an exception, but might - * have an adverse effect on the accuracy of the result. - * - * This implementation tries to avoid the above pitfals, without - * inflicting too much of a performance hit. - * - */ - -#include -#include -#include - -/* Approximate square roots of DBL_MAX and DBL_MIN. Numbers - between these two shouldn't neither overflow nor underflow - when squared. */ -#define __SQRT_DBL_MAX 1.3e+154 -#define __SQRT_DBL_MIN 2.3e-162 - -/* - * @implemented - */ -double -_hypot(double x, double y) -{ - double abig = fabs(x), asmall = fabs(y); - double ratio; - - /* Make abig = max(|x|, |y|), asmall = min(|x|, |y|). */ - if (abig < asmall) - { - double temp = abig; - - abig = asmall; - asmall = temp; - } - - /* Trivial case. */ - if (asmall == 0.) - return abig; - - /* Scale the numbers as much as possible by using its ratio. - For example, if both ABIG and ASMALL are VERY small, then - X^2 + Y^2 might be VERY inaccurate due to loss of - significant digits. Dividing ASMALL by ABIG scales them - to a certain degree, so that accuracy is better. */ - - if ((ratio = asmall / abig) > __SQRT_DBL_MIN && abig < __SQRT_DBL_MAX) - return abig * sqrt(1.0 + ratio*ratio); - else - { - /* Slower but safer algorithm due to Moler and Morrison. Never - produces any intermediate result greater than roughly the - larger of X and Y. Should converge to machine-precision - accuracy in 3 iterations. */ - - double r = ratio*ratio, t, s, p = abig, q = asmall; - - do { - t = 4. + r; - if (t == 4.) - break; - s = r / t; - p += 2. * s * p; - q *= s; - r = (q / p) * (q / p); - } while (1); - - return p; - } -} - -#ifdef TEST - -#include - -int -main(void) -{ - printf("hypot(3, 4) =\t\t\t %25.17e\n", _hypot(3., 4.)); - printf("hypot(3*10^150, 4*10^150) =\t %25.17g\n", _hypot(3.e+150, 4.e+150)); - printf("hypot(3*10^306, 4*10^306) =\t %25.17g\n", _hypot(3.e+306, 4.e+306)); - printf("hypot(3*10^-320, 4*10^-320) =\t %25.17g\n",_hypot(3.e-320, 4.e-320)); - printf("hypot(0.7*DBL_MAX, 0.7*DBL_MAX) =%25.17g\n",_hypot(0.7*DBL_MAX, 0.7*DBL_MAX)); - printf("hypot(DBL_MAX, 1.0) =\t\t %25.17g\n", _hypot(DBL_MAX, 1.0)); - printf("hypot(1.0, DBL_MAX) =\t\t %25.17g\n", _hypot(1.0, DBL_MAX)); - printf("hypot(0.0, DBL_MAX) =\t\t %25.17g\n", _hypot(0.0, DBL_MAX)); - - return 0; -} - -#endif diff --git a/reactos/lib/crtdll/math/j0_y0.c b/reactos/lib/crtdll/math/j0_y0.c deleted file mode 100644 index 01143ef3dcc..00000000000 --- a/reactos/lib/crtdll/math/j0_y0.c +++ /dev/null @@ -1,18 +0,0 @@ -#include - - -/* - * @unimplemented - */ -double _j0(double x) -{ - return x; -} - -/* - * @unimplemented - */ -double _y0(double x) -{ - return x; -} diff --git a/reactos/lib/crtdll/math/j1_y1.c b/reactos/lib/crtdll/math/j1_y1.c deleted file mode 100644 index 3c899886491..00000000000 --- a/reactos/lib/crtdll/math/j1_y1.c +++ /dev/null @@ -1,18 +0,0 @@ -#include - - -/* - * @unimplemented - */ -double _j1(double x) -{ - return x; -} - -/* - * @unimplemented - */ -double _y1(double x) -{ - return x; -} diff --git a/reactos/lib/crtdll/math/jn_yn.c b/reactos/lib/crtdll/math/jn_yn.c deleted file mode 100644 index a9304720a2e..00000000000 --- a/reactos/lib/crtdll/math/jn_yn.c +++ /dev/null @@ -1,18 +0,0 @@ -#include - - -/* - * @unimplemented - */ -double _jn(int n, double x) -{ - return x; -} - -/* - * @unimplemented - */ -double _yn(int n, double x) -{ - return x; -} diff --git a/reactos/lib/crtdll/math/ldexp.c b/reactos/lib/crtdll/math/ldexp.c deleted file mode 100644 index 9c603445509..00000000000 --- a/reactos/lib/crtdll/math/ldexp.c +++ /dev/null @@ -1,36 +0,0 @@ -/* Math functions for i387. - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by John C. Bowman , 1995. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - The GNU C 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include - -double ldexp (double __x, int __y); - -double ldexp (double __x, int __y) -{ - register double __value; -#ifdef __GNUC__ - __asm __volatile__ - ("fscale" - : "=t" (__value) : "0" (__x), "u" ((double) __y)); -#else - __value = linkme_ldexp(__x, __y); -#endif /*__GNUC__*/ - return __value; -} diff --git a/reactos/lib/crtdll/math/log.c b/reactos/lib/crtdll/math/log.c deleted file mode 100644 index 014c78a2304..00000000000 --- a/reactos/lib/crtdll/math/log.c +++ /dev/null @@ -1,38 +0,0 @@ -/* Math functions for i387. - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by John C. Bowman , 1995. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - The GNU C 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include - -double log (double __x); - -double log (double __x) -{ - register double __value; -#ifdef __GNUC__ - __asm __volatile__ - ("fldln2\n\t" - "fxch\n\t" - "fyl2x" - : "=t" (__value) : "0" (__x)); -#else - __value = linkme_log(__x); -#endif /*__GNUC__*/ - return __value; -} diff --git a/reactos/lib/crtdll/math/log10.c b/reactos/lib/crtdll/math/log10.c deleted file mode 100644 index 58e8cd6ebc9..00000000000 --- a/reactos/lib/crtdll/math/log10.c +++ /dev/null @@ -1,38 +0,0 @@ -/* Math functions for i387. - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by John C. Bowman , 1995. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - The GNU C 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include - -double log10 (double __x); - -double log10 (double __x) -{ - register double __value; -#ifdef __GNUC__ - __asm __volatile__ - ("fldlg2\n\t" - "fxch\n\t" - "fyl2x" - : "=t" (__value) : "0" (__x)); -#else - __value = linkme_log10(__x); -#endif /*__GNUC__*/ - return __value; -} diff --git a/reactos/lib/crtdll/math/pow.c b/reactos/lib/crtdll/math/pow.c deleted file mode 100644 index 91e07216944..00000000000 --- a/reactos/lib/crtdll/math/pow.c +++ /dev/null @@ -1,97 +0,0 @@ -/* Math functions for i387. - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by John C. Bowman , 1995. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - The GNU C 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include - -double pow (double __x, double __y); - -double __log2 (double __x); - -double __log2 (double __x) -{ - register double __value; -#ifdef __GNUC__ - __asm __volatile__ - ("fld1\n\t" - "fxch\n\t" - "fyl2x" - : "=t" (__value) : "0" (__x)); -#else - //__value = linkme_log2(__x); - __value = 0; -#endif /*__GNUC__*/ - return __value; -} - -/* - * @implemented - */ -double pow (double __x, double __y) -{ - register double __value; -#ifdef __GNUC__ - register double __exponent; - long __p = (long) __y; - - if (__x == 0.0 && __y > 0.0) - return 0.0; - if (__y == (double) __p) - { - double __r = 1.0; - if (__p == 0) - return 1.0; - if (__p < 0) - { - __p = -__p; - __x = 1.0 / __x; - } - while (1) - { - if (__p & 1) - __r *= __x; - __p >>= 1; - if (__p == 0) - return __r; - __x *= __x; - } - /* NOTREACHED */ - } - __asm __volatile__ - ("fmul %%st(1) # y * log2(x)\n\t" - "fst %%st(1)\n\t" - "frndint # int(y * log2(x))\n\t" - "fxch\n\t" - "fsub %%st(1) # fract(y * log2(x))\n\t" - "f2xm1 # 2^(fract(y * log2(x))) - 1\n\t" - : "=t" (__value), "=u" (__exponent) : "0" (__log2 (__x)), "1" (__y)); - __value += 1.0; - __asm __volatile__ - ("fscale" - : "=t" (__value) : "0" (__value), "u" (__exponent)); -#else - __value = linkme_pow(__x, __y); -#endif /*__GNUC__*/ - return __value; -} - -long double powl (long double __x,long double __y) -{ - return pow(__x,__y/2)*pow(__x,__y/2); -} diff --git a/reactos/lib/crtdll/math/sin.c b/reactos/lib/crtdll/math/sin.c deleted file mode 100644 index db070a31d17..00000000000 --- a/reactos/lib/crtdll/math/sin.c +++ /dev/null @@ -1,36 +0,0 @@ -/* Math functions for i387. - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by John C. Bowman , 1995. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - The GNU C 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include - -double sin (double __x); - -double sin (double __x) -{ - register double __value; -#ifdef __GNUC__ - __asm __volatile__ - ("fsin" - : "=t" (__value) : "0" (__x)); -#else - __value = linkme_sin(__x); -#endif /*__GNUC__*/ - return __value; -} diff --git a/reactos/lib/crtdll/math/sinh.c b/reactos/lib/crtdll/math/sinh.c deleted file mode 100644 index f977a6acfa5..00000000000 --- a/reactos/lib/crtdll/math/sinh.c +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include - -/* - * @implemented - */ -double sinh(double x) -{ - if(x >= 0.0) - { - const double epos = exp(x); - return (epos - 1.0/epos) / 2.0; - } - else - { - const double eneg = exp(-x); - return (1.0/eneg - eneg) / 2.0; - } -} diff --git a/reactos/lib/crtdll/math/sqrt.c b/reactos/lib/crtdll/math/sqrt.c deleted file mode 100644 index d414fcdbc2e..00000000000 --- a/reactos/lib/crtdll/math/sqrt.c +++ /dev/null @@ -1,35 +0,0 @@ -/* Math functions for i387. - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by John C. Bowman , 1995. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - The GNU C 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ -#include - -double sqrt (double __x); - -double sqrt (double __x) -{ - register double __value; -#ifdef __GNUC__ - __asm __volatile__ - ("fsqrt" - : "=t" (__value) : "0" (__x)); -#else - __value = linkme_sqrt(__x); -#endif /*__GNUC__*/ - return __value; -} diff --git a/reactos/lib/crtdll/math/stubs.c b/reactos/lib/crtdll/math/stubs.c deleted file mode 100644 index 82fe881ebc0..00000000000 --- a/reactos/lib/crtdll/math/stubs.c +++ /dev/null @@ -1,133 +0,0 @@ -#include - - -double _CIsin(double x); -double _CIcos(double x); -double _CItan(double x); -double _CIsinh(double x); -double _CIcosh(double x); -double _CItanh(double x); -double _CIasin(double x); -double _CIacos(double x); -double _CIatan(double x); -double _CIatan2(double y, double x); -double _CIexp(double x); -double _CIlog(double x); -double _CIlog10(double x); -double _CIpow(double x, double y); -double _CIsqrt(double x); -double _CIfmod(double x, double y); - - -/* - * @implemented - */ -double _CIsin(double x) -{ - return sin(x); -} -/* - * @implemented - */ -double _CIcos(double x) -{ - return cos(x); -} -/* - * @implemented - */ -double _CItan(double x) -{ - return tan(x); -} -/* - * @implemented - */ -double _CIsinh(double x) -{ - return sinh(x); -} -/* - * @implemented - */ -double _CIcosh(double x) -{ - return cosh(x); -} -/* - * @implemented - */ -double _CItanh(double x) -{ - return tanh(x); -} -/* - * @implemented - */ -double _CIasin(double x) -{ - return asin(x); -} -/* - * @implemented - */ -double _CIacos(double x) -{ - return acos(x); -} -/* - * @implemented - */ -double _CIatan(double x) -{ - return atan(x); -} -/* - * @implemented - */ -double _CIatan2(double y, double x) -{ - return atan2(y, x); -} -/* - * @implemented - */ -double _CIexp(double x) -{ - return exp(x); -} -/* - * @implemented - */ -double _CIlog(double x) -{ - return log(x); -} -/* - * @implemented - */ -double _CIlog10(double x) -{ - return log10(x); -} -/* - * @implemented - */ -double _CIpow(double x, double y) -{ - return pow(x, y); -} -/* - * @implemented - */ -double _CIsqrt(double x) -{ - return sqrt(x); -} -/* - * @implemented - */ -double _CIfmod(double x, double y) -{ - return fmod(x, y); -} diff --git a/reactos/lib/crtdll/math/tan.c b/reactos/lib/crtdll/math/tan.c deleted file mode 100644 index 1acc03619f9..00000000000 --- a/reactos/lib/crtdll/math/tan.c +++ /dev/null @@ -1,37 +0,0 @@ -/* Math functions for i387. - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by John C. Bowman , 1995. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - The GNU C 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include - -double tan (double __x); - -double tan (double __x) -{ - register double __value; -#ifdef __GNUC__ - register double __value2 __attribute__ ((unused)); - __asm __volatile__ - ("fptan" - : "=t" (__value2), "=u" (__value) : "0" (__x)); -#else - __value = linkme_tan(__x); -#endif /*__GNUC__*/ - return __value; -} diff --git a/reactos/lib/crtdll/math/tanh.c b/reactos/lib/crtdll/math/tanh.c deleted file mode 100644 index 88b9acca5ae..00000000000 --- a/reactos/lib/crtdll/math/tanh.c +++ /dev/null @@ -1,20 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ - -#include - -/* - * @implemented - */ -double tanh(double x) -{ - if (x > 50) - return 1; - else if (x < -50) - return -1; - else - { - const double ebig = exp(x); - const double esmall = 1.0/ebig; - return (ebig - esmall) / (ebig + esmall); - } -} diff --git a/reactos/lib/crtdll/mbstring/hanzen.c b/reactos/lib/crtdll/mbstring/hanzen.c deleted file mode 100644 index 60853efead4..00000000000 --- a/reactos/lib/crtdll/mbstring/hanzen.c +++ /dev/null @@ -1,107 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/crtdll/mbstring/hanzen.c - * PURPOSE: Multibyte conversion routines formerly called hantozen and zentohan - * PROGRAMER: Boudewijn Dekker, Taiji Yamada - * UPDATE HISTORY: - Modified from Taiji Yamada japanese code system utilities - * 12/04/99: Created - */ - -#include - -static unsigned short han_to_zen_ascii_table[0x5f] = { - 0x8140, 0x8149, 0x8168, 0x8194, 0x8190, 0x8193, 0x8195, 0x8166, - 0x8169, 0x816a, 0x8196, 0x817b, 0x8143, 0x817c, 0x8144, 0x815e, - 0x824f, 0x8250, 0x8251, 0x8252, 0x8253, 0x8254, 0x8255, 0x8256, - 0x8257, 0x8258, 0x8146, 0x8147, 0x8183, 0x8181, 0x8184, 0x8148, - 0x8197, 0x8260, 0x8261, 0x8262, 0x8263, 0x8264, 0x8265, 0x8266, - 0x8267, 0x8268, 0x8269, 0x826a, 0x826b, 0x826c, 0x826d, 0x826e, - 0x826f, 0x8270, 0x8271, 0x8272, 0x8273, 0x8274, 0x8275, 0x8276, - 0x8277, 0x8278, 0x8279, 0x816d, 0x818f, 0x816e, 0x814f, 0x8151, - 0x8165, 0x8281, 0x8282, 0x8283, 0x8284, 0x8285, 0x8286, 0x8287, - 0x8288, 0x8289, 0x828a, 0x828b, 0x828c, 0x828d, 0x828e, 0x828f, - 0x8290, 0x8291, 0x8292, 0x8293, 0x8294, 0x8295, 0x8296, 0x8297, - 0x8298, 0x8299, 0x829a, 0x816f, 0x8162, 0x8170, 0x8150 -}; -static unsigned short han_to_zen_kana_table[0x40] = { - 0x8140, 0x8142, 0x8175, 0x8176, 0x8141, 0x8145, 0x8392, 0x8340, - 0x8342, 0x8344, 0x8346, 0x8348, 0x8383, 0x8385, 0x8387, 0x8362, - 0x815b, 0x8341, 0x8343, 0x8345, 0x8347, 0x8349, 0x834a, 0x834c, - 0x834e, 0x8350, 0x8352, 0x8354, 0x8356, 0x8358, 0x835a, 0x835c, - 0x835e, 0x8360, 0x8363, 0x8365, 0x8367, 0x8369, 0x836a, 0x836b, - 0x836c, 0x836d, 0x836e, 0x8371, 0x8374, 0x8377, 0x837a, 0x837d, - 0x837e, 0x8380, 0x8381, 0x8382, 0x8384, 0x8386, 0x8388, 0x8389, - 0x838a, 0x838b, 0x838c, 0x838d, 0x838f, 0x8393, 0x814a, 0x814b -}; -static unsigned char zen_to_han_kana_table[0x8396-0x8340+1] = { - 0xa7, 0xb1, 0xa8, 0xb2, 0xa9, 0xb3, 0xaa, 0xb4, - 0xab, 0xb5, 0xb6, 0xb6, 0xb7, 0xb7, 0xb8, 0xb8, - 0xb9, 0xb9, 0xba, 0xba, 0xbb, 0xbb, 0xbc, 0xbc, - 0xbd, 0xbd, 0xbe, 0xbe, 0xbf, 0xbf, 0xc0, 0xc0, - 0xc1, 0xc1, 0xaf, 0xc2, 0xc2, 0xc3, 0xc3, 0xc4, - 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xca, - 0xca, 0xcb, 0xcb, 0xcb, 0xcc, 0xcc, 0xcc, 0xcd, - 0xcd, 0xcd, 0xce, 0xce, 0xce, 0xcf, 0xd0, 0, - 0xd1, 0xd2, 0xd3, 0xac, 0xd4, 0xad, 0xd5, 0xae, - 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdc, - 0xb2, 0xb4, 0xa6, 0xdd, 0xb3, 0xb6, 0xb9 -}; -#define ZTOH_SYMBOLS 9 -static unsigned short zen_to_han_symbol_table_1[ZTOH_SYMBOLS] = { - 0x8142, 0x8175, 0x8176, 0x8141, 0x8145, 0x815b, 0x814a, 0x814b -}; -static unsigned char zen_to_han_symbol_table_2[ZTOH_SYMBOLS] = { - 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xb0, 0xde, 0xdf -}; -#define ISKANA(c) ((c) >= 0xa1 && (c) <= 0xdf) -#define JISHIRA(c) ((c) >= 0x829f && (c) <= 0x82f1) -#define JISKANA(c) ((c) >= 0x8340 && (c) <= 0x8396 && (c) != 0x837f) -#define JTOKANA(c) ((c) <= 0x82dd ? (c) + 0xa1 : (c) + 0xa2) - - -/* - * @implemented - */ -unsigned short _mbbtombc(unsigned short c) -{ - if (c >= 0x20 && c <= 0x7e) { - return han_to_zen_ascii_table[c - 0x20]; - } else if (ISKANA(c)) { - return han_to_zen_kana_table[c - 0xa0]; - } - return c; -} - - -/* - * @implemented - */ -unsigned short _mbctombb(unsigned short c) -{ - int i; - unsigned short *p; - - if (JISKANA(c)) { - return zen_to_han_kana_table[c - 0x8340]; - } else if (JISHIRA(c)) { - c = JTOKANA(c); - return zen_to_han_kana_table[c - 0x8340]; - } else if (c <= 0x8396) { - for (i = 0x20, p = han_to_zen_ascii_table; i <= 0x7e; i++, p++) { - if (*p == c) { - return i; - } - } - for (i = 0; i < ZTOH_SYMBOLS; i++) { - if (zen_to_han_symbol_table_1[i] == c) { - return zen_to_han_symbol_table_2[i]; - } - } - } - return c; -} - - - diff --git a/reactos/lib/crtdll/mbstring/ischira.c b/reactos/lib/crtdll/mbstring/ischira.c deleted file mode 100644 index 9fa4426b3e6..00000000000 --- a/reactos/lib/crtdll/mbstring/ischira.c +++ /dev/null @@ -1,46 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/crtdll/mbstring/ischira.c - * PURPOSE: - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 12/04/99: Created - */ - -#include -#include - - -/* - * @implemented - */ -int _ismbchira(unsigned int c) -{ - return ((c>=0x829F) && (c<=0x82F1)); -} - -/* - * @implemented - */ -int _ismbckata(unsigned int c) -{ - return ((c>=0x8340) && (c<=0x8396)); -} - -/* - * @implemented - */ -unsigned int _mbctohira(unsigned int c) -{ - return c; -} - -/* - * @implemented - */ -unsigned int _mbctokata(unsigned int c) -{ - return c; -} - diff --git a/reactos/lib/crtdll/mbstring/iskana.c b/reactos/lib/crtdll/mbstring/iskana.c deleted file mode 100644 index fdf57960522..00000000000 --- a/reactos/lib/crtdll/mbstring/iskana.c +++ /dev/null @@ -1,20 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/crtdll/mbstring/hanzen.c - * PURPOSE: Checks for kana character - * PROGRAMER: Boudewijn Dekker, Taiji Yamada - * UPDATE HISTORY: - Modified from Taiji Yamada japanese code system utilities - * 12/04/99: Created - */ -#include -#include - -/* - * @implemented - */ -int _ismbbkana(unsigned char c) -{ - return ((_jctype+1)[(unsigned char)(c)] & (_KNJ_M|_KNJ_P)); -} diff --git a/reactos/lib/crtdll/mbstring/iskmoji.c b/reactos/lib/crtdll/mbstring/iskmoji.c deleted file mode 100644 index e2f1d48c840..00000000000 --- a/reactos/lib/crtdll/mbstring/iskmoji.c +++ /dev/null @@ -1,6 +0,0 @@ -#include - -int _ismbbkalpha(unsigned char c) -{ - return (0xA7 <= c && c <= 0xDF); -} diff --git a/reactos/lib/crtdll/mbstring/iskpun.c b/reactos/lib/crtdll/mbstring/iskpun.c deleted file mode 100644 index 935c850cb0d..00000000000 --- a/reactos/lib/crtdll/mbstring/iskpun.c +++ /dev/null @@ -1,18 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/crtdll/mbstring/iskpun.c - * PURPOSE: - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 12/04/99: Created - */ -#include - -/* - * @implemented - */ -int _ismbbkpunct( unsigned int c ) -{ - return ((_jctype+1)[(unsigned char)(c)] & (_KNJ_P)); -} diff --git a/reactos/lib/crtdll/mbstring/islwr.c b/reactos/lib/crtdll/mbstring/islwr.c deleted file mode 100644 index 44167a836f3..00000000000 --- a/reactos/lib/crtdll/mbstring/islwr.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/crtdll/mbstring/mbsncmp.c - * PURPOSE: - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 12/04/99: Created - */ - -#include -#include - -/* - * code page 952 only - * - * @implemented - */ -int _ismbclower( unsigned int c ) -{ - if ((c & 0xFF00) != 0) { - if ( c >= 0x829A && c<= 0x829A ) - return 1; - } - - return islower(c); -} diff --git a/reactos/lib/crtdll/mbstring/ismbal.c b/reactos/lib/crtdll/mbstring/ismbal.c deleted file mode 100644 index 398d22df624..00000000000 --- a/reactos/lib/crtdll/mbstring/ismbal.c +++ /dev/null @@ -1,20 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/crtdll/mbstring/hanzen.c - * PURPOSE: Checks for alphabetic multibyte character - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 12/04/99: Created - */ -#include -#include - -/* - * @implemented - */ -int _ismbbalpha(unsigned char c) -{ - return (isalpha(c) ||_ismbbkalnum(c)); -} - diff --git a/reactos/lib/crtdll/mbstring/ismbaln.c b/reactos/lib/crtdll/mbstring/ismbaln.c deleted file mode 100644 index 109a2f5ef76..00000000000 --- a/reactos/lib/crtdll/mbstring/ismbaln.c +++ /dev/null @@ -1,12 +0,0 @@ -#include -#include - - -/* - * @implemented - */ -int _ismbbalnum(unsigned char c) -{ - return (isalnum(c) || _ismbbkalnum(c)); -} - diff --git a/reactos/lib/crtdll/mbstring/ismbc.c b/reactos/lib/crtdll/mbstring/ismbc.c deleted file mode 100644 index f4bcc7a1a25..00000000000 --- a/reactos/lib/crtdll/mbstring/ismbc.c +++ /dev/null @@ -1,132 +0,0 @@ -#include - -int _ismbbalpha(unsigned char c); -int _ismbbalnum(unsigned char c); - -int _ismbcalnum( unsigned int c ) -{ - if ((c & 0xFF00) != 0) { - // true multibyte character - return 0; - } - else - return _ismbbalnum(c); - - return 0; -} - -/* - * @implemented - */ -int _ismbcalpha( unsigned int c ) -{ - if ((c & 0xFF00) != 0) { - // true multibyte character - return 0; - } - else - return _ismbbalpha(c); - - return 0; -} - -/* - * @implemented - */ -int _ismbcdigit( unsigned int c ) -{ - if ((c & 0xFF00) != 0) { - // true multibyte character - return 0; - } - else - return 0; -// return _ismbbdigit(c); - - return 0; -} - -/* - * @implemented - */ -int _ismbcprint( unsigned int c ) -{ - if ((c & 0xFF00) != 0) { - // true multibyte character - return 0; - } - else - return 0; -// return _ismbbdigit(c); - - return 0; -} - -/* - * @implemented - */ -int _ismbcsymbol( unsigned int c ) -{ - if ((c & 0xFF00) != 0) { - // true multibyte character - return 0; - } - else - return 0; -// return _ismbbdigit(c); - - return 0; -} - -/* - * @implemented - */ -int _ismbcspace( unsigned int c ) -{ - if ((c & 0xFF00) != 0) { - // true multibyte character - return 0; - } - else - return 0; -// return _ismbbdigit(c); - - return 0; -} -/* - * @implemented - */ -int _ismbclegal(unsigned int c) -{ - if ((c & 0xFF00) != 0) { - return _ismbblead(c>>8) && _ismbbtrail(c&0xFF); - } - else - return _ismbbtrail(c&0xFF); - - return 0; -} - -/* - * @unimplemented - */ -int _ismbcl0(unsigned int c) -{ - return 0; -} - -/* - * @unimplemented - */ -int _ismbcl1(unsigned int c) -{ - return 0; -} - -/* - * @unimplemented - */ -int _ismbcl2(unsigned int c) -{ - return 0; -} diff --git a/reactos/lib/crtdll/mbstring/ismbgra.c b/reactos/lib/crtdll/mbstring/ismbgra.c deleted file mode 100644 index f38499b0b80..00000000000 --- a/reactos/lib/crtdll/mbstring/ismbgra.c +++ /dev/null @@ -1,11 +0,0 @@ -#include -#include -#include - -/* - * @implemented - */ -int _ismbbgraph(unsigned char c) -{ - return (isgraph(c) || _ismbbkana(c)); -} diff --git a/reactos/lib/crtdll/mbstring/ismbkaln.c b/reactos/lib/crtdll/mbstring/ismbkaln.c deleted file mode 100644 index 44f764ad0c4..00000000000 --- a/reactos/lib/crtdll/mbstring/ismbkaln.c +++ /dev/null @@ -1,19 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/crtdll/mbstring/iskpun.c - * PURPOSE: - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 12/04/99: Created - */ -#include -#include - -/* - * @implemented - */ -int _ismbbkalnum( unsigned int c ) -{ - return ((_jctype+1)[(unsigned char)(c)] & (_KNJ_P)); -} diff --git a/reactos/lib/crtdll/mbstring/ismblead.c b/reactos/lib/crtdll/mbstring/ismblead.c deleted file mode 100644 index ba65a2c7a61..00000000000 --- a/reactos/lib/crtdll/mbstring/ismblead.c +++ /dev/null @@ -1,65 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/crtdll/mbstring/ismblead.c - * PURPOSE: Checks for a lead byte - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * Modified from Taiji Yamada japanese code system utilities - * 12/04/99: Created - */ - -#include -#include -#include - -size_t _mbclen2(const unsigned int s); - -char _jctype[257] = { -/*-1*/ ___, -/*0x*/ ___,___,___,___,___,___,___,___,___,___,___,___,___,___,___,___, -/*1x*/ ___,___,___,___,___,___,___,___,___,___,___,___,___,___,___,___, -/*2x*/ ___,___,___,___,___,___,___,___,___,___,___,___,___,___,___,___, -/*3x*/ ___,___,___,___,___,___,___,___,___,___,___,___,___,___,___,___, -/*4x*/ __2,__2,__2,__2,__2,__2,__2,__2,__2,__2,__2,__2,__2,__2,__2,__2, -/*5x*/ __2,__2,__2,__2,__2,__2,__2,__2,__2,__2,__2,__2,__2,__2,__2,__2, -/*6x*/ __2,__2,__2,__2,__2,__2,__2,__2,__2,__2,__2,__2,__2,__2,__2,__2, -/*7x*/ __2,__2,__2,__2,__2,__2,__2,__2,__2,__2,__2,__2,__2,__2,__2,___, -/*8x*/ __2,_12,_12,_12,_12,_12,_12,_12,_12,_12,_12,_12,_12,_12,_12,_12, -/*9x*/ _12,_12,_12,_12,_12,_12,_12,_12,_12,_12,_12,_12,_12,_12,_12,_12, -/*Ax*/ __2,_P2,_P2,_P2,_P2,_P2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2, -/*Bx*/ _M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2, -/*Cx*/ _M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2, -/*Dx*/ _M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2,_M2, -/*Ex*/ _12,_12,_12,_12,_12,_12,_12,_12,_12,_12,_12,_12,_12,_12,_12,_12, -/*Fx*/ _12,_12,_12,_12,_12,_12,_12,_12,_12,_12,_12,_12,_12,___,___,___ -}; - -char *_mbctype = _jctype; -/* - * @implemented - */ -int _ismbblead(unsigned int c) -{ - return ((_jctype+1)[(unsigned char)(c)] & _KNJ_1); -} -//int _ismbblead(unsigned int byte) -//{ -// -// return (int)IsDBCSLeadByte(byte) -//} - -/* - * @implemented - */ -int _ismbslead( const unsigned char *str, const unsigned char *t) -{ - unsigned char *s = (unsigned char *)str; - while(*s != 0 && s != t) - { - - s+= _mbclen2(*s); - } - return _ismbblead( *s); -} - diff --git a/reactos/lib/crtdll/mbstring/ismbpri.c b/reactos/lib/crtdll/mbstring/ismbpri.c deleted file mode 100644 index e6d5ebc9881..00000000000 --- a/reactos/lib/crtdll/mbstring/ismbpri.c +++ /dev/null @@ -1,11 +0,0 @@ -#include -#include -#include - -/* - * @implemented - */ -int _ismbbprint(unsigned char c) -{ - return (isprint(c) || _ismbbkana(c)); -} diff --git a/reactos/lib/crtdll/mbstring/ismbpun.c b/reactos/lib/crtdll/mbstring/ismbpun.c deleted file mode 100644 index 2ccd434c37d..00000000000 --- a/reactos/lib/crtdll/mbstring/ismbpun.c +++ /dev/null @@ -1,18 +0,0 @@ - -#include -#include -#include - - -/* - * @implemented - */ -int _ismbbpunct(unsigned char c) -{ -// (0xA1 <= c <= 0xA6) - return (ispunct(c) || _ismbbkana(c)); -} - - //iskana() :(0xA1 <= c <= 0xDF) - //iskpun() :(0xA1 <= c <= 0xA6) - //iskmoji() :(0xA7 <= c <= 0xDF) diff --git a/reactos/lib/crtdll/mbstring/ismbtrl.c b/reactos/lib/crtdll/mbstring/ismbtrl.c deleted file mode 100644 index c68eca45bb6..00000000000 --- a/reactos/lib/crtdll/mbstring/ismbtrl.c +++ /dev/null @@ -1,45 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/crtdll/mbstring/ismbtrail.c - * PURPOSE: Checks for a trailing byte - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 12/04/99: Created - */ - -#include -#include - -size_t _mbclen2(const unsigned int s); - -// iskanji2() : (0x40 <= c <= 0x7E 0x80 <= c <= 0xFC) - -/* - * @implemented - */ -int _ismbbtrail(unsigned int c) -{ - return ((_jctype+1)[(unsigned char)(c)] & _KNJ_2); -} - -//int _ismbbtrail( unsigned int b) -//{ -// return ((b >= 0x40 && b <= 0x7e ) || (b >= 0x80 && b <= 0xfc ) ); -//} - - -/* - * @implemented - */ -int _ismbstrail( const unsigned char *str, const unsigned char *t) -{ - unsigned char *s = (unsigned char *)str; - while(*s != 0 && s != t) - { - - s+= _mbclen2(*s); - } - - return _ismbbtrail(*s); -} diff --git a/reactos/lib/crtdll/mbstring/isuppr.c b/reactos/lib/crtdll/mbstring/isuppr.c deleted file mode 100644 index 00638379b62..00000000000 --- a/reactos/lib/crtdll/mbstring/isuppr.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/crtdll/mbstring/mbsncmp.c - * PURPOSE: - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 12/04/99: Created - */ - -#include -#include - -/* - * code page 952 only - * - * @implemented - */ -int _ismbcupper( unsigned int c ) -{ - if ((c & 0xFF00) != 0) { - if ( c >= 0x8260 && c<= 0x8279 ) - return 1; - } - - return isupper(c); -} diff --git a/reactos/lib/crtdll/mbstring/jistojms.c b/reactos/lib/crtdll/mbstring/jistojms.c deleted file mode 100644 index c47b223a58a..00000000000 --- a/reactos/lib/crtdll/mbstring/jistojms.c +++ /dev/null @@ -1,27 +0,0 @@ -#include - -/* - * @implemented - */ -unsigned short _mbcjistojms(unsigned short c) -{ - int c1, c2; - - c2 = (unsigned char)c; - c1 = c >> 8; - if (c1 >= 0x21 && c1 <= 0x7e && c2 >= 0x21 && c2 <= 0x7e) { - if (c1 & 0x01) { - c2 += 0x1f; - if (c2 >= 0x7f) - c2 ++; - } else { - c2 += 0x7e; - } - c1 += 0xe1; - c1 >>= 1; - if (c1 >= 0xa0) - c1 += 0x40; - return ((c1 << 8) | c2); - } - return 0; -} diff --git a/reactos/lib/crtdll/mbstring/jmstojis.c b/reactos/lib/crtdll/mbstring/jmstojis.c deleted file mode 100644 index cf349f673db..00000000000 --- a/reactos/lib/crtdll/mbstring/jmstojis.c +++ /dev/null @@ -1,28 +0,0 @@ -#include - -/* - * @implemented - */ -unsigned short _mbcjmstojis(unsigned short c) -{ - int c1, c2; - - c2 = (unsigned char)c; - c1 = c >> 8; - if (c1 < 0xf0 && _ismbblead(c1) && _ismbbtrail(c2)) { - if (c1 >= 0xe0) - c1 -= 0x40; - c1 -= 0x70; - c1 <<= 1; - if (c2 < 0x9f) { - c1 --; - c2 -= 0x1f; - if (c2 >= (0x80-0x1f)) - c2 --; - } else { - c2 -= 0x7e; - } - return ((c1 << 8) | c2); - } - return 0; -} diff --git a/reactos/lib/crtdll/mbstring/mbbtype.c b/reactos/lib/crtdll/mbstring/mbbtype.c deleted file mode 100644 index 0f67c57bb38..00000000000 --- a/reactos/lib/crtdll/mbstring/mbbtype.c +++ /dev/null @@ -1,57 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/crtdll/mbstring/mbbtype.c - * PURPOSE: Determines the type of a multibyte character - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 12/04/99: Created - */ - -#include -#include - -/* - * @implemented - */ -int _mbbtype(unsigned char c , int type) -{ - if ( type == 1 ) { - if ((c >= 0x40 && c <= 0x7e ) || (c >= 0x80 && c <= 0xfc ) ) - { - return _MBC_TRAIL; - } - else if (( c >= 0x20 && c >= 0x7E ) || ( c >= 0xA1 && c <= 0xDF ) || - ( c >= 0x81 && c <= 0x9F ) || ( c >= 0xE0 && c <= 0xFC ) ) - return _MBC_ILLEGAL; - else - return 0; - - } - else { - if (( c >= 0x20 && c <= 0x7E ) || ( c >= 0xA1 && c <= 0xDF )) { - return _MBC_SINGLE; - } - else if ( (c >= 0x81 && c <= 0x9F ) || ( c >= 0xE0 && c <= 0xFC) ) - return _MBC_LEAD; - else if (( c >= 0x20 && c >= 0x7E ) || ( c >= 0xA1 && c <= 0xDF ) || - ( c >= 0x81 && c <= 0x9F ) || ( c >= 0xE0 && c <= 0xFC ) ) - return _MBC_ILLEGAL; - else - return 0; - - } - - - return 0; -} - -/* - * @implemented - */ -int _mbsbtype( const unsigned char *str, size_t n ) -{ - if ( str == NULL ) - return -1; - return _mbbtype(*(str+n),1); -} diff --git a/reactos/lib/crtdll/mbstring/mbccpy.c b/reactos/lib/crtdll/mbstring/mbccpy.c deleted file mode 100644 index 94ea4fda4d4..00000000000 --- a/reactos/lib/crtdll/mbstring/mbccpy.c +++ /dev/null @@ -1,15 +0,0 @@ -#include -#include - -size_t _mbclen2(const unsigned int s); - -/* - * @implemented - */ -void _mbccpy(unsigned char *dst, const unsigned char *src) -{ - if (!_ismbblead(*src) ) - return; - - memcpy(dst,src,_mbclen2(*src)); -} diff --git a/reactos/lib/crtdll/mbstring/mbscoll.c b/reactos/lib/crtdll/mbstring/mbscoll.c deleted file mode 100644 index dad12be050b..00000000000 --- a/reactos/lib/crtdll/mbstring/mbscoll.c +++ /dev/null @@ -1,97 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/crtdll/mbstring/mbscoll.c - * PURPOSE: - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 12/04/99: Created - */ - -#include - -int colldif(unsigned short c1, unsigned short c2); - -int _mbscoll(const unsigned char *str1, const unsigned char *str2) -{ - unsigned char *s1 = (unsigned char *)str1; - unsigned char *s2 = (unsigned char *)str2; - - unsigned short *short_s1, *short_s2; - - int l1, l2; - - while ( *s1 != 0 ) { - - if (*s1 == 0) - break; - - l1 = _ismbblead(*s1); - l2 = _ismbblead(*s2); - if ( !l1 && !l2 ) { - - if (*s1 != *s2) - return colldif(*s1, *s2); - else { - s1 += 1; - s2 += 1; - } - } - else if ( l1 && l2 ){ - short_s1 = (unsigned short *)s1; - short_s2 = (unsigned short *)s2; - if ( *short_s1 != *short_s2 ) - return colldif(*short_s1, *short_s2); - else { - s1 += 2; - s2 += 2; - - } - } - else - return colldif(*s1, *s2); - } ; - return 0; -} - -#if 0 -int _mbsbcoll(const unsigned char *str1, const unsigned char *str2) -{ - unsigned char *s1 = (unsigned char *)str1; - unsigned char *s2 = (unsigned char *)str2; - - unsigned short *short_s1, *short_s2; - - int l1, l2; - - - while ( *s1 != 0 ) { - - - l1 = _ismbblead(*s1); - l2 = _ismbblead(*s2); - if ( !l1 && !l2 ) { - - if (*s1 != *s2) - return colldif(*s1, *s2); - else { - s1 += 1; - s2 += 1; - } - } - else if ( l1 && l2 ){ - short_s1 = (unsigned short *)s1; - short_s2 = (unsigned short *)s2; - if ( *short_s1 != *short_s2 ) - return colldif(*short_s1, *short_s2); - else { - s1 += 2; - s2 += 2; - } - } - else - return colldif(*s1, *s2); - } ; - return 0; -} -#endif diff --git a/reactos/lib/crtdll/mbstring/mbsdec.c b/reactos/lib/crtdll/mbstring/mbsdec.c deleted file mode 100644 index 14c228c81c5..00000000000 --- a/reactos/lib/crtdll/mbstring/mbsdec.c +++ /dev/null @@ -1,17 +0,0 @@ -#include - -/* - * @implemented - */ -unsigned char * _mbsdec(const unsigned char *str, const unsigned char *cur) -{ - unsigned char *s = (unsigned char *)cur; - if ( str >= cur ) - return NULL; - - s--; - if (_ismbblead(*(s-1)) ) - s--; - - return s; -} diff --git a/reactos/lib/crtdll/mbstring/mbsicmp.c b/reactos/lib/crtdll/mbstring/mbsicmp.c deleted file mode 100644 index b1b7c41e096..00000000000 --- a/reactos/lib/crtdll/mbstring/mbsicmp.c +++ /dev/null @@ -1,65 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/crtdll/mbstring/mbsicmp.c - * PURPOSE: Duplicates a multi byte string - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 12/04/99: Created - */ -#include -#include -#include - -/* - * @implemented - */ -int _mbsicmp(const unsigned char *str1, const unsigned char *str2) -{ - unsigned char *s1 = (unsigned char *)str1; - unsigned char *s2 = (unsigned char *)str2; - - unsigned short *short_s1, *short_s2; - - int l1, l2; - - do { - - if (*s1 == 0) - break; - - l1 = _ismbblead(*s1); - l2 = _ismbblead(*s2); - if ( !l1 && !l2 ) { - - if (toupper(*s1) != toupper(*s2)) - return toupper(*s1) - toupper(*s2); - else { - s1 += 1; - s2 += 1; - } - } - else if ( l1 && l2 ){ - short_s1 = (unsigned short *)s1; - short_s2 = (unsigned short *)s2; - if ( _mbctoupper(*short_s1) != _mbctoupper(*short_s2 )) - return _mbctoupper(*short_s1) - _mbctoupper(*short_s2); - else { - s1 += 2; - s2 += 2; - } - } - else - return *s1 - *s2; - } while (*s1 != 0); - return 0; - - while (toupper(*s1) == toupper(*s2)) - { - if (*s1 == 0) - return 0; - s1++; - s2++; - } - return toupper(*(unsigned const char *)s1) - toupper(*(unsigned const char *)(s2)); -} diff --git a/reactos/lib/crtdll/mbstring/mbsicoll.c b/reactos/lib/crtdll/mbstring/mbsicoll.c deleted file mode 100644 index 32020cc8348..00000000000 --- a/reactos/lib/crtdll/mbstring/mbsicoll.c +++ /dev/null @@ -1,55 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/crtdll/mbstring/iskpun.c - * PURPOSE: - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 12/04/99: Created - */ -#include -#include -#include - -int colldif(unsigned short c1, unsigned short c2); -int _mbsicoll(const unsigned char *str1, const unsigned char *str2) -{ - unsigned char *s1 = (unsigned char *)str1; - unsigned char *s2 = (unsigned char *)str2; - - unsigned short *short_s1, *short_s2; - - int l1, l2; - - while ( *s1 != 0 ) { - - if (*s1 == 0) - break; - - l1 = _ismbblead(*s1); - l2 = _ismbblead(*s2); - if ( !l1 && !l2 ) { - - if (toupper(*s1) != toupper(*s2)) - return colldif(*s1, *s2); - else { - s1 += 1; - s2 += 1; - } - } - else if ( l1 && l2 ){ - short_s1 = (unsigned short *)s1; - short_s2 = (unsigned short *)s2; - if ( _mbctoupper(*short_s1) != _mbctoupper(*short_s2 )) - return colldif(*short_s1, *short_s2); - else { - s1 += 2; - s2 += 2; - - } - } - else - return colldif(*s1, *s2); - } ; - return 0; -} diff --git a/reactos/lib/crtdll/mbstring/mbsinc.c b/reactos/lib/crtdll/mbstring/mbsinc.c deleted file mode 100644 index 98a5fb5dbd9..00000000000 --- a/reactos/lib/crtdll/mbstring/mbsinc.c +++ /dev/null @@ -1,13 +0,0 @@ -#include - -/* - * @implemented - */ -unsigned char * _mbsinc(const unsigned char *s) -{ - unsigned char *c = (unsigned char *)s; - if (_ismbblead(*s) ) - c++; - c++; - return c; -} diff --git a/reactos/lib/crtdll/mbstring/mbslen.c b/reactos/lib/crtdll/mbstring/mbslen.c deleted file mode 100644 index 8529fbf27f5..00000000000 --- a/reactos/lib/crtdll/mbstring/mbslen.c +++ /dev/null @@ -1,18 +0,0 @@ -#include - -size_t _mbclen2(const unsigned int s); - -/* - * @implemented - */ -size_t _mbslen(const unsigned char *str) -{ - int i = 0; - unsigned char *s; - - if (str == 0) - return 0; - - for (s = (unsigned char *)str; *s; s+=_mbclen2(*s),i++); - return i; -} diff --git a/reactos/lib/crtdll/mbstring/mbslwr.c b/reactos/lib/crtdll/mbstring/mbslwr.c deleted file mode 100644 index 071a7659ca1..00000000000 --- a/reactos/lib/crtdll/mbstring/mbslwr.c +++ /dev/null @@ -1,45 +0,0 @@ -#include -#include - -unsigned int _mbbtolower(unsigned int c) -{ - if (!_ismbblead(c) ) - return tolower(c); - return c; -} - -// code page 952 -#define CASE_DIFF (0x8281 - 0x8260) - -/* - * @implemented - */ -unsigned int _mbctolower(unsigned int c) -{ - if ((c & 0xFF00) != 0) { - // true multibyte case conversion needed - if (_ismbclower(c)) - return c + CASE_DIFF; - } else { - return _mbbtolower(c); - } - return 0; -} - -/* - * @implemented - */ -unsigned char * _mbslwr(unsigned char *x) -{ - unsigned char *y=x; - - while (*y) { - if (!_ismbblead(*y)) { - *y = tolower(*y); - } else { - *y=_mbctolower(*(unsigned short *)y); - y++; - } - } - return x; -} diff --git a/reactos/lib/crtdll/mbstring/mbsnccnt.c b/reactos/lib/crtdll/mbstring/mbsnccnt.c deleted file mode 100644 index af739200fd0..00000000000 --- a/reactos/lib/crtdll/mbstring/mbsnccnt.c +++ /dev/null @@ -1,35 +0,0 @@ -#include - -/* - * @implemented - */ -size_t _mbsnccnt(const unsigned char *str, size_t n) -{ - unsigned char *s = (unsigned char *)str; - size_t cnt = 0; - while(*s != 0 && n > 0) { - if (_ismbblead(*s) ) - s++; - else - n--; - s++; - cnt++; - } - - return cnt; -} - -/* - * @implemented - */ -size_t _mbsnbcnt(const unsigned char *str, size_t n) -{ - unsigned char *s = (unsigned char *)str; - while(*s != 0 && n > 0) { - if (!_ismbblead(*s) ) - n--; - s++; - } - - return (size_t)(s - str); -} diff --git a/reactos/lib/crtdll/mbstring/mbsncmp.c b/reactos/lib/crtdll/mbstring/mbsncmp.c deleted file mode 100644 index 94c349d97a5..00000000000 --- a/reactos/lib/crtdll/mbstring/mbsncmp.c +++ /dev/null @@ -1,109 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/crtdll/mbstring/mbsncmp.c - * PURPOSE: Compares two strings to a maximum of n bytes or characters - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 12/04/99: Created - */ - -#include - -/* - * @implemented - */ -int _mbsncmp(const unsigned char *str1, const unsigned char *str2, size_t n) -{ - unsigned char *s1 = (unsigned char *)str1; - unsigned char *s2 = (unsigned char *)str2; - - unsigned short *short_s1, *short_s2; - - int l1, l2; - - if (n == 0) - return 0; - do { - - if (*s1 == 0) - break; - - l1 = _ismbblead(*s1); - l2 = _ismbblead(*s2); - if ( !l1 && !l2 ) { - - if (*s1 != *s2) - return *s1 - *s2; - else { - s1 += 1; - s2 += 1; - n--; - } - } - else if ( l1 && l2 ){ - short_s1 = (unsigned short *)s1; - short_s2 = (unsigned short *)s2; - if ( *short_s1 != *short_s2 ) - return *short_s1 - *short_s2; - else { - s1 += 2; - s2 += 2; - n--; - - } - } - else - return *s1 - *s2; - } while (n > 0); - return 0; -} - -/* - * @implemented - */ -int _mbsnbcmp(const unsigned char *str1, const unsigned char *str2, size_t n) -{ - unsigned char *s1 = (unsigned char *)str1; - unsigned char *s2 = (unsigned char *)str2; - - unsigned short *short_s1, *short_s2; - - int l1, l2; - - if (n == 0) - return 0; - do { - - if (*s1 == 0) - break; - - l1 = _ismbblead(*s1); - l2 = _ismbblead(*s2); - if ( !l1 && !l2 ) { - - if (*s1 != *s2) - return *s1 - *s2; - else { - s1 += 1; - s2 += 1; - n--; - } - } - else if ( l1 && l2 ){ - short_s1 = (unsigned short *)s1; - short_s2 = (unsigned short *)s2; - if ( *short_s1 != *short_s2 ) - return *short_s1 - *short_s2; - else { - s1 += 2; - s2 += 2; - n-=2; - - } - } - else - return *s1 - *s2; - } while (n > 0); - return 0; -} diff --git a/reactos/lib/crtdll/mbstring/mbsncoll.c b/reactos/lib/crtdll/mbstring/mbsncoll.c deleted file mode 100644 index 1a35922dd32..00000000000 --- a/reactos/lib/crtdll/mbstring/mbsncoll.c +++ /dev/null @@ -1,109 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/crtdll/mbstring/mbsncoll.c - * PURPOSE: - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 12/04/99: Created - */ -#include - -int colldif(unsigned short c1, unsigned short c2); - -int _mbsncoll(const unsigned char *str1, const unsigned char *str2, size_t n) -{ - unsigned char *s1 = (unsigned char *)str1; - unsigned char *s2 = (unsigned char *)str2; - - unsigned short *short_s1, *short_s2; - - int l1, l2; - - if (n == 0) - return 0; - do { - - if (*s1 == 0) - break; - - l1 = _ismbblead(*s1); - l2 = _ismbblead(*s2); - if ( !l1 && !l2 ) { - - if (*s1 != *s2) - return colldif(*s1, *s2); - else { - s1 += 1; - s2 += 1; - n--; - } - } - else if ( l1 && l2 ){ - short_s1 = (unsigned short *)s1; - short_s2 = (unsigned short *)s2; - if ( *short_s1 != *short_s2 ) - return colldif(*short_s1, *short_s2); - else { - s1 += 2; - s2 += 2; - n--; - - } - } - else - return colldif(*s1, *s2); - } while (n > 0); - return 0; -} - -int _mbsnbcoll(const unsigned char *str1, const unsigned char *str2, size_t n) -{ - unsigned char *s1 = (unsigned char *)str1; - unsigned char *s2 = (unsigned char *)str2; - - unsigned short *short_s1, *short_s2; - - int l1, l2; - - if (n == 0) - return 0; - do { - - if (*s1 == 0) - break; - - l1 = _ismbblead(*s1); - l2 = _ismbblead(*s2); - if ( !l1 && !l2 ) { - - if (*s1 != *s2) - return colldif(*s1, *s2); - else { - s1 += 1; - s2 += 1; - n--; - } - } - else if ( l1 && l2 ){ - short_s1 = (unsigned short *)s1; - short_s2 = (unsigned short *)s2; - if ( *short_s1 != *short_s2 ) - return colldif(*short_s1, *short_s2); - else { - s1 += 2; - s2 += 2; - n-=2; - - } - } - else - return colldif(*s1, *s2); - } while (n > 0); - return 0; -} - -int colldif(unsigned short c1, unsigned short c2) -{ - return c1 - c2; -} diff --git a/reactos/lib/crtdll/mbstring/mbsncpy.c b/reactos/lib/crtdll/mbstring/mbsncpy.c deleted file mode 100644 index 112c7513785..00000000000 --- a/reactos/lib/crtdll/mbstring/mbsncpy.c +++ /dev/null @@ -1,92 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/crtdll/mbstring/mbsncpy.c - * PURPOSE: Copies a string to a maximum of n bytes or characters - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 12/04/99: Created - */ - -#include - - -/* - * @implemented - */ -unsigned char *_mbsncpy(unsigned char *str1, const unsigned char *str2, size_t n) -{ - unsigned char *s1 = (unsigned char *)str1; - unsigned char *s2 = (unsigned char *)str2; - - unsigned short *short_s1, *short_s2; - - if (n == 0) - return 0; - do { - - if (*s2 == 0) - break; - - if ( !_ismbblead(*s2) ) { - - *s1 = *s2; - s1 += 1; - s2 += 1; - n--; - } - else { - short_s1 = (unsigned short *)s1; - short_s2 = (unsigned short *)s2; - *short_s1 = *short_s2; - s1 += 2; - s2 += 2; - n--; - } - } while (n > 0); - return str1; -} - - - -/* - * The _mbsnbcpy function copies count bytes from src to dest. If src is shorter - * than dest, the string is padded with null characters. If dest is less than or - * equal to count it is not terminated with a null character. - * - * @implemented - */ -unsigned char * _mbsnbcpy(unsigned char *str1, const unsigned char *str2, size_t n) -{ - unsigned char *s1 = (unsigned char *)str1; - unsigned char *s2 = (unsigned char *)str2; - - unsigned short *short_s1, *short_s2; - - if (n == 0) - return 0; - do { - - if (*s2 == 0) { - *s1 = *s2; - break; - } - - if ( !_ismbblead(*s2) ) { - - *s1 = *s2; - s1 += 1; - s2 += 1; - n--; - } - else { - short_s1 = (unsigned short *)s1; - short_s2 = (unsigned short *)s2; - *short_s1 = *short_s2; - s1 += 2; - s2 += 2; - n-=2; - } - } while (n > 0); - return str1; -} diff --git a/reactos/lib/crtdll/mbstring/mbsnextc.c b/reactos/lib/crtdll/mbstring/mbsnextc.c deleted file mode 100644 index 44ad9502994..00000000000 --- a/reactos/lib/crtdll/mbstring/mbsnextc.c +++ /dev/null @@ -1,19 +0,0 @@ -#include - -/* - * @implemented - */ -unsigned int _mbsnextc (const unsigned char *src) -{ - unsigned char *char_src = (unsigned char *)src; - unsigned short *short_src = (unsigned short *)src; - - if ( src == NULL ) - return 0; - - if ( !_ismbblead(*src) ) - return *char_src; - else - return *short_src; - return 0; -} diff --git a/reactos/lib/crtdll/mbstring/mbsnicmp.c b/reactos/lib/crtdll/mbstring/mbsnicmp.c deleted file mode 100644 index cb5c2555f8d..00000000000 --- a/reactos/lib/crtdll/mbstring/mbsnicmp.c +++ /dev/null @@ -1,47 +0,0 @@ -#include - - -size_t _mbclen2(const unsigned int s); -unsigned int _mbbtoupper(unsigned int c); - - -/* - * @implemented - */ -int _mbsnicmp(const unsigned char* s1, const unsigned char* s2, size_t n) -{ - if (n == 0) - return 0; - do { - if (_mbbtoupper(*s1) != _mbbtoupper(*s2)) - return _mbbtoupper(*(unsigned const char*)s1) - _mbbtoupper(*(unsigned const char*)s2); - s1 += _mbclen2(*s1); - s2 += _mbclen2(*s2); - - if (*s1 == 0) - break; - if (!_ismbblead(*s1) ) - n--; - } while (n > 0); - return 0; -} - -/* - * @implemented - */ -int _mbsnbicmp(const unsigned char* s1, const unsigned char* s2, size_t n) -{ - if (n == 0) - return 0; - do { - if (_mbbtoupper(*s1) != _mbbtoupper(*s2)) - return _mbbtoupper(*(unsigned const char*)s1) - _mbbtoupper(*(unsigned const char*)s2); - s1 += _mbclen2(*s1); - s2 += _mbclen2(*s2); - - if (*s1 == 0) - break; - n--; - } while (n > 0); - return 0; -} diff --git a/reactos/lib/crtdll/mbstring/mbsnicoll.c b/reactos/lib/crtdll/mbstring/mbsnicoll.c deleted file mode 100644 index 3fead6d6a7b..00000000000 --- a/reactos/lib/crtdll/mbstring/mbsnicoll.c +++ /dev/null @@ -1,11 +0,0 @@ -#include - -int _mbsnicoll(const unsigned char *s1, const unsigned char *s2, size_t n) -{ - return 0; -} - -int _mbsnbicoll(const unsigned char *s1, const unsigned char *s2, size_t n) -{ - return 0; -} diff --git a/reactos/lib/crtdll/mbstring/mbsninc.c b/reactos/lib/crtdll/mbstring/mbsninc.c deleted file mode 100644 index 419ee3a3ac1..00000000000 --- a/reactos/lib/crtdll/mbstring/mbsninc.c +++ /dev/null @@ -1,16 +0,0 @@ -#include - -/* - * @implemented - */ -unsigned char * _mbsninc(const unsigned char *str, size_t n) -{ - unsigned char *s = (unsigned char *)str; - while(*s != 0 && n > 0) { - if (!_ismbblead(*s) ) - n--; - s++; - } - - return s; -} diff --git a/reactos/lib/crtdll/mbstring/mbsnset.c b/reactos/lib/crtdll/mbstring/mbsnset.c deleted file mode 100644 index af367ee9949..00000000000 --- a/reactos/lib/crtdll/mbstring/mbsnset.c +++ /dev/null @@ -1,70 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/crtdll/mbstring/mbsset.c - * PURPOSE: Fills a string with a multibyte character - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 12/04/99: Created - */ -#include - -size_t _mbclen2(const unsigned int s); - -/* - * @implemented - */ -unsigned char * _mbsnset(unsigned char *src, unsigned int val, size_t count) -{ - unsigned char *char_src = (unsigned char *)src; - unsigned short *short_src = (unsigned short *)src; - - if ( _mbclen2(val) == 1 ) { - - while(count > 0) { - *char_src = val; - char_src++; - count--; - } - *char_src = 0; - } - else { - while(count > 0) { - *short_src = val; - short_src++; - count-=2; - } - *short_src = 0; - } - - return src; -} - -/* - * @implemented - */ -unsigned char * _mbsnbset(unsigned char *src, unsigned int val, size_t count) -{ - unsigned char *char_src = (unsigned char *)src; - unsigned short *short_src = (unsigned short *)src; - - if ( _mbclen2(val) == 1 ) { - - while(count > 0) { - *char_src = val; - char_src++; - count--; - } - *char_src = 0; - } - else { - while(count > 0) { - *short_src = val; - short_src++; - count-=2; - } - *short_src = 0; - } - - return src; -} diff --git a/reactos/lib/crtdll/mbstring/mbsset.c b/reactos/lib/crtdll/mbstring/mbsset.c deleted file mode 100644 index f6067f2b8a9..00000000000 --- a/reactos/lib/crtdll/mbstring/mbsset.c +++ /dev/null @@ -1,40 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/crtdll/mbstring/mbsset.c - * PURPOSE: Fills a string with a multibyte character - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 12/04/99: Created - */ - -#include - -size_t _mbclen2(const unsigned int s); - -/* - * @implemented - */ -unsigned char * _mbsset(unsigned char *src, unsigned int c) -{ - unsigned char *char_src = src; - unsigned short *short_src = (unsigned short *)src; - - if ( _mbclen2(c) == 1 ) { - - while(*char_src != 0) { - *char_src = c; - char_src++; - } - *char_src = 0; - } - else { - while(*short_src != 0) { - *short_src = c; - short_src++; - } - *short_src = 0; - } - - return src; -} diff --git a/reactos/lib/crtdll/mbstring/mbstrlen.c b/reactos/lib/crtdll/mbstring/mbstrlen.c deleted file mode 100644 index b8c64cce6f1..00000000000 --- a/reactos/lib/crtdll/mbstring/mbstrlen.c +++ /dev/null @@ -1,19 +0,0 @@ -#include -#include - -/* - * @implemented - */ -size_t _mbstrlen( const char *string ) -{ - char *s = (char *)string; - size_t i = 0; - - while ( *s != 0 ) { - if ( _ismbblead(*s) ) - s++; - s++; - i++; - } - return i; -} diff --git a/reactos/lib/crtdll/mbstring/mbsupr.c b/reactos/lib/crtdll/mbstring/mbsupr.c deleted file mode 100644 index 3ac3e61fe54..00000000000 --- a/reactos/lib/crtdll/mbstring/mbsupr.c +++ /dev/null @@ -1,56 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/crtdll/mbstring/mbsncmp.c - * PURPOSE: - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 12/04/99: Created - */ -#include -#include - -unsigned int _mbbtoupper(unsigned int c) -{ - if (!_ismbblead(c) ) - return toupper(c); - - return c; -} - -// codepage 952 -#define CASE_DIFF (0x8281 - 0x8260) - -/* - * @implemented - */ -unsigned int _mbctoupper(unsigned int c) -{ - - if ((c & 0xFF00) != 0) { -// true multibyte case conversion needed - if ( _ismbcupper(c) ) - return c + CASE_DIFF; - - } else - return _mbbtoupper(c); - - return 0; -} - -/* - * @implemented - */ -unsigned char * _mbsupr(unsigned char *x) -{ - unsigned char *y=x; - while (*y) { - if (!_ismbblead(*y) ) - *y = toupper(*y); - else { - *y=_mbctoupper(*(unsigned short *)y); - y++; - } - } - return x; -} diff --git a/reactos/lib/crtdll/process/dll.c b/reactos/lib/crtdll/process/dll.c deleted file mode 100644 index 771732dd590..00000000000 --- a/reactos/lib/crtdll/process/dll.c +++ /dev/null @@ -1,41 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/crtdll/process/dll.c - * PURPOSE: Dll support routines - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 04/03/99: Created - */ - -#include "precomp.h" -#include - - -/* - * @implemented - */ -void* _loaddll(char* name) -{ - return LoadLibraryA(name); -} - -/* - * @implemented - */ -int _unloaddll(void* handle) -{ - return FreeLibrary(handle); -} - -/* - * @implemented - */ -FARPROC _getdllprocaddr(void* hModule, char* lpProcName, int iOrdinal) -{ - if (lpProcName != NULL) - return GetProcAddress(hModule, lpProcName); - else - return GetProcAddress(hModule, (LPSTR)iOrdinal); - return (NULL); -} diff --git a/reactos/lib/crtdll/process/procid.c b/reactos/lib/crtdll/process/procid.c deleted file mode 100644 index 87c145828c6..00000000000 --- a/reactos/lib/crtdll/process/procid.c +++ /dev/null @@ -1,11 +0,0 @@ -#include "precomp.h" -#include - -/* - * @implemented - */ -int _getpid (void) -{ - return (int)GetCurrentProcessId(); -} - diff --git a/reactos/lib/crtdll/process/threadid.c b/reactos/lib/crtdll/process/threadid.c deleted file mode 100644 index 2b17a83c7fc..00000000000 --- a/reactos/lib/crtdll/process/threadid.c +++ /dev/null @@ -1,18 +0,0 @@ -#include "precomp.h" -#include - -/* - * @implemented - */ -unsigned long __threadid (void) -{ - return GetCurrentThreadId(); -} - -/* - * @implemented - */ -void *__threadhandle(void) -{ - return GetCurrentThread(); -} diff --git a/reactos/lib/crtdll/search/lfind.c b/reactos/lib/crtdll/search/lfind.c deleted file mode 100644 index e89efa63c9b..00000000000 --- a/reactos/lib/crtdll/search/lfind.c +++ /dev/null @@ -1,21 +0,0 @@ -#include -#include - - -/* - * @implemented - */ -void *_lfind(const void *key, const void *base, size_t *nelp, - size_t width, int (*compar)(const void *, const void *)) -{ - char* char_base = (char*)base; - int i; - - for (i = 0; i < *nelp; i++) { - if (compar(key, char_base) == 0) - return char_base; - char_base += width; - } - return NULL; -} - diff --git a/reactos/lib/crtdll/search/lsearch.c b/reactos/lib/crtdll/search/lsearch.c deleted file mode 100644 index a8465ae7853..00000000000 --- a/reactos/lib/crtdll/search/lsearch.c +++ /dev/null @@ -1,24 +0,0 @@ -#include -#include -#include - -/* - * @implemented - */ -void *_lsearch(const void *key, void *base, size_t *nelp, size_t width, - int (*compar)(const void *, const void *)) -{ - void *ret_find = _lfind(key,base,nelp,width,compar); - - if (ret_find != NULL) - return ret_find; - -#ifdef __GNUC__ - memcpy(base + (*nelp*width), key, width); -#else - memcpy((int*)base + (*nelp*width), key, width); -#endif - (*nelp)++; - return base; -} - diff --git a/reactos/lib/crtdll/signal/signal.c b/reactos/lib/crtdll/signal/signal.c deleted file mode 100644 index 6272b2f6854..00000000000 --- a/reactos/lib/crtdll/signal/signal.c +++ /dev/null @@ -1,113 +0,0 @@ -#include -#include -#include -#include -#include - -void _default_handler(int signal); - -typedef struct _sig_element -{ - int signal; - char *signame; - _p_sig_fn_t handler; -} sig_element; - -static sig_element signal_list[SIGMAX] = - { - { 0, "Signal 0", SIG_DFL }, - { SIGABRT, "Aborted",SIG_DFL }, - { SIGFPE, "Erroneous arithmetic operation",SIG_DFL }, - { SIGILL, "Illegal instruction",SIG_DFL }, - { SIGINT, "Interrupt",SIG_DFL }, - { SIGSEGV, "Invalid access to storage",SIG_DFL }, - { SIGTERM, "Terminated",SIG_DFL }, - { SIGHUP, "Hangup",SIG_DFL }, - { SIGQUIT, "Quit",SIG_DFL }, - { SIGPIPE, "Broken pipe",SIG_DFL }, - { SIGKILL, "Killed",SIG_DFL }, - { SIGALRM, "Alarm clock",SIG_DFL }, - { 0, "Stopped (signal)",SIG_DFL }, - { 0, "Stopped",SIG_DFL }, - { 0, "Continued",SIG_DFL }, - { 0, "Child exited",SIG_DFL }, - { 0, "Stopped (tty input)",SIG_DFL }, - { 0, "Stopped (tty output)",SIG_DFL }, - { 0, NULL, SIG_DFL } - }; - -int nsignal = 21; - -/* - * @implemented - */ -_p_sig_fn_t signal(int sig, _p_sig_fn_t func) -{ - _p_sig_fn_t temp; - int i; - if(sig <= 0 || sig > SIGMAX || sig == SIGKILL) - { - __set_errno(EINVAL); - return SIG_ERR; - } -// check with IsBadCodePtr - - if ( func < (_p_sig_fn_t)4096 ) { - __set_errno(EINVAL); - return SIG_ERR; - } - - for(i=0;i SIGMAX) - return -1; - for(i=0;i - -/* - * @unimplemented - */ -void **__pxcptinfoptrs (void) -{ - return NULL; -} diff --git a/reactos/lib/crtdll/stdio/allocfil.c b/reactos/lib/crtdll/stdio/allocfil.c deleted file mode 100644 index 139cf0efa42..00000000000 --- a/reactos/lib/crtdll/stdio/allocfil.c +++ /dev/null @@ -1,101 +0,0 @@ -/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ -#include -#include -#include -#include - - -FILE * __alloc_file(void); - -char __validfp (FILE *f) -{ - if ( (unsigned int)f < 256) - return FALSE; - - if( f == NULL || (int)f== -1 ) - return FALSE; - - return TRUE; -} - -/* A FILE* is considered "free" if its flag is zero. */ - -FILE *__alloc_file(void) -{ - __file_rec *fr = __file_rec_list; - __file_rec **last_fr = &__file_rec_list; - FILE *rv=0; - int i; - - /* Try to find an empty slot */ - while (fr) - { - last_fr = &(fr->next); - - /* If one of the existing slots is available, return it */ - for (i=0; icount; i++) - { - if (fr->files[i]->_flag == 0) - { - return fr->files[i]; - } - } - - /* If this one is full, go to the next */ - if (fr->count == __FILE_REC_MAX) - fr = fr->next; - else - /* it isn't full, we can add to it */ - break; - } - if (!fr) - { - /* add another one to the end, make it empty */ - fr = *last_fr = (__file_rec *)malloc(sizeof(__file_rec)); - if (fr == 0) - return 0; - fr->next = 0; - fr->count = 0; - } - /* fr is a pointer to a rec with empty slots in it */ - rv = fr->files[fr->count] = (FILE *)malloc(sizeof(FILE)); - if (rv == 0) - return 0; - memset(rv, 0, sizeof(FILE)); - fr->count ++; - return rv; -} - - -/* - * @implemented - */ -int _fcloseall( void ) -{ - __file_rec *fr = __file_rec_list; - __file_rec **last_fr = &__file_rec_list; - - int total_closed = 0; - int i = 0; - - /* Try to find an empty slot */ - while (fr) - { - last_fr = &(fr->next); - - /* If one of the existing slots is available, return it */ - for (i=0; icount; i++) - if (fr->files[i]->_flag != 0) { - fclose(fr->files[i]); - total_closed++; - } - - /* If this one is full, go to the next */ - if (fr->count == __FILE_REC_MAX) - fr = fr->next; - else - /* it isn't full, we can add to it */ - break; - } - return total_closed; -} diff --git a/reactos/lib/crtdll/stdio/clearerr.c b/reactos/lib/crtdll/stdio/clearerr.c deleted file mode 100644 index 29ff9120475..00000000000 --- a/reactos/lib/crtdll/stdio/clearerr.c +++ /dev/null @@ -1,22 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include -#include -#include - -#ifdef clearerr -#undef clearerr -void clearerr(FILE *stream); -#endif - -/* - * @implemented - */ -void -clearerr(FILE *f) -{ - if (!__validfp (f)) { - __set_errno (EINVAL); - return; - } - f->_flag &= ~(_IOERR|_IOEOF); -} diff --git a/reactos/lib/crtdll/stdio/fclose.c b/reactos/lib/crtdll/stdio/fclose.c deleted file mode 100644 index f39c21f1a91..00000000000 --- a/reactos/lib/crtdll/stdio/fclose.c +++ /dev/null @@ -1,54 +0,0 @@ -/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ - -#include -#include -#include -#include -#include -#include -#include - -// changed check for writable stream - - -/* - * @implemented - */ -int -fclose(FILE *f) -{ - int r = 0; - - if (f == NULL) { - __set_errno (EINVAL); - return EOF; - } - - - -// flush only if stream was opened for writing - if ( !(f->_flag&_IOSTRG) ) { - if ( OPEN4WRITING(f) ) - r = fflush(f); - - if (_close(fileno(f)) < 0) - r = EOF; - if (f->_flag&_IOMYBUF) - free(f->_base); - -// Kernel might do this later - if (f->_flag & _IORMONCL && f->_name_to_remove) - { - remove(f->_name_to_remove); - free(f->_name_to_remove); - f->_name_to_remove = 0; - } - } - f->_cnt = 0; - f->_base = 0; - f->_ptr = 0; - f->_bufsiz = 0; - f->_flag = 0; - f->_file = -1; - return r; -} diff --git a/reactos/lib/crtdll/stdio/fdopen.c b/reactos/lib/crtdll/stdio/fdopen.c deleted file mode 100644 index 1bdb627b220..00000000000 --- a/reactos/lib/crtdll/stdio/fdopen.c +++ /dev/null @@ -1,57 +0,0 @@ -#include -#include - -FILE * __alloc_file(void); - - -/* - * @implemented - */ -FILE *_fdopen(int handle, char *mode) -{ - FILE *file; - int rw; - - if ( handle == 0 ) - return stdin; - - if ( handle == 1 ) - return stdout; - - if ( handle == 2 ) - return stderr; - - if ( handle == 3 ) - return stdaux; - - if ( handle == 4 ) - return stdprn; - - file = __alloc_file(); - if (file == NULL) - return NULL; - file->_file = handle; - - rw = (mode[1] == '+') || (mode[1] && (mode[2] == '+')); - - if (*mode == 'a') - _lseek(handle, 0, SEEK_END); - - file->_cnt = 0; - file->_file = handle; - file->_bufsiz = 0; - -// The mode of the stream must be compatible with the mode of the file descriptor. -// this should be checked. - - if (rw) - file->_flag = _IOREAD | _IOWRT; - else if (*mode == 'r') - file->_flag = _IOREAD; - else - file->_flag = _IOWRT; - - file->_base = file->_ptr = NULL; - - return file; -} diff --git a/reactos/lib/crtdll/stdio/feof.c b/reactos/lib/crtdll/stdio/feof.c deleted file mode 100644 index 9591e213705..00000000000 --- a/reactos/lib/crtdll/stdio/feof.c +++ /dev/null @@ -1,22 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include -#include -#include - -#ifdef feof -#undef feof -int feof(FILE *stream); -#endif - -/* - * @implemented - */ -int feof(FILE *stream) -{ - if (stream == NULL) { - __set_errno (EINVAL); - return EOF; - } - - return stream->_flag & _IOEOF; -} diff --git a/reactos/lib/crtdll/stdio/ferror.c b/reactos/lib/crtdll/stdio/ferror.c deleted file mode 100644 index 8192ee0bd62..00000000000 --- a/reactos/lib/crtdll/stdio/ferror.c +++ /dev/null @@ -1,16 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include -#include - -#ifdef ferror -#undef ferror -int ferror(FILE *stream); -#endif - -/* - * @implemented - */ -int ferror(FILE *stream) -{ - return stream->_flag & _IOERR; -} diff --git a/reactos/lib/crtdll/stdio/fflush.c b/reactos/lib/crtdll/stdio/fflush.c deleted file mode 100644 index 83852e65747..00000000000 --- a/reactos/lib/crtdll/stdio/fflush.c +++ /dev/null @@ -1,119 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/crtdll/conio/kbhit.c - * PURPOSE: Checks for keyboard hits - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 28/12/98: Created - */ -/* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ -/* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */ -/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ - -#include -#include -#include -#include -#include -#include -#include - - -/* - * @implemented - */ -int fflush(FILE *f) -{ - char *base; - int n, rn; - - - - if (f == NULL) - { - int e = errno; - - __set_errno(0); - _fwalk((void (*)(FILE *))fflush); - if (*_errno()) - return EOF; - __set_errno(e); - return 0; - } - - -// nothing to do if stream can not be written to - - if ( !OPEN4WRITING(f) ) { - __set_errno (EINVAL); - return 0; - } - -// discard any unget characters - - f->_flag &= ~_IOUNGETC; - - -// check for buffered dirty block - - if ( (f->_flag&(_IODIRTY|_IONBF)) ==_IODIRTY && f->_base != NULL) - { - - base = f->_base; - - -// if the buffer is read ahead and dirty we will flush it entirely -// else the buffer is appended to the file to the extend it has valid bytes - - if ( (f->_flag & _IOAHEAD) == _IOAHEAD ) - rn = n = f->_ptr - base + f->_cnt; - else - rn = n = f->_ptr - base; - - f->_ptr = base; - - if ((f->_flag & _IOFBF) == _IOFBF) { - if ( (f->_flag & _IOAHEAD) == _IOAHEAD ) - _lseek(fileno(f),-rn, SEEK_CUR); - } - - f->_flag &= ~_IOAHEAD; - - - f->_cnt = (f->_flag&(_IOLBF|_IONBF)) ? 0 : f->_bufsiz; - -// how can write return less than rn without being on error ??? - -// possibly commit the flushed data -// better open the file in write through mode - - do { - n = _write(fileno(f), base, rn); - if (n <= 0) { - f->_flag |= _IOERR; - return EOF; - } - rn -= n; - base += n; - } while (rn > 0); - f->_flag &= ~_IODIRTY; - -// commit flushed data -// _commit(fileno(f)); - } - if (OPEN4READING(f) && OPEN4WRITING(f) ) - { - f->_cnt = 0; - f->_ptr = f->_base; - } - return 0; -} - -/* - * @implemented - */ -int _flushall( void ) -{ - return fflush(NULL); -} diff --git a/reactos/lib/crtdll/stdio/fgetc.c b/reactos/lib/crtdll/stdio/fgetc.c deleted file mode 100644 index 0852a71f5ad..00000000000 --- a/reactos/lib/crtdll/stdio/fgetc.c +++ /dev/null @@ -1,29 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/crtdll/stdio/fgetc.c - * PURPOSE: Get a character string from stdin - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 28/12/98: Appropriated for Reactos - 25/02/99: Added fgetwc - */ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include -#include - -/* - * @implemented - */ -int fgetc(FILE *f) -{ - return getc(f); -} - -/* - * @implemented - */ -wint_t fgetwc(FILE *f) -{ - return getwc(f); -} diff --git a/reactos/lib/crtdll/stdio/fgetchar.c b/reactos/lib/crtdll/stdio/fgetchar.c deleted file mode 100644 index ccf9253a745..00000000000 --- a/reactos/lib/crtdll/stdio/fgetchar.c +++ /dev/null @@ -1,38 +0,0 @@ -/* $Id$ - * - * ReactOS msvcrt library - * - * fgetchar.c - * - * Copyright (C) 2002 Robert Dickenson - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include -#include - -int _fgetchar (void) -{ - return _getch(); -} - -/* - * @implemented - */ -int _fgetwchar (void) -{ - return _getch(); -} diff --git a/reactos/lib/crtdll/stdio/fgetpos.c b/reactos/lib/crtdll/stdio/fgetpos.c deleted file mode 100644 index 94b03b74843..00000000000 --- a/reactos/lib/crtdll/stdio/fgetpos.c +++ /dev/null @@ -1,17 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include -#include - -/* - * @implemented - */ -int fgetpos(FILE *stream, fpos_t *pos) -{ - if (stream && pos) - { - *pos = (fpos_t)ftell(stream); - return 0; - } - //errno = EFAULT; - return 1; -} diff --git a/reactos/lib/crtdll/stdio/fgets.c b/reactos/lib/crtdll/stdio/fgets.c deleted file mode 100644 index c2eaffaa3c8..00000000000 --- a/reactos/lib/crtdll/stdio/fgets.c +++ /dev/null @@ -1,47 +0,0 @@ -/* $Id$ - * - * ReactOS msvcrt library - * - * fgets.c - * - * Copyright (C) 2002 Robert Dickenson - * - * Based on original work Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details - * 28/12/1998: Appropriated for Reactos - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ - -#include -#include - - -char* fgets(char* s, int n, FILE* f) -{ - int c=0; - char *cs; - - cs = s; - while (--n>0 && (c = getc(f)) != EOF) { - *cs++ = c; - if (c == '\n') - break; - } - if (c == EOF && cs == s) - return NULL; - *cs++ = '\0'; - return s; -} diff --git a/reactos/lib/crtdll/stdio/fileno.c b/reactos/lib/crtdll/stdio/fileno.c deleted file mode 100644 index f10681dca5e..00000000000 --- a/reactos/lib/crtdll/stdio/fileno.c +++ /dev/null @@ -1,16 +0,0 @@ -#include - -#undef fileno -int fileno(FILE *f) -{ - return f->_file; -} - - -/* - * @implemented - */ -int _fileno(FILE *f) -{ - return f->_file; -} diff --git a/reactos/lib/crtdll/stdio/fopen.c b/reactos/lib/crtdll/stdio/fopen.c deleted file mode 100644 index 485764190c5..00000000000 --- a/reactos/lib/crtdll/stdio/fopen.c +++ /dev/null @@ -1,80 +0,0 @@ -/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ - -#include -#include -#include -#include -#include - -//might change fopen(file,mode) -> fsopen(file,mode,_SH_DENYNO); - -FILE * __alloc_file(void); - - -/* - * @implemented - */ -FILE* fopen(const char *file, const char *mode) -{ - FILE *f; - int fd, rw, oflags = 0; - char tbchar; - - if (file == 0) - return 0; - if (mode == 0) - return 0; - - f = __alloc_file(); - if (f == NULL) - return NULL; - - rw = (mode[1] == '+') || (mode[1] && (mode[2] == '+')); - - switch (*mode) - { - case 'a': - oflags = O_CREAT | (rw ? O_RDWR : O_WRONLY); - break; - case 'r': - oflags = rw ? O_RDWR : O_RDONLY; - break; - case 'w': - oflags = O_TRUNC | O_CREAT | (rw ? O_RDWR : O_WRONLY); - break; - default: - return (NULL); - } - if (mode[1] == '+') - tbchar = mode[2]; - else - tbchar = mode[1]; - if (tbchar == 't') - oflags |= O_TEXT; - else if (tbchar == 'b') - oflags |= O_BINARY; - else - oflags |= (_fmode & (O_TEXT|O_BINARY)); - - fd = _open(file, oflags, 0666); - if (fd < 0) - return NULL; - -// ms crtdll ensures that writes will end up at the end of file in append mode -// we just move the file pointer to the end of file initially - if (*mode == 'a') - lseek(fd, 0, SEEK_END); - - f->_cnt = 0; - f->_file = fd; - f->_bufsiz = 0; - if (rw) - f->_flag = _IOREAD | _IOWRT; - else if (*mode == 'r') - f->_flag = _IOREAD; - else - f->_flag = _IOWRT; - - f->_base = f->_ptr = NULL; - return f; -} diff --git a/reactos/lib/crtdll/stdio/fprintf.c b/reactos/lib/crtdll/stdio/fprintf.c deleted file mode 100644 index a5589b6de6a..00000000000 --- a/reactos/lib/crtdll/stdio/fprintf.c +++ /dev/null @@ -1,62 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include -#include -#include - -/* - * @implemented - */ -int -fprintf(register FILE *iop, const char *fmt, ...) -{ - int len; - char localbuf[BUFSIZ]; - va_list a=0; - - - va_start( a, fmt ); - if (iop->_flag & _IONBF) - { - iop->_flag &= ~_IONBF; - iop->_ptr = iop->_base = localbuf; - iop->_bufsiz = BUFSIZ; - len = vfprintf(iop,fmt,a); - fflush(iop); - iop->_flag |= _IONBF; - iop->_base = NULL; - iop->_bufsiz = 0; - iop->_cnt = 0; - } - else - len = vfprintf(iop, fmt, a); - return ferror(iop) ? EOF : len; -} - -/* - * @implemented - */ -int -fwprintf(register FILE *iop, const wchar_t *fmt, ...) -{ - int len; - wchar_t localbuf[BUFSIZ]; - va_list a=0; - - - va_start( a, fmt ); - if (iop->_flag & _IONBF) - { - iop->_flag &= ~_IONBF; - iop->_ptr = iop->_base = (char *)localbuf; - iop->_bufsiz = BUFSIZ; - len = vfwprintf(iop,fmt,a); - fflush(iop); - iop->_flag |= _IONBF; - iop->_base = NULL; - iop->_bufsiz = 0; - iop->_cnt = 0; - } - else - len = vfwprintf(iop, fmt, a); - return ferror(iop) ? EOF : len; -} diff --git a/reactos/lib/crtdll/stdio/fputc.c b/reactos/lib/crtdll/stdio/fputc.c deleted file mode 100644 index f4cd15ef24a..00000000000 --- a/reactos/lib/crtdll/stdio/fputc.c +++ /dev/null @@ -1,23 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include -#include -#include - -/* - * @implemented - */ -int -fputc(int c, FILE *fp) -{ - return putc(c, fp); -} - -/* - * @implemented - */ -wint_t -fputwc(wchar_t c, FILE *fp) -{ - return putwc(c,fp); -} - diff --git a/reactos/lib/crtdll/stdio/fputs.c b/reactos/lib/crtdll/stdio/fputs.c deleted file mode 100644 index e88b5c612d2..00000000000 --- a/reactos/lib/crtdll/stdio/fputs.c +++ /dev/null @@ -1,43 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ - -#include "precomp.h" -#include -#include -#include - - -/* - * @implemented - */ -int -fputs(const char *s, FILE *f) -{ - - int r = 0; - int c; - int unbuffered; - char localbuf[BUFSIZ]; - - unbuffered = f->_flag & _IONBF; - if (unbuffered) - { - f->_flag &= ~_IONBF; - f->_ptr = f->_base = localbuf; - f->_bufsiz = BUFSIZ; - } - - while ((c = *s++)) - r = putc(c, f); - - if (unbuffered) - { - fflush(f); - f->_flag |= _IONBF; - f->_base = NULL; - f->_bufsiz = 0; - f->_cnt = 0; - } - - return(r); - -} diff --git a/reactos/lib/crtdll/stdio/freopen.c b/reactos/lib/crtdll/stdio/freopen.c deleted file mode 100644 index 09b97d4a544..00000000000 --- a/reactos/lib/crtdll/stdio/freopen.c +++ /dev/null @@ -1,68 +0,0 @@ -/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ - -#include -#include -#include -#include -#include - - -/* - * @implemented - */ -FILE *freopen(const char *file, const char *mode, FILE *f) -{ - int fd, rw, oflags=0; - char tbchar; - - if (file == 0 || mode == 0 || f == 0) - return 0; - - rw = (mode[1] == '+'); - - fclose(f); - - switch (*mode) { - case 'a': - oflags = O_CREAT | (rw ? O_RDWR : O_WRONLY); - break; - case 'r': - oflags = rw ? O_RDWR : O_RDONLY; - break; - case 'w': - oflags = O_TRUNC | O_CREAT | (rw ? O_RDWR : O_WRONLY); - break; - default: - return NULL; - } - if (mode[1] == '+') - tbchar = mode[2]; - else - tbchar = mode[1]; - if (tbchar == 't') - oflags |= O_TEXT; - else if (tbchar == 'b') - oflags |= O_BINARY; - else - oflags |= (_fmode & (O_TEXT|O_BINARY)); - - fd = _open(file, oflags, 0666); - if (fd < 0) - return NULL; - - if (*mode == 'a') - lseek(fd, 0, SEEK_END); - - f->_cnt = 0; - f->_file = fd; - f->_bufsiz = 0; - if (rw) - f->_flag = _IOREAD | _IOWRT; - else if (*mode == 'r') - f->_flag = _IOREAD; - else - f->_flag = _IOWRT; - - f->_base = f->_ptr = NULL; - return f; -} diff --git a/reactos/lib/crtdll/stdio/fscanf.c b/reactos/lib/crtdll/stdio/fscanf.c deleted file mode 100644 index fefde0ce436..00000000000 --- a/reactos/lib/crtdll/stdio/fscanf.c +++ /dev/null @@ -1,65 +0,0 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. -This file is part of the GNU C Library. - -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -The GNU C 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - - -#include -#include -#include -#include -#include - - -/* Read formatted input from STREAM according to the format string FORMAT. */ -/* VARARGS2 */ -/* - * @implemented - */ -int fscanf(FILE *stream,const char *format, ...) -{ - va_list arg; - int done; - - va_start(arg, format); - done = __vfscanf(stream, format, arg); - va_end(arg); - - return done; -} - -/* - * @implemented - */ -int -fwscanf(FILE *stream, const wchar_t *fmt, ...) -{ - va_list arg; - int done; - char *cf; - int i,len = wcslen(fmt); - - cf = malloc(len+1); - for(i=0;i -#include -#include -#include -#include - - -/* - * @implemented - */ -int fseek(FILE *f, long offset, int ptrname) -{ - long p = -1; /* can't happen? */ - if ( f == NULL ) { - __set_errno (EINVAL); - return -1; - } - - f->_flag &= ~_IOEOF; - if (!OPEN4WRITING(f)) - { - if (f->_base && !(f->_flag & _IONBF)) - { - p = ftell(f); - if (ptrname == SEEK_CUR) - { - offset += p; - ptrname = SEEK_SET; - } - /* check if the target position is in the buffer and - optimize seek by moving inside the buffer */ - if (ptrname == SEEK_SET && (f->_flag & (_IOUNGETC|_IOREAD|_IOWRT )) == 0 - && p-offset <= f->_ptr-f->_base && offset-p <= f->_cnt) - { - f->_ptr+=offset-p; - f->_cnt+=p-offset; - return 0; - } - } - - p = lseek(fileno(f), offset, ptrname); - f->_cnt = 0; - f->_ptr = f->_base; - f->_flag &= ~_IOUNGETC; - } - else - { - p = fflush(f); - return lseek(fileno(f), offset, ptrname) == -1 || p == EOF ? - -1 : 0; - } - return p==-1 ? -1 : 0; -} diff --git a/reactos/lib/crtdll/stdio/fsetpos.c b/reactos/lib/crtdll/stdio/fsetpos.c deleted file mode 100644 index 9c66fb9a17d..00000000000 --- a/reactos/lib/crtdll/stdio/fsetpos.c +++ /dev/null @@ -1,18 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include -#include -#include - -/* - * @implemented - */ -int fsetpos(FILE *stream,const fpos_t *pos) -{ - if (stream && pos) - { - fseek(stream, (long)(*pos), SEEK_SET); - return 0; - } - __set_errno(EFAULT); - return -1; -} diff --git a/reactos/lib/crtdll/stdio/fsopen.c b/reactos/lib/crtdll/stdio/fsopen.c deleted file mode 100644 index e216c7a0a34..00000000000 --- a/reactos/lib/crtdll/stdio/fsopen.c +++ /dev/null @@ -1,102 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/crtdll/conio/kbhit.c - * PURPOSE: Checks for keyboard hits - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 28/12/98: Created - */ -/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ - -#include -#include -#include -#include -#include -#include - - -FILE* __alloc_file(void); - - -/* - * @implemented - */ -FILE* _fsopen(const char* file, const char* mode, int shflag) -{ - FILE* f; - int fd, rw, oflags = 0; - char tbchar; - - int shf; - - if (file == 0) - return 0; - if (mode == 0) - return 0; - - f = __alloc_file(); - if (f == NULL) - return NULL; - - rw = (mode[1] == '+') || (mode[1] && (mode[2] == '+')); - - switch (*mode) - { - case 'a': - oflags = O_CREAT | (rw ? O_RDWR : O_WRONLY); - break; - case 'r': - oflags = rw ? O_RDWR : O_RDONLY; - break; - case 'w': - oflags = O_TRUNC | O_CREAT | (rw ? O_RDWR : O_WRONLY); - break; - default: - return (NULL); - } - if (mode[1] == '+') - tbchar = mode[2]; - else - tbchar = mode[1]; - if (tbchar == 't') - oflags |= O_TEXT; - else if (tbchar == 'b') - oflags |= O_BINARY; - else - oflags |= (_fmode & (O_TEXT|O_BINARY)); - - if ( shflag == _SH_DENYNO ) - shf = _S_IREAD | _S_IWRITE; - else if( shflag == _SH_DENYRD ) - shf = _S_IWRITE; - else if( shflag == _SH_DENYRW ) - shf = 0; - else if( shflag == _SH_DENYWR ) - shf = _S_IREAD; - else - shf = _S_IREAD | _S_IWRITE; - - fd = _open(file, oflags, shf); - if (fd < 0) - return NULL; - -// ms crtdll ensures that writes will end up at the end of file in append mode -// we just move the file pointer to the end of file initially - if (*mode == 'a') - lseek(fd, 0, SEEK_END); - - f->_cnt = 0; - f->_file = fd; - f->_bufsiz = 0; - if (rw) - f->_flag = _IOREAD | _IOWRT; - else if (*mode == 'r') - f->_flag = _IOREAD; - else - f->_flag = _IOWRT; - - f->_base = f->_ptr = NULL; - return f; -} diff --git a/reactos/lib/crtdll/stdio/ftell.c b/reactos/lib/crtdll/stdio/ftell.c deleted file mode 100644 index 25109101fee..00000000000 --- a/reactos/lib/crtdll/stdio/ftell.c +++ /dev/null @@ -1,48 +0,0 @@ -/* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */ -/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ - -#include -#include -#include -#include -#include - - -/* - * @implemented - */ -long ftell(FILE *f) -{ - long tres; - int adjust=0; - - if (!f) - { - __set_errno(EBADF); - return -1; - } - - if (f->_cnt < 0) - f->_cnt = 0; - else if (f->_flag&_IOREAD) - { - adjust = - f->_cnt; - } - else if (f->_flag&(_IOWRT)) - { - if (f->_base && (f->_flag&_IONBF)==0) - adjust = f->_ptr - f->_base; - } - else - return -1; - - tres = lseek(fileno(f), 0L, SEEK_CUR); - if (tres<0) - return tres; - tres += adjust; - - //f->_cnt = f->_bufsiz - tres; - //f->_ptr = f->_base + tres; - - return tres; -} diff --git a/reactos/lib/crtdll/stdio/fwalk.c b/reactos/lib/crtdll/stdio/fwalk.c deleted file mode 100644 index ef747c1f166..00000000000 --- a/reactos/lib/crtdll/stdio/fwalk.c +++ /dev/null @@ -1,18 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include -#include - - -// not exported by msvcrt or crtdll -__file_rec* __file_rec_list; - -void _fwalk(void (*func)(FILE*)) -{ - __file_rec* fr; - int i; - - for (fr=__file_rec_list; fr; fr=fr->next) - for (i=0; icount; i++) - if (fr->files[i]->_flag) - func(fr->files[i]); -} diff --git a/reactos/lib/crtdll/stdio/getc.c b/reactos/lib/crtdll/stdio/getc.c deleted file mode 100644 index 0b0a1c1c88f..00000000000 --- a/reactos/lib/crtdll/stdio/getc.c +++ /dev/null @@ -1,61 +0,0 @@ -#include "precomp.h" -#include -#include -#include -#include - -//getc can be a macro -#undef getc - -/* - * @implemented - */ -int getc(FILE *fp) -{ - int c = -1; -// check for invalid stream - - if ( !__validfp (fp) ) { - __set_errno(EINVAL); - return EOF; - } -// check for read access on stream - - if ( !OPEN4READING(fp) ) { - __set_errno(EINVAL); - return -1; - } - - if(fp->_cnt > 0) { - fp->_cnt--; - c = (int)(*fp->_ptr++ & 0377); - } - else { - c = _filbuf(fp); - } - return c; -} - -// not exported - -wint_t getwc(FILE *fp) -{ - wint_t c; - - // might check on multi bytes if text mode - - if(fp->_cnt > 0) { - fp->_cnt -= sizeof(wchar_t); - c = *((wchar_t *)(fp->_ptr)); - fp->_ptr += sizeof(wchar_t); - } - else { - c = _filwbuf(fp); - } - - return c; -} - - - - diff --git a/reactos/lib/crtdll/stdio/gets.c b/reactos/lib/crtdll/stdio/gets.c deleted file mode 100644 index c0319655a1e..00000000000 --- a/reactos/lib/crtdll/stdio/gets.c +++ /dev/null @@ -1,109 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/crtdll/stdio/gets.c - * PURPOSE: Get a character string from stdin - * PROGRAMER: DJ Delorie - * UPDATE HISTORY: - * 28/12/98: Appropriated for Reactos - */ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include - -/* - * @implemented - */ -char* gets(char* s) -{ - int c; - char *cs; - - cs = s; - while ((c = getchar()) != '\n' && c != EOF) - *cs++ = c; - if (c == EOF && cs==s) - return NULL; - *cs++ = '\0'; - return s; -} - -#if 0 -/* Copyright (C) 1991, 1994, 1995, 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. - -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -The GNU C 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include -#include -#include - -link_warning (gets, "the `gets' function is dangerous and should not be used.") - - -/* Read a newline-terminated multibyte string from stdin into S, - removing the trailing newline. Return S or NULL. */ - -char * -gets (s) - char *s; -{ - register char *p = s; - register int c; - FILE *stream = stdin; - int l; - - if (!__validfp (stream) || p == NULL) - { - __set_errno (EINVAL); - return NULL; - } - - if (feof (stream) || ferror (stream)) - return NULL; - - while ((c = getc(stdin)) != EOF) { - if (c == '\n') - break; - if ( isascii(c) ) - *cs++ = c; -#ifdef _MULTIBYTE - else if ( isleadbyte(c) ) { - l = mblen(c); - while(l > 0 ) { - c = getchar(); - if ( isleadbyte(c) || c == EOF ) - return NULL; // encoding error - *cs++ = c; - l--; - } - } -#endif - else - return NULL; // suspicious input - } - - *p = '\0'; - - /* Return null if we had an error, or if we got EOF - before writing any characters. */ - - if (ferror (stream) || (feof (stream) && p == s)) - return NULL; - - return s; -} - -#endif diff --git a/reactos/lib/crtdll/stdio/getw.c b/reactos/lib/crtdll/stdio/getw.c deleted file mode 100644 index bbba2d10263..00000000000 --- a/reactos/lib/crtdll/stdio/getw.c +++ /dev/null @@ -1,39 +0,0 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. -This file is part of the GNU C Library. - -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -The GNU C 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include - - -/* - * Read a word (int) from STREAM. - * - * @implemented - */ -int _getw(FILE *stream) -{ - int w; - - /* Is there a better way? */ - if (fread( &w, sizeof(w), 1, stream) != 1) { - // EOF is a legitimate integer value so users must - // check feof or ferror to verify an EOF return. - return(EOF); - } - return(w); -} - diff --git a/reactos/lib/crtdll/stdio/perror.c b/reactos/lib/crtdll/stdio/perror.c deleted file mode 100644 index 0ad0d792428..00000000000 --- a/reactos/lib/crtdll/stdio/perror.c +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include -#include -#include - - -#ifdef perror -#undef perror -void perror(const char *s); -#endif - -/* - * @implemented - */ -void perror(const char *s) -{ - - fprintf(stderr, "%s: %s\n", s, _strerror(NULL)); -} diff --git a/reactos/lib/crtdll/stdio/printf.c b/reactos/lib/crtdll/stdio/printf.c deleted file mode 100644 index 7c39a058739..00000000000 --- a/reactos/lib/crtdll/stdio/printf.c +++ /dev/null @@ -1,60 +0,0 @@ -/* Copyright (C) 1991, 1995, 1996 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - The GNU C 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include -#include -#include - -/* Write formatted output to stdout from the format string FORMAT. */ -/* VARARGS1 */ -/* - * @implemented - */ -int -printf (const char *format, ...) -{ - va_list arg; - int done; - - va_start (arg, format); - done = vprintf (format, arg); - va_end (arg); - return done; -} - -/* - * @implemented - */ -int -wprintf (const wchar_t *format, ...) -{ - va_list arg; - int done; - - va_start (arg, format); - done = vwprintf (format, arg); - va_end (arg); - return done; -} - -#ifdef USE_IN_LIBIO -# undef _IO_printf -/* This is for libg++. */ -strong_alias (printf, _IO_printf); -#endif - diff --git a/reactos/lib/crtdll/stdio/puts.c b/reactos/lib/crtdll/stdio/puts.c deleted file mode 100644 index aaf26b19eea..00000000000 --- a/reactos/lib/crtdll/stdio/puts.c +++ /dev/null @@ -1,21 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include "precomp.h" -#include -#include -#include - -#undef putchar - - -/* - * @implemented - */ -int puts(const char *s) -{ - int c; - - while ((c = *s++)) - putchar(c); - return putchar('\n'); - -} diff --git a/reactos/lib/crtdll/stdio/putw.c b/reactos/lib/crtdll/stdio/putw.c deleted file mode 100644 index dab2f31ee0c..00000000000 --- a/reactos/lib/crtdll/stdio/putw.c +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright (C) 1991 Free Software Foundation, Inc. - * This file is part of the GNU C Library. - * - * The GNU C Library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * The GNU C 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with the GNU C Library; see the file COPYING.LIB. If - * not, write to the Free Software Foundation, Inc., 675 Mass Ave, - * Cambridge, MA 02139, USA. */ - - -#include - - -/* - * Write the word (int) W to STREAM. - * - * @implemented - */ -int _putw(int w,FILE *stream) -{ - /* Is there a better way? */ - if (fwrite( &w, sizeof(w), 1, stream) < 1) - return(EOF); - return(0); -} diff --git a/reactos/lib/crtdll/stdio/remove.c b/reactos/lib/crtdll/stdio/remove.c deleted file mode 100644 index c29670089e6..00000000000 --- a/reactos/lib/crtdll/stdio/remove.c +++ /dev/null @@ -1,12 +0,0 @@ -#include "precomp.h" - - -/* - * @implemented - */ -int remove(const char *fn) -{ - if (!DeleteFileA(fn)) - return -1; - return 0; -} diff --git a/reactos/lib/crtdll/stdio/rename.c b/reactos/lib/crtdll/stdio/rename.c deleted file mode 100644 index cb71b6ae788..00000000000 --- a/reactos/lib/crtdll/stdio/rename.c +++ /dev/null @@ -1,18 +0,0 @@ -#include "precomp.h" -#include -#include - - -/* - * @implemented - */ -int rename(const char *old_, const char *new_) -{ - if ( old_ == NULL || new_ == NULL ) - return -1; - - if ( !MoveFileA(old_,new_) ) - return -1; - - return 0; -} diff --git a/reactos/lib/crtdll/stdio/rewind.c b/reactos/lib/crtdll/stdio/rewind.c deleted file mode 100644 index e3b6703e43e..00000000000 --- a/reactos/lib/crtdll/stdio/rewind.c +++ /dev/null @@ -1,18 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ - -#include -#include -#include - - -/* - * @implemented - */ -void rewind(FILE *f) -{ - fflush(f); - lseek(fileno(f), 0L, SEEK_SET); - f->_cnt = 0; - f->_ptr = f->_base; - f->_flag &= ~(_IOERR|_IOEOF|_IOAHEAD); -} diff --git a/reactos/lib/crtdll/stdio/rmtmp.c b/reactos/lib/crtdll/stdio/rmtmp.c deleted file mode 100644 index 69894475007..00000000000 --- a/reactos/lib/crtdll/stdio/rmtmp.c +++ /dev/null @@ -1,72 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/crtdll/stdio/rmtmp.c - * PURPOSE: remove temporary files in current directory - * PROGRAMMER: Boudewijn ( ariadne@xs4all.nl) - * UPDATE HISTORY: - * Created 19/01/99 - * NOTE Not tested. - */ - -#include -#include -#include - -#ifndef F_OK - #define F_OK 0x01 -#endif -#ifndef R_OK - #define R_OK 0x02 -#endif -#ifndef W_OK - #define W_OK 0x04 -#endif -#ifndef X_OK - #define X_OK 0x08 -#endif -#ifndef D_OK - #define D_OK 0x10 -#endif - -// should be replace by a closure of the tmp files -extern __file_rec *__file_rec_list; - -int _rmtmp( void ) -{ -/* -loop files and check for name_to_remove -*/ - __file_rec *fr = __file_rec_list; - __file_rec **last_fr = &__file_rec_list; - - int total_closed = 0; - int i = 0; - char temp_name[260]; - - /* Try to find an empty slot */ - while (fr) - { - last_fr = &(fr->next); - - /* If one of the existing slots is available, return it */ - for (i=0; icount; i++) { - if (fr->files[i]->_name_to_remove != NULL) { - if ( _access(fr->files[i]->_name_to_remove,W_OK) ) { - strcpy(temp_name,fr->files[i]->_name_to_remove); - fclose(fr->files[i]); - remove(temp_name); - total_closed++; - } - } - } - - /* If this one is full, go to the next */ - if (fr->count == __FILE_REC_MAX) - fr = fr->next; - else - /* it isn't full, we can add to it */ - break; - } - return total_closed; -} diff --git a/reactos/lib/crtdll/stdio/setbuf.c b/reactos/lib/crtdll/stdio/setbuf.c deleted file mode 100644 index b18dfb588b9..00000000000 --- a/reactos/lib/crtdll/stdio/setbuf.c +++ /dev/null @@ -1,15 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include -#include -#include - -/* - * @implemented - */ -void setbuf(FILE *f, char *buf) -{ - if (buf) - setvbuf(f, buf, _IOFBF, BUFSIZ); - else - setvbuf(f, 0, _IONBF, BUFSIZ); -} diff --git a/reactos/lib/crtdll/stdio/sprintf.c b/reactos/lib/crtdll/stdio/sprintf.c deleted file mode 100644 index 6a020ae06d8..00000000000 --- a/reactos/lib/crtdll/stdio/sprintf.c +++ /dev/null @@ -1,96 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ - -/* Copyright (C) 1991, 1995 Free Software Foundation, Inc. -This file is part of the GNU C Library. - -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -The GNU C 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include -#include -#include -#include -#include - -#undef sprintf -#undef wsprintf -/* - * @implemented - */ -int -sprintf(char *str, const char *fmt, ...) -{ - va_list arg; - int done; - - va_start (arg, fmt); - done = vsprintf (str, fmt, arg); - va_end (arg); - return done; -} - -/* - * @implemented - */ -int -swprintf(wchar_t *str, const wchar_t *fmt, ...) -{ - va_list arg; - int done; - - va_start (arg, fmt); - done = vswprintf (str, fmt, arg); - va_end (arg); - return done; -} - - - -/* Write formatted output into S, according to the format - string FORMAT, writing no more than MAXLEN characters. */ -/* VARARGS3 */ -/* - * @implemented - */ -int -_snprintf (char *s, size_t maxlen,const char *format, ...) -{ - va_list arg; - int done; - - va_start (arg, format); - done = _vsnprintf (s, maxlen, format, arg); - va_end (arg); - - return done; -} - -/* - * @implemented - */ -int -_snwprintf (wchar_t *s, size_t maxlen,const wchar_t *format, ...) -{ - va_list arg; - int done; - - va_start (arg, format); - done = _vsnwprintf (s, maxlen, format, arg); - va_end (arg); - - return done; -} - - diff --git a/reactos/lib/crtdll/stdio/sscanf.c b/reactos/lib/crtdll/stdio/sscanf.c deleted file mode 100644 index 381f91c47fe..00000000000 --- a/reactos/lib/crtdll/stdio/sscanf.c +++ /dev/null @@ -1,71 +0,0 @@ -/* Copyright (C) 1991, 1995, 1996 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - The GNU C 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include -#include -#include -#include -#include - - -/* Read formatted input from S, according to the format string FORMAT. */ -/* VARARGS2 */ -/* - * @implemented - */ -int sscanf (const char *s,const char *format, ...) -{ - va_list arg; - int done; - - va_start (arg, format); - done = __vsscanf (s, format, arg); - va_end (arg); - - return done; -} - -/* - * @implemented - */ -int swscanf(const wchar_t *str, const wchar_t *fmt, ...) -{ - va_list arg; - int done; - char *f , *s; - int i,len = wcslen(fmt); - - f = malloc(len+1); - for(i=0;i -#include - - -/* - * @unimplemented - */ -char *_tempnam(const char *dir,const char *prefix ) -{ - char *TempFileName = malloc(MAX_PATH); - char *d; - - if ( dir == NULL ) - d = getenv("TMP"); - else - d = (char *)dir; - -#ifdef _MSVCRT_LIB_ // TODO: check on difference? - if (GetTempFileNameA(d, prefix, 1, TempFileName) == 0) { -#else// TODO: FIXME: review which is correct - if (GetTempFileNameA(d, prefix, 0, TempFileName) == 0) { -#endif /*_MSVCRT_LIB_*/ - - free(TempFileName); - return NULL; - } - - return TempFileName; -} diff --git a/reactos/lib/crtdll/stdio/tmpfile.c b/reactos/lib/crtdll/stdio/tmpfile.c deleted file mode 100644 index 76d890d1d08..00000000000 --- a/reactos/lib/crtdll/stdio/tmpfile.c +++ /dev/null @@ -1,70 +0,0 @@ -/* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ -/* Copyright (C) 1997 DJ Delorie, see COPYING.DJ for details */ -/* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ -/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ - -#include -#include -#include -#include -#include -//#include -#include -#include -#include - - -FILE * __alloc_file(void); - -/* - * @implemented - */ -FILE * -tmpfile(void) -{ - int temp_fd; - FILE *f; - char *temp_name = tmpnam(0); - char *n_t_r = (char *)malloc(L_tmpnam); - - if (!n_t_r) - return 0; - - /* We could have a race condition, whereby another program - (in another virtual machine, or if the temporary file is - in a directory which is shared via a network) opens the - file returned by `tmpnam' between the call above and the - moment when we actually open the file below. This loop - retries the call to `tmpnam' until we actually succeed - to create the file which didn't exist before. */ - do { - // errno = 0; - temp_fd = _open(temp_name, 0, SH_DENYRW); - // if ( errno == ENOENT ) -// break; - } while (temp_fd == -1 && (temp_name = tmpnam(0)) != 0); - - if (temp_name == 0) - return 0; - - /* This should have been fdopen(temp_fd, "wb+"), but `fdopen' - is non-ANSI. So we need to dump some of its guts here. Sigh... */ - f = __alloc_file(); - if (f) - { - f->_file = temp_fd; - f->_cnt = 0; - f->_bufsiz = 0; - f->_flag = _IORMONCL | _IOREAD | _IOWRT; - f->_name_to_remove = n_t_r; - strcpy(f->_name_to_remove, temp_name); - f->_base = f->_ptr = NULL; - } - else - { - close(temp_fd); - remove(temp_name); - free(n_t_r); - } - return f; -} diff --git a/reactos/lib/crtdll/stdio/tmpnam.c b/reactos/lib/crtdll/stdio/tmpnam.c deleted file mode 100644 index e54217192d9..00000000000 --- a/reactos/lib/crtdll/stdio/tmpnam.c +++ /dev/null @@ -1,19 +0,0 @@ -#include "precomp.h" -#include -#include - - -/* - * @implemented - */ -char * tmpnam(char *s) -{ - char PathName[MAX_PATH]; - static char static_buf[MAX_PATH]; - - GetTempPathA(MAX_PATH, PathName); - GetTempFileNameA(PathName, "ARI",007,static_buf); - strcpy(s,static_buf); - - return s; -} diff --git a/reactos/lib/crtdll/stdio/ungetc.c b/reactos/lib/crtdll/stdio/ungetc.c deleted file mode 100644 index 00cc274bc42..00000000000 --- a/reactos/lib/crtdll/stdio/ungetc.c +++ /dev/null @@ -1,76 +0,0 @@ -/* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include -#include -#include -#include - - -/* - * @implemented - */ -int ungetc(int c, FILE *f) -{ - if (!__validfp (f) || !OPEN4READING(f)) { - __set_errno (EINVAL); - return EOF; - } - - if (c == EOF ) - return EOF; - - if ( f->_ptr == NULL || f->_base == NULL) - return EOF; - - if (f->_ptr == f->_base) - { - if (f->_cnt == 0) - f->_ptr++; - else - return EOF; - } - - f->_cnt++; - f->_ptr--; - if(*f->_ptr != c) - { - f->_flag |= _IOUNGETC; - *f->_ptr = c; - } - return c; -} - - -/* - * @implemented - */ -wint_t -ungetwc(wchar_t c, FILE *f) -{ - if (!__validfp (f) || !OPEN4READING(f)) { - __set_errno (EINVAL); - return EOF; - } - - if (c == (wchar_t)EOF ) - return EOF; - - if ( f->_ptr == NULL || f->_base == NULL) - return EOF; - - if (f->_ptr == f->_base) - { - if (f->_cnt == 0) - f->_ptr+=sizeof(wchar_t); - else - return EOF; - } - - f->_cnt+=sizeof(wchar_t); - f->_ptr-=sizeof(wchar_t); - - f->_flag |= _IOUNGETC; - *((wchar_t *)(f->_ptr)) = c; - - return c; -} diff --git a/reactos/lib/crtdll/stdio/vscanf.c b/reactos/lib/crtdll/stdio/vscanf.c deleted file mode 100644 index 4c6b7968964..00000000000 --- a/reactos/lib/crtdll/stdio/vscanf.c +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright (C) 1991, 1992, 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. - -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -The GNU C 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ - -#include -#include -#include -#include - - -#undef vscanf - - -/* Read formatted input from stdin according to the format - string in FORMAT, using the argument list in ARG. */ -int __vscanf (const char *format, va_list arg) -{ - return __vfscanf(stdin, format, arg); -} - diff --git a/reactos/lib/crtdll/stdlib/_exit.c b/reactos/lib/crtdll/stdlib/_exit.c deleted file mode 100644 index cb7b5e1a37b..00000000000 --- a/reactos/lib/crtdll/stdlib/_exit.c +++ /dev/null @@ -1,58 +0,0 @@ -#include "precomp.h" -#include -#include -#include -#include - -struct __atexit *__atexit_ptr = 0; - -/* - * @implemented - */ -void exit(int status) -{ - //int i; - struct __atexit *a = __atexit_ptr; - __atexit_ptr = 0; /* to prevent infinite loops */ - while (a) - { - (a->__function)(); - a = a->__next; - } -/* - if (__stdio_cleanup_hook) - __stdio_cleanup_hook(); - for (i=0; i -#include -#include -#include - -char *msg ="Abort\n\r"; - -/* - * @implemented - */ -void abort() -{ - fflush(NULL); - fcloseall(); - raise(SIGABRT); - _write(stderr->_file, msg, sizeof(msg)-1); - exit(3); -} - diff --git a/reactos/lib/crtdll/stdlib/abs.c b/reactos/lib/crtdll/stdlib/abs.c deleted file mode 100644 index 3efdce831fd..00000000000 --- a/reactos/lib/crtdll/stdlib/abs.c +++ /dev/null @@ -1,12 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include -#include - -/* - * @implemented - */ -int -abs(int j) -{ - return j<0 ? -j : j; -} diff --git a/reactos/lib/crtdll/stdlib/atof.c b/reactos/lib/crtdll/stdlib/atof.c deleted file mode 100644 index e3021084b92..00000000000 --- a/reactos/lib/crtdll/stdlib/atof.c +++ /dev/null @@ -1,11 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include - -/* - * @implemented - */ -double -atof(const char *ascii) -{ - return strtod(ascii, 0); -} diff --git a/reactos/lib/crtdll/stdlib/atoi.c b/reactos/lib/crtdll/stdlib/atoi.c deleted file mode 100644 index df6a0c47002..00000000000 --- a/reactos/lib/crtdll/stdlib/atoi.c +++ /dev/null @@ -1,11 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include - -/* - * @implemented - */ -int -atoi(const char *str) -{ - return (int)strtol(str, 0, 10); -} diff --git a/reactos/lib/crtdll/stdlib/atol.c b/reactos/lib/crtdll/stdlib/atol.c deleted file mode 100644 index 663301d95fc..00000000000 --- a/reactos/lib/crtdll/stdlib/atol.c +++ /dev/null @@ -1,11 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include - -/* - * @implemented - */ -long -atol(const char *str) -{ - return strtol(str, 0, 10); -} diff --git a/reactos/lib/crtdll/stdlib/atold.c b/reactos/lib/crtdll/stdlib/atold.c deleted file mode 100644 index c9b511684a4..00000000000 --- a/reactos/lib/crtdll/stdlib/atold.c +++ /dev/null @@ -1,8 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include - -long double -_atold(const char *ascii) -{ - return _strtold(ascii, 0); -} diff --git a/reactos/lib/crtdll/stdlib/bsearch.c b/reactos/lib/crtdll/stdlib/bsearch.c deleted file mode 100644 index 7efbdbd9897..00000000000 --- a/reactos/lib/crtdll/stdlib/bsearch.c +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include - -/* - * @implemented - */ -void * -bsearch(const void *key, const void *base0, size_t nelem, - size_t size, int (*cmp)(const void *ck, const void *ce)) -{ - char *base = (char *)base0; - int lim, cmpval; - void *p; - - for (lim = nelem; lim != 0; lim >>= 1) - { - p = base + (lim >> 1) * size; - cmpval = (*cmp)(key, p); - if (cmpval == 0) - return p; - if (cmpval > 0) - { /* key > p: move right */ - base = (char *)p + size; - lim--; - } /* else move left */ - } - return 0; -} diff --git a/reactos/lib/crtdll/stdlib/div.c b/reactos/lib/crtdll/stdlib/div.c deleted file mode 100644 index 56b8b4422f8..00000000000 --- a/reactos/lib/crtdll/stdlib/div.c +++ /dev/null @@ -1,27 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include - -/* - * @implemented - */ -div_t -div(int num, int denom) -{ - div_t r; - - if (num > 0 && denom < 0) { - num = -num; - denom = -denom; - } - r.quot = num / denom; - r.rem = num % denom; - if (num < 0 && denom > 0) - { - if (r.rem > 0) - { - r.quot++; - r.rem -= denom; - } - } - return r; -} diff --git a/reactos/lib/crtdll/stdlib/ecvt.c b/reactos/lib/crtdll/stdlib/ecvt.c deleted file mode 100644 index 940ffb2ed27..00000000000 --- a/reactos/lib/crtdll/stdlib/ecvt.c +++ /dev/null @@ -1,15 +0,0 @@ -/* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ -#include -#include - -char *ecvtbuf (double, int, int *, int *, char *); - -/* - * @implemented - */ -char * -_ecvt (double value, int ndigits, int *decpt, int *sign) -{ - static char ecvt_buf[DBL_MAX_10_EXP + 10]; - return ecvtbuf (value, ndigits, decpt, sign, ecvt_buf); -} diff --git a/reactos/lib/crtdll/stdlib/ecvtbuf.c b/reactos/lib/crtdll/stdlib/ecvtbuf.c deleted file mode 100644 index 1d0f65fbba8..00000000000 --- a/reactos/lib/crtdll/stdlib/ecvtbuf.c +++ /dev/null @@ -1,108 +0,0 @@ -/* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ -#include -#include -#include -#include -#include -// #include - -void __ecvround (char *, char *, const char *, int *); - -void -__ecvround (char *numbuf, char *last_digit, const char *after_last, int *decpt) -{ - char *p; - int carry = 0; - - /* Do we have at all to round the last digit? */ - if (*after_last > '4') - { - p = last_digit; - carry = 1; - - /* Propagate the rounding through trailing '9' digits. */ - do { - int sum = *p + carry; - carry = sum > '9'; - *p-- = sum - carry * 10; - } while (carry && p >= numbuf); - - /* We have 9999999... which needs to be rounded to 100000.. */ - if (carry && p == numbuf) - { - *p = '1'; - *decpt += 1; - } - } -} - -char * -ecvtbuf (double value, int ndigits, int *decpt, int *sign, char *buf) -{ - static char INFINITY[] = "Infinity"; - char decimal = '.' /* localeconv()->decimal_point[0] */; - char *cvtbuf = (char *)alloca (ndigits + 20); /* +3 for sign, dot, null; */ - /* two extra for rounding */ - /* 15 extra for alignment */ - char *s = cvtbuf, *d = buf; - - /* Produce two extra digits, so we could round properly. */ - sprintf (cvtbuf, "%-+.*E", ndigits + 2, value); - *decpt = 0; - - /* The sign. */ - if (*s++ == '-') - *sign = 1; - else - *sign = 0; - - /* Special values get special treatment. */ - if (strncmp (s, "Inf", 3) == 0) - { - /* SunOS docs says we have return "Infinity" for NDIGITS >= 8. */ - memcpy (buf, INFINITY, ndigits >= 8 ? 9 : 3); - if (ndigits < 8) - buf[3] = '\0'; - } - else if (strcmp (s, "NaN") == 0) - memcpy (buf, s, 4); - else - { - char *last_digit, *digit_after_last; - - /* Copy (the single) digit before the decimal. */ - while (*s && *s != decimal && d - buf < ndigits) - *d++ = *s++; - - /* If we don't see any exponent, here's our decimal point. */ - *decpt = d - buf; - if (*s) - s++; - - /* Copy the fraction digits. */ - while (*s && *s != 'E' && d - buf < ndigits) - *d++ = *s++; - - /* Remember the last digit copied and the one after it. */ - last_digit = d > buf ? d - 1 : d; - digit_after_last = s; - - /* Get past the E in exponent field. */ - while (*s && *s++ != 'E') - ; - - /* Adjust the decimal point by the exponent value. */ - *decpt += atoi (s); - - /* Pad with zeroes if needed. */ - while (d - buf < ndigits) - *d++ = '0'; - - /* Zero-terminate. */ - *d = '\0'; - - /* Round if necessary. */ - __ecvround (buf, last_digit, digit_after_last, decpt); - } - return buf; -} diff --git a/reactos/lib/crtdll/stdlib/fcvt.c b/reactos/lib/crtdll/stdlib/fcvt.c deleted file mode 100644 index 423b7f2380d..00000000000 --- a/reactos/lib/crtdll/stdlib/fcvt.c +++ /dev/null @@ -1,15 +0,0 @@ -/* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ -#include -#include - -char *fcvtbuf (double, int, int *, int *, char *); - -/* - * @implemented - */ -char * -_fcvt (double value, int ndigits, int *decpt, int *sign) -{ - static char fcvt_buf[2 * DBL_MAX_10_EXP + 10]; - return fcvtbuf (value, ndigits, decpt, sign, fcvt_buf); -} diff --git a/reactos/lib/crtdll/stdlib/fcvtbuf.c b/reactos/lib/crtdll/stdlib/fcvtbuf.c deleted file mode 100644 index 2bf85aa6483..00000000000 --- a/reactos/lib/crtdll/stdlib/fcvtbuf.c +++ /dev/null @@ -1,61 +0,0 @@ -/* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ -#include -#include -#include -#include -#include -// #include - -void __ecvround (char *, char *, const char *, int *); -char *ecvtbuf (double, int, int *, int *, char *); - -char * -fcvtbuf (double value, int ndigits, int *decpt, int *sign, char *buf) -{ - static char INFINITY[] = "Infinity"; - char decimal = '.' /* localeconv()->decimal_point[0] */; - int digits = ndigits >= 0 ? ndigits : 0; - char *cvtbuf = (char *)alloca (2*DBL_MAX_10_EXP + 16); - char *s = cvtbuf; - char *dot; - - sprintf (cvtbuf, "%-+#.*f", DBL_MAX_10_EXP + digits + 1, value); - - /* The sign. */ - if (*s++ == '-') - *sign = 1; - else - *sign = 0; - - /* Where's the decimal point? */ - dot = strchr (s, decimal); - *decpt = dot ? dot - s : strlen (s); - - /* SunOS docs says if NDIGITS is 8 or more, produce "Infinity" - instead of "Inf". */ - if (strncmp (s, "Inf", 3) == 0) - { - memcpy (buf, INFINITY, ndigits >= 8 ? 9 : 3); - if (ndigits < 8) - buf[3] = '\0'; - return buf; - } - else if (ndigits < 0) - return ecvtbuf (value, *decpt + ndigits, decpt, sign, buf); - else if (*s == '0' && value != 0.0) - return ecvtbuf (value, ndigits, decpt, sign, buf); - else - { - memcpy (buf, s, *decpt); - if (s[*decpt] == decimal) - { - memcpy (buf + *decpt, s + *decpt + 1, ndigits); - buf[*decpt + ndigits] = '\0'; - } - else - buf[*decpt] = '\0'; - __ecvround (buf, buf + *decpt + ndigits - 1, - s + *decpt + ndigits + 1, decpt); - return buf; - } -} diff --git a/reactos/lib/crtdll/stdlib/gcvt.c b/reactos/lib/crtdll/stdlib/gcvt.c deleted file mode 100644 index c077566c83a..00000000000 --- a/reactos/lib/crtdll/stdlib/gcvt.c +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */ -#include -#include -#include - -/* - * @implemented - */ -char * -_gcvt (double value, int ndigits, char *buf) -{ - char *p = buf; - - sprintf (buf, "%-#.*g", ndigits, value); - - /* It seems they expect us to return .XXXX instead of 0.XXXX */ - if (*p == '-') - p++; - if (*p == '0' && p[1] == '.') - memmove (p, p + 1, strlen (p + 1) + 1); - - /* They want Xe-YY, not X.e-YY, and XXXX instead of XXXX. */ - p = strchr (buf, 'e'); - if (!p) - { - p = buf + strlen (buf); - /* They don't want trailing zeroes. */ - while (p[-1] == '0' && p > buf + 2) - *--p = '\0'; - } - if (p > buf && p[-1] == '.') - memmove (p - 1, p, strlen (p) + 1); - return buf; -} diff --git a/reactos/lib/crtdll/stdlib/labs.c b/reactos/lib/crtdll/stdlib/labs.c deleted file mode 100644 index 8c1d3fff3f0..00000000000 --- a/reactos/lib/crtdll/stdlib/labs.c +++ /dev/null @@ -1,12 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include -#include - -/* - * @implemented - */ -long -labs(long j) -{ - return j<0 ? -j : j; -} diff --git a/reactos/lib/crtdll/stdlib/ldiv.c b/reactos/lib/crtdll/stdlib/ldiv.c deleted file mode 100644 index a40597d0e95..00000000000 --- a/reactos/lib/crtdll/stdlib/ldiv.c +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include - -/* - * @implemented - */ -ldiv_t -ldiv(long num, long denom) -{ - ldiv_t r; - - if (num > 0 && denom < 0) - { - num = -num; - denom = -denom; - } - r.quot = num / denom; - r.rem = num % denom; - if (num < 0 && denom > 0) - { - if (r.rem > 0) - { - r.quot++; - r.rem -= denom; - } - } - return r; -} diff --git a/reactos/lib/crtdll/stdlib/obsol.c b/reactos/lib/crtdll/stdlib/obsol.c deleted file mode 100644 index 48e465fc2d0..00000000000 --- a/reactos/lib/crtdll/stdlib/obsol.c +++ /dev/null @@ -1,33 +0,0 @@ -#include "precomp.h" -#include - -#undef _cpumode -unsigned char _cpumode = 0; -unsigned char *_cpumode_dll = &_cpumode; - -/* - * @implemented - */ -void _seterrormode(int nMode) -{ - SetErrorMode(nMode); - return; -} - -/* - * @implemented - */ -void _beep(unsigned nFreq, unsigned nDur) -{ - Beep(nFreq,nDur); - return; -} - -/* - * @implemented - */ -void _sleep(unsigned long ulTime) -{ - Sleep(ulTime); - return; -} diff --git a/reactos/lib/crtdll/stdlib/rot.c b/reactos/lib/crtdll/stdlib/rot.c deleted file mode 100644 index a5b46543e47..00000000000 --- a/reactos/lib/crtdll/stdlib/rot.c +++ /dev/null @@ -1,69 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/crtdll/stdlib/rot.c - * PURPOSE: Performs a bit wise rotation - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 03/04/99: Created - */ - -#include -#include - -/* - * @implemented - */ -unsigned int _rotl( unsigned int value, int shift ) -{ - int max_bits = sizeof(unsigned int)<<3; - if ( shift < 0 ) - return _rotr(value,-shift); - - if ( shift > max_bits ) - shift = shift % max_bits; - return (value << shift) | (value >> (max_bits-shift)); -} - -/* - * @implemented - */ -unsigned int _rotr( unsigned int value, int shift ) -{ - int max_bits = sizeof(unsigned int)<<3; - if ( shift < 0 ) - return _rotl(value,-shift); - - if ( shift > max_bits<<3 ) - shift = shift % max_bits; - return (value >> shift) | (value << (max_bits-shift)); -} - - -/* - * @implemented - */ -unsigned long _lrotl( unsigned long value, int shift ) -{ - int max_bits = sizeof(unsigned long)<<3; - if ( shift < 0 ) - return _lrotr(value,-shift); - - if ( shift > max_bits ) - shift = shift % max_bits; - return (value << shift) | (value >> (max_bits-shift)); -} - -/* - * @implemented - */ -unsigned long _lrotr( unsigned long value, int shift ) -{ - int max_bits = sizeof(unsigned long)<<3; - if ( shift < 0 ) - return _lrotl(value,-shift); - - if ( shift > max_bits ) - shift = shift % max_bits; - return (value >> shift) | (value << (max_bits-shift)); -} diff --git a/reactos/lib/crtdll/stdlib/senv.c b/reactos/lib/crtdll/stdlib/senv.c deleted file mode 100644 index 918c9ce107f..00000000000 --- a/reactos/lib/crtdll/stdlib/senv.c +++ /dev/null @@ -1,36 +0,0 @@ -#include "precomp.h" -#include -#include - -#define NDEBUG -#include - - -/* - * @implemented - */ -void _searchenv(const char *file,const char *var,char *path ) -{ - char *env = getenv(var); - char *x; - char *y; - char *FilePart; - - DPRINT("_searchenv()\n"); - - x = strchr(env,'='); - if ( x != NULL ) { - *x = 0; - x++; - } - y = strchr(env,';'); - while ( y != NULL ) { - *y = 0; - if ( SearchPathA(x,file,NULL,MAX_PATH,path,&FilePart) > 0 ) { - return; - } - x = y+1; - y = strchr(env,';'); - } - return; -} diff --git a/reactos/lib/crtdll/stdlib/strtod.c b/reactos/lib/crtdll/stdlib/strtod.c deleted file mode 100644 index 29d936ebdd0..00000000000 --- a/reactos/lib/crtdll/stdlib/strtod.c +++ /dev/null @@ -1,100 +0,0 @@ -/* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ - -#include - - -/* - * @implemented - */ -double -strtod(const char *s, char **sret) -{ - long double r; /* result */ - int e; /* exponent */ - long double d; /* scale */ - int sign; /* +- 1.0 */ - int esign; - int i; - int flags=0; - - r = 0.0; - sign = 1; - e = 0; - esign = 1; - - while ((*s == ' ') || (*s == '\t')) - s++; - - if (*s == '+') - s++; - else if (*s == '-') - { - sign = -1; - s++; - } - - while ((*s >= '0') && (*s <= '9')) - { - flags |= 1; - r *= 10.0; - r += *s - '0'; - s++; - } - - if (*s == '.') - { - d = 0.1L; - s++; - while ((*s >= '0') && (*s <= '9')) - { - flags |= 2; - r += d * (*s - '0'); - s++; - d *= 0.1L; - } - } - - if (flags == 0) - { - if (sret) - *sret = (char *)s; - return 0; - } - - if ((*s == 'e') || (*s == 'E')) - { - s++; - if (*s == '+') - s++; - else if (*s == '-') - { - s++; - esign = -1; - } - if ((*s < '0') || (*s > '9')) - { - if (sret) - *sret = (char *)s; - return r; - } - - while ((*s >= '0') && (*s <= '9')) - { - e *= 10; - e += *s - '0'; - s++; - } - } - - if (esign < 0) - for (i = 1; i <= e; i++) - r *= 0.1L; - else - for (i = 1; i <= e; i++) - r *= 10.0; - - if (sret) - *sret = (char *)s; - return r * sign; -} diff --git a/reactos/lib/crtdll/stdlib/strtol.c b/reactos/lib/crtdll/stdlib/strtol.c deleted file mode 100644 index 0ae10c9b6e3..00000000000 --- a/reactos/lib/crtdll/stdlib/strtol.c +++ /dev/null @@ -1,94 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include -#include -#include -#include - - -/* - * @implemented - */ -long -strtol(const char *nptr, char **endptr, int base) -{ - const char *s = nptr; - unsigned long acc; - int c; - unsigned long cutoff; - int neg = 0, any, cutlim; - - /* - * Skip white space and pick up leading +/- sign if any. - * If base is 0, allow 0x for hex and 0 for octal, else - * assume decimal; if base is already 16, allow 0x. - */ - do { - c = *s++; - } while (isspace(c)); - if (c == '-') - { - neg = 1; - c = *s++; - } - else if (c == '+') - c = *s++; - if ((base == 0 || base == 16) && - c == '0' && (*s == 'x' || *s == 'X')) - { - c = s[1]; - s += 2; - base = 16; - } - if (base == 0) - base = c == '0' ? 8 : 10; - - /* - * Compute the cutoff value between legal numbers and illegal - * numbers. That is the largest legal value, divided by the - * base. An input number that is greater than this value, if - * followed by a legal input character, is too big. One that - * is equal to this value may be valid or not; the limit - * between valid and invalid numbers is then based on the last - * digit. For instance, if the range for longs is - * [-2147483648..2147483647] and the input base is 10, - * cutoff will be set to 214748364 and cutlim to either - * 7 (neg==0) or 8 (neg==1), meaning that if we have accumulated - * a value > 214748364, or equal but the next digit is > 7 (or 8), - * the number is too big, and we will return a range error. - * - * Set any if any `digits' consumed; make it negative to indicate - * overflow. - */ - cutoff = neg ? -(unsigned long)LONG_MIN : LONG_MAX; - cutlim = cutoff % (unsigned long)base; - cutoff /= (unsigned long)base; - for (acc = 0, any = 0;; c = *s++) - { - if (isdigit(c)) - c -= '0'; - else if (isalpha(c)) - c -= isupper(c) ? 'A' - 10 : 'a' - 10; - else - break; - if (c >= base) - break; - if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim)) - any = -1; - else - { - any = 1; - acc *= base; - acc += c; - } - } - if (any < 0) - { - acc = neg ? LONG_MIN : LONG_MAX; - __set_errno(ERANGE); - } - else if (neg) - acc = -acc; - if (endptr != 0) - *endptr = any ? (char *)s - 1 : (char *)nptr; - return acc; -} diff --git a/reactos/lib/crtdll/stdlib/strtold.c b/reactos/lib/crtdll/stdlib/strtold.c deleted file mode 100644 index 2cdc6ec3c71..00000000000 --- a/reactos/lib/crtdll/stdlib/strtold.c +++ /dev/null @@ -1,126 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include -#include -//#include - -static double powten[] = -{ - 1e1L, 1e2L, 1e4L, 1e8L, 1e16L, 1e32L, 1e64L, 1e128L, 1e256L, -#ifdef __GNUC__ - 1e512L, 1e512L*1e512L, 1e2048L, 1e4096L -#else - 1e256L, 1e256L, 1e256L, 1e256L -#endif -}; - -long double -_strtold(const char *s, char **sret) -{ - double r; /* result */ - int e, ne; /* exponent */ - int sign; /* +- 1.0 */ - int esign; - int flags=0; - int l2powm1; - - r = 0.0L; - sign = 1; - e = ne = 0; - esign = 1; - - while(*s && isspace(*s)) - s++; - - if (*s == '+') - s++; - else if (*s == '-') - { - sign = -1; - s++; - } - - while ((*s >= '0') && (*s <= '9')) - { - flags |= 1; - r *= 10.0L; - r += *s - '0'; - s++; - } - - if (*s == '.') - { - s++; - while ((*s >= '0') && (*s <= '9')) - { - flags |= 2; - r *= 10.0L; - r += *s - '0'; - s++; - ne++; - } - } - if (flags == 0) - { - if (sret) - *sret = (char *)s; - return 0.0L; - } - - if ((*s == 'e') || (*s == 'E')) - { - s++; - if (*s == '+') - s++; - else if (*s == '-') - { - s++; - esign = -1; - } - while ((*s >= '0') && (*s <= '9')) - { - e *= 10; - e += *s - '0'; - s++; - } - } - if (esign < 0) - { - esign = -esign; - e = -e; - } - e = e - ne; - if (e < -4096) - { - /* possibly subnormal number, 10^e would overflow */ - r *= 1.0e-2048L; - e += 2048; - } - if (e < 0) - { - e = -e; - esign = -esign; - } - if (e >= 8192) - e = 8191; - if (e) - { - double d = 1.0L; - l2powm1 = 0; - while (e) - { - if (e & 1) - d *= powten[l2powm1]; - e >>= 1; - l2powm1++; - } - if (esign > 0) - r *= d; - else - r /= d; - } - if (sret) - *sret = (char *)s; - return r * sign; - - return 0; -} diff --git a/reactos/lib/crtdll/stdlib/strtoll.c b/reactos/lib/crtdll/stdlib/strtoll.c deleted file mode 100644 index b609e79d233..00000000000 --- a/reactos/lib/crtdll/stdlib/strtoll.c +++ /dev/null @@ -1,84 +0,0 @@ -/* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include -#include -#include -#include -//#include - -/* constants used in Solaris */ -#define LLONG_MIN -9223372036854775807L-1L -#define LLONG_MAX 9223372036854775807L -#define ULLONG_MAX 18446744073709551615UL - -long -strtoll(const char *nptr, char **endptr, int base) -{ - const char *s = nptr; - unsigned long acc; - int c; - unsigned long cutoff; - int neg = 0, any, cutlim; - - /* - * See strtol for comments as to the logic used. - */ - do { - c = *s++; - } while (isspace(c)); - if (c == '-') - { - neg = 1; - c = *s++; - } - else if (c == '+') - c = *s++; - if ((base == 0 || base == 16) && - c == '0' && (*s == 'x' || *s == 'X')) - { - c = s[1]; - s += 2; - base = 16; - } - if (base == 0) - base = c == '0' ? 8 : 10; - -/* to prevent overflow, we take max-1 and add 1 after division */ - cutoff = neg ? -(LLONG_MIN+1) : LLONG_MAX-1; - cutlim = cutoff % base; - cutoff /= base; - if (++cutlim == base) - { - cutlim = 0; - cutoff++; - } - for (acc = 0, any = 0;; c = *s++) - { - if (isdigit(c)) - c -= '0'; - else if (isalpha(c)) - c -= isupper(c) ? 'A' - 10 : 'a' - 10; - else - break; - if (c >= base) - break; - if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim)) - any = -1; - else - { - any = 1; - acc *= base; - acc += c; - } - } - if (any < 0) - { - acc = neg ? LLONG_MIN : LLONG_MAX; - errno = ERANGE; - } - else if (neg) - acc *= -1; - if (endptr != 0) - *endptr = any ? (char *)s - 1 : (char *)nptr; - return acc; -} diff --git a/reactos/lib/crtdll/stdlib/strtoul.c b/reactos/lib/crtdll/stdlib/strtoul.c deleted file mode 100644 index 63ee96adcc1..00000000000 --- a/reactos/lib/crtdll/stdlib/strtoul.c +++ /dev/null @@ -1,76 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include -#include -#include -#include - -/* - * Convert a string to an unsigned long integer. - * - * Ignores `locale' stuff. Assumes that the upper and lower case - * alphabets and digits are each contiguous. - * - * @implemented - */ -unsigned long -strtoul(const char *nptr, char **endptr, int base) -{ - const char *s = nptr; - unsigned long acc; - int c; - unsigned long cutoff; - int neg = 0, any, cutlim; - - /* - * See strtol for comments as to the logic used. - */ - do { - c = *s++; - } while (isspace(c)); - if (c == '-') - { - neg = 1; - c = *s++; - } - else if (c == '+') - c = *s++; - if ((base == 0 || base == 16) && - c == '0' && (*s == 'x' || *s == 'X')) - { - c = s[1]; - s += 2; - base = 16; - } - if (base == 0) - base = c == '0' ? 8 : 10; - cutoff = (unsigned long)ULONG_MAX / (unsigned long)base; - cutlim = (unsigned long)ULONG_MAX % (unsigned long)base; - for (acc = 0, any = 0;; c = *s++) - { - if (isdigit(c)) - c -= '0'; - else if (isalpha(c)) - c -= isupper(c) ? 'A' - 10 : 'a' - 10; - else - break; - if (c >= base) - break; - if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim)) - any = -1; - else { - any = 1; - acc *= base; - acc += c; - } - } - if (any < 0) - { - acc = ULONG_MAX; - __set_errno(ERANGE); - } - else if (neg) - acc = -acc; - if (endptr != 0) - *endptr = any ? (char *)s - 1 : (char *)nptr; - return acc; -} diff --git a/reactos/lib/crtdll/sys_stat/futime.c b/reactos/lib/crtdll/sys_stat/futime.c deleted file mode 100644 index 4fe2137bb88..00000000000 --- a/reactos/lib/crtdll/sys_stat/futime.c +++ /dev/null @@ -1,43 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include - - -/* - * @implemented - */ -int _futime(int nHandle, struct _utimbuf* pTimes) -{ - FILETIME LastAccessTime; - FILETIME LastWriteTime; - - // check for stdin / stdout handles ?? - if (nHandle == -1) { - __set_errno(EBADF); - return -1; - } - - if (pTimes == NULL) { - pTimes = alloca(sizeof(struct _utimbuf)); - time(&pTimes->actime); - time(&pTimes->modtime); - } - - if (pTimes->actime < pTimes->modtime) { - __set_errno(EINVAL); - return -1; - } - - UnixTimeToFileTime(pTimes->actime, &LastAccessTime, 0); - UnixTimeToFileTime(pTimes->modtime, &LastWriteTime, 0); - if (!SetFileTime(_get_osfhandle(nHandle), NULL, &LastAccessTime, &LastWriteTime)) { - __set_errno(EBADF); - return -1; - } - - return 0; -} diff --git a/reactos/lib/crtdll/sys_stat/systime.c b/reactos/lib/crtdll/sys_stat/systime.c deleted file mode 100644 index 0fa73435a99..00000000000 --- a/reactos/lib/crtdll/sys_stat/systime.c +++ /dev/null @@ -1,70 +0,0 @@ -#include "precomp.h" -#include - - -int month[12] = { 31,28,31,30,31,30,31,31,30,31,30,31}; - -/* - * @unimplemented - */ -unsigned int _getsystime(struct tm* tp) -{ - SYSTEMTIME Time; - int i; - - GetLocalTime(&Time); - - tp->tm_year = Time.wYear - 1900; - tp->tm_mon = Time.wMonth - 1; - tp->tm_wday = Time.wDayOfWeek; - tp->tm_mday = Time.wDay; - tp->tm_hour = Time.wHour; - tp->tm_min = Time.wMinute; - tp->tm_sec = Time.wSecond; - - tp->tm_isdst = -1; - - //FIXME GetTimeZoneInformation currently not in kernel32 - - //TimeZoneId = GetTimeZoneInformation(&TimeZoneInformation ); - //if ( TimeZoneId == TIME_ZONE_ID_DAYLIGHT ) { - // tp->tm_isdst = 1; - //} - //else - // tp->tm_isdst = 0; - - if (tp->tm_year % 4 == 0) { - if (tp->tm_year % 100 != 0) - tp->tm_yday = 1; - else if ((tp->tm_year-100) % 1000 == 0) - tp->tm_yday = 1; - } - - for (i = 0; i <= tp->tm_mon; i++) - tp->tm_yday += month[i]; - - return Time.wMilliseconds; -} - - -/* - * @implemented - */ -unsigned int _setsystime(struct tm* tp, unsigned int ms) -{ - SYSTEMTIME Time; - - Time.wYear = tp->tm_year + 1900; - Time.wMonth = tp->tm_mon + 1; - Time.wDayOfWeek = tp->tm_wday; - Time.wDay = tp->tm_mday; - Time.wHour = tp->tm_hour; - Time.wMinute = tp->tm_min; - Time.wSecond = tp->tm_sec; - Time.wMilliseconds = ms; - - if (!SetLocalTime(&Time)) - return -1; - - return 0; -} diff --git a/reactos/lib/crtdll/time/clock.c b/reactos/lib/crtdll/time/clock.c deleted file mode 100644 index 4ad606c8ffc..00000000000 --- a/reactos/lib/crtdll/time/clock.c +++ /dev/null @@ -1,32 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/crtdll/time/clock.c - * PURPOSE: Get elapsed time - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 28/12/98: Created - */ - -#include "precomp.h" -#include -#include - -VOID STDCALL GetSystemTimeAsFileTime(LPFILETIME lpSystemTimeAsFileTime ); - -/* - * @implemented - */ -clock_t clock ( void ) -{ - FILETIME CreationTime; - FILETIME ExitTime; - FILETIME KernelTime; - FILETIME UserTime; - DWORD Remainder; - - if (!GetProcessTimes(GetCurrentProcess(),&CreationTime,&ExitTime,&KernelTime,&UserTime)) - return -1; - - return FileTimeToUnixTime(&KernelTime,&Remainder) + FileTimeToUnixTime(&UserTime,&Remainder); -} diff --git a/reactos/lib/crtdll/time/difftime.c b/reactos/lib/crtdll/time/difftime.c deleted file mode 100644 index 9e9d590a2cb..00000000000 --- a/reactos/lib/crtdll/time/difftime.c +++ /dev/null @@ -1,11 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include - -/* - * @implemented - */ -double -difftime(time_t time1, time_t time0) -{ - return time1-time0; -} diff --git a/reactos/lib/crtdll/time/posixrul.h b/reactos/lib/crtdll/time/posixrul.h deleted file mode 100644 index 48c5ceeab0d..00000000000 --- a/reactos/lib/crtdll/time/posixrul.h +++ /dev/null @@ -1,49 +0,0 @@ -/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ -/* generated with bin2h from DJGPP/zoneinfo/posixrules */ - -unsigned char _posixrules_data[] = { -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0, -0,1,16,0,0,0,2,0,0,0,8,0,151,254,240,1,135,225,224,2,119,224,240,3,112,254,96,4,96,253,112,5,80, -224,96,6,64,223,112,7,48,194,96,7,141,25,112,9,16,164,96,9,173,148,240,10,240,134,96,11,224,133,112,12,217,162, -224,13,192,103,112,14,185,132,224,15,169,131,240,16,153,102,224,17,137,101,240,18,121,72,224,19,105,71,240,20,89,42,224, -21,73,41,240,22,57,12,224,23,41,11,240,24,34,41,96,25,8,237,240,26,2,11,96,26,242,10,112,27,225,237,96,28, -209,236,112,29,193,207,96,30,177,206,112,31,161,177,96,32,118,0,240,33,129,147,96,34,85,226,240,35,106,175,224,36,53, -196,240,37,74,145,224,38,21,166,240,39,42,115,224,39,254,195,112,41,10,85,224,41,222,165,112,42,234,55,224,43,190,135, -112,44,211,84,96,45,158,105,112,46,179,54,96,47,126,75,112,48,147,24,96,49,103,103,240,50,114,250,96,51,71,73,240, -52,82,220,96,53,39,43,240,54,50,190,96,55,7,13,240,56,27,218,224,56,230,239,240,57,251,188,224,58,198,209,240,59, -219,158,224,60,175,238,112,61,187,128,224,62,143,208,112,63,155,98,224,64,111,178,112,65,132,127,96,66,79,148,112,67,100, -97,96,68,47,118,112,69,68,67,96,70,15,88,112,71,36,37,96,71,248,116,240,73,4,7,96,73,216,86,240,74,227,233, -96,75,184,56,240,76,205,5,224,77,152,26,240,78,172,231,224,79,119,252,240,80,140,201,224,81,97,25,112,82,108,171,224, -83,64,251,112,84,76,141,224,85,32,221,112,86,44,111,224,87,0,191,112,88,21,140,96,88,224,161,112,89,245,110,96,90, -192,131,112,91,213,80,96,92,169,159,240,93,181,50,96,94,137,129,240,95,149,20,96,96,105,99,240,97,126,48,224,98,73, -69,240,99,94,18,224,100,41,39,240,101,61,244,224,102,18,68,112,103,29,214,224,103,242,38,112,104,253,184,224,105,210,8, -112,106,221,154,224,107,177,234,112,108,198,183,96,109,145,204,112,110,166,153,96,111,113,174,112,112,134,123,96,113,90,202,240, -114,102,93,96,115,58,172,240,116,70,63,96,117,26,142,240,118,47,91,224,118,250,112,240,120,15,61,224,120,218,82,240,121, -239,31,224,122,186,52,240,123,207,1,224,124,163,81,112,125,174,227,224,126,131,51,112,127,142,197,224,128,99,21,112,129,119, -226,96,130,66,247,112,131,87,196,96,132,34,217,112,133,55,166,96,134,11,245,240,135,23,136,96,135,235,215,240,136,247,106, -96,137,203,185,240,138,215,76,96,139,171,155,240,140,192,104,224,141,139,125,240,142,160,74,224,143,107,95,240,144,128,44,224, -145,84,124,112,146,96,14,224,147,52,94,112,148,63,240,224,149,20,64,112,150,41,13,96,150,244,34,112,152,8,239,96,152, -212,4,112,153,232,209,96,154,189,32,240,155,200,179,96,156,157,2,240,157,168,149,96,158,124,228,240,159,136,119,96,160,92, -198,240,161,113,147,224,162,60,168,240,163,81,117,224,164,28,138,240,165,49,87,224,166,5,167,112,167,17,57,224,167,229,137, -112,168,241,27,224,169,197,107,112,170,218,56,96,171,165,77,112,172,186,26,96,173,133,47,112,174,153,252,96,175,101,17,112, -176,121,222,96,177,78,45,240,178,89,192,96,179,46,15,240,180,57,162,96,181,13,241,240,182,34,190,224,182,237,211,240,184, -2,160,224,184,205,181,240,185,226,130,224,186,182,210,112,187,194,100,224,188,150,180,112,189,162,70,224,190,118,150,112,191,130, -40,224,192,86,120,112,193,107,69,96,194,54,90,112,195,75,39,96,196,22,60,112,197,43,9,96,197,255,88,240,199,10,235, -96,199,223,58,240,200,234,205,96,201,191,28,240,202,211,233,224,203,158,254,240,204,179,203,224,205,126,224,240,206,147,173,224, -207,103,253,112,208,115,143,224,209,71,223,112,210,83,113,224,211,39,193,112,212,51,83,224,213,7,163,112,214,28,112,96,214, -231,133,112,215,252,82,96,216,199,103,112,217,220,52,96,218,176,131,240,219,188,22,96,220,144,101,240,221,155,248,96,222,112, -71,240,223,133,20,224,224,80,41,240,225,100,246,224,226,48,11,240,227,68,216,224,228,15,237,240,229,36,186,224,229,249,10, -112,231,4,156,224,231,216,236,112,232,228,126,224,233,184,206,112,234,205,155,96,235,152,176,112,236,173,125,96,237,120,146,112, -238,141,95,96,239,97,174,240,240,109,65,96,241,65,144,240,242,77,35,96,243,33,114,240,244,45,5,96,245,1,84,240,246, -22,33,224,246,225,54,240,247,246,3,224,248,193,24,240,249,213,229,224,250,160,250,240,251,181,199,224,252,138,23,112,253,149, -169,224,254,105,249,112,255,117,139,224,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0, -1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1, -0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0, -1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1, -0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0, -1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1, -0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0, -1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1, -0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,255,255,199,192,1,0,255,255,185,176,0,4,69,68,84, -0,69,83,84,0,0,0 -}; diff --git a/reactos/lib/crtdll/time/strdate.c b/reactos/lib/crtdll/time/strdate.c deleted file mode 100644 index 17df993483a..00000000000 --- a/reactos/lib/crtdll/time/strdate.c +++ /dev/null @@ -1,33 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/crtdll/time/strtime.c - * PURPOSE: Fills a buffer with a formatted date representation - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 28/12/98: Created - */ -#include -#include -#include -#include - - -/* - * @implemented - */ -char *_strdate( const char *datestr ) -{ - time_t t; - struct tm *d; - char *dt = (char *)datestr; - - if ( datestr == NULL ){ - __set_errno(EINVAL); - return NULL; - } - t = time(NULL); - d = localtime(&t); - sprintf(dt,"%d/%d/%d",d->tm_mday,d->tm_mon+1,d->tm_year); - return dt; -} diff --git a/reactos/lib/crtdll/time/strftime.c b/reactos/lib/crtdll/time/strftime.c deleted file mode 100644 index 0f5c3b61b3c..00000000000 --- a/reactos/lib/crtdll/time/strftime.c +++ /dev/null @@ -1,260 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include -#include -#include -#include - - -#define TM_YEAR_BASE 1900 - -static const char* afmt[] = { - "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", -}; -static const char* Afmt[] = { - "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", - "Saturday", -}; -static const char* bfmt[] = { - "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", - "Oct", "Nov", "Dec", -}; -static const char* Bfmt[] = { - "January", "February", "March", "April", "May", "June", "July", - "August", "September", "October", "November", "December", -}; - -static size_t gsize; -static char* pt; - - -static int _add(const char* str) -{ - for (;; ++pt, --gsize) - { - if (!gsize) - return 0; - if (!(*pt = *str++)) - return 1; - } -} - -static int _conv(int n, int digits, char pad) -{ - static char buf[10]; - char* p; - - for (p = buf + sizeof(buf) - 2; n > 0 && p > buf; n /= 10, --digits) - *p-- = n % 10 + '0'; - while (p > buf && digits-- > 0) - *p-- = pad; - return _add(++p); -} - -static size_t _fmt(const char* format, const struct tm* t) -{ - for (; *format; ++format) - { - if (*format == '%') { - if (*(format+1) == '#') {format++;} - - switch(*++format) { - case '\0': - --format; - break; - case 'A': - if (t->tm_wday < 0 || t->tm_wday > 6) - return 0; - if (!_add(Afmt[t->tm_wday])) - return 0; - continue; - case 'a': - if (t->tm_wday < 0 || t->tm_wday > 6) - return 0; - if (!_add(afmt[t->tm_wday])) - return 0; - continue; - case 'B': - if (t->tm_mon < 0 || t->tm_mon > 11) - return 0; - if (!_add(Bfmt[t->tm_mon])) - return 0; - continue; - case 'b': - case 'h': - if (t->tm_mon < 0 || t->tm_mon > 11) - return 0; - if (!_add(bfmt[t->tm_mon])) - return 0; - continue; - case 'C': - if (!_fmt("%a %b %e %H:%M:%S %Y", t)) - return 0; - continue; - case 'c': - if (!_fmt("%m/%d/%y %H:%M:%S", t)) - return 0; - continue; - case 'e': - if (!_conv(t->tm_mday, 2, ' ')) - return 0; - continue; - case 'D': - if (!_fmt("%m/%d/%y", t)) - return 0; - continue; - case 'd': - if (!_conv(t->tm_mday, 2, '0')) - return 0; - continue; - case 'H': - if (!_conv(t->tm_hour, 2, '0')) - return 0; - continue; - case 'I': - if (!_conv(t->tm_hour % 12 ? t->tm_hour % 12 : 12, 2, '0')) - return 0; - continue; - case 'j': - if (!_conv(t->tm_yday + 1, 3, '0')) - return 0; - continue; - case 'k': - if (!_conv(t->tm_hour, 2, ' ')) - return 0; - continue; - case 'l': - if (!_conv(t->tm_hour % 12 ? t->tm_hour % 12 : 12, 2, ' ')) - return 0; - continue; - case 'M': - if (!_conv(t->tm_min, 2, '0')) - return 0; - continue; - case 'm': - if (!_conv(t->tm_mon + 1, 2, '0')) - return 0; - continue; - case 'n': - if (!_add("\n")) - return 0; - continue; - case 'p': - if (!_add(t->tm_hour >= 12 ? "PM" : "AM")) - return 0; - continue; - case 'R': - if (!_fmt("%H:%M", t)) - return 0; - continue; - case 'r': - if (!_fmt("%I:%M:%S %p", t)) - return 0; - continue; - case 'S': - if (!_conv(t->tm_sec, 2, '0')) - return 0; - continue; - case 'T': - case 'X': - if (!_fmt("%H:%M:%S", t)) - return 0; - continue; - case 't': - if (!_add("\t")) - return 0; - continue; - case 'U': - if (!_conv((t->tm_yday + 7 - t->tm_wday) / 7, 2, '0')) - return 0; - continue; - case 'W': - if (!_conv((t->tm_yday + 7 - (t->tm_wday ? (t->tm_wday - 1) : 6)) / 7, 2, '0')) - return 0; - continue; - case 'w': - if (!_conv(t->tm_wday, 1, '0')) - return 0; - continue; - case 'x': - if (!_fmt("%m/%d/%y", t)) - return 0; - continue; - case 'y': - if (!_conv((t->tm_year + TM_YEAR_BASE) % 100, 2, '0')) - return 0; - continue; - case 'Y': - if (!_conv(t->tm_year + TM_YEAR_BASE, 4, '0')) - return 0; - continue; - case 'Z': - if (!t->tm_zone || !_add(t->tm_zone)) - return 0; - continue; - case '%': - /* - * X311J/88-090 (4.12.3.5): if conversion char is - * undefined, behavior is undefined. Print out the - * character itself as printf(3) does. - */ - default: - break; - } - } - if (!gsize--) - return 0; - *pt++ = *format; - } - return gsize; -} - -/* - * @implemented - */ -size_t -strftime(char *s, size_t maxsize, const char *format, const struct tm *t) -{ - pt = s; - if ((gsize = maxsize) < 1) - return 0; - if (_fmt(format, t)) - { - *pt = '\0'; - return maxsize - gsize; - } - return 0; -} - -/* - * @implemented - */ -size_t wcsftime(wchar_t* s, size_t maxsize, const wchar_t* format, const struct tm* t) -{ - char* x; - char* f; - int i,j; - x = malloc(maxsize); - j = wcslen(format); - f = malloc(j+1); - for (i = 0; i < j; i++) - f[i] = (char)*format; - f[i] = 0; - pt = x; - if ((gsize = maxsize) < 1) - return 0; - if (_fmt(f, t)) { - *pt = '\0'; - free(f); - for (i = 0; i < maxsize;i ++) - s[i] = (wchar_t)x[i]; - s[i] = 0; - free(x); - return maxsize - gsize; - } - for (i = 0; i < maxsize; i++) - s[i] = (wchar_t)x[i]; - s[i] = 0; - free(f); - free(x); - return 0; -} diff --git a/reactos/lib/crtdll/time/strtime.c b/reactos/lib/crtdll/time/strtime.c deleted file mode 100644 index a6a26230a1e..00000000000 --- a/reactos/lib/crtdll/time/strtime.c +++ /dev/null @@ -1,33 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/crtdll/time/strtime.c - * PURPOSE: Fills a buffer with a formatted time representation - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 28/12/98: Created - */ -#include -#include -#include -#include - - -/* - * @implemented - */ -char *_strtime(char* buf) -{ - time_t t; - struct tm *d; - char *dt = (char *)buf; - - if ( buf == NULL ) { - __set_errno(EINVAL); - return NULL; - } - t = time(NULL); - d = localtime(&t); - sprintf(dt,"%d:%d:%d",d->tm_hour,d->tm_min,d->tm_sec); - return dt; -} diff --git a/reactos/lib/crtdll/time/time.c b/reactos/lib/crtdll/time/time.c deleted file mode 100644 index 905083e503a..00000000000 --- a/reactos/lib/crtdll/time/time.c +++ /dev/null @@ -1,226 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/crtdll/time/time.c - * PURPOSE: Get system time - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 28/12/98: Created - */ - -/* - * DOS file system functions - * - * Copyright 1993 Erik Bos - * Copyright 1996 Alexandre Julliard - */ - -#include "precomp.h" -#include -#include - - -VOID STDCALL GetSystemTimeAsFileTime(LPFILETIME lpSystemTimeAsFileTime ); - -/* - * @implemented - */ -time_t time(time_t* t) -{ - FILETIME SystemTime; - DWORD Remainder; - time_t tt; - GetSystemTimeAsFileTime(&SystemTime); - tt = FileTimeToUnixTime( &SystemTime,&Remainder ); - if (t) - *t = tt; - return tt; -} - -/*********************************************************************** - * DOSFS_UnixTimeToFileTime - * - * Convert a Unix time to FILETIME format. - * The FILETIME structure is a 64-bit value representing the number of - * 100-nanosecond intervals since January 1, 1601, 0:00. - * 'remainder' is the nonnegative number of 100-ns intervals - * corresponding to the time fraction smaller than 1 second that - * couldn't be stored in the time_t value. - */ -void UnixTimeToFileTime( time_t unix_time, FILETIME *filetime, - DWORD remainder ) -{ - /* NOTES: - - CONSTANTS: - The time difference between 1 January 1601, 00:00:00 and - 1 January 1970, 00:00:00 is 369 years, plus the leap years - from 1604 to 1968, excluding 1700, 1800, 1900. - This makes (1968 - 1600) / 4 - 3 = 89 leap days, and a total - of 134774 days. - - Any day in that period had 24 * 60 * 60 = 86400 seconds. - - The time difference is 134774 * 86400 * 10000000, which can be written - 116444736000000000 - 27111902 * 2^32 + 3577643008 - 413 * 2^48 + 45534 * 2^32 + 54590 * 2^16 + 32768 - - If you find that these constants are buggy, please change them in all - instances in both conversion functions. - - VERSIONS: - There are two versions, one of them uses long long variables and - is presumably faster but not ISO C. The other one uses standard C - data types and operations but relies on the assumption that negative - numbers are stored as 2's complement (-1 is 0xffff....). If this - assumption is violated, dates before 1970 will not convert correctly. - This should however work on any reasonable architecture where WINE - will run. - - DETAILS: - - Take care not to remove the casts. I have tested these functions - (in both versions) for a lot of numbers. I would be interested in - results on other compilers than GCC. - - The operations have been designed to account for the possibility - of 64-bit time_t in future UNICES. Even the versions without - internal long long numbers will work if time_t only is 64 bit. - A 32-bit shift, which was necessary for that operation, turned out - not to work correctly in GCC, besides giving the warning. So I - used a double 16-bit shift instead. Numbers are in the ISO version - represented by three limbs, the most significant with 32 bit, the - other two with 16 bit each. - - As the modulo-operator % is not well-defined for negative numbers, - negative divisors have been avoided in DOSFS_FileTimeToUnixTime. - - There might be quicker ways to do this in C. Certainly so in - assembler. - - Claus Fischer, fischer@iue.tuwien.ac.at - */ - - - - - unsigned long a0; /* 16 bit, low bits */ - unsigned long a1; /* 16 bit, medium bits */ - unsigned long a2; /* 32 bit, high bits */ - - /* Copy the unix time to a2/a1/a0 */ - a0 = unix_time & 0xffff; - a1 = (unix_time >> 16) & 0xffff; - /* This is obsolete if unix_time is only 32 bits, but it does not hurt. - Do not replace this by >> 32, it gives a compiler warning and it does - not work. */ - a2 = (unix_time >= 0 ? (unix_time >> 16) >> 16 : - ~((~unix_time >> 16) >> 16)); - - /* Multiply a by 10000000 (a = a2/a1/a0) - Split the factor into 10000 * 1000 which are both less than 0xffff. */ - a0 *= 10000; - a1 = a1 * 10000 + (a0 >> 16); - a2 = a2 * 10000 + (a1 >> 16); - a0 &= 0xffff; - a1 &= 0xffff; - - a0 *= 1000; - a1 = a1 * 1000 + (a0 >> 16); - a2 = a2 * 1000 + (a1 >> 16); - a0 &= 0xffff; - a1 &= 0xffff; - - /* Add the time difference and the remainder */ - a0 += 32768 + (remainder & 0xffff); - a1 += 54590 + (remainder >> 16 ) + (a0 >> 16); - a2 += 27111902 + (a1 >> 16); - a0 &= 0xffff; - a1 &= 0xffff; - - /* Set filetime */ - filetime->dwLowDateTime = (a1 << 16) + a0; - filetime->dwHighDateTime = a2; -} - - -/*********************************************************************** - * DOSFS_FileTimeToUnixTime - * - * Convert a FILETIME format to Unix time. - * If not NULL, 'remainder' contains the fractional part of the filetime, - * in the range of [0..9999999] (even if time_t is negative). - */ -time_t FileTimeToUnixTime( const FILETIME *filetime, DWORD *remainder ) -{ - /* Read the comment in the function DOSFS_UnixTimeToFileTime. */ - - unsigned long a0; /* 16 bit, low bits */ - unsigned long a1; /* 16 bit, medium bits */ - unsigned long a2; /* 32 bit, high bits */ - unsigned long r; /* remainder of division */ - unsigned int carry; /* carry bit for subtraction */ - int negative; /* whether a represents a negative value */ - - /* Copy the time values to a2/a1/a0 */ - a2 = (unsigned long)filetime->dwHighDateTime; - a1 = ((unsigned long)filetime->dwLowDateTime ) >> 16; - a0 = ((unsigned long)filetime->dwLowDateTime ) & 0xffff; - - /* Subtract the time difference */ - if (a0 >= 32768 ) a0 -= 32768 , carry = 0; - else a0 += (1 << 16) - 32768 , carry = 1; - - if (a1 >= 54590 + carry) a1 -= 54590 + carry, carry = 0; - else a1 += (1 << 16) - 54590 - carry, carry = 1; - - a2 -= 27111902 + carry; - - /* If a is negative, replace a by (-1-a) */ - negative = (a2 >= ((unsigned long)1) << 31); - if (negative) - { - /* Set a to -a - 1 (a is a2/a1/a0) */ - a0 = 0xffff - a0; - a1 = 0xffff - a1; - a2 = ~a2; - } - - /* Divide a by 10000000 (a = a2/a1/a0), put the rest into r. - Split the divisor into 10000 * 1000 which are both less than 0xffff. */ - a1 += (a2 % 10000) << 16; - a2 /= 10000; - a0 += (a1 % 10000) << 16; - a1 /= 10000; - r = a0 % 10000; - a0 /= 10000; - - a1 += (a2 % 1000) << 16; - a2 /= 1000; - a0 += (a1 % 1000) << 16; - a1 /= 1000; - r += (a0 % 1000) * 10000; - a0 /= 1000; - - /* If a was negative, replace a by (-1-a) and r by (9999999 - r) */ - if (negative) - { - /* Set a to -a - 1 (a is a2/a1/a0) */ - a0 = 0xffff - a0; - a1 = 0xffff - a1; - a2 = ~a2; - - r = 9999999 - r; - } - - if (remainder) *remainder = r; - - /* Do not replace this by << 32, it gives a compiler warning and it does - not work. */ - return ((((time_t)a2) << 16) << 16) + (a1 << 16) + a0; - -} - - - diff --git a/reactos/lib/crtdll/time/tz_vars.c b/reactos/lib/crtdll/time/tz_vars.c deleted file mode 100644 index 3ccf17709b5..00000000000 --- a/reactos/lib/crtdll/time/tz_vars.c +++ /dev/null @@ -1,21 +0,0 @@ -#include -#include -#include - - -int _daylight_dll; -int _timezone_dll; - - -void _set_daylight_export(int value) -{ - _daylight_dll = value; -} - -void _set_timezone_export(int value) -{ - _timezone_dll = value; -} - - - diff --git a/reactos/lib/crtdll/time/tzfile.h b/reactos/lib/crtdll/time/tzfile.h deleted file mode 100644 index 3999029adb9..00000000000 --- a/reactos/lib/crtdll/time/tzfile.h +++ /dev/null @@ -1,160 +0,0 @@ -/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ -#ifndef __dj_include_tzfile_h__ -#define __dj_include_tzfile_h__ - -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef __dj_ENFORCE_ANSI_FREESTANDING - -#ifndef __STRICT_ANSI__ - -#ifndef _POSIX_SOURCE - -/* - * Copyright (c) 1988 Regents of the University of California. - * All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * Arthur David Olson of the National Cancer Institute. - * - * Redistribution and use in source and binary forms are permitted provided - * that: (1) source distributions retain this entire copyright notice and - * comment, and (2) distributions including binaries display the following - * acknowledgement: ``This product includes software developed by the - * University of California, Berkeley and its contributors'' in the - * documentation or other materials provided with the distribution and in - * all advertising materials mentioning features or use of this software. - * Neither the name of the University nor the names of its contributors may - * be used to endorse or promote products derived from this software without - * specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * @(#)tzfile.h 5.9 (Berkeley) 6/11/90 - */ - -/* -** Information about time zone files. -*/ - - /* Time zone object file directory */ -#define TZDIR "/usr/share/zoneinfo" -#define TZDEFAULT "/etc/localtime" -#define TZDEFRULES "posixrules" - -/* -** Each file begins with. . . -*/ - -struct tzhead { - char tzh_reserved[24]; /* reserved for future use */ - char tzh_ttisstdcnt[4]; /* coded number of trans. time flags */ - char tzh_leapcnt[4]; /* coded number of leap seconds */ - char tzh_timecnt[4]; /* coded number of transition times */ - char tzh_typecnt[4]; /* coded number of local time types */ - char tzh_charcnt[4]; /* coded number of abbr. chars */ -}; - -/* -** . . .followed by. . . -** -** tzh_timecnt (char [4])s coded transition times a la time(2) -** tzh_timecnt (unsigned char)s types of local time starting at above -** tzh_typecnt repetitions of -** one (char [4]) coded GMT offset in seconds -** one (unsigned char) used to set tm_isdst -** one (unsigned char) that's an abbreviation list index -** tzh_charcnt (char)s '\0'-terminated zone abbreviations -** tzh_leapcnt repetitions of -** one (char [4]) coded leap second transition times -** one (char [4]) total correction after above -** tzh_ttisstdcnt (char)s indexed by type; if TRUE, transition -** time is standard time, if FALSE, -** transition time is wall clock time -** if absent, transition times are -** assumed to be wall clock time -*/ - -/* -** In the current implementation, "tzset()" refuses to deal with files that -** exceed any of the limits below. -*/ - -/* -** The TZ_MAX_TIMES value below is enough to handle a bit more than a -** year's worth of solar time (corrected daily to the nearest second) or -** 138 years of Pacific Presidential Election time -** (where there are three time zone transitions every fourth year). -*/ -#define TZ_MAX_TIMES 370 - -#define NOSOLAR /* 4BSD doesn't currently handle solar time */ - -#ifndef NOSOLAR -#define TZ_MAX_TYPES 256 /* Limited by what (unsigned char)'s can hold */ -#else -#define TZ_MAX_TYPES 10 /* Maximum number of local time types */ -#endif - -#define TZ_MAX_CHARS 50 /* Maximum number of abbreviation characters */ - -#define TZ_MAX_LEAPS 50 /* Maximum number of leap second corrections */ - -#define SECSPERMIN 60 -#define MINSPERHOUR 60 -#define HOURSPERDAY 24 -#define DAYSPERWEEK 7 -#define DAYSPERNYEAR 365 -#define DAYSPERLYEAR 366 -#define SECSPERHOUR (SECSPERMIN * MINSPERHOUR) -#define SECSPERDAY ((long) SECSPERHOUR * HOURSPERDAY) -#define MONSPERYEAR 12 - -#define TM_SUNDAY 0 -#define TM_MONDAY 1 -#define TM_TUESDAY 2 -#define TM_WEDNESDAY 3 -#define TM_THURSDAY 4 -#define TM_FRIDAY 5 -#define TM_SATURDAY 6 - -#define TM_JANUARY 0 -#define TM_FEBRUARY 1 -#define TM_MARCH 2 -#define TM_APRIL 3 -#define TM_MAY 4 -#define TM_JUNE 5 -#define TM_JULY 6 -#define TM_AUGUST 7 -#define TM_SEPTEMBER 8 -#define TM_OCTOBER 9 -#define TM_NOVEMBER 10 -#define TM_DECEMBER 11 - -#define TM_YEAR_BASE 1900 - -#define EPOCH_YEAR 1970 -#define EPOCH_WDAY TM_THURSDAY - -/* -** Accurate only for the past couple of centuries; -** that will probably do. -*/ - -#define isleap(y) ((((y) % 4) == 0 && ((y) % 100) != 0) || ((y) % 400) == 0) - -#endif /* !_POSIX_SOURCE */ -#endif /* !__STRICT_ANSI__ */ -#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ - -#ifndef __dj_ENFORCE_FUNCTION_CALLS -#endif /* !__dj_ENFORCE_FUNCTION_CALLS */ - -#ifdef __cplusplus -} -#endif - -#endif /* __dj_include_tzfile_h__ */ diff --git a/reactos/lib/crtdll/wchar/wcscoll.c b/reactos/lib/crtdll/wchar/wcscoll.c deleted file mode 100644 index f79ed9da607..00000000000 --- a/reactos/lib/crtdll/wchar/wcscoll.c +++ /dev/null @@ -1,22 +0,0 @@ - -#include - -/* - * @unimplemented - */ -int wcscoll(const wchar_t *a1,const wchar_t *a2) -{ - /* FIXME: handle collates */ - return wcscmp(a1,a2); -} - - -/* - * @unimplemented - */ -int _wcsicoll(const wchar_t *a1,const wchar_t *a2) -{ - /* FIXME: handle collates */ - return _wcsicmp(a1,a2); -} - From 9535cafaaf474a8aa5aa2ec8a146b92662e1b0b7 Mon Sep 17 00:00:00 2001 From: James Tabor Date: Mon, 31 Jan 2005 23:33:34 +0000 Subject: [PATCH 073/185] Remove building of Advpack for now. svn path=/trunk/; revision=13373 --- reactos/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reactos/Makefile b/reactos/Makefile index 295fd800933..76772bc9c98 100644 --- a/reactos/Makefile +++ b/reactos/Makefile @@ -54,8 +54,8 @@ DLLS_CPL = cpl DLLS_SHELLEXT = shellext # User mode libraries -# libpcap packet epsapi -DLLS = acledit aclui advapi32 advpack cabinet cards comctl32 crtdll comdlg32 d3d8thk dbghelp expat fmifs freetype \ +# advpack libpcap packet epsapi +DLLS = acledit aclui advapi32 cabinet cards comctl32 crtdll comdlg32 d3d8thk dbghelp expat fmifs freetype \ gdi32 gdiplus glu32 hid imagehlp imm32 iphlpapi kernel32 lzexpand mesa32 midimap mmdrv mpr msacm msafd \ msgina msi msimg32 msvcrt20 msvideo mswsock netapi32 ntdll ole32 oleaut32 oledlg olepro32 opengl32 \ packet psapi riched20 richedit rpcrt4 samlib secur32 setupapi shell32 shlwapi snmpapi syssetup twain \ From ff4e3250a0c6d3766d43863d5ccd76a40e18a38c Mon Sep 17 00:00:00 2001 From: Steven Edwards Date: Mon, 31 Jan 2005 23:58:10 +0000 Subject: [PATCH 074/185] forward stubs for Escape and GetSystemPaletteUse. Working on a real patch. svn path=/trunk/; revision=13374 --- reactos/lib/gdi32/misc/stubs.c | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/reactos/lib/gdi32/misc/stubs.c b/reactos/lib/gdi32/misc/stubs.c index aa0114d7d40..9689b8592d2 100644 --- a/reactos/lib/gdi32/misc/stubs.c +++ b/reactos/lib/gdi32/misc/stubs.c @@ -150,26 +150,16 @@ EnumObjects( return 0; } - /* * @unimplemented */ int STDCALL -Escape( - HDC a0, - int a1, - int a2, - LPCSTR a3, - LPVOID a4 - ) +Escape(HDC hdc, INT escape, INT in_count, LPCSTR in_data, LPVOID out_data) { - UNIMPLEMENTED; - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - return 0; + return NtGdiEscape(hdc,escape,in_count,in_data,out_data); } - /* * @unimplemented */ @@ -273,13 +263,9 @@ GetRasterizerCaps( */ UINT STDCALL -GetSystemPaletteUse( - HDC hDc - ) +GetSystemPaletteUse(HDC hDc) { - UNIMPLEMENTED; - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - return 0; + return NtGdiGetSystemPaletteUse(hDc); } From 736ae5e36b44d8867413887f1906355189bd05f9 Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Tue, 1 Feb 2005 13:58:33 +0000 Subject: [PATCH 075/185] - Implement SetupDiBuildClassInfoListExA, SetupDiClassGuidsFromNameExA, SetupDiCreateDeviceInfoListExA and SetupDiOpenClassRegKeyExA using MultiByteToUnicode. - Retrieve OS version upon process attach. svn path=/trunk/; revision=13375 --- reactos/lib/setupapi/devinst.c | 121 +++++++++++++++++++----- reactos/lib/setupapi/setupapi_private.h | 2 + reactos/lib/setupapi/setupcab.c | 5 + 3 files changed, 105 insertions(+), 23 deletions(-) diff --git a/reactos/lib/setupapi/devinst.c b/reactos/lib/setupapi/devinst.c index da423c9d504..645dbb92574 100644 --- a/reactos/lib/setupapi/devinst.c +++ b/reactos/lib/setupapi/devinst.c @@ -20,7 +20,7 @@ #include "config.h" #include "wine/port.h" - + #include #include "windef.h" @@ -38,6 +38,8 @@ #include "rpc.h" #include "rpcdce.h" +#include "setupapi_private.h" + WINE_DEFAULT_DEBUG_CHANNEL(setupapi); @@ -90,8 +92,26 @@ BOOL WINAPI SetupDiBuildClassInfoListExA( LPCSTR MachineName, PVOID Reserved) { - FIXME("\n"); - return FALSE; + LPWSTR MachineNameW = NULL; + BOOL bResult; + + TRACE("\n"); + + if (MachineName) + { + MachineNameW = MultiByteToUnicode(MachineName, CP_ACP); + if (MachineNameW == NULL) + return FALSE; + } + + bResult = SetupDiBuildClassInfoListExW(Flags, ClassGuidList, + ClassGuidListSize, RequiredSize, + MachineNameW, Reserved); + + if (MachineNameW) + MyFree(MachineNameW); + + return bResult; } /*********************************************************************** @@ -237,9 +257,9 @@ BOOL WINAPI SetupDiClassGuidsFromNameA( DWORD ClassGuidListSize, PDWORD RequiredSize) { - return SetupDiClassGuidsFromNameExA(ClassName, ClassGuidList, - ClassGuidListSize, RequiredSize, - NULL, NULL); + return SetupDiClassGuidsFromNameExA(ClassName, ClassGuidList, + ClassGuidListSize, RequiredSize, + NULL, NULL); } /*********************************************************************** @@ -251,9 +271,9 @@ BOOL WINAPI SetupDiClassGuidsFromNameW( DWORD ClassGuidListSize, PDWORD RequiredSize) { - return SetupDiClassGuidsFromNameExW(ClassName, ClassGuidList, - ClassGuidListSize, RequiredSize, - NULL, NULL); + return SetupDiClassGuidsFromNameExW(ClassName, ClassGuidList, + ClassGuidListSize, RequiredSize, + NULL, NULL); } /*********************************************************************** @@ -267,8 +287,36 @@ BOOL WINAPI SetupDiClassGuidsFromNameExA( LPCSTR MachineName, PVOID Reserved) { - FIXME("\n"); - return FALSE; + LPWSTR ClassNameW = NULL; + LPWSTR MachineNameW = NULL; + BOOL bResult; + + FIXME("\n"); + + ClassNameW = MultiByteToUnicode(ClassName, CP_ACP); + if (ClassNameW == NULL) + return FALSE; + + if (MachineNameW) + { + MachineNameW = MultiByteToUnicode(MachineName, CP_ACP); + if (MachineNameW == NULL) + { + MyFree(ClassNameW); + return FALSE; + } + } + + bResult = SetupDiClassGuidsFromNameExW(ClassNameW, ClassGuidList, + ClassGuidListSize, RequiredSize, + MachineNameW, Reserved); + + if (MachineNameW) + MyFree(MachineNameW); + + MyFree(ClassNameW); + + return bResult; } /*********************************************************************** @@ -502,8 +550,25 @@ SetupDiCreateDeviceInfoListExA(const GUID *ClassGuid, PCSTR MachineName, PVOID Reserved) { - FIXME("\n"); - return (HDEVINFO)INVALID_HANDLE_VALUE; + LPWSTR MachineNameW = NULL; + HDEVINFO hDevInfo; + + TRACE("\n"); + + if (MachineName) + { + MachineNameW = MultiByteToUnicode(MachineName, CP_ACP); + if (MachineNameW == NULL) + return (HDEVINFO)INVALID_HANDLE_VALUE; + } + + hDevInfo = SetupDiCreateDeviceInfoListExW(ClassGuid, hwndParent, + MachineNameW, Reserved); + + if (MachineNameW) + MyFree(MachineNameW); + + return hDevInfo; } /*********************************************************************** @@ -587,17 +652,10 @@ BOOL WINAPI SetupDiGetActualSectionToInstallW( PWSTR *Extension) { WCHAR szBuffer[MAX_PATH]; - OSVERSIONINFOW OsVersionInfo; DWORD dwLength; DWORD dwFullLength; LONG lLineCount = -1; - OsVersionInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFOW); - if (!GetVersionExW(&OsVersionInfo)) - { - return FALSE; - } - lstrcpyW(szBuffer, InfSectionName); dwLength = lstrlenW(szBuffer); @@ -1048,8 +1106,25 @@ HKEY WINAPI SetupDiOpenClassRegKeyExA( PCSTR MachineName, PVOID Reserved) { - FIXME("\n"); - return INVALID_HANDLE_VALUE; + PWSTR MachineNameW = NULL; + HKEY hKey; + + TRACE("\n"); + + if (MachineName) + { + MachineNameW = MultiByteToUnicode(MachineName, CP_ACP); + if (MachineNameW == NULL) + return INVALID_HANDLE_VALUE; + } + + hKey = SetupDiOpenClassRegKeyExW(ClassGuid, samDesired, + Flags, MachineNameW, Reserved); + + if (MachineNameW) + MyFree(MachineNameW); + + return hKey; } @@ -1125,7 +1200,7 @@ HKEY WINAPI SetupDiOpenClassRegKeyExW( } /*********************************************************************** - * SetupDiOpenDeviceInterfaceA (SETUPAPI.@) + * SetupDiOpenDeviceInterfaceW (SETUPAPI.@) */ BOOL WINAPI SetupDiOpenDeviceInterfaceW( HDEVINFO DeviceInfoSet, diff --git a/reactos/lib/setupapi/setupapi_private.h b/reactos/lib/setupapi/setupapi_private.h index 7cd40e4f146..80d1f5559c2 100644 --- a/reactos/lib/setupapi/setupapi_private.h +++ b/reactos/lib/setupapi/setupapi_private.h @@ -54,4 +54,6 @@ UINT CALLBACK QUEUE_callback_WtoA( void *context, UINT notification, UINT_PTR, U #define _S_IWRITE 0x0080 #define _S_IREAD 0x0100 +extern OSVERSIONINFOW OsVersionInfo; + #endif /* __SETUPAPI_PRIVATE_H */ diff --git a/reactos/lib/setupapi/setupcab.c b/reactos/lib/setupapi/setupcab.c index 84625bfefca..9c1081337a9 100644 --- a/reactos/lib/setupapi/setupcab.c +++ b/reactos/lib/setupapi/setupcab.c @@ -44,6 +44,8 @@ #include "wine/debug.h" +OSVERSIONINFOW OsVersionInfo; + static HINSTANCE CABINET_hInstance = 0; static HFDI (__cdecl *sc_FDICreate)(PFNALLOC, PFNFREE, PFNOPEN, @@ -674,6 +676,9 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) switch (fdwReason) { case DLL_PROCESS_ATTACH: DisableThreadLibraryCalls(hinstDLL); + OsVersionInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFOW); + if (!GetVersionExW(&OsVersionInfo)) + return FALSE; break; case DLL_PROCESS_DETACH: UnloadCABINETDll(); From 7a91135976a10e664c496573c8e75c63d645e651 Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Tue, 1 Feb 2005 16:15:24 +0000 Subject: [PATCH 076/185] Fix typos in shutdown messages. svn path=/trunk/; revision=13376 --- reactos/ntoskrnl/ex/power.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/reactos/ntoskrnl/ex/power.c b/reactos/ntoskrnl/ex/power.c index 6603c8a3c54..0f8ca653781 100644 --- a/reactos/ntoskrnl/ex/power.c +++ b/reactos/ntoskrnl/ex/power.c @@ -154,8 +154,8 @@ NtShutdownSystem(IN SHUTDOWN_ACTION Action) "tell me..., in the future... will I be artificial intelligent enough to actually feel\n" "sad serving you this screen?\n", "Thank you for some well deserved rest.\n", - "It’s been great, maybe we can boot me up again some time soon.\n", - "For what’s it worth, I’ve enjoyed every single CPU cycle.\n", + "It's been great, maybe we can boot me up again some time soon.\n", + "For what's it worth, I've enjoyed every single CPU cycle.\n", "There are many questions when the end is near.\n" "What to expect, what will it be like...what should I look for?\n", "I've seen things you people wouldn't believe. Attack ships on fire\n" @@ -212,6 +212,4 @@ NtShutdownSystem(IN SHUTDOWN_ACTION Action) return STATUS_SUCCESS; } - /* EOF */ - From 0a44e5f7e6b74af607a5af8ef8add77fbc2e9a87 Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Tue, 1 Feb 2005 16:24:10 +0000 Subject: [PATCH 077/185] First attempt at implementing NtGetPlugPlayEvent. svn path=/trunk/; revision=13377 --- reactos/include/ntos/zw.h | 26 ++--- reactos/ntoskrnl/include/internal/io.h | 7 ++ reactos/ntoskrnl/io/plugplay.c | 136 +++++++++++++++++++++---- reactos/ntoskrnl/io/pnpmgr.c | 12 ++- 4 files changed, 145 insertions(+), 36 deletions(-) diff --git a/reactos/include/ntos/zw.h b/reactos/include/ntos/zw.h index 2682b07454d..e76c6019e32 100755 --- a/reactos/include/ntos/zw.h +++ b/reactos/include/ntos/zw.h @@ -2702,7 +2702,7 @@ ZwQueryFullAttributesFile(IN POBJECT_ATTRIBUTES ObjectAttributes, FileNamesInformation FILE_NAMES_INFORMATION FileDispositionInformation FILE_DISPOSITION_INFORMATION FilePositionInformation FILE_POSITION_INFORMATION - FileFullEaInformation FILE_FULL_EA_INFORMATION + FileFullEaInformation FILE_FULL_EA_INFORMATION FileModeInformation FILE_MODE_INFORMATION FileAlignmentInformation FILE_ALIGNMENT_INFORMATION FileAllInformation FILE_ALL_INFORMATION @@ -2715,7 +2715,7 @@ ZwQueryFullAttributesFile(IN POBJECT_ATTRIBUTES ObjectAttributes, FilePipeRemoteInformation FileMailslotQueryInformation FileMailslotSetInformation - FileCompressionInformation FILE_COMPRESSION_INFORMATION + FileCompressionInformation FILE_COMPRESSION_INFORMATION FileCopyOnWriteInformation FileCompletionInformation IO_COMPLETION_CONTEXT FileMoveClusterInformation @@ -2728,7 +2728,7 @@ ZwQueryFullAttributesFile(IN POBJECT_ATTRIBUTES ObjectAttributes, FileContentIndexInformation FileInheritContentIndexInformation FileOleInformation - FileMaximumInformation + FileMaximumInformation * REMARK: * This procedure maps to the win32 GetShortPathName, GetLongPathName, @@ -4933,16 +4933,16 @@ ZwYieldExecution( NTSTATUS STDCALL -NtPlugPlayControl (DWORD Unknown1, - DWORD Unknown2, - DWORD Unknown3); +NtPlugPlayControl(IN ULONG ControlCode, + IN OUT PVOID Buffer, + IN ULONG BufferLength); NTSTATUS STDCALL -NtGetPlugPlayEvent (ULONG Reserved1, - ULONG Reserved2, - PVOID Buffer, - ULONG BufferLength); +NtGetPlugPlayEvent(IN ULONG Reserved1, + IN ULONG Reserved2, + OUT PVOID Buffer, + IN ULONG BufferLength); /* --- POWER MANAGEMENT --- */ @@ -5027,12 +5027,6 @@ NtSetLdtEntries (ULONG Selector1, ULONG Selector2, LDT_ENTRY LdtEntry2); -NTSTATUS -STDCALL -NtQueryOleDirectoryFile ( - VOID - ); - /* * FUNCTION: Checks a clients access rights to a object * ARGUMENTS: diff --git a/reactos/ntoskrnl/include/internal/io.h b/reactos/ntoskrnl/include/internal/io.h index c624f673638..b102b1ac4b1 100644 --- a/reactos/ntoskrnl/include/internal/io.h +++ b/reactos/ntoskrnl/include/internal/io.h @@ -500,6 +500,13 @@ IopMarkLastReinitializeDriver(VOID); VOID FASTCALL IopReinitializeDrivers(VOID); + +/* pnpevent.c */ + +NTSTATUS INIT_FUNCTION +IopInitPlugPlayEvents(VOID); + + /* pnpmgr.c */ NTSTATUS diff --git a/reactos/ntoskrnl/io/plugplay.c b/reactos/ntoskrnl/io/plugplay.c index 56e094aae9a..f9760ce3b20 100644 --- a/reactos/ntoskrnl/io/plugplay.c +++ b/reactos/ntoskrnl/io/plugplay.c @@ -1,9 +1,9 @@ -/* $Id:$ +/* $Id$ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/io/plugplay.c - * PURPOSE: Mysterious nt4 support for plug-and-play + * PURPOSE: Plug-and-play interface routines * * PROGRAMMERS: David Welch (welch@mcmail.com) */ @@ -11,27 +11,129 @@ /* INCLUDES *****************************************************************/ #include + +#define NDEBUG #include + +/* GLOBALS *******************************************************************/ + +static LIST_ENTRY IopPnpEventListHead; +static KEVENT IopPnpNotifyEvent; + + /* FUNCTIONS *****************************************************************/ -NTSTATUS -STDCALL -NtPlugPlayControl (DWORD Unknown1, - DWORD Unknown2, - DWORD Unknown3) +NTSTATUS INIT_FUNCTION +IopInitPlugPlayEvents(VOID) { - UNIMPLEMENTED; - return(STATUS_NOT_IMPLEMENTED); + + InitializeListHead(&IopPnpEventListHead); + + KeInitializeEvent(&IopPnpNotifyEvent, + NotificationEvent, + FALSE); + + return STATUS_SUCCESS; } -NTSTATUS -STDCALL -NtGetPlugPlayEvent (ULONG Reserved1, - ULONG Reserved2, - PVOID Buffer, - ULONG BufferLength) + +#if 0 +/* Insert a new pnp event at the head of the event queue */ +VOID +IopEnqueuePlugPlayEvent(VOID) { - UNIMPLEMENTED; - return(STATUS_NOT_IMPLEMENTED); + } +#endif + + +#if 0 +/* + * Remove the current PnP event from the tail of the event queue + * and signal IopPnpNotifyEvent if there is yet another event in the queue. + */ +VOID +IopDequeuePlugPlayEvent(VOID) +{ + +} +#endif + + +/* + * @unimplemented + */ +NTSTATUS STDCALL +NtGetPlugPlayEvent(IN ULONG Reserved1, + IN ULONG Reserved2, + OUT PVOID Buffer, + IN ULONG BufferLength) +{ + NTSTATUS Status; + + DPRINT("NtGetPlugPlayEvent() called\n"); + + /* Function can only be called from user-mode */ + if (KeGetPreviousMode() != UserMode) + { + DPRINT1("NtGetPlugPlayEvent cannot be called from kernel mode!\n"); + return STATUS_ACCESS_DENIED; + } + + /* Check for Tcb privilege */ + if (!SeSinglePrivilegeCheck(SeTcbPrivilege, + UserMode)) + { + DPRINT1("NtGetPlugPlayEvent: Caller requires the SeTcbPrivilege privilege!\n"); + return STATUS_PRIVILEGE_NOT_HELD; + } + + /* Wait for a PnP event */ + DPRINT("Waiting for pnp notification event\n"); + Status = KeWaitForSingleObject(&IopPnpNotifyEvent, + UserRequest, + KernelMode, + FALSE, + NULL); + if (NT_SUCCESS(Status)) + { + DPRINT("Waiting done\n"); + +#if 0 + /* Get entry from the tail of the list */ + Entry = IopPnpEventListHead.Blink; + + /* Check the buffer size */ + if (BufferLength < Entry->Event.Size) + { + DPRINT1("Buffer is too small for the pnp-event\n"); + return STATUS_BUFFER_TOO_SMALL; + } + + /* Copy event data to user buffer */ + memcpy(Buffer, + &Entry->Event, + &Entry->Event.Size); +#endif + } + + DPRINT("NtGetPlugPlayEvent() done\n"); + + return Status; +} + + +/* + * @unimplemented + */ +NTSTATUS STDCALL +NtPlugPlayControl(IN ULONG ControlCode, + IN OUT PVOID Buffer, + IN ULONG BufferLength) +{ + UNIMPLEMENTED; + return STATUS_NOT_IMPLEMENTED; +} + +/* EOF */ diff --git a/reactos/ntoskrnl/io/pnpmgr.c b/reactos/ntoskrnl/io/pnpmgr.c index b5c03ad2b81..13bb59a6c03 100644 --- a/reactos/ntoskrnl/io/pnpmgr.c +++ b/reactos/ntoskrnl/io/pnpmgr.c @@ -481,7 +481,7 @@ IopGetSystemPowerDeviceObject(PDEVICE_OBJECT *DeviceObject) return STATUS_UNSUCCESSFUL; } -/********************************************************************** +/* * DESCRIPTION * Creates a device node * @@ -1556,7 +1556,6 @@ IopActionInitAllServices( * parent node. This function just calls IopActionInitChildServices with * BootDrivers = TRUE. */ - NTSTATUS IopActionInitBootServices( PDEVICE_NODE DeviceNode, @@ -1581,7 +1580,6 @@ IopActionInitBootServices( * Return Value * Status */ - NTSTATUS IopInitializePnpServices( IN PDEVICE_NODE DeviceNode, @@ -1768,6 +1766,14 @@ PnpInit(VOID) KeInitializeSpinLock(&IopDeviceTreeLock); + /* Initialize PnP-Event notification support */ + Status = IopInitPlugPlayEvents(); + if (!NT_SUCCESS(Status)) + { + CPRINT("IopInitPlugPlayEvents() failed\n"); + KEBUGCHECKEX(PHASE1_INITIALIZATION_FAILED, Status, 0, 0, 0); + } + /* * Create root device node */ From a11189968c60b363ed7c4fdc28539acf2bc34a34 Mon Sep 17 00:00:00 2001 From: Hartmut Birr Date: Tue, 1 Feb 2005 16:35:30 +0000 Subject: [PATCH 078/185] - Removed some wrong calls to MmUnlockAddressSpace. - Dereference the section object after creating the section. svn path=/trunk/; revision=13378 --- reactos/ntoskrnl/ps/process.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/reactos/ntoskrnl/ps/process.c b/reactos/ntoskrnl/ps/process.c index 688f8341b90..a0edaaecfd6 100644 --- a/reactos/ntoskrnl/ps/process.c +++ b/reactos/ntoskrnl/ps/process.c @@ -954,7 +954,6 @@ exitdereferenceobjects: MmUnlockAddressSpace(&Process->AddressSpace); if (!NT_SUCCESS(Status)) { - MmUnlockAddressSpace(&Process->AddressSpace); /* FIXME ? */ DPRINT1("Failed to create shared data page\n"); ObDereferenceObject(Process); goto exitdereferenceobjects; @@ -972,7 +971,6 @@ exitdereferenceobjects: &hProcess); if (!NT_SUCCESS(Status)) { - MmUnlockAddressSpace(&Process->AddressSpace); /* FIXME ? */ DPRINT1("Failed to create a handle for the process\n"); ObDereferenceObject(Process); goto exitdereferenceobjects; @@ -987,7 +985,6 @@ exitdereferenceobjects: if (!NT_SUCCESS(Status)) { DbgPrint("LdrpMapSystemDll failed (Status %x)\n", Status); - MmUnlockAddressSpace(&Process->AddressSpace); /* FIXME ? */ ObDereferenceObject(Process); goto exitdereferenceobjects; } @@ -1009,11 +1006,10 @@ exitdereferenceobjects: 0, MEM_COMMIT, PAGE_READWRITE); - + ObDereferenceObject(SectionObject); if (!NT_SUCCESS(Status)) { DbgPrint("Failed to map the process section (Status %x)\n", Status); - MmUnlockAddressSpace(&Process->AddressSpace); /* FIXME ? */ ObDereferenceObject(Process); goto exitdereferenceobjects; } From abd3d6503562cd01d4b762cc4f6c0c42d2460baa Mon Sep 17 00:00:00 2001 From: James Tabor Date: Tue, 1 Feb 2005 16:38:02 +0000 Subject: [PATCH 079/185] But back Advpack for now. svn path=/trunk/; revision=13379 --- reactos/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reactos/Makefile b/reactos/Makefile index 76772bc9c98..295fd800933 100644 --- a/reactos/Makefile +++ b/reactos/Makefile @@ -54,8 +54,8 @@ DLLS_CPL = cpl DLLS_SHELLEXT = shellext # User mode libraries -# advpack libpcap packet epsapi -DLLS = acledit aclui advapi32 cabinet cards comctl32 crtdll comdlg32 d3d8thk dbghelp expat fmifs freetype \ +# libpcap packet epsapi +DLLS = acledit aclui advapi32 advpack cabinet cards comctl32 crtdll comdlg32 d3d8thk dbghelp expat fmifs freetype \ gdi32 gdiplus glu32 hid imagehlp imm32 iphlpapi kernel32 lzexpand mesa32 midimap mmdrv mpr msacm msafd \ msgina msi msimg32 msvcrt20 msvideo mswsock netapi32 ntdll ole32 oleaut32 oledlg olepro32 opengl32 \ packet psapi riched20 richedit rpcrt4 samlib secur32 setupapi shell32 shlwapi snmpapi syssetup twain \ From abbcb5b10f37efb5aaf8cc3fc412b29bc8258799 Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Tue, 1 Feb 2005 16:40:23 +0000 Subject: [PATCH 080/185] NtDisplayString: Convert Unicode string to OEM. svn path=/trunk/; revision=13380 --- reactos/ntoskrnl/inbv/inbv.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/reactos/ntoskrnl/inbv/inbv.c b/reactos/ntoskrnl/inbv/inbv.c index 2e888968e68..c16db544afb 100755 --- a/reactos/ntoskrnl/inbv/inbv.c +++ b/reactos/ntoskrnl/inbv/inbv.c @@ -59,6 +59,7 @@ InbvCheckBootVid(VOID) return(STATUS_SUCCESS); } + VOID STDCALL InbvAcquireDisplayOwnership(VOID) @@ -81,6 +82,7 @@ InbvDisplayString(IN PCHAR String) return FALSE; } + BOOLEAN STDCALL InbvResetDisplayParameters(ULONG SizeX, ULONG SizeY) @@ -88,6 +90,7 @@ InbvResetDisplayParameters(ULONG SizeX, ULONG SizeY) return(InbvResetDisplay()); } + VOID STDCALL INIT_FUNCTION InbvEnableBootDriver(IN BOOLEAN Enable) @@ -148,6 +151,7 @@ InbvEnableBootDriver(IN BOOLEAN Enable) } } + BOOLEAN STDCALL InbvEnableDisplayString(IN BOOLEAN Enable) @@ -221,13 +225,11 @@ NTSTATUS STDCALL NtDisplayString(IN PUNICODE_STRING DisplayString) { - ANSI_STRING AnsiString; + OEM_STRING OemString; - RtlUnicodeStringToAnsiString (&AnsiString, DisplayString, TRUE); + RtlUnicodeStringToOemString(&OemString, DisplayString, TRUE); + HalDisplayString(OemString.Buffer); + RtlFreeOemString(&OemString); - HalDisplayString (AnsiString.Buffer); - - RtlFreeAnsiString (&AnsiString); - - return(STATUS_SUCCESS); + return STATUS_SUCCESS; } From 786b85342fe088ff2057b3a5352190f37672c0f3 Mon Sep 17 00:00:00 2001 From: James Tabor Date: Tue, 1 Feb 2005 17:40:21 +0000 Subject: [PATCH 081/185] Added Jimtabor to list. svn path=/trunk/; revision=13381 --- rosapps/notevil/notevil.rc | 1 + 1 file changed, 1 insertion(+) diff --git a/rosapps/notevil/notevil.rc b/rosapps/notevil/notevil.rc index 1de1da38197..ddcf6526b07 100644 --- a/rosapps/notevil/notevil.rc +++ b/rosapps/notevil/notevil.rc @@ -69,6 +69,7 @@ BEGIN 41, "Thomas Weidenmueller" 42, "Jonathan Wilson" 43, "Alex Ionescu" + 44, "Jim Tabor" END /* EOF */ From 2eaa151579497135df793dbf80b516f830e03c41 Mon Sep 17 00:00:00 2001 From: Filip Navara Date: Tue, 1 Feb 2005 17:41:49 +0000 Subject: [PATCH 082/185] - Header with declarations for NtPlugPlayControl and NtGetPlugPlayEvent. svn path=/trunk/; revision=13382 --- reactos/include/ntos/ntpnp.h | 250 +++++++++++++++++++++++++++++++++++ 1 file changed, 250 insertions(+) create mode 100644 reactos/include/ntos/ntpnp.h diff --git a/reactos/include/ntos/ntpnp.h b/reactos/include/ntos/ntpnp.h new file mode 100644 index 00000000000..273766322e2 --- /dev/null +++ b/reactos/include/ntos/ntpnp.h @@ -0,0 +1,250 @@ +/* + * ntpnp.h + * + * Plug-and-play interface routines + * + * Contributors: + * Created by Filip Navara + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAIMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + */ + +#ifndef __NTPNP_H +#define __NTPNP_H + +/* + * TODO: + * - Describe the undocumented GUIDs. + * - Finish the description of NtPlugPlayControl. + */ + +/* + * Undocumented GUIDs used by NtGetPlugPlayEvent. + */ + +DEFINE_GUID(GUID_DEVICE_STANDBY_VETOED, 0x03B21C13, 0x11D3, 0x18D6, 0xA0, 0x00, 0xDB, 0x97, 0x2E, 0x52, 0x40, 0xC9); +DEFINE_GUID(GUID_DEVICE_KERNEL_INITIATED_EJECT, 0x14689B54, 0x11D3, 0x0703, 0xA0, 0x00, 0xD2, 0x97, 0x2E, 0x52, 0x40, 0xC9); +DEFINE_GUID(GUID_DEVICE_THERMAL_ZONE, 0x4AFA3D51, 0x11D0, 0x74A7, 0xA0, 0x00, 0x5E, 0xBE, 0x57, 0x28, 0x06, 0xC9); +DEFINE_GUID(GUID_DEVICE_SYS_BUTTON, 0x4AFA3D53, 0x11D0, 0x74A7, 0xA0, 0x00, 0x5E, 0xBE, 0x57, 0x28, 0x06, 0xC9); +DEFINE_GUID(GUID_DEVICE_REMOVAL_VETOED, 0x60DBD5FA, 0x11D2, 0xDDD2, 0xA0, 0x00, 0xB8, 0x97, 0x2E, 0x52, 0x40, 0xC9); +DEFINE_GUID(GUID_DEVICE_HIBERNATE_VETOED, 0x61173AD9, 0x11D3, 0x194F, 0xA0, 0x00, 0xDC, 0x97, 0x2E, 0x52, 0x40, 0xC9); +DEFINE_GUID(GUID_DEVICE_BATTERY, 0x72631E54, 0x11D0, 0x78A4, 0xAA, 0x00, 0xF7, 0xBC, 0x2A, 0xB3, 0xB7, 0x00); +DEFINE_GUID(GUID_DEVICE_SAFE_REMOVAL, 0x8FBEF967, 0x11D2, 0xD6C5, 0xA0, 0x00, 0xB5, 0x97, 0x2E, 0x52, 0x40, 0xC9); +/* DEFINE_GUID(GUID_DEVICE_INTERFACE_ARRIVAL, 0xCB3A4004, 0x11D0, 0x46F0, 0x60, 0x00, 0x8F, 0xB0, 0x3F, 0x05, 0x13, 0x97); */ +/* DEFINE_GUID(GUID_DEVICE_INTERFACE_REMOVAL, 0xCB3A4005, 0x11D0, 0x46F0, 0x60, 0x00, 0x8F, 0xB0, 0x3F, 0x05, 0x13, 0x97); */ +DEFINE_GUID(GUID_DEVICE_ARRIVAL, 0xCB3A4009, 0x11D0, 0x46F0, 0x60, 0x00, 0x8F, 0xB0, 0x3F, 0x05, 0x13, 0x97); +DEFINE_GUID(GUID_DEVICE_ENUMERATED, 0xCB3A400A, 0x11D0, 0x46F0, 0x60, 0x00, 0x8F, 0xB0, 0x3F, 0x05, 0x13, 0x97); +DEFINE_GUID(GUID_DEVICE_ENUMERATE_REQUEST, 0xCB3A400B, 0x11D0, 0x46F0, 0x60, 0x00, 0x8F, 0xB0, 0x3F, 0x05, 0x13, 0x97); +DEFINE_GUID(GUID_DEVICE_START_REQUEST, 0xCB3A400C, 0x11D0, 0x46F0, 0x60, 0x00, 0x8F, 0xB0, 0x3F, 0x05, 0x13, 0x97); +DEFINE_GUID(GUID_DEVICE_REMOVE_PENDING, 0xCB3A400D, 0x11D0, 0x46F0, 0x60, 0x00, 0x8F, 0xB0, 0x3F, 0x05, 0x13, 0x97); +DEFINE_GUID(GUID_DEVICE_QUERY_AND_REMOVE, 0xCB3A400E, 0x11D0, 0x46F0, 0x60, 0x00, 0x8F, 0xB0, 0x3F, 0x05, 0x13, 0x97); +DEFINE_GUID(GUID_DEVICE_EJECT, 0xCB3A400F, 0x11D0, 0x46F0, 0x60, 0x00, 0x8F, 0xB0, 0x3F, 0x05, 0x13, 0x97); +DEFINE_GUID(GUID_DEVICE_NOOP, 0xCB3A4010, 0x11D0, 0x46F0, 0x60, 0x00, 0x8F, 0xB0, 0x3F, 0x05, 0x13, 0x97); +DEFINE_GUID(GUID_DEVICE_WARM_EJECT_VETOED, 0xCBF4C1F9, 0x11D3, 0x18D5, 0xA0, 0x00, 0xDB, 0x97, 0x2E, 0x52, 0x40, 0xC9); +DEFINE_GUID(GUID_DEVICE_SURPRISE_REMOVAL, 0xCE5AF000, 0x11D2, 0x80DD, 0xA0, 0x00, 0x8D, 0xA8, 0x4B, 0x6B, 0x69, 0xC9); +DEFINE_GUID(GUID_DEVICE_EJECT_VETOED, 0xCF7B71E8, 0x11D2, 0xD8FD, 0xA0, 0x00, 0xB5, 0x97, 0x2E, 0x52, 0x40, 0xC9); +DEFINE_GUID(GUID_DEVICE_EVENT_RBC, 0xD0744792, 0x11D2, 0xA98E, 0xA0, 0x00, 0x7A, 0x91, 0xF3, 0x8F, 0x06, 0xC9); + +typedef enum _PLUGPLAY_EVENT_CATEGORY { + HardwareProfileChangeEvent, + TargetDeviceChangeEvent, + DeviceClassChangeEvent, + CustomDeviceEvent, + DeviceInstallEvent, + DeviceArrivalEvent, + PowerEvent, + VetoEvent, + BlockedDriverEvent, + MaxPlugEventCategory +} PLUGPLAY_EVENT_CATEGORY; + +typedef enum _PNP_VETO_TYPE { + PNP_VetoTypeUnknown, + PNP_VetoLegacyDevice, + PNP_VetoPendingClose, + PNP_VetoWindowsApp, + PNP_VetoWindowsService, + PNP_VetoOutstandingOpen, + PNP_VetoDevice, + PNP_VetoDriver, + PNP_VetoIllegalDeviceRequest, + PNP_VetoInsufficientPower, + PNP_VetoNonDisableable, + PNP_VetoLegacyDriver, + PNP_VetoInsufficientRights, +} PNP_VETO_TYPE; + +/* + * Plug and Play event structure used by NtGetPlugPlayEvent. + * + * EventGuid + * Can be one of the following values: + * GUID_HWPROFILE_QUERY_CHANGE + * GUID_HWPROFILE_CHANGE_CANCELLED + * GUID_HWPROFILE_CHANGE_COMPLETE + * GUID_TARGET_DEVICE_QUERY_REMOVE + * GUID_TARGET_DEVICE_REMOVE_CANCELLED + * GUID_TARGET_DEVICE_REMOVE_COMPLETE + * GUID_PNP_CUSTOM_NOTIFICATION + * GUID_PNP_POWER_NOTIFICATION + * GUID_DEVICE_* (see above) + * + * EventCategory + * Type of the event that happened. + * + * Result + * ? + * + * Flags + * ? + * + * TotalSize + * Size of the event block including the device IDs and other + * per category specific fields. + */ + +typedef struct _PLUGPLAY_EVENT_BLOCK { + GUID EventGuid; + PLUGPLAY_EVENT_CATEGORY EventCategory; + PULONG Result; + ULONG Flags; + ULONG TotalSize; + PDEVICE_OBJECT DeviceObject; + union { + struct { + GUID ClassGuid; + WCHAR SymbolicLinkName[ANYSIZE_ARRAY]; + } DeviceClass; + struct { + WCHAR DeviceIds[ANYSIZE_ARRAY]; + } TargetDevice; + struct { + WCHAR DeviceId[ANYSIZE_ARRAY]; + } InstallDevice; + struct { + PVOID NotificationStructure; + WCHAR DeviceIds[ANYSIZE_ARRAY]; + } CustomNotification; + struct { + PVOID Notification; + } ProfileNotification; + struct { + ULONG NotificationCode; + ULONG NotificationData; + } PowerNotification; + struct { + PNP_VETO_TYPE VetoType; + WCHAR DeviceIdVetoNameBuffer[ANYSIZE_ARRAY]; + } VetoNotification; + struct { + GUID BlockedDriverGuid; + } BlockedDriverNotification; + }; +} PLUGPLAY_EVENT_BLOCK, *PPLUGPLAY_EVENT_BLOCK; + +/* + * NtGetPlugPlayEvent + * + * Returns one Plug & Play event from a global queue. + * + * Parameters + * Reserved1 + * Reserved2 + * Always set to zero. + * + * Buffer + * The buffer that will be filled with the event information on + * successful return from the function. + * + * BufferSize + * Size of the buffer pointed by the Buffer parameter. If the + * buffer size is not large enough to hold the whole event + * information, error STATUS_BUFFER_TOO_SMALL is returned and + * the buffer remains untouched. + * + * Return Values + * STATUS_PRIVILEGE_NOT_HELD + * STATUS_BUFFER_TOO_SMALL + * STATUS_SUCCESS + * + * Remarks + * This function isn't multi-thread safe! + */ + +NTSTATUS STDCALL +NtGetPlugPlayEvent( + ULONG Reserved1, + ULONG Reserved2, + PPLUGPLAY_EVENT_BLOCK Buffer, + ULONG BufferSize); + +/* + * NtPlugPlayControl + * + * A function for doing various Plug & Play operations from user mode. + * + * Parameters + * ControlCode + * 0x00 Reenumerate device tree + * + * Buffer points to UNICODE_STRING decribing the instance + * path (like "HTREE\ROOT\0" or "Root\ACPI_HAL\0000"). For + * more information about instance paths see !devnode command + * in kernel debugger or look at "Inside Windows 2000" book, + * chapter "Driver Loading, Initialization, and Installation". + * + * 0x01 Register new device + * 0x02 Deregister device + * 0x03 Initialize device + * 0x04 Start device + * 0x06 Query and remove device + * 0x07 User response + * + * Called after processing the message from NtGetPlugPlayEvent. + * + * 0x08 Generate legacy device + * 0x09 Get interface device list + * 0x0A Get property data + * 0x0B Device class association (Registration) + * 0x0C Get related device + * 0x0D Get device interface alias + * 0x0E Get/set device status + * 0x0F Get device depth + * 0x10 Query device relations + * 0x11 Query target device relation + * 0x12 Query conflict list + * 0x13 Retrieve dock data + * 0x14 Reset device + * 0x15 Halt device + * 0x16 Get blocked driver data + * + * Buffer + * The buffer contains information that is specific to each control + * code. The buffer is read-only. + * + * BufferSize + * Size of the buffer pointed by the Buffer parameter. If the + * buffer size specifies incorrect value for specified control + * code, error ??? is returned. + * + * Return Values + * STATUS_PRIVILEGE_NOT_HELD + * STATUS_SUCCESS + * ... + */ + +NTSTATUS STDCALL +NtPlugPlayControl( + ULONG ControlCode, + PVOID Buffer, + ULONG BufferSize); + +#endif /* __NTPNP_H */ From 6705201337fdbef640e882b4dae55e4142fc8b85 Mon Sep 17 00:00:00 2001 From: Gunnar Dalsnes Date: Tue, 1 Feb 2005 17:53:55 +0000 Subject: [PATCH 083/185] RtlCreateUnicodeString->RtlpCreateUnicodeString svn path=/trunk/; revision=13383 --- reactos/ntoskrnl/cm/import.c | 8 ++++---- reactos/ntoskrnl/cm/ntfunc.c | 3 +-- reactos/ntoskrnl/cm/regfile.c | 6 +++--- reactos/ntoskrnl/cm/registry.c | 8 ++++---- reactos/ntoskrnl/cm/regobj.c | 8 ++++---- reactos/ntoskrnl/dbg/kdb_symbols.c | 4 ++-- reactos/ntoskrnl/ex/event.c | 2 +- reactos/ntoskrnl/ex/evtpair.c | 2 +- reactos/ntoskrnl/ex/mutant.c | 2 +- reactos/ntoskrnl/ex/profile.c | 2 +- reactos/ntoskrnl/ex/sem.c | 2 +- reactos/ntoskrnl/ex/timer.c | 2 +- reactos/ntoskrnl/ex/win32k.c | 6 +++--- reactos/ntoskrnl/io/create.c | 8 ++++---- reactos/ntoskrnl/io/driver.c | 5 ++--- reactos/ntoskrnl/io/iocomp.c | 4 ++-- reactos/ntoskrnl/ob/namespc.c | 2 +- reactos/ntoskrnl/ob/object.c | 2 +- reactos/ntoskrnl/rtl/atom.c | 4 ++-- reactos/ntoskrnl/se/token.c | 4 ++-- 20 files changed, 41 insertions(+), 43 deletions(-) diff --git a/reactos/ntoskrnl/cm/import.c b/reactos/ntoskrnl/cm/import.c index 16b23ceb3c7..f0be6f834e3 100644 --- a/reactos/ntoskrnl/cm/import.c +++ b/reactos/ntoskrnl/cm/import.c @@ -196,12 +196,12 @@ CmImportSystemHive(PCHAR ChunkBase, } /* Set the hive filename */ - RtlCreateUnicodeString (&RegistryHive->HiveFileName, - SYSTEM_REG_FILE); + RtlpCreateUnicodeString (&RegistryHive->HiveFileName, + SYSTEM_REG_FILE, NonPagedPool); /* Set the log filename */ - RtlCreateUnicodeString (&RegistryHive->LogFileName, - SYSTEM_LOG_FILE); + RtlpCreateUnicodeString (&RegistryHive->LogFileName, + SYSTEM_LOG_FILE, NonPagedPool); return TRUE; } diff --git a/reactos/ntoskrnl/cm/ntfunc.c b/reactos/ntoskrnl/cm/ntfunc.c index 2c7bab080c6..141c0728e7b 100644 --- a/reactos/ntoskrnl/cm/ntfunc.c +++ b/reactos/ntoskrnl/cm/ntfunc.c @@ -200,8 +200,7 @@ NtCreateKey(OUT PHANDLE KeyHandle, } else { - RtlCreateUnicodeString(&KeyObject->Name, - Start); + RtlpCreateUnicodeString(&KeyObject->Name, Start, NonPagedPool); RtlFreeUnicodeString(&RemainingPath); } diff --git a/reactos/ntoskrnl/cm/regfile.c b/reactos/ntoskrnl/cm/regfile.c index 5479ec93992..eb340933fdb 100644 --- a/reactos/ntoskrnl/cm/regfile.c +++ b/reactos/ntoskrnl/cm/regfile.c @@ -863,11 +863,11 @@ CmiInitNonVolatileRegistryHive (PREGISTRY_HIVE RegistryHive, RegistryHive, Filename); /* Duplicate Filename */ - Status = RtlCreateUnicodeString(&RegistryHive->HiveFileName, - Filename); + Status = RtlpCreateUnicodeString(&RegistryHive->HiveFileName, + Filename, NonPagedPool); if (!NT_SUCCESS(Status)) { - DPRINT("RtlCreateUnicodeString() failed (Status %lx)\n", Status); + DPRINT("RtlpCreateUnicodeString() failed (Status %lx)\n", Status); return(Status); } diff --git a/reactos/ntoskrnl/cm/registry.c b/reactos/ntoskrnl/cm/registry.c index 7223fef3a24..87dad05bc73 100644 --- a/reactos/ntoskrnl/cm/registry.c +++ b/reactos/ntoskrnl/cm/registry.c @@ -315,7 +315,7 @@ CmInitializeRegistry(VOID) RootKey->NumberOfSubKeys = 0; RootKey->SubKeys = NULL; RootKey->SizeOfSubKeys = 0; - Status = RtlCreateUnicodeString(&RootKey->Name, L"Registry"); + Status = RtlpCreateUnicodeString(&RootKey->Name, L"Registry", NonPagedPool); ASSERT(NT_SUCCESS(Status)); #if 0 @@ -662,12 +662,12 @@ CmiConnectHive(IN POBJECT_ATTRIBUTES KeyObjectAttributes, DPRINT ("SubName %S\n", SubName); - Status = RtlCreateUnicodeString(&NewKey->Name, - SubName); + Status = RtlpCreateUnicodeString(&NewKey->Name, + SubName, NonPagedPool); RtlFreeUnicodeString(&RemainingPath); if (!NT_SUCCESS(Status)) { - DPRINT1("RtlCreateUnicodeString() failed (Status %lx)\n", Status); + DPRINT1("RtlpCreateUnicodeString() failed (Status %lx)\n", Status); if (NewKey->SubKeys != NULL) { ExFreePool (NewKey->SubKeys); diff --git a/reactos/ntoskrnl/cm/regobj.c b/reactos/ntoskrnl/cm/regobj.c index 0f6542aab78..0bb1984e724 100644 --- a/reactos/ntoskrnl/cm/regobj.c +++ b/reactos/ntoskrnl/cm/regobj.c @@ -160,8 +160,8 @@ CmiObjectParse(PVOID ParsedObject, FoundObject->KeyCell = SubKeyCell; FoundObject->KeyCellOffset = BlockOffset; FoundObject->RegistryHive = ParsedKey->RegistryHive; - RtlCreateUnicodeString(&FoundObject->Name, - KeyName.Buffer); + RtlpCreateUnicodeString(&FoundObject->Name, + KeyName.Buffer, NonPagedPool); CmiAddKeyToList(ParsedKey, FoundObject); DPRINT("Created object 0x%x\n", FoundObject); } @@ -248,8 +248,8 @@ CmiObjectCreate(PVOID ObjectBody, Start = RemainingPath; if(*Start == L'\\') Start++; - RtlCreateUnicodeString(&KeyObject->Name, - Start); + RtlpCreateUnicodeString(&KeyObject->Name, + Start, NonPagedPool); } else { diff --git a/reactos/ntoskrnl/dbg/kdb_symbols.c b/reactos/ntoskrnl/dbg/kdb_symbols.c index 381b2d37192..d01e3791d1f 100644 --- a/reactos/ntoskrnl/dbg/kdb_symbols.c +++ b/reactos/ntoskrnl/dbg/kdb_symbols.c @@ -27,7 +27,7 @@ * SUCH DAMAGE. */ -/* $Id:$ +/* $Id$ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -715,7 +715,7 @@ KdbpSymAddCachedFile(IN PUNICODE_STRING FileName, RtlZeroMemory(CacheEntry, sizeof (IMAGE_SYMBOL_INFO_CACHE)); /* fill entry */ - RtlCreateUnicodeString(&CacheEntry->FileName, FileName->Buffer); + RtlpCreateUnicodeString(&CacheEntry->FileName, FileName->Buffer, NonPagedPool); ASSERT(CacheEntry->FileName.Buffer); CacheEntry->RefCount = 1; CacheEntry->FileBuffer = SymbolInfo->FileBuffer; diff --git a/reactos/ntoskrnl/ex/event.c b/reactos/ntoskrnl/ex/event.c index 386f15b0945..352d1af5238 100644 --- a/reactos/ntoskrnl/ex/event.c +++ b/reactos/ntoskrnl/ex/event.c @@ -54,7 +54,7 @@ ExpInitializeEventImplementation(VOID) { ExEventObjectType = ExAllocatePool(NonPagedPool,sizeof(OBJECT_TYPE)); - RtlCreateUnicodeString(&ExEventObjectType->TypeName, L"Event"); + RtlpCreateUnicodeString(&ExEventObjectType->TypeName, L"Event", NonPagedPool); ExEventObjectType->Tag = TAG('E', 'V', 'T', 'T'); ExEventObjectType->PeakObjects = 0; diff --git a/reactos/ntoskrnl/ex/evtpair.c b/reactos/ntoskrnl/ex/evtpair.c index 2c3a9d4c475..ada376adbdf 100644 --- a/reactos/ntoskrnl/ex/evtpair.c +++ b/reactos/ntoskrnl/ex/evtpair.c @@ -60,7 +60,7 @@ ExpInitializeEventPairImplementation(VOID) { ExEventPairObjectType = ExAllocatePool(NonPagedPool,sizeof(OBJECT_TYPE)); - RtlCreateUnicodeString(&ExEventPairObjectType->TypeName, L"EventPair"); + RtlpCreateUnicodeString(&ExEventPairObjectType->TypeName, L"EventPair", NonPagedPool); ExEventPairObjectType->Tag = TAG('E', 'v', 'P', 'a'); ExEventPairObjectType->PeakObjects = 0; ExEventPairObjectType->PeakHandles = 0; diff --git a/reactos/ntoskrnl/ex/mutant.c b/reactos/ntoskrnl/ex/mutant.c index 137da181826..0852e0075ab 100644 --- a/reactos/ntoskrnl/ex/mutant.c +++ b/reactos/ntoskrnl/ex/mutant.c @@ -65,7 +65,7 @@ ExpInitializeMutantImplementation(VOID) { ExMutantObjectType = ExAllocatePool(NonPagedPool,sizeof(OBJECT_TYPE)); - RtlCreateUnicodeString(&ExMutantObjectType->TypeName, L"Mutant"); + RtlpCreateUnicodeString(&ExMutantObjectType->TypeName, L"Mutant", NonPagedPool); ExMutantObjectType->Tag = TAG('M', 'T', 'N', 'T'); ExMutantObjectType->PeakObjects = 0; diff --git a/reactos/ntoskrnl/ex/profile.c b/reactos/ntoskrnl/ex/profile.c index 822ef1894ac..645dfcb8ccd 100644 --- a/reactos/ntoskrnl/ex/profile.c +++ b/reactos/ntoskrnl/ex/profile.c @@ -68,7 +68,7 @@ ExpInitializeProfileImplementation(VOID) ExProfileObjectType = ExAllocatePool(NonPagedPool,sizeof(OBJECT_TYPE)); - RtlCreateUnicodeString(&ExProfileObjectType->TypeName, L"Profile"); + RtlpCreateUnicodeString(&ExProfileObjectType->TypeName, L"Profile", NonPagedPool); ExProfileObjectType->Tag = TAG('P', 'R', 'O', 'F'); ExProfileObjectType->PeakObjects = 0; diff --git a/reactos/ntoskrnl/ex/sem.c b/reactos/ntoskrnl/ex/sem.c index 6ca1ebe01db..5a27391365c 100644 --- a/reactos/ntoskrnl/ex/sem.c +++ b/reactos/ntoskrnl/ex/sem.c @@ -53,7 +53,7 @@ ExpInitializeSemaphoreImplementation(VOID) { ExSemaphoreObjectType = ExAllocatePool(NonPagedPool, sizeof(OBJECT_TYPE)); - RtlCreateUnicodeString(&ExSemaphoreObjectType->TypeName, L"Semaphore"); + RtlpCreateUnicodeString(&ExSemaphoreObjectType->TypeName, L"Semaphore", NonPagedPool); ExSemaphoreObjectType->Tag = TAG('S', 'E', 'M', 'T'); ExSemaphoreObjectType->PeakObjects = 0; diff --git a/reactos/ntoskrnl/ex/timer.c b/reactos/ntoskrnl/ex/timer.c index 91fa92655ff..3deeff2518c 100644 --- a/reactos/ntoskrnl/ex/timer.c +++ b/reactos/ntoskrnl/ex/timer.c @@ -119,7 +119,7 @@ ExpInitializeTimerImplementation(VOID) ASSERT(!ExTimerType) ExTimerType = ExAllocatePool(NonPagedPool, sizeof(OBJECT_TYPE)); - RtlCreateUnicodeString(&ExTimerType->TypeName, L"Timer"); + RtlpCreateUnicodeString(&ExTimerType->TypeName, L"Timer", NonPagedPool); ExTimerType->Tag = TAG('T', 'I', 'M', 'T'); ExTimerType->PeakObjects = 0; diff --git a/reactos/ntoskrnl/ex/win32k.c b/reactos/ntoskrnl/ex/win32k.c index c93ce37f042..4cdc21622d8 100644 --- a/reactos/ntoskrnl/ex/win32k.c +++ b/reactos/ntoskrnl/ex/win32k.c @@ -1,4 +1,4 @@ -/* $Id:$ +/* $Id$ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -84,7 +84,7 @@ ExpWinStaObjectCreate(PVOID ObjectBody, DPRINT("Creating window station (0x%X) Name (%wZ)\n", WinSta, &UnicodeString); - Status = RtlCreateUnicodeString(&WinSta->Name, UnicodeString.Buffer); + Status = RtlpCreateUnicodeString(&WinSta->Name, UnicodeString.Buffer, NonPagedPool); if (!NT_SUCCESS(Status)) { return Status; @@ -247,7 +247,7 @@ ExpDesktopObjectCreate(PVOID ObjectBody, &Desktop->ListEntry, &Desktop->WindowStation->Lock); - return RtlCreateUnicodeString(&Desktop->Name, UnicodeString.Buffer); + return RtlpCreateUnicodeString(&Desktop->Name, UnicodeString.Buffer, NonPagedPool); } VOID STDCALL diff --git a/reactos/ntoskrnl/io/create.c b/reactos/ntoskrnl/io/create.c index 568db171cc4..2595918670f 100644 --- a/reactos/ntoskrnl/io/create.c +++ b/reactos/ntoskrnl/io/create.c @@ -147,8 +147,8 @@ IopCreateFile(PVOID ObjectBody, DeviceObject = DeviceObject->Vpb->DeviceObject; DPRINT("FsDeviceObject %lx\n", DeviceObject); } - RtlCreateUnicodeString(&(FileObject->FileName), - RemainingPath); + RtlpCreateUnicodeString(&(FileObject->FileName), + RemainingPath, NonPagedPool); } } else @@ -165,8 +165,8 @@ IopCreateFile(PVOID ObjectBody, FileObject->RelatedFileObject = (PFILE_OBJECT)Parent; - RtlCreateUnicodeString(&(FileObject->FileName), - RemainingPath); + RtlpCreateUnicodeString(&(FileObject->FileName), + RemainingPath, NonPagedPool); } DPRINT("FileObject->FileName %wZ\n", diff --git a/reactos/ntoskrnl/io/driver.c b/reactos/ntoskrnl/io/driver.c index ea19a8c2c02..eb3e4accf39 100644 --- a/reactos/ntoskrnl/io/driver.c +++ b/reactos/ntoskrnl/io/driver.c @@ -794,8 +794,7 @@ IopCreateGroupListEntry(PWSTR ValueName, RtlZeroMemory(Group, sizeof(SERVICE_GROUP)); - if (!RtlCreateUnicodeString(&Group->GroupName, - (PWSTR)ValueData)) + if (!RtlpCreateUnicodeString(&Group->GroupName, (PWSTR)ValueData, NonPagedPool)) { ExFreePool(Group); return(STATUS_INSUFFICIENT_RESOURCES); @@ -1864,7 +1863,7 @@ NtLoadDriver(IN PUNICODE_STRING DriverServiceName) Start = DriverServiceName->Buffer; else Start++; - RtlCreateUnicodeString(&DeviceNode->ServiceName, Start); + RtlpCreateUnicodeString(&DeviceNode->ServiceName, Start, NonPagedPool); /* * Initialize the driver module diff --git a/reactos/ntoskrnl/io/iocomp.c b/reactos/ntoskrnl/io/iocomp.c index 5e18411ded3..61f3ee90fcd 100644 --- a/reactos/ntoskrnl/io/iocomp.c +++ b/reactos/ntoskrnl/io/iocomp.c @@ -1,4 +1,4 @@ -/* $Id:$ +/* $Id$ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -119,7 +119,7 @@ IopInitIoCompletionImplementation(VOID) { ExIoCompletionType = ExAllocatePool(NonPagedPool, sizeof(OBJECT_TYPE)); - RtlCreateUnicodeString(&ExIoCompletionType->TypeName, L"IoCompletion"); + RtlpCreateUnicodeString(&ExIoCompletionType->TypeName, L"IoCompletion", NonPagedPool); ExIoCompletionType->Tag = IOC_TAG; ExIoCompletionType->PeakObjects = 0; diff --git a/reactos/ntoskrnl/ob/namespc.c b/reactos/ntoskrnl/ob/namespc.c index 2308f3cc564..fc179d003ac 100644 --- a/reactos/ntoskrnl/ob/namespc.c +++ b/reactos/ntoskrnl/ob/namespc.c @@ -195,7 +195,7 @@ ObpAddEntryDirectory(PDIRECTORY_OBJECT Parent, { KIRQL oldlvl; - RtlCreateUnicodeString(&Header->Name, Name); + RtlpCreateUnicodeString(&Header->Name, Name, NonPagedPool); Header->Parent = Parent; KeAcquireSpinLock(&Parent->Lock, &oldlvl); diff --git a/reactos/ntoskrnl/ob/object.c b/reactos/ntoskrnl/ob/object.c index 96c3d3b8924..a0023bc827a 100644 --- a/reactos/ntoskrnl/ob/object.c +++ b/reactos/ntoskrnl/ob/object.c @@ -439,7 +439,7 @@ ObFindObject(POBJECT_ATTRIBUTES ObjectAttributes, } if (current) - RtlCreateUnicodeString (RemainingPath, current); + RtlpCreateUnicodeString (RemainingPath, current, NonPagedPool); RtlFreeUnicodeString (&PathString); *ReturnedObject = CurrentObject; diff --git a/reactos/ntoskrnl/rtl/atom.c b/reactos/ntoskrnl/rtl/atom.c index 6ab15b3d1db..d3f897fe3ed 100644 --- a/reactos/ntoskrnl/rtl/atom.c +++ b/reactos/ntoskrnl/rtl/atom.c @@ -377,8 +377,8 @@ RtlAddAtomToAtomTable(IN PRTL_ATOM_TABLE AtomTable, } InsertTailList(&AtomTable->Slot[Hash], &Entry->List); - RtlCreateUnicodeString (&Entry->Name, - AtomName); + RtlpCreateUnicodeString (&Entry->Name, + AtomName, NonPagedPool); Entry->RefCount = 1; Entry->Locked = FALSE; diff --git a/reactos/ntoskrnl/se/token.c b/reactos/ntoskrnl/se/token.c index e120e814cff..048e8dfc332 100644 --- a/reactos/ntoskrnl/se/token.c +++ b/reactos/ntoskrnl/se/token.c @@ -547,8 +547,8 @@ SepInitializeTokenImplementation(VOID) SepTokenObjectType->Create = NULL; SepTokenObjectType->DuplicationNotify = NULL; - RtlCreateUnicodeString(&SepTokenObjectType->TypeName, - L"Token"); + RtlpCreateUnicodeString(&SepTokenObjectType->TypeName, + L"Token", NonPagedPool); ObpCreateTypeObject (SepTokenObjectType); } From 02f0f81fc0c82db3d3151be32d26295f3706a732 Mon Sep 17 00:00:00 2001 From: Filip Navara Date: Tue, 1 Feb 2005 17:54:25 +0000 Subject: [PATCH 084/185] Correct prototype for NtGetPlugPlayEvent and use the ntpnp.h header. svn path=/trunk/; revision=13384 --- reactos/include/ntos/zw.h | 15 --------------- reactos/ntoskrnl/include/ntoskrnl.h | 1 + reactos/ntoskrnl/io/plugplay.c | 4 +--- 3 files changed, 2 insertions(+), 18 deletions(-) diff --git a/reactos/include/ntos/zw.h b/reactos/include/ntos/zw.h index e76c6019e32..476e5822115 100755 --- a/reactos/include/ntos/zw.h +++ b/reactos/include/ntos/zw.h @@ -4929,21 +4929,6 @@ ZwYieldExecution( VOID ); -/* --- PLUG AND PLAY --- */ - -NTSTATUS -STDCALL -NtPlugPlayControl(IN ULONG ControlCode, - IN OUT PVOID Buffer, - IN ULONG BufferLength); - -NTSTATUS -STDCALL -NtGetPlugPlayEvent(IN ULONG Reserved1, - IN ULONG Reserved2, - OUT PVOID Buffer, - IN ULONG BufferLength); - /* --- POWER MANAGEMENT --- */ #ifndef __USE_W32API diff --git a/reactos/ntoskrnl/include/ntoskrnl.h b/reactos/ntoskrnl/include/ntoskrnl.h index a2c9144a57a..9f86d423f2e 100755 --- a/reactos/ntoskrnl/include/ntoskrnl.h +++ b/reactos/ntoskrnl/include/ntoskrnl.h @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include diff --git a/reactos/ntoskrnl/io/plugplay.c b/reactos/ntoskrnl/io/plugplay.c index f9760ce3b20..e309df1cd8f 100644 --- a/reactos/ntoskrnl/io/plugplay.c +++ b/reactos/ntoskrnl/io/plugplay.c @@ -15,13 +15,11 @@ #define NDEBUG #include - /* GLOBALS *******************************************************************/ static LIST_ENTRY IopPnpEventListHead; static KEVENT IopPnpNotifyEvent; - /* FUNCTIONS *****************************************************************/ NTSTATUS INIT_FUNCTION @@ -67,7 +65,7 @@ IopDequeuePlugPlayEvent(VOID) NTSTATUS STDCALL NtGetPlugPlayEvent(IN ULONG Reserved1, IN ULONG Reserved2, - OUT PVOID Buffer, + OUT PPLUGPLAY_EVENT_BLOCK Buffer, IN ULONG BufferLength) { NTSTATUS Status; From 446441503d46b0b4955bd1f19c60532299dc3d4e Mon Sep 17 00:00:00 2001 From: Filip Navara Date: Tue, 1 Feb 2005 21:21:33 +0000 Subject: [PATCH 085/185] Protect against writes beyond the end of partition. svn path=/trunk/; revision=13386 --- reactos/drivers/storage/disk/disk.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/reactos/drivers/storage/disk/disk.c b/reactos/drivers/storage/disk/disk.c index e2910de8862..2d68cf862a0 100644 --- a/reactos/drivers/storage/disk/disk.c +++ b/reactos/drivers/storage/disk/disk.c @@ -390,6 +390,8 @@ DiskClassCheckReadWrite(IN PDEVICE_OBJECT DeviceObject, { PDEVICE_EXTENSION DeviceExtension; PDISK_DATA DiskData; + PIO_STACK_LOCATION IrpStack; + ULARGE_INTEGER EndingOffset; DPRINT("DiskClassCheckReadWrite() called\n"); @@ -404,6 +406,16 @@ DiskClassCheckReadWrite(IN PDEVICE_OBJECT DeviceObject, return(STATUS_INVALID_PARAMETER); } + IrpStack = IoGetCurrentIrpStackLocation(Irp); + EndingOffset.QuadPart = IrpStack->Parameters.Read.ByteOffset.QuadPart + + IrpStack->Parameters.Read.Length; + + if (EndingOffset.QuadPart > DeviceExtension->PartitionLength.QuadPart) + { + Irp->IoStatus.Status = STATUS_INVALID_PARAMETER; + return(STATUS_INVALID_PARAMETER); + } + return(STATUS_SUCCESS); } From 5f67689cbb2b102491eb69fa1165fd9ee050f698 Mon Sep 17 00:00:00 2001 From: Aleksey Bragin Date: Wed, 2 Feb 2005 15:42:48 +0000 Subject: [PATCH 086/185] Make dev node count correct, since for example Mac Virtual PC BIOS reports slightly wrong number which must be &0xFF. This patch removes "Memory allocation failed: Out of memory" error while booting Freeldr. svn path=/trunk/; revision=13387 --- reactos/boot/freeldr/freeldr/arch/i386/hardware.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/reactos/boot/freeldr/freeldr/arch/i386/hardware.c b/reactos/boot/freeldr/freeldr/arch/i386/hardware.c index afb2a376baf..ec0b3b76f6d 100644 --- a/reactos/boot/freeldr/freeldr/arch/i386/hardware.c +++ b/reactos/boot/freeldr/freeldr/arch/i386/hardware.c @@ -351,6 +351,9 @@ DetectPnpBios(HKEY SystemKey, U32 *BusNumber) x = PnpBiosGetDeviceNodeCount(&NodeSize, &NodeCount); + NodeCount &= 0xFF; // needed since some fscked up BIOSes return + // wrong info (e.g. Mac Virtual PC) + // e.g. look: http://my.execpc.com/~geezer/osd/pnp/pnp16.c if (x != 0 || NodeSize == 0 || NodeCount == 0) { DbgPrint((DPRINT_HWDETECT, "PnP-BIOS failed to enumerate device nodes\n")); From b7ecf6f1efb1f321a888fd687edef03edf7803a8 Mon Sep 17 00:00:00 2001 From: Emanuele Aliberti Date: Wed, 2 Feb 2005 21:40:33 +0000 Subject: [PATCH 087/185] Make Jim Tabor visible. svn path=/trunk/; revision=13389 --- rosapps/notevil/makefile | 2 ++ rosapps/notevil/resource.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/rosapps/notevil/makefile b/rosapps/notevil/makefile index 3f54023b73a..b3048645bb3 100644 --- a/rosapps/notevil/makefile +++ b/rosapps/notevil/makefile @@ -24,4 +24,6 @@ include $(PATH_TO_TOP)/rules.mak include $(TOOLS_PATH)/helper.mk +$(TARGET_NAME).o: resource.h + # EOF diff --git a/rosapps/notevil/resource.h b/rosapps/notevil/resource.h index 24e460090eb..6a7333b059b 100644 --- a/rosapps/notevil/resource.h +++ b/rosapps/notevil/resource.h @@ -1,2 +1,2 @@ #define RES_FIRST_INDEX 1 -#define RES_LAST_INDEX 43 +#define RES_LAST_INDEX 44 From 8b7ac2780a008e0ba934612772f654e0f1197805 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20van=20Geldorp?= Date: Wed, 2 Feb 2005 23:07:33 +0000 Subject: [PATCH 088/185] Store symbolic information in a .rossym section in the executable/library/driver/whatever svn path=/trunk/; revision=13392 --- reactos/Makefile | 2 +- reactos/boot/freeldr/freeldr/Makefile | 6 +- .../boot/freeldr/freeldr/include/freeldr.h | 18 +- reactos/boot/freeldr/freeldr/multiboot.c | 38 - .../boot/freeldr/freeldr/reactos/reactos.c | 129 +- reactos/include/ntdll/ldr.h | 4 +- reactos/include/ntos.h | 2 - reactos/include/ntos/kdbgsyms.h | 22 - reactos/include/reactos/rossym.h | 59 + reactos/lib/rossym/Makefile | 33 + reactos/lib/rossym/delete.c | 24 + reactos/lib/rossym/find.c | 150 ++ reactos/lib/rossym/fromfile.c | 146 ++ reactos/lib/rossym/frommem.c | 81 + reactos/lib/rossym/fromraw.c | 55 + reactos/lib/rossym/getraw.c | 43 + reactos/lib/rossym/init.c | 22 + reactos/lib/rossym/initkm.c | 46 + reactos/lib/rossym/initum.c | 43 + reactos/lib/rossym/rossympriv.h | 39 + reactos/lib/rossym/zwfile.c | 52 + reactos/ntoskrnl/Makefile | 3 +- reactos/ntoskrnl/dbg/kdb.h | 21 +- reactos/ntoskrnl/dbg/kdb_stabs.c | 102 -- reactos/ntoskrnl/dbg/kdb_stabs.h | 69 - reactos/ntoskrnl/dbg/kdb_symbols.c | 667 ++------ reactos/ntoskrnl/dbg/profile.c | 42 +- reactos/ntoskrnl/include/internal/module.h | 4 +- reactos/ntoskrnl/io/driver.c | 2 +- reactos/tools/helper.mk | 101 +- reactos/tools/rsym.c | 1340 ++++++++++++----- 31 files changed, 2023 insertions(+), 1342 deletions(-) delete mode 100644 reactos/include/ntos/kdbgsyms.h create mode 100644 reactos/include/reactos/rossym.h create mode 100644 reactos/lib/rossym/Makefile create mode 100644 reactos/lib/rossym/delete.c create mode 100644 reactos/lib/rossym/find.c create mode 100644 reactos/lib/rossym/fromfile.c create mode 100644 reactos/lib/rossym/frommem.c create mode 100644 reactos/lib/rossym/fromraw.c create mode 100644 reactos/lib/rossym/getraw.c create mode 100644 reactos/lib/rossym/init.c create mode 100644 reactos/lib/rossym/initkm.c create mode 100644 reactos/lib/rossym/initum.c create mode 100644 reactos/lib/rossym/rossympriv.h create mode 100644 reactos/lib/rossym/zwfile.c delete mode 100644 reactos/ntoskrnl/dbg/kdb_stabs.c delete mode 100644 reactos/ntoskrnl/dbg/kdb_stabs.h diff --git a/reactos/Makefile b/reactos/Makefile index 295fd800933..5491539a07b 100644 --- a/reactos/Makefile +++ b/reactos/Makefile @@ -42,7 +42,7 @@ BUS = acpi isapnp pci LIB_FSLIB = vfatlib # Static libraries -LIB_STATIC = string rosrtl epsapi uuid libwine zlib rtl tgetopt pseh adns dxguid strmiids crt +LIB_STATIC = string rosrtl epsapi uuid libwine zlib rtl tgetopt pseh adns dxguid strmiids crt rossym # Keyboard layout libraries DLLS_KBD = kbdda kbddv kbdes kbdfr kbdgr kbdse kbduk kbdus diff --git a/reactos/boot/freeldr/freeldr/Makefile b/reactos/boot/freeldr/freeldr/Makefile index 13612b2d29d..8cde4f77eb8 100644 --- a/reactos/boot/freeldr/freeldr/Makefile +++ b/reactos/boot/freeldr/freeldr/Makefile @@ -95,7 +95,7 @@ endif COMPILER_DEFINES = -D__$(TARGET)__ $(COMPILER_DEBUG_DEFINES) -COMPILER_INCLUDES = -I$(SRCDIR)/include +COMPILER_INCLUDES = -I$(SRCDIR)/include -I$(PATH_TO_TOP)/include CFLAGS = $(COMPILER_OPTIONS) \ $(COMPILER_DEFINES) \ @@ -262,9 +262,9 @@ all : freeldr.sys setupldr.sys @echo Make ALL done. -freeldr.sys : $(ALL_OBJS) +freeldr.sys : $(ALL_OBJS) $(PATH_TO_TOP)/dk/w32/lib/librossym.a @echo ===================================================== LINKING $@ - @$(LD) $(LFLAGS) -o freeldr.exe $(F_OBJS) + @$(LD) $(LFLAGS) -o freeldr.exe $(F_OBJS) $(PATH_TO_TOP)/dk/w32/lib/librossym.a ifeq ($(FULL_MAP),yes) @$(OBJDUMP) -d -S freeldr.exe > freeldr.map else diff --git a/reactos/boot/freeldr/freeldr/include/freeldr.h b/reactos/boot/freeldr/freeldr/include/freeldr.h index 3f3ca67235d..ffd8f228425 100644 --- a/reactos/boot/freeldr/freeldr/include/freeldr.h +++ b/reactos/boot/freeldr/freeldr/include/freeldr.h @@ -28,12 +28,18 @@ #define BOOLEAN int typedef BOOLEAN *PBOOLEAN; -#define CHAR char -#define PCHAR char * -#define UCHAR unsigned char -#define PUCHAR unsigned char * -#define WCHAR unsigned short -#define PWCHAR unsigned short * +#define CHAR char +#define PCHAR char * +#define UCHAR unsigned char +#define PUCHAR unsigned char * +#define WCHAR unsigned short +#define PWCHAR unsigned short * +#define ULONG unsigned long +#if defined(_WIN64) +#define ULONG_PTR __int64 +#else +#define ULONG_PTR unsigned long +#endif #define VOID void #define PVOID VOID* diff --git a/reactos/boot/freeldr/freeldr/multiboot.c b/reactos/boot/freeldr/freeldr/multiboot.c index 5db72524353..024b930f394 100644 --- a/reactos/boot/freeldr/freeldr/multiboot.c +++ b/reactos/boot/freeldr/freeldr/multiboot.c @@ -130,44 +130,6 @@ BOOL MultiBootLoadKernel(FILE *KernelImage) return TRUE; } -#if 0 -BOOL MultiBootLoadModule(FILE *ModuleImage, char *ModuleName) -{ - U32 dwModuleSize; - module_t* pModule; - char* ModuleNameString; - char * TempName; - - /* - * Get current module data structure and module name string array - */ - pModule = &multiboot_modules[mb_info.mods_count]; - do { - TempName = strchr( ModuleName, '\\' ); - if( TempName ) - ModuleName = TempName + 1; - } while( TempName ); - - ModuleNameString = multiboot_module_strings[mb_info.mods_count]; - - dwModuleSize = FsGetFileSize(ModuleImage); - pModule->mod_start = next_module_load_base; - pModule->mod_end = next_module_load_base + dwModuleSize; - strcpy(ModuleNameString, ModuleName); - pModule->string = (unsigned long)ModuleNameString; - - /* - * Load the file image - */ - FsReadFile(ModuleImage, dwModuleSize, NULL, (void*)next_module_load_base); - - next_module_load_base = ROUND_UP(pModule->mod_end, /*PAGE_SIZE*/4096); - mb_info.mods_count++; - - return TRUE; -} -#endif - PVOID MultiBootLoadModule(FILE *ModuleImage, char *ModuleName, U32* ModuleSize) { U32 dwModuleSize; diff --git a/reactos/boot/freeldr/freeldr/reactos/reactos.c b/reactos/boot/freeldr/freeldr/reactos/reactos.c index fda39008d78..77f5a39f050 100644 --- a/reactos/boot/freeldr/freeldr/reactos/reactos.c +++ b/reactos/boot/freeldr/freeldr/reactos/reactos.c @@ -31,6 +31,8 @@ #include #include +#include + #include "registry.h" @@ -85,71 +87,73 @@ LoadKernel(PCHAR szFileName, int nPos) return(TRUE); } -static BOOL -LoadSymbolFile(PCHAR szSystemRoot, - PCHAR ModuleName, - int nPos) +static PVOID +FreeldrAllocMem(ULONG_PTR Size) { - CHAR SymbolFileName[1024]; + return MmAllocateMemory((U32) Size); +} + +static VOID +FreeldrFreeMem(PVOID Area) +{ + MmFreeMemory(Area); +} + +static BOOLEAN +FreeldrReadFile(PVOID FileContext, PVOID Buffer, ULONG Size) +{ + U32 BytesRead; + + return FsReadFile((PFILE) FileContext, (U32) Size, &BytesRead, Buffer) + && Size == BytesRead; +} + +static BOOLEAN +FreeldrSeekFile(PVOID FileContext, ULONG_PTR Position) +{ + FsSetFilePointer((PFILE) FileContext, (U32) Position); + + return TRUE; +} + +static BOOL +LoadKernelSymbols(PCHAR szKernelName, int nPos) +{ + static ROSSYM_CALLBACKS FreeldrCallbacks = + { + FreeldrAllocMem, + FreeldrFreeMem, + FreeldrReadFile, + FreeldrSeekFile + }; PFILE FilePointer; - U32 Length; - PCHAR Start; - PCHAR Ext; - char value[256]; - char *p; + PROSSYM_INFO RosSymInfo; + U32 Size; + PVOID Base; - /* Get the path to the symbol store */ - strcpy(SymbolFileName, szSystemRoot); - strcat(SymbolFileName, "symbols\\"); + RosSymInit(&FreeldrCallbacks); - /* Get the symbol filename from the module name */ - Start = strrchr(ModuleName, '\\'); - if (Start == NULL) - Start = ModuleName; - else - Start++; - - Ext = strrchr(ModuleName, '.'); - if (Ext != NULL) - Length = Ext - Start; - else - Length = strlen(Start); - - strncat(SymbolFileName, Start, Length); - strcat(SymbolFileName, ".sym"); - - FilePointer = FsOpenFile((PCHAR)&SymbolFileName[0]); + FilePointer = FsOpenFile(szKernelName); if (FilePointer == NULL) { - DbgPrint((DPRINT_REACTOS, "Symbol file %s not loaded.\n", SymbolFileName)); - /* This is not critical */ return FALSE; } - DbgPrint((DPRINT_REACTOS, "Symbol file %s is loaded.\n", SymbolFileName)); + if (! RosSymCreateFromFile(FilePointer, &RosSymInfo)) + { + return FALSE; + } - /* - * Update the status bar with the current file - */ - strcpy(value, "Reading "); - p = strrchr(SymbolFileName, '\\'); - if (p == NULL) - strcat(value, SymbolFileName); - else - strcat(value, p + 1); - UiDrawStatusText(value); + Base = MultiBootCreateModule("NTOSKRNL.SYM"); + Size = RosSymGetRawDataLength(RosSymInfo); + RosSymGetRawData(RosSymInfo, Base); + MultiBootCloseModule(Base, Size); - /* - * Load the symbol file - */ - MultiBootLoadModule(FilePointer, SymbolFileName, NULL); + RosSymDelete(RosSymInfo); - UiDrawProgressBarCenter(nPos, 100, "Loading ReactOS..."); - - return (TRUE); + return TRUE; } - static BOOL LoadDriver(PCHAR szFileName, int nPos) { @@ -366,7 +370,6 @@ LoadBootDrivers(PCHAR szSystemRoot, int nPos) nPos += 5; LoadDriver(ImagePath, nPos); - LoadSymbolFile(szSystemRoot, ImagePath, nPos); } else { @@ -446,7 +449,6 @@ LoadBootDrivers(PCHAR szSystemRoot, int nPos) nPos += 5; LoadDriver(ImagePath, nPos); - LoadSymbolFile(szSystemRoot, ImagePath, nPos); } else { @@ -880,21 +882,18 @@ LoadAndBootReactOS(PUCHAR OperatingSystemName) UiMessageBox(MsgBuffer); return; } - UiDrawProgressBarCenter(25, 100, "Loading ReactOS..."); + UiDrawProgressBarCenter(30, 100, "Loading ReactOS..."); /* - * Load symbol files + * Load kernel symbols */ - LoadSymbolFile(szBootPath, szKernelName, 30); - LoadSymbolFile(szBootPath, szHalName, 30); - - UiDrawProgressBarCenter(30, 100, "Loading ReactOS..."); + LoadKernelSymbols(szKernelName, 30); + UiDrawProgressBarCenter(40, 100, "Loading ReactOS..."); /* * Load boot drivers */ - LoadBootDrivers(szBootPath, 30); - + LoadBootDrivers(szBootPath, 40); #if 0 /* @@ -921,4 +920,12 @@ LoadAndBootReactOS(PUCHAR OperatingSystemName) boot_reactos(); } +#undef DbgPrint +ULONG +DbgPrint(char *Fmt, ...) +{ + UiMessageBox(Fmt); + return 0; +} + /* EOF */ diff --git a/reactos/include/ntdll/ldr.h b/reactos/include/ntdll/ldr.h index 6db9430cdd8..675e1a9303c 100644 --- a/reactos/include/ntdll/ldr.h +++ b/reactos/include/ntdll/ldr.h @@ -1,9 +1,9 @@ #ifndef __NTOSKRNL_INCLUDE_INTERNAL_LDR_H #define __NTOSKRNL_INCLUDE_INTERNAL_LDR_H -#include #include #include +#include typedef NTSTATUS STDCALL_FUNC (*PEPFUNC)(PPEB); @@ -69,7 +69,7 @@ typedef struct _LDR_MODULE ULONG CheckSum; ULONG TimeDateStamp; #if defined(DBG) || defined(KDBG) - IMAGE_SYMBOL_INFO SymbolInfo; + PROSSYM_INFO RosSymInfo; #endif /* KDBG */ } LDR_MODULE, *PLDR_MODULE; diff --git a/reactos/include/ntos.h b/reactos/include/ntos.h index c4b3c1eeb19..96b6e6e3a9a 100644 --- a/reactos/include/ntos.h +++ b/reactos/include/ntos.h @@ -20,7 +20,6 @@ #include "ntos/gditypes.h" #include "ntos/fstypes.h" /* AG */ #include "ntos/heap.h" -#include "ntos/kdbgsyms.h" #include "ntos/keyboard.h" #include "ntos/minmax.h" #include "ntos/mm.h" @@ -61,7 +60,6 @@ #include "ntos/file.h" #include "ntos/gditypes.h" #include "ntos/heap.h" -#include "ntos/kdbgsyms.h" #include "ntos/keyboard.h" #include "ntos/minmax.h" #include "ntos/mm.h" diff --git a/reactos/include/ntos/kdbgsyms.h b/reactos/include/ntos/kdbgsyms.h deleted file mode 100644 index ca93e773577..00000000000 --- a/reactos/include/ntos/kdbgsyms.h +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef __KDBGSYMS_H -#define __KDBGSYMS_H - -#include - -typedef struct _IMAGE_SYMBOL_INFO -{ - ULONG_PTR ImageBase; - ULONG_PTR ImageSize; - PVOID FileBuffer; - PVOID StabsBase; - ULONG StabsLength; - PVOID StabStringsBase; - ULONG StabStringsLength; - PVOID SymbolsBase; - ULONG SymbolsLength; - PVOID SymbolStringsBase; - ULONG SymbolStringsLength; -} IMAGE_SYMBOL_INFO, *PIMAGE_SYMBOL_INFO; - -#endif /* __KDBGSYMS_H */ - diff --git a/reactos/include/reactos/rossym.h b/reactos/include/reactos/rossym.h new file mode 100644 index 00000000000..7219bce77c1 --- /dev/null +++ b/reactos/include/reactos/rossym.h @@ -0,0 +1,59 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: include/reactos/rossym.h + * PURPOSE: Handling of rossym symbol info + * + * PROGRAMMERS: Ge van Geldorp (gvg@reactos.com) + */ + +#ifndef REACTOS_ROSSYM_H_INCLUDED +#define REACTOS_ROSSYM_H_INCLUDED + +#define ROSSYM_SECTION_NAME ".rossym" + +typedef struct _ROSSYM_HEADER { + unsigned long SymbolsOffset; + unsigned long SymbolsLength; + unsigned long StringsOffset; + unsigned long StringsLength; +} ROSSYM_HEADER, *PROSSYM_HEADER; + +typedef struct _ROSSYM_ENTRY { + ULONG_PTR Address; + ULONG FunctionOffset; + ULONG FileOffset; + ULONG SourceLine; +} ROSSYM_ENTRY, *PROSSYM_ENTRY; + +typedef struct _ROSSYM_CALLBACKS { + PVOID (*AllocMemProc)(ULONG_PTR Size); + VOID (*FreeMemProc)(PVOID Area); + BOOLEAN (*ReadFileProc)(PVOID FileContext, PVOID Buffer, ULONG Size); + BOOLEAN (*SeekFileProc)(PVOID FileContext, ULONG_PTR Position); +} ROSSYM_CALLBACKS, *PROSSYM_CALLBACKS; + +typedef struct _ROSSYM_INFO *PROSSYM_INFO; + +VOID RosSymInit(PROSSYM_CALLBACKS Callbacks); +VOID RosSymInitKernelMode(VOID); +VOID RosSymInitUserMode(VOID); + +BOOLEAN RosSymCreateFromRaw(PVOID RawData, ULONG_PTR DataSize, + PROSSYM_INFO *RosSymInfo); +BOOLEAN RosSymCreateFromMem(PVOID ImageStart, ULONG_PTR ImageSize, + PROSSYM_INFO *RosSymInfo); +BOOLEAN RosSymCreateFromFile(PVOID FileContext, PROSSYM_INFO *RosSymInfo); +ULONG RosSymGetRawDataLength(PROSSYM_INFO RosSymInfo); +VOID RosSymGetRawData(PROSSYM_INFO RosSymInfo, PVOID RawData); +BOOLEAN RosSymGetAddressInformation(PROSSYM_INFO RosSymInfo, + ULONG_PTR RelativeAddress, + ULONG *LineNumber, + char *FileName, + char *FunctionName); +VOID RosSymDelete(PROSSYM_INFO RosSymInfo); + +#endif /* REACTOS_ROSSYM_H_INCLUDED */ + +/* EOF */ + diff --git a/reactos/lib/rossym/Makefile b/reactos/lib/rossym/Makefile new file mode 100644 index 00000000000..8fad567eef3 --- /dev/null +++ b/reactos/lib/rossym/Makefile @@ -0,0 +1,33 @@ +PATH_TO_TOP = ../.. + +TARGET_TYPE = library + +TARGET_NAME = rossym + +include $(PATH_TO_TOP)/config + +TARGET_CFLAGS = -Wall -Werror -ffreestanding -D__USE_W32API + +TARGET_OBJECTS = \ + delete.o \ + find.o \ + fromfile.o \ + frommem.o \ + fromraw.o \ + getraw.o \ + init.o \ + initkm.o \ + initum.o \ + zwfile.o + +include $(PATH_TO_TOP)/rules.mak + +include $(TOOLS_PATH)/helper.mk + +DEP_OBJECTS := $(TARGET_OBJECTS) + +TARGET_CLEAN = $(DEP_FILES) + +include $(PATH_TO_TOP)/tools/depend.mk + +# EOF diff --git a/reactos/lib/rossym/delete.c b/reactos/lib/rossym/delete.c new file mode 100644 index 00000000000..88740a63c4d --- /dev/null +++ b/reactos/lib/rossym/delete.c @@ -0,0 +1,24 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: lib/rossym/delete.c + * PURPOSE: Free rossym info + * + * PROGRAMMERS: Ge van Geldorp (gvg@reactos.com) + */ + +#define NTOSAPI +#include +#include +#include "rossympriv.h" + +#define NDEBUG +#include + +VOID +RosSymDelete(PROSSYM_INFO RosSymInfo) +{ + RosSymFreeMem(RosSymInfo); +} + +/* EOF */ diff --git a/reactos/lib/rossym/find.c b/reactos/lib/rossym/find.c new file mode 100644 index 00000000000..73c0681eaed --- /dev/null +++ b/reactos/lib/rossym/find.c @@ -0,0 +1,150 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: lib/rossym/find.c + * PURPOSE: Find symbol info for an address + * + * PROGRAMMERS: Ge van Geldorp (gvg@reactos.com) + */ +/* + * Parts of this file based on work Copyright (c) 1990, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#define NTOSAPI +#include +#include +#include "rossympriv.h" + +#define NDEBUG +#include + +static PROSSYM_ENTRY +FindEntry(IN PROSSYM_INFO RosSymInfo, IN ULONG_PTR RelativeAddress) +{ + /* + * Perform a binary search. + * + * The code below is a bit sneaky. After a comparison fails, we + * divide the work in half by moving either left or right. If lim + * is odd, moving left simply involves halving lim: e.g., when lim + * is 5 we look at item 2, so we change lim to 2 so that we will + * look at items 0 & 1. If lim is even, the same applies. If lim + * is odd, moving right again involes halving lim, this time moving + * the base up one item past p: e.g., when lim is 5 we change base + * to item 3 and make lim 2 so that we will look at items 3 and 4. + * If lim is even, however, we have to shrink it by one before + * halving: e.g., when lim is 4, we still looked at item 2, so we + * have to make lim 3, then halve, obtaining 1, so that we will only + * look at item 3. + */ + PROSSYM_ENTRY Base = RosSymInfo->Symbols; + ULONG Lim; + PROSSYM_ENTRY Mid, Low; + + if (RelativeAddress < Base->Address) + { + return NULL; + } + + Low = Base; + for (Lim = RosSymInfo->SymbolsCount; Lim != 0; Lim >>= 1) + { + Mid = Base + (Lim >> 1); + if (RelativeAddress == Mid->Address) + { + return Mid; + } + if (Mid->Address < RelativeAddress) /* key > mid: move right */ + { + Low = Mid; + Base = Mid + 1; + Lim--; + } /* else move left */ + } + + return Low; +} + + +BOOLEAN +RosSymGetAddressInformation(PROSSYM_INFO RosSymInfo, + ULONG_PTR RelativeAddress, + ULONG *LineNumber, + char *FileName, + char *FunctionName) +{ + PROSSYM_ENTRY RosSymEntry; + + DPRINT("RelativeAddress = 0x%08x\n", RelativeAddress); + + if (RosSymInfo->Symbols == NULL || RosSymInfo->SymbolsCount == 0 || + RosSymInfo->Strings == NULL || RosSymInfo->StringsLength == 0) + { +__asm__("int $3\n"); + DPRINT1("Uninitialized RosSymInfo\n"); + return FALSE; + } + + ASSERT(LineNumber || FileName || FunctionName); + + /* find symbol entry for function */ + RosSymEntry = FindEntry(RosSymInfo, RelativeAddress); + + if (NULL == RosSymEntry) + { + DPRINT("None of the requested information was found!\n"); + return FALSE; + } + + if (LineNumber != NULL) + { + *LineNumber = RosSymEntry->SourceLine; + } + if (FileName != NULL) + { + PCHAR Name = ""; + if (RosSymEntry->FileOffset != 0) + { + Name = (PCHAR) RosSymInfo->Strings + RosSymEntry->FileOffset; + } + strcpy(FileName, Name); + } + if (FunctionName != NULL) + { + PCHAR Name = ""; + if (RosSymEntry->FunctionOffset != 0) + { + Name = (PCHAR) RosSymInfo->Strings + RosSymEntry->FunctionOffset; + } + strcpy(FunctionName, Name); + } + + return TRUE; +} + +/* EOF */ diff --git a/reactos/lib/rossym/fromfile.c b/reactos/lib/rossym/fromfile.c new file mode 100644 index 00000000000..d02891d42d0 --- /dev/null +++ b/reactos/lib/rossym/fromfile.c @@ -0,0 +1,146 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: lib/rossym/fromfile.c + * PURPOSE: Creating rossym info from a file + * + * PROGRAMMERS: Ge van Geldorp (gvg@reactos.com) + */ + +#define NTOSAPI +#include +#include +#include "rossympriv.h" + +#define NDEBUG +#include + +BOOLEAN +RosSymCreateFromFile(PVOID FileContext, PROSSYM_INFO *RosSymInfo) +{ + IMAGE_DOS_HEADER DosHeader; + IMAGE_NT_HEADERS NtHeaders; + PIMAGE_SECTION_HEADER SectionHeaders, SectionHeader; + unsigned SectionIndex; + char SectionName[IMAGE_SIZEOF_SHORT_NAME]; + ROSSYM_HEADER RosSymHeader; + + /* Load DOS header */ + if (! RosSymReadFile(FileContext, &DosHeader, sizeof(IMAGE_DOS_HEADER))) + { + DPRINT1("Failed to read DOS header\n"); + return FALSE; + } + if (! ROSSYM_IS_VALID_DOS_HEADER(&DosHeader)) + { + DPRINT1("Image doesn't have a valid DOS header\n"); + return FALSE; + } + + /* Load NT headers */ + if (! RosSymSeekFile(FileContext, DosHeader.e_lfanew)) + { + DPRINT1("Failed seeking to NT headers\n"); + return FALSE; + } + if (! RosSymReadFile(FileContext, &NtHeaders, sizeof(IMAGE_NT_HEADERS))) + { + DPRINT1("Failed to read NT headers\n"); + return FALSE; + } + if (! ROSSYM_IS_VALID_NT_HEADERS(&NtHeaders)) + { + DPRINT1("Image doesn't have a valid PE header\n"); + return FALSE; + } + + /* Load section headers */ + if (! RosSymSeekFile(FileContext, (char *) IMAGE_FIRST_SECTION(&NtHeaders) - + (char *) &NtHeaders + DosHeader.e_lfanew)) + { + DPRINT1("Failed seeking to section headers\n"); + return FALSE; + } + SectionHeaders = RosSymAllocMem(NtHeaders.FileHeader.NumberOfSections + * sizeof(IMAGE_SECTION_HEADER)); + if (NULL == SectionHeaders) + { + DPRINT1("Failed to allocate memory for %u section headers\n", + NtHeaders.FileHeader.NumberOfSections); + return FALSE; + } + if (! RosSymReadFile(FileContext, SectionHeaders, + NtHeaders.FileHeader.NumberOfSections + * sizeof(IMAGE_SECTION_HEADER))) + { + RosSymFreeMem(SectionHeaders); + DPRINT1("Failed to read section headers\n"); + return FALSE; + } + + /* Search for the section header */ + strncpy(SectionName, ROSSYM_SECTION_NAME, IMAGE_SIZEOF_SHORT_NAME); + SectionHeader = SectionHeaders; + for (SectionIndex = 0; SectionIndex < NtHeaders.FileHeader.NumberOfSections; SectionIndex++) + { + if (0 == memcmp(SectionName, SectionHeader->Name, IMAGE_SIZEOF_SHORT_NAME)) + { + break; + } + SectionHeader++; + } + if (NtHeaders.FileHeader.NumberOfSections <= SectionIndex) + { + RosSymFreeMem(SectionHeaders); + DPRINT("No %s section found\n", ROSSYM_SECTION_NAME); + return FALSE; + } + + /* Load rossym header */ + if (! RosSymSeekFile(FileContext, SectionHeader->PointerToRawData)) + { + RosSymFreeMem(SectionHeaders); + DPRINT1("Failed seeking to section data\n"); + return FALSE; + } + RosSymFreeMem(SectionHeaders); + if (! RosSymReadFile(FileContext, &RosSymHeader, sizeof(ROSSYM_HEADER))) + { + DPRINT1("Failed to read rossym header\n"); + return FALSE; + } + if (RosSymHeader.SymbolsOffset < sizeof(ROSSYM_HEADER) + || RosSymHeader.StringsOffset < RosSymHeader.SymbolsOffset + RosSymHeader.SymbolsLength + || 0 != (RosSymHeader.SymbolsLength % sizeof(ROSSYM_ENTRY))) + { + DPRINT1("Invalid ROSSYM_HEADER\n"); + return FALSE; + } + + *RosSymInfo = RosSymAllocMem(sizeof(ROSSYM_INFO) - sizeof(ROSSYM_HEADER) + + RosSymHeader.StringsOffset + RosSymHeader.StringsLength + 1); + if (NULL == *RosSymInfo) + { + DPRINT1("Failed to allocate memory for rossym\n"); + return FALSE; + } + (*RosSymInfo)->Symbols = (PROSSYM_ENTRY)((char *) *RosSymInfo + sizeof(ROSSYM_INFO) + - sizeof(ROSSYM_HEADER) + RosSymHeader.SymbolsOffset); + (*RosSymInfo)->SymbolsCount = RosSymHeader.SymbolsLength / sizeof(ROSSYM_ENTRY); + (*RosSymInfo)->Strings = (PCHAR) *RosSymInfo + sizeof(ROSSYM_INFO) - sizeof(ROSSYM_HEADER) + + RosSymHeader.StringsOffset; + (*RosSymInfo)->StringsLength = RosSymHeader.StringsLength; + if (! RosSymReadFile(FileContext, *RosSymInfo + 1, + RosSymHeader.StringsOffset + RosSymHeader.StringsLength + - sizeof(ROSSYM_HEADER))) + { + DPRINT1("Failed to read rossym headers\n"); + return FALSE; + } + /* Make sure the last string is null terminated, we allocated an extra byte for that */ + (*RosSymInfo)->Strings[(*RosSymInfo)->StringsLength] = '\0'; + + return TRUE; +} + +/* EOF */ diff --git a/reactos/lib/rossym/frommem.c b/reactos/lib/rossym/frommem.c new file mode 100644 index 00000000000..866347e4822 --- /dev/null +++ b/reactos/lib/rossym/frommem.c @@ -0,0 +1,81 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: lib/rossym/frommem.c + * PURPOSE: Creating rossym info from an in-memory image + * + * PROGRAMMERS: Ge van Geldorp (gvg@reactos.com) + */ + +#define NTOSAPI +#include +#include +#include "rossympriv.h" + +#define NDEBUG +#include + +BOOLEAN +RosSymCreateFromMem(PVOID ImageStart, ULONG_PTR ImageSize, PROSSYM_INFO *RosSymInfo) +{ + PIMAGE_DOS_HEADER DosHeader; + PIMAGE_NT_HEADERS NtHeaders; + PIMAGE_SECTION_HEADER SectionHeader; + unsigned SectionIndex; + char SectionName[IMAGE_SIZEOF_SHORT_NAME]; + + /* Check if MZ header is valid */ + DosHeader = (PIMAGE_DOS_HEADER) ImageStart; + if (ImageSize < sizeof(IMAGE_DOS_HEADER) + || ! ROSSYM_IS_VALID_DOS_HEADER(DosHeader)) + { + DPRINT1("Image doesn't have a valid DOS header\n"); + return FALSE; + } + + /* Locate NT header */ + NtHeaders = (PIMAGE_NT_HEADERS)((char *) ImageStart + DosHeader->e_lfanew); + if (ImageSize < DosHeader->e_lfanew + sizeof(IMAGE_NT_HEADERS) + || ! ROSSYM_IS_VALID_NT_HEADERS(NtHeaders)) + { + DPRINT1("Image doesn't have a valid PE header\n"); + return FALSE; + } + + /* Search for the section header */ + SectionHeader = IMAGE_FIRST_SECTION(NtHeaders); + if (ImageSize < (char *) (SectionHeader + NtHeaders->FileHeader.NumberOfSections) + - (char *) ImageStart) + { + DPRINT1("Image doesn't have valid section headers\n"); + return FALSE; + } + strncpy(SectionName, ROSSYM_SECTION_NAME, IMAGE_SIZEOF_SHORT_NAME); + for (SectionIndex = 0; SectionIndex < NtHeaders->FileHeader.NumberOfSections; SectionIndex++) + { + if (0 == memcmp(SectionName, SectionHeader->Name, IMAGE_SIZEOF_SHORT_NAME)) + { + break; + } + SectionHeader++; + } + if (NtHeaders->FileHeader.NumberOfSections <= SectionIndex) + { + DPRINT("No %s section found\n", ROSSYM_SECTION_NAME); + return FALSE; + } + + /* Locate the section itself */ + if (ImageSize < SectionHeader->PointerToRawData + SectionHeader->SizeOfRawData + || SectionHeader->SizeOfRawData < sizeof(ROSSYM_HEADER)) + { + DPRINT1("Invalid %s section\n", ROSSYM_SECTION_NAME); + return FALSE; + } + + /* Load it */ + return RosSymCreateFromRaw((char *) ImageStart + SectionHeader->PointerToRawData, + SectionHeader->SizeOfRawData, RosSymInfo); +} + +/* EOF */ diff --git a/reactos/lib/rossym/fromraw.c b/reactos/lib/rossym/fromraw.c new file mode 100644 index 00000000000..7007a1b6975 --- /dev/null +++ b/reactos/lib/rossym/fromraw.c @@ -0,0 +1,55 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: lib/rossym/frommem.c + * PURPOSE: Creating rossym info from an in-memory image + * + * PROGRAMMERS: Ge van Geldorp (gvg@reactos.com) + */ + +#define NTOSAPI +#include +#include +#include "rossympriv.h" + +#define NDEBUG +#include + +BOOLEAN +RosSymCreateFromRaw(PVOID RawData, ULONG_PTR DataSize, PROSSYM_INFO *RosSymInfo) +{ + PROSSYM_HEADER RosSymHeader; + + RosSymHeader = (PROSSYM_HEADER) RawData; + if (RosSymHeader->SymbolsOffset < sizeof(ROSSYM_HEADER) + || RosSymHeader->StringsOffset < RosSymHeader->SymbolsOffset + RosSymHeader->SymbolsLength + || DataSize < RosSymHeader->StringsOffset + RosSymHeader->StringsLength + || 0 != (RosSymHeader->SymbolsLength % sizeof(ROSSYM_ENTRY))) + { + DPRINT1("Invalid ROSSYM_HEADER\n"); + return FALSE; + } + + /* Copy */ + *RosSymInfo = RosSymAllocMem(sizeof(ROSSYM_INFO) + RosSymHeader->SymbolsLength + + RosSymHeader->StringsLength + 1); + if (NULL == *RosSymInfo) + { + DPRINT1("Failed to allocate memory for rossym\n"); + return FALSE; + } + (*RosSymInfo)->Symbols = (PROSSYM_ENTRY)((char *) *RosSymInfo + sizeof(ROSSYM_INFO)); + (*RosSymInfo)->SymbolsCount = RosSymHeader->SymbolsLength / sizeof(ROSSYM_ENTRY); + (*RosSymInfo)->Strings = (PCHAR) *RosSymInfo + sizeof(ROSSYM_INFO) + RosSymHeader->SymbolsLength; + (*RosSymInfo)->StringsLength = RosSymHeader->StringsLength; + memcpy((*RosSymInfo)->Symbols, (char *) RosSymHeader + RosSymHeader->SymbolsOffset, + RosSymHeader->SymbolsLength); + memcpy((*RosSymInfo)->Strings, (char *) RosSymHeader + RosSymHeader->StringsOffset, + RosSymHeader->StringsLength); + /* Make sure the last string is null terminated, we allocated an extra byte for that */ + (*RosSymInfo)->Strings[(*RosSymInfo)->StringsLength] = '\0'; + + return TRUE; +} + +/* EOF */ diff --git a/reactos/lib/rossym/getraw.c b/reactos/lib/rossym/getraw.c new file mode 100644 index 00000000000..dd6cb17ab99 --- /dev/null +++ b/reactos/lib/rossym/getraw.c @@ -0,0 +1,43 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: lib/rossym/getraw.c + * PURPOSE: Convert rossym info to raw external format + * + * PROGRAMMERS: Ge van Geldorp (gvg@reactos.com) + */ + +#define NTOSAPI +#include +#include +#include "rossympriv.h" + +#define NDEBUG +#include + +ULONG +RosSymGetRawDataLength(PROSSYM_INFO RosSymInfo) +{ + return sizeof(ROSSYM_HEADER) + + RosSymInfo->SymbolsCount * sizeof(ROSSYM_ENTRY) + + RosSymInfo->StringsLength; +} + +VOID +RosSymGetRawData(PROSSYM_INFO RosSymInfo, PVOID RawData) +{ + PROSSYM_HEADER RosSymHeader; + + RosSymHeader = (PROSSYM_HEADER) RawData; + RosSymHeader->SymbolsOffset = sizeof(ROSSYM_HEADER); + RosSymHeader->SymbolsLength = RosSymInfo->SymbolsCount * sizeof(ROSSYM_ENTRY); + RosSymHeader->StringsOffset = RosSymHeader->SymbolsOffset + RosSymHeader->SymbolsLength; + RosSymHeader->StringsLength = RosSymInfo->StringsLength; + + memcpy((char *) RawData + RosSymHeader->SymbolsOffset, RosSymInfo->Symbols, + RosSymHeader->SymbolsLength); + memcpy((char *) RawData + RosSymHeader->StringsOffset, RosSymInfo->Strings, + RosSymHeader->StringsLength); +} + +/* EOF */ diff --git a/reactos/lib/rossym/init.c b/reactos/lib/rossym/init.c new file mode 100644 index 00000000000..354b74b2b49 --- /dev/null +++ b/reactos/lib/rossym/init.c @@ -0,0 +1,22 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: lib/rossym/data.c + * PURPOSE: Definition of external variables + * + * PROGRAMMERS: Ge van Geldorp (gvg@reactos.com) + */ + +#include +#include +#include "rossympriv.h" + +ROSSYM_CALLBACKS RosSymCallbacks; + +VOID +RosSymInit(PROSSYM_CALLBACKS Callbacks) +{ + RosSymCallbacks = *Callbacks; +} + +/* EOF */ diff --git a/reactos/lib/rossym/initkm.c b/reactos/lib/rossym/initkm.c new file mode 100644 index 00000000000..c6981391570 --- /dev/null +++ b/reactos/lib/rossym/initkm.c @@ -0,0 +1,46 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: lib/rossym/initkm.c + * PURPOSE: Initialize library for use in kernel mode + * + * PROGRAMMERS: Ge van Geldorp (gvg@reactos.com) + */ + +#define NTOSAPI +#include +#include +#include "rossympriv.h" + +#define NDEBUG +#include + +#define TAG_ROSSYM TAG('R', 'S', 'Y', 'M') + +static PVOID +RosSymAllocMemKM(ULONG_PTR Size) +{ + return ExAllocatePoolWithTag(NonPagedPool, Size, TAG_ROSSYM); +} + +static VOID +RosSymFreeMemKM(PVOID Area) +{ + return ExFreePool(Area); +} + +VOID +RosSymInitKernelMode(VOID) +{ + static ROSSYM_CALLBACKS KmCallbacks = + { + RosSymAllocMemKM, + RosSymFreeMemKM, + RosSymZwReadFile, + RosSymZwSeekFile + }; + + RosSymInit(&KmCallbacks); +} + +/* EOF */ diff --git a/reactos/lib/rossym/initum.c b/reactos/lib/rossym/initum.c new file mode 100644 index 00000000000..3c67da659e4 --- /dev/null +++ b/reactos/lib/rossym/initum.c @@ -0,0 +1,43 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: lib/rossym/initum.c + * PURPOSE: Initialize library for use in user mode + * + * PROGRAMMERS: Ge van Geldorp (gvg@reactos.com) + */ + +#include +#include +#include "rossympriv.h" + +#define NDEBUG +#include + +static PVOID +RosSymAllocMemUM(ULONG_PTR Size) +{ + return HeapAlloc(GetProcessHeap(), 0, Size); +} + +static VOID +RosSymFreeMemUM(PVOID Area) +{ + HeapFree(GetProcessHeap(), 0, Area); +} + +VOID +RosSymInitUserMode(VOID) +{ + static ROSSYM_CALLBACKS KmCallbacks = + { + RosSymAllocMemUM, + RosSymFreeMemUM, + RosSymZwReadFile, + RosSymZwSeekFile + }; + + RosSymInit(&KmCallbacks); +} + +/* EOF */ diff --git a/reactos/lib/rossym/rossympriv.h b/reactos/lib/rossym/rossympriv.h new file mode 100644 index 00000000000..b0b739ac5e9 --- /dev/null +++ b/reactos/lib/rossym/rossympriv.h @@ -0,0 +1,39 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: lib/rossym/rossympriv.h + * PURPOSE: Private header for rossym + * + * PROGRAMMERS: Ge van Geldorp (gvg@reactos.com) + */ + +#ifndef ROSSYMPRIV_H_INCLUDED +#define ROSSYMPRIV_H_INCLUDED + +typedef struct _ROSSYM_INFO { + PROSSYM_ENTRY Symbols; + ULONG SymbolsCount; + PCHAR Strings; + ULONG StringsLength; +} ROSSYM_INFO; + +extern ROSSYM_CALLBACKS RosSymCallbacks; + +#define RosSymAllocMem(Size) (*RosSymCallbacks.AllocMemProc)(Size) +#define RosSymFreeMem(Area) (*RosSymCallbacks.FreeMemProc)(Area) +#define RosSymReadFile(FileContext, Buffer, Size) (*RosSymCallbacks.ReadFileProc)((FileContext), (Buffer), (Size)) +#define RosSymSeekFile(FileContext, Position) (*RosSymCallbacks.SeekFileProc)((FileContext), (Position)) + +extern BOOLEAN RosSymZwReadFile(PVOID FileContext, PVOID Buffer, ULONG Size); +extern BOOLEAN RosSymZwSeekFile(PVOID FileContext, ULONG_PTR Position); + +#define ROSSYM_IS_VALID_DOS_HEADER(DosHeader) (IMAGE_DOS_SIGNATURE == (DosHeader)->e_magic \ + && 0L != (DosHeader)->e_lfanew) +#define ROSSYM_IS_VALID_NT_HEADERS(NtHeaders) (IMAGE_NT_SIGNATURE == (NtHeaders)->Signature \ + && IMAGE_NT_OPTIONAL_HDR_MAGIC == (NtHeaders)->OptionalHeader.Magic) + + +#endif /* ROSSYMPRIV_H_INCLUDED */ + +/* EOF */ + diff --git a/reactos/lib/rossym/zwfile.c b/reactos/lib/rossym/zwfile.c new file mode 100644 index 00000000000..8f7a6859f84 --- /dev/null +++ b/reactos/lib/rossym/zwfile.c @@ -0,0 +1,52 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: lib/rossym/zwfile.c + * PURPOSE: File I/O using native functions + * + * PROGRAMMERS: Ge van Geldorp (gvg@reactos.com) + */ + +#define NTOSAPI +#include +#include +#include "rossympriv.h" + +#define NDEBUG +#include + +BOOLEAN +RosSymZwReadFile(PVOID FileContext, PVOID Buffer, ULONG Size) +{ + NTSTATUS Status; + IO_STATUS_BLOCK IoStatusBlock; + + Status = ZwReadFile(*((HANDLE *) FileContext), + 0, 0, 0, + &IoStatusBlock, + Buffer, + Size, + 0, 0); + + return NT_SUCCESS(Status) && IoStatusBlock.Information == Size; +} + +BOOLEAN +RosSymZwSeekFile(PVOID FileContext, ULONG_PTR Position) +{ + NTSTATUS Status; + IO_STATUS_BLOCK IoStatusBlock; + FILE_POSITION_INFORMATION NewPosition; + + NewPosition.CurrentByteOffset.u.HighPart = 0; + NewPosition.CurrentByteOffset.u.LowPart = Position; + Status = ZwSetInformationFile(*((HANDLE *) FileContext), + &IoStatusBlock, + (PVOID) &NewPosition, + sizeof(FILE_POSITION_INFORMATION), + FilePositionInformation); + + return NT_SUCCESS(Status); +} + +/* EOF */ diff --git a/reactos/ntoskrnl/Makefile b/reactos/ntoskrnl/Makefile index b39a85af513..f13ab1ed6ee 100644 --- a/reactos/ntoskrnl/Makefile +++ b/reactos/ntoskrnl/Makefile @@ -39,7 +39,7 @@ else OBJECTS_KDBG := endif ifeq ($(DBG_OR_KDBG), 1) -OBJECTS_KDBG := $(OBJECTS_KDBG) dbg/kdb_stabs.o dbg/kdb_symbols.o dbg/profile.o +OBJECTS_KDBG := $(OBJECTS_KDBG) dbg/kdb_symbols.o dbg/profile.o endif TARGET_ASFLAGS = -I./include @@ -517,6 +517,7 @@ TARGET_LIBS = \ $(SDK_PATH_LIB)/libstring.a \ $(SDK_PATH_LIB)/librosrtl.a \ $(SDK_PATH_LIB)/libpseh.a \ + $(SDK_PATH_LIB)/librossym.a \ $(PATH_TO_TOP)/drivers/lib/csq/csq.o TARGET_LFLAGS = \ diff --git a/reactos/ntoskrnl/dbg/kdb.h b/reactos/ntoskrnl/dbg/kdb.h index ac67e4f3926..46c08762505 100644 --- a/reactos/ntoskrnl/dbg/kdb.h +++ b/reactos/ntoskrnl/dbg/kdb.h @@ -3,10 +3,10 @@ typedef struct _KDB_MODULE_INFO { - WCHAR Name[256]; - ULONG_PTR Base; - ULONG Size; - PIMAGE_SYMBOL_INFO SymbolInfo; + WCHAR Name[256]; + ULONG_PTR Base; + ULONG Size; + PROSSYM_INFO RosSymInfo; } KDB_MODULE_INFO, *PKDB_MODULE_INFO; /* from kdb_symbols.c */ @@ -27,24 +27,13 @@ BOOLEAN KdbSymPrintAddress(IN PVOID Address); NTSTATUS -KdbSymGetAddressInformation(IN PIMAGE_SYMBOL_INFO SymbolInfo, +KdbSymGetAddressInformation(IN PROSSYM_INFO RosSymInfo, IN ULONG_PTR RelativeAddress, OUT PULONG LineNumber OPTIONAL, OUT PCH FileName OPTIONAL, OUT PCH FunctionName OPTIONAL); -BOOLEAN -KdbpSymGetSourceAddress(IN PIMAGE_SYMBOL_INFO SymbolInfo, - IN PCHAR FileName, - IN ULONG LineNumber OPTIONAL, - IN PCHAR FuncName OPTIONAL, - OUT PVOID *Address); - /* other functions */ -/*NTSTATUS -KdbSafeReadMemory(PVOID dst, PVOID src, INT size); -NTSTATUS -KdbSafeWriteMemory(PVOID dst, PVOID src, INT size);*/ #define KdbpSafeReadMemory(dst, src, size) MmSafeCopyFromUser(dst, src, size) #define KdbpSafeWriteMemory(dst, src, size) MmSafeCopyToUser(dst, src, size) CHAR diff --git a/reactos/ntoskrnl/dbg/kdb_stabs.c b/reactos/ntoskrnl/dbg/kdb_stabs.c deleted file mode 100644 index 2bb9f986840..00000000000 --- a/reactos/ntoskrnl/dbg/kdb_stabs.c +++ /dev/null @@ -1,102 +0,0 @@ -/* $Id:$ - * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS kernel - * FILE: ntoskrnl/dbg/kdb_stabs.c - * PURPOSE: Stabs functions... - * - * PROGRAMMERS: Gregor Anich (blight@blight.eu.org) - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define NDEBUG -#include - -#include "kdb.h" -#include "kdb_stabs.h" - - -/*! \brief Find a stab entry... - * - * Looks through the stab for an entry which matches the specified criteria. - * - * \param SymbolInfo Pointer to the symbol info. - * \param Type Type of stab entry to look for. - * \param RelativeAddress Relative address of stab to look for. - * \param StartEntry Starting stab entry. - * - * \returns Pointer to a STAB_ENTRY - * \retval NULL No entry found. - */ -PSTAB_ENTRY -KdbpStabFindEntry(IN PIMAGE_SYMBOL_INFO SymbolInfo, - IN CHAR Type, - IN PVOID RelativeAddress OPTIONAL, - IN PSTAB_ENTRY StartEntry OPTIONAL) -{ - PSTAB_ENTRY StabEntry, BestStabEntry = NULL; - PVOID StabsEnd; - ULONG_PTR AddrFound = 0; - - StabEntry = SymbolInfo->StabsBase; - StabsEnd = (PVOID)((ULONG_PTR)SymbolInfo->StabsBase + SymbolInfo->StabsLength); - if (StartEntry != NULL) - { - ASSERT((ULONG_PTR)StartEntry >= (ULONG_PTR)StabEntry); - if ((ULONG_PTR)StartEntry >= (ULONG_PTR)StabsEnd) - return NULL; - StabEntry = StartEntry; - } - - if ( RelativeAddress != NULL ) - { - for (; (ULONG_PTR)StabEntry < (ULONG_PTR)StabsEnd; StabEntry++) - { - ULONG_PTR SymbolRelativeAddress; - - if (StabEntry->n_type != Type) - continue; - - if (RelativeAddress != NULL) - { - if (StabEntry->n_value >= SymbolInfo->ImageSize) - continue; - - SymbolRelativeAddress = StabEntry->n_value; - if ((SymbolRelativeAddress <= (ULONG_PTR)RelativeAddress) && - (SymbolRelativeAddress > AddrFound)) - { - AddrFound = SymbolRelativeAddress; - BestStabEntry = StabEntry; - } - } - } - } - else - BestStabEntry = StabEntry; - - if (BestStabEntry == NULL) - { - DPRINT("StabEntry not found!\n"); - } - else - { - DPRINT("StabEntry found!\n"); - } - - return BestStabEntry; -} diff --git a/reactos/ntoskrnl/dbg/kdb_stabs.h b/reactos/ntoskrnl/dbg/kdb_stabs.h deleted file mode 100644 index 00e4c087335..00000000000 --- a/reactos/ntoskrnl/dbg/kdb_stabs.h +++ /dev/null @@ -1,69 +0,0 @@ -#ifndef __KDB_STABS_H__ -#define __KDB_STABS_H__ - -typedef struct _STAB_ENTRY { - unsigned long n_strx; /* index into string table of name */ - unsigned char n_type; /* type of symbol */ - unsigned char n_other; /* misc info (usually empty) */ - unsigned short n_desc; /* description field */ - unsigned long n_value; /* value of symbol */ -} STAB_ENTRY, *PSTAB_ENTRY; - -/* - * String - Function name with type information - * Desc - Line number - * Value - Absolute virtual address - */ -#define N_FUN 0x24 - -/* - * Desc - Line number - * Value - Relative virtual address - */ -#define N_SLINE 0x44 - -/* - * String - First ending with a '/' is the compillation directory (CD) - * Not ending with a '/' is a source file relative to CD - */ -#define N_SO 0x64 - -/* - * String - Variable name with type information - * Value - Register - */ -#define N_RSYM 0x40 - -/* - * String - Variable name with type information - * Value - Offset of variable within local variables (from %ebp) - */ -#define N_LSYM 0x80 - -#define N_SOL 0x84 - - -#define N_PSYM 0xa0 - -/* - * Value - Start address of code block - */ -#define N_LBRAC 0xc0 - -/* - * Value - End address of code block - */ -#define N_RBRAC 0xe0 - - -/* - * Functions - */ - -PSTAB_ENTRY -KdbpStabFindEntry(IN PIMAGE_SYMBOL_INFO SymbolInfo, - IN CHAR Type, - IN PVOID RelativeAddress OPTIONAL, - IN PSTAB_ENTRY StartEntry OPTIONAL); - -#endif /* __KDB_STABS_H__ */ diff --git a/reactos/ntoskrnl/dbg/kdb_symbols.c b/reactos/ntoskrnl/dbg/kdb_symbols.c index d01e3791d1f..bd2dfb35e67 100644 --- a/reactos/ntoskrnl/dbg/kdb_symbols.c +++ b/reactos/ntoskrnl/dbg/kdb_symbols.c @@ -1,34 +1,4 @@ -/* - * Parts of this file based on work Copyright (c) 1990, 1993 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/dbg/kdb_symbols.c @@ -53,43 +23,24 @@ #include #include #include -#include +#include #define NDEBUG #include #include "kdb.h" -#include "kdb_stabs.h" /* GLOBALS ******************************************************************/ -typedef struct _SYMBOLFILE_HEADER { - ULONG StabsOffset; - ULONG StabsLength; - ULONG StabstrOffset; - ULONG StabstrLength; - ULONG SymbolsOffset; - ULONG SymbolsLength; - ULONG SymbolstrOffset; - ULONG SymbolstrLength; -} SYMBOLFILE_HEADER, *PSYMBOLFILE_HEADER; +#define TAG_KDBS TAG('K', 'D', 'B', 'S') typedef struct _IMAGE_SYMBOL_INFO_CACHE { LIST_ENTRY ListEntry; ULONG RefCount; UNICODE_STRING FileName; - PVOID FileBuffer; - PVOID StabsBase; - ULONG StabsLength; - PVOID StabStringsBase; - ULONG StabStringsLength; - PVOID SymbolsBase; - ULONG SymbolsLength; - PVOID SymbolStringsBase; - ULONG SymbolStringsLength; + PROSSYM_INFO RosSymInfo; } IMAGE_SYMBOL_INFO_CACHE, *PIMAGE_SYMBOL_INFO_CACHE; - static LIST_ENTRY SymbolFileListHead; static KSPIN_LOCK SymbolFileListLock; @@ -152,7 +103,7 @@ KdbpSymFindUserModule(IN PVOID Address OPTIONAL, pInfo->Name[Length] = L'\0'; pInfo->Base = (ULONG_PTR)current->BaseAddress; pInfo->Size = current->SizeOfImage; - pInfo->SymbolInfo = ¤t->SymbolInfo; + pInfo->RosSymInfo = current->RosSymInfo; return TRUE; } current_entry = current_entry->Flink; @@ -194,7 +145,7 @@ KdbpSymFindModule(IN PVOID Address OPTIONAL, pInfo->Name[255] = L'\0'; pInfo->Base = (ULONG_PTR)current->Base; pInfo->Size = current->Length; - pInfo->SymbolInfo = ¤t->SymbolInfo; + pInfo->RosSymInfo = current->RosSymInfo; return TRUE; } current_entry = current_entry->Flink; @@ -285,7 +236,7 @@ KdbSymPrintAddress(IN PVOID Address) return FALSE; RelativeAddress = (ULONG_PTR) Address - Info.Base; - Status = KdbSymGetAddressInformation(Info.SymbolInfo, + Status = KdbSymGetAddressInformation(Info.RosSymInfo, RelativeAddress, &LineNumber, FileName, @@ -303,72 +254,11 @@ KdbSymPrintAddress(IN PVOID Address) return TRUE; } -/*! \brief Find a COFF symbol entry... - * - * Finds the COFF symbol as close as possible before the specified address - * - * \param SymbolInfo Pointer to the symbol info. - * \param RelativeAddress Relative address of address to look for. - * - * \returns Pointer to a external_syment - * \retval NULL No entry found. - */ -static struct external_syment * -KdbpSymbolsFindEntry(IN PIMAGE_SYMBOL_INFO SymbolInfo, - IN ULONG_PTR RelativeAddress) -{ - /* - * Perform a binary search. - * - * The code below is a bit sneaky. After a comparison fails, we - * divide the work in half by moving either left or right. If lim - * is odd, moving left simply involves halving lim: e.g., when lim - * is 5 we look at item 2, so we change lim to 2 so that we will - * look at items 0 & 1. If lim is even, the same applies. If lim - * is odd, moving right again involes halving lim, this time moving - * the base up one item past p: e.g., when lim is 5 we change base - * to item 3 and make lim 2 so that we will look at items 3 and 4. - * If lim is even, however, we have to shrink it by one before - * halving: e.g., when lim is 4, we still looked at item 2, so we - * have to make lim 3, then halve, obtaining 1, so that we will only - * look at item 3. - */ - struct external_syment *Base = (struct external_syment *) SymbolInfo->SymbolsBase; - ULONG Lim; - struct external_syment *Mid, *Low; - - if (SymbolInfo->SymbolsLength < sizeof(struct external_syment) - || RelativeAddress < Base->e_value) - { - return NULL; - } - - Low = Base; - for (Lim = SymbolInfo->SymbolsLength / sizeof(struct external_syment); Lim != 0; Lim >>= 1) - { - Mid = Base + (Lim >> 1); - if (RelativeAddress == Mid->e_value) - { - return Mid; - } - if (Mid->e_value < RelativeAddress) /* key > mid: move right */ - { - Low = Mid; - Base = Mid + 1; - Lim--; - } /* else move left */ - } - - ASSERT(Low->e_value < RelativeAddress); - - return Low; -} - /*! \brief Get information for an address (source file, line number, * function name) * - * \param SymbolInfo Pointer to IMAGE_SYMBOL_INFO. + * \param SymbolInfo Pointer to ROSSYM_INFO. * \param RelativeAddress Relative address to look up. * \param LineNumber Pointer to an ULONG which is filled with the line * number (can be NULL) @@ -382,271 +272,26 @@ KdbpSymbolsFindEntry(IN PIMAGE_SYMBOL_INFO SymbolInfo, * \retval STATUS_UNSUCCESSFUL None of the requested information was found. */ NTSTATUS -KdbSymGetAddressInformation(IN PIMAGE_SYMBOL_INFO SymbolInfo, +KdbSymGetAddressInformation(IN PROSSYM_INFO RosSymInfo, IN ULONG_PTR RelativeAddress, OUT PULONG LineNumber OPTIONAL, OUT PCH FileName OPTIONAL, OUT PCH FunctionName OPTIONAL) { - PSTAB_ENTRY StabsFunctionEntry = NULL, FileEntry = NULL, LineEntry = NULL; - struct external_syment *SymbolsFunctionEntry = NULL; - - DPRINT("RelativeAddress = 0x%08x\n", RelativeAddress); - - if (SymbolInfo->StabsBase == NULL || SymbolInfo->StabsLength == 0 || - SymbolInfo->StabStringsBase == NULL || SymbolInfo->StabStringsLength == 0) + if (NULL == RosSymInfo) { return STATUS_UNSUCCESSFUL; } -#ifdef PEDANTIC_STABS - if (RelativeAddress >= SymbolInfo->ImageSize) + if (! RosSymGetAddressInformation(RosSymInfo, RelativeAddress, LineNumber, + FileName, FunctionName)) { - DPRINT("Address is not within .text section. RelativeAddress %p Length 0x%x\n", - RelativeAddress, SymbolInfo->ImageSize); return STATUS_UNSUCCESSFUL; } -#endif - - ASSERT(LineNumber || FileName || FunctionName); - - if (LineNumber != NULL || FunctionName != NULL) - { - /* find stab entry for function */ - StabsFunctionEntry = KdbpStabFindEntry(SymbolInfo, N_FUN, (PVOID)RelativeAddress, NULL); - if (StabsFunctionEntry == NULL) - { - DPRINT("No function stab entry found. RelativeAddress %p\n", RelativeAddress); - } - - if (LineNumber != NULL && StabsFunctionEntry != NULL) - { - /* find stab entry for line number */ - ULONG_PTR FunctionRelativeAddress = RelativeAddress - StabsFunctionEntry->n_value; - ULONG_PTR AddrFound = 0; - PSTAB_ENTRY NextLineEntry; - - LineEntry = NextLineEntry = StabsFunctionEntry; - while (NextLineEntry != NULL) - { - NextLineEntry++; - if ((ULONG_PTR)NextLineEntry >= ((ULONG_PTR)SymbolInfo->StabsBase + SymbolInfo->StabsLength)) - break; - if (NextLineEntry->n_type == N_FUN) - break; - if (NextLineEntry->n_type != N_SLINE) - continue; - - if ( NextLineEntry->n_value <= FunctionRelativeAddress - && NextLineEntry->n_value >= AddrFound ) - { - AddrFound = NextLineEntry->n_value; - LineEntry = NextLineEntry; - } - } - } - } - - if (FunctionName != NULL - && SymbolInfo->SymbolsBase != NULL && SymbolInfo->SymbolsLength != 0 - && SymbolInfo->SymbolStringsBase != NULL && SymbolInfo->SymbolStringsLength != 0) - { - /* find symbol entry for function */ - SymbolsFunctionEntry = KdbpSymbolsFindEntry(SymbolInfo, RelativeAddress); - } - - if (FileName != NULL) - { - /* find stab entry for file name */ - PCHAR p; - INT Length; - - FileEntry = KdbpStabFindEntry(SymbolInfo, N_SO, (PVOID)RelativeAddress, NULL); - if (FileEntry != NULL) - { - p = (PCHAR)SymbolInfo->StabStringsBase + FileEntry->n_strx; - Length = strlen(p); - if (p[Length - 1] == '/' || p[Length - 1] == '\\') /* source dir */ - FileEntry = KdbpStabFindEntry(SymbolInfo, N_SO, (PVOID)RelativeAddress, FileEntry + 1); - } - if (FileEntry == NULL) - { - DPRINT("No filename stab entry found. RelativeAddress %p\n", RelativeAddress); - } - } - - if (((LineNumber != NULL && LineEntry == NULL) || LineNumber == NULL) && - ((FileName != NULL && FileEntry == NULL) || FileName == NULL) && - ((FunctionName != NULL && StabsFunctionEntry == NULL && SymbolsFunctionEntry == NULL) || - FunctionName == NULL)) - { - DPRINT("None of the requested information was found!\n"); - return STATUS_UNSUCCESSFUL; - } - - if (LineNumber != NULL) - { - *LineNumber = 0; - if (LineEntry != NULL) - *LineNumber = LineEntry->n_desc; - } - if (FileName != NULL) - { - PCHAR Name = ""; - if (FileEntry != NULL) - { - Name = (PCHAR)SymbolInfo->StabStringsBase + FileEntry->n_strx; - } - strcpy(FileName, Name); - } - if (FunctionName != NULL) - { - PCHAR Name = "", p; - if (StabsFunctionEntry != NULL) - { - if (SymbolsFunctionEntry == NULL || - SymbolsFunctionEntry->e_value <= StabsFunctionEntry->n_value) - { - Name = (PCHAR)SymbolInfo->StabStringsBase + StabsFunctionEntry->n_strx; - strcpy(FunctionName, Name); - if ((p = strchr(FunctionName, ':')) != NULL) /* remove extra info from function name */ - { - *p = '\0'; - } - } - else if (SymbolsFunctionEntry != NULL) - { - if (SymbolsFunctionEntry->e.e.e_zeroes == 0) - { - Name = (PCHAR) SymbolInfo->SymbolStringsBase + SymbolsFunctionEntry->e.e.e_offset; - strcpy(FunctionName, Name); - } - else - { - memcpy(FunctionName, SymbolsFunctionEntry->e.e_name, E_SYMNMLEN); - FunctionName[E_SYMNMLEN] = '\0'; - } - } - } - else if (SymbolsFunctionEntry != NULL) - { - if (SymbolsFunctionEntry->e.e.e_zeroes == 0) - { - Name = (PCHAR) SymbolInfo->SymbolStringsBase + SymbolsFunctionEntry->e.e.e_offset; - strcpy(FunctionName, Name); - } - else - { - memcpy(FunctionName, SymbolsFunctionEntry->e.e_name, E_SYMNMLEN); - FunctionName[E_SYMNMLEN] = '\0'; - } - } - else - { - FunctionName[0] = '\0'; - } - } return STATUS_SUCCESS; } - -/*! \brief Get absolute source-line number or function address - * - * \param SymbolInfo IMAGE_SYMBOL_INFO of the module containing source file/line number. - * \param FileName Source filename. - * \param LineNumber Line number in source file. - * \param FuncName Function name. - * \param Address Filled with the address on success. - * - * \retval TRUE Success. - * \retval FALSE Failure. - */ -BOOLEAN -KdbpSymGetSourceAddress(IN PIMAGE_SYMBOL_INFO SymbolInfo, - IN PCHAR FileName, - IN ULONG LineNumber OPTIONAL, - IN PCHAR FuncName OPTIONAL, - OUT PVOID *Address) -{ - PSTAB_ENTRY Entry, FunctionEntry = NULL; - PCHAR SymbolName, p; - CHAR Buffer[512] = ""; - INT Length, FileNameLength, FuncNameLength = 0; - - if (FuncName == NULL && LineNumber < 1) - return FALSE; - - FileNameLength = strlen(FileName); - FuncNameLength = strlen(FuncName); - for (Entry = SymbolInfo->StabsBase; - (ULONG_PTR)Entry < (ULONG_PTR)(SymbolInfo->StabsBase + SymbolInfo->StabsLength); - Entry++) - { - if (Entry->n_type != N_SO) - continue; - - SymbolName = (PCHAR)SymbolInfo->StabStringsBase + Entry->n_strx; - Length = strlen(SymbolName); - if (SymbolName[Length - 1] == '/' || - SymbolName[Length - 1] == '\\') - { - strncpy(Buffer, SymbolName, sizeof (Buffer) - 1); - Buffer[sizeof (Buffer) - 1] = '\0'; - continue; - } - strncat(Buffer, SymbolName, sizeof (Buffer) - 1); - Buffer[sizeof (Buffer) - 1] = '\0'; - - Length = strlen(Buffer); - if (strcmp(Buffer + Length - FileNameLength, FileName) != 0) - continue; - - Entry++; - for (;(ULONG_PTR)Entry < (ULONG_PTR)(SymbolInfo->StabsBase + SymbolInfo->StabsLength); - Entry++) - { - if (Entry->n_type == N_FUN) - FunctionEntry = Entry; - else if (Entry->n_type == N_SO) - break; - else if (Entry->n_type != N_SLINE || LineNumber < 1) - continue; - - if (LineNumber > 0 && Entry->n_desc != LineNumber) - continue; - else /* if (FunctionName != NULL) */ - { - SymbolName = (PCHAR)SymbolInfo->StabStringsBase + Entry->n_strx; - p = strchr(SymbolName, ':'); - if (p == NULL) - return FALSE; - Length = p - SymbolName; - if (Length != FuncNameLength) - continue; - if (strncmp(FuncName, SymbolName, Length) != 0) - continue; - } - - /* found */ - if (Entry->n_type == N_FUN) - { - *Address = (PVOID)Entry->n_value; /* FIXME: relocate address */ - return TRUE; - } - - if (FunctionEntry == NULL) - return FALSE; - - *Address = (PVOID)((ULONG_PTR)Entry->n_value + FunctionEntry->n_value); /* FIXME: relocate address */ - return TRUE; - } - break; - } - - return FALSE; -} - /*! \brief Find cached symbol file. * * Looks through the list of cached symbol files and tries to find an already @@ -659,7 +304,7 @@ KdbpSymGetSourceAddress(IN PIMAGE_SYMBOL_INFO SymbolInfo, * * \sa KdbpSymAddCachedFile */ -STATIC PIMAGE_SYMBOL_INFO_CACHE +STATIC PROSSYM_INFO KdbpSymFindCachedFile(IN PUNICODE_STRING FileName) { PIMAGE_SYMBOL_INFO_CACHE Current; @@ -681,7 +326,7 @@ KdbpSymFindCachedFile(IN PUNICODE_STRING FileName) Current->RefCount++; KeReleaseSpinLock(&SymbolFileListLock, Irql); DPRINT("Found cached file!\n"); - return Current; + return Current->RosSymInfo; } CurrentEntry = CurrentEntry->Flink; @@ -696,37 +341,28 @@ KdbpSymFindCachedFile(IN PUNICODE_STRING FileName) /*! \brief Add a symbol file to the cache. * * \param FileName Filename of the symbol file. - * \param SymbolInfo Pointer to the symbol info. + * \param RosSymInfo Pointer to the symbol info. * * \sa KdbpSymRemoveCachedFile */ STATIC VOID KdbpSymAddCachedFile(IN PUNICODE_STRING FileName, - IN PIMAGE_SYMBOL_INFO SymbolInfo) + IN PROSSYM_INFO RosSymInfo) { PIMAGE_SYMBOL_INFO_CACHE CacheEntry; - DPRINT("Adding symbol file: FileBuffer = %p, ImageBase = %p\n", - SymbolInfo->FileBuffer, SymbolInfo->ImageBase); + DPRINT("Adding symbol file: RosSymInfo = %p\n", RosSymInfo); /* allocate entry */ - CacheEntry = ExAllocatePool(NonPagedPool, sizeof (IMAGE_SYMBOL_INFO_CACHE)); + CacheEntry = ExAllocatePoolWithTag(NonPagedPool, sizeof (IMAGE_SYMBOL_INFO_CACHE), TAG_KDBS); ASSERT(CacheEntry); RtlZeroMemory(CacheEntry, sizeof (IMAGE_SYMBOL_INFO_CACHE)); /* fill entry */ - RtlpCreateUnicodeString(&CacheEntry->FileName, FileName->Buffer, NonPagedPool); + RtlpCreateUnicodeString(&CacheEntry->FileName, FileName->Buffer, PagedPool); ASSERT(CacheEntry->FileName.Buffer); CacheEntry->RefCount = 1; - CacheEntry->FileBuffer = SymbolInfo->FileBuffer; - CacheEntry->StabsBase = SymbolInfo->StabsBase; - CacheEntry->StabsLength = SymbolInfo->StabsLength; - CacheEntry->StabStringsBase = SymbolInfo->StabStringsBase; - CacheEntry->StabStringsLength = SymbolInfo->StabStringsLength; - CacheEntry->SymbolsBase = SymbolInfo->SymbolsBase; - CacheEntry->SymbolsLength = SymbolInfo->SymbolsLength; - CacheEntry->SymbolStringsBase = SymbolInfo->SymbolStringsBase; - CacheEntry->SymbolStringsLength = SymbolInfo->SymbolStringsLength; + CacheEntry->RosSymInfo = RosSymInfo; InsertTailList(&SymbolFileListHead, &CacheEntry->ListEntry); /* FIXME: Lock list? */ } @@ -736,12 +372,12 @@ KdbpSymAddCachedFile(IN PUNICODE_STRING FileName, * it's reference count. If the refcount is 0 after decreasing it the cache * entry will be removed from the list and freed. * - * \param SymbolInfo Pointer to the symbol info. + * \param RosSymInfo Pointer to the symbol info. * * \sa KdbpSymAddCachedFile */ STATIC VOID -KdbpSymRemoveCachedFile(IN PIMAGE_SYMBOL_INFO SymbolInfo) +KdbpSymRemoveCachedFile(IN PROSSYM_INFO RosSymInfo) { PIMAGE_SYMBOL_INFO_CACHE Current; PLIST_ENTRY CurrentEntry; @@ -754,14 +390,14 @@ KdbpSymRemoveCachedFile(IN PIMAGE_SYMBOL_INFO SymbolInfo) { Current = CONTAINING_RECORD(CurrentEntry, IMAGE_SYMBOL_INFO_CACHE, ListEntry); - if (Current->FileBuffer == SymbolInfo->FileBuffer) /* found */ + if (Current->RosSymInfo == RosSymInfo) /* found */ { ASSERT(Current->RefCount > 0); Current->RefCount--; if (Current->RefCount < 1) { RemoveEntryList(&Current->ListEntry); - ExFreePool(Current->FileBuffer); + RosSymDelete(Current->RosSymInfo); ExFreePool(Current); } KeReleaseSpinLock(&SymbolFileListLock, Irql); @@ -772,84 +408,46 @@ KdbpSymRemoveCachedFile(IN PIMAGE_SYMBOL_INFO SymbolInfo) } KeReleaseSpinLock(&SymbolFileListLock, Irql); - DPRINT1("Warning: Removing unknown symbol file: FileBuffer = %p, ImageBase = %p\n", - SymbolInfo->FileBuffer, SymbolInfo->ImageBase); + DPRINT1("Warning: Removing unknown symbol file: RosSymInfo = %p\n", RosSymInfo); } /*! \brief Loads a symbol file. * * \param FileName Filename of the symbol file to load. - * \param SymbolInfo Pointer to a SymbolInfo which gets filled. + * \param RosSymInfo Pointer to a ROSSYM_INFO which gets filled. * * \sa KdbpSymUnloadModuleSymbols */ STATIC VOID KdbpSymLoadModuleSymbols(IN PUNICODE_STRING FileName, - OUT PIMAGE_SYMBOL_INFO SymbolInfo) + OUT PROSSYM_INFO *RosSymInfo) { - FILE_STANDARD_INFORMATION FileStdInfo; OBJECT_ATTRIBUTES ObjectAttributes; - WCHAR TmpFileName[MAX_PATH]; - UNICODE_STRING SymFileName; - LPWSTR Start, Ext; HANDLE FileHandle; - PVOID FileBuffer; NTSTATUS Status; - ULONG Length; IO_STATUS_BLOCK IoStatusBlock; - PSYMBOLFILE_HEADER SymbolFileHeader; - PIMAGE_SYMBOL_INFO_CACHE CachedSymbolFile; #ifdef KDBG /* Allow KDB to break on module load */ KdbModuleLoaded(FileName); #endif - /* Get the path to the symbol store */ - wcscpy(TmpFileName, L"\\SystemRoot\\symbols\\"); - - /* Get the symbol filename from the module name */ - Start = wcsrchr(FileName->Buffer, L'\\'); - if (Start == NULL) - Start = FileName->Buffer; - else - Start++; - - Ext = wcsrchr(FileName->Buffer, L'.'); - if (Ext != NULL) - Length = Ext - Start; - else - Length = wcslen(Start); - - wcsncat(TmpFileName, Start, Length); - wcscat(TmpFileName, L".sym"); - RtlInitUnicodeString(&SymFileName, TmpFileName); - /* Try to find cached (already loaded) symbol file */ - CachedSymbolFile = KdbpSymFindCachedFile(&SymFileName); - if (CachedSymbolFile != NULL) + *RosSymInfo = KdbpSymFindCachedFile(FileName); + if (*RosSymInfo != NULL) { - DPRINT("Found cached symbol file %wZ\n", &SymFileName); - SymbolInfo->FileBuffer = CachedSymbolFile->FileBuffer; - SymbolInfo->StabsBase = CachedSymbolFile->StabsBase; - SymbolInfo->StabsLength = CachedSymbolFile->StabsLength; - SymbolInfo->StabStringsBase = CachedSymbolFile->StabStringsBase; - SymbolInfo->StabStringsLength = CachedSymbolFile->StabStringsLength; - SymbolInfo->SymbolsBase = CachedSymbolFile->SymbolsBase; - SymbolInfo->SymbolsLength = CachedSymbolFile->SymbolsLength; - SymbolInfo->SymbolStringsBase = CachedSymbolFile->SymbolStringsBase; - SymbolInfo->SymbolStringsLength = CachedSymbolFile->SymbolStringsLength; + DPRINT("Found cached symbol file %wZ\n", FileName); return; } /* Open the file */ InitializeObjectAttributes(&ObjectAttributes, - &SymFileName, + FileName, 0, NULL, NULL); - DPRINT("Attempting to open symbols: %wZ\n", &SymFileName); + DPRINT("Attempting to open image: %wZ\n", FileName); Status = ZwOpenFile(&FileHandle, FILE_ALL_ACCESS, @@ -859,50 +457,15 @@ KdbpSymLoadModuleSymbols(IN PUNICODE_STRING FileName, FILE_SYNCHRONOUS_IO_NONALERT|FILE_NO_INTERMEDIATE_BUFFERING); if (!NT_SUCCESS(Status)) { - DPRINT("Could not open symbol file: %wZ\n", &SymFileName); + DPRINT("Could not open image file: %wZ\n", &FileName); return; } - DPRINT("Loading symbols from %wZ...\n", &SymFileName); + DPRINT("Loading symbols from %wZ...\n", FileName); - /* Get the size of the file */ - Status = ZwQueryInformationFile(FileHandle, - &IoStatusBlock, - &FileStdInfo, - sizeof(FileStdInfo), - FileStandardInformation); - if (!NT_SUCCESS(Status)) + if (! RosSymCreateFromFile(&FileHandle, RosSymInfo)) { - DPRINT("Could not get file size\n"); - ZwClose(FileHandle); - return; - } - - DPRINT("Symbol file is %08x bytes\n", FileStdInfo.EndOfFile.u.LowPart); - - /* Allocate nonpageable memory for symbol file */ - FileBuffer = ExAllocatePool(NonPagedPool, - FileStdInfo.AllocationSize.u.LowPart); - - if (FileBuffer == NULL) - { - DPRINT("Could not allocate memory for symbol file\n"); - ZwClose(FileHandle); - return; - } - - /* Load file into memory chunk */ - Status = ZwReadFile(FileHandle, - 0, 0, 0, - &IoStatusBlock, - FileBuffer, - FileStdInfo.EndOfFile.u.LowPart, - 0, 0); - if (!NT_SUCCESS(Status) && Status != STATUS_END_OF_FILE) - { - DPRINT("Could not read symbol file into memory (Status 0x%x)\n", Status); - ExFreePool(FileBuffer); - ZwClose(FileHandle); + DPRINT("Failed to load symbols from %wZ\n", FileName); return; } @@ -910,50 +473,26 @@ KdbpSymLoadModuleSymbols(IN PUNICODE_STRING FileName, DPRINT("Symbols loaded.\n"); - SymbolFileHeader = (PSYMBOLFILE_HEADER) FileBuffer; - SymbolInfo->FileBuffer = FileBuffer; - SymbolInfo->StabsBase = FileBuffer + SymbolFileHeader->StabsOffset; - SymbolInfo->StabsLength = SymbolFileHeader->StabsLength; - SymbolInfo->StabStringsBase = FileBuffer + SymbolFileHeader->StabstrOffset; - SymbolInfo->StabStringsLength = SymbolFileHeader->StabstrLength; - SymbolInfo->SymbolsBase = FileBuffer + SymbolFileHeader->SymbolsOffset; - SymbolInfo->SymbolsLength = SymbolFileHeader->SymbolsLength; - SymbolInfo->SymbolStringsBase = FileBuffer + SymbolFileHeader->SymbolstrOffset; - SymbolInfo->SymbolStringsLength = SymbolFileHeader->SymbolstrLength; - /* add file to cache */ - KdbpSymAddCachedFile(&SymFileName, SymbolInfo); + KdbpSymAddCachedFile(FileName, *RosSymInfo); - DPRINT("Installed stabs: %wZ (%08x-%08x,%08x) (%08x-%08x,%08x)\n", - FileName, - SymbolInfo->StabsBase, - SymbolInfo->StabsLength + SymbolInfo->StabsBase, - SymbolInfo->StabStringsBase, - SymbolInfo->SymbolsBase, - SymbolInfo->SymbolsLength + SymbolInfo->SymbolsBase, - SymbolInfo->SymbolStringsBase); + DPRINT("Installed symbols: %wZ %p\n", FileName, *RosSymInfo); } /*! \brief Unloads symbol info. * - * \param SymbolInfo Pointer to the symbol info to unload. + * \param RosSymInfo Pointer to the symbol info to unload. * * \sa KdbpSymLoadModuleSymbols */ STATIC VOID -KdbpSymUnloadModuleSymbols(IN PIMAGE_SYMBOL_INFO SymbolInfo) +KdbpSymUnloadModuleSymbols(IN PROSSYM_INFO RosSymInfo) { DPRINT("Unloading symbols\n"); - if (SymbolInfo != NULL && SymbolInfo->FileBuffer != NULL && - (PVOID)SymbolInfo->ImageBase != NULL) + if (RosSymInfo != NULL) { - KdbpSymRemoveCachedFile(SymbolInfo); - SymbolInfo->FileBuffer = NULL; - SymbolInfo->StabsBase = NULL; - SymbolInfo->StabsLength = 0; - SymbolInfo->SymbolsBase = NULL; - SymbolInfo->SymbolsLength = 0; + KdbpSymRemoveCachedFile(RosSymInfo); } } @@ -964,13 +503,27 @@ KdbpSymUnloadModuleSymbols(IN PIMAGE_SYMBOL_INFO SymbolInfo) VOID KdbSymLoadUserModuleSymbols(IN PLDR_MODULE LdrModule) { + static WCHAR Prefix[] = L"\\??\\"; + UNICODE_STRING KernelName; DPRINT("LdrModule %p\n", LdrModule); - RtlZeroMemory(&LdrModule->SymbolInfo, sizeof (LdrModule->SymbolInfo)); - LdrModule->SymbolInfo.ImageBase = (ULONG_PTR)LdrModule->BaseAddress; - LdrModule->SymbolInfo.ImageSize = LdrModule->SizeOfImage; + KernelName.MaximumLength = sizeof(Prefix) + LdrModule->FullDllName.Length; + KernelName.Length = KernelName.MaximumLength - sizeof(WCHAR); + KernelName.Buffer = ExAllocatePoolWithTag(PagedPool, KernelName.MaximumLength, TAG_KDBS); + if (NULL == KernelName.Buffer) + { + return; + } + memcpy(KernelName.Buffer, Prefix, sizeof(Prefix) - sizeof(WCHAR)); + memcpy(KernelName.Buffer + sizeof(Prefix) / sizeof(WCHAR) - 1, LdrModule->FullDllName.Buffer, + LdrModule->FullDllName.Length); + KernelName.Buffer[KernelName.Length / sizeof(WCHAR)] = L'\0'; - KdbpSymLoadModuleSymbols(&LdrModule->FullDllName, &LdrModule->SymbolInfo); + LdrModule->RosSymInfo = NULL; + + KdbpSymLoadModuleSymbols(&KernelName, &LdrModule->RosSymInfo); + + ExFreePool(KernelName.Buffer); } /*! \brief Frees all symbols loaded for a process. @@ -982,7 +535,6 @@ KdbSymFreeProcessSymbols(IN PEPROCESS Process) { PLIST_ENTRY CurrentEntry; PLDR_MODULE Current; - PIMAGE_SYMBOL_INFO SymbolInfo; PEPROCESS CurrentProcess; PPEB Peb; @@ -1001,8 +553,7 @@ KdbSymFreeProcessSymbols(IN PEPROCESS Process) { Current = CONTAINING_RECORD(CurrentEntry, LDR_MODULE, InLoadOrderModuleList); - SymbolInfo = &Current->SymbolInfo; - KdbpSymUnloadModuleSymbols(SymbolInfo); + KdbpSymUnloadModuleSymbols(Current->RosSymInfo); CurrentEntry = CurrentEntry->Flink; } @@ -1024,11 +575,9 @@ KdbSymLoadDriverSymbols(IN PUNICODE_STRING Filename, /* Load symbols for the image if available */ DPRINT("Loading driver %wZ symbols (driver @ %08x)\n", Filename, Module->Base); - RtlZeroMemory(&Module->TextSection->SymbolInfo, sizeof (Module->TextSection->SymbolInfo)); - Module->TextSection->SymbolInfo.ImageBase = Module->TextSection->Base; - Module->TextSection->SymbolInfo.ImageSize = Module->TextSection->Length; + Module->TextSection->RosSymInfo = NULL; - KdbpSymLoadModuleSymbols(Filename, &Module->TextSection->SymbolInfo); + KdbpSymLoadModuleSymbols(Filename, &Module->TextSection->RosSymInfo); } /*! \brief Unloads symbol info for a driver. @@ -1039,7 +588,8 @@ VOID KdbSymUnloadDriverSymbols(IN PMODULE_OBJECT ModuleObject) { /* Unload symbols for module if available */ - KdbpSymUnloadModuleSymbols(&ModuleObject->TextSection->SymbolInfo); + KdbpSymUnloadModuleSymbols(ModuleObject->TextSection->RosSymInfo); + ModuleObject->TextSection->RosSymInfo = NULL; } /*! \brief Called when a symbol file is loaded by the loader? @@ -1057,32 +607,31 @@ KdbSymProcessBootSymbols(IN PCHAR FileName) PMODULE_OBJECT ModuleObject; UNICODE_STRING UnicodeString; PLOADER_MODULE KeLoaderModules = (PLOADER_MODULE)KeLoaderBlock.ModsAddr; - CHAR SymbolName[MAX_PATH]; - PSYMBOLFILE_HEADER SymbolFileHeader; - PIMAGE_SYMBOL_INFO SymbolInfo; ANSI_STRING AnsiString; - PCHAR Extension; ULONG i; + BOOLEAN IsRaw; DPRINT("KdbSymProcessBootSymbols(%s)\n", FileName); - RtlInitAnsiString(&AnsiString, FileName); + if (0 == _stricmp(FileName, "ntoskrnl.sym")) + { + RtlInitAnsiString(&AnsiString, "ntoskrnl.exe"); + IsRaw = TRUE; + } + else + { + RtlInitAnsiString(&AnsiString, FileName); + IsRaw = FALSE; + } RtlAnsiStringToUnicodeString(&UnicodeString, &AnsiString, TRUE); ModuleObject = LdrGetModuleObject(&UnicodeString); RtlFreeUnicodeString(&UnicodeString); if (ModuleObject != NULL) { - strcpy(SymbolName, FileName); - Extension = strrchr(SymbolName, '.'); - if (Extension == NULL) - { - Extension = SymbolName + strlen(SymbolName); - } - strcpy(Extension, ".sym"); for (i = 0; i < KeLoaderBlock.ModsCount; i++) { - if (KeLoaderModules[i].Reserved == 0 && !_stricmp(SymbolName, (PCHAR)KeLoaderModules[i].String)) + if (0 == _stricmp(FileName, (PCHAR)KeLoaderModules[i].String)) { break; } @@ -1090,48 +639,41 @@ KdbSymProcessBootSymbols(IN PCHAR FileName) if (i < KeLoaderBlock.ModsCount) { KeLoaderModules[i].Reserved = 1; - SymbolInfo = (PIMAGE_SYMBOL_INFO) &ModuleObject->TextSection->SymbolInfo; - if (SymbolInfo->FileBuffer != NULL) + if (ModuleObject->TextSection->RosSymInfo != NULL) { - KdbpSymRemoveCachedFile(SymbolInfo); + KdbpSymRemoveCachedFile(ModuleObject->TextSection->RosSymInfo); } - SymbolFileHeader = ExAllocatePool(NonPagedPool, KeLoaderModules[i].ModEnd - KeLoaderModules[i].ModStart); - if (SymbolFileHeader == NULL) + if (IsRaw) { - DPRINT("Could not allocate memory for symbol file\n"); - return; + if (! RosSymCreateFromRaw((PVOID) KeLoaderModules[i].ModStart, + KeLoaderModules[i].ModEnd - KeLoaderModules[i].ModStart, + &ModuleObject->TextSection->RosSymInfo)) + { + return; + } + } + else + { + if (! RosSymCreateFromMem((PVOID) KeLoaderModules[i].ModStart, + KeLoaderModules[i].ModEnd - KeLoaderModules[i].ModStart, + &ModuleObject->TextSection->RosSymInfo)) + { + return; + } } - memcpy(SymbolFileHeader, - (PVOID)KeLoaderModules[i].ModStart, - KeLoaderModules[i].ModEnd - KeLoaderModules[i].ModStart); - - SymbolInfo->FileBuffer = SymbolFileHeader; - SymbolInfo->StabsBase = (PVOID)SymbolFileHeader + SymbolFileHeader->StabsOffset; - SymbolInfo->StabsLength = SymbolFileHeader->StabsLength; - SymbolInfo->StabStringsBase = (PVOID)SymbolFileHeader + SymbolFileHeader->StabstrOffset; - SymbolInfo->StabStringsLength = SymbolFileHeader->StabstrLength; - SymbolInfo->SymbolsBase = (PVOID)SymbolFileHeader + SymbolFileHeader->SymbolsOffset; - SymbolInfo->SymbolsLength = SymbolFileHeader->SymbolsLength; - SymbolInfo->SymbolStringsBase = (PVOID)SymbolFileHeader + SymbolFileHeader->SymbolstrOffset; - SymbolInfo->SymbolStringsLength = SymbolFileHeader->SymbolstrLength; /* add file to cache */ - RtlInitAnsiString(&AnsiString, SymbolName); + RtlInitAnsiString(&AnsiString, FileName); RtlAnsiStringToUnicodeString(&UnicodeString, &AnsiString, TRUE); - KdbpSymAddCachedFile(&UnicodeString, SymbolInfo); + KdbpSymAddCachedFile(&UnicodeString, ModuleObject->TextSection->RosSymInfo); RtlFreeUnicodeString(&UnicodeString); - DPRINT("Installed stabs: %s@%08x-%08x (%08x-%08x,%08x) (%08x-%08x,%08x)\n", + DPRINT("Installed symbols: %s@%08x-%08x %p\n", FileName, ModuleObject->Base, ModuleObject->Length + ModuleObject->Base, - SymbolInfo->StabsBase, - SymbolInfo->StabsLength + SymbolInfo->StabsBase, - SymbolInfo->StabStringsBase, - SymbolInfo->SymbolsBase, - SymbolInfo->SymbolsLength + SymbolInfo->SymbolsBase, - SymbolInfo->SymbolStringsBase); + ModuleObject->TextSection->RosSymInfo); } } } @@ -1145,16 +687,13 @@ VOID KdbSymInit(IN PMODULE_TEXT_SECTION NtoskrnlTextSection, IN PMODULE_TEXT_SECTION LdrHalTextSection) { - RtlZeroMemory(&NtoskrnlTextSection->SymbolInfo, sizeof(NtoskrnlTextSection->SymbolInfo)); - NtoskrnlTextSection->SymbolInfo.ImageBase = NtoskrnlTextSection->OptionalHeader->ImageBase; - NtoskrnlTextSection->SymbolInfo.ImageSize = NtoskrnlTextSection->Length; - - RtlZeroMemory(&LdrHalTextSection->SymbolInfo, sizeof(LdrHalTextSection->SymbolInfo)); - LdrHalTextSection->SymbolInfo.ImageBase = LdrHalTextSection->OptionalHeader->ImageBase; - LdrHalTextSection->SymbolInfo.ImageSize = LdrHalTextSection->Length; + NtoskrnlTextSection->RosSymInfo = NULL; + LdrHalTextSection->RosSymInfo = NULL; InitializeListHead(&SymbolFileListHead); KeInitializeSpinLock(&SymbolFileListLock); + + RosSymInitKernelMode(); } /* EOF */ diff --git a/reactos/ntoskrnl/dbg/profile.c b/reactos/ntoskrnl/dbg/profile.c index 15809fbb281..3b2350541b5 100755 --- a/reactos/ntoskrnl/dbg/profile.c +++ b/reactos/ntoskrnl/dbg/profile.c @@ -1,4 +1,4 @@ -/* $Id:$ +/* $Id$ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -136,7 +136,6 @@ KdbProfilerGetSymbolInfo(PVOID address, OUT PCH NameBuffer) extern LIST_ENTRY ModuleTextListHead; ULONG_PTR RelativeAddress; NTSTATUS Status; - ULONG LineNumber; CHAR FileName[256]; CHAR FunctionName[256]; @@ -152,14 +151,14 @@ KdbProfilerGetSymbolInfo(PVOID address, OUT PCH NameBuffer) address < (PVOID)(current->Base + current->Length)) { RelativeAddress = (ULONG_PTR) address - current->Base; - Status = KdbSymGetAddressInformation(¤t->SymbolInfo, + Status = KdbSymGetAddressInformation(current->RosSymInfo, RelativeAddress, - &LineNumber, + NULL, FileName, FunctionName); if (NT_SUCCESS(Status)) { - sprintf(NameBuffer, "%s (%s)", FileName, FunctionName); + sprintf(NameBuffer, "%s (%s)", FunctionName, FileName); return(TRUE); } return(TRUE); @@ -231,7 +230,7 @@ KdbProfilerWriteSampleGroups(PLIST_ENTRY SamplesListHead) PLIST_ENTRY Largest; KdbProfilerWriteString("\r\n\r\n"); - KdbProfilerWriteString("Count Symbol\n"); + KdbProfilerWriteString("Count Symbol\r\n"); KdbProfilerWriteString("--------------------------------------------------\r\n"); current = SamplesListHead->Flink; @@ -286,7 +285,7 @@ KdbProfilerAnalyzeSamples() ULONG Index; ULONG_PTR Address; - if (!ExInitializeHashTable(&Hashtable, 17, KdbProfilerKeyCompare, TRUE)) + if (!ExInitializeHashTable(&Hashtable, 12, KdbProfilerKeyCompare, TRUE)) { DPRINT1("ExInitializeHashTable() failed."); KEBUGCHECK(0); @@ -353,14 +352,14 @@ KdbProfilerThreadMain(PVOID Context) KeWaitForSingleObject(&KdbProfilerLock, Executive, KernelMode, FALSE, NULL); - KdbSuspendProfiling(); + KdbSuspendProfiling(); KdbProfilerAnalyzeSamples(); - KdbResumeProfiling(); + KdbResumeProfiling(); - KeReleaseMutex(&KdbProfilerLock, FALSE); - } + KeReleaseMutex(&KdbProfilerLock, FALSE); + } } VOID @@ -429,6 +428,16 @@ KdbEnableProfiling() DPRINT1("Failed to create profiler log file\n"); return; } + KeInitializeMutex(&KdbProfilerLock, 0); + + KdbProfileDatabase = ExAllocatePool(NonPagedPool, sizeof(PROFILE_DATABASE)); + ASSERT(KdbProfileDatabase); + InitializeListHead(&KdbProfileDatabase->ListHead); + KeInitializeDpc(&KdbProfilerCollectorDpc, KdbProfilerCollectorDpcRoutine, NULL); + + /* Initialize our periodic timer and its associated DPC object. When the timer + expires, the KdbProfilerSessionEndDpc deferred procedure call (DPC) is queued */ + KeInitializeTimerEx(&KdbProfilerTimer, SynchronizationTimer); Status = PsCreateSystemThread(&KdbProfilerThreadHandle, THREAD_ALL_ACCESS, @@ -443,17 +452,6 @@ KdbEnableProfiling() return; } - KeInitializeMutex(&KdbProfilerLock, 0); - - KdbProfileDatabase = ExAllocatePool(NonPagedPool, sizeof(PROFILE_DATABASE)); - ASSERT(KdbProfileDatabase); - InitializeListHead(&KdbProfileDatabase->ListHead); - KeInitializeDpc(&KdbProfilerCollectorDpc, KdbProfilerCollectorDpcRoutine, NULL); - - /* Initialize our periodic timer and its associated DPC object. When the timer - expires, the KdbProfilerSessionEndDpc deferred procedure call (DPC) is queued */ - KeInitializeTimerEx(&KdbProfilerTimer, SynchronizationTimer); - /* Start the periodic timer with an initial and periodic relative expiration time of PROFILE_SESSION_LENGTH seconds */ DueTime.QuadPart = -(LONGLONG) PROFILE_SESSION_LENGTH * 1000 * 10000; diff --git a/reactos/ntoskrnl/include/internal/module.h b/reactos/ntoskrnl/include/internal/module.h index 9c60eba1ca5..57ee469f0ab 100644 --- a/reactos/ntoskrnl/include/internal/module.h +++ b/reactos/ntoskrnl/include/internal/module.h @@ -5,7 +5,7 @@ #include #include #include -#include +#include typedef struct _MODULE_TEXT_SECTION { @@ -15,7 +15,7 @@ typedef struct _MODULE_TEXT_SECTION PWCH Name; PIMAGE_OPTIONAL_HEADER OptionalHeader; #if defined(DBG) || defined(KDBG) - IMAGE_SYMBOL_INFO SymbolInfo; + PROSSYM_INFO RosSymInfo; #endif /* KDBG */ } MODULE_TEXT_SECTION, *PMODULE_TEXT_SECTION; diff --git a/reactos/ntoskrnl/io/driver.c b/reactos/ntoskrnl/io/driver.c index eb3e4accf39..6d52e650b4b 100644 --- a/reactos/ntoskrnl/io/driver.c +++ b/reactos/ntoskrnl/io/driver.c @@ -1220,7 +1220,7 @@ IopInitializeBootDrivers(VOID) if (Extension == NULL) Extension = ""; - if (!_stricmp(Extension, ".exe") || !_stricmp(Extension, ".dll")) + if (!_stricmp(Extension, ".sym") || !_stricmp(Extension, ".dll")) { /* Process symbols for *.exe and *.dll */ KDB_SYMBOLFILE_HOOK(ModuleName); diff --git a/reactos/tools/helper.mk b/reactos/tools/helper.mk index ca0e8d48b64..c50a5e80892 100644 --- a/reactos/tools/helper.mk +++ b/reactos/tools/helper.mk @@ -647,9 +647,6 @@ ifeq ($(DBG),1) TARGET_ASFLAGS += -g TARGET_CFLAGS += -g TARGET_LFLAGS += -g - ifeq ($(INSTALL_SYMBOLS),) - INSTALL_SYMBOLS := yes - endif endif TARGET_CPPFLAGS += $(MK_CPPFLAGS) $(STD_CPPFLAGS) @@ -795,10 +792,6 @@ endif -o $(MK_NOSTRIPNAME) \ $(MK_FULLRES) $(MK_OBJECTS) $(MK_LIBS) $(MK_GCCLIBS) - $(RM) temp.exp -ifeq ($(BUILD_SYM),yes) - $(HALFVERBOSEECHO) [RSYM] $(MK_BASENAME).sym - - $(RSYM) $(MK_NOSTRIPNAME) $(MK_BASENAME).sym -endif ifeq ($(BUILD_MAP),full) $(HALFVERBOSEECHO) [OBJDUMP] $(MK_BASENAME).map $(OBJDUMP) -d -S $(MK_NOSTRIPNAME) > $(MK_BASENAME).map @@ -810,47 +803,8 @@ endif endif $(MK_FULLNAME): $(MK_NOSTRIPNAME) $(MK_EXTRADEP) - $(HALFVERBOSEECHO) [LD] $(MK_FULLNAME) - - -ifneq ($(TARGET_CPPAPP),yes) - $(LD) --strip-debug -r -o $(MK_STRIPPED_OBJECT) $(MK_OBJECTS) -endif -ifeq ($(MK_EXETYPE),dll) - $(LD_CC) -Wl,--base-file,base.tmp \ - -Wl,--entry,$(TARGET_ENTRY) \ - -Wl,--strip-debug \ - $(TARGET_LFLAGS) \ - -o junk.tmp \ - $(MK_FULLRES) $(MK_STRIPPED_OBJECT) $(MK_LIBS) $(MK_GCCLIBS) - - $(RM) junk.tmp - $(DLLTOOL) --dllname $(MK_FULLNAME) \ - --base-file base.tmp \ - --output-exp temp.exp $(MK_EXTRACMD) - - $(RM) base.tmp - $(LD_CC) -Wl,--base-file,base.tmp \ - -Wl,--entry,$(TARGET_ENTRY) \ - -Wl,--strip-debug \ - $(TARGET_LFLAGS) \ - temp.exp \ - -o junk.tmp \ - $(MK_FULLRES) $(MK_STRIPPED_OBJECT) $(MK_LIBS) $(MK_GCCLIBS) - - $(RM) junk.tmp - $(DLLTOOL) --dllname $(MK_FULLNAME) \ - --base-file base.tmp \ - --output-exp temp.exp $(MK_KILLAT) $(MK_EXTRACMD) - - $(RM) base.tmp -endif - $(LD_CC) $(TARGET_LFLAGS) \ - -Wl,--entry,$(TARGET_ENTRY) \ - -Wl,--strip-debug \ - $(MK_EXTRACMD2) \ - -o $(MK_FULLNAME) \ - $(MK_FULLRES) $(MK_STRIPPED_OBJECT) $(MK_LIBS) $(MK_GCCLIBS) -ifneq ($(TARGET_CPPAPP),yes) - - $(RM) temp.exp $(MK_STRIPPED_OBJECT) -else - - $(RM) temp.exp -endif + $(HALFVERBOSEECHO) [RSYM] $(MK_FULLNAME) + $(RSYM) $(MK_NOSTRIPNAME) $(MK_FULLNAME) @echo $(MK_FULLNAME) was successfully built. endif # KM_MODE @@ -890,10 +844,6 @@ $(MK_NOSTRIPNAME): $(MK_EXTRADEP) $(MK_FULLRES) $(MK_BASENAME).a $(MK_LIBS) -o $(MK_NOSTRIPNAME) \ $(MK_FULLRES) $(MK_OBJECTS) $(MK_LIBS) $(MK_GCCLIBS) - $(RM) temp.exp -ifeq ($(BUILD_SYM),yes) - $(HALFVERBOSEECHO) [RSYM] $(MK_BASENAME).sym - $(RSYM) $(MK_NOSTRIPNAME) $(MK_BASENAME).sym -endif ifeq ($(BUILD_MAP),full) $(HALFVERBOSEECHO) [OBJDUMP] $(MK_BASENAME).map $(OBJDUMP) -d -S $(MK_NOSTRIPNAME) > $(MK_BASENAME).map @@ -904,36 +854,9 @@ ifeq ($(BUILD_MAP),yes) endif endif -$(MK_FULLNAME): $(MK_EXTRADEP) $(MK_FULLRES) $(MK_BASENAME).a $(MK_LIBS) $(MK_NOSTRIPNAME) - - - $(HALFVERBOSEECHO) [LD] $(MK_FULLNAME) -ifneq ($(TARGET_CPPAPP),yes) - $(LD) --strip-debug -r -o $(MK_STRIPPED_OBJECT) $(MK_OBJECTS) -endif - $(LD_CC) -Wl,--base-file,base.tmp \ - -Wl,--entry,$(TARGET_ENTRY) \ - $(TARGET_LFLAGS) \ - -o junk.tmp \ - $(MK_FULLRES) $(MK_STRIPPED_OBJECT) $(MK_LIBS) $(MK_GCCLIBS) - - $(RM) junk.tmp - $(DLLTOOL) --dllname $(MK_FULLNAME) \ - --base-file base.tmp \ - --output-exp temp.exp $(MK_EXTRACMD) $(MK_KILLAT) - - $(RM) base.tmp - $(LD_CC) $(TARGET_LFLAGS) \ - -Wl,--subsystem,native \ - -Wl,--image-base,$(TARGET_BASE) \ - -Wl,--file-alignment,0x1000 \ - -Wl,--section-alignment,0x1000 \ - -Wl,--entry,$(TARGET_ENTRY) \ - -Wl,temp.exp -mdll \ - -o $(MK_FULLNAME) \ - $(MK_FULLRES) $(MK_STRIPPED_OBJECT) $(MK_LIBS) $(MK_GCCLIBS) -ifneq ($(TARGET_CPPAPP),yes) - - $(RM) temp.exp $(MK_STRIPPED_OBJECT) -else - - $(RM) temp.exp -endif +$(MK_FULLNAME): $(MK_NOSTRIPNAME) + $(HALFVERBOSEECHO) [RSYM] $(MK_FULLNAME) + $(RSYM) $(MK_NOSTRIPNAME) $(MK_FULLNAME) @echo $(MK_FULLNAME) was successfully built. endif # MK_MODE @@ -1005,6 +928,7 @@ MK_CLEANFILES := $(filter %.o,$(MK_OBJECTS)) MK_CLEANFILTERED := $(MK_OBJECTS:.o=.d) $(TARGET_PCH:.h=.d) MK_CLEANDEPS := $(join $(dir $(MK_CLEANFILTERED)), $(addprefix ., $(notdir $(MK_CLEANFILTERED)))) +# FIXME: The $(MK_BASENAME).sym can be removed around 15 Feb 2005 clean: $(MK_REGTESTS_CLEAN) $(SUBDIRS:%=%_clean) $(HALFVERBOSEECHO) [CLEAN] - $(RM) *.o $(MK_PCHNAME) $(MK_BASENAME).sym $(MK_BASENAME).a $(MK_RESOURCE) \ @@ -1052,23 +976,10 @@ install: endif # MK_INSTALL -ifeq ($(INSTALL_SYMBOLS),yes) - -forceinstall: $(SUBDIRS:%=%_install) $(MK_FULLNAME) $(MK_BASENAME).sym - $(HALFVERBOSEECHO) [INSTALL] $(MK_FULLNAME) to $(MK_INSTALLDIR)/$(MK_INSTALL_FULLNAME) - -$(CP) $(MK_FULLNAME) $(INSTALL_DIR)/$(MK_INSTALLDIR)/$(MK_INSTALL_FULLNAME) - $(HALFVERBOSEECHO) [INSTALL] $(MK_BASENAME).sym to symbols/$(MK_INSTALL_BASENAME).sym - -$(CP) $(MK_BASENAME).sym $(INSTALL_DIR)/symbols/$(MK_INSTALL_BASENAME).sym - -else # INSTALL_SYMBOLS - forceinstall: $(SUBDIRS:%=%_install) $(MK_FULLNAME) $(HALFVERBOSEECHO) [INSTALL] $(MK_FULLNAME) to $(MK_INSTALLDIR)/$(MK_INSTALL_FULLNAME) -$(CP) $(MK_FULLNAME) $(INSTALL_DIR)/$(MK_INSTALLDIR)/$(MK_INSTALL_FULLNAME) -endif # INSTALL_SYMBOLS - - # Bootstrap files for the bootable CD ifeq ($(TARGET_BOOTSTRAP),yes) diff --git a/reactos/tools/rsym.c b/reactos/tools/rsym.c index 705d4f6aff1..968c03a4c1c 100644 --- a/reactos/tools/rsym.c +++ b/reactos/tools/rsym.c @@ -1,6 +1,25 @@ /* * Usage: rsym input-file output-file + * + * There are two sources of information: the .stab/.stabstr + * sections of the executable and the COFF symbol table. Most + * of the information is in the .stab/.stabstr sections. + * However, most of our asm files don't contain .stab directives, + * so routines implemented in assembler won't show up in the + * .stab section. They are present in the COFF symbol table. + * So, we mostly use the .stab/.stabstr sections, but we augment + * the info there with info from the COFF symbol table when + * possible. + * + * This is a tool and is compiled using the host compiler, + * i.e. on Linux gcc and not mingw-gcc (cross-compiler). + * Therefore we can't include SDK headers and we have to + * duplicate some definitions here. + * Also note that the internal functions are "old C-style", + * returning an int, where a return of 0 means success and + * non-zero is failure. */ + #include #include #include @@ -12,109 +31,153 @@ #define IMAGE_NUMBEROF_DIRECTORY_ENTRIES 16 -typedef void* PVOID; typedef unsigned char BYTE; typedef unsigned short WORD; typedef unsigned long DWORD; typedef signed long LONG; typedef unsigned long ULONG; +#if defined(_WIN64) +typedef unsigned __int64 ULONG_PTR; +#else +typedef unsigned long ULONG_PTR; +#endif #pragma pack(push,2) typedef struct _IMAGE_DOS_HEADER { - WORD e_magic; - WORD e_cblp; - WORD e_cp; - WORD e_crlc; - WORD e_cparhdr; - WORD e_minalloc; - WORD e_maxalloc; - WORD e_ss; - WORD e_sp; - WORD e_csum; - WORD e_ip; - WORD e_cs; - WORD e_lfarlc; - WORD e_ovno; - WORD e_res[4]; - WORD e_oemid; - WORD e_oeminfo; - WORD e_res2[10]; - LONG e_lfanew; + WORD e_magic; + WORD e_cblp; + WORD e_cp; + WORD e_crlc; + WORD e_cparhdr; + WORD e_minalloc; + WORD e_maxalloc; + WORD e_ss; + WORD e_sp; + WORD e_csum; + WORD e_ip; + WORD e_cs; + WORD e_lfarlc; + WORD e_ovno; + WORD e_res[4]; + WORD e_oemid; + WORD e_oeminfo; + WORD e_res2[10]; + LONG e_lfanew; } IMAGE_DOS_HEADER,*PIMAGE_DOS_HEADER; #pragma pack(pop) + +#define IMAGE_FILE_LINE_NUMS_STRIPPED 4 +#define IMAGE_FILE_LOCAL_SYMS_STRIPPED 8 +#define IMAGE_FILE_DEBUG_STRIPPED 512 + #pragma pack(push,4) -typedef struct _IMAGE_DATA_DIRECTORY { - DWORD VirtualAddress; - DWORD Size; -} IMAGE_DATA_DIRECTORY,*PIMAGE_DATA_DIRECTORY; -typedef struct _IMAGE_OPTIONAL_HEADER { - WORD Magic; - BYTE MajorLinkerVersion; - BYTE MinorLinkerVersion; - DWORD SizeOfCode; - DWORD SizeOfInitializedData; - DWORD SizeOfUninitializedData; - DWORD AddressOfEntryPoint; - DWORD BaseOfCode; - DWORD BaseOfData; - DWORD ImageBase; - DWORD SectionAlignment; - DWORD FileAlignment; - WORD MajorOperatingSystemVersion; - WORD MinorOperatingSystemVersion; - WORD MajorImageVersion; - WORD MinorImageVersion; - WORD MajorSubsystemVersion; - WORD MinorSubsystemVersion; - DWORD Reserved1; - DWORD SizeOfImage; - DWORD SizeOfHeaders; - DWORD CheckSum; - WORD Subsystem; - WORD DllCharacteristics; - DWORD SizeOfStackReserve; - DWORD SizeOfStackCommit; - DWORD SizeOfHeapReserve; - DWORD SizeOfHeapCommit; - DWORD LoaderFlags; - DWORD NumberOfRvaAndSizes; - IMAGE_DATA_DIRECTORY DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES]; -} IMAGE_OPTIONAL_HEADER,*PIMAGE_OPTIONAL_HEADER; typedef struct _IMAGE_FILE_HEADER { - WORD Machine; - WORD NumberOfSections; - DWORD TimeDateStamp; - DWORD PointerToSymbolTable; - DWORD NumberOfSymbols; - WORD SizeOfOptionalHeader; - WORD Characteristics; + WORD Machine; + WORD NumberOfSections; + DWORD TimeDateStamp; + DWORD PointerToSymbolTable; + DWORD NumberOfSymbols; + WORD SizeOfOptionalHeader; + WORD Characteristics; } IMAGE_FILE_HEADER, *PIMAGE_FILE_HEADER; + +typedef struct _IMAGE_DATA_DIRECTORY { + DWORD VirtualAddress; + DWORD Size; +} IMAGE_DATA_DIRECTORY,*PIMAGE_DATA_DIRECTORY; + +#define IMAGE_DIRECTORY_ENTRY_BASERELOC 5 + +typedef struct _IMAGE_OPTIONAL_HEADER { + WORD Magic; + BYTE MajorLinkerVersion; + BYTE MinorLinkerVersion; + DWORD SizeOfCode; + DWORD SizeOfInitializedData; + DWORD SizeOfUninitializedData; + DWORD AddressOfEntryPoint; + DWORD BaseOfCode; + DWORD BaseOfData; + DWORD ImageBase; + DWORD SectionAlignment; + DWORD FileAlignment; + WORD MajorOperatingSystemVersion; + WORD MinorOperatingSystemVersion; + WORD MajorImageVersion; + WORD MinorImageVersion; + WORD MajorSubsystemVersion; + WORD MinorSubsystemVersion; + DWORD Reserved1; + DWORD SizeOfImage; + DWORD SizeOfHeaders; + DWORD CheckSum; + WORD Subsystem; + WORD DllCharacteristics; + DWORD SizeOfStackReserve; + DWORD SizeOfStackCommit; + DWORD SizeOfHeapReserve; + DWORD SizeOfHeapCommit; + DWORD LoaderFlags; + DWORD NumberOfRvaAndSizes; + IMAGE_DATA_DIRECTORY DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES]; +} IMAGE_OPTIONAL_HEADER,*PIMAGE_OPTIONAL_HEADER; + +#define IMAGE_SCN_TYPE_NOLOAD 0x00000002 +#define IMAGE_SCN_LNK_REMOVE 0x00000800 +#define IMAGE_SCN_MEM_READ 0x40000000 +#define IMAGE_SCN_MEM_DISCARDABLE 0x02000000 + typedef struct _IMAGE_SECTION_HEADER { - BYTE Name[IMAGE_SIZEOF_SHORT_NAME]; - union { - DWORD PhysicalAddress; - DWORD VirtualSize; - } Misc; - DWORD VirtualAddress; - DWORD SizeOfRawData; - DWORD PointerToRawData; - DWORD PointerToRelocations; - DWORD PointerToLinenumbers; - WORD NumberOfRelocations; - WORD NumberOfLinenumbers; - DWORD Characteristics; + BYTE Name[IMAGE_SIZEOF_SHORT_NAME]; + union { + DWORD PhysicalAddress; + DWORD VirtualSize; + } Misc; + DWORD VirtualAddress; + DWORD SizeOfRawData; + DWORD PointerToRawData; + DWORD PointerToRelocations; + DWORD PointerToLinenumbers; + WORD NumberOfRelocations; + WORD NumberOfLinenumbers; + DWORD Characteristics; } IMAGE_SECTION_HEADER,*PIMAGE_SECTION_HEADER; + +typedef struct _IMAGE_BASE_RELOCATION { + DWORD VirtualAddress; + DWORD SizeOfBlock; +} IMAGE_BASE_RELOCATION,*PIMAGE_BASE_RELOCATION; + + +typedef struct { + unsigned short f_magic; /* magic number */ + unsigned short f_nscns; /* number of sections */ + unsigned long f_timdat; /* time & date stamp */ + unsigned long f_symptr; /* file pointer to symtab */ + unsigned long f_nsyms; /* number of symtab entries */ + unsigned short f_opthdr; /* sizeof(optional hdr) */ + unsigned short f_flags; /* flags */ +} FILHDR; + +typedef struct { + char s_name[8]; /* section name */ + unsigned long s_paddr; /* physical address, aliased s_nlib */ + unsigned long s_vaddr; /* virtual address */ + unsigned long s_size; /* section size */ + unsigned long s_scnptr; /* file ptr to raw data for section */ + unsigned long s_relptr; /* file ptr to relocation */ + unsigned long s_lnnoptr; /* file ptr to line numbers */ + unsigned short s_nreloc; /* number of relocation entries */ + unsigned short s_nlnno; /* number of line number entries */ + unsigned long s_flags; /* flags */ +} SCNHDR; #pragma pack(pop) typedef struct _SYMBOLFILE_HEADER { - unsigned long StabsOffset; - unsigned long StabsLength; - unsigned long StabstrOffset; - unsigned long StabstrLength; unsigned long SymbolsOffset; unsigned long SymbolsLength; - unsigned long SymbolstrOffset; - unsigned long SymbolstrLength; + unsigned long StringsOffset; + unsigned long StringsLength; } SYMBOLFILE_HEADER, *PSYMBOLFILE_HEADER; typedef struct _STAB_ENTRY { @@ -129,14 +192,6 @@ typedef struct _STAB_ENTRY { #define N_SLINE 0x44 #define N_SO 0x64 -typedef struct -{ - unsigned long OldOffset; - unsigned long NewOffset; - char* Name; - unsigned long Length; -} STR_ENTRY, *PSTR_ENTRY; - /* COFF symbol table */ #define E_SYMNMLEN 8 /* # characters in a symbol name */ @@ -193,7 +248,7 @@ typedef struct #define C_HIDDEN 106 /* ext symbol in dmert public lib */ #pragma pack(push,1) -typedef struct _EXTERNAL_SYMENT +typedef struct _COFF_SYMENT { union { @@ -211,9 +266,18 @@ typedef struct _EXTERNAL_SYMENT unsigned short e_type; unsigned char e_sclass; unsigned char e_numaux; -} EXTERNAL_SYMENT, *PEXTERNAL_SYMENT; +} COFF_SYMENT, *PCOFF_SYMENT; #pragma pack(pop) +typedef struct _ROSSYM_ENTRY { + ULONG_PTR Address; + ULONG FunctionOffset; + ULONG FileOffset; + ULONG SourceLine; +} ROSSYM_ENTRY, *PROSSYM_ENTRY; + +#define ROUND_UP(N, S) (((N) + (S) - 1) & ~((S) - 1)) + char* convert_path(char* origpath) { char* newpath; @@ -242,45 +306,15 @@ char* convert_path(char* origpath) return(newpath); } -static void -RelocateString(ULONG *Offset, PSTR_ENTRY StrEntry, ULONG *StrCount, PVOID SymbolStringsBase) -{ - ULONG i; - - for (i = 0; i < *StrCount; i++) - { - if (*Offset == StrEntry[i].OldOffset) - { - *Offset = StrEntry[i].NewOffset; - return; - } - } - - StrEntry[*StrCount].OldOffset = *Offset; - StrEntry[*StrCount].Name = (char*) SymbolStringsBase + StrEntry[*StrCount].OldOffset; - StrEntry[*StrCount].Length = strlen(StrEntry[*StrCount].Name) + 1; - if (*StrCount == 0) - { - StrEntry[*StrCount].NewOffset = 0; - } - else - { - StrEntry[*StrCount].NewOffset = StrEntry[*StrCount - 1].NewOffset - + StrEntry[*StrCount - 1].Length; - } - *Offset = StrEntry[*StrCount].NewOffset; - (*StrCount)++; -} - static int -CompareSyment(const PEXTERNAL_SYMENT SymEntry1, const PEXTERNAL_SYMENT SymEntry2) +CompareSymEntry(const PROSSYM_ENTRY SymEntry1, const PROSSYM_ENTRY SymEntry2) { - if (SymEntry1->e_value < SymEntry2->e_value) + if (SymEntry1->Address < SymEntry2->Address) { return -1; } - if (SymEntry2->e_value < SymEntry1->e_value) + if (SymEntry2->Address < SymEntry1->Address) { return +1; } @@ -288,45 +322,724 @@ CompareSyment(const PEXTERNAL_SYMENT SymEntry1, const PEXTERNAL_SYMENT SymEntry2 return 0; } -#define TRANSFER_SIZE (65536) +static int +GetStabInfo(void *FileData, PIMAGE_FILE_HEADER PEFileHeader, + PIMAGE_SECTION_HEADER PESectionHeaders, + ULONG *StabSymbolsLength, void **StabSymbolsBase, + ULONG *StabStringsLength, void **StabStringsBase) +{ + ULONG Idx; + + /* Load .stab and .stabstr sections if available */ + *StabSymbolsBase = NULL; + *StabSymbolsLength = 0; + *StabStringsBase = NULL; + *StabStringsLength = 0; + + for (Idx = 0; Idx < PEFileHeader->NumberOfSections; Idx++) + { + /* printf("section: '%.08s'\n", PESectionHeaders[Idx].Name); */ + if ((strncmp((char*)PESectionHeaders[Idx].Name, ".stab", 5) == 0) + && (PESectionHeaders[Idx].Name[5] == 0)) + { + /* printf(".stab section found. Size %d\n", + PESectionHeaders[Idx].SizeOfRawData); */ + + *StabSymbolsLength = PESectionHeaders[Idx].SizeOfRawData; + *StabSymbolsBase = (void *)((char *) FileData + PESectionHeaders[Idx].PointerToRawData); + } + + if (strncmp((char*)PESectionHeaders[Idx].Name, ".stabstr", 8) == 0) + { + /* printf(".stabstr section found. Size %d\n", + PESectionHeaders[Idx].SizeOfRawData); */ + + *StabStringsLength = PESectionHeaders[Idx].SizeOfRawData; + *StabStringsBase = (void *)((char *) FileData + PESectionHeaders[Idx].PointerToRawData); + } + } + + return 0; +} + +static int +GetCoffInfo(void *FileData, PIMAGE_FILE_HEADER PEFileHeader, + PIMAGE_SECTION_HEADER PESectionHeaders, + ULONG *CoffSymbolsLength, void **CoffSymbolsBase, + ULONG *CoffStringsLength, void **CoffStringsBase) +{ + + if (0 == PEFileHeader->PointerToSymbolTable || 0 == PEFileHeader->NumberOfSymbols) + { + /* No COFF symbol table */ + *CoffSymbolsLength = 0; + *CoffStringsLength = 0; + } + else + { + *CoffSymbolsLength = PEFileHeader->NumberOfSymbols * sizeof(COFF_SYMENT); + *CoffSymbolsBase = (void *)((char *) FileData + PEFileHeader->PointerToSymbolTable); + *CoffStringsLength = *((ULONG *) ((char *) *CoffSymbolsBase + *CoffSymbolsLength)); + *CoffStringsBase = (void *)((char *) *CoffSymbolsBase + *CoffSymbolsLength); + } + + return 0; +} + +static ULONG +FindOrAddString(char *StringToFind, ULONG *StringsLength, void *StringsBase) +{ + char *Search, *End; + + Search = (char *) StringsBase; + End = Search + *StringsLength; + + while (Search < End) + { + if (0 == strcmp(Search, StringToFind)) + { + return Search - (char *) StringsBase; + } + Search += strlen(Search) + 1; + } + + strcpy(Search, StringToFind); + *StringsLength += strlen(StringToFind) + 1; + + return Search - (char *) StringsBase; +} + +static int +ConvertStabs(ULONG *SymbolsCount, PROSSYM_ENTRY *SymbolsBase, + ULONG *StringsLength, void *StringsBase, + ULONG StabSymbolsLength, void *StabSymbolsBase, + ULONG StabStringsLength, void *StabStringsBase, + ULONG_PTR ImageBase, PIMAGE_FILE_HEADER PEFileHeader, + PIMAGE_SECTION_HEADER PESectionHeaders) +{ + PSTAB_ENTRY StabEntry; + ULONG Count, i; + ULONG_PTR Address, LastFunctionAddress; + int First; + char *Name; + char FuncName[256]; + + StabEntry = StabSymbolsBase; + Count = StabSymbolsLength / sizeof(STAB_ENTRY); + *SymbolsBase = malloc(Count * sizeof(ROSSYM_ENTRY)); + if (NULL == *SymbolsBase) + { + fprintf(stderr, "Failed to allocate memory for converted .stab symbols\n"); + return 1; + } + *SymbolsCount = 0; + + LastFunctionAddress = 0; + First = 1; + for (i = 0; i < Count; i++) + { + switch (StabEntry[i].n_type) + { + case N_SO: + Name = (char *) StabStringsBase + StabEntry[i].n_strx; + if ('\0' == *Name || '/' == Name[strlen(Name) - 1] + || '\\' == Name[strlen(Name) - 1] + || StabEntry[i].n_value < ImageBase) + { + continue; + } + Address = StabEntry[i].n_value - ImageBase; + if (Address != (*SymbolsBase)[*SymbolsCount].Address && ! First) + { + (*SymbolsCount)++; + } + (*SymbolsBase)[*SymbolsCount].Address = Address; + (*SymbolsBase)[*SymbolsCount].FileOffset = FindOrAddString((char *) StabStringsBase + + StabEntry[i].n_strx, + StringsLength, + StringsBase); + (*SymbolsBase)[*SymbolsCount].FunctionOffset = 0; + (*SymbolsBase)[*SymbolsCount].SourceLine = 0; + LastFunctionAddress = 0; + break; + case N_FUN: + if (0 == StabEntry[i].n_desc || StabEntry[i].n_value < ImageBase) /* line # 0 isn't valid */ + { + continue; + } + Address = StabEntry[i].n_value - ImageBase; + if (Address != (*SymbolsBase)[*SymbolsCount].Address && ! First) + { + (*SymbolsCount)++; + (*SymbolsBase)[*SymbolsCount].FileOffset = (*SymbolsBase)[*SymbolsCount - 1].FileOffset; + } + (*SymbolsBase)[*SymbolsCount].Address = Address; + if (sizeof(FuncName) <= strlen((char *) StabStringsBase + StabEntry[i].n_strx)) + { + free(*SymbolsBase); + fprintf(stderr, "Function name too long\n"); + return 1; + } + strcpy(FuncName, (char *) StabStringsBase + StabEntry[i].n_strx); + Name = strchr(FuncName, ':'); + if (NULL != Name) + { + *Name = '\0'; + } + (*SymbolsBase)[*SymbolsCount].FunctionOffset = FindOrAddString(FuncName, + StringsLength, + StringsBase); + (*SymbolsBase)[*SymbolsCount].SourceLine = 0; + LastFunctionAddress = Address; + break; + case N_SLINE: + if (0 == LastFunctionAddress) + { + Address = StabEntry[i].n_value - ImageBase; + } + else + { + Address = LastFunctionAddress + StabEntry[i].n_value; + } + if (Address != (*SymbolsBase)[*SymbolsCount].Address && ! First) + { + (*SymbolsCount)++; + (*SymbolsBase)[*SymbolsCount].FileOffset = (*SymbolsBase)[*SymbolsCount - 1].FileOffset; + (*SymbolsBase)[*SymbolsCount].FunctionOffset = (*SymbolsBase)[*SymbolsCount - 1].FunctionOffset; + } + (*SymbolsBase)[*SymbolsCount].Address = Address; + (*SymbolsBase)[*SymbolsCount].SourceLine = StabEntry[i].n_desc; + break; + default: + continue; + } + First = 0; + } + (*SymbolsCount)++; + + qsort(*SymbolsBase, *SymbolsCount, sizeof(ROSSYM_ENTRY), (int (*)(const void *, const void *)) CompareSymEntry); + + return 0; +} + +static int +ConvertCoffs(ULONG *SymbolsCount, PROSSYM_ENTRY *SymbolsBase, + ULONG *StringsLength, void *StringsBase, + ULONG CoffSymbolsLength, void *CoffSymbolsBase, + ULONG CoffStringsLength, void *CoffStringsBase, + ULONG_PTR ImageBase, PIMAGE_FILE_HEADER PEFileHeader, + PIMAGE_SECTION_HEADER PESectionHeaders) +{ + ULONG Count, i; + PCOFF_SYMENT CoffEntry; + char FuncName[256]; + char *p; + + CoffEntry = (PCOFF_SYMENT) CoffSymbolsBase; + Count = CoffSymbolsLength / sizeof(COFF_SYMENT); + *SymbolsBase = malloc(Count * sizeof(ROSSYM_ENTRY)); + if (NULL == *SymbolsBase) + { + fprintf(stderr, "Unable to allocate memory for converted COFF symbols\n"); + return 1; + } + *SymbolsCount = 0; + + for (i = 0; i < Count; i++) + { + if (ISFCN(CoffEntry[i].e_type) || C_EXT == CoffEntry[i].e_sclass) + { + (*SymbolsBase)[*SymbolsCount].Address = CoffEntry[i].e_value; + if (0 < CoffEntry[i].e_scnum) + { + if (PEFileHeader->NumberOfSections < CoffEntry[i].e_scnum) + { + free(*SymbolsBase); + fprintf(stderr, "Invalid section number %d in COFF symbols (only %d sections present)\n", + CoffEntry[i].e_scnum, PEFileHeader->NumberOfSections); + return 1; + } + (*SymbolsBase)[*SymbolsCount].Address += PESectionHeaders[CoffEntry[i].e_scnum - 1].VirtualAddress; + } + (*SymbolsBase)[*SymbolsCount].FileOffset = 0; + if (0 == CoffEntry[i].e.e.e_zeroes) + { + if (sizeof(FuncName) <= strlen((char *) CoffStringsBase + CoffEntry[i].e.e.e_offset)) + { + free(*SymbolsBase); + fprintf(stderr, "Function name too long\n"); + return 1; + } + strcpy(FuncName, (char *) CoffStringsBase + CoffEntry[i].e.e.e_offset); + } + else + { + memcpy(FuncName, CoffEntry[i].e.e_name, E_SYMNMLEN); + FuncName[E_SYMNMLEN] = '\0'; + } + + /* Name demangling: stdcall */ + p = strrchr(FuncName, '@'); + if (NULL != p) + { + *p = '\0'; + } + p = ('_' == FuncName[0] || '@' == FuncName[0] ? FuncName + 1 : FuncName); + (*SymbolsBase)[*SymbolsCount].FunctionOffset = FindOrAddString(p, + StringsLength, + StringsBase); + (*SymbolsBase)[*SymbolsCount].SourceLine = 0; + (*SymbolsCount)++; + } + i += CoffEntry[i].e_numaux; + } + + qsort(*SymbolsBase, *SymbolsCount, sizeof(ROSSYM_ENTRY), (int (*)(const void *, const void *)) CompareSymEntry); + + return 0; +} + +static int +MergeStabsAndCoffs(ULONG *MergedSymbolCount, PROSSYM_ENTRY *MergedSymbols, + ULONG StabSymbolsCount, PROSSYM_ENTRY StabSymbols, + ULONG CoffSymbolsCount, PROSSYM_ENTRY CoffSymbols) +{ + ULONG StabIndex, j; + ULONG CoffIndex; + ULONG_PTR StabFunctionStartAddress; + ULONG StabFunctionStringOffset, NewStabFunctionStringOffset; + + *MergedSymbols = malloc(StabSymbolsCount * sizeof(ROSSYM_ENTRY)); + if (NULL == *MergedSymbols) + { + fprintf(stderr, "Unable to allocate memory for merged symbols\n"); + return 1; + } + *MergedSymbolCount = 0; + + StabFunctionStartAddress = 0; + StabFunctionStringOffset = 0; + CoffIndex = 0; + for (StabIndex = 0; StabIndex < StabSymbolsCount; StabIndex++) + { + (*MergedSymbols)[*MergedSymbolCount] = StabSymbols[StabIndex]; + for (j = StabIndex + 1; + j < StabSymbolsCount && StabSymbols[j].Address == StabSymbols[StabIndex].Address; + j++) + { + if (0 != StabSymbols[j].FileOffset && 0 == (*MergedSymbols)[*MergedSymbolCount].FileOffset) + { + (*MergedSymbols)[*MergedSymbolCount].FileOffset = StabSymbols[j].FileOffset; + } + if (0 != StabSymbols[j].FunctionOffset && 0 == (*MergedSymbols)[*MergedSymbolCount].FunctionOffset) + { + (*MergedSymbols)[*MergedSymbolCount].FunctionOffset = StabSymbols[j].FunctionOffset; + } + if (0 != StabSymbols[j].SourceLine && 0 == (*MergedSymbols)[*MergedSymbolCount].SourceLine) + { + (*MergedSymbols)[*MergedSymbolCount].SourceLine = StabSymbols[j].SourceLine; + } + } + StabIndex = j - 1; + while (CoffIndex < CoffSymbolsCount + && CoffSymbols[CoffIndex + 1].Address <= (*MergedSymbols)[*MergedSymbolCount].Address) + { + CoffIndex++; + } + NewStabFunctionStringOffset = (*MergedSymbols)[*MergedSymbolCount].FunctionOffset; + if (CoffSymbols[CoffIndex].Address < (*MergedSymbols)[*MergedSymbolCount].Address + && StabFunctionStartAddress < CoffSymbols[CoffIndex].Address + && 0 != CoffSymbols[CoffIndex].FunctionOffset) + { + (*MergedSymbols)[*MergedSymbolCount].FunctionOffset = CoffSymbols[CoffIndex].FunctionOffset; + } + if (StabFunctionStringOffset != NewStabFunctionStringOffset) + { + StabFunctionStartAddress = (*MergedSymbols)[*MergedSymbolCount].Address; + } + StabFunctionStringOffset = NewStabFunctionStringOffset; + (*MergedSymbolCount)++; + } + + return 0; +} + +static PIMAGE_SECTION_HEADER +FindSectionForRVA(DWORD RVA, unsigned NumberOfSections, PIMAGE_SECTION_HEADER SectionHeaders) +{ + unsigned Section; + + for (Section = 0; Section < NumberOfSections; Section++) + { + if (SectionHeaders[Section].VirtualAddress <= RVA && + RVA < SectionHeaders[Section].VirtualAddress + SectionHeaders[Section].Misc.VirtualSize) + { + return SectionHeaders + Section; + } + } + + return NULL; +} + +static int +IncludeRelocationsForSection(PIMAGE_SECTION_HEADER SectionHeader) +{ + static char *BlacklistedSections[] = + { + ".idata", + ".reloc" + }; + char SectionName[IMAGE_SIZEOF_SHORT_NAME]; + unsigned i; + + if (0 != (SectionHeader->Characteristics & IMAGE_SCN_LNK_REMOVE)) + { + return 0; + } + + for (i = 0; i < sizeof(BlacklistedSections) / sizeof(BlacklistedSections[0]); i++) + { + strncpy(SectionName, BlacklistedSections[i], IMAGE_SIZEOF_SHORT_NAME); + if (0 == memcmp(SectionName, SectionHeader->Name, IMAGE_SIZEOF_SHORT_NAME)) + { + return 0; + } + } + + return 1; +} + +static int +ProcessRelocations(ULONG *ProcessedRelocsLength, void **ProcessedRelocs, + void *RawData, PIMAGE_OPTIONAL_HEADER OptHeader, + unsigned NumberOfSections, PIMAGE_SECTION_HEADER SectionHeaders) +{ + PIMAGE_SECTION_HEADER RelocSectionHeader, TargetSectionHeader; + PIMAGE_BASE_RELOCATION BaseReloc, End, AcceptedRelocs; + int Found; + + if (OptHeader->NumberOfRvaAndSizes < IMAGE_DIRECTORY_ENTRY_BASERELOC + || 0 == OptHeader->DataDirectory[IMAGE_DIRECTORY_ENTRY_BASERELOC].VirtualAddress) + { + /* No relocation entries */ + *ProcessedRelocsLength = 0; + *ProcessedRelocs = NULL; + return 0; + } + + RelocSectionHeader = FindSectionForRVA(OptHeader->DataDirectory[IMAGE_DIRECTORY_ENTRY_BASERELOC].VirtualAddress, + NumberOfSections, SectionHeaders); + if (NULL == RelocSectionHeader) + { + fprintf(stderr, "Can't find section header for relocation data\n"); + return 1; + } + + *ProcessedRelocs = malloc(RelocSectionHeader->SizeOfRawData); + if (NULL == *ProcessedRelocs) + { + fprintf(stderr, "Failed to allocate %lu bytes for relocations\n", RelocSectionHeader->SizeOfRawData); + return 1; + } + *ProcessedRelocsLength = 0; + + BaseReloc = (PIMAGE_BASE_RELOCATION) ((char *) RawData + + RelocSectionHeader->PointerToRawData + + (OptHeader->DataDirectory[IMAGE_DIRECTORY_ENTRY_BASERELOC].VirtualAddress - + RelocSectionHeader->VirtualAddress)); + End = (PIMAGE_BASE_RELOCATION) ((char *) BaseReloc + + OptHeader->DataDirectory[IMAGE_DIRECTORY_ENTRY_BASERELOC].Size); + + while (BaseReloc < End && 0 < BaseReloc->SizeOfBlock) + { + TargetSectionHeader = FindSectionForRVA(BaseReloc->VirtualAddress, NumberOfSections, + SectionHeaders); + if (NULL != TargetSectionHeader && IncludeRelocationsForSection(TargetSectionHeader)) + { + AcceptedRelocs = *ProcessedRelocs; + Found = 0; + while (AcceptedRelocs < (PIMAGE_BASE_RELOCATION) ((char *) *ProcessedRelocs + + *ProcessedRelocsLength) + && ! Found) + { + Found = BaseReloc->SizeOfBlock == AcceptedRelocs->SizeOfBlock + && 0 == memcmp(BaseReloc, AcceptedRelocs, AcceptedRelocs->SizeOfBlock); + AcceptedRelocs= (PIMAGE_BASE_RELOCATION) ((char *) AcceptedRelocs + + AcceptedRelocs->SizeOfBlock); + } + if (! Found) + { + memcpy((char *) *ProcessedRelocs + *ProcessedRelocsLength, + BaseReloc, BaseReloc->SizeOfBlock); + *ProcessedRelocsLength += BaseReloc->SizeOfBlock; + } + } + BaseReloc = (PIMAGE_BASE_RELOCATION)((char *) BaseReloc + BaseReloc->SizeOfBlock); + } + + return 0; +} + +static int +CreateOutputFile(FILE *OutFile, void *InData, + PIMAGE_DOS_HEADER InDosHeader, PIMAGE_FILE_HEADER InFileHeader, + PIMAGE_OPTIONAL_HEADER InOptHeader, PIMAGE_SECTION_HEADER InSectionHeaders, + ULONG RosSymLength, void *RosSymSection) +{ + ULONG StartOfRawData; + unsigned Section; + void *OutHeader, *ProcessedRelocs, *PaddedRosSym, *Data; + PIMAGE_DOS_HEADER OutDosHeader; + PIMAGE_FILE_HEADER OutFileHeader; + PIMAGE_OPTIONAL_HEADER OutOptHeader; + PIMAGE_SECTION_HEADER OutSectionHeaders, CurrentSectionHeader; + DWORD CheckSum; + ULONG Length, i; + ULONG ProcessedRelocsLength; + ULONG RosSymOffset, RosSymFileLength; + int InRelocSectionIndex; + PIMAGE_SECTION_HEADER OutRelocSection; + + StartOfRawData = 0; + for (Section = 0; Section < InFileHeader->NumberOfSections; Section++) + { + if ((0 == StartOfRawData + || InSectionHeaders[Section].PointerToRawData < StartOfRawData) + && 0 != InSectionHeaders[Section].PointerToRawData + && 0 == (InSectionHeaders[Section].Characteristics & IMAGE_SCN_LNK_REMOVE)) + { + StartOfRawData = InSectionHeaders[Section].PointerToRawData; + } + } + OutHeader = malloc(StartOfRawData); + if (NULL == OutHeader) + { + fprintf(stderr, "Failed to allocate %lu bytes for output file header\n", StartOfRawData); + return 1; + } + memset(OutHeader, '\0', StartOfRawData); + + OutDosHeader = (PIMAGE_DOS_HEADER) OutHeader; + memcpy(OutDosHeader, InDosHeader, InDosHeader->e_lfanew + sizeof(ULONG)); + + OutFileHeader = (PIMAGE_FILE_HEADER)((char *) OutHeader + OutDosHeader->e_lfanew + sizeof(ULONG)); + memcpy(OutFileHeader, InFileHeader, sizeof(IMAGE_FILE_HEADER)); + OutFileHeader->PointerToSymbolTable = 0; + OutFileHeader->NumberOfSymbols = 0; + OutFileHeader->Characteristics &= ~(IMAGE_FILE_LINE_NUMS_STRIPPED | IMAGE_FILE_LOCAL_SYMS_STRIPPED | + IMAGE_FILE_DEBUG_STRIPPED); + + OutOptHeader = (PIMAGE_OPTIONAL_HEADER)(OutFileHeader + 1); + memcpy(OutOptHeader, InOptHeader, sizeof(IMAGE_OPTIONAL_HEADER)); + OutOptHeader->CheckSum = 0; + + OutSectionHeaders = (PIMAGE_SECTION_HEADER)((char *) OutOptHeader + OutFileHeader->SizeOfOptionalHeader); + + if (ProcessRelocations(&ProcessedRelocsLength, &ProcessedRelocs, InData, InOptHeader, + InFileHeader->NumberOfSections, InSectionHeaders)) + { + return 1; + } + if (InOptHeader->NumberOfRvaAndSizes < IMAGE_DIRECTORY_ENTRY_BASERELOC + || 0 == InOptHeader->DataDirectory[IMAGE_DIRECTORY_ENTRY_BASERELOC].VirtualAddress) + { + InRelocSectionIndex = -1; + } + else + { + InRelocSectionIndex = FindSectionForRVA(InOptHeader->DataDirectory[IMAGE_DIRECTORY_ENTRY_BASERELOC].VirtualAddress, + InFileHeader->NumberOfSections, InSectionHeaders) - InSectionHeaders; + } + + OutFileHeader->NumberOfSections = 0; + CurrentSectionHeader = OutSectionHeaders; + OutOptHeader->SizeOfImage = 0; + RosSymOffset = 0; + OutRelocSection = NULL; + for (Section = 0; Section < InFileHeader->NumberOfSections; Section++) + { + if (0 == (InSectionHeaders[Section].Characteristics & IMAGE_SCN_LNK_REMOVE)) + { + *CurrentSectionHeader = InSectionHeaders[Section]; + CurrentSectionHeader->PointerToLinenumbers = 0; + CurrentSectionHeader->NumberOfLinenumbers = 0; + if (OutOptHeader->SizeOfImage < CurrentSectionHeader->VirtualAddress + + CurrentSectionHeader->Misc.VirtualSize) + { + OutOptHeader->SizeOfImage = ROUND_UP(CurrentSectionHeader->VirtualAddress + + CurrentSectionHeader->Misc.VirtualSize, + OutOptHeader->SectionAlignment); + } + if (RosSymOffset < CurrentSectionHeader->PointerToRawData + CurrentSectionHeader->SizeOfRawData) + { + RosSymOffset = CurrentSectionHeader->PointerToRawData + CurrentSectionHeader->SizeOfRawData; + } + if (Section == InRelocSectionIndex) + { + OutRelocSection = CurrentSectionHeader; + } + (OutFileHeader->NumberOfSections) ++; + CurrentSectionHeader++; + } + } + + if (OutRelocSection == CurrentSectionHeader - 1) + { + OutOptHeader->DataDirectory[IMAGE_DIRECTORY_ENTRY_BASERELOC].Size = ProcessedRelocsLength; + if (OutOptHeader->SizeOfImage == OutRelocSection->VirtualAddress + + ROUND_UP(OutRelocSection->Misc.VirtualSize, + OutOptHeader->SectionAlignment)) + { + OutOptHeader->SizeOfImage = OutRelocSection->VirtualAddress + + ROUND_UP(ProcessedRelocsLength, + OutOptHeader->SectionAlignment); + } + OutRelocSection->Misc.VirtualSize = ProcessedRelocsLength; + if (RosSymOffset == OutRelocSection->PointerToRawData + + OutRelocSection->SizeOfRawData) + { + RosSymOffset = OutRelocSection->PointerToRawData + + ROUND_UP(ProcessedRelocsLength, OutOptHeader->FileAlignment); + } + OutRelocSection->SizeOfRawData = ROUND_UP(ProcessedRelocsLength, + OutOptHeader->FileAlignment); + } + + RosSymFileLength = ROUND_UP(RosSymLength, OutOptHeader->FileAlignment); + memcpy(CurrentSectionHeader->Name, ".rossym", 8); /* We're lucky: string is exactly 8 bytes long */ + CurrentSectionHeader->Misc.VirtualSize = RosSymLength; + CurrentSectionHeader->VirtualAddress = OutOptHeader->SizeOfImage; + CurrentSectionHeader->SizeOfRawData = RosSymFileLength; + CurrentSectionHeader->PointerToRawData = RosSymOffset; + CurrentSectionHeader->PointerToRelocations = 0; + CurrentSectionHeader->PointerToLinenumbers = 0; + CurrentSectionHeader->NumberOfRelocations = 0; + CurrentSectionHeader->NumberOfLinenumbers = 0; + CurrentSectionHeader->Characteristics = IMAGE_SCN_MEM_READ | IMAGE_SCN_MEM_DISCARDABLE + | IMAGE_SCN_LNK_REMOVE | IMAGE_SCN_TYPE_NOLOAD; + OutOptHeader->SizeOfImage = ROUND_UP(CurrentSectionHeader->VirtualAddress + + CurrentSectionHeader->Misc.VirtualSize, + OutOptHeader->SectionAlignment); + (OutFileHeader->NumberOfSections)++; + + PaddedRosSym = malloc(RosSymFileLength); + if (NULL == PaddedRosSym) + { + fprintf(stderr, "Failed to allocate %lu bytes for padded .rossym\n", RosSymFileLength); + return 1; + } + memcpy(PaddedRosSym, RosSymSection, RosSymLength); + memset((char *) PaddedRosSym + RosSymLength, '\0', RosSymFileLength - RosSymLength); + + CheckSum = 0; + for (i = 0; i < StartOfRawData / 2; i++) + { + CheckSum += ((unsigned short*) OutHeader)[i]; + CheckSum = 0xffff & (CheckSum + (CheckSum >> 16)); + } + Length = StartOfRawData; + for (Section = 0; Section < OutFileHeader->NumberOfSections; Section++) + { + if (OutRelocSection == OutSectionHeaders + Section) + { + Data = (void *) ProcessedRelocs; + } + else if (Section + 1 == OutFileHeader->NumberOfSections) + { + Data = (void *) PaddedRosSym; + } + else + { + Data = (void *) ((char *) InData + OutSectionHeaders[Section].PointerToRawData); + } + for (i = 0; i < OutSectionHeaders[Section].SizeOfRawData / 2; i++) + { + CheckSum += ((unsigned short*) Data)[i]; + CheckSum = 0xffff & (CheckSum + (CheckSum >> 16)); + } + Length += OutSectionHeaders[Section].SizeOfRawData; + } + CheckSum += Length; + OutOptHeader->CheckSum = CheckSum; + + if (fwrite(OutHeader, 1, StartOfRawData, OutFile) != StartOfRawData) + { + perror("Error writing output header\n"); + free(OutHeader); + return 1; + } + + for (Section = 0; Section < OutFileHeader->NumberOfSections; Section++) + { + if (0 != OutSectionHeaders[Section].SizeOfRawData) + { + fseek(OutFile, OutSectionHeaders[Section].PointerToRawData, SEEK_SET); + if (OutRelocSection == OutSectionHeaders + Section) + { + Data = (void *) ProcessedRelocs; + } + else if (Section + 1 == OutFileHeader->NumberOfSections) + { + Data = (void *) PaddedRosSym; + } + else + { + Data = (void *) ((char *) InData + OutSectionHeaders[Section].PointerToRawData); + } + if (fwrite(Data, 1, OutSectionHeaders[Section].SizeOfRawData, OutFile) != + OutSectionHeaders[Section].SizeOfRawData) + { + perror("Error writing section data\n"); + free(PaddedRosSym); + free(OutHeader); + return 1; + } + } + } + + free(PaddedRosSym); + free(OutHeader); + + return 0; +} int main(int argc, char* argv[]) { - SYMBOLFILE_HEADER SymbolFileHeader; - IMAGE_DOS_HEADER PEDosHeader; - IMAGE_FILE_HEADER PEFileHeader; + PSYMBOLFILE_HEADER SymbolFileHeader; + PIMAGE_DOS_HEADER PEDosHeader; + PIMAGE_FILE_HEADER PEFileHeader; PIMAGE_OPTIONAL_HEADER PEOptHeader; PIMAGE_SECTION_HEADER PESectionHeaders; ULONG ImageBase; - PVOID SymbolsBase; - ULONG SymbolsLength; - PVOID SymbolStringsBase; - ULONG SymbolStringsLength; - PVOID CoffSymbolsBase; - ULONG CoffSymbolsLength; - PVOID CoffSymbolStringsBase; - ULONG CoffSymbolStringsLength; - ULONG Idx; + void *StabBase; + ULONG StabsLength; + void *StabStringBase; + ULONG StabStringsLength; + void *CoffBase; + ULONG CoffsLength; + void *CoffStringBase; + ULONG CoffStringsLength; char* path1; char* path2; FILE* in; FILE* out; int n_in; - int n_out; - PSTAB_ENTRY StabEntry; - ULONG Count; - ULONG i; - ULONG SymbolsCount; - PSTR_ENTRY StrEntry; - ULONG StrCount; - PSTR_ENTRY CoffStrEntry; - ULONG CoffStrCount; - PEXTERNAL_SYMENT SymEntry; - unsigned NumAux; + void *StringBase; + ULONG StringsLength; + ULONG StabSymbolsCount; + PROSSYM_ENTRY StabSymbols; + ULONG CoffSymbolsCount; + PROSSYM_ENTRY CoffSymbols; + ULONG MergedSymbolsCount; + PROSSYM_ENTRY MergedSymbols; + long FileSize; + void *FileData; + ULONG RosSymLength; + void *RosSymSection; - if (argc != 3) + if (3 != argc) { - fprintf(stderr, "Too many arguments\n"); + fprintf(stderr, "Usage: rsym \n"); exit(1); } @@ -339,199 +1052,156 @@ int main(int argc, char* argv[]) perror("Cannot open input file"); exit(1); } + fseek(in, 0L, SEEK_END); + FileSize = ftell(in); + fseek(in, 0L, SEEK_SET); + FileData = malloc(FileSize); + if (NULL == FileData) + { + fclose(in); + fprintf(stderr, "Can't allocate %ld bytes to read input file\n", FileSize); + exit(1); + } + n_in = fread(FileData, 1, FileSize, in); + if (n_in != FileSize) + { + perror("Error reading from input file"); + free(FileData); + fclose(in); + exit(1); + } + fclose(in); + + /* Check if MZ header exists */ + PEDosHeader = (PIMAGE_DOS_HEADER) FileData; + if (PEDosHeader->e_magic != IMAGE_DOS_MAGIC || PEDosHeader->e_lfanew == 0L) + { + perror("Input file is not a PE image.\n"); + free(FileData); + exit(1); + } + + /* Locate PE file header */ + /* sizeof(ULONG) = sizeof(MAGIC) */ + PEFileHeader = (PIMAGE_FILE_HEADER)((char *) FileData + PEDosHeader->e_lfanew + sizeof(ULONG)); + + /* Locate optional header */ + PEOptHeader = (PIMAGE_OPTIONAL_HEADER)(PEFileHeader + 1); + ImageBase = PEOptHeader->ImageBase; + + /* Locate PE section headers */ + PESectionHeaders = (PIMAGE_SECTION_HEADER)((char *) PEOptHeader + PEFileHeader->SizeOfOptionalHeader); + + if (GetStabInfo(FileData, PEFileHeader, PESectionHeaders, &StabsLength, &StabBase, + &StabStringsLength, &StabStringBase)) + { + free(FileData); + exit(1); + } + + if (GetCoffInfo(FileData, PEFileHeader, PESectionHeaders, &CoffsLength, &CoffBase, + &CoffStringsLength, &CoffStringBase)) + { + free(FileData); + exit(1); + } + + StringBase = malloc(1 + StabStringsLength + CoffStringsLength + + (CoffsLength / sizeof(ROSSYM_ENTRY)) * (E_SYMNMLEN + 1)); + if (NULL == StringBase) + { + free(FileData); + fprintf(stderr, "Failed to allocate memory for strings table\n"); + exit(1); + } + /* Make offset 0 into an empty string */ + *((char *) StringBase) = '\0'; + StringsLength = 1; + + if (ConvertStabs(&StabSymbolsCount, &StabSymbols, &StringsLength, StringBase, + StabsLength, StabBase, StabStringsLength, StabStringBase, + ImageBase, PEFileHeader, PESectionHeaders)) + { + free(StringBase); + free(FileData); + fprintf(stderr, "Failed to allocate memory for strings table\n"); + exit(1); + } + + if (ConvertCoffs(&CoffSymbolsCount, &CoffSymbols, &StringsLength, StringBase, + CoffsLength, CoffBase, CoffStringsLength, CoffStringBase, + ImageBase, PEFileHeader, PESectionHeaders)) + { + free(StabSymbols); + free(StringBase); + free(FileData); + exit(1); + } + + if (MergeStabsAndCoffs(&MergedSymbolsCount, &MergedSymbols, + StabSymbolsCount, StabSymbols, + CoffSymbolsCount, CoffSymbols)) + { + free(CoffSymbols); + free(StabSymbols); + free(StringBase); + free(FileData); + exit(1); + } + + free(CoffSymbols); + free(StabSymbols); + + RosSymLength = sizeof(SYMBOLFILE_HEADER) + MergedSymbolsCount * sizeof(ROSSYM_ENTRY) + + StringsLength; + RosSymSection = malloc(RosSymLength); + if (NULL == RosSymSection) + { + free(MergedSymbols); + free(StringBase); + free(FileData); + fprintf(stderr, "Unable to allocate memory for .rossym section\n"); + exit(1); + } + memset(RosSymSection, '\0', RosSymLength); + + SymbolFileHeader = (PSYMBOLFILE_HEADER) RosSymSection; + SymbolFileHeader->SymbolsOffset = sizeof(SYMBOLFILE_HEADER); + SymbolFileHeader->SymbolsLength = MergedSymbolsCount * sizeof(ROSSYM_ENTRY); + SymbolFileHeader->StringsOffset = SymbolFileHeader->SymbolsOffset + SymbolFileHeader->SymbolsLength; + SymbolFileHeader->StringsLength = StringsLength; + + memcpy((char *) RosSymSection + SymbolFileHeader->SymbolsOffset, MergedSymbols, + SymbolFileHeader->SymbolsLength); + memcpy((char *) RosSymSection + SymbolFileHeader->StringsOffset, StringBase, + SymbolFileHeader->StringsLength); + + free(MergedSymbols); + free(StringBase); out = fopen(path2, "wb"); if (out == NULL) { perror("Cannot open output file"); - fclose(in); + free(RosSymSection); + free(FileData); exit(1); } - /* Check if MZ header exists */ - n_in = fread(&PEDosHeader, 1, sizeof(PEDosHeader), in); - if (PEDosHeader.e_magic != IMAGE_DOS_MAGIC && PEDosHeader.e_lfanew != 0L) + if (CreateOutputFile(out, FileData, PEDosHeader, PEFileHeader, PEOptHeader, + PESectionHeaders, RosSymLength, RosSymSection)) { - perror("Input file is not a PE image.\n"); - } - - /* Read PE file header */ - /* sizeof(ULONG) = sizeof(MAGIC) */ - fseek(in, PEDosHeader.e_lfanew + sizeof(ULONG), SEEK_SET); - n_in = fread(&PEFileHeader, 1, sizeof(PEFileHeader), in); - - /* Read optional header */ - PEOptHeader = malloc(PEFileHeader.SizeOfOptionalHeader); - fread ( PEOptHeader, 1, PEFileHeader.SizeOfOptionalHeader, in ); - ImageBase = PEOptHeader->ImageBase; - - /* Read PE section headers */ - PESectionHeaders = malloc(PEFileHeader.NumberOfSections * sizeof(IMAGE_SECTION_HEADER)); - fseek(in, PEDosHeader.e_lfanew + sizeof(ULONG) + sizeof(IMAGE_FILE_HEADER) - + sizeof(IMAGE_OPTIONAL_HEADER), SEEK_SET); - n_in = fread(PESectionHeaders, 1, PEFileHeader.NumberOfSections * sizeof(IMAGE_SECTION_HEADER), in); - - /* Copy .stab and .stabstr sections if available */ - SymbolsBase = NULL; - SymbolsLength = 0; - SymbolStringsBase = NULL; - SymbolStringsLength = 0; - - for (Idx = 0; Idx < PEFileHeader.NumberOfSections; Idx++) - { - //printf("section: '%.08s'\n", PESectionHeaders[Idx].Name); - if ((strncmp((char*)PESectionHeaders[Idx].Name, ".stab", 5) == 0) - && (PESectionHeaders[Idx].Name[5] == 0)) - { - //printf(".stab section found. Size %d\n", - // PESectionHeaders[Idx].SizeOfRawData); - - SymbolsLength = PESectionHeaders[Idx].SizeOfRawData; - SymbolsBase = malloc(SymbolsLength); - - fseek(in, PESectionHeaders[Idx].PointerToRawData, SEEK_SET); - n_in = fread(SymbolsBase, 1, SymbolsLength, in); - } - - if (strncmp((char*)PESectionHeaders[Idx].Name, ".stabstr", 8) == 0) - { - //printf(".stabstr section found. Size %d\n", - // PESectionHeaders[Idx].SizeOfRawData); - - SymbolStringsLength = PESectionHeaders[Idx].SizeOfRawData; - SymbolStringsBase = malloc(SymbolStringsLength); - - fseek(in, PESectionHeaders[Idx].PointerToRawData, SEEK_SET); - n_in = fread(SymbolStringsBase, 1, SymbolStringsLength, in); - } - } - - StabEntry = SymbolsBase; - SymbolsCount = SymbolsLength / sizeof(STAB_ENTRY); - Count = 0; - - for (i = 0; i < SymbolsCount; i++) - { - switch ( StabEntry[i].n_type ) - { - case N_FUN: - if ( StabEntry[i].n_desc == 0 ) // line # 0 isn't valid - continue; - break; - case N_SLINE: - break; - case N_SO: - break; - default: - continue; - } - memmove(&StabEntry[Count], &StabEntry[i], sizeof(STAB_ENTRY)); - if ( StabEntry[Count].n_value >= ImageBase ) - StabEntry[Count].n_value -= ImageBase; - Count++; - } - - StrEntry = malloc(sizeof(STR_ENTRY) * Count); - StrCount = 0; - - for (i = 0; i < Count; i++) - { - RelocateString(&StabEntry[i].n_strx, StrEntry, &StrCount, SymbolStringsBase); - } - - SymbolFileHeader.StabsOffset = sizeof(SYMBOLFILE_HEADER); - SymbolFileHeader.StabsLength = Count * sizeof(STAB_ENTRY); - SymbolFileHeader.StabstrOffset = SymbolFileHeader.StabsOffset + SymbolFileHeader.StabsLength; - SymbolFileHeader.StabstrLength = StrEntry[StrCount-1].NewOffset + StrEntry[StrCount-1].Length; - - if (0 == PEFileHeader.PointerToSymbolTable || 0 == PEFileHeader.NumberOfSymbols) - { - /* No COFF symbol table */ - SymbolFileHeader.SymbolsOffset = 0; - SymbolFileHeader.SymbolsLength = 0; - SymbolFileHeader.SymbolstrOffset = 0; - SymbolFileHeader.SymbolstrLength = 0; - } - else - { - CoffSymbolsLength = PEFileHeader.NumberOfSymbols * sizeof(EXTERNAL_SYMENT); - CoffSymbolsBase = malloc(CoffSymbolsLength); - if (NULL == CoffSymbolsBase) - { - fprintf(stderr, "Unable to allocate %u bytes for COFF symbols\n", - (unsigned) CoffSymbolsLength); - exit(1); - } - fseek(in, PEFileHeader.PointerToSymbolTable, SEEK_SET); - n_in = fread(CoffSymbolsBase, 1, CoffSymbolsLength, in); - - SymEntry = CoffSymbolsBase; - Count = 0; - for (i = 0; i < PEFileHeader.NumberOfSymbols; i++) - { - NumAux = SymEntry[i].e_numaux; - if (ISFCN(SymEntry[i].e_type)) - { - SymEntry[Count] = SymEntry[i]; - if (0 < SymEntry[Count].e_scnum) - { - if (PEFileHeader.NumberOfSections < SymEntry[Count].e_scnum) - { - fprintf(stderr, "Invalid section number %d in COFF symbols (only %d sections present)\n", - SymEntry[Count].e_scnum, PEFileHeader.NumberOfSections); - exit(1); - } - SymEntry[Count].e_value += PESectionHeaders[SymEntry[Count].e_scnum - 1].VirtualAddress; - SymEntry[Count].e_scnum = -3; - SymEntry[Count].e_numaux = 0; - } - Count++; - } - i += NumAux; - } - - qsort(CoffSymbolsBase, Count, sizeof(EXTERNAL_SYMENT), (int (*)(const void *, const void *)) CompareSyment); - - n_in = fread(&CoffSymbolStringsLength, 1, sizeof(ULONG), in); - CoffSymbolStringsBase = malloc(CoffSymbolStringsLength); - if (NULL == CoffSymbolStringsBase) - { - fprintf(stderr, "Unable to allocate %u bytes for COFF symbol strings\n", - (unsigned) CoffSymbolStringsLength); - exit(1); - } - n_in = fread((char *) CoffSymbolStringsBase + sizeof(ULONG), 1, CoffSymbolStringsLength - 4, in); - - CoffStrEntry = malloc(sizeof(STR_ENTRY) * Count); - CoffStrCount = 0; - - for (i = 0; i < Count; i++) - { - if (0 == SymEntry[i].e.e.e_zeroes) - { - RelocateString(&SymEntry[i].e.e.e_offset, CoffStrEntry, &CoffStrCount, CoffSymbolStringsBase); - } - } - - SymbolFileHeader.SymbolsOffset = SymbolFileHeader.StabstrOffset + SymbolFileHeader.StabstrLength; - SymbolFileHeader.SymbolsLength = Count * sizeof(EXTERNAL_SYMENT); - SymbolFileHeader.SymbolstrOffset = SymbolFileHeader.SymbolsOffset + SymbolFileHeader.SymbolsLength; - SymbolFileHeader.SymbolstrLength = CoffStrEntry[CoffStrCount - 1].NewOffset - + CoffStrEntry[CoffStrCount - 1].Length; - } - - n_out = fwrite(&SymbolFileHeader, 1, sizeof(SYMBOLFILE_HEADER), out); - n_out = fwrite(SymbolsBase, 1, SymbolFileHeader.StabsLength, out); - for (i = 0; i < StrCount; i++) - { - fwrite(StrEntry[i].Name, 1, StrEntry[i].Length, out); - } - n_out = fwrite(CoffSymbolsBase, 1, SymbolFileHeader.SymbolsLength, out); - for (i = 0; i < CoffStrCount; i++) - { - fwrite(CoffStrEntry[i].Name, 1, CoffStrEntry[i].Length, out); + fclose(out); + free(RosSymSection); + free(FileData); + exit(1); } fclose(out); - exit(0); + free(RosSymSection); + free(FileData); + + return 0; } + +/* EOF */ From 56b11588c4befd7aca7dafee257e95503b345c19 Mon Sep 17 00:00:00 2001 From: Filip Navara Date: Thu, 3 Feb 2005 19:08:54 +0000 Subject: [PATCH 089/185] Prevent linking to MSVCRT in case some CRT function isn't found. svn path=/trunk/; revision=13394 --- reactos/ntoskrnl/Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/reactos/ntoskrnl/Makefile b/reactos/ntoskrnl/Makefile index f13ab1ed6ee..a954b99ad0d 100644 --- a/reactos/ntoskrnl/Makefile +++ b/reactos/ntoskrnl/Makefile @@ -10,8 +10,6 @@ TARGET_TYPE = kernel TARGET_NAME = ntoskrnl -TARGET_BASE = 0xc0000000 - TARGET_BOOTSTRAP = yes CONFIG := @@ -526,7 +524,10 @@ TARGET_LFLAGS = \ -Wl,--image-base,$(TARGET_BASE) \ -Wl,--file-alignment,0x1000 \ -Wl,--section-alignment,0x1000 \ - -Wl,--entry,_NtProcessStartup + -Wl,--entry,_NtProcessStartup \ + -nostdlib + +TARGET_GCCLIBS = gcc TAGS: $(TAG_OBJECTS) etags $(addprefix -i , $(TAG_OBJECTS)) From bb6b84b0afe665879d295fbcdb9c890938122bc5 Mon Sep 17 00:00:00 2001 From: Filip Navara Date: Thu, 3 Feb 2005 19:15:43 +0000 Subject: [PATCH 090/185] Correct the library order. svn path=/trunk/; revision=13396 --- reactos/ntoskrnl/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/ntoskrnl/Makefile b/reactos/ntoskrnl/Makefile index a954b99ad0d..e1123a5ed1b 100644 --- a/reactos/ntoskrnl/Makefile +++ b/reactos/ntoskrnl/Makefile @@ -512,10 +512,10 @@ TARGET_OBJECTS = $(EXTRA_OBJECTS) $(OBJECTS) TARGET_LIBS = \ $(DDK_PATH_LIB)/libhal.a \ $(SDK_PATH_LIB)/librtl.a \ + $(SDK_PATH_LIB)/librossym.a \ $(SDK_PATH_LIB)/libstring.a \ $(SDK_PATH_LIB)/librosrtl.a \ $(SDK_PATH_LIB)/libpseh.a \ - $(SDK_PATH_LIB)/librossym.a \ $(PATH_TO_TOP)/drivers/lib/csq/csq.o TARGET_LFLAGS = \ From 85f0f3de51d167d3728705d6d4071da9b2634d2d Mon Sep 17 00:00:00 2001 From: Aleksey Bragin Date: Thu, 3 Feb 2005 20:38:38 +0000 Subject: [PATCH 091/185] Cromwell <-> PCI interface (stubs now) is taken to another file. In the long run I'm gonna change the file structure, but for now it's ok. svn path=/trunk/; revision=13397 --- .../usb/cromwell/linux/linux_wrapper.h | 42 +----- reactos/drivers/usb/cromwell/linux/pci_hal.c | 123 ++++++++++++++++++ 2 files changed, 124 insertions(+), 41 deletions(-) create mode 100644 reactos/drivers/usb/cromwell/linux/pci_hal.c diff --git a/reactos/drivers/usb/cromwell/linux/linux_wrapper.h b/reactos/drivers/usb/cromwell/linux/linux_wrapper.h index 4518f9dcada..bcb1987b98b 100644 --- a/reactos/drivers/usb/cromwell/linux/linux_wrapper.h +++ b/reactos/drivers/usb/cromwell/linux/linux_wrapper.h @@ -686,47 +686,7 @@ int my_kernel_thread(int (*handler)(void*), void* parm, int flags); /*------------------------------------------------------------------------*/ /* PCI, simple and inlined... */ /*------------------------------------------------------------------------*/ -static int __inline__ pci_enable_device(struct pci_dev *dev) {return 0;} - -static unsigned long __inline__ pci_resource_start (struct pci_dev *dev, int x) -{ - return dev->base[x]; -} - -static unsigned long __inline__ pci_resource_len (struct pci_dev *dev, int x){return 0;} - -static int __inline__ request_mem_region(unsigned long addr, unsigned long len, const char * d){return 1;} - -static void __inline__ *ioremap_nocache(unsigned long addr, unsigned long len) -{ - return (void*)addr; -} - -static int __inline__ release_mem_region(unsigned long addr, unsigned long len){return 0;} - -static int __inline__ pci_resource_flags(struct pci_dev *dev, int x) -{ - return dev->flags[x]; -} - -static int __inline__ request_region(unsigned long addr, unsigned long len, const char * d){return 0;} - -static int __inline__ pci_set_master(struct pci_dev *dev){return 0;} - -static int __inline__ iounmap(void* p){return 0;} - -static int __inline__ release_region(unsigned long addr, unsigned long len){return 0;} - -static int __inline__ pci_set_drvdata(struct pci_dev *dev, void* d) -{ - dev->data=(void*)d; - return 0; -} - -static void __inline__ *pci_get_drvdata(struct pci_dev *dev) -{ - return dev->data; -} +#include "pci_hal.c" /*------------------------------------------------------------------------*/ /* IRQ handling */ diff --git a/reactos/drivers/usb/cromwell/linux/pci_hal.c b/reactos/drivers/usb/cromwell/linux/pci_hal.c new file mode 100644 index 00000000000..4008b8412ff --- /dev/null +++ b/reactos/drivers/usb/cromwell/linux/pci_hal.c @@ -0,0 +1,123 @@ +// PCI -> HAL interface +// this file is part of linux_wrapper.h + +/* + Initialize device before it's used by a driver. Ask low-level code to enable I/O and memory. + Wake up the device if it was suspended. Beware, this function can fail. + */ +static int __inline__ pci_enable_device(struct pci_dev *dev) +{ + return 0; +} + +// Get physical address where resource x resides +static unsigned long __inline__ pci_resource_start (struct pci_dev *dev, int x) +{ + // HalGetBusData... + // HalAssignSlotResources ? + return dev->base[x]; +} + +// ??? +static unsigned long __inline__ pci_resource_len (struct pci_dev *dev, int x){return 0;} + +// ??? +static int __inline__ pci_resource_flags(struct pci_dev *dev, int x) +{ + return dev->flags[x]; +} + +/* + Enables bus-mastering for device dev +*/ +static int __inline__ pci_set_master(struct pci_dev *dev) {return 0;} + +// Store pointer to data for this device +static int __inline__ pci_set_drvdata(struct pci_dev *dev, void* d) +{ + dev->data=(void*)d; + return 0; +} + +// Get pointer to previously saved data +static void __inline__ *pci_get_drvdata(struct pci_dev *dev) +{ + return dev->data; +} + + +/* + =========================================================================== + I/O mem related stuff below +*/ + +/* +Allocate I/O memory region. + +Parameters: +start begin of region +n length of region +name name of requester +*/ +static int __inline__ request_region(unsigned long addr, unsigned long len, const char * d){return 0;} + +/* +Unmap I/O memory from kernel address space. + +Parameters: +addr virtual start address +*/ +static int __inline__ iounmap(void* p) +{ + return 0; +} + +/* +Release I/O port region. + +Parameters: +start begin of region +n length of region +*/ +static int __inline__ release_region(unsigned long addr, unsigned long len){return 0;} + +/* +Allocate I/O memory region. + +Parameters: +start begin of region +n length of region +name name of requester +*/ +static int __inline__ request_mem_region(unsigned long addr, unsigned long len, const char * d) +{ + return 1; +} + +/* +Remap I/O memory into kernel address space (no cache). + +Parameters: +phys_addr begin of physical address range +size size of physical address range + +Returns: +virtual start address of mapped range +*/ +static void __inline__ *ioremap_nocache(unsigned long addr, unsigned long len) +{ + // MmMapIoSpace ? + return (void*)addr; +} + +/* +Release I/O memory region. + +Parameters: +start begin of region +n length of region +*/ +static int __inline__ release_mem_region(unsigned long addr, unsigned long len) +{ + return 0; +} From c41788a8a2b6519f98c5f4e208e424d8a1bf7428 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20van=20Geldorp?= Date: Thu, 3 Feb 2005 21:31:57 +0000 Subject: [PATCH 092/185] Always clean the .gch file, even if ROS_USE_PCH is not active. This prevents problems when switching between PCH and non-PCH builds. svn path=/trunk/; revision=13398 --- reactos/tools/helper.mk | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/reactos/tools/helper.mk b/reactos/tools/helper.mk index c50a5e80892..ed2f158aa0c 100644 --- a/reactos/tools/helper.mk +++ b/reactos/tools/helper.mk @@ -905,23 +905,26 @@ endif # Precompiled header support # When using PCHs, use dependency tracking to keep the .gch files up-to-date. +# When TARGET_PCH is defined, we always want to clean the .gch file, even if +# ROS_USE_PCH is not active. This prevents problems when switching between +# PCH and non-PCH builds. -MK_PCHNAME = -ifeq ($(ROS_USE_PCH),yes) ifneq ($(TARGET_PCH),) +MK_PCHCLEAN = $(TARGET_PCH).gch +ifeq ($(ROS_USE_PCH),yes) MK_PCHNAME = $(TARGET_PCH).gch - ifeq ($(TARGET_CPPAPP),yes) PCH_CC := $(CXX) -else +else # TARGET_CPPAPP PCH_CC := $(CC) -endif - - -endif # TARGET_PCH -else # +endif # TARGET_CPPAPP +else # ROS_USE_PCH MK_PCHNAME = endif # ROS_USE_PCH +else # TARGET_PCH +MK_PCHCLEAN = +MK_PCHNAME = +endif # TARGET_PCH # Be carefull not to clean non-object files MK_CLEANFILES := $(filter %.o,$(MK_OBJECTS)) @@ -931,7 +934,7 @@ MK_CLEANDEPS := $(join $(dir $(MK_CLEANFILTERED)), $(addprefix ., $(notdir $(MK_ # FIXME: The $(MK_BASENAME).sym can be removed around 15 Feb 2005 clean: $(MK_REGTESTS_CLEAN) $(SUBDIRS:%=%_clean) $(HALFVERBOSEECHO) [CLEAN] - - $(RM) *.o $(MK_PCHNAME) $(MK_BASENAME).sym $(MK_BASENAME).a $(MK_RESOURCE) \ + - $(RM) *.o $(MK_PCHCLEAN) $(MK_BASENAME).sym $(MK_BASENAME).a $(MK_RESOURCE) \ $(MK_FULLNAME) $(MK_NOSTRIPNAME) $(MK_CLEANFILES) $(MK_CLEANDEPS) $(MK_BASENAME).map \ junk.tmp base.tmp temp.exp $(MK_RC_BINARIES) $(MK_SPECDEF) $(MK_STUBS_SRC) \ $(MK_GENERATED_MAKEFILE) $(TARGET_CLEAN) From 14986414b972aac165e02ef68851a8f5c7bf64dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20van=20Geldorp?= Date: Thu, 3 Feb 2005 22:01:00 +0000 Subject: [PATCH 093/185] Always create debug info (-g) svn path=/trunk/; revision=13400 --- reactos/tools/helper.mk | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/reactos/tools/helper.mk b/reactos/tools/helper.mk index ed2f158aa0c..da8365b05dd 100644 --- a/reactos/tools/helper.mk +++ b/reactos/tools/helper.mk @@ -642,22 +642,17 @@ endif include $(PATH_TO_TOP)/config -TARGET_CFLAGS += $(MK_CFLAGS) $(STD_CFLAGS) -ifeq ($(DBG),1) - TARGET_ASFLAGS += -g - TARGET_CFLAGS += -g - TARGET_LFLAGS += -g -endif +TARGET_CFLAGS += $(MK_CFLAGS) $(STD_CFLAGS) -g -TARGET_CPPFLAGS += $(MK_CPPFLAGS) $(STD_CPPFLAGS) +TARGET_CPPFLAGS += $(MK_CPPFLAGS) $(STD_CPPFLAGS) -g TARGET_RCFLAGS += $(MK_RCFLAGS) $(STD_RCFLAGS) -TARGET_ASFLAGS += $(MK_ASFLAGS) $(STD_ASFLAGS) +TARGET_ASFLAGS += $(MK_ASFLAGS) $(STD_ASFLAGS) -g TARGET_NFLAGS += $(MK_NFLAGS) $(STD_NFLAGS) -TARGET_LFLAGS += $(MK_LFLAGS) $(STD_LFLAGS) +TARGET_LFLAGS += $(MK_LFLAGS) $(STD_LFLAGS) -g MK_GCCLIBS := $(addprefix -l, $(TARGET_GCCLIBS)) From f09c1928aee4900b1a0b64d831acb523a9db42cd Mon Sep 17 00:00:00 2001 From: Mike Nordell Date: Fri, 4 Feb 2005 03:21:46 +0000 Subject: [PATCH 094/185] Fix broken year handling. svn path=/trunk/; revision=13402 --- reactos/boot/freeldr/freeldr/arch/i386/pcrtc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/boot/freeldr/freeldr/arch/i386/pcrtc.c b/reactos/boot/freeldr/freeldr/arch/i386/pcrtc.c index c6823d064e5..aba3656703c 100644 --- a/reactos/boot/freeldr/freeldr/arch/i386/pcrtc.c +++ b/reactos/boot/freeldr/freeldr/arch/i386/pcrtc.c @@ -55,7 +55,7 @@ PcRTCGetCurrentDateTime(PU32 Year, PU32 Month, PU32 Day, PU32 Hour, PU32 Minute, if (NULL != Year) { - *Year = 100 * BCD_INT(Regs.b.cl) + BCD_INT(Regs.b.ch); + *Year = 100 * BCD_INT(Regs.b.ch) + BCD_INT(Regs.b.cl); } if (NULL != Month) { From fc76ea5157626b1289def035590118247b801a4d Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Fri, 4 Feb 2005 12:27:34 +0000 Subject: [PATCH 095/185] Implement DelayedMove and FileExists. svn path=/trunk/; revision=13403 --- reactos/include/wine/setupapi.h | 2 ++ reactos/lib/setupapi/misc.c | 43 ++++++++++++++++++++++++++++++ reactos/lib/setupapi/setupapi.spec | 4 +-- 3 files changed, 47 insertions(+), 2 deletions(-) diff --git a/reactos/include/wine/setupapi.h b/reactos/include/wine/setupapi.h index 763b07202e7..cee5f4c02e6 100644 --- a/reactos/include/wine/setupapi.h +++ b/reactos/include/wine/setupapi.h @@ -666,9 +666,11 @@ DECL_WINELIB_SETUPAPI_TYPE_AW(PFILEPATHS) LONG WINAPI AddTagToGroupOrderList(PCWSTR lpGroupName, DWORD dwUnknown2, DWORD dwUnknown3); +BOOL WINAPI DelayedMove(PCWSTR lpExistingFileName, PCWSTR lpNewFileName); BOOL WINAPI DoesUserHavePrivilege(PCWSTR lpPrivilegeName); PWSTR WINAPI DuplicateString(PCWSTR lpSrc); BOOL WINAPI EnablePrivilege(PCWSTR lpPrivilegeName, BOOL bEnable); +BOOL WINAPI FileExists(PCWSTR lpFileName, PWIN32_FIND_DATAW lpFileFindData); void WINAPI InstallHinfSectionA( HWND hwnd, HINSTANCE handle, PCSTR cmdline, INT show ); void WINAPI InstallHinfSectionW( HWND hwnd, HINSTANCE handle, PCWSTR cmdline, INT show ); #define InstallHinfSection WINELIB_NAME_AW(InstallHinfSection) diff --git a/reactos/lib/setupapi/misc.c b/reactos/lib/setupapi/misc.c index 4a07712a991..218da19fd35 100644 --- a/reactos/lib/setupapi/misc.c +++ b/reactos/lib/setupapi/misc.c @@ -30,6 +30,9 @@ #include "wine/unicode.h" #include "wine/debug.h" +#include "setupapi_private.h" + + WINE_DEFAULT_DEBUG_CHANNEL(setupapi); @@ -458,3 +461,43 @@ BOOL WINAPI EnablePrivilege(LPCWSTR lpPrivilegeName, BOOL bEnable) return bResult; } + + +BOOL WINAPI DelayedMove(LPCWSTR lpExistingFileName, LPCWSTR lpNewFileName) +{ + if (OsVersionInfo.dwPlatformId != VER_PLATFORM_WIN32_NT) + { + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return FALSE; + } + + return MoveFileExW(lpExistingFileName, lpNewFileName, + MOVEFILE_REPLACE_EXISTING | MOVEFILE_DELAY_UNTIL_REBOOT); +} + + +BOOL WINAPI FileExists(LPCWSTR lpFileName, LPWIN32_FIND_DATAW lpFileFindData) +{ + WIN32_FIND_DATAW FindData; + HANDLE hFind; + UINT uErrorMode; + DWORD dwError; + + uErrorMode = SetErrorMode(SEM_FAILCRITICALERRORS); + + hFind = FindFirstFileW(lpFileName, &FindData); + if (hFind == INVALID_HANDLE_VALUE) + { + dwError = GetLastError(); + SetErrorMode(uErrorMode); + SetLastError(dwError); + return FALSE; + } + + FindClose(hFind); + + if (lpFileFindData) + memcpy(lpFileFindData, &FindData, sizeof(WIN32_FIND_DATAW)); + + return TRUE; +} diff --git a/reactos/lib/setupapi/setupapi.spec b/reactos/lib/setupapi/setupapi.spec index 9ecca648230..10ed72a4980 100644 --- a/reactos/lib/setupapi/setupapi.spec +++ b/reactos/lib/setupapi/setupapi.spec @@ -194,14 +194,14 @@ @ stub CaptureStringArg @ stub CenterWindowRelativeToParent @ stub ConcatenatePaths -@ stub DelayedMove +@ stdcall DelayedMove(wstr wstr) @ stub DelimStringToMultiSz @ stub DestroyTextFileReadBuffer @ stdcall DoesUserHavePrivilege(wstr) @ stdcall DuplicateString(wstr) @ stdcall EnablePrivilege(wstr long) @ stub ExtensionPropSheetPageProc -@ stub FileExists +@ stdcall FileExists(wstr ptr) @ stub FreeStringArray @ stub GetCurrentDriverSigningPolicy @ stub GetNewInfName From 81d6ebf9e3af1af27f68d6c4e6a9129b6efff33c Mon Sep 17 00:00:00 2001 From: Aleksey Bragin Date: Fri, 4 Feb 2005 16:49:17 +0000 Subject: [PATCH 096/185] usbd.sys implementation - done long time ago by Filip, I just added .def and changed .rc (I think he doesn't mind it :)) svn path=/trunk/; revision=13404 --- reactos/drivers/usb/usbd/makefile | 17 ++ reactos/drivers/usb/usbd/test.c | 33 +++ reactos/drivers/usb/usbd/usbd.c | 457 ++++++++++++++++++++++++++++++ reactos/drivers/usb/usbd/usbd.def | 13 + reactos/drivers/usb/usbd/usbd.rc | 5 + 5 files changed, 525 insertions(+) create mode 100644 reactos/drivers/usb/usbd/makefile create mode 100644 reactos/drivers/usb/usbd/test.c create mode 100644 reactos/drivers/usb/usbd/usbd.c create mode 100644 reactos/drivers/usb/usbd/usbd.def create mode 100644 reactos/drivers/usb/usbd/usbd.rc diff --git a/reactos/drivers/usb/usbd/makefile b/reactos/drivers/usb/usbd/makefile new file mode 100644 index 00000000000..4e3ba95dc41 --- /dev/null +++ b/reactos/drivers/usb/usbd/makefile @@ -0,0 +1,17 @@ +# $Id: $ + +PATH_TO_TOP = ../../.. + +TARGET_TYPE = export_driver + +TARGET_NAME = usbd + +TARGET_OBJECTS = usbd.o + +TARGET_GCCLIBS = gcc + +TARGET_CFLAGS = -D__USE_W32API -O3 -s + +include $(PATH_TO_TOP)/rules.mak + +include $(TOOLS_PATH)/helper.mk diff --git a/reactos/drivers/usb/usbd/test.c b/reactos/drivers/usb/usbd/test.c new file mode 100644 index 00000000000..193a9200ba1 --- /dev/null +++ b/reactos/drivers/usb/usbd/test.c @@ -0,0 +1,33 @@ +#include +#include +#include + +typedef ULONG STDCALL +(*USBD_GetInterfaceLengthTYPE)( + PUSB_INTERFACE_DESCRIPTOR InterfaceDescriptor, + PUCHAR BufferEnd + ); + +int main() +{ + HMODULE Lib; + USB_INTERFACE_DESCRIPTOR InterfaceDescriptor; + USBD_GetInterfaceLengthTYPE USBD_GetInterfaceLength; + + InterfaceDescriptor.bLength = 10; + InterfaceDescriptor.bNumEndpoints = 2; + InterfaceDescriptor.bDescriptorType = /*USB_INTERFACE_DESCRIPTOR_TYPE*/2; + InterfaceDescriptor.iInterface = 0x1; + + Lib = LoadLibraryEx("usbd.sys", NULL, DONT_RESOLVE_DLL_REFERENCES); + USBD_GetInterfaceLength = (USBD_GetInterfaceLengthTYPE)GetProcAddress(Lib, "USBD_GetInterfaceLength"); + printf("%X\n", USBD_GetInterfaceLength(&InterfaceDescriptor, (PUCHAR)((DWORD)&InterfaceDescriptor + sizeof(InterfaceDescriptor)))); + FreeLibrary(Lib); + + Lib = LoadLibraryEx("usbd.ms", NULL, DONT_RESOLVE_DLL_REFERENCES); + USBD_GetInterfaceLength = (USBD_GetInterfaceLengthTYPE)GetProcAddress(Lib, "USBD_GetInterfaceLength"); + printf("%X\n", USBD_GetInterfaceLength(&InterfaceDescriptor, (PUCHAR)((DWORD)&InterfaceDescriptor + sizeof(InterfaceDescriptor)))); + FreeLibrary(Lib); + return 0; +} + diff --git a/reactos/drivers/usb/usbd/usbd.c b/reactos/drivers/usb/usbd/usbd.c new file mode 100644 index 00000000000..66ae4a1fb4c --- /dev/null +++ b/reactos/drivers/usb/usbd/usbd.c @@ -0,0 +1,457 @@ +/* + * Universal Serial Bus Driver/Helper Library + * + * Written by Filip Navara + * + * Notes: + * This driver was obsoleted in Windows XP and most functions + * became pure stubs. But some of them were retained for backward + * compatibilty with existing drivers. + * + * Preserved functions: + * + * USBD_Debug_GetHeap (implemented) + * USBD_Debug_RetHeap (implemented) + * USBD_CalculateUsbBandwidth (implemented, tested) + * USBD_CreateConfigurationRequestEx (implemented) + * USBD_CreateConfigurationRequest + * USBD_GetInterfaceLength (implemented) + * USBD_ParseConfigurationDescriptorEx + * USBD_ParseDescriptors + * USBD_GetPdoRegistryParameters (implemented) + */ + +#include +#include +#ifndef PLUGPLAY_REGKEY_DRIVER +#define PLUGPLAY_REGKEY_DRIVER 2 +#endif +typedef struct _USBD_INTERFACE_LIST_ENTRY { + PUSB_INTERFACE_DESCRIPTOR InterfaceDescriptor; + PUSBD_INTERFACE_INFORMATION Interface; +} USBD_INTERFACE_LIST_ENTRY, *PUSBD_INTERFACE_LIST_ENTRY; + +NTSTATUS STDCALL +DriverEntry(PDRIVER_OBJECT DriverObject, + PUNICODE_STRING RegistryPath) +{ + return STATUS_SUCCESS; +} + +/* + * @implemented + */ +DWORD STDCALL +DllInitialize(DWORD Unknown) +{ + return 0; +} + +/* + * @implemented + */ +DWORD STDCALL +DllUnload(VOID) +{ + return 0; +} + +/* + * @implemented + */ +PVOID STDCALL +USBD_Debug_GetHeap(DWORD Unknown1, POOL_TYPE PoolType, ULONG NumberOfBytes, + ULONG Tag) +{ + return ExAllocatePoolWithTag(PoolType, NumberOfBytes, Tag); +} + +/* + * @implemented + */ +VOID STDCALL +USBD_Debug_RetHeap(PVOID Heap, DWORD Unknown2, DWORD Unknown3) +{ + ExFreePool(Heap); +} + +/* + * @implemented + */ +VOID STDCALL +USBD_Debug_LogEntry(PCHAR Name, ULONG_PTR Info1, ULONG_PTR Info2, + ULONG_PTR Info3) +{ +} + +/* + * @implemented + */ +PVOID STDCALL +USBD_AllocateDeviceName(DWORD Unknown) +{ + return NULL; +} + +/* + * @implemented + */ +DWORD STDCALL +USBD_CalculateUsbBandwidth( + ULONG MaxPacketSize, + UCHAR EndpointType, + BOOLEAN LowSpeed + ) +{ + DWORD OverheadTable[] = { + 0x00, /* UsbdPipeTypeControl */ + 0x09, /* UsbdPipeTypeIsochronous */ + 0x00, /* UsbdPipeTypeBulk */ + 0x0d /* UsbdPipeTypeInterrupt */ + }; + DWORD Result; + + if (OverheadTable[EndpointType] != 0) + { + Result = ((MaxPacketSize + OverheadTable[EndpointType]) * 8 * 7) / 6; + if (LowSpeed) + return Result << 3; + return Result; + } + return 0; +} + +/* + * @implemented + */ +DWORD STDCALL +USBD_Dispatch(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4) +{ + return 1; +} + +/* + * @implemented + */ +VOID STDCALL +USBD_FreeDeviceMutex(PVOID Unknown) +{ +} + +/* + * @implemented + */ +VOID STDCALL +USBD_FreeDeviceName(PVOID Unknown) +{ +} + +/* + * @implemented + */ +VOID STDCALL +USBD_WaitDeviceMutex(PVOID Unknown) +{ +} + +/* + * @implemented + */ +DWORD STDCALL +USBD_GetSuspendPowerState(DWORD Unknown1) +{ + return 0; +} + +/* + * @implemented + */ +NTSTATUS STDCALL +USBD_InitializeDevice(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, + DWORD Unknown4, DWORD Unknown5, DWORD Unknown6) +{ + return STATUS_NOT_SUPPORTED; +} + +/* + * @implemented + */ +NTSTATUS STDCALL +USBD_RegisterHostController(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, + DWORD Unknown4, DWORD Unknown5, DWORD Unknown6, DWORD Unknown7, + DWORD Unknown8, DWORD Unknown9, DWORD Unknown10) +{ + return STATUS_NOT_SUPPORTED; +} + +/* + * @implemented + */ +NTSTATUS STDCALL +USBD_GetDeviceInformation(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3) +{ + return STATUS_NOT_SUPPORTED; +} + +/* + * @implemented + */ +NTSTATUS STDCALL +USBD_CreateDevice(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, + DWORD Unknown4, DWORD Unknown5) +{ + return STATUS_NOT_SUPPORTED; +} + +/* + * @implemented + */ +NTSTATUS STDCALL +USBD_RemoveDevice(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3) +{ + return STATUS_NOT_SUPPORTED; +} + +/* + * @implemented + */ +VOID STDCALL +USBD_CompleteRequest(DWORD Unknown1, DWORD Unknown2) +{ +} + +/* + * @implemented + */ +VOID STDCALL +USBD_RegisterHcFilter( + PDEVICE_OBJECT DeviceObject, + PDEVICE_OBJECT FilterDeviceObject + ) +{ +} + +/* + * @implemented + */ +VOID STDCALL +USBD_SetSuspendPowerState(DWORD Unknown1, DWORD Unknown2) +{ +} + +/* + * @implemented + */ +NTSTATUS STDCALL +USBD_MakePdoName(DWORD Unknown1, DWORD Unknown2) +{ + return STATUS_NOT_SUPPORTED; +} + +/* + * @implemented + */ +NTSTATUS STDCALL +USBD_QueryBusTime( + PDEVICE_OBJECT RootHubPdo, + PULONG CurrentFrame + ) +{ + return STATUS_NOT_SUPPORTED; +} + +/* + * @implemented + */ +VOID STDCALL +USBD_GetUSBDIVersion( + PUSBD_VERSION_INFORMATION Version + ) +{ + if (Version != NULL) + { + Version->USBDI_Version = USBDI_VERSION; + Version->Supported_USB_Version = 0x100; + } +} + +/* + * @implemented + */ +NTSTATUS STDCALL +USBD_RestoreDevice(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3) +{ + return STATUS_NOT_SUPPORTED; +} + +/* + * @implemented + */ +VOID STDCALL +USBD_RegisterHcDeviceCapabilities(DWORD Unknown1, DWORD Unknown2, + DWORD Unknown3) +{ +} + +/* + * @implemented + * FIXME: Test + */ +PURB +STDCALL +USBD_CreateConfigurationRequestEx( + PUSB_CONFIGURATION_DESCRIPTOR ConfigurationDescriptor, + PUSBD_INTERFACE_LIST_ENTRY InterfaceList + ) +{ + PURB Urb; + DWORD UrbSize; + DWORD InterfaceCount; + + for (InterfaceCount = 0; + InterfaceList[InterfaceCount].InterfaceDescriptor != NULL; + ++InterfaceCount) + ; + /* Include the NULL entry */ + ++InterfaceCount; + + UrbSize = sizeof(Urb->UrbSelectConfiguration) + + (InterfaceCount * sizeof(PUSBD_INTERFACE_LIST_ENTRY)); + Urb = ExAllocatePool(NonPagedPool, UrbSize); + Urb->UrbSelectConfiguration.Hdr.Function = + URB_FUNCTION_SELECT_CONFIGURATION; + Urb->UrbSelectConfiguration.Hdr.Length = + sizeof(Urb->UrbSelectConfiguration); + Urb->UrbSelectConfiguration.ConfigurationDescriptor = + ConfigurationDescriptor; + memcpy((PVOID)&Urb->UrbSelectConfiguration.Interface, (PVOID)InterfaceList, + InterfaceCount * sizeof(PUSBD_INTERFACE_LIST_ENTRY)); + + return Urb; +} + +/* + * @unimplemented + */ +PURB STDCALL +USBD_CreateConfigurationRequest( + PUSB_CONFIGURATION_DESCRIPTOR ConfigurationDescriptor, + PUSHORT Size + ) +{ + return NULL; +} + +/* + * @unimplemented + */ +ULONG STDCALL +USBD_GetInterfaceLength( + PUSB_INTERFACE_DESCRIPTOR InterfaceDescriptor, + PUCHAR BufferEnd + ) +{ + PUSB_INTERFACE_DESCRIPTOR CurrentDescriptor = InterfaceDescriptor; + DWORD Length = CurrentDescriptor->bLength; + + // USB_ENDPOINT_DESCRIPTOR_TYPE + if (CurrentDescriptor->bDescriptorType == USB_INTERFACE_DESCRIPTOR_TYPE) + { + for (; + (PUCHAR)CurrentDescriptor < BufferEnd; + (PVOID)CurrentDescriptor += CurrentDescriptor->bLength) + Length += CurrentDescriptor->bLength; + + } + return Length; +} + +/* + * @unimplemented + */ +PUSB_INTERFACE_DESCRIPTOR STDCALL +USBD_ParseConfigurationDescriptorEx( + PUSB_CONFIGURATION_DESCRIPTOR ConfigurationDescriptor, + PVOID StartPosition, + LONG InterfaceNumber, + LONG AlternateSetting, + LONG InterfaceClass, + LONG InterfaceSubClass, + LONG InterfaceProtocol + ) +{ + return NULL; +} + +/* + * @implemented + */ +PUSB_INTERFACE_DESCRIPTOR STDCALL +USBD_ParseConfigurationDescriptor( + PUSB_CONFIGURATION_DESCRIPTOR ConfigurationDescriptor, + UCHAR InterfaceNumber, + UCHAR AlternateSetting + ) +{ + return USBD_ParseConfigurationDescriptorEx(ConfigurationDescriptor, + (PVOID)ConfigurationDescriptor, InterfaceNumber, AlternateSetting, + -1, -1, -1); +} + +/* + * @unimplemented + */ +PUSB_COMMON_DESCRIPTOR STDCALL +USBD_ParseDescriptors( + PVOID DescriptorBuffer, + ULONG TotalLength, + PVOID StartPosition, + LONG DescriptorType + ) +{ + return NULL; +} + +/* + * @implemented + */ +DWORD STDCALL +USBD_GetPdoRegistryParameter( + PDEVICE_OBJECT PhysicalDeviceObject, + PVOID Parameter, + ULONG ParameterLength, + PWCHAR KeyName, + ULONG KeyNameLength + ) +{ + NTSTATUS Status; + HANDLE DevInstRegKey; + + Status = IoOpenDeviceRegistryKey(PhysicalDeviceObject, + PLUGPLAY_REGKEY_DRIVER, STANDARD_RIGHTS_ALL, &DevInstRegKey); + if (NT_SUCCESS(Status)) + { + PKEY_VALUE_FULL_INFORMATION FullInfo; + UNICODE_STRING ValueName; + ULONG Length; + + RtlInitUnicodeString(&ValueName, KeyName); + Length = ParameterLength + KeyNameLength + sizeof(KEY_VALUE_FULL_INFORMATION); + FullInfo = ExAllocatePool(PagedPool, Length); + if (FullInfo) + { + Status = ZwQueryValueKey(DevInstRegKey, &ValueName, + KeyValueFullInformation, FullInfo, Length, &Length); + if (NT_SUCCESS(Status)) + { + RtlCopyMemory(Parameter, + ((PUCHAR)FullInfo) + FullInfo->DataOffset, + ParameterLength /*FullInfo->DataLength*/); + } + ExFreePool(FullInfo); + } else + Status = STATUS_NO_MEMORY; + ZwClose(DevInstRegKey); + } + return Status; +} diff --git a/reactos/drivers/usb/usbd/usbd.def b/reactos/drivers/usb/usbd/usbd.def new file mode 100644 index 00000000000..249dca88b66 --- /dev/null +++ b/reactos/drivers/usb/usbd/usbd.def @@ -0,0 +1,13 @@ +; +; Exports definition file for usbd.sys +; +EXPORTS +USBD_Debug_GetHeap@16 +USBD_Debug_RetHeap@12 +USBD_CalculateUsbBandwidth@12 +USBD_CreateConfigurationRequestEx@8 +USBD_CreateConfigurationRequest@8 +USBD_GetInterfaceLength@8 +USBD_ParseConfigurationDescriptorEx@28 +USBD_ParseDescriptors@16 +;USBD_GetPdoRegistryParameters diff --git a/reactos/drivers/usb/usbd/usbd.rc b/reactos/drivers/usb/usbd/usbd.rc new file mode 100644 index 00000000000..ee8239384d8 --- /dev/null +++ b/reactos/drivers/usb/usbd/usbd.rc @@ -0,0 +1,5 @@ +#define REACTOS_VERSION_DLL +#define REACTOS_STR_FILE_DESCRIPTION "USBD Legacy Driver\0" +#define REACTOS_STR_INTERNAL_NAME "usbd\0" +#define REACTOS_STR_ORIGINAL_FILENAME "usbd.sys\0" +#include From 01e24007eabb25df53d3c8adf015809caeffc391 Mon Sep 17 00:00:00 2001 From: Aleksey Bragin Date: Fri, 4 Feb 2005 16:51:11 +0000 Subject: [PATCH 097/185] Include usbd.sys in build of usb drivers svn path=/trunk/; revision=13405 --- reactos/drivers/usb/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/drivers/usb/Makefile b/reactos/drivers/usb/Makefile index 504f8c44f42..d389c4503d3 100644 --- a/reactos/drivers/usb/Makefile +++ b/reactos/drivers/usb/Makefile @@ -6,7 +6,7 @@ PATH_TO_TOP = ../.. include $(PATH_TO_TOP)/rules.mak -DRIVERS = usbport miniport/usbuhci miniport/usbehci miniport/usbohci usbhub +DRIVERS = usbport miniport/usbuhci miniport/usbehci miniport/usbohci usbhub usbd all: $(DRIVERS) From efd11df7ccdda357a1290040d4813a07bc725b0f Mon Sep 17 00:00:00 2001 From: Thomas Bluemel Date: Fri, 4 Feb 2005 20:39:10 +0000 Subject: [PATCH 098/185] Trevor McCort implemented desktop wallpaper changing svn path=/trunk/; revision=13406 --- reactos/include/defines.h | 1 + reactos/lib/cpl/desk/Makefile | 13 +- reactos/lib/cpl/desk/appearance.c | 34 ++ reactos/lib/cpl/desk/background.c | 597 +++++++++++++++++++++++++++++ reactos/lib/cpl/desk/desk.c | 262 +++++-------- reactos/lib/cpl/desk/desk.dsp | 124 ------ reactos/lib/cpl/desk/desk.dsw | 29 -- reactos/lib/cpl/desk/desk.h | 21 +- reactos/lib/cpl/desk/desk.rc | 119 +----- reactos/lib/cpl/desk/dibitmap.c | 92 +++++ reactos/lib/cpl/desk/dibitmap.h | 22 ++ reactos/lib/cpl/desk/en.rc | 59 +++ reactos/lib/cpl/desk/resource.h | 50 +-- reactos/lib/cpl/desk/screensaver.c | 34 ++ reactos/lib/cpl/desk/settings.c | 34 ++ 15 files changed, 1014 insertions(+), 477 deletions(-) create mode 100644 reactos/lib/cpl/desk/appearance.c create mode 100644 reactos/lib/cpl/desk/background.c delete mode 100644 reactos/lib/cpl/desk/desk.dsp delete mode 100644 reactos/lib/cpl/desk/desk.dsw create mode 100644 reactos/lib/cpl/desk/dibitmap.c create mode 100644 reactos/lib/cpl/desk/dibitmap.h create mode 100644 reactos/lib/cpl/desk/en.rc create mode 100644 reactos/lib/cpl/desk/screensaver.c create mode 100644 reactos/lib/cpl/desk/settings.c diff --git a/reactos/include/defines.h b/reactos/include/defines.h index 961a9ce3463..7a9868022d5 100644 --- a/reactos/include/defines.h +++ b/reactos/include/defines.h @@ -771,6 +771,7 @@ extern "C" { #define DS_SETFONT (0x40L) #define DS_SETFOREGROUND (0x200L) #define DS_SYSMODAL (0x2L) +#define DS_SHELLFONT (DS_SETFONT | DS_FIXEDSYS) /* CreateWindowEx */ #define WS_EX_ACCEPTFILES (0x10L) diff --git a/reactos/lib/cpl/desk/Makefile b/reactos/lib/cpl/desk/Makefile index ae5df7f5ea7..6ee30dc9069 100644 --- a/reactos/lib/cpl/desk/Makefile +++ b/reactos/lib/cpl/desk/Makefile @@ -13,20 +13,20 @@ TARGET_INSTALLDIR = system32 TARGET_BASE = $(TARGET_BASE_LIB_CPL_DESK) TARGET_CFLAGS = \ - -I./include \ + -I./include \ -D_WIN32_IE=0x0600 \ -D_WIN32_WINNT=0x0501 \ -D__USE_W32API \ -DUNICODE \ -D_UNICODE \ - -D__REACTOS__ \ + -D__USE_W32API \ -Wall \ -Werror \ -fno-builtin TARGET_LFLAGS = -nostartfiles -TARGET_SDKLIBS = kernel32.a user32.a comctl32.a +TARGET_SDKLIBS = kernel32.a user32.a comctl32.a comdlg32.a advapi32.a gdi32.a TARGET_GCCLIBS = gcc @@ -34,7 +34,12 @@ TARGET_PCH = TARGET_CLEAN = -TARGET_OBJECTS = desk.o +TARGET_OBJECTS = desk.o \ + background.o \ + screensaver.o \ + appearance.o \ + settings.o \ + dibitmap.o DEP_OBJECTS = $(TARGET_OBJECTS) diff --git a/reactos/lib/cpl/desk/appearance.c b/reactos/lib/cpl/desk/appearance.c new file mode 100644 index 00000000000..ca0d7613413 --- /dev/null +++ b/reactos/lib/cpl/desk/appearance.c @@ -0,0 +1,34 @@ +/* $Id$ + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS Display Control Panel + * FILE: lib/cpl/desk/appearance.c + * PURPOSE: Appearance property page + * + * PROGRAMMERS: Trevor McCort (lycan359@gmail.com) + */ + +#include +#include + +#include "resource.h" + +INT_PTR CALLBACK AppearancePageProc(HWND hwndDlg, + UINT uMsg, + WPARAM wParam, + LPARAM lParam) +{ + switch(uMsg) + { + case WM_INITDIALOG: + { + } break; + + case WM_COMMAND: + { + } break; + } + + return FALSE; +} + diff --git a/reactos/lib/cpl/desk/background.c b/reactos/lib/cpl/desk/background.c new file mode 100644 index 00000000000..bc4e3d602e7 --- /dev/null +++ b/reactos/lib/cpl/desk/background.c @@ -0,0 +1,597 @@ +/* $Id$ + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS Display Control Panel + * FILE: lib/cpl/desk/background.c + * PURPOSE: Background property page + * + * PROGRAMMERS: Trevor McCort (lycan359@gmail.com) + */ + +#include +#include +#include +#include +#include + +#include "resource.h" + +#include "desk.h" +#include "dibitmap.h" + +#define MAX_WALLPAPERS 100 + +#define PLACEMENT_CENTER 0 +#define PLACEMENT_STRETCH 1 +#define PLACEMENT_TILE 2 + +DIBitmap *g_pWallpaperBitmap = NULL; + +int g_placementSelection = 0; +int g_wallpaperSelection = -1; + +int g_wallpaperCount = 0; +int g_listViewItemCount = 0; + +int g_currentWallpaperItemId = 0; + +HWND g_hBackgroundTab = NULL; + +HWND g_hWallpaperList = NULL; +HWND g_hWallpaperPreview = NULL; +HIMAGELIST g_hShellImageList = NULL; + +HWND g_hPlacementCombo = NULL; + +TCHAR g_wallpapers[MAX_WALLPAPERS][MAX_PATH]; + +/* Add the bitmaps in the C:\ReactOS directory and the current wallpaper if any */ +void AddListViewItems() +{ + WIN32_FIND_DATA fd; + HANDLE hFind; + TCHAR szBuffer[256]; + TCHAR szSearchPath[MAX_PATH]; + LV_ITEM listItem; + LV_COLUMN dummy; + RECT clientRect; + HKEY regKey; + SHFILEINFO sfi; + HIMAGELIST himl; + TCHAR wallpaperFilename[MAX_PATH]; + DWORD bufferSize = sizeof(wallpaperFilename); + DWORD varType = REG_SZ; + LONG result; + UINT i = 0; + + GetClientRect(g_hWallpaperList, &clientRect); + + ZeroMemory(&dummy, sizeof(LV_COLUMN)); + dummy.mask = LVCF_SUBITEM | LVCF_WIDTH; + dummy.iSubItem = 0; + dummy.cx = (clientRect.right - clientRect.left) - GetSystemMetrics(SM_CXVSCROLL); + + ListView_InsertColumn(g_hWallpaperList, 0, &dummy); + + /* Add the "None" item */ + + LoadString(hApplet, IDS_NONE, szBuffer, sizeof(szBuffer) / sizeof(TCHAR)); + + ZeroMemory(&listItem, sizeof(LV_ITEM)); + listItem.mask = LVIF_TEXT | LVIF_PARAM | LVIF_STATE | LVIF_IMAGE; + listItem.pszText = szBuffer; + listItem.iItem = g_listViewItemCount; + listItem.iImage = -1; + listItem.state = LVIS_SELECTED; + listItem.lParam = -1; + + ListView_InsertItem(g_hWallpaperList, &listItem); + ListView_SetItemState(g_hWallpaperList, g_listViewItemCount, LVIS_SELECTED, LVIS_SELECTED); + + g_listViewItemCount++; + + /* Add current wallpaper if any */ + + RegOpenKeyEx(HKEY_CURRENT_USER, TEXT("Control Panel\\Desktop"), 0, KEY_ALL_ACCESS, ®Key); + + result = RegQueryValueEx(regKey, TEXT("Wallpaper"), 0, &varType, (LPBYTE)wallpaperFilename, &bufferSize); + + if((result == ERROR_SUCCESS) && (_tcslen(wallpaperFilename) > 0)) + { + himl = (HIMAGELIST)SHGetFileInfo(wallpaperFilename, + 0, + &sfi, + sizeof(sfi), + SHGFI_SYSICONINDEX | SHGFI_SMALLICON | + SHGFI_DISPLAYNAME); + + if(himl != NULL) + { + if(i++ == 0) + { + g_hShellImageList = himl; + ListView_SetImageList(g_hWallpaperList, himl, LVSIL_SMALL); + } + + ZeroMemory(&listItem, sizeof(LV_ITEM)); + listItem.mask = LVIF_TEXT | LVIF_PARAM | LVIF_STATE | LVIF_IMAGE; + listItem.pszText = sfi.szDisplayName; + listItem.state = LVIS_SELECTED; + listItem.iItem = g_listViewItemCount; + listItem.iImage = sfi.iIcon; + listItem.lParam = g_wallpaperCount; + + ListView_InsertItem(g_hWallpaperList, &listItem); + _tcscpy(g_wallpapers[g_wallpaperCount], wallpaperFilename); + + ListView_SetItemState(g_hWallpaperList, g_listViewItemCount, LVIS_SELECTED, LVIS_SELECTED); + + g_currentWallpaperItemId = g_listViewItemCount; + + g_listViewItemCount++; + g_wallpaperCount++; + } + } + + RegCloseKey(regKey); + + /* Add all the bitmaps in the C:\ReactOS directory. */ + + GetWindowsDirectory(szSearchPath, MAX_PATH); + _tcscat(szSearchPath, TEXT("\\*.bmp")); + + hFind = FindFirstFile(szSearchPath, &fd); + while(hFind != INVALID_HANDLE_VALUE) + { + /* Don't add any hidden bitmaps */ + if((fd.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN) == 0) + { + TCHAR filename[MAX_PATH]; + + GetWindowsDirectory(filename, MAX_PATH); + + _tcscat(filename, TEXT("\\")); + _tcscat(filename, fd.cFileName); + + himl = (HIMAGELIST)SHGetFileInfo(filename, + 0, + &sfi, + sizeof(sfi), + SHGFI_SYSICONINDEX | SHGFI_SMALLICON | + SHGFI_DISPLAYNAME); + + if(himl == NULL) + { + break; + } + + if(i++ == 0) + { + g_hShellImageList = himl; + ListView_SetImageList(g_hWallpaperList, himl, LVSIL_SMALL); + } + + ZeroMemory(&listItem, sizeof(LV_ITEM)); + listItem.mask = LVIF_TEXT | LVIF_PARAM | LVIF_STATE | LVIF_IMAGE; + listItem.pszText = sfi.szDisplayName; + listItem.state = 0; + listItem.iItem = g_listViewItemCount++; + listItem.iImage = sfi.iIcon; + listItem.lParam = g_wallpaperCount; + + ListView_InsertItem(g_hWallpaperList, &listItem); + + _tcscpy(g_wallpapers[g_wallpaperCount], filename); + + g_wallpaperCount++; + } + + if(!FindNextFile(hFind, &fd)) + hFind = INVALID_HANDLE_VALUE; + } +} + +void InitBackgroundDialog() +{ + g_hWallpaperList = GetDlgItem(g_hBackgroundTab, IDC_WALLPAPER_LIST); + g_hWallpaperPreview = GetDlgItem(g_hBackgroundTab, IDC_WALLPAPER_PREVIEW); + g_hPlacementCombo = GetDlgItem(g_hBackgroundTab, IDC_PLACEMENT_COMBO); + + AddListViewItems(); + + TCHAR szString[256]; + + LoadString(hApplet, IDS_CENTER, szString, sizeof(szString) / sizeof(TCHAR)); + SendMessage(g_hPlacementCombo, CB_INSERTSTRING, PLACEMENT_CENTER, (LPARAM)szString); + + LoadString(hApplet, IDS_STRETCH, szString, sizeof(szString) / sizeof(TCHAR)); + SendMessage(g_hPlacementCombo, CB_INSERTSTRING, PLACEMENT_STRETCH, (LPARAM)szString); + + LoadString(hApplet, IDS_TILE, szString, sizeof(szString) / sizeof(TCHAR)); + SendMessage(g_hPlacementCombo, CB_INSERTSTRING, PLACEMENT_TILE, (LPARAM)szString); + + /* Load the default settings from the registry */ + HKEY regKey; + + TCHAR szBuffer[2]; + DWORD bufferSize = sizeof(szBuffer); + DWORD varType = REG_SZ; + LONG result; + + RegOpenKeyEx(HKEY_CURRENT_USER, TEXT("Control Panel\\Desktop"), 0, KEY_ALL_ACCESS, ®Key); + + result = RegQueryValueEx(regKey, TEXT("WallpaperStyle"), 0, &varType, (LPBYTE)szBuffer, &bufferSize); + + if(result == ERROR_SUCCESS) + { + if(_ttoi(szBuffer) == 0) + { + SendMessage(g_hPlacementCombo, CB_SETCURSEL, PLACEMENT_CENTER, 0); + g_placementSelection = PLACEMENT_CENTER; + } + + if(_ttoi(szBuffer) == 2) + { + SendMessage(g_hPlacementCombo, CB_SETCURSEL, PLACEMENT_STRETCH, 0); + g_placementSelection = PLACEMENT_STRETCH; + } + } + else + { + SendMessage(g_hPlacementCombo, CB_SETCURSEL, PLACEMENT_CENTER, 0); + g_placementSelection = PLACEMENT_CENTER; + } + + result = RegQueryValueEx(regKey, TEXT("TileWallpaper"), 0, &varType, (LPBYTE)szBuffer, &bufferSize); + + if(result == ERROR_SUCCESS) + { + if(_ttoi(szBuffer) == 1) + { + SendMessage(g_hPlacementCombo, CB_SETCURSEL, PLACEMENT_TILE, 0); + g_placementSelection = PLACEMENT_TILE; + } + } + + RegCloseKey(regKey); +} + +void OnPatternButton() +{ + MessageBox(NULL, TEXT("That button doesn't do anything yet"), TEXT("Whoops"), MB_OK); +} + +BOOL CheckListBoxFilename(HWND list, TCHAR *filename) +{ + return FALSE; +} + +void OnBrowseButton() +{ + OPENFILENAME ofn; + TCHAR filename[MAX_PATH]; + TCHAR fileTitle[256]; + + ZeroMemory(&ofn, sizeof(OPENFILENAME)); + + ofn.lStructSize = sizeof(OPENFILENAME); + ofn.hwndOwner = g_hBackgroundTab; + ofn.lpstrFile = filename; + + /* Set lpstrFile[0] to '\0' so that GetOpenFileName does not + * use the contents of szFile to initialize itself */ + ofn.lpstrFile[0] = TEXT('\0'); + ofn.nMaxFile = MAX_PATH; + ofn.lpstrFilter = TEXT("Bitmap Files (*.bmp)\0*.bmp\0"); + ofn.nFilterIndex = 0; + ofn.lpstrFileTitle = fileTitle; + ofn.nMaxFileTitle = 256; + ofn.lpstrInitialDir = NULL; + ofn.Flags = OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST; + + if(GetOpenFileName(&ofn) == TRUE) + { + /* Check if there is already a entry that holds this filename */ + if(CheckListBoxFilename(g_hWallpaperList, filename) == FALSE) + { + SHFILEINFO sfi; + LV_ITEM listItem; + + if(g_wallpaperCount > (MAX_WALLPAPERS - 1)) + return; + + _tcscpy(g_wallpapers[g_wallpaperCount], filename); + + SHGetFileInfo(filename, + 0, + &sfi, + sizeof(sfi), + SHGFI_SYSICONINDEX | SHGFI_SMALLICON | SHGFI_DISPLAYNAME); + + ZeroMemory(&listItem, sizeof(LV_ITEM)); + listItem.mask = LVIF_TEXT | LVIF_PARAM | LVIF_STATE | LVIF_IMAGE; + listItem.pszText = sfi.szDisplayName; + listItem.state = 0; + listItem.iItem = g_listViewItemCount++; + listItem.iImage = sfi.iIcon; + listItem.lParam = g_wallpaperCount; + + ListView_InsertItem(g_hWallpaperList, &listItem); + + g_wallpaperCount++; + } + } +} + +void ListViewItemChanged(int itemIndex) +{ + if(g_pWallpaperBitmap != NULL) + { + DibFreeImage(g_pWallpaperBitmap); + g_pWallpaperBitmap = NULL; + } + + LV_ITEM listItem; + + listItem.iItem = itemIndex; + listItem.mask = LVIF_PARAM; + ListView_GetItem(g_hWallpaperList, &listItem); + + if(listItem.lParam == -1) + { + g_wallpaperSelection = -1; + InvalidateRect(g_hWallpaperPreview, NULL, TRUE); + } + else + { + g_wallpaperSelection = listItem.lParam; + + g_pWallpaperBitmap = DibLoadImage(g_wallpapers[g_wallpaperSelection]); + + if(g_pWallpaperBitmap == NULL) + { + } + + InvalidateRect(g_hWallpaperPreview, NULL, TRUE); + } + + EnableWindow(g_hPlacementCombo, (listItem.lParam != -1 ? TRUE : FALSE)); + + PropSheet_Changed(GetParent(g_hBackgroundTab), g_hBackgroundTab); +} + +void DrawWallpaperPreview(LPDRAWITEMSTRUCT draw) +{ + if(g_wallpaperSelection == -1) + { + FillRect(draw->hDC, &draw->rcItem, GetSysColorBrush(COLOR_BACKGROUND)); + return; + } + + if(g_pWallpaperBitmap == NULL) + return; + + float scaleX = ((float)GetSystemMetrics(SM_CXSCREEN) - 1) / (float)draw->rcItem.right; + float scaleY = ((float)GetSystemMetrics(SM_CYSCREEN) - 1) / (float)draw->rcItem.bottom; + + int scaledWidth = g_pWallpaperBitmap->width / scaleX; + int scaledHeight = g_pWallpaperBitmap->height / scaleY; + + int posX = (draw->rcItem.right / 2) - (scaledWidth / 2); + int posY = (draw->rcItem.bottom / 2) - (scaledHeight / 2); + + FillRect(draw->hDC, &draw->rcItem, GetSysColorBrush(COLOR_BACKGROUND)); + + SetStretchBltMode(draw->hDC, COLORONCOLOR); + + if(g_placementSelection == PLACEMENT_CENTER) + { + StretchDIBits(draw->hDC, + posX, + posY, + scaledWidth, + scaledHeight, + 0, + 0, + g_pWallpaperBitmap->width, + g_pWallpaperBitmap->height, + g_pWallpaperBitmap->bits, + g_pWallpaperBitmap->info, + DIB_RGB_COLORS, + SRCCOPY); + } + + if(g_placementSelection == PLACEMENT_STRETCH) + { + StretchDIBits(draw->hDC, + 0, + 0, + draw->rcItem.right, + draw->rcItem.bottom, + 0, + 0, + g_pWallpaperBitmap->width, + g_pWallpaperBitmap->height, + g_pWallpaperBitmap->bits, + g_pWallpaperBitmap->info, + DIB_RGB_COLORS, + SRCCOPY); + } + + if(g_placementSelection == PLACEMENT_TILE) + { + int x; + int y; + + for(y = 0; y < draw->rcItem.bottom; y += scaledHeight) + { + for(x = 0; x < draw->rcItem.right; x += scaledWidth) + { + StretchDIBits(draw->hDC, + x, + y, + scaledWidth, + scaledHeight, + 0, + 0, + g_pWallpaperBitmap->width, + g_pWallpaperBitmap->height, + g_pWallpaperBitmap->bits, + g_pWallpaperBitmap->info, + DIB_RGB_COLORS, + SRCCOPY); + } + } + } +} + +void SetWallpaper() +{ + HKEY regKey; + + RegOpenKeyEx(HKEY_CURRENT_USER, TEXT("Control Panel\\Desktop"), 0, KEY_ALL_ACCESS, ®Key); + + if(g_placementSelection == PLACEMENT_TILE) + { + RegSetValueEx(regKey, TEXT("TileWallpaper"), 0, REG_SZ, (BYTE *)TEXT("1"), sizeof(TCHAR) * 2); + RegSetValueEx(regKey, TEXT("WallpaperStyle"), 0, REG_SZ, (BYTE *)TEXT("0"), sizeof(TCHAR) * 2); + } + + if(g_placementSelection == PLACEMENT_CENTER) + { + RegSetValueEx(regKey, TEXT("TileWallpaper"), 0, REG_SZ, (BYTE *)TEXT("0"), sizeof(TCHAR) * 2); + RegSetValueEx(regKey, TEXT("WallpaperStyle"), 0, REG_SZ, (BYTE *)TEXT("0"), sizeof(TCHAR) * 2); + } + + if(g_placementSelection == PLACEMENT_STRETCH) + { + RegSetValueEx(regKey, TEXT("TileWallpaper"), 0, REG_SZ, (BYTE *)TEXT("0"), sizeof(TCHAR) * 2); + RegSetValueEx(regKey, TEXT("WallpaperStyle"), 0, REG_SZ, (BYTE *)TEXT("2"), sizeof(TCHAR) * 2); + } + + RegCloseKey(regKey); + + if(g_wallpaperSelection == -1) + { + SystemParametersInfo(SPI_SETDESKWALLPAPER, 0, TEXT(""), SPIF_UPDATEINIFILE); + } + else + { + SystemParametersInfo(SPI_SETDESKWALLPAPER, + 0, + g_wallpapers[g_wallpaperSelection], + SPIF_UPDATEINIFILE); + } +} + +INT_PTR CALLBACK BackgroundPageProc(HWND hwndDlg, + UINT uMsg, + WPARAM wParam, + LPARAM lParam) +{ + g_hBackgroundTab = hwndDlg; + + switch(uMsg) + { + case WM_INITDIALOG: + { + InitBackgroundDialog(); + } break; + + case WM_COMMAND: + { + DWORD controlId = LOWORD(wParam); + DWORD command = HIWORD(wParam); + + switch(controlId) + { + case IDC_PATTERN: + { + if(command == BN_CLICKED) + OnPatternButton(); + } break; + + case IDC_BROWSE: + { + if(command == BN_CLICKED) + OnBrowseButton(); + } break; + + case IDC_PLACEMENT_COMBO: + { + if(command == CBN_SELCHANGE) + { + g_placementSelection = SendMessage(g_hPlacementCombo, CB_GETCURSEL, 0, 0); + + InvalidateRect(g_hWallpaperPreview, NULL, TRUE); + + PropSheet_Changed(GetParent(g_hBackgroundTab), g_hBackgroundTab); + } + + } break; + } + } break; + + case WM_DRAWITEM: + { + LPDRAWITEMSTRUCT drawItem; + drawItem = (LPDRAWITEMSTRUCT)lParam; + + if(drawItem->CtlID == IDC_WALLPAPER_PREVIEW) + { + DrawWallpaperPreview(drawItem); + } + + } break; + + case WM_NOTIFY: + { + LPNMHDR lpnm = (LPNMHDR)lParam; + + switch(lpnm->code) + { + case PSN_APPLY: + { + SetWallpaper(); + + /* Update the current wallapaper list item to the + * currently selected wallpaper */ + LV_ITEM listItem; + listItem.mask = LVIF_PARAM; + listItem.iSubItem = 0; + listItem.iItem = g_currentWallpaperItemId; + listItem.lParam = g_wallpaperSelection; + + ListView_SetItem(g_hWallpaperList, &listItem); + + return TRUE; + } break; + + case LVN_ITEMCHANGED: + { + LPNMLISTVIEW nm = (LPNMLISTVIEW)lParam; + + if((nm->uNewState & LVIS_SELECTED) == 0) + return FALSE; + + ListViewItemChanged(nm->iItem); + + } break; + + default: + break; + } + + } break; + + case WM_DESTROY: + { + if(g_pWallpaperBitmap != NULL) + DibFreeImage(g_pWallpaperBitmap); + + } break; + } + + return FALSE; +} + diff --git a/reactos/lib/cpl/desk/desk.c b/reactos/lib/cpl/desk/desk.c index 1c45c41e09e..d64825ce450 100644 --- a/reactos/lib/cpl/desk/desk.c +++ b/reactos/lib/cpl/desk/desk.c @@ -1,214 +1,128 @@ -/* - * ReactOS - * Copyright (C) 2004 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ /* $Id$ * + * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS Display Control Panel * FILE: lib/cpl/desk/desk.c * PURPOSE: ReactOS Display Control Panel - * PROGRAMMER: Gero Kuehn (reactos.filter@gkware.com) - * UPDATE HISTORY: - * 06-17-2004 Created - * 08-07-2004 Initial Checkin + * + * PROGRAMMERS: Trevor McCort (lycan359@gmail.com) */ -#include -#include -#include -#include #include - #include #include -#include - #include "resource.h" #include "desk.h" #define NUM_APPLETS (1) -LONG CALLBACK DisplayApplet(VOID); -INT_PTR CALLBACK BackgroundPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); -INT_PTR CALLBACK ScreenSaverPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); -INT_PTR CALLBACK AppearancePageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); -INT_PTR CALLBACK SettingsPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); +LONG APIENTRY DisplayApplet(HWND hwnd, UINT uMsg, LONG wParam, LONG lParam); +extern INT_PTR CALLBACK BackgroundPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); +extern INT_PTR CALLBACK ScreenSaverPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); +extern INT_PTR CALLBACK AppearancePageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); +extern INT_PTR CALLBACK SettingsPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); HINSTANCE hApplet = 0; /* Applets */ APPLET Applets[NUM_APPLETS] = { - {IDI_CPLSYSTEM, IDS_CPLSYSTEMNAME, IDS_CPLSYSTEMDESCRIPTION, DisplayApplet} + { + IDC_DESK_ICON, + IDS_CPLNAME, + IDS_CPLDESCRIPTION, + DisplayApplet + } }; - - -/* Property page dialog callback */ -INT_PTR CALLBACK -BackgroundPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) +static VOID InitPropSheetPage(PROPSHEETPAGE *psp, WORD idDlg, DLGPROC DlgProc) { - switch(uMsg) - { - case WM_INITDIALOG: - break; - case WM_COMMAND: - break; - } - return FALSE; + ZeroMemory(psp, sizeof(PROPSHEETPAGE)); + psp->dwSize = sizeof(PROPSHEETPAGE); + psp->dwFlags = PSP_DEFAULT; + psp->hInstance = hApplet; + psp->pszTemplate = MAKEINTRESOURCE(idDlg); + psp->pfnDlgProc = DlgProc; } - -/* Property page dialog callback */ -INT_PTR CALLBACK -ScreenSaverPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) +/* Display Applet */ +LONG APIENTRY DisplayApplet(HWND hwnd, UINT uMsg, LONG wParam, LONG lParam) { - switch(uMsg) - { - case WM_INITDIALOG: - break; - case WM_COMMAND: - break; - } - return FALSE; -} - - -/* Property page dialog callback */ -INT_PTR CALLBACK -AppearancePageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) -{ - switch(uMsg) - { - case WM_INITDIALOG: - break; - case WM_COMMAND: - break; - } - return FALSE; -} - - -/* Property page dialog callback */ -INT_PTR CALLBACK -SettingsPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) -{ - switch(uMsg) - { - case WM_INITDIALOG: - break; - case WM_COMMAND: - break; - } - return FALSE; -} - - -static VOID -InitPropSheetPage(PROPSHEETPAGE *psp, WORD idDlg, DLGPROC DlgProc) -{ - ZeroMemory(psp, sizeof(PROPSHEETPAGE)); - psp->dwSize = sizeof(PROPSHEETPAGE); - psp->dwFlags = PSP_DEFAULT; - psp->hInstance = hApplet; - psp->pszTemplate = MAKEINTRESOURCE(idDlg); - psp->pfnDlgProc = DlgProc; -} - - -/* First Applet */ - -LONG CALLBACK -DisplayApplet(VOID) -{ - PROPSHEETPAGE psp[4]; - PROPSHEETHEADER psh; - TCHAR Caption[1024]; - - LoadString(hApplet, IDS_CPLSYSTEMNAME, Caption, sizeof(Caption) / sizeof(TCHAR)); - - ZeroMemory(&psh, sizeof(PROPSHEETHEADER)); - psh.dwSize = sizeof(PROPSHEETHEADER); - psh.dwFlags = PSH_PROPSHEETPAGE | PSH_PROPTITLE; - psh.hwndParent = NULL; - psh.hInstance = hApplet; - psh.hIcon = LoadIcon(hApplet, MAKEINTRESOURCE(IDI_CPLSYSTEM)); - psh.pszCaption = Caption; - psh.nPages = sizeof(psp) / sizeof(PROPSHEETPAGE); - psh.nStartPage = 0; - psh.ppsp = psp; - psh.pfnCallback = NULL; - - InitPropSheetPage(&psp[0], IDD_PROPPAGEBACKGROUND, BackgroundPageProc); - InitPropSheetPage(&psp[1], IDD_PROPPAGESCREENSAVER, ScreenSaverPageProc); - InitPropSheetPage(&psp[2], IDD_PROPPAGEAPPEARANCE, AppearancePageProc); - InitPropSheetPage(&psp[3], IDD_PROPPAGESETTINGS, SettingsPageProc); - - return (LONG)(PropertySheet(&psh) != -1); + PROPSHEETPAGE psp[4]; + PROPSHEETHEADER psh; + TCHAR Caption[1024]; + + LoadString(hApplet, IDS_CPLNAME, Caption, sizeof(Caption) / sizeof(TCHAR)); + + ZeroMemory(&psh, sizeof(PROPSHEETHEADER)); + psh.dwSize = sizeof(PROPSHEETHEADER); + psh.dwFlags = PSH_PROPSHEETPAGE | PSH_USECALLBACK | PSH_PROPTITLE; + psh.hwndParent = NULL; + psh.hInstance = hApplet; + psh.hIcon = LoadIcon(hApplet, MAKEINTRESOURCE(IDC_DESK_ICON)); + psh.pszCaption = Caption; + psh.nPages = sizeof(psp) / sizeof(PROPSHEETPAGE); + psh.nStartPage = 0; + psh.ppsp = psp; + + InitPropSheetPage(&psp[0], IDD_BACKGROUND, BackgroundPageProc); + InitPropSheetPage(&psp[1], IDD_SCREENSAVER, ScreenSaverPageProc); + InitPropSheetPage(&psp[2], IDD_APPEARANCE, AppearancePageProc); + InitPropSheetPage(&psp[3], IDD_SETTINGS, SettingsPageProc); + + return (LONG)(PropertySheet(&psh) != -1); } /* Control Panel Callback */ -LONG CALLBACK -CPlApplet(HWND hwndCPl, UINT uMsg, LPARAM lParam1, LPARAM lParam2) +LONG CALLBACK CPlApplet(HWND hwndCPl, UINT uMsg, LPARAM lParam1, LPARAM lParam2) { - int i = (int)lParam1; - - switch(uMsg) - { - case CPL_INIT: - { - return TRUE; - } - case CPL_GETCOUNT: - { - return NUM_APPLETS; - } - case CPL_INQUIRE: - { - CPLINFO *CPlInfo = (CPLINFO*)lParam2; - CPlInfo->lData = 0; - CPlInfo->idIcon = Applets[i].idIcon; - CPlInfo->idName = Applets[i].idName; - CPlInfo->idInfo = Applets[i].idDescription; - break; - } - case CPL_DBLCLK: - { - Applets[i].AppletProc(); - break; - } - } - return FALSE; + int i = (int)lParam1; + + switch(uMsg) + { + case CPL_INIT: + { + return TRUE; + } + + case CPL_GETCOUNT: + { + return NUM_APPLETS; + } + + case CPL_INQUIRE: + { + CPLINFO *CPlInfo = (CPLINFO*)lParam2; + CPlInfo->lData = 0; + CPlInfo->idIcon = Applets[i].idIcon; + CPlInfo->idName = Applets[i].idName; + CPlInfo->idInfo = Applets[i].idDescription; + } break; + + case CPL_DBLCLK: + { + Applets[i].AppletProc(hwndCPl, uMsg, lParam1, lParam2); + } break; + } + + return FALSE; } -BOOL WINAPI -DllMain(HINSTANCE hinstDLL, DWORD dwReason, LPVOID lpvReserved) +BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD dwReason, LPVOID lpvReserved) { - switch(dwReason) - { - case DLL_PROCESS_ATTACH: - case DLL_THREAD_ATTACH: - hApplet = hinstDLL; - break; - } - return TRUE; + switch(dwReason) + { + case DLL_PROCESS_ATTACH: + case DLL_THREAD_ATTACH: + { + hApplet = hinstDLL; + } break; + } + + return TRUE; } diff --git a/reactos/lib/cpl/desk/desk.dsp b/reactos/lib/cpl/desk/desk.dsp deleted file mode 100644 index ff57b0a2ce9..00000000000 --- a/reactos/lib/cpl/desk/desk.dsp +++ /dev/null @@ -1,124 +0,0 @@ -# Microsoft Developer Studio Project File - Name="desk" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 - -CFG=desk - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "desk.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "desk.mak" CFG="desk - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "desk - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "desk - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -MTL=midl.exe -RSC=rc.exe - -!IF "$(CFG)" == "desk - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 1 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "desk_EXPORTS" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /D "desk_EXPORTS" /D "_UNICODE" /D "UNICODE" /YX /FD /c -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x407 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" /d "_MSC_VER" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib /nologo /dll /machine:I386 /out:"Release/desk.cpl" - -!ELSEIF "$(CFG)" == "desk - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 1 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "desk_EXPORTS" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /D "desk_EXPORTS" /D "_UNICODE" /D "UNICODE" /YX /FD /GZ /c -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x407 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" /d "_MSC_VER" -# SUBTRACT RSC /x -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib /nologo /dll /debug /machine:I386 /out:"Debug/desk.cpl" /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "desk - Win32 Release" -# Name "desk - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\desk.c -# End Source File -# Begin Source File - -SOURCE=.\desk.h -# End Source File -# Begin Source File - -SOURCE=.\resource.h -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=.\desk.def -# End Source File -# Begin Source File - -SOURCE=.\desk.rc -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/reactos/lib/cpl/desk/desk.dsw b/reactos/lib/cpl/desk/desk.dsw deleted file mode 100644 index 6370057e41c..00000000000 --- a/reactos/lib/cpl/desk/desk.dsw +++ /dev/null @@ -1,29 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "desk"=.\desk.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/reactos/lib/cpl/desk/desk.h b/reactos/lib/cpl/desk/desk.h index c4bb7b71243..eb600d83f9b 100644 --- a/reactos/lib/cpl/desk/desk.h +++ b/reactos/lib/cpl/desk/desk.h @@ -1,20 +1,17 @@ -#ifndef __CPL_APPWIZ_H -#define __CPL_APPWIZ_H - -typedef LONG (CALLBACK *CPLAPPLET_PROC)(VOID); +#ifndef __CPL_DESK_H__ +#define __CPL_DESK_H__ typedef struct { - int idIcon; - int idName; - int idDescription; - CPLAPPLET_PROC AppletProc; + int idIcon; + int idName; + int idDescription; + + APPLET_PROC AppletProc; + } APPLET, *PAPPLET; extern HINSTANCE hApplet; -void ShowLastWin32Error(HWND hWndOwner); +#endif /* __CPL_DESK_H__ */ -#endif /* __CPL_APPWIZ_H */ - -/* EOF */ diff --git a/reactos/lib/cpl/desk/desk.rc b/reactos/lib/cpl/desk/desk.rc index 532fd994b6f..426e4a01382 100644 --- a/reactos/lib/cpl/desk/desk.rc +++ b/reactos/lib/cpl/desk/desk.rc @@ -1,119 +1,16 @@ +#include #include "resource.h" -#ifdef _MSC_VER -#include <../../../include/defines.h> -#else -#include -#endif +LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL #define REACTOS_VERSION_DLL -#define REACTOS_STR_FILE_DESCRIPTION "ReactOS Display Panel\0" -#define REACTOS_STR_INTERNAL_NAME "desk\0" -#define REACTOS_STR_ORIGINAL_FILENAME "desk.cpl\0" -#ifdef _MSC_VER -#include <../../../include/reactos/version.rc> -#else +#define REACTOS_STR_FILE_DESCRIPTION "ReactOS Display Panel\0" +#define REACTOS_STR_INTERNAL_NAME "desk\0" +#define REACTOS_STR_ORIGINAL_FILENAME "desk.cpl\0" + #include -#endif -IDD_PROPPAGEBACKGROUND DIALOGEX 0, 0, 246, 228 -STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "Background" -FONT 8, "MS Shell Dlg", 0, 0, 0x0 -BEGIN - GROUPBOX "&Pattern",1001,5,118,115,92 - LISTBOX 1002,11,130,103,42,LBS_SORT | LBS_NOINTEGRALHEIGHT | - WS_VSCROLL | WS_TABSTOP - PUSHBUTTON "&Edit Pattern...",1003,53,175,61,14 - GROUPBOX "&Wallpaper",1004,127,118,115,92 - LISTBOX 1005,133,130,103,42,LBS_SORT | LBS_NOINTEGRALHEIGHT | - WS_VSCROLL | WS_TABSTOP - PUSHBUTTON "&Browse...",1006,174,175,61,14 - LTEXT "&Position:",1007,134,196,28,8 - COMBOBOX 1008,169,193,67,30,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | - WS_TABSTOP -END +IDC_DESK_ICON ICON "resources/applet.ico" -IDD_PROPPAGESCREENSAVER DIALOGEX 0, 0, 246, 228 -STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "Screen Saver" -FONT 8, "MS Shell Dlg", 0, 0, 0x0 -BEGIN - GROUPBOX "&Screen Saver",200,4,129,238,48 - COMBOBOX 1000,10,140,115,200,CBS_DROPDOWNLIST | CBS_SORT | - WS_VSCROLL | WS_GROUP | WS_TABSTOP - PUSHBUTTON "Se&ttings...",1003,130,139,50,14,WS_GROUP - PUSHBUTTON "Pre&view",1004,183,139,50,14 - CONTROL "&Lock desktop on resume",1020,"Button",BS_AUTOCHECKBOX | - WS_TABSTOP,13,157,112,9 - LTEXT "&Wait:",1016,151,160,17,9 - EDITTEXT 1006,170,158,30,12,ES_RIGHT | WS_GROUP - CONTROL "",1007,"msctls_updown32",UDS_SETBUDDYINT | - UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | - UDS_NOTHOUSANDS | WS_BORDER | WS_GROUP,203,158,11,12 - LTEXT "minutes",1022,204,160,28,9 - GROUPBOX "Energy saving features of monitor",1017,4,179,238,33 - PUSHBUTTON "P&ower...",1014,175,190,50,14 - LTEXT "To adjust the power settings for your monitor, click Power.", - 1018,19,190,155,16 - CONTROL "",1002,"Static",SS_BITMAP | SS_CENTERIMAGE,60,11,125, - 107 -END +#include "en.rc" -IDD_PROPPAGEAPPEARANCE DIALOGEX 0, 0, 246, 228 -STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "Appearance" -FONT 8, "MS Shell Dlg", 0, 0, 0x0 -BEGIN - LTEXT "&Color Scheme:",-1,3,130,30,9 - COMBOBOX 1400,3,140,131,200,CBS_DROPDOWNLIST | CBS_SORT | - WS_VSCROLL | WS_TABSTOP - PUSHBUTTON "Sa&ve As...",1401,138,140,50,14 - PUSHBUTTON "&Delete",1402,191,140,50,14 - LTEXT "&Item:",-1,3,159,26,9 - COMBOBOX 1403,3,169,131,200,CBS_DROPDOWNLIST | CBS_SORT | - WS_VSCROLL | WS_TABSTOP - LTEXT "Si&ze:",1450,138,159,16,9 - EDITTEXT 1404,138,169,38,13,ES_RIGHT | WS_GROUP - CONTROL "",1411,"msctls_updown32",UDS_SETBUDDYINT | - UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | - WS_BORDER | WS_GROUP,168,169,10,13 - LTEXT "Co&lor:",1451,180,159,20,9 - LTEXT "Color &2:",1455,212,159,28,9 - LTEXT "&Font:",1452,3,188,20,9 - COMBOBOX 1407,3,198,131,200,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | - WS_TABSTOP - LTEXT "Siz&e:",1454,138,188,17,8 - COMBOBOX 1408,138,198,38,200,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | - WS_TABSTOP - LTEXT "Colo&r:",1453,180,188,20,9 - CHECKBOX "B",1409,212,198,14,13,BS_PUSHLIKE - CHECKBOX "I",1410,226,198,14,13,BS_PUSHLIKE -END - -IDD_PROPPAGESETTINGS DIALOGEX 0, 0, 246, 228 -STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "Settings" -FONT 8, "MS Shell Dlg", 0, 0, 0x0 -BEGIN - LTEXT "&Display:",1820,3,140,30,8 - GROUPBOX "&Colors",1817,3,160,115,43 - COMBOBOX 1807,9,170,103,80,CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | - CBS_SORT | WS_VSCROLL | WS_TABSTOP - CONTROL "",1813,"Static",SS_BITMAP | SS_CENTERIMAGE | SS_SUNKEN, - 9,188,103,9 - GROUPBOX "&Screen area",1818,125,160,115,43 - CONTROL "",1808,"msctls_trackbar32",TBS_AUTOTICKS | WS_TABSTOP, - 152,170,58,17 - LTEXT "Less",1815,131,170,15,8,NOT WS_GROUP - LTEXT "More",1816,215,170,21,8,NOT WS_GROUP - CTEXT "640 X 480 pixels",1814,132,190,100,10,NOT WS_GROUP - PUSHBUTTON "Ad&vanced...",1802,184,205,56,14 - LTEXT "",1050,19,149,224,8 -END - -STRINGTABLE -BEGIN - IDS_CPLSYSTEMNAME "Display" - IDS_CPLSYSTEMDESCRIPTION "Customizes your desktop display and screen saver." -END diff --git a/reactos/lib/cpl/desk/dibitmap.c b/reactos/lib/cpl/desk/dibitmap.c new file mode 100644 index 00000000000..661c58ea1e2 --- /dev/null +++ b/reactos/lib/cpl/desk/dibitmap.c @@ -0,0 +1,92 @@ +/* $Id$ + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS Display Control Panel + * FILE: lib/cpl/desk/dibitmap.c + * PURPOSE: DIB loading + * + * PROGRAMMERS: Trevor McCort (lycan359@gmail.com) + */ + +#include "dibitmap.h" + +DIBitmap *DibLoadImage(TCHAR *filename) +{ + BOOL bSuccess; + DWORD dwFileSize, dwHighSize, dwBytesRead; + HANDLE hFile; + DIBitmap *bitmap; + + hFile = CreateFile(filename, + GENERIC_READ, + FILE_SHARE_READ, + NULL, + OPEN_EXISTING, + FILE_FLAG_SEQUENTIAL_SCAN, + NULL); + + if(hFile == INVALID_HANDLE_VALUE) + return NULL; + + dwFileSize = GetFileSize(hFile, &dwHighSize); + + if(dwHighSize) + { + CloseHandle(hFile); + return NULL; + } + + bitmap = malloc(sizeof(DIBitmap)); + if(!bitmap) + return NULL; + + bitmap->header = malloc(dwFileSize); + if(!bitmap->header) + { + CloseHandle(hFile); + return NULL; + } + + bSuccess = ReadFile(hFile, bitmap->header, dwFileSize, &dwBytesRead, NULL); + CloseHandle(hFile); + + if(!bSuccess || (dwBytesRead != dwFileSize) + || (bitmap->header->bfType != * (WORD *) "BM") + || (bitmap->header->bfSize != dwFileSize)) + { + free(bitmap->header); + return NULL; + } + + bitmap->info = (BITMAPINFO *)(bitmap->header + 1); + bitmap->bits = (BYTE *)bitmap->header + bitmap->header->bfOffBits; + + /* Get the DIB width and height */ + if(bitmap->info->bmiHeader.biSize == sizeof(BITMAPCOREHEADER)) + { + bitmap->width = ((BITMAPCOREHEADER *)bitmap->info)->bcWidth; + bitmap->height = ((BITMAPCOREHEADER *)bitmap->info)->bcHeight; + } + else + { + bitmap->width = bitmap->info->bmiHeader.biWidth; + bitmap->height = abs(bitmap->info->bmiHeader.biHeight); + } + + return bitmap; +} + +void DibFreeImage(DIBitmap *bitmap) +{ + if(bitmap == NULL) + return; + + /* Free the header */ + if(bitmap->header != NULL) + free(bitmap->header); + + /* Free the bitmap structure */ + if(bitmap != NULL) + free(bitmap); +} + diff --git a/reactos/lib/cpl/desk/dibitmap.h b/reactos/lib/cpl/desk/dibitmap.h new file mode 100644 index 00000000000..cb5b0ab0909 --- /dev/null +++ b/reactos/lib/cpl/desk/dibitmap.h @@ -0,0 +1,22 @@ + +#ifndef __DIBITMAP_H__ +#define __DIBITMAP_H__ + +#include + +typedef struct +{ + BITMAPFILEHEADER *header; + BITMAPINFO *info; + BYTE *bits; + + int width; + int height; + +} DIBitmap; + +extern DIBitmap *DibLoadImage(TCHAR *filename); +extern void DibFreeImage(DIBitmap *bitmap); + +#endif /* __DIBITMAP_H__ */ + diff --git a/reactos/lib/cpl/desk/en.rc b/reactos/lib/cpl/desk/en.rc new file mode 100644 index 00000000000..4b8485e927e --- /dev/null +++ b/reactos/lib/cpl/desk/en.rc @@ -0,0 +1,59 @@ +LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT + +IDD_BACKGROUND DIALOGEX DISCARDABLE 0, 0, 246, 228 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Background" +FONT 8, "MS Shell Dlg" +BEGIN + CONTROL "",IDC_WALLPAPER_PREVIEW,"Static",SS_OWNERDRAW,48,10, + 150,105,WS_EX_STATICEDGE + CONTROL "",IDC_WALLPAPER_LIST,"SysListView32",LVS_REPORT | + LVS_SINGLESEL | LVS_NOCOLUMNHEADER | LVS_SHAREIMAGELISTS | + WS_BORDER | WS_TABSTOP,7,139,173,71 + LTEXT "Select an image to use as your desktop wallpaper:", + IDC_STATIC,8,127,180,8 + PUSHBUTTON "&Browse...",IDC_BROWSE,187,175,50,14 + PUSHBUTTON "&Pattern...",IDC_PATTERN,187,195,50,14 + LTEXT "Placement:",IDC_STATIC,187,138,36,8 + COMBOBOX IDC_PLACEMENT_COMBO,187,148,50,90,CBS_DROPDOWNLIST | + CBS_SORT | WS_VSCROLL | WS_TABSTOP +END + +IDD_SCREENSAVER DIALOGEX DISCARDABLE 0, 0, 246, 228 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Screen Saver" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "This space is intentionally left blank",IDC_STATIC,66, + 110,112,8 +END + +IDD_APPEARANCE DIALOGEX DISCARDABLE 0, 0, 246, 228 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Appearance" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "This space is intentionally left blank",IDC_STATIC,66, + 110,112,8 +END + +IDD_SETTINGS DIALOGEX DISCARDABLE 0, 0, 246, 228 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Settings" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "This space is intentionally left blank",IDC_STATIC,66, + 110,112,8 +END + +STRINGTABLE +BEGIN + IDS_CPLNAME "Display" + IDS_CPLDESCRIPTION "Customizes the desktop display and screen saver." + + IDS_NONE "(None)" + IDS_CENTER "Center" + IDS_STRETCH "Stretch" + IDS_TILE "Tile" +END + diff --git a/reactos/lib/cpl/desk/resource.h b/reactos/lib/cpl/desk/resource.h index 82fc09e75ba..93d3e986794 100644 --- a/reactos/lib/cpl/desk/resource.h +++ b/reactos/lib/cpl/desk/resource.h @@ -1,33 +1,37 @@ -#ifndef __CPL_RESOURCE_H -#define __CPL_RESOURCE_H +#ifndef __CPL_DESK_RESOURCE_H__ +#define __CPL_DESK_RESOURCE_H__ /* metrics */ -#define PROPSHEETWIDTH 246 -#define PROPSHEETHEIGHT 228 -#define PROPSHEETPADDING 6 -#define SYSTEM_COLUMN (0 * PROPSHEETPADDING) -// this is not supported by the MS Resource compiler: -//#define LABELLINE(x) 0 //(((PROPSHEETPADDING + 2) * x) + (x + 2)) +#define PROPSHEETWIDTH 246 +#define PROPSHEETHEIGHT 228 +#define PROPSHEETPADDING 6 -#define ICONSIZE 16 +#define SYSTEM_COLUMN (18 * PROPSHEETPADDING) +#define LABELLINE(x) (((PROPSHEETPADDING + 2) * x) + (x + 2)) + +#define ICONSIZE 16 /* ids */ +#define IDC_DESK_ICON 1 -#define IDI_CPLSYSTEM 100 +#define IDD_BACKGROUND 100 +#define IDD_SCREENSAVER 101 +#define IDD_APPEARANCE 102 +#define IDD_SETTINGS 103 +#define IDC_WALLPAPER_LIST 1000 +#define IDC_BROWSE 1001 +#define IDC_PATTERN 1002 +#define IDC_PLACEMENT_COMBO 1003 +#define IDC_WALLPAPER_PREVIEW 1004 +#define IDC_STATIC -1 -#define IDD_PROPPAGEBACKGROUND 100 -#define IDD_PROPPAGESCREENSAVER 101 -#define IDD_PROPPAGEAPPEARANCE 102 -#define IDD_PROPPAGESETTINGS 103 +#define IDS_CPLNAME 2000 +#define IDS_CPLDESCRIPTION 2001 -#define IDS_CPLSYSTEMNAME 1001 -#define IDS_CPLSYSTEMDESCRIPTION 2001 +#define IDS_NONE 2002 +#define IDS_CENTER 2003 +#define IDS_STRETCH 2004 +#define IDS_TILE 2005 -/* controls */ -#define IDC_INSTALL 101 -#define IDC_SOFTWARELIST 102 -#define IDC_ADDREMOVE 103 +#endif /* __CPL_DESK_RESOURCE_H__ */ -#endif /* __CPL_RESOURCE_H */ - -/* EOF */ diff --git a/reactos/lib/cpl/desk/screensaver.c b/reactos/lib/cpl/desk/screensaver.c new file mode 100644 index 00000000000..c80337b2145 --- /dev/null +++ b/reactos/lib/cpl/desk/screensaver.c @@ -0,0 +1,34 @@ +/* $Id$ + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS Display Control Panel + * FILE: lib/cpl/desk/screensaver.c + * PURPOSE: Screen saver property page + * + * PROGRAMMERS: Trevor McCort (lycan359@gmail.com) + */ + +#include +#include + +#include "resource.h" + +INT_PTR CALLBACK ScreenSaverPageProc(HWND hwndDlg, + UINT uMsg, + WPARAM wParam, + LPARAM lParam) +{ + switch(uMsg) + { + case WM_INITDIALOG: + { + } break; + + case WM_COMMAND: + { + } break; + } + + return FALSE; +} + diff --git a/reactos/lib/cpl/desk/settings.c b/reactos/lib/cpl/desk/settings.c new file mode 100644 index 00000000000..7c2b0d2695d --- /dev/null +++ b/reactos/lib/cpl/desk/settings.c @@ -0,0 +1,34 @@ +/* $Id$ + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS Display Control Panel + * FILE: lib/cpl/desk/settings.c + * PURPOSE: Settings property page + * + * PROGRAMMERS: Trevor McCort (lycan359@gmail.com) + */ + +#include +#include + +#include "resource.h" + +INT_PTR CALLBACK SettingsPageProc(HWND hwndDlg, + UINT uMsg, + WPARAM wParam, + LPARAM lParam) +{ + switch(uMsg) + { + case WM_INITDIALOG: + { + } break; + + case WM_COMMAND: + { + } break; + } + + return FALSE; +} + From b0e251bab81e3f30334c926873db249657de7c81 Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Fri, 4 Feb 2005 23:24:32 +0000 Subject: [PATCH 099/185] - Fix WDM-GUIDs. Patch by Filip Navara. - Implement libwdmguid.a. svn path=/trunk/; revision=13408 --- reactos/Makefile | 2 +- reactos/include/ntos/ntpnp.h | 51 +++++++++++++++++++---------------- reactos/lib/wdmguid/makefile | 24 +++++++++++++++++ reactos/lib/wdmguid/wdmguid.c | 11 ++++++++ 4 files changed, 64 insertions(+), 24 deletions(-) create mode 100644 reactos/lib/wdmguid/makefile create mode 100644 reactos/lib/wdmguid/wdmguid.c diff --git a/reactos/Makefile b/reactos/Makefile index 5491539a07b..b10f5b42838 100644 --- a/reactos/Makefile +++ b/reactos/Makefile @@ -42,7 +42,7 @@ BUS = acpi isapnp pci LIB_FSLIB = vfatlib # Static libraries -LIB_STATIC = string rosrtl epsapi uuid libwine zlib rtl tgetopt pseh adns dxguid strmiids crt rossym +LIB_STATIC = string rosrtl epsapi uuid libwine zlib rtl tgetopt pseh adns dxguid strmiids crt rossym wdmguid # Keyboard layout libraries DLLS_KBD = kbdda kbddv kbdes kbdfr kbdgr kbdse kbduk kbdus diff --git a/reactos/include/ntos/ntpnp.h b/reactos/include/ntos/ntpnp.h index 273766322e2..11bfc8e08b7 100644 --- a/reactos/include/ntos/ntpnp.h +++ b/reactos/include/ntos/ntpnp.h @@ -30,28 +30,31 @@ * Undocumented GUIDs used by NtGetPlugPlayEvent. */ -DEFINE_GUID(GUID_DEVICE_STANDBY_VETOED, 0x03B21C13, 0x11D3, 0x18D6, 0xA0, 0x00, 0xDB, 0x97, 0x2E, 0x52, 0x40, 0xC9); -DEFINE_GUID(GUID_DEVICE_KERNEL_INITIATED_EJECT, 0x14689B54, 0x11D3, 0x0703, 0xA0, 0x00, 0xD2, 0x97, 0x2E, 0x52, 0x40, 0xC9); -DEFINE_GUID(GUID_DEVICE_THERMAL_ZONE, 0x4AFA3D51, 0x11D0, 0x74A7, 0xA0, 0x00, 0x5E, 0xBE, 0x57, 0x28, 0x06, 0xC9); -DEFINE_GUID(GUID_DEVICE_SYS_BUTTON, 0x4AFA3D53, 0x11D0, 0x74A7, 0xA0, 0x00, 0x5E, 0xBE, 0x57, 0x28, 0x06, 0xC9); -DEFINE_GUID(GUID_DEVICE_REMOVAL_VETOED, 0x60DBD5FA, 0x11D2, 0xDDD2, 0xA0, 0x00, 0xB8, 0x97, 0x2E, 0x52, 0x40, 0xC9); -DEFINE_GUID(GUID_DEVICE_HIBERNATE_VETOED, 0x61173AD9, 0x11D3, 0x194F, 0xA0, 0x00, 0xDC, 0x97, 0x2E, 0x52, 0x40, 0xC9); -DEFINE_GUID(GUID_DEVICE_BATTERY, 0x72631E54, 0x11D0, 0x78A4, 0xAA, 0x00, 0xF7, 0xBC, 0x2A, 0xB3, 0xB7, 0x00); -DEFINE_GUID(GUID_DEVICE_SAFE_REMOVAL, 0x8FBEF967, 0x11D2, 0xD6C5, 0xA0, 0x00, 0xB5, 0x97, 0x2E, 0x52, 0x40, 0xC9); -/* DEFINE_GUID(GUID_DEVICE_INTERFACE_ARRIVAL, 0xCB3A4004, 0x11D0, 0x46F0, 0x60, 0x00, 0x8F, 0xB0, 0x3F, 0x05, 0x13, 0x97); */ -/* DEFINE_GUID(GUID_DEVICE_INTERFACE_REMOVAL, 0xCB3A4005, 0x11D0, 0x46F0, 0x60, 0x00, 0x8F, 0xB0, 0x3F, 0x05, 0x13, 0x97); */ -DEFINE_GUID(GUID_DEVICE_ARRIVAL, 0xCB3A4009, 0x11D0, 0x46F0, 0x60, 0x00, 0x8F, 0xB0, 0x3F, 0x05, 0x13, 0x97); -DEFINE_GUID(GUID_DEVICE_ENUMERATED, 0xCB3A400A, 0x11D0, 0x46F0, 0x60, 0x00, 0x8F, 0xB0, 0x3F, 0x05, 0x13, 0x97); -DEFINE_GUID(GUID_DEVICE_ENUMERATE_REQUEST, 0xCB3A400B, 0x11D0, 0x46F0, 0x60, 0x00, 0x8F, 0xB0, 0x3F, 0x05, 0x13, 0x97); -DEFINE_GUID(GUID_DEVICE_START_REQUEST, 0xCB3A400C, 0x11D0, 0x46F0, 0x60, 0x00, 0x8F, 0xB0, 0x3F, 0x05, 0x13, 0x97); -DEFINE_GUID(GUID_DEVICE_REMOVE_PENDING, 0xCB3A400D, 0x11D0, 0x46F0, 0x60, 0x00, 0x8F, 0xB0, 0x3F, 0x05, 0x13, 0x97); -DEFINE_GUID(GUID_DEVICE_QUERY_AND_REMOVE, 0xCB3A400E, 0x11D0, 0x46F0, 0x60, 0x00, 0x8F, 0xB0, 0x3F, 0x05, 0x13, 0x97); -DEFINE_GUID(GUID_DEVICE_EJECT, 0xCB3A400F, 0x11D0, 0x46F0, 0x60, 0x00, 0x8F, 0xB0, 0x3F, 0x05, 0x13, 0x97); -DEFINE_GUID(GUID_DEVICE_NOOP, 0xCB3A4010, 0x11D0, 0x46F0, 0x60, 0x00, 0x8F, 0xB0, 0x3F, 0x05, 0x13, 0x97); -DEFINE_GUID(GUID_DEVICE_WARM_EJECT_VETOED, 0xCBF4C1F9, 0x11D3, 0x18D5, 0xA0, 0x00, 0xDB, 0x97, 0x2E, 0x52, 0x40, 0xC9); -DEFINE_GUID(GUID_DEVICE_SURPRISE_REMOVAL, 0xCE5AF000, 0x11D2, 0x80DD, 0xA0, 0x00, 0x8D, 0xA8, 0x4B, 0x6B, 0x69, 0xC9); -DEFINE_GUID(GUID_DEVICE_EJECT_VETOED, 0xCF7B71E8, 0x11D2, 0xD8FD, 0xA0, 0x00, 0xB5, 0x97, 0x2E, 0x52, 0x40, 0xC9); -DEFINE_GUID(GUID_DEVICE_EVENT_RBC, 0xD0744792, 0x11D2, 0xA98E, 0xA0, 0x00, 0x7A, 0x91, 0xF3, 0x8F, 0x06, 0xC9); +DEFINE_GUID(GUID_DEVICE_STANDBY_VETOED, 0x03B21C13, 0x18D6, 0x11D3, 0x97, 0xDB, 0x00, 0xA0, 0xC9, 0x40, 0x52, 0x2E); +DEFINE_GUID(GUID_DEVICE_KERNEL_INITIATED_EJECT, 0x14689B54, 0x0703, 0x11D3, 0x97, 0xD2, 0x00, 0xA0, 0xC9, 0x40, 0x52, 0x2E); +DEFINE_GUID(GUID_DEVICE_THERMAL_ZONE, 0x4AFA3D51, 0x74A7, 0x11D0, 0xBE, 0x5E, 0x00, 0xA0, 0xC9, 0x06, 0x28, 0x57); +DEFINE_GUID(GUID_DEVICE_SYS_BUTTON, 0x4AFA3D53, 0x74A7, 0x11D0, 0xBE, 0x5E, 0x00, 0xA0, 0xC9, 0x06, 0x28, 0x57); +DEFINE_GUID(GUID_DEVICE_REMOVAL_VETOED, 0x60DBD5FA, 0xDDD2, 0x11D2, 0x97, 0xB8, 0x00, 0xA0, 0xC9, 0x40, 0x52, 0x2E); +DEFINE_GUID(GUID_DEVICE_HIBERNATE_VETOED, 0x61173AD9, 0x194F, 0x11D3, 0x97, 0xDC, 0x00, 0xA0, 0xC9, 0x40, 0x52, 0x2E); +DEFINE_GUID(GUID_DEVICE_BATTERY, 0x72631E54, 0x78A4, 0x11D0, 0xBC, 0xF7, 0x00, 0xAA, 0x00, 0xB7, 0xB3, 0x2A); +DEFINE_GUID(GUID_DEVICE_SAFE_REMOVAL, 0x8FBEF967, 0xD6C5, 0x11D2, 0x97, 0xB5, 0x00, 0xA0, 0xC9, 0x40, 0x52, 0x2E); +/* DEFINE_GUID(GUID_DEVICE_INTERFACE_ARRIVAL, 0xCB3A4004, 0x46F0, 0x11D0, 0xB0, 0x8F, 0x00, 0x60, 0x97, 0x13, 0x05, 0x3F); */ +/* DEFINE_GUID(GUID_DEVICE_INTERFACE_REMOVAL, 0xCB3A4005, 0x46F0, 0x11D0, 0xB0, 0x8F, 0x00, 0x60, 0x97, 0x13, 0x05, 0x3F); */ +DEFINE_GUID(GUID_DEVICE_ARRIVAL, 0xCB3A4009, 0x46F0, 0x11D0, 0xB0, 0x8F, 0x00, 0x60, 0x97, 0x13, 0x05, 0x3F); +DEFINE_GUID(GUID_DEVICE_ENUMERATED, 0xCB3A400A, 0x46F0, 0x11D0, 0xB0, 0x8F, 0x00, 0x60, 0x97, 0x13, 0x05, 0x3F); +DEFINE_GUID(GUID_DEVICE_ENUMERATE_REQUEST, 0xCB3A400B, 0x46F0, 0x11D0, 0xB0, 0x8F, 0x00, 0x60, 0x97, 0x13, 0x05, 0x3F); +DEFINE_GUID(GUID_DEVICE_START_REQUEST, 0xCB3A400C, 0x46F0, 0x11D0, 0xB0, 0x8F, 0x00, 0x60, 0x97, 0x13, 0x05, 0x3F); +DEFINE_GUID(GUID_DEVICE_REMOVE_PENDING, 0xCB3A400D, 0x46F0, 0x11D0, 0xB0, 0x8F, 0x00, 0x60, 0x97, 0x13, 0x05, 0x3F); +DEFINE_GUID(GUID_DEVICE_QUERY_AND_REMOVE, 0xCB3A400E, 0x46F0, 0x11D0, 0xB0, 0x8F, 0x00, 0x60, 0x97, 0x13, 0x05, 0x3F); +DEFINE_GUID(GUID_DEVICE_EJECT, 0xCB3A400F, 0x46F0, 0x11D0, 0xB0, 0x8F, 0x00, 0x60, 0x97, 0x13, 0x05, 0x3F); +DEFINE_GUID(GUID_DEVICE_NOOP, 0xCB3A4010, 0x46F0, 0x11D0, 0xB0, 0x8F, 0x00, 0x60, 0x97, 0x13, 0x05, 0x3F); +DEFINE_GUID(GUID_DEVICE_WARM_EJECT_VETOED, 0xCBF4C1F9, 0x18D5, 0x11D3, 0x97, 0xDB, 0x00, 0xA0, 0xC9, 0x40, 0x52, 0x2E); +DEFINE_GUID(GUID_DEVICE_SURPRISE_REMOVAL, 0xCE5AF000, 0x80DD, 0x11D2, 0xA8, 0x8D, 0x00, 0xA0, 0xC9, 0x69, 0x6B, 0x4B); +DEFINE_GUID(GUID_DEVICE_EJECT_VETOED, 0xCF7B71E8, 0xD8FD, 0x11D2, 0x97, 0xB5, 0x00, 0xA0, 0xC9, 0x40, 0x52, 0x2E); +DEFINE_GUID(GUID_DEVICE_EVENT_RBC, 0xD0744792, 0xA98E, 0x11D2, 0x91, 0x7A, 0x00, 0xA0, 0xC9, 0x06, 0x8F, 0xF3); + + +#ifndef __GUIDS_ONLY__ /* This is defined to build libwdmguid.a */ typedef enum _PLUGPLAY_EVENT_CATEGORY { HardwareProfileChangeEvent, @@ -149,7 +152,7 @@ typedef struct _PLUGPLAY_EVENT_BLOCK { } BlockedDriverNotification; }; } PLUGPLAY_EVENT_BLOCK, *PPLUGPLAY_EVENT_BLOCK; - + /* * NtGetPlugPlayEvent * @@ -247,4 +250,6 @@ NtPlugPlayControl( PVOID Buffer, ULONG BufferSize); +#endif /* __GUIDS_ONLY__ */ + #endif /* __NTPNP_H */ diff --git a/reactos/lib/wdmguid/makefile b/reactos/lib/wdmguid/makefile new file mode 100644 index 00000000000..bc62179643b --- /dev/null +++ b/reactos/lib/wdmguid/makefile @@ -0,0 +1,24 @@ +# $Id$ + +PATH_TO_TOP = ../.. + +TARGET_TYPE = library + +TARGET_NAME = wdmguid + +TARGET_CFLAGS = -Wall -Werror -D__USE_W32API -I$(PATH_TO_TOP)/include/wine + +# require os code to explicitly request A/W version of structs/functions +TARGET_CFLAGS += -D_DISABLE_TIDENTS + +TARGET_OBJECTS = wdmguid.o + +include $(PATH_TO_TOP)/rules.mak + +include $(TOOLS_PATH)/helper.mk + +DEP_OBJECTS := $(TARGET_OBJECTS) + +TARGET_CLEAN = $(DEP_FILES) + +include $(PATH_TO_TOP)/tools/depend.mk diff --git a/reactos/lib/wdmguid/wdmguid.c b/reactos/lib/wdmguid/wdmguid.c new file mode 100644 index 00000000000..3070d905925 --- /dev/null +++ b/reactos/lib/wdmguid/wdmguid.c @@ -0,0 +1,11 @@ + +#include + +#define COM_NO_WINDOWS_H +#include "initguid.h" + +#include +#define __GUIDS_ONLY__ +#include + +/* EOF */ From 61f4f70343e98bfcdb438106bfaebab98211d9cd Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Sat, 5 Feb 2005 00:04:52 +0000 Subject: [PATCH 100/185] - Link ntoskrnl against libwdmguid.a. - Report device arrival events to the user-mode pnp manager. svn path=/trunk/; revision=13409 --- reactos/include/ntos/ntpnp.h | 2 + reactos/ntoskrnl/Makefile | 5 +- reactos/ntoskrnl/include/internal/io.h | 6 +- reactos/ntoskrnl/io/plugplay.c | 123 ++++++++++++++++++------- reactos/ntoskrnl/io/pnpmgr.c | 7 +- 5 files changed, 104 insertions(+), 39 deletions(-) diff --git a/reactos/include/ntos/ntpnp.h b/reactos/include/ntos/ntpnp.h index 11bfc8e08b7..bf551f71e08 100644 --- a/reactos/include/ntos/ntpnp.h +++ b/reactos/include/ntos/ntpnp.h @@ -244,6 +244,8 @@ NtGetPlugPlayEvent( * ... */ +#define PLUGPLAY_USER_RESPONSE 0x07 + NTSTATUS STDCALL NtPlugPlayControl( ULONG ControlCode, diff --git a/reactos/ntoskrnl/Makefile b/reactos/ntoskrnl/Makefile index e1123a5ed1b..63d323aacf8 100644 --- a/reactos/ntoskrnl/Makefile +++ b/reactos/ntoskrnl/Makefile @@ -185,9 +185,9 @@ OBJECTS_IO = \ io/parttab.o \ io/plugplay.o \ io/process.o \ - io/pnpnotify.o \ io/pnpdma.o \ io/pnpmgr.o \ + io/pnpnotify.o \ io/pnpreport.o \ io/pnproot.o \ io/queue.o \ @@ -516,6 +516,7 @@ TARGET_LIBS = \ $(SDK_PATH_LIB)/libstring.a \ $(SDK_PATH_LIB)/librosrtl.a \ $(SDK_PATH_LIB)/libpseh.a \ + $(SDK_PATH_LIB)/libwdmguid.a \ $(PATH_TO_TOP)/drivers/lib/csq/csq.o TARGET_LFLAGS = \ @@ -542,7 +543,7 @@ $(PATH_TO_TOP)/include/reactos/bugcodes.h bugcodes.rc: ntoskrnl.mc TARGET_CLEAN = \ $(PATH_TO_TOP)/include/reactos/bugcodes.h \ - $(DEP_OBJECTS) $(DEP_FILES) MSG00409.bin bugcodes.rc + $(DEP_OBJECTS) $(DEP_FILES) MSG00409.bin bugcodes.rc ex/napi.o: ex/zw.S $(PATH_TO_TOP)/include/ntdll/napi.h diff --git a/reactos/ntoskrnl/include/internal/io.h b/reactos/ntoskrnl/include/internal/io.h index b102b1ac4b1..823c153c197 100644 --- a/reactos/ntoskrnl/include/internal/io.h +++ b/reactos/ntoskrnl/include/internal/io.h @@ -501,11 +501,15 @@ VOID FASTCALL IopReinitializeDrivers(VOID); -/* pnpevent.c */ +/* plugplay.c */ NTSTATUS INIT_FUNCTION IopInitPlugPlayEvents(VOID); +NTSTATUS +IopQueueTargetDeviceEvent(const GUID *Guid, + PUNICODE_STRING DeviceIds); + /* pnpmgr.c */ diff --git a/reactos/ntoskrnl/io/plugplay.c b/reactos/ntoskrnl/io/plugplay.c index e309df1cd8f..810a6d597fa 100644 --- a/reactos/ntoskrnl/io/plugplay.c +++ b/reactos/ntoskrnl/io/plugplay.c @@ -15,9 +15,17 @@ #define NDEBUG #include + +typedef struct _PNP_EVENT_ENTRY +{ + LIST_ENTRY ListEntry; + PLUGPLAY_EVENT_BLOCK Event; +} PNP_EVENT_ENTRY, *PPNP_EVENT_ENTRY; + + /* GLOBALS *******************************************************************/ -static LIST_ENTRY IopPnpEventListHead; +static LIST_ENTRY IopPnpEventQueueHead; static KEVENT IopPnpNotifyEvent; /* FUNCTIONS *****************************************************************/ @@ -26,41 +34,77 @@ NTSTATUS INIT_FUNCTION IopInitPlugPlayEvents(VOID) { - InitializeListHead(&IopPnpEventListHead); + InitializeListHead(&IopPnpEventQueueHead); KeInitializeEvent(&IopPnpNotifyEvent, - NotificationEvent, + SynchronizationEvent, FALSE); return STATUS_SUCCESS; } -#if 0 -/* Insert a new pnp event at the head of the event queue */ -VOID -IopEnqueuePlugPlayEvent(VOID) +NTSTATUS +IopQueueTargetDeviceEvent(const GUID *Guid, + PUNICODE_STRING DeviceIds) { + PPNP_EVENT_ENTRY EventEntry; + DWORD TotalSize; + TotalSize = + FIELD_OFFSET(PLUGPLAY_EVENT_BLOCK, TargetDevice.DeviceIds) + + DeviceIds->MaximumLength; + + EventEntry = ExAllocatePool(NonPagedPool, + TotalSize + FIELD_OFFSET(PNP_EVENT_ENTRY, Event)); + if (EventEntry == NULL) + return STATUS_INSUFFICIENT_RESOURCES; + + memcpy(&EventEntry->Event.EventGuid, + Guid, + sizeof(GUID)); + EventEntry->Event.EventCategory = TargetDeviceChangeEvent; + EventEntry->Event.TotalSize = TotalSize; + + memcpy(&EventEntry->Event.TargetDevice.DeviceIds, + DeviceIds->Buffer, + DeviceIds->MaximumLength); + + InsertHeadList(&IopPnpEventQueueHead, + &EventEntry->ListEntry); + KeSetEvent(&IopPnpNotifyEvent, + 0, + FALSE); + + return STATUS_SUCCESS; } -#endif -#if 0 /* * Remove the current PnP event from the tail of the event queue * and signal IopPnpNotifyEvent if there is yet another event in the queue. */ -VOID -IopDequeuePlugPlayEvent(VOID) +static VOID +IopRemovePlugPlayEvent(VOID) { + /* Remove a pnp event entry from the tail of the queue */ + if (!IsListEmpty(&IopPnpEventQueueHead)) + { + ExFreePool(RemoveTailList(&IopPnpEventQueueHead)); + } + /* Signal the next pnp event in the queue */ + if (!IsListEmpty(&IopPnpEventQueueHead)) + { + KeSetEvent(&IopPnpNotifyEvent, + 0, + FALSE); + } } -#endif /* - * @unimplemented + * @implemented */ NTSTATUS STDCALL NtGetPlugPlayEvent(IN ULONG Reserved1, @@ -68,6 +112,7 @@ NtGetPlugPlayEvent(IN ULONG Reserved1, OUT PPLUGPLAY_EVENT_BLOCK Buffer, IN ULONG BufferLength) { + PPNP_EVENT_ENTRY Entry; NTSTATUS Status; DPRINT("NtGetPlugPlayEvent() called\n"); @@ -83,7 +128,7 @@ NtGetPlugPlayEvent(IN ULONG Reserved1, if (!SeSinglePrivilegeCheck(SeTcbPrivilege, UserMode)) { - DPRINT1("NtGetPlugPlayEvent: Caller requires the SeTcbPrivilege privilege!\n"); + DPRINT1("NtGetPlugPlayEvent: Caller does not hold the SeTcbPrivilege privilege!\n"); return STATUS_PRIVILEGE_NOT_HELD; } @@ -94,31 +139,30 @@ NtGetPlugPlayEvent(IN ULONG Reserved1, KernelMode, FALSE, NULL); - if (NT_SUCCESS(Status)) + if (!NT_SUCCESS(Status)) { - DPRINT("Waiting done\n"); - -#if 0 - /* Get entry from the tail of the list */ - Entry = IopPnpEventListHead.Blink; - - /* Check the buffer size */ - if (BufferLength < Entry->Event.Size) - { - DPRINT1("Buffer is too small for the pnp-event\n"); - return STATUS_BUFFER_TOO_SMALL; - } - - /* Copy event data to user buffer */ - memcpy(Buffer, - &Entry->Event, - &Entry->Event.Size); -#endif + DPRINT1("KeWaitForSingleObject() failed (Status %lx)\n", Status); + return Status; } + /* Get entry from the tail of the queue */ + Entry = (PPNP_EVENT_ENTRY)IopPnpEventQueueHead.Blink; + + /* Check the buffer size */ + if (BufferLength < Entry->Event.TotalSize) + { + DPRINT1("Buffer is too small for the pnp-event\n"); + return STATUS_BUFFER_TOO_SMALL; + } + + /* Copy event data to the user buffer */ + memcpy(Buffer, + &Entry->Event, + Entry->Event.TotalSize); + DPRINT("NtGetPlugPlayEvent() done\n"); - return Status; + return STATUS_SUCCESS; } @@ -130,7 +174,16 @@ NtPlugPlayControl(IN ULONG ControlCode, IN OUT PVOID Buffer, IN ULONG BufferLength) { - UNIMPLEMENTED; + DPRINT("NtPlugPlayControl(%lu %p %lu) called\n", + ControlCode, Buffer, BufferLength); + + switch (ControlCode) + { + case PLUGPLAY_USER_RESPONSE: + IopRemovePlugPlayEvent(); + return STATUS_SUCCESS; + } + return STATUS_NOT_IMPLEMENTED; } diff --git a/reactos/ntoskrnl/io/pnpmgr.c b/reactos/ntoskrnl/io/pnpmgr.c index 13bb59a6c03..352e4c4ce3e 100644 --- a/reactos/ntoskrnl/io/pnpmgr.c +++ b/reactos/ntoskrnl/io/pnpmgr.c @@ -11,6 +11,7 @@ /* INCLUDES ******************************************************************/ #include +#include #define NDEBUG #include @@ -434,7 +435,7 @@ IoRequestDeviceEject( BOOLEAN IopCreateUnicodeString( - PUNICODE_STRING Destination, + PUNICODE_STRING Destination, PWSTR Source, POOL_TYPE PoolType) { @@ -1318,6 +1319,10 @@ IopActionInterrogateDeviceStack( DeviceNode->Flags |= DNF_PROCESSED; + /* Report the device to the user-mode pnp manager */ + IopQueueTargetDeviceEvent(&GUID_DEVICE_ARRIVAL, + &DeviceNode->InstancePath); + return STATUS_SUCCESS; } From 9566275d1be491781c2385f71f3a408f62c5a15f Mon Sep 17 00:00:00 2001 From: Gregor Anich Date: Sat, 5 Feb 2005 00:07:57 +0000 Subject: [PATCH 101/185] Small update of opengl32. svn path=/trunk/; revision=13410 --- reactos/lib/opengl32/gl.c | 35 ++++++++++++++++++----------------- reactos/lib/opengl32/wgl.c | 12 ++++++++++-- 2 files changed, 28 insertions(+), 19 deletions(-) diff --git a/reactos/lib/opengl32/gl.c b/reactos/lib/opengl32/gl.c index fc05d3e5b24..edf981423eb 100644 --- a/reactos/lib/opengl32/gl.c +++ b/reactos/lib/opengl32/gl.c @@ -61,11 +61,12 @@ int STDCALL glEmptyFunc56( long l1, long l2, long l3, long l4, long l5, #if defined(_M_IX86) # define FOO(x) #x # define X(func, ret, typeargs, args, icdidx, tebidx, stack) \ -__asm__(".globl _"#func"@"#stack "\n\t" \ +__asm__(".align 4" "\n\t" \ + ".globl _"#func"@"#stack "\n\t" \ "_"#func"@"#stack":" "\n\t" \ - " movl %fs:0x18, %eax" "\n\t" \ - " movl 0xbe8(%eax), %eax" "\n\t" \ - " jmp *"FOO((icdidx*4))"(%eax)" "\n\t"); + " movl %fs:0x18, %eax" "\n\t" \ + " movl 0xbe8(%eax), %eax" "\n\t" \ + " jmp *"FOO((icdidx*4))"(%eax)" "\n\t"); GLFUNCS_MACRO # undef FOO @@ -74,19 +75,19 @@ GLFUNCS_MACRO # define X(func, ret, typeargs, args, icdidx, tebidx, stack) \ ret STDCALL func typeargs \ { \ - PROC *table; \ - PROC fn; \ - if (tebidx >= 0 && 0) \ - { \ - table = (PROC *)NtCurrentTeb()->glDispatchTable; \ - fn = table[tebidx]; \ - } \ - else \ - { \ - table = (PROC *)NtCurrentTeb()->glTable; \ - fn = table[icdidx]; \ - } \ - return (ret)((ret(*)typeargs)fn)args; \ + PROC *table; \ + PROC fn; \ + if (tebidx >= 0 && 0) \ + { \ + table = (PROC *)NtCurrentTeb()->glDispatchTable; \ + fn = table[tebidx]; \ + } \ + else \ + { \ + table = (PROC *)NtCurrentTeb()->glTable; \ + fn = table[icdidx]; \ + } \ + return (ret)((ret(*)typeargs)fn)args; \ } GLFUNCS_MACRO diff --git a/reactos/lib/opengl32/wgl.c b/reactos/lib/opengl32/wgl.c index 549a4207937..6d17b172feb 100644 --- a/reactos/lib/opengl32/wgl.c +++ b/reactos/lib/opengl32/wgl.c @@ -10,6 +10,7 @@ #define WIN32_LEAN_AND_MEAN #include +#include #include #include #include "teb.h" @@ -334,6 +335,15 @@ ROSGL_ICDForHDC( HDC hdc ) } /* load driver (or get a reference) */ dcdata->icd = OPENGL32_LoadICD( info.driver_name ); + if (dcdata->icd == NULL) + { + WCHAR Buffer[256]; + snwprintf(Buffer, sizeof(Buffer)/sizeof(WCHAR), + L"Couldn't load driver \"%s\".", driverName); + MessageBox(WindowFromDC( hdc ), Buffer, + L"OPENGL32.dll: Warning", + MB_OK | MB_ICONWARNING); + } } return dcdata->icd; @@ -398,7 +408,6 @@ ROSGL_SetContextCallBack( const ICDTable *table ) #undef X DBGPRINT( "Done." ); -/* DBGBREAK();*/ return ERROR_SUCCESS; } @@ -894,7 +903,6 @@ rosglMakeCurrent( HDC hdc, HGLRC hglrc ) if (glrc->hglrc != NULL) { DBGPRINT( "Info: Calling DrvSetContext!" ); - DBGBREAK(); icdTable = glrc->icd->DrvSetContext( hdc, glrc->hglrc, ROSGL_SetContextCallBack ); if (icdTable == NULL) From 824d1552c9e3e9be7b81e6fb1791fdc7832eaa74 Mon Sep 17 00:00:00 2001 From: Gregor Anich Date: Sat, 5 Feb 2005 00:09:56 +0000 Subject: [PATCH 102/185] Fix VideoPortMapMemory. svn path=/trunk/; revision=13411 --- reactos/drivers/video/videoprt/resource.c | 25 ++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/reactos/drivers/video/videoprt/resource.c b/reactos/drivers/video/videoprt/resource.c index 397a167eb0f..ece08ed857a 100644 --- a/reactos/drivers/video/videoprt/resource.c +++ b/reactos/drivers/video/videoprt/resource.c @@ -82,6 +82,7 @@ IntVideoPortMapMemory( IN PHYSICAL_ADDRESS IoAddress, IN ULONG NumberOfUchars, IN UCHAR InIoSpace, + IN HANDLE ProcessHandle, OUT VP_STATUS *Status) { PHYSICAL_ADDRESS TranslatedAddress; @@ -101,6 +102,23 @@ IntVideoPortMapMemory( InIoSpace &= ~VIDEO_MEMORY_SPACE_P6CACHE; } + if (ProcessHandle != NULL && (InIoSpace & VIDEO_MEMORY_SPACE_USER_MODE) == 0) + { + DPRINT("ProcessHandle is not NULL (0x%x) but InIoSpace does not have " + "VIDEO_MEMORY_SPACE_USER_MODE set! Setting " + "VIDEO_MEMORY_SPACE_USER_MODE.\n", + ProcessHandle); + InIoSpace |= VIDEO_MEMORY_SPACE_USER_MODE; + } + else if (ProcessHandle == NULL && (InIoSpace & VIDEO_MEMORY_SPACE_USER_MODE) != 0) + { + DPRINT("ProcessHandle is NULL (0x%x) but InIoSpace does have " + "VIDEO_MEMORY_SPACE_USER_MODE set! Setting ProcessHandle " + "to NtCurrentProcess()\n", + ProcessHandle); + ProcessHandle = NtCurrentProcess(); + } + if ((InIoSpace & VIDEO_MEMORY_SPACE_USER_MODE) == 0 && !IsListEmpty(&DeviceExtension->AddressMappingListHead)) { @@ -155,7 +173,7 @@ IntVideoPortMapMemory( { NTSTATUS NtStatus; MappedAddress = NULL; - NtStatus = IntVideoPortMapPhysicalMemory(NtCurrentProcess(), + NtStatus = IntVideoPortMapPhysicalMemory(ProcessHandle, TranslatedAddress, NumberOfUchars, PAGE_READWRITE/* | PAGE_WRITECOMBINE*/, @@ -249,6 +267,8 @@ IntVideoPortUnmapMemory( /* If there was no kernelmode mapping for the given address found we assume * that the given address is a usermode mapping and try to unmap it. + * + * FIXME: Is it ok to use NtCurrentProcess? */ Status = ZwUnmapViewOfSection(NtCurrentProcess(), MappedAddress); if (!NT_SUCCESS(Status)) @@ -276,6 +296,7 @@ VideoPortGetDeviceBase( IoAddress, NumberOfUchars, InIoSpace, + NULL, NULL); } @@ -332,6 +353,7 @@ VideoPortMapMemory( NTSTATUS Status; DPRINT("VideoPortMapMemory\n"); + DPRINT("- *VirtualAddress: 0x%x\n", *VirtualAddress); DeviceExtension = VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension); *VirtualAddress = IntVideoPortMapMemory( @@ -339,6 +361,7 @@ VideoPortMapMemory( PhysicalAddress, *Length, *InIoSpace, + (HANDLE)*VirtualAddress, &Status); return Status; From b70985ca9961ebd946017c4e9b96c5619340e517 Mon Sep 17 00:00:00 2001 From: Gregor Anich Date: Sat, 5 Feb 2005 00:17:49 +0000 Subject: [PATCH 103/185] Change WNDOBJ implementation a bit to make the NVIDIA driver happy. svn path=/trunk/; revision=13412 --- reactos/subsys/win32k/eng/window.c | 48 ++++++++++++++++++++++-------- reactos/subsys/win32k/objects/dc.c | 2 +- 2 files changed, 37 insertions(+), 13 deletions(-) diff --git a/reactos/subsys/win32k/eng/window.c b/reactos/subsys/win32k/eng/window.c index ed5c241bda9..4831da45563 100644 --- a/reactos/subsys/win32k/eng/window.c +++ b/reactos/subsys/win32k/eng/window.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: window.c,v 1.11 2004/05/10 17:07:17 blight Exp $ +/* $Id$ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -57,8 +57,8 @@ IntEngWndChanged( pwo = NULL; } - DPRINT1("Calling WNDOBJCHANGEPROC (0x%x), Changed = 0x%x\n", - WndObjInt->ChangeProc, flChanged); + DPRINT("Calling WNDOBJCHANGEPROC (0x%x), Changed = 0x%x\n", + WndObjInt->ChangeProc, flChanged); WndObjInt->ChangeProc(pwo, flChanged); } @@ -80,7 +80,8 @@ EngCreateWnd( PWINDOW_OBJECT Window; CLIPOBJ *ClientClipObj; - DPRINT("EngCreateWnd: WNDOBJCHANGEPROC = 0x%x, Flags = 0x%x\n", pfn, fl); + DPRINT("EngCreateWnd: pso = 0x%x, hwnd = 0x%x, pfn = 0x%x, fl = 0x%x, pixfmt = %d\n", + pso, hwnd, pfn, fl, iPixelFormat); /* Get window object */ Window = IntGetWindowObject(hwnd); @@ -123,10 +124,8 @@ EngCreateWnd( /* release resources */ IntReleaseWindowObject(Window); - /* HACKHACKHACK */ - IntEngWndChanged(WndObjUser, WOC_RGN_CLIENT); - DPRINT("EngCreateWnd: SUCCESS!\n"); + return WndObjUser; } @@ -140,7 +139,7 @@ EngDeleteWnd ( IN WNDOBJ *pwo ) { WNDGDI *WndObjInt = ObjToGDI(pwo, WND); - DPRINT("EngDeleteWnd\n"); + DPRINT("EngDeleteWnd: pwo = 0x%x\n", pwo); IntEngDeleteClipRegion(WndObjInt->ClientClipObj); EngFreeMem(WndObjInt); @@ -159,8 +158,13 @@ WNDOBJ_bEnum( ) { WNDGDI *WndObjInt = ObjToGDI(pwo, WND); - DPRINT("WNDOBJ_bEnum\n"); - return CLIPOBJ_bEnum(WndObjInt->ClientClipObj, cj, pul); + BOOL Ret; + + DPRINT("WNDOBJ_bEnum: pwo = 0x%x, cj = %d, pul = 0x%x\n", pwo, cj, pul); + Ret = CLIPOBJ_bEnum(WndObjInt->ClientClipObj, cj, pul); + + DPRINT("WNDOBJ_bEnum: Returning %s\n", Ret ? "True" : "False"); + return Ret; } @@ -177,9 +181,16 @@ WNDOBJ_cEnumStart( ) { WNDGDI *WndObjInt = ObjToGDI(pwo, WND); - DPRINT("WNDOBJ_cEnumStart\n"); + ULONG Ret; + + DPRINT("WNDOBJ_cEnumStart: pwo = 0x%x, iType = %d, iDirection = %d, cLimit = %d\n", + pwo, iType, iDirection, cLimit); + /* FIXME: Should we enumerate all rectangles or not? */ - return CLIPOBJ_cEnumStart(WndObjInt->ClientClipObj, FALSE, iType, iDirection, cLimit); + Ret = CLIPOBJ_cEnumStart(WndObjInt->ClientClipObj, FALSE, iType, iDirection, cLimit); + + DPRINT("WNDOBJ_cEnumStart: Returning 0x%x\n", Ret); + return Ret; } @@ -193,7 +204,20 @@ WNDOBJ_vSetConsumer( IN PVOID pvConsumer ) { + BOOL Hack; + + DPRINT("WNDOBJ_vSetConsumer: pwo = 0x%x, pvConsumer = 0x%x\n", pwo, pvConsumer); + + Hack = (pwo->pvConsumer == NULL); pwo->pvConsumer = pvConsumer; + + /* HACKHACKHACK */ + if (Hack) + { + IntEngWndChanged(pwo, WOC_RGN_CLIENT); + IntEngWndChanged(pwo, WOC_CHANGED); + IntEngWndChanged(pwo, WOC_DRAWN); + } } /* EOF */ diff --git a/reactos/subsys/win32k/objects/dc.c b/reactos/subsys/win32k/objects/dc.c index 3f5139af4b8..65c9cd3e170 100644 --- a/reactos/subsys/win32k/objects/dc.c +++ b/reactos/subsys/win32k/objects/dc.c @@ -727,7 +727,7 @@ IntGdiCreateDC(PUNICODE_STRING Driver, if (Driver != NULL && Driver->Buffer != NULL) { - DPRINT("NAME: %S\n", Driver->Buffer); // FIXME: Should not crash if NULL + DPRINT("NAME: %ws\n", Driver); // FIXME: Should not crash if NULL } /* Allocate a DC object */ From 2b921cb3e3e469eb5b211607dff136f8b6fccb00 Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Sat, 5 Feb 2005 00:20:14 +0000 Subject: [PATCH 104/185] svn path=/trunk/; revision=13413 --- reactos/Makefile | 3 +- reactos/bootdata/hivesys.inf | 8 ++ reactos/bootdata/packages/reactos.dff | 3 +- reactos/services/umpnpmgr/makefile | 23 ++++ reactos/services/umpnpmgr/umpnpmgr.c | 147 ++++++++++++++++++++++++++ reactos/services/umpnpmgr/umpnpmgr.rc | 4 + 6 files changed, 185 insertions(+), 3 deletions(-) create mode 100644 reactos/services/umpnpmgr/makefile create mode 100644 reactos/services/umpnpmgr/umpnpmgr.c create mode 100644 reactos/services/umpnpmgr/umpnpmgr.rc diff --git a/reactos/Makefile b/reactos/Makefile index b10f5b42838..fa2dfe1d553 100644 --- a/reactos/Makefile +++ b/reactos/Makefile @@ -105,8 +105,7 @@ SYS_APPS = autochk calc cmd explorer expand format ibrowser msiexec regedt32 reg winlogon regedit winefile notepad reactos # System services -# rpcss eventlog -SYS_SVC = rpcss eventlog +SYS_SVC = rpcss eventlog umpnpmgr APPS = testsets utils diff --git a/reactos/bootdata/hivesys.inf b/reactos/bootdata/hivesys.inf index e2a65e1b32d..b3e032acfd2 100644 --- a/reactos/bootdata/hivesys.inf +++ b/reactos/bootdata/hivesys.inf @@ -201,6 +201,7 @@ HKLM,"SYSTEM\CurrentControlSet\Control\ServiceGroupOrder","List",0x00010000, \ "NDIS", \ "PNP_TDI", \ "TDI", \ + "PlugPlay", \ "Extended Base" ; Group order, the first DWORD is the count of entries, @@ -676,6 +677,13 @@ HKLM,"SYSTEM\CurrentControlSet\Services\Pice","Type",0x00010001,0x00000001 ;HKLM,"SYSTEM\CurrentControlSet\Services\ntice","Start",0x00010001,0x00000000 ;HKLM,"SYSTEM\CurrentControlSet\Services\ntice","Type",0x00010001,0x00000001 +; Plug and Play manager +HKLM,"SYSTEM\CurrentControlSet\Services\PlugPlay","ErrorControl",0x00010001,0x00000000 +HKLM,"SYSTEM\CurrentControlSet\Services\PlugPlay","Group",0x00000000,"PlugPlay" +HKLM,"SYSTEM\CurrentControlSet\Services\PlugPlay","ImagePath",0x00020000,"%SystemRoot%\system32\umpnpmgr.exe" +HKLM,"SYSTEM\CurrentControlSet\Services\PlugPlay","Start",0x00010001,0x00000002 +HKLM,"SYSTEM\CurrentControlSet\Services\PlugPlay","Type",0x00010001,0x00000010 + ; PS/2 mouse port driver HKLM,"SYSTEM\CurrentControlSet\Services\Psaux","ErrorControl",0x00010001,0x00000000 HKLM,"SYSTEM\CurrentControlSet\Services\Psaux","Group",0x00000000,"Pointer Port" diff --git a/reactos/bootdata/packages/reactos.dff b/reactos/bootdata/packages/reactos.dff index 98682b1dfaa..6cbb91acc1a 100755 --- a/reactos/bootdata/packages/reactos.dff +++ b/reactos/bootdata/packages/reactos.dff @@ -161,8 +161,9 @@ subsys\system\winlogon\winlogon.exe 1 subsys\system\winefile\winefile.exe 1 services\eventlog\eventlog.exe 1 services\rpcss\rpcss.exe 1 +services\umpnpmgr\umpnpmgr.exe 1 apps\utils\net\arp\arp.exe 1 -apps\utils\net\route\route.exe 1 +apps\utils\net\route\route.exe 1 apps\utils\net\finger\finger.exe 1 apps\utils\net\ftp\ftp.exe 1 apps\utils\net\ipconfig\ipconfig.exe 1 diff --git a/reactos/services/umpnpmgr/makefile b/reactos/services/umpnpmgr/makefile new file mode 100644 index 00000000000..f96bb8bd878 --- /dev/null +++ b/reactos/services/umpnpmgr/makefile @@ -0,0 +1,23 @@ +# $Id$ + +PATH_TO_TOP = ../.. + +TARGET_TYPE = program + +TARGET_APPTYPE = console + +TARGET_NAME = umpnpmgr + +TARGET_INSTALLDIR = system32 + +TARGET_SDKLIBS = ntdll.a kernel32.a advapi32.a rpcrt4.a + +TARGET_OBJECTS = umpnpmgr.o + +TARGET_CFLAGS = -Wall -Werror -D__USE_W32API + +include $(PATH_TO_TOP)/rules.mak + +include $(TOOLS_PATH)/helper.mk + +# EOF diff --git a/reactos/services/umpnpmgr/umpnpmgr.c b/reactos/services/umpnpmgr/umpnpmgr.c new file mode 100644 index 00000000000..25a3d107bab --- /dev/null +++ b/reactos/services/umpnpmgr/umpnpmgr.c @@ -0,0 +1,147 @@ +/* + * ReactOS kernel + * Copyright (C) 2005 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* $Id$ + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS kernel + * FILE: services/umpnpmgr/umpnpmgr.c + * PURPOSE: User-mode Plug and Play manager + * PROGRAMMER: Eric Kohl + */ + +/* INCLUDES *****************************************************************/ + +#define UNICODE +#define _UNICODE + +#define NTOS_MODE_USER +#include +#include +#include +#include +#include +#include + +#include +#include + +#define DBG +#define NDEBUG +#include + + + +/* GLOBALS ******************************************************************/ + +static VOID CALLBACK +ServiceMain(DWORD argc, LPTSTR *argv); + +static SERVICE_TABLE_ENTRY ServiceTable[2] = +{ + {_T("PlugPlay"), ServiceMain}, + {NULL, NULL} +}; + + +/* FUNCTIONS *****************************************************************/ + +static DWORD WINAPI +PnpEventThread(LPVOID lpParameter) +{ + PPLUGPLAY_EVENT_BLOCK PnpEvent; + NTSTATUS Status; + RPC_STATUS RpcStatus; + + PnpEvent = HeapAlloc(GetProcessHeap(), 0, 1024); + if (PnpEvent == NULL) + return ERROR_OUTOFMEMORY; + + for (;;) + { + DPRINT("Calling NtGetPlugPlayEvent()\n"); + + ZeroMemory(PnpEvent, 1024); + + /* Wait for the next pnp event */ + Status = NtGetPlugPlayEvent(0, 0, PnpEvent, 1024); + if (!NT_SUCCESS(Status)) + { + DPRINT("NtPlugPlayEvent() failed (Status %lx)\n", Status); + break; + } + + DPRINT("Received PnP Event\n"); + if (UuidEqual((UUID*)&PnpEvent->EventGuid, (UUID*)&GUID_DEVICE_ARRIVAL, &RpcStatus)) + { + DPRINT1("Device arrival event: %S\n", PnpEvent->TargetDevice.DeviceIds); + } + else + { + DPRINT1("Unknown event\n"); + } + + /* FIXME: Process the pnp event */ + + + /* Dequeue the current pnp event and signal the next one */ + NtPlugPlayControl(PLUGPLAY_USER_RESPONSE, NULL, 0); + } + + HeapFree(GetProcessHeap(), 0, PnpEvent); + + return ERROR_SUCCESS; +} + + +static VOID CALLBACK +ServiceMain(DWORD argc, LPTSTR *argv) +{ + HANDLE hThread; + DWORD dwThreadId; + + DPRINT("ServiceMain() called\n"); + + hThread = CreateThread(NULL, + 0, + PnpEventThread, + NULL, + 0, + &dwThreadId); + if (hThread != NULL) + CloseHandle(hThread); + + DPRINT("ServiceMain() done\n"); +} + + +int +main(int argc, char *argv[]) +{ + DPRINT("Umpnpmgr: main() started\n"); + + StartServiceCtrlDispatcher(ServiceTable); + + DPRINT("Umpnpmgr: main() done\n"); + + ExitThread(0); + + return 0; +} + +/* EOF */ diff --git a/reactos/services/umpnpmgr/umpnpmgr.rc b/reactos/services/umpnpmgr/umpnpmgr.rc new file mode 100644 index 00000000000..9e3f836493b --- /dev/null +++ b/reactos/services/umpnpmgr/umpnpmgr.rc @@ -0,0 +1,4 @@ +#define REACTOS_STR_FILE_DESCRIPTION "User-Mode Plug and Play manager\0" +#define REACTOS_STR_INTERNAL_NAME "Umpnpmgr\0" +#define REACTOS_STR_ORIGINAL_FILENAME "Umpnpmgr.exe\0" +#include From ab73f037f8365a2bb13415a925e4a37c855efcb9 Mon Sep 17 00:00:00 2001 From: Thomas Bluemel Date: Sat, 5 Feb 2005 01:44:05 +0000 Subject: [PATCH 105/185] implemented GetConsoleProcessList() svn path=/trunk/; revision=13414 --- reactos/include/csrss/csrss.h | 27 ++++++++--- reactos/lib/kernel32/misc/console.c | 62 ++++++++++++++++++++++--- reactos/lib/ntdll/csr/lpc.c | 5 +- reactos/subsys/csrss/include/conio.h | 1 + reactos/subsys/csrss/win32csr/conio.c | 47 +++++++++++++++++++ reactos/subsys/csrss/win32csr/dllmain.c | 1 + 6 files changed, 129 insertions(+), 14 deletions(-) diff --git a/reactos/include/csrss/csrss.h b/reactos/include/csrss/csrss.h index d8376a2f6c4..ffcaf8d7f26 100644 --- a/reactos/include/csrss/csrss.h +++ b/reactos/include/csrss/csrss.h @@ -11,11 +11,11 @@ typedef __declspec(noreturn) VOID CALLBACK(*PCONTROLDISPATCHER)(DWORD); typedef struct { -} CSRSS_CONNECT_PROCESS_REQUEST, PCSRSS_CONNECT_PROCESS_REQUEST; +} CSRSS_CONNECT_PROCESS_REQUEST, *PCSRSS_CONNECT_PROCESS_REQUEST; typedef struct { -} CSRSS_CONNECT_PROCESS_REPLY, PCSRSS_CONNECT_PROCESS_REPLY; +} CSRSS_CONNECT_PROCESS_REPLY, *PCSRSS_CONNECT_PROCESS_REPLY; typedef struct { @@ -33,11 +33,23 @@ typedef struct typedef struct { -} CSRSS_TERMINATE_PROCESS_REQUEST, PCSRSS_TERMINATE_PROCESS_REQUEST; +} CSRSS_TERMINATE_PROCESS_REQUEST, *PCSRSS_TERMINATE_PROCESS_REQUEST; typedef struct { -} CSRSS_TERMINATE_PROCESS_REPLY, PCSRSS_TERMINATE_PROCESS_REPLY; +} CSRSS_TERMINATE_PROCESS_REPLY, *PCSRSS_TERMINATE_PROCESS_REPLY; + +typedef struct +{ + ULONG nMaxIds; +} CSRSS_GET_PROCESS_LIST_REQUEST, *PCSRSS_GET_PROCESS_LIST_REQUEST; + +typedef struct +{ + ULONG nProcessIdsCopied; + ULONG nProcessIdsTotal; + HANDLE ProcessId[1]; +} CSRSS_GET_PROCESS_LIST_REPLY, *PCSRSS_GET_PROCESS_LIST_REPLY; typedef struct { @@ -250,12 +262,12 @@ typedef struct typedef struct { HANDLE UniqueThread; -} CSRSS_IDENTIFY_ALERTABLE_THREAD_REQUEST, * PCSRSS_IDENTIFY_ALERTABLE_THREAD_REQUEST; +} CSRSS_IDENTIFY_ALERTABLE_THREAD_REQUEST, *PCSRSS_IDENTIFY_ALERTABLE_THREAD_REQUEST; typedef struct { CLIENT_ID Cid; -} CSRSS_IDENTIFY_ALERTABLE_THREAD_REPLY, * PCSRSS_IDENTIFY_ALERTABLE_THREAD_REPLY; +} CSRSS_IDENTIFY_ALERTABLE_THREAD_REPLY, *PCSRSS_IDENTIFY_ALERTABLE_THREAD_REPLY; typedef struct { @@ -687,6 +699,7 @@ typedef struct #define CSRSS_GET_CONSOLE_OUTPUT_CP (0x33) #define CSRSS_SET_CONSOLE_OUTPUT_CP (0x34) #define CSRSS_GET_INPUT_WAIT_HANDLE (0x35) +#define CSRSS_GET_PROCESS_LIST (0x36) /* Keep in sync with definition below. */ #define CSRSS_REQUEST_HEADER_SIZE (LPC_MESSAGE_BASE_SIZE + sizeof(ULONG)) @@ -752,6 +765,7 @@ typedef struct CSRSS_GET_CONSOLE_OUTPUT_CP_REQUEST GetConsoleOutputCodePage; CSRSS_SET_CONSOLE_OUTPUT_CP_REQUEST SetConsoleOutputCodePage; CSRSS_GET_INPUT_WAIT_HANDLE_REQUEST GetConsoleInputWaitHandle; + CSRSS_GET_PROCESS_LIST_REQUEST GetProcessListRequest; } Data; }; }; @@ -807,6 +821,7 @@ typedef struct CSRSS_GET_CONSOLE_OUTPUT_CP_REPLY GetConsoleOutputCodePage; CSRSS_SET_CONSOLE_OUTPUT_CP_REPLY SetConsoleOutputCodePage; CSRSS_GET_INPUT_WAIT_HANDLE_REPLY GetConsoleInputWaitHandle; + CSRSS_GET_PROCESS_LIST_REPLY GetProcessListReply; } Data; }; }; diff --git a/reactos/lib/kernel32/misc/console.c b/reactos/lib/kernel32/misc/console.c index 58e13ffea8a..742ee5b185f 100644 --- a/reactos/lib/kernel32/misc/console.c +++ b/reactos/lib/kernel32/misc/console.c @@ -1569,7 +1569,7 @@ IntPeekConsoleInput(HANDLE hConsoleInput, Size = nLength * sizeof(INPUT_RECORD); - Status = CsrCaptureParameterBuffer((PVOID)lpBuffer, Size, &BufferBase, &BufferTargetBase); + Status = CsrCaptureParameterBuffer(NULL, Size, &BufferBase, &BufferTargetBase); if(!NT_SUCCESS(Status)) { SetLastErrorByStatus(Status); @@ -1884,7 +1884,7 @@ IntReadConsoleOutput(HANDLE hConsoleOutput, Size = dwBufferSize.X * dwBufferSize.Y * sizeof(CHAR_INFO); - Status = CsrCaptureParameterBuffer((PVOID)lpBuffer, Size, &BufferBase, &BufferTargetBase); + Status = CsrCaptureParameterBuffer(NULL, Size, &BufferBase, &BufferTargetBase); if(!NT_SUCCESS(Status)) { SetLastErrorByStatus(Status); @@ -3327,15 +3327,63 @@ SetConsoleOutputCP( /*-------------------------------------------------------------- * GetConsoleProcessList * - * @unimplemented + * @implemented */ DWORD STDCALL GetConsoleProcessList(LPDWORD lpdwProcessList, - DWORD dwProcessCount) + DWORD dwProcessCount) { - DPRINT1("GetConsoleProcessList(0x%x, 0x%x) UNIMPLEMENTED!\n", lpdwProcessList, dwProcessCount); - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - return 0; + CSRSS_API_REQUEST Request; + PCSRSS_API_REPLY Reply; + ULONG BufferSize, nProcesses; + NTSTATUS Status; + + if(lpdwProcessList == NULL || dwProcessCount == 0) + { + SetLastError(ERROR_INVALID_PARAMETER); + return 0; + } + + BufferSize = sizeof(CSRSS_API_REQUEST) + + (dwProcessCount * sizeof(Reply->Data.GetProcessListReply.ProcessId[0])); + + Reply = RtlAllocateHeap(GetProcessHeap(), 0, BufferSize); + if(Reply == NULL) + { + SetLastError(ERROR_NOT_ENOUGH_MEMORY); + return 0; + } + + Reply->Status = STATUS_SUCCESS; + + Request.Type = CSRSS_GET_PROCESS_LIST; + Request.Data.GetProcessListRequest.nMaxIds = dwProcessCount; + + Status = CsrClientCallServer(&Request, Reply, sizeof(CSRSS_API_REQUEST), + BufferSize); + if (!NT_SUCCESS(Status) || !NT_SUCCESS(Status = Reply->Status)) + { + SetLastErrorByStatus (Status); + nProcesses = 0; + } + else + { + if(dwProcessCount >= Reply->Data.GetProcessListReply.nProcessIdsTotal) + { + nProcesses = Reply->Data.GetProcessListReply.nProcessIdsCopied; + for(nProcesses = 0; nProcesses < Reply->Data.GetProcessListReply.nProcessIdsCopied; nProcesses++) + { + *(lpdwProcessList++) = (DWORD)Reply->Data.GetProcessListReply.ProcessId[nProcesses]; + } + } + else + { + nProcesses = Reply->Data.GetProcessListReply.nProcessIdsTotal; + } + } + + RtlFreeHeap(GetProcessHeap(), 0, Reply); + return nProcesses; } diff --git a/reactos/lib/ntdll/csr/lpc.c b/reactos/lib/ntdll/csr/lpc.c index 1c63f07bd7d..81467b5d149 100644 --- a/reactos/lib/ntdll/csr/lpc.c +++ b/reactos/lib/ntdll/csr/lpc.c @@ -71,7 +71,10 @@ CsrCaptureParameterBuffer(PVOID ParameterBuffer, { return(STATUS_NO_MEMORY); } - memcpy(Block, ParameterBuffer, ParameterBufferSize); + if(ParameterBuffer != NULL) + { + memcpy(Block, ParameterBuffer, ParameterBufferSize); + } *ClientAddress = Block; *ServerAddress = Block - CsrSectionMapBase + CsrSectionMapServerBase; return(STATUS_SUCCESS); diff --git a/reactos/subsys/csrss/include/conio.h b/reactos/subsys/csrss/include/conio.h index 082fab28707..2f9fca25acb 100644 --- a/reactos/subsys/csrss/include/conio.h +++ b/reactos/subsys/csrss/include/conio.h @@ -139,6 +139,7 @@ CSR_API(CsrGetConsoleCodePage); CSR_API(CsrSetConsoleCodePage); CSR_API(CsrGetConsoleOutputCodePage); CSR_API(CsrSetConsoleOutputCodePage); +CSR_API(CsrGetProcessList); #define ConioInitScreenBuffer(Console, Buff) (Console)->Vtbl->InitScreenBuffer((Console), (Buff)) #define ConioDrawRegion(Console, Region) (Console)->Vtbl->DrawRegion((Console), (Region)) diff --git a/reactos/subsys/csrss/win32csr/conio.c b/reactos/subsys/csrss/win32csr/conio.c index c924c8755b6..4c82d872b59 100644 --- a/reactos/subsys/csrss/win32csr/conio.c +++ b/reactos/subsys/csrss/win32csr/conio.c @@ -3163,4 +3163,51 @@ CSR_API(CsrSetConsoleOutputCodePage) return Reply->Status = STATUS_UNSUCCESSFUL; } +CSR_API(CsrGetProcessList) +{ + PHANDLE Buffer; + PCSRSS_CONSOLE Console; + PCSRSS_PROCESS_DATA current; + PLIST_ENTRY current_entry; + ULONG nItems, nCopied; + NTSTATUS Status; + + DPRINT("CsrGetProcessList\n"); + + Buffer = Reply->Data.GetProcessListReply.ProcessId; + Reply->Header.MessageSize = sizeof(CSRSS_API_REPLY); + Reply->Header.DataSize = Reply->Header.MessageSize - LPC_MESSAGE_BASE_SIZE; + + nItems = nCopied = 0; + Reply->Data.GetProcessListReply.nProcessIdsCopied = 0; + Reply->Data.GetProcessListReply.nProcessIdsTotal = 0; + + Status = ConioConsoleFromProcessData(ProcessData, &Console); + if (! NT_SUCCESS(Status)) + { + return Reply->Status = Status; + } + + DPRINT1("Console_Api Ctrl-C\n"); + + for(current_entry = Console->ProcessList.Flink; + current_entry != &Console->ProcessList; + current_entry = current_entry->Flink) + { + current = CONTAINING_RECORD(current_entry, CSRSS_PROCESS_DATA, ProcessEntry); + if(nItems++ < Request->Data.GetProcessListRequest.nMaxIds) + { + *(Buffer++) = current->ProcessId; + nCopied++; + } + } + + ConioUnlockConsole(Console); + + Reply->Data.GetProcessListReply.nProcessIdsCopied = nCopied; + Reply->Data.GetProcessListReply.nProcessIdsTotal = nItems; + + return Reply->Status = STATUS_SUCCESS; +} + /* EOF */ diff --git a/reactos/subsys/csrss/win32csr/dllmain.c b/reactos/subsys/csrss/win32csr/dllmain.c index 7fd2f7b6c12..44da402f033 100644 --- a/reactos/subsys/csrss/win32csr/dllmain.c +++ b/reactos/subsys/csrss/win32csr/dllmain.c @@ -71,6 +71,7 @@ static CSRSS_API_DEFINITION Win32CsrApiDefinitions[] = CSRSS_DEFINE_API(CSRSS_SET_CONSOLE_CP, CsrSetConsoleCodePage), CSRSS_DEFINE_API(CSRSS_GET_CONSOLE_OUTPUT_CP, CsrGetConsoleOutputCodePage), CSRSS_DEFINE_API(CSRSS_SET_CONSOLE_OUTPUT_CP, CsrSetConsoleOutputCodePage), + CSRSS_DEFINE_API(CSRSS_GET_PROCESS_LIST, CsrGetProcessList), { 0, 0, 0, NULL } }; From c7bf3eead373961d944c21fee6aa84f7cdefca51 Mon Sep 17 00:00:00 2001 From: Art Yerkes Date: Sat, 5 Feb 2005 04:56:04 +0000 Subject: [PATCH 106/185] Fixed some signalling problems. 1) Always OR the current state bits into the socket for the handler to see 2) Remove special case for SEL_CONNECT | SEL_FIN in the signalled handler. Now it's much cleaner. svn path=/trunk/; revision=13415 --- reactos/drivers/lib/ip/transport/tcp/event.c | 3 +- reactos/drivers/lib/ip/transport/tcp/tcp.c | 40 ++++++++++++-------- 2 files changed, 26 insertions(+), 17 deletions(-) diff --git a/reactos/drivers/lib/ip/transport/tcp/event.c b/reactos/drivers/lib/ip/transport/tcp/event.c index 401d4444b9c..d22ed771af8 100644 --- a/reactos/drivers/lib/ip/transport/tcp/event.c +++ b/reactos/drivers/lib/ip/transport/tcp/event.c @@ -41,9 +41,10 @@ int TCPSocketState(void *ClientData, TI_DbgPrint(MID_TRACE,("Connection signalled: %d\n", Connection->Signalled)); + + Connection->SignalState |= NewState; if( !Connection->Signalled ) { Connection->Signalled = TRUE; - Connection->SignalState = NewState; InsertTailList( &SignalledConnections, &Connection->SignalList ); } diff --git a/reactos/drivers/lib/ip/transport/tcp/tcp.c b/reactos/drivers/lib/ip/transport/tcp/tcp.c index ea0b90c2918..167add772ee 100644 --- a/reactos/drivers/lib/ip/transport/tcp/tcp.c +++ b/reactos/drivers/lib/ip/transport/tcp/tcp.c @@ -34,24 +34,31 @@ static VOID HandleSignalledConnection( PCONNECTION_ENDPOINT Connection, Connection, Connection->SocketContext)); /* Things that can happen when we try the initial connection */ - if( ((NewState & SEL_CONNECT) || (NewState & SEL_FIN)) && - !(Connection->State & (SEL_CONNECT | SEL_FIN)) ) { - + if( NewState & SEL_CONNECT ) { while( !IsListEmpty( &Connection->ConnectRequest ) ) { - Connection->State |= NewState & (SEL_CONNECT | SEL_FIN); - Entry = RemoveHeadList( &Connection->ConnectRequest ); - Bucket = CONTAINING_RECORD( Entry, TDI_BUCKET, Entry ); - Complete = Bucket->Request.RequestNotifyObject; - TI_DbgPrint(DEBUG_TCP, - ("Completing Connect Request %x\n", Bucket->Request)); - if( NewState & SEL_FIN ) Status = STATUS_CONNECTION_REFUSED; - Complete( Bucket->Request.RequestContext, Status, 0 ); - /* Frees the bucket allocated in TCPConnect */ - PoolFreeBuffer( Bucket ); - } + Connection->State |= NewState; + Entry = RemoveHeadList( &Connection->ConnectRequest ); + TI_DbgPrint(DEBUG_TCP, ("Connect Event\n")); + + Bucket = CONTAINING_RECORD( Entry, TDI_BUCKET, Entry ); + Complete = Bucket->Request.RequestNotifyObject; + TI_DbgPrint(DEBUG_TCP, + ("Completing Request %x\n", Bucket->Request)); + + if( (NewState & (SEL_CONNECT | SEL_FIN)) == + (SEL_CONNECT | SEL_FIN) ) + Status = STATUS_CONNECTION_REFUSED; + else + Status = STATUS_SUCCESS; + + Complete( Bucket->Request.RequestContext, Status, 0 ); + + /* Frees the bucket allocated in TCPConnect */ + PoolFreeBuffer( Bucket ); + } } - if( (NewState & SEL_ACCEPT) ) { + if( NewState & SEL_ACCEPT ) { /* Handle readable on a listening socket -- * TODO: Implement filtering */ @@ -88,7 +95,7 @@ static VOID HandleSignalledConnection( PCONNECTION_ENDPOINT Connection, } /* Things that happen after we're connected */ - if( (NewState & SEL_READ) ) { + if( NewState & SEL_READ ) { TI_DbgPrint(DEBUG_TCP,("Readable: irp list %s\n", IsListEmpty(&Connection->ReceiveRequest) ? "empty" : "nonempty")); @@ -146,6 +153,7 @@ static VOID HandleSignalledConnection( PCONNECTION_ENDPOINT Connection, } } } + if( NewState & SEL_FIN ) { TI_DbgPrint(DEBUG_TCP, ("EOF From socket\n")); From 41918c75777ebfb4150d9592eeaa213b842fc720 Mon Sep 17 00:00:00 2001 From: Art Yerkes Date: Sat, 5 Feb 2005 05:40:35 +0000 Subject: [PATCH 107/185] Read: Change AFD_EVENT_CLOSE to AFD_EVENT_DISCONNECT when the other end hangs up. The socket isn't closed yet. Listen: Turn off fired flag for AFD_EVENT_ACCEPT. svn path=/trunk/; revision=13416 --- reactos/drivers/net/afd/afd/listen.c | 2 ++ reactos/drivers/net/afd/afd/read.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/reactos/drivers/net/afd/afd/listen.c b/reactos/drivers/net/afd/afd/listen.c index 70a354fe85d..26ef02e0fe7 100644 --- a/reactos/drivers/net/afd/afd/listen.c +++ b/reactos/drivers/net/afd/afd/listen.c @@ -242,6 +242,8 @@ NTSTATUS AfdAccept( PDEVICE_OBJECT DeviceObject, PIRP Irp, if( !SocketAcquireStateLock( FCB ) ) return LostSocket( Irp, TRUE ); + FCB->EventsFired &= ~AFD_EVENT_ACCEPT; + if( FCB->NeedsNewListen ) { AFD_DbgPrint(MID_TRACE,("ADDRESSFILE: %x\n", FCB->AddressFile.Handle)); diff --git a/reactos/drivers/net/afd/afd/read.c b/reactos/drivers/net/afd/afd/read.c index 827d5a0fb4e..8437c2761a5 100644 --- a/reactos/drivers/net/afd/afd/read.c +++ b/reactos/drivers/net/afd/afd/read.c @@ -131,7 +131,7 @@ static VOID ProcessClose( PAFD_FCB FCB ) { } /* Handle closing signal */ - FCB->PollState |= AFD_EVENT_CLOSE; + FCB->PollState |= AFD_EVENT_DISCONNECT; PollReeval( FCB->DeviceExt, FCB->FileObject ); } From 92a177947370e0134602164b8da8b158806612a5 Mon Sep 17 00:00:00 2001 From: Filip Navara Date: Sat, 5 Feb 2005 08:43:52 +0000 Subject: [PATCH 108/185] Use CONTAINING_RECORD macro instead of type cast, fix the copyright header. svn path=/trunk/; revision=13417 --- reactos/ntoskrnl/io/plugplay.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/reactos/ntoskrnl/io/plugplay.c b/reactos/ntoskrnl/io/plugplay.c index 810a6d597fa..4160efd6d2a 100644 --- a/reactos/ntoskrnl/io/plugplay.c +++ b/reactos/ntoskrnl/io/plugplay.c @@ -5,7 +5,7 @@ * FILE: ntoskrnl/io/plugplay.c * PURPOSE: Plug-and-play interface routines * - * PROGRAMMERS: David Welch (welch@mcmail.com) + * PROGRAMMERS: Eric Kohl */ /* INCLUDES *****************************************************************/ @@ -146,7 +146,9 @@ NtGetPlugPlayEvent(IN ULONG Reserved1, } /* Get entry from the tail of the queue */ - Entry = (PPNP_EVENT_ENTRY)IopPnpEventQueueHead.Blink; + Entry = CONTAINING_RECORD(IopPnpEventQueueHead.Blink, + PNP_EVENT_ENTRY, + ListEntry); /* Check the buffer size */ if (BufferLength < Entry->Event.TotalSize) From e83557fa58f0ec96f98f7bca09220dd0d50bc2d2 Mon Sep 17 00:00:00 2001 From: Filip Navara Date: Sat, 5 Feb 2005 08:44:49 +0000 Subject: [PATCH 109/185] Dynamically reallocate the buffer for PnP event if it's too small. svn path=/trunk/; revision=13418 --- reactos/services/umpnpmgr/umpnpmgr.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/reactos/services/umpnpmgr/umpnpmgr.c b/reactos/services/umpnpmgr/umpnpmgr.c index 25a3d107bab..bb9ce0a797c 100644 --- a/reactos/services/umpnpmgr/umpnpmgr.c +++ b/reactos/services/umpnpmgr/umpnpmgr.c @@ -65,10 +65,12 @@ static DWORD WINAPI PnpEventThread(LPVOID lpParameter) { PPLUGPLAY_EVENT_BLOCK PnpEvent; + ULONG PnpEventSize; NTSTATUS Status; RPC_STATUS RpcStatus; - PnpEvent = HeapAlloc(GetProcessHeap(), 0, 1024); + PnpEventSize = 0x1000; + PnpEvent = HeapAlloc(GetProcessHeap(), 0, PnpEventSize); if (PnpEvent == NULL) return ERROR_OUTOFMEMORY; @@ -76,10 +78,17 @@ PnpEventThread(LPVOID lpParameter) { DPRINT("Calling NtGetPlugPlayEvent()\n"); - ZeroMemory(PnpEvent, 1024); - /* Wait for the next pnp event */ Status = NtGetPlugPlayEvent(0, 0, PnpEvent, 1024); + /* Resize the buffer for the PnP event if it's too small. */ + if (Status == STATUS_BUFFER_TOO_SMALL) + { + PnpEventSize += 0x400; + PnpEvent = HeapReAlloc(GetProcessHeap(), 0, PnpEvent, PnpEventSize); + if (PnpEvent == NULL) + return ERROR_OUTOFMEMORY; + continue; + } if (!NT_SUCCESS(Status)) { DPRINT("NtPlugPlayEvent() failed (Status %lx)\n", Status); @@ -87,7 +96,7 @@ PnpEventThread(LPVOID lpParameter) } DPRINT("Received PnP Event\n"); - if (UuidEqual((UUID*)&PnpEvent->EventGuid, (UUID*)&GUID_DEVICE_ARRIVAL, &RpcStatus)) + if (UuidEqual(&PnpEvent->EventGuid, (UUID*)&GUID_DEVICE_ARRIVAL, &RpcStatus)) { DPRINT1("Device arrival event: %S\n", PnpEvent->TargetDevice.DeviceIds); } @@ -98,7 +107,6 @@ PnpEventThread(LPVOID lpParameter) /* FIXME: Process the pnp event */ - /* Dequeue the current pnp event and signal the next one */ NtPlugPlayControl(PLUGPLAY_USER_RESPONSE, NULL, 0); } From a1c0a3b1d6d807ec17b6920440e1885656cdf0cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20van=20Geldorp?= Date: Sat, 5 Feb 2005 10:17:33 +0000 Subject: [PATCH 110/185] Silence debug messages svn path=/trunk/; revision=13419 --- reactos/lib/mmdrv/Makefile | 2 +- reactos/lib/mmdrv/auxil.c | 4 +++- reactos/lib/mmdrv/entry.c | 26 +++++++++++---------- reactos/lib/mmdrv/midi.c | 46 ++++++++++++++++++++------------------ reactos/lib/mmdrv/mmdrv.h | 2 ++ reactos/lib/mmdrv/utils.c | 16 +++++++------ reactos/lib/mmdrv/wave.c | 37 ++++++++++++++++-------------- 7 files changed, 73 insertions(+), 60 deletions(-) diff --git a/reactos/lib/mmdrv/Makefile b/reactos/lib/mmdrv/Makefile index cff30e3f81e..fc7a55b3d14 100644 --- a/reactos/lib/mmdrv/Makefile +++ b/reactos/lib/mmdrv/Makefile @@ -14,7 +14,7 @@ TARGET_CFLAGS += -DUNICODE -D_UNICODE -Wall -Werror TARGET_LFLAGS = -TARGET_SDKLIBS = winmm.a +TARGET_SDKLIBS = winmm.a ntdll.a TARGET_BASE = $(TARGET_BASE_LIB_MMDRV) diff --git a/reactos/lib/mmdrv/auxil.c b/reactos/lib/mmdrv/auxil.c index 4d1ea8b4f05..4bbcc522eef 100644 --- a/reactos/lib/mmdrv/auxil.c +++ b/reactos/lib/mmdrv/auxil.c @@ -12,6 +12,8 @@ #include "mmdrv.h" +#define NDEBUG +#include APIENTRY DWORD auxMessage(UINT uDevice, UINT uMessage, @@ -20,7 +22,7 @@ APIENTRY DWORD auxMessage(UINT uDevice, DWORD dwParam2) { - printf("auxMessage\n"); + DPRINT("auxMessage\n"); // the following cases are documented by DDK switch (uMessage) diff --git a/reactos/lib/mmdrv/entry.c b/reactos/lib/mmdrv/entry.c index 09428ed81c3..d2beefe0e89 100644 --- a/reactos/lib/mmdrv/entry.c +++ b/reactos/lib/mmdrv/entry.c @@ -14,6 +14,8 @@ #include "mmdrv.h" +#define NDEBUG +#include #define EXPORT __declspec(dllexport) @@ -22,14 +24,14 @@ CRITICAL_SECTION DriverSection; APIENTRY LONG DriverProc(DWORD DriverID, HANDLE DriverHandle, UINT Message, LONG Param1, LONG Param2) { - printf("DriverProc\n"); + DPRINT("DriverProc\n"); // HINSTANCE Module; switch(Message) { case DRV_LOAD : - printf("DRV_LOAD\n"); + DPRINT("DRV_LOAD\n"); return TRUE; // dont need to do any more /* Module = GetDriverModuleHandle(DriverHandle); @@ -56,7 +58,7 @@ APIENTRY LONG DriverProc(DWORD DriverID, HANDLE DriverHandle, UINT Message, // return 1L; case DRV_FREE : - printf("DRV_FREE\n"); + DPRINT("DRV_FREE\n"); // TerminateMidi(); // TerminateWave(); @@ -65,35 +67,35 @@ APIENTRY LONG DriverProc(DWORD DriverID, HANDLE DriverHandle, UINT Message, return 1L; case DRV_OPEN : - printf("DRV_OPEN\n"); + DPRINT("DRV_OPEN\n"); return 1L; case DRV_CLOSE : - printf("DRV_CLOSE\n"); + DPRINT("DRV_CLOSE\n"); return 1L; case DRV_ENABLE : - printf("DRV_ENABLE\n"); + DPRINT("DRV_ENABLE\n"); return 1L; case DRV_DISABLE : - printf("DRV_DISABLE\n"); + DPRINT("DRV_DISABLE\n"); return 1L; case DRV_QUERYCONFIGURE : - printf("DRV_QUERYCONFIGURE\n"); + DPRINT("DRV_QUERYCONFIGURE\n"); return 0L; case DRV_CONFIGURE : - printf("DRV_CONFIGURE\n"); + DPRINT("DRV_CONFIGURE\n"); return 0L; case DRV_INSTALL : - printf("DRV_INSTALL\n"); + DPRINT("DRV_INSTALL\n"); return DRVCNF_RESTART; default : - printf("?\n"); + DPRINT("?\n"); return DefDriverProc(DriverID, DriverHandle, Message, Param1, Param2); }; } @@ -101,7 +103,7 @@ APIENTRY LONG DriverProc(DWORD DriverID, HANDLE DriverHandle, UINT Message, BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD Reason, LPVOID Reserved) { - printf("DllMain called!\n"); + DPRINT("DllMain called!\n"); if (Reason == DLL_PROCESS_ATTACH) { diff --git a/reactos/lib/mmdrv/midi.c b/reactos/lib/mmdrv/midi.c index 083c38c12e2..c4e22bb65c8 100644 --- a/reactos/lib/mmdrv/midi.c +++ b/reactos/lib/mmdrv/midi.c @@ -11,6 +11,8 @@ #include "mmdrv.h" +#define NDEBUG +#include // MIDI device instance information // @@ -66,7 +68,7 @@ static DWORD OpenMidiDevice(UINT DeviceType, DWORD ID, DWORD User, DWORD Param1, MMRESULT Result = MMSYSERR_NOERROR; // Check ID? - printf("OpenMidiDevice()\n"); + DPRINT("OpenMidiDevice()\n"); switch(DeviceType) { @@ -119,7 +121,7 @@ static DWORD WriteMidi(PBYTE pData, ULONG Length, PMIDIALLOC pClient) { DWORD BytesReturned; - printf("IOCTL_MIDI_PLAY == %d [%x]\n", IOCTL_MIDI_PLAY, IOCTL_MIDI_PLAY); + DPRINT("IOCTL_MIDI_PLAY == %d [%x]\n", IOCTL_MIDI_PLAY, IOCTL_MIDI_PLAY); if ( !DeviceIoControl(pClient->DeviceHandle, IOCTL_MIDI_PLAY, (PVOID)pData, Length, NULL, 0, &BytesReturned, NULL)) @@ -174,40 +176,40 @@ static int GetMidiLength(PMIDIALLOC pClient, BYTE b) APIENTRY DWORD midMessage(DWORD dwId, DWORD dwMessage, DWORD dwUser, DWORD dwParam1, DWORD dwParam2) { - printf("midMessage\n"); + DPRINT("midMessage\n"); return MMSYSERR_NOERROR; switch (dwMessage) { case MIDM_GETNUMDEVS: - printf("MIDM_GETNUMDEVS"); + DPRINT("MIDM_GETNUMDEVS"); return 0; case MIDM_GETDEVCAPS: - printf("MIDM_GETDEVCAPS"); + DPRINT("MIDM_GETDEVCAPS"); return MMSYSERR_NOERROR; case MIDM_OPEN: - printf("MIDM_OPEN"); + DPRINT("MIDM_OPEN"); return MMSYSERR_NOERROR; case MIDM_CLOSE: - printf("MIDM_CLOSE"); + DPRINT("MIDM_CLOSE"); return MMSYSERR_NOERROR; case MIDM_ADDBUFFER: - printf("MIDM_ADDBUFFER"); + DPRINT("MIDM_ADDBUFFER"); return MMSYSERR_NOERROR; case MIDM_STOP: - printf("MIDM_PAUSE"); + DPRINT("MIDM_PAUSE"); return MMSYSERR_NOERROR; case MIDM_START: - printf("MIDM_RESTART"); + DPRINT("MIDM_RESTART"); return MMSYSERR_NOERROR; case MIDM_RESET: - printf("MIDM_RESET"); + DPRINT("MIDM_RESET"); return MMSYSERR_NOERROR; default: @@ -221,27 +223,27 @@ APIENTRY DWORD midMessage(DWORD dwId, DWORD dwMessage, DWORD dwUser, DWORD dwPar APIENTRY DWORD modMessage(DWORD ID, DWORD Message, DWORD User, DWORD Param1, DWORD Param2) { - printf("modMessage\n"); + DPRINT("modMessage\n"); switch(Message) { case MODM_GETNUMDEVS: - printf("MODM_GETNUMDEVS == %d\n", (int)GetDeviceCount(MidiOutDevice)); + DPRINT("MODM_GETNUMDEVS == %d\n", (int)GetDeviceCount(MidiOutDevice)); return GetDeviceCount(MidiOutDevice); case MODM_GETDEVCAPS: - printf("MODM_GETDEVCAPS"); + DPRINT("MODM_GETDEVCAPS"); return MMSYSERR_NOTSUPPORTED; case MODM_OPEN : return OpenMidiDevice(MidiOutDevice, ID, User, Param1, Param2); case MODM_CLOSE: - printf("MODM_CLOSE"); + DPRINT("MODM_CLOSE"); return MMSYSERR_NOTSUPPORTED; case MODM_DATA: - printf("MODM_DATA"); + DPRINT("MODM_DATA"); int i; BYTE b[4]; @@ -253,27 +255,27 @@ APIENTRY DWORD modMessage(DWORD ID, DWORD Message, DWORD User, DWORD Param1, DWO (PMIDIALLOC)User); case MODM_LONGDATA: - printf("MODM_LONGDATA"); + DPRINT("MODM_LONGDATA"); return MMSYSERR_NOTSUPPORTED; case MODM_RESET: - printf("MODM_RESET"); + DPRINT("MODM_RESET"); return MMSYSERR_NOTSUPPORTED; case MODM_SETVOLUME: - printf("MODM_SETVOLUME"); + DPRINT("MODM_SETVOLUME"); return MMSYSERR_NOTSUPPORTED; case MODM_GETVOLUME: - printf("MODM_GETVOLUME"); + DPRINT("MODM_GETVOLUME"); return MMSYSERR_NOTSUPPORTED; case MODM_CACHEPATCHES: - printf("MODM_CACHEPATCHES"); + DPRINT("MODM_CACHEPATCHES"); return MMSYSERR_NOTSUPPORTED; case MODM_CACHEDRUMPATCHES: - printf("MODM_CACHEDRUMPATCHES"); + DPRINT("MODM_CACHEDRUMPATCHES"); return MMSYSERR_NOTSUPPORTED; }; diff --git a/reactos/lib/mmdrv/mmdrv.h b/reactos/lib/mmdrv/mmdrv.h index 6891333fadb..f9211d362a4 100644 --- a/reactos/lib/mmdrv/mmdrv.h +++ b/reactos/lib/mmdrv/mmdrv.h @@ -31,6 +31,8 @@ #include "mmdef.h" +ULONG DbgPrint(PCH Format, ...); + /* #define SOUND_MAX_DEVICE_NAME 1024 // GUESSWORK #define SOUND_MAX_DEVICES 256 // GUESSWORK diff --git a/reactos/lib/mmdrv/utils.c b/reactos/lib/mmdrv/utils.c index e335d53b581..e97fc004a10 100644 --- a/reactos/lib/mmdrv/utils.c +++ b/reactos/lib/mmdrv/utils.c @@ -11,6 +11,8 @@ #include "mmdrv.h" +#define NDEBUG +#include typedef struct _DEVICE_LIST { @@ -59,7 +61,7 @@ DWORD TranslateStatus(void) MMRESULT OpenDevice(UINT DeviceType, DWORD ID, PHANDLE pDeviceHandle, DWORD Access) { - printf("OpenDevice()\n"); + DPRINT("OpenDevice()\n"); WCHAR DeviceName[SOUND_MAX_DEVICE_NAME]; *pDeviceHandle = INVALID_HANDLE_VALUE; @@ -84,13 +86,13 @@ MMRESULT OpenDevice(UINT DeviceType, DWORD ID, PHANDLE pDeviceHandle, wsprintf(DeviceName, L"\\\\.%ls%d", AUX_DEVICE_NAME_U + strlen("\\Device"), ID); }; - printf("Attempting to open %S\n", DeviceName); + DPRINT("Attempting to open %S\n", DeviceName); *pDeviceHandle = CreateFile(DeviceName, Access, FILE_SHARE_WRITE, NULL, OPEN_EXISTING, Access != GENERIC_READ ? FILE_FLAG_OVERLAPPED : 0, NULL); - printf("DeviceHandle == 0x%x\n", (int)*pDeviceHandle); + DPRINT("DeviceHandle == 0x%x\n", (int)*pDeviceHandle); if (pDeviceHandle == INVALID_HANDLE_VALUE) return TranslateStatus(); @@ -107,7 +109,7 @@ BOOL AddDeviceToList(PDEVICE_LIST* pList, DWORD DeviceType, DWORD CardIndex, { PDEVICE_LIST pNewDevice; - printf("AddDeviceToList()\n"); + DPRINT("AddDeviceToList()\n"); pNewDevice = (PDEVICE_LIST) HeapAlloc(Heap, 0, sizeof(DEVICE_LIST) + lstrlen(Name) * sizeof(WCHAR)); @@ -125,7 +127,7 @@ BOOL AddDeviceToList(PDEVICE_LIST* pList, DWORD DeviceType, DWORD CardIndex, pNewDevice->Next = *pList; *pList = pNewDevice; - printf("Success!\n"); + DPRINT("Success!\n"); return TRUE; } @@ -135,7 +137,7 @@ VOID FreeDeviceList() { PDEVICE_LIST pDevice; - printf("FreeDeviceList()\n"); + DPRINT("FreeDeviceList()\n"); while (DeviceList) { @@ -155,7 +157,7 @@ MMRESULT FindDevices() // DWORD Index; // HKEY DriverKey; - printf("Finding devices\n"); + DPRINT("Finding devices\n"); // DriverKey = OpenParametersKey(); // see drvutil.c of MS DDK for how this SHOULD be done... diff --git a/reactos/lib/mmdrv/wave.c b/reactos/lib/mmdrv/wave.c index d3f3d1cbc38..5816d245cc8 100644 --- a/reactos/lib/mmdrv/wave.c +++ b/reactos/lib/mmdrv/wave.c @@ -14,6 +14,9 @@ #include "mmdrv.h" #include "wave.h" +#define NDEBUG +#include + /* ============================ * INTERNAL * functions start here @@ -144,23 +147,23 @@ APIENTRY DWORD wodMessage(DWORD dwId, DWORD dwMessage, DWORD dwUser, DWORD dwPar { switch (dwMessage) { case WODM_GETNUMDEVS: - printf("WODM_GETNUMDEVS"); + DPRINT("WODM_GETNUMDEVS"); return GetDeviceCount(WaveOutDevice); case WODM_GETDEVCAPS: - printf("WODM_GETDEVCAPS"); + DPRINT("WODM_GETDEVCAPS"); return GetDeviceCapabilities(dwId, WaveOutDevice, (LPBYTE)dwParam1, (DWORD)dwParam2); case WODM_OPEN: - printf("WODM_OPEN"); + DPRINT("WODM_OPEN"); return OpenWaveDevice(WaveOutDevice, dwId, dwUser, dwParam1, dwParam2); case WODM_CLOSE: { MMRESULT Result; PWAVEALLOC pTask = (PWAVEALLOC)dwUser; - printf("WODM_CLOSE"); + DPRINT("WODM_CLOSE"); // 1. Check if the task is ready to complete Result = ThreadCallWaveDevice(WaveThreadClose, pTask); @@ -186,7 +189,7 @@ APIENTRY DWORD wodMessage(DWORD dwId, DWORD dwMessage, DWORD dwUser, DWORD dwPar { LPWAVEHDR pWaveHdr = (LPWAVEHDR)dwParam1; - printf("WODM_WRITE"); + DPRINT("WODM_WRITE"); if (dwParam1 != 0) return MMSYSERR_INVALPARAM; @@ -215,37 +218,37 @@ APIENTRY DWORD wodMessage(DWORD dwId, DWORD dwMessage, DWORD dwUser, DWORD dwPar case WODM_PAUSE: - printf("WODM_PAUSE"); + DPRINT("WODM_PAUSE"); ((PWAVEALLOC)dwUser)->AuxParam.State = WAVE_DD_STOP; return ThreadCallWaveDevice(WaveThreadSetState, (PWAVEALLOC)dwUser); case WODM_RESTART: - printf("WODM_RESTART"); + DPRINT("WODM_RESTART"); ((PWAVEALLOC)dwUser)->AuxParam.State = WAVE_DD_PLAY; return ThreadCallWaveDevice(WaveThreadSetState, (PWAVEALLOC)dwUser); case WODM_RESET: - printf("WODM_RESET"); + DPRINT("WODM_RESET"); ((PWAVEALLOC)dwUser)->AuxParam.State = WAVE_DD_RESET; return ThreadCallWaveDevice(WaveThreadSetState, (PWAVEALLOC)dwUser); case WODM_BREAKLOOP: - printf("WODM_BREAKLOOP"); + DPRINT("WODM_BREAKLOOP"); return ThreadCallWaveDevice(WaveThreadBreakLoop, (PWAVEALLOC)dwUser); case WODM_GETPOS: - printf("WODM_GETPOS"); + DPRINT("WODM_GETPOS"); return GetPositionWaveDevice(((PWAVEALLOC)dwUser), (LPMMTIME)dwParam1, dwParam2); case WODM_SETPITCH: - printf("WODM_SETPITCH"); + DPRINT("WODM_SETPITCH"); ((PWAVEALLOC)dwUser)->AuxParam.GetSetData.pData = (PBYTE)&dwParam1; ((PWAVEALLOC)dwUser)->AuxParam.GetSetData.DataLen = sizeof(DWORD); ((PWAVEALLOC)dwUser)->AuxParam.GetSetData.Function = IOCTL_WAVE_SET_PITCH; return ThreadCallWaveDevice(WaveThreadSetData, ((PWAVEALLOC)dwUser)); case WODM_SETVOLUME: - printf("WODM_SETVOLUME"); + DPRINT("WODM_SETVOLUME"); { WAVE_DD_VOLUME Vol; Vol.Left = LOWORD(dwParam1) << 16; @@ -256,21 +259,21 @@ APIENTRY DWORD wodMessage(DWORD dwId, DWORD dwMessage, DWORD dwUser, DWORD dwPar } case WODM_SETPLAYBACKRATE: - printf("WODM_SETPLAYBACKRATE"); + DPRINT("WODM_SETPLAYBACKRATE"); ((PWAVEALLOC)dwUser)->AuxParam.GetSetData.pData = (PBYTE)&dwParam1; ((PWAVEALLOC)dwUser)->AuxParam.GetSetData.DataLen = sizeof(DWORD); ((PWAVEALLOC)dwUser)->AuxParam.GetSetData.Function = IOCTL_WAVE_SET_PLAYBACK_RATE; return ThreadCallWaveDevice(WaveThreadSetData, (PWAVEALLOC)dwUser); case WODM_GETPITCH: - printf("WODM_GETPITCH"); + DPRINT("WODM_GETPITCH"); ((PWAVEALLOC)dwUser)->AuxParam.GetSetData.pData = (PBYTE)dwParam1; ((PWAVEALLOC)dwUser)->AuxParam.GetSetData.DataLen = sizeof(DWORD); ((PWAVEALLOC)dwUser)->AuxParam.GetSetData.Function = IOCTL_WAVE_GET_PITCH; return ThreadCallWaveDevice(WaveThreadGetData, (PWAVEALLOC)dwUser); case WODM_GETVOLUME: - printf("WODM_GETVOLUME"); + DPRINT("WODM_GETVOLUME"); { WAVE_DD_VOLUME Vol; DWORD res; @@ -285,7 +288,7 @@ APIENTRY DWORD wodMessage(DWORD dwId, DWORD dwMessage, DWORD dwUser, DWORD dwPar } case WODM_GETPLAYBACKRATE: - printf("WODM_GETPLAYBACKRATE"); + DPRINT("WODM_GETPLAYBACKRATE"); ((PWAVEALLOC)dwUser)->AuxParam.GetSetData.pData = (PBYTE)dwParam1; ((PWAVEALLOC)dwUser)->AuxParam.GetSetData.DataLen = sizeof(DWORD); ((PWAVEALLOC)dwUser)->AuxParam.GetSetData.Function = IOCTL_WAVE_GET_PLAYBACK_RATE; @@ -305,7 +308,7 @@ APIENTRY DWORD wodMessage(DWORD dwId, DWORD dwMessage, DWORD dwUser, DWORD dwPar */ APIENTRY DWORD widMessage(DWORD dwId, DWORD dwMessage, DWORD dwUser, DWORD dwParam1, DWORD dwParam2) { - printf("widMessage\n"); + DPRINT("widMessage\n"); switch (dwMessage) { case WIDM_GETNUMDEVS: From 7cd9c866762f0bef5b35235796150d577175f1b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20van=20Geldorp?= Date: Sat, 5 Feb 2005 10:19:49 +0000 Subject: [PATCH 111/185] Convert ROP2 to MIX when calling driver svn path=/trunk/; revision=13420 --- reactos/subsys/win32k/eng/lineto.c | 10 +++++----- reactos/subsys/win32k/include/inteng.h | 2 +- reactos/subsys/win32k/objects/dc.c | 3 ++- reactos/subsys/win32k/objects/fillshap.c | 18 ++++++++++-------- reactos/subsys/win32k/objects/line.c | 4 ++-- 5 files changed, 20 insertions(+), 17 deletions(-) diff --git a/reactos/subsys/win32k/eng/lineto.c b/reactos/subsys/win32k/eng/lineto.c index dd473ec49ef..27785358a2d 100644 --- a/reactos/subsys/win32k/eng/lineto.c +++ b/reactos/subsys/win32k/eng/lineto.c @@ -488,7 +488,7 @@ IntEngLineTo(BITMAPOBJ *DestObj, LONG x2, LONG y2, RECTL *RectBounds, - MIX mix) + MIX Mix) { BOOLEAN ret; SURFOBJ *DestSurf; @@ -524,7 +524,7 @@ IntEngLineTo(BITMAPOBJ *DestObj, { /* Call the driver's DrvLineTo */ ret = GDIDEVFUNCS(DestSurf).LineTo( - DestSurf, Clip, Brush, x1, y1, x2, y2, /*RectBounds*/&b, mix); + DestSurf, Clip, Brush, x1, y1, x2, y2, /*RectBounds*/&b, Mix); } #if 0 @@ -536,7 +536,7 @@ IntEngLineTo(BITMAPOBJ *DestObj, if (! ret) { - ret = EngLineTo(DestSurf, Clip, Brush, x1, y1, x2, y2, RectBounds, mix); + ret = EngLineTo(DestSurf, Clip, Brush, x1, y1, x2, y2, RectBounds, Mix); } MouseSafetyOnDrawEnd(DestSurf); @@ -550,7 +550,7 @@ IntEngPolyline(BITMAPOBJ *DestObj, BRUSHOBJ *Brush, CONST LPPOINT pt, LONG dCount, - MIX mix) + MIX Mix) { LONG i; RECTL rect; @@ -571,7 +571,7 @@ IntEngPolyline(BITMAPOBJ *DestObj, pt[i].x, pt[i].y, &rect, - mix); + Mix); if (!ret) { break; diff --git a/reactos/subsys/win32k/include/inteng.h b/reactos/subsys/win32k/include/inteng.h index 7d7bd75ffc4..63e31a7ce4c 100644 --- a/reactos/subsys/win32k/include/inteng.h +++ b/reactos/subsys/win32k/include/inteng.h @@ -32,7 +32,7 @@ VOID FASTCALL IntEngCleanupDriverObjs(struct _EPROCESS *Process, PW32PROCESS Win32Process); - +#define ROP2_TO_MIX(Rop2) (((Rop2) << 8) | (Rop2)) BOOL STDCALL IntEngLineTo(BITMAPOBJ *Surface, CLIPOBJ *Clip, diff --git a/reactos/subsys/win32k/objects/dc.c b/reactos/subsys/win32k/objects/dc.c index 65c9cd3e170..ad19cee6efd 100644 --- a/reactos/subsys/win32k/objects/dc.c +++ b/reactos/subsys/win32k/objects/dc.c @@ -212,6 +212,7 @@ NtGdiCreateCompatableDC(HDC hDC) NewDC->w.textAlign = OrigDC->w.textAlign; NewDC->w.backgroundColor = OrigDC->w.backgroundColor; NewDC->w.backgroundMode = OrigDC->w.backgroundMode; + NewDC->w.ROPmode = OrigDC->w.ROPmode; DC_UnlockDc( hDC ); if (NULL != DisplayDC) { @@ -774,8 +775,8 @@ IntGdiCreateDC(PUNICODE_STRING Driver, NewDC->DMW.dmDisplayFrequency = 0; NewDC->w.bitsPerPixel = NewDC->DMW.dmBitsPerPel; // FIXME: set this here?? - NewDC->w.hPalette = NewDC->DevInfo->hpalDefault; + NewDC->w.ROPmode = R2_COPYPEN; DPRINT("Bits per pel: %u\n", NewDC->w.bitsPerPixel); diff --git a/reactos/subsys/win32k/objects/fillshap.c b/reactos/subsys/win32k/objects/fillshap.c index 7f0bd87dff9..3c9ef6e7e35 100644 --- a/reactos/subsys/win32k/objects/fillshap.c +++ b/reactos/subsys/win32k/objects/fillshap.c @@ -28,7 +28,7 @@ &BrushInst.BrushObject, \ x, y, (x)+1, y, \ &RectBounds, \ - dc->w.ROPmode); + ROP2_TO_MIX(dc->w.ROPmode)); #define PUTLINE(x1,y1,x2,y2,BrushInst) \ ret = ret && IntEngLineTo(BitmapObj, \ @@ -36,7 +36,7 @@ &BrushInst.BrushObject, \ x1, y1, x2, y2, \ &RectBounds, \ - dc->w.ROPmode); + ROP2_TO_MIX(dc->w.ROPmode)); BOOL FASTCALL IntGdiPolygon(PDC dc, @@ -93,7 +93,7 @@ IntGdiPolygon(PDC dc, if (!(FillBrushObj->flAttrs & GDIBRUSH_IS_NULL)) { IntGdiInitBrushInstance(&FillBrushInst, FillBrushObj, dc->XlateBrush); - ret = FillPolygon ( dc, BitmapObj, &FillBrushInst.BrushObject, dc->w.ROPmode, UnsafePoints, Count, DestRect ); + ret = FillPolygon ( dc, BitmapObj, &FillBrushInst.BrushObject, ROP2_TO_MIX(dc->w.ROPmode), UnsafePoints, Count, DestRect ); } BRUSHOBJ_UnlockBrush(dc->w.hBrush); @@ -128,7 +128,7 @@ IntGdiPolygon(PDC dc, To.x, To.y, &DestRect, - dc->w.ROPmode); /* MIX */ + ROP2_TO_MIX(dc->w.ROPmode)); /* MIX */ } } PENOBJ_UnlockPen( dc->w.hPen ); @@ -939,6 +939,7 @@ IntRectangle(PDC dc, GDIBRUSHINST PenBrushInst, FillBrushInst; BOOL ret = FALSE; // default to failure RECTL DestRect; + MIX Mix; ASSERT ( dc ); // caller's responsibility to set this up /* FIXME - BitmapObj can be NULL!!! Don't assert but handle this case gracefully! */ @@ -1001,33 +1002,34 @@ IntRectangle(PDC dc, if (!(PenBrushObj->flAttrs & GDIBRUSH_IS_NULL)) { + Mix = ROP2_TO_MIX(dc->w.ROPmode); ret = ret && IntEngLineTo(BitmapObj, dc->CombinedClip, &PenBrushInst.BrushObject, LeftRect, TopRect, RightRect, TopRect, &DestRect, // Bounding rectangle - dc->w.ROPmode); // MIX + Mix); ret = ret && IntEngLineTo(BitmapObj, dc->CombinedClip, &PenBrushInst.BrushObject, RightRect, TopRect, RightRect, BottomRect, &DestRect, // Bounding rectangle - dc->w.ROPmode); // MIX + Mix); ret = ret && IntEngLineTo(BitmapObj, dc->CombinedClip, &PenBrushInst.BrushObject, RightRect, BottomRect, LeftRect, BottomRect, &DestRect, // Bounding rectangle - dc->w.ROPmode); // MIX + Mix); ret = ret && IntEngLineTo(BitmapObj, dc->CombinedClip, &PenBrushInst.BrushObject, LeftRect, BottomRect, LeftRect, TopRect, &DestRect, // Bounding rectangle - dc->w.ROPmode); // MIX */ + Mix); } PENOBJ_UnlockPen(dc->w.hPen); diff --git a/reactos/subsys/win32k/objects/line.c b/reactos/subsys/win32k/objects/line.c index 05b71b734ff..866e04ff0cb 100644 --- a/reactos/subsys/win32k/objects/line.c +++ b/reactos/subsys/win32k/objects/line.c @@ -110,7 +110,7 @@ IntGdiLineTo(DC *dc, Points[0].x, Points[0].y, Points[1].x, Points[1].y, &Bounds, - dc->w.ROPmode); + ROP2_TO_MIX(dc->w.ROPmode)); } BITMAPOBJ_UnlockBitmap ( dc->w.hBitmap ); @@ -228,7 +228,7 @@ IntGdiPolyline(DC *dc, IntGdiInitBrushInstance(&PenBrushInst, PenBrushObj, dc->XlatePen); Ret = IntEngPolyline(BitmapObj, dc->CombinedClip, &PenBrushInst.BrushObject, Points, Count, - dc->w.ROPmode); + ROP2_TO_MIX(dc->w.ROPmode)); BITMAPOBJ_UnlockBitmap(dc->w.hBitmap); EngFreeMem(Points); From bb766d54042be1338b97db0dc7f5fd7c7a1ffc6e Mon Sep 17 00:00:00 2001 From: Thomas Bluemel Date: Sat, 5 Feb 2005 10:31:37 +0000 Subject: [PATCH 112/185] only attach to the process to be queried when necessary svn path=/trunk/; revision=13421 --- reactos/ntoskrnl/ke/spinlock.c | 4 +--- reactos/ntoskrnl/ps/process.c | 12 +++++++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/reactos/ntoskrnl/ke/spinlock.c b/reactos/ntoskrnl/ke/spinlock.c index 47fa9dd4258..15c3b13737c 100644 --- a/reactos/ntoskrnl/ke/spinlock.c +++ b/reactos/ntoskrnl/ke/spinlock.c @@ -195,9 +195,7 @@ KiAcquireSpinLock(PKSPIN_LOCK SpinLock) : : "r" (SpinLock)); #else - while (0 != *(volatile PKSPIN_LOCK)SpinLock) - { - } + while (0 != *(volatile KSPIN_LOCK*)SpinLock); #endif #else DbgPrint("Spinning on spinlock %x current value %x\n", SpinLock, i); diff --git a/reactos/ntoskrnl/ps/process.c b/reactos/ntoskrnl/ps/process.c index a0edaaecfd6..00c5dec9c6c 100644 --- a/reactos/ntoskrnl/ps/process.c +++ b/reactos/ntoskrnl/ps/process.c @@ -1613,11 +1613,15 @@ NtQueryInformationProcess(IN HANDLE ProcessHandle, { PRTL_USER_PROCESS_PARAMETERS ProcParams = NULL; UNICODE_STRING LocalDest; + BOOLEAN Attached; ULONG ImagePathLen = 0; PUNICODE_STRING DstPath = (PUNICODE_STRING)ProcessInformation; /* we need to attach to the process to make sure we're in the right context! */ - KeAttachProcess(&Process->Pcb); + Attached = Process != PsGetCurrentProcess(); + + if(Attached) + KeAttachProcess(&Process->Pcb); _SEH_TRY { @@ -1677,7 +1681,8 @@ NtQueryInformationProcess(IN HANDLE ProcessHandle, _SEH_END; /* detach from the process */ - KeDetachProcess(); + if(Attached) + KeDetachProcess(); /* only copy the string back to the caller if we were able to copy it into the temporary buffer! */ @@ -1715,7 +1720,8 @@ NtQueryInformationProcess(IN HANDLE ProcessHandle, } /* don't forget to detach from the process!!! */ - KeDetachProcess(); + if(Attached) + KeDetachProcess(); } else { From bda30e303478dc4e876b2c2d65992b2d968e624a Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Sat, 5 Feb 2005 10:54:00 +0000 Subject: [PATCH 113/185] Use the allocated buffer size in the call to NtGetPlugPlayEvent. svn path=/trunk/; revision=13422 --- reactos/services/umpnpmgr/umpnpmgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/services/umpnpmgr/umpnpmgr.c b/reactos/services/umpnpmgr/umpnpmgr.c index bb9ce0a797c..b9b5659091b 100644 --- a/reactos/services/umpnpmgr/umpnpmgr.c +++ b/reactos/services/umpnpmgr/umpnpmgr.c @@ -79,7 +79,7 @@ PnpEventThread(LPVOID lpParameter) DPRINT("Calling NtGetPlugPlayEvent()\n"); /* Wait for the next pnp event */ - Status = NtGetPlugPlayEvent(0, 0, PnpEvent, 1024); + Status = NtGetPlugPlayEvent(0, 0, PnpEvent, PnpEventSize); /* Resize the buffer for the PnP event if it's too small. */ if (Status == STATUS_BUFFER_TOO_SMALL) { From cb884ccdb4b9f5bfa909dd41d9ccbfdb24cda06b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20van=20Geldorp?= Date: Sat, 5 Feb 2005 18:49:43 +0000 Subject: [PATCH 114/185] Re-use (better) stack backtrace function svn path=/trunk/; revision=13423 --- reactos/ntoskrnl/ke/i386/exp.c | 48 +++------------------------------- 1 file changed, 3 insertions(+), 45 deletions(-) diff --git a/reactos/ntoskrnl/ke/i386/exp.c b/reactos/ntoskrnl/ke/i386/exp.c index 6341abef049..18f7ebe53e0 100644 --- a/reactos/ntoskrnl/ke/i386/exp.c +++ b/reactos/ntoskrnl/ke/i386/exp.c @@ -1,5 +1,4 @@ -/* $Id:$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: ntoskrnl/ke/i386/exp.c @@ -393,9 +392,7 @@ VOID KiDumpTrapFrame(PKTRAP_FRAME Tf, ULONG Parameter1, ULONG Parameter2) { ULONG cr3_; - ULONG i; ULONG StackLimit; - PULONG Frame; ULONG Esp0; ULONG ExceptionNr = (ULONG)Tf->DebugArgMark; ULONG cr2 = (ULONG)Tf->DebugPointer; @@ -462,46 +459,7 @@ KiDumpTrapFrame(PKTRAP_FRAME Tf, ULONG Parameter1, ULONG Parameter2) /* * Dump the stack frames */ - DbgPrint("Frames: "); - /* Change to an #if 0 if no frames are printed because of fpo. */ -#if 1 - i = 1; - Frame = (PULONG)Tf->Ebp; - while (Frame != NULL) - { - NTSTATUS Status; - PVOID Eip; - Status = MmSafeCopyFromUser(&Eip, Frame + 1, sizeof(Eip)); - if (!NT_SUCCESS(Status)) - { - DbgPrint(""); - break; - } - if (!KeRosPrintAddress(Eip)) - { - DbgPrint("<%X>", Eip); - } - Status = MmSafeCopyFromUser(&Frame, Frame, sizeof(Frame)); - if (!NT_SUCCESS(Status)) - { - break; - } - i++; - DbgPrint(" "); - } -#else - i = 1; - Frame = (PULONG)((ULONG_PTR)Esp0 + KTRAP_FRAME_EFLAGS); - while (Frame < (PULONG)PsGetCurrentThread()->Tcb.StackBase && i < 50) - { - ULONG Address = *Frame; - if (KeRosPrintAddress((PVOID)Address)) - { - i++; - } - Frame++; - } -#endif + KeDumpStackFrames((PULONG)Tf->Ebp); } ULONG @@ -616,7 +574,7 @@ KeDumpStackFrames(PULONG Frame) ULONG ResultLength = sizeof(mbi); NTSTATUS Status; - DbgPrint("Frames: "); + DbgPrint("Frames:\n"); _SEH_TRY { Status = MiQueryVirtualMemory ( From 75f792014d27d8ee896a758fbc4bd17aacc18098 Mon Sep 17 00:00:00 2001 From: Gregor Anich Date: Sat, 5 Feb 2005 18:59:14 +0000 Subject: [PATCH 115/185] Raise exception when MmMapLockedPagesSpecifyCache fails to map into UserMode. svn path=/trunk/; revision=13425 --- reactos/ntoskrnl/mm/mdl.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/reactos/ntoskrnl/mm/mdl.c b/reactos/ntoskrnl/mm/mdl.c index 4fe192864d4..e3d7c2a44de 100644 --- a/reactos/ntoskrnl/mm/mdl.c +++ b/reactos/ntoskrnl/mm/mdl.c @@ -862,8 +862,9 @@ MmMapLockedPagesSpecifyCache ( IN PMDL Mdl, } if (AccessMode == UserMode) { - /* FIXME: Raise an exception */ - return NULL; + /* Throw exception */ + ExRaiseStatus(STATUS_ACCESS_VIOLATION); + ASSERT(0); } else /* AccessMode == KernelMode */ { @@ -888,6 +889,8 @@ MmMapLockedPagesSpecifyCache ( IN PMDL Mdl, } Mdl->MappedSystemVa = (char*)Base + Mdl->ByteOffset; } + else + DPRINT1("UserMode mapping - returning 0x%x\n", (ULONG)Base + Mdl->ByteOffset); return((char*)Base + Mdl->ByteOffset); } From 59a9bf1efcfed1958e55da86c0654c608664a73f Mon Sep 17 00:00:00 2001 From: Alex Ionescu Date: Sat, 5 Feb 2005 21:04:17 +0000 Subject: [PATCH 116/185] Prevent buffer overflow on SMP systems. The buffer may be filled with 'Unknown CPU with family ID %ld and model ID %ld. Patch by Herve Poussineau. svn path=/trunk/; revision=13427 --- reactos/hal/halx86/mp/processor_mp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/hal/halx86/mp/processor_mp.c b/reactos/hal/halx86/mp/processor_mp.c index 2526ca9cf8a..1721703f7b2 100644 --- a/reactos/hal/halx86/mp/processor_mp.c +++ b/reactos/hal/halx86/mp/processor_mp.c @@ -1220,7 +1220,7 @@ ULONG MPChecksum(PUCHAR Base, PCHAR HaliMPFamily(ULONG Family, ULONG Model) { - static CHAR str[32]; + static CHAR str[64]; static PCHAR CPUs[] = { "80486DX", "80486DX", From 8f344fcd2fc00646b762155e16659f49115cd5a4 Mon Sep 17 00:00:00 2001 From: Thomas Bluemel Date: Sun, 6 Feb 2005 00:01:21 +0000 Subject: [PATCH 117/185] Just cleaned up the code and changed the name of a few things. Patch by Trevor McCort. svn path=/trunk/; revision=13429 --- reactos/lib/cpl/desk/background.c | 260 ++++++++++++++++-------------- reactos/lib/cpl/desk/en.rc | 8 +- reactos/lib/cpl/desk/resource.h | 15 +- 3 files changed, 150 insertions(+), 133 deletions(-) diff --git a/reactos/lib/cpl/desk/background.c b/reactos/lib/cpl/desk/background.c index bc4e3d602e7..6898823cd2f 100644 --- a/reactos/lib/cpl/desk/background.c +++ b/reactos/lib/cpl/desk/background.c @@ -19,38 +19,44 @@ #include "desk.h" #include "dibitmap.h" -#define MAX_WALLPAPERS 100 +#define MAX_BACKGROUNDS 100 #define PLACEMENT_CENTER 0 #define PLACEMENT_STRETCH 1 #define PLACEMENT_TILE 2 -DIBitmap *g_pWallpaperBitmap = NULL; +typedef struct +{ + BOOL bWallpaper; /* Is this background a wallpaper */ + + TCHAR szFilename[MAX_PATH]; + TCHAR szDisplayName[256]; + +} BackgroundItem; -int g_placementSelection = 0; -int g_wallpaperSelection = -1; +BackgroundItem g_backgroundItems[MAX_BACKGROUNDS]; -int g_wallpaperCount = 0; -int g_listViewItemCount = 0; +DIBitmap *g_pWallpaperBitmap = NULL; -int g_currentWallpaperItemId = 0; +int g_placementSelection = 0; +int g_backgroundSelection = 0; -HWND g_hBackgroundTab = NULL; +int g_listViewItemCount = 0; -HWND g_hWallpaperList = NULL; -HWND g_hWallpaperPreview = NULL; -HIMAGELIST g_hShellImageList = NULL; +HWND g_hBackgroundPage = NULL; +HWND g_hBackgroundList = NULL; +HWND g_hBackgroundPreview = NULL; -HWND g_hPlacementCombo = NULL; +HWND g_hPlacementCombo = NULL; +HWND g_hColorButton = NULL; -TCHAR g_wallpapers[MAX_WALLPAPERS][MAX_PATH]; +HIMAGELIST g_hShellImageList = NULL; /* Add the bitmaps in the C:\ReactOS directory and the current wallpaper if any */ void AddListViewItems() { WIN32_FIND_DATA fd; HANDLE hFind; - TCHAR szBuffer[256]; TCHAR szSearchPath[MAX_PATH]; LV_ITEM listItem; LV_COLUMN dummy; @@ -63,30 +69,38 @@ void AddListViewItems() DWORD varType = REG_SZ; LONG result; UINT i = 0; + BackgroundItem *backgroundItem = NULL; - GetClientRect(g_hWallpaperList, &clientRect); + GetClientRect(g_hBackgroundList, &clientRect); ZeroMemory(&dummy, sizeof(LV_COLUMN)); dummy.mask = LVCF_SUBITEM | LVCF_WIDTH; dummy.iSubItem = 0; dummy.cx = (clientRect.right - clientRect.left) - GetSystemMetrics(SM_CXVSCROLL); - ListView_InsertColumn(g_hWallpaperList, 0, &dummy); + ListView_InsertColumn(g_hBackgroundList, 0, &dummy); /* Add the "None" item */ - LoadString(hApplet, IDS_NONE, szBuffer, sizeof(szBuffer) / sizeof(TCHAR)); + backgroundItem = &g_backgroundItems[g_listViewItemCount]; + + backgroundItem->bWallpaper = FALSE; + + LoadString(hApplet, + IDS_NONE, + backgroundItem->szDisplayName, + sizeof(backgroundItem->szDisplayName) / sizeof(TCHAR)); ZeroMemory(&listItem, sizeof(LV_ITEM)); listItem.mask = LVIF_TEXT | LVIF_PARAM | LVIF_STATE | LVIF_IMAGE; - listItem.pszText = szBuffer; - listItem.iItem = g_listViewItemCount; - listItem.iImage = -1; listItem.state = LVIS_SELECTED; - listItem.lParam = -1; + listItem.pszText = backgroundItem->szDisplayName; + listItem.iImage = -1; + listItem.iItem = g_listViewItemCount; + listItem.lParam = g_listViewItemCount; - ListView_InsertItem(g_hWallpaperList, &listItem); - ListView_SetItemState(g_hWallpaperList, g_listViewItemCount, LVIS_SELECTED, LVIS_SELECTED); + ListView_InsertItem(g_hBackgroundList, &listItem); + ListView_SetItemState(g_hBackgroundList, g_listViewItemCount, LVIS_SELECTED, LVIS_SELECTED); g_listViewItemCount++; @@ -110,26 +124,28 @@ void AddListViewItems() if(i++ == 0) { g_hShellImageList = himl; - ListView_SetImageList(g_hWallpaperList, himl, LVSIL_SMALL); + ListView_SetImageList(g_hBackgroundList, himl, LVSIL_SMALL); } + backgroundItem = &g_backgroundItems[g_listViewItemCount]; + + backgroundItem->bWallpaper = TRUE; + + _tcscpy(backgroundItem->szDisplayName, sfi.szDisplayName); + _tcscpy(backgroundItem->szFilename, wallpaperFilename); + ZeroMemory(&listItem, sizeof(LV_ITEM)); listItem.mask = LVIF_TEXT | LVIF_PARAM | LVIF_STATE | LVIF_IMAGE; - listItem.pszText = sfi.szDisplayName; listItem.state = LVIS_SELECTED; - listItem.iItem = g_listViewItemCount; + listItem.pszText = backgroundItem->szDisplayName; listItem.iImage = sfi.iIcon; - listItem.lParam = g_wallpaperCount; + listItem.iItem = g_listViewItemCount; + listItem.lParam = g_listViewItemCount; - ListView_InsertItem(g_hWallpaperList, &listItem); - _tcscpy(g_wallpapers[g_wallpaperCount], wallpaperFilename); - - ListView_SetItemState(g_hWallpaperList, g_listViewItemCount, LVIS_SELECTED, LVIS_SELECTED); - - g_currentWallpaperItemId = g_listViewItemCount; + ListView_InsertItem(g_hBackgroundList, &listItem); + ListView_SetItemState(g_hBackgroundList, g_listViewItemCount, LVIS_SELECTED, LVIS_SELECTED); g_listViewItemCount++; - g_wallpaperCount++; } } @@ -168,22 +184,27 @@ void AddListViewItems() if(i++ == 0) { g_hShellImageList = himl; - ListView_SetImageList(g_hWallpaperList, himl, LVSIL_SMALL); + ListView_SetImageList(g_hBackgroundList, himl, LVSIL_SMALL); } + backgroundItem = &g_backgroundItems[g_listViewItemCount]; + + backgroundItem->bWallpaper = TRUE; + + _tcscpy(backgroundItem->szDisplayName, sfi.szDisplayName); + _tcscpy(backgroundItem->szFilename, filename); + ZeroMemory(&listItem, sizeof(LV_ITEM)); listItem.mask = LVIF_TEXT | LVIF_PARAM | LVIF_STATE | LVIF_IMAGE; - listItem.pszText = sfi.szDisplayName; + listItem.pszText = backgroundItem->szDisplayName; listItem.state = 0; - listItem.iItem = g_listViewItemCount++; listItem.iImage = sfi.iIcon; - listItem.lParam = g_wallpaperCount; + listItem.iItem = g_listViewItemCount; + listItem.lParam = g_listViewItemCount; - ListView_InsertItem(g_hWallpaperList, &listItem); + ListView_InsertItem(g_hBackgroundList, &listItem); - _tcscpy(g_wallpapers[g_wallpaperCount], filename); - - g_wallpaperCount++; + g_listViewItemCount++; } if(!FindNextFile(hFind, &fd)) @@ -193,9 +214,10 @@ void AddListViewItems() void InitBackgroundDialog() { - g_hWallpaperList = GetDlgItem(g_hBackgroundTab, IDC_WALLPAPER_LIST); - g_hWallpaperPreview = GetDlgItem(g_hBackgroundTab, IDC_WALLPAPER_PREVIEW); - g_hPlacementCombo = GetDlgItem(g_hBackgroundTab, IDC_PLACEMENT_COMBO); + g_hBackgroundList = GetDlgItem(g_hBackgroundPage, IDC_BACKGROUND_LIST); + g_hBackgroundPreview = GetDlgItem(g_hBackgroundPage, IDC_BACKGROUND_PREVIEW); + g_hPlacementCombo = GetDlgItem(g_hBackgroundPage, IDC_PLACEMENT_COMBO); + g_hColorButton = GetDlgItem(g_hBackgroundPage, IDC_COLOR_BUTTON); AddListViewItems(); @@ -256,7 +278,7 @@ void InitBackgroundDialog() RegCloseKey(regKey); } -void OnPatternButton() +void OnColorButton() { MessageBox(NULL, TEXT("That button doesn't do anything yet"), TEXT("Whoops"), MB_OK); } @@ -271,11 +293,12 @@ void OnBrowseButton() OPENFILENAME ofn; TCHAR filename[MAX_PATH]; TCHAR fileTitle[256]; + BackgroundItem *backgroundItem = NULL; ZeroMemory(&ofn, sizeof(OPENFILENAME)); ofn.lStructSize = sizeof(OPENFILENAME); - ofn.hwndOwner = g_hBackgroundTab; + ofn.hwndOwner = g_hBackgroundPage; ofn.lpstrFile = filename; /* Set lpstrFile[0] to '\0' so that GetOpenFileName does not @@ -292,77 +315,76 @@ void OnBrowseButton() if(GetOpenFileName(&ofn) == TRUE) { /* Check if there is already a entry that holds this filename */ - if(CheckListBoxFilename(g_hWallpaperList, filename) == FALSE) - { - SHFILEINFO sfi; - LV_ITEM listItem; - - if(g_wallpaperCount > (MAX_WALLPAPERS - 1)) - return; - - _tcscpy(g_wallpapers[g_wallpaperCount], filename); - - SHGetFileInfo(filename, - 0, - &sfi, - sizeof(sfi), - SHGFI_SYSICONINDEX | SHGFI_SMALLICON | SHGFI_DISPLAYNAME); - - ZeroMemory(&listItem, sizeof(LV_ITEM)); - listItem.mask = LVIF_TEXT | LVIF_PARAM | LVIF_STATE | LVIF_IMAGE; - listItem.pszText = sfi.szDisplayName; - listItem.state = 0; - listItem.iItem = g_listViewItemCount++; - listItem.iImage = sfi.iIcon; - listItem.lParam = g_wallpaperCount; - - ListView_InsertItem(g_hWallpaperList, &listItem); - - g_wallpaperCount++; - } + if(CheckListBoxFilename(g_hBackgroundList, filename) == TRUE) + return; + + SHFILEINFO sfi; + LV_ITEM listItem; + + if(g_listViewItemCount > (MAX_BACKGROUNDS - 1)) + return; + + SHGetFileInfo(filename, + 0, + &sfi, + sizeof(sfi), + SHGFI_SYSICONINDEX | SHGFI_SMALLICON | SHGFI_DISPLAYNAME); + + backgroundItem = &g_backgroundItems[g_listViewItemCount]; + + backgroundItem->bWallpaper = TRUE; + + _tcscpy(backgroundItem->szDisplayName, sfi.szDisplayName); + _tcscpy(backgroundItem->szFilename, filename); + + ZeroMemory(&listItem, sizeof(LV_ITEM)); + listItem.mask = LVIF_TEXT | LVIF_PARAM | LVIF_STATE | LVIF_IMAGE; + listItem.state = 0; + listItem.pszText = backgroundItem->szDisplayName; + listItem.iImage = sfi.iIcon; + listItem.iItem = g_listViewItemCount; + listItem.lParam = g_listViewItemCount; + + ListView_InsertItem(g_hBackgroundList, &listItem); + + g_listViewItemCount++; } } void ListViewItemChanged(int itemIndex) -{ +{ + BackgroundItem *backgroundItem = NULL; + + g_backgroundSelection = itemIndex; + backgroundItem = &g_backgroundItems[g_backgroundSelection]; + if(g_pWallpaperBitmap != NULL) { DibFreeImage(g_pWallpaperBitmap); g_pWallpaperBitmap = NULL; } - - LV_ITEM listItem; - listItem.iItem = itemIndex; - listItem.mask = LVIF_PARAM; - ListView_GetItem(g_hWallpaperList, &listItem); - - if(listItem.lParam == -1) - { - g_wallpaperSelection = -1; - InvalidateRect(g_hWallpaperPreview, NULL, TRUE); - } - else - { - g_wallpaperSelection = listItem.lParam; - - g_pWallpaperBitmap = DibLoadImage(g_wallpapers[g_wallpaperSelection]); + if(backgroundItem->bWallpaper == TRUE) + { + g_pWallpaperBitmap = DibLoadImage(backgroundItem->szFilename); if(g_pWallpaperBitmap == NULL) { + return; } - - InvalidateRect(g_hWallpaperPreview, NULL, TRUE); } - EnableWindow(g_hPlacementCombo, (listItem.lParam != -1 ? TRUE : FALSE)); + InvalidateRect(g_hBackgroundPreview, NULL, TRUE); - PropSheet_Changed(GetParent(g_hBackgroundTab), g_hBackgroundTab); + EnableWindow(g_hColorButton, (backgroundItem->bWallpaper == FALSE ? TRUE : FALSE)); + EnableWindow(g_hPlacementCombo, backgroundItem->bWallpaper); + + PropSheet_Changed(GetParent(g_hBackgroundPage), g_hBackgroundPage); } -void DrawWallpaperPreview(LPDRAWITEMSTRUCT draw) +void DrawBackgroundPreview(LPDRAWITEMSTRUCT draw) { - if(g_wallpaperSelection == -1) + if(g_backgroundItems[g_backgroundSelection].bWallpaper == FALSE) { FillRect(draw->hDC, &draw->rcItem, GetSysColorBrush(COLOR_BACKGROUND)); return; @@ -471,16 +493,16 @@ void SetWallpaper() RegCloseKey(regKey); - if(g_wallpaperSelection == -1) - { - SystemParametersInfo(SPI_SETDESKWALLPAPER, 0, TEXT(""), SPIF_UPDATEINIFILE); + if(g_backgroundItems[g_backgroundSelection].bWallpaper == TRUE) + { + SystemParametersInfo(SPI_SETDESKWALLPAPER, + 0, + g_backgroundItems[g_backgroundSelection].szFilename, + SPIF_UPDATEINIFILE); } else { - SystemParametersInfo(SPI_SETDESKWALLPAPER, - 0, - g_wallpapers[g_wallpaperSelection], - SPIF_UPDATEINIFILE); + SystemParametersInfo(SPI_SETDESKWALLPAPER, 0, TEXT(""), SPIF_UPDATEINIFILE); } } @@ -489,7 +511,7 @@ INT_PTR CALLBACK BackgroundPageProc(HWND hwndDlg, WPARAM wParam, LPARAM lParam) { - g_hBackgroundTab = hwndDlg; + g_hBackgroundPage = hwndDlg; switch(uMsg) { @@ -505,16 +527,18 @@ INT_PTR CALLBACK BackgroundPageProc(HWND hwndDlg, switch(controlId) { - case IDC_PATTERN: + case IDC_COLOR_BUTTON: { if(command == BN_CLICKED) - OnPatternButton(); + OnColorButton(); + } break; - case IDC_BROWSE: + case IDC_BROWSE_BUTTON: { if(command == BN_CLICKED) OnBrowseButton(); + } break; case IDC_PLACEMENT_COMBO: @@ -523,9 +547,9 @@ INT_PTR CALLBACK BackgroundPageProc(HWND hwndDlg, { g_placementSelection = SendMessage(g_hPlacementCombo, CB_GETCURSEL, 0, 0); - InvalidateRect(g_hWallpaperPreview, NULL, TRUE); + InvalidateRect(g_hBackgroundPreview, NULL, TRUE); - PropSheet_Changed(GetParent(g_hBackgroundTab), g_hBackgroundTab); + PropSheet_Changed(GetParent(g_hBackgroundPage), g_hBackgroundPage); } } break; @@ -537,9 +561,9 @@ INT_PTR CALLBACK BackgroundPageProc(HWND hwndDlg, LPDRAWITEMSTRUCT drawItem; drawItem = (LPDRAWITEMSTRUCT)lParam; - if(drawItem->CtlID == IDC_WALLPAPER_PREVIEW) + if(drawItem->CtlID == IDC_BACKGROUND_PREVIEW) { - DrawWallpaperPreview(drawItem); + DrawBackgroundPreview(drawItem); } } break; @@ -553,16 +577,6 @@ INT_PTR CALLBACK BackgroundPageProc(HWND hwndDlg, case PSN_APPLY: { SetWallpaper(); - - /* Update the current wallapaper list item to the - * currently selected wallpaper */ - LV_ITEM listItem; - listItem.mask = LVIF_PARAM; - listItem.iSubItem = 0; - listItem.iItem = g_currentWallpaperItemId; - listItem.lParam = g_wallpaperSelection; - - ListView_SetItem(g_hWallpaperList, &listItem); return TRUE; } break; diff --git a/reactos/lib/cpl/desk/en.rc b/reactos/lib/cpl/desk/en.rc index 4b8485e927e..88614bfa290 100644 --- a/reactos/lib/cpl/desk/en.rc +++ b/reactos/lib/cpl/desk/en.rc @@ -5,15 +5,15 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Background" FONT 8, "MS Shell Dlg" BEGIN - CONTROL "",IDC_WALLPAPER_PREVIEW,"Static",SS_OWNERDRAW,48,10, + CONTROL "",IDC_BACKGROUND_PREVIEW,"Static",SS_OWNERDRAW,48,10, 150,105,WS_EX_STATICEDGE - CONTROL "",IDC_WALLPAPER_LIST,"SysListView32",LVS_REPORT | + CONTROL "",IDC_BACKGROUND_LIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_NOCOLUMNHEADER | LVS_SHAREIMAGELISTS | WS_BORDER | WS_TABSTOP,7,139,173,71 LTEXT "Select an image to use as your desktop wallpaper:", IDC_STATIC,8,127,180,8 - PUSHBUTTON "&Browse...",IDC_BROWSE,187,175,50,14 - PUSHBUTTON "&Pattern...",IDC_PATTERN,187,195,50,14 + PUSHBUTTON "&Browse...",IDC_BROWSE_BUTTON,187,175,50,14 + PUSHBUTTON "&Color...",IDC_COLOR_BUTTON,187,195,50,14 LTEXT "Placement:",IDC_STATIC,187,138,36,8 COMBOBOX IDC_PLACEMENT_COMBO,187,148,50,90,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP diff --git a/reactos/lib/cpl/desk/resource.h b/reactos/lib/cpl/desk/resource.h index 93d3e986794..c1fc9bce05a 100644 --- a/reactos/lib/cpl/desk/resource.h +++ b/reactos/lib/cpl/desk/resource.h @@ -14,16 +14,19 @@ /* ids */ #define IDC_DESK_ICON 1 +#define IDC_STATIC -1 + #define IDD_BACKGROUND 100 #define IDD_SCREENSAVER 101 #define IDD_APPEARANCE 102 #define IDD_SETTINGS 103 -#define IDC_WALLPAPER_LIST 1000 -#define IDC_BROWSE 1001 -#define IDC_PATTERN 1002 -#define IDC_PLACEMENT_COMBO 1003 -#define IDC_WALLPAPER_PREVIEW 1004 -#define IDC_STATIC -1 + +/* Background Page */ +#define IDC_BACKGROUND_LIST 1000 +#define IDC_BACKGROUND_PREVIEW 1001 +#define IDC_BROWSE_BUTTON 1002 +#define IDC_COLOR_BUTTON 1003 +#define IDC_PLACEMENT_COMBO 1004 #define IDS_CPLNAME 2000 #define IDS_CPLDESCRIPTION 2001 From a6b98eefa18550e08da18bf73d68e856ee58fe88 Mon Sep 17 00:00:00 2001 From: Art Yerkes Date: Sun, 6 Feb 2005 07:56:45 +0000 Subject: [PATCH 118/185] Kill only selects involving a named file descriptor when clearing exclusive selects. This makes ASECHO32 work perfectly. svn path=/trunk/; revision=13430 --- reactos/drivers/net/afd/afd/main.c | 2 +- reactos/drivers/net/afd/afd/select.c | 72 +++++++++++++++------------ reactos/drivers/net/afd/include/afd.h | 2 +- 3 files changed, 43 insertions(+), 33 deletions(-) diff --git a/reactos/drivers/net/afd/afd/main.c b/reactos/drivers/net/afd/afd/main.c index 25fde50d880..1b9ab1d032d 100644 --- a/reactos/drivers/net/afd/afd/main.c +++ b/reactos/drivers/net/afd/afd/main.c @@ -225,7 +225,7 @@ AfdCloseSocket(PDEVICE_OBJECT DeviceObject, PIRP Irp, FCB->PollState |= AFD_EVENT_CLOSE; PollReeval( FCB->DeviceExt, FileObject ); - KillSelectsForFCB( FCB->DeviceExt, FileObject ); + KillSelectsForFCB( FCB->DeviceExt, FileObject, FALSE ); if( FCB->EventSelect ) ObDereferenceObject( FCB->EventSelect ); diff --git a/reactos/drivers/net/afd/afd/select.c b/reactos/drivers/net/afd/afd/select.c index b203dff5127..aae2412693a 100644 --- a/reactos/drivers/net/afd/afd/select.c +++ b/reactos/drivers/net/afd/afd/select.c @@ -12,6 +12,25 @@ #include "tdiconn.h" #include "debug.h" +VOID PrintEvents( ULONG Events ) { + char *events_list[] = { "AFD_EVENT_RECEIVE", + "AFD_EVENT_OOB_RECEIVE", + "AFD_EVENT_SEND", + "AFD_EVENT_DISCONNECT", + "AFD_EVENT_ABORT", + "AFD_EVENT_CLOSE", + "AFD_EVENT_CONNECT", + "AFD_EVENT_ACCEPT", + "AFD_EVENT_CONNECT_FAIL", + "AFD_EVENT_QOS", + "AFD_EVENT_GROUP_QOS", + NULL }; + int i; + + for( i = 0; events_list[i]; i++ ) + if( Events & (1 << i) ) DbgPrint("%s ", events_list[i] ); +} + VOID CopyBackStatus( PAFD_HANDLE HandleArray, UINT HandleCount ) { UINT i; @@ -94,7 +113,8 @@ VOID SelectTimeout( PKDPC Dpc, } VOID KillSelectsForFCB( PAFD_DEVICE_EXTENSION DeviceExt, - PFILE_OBJECT FileObject ) { + PFILE_OBJECT FileObject, + BOOLEAN OnlyExclusive ) { KIRQL OldIrql; PLIST_ENTRY ListEntry; PAFD_ACTIVE_POLL Poll; @@ -116,42 +136,19 @@ VOID KillSelectsForFCB( PAFD_DEVICE_EXTENSION DeviceExt, for( i = 0; i < PollReq->HandleCount; i++ ) { AFD_DbgPrint(MAX_TRACE,("Req: %x, This %x\n", PollReq->Handles[i].Handle, FileObject)); - if( (PVOID)PollReq->Handles[i].Handle == FileObject ) { + if( (PVOID)PollReq->Handles[i].Handle == FileObject && + (!OnlyExclusive || (OnlyExclusive && Poll->Exclusive)) ) { ZeroEvents( PollReq->Handles, PollReq->HandleCount ); SignalSocket( Poll, PollReq, STATUS_SUCCESS ); } } } - + KeReleaseSpinLock( &DeviceExt->Lock, OldIrql ); - + AFD_DbgPrint(MID_TRACE,("Done\n")); } -VOID KillExclusiveSelects( PAFD_DEVICE_EXTENSION DeviceExt ) { - KIRQL OldIrql; - PLIST_ENTRY ListEntry; - PAFD_ACTIVE_POLL Poll; - PIRP Irp; - PAFD_POLL_INFO PollReq; - - KeAcquireSpinLock( &DeviceExt->Lock, &OldIrql ); - - ListEntry = DeviceExt->Polls.Flink; - while ( ListEntry != &DeviceExt->Polls ) { - Poll = CONTAINING_RECORD(ListEntry, AFD_ACTIVE_POLL, ListEntry); - ListEntry = ListEntry->Flink; - if( Poll->Exclusive ) { - Irp = Poll->Irp; - PollReq = Irp->AssociatedIrp.SystemBuffer; - ZeroEvents( PollReq->Handles, PollReq->HandleCount ); - SignalSocket( Poll, PollReq, STATUS_CANCELLED ); - } - } - - KeReleaseSpinLock( &DeviceExt->Lock, OldIrql ); -} - NTSTATUS STDCALL AfdSelect( PDEVICE_OBJECT DeviceObject, PIRP Irp, PIO_STACK_LOCATION IrpSp ) { @@ -175,9 +172,6 @@ AfdSelect( PDEVICE_OBJECT DeviceObject, PIRP Irp, SET_AFD_HANDLES(PollReq, LockHandles( PollReq->Handles, PollReq->HandleCount )); - if( Exclusive ) KillExclusiveSelects( DeviceExt ); - - if( !AFD_HANDLES(PollReq) ) { Irp->IoStatus.Status = STATUS_NO_MEMORY; Irp->IoStatus.Information = 0; @@ -185,6 +179,16 @@ AfdSelect( PDEVICE_OBJECT DeviceObject, PIRP Irp, return Irp->IoStatus.Status; } + if( Exclusive ) { + for( i = 0; i < PollReq->HandleCount; i++ ) { + if( !AFD_HANDLES(PollReq)[i].Handle ) continue; + + KillSelectsForFCB( DeviceExt, + (PFILE_OBJECT)AFD_HANDLES(PollReq)[i].Handle, + TRUE ); + } + } + ZeroEvents( PollReq->Handles, PollReq->HandleCount ); @@ -218,6 +222,12 @@ AfdSelect( PDEVICE_OBJECT DeviceObject, PIRP Irp, PollReq->Handles[i].Status = AFD_EVENT_CLOSE; Signalled++; } else { +#ifdef DBG + DbgPrint("AFD: Select Events: "); + PrintEvents( PollReq->Handles[i].Events ); + DbgPrint("\n"); +#endif + PollReq->Handles[i].Status = PollReq->Handles[i].Events & FCB->PollState; if( PollReq->Handles[i].Status ) { diff --git a/reactos/drivers/net/afd/include/afd.h b/reactos/drivers/net/afd/include/afd.h index ac42942e75a..b58f1d1f49d 100644 --- a/reactos/drivers/net/afd/include/afd.h +++ b/reactos/drivers/net/afd/include/afd.h @@ -263,7 +263,7 @@ AfdEnumEvents( PDEVICE_OBJECT DeviceObject, PIRP Irp, PIO_STACK_LOCATION IrpSp ); VOID PollReeval( PAFD_DEVICE_EXTENSION DeviceObject, PFILE_OBJECT FileObject ); VOID KillSelectsForFCB( PAFD_DEVICE_EXTENSION DeviceExt, - PFILE_OBJECT FileObject ); + PFILE_OBJECT FileObject, BOOLEAN ExclusiveOnly ); /* tdi.c */ From a1775e6e4c809a4f99d8ac18ffe3237847688967 Mon Sep 17 00:00:00 2001 From: Filip Navara Date: Sun, 6 Feb 2005 10:01:07 +0000 Subject: [PATCH 119/185] Use only 80 character wide lines in the comments. svn path=/trunk/; revision=13431 --- reactos/include/ddk/csq.h | 151 +++++++++++++++++++------------------- 1 file changed, 77 insertions(+), 74 deletions(-) diff --git a/reactos/include/ddk/csq.h b/reactos/include/ddk/csq.h index 6b0ba5c03c6..d3d2d3ecb76 100644 --- a/reactos/include/ddk/csq.h +++ b/reactos/include/ddk/csq.h @@ -9,34 +9,37 @@ * * BACKGROUND * - * IRP queuing is a royal pain in the butt, due to the fact that there are tons of - * built-in race conditions. IRP handling is difficult in general, but the cancel - * logic has been particularly complicated due to some subtle races, coupled - * with the fact that the system interfaces have changed over time. + * IRP queuing is a royal pain in the butt, due to the fact that there are + * tons of built-in race conditions. IRP handling is difficult in general, + * but the cancel logic has been particularly complicated due to some subtle + * races, coupled with the fact that the system interfaces have changed over + * time. * - * Walter Oney (2nd. Ed. of Programming the Windows Driver Model) states a common - * opinion among driver developers when he says that it is foolish to try to roll - * your own cancel logic. There are only a very few people who have gotten it - * right in the past. He suggests, instead, that you either use his own well-tested - * code, or use the code in the Microsoft Cancel-Safe Queue Library. + * Walter Oney (2nd. Ed. of Programming the Windows Driver Model) states a + * common opinion among driver developers when he says that it is foolish + * to try to roll your own cancel logic. There are only a very few people + * who have gotten it right in the past. He suggests, instead, that you + * either use his own well-tested code, or use the code in the Microsoft + * Cancel-Safe Queue Library. * - * We cannot do either, of course, due to copyright issues. I have therefore created - * this clone of the Microsoft library in order to concentrate all of the IRP-queuing - * bugs in one place. I'm quite sure there are problems here, so if you are a - * driver writer, I'd be glad to hear your feedback. + * We cannot do either, of course, due to copyright issues. I have therefore + * created this clone of the Microsoft library in order to concentrate all + * of the IRP-queuing bugs in one place. I'm quite sure there are problems + * here, so if you are a driver writer, I'd be glad to hear your feedback. * - * Apart from that, please try to use these routines, rather than building your own. - * If you think you have found a bug, please bring it up with me or on-list, as this - * is complicated and non-obvious stuff. Don't just change this and hope for the best! + * Apart from that, please try to use these routines, rather than building + * your own. If you think you have found a bug, please bring it up with me + * or on-list, as this is complicated and non-obvious stuff. Don't just + * change this and hope for the best! * * USAGE * * This library follows exactly the same interface as the Microsoft Cancel-Safe Queue - * routines (IoCsqXxx()). As such, the authoritative reference is the current DDK. - * There is also a DDK sample called "cancel" that has an example of how to use this - * code. I have also provided a sample driver that makes use of this queue. Finally, - * please do read the header and the source if you're curious about the inner workings - * of these routines. + * routines (IoCsqXxx()). As such, the authoritative reference is the + * current DDK. There is also a DDK sample called "cancel" that has an + * example of how to use this code. I have also provided a sample driver + * that makes use of this queue. Finally, please do read the header and the + * source if you're curious about the inner workings of these routines. */ #ifndef _REACTOS_CSQ_H @@ -48,10 +51,11 @@ struct _IO_CSQ; /* * CSQ Callbacks * - * The cancel-safe queue is implemented as a set of IoCsqXxx() OS routines copuled - * with a set of driver callbacks to handle the basic operations of the queue. You - * need to supply one of each of these functions in your own driver. These routines - * are also documented in the DDK under CsqXxx(). That is the authoritative documentation. + * The cancel-safe queue is implemented as a set of IoCsqXxx() OS routines + * copuled with a set of driver callbacks to handle the basic operations of + * the queue. You need to supply one of each of these functions in your own + * driver. These routines are also documented in the DDK under CsqXxx(). + * That is the authoritative documentation. */ /* @@ -60,11 +64,11 @@ struct _IO_CSQ; * * Sample implementation: * - VOID NTAPI CsqInsertIrp(PIO_CSQ Csq, PIRP Irp) - { - KdPrint(("Inserting IRP 0x%x into CSQ\n", Irp)); - InsertTailList(&IrpQueue, &Irp->Tail.Overlay.ListEntry); - } + VOID NTAPI CsqInsertIrp(PIO_CSQ Csq, PIRP Irp) + { + KdPrint(("Inserting IRP 0x%x into CSQ\n", Irp)); + InsertTailList(&IrpQueue, &Irp->Tail.Overlay.ListEntry); + } * */ typedef VOID (NTAPI *PIO_CSQ_INSERT_IRP) (struct _IO_CSQ *Csq, @@ -73,16 +77,16 @@ typedef VOID (NTAPI *PIO_CSQ_INSERT_IRP) (struct _IO_CSQ *Csq, /* * Function to insert an IRP into the queue with extended context information. - * This is useful if you need to be able to de-queue particular IRPs more easily - * in some cases. + * This is useful if you need to be able to de-queue particular IRPs more + * easily in some cases. * * Same deal as above; sample implementation: * - NTSTATUS NTAPI CsqInsertIrpEx(PIO_CSQ Csq, PIRP Irp, PVOID InsertContext) - { - CsqInsertIrp(Csq, Irp); - return STATUS_PENDING; - } + NTSTATUS NTAPI CsqInsertIrpEx(PIO_CSQ Csq, PIRP Irp, PVOID InsertContext) + { + CsqInsertIrp(Csq, Irp); + return STATUS_PENDING; + } * */ typedef NTSTATUS (NTAPI *PIO_CSQ_INSERT_IRP_EX) (struct _IO_CSQ *Csq, @@ -94,11 +98,11 @@ typedef NTSTATUS (NTAPI *PIO_CSQ_INSERT_IRP_EX) (struct _IO_CSQ *Csq, * * Sample: * - VOID NTAPI CsqRemoveIrp(PIO_CSQ Csq, PIRP Irp) - { - KdPrint(("Removing IRP 0x%x from CSQ\n", Irp)); - RemoveEntryList(&Irp->Tail.Overlay.ListEntry); - } + VOID NTAPI CsqRemoveIrp(PIO_CSQ Csq, PIRP Irp) + { + KdPrint(("Removing IRP 0x%x from CSQ\n", Irp)); + RemoveEntryList(&Irp->Tail.Overlay.ListEntry); + } * */ typedef VOID (NTAPI *PIO_CSQ_REMOVE_IRP) (struct _IO_CSQ *Csq, @@ -109,18 +113,18 @@ typedef VOID (NTAPI *PIO_CSQ_REMOVE_IRP) (struct _IO_CSQ *Csq, * * Sample: * - PIRP NTAPI CsqPeekNextIrp(PIO_CSQ Csq, PIRP Irp, PVOID PeekContext) - { - KdPrint(("Peeking for next IRP\n")); + PIRP NTAPI CsqPeekNextIrp(PIO_CSQ Csq, PIRP Irp, PVOID PeekContext) + { + KdPrint(("Peeking for next IRP\n")); - if(Irp) - return CONTAINING_RECORD(&Irp->Tail.Overlay.ListEntry.Flink, IRP, Tail.Overlay.ListEntry); + if(Irp) + return CONTAINING_RECORD(&Irp->Tail.Overlay.ListEntry.Flink, IRP, Tail.Overlay.ListEntry); - if(IsListEmpty(&IrpQueue)) - return NULL; + if(IsListEmpty(&IrpQueue)) + return NULL; - return CONTAINING_RECORD(IrpQueue.Flink, IRP, Tail.Overlay.ListEntry); - } + return CONTAINING_RECORD(IrpQueue.Flink, IRP, Tail.Overlay.ListEntry); + } * */ typedef PIRP (NTAPI *PIO_CSQ_PEEK_NEXT_IRP) (struct _IO_CSQ *Csq, @@ -133,11 +137,11 @@ typedef PIRP (NTAPI *PIO_CSQ_PEEK_NEXT_IRP) (struct _IO_CSQ *Csq, * * Sample: * - VOID NTAPI CsqAcquireLock(PIO_CSQ Csq, PKIRQL Irql) - { - KdPrint(("Acquiring spin lock\n")); - KeAcquireSpinLock(&IrpQueueLock, Irql); - } + VOID NTAPI CsqAcquireLock(PIO_CSQ Csq, PKIRQL Irql) + { + KdPrint(("Acquiring spin lock\n")); + KeAcquireSpinLock(&IrpQueueLock, Irql); + } * */ typedef VOID (NTAPI *PIO_CSQ_ACQUIRE_LOCK) (struct _IO_CSQ *Csq, @@ -146,11 +150,11 @@ typedef VOID (NTAPI *PIO_CSQ_ACQUIRE_LOCK) (struct _IO_CSQ *Csq, /* * Unlock the queue: * - VOID NTAPI CsqReleaseLock(PIO_CSQ Csq, KIRQL Irql) - { - KdPrint(("Releasing spin lock\n")); - KeReleaseSpinLock(&IrpQueueLock, Irql); - } + VOID NTAPI CsqReleaseLock(PIO_CSQ Csq, KIRQL Irql) + { + KdPrint(("Releasing spin lock\n")); + KeReleaseSpinLock(&IrpQueueLock, Irql); + } * */ typedef VOID (NTAPI *PIO_CSQ_RELEASE_LOCK) (struct _IO_CSQ *Csq, @@ -162,13 +166,13 @@ typedef VOID (NTAPI *PIO_CSQ_RELEASE_LOCK) (struct _IO_CSQ *Csq, * * Sample: * - VOID NTAPI CsqCompleteCancelledIrp(PIO_CSQ Csq, PIRP Irp) - { - KdPrint(("cancelling irp 0x%x\n", Irp)); - Irp->IoStatus.Status = STATUS_CANCELLED; - Irp->IoStatus.Information = 0; - IoCompleteRequest(Irp, IO_NO_INCREMENT); - } + VOID NTAPI CsqCompleteCancelledIrp(PIO_CSQ Csq, PIRP Irp) + { + KdPrint(("cancelling irp 0x%x\n", Irp)); + Irp->IoStatus.Status = STATUS_CANCELLED; + Irp->IoStatus.Information = 0; + IoCompleteRequest(Irp, IO_NO_INCREMENT); + } * */ typedef VOID (NTAPI *PIO_CSQ_COMPLETE_CANCELED_IRP) (struct _IO_CSQ *Csq, @@ -179,8 +183,8 @@ typedef VOID (NTAPI *PIO_CSQ_COMPLETE_CANCELED_IRP) (struct _IO_CSQ *Csq, * STRUCTURES * * NOTE: Please do not use these directly. You will make incompatible code - * if you do. Always only use the documented IoCsqXxx() interfaces and you will - * amass much Good Karma. + * if you do. Always only use the documented IoCsqXxx() interfaces and you + * will amass much Good Karma. */ #define IO_TYPE_CSQ_IRP_CONTEXT 1 #define IO_TYPE_CSQ 2 @@ -213,9 +217,9 @@ typedef struct _IO_CSQ_IRP_CONTEXT { /* * CANCEL-SAFE QUEUE DDIs * - * These device driver interfaces are called to make use of the queue. Again, authoritative - * documentation for these functions is in the DDK. The csqtest driver also makes use of - * some of them. + * These device driver interfaces are called to make use of the queue. Again, + * authoritative documentation for these functions is in the DDK. The csqtest + * driver also makes use of some of them. */ @@ -274,4 +278,3 @@ PIRP NTAPI IoCsqRemoveNextIrp(PIO_CSQ Csq, PVOID PeekContext); #endif /* _REACTOS_CSQ_H */ - From 7ae66a94b037123d771bc505f76e6eb8f14fbdeb Mon Sep 17 00:00:00 2001 From: Martin Fuchs Date: Sun, 6 Feb 2005 10:38:51 +0000 Subject: [PATCH 120/185] support for owner drawn context menus on the desktop svn path=/trunk/; revision=13433 --- .../system/explorer/desktop/desktop.cpp | 62 ++++++++++++++++++- .../subsys/system/explorer/desktop/desktop.h | 5 ++ 2 files changed, 65 insertions(+), 2 deletions(-) diff --git a/reactos/subsys/system/explorer/desktop/desktop.cpp b/reactos/subsys/system/explorer/desktop/desktop.cpp index 1a1036f9a54..321de231925 100644 --- a/reactos/subsys/system/explorer/desktop/desktop.cpp +++ b/reactos/subsys/system/explorer/desktop/desktop.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2003, 2004 Martin Fuchs + * Copyright 2003, 2004, 2005 Martin Fuchs * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -473,6 +473,11 @@ DesktopShellView::DesktopShellView(HWND hwnd, IShellView* pShellView) : super(hwnd), _pShellView(pShellView) { + _pctxmenu2 = NULL; +#ifndef __MINGW32__ // IContextMenu3 missing in MinGW (as of 6.2.2005) + _pctxmenu3 = NULL; +#endif + _hwndListView = ::GetNextWindow(hwnd, GW_CHILD); SetWindowStyle(_hwndListView, GetWindowStyle(_hwndListView)&~LVS_ALIGNMASK);//|LVS_ALIGNTOP|LVS_AUTOARRANGE); @@ -541,6 +546,36 @@ LRESULT DesktopShellView::WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam) case PM_DISPLAY_VERSION: return SendMessage(_hwndListView, nmsg, wparam, lparam); +#ifndef __MINGW32__ // IContextMenu3 missing in MinGW (as of 6.2.2005) + case WM_MENUCHAR: // only supported by IContextMenu3 + if (_pctxmenu3) { + LRESULT lResult = 0; + + _pctxmenu3->HandleMenuMsg2(nmsg, wparam, lparam, &lResult); + + return lResult; + } + break; +#endif + + case WM_DRAWITEM: + case WM_MEASUREITEM: + if (wparam) + break; // If wParam != 0 then the message is not menu-related. + + // fall through + + case WM_INITMENUPOPUP: +#ifndef __MINGW32__ // IContextMenu3 missing in MinGW (as of 6.2.2005) + if (_pctxmenu3) + _pctxmenu3->HandleMenuMsg(nmsg, wparam, lparam); + else +#endif + if (_pctxmenu2) + _pctxmenu2->HandleMenuMsg(nmsg, wparam, lparam); + + return nmsg==WM_INITMENUPOPUP? 0: TRUE; // Inform caller that we handled WM_INITPOPUPMENU by ourself. + default: return super::WndProc(nmsg, wparam, lparam); } @@ -599,11 +634,29 @@ bool DesktopShellView::DoContextMenu(int x, int y) HRESULT DesktopShellView::DoDesktopContextMenu(int x, int y) { + IContextMenu* pcm1; IContextMenu* pcm; - HRESULT hr = DesktopFolder()->GetUIObjectOf(_hwnd, 0, NULL, IID_IContextMenu, NULL, (LPVOID*)&pcm); + HRESULT hr = DesktopFolder()->GetUIObjectOf(_hwnd, 0, NULL, IID_IContextMenu, NULL, (LPVOID*)&pcm1); if (SUCCEEDED(hr)) { + // Get the higher version context menu interfaces. + _pctxmenu2 = NULL; +#ifndef __MINGW32__ // IContextMenu3 missing in MinGW (as of 6.2.2005) + _pctxmenu3 = NULL; + + if (pcm1->QueryInterface(IID_IContextMenu3, (void**)&pcm) == NOERROR) + _pctxmenu3 = (LPCONTEXTMENU3)pcm; + else +#endif + if (pcm1->QueryInterface (IID_IContextMenu2, (void**)&pcm) == NOERROR) + _pctxmenu2 = (LPCONTEXTMENU2)pcm; + + if (pcm) + pcm1->Release(); + else + pcm = pcm1; + HMENU hmenu = CreatePopupMenu(); if (hmenu) { @@ -615,6 +668,11 @@ HRESULT DesktopShellView::DoDesktopContextMenu(int x, int y) UINT idCmd = TrackPopupMenu(hmenu, TPM_LEFTALIGN|TPM_RETURNCMD|TPM_RIGHTBUTTON, x, y, 0, _hwnd, NULL); + _pctxmenu2 = NULL; +#ifndef __MINGW32__ // IContextMenu3 missing in MinGW (as of 6.2.2005) + _pctxmenu3 = NULL; +#endif + if (idCmd == FCIDM_SHVIEWLAST-1) { explorer_about(_hwnd); } else if (idCmd) { diff --git a/reactos/subsys/system/explorer/desktop/desktop.h b/reactos/subsys/system/explorer/desktop/desktop.h index 752a3de266f..599c7cb0514 100644 --- a/reactos/subsys/system/explorer/desktop/desktop.h +++ b/reactos/subsys/system/explorer/desktop/desktop.h @@ -187,4 +187,9 @@ protected: DesktopDropTarget* _pDropTarget; HWND _hwndListView; int _icon_algo; + + IContextMenu2* _pctxmenu2; +#ifndef __MINGW32__ // IContextMenu3 missing in MinGW (as of 6.2.2005) + IContextMenu3* _pctxmenu3; +#endif }; From 3af8771d1a0eb4b4fb2f84f3504fca1049b238c5 Mon Sep 17 00:00:00 2001 From: Martin Fuchs Date: Sun, 6 Feb 2005 10:50:50 +0000 Subject: [PATCH 121/185] prevent crash related to unsupported context menu types svn path=/trunk/; revision=13434 --- reactos/subsys/system/explorer/shell/pane.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/reactos/subsys/system/explorer/shell/pane.cpp b/reactos/subsys/system/explorer/shell/pane.cpp index 523e57dc190..079dc0d256c 100644 --- a/reactos/subsys/system/explorer/shell/pane.cpp +++ b/reactos/subsys/system/explorer/shell/pane.cpp @@ -491,9 +491,9 @@ void Pane::draw_item(LPDRAWITEMSTRUCT dis, Entry* entry, int calcWidthCol) // output type/class name if (visible_cols & COL_TYPE) { if (calcWidthCol == -1) - _out_wrkr.output_text(dis, _positions, col, entry->_type_name? entry->_type_name: TEXT(""), 0); + _out_wrkr.output_text(dis, _positions, col, entry->_type_name&&entry->_type_name!=LPSTR_TEXTCALLBACK? entry->_type_name: TEXT(""), 0); else if (calcWidthCol==col || calcWidthCol==COLUMNS) - calc_width(dis, col, entry->_type_name? entry->_type_name: TEXT("")); + calc_width(dis, col, entry->_type_name&&entry->_type_name!=LPSTR_TEXTCALLBACK? entry->_type_name: TEXT("")); } ++col; @@ -623,9 +623,9 @@ void Pane::draw_item(LPDRAWITEMSTRUCT dis, Entry* entry, int calcWidthCol) // output content / symbolic link target / comment if (visible_cols & COL_CONTENT) { if (calcWidthCol == -1) - _out_wrkr.output_text(dis, _positions, col, entry->_content? entry->_content: TEXT(""), 0); + _out_wrkr.output_text(dis, _positions, col, entry->_content&&entry->_content!=LPSTR_TEXTCALLBACK? entry->_content: TEXT(""), 0); else if (calcWidthCol==col || calcWidthCol==COLUMNS) - calc_width(dis, col, entry->_content? entry->_content: TEXT("")); + calc_width(dis, col, entry->_content&&entry->_content!=LPSTR_TEXTCALLBACK? entry->_content: TEXT("")); } } From b98bef3c5f3b932299bdb3c84a0ba4e8db223993 Mon Sep 17 00:00:00 2001 From: Filip Navara Date: Sun, 6 Feb 2005 12:39:41 +0000 Subject: [PATCH 122/185] Fix a typo. svn path=/trunk/; revision=13436 --- reactos/config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/config b/reactos/config index 4a6356a03ad..5a8c1f69da9 100644 --- a/reactos/config +++ b/reactos/config @@ -8,7 +8,7 @@ ARCH := i386 # # Which cpu should reactos optimze for -# example : i486, i586, pentium, pentium2, pentum3, pentium4 +# example : i486, i586, pentium, pentium2, pentium3, pentium4 # athlon-xp, athlon-mp, k6-2, # # see gcc manual for more cpu name and which cpu it can From ac1bda4c72e4f127e44753a6dd1ced7eff39db8b Mon Sep 17 00:00:00 2001 From: Martin Fuchs Date: Sun, 6 Feb 2005 13:02:48 +0000 Subject: [PATCH 123/185] generic support for owner drawn context menus svn path=/trunk/; revision=13437 --- .../system/explorer/desktop/desktop.cpp | 64 ++------------- .../subsys/system/explorer/desktop/desktop.h | 11 +-- reactos/subsys/system/explorer/doc/TODO.txt | 3 + .../subsys/system/explorer/shell/entries.cpp | 6 +- .../subsys/system/explorer/shell/entries.h | 2 +- .../system/explorer/shell/filechild.cpp | 8 +- .../subsys/system/explorer/shell/filechild.h | 4 +- .../system/explorer/shell/mainframe.cpp | 2 +- .../subsys/system/explorer/shell/mainframe.h | 8 +- reactos/subsys/system/explorer/shell/pane.cpp | 10 +-- .../system/explorer/shell/shellbrowser.cpp | 10 ++- .../system/explorer/shell/shellbrowser.h | 13 +++- .../subsys/system/explorer/shell/shellfs.cpp | 4 +- .../subsys/system/explorer/shell/shellfs.h | 2 +- .../system/explorer/taskbar/quicklaunch.cpp | 2 +- .../system/explorer/taskbar/quicklaunch.h | 4 +- .../system/explorer/taskbar/startmenu.cpp | 2 +- .../system/explorer/taskbar/startmenu.h | 8 +- .../system/explorer/utility/shellclasses.cpp | 63 +++++++++++++-- .../system/explorer/utility/shellclasses.h | 77 ++++++++++++++++++- 20 files changed, 193 insertions(+), 110 deletions(-) diff --git a/reactos/subsys/system/explorer/desktop/desktop.cpp b/reactos/subsys/system/explorer/desktop/desktop.cpp index 321de231925..2df46e25e18 100644 --- a/reactos/subsys/system/explorer/desktop/desktop.cpp +++ b/reactos/subsys/system/explorer/desktop/desktop.cpp @@ -473,11 +473,6 @@ DesktopShellView::DesktopShellView(HWND hwnd, IShellView* pShellView) : super(hwnd), _pShellView(pShellView) { - _pctxmenu2 = NULL; -#ifndef __MINGW32__ // IContextMenu3 missing in MinGW (as of 6.2.2005) - _pctxmenu3 = NULL; -#endif - _hwndListView = ::GetNextWindow(hwnd, GW_CHILD); SetWindowStyle(_hwndListView, GetWindowStyle(_hwndListView)&~LVS_ALIGNMASK);//|LVS_ALIGNTOP|LVS_AUTOARRANGE); @@ -531,7 +526,7 @@ LRESULT DesktopShellView::WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam) { switch(nmsg) { case WM_CONTEXTMENU: - if (!DoContextMenu(GET_X_LPARAM(lparam), GET_Y_LPARAM(lparam))) + if (!DoContextMenu(GET_X_LPARAM(lparam), GET_Y_LPARAM(lparam), _cm_ifs)) DoDesktopContextMenu(GET_X_LPARAM(lparam), GET_Y_LPARAM(lparam)); break; @@ -546,36 +541,6 @@ LRESULT DesktopShellView::WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam) case PM_DISPLAY_VERSION: return SendMessage(_hwndListView, nmsg, wparam, lparam); -#ifndef __MINGW32__ // IContextMenu3 missing in MinGW (as of 6.2.2005) - case WM_MENUCHAR: // only supported by IContextMenu3 - if (_pctxmenu3) { - LRESULT lResult = 0; - - _pctxmenu3->HandleMenuMsg2(nmsg, wparam, lparam, &lResult); - - return lResult; - } - break; -#endif - - case WM_DRAWITEM: - case WM_MEASUREITEM: - if (wparam) - break; // If wParam != 0 then the message is not menu-related. - - // fall through - - case WM_INITMENUPOPUP: -#ifndef __MINGW32__ // IContextMenu3 missing in MinGW (as of 6.2.2005) - if (_pctxmenu3) - _pctxmenu3->HandleMenuMsg(nmsg, wparam, lparam); - else -#endif - if (_pctxmenu2) - _pctxmenu2->HandleMenuMsg(nmsg, wparam, lparam); - - return nmsg==WM_INITMENUPOPUP? 0: TRUE; // Inform caller that we handled WM_INITPOPUPMENU by ourself. - default: return super::WndProc(nmsg, wparam, lparam); } @@ -593,7 +558,7 @@ int DesktopShellView::Notify(int id, NMHDR* pnmh) return super::Notify(id, pnmh); } -bool DesktopShellView::DoContextMenu(int x, int y) +bool DesktopShellView::DoContextMenu(int x, int y, CtxMenuInterfaces& cm_ifs) { IDataObject* selection; @@ -623,7 +588,7 @@ bool DesktopShellView::DoContextMenu(int x, int y) for(int i=pida->cidl; i>0; --i) apidl[i-1] = (LPCITEMIDLIST) ((LPBYTE)pida+pida->aoffset[i]); - hr = ShellFolderContextMenu(ShellFolder(parent_pidl), _hwnd, pida->cidl, apidl, x, y); + hr = ShellFolderContextMenu(ShellFolder(parent_pidl), _hwnd, pida->cidl, apidl, x, y, cm_ifs); selection->Release(); @@ -635,27 +600,11 @@ bool DesktopShellView::DoContextMenu(int x, int y) HRESULT DesktopShellView::DoDesktopContextMenu(int x, int y) { IContextMenu* pcm1; - IContextMenu* pcm; HRESULT hr = DesktopFolder()->GetUIObjectOf(_hwnd, 0, NULL, IID_IContextMenu, NULL, (LPVOID*)&pcm1); if (SUCCEEDED(hr)) { - // Get the higher version context menu interfaces. - _pctxmenu2 = NULL; -#ifndef __MINGW32__ // IContextMenu3 missing in MinGW (as of 6.2.2005) - _pctxmenu3 = NULL; - - if (pcm1->QueryInterface(IID_IContextMenu3, (void**)&pcm) == NOERROR) - _pctxmenu3 = (LPCONTEXTMENU3)pcm; - else -#endif - if (pcm1->QueryInterface (IID_IContextMenu2, (void**)&pcm) == NOERROR) - _pctxmenu2 = (LPCONTEXTMENU2)pcm; - - if (pcm) - pcm1->Release(); - else - pcm = pcm1; + IContextMenu* pcm = _cm_ifs.query_interfaces(pcm1); HMENU hmenu = CreatePopupMenu(); @@ -668,10 +617,7 @@ HRESULT DesktopShellView::DoDesktopContextMenu(int x, int y) UINT idCmd = TrackPopupMenu(hmenu, TPM_LEFTALIGN|TPM_RETURNCMD|TPM_RIGHTBUTTON, x, y, 0, _hwnd, NULL); - _pctxmenu2 = NULL; -#ifndef __MINGW32__ // IContextMenu3 missing in MinGW (as of 6.2.2005) - _pctxmenu3 = NULL; -#endif + _cm_ifs.reset(); if (idCmd == FCIDM_SHVIEWLAST-1) { explorer_about(_hwnd); diff --git a/reactos/subsys/system/explorer/desktop/desktop.h b/reactos/subsys/system/explorer/desktop/desktop.h index 599c7cb0514..751ffe4e18c 100644 --- a/reactos/subsys/system/explorer/desktop/desktop.h +++ b/reactos/subsys/system/explorer/desktop/desktop.h @@ -165,9 +165,9 @@ public: /// subclassed ShellView window -struct DesktopShellView : public SubclassedWindow +struct DesktopShellView : public ExtContextMenuHandlerT { - typedef SubclassedWindow super; + typedef ExtContextMenuHandlerT super; DesktopShellView(HWND hwnd, IShellView* pShellView); @@ -180,16 +180,11 @@ protected: int Command(int id, int code); int Notify(int id, NMHDR* pnmh); - bool DoContextMenu(int x, int y); + bool DoContextMenu(int x, int y, CtxMenuInterfaces& cm_ifs); HRESULT DoDesktopContextMenu(int x, int y); void PositionIcons(int dir=1); DesktopDropTarget* _pDropTarget; HWND _hwndListView; int _icon_algo; - - IContextMenu2* _pctxmenu2; -#ifndef __MINGW32__ // IContextMenu3 missing in MinGW (as of 6.2.2005) - IContextMenu3* _pctxmenu3; -#endif }; diff --git a/reactos/subsys/system/explorer/doc/TODO.txt b/reactos/subsys/system/explorer/doc/TODO.txt index 905cbb0b077..06d29af573c 100644 --- a/reactos/subsys/system/explorer/doc/TODO.txt +++ b/reactos/subsys/system/explorer/doc/TODO.txt @@ -24,4 +24,7 @@ - hide desktop bar when showing full screen applications - new start menu entry "Filemanager" close to "Explore" -> display C: and D: drive in MDI window - Startmenu: You can open the start menu by pressing Win-key, but can't close with another hit of Win-key. +- Export von Bookmarks für IE (+ Mozilla) + +- Search Programs -> performance monitor.msv -> Abort diff --git a/reactos/subsys/system/explorer/shell/entries.cpp b/reactos/subsys/system/explorer/shell/entries.cpp index cb008704068..4f12f01e474 100644 --- a/reactos/subsys/system/explorer/shell/entries.cpp +++ b/reactos/subsys/system/explorer/shell/entries.cpp @@ -401,7 +401,7 @@ BOOL Entry::launch_entry(HWND hwnd, UINT nCmdShow) } -HRESULT Entry::do_context_menu(HWND hwnd, const POINT& pos) +HRESULT Entry::do_context_menu(HWND hwnd, const POINT& pos, CtxMenuInterfaces& cm_ifs) { ShellPath shell_path = create_absolute_pidl(); LPCITEMIDLIST pidl_abs = shell_path; @@ -419,7 +419,7 @@ HRESULT Entry::do_context_menu(HWND hwnd, const POINT& pos) HRESULT hr = (*SHBindToParent)(pidl_abs, IID_IShellFolder, (LPVOID*)&parentFolder, &pidlLast); if (SUCCEEDED(hr)) { - hr = ShellFolderContextMenu(parentFolder, hwnd, 1, &pidlLast, pos.x, pos.y); + hr = ShellFolderContextMenu(parentFolder, hwnd, 1, &pidlLast, pos.x, pos.y, cm_ifs); parentFolder->Release(); } @@ -442,7 +442,7 @@ HRESULT Entry::do_context_menu(HWND hwnd, const POINT& pos) ShellFolder parent_folder = parent_path; return ShellFolderContextMenu(parent_folder, hwnd, 1, &pidl, pos.x, pos.y); */ - return ShellFolderContextMenu(GetDesktopFolder(), hwnd, 1, &pidl_abs, pos.x, pos.y); + return ShellFolderContextMenu(GetDesktopFolder(), hwnd, 1, &pidl_abs, pos.x, pos.y, cm_ifs); } } diff --git a/reactos/subsys/system/explorer/shell/entries.h b/reactos/subsys/system/explorer/shell/entries.h index a1861ec55c4..49991084e31 100644 --- a/reactos/subsys/system/explorer/shell/entries.h +++ b/reactos/subsys/system/explorer/shell/entries.h @@ -112,7 +112,7 @@ public: virtual ShellPath create_absolute_pidl() const {return (LPCITEMIDLIST)NULL;} virtual HRESULT GetUIObjectOf(HWND hWnd, REFIID riid, LPVOID* ppvOut); virtual BOOL launch_entry(HWND hwnd, UINT nCmdShow=SW_SHOWNORMAL); - virtual HRESULT do_context_menu(HWND hwnd, const POINT& pos); + virtual HRESULT do_context_menu(HWND hwnd, const POINT& pos, CtxMenuInterfaces& cm_ifs); }; diff --git a/reactos/subsys/system/explorer/shell/filechild.cpp b/reactos/subsys/system/explorer/shell/filechild.cpp index 3cedc016301..586165581f6 100644 --- a/reactos/subsys/system/explorer/shell/filechild.cpp +++ b/reactos/subsys/system/explorer/shell/filechild.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2003, 2004 Martin Fuchs + * Copyright 2003, 2004, 2005 Martin Fuchs * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -123,7 +123,7 @@ INT_PTR CALLBACK ExecuteDialog::WndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPA // FileChildWindow FileChildWindow::FileChildWindow(HWND hwnd, const FileChildWndInfo& info) - : ChildWindow(hwnd, info) + : super(hwnd, info) { CONTEXT("FileChildWindow::FileChildWindow()"); @@ -433,7 +433,7 @@ LRESULT FileChildWindow::WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam) if (dis->CtlID == IDW_TREE_LEFT) _left->draw_item(dis, entry); - else + else if (dis->CtlID == IDW_TREE_RIGHT) _right->draw_item(dis, entry); return TRUE;} @@ -507,7 +507,7 @@ LRESULT FileChildWindow::WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam) if (idx != -1) { Entry* entry = (Entry*) ListBox_GetItemData(*pane, idx); - CHECKERROR(entry->do_context_menu(_hwnd, pt_screen)); + CHECKERROR(entry->do_context_menu(_hwnd, pt_screen, _cm_ifs)); } break;} diff --git a/reactos/subsys/system/explorer/shell/filechild.h b/reactos/subsys/system/explorer/shell/filechild.h index d5d0721424c..a81ea0ddd0e 100644 --- a/reactos/subsys/system/explorer/shell/filechild.h +++ b/reactos/subsys/system/explorer/shell/filechild.h @@ -85,9 +85,9 @@ struct WebChildWndInfo : public FileChildWndInfo /// MDI child window displaying file lists -struct FileChildWindow : public ChildWindow +struct FileChildWindow : public ExtContextMenuHandlerT { - typedef ChildWindow super; + typedef ExtContextMenuHandlerT super; FileChildWindow(HWND hwnd, const FileChildWndInfo& info); diff --git a/reactos/subsys/system/explorer/shell/mainframe.cpp b/reactos/subsys/system/explorer/shell/mainframe.cpp index fadbec1907a..10699aa7b6d 100644 --- a/reactos/subsys/system/explorer/shell/mainframe.cpp +++ b/reactos/subsys/system/explorer/shell/mainframe.cpp @@ -1564,7 +1564,7 @@ void SDIMainFrame::update_shell_browser() } _shellBrowser = auto_ptr(new ShellBrowser(_hwnd, _left_hwnd, _right_hwnd, - _shellpath_info, _himlSmall, this)); + _shellpath_info, _himlSmall, this, _cm_ifs)); _shellBrowser->Init(_hwnd); diff --git a/reactos/subsys/system/explorer/shell/mainframe.h b/reactos/subsys/system/explorer/shell/mainframe.h index a41d6508e7c..5cdc3206ce5 100644 --- a/reactos/subsys/system/explorer/shell/mainframe.h +++ b/reactos/subsys/system/explorer/shell/mainframe.h @@ -124,9 +124,13 @@ protected: #endif -struct SDIMainFrame : public ShellBrowserChildT +struct SDIMainFrame : public ExtContextMenuHandlerT< + ShellBrowserChildT + > { - typedef ShellBrowserChildT super; + typedef ExtContextMenuHandlerT< + ShellBrowserChildT + > super; SDIMainFrame(HWND hwnd); diff --git a/reactos/subsys/system/explorer/shell/pane.cpp b/reactos/subsys/system/explorer/shell/pane.cpp index 079dc0d256c..975379939b5 100644 --- a/reactos/subsys/system/explorer/shell/pane.cpp +++ b/reactos/subsys/system/explorer/shell/pane.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2003, 2004 Martin Fuchs + * Copyright 2003, 2004, 2005 Martin Fuchs * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -491,9 +491,9 @@ void Pane::draw_item(LPDRAWITEMSTRUCT dis, Entry* entry, int calcWidthCol) // output type/class name if (visible_cols & COL_TYPE) { if (calcWidthCol == -1) - _out_wrkr.output_text(dis, _positions, col, entry->_type_name&&entry->_type_name!=LPSTR_TEXTCALLBACK? entry->_type_name: TEXT(""), 0); + _out_wrkr.output_text(dis, _positions, col, entry->_type_name? entry->_type_name: TEXT(""), 0); else if (calcWidthCol==col || calcWidthCol==COLUMNS) - calc_width(dis, col, entry->_type_name&&entry->_type_name!=LPSTR_TEXTCALLBACK? entry->_type_name: TEXT("")); + calc_width(dis, col, entry->_type_name? entry->_type_name: TEXT("")); } ++col; @@ -623,9 +623,9 @@ void Pane::draw_item(LPDRAWITEMSTRUCT dis, Entry* entry, int calcWidthCol) // output content / symbolic link target / comment if (visible_cols & COL_CONTENT) { if (calcWidthCol == -1) - _out_wrkr.output_text(dis, _positions, col, entry->_content&&entry->_content!=LPSTR_TEXTCALLBACK? entry->_content: TEXT(""), 0); + _out_wrkr.output_text(dis, _positions, col, entry->_content? entry->_content: TEXT(""), 0); else if (calcWidthCol==col || calcWidthCol==COLUMNS) - calc_width(dis, col, entry->_content&&entry->_content!=LPSTR_TEXTCALLBACK? entry->_content: TEXT("")); + calc_width(dis, col, entry->_content? entry->_content: TEXT("")); } } diff --git a/reactos/subsys/system/explorer/shell/shellbrowser.cpp b/reactos/subsys/system/explorer/shell/shellbrowser.cpp index 3f958eb0b57..91a4dd45e07 100644 --- a/reactos/subsys/system/explorer/shell/shellbrowser.cpp +++ b/reactos/subsys/system/explorer/shell/shellbrowser.cpp @@ -31,13 +31,15 @@ #include "../explorer_intres.h" -ShellBrowser::ShellBrowser(HWND hwnd, HWND left_hwnd, WindowHandle& right_hwnd, ShellPathInfo& create_info, HIMAGELIST himl, BrowserCallback* cb) +ShellBrowser::ShellBrowser(HWND hwnd, HWND left_hwnd, WindowHandle& right_hwnd, ShellPathInfo& create_info, + HIMAGELIST himl, BrowserCallback* cb, CtxMenuInterfaces& cm_ifs) : _hwnd(hwnd), _left_hwnd(left_hwnd), _right_hwnd(right_hwnd), _create_info(create_info), _himl(himl), - _callback(cb) + _callback(cb), + _cm_ifs(cm_ifs) { _pShellView = NULL; _pDropTarget = NULL; @@ -204,7 +206,7 @@ void ShellBrowser::OnTreeItemRClick(int idCtrl, LPNMHDR pnmh) Entry* entry = (Entry*)itemData; ClientToScreen(_left_hwnd, &tvhti.pt); - CHECKERROR(entry->do_context_menu(_hwnd, tvhti.pt)); + CHECKERROR(entry->do_context_menu(_hwnd, tvhti.pt, _cm_ifs)); } } } @@ -574,7 +576,7 @@ void MDIShellBrowserChild::update_shell_browser() } _shellBrowser = auto_ptr(new ShellBrowser(_hwnd, _left_hwnd, _right_hwnd, - _shellpath_info, _himlSmall, this)); + _shellpath_info, _himlSmall, this, _cm_ifs)); _shellBrowser->Init(_hwndFrame); } diff --git a/reactos/subsys/system/explorer/shell/shellbrowser.h b/reactos/subsys/system/explorer/shell/shellbrowser.h index 18360e9faac..d256a6b03c2 100644 --- a/reactos/subsys/system/explorer/shell/shellbrowser.h +++ b/reactos/subsys/system/explorer/shell/shellbrowser.h @@ -57,7 +57,8 @@ struct BrowserCallback /// Implementation of IShellBrowserImpl interface in explorer child windows struct ShellBrowser : public IShellBrowserImpl { - ShellBrowser(HWND hwnd, HWND left_hwnd, WindowHandle& right_hwnd, ShellPathInfo& create_info, HIMAGELIST himl, BrowserCallback* cb); + ShellBrowser(HWND hwnd, HWND left_hwnd, WindowHandle& right_hwnd, ShellPathInfo& create_info, + HIMAGELIST himl, BrowserCallback* cb, CtxMenuInterfaces& cm_ifs); virtual ~ShellBrowser(); //IOleWindow @@ -153,6 +154,8 @@ protected: Root _root; ShellDirectory* _cur_dir; + CtxMenuInterfaces& _cm_ifs; + void InitializeTree(HIMAGELIST himl); bool InitDragDrop(); @@ -231,9 +234,13 @@ protected: #ifndef _NO_MDI -struct MDIShellBrowserChild : public ShellBrowserChildT +struct MDIShellBrowserChild : public ExtContextMenuHandlerT< + ShellBrowserChildT + > { - typedef ShellBrowserChildT super; + typedef ExtContextMenuHandlerT< + ShellBrowserChildT + > super; MDIShellBrowserChild(HWND hwnd, const ShellChildWndInfo& info); diff --git a/reactos/subsys/system/explorer/shell/shellfs.cpp b/reactos/subsys/system/explorer/shell/shellfs.cpp index 49748a7f60e..d6360979dae 100644 --- a/reactos/subsys/system/explorer/shell/shellfs.cpp +++ b/reactos/subsys/system/explorer/shell/shellfs.cpp @@ -202,14 +202,14 @@ BOOL ShellEntry::launch_entry(HWND hwnd, UINT nCmdShow) } -HRESULT ShellEntry::do_context_menu(HWND hwnd, LPPOINT pptScreen) +HRESULT ShellEntry::do_context_menu(HWND hwnd, LPPOINT pptScreen, CtxMenuInterfaces& cm_ifs) { ShellDirectory* dir = static_cast(_up); ShellFolder folder = dir? dir->_folder: GetDesktopFolder(); LPCITEMIDLIST pidl = _pidl; - return ShellFolderContextMenu(folder, hwnd, 1, &pidl, pptScreen->x, pptScreen->y); + return ShellFolderContextMenu(folder, hwnd, 1, &pidl, pptScreen->x, pptScreen->y, cm_ifs); } diff --git a/reactos/subsys/system/explorer/shell/shellfs.h b/reactos/subsys/system/explorer/shell/shellfs.h index dd5576fc68d..9f8276d18db 100644 --- a/reactos/subsys/system/explorer/shell/shellfs.h +++ b/reactos/subsys/system/explorer/shell/shellfs.h @@ -36,7 +36,7 @@ struct ShellEntry : public Entry virtual ShellPath create_absolute_pidl() const; virtual HRESULT GetUIObjectOf(HWND hWnd, REFIID riid, LPVOID* ppvOut); virtual BOOL launch_entry(HWND hwnd, UINT nCmdShow=SW_SHOWNORMAL); - virtual HRESULT do_context_menu(HWND hwnd, LPPOINT pptScreen); + virtual HRESULT do_context_menu(HWND hwnd, LPPOINT pptScreen, CtxMenuInterfaces& cm_ifs); IShellFolder* get_parent_folder() const; diff --git a/reactos/subsys/system/explorer/taskbar/quicklaunch.cpp b/reactos/subsys/system/explorer/taskbar/quicklaunch.cpp index 529324c4187..464ab3a0826 100644 --- a/reactos/subsys/system/explorer/taskbar/quicklaunch.cpp +++ b/reactos/subsys/system/explorer/taskbar/quicklaunch.cpp @@ -247,7 +247,7 @@ LRESULT QuickLaunchBar::WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam) } if (entry) // entry is NULL for desktop switch buttons - CHECKERROR(entry->do_context_menu(_hwnd, screen_pt)); + CHECKERROR(entry->do_context_menu(_hwnd, screen_pt, _cm_ifs)); else goto def; break;} diff --git a/reactos/subsys/system/explorer/taskbar/quicklaunch.h b/reactos/subsys/system/explorer/taskbar/quicklaunch.h index ff1230ca567..f50b4d9b9d2 100644 --- a/reactos/subsys/system/explorer/taskbar/quicklaunch.h +++ b/reactos/subsys/system/explorer/taskbar/quicklaunch.h @@ -57,9 +57,9 @@ struct QuickLaunchMap : public map /// quick launch bar window -struct QuickLaunchBar : public SubclassedWindow +struct QuickLaunchBar : public ExtContextMenuHandlerT { - typedef SubclassedWindow super; + typedef ExtContextMenuHandlerT super; QuickLaunchBar(HWND hwnd); ~QuickLaunchBar(); diff --git a/reactos/subsys/system/explorer/taskbar/startmenu.cpp b/reactos/subsys/system/explorer/taskbar/startmenu.cpp index 70befc550ba..d630b8b2203 100644 --- a/reactos/subsys/system/explorer/taskbar/startmenu.cpp +++ b/reactos/subsys/system/explorer/taskbar/startmenu.cpp @@ -442,7 +442,7 @@ LRESULT StartMenu::WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam) Entry* entry = *it; if (entry) { - CHECKERROR(entry->do_context_menu(_hwnd, screen_pt)); // may close start menu because of focus loss + CHECKERROR(entry->do_context_menu(_hwnd, screen_pt, _cm_ifs)); // may close start menu because of focus loss break; ///@todo handle context menu for more than one entry } } diff --git a/reactos/subsys/system/explorer/taskbar/startmenu.h b/reactos/subsys/system/explorer/taskbar/startmenu.h index fb2a9e72666..21bb72d31af 100644 --- a/reactos/subsys/system/explorer/taskbar/startmenu.h +++ b/reactos/subsys/system/explorer/taskbar/startmenu.h @@ -202,15 +202,15 @@ extern void DrawStartMenuButton(HDC hdc, const RECT& rect, LPCTSTR title, HICON */ struct StartMenu : #ifdef _LIGHT_STARTMENU - public OwnerDrawParent + public ExtContextMenuHandlerT > #else - public OwnerDrawParent + public ExtContextMenuHandlerT > #endif { #ifdef _LIGHT_STARTMENU - typedef OwnerDrawParent super; + typedef ExtContextMenuHandlerT > super; #else - typedef OwnerDrawParent super; + typedef ExtContextMenuHandlerT > super; #endif StartMenu(HWND hwnd); diff --git a/reactos/subsys/system/explorer/utility/shellclasses.cpp b/reactos/subsys/system/explorer/utility/shellclasses.cpp index 4b999d97610..fdc477391e6 100644 --- a/reactos/subsys/system/explorer/utility/shellclasses.cpp +++ b/reactos/subsys/system/explorer/utility/shellclasses.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2003, 2004 Martin Fuchs + * Copyright 2003, 2004, 2005 Martin Fuchs * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -472,14 +472,65 @@ SpecialFolderFSPath::SpecialFolderFSPath(int folder, HWND hwnd) } -HRESULT ShellFolderContextMenu(IShellFolder* shell_folder, HWND hwndParent, int cidl, LPCITEMIDLIST* apidl, int x, int y) +void CtxMenuInterfaces::reset() { - IContextMenu* pcm; + _pctxmenu2 = NULL; - HRESULT hr = shell_folder->GetUIObjectOf(hwndParent, cidl, apidl, IID_IContextMenu, NULL, (LPVOID*)&pcm); -// HRESULT hr = CDefFolderMenu_Create2(dir?dir->_pidl:DesktopFolder(), hwndParent, 1, &pidl, shell_folder, NULL, 0, NULL, &pcm); +#ifndef __MINGW32__ // IContextMenu3 missing in MinGW (as of 6.2.2005) + _pctxmenu3 = NULL; +#endif +} + +bool CtxMenuInterfaces::HandleMenuMsg(UINT nmsg, WPARAM wparam, LPARAM lparam) +{ +#ifndef __MINGW32__ // IContextMenu3 missing in MinGW (as of 6.2.2005) + if (_pctxmenu3) { + if (SUCCEEDED(_pctxmenu3->HandleMenuMsg(nmsg, wparam, lparam))) + return true; + } +#endif + + if (_pctxmenu2) + if (SUCCEEDED(_pctxmenu2->HandleMenuMsg(nmsg, wparam, lparam))) + return true; + + return false; +} + +IContextMenu* CtxMenuInterfaces::query_interfaces(IContextMenu* pcm1) +{ + IContextMenu* pcm = NULL; + + reset(); + + // Get the higher version context menu interfaces. +#ifndef __MINGW32__ // IContextMenu3 missing in MinGW (as of 6.2.2005) + if (pcm1->QueryInterface(IID_IContextMenu3, (void**)&pcm) == NOERROR) + _pctxmenu3 = (LPCONTEXTMENU3)pcm; + else +#endif + if (pcm1->QueryInterface (IID_IContextMenu2, (void**)&pcm) == NOERROR) + _pctxmenu2 = (LPCONTEXTMENU2)pcm; + + if (pcm) { + pcm1->Release(); + return pcm; + } else + return pcm1; +} + + +HRESULT ShellFolderContextMenu(IShellFolder* shell_folder, HWND hwndParent, int cidl, + LPCITEMIDLIST* apidl, int x, int y, CtxMenuInterfaces& cm_ifs) +{ + IContextMenu* pcm1; + + HRESULT hr = shell_folder->GetUIObjectOf(hwndParent, cidl, apidl, IID_IContextMenu, NULL, (LPVOID*)&pcm1); +// HRESULT hr = CDefFolderMenu_Create2(dir?dir->_pidl:DesktopFolder(), hwndParent, 1, &pidl, shell_folder, NULL, 0, NULL, &pcm1); if (SUCCEEDED(hr)) { + IContextMenu* pcm = cm_ifs.query_interfaces(pcm1); + HMENU hmenu = CreatePopupMenu(); if (hmenu) { @@ -488,6 +539,8 @@ HRESULT ShellFolderContextMenu(IShellFolder* shell_folder, HWND hwndParent, int if (SUCCEEDED(hr)) { UINT idCmd = TrackPopupMenu(hmenu, TPM_LEFTALIGN|TPM_RETURNCMD|TPM_RIGHTBUTTON, x, y, 0, hwndParent, NULL); + cm_ifs.reset(); + if (idCmd) { CMINVOKECOMMANDINFO cmi; diff --git a/reactos/subsys/system/explorer/utility/shellclasses.h b/reactos/subsys/system/explorer/utility/shellclasses.h index f3e66a47265..0e1f6ff7dfe 100644 --- a/reactos/subsys/system/explorer/utility/shellclasses.h +++ b/reactos/subsys/system/explorer/utility/shellclasses.h @@ -1,5 +1,5 @@ /* - * Copyright 2003, 2004 Martin Fuchs + * Copyright 2003, 2004, 2005 Martin Fuchs * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -1003,4 +1003,77 @@ protected: LPIDA _pIDList; }; -extern HRESULT ShellFolderContextMenu(IShellFolder* shell_folder, HWND hwndParent, int cidl, LPCITEMIDLIST* ppidl, int x, int y); + +struct CtxMenuInterfaces +{ + CtxMenuInterfaces() + { + reset(); + } + + void reset(); + bool HandleMenuMsg(UINT nmsg, WPARAM wparam, LPARAM lparam); + IContextMenu* query_interfaces(IContextMenu* pcm1); + + IContextMenu2* _pctxmenu2; + +#ifndef __MINGW32__ // IContextMenu3 missing in MinGW (as of 6.2.2005) + IContextMenu3* _pctxmenu3; +#endif +}; + +template struct ExtContextMenuHandlerT + : public BASE +{ + typedef BASE super; + + ExtContextMenuHandlerT(HWND hwnd) + : super(hwnd) + { + } + + template ExtContextMenuHandlerT(HWND hwnd, const PARA& info) + : super(hwnd, info) + { + } + + LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam) + { + switch(nmsg) { + case WM_DRAWITEM: + case WM_MEASUREITEM: + if (!wparam) // Is the message menu-related? + if (_cm_ifs.HandleMenuMsg(nmsg, wparam, lparam)) + return TRUE; + + break; + + case WM_INITMENUPOPUP: + if (_cm_ifs.HandleMenuMsg(nmsg, wparam, lparam)) + return 0; + + break; + +#ifndef __MINGW32__ // IContextMenu3 missing in MinGW (as of 6.2.2005) + case WM_MENUCHAR: // only supported by IContextMenu3 + if (_cm_ifs._pctxmenu3) { + LRESULT lResult = 0; + + _cm_ifs._pctxmenu3->HandleMenuMsg2(nmsg, wparam, lparam, &lResult); + + return lResult; + } + + return 0; +#endif + } + + return super::WndProc(nmsg, wparam, lparam); + } + +protected: + CtxMenuInterfaces _cm_ifs; +}; + +extern HRESULT ShellFolderContextMenu(IShellFolder* shell_folder, HWND hwndParent, int cidl, + LPCITEMIDLIST* ppidl, int x, int y, CtxMenuInterfaces& cm_ifs); From 32ded4ebffb73eef66f35f3f921e76f01f231e54 Mon Sep 17 00:00:00 2001 From: Martin Fuchs Date: Sun, 6 Feb 2005 13:12:07 +0000 Subject: [PATCH 124/185] fix warning message svn path=/trunk/; revision=13438 --- reactos/subsys/system/explorer/i386-stub-win32.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/reactos/subsys/system/explorer/i386-stub-win32.c b/reactos/subsys/system/explorer/i386-stub-win32.c index 2fa2d56643f..5387fe18a2c 100644 --- a/reactos/subsys/system/explorer/i386-stub-win32.c +++ b/reactos/subsys/system/explorer/i386-stub-win32.c @@ -625,13 +625,10 @@ putpacket (unsigned char *buffer) while (getDebugChar () != '+'); } -void -debug_error (format, parm) - char *format; - char *parm; +void debug_error (char* format/*, char* parm*/) { if (remote_debug) - fprintf (stderr, format, parm); + fprintf (stderr, format/*, parm*/); } /* Address of a routine to RTE to if we get a memory fault. */ From 24ed9a6f955a63c3f4f7cc96b73ebc8a8bec5a64 Mon Sep 17 00:00:00 2001 From: Martin Fuchs Date: Sun, 6 Feb 2005 13:28:34 +0000 Subject: [PATCH 125/185] owner drawn context menus for FileChild svn path=/trunk/; revision=13439 --- reactos/subsys/system/explorer/shell/filechild.cpp | 9 ++++++--- reactos/subsys/system/explorer/taskbar/quicklaunch.cpp | 2 +- reactos/subsys/system/explorer/taskbar/quicklaunch.h | 2 +- reactos/subsys/system/explorer/taskbar/taskbar.cpp | 2 +- reactos/subsys/system/explorer/taskbar/taskbar.h | 2 +- 5 files changed, 10 insertions(+), 7 deletions(-) diff --git a/reactos/subsys/system/explorer/shell/filechild.cpp b/reactos/subsys/system/explorer/shell/filechild.cpp index 586165581f6..bf457183610 100644 --- a/reactos/subsys/system/explorer/shell/filechild.cpp +++ b/reactos/subsys/system/explorer/shell/filechild.cpp @@ -431,12 +431,15 @@ LRESULT FileChildWindow::WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam) LPDRAWITEMSTRUCT dis = (LPDRAWITEMSTRUCT)lparam; Entry* entry = (Entry*) dis->itemData; - if (dis->CtlID == IDW_TREE_LEFT) + if (dis->CtlID == IDW_TREE_LEFT) { _left->draw_item(dis, entry); - else if (dis->CtlID == IDW_TREE_RIGHT) + return TRUE; + } else if (dis->CtlID == IDW_TREE_RIGHT) { _right->draw_item(dis, entry); + return TRUE; + } - return TRUE;} + goto def;} case WM_SIZE: if (wparam != SIZE_MINIMIZED) diff --git a/reactos/subsys/system/explorer/taskbar/quicklaunch.cpp b/reactos/subsys/system/explorer/taskbar/quicklaunch.cpp index 464ab3a0826..f10fb26a7f3 100644 --- a/reactos/subsys/system/explorer/taskbar/quicklaunch.cpp +++ b/reactos/subsys/system/explorer/taskbar/quicklaunch.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2003, 2004 Martin Fuchs + * Copyright 2003, 2004, 2005 Martin Fuchs * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/reactos/subsys/system/explorer/taskbar/quicklaunch.h b/reactos/subsys/system/explorer/taskbar/quicklaunch.h index f50b4d9b9d2..cd762a44110 100644 --- a/reactos/subsys/system/explorer/taskbar/quicklaunch.h +++ b/reactos/subsys/system/explorer/taskbar/quicklaunch.h @@ -1,5 +1,5 @@ /* - * Copyright 2003, 2004 Martin Fuchs + * Copyright 2003, 2004, 2005 Martin Fuchs * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/reactos/subsys/system/explorer/taskbar/taskbar.cpp b/reactos/subsys/system/explorer/taskbar/taskbar.cpp index dc0b214dfe3..c18f1a1c550 100644 --- a/reactos/subsys/system/explorer/taskbar/taskbar.cpp +++ b/reactos/subsys/system/explorer/taskbar/taskbar.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2003, 2004 Martin Fuchs + * Copyright 2003, 2004, 2005 Martin Fuchs * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/reactos/subsys/system/explorer/taskbar/taskbar.h b/reactos/subsys/system/explorer/taskbar/taskbar.h index 6337ec3cbe5..bc1d4e0bb03 100644 --- a/reactos/subsys/system/explorer/taskbar/taskbar.h +++ b/reactos/subsys/system/explorer/taskbar/taskbar.h @@ -1,5 +1,5 @@ /* - * Copyright 2003, 2004 Martin Fuchs + * Copyright 2003, 2004, 2005 Martin Fuchs * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public From 97715243ac8c68bcb890abd598aab90c9ac3c10d Mon Sep 17 00:00:00 2001 From: Martin Fuchs Date: Sun, 6 Feb 2005 14:03:25 +0000 Subject: [PATCH 126/185] owner drawn context menus for lean explorer version svn path=/trunk/; revision=13440 --- reactos/subsys/system/explorer/desktop/desktop.cpp | 8 ++++---- reactos/subsys/system/explorer/utility/shellclasses.cpp | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/reactos/subsys/system/explorer/desktop/desktop.cpp b/reactos/subsys/system/explorer/desktop/desktop.cpp index 2df46e25e18..626c1689439 100644 --- a/reactos/subsys/system/explorer/desktop/desktop.cpp +++ b/reactos/subsys/system/explorer/desktop/desktop.cpp @@ -522,7 +522,7 @@ bool DesktopShellView::InitDragDrop() return true; } -LRESULT DesktopShellView::WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam) +LRESULT DesktopShellView::WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam) { switch(nmsg) { case WM_CONTEXTMENU: @@ -599,12 +599,12 @@ bool DesktopShellView::DoContextMenu(int x, int y, CtxMenuInterfaces& cm_ifs) HRESULT DesktopShellView::DoDesktopContextMenu(int x, int y) { - IContextMenu* pcm1; + IContextMenu* pcm; - HRESULT hr = DesktopFolder()->GetUIObjectOf(_hwnd, 0, NULL, IID_IContextMenu, NULL, (LPVOID*)&pcm1); + HRESULT hr = DesktopFolder()->GetUIObjectOf(_hwnd, 0, NULL, IID_IContextMenu, NULL, (LPVOID*)&pcm); if (SUCCEEDED(hr)) { - IContextMenu* pcm = _cm_ifs.query_interfaces(pcm1); + pcm = _cm_ifs.query_interfaces(pcm); HMENU hmenu = CreatePopupMenu(); diff --git a/reactos/subsys/system/explorer/utility/shellclasses.cpp b/reactos/subsys/system/explorer/utility/shellclasses.cpp index fdc477391e6..bbe52b3ffa6 100644 --- a/reactos/subsys/system/explorer/utility/shellclasses.cpp +++ b/reactos/subsys/system/explorer/utility/shellclasses.cpp @@ -523,13 +523,13 @@ IContextMenu* CtxMenuInterfaces::query_interfaces(IContextMenu* pcm1) HRESULT ShellFolderContextMenu(IShellFolder* shell_folder, HWND hwndParent, int cidl, LPCITEMIDLIST* apidl, int x, int y, CtxMenuInterfaces& cm_ifs) { - IContextMenu* pcm1; + IContextMenu* pcm; - HRESULT hr = shell_folder->GetUIObjectOf(hwndParent, cidl, apidl, IID_IContextMenu, NULL, (LPVOID*)&pcm1); -// HRESULT hr = CDefFolderMenu_Create2(dir?dir->_pidl:DesktopFolder(), hwndParent, 1, &pidl, shell_folder, NULL, 0, NULL, &pcm1); + HRESULT hr = shell_folder->GetUIObjectOf(hwndParent, cidl, apidl, IID_IContextMenu, NULL, (LPVOID*)&pcm); +// HRESULT hr = CDefFolderMenu_Create2(dir?dir->_pidl:DesktopFolder(), hwndParent, 1, &pidl, shell_folder, NULL, 0, NULL, &pcm); if (SUCCEEDED(hr)) { - IContextMenu* pcm = cm_ifs.query_interfaces(pcm1); + pcm = cm_ifs.query_interfaces(pcm); HMENU hmenu = CreatePopupMenu(); From d31b888c467a2e1c849842df92f0436ead22514b Mon Sep 17 00:00:00 2001 From: Mike Nordell Date: Sun, 6 Feb 2005 14:13:32 +0000 Subject: [PATCH 127/185] Remove COM1 as default debug messages output channel for LiveCD. If users are skilled enough to make use of it, it can be turned on manually during boot. svn path=/trunk/; revision=13441 --- reactos/bootdata/livecd.ini | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/reactos/bootdata/livecd.ini b/reactos/bootdata/livecd.ini index 8cd3e69d157..405be51c7b1 100644 --- a/reactos/bootdata/livecd.ini +++ b/reactos/bootdata/livecd.ini @@ -25,5 +25,4 @@ ReactOS="ReactOS" [ReactOS] BootType=ReactOS SystemPath=LiveCD -Options=/DEBUGPORT=COM1 - \ No newline at end of file +Options= From e0d93266302e107fae9003be262aabe443519521 Mon Sep 17 00:00:00 2001 From: Emanuele Aliberti Date: Sun, 6 Feb 2005 16:59:55 +0000 Subject: [PATCH 128/185] SM & SMDLL definitions svn path=/trunk/; revision=13442 --- reactos/include/sm/api.h | 72 +++++++++++++++++++++++++++++++++++++ reactos/include/sm/helper.h | 46 ++++++++++++++++++++++++ 2 files changed, 118 insertions(+) create mode 100644 reactos/include/sm/api.h create mode 100644 reactos/include/sm/helper.h diff --git a/reactos/include/sm/api.h b/reactos/include/sm/api.h new file mode 100644 index 00000000000..17bf653dcb8 --- /dev/null +++ b/reactos/include/sm/api.h @@ -0,0 +1,72 @@ +/* $Id$ */ +#ifndef __SM_API_H +#define __SM_API_H + +#define SM_API_PORT_NAME L"\\SmApiPort" +#define SM_DBGSS_PORT_NAME L"\\DbgSsApiPort" +#define SM_DBGUI_PORT_NAME L"\\DbgUiApiPort" + +#pragma pack(push,4) + +/*** 1 ****************************************************************/ + +#define SM_API_COMPLETE_SESSION 1 /* complete a session initialization */ + +typedef struct _SM_PORT_MESSAGE_COMPSES +{ + HANDLE hApiPort; + HANDLE hSbApiPort; + +} SM_PORT_MESSAGE_COMPSES, *PSM_PORT_MESSAGE_COMPSES; + +/*** 2 ****************************************************************/ + +#define SM_API_2 2 + +/* obsolete */ + +/*** 3 ****************************************************************/ + +#define SM_API_3 3 + +/* unknown */ + +/*** 4 ****************************************************************/ + +#define SM_API_EXECUTE_PROGRAMME 4 /* start a subsystem (server) */ + +#define SM_EXEXPGM_MAX_LENGTH 32 /* max count of wide string */ + +typedef struct _SM_PORT_MESSAGE_EXECPGM +{ + ULONG NameLength; + WCHAR Name [SM_EXEXPGM_MAX_LENGTH]; + +} SM_PORT_MESSAGE_EXECPGM, *PSM_PORT_MESSAGE_EXECPGM; + +/*** | ****************************************************************/ + +typedef struct _SM_PORT_MESSAGE +{ + /*** LPC common header ***/ + LPC_MESSAGE Header; + /*** SM common header ***/ + DWORD ApiIndex; + NTSTATUS Status; + /*** SM per API arguments ***/ + union { + SM_PORT_MESSAGE_COMPSES CompSes; + SM_PORT_MESSAGE_EXECPGM ExecPgm; + }; + +} SM_PORT_MESSAGE, * PSM_PORT_MESSAGE; + +#pragma pack(pop) + +/*** MACRO ***********************************************************/ + +#define SM_PORT_DATA_SIZE(c) (sizeof(DWORD)+sizeof(NTSTATUS)+sizeof(c)) +#define SM_PORT_MESSAGE_SIZE (sizeof(SM_PORT_MESSAGE)) + + +#endif /* !def __SM_API_H */ diff --git a/reactos/include/sm/helper.h b/reactos/include/sm/helper.h new file mode 100644 index 00000000000..c18dde35043 --- /dev/null +++ b/reactos/include/sm/helper.h @@ -0,0 +1,46 @@ +#ifndef _SM_HELPER_H + +/*** DATA TYPES ******************************************************/ + +#define SM_SB_NAME_MAX_LENGTH 120 + +#pragma pack(push,4) + +/* SmConnectApiPort */ +typedef struct _SM_CONNECT_DATA +{ + ULONG Subsystem; + WCHAR SbName [SM_SB_NAME_MAX_LENGTH]; + +} SM_CONNECT_DATA, *PSM_CONNECT_DATA; + +/* SmpConnectSbApiPort */ +typedef struct _SB_CONNECT_DATA +{ + ULONG SmApiMax; +} SB_CONNECT_DATA, *PSB_CONNECT_DATA; + +#pragma pack(pop) + + +/*** PROTOTYPES ******************************************************/ + + +/* smdll/connect.c */ +NTSTATUS STDCALL +SmConnectApiPort (IN PUNICODE_STRING pSbApiPortName OPTIONAL, + IN HANDLE hSbApiPort OPTIONAL, + IN DWORD dwSubsystem OPTIONAL, /* pe.h */ + IN OUT PHANDLE phSmApiPort); +/* smdll/compses.c */ +NTSTATUS STDCALL +SmCompleteSession (IN HANDLE hSmApiPort, + IN HANDLE hSbApiPort, + IN HANDLE hApiPort); +/* smdll/execpgm.c */ +NTSTATUS STDCALL +SmExecuteProgram (IN HANDLE hSmApiPort, + IN PUNICODE_STRING Pgm + ); + +#endif /* ndef _SM_HELPER_H */ From 90b5ddc4624e6657d35275c243de552404ca92a8 Mon Sep 17 00:00:00 2001 From: Emanuele Aliberti Date: Sun, 6 Feb 2005 17:00:53 +0000 Subject: [PATCH 129/185] SMDLL: helper to use the SM svn path=/trunk/; revision=13443 --- reactos/lib/smdll/compses.c | 39 +++++++++++++++++ reactos/lib/smdll/connect.c | 83 ++++++++++++++++++++++++++++++++++++ reactos/lib/smdll/dllmain.c | 17 ++++++++ reactos/lib/smdll/execpgm.c | 49 +++++++++++++++++++++ reactos/lib/smdll/makefile | 34 +++++++++++++++ reactos/lib/smdll/readme.txt | 18 ++++++++ reactos/lib/smdll/smdll.def | 5 +++ reactos/lib/smdll/smdll.rc | 4 ++ reactos/lib/smdll/testapi.c | 20 +++++++++ 9 files changed, 269 insertions(+) create mode 100644 reactos/lib/smdll/compses.c create mode 100644 reactos/lib/smdll/connect.c create mode 100644 reactos/lib/smdll/dllmain.c create mode 100644 reactos/lib/smdll/execpgm.c create mode 100644 reactos/lib/smdll/makefile create mode 100644 reactos/lib/smdll/readme.txt create mode 100644 reactos/lib/smdll/smdll.def create mode 100644 reactos/lib/smdll/smdll.rc create mode 100644 reactos/lib/smdll/testapi.c diff --git a/reactos/lib/smdll/compses.c b/reactos/lib/smdll/compses.c new file mode 100644 index 00000000000..9f7e324f957 --- /dev/null +++ b/reactos/lib/smdll/compses.c @@ -0,0 +1,39 @@ +/* $Id$ + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: lib/smlib/compses.c + * PURPOSE: Call SM API SM_API_COMPLETE_SESSION + */ +#define NTOS_MODE_USER +#include +#include +#include + +NTSTATUS STDCALL +SmCompleteSession (HANDLE hSmApiPort, HANDLE hSbApiPort, HANDLE hApiPort) +{ + NTSTATUS Status; + SM_PORT_MESSAGE SmReqMsg; + + /* Marshal Ses in the LPC message */ + SmReqMsg.CompSes.hApiPort = hApiPort; + SmReqMsg.CompSes.hSbApiPort = hSbApiPort; + + /* SM API to invoke */ + SmReqMsg.ApiIndex = SM_API_COMPLETE_SESSION; + + /* Port message */ + SmReqMsg.Header.MessageType = LPC_NEW_MESSAGE; + SmReqMsg.Header.DataSize = SM_PORT_DATA_SIZE(SmReqMsg.CompSes); + SmReqMsg.Header.MessageSize = SM_PORT_MESSAGE_SIZE; + Status = NtRequestWaitReplyPort (hSmApiPort, (PLPC_MESSAGE) & SmReqMsg, (PLPC_MESSAGE) & SmReqMsg); + if (NT_SUCCESS(Status)) + { + return SmReqMsg.Status; + } + DbgPrint ("%s failed (Status=0x%08lx)\n", __FUNCTION__, Status); + return Status; +} + +/* EOF */ diff --git a/reactos/lib/smdll/connect.c b/reactos/lib/smdll/connect.c new file mode 100644 index 00000000000..1ac5d51d6f6 --- /dev/null +++ b/reactos/lib/smdll/connect.c @@ -0,0 +1,83 @@ +/* $Id$ + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: reactos/lib/smdll/connect.c + * PURPOSE: Connect to the API LPC port exposed by the SM + */ +#define NTOS_MODE_USER +#include +#include +#include +#include + +/********************************************************************** + * NAME EXPORTED + * SmConnectApiPort/4 + * + * DESCRIPTION + * Connect to SM API port and register a session "begin" port (Sb) + * or to issue API requests to SmApiPort. + * + * ARGUMENTS + * pSbApiPortName: name of the Sb port the calling subsystem + * server already created in the system name space; + * hSbApiPort: LPC port handle (checked, but not used); + * dwSubsystem: a valid IMAGE_SUBSYSTEM_xxx value; + * phSmApiPort: a pointer to a HANDLE, which will be + * filled with a valid client-side LPC comm port. + * + * RETURN VALUE + * If all three optional values are omitted, an LPC status. + * STATUS_INVALID_PARAMETER_MIX if PortName is defined and + * both hSbApiPort and dwSubsystem are 0. + */ +NTSTATUS STDCALL +SmConnectApiPort (IN PUNICODE_STRING pSbApiPortName OPTIONAL, + IN HANDLE hSbApiPort OPTIONAL, + IN DWORD dwSubsystem OPTIONAL, + IN OUT PHANDLE phSmApiPort) +{ + UNICODE_STRING SmApiPortName; + SECURITY_QUALITY_OF_SERVICE SecurityQos; + NTSTATUS Status = STATUS_SUCCESS; + SM_CONNECT_DATA ConnectData = {0,{0}}; + ULONG ConnectDataLength = 0; + + if (pSbApiPortName) + { + if (NULL == hSbApiPort || IMAGE_SUBSYSTEM_UNKNOWN == dwSubsystem) + { + return STATUS_INVALID_PARAMETER_MIX; + } + ConnectData.Subsystem = dwSubsystem; + memmove (& ConnectData.SbName, pSbApiPortName->Buffer, pSbApiPortName->Length); + } + ConnectDataLength = sizeof (ConnectData); + + SecurityQos.Length = sizeof (SecurityQos); + SecurityQos.ImpersonationLevel = SecurityIdentification; + SecurityQos.ContextTrackingMode = TRUE; + SecurityQos.EffectiveOnly = TRUE; + + RtlInitUnicodeString (& SmApiPortName, SM_API_PORT_NAME); + + Status = NtConnectPort ( + phSmApiPort, + & SmApiPortName, + & SecurityQos, + NULL, + NULL, + NULL, + & ConnectData, + & ConnectDataLength + ); + if (NT_SUCCESS(Status)) + { + return STATUS_SUCCESS; + } + DbgPrint ("%s failed (Status=0x%08lx)\n", __FUNCTION__, Status); + return Status; +} + +/* EOF */ diff --git a/reactos/lib/smdll/dllmain.c b/reactos/lib/smdll/dllmain.c new file mode 100644 index 00000000000..3d6e48820d3 --- /dev/null +++ b/reactos/lib/smdll/dllmain.c @@ -0,0 +1,17 @@ +/* $Id$ + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS + * FILE: lib/smdll/dllmain.c + * PURPOSE: SM Helper Library + */ + +#define NTOS_MODE_USER +#include + +BOOL STDCALL DllMain(HANDLE hinstDll, DWORD fdwReason, LPVOID fImpLoad) +{ + return TRUE; +} + +/* EOF */ diff --git a/reactos/lib/smdll/execpgm.c b/reactos/lib/smdll/execpgm.c new file mode 100644 index 00000000000..f5b2e5fa514 --- /dev/null +++ b/reactos/lib/smdll/execpgm.c @@ -0,0 +1,49 @@ +/* $Id$ + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: lib/smdll/execpgm.c + * PURPOSE: Call SM API SM_API_EXECPGM + */ +#define NTOS_MODE_USER +#include +#include +#include +#include + +NTSTATUS STDCALL +SmExecPgm (HANDLE hSmApiPort, PUNICODE_STRING Pgm) +{ + NTSTATUS Status; + SM_PORT_MESSAGE SmReqMsg; + + + /* Check Pgm's length */ + if (Pgm->Length > (sizeof (Pgm->Buffer[0]) * SM_EXEXPGM_MAX_LENGTH)) + { + return STATUS_INVALID_PARAMETER; + } + /* Marshal Pgm in the LPC message */ + RtlZeroMemory (& SmReqMsg, sizeof SmReqMsg); + SmReqMsg.ExecPgm.NameLength = Pgm->Length; + RtlCopyMemory (SmReqMsg.ExecPgm.Name, Pgm->Buffer, Pgm->Length); + + /* SM API to invoke */ + SmReqMsg.ApiIndex = SM_API_EXECUTE_PROGRAMME; + + /* LPC message */ + SmReqMsg.Header.MessageType = LPC_NEW_MESSAGE; + SmReqMsg.Header.DataSize = SM_PORT_DATA_SIZE(SmReqMsg.ExecPgm); + SmReqMsg.Header.MessageSize = SM_PORT_MESSAGE_SIZE; + + /* Call SM and wait for a reply */ + Status = NtRequestWaitReplyPort (hSmApiPort, (PLPC_MESSAGE) & SmReqMsg, (PLPC_MESSAGE) & SmReqMsg); + if (NT_SUCCESS(Status)) + { + return SmReqMsg.Status; + } + DbgPrint ("%s failed (Status=0x%08lx)\n", __FUNCTION__, Status); + return Status; +} + +/* EOF */ diff --git a/reactos/lib/smdll/makefile b/reactos/lib/smdll/makefile new file mode 100644 index 00000000000..d14e1d598f4 --- /dev/null +++ b/reactos/lib/smdll/makefile @@ -0,0 +1,34 @@ +# $Id$ + +PATH_TO_TOP = ../.. + +TARGET_TYPE = dynlink + +TARGET_NAME = smdll + +TARGET_SDKLIBS = ntdll.a + +TARGET_CFLAGS = -I./include -Wall -Werror + +# require os code to explicitly request A/W version of structs/functions +TARGET_CFLAGS += -D_DISABLE_TIDENTS + +TARGET_LFLAGS = -nostartfiles -nostdlib + +#TARGET_BASE = + +TARGET_OBJECTS = \ + dllmain.o \ + connect.o \ + execpgm.o \ + compses.o + +DEP_OBJECTS = $(TARGET_OBJECTS) + +include $(PATH_TO_TOP)/rules.mak + +include $(TOOLS_PATH)/helper.mk + +include $(TOOLS_PATH)/depend.mk + +# EOF diff --git a/reactos/lib/smdll/readme.txt b/reactos/lib/smdll/readme.txt new file mode 100644 index 00000000000..8265e596dcf --- /dev/null +++ b/reactos/lib/smdll/readme.txt @@ -0,0 +1,18 @@ +$Id$ + +This is SMDLL: a helper library to talk to the ReactOS session manager (SM). + +It should be linked in the following components: + +a) the SM itself, because iy registers for managing native processes + IMAGE_SUBSYSTEM_NATIVE; + +b) environment subsystem servers, because each one should register in + the SM its own subsystem (willing to manageg those processes); + +c) terminal emulators for optional subsystems, like posixw32 and os2w32, + to ask the SM to start the optional subsystem server they need connect to; + +d) system and development utilites to debug/query the SM. + +2004-02-15 ea \ No newline at end of file diff --git a/reactos/lib/smdll/smdll.def b/reactos/lib/smdll/smdll.def new file mode 100644 index 00000000000..76d524637b6 --- /dev/null +++ b/reactos/lib/smdll/smdll.def @@ -0,0 +1,5 @@ +LIBRARY SMDLL.DLL +EXPORTS +SmCompleteSession@12 +SmConnectApiPort@16 +SmExecPgm@8 \ No newline at end of file diff --git a/reactos/lib/smdll/smdll.rc b/reactos/lib/smdll/smdll.rc new file mode 100644 index 00000000000..ae16f7bbdd8 --- /dev/null +++ b/reactos/lib/smdll/smdll.rc @@ -0,0 +1,4 @@ +#define REACTOS_STR_FILE_DESCRIPTION "ReactOS SM Helper\0" +#define REACTOS_STR_INTERNAL_NAME "smdll.dll\0" +#define REACTOS_STR_ORIGINAL_FILENAME "smdll.dll\0" +#include diff --git a/reactos/lib/smdll/testapi.c b/reactos/lib/smdll/testapi.c new file mode 100644 index 00000000000..a1ecde2cf7f --- /dev/null +++ b/reactos/lib/smdll/testapi.c @@ -0,0 +1,20 @@ +/* $Id$ */ +#define NTOS_MODE_USER +#include +#include + +VOID STDCALL SmPrintPortMessage (PSM_PORT_MESSAGE SmMessage) +{ + DbgPrint ("SM_PORT_MESSAGE %08lx:\n", (ULONG) SmMessage); + DbgPrint (" Header:\n"); + DbgPrint (" MessageType = %u\n", SmMessage->Header.MessageType); + DbgPrint (" DataSize = %d\n", SmMessage->Header.DataSize); + DbgPrint (" MessageSize = %d\n", SmMessage->Header.MessageSize); + DbgPrint (" ApiIndex = %ld\n", SmMessage->ApiIndex); + DbgPrint (" Status = %08lx\n", SmMessage->Status); + DbgPrint (" ExecPgm:\n"); + DbgPrint (" NameLength = %ld\n", SmMessage->ExecPgm.NameLength); + DbgPrint (" Name = %ls\n", (LPWSTR) & SmMessage->ExecPgm.Name); +} +/* EOF */ + From 78a54aa150c40cf3d87de7e2ae44a3b10b4dae1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20van=20Geldorp?= Date: Sun, 6 Feb 2005 18:24:31 +0000 Subject: [PATCH 130/185] Properly synchronize with GPU svn path=/trunk/; revision=13444 --- reactos/include/win32k/driver.h | 3 +++ reactos/subsys/win32k/eng/misc.c | 14 ++++++++++++++ reactos/subsys/win32k/misc/driver.c | 1 + 3 files changed, 18 insertions(+) diff --git a/reactos/include/win32k/driver.h b/reactos/include/win32k/driver.h index d93effbf172..a18ff7d7648 100644 --- a/reactos/include/win32k/driver.h +++ b/reactos/include/win32k/driver.h @@ -97,6 +97,8 @@ typedef LONG (STDCALL *PGD_QUERYSPOOLTYPE)(DHPDEV, LPWSTR); typedef BOOL (STDCALL *PGD_GRADIENTFILL)(SURFOBJ*, CLIPOBJ*, XLATEOBJ*, TRIVERTEX*, ULONG, PVOID, ULONG, RECTL*, POINTL*, ULONG); +typedef VOID (STDCALL *PGD_SYNCHRONIZESURFACE)(SURFOBJ*, RECTL *, FLONG); + typedef struct _DRIVER_FUNCTIONS { PGD_ENABLEDRIVER EnableDriver; @@ -158,6 +160,7 @@ typedef struct _DRIVER_FUNCTIONS PGD_DISABLEDIRECTDRAW DisableDirectDraw; PGD_QUERYSPOOLTYPE QuerySpoolType; PGD_GRADIENTFILL GradientFill; + PGD_SYNCHRONIZESURFACE SynchronizeSurface; } DRIVER_FUNCTIONS, *PDRIVER_FUNCTIONS; BOOL DRIVER_RegisterDriver(LPCWSTR Name, PGD_ENABLEDRIVER EnableDriver); diff --git a/reactos/subsys/win32k/eng/misc.c b/reactos/subsys/win32k/eng/misc.c index 7fea4feecf0..2fcba3b633a 100644 --- a/reactos/subsys/win32k/eng/misc.c +++ b/reactos/subsys/win32k/eng/misc.c @@ -123,6 +123,20 @@ IntEngEnter(PINTENG_ENTER_LEAVE EnterLeave, *OutputObj = DestObj; } + if (NULL != *OutputObj + && 0 != (((BITMAPOBJ*) *OutputObj)->flHooks & HOOK_SYNCHRONIZE)) + { + if (NULL != GDIDEVFUNCS(*OutputObj).SynchronizeSurface) + { + GDIDEVFUNCS(*OutputObj).SynchronizeSurface(*OutputObj, DestRect, 0); + } + else if (STYPE_BITMAP == (*OutputObj)->iType + && NULL != GDIDEVFUNCS(*OutputObj).Synchronize) + { + GDIDEVFUNCS(*OutputObj).Synchronize((*OutputObj)->dhpdev, DestRect); + } + } + EnterLeave->DestObj = DestObj; EnterLeave->OutputObj = *OutputObj; EnterLeave->ReadOnly = ReadOnly; diff --git a/reactos/subsys/win32k/misc/driver.c b/reactos/subsys/win32k/misc/driver.c index 5ce41fd4ed4..67618a1400e 100644 --- a/reactos/subsys/win32k/misc/driver.c +++ b/reactos/subsys/win32k/misc/driver.c @@ -239,6 +239,7 @@ BOOL DRIVER_BuildDDIFunctions(PDRVENABLEDATA DED, DRIVER_FUNCTION(DisableDirectDraw); DRIVER_FUNCTION(QuerySpoolType); DRIVER_FUNCTION(GradientFill); + DRIVER_FUNCTION(SynchronizeSurface); END_FUNCTION_MAP(); From bc7bba6f783cfe3a2a527348f32dd03f2febcd7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20van=20Geldorp?= Date: Sun, 6 Feb 2005 18:27:06 +0000 Subject: [PATCH 131/185] Pass ROP4 instead of ROP3 to drivers svn path=/trunk/; revision=13445 --- .../video/displays/vga/objects/bitblt.c | 29 ++-- .../video/displays/vga/objects/bitblt.h | 7 + reactos/subsys/win32k/dib/dib.c | 34 ++--- reactos/subsys/win32k/dib/dib.h | 3 - reactos/subsys/win32k/dib/dib16bpp.c | 4 +- reactos/subsys/win32k/dib/dib1bpp.c | 4 +- reactos/subsys/win32k/dib/dib24bpp.c | 4 +- reactos/subsys/win32k/dib/dib32bpp.c | 4 +- reactos/subsys/win32k/dib/dib4bpp.c | 4 +- reactos/subsys/win32k/dib/dib8bpp.c | 4 +- reactos/subsys/win32k/eng/bitblt.c | 124 +++++++++--------- reactos/subsys/win32k/eng/copybits.c | 2 +- reactos/subsys/win32k/eng/gradient.c | 15 +-- reactos/subsys/win32k/eng/mouse.c | 10 +- reactos/subsys/win32k/eng/transblt.c | 12 -- reactos/subsys/win32k/include/inteng.h | 13 +- reactos/subsys/win32k/objects/bitmaps.c | 7 +- reactos/subsys/win32k/objects/brush.c | 2 +- reactos/subsys/win32k/objects/fillshap.c | 2 +- reactos/subsys/win32k/objects/text.c | 4 +- 20 files changed, 141 insertions(+), 147 deletions(-) diff --git a/reactos/drivers/video/displays/vga/objects/bitblt.c b/reactos/drivers/video/displays/vga/objects/bitblt.c index 4726dffe890..fbdc29c46cb 100644 --- a/reactos/drivers/video/displays/vga/objects/bitblt.c +++ b/reactos/drivers/video/displays/vga/objects/bitblt.c @@ -188,20 +188,21 @@ VGADDI_BltBrush(SURFOBJ* Dest, SURFOBJ* Source, SURFOBJ* MaskSurf, } /* Punt pattern fills. */ - if ((Rop4 == PATCOPY || Rop4 == PATINVERT) && + if ((GET_OPINDEX_FROM_ROP4(Rop4) == GET_OPINDEX_FROM_ROP3(PATCOPY) + || GET_OPINDEX_FROM_ROP4(Rop4) == GET_OPINDEX_FROM_ROP3(PATINVERT)) && Brush->iSolidColor == 0xFFFFFFFF) { return(FALSE); } /* Get the brush colour. */ - switch (Rop4) + switch (GET_OPINDEX_FROM_ROP4(Rop4)) { - case PATCOPY: SolidColor = Brush->iSolidColor; break; - case PATINVERT: SolidColor = Brush->iSolidColor; RasterOp = VGA_XOR; break; - case WHITENESS: SolidColor = 0xF; break; - case BLACKNESS: SolidColor = 0x0; break; - case DSTINVERT: SolidColor = 0xF; RasterOp = VGA_XOR; break; + case GET_OPINDEX_FROM_ROP3(PATCOPY): SolidColor = Brush->iSolidColor; break; + case GET_OPINDEX_FROM_ROP3(PATINVERT): SolidColor = Brush->iSolidColor; RasterOp = VGA_XOR; break; + case GET_OPINDEX_FROM_ROP3(WHITENESS): SolidColor = 0xF; break; + case GET_OPINDEX_FROM_ROP3(BLACKNESS): SolidColor = 0x0; break; + case GET_OPINDEX_FROM_ROP3(DSTINVERT): SolidColor = 0xF; RasterOp = VGA_XOR; break; } /* Select write mode 3. */ @@ -398,15 +399,15 @@ DrvBitBlt(SURFOBJ *Dest, switch (rop4) { - case BLACKNESS: - case PATCOPY: - case WHITENESS: - case PATINVERT: - case DSTINVERT: + case ROP3_TO_ROP4(BLACKNESS): + case ROP3_TO_ROP4(PATCOPY): + case ROP3_TO_ROP4(WHITENESS): + case ROP3_TO_ROP4(PATINVERT): + case ROP3_TO_ROP4(DSTINVERT): BltRectFunc = VGADDI_BltBrush; break; - case SRCCOPY: + case ROP3_TO_ROP4(SRCCOPY): if (BMF_4BPP == Source->iBitmapFormat && BMF_4BPP == Dest->iBitmapFormat) { BltRectFunc = VGADDI_BltSrc; @@ -417,7 +418,7 @@ DrvBitBlt(SURFOBJ *Dest, } break; - case 0xAACC: + case R4_MASK: BltRectFunc = VGADDI_BltMask; break; diff --git a/reactos/drivers/video/displays/vga/objects/bitblt.h b/reactos/drivers/video/displays/vga/objects/bitblt.h index 2f5d359eb81..e52edf9247b 100644 --- a/reactos/drivers/video/displays/vga/objects/bitblt.h +++ b/reactos/drivers/video/displays/vga/objects/bitblt.h @@ -20,3 +20,10 @@ #define BB_TARGET_ONLY 0x0002 #define BB_SOURCE_COPY 0x0004 #define BB_PATTERN_COPY 0x0008 + +#define GET_OPINDEX_FROM_ROP3(Rop3) (((Rop3) >> 16) & 0xff) +#define GET_OPINDEX_FROM_ROP4(Rop4) ((Rop4) & 0xff) +#define ROP3_TO_ROP4(Rop3) ((((Rop3) >> 8) & 0xff00) | (((Rop3) >> 16) & 0x00ff)) +#define R3_OPINDEX_SRCCOPY 0xcc +#define R3_OPINDEX_NOOP 0xaa +#define R4_MASK ((R3_OPINDEX_NOOP << 8) | R3_OPINDEX_SRCCOPY) diff --git a/reactos/subsys/win32k/dib/dib.c b/reactos/subsys/win32k/dib/dib.c index 97f0d691a79..7b6e6547df1 100644 --- a/reactos/subsys/win32k/dib/dib.c +++ b/reactos/subsys/win32k/dib/dib.c @@ -156,25 +156,25 @@ DIB_DoRop(ULONG Rop, ULONG Dest, ULONG Source, ULONG Pattern) /* Optimized code for the various named rop codes. */ switch (Rop) { - case BLACKNESS: return(0); - case NOTSRCERASE: return(~(Dest | Source)); - case NOTSRCCOPY: return(~Source); - case SRCERASE: return((~Dest) & Source); - case DSTINVERT: return(~Dest); - case PATINVERT: return(Dest ^ Pattern); - case SRCINVERT: return(Dest ^ Source); - case SRCAND: return(Dest & Source); - case MERGEPAINT: return(Dest & (~Source)); - case SRCPAINT: return(Dest | Source); - case MERGECOPY: return(Source & Pattern); - case SRCCOPY: return(Source); - case PATCOPY: return(Pattern); - case PATPAINT: return(Dest | (~Source) | Pattern); - case WHITENESS: return(0xFFFFFFFF); + case ROP3_TO_ROP4(BLACKNESS): return(0); + case ROP3_TO_ROP4(NOTSRCERASE): return(~(Dest | Source)); + case ROP3_TO_ROP4(NOTSRCCOPY): return(~Source); + case ROP3_TO_ROP4(SRCERASE): return((~Dest) & Source); + case ROP3_TO_ROP4(DSTINVERT): return(~Dest); + case ROP3_TO_ROP4(PATINVERT): return(Dest ^ Pattern); + case ROP3_TO_ROP4(SRCINVERT): return(Dest ^ Source); + case ROP3_TO_ROP4(SRCAND): return(Dest & Source); + case ROP3_TO_ROP4(MERGEPAINT): return(Dest & (~Source)); + case ROP3_TO_ROP4(SRCPAINT): return(Dest | Source); + case ROP3_TO_ROP4(MERGECOPY): return(Source & Pattern); + case ROP3_TO_ROP4(SRCCOPY): return(Source); + case ROP3_TO_ROP4(PATCOPY): return(Pattern); + case ROP3_TO_ROP4(PATPAINT): return(Dest | (~Source) | Pattern); + case ROP3_TO_ROP4(WHITENESS): return(0xFFFFFFFF); } /* Expand the ROP operation to all four bytes */ - Rop &= 0x00FF0000; - Rop = (Rop << 8) | (Rop) | (Rop >> 8) | (Rop >> 16); + Rop &= 0xFF; + Rop |= (Rop << 24) | (Rop << 16) | (Rop << 8); /* Do the operation on four bits simultaneously. */ Result = 0; for (i = 0; i < 8; i++) diff --git a/reactos/subsys/win32k/dib/dib.h b/reactos/subsys/win32k/dib/dib.h index 909c779fa2d..bb61a0f8b47 100644 --- a/reactos/subsys/win32k/dib/dib.h +++ b/reactos/subsys/win32k/dib/dib.h @@ -99,9 +99,6 @@ BOOLEAN DIB_32BPP_BitBltSrcCopy(PBLTINFO); BOOLEAN DIB_32BPP_StretchBlt(SURFOBJ*,SURFOBJ*,RECTL*,RECTL*,POINTL*,POINTL,CLIPOBJ*,XLATEOBJ*,ULONG); BOOLEAN DIB_32BPP_TransparentBlt(SURFOBJ*,SURFOBJ*,RECTL*,POINTL*,XLATEOBJ*,ULONG); -#define ROP_USES_SOURCE(Rop4) (((Rop4 & 0xCC0000) >> 2) != (Rop4 & 0x330000)) -#define ROP_USES_PATTERN(Rop4) (((Rop4 & 0xF00000) >> 4) != (Rop4 & 0x0F0000)) - extern unsigned char notmask[2]; extern unsigned char altnotmask[2]; #define MASK1BPP(x) (1<<(7-((x)&7))) diff --git a/reactos/subsys/win32k/dib/dib16bpp.c b/reactos/subsys/win32k/dib/dib16bpp.c index a3d54a7d8e1..8b496f86057 100644 --- a/reactos/subsys/win32k/dib/dib16bpp.c +++ b/reactos/subsys/win32k/dib/dib16bpp.c @@ -309,8 +309,8 @@ DIB_16BPP_BitBlt(PBLTINFO BltInfo) PULONG DestBits; ULONG RoundedRight; - UsesSource = ROP_USES_SOURCE(BltInfo->Rop4); - UsesPattern = ROP_USES_PATTERN(BltInfo->Rop4); + UsesSource = ROP4_USES_SOURCE(BltInfo->Rop4); + UsesPattern = ROP4_USES_PATTERN(BltInfo->Rop4); RoundedRight = BltInfo->DestRect.right - ((BltInfo->DestRect.right - BltInfo->DestRect.left) & 0x1); diff --git a/reactos/subsys/win32k/dib/dib1bpp.c b/reactos/subsys/win32k/dib/dib1bpp.c index 620e86474b9..8a762e94de6 100644 --- a/reactos/subsys/win32k/dib/dib1bpp.c +++ b/reactos/subsys/win32k/dib/dib1bpp.c @@ -349,8 +349,8 @@ DIB_1BPP_BitBlt(PBLTINFO BltInfo) ULONG RoundedRight; /* BYTE NoBits;*/ - UsesSource = ROP_USES_SOURCE(BltInfo->Rop4); - UsesPattern = ROP_USES_PATTERN(BltInfo->Rop4); + UsesSource = ROP4_USES_SOURCE(BltInfo->Rop4); + UsesPattern = ROP4_USES_PATTERN(BltInfo->Rop4); RoundedRight = BltInfo->DestRect.right - ((BltInfo->DestRect.right - BltInfo->DestRect.left) & 31); diff --git a/reactos/subsys/win32k/dib/dib24bpp.c b/reactos/subsys/win32k/dib/dib24bpp.c index 30a0197bd33..c14dd8230c7 100644 --- a/reactos/subsys/win32k/dib/dib24bpp.c +++ b/reactos/subsys/win32k/dib/dib24bpp.c @@ -244,8 +244,8 @@ DIB_24BPP_BitBlt(PBLTINFO BltInfo) BOOL UsesPattern; PBYTE DestBits; - UsesSource = ROP_USES_SOURCE(BltInfo->Rop4); - UsesPattern = ROP_USES_PATTERN(BltInfo->Rop4); + UsesSource = ROP4_USES_SOURCE(BltInfo->Rop4); + UsesPattern = ROP4_USES_PATTERN(BltInfo->Rop4); SourceY = BltInfo->SourcePoint.y; DestBits = (PBYTE)( diff --git a/reactos/subsys/win32k/dib/dib32bpp.c b/reactos/subsys/win32k/dib/dib32bpp.c index 1f8f553a815..35a79815b6d 100644 --- a/reactos/subsys/win32k/dib/dib32bpp.c +++ b/reactos/subsys/win32k/dib/dib32bpp.c @@ -293,8 +293,8 @@ DIB_32BPP_BitBlt(PBLTINFO BltInfo) BOOL UsesPattern; PULONG DestBits; - UsesSource = ROP_USES_SOURCE(BltInfo->Rop4); - UsesPattern = ROP_USES_PATTERN(BltInfo->Rop4); + UsesSource = ROP4_USES_SOURCE(BltInfo->Rop4); + UsesPattern = ROP4_USES_PATTERN(BltInfo->Rop4); SourceY = BltInfo->SourcePoint.y; DestBits = (PULONG)( diff --git a/reactos/subsys/win32k/dib/dib4bpp.c b/reactos/subsys/win32k/dib/dib4bpp.c index c49ad5b089f..db5d57c3c29 100644 --- a/reactos/subsys/win32k/dib/dib4bpp.c +++ b/reactos/subsys/win32k/dib/dib4bpp.c @@ -251,8 +251,8 @@ DIB_4BPP_BitBlt(PBLTINFO BltInfo) 0xFFFFFFFF /* 15 */, }; - UsesSource = ROP_USES_SOURCE(BltInfo->Rop4); - UsesPattern = ROP_USES_PATTERN(BltInfo->Rop4); + UsesSource = ROP4_USES_SOURCE(BltInfo->Rop4); + UsesPattern = ROP4_USES_PATTERN(BltInfo->Rop4); SourceY = BltInfo->SourcePoint.y; RoundedRight = BltInfo->DestRect.right - diff --git a/reactos/subsys/win32k/dib/dib8bpp.c b/reactos/subsys/win32k/dib/dib8bpp.c index 26d1f4ca65b..d480c7dea6c 100644 --- a/reactos/subsys/win32k/dib/dib8bpp.c +++ b/reactos/subsys/win32k/dib/dib8bpp.c @@ -260,8 +260,8 @@ DIB_8BPP_BitBlt(PBLTINFO BltInfo) PULONG DestBits; LONG RoundedRight; - UsesSource = ROP_USES_SOURCE(BltInfo->Rop4); - UsesPattern = ROP_USES_PATTERN(BltInfo->Rop4); + UsesSource = ROP4_USES_SOURCE(BltInfo->Rop4); + UsesPattern = ROP4_USES_PATTERN(BltInfo->Rop4); SourceY = BltInfo->SourcePoint.y; RoundedRight = BltInfo->DestRect.right - diff --git a/reactos/subsys/win32k/eng/bitblt.c b/reactos/subsys/win32k/eng/bitblt.c index c25f97d2976..f3014db5875 100644 --- a/reactos/subsys/win32k/eng/bitblt.c +++ b/reactos/subsys/win32k/eng/bitblt.c @@ -213,7 +213,7 @@ CallDibBitBlt(SURFOBJ* OutputObj, BltInfo.DestRect = *OutputRect; BltInfo.SourcePoint = *InputPoint; - if (Rop4 == SRCCOPY) + if (ROP3_TO_ROP4(SRCCOPY) == Rop4) return DibFunctionsForBitmapFormat[OutputObj->iBitmapFormat].DIB_BitBltSrcCopy(&BltInfo); BltInfo.XlatePatternToDest = NULL; @@ -222,7 +222,7 @@ CallDibBitBlt(SURFOBJ* OutputObj, BltInfo.Rop4 = Rop4; /* Pattern brush */ - if (ROP_USES_PATTERN(Rop4) && Brush->iSolidColor == 0xFFFFFFFF) + if (ROP4_USES_PATTERN(Rop4) && Brush->iSolidColor == 0xFFFFFFFF) { GdiBrush = CONTAINING_RECORD(Brush, GDIBRUSHINST, BrushObject); if((bmPattern = BITMAPOBJ_LockBitmap(GdiBrush->GdiBrushObject->hbmPattern))) @@ -291,9 +291,9 @@ EngBitBlt(SURFOBJ *DestObj, BOOL UsesPattern; POINTL AdjustedBrushOrigin; - UsesSource = ((Rop4 & 0xCC0000) >> 2) != (Rop4 & 0x330000); - UsesPattern = ((Rop4 & 0xF00000) >> 4) != (Rop4 & 0x0F0000); - if (ROP_NOOP == Rop4) + UsesSource = ROP4_USES_SOURCE(Rop4); + UsesPattern = ROP4_USES_PATTERN(Rop4); + if (R4_NOOP == Rop4) { /* Copy destination onto itself: nop */ return TRUE; @@ -392,20 +392,16 @@ EngBitBlt(SURFOBJ *DestObj, clippingType = ClipRegion->iDComplexity; } - if (0xaacc == Rop4) + if (R4_MASK == Rop4) { BltRectFunc = BltMask; } - else if (PATCOPY == Rop4) + else if (ROP3_TO_ROP4(PATCOPY) == Rop4) { -#if 0 - BltRectFunc = BltPatCopy; -#else if (Brush->iSolidColor == 0xFFFFFFFF) BltRectFunc = CallDibBitBlt; else BltRectFunc = BltPatCopy; -#endif } else { @@ -515,7 +511,7 @@ IntEngBitBlt(BITMAPOBJ *DestObj, InputClippedRect.top = DestRect->bottom; InputClippedRect.bottom = DestRect->top; } - UsesSource = ((Rop4 & 0xCC0000) >> 2) != (Rop4 & 0x330000); + UsesSource = ROP4_USES_SOURCE(Rop4); if (UsesSource) { if (NULL == SourcePoint || NULL == SourceSurf) @@ -833,40 +829,41 @@ AlphaBltMask(SURFOBJ* Dest, tMask = Mask->pvScan0 + (SourcePoint->y * Mask->lDelta) + SourcePoint->x; for (j = 0; j < dy; j++) - { - lMask = tMask; - for (i = 0; i < dx; i++) - { - if (*lMask > 0) - { - if(*lMask == 0xff) - { - DibFunctionsForBitmapFormat[Dest->iBitmapFormat].DIB_PutPixel( - Dest, DestRect->left + i, DestRect->top + j, Brush->iSolidColor); - } - else - { - Background = DIB_GetSource(Dest, DestRect->left + i, DestRect->top + j, SrcColorTranslation); + { + lMask = tMask; + for (i = 0; i < dx; i++) + { + if (*lMask > 0) + { + if (*lMask == 0xff) + { + DibFunctionsForBitmapFormat[Dest->iBitmapFormat].DIB_PutPixel( + Dest, DestRect->left + i, DestRect->top + j, Brush->iSolidColor); + } + else + { + Background = DIB_GetSource(Dest, DestRect->left + i, DestRect->top + j, + SrcColorTranslation); - NewColor = - RGB((*lMask * (r - GetRValue(Background)) >> 8) + GetRValue(Background), - (*lMask * (g - GetGValue(Background)) >> 8) + GetGValue(Background), - (*lMask * (b - GetBValue(Background)) >> 8) + GetBValue(Background)); - - Background = XLATEOBJ_iXlate(ColorTranslation, NewColor); - DibFunctionsForBitmapFormat[Dest->iBitmapFormat].DIB_PutPixel( - Dest, DestRect->left + i, DestRect->top + j, Background); - } - } - lMask++; - } - tMask += Mask->lDelta; - } + NewColor = + RGB((*lMask * (r - GetRValue(Background)) >> 8) + GetRValue(Background), + (*lMask * (g - GetGValue(Background)) >> 8) + GetGValue(Background), + (*lMask * (b - GetBValue(Background)) >> 8) + GetBValue(Background)); + + Background = XLATEOBJ_iXlate(ColorTranslation, NewColor); + DibFunctionsForBitmapFormat[Dest->iBitmapFormat].DIB_PutPixel( + Dest, DestRect->left + i, DestRect->top + j, Background); + } + } + lMask++; + } + tMask += Mask->lDelta; + } return TRUE; } else { - return FALSE; + return FALSE; } } @@ -918,7 +915,7 @@ EngMaskBitBlt(SURFOBJ *DestObj, InputRect.bottom = DestRect->bottom - DestRect->top; } - if (! IntEngEnter(&EnterLeaveSource, NULL, &InputRect, TRUE, &Translate, &InputObj)) + if (! IntEngEnter(&EnterLeaveSource, DestObj, &InputRect, TRUE, &Translate, &InputObj)) { return FALSE; } @@ -1004,7 +1001,8 @@ EngMaskBitBlt(SURFOBJ *DestObj, &OutputRect, &InputPoint, MaskOrigin, Brush, &AdjustedBrushOrigin); else Ret = BltMask(OutputObj, InputObj, Mask, DestColorTranslation, - &OutputRect, &InputPoint, MaskOrigin, Brush, &AdjustedBrushOrigin, 0xAACC); + &OutputRect, &InputPoint, MaskOrigin, Brush, &AdjustedBrushOrigin, + R4_MASK); break; case DC_RECT: // Clip the blt to the clip rectangle @@ -1020,7 +1018,7 @@ EngMaskBitBlt(SURFOBJ *DestObj, &CombinedRect, &Pt, MaskOrigin, Brush, &AdjustedBrushOrigin); else Ret = BltMask(OutputObj, InputObj, Mask, DestColorTranslation, - &CombinedRect, &Pt, MaskOrigin, Brush, &AdjustedBrushOrigin, 0xAACC); + &CombinedRect, &Pt, MaskOrigin, Brush, &AdjustedBrushOrigin, R4_MASK); break; case DC_COMPLEX: Ret = TRUE; @@ -1058,7 +1056,7 @@ EngMaskBitBlt(SURFOBJ *DestObj, &CombinedRect, &Pt, MaskOrigin, Brush, &AdjustedBrushOrigin) && Ret; else Ret = BltMask(OutputObj, InputObj, Mask, DestColorTranslation, - &CombinedRect, &Pt, MaskOrigin, Brush, &AdjustedBrushOrigin, 0xAACC) && Ret; + &CombinedRect, &Pt, MaskOrigin, Brush, &AdjustedBrushOrigin, R4_MASK) && Ret; } } while(EnumMore); @@ -1069,26 +1067,20 @@ EngMaskBitBlt(SURFOBJ *DestObj, IntEngLeave(&EnterLeaveDest); IntEngLeave(&EnterLeaveSource); - /* Dummy BitBlt to let driver know that something has changed. - 0x00AA0029 is the Rop for D (no-op) */ - /* FIXME: Remove the typecast! */ - IntEngBitBlt((BITMAPOBJ*)DestObj, NULL, (BITMAPOBJ*)Mask, ClipRegion, DestColorTranslation, - DestRect, SourcePoint, MaskOrigin, Brush, BrushOrigin, ROP_NOOP); - return Ret; } BOOL STDCALL IntEngMaskBlt(SURFOBJ *DestObj, - SURFOBJ *Mask, - CLIPOBJ *ClipRegion, - XLATEOBJ *DestColorTranslation, - XLATEOBJ *SourceColorTranslation, - RECTL *DestRect, - POINTL *SourcePoint, - POINTL *MaskOrigin, - BRUSHOBJ *Brush, - POINTL *BrushOrigin) + SURFOBJ *Mask, + CLIPOBJ *ClipRegion, + XLATEOBJ *DestColorTranslation, + XLATEOBJ *SourceColorTranslation, + RECTL *DestRect, + POINTL *SourcePoint, + POINTL *MaskOrigin, + BRUSHOBJ *Brush, + POINTL *BrushOrigin) { BOOLEAN ret; RECTL OutputRect; @@ -1123,9 +1115,21 @@ IntEngMaskBlt(SURFOBJ *DestObj, MouseSafetyOnDrawStart(DestObj, OutputRect.left, OutputRect.top, OutputRect.right, OutputRect.bottom); + /* Dummy BitBlt to let driver know that it should flush its changes. + This should really be done using a call to DrvSynchronizeSurface, + but the VMware driver doesn't hook that call. */ + /* FIXME: Remove the typecast! */ + IntEngBitBlt((BITMAPOBJ*)DestObj, NULL, (BITMAPOBJ*)Mask, ClipRegion, DestColorTranslation, + DestRect, SourcePoint, MaskOrigin, Brush, BrushOrigin, R4_NOOP); + ret = EngMaskBitBlt(DestObj, Mask, ClipRegion, DestColorTranslation, SourceColorTranslation, &OutputRect, &InputPoint, MaskOrigin, Brush, BrushOrigin); + /* Dummy BitBlt to let driver know that something has changed. */ + /* FIXME: Remove the typecast! */ + IntEngBitBlt((BITMAPOBJ*)DestObj, NULL, (BITMAPOBJ*)Mask, ClipRegion, DestColorTranslation, + DestRect, SourcePoint, MaskOrigin, Brush, BrushOrigin, R4_NOOP); + MouseSafetyOnDrawEnd(DestObj); return ret; diff --git a/reactos/subsys/win32k/eng/copybits.c b/reactos/subsys/win32k/eng/copybits.c index cfc4266aea4..d1f9b0767a1 100644 --- a/reactos/subsys/win32k/eng/copybits.c +++ b/reactos/subsys/win32k/eng/copybits.c @@ -98,7 +98,7 @@ EngCopyBits(SURFOBJ *Dest, /* FIXME: Remove the typecast! */ ret = IntEngBitBlt((BITMAPOBJ*)Dest, (BITMAPOBJ*)Source, NULL, Clip, ColorTranslation, DestRect, SourcePoint, - NULL, NULL, NULL, 0); + NULL, NULL, NULL, ROP3_TO_ROP4(SRCCOPY)); MouseSafetyOnDrawEnd(Dest); MouseSafetyOnDrawEnd(Source); diff --git a/reactos/subsys/win32k/eng/gradient.c b/reactos/subsys/win32k/eng/gradient.c index 9ccbe20de3f..471a4d50e1f 100644 --- a/reactos/subsys/win32k/eng/gradient.c +++ b/reactos/subsys/win32k/eng/gradient.c @@ -541,7 +541,7 @@ IntEngGradientFill( pco->rclBounds.top, pco->rclBounds.right, pco->rclBounds.bottom); - if((psoDest->iType != STYPE_BITMAP) && (pboDest->flHooks & HOOK_GRADIENTFILL)) + if(pboDest->flHooks & HOOK_GRADIENTFILL) { Ret = GDIDEVFUNCS(psoDest).GradientFill( psoDest, pco, pxlo, pVertex, nVertex, pMesh, nMesh, @@ -551,19 +551,6 @@ IntEngGradientFill( } Ret = EngGradientFill(psoDest, pco, pxlo, pVertex, nVertex, pMesh, nMesh, prclExtents, pptlDitherOrg, ulMode); - if(Ret) - { - /* Dummy BitBlt to let driver know that something has changed. - 0x00AA0029 is the Rop for D (no-op) */ - if(pboDest->flHooks & HOOK_BITBLT) - { - GDIDEVFUNCS(psoDest).BitBlt( - psoDest, NULL, NULL, pco, pxlo, - prclExtents, pptlDitherOrg, NULL, NULL, NULL, ROP_NOOP); - MouseSafetyOnDrawEnd(psoDest); - return TRUE; - } - } MouseSafetyOnDrawEnd(psoDest); return Ret; } diff --git a/reactos/subsys/win32k/eng/mouse.c b/reactos/subsys/win32k/eng/mouse.c index 9d3ab01a73e..57c7c7d1801 100644 --- a/reactos/subsys/win32k/eng/mouse.c +++ b/reactos/subsys/win32k/eng/mouse.c @@ -178,7 +178,7 @@ IntHideMousePointer(GDIDEVICE *ppdev, SURFOBJ *DestSurface) if((MaskSurface = EngLockSurface(pgp->MaskSurface))) { EngBitBlt(DestSurface, SaveSurface, MaskSurface, NULL, NULL, - &DestRect, &SrcPoint, &SrcPoint, NULL, NULL, SRCCOPY); + &DestRect, &SrcPoint, &SrcPoint, NULL, NULL, ROP3_TO_ROP4(SRCCOPY)); EngUnlockSurface(MaskSurface); } EngUnlockSurface(SaveSurface); @@ -231,7 +231,7 @@ IntShowMousePointer(GDIDEVICE *ppdev, SURFOBJ *DestSurface) DestSurface->sizlBitmap.cy - pt.y); EngBitBlt(SaveSurface, DestSurface, NULL, NULL, NULL, - &DestRect, &SrcPoint, NULL, NULL, NULL, SRCCOPY); + &DestRect, &SrcPoint, NULL, NULL, NULL, ROP3_TO_ROP4(SRCCOPY)); EngUnlockSurface(SaveSurface); } @@ -265,17 +265,17 @@ IntShowMousePointer(GDIDEVICE *ppdev, SURFOBJ *DestSurface) if((ColorSurf = EngLockSurface(pgp->ColorSurface))) { EngBitBlt(DestSurface, ColorSurf, MaskSurf, NULL, pgp->XlateObject, - &DestRect, &SrcPoint, &SrcPoint, NULL, NULL, 0xAACC); + &DestRect, &SrcPoint, &SrcPoint, NULL, NULL, R4_MASK); EngUnlockSurface(ColorSurf); } } else { EngBitBlt(DestSurface, MaskSurf, NULL, NULL, pgp->XlateObject, - &DestRect, &SrcPoint, NULL, NULL, NULL, SRCAND); + &DestRect, &SrcPoint, NULL, NULL, NULL, ROP3_TO_ROP4(SRCAND)); SrcPoint.y += pgp->Size.cy; EngBitBlt(DestSurface, MaskSurf, NULL, NULL, pgp->XlateObject, - &DestRect, &SrcPoint, NULL, NULL, NULL, SRCINVERT); + &DestRect, &SrcPoint, NULL, NULL, NULL, ROP3_TO_ROP4(SRCINVERT)); } EngUnlockSurface(MaskSurf); } diff --git a/reactos/subsys/win32k/eng/transblt.c b/reactos/subsys/win32k/eng/transblt.c index 3bc46c2a7d1..ede7a478f74 100644 --- a/reactos/subsys/win32k/eng/transblt.c +++ b/reactos/subsys/win32k/eng/transblt.c @@ -270,18 +270,6 @@ IntEngTransparentBlt(BITMAPOBJ *DestObj, &OutputRect, SourceRect, iTransColor, Reserved); } - if(Ret) - { - /* Dummy BitBlt to let driver know that something has changed. - 0x00AA0029 is the Rop for D (no-op) */ - if (DestObj->flHooks & HOOK_BITBLT) - { - GDIDEVFUNCS(DestSurf).BitBlt( - DestSurf, NULL, NULL, Clip, ColorTranslation, - &OutputRect, NULL, NULL, NULL, NULL, ROP_NOOP); - } - } - MouseSafetyOnDrawEnd(DestSurf); if(SourceSurf != DestSurf) { diff --git a/reactos/subsys/win32k/include/inteng.h b/reactos/subsys/win32k/include/inteng.h index 63e31a7ce4c..11d1875f9b9 100644 --- a/reactos/subsys/win32k/include/inteng.h +++ b/reactos/subsys/win32k/include/inteng.h @@ -18,7 +18,17 @@ typedef struct tagSPAN ULONG Width; } SPAN, *PSPAN; -#define ROP_NOOP 0x00AA0029 +#define R3_OPINDEX_SRCCOPY 0xcc +#define R3_OPINDEX_NOOP 0xaa +#define R4_NOOP ((R3_OPINDEX_NOOP << 8) | R3_OPINDEX_NOOP) +#define R4_MASK ((R3_OPINDEX_NOOP << 8) | R3_OPINDEX_SRCCOPY) + +#define ROP2_TO_MIX(Rop2) (((Rop2) << 8) | (Rop2)) +#define ROP3_USES_SOURCE(Rop3) ((((Rop3) & 0xCC0000) >> 2) != ((Rop3) & 0x330000)) +#define ROP4_USES_SOURCE(Rop4) (((((Rop4) & 0xCC) >> 2) != ((Rop4) & 0x33)) || ((((Rop4) & 0xCC00) >> 2) != ((Rop4) & 0x3300))) +#define ROP3_USES_PATTERN(Rop3) ((((Rop3) & 0xF00000) >> 4) != ((Rop3) & 0x0F0000)) +#define ROP4_USES_PATTERN(Rop4) (((((Rop4) & 0xF0) >> 4) != ((Rop4) & 0x0F)) || ((((Rop4) & 0xF000) >> 4) != ((Rop4) & 0x0F00))) +#define ROP3_TO_ROP4(Rop3) ((((Rop3) >> 8) & 0xff00) | (((Rop3) >> 16) & 0x00ff)) /* Definitions of IntEngXxx functions */ @@ -32,7 +42,6 @@ VOID FASTCALL IntEngCleanupDriverObjs(struct _EPROCESS *Process, PW32PROCESS Win32Process); -#define ROP2_TO_MIX(Rop2) (((Rop2) << 8) | (Rop2)) BOOL STDCALL IntEngLineTo(BITMAPOBJ *Surface, CLIPOBJ *Clip, diff --git a/reactos/subsys/win32k/objects/bitmaps.c b/reactos/subsys/win32k/objects/bitmaps.c index 74490b93c1a..31b7ff80f36 100644 --- a/reactos/subsys/win32k/objects/bitmaps.c +++ b/reactos/subsys/win32k/objects/bitmaps.c @@ -49,8 +49,8 @@ NtGdiBitBlt( HPALETTE SourcePalette = 0, DestPalette = 0; PGDIBRUSHOBJ BrushObj; GDIBRUSHINST BrushInst; - BOOL UsesSource = ROP_USES_SOURCE(ROP); - BOOL UsesPattern = ROP_USES_PATTERN(ROP); + BOOL UsesSource = ROP3_USES_SOURCE(ROP); + BOOL UsesPattern = ROP3_USES_PATTERN(ROP); DCDest = DC_LockDc(hDCDest); if (NULL == DCDest) @@ -201,7 +201,8 @@ NtGdiBitBlt( /* Perform the bitblt operation */ Status = IntEngBitBlt(BitmapDest, BitmapSrc, NULL, DCDest->CombinedClip, XlateObj, - &DestRect, &SourcePoint, NULL, BrushObj ? &BrushInst.BrushObject : NULL, &BrushOrigin, ROP); + &DestRect, &SourcePoint, NULL, BrushObj ? &BrushInst.BrushObject : NULL, + &BrushOrigin, ROP3_TO_ROP4(ROP)); if (UsesSource && XlateObj != NULL) EngDeleteXlate(XlateObj); diff --git a/reactos/subsys/win32k/objects/brush.c b/reactos/subsys/win32k/objects/brush.c index 5d9011fd1dd..a14fb5a1efa 100644 --- a/reactos/subsys/win32k/objects/brush.c +++ b/reactos/subsys/win32k/objects/brush.c @@ -239,7 +239,7 @@ IntPatBlt( NULL, &BrushInst.BrushObject, &BrushOrigin, - ROP); + ROP3_TO_ROP4(ROP)); } BITMAPOBJ_UnlockBitmap(dc->w.hBitmap); diff --git a/reactos/subsys/win32k/objects/fillshap.c b/reactos/subsys/win32k/objects/fillshap.c index 3c9ef6e7e35..066cf2204fe 100644 --- a/reactos/subsys/win32k/objects/fillshap.c +++ b/reactos/subsys/win32k/objects/fillshap.c @@ -979,7 +979,7 @@ IntRectangle(PDC dc, NULL, &FillBrushInst.BrushObject, NULL, - PATCOPY); + ROP3_TO_ROP4(PATCOPY)); } } diff --git a/reactos/subsys/win32k/objects/text.c b/reactos/subsys/win32k/objects/text.c index cc49e03fa21..02f7c13cb45 100644 --- a/reactos/subsys/win32k/objects/text.c +++ b/reactos/subsys/win32k/objects/text.c @@ -1636,7 +1636,7 @@ NtGdiExtTextOut( &SourcePoint, &BrushBgInst.BrushObject, &BrushOrigin, - PATCOPY); + ROP3_TO_ROP4(PATCOPY)); fuOptions &= ~ETO_OPAQUE; } else @@ -1854,7 +1854,7 @@ NtGdiExtTextOut( &SourcePoint, &BrushBgInst.BrushObject, &BrushOrigin, - PATCOPY); + ROP3_TO_ROP4(PATCOPY)); BackgroundLeft = DestRect.right; } From fa4b4f314a2babe515cdb05312bbf64894e65177 Mon Sep 17 00:00:00 2001 From: Gunnar Dalsnes Date: Sun, 6 Feb 2005 19:04:00 +0000 Subject: [PATCH 132/185] -add macros for msvc/gcc portable int64 suffix/LARGE_INTEGER handling -add C_ASSERT (compile-time asserts) svn path=/trunk/; revision=13446 --- reactos/include/ntos/ntdef.h | 37 +++++++++++++++++++++++++++++++----- 1 file changed, 32 insertions(+), 5 deletions(-) diff --git a/reactos/include/ntos/ntdef.h b/reactos/include/ntos/ntdef.h index e9a6b6aa341..4b3eb851277 100644 --- a/reactos/include/ntos/ntdef.h +++ b/reactos/include/ntos/ntdef.h @@ -32,18 +32,45 @@ # define PROBE_ALIGNMENT(_s) TYPE_ALIGNMENT(DWORD) #endif + +#if defined(_MSC_VER) + #define Const64(a) (a##i64) + static __inline LARGE_INTEGER MK_LARGE_INTEGER(__int64 i) + { + LARGE_INTEGER li; + li.QuadPart = i; + return li; + } + #define INIT_LARGE_INTEGER(a) {{(ULONG)a, (LONG)(a>>32)}} +#elif defined (__GNUC__) + #define Const64(a) (a##LL) + #define MK_LARGE_INTEGER(a) ((LARGE_INTEGER)(LONGLONG)(a)) + #define INIT_LARGE_INTEGER(a) MK_LARGE_INTEGER(Const64(a)) +#endif + +#define LargeInteger0 MK_LARGE_INTEGER(0) + + +/* Compile time asserts */ +#define C_ASSERT(e) do{extern char __C_ASSERT__[(e)?1:-1]; (void)__C_ASSERT__;}while(0) + + /* Helpers for easy conversion to system time units (100ns) */ #define ABSOLUTE_TIME(wait) (wait) #define RELATIVE_TIME(wait) (-(wait)) -#define NANOS_TO_100NS(nanos) (((LONGLONG)(nanos)) / 100L) -#define MICROS_TO_100NS(micros) (((LONGLONG)(micros)) * NANOS_TO_100NS(1000L)) -#define MILLIS_TO_100NS(milli) (((LONGLONG)(milli)) * MICROS_TO_100NS(1000L)) -#define SECONDS_TO_100NS(seconds) (((LONGLONG)(seconds)) * MILLIS_TO_100NS(1000L)) +#define NANOS_TO_100NS(nanos) (((LONGLONG)(nanos)) / 100) +#define MICROS_TO_100NS(micros) (((LONGLONG)(micros)) * NANOS_TO_100NS(1000)) +#define MILLIS_TO_100NS(milli) (((LONGLONG)(milli)) * MICROS_TO_100NS(1000)) +#define SECONDS_TO_100NS(seconds) (((LONGLONG)(seconds)) * MILLIS_TO_100NS(1000)) +#define MINUTES_TO_100NS(minutes) (((LONGLONG)(minutes)) * SECONDS_TO_100NS(60)) +#define HOURS_TO_100NS(hours) (((LONGLONG)(hours)) * MINUTES_TO_100NS(60)) + + /* Helpers for enumarating lists */ #define LIST_FOR_EACH(entry, head) \ - for(entry = (head)->Flink; entry != (head); entry = entry->Flink) + for((entry) = (head)->Flink; (entry) != (head); (entry) = (entry)->Flink) /* Safe version which saves pointer to the next entry so the current ptr->field entry From 8efa6b64a6cacaad1647ce00739b04ba9fefa451 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20van=20Geldorp?= Date: Sun, 6 Feb 2005 19:52:26 +0000 Subject: [PATCH 133/185] - Prevent image loading and symbol loading getting each others way - DPRINT1 is preferred over DbgPrint svn path=/trunk/; revision=13447 --- reactos/ntoskrnl/dbg/kdb_symbols.c | 4 ++-- reactos/ntoskrnl/ldr/sysdll.c | 26 +++++++++++++------------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/reactos/ntoskrnl/dbg/kdb_symbols.c b/reactos/ntoskrnl/dbg/kdb_symbols.c index bd2dfb35e67..3780be0d6df 100644 --- a/reactos/ntoskrnl/dbg/kdb_symbols.c +++ b/reactos/ntoskrnl/dbg/kdb_symbols.c @@ -450,10 +450,10 @@ KdbpSymLoadModuleSymbols(IN PUNICODE_STRING FileName, DPRINT("Attempting to open image: %wZ\n", FileName); Status = ZwOpenFile(&FileHandle, - FILE_ALL_ACCESS, + FILE_READ_ACCESS, &ObjectAttributes, &IoStatusBlock, - 0, + FILE_SHARE_READ|FILE_SHARE_WRITE, FILE_SYNCHRONOUS_IO_NONALERT|FILE_NO_INTERMEDIATE_BUFFERING); if (!NT_SUCCESS(Status)) { diff --git a/reactos/ntoskrnl/ldr/sysdll.c b/reactos/ntoskrnl/ldr/sysdll.c index ec928a776c2..9af2d009eef 100644 --- a/reactos/ntoskrnl/ldr/sysdll.c +++ b/reactos/ntoskrnl/ldr/sysdll.c @@ -1,4 +1,4 @@ -/* $Id:$ +/* $Id$ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -93,14 +93,14 @@ NTSTATUS LdrpMapSystemDll(HANDLE ProcessHandle, NULL); DPRINT("Opening NTDLL\n"); Status = ZwOpenFile(&FileHandle, - FILE_ALL_ACCESS, + FILE_READ_ACCESS, &FileObjectAttributes, &Iosb, FILE_SHARE_READ, FILE_SYNCHRONOUS_IO_NONALERT); if (!NT_SUCCESS(Status)) { - DbgPrint("NTDLL open failed (Status %x)\n", Status); + DPRINT1("NTDLL open failed (Status %x)\n", Status); return Status; } Status = ZwReadFile(FileHandle, @@ -114,7 +114,7 @@ NTSTATUS LdrpMapSystemDll(HANDLE ProcessHandle, 0); if (!NT_SUCCESS(Status) || Iosb.Information != sizeof(BlockBuffer)) { - DbgPrint("NTDLL header read failed (Status %x)\n", Status); + DPRINT1("NTDLL header read failed (Status %x)\n", Status); ZwClose(FileHandle); return Status; } @@ -129,7 +129,7 @@ NTSTATUS LdrpMapSystemDll(HANDLE ProcessHandle, || (DosHeader->e_lfanew == 0L) || (*(PULONG) NTHeaders != IMAGE_NT_SIGNATURE)) { - DbgPrint("NTDLL format invalid\n"); + DPRINT1("NTDLL format invalid\n"); ZwClose(FileHandle); return(STATUS_UNSUCCESSFUL); } @@ -149,7 +149,7 @@ NTSTATUS LdrpMapSystemDll(HANDLE ProcessHandle, FileHandle); if (!NT_SUCCESS(Status)) { - DbgPrint("NTDLL create section failed (Status %x)\n", Status); + DPRINT1("NTDLL create section failed (Status %x)\n", Status); ZwClose(FileHandle); return(Status); } @@ -172,7 +172,7 @@ NTSTATUS LdrpMapSystemDll(HANDLE ProcessHandle, PAGE_READWRITE); if (!NT_SUCCESS(Status)) { - DbgPrint("NTDLL map view of secion failed (Status %x)", Status); + DPRINT1("NTDLL map view of secion failed (Status %x)", Status); ZwClose(NTDllSectionHandle); return(Status); } @@ -186,7 +186,7 @@ NTSTATUS LdrpMapSystemDll(HANDLE ProcessHandle, NULL); if (!NT_SUCCESS(Status)) { - DbgPrint("ObReferenceObjectByProcess() failed (Status %x)\n", Status); + DPRINT1("ObReferenceObjectByProcess() failed (Status %x)\n", Status); return(Status); } @@ -210,7 +210,7 @@ NTSTATUS LdrpMapSystemDll(HANDLE ProcessHandle, &SystemDllEntryPoint); if (!NT_SUCCESS(Status)) { - DbgPrint ("LdrGetProcedureAddress failed (Status %x)\n", Status); + DPRINT1 ("LdrGetProcedureAddress failed (Status %x)\n", Status); if (Process != CurrentProcess) { KeDetachProcess(); @@ -235,7 +235,7 @@ NTSTATUS LdrpMapSystemDll(HANDLE ProcessHandle, &SystemDllApcDispatcher); if (!NT_SUCCESS(Status)) { - DbgPrint ("LdrGetProcedureAddress failed (Status %x)\n", Status); + DPRINT1 ("LdrGetProcedureAddress failed (Status %x)\n", Status); if (Process != CurrentProcess) { KeDetachProcess(); @@ -259,7 +259,7 @@ NTSTATUS LdrpMapSystemDll(HANDLE ProcessHandle, &SystemDllExceptionDispatcher); if (!NT_SUCCESS(Status)) { - DbgPrint ("LdrGetProcedureAddress failed (Status %x)\n", Status); + DPRINT1 ("LdrGetProcedureAddress failed (Status %x)\n", Status); if (Process != CurrentProcess) { KeDetachProcess(); @@ -283,7 +283,7 @@ NTSTATUS LdrpMapSystemDll(HANDLE ProcessHandle, &SystemDllCallbackDispatcher); if (!NT_SUCCESS(Status)) { - DbgPrint ("LdrGetProcedureAddress failed (Status %x)\n", Status); + DPRINT1 ("LdrGetProcedureAddress failed (Status %x)\n", Status); if (Process != CurrentProcess) { KeDetachProcess(); @@ -307,7 +307,7 @@ NTSTATUS LdrpMapSystemDll(HANDLE ProcessHandle, &SystemDllRaiseExceptionDispatcher); if (!NT_SUCCESS(Status)) { - DbgPrint ("LdrGetProcedureAddress failed (Status %x)\n", Status); + DPRINT1 ("LdrGetProcedureAddress failed (Status %x)\n", Status); if (Process != CurrentProcess) { KeDetachProcess(); From e8a6256e328ed86b5936c70399a78bfa8a39c71b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20van=20Geldorp?= Date: Sun, 6 Feb 2005 21:21:22 +0000 Subject: [PATCH 134/185] Export some Lsa stubs svn path=/trunk/; revision=13448 --- reactos/lib/advapi32/advapi32.def | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reactos/lib/advapi32/advapi32.def b/reactos/lib/advapi32/advapi32.def index 316c425af69..cabf743d788 100644 --- a/reactos/lib/advapi32/advapi32.def +++ b/reactos/lib/advapi32/advapi32.def @@ -255,7 +255,7 @@ LsaQueryInformationPolicy@12 ;LsaQueryTrustedDomainInfo@16 ;LsaRemoveAccountRights@20 ;LsaRemovePrivilegesFromAccount@12 -;LsaRetrievePrivateData@12 +LsaRetrievePrivateData@12 ;LsaSetInformationPolicy@12 ;LsaSetInformationTrustedDomain@12 ;LsaSetQuotasForAccount@8 @@ -263,7 +263,7 @@ LsaQueryInformationPolicy@12 ;LsaSetSecurityObject@12 ;LsaSetSystemAccessAccount@8 ;LsaSetTrustedDomainInformation@16 -;LsaStorePrivateData@12 +LsaStorePrivateData@12 MakeAbsoluteSD@44 MakeSelfRelativeSD@12 MapGenericMask@8 From 9e799af69613d4faafc9b555b8fc70cf601dee19 Mon Sep 17 00:00:00 2001 From: Emanuele Aliberti Date: Sun, 6 Feb 2005 21:55:07 +0000 Subject: [PATCH 135/185] Some preliminary work on the SM to make it manage environment servers. svn path=/trunk/; revision=13449 --- reactos/subsys/smss/client.c | 116 ++++++++++++++++++++++++ reactos/subsys/smss/debug.c | 92 +++++++++++++++++++ reactos/subsys/smss/init.c | 75 ++++++--------- reactos/subsys/smss/makefile | 2 +- reactos/subsys/smss/smapi.c | 171 ++++++++++++++++++++++++----------- reactos/subsys/smss/smss.c | 2 +- reactos/subsys/smss/smss.h | 26 +++++- 7 files changed, 379 insertions(+), 105 deletions(-) create mode 100644 reactos/subsys/smss/client.c create mode 100644 reactos/subsys/smss/debug.c diff --git a/reactos/subsys/smss/client.c b/reactos/subsys/smss/client.c new file mode 100644 index 00000000000..def34074c4c --- /dev/null +++ b/reactos/subsys/smss/client.c @@ -0,0 +1,116 @@ +/* $Id: smss.c 12852 2005-01-06 13:58:04Z mf $ + * + * client.c - Session Manager client Management + * + * ReactOS Operating System + * + * -------------------------------------------------------------------- + * + * This software is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This software 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 + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING.LIB. If not, write + * to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, + * MA 02139, USA. + * + * -------------------------------------------------------------------- + */ +#define NTOS_MODE_USER +#include +#include +#include "smss.h" + +/* Private ADT */ + +typedef struct _SM_CLIENT_DATA +{ + USHORT SubsystemId; + BOOL Initialized; + HANDLE ServerProcess; + HANDLE ApiPort; + HANDLE SbApiPort; + struct _SM_CLIENT_DATA * Next; + +} SM_CLIENT_DATA, *PSM_CLIENT_DATA; + + +struct _SM_CLIENT_DIRECTORY +{ + RTL_CRITICAL_SECTION Lock; + ULONG Count; + PSM_CLIENT_DATA Client; + +} SmpClientDirectory; + +/********************************************************************** + * SmpInitializeClientManagement/0 + */ +VOID STDCALL +SmpInitializeClientManagement (VOID) +{ + RtlInitializeCriticalSection(& SmpClientDirectory.Lock); + SmpClientDirectory.Count = 0; + SmpClientDirectory.Client = NULL; +} + +/********************************************************************** + * SmpCreateClient/1 + */ +NTSTATUS STDCALL +SmpCreateClient(SM_PORT_MESSAGE Request) +{ + PSM_CLIENT_DATA pClient = NULL; + + /* + * Allocate the storage for client data + */ + pClient = RtlAllocateHeap (SmpHeap, + HEAP_ZERO_MEMORY, + sizeof (SM_CLIENT_DATA)); + if (NULL == pClient) return STATUS_NO_MEMORY; + /* + * Initialize the client data + */ + // TODO + /* + * Insert the new descriptor in the + * client directory. + */ + RtlEnterCriticalSection (& SmpClientDirectory.Lock); + if (NULL == SmpClientDirectory.Client) + { + SmpClientDirectory.Client = pClient; + } else { + PSM_CLIENT_DATA pCD = NULL; + + for (pCD=SmpClientDirectory.Client; + (NULL != pCD->Next); + pCD = pCD->Next); + pCD->Next = pClient; + } + ++ SmpClientDirectory.Count; + RtlLeaveCriticalSection (& SmpClientDirectory.Lock); + return STATUS_SUCCESS; +} + +/********************************************************************** + * SmpDestroyClient/1 + */ +NTSTATUS STDCALL +SmpDestroyClient (ULONG SubsystemId) +{ + RtlEnterCriticalSection (& SmpClientDirectory.Lock); + /* TODO */ + RtlLeaveCriticalSection (& SmpClientDirectory.Lock); + return STATUS_SUCCESS; +} + +/* EOF */ diff --git a/reactos/subsys/smss/debug.c b/reactos/subsys/smss/debug.c new file mode 100644 index 00000000000..e1993610e21 --- /dev/null +++ b/reactos/subsys/smss/debug.c @@ -0,0 +1,92 @@ +/* $Id: smss.c 12852 2005-01-06 13:58:04Z mf $ + * + * client.c - Session Manager client Management + * + * ReactOS Operating System + * + * -------------------------------------------------------------------- + * + * This software is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This software 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 + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING.LIB. If not, write + * to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, + * MA 02139, USA. + * + * -------------------------------------------------------------------- + */ +#define NTOS_MODE_USER +#include +#include +#include +#include "smss.h" + +/* GLOBALS ***********************************************************/ + +HANDLE DbgSsApiPort = INVALID_HANDLE_VALUE; +HANDLE DbgUiApiPort = INVALID_HANDLE_VALUE; + +/* FUNCTIONS *********************************************************/ + +NTSTATUS STDCALL +SmpInitializeDbgSs (VOID) +{ + NTSTATUS Status; + UNICODE_STRING UnicodeString; + OBJECT_ATTRIBUTES ObjectAttributes; + + + /* Create the \DbgSsApiPort object (LPC) */ + RtlRosInitUnicodeStringFromLiteral(&UnicodeString, + L"\\DbgSsApiPort"); + InitializeObjectAttributes(&ObjectAttributes, + &UnicodeString, + PORT_ALL_ACCESS, + NULL, + NULL); + + Status = NtCreatePort(&DbgSsApiPort, + &ObjectAttributes, + 0, + 0, + 0); + + if (!NT_SUCCESS(Status)) + { + return(Status); + } + DbgPrint("SMSS: %s: \\DbgSsApiPort created\n",__FUNCTION__); + + /* Create the \DbgUiApiPort object (LPC) */ + RtlRosInitUnicodeStringFromLiteral(&UnicodeString, + L"\\DbgUiApiPort"); + InitializeObjectAttributes(&ObjectAttributes, + &UnicodeString, + PORT_ALL_ACCESS, + NULL, + NULL); + + Status = NtCreatePort(&DbgUiApiPort, + &ObjectAttributes, + 0, + 0, + 0); + if (!NT_SUCCESS(Status)) + { + return(Status); + } + DbgPrint("SMSS: %s: \\DbgUiApiPort created\n",__FUNCTION__); + + return STATUS_SUCCESS; +} + +/* EOF */ + diff --git a/reactos/subsys/smss/init.c b/reactos/subsys/smss/init.c index a71ae7960a3..83ce1e2ef6a 100644 --- a/reactos/subsys/smss/init.c +++ b/reactos/subsys/smss/init.c @@ -33,7 +33,7 @@ #include #include #include - +#include #include "smss.h" #define NDEBUG @@ -41,8 +41,7 @@ /* GLOBALS ******************************************************************/ -HANDLE DbgSsApiPort = INVALID_HANDLE_VALUE; -HANDLE DbgUiApiPort = INVALID_HANDLE_VALUE; +HANDLE SmpHeap = NULL; PWSTR SmSystemEnvironment = NULL; @@ -824,6 +823,20 @@ InitSessionManager(HANDLE Children[]) HANDLE CsrssInitEvent; WCHAR UnicodeBuffer[MAX_PATH]; + /* Create our own heap */ + SmpHeap = RtlCreateHeap(HEAP_GROWABLE, + NULL, + 65536, + 65536, + NULL, + NULL); + if (NULL == SmpHeap) + { + DbgPrint("SMSS: %s: failed to create private heap, aborting\n",__FUNCTION__); + return STATUS_UNSUCCESSFUL; + } + + /* Create object directories */ Status = SmCreateObjectDirectories(); if (!NT_SUCCESS(Status)) @@ -832,8 +845,8 @@ InitSessionManager(HANDLE Children[]) return(Status); } - /* Create the SmApiPort object (LPC) */ - Status = SmCreateApiPort(); + /* Create the \SmApiPort object (LPC) */ + Status = SmpCreateApiPort(); if (!NT_SUCCESS(Status)) { DPRINT1("SM: Failed to create SmApiPort (Status %lx)\n", Status); @@ -916,6 +929,13 @@ InitSessionManager(HANDLE Children[]) } #endif + /* + * Initialize SM client management: + * this MUST be done before any + * subsystem server is run. + */ + SmpInitializeClientManagement(); + DPRINT("SM: loading subsystems\n"); /* Load the subsystems */ @@ -1043,50 +1063,15 @@ InitSessionManager(HANDLE Children[]) } Children[CHILD_WINLOGON] = ProcessInfo.ProcessHandle; - /* Create the \DbgSsApiPort object (LPC) */ - RtlRosInitUnicodeStringFromLiteral(&UnicodeString, - L"\\DbgSsApiPort"); - InitializeObjectAttributes(&ObjectAttributes, - &UnicodeString, - PORT_ALL_ACCESS, - NULL, - NULL); - - Status = NtCreatePort(&DbgSsApiPort, - &ObjectAttributes, - 0, - 0, - 0); - + /* Initialize the DBGSS */ + Status = SmpInitializeDbgSs(); if (!NT_SUCCESS(Status)) { + DisplayString(L"SM: DbgSs initialization failed!\n"); + NtTerminateProcess(Children[CHILD_WINLOGON],0); + NtTerminateProcess(Children[CHILD_CSRSS],0); return(Status); } -#ifndef NDEBUG - DisplayString(L"SM: DbgSsApiPort created...\n"); -#endif - - /* Create the \DbgUiApiPort object (LPC) */ - RtlRosInitUnicodeStringFromLiteral(&UnicodeString, - L"\\DbgUiApiPort"); - InitializeObjectAttributes(&ObjectAttributes, - &UnicodeString, - PORT_ALL_ACCESS, - NULL, - NULL); - - Status = NtCreatePort(&DbgUiApiPort, - &ObjectAttributes, - 0, - 0, - 0); - if (!NT_SUCCESS(Status)) - { - return(Status); - } -#ifndef NDEBUG - DisplayString (L"SM: DbgUiApiPort created...\n"); -#endif return(STATUS_SUCCESS); } diff --git a/reactos/subsys/smss/makefile b/reactos/subsys/smss/makefile index ad4bd929842..92ecef1d8b0 100644 --- a/reactos/subsys/smss/makefile +++ b/reactos/subsys/smss/makefile @@ -15,7 +15,7 @@ TARGET_CFLAGS = -D__NTAPP__ # require os code to explicitly request A/W version of structs/functions TARGET_CFLAGS += -D_DISABLE_TIDENTS -Wall -Werror -TARGET_OBJECTS = $(TARGET_NAME).o init.o smapi.o +TARGET_OBJECTS = $(TARGET_NAME).o init.o smapi.o client.o debug.o include $(PATH_TO_TOP)/rules.mak diff --git a/reactos/subsys/smss/smapi.c b/reactos/subsys/smss/smapi.c index 3a2f4689fec..0abb4a77471 100644 --- a/reactos/subsys/smss/smapi.c +++ b/reactos/subsys/smss/smapi.c @@ -5,10 +5,12 @@ * */ -#include -#include +/*#include +#include */ +#define NTOS_MODE_USER +#include +#include #include - #include "smss.h" #define NDEBUG @@ -17,62 +19,123 @@ static HANDLE SmApiPort = INVALID_HANDLE_VALUE; -/* FUNCTIONS ****************************************************************/ +/* SM API **********************************************************************/ +#define SMAPI(n) \ +NTSTATUS FASTCALL n (PSM_PORT_MESSAGE Request) -VOID STDCALL -SmApiThread(HANDLE Port) +SMAPI(SmInvalid) { - NTSTATUS Status; - ULONG Unknown; - PLPC_MESSAGE Reply = NULL; - LPC_MESSAGE Message; - -#ifndef NDEBUG - DisplayString(L"SmApiThread: running\n"); -#endif - - while (TRUE) - { -#ifndef NDEBUG - DisplayString(L"SmApiThread: waiting for message\n"); -#endif - - Status = NtReplyWaitReceivePort(Port, - &Unknown, - Reply, - &Message); - if (NT_SUCCESS(Status)) - { -#ifndef NDEBUG - DisplayString(L"SmApiThread: message received\n"); -#endif - - if (Message.MessageType == LPC_CONNECTION_REQUEST) - { -// SmHandleConnectionRequest (Port, &Message); - Reply = NULL; - } - else if (Message.MessageType == LPC_DEBUG_EVENT) - { -// DbgSsHandleKmApiMsg (&Message, 0); - Reply = NULL; - } - else if (Message.MessageType == LPC_PORT_CLOSED) - { - Reply = NULL; - } - else - { -// Reply = &Message; - } - } - } + DbgPrint("SMSS: %s called\n",__FUNCTION__); + Request->Status = STATUS_NOT_IMPLEMENTED; + return STATUS_SUCCESS; } +SMAPI(SmCompSes) +{ + DbgPrint("SMSS: %s called\n",__FUNCTION__); + Request->Status = STATUS_NOT_IMPLEMENTED; + return STATUS_SUCCESS; +} +SMAPI(SmExecPgm) +{ + DbgPrint("SMSS: %s called\n",__FUNCTION__); + Request->Status = STATUS_NOT_IMPLEMENTED; + return STATUS_SUCCESS; +} +/* SM API Table */ +typedef NTSTATUS (FASTCALL * SM_PORT_API)(PSM_PORT_MESSAGE); + +SM_PORT_API SmApi [] = +{ + SmInvalid, /* unused */ + SmCompSes, + SmInvalid, /* obsolete */ + SmInvalid, /* unknown */ + SmExecPgm +}; + + +/********************************************************************** + * NAME + * SmpHandleConnectionRequest/2 + * + * REMARKS + * Quoted in http://support.microsoft.com/kb/258060/EN-US/ + */ +NTSTATUS STDCALL +SmpHandleConnectionRequest (HANDLE Port, PSM_PORT_MESSAGE Request) +{ + DbgPrint("SMSS: %s called\n",__FUNCTION__); + return STATUS_SUCCESS; +} + +/********************************************************************** + * NAME + * SmpApiThread/1 + * + * DESCRIPTION + * Entry point for the listener thread of LPC port "\SmApiPort". + */ +VOID STDCALL +SmpApiThread(HANDLE Port) +{ + NTSTATUS Status = STATUS_SUCCESS; + ULONG Unknown = 0; + PLPC_MESSAGE Reply = NULL; + SM_PORT_MESSAGE Request = {{0}}; + + DbgPrint("SMSS: %s running.\n",__FUNCTION__); + + while (TRUE) + { + DbgPrint("SMSS: %s: waiting for message\n",__FUNCTION__); + + Status = NtReplyWaitReceivePort(Port, + & Unknown, + Reply, + (PLPC_MESSAGE) & Request); + if (NT_SUCCESS(Status)) + { + DbgPrint("SMSS: %s: message received\n",__FUNCTION__); + + switch (Request.Header.MessageType) + { + case LPC_CONNECTION_REQUEST: + SmpHandleConnectionRequest (Port, &Request); + Reply = NULL; + break; + case LPC_DEBUG_EVENT: +// DbgSsHandleKmApiMsg (&Request, 0); + Reply = NULL; + break; + case LPC_PORT_CLOSED: + Reply = NULL; + break; + default: + if ((Request.ApiIndex) && + (Request.ApiIndex < (sizeof SmApi / sizeof SmApi[0]))) + { + Status = SmApi[Request.ApiIndex](&Request); + Reply = (PLPC_MESSAGE) & Request; + } else { + Request.Status = STATUS_NOT_IMPLEMENTED; + Reply = (PLPC_MESSAGE) & Request; + } + } + } + } +} + +/********************************************************************** + * NAME + * SmpCreateApiPort/0 + * + * DECRIPTION + */ NTSTATUS -SmCreateApiPort(VOID) +SmpCreateApiPort(VOID) { OBJECT_ATTRIBUTES ObjectAttributes; UNICODE_STRING UnicodeString; @@ -103,7 +166,7 @@ SmCreateApiPort(VOID) 0, NULL, NULL, - (PTHREAD_START_ROUTINE)SmApiThread, + (PTHREAD_START_ROUTINE)SmpApiThread, (PVOID)SmApiPort, NULL, NULL); @@ -114,7 +177,7 @@ SmCreateApiPort(VOID) 0, NULL, NULL, - (PTHREAD_START_ROUTINE)SmApiThread, + (PTHREAD_START_ROUTINE)SmpApiThread, (PVOID)SmApiPort, NULL, NULL); diff --git a/reactos/subsys/smss/smss.c b/reactos/subsys/smss/smss.c index 42673e7bc33..c51b66270dc 100644 --- a/reactos/subsys/smss/smss.c +++ b/reactos/subsys/smss/smss.c @@ -27,7 +27,7 @@ * Compiled successfully with egcs 1.1.2 */ #include - +#include #include "smss.h" #define NDEBUG diff --git a/reactos/subsys/smss/smss.h b/reactos/subsys/smss/smss.h index 295f1a3b1dc..79b730adfbb 100644 --- a/reactos/subsys/smss/smss.h +++ b/reactos/subsys/smss/smss.h @@ -1,4 +1,3 @@ - #ifndef _SMSS_H_INCLUDED_ #define _SMSS_H_INCLUDED_ @@ -15,6 +14,9 @@ /* FUNCTIONS ***********/ /* init.c */ + +extern HANDLE SmpHeap; + NTSTATUS InitSessionManager(HANDLE Children[]); @@ -23,16 +25,32 @@ InitSessionManager(HANDLE Children[]); void DisplayString (LPCWSTR lpwString); void PrintString (char* fmt,...); - /* smapi.c */ NTSTATUS -SmCreateApiPort(VOID); +SmpCreateApiPort(VOID); VOID STDCALL -SmApiThread(HANDLE Port); +SmpApiThread(HANDLE Port); +/* client.c */ +VOID STDCALL +SmpInitializeClientManagement(VOID); + +NTSTATUS STDCALL +SmpCreateClient(SM_PORT_MESSAGE); + +NTSTATUS STDCALL +SmpDestroyClient(ULONG); + +/* debug.c */ + +extern HANDLE DbgSsApiPort; +extern HANDLE DbgUiApiPort; + +NTSTATUS STDCALL +SmpInitializeDbgSs(VOID); #endif /* _SMSS_H_INCLUDED_ */ From 97bae25ad4179b597e122e4095316d417d9460be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20van=20Geldorp?= Date: Sun, 6 Feb 2005 21:57:44 +0000 Subject: [PATCH 136/185] - Add RegisterServiceCtrlHandlerExA/W - Add stubs for CheckTokenMembership and LsaGetUserName svn path=/trunk/; revision=13450 --- reactos/lib/advapi32/advapi32.def | 5 ++- reactos/lib/advapi32/sec/lsa.c | 19 ++++++++- reactos/lib/advapi32/service/sctrl.c | 60 ++++++++++++++++++++++++++++ reactos/lib/advapi32/token/token.c | 19 ++++++++- 4 files changed, 98 insertions(+), 5 deletions(-) diff --git a/reactos/lib/advapi32/advapi32.def b/reactos/lib/advapi32/advapi32.def index cabf743d788..0945f2130ee 100644 --- a/reactos/lib/advapi32/advapi32.def +++ b/reactos/lib/advapi32/advapi32.def @@ -45,6 +45,7 @@ BuildTrusteeWithSidA@8 BuildTrusteeWithSidW@8 ChangeServiceConfigA@44 ChangeServiceConfigW@44 +CheckTokenMembership@12 ClearEventLogA@8 ClearEventLogW@8 CloseEventLog@4 @@ -235,7 +236,7 @@ LsaClose@4 LsaFreeMemory@4 ;LsaGetQuotasForAccount@8 ;LsaGetSystemAccessAccount@8 -;LsaGetUserName@8 +LsaGetUserName@8 ;LsaICLookupNames@32 ;LsaICLookupSids@32 ;LsaLookupNames@20 @@ -359,6 +360,8 @@ RegisterEventSourceA@8 RegisterEventSourceW@8 RegisterServiceCtrlHandlerA@8 RegisterServiceCtrlHandlerW@8 +RegisterServiceCtrlHandlerExA@12 +RegisterServiceCtrlHandlerExW@12 ;ReplaceAllAccessRightsA ;ReplaceAllAccessRightsW ReportEventA@36 diff --git a/reactos/lib/advapi32/sec/lsa.c b/reactos/lib/advapi32/sec/lsa.c index eaf061034d0..bc915a6d4c8 100644 --- a/reactos/lib/advapi32/sec/lsa.c +++ b/reactos/lib/advapi32/sec/lsa.c @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries * FILE: lib/advapi32/sec/lsa.c @@ -493,3 +492,19 @@ LsaStorePrivateData( { return STATUS_NOT_IMPLEMENTED; } + +/* + * @unimplemented + */ +NTSTATUS +STDCALL +LsaGetUserName( + PUNICODE_STRING *UserName, + PUNICODE_STRING *DomainName) +{ + DPRINT1("LsaGetUserName not implemented\n"); + + return STATUS_NOT_IMPLEMENTED; +} + +/* EOF */ diff --git a/reactos/lib/advapi32/service/sctrl.c b/reactos/lib/advapi32/service/sctrl.c index defa64c0152..e6fd2499b58 100644 --- a/reactos/lib/advapi32/service/sctrl.c +++ b/reactos/lib/advapi32/service/sctrl.c @@ -31,6 +31,8 @@ typedef struct _ACTIVE_SERVICE LPSERVICE_MAIN_FUNCTIONW lpFuncW; } Main; LPHANDLER_FUNCTION HandlerFunction; + LPHANDLER_FUNCTION_EX HandlerFunctionEx; + LPVOID HandlerContext; SERVICE_STATUS ServiceStatus; BOOL bUnicode; LPWSTR Arguments; @@ -326,6 +328,64 @@ RegisterServiceCtrlHandlerW(LPCWSTR lpServiceName, } Service->HandlerFunction = lpHandlerProc; + Service->HandlerFunctionEx = NULL; + + return (SERVICE_STATUS_HANDLE)Service->ThreadId; +} + + +/********************************************************************** + * RegisterServiceCtrlHandlerExA + * + * @implemented + */ +SERVICE_STATUS_HANDLE STDCALL +RegisterServiceCtrlHandlerExA(LPCSTR lpServiceName, + LPHANDLER_FUNCTION_EX lpHandlerProc, + LPVOID lpContext) +{ + ANSI_STRING ServiceNameA; + UNICODE_STRING ServiceNameU; + SERVICE_STATUS_HANDLE SHandle; + + RtlInitAnsiString(&ServiceNameA, (LPSTR)lpServiceName); + if (!NT_SUCCESS(RtlAnsiStringToUnicodeString(&ServiceNameU, &ServiceNameA, TRUE))) + { + SetLastError(ERROR_OUTOFMEMORY); + return (SERVICE_STATUS_HANDLE)0; + } + + SHandle = RegisterServiceCtrlHandlerExW(ServiceNameU.Buffer, + lpHandlerProc, + lpContext); + + RtlFreeUnicodeString(&ServiceNameU); + + return SHandle; +} + + +/********************************************************************** + * RegisterServiceCtrlHandlerExW + * + * @implemented + */ +SERVICE_STATUS_HANDLE STDCALL +RegisterServiceCtrlHandlerExW(LPCWSTR lpServiceName, + LPHANDLER_FUNCTION_EX lpHandlerProc, + LPVOID lpContext) +{ + PACTIVE_SERVICE Service; + + Service = ScLookupServiceByServiceName((LPWSTR)lpServiceName); + if (Service == NULL) + { + return (SERVICE_STATUS_HANDLE)NULL; + } + + Service->HandlerFunction = NULL; + Service->HandlerFunctionEx = lpHandlerProc; + Service->HandlerContext = lpContext; return (SERVICE_STATUS_HANDLE)Service->ThreadId; } diff --git a/reactos/lib/advapi32/token/token.c b/reactos/lib/advapi32/token/token.c index 9b7a0c51a66..94d68c0fa45 100644 --- a/reactos/lib/advapi32/token/token.c +++ b/reactos/lib/advapi32/token/token.c @@ -1,5 +1,4 @@ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries * FILE: lib/advapi32/token/token.c @@ -11,6 +10,8 @@ #include "advapi32.h" +#define NDEBUG +#include /* * @implemented @@ -310,4 +311,18 @@ DuplicateToken (HANDLE ExistingTokenHandle, DuplicateTokenHandle); } + +/* + * @unimplemented + */ +BOOL STDCALL +CheckTokenMembership(HANDLE Token, PSID SidToCheck, PBOOL IsMember) +{ + DPRINT1("CheckTokenMembership not implemented\n"); + + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + + return FALSE; +} + /* EOF */ From b77a02dbefe366fa15739d7d0b358a24640daa8a Mon Sep 17 00:00:00 2001 From: Emanuele Aliberti Date: Sun, 6 Feb 2005 22:03:32 +0000 Subject: [PATCH 137/185] SMDLL: add it to the build process. svn path=/trunk/; revision=13451 --- reactos/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reactos/Makefile b/reactos/Makefile index fa2dfe1d553..9afe433a400 100644 --- a/reactos/Makefile +++ b/reactos/Makefile @@ -58,8 +58,8 @@ DLLS_SHELLEXT = shellext DLLS = acledit aclui advapi32 advpack cabinet cards comctl32 crtdll comdlg32 d3d8thk dbghelp expat fmifs freetype \ gdi32 gdiplus glu32 hid imagehlp imm32 iphlpapi kernel32 lzexpand mesa32 midimap mmdrv mpr msacm msafd \ msgina msi msimg32 msvcrt20 msvideo mswsock netapi32 ntdll ole32 oleaut32 oledlg olepro32 opengl32 \ - packet psapi riched20 richedit rpcrt4 samlib secur32 setupapi shell32 shlwapi snmpapi syssetup twain \ - unicode user32 userenv version wininet winmm winspool ws2help ws2_32 wsock32 wshirda dnsapi \ + packet psapi riched20 richedit rpcrt4 samlib secur32 setupapi shell32 shlwapi smdll snmpapi syssetup \ + twain unicode user32 userenv version wininet winmm winspool ws2help ws2_32 wsock32 wshirda dnsapi \ urlmon shdocvw dinput dinput8 dxdiagn devenum dsound $(DLLS_KBD) $(DLLS_CPL) $(DLLS_SHELLEXT) SUBSYS = smss win32k csrss ntvdm From 210f9b4812ff368a12c9d8068f893f93d58e728f Mon Sep 17 00:00:00 2001 From: Emanuele Aliberti Date: Sun, 6 Feb 2005 22:06:44 +0000 Subject: [PATCH 138/185] Add SMDLL to the boot CD. svn path=/trunk/; revision=13452 --- reactos/bootdata/packages/reactos.dff | 1 + 1 file changed, 1 insertion(+) diff --git a/reactos/bootdata/packages/reactos.dff b/reactos/bootdata/packages/reactos.dff index 6cbb91acc1a..fd7b1b87f5c 100755 --- a/reactos/bootdata/packages/reactos.dff +++ b/reactos/bootdata/packages/reactos.dff @@ -116,6 +116,7 @@ lib\setupapi\setupapi.dll 1 lib\shdocvw\shdocvw.dll 1 lib\shell32\shell32.dll 1 lib\shlwapi\shlwapi.dll 1 +lib\smdll\smdll.dll 1 lib\syssetup\syssetup.dll 1 lib\twain\twain_32.dll 1 lib\urlmon\urlmon.dll 1 From 4cc354816b66eb3b9e3a865ddade44ed9c86b951 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20van=20Geldorp?= Date: Sun, 6 Feb 2005 22:16:05 +0000 Subject: [PATCH 139/185] =?UTF-8?q?Herv=C3=A9=20Poussineau=20=20(Partial)=20implementation=20of=20CheckTokenMembers?= =?UTF-8?q?hip()?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit svn path=/trunk/; revision=13453 --- reactos/lib/advapi32/token/token.c | 83 +++++++++++++++++++++++++++--- 1 file changed, 76 insertions(+), 7 deletions(-) diff --git a/reactos/lib/advapi32/token/token.c b/reactos/lib/advapi32/token/token.c index 94d68c0fa45..3b42ec8d0d1 100644 --- a/reactos/lib/advapi32/token/token.c +++ b/reactos/lib/advapi32/token/token.c @@ -313,16 +313,85 @@ DuplicateToken (HANDLE ExistingTokenHandle, /* - * @unimplemented + * @implemented */ BOOL STDCALL -CheckTokenMembership(HANDLE Token, PSID SidToCheck, PBOOL IsMember) +CheckTokenMembership (HANDLE ExistingTokenHandle, + PSID SidToCheck, + PBOOL IsMember) { - DPRINT1("CheckTokenMembership not implemented\n"); - - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - - return FALSE; + HANDLE AccessToken; + BOOL ReleaseToken = FALSE; + BOOL Result = FALSE; + DWORD dwSize; + DWORD i; + PTOKEN_GROUPS lpGroups = NULL; + TOKEN_TYPE TokenInformation; + + if (IsMember == NULL) + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + + if (ExistingTokenHandle == NULL) + { + /* Get impersonation token of the calling thread */ + if (!OpenThreadToken(GetCurrentThread(), TOKEN_QUERY, FALSE, &ExistingTokenHandle)) + return FALSE; + + if (!DuplicateToken(ExistingTokenHandle, SecurityAnonymous, &AccessToken)) + { + CloseHandle(ExistingTokenHandle); + goto ByeBye; + } + CloseHandle(ExistingTokenHandle); + ReleaseToken = TRUE; + } + else + { + if (!GetTokenInformation(ExistingTokenHandle, TokenType, &TokenInformation, sizeof(TokenInformation), &dwSize)) + goto ByeBye; + if (TokenInformation != TokenImpersonation) + { + /* Duplicate token to have a impersonation token */ + if (!DuplicateToken(ExistingTokenHandle, SecurityAnonymous, &AccessToken)) + return FALSE; + ReleaseToken = TRUE; + } + else + AccessToken = ExistingTokenHandle; + } + + *IsMember = FALSE; + /* Search in groups of the token */ + if (!GetTokenInformation(AccessToken, TokenGroups, NULL, 0, &dwSize)) + goto ByeBye; + lpGroups = (PTOKEN_GROUPS)HeapAlloc(GetProcessHeap(), 0, dwSize); + if (!lpGroups) + goto ByeBye; + if (!GetTokenInformation(AccessToken, TokenGroups, lpGroups, dwSize, &dwSize)) + goto ByeBye; + for (i = 0; i < lpGroups->GroupCount; i++) + { + if (EqualSid(SidToCheck, &lpGroups->Groups[i].Sid)) + { + Result = TRUE; + *IsMember = TRUE; + goto ByeBye; + } + } + /* FIXME: Search in users of the token? */ + DPRINT1("CheckTokenMembership() partially implemented!\n"); + Result = TRUE; + +ByeBye: + if (lpGroups != NULL) + HeapFree(GetProcessHeap(), 0, lpGroups); + if (ReleaseToken) + CloseHandle(AccessToken); + + return Result; } /* EOF */ From 8b55015f042cc477abfc8a5dfad7bf0b33df4bce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20van=20Geldorp?= Date: Mon, 7 Feb 2005 10:29:44 +0000 Subject: [PATCH 140/185] Fix definition of LUID constants svn path=/trunk/; revision=13454 --- reactos/include/ntos/security.h | 7 ------- reactos/ntoskrnl/se/luid.c | 5 +++-- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/reactos/include/ntos/security.h b/reactos/include/ntos/security.h index 4dabd7950a2..1fa8d5db05a 100644 --- a/reactos/include/ntos/security.h +++ b/reactos/include/ntos/security.h @@ -74,17 +74,10 @@ typedef struct _SECURITY_DESCRIPTOR_CONTEXT #ifndef __USE_W32API -#ifndef _MSC_VER -#define SYSTEM_LUID {{ 0x3E7, 0x0 }} -#define ANONYMOUS_LOGON_LUID {{ 0x3e6, 0x0 }} -#define LOCALSERVICE_LUID {{ 0x3e5, 0x0 }} -#define NETWORKSERVICE_LUID {{ 0x3e4, 0x0 }} -#else #define SYSTEM_LUID { 0x3E7, 0x0 } #define ANONYMOUS_LOGON_LUID { 0x3e6, 0x0 } #define LOCALSERVICE_LUID { 0x3e5, 0x0 } #define NETWORKSERVICE_LUID { 0x3e4, 0x0 } -#endif /* SID Auhority */ #define SECURITY_NULL_SID_AUTHORITY {0,0,0,0,0,0} diff --git a/reactos/ntoskrnl/se/luid.c b/reactos/ntoskrnl/se/luid.c index c3dac995355..1ea9e71c3fc 100644 --- a/reactos/ntoskrnl/se/luid.c +++ b/reactos/ntoskrnl/se/luid.c @@ -24,10 +24,11 @@ static LARGE_INTEGER LuidValue; VOID INIT_FUNCTION SepInitLuid(VOID) { - LARGE_INTEGER DummyLuidValue = SYSTEM_LUID; + LUID DummyLuidValue = SYSTEM_LUID; KeInitializeSpinLock(&LuidLock); - LuidValue = DummyLuidValue; + LuidValue.u.HighPart = DummyLuidValue.HighPart; + LuidValue.u.LowPart = DummyLuidValue.LowPart; LuidIncrement.QuadPart = 1; } From e4e9497fb07b3668e33e1a79bdcbbf6d504e8ebc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20van=20Geldorp?= Date: Mon, 7 Feb 2005 10:30:14 +0000 Subject: [PATCH 141/185] Remove no longer needed hack svn path=/trunk/; revision=13455 --- rosapps/tests/tokentest/tokentest.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/rosapps/tests/tokentest/tokentest.c b/rosapps/tests/tokentest/tokentest.c index c8b4e4232cb..f2a50f42a15 100644 --- a/rosapps/tests/tokentest/tokentest.c +++ b/rosapps/tests/tokentest/tokentest.c @@ -356,11 +356,7 @@ CreateInitialSystemToken(HANDLE* phSystemToken) LARGE_INTEGER tkExpiration; -#if 0 /* FIXME */ LUID authId = SYSTEM_LUID; -#else - LUID authId = { 0x3E7, 0x0 }; -#endif TOKEN_SOURCE source = { From 30b7d49ae6b9071c28408e8fc9a2d630717750b8 Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Mon, 7 Feb 2005 10:33:44 +0000 Subject: [PATCH 142/185] - Nt->Zw - Assign an instance path to the root device node and reports its arrival. svn path=/trunk/; revision=13456 --- reactos/ntoskrnl/io/arcname.c | 40 +++++++++--------- reactos/ntoskrnl/io/bootlog.c | 54 ++++++++++++------------ reactos/ntoskrnl/io/device.c | 4 +- reactos/ntoskrnl/io/driver.c | 10 ++--- reactos/ntoskrnl/io/errlog.c | 8 ++-- reactos/ntoskrnl/io/iocomp.c | 12 +++--- reactos/ntoskrnl/io/iomgr.c | 4 +- reactos/ntoskrnl/io/pnpmgr.c | 52 ++++++++++++++--------- reactos/ntoskrnl/io/pnproot.c | 76 ++++++++++++++++++---------------- reactos/ntoskrnl/io/resource.c | 18 ++++---- reactos/ntoskrnl/io/symlink.c | 18 ++++---- reactos/ntoskrnl/io/xhaldrv.c | 4 +- 12 files changed, 159 insertions(+), 141 deletions(-) diff --git a/reactos/ntoskrnl/io/arcname.c b/reactos/ntoskrnl/io/arcname.c index 95ac80a1c31..d47003e6780 100644 --- a/reactos/ntoskrnl/io/arcname.c +++ b/reactos/ntoskrnl/io/arcname.c @@ -207,32 +207,32 @@ IopCheckCdromDevices(PULONG DeviceNumber) NULL, NULL); - Status = NtOpenFile(&Handle, + Status = ZwOpenFile(&Handle, FILE_ALL_ACCESS, &ObjectAttributes, &IoStatusBlock, 0, 0); - DPRINT("NtOpenFile() DeviceNumber %lu Status %lx\n", i, Status); + DPRINT("ZwOpenFile() DeviceNumber %lu Status %lx\n", i, Status); if (NT_SUCCESS(Status)) { - Status = NtQueryVolumeInformationFile(Handle, + Status = ZwQueryVolumeInformationFile(Handle, &IoStatusBlock, FileFsVolume, FS_VOLUME_BUFFER_SIZE, FileFsVolumeInformation); - DPRINT("NtQueryVolumeInformationFile() Status %lx\n", Status); + DPRINT("ZwQueryVolumeInformationFile() Status %lx\n", Status); if (NT_SUCCESS(Status)) { DPRINT("VolumeLabel: '%S'\n", FileFsVolume->VolumeLabel); if (_wcsicmp(FileFsVolume->VolumeLabel, L"REACTOS") == 0) { - NtClose(Handle); + ZwClose(Handle); *DeviceNumber = i; return(STATUS_SUCCESS); } } - NtClose(Handle); + ZwClose(Handle); } #endif @@ -252,17 +252,17 @@ IopCheckCdromDevices(PULONG DeviceNumber) NULL, NULL); - Status = NtOpenFile(&Handle, + Status = ZwOpenFile(&Handle, FILE_ALL_ACCESS, &ObjectAttributes, &IoStatusBlock, 0, 0); - DPRINT("NtOpenFile() DeviceNumber %lu Status %lx\n", i, Status); + DPRINT("ZwOpenFile() DeviceNumber %lu Status %lx\n", i, Status); if (NT_SUCCESS(Status)) { DPRINT("Found ntoskrnl.exe on Cdrom%lu\n", i); - NtClose(Handle); + ZwClose(Handle); *DeviceNumber = i; return(STATUS_SUCCESS); } @@ -283,17 +283,17 @@ IopCheckCdromDevices(PULONG DeviceNumber) NULL, NULL); - Status = NtOpenFile(&Handle, + Status = ZwOpenFile(&Handle, FILE_ALL_ACCESS, &ObjectAttributes, &IoStatusBlock, 0, 0); - DPRINT("NtOpenFile() DeviceNumber %lu Status %lx\n", i, Status); + DPRINT("ZwOpenFile() DeviceNumber %lu Status %lx\n", i, Status); if (NT_SUCCESS(Status)) { DPRINT("Found ntoskrnl.exe on Cdrom%lu\n", i); - NtClose(Handle); + ZwClose(Handle); *DeviceNumber = i; return(STATUS_SUCCESS); } @@ -407,14 +407,14 @@ IoCreateSystemRootLink(PCHAR ParameterLine) NULL, NULL); - Status = NtOpenSymbolicLinkObject(&Handle, + Status = ZwOpenSymbolicLinkObject(&Handle, SYMBOLIC_LINK_ALL_ACCESS, &ObjectAttributes); if (!NT_SUCCESS(Status)) { RtlFreeUnicodeString(&BootPath); RtlFreeUnicodeString(&DeviceName); - CPRINT("NtOpenSymbolicLinkObject() '%wZ' failed (Status %x)\n", + CPRINT("ZwOpenSymbolicLinkObject() '%wZ' failed (Status %x)\n", &ArcName, Status); RtlFreeUnicodeString(&ArcName); @@ -423,15 +423,15 @@ IoCreateSystemRootLink(PCHAR ParameterLine) } RtlFreeUnicodeString(&ArcName); - Status = NtQuerySymbolicLinkObject(Handle, + Status = ZwQuerySymbolicLinkObject(Handle, &DeviceName, &Length); - NtClose (Handle); + ZwClose (Handle); if (!NT_SUCCESS(Status)) { RtlFreeUnicodeString(&BootPath); RtlFreeUnicodeString(&DeviceName); - CPRINT("NtQuerySymbolicObject() failed (Status %x)\n", + CPRINT("ZwQuerySymbolicObject() failed (Status %x)\n", Status); return(Status); @@ -466,7 +466,7 @@ IoCreateSystemRootLink(PCHAR ParameterLine) NULL, NULL); - Status = NtOpenFile(&Handle, + Status = ZwOpenFile(&Handle, FILE_ALL_ACCESS, &ObjectAttributes, &IoStatusBlock, @@ -474,12 +474,12 @@ IoCreateSystemRootLink(PCHAR ParameterLine) 0); if (!NT_SUCCESS(Status)) { - CPRINT("NtOpenFile() failed to open '\\SystemRoot' (Status %x)\n", + CPRINT("ZwOpenFile() failed to open '\\SystemRoot' (Status %x)\n", Status); return(Status); } - NtClose(Handle); + ZwClose(Handle); return(STATUS_SUCCESS); } diff --git a/reactos/ntoskrnl/io/bootlog.c b/reactos/ntoskrnl/io/bootlog.c index 52d8e4f1e16..71dc17b194a 100644 --- a/reactos/ntoskrnl/io/bootlog.c +++ b/reactos/ntoskrnl/io/bootlog.c @@ -86,12 +86,12 @@ IopBootLog(PUNICODE_STRING DriverName, OBJ_CASE_INSENSITIVE, NULL, NULL); - Status = NtOpenKey(&ControlSetKey, + Status = ZwOpenKey(&ControlSetKey, KEY_ALL_ACCESS, &ObjectAttributes); if (!NT_SUCCESS(Status)) { - DPRINT1("NtOpenKey() failed (Status %lx)\n", Status); + DPRINT1("ZwOpenKey() failed (Status %lx)\n", Status); ExReleaseResourceLite(&IopBootLogResource); return; } @@ -102,7 +102,7 @@ IopBootLog(PUNICODE_STRING DriverName, OBJ_CASE_INSENSITIVE | OBJ_OPENIF, ControlSetKey, NULL); - Status = NtCreateKey(&BootLogKey, + Status = ZwCreateKey(&BootLogKey, KEY_ALL_ACCESS, &ObjectAttributes, 0, @@ -111,21 +111,21 @@ IopBootLog(PUNICODE_STRING DriverName, NULL); if (!NT_SUCCESS(Status)) { - DPRINT1("NtCreateKey() failed (Status %lx)\n", Status); - NtClose(ControlSetKey); + DPRINT1("ZwCreateKey() failed (Status %lx)\n", Status); + ZwClose(ControlSetKey); ExReleaseResourceLite(&IopBootLogResource); return; } RtlInitUnicodeString(&ValueName, ValueNameBuffer); - Status = NtSetValueKey(BootLogKey, + Status = ZwSetValueKey(BootLogKey, &ValueName, 0, REG_SZ, (PVOID)Buffer, (wcslen(Buffer) + 1) * sizeof(WCHAR)); - NtClose(BootLogKey); - NtClose(ControlSetKey); + ZwClose(BootLogKey); + ZwClose(ControlSetKey); if (!NT_SUCCESS(Status)) { @@ -160,7 +160,7 @@ IopWriteLogFile(PWSTR LogText) NULL, NULL); - Status = NtCreateFile(&FileHandle, + Status = ZwCreateFile(&FileHandle, FILE_APPEND_DATA, &ObjectAttributes, &IoStatusBlock, @@ -173,13 +173,13 @@ IopWriteLogFile(PWSTR LogText) 0); if (!NT_SUCCESS(Status)) { - DPRINT1("NtCreateFile() failed (Status %lx)\n", Status); + DPRINT1("ZwCreateFile() failed (Status %lx)\n", Status); return Status; } if (LogText != NULL) { - Status = NtWriteFile(FileHandle, + Status = ZwWriteFile(FileHandle, NULL, NULL, NULL, @@ -190,14 +190,14 @@ IopWriteLogFile(PWSTR LogText) NULL); if (!NT_SUCCESS(Status)) { - DPRINT1("NtWriteFile() failed (Status %lx)\n", Status); - NtClose(FileHandle); + DPRINT1("ZwWriteFile() failed (Status %lx)\n", Status); + ZwClose(FileHandle); return Status; } } /* L"\r\n" */ - Status = NtWriteFile(FileHandle, + Status = ZwWriteFile(FileHandle, NULL, NULL, NULL, @@ -207,11 +207,11 @@ IopWriteLogFile(PWSTR LogText) NULL, NULL); - NtClose(FileHandle); + ZwClose(FileHandle); if (!NT_SUCCESS(Status)) { - DPRINT1("NtWriteFile() failed (Status %lx)\n", Status); + DPRINT1("ZwWriteFile() failed (Status %lx)\n", Status); } return Status; @@ -241,7 +241,7 @@ IopCreateLogFile(VOID) NULL, NULL); - Status = NtCreateFile(&FileHandle, + Status = ZwCreateFile(&FileHandle, FILE_ALL_ACCESS, &ObjectAttributes, &IoStatusBlock, @@ -254,14 +254,14 @@ IopCreateLogFile(VOID) 0); if (!NT_SUCCESS(Status)) { - DPRINT1("NtCreateFile() failed (Status %lx)\n", Status); + DPRINT1("ZwCreateFile() failed (Status %lx)\n", Status); return Status; } ByteOffset.QuadPart = (LONGLONG)0; Signature = 0xFEFF; - Status = NtWriteFile(FileHandle, + Status = ZwWriteFile(FileHandle, NULL, NULL, NULL, @@ -272,10 +272,10 @@ IopCreateLogFile(VOID) NULL); if (!NT_SUCCESS(Status)) { - DPRINT1("NtWriteKey() failed (Status %lx)\n", Status); + DPRINT1("ZwWriteKey() failed (Status %lx)\n", Status); } - NtClose(FileHandle); + ZwClose(FileHandle); return Status; } @@ -344,7 +344,7 @@ IopSaveBootLogToFile(VOID) OBJ_CASE_INSENSITIVE, NULL, NULL); - Status = NtOpenKey(&KeyHandle, + Status = ZwOpenKey(&KeyHandle, KEY_ALL_ACCESS, &ObjectAttributes); if (!NT_SUCCESS(Status)) @@ -363,7 +363,7 @@ IopSaveBootLogToFile(VOID) RtlInitUnicodeString(&ValueName, ValueNameBuffer); - Status = NtQueryValueKey(KeyHandle, + Status = ZwQueryValueKey(KeyHandle, &ValueName, KeyValuePartialInformation, KeyInfo, @@ -377,7 +377,7 @@ IopSaveBootLogToFile(VOID) if (!NT_SUCCESS(Status)) { CHECKPOINT1; - NtClose(KeyHandle); + ZwClose(KeyHandle); ExFreePool(KeyInfo); ExReleaseResourceLite(&IopBootLogResource); return; @@ -387,18 +387,18 @@ IopSaveBootLogToFile(VOID) if (!NT_SUCCESS(Status)) { CHECKPOINT1; - NtClose(KeyHandle); + ZwClose(KeyHandle); ExFreePool(KeyInfo); ExReleaseResourceLite(&IopBootLogResource); return; } /* Delete keys */ - NtDeleteValueKey(KeyHandle, + ZwDeleteValueKey(KeyHandle, &ValueName); } - NtClose(KeyHandle); + ZwClose(KeyHandle); ExFreePool(KeyInfo); diff --git a/reactos/ntoskrnl/io/device.c b/reactos/ntoskrnl/io/device.c index b045b1aebbc..d68f4d89a4a 100644 --- a/reactos/ntoskrnl/io/device.c +++ b/reactos/ntoskrnl/io/device.c @@ -339,7 +339,7 @@ IoGetDeviceObjectPointer( NULL, NULL); - Status = NtOpenFile( + Status = ZwOpenFile( &FileHandle, DesiredAccess, &ObjectAttributes, @@ -364,7 +364,7 @@ IoGetDeviceObjectPointer( *FileObject = LocalFileObject; } - NtClose(FileHandle); + ZwClose(FileHandle); return Status; } diff --git a/reactos/ntoskrnl/io/driver.c b/reactos/ntoskrnl/io/driver.c index 6d52e650b4b..c43ead25976 100644 --- a/reactos/ntoskrnl/io/driver.c +++ b/reactos/ntoskrnl/io/driver.c @@ -959,7 +959,7 @@ IoCreateDriverList(VOID) NULL, NULL); - Status = NtOpenKey(&KeyHandle, + Status = ZwOpenKey(&KeyHandle, 0x10001, &ObjectAttributes); if (!NT_SUCCESS(Status)) @@ -971,14 +971,14 @@ IoCreateDriverList(VOID) KeyInfo = ExAllocatePool(NonPagedPool, KeyInfoLength); if (KeyInfo == NULL) { - NtClose(KeyHandle); + ZwClose(KeyHandle); return(STATUS_INSUFFICIENT_RESOURCES); } Index = 0; while (TRUE) { - Status = NtEnumerateKey(KeyHandle, + Status = ZwEnumerateKey(KeyHandle, Index, KeyBasicInformation, KeyInfo, @@ -1006,7 +1006,7 @@ IoCreateDriverList(VOID) } ExFreePool(KeyInfo); - NtClose(KeyHandle); + ZwClose(KeyHandle); DPRINT("IoCreateDriverList() done\n"); @@ -1270,7 +1270,7 @@ IopLoadDriver(PSERVICE Service) NTSTATUS Status = STATUS_UNSUCCESSFUL; IopDisplayLoadingMessage(Service->ServiceName.Buffer); - Status = NtLoadDriver(&Service->RegistryPath); + Status = ZwLoadDriver(&Service->RegistryPath); IopBootLog(&Service->ImagePath, NT_SUCCESS(Status) ? TRUE : FALSE); if (!NT_SUCCESS(Status)) { diff --git a/reactos/ntoskrnl/io/errlog.c b/reactos/ntoskrnl/io/errlog.c index 3780068c619..43e13d76fa8 100644 --- a/reactos/ntoskrnl/io/errlog.c +++ b/reactos/ntoskrnl/io/errlog.c @@ -135,7 +135,7 @@ IopConnectLogPort (VOID) RtlInitUnicodeString (&PortName, L"\\ErrorLogPort"); - Status = NtConnectPort (&IopLogPort, + Status = ZwConnectPort (&IopLogPort, &PortName, NULL, NULL, @@ -145,7 +145,7 @@ IopConnectLogPort (VOID) NULL); if (!NT_SUCCESS(Status)) { - DPRINT ("NtConnectPort() failed (Status %lx)\n", Status); + DPRINT ("ZwConnectPort() failed (Status %lx)\n", Status); return FALSE; } @@ -290,7 +290,7 @@ IopLogWorker (PVOID Parameter) Request->Header.DataSize + sizeof(LPC_MESSAGE); /* Send the error message to the log port */ - Status = NtRequestPort (IopLogPort, + Status = ZwRequestPort (IopLogPort, &Request->Header); /* Release request buffer */ @@ -298,7 +298,7 @@ IopLogWorker (PVOID Parameter) if (!NT_SUCCESS(Status)) { - DPRINT ("NtRequestPort() failed (Status %lx)\n", Status); + DPRINT ("ZwRequestPort() failed (Status %lx)\n", Status); /* Requeue log message and restart the worker */ ExInterlockedInsertTailList (&IopLogListHead, diff --git a/reactos/ntoskrnl/io/iocomp.c b/reactos/ntoskrnl/io/iocomp.c index 61f3ee90fcd..de412e59036 100644 --- a/reactos/ntoskrnl/io/iocomp.c +++ b/reactos/ntoskrnl/io/iocomp.c @@ -32,14 +32,14 @@ static GENERIC_MAPPING ExIoCompletionMapping = NTSTATUS STDCALL -NtpCreateIoCompletion( +IopCreateIoCompletion( PVOID ObjectBody, PVOID Parent, PWSTR RemainingPath, POBJECT_ATTRIBUTES ObjectAttributes ) { - DPRINT("NtpCreateIoCompletion(ObjectBody %x, Parent %x, RemainingPath %S)\n", + DPRINT("IopCreateIoCompletion(ObjectBody %x, Parent %x, RemainingPath %S)\n", ObjectBody, Parent, RemainingPath); if (RemainingPath != NULL && wcschr(RemainingPath+1, '\\') != NULL) @@ -51,11 +51,11 @@ NtpCreateIoCompletion( } VOID STDCALL -NtpDeleteIoCompletion(PVOID ObjectBody) +IopDeleteIoCompletion(PVOID ObjectBody) { PKQUEUE Queue = ObjectBody; - DPRINT("NtpDeleteIoCompletion()\n"); + DPRINT("IopDeleteIoCompletion()\n"); KeRundownQueue(Queue); } @@ -132,12 +132,12 @@ IopInitIoCompletionImplementation(VOID) ExIoCompletionType->Dump = NULL; ExIoCompletionType->Open = NULL; ExIoCompletionType->Close = NULL; - ExIoCompletionType->Delete = NtpDeleteIoCompletion; + ExIoCompletionType->Delete = IopDeleteIoCompletion; ExIoCompletionType->Parse = NULL; ExIoCompletionType->Security = NULL; ExIoCompletionType->QueryName = NULL; ExIoCompletionType->OkayToClose = NULL; - ExIoCompletionType->Create = NtpCreateIoCompletion; + ExIoCompletionType->Create = IopCreateIoCompletion; ExIoCompletionType->DuplicationNotify = NULL; ExInitializeNPagedLookasideList(&IoCompletionPacketLookaside, diff --git a/reactos/ntoskrnl/io/iomgr.c b/reactos/ntoskrnl/io/iomgr.c index a85a2bb2d05..b8a2dcf1ebb 100644 --- a/reactos/ntoskrnl/io/iomgr.c +++ b/reactos/ntoskrnl/io/iomgr.c @@ -465,7 +465,7 @@ IoInit (VOID) 0, NULL, NULL); - NtCreateDirectoryObject(&Handle, + ZwCreateDirectoryObject(&Handle, 0, &ObjectAttributes); @@ -479,7 +479,7 @@ IoInit (VOID) 0, NULL, NULL); - NtCreateDirectoryObject(&Handle, + ZwCreateDirectoryObject(&Handle, 0, &ObjectAttributes); diff --git a/reactos/ntoskrnl/io/pnpmgr.c b/reactos/ntoskrnl/io/pnpmgr.c index 352e4c4ce3e..9ee95cd5aa5 100644 --- a/reactos/ntoskrnl/io/pnpmgr.c +++ b/reactos/ntoskrnl/io/pnpmgr.c @@ -791,7 +791,7 @@ IopCreateDeviceKeyPath(PWSTR Path, DPRINT("Create '%S'\n", KeyName.Buffer); - Status = NtCreateKey (&KeyHandle, + Status = ZwCreateKey (&KeyHandle, KEY_ALL_ACCESS, &ObjectAttributes, 0, @@ -800,7 +800,7 @@ IopCreateDeviceKeyPath(PWSTR Path, NULL); if (!NT_SUCCESS (Status)) { - DPRINT ("NtCreateKey() failed with status %x\n", Status); + DPRINT ("ZwCreateKey() failed with status %x\n", Status); return Status; } @@ -811,7 +811,7 @@ IopCreateDeviceKeyPath(PWSTR Path, } else { - NtClose (KeyHandle); + ZwClose (KeyHandle); *Next = L'\\'; } @@ -843,7 +843,7 @@ IopSetDeviceInstanceData(HANDLE InstanceKey, OBJ_CASE_INSENSITIVE, InstanceKey, NULL); - Status = NtCreateKey(&LogConfKey, + Status = ZwCreateKey(&LogConfKey, KEY_ALL_ACCESS, &ObjectAttributes, 0, @@ -862,7 +862,7 @@ IopSetDeviceInstanceData(HANDLE InstanceKey, RtlInitUnicodeString(&KeyName, L"BootConfig"); - Status = NtSetValueKey(LogConfKey, + Status = ZwSetValueKey(LogConfKey, &KeyName, 0, REG_RESOURCE_LIST, @@ -877,7 +877,7 @@ IopSetDeviceInstanceData(HANDLE InstanceKey, { RtlInitUnicodeString(&KeyName, L"BasicConfigVector"); - Status = NtSetValueKey(LogConfKey, + Status = ZwSetValueKey(LogConfKey, &KeyName, 0, REG_RESOURCE_REQUIREMENTS_LIST, @@ -885,7 +885,7 @@ IopSetDeviceInstanceData(HANDLE InstanceKey, DeviceNode->ResourceRequirements->ListSize); } - NtClose(LogConfKey); + ZwClose(LogConfKey); } DPRINT("IopSetDeviceInstanceData() done\n"); @@ -1069,7 +1069,7 @@ IopActionInterrogateDeviceStack( /* Set 'Capabilities' value */ RtlInitUnicodeString(&ValueName, L"Capabilities"); - Status = NtSetValueKey(InstanceKey, + Status = ZwSetValueKey(InstanceKey, &ValueName, 0, REG_DWORD, @@ -1081,7 +1081,7 @@ IopActionInterrogateDeviceStack( { RtlInitUnicodeString(&ValueName, L"UINumber"); - Status = NtSetValueKey(InstanceKey, + Status = ZwSetValueKey(InstanceKey, &ValueName, 0, REG_DWORD, @@ -1120,7 +1120,7 @@ IopActionInterrogateDeviceStack( RtlInitUnicodeString(&ValueName, L"HardwareID"); - Status = NtSetValueKey(InstanceKey, + Status = ZwSetValueKey(InstanceKey, &ValueName, 0, REG_MULTI_SZ, @@ -1128,7 +1128,7 @@ IopActionInterrogateDeviceStack( (TotalLength + 1) * sizeof(WCHAR)); if (!NT_SUCCESS(Status)) { - DPRINT1("NtSetValueKey() failed (Status %lx)\n", Status); + DPRINT1("ZwSetValueKey() failed (Status %lx)\n", Status); } } else @@ -1166,7 +1166,7 @@ IopActionInterrogateDeviceStack( RtlInitUnicodeString(&ValueName, L"CompatibleIDs"); - Status = NtSetValueKey(InstanceKey, + Status = ZwSetValueKey(InstanceKey, &ValueName, 0, REG_MULTI_SZ, @@ -1174,7 +1174,7 @@ IopActionInterrogateDeviceStack( (TotalLength + 1) * sizeof(WCHAR)); if (!NT_SUCCESS(Status)) { - DPRINT1("NtSetValueKey() failed (Status %lx)\n", Status); + DPRINT1("ZwSetValueKey() failed (Status %lx)\n", Status); } } else @@ -1196,7 +1196,7 @@ IopActionInterrogateDeviceStack( { RtlInitUnicodeString(&ValueName, L"DeviceDesc"); - Status = NtSetValueKey(InstanceKey, + Status = ZwSetValueKey(InstanceKey, &ValueName, 0, REG_SZ, @@ -1204,7 +1204,7 @@ IopActionInterrogateDeviceStack( (wcslen((PWSTR)IoStatusBlock.Information) + 1) * sizeof(WCHAR)); if (!NT_SUCCESS(Status)) { - DPRINT1("NtSetValueKey() failed (Status %lx)\n", Status); + DPRINT1("ZwSetValueKey() failed (Status %lx)\n", Status); } } else @@ -1226,7 +1226,7 @@ IopActionInterrogateDeviceStack( DPRINT("LocationInformation: %S\n", (PWSTR)IoStatusBlock.Information); RtlInitUnicodeString(&ValueName, L"LocationInformation"); - Status = NtSetValueKey(InstanceKey, + Status = ZwSetValueKey(InstanceKey, &ValueName, 0, REG_SZ, @@ -1234,7 +1234,7 @@ IopActionInterrogateDeviceStack( (wcslen((PWSTR)IoStatusBlock.Information) + 1) * sizeof(WCHAR)); if (!NT_SUCCESS(Status)) { - DPRINT1("NtSetValueKey() failed (Status %lx)\n", Status); + DPRINT1("ZwSetValueKey() failed (Status %lx)\n", Status); } } else @@ -1315,7 +1315,7 @@ IopActionInterrogateDeviceStack( IopSetDeviceInstanceData(InstanceKey, DeviceNode); } - NtClose(InstanceKey); + ZwClose(InstanceKey); DeviceNode->Flags |= DNF_PROCESSED; @@ -1733,7 +1733,7 @@ IopInvalidateDeviceRelations( NULL, NULL); - Status = NtOpenFile( + Status = ZwOpenFile( &Handle, FILE_ALL_ACCESS, &ObjectAttributes, @@ -1743,7 +1743,7 @@ IopInvalidateDeviceRelations( BootDrivers = NT_SUCCESS(Status) ? FALSE : TRUE; - NtClose(Handle); + ZwClose(Handle); /* * Initialize services for discovered children. Only boot drivers will @@ -1805,6 +1805,18 @@ PnpInit(VOID) KEBUGCHECKEX(PHASE1_INITIALIZATION_FAILED, Status, 0, 0, 0); } + if (!IopCreateUnicodeString(&IopRootDeviceNode->InstancePath, + L"HTREE\\Root\\0", + PagedPool)) + { + CPRINT("Failed to create the instance path!\n"); + KEBUGCHECKEX(PHASE1_INITIALIZATION_FAILED, STATUS_UNSUCCESSFUL, 0, 0, 0); + } + + /* Report the device to the user-mode pnp manager */ + IopQueueTargetDeviceEvent(&GUID_DEVICE_ARRIVAL, + &IopRootDeviceNode->InstancePath); + IopRootDeviceNode->PhysicalDeviceObject->Flags |= DO_BUS_ENUMERATED_DEVICE; PnpRootDriverEntry(IopRootDriverObject, NULL); IopRootDriverObject->DriverExtension->AddDevice( diff --git a/reactos/ntoskrnl/io/pnproot.c b/reactos/ntoskrnl/io/pnproot.c index a2c7223cb61..96191e9dae1 100644 --- a/reactos/ntoskrnl/io/pnproot.c +++ b/reactos/ntoskrnl/io/pnproot.c @@ -20,7 +20,8 @@ /* DATA **********************************************************************/ -typedef struct _PNPROOT_DEVICE { +typedef struct _PNPROOT_DEVICE +{ // Entry on device list LIST_ENTRY ListEntry; // Physical Device Object of device @@ -35,7 +36,8 @@ typedef struct _PNPROOT_DEVICE { UNICODE_STRING DeviceDescription; } PNPROOT_DEVICE, *PPNPROOT_DEVICE; -typedef enum { +typedef enum +{ dsStopped, dsStarted, dsPaused, @@ -285,10 +287,6 @@ PdoQueryResourceRequirements( } -NTSTATUS -PnpRootPdoPnpControl( - PDEVICE_OBJECT DeviceObject, - PIRP Irp) /* * FUNCTION: Handle Plug and Play IRPs for the child device * ARGUMENTS: @@ -297,6 +295,10 @@ PnpRootPdoPnpControl( * RETURNS: * Status */ +NTSTATUS +PnpRootPdoPnpControl( + PDEVICE_OBJECT DeviceObject, + PIRP Irp) { PIO_STACK_LOCATION IrpSp; NTSTATUS Status; @@ -353,10 +355,7 @@ PnpRootPdoPnpControl( return Status; } -NTSTATUS -PnpRootPdoPowerControl( - PDEVICE_OBJECT DeviceObject, - PIRP Irp) + /* * FUNCTION: Handle power management IRPs for the child device * ARGUMENTS: @@ -365,6 +364,10 @@ PnpRootPdoPowerControl( * RETURNS: * Status */ +NTSTATUS +PnpRootPdoPowerControl( + PDEVICE_OBJECT DeviceObject, + PIRP Irp) { PIO_STACK_LOCATION IrpSp; NTSTATUS Status; @@ -484,10 +487,10 @@ PnpRootFdoEnumerateDevices( NULL, NULL); - Status = NtOpenKey(&KeyHandle, KEY_ALL_ACCESS, &ObjectAttributes); + Status = ZwOpenKey(&KeyHandle, KEY_ALL_ACCESS, &ObjectAttributes); if (!NT_SUCCESS(Status)) { - DPRINT("NtOpenKey() failed (Status %x)\n", Status); + DPRINT("ZwOpenKey() failed (Status %x)\n", Status); ExFreePool(KeyInfo); return Status; } @@ -570,7 +573,7 @@ PnpRootFdoEnumerateDevices( DPRINT("Entries found: %d\n", Index); - NtClose(KeyHandle); + ZwClose(KeyHandle); ExFreePool(KeyInfo); @@ -668,8 +671,8 @@ PnpRootQueryBusRelations( /* FIXME: */ } - DPRINT("DeviceID: %S PDO %x\n", - PdoDeviceExtension->DeviceID.Buffer, + DPRINT1("DeviceID: %wZ PDO %p\n", + &PdoDeviceExtension->DeviceID, Device->Pdo); if (!IopCreateUnicodeString( @@ -681,6 +684,9 @@ PnpRootQueryBusRelations( /* FIXME: */ } + DPRINT1("InstanceID: %wZ PDO %p\n", + &PdoDeviceExtension->InstanceID, + Device->Pdo); } /* Reference the physical device object. The PnP manager @@ -730,11 +736,6 @@ PnpRootQueryDeviceRelations( } -NTSTATUS -STDCALL -PnpRootFdoPnpControl( - IN PDEVICE_OBJECT DeviceObject, - IN PIRP Irp) /* * FUNCTION: Handle Plug and Play IRPs for the root bus device object * ARGUMENTS: @@ -743,6 +744,11 @@ PnpRootFdoPnpControl( * RETURNS: * Status */ +NTSTATUS +STDCALL +PnpRootFdoPnpControl( + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp) { PPNPROOT_FDO_DEVICE_EXTENSION DeviceExtension; PIO_STACK_LOCATION IrpSp; @@ -788,11 +794,6 @@ PnpRootFdoPnpControl( } -NTSTATUS -STDCALL -PnpRootFdoPowerControl( - IN PDEVICE_OBJECT DeviceObject, - IN PIRP Irp) /* * FUNCTION: Handle power management IRPs for the root bus device object * ARGUMENTS: @@ -801,6 +802,11 @@ PnpRootFdoPowerControl( * RETURNS: * Status */ +NTSTATUS +STDCALL +PnpRootFdoPowerControl( + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp) { PIO_STACK_LOCATION IrpSp; NTSTATUS Status; @@ -827,11 +833,6 @@ PnpRootFdoPowerControl( } -NTSTATUS -STDCALL -PnpRootPnpControl( - IN PDEVICE_OBJECT DeviceObject, - IN PIRP Irp) /* * FUNCTION: Handle Plug and Play IRPs * ARGUMENTS: @@ -840,6 +841,11 @@ PnpRootPnpControl( * RETURNS: * Status */ +NTSTATUS +STDCALL +PnpRootPnpControl( + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp) { PPNPROOT_COMMON_DEVICE_EXTENSION DeviceExtension; NTSTATUS Status; @@ -861,11 +867,6 @@ PnpRootPnpControl( } -NTSTATUS -STDCALL -PnpRootPowerControl( - IN PDEVICE_OBJECT DeviceObject, - IN PIRP Irp) /* * FUNCTION: Handle power management IRPs * ARGUMENTS: @@ -874,6 +875,11 @@ PnpRootPowerControl( * RETURNS: * Status */ +NTSTATUS +STDCALL +PnpRootPowerControl( + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp) { PPNPROOT_COMMON_DEVICE_EXTENSION DeviceExtension; NTSTATUS Status; diff --git a/reactos/ntoskrnl/io/resource.c b/reactos/ntoskrnl/io/resource.c index be9910ae0d7..f066e1f63bb 100644 --- a/reactos/ntoskrnl/io/resource.c +++ b/reactos/ntoskrnl/io/resource.c @@ -836,7 +836,7 @@ IoReportHalResourceUsage(PUNICODE_STRING HalDescription, OBJ_CASE_INSENSITIVE | OBJ_OPENIF, 0, NULL); - Status = NtCreateKey(&ResourcemapKey, + Status = ZwCreateKey(&ResourcemapKey, KEY_ALL_ACCESS, &ObjectAttributes, 0, @@ -854,14 +854,14 @@ IoReportHalResourceUsage(PUNICODE_STRING HalDescription, OBJ_CASE_INSENSITIVE | OBJ_OPENIF, ResourcemapKey, NULL); - Status = NtCreateKey(&HalKey, + Status = ZwCreateKey(&HalKey, KEY_ALL_ACCESS, &ObjectAttributes, 0, NULL, REG_OPTION_VOLATILE, &Disposition); - NtClose(ResourcemapKey); + ZwClose(ResourcemapKey); if (!NT_SUCCESS(Status)) return(Status); @@ -871,21 +871,21 @@ IoReportHalResourceUsage(PUNICODE_STRING HalDescription, OBJ_CASE_INSENSITIVE, HalKey, NULL); - Status = NtCreateKey(&DescriptionKey, + Status = ZwCreateKey(&DescriptionKey, KEY_ALL_ACCESS, &ObjectAttributes, 0, NULL, REG_OPTION_VOLATILE, &Disposition); - NtClose(HalKey); + ZwClose(HalKey); if (!NT_SUCCESS(Status)) return(Status); /* Add '.Raw' value. */ RtlRosInitUnicodeStringFromLiteral(&Name, L".Raw"); - Status = NtSetValueKey(DescriptionKey, + Status = ZwSetValueKey(DescriptionKey, &Name, 0, REG_RESOURCE_LIST, @@ -893,20 +893,20 @@ IoReportHalResourceUsage(PUNICODE_STRING HalDescription, ListSize); if (!NT_SUCCESS(Status)) { - NtClose(DescriptionKey); + ZwClose(DescriptionKey); return(Status); } /* Add '.Translated' value. */ RtlRosInitUnicodeStringFromLiteral(&Name, L".Translated"); - Status = NtSetValueKey(DescriptionKey, + Status = ZwSetValueKey(DescriptionKey, &Name, 0, REG_RESOURCE_LIST, TranslatedList, ListSize); - NtClose(DescriptionKey); + ZwClose(DescriptionKey); return(Status); } diff --git a/reactos/ntoskrnl/io/symlink.c b/reactos/ntoskrnl/io/symlink.c index d5c4616dc63..adccd3733c0 100644 --- a/reactos/ntoskrnl/io/symlink.c +++ b/reactos/ntoskrnl/io/symlink.c @@ -51,17 +51,17 @@ IoCreateSymbolicLink(PUNICODE_STRING SymbolicLinkName, NULL, SePublicDefaultSd); - Status = NtCreateSymbolicLinkObject(&Handle, + Status = ZwCreateSymbolicLinkObject(&Handle, SYMBOLIC_LINK_ALL_ACCESS, &ObjectAttributes, DeviceName); if (!NT_SUCCESS(Status)) { - DPRINT1("NtCreateSymbolicLinkObject() failed (Status %lx)\n", Status); + DPRINT1("ZwCreateSymbolicLinkObject() failed (Status %lx)\n", Status); return(Status); } - NtClose(Handle); + ZwClose(Handle); return(STATUS_SUCCESS); } @@ -120,17 +120,17 @@ IoCreateUnprotectedSymbolicLink(PUNICODE_STRING SymbolicLinkName, NULL, &SecurityDescriptor); - Status = NtCreateSymbolicLinkObject(&Handle, + Status = ZwCreateSymbolicLinkObject(&Handle, SYMBOLIC_LINK_ALL_ACCESS, &ObjectAttributes, DeviceName); if (!NT_SUCCESS(Status)) { - DPRINT1("NtCreateSymbolicLinkObject() failed (Status %lx)\n", Status); + DPRINT1("ZwCreateSymbolicLinkObject() failed (Status %lx)\n", Status); return(Status); } - NtClose(Handle); + ZwClose(Handle); return(STATUS_SUCCESS); } @@ -168,14 +168,14 @@ IoDeleteSymbolicLink(PUNICODE_STRING SymbolicLinkName) NULL, NULL); - Status = NtOpenSymbolicLinkObject(&Handle, + Status = ZwOpenSymbolicLinkObject(&Handle, SYMBOLIC_LINK_ALL_ACCESS, &ObjectAttributes); if (!NT_SUCCESS(Status)) return(Status); - Status = NtMakeTemporaryObject(Handle); - NtClose(Handle); + Status = ZwMakeTemporaryObject(Handle); + ZwClose(Handle); return(Status); } diff --git a/reactos/ntoskrnl/io/xhaldrv.c b/reactos/ntoskrnl/io/xhaldrv.c index 178eab40eee..5737f7ed3d3 100644 --- a/reactos/ntoskrnl/io/xhaldrv.c +++ b/reactos/ntoskrnl/io/xhaldrv.c @@ -446,7 +446,7 @@ xHalIoAssignDriveLetters(IN PLOADER_PARAMETER_BLOCK LoaderBlock, NULL, NULL); - Status = NtOpenFile(&FileHandle, + Status = ZwOpenFile(&FileHandle, 0x10001, &ObjectAttributes, &StatusBlock, @@ -454,7 +454,7 @@ xHalIoAssignDriveLetters(IN PLOADER_PARAMETER_BLOCK LoaderBlock, FILE_SYNCHRONOUS_IO_NONALERT); if (NT_SUCCESS(Status)) { - NtClose(FileHandle); + ZwClose(FileHandle); swprintf(Buffer2, L"\\??\\PhysicalDrive%d", From 63e01b63dfee205700a7f90494839a911f89dd63 Mon Sep 17 00:00:00 2001 From: Thomas Bluemel Date: Mon, 7 Feb 2005 11:34:52 +0000 Subject: [PATCH 143/185] moved smdll to rosrtl. We just _can't_ have separate dlls for everything internal, that's what static libraries are for. Unless we want a dll hell even worse than necessary... svn path=/trunk/; revision=13457 --- reactos/Makefile | 2 +- reactos/bootdata/packages/reactos.dff | 1 - reactos/include/rosrtl/smapi.h | 72 +++++++++++++++++++++++ reactos/include/rosrtl/smhelper.h | 46 +++++++++++++++ reactos/lib/rosrtl/makefile | 9 ++- reactos/lib/rosrtl/sm/compses.c | 39 +++++++++++++ reactos/lib/rosrtl/sm/connect.c | 83 +++++++++++++++++++++++++++ reactos/lib/rosrtl/sm/execpgm.c | 49 ++++++++++++++++ reactos/lib/rosrtl/sm/readme.txt | 18 ++++++ reactos/lib/rosrtl/sm/testapi.c | 20 +++++++ 10 files changed, 336 insertions(+), 3 deletions(-) create mode 100644 reactos/include/rosrtl/smapi.h create mode 100644 reactos/include/rosrtl/smhelper.h create mode 100644 reactos/lib/rosrtl/sm/compses.c create mode 100644 reactos/lib/rosrtl/sm/connect.c create mode 100644 reactos/lib/rosrtl/sm/execpgm.c create mode 100644 reactos/lib/rosrtl/sm/readme.txt create mode 100644 reactos/lib/rosrtl/sm/testapi.c diff --git a/reactos/Makefile b/reactos/Makefile index 9afe433a400..0d10a955f78 100644 --- a/reactos/Makefile +++ b/reactos/Makefile @@ -58,7 +58,7 @@ DLLS_SHELLEXT = shellext DLLS = acledit aclui advapi32 advpack cabinet cards comctl32 crtdll comdlg32 d3d8thk dbghelp expat fmifs freetype \ gdi32 gdiplus glu32 hid imagehlp imm32 iphlpapi kernel32 lzexpand mesa32 midimap mmdrv mpr msacm msafd \ msgina msi msimg32 msvcrt20 msvideo mswsock netapi32 ntdll ole32 oleaut32 oledlg olepro32 opengl32 \ - packet psapi riched20 richedit rpcrt4 samlib secur32 setupapi shell32 shlwapi smdll snmpapi syssetup \ + packet psapi riched20 richedit rpcrt4 samlib secur32 setupapi shell32 shlwapi snmpapi syssetup \ twain unicode user32 userenv version wininet winmm winspool ws2help ws2_32 wsock32 wshirda dnsapi \ urlmon shdocvw dinput dinput8 dxdiagn devenum dsound $(DLLS_KBD) $(DLLS_CPL) $(DLLS_SHELLEXT) diff --git a/reactos/bootdata/packages/reactos.dff b/reactos/bootdata/packages/reactos.dff index fd7b1b87f5c..6cbb91acc1a 100755 --- a/reactos/bootdata/packages/reactos.dff +++ b/reactos/bootdata/packages/reactos.dff @@ -116,7 +116,6 @@ lib\setupapi\setupapi.dll 1 lib\shdocvw\shdocvw.dll 1 lib\shell32\shell32.dll 1 lib\shlwapi\shlwapi.dll 1 -lib\smdll\smdll.dll 1 lib\syssetup\syssetup.dll 1 lib\twain\twain_32.dll 1 lib\urlmon\urlmon.dll 1 diff --git a/reactos/include/rosrtl/smapi.h b/reactos/include/rosrtl/smapi.h new file mode 100644 index 00000000000..8bb6a53db6e --- /dev/null +++ b/reactos/include/rosrtl/smapi.h @@ -0,0 +1,72 @@ +/* $Id$ */ +#ifndef __ROSRTL_SM_API_H +#define __ROSRTL_SM_API_H + +#define SM_API_PORT_NAME L"\\SmApiPort" +#define SM_DBGSS_PORT_NAME L"\\DbgSsApiPort" +#define SM_DBGUI_PORT_NAME L"\\DbgUiApiPort" + +#pragma pack(push,4) + +/*** 1 ****************************************************************/ + +#define SM_API_COMPLETE_SESSION 1 /* complete a session initialization */ + +typedef struct _SM_PORT_MESSAGE_COMPSES +{ + HANDLE hApiPort; + HANDLE hSbApiPort; + +} SM_PORT_MESSAGE_COMPSES, *PSM_PORT_MESSAGE_COMPSES; + +/*** 2 ****************************************************************/ + +#define SM_API_2 2 + +/* obsolete */ + +/*** 3 ****************************************************************/ + +#define SM_API_3 3 + +/* unknown */ + +/*** 4 ****************************************************************/ + +#define SM_API_EXECUTE_PROGRAMME 4 /* start a subsystem (server) */ + +#define SM_EXEXPGM_MAX_LENGTH 32 /* max count of wide string */ + +typedef struct _SM_PORT_MESSAGE_EXECPGM +{ + ULONG NameLength; + WCHAR Name [SM_EXEXPGM_MAX_LENGTH]; + +} SM_PORT_MESSAGE_EXECPGM, *PSM_PORT_MESSAGE_EXECPGM; + +/*** | ****************************************************************/ + +typedef struct _SM_PORT_MESSAGE +{ + /*** LPC common header ***/ + LPC_MESSAGE Header; + /*** SM common header ***/ + DWORD ApiIndex; + NTSTATUS Status; + /*** SM per API arguments ***/ + union { + SM_PORT_MESSAGE_COMPSES CompSes; + SM_PORT_MESSAGE_EXECPGM ExecPgm; + }; + +} SM_PORT_MESSAGE, * PSM_PORT_MESSAGE; + +#pragma pack(pop) + +/*** MACRO ***********************************************************/ + +#define SM_PORT_DATA_SIZE(c) (sizeof(DWORD)+sizeof(NTSTATUS)+sizeof(c)) +#define SM_PORT_MESSAGE_SIZE (sizeof(SM_PORT_MESSAGE)) + + +#endif /* !def __ROSRTL_SM_API_H */ diff --git a/reactos/include/rosrtl/smhelper.h b/reactos/include/rosrtl/smhelper.h new file mode 100644 index 00000000000..d00bb3a824e --- /dev/null +++ b/reactos/include/rosrtl/smhelper.h @@ -0,0 +1,46 @@ +#ifndef _ROSRTL_SM_HELPER_H + +/*** DATA TYPES ******************************************************/ + +#define SM_SB_NAME_MAX_LENGTH 120 + +#pragma pack(push,4) + +/* SmConnectApiPort */ +typedef struct _SM_CONNECT_DATA +{ + ULONG Subsystem; + WCHAR SbName [SM_SB_NAME_MAX_LENGTH]; + +} SM_CONNECT_DATA, *PSM_CONNECT_DATA; + +/* SmpConnectSbApiPort */ +typedef struct _SB_CONNECT_DATA +{ + ULONG SmApiMax; +} SB_CONNECT_DATA, *PSB_CONNECT_DATA; + +#pragma pack(pop) + + +/*** PROTOTYPES ******************************************************/ + + +/* smdll/connect.c */ +NTSTATUS STDCALL +SmConnectApiPort (IN PUNICODE_STRING pSbApiPortName OPTIONAL, + IN HANDLE hSbApiPort OPTIONAL, + IN DWORD dwSubsystem OPTIONAL, /* pe.h */ + IN OUT PHANDLE phSmApiPort); +/* smdll/compses.c */ +NTSTATUS STDCALL +SmCompleteSession (IN HANDLE hSmApiPort, + IN HANDLE hSbApiPort, + IN HANDLE hApiPort); +/* smdll/execpgm.c */ +NTSTATUS STDCALL +SmExecuteProgram (IN HANDLE hSmApiPort, + IN PUNICODE_STRING Pgm + ); + +#endif /* ndef _ROSRTL_SM_HELPER_H */ diff --git a/reactos/lib/rosrtl/makefile b/reactos/lib/rosrtl/makefile index 6c0f6acbffc..659f0d05c02 100644 --- a/reactos/lib/rosrtl/makefile +++ b/reactos/lib/rosrtl/makefile @@ -33,6 +33,12 @@ FILE_OBJECTS = \ file/sparse.o \ file/path.o +SM_OBJECTS = \ + sm/compses.o \ + sm/connect.o \ + sm/execpgm.o \ + sm/testapi.o + RECMUTEX_OBJECTS = recmutex/recmutex.o include $(PATH_TO_TOP)/config @@ -46,7 +52,8 @@ TARGET_NAME = rosrtl TARGET_CFLAGS = -D__USE_W32API -Wall -Werror TARGET_OBJECTS = $(THREAD_OBJECTS) $(MISC_OBJECTS) $(STRING_OBJECTS) \ - $(REGISTRY_OBJECTS) $(FILE_OBJECTS) $(RECMUTEX_OBJECTS) + $(REGISTRY_OBJECTS) $(FILE_OBJECTS) $(RECMUTEX_OBJECTS) \ + $(SM_OBJECTS) DEP_OBJECTS = $(TARGET_OBJECTS) diff --git a/reactos/lib/rosrtl/sm/compses.c b/reactos/lib/rosrtl/sm/compses.c new file mode 100644 index 00000000000..96524fecae7 --- /dev/null +++ b/reactos/lib/rosrtl/sm/compses.c @@ -0,0 +1,39 @@ +/* $Id$ + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: lib/smlib/compses.c + * PURPOSE: Call SM API SM_API_COMPLETE_SESSION + */ +#define NTOS_MODE_USER +#include +#include +#include + +NTSTATUS STDCALL +SmCompleteSession (HANDLE hSmApiPort, HANDLE hSbApiPort, HANDLE hApiPort) +{ + NTSTATUS Status; + SM_PORT_MESSAGE SmReqMsg; + + /* Marshal Ses in the LPC message */ + SmReqMsg.CompSes.hApiPort = hApiPort; + SmReqMsg.CompSes.hSbApiPort = hSbApiPort; + + /* SM API to invoke */ + SmReqMsg.ApiIndex = SM_API_COMPLETE_SESSION; + + /* Port message */ + SmReqMsg.Header.MessageType = LPC_NEW_MESSAGE; + SmReqMsg.Header.DataSize = SM_PORT_DATA_SIZE(SmReqMsg.CompSes); + SmReqMsg.Header.MessageSize = SM_PORT_MESSAGE_SIZE; + Status = NtRequestWaitReplyPort (hSmApiPort, (PLPC_MESSAGE) & SmReqMsg, (PLPC_MESSAGE) & SmReqMsg); + if (NT_SUCCESS(Status)) + { + return SmReqMsg.Status; + } + DbgPrint ("%s failed (Status=0x%08lx)\n", __FUNCTION__, Status); + return Status; +} + +/* EOF */ diff --git a/reactos/lib/rosrtl/sm/connect.c b/reactos/lib/rosrtl/sm/connect.c new file mode 100644 index 00000000000..2dded98bb9f --- /dev/null +++ b/reactos/lib/rosrtl/sm/connect.c @@ -0,0 +1,83 @@ +/* $Id$ + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: reactos/lib/smdll/connect.c + * PURPOSE: Connect to the API LPC port exposed by the SM + */ +#define NTOS_MODE_USER +#include +#include +#include +#include + +/********************************************************************** + * NAME EXPORTED + * SmConnectApiPort/4 + * + * DESCRIPTION + * Connect to SM API port and register a session "begin" port (Sb) + * or to issue API requests to SmApiPort. + * + * ARGUMENTS + * pSbApiPortName: name of the Sb port the calling subsystem + * server already created in the system name space; + * hSbApiPort: LPC port handle (checked, but not used); + * dwSubsystem: a valid IMAGE_SUBSYSTEM_xxx value; + * phSmApiPort: a pointer to a HANDLE, which will be + * filled with a valid client-side LPC comm port. + * + * RETURN VALUE + * If all three optional values are omitted, an LPC status. + * STATUS_INVALID_PARAMETER_MIX if PortName is defined and + * both hSbApiPort and dwSubsystem are 0. + */ +NTSTATUS STDCALL +SmConnectApiPort (IN PUNICODE_STRING pSbApiPortName OPTIONAL, + IN HANDLE hSbApiPort OPTIONAL, + IN DWORD dwSubsystem OPTIONAL, + IN OUT PHANDLE phSmApiPort) +{ + UNICODE_STRING SmApiPortName; + SECURITY_QUALITY_OF_SERVICE SecurityQos; + NTSTATUS Status = STATUS_SUCCESS; + SM_CONNECT_DATA ConnectData = {0,{0}}; + ULONG ConnectDataLength = 0; + + if (pSbApiPortName) + { + if (NULL == hSbApiPort || IMAGE_SUBSYSTEM_UNKNOWN == dwSubsystem) + { + return STATUS_INVALID_PARAMETER_MIX; + } + ConnectData.Subsystem = dwSubsystem; + memmove (& ConnectData.SbName, pSbApiPortName->Buffer, pSbApiPortName->Length); + } + ConnectDataLength = sizeof (ConnectData); + + SecurityQos.Length = sizeof (SecurityQos); + SecurityQos.ImpersonationLevel = SecurityIdentification; + SecurityQos.ContextTrackingMode = TRUE; + SecurityQos.EffectiveOnly = TRUE; + + RtlInitUnicodeString (& SmApiPortName, SM_API_PORT_NAME); + + Status = NtConnectPort ( + phSmApiPort, + & SmApiPortName, + & SecurityQos, + NULL, + NULL, + NULL, + & ConnectData, + & ConnectDataLength + ); + if (NT_SUCCESS(Status)) + { + return STATUS_SUCCESS; + } + DbgPrint ("%s failed (Status=0x%08lx)\n", __FUNCTION__, Status); + return Status; +} + +/* EOF */ diff --git a/reactos/lib/rosrtl/sm/execpgm.c b/reactos/lib/rosrtl/sm/execpgm.c new file mode 100644 index 00000000000..5af3a228f97 --- /dev/null +++ b/reactos/lib/rosrtl/sm/execpgm.c @@ -0,0 +1,49 @@ +/* $Id$ + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: lib/smdll/execpgm.c + * PURPOSE: Call SM API SM_API_EXECPGM + */ +#define NTOS_MODE_USER +#include +#include +#include +#include + +NTSTATUS STDCALL +SmExecPgm (HANDLE hSmApiPort, PUNICODE_STRING Pgm) +{ + NTSTATUS Status; + SM_PORT_MESSAGE SmReqMsg; + + + /* Check Pgm's length */ + if (Pgm->Length > (sizeof (Pgm->Buffer[0]) * SM_EXEXPGM_MAX_LENGTH)) + { + return STATUS_INVALID_PARAMETER; + } + /* Marshal Pgm in the LPC message */ + RtlZeroMemory (& SmReqMsg, sizeof SmReqMsg); + SmReqMsg.ExecPgm.NameLength = Pgm->Length; + RtlCopyMemory (SmReqMsg.ExecPgm.Name, Pgm->Buffer, Pgm->Length); + + /* SM API to invoke */ + SmReqMsg.ApiIndex = SM_API_EXECUTE_PROGRAMME; + + /* LPC message */ + SmReqMsg.Header.MessageType = LPC_NEW_MESSAGE; + SmReqMsg.Header.DataSize = SM_PORT_DATA_SIZE(SmReqMsg.ExecPgm); + SmReqMsg.Header.MessageSize = SM_PORT_MESSAGE_SIZE; + + /* Call SM and wait for a reply */ + Status = NtRequestWaitReplyPort (hSmApiPort, (PLPC_MESSAGE) & SmReqMsg, (PLPC_MESSAGE) & SmReqMsg); + if (NT_SUCCESS(Status)) + { + return SmReqMsg.Status; + } + DbgPrint ("%s failed (Status=0x%08lx)\n", __FUNCTION__, Status); + return Status; +} + +/* EOF */ diff --git a/reactos/lib/rosrtl/sm/readme.txt b/reactos/lib/rosrtl/sm/readme.txt new file mode 100644 index 00000000000..8be90087388 --- /dev/null +++ b/reactos/lib/rosrtl/sm/readme.txt @@ -0,0 +1,18 @@ +$Id$ + +This is a helper library to talk to the ReactOS session manager (SM). + +It should be linked in the following components: + +a) the SM itself, because iy registers for managing native processes + IMAGE_SUBSYSTEM_NATIVE; + +b) environment subsystem servers, because each one should register in + the SM its own subsystem (willing to manageg those processes); + +c) terminal emulators for optional subsystems, like posixw32 and os2w32, + to ask the SM to start the optional subsystem server they need connect to; + +d) system and development utilites to debug/query the SM. + +2004-02-15 ea \ No newline at end of file diff --git a/reactos/lib/rosrtl/sm/testapi.c b/reactos/lib/rosrtl/sm/testapi.c new file mode 100644 index 00000000000..13b9f8e8a07 --- /dev/null +++ b/reactos/lib/rosrtl/sm/testapi.c @@ -0,0 +1,20 @@ +/* $Id$ */ +#define NTOS_MODE_USER +#include +#include + +VOID STDCALL SmPrintPortMessage (PSM_PORT_MESSAGE SmMessage) +{ + DbgPrint ("SM_PORT_MESSAGE %08lx:\n", (ULONG) SmMessage); + DbgPrint (" Header:\n"); + DbgPrint (" MessageType = %u\n", SmMessage->Header.MessageType); + DbgPrint (" DataSize = %d\n", SmMessage->Header.DataSize); + DbgPrint (" MessageSize = %d\n", SmMessage->Header.MessageSize); + DbgPrint (" ApiIndex = %ld\n", SmMessage->ApiIndex); + DbgPrint (" Status = %08lx\n", SmMessage->Status); + DbgPrint (" ExecPgm:\n"); + DbgPrint (" NameLength = %ld\n", SmMessage->ExecPgm.NameLength); + DbgPrint (" Name = %ls\n", (LPWSTR) & SmMessage->ExecPgm.Name); +} +/* EOF */ + From fb80c5416df977608d86a5c103ab57cbc8e84eea Mon Sep 17 00:00:00 2001 From: Thomas Bluemel Date: Mon, 7 Feb 2005 11:35:10 +0000 Subject: [PATCH 144/185] moved smdll to rosrtl. We just _can't_ have separate dlls for everything internal, that's what static libraries are for. Unless we want a dll hell even worse than necessary... svn path=/trunk/; revision=13458 --- reactos/lib/smdll/compses.c | 39 ----------------- reactos/lib/smdll/connect.c | 83 ------------------------------------ reactos/lib/smdll/dllmain.c | 17 -------- reactos/lib/smdll/execpgm.c | 49 --------------------- reactos/lib/smdll/makefile | 34 --------------- reactos/lib/smdll/readme.txt | 18 -------- reactos/lib/smdll/smdll.def | 5 --- reactos/lib/smdll/smdll.rc | 4 -- reactos/lib/smdll/testapi.c | 20 --------- 9 files changed, 269 deletions(-) delete mode 100644 reactos/lib/smdll/compses.c delete mode 100644 reactos/lib/smdll/connect.c delete mode 100644 reactos/lib/smdll/dllmain.c delete mode 100644 reactos/lib/smdll/execpgm.c delete mode 100644 reactos/lib/smdll/makefile delete mode 100644 reactos/lib/smdll/readme.txt delete mode 100644 reactos/lib/smdll/smdll.def delete mode 100644 reactos/lib/smdll/smdll.rc delete mode 100644 reactos/lib/smdll/testapi.c diff --git a/reactos/lib/smdll/compses.c b/reactos/lib/smdll/compses.c deleted file mode 100644 index 9f7e324f957..00000000000 --- a/reactos/lib/smdll/compses.c +++ /dev/null @@ -1,39 +0,0 @@ -/* $Id$ - * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/smlib/compses.c - * PURPOSE: Call SM API SM_API_COMPLETE_SESSION - */ -#define NTOS_MODE_USER -#include -#include -#include - -NTSTATUS STDCALL -SmCompleteSession (HANDLE hSmApiPort, HANDLE hSbApiPort, HANDLE hApiPort) -{ - NTSTATUS Status; - SM_PORT_MESSAGE SmReqMsg; - - /* Marshal Ses in the LPC message */ - SmReqMsg.CompSes.hApiPort = hApiPort; - SmReqMsg.CompSes.hSbApiPort = hSbApiPort; - - /* SM API to invoke */ - SmReqMsg.ApiIndex = SM_API_COMPLETE_SESSION; - - /* Port message */ - SmReqMsg.Header.MessageType = LPC_NEW_MESSAGE; - SmReqMsg.Header.DataSize = SM_PORT_DATA_SIZE(SmReqMsg.CompSes); - SmReqMsg.Header.MessageSize = SM_PORT_MESSAGE_SIZE; - Status = NtRequestWaitReplyPort (hSmApiPort, (PLPC_MESSAGE) & SmReqMsg, (PLPC_MESSAGE) & SmReqMsg); - if (NT_SUCCESS(Status)) - { - return SmReqMsg.Status; - } - DbgPrint ("%s failed (Status=0x%08lx)\n", __FUNCTION__, Status); - return Status; -} - -/* EOF */ diff --git a/reactos/lib/smdll/connect.c b/reactos/lib/smdll/connect.c deleted file mode 100644 index 1ac5d51d6f6..00000000000 --- a/reactos/lib/smdll/connect.c +++ /dev/null @@ -1,83 +0,0 @@ -/* $Id$ - * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: reactos/lib/smdll/connect.c - * PURPOSE: Connect to the API LPC port exposed by the SM - */ -#define NTOS_MODE_USER -#include -#include -#include -#include - -/********************************************************************** - * NAME EXPORTED - * SmConnectApiPort/4 - * - * DESCRIPTION - * Connect to SM API port and register a session "begin" port (Sb) - * or to issue API requests to SmApiPort. - * - * ARGUMENTS - * pSbApiPortName: name of the Sb port the calling subsystem - * server already created in the system name space; - * hSbApiPort: LPC port handle (checked, but not used); - * dwSubsystem: a valid IMAGE_SUBSYSTEM_xxx value; - * phSmApiPort: a pointer to a HANDLE, which will be - * filled with a valid client-side LPC comm port. - * - * RETURN VALUE - * If all three optional values are omitted, an LPC status. - * STATUS_INVALID_PARAMETER_MIX if PortName is defined and - * both hSbApiPort and dwSubsystem are 0. - */ -NTSTATUS STDCALL -SmConnectApiPort (IN PUNICODE_STRING pSbApiPortName OPTIONAL, - IN HANDLE hSbApiPort OPTIONAL, - IN DWORD dwSubsystem OPTIONAL, - IN OUT PHANDLE phSmApiPort) -{ - UNICODE_STRING SmApiPortName; - SECURITY_QUALITY_OF_SERVICE SecurityQos; - NTSTATUS Status = STATUS_SUCCESS; - SM_CONNECT_DATA ConnectData = {0,{0}}; - ULONG ConnectDataLength = 0; - - if (pSbApiPortName) - { - if (NULL == hSbApiPort || IMAGE_SUBSYSTEM_UNKNOWN == dwSubsystem) - { - return STATUS_INVALID_PARAMETER_MIX; - } - ConnectData.Subsystem = dwSubsystem; - memmove (& ConnectData.SbName, pSbApiPortName->Buffer, pSbApiPortName->Length); - } - ConnectDataLength = sizeof (ConnectData); - - SecurityQos.Length = sizeof (SecurityQos); - SecurityQos.ImpersonationLevel = SecurityIdentification; - SecurityQos.ContextTrackingMode = TRUE; - SecurityQos.EffectiveOnly = TRUE; - - RtlInitUnicodeString (& SmApiPortName, SM_API_PORT_NAME); - - Status = NtConnectPort ( - phSmApiPort, - & SmApiPortName, - & SecurityQos, - NULL, - NULL, - NULL, - & ConnectData, - & ConnectDataLength - ); - if (NT_SUCCESS(Status)) - { - return STATUS_SUCCESS; - } - DbgPrint ("%s failed (Status=0x%08lx)\n", __FUNCTION__, Status); - return Status; -} - -/* EOF */ diff --git a/reactos/lib/smdll/dllmain.c b/reactos/lib/smdll/dllmain.c deleted file mode 100644 index 3d6e48820d3..00000000000 --- a/reactos/lib/smdll/dllmain.c +++ /dev/null @@ -1,17 +0,0 @@ -/* $Id$ - * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS - * FILE: lib/smdll/dllmain.c - * PURPOSE: SM Helper Library - */ - -#define NTOS_MODE_USER -#include - -BOOL STDCALL DllMain(HANDLE hinstDll, DWORD fdwReason, LPVOID fImpLoad) -{ - return TRUE; -} - -/* EOF */ diff --git a/reactos/lib/smdll/execpgm.c b/reactos/lib/smdll/execpgm.c deleted file mode 100644 index f5b2e5fa514..00000000000 --- a/reactos/lib/smdll/execpgm.c +++ /dev/null @@ -1,49 +0,0 @@ -/* $Id$ - * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/smdll/execpgm.c - * PURPOSE: Call SM API SM_API_EXECPGM - */ -#define NTOS_MODE_USER -#include -#include -#include -#include - -NTSTATUS STDCALL -SmExecPgm (HANDLE hSmApiPort, PUNICODE_STRING Pgm) -{ - NTSTATUS Status; - SM_PORT_MESSAGE SmReqMsg; - - - /* Check Pgm's length */ - if (Pgm->Length > (sizeof (Pgm->Buffer[0]) * SM_EXEXPGM_MAX_LENGTH)) - { - return STATUS_INVALID_PARAMETER; - } - /* Marshal Pgm in the LPC message */ - RtlZeroMemory (& SmReqMsg, sizeof SmReqMsg); - SmReqMsg.ExecPgm.NameLength = Pgm->Length; - RtlCopyMemory (SmReqMsg.ExecPgm.Name, Pgm->Buffer, Pgm->Length); - - /* SM API to invoke */ - SmReqMsg.ApiIndex = SM_API_EXECUTE_PROGRAMME; - - /* LPC message */ - SmReqMsg.Header.MessageType = LPC_NEW_MESSAGE; - SmReqMsg.Header.DataSize = SM_PORT_DATA_SIZE(SmReqMsg.ExecPgm); - SmReqMsg.Header.MessageSize = SM_PORT_MESSAGE_SIZE; - - /* Call SM and wait for a reply */ - Status = NtRequestWaitReplyPort (hSmApiPort, (PLPC_MESSAGE) & SmReqMsg, (PLPC_MESSAGE) & SmReqMsg); - if (NT_SUCCESS(Status)) - { - return SmReqMsg.Status; - } - DbgPrint ("%s failed (Status=0x%08lx)\n", __FUNCTION__, Status); - return Status; -} - -/* EOF */ diff --git a/reactos/lib/smdll/makefile b/reactos/lib/smdll/makefile deleted file mode 100644 index d14e1d598f4..00000000000 --- a/reactos/lib/smdll/makefile +++ /dev/null @@ -1,34 +0,0 @@ -# $Id$ - -PATH_TO_TOP = ../.. - -TARGET_TYPE = dynlink - -TARGET_NAME = smdll - -TARGET_SDKLIBS = ntdll.a - -TARGET_CFLAGS = -I./include -Wall -Werror - -# require os code to explicitly request A/W version of structs/functions -TARGET_CFLAGS += -D_DISABLE_TIDENTS - -TARGET_LFLAGS = -nostartfiles -nostdlib - -#TARGET_BASE = - -TARGET_OBJECTS = \ - dllmain.o \ - connect.o \ - execpgm.o \ - compses.o - -DEP_OBJECTS = $(TARGET_OBJECTS) - -include $(PATH_TO_TOP)/rules.mak - -include $(TOOLS_PATH)/helper.mk - -include $(TOOLS_PATH)/depend.mk - -# EOF diff --git a/reactos/lib/smdll/readme.txt b/reactos/lib/smdll/readme.txt deleted file mode 100644 index 8265e596dcf..00000000000 --- a/reactos/lib/smdll/readme.txt +++ /dev/null @@ -1,18 +0,0 @@ -$Id$ - -This is SMDLL: a helper library to talk to the ReactOS session manager (SM). - -It should be linked in the following components: - -a) the SM itself, because iy registers for managing native processes - IMAGE_SUBSYSTEM_NATIVE; - -b) environment subsystem servers, because each one should register in - the SM its own subsystem (willing to manageg those processes); - -c) terminal emulators for optional subsystems, like posixw32 and os2w32, - to ask the SM to start the optional subsystem server they need connect to; - -d) system and development utilites to debug/query the SM. - -2004-02-15 ea \ No newline at end of file diff --git a/reactos/lib/smdll/smdll.def b/reactos/lib/smdll/smdll.def deleted file mode 100644 index 76d524637b6..00000000000 --- a/reactos/lib/smdll/smdll.def +++ /dev/null @@ -1,5 +0,0 @@ -LIBRARY SMDLL.DLL -EXPORTS -SmCompleteSession@12 -SmConnectApiPort@16 -SmExecPgm@8 \ No newline at end of file diff --git a/reactos/lib/smdll/smdll.rc b/reactos/lib/smdll/smdll.rc deleted file mode 100644 index ae16f7bbdd8..00000000000 --- a/reactos/lib/smdll/smdll.rc +++ /dev/null @@ -1,4 +0,0 @@ -#define REACTOS_STR_FILE_DESCRIPTION "ReactOS SM Helper\0" -#define REACTOS_STR_INTERNAL_NAME "smdll.dll\0" -#define REACTOS_STR_ORIGINAL_FILENAME "smdll.dll\0" -#include diff --git a/reactos/lib/smdll/testapi.c b/reactos/lib/smdll/testapi.c deleted file mode 100644 index a1ecde2cf7f..00000000000 --- a/reactos/lib/smdll/testapi.c +++ /dev/null @@ -1,20 +0,0 @@ -/* $Id$ */ -#define NTOS_MODE_USER -#include -#include - -VOID STDCALL SmPrintPortMessage (PSM_PORT_MESSAGE SmMessage) -{ - DbgPrint ("SM_PORT_MESSAGE %08lx:\n", (ULONG) SmMessage); - DbgPrint (" Header:\n"); - DbgPrint (" MessageType = %u\n", SmMessage->Header.MessageType); - DbgPrint (" DataSize = %d\n", SmMessage->Header.DataSize); - DbgPrint (" MessageSize = %d\n", SmMessage->Header.MessageSize); - DbgPrint (" ApiIndex = %ld\n", SmMessage->ApiIndex); - DbgPrint (" Status = %08lx\n", SmMessage->Status); - DbgPrint (" ExecPgm:\n"); - DbgPrint (" NameLength = %ld\n", SmMessage->ExecPgm.NameLength); - DbgPrint (" Name = %ls\n", (LPWSTR) & SmMessage->ExecPgm.Name); -} -/* EOF */ - From 61c28f28b380891751aecb0c7b9cb5e347b4802b Mon Sep 17 00:00:00 2001 From: Thomas Bluemel Date: Mon, 7 Feb 2005 11:35:29 +0000 Subject: [PATCH 145/185] moved smdll to rosrtl. We just _can't_ have separate dlls for everything internal, that's what static libraries are for. Unless we want a dll hell even worse than necessary... svn path=/trunk/; revision=13459 --- reactos/include/sm/api.h | 72 ------------------------------------- reactos/include/sm/helper.h | 46 ------------------------ 2 files changed, 118 deletions(-) delete mode 100644 reactos/include/sm/api.h delete mode 100644 reactos/include/sm/helper.h diff --git a/reactos/include/sm/api.h b/reactos/include/sm/api.h deleted file mode 100644 index 17bf653dcb8..00000000000 --- a/reactos/include/sm/api.h +++ /dev/null @@ -1,72 +0,0 @@ -/* $Id$ */ -#ifndef __SM_API_H -#define __SM_API_H - -#define SM_API_PORT_NAME L"\\SmApiPort" -#define SM_DBGSS_PORT_NAME L"\\DbgSsApiPort" -#define SM_DBGUI_PORT_NAME L"\\DbgUiApiPort" - -#pragma pack(push,4) - -/*** 1 ****************************************************************/ - -#define SM_API_COMPLETE_SESSION 1 /* complete a session initialization */ - -typedef struct _SM_PORT_MESSAGE_COMPSES -{ - HANDLE hApiPort; - HANDLE hSbApiPort; - -} SM_PORT_MESSAGE_COMPSES, *PSM_PORT_MESSAGE_COMPSES; - -/*** 2 ****************************************************************/ - -#define SM_API_2 2 - -/* obsolete */ - -/*** 3 ****************************************************************/ - -#define SM_API_3 3 - -/* unknown */ - -/*** 4 ****************************************************************/ - -#define SM_API_EXECUTE_PROGRAMME 4 /* start a subsystem (server) */ - -#define SM_EXEXPGM_MAX_LENGTH 32 /* max count of wide string */ - -typedef struct _SM_PORT_MESSAGE_EXECPGM -{ - ULONG NameLength; - WCHAR Name [SM_EXEXPGM_MAX_LENGTH]; - -} SM_PORT_MESSAGE_EXECPGM, *PSM_PORT_MESSAGE_EXECPGM; - -/*** | ****************************************************************/ - -typedef struct _SM_PORT_MESSAGE -{ - /*** LPC common header ***/ - LPC_MESSAGE Header; - /*** SM common header ***/ - DWORD ApiIndex; - NTSTATUS Status; - /*** SM per API arguments ***/ - union { - SM_PORT_MESSAGE_COMPSES CompSes; - SM_PORT_MESSAGE_EXECPGM ExecPgm; - }; - -} SM_PORT_MESSAGE, * PSM_PORT_MESSAGE; - -#pragma pack(pop) - -/*** MACRO ***********************************************************/ - -#define SM_PORT_DATA_SIZE(c) (sizeof(DWORD)+sizeof(NTSTATUS)+sizeof(c)) -#define SM_PORT_MESSAGE_SIZE (sizeof(SM_PORT_MESSAGE)) - - -#endif /* !def __SM_API_H */ diff --git a/reactos/include/sm/helper.h b/reactos/include/sm/helper.h deleted file mode 100644 index c18dde35043..00000000000 --- a/reactos/include/sm/helper.h +++ /dev/null @@ -1,46 +0,0 @@ -#ifndef _SM_HELPER_H - -/*** DATA TYPES ******************************************************/ - -#define SM_SB_NAME_MAX_LENGTH 120 - -#pragma pack(push,4) - -/* SmConnectApiPort */ -typedef struct _SM_CONNECT_DATA -{ - ULONG Subsystem; - WCHAR SbName [SM_SB_NAME_MAX_LENGTH]; - -} SM_CONNECT_DATA, *PSM_CONNECT_DATA; - -/* SmpConnectSbApiPort */ -typedef struct _SB_CONNECT_DATA -{ - ULONG SmApiMax; -} SB_CONNECT_DATA, *PSB_CONNECT_DATA; - -#pragma pack(pop) - - -/*** PROTOTYPES ******************************************************/ - - -/* smdll/connect.c */ -NTSTATUS STDCALL -SmConnectApiPort (IN PUNICODE_STRING pSbApiPortName OPTIONAL, - IN HANDLE hSbApiPort OPTIONAL, - IN DWORD dwSubsystem OPTIONAL, /* pe.h */ - IN OUT PHANDLE phSmApiPort); -/* smdll/compses.c */ -NTSTATUS STDCALL -SmCompleteSession (IN HANDLE hSmApiPort, - IN HANDLE hSbApiPort, - IN HANDLE hApiPort); -/* smdll/execpgm.c */ -NTSTATUS STDCALL -SmExecuteProgram (IN HANDLE hSmApiPort, - IN PUNICODE_STRING Pgm - ); - -#endif /* ndef _SM_HELPER_H */ From 7a4e07b567786d2905e41b0a4bda205e0942154e Mon Sep 17 00:00:00 2001 From: Thomas Bluemel Date: Mon, 7 Feb 2005 12:58:08 +0000 Subject: [PATCH 146/185] revert moving smdll to rosrtl. svn path=/trunk/; revision=13460 --- reactos/Makefile | 2 +- reactos/bootdata/packages/reactos.dff | 1 + reactos/include/{rosrtl/smapi.h => sm/api.h} | 6 ++-- .../{rosrtl/smhelper.h => sm/helper.h} | 4 +-- reactos/lib/rosrtl/makefile | 9 +---- reactos/lib/{rosrtl/sm => smdll}/compses.c | 4 +-- reactos/lib/{rosrtl/sm => smdll}/connect.c | 4 +-- reactos/lib/smdll/dllmain.c | 17 ++++++++++ reactos/lib/{rosrtl/sm => smdll}/execpgm.c | 4 +-- reactos/lib/smdll/makefile | 34 +++++++++++++++++++ reactos/lib/{rosrtl/sm => smdll}/readme.txt | 2 +- reactos/lib/smdll/smdll.def | 5 +++ reactos/lib/smdll/smdll.rc | 4 +++ reactos/lib/{rosrtl/sm => smdll}/testapi.c | 2 +- 14 files changed, 76 insertions(+), 22 deletions(-) rename reactos/include/{rosrtl/smapi.h => sm/api.h} (94%) rename reactos/include/{rosrtl/smhelper.h => sm/helper.h} (94%) rename reactos/lib/{rosrtl/sm => smdll}/compses.c (95%) rename reactos/lib/{rosrtl/sm => smdll}/connect.c (97%) create mode 100644 reactos/lib/smdll/dllmain.c rename reactos/lib/{rosrtl/sm => smdll}/execpgm.c (95%) create mode 100644 reactos/lib/smdll/makefile rename reactos/lib/{rosrtl/sm => smdll}/readme.txt (84%) create mode 100644 reactos/lib/smdll/smdll.def create mode 100644 reactos/lib/smdll/smdll.rc rename reactos/lib/{rosrtl/sm => smdll}/testapi.c (96%) diff --git a/reactos/Makefile b/reactos/Makefile index 0d10a955f78..9afe433a400 100644 --- a/reactos/Makefile +++ b/reactos/Makefile @@ -58,7 +58,7 @@ DLLS_SHELLEXT = shellext DLLS = acledit aclui advapi32 advpack cabinet cards comctl32 crtdll comdlg32 d3d8thk dbghelp expat fmifs freetype \ gdi32 gdiplus glu32 hid imagehlp imm32 iphlpapi kernel32 lzexpand mesa32 midimap mmdrv mpr msacm msafd \ msgina msi msimg32 msvcrt20 msvideo mswsock netapi32 ntdll ole32 oleaut32 oledlg olepro32 opengl32 \ - packet psapi riched20 richedit rpcrt4 samlib secur32 setupapi shell32 shlwapi snmpapi syssetup \ + packet psapi riched20 richedit rpcrt4 samlib secur32 setupapi shell32 shlwapi smdll snmpapi syssetup \ twain unicode user32 userenv version wininet winmm winspool ws2help ws2_32 wsock32 wshirda dnsapi \ urlmon shdocvw dinput dinput8 dxdiagn devenum dsound $(DLLS_KBD) $(DLLS_CPL) $(DLLS_SHELLEXT) diff --git a/reactos/bootdata/packages/reactos.dff b/reactos/bootdata/packages/reactos.dff index 6cbb91acc1a..fd7b1b87f5c 100755 --- a/reactos/bootdata/packages/reactos.dff +++ b/reactos/bootdata/packages/reactos.dff @@ -116,6 +116,7 @@ lib\setupapi\setupapi.dll 1 lib\shdocvw\shdocvw.dll 1 lib\shell32\shell32.dll 1 lib\shlwapi\shlwapi.dll 1 +lib\smdll\smdll.dll 1 lib\syssetup\syssetup.dll 1 lib\twain\twain_32.dll 1 lib\urlmon\urlmon.dll 1 diff --git a/reactos/include/rosrtl/smapi.h b/reactos/include/sm/api.h similarity index 94% rename from reactos/include/rosrtl/smapi.h rename to reactos/include/sm/api.h index 8bb6a53db6e..797a14dc5ad 100644 --- a/reactos/include/rosrtl/smapi.h +++ b/reactos/include/sm/api.h @@ -1,6 +1,6 @@ /* $Id$ */ -#ifndef __ROSRTL_SM_API_H -#define __ROSRTL_SM_API_H +#ifndef __SM_API_H +#define __SM_API_H #define SM_API_PORT_NAME L"\\SmApiPort" #define SM_DBGSS_PORT_NAME L"\\DbgSsApiPort" @@ -69,4 +69,4 @@ typedef struct _SM_PORT_MESSAGE #define SM_PORT_MESSAGE_SIZE (sizeof(SM_PORT_MESSAGE)) -#endif /* !def __ROSRTL_SM_API_H */ +#endif /* !def __SM_API_H */ diff --git a/reactos/include/rosrtl/smhelper.h b/reactos/include/sm/helper.h similarity index 94% rename from reactos/include/rosrtl/smhelper.h rename to reactos/include/sm/helper.h index d00bb3a824e..13ed8829041 100644 --- a/reactos/include/rosrtl/smhelper.h +++ b/reactos/include/sm/helper.h @@ -1,4 +1,4 @@ -#ifndef _ROSRTL_SM_HELPER_H +#ifndef _SM_HELPER_H /*** DATA TYPES ******************************************************/ @@ -43,4 +43,4 @@ SmExecuteProgram (IN HANDLE hSmApiPort, IN PUNICODE_STRING Pgm ); -#endif /* ndef _ROSRTL_SM_HELPER_H */ +#endif /* ndef _SM_HELPER_H */ diff --git a/reactos/lib/rosrtl/makefile b/reactos/lib/rosrtl/makefile index 659f0d05c02..6c0f6acbffc 100644 --- a/reactos/lib/rosrtl/makefile +++ b/reactos/lib/rosrtl/makefile @@ -33,12 +33,6 @@ FILE_OBJECTS = \ file/sparse.o \ file/path.o -SM_OBJECTS = \ - sm/compses.o \ - sm/connect.o \ - sm/execpgm.o \ - sm/testapi.o - RECMUTEX_OBJECTS = recmutex/recmutex.o include $(PATH_TO_TOP)/config @@ -52,8 +46,7 @@ TARGET_NAME = rosrtl TARGET_CFLAGS = -D__USE_W32API -Wall -Werror TARGET_OBJECTS = $(THREAD_OBJECTS) $(MISC_OBJECTS) $(STRING_OBJECTS) \ - $(REGISTRY_OBJECTS) $(FILE_OBJECTS) $(RECMUTEX_OBJECTS) \ - $(SM_OBJECTS) + $(REGISTRY_OBJECTS) $(FILE_OBJECTS) $(RECMUTEX_OBJECTS) DEP_OBJECTS = $(TARGET_OBJECTS) diff --git a/reactos/lib/rosrtl/sm/compses.c b/reactos/lib/smdll/compses.c similarity index 95% rename from reactos/lib/rosrtl/sm/compses.c rename to reactos/lib/smdll/compses.c index 96524fecae7..cc29d4e3507 100644 --- a/reactos/lib/rosrtl/sm/compses.c +++ b/reactos/lib/smdll/compses.c @@ -7,8 +7,8 @@ */ #define NTOS_MODE_USER #include -#include -#include +#include +#include NTSTATUS STDCALL SmCompleteSession (HANDLE hSmApiPort, HANDLE hSbApiPort, HANDLE hApiPort) diff --git a/reactos/lib/rosrtl/sm/connect.c b/reactos/lib/smdll/connect.c similarity index 97% rename from reactos/lib/rosrtl/sm/connect.c rename to reactos/lib/smdll/connect.c index 2dded98bb9f..24fbca2d138 100644 --- a/reactos/lib/rosrtl/sm/connect.c +++ b/reactos/lib/smdll/connect.c @@ -7,8 +7,8 @@ */ #define NTOS_MODE_USER #include -#include -#include +#include +#include #include /********************************************************************** diff --git a/reactos/lib/smdll/dllmain.c b/reactos/lib/smdll/dllmain.c new file mode 100644 index 00000000000..10beccdaedc --- /dev/null +++ b/reactos/lib/smdll/dllmain.c @@ -0,0 +1,17 @@ +/* $Id$ + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS + * FILE: lib/smdll/dllmain.c + * PURPOSE: SM Helper Library + */ + +#define NTOS_MODE_USER +#include + +BOOL STDCALL DllMain(HANDLE hinstDll, DWORD fdwReason, LPVOID fImpLoad) +{ + return TRUE; +} + +/* EOF */ diff --git a/reactos/lib/rosrtl/sm/execpgm.c b/reactos/lib/smdll/execpgm.c similarity index 95% rename from reactos/lib/rosrtl/sm/execpgm.c rename to reactos/lib/smdll/execpgm.c index 5af3a228f97..f9a523b8fd2 100644 --- a/reactos/lib/rosrtl/sm/execpgm.c +++ b/reactos/lib/smdll/execpgm.c @@ -7,8 +7,8 @@ */ #define NTOS_MODE_USER #include -#include -#include +#include +#include #include NTSTATUS STDCALL diff --git a/reactos/lib/smdll/makefile b/reactos/lib/smdll/makefile new file mode 100644 index 00000000000..3275d1b26ee --- /dev/null +++ b/reactos/lib/smdll/makefile @@ -0,0 +1,34 @@ +# $Id$ + +PATH_TO_TOP = ../.. + +TARGET_TYPE = dynlink + +TARGET_NAME = smdll + +TARGET_SDKLIBS = ntdll.a + +TARGET_CFLAGS = -I./include -Wall -Werror + +# require os code to explicitly request A/W version of structs/functions +TARGET_CFLAGS += -D_DISABLE_TIDENTS + +TARGET_LFLAGS = -nostartfiles -nostdlib + +#TARGET_BASE = + +TARGET_OBJECTS = \ + dllmain.o \ + connect.o \ + execpgm.o \ + compses.o + +DEP_OBJECTS = $(TARGET_OBJECTS) + +include $(PATH_TO_TOP)/rules.mak + +include $(TOOLS_PATH)/helper.mk + +include $(TOOLS_PATH)/depend.mk + +# EOF diff --git a/reactos/lib/rosrtl/sm/readme.txt b/reactos/lib/smdll/readme.txt similarity index 84% rename from reactos/lib/rosrtl/sm/readme.txt rename to reactos/lib/smdll/readme.txt index 8be90087388..71261e83fa6 100644 --- a/reactos/lib/rosrtl/sm/readme.txt +++ b/reactos/lib/smdll/readme.txt @@ -1,6 +1,6 @@ $Id$ -This is a helper library to talk to the ReactOS session manager (SM). +This is SMDLL: a helper library to talk to the ReactOS session manager (SM). It should be linked in the following components: diff --git a/reactos/lib/smdll/smdll.def b/reactos/lib/smdll/smdll.def new file mode 100644 index 00000000000..0822d1a05bc --- /dev/null +++ b/reactos/lib/smdll/smdll.def @@ -0,0 +1,5 @@ +LIBRARY SMDLL.DLL +EXPORTS +SmCompleteSession@12 +SmConnectApiPort@16 +SmExecPgm@8 \ No newline at end of file diff --git a/reactos/lib/smdll/smdll.rc b/reactos/lib/smdll/smdll.rc new file mode 100644 index 00000000000..4195671e0b1 --- /dev/null +++ b/reactos/lib/smdll/smdll.rc @@ -0,0 +1,4 @@ +#define REACTOS_STR_FILE_DESCRIPTION "ReactOS SM Helper\0" +#define REACTOS_STR_INTERNAL_NAME "smdll.dll\0" +#define REACTOS_STR_ORIGINAL_FILENAME "smdll.dll\0" +#include diff --git a/reactos/lib/rosrtl/sm/testapi.c b/reactos/lib/smdll/testapi.c similarity index 96% rename from reactos/lib/rosrtl/sm/testapi.c rename to reactos/lib/smdll/testapi.c index 13b9f8e8a07..cfb8b453dfd 100644 --- a/reactos/lib/rosrtl/sm/testapi.c +++ b/reactos/lib/smdll/testapi.c @@ -1,7 +1,7 @@ /* $Id$ */ #define NTOS_MODE_USER #include -#include +#include VOID STDCALL SmPrintPortMessage (PSM_PORT_MESSAGE SmMessage) { From f390d143d5f1107841d613981a343fbb0939aa94 Mon Sep 17 00:00:00 2001 From: Emanuele Aliberti Date: Mon, 7 Feb 2005 23:11:30 +0000 Subject: [PATCH 147/185] Typographic errors fixed and a function name changed. svn path=/trunk/; revision=13461 --- reactos/lib/smdll/execpgm.c | 2 +- reactos/lib/smdll/readme.txt | 4 ++-- reactos/lib/smdll/smdll.def | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/reactos/lib/smdll/execpgm.c b/reactos/lib/smdll/execpgm.c index f9a523b8fd2..c0d67e52bb4 100644 --- a/reactos/lib/smdll/execpgm.c +++ b/reactos/lib/smdll/execpgm.c @@ -12,7 +12,7 @@ #include NTSTATUS STDCALL -SmExecPgm (HANDLE hSmApiPort, PUNICODE_STRING Pgm) +SmExecuteProgram (HANDLE hSmApiPort, PUNICODE_STRING Pgm) { NTSTATUS Status; SM_PORT_MESSAGE SmReqMsg; diff --git a/reactos/lib/smdll/readme.txt b/reactos/lib/smdll/readme.txt index 71261e83fa6..af75bd866d4 100644 --- a/reactos/lib/smdll/readme.txt +++ b/reactos/lib/smdll/readme.txt @@ -4,11 +4,11 @@ This is SMDLL: a helper library to talk to the ReactOS session manager (SM). It should be linked in the following components: -a) the SM itself, because iy registers for managing native processes +a) the SM itself, because it registers for managing native processes IMAGE_SUBSYSTEM_NATIVE; b) environment subsystem servers, because each one should register in - the SM its own subsystem (willing to manageg those processes); + the SM its own subsystem (willing to manage those processes); c) terminal emulators for optional subsystems, like posixw32 and os2w32, to ask the SM to start the optional subsystem server they need connect to; diff --git a/reactos/lib/smdll/smdll.def b/reactos/lib/smdll/smdll.def index 0822d1a05bc..0c2e91eb482 100644 --- a/reactos/lib/smdll/smdll.def +++ b/reactos/lib/smdll/smdll.def @@ -2,4 +2,4 @@ LIBRARY SMDLL.DLL EXPORTS SmCompleteSession@12 SmConnectApiPort@16 -SmExecPgm@8 \ No newline at end of file +SmExecuteProgram@8 From 518763e60041b39f361681a6e71f714f2f5c5351 Mon Sep 17 00:00:00 2001 From: Alex Ionescu Date: Tue, 8 Feb 2005 01:46:01 +0000 Subject: [PATCH 148/185] FreeLdr Patch. Now fully loads ntoskrnl using a PE Loader, supports /3gb dynamically but this is NOT enabled yet, so please continue using the 3GB entry in config until r2 is ready which will support relocation and remove the config entry. You must also supply /3GB to the commandline if you're using 3GB, just like since the previous patch. Also freeldr now uses w32api headers. Janitors will clean the dupes up. Thank you: Mike, Royce, Hartmut, Blight, Filip and everyone who reviewed. Hartmut, if anything is missing from the patch you sent me, feel free to add it. More info at http://blogs.reactos.com/Alex_Ionescu. svn path=/trunk/; revision=13462 --- reactos/boot/freeldr/freeldr/Makefile | 4 +- .../boot/freeldr/freeldr/arch/i386/archmach.c | 6 +- .../boot/freeldr/freeldr/arch/i386/hardware.c | 490 ++++---- .../boot/freeldr/freeldr/arch/i386/hardware.h | 159 +-- .../boot/freeldr/freeldr/arch/i386/hwacpi.c | 16 +- .../boot/freeldr/freeldr/arch/i386/hwapm.c | 8 +- .../boot/freeldr/freeldr/arch/i386/hwcpu.c | 198 ++-- .../boot/freeldr/freeldr/arch/i386/hwpci.c | 94 +- .../boot/freeldr/freeldr/arch/i386/i386disk.c | 14 +- .../boot/freeldr/freeldr/arch/i386/i386rtl.c | 3 - .../boot/freeldr/freeldr/arch/i386/i386vid.c | 46 +- .../boot/freeldr/freeldr/arch/i386/machpc.h | 26 +- .../boot/freeldr/freeldr/arch/i386/machxbox.h | 30 +- reactos/boot/freeldr/freeldr/arch/i386/mb.S | 166 +-- .../boot/freeldr/freeldr/arch/i386/pcdisk.c | 56 +- .../boot/freeldr/freeldr/arch/i386/pcmem.c | 20 +- .../boot/freeldr/freeldr/arch/i386/pcrtc.c | 2 +- .../boot/freeldr/freeldr/arch/i386/pcvideo.c | 178 +-- .../boot/freeldr/freeldr/arch/i386/portio.c | 92 +- .../boot/freeldr/freeldr/arch/i386/xboxcons.c | 6 +- .../boot/freeldr/freeldr/arch/i386/xboxdisk.c | 200 ++-- .../boot/freeldr/freeldr/arch/i386/xboxfont.c | 2 +- .../boot/freeldr/freeldr/arch/i386/xboxmem.c | 26 +- .../boot/freeldr/freeldr/arch/i386/xboxrtc.c | 2 +- .../freeldr/freeldr/arch/i386/xboxvideo.c | 76 +- reactos/boot/freeldr/freeldr/bootmgr.c | 26 +- .../boot/freeldr/freeldr/cache/blocklist.c | 8 +- reactos/boot/freeldr/freeldr/cache/cache.c | 38 +- reactos/boot/freeldr/freeldr/cache/cm.h | 22 +- reactos/boot/freeldr/freeldr/cmdline.c | 2 +- reactos/boot/freeldr/freeldr/comm/rs232.c | 26 +- reactos/boot/freeldr/freeldr/custom.c | 24 +- reactos/boot/freeldr/freeldr/disk/disk.c | 10 +- reactos/boot/freeldr/freeldr/disk/partition.c | 20 +- reactos/boot/freeldr/freeldr/drivemap.c | 32 +- reactos/boot/freeldr/freeldr/fs/ext2.c | 142 +-- reactos/boot/freeldr/freeldr/fs/ext2.h | 258 ++--- reactos/boot/freeldr/freeldr/fs/fat.c | 128 +-- reactos/boot/freeldr/freeldr/fs/fat.h | 204 ++-- reactos/boot/freeldr/freeldr/fs/fs.c | 50 +- reactos/boot/freeldr/freeldr/fs/fsrec.c | 12 +- reactos/boot/freeldr/freeldr/fs/fsrec.h | 10 +- reactos/boot/freeldr/freeldr/fs/iso.c | 44 +- reactos/boot/freeldr/freeldr/fs/iso.h | 50 +- reactos/boot/freeldr/freeldr/fs/ntfs.c | 116 +- reactos/boot/freeldr/freeldr/fs/ntfs.h | 198 ++-- .../boot/freeldr/freeldr/include/bootmgr.h | 6 +- reactos/boot/freeldr/freeldr/include/cache.h | 8 +- .../boot/freeldr/freeldr/include/cmdline.h | 4 +- reactos/boot/freeldr/freeldr/include/comm.h | 2 +- reactos/boot/freeldr/freeldr/include/disk.h | 72 +- .../boot/freeldr/freeldr/include/drivemap.h | 8 +- .../boot/freeldr/freeldr/include/freeldr.h | 79 +- reactos/boot/freeldr/freeldr/include/fs.h | 12 +- .../boot/freeldr/freeldr/include/inffile.h | 34 +- .../boot/freeldr/freeldr/include/inifile.h | 16 +- reactos/boot/freeldr/freeldr/include/linux.h | 64 +- .../boot/freeldr/freeldr/include/machine.h | 26 +- reactos/boot/freeldr/freeldr/include/mm.h | 20 +- .../boot/freeldr/freeldr/include/multiboot.h | 139 ++- reactos/boot/freeldr/freeldr/include/oslist.h | 6 +- reactos/boot/freeldr/freeldr/include/portio.h | 48 +- .../boot/freeldr/freeldr/include/reactos.h | 10 +- reactos/boot/freeldr/freeldr/include/rtl.h | 20 +- reactos/boot/freeldr/freeldr/include/ui.h | 26 +- reactos/boot/freeldr/freeldr/include/video.h | 35 +- .../boot/freeldr/freeldr/inffile/inffile.c | 64 +- reactos/boot/freeldr/freeldr/inifile/ini.h | 34 +- .../boot/freeldr/freeldr/inifile/ini_init.c | 4 +- .../boot/freeldr/freeldr/inifile/inifile.c | 22 +- reactos/boot/freeldr/freeldr/inifile/parse.c | 76 +- reactos/boot/freeldr/freeldr/linuxboot.c | 18 +- reactos/boot/freeldr/freeldr/machine.c | 30 +- reactos/boot/freeldr/freeldr/miscboot.c | 14 +- reactos/boot/freeldr/freeldr/mm/mem.h | 40 +- reactos/boot/freeldr/freeldr/mm/meminit.c | 114 +- reactos/boot/freeldr/freeldr/mm/mm.c | 40 +- reactos/boot/freeldr/freeldr/multiboot.c | 891 +++++++++++---- reactos/boot/freeldr/freeldr/options.c | 4 +- reactos/boot/freeldr/freeldr/oslist.c | 26 +- .../boot/freeldr/freeldr/reactos/arcname.c | 8 +- .../boot/freeldr/freeldr/reactos/binhive.c | 236 ++-- .../boot/freeldr/freeldr/reactos/reactos.c | 1010 ++++++++--------- .../boot/freeldr/freeldr/reactos/registry.c | 124 +- .../boot/freeldr/freeldr/reactos/registry.h | 129 +-- .../boot/freeldr/freeldr/reactos/setupldr.c | 57 +- reactos/boot/freeldr/freeldr/rtl/list.c | 4 +- reactos/boot/freeldr/freeldr/rtl/string.c | 8 +- reactos/boot/freeldr/freeldr/ui/gui.c | 10 +- reactos/boot/freeldr/freeldr/ui/gui.h | 12 +- reactos/boot/freeldr/freeldr/ui/tui.c | 62 +- reactos/boot/freeldr/freeldr/ui/tui.h | 36 +- reactos/boot/freeldr/freeldr/ui/tuimenu.c | 34 +- reactos/boot/freeldr/freeldr/ui/ui.c | 56 +- reactos/boot/freeldr/freeldr/video/fade.c | 22 +- reactos/boot/freeldr/freeldr/video/palette.c | 8 +- reactos/boot/freeldr/freeldr/video/video.c | 2 +- reactos/hal/halx86/mp/mpsboot.asm | 30 +- reactos/hal/halx86/mp/processor_mp.c | 17 +- reactos/include/ntos/types.h | 3 + reactos/ntoskrnl/Makefile.i386 | 2 +- reactos/ntoskrnl/dbg/kdb.c | 4 +- reactos/ntoskrnl/include/internal/i386/ke.h | 19 +- reactos/ntoskrnl/include/internal/i386/mm.h | 9 - reactos/ntoskrnl/ke/i386/exp.c | 6 +- reactos/ntoskrnl/ke/i386/irq.c | 2 +- reactos/ntoskrnl/ke/i386/kernel.c | 13 +- reactos/ntoskrnl/ke/i386/tss.c | 16 +- reactos/ntoskrnl/ke/kthread.c | 10 +- reactos/ntoskrnl/ke/main.c | 47 +- reactos/ntoskrnl/mm/freelist.c | 11 + reactos/ntoskrnl/mm/i386/page.c | 89 -- reactos/ntoskrnl/mm/mminit.c | 23 +- 113 files changed, 3822 insertions(+), 3649 deletions(-) diff --git a/reactos/boot/freeldr/freeldr/Makefile b/reactos/boot/freeldr/freeldr/Makefile index 8cde4f77eb8..b44ba98a800 100644 --- a/reactos/boot/freeldr/freeldr/Makefile +++ b/reactos/boot/freeldr/freeldr/Makefile @@ -83,7 +83,7 @@ setup_loader : setupldr.sys $(CP) setupldr.sys $(BOOTCD_DIR)/disk/loader/setupldr.sys -COMPILER_OPTIONS = -Wall -Werror -nostdlib -nostdinc -ffreestanding -fno-builtin -fno-inline \ +COMPILER_OPTIONS = -Wall -Werror -nostdlib -ffreestanding -fno-builtin -fno-inline \ -fno-zero-initialized-in-bss -O1 -MD # FreeLoader does not use any of the standard libraries, includes, or built-in functions @@ -95,7 +95,7 @@ endif COMPILER_DEFINES = -D__$(TARGET)__ $(COMPILER_DEBUG_DEFINES) -COMPILER_INCLUDES = -I$(SRCDIR)/include -I$(PATH_TO_TOP)/include +COMPILER_INCLUDES = -I$(SRCDIR)/include -I$(PATH_TO_TOP)/w32api/include -I$(PATH_TO_TOP)/include -I$(PATH_TO_TOP)/ntoskrnl/include CFLAGS = $(COMPILER_OPTIONS) \ $(COMPILER_DEFINES) \ diff --git a/reactos/boot/freeldr/freeldr/arch/i386/archmach.c b/reactos/boot/freeldr/freeldr/arch/i386/archmach.c index ad503bd2e05..347d8f56e22 100644 --- a/reactos/boot/freeldr/freeldr/arch/i386/archmach.c +++ b/reactos/boot/freeldr/freeldr/arch/i386/archmach.c @@ -29,14 +29,14 @@ VOID MachInit(VOID) { - U32 PciId; + ULONG PciId; memset(&MachVtbl, 0, sizeof(MACHVTBL)); /* Check for Xbox by identifying device at PCI 0:0:0, if it's * 0x10de/0x02a5 then we're running on an Xbox */ - WRITE_PORT_ULONG((U32*) 0xcf8, CONFIG_CMD(0, 0, 0)); - PciId = READ_PORT_ULONG((U32*) 0xcfc); + WRITE_PORT_ULONG((ULONG*) 0xcf8, CONFIG_CMD(0, 0, 0)); + PciId = READ_PORT_ULONG((ULONG*) 0xcfc); if (0x02a510de == PciId) { XboxMachInit(); diff --git a/reactos/boot/freeldr/freeldr/arch/i386/hardware.c b/reactos/boot/freeldr/freeldr/arch/i386/hardware.c index ec0b3b76f6d..71876f10abf 100644 --- a/reactos/boot/freeldr/freeldr/arch/i386/hardware.c +++ b/reactos/boot/freeldr/freeldr/arch/i386/hardware.c @@ -89,96 +89,43 @@ #define CONTROLLER_TIMEOUT 250 -typedef struct _CM_INT13_DRIVE_PARAMETER -{ - U16 DriveSelect; - U32 MaxCylinders; - U16 SectorsPerTrack; - U16 MaxHeads; - U16 NumberDrives; -} CM_INT13_DRIVE_PARAMETER, *PCM_INT13_DRIVE_PARAMETER; - - typedef struct _CM_DISK_GEOMETRY_DEVICE_DATA { - U32 BytesPerSector; - U32 NumberOfCylinders; - U32 SectorsPerTrack; - U32 NumberOfHeads; + ULONG BytesPerSector; + ULONG NumberOfCylinders; + ULONG SectorsPerTrack; + ULONG NumberOfHeads; } CM_DISK_GEOMETRY_DEVICE_DATA, *PCM_DISK_GEOMETRY_DEVICE_DATA; typedef struct _CM_PNP_BIOS_DEVICE_NODE { - U16 Size; - U8 Node; - U32 ProductId; - U8 DeviceType[3]; - U16 DeviceAttributes; + USHORT Size; + UCHAR Node; + ULONG ProductId; + UCHAR DeviceType[3]; + USHORT DeviceAttributes; } __attribute__((packed)) CM_PNP_BIOS_DEVICE_NODE, *PCM_PNP_BIOS_DEVICE_NODE; typedef struct _CM_PNP_BIOS_INSTALLATION_CHECK { - U8 Signature[4]; - U8 Revision; - U8 Length; - U16 ControlField; - U8 Checksum; - U32 EventFlagAddress; - U16 RealModeEntryOffset; - U16 RealModeEntrySegment; - U16 ProtectedModeEntryOffset; - U32 ProtectedModeCodeBaseAddress; - U32 OemDeviceId; - U16 RealModeDataBaseAddress; - U32 ProtectedModeDataBaseAddress; + UCHAR Signature[4]; + UCHAR Revision; + UCHAR Length; + USHORT ControlField; + UCHAR Checksum; + ULONG EventFlagAddress; + USHORT RealModeEntryOffset; + USHORT RealModeEntrySegment; + USHORT ProtectedModeEntryOffset; + ULONG ProtectedModeCodeBaseAddress; + ULONG OemDeviceId; + USHORT RealModeDataBaseAddress; + ULONG ProtectedModeDataBaseAddress; } __attribute__((packed)) CM_PNP_BIOS_INSTALLATION_CHECK, *PCM_PNP_BIOS_INSTALLATION_CHECK; -typedef struct _CM_SERIAL_DEVICE_DATA -{ - U16 Version; - U16 Revision; - U32 BaudClock; -} __attribute__((packed)) CM_SERIAL_DEVICE_DATA, *PCM_SERIAL_DEVICE_DATA; - - -typedef struct _CM_FLOPPY_DEVICE_DATA -{ - U16 Version; - U16 Revision; - CHAR Size[8]; - U32 MaxDensity; - U32 MountDensity; - - /* Version 2.0 data */ - U8 StepRateHeadUnloadTime; - U8 HeadLoadTime; - U8 MotorOffTime; - U8 SectorLengthCode; - U8 SectorPerTrack; - U8 ReadWriteGapLength; - U8 DataTransferLength; - U8 FormatGapLength; - U8 FormatFillCharacter; - U8 HeadSettleTime; - U8 MotorSettleTime; - U8 MaximumTrackValue; - U8 DataTransferRate; -} __attribute__((packed)) CM_FLOPPY_DEVICE_DATA, *PCM_FLOPPY_DEVICE_DATA; - - -typedef struct _CM_KEYBOARD_DEVICE_DATA -{ - U16 Version; - U16 Revision; - U8 Type; - U8 Subtype; - U16 KeyboardFlags; -} __attribute__((packed)) CM_KEYBOARD_DEVICE_DATA, *PCM_KEYBOARD_DEVICE_DATA; - - static char Hex[] = "0123456789ABCDEF"; static unsigned int delay_count = 1; @@ -187,28 +134,28 @@ static unsigned int delay_count = 1; static VOID -__KeStallExecutionProcessor(U32 Loops) +__StallExecutionProcessor(ULONG Loops) { register unsigned int i; for (i = 0; i < Loops; i++); } -VOID KeStallExecutionProcessor(U32 Microseconds) +VOID StallExecutionProcessor(ULONG Microseconds) { - U64 LoopCount = ((U64)delay_count * (U64)Microseconds) / 1000ULL; - __KeStallExecutionProcessor((U32)LoopCount); + ULONGLONG LoopCount = ((ULONGLONG)delay_count * (ULONGLONG)Microseconds) / 1000ULL; + __StallExecutionProcessor((ULONG)LoopCount); } -static U32 +static ULONG Read8254Timer(VOID) { - U32 Count; + ULONG Count; - WRITE_PORT_UCHAR((PU8)0x43, 0x00); - Count = READ_PORT_UCHAR((PU8)0x40); - Count |= READ_PORT_UCHAR((PU8)0x40) << 8; + WRITE_PORT_UCHAR((PUCHAR)0x43, 0x00); + Count = READ_PORT_UCHAR((PUCHAR)0x40); + Count |= READ_PORT_UCHAR((PUCHAR)0x40) << 8; return Count; } @@ -217,9 +164,9 @@ Read8254Timer(VOID) static VOID WaitFor8254Wraparound(VOID) { - U32 CurCount; - U32 PrevCount = ~0; - S32 Delta; + ULONG CurCount; + ULONG PrevCount = ~0; + LONG Delta; CurCount = Read8254Timer(); @@ -242,14 +189,14 @@ WaitFor8254Wraparound(VOID) VOID HalpCalibrateStallExecution(VOID) { - U32 i; - U32 calib_bit; - U32 CurCount; + ULONG i; + ULONG calib_bit; + ULONG CurCount; /* Initialise timer interrupt with MILLISECOND ms interval */ - WRITE_PORT_UCHAR((PU8)0x43, 0x34); /* binary, mode 2, LSB/MSB, ch 0 */ - WRITE_PORT_UCHAR((PU8)0x40, LATCH & 0xff); /* LSB */ - WRITE_PORT_UCHAR((PU8)0x40, LATCH >> 8); /* MSB */ + WRITE_PORT_UCHAR((PUCHAR)0x43, 0x34); /* binary, mode 2, LSB/MSB, ch 0 */ + WRITE_PORT_UCHAR((PUCHAR)0x40, LATCH & 0xff); /* LSB */ + WRITE_PORT_UCHAR((PUCHAR)0x40, LATCH >> 8); /* MSB */ /* Stage 1: Coarse calibration */ @@ -262,7 +209,7 @@ HalpCalibrateStallExecution(VOID) WaitFor8254Wraparound(); - __KeStallExecutionProcessor(delay_count); /* Do the delay */ + __StallExecutionProcessor(delay_count); /* Do the delay */ CurCount = Read8254Timer(); } while (CurCount > LATCH / 2); @@ -281,7 +228,7 @@ HalpCalibrateStallExecution(VOID) WaitFor8254Wraparound(); - __KeStallExecutionProcessor(delay_count); /* Do the delay */ + __StallExecutionProcessor(delay_count); /* Do the delay */ CurCount = Read8254Timer(); if (CurCount <= LATCH / 2) /* If a tick has passed, turn the */ @@ -294,13 +241,13 @@ HalpCalibrateStallExecution(VOID) VOID -SetComponentInformation(HKEY ComponentKey, - U32 Flags, - U32 Key, - U32 Affinity) +SetComponentInformation(FRLDRHKEY ComponentKey, + ULONG Flags, + ULONG Key, + ULONG Affinity) { CM_COMPONENT_INFORMATION CompInfo; - S32 Error; + LONG Error; CompInfo.Flags = Flags; CompInfo.Version = 0; @@ -311,7 +258,7 @@ SetComponentInformation(HKEY ComponentKey, Error = RegSetValue(ComponentKey, "Component Information", REG_BINARY, - (PU8)&CompInfo, + (PUCHAR)&CompInfo, sizeof(CM_COMPONENT_INFORMATION)); if (Error != ERROR_SUCCESS) { @@ -321,23 +268,23 @@ SetComponentInformation(HKEY ComponentKey, static VOID -DetectPnpBios(HKEY SystemKey, U32 *BusNumber) +DetectPnpBios(FRLDRHKEY SystemKey, ULONG *BusNumber) { PCM_FULL_RESOURCE_DESCRIPTOR FullResourceDescriptor; PCM_PNP_BIOS_DEVICE_NODE DeviceNode; PCM_PNP_BIOS_INSTALLATION_CHECK InstData; char Buffer[80]; - HKEY BusKey; - U32 x; - U32 NodeSize = 0; - U32 NodeCount = 0; - U8 NodeNumber; - U32 FoundNodeCount; + FRLDRHKEY BusKey; + ULONG x; + ULONG NodeSize = 0; + ULONG NodeCount = 0; + UCHAR NodeNumber; + ULONG FoundNodeCount; int i; - U32 PnpBufferSize; - U32 Size; + ULONG PnpBufferSize; + ULONG Size; char *Ptr; - S32 Error; + LONG Error; InstData = (PCM_PNP_BIOS_INSTALLATION_CHECK)PnpBiosSupported(); if (InstData == NULL || strncmp(InstData->Signature, "$PnP", 4)) @@ -388,7 +335,7 @@ DetectPnpBios(HKEY SystemKey, U32 *BusNumber) Error = RegSetValue(BusKey, "Identifier", REG_SZ, - (PU8)"PNP BIOS", + (PUCHAR)"PNP BIOS", 9); if (Error != ERROR_SUCCESS) { @@ -428,7 +375,7 @@ DetectPnpBios(HKEY SystemKey, U32 *BusNumber) PnpBufferSize = sizeof(CM_PNP_BIOS_INSTALLATION_CHECK); for (i = 0; i < 0xFF; i++) { - NodeNumber = (U8)i; + NodeNumber = (UCHAR)i; x = PnpBiosGetDeviceNode(&NodeNumber, (PVOID)DISKREADBUFFER); if (x == 0) @@ -466,7 +413,7 @@ DetectPnpBios(HKEY SystemKey, U32 *BusNumber) Error = RegSetValue(BusKey, "Configuration Data", REG_FULL_RESOURCE_DESCRIPTOR, - (PU8) FullResourceDescriptor, + (PUCHAR) FullResourceDescriptor, Size); MmFreeMemory(FullResourceDescriptor); if (Error != ERROR_SUCCESS) @@ -480,15 +427,15 @@ DetectPnpBios(HKEY SystemKey, U32 *BusNumber) static VOID -SetHarddiskConfigurationData(HKEY DiskKey, - U32 DriveNumber) +SetHarddiskConfigurationData(FRLDRHKEY DiskKey, + ULONG DriveNumber) { PCM_FULL_RESOURCE_DESCRIPTOR FullResourceDescriptor; PCM_DISK_GEOMETRY_DEVICE_DATA DiskGeometry; EXTENDED_GEOMETRY ExtGeometry; GEOMETRY Geometry; - U32 Size; - S32 Error; + ULONG Size; + LONG Error; /* Set 'Configuration Data' value */ Size = sizeof(CM_FULL_RESOURCE_DESCRIPTOR) + @@ -548,7 +495,7 @@ SetHarddiskConfigurationData(HKEY DiskKey, Error = RegSetValue(DiskKey, "Configuration Data", REG_FULL_RESOURCE_DESCRIPTOR, - (PU8) FullResourceDescriptor, + (PUCHAR) FullResourceDescriptor, Size); MmFreeMemory(FullResourceDescriptor); if (Error != ERROR_SUCCESS) @@ -561,16 +508,16 @@ SetHarddiskConfigurationData(HKEY DiskKey, static VOID -SetHarddiskIdentifier(HKEY DiskKey, - U32 DriveNumber) +SetHarddiskIdentifier(FRLDRHKEY DiskKey, + ULONG DriveNumber) { PMASTER_BOOT_RECORD Mbr; - U32 *Buffer; - U32 i; - U32 Checksum; - U32 Signature; + ULONG *Buffer; + ULONG i; + ULONG Checksum; + ULONG Signature; char Identifier[20]; - S32 Error; + LONG Error; /* Read the MBR */ if (!MachDiskReadLogicalSectors(DriveNumber, 0ULL, 1, (PVOID)DISKREADBUFFER)) @@ -579,7 +526,7 @@ SetHarddiskIdentifier(HKEY DiskKey, return; } - Buffer = (U32*)DISKREADBUFFER; + Buffer = (ULONG*)DISKREADBUFFER; Mbr = (PMASTER_BOOT_RECORD)DISKREADBUFFER; Signature = Mbr->Signature; @@ -621,7 +568,7 @@ SetHarddiskIdentifier(HKEY DiskKey, Error = RegSetValue(DiskKey, "Identifier", REG_SZ, - (PU8) Identifier, + (PUCHAR) Identifier, 20); if (Error != ERROR_SUCCESS) { @@ -633,18 +580,18 @@ SetHarddiskIdentifier(HKEY DiskKey, static VOID -DetectBiosDisks(HKEY SystemKey, - HKEY BusKey) +DetectBiosDisks(FRLDRHKEY SystemKey, + FRLDRHKEY BusKey) { PCM_FULL_RESOURCE_DESCRIPTOR FullResourceDescriptor; PCM_INT13_DRIVE_PARAMETER Int13Drives; GEOMETRY Geometry; CHAR Buffer[80]; - HKEY DiskKey; - U32 DiskCount; - U32 Size; - U32 i; - S32 Error; + FRLDRHKEY DiskKey; + ULONG DiskCount; + ULONG Size; + ULONG i; + LONG Error; BOOL Changed; /* Count the number of visible drives */ @@ -726,7 +673,7 @@ DetectBiosDisks(HKEY SystemKey, Error = RegSetValue(SystemKey, "Configuration Data", REG_FULL_RESOURCE_DESCRIPTOR, - (PU8) FullResourceDescriptor, + (PUCHAR) FullResourceDescriptor, Size); MmFreeMemory(FullResourceDescriptor); if (Error != ERROR_SUCCESS) @@ -762,10 +709,10 @@ DetectBiosDisks(HKEY SystemKey, } -static U32 +static ULONG GetFloppyCount(VOID) { - U8 Data; + UCHAR Data; WRITE_PORT_UCHAR((PUCHAR)0x70, 0x10); Data = READ_PORT_UCHAR((PUCHAR)0x71); @@ -774,10 +721,10 @@ GetFloppyCount(VOID) } -static U8 -GetFloppyType(U8 DriveNumber) +static UCHAR +GetFloppyType(UCHAR DriveNumber) { - U8 Data; + UCHAR Data; WRITE_PORT_UCHAR((PUCHAR)0x70, 0x10); Data = READ_PORT_UCHAR((PUCHAR)0x71); @@ -794,28 +741,28 @@ GetFloppyType(U8 DriveNumber) static PVOID GetInt1eTable(VOID) { - PU16 SegPtr = (PU16)0x7A; - PU16 OfsPtr = (PU16)0x78; + PUSHORT SegPtr = (PUSHORT)0x7A; + PUSHORT OfsPtr = (PUSHORT)0x78; - return (PVOID)(((U32)(*SegPtr)) << 4) + (U32)(*OfsPtr); + return (PVOID)(((ULONG)(*SegPtr)) << 4) + (ULONG)(*OfsPtr); } static VOID -DetectBiosFloppyPeripheral(HKEY ControllerKey) +DetectBiosFloppyPeripheral(FRLDRHKEY ControllerKey) { PCM_FULL_RESOURCE_DESCRIPTOR FullResourceDescriptor; PCM_PARTIAL_RESOURCE_DESCRIPTOR PartialDescriptor; PCM_FLOPPY_DEVICE_DATA FloppyData; char KeyName[32]; char Identifier[20]; - HKEY PeripheralKey; - U32 Size; - S32 Error; - U32 FloppyNumber; - U8 FloppyType; - U32 MaxDensity[6] = {0, 360, 1200, 720, 1440, 2880}; - PU8 Ptr; + FRLDRHKEY PeripheralKey; + ULONG Size; + LONG Error; + ULONG FloppyNumber; + UCHAR FloppyType; + ULONG MaxDensity[6] = {0, 360, 1200, 720, 1440, 2880}; + PUCHAR Ptr; for (FloppyNumber = 0; FloppyNumber < 2; FloppyNumber++) { @@ -882,7 +829,7 @@ DetectBiosFloppyPeripheral(HKEY ControllerKey) Error = RegSetValue(PeripheralKey, "Configuration Data", REG_FULL_RESOURCE_DESCRIPTOR, - (PU8) FullResourceDescriptor, + (PUCHAR) FullResourceDescriptor, Size); MmFreeMemory(FullResourceDescriptor); if (Error != ERROR_SUCCESS) @@ -898,7 +845,7 @@ DetectBiosFloppyPeripheral(HKEY ControllerKey) Error = RegSetValue(PeripheralKey, "Identifier", REG_SZ, - (PU8)Identifier, + (PUCHAR)Identifier, strlen(Identifier) + 1); if (Error != ERROR_SUCCESS) { @@ -911,15 +858,15 @@ DetectBiosFloppyPeripheral(HKEY ControllerKey) static VOID -DetectBiosFloppyController(HKEY SystemKey, - HKEY BusKey) +DetectBiosFloppyController(FRLDRHKEY SystemKey, + FRLDRHKEY BusKey) { PCM_FULL_RESOURCE_DESCRIPTOR FullResourceDescriptor; PCM_PARTIAL_RESOURCE_DESCRIPTOR PartialDescriptor; - HKEY ControllerKey; - U32 Size; - S32 Error; - U32 FloppyCount; + FRLDRHKEY ControllerKey; + ULONG Size; + LONG Error; + ULONG FloppyCount; FloppyCount = GetFloppyCount(); DbgPrint((DPRINT_HWDETECT, @@ -967,7 +914,8 @@ DetectBiosFloppyController(HKEY SystemKey, PartialDescriptor->Type = CmResourceTypePort; PartialDescriptor->ShareDisposition = CmResourceShareDeviceExclusive; PartialDescriptor->Flags = CM_RESOURCE_PORT_IO; - PartialDescriptor->u.Port.Start = (U64)0x03F0; + PartialDescriptor->u.Port.Start.LowPart = 0x03F0; + PartialDescriptor->u.Port.Start.HighPart = 0x0; PartialDescriptor->u.Port.Length = 8; /* Set Interrupt */ @@ -991,7 +939,7 @@ DetectBiosFloppyController(HKEY SystemKey, Error = RegSetValue(ControllerKey, "Configuration Data", REG_FULL_RESOURCE_DESCRIPTOR, - (PU8) FullResourceDescriptor, + (PUCHAR) FullResourceDescriptor, Size); MmFreeMemory(FullResourceDescriptor); if (Error != ERROR_SUCCESS) @@ -1007,8 +955,8 @@ DetectBiosFloppyController(HKEY SystemKey, static VOID -InitializeSerialPort(U32 Port, - U32 LineControl) +InitializeSerialPort(ULONG Port, + ULONG LineControl) { WRITE_PORT_UCHAR((PUCHAR)Port + 3, 0x80); /* set DLAB on */ WRITE_PORT_UCHAR((PUCHAR)Port, 0x60); /* speed LO byte */ @@ -1020,18 +968,18 @@ InitializeSerialPort(U32 Port, } -static U32 -DetectSerialMouse(U32 Port) +static ULONG +DetectSerialMouse(ULONG Port) { CHAR Buffer[4]; - U32 i; - U32 TimeOut = 200; - U8 LineControl; + ULONG i; + ULONG TimeOut = 200; + UCHAR LineControl; /* Shutdown mouse or something like that */ LineControl = READ_PORT_UCHAR((PUCHAR)Port + 4); WRITE_PORT_UCHAR((PUCHAR)Port + 4, (LineControl & ~0x02) | 0x01); - KeStallExecutionProcessor(100000); + StallExecutionProcessor(100000); /* Clear buffer */ while (READ_PORT_UCHAR((PUCHAR)Port + 5) & 0x01) @@ -1044,14 +992,14 @@ DetectSerialMouse(U32 Port) WRITE_PORT_UCHAR((PUCHAR)Port + 4, 0x0b); /* Wait 10 milliseconds for the mouse getting ready */ - KeStallExecutionProcessor(10000); + StallExecutionProcessor(10000); /* Read first four bytes, which contains Microsoft Mouse signs */ for (i = 0; i < 4; i++) { while (((READ_PORT_UCHAR((PUCHAR)Port + 5) & 1) == 0) && (TimeOut > 0)) { - KeStallExecutionProcessor(1000); + StallExecutionProcessor(1000); --TimeOut; if (TimeOut == 0) return MOUSE_TYPE_NONE; @@ -1107,29 +1055,29 @@ DetectSerialMouse(U32 Port) } -static U32 -GetSerialMousePnpId(U32 Port, char *Buffer) +static ULONG +GetSerialMousePnpId(ULONG Port, char *Buffer) { - U32 TimeOut; - U32 i = 0; + ULONG TimeOut; + ULONG i = 0; char c; char x; WRITE_PORT_UCHAR((PUCHAR)Port + 4, 0x09); /* Wait 10 milliseconds for the mouse getting ready */ - KeStallExecutionProcessor(10000); + StallExecutionProcessor(10000); WRITE_PORT_UCHAR((PUCHAR)Port + 4, 0x0b); - KeStallExecutionProcessor(10000); + StallExecutionProcessor(10000); for (;;) { TimeOut = 200; while (((READ_PORT_UCHAR((PUCHAR)Port + 5) & 1) == 0) && (TimeOut > 0)) { - KeStallExecutionProcessor(1000); + StallExecutionProcessor(1000); --TimeOut; if (TimeOut == 0) { @@ -1150,7 +1098,7 @@ GetSerialMousePnpId(U32 Port, char *Buffer) TimeOut = 200; while (((READ_PORT_UCHAR((PUCHAR)Port + 5) & 1) == 0) && (TimeOut > 0)) { - KeStallExecutionProcessor(1000); + StallExecutionProcessor(1000); --TimeOut; if (TimeOut == 0) return 0; @@ -1168,18 +1116,18 @@ GetSerialMousePnpId(U32 Port, char *Buffer) static VOID -DetectSerialPointerPeripheral(HKEY ControllerKey, - U32 Base) +DetectSerialPointerPeripheral(FRLDRHKEY ControllerKey, + ULONG Base) { CM_FULL_RESOURCE_DESCRIPTOR FullResourceDescriptor; char Buffer[256]; char Identifier[256]; - HKEY PeripheralKey; - U32 MouseType; - U32 Length; - U32 i; - U32 j; - S32 Error; + FRLDRHKEY PeripheralKey; + ULONG MouseType; + ULONG Length; + ULONG i; + ULONG j; + LONG Error; DbgPrint((DPRINT_HWDETECT, "DetectSerialPointerPeripheral()\n")); @@ -1332,7 +1280,7 @@ DetectSerialPointerPeripheral(HKEY ControllerKey, Error = RegSetValue(PeripheralKey, "Configuration Data", REG_FULL_RESOURCE_DESCRIPTOR, - (PU8)&FullResourceDescriptor, + (PUCHAR)&FullResourceDescriptor, sizeof(CM_FULL_RESOURCE_DESCRIPTOR) - sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR)); if (Error != ERROR_SUCCESS) @@ -1346,7 +1294,7 @@ DetectSerialPointerPeripheral(HKEY ControllerKey, Error = RegSetValue(PeripheralKey, "Identifier", REG_SZ, - (PU8)Identifier, + (PUCHAR)Identifier, strlen(Identifier) + 1); if (Error != ERROR_SUCCESS) { @@ -1359,28 +1307,28 @@ DetectSerialPointerPeripheral(HKEY ControllerKey, static VOID -DetectSerialPorts(HKEY BusKey) +DetectSerialPorts(FRLDRHKEY BusKey) { PCM_FULL_RESOURCE_DESCRIPTOR FullResourceDescriptor; PCM_PARTIAL_RESOURCE_DESCRIPTOR PartialDescriptor; PCM_SERIAL_DEVICE_DATA SerialDeviceData; - U32 Irq[4] = {4, 3, 4, 3}; - U32 Base; + ULONG Irq[4] = {4, 3, 4, 3}; + ULONG Base; char Buffer[80]; - PU16 BasePtr; - U32 ControllerNumber = 0; - HKEY ControllerKey; - U32 i; - S32 Error; - U32 Size; + PUSHORT BasePtr; + ULONG ControllerNumber = 0; + FRLDRHKEY ControllerKey; + ULONG i; + LONG Error; + ULONG Size; DbgPrint((DPRINT_HWDETECT, "DetectSerialPorts()\n")); ControllerNumber = 0; - BasePtr = (PU16)0x400; + BasePtr = (PUSHORT)0x400; for (i = 0; i < 4; i++, BasePtr++) { - Base = (U32)*BasePtr; + Base = (ULONG)*BasePtr; if (Base == 0) continue; @@ -1433,7 +1381,8 @@ DetectSerialPorts(HKEY BusKey) PartialDescriptor->Type = CmResourceTypePort; PartialDescriptor->ShareDisposition = CmResourceShareDeviceExclusive; PartialDescriptor->Flags = CM_RESOURCE_PORT_IO; - PartialDescriptor->u.Port.Start = (U64)Base; + PartialDescriptor->u.Port.Start.LowPart = Base; + PartialDescriptor->u.Port.Start.HighPart = 0x0; PartialDescriptor->u.Port.Length = 7; /* Set Interrupt */ @@ -1460,7 +1409,7 @@ DetectSerialPorts(HKEY BusKey) Error = RegSetValue(ControllerKey, "Configuration Data", REG_FULL_RESOURCE_DESCRIPTOR, - (PU8) FullResourceDescriptor, + (PUCHAR) FullResourceDescriptor, Size); MmFreeMemory(FullResourceDescriptor); if (Error != ERROR_SUCCESS) @@ -1477,7 +1426,7 @@ DetectSerialPorts(HKEY BusKey) Error = RegSetValue(ControllerKey, "Identifier", REG_SZ, - (PU8)Buffer, + (PUCHAR)Buffer, strlen(Buffer) + 1); if (Error != ERROR_SUCCESS) { @@ -1499,27 +1448,27 @@ DetectSerialPorts(HKEY BusKey) static VOID -DetectParallelPorts(HKEY BusKey) +DetectParallelPorts(FRLDRHKEY BusKey) { PCM_FULL_RESOURCE_DESCRIPTOR FullResourceDescriptor; PCM_PARTIAL_RESOURCE_DESCRIPTOR PartialDescriptor; - U32 Irq[3] = {7, 5, (U32)-1}; + ULONG Irq[3] = {7, 5, (ULONG)-1}; char Buffer[80]; - HKEY ControllerKey; - PU16 BasePtr; - U32 Base; - U32 ControllerNumber; - U32 i; - S32 Error; - U32 Size; + FRLDRHKEY ControllerKey; + PUSHORT BasePtr; + ULONG Base; + ULONG ControllerNumber; + ULONG i; + LONG Error; + ULONG Size; DbgPrint((DPRINT_HWDETECT, "DetectParallelPorts() called\n")); ControllerNumber = 0; - BasePtr = (PU16)0x408; + BasePtr = (PUSHORT)0x408; for (i = 0; i < 3; i++, BasePtr++) { - Base = (U32)*BasePtr; + Base = (ULONG)*BasePtr; if (Base == 0) continue; @@ -1551,7 +1500,7 @@ DetectParallelPorts(HKEY BusKey) /* Build full device descriptor */ Size = sizeof(CM_FULL_RESOURCE_DESCRIPTOR); - if (Irq[i] != (U32)-1) + if (Irq[i] != (ULONG)-1) Size += sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR); FullResourceDescriptor = MmAllocateMemory(Size); @@ -1566,18 +1515,19 @@ DetectParallelPorts(HKEY BusKey) /* Initialize resource descriptor */ FullResourceDescriptor->InterfaceType = Isa; FullResourceDescriptor->BusNumber = 0; - FullResourceDescriptor->PartialResourceList.Count = (Irq[i] != (U32)-1) ? 2 : 1; + FullResourceDescriptor->PartialResourceList.Count = (Irq[i] != (ULONG)-1) ? 2 : 1; /* Set IO Port */ PartialDescriptor = &FullResourceDescriptor->PartialResourceList.PartialDescriptors[0]; PartialDescriptor->Type = CmResourceTypePort; PartialDescriptor->ShareDisposition = CmResourceShareDeviceExclusive; PartialDescriptor->Flags = CM_RESOURCE_PORT_IO; - PartialDescriptor->u.Port.Start = (U64)Base; + PartialDescriptor->u.Port.Start.LowPart = Base; + PartialDescriptor->u.Port.Start.HighPart = 0x0; PartialDescriptor->u.Port.Length = 3; /* Set Interrupt */ - if (Irq[i] != (U32)-1) + if (Irq[i] != (ULONG)-1) { PartialDescriptor = &FullResourceDescriptor->PartialResourceList.PartialDescriptors[1]; PartialDescriptor->Type = CmResourceTypeInterrupt; @@ -1592,7 +1542,7 @@ DetectParallelPorts(HKEY BusKey) Error = RegSetValue(ControllerKey, "Configuration Data", REG_FULL_RESOURCE_DESCRIPTOR, - (PU8) FullResourceDescriptor, + (PUCHAR) FullResourceDescriptor, Size); MmFreeMemory(FullResourceDescriptor); if (Error != ERROR_SUCCESS) @@ -1609,7 +1559,7 @@ DetectParallelPorts(HKEY BusKey) Error = RegSetValue(ControllerKey, "Identifier", REG_SZ, - (PU8)Buffer, + (PUCHAR)Buffer, strlen(Buffer) + 1); if (Error != ERROR_SUCCESS) { @@ -1638,7 +1588,7 @@ DetectKeyboardDevice(VOID) WRITE_PORT_UCHAR((PUCHAR)CONTROLLER_REGISTER_DATA, 0xF2); - KeStallExecutionProcessor(10000); + StallExecutionProcessor(10000); Status = READ_PORT_UCHAR((PUCHAR)CONTROLLER_REGISTER_STATUS); if ((Status & 0x01) != 0x01) @@ -1654,7 +1604,7 @@ DetectKeyboardDevice(VOID) return FALSE; } - KeStallExecutionProcessor(10000); + StallExecutionProcessor(10000); Status = READ_PORT_UCHAR((PUCHAR)CONTROLLER_REGISTER_STATUS); if ((Status & 0x01) != 0x01) { @@ -1669,7 +1619,7 @@ DetectKeyboardDevice(VOID) return FALSE; } - KeStallExecutionProcessor(10000); + StallExecutionProcessor(10000); Status = READ_PORT_UCHAR((PUCHAR)CONTROLLER_REGISTER_STATUS); if ((Status & 0x01) != 0x01) { @@ -1690,15 +1640,15 @@ DetectKeyboardDevice(VOID) static VOID -DetectKeyboardPeripheral(HKEY ControllerKey) +DetectKeyboardPeripheral(FRLDRHKEY ControllerKey) { PCM_FULL_RESOURCE_DESCRIPTOR FullResourceDescriptor; PCM_PARTIAL_RESOURCE_DESCRIPTOR PartialDescriptor; PCM_KEYBOARD_DEVICE_DATA KeyboardData; - HKEY PeripheralKey; + FRLDRHKEY PeripheralKey; char Buffer[80]; - U32 Size; - S32 Error; + ULONG Size; + LONG Error; if (DetectKeyboardDevice()) { @@ -1752,7 +1702,7 @@ DetectKeyboardPeripheral(HKEY ControllerKey) Error = RegSetValue(PeripheralKey, "Configuration Data", REG_FULL_RESOURCE_DESCRIPTOR, - (PU8)FullResourceDescriptor, + (PUCHAR)FullResourceDescriptor, Size); MmFreeMemory(FullResourceDescriptor); if (Error != ERROR_SUCCESS) @@ -1768,7 +1718,7 @@ DetectKeyboardPeripheral(HKEY ControllerKey) Error = RegSetValue(ControllerKey, "Identifier", REG_SZ, - (PU8)Buffer, + (PUCHAR)Buffer, strlen(Buffer) + 1); if (Error != ERROR_SUCCESS) { @@ -1781,13 +1731,13 @@ DetectKeyboardPeripheral(HKEY ControllerKey) static VOID -DetectKeyboardController(HKEY BusKey) +DetectKeyboardController(FRLDRHKEY BusKey) { PCM_FULL_RESOURCE_DESCRIPTOR FullResourceDescriptor; PCM_PARTIAL_RESOURCE_DESCRIPTOR PartialDescriptor; - HKEY ControllerKey; - U32 Size; - S32 Error; + FRLDRHKEY ControllerKey; + ULONG Size; + LONG Error; /* Create controller key */ Error = RegCreateKey(BusKey, @@ -1837,7 +1787,8 @@ DetectKeyboardController(HKEY BusKey) PartialDescriptor->Type = CmResourceTypePort; PartialDescriptor->ShareDisposition = CmResourceShareDeviceExclusive; PartialDescriptor->Flags = CM_RESOURCE_PORT_IO; - PartialDescriptor->u.Port.Start = (U64)0x60; + PartialDescriptor->u.Port.Start.LowPart = 0x60; + PartialDescriptor->u.Port.Start.HighPart = 0x0; PartialDescriptor->u.Port.Length = 1; /* Set IO Port 0x64 */ @@ -1845,14 +1796,15 @@ DetectKeyboardController(HKEY BusKey) PartialDescriptor->Type = CmResourceTypePort; PartialDescriptor->ShareDisposition = CmResourceShareDeviceExclusive; PartialDescriptor->Flags = CM_RESOURCE_PORT_IO; - PartialDescriptor->u.Port.Start = (U64)0x64; + PartialDescriptor->u.Port.Start.LowPart = 0x64; + PartialDescriptor->u.Port.Start.HighPart = 0x0; PartialDescriptor->u.Port.Length = 1; /* Set 'Configuration Data' value */ Error = RegSetValue(ControllerKey, "Configuration Data", REG_FULL_RESOURCE_DESCRIPTOR, - (PU8)FullResourceDescriptor, + (PUCHAR)FullResourceDescriptor, Size); MmFreeMemory(FullResourceDescriptor); if (Error != ERROR_SUCCESS) @@ -1870,8 +1822,8 @@ DetectKeyboardController(HKEY BusKey) static VOID PS2ControllerWait(VOID) { - U32 Timeout; - U8 Status; + ULONG Timeout; + UCHAR Status; for (Timeout = 0; Timeout < CONTROLLER_TIMEOUT; Timeout++) { @@ -1880,7 +1832,7 @@ PS2ControllerWait(VOID) return; /* Sleep for one millisecond */ - KeStallExecutionProcessor(1000); + StallExecutionProcessor(1000); } } @@ -1888,9 +1840,9 @@ PS2ControllerWait(VOID) static BOOLEAN DetectPS2AuxPort(VOID) { - U32 Loops; - U8 Scancode; - U8 Status; + ULONG Loops; + UCHAR Scancode; + UCHAR Status; /* Put the value 0x5A in the output buffer using the * "WriteAuxiliary Device Output Buffer" command (0xD3). @@ -1922,7 +1874,7 @@ DetectPS2AuxPort(VOID) break; } - KeStallExecutionProcessor(10000); + StallExecutionProcessor(10000); } return FALSE; @@ -1932,8 +1884,8 @@ DetectPS2AuxPort(VOID) static BOOLEAN DetectPS2AuxDevice(VOID) { - U8 Scancode; - U8 Status; + UCHAR Scancode; + UCHAR Status; PS2ControllerWait(); WRITE_PORT_UCHAR((PUCHAR)CONTROLLER_REGISTER_CONTROL, @@ -1944,7 +1896,7 @@ DetectPS2AuxDevice(VOID) WRITE_PORT_UCHAR((PUCHAR)CONTROLLER_REGISTER_DATA, 0xF2); - KeStallExecutionProcessor(10000); + StallExecutionProcessor(10000); Status = READ_PORT_UCHAR((PUCHAR)CONTROLLER_REGISTER_STATUS); if ((Status & CONTROLLER_STATUS_MOUSE_OUTPUT_BUFFER_FULL) == 0) @@ -1956,7 +1908,7 @@ DetectPS2AuxDevice(VOID) if (Scancode != 0xFA) return FALSE; - KeStallExecutionProcessor(10000); + StallExecutionProcessor(10000); Status = READ_PORT_UCHAR((PUCHAR)CONTROLLER_REGISTER_STATUS); if ((Status & CONTROLLER_STATUS_MOUSE_OUTPUT_BUFFER_FULL) == 0) @@ -1973,12 +1925,12 @@ DetectPS2AuxDevice(VOID) static VOID -DetectPS2Mouse(HKEY BusKey) +DetectPS2Mouse(FRLDRHKEY BusKey) { CM_FULL_RESOURCE_DESCRIPTOR FullResourceDescriptor; - HKEY ControllerKey; - HKEY PeripheralKey; - S32 Error; + FRLDRHKEY ControllerKey; + FRLDRHKEY PeripheralKey; + LONG Error; if (DetectPS2AuxPort()) { @@ -2020,7 +1972,7 @@ DetectPS2Mouse(HKEY BusKey) Error = RegSetValue(ControllerKey, "Configuration Data", REG_FULL_RESOURCE_DESCRIPTOR, - (PU8)&FullResourceDescriptor, + (PUCHAR)&FullResourceDescriptor, sizeof(CM_FULL_RESOURCE_DESCRIPTOR)); if (Error != ERROR_SUCCESS) { @@ -2062,7 +2014,7 @@ DetectPS2Mouse(HKEY BusKey) Error = RegSetValue(PeripheralKey, "Configuration Data", REG_FULL_RESOURCE_DESCRIPTOR, - (PU8)&FullResourceDescriptor, + (PUCHAR)&FullResourceDescriptor, sizeof(CM_FULL_RESOURCE_DESCRIPTOR) - sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR)); if (Error != ERROR_SUCCESS) @@ -2077,7 +2029,7 @@ DetectPS2Mouse(HKEY BusKey) Error = RegSetValue(PeripheralKey, "Identifier", REG_SZ, - (PU8)"MICROSOFT PS2 MOUSE", + (PUCHAR)"MICROSOFT PS2 MOUSE", 20); if (Error != ERROR_SUCCESS) { @@ -2092,12 +2044,12 @@ DetectPS2Mouse(HKEY BusKey) static VOID -DetectDisplayController(HKEY BusKey) +DetectDisplayController(FRLDRHKEY BusKey) { CHAR Buffer[80]; - HKEY ControllerKey; - U16 VesaVersion; - S32 Error; + FRLDRHKEY ControllerKey; + USHORT VesaVersion; + LONG Error; Error = RegCreateKey(BusKey, "DisplayController\\0", @@ -2146,7 +2098,7 @@ DetectDisplayController(HKEY BusKey) Error = RegSetValue(ControllerKey, "Identifier", REG_SZ, - (PU8)Buffer, + (PUCHAR)Buffer, strlen(Buffer) + 1); if (Error != ERROR_SUCCESS) { @@ -2161,13 +2113,13 @@ DetectDisplayController(HKEY BusKey) static VOID -DetectIsaBios(HKEY SystemKey, U32 *BusNumber) +DetectIsaBios(FRLDRHKEY SystemKey, ULONG *BusNumber) { PCM_FULL_RESOURCE_DESCRIPTOR FullResourceDescriptor; char Buffer[80]; - HKEY BusKey; - U32 Size; - S32 Error; + FRLDRHKEY BusKey; + ULONG Size; + LONG Error; /* Create new bus key */ sprintf(Buffer, @@ -2194,7 +2146,7 @@ DetectIsaBios(HKEY SystemKey, U32 *BusNumber) Error = RegSetValue(BusKey, "Identifier", REG_SZ, - (PU8)"ISA", + (PUCHAR)"ISA", 4); if (Error != ERROR_SUCCESS) { @@ -2223,7 +2175,7 @@ DetectIsaBios(HKEY SystemKey, U32 *BusNumber) Error = RegSetValue(BusKey, "Configuration Data", REG_FULL_RESOURCE_DESCRIPTOR, - (PU8) FullResourceDescriptor, + (PUCHAR) FullResourceDescriptor, Size); MmFreeMemory(FullResourceDescriptor); if (Error != ERROR_SUCCESS) @@ -2256,9 +2208,9 @@ DetectIsaBios(HKEY SystemKey, U32 *BusNumber) VOID PcHwDetect(VOID) { - HKEY SystemKey; - U32 BusNumber = 0; - S32 Error; + FRLDRHKEY SystemKey; + ULONG BusNumber = 0; + LONG Error; DbgPrint((DPRINT_HWDETECT, "DetectHardware()\n")); diff --git a/reactos/boot/freeldr/freeldr/arch/i386/hardware.h b/reactos/boot/freeldr/freeldr/arch/i386/hardware.h index fe5720a5f29..49a39dd893d 100644 --- a/reactos/boot/freeldr/freeldr/arch/i386/hardware.h +++ b/reactos/boot/freeldr/freeldr/arch/i386/hardware.h @@ -25,91 +25,6 @@ #include "../../reactos/registry.h" #endif -typedef enum -{ - InterfaceTypeUndefined = -1, - Internal, - Isa, - Eisa, - MicroChannel, - TurboChannel, - PCIBus, - VMEBus, - NuBus, - PCMCIABus, - CBus, - MPIBus, - MPSABus, - ProcessorInternal, - InternalPowerBus, - PNPISABus, - MaximumInterfaceType -} INTERFACE_TYPE, *PINTERFACE_TYPE; - - -typedef enum _CM_RESOURCE_TYPE -{ - CmResourceTypeNull = 0, - CmResourceTypePort, - CmResourceTypeInterrupt, - CmResourceTypeMemory, - CmResourceTypeDma, - CmResourceTypeDeviceSpecific, - CmResourceTypeMaximum -} CM_RESOURCE_TYPE; - - -typedef enum _CM_SHARE_DISPOSITION -{ - CmResourceShareUndetermined = 0, - CmResourceShareDeviceExclusive, - CmResourceShareDriverExclusive, - CmResourceShareShared -} CM_SHARE_DISPOSITION; - - -typedef U64 PHYSICAL_ADDRESS; - - -typedef struct -{ - U8 Type; - U8 ShareDisposition; - U16 Flags; - union - { - struct - { - PHYSICAL_ADDRESS Start; - U32 Length; - } __attribute__((packed)) Port; - struct - { - U32 Level; - U32 Vector; - U32 Affinity; - } __attribute__((packed)) Interrupt; - struct - { - PHYSICAL_ADDRESS Start; - U32 Length; - } __attribute__((packed)) Memory; - struct - { - U32 Channel; - U32 Port; - U32 Reserved1; - } __attribute__((packed)) Dma; - struct - { - U32 DataSize; - U32 Reserved1; - U32 Reserved2; - } __attribute__((packed)) DeviceSpecificData; - } __attribute__((packed)) u; -} __attribute__((packed)) CM_PARTIAL_RESOURCE_DESCRIPTOR, *PCM_PARTIAL_RESOURCE_DESCRIPTOR; - - /* CM_PARTIAL_RESOURCE_DESCRIPTOR.Flags */ #define CM_RESOURCE_PORT_MEMORY 0x0000 #define CM_RESOURCE_PORT_IO 0x0001 @@ -117,30 +32,12 @@ typedef struct #define CM_RESOURCE_INTERRUPT_LEVEL_SENSITIVE 0x0000 #define CM_RESOURCE_INTERRUPT_LATCHED 0x0001 - -typedef struct -{ - U16 Version; - U16 Revision; - U32 Count; - CM_PARTIAL_RESOURCE_DESCRIPTOR PartialDescriptors[1]; -} __attribute__((packed))CM_PARTIAL_RESOURCE_LIST, *PCM_PARTIAL_RESOURCE_LIST; - - -typedef struct -{ - INTERFACE_TYPE InterfaceType; - U32 BusNumber; - CM_PARTIAL_RESOURCE_LIST PartialResourceList; -} __attribute__((packed)) CM_FULL_RESOURCE_DESCRIPTOR, *PCM_FULL_RESOURCE_DESCRIPTOR; - - typedef struct _CM_COMPONENT_INFORMATION { - U32 Flags; - U32 Version; - U32 Key; - U32 Affinity; + ULONG Flags; + ULONG Version; + ULONG Key; + ULONG Affinity; } __attribute__((packed)) CM_COMPONENT_INFORMATION, *PCM_COMPONENT_INFORMATION; @@ -154,46 +51,48 @@ typedef struct _CM_COMPONENT_INFORMATION #define Output 0x00000040 #define CONFIG_CMD(bus, dev_fn, where) \ - (0x80000000 | (((U32)(bus)) << 16) | (((dev_fn) & 0x1F) << 11) | (((dev_fn) & 0xE0) << 3) | ((where) & ~3)) + (0x80000000 | (((ULONG)(bus)) << 16) | (((dev_fn) & 0x1F) << 11) | (((dev_fn) & 0xE0) << 3) | ((where) & ~3)) /* PROTOTYPES ***************************************************************/ /* hardware.c */ -VOID HalpCalibrateStallExecution(VOID); -VOID KeStallExecutionProcessor(U32 Microseconds); -VOID SetComponentInformation(HKEY ComponentKey, - U32 Flags, - U32 Key, - U32 Affinity); +VOID StallExecutionProcessor(ULONG Microseconds); + +VOID HalpCalibrateStallExecution(VOID); + +VOID SetComponentInformation(FRLDRHKEY ComponentKey, + ULONG Flags, + ULONG Key, + ULONG Affinity); /* hwacpi.c */ -VOID DetectAcpiBios(HKEY SystemKey, U32 *BusNumber); +VOID DetectAcpiBios(FRLDRHKEY SystemKey, ULONG *BusNumber); /* hwapm.c */ -VOID DetectApmBios(HKEY SystemKey, U32 *BusNumber); +VOID DetectApmBios(FRLDRHKEY SystemKey, ULONG *BusNumber); /* hwcpu.c */ -VOID DetectCPUs(HKEY SystemKey); +VOID DetectCPUs(FRLDRHKEY SystemKey); /* hwpci.c */ -VOID DetectPciBios(HKEY SystemKey, U32 *BusNumber); +VOID DetectPciBios(FRLDRHKEY SystemKey, ULONG *BusNumber); /* i386cpu.S */ -U32 CpuidSupported(VOID); -VOID GetCpuid(U32 Level, - U32 *eax, - U32 *ebx, - U32 *ecx, - U32 *edx); -U64 RDTSC(VOID); +ULONG CpuidSupported(VOID); +VOID GetCpuid(ULONG Level, + ULONG *eax, + ULONG *ebx, + ULONG *ecx, + ULONG *edx); +ULONGLONG RDTSC(VOID); /* i386pnp.S */ -U32 PnpBiosSupported(VOID); -U32 PnpBiosGetDeviceNodeCount(U32 *NodeSize, - U32 *NodeCount); -U32 PnpBiosGetDeviceNode(U8 *NodeId, - U8 *NodeBuffer); +ULONG PnpBiosSupported(VOID); +ULONG PnpBiosGetDeviceNodeCount(ULONG *NodeSize, + ULONG *NodeCount); +ULONG PnpBiosGetDeviceNode(UCHAR *NodeId, + UCHAR *NodeBuffer); #endif /* __I386_HARDWARE_H_ */ diff --git a/reactos/boot/freeldr/freeldr/arch/i386/hwacpi.c b/reactos/boot/freeldr/freeldr/arch/i386/hwacpi.c index c8dacbc1a68..733f71a8a36 100644 --- a/reactos/boot/freeldr/freeldr/arch/i386/hwacpi.c +++ b/reactos/boot/freeldr/freeldr/arch/i386/hwacpi.c @@ -32,11 +32,11 @@ static BOOL FindAcpiBios(VOID) { - PU8 Ptr; + PUCHAR Ptr; /* Find the 'Root System Descriptor Table Pointer' */ - Ptr = (PU8)0xE0000; - while ((U32)Ptr < 0x100000) + Ptr = (PUCHAR)0xE0000; + while ((ULONG)Ptr < 0x100000) { if (!memcmp(Ptr, "RSD PTR ", 8)) { @@ -45,7 +45,7 @@ FindAcpiBios(VOID) return TRUE; } - Ptr = (PU8)((U32)Ptr + 0x10); + Ptr = (PUCHAR)((ULONG)Ptr + 0x10); } DbgPrint((DPRINT_HWDETECT, "ACPI not supported\n")); @@ -55,11 +55,11 @@ FindAcpiBios(VOID) VOID -DetectAcpiBios(HKEY SystemKey, U32 *BusNumber) +DetectAcpiBios(FRLDRHKEY SystemKey, ULONG *BusNumber) { char Buffer[80]; - HKEY BiosKey; - S32 Error; + FRLDRHKEY BiosKey; + LONG Error; if (FindAcpiBios()) { @@ -90,7 +90,7 @@ DetectAcpiBios(HKEY SystemKey, U32 *BusNumber) Error = RegSetValue(BiosKey, "Identifier", REG_SZ, - (PU8)"ACPI BIOS", + (PUCHAR)"ACPI BIOS", 10); if (Error != ERROR_SUCCESS) { diff --git a/reactos/boot/freeldr/freeldr/arch/i386/hwapm.c b/reactos/boot/freeldr/freeldr/arch/i386/hwapm.c index 7da6d7d48f4..a4c43b18247 100644 --- a/reactos/boot/freeldr/freeldr/arch/i386/hwapm.c +++ b/reactos/boot/freeldr/freeldr/arch/i386/hwapm.c @@ -60,11 +60,11 @@ FindApmBios(VOID) VOID -DetectApmBios(HKEY SystemKey, U32 *BusNumber) +DetectApmBios(FRLDRHKEY SystemKey, ULONG *BusNumber) { char Buffer[80]; - HKEY BiosKey; - S32 Error; + FRLDRHKEY BiosKey; + LONG Error; if (FindApmBios()) { @@ -95,7 +95,7 @@ DetectApmBios(HKEY SystemKey, U32 *BusNumber) Error = RegSetValue(BiosKey, "Identifier", REG_SZ, - (PU8)"APM", + (PUCHAR)"APM", 4); if (Error != ERROR_SUCCESS) { diff --git a/reactos/boot/freeldr/freeldr/arch/i386/hwcpu.c b/reactos/boot/freeldr/freeldr/arch/i386/hwcpu.c index 80ed3f482ed..072d60d7b7d 100644 --- a/reactos/boot/freeldr/freeldr/arch/i386/hwcpu.c +++ b/reactos/boot/freeldr/freeldr/arch/i386/hwcpu.c @@ -35,60 +35,60 @@ typedef struct _MP_FLOATING_POINT_TABLE { - U32 Signature; /* "_MP_" */ - U32 PhysicalAddressPointer; - U8 Length; - U8 SpecRev; - U8 Checksum; - U8 FeatureByte[5]; + ULONG Signature; /* "_MP_" */ + ULONG PhysicalAddressPointer; + UCHAR Length; + UCHAR SpecRev; + UCHAR Checksum; + UCHAR FeatureByte[5]; } PACKED MP_FLOATING_POINT_TABLE, *PMP_FLOATING_POINT_TABLE; typedef struct _MPS_CONFIG_TABLE_HEADER { - U32 Signature; /* "PCMP" */ - U16 BaseTableLength; - U8 SpecRev; - U8 Checksum; - U8 OemIdString[8]; - U8 ProductIdString[12]; - U32 OemTablePointer; - U16 OemTableLength; - U16 EntryCount; - U32 AddressOfLocalAPIC; - U16 ExtendedTableLength; - U8 ExtendedTableChecksum; - U8 Reserved; + ULONG Signature; /* "PCMP" */ + USHORT BaseTableLength; + UCHAR SpecRev; + UCHAR Checksum; + UCHAR OemIdString[8]; + UCHAR ProductIdString[12]; + ULONG OemTablePointer; + USHORT OemTableLength; + USHORT EntryCount; + ULONG AddressOfLocalAPIC; + USHORT ExtendedTableLength; + UCHAR ExtendedTableChecksum; + UCHAR Reserved; } PACKED MP_CONFIGURATION_TABLE, *PMP_CONFIGURATION_TABLE; typedef struct _MP_PROCESSOR_ENTRY { - U8 EntryType; - U8 LocalApicId; - U8 LocalApicVersion; - U8 CpuFlags; - U32 CpuSignature; - U32 FeatureFlags; - U32 Reserved1; - U32 Reserved2; + UCHAR EntryType; + UCHAR LocalApicId; + UCHAR LocalApicVersion; + UCHAR CpuFlags; + ULONG CpuSignature; + ULONG FeatureFlags; + ULONG Reserved1; + ULONG Reserved2; } PACKED MP_PROCESSOR_ENTRY, *PMP_PROCESSOR_ENTRY; /* FUNCTIONS ****************************************************************/ -static U32 +static ULONG GetCpuSpeed(VOID) { - U64 Timestamp1; - U64 Timestamp2; - U64 Diff; + ULONGLONG Timestamp1; + ULONGLONG Timestamp2; + ULONGLONG Diff; /* Read TSC (Time Stamp Counter) */ Timestamp1 = RDTSC(); /* Wait for 0.1 seconds (= 100 milliseconds = 100000 microseconds)*/ - KeStallExecutionProcessor(100000); + StallExecutionProcessor(100000); /* Read TSC (Time Stamp Counter) again */ Timestamp2 = RDTSC(); @@ -100,30 +100,30 @@ GetCpuSpeed(VOID) } else { - Diff = Timestamp2 + (((U64)-1) - Timestamp1); + Diff = Timestamp2 + (((ULONGLONG)-1) - Timestamp1); } - return (U32)(Diff / 100000); + return (ULONG)(Diff / 100000); } static VOID -DetectCPU(HKEY CpuKey, - HKEY FpuKey) +DetectCPU(FRLDRHKEY CpuKey, + FRLDRHKEY FpuKey) { char VendorIdentifier[13]; char Identifier[64]; - U32 FeatureSet; - HKEY CpuInstKey; - HKEY FpuInstKey; - U32 eax = 0; - U32 ebx = 0; - U32 ecx = 0; - U32 edx = 0; - U32 *Ptr; - S32 Error; + ULONG FeatureSet; + FRLDRHKEY CpuInstKey; + FRLDRHKEY FpuInstKey; + ULONG eax = 0; + ULONG ebx = 0; + ULONG ecx = 0; + ULONG edx = 0; + ULONG *Ptr; + LONG Error; BOOL SupportTSC = FALSE; - U32 CpuSpeed; + ULONG CpuSpeed; /* Create the CPU instance key */ @@ -154,7 +154,7 @@ DetectCPU(HKEY CpuKey, /* Get vendor identifier */ GetCpuid(0, &eax, &ebx, &ecx, &edx); VendorIdentifier[12] = 0; - Ptr = (U32*)&VendorIdentifier[0]; + Ptr = (ULONG*)&VendorIdentifier[0]; *Ptr = ebx; Ptr++; *Ptr = edx; @@ -195,8 +195,8 @@ DetectCPU(HKEY CpuKey, Error = RegSetValue(CpuInstKey, "FeatureSet", REG_DWORD, - (PU8)&FeatureSet, - sizeof(U32)); + (PUCHAR)&FeatureSet, + sizeof(ULONG)); if (Error != ERROR_SUCCESS) { DbgPrint((DPRINT_HWDETECT, "RegSetValue() failed (Error %u)\n", (int)Error)); @@ -208,7 +208,7 @@ DetectCPU(HKEY CpuKey, Error = RegSetValue(CpuInstKey, "Identifier", REG_SZ, - (PU8)Identifier, + (PUCHAR)Identifier, strlen(Identifier) + 1); if (Error != ERROR_SUCCESS) { @@ -218,7 +218,7 @@ DetectCPU(HKEY CpuKey, Error = RegSetValue(FpuInstKey, "Identifier", REG_SZ, - (PU8)Identifier, + (PUCHAR)Identifier, strlen(Identifier) + 1); if (Error != ERROR_SUCCESS) { @@ -231,7 +231,7 @@ DetectCPU(HKEY CpuKey, Error = RegSetValue(CpuInstKey, "VendorIdentifier", REG_SZ, - (PU8)VendorIdentifier, + (PUCHAR)VendorIdentifier, strlen(VendorIdentifier) + 1); if (Error != ERROR_SUCCESS) { @@ -250,8 +250,8 @@ DetectCPU(HKEY CpuKey, Error = RegSetValue(CpuInstKey, "~MHz", REG_DWORD, - (PU8)&CpuSpeed, - sizeof(U32)); + (PUCHAR)&CpuSpeed, + sizeof(ULONG)); if (Error != ERROR_SUCCESS) { DbgPrint((DPRINT_HWDETECT, "RegSetValue() failed (Error %u)\n", (int)Error)); @@ -261,23 +261,23 @@ DetectCPU(HKEY CpuKey, static VOID -SetMpsProcessor(HKEY CpuKey, - HKEY FpuKey, +SetMpsProcessor(FRLDRHKEY CpuKey, + FRLDRHKEY FpuKey, PMP_PROCESSOR_ENTRY CpuEntry) { char VendorIdentifier[13]; char Identifier[64]; char Buffer[8]; - U32 FeatureSet; - HKEY CpuInstKey; - HKEY FpuInstKey; - U32 eax = 0; - U32 ebx = 0; - U32 ecx = 0; - U32 edx = 0; - U32 *Ptr; - S32 Error; - U32 CpuSpeed; + ULONG FeatureSet; + FRLDRHKEY CpuInstKey; + FRLDRHKEY FpuInstKey; + ULONG eax = 0; + ULONG ebx = 0; + ULONG ecx = 0; + ULONG edx = 0; + ULONG *Ptr; + LONG Error; + ULONG CpuSpeed; /* Get processor instance number */ sprintf(Buffer, "%u", CpuEntry->LocalApicId); @@ -305,7 +305,7 @@ SetMpsProcessor(HKEY CpuKey, /* Get 'VendorIdentifier' */ GetCpuid(0, &eax, &ebx, &ecx, &edx); VendorIdentifier[12] = 0; - Ptr = (U32*)&VendorIdentifier[0]; + Ptr = (ULONG*)&VendorIdentifier[0]; *Ptr = ebx; Ptr++; *Ptr = edx; @@ -315,9 +315,9 @@ SetMpsProcessor(HKEY CpuKey, /* Get 'Identifier' */ sprintf(Identifier, "x86 Family %u Model %u Stepping %u", - (U32)((CpuEntry->CpuSignature >> 8) & 0x0F), - (U32)((CpuEntry->CpuSignature >> 4) & 0x0F), - (U32)(CpuEntry->CpuSignature & 0x0F)); + (ULONG)((CpuEntry->CpuSignature >> 8) & 0x0F), + (ULONG)((CpuEntry->CpuSignature >> 4) & 0x0F), + (ULONG)(CpuEntry->CpuSignature & 0x0F)); /* Get FeatureSet */ FeatureSet = CpuEntry->FeatureFlags; @@ -339,8 +339,8 @@ SetMpsProcessor(HKEY CpuKey, Error = RegSetValue(CpuInstKey, "FeatureSet", REG_DWORD, - (PU8)&FeatureSet, - sizeof(U32)); + (PUCHAR)&FeatureSet, + sizeof(ULONG)); if (Error != ERROR_SUCCESS) { DbgPrint((DPRINT_HWDETECT, "RegSetValue() failed (Error %u)\n", (int)Error)); @@ -352,7 +352,7 @@ SetMpsProcessor(HKEY CpuKey, Error = RegSetValue(CpuInstKey, "Identifier", REG_SZ, - (PU8)Identifier, + (PUCHAR)Identifier, strlen(Identifier) + 1); if (Error != ERROR_SUCCESS) { @@ -362,7 +362,7 @@ SetMpsProcessor(HKEY CpuKey, Error = RegSetValue(FpuInstKey, "Identifier", REG_SZ, - (PU8)Identifier, + (PUCHAR)Identifier, strlen(Identifier) + 1); if (Error != ERROR_SUCCESS) { @@ -375,7 +375,7 @@ SetMpsProcessor(HKEY CpuKey, Error = RegSetValue(CpuInstKey, "VendorIdentifier", REG_SZ, - (PU8)VendorIdentifier, + (PUCHAR)VendorIdentifier, strlen(VendorIdentifier) + 1); if (Error != ERROR_SUCCESS) { @@ -394,8 +394,8 @@ SetMpsProcessor(HKEY CpuKey, Error = RegSetValue(CpuInstKey, "~MHz", REG_DWORD, - (PU8)&CpuSpeed, - sizeof(U32)); + (PUCHAR)&CpuSpeed, + sizeof(ULONG)); if (Error != ERROR_SUCCESS) { DbgPrint((DPRINT_HWDETECT, "RegSetValue() failed (Error %u)\n", (int)Error)); @@ -409,12 +409,12 @@ GetMpFloatingPointTable(VOID) { PMP_FLOATING_POINT_TABLE FpTable; char *Ptr; - U8 Sum; - U32 Length; - U32 i; + UCHAR Sum; + ULONG Length; + ULONG i; FpTable = (PMP_FLOATING_POINT_TABLE)0xF0000; - while ((U32)FpTable < 0x100000) + while ((ULONG)FpTable < 0x100000) { if (FpTable->Signature == MP_FP_SIGNATURE) { @@ -440,7 +440,7 @@ GetMpFloatingPointTable(VOID) return FpTable; } - FpTable = (PMP_FLOATING_POINT_TABLE)((U32)FpTable + 0x10); + FpTable = (PMP_FLOATING_POINT_TABLE)((ULONG)FpTable + 0x10); } return NULL; @@ -452,9 +452,9 @@ GetMpConfigurationTable(PMP_FLOATING_POINT_TABLE FpTable) { PMP_CONFIGURATION_TABLE ConfigTable; char *Ptr; - U8 Sum; - U32 Length; - U32 i; + UCHAR Sum; + ULONG Length; + ULONG i; if (FpTable->FeatureByte[0] != 0 || FpTable->PhysicalAddressPointer == 0) @@ -466,7 +466,7 @@ GetMpConfigurationTable(PMP_FLOATING_POINT_TABLE FpTable) DbgPrint((DPRINT_HWDETECT, "MP Configuration Table at: %x\n", - (U32)ConfigTable)); + (ULONG)ConfigTable)); /* Calculate base table checksum */ Length = ConfigTable->BaseTableLength; @@ -498,14 +498,14 @@ GetMpConfigurationTable(PMP_FLOATING_POINT_TABLE FpTable) static BOOL -DetectMps(HKEY CpuKey, - HKEY FpuKey) +DetectMps(FRLDRHKEY CpuKey, + FRLDRHKEY FpuKey) { PMP_FLOATING_POINT_TABLE FpTable; PMP_CONFIGURATION_TABLE ConfigTable; PMP_PROCESSOR_ENTRY CpuEntry; char *Ptr; - U32 Offset; + ULONG Offset; /* Get floating point table */ FpTable = GetMpFloatingPointTable(); @@ -514,7 +514,7 @@ DetectMps(HKEY CpuKey, DbgPrint((DPRINT_HWDETECT, "MP Floating Point Table at: %x\n", - (U32)FpTable)); + (ULONG)FpTable)); if (FpTable->FeatureByte[0] == 0) { @@ -530,7 +530,7 @@ DetectMps(HKEY CpuKey, Offset = sizeof(MP_CONFIGURATION_TABLE); while (Offset < ConfigTable->BaseTableLength) { - Ptr = (char*)((U32)ConfigTable + Offset); + Ptr = (char*)((ULONG)ConfigTable + Offset); switch (*Ptr) { @@ -548,9 +548,9 @@ DetectMps(HKEY CpuKey, DbgPrint((DPRINT_HWDETECT, "Processor %u: x86 Family %u Model %u Stepping %u\n", CpuEntry->LocalApicId, - (U32)((CpuEntry->CpuSignature >> 8) & 0x0F), - (U32)((CpuEntry->CpuSignature >> 4) & 0x0F), - (U32)(CpuEntry->CpuSignature & 0x0F))); + (ULONG)((CpuEntry->CpuSignature >> 8) & 0x0F), + (ULONG)((CpuEntry->CpuSignature >> 4) & 0x0F), + (ULONG)(CpuEntry->CpuSignature & 0x0F))); SetMpsProcessor(CpuKey, FpuKey, CpuEntry); Offset += 0x14; @@ -577,7 +577,7 @@ DetectMps(HKEY CpuKey, break; default: - DbgPrint((DPRINT_HWDETECT, "Unknown Entry %u\n",(U32)*Ptr)); + DbgPrint((DPRINT_HWDETECT, "Unknown Entry %u\n",(ULONG)*Ptr)); return FALSE; } } @@ -599,11 +599,11 @@ DetectMps(HKEY CpuKey, VOID -DetectCPUs(HKEY SystemKey) +DetectCPUs(FRLDRHKEY SystemKey) { - HKEY CpuKey; - HKEY FpuKey; - S32 Error; + FRLDRHKEY CpuKey; + FRLDRHKEY FpuKey; + LONG Error; /* Create the 'CentralProcessor' key */ Error = RegCreateKey(SystemKey, diff --git a/reactos/boot/freeldr/freeldr/arch/i386/hwpci.c b/reactos/boot/freeldr/freeldr/arch/i386/hwpci.c index 2285a7f9391..c4cba0ad12c 100644 --- a/reactos/boot/freeldr/freeldr/arch/i386/hwpci.c +++ b/reactos/boot/freeldr/freeldr/arch/i386/hwpci.c @@ -30,40 +30,40 @@ typedef struct _ROUTING_SLOT { - U8 BusNumber; - U8 DeviceNumber; - U8 LinkA; - U16 BitmapA; - U8 LinkB; - U16 BitmapB; - U8 LinkC; - U16 BitmapC; - U8 LinkD; - U16 BitmapD; - U8 SlotNumber; - U8 Reserved; + UCHAR BusNumber; + UCHAR DeviceNumber; + UCHAR LinkA; + USHORT BitmapA; + UCHAR LinkB; + USHORT BitmapB; + UCHAR LinkC; + USHORT BitmapC; + UCHAR LinkD; + USHORT BitmapD; + UCHAR SlotNumber; + UCHAR Reserved; } __attribute__((packed)) ROUTING_SLOT, *PROUTING_SLOT; typedef struct _PCI_IRQ_ROUTING_TABLE { - U32 Signature; - U16 Version; - U16 Size; - U8 RouterBus; - U8 RouterSlot; - U16 ExclusiveIRQs; - U32 CompatibleRouter; - U32 MiniportData; - U8 Reserved[11]; - U8 Checksum; + ULONG Signature; + USHORT Version; + USHORT Size; + UCHAR RouterBus; + UCHAR RouterSlot; + USHORT ExclusiveIRQs; + ULONG CompatibleRouter; + ULONG MiniportData; + UCHAR Reserved[11]; + UCHAR Checksum; ROUTING_SLOT Slot[1]; } __attribute__((packed)) PCI_IRQ_ROUTING_TABLE, *PPCI_IRQ_ROUTING_TABLE; typedef struct _CM_PCI_BUS_DATA { - U8 BusCount; - U16 PciVersion; - U8 HardwareMechanism; + UCHAR BusCount; + USHORT PciVersion; + UCHAR HardwareMechanism; } __attribute__((packed)) CM_PCI_BUS_DATA, *PCM_PCI_BUS_DATA; @@ -71,19 +71,19 @@ static PPCI_IRQ_ROUTING_TABLE GetPciIrqRoutingTable(VOID) { PPCI_IRQ_ROUTING_TABLE Table; - PU8 Ptr; - U32 Sum; - U32 i; + PUCHAR Ptr; + ULONG Sum; + ULONG i; Table = (PPCI_IRQ_ROUTING_TABLE)0xF0000; - while ((U32)Table < 0x100000) + while ((ULONG)Table < 0x100000) { if (Table->Signature == 0x52495024) { DbgPrint((DPRINT_HWDETECT, "Found signature\n")); - Ptr = (PU8)Table; + Ptr = (PUCHAR)Table; Sum = 0; for (i = 0; i < Table->Size; i++) { @@ -103,7 +103,7 @@ GetPciIrqRoutingTable(VOID) return Table; } - Table = (PPCI_IRQ_ROUTING_TABLE)((U32)Table + 0x10); + Table = (PPCI_IRQ_ROUTING_TABLE)((ULONG)Table + 0x10); } return NULL; @@ -145,14 +145,14 @@ FindPciBios(PCM_PCI_BUS_DATA BusData) static VOID -DetectPciIrqRoutingTable(HKEY BusKey) +DetectPciIrqRoutingTable(FRLDRHKEY BusKey) { PCM_FULL_RESOURCE_DESCRIPTOR FullResourceDescriptor; PCM_PARTIAL_RESOURCE_DESCRIPTOR PartialDescriptor; PPCI_IRQ_ROUTING_TABLE Table; - HKEY TableKey; - U32 Size; - S32 Error; + FRLDRHKEY TableKey; + ULONG Size; + LONG Error; Table = GetPciIrqRoutingTable(); if (Table != NULL) @@ -178,7 +178,7 @@ DetectPciIrqRoutingTable(HKEY BusKey) Error = RegSetValue(TableKey, "Identifier", REG_SZ, - (PU8)"PCI Real-mode IRQ Routing Table", + (PUCHAR)"PCI Real-mode IRQ Routing Table", 32); if (Error != ERROR_SUCCESS) { @@ -216,7 +216,7 @@ DetectPciIrqRoutingTable(HKEY BusKey) Error = RegSetValue(TableKey, "Configuration Data", REG_FULL_RESOURCE_DESCRIPTOR, - (PU8) FullResourceDescriptor, + (PUCHAR) FullResourceDescriptor, Size); MmFreeMemory(FullResourceDescriptor); if (Error != ERROR_SUCCESS) @@ -231,17 +231,17 @@ DetectPciIrqRoutingTable(HKEY BusKey) VOID -DetectPciBios(HKEY SystemKey, U32 *BusNumber) +DetectPciBios(FRLDRHKEY SystemKey, ULONG *BusNumber) { PCM_FULL_RESOURCE_DESCRIPTOR FullResourceDescriptor; CM_PCI_BUS_DATA BusData; char Buffer[80]; - HKEY BiosKey; - U32 Size; - S32 Error; + FRLDRHKEY BiosKey; + ULONG Size; + LONG Error; #if 0 - HKEY BusKey; - U32 i; + FRLDRHKEY BusKey; + ULONG i; #endif /* Report the PCI BIOS */ @@ -272,7 +272,7 @@ DetectPciBios(HKEY SystemKey, U32 *BusNumber) Error = RegSetValue(BiosKey, "Identifier", REG_SZ, - (PU8)"PCI BIOS", + (PUCHAR)"PCI BIOS", 9); if (Error != ERROR_SUCCESS) { @@ -301,7 +301,7 @@ DetectPciBios(HKEY SystemKey, U32 *BusNumber) Error = RegSetValue(BiosKey, "Configuration Data", REG_FULL_RESOURCE_DESCRIPTOR, - (PU8) FullResourceDescriptor, + (PUCHAR) FullResourceDescriptor, Size); MmFreeMemory(FullResourceDescriptor); if (Error != ERROR_SUCCESS) @@ -322,7 +322,7 @@ DetectPciBios(HKEY SystemKey, U32 *BusNumber) */ /* Report PCI buses */ - for (i = 0; i < (U32)BusData.BusCount; i++) + for (i = 0; i < (ULONG)BusData.BusCount; i++) { sprintf(Buffer, "MultifunctionAdapter\\%u", *BusNumber); @@ -350,7 +350,7 @@ DetectPciBios(HKEY SystemKey, U32 *BusNumber) Error = RegSetValue(BusKey, "Identifier", REG_SZ, - (PU8)"PCI", + (PUCHAR)"PCI", 4); if (Error != ERROR_SUCCESS) { diff --git a/reactos/boot/freeldr/freeldr/arch/i386/i386disk.c b/reactos/boot/freeldr/freeldr/arch/i386/i386disk.c index 46c3116cc58..cc0bdb3ffc7 100644 --- a/reactos/boot/freeldr/freeldr/arch/i386/i386disk.c +++ b/reactos/boot/freeldr/freeldr/arch/i386/i386disk.c @@ -18,13 +18,7 @@ */ #include "freeldr.h" -#include "disk.h" -#include "rtl.h" -#include "arch.h" #include "debug.h" -#include "portio.h" -#include "machine.h" - ///////////////////////////////////////////////////////////////////////////////////////////// // FUNCTIONS @@ -32,7 +26,7 @@ #ifdef __i386__ -BOOL DiskResetController(U32 DriveNumber) +BOOL DiskResetController(ULONG DriveNumber) { REGS RegsIn; REGS RegsOut; @@ -55,7 +49,7 @@ BOOL DiskResetController(U32 DriveNumber) return INT386_SUCCESS(RegsOut); } -BOOL DiskInt13ExtensionsSupported(U32 DriveNumber) +BOOL DiskInt13ExtensionsSupported(ULONG DriveNumber) { REGS RegsIn; REGS RegsOut; @@ -133,11 +127,11 @@ VOID DiskStopFloppyMotor(VOID) WRITE_PORT_UCHAR((PUCHAR)0x3F2, 0); } -BOOL DiskGetExtendedDriveParameters(U32 DriveNumber, PVOID Buffer, U16 BufferSize) +BOOL DiskGetExtendedDriveParameters(ULONG DriveNumber, PVOID Buffer, USHORT BufferSize) { REGS RegsIn; REGS RegsOut; - PU16 Ptr = (PU16)(BIOSCALLBUFFER); + PUSHORT Ptr = (PUSHORT)(BIOSCALLBUFFER); DbgPrint((DPRINT_DISK, "DiskGetExtendedDriveParameters()\n")); diff --git a/reactos/boot/freeldr/freeldr/arch/i386/i386rtl.c b/reactos/boot/freeldr/freeldr/arch/i386/i386rtl.c index 281ffa37901..0612acee30e 100644 --- a/reactos/boot/freeldr/freeldr/arch/i386/i386rtl.c +++ b/reactos/boot/freeldr/freeldr/arch/i386/i386rtl.c @@ -18,9 +18,6 @@ */ #include -#include -#include -#include void beep(void) { diff --git a/reactos/boot/freeldr/freeldr/arch/i386/i386vid.c b/reactos/boot/freeldr/freeldr/arch/i386/i386vid.c index 59f5af2652f..6ee0e0a59e1 100644 --- a/reactos/boot/freeldr/freeldr/arch/i386/i386vid.c +++ b/reactos/boot/freeldr/freeldr/arch/i386/i386vid.c @@ -30,31 +30,31 @@ typedef struct { - U8 Signature[4]; // (ret) signature ("VESA") + UCHAR Signature[4]; // (ret) signature ("VESA") // (call) VESA 2.0 request signature ("VBE2"), required to receive // version 2.0 info - U16 VesaVersion; // VESA version number (one-digit minor version -- 0102h = v1.2) - U32 OemNamePtr; // pointer to OEM name + USHORT VesaVersion; // VESA version number (one-digit minor version -- 0102h = v1.2) + ULONG OemNamePtr; // pointer to OEM name // "761295520" for ATI - U32 Capabilities; // capabilities flags (see #00078) - U32 SupportedModeListPtr; // pointer to list of supported VESA and OEM video modes + ULONG Capabilities; // capabilities flags (see #00078) + ULONG SupportedModeListPtr; // pointer to list of supported VESA and OEM video modes // (list of words terminated with FFFFh) - U16 TotalVideoMemory; // total amount of video memory in 64K blocks + USHORT TotalVideoMemory; // total amount of video memory in 64K blocks // ---VBE v1.x --- - //U8 Reserved[236]; + //UCHAR Reserved[236]; // ---VBE v2.0 --- - U16 OemSoftwareVersion; // OEM software version (BCD, high byte = major, low byte = minor) - U32 VendorNamePtr; // pointer to vendor name - U32 ProductNamePtr; // pointer to product name - U32 ProductRevisionStringPtr; // pointer to product revision string - U16 VBE_AF_Version; // (if capabilities bit 3 set) VBE/AF version (BCD) + USHORT OemSoftwareVersion; // OEM software version (BCD, high byte = major, low byte = minor) + ULONG VendorNamePtr; // pointer to vendor name + ULONG ProductNamePtr; // pointer to product name + ULONG ProductRevisionStringPtr; // pointer to product revision string + USHORT VBE_AF_Version; // (if capabilities bit 3 set) VBE/AF version (BCD) // 0100h for v1.0P - U32 AcceleratedModeListPtr; // (if capabilities bit 3 set) pointer to list of supported + ULONG AcceleratedModeListPtr; // (if capabilities bit 3 set) pointer to list of supported // accelerated video modes (list of words terminated with FFFFh) - U8 Reserved[216]; // reserved for VBE implementation - U8 ScratchPad[256]; // OEM scratchpad (for OEM strings, etc.) + UCHAR Reserved[216]; // reserved for VBE implementation + UCHAR ScratchPad[256]; // OEM scratchpad (for OEM strings, etc.) } PACKED VESA_SVGA_INFO, *PVESA_SVGA_INFO; // Bitfields for VESA capabilities: @@ -106,11 +106,11 @@ VOID BiosSetVideoFont8x16(VOID) Int386(0x10, &Regs, &Regs); } -VOID VideoSetTextCursorPosition(U32 X, U32 Y) +VOID VideoSetTextCursorPosition(ULONG X, ULONG Y) { } -U32 VideoGetTextCursorPositionX(VOID) +ULONG VideoGetTextCursorPositionX(VOID) { REGS Regs; @@ -135,7 +135,7 @@ U32 VideoGetTextCursorPositionX(VOID) return Regs.b.dl; } -U32 VideoGetTextCursorPositionY(VOID) +ULONG VideoGetTextCursorPositionY(VOID) { REGS Regs; @@ -160,13 +160,13 @@ U32 VideoGetTextCursorPositionY(VOID) return Regs.b.dh; } -U16 BiosIsVesaSupported(VOID) +USHORT BiosIsVesaSupported(VOID) { REGS Regs; PVESA_SVGA_INFO SvgaInfo = (PVESA_SVGA_INFO)BIOSCALLBUFFER; #ifdef DEBUG - //U16* VideoModes; - //U16 Index; + //USHORT* VideoModes; + //USHORT Index; #endif // defined DEBUG DbgPrint((DPRINT_UI, "BiosIsVesaSupported()\n")); @@ -227,7 +227,7 @@ U16 BiosIsVesaSupported(VOID) DbgPrint((DPRINT_UI, "SvgaInfo->VBE/AF Version = 0x%x (BCD WORD)\n", SvgaInfo->VBE_AF_Version)); //DbgPrint((DPRINT_UI, "\nSupported VESA and OEM video modes:\n")); - //VideoModes = (U16*)SvgaInfo->SupportedModeListPtr; + //VideoModes = (USHORT*)SvgaInfo->SupportedModeListPtr; //for (Index=0; VideoModes[Index]!=0xFFFF; Index++) //{ // DbgPrint((DPRINT_UI, "Mode %d: 0x%x\n", Index, VideoModes[Index])); @@ -236,7 +236,7 @@ U16 BiosIsVesaSupported(VOID) //if (SvgaInfo->VesaVersion >= 0x0200) //{ // DbgPrint((DPRINT_UI, "\nSupported accelerated video modes (VESA v2.0):\n")); - // VideoModes = (U16*)SvgaInfo->AcceleratedModeListPtr; + // VideoModes = (USHORT*)SvgaInfo->AcceleratedModeListPtr; // for (Index=0; VideoModes[Index]!=0xFFFF; Index++) // { // DbgPrint((DPRINT_UI, "Mode %d: 0x%x\n", Index, VideoModes[Index])); diff --git a/reactos/boot/freeldr/freeldr/arch/i386/machpc.h b/reactos/boot/freeldr/freeldr/arch/i386/machpc.h index 656bf451d9b..5462a10effa 100644 --- a/reactos/boot/freeldr/freeldr/arch/i386/machpc.h +++ b/reactos/boot/freeldr/freeldr/arch/i386/machpc.h @@ -32,28 +32,28 @@ VOID PcConsPutChar(int Ch); BOOL PcConsKbHit(); int PcConsGetCh(); -VOID PcVideoClearScreen(U8 Attr); +VOID PcVideoClearScreen(UCHAR Attr); VIDEODISPLAYMODE PcVideoSetDisplayMode(char *DisplayMode, BOOL Init); -VOID PcVideoGetDisplaySize(PU32 Width, PU32 Height, PU32 Depth); -U32 PcVideoGetBufferSize(VOID); -VOID PcVideoSetTextCursorPosition(U32 X, U32 Y); +VOID PcVideoGetDisplaySize(PULONG Width, PULONG Height, PULONG Depth); +ULONG PcVideoGetBufferSize(VOID); +VOID PcVideoSetTextCursorPosition(ULONG X, ULONG Y); VOID PcVideoHideShowTextCursor(BOOL Show); -VOID PcVideoPutChar(int Ch, U8 Attr, unsigned X, unsigned Y); +VOID PcVideoPutChar(int Ch, UCHAR Attr, unsigned X, unsigned Y); VOID PcVideoCopyOffScreenBufferToVRAM(PVOID Buffer); BOOL PcVideoIsPaletteFixed(VOID); -VOID PcVideoSetPaletteColor(U8 Color, U8 Red, U8 Green, U8 Blue); -VOID PcVideoGetPaletteColor(U8 Color, U8* Red, U8* Green, U8* Blue); +VOID PcVideoSetPaletteColor(UCHAR Color, UCHAR Red, UCHAR Green, UCHAR Blue); +VOID PcVideoGetPaletteColor(UCHAR Color, UCHAR* Red, UCHAR* Green, UCHAR* Blue); VOID PcVideoSync(VOID); VOID PcVideoPrepareForReactOS(VOID); -U32 PcMemGetMemoryMap(PBIOS_MEMORY_MAP BiosMemoryMap, U32 MaxMemoryMapSize); +ULONG PcMemGetMemoryMap(PBIOS_MEMORY_MAP BiosMemoryMap, ULONG MaxMemoryMapSize); -BOOL PcDiskReadLogicalSectors(U32 DriveNumber, U64 SectorNumber, U32 SectorCount, PVOID Buffer); -BOOL PcDiskGetPartitionEntry(U32 DriveNumber, U32 PartitionNumber, PPARTITION_TABLE_ENTRY PartitionTableEntry); -BOOL PcDiskGetDriveGeometry(U32 DriveNumber, PGEOMETRY DriveGeometry); -U32 PcDiskGetCacheableBlockCount(U32 DriveNumber); +BOOL PcDiskReadLogicalSectors(ULONG DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer); +BOOL PcDiskGetPartitionEntry(ULONG DriveNumber, ULONG PartitionNumber, PPARTITION_TABLE_ENTRY PartitionTableEntry); +BOOL PcDiskGetDriveGeometry(ULONG DriveNumber, PGEOMETRY DriveGeometry); +ULONG PcDiskGetCacheableBlockCount(ULONG DriveNumber); -VOID PcRTCGetCurrentDateTime(PU32 Year, PU32 Month, PU32 Day, PU32 Hour, PU32 Minute, PU32 Second); +VOID PcRTCGetCurrentDateTime(PULONG Year, PULONG Month, PULONG Day, PULONG Hour, PULONG Minute, PULONG Second); VOID PcHwDetect(VOID); diff --git a/reactos/boot/freeldr/freeldr/arch/i386/machxbox.h b/reactos/boot/freeldr/freeldr/arch/i386/machxbox.h index 13ce64c94e5..845f242e8b0 100644 --- a/reactos/boot/freeldr/freeldr/arch/i386/machxbox.h +++ b/reactos/boot/freeldr/freeldr/arch/i386/machxbox.h @@ -24,7 +24,7 @@ #include "mm.h" #endif -U8 XboxFont8x16[256 * 16]; +UCHAR XboxFont8x16[256 * 16]; VOID XboxMachInit(VOID); @@ -33,30 +33,30 @@ BOOL XboxConsKbHit(); int XboxConsGetCh(); VOID XboxVideoInit(VOID); -VOID XboxVideoClearScreen(U8 Attr); +VOID XboxVideoClearScreen(UCHAR Attr); VIDEODISPLAYMODE XboxVideoSetDisplayMode(char *DisplayModem, BOOL Init); -VOID XboxVideoGetDisplaySize(PU32 Width, PU32 Height, PU32 Depth); -U32 XboxVideoGetBufferSize(VOID); -VOID XboxVideoSetTextCursorPosition(U32 X, U32 Y); +VOID XboxVideoGetDisplaySize(PULONG Width, PULONG Height, PULONG Depth); +ULONG XboxVideoGetBufferSize(VOID); +VOID XboxVideoSetTextCursorPosition(ULONG X, ULONG Y); VOID XboxVideoHideShowTextCursor(BOOL Show); -VOID XboxVideoPutChar(int Ch, U8 Attr, unsigned X, unsigned Y); +VOID XboxVideoPutChar(int Ch, UCHAR Attr, unsigned X, unsigned Y); VOID XboxVideoCopyOffScreenBufferToVRAM(PVOID Buffer); BOOL XboxVideoIsPaletteFixed(VOID); -VOID XboxVideoSetPaletteColor(U8 Color, U8 Red, U8 Green, U8 Blue); -VOID XboxVideoGetPaletteColor(U8 Color, U8* Red, U8* Green, U8* Blue); +VOID XboxVideoSetPaletteColor(UCHAR Color, UCHAR Red, UCHAR Green, UCHAR Blue); +VOID XboxVideoGetPaletteColor(UCHAR Color, UCHAR* Red, UCHAR* Green, UCHAR* Blue); VOID XboxVideoSync(VOID); VOID XboxVideoPrepareForReactOS(VOID); VOID XboxMemInit(VOID); -PVOID XboxMemReserveMemory(U32 MbToReserve); -U32 XboxMemGetMemoryMap(PBIOS_MEMORY_MAP BiosMemoryMap, U32 MaxMemoryMapSize); +PVOID XboxMemReserveMemory(ULONG MbToReserve); +ULONG XboxMemGetMemoryMap(PBIOS_MEMORY_MAP BiosMemoryMap, ULONG MaxMemoryMapSize); -BOOL XboxDiskReadLogicalSectors(U32 DriveNumber, U64 SectorNumber, U32 SectorCount, PVOID Buffer); -BOOL XboxDiskGetPartitionEntry(U32 DriveNumber, U32 PartitionNumber, PPARTITION_TABLE_ENTRY PartitionTableEntry); -BOOL XboxDiskGetDriveGeometry(U32 DriveNumber, PGEOMETRY DriveGeometry); -U32 XboxDiskGetCacheableBlockCount(U32 DriveNumber); +BOOL XboxDiskReadLogicalSectors(ULONG DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer); +BOOL XboxDiskGetPartitionEntry(ULONG DriveNumber, ULONG PartitionNumber, PPARTITION_TABLE_ENTRY PartitionTableEntry); +BOOL XboxDiskGetDriveGeometry(ULONG DriveNumber, PGEOMETRY DriveGeometry); +ULONG XboxDiskGetCacheableBlockCount(ULONG DriveNumber); -VOID XboxRTCGetCurrentDateTime(PU32 Year, PU32 Month, PU32 Day, PU32 Hour, PU32 Minute, PU32 Second); +VOID XboxRTCGetCurrentDateTime(PULONG Year, PULONG Month, PULONG Day, PULONG Hour, PULONG Minute, PULONG Second); VOID XboxHwDetect(VOID); diff --git a/reactos/boot/freeldr/freeldr/arch/i386/mb.S b/reactos/boot/freeldr/freeldr/arch/i386/mb.S index e77b380f4bb..78a3f49aeb2 100644 --- a/reactos/boot/freeldr/freeldr/arch/i386/mb.S +++ b/reactos/boot/freeldr/freeldr/arch/i386/mb.S @@ -29,116 +29,29 @@ * This boots the kernel */ .code32 -EXTERN(_boot_reactos) - call _MachVideoPrepareForReactOS + .globl _PageDirectoryStart + + .globl _startup_pagedirectory + .globl _lowmem_pagetable + .globl _kernel_pagetable + .globl _hyperspace_pagetable + .globl _apic_pagetable + .globl _kpcr_pagetable - call _multi_boot - - // Should never get here - cli -bootloop: - hlt - jmp bootloop - - - /* - * After you have setup the _mb_header and _mb_info structures - * then call this routine to transfer control to the kernel. - */ -EXTERN(_multi_boot) - - cli - - /* - * Load the absolute address of the multiboot information structure - */ - movl $_mb_info,%ebx - - /* - * Initalize eflags - */ - pushl $0 - popfl - - /* - * Load the multiboot magic value into eax - */ - movl $0x2badb002,%eax - - /* - * Jump to start of 32 bit code at 0xc0000000 + 0x1000 - */ - - pushl $KERNEL_CS - pushl _mb_entry_addr - lretl - - -EXTERN(_mb_header) -_mb_magic: - .long 0 // unsigned long magic; -_mb_flags: - .long 0 // unsigned long flags; -_mb_checksum: - .long 0 // unsigned long checksum; -_mb_header_addr: - .long 0 // unsigned long header_addr; -_mb_load_addr: - .long 0 // unsigned long load_addr; -_mb_load_end_addr: - .long 0 // unsigned long load_end_addr; -_mb_bss_end_addr: - .long 0 // unsigned long bss_end_addr; -_mb_entry_addr: - .long 0 // unsigned long entry_addr; + .globl _startup_pagedirectorytable_pae + .globl _startup_pagedirectory_pae + .globl _lowmem_pagetable_pae + .globl _kernel_pagetable_pae + .globl _hyperspace_pagetable_pae + .globl _apic_pagetable_pae + .globl _kpcr_pagetable_pae + + .globl _PageDirectoryEnd // // Boot information structure // -EXTERN(_mb_info) -_multiboot_flags: - .long 0 -_multiboot_mem_lower: - .long 0 -_multiboot_mem_upper: - .long 0 -_multiboot_boot_device: - .long 0 -_multiboot_cmdline: - .long 0 -_multiboot_mods_count: - .long 0 -_multiboot_mods_addr: - .long 0 -_multiboot_syms: - .rept 12 - .byte 0 - .endr -_multiboot_mmap_length: - .long 0 -_multiboot_mmap_addr: - .long 0 -_multiboot_drives_count: - .long 0 -_multiboot_drives_addr: - .long 0 -_multiboot_config_table: - .long 0 -_multiboot_boot_loader_name: - .long 0 -_multiboot_apm_table: - .long 0 - -EXTERN(_multiboot_modules) - .rept (64 * /*multiboot_module_size*/ 16) - .byte 0 - .endr -EXTERN(_multiboot_module_strings) - .rept (64*256) - .byte 0 - .endr - EXTERN(_multiboot_memory_map_descriptor_size) .long 0 @@ -147,7 +60,44 @@ EXTERN(_multiboot_memory_map) .byte 0 .endr -EXTERN(_multiboot_kernel_cmdline) - .rept 255 - .byte 0 - .endr +.bss +_PageDirectoryStart: +_startup_pagedirectory: + .fill 4096, 1, 0 + +_lowmem_pagetable: + .fill 4096, 1, 0 + +_kernel_pagetable: + .fill 2*4096, 1, 0 + +_hyperspace_pagetable: + .fill 4096, 1, 0 + +_apic_pagetable: + .fill 4096, 1, 0 + +_kpcr_pagetable: + .fill 4096, 1, 0 + +_startup_pagedirectory_pae: + .fill 4 * 4096, 1, 0 + +_lowmem_pagetable_pae: + .fill 2 * 4096, 1, 0 + +_kernel_pagetable_pae: + .fill 3*4096, 1, 0 + +_hyperspace_pagetable_pae: + .fill 2*4096, 1, 0 + +_apic_pagetable_pae: + .fill 2*4096, 1, 0 + +_kpcr_pagetable_pae: + .fill 4*4096, 1, 0 + +_startup_pagedirectorytable_pae: + .fill 4096, 1, 0 +_PageDirectoryEnd: diff --git a/reactos/boot/freeldr/freeldr/arch/i386/pcdisk.c b/reactos/boot/freeldr/freeldr/arch/i386/pcdisk.c index af2a8930cd0..5e344bbe3cf 100644 --- a/reactos/boot/freeldr/freeldr/arch/i386/pcdisk.c +++ b/reactos/boot/freeldr/freeldr/arch/i386/pcdisk.c @@ -29,13 +29,13 @@ typedef struct { - U8 PacketSize; // 00h - Size of packet (10h or 18h) - U8 Reserved; // 01h - Reserved (0) - U16 LBABlockCount; // 02h - Number of blocks to transfer (max 007Fh for Phoenix EDD) - U16 TransferBufferOffset; // 04h - Transfer buffer offset (seg:off) - U16 TransferBufferSegment; // Transfer buffer segment (seg:off) - U64 LBAStartBlock; // 08h - Starting absolute block number - U64 TransferBuffer64; // 10h - (EDD-3.0, optional) 64-bit flat address of transfer buffer + UCHAR PacketSize; // 00h - Size of packet (10h or 18h) + UCHAR Reserved; // 01h - Reserved (0) + USHORT LBABlockCount; // 02h - Number of blocks to transfer (max 007Fh for Phoenix EDD) + USHORT TransferBufferOffset; // 04h - Transfer buffer offset (seg:off) + USHORT TransferBufferSegment; // Transfer buffer segment (seg:off) + ULONGLONG LBAStartBlock; // 08h - Starting absolute block number + ULONGLONG TransferBuffer64; // 10h - (EDD-3.0, optional) 64-bit flat address of transfer buffer // used if DWORD at 04h is FFFFh:FFFFh } PACKED I386_DISK_ADDRESS_PACKET, *PI386_DISK_ADDRESS_PACKET; @@ -43,7 +43,7 @@ typedef struct // FUNCTIONS ///////////////////////////////////////////////////////////////////////////////////////////// -static BOOL PcDiskResetController(U32 DriveNumber) +static BOOL PcDiskResetController(ULONG DriveNumber) { REGS RegsIn; REGS RegsOut; @@ -66,11 +66,11 @@ static BOOL PcDiskResetController(U32 DriveNumber) return INT386_SUCCESS(RegsOut); } -static BOOL PcDiskReadLogicalSectorsLBA(U32 DriveNumber, U64 SectorNumber, U32 SectorCount, PVOID Buffer) +static BOOL PcDiskReadLogicalSectorsLBA(ULONG DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer) { REGS RegsIn; REGS RegsOut; - U32 RetryCount; + ULONG RetryCount; PI386_DISK_ADDRESS_PACKET Packet = (PI386_DISK_ADDRESS_PACKET)(BIOSCALLBUFFER); DbgPrint((DPRINT_DISK, "PcDiskReadLogicalSectorsLBA() DriveNumber: 0x%x SectorNumber: %I64d SectorCount: %d Buffer: 0x%x\n", DriveNumber, SectorNumber, SectorCount, Buffer)); @@ -86,8 +86,8 @@ static BOOL PcDiskReadLogicalSectorsLBA(U32 DriveNumber, U64 SectorNumber, U32 S Packet->PacketSize = sizeof(I386_DISK_ADDRESS_PACKET); Packet->Reserved = 0; Packet->LBABlockCount = SectorCount; - Packet->TransferBufferOffset = ((U32)Buffer) & 0x0F; - Packet->TransferBufferSegment = ((U32)Buffer) >> 4; + Packet->TransferBufferOffset = ((ULONG)Buffer) & 0x0F; + Packet->TransferBufferSegment = ((ULONG)Buffer) >> 4; Packet->LBAStartBlock = SectorNumber; Packet->TransferBuffer64 = 0; @@ -130,16 +130,16 @@ static BOOL PcDiskReadLogicalSectorsLBA(U32 DriveNumber, U64 SectorNumber, U32 S return FALSE; } -static BOOL PcDiskReadLogicalSectorsCHS(U32 DriveNumber, U64 SectorNumber, U32 SectorCount, PVOID Buffer) +static BOOL PcDiskReadLogicalSectorsCHS(ULONG DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer) { - U32 PhysicalSector; - U32 PhysicalHead; - U32 PhysicalTrack; + ULONG PhysicalSector; + ULONG PhysicalHead; + ULONG PhysicalTrack; GEOMETRY DriveGeometry; - U32 NumberOfSectorsToRead; + ULONG NumberOfSectorsToRead; REGS RegsIn; REGS RegsOut; - U32 RetryCount; + ULONG RetryCount; DbgPrint((DPRINT_DISK, "PcDiskReadLogicalSectorsCHS()\n")); @@ -215,8 +215,8 @@ static BOOL PcDiskReadLogicalSectorsCHS(U32 DriveNumber, U64 SectorNumber, U32 S RegsIn.b.cl = (PhysicalSector + ((PhysicalTrack & 0x300) >> 2)); RegsIn.b.dh = PhysicalHead; RegsIn.b.dl = DriveNumber; - RegsIn.w.es = ((U32)Buffer) >> 4; - RegsIn.w.bx = ((U32)Buffer) & 0x0F; + RegsIn.w.es = ((ULONG)Buffer) >> 4; + RegsIn.w.bx = ((ULONG)Buffer) & 0x0F; // // Perform the read @@ -266,9 +266,9 @@ static BOOL PcDiskReadLogicalSectorsCHS(U32 DriveNumber, U64 SectorNumber, U32 S return TRUE; } -static BOOL PcDiskInt13ExtensionsSupported(U32 DriveNumber) +static BOOL PcDiskInt13ExtensionsSupported(ULONG DriveNumber) { - static U32 LastDriveNumber = 0xffffffff; + static ULONG LastDriveNumber = 0xffffffff; static BOOL LastSupported; REGS RegsIn; REGS RegsOut; @@ -355,7 +355,7 @@ static BOOL PcDiskInt13ExtensionsSupported(U32 DriveNumber) return TRUE; } -BOOL PcDiskReadLogicalSectors(U32 DriveNumber, U64 SectorNumber, U32 SectorCount, PVOID Buffer) +BOOL PcDiskReadLogicalSectors(ULONG DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer) { DbgPrint((DPRINT_DISK, "PcDiskReadLogicalSectors() DriveNumber: 0x%x SectorNumber: %I64d SectorCount: %d Buffer: 0x%x\n", DriveNumber, SectorNumber, SectorCount, Buffer)); @@ -385,18 +385,18 @@ BOOL PcDiskReadLogicalSectors(U32 DriveNumber, U64 SectorNumber, U32 SectorCount } BOOL -PcDiskGetPartitionEntry(U32 DriveNumber, U32 PartitionNumber, PPARTITION_TABLE_ENTRY PartitionTableEntry) +PcDiskGetPartitionEntry(ULONG DriveNumber, ULONG PartitionNumber, PPARTITION_TABLE_ENTRY PartitionTableEntry) { /* Just use the standard routine */ return DiskGetPartitionEntry(DriveNumber, PartitionNumber, PartitionTableEntry); } BOOL -PcDiskGetDriveGeometry(U32 DriveNumber, PGEOMETRY Geometry) +PcDiskGetDriveGeometry(ULONG DriveNumber, PGEOMETRY Geometry) { REGS RegsIn; REGS RegsOut; - U32 Cylinders; + ULONG Cylinders; DbgPrint((DPRINT_DISK, "DiskGetDriveGeometry()\n")); @@ -442,8 +442,8 @@ PcDiskGetDriveGeometry(U32 DriveNumber, PGEOMETRY Geometry) return TRUE; } -U32 -PcDiskGetCacheableBlockCount(U32 DriveNumber) +ULONG +PcDiskGetCacheableBlockCount(ULONG DriveNumber) { GEOMETRY Geometry; diff --git a/reactos/boot/freeldr/freeldr/arch/i386/pcmem.c b/reactos/boot/freeldr/freeldr/arch/i386/pcmem.c index bb5b409ef64..e9da602bab6 100644 --- a/reactos/boot/freeldr/freeldr/arch/i386/pcmem.c +++ b/reactos/boot/freeldr/freeldr/arch/i386/pcmem.c @@ -28,12 +28,12 @@ #include "portio.h" #include "rtl.h" -static U32 +static ULONG PcMemGetExtendedMemorySize(VOID) { REGS RegsIn; REGS RegsOut; - U32 MemorySize; + ULONG MemorySize; DbgPrint((DPRINT_MEMORY, "GetExtendedMemorySize()\n")); @@ -119,7 +119,7 @@ PcMemGetExtendedMemorySize(VOID) return MemorySize; } -static U32 +static ULONG PcMemGetConventionalMemorySize(VOID) { REGS Regs; @@ -141,14 +141,14 @@ PcMemGetConventionalMemorySize(VOID) DbgPrint((DPRINT_MEMORY, "Int12h\n")); DbgPrint((DPRINT_MEMORY, "AX = 0x%x\n\n", Regs.w.ax)); - return (U32)Regs.w.ax; + return (ULONG)Regs.w.ax; } -static U32 -PcMemGetBiosMemoryMap(PBIOS_MEMORY_MAP BiosMemoryMap, U32 MaxMemoryMapSize) +static ULONG +PcMemGetBiosMemoryMap(PBIOS_MEMORY_MAP BiosMemoryMap, ULONG MaxMemoryMapSize) { REGS Regs; - U32 MapCount; + ULONG MapCount; DbgPrint((DPRINT_MEMORY, "GetBiosMemoryMap()\n")); @@ -225,10 +225,10 @@ PcMemGetBiosMemoryMap(PBIOS_MEMORY_MAP BiosMemoryMap, U32 MaxMemoryMapSize) return MapCount; } -U32 -PcMemGetMemoryMap(PBIOS_MEMORY_MAP BiosMemoryMap, U32 MaxMemoryMapSize) +ULONG +PcMemGetMemoryMap(PBIOS_MEMORY_MAP BiosMemoryMap, ULONG MaxMemoryMapSize) { - U32 EntryCount; + ULONG EntryCount; EntryCount = PcMemGetBiosMemoryMap(BiosMemoryMap, MaxMemoryMapSize); diff --git a/reactos/boot/freeldr/freeldr/arch/i386/pcrtc.c b/reactos/boot/freeldr/freeldr/arch/i386/pcrtc.c index aba3656703c..aad76981444 100644 --- a/reactos/boot/freeldr/freeldr/arch/i386/pcrtc.c +++ b/reactos/boot/freeldr/freeldr/arch/i386/pcrtc.c @@ -25,7 +25,7 @@ #define BCD_INT(bcd) (((bcd & 0xf0) >> 4) * 10 + (bcd &0x0f)) VOID -PcRTCGetCurrentDateTime(PU32 Year, PU32 Month, PU32 Day, PU32 Hour, PU32 Minute, PU32 Second) +PcRTCGetCurrentDateTime(PULONG Year, PULONG Month, PULONG Day, PULONG Hour, PULONG Minute, PULONG Second) { REGS Regs; diff --git a/reactos/boot/freeldr/freeldr/arch/i386/pcvideo.c b/reactos/boot/freeldr/freeldr/arch/i386/pcvideo.c index a4bf82079dd..2baac362952 100644 --- a/reactos/boot/freeldr/freeldr/arch/i386/pcvideo.c +++ b/reactos/boot/freeldr/freeldr/arch/i386/pcvideo.c @@ -56,69 +56,69 @@ typedef struct { - U16 ModeAttributes; /* mode attributes (see #00080) */ - U8 WindowAttributesA; /* window attributes, window A (see #00081) */ - U8 WindowsAttributesB; /* window attributes, window B (see #00081) */ - U16 WindowGranularity; /* window granularity in KB */ - U16 WindowSize; /* window size in KB */ - U16 WindowAStartSegment; /* start segment of window A (0000h if not supported) */ - U16 WindowBStartSegment; /* start segment of window B (0000h if not supported) */ - U32 WindowPositioningFunction; /* -> FAR window positioning function (equivalent to AX=4F05h) */ - U16 BytesPerScanLine; /* bytes per scan line */ + USHORT ModeAttributes; /* mode attributes (see #00080) */ + UCHAR WindowAttributesA; /* window attributes, window A (see #00081) */ + UCHAR WindowsAttributesB; /* window attributes, window B (see #00081) */ + USHORT WindowGranularity; /* window granularity in KB */ + USHORT WindowSize; /* window size in KB */ + USHORT WindowAStartSegment; /* start segment of window A (0000h if not supported) */ + USHORT WindowBStartSegment; /* start segment of window B (0000h if not supported) */ + ULONG WindowPositioningFunction; /* -> FAR window positioning function (equivalent to AX=4F05h) */ + USHORT BytesPerScanLine; /* bytes per scan line */ /* ---remainder is optional for VESA modes in v1.0/1.1, needed for OEM modes--- */ - U16 WidthInPixels; /* width in pixels (graphics) or characters (text) */ - U16 HeightInPixels; /* height in pixels (graphics) or characters (text) */ - U8 CharacterWidthInPixels; /* width of character cell in pixels */ - U8 CharacterHeightInPixels; /* height of character cell in pixels */ - U8 NumberOfMemoryPlanes; /* number of memory planes */ - U8 BitsPerPixel; /* number of bits per pixel */ - U8 NumberOfBanks; /* number of banks */ - U8 MemoryModel; /* memory model type (see #00082) */ - U8 BankSize; /* size of bank in KB */ - U8 NumberOfImagePanes; /* number of image pages (less one) that will fit in video RAM */ - U8 Reserved1; /* reserved (00h for VBE 1.0-2.0, 01h for VBE 3.0) */ + USHORT WidthInPixels; /* width in pixels (graphics) or characters (text) */ + USHORT HeightInPixels; /* height in pixels (graphics) or characters (text) */ + UCHAR CharacterWidthInPixels; /* width of character cell in pixels */ + UCHAR CharacterHeightInPixels; /* height of character cell in pixels */ + UCHAR NumberOfMemoryPlanes; /* number of memory planes */ + UCHAR BitsPerPixel; /* number of bits per pixel */ + UCHAR NumberOfBanks; /* number of banks */ + UCHAR MemoryModel; /* memory model type (see #00082) */ + UCHAR BankSize; /* size of bank in KB */ + UCHAR NumberOfImagePanes; /* number of image pages (less one) that will fit in video RAM */ + UCHAR Reserved1; /* reserved (00h for VBE 1.0-2.0, 01h for VBE 3.0) */ /* ---VBE v1.2+ --- */ - U8 RedMaskSize; /* red mask size */ - U8 RedMaskPosition; /* red field position */ - U8 GreenMaskSize; /* green mask size */ - U8 GreenMaskPosition; /* green field size */ - U8 BlueMaskSize; /* blue mask size */ - U8 BlueMaskPosition; /* blue field size */ - U8 ReservedMaskSize; /* reserved mask size */ - U8 ReservedMaskPosition; /* reserved mask position */ - U8 DirectColorModeInfo; /* direct color mode info */ + UCHAR RedMaskSize; /* red mask size */ + UCHAR RedMaskPosition; /* red field position */ + UCHAR GreenMaskSize; /* green mask size */ + UCHAR GreenMaskPosition; /* green field size */ + UCHAR BlueMaskSize; /* blue mask size */ + UCHAR BlueMaskPosition; /* blue field size */ + UCHAR ReservedMaskSize; /* reserved mask size */ + UCHAR ReservedMaskPosition; /* reserved mask position */ + UCHAR DirectColorModeInfo; /* direct color mode info */ /* bit 0:Color ramp is programmable */ /* bit 1:Bytes in reserved field may be used by application */ /* ---VBE v2.0+ --- */ - U32 LinearVideoBufferAddress; /* physical address of linear video buffer */ - U32 OffscreenMemoryPointer; /* pointer to start of offscreen memory */ - U16 OffscreenMemorySize; /* KB of offscreen memory */ + ULONG LinearVideoBufferAddress; /* physical address of linear video buffer */ + ULONG OffscreenMemoryPointer; /* pointer to start of offscreen memory */ + USHORT OffscreenMemorySize; /* KB of offscreen memory */ /* ---VBE v3.0 --- */ - U16 LinearBytesPerScanLine; /* bytes per scan line in linear modes */ - U8 BankedNumberOfImages; /* number of images (less one) for banked video modes */ - U8 LinearNumberOfImages; /* number of images (less one) for linear video modes */ - U8 LinearRedMaskSize; /* linear modes:Size of direct color red mask (in bits) */ - U8 LinearRedMaskPosition; /* linear modes:Bit position of red mask LSB (e.g. shift count) */ - U8 LinearGreenMaskSize; /* linear modes:Size of direct color green mask (in bits) */ - U8 LinearGreenMaskPosition; /* linear modes:Bit position of green mask LSB (e.g. shift count) */ - U8 LinearBlueMaskSize; /* linear modes:Size of direct color blue mask (in bits) */ - U8 LinearBlueMaskPosition; /* linear modes:Bit position of blue mask LSB (e.g. shift count) */ - U8 LinearReservedMaskSize; /* linear modes:Size of direct color reserved mask (in bits) */ - U8 LinearReservedMaskPosition; /* linear modes:Bit position of reserved mask LSB */ - U32 MaximumPixelClock; /* maximum pixel clock for graphics video mode, in Hz */ - U8 Reserved2[190]; /* 190 BYTEs reserved (0) */ + USHORT LinearBytesPerScanLine; /* bytes per scan line in linear modes */ + UCHAR BankedNumberOfImages; /* number of images (less one) for banked video modes */ + UCHAR LinearNumberOfImages; /* number of images (less one) for linear video modes */ + UCHAR LinearRedMaskSize; /* linear modes:Size of direct color red mask (in bits) */ + UCHAR LinearRedMaskPosition; /* linear modes:Bit position of red mask LSB (e.g. shift count) */ + UCHAR LinearGreenMaskSize; /* linear modes:Size of direct color green mask (in bits) */ + UCHAR LinearGreenMaskPosition; /* linear modes:Bit position of green mask LSB (e.g. shift count) */ + UCHAR LinearBlueMaskSize; /* linear modes:Size of direct color blue mask (in bits) */ + UCHAR LinearBlueMaskPosition; /* linear modes:Bit position of blue mask LSB (e.g. shift count) */ + UCHAR LinearReservedMaskSize; /* linear modes:Size of direct color reserved mask (in bits) */ + UCHAR LinearReservedMaskPosition; /* linear modes:Bit position of reserved mask LSB */ + ULONG MaximumPixelClock; /* maximum pixel clock for graphics video mode, in Hz */ + UCHAR Reserved2[190]; /* 190 BYTEs reserved (0) */ } PACKED SVGA_MODE_INFORMATION, *PSVGA_MODE_INFORMATION; -static U32 BiosVideoMode; /* Current video mode as known by BIOS */ -static U32 ScreenWidth = 80; /* Screen Width in characters */ -static U32 ScreenHeight = 25; /* Screen Height in characters */ -static U32 BytesPerScanLine = 160; /* Number of bytes per scanline (delta) */ +static ULONG BiosVideoMode; /* Current video mode as known by BIOS */ +static ULONG ScreenWidth = 80; /* Screen Width in characters */ +static ULONG ScreenHeight = 25; /* Screen Height in characters */ +static ULONG BytesPerScanLine = 160; /* Number of bytes per scanline (delta) */ static VIDEODISPLAYMODE DisplayMode = VideoTextMode; /* Current display mode */ static BOOL VesaVideoMode = FALSE; /* Are we using a VESA mode? */ static SVGA_MODE_INFORMATION VesaVideoModeInformation; /* Only valid when in VESA mode */ -static U32 CurrentMemoryBank = 0; /* Currently selected VESA bank */ +static ULONG CurrentMemoryBank = 0; /* Currently selected VESA bank */ -static U32 +static ULONG PcVideoDetectVideoCard(VOID) { REGS Regs; @@ -192,7 +192,7 @@ PcVideoDetectVideoCard(VOID) } } -static VOID PcVideoSetBiosMode(U32 VideoMode) +static VOID PcVideoSetBiosMode(ULONG VideoMode) { REGS Regs; @@ -297,7 +297,7 @@ VOID PcVideoDisableCursorEmulation(VOID) } static VOID -PcVideoDefineCursor(U32 StartScanLine, U32 EndScanLine) +PcVideoDefineCursor(ULONG StartScanLine, ULONG EndScanLine) { REGS Regs; @@ -333,7 +333,7 @@ PcVideoDefineCursor(U32 StartScanLine, U32 EndScanLine) } static VOID -PcVideoSetVerticalResolution(U32 ScanLines) +PcVideoSetVerticalResolution(ULONG ScanLines) { REGS Regs; @@ -439,7 +439,7 @@ PcVideoSetDisplayEnd(VOID) } static BOOL -PcVideoVesaGetSVGAModeInformation(U16 Mode, PSVGA_MODE_INFORMATION ModeInformation) +PcVideoVesaGetSVGAModeInformation(USHORT Mode, PSVGA_MODE_INFORMATION ModeInformation) { REGS Regs; @@ -511,7 +511,7 @@ PcVideoVesaGetSVGAModeInformation(U16 Mode, PSVGA_MODE_INFORMATION ModeInformati } static BOOL -PcVideoSetBiosVesaMode(U16 Mode) +PcVideoSetBiosVesaMode(USHORT Mode) { REGS Regs; @@ -697,7 +697,7 @@ PcVideoSetMode80x60(VOID) } static BOOL -PcVideoSetMode(U32 NewMode) +PcVideoSetMode(ULONG NewMode) { CurrentMemoryBank = 0; @@ -735,7 +735,7 @@ PcVideoSetMode(U32 NewMode) { /* 640x480x16 */ PcVideoSetBiosMode(NewMode); - WRITE_PORT_USHORT((U16*)0x03CE, 0x0F01); /* For some reason this is necessary? */ + WRITE_PORT_USHORT((USHORT*)0x03CE, 0x0F01); /* For some reason this is necessary? */ ScreenWidth = 640; ScreenHeight = 480; BytesPerScanLine = 80; @@ -830,7 +830,7 @@ PcVideoSetBlinkBit(BOOL Enable) } static VOID -PcVideoSetMemoryBank(U16 BankNumber) +PcVideoSetMemoryBank(USHORT BankNumber) { REGS Regs; @@ -870,7 +870,7 @@ PcVideoSetMemoryBank(U16 BankNumber) VIDEODISPLAYMODE PcVideoSetDisplayMode(char *DisplayModeName, BOOL Init) { - U32 VideoMode = VIDEOMODE_NORMAL_TEXT; + ULONG VideoMode = VIDEOMODE_NORMAL_TEXT; if (NULL == DisplayModeName || '\0' == *DisplayModeName) { @@ -927,7 +927,7 @@ PcVideoSetDisplayMode(char *DisplayModeName, BOOL Init) } VOID -PcVideoGetDisplaySize(PU32 Width, PU32 Height, PU32 Depth) +PcVideoGetDisplaySize(PULONG Width, PULONG Height, PULONG Depth) { *Width = ScreenWidth; *Height = ScreenHeight; @@ -950,14 +950,14 @@ PcVideoGetDisplaySize(PU32 Width, PU32 Height, PU32 Depth) } } -U32 +ULONG PcVideoGetBufferSize(VOID) { return ScreenHeight * BytesPerScanLine; } VOID -PcVideoSetTextCursorPosition(U32 X, U32 Y) +PcVideoSetTextCursorPosition(ULONG X, ULONG Y) { REGS Regs; @@ -997,10 +997,10 @@ PcVideoHideShowTextCursor(BOOL Show) VOID PcVideoCopyOffScreenBufferToVRAM(PVOID Buffer) { - U32 BanksToCopy; - U32 BytesInLastBank; - U32 CurrentBank; - U32 BankSize; + ULONG BanksToCopy; + ULONG BytesInLastBank; + ULONG CurrentBank; + ULONG BankSize; /* PcVideoWaitForVerticalRetrace(); */ @@ -1036,14 +1036,14 @@ PcVideoCopyOffScreenBufferToVRAM(PVOID Buffer) } VOID -PcVideoClearScreen(U8 Attr) +PcVideoClearScreen(UCHAR Attr) { - U16 AttrChar; - U16 *BufPtr; + USHORT AttrChar; + USHORT *BufPtr; - AttrChar = ((U16) Attr << 8) | ' '; - for (BufPtr = (U16 *) VIDEOTEXT_MEM_ADDRESS; - BufPtr < (U16 *) (VIDEOTEXT_MEM_ADDRESS + VIDEOTEXT_MEM_SIZE); + AttrChar = ((USHORT) Attr << 8) | ' '; + for (BufPtr = (USHORT *) VIDEOTEXT_MEM_ADDRESS; + BufPtr < (USHORT *) (VIDEOTEXT_MEM_ADDRESS + VIDEOTEXT_MEM_SIZE); BufPtr++) { *BufPtr = AttrChar; @@ -1051,12 +1051,12 @@ PcVideoClearScreen(U8 Attr) } VOID -PcVideoPutChar(int Ch, U8 Attr, unsigned X, unsigned Y) +PcVideoPutChar(int Ch, UCHAR Attr, unsigned X, unsigned Y) { - U16 *BufPtr; + USHORT *BufPtr; - BufPtr = (U16 *) (VIDEOTEXT_MEM_ADDRESS + Y * BytesPerScanLine + X * 2); - *BufPtr = ((U16) Attr << 8) | (Ch & 0xff); + BufPtr = (USHORT *) (VIDEOTEXT_MEM_ADDRESS + Y * BytesPerScanLine + X * 2); + *BufPtr = ((USHORT) Attr << 8) | (Ch & 0xff); } BOOL @@ -1066,27 +1066,27 @@ PcVideoIsPaletteFixed(VOID) } VOID -PcVideoSetPaletteColor(U8 Color, U8 Red, U8 Green, U8 Blue) +PcVideoSetPaletteColor(UCHAR Color, UCHAR Red, UCHAR Green, UCHAR Blue) { - WRITE_PORT_UCHAR((U8*) VIDEOPORT_PALETTE_WRITE, Color); - WRITE_PORT_UCHAR((U8*) VIDEOPORT_PALETTE_DATA, Red); - WRITE_PORT_UCHAR((U8*) VIDEOPORT_PALETTE_DATA, Green); - WRITE_PORT_UCHAR((U8*) VIDEOPORT_PALETTE_DATA, Blue); + WRITE_PORT_UCHAR((UCHAR*) VIDEOPORT_PALETTE_WRITE, Color); + WRITE_PORT_UCHAR((UCHAR*) VIDEOPORT_PALETTE_DATA, Red); + WRITE_PORT_UCHAR((UCHAR*) VIDEOPORT_PALETTE_DATA, Green); + WRITE_PORT_UCHAR((UCHAR*) VIDEOPORT_PALETTE_DATA, Blue); } VOID -PcVideoGetPaletteColor(U8 Color, U8* Red, U8* Green, U8* Blue) +PcVideoGetPaletteColor(UCHAR Color, UCHAR* Red, UCHAR* Green, UCHAR* Blue) { - WRITE_PORT_UCHAR((U8*) VIDEOPORT_PALETTE_READ, Color); - *Red = READ_PORT_UCHAR((U8*) VIDEOPORT_PALETTE_DATA); - *Green = READ_PORT_UCHAR((U8*) VIDEOPORT_PALETTE_DATA); - *Blue = READ_PORT_UCHAR((U8*) VIDEOPORT_PALETTE_DATA); + WRITE_PORT_UCHAR((UCHAR*) VIDEOPORT_PALETTE_READ, Color); + *Red = READ_PORT_UCHAR((UCHAR*) VIDEOPORT_PALETTE_DATA); + *Green = READ_PORT_UCHAR((UCHAR*) VIDEOPORT_PALETTE_DATA); + *Blue = READ_PORT_UCHAR((UCHAR*) VIDEOPORT_PALETTE_DATA); } VOID PcVideoSync(VOID) { - while (1 == (READ_PORT_UCHAR((U8*)VIDEOPORT_VERTICAL_RETRACE) & 0x08)) + while (1 == (READ_PORT_UCHAR((UCHAR*)VIDEOPORT_VERTICAL_RETRACE) & 0x08)) { /* * Keep reading the port until bit 3 is clear @@ -1096,7 +1096,7 @@ PcVideoSync(VOID) */ } - while (0 == (READ_PORT_UCHAR((U8*)VIDEOPORT_VERTICAL_RETRACE) & 0x08)) + while (0 == (READ_PORT_UCHAR((UCHAR*)VIDEOPORT_VERTICAL_RETRACE) & 0x08)) { /* * Keep reading the port until bit 3 is set diff --git a/reactos/boot/freeldr/freeldr/arch/i386/portio.c b/reactos/boot/freeldr/freeldr/arch/i386/portio.c index ba3361aa4df..feebd228414 100644 --- a/reactos/boot/freeldr/freeldr/arch/i386/portio.c +++ b/reactos/boot/freeldr/freeldr/arch/i386/portio.c @@ -51,37 +51,45 @@ #define SLOW_DOWN_IO __SLOW_DOWN_IO #endif -VOID /*STDCALL*/ +#undef READ_PORT_BUFFER_UCHAR +VOID +STDCALL READ_PORT_BUFFER_UCHAR (PUCHAR Port, PUCHAR Buffer, - U32 Count) + ULONG Count) { __asm__ __volatile__ ("cld ; rep ; insb\n\t" : "=D" (Buffer), "=c" (Count) : "d" (Port),"0" (Buffer),"1" (Count)); } -VOID /*STDCALL*/ -READ_PORT_BUFFER_USHORT (U16* Port, - U16* Buffer, - U32 Count) +#undef READ_PORT_BUFFER_USHORT +VOID +STDCALL +READ_PORT_BUFFER_USHORT (USHORT* Port, + USHORT* Buffer, + ULONG Count) { __asm__ __volatile__ ("cld ; rep ; insw" : "=D" (Buffer), "=c" (Count) : "d" (Port),"0" (Buffer),"1" (Count)); } -VOID /*STDCALL*/ -READ_PORT_BUFFER_ULONG (U32* Port, - U32* Buffer, - U32 Count) +#undef READ_PORT_BUFFER_ULONG +VOID +STDCALL +READ_PORT_BUFFER_ULONG (ULONG* Port, + ULONG* Buffer, + ULONG Count) { __asm__ __volatile__ ("cld ; rep ; insl" : "=D" (Buffer), "=c" (Count) : "d" (Port),"0" (Buffer),"1" (Count)); } -UCHAR /*STDCALL*/ +#undef READ_PORT_UCHAR +UCHAR +STDCALL READ_PORT_UCHAR (PUCHAR Port) { UCHAR Value; @@ -93,10 +101,12 @@ READ_PORT_UCHAR (PUCHAR Port) return(Value); } -U16 /*STDCALL*/ -READ_PORT_USHORT (U16* Port) +#undef READ_PORT_USHORT +USHORT +STDCALL +READ_PORT_USHORT (USHORT* Port) { - U16 Value; + USHORT Value; __asm__("inw %w1, %0\n\t" : "=a" (Value) @@ -105,10 +115,12 @@ READ_PORT_USHORT (U16* Port) return(Value); } -U32 /*STDCALL*/ -READ_PORT_ULONG (U32* Port) +#undef READ_PORT_ULONG +ULONG +STDCALL +READ_PORT_ULONG (ULONG* Port) { - U32 Value; + ULONG Value; __asm__("inl %w1, %0\n\t" : "=a" (Value) @@ -117,37 +129,45 @@ READ_PORT_ULONG (U32* Port) return(Value); } -VOID /*STDCALL*/ +#undef WRITE_PORT_BUFFER_UCHAR +VOID +STDCALL WRITE_PORT_BUFFER_UCHAR (PUCHAR Port, PUCHAR Buffer, - U32 Count) + ULONG Count) { __asm__ __volatile__ ("cld ; rep ; outsb" : "=S" (Buffer), "=c" (Count) : "d" (Port),"0" (Buffer),"1" (Count)); } -VOID /*STDCALL*/ -WRITE_PORT_BUFFER_USHORT (U16* Port, - U16* Buffer, - U32 Count) +#undef WRITE_PORT_BUFFER_USHORT +VOID +STDCALL +WRITE_PORT_BUFFER_USHORT (USHORT* Port, + USHORT* Buffer, + ULONG Count) { __asm__ __volatile__ ("cld ; rep ; outsw" : "=S" (Buffer), "=c" (Count) : "d" (Port),"0" (Buffer),"1" (Count)); } -VOID /*STDCALL*/ -WRITE_PORT_BUFFER_ULONG (U32* Port, - U32* Buffer, - U32 Count) +#undef WRITE_PORT_BUFFER_ULONG +VOID +STDCALL +WRITE_PORT_BUFFER_ULONG (ULONG* Port, + ULONG* Buffer, + ULONG Count) { __asm__ __volatile__ ("cld ; rep ; outsl" : "=S" (Buffer), "=c" (Count) : "d" (Port),"0" (Buffer),"1" (Count)); } -VOID /*STDCALL*/ +#undef WRITE_PORT_UCHAR +VOID +STDCALL WRITE_PORT_UCHAR (PUCHAR Port, UCHAR Value) { @@ -158,9 +178,11 @@ WRITE_PORT_UCHAR (PUCHAR Port, SLOW_DOWN_IO; } -VOID /*STDCALL*/ -WRITE_PORT_USHORT (U16* Port, - U16 Value) +#undef WRITE_PORT_USHORT +VOID +STDCALL +WRITE_PORT_USHORT (USHORT* Port, + USHORT Value) { __asm__("outw %0, %w1\n\t" : @@ -169,9 +191,11 @@ WRITE_PORT_USHORT (U16* Port, SLOW_DOWN_IO; } -VOID /*STDCALL*/ -WRITE_PORT_ULONG (U32* Port, - U32 Value) +#undef WRITE_PORT_ULONG +VOID +STDCALL +WRITE_PORT_ULONG (ULONG* Port, + ULONG Value) { __asm__("outl %0, %w1\n\t" : diff --git a/reactos/boot/freeldr/freeldr/arch/i386/xboxcons.c b/reactos/boot/freeldr/freeldr/arch/i386/xboxcons.c index 179b9f85cdf..d803144bc27 100644 --- a/reactos/boot/freeldr/freeldr/arch/i386/xboxcons.c +++ b/reactos/boot/freeldr/freeldr/arch/i386/xboxcons.c @@ -28,9 +28,9 @@ static unsigned CurrentAttr = 0x0f; VOID XboxConsPutChar(int c) { - U32 Width; - U32 Height; - U32 Depth; + ULONG Width; + ULONG Height; + ULONG Depth; if ('\r' == c) { diff --git a/reactos/boot/freeldr/freeldr/arch/i386/xboxdisk.c b/reactos/boot/freeldr/freeldr/arch/i386/xboxdisk.c index 7fb1cd6fc4d..68d805b4ab2 100644 --- a/reactos/boot/freeldr/freeldr/arch/i386/xboxdisk.c +++ b/reactos/boot/freeldr/freeldr/arch/i386/xboxdisk.c @@ -38,9 +38,9 @@ static struct { - U32 SectorCountBeforePartition; - U32 PartitionSectorCount; - U8 SystemIndicator; + ULONG SectorCountBeforePartition; + ULONG PartitionSectorCount; + UCHAR SystemIndicator; } XboxPartitions[] = { /* This is in the \Device\Harddisk0\Partition.. order used by the Xbox kernel */ @@ -155,17 +155,17 @@ static struct * Data block read and write commands */ #define IDEReadBlock(Address, Buffer, Count) \ - (READ_PORT_BUFFER_USHORT((PU16)((Address) + IDE_REG_DATA_PORT), (PU16)(Buffer), (Count) / 2)) + (READ_PORT_BUFFER_USHORT((PUSHORT)((Address) + IDE_REG_DATA_PORT), (PUSHORT)(Buffer), (Count) / 2)) #define IDEWriteBlock(Address, Buffer, Count) \ - (WRITE_PORT_BUFFER_USHORT((PU16)((Address) + IDE_REG_DATA_PORT), (PU16)(Buffer), (Count) / 2)) + (WRITE_PORT_BUFFER_USHORT((PUSHORT)((Address) + IDE_REG_DATA_PORT), (PUSHORT)(Buffer), (Count) / 2)) #define IDEReadBlock32(Address, Buffer, Count) \ - (READ_PORT_BUFFER_ULONG((PU32)((Address) + IDE_REG_DATA_PORT), (PU32)(Buffer), (Count) / 4)) + (READ_PORT_BUFFER_ULONG((PULONG)((Address) + IDE_REG_DATA_PORT), (PULONG)(Buffer), (Count) / 4)) #define IDEWriteBlock32(Address, Buffer, Count) \ - (WRITE_PORT_BUFFER_ULONG((PU32)((Address) + IDE_REG_DATA_PORT), (PU32)(Buffer), (Count) / 4)) + (WRITE_PORT_BUFFER_ULONG((PULONG)((Address) + IDE_REG_DATA_PORT), (PULONG)(Buffer), (Count) / 4)) #define IDEReadWord(Address) \ - (READ_PORT_USHORT((PU16)((Address) + IDE_REG_DATA_PORT))) + (READ_PORT_USHORT((PUSHORT)((Address) + IDE_REG_DATA_PORT))) /* * Access macros for control registers @@ -180,64 +180,64 @@ static struct typedef struct _IDE_DRIVE_IDENTIFY { - U16 ConfigBits; /*00*/ - U16 LogicalCyls; /*01*/ - U16 Reserved02; /*02*/ - U16 LogicalHeads; /*03*/ - U16 BytesPerTrack; /*04*/ - U16 BytesPerSector; /*05*/ - U16 SectorsPerTrack; /*06*/ - U8 InterSectorGap; /*07*/ - U8 InterSectorGapSize; - U8 Reserved08H; /*08*/ - U8 BytesInPLO; - U16 VendorUniqueCnt; /*09*/ + USHORT ConfigBits; /*00*/ + USHORT LogicalCyls; /*01*/ + USHORT Reserved02; /*02*/ + USHORT LogicalHeads; /*03*/ + USHORT BytesPerTrack; /*04*/ + USHORT BytesPerSector; /*05*/ + USHORT SectorsPerTrack; /*06*/ + UCHAR InterSectorGap; /*07*/ + UCHAR InterSectorGapSize; + UCHAR Reserved08H; /*08*/ + UCHAR BytesInPLO; + USHORT VendorUniqueCnt; /*09*/ char SerialNumber[20]; /*10*/ - U16 ControllerType; /*20*/ - U16 BufferSize; /*21*/ - U16 ECCByteCnt; /*22*/ + USHORT ControllerType; /*20*/ + USHORT BufferSize; /*21*/ + USHORT ECCByteCnt; /*22*/ char FirmwareRev[8]; /*23*/ char ModelNumber[40]; /*27*/ - U16 RWMultImplemented; /*47*/ - U16 DWordIo; /*48*/ - U16 Capabilities; /*49*/ + USHORT RWMultImplemented; /*47*/ + USHORT DWordIo; /*48*/ + USHORT Capabilities; /*49*/ #define IDE_DRID_STBY_SUPPORTED 0x2000 #define IDE_DRID_IORDY_SUPPORTED 0x0800 #define IDE_DRID_IORDY_DISABLE 0x0400 #define IDE_DRID_LBA_SUPPORTED 0x0200 #define IDE_DRID_DMA_SUPPORTED 0x0100 - U16 Reserved50; /*50*/ - U16 MinPIOTransTime; /*51*/ - U16 MinDMATransTime; /*52*/ - U16 TMFieldsValid; /*53*/ - U16 TMCylinders; /*54*/ - U16 TMHeads; /*55*/ - U16 TMSectorsPerTrk; /*56*/ - U16 TMCapacityLo; /*57*/ - U16 TMCapacityHi; /*58*/ - U16 RWMultCurrent; /*59*/ - U16 TMSectorCountLo; /*60*/ - U16 TMSectorCountHi; /*61*/ - U16 DmaModes; /*62*/ - U16 MultiDmaModes; /*63*/ - U16 Reserved64[5]; /*64*/ - U16 Reserved69[2]; /*69*/ - U16 Reserved71[4]; /*71*/ - U16 MaxQueueDepth; /*75*/ - U16 Reserved76[4]; /*76*/ - U16 MajorRevision; /*80*/ - U16 MinorRevision; /*81*/ - U16 SupportedFeatures82; /*82*/ - U16 SupportedFeatures83; /*83*/ - U16 SupportedFeatures84; /*84*/ - U16 EnabledFeatures85; /*85*/ - U16 EnabledFeatures86; /*86*/ - U16 EnabledFeatures87; /*87*/ - U16 UltraDmaModes; /*88*/ - U16 Reserved89[11]; /*89*/ - U16 Max48BitAddress[4]; /*100*/ - U16 Reserved104[151]; /*104*/ - U16 Checksum; /*255*/ + USHORT Reserved50; /*50*/ + USHORT MinPIOTransTime; /*51*/ + USHORT MinDMATransTime; /*52*/ + USHORT TMFieldsValid; /*53*/ + USHORT TMCylinders; /*54*/ + USHORT TMHeads; /*55*/ + USHORT TMSectorsPerTrk; /*56*/ + USHORT TMCapacityLo; /*57*/ + USHORT TMCapacityHi; /*58*/ + USHORT RWMultCurrent; /*59*/ + USHORT TMSectorCountLo; /*60*/ + USHORT TMSectorCountHi; /*61*/ + USHORT DmaModes; /*62*/ + USHORT MultiDmaModes; /*63*/ + USHORT Reserved64[5]; /*64*/ + USHORT Reserved69[2]; /*69*/ + USHORT Reserved71[4]; /*71*/ + USHORT MaxQueueDepth; /*75*/ + USHORT Reserved76[4]; /*76*/ + USHORT MajorRevision; /*80*/ + USHORT MinorRevision; /*81*/ + USHORT SupportedFeatures82; /*82*/ + USHORT SupportedFeatures83; /*83*/ + USHORT SupportedFeatures84; /*84*/ + USHORT EnabledFeatures85; /*85*/ + USHORT EnabledFeatures86; /*86*/ + USHORT EnabledFeatures87; /*87*/ + USHORT UltraDmaModes; /*88*/ + USHORT Reserved89[11]; /*89*/ + USHORT Max48BitAddress[4]; /*100*/ + USHORT Reserved104[151]; /*104*/ + USHORT Checksum; /*255*/ } IDE_DRIVE_IDENTIFY, *PIDE_DRIVE_IDENTIFY; /* XboxDiskPolledRead @@ -249,15 +249,15 @@ typedef struct _IDE_DRIVE_IDENTIFY * PASSIVE_LEVEL * * ARGUMENTS: - * U32 CommandPort Address of command port for drive - * U32 ControlPort Address of control port for drive - * U8 PreComp Value to write to precomp register - * U8 SectorCnt Value to write to sectorCnt register - * U8 SectorNum Value to write to sectorNum register - * U8 CylinderLow Value to write to CylinderLow register - * U8 CylinderHigh Value to write to CylinderHigh register - * U8 DrvHead Value to write to Drive/Head register - * U8 Command Value to write to Command register + * ULONG CommandPort Address of command port for drive + * ULONG ControlPort Address of control port for drive + * UCHAR PreComp Value to write to precomp register + * UCHAR SectorCnt Value to write to sectorCnt register + * UCHAR SectorNum Value to write to sectorNum register + * UCHAR CylinderLow Value to write to CylinderLow register + * UCHAR CylinderHigh Value to write to CylinderHigh register + * UCHAR DrvHead Value to write to Drive/Head register + * UCHAR Command Value to write to Command register * PVOID Buffer Buffer for output data * * RETURNS: @@ -265,21 +265,21 @@ typedef struct _IDE_DRIVE_IDENTIFY */ static BOOL -XboxDiskPolledRead(U32 CommandPort, - U32 ControlPort, - U8 PreComp, - U8 SectorCnt, - U8 SectorNum, - U8 CylinderLow, - U8 CylinderHigh, - U8 DrvHead, - U8 Command, +XboxDiskPolledRead(ULONG CommandPort, + ULONG ControlPort, + UCHAR PreComp, + UCHAR SectorCnt, + UCHAR SectorNum, + UCHAR CylinderLow, + UCHAR CylinderHigh, + UCHAR DrvHead, + UCHAR Command, PVOID Buffer) { - U32 SectorCount = 0; - U32 RetryCount; + ULONG SectorCount = 0; + ULONG RetryCount; BOOL Junk = FALSE; - U8 Status; + UCHAR Status; /* Wait for BUSY to clear */ for (RetryCount = 0; RetryCount < IDE_MAX_BUSY_RETRIES; RetryCount++) @@ -289,7 +289,7 @@ XboxDiskPolledRead(U32 CommandPort, { break; } - KeStallExecutionProcessor(10); + StallExecutionProcessor(10); } DbgPrint((DPRINT_DISK, "status=0x%x\n", Status)); DbgPrint((DPRINT_DISK, "waited %d usecs for busy to clear\n", RetryCount * 10)); @@ -301,11 +301,11 @@ XboxDiskPolledRead(U32 CommandPort, /* Write Drive/Head to select drive */ IDEWriteDriveHead(CommandPort, IDE_DH_FIXED | DrvHead); - KeStallExecutionProcessor(500); + StallExecutionProcessor(500); /* Disable interrupts */ IDEWriteDriveControl(ControlPort, IDE_DC_nIEN); - KeStallExecutionProcessor(500); + StallExecutionProcessor(500); /* Issue command to drive */ if (DrvHead & IDE_DH_LBA) @@ -338,7 +338,7 @@ XboxDiskPolledRead(U32 CommandPort, /* Issue the command */ IDEWriteCommand(CommandPort, Command); - KeStallExecutionProcessor(50); + StallExecutionProcessor(50); /* wait for DRQ or error */ for (RetryCount = 0; RetryCount < IDE_MAX_POLL_RETRIES; RetryCount++) @@ -349,7 +349,7 @@ XboxDiskPolledRead(U32 CommandPort, if (Status & IDE_SR_ERR) { IDEWriteDriveControl(ControlPort, 0); - KeStallExecutionProcessor(50); + StallExecutionProcessor(50); IDEReadStatus(CommandPort); return FALSE; @@ -362,20 +362,20 @@ XboxDiskPolledRead(U32 CommandPort, else { IDEWriteDriveControl(ControlPort, 0); - KeStallExecutionProcessor(50); + StallExecutionProcessor(50); IDEReadStatus(CommandPort); return FALSE; } } - KeStallExecutionProcessor(10); + StallExecutionProcessor(10); } /* timed out */ if (RetryCount >= IDE_MAX_POLL_RETRIES) { IDEWriteDriveControl(ControlPort, 0); - KeStallExecutionProcessor(50); + StallExecutionProcessor(50); IDEReadStatus(CommandPort); return FALSE; @@ -405,7 +405,7 @@ XboxDiskPolledRead(U32 CommandPort, if (Status & IDE_SR_ERR) { IDEWriteDriveControl(ControlPort, 0); - KeStallExecutionProcessor(50); + StallExecutionProcessor(50); IDEReadStatus(CommandPort); return FALSE; @@ -427,7 +427,7 @@ XboxDiskPolledRead(U32 CommandPort, SectorCount - SectorCnt)); } IDEWriteDriveControl(ControlPort, 0); - KeStallExecutionProcessor(50); + StallExecutionProcessor(50); IDEReadStatus(CommandPort); return TRUE; @@ -438,10 +438,10 @@ XboxDiskPolledRead(U32 CommandPort, } BOOL -XboxDiskReadLogicalSectors(U32 DriveNumber, U64 SectorNumber, U32 SectorCount, PVOID Buffer) +XboxDiskReadLogicalSectors(ULONG DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer) { - U32 StartSector; - U8 Count; + ULONG StartSector; + UCHAR Count; if (DriveNumber < 0x80 || 2 <= (DriveNumber & 0x0f)) { @@ -456,7 +456,7 @@ XboxDiskReadLogicalSectors(U32 DriveNumber, U64 SectorNumber, U32 SectorCount, P return FALSE; } - StartSector = (U32) SectorNumber; + StartSector = (ULONG) SectorNumber; while (0 < SectorCount) { Count = (SectorCount <= 255 ? SectorCount : 255); @@ -481,9 +481,9 @@ XboxDiskReadLogicalSectors(U32 DriveNumber, U64 SectorNumber, U32 SectorCount, P } BOOL -XboxDiskGetPartitionEntry(U32 DriveNumber, U32 PartitionNumber, PPARTITION_TABLE_ENTRY PartitionTableEntry) +XboxDiskGetPartitionEntry(ULONG DriveNumber, ULONG PartitionNumber, PPARTITION_TABLE_ENTRY PartitionTableEntry) { - U8 SectorData[IDE_SECTOR_BUF_SZ]; + UCHAR SectorData[IDE_SECTOR_BUF_SZ]; /* This is the Xbox, chances are that there is a Xbox-standard partitionless * disk in it so let's check that first */ @@ -491,7 +491,7 @@ XboxDiskGetPartitionEntry(U32 DriveNumber, U32 PartitionNumber, PPARTITION_TABLE if (1 <= PartitionNumber && PartitionNumber <= sizeof(XboxPartitions) / sizeof(XboxPartitions[0]) && MachDiskReadLogicalSectors(DriveNumber, XBOX_SIGNATURE_SECTOR, 1, SectorData)) { - if (*((PU32) SectorData) == XBOX_SIGNATURE) + if (*((PULONG) SectorData) == XBOX_SIGNATURE) { memset(PartitionTableEntry, 0, sizeof(PARTITION_TABLE_ENTRY)); PartitionTableEntry->SystemIndicator = XboxPartitions[PartitionNumber - 1].SystemIndicator; @@ -506,10 +506,10 @@ XboxDiskGetPartitionEntry(U32 DriveNumber, U32 PartitionNumber, PPARTITION_TABLE } BOOL -XboxDiskGetDriveGeometry(U32 DriveNumber, PGEOMETRY Geometry) +XboxDiskGetDriveGeometry(ULONG DriveNumber, PGEOMETRY Geometry) { IDE_DRIVE_IDENTIFY DrvParms; - U32 i; + ULONG i; BOOL Atapi; Atapi = FALSE; /* FIXME */ @@ -565,8 +565,8 @@ XboxDiskGetDriveGeometry(U32 DriveNumber, PGEOMETRY Geometry) return TRUE; } -U32 -XboxDiskGetCacheableBlockCount(U32 DriveNumber) +ULONG +XboxDiskGetCacheableBlockCount(ULONG DriveNumber) { /* 64 seems a nice number, it is used by the machpc code for LBA devices */ return 64; diff --git a/reactos/boot/freeldr/freeldr/arch/i386/xboxfont.c b/reactos/boot/freeldr/freeldr/arch/i386/xboxfont.c index 359baac9174..b07a81b01cc 100644 --- a/reactos/boot/freeldr/freeldr/arch/i386/xboxfont.c +++ b/reactos/boot/freeldr/freeldr/arch/i386/xboxfont.c @@ -23,7 +23,7 @@ #include "machine.h" #include "machxbox.h" -U8 XboxFont8x16[256 * 16] = +UCHAR XboxFont8x16[256 * 16] = { 0x00,0x00,0x00,0x7c,0xc6,0xc6,0xde,0xde,0xde,0xdc,0xc0,0x7c,0x00,0x00,0x00,0x00, /* 0x00 */ 0x00,0x00,0x7e,0x81,0xa5,0x81,0x81,0xa5,0x99,0x81,0x81,0x7e,0x00,0x00,0x00,0x00, /* 0x01 */ diff --git a/reactos/boot/freeldr/freeldr/arch/i386/xboxmem.c b/reactos/boot/freeldr/freeldr/arch/i386/xboxmem.c index 1f5aad57c72..67e244a9a8f 100644 --- a/reactos/boot/freeldr/freeldr/arch/i386/xboxmem.c +++ b/reactos/boot/freeldr/freeldr/arch/i386/xboxmem.c @@ -29,8 +29,8 @@ #include "machxbox.h" #include "portio.h" -static U32 InstalledMemoryMb = 0; -static U32 AvailableMemoryMb = 0; +static ULONG InstalledMemoryMb = 0; +static ULONG AvailableMemoryMb = 0; #define TEST_SIZE 0x200 #define TEST_PATTERN1 0xaa @@ -39,15 +39,15 @@ static U32 AvailableMemoryMb = 0; VOID XboxMemInit(VOID) { - U8 ControlRegion[TEST_SIZE]; + UCHAR ControlRegion[TEST_SIZE]; PVOID MembaseTop = (PVOID)(64 * 1024 * 1024); PVOID MembaseLow = (PVOID)0; - (*(PU32)(0xfd000000 + 0x100200)) = 0x03070103 ; - (*(PU32)(0xfd000000 + 0x100204)) = 0x11448000 ; + (*(PULONG)(0xfd000000 + 0x100200)) = 0x03070103 ; + (*(PULONG)(0xfd000000 + 0x100204)) = 0x11448000 ; - WRITE_PORT_ULONG((U32*) 0xcf8, CONFIG_CMD(0, 0, 0x84)); - WRITE_PORT_ULONG((U32*) 0xcfc, 0x7ffffff); /* Prep hardware for 128 Mb */ + WRITE_PORT_ULONG((ULONG*) 0xcf8, CONFIG_CMD(0, 0, 0x84)); + WRITE_PORT_ULONG((ULONG*) 0xcfc, 0x7ffffff); /* Prep hardware for 128 Mb */ InstalledMemoryMb = 64; memset(ControlRegion, TEST_PATTERN1, TEST_SIZE); @@ -76,16 +76,16 @@ XboxMemInit(VOID) } /* Set hardware for amount of memory detected */ - WRITE_PORT_ULONG((U32*) 0xcf8, CONFIG_CMD(0, 0, 0x84)); - WRITE_PORT_ULONG((U32*) 0xcfc, InstalledMemoryMb * 1024 * 1024 - 1); + WRITE_PORT_ULONG((ULONG*) 0xcf8, CONFIG_CMD(0, 0, 0x84)); + WRITE_PORT_ULONG((ULONG*) 0xcfc, InstalledMemoryMb * 1024 * 1024 - 1); AvailableMemoryMb = InstalledMemoryMb; } -U32 -XboxMemGetMemoryMap(PBIOS_MEMORY_MAP BiosMemoryMap, U32 MaxMemoryMapSize) +ULONG +XboxMemGetMemoryMap(PBIOS_MEMORY_MAP BiosMemoryMap, ULONG MaxMemoryMapSize) { - U32 EntryCount = 0; + ULONG EntryCount = 0; /* Synthesize memory map */ if (1 <= MaxMemoryMapSize) @@ -110,7 +110,7 @@ XboxMemGetMemoryMap(PBIOS_MEMORY_MAP BiosMemoryMap, U32 MaxMemoryMapSize) } PVOID -XboxMemReserveMemory(U32 MbToReserve) +XboxMemReserveMemory(ULONG MbToReserve) { if (0 == InstalledMemoryMb) { diff --git a/reactos/boot/freeldr/freeldr/arch/i386/xboxrtc.c b/reactos/boot/freeldr/freeldr/arch/i386/xboxrtc.c index 0e869841013..d6000b7cf93 100644 --- a/reactos/boot/freeldr/freeldr/arch/i386/xboxrtc.c +++ b/reactos/boot/freeldr/freeldr/arch/i386/xboxrtc.c @@ -41,7 +41,7 @@ HalpQueryCMOS(UCHAR Reg) } VOID -XboxRTCGetCurrentDateTime(PU32 Year, PU32 Month, PU32 Day, PU32 Hour, PU32 Minute, PU32 Second) +XboxRTCGetCurrentDateTime(PULONG Year, PULONG Month, PULONG Day, PULONG Hour, PULONG Minute, PULONG Second) { while (HalpQueryCMOS (RTC_REGISTER_A) & RTC_REG_A_UIP) { diff --git a/reactos/boot/freeldr/freeldr/arch/i386/xboxvideo.c b/reactos/boot/freeldr/freeldr/arch/i386/xboxvideo.c index 8457b2beb80..fdcb67aaf0b 100644 --- a/reactos/boot/freeldr/freeldr/arch/i386/xboxvideo.c +++ b/reactos/boot/freeldr/freeldr/arch/i386/xboxvideo.c @@ -30,10 +30,10 @@ #define I2C_IO_BASE 0xc000 static PVOID FrameBuffer; -static U32 ScreenWidth; -static U32 ScreenHeight; -static U32 BytesPerPixel; -static U32 Delta; +static ULONG ScreenWidth; +static ULONG ScreenHeight; +static ULONG BytesPerPixel; +static ULONG Delta; #define CHAR_WIDTH 8 #define CHAR_HEIGHT 16 @@ -45,16 +45,16 @@ static U32 Delta; #define MAKE_COLOR(Red, Green, Blue) (0xff000000 | (((Red) & 0xff) << 16) | (((Green) & 0xff) << 8) | ((Blue) & 0xff)) static VOID -XboxVideoOutputChar(U8 Char, unsigned X, unsigned Y, U32 FgColor, U32 BgColor) +XboxVideoOutputChar(UCHAR Char, unsigned X, unsigned Y, ULONG FgColor, ULONG BgColor) { - PU8 FontPtr; - PU32 Pixel; - U8 Mask; + PUCHAR FontPtr; + PULONG Pixel; + UCHAR Mask; unsigned Line; unsigned Col; FontPtr = XboxFont8x16 + Char * 16; - Pixel = (PU32) ((char *) FrameBuffer + (Y * CHAR_HEIGHT + TOP_BOTTOM_LINES) * Delta + Pixel = (PULONG) ((char *) FrameBuffer + (Y * CHAR_HEIGHT + TOP_BOTTOM_LINES) * Delta + X * CHAR_WIDTH * BytesPerPixel); for (Line = 0; Line < CHAR_HEIGHT; Line++) { @@ -64,14 +64,14 @@ XboxVideoOutputChar(U8 Char, unsigned X, unsigned Y, U32 FgColor, U32 BgColor) Pixel[Col] = (0 != (FontPtr[Line] & Mask) ? FgColor : BgColor); Mask = Mask >> 1; } - Pixel = (PU32) ((char *) Pixel + Delta); + Pixel = (PULONG) ((char *) Pixel + Delta); } } -static U32 -XboxVideoAttrToSingleColor(U8 Attr) +static ULONG +XboxVideoAttrToSingleColor(UCHAR Attr) { - U8 Intensity; + UCHAR Intensity; Intensity = (0 == (Attr & 0x08) ? 127 : 255); @@ -82,21 +82,21 @@ XboxVideoAttrToSingleColor(U8 Attr) } static VOID -XboxVideoAttrToColors(U8 Attr, U32 *FgColor, U32 *BgColor) +XboxVideoAttrToColors(UCHAR Attr, ULONG *FgColor, ULONG *BgColor) { *FgColor = XboxVideoAttrToSingleColor(Attr & 0xf); *BgColor = XboxVideoAttrToSingleColor((Attr >> 4) & 0xf); } static VOID -XboxVideoClearScreenColor(U32 Color, BOOL FullScreen) +XboxVideoClearScreenColor(ULONG Color, BOOL FullScreen) { - U32 Line, Col; - PU32 p; + ULONG Line, Col; + PULONG p; for (Line = 0; Line < ScreenHeight - (FullScreen ? 0 : 2 * TOP_BOTTOM_LINES); Line++) { - p = (PU32) ((char *) FrameBuffer + (Line + (FullScreen ? 0 : TOP_BOTTOM_LINES)) * Delta); + p = (PULONG) ((char *) FrameBuffer + (Line + (FullScreen ? 0 : TOP_BOTTOM_LINES)) * Delta); for (Col = 0; Col < ScreenWidth; Col++) { *p++ = Color; @@ -105,9 +105,9 @@ XboxVideoClearScreenColor(U32 Color, BOOL FullScreen) } VOID -XboxVideoClearScreen(U8 Attr) +XboxVideoClearScreen(UCHAR Attr) { - U32 FgColor, BgColor; + ULONG FgColor, BgColor; XboxVideoAttrToColors(Attr, &FgColor, &BgColor); @@ -115,9 +115,9 @@ XboxVideoClearScreen(U8 Attr) } VOID -XboxVideoPutChar(int Ch, U8 Attr, unsigned X, unsigned Y) +XboxVideoPutChar(int Ch, UCHAR Attr, unsigned X, unsigned Y) { - U32 FgColor, BgColor; + ULONG FgColor, BgColor; XboxVideoAttrToColors(Attr, &FgColor, &BgColor); @@ -125,11 +125,11 @@ XboxVideoPutChar(int Ch, U8 Attr, unsigned X, unsigned Y) } static BOOL -ReadfromSMBus(UCHAR Address, UCHAR bRegister, UCHAR Size, U32 *Data_to_smbus) +ReadfromSMBus(UCHAR Address, UCHAR bRegister, UCHAR Size, ULONG *Data_to_smbus) { int nRetriesToLive=50; - while (0 != (READ_PORT_USHORT((PU16) (I2C_IO_BASE + 0)) & 0x0800)) + while (0 != (READ_PORT_USHORT((PUSHORT) (I2C_IO_BASE + 0)) & 0x0800)) { ; /* Franz's spin while bus busy with any master traffic */ } @@ -142,8 +142,8 @@ ReadfromSMBus(UCHAR Address, UCHAR bRegister, UCHAR Size, U32 *Data_to_smbus) WRITE_PORT_UCHAR((PUCHAR) (I2C_IO_BASE + 4), (Address << 1) | 1); WRITE_PORT_UCHAR((PUCHAR) (I2C_IO_BASE + 8), bRegister); - temp = READ_PORT_USHORT((U16 *) (I2C_IO_BASE + 0)); - WRITE_PORT_USHORT((PU16) (I2C_IO_BASE + 0), temp); /* clear down all preexisting errors */ + temp = READ_PORT_USHORT((USHORT *) (I2C_IO_BASE + 0)); + WRITE_PORT_USHORT((PUSHORT) (I2C_IO_BASE + 0), temp); /* clear down all preexisting errors */ switch (Size) { @@ -186,7 +186,7 @@ ReadfromSMBus(UCHAR Address, UCHAR bRegister, UCHAR Size, U32 *Data_to_smbus) READ_PORT_UCHAR((PUCHAR) (I2C_IO_BASE + 9)); break; case 2: - *Data_to_smbus = READ_PORT_USHORT((U16 *) (I2C_IO_BASE + 6)); + *Data_to_smbus = READ_PORT_USHORT((USHORT *) (I2C_IO_BASE + 6)); break; default: *Data_to_smbus = READ_PORT_UCHAR((PUCHAR) (I2C_IO_BASE + 6)); @@ -203,7 +203,7 @@ ReadfromSMBus(UCHAR Address, UCHAR bRegister, UCHAR Size, U32 *Data_to_smbus) static BOOL -I2CTransmitByteGetReturn(UCHAR bPicAddressI2cFormat, UCHAR bDataToWrite, U32 *Return) +I2CTransmitByteGetReturn(UCHAR bPicAddressI2cFormat, UCHAR bDataToWrite, ULONG *Return) { return ReadfromSMBus(bPicAddressI2cFormat, bDataToWrite, 1, Return); } @@ -212,9 +212,9 @@ I2CTransmitByteGetReturn(UCHAR bPicAddressI2cFormat, UCHAR bDataToWrite, U32 *Re VOID XboxVideoInit(VOID) { - U32 AvMode; + ULONG AvMode; - FrameBuffer = (PVOID)((U32) XboxMemReserveMemory(FB_SIZE_MB) | 0xf0000000); + FrameBuffer = (PVOID)((ULONG) XboxMemReserveMemory(FB_SIZE_MB) | 0xf0000000); if (I2CTransmitByteGetReturn(0x10, 0x04, &AvMode)) { @@ -247,7 +247,7 @@ XboxVideoInit(VOID) XboxVideoClearScreenColor(MAKE_COLOR(0, 0, 0), TRUE); /* Tell the nVidia controller about the framebuffer */ - *((PU32) 0xfd600800) = (U32) FrameBuffer; + *((PULONG) 0xfd600800) = (ULONG) FrameBuffer; } VIDEODISPLAYMODE @@ -258,21 +258,21 @@ XboxVideoSetDisplayMode(char *DisplayMode, BOOL Init) } VOID -XboxVideoGetDisplaySize(PU32 Width, PU32 Height, PU32 Depth) +XboxVideoGetDisplaySize(PULONG Width, PULONG Height, PULONG Depth) { *Width = ScreenWidth / CHAR_WIDTH; *Height = (ScreenHeight - 2 * TOP_BOTTOM_LINES) / CHAR_HEIGHT; *Depth = 0; } -U32 +ULONG XboxVideoGetBufferSize(VOID) { return (ScreenHeight - 2 * TOP_BOTTOM_LINES) / CHAR_HEIGHT * (ScreenWidth / CHAR_WIDTH) * 2; } VOID -XboxVideoSetTextCursorPosition(U32 X, U32 Y) +XboxVideoSetTextCursorPosition(ULONG X, ULONG Y) { /* We don't have a cursor yet */ } @@ -286,8 +286,8 @@ XboxVideoHideShowTextCursor(BOOL Show) VOID XboxVideoCopyOffScreenBufferToVRAM(PVOID Buffer) { - PU8 OffScreenBuffer = (PU8) Buffer; - U32 Col, Line; + PUCHAR OffScreenBuffer = (PUCHAR) Buffer; + ULONG Col, Line; for (Line = 0; Line < (ScreenHeight - 2 * TOP_BOTTOM_LINES) / CHAR_HEIGHT; Line++) { @@ -306,13 +306,13 @@ XboxVideoIsPaletteFixed(VOID) } VOID -XboxVideoSetPaletteColor(U8 Color, U8 Red, U8 Green, U8 Blue) +XboxVideoSetPaletteColor(UCHAR Color, UCHAR Red, UCHAR Green, UCHAR Blue) { /* Not supported */ } VOID -XboxVideoGetPaletteColor(U8 Color, U8* Red, U8* Green, U8* Blue) +XboxVideoGetPaletteColor(UCHAR Color, UCHAR* Red, UCHAR* Green, UCHAR* Blue) { /* Not supported */ } diff --git a/reactos/boot/freeldr/freeldr/bootmgr.c b/reactos/boot/freeldr/freeldr/bootmgr.c index d00d3c83c05..01cd5212462 100644 --- a/reactos/boot/freeldr/freeldr/bootmgr.c +++ b/reactos/boot/freeldr/freeldr/bootmgr.c @@ -41,13 +41,13 @@ VOID RunLoader(VOID) { UCHAR SettingName[80]; UCHAR SettingValue[80]; - U32 SectionId; - U32 OperatingSystemCount; + ULONG SectionId; + ULONG OperatingSystemCount; PUCHAR *OperatingSystemSectionNames; PUCHAR *OperatingSystemDisplayNames; - U32 DefaultOperatingSystem; - S32 TimeOut; - U32 SelectedOperatingSystem; + ULONG DefaultOperatingSystem; + LONG TimeOut; + ULONG SelectedOperatingSystem; if (!IniFileInitialize()) { @@ -159,13 +159,13 @@ reboot: return; } -U32 GetDefaultOperatingSystem(PUCHAR OperatingSystemList[], U32 OperatingSystemCount) +ULONG GetDefaultOperatingSystem(PUCHAR OperatingSystemList[], ULONG OperatingSystemCount) { UCHAR DefaultOSText[80]; char* DefaultOSName; - U32 SectionId; - U32 DefaultOS = 0; - U32 Idx; + ULONG SectionId; + ULONG DefaultOS = 0; + ULONG Idx; if (!IniOpenSection("FreeLoader", &SectionId)) { @@ -196,11 +196,11 @@ U32 GetDefaultOperatingSystem(PUCHAR OperatingSystemList[], U32 OperatingSyste return DefaultOS; } -S32 GetTimeOut(VOID) +LONG GetTimeOut(VOID) { UCHAR TimeOutText[20]; - S32 TimeOut; - U32 SectionId; + LONG TimeOut; + ULONG SectionId; TimeOut = CmdLineGetTimeOut(); if (0 <= TimeOut) @@ -225,7 +225,7 @@ S32 GetTimeOut(VOID) return TimeOut; } -BOOL MainBootMenuKeyPressFilter(U32 KeyPress) +BOOL MainBootMenuKeyPressFilter(ULONG KeyPress) { if (KeyPress == KEY_F8) { diff --git a/reactos/boot/freeldr/freeldr/cache/blocklist.c b/reactos/boot/freeldr/freeldr/cache/blocklist.c index 2a9cb6acce5..81b3cb61b9d 100644 --- a/reactos/boot/freeldr/freeldr/cache/blocklist.c +++ b/reactos/boot/freeldr/freeldr/cache/blocklist.c @@ -30,7 +30,7 @@ // Returns a pointer to a CACHE_BLOCK structure // Adds the block to the cache manager block list // in cache memory if it isn't already there -PCACHE_BLOCK CacheInternalGetBlockPointer(PCACHE_DRIVE CacheDrive, U32 BlockNumber) +PCACHE_BLOCK CacheInternalGetBlockPointer(PCACHE_DRIVE CacheDrive, ULONG BlockNumber) { PCACHE_BLOCK CacheBlock = NULL; @@ -55,7 +55,7 @@ PCACHE_BLOCK CacheInternalGetBlockPointer(PCACHE_DRIVE CacheDrive, U32 BlockNumb return CacheBlock; } -PCACHE_BLOCK CacheInternalFindBlock(PCACHE_DRIVE CacheDrive, U32 BlockNumber) +PCACHE_BLOCK CacheInternalFindBlock(PCACHE_DRIVE CacheDrive, ULONG BlockNumber) { PCACHE_BLOCK CacheBlock = NULL; @@ -93,7 +93,7 @@ PCACHE_BLOCK CacheInternalFindBlock(PCACHE_DRIVE CacheDrive, U32 BlockNumber) return NULL; } -PCACHE_BLOCK CacheInternalAddBlockToCache(PCACHE_DRIVE CacheDrive, U32 BlockNumber) +PCACHE_BLOCK CacheInternalAddBlockToCache(PCACHE_DRIVE CacheDrive, ULONG BlockNumber) { PCACHE_BLOCK CacheBlock = NULL; @@ -195,7 +195,7 @@ BOOL CacheInternalFreeBlock(PCACHE_DRIVE CacheDrive) VOID CacheInternalCheckCacheSizeLimits(PCACHE_DRIVE CacheDrive) { - U32 NewCacheSize; + ULONG NewCacheSize; DbgPrint((DPRINT_CACHE, "CacheInternalCheckCacheSizeLimits()\n")); diff --git a/reactos/boot/freeldr/freeldr/cache/cache.c b/reactos/boot/freeldr/freeldr/cache/cache.c index 363653f13d4..2344e1ee7fd 100644 --- a/reactos/boot/freeldr/freeldr/cache/cache.c +++ b/reactos/boot/freeldr/freeldr/cache/cache.c @@ -34,11 +34,11 @@ CACHE_DRIVE CacheManagerDrive; BOOL CacheManagerInitialized = FALSE; BOOL CacheManagerDataInvalid = FALSE; -U32 CacheBlockCount = 0; -U32 CacheSizeLimit = 0; -U32 CacheSizeCurrent = 0; +ULONG CacheBlockCount = 0; +ULONG CacheSizeLimit = 0; +ULONG CacheSizeCurrent = 0; -BOOL CacheInitializeDrive(U32 DriveNumber) +BOOL CacheInitializeDrive(ULONG DriveNumber) { PCACHE_BLOCK NextCacheBlock; GEOMETRY DriveGeometry; @@ -116,16 +116,16 @@ VOID CacheInvalidateCacheData(VOID) CacheManagerDataInvalid = TRUE; } -BOOL CacheReadDiskSectors(U32 DiskNumber, U32 StartSector, U32 SectorCount, PVOID Buffer) +BOOL CacheReadDiskSectors(ULONG DiskNumber, ULONG StartSector, ULONG SectorCount, PVOID Buffer) { PCACHE_BLOCK CacheBlock; - U32 StartBlock; - U32 SectorOffsetInStartBlock; - U32 CopyLengthInStartBlock; - U32 EndBlock; - U32 SectorOffsetInEndBlock; - U32 BlockCount; - U32 Idx; + ULONG StartBlock; + ULONG SectorOffsetInStartBlock; + ULONG CopyLengthInStartBlock; + ULONG EndBlock; + ULONG SectorOffsetInEndBlock; + ULONG BlockCount; + ULONG Idx; DbgPrint((DPRINT_CACHE, "CacheReadDiskSectors() DiskNumber: 0x%x StartSector: %d SectorCount: %d Buffer: 0x%x\n", DiskNumber, StartSector, SectorCount, Buffer)); @@ -248,13 +248,13 @@ BOOL CacheReadDiskSectors(U32 DiskNumber, U32 StartSector, U32 SectorCount, PVOI return TRUE; } -BOOL CacheForceDiskSectorsIntoCache(U32 DiskNumber, U32 StartSector, U32 SectorCount) +BOOL CacheForceDiskSectorsIntoCache(ULONG DiskNumber, ULONG StartSector, ULONG SectorCount) { PCACHE_BLOCK CacheBlock; - U32 StartBlock; - U32 EndBlock; - U32 BlockCount; - U32 Idx; + ULONG StartBlock; + ULONG EndBlock; + ULONG BlockCount; + ULONG Idx; DbgPrint((DPRINT_CACHE, "CacheForceDiskSectorsIntoCache() DiskNumber: 0x%x StartSector: %d SectorCount: %d\n", DiskNumber, StartSector, SectorCount)); @@ -294,9 +294,9 @@ BOOL CacheForceDiskSectorsIntoCache(U32 DiskNumber, U32 StartSector, U32 SectorC return TRUE; } -BOOL CacheReleaseMemory(U32 MinimumAmountToRelease) +BOOL CacheReleaseMemory(ULONG MinimumAmountToRelease) { - U32 AmountReleased; + ULONG AmountReleased; DbgPrint((DPRINT_CACHE, "CacheReleaseMemory() MinimumAmountToRelease = %d\n", MinimumAmountToRelease)); diff --git a/reactos/boot/freeldr/freeldr/cache/cm.h b/reactos/boot/freeldr/freeldr/cache/cm.h index 6780fff6b07..fd47241e866 100644 --- a/reactos/boot/freeldr/freeldr/cache/cm.h +++ b/reactos/boot/freeldr/freeldr/cache/cm.h @@ -38,9 +38,9 @@ typedef struct { LIST_ITEM ListEntry; // Doubly linked list synchronization member - U32 BlockNumber; // Track index for CHS, 64k block index for LBA + ULONG BlockNumber; // Track index for CHS, 64k block index for LBA BOOL LockedInCache; // Indicates that this block is locked in cache memory - U32 AccessCount; // Access count for this block + ULONG AccessCount; // Access count for this block PVOID BlockData; // Pointer to block data @@ -55,10 +55,10 @@ typedef struct /////////////////////////////////////////////////////////////////////////////////////// typedef struct { - U32 DriveNumber; - U32 BytesPerSector; + ULONG DriveNumber; + ULONG BytesPerSector; - U32 BlockSize; // Block size (in sectors) + ULONG BlockSize; // Block size (in sectors) PCACHE_BLOCK CacheBlockHead; } CACHE_DRIVE, *PCACHE_DRIVE; @@ -71,18 +71,18 @@ typedef struct /////////////////////////////////////////////////////////////////////////////////////// extern CACHE_DRIVE CacheManagerDrive; extern BOOL CacheManagerInitialized; -extern U32 CacheBlockCount; -extern U32 CacheSizeLimit; -extern U32 CacheSizeCurrent; +extern ULONG CacheBlockCount; +extern ULONG CacheSizeLimit; +extern ULONG CacheSizeCurrent; /////////////////////////////////////////////////////////////////////////////////////// // // Internal functions // /////////////////////////////////////////////////////////////////////////////////////// -PCACHE_BLOCK CacheInternalGetBlockPointer(PCACHE_DRIVE CacheDrive, U32 BlockNumber); // Returns a pointer to a CACHE_BLOCK structure given a block number -PCACHE_BLOCK CacheInternalFindBlock(PCACHE_DRIVE CacheDrive, U32 BlockNumber); // Searches the block list for a particular block -PCACHE_BLOCK CacheInternalAddBlockToCache(PCACHE_DRIVE CacheDrive, U32 BlockNumber); // Adds a block to the cache's block list +PCACHE_BLOCK CacheInternalGetBlockPointer(PCACHE_DRIVE CacheDrive, ULONG BlockNumber); // Returns a pointer to a CACHE_BLOCK structure given a block number +PCACHE_BLOCK CacheInternalFindBlock(PCACHE_DRIVE CacheDrive, ULONG BlockNumber); // Searches the block list for a particular block +PCACHE_BLOCK CacheInternalAddBlockToCache(PCACHE_DRIVE CacheDrive, ULONG BlockNumber); // Adds a block to the cache's block list BOOL CacheInternalFreeBlock(PCACHE_DRIVE CacheDrive); // Removes a block from the cache's block list & frees the memory VOID CacheInternalCheckCacheSizeLimits(PCACHE_DRIVE CacheDrive); // Checks the cache size limits to see if we can add a new block, if not calls CacheInternalFreeBlock() VOID CacheInternalDumpBlockList(PCACHE_DRIVE CacheDrive); // Dumps the list of cached blocks to the debug output port diff --git a/reactos/boot/freeldr/freeldr/cmdline.c b/reactos/boot/freeldr/freeldr/cmdline.c index f45a1cfe248..a18002c4d20 100644 --- a/reactos/boot/freeldr/freeldr/cmdline.c +++ b/reactos/boot/freeldr/freeldr/cmdline.c @@ -112,7 +112,7 @@ CmdLineGetDefaultOS(void) return CmdLineInfo.DefaultOperatingSystem; } -S32 +LONG CmdLineGetTimeOut(void) { return CmdLineInfo.TimeOut; diff --git a/reactos/boot/freeldr/freeldr/comm/rs232.c b/reactos/boot/freeldr/freeldr/comm/rs232.c index f203655fbfd..e814b0335ce 100644 --- a/reactos/boot/freeldr/freeldr/comm/rs232.c +++ b/reactos/boot/freeldr/freeldr/comm/rs232.c @@ -61,8 +61,8 @@ /* STATIC VARIABLES *********************************************************/ -static U32 Rs232ComPort = 0; -static U32 Rs232BaudRate = 0; +static ULONG Rs232ComPort = 0; +static ULONG Rs232BaudRate = 0; static PUCHAR Rs232PortBase = (PUCHAR)0; /* The com port must only be initialized once! */ @@ -73,8 +73,8 @@ static BOOLEAN PortInitialized = FALSE; static BOOL Rs232DoesComPortExist(PUCHAR BaseAddress) { BOOLEAN found; - U8 mcr; - U8 msr; + UCHAR mcr; + UCHAR msr; found = FALSE; @@ -118,12 +118,12 @@ static BOOL Rs232DoesComPortExist(PUCHAR BaseAddress) /* FUNCTIONS *********************************************************/ -BOOL Rs232PortInitialize(U32 ComPort, U32 BaudRate) +BOOL Rs232PortInitialize(ULONG ComPort, ULONG BaudRate) { - U32 BaseArray[5] = {0, 0x3F8, 0x2F8, 0x3E8, 0x2E8}; + ULONG BaseArray[5] = {0, 0x3F8, 0x2F8, 0x3E8, 0x2E8}; //char buffer[80]; - U32 divisor; - U8 lcr; + ULONG divisor; + UCHAR lcr; if (PortInitialized == FALSE) { @@ -146,7 +146,7 @@ BOOL Rs232PortInitialize(U32 ComPort, U32 BaudRate) sprintf (buffer, "\nSerial port COM%ld found at 0x%lx\n", ComPort, - (U32)PortBase); + (ULONG)PortBase); HalDisplayString (buffer); #endif*/ /* NDEBUG */ } @@ -158,7 +158,7 @@ BOOL Rs232PortInitialize(U32 ComPort, U32 BaudRate) sprintf (buffer, "\nSerial port COM%ld found at 0x%lx\n", ComPort, - (U32)PortBase); + (ULONG)PortBase); HalDisplayString (buffer); #endif*/ /* NDEBUG */ } @@ -180,7 +180,7 @@ BOOL Rs232PortInitialize(U32 ComPort, U32 BaudRate) sprintf (buffer, "\nSerial port COM%ld found at 0x%lx\n", ComPort, - (U32)PortBase); + (ULONG)PortBase); HalDisplayString (buffer); #endif*/ /* NDEBUG */ } @@ -222,7 +222,7 @@ BOOL Rs232PortInitialize(U32 ComPort, U32 BaudRate) /* * set global info */ - //KdComPortInUse = (U32)PortBase; + //KdComPortInUse = (ULONG)PortBase; /* * print message to blue screen @@ -230,7 +230,7 @@ BOOL Rs232PortInitialize(U32 ComPort, U32 BaudRate) /*sprintf (buffer, "\nKernel Debugger: COM%ld (Port 0x%lx) BaudRate %ld\n\n", ComPort, - (U32)PortBase, + (ULONG)PortBase, BaudRate); HalDisplayString (buffer);*/ diff --git a/reactos/boot/freeldr/freeldr/custom.c b/reactos/boot/freeldr/freeldr/custom.c index f3899ba86a7..da0da4198d8 100644 --- a/reactos/boot/freeldr/freeldr/custom.c +++ b/reactos/boot/freeldr/freeldr/custom.c @@ -46,8 +46,8 @@ UCHAR CustomBootPrompt[] = "Press ENTER to boot your custom boot setup."; VOID OptionMenuCustomBoot(VOID) { PUCHAR CustomBootMenuList[] = { "Disk", "Partition", "Boot Sector File", "ReactOS", "Linux" }; - U32 CustomBootMenuCount = sizeof(CustomBootMenuList) / sizeof(CustomBootMenuList[0]); - U32 SelectedMenuItem; + ULONG CustomBootMenuCount = sizeof(CustomBootMenuList) / sizeof(CustomBootMenuList[0]); + ULONG SelectedMenuItem; if (!UiDisplayMenu(CustomBootMenuList, CustomBootMenuCount, 0, -1, &SelectedMenuItem, TRUE, NULL)) { @@ -79,8 +79,8 @@ VOID OptionMenuCustomBootDisk(VOID) { UCHAR SectionName[100]; UCHAR BootDriveString[20]; - U32 SectionId; - U32 Year, Month, Day, Hour, Minute, Second; + ULONG SectionId; + ULONG Year, Month, Day, Hour, Minute, Second; RtlZeroMemory(SectionName, sizeof(SectionName)); RtlZeroMemory(BootDriveString, sizeof(BootDriveString)); @@ -122,8 +122,8 @@ VOID OptionMenuCustomBootPartition(VOID) UCHAR SectionName[100]; UCHAR BootDriveString[20]; UCHAR BootPartitionString[20]; - U32 SectionId; - U32 Year, Month, Day, Hour, Minute, Second; + ULONG SectionId; + ULONG Year, Month, Day, Hour, Minute, Second; RtlZeroMemory(SectionName, sizeof(SectionName)); RtlZeroMemory(BootDriveString, sizeof(BootDriveString)); @@ -178,8 +178,8 @@ VOID OptionMenuCustomBootBootSectorFile(VOID) UCHAR BootDriveString[20]; UCHAR BootPartitionString[20]; UCHAR BootSectorFileString[200]; - U32 SectionId; - U32 Year, Month, Day, Hour, Minute, Second; + ULONG SectionId; + ULONG Year, Month, Day, Hour, Minute, Second; RtlZeroMemory(SectionName, sizeof(SectionName)); RtlZeroMemory(BootDriveString, sizeof(BootDriveString)); @@ -248,8 +248,8 @@ VOID OptionMenuCustomBootReactOS(VOID) UCHAR ReactOSSystemPath[200]; UCHAR ReactOSARCPath[200]; UCHAR ReactOSOptions[200]; - U32 SectionId; - U32 Year, Month, Day, Hour, Minute, Second; + ULONG SectionId; + ULONG Year, Month, Day, Hour, Minute, Second; RtlZeroMemory(SectionName, sizeof(SectionName)); RtlZeroMemory(BootDriveString, sizeof(BootDriveString)); @@ -321,8 +321,8 @@ VOID OptionMenuCustomBootLinux(VOID) UCHAR LinuxKernelString[200]; UCHAR LinuxInitrdString[200]; UCHAR LinuxCommandLineString[200]; - U32 SectionId; - U32 Year, Month, Day, Hour, Minute, Second; + ULONG SectionId; + ULONG Year, Month, Day, Hour, Minute, Second; RtlZeroMemory(SectionName, sizeof(SectionName)); RtlZeroMemory(BootDriveString, sizeof(BootDriveString)); diff --git a/reactos/boot/freeldr/freeldr/disk/disk.c b/reactos/boot/freeldr/freeldr/disk/disk.c index c298b51079e..9a3e6835096 100644 --- a/reactos/boot/freeldr/freeldr/disk/disk.c +++ b/reactos/boot/freeldr/freeldr/disk/disk.c @@ -39,7 +39,7 @@ VOID DiskReportError (BOOL bError) bReportError = bError; } -VOID DiskError(PUCHAR ErrorString, U32 ErrorCode) +VOID DiskError(PUCHAR ErrorString, ULONG ErrorCode) { UCHAR ErrorCodeString[200]; @@ -53,7 +53,7 @@ VOID DiskError(PUCHAR ErrorString, U32 ErrorCode) UiMessageBox(ErrorCodeString); } -PUCHAR DiskGetErrorCodeString(U32 ErrorCode) +PUCHAR DiskGetErrorCodeString(ULONG ErrorCode) { switch (ErrorCode) { @@ -89,9 +89,9 @@ PUCHAR DiskGetErrorCodeString(U32 ErrorCode) } // This function is in arch/i386/i386disk.c -//BOOL DiskReadLogicalSectors(U32 DriveNumber, U64 SectorNumber, U32 SectorCount, PVOID Buffer) +//BOOL DiskReadLogicalSectors(ULONG DriveNumber, U64 SectorNumber, ULONG SectorCount, PVOID Buffer) -BOOL DiskIsDriveRemovable(U32 DriveNumber) +BOOL DiskIsDriveRemovable(ULONG DriveNumber) { // Hard disks use drive numbers >= 0x80 // So if the drive number indicates a hard disk @@ -109,4 +109,4 @@ BOOL DiskIsDriveRemovable(U32 DriveNumber) //VOID DiskStopFloppyMotor(VOID) // This function is in arch/i386/i386disk.c -//U32 DiskGetCacheableBlockCount(U32 DriveNumber) +//ULONG DiskGetCacheableBlockCount(ULONG DriveNumber) diff --git a/reactos/boot/freeldr/freeldr/disk/partition.c b/reactos/boot/freeldr/freeldr/disk/partition.c index 0a0e4e4a922..4c1aa01c035 100644 --- a/reactos/boot/freeldr/freeldr/disk/partition.c +++ b/reactos/boot/freeldr/freeldr/disk/partition.c @@ -26,9 +26,9 @@ #include -BOOL DiskGetActivePartitionEntry(U32 DriveNumber, PPARTITION_TABLE_ENTRY PartitionTableEntry) +BOOL DiskGetActivePartitionEntry(ULONG DriveNumber, PPARTITION_TABLE_ENTRY PartitionTableEntry) { - U32 BootablePartitionCount = 0; + ULONG BootablePartitionCount = 0; MASTER_BOOT_RECORD MasterBootRecord; // Read master boot record @@ -77,13 +77,13 @@ BOOL DiskGetActivePartitionEntry(U32 DriveNumber, PPARTITION_TABLE_ENTRY Partiti return TRUE; } -BOOL DiskGetPartitionEntry(U32 DriveNumber, U32 PartitionNumber, PPARTITION_TABLE_ENTRY PartitionTableEntry) +BOOL DiskGetPartitionEntry(ULONG DriveNumber, ULONG PartitionNumber, PPARTITION_TABLE_ENTRY PartitionTableEntry) { MASTER_BOOT_RECORD MasterBootRecord; PARTITION_TABLE_ENTRY ExtendedPartitionTableEntry; - U32 ExtendedPartitionNumber; - U32 ExtendedPartitionOffset; - U32 Index; + ULONG ExtendedPartitionNumber; + ULONG ExtendedPartitionOffset; + ULONG Index; // Read master boot record if (!DiskReadBootRecord(DriveNumber, 0, &MasterBootRecord)) @@ -157,7 +157,7 @@ BOOL DiskGetPartitionEntry(U32 DriveNumber, U32 PartitionNumber, PPARTITION_TABL BOOL DiskGetFirstPartitionEntry(PMASTER_BOOT_RECORD MasterBootRecord, PPARTITION_TABLE_ENTRY PartitionTableEntry) { - U32 Index; + ULONG Index; for (Index=0; Index<4; Index++) { @@ -178,7 +178,7 @@ BOOL DiskGetFirstPartitionEntry(PMASTER_BOOT_RECORD MasterBootRecord, PPARTITION BOOL DiskGetFirstExtendedPartitionEntry(PMASTER_BOOT_RECORD MasterBootRecord, PPARTITION_TABLE_ENTRY PartitionTableEntry) { - U32 Index; + ULONG Index; for (Index=0; Index<4; Index++) { @@ -195,11 +195,11 @@ BOOL DiskGetFirstExtendedPartitionEntry(PMASTER_BOOT_RECORD MasterBootRecord, PP return FALSE; } -BOOL DiskReadBootRecord(U32 DriveNumber, U64 LogicalSectorNumber, PMASTER_BOOT_RECORD BootRecord) +BOOL DiskReadBootRecord(ULONG DriveNumber, ULONGLONG LogicalSectorNumber, PMASTER_BOOT_RECORD BootRecord) { char ErrMsg[64]; #ifdef DEBUG - U32 Index; + ULONG Index; #endif // Read master boot record diff --git a/reactos/boot/freeldr/freeldr/drivemap.c b/reactos/boot/freeldr/freeldr/drivemap.c index f32fd718661..5a5ff3d0d0e 100644 --- a/reactos/boot/freeldr/freeldr/drivemap.c +++ b/reactos/boot/freeldr/freeldr/drivemap.c @@ -26,9 +26,9 @@ #include BOOL DriveMapInstalled = FALSE; // Tells us if we have already installed our drive map int 13h handler code -U32 OldInt13HandlerAddress = 0; // Address of BIOS int 13h handler -U32 DriveMapHandlerAddress = 0; // Linear address of our drive map handler -U32 DriveMapHandlerSegOff = 0; // Segment:offset style address of our drive map handler +ULONG OldInt13HandlerAddress = 0; // Address of BIOS int 13h handler +ULONG DriveMapHandlerAddress = 0; // Linear address of our drive map handler +ULONG DriveMapHandlerSegOff = 0; // Segment:offset style address of our drive map handler VOID DriveMapMapDrivesInSection(PUCHAR SectionName) { @@ -37,10 +37,10 @@ VOID DriveMapMapDrivesInSection(PUCHAR SectionName) UCHAR ErrorText[260]; UCHAR Drive1[80]; UCHAR Drive2[80]; - U32 SectionId; - U32 SectionItemCount; - U32 Index; - U32 Index2; + ULONG SectionId; + ULONG SectionItemCount; + ULONG Index; + ULONG Index2; DRIVE_MAP_LIST DriveMapList; RtlZeroMemory(&DriveMapList, sizeof(DRIVE_MAP_LIST)); @@ -119,7 +119,7 @@ VOID DriveMapMapDrivesInSection(PUCHAR SectionName) BOOL DriveMapIsValidDriveString(PUCHAR DriveString) { - U32 Index; + ULONG Index; // Now verify that the user has given us appropriate strings if ((strlen(DriveString) < 3) || @@ -147,9 +147,9 @@ BOOL DriveMapIsValidDriveString(PUCHAR DriveString) return TRUE; } -U32 DriveMapGetBiosDriveNumber(PUCHAR DeviceName) +ULONG DriveMapGetBiosDriveNumber(PUCHAR DeviceName) { - U32 BiosDriveNumber = 0; + ULONG BiosDriveNumber = 0; // If they passed in a number string then just // convert it to decimal and return it @@ -174,8 +174,8 @@ U32 DriveMapGetBiosDriveNumber(PUCHAR DeviceName) VOID DriveMapInstallInt13Handler(PDRIVE_MAP_LIST DriveMap) { - U32* RealModeIVT = (U32*)0x00000000; - U16* BiosLowMemorySize = (U16*)0x00000413; + ULONG* RealModeIVT = (ULONG*)0x00000000; + USHORT* BiosLowMemorySize = (USHORT*)0x00000413; if (!DriveMapInstalled) { @@ -186,7 +186,7 @@ VOID DriveMapInstallInt13Handler(PDRIVE_MAP_LIST DriveMap) (*BiosLowMemorySize)--; // Get linear address for drive map handler - DriveMapHandlerAddress = (U32)(*BiosLowMemorySize) << 10; + DriveMapHandlerAddress = (ULONG)(*BiosLowMemorySize) << 10; // Convert to segment:offset style address DriveMapHandlerSegOff = (DriveMapHandlerAddress << 12) & 0xffff0000; @@ -199,7 +199,7 @@ VOID DriveMapInstallInt13Handler(PDRIVE_MAP_LIST DriveMap) DriveMapOldInt13HandlerAddress = OldInt13HandlerAddress; // Copy the code to our reserved area - RtlCopyMemory((PVOID)DriveMapHandlerAddress, &DriveMapInt13HandlerStart, ((U32)&DriveMapInt13HandlerEnd - (U32)&DriveMapInt13HandlerStart)); + RtlCopyMemory((PVOID)DriveMapHandlerAddress, &DriveMapInt13HandlerStart, ((ULONG)&DriveMapInt13HandlerEnd - (ULONG)&DriveMapInt13HandlerStart)); // Update the IVT RealModeIVT[0x13] = DriveMapHandlerSegOff; @@ -210,8 +210,8 @@ VOID DriveMapInstallInt13Handler(PDRIVE_MAP_LIST DriveMap) VOID DriveMapRemoveInt13Handler(VOID) { - U32* RealModeIVT = (U32*)0x00000000; - U16* BiosLowMemorySize = (U16*)0x00000413; + ULONG* RealModeIVT = (ULONG*)0x00000000; + USHORT* BiosLowMemorySize = (USHORT*)0x00000413; if (DriveMapInstalled) { diff --git a/reactos/boot/freeldr/freeldr/fs/ext2.c b/reactos/boot/freeldr/freeldr/fs/ext2.c index 0710196df09..8825c87f471 100644 --- a/reactos/boot/freeldr/freeldr/fs/ext2.c +++ b/reactos/boot/freeldr/freeldr/fs/ext2.c @@ -35,17 +35,17 @@ GEOMETRY Ext2DiskGeometry; // Ext2 file system disk geometry PEXT2_SUPER_BLOCK Ext2SuperBlock = NULL; // Ext2 file system super block PEXT2_GROUP_DESC Ext2GroupDescriptors = NULL; // Ext2 file system group descriptors -U8 Ext2DriveNumber = 0; // Ext2 file system drive number -U64 Ext2VolumeStartSector = 0; // Ext2 file system starting sector -U32 Ext2BlockSizeInBytes = 0; // Block size in bytes -U32 Ext2BlockSizeInSectors = 0; // Block size in sectors -U32 Ext2FragmentSizeInBytes = 0; // Fragment size in bytes -U32 Ext2FragmentSizeInSectors = 0; // Fragment size in sectors -U32 Ext2GroupCount = 0; // Number of groups in this file system -U32 Ext2InodesPerBlock = 0; // Number of inodes in one block -U32 Ext2GroupDescPerBlock = 0; // Number of group descriptors in one block +UCHAR Ext2DriveNumber = 0; // Ext2 file system drive number +ULONGLONG Ext2VolumeStartSector = 0; // Ext2 file system starting sector +ULONG Ext2BlockSizeInBytes = 0; // Block size in bytes +ULONG Ext2BlockSizeInSectors = 0; // Block size in sectors +ULONG Ext2FragmentSizeInBytes = 0; // Fragment size in bytes +ULONG Ext2FragmentSizeInSectors = 0; // Fragment size in sectors +ULONG Ext2GroupCount = 0; // Number of groups in this file system +ULONG Ext2InodesPerBlock = 0; // Number of inodes in one block +ULONG Ext2GroupDescPerBlock = 0; // Number of group descriptors in one block -BOOL Ext2OpenVolume(U8 DriveNumber, U64 VolumeStartSector) +BOOL Ext2OpenVolume(UCHAR DriveNumber, ULONGLONG VolumeStartSector) { DbgPrint((DPRINT_FILESYSTEM, "Ext2OpenVolume() DriveNumber = 0x%x VolumeStartSector = %d\n", DriveNumber, VolumeStartSector)); @@ -93,7 +93,7 @@ FILE* Ext2OpenFile(PUCHAR FileName) PEXT2_FILE_INFO FileHandle; UCHAR SymLinkPath[EXT3_NAME_LEN]; UCHAR FullPath[EXT3_NAME_LEN * 2]; - U32 Index; + ULONG Index; DbgPrint((DPRINT_FILESYSTEM, "Ext2OpenFile() FileName = %s\n", FileName)); @@ -193,10 +193,10 @@ FILE* Ext2OpenFile(PUCHAR FileName) BOOL Ext2LookupFile(PUCHAR FileName, PEXT2_FILE_INFO Ext2FileInfoPointer) { int i; - U32 NumberOfPathParts; + ULONG NumberOfPathParts; UCHAR PathPart[261]; PVOID DirectoryBuffer; - U32 DirectoryInode = EXT3_ROOT_INO; + ULONG DirectoryInode = EXT3_ROOT_INO; EXT2_INODE InodeData; EXT2_DIR_ENTRY DirectoryEntry; @@ -238,7 +238,7 @@ BOOL Ext2LookupFile(PUCHAR FileName, PEXT2_FILE_INFO Ext2FileInfoPointer) // // Search for file name in directory // - if (!Ext2SearchDirectoryBufferForFile(DirectoryBuffer, (U32)Ext2GetInodeFileSize(&InodeData), PathPart, &DirectoryEntry)) + if (!Ext2SearchDirectoryBufferForFile(DirectoryBuffer, (ULONG)Ext2GetInodeFileSize(&InodeData), PathPart, &DirectoryEntry)) { MmFreeMemory(DirectoryBuffer); return FALSE; @@ -289,9 +289,9 @@ BOOL Ext2LookupFile(PUCHAR FileName, PEXT2_FILE_INFO Ext2FileInfoPointer) return TRUE; } -BOOL Ext2SearchDirectoryBufferForFile(PVOID DirectoryBuffer, U32 DirectorySize, PUCHAR FileName, PEXT2_DIR_ENTRY DirectoryEntry) +BOOL Ext2SearchDirectoryBufferForFile(PVOID DirectoryBuffer, ULONG DirectorySize, PUCHAR FileName, PEXT2_DIR_ENTRY DirectoryEntry) { - U32 CurrentOffset; + ULONG CurrentOffset; PEXT2_DIR_ENTRY CurrentDirectoryEntry; DbgPrint((DPRINT_FILESYSTEM, "Ext2SearchDirectoryBufferForFile() DirectoryBuffer = 0x%x DirectorySize = %d FileName = %s\n", DirectoryBuffer, DirectorySize, FileName)); @@ -345,16 +345,16 @@ BOOL Ext2SearchDirectoryBufferForFile(PVOID DirectoryBuffer, U32 DirectorySize, * Reads BytesToRead from open file and * returns the number of bytes read in BytesRead */ -BOOL Ext2ReadFile(FILE *FileHandle, U64 BytesToRead, U64* BytesRead, PVOID Buffer) +BOOL Ext2ReadFile(FILE *FileHandle, ULONGLONG BytesToRead, ULONGLONG* BytesRead, PVOID Buffer) { PEXT2_FILE_INFO Ext2FileInfo = (PEXT2_FILE_INFO)FileHandle; - U32 BlockNumber; - U32 BlockNumberIndex; - U32 OffsetInBlock; - U32 LengthInBlock; - U32 NumberOfBlocks; + ULONG BlockNumber; + ULONG BlockNumberIndex; + ULONG OffsetInBlock; + ULONG LengthInBlock; + ULONG NumberOfBlocks; - DbgPrint((DPRINT_FILESYSTEM, "Ext2ReadFile() BytesToRead = %d Buffer = 0x%x\n", (U32)BytesToRead, Buffer)); + DbgPrint((DPRINT_FILESYSTEM, "Ext2ReadFile() BytesToRead = %d Buffer = 0x%x\n", (ULONG)BytesToRead, Buffer)); if (BytesRead != NULL) { @@ -529,7 +529,7 @@ BOOL Ext2ReadFile(FILE *FileHandle, U64 BytesToRead, U64* BytesRead, PVOID Buffe return TRUE; } -U64 Ext2GetFileSize(FILE *FileHandle) +ULONGLONG Ext2GetFileSize(FILE *FileHandle) { PEXT2_FILE_INFO Ext2FileHandle = (PEXT2_FILE_INFO)FileHandle; @@ -538,7 +538,7 @@ U64 Ext2GetFileSize(FILE *FileHandle) return Ext2FileHandle->FileSize; } -VOID Ext2SetFilePointer(FILE *FileHandle, U64 NewFilePointer) +VOID Ext2SetFilePointer(FILE *FileHandle, ULONGLONG NewFilePointer) { PEXT2_FILE_INFO Ext2FileHandle = (PEXT2_FILE_INFO)FileHandle; @@ -547,7 +547,7 @@ VOID Ext2SetFilePointer(FILE *FileHandle, U64 NewFilePointer) Ext2FileHandle->FilePointer = NewFilePointer; } -U64 Ext2GetFilePointer(FILE *FileHandle) +ULONGLONG Ext2GetFilePointer(FILE *FileHandle) { PEXT2_FILE_INFO Ext2FileHandle = (PEXT2_FILE_INFO)FileHandle; @@ -556,7 +556,7 @@ U64 Ext2GetFilePointer(FILE *FileHandle) return Ext2FileHandle->FilePointer; } -BOOL Ext2ReadVolumeSectors(U8 DriveNumber, U64 SectorNumber, U64 SectorCount, PVOID Buffer) +BOOL Ext2ReadVolumeSectors(UCHAR DriveNumber, ULONGLONG SectorNumber, ULONGLONG SectorCount, PVOID Buffer) { //GEOMETRY DiskGeometry; //BOOL ReturnValue; @@ -734,8 +734,8 @@ BOOL Ext2ReadSuperBlock(VOID) BOOL Ext2ReadGroupDescriptors(VOID) { - U32 GroupDescBlockCount; - U32 CurrentGroupDescBlock; + ULONG GroupDescBlockCount; + ULONG CurrentGroupDescBlock; DbgPrint((DPRINT_FILESYSTEM, "Ext2ReadGroupDescriptors()\n")); @@ -778,7 +778,7 @@ BOOL Ext2ReadGroupDescriptors(VOID) return TRUE; } -BOOL Ext2ReadDirectory(U32 Inode, PVOID* DirectoryBuffer, PEXT2_INODE InodePointer) +BOOL Ext2ReadDirectory(ULONG Inode, PVOID* DirectoryBuffer, PEXT2_INODE InodePointer) { EXT2_FILE_INFO DirectoryFileInfo; @@ -837,7 +837,7 @@ BOOL Ext2ReadDirectory(U32 Inode, PVOID* DirectoryBuffer, PEXT2_INODE InodePoint return TRUE; } -BOOL Ext2ReadBlock(U32 BlockNumber, PVOID Buffer) +BOOL Ext2ReadBlock(ULONG BlockNumber, PVOID Buffer) { UCHAR ErrorString[80]; @@ -861,14 +861,14 @@ BOOL Ext2ReadBlock(U32 BlockNumber, PVOID Buffer) return TRUE; } - return Ext2ReadVolumeSectors(Ext2DriveNumber, (U64)BlockNumber * Ext2BlockSizeInSectors, Ext2BlockSizeInSectors, Buffer); + return Ext2ReadVolumeSectors(Ext2DriveNumber, (ULONGLONG)BlockNumber * Ext2BlockSizeInSectors, Ext2BlockSizeInSectors, Buffer); } /* * Ext2ReadPartialBlock() * Reads part of a block into memory */ -BOOL Ext2ReadPartialBlock(U32 BlockNumber, U32 StartingOffset, U32 Length, PVOID Buffer) +BOOL Ext2ReadPartialBlock(ULONG BlockNumber, ULONG StartingOffset, ULONG Length, PVOID Buffer) { DbgPrint((DPRINT_FILESYSTEM, "Ext2ReadPartialBlock() BlockNumber = %d StartingOffset = %d Length = %d Buffer = 0x%x\n", BlockNumber, StartingOffset, Length, Buffer)); @@ -883,36 +883,36 @@ BOOL Ext2ReadPartialBlock(U32 BlockNumber, U32 StartingOffset, U32 Length, PVOID return TRUE; } -U32 Ext2GetGroupDescBlockNumber(U32 Group) +ULONG Ext2GetGroupDescBlockNumber(ULONG Group) { return (((Group * sizeof(EXT2_GROUP_DESC)) / Ext2GroupDescPerBlock) + Ext2SuperBlock->s_first_data_block + 1); } -U32 Ext2GetGroupDescOffsetInBlock(U32 Group) +ULONG Ext2GetGroupDescOffsetInBlock(ULONG Group) { return ((Group * sizeof(EXT2_GROUP_DESC)) % Ext2GroupDescPerBlock); } -U32 Ext2GetInodeGroupNumber(U32 Inode) +ULONG Ext2GetInodeGroupNumber(ULONG Inode) { return ((Inode - 1) / Ext2SuperBlock->s_inodes_per_group); } -U32 Ext2GetInodeBlockNumber(U32 Inode) +ULONG Ext2GetInodeBlockNumber(ULONG Inode) { return (((Inode - 1) % Ext2SuperBlock->s_inodes_per_group) / Ext2InodesPerBlock); } -U32 Ext2GetInodeOffsetInBlock(U32 Inode) +ULONG Ext2GetInodeOffsetInBlock(ULONG Inode) { return (((Inode - 1) % Ext2SuperBlock->s_inodes_per_group) % Ext2InodesPerBlock); } -BOOL Ext2ReadInode(U32 Inode, PEXT2_INODE InodeBuffer) +BOOL Ext2ReadInode(ULONG Inode, PEXT2_INODE InodeBuffer) { - U32 InodeGroupNumber; - U32 InodeBlockNumber; - U32 InodeOffsetInBlock; + ULONG InodeGroupNumber; + ULONG InodeBlockNumber; + ULONG InodeOffsetInBlock; UCHAR ErrorString[80]; EXT2_GROUP_DESC GroupDescriptor; @@ -978,7 +978,7 @@ BOOL Ext2ReadInode(U32 Inode, PEXT2_INODE InodeBuffer) return TRUE; } -BOOL Ext2ReadGroupDescriptor(U32 Group, PEXT2_GROUP_DESC GroupBuffer) +BOOL Ext2ReadGroupDescriptor(ULONG Group, PEXT2_GROUP_DESC GroupBuffer) { DbgPrint((DPRINT_FILESYSTEM, "Ext2ReadGroupDescriptor()\n")); @@ -1002,13 +1002,13 @@ BOOL Ext2ReadGroupDescriptor(U32 Group, PEXT2_GROUP_DESC GroupBuffer) return TRUE; } -U32* Ext2ReadBlockPointerList(PEXT2_INODE Inode) +ULONG* Ext2ReadBlockPointerList(PEXT2_INODE Inode) { - U64 FileSize; - U32 BlockCount; - U32* BlockList; - U32 CurrentBlockInList; - U32 CurrentBlock; + ULONGLONG FileSize; + ULONG BlockCount; + ULONG* BlockList; + ULONG CurrentBlockInList; + ULONG CurrentBlock; DbgPrint((DPRINT_FILESYSTEM, "Ext2ReadBlockPointerList()\n")); @@ -1023,13 +1023,13 @@ U32* Ext2ReadBlockPointerList(PEXT2_INODE Inode) BlockCount = (FileSize / Ext2BlockSizeInBytes); // Allocate the memory for the block list - BlockList = MmAllocateMemory(BlockCount * sizeof(U32)); + BlockList = MmAllocateMemory(BlockCount * sizeof(ULONG)); if (BlockList == NULL) { return NULL; } - RtlZeroMemory(BlockList, BlockCount * sizeof(U32)); + RtlZeroMemory(BlockList, BlockCount * sizeof(ULONG)); CurrentBlockInList = 0; // Copy the direct block pointers @@ -1072,27 +1072,27 @@ U32* Ext2ReadBlockPointerList(PEXT2_INODE Inode) return BlockList; } -U64 Ext2GetInodeFileSize(PEXT2_INODE Inode) +ULONGLONG Ext2GetInodeFileSize(PEXT2_INODE Inode) { if ((Inode->i_mode & EXT2_S_IFMT) == EXT2_S_IFDIR) { - return (U64)(Inode->i_size); + return (ULONGLONG)(Inode->i_size); } else { - return ((U64)(Inode->i_size) | ((U64)(Inode->i_dir_acl) << 32)); + return ((ULONGLONG)(Inode->i_size) | ((ULONGLONG)(Inode->i_dir_acl) << 32)); } } -BOOL Ext2CopyIndirectBlockPointers(U32* BlockList, U32* CurrentBlockInList, U32 BlockCount, U32 IndirectBlock) +BOOL Ext2CopyIndirectBlockPointers(ULONG* BlockList, ULONG* CurrentBlockInList, ULONG BlockCount, ULONG IndirectBlock) { - U32* BlockBuffer = (U32*)FILESYSBUFFER; - U32 CurrentBlock; - U32 BlockPointersPerBlock; + ULONG* BlockBuffer = (ULONG*)FILESYSBUFFER; + ULONG CurrentBlock; + ULONG BlockPointersPerBlock; DbgPrint((DPRINT_FILESYSTEM, "Ext2CopyIndirectBlockPointers() BlockCount = %d\n", BlockCount)); - BlockPointersPerBlock = Ext2BlockSizeInBytes / sizeof(U32); + BlockPointersPerBlock = Ext2BlockSizeInBytes / sizeof(ULONG); if (!Ext2ReadBlock(IndirectBlock, BlockBuffer)) { @@ -1108,17 +1108,17 @@ BOOL Ext2CopyIndirectBlockPointers(U32* BlockList, U32* CurrentBlockInList, U32 return TRUE; } -BOOL Ext2CopyDoubleIndirectBlockPointers(U32* BlockList, U32* CurrentBlockInList, U32 BlockCount, U32 DoubleIndirectBlock) +BOOL Ext2CopyDoubleIndirectBlockPointers(ULONG* BlockList, ULONG* CurrentBlockInList, ULONG BlockCount, ULONG DoubleIndirectBlock) { - U32* BlockBuffer; - U32 CurrentBlock; - U32 BlockPointersPerBlock; + ULONG* BlockBuffer; + ULONG CurrentBlock; + ULONG BlockPointersPerBlock; DbgPrint((DPRINT_FILESYSTEM, "Ext2CopyDoubleIndirectBlockPointers() BlockCount = %d\n", BlockCount)); - BlockPointersPerBlock = Ext2BlockSizeInBytes / sizeof(U32); + BlockPointersPerBlock = Ext2BlockSizeInBytes / sizeof(ULONG); - BlockBuffer = (U32*)MmAllocateMemory(Ext2BlockSizeInBytes); + BlockBuffer = (ULONG*)MmAllocateMemory(Ext2BlockSizeInBytes); if (BlockBuffer == NULL) { return FALSE; @@ -1143,17 +1143,17 @@ BOOL Ext2CopyDoubleIndirectBlockPointers(U32* BlockList, U32* CurrentBlockInList return TRUE; } -BOOL Ext2CopyTripleIndirectBlockPointers(U32* BlockList, U32* CurrentBlockInList, U32 BlockCount, U32 TripleIndirectBlock) +BOOL Ext2CopyTripleIndirectBlockPointers(ULONG* BlockList, ULONG* CurrentBlockInList, ULONG BlockCount, ULONG TripleIndirectBlock) { - U32* BlockBuffer; - U32 CurrentBlock; - U32 BlockPointersPerBlock; + ULONG* BlockBuffer; + ULONG CurrentBlock; + ULONG BlockPointersPerBlock; DbgPrint((DPRINT_FILESYSTEM, "Ext2CopyTripleIndirectBlockPointers() BlockCount = %d\n", BlockCount)); - BlockPointersPerBlock = Ext2BlockSizeInBytes / sizeof(U32); + BlockPointersPerBlock = Ext2BlockSizeInBytes / sizeof(ULONG); - BlockBuffer = (U32*)MmAllocateMemory(Ext2BlockSizeInBytes); + BlockBuffer = (ULONG*)MmAllocateMemory(Ext2BlockSizeInBytes); if (BlockBuffer == NULL) { return FALSE; diff --git a/reactos/boot/freeldr/freeldr/fs/ext2.h b/reactos/boot/freeldr/freeldr/fs/ext2.h index 8204f1eac3e..5f3f02d6eed 100644 --- a/reactos/boot/freeldr/freeldr/fs/ext2.h +++ b/reactos/boot/freeldr/freeldr/fs/ext2.h @@ -113,7 +113,7 @@ # define EXT3_BLOCK_SIZE(s) (EXT3_MIN_BLOCK_SIZE << (s)->s_log_block_size) #endif #define EXT3_ACLE_PER_BLOCK(s) (EXT3_BLOCK_SIZE(s) / sizeof (struct ext3_acl_entry)) -#define EXT3_ADDR_PER_BLOCK(s) (EXT3_BLOCK_SIZE(s) / sizeof (__u32)) +#define EXT3_ADDR_PER_BLOCK(s) (EXT3_BLOCK_SIZE(s) / sizeof (ULONG)) #ifdef __KERNEL__ # define EXT3_BLOCK_SIZE_BITS(s) ((s)->s_blocksize_bits) #else @@ -151,20 +151,20 @@ */ struct ext3_acl_header /* Header of Access Control Lists */ { - __u32 aclh_size; - __u32 aclh_file_count; - __u32 aclh_acle_count; - __u32 aclh_first_acle; + ULONG aclh_size; + ULONG aclh_file_count; + ULONG aclh_acle_count; + ULONG aclh_first_acle; }; struct ext3_acl_entry /* Access Control List Entry */ { - __u32 acle_size; - __u16 acle_perms; /* Access permissions */ - __u16 acle_type; /* Type of entry */ - __u16 acle_tag; /* User or group identity */ - __u16 acle_pad1; - __u32 acle_next; /* Pointer on next entry for the */ + ULONG acle_size; + USHORT acle_perms; /* Access permissions */ + USHORT acle_type; /* Type of entry */ + USHORT acle_tag; /* User or group identity */ + USHORT acle_pad1; + ULONG acle_next; /* Pointer on next entry for the */ /* same inode or on next free entry */ }; @@ -173,14 +173,14 @@ struct ext3_acl_entry /* Access Control List Entry */ */ struct ext3_group_desc { - __u32 bg_block_bitmap; /* Blocks bitmap block */ - __u32 bg_inode_bitmap; /* Inodes bitmap block */ - __u32 bg_inode_table; /* Inodes table block */ - __u16 bg_free_blocks_count; /* Free blocks count */ - __u16 bg_free_inodes_count; /* Free inodes count */ - __u16 bg_used_dirs_count; /* Directories count */ - __u16 bg_pad; - __u32 bg_reserved[3]; + ULONG bg_block_bitmap; /* Blocks bitmap block */ + ULONG bg_inode_bitmap; /* Inodes bitmap block */ + ULONG bg_inode_table; /* Inodes table block */ + USHORT bg_free_blocks_count; /* Free blocks count */ + USHORT bg_free_inodes_count; /* Free inodes count */ + USHORT bg_used_dirs_count; /* Directories count */ + USHORT bg_pad; + ULONG bg_reserved[3]; }; /* @@ -254,55 +254,55 @@ struct ext3_group_desc * Structure of an inode on the disk */ struct ext3_inode { - __u16 i_mode; /* File mode */ - __u16 i_uid; /* Low 16 bits of Owner Uid */ - __u32 i_size; /* Size in bytes */ - __u32 i_atime; /* Access time */ - __u32 i_ctime; /* Creation time */ - __u32 i_mtime; /* Modification time */ - __u32 i_dtime; /* Deletion Time */ - __u16 i_gid; /* Low 16 bits of Group Id */ - __u16 i_links_count; /* Links count */ - __u32 i_blocks; /* Blocks count */ - __u32 i_flags; /* File flags */ + USHORT i_mode; /* File mode */ + USHORT i_uid; /* Low 16 bits of Owner Uid */ + ULONG i_size; /* Size in bytes */ + ULONG i_atime; /* Access time */ + ULONG i_ctime; /* Creation time */ + ULONG i_mtime; /* Modification time */ + ULONG i_dtime; /* Deletion Time */ + USHORT i_gid; /* Low 16 bits of Group Id */ + USHORT i_links_count; /* Links count */ + ULONG i_blocks; /* Blocks count */ + ULONG i_flags; /* File flags */ union { struct { - __u32 l_i_reserved1; + ULONG l_i_reserved1; } linux1; struct { - __u32 h_i_translator; + ULONG h_i_translator; } hurd1; struct { - __u32 m_i_reserved1; + ULONG m_i_reserved1; } masix1; } osd1; /* OS dependent 1 */ - __u32 i_block[EXT3_N_BLOCKS];/* Pointers to blocks */ - __u32 i_generation; /* File version (for NFS) */ - __u32 i_file_acl; /* File ACL */ - __u32 i_dir_acl; /* Directory ACL */ - __u32 i_faddr; /* Fragment address */ + ULONG i_block[EXT3_N_BLOCKS];/* Pointers to blocks */ + ULONG i_generation; /* File version (for NFS) */ + ULONG i_file_acl; /* File ACL */ + ULONG i_dir_acl; /* Directory ACL */ + ULONG i_faddr; /* Fragment address */ union { struct { - __u8 l_i_frag; /* Fragment number */ - __u8 l_i_fsize; /* Fragment size */ - __u16 i_pad1; - __u16 l_i_uid_high; /* these 2 fields */ - __u16 l_i_gid_high; /* were reserved2[0] */ - __u32 l_i_reserved2; + UCHAR l_i_frag; /* Fragment number */ + UCHAR l_i_fsize; /* Fragment size */ + USHORT i_pad1; + USHORT l_i_uid_high; /* these 2 fields */ + USHORT l_i_gid_high; /* were reserved2[0] */ + ULONG l_i_reserved2; } linux2; struct { - __u8 h_i_frag; /* Fragment number */ - __u8 h_i_fsize; /* Fragment size */ - __u16 h_i_mode_high; - __u16 h_i_uid_high; - __u16 h_i_gid_high; - __u32 h_i_author; + UCHAR h_i_frag; /* Fragment number */ + UCHAR h_i_fsize; /* Fragment size */ + USHORT h_i_mode_high; + USHORT h_i_uid_high; + USHORT h_i_gid_high; + ULONG h_i_author; } hurd2; struct { - __u8 m_i_frag; /* Fragment number */ - __u8 m_i_fsize; /* Fragment size */ - __u16 m_pad1; - __u32 m_i_reserved2[2]; + UCHAR m_i_frag; /* Fragment number */ + UCHAR m_i_fsize; /* Fragment size */ + USHORT m_pad1; + ULONG m_i_reserved2[2]; } masix2; } osd2; /* OS dependent 2 */ }; @@ -398,31 +398,31 @@ struct ext3_inode { * Structure of the super block */ struct ext3_super_block { -/*00*/ __u32 s_inodes_count; /* Inodes count */ - __u32 s_blocks_count; /* Blocks count */ - __u32 s_r_blocks_count; /* Reserved blocks count */ - __u32 s_free_blocks_count; /* Free blocks count */ -/*10*/ __u32 s_free_inodes_count; /* Free inodes count */ - __u32 s_first_data_block; /* First Data Block */ - __u32 s_log_block_size; /* Block size */ - __s32 s_log_frag_size; /* Fragment size */ -/*20*/ __u32 s_blocks_per_group; /* # Blocks per group */ - __u32 s_frags_per_group; /* # Fragments per group */ - __u32 s_inodes_per_group; /* # Inodes per group */ - __u32 s_mtime; /* Mount time */ -/*30*/ __u32 s_wtime; /* Write time */ - __u16 s_mnt_count; /* Mount count */ - __s16 s_max_mnt_count; /* Maximal mount count */ - __u16 s_magic; /* Magic signature */ - __u16 s_state; /* File system state */ - __u16 s_errors; /* Behaviour when detecting errors */ - __u16 s_minor_rev_level; /* minor revision level */ -/*40*/ __u32 s_lastcheck; /* time of last check */ - __u32 s_checkinterval; /* max. time between checks */ - __u32 s_creator_os; /* OS */ - __u32 s_rev_level; /* Revision level */ -/*50*/ __u16 s_def_resuid; /* Default uid for reserved blocks */ - __u16 s_def_resgid; /* Default gid for reserved blocks */ +/*00*/ ULONG s_inodes_count; /* Inodes count */ + ULONG s_blocks_count; /* Blocks count */ + ULONG s_r_blocks_count; /* Reserved blocks count */ + ULONG s_free_blocks_count; /* Free blocks count */ +/*10*/ ULONG s_free_inodes_count; /* Free inodes count */ + ULONG s_first_data_block; /* First Data Block */ + ULONG s_log_block_size; /* Block size */ + LONG s_log_frag_size; /* Fragment size */ +/*20*/ ULONG s_blocks_per_group; /* # Blocks per group */ + ULONG s_frags_per_group; /* # Fragments per group */ + ULONG s_inodes_per_group; /* # Inodes per group */ + ULONG s_mtime; /* Mount time */ +/*30*/ ULONG s_wtime; /* Write time */ + USHORT s_mnt_count; /* Mount count */ + SHORT s_max_mnt_count; /* Maximal mount count */ + USHORT s_magic; /* Magic signature */ + USHORT s_state; /* File system state */ + USHORT s_errors; /* Behaviour when detecting errors */ + USHORT s_minor_rev_level; /* minor revision level */ +/*40*/ ULONG s_lastcheck; /* time of last check */ + ULONG s_checkinterval; /* max. time between checks */ + ULONG s_creator_os; /* OS */ + ULONG s_rev_level; /* Revision level */ +/*50*/ USHORT s_def_resuid; /* Default uid for reserved blocks */ + USHORT s_def_resgid; /* Default gid for reserved blocks */ /* * These fields are for EXT3_DYNAMIC_REV superblocks only. * @@ -436,32 +436,32 @@ struct ext3_super_block { * feature set, it must abort and not try to meddle with * things it doesn't understand... */ - __u32 s_first_ino; /* First non-reserved inode */ - __u16 s_inode_size; /* size of inode structure */ - __u16 s_block_group_nr; /* block group # of this superblock */ - __u32 s_feature_compat; /* compatible feature set */ -/*60*/ __u32 s_feature_incompat; /* incompatible feature set */ - __u32 s_feature_ro_compat; /* readonly-compatible feature set */ -/*68*/ __u8 s_uuid[16]; /* 128-bit uuid for volume */ + ULONG s_first_ino; /* First non-reserved inode */ + USHORT s_inode_size; /* size of inode structure */ + USHORT s_block_group_nr; /* block group # of this superblock */ + ULONG s_feature_compat; /* compatible feature set */ +/*60*/ ULONG s_feature_incompat; /* incompatible feature set */ + ULONG s_feature_ro_compat; /* readonly-compatible feature set */ +/*68*/ UCHAR s_uuid[16]; /* 128-bit uuid for volume */ /*78*/ char s_volume_name[16]; /* volume name */ /*88*/ char s_last_mounted[64]; /* directory where last mounted */ -/*C8*/ __u32 s_algorithm_usage_bitmap; /* For compression */ +/*C8*/ ULONG s_algorithm_usage_bitmap; /* For compression */ /* * Performance hints. Directory preallocation should only * happen if the EXT3_FEATURE_COMPAT_DIR_PREALLOC flag is on. */ - __u8 s_prealloc_blocks; /* Nr of blocks to try to preallocate*/ - __u8 s_prealloc_dir_blocks; /* Nr to preallocate for dirs */ - __u16 s_padding1; + UCHAR s_prealloc_blocks; /* Nr of blocks to try to preallocate*/ + UCHAR s_prealloc_dir_blocks; /* Nr to preallocate for dirs */ + USHORT s_padding1; /* * Journaling support valid if EXT3_FEATURE_COMPAT_HAS_JOURNAL set. */ -/*D0*/ __u8 s_journal_uuid[16]; /* uuid of journal superblock */ -/*E0*/ __u32 s_journal_inum; /* inode number of journal file */ - __u32 s_journal_dev; /* device number of journal file */ - __u32 s_last_orphan; /* start of list of inodes to delete */ +/*D0*/ UCHAR s_journal_uuid[16]; /* uuid of journal superblock */ +/*E0*/ ULONG s_journal_inum; /* inode number of journal file */ + ULONG s_journal_dev; /* device number of journal file */ + ULONG s_last_orphan; /* start of list of inodes to delete */ -/*EC*/ __u32 s_reserved[197]; /* Padding to the end of the block */ +/*EC*/ ULONG s_reserved[197]; /* Padding to the end of the block */ }; #ifdef __KERNEL__ @@ -555,9 +555,9 @@ struct ext3_super_block { #define EXT3_NAME_LEN 255 struct ext3_dir_entry { - __u32 inode; /* Inode number */ - __u16 rec_len; /* Directory entry length */ - __u16 name_len; /* Name length */ + ULONG inode; /* Inode number */ + USHORT rec_len; /* Directory entry length */ + USHORT name_len; /* Name length */ char name[EXT3_NAME_LEN]; /* File name */ }; @@ -568,10 +568,10 @@ struct ext3_dir_entry { * file_type field. */ struct ext3_dir_entry_2 { - __u32 inode; /* Inode number */ - __u16 rec_len; /* Directory entry length */ - __u8 name_len; /* Name length */ - __u8 file_type; + ULONG inode; /* Inode number */ + USHORT rec_len; /* Directory entry length */ + UCHAR name_len; /* Name length */ + UCHAR file_type; char name[EXT3_NAME_LEN]; /* File name */ }; @@ -653,45 +653,45 @@ typedef struct ext3_dir_entry_2 EXT2_DIR_ENTRY, *PEXT2_DIR_ENTRY; #define EXT2_S_IFLNK 0xA000 // Symbolic link #define EXT2_S_IFSOCK 0xC000 // Socket -#define FAST_SYMLINK_MAX_NAME_SIZE (EXT3_N_BLOCKS * sizeof(U32)) /* 60 bytes */ +#define FAST_SYMLINK_MAX_NAME_SIZE (EXT3_N_BLOCKS * sizeof(ULONG)) /* 60 bytes */ typedef struct { - U64 FileSize; // File size - U64 FilePointer; // File pointer - U32* FileBlockList; // File block list - U8 DriveNumber; // Drive number of open file + ULONGLONG FileSize; // File size + ULONGLONG FilePointer; // File pointer + ULONG* FileBlockList; // File block list + UCHAR DriveNumber; // Drive number of open file EXT2_INODE Inode; // File's inode } EXT2_FILE_INFO, * PEXT2_FILE_INFO; -BOOL Ext2OpenVolume(U8 DriveNumber, U64 VolumeStartSector); +BOOL Ext2OpenVolume(UCHAR DriveNumber, ULONGLONG VolumeStartSector); FILE* Ext2OpenFile(PUCHAR FileName); BOOL Ext2LookupFile(PUCHAR FileName, PEXT2_FILE_INFO Ext2FileInfoPointer); -BOOL Ext2SearchDirectoryBufferForFile(PVOID DirectoryBuffer, U32 DirectorySize, PUCHAR FileName, PEXT2_DIR_ENTRY DirectoryEntry); -BOOL Ext2ReadFile(FILE *FileHandle, U64 BytesToRead, U64* BytesRead, PVOID Buffer); -U64 Ext2GetFileSize(FILE *FileHandle); -VOID Ext2SetFilePointer(FILE *FileHandle, U64 NewFilePointer); -U64 Ext2GetFilePointer(FILE *FileHandle); -BOOL Ext2ReadVolumeSectors(U8 DriveNumber, U64 SectorNumber, U64 SectorCount, PVOID Buffer); +BOOL Ext2SearchDirectoryBufferForFile(PVOID DirectoryBuffer, ULONG DirectorySize, PUCHAR FileName, PEXT2_DIR_ENTRY DirectoryEntry); +BOOL Ext2ReadFile(FILE *FileHandle, ULONGLONG BytesToRead, ULONGLONG* BytesRead, PVOID Buffer); +ULONGLONG Ext2GetFileSize(FILE *FileHandle); +VOID Ext2SetFilePointer(FILE *FileHandle, ULONGLONG NewFilePointer); +ULONGLONG Ext2GetFilePointer(FILE *FileHandle); +BOOL Ext2ReadVolumeSectors(UCHAR DriveNumber, ULONGLONG SectorNumber, ULONGLONG SectorCount, PVOID Buffer); BOOL Ext2ReadSuperBlock(VOID); BOOL Ext2ReadGroupDescriptors(VOID); -BOOL Ext2ReadDirectory(U32 Inode, PVOID* DirectoryBuffer, PEXT2_INODE InodePointer); -BOOL Ext2ReadBlock(U32 BlockNumber, PVOID Buffer); -BOOL Ext2ReadPartialBlock(U32 BlockNumber, U32 StartingOffset, U32 Length, PVOID Buffer); -U32 Ext2GetGroupDescBlockNumber(U32 Group); -U32 Ext2GetGroupDescOffsetInBlock(U32 Group); -U32 Ext2GetInodeGroupNumber(U32 Inode); -U32 Ext2GetInodeBlockNumber(U32 Inode); -U32 Ext2GetInodeOffsetInBlock(U32 Inode); -BOOL Ext2ReadInode(U32 Inode, PEXT2_INODE InodeBuffer); -BOOL Ext2ReadGroupDescriptor(U32 Group, PEXT2_GROUP_DESC GroupBuffer); -U32* Ext2ReadBlockPointerList(PEXT2_INODE Inode); -U64 Ext2GetInodeFileSize(PEXT2_INODE Inode); -BOOL Ext2CopyIndirectBlockPointers(U32* BlockList, U32* CurrentBlockInList, U32 BlockCount, U32 IndirectBlock); -BOOL Ext2CopyDoubleIndirectBlockPointers(U32* BlockList, U32* CurrentBlockInList, U32 BlockCount, U32 DoubleIndirectBlock); -BOOL Ext2CopyTripleIndirectBlockPointers(U32* BlockList, U32* CurrentBlockInList, U32 BlockCount, U32 TripleIndirectBlock); +BOOL Ext2ReadDirectory(ULONG Inode, PVOID* DirectoryBuffer, PEXT2_INODE InodePointer); +BOOL Ext2ReadBlock(ULONG BlockNumber, PVOID Buffer); +BOOL Ext2ReadPartialBlock(ULONG BlockNumber, ULONG StartingOffset, ULONG Length, PVOID Buffer); +ULONG Ext2GetGroupDescBlockNumber(ULONG Group); +ULONG Ext2GetGroupDescOffsetInBlock(ULONG Group); +ULONG Ext2GetInodeGroupNumber(ULONG Inode); +ULONG Ext2GetInodeBlockNumber(ULONG Inode); +ULONG Ext2GetInodeOffsetInBlock(ULONG Inode); +BOOL Ext2ReadInode(ULONG Inode, PEXT2_INODE InodeBuffer); +BOOL Ext2ReadGroupDescriptor(ULONG Group, PEXT2_GROUP_DESC GroupBuffer); +ULONG* Ext2ReadBlockPointerList(PEXT2_INODE Inode); +ULONGLONG Ext2GetInodeFileSize(PEXT2_INODE Inode); +BOOL Ext2CopyIndirectBlockPointers(ULONG* BlockList, ULONG* CurrentBlockInList, ULONG BlockCount, ULONG IndirectBlock); +BOOL Ext2CopyDoubleIndirectBlockPointers(ULONG* BlockList, ULONG* CurrentBlockInList, ULONG BlockCount, ULONG DoubleIndirectBlock); +BOOL Ext2CopyTripleIndirectBlockPointers(ULONG* BlockList, ULONG* CurrentBlockInList, ULONG BlockCount, ULONG TripleIndirectBlock); #endif // #defined __EXT2_H diff --git a/reactos/boot/freeldr/freeldr/fs/fat.c b/reactos/boot/freeldr/freeldr/fs/fat.c index 65f8a95a043..973cf55383c 100644 --- a/reactos/boot/freeldr/freeldr/fs/fat.c +++ b/reactos/boot/freeldr/freeldr/fs/fat.c @@ -29,25 +29,25 @@ #include #include -U32 BytesPerSector; /* Number of bytes per sector */ -U32 SectorsPerCluster; /* Number of sectors per cluster */ -U32 FatVolumeStartSector; /* Absolute starting sector of the partition */ -U32 FatSectorStart; /* Starting sector of 1st FAT table */ -U32 ActiveFatSectorStart; /* Starting sector of active FAT table */ -U32 NumberOfFats; /* Number of FAT tables */ -U32 SectorsPerFat; /* Sectors per FAT table */ -U32 RootDirSectorStart; /* Starting sector of the root directory (non-fat32) */ -U32 RootDirSectors; /* Number of sectors of the root directory (non-fat32) */ -U32 RootDirStartCluster; /* Starting cluster number of the root directory (fat32 only) */ -U32 DataSectorStart; /* Starting sector of the data area */ +ULONG BytesPerSector; /* Number of bytes per sector */ +ULONG SectorsPerCluster; /* Number of sectors per cluster */ +ULONG FatVolumeStartSector; /* Absolute starting sector of the partition */ +ULONG FatSectorStart; /* Starting sector of 1st FAT table */ +ULONG ActiveFatSectorStart; /* Starting sector of active FAT table */ +ULONG NumberOfFats; /* Number of FAT tables */ +ULONG SectorsPerFat; /* Sectors per FAT table */ +ULONG RootDirSectorStart; /* Starting sector of the root directory (non-fat32) */ +ULONG RootDirSectors; /* Number of sectors of the root directory (non-fat32) */ +ULONG RootDirStartCluster; /* Starting cluster number of the root directory (fat32 only) */ +ULONG DataSectorStart; /* Starting sector of the data area */ -U32 FatType = 0; /* FAT12, FAT16, FAT32, FATX16 or FATX32 */ -U32 FatDriveNumber = 0; +ULONG FatType = 0; /* FAT12, FAT16, FAT32, FATX16 or FATX32 */ +ULONG FatDriveNumber = 0; -BOOL FatOpenVolume(U32 DriveNumber, U32 VolumeStartSector, U32 PartitionSectorCount) +BOOL FatOpenVolume(ULONG DriveNumber, ULONG VolumeStartSector, ULONG PartitionSectorCount) { char ErrMsg[80]; - U32 FatSize; + ULONG FatSize; PFAT_BOOTSECTOR FatVolumeBootSector; PFAT32_BOOTSECTOR Fat32VolumeBootSector; PFATX_BOOTSECTOR FatXVolumeBootSector; @@ -288,13 +288,13 @@ BOOL FatOpenVolume(U32 DriveNumber, U32 VolumeStartSector, U32 PartitionSectorCo return TRUE; } -U32 FatDetermineFatType(PFAT_BOOTSECTOR FatBootSector, U32 PartitionSectorCount) +ULONG FatDetermineFatType(PFAT_BOOTSECTOR FatBootSector, ULONG PartitionSectorCount) { - U32 RootDirSectors; - U32 DataSectorCount; - U32 SectorsPerFat; - U32 TotalSectors; - U32 CountOfClusters; + ULONG RootDirSectors; + ULONG DataSectorCount; + ULONG SectorsPerFat; + ULONG TotalSectors; + ULONG CountOfClusters; PFAT32_BOOTSECTOR Fat32BootSector = (PFAT32_BOOTSECTOR)FatBootSector; PFATX_BOOTSECTOR FatXBootSector = (PFATX_BOOTSECTOR)FatBootSector; @@ -343,7 +343,7 @@ U32 FatDetermineFatType(PFAT_BOOTSECTOR FatBootSector, U32 PartitionSectorCount) } } -PVOID FatBufferDirectory(U32 DirectoryStartCluster, U32 *DirectorySize, BOOL RootDirectory) +PVOID FatBufferDirectory(ULONG DirectoryStartCluster, ULONG *DirectorySize, BOOL RootDirectory) { PVOID DirectoryBuffer; @@ -405,15 +405,15 @@ PVOID FatBufferDirectory(U32 DirectoryStartCluster, U32 *DirectorySize, BOOL Roo return DirectoryBuffer; } -BOOL FatSearchDirectoryBufferForFile(PVOID DirectoryBuffer, U32 DirectorySize, PUCHAR FileName, PFAT_FILE_INFO FatFileInfoPointer) +BOOL FatSearchDirectoryBufferForFile(PVOID DirectoryBuffer, ULONG DirectorySize, PUCHAR FileName, PFAT_FILE_INFO FatFileInfoPointer) { - U32 EntryCount; - U32 CurrentEntry; + ULONG EntryCount; + ULONG CurrentEntry; PDIRENTRY DirEntry; PLFN_DIRENTRY LfnDirEntry; UCHAR LfnNameBuffer[265]; UCHAR ShortNameBuffer[20]; - U32 StartCluster; + ULONG StartCluster; EntryCount = DirectorySize / sizeof(DIRENTRY); @@ -590,7 +590,7 @@ BOOL FatSearchDirectoryBufferForFile(PVOID DirectoryBuffer, U32 DirectorySize, P // // Get the cluster chain // - StartCluster = ((U32)DirEntry->ClusterHigh << 16) + DirEntry->ClusterLow; + StartCluster = ((ULONG)DirEntry->ClusterHigh << 16) + DirEntry->ClusterLow; DbgPrint((DPRINT_FILESYSTEM, "StartCluster = 0x%x\n", StartCluster)); FatFileInfoPointer->FileFatChain = FatGetClusterChainArray(StartCluster); @@ -616,12 +616,12 @@ BOOL FatSearchDirectoryBufferForFile(PVOID DirectoryBuffer, U32 DirectorySize, P return FALSE; } -BOOL FatXSearchDirectoryBufferForFile(PVOID DirectoryBuffer, U32 DirectorySize, PUCHAR FileName, PFAT_FILE_INFO FatFileInfoPointer) +BOOL FatXSearchDirectoryBufferForFile(PVOID DirectoryBuffer, ULONG DirectorySize, PUCHAR FileName, PFAT_FILE_INFO FatFileInfoPointer) { - U32 EntryCount; - U32 CurrentEntry; + ULONG EntryCount; + ULONG CurrentEntry; PFATX_DIRENTRY DirEntry; - U32 FileNameLen; + ULONG FileNameLen; EntryCount = DirectorySize / sizeof(FATX_DIRENTRY); @@ -690,11 +690,11 @@ BOOL FatXSearchDirectoryBufferForFile(PVOID DirectoryBuffer, U32 DirectorySize, BOOL FatLookupFile(PUCHAR FileName, PFAT_FILE_INFO FatFileInfoPointer) { int i; - U32 NumberOfPathParts; + ULONG NumberOfPathParts; UCHAR PathPart[261]; PVOID DirectoryBuffer; - U32 DirectoryStartCluster = 0; - U32 DirectorySize; + ULONG DirectoryStartCluster = 0; + ULONG DirectorySize; FAT_FILE_INFO FatFileInfo; DbgPrint((DPRINT_FILESYSTEM, "FatLookupFile() FileName = %s\n", FileName)); @@ -779,7 +779,7 @@ BOOL FatLookupFile(PUCHAR FileName, PFAT_FILE_INFO FatFileInfoPointer) */ void FatParseShortFileName(PUCHAR Buffer, PDIRENTRY DirEntry) { - U32 Idx; + ULONG Idx; Idx = 0; RtlZeroMemory(Buffer, 13); @@ -824,9 +824,9 @@ void FatParseShortFileName(PUCHAR Buffer, PDIRENTRY DirEntry) * FatGetFatEntry() * returns the Fat entry for a given cluster number */ -BOOL FatGetFatEntry(U32 Cluster, U32* ClusterPointer) +BOOL FatGetFatEntry(ULONG Cluster, ULONG* ClusterPointer) { - U32 fat = 0; + ULONG fat = 0; int FatOffset; int ThisFatSecNum; int ThisFatEntOffset; @@ -860,7 +860,7 @@ BOOL FatGetFatEntry(U32 Cluster, U32* ClusterPointer) } } - fat = *((U16 *) ((PVOID)FILESYSBUFFER + ThisFatEntOffset)); + fat = *((USHORT *) ((PVOID)FILESYSBUFFER + ThisFatEntOffset)); if (Cluster & 0x0001) fat = fat >> 4; /* Cluster number is ODD */ else @@ -880,7 +880,7 @@ BOOL FatGetFatEntry(U32 Cluster, U32* ClusterPointer) return FALSE; } - fat = *((U16 *) ((PVOID)FILESYSBUFFER + ThisFatEntOffset)); + fat = *((USHORT *) ((PVOID)FILESYSBUFFER + ThisFatEntOffset)); break; @@ -897,7 +897,7 @@ BOOL FatGetFatEntry(U32 Cluster, U32* ClusterPointer) } // Get the fat entry - fat = (*((U32 *) ((PVOID)FILESYSBUFFER + ThisFatEntOffset))) & 0x0FFFFFFF; + fat = (*((ULONG *) ((PVOID)FILESYSBUFFER + ThisFatEntOffset))) & 0x0FFFFFFF; break; @@ -939,9 +939,9 @@ FILE* FatOpenFile(PUCHAR FileName) return (FILE*)FileHandle; } -U32 FatCountClustersInChain(U32 StartCluster) +ULONG FatCountClustersInChain(ULONG StartCluster) { - U32 ClusterCount = 0; + ULONG ClusterCount = 0; DbgPrint((DPRINT_FILESYSTEM, "FatCountClustersInChain() StartCluster = %d\n", StartCluster)); @@ -976,17 +976,17 @@ U32 FatCountClustersInChain(U32 StartCluster) return ClusterCount; } -U32* FatGetClusterChainArray(U32 StartCluster) +ULONG* FatGetClusterChainArray(ULONG StartCluster) { - U32 ClusterCount; - U32 ArraySize; - U32* ArrayPointer; - U32 Idx; + ULONG ClusterCount; + ULONG ArraySize; + ULONG* ArrayPointer; + ULONG Idx; DbgPrint((DPRINT_FILESYSTEM, "FatGetClusterChainArray() StartCluster = %d\n", StartCluster)); ClusterCount = FatCountClustersInChain(StartCluster) + 1; // Lets get the 0x0ffffff8 on the end of the array - ArraySize = ClusterCount * sizeof(U32); + ArraySize = ClusterCount * sizeof(ULONG); // // Allocate array memory @@ -1036,9 +1036,9 @@ U32* FatGetClusterChainArray(U32 StartCluster) * FatReadCluster() * Reads the specified cluster into memory */ -BOOL FatReadCluster(U32 ClusterNumber, PVOID Buffer) +BOOL FatReadCluster(ULONG ClusterNumber, PVOID Buffer) { - U32 ClusterStartSector; + ULONG ClusterStartSector; ClusterStartSector = ((ClusterNumber - 2) * SectorsPerCluster) + DataSectorStart; @@ -1058,9 +1058,9 @@ BOOL FatReadCluster(U32 ClusterNumber, PVOID Buffer) * FatReadClusterChain() * Reads the specified clusters into memory */ -BOOL FatReadClusterChain(U32 StartClusterNumber, U32 NumberOfClusters, PVOID Buffer) +BOOL FatReadClusterChain(ULONG StartClusterNumber, ULONG NumberOfClusters, PVOID Buffer) { - U32 ClusterStartSector; + ULONG ClusterStartSector; DbgPrint((DPRINT_FILESYSTEM, "FatReadClusterChain() StartClusterNumber = %d NumberOfClusters = %d Buffer = 0x%x\n", StartClusterNumber, NumberOfClusters, Buffer)); @@ -1119,9 +1119,9 @@ BOOL FatReadClusterChain(U32 StartClusterNumber, U32 NumberOfClusters, PVOID Buf * FatReadPartialCluster() * Reads part of a cluster into memory */ -BOOL FatReadPartialCluster(U32 ClusterNumber, U32 StartingOffset, U32 Length, PVOID Buffer) +BOOL FatReadPartialCluster(ULONG ClusterNumber, ULONG StartingOffset, ULONG Length, PVOID Buffer) { - U32 ClusterStartSector; + ULONG ClusterStartSector; DbgPrint((DPRINT_FILESYSTEM, "FatReadPartialCluster() ClusterNumber = %d StartingOffset = %d Length = %d Buffer = 0x%x\n", ClusterNumber, StartingOffset, Length, Buffer)); @@ -1142,14 +1142,14 @@ BOOL FatReadPartialCluster(U32 ClusterNumber, U32 StartingOffset, U32 Length, PV * Reads BytesToRead from open file and * returns the number of bytes read in BytesRead */ -BOOL FatReadFile(FILE *FileHandle, U32 BytesToRead, U32* BytesRead, PVOID Buffer) +BOOL FatReadFile(FILE *FileHandle, ULONG BytesToRead, ULONG* BytesRead, PVOID Buffer) { PFAT_FILE_INFO FatFileInfo = (PFAT_FILE_INFO)FileHandle; - U32 ClusterNumber; - U32 OffsetInCluster; - U32 LengthInCluster; - U32 NumberOfClusters; - U32 BytesPerCluster; + ULONG ClusterNumber; + ULONG OffsetInCluster; + ULONG LengthInCluster; + ULONG NumberOfClusters; + ULONG BytesPerCluster; DbgPrint((DPRINT_FILESYSTEM, "FatReadFile() BytesToRead = %d Buffer = 0x%x\n", BytesToRead, Buffer)); @@ -1296,7 +1296,7 @@ BOOL FatReadFile(FILE *FileHandle, U32 BytesToRead, U32* BytesRead, PVOID Buffer return TRUE; } -U32 FatGetFileSize(FILE *FileHandle) +ULONG FatGetFileSize(FILE *FileHandle) { PFAT_FILE_INFO FatFileHandle = (PFAT_FILE_INFO)FileHandle; @@ -1305,7 +1305,7 @@ U32 FatGetFileSize(FILE *FileHandle) return FatFileHandle->FileSize; } -VOID FatSetFilePointer(FILE *FileHandle, U32 NewFilePointer) +VOID FatSetFilePointer(FILE *FileHandle, ULONG NewFilePointer) { PFAT_FILE_INFO FatFileHandle = (PFAT_FILE_INFO)FileHandle; @@ -1314,7 +1314,7 @@ VOID FatSetFilePointer(FILE *FileHandle, U32 NewFilePointer) FatFileHandle->FilePointer = NewFilePointer; } -U32 FatGetFilePointer(FILE *FileHandle) +ULONG FatGetFilePointer(FILE *FileHandle) { PFAT_FILE_INFO FatFileHandle = (PFAT_FILE_INFO)FileHandle; @@ -1323,7 +1323,7 @@ U32 FatGetFilePointer(FILE *FileHandle) return FatFileHandle->FilePointer; } -BOOL FatReadVolumeSectors(U32 DriveNumber, U32 SectorNumber, U32 SectorCount, PVOID Buffer) +BOOL FatReadVolumeSectors(ULONG DriveNumber, ULONG SectorNumber, ULONG SectorCount, PVOID Buffer) { return CacheReadDiskSectors(DriveNumber, SectorNumber + FatVolumeStartSector, SectorCount, Buffer); } diff --git a/reactos/boot/freeldr/freeldr/fs/fat.h b/reactos/boot/freeldr/freeldr/fs/fat.h index db21e0f315f..d697e4840f7 100644 --- a/reactos/boot/freeldr/freeldr/fs/fat.h +++ b/reactos/boot/freeldr/freeldr/fs/fat.h @@ -22,77 +22,77 @@ typedef struct _FAT_BOOTSECTOR { - U8 JumpBoot[3]; // Jump instruction to boot code - U8 OemName[8]; // "MSWIN4.1" for MS formatted volumes - U16 BytesPerSector; // Bytes per sector - U8 SectorsPerCluster; // Number of sectors in a cluster - U16 ReservedSectors; // Reserved sectors, usually 1 (the bootsector) - U8 NumberOfFats; // Number of FAT tables - U16 RootDirEntries; // Number of root directory entries (fat12/16) - U16 TotalSectors; // Number of total sectors on the drive, 16-bit - U8 MediaDescriptor; // Media descriptor byte - U16 SectorsPerFat; // Sectors per FAT table (fat12/16) - U16 SectorsPerTrack; // Number of sectors in a track - U16 NumberOfHeads; // Number of heads on the disk - U32 HiddenSectors; // Hidden sectors (sectors before the partition start like the partition table) - U32 TotalSectorsBig; // This field is the new 32-bit total count of sectors on the volume - U8 DriveNumber; // Int 0x13 drive number (e.g. 0x80) - U8 Reserved1; // Reserved (used by Windows NT). Code that formats FAT volumes should always set this byte to 0. - U8 BootSignature; // Extended boot signature (0x29). This is a signature byte that indicates that the following three fields in the boot sector are present. - U32 VolumeSerialNumber; // Volume serial number - U8 VolumeLabel[11]; // Volume label. This field matches the 11-byte volume label recorded in the root directory - U8 FileSystemType[8]; // One of the strings "FAT12 ", "FAT16 ", or "FAT " + UCHAR JumpBoot[3]; // Jump instruction to boot code + UCHAR OemName[8]; // "MSWIN4.1" for MS formatted volumes + USHORT BytesPerSector; // Bytes per sector + UCHAR SectorsPerCluster; // Number of sectors in a cluster + USHORT ReservedSectors; // Reserved sectors, usually 1 (the bootsector) + UCHAR NumberOfFats; // Number of FAT tables + USHORT RootDirEntries; // Number of root directory entries (fat12/16) + USHORT TotalSectors; // Number of total sectors on the drive, 16-bit + UCHAR MediaDescriptor; // Media descriptor byte + USHORT SectorsPerFat; // Sectors per FAT table (fat12/16) + USHORT SectorsPerTrack; // Number of sectors in a track + USHORT NumberOfHeads; // Number of heads on the disk + ULONG HiddenSectors; // Hidden sectors (sectors before the partition start like the partition table) + ULONG TotalSectorsBig; // This field is the new 32-bit total count of sectors on the volume + UCHAR DriveNumber; // Int 0x13 drive number (e.g. 0x80) + UCHAR Reserved1; // Reserved (used by Windows NT). Code that formats FAT volumes should always set this byte to 0. + UCHAR BootSignature; // Extended boot signature (0x29). This is a signature byte that indicates that the following three fields in the boot sector are present. + ULONG VolumeSerialNumber; // Volume serial number + UCHAR VolumeLabel[11]; // Volume label. This field matches the 11-byte volume label recorded in the root directory + UCHAR FileSystemType[8]; // One of the strings "FAT12 ", "FAT16 ", or "FAT " - U8 BootCodeAndData[448]; // The remainder of the boot sector + UCHAR BootCodeAndData[448]; // The remainder of the boot sector - U16 BootSectorMagic; // 0xAA55 + USHORT BootSectorMagic; // 0xAA55 } PACKED FAT_BOOTSECTOR, *PFAT_BOOTSECTOR; typedef struct _FAT32_BOOTSECTOR { - U8 JumpBoot[3]; // Jump instruction to boot code - U8 OemName[8]; // "MSWIN4.1" for MS formatted volumes - U16 BytesPerSector; // Bytes per sector - U8 SectorsPerCluster; // Number of sectors in a cluster - U16 ReservedSectors; // Reserved sectors, usually 1 (the bootsector) - U8 NumberOfFats; // Number of FAT tables - U16 RootDirEntries; // Number of root directory entries (fat12/16) - U16 TotalSectors; // Number of total sectors on the drive, 16-bit - U8 MediaDescriptor; // Media descriptor byte - U16 SectorsPerFat; // Sectors per FAT table (fat12/16) - U16 SectorsPerTrack; // Number of sectors in a track - U16 NumberOfHeads; // Number of heads on the disk - U32 HiddenSectors; // Hidden sectors (sectors before the partition start like the partition table) - U32 TotalSectorsBig; // This field is the new 32-bit total count of sectors on the volume - U32 SectorsPerFatBig; // This field is the FAT32 32-bit count of sectors occupied by ONE FAT. BPB_FATSz16 must be 0 - U16 ExtendedFlags; // Extended flags (fat32) - U16 FileSystemVersion; // File system version (fat32) - U32 RootDirStartCluster; // Starting cluster of the root directory (fat32) - U16 FsInfo; // Sector number of FSINFO structure in the reserved area of the FAT32 volume. Usually 1. - U16 BackupBootSector; // If non-zero, indicates the sector number in the reserved area of the volume of a copy of the boot record. Usually 6. - U8 Reserved[12]; // Reserved for future expansion - U8 DriveNumber; // Int 0x13 drive number (e.g. 0x80) - U8 Reserved1; // Reserved (used by Windows NT). Code that formats FAT volumes should always set this byte to 0. - U8 BootSignature; // Extended boot signature (0x29). This is a signature byte that indicates that the following three fields in the boot sector are present. - U32 VolumeSerialNumber; // Volume serial number - U8 VolumeLabel[11]; // Volume label. This field matches the 11-byte volume label recorded in the root directory - U8 FileSystemType[8]; // Always set to the string "FAT32 " + UCHAR JumpBoot[3]; // Jump instruction to boot code + UCHAR OemName[8]; // "MSWIN4.1" for MS formatted volumes + USHORT BytesPerSector; // Bytes per sector + UCHAR SectorsPerCluster; // Number of sectors in a cluster + USHORT ReservedSectors; // Reserved sectors, usually 1 (the bootsector) + UCHAR NumberOfFats; // Number of FAT tables + USHORT RootDirEntries; // Number of root directory entries (fat12/16) + USHORT TotalSectors; // Number of total sectors on the drive, 16-bit + UCHAR MediaDescriptor; // Media descriptor byte + USHORT SectorsPerFat; // Sectors per FAT table (fat12/16) + USHORT SectorsPerTrack; // Number of sectors in a track + USHORT NumberOfHeads; // Number of heads on the disk + ULONG HiddenSectors; // Hidden sectors (sectors before the partition start like the partition table) + ULONG TotalSectorsBig; // This field is the new 32-bit total count of sectors on the volume + ULONG SectorsPerFatBig; // This field is the FAT32 32-bit count of sectors occupied by ONE FAT. BPB_FATSz16 must be 0 + USHORT ExtendedFlags; // Extended flags (fat32) + USHORT FileSystemVersion; // File system version (fat32) + ULONG RootDirStartCluster; // Starting cluster of the root directory (fat32) + USHORT FsInfo; // Sector number of FSINFO structure in the reserved area of the FAT32 volume. Usually 1. + USHORT BackupBootSector; // If non-zero, indicates the sector number in the reserved area of the volume of a copy of the boot record. Usually 6. + UCHAR Reserved[12]; // Reserved for future expansion + UCHAR DriveNumber; // Int 0x13 drive number (e.g. 0x80) + UCHAR Reserved1; // Reserved (used by Windows NT). Code that formats FAT volumes should always set this byte to 0. + UCHAR BootSignature; // Extended boot signature (0x29). This is a signature byte that indicates that the following three fields in the boot sector are present. + ULONG VolumeSerialNumber; // Volume serial number + UCHAR VolumeLabel[11]; // Volume label. This field matches the 11-byte volume label recorded in the root directory + UCHAR FileSystemType[8]; // Always set to the string "FAT32 " - U8 BootCodeAndData[420]; // The remainder of the boot sector + UCHAR BootCodeAndData[420]; // The remainder of the boot sector - U16 BootSectorMagic; // 0xAA55 + USHORT BootSectorMagic; // 0xAA55 } PACKED FAT32_BOOTSECTOR, *PFAT32_BOOTSECTOR; typedef struct _FATX_BOOTSECTOR { - U8 FileSystemType[4]; /* String "FATX" */ - U32 VolumeSerialNumber; /* Volume serial number */ - U32 SectorsPerCluster; /* Number of sectors in a cluster */ - U16 NumberOfFats; /* Number of FAT tables */ - U32 Unknown; /* Always 0? */ - U8 Unused[494]; /* Actually size should be 4078 (boot block is 4096 bytes) */ + UCHAR FileSystemType[4]; /* String "FATX" */ + ULONG VolumeSerialNumber; /* Volume serial number */ + ULONG SectorsPerCluster; /* Number of sectors in a cluster */ + USHORT NumberOfFats; /* Number of FAT tables */ + ULONG Unknown; /* Always 0? */ + UCHAR Unused[494]; /* Actually size should be 4078 (boot block is 4096 bytes) */ } PACKED FATX_BOOTSECTOR, *PFATX_BOOTSECTOR; @@ -102,74 +102,74 @@ typedef struct _FATX_BOOTSECTOR typedef struct //_DIRENTRY { UCHAR FileName[11]; /* Filename + extension */ - U8 Attr; /* File attributes */ - U8 ReservedNT; /* Reserved for use by Windows NT */ - U8 TimeInTenths; /* Millisecond stamp at file creation */ - U16 CreateTime; /* Time file was created */ - U16 CreateDate; /* Date file was created */ - U16 LastAccessDate; /* Date file was last accessed */ - U16 ClusterHigh; /* High word of this entry's start cluster */ - U16 Time; /* Time last modified */ - U16 Date; /* Date last modified */ - U16 ClusterLow; /* First cluster number low word */ - U32 Size; /* File size */ + UCHAR Attr; /* File attributes */ + UCHAR ReservedNT; /* Reserved for use by Windows NT */ + UCHAR TimeInTenths; /* Millisecond stamp at file creation */ + USHORT CreateTime; /* Time file was created */ + USHORT CreateDate; /* Date file was created */ + USHORT LastAccessDate; /* Date file was last accessed */ + USHORT ClusterHigh; /* High word of this entry's start cluster */ + USHORT Time; /* Time last modified */ + USHORT Date; /* Date last modified */ + USHORT ClusterLow; /* First cluster number low word */ + ULONG Size; /* File size */ } PACKED DIRENTRY, * PDIRENTRY; typedef struct { - U8 SequenceNumber; /* Sequence number for slot */ + UCHAR SequenceNumber; /* Sequence number for slot */ WCHAR Name0_4[5]; /* First 5 characters in name */ - U8 EntryAttributes; /* Attribute byte */ - U8 Reserved; /* Always 0 */ - U8 AliasChecksum; /* Checksum for 8.3 alias */ + UCHAR EntryAttributes; /* Attribute byte */ + UCHAR Reserved; /* Always 0 */ + UCHAR AliasChecksum; /* Checksum for 8.3 alias */ WCHAR Name5_10[6]; /* 6 more characters in name */ - U16 StartCluster; /* Starting cluster number */ + USHORT StartCluster; /* Starting cluster number */ WCHAR Name11_12[2]; /* Last 2 characters in name */ } PACKED LFN_DIRENTRY, * PLFN_DIRENTRY; typedef struct { - U8 FileNameSize; /* Size of filename (max 42) */ - U8 Attr; /* File attributes */ + UCHAR FileNameSize; /* Size of filename (max 42) */ + UCHAR Attr; /* File attributes */ UCHAR FileName[42]; /* Filename in ASCII, padded with 0xff (not zero-terminated) */ - U32 StartCluster; /* Starting cluster number */ - U32 Size; /* File size */ - U16 Time; /* Time last modified */ - U16 Date; /* Date last modified */ - U16 CreateTime; /* Time file was created */ - U16 CreateDate; /* Date file was created */ - U16 LastAccessTime; /* Time file was last accessed */ - U16 LastAccessDate; /* Date file was last accessed */ + ULONG StartCluster; /* Starting cluster number */ + ULONG Size; /* File size */ + USHORT Time; /* Time last modified */ + USHORT Date; /* Date last modified */ + USHORT CreateTime; /* Time file was created */ + USHORT CreateDate; /* Date file was created */ + USHORT LastAccessTime; /* Time file was last accessed */ + USHORT LastAccessDate; /* Date file was last accessed */ } PACKED FATX_DIRENTRY, * PFATX_DIRENTRY; typedef struct { - U32 FileSize; /* File size */ - U32 FilePointer; /* File pointer */ - U32* FileFatChain; /* File fat chain array */ - U32 DriveNumber; + ULONG FileSize; /* File size */ + ULONG FilePointer; /* File pointer */ + ULONG* FileFatChain; /* File fat chain array */ + ULONG DriveNumber; } FAT_FILE_INFO, * PFAT_FILE_INFO; -BOOL FatOpenVolume(U32 DriveNumber, U32 VolumeStartSector, U32 PartitionSectorCount); -U32 FatDetermineFatType(PFAT_BOOTSECTOR FatBootSector, U32 PartitionSectorCount); -PVOID FatBufferDirectory(U32 DirectoryStartCluster, U32* EntryCountPointer, BOOL RootDirectory); -BOOL FatSearchDirectoryBufferForFile(PVOID DirectoryBuffer, U32 EntryCount, PUCHAR FileName, PFAT_FILE_INFO FatFileInfoPointer); +BOOL FatOpenVolume(ULONG DriveNumber, ULONG VolumeStartSector, ULONG PartitionSectorCount); +ULONG FatDetermineFatType(PFAT_BOOTSECTOR FatBootSector, ULONG PartitionSectorCount); +PVOID FatBufferDirectory(ULONG DirectoryStartCluster, ULONG* EntryCountPointer, BOOL RootDirectory); +BOOL FatSearchDirectoryBufferForFile(PVOID DirectoryBuffer, ULONG EntryCount, PUCHAR FileName, PFAT_FILE_INFO FatFileInfoPointer); BOOL FatLookupFile(PUCHAR FileName, PFAT_FILE_INFO FatFileInfoPointer); void FatParseShortFileName(PUCHAR Buffer, PDIRENTRY DirEntry); -BOOL FatGetFatEntry(U32 Cluster, U32* ClusterPointer); +BOOL FatGetFatEntry(ULONG Cluster, ULONG* ClusterPointer); FILE* FatOpenFile(PUCHAR FileName); -U32 FatCountClustersInChain(U32 StartCluster); -U32* FatGetClusterChainArray(U32 StartCluster); -BOOL FatReadCluster(U32 ClusterNumber, PVOID Buffer); -BOOL FatReadClusterChain(U32 StartClusterNumber, U32 NumberOfClusters, PVOID Buffer); -BOOL FatReadPartialCluster(U32 ClusterNumber, U32 StartingOffset, U32 Length, PVOID Buffer); -BOOL FatReadFile(FILE *FileHandle, U32 BytesToRead, U32* BytesRead, PVOID Buffer); -U32 FatGetFileSize(FILE *FileHandle); -VOID FatSetFilePointer(FILE *FileHandle, U32 NewFilePointer); -U32 FatGetFilePointer(FILE *FileHandle); -BOOL FatReadVolumeSectors(U32 DriveNumber, U32 SectorNumber, U32 SectorCount, PVOID Buffer); +ULONG FatCountClustersInChain(ULONG StartCluster); +ULONG* FatGetClusterChainArray(ULONG StartCluster); +BOOL FatReadCluster(ULONG ClusterNumber, PVOID Buffer); +BOOL FatReadClusterChain(ULONG StartClusterNumber, ULONG NumberOfClusters, PVOID Buffer); +BOOL FatReadPartialCluster(ULONG ClusterNumber, ULONG StartingOffset, ULONG Length, PVOID Buffer); +BOOL FatReadFile(FILE *FileHandle, ULONG BytesToRead, ULONG* BytesRead, PVOID Buffer); +ULONG FatGetFileSize(FILE *FileHandle); +VOID FatSetFilePointer(FILE *FileHandle, ULONG NewFilePointer); +ULONG FatGetFilePointer(FILE *FileHandle); +BOOL FatReadVolumeSectors(ULONG DriveNumber, ULONG SectorNumber, ULONG SectorCount, PVOID Buffer); #define ATTR_NORMAL 0x00 diff --git a/reactos/boot/freeldr/freeldr/fs/fs.c b/reactos/boot/freeldr/freeldr/fs/fs.c index 22aa1e6b2b2..c91813f95d6 100644 --- a/reactos/boot/freeldr/freeldr/fs/fs.c +++ b/reactos/boot/freeldr/freeldr/fs/fs.c @@ -36,7 +36,7 @@ // DATA ///////////////////////////////////////////////////////////////////////////////////////////// -U32 FileSystemType = 0; // Type of filesystem on boot device, set by FsOpenVolume() +ULONG FsType = 0; // Type of filesystem on boot device, set by FsOpenVolume() ///////////////////////////////////////////////////////////////////////////////////////////// // FUNCTIONS @@ -51,7 +51,7 @@ VOID FileSystemError(PUCHAR ErrorString) /* * - * BOOL FsOpenVolume(U32 DriveNumber, U32 PartitionNumber); + * BOOL FsOpenVolume(ULONG DriveNumber, ULONG PartitionNumber); * * This function is called to open a disk volume for file access. * It must be called before any of the file functions will work. @@ -64,11 +64,11 @@ VOID FileSystemError(PUCHAR ErrorString) * If it is zero then it opens the active (bootable) partition * */ -BOOL FsOpenVolume(U32 DriveNumber, U32 PartitionNumber) +BOOL FsOpenVolume(ULONG DriveNumber, ULONG PartitionNumber) { PARTITION_TABLE_ENTRY PartitionTableEntry; UCHAR ErrorText[80]; - U8 VolumeType; + UCHAR VolumeType; DbgPrint((DPRINT_FILESYSTEM, "FsOpenVolume() DriveNumber: 0x%x PartitionNumber: 0x%x\n", DriveNumber, PartitionNumber)); @@ -78,7 +78,7 @@ BOOL FsOpenVolume(U32 DriveNumber, U32 PartitionNumber) { DbgPrint((DPRINT_FILESYSTEM, "Drive is a floppy diskette drive. Assuming FAT12 file system.\n")); - FileSystemType = FS_FAT; + FsType = FS_FAT; return FatOpenVolume(DriveNumber, 0, 0); } @@ -87,7 +87,7 @@ BOOL FsOpenVolume(U32 DriveNumber, U32 PartitionNumber) { DbgPrint((DPRINT_FILESYSTEM, "Drive is a cdrom drive. Assuming ISO-9660 file system.\n")); - FileSystemType = FS_ISO9660; + FsType = FS_ISO9660; return IsoOpenVolume(DriveNumber); } @@ -137,16 +137,16 @@ BOOL FsOpenVolume(U32 DriveNumber, U32 PartitionNumber) case PARTITION_XINT13: case PARTITION_FAT32: case PARTITION_FAT32_XINT13: - FileSystemType = FS_FAT; + FsType = FS_FAT; return FatOpenVolume(DriveNumber, PartitionTableEntry.SectorCountBeforePartition, PartitionTableEntry.PartitionSectorCount); case PARTITION_EXT2: - FileSystemType = FS_EXT2; + FsType = FS_EXT2; return Ext2OpenVolume(DriveNumber, PartitionTableEntry.SectorCountBeforePartition); case PARTITION_NTFS: - FileSystemType = FS_NTFS; + FsType = FS_NTFS; return NtfsOpenVolume(DriveNumber, PartitionTableEntry.SectorCountBeforePartition); default: - FileSystemType = 0; + FsType = 0; sprintf(ErrorText, "Unsupported file system. Type: 0x%x", VolumeType); FileSystemError(ErrorText); return FALSE; @@ -175,7 +175,7 @@ PFILE FsOpenFile(PUCHAR FileName) // // Check file system type and pass off to appropriate handler // - switch (FileSystemType) + switch (FsType) { case FS_FAT: FileHandle = FatOpenFile(FileName); @@ -219,9 +219,9 @@ VOID FsCloseFile(PFILE FileHandle) * ReadFile() * returns number of bytes read or EOF */ -BOOL FsReadFile(PFILE FileHandle, U32 BytesToRead, U32* BytesRead, PVOID Buffer) +BOOL FsReadFile(PFILE FileHandle, ULONG BytesToRead, ULONG* BytesRead, PVOID Buffer) { - U64 BytesReadBig; + ULONGLONG BytesReadBig; BOOL Success; // @@ -232,7 +232,7 @@ BOOL FsReadFile(PFILE FileHandle, U32 BytesToRead, U32* BytesRead, PVOID Buffer) *BytesRead = 0; } - switch (FileSystemType) + switch (FsType) { case FS_FAT: @@ -246,7 +246,7 @@ BOOL FsReadFile(PFILE FileHandle, U32 BytesToRead, U32* BytesRead, PVOID Buffer) //return Ext2ReadFile(FileHandle, BytesToRead, BytesRead, Buffer); Success = Ext2ReadFile(FileHandle, BytesToRead, &BytesReadBig, Buffer); - *BytesRead = (U32)BytesReadBig; + *BytesRead = (ULONG)BytesReadBig; return Success; case FS_NTFS: @@ -262,9 +262,9 @@ BOOL FsReadFile(PFILE FileHandle, U32 BytesToRead, U32* BytesRead, PVOID Buffer) return FALSE; } -U32 FsGetFileSize(PFILE FileHandle) +ULONG FsGetFileSize(PFILE FileHandle) { - switch (FileSystemType) + switch (FsType) { case FS_FAT: @@ -290,9 +290,9 @@ U32 FsGetFileSize(PFILE FileHandle) return 0; } -VOID FsSetFilePointer(PFILE FileHandle, U32 NewFilePointer) +VOID FsSetFilePointer(PFILE FileHandle, ULONG NewFilePointer) { - switch (FileSystemType) + switch (FsType) { case FS_FAT: @@ -320,9 +320,9 @@ VOID FsSetFilePointer(PFILE FileHandle, U32 NewFilePointer) } } -U32 FsGetFilePointer(PFILE FileHandle) +ULONG FsGetFilePointer(PFILE FileHandle) { - switch (FileSystemType) + switch (FsType) { case FS_FAT: @@ -369,10 +369,10 @@ BOOL FsIsEndOfFile(PFILE FileHandle) * This function parses a path in the form of dir1\dir2\file1.ext * and returns the number of parts it has (i.e. 3 - dir1,dir2,file1.ext) */ -U32 FsGetNumPathParts(PUCHAR Path) +ULONG FsGetNumPathParts(PUCHAR Path) { - U32 i; - U32 num; + ULONG i; + ULONG num; for (i=0,num=0; i<(int)strlen(Path); i++) { @@ -396,7 +396,7 @@ U32 FsGetNumPathParts(PUCHAR Path) */ VOID FsGetFirstNameFromPath(PUCHAR Buffer, PUCHAR Path) { - U32 i; + ULONG i; // Copy all the characters up to the end of the // string or until we hit a '\' character diff --git a/reactos/boot/freeldr/freeldr/fs/fsrec.c b/reactos/boot/freeldr/freeldr/fs/fsrec.c index b3c84062f9b..8c0a2e69e3c 100644 --- a/reactos/boot/freeldr/freeldr/fs/fsrec.c +++ b/reactos/boot/freeldr/freeldr/fs/fsrec.c @@ -39,10 +39,10 @@ /* * - * BOOL FsRecognizeVolume(U32 DriveNumber, U32 VolumeStartSector, U8* VolumeType); + * BOOL FsRecognizeVolume(ULONG DriveNumber, ULONG VolumeStartSector, UCHAR* VolumeType); * */ -BOOL FsRecognizeVolume(U32 DriveNumber, U32 VolumeStartSector, U8* VolumeType) +BOOL FsRecognizeVolume(ULONG DriveNumber, ULONG VolumeStartSector, UCHAR* VolumeType) { DbgPrint((DPRINT_FILESYSTEM, "FsRecognizeVolume() DriveNumber: 0x%x VolumeStartSector: %d\n", DriveNumber, VolumeStartSector)); @@ -66,7 +66,7 @@ BOOL FsRecognizeVolume(U32 DriveNumber, U32 VolumeStartSector, U8* VolumeType) return FALSE; } -BOOL FsRecIsIso9660(U32 DriveNumber) +BOOL FsRecIsIso9660(ULONG DriveNumber) { PUCHAR Sector = (PUCHAR)DISKREADBUFFER; @@ -84,7 +84,7 @@ BOOL FsRecIsIso9660(U32 DriveNumber) Sector[5] == '1'); } -BOOL FsRecIsExt2(U32 DriveNumber, U32 VolumeStartSector) +BOOL FsRecIsExt2(ULONG DriveNumber, ULONG VolumeStartSector) { PEXT2_SUPER_BLOCK SuperBlock = (PEXT2_SUPER_BLOCK)DISKREADBUFFER; @@ -102,7 +102,7 @@ BOOL FsRecIsExt2(U32 DriveNumber, U32 VolumeStartSector) return FALSE; } -BOOL FsRecIsFat(U32 DriveNumber, U32 VolumeStartSector) +BOOL FsRecIsFat(ULONG DriveNumber, ULONG VolumeStartSector) { PFAT_BOOTSECTOR BootSector = (PFAT_BOOTSECTOR)DISKREADBUFFER; PFAT32_BOOTSECTOR BootSector32 = (PFAT32_BOOTSECTOR)DISKREADBUFFER; @@ -124,7 +124,7 @@ BOOL FsRecIsFat(U32 DriveNumber, U32 VolumeStartSector) return FALSE; } -BOOL FsRecIsNtfs(U32 DriveNumber, U32 VolumeStartSector) +BOOL FsRecIsNtfs(ULONG DriveNumber, ULONG VolumeStartSector) { PNTFS_BOOTSECTOR BootSector = (PNTFS_BOOTSECTOR)DISKREADBUFFER; if (!MachDiskReadLogicalSectors(DriveNumber, VolumeStartSector, 1, BootSector)) diff --git a/reactos/boot/freeldr/freeldr/fs/fsrec.h b/reactos/boot/freeldr/freeldr/fs/fsrec.h index 210a4acebcf..2f8dd0bb5a5 100644 --- a/reactos/boot/freeldr/freeldr/fs/fsrec.h +++ b/reactos/boot/freeldr/freeldr/fs/fsrec.h @@ -20,10 +20,10 @@ #ifndef __FSREC_H #define __FSREC_H -BOOL FsRecognizeVolume(U32 DriveNumber, U32 VolumeStartSector, U8* VolumeType); -BOOL FsRecIsIso9660(U32 DriveNumber); -BOOL FsRecIsExt2(U32 DriveNumber, U32 VolumeStartSector); -BOOL FsRecIsFat(U32 DriveNumber, U32 VolumeStartSector); -BOOL FsRecIsNtfs(U32 DriveNumber, U32 VolumeStartSector); +BOOL FsRecognizeVolume(ULONG DriveNumber, ULONG VolumeStartSector, UCHAR* VolumeType); +BOOL FsRecIsIso9660(ULONG DriveNumber); +BOOL FsRecIsExt2(ULONG DriveNumber, ULONG VolumeStartSector); +BOOL FsRecIsFat(ULONG DriveNumber, ULONG VolumeStartSector); +BOOL FsRecIsNtfs(ULONG DriveNumber, ULONG VolumeStartSector); #endif // #defined __FSREC_H diff --git a/reactos/boot/freeldr/freeldr/fs/iso.c b/reactos/boot/freeldr/freeldr/fs/iso.c index 54e7aa38c88..58e881bff74 100644 --- a/reactos/boot/freeldr/freeldr/fs/iso.c +++ b/reactos/boot/freeldr/freeldr/fs/iso.c @@ -32,13 +32,13 @@ #define SECTORSIZE 2048 -static U32 IsoRootSector; // Starting sector of the root directory -static U32 IsoRootLength; // Length of the root directory +static ULONG IsoRootSector; // Starting sector of the root directory +static ULONG IsoRootLength; // Length of the root directory -U32 IsoDriveNumber = 0; +ULONG IsoDriveNumber = 0; -BOOL IsoOpenVolume(U32 DriveNumber) +BOOL IsoOpenVolume(ULONG DriveNumber) { PPVD Pvd = (PPVD)DISKREADBUFFER; @@ -65,11 +65,11 @@ BOOL IsoOpenVolume(U32 DriveNumber) } -static BOOL IsoSearchDirectoryBufferForFile(PVOID DirectoryBuffer, U32 DirectoryLength, PUCHAR FileName, PISO_FILE_INFO IsoFileInfoPointer) +static BOOL IsoSearchDirectoryBufferForFile(PVOID DirectoryBuffer, ULONG DirectoryLength, PUCHAR FileName, PISO_FILE_INFO IsoFileInfoPointer) { PDIR_RECORD Record; - U32 Offset; - U32 i; + ULONG Offset; + ULONG i; UCHAR Name[32]; DbgPrint((DPRINT_FILESYSTEM, "IsoSearchDirectoryBufferForFile() DirectoryBuffer = 0x%x DirectoryLength = %d FileName = %s\n", DirectoryBuffer, DirectoryLength, FileName)); @@ -133,12 +133,12 @@ static BOOL IsoSearchDirectoryBufferForFile(PVOID DirectoryBuffer, U32 Directory * if allocation or read fails. The directory is specified by its * starting sector and length. */ -static PVOID IsoBufferDirectory(U32 DirectoryStartSector, U32 DirectoryLength) +static PVOID IsoBufferDirectory(ULONG DirectoryStartSector, ULONG DirectoryLength) { PVOID DirectoryBuffer; PVOID Ptr; - U32 SectorCount; - U32 i; + ULONG SectorCount; + ULONG i; DbgPrint((DPRINT_FILESYSTEM, "IsoBufferDirectory() DirectoryStartSector = %d DirectoryLength = %d\n", DirectoryStartSector, DirectoryLength)); @@ -183,11 +183,11 @@ static PVOID IsoBufferDirectory(U32 DirectoryStartSector, U32 DirectoryLength) static BOOL IsoLookupFile(PUCHAR FileName, PISO_FILE_INFO IsoFileInfoPointer) { int i; - U32 NumberOfPathParts; + ULONG NumberOfPathParts; UCHAR PathPart[261]; PVOID DirectoryBuffer; - U32 DirectorySector; - U32 DirectoryLength; + ULONG DirectorySector; + ULONG DirectoryLength; ISO_FILE_INFO IsoFileInfo; DbgPrint((DPRINT_FILESYSTEM, "IsoLookupFile() FileName = %s\n", FileName)); @@ -293,14 +293,14 @@ FILE* IsoOpenFile(PUCHAR FileName) * Reads BytesToRead from open file and * returns the number of bytes read in BytesRead */ -BOOL IsoReadFile(FILE *FileHandle, U32 BytesToRead, U32* BytesRead, PVOID Buffer) +BOOL IsoReadFile(FILE *FileHandle, ULONG BytesToRead, ULONG* BytesRead, PVOID Buffer) { PISO_FILE_INFO IsoFileInfo = (PISO_FILE_INFO)FileHandle; - U32 SectorNumber; - U32 OffsetInSector; - U32 LengthInSector; - U32 NumberOfSectors; - U32 i; + ULONG SectorNumber; + ULONG OffsetInSector; + ULONG LengthInSector; + ULONG NumberOfSectors; + ULONG i; DbgPrint((DPRINT_FILESYSTEM, "IsoReadFile() BytesToRead = %d Buffer = 0x%x\n", BytesToRead, Buffer)); @@ -451,7 +451,7 @@ BOOL IsoReadFile(FILE *FileHandle, U32 BytesToRead, U32* BytesRead, PVOID Buffer } -U32 IsoGetFileSize(FILE *FileHandle) +ULONG IsoGetFileSize(FILE *FileHandle) { PISO_FILE_INFO IsoFileHandle = (PISO_FILE_INFO)FileHandle; @@ -460,7 +460,7 @@ U32 IsoGetFileSize(FILE *FileHandle) return IsoFileHandle->FileSize; } -VOID IsoSetFilePointer(FILE *FileHandle, U32 NewFilePointer) +VOID IsoSetFilePointer(FILE *FileHandle, ULONG NewFilePointer) { PISO_FILE_INFO IsoFileHandle = (PISO_FILE_INFO)FileHandle; @@ -469,7 +469,7 @@ VOID IsoSetFilePointer(FILE *FileHandle, U32 NewFilePointer) IsoFileHandle->FilePointer = NewFilePointer; } -U32 IsoGetFilePointer(FILE *FileHandle) +ULONG IsoGetFilePointer(FILE *FileHandle) { PISO_FILE_INFO IsoFileHandle = (PISO_FILE_INFO)FileHandle; diff --git a/reactos/boot/freeldr/freeldr/fs/iso.h b/reactos/boot/freeldr/freeldr/fs/iso.h index feaa1b57896..db549a40b37 100644 --- a/reactos/boot/freeldr/freeldr/fs/iso.h +++ b/reactos/boot/freeldr/freeldr/fs/iso.h @@ -25,10 +25,10 @@ struct _DIR_RECORD { UCHAR RecordLength; // 1 UCHAR ExtAttrRecordLength; // 2 - U32 ExtentLocationL; // 3-6 - U32 ExtentLocationM; // 7-10 - U32 DataLengthL; // 11-14 - U32 DataLengthM; // 15-18 + ULONG ExtentLocationL; // 3-6 + ULONG ExtentLocationM; // 7-10 + ULONG DataLengthL; // 11-14 + ULONG DataLengthM; // 15-18 UCHAR Year; // 19 UCHAR Month; // 20 UCHAR Day; // 21 @@ -39,7 +39,7 @@ struct _DIR_RECORD UCHAR FileFlags; // 26 UCHAR FileUnitSize; // 27 UCHAR InterleaveGapSize; // 28 - U32 VolumeSequenceNumber; // 29-32 + ULONG VolumeSequenceNumber; // 29-32 UCHAR FileIdLength; // 33 UCHAR FileId[1]; // 34 } __attribute__((packed)); @@ -71,18 +71,18 @@ struct _PVD UCHAR SystemId[32]; // 9-40 UCHAR VolumeId[32]; // 41-72 UCHAR unused1[8]; // 73-80 - U32 VolumeSpaceSizeL; // 81-84 - U32 VolumeSpaceSizeM; // 85-88 + ULONG VolumeSpaceSizeL; // 81-84 + ULONG VolumeSpaceSizeM; // 85-88 UCHAR unused2[32]; // 89-120 - U32 VolumeSetSize; // 121-124 - U32 VolumeSequenceNumber; // 125-128 - U32 LogicalBlockSize; // 129-132 - U32 PathTableSizeL; // 133-136 - U32 PathTableSizeM; // 137-140 - U32 LPathTablePos; // 141-144 - U32 LOptPathTablePos; // 145-148 - U32 MPathTablePos; // 149-152 - U32 MOptPathTablePos; // 153-156 + ULONG VolumeSetSize; // 121-124 + ULONG VolumeSequenceNumber; // 125-128 + ULONG LogicalBlockSize; // 129-132 + ULONG PathTableSizeL; // 133-136 + ULONG PathTableSizeM; // 137-140 + ULONG LPathTablePos; // 141-144 + ULONG LOptPathTablePos; // 145-148 + ULONG MPathTablePos; // 149-152 + ULONG MOptPathTablePos; // 153-156 DIR_RECORD RootDirRecord; // 157-190 UCHAR VolumeSetIdentifier[128]; // 191-318 UCHAR PublisherIdentifier[128]; // 319-446 @@ -97,19 +97,19 @@ typedef struct _PVD PVD, *PPVD; typedef struct { - U32 FileStart; // File start sector - U32 FileSize; // File size - U32 FilePointer; // File pointer + ULONG FileStart; // File start sector + ULONG FileSize; // File size + ULONG FilePointer; // File pointer BOOL Directory; - U32 DriveNumber; + ULONG DriveNumber; } ISO_FILE_INFO, * PISO_FILE_INFO; -BOOL IsoOpenVolume(U32 DriveNumber); +BOOL IsoOpenVolume(ULONG DriveNumber); FILE* IsoOpenFile(PUCHAR FileName); -BOOL IsoReadFile(FILE *FileHandle, U32 BytesToRead, U32* BytesRead, PVOID Buffer); -U32 IsoGetFileSize(FILE *FileHandle); -VOID IsoSetFilePointer(FILE *FileHandle, U32 NewFilePointer); -U32 IsoGetFilePointer(FILE *FileHandle); +BOOL IsoReadFile(FILE *FileHandle, ULONG BytesToRead, ULONG* BytesRead, PVOID Buffer); +ULONG IsoGetFileSize(FILE *FileHandle); +VOID IsoSetFilePointer(FILE *FileHandle, ULONG NewFilePointer); +ULONG IsoGetFilePointer(FILE *FileHandle); #endif // #defined __FAT_H diff --git a/reactos/boot/freeldr/freeldr/fs/ntfs.c b/reactos/boot/freeldr/freeldr/fs/ntfs.c index 6f6aebf86c9..625020a549f 100644 --- a/reactos/boot/freeldr/freeldr/fs/ntfs.c +++ b/reactos/boot/freeldr/freeldr/fs/ntfs.c @@ -37,19 +37,19 @@ #include "ntfs.h" PNTFS_BOOTSECTOR NtfsBootSector; -U32 NtfsClusterSize; -U32 NtfsMftRecordSize; -U32 NtfsIndexRecordSize; -U32 NtfsDriveNumber; -U32 NtfsSectorOfClusterZero; +ULONG NtfsClusterSize; +ULONG NtfsMftRecordSize; +ULONG NtfsIndexRecordSize; +ULONG NtfsDriveNumber; +ULONG NtfsSectorOfClusterZero; PNTFS_MFT_RECORD NtfsMasterFileTable; NTFS_ATTR_CONTEXT NtfsMFTContext; -PUCHAR NtfsDecodeRun(PUCHAR DataRun, S64 *DataRunOffset, U64 *DataRunLength) +PUCHAR NtfsDecodeRun(PUCHAR DataRun, LONGLONG *DataRunOffset, ULONGLONG *DataRunLength) { - U8 DataRunOffsetSize; - U8 DataRunLengthSize; - S8 i; + UCHAR DataRunOffsetSize; + UCHAR DataRunLengthSize; + CHAR i; DataRunOffsetSize = (*DataRun >> 4) & 0xF; DataRunLengthSize = *DataRun & 0xF; @@ -75,7 +75,7 @@ PUCHAR NtfsDecodeRun(PUCHAR DataRun, S64 *DataRunOffset, U64 *DataRunLength) DataRun++; } /* The last byte contains sign so we must process it different way. */ - *DataRunOffset = ((S8)(*(DataRun++)) << (i << 3)) + *DataRunOffset; + *DataRunOffset = ((CHAR)(*(DataRun++)) << (i << 3)) + *DataRunOffset; } DbgPrint((DPRINT_FILESYSTEM, "DataRunOffsetSize: %x\n", DataRunOffsetSize)); @@ -87,11 +87,11 @@ PUCHAR NtfsDecodeRun(PUCHAR DataRun, S64 *DataRunOffset, U64 *DataRunLength) } /* FIXME: Add support for attribute lists! */ -BOOL NtfsFindAttribute(PNTFS_ATTR_CONTEXT Context, PNTFS_MFT_RECORD MftRecord, U32 Type, PWCHAR Name) +BOOL NtfsFindAttribute(PNTFS_ATTR_CONTEXT Context, PNTFS_MFT_RECORD MftRecord, ULONG Type, PWCHAR Name) { PNTFS_ATTR_RECORD AttrRecord; PNTFS_ATTR_RECORD AttrRecordEnd; - U32 NameLength; + ULONG NameLength; PWCHAR AttrName; AttrRecord = (PNTFS_ATTR_RECORD)((PCHAR)MftRecord + MftRecord->AttributesOffset); @@ -115,8 +115,8 @@ BOOL NtfsFindAttribute(PNTFS_ATTR_CONTEXT Context, PNTFS_MFT_RECORD MftRecord, U Context->Record = AttrRecord; if (AttrRecord->IsNonResident) { - S64 DataRunOffset; - U64 DataRunLength; + LONGLONG DataRunOffset; + ULONGLONG DataRunLength; Context->CacheRun = (PUCHAR)Context->Record + Context->Record->NonResident.MappingPairsOffset; Context->CacheRunOffset = 0; @@ -148,9 +148,9 @@ BOOL NtfsFindAttribute(PNTFS_ATTR_CONTEXT Context, PNTFS_MFT_RECORD MftRecord, U } /* FIXME: Optimize for multisector reads. */ -BOOL NtfsDiskRead(U64 Offset, U64 Length, PCHAR Buffer) +BOOL NtfsDiskRead(ULONGLONG Offset, ULONGLONG Length, PCHAR Buffer) { - U16 ReadLength; + USHORT ReadLength; DbgPrint((DPRINT_FILESYSTEM, "NtfsDiskRead - Offset: %I64d Length: %I64d\n", Offset, Length)); RtlZeroMemory((PCHAR)DISKREADBUFFER, 0x1000); @@ -190,16 +190,16 @@ BOOL NtfsDiskRead(U64 Offset, U64 Length, PCHAR Buffer) return TRUE; } -U64 NtfsReadAttribute(PNTFS_ATTR_CONTEXT Context, U64 Offset, PCHAR Buffer, U64 Length) +ULONGLONG NtfsReadAttribute(PNTFS_ATTR_CONTEXT Context, ULONGLONG Offset, PCHAR Buffer, ULONGLONG Length) { - U64 LastLCN; + ULONGLONG LastLCN; PUCHAR DataRun; - S64 DataRunOffset; - U64 DataRunLength; - S64 DataRunStartLCN; - U64 CurrentOffset; - U64 ReadLength; - U64 AlreadyRead; + LONGLONG DataRunOffset; + ULONGLONG DataRunLength; + LONGLONG DataRunStartLCN; + ULONGLONG CurrentOffset; + ULONGLONG ReadLength; + ULONGLONG AlreadyRead; if (!Context->Record->IsNonResident) { @@ -316,31 +316,31 @@ U64 NtfsReadAttribute(PNTFS_ATTR_CONTEXT Context, U64 Offset, PCHAR Buffer, U64 BOOL NtfsFixupRecord(PNTFS_RECORD Record) { - U16 *USA; - U16 USANumber; - U16 USACount; - U16 *Block; + USHORT *USA; + USHORT USANumber; + USHORT USACount; + USHORT *Block; - USA = (U16*)((PCHAR)Record + Record->USAOffset); + USA = (USHORT*)((PCHAR)Record + Record->USAOffset); USANumber = *(USA++); USACount = Record->USACount - 1; /* Exclude the USA Number. */ - Block = (U16*)((PCHAR)Record + NtfsBootSector->BytesPerSector - 2); + Block = (USHORT*)((PCHAR)Record + NtfsBootSector->BytesPerSector - 2); while (USACount) { if (*Block != USANumber) return FALSE; *Block = *(USA++); - Block = (U16*)((PCHAR)Block + NtfsBootSector->BytesPerSector); + Block = (USHORT*)((PCHAR)Block + NtfsBootSector->BytesPerSector); USACount--; } return TRUE; } -BOOL NtfsReadMftRecord(U32 MFTIndex, PNTFS_MFT_RECORD Buffer) +BOOL NtfsReadMftRecord(ULONG MFTIndex, PNTFS_MFT_RECORD Buffer) { - U64 BytesRead; + ULONGLONG BytesRead; BytesRead = NtfsReadAttribute(&NtfsMFTContext, MFTIndex * NtfsMftRecordSize, (PCHAR)Buffer, NtfsMftRecordSize); if (BytesRead != NtfsMftRecordSize) @@ -354,9 +354,9 @@ BOOL NtfsReadMftRecord(U32 MFTIndex, PNTFS_MFT_RECORD Buffer) VOID NtfsPrintFile(PNTFS_INDEX_ENTRY IndexEntry) { PWCHAR FileName; - U8 FileNameLength; + UCHAR FileNameLength; CHAR AnsiFileName[256]; - U8 i; + UCHAR i; FileName = IndexEntry->FileName.FileName; FileNameLength = IndexEntry->FileName.FileNameLength; @@ -372,8 +372,8 @@ VOID NtfsPrintFile(PNTFS_INDEX_ENTRY IndexEntry) BOOL NtfsCompareFileName(PCHAR FileName, PNTFS_INDEX_ENTRY IndexEntry) { PWCHAR EntryFileName; - U8 EntryFileNameLength; - U8 i; + UCHAR EntryFileNameLength; + UCHAR i; EntryFileName = IndexEntry->FileName.FileName; EntryFileNameLength = IndexEntry->FileName.FileNameLength; @@ -402,21 +402,21 @@ BOOL NtfsCompareFileName(PCHAR FileName, PNTFS_INDEX_ENTRY IndexEntry) return TRUE; } -BOOL NtfsFindMftRecord(U32 MFTIndex, PCHAR FileName, U32 *OutMFTIndex) +BOOL NtfsFindMftRecord(ULONG MFTIndex, PCHAR FileName, ULONG *OutMFTIndex) { PNTFS_MFT_RECORD MftRecord; - U32 Magic; + ULONG Magic; NTFS_ATTR_CONTEXT IndexRootCtx; NTFS_ATTR_CONTEXT IndexBitmapCtx; NTFS_ATTR_CONTEXT IndexAllocationCtx; PNTFS_INDEX_ROOT IndexRoot; - U64 BitmapDataSize; - U64 IndexAllocationSize; + ULONGLONG BitmapDataSize; + ULONGLONG IndexAllocationSize; PCHAR BitmapData; PCHAR IndexRecord; PNTFS_INDEX_ENTRY IndexEntry, IndexEntryEnd; - U32 RecordOffset; - U32 IndexBlockSize; + ULONG RecordOffset; + ULONG IndexBlockSize; MftRecord = MmAllocateMemory(NtfsMftRecordSize); if (MftRecord == NULL) @@ -508,8 +508,8 @@ BOOL NtfsFindMftRecord(U32 MFTIndex, PCHAR FileName, U32 *OutMFTIndex) DbgPrint((DPRINT_FILESYSTEM, "RecordOffset: %x IndexAllocationSize: %x\n", RecordOffset, IndexAllocationSize)); for (; RecordOffset < IndexAllocationSize;) { - U8 Bit = 1 << ((RecordOffset / IndexBlockSize) & 7); - U32 Byte = (RecordOffset / IndexBlockSize) >> 3; + UCHAR Bit = 1 << ((RecordOffset / IndexBlockSize) & 7); + ULONG Byte = (RecordOffset / IndexBlockSize) >> 3; if ((BitmapData[Byte] & Bit)) break; RecordOffset += IndexBlockSize; @@ -528,7 +528,7 @@ BOOL NtfsFindMftRecord(U32 MFTIndex, PCHAR FileName, U32 *OutMFTIndex) } /* FIXME */ - IndexEntry = (PNTFS_INDEX_ENTRY)(IndexRecord + 0x18 + *(U16 *)(IndexRecord + 0x18)); + IndexEntry = (PNTFS_INDEX_ENTRY)(IndexRecord + 0x18 + *(USHORT *)(IndexRecord + 0x18)); IndexEntryEnd = (PNTFS_INDEX_ENTRY)(IndexRecord + IndexBlockSize); while (IndexEntry < IndexEntryEnd && @@ -565,10 +565,10 @@ BOOL NtfsFindMftRecord(U32 MFTIndex, PCHAR FileName, U32 *OutMFTIndex) BOOL NtfsLookupFile(PUCHAR FileName, PNTFS_MFT_RECORD MftRecord, PNTFS_ATTR_CONTEXT DataContext) { - U32 NumberOfPathParts; + ULONG NumberOfPathParts; UCHAR PathPart[261]; - U32 CurrentMFTIndex; - U8 i; + ULONG CurrentMFTIndex; + UCHAR i; DbgPrint((DPRINT_FILESYSTEM, "NtfsLookupFile() FileName = %s\n", FileName)); @@ -606,7 +606,7 @@ BOOL NtfsLookupFile(PUCHAR FileName, PNTFS_MFT_RECORD MftRecord, PNTFS_ATTR_CONT return TRUE; } -BOOL NtfsOpenVolume(U32 DriveNumber, U32 VolumeStartSector) +BOOL NtfsOpenVolume(ULONG DriveNumber, ULONG VolumeStartSector) { NtfsBootSector = (PNTFS_BOOTSECTOR)DISKREADBUFFER; @@ -703,36 +703,36 @@ FILE* NtfsOpenFile(PUCHAR FileName) return (FILE*)FileHandle; } -BOOL NtfsReadFile(FILE *File, U32 BytesToRead, U32* BytesRead, PVOID Buffer) +BOOL NtfsReadFile(FILE *File, ULONG BytesToRead, ULONG* BytesRead, PVOID Buffer) { PNTFS_FILE_HANDLE FileHandle = (PNTFS_FILE_HANDLE)File; - U64 BytesRead64; + ULONGLONG BytesRead64; BytesRead64 = NtfsReadAttribute(&FileHandle->DataContext, FileHandle->Offset, Buffer, BytesToRead); if (BytesRead64) { - *BytesRead = (U32)BytesRead64; + *BytesRead = (ULONG)BytesRead64; FileHandle->Offset += BytesRead64; return TRUE; } return FALSE; } -U32 NtfsGetFileSize(FILE *File) +ULONG NtfsGetFileSize(FILE *File) { PNTFS_FILE_HANDLE FileHandle = (PNTFS_FILE_HANDLE)File; if (FileHandle->DataContext.Record->IsNonResident) - return (U32)FileHandle->DataContext.Record->NonResident.DataSize; + return (ULONG)FileHandle->DataContext.Record->NonResident.DataSize; else - return (U32)FileHandle->DataContext.Record->Resident.ValueLength; + return (ULONG)FileHandle->DataContext.Record->Resident.ValueLength; } -VOID NtfsSetFilePointer(FILE *File, U32 NewFilePointer) +VOID NtfsSetFilePointer(FILE *File, ULONG NewFilePointer) { PNTFS_FILE_HANDLE FileHandle = (PNTFS_FILE_HANDLE)File; FileHandle->Offset = NewFilePointer; } -U32 NtfsGetFilePointer(FILE *File) +ULONG NtfsGetFilePointer(FILE *File) { PNTFS_FILE_HANDLE FileHandle = (PNTFS_FILE_HANDLE)File; return FileHandle->Offset; diff --git a/reactos/boot/freeldr/freeldr/fs/ntfs.h b/reactos/boot/freeldr/freeldr/fs/ntfs.h index af51534d365..5c99fb9c638 100644 --- a/reactos/boot/freeldr/freeldr/fs/ntfs.h +++ b/reactos/boot/freeldr/freeldr/fs/ntfs.h @@ -61,122 +61,122 @@ typedef struct { - U8 JumpBoot[3]; // Jump to the boot loader routine - U8 SystemId[8]; // System Id ("NTFS ") - U16 BytesPerSector; // Bytes per sector - U8 SectorsPerCluster; // Number of sectors in a cluster - U8 Unused1[7]; - U8 MediaDescriptor; // Media descriptor byte - U8 Unused2[2]; - U16 SectorsPerTrack; // Number of sectors in a track - U16 NumberOfHeads; // Number of heads on the disk - U8 Unused3[8]; - U8 DriveNumber; // Int 0x13 drive number (e.g. 0x80) - U8 CurrentHead; - U8 BootSignature; // Extended boot signature (0x80) - U8 Unused4; - U64 VolumeSectorCount; // Number of sectors in the volume - U64 MftLocation; - U64 MftMirrorLocation; - S8 ClustersPerMftRecord; // Clusters per MFT Record - U8 Unused5[3]; - S8 ClustersPerIndexRecord; // Clusters per Index Record - U8 Unused6[3]; - U64 VolumeSerialNumber; // Volume serial number - U8 BootCodeAndData[430]; // The remainder of the boot sector - U16 BootSectorMagic; // 0xAA55 + UCHAR JumpBoot[3]; // Jump to the boot loader routine + UCHAR SystemId[8]; // System Id ("NTFS ") + USHORT BytesPerSector; // Bytes per sector + UCHAR SectorsPerCluster; // Number of sectors in a cluster + UCHAR Unused1[7]; + UCHAR MediaDescriptor; // Media descriptor byte + UCHAR Unused2[2]; + USHORT SectorsPerTrack; // Number of sectors in a track + USHORT NumberOfHeads; // Number of heads on the disk + UCHAR Unused3[8]; + UCHAR DriveNumber; // Int 0x13 drive number (e.g. 0x80) + UCHAR CurrentHead; + UCHAR BootSignature; // Extended boot signature (0x80) + UCHAR Unused4; + ULONGLONG VolumeSectorCount; // Number of sectors in the volume + ULONGLONG MftLocation; + ULONGLONG MftMirrorLocation; + CHAR ClustersPerMftRecord; // Clusters per MFT Record + UCHAR Unused5[3]; + CHAR ClustersPerIndexRecord; // Clusters per Index Record + UCHAR Unused6[3]; + ULONGLONG VolumeSerialNumber; // Volume serial number + UCHAR BootCodeAndData[430]; // The remainder of the boot sector + USHORT BootSectorMagic; // 0xAA55 } PACKED NTFS_BOOTSECTOR, *PNTFS_BOOTSECTOR; typedef struct { - U32 Magic; - U16 USAOffset; // Offset to the Update Sequence Array from the start of the ntfs record - U16 USACount; + ULONG Magic; + USHORT USAOffset; // Offset to the Update Sequence Array from the start of the ntfs record + USHORT USACount; } PACKED NTFS_RECORD, *PNTFS_RECORD; typedef struct { - U32 Magic; - U16 USAOffset; // Offset to the Update Sequence Array from the start of the ntfs record - U16 USACount; - U64 LogSequenceNumber; - U16 SequenceNumber; - U16 LinkCount; - U16 AttributesOffset; - U16 Flags; - U32 BytesInUse; // Number of bytes used in this mft record. - U32 BytesAllocated; - U64 BaseMFTRecord; - U16 NextAttributeInstance; + ULONG Magic; + USHORT USAOffset; // Offset to the Update Sequence Array from the start of the ntfs record + USHORT USACount; + ULONGLONG LogSequenceNumber; + USHORT SequenceNumber; + USHORT LinkCount; + USHORT AttributesOffset; + USHORT Flags; + ULONG BytesInUse; // Number of bytes used in this mft record. + ULONG BytesAllocated; + ULONGLONG BaseMFTRecord; + USHORT NextAttributeInstance; } PACKED NTFS_MFT_RECORD, *PNTFS_MFT_RECORD; typedef struct { - U32 Type; - U32 Length; - U8 IsNonResident; - U8 NameLength; - U16 NameOffset; - U16 Flags; - U16 Instance; + ULONG Type; + ULONG Length; + UCHAR IsNonResident; + UCHAR NameLength; + USHORT NameOffset; + USHORT Flags; + USHORT Instance; union { // Resident attributes struct { - U32 ValueLength; - U16 ValueOffset; - U16 Flags; + ULONG ValueLength; + USHORT ValueOffset; + USHORT Flags; } PACKED Resident; // Non-resident attributes struct { - U64 LowestVCN; - U64 HighestVCN; - U16 MappingPairsOffset; - U8 CompressionUnit; - U8 Reserved[5]; - S64 AllocatedSize; - S64 DataSize; - S64 InitializedSize; - S64 CompressedSize; + ULONGLONG LowestVCN; + ULONGLONG HighestVCN; + USHORT MappingPairsOffset; + UCHAR CompressionUnit; + UCHAR Reserved[5]; + LONGLONG AllocatedSize; + LONGLONG DataSize; + LONGLONG InitializedSize; + LONGLONG CompressedSize; } PACKED NonResident; } PACKED; } PACKED NTFS_ATTR_RECORD, *PNTFS_ATTR_RECORD; typedef struct { - U32 EntriesOffset; - U32 IndexLength; - U32 AllocatedSize; - U8 Flags; - U8 Reserved[3]; + ULONG EntriesOffset; + ULONG IndexLength; + ULONG AllocatedSize; + UCHAR Flags; + UCHAR Reserved[3]; } PACKED NTFS_INDEX_HEADER, *PNTFS_INDEX_HEADER; typedef struct { - U32 Type; - U32 CollationRule; - U32 IndexBlockSize; - U8 ClustersPerIndexBlock; - U8 Reserved[3]; + ULONG Type; + ULONG CollationRule; + ULONG IndexBlockSize; + UCHAR ClustersPerIndexBlock; + UCHAR Reserved[3]; NTFS_INDEX_HEADER IndexHeader; } PACKED NTFS_INDEX_ROOT, *PNTFS_INDEX_ROOT; typedef struct { - U64 ParentDirectory; - S64 CreationTime; - S64 LastDataChangeTime; - S64 LastMftChangeTime; - S64 LastAccessTime; - S64 AllocatedSize; - S64 DataSize; - U32 FileAttributes; - U16 PackedExtendedAttributeSize; - U16 Reserved; - U8 FileNameLength; - U8 FileNameType; + ULONGLONG ParentDirectory; + LONGLONG CreationTime; + LONGLONG LastDataChangeTime; + LONGLONG LastMftChangeTime; + LONGLONG LastAccessTime; + LONGLONG AllocatedSize; + LONGLONG DataSize; + ULONG FileAttributes; + USHORT PackedExtendedAttributeSize; + USHORT Reserved; + UCHAR FileNameLength; + UCHAR FileNameType; WCHAR FileName[0]; } PACKED NTFS_FILE_NAME_ATTR, *PNTFS_FILE_NAME_ATTR; @@ -185,19 +185,19 @@ typedef struct { { struct { - U64 IndexedFile; + ULONGLONG IndexedFile; } PACKED Directory; struct { - U16 DataOffset; - U16 DataLength; - U32 Reserved; + USHORT DataOffset; + USHORT DataLength; + ULONG Reserved; } PACKED ViewIndex; } PACKED Data; - U16 Length; - U16 KeyLength; - U16 Flags; - U16 Reserved; + USHORT Length; + USHORT KeyLength; + USHORT Flags; + USHORT Reserved; NTFS_FILE_NAME_ATTR FileName; } PACKED NTFS_INDEX_ENTRY, *PNTFS_INDEX_ENTRY; @@ -205,24 +205,24 @@ typedef struct { PNTFS_ATTR_RECORD Record; PUCHAR CacheRun; - U64 CacheRunOffset; - S64 CacheRunStartLCN; - U64 CacheRunLength; - S64 CacheRunLastLCN; - U64 CacheRunCurrentOffset; + ULONGLONG CacheRunOffset; + LONGLONG CacheRunStartLCN; + ULONGLONG CacheRunLength; + LONGLONG CacheRunLastLCN; + ULONGLONG CacheRunCurrentOffset; } NTFS_ATTR_CONTEXT, *PNTFS_ATTR_CONTEXT; typedef struct { NTFS_ATTR_CONTEXT DataContext; - U64 Offset; + ULONGLONG Offset; } PACKED NTFS_FILE_HANDLE, *PNTFS_FILE_HANDLE; -BOOL NtfsOpenVolume(U32 DriveNumber, U32 VolumeStartSector); +BOOL NtfsOpenVolume(ULONG DriveNumber, ULONG VolumeStartSector); FILE* NtfsOpenFile(PUCHAR FileName); -BOOL NtfsReadFile(FILE *FileHandle, U32 BytesToRead, U32* BytesRead, PVOID Buffer); -U32 NtfsGetFileSize(FILE *FileHandle); -VOID NtfsSetFilePointer(FILE *FileHandle, U32 NewFilePointer); -U32 NtfsGetFilePointer(FILE *FileHandle); +BOOL NtfsReadFile(FILE *FileHandle, ULONG BytesToRead, ULONG* BytesRead, PVOID Buffer); +ULONG NtfsGetFileSize(FILE *FileHandle); +VOID NtfsSetFilePointer(FILE *FileHandle, ULONG NewFilePointer); +ULONG NtfsGetFilePointer(FILE *FileHandle); #endif // #defined __NTFS_H diff --git a/reactos/boot/freeldr/freeldr/include/bootmgr.h b/reactos/boot/freeldr/freeldr/include/bootmgr.h index 330010d2523..9d61a176eeb 100644 --- a/reactos/boot/freeldr/freeldr/include/bootmgr.h +++ b/reactos/boot/freeldr/freeldr/include/bootmgr.h @@ -21,9 +21,9 @@ #define __BOOTMGR_H -U32 GetDefaultOperatingSystem(PUCHAR OperatingSystemList[], U32 OperatingSystemCount); -S32 GetTimeOut(VOID); -BOOL MainBootMenuKeyPressFilter(U32 KeyPress); +ULONG GetDefaultOperatingSystem(PUCHAR OperatingSystemList[], ULONG OperatingSystemCount); +LONG GetTimeOut(VOID); +BOOL MainBootMenuKeyPressFilter(ULONG KeyPress); #endif // #defined __BOOTMGR_H diff --git a/reactos/boot/freeldr/freeldr/include/cache.h b/reactos/boot/freeldr/freeldr/include/cache.h index c9b07c759f9..f1f7529f2e7 100644 --- a/reactos/boot/freeldr/freeldr/include/cache.h +++ b/reactos/boot/freeldr/freeldr/include/cache.h @@ -21,10 +21,10 @@ #ifndef __CACHE_H #define __CACHE_H -BOOL CacheInitializeDrive(U32 DriveNumber); +BOOL CacheInitializeDrive(ULONG DriveNumber); VOID CacheInvalidateCacheData(VOID); -BOOL CacheReadDiskSectors(U32 DiskNumber, U32 StartSector, U32 SectorCount, PVOID Buffer); -BOOL CacheForceDiskSectorsIntoCache(U32 DiskNumber, U32 StartSector, U32 SectorCount); -BOOL CacheReleaseMemory(U32 MinimumAmountToRelease); +BOOL CacheReadDiskSectors(ULONG DiskNumber, ULONG StartSector, ULONG SectorCount, PVOID Buffer); +BOOL CacheForceDiskSectorsIntoCache(ULONG DiskNumber, ULONG StartSector, ULONG SectorCount); +BOOL CacheReleaseMemory(ULONG MinimumAmountToRelease); #endif // defined __CACHE_H diff --git a/reactos/boot/freeldr/freeldr/include/cmdline.h b/reactos/boot/freeldr/freeldr/include/cmdline.h index ddb11fccae4..5bfc3ff84bf 100644 --- a/reactos/boot/freeldr/freeldr/include/cmdline.h +++ b/reactos/boot/freeldr/freeldr/include/cmdline.h @@ -24,13 +24,13 @@ typedef struct tagCMDLINEINFO { char *DefaultOperatingSystem; - S32 TimeOut; + LONG TimeOut; } CMDLINEINFO, *PCMDLINEINFO; extern void CmdLineParse(char *CmdLine); extern char *CmdLineGetDefaultOS(void); -extern S32 CmdLineGetTimeOut(void); +extern LONG CmdLineGetTimeOut(void); #endif /* __CMDLINE_H__ */ diff --git a/reactos/boot/freeldr/freeldr/include/comm.h b/reactos/boot/freeldr/freeldr/include/comm.h index 84fa9a6b98a..bef0d583ab8 100644 --- a/reactos/boot/freeldr/freeldr/include/comm.h +++ b/reactos/boot/freeldr/freeldr/include/comm.h @@ -22,7 +22,7 @@ #ifndef __RS232_H #define __RS232_H -BOOL Rs232PortInitialize(U32 ComPort, U32 BaudRate); +BOOL Rs232PortInitialize(ULONG ComPort, ULONG BaudRate); BOOL Rs232PortGetByte(PUCHAR ByteRecieved); BOOL Rs232PortPollByte(PUCHAR ByteRecieved); VOID Rs232PortPutByte(UCHAR ByteToSend); diff --git a/reactos/boot/freeldr/freeldr/include/disk.h b/reactos/boot/freeldr/freeldr/include/disk.h index bc4451b29c0..dc5abcb4f73 100644 --- a/reactos/boot/freeldr/freeldr/include/disk.h +++ b/reactos/boot/freeldr/freeldr/include/disk.h @@ -23,10 +23,10 @@ typedef struct _GEOMETRY { - U32 Cylinders; // Number of cylinders on the disk - U32 Heads; // Number of heads on the disk - U32 Sectors; // Number of sectors per track - U32 BytesPerSector; // Number of bytes per sector + ULONG Cylinders; // Number of cylinders on the disk + ULONG Heads; // Number of heads on the disk + ULONG Sectors; // Number of sectors per track + ULONG BytesPerSector; // Number of bytes per sector } GEOMETRY, *PGEOMETRY; @@ -35,14 +35,14 @@ typedef struct _GEOMETRY // typedef struct _EXTENDED_GEOMETRY { - U16 Size; - U16 Flags; - U32 Cylinders; - U32 Heads; - U32 SectorsPerTrack; - U64 Sectors; - U16 BytesPerSector; - U32 PDPTE; + USHORT Size; + USHORT Flags; + ULONG Cylinders; + ULONG Heads; + ULONG SectorsPerTrack; + ULONGLONG Sectors; + USHORT BytesPerSector; + ULONG PDPTE; } __attribute__((packed)) EXTENDED_GEOMETRY, *PEXTENDED_GEOMETRY; // @@ -50,16 +50,16 @@ typedef struct _EXTENDED_GEOMETRY // typedef struct _PARTITION_TABLE_ENTRY { - U8 BootIndicator; // 0x00 - non-bootable partition, 0x80 - bootable partition (one partition only) - U8 StartHead; // Beginning head number - U8 StartSector; // Beginning sector (2 high bits of cylinder #) - U8 StartCylinder; // Beginning cylinder# (low order bits of cylinder #) - U8 SystemIndicator; // System indicator - U8 EndHead; // Ending head number - U8 EndSector; // Ending sector (2 high bits of cylinder #) - U8 EndCylinder; // Ending cylinder# (low order bits of cylinder #) - U32 SectorCountBeforePartition; // Number of sectors preceding the partition - U32 PartitionSectorCount; // Number of sectors in the partition + UCHAR BootIndicator; // 0x00 - non-bootable partition, 0x80 - bootable partition (one partition only) + UCHAR StartHead; // Beginning head number + UCHAR StartSector; // Beginning sector (2 high bits of cylinder #) + UCHAR StartCylinder; // Beginning cylinder# (low order bits of cylinder #) + UCHAR SystemIndicator; // System indicator + UCHAR EndHead; // Ending head number + UCHAR EndSector; // Ending sector (2 high bits of cylinder #) + UCHAR EndCylinder; // Ending cylinder# (low order bits of cylinder #) + ULONG SectorCountBeforePartition; // Number of sectors preceding the partition + ULONG PartitionSectorCount; // Number of sectors in the partition } PACKED PARTITION_TABLE_ENTRY, *PPARTITION_TABLE_ENTRY; @@ -68,11 +68,11 @@ typedef struct _PARTITION_TABLE_ENTRY // typedef struct _MASTER_BOOT_RECORD { - U8 MasterBootRecordCodeAndData[0x1b8]; /* 0x000 */ - U32 Signature; /* 0x1B8 */ - U16 Reserved; /* 0x1BC */ + UCHAR MasterBootRecordCodeAndData[0x1b8]; /* 0x000 */ + ULONG Signature; /* 0x1B8 */ + USHORT Reserved; /* 0x1BC */ PARTITION_TABLE_ENTRY PartitionTable[4]; /* 0x1BE */ - U16 MasterBootRecordMagic; /* 0x1FE */ + USHORT MasterBootRecordMagic; /* 0x1FE */ } PACKED MASTER_BOOT_RECORD, *PMASTER_BOOT_RECORD; @@ -106,10 +106,10 @@ typedef struct _MASTER_BOOT_RECORD /////////////////////////////////////////////////////////////////////////////////////// #ifdef __i386__ -BOOL DiskResetController(U32 DriveNumber); -BOOL DiskInt13ExtensionsSupported(U32 DriveNumber); +BOOL DiskResetController(ULONG DriveNumber); +BOOL DiskInt13ExtensionsSupported(ULONG DriveNumber); //VOID DiskStopFloppyMotor(VOID); -BOOL DiskGetExtendedDriveParameters(U32 DriveNumber, PVOID Buffer, U16 BufferSize); +BOOL DiskGetExtendedDriveParameters(ULONG DriveNumber, PVOID Buffer, USHORT BufferSize); #endif // defined __i386__ @@ -119,10 +119,10 @@ BOOL DiskGetExtendedDriveParameters(U32 DriveNumber, PVOID Buffer, U16 BufferSiz // /////////////////////////////////////////////////////////////////////////////////////// VOID DiskReportError (BOOL bError); -VOID DiskError(PUCHAR ErrorString, U32 ErrorCode); -PUCHAR DiskGetErrorCodeString(U32 ErrorCode); -BOOL DiskReadLogicalSectors(U32 DriveNumber, U64 SectorNumber, U32 SectorCount, PVOID Buffer); // Implemented in i386disk.c -BOOL DiskIsDriveRemovable(U32 DriveNumber); +VOID DiskError(PUCHAR ErrorString, ULONG ErrorCode); +PUCHAR DiskGetErrorCodeString(ULONG ErrorCode); +BOOL DiskReadLogicalSectors(ULONG DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer); // Implemented in i386disk.c +BOOL DiskIsDriveRemovable(ULONG DriveNumber); VOID DiskStopFloppyMotor(VOID); // Implemented in i386disk.c /////////////////////////////////////////////////////////////////////////////////////// @@ -130,10 +130,10 @@ VOID DiskStopFloppyMotor(VOID); // Implemented in i386disk.c // Fixed Disk Partition Management Functions // /////////////////////////////////////////////////////////////////////////////////////// -BOOL DiskGetActivePartitionEntry(U32 DriveNumber, PPARTITION_TABLE_ENTRY PartitionTableEntry); -BOOL DiskGetPartitionEntry(U32 DriveNumber, U32 PartitionNumber, PPARTITION_TABLE_ENTRY PartitionTableEntry); +BOOL DiskGetActivePartitionEntry(ULONG DriveNumber, PPARTITION_TABLE_ENTRY PartitionTableEntry); +BOOL DiskGetPartitionEntry(ULONG DriveNumber, ULONG PartitionNumber, PPARTITION_TABLE_ENTRY PartitionTableEntry); BOOL DiskGetFirstPartitionEntry(PMASTER_BOOT_RECORD MasterBootRecord, PPARTITION_TABLE_ENTRY PartitionTableEntry); BOOL DiskGetFirstExtendedPartitionEntry(PMASTER_BOOT_RECORD MasterBootRecord, PPARTITION_TABLE_ENTRY PartitionTableEntry); -BOOL DiskReadBootRecord(U32 DriveNumber, U64 LogicalSectorNumber, PMASTER_BOOT_RECORD BootRecord); +BOOL DiskReadBootRecord(ULONG DriveNumber, ULONGLONG LogicalSectorNumber, PMASTER_BOOT_RECORD BootRecord); #endif // defined __DISK_H diff --git a/reactos/boot/freeldr/freeldr/include/drivemap.h b/reactos/boot/freeldr/freeldr/include/drivemap.h index af4b1c91c87..2aeaf662089 100644 --- a/reactos/boot/freeldr/freeldr/include/drivemap.h +++ b/reactos/boot/freeldr/freeldr/include/drivemap.h @@ -23,21 +23,21 @@ typedef struct { - U8 DriveMapCount; // Count of drives currently mapped + UCHAR DriveMapCount; // Count of drives currently mapped - U8 DriveMap[8]; // Map of BIOS drives + UCHAR DriveMap[8]; // Map of BIOS drives } PACKED DRIVE_MAP_LIST, *PDRIVE_MAP_LIST; VOID DriveMapMapDrivesInSection(PUCHAR SectionName); BOOL DriveMapIsValidDriveString(PUCHAR DriveString); // Checks the drive string ("hd0") for validity -U32 DriveMapGetBiosDriveNumber(PUCHAR DeviceName); // Returns a BIOS drive number for any given device name (e.g. 0x80 for 'hd0') +ULONG DriveMapGetBiosDriveNumber(PUCHAR DeviceName); // Returns a BIOS drive number for any given device name (e.g. 0x80 for 'hd0') VOID DriveMapInstallInt13Handler(PDRIVE_MAP_LIST DriveMap); // Installs the int 13h handler for the drive mapper VOID DriveMapRemoveInt13Handler(VOID); // Removes a previously installed int 13h drive map handler extern PVOID DriveMapInt13HandlerStart; extern PVOID DriveMapInt13HandlerEnd; -extern U32 DriveMapOldInt13HandlerAddress; +extern ULONG DriveMapOldInt13HandlerAddress; extern DRIVE_MAP_LIST DriveMapInt13HandlerMapList; #endif // #defined __DRIVEMAP_H diff --git a/reactos/boot/freeldr/freeldr/include/freeldr.h b/reactos/boot/freeldr/freeldr/include/freeldr.h index ffd8f228425..3b41ac30190 100644 --- a/reactos/boot/freeldr/freeldr/include/freeldr.h +++ b/reactos/boot/freeldr/freeldr/include/freeldr.h @@ -20,68 +20,29 @@ #ifndef __FREELDR_H #define __FREELDR_H -#define NULL 0 -#define TRUE 1 -#define FALSE 0 - -#define BOOL int -#define BOOLEAN int -typedef BOOLEAN *PBOOLEAN; - -#define CHAR char -#define PCHAR char * -#define UCHAR unsigned char -#define PUCHAR unsigned char * -#define WCHAR unsigned short -#define PWCHAR unsigned short * -#define ULONG unsigned long -#if defined(_WIN64) -#define ULONG_PTR __int64 -#else -#define ULONG_PTR unsigned long -#endif - -#define VOID void -#define PVOID VOID* - -#ifdef __i386__ - -#define size_t unsigned int - -typedef unsigned char U8; -typedef char S8; -typedef unsigned short U16; -typedef short S16; -typedef unsigned long U32; -typedef long S32; -typedef unsigned long long U64; -typedef long long S64; - -typedef U8 __u8; -typedef S8 __s8; -typedef U16 __u16; -typedef S16 __s16; -typedef U32 __u32; -typedef S32 __s32; -typedef U64 __u64; -typedef S64 __s64; - -#endif // __i386__ - -typedef U8 *PU8; -typedef U16 *PU16; -typedef U32 *PU32; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #define ROUND_UP(N, S) (((N) + (S) - 1) & ~((S) - 1)) #define ROUND_DOWN(N, S) ((N) & ~((S) - 1)) +#define Ke386EraseFlags(x) __asm__ __volatile__("pushl $0 ; popfl\n") + +extern ULONG BootDrive; /* BIOS boot drive, 0-A:, 1-B:, 0x80-C:, 0x81-D:, etc. */ +extern ULONG BootPartition; /* Boot Partition, 1-4 */ +extern BOOL UserInterfaceUp; /* Tells us if the user interface is displayed */ -#define PACKED __attribute__((packed)) - -extern U32 BootDrive; // BIOS boot drive, 0-A:, 1-B:, 0x80-C:, 0x81-D:, etc. -extern U32 BootPartition; // Boot Partition, 1-4 -extern BOOL UserInterfaceUp; // Tells us if the user interface is displayed - -void BootMain(char *CmdLine); -VOID RunLoader(VOID); +VOID BootMain(LPSTR CmdLine); +VOID RunLoader(VOID); #endif // defined __FREELDR_H diff --git a/reactos/boot/freeldr/freeldr/include/fs.h b/reactos/boot/freeldr/freeldr/include/fs.h index 35ab38f4c09..6b2d57d774a 100644 --- a/reactos/boot/freeldr/freeldr/include/fs.h +++ b/reactos/boot/freeldr/freeldr/include/fs.h @@ -33,15 +33,15 @@ #define PFILE FILE * VOID FileSystemError(PUCHAR ErrorString); -BOOL FsOpenVolume(U32 DriveNumber, U32 PartitionNumber); +BOOL FsOpenVolume(ULONG DriveNumber, ULONG PartitionNumber); PFILE FsOpenFile(PUCHAR FileName); VOID FsCloseFile(PFILE FileHandle); -BOOL FsReadFile(PFILE FileHandle, U32 BytesToRead, U32* BytesRead, PVOID Buffer); -U32 FsGetFileSize(PFILE FileHandle); -VOID FsSetFilePointer(PFILE FileHandle, U32 NewFilePointer); -U32 FsGetFilePointer(PFILE FileHandle); +BOOL FsReadFile(PFILE FileHandle, ULONG BytesToRead, ULONG* BytesRead, PVOID Buffer); +ULONG FsGetFileSize(PFILE FileHandle); +VOID FsSetFilePointer(PFILE FileHandle, ULONG NewFilePointer); +ULONG FsGetFilePointer(PFILE FileHandle); BOOL FsIsEndOfFile(PFILE FileHandle); -U32 FsGetNumPathParts(PUCHAR Path); +ULONG FsGetNumPathParts(PUCHAR Path); VOID FsGetFirstNameFromPath(PUCHAR Buffer, PUCHAR Path); #endif // #defined __FS_H diff --git a/reactos/boot/freeldr/freeldr/include/inffile.h b/reactos/boot/freeldr/freeldr/include/inffile.h index e386324aee3..5848be34f50 100644 --- a/reactos/boot/freeldr/freeldr/include/inffile.h +++ b/reactos/boot/freeldr/freeldr/include/inffile.h @@ -36,7 +36,7 @@ #define MAX_INF_STRING_LENGTH 512 -typedef PU32 HINF, *PHINF; +typedef PULONG HINF, *PHINF; typedef struct _INFCONTEXT { @@ -52,7 +52,7 @@ typedef struct _INFCONTEXT BOOLEAN InfOpenFile (PHINF InfHandle, PCHAR FileName, - PU32 ErrorLine); + PULONG ErrorLine); VOID InfCloseFile (HINF InfHandle); @@ -79,39 +79,39 @@ InfFindNextMatchLine (PINFCONTEXT ContextIn, PINFCONTEXT ContextOut); -S32 +LONG InfGetLineCount (HINF InfHandle, PCHAR Section); -S32 +LONG InfGetFieldCount (PINFCONTEXT Context); BOOLEAN InfGetBinaryField (PINFCONTEXT Context, - U32 FieldIndex, - PU8 ReturnBuffer, - U32 ReturnBufferSize, - PU32 RequiredSize); + ULONG FieldIndex, + PUCHAR ReturnBuffer, + ULONG ReturnBufferSize, + PULONG RequiredSize); BOOLEAN InfGetIntField (PINFCONTEXT Context, - U32 FieldIndex, - S32 *IntegerValue); + ULONG FieldIndex, + LONG *IntegerValue); BOOLEAN InfGetMultiSzField (PINFCONTEXT Context, - U32 FieldIndex, + ULONG FieldIndex, PCHAR ReturnBuffer, - U32 ReturnBufferSize, - PU32 RequiredSize); + ULONG ReturnBufferSize, + PULONG RequiredSize); BOOLEAN InfGetStringField (PINFCONTEXT Context, - U32 FieldIndex, + ULONG FieldIndex, PCHAR ReturnBuffer, - U32 ReturnBufferSize, - PU32 RequiredSize); + ULONG ReturnBufferSize, + PULONG RequiredSize); @@ -122,7 +122,7 @@ InfGetData (PINFCONTEXT Context, BOOLEAN InfGetDataField (PINFCONTEXT Context, - U32 FieldIndex, + ULONG FieldIndex, PCHAR *Data); #endif /* __INFCACHE_H__ */ diff --git a/reactos/boot/freeldr/freeldr/include/inifile.h b/reactos/boot/freeldr/freeldr/include/inifile.h index 646d5319a3f..4b218363eb2 100644 --- a/reactos/boot/freeldr/freeldr/include/inifile.h +++ b/reactos/boot/freeldr/freeldr/include/inifile.h @@ -22,14 +22,14 @@ BOOL IniFileInitialize(VOID); -BOOL IniOpenSection(PUCHAR SectionName, U32* SectionId); -U32 IniGetNumSectionItems(U32 SectionId); -U32 IniGetSectionSettingNameSize(U32 SectionId, U32 SettingIndex); -U32 IniGetSectionSettingValueSize(U32 SectionId, U32 SettingIndex); -BOOL IniReadSettingByNumber(U32 SectionId, U32 SettingNumber, PUCHAR SettingName, U32 NameSize, PUCHAR SettingValue, U32 ValueSize); -BOOL IniReadSettingByName(U32 SectionId, PUCHAR SettingName, PUCHAR Buffer, U32 BufferSize); -BOOL IniAddSection(PUCHAR SectionName, U32* SectionId); -BOOL IniAddSettingValueToSection(U32 SectionId, PUCHAR SettingName, PUCHAR SettingValue); +BOOL IniOpenSection(PUCHAR SectionName, ULONG* SectionId); +ULONG IniGetNumSectionItems(ULONG SectionId); +ULONG IniGetSectionSettingNameSize(ULONG SectionId, ULONG SettingIndex); +ULONG IniGetSectionSettingValueSize(ULONG SectionId, ULONG SettingIndex); +BOOL IniReadSettingByNumber(ULONG SectionId, ULONG SettingNumber, PUCHAR SettingName, ULONG NameSize, PUCHAR SettingValue, ULONG ValueSize); +BOOL IniReadSettingByName(ULONG SectionId, PUCHAR SettingName, PUCHAR Buffer, ULONG BufferSize); +BOOL IniAddSection(PUCHAR SectionName, ULONG* SectionId); +BOOL IniAddSettingValueToSection(ULONG SectionId, PUCHAR SettingName, PUCHAR SettingValue); #endif // defined __PARSEINI_H diff --git a/reactos/boot/freeldr/freeldr/include/linux.h b/reactos/boot/freeldr/freeldr/include/linux.h index 280cbf762ad..dc19f971b76 100644 --- a/reactos/boot/freeldr/freeldr/include/linux.h +++ b/reactos/boot/freeldr/freeldr/include/linux.h @@ -45,34 +45,34 @@ typedef struct { - U8 BootCode1[0x20]; + UCHAR BootCode1[0x20]; - U16 CommandLineMagic; - U16 CommandLineOffset; + USHORT CommandLineMagic; + USHORT CommandLineOffset; - U8 BootCode2[0x1CD]; + UCHAR BootCode2[0x1CD]; - U8 SetupSectors; - U16 RootFlags; - U16 SystemSize; - U16 SwapDevice; - U16 RamSize; - U16 VideoMode; - U16 RootDevice; - U16 BootFlag; // 0xAA55 + UCHAR SetupSectors; + USHORT RootFlags; + USHORT SystemSize; + USHORT SwapDevice; + USHORT RamSize; + USHORT VideoMode; + USHORT RootDevice; + USHORT BootFlag; // 0xAA55 } PACKED LINUX_BOOTSECTOR, *PLINUX_BOOTSECTOR; typedef struct { - U8 JumpInstruction[2]; - U32 SetupHeaderSignature; // Signature for SETUP-header - U16 Version; // Version number of header format - U16 RealModeSwitch; // Default switch - U16 SetupSeg; // SETUPSEG - U16 StartSystemSeg; - U16 KernelVersion; // Offset to kernel version string - U8 TypeOfLoader; // Loader ID + UCHAR JumpInstruction[2]; + ULONG SetupHeaderSignature; // Signature for SETUP-header + USHORT Version; // Version number of header format + USHORT RealModeSwitch; // Default switch + USHORT SetupSeg; // SETUPSEG + USHORT StartSystemSeg; + USHORT KernelVersion; // Offset to kernel version string + UCHAR TypeOfLoader; // Loader ID // =0, old one (LILO, Loadlin, // Bootlin, SYSLX, bootsect...) // else it is set by the loader: @@ -83,7 +83,7 @@ typedef struct // T=4 for ETHERBOOT // V = version - U8 LoadFlags; // flags, unused bits must be zero (RFU) + UCHAR LoadFlags; // flags, unused bits must be zero (RFU) // LOADED_HIGH = 1 // bit within loadflags, // if set, then the kernel is loaded high @@ -93,39 +93,39 @@ typedef struct // can be used for heap purposes. // Only the loader knows what is free! - U16 SetupMoveSize; // size to move, when we (setup) are not + USHORT SetupMoveSize; // size to move, when we (setup) are not // loaded at 0x90000. We will move ourselves // to 0x90000 then just before jumping into // the kernel. However, only the loader // know how much of data behind us also needs // to be loaded. - U32 Code32Start; // here loaders can put a different + ULONG Code32Start; // here loaders can put a different // start address for 32-bit code. // // 0x1000 = default for zImage // // 0x100000 = default for big kernel - U32 RamdiskAddress; // address of loaded ramdisk image + ULONG RamdiskAddress; // address of loaded ramdisk image // Here the loader (or kernel generator) puts // the 32-bit address were it loaded the image. - U32 RamdiskSize; // its size in bytes + ULONG RamdiskSize; // its size in bytes - U16 BootSectKludgeOffset; - U16 BootSectKludgeSegment; - U16 HeapEnd; // space from here (exclusive) down to + USHORT BootSectKludgeOffset; + USHORT BootSectKludgeSegment; + USHORT HeapEnd; // space from here (exclusive) down to // end of setup code can be used by setup // for local heap purposes. - U16 Pad1; - U32 CommandLinePointer; // 32-bit pointer to the kernel command line - U32 InitrdAddressMax; // Highest legal initrd address + USHORT Pad1; + ULONG CommandLinePointer; // 32-bit pointer to the kernel command line + ULONG InitrdAddressMax; // Highest legal initrd address } PACKED LINUX_SETUPSECTOR, *PLINUX_SETUPSECTOR; VOID BootNewLinuxKernel(VOID); // Implemented in linux.S -VOID BootOldLinuxKernel(U32 KernelSize); // Implemented in linux.S +VOID BootOldLinuxKernel(ULONG KernelSize); // Implemented in linux.S VOID LoadAndBootLinux(PUCHAR OperatingSystemName, PUCHAR Description); diff --git a/reactos/boot/freeldr/freeldr/include/machine.h b/reactos/boot/freeldr/freeldr/include/machine.h index 3da9b3b4d9d..2642ed57f8e 100644 --- a/reactos/boot/freeldr/freeldr/include/machine.h +++ b/reactos/boot/freeldr/freeldr/include/machine.h @@ -40,28 +40,28 @@ typedef struct tagMACHVTBL BOOL (*ConsKbHit)(VOID); int (*ConsGetCh)(VOID); - VOID (*VideoClearScreen)(U8 Attr); + VOID (*VideoClearScreen)(UCHAR Attr); VIDEODISPLAYMODE (*VideoSetDisplayMode)(char *DisplayMode, BOOL Init); - VOID (*VideoGetDisplaySize)(PU32 Width, PU32 Height, PU32 Depth); - U32 (*VideoGetBufferSize)(VOID); - VOID (*VideoSetTextCursorPosition)(U32 X, U32 Y); + VOID (*VideoGetDisplaySize)(PULONG Width, PULONG Height, PULONG Depth); + ULONG (*VideoGetBufferSize)(VOID); + VOID (*VideoSetTextCursorPosition)(ULONG X, ULONG Y); VOID (*VideoHideShowTextCursor)(BOOL Show); - VOID (*VideoPutChar)(int Ch, U8 Attr, unsigned X, unsigned Y); + VOID (*VideoPutChar)(int Ch, UCHAR Attr, unsigned X, unsigned Y); VOID (*VideoCopyOffScreenBufferToVRAM)(PVOID Buffer); BOOL (*VideoIsPaletteFixed)(VOID); - VOID (*VideoSetPaletteColor)(U8 Color, U8 Red, U8 Green, U8 Blue); - VOID (*VideoGetPaletteColor)(U8 Color, U8* Red, U8* Green, U8* Blue); + VOID (*VideoSetPaletteColor)(UCHAR Color, UCHAR Red, UCHAR Green, UCHAR Blue); + VOID (*VideoGetPaletteColor)(UCHAR Color, UCHAR* Red, UCHAR* Green, UCHAR* Blue); VOID (*VideoSync)(VOID); VOID (*VideoPrepareForReactOS)(VOID); - U32 (*GetMemoryMap)(PBIOS_MEMORY_MAP BiosMemoryMap, U32 MaxMemoryMapSize); + ULONG (*GetMemoryMap)(PBIOS_MEMORY_MAP BiosMemoryMap, ULONG MaxMemoryMapSize); - BOOL (*DiskReadLogicalSectors)(U32 DriveNumber, U64 SectorNumber, U32 SectorCount, PVOID Buffer); - BOOL (*DiskGetPartitionEntry)(U32 DriveNumber, U32 PartitionNumber, PPARTITION_TABLE_ENTRY PartitionTableEntry); - BOOL (*DiskGetDriveGeometry)(U32 DriveNumber, PGEOMETRY DriveGeometry); - U32 (*DiskGetCacheableBlockCount)(U32 DriveNumber); + BOOL (*DiskReadLogicalSectors)(ULONG DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer); + BOOL (*DiskGetPartitionEntry)(ULONG DriveNumber, ULONG PartitionNumber, PPARTITION_TABLE_ENTRY PartitionTableEntry); + BOOL (*DiskGetDriveGeometry)(ULONG DriveNumber, PGEOMETRY DriveGeometry); + ULONG (*DiskGetCacheableBlockCount)(ULONG DriveNumber); - VOID (*RTCGetCurrentDateTime)(PU32 Year, PU32 Month, PU32 Day, PU32 Hour, PU32 Minute, PU32 Second); + VOID (*RTCGetCurrentDateTime)(PULONG Year, PULONG Month, PULONG Day, PULONG Hour, PULONG Minute, PULONG Second); VOID (*HwDetect)(VOID); } MACHVTBL, *PMACHVTBL; diff --git a/reactos/boot/freeldr/freeldr/include/mm.h b/reactos/boot/freeldr/freeldr/include/mm.h index 96c87de24a9..ccd6aaaa933 100644 --- a/reactos/boot/freeldr/freeldr/include/mm.h +++ b/reactos/boot/freeldr/freeldr/include/mm.h @@ -29,23 +29,23 @@ typedef struct { - U64 BaseAddress; - U64 Length; - U32 Type; - U32 Reserved; + ULONGLONG BaseAddress; + ULONGLONG Length; + ULONG Type; + ULONG Reserved; } PACKED BIOS_MEMORY_MAP, *PBIOS_MEMORY_MAP; -U32 GetSystemMemorySize(VOID); // Returns the amount of total memory in the system +ULONG GetSystemMemorySize(VOID); // Returns the amount of total memory in the system -//BOOL MmInitializeMemoryManager(U32 LowMemoryStart, U32 LowMemoryLength); +//BOOL MmInitializeMemoryManager(ULONG LowMemoryStart, ULONG LowMemoryLength); BOOL MmInitializeMemoryManager(VOID); -PVOID MmAllocateMemory(U32 MemorySize); +PVOID MmAllocateMemory(ULONG MemorySize); VOID MmFreeMemory(PVOID MemoryPointer); -//PVOID MmAllocateLowMemory(U32 MemorySize); +//PVOID MmAllocateLowMemory(ULONG MemorySize); //VOID MmFreeLowMemory(PVOID MemoryPointer); -PVOID MmAllocateMemoryAtAddress(U32 MemorySize, PVOID DesiredAddress); -PVOID MmAllocateHighestMemoryBelowAddress(U32 MemorySize, PVOID DesiredAddress); +PVOID MmAllocateMemoryAtAddress(ULONG MemorySize, PVOID DesiredAddress); +PVOID MmAllocateHighestMemoryBelowAddress(ULONG MemorySize, PVOID DesiredAddress); #endif // defined __MEMORY_H diff --git a/reactos/boot/freeldr/freeldr/include/multiboot.h b/reactos/boot/freeldr/freeldr/include/multiboot.h index 755a7c829b2..f4e2cb42cf7 100644 --- a/reactos/boot/freeldr/freeldr/include/multiboot.h +++ b/reactos/boot/freeldr/freeldr/include/multiboot.h @@ -89,38 +89,34 @@ typedef struct elf_section_header_table unsigned long shndx; } elf_section_header_table_t; -/* The Multiboot information. */ -typedef struct multiboot_info +typedef struct _LOADER_PARAMETER_BLOCK { - unsigned long flags; - unsigned long mem_lower; - unsigned long mem_upper; - unsigned long boot_device; - unsigned long cmdline; - unsigned long mods_count; - unsigned long mods_addr; -#if 0 - /* reactos and loadros define this entry with a size of 12 byte but the union is 16 byte */ - union - { - aout_symbol_table_t aout_sym; - elf_section_header_table_t elf_sec; - } u; -#else - char syms[12]; -#endif - unsigned long mmap_length; - unsigned long mmap_addr; -} multiboot_info_t; + ULONG Flags; + ULONG MemLower; + ULONG MemHigher; + ULONG BootDevice; + ULONG CommandLine; + ULONG ModsCount; + ULONG ModsAddr; + UCHAR Syms[12]; + ULONG MmapLength; + ULONG MmapAddr; + ULONG DrivesCount; + ULONG DrivesAddr; + ULONG ConfigTable; + ULONG BootLoaderName; + ULONG PageDirectoryStart; + ULONG PageDirectoryEnd; + ULONG KernelBase; +} LOADER_PARAMETER_BLOCK, *PLOADER_PARAMETER_BLOCK; /* The module structure. */ -typedef struct module -{ - unsigned long mod_start; - unsigned long mod_end; - unsigned long string; - unsigned long reserved; -} module_t; +typedef struct _FRLDR_MODULE { + ULONG_PTR ModuleStart; + ULONG_PTR ModuleEnd; + LPSTR ModuleName; + ULONG Reserved; +} FRLDR_MODULE, *PFRLDR_MODULE; /* The memory map. Be careful that the offset 0 is base_addr_low but no size. */ @@ -136,27 +132,92 @@ typedef struct memory_map } memory_map_t; -multiboot_header_t mb_header; // Multiboot header structure defined in kernel image file -multiboot_info_t mb_info; // Multiboot info structure passed to kernel -char multiboot_kernel_cmdline[255]; // Command line passed to kernel -module_t multiboot_modules[64]; // Array to hold boot module info loaded for the kernel +LOADER_PARAMETER_BLOCK LoaderBlock; /* Multiboot info structure passed to kernel */ +char multiboot_kernel_cmdline[255]; // Command line passed to kernel +FRLDR_MODULE multiboot_modules[64]; // Array to hold boot module info loaded for the kernel char multiboot_module_strings[64][256]; // Array to hold module names unsigned long multiboot_memory_map_descriptor_size; -memory_map_t multiboot_memory_map[32]; // Memory map +memory_map_t multiboot_memory_map[32]; // Memory map void boot_reactos(void); #include "fs.h" // Included FILE structure definition -BOOL MultiBootLoadKernel(FILE *KernelImage); -//BOOL MultiBootLoadModule(FILE *ModuleImage, char *ModuleName); -PVOID MultiBootLoadModule(FILE *ModuleImage, char *ModuleName, U32* ModuleSize); +BOOL +STDCALL +FrLdrBootReactOs(VOID); + +BOOL +STDCALL +FrLdrMapKernel(FILE *KernelImage); + +ULONG_PTR +STDCALL +FrLdrCreateModule(LPSTR ModuleName); + +ULONG_PTR +STDCALL +FrLdrLoadModule(FILE *ModuleImage, + LPSTR ModuleName, + PULONG ModuleSize); + +BOOL +STDCALL +FrLdrLoadKernel(PCHAR szFileName, + INT nPos); + +BOOL +FrLdrLoadNlsFile(PCHAR szSystemRoot, + PCHAR szErrorOut); + +BOOL +FrLdrLoadDriver(PCHAR szFileName, + INT nPos); +BOOL +LoadSymbolFile(PCHAR szSystemRoot, + PCHAR ModuleName, + INT nPos); + +VOID +FrLdrLoadBootDrivers(PCHAR szSystemRoot, + INT nPos); + +BOOL +STDCALL +FrLdrCloseModule(ULONG_PTR ModuleBase, + ULONG dwModuleSize); + +VOID +STDCALL +FrLdrStartup(ULONG Magic); + +VOID +FASTCALL +FrLdrGetKernelBase(VOID); + +VOID +FASTCALL +FrLdrSetupPae(ULONG Magic); + +VOID +FASTCALL +FrLdrGetPaeMode(VOID); + +VOID +FASTCALL +FrLdrSetupPageDirectory(VOID); + +VOID +LoadAndBootReactOS(PUCHAR OperatingSystemName); + +VOID FASTCALL AsmCode(VOID); +typedef VOID (FASTCALL *ASMCODE)(ULONG Magic, + PLOADER_PARAMETER_BLOCK LoaderBlock); int GetBootPartition(char *OperatingSystemName); -PVOID MultiBootCreateModule(char *ModuleName); -BOOL MultiBootCloseModule(PVOID ModuleBase, U32 dwModuleSize); + #endif /* ! ASM */ diff --git a/reactos/boot/freeldr/freeldr/include/oslist.h b/reactos/boot/freeldr/freeldr/include/oslist.h index 5f874066bd6..3376df9e74d 100644 --- a/reactos/boot/freeldr/freeldr/include/oslist.h +++ b/reactos/boot/freeldr/freeldr/include/oslist.h @@ -20,9 +20,9 @@ #ifndef __OSLIST_H #define __OSLIST_H -BOOL InitOperatingSystemList(PUCHAR **SectionNamesPointer, PUCHAR **DisplayNamesPointer, U32* OperatingSystemCountPointer); -U32 CountOperatingSystems(U32 SectionId); -BOOL AllocateListMemory(PUCHAR **SectionNamesPointer, PUCHAR **DisplayNamesPointer, U32 OperatingSystemCount); +BOOL InitOperatingSystemList(PUCHAR **SectionNamesPointer, PUCHAR **DisplayNamesPointer, ULONG* OperatingSystemCountPointer); +ULONG CountOperatingSystems(ULONG SectionId); +BOOL AllocateListMemory(PUCHAR **SectionNamesPointer, PUCHAR **DisplayNamesPointer, ULONG OperatingSystemCount); BOOL RemoveQuotes(PUCHAR QuotedString); #endif // #defined __OSLIST_H diff --git a/reactos/boot/freeldr/freeldr/include/portio.h b/reactos/boot/freeldr/freeldr/include/portio.h index f7aba205aa0..f4550bf2f50 100644 --- a/reactos/boot/freeldr/freeldr/include/portio.h +++ b/reactos/boot/freeldr/freeldr/include/portio.h @@ -27,52 +27,52 @@ */ VOID -/*STDCALL*/ -READ_PORT_BUFFER_UCHAR (PUCHAR Port, PUCHAR Value, U32 Count); +STDCALL +READ_PORT_BUFFER_UCHAR (PUCHAR Port, PUCHAR Value, ULONG Count); VOID -/*STDCALL*/ -READ_PORT_BUFFER_ULONG (U32* Port, U32* Value, U32 Count); +STDCALL +READ_PORT_BUFFER_ULONG (ULONG* Port, ULONG* Value, ULONG Count); VOID -/*STDCALL*/ -READ_PORT_BUFFER_USHORT (U16* Port, U16* Value, U32 Count); +STDCALL +READ_PORT_BUFFER_USHORT (USHORT* Port, USHORT* Value, ULONG Count); UCHAR -/*STDCALL*/ +STDCALL READ_PORT_UCHAR (PUCHAR Port); -U32 -/*STDCALL*/ -READ_PORT_ULONG (U32* Port); +ULONG +STDCALL +READ_PORT_ULONG (ULONG* Port); -U16 -/*STDCALL*/ -READ_PORT_USHORT (U16* Port); +USHORT +STDCALL +READ_PORT_USHORT (USHORT* Port); VOID -/*STDCALL*/ -WRITE_PORT_BUFFER_UCHAR (PUCHAR Port, PUCHAR Value, U32 Count); +STDCALL +WRITE_PORT_BUFFER_UCHAR (PUCHAR Port, PUCHAR Value, ULONG Count); VOID -/*STDCALL*/ -WRITE_PORT_BUFFER_ULONG (U32* Port, U32* Value, U32 Count); +STDCALL +WRITE_PORT_BUFFER_ULONG (ULONG* Port, ULONG* Value, ULONG Count); VOID -/*STDCALL*/ -WRITE_PORT_BUFFER_USHORT (U16* Port, U16* Value, U32 Count); +STDCALL +WRITE_PORT_BUFFER_USHORT (USHORT* Port, USHORT* Value, ULONG Count); VOID -/*STDCALL*/ +STDCALL WRITE_PORT_UCHAR (PUCHAR Port, UCHAR Value); VOID -/*STDCALL*/ -WRITE_PORT_ULONG (U32* Port, U32 Value); +STDCALL +WRITE_PORT_ULONG (ULONG* Port, ULONG Value); VOID -/*STDCALL*/ -WRITE_PORT_USHORT (U16* Port, U16 Value); +STDCALL +WRITE_PORT_USHORT (USHORT* Port, USHORT Value); #endif // defined __PORTIO_H diff --git a/reactos/boot/freeldr/freeldr/include/reactos.h b/reactos/boot/freeldr/freeldr/include/reactos.h index 780bb139afc..c553754b2e6 100644 --- a/reactos/boot/freeldr/freeldr/include/reactos.h +++ b/reactos/boot/freeldr/freeldr/include/reactos.h @@ -26,23 +26,23 @@ // ReactOS Loading Functions // /////////////////////////////////////////////////////////////////////////////////////// -void LoadAndBootReactOS(PUCHAR OperatingSystemName); +VOID LoadAndBootReactOS(PUCHAR OperatingSystemName); /////////////////////////////////////////////////////////////////////////////////////// // // ReactOS Setup Loader Functions // /////////////////////////////////////////////////////////////////////////////////////// -VOID ReactOSRunSetupLoader(VOID); +VOID ReactOSRunSetupLoader(VOID); /////////////////////////////////////////////////////////////////////////////////////// // // ARC Path Functions // /////////////////////////////////////////////////////////////////////////////////////// -BOOL DissectArcPath(char *ArcPath, char *BootPath, U32* BootDrive, U32* BootPartition); -void ConstructArcPath(PUCHAR ArcPath, PUCHAR SystemFolder, U32 Disk, U32 Partition); -U32 ConvertArcNameToBiosDriveNumber(PUCHAR ArcPath); +BOOL DissectArcPath(LPSTR ArcPath, LPSTR BootPath, PULONG BootDrive, PULONG BootPartition); +VOID ConstructArcPath(PUCHAR ArcPath, PUCHAR SystemFolder, ULONG Disk, ULONG Partition); +ULONG ConvertArcNameToBiosDriveNumber(PUCHAR ArcPath); #endif // defined __REACTOS_H diff --git a/reactos/boot/freeldr/freeldr/include/rtl.h b/reactos/boot/freeldr/freeldr/include/rtl.h index 8fd5384b5af..bcf796de590 100644 --- a/reactos/boot/freeldr/freeldr/include/rtl.h +++ b/reactos/boot/freeldr/freeldr/include/rtl.h @@ -22,23 +22,6 @@ #include -/////////////////////////////////////////////////////////////////////////////////////// -// -// String Functions -// -/////////////////////////////////////////////////////////////////////////////////////// -int strlen(char *str); -char * strcpy(char *dest, char *src); -char * strncpy(char *dest, char *src, size_t count); -char * strcat(char *dest, char *src); -char * strncat(char *dst, const char *src, size_t n); -char * strchr(const char *s, int c); -char * strrchr(const char *s, int c); -int strcmp(const char *string1, const char *string2); -int stricmp(const char *string1, const char *string2); -int strncmp(const char *string1, const char *string2, size_t length); -int strnicmp(const char *string1, const char *string2, size_t length); - /////////////////////////////////////////////////////////////////////////////////////// // // Memory Functions @@ -52,7 +35,6 @@ void * memset(void *src, int val, size_t count); #define RtlCompareMemory(Source1, Source2, Length) memcmp(Source1, Source2, Length) #define RtlCopyMemory(Destination, Source, Length) memcpy(Destination, Source, Length) #define RtlFillMemory(Destination, Length, Fill) memset(Destination, Fill, Length) -#define RtlMoveMemory(Destination, Source, Length) memmove(Destination, Source, Length) #define RtlZeroMemory(Destination, Length) memset(Destination, 0, Length) /////////////////////////////////////////////////////////////////////////////////////// @@ -117,7 +99,7 @@ PLIST_ITEM RtlListRemoveTail(PLIST_ITEM ListHead); // Removes the entry a PLIST_ITEM RtlListGetHead(PLIST_ITEM ListHead); // Returns the entry at the head of the list PLIST_ITEM RtlListGetTail(PLIST_ITEM ListHead); // Returns the entry at the tail of the list BOOL RtlListIsEmpty(PLIST_ITEM ListHead); // Indicates whether a doubly linked list is empty -U32 RtlListCountEntries(PLIST_ITEM ListHead); // Counts the entries in a doubly linked list +ULONG RtlListCountEntries(PLIST_ITEM ListHead); // Counts the entries in a doubly linked list PLIST_ITEM RtlListGetPrevious(PLIST_ITEM ListEntry); // Returns the previous item in the list PLIST_ITEM RtlListGetNext(PLIST_ITEM ListEntry); // Returns the next item in the list PLIST_ITEM RtlListRemoveEntry(PLIST_ITEM ListEntry); // Removes the entry from the list diff --git a/reactos/boot/freeldr/freeldr/include/ui.h b/reactos/boot/freeldr/freeldr/include/ui.h index 34c7016c878..997b1e6e824 100644 --- a/reactos/boot/freeldr/freeldr/include/ui.h +++ b/reactos/boot/freeldr/freeldr/include/ui.h @@ -21,8 +21,8 @@ #define __UI_H -extern U32 UiScreenWidth; // Screen Width -extern U32 UiScreenHeight; // Screen Height +extern ULONG UiScreenWidth; // Screen Width +extern ULONG UiScreenHeight; // Screen Height extern UCHAR UiStatusBarFgColor; // Status bar foreground color extern UCHAR UiStatusBarBgColor; // Status bar background color @@ -57,26 +57,26 @@ extern UCHAR UiMonthNames[12][15]; BOOL UiInitialize(BOOLEAN ShowGui); // Initialize User-Interface VOID UiUnInitialize(PUCHAR BootText); // Un-initialize User-Interface VOID UiDrawBackdrop(VOID); // Fills the entire screen with a backdrop -VOID UiFillArea(U32 Left, U32 Top, U32 Right, U32 Bottom, UCHAR FillChar, UCHAR Attr /* Color Attributes */); // Fills the area specified with FillChar and Attr -VOID UiDrawShadow(U32 Left, U32 Top, U32 Right, U32 Bottom); // Draws a shadow on the bottom and right sides of the area specified -VOID UiDrawBox(U32 Left, U32 Top, U32 Right, U32 Bottom, UCHAR VertStyle, UCHAR HorzStyle, BOOL Fill, BOOL Shadow, UCHAR Attr); // Draws a box around the area specified -VOID UiDrawText(U32 X, U32 Y, PUCHAR Text, UCHAR Attr); // Draws text at coordinates specified -VOID UiDrawCenteredText(U32 Left, U32 Top, U32 Right, U32 Bottom, PUCHAR TextString, UCHAR Attr); // Draws centered text at the coordinates specified and clips the edges +VOID UiFillArea(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, UCHAR FillChar, UCHAR Attr /* Color Attributes */); // Fills the area specified with FillChar and Attr +VOID UiDrawShadow(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom); // Draws a shadow on the bottom and right sides of the area specified +VOID UiDrawBox(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, UCHAR VertStyle, UCHAR HorzStyle, BOOL Fill, BOOL Shadow, UCHAR Attr); // Draws a box around the area specified +VOID UiDrawText(ULONG X, ULONG Y, PUCHAR Text, UCHAR Attr); // Draws text at coordinates specified +VOID UiDrawCenteredText(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, PUCHAR TextString, UCHAR Attr); // Draws centered text at the coordinates specified and clips the edges VOID UiDrawStatusText(PUCHAR StatusText); // Draws text at the very bottom line on the screen VOID UiUpdateDateTime(VOID); // Updates the date and time VOID UiInfoBox(PUCHAR MessageText); // Displays a info box on the screen VOID UiMessageBox(PUCHAR MessageText); // Displays a message box on the screen with an ok button VOID UiMessageBoxCritical(PUCHAR MessageText); // Displays a message box on the screen with an ok button using no system resources -VOID UiDrawProgressBarCenter(U32 Position, U32 Range, PUCHAR ProgressText); // Draws the progress bar showing nPos percent filled -VOID UiDrawProgressBar(U32 Left, U32 Top, U32 Right, U32 Bottom, U32 Position, U32 Range, PUCHAR ProgressText); // Draws the progress bar showing nPos percent filled +VOID UiDrawProgressBarCenter(ULONG Position, ULONG Range, PUCHAR ProgressText); // Draws the progress bar showing nPos percent filled +VOID UiDrawProgressBar(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, ULONG Position, ULONG Range, PUCHAR ProgressText); // Draws the progress bar showing nPos percent filled VOID UiShowMessageBoxesInSection(PUCHAR SectionName); // Displays all the message boxes in a given section VOID UiEscapeString(PUCHAR String); // Processes a string and changes all occurances of "\n" to '\n' -BOOL UiEditBox(PUCHAR MessageText, PUCHAR EditTextBuffer, U32 Length); +BOOL UiEditBox(PUCHAR MessageText, PUCHAR EditTextBuffer, ULONG Length); UCHAR UiTextToColor(PUCHAR ColorText); // Converts the text color into it's equivalent color value UCHAR UiTextToFillStyle(PUCHAR FillStyleText); // Converts the text fill into it's equivalent fill value -VOID UiTruncateStringEllipsis(PUCHAR StringText, U32 MaxChars); // Truncates a string to MaxChars by adding an ellipsis on the end '...' +VOID UiTruncateStringEllipsis(PUCHAR StringText, ULONG MaxChars); // Truncates a string to MaxChars by adding an ellipsis on the end '...' VOID UiFadeInBackdrop(VOID); // Draws the backdrop and fades the screen in VOID UiFadeOut(VOID); // Fades the screen out @@ -86,9 +86,9 @@ VOID UiFadeOut(VOID); // Fades the screen out // Menu Functions // /////////////////////////////////////////////////////////////////////////////////////// -typedef BOOL (*UiMenuKeyPressFilterCallback)(U32 KeyPress); +typedef BOOL (*UiMenuKeyPressFilterCallback)(ULONG KeyPress); -BOOL UiDisplayMenu(PUCHAR MenuItemList[], U32 MenuItemCount, U32 DefaultMenuItem, S32 MenuTimeOut, U32* SelectedMenuItem, BOOL CanEscape, UiMenuKeyPressFilterCallback KeyPressFilter); +BOOL UiDisplayMenu(PUCHAR MenuItemList[], ULONG MenuItemCount, ULONG DefaultMenuItem, LONG MenuTimeOut, ULONG* SelectedMenuItem, BOOL CanEscape, UiMenuKeyPressFilterCallback KeyPressFilter); diff --git a/reactos/boot/freeldr/freeldr/include/video.h b/reactos/boot/freeldr/freeldr/include/video.h index f269c2530db..ba66d7771c4 100644 --- a/reactos/boot/freeldr/freeldr/include/video.h +++ b/reactos/boot/freeldr/freeldr/include/video.h @@ -22,42 +22,25 @@ typedef struct { - U8 Red; - U8 Green; - U8 Blue; + UCHAR Red; + UCHAR Green; + UCHAR Blue; } PACKED PALETTE_ENTRY, *PPALETTE_ENTRY; extern PVOID VideoOffScreenBuffer; -U16 BiosIsVesaSupported(VOID); // Implemented in i386vid.S, returns the VESA version +USHORT BiosIsVesaSupported(VOID); // Implemented in i386vid.S, returns the VESA version PVOID VideoAllocateOffScreenBuffer(VOID); // Returns a pointer to an off-screen buffer sufficient for the current video mode -#if 0 /* Not used */ -U32 VideoGetMemoryBankForPixel(U32 X, U32 Y); -U32 VideoGetMemoryBankForPixel16(U32 X, U32 Y); -U32 VideoGetBankOffsetForPixel(U32 X, U32 Y); -U32 VideoGetBankOffsetForPixel16(U32 X, U32 Y); -VOID VideoSetMemoryBank(U16 BankNumber); -U32 VideoGetOffScreenMemoryOffsetForPixel(U32 X, U32 Y); -#endif VOID VideoCopyOffScreenBufferToVRAM(VOID); -VOID VideoSavePaletteState(PPALETTE_ENTRY Palette, U32 ColorCount); -VOID VideoRestorePaletteState(PPALETTE_ENTRY Palette, U32 ColorCount); +VOID VideoSavePaletteState(PPALETTE_ENTRY Palette, ULONG ColorCount); +VOID VideoRestorePaletteState(PPALETTE_ENTRY Palette, ULONG ColorCount); -#if 0 /* Not used */ -VOID VideoSetPixel16(U32 X, U32 Y, U8 Color); -VOID VideoSetPixel256(U32 X, U32 Y, U8 Color); -VOID VideoSetPixelRGB(U32 X, U32 Y, U8 Red, U8 Green, U8 Blue); -VOID VideoSetPixel16_OffScreen(U32 X, U32 Y, U8 Color); -VOID VideoSetPixel256_OffScreen(U32 X, U32 Y, U8 Color); -VOID VideoSetPixelRGB_OffScreen(U32 X, U32 Y, U8 Red, U8 Green, U8 Blue); -#endif - -VOID VideoSetAllColorsToBlack(U32 ColorCount); -VOID VideoFadeIn(PPALETTE_ENTRY Palette, U32 ColorCount); -VOID VideoFadeOut(U32 ColorCount); +VOID VideoSetAllColorsToBlack(ULONG ColorCount); +VOID VideoFadeIn(PPALETTE_ENTRY Palette, ULONG ColorCount); +VOID VideoFadeOut(ULONG ColorCount); #endif // defined __VIDEO_H diff --git a/reactos/boot/freeldr/freeldr/inffile/inffile.c b/reactos/boot/freeldr/freeldr/inffile/inffile.c index 0f4cb50642e..255e0c0f6de 100644 --- a/reactos/boot/freeldr/freeldr/inffile/inffile.c +++ b/reactos/boot/freeldr/freeldr/inffile/inffile.c @@ -56,7 +56,7 @@ typedef struct _INFCACHELINE struct _INFCACHELINE *Next; struct _INFCACHELINE *Prev; - S32 FieldCount; + LONG FieldCount; PCHAR Key; @@ -74,7 +74,7 @@ typedef struct _INFCACHESECTION PINFCACHELINE FirstLine; PINFCACHELINE LastLine; - S32 LineCount; + LONG LineCount; CHAR Name[1]; } INFCACHESECTION, *PINFCACHESECTION; @@ -241,7 +241,7 @@ InfpCacheAddSection (PINFCACHE Cache, PCHAR Name) { PINFCACHESECTION Section = NULL; - U32 Size; + ULONG Size; if (Cache == NULL || Name == NULL) { @@ -341,7 +341,7 @@ InfpAddFieldToLine (PINFCACHELINE Line, PCHAR Data) { PINFCACHEFIELD Field; - U32 Size; + ULONG Size; Size = sizeof(INFCACHEFIELD) + strlen(Data); Field = (PINFCACHEFIELD)MmAllocateMemory (Size); @@ -839,7 +839,7 @@ static BOOLEAN InfpParseBuffer (PINFCACHE file, const CHAR *buffer, const CHAR *end, - PU32 error_line) + PULONG error_line) { struct parser parser; const CHAR *pos = buffer; @@ -877,17 +877,17 @@ InfpParseBuffer (PINFCACHE file, BOOLEAN InfOpenFile(PHINF InfHandle, PCHAR FileName, - PU32 ErrorLine) + PULONG ErrorLine) { PFILE FileHandle; PCHAR FileBuffer; - U32 FileSize; + ULONG FileSize; PINFCACHE Cache; BOOLEAN Success; *InfHandle = NULL; - *ErrorLine = (U32)-1; + *ErrorLine = (ULONG)-1; /* Open the inf file */ @@ -1144,7 +1144,7 @@ InfFindNextMatchLine (PINFCONTEXT ContextIn, } -S32 +LONG InfGetLineCount(HINF InfHandle, PCHAR Section) { @@ -1184,7 +1184,7 @@ InfGetLineCount(HINF InfHandle, /* InfGetLineText */ -S32 +LONG InfGetFieldCount(PINFCONTEXT Context) { if (Context == NULL || Context->Line == NULL) @@ -1196,16 +1196,16 @@ InfGetFieldCount(PINFCONTEXT Context) BOOLEAN InfGetBinaryField (PINFCONTEXT Context, - U32 FieldIndex, - PU8 ReturnBuffer, - U32 ReturnBufferSize, - PU32 RequiredSize) + ULONG FieldIndex, + PUCHAR ReturnBuffer, + ULONG ReturnBufferSize, + PULONG RequiredSize) { PINFCACHELINE CacheLine; PINFCACHEFIELD CacheField; - U32 Index; - U32 Size; - PU8 Ptr; + ULONG Index; + ULONG Size; + PUCHAR Ptr; if (Context == NULL || Context->Line == NULL || FieldIndex == 0) { @@ -1252,12 +1252,12 @@ InfGetBinaryField (PINFCONTEXT Context, BOOLEAN InfGetIntField (PINFCONTEXT Context, - U32 FieldIndex, - S32 *IntegerValue) + ULONG FieldIndex, + LONG *IntegerValue) { PINFCACHELINE CacheLine; PINFCACHEFIELD CacheField; - U32 Index; + ULONG Index; PCHAR Ptr; if (Context == NULL || Context->Line == NULL || IntegerValue == NULL) @@ -1295,16 +1295,16 @@ InfGetIntField (PINFCONTEXT Context, BOOLEAN InfGetMultiSzField (PINFCONTEXT Context, - U32 FieldIndex, + ULONG FieldIndex, PCHAR ReturnBuffer, - U32 ReturnBufferSize, - PU32 RequiredSize) + ULONG ReturnBufferSize, + PULONG RequiredSize) { PINFCACHELINE CacheLine; PINFCACHEFIELD CacheField; PINFCACHEFIELD FieldPtr; - U32 Index; - U32 Size; + ULONG Index; + ULONG Size; PCHAR Ptr; if (Context == NULL || Context->Line == NULL || FieldIndex == 0) @@ -1364,16 +1364,16 @@ InfGetMultiSzField (PINFCONTEXT Context, BOOLEAN InfGetStringField (PINFCONTEXT Context, - U32 FieldIndex, + ULONG FieldIndex, PCHAR ReturnBuffer, - U32 ReturnBufferSize, - PU32 RequiredSize) + ULONG ReturnBufferSize, + PULONG RequiredSize) { PINFCACHELINE CacheLine; PINFCACHEFIELD CacheField; - U32 Index; + ULONG Index; PCHAR Ptr; - U32 Size; + ULONG Size; if (Context == NULL || Context->Line == NULL || FieldIndex == 0) { @@ -1456,12 +1456,12 @@ InfGetData (PINFCONTEXT Context, BOOLEAN InfGetDataField (PINFCONTEXT Context, - U32 FieldIndex, + ULONG FieldIndex, PCHAR *Data) { PINFCACHELINE CacheLine; PINFCACHEFIELD CacheField; - U32 Index; + ULONG Index; if (Context == NULL || Context->Line == NULL || Data == NULL) { diff --git a/reactos/boot/freeldr/freeldr/inifile/ini.h b/reactos/boot/freeldr/freeldr/inifile/ini.h index b24c1f0cab2..98a74967d33 100644 --- a/reactos/boot/freeldr/freeldr/inifile/ini.h +++ b/reactos/boot/freeldr/freeldr/inifile/ini.h @@ -48,29 +48,29 @@ typedef struct { LIST_ITEM ListEntry; PUCHAR SectionName; - U32 SectionItemCount; + ULONG SectionItemCount; PINI_SECTION_ITEM SectionItemList; } INI_SECTION, *PINI_SECTION; extern PINI_SECTION IniFileSectionListHead; -extern U32 IniFileSectionCount; -extern U32 IniFileSettingCount; +extern ULONG IniFileSectionCount; +extern ULONG IniFileSettingCount; -PFILE IniOpenIniFile(U8 BootDriveNumber, U8 BootPartitionNumber); +PFILE IniOpenIniFile(UCHAR BootDriveNumber, UCHAR BootPartitionNumber); -BOOL IniParseFile(PUCHAR IniFileData, U32 IniFileSize); -U32 IniGetNextLineSize(PUCHAR IniFileData, U32 IniFileSize, U32 CurrentOffset); -U32 IniGetNextLine(PUCHAR IniFileData, U32 IniFileSize, PUCHAR Buffer, U32 BufferSize, U32 CurrentOffset); -BOOL IniIsLineEmpty(PUCHAR LineOfText, U32 TextLength); -BOOL IniIsCommentLine(PUCHAR LineOfText, U32 TextLength); -BOOL IniIsSectionName(PUCHAR LineOfText, U32 TextLength); -U32 IniGetSectionNameSize(PUCHAR SectionNameLine, U32 LineLength); -VOID IniExtractSectionName(PUCHAR SectionName, PUCHAR SectionNameLine, U32 LineLength); -BOOL IniIsSetting(PUCHAR LineOfText, U32 TextLength); -U32 IniGetSettingNameSize(PUCHAR SettingNameLine, U32 LineLength); -U32 IniGetSettingValueSize(PUCHAR SettingValueLine, U32 LineLength); -VOID IniExtractSettingName(PUCHAR SettingName, PUCHAR SettingNameLine, U32 LineLength); -VOID IniExtractSettingValue(PUCHAR SettingValue, PUCHAR SettingValueLine, U32 LineLength); +BOOL IniParseFile(PUCHAR IniFileData, ULONG IniFileSize); +ULONG IniGetNextLineSize(PUCHAR IniFileData, ULONG IniFileSize, ULONG CurrentOffset); +ULONG IniGetNextLine(PUCHAR IniFileData, ULONG IniFileSize, PUCHAR Buffer, ULONG BufferSize, ULONG CurrentOffset); +BOOL IniIsLineEmpty(PUCHAR LineOfText, ULONG TextLength); +BOOL IniIsCommentLine(PUCHAR LineOfText, ULONG TextLength); +BOOL IniIsSectionName(PUCHAR LineOfText, ULONG TextLength); +ULONG IniGetSectionNameSize(PUCHAR SectionNameLine, ULONG LineLength); +VOID IniExtractSectionName(PUCHAR SectionName, PUCHAR SectionNameLine, ULONG LineLength); +BOOL IniIsSetting(PUCHAR LineOfText, ULONG TextLength); +ULONG IniGetSettingNameSize(PUCHAR SettingNameLine, ULONG LineLength); +ULONG IniGetSettingValueSize(PUCHAR SettingValueLine, ULONG LineLength); +VOID IniExtractSettingName(PUCHAR SettingName, PUCHAR SettingNameLine, ULONG LineLength); +VOID IniExtractSettingValue(PUCHAR SettingValue, PUCHAR SettingValueLine, ULONG LineLength); #endif // defined __INI_H diff --git a/reactos/boot/freeldr/freeldr/inifile/ini_init.c b/reactos/boot/freeldr/freeldr/inifile/ini_init.c index d47cdc11ad6..046133e4c1b 100644 --- a/reactos/boot/freeldr/freeldr/inifile/ini_init.c +++ b/reactos/boot/freeldr/freeldr/inifile/ini_init.c @@ -29,7 +29,7 @@ BOOL IniFileInitialize(VOID) { PFILE Freeldr_Ini; // File handle for freeldr.ini PUCHAR FreeLoaderIniFileData; - U32 FreeLoaderIniFileSize; + ULONG FreeLoaderIniFileSize; BOOL Success; // Open freeldr.ini @@ -87,7 +87,7 @@ BOOL IniFileInitialize(VOID) return Success; } -PFILE IniOpenIniFile(U8 BootDriveNumber, U8 BootPartitionNumber) +PFILE IniOpenIniFile(UCHAR BootDriveNumber, UCHAR BootPartitionNumber) { PFILE IniFileHandle; // File handle for freeldr.ini diff --git a/reactos/boot/freeldr/freeldr/inifile/inifile.c b/reactos/boot/freeldr/freeldr/inifile/inifile.c index 4456df98834..9f8c19b8e5b 100644 --- a/reactos/boot/freeldr/freeldr/inifile/inifile.c +++ b/reactos/boot/freeldr/freeldr/inifile/inifile.c @@ -24,7 +24,7 @@ #include #include -BOOL IniOpenSection(PUCHAR SectionName, U32* SectionId) +BOOL IniOpenSection(PUCHAR SectionName, ULONG* SectionId) { PINI_SECTION Section; @@ -41,7 +41,7 @@ BOOL IniOpenSection(PUCHAR SectionName, U32* SectionId) if (stricmp(SectionName, Section->SectionName) == 0) { // We found it - *SectionId = (U32)Section; + *SectionId = (ULONG)Section; DbgPrint((DPRINT_INIFILE, "IniOpenSection() Found it! SectionId = 0x%x\n", SectionId)); return TRUE; } @@ -55,7 +55,7 @@ BOOL IniOpenSection(PUCHAR SectionName, U32* SectionId) return FALSE; } -U32 IniGetNumSectionItems(U32 SectionId) +ULONG IniGetNumSectionItems(ULONG SectionId) { PINI_SECTION Section = (PINI_SECTION)SectionId; @@ -65,7 +65,7 @@ U32 IniGetNumSectionItems(U32 SectionId) return Section->SectionItemCount; } -U32 IniGetSectionSettingNameSize(U32 SectionId, U32 SettingIndex) +ULONG IniGetSectionSettingNameSize(ULONG SectionId, ULONG SettingIndex) { PINI_SECTION Section = (PINI_SECTION)SectionId; @@ -73,7 +73,7 @@ U32 IniGetSectionSettingNameSize(U32 SectionId, U32 SettingIndex) return (strlen(Section->SectionItemList[SettingIndex].ItemName) + 1); } -U32 IniGetSectionSettingValueSize(U32 SectionId, U32 SettingIndex) +ULONG IniGetSectionSettingValueSize(ULONG SectionId, ULONG SettingIndex) { PINI_SECTION Section = (PINI_SECTION)SectionId; @@ -81,12 +81,12 @@ U32 IniGetSectionSettingValueSize(U32 SectionId, U32 SettingIndex) return (strlen(Section->SectionItemList[SettingIndex].ItemValue) + 1); } -BOOL IniReadSettingByNumber(U32 SectionId, U32 SettingNumber, PUCHAR SettingName, U32 NameSize, PUCHAR SettingValue, U32 ValueSize) +BOOL IniReadSettingByNumber(ULONG SectionId, ULONG SettingNumber, PUCHAR SettingName, ULONG NameSize, PUCHAR SettingValue, ULONG ValueSize) { PINI_SECTION Section = (PINI_SECTION)SectionId; PINI_SECTION_ITEM SectionItem; #ifdef DEBUG - U32 RealSettingNumber = SettingNumber; + ULONG RealSettingNumber = SettingNumber; #endif DbgPrint((DPRINT_INIFILE, ".001 NameSize = %d ValueSize = %d\n", NameSize, ValueSize)); @@ -131,7 +131,7 @@ BOOL IniReadSettingByNumber(U32 SectionId, U32 SettingNumber, PUCHAR SettingName return FALSE; } -BOOL IniReadSettingByName(U32 SectionId, PUCHAR SettingName, PUCHAR Buffer, U32 BufferSize) +BOOL IniReadSettingByName(ULONG SectionId, PUCHAR SettingName, PUCHAR Buffer, ULONG BufferSize) { PINI_SECTION Section = (PINI_SECTION)SectionId; PINI_SECTION_ITEM SectionItem; @@ -163,7 +163,7 @@ BOOL IniReadSettingByName(U32 SectionId, PUCHAR SettingName, PUCHAR Buffer, U32 return FALSE; } -BOOL IniAddSection(PUCHAR SectionName, U32* SectionId) +BOOL IniAddSection(PUCHAR SectionName, ULONG* SectionId) { PINI_SECTION Section; @@ -198,12 +198,12 @@ BOOL IniAddSection(PUCHAR SectionName, U32* SectionId) RtlListInsertTail((PLIST_ITEM)IniFileSectionListHead, (PLIST_ITEM)Section); } - *SectionId = (U32)Section; + *SectionId = (ULONG)Section; return TRUE; } -BOOL IniAddSettingValueToSection(U32 SectionId, PUCHAR SettingName, PUCHAR SettingValue) +BOOL IniAddSettingValueToSection(ULONG SectionId, PUCHAR SettingName, PUCHAR SettingValue) { PINI_SECTION Section = (PINI_SECTION)SectionId; PINI_SECTION_ITEM SectionItem; diff --git a/reactos/boot/freeldr/freeldr/inifile/parse.c b/reactos/boot/freeldr/freeldr/inifile/parse.c index f490b1d733c..87f6bbd1035 100644 --- a/reactos/boot/freeldr/freeldr/inifile/parse.c +++ b/reactos/boot/freeldr/freeldr/inifile/parse.c @@ -26,17 +26,17 @@ PINI_SECTION IniFileSectionListHead = NULL; -U32 IniFileSectionCount = 0; -U32 IniFileSettingCount = 0; +ULONG IniFileSectionCount = 0; +ULONG IniFileSettingCount = 0; -BOOL IniParseFile(PUCHAR IniFileData, U32 IniFileSize) +BOOL IniParseFile(PUCHAR IniFileData, ULONG IniFileSize) { - U32 CurrentOffset; - U32 CurrentLineNumber; + ULONG CurrentOffset; + ULONG CurrentLineNumber; PUCHAR IniFileLine; - U32 IniFileLineSize; - U32 LineLength; + ULONG IniFileLineSize; + ULONG LineLength; PINI_SECTION CurrentSection = NULL; PINI_SECTION_ITEM CurrentItem = NULL; @@ -189,10 +189,10 @@ BOOL IniParseFile(PUCHAR IniFileData, U32 IniFileSize) return TRUE; } -U32 IniGetNextLineSize(PUCHAR IniFileData, U32 IniFileSize, U32 CurrentOffset) +ULONG IniGetNextLineSize(PUCHAR IniFileData, ULONG IniFileSize, ULONG CurrentOffset) { - U32 Idx; - U32 LineCharCount = 0; + ULONG Idx; + ULONG LineCharCount = 0; // Loop through counting chars until we hit the end of the // file or we encounter a new line char @@ -216,9 +216,9 @@ U32 IniGetNextLineSize(PUCHAR IniFileData, U32 IniFileSize, U32 CurrentOffset) return LineCharCount; } -U32 IniGetNextLine(PUCHAR IniFileData, U32 IniFileSize, PUCHAR Buffer, U32 BufferSize, U32 CurrentOffset) +ULONG IniGetNextLine(PUCHAR IniFileData, ULONG IniFileSize, PUCHAR Buffer, ULONG BufferSize, ULONG CurrentOffset) { - U32 Idx; + ULONG Idx; // Loop through grabbing chars until we hit the end of the // file or we encounter a new line char @@ -252,9 +252,9 @@ U32 IniGetNextLine(PUCHAR IniFileData, U32 IniFileSize, PUCHAR Buffer, U32 Buffe return CurrentOffset; } -BOOL IniIsLineEmpty(PUCHAR LineOfText, U32 TextLength) +BOOL IniIsLineEmpty(PUCHAR LineOfText, ULONG TextLength) { - U32 Idx; + ULONG Idx; // Check for text (skipping whitespace) for (Idx=0; IdxRamdiskAddress = (U32)LinuxInitrdLoadAddress; + LinuxSetupSector->RamdiskAddress = (ULONG)LinuxInitrdLoadAddress; LinuxSetupSector->RamdiskSize = LinuxInitrdSize; DbgPrint((DPRINT_LINUX, "RamdiskAddress: 0x%x\n", LinuxSetupSector->RamdiskAddress)); diff --git a/reactos/boot/freeldr/freeldr/machine.c b/reactos/boot/freeldr/freeldr/machine.c index 993a9a43591..520769e3b06 100644 --- a/reactos/boot/freeldr/freeldr/machine.c +++ b/reactos/boot/freeldr/freeldr/machine.c @@ -65,7 +65,7 @@ MachConsGetCh() } VOID -MachVideoClearScreen(U8 Attr) +MachVideoClearScreen(UCHAR Attr) { MachVtbl.VideoClearScreen(Attr); } @@ -77,19 +77,19 @@ MachVideoSetDisplayMode(char *DisplayMode, BOOL Init) } VOID -MachVideoGetDisplaySize(PU32 Width, PU32 Height, PU32 Depth) +MachVideoGetDisplaySize(PULONG Width, PULONG Height, PULONG Depth) { return MachVtbl.VideoGetDisplaySize(Width, Height, Depth); } -U32 +ULONG MachVideoGetBufferSize(VOID) { return MachVtbl.VideoGetBufferSize(); } VOID -MachVideoSetTextCursorPosition(U32 X, U32 Y) +MachVideoSetTextCursorPosition(ULONG X, ULONG Y) { return MachVtbl.VideoSetTextCursorPosition(X, Y); } @@ -101,7 +101,7 @@ MachVideoHideShowTextCursor(BOOL Show) } VOID -MachVideoPutChar(int Ch, U8 Attr, unsigned X, unsigned Y) +MachVideoPutChar(int Ch, UCHAR Attr, unsigned X, unsigned Y) { MachVtbl.VideoPutChar(Ch, Attr, X, Y); } @@ -119,13 +119,13 @@ MachVideoIsPaletteFixed(VOID) } VOID -MachVideoSetPaletteColor(U8 Color, U8 Red, U8 Green, U8 Blue) +MachVideoSetPaletteColor(UCHAR Color, UCHAR Red, UCHAR Green, UCHAR Blue) { return MachVtbl.VideoSetPaletteColor(Color, Red, Green, Blue); } VOID -MachVideoGetPaletteColor(U8 Color, U8 *Red, U8 *Green, U8 *Blue) +MachVideoGetPaletteColor(UCHAR Color, UCHAR *Red, UCHAR *Green, UCHAR *Blue) { return MachVtbl.VideoGetPaletteColor(Color, Red, Green, Blue); } @@ -142,38 +142,38 @@ MachVideoPrepareForReactOS(VOID) MachVtbl.VideoPrepareForReactOS(); } -U32 -MachGetMemoryMap(PBIOS_MEMORY_MAP BiosMemoryMap, U32 MaxMemoryMapSize) +ULONG +MachGetMemoryMap(PBIOS_MEMORY_MAP BiosMemoryMap, ULONG MaxMemoryMapSize) { return MachVtbl.GetMemoryMap(BiosMemoryMap, MaxMemoryMapSize); } BOOL -MachDiskReadLogicalSectors(U32 DriveNumber, U64 SectorNumber, U32 SectorCount, PVOID Buffer) +MachDiskReadLogicalSectors(ULONG DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer) { return MachVtbl.DiskReadLogicalSectors(DriveNumber, SectorNumber, SectorCount, Buffer); } BOOL -MachDiskGetPartitionEntry(U32 DriveNumber, U32 PartitionNumber, PPARTITION_TABLE_ENTRY PartitionTableEntry) +MachDiskGetPartitionEntry(ULONG DriveNumber, ULONG PartitionNumber, PPARTITION_TABLE_ENTRY PartitionTableEntry) { return MachVtbl.DiskGetPartitionEntry(DriveNumber, PartitionNumber, PartitionTableEntry); } BOOL -MachDiskGetDriveGeometry(U32 DriveNumber, PGEOMETRY DriveGeometry) +MachDiskGetDriveGeometry(ULONG DriveNumber, PGEOMETRY DriveGeometry) { return MachVtbl.DiskGetDriveGeometry(DriveNumber, DriveGeometry); } -U32 -MachDiskGetCacheableBlockCount(U32 DriveNumber) +ULONG +MachDiskGetCacheableBlockCount(ULONG DriveNumber) { return MachVtbl.DiskGetCacheableBlockCount(DriveNumber); } VOID -MachRTCGetCurrentDateTime(PU32 Year, PU32 Month, PU32 Day, PU32 Hour, PU32 Minute, PU32 Second) +MachRTCGetCurrentDateTime(PULONG Year, PULONG Month, PULONG Day, PULONG Hour, PULONG Minute, PULONG Second) { MachVtbl.RTCGetCurrentDateTime(Year, Month, Day, Hour, Minute, Second); } diff --git a/reactos/boot/freeldr/freeldr/miscboot.c b/reactos/boot/freeldr/freeldr/miscboot.c index 5b4828cfbc8..3531fe254f0 100644 --- a/reactos/boot/freeldr/freeldr/miscboot.c +++ b/reactos/boot/freeldr/freeldr/miscboot.c @@ -34,9 +34,9 @@ VOID LoadAndBootBootSector(PUCHAR OperatingSystemName) PFILE FilePointer; UCHAR SettingName[80]; UCHAR SettingValue[80]; - U32 SectionId; + ULONG SectionId; UCHAR FileName[260]; - U32 BytesRead; + ULONG BytesRead; // Find all the message box settings and run them UiShowMessageBoxesInSection(OperatingSystemName); @@ -90,7 +90,7 @@ VOID LoadAndBootBootSector(PUCHAR OperatingSystemName) } // Check for validity - if (*((U16*)(0x7c00 + 0x1fe)) != 0xaa55) + if (*((USHORT*)(0x7c00 + 0x1fe)) != 0xaa55) { UiMessageBox("Invalid boot sector magic (0xaa55)"); return; @@ -113,7 +113,7 @@ VOID LoadAndBootPartition(PUCHAR OperatingSystemName) { UCHAR SettingName[80]; UCHAR SettingValue[80]; - U32 SectionId; + ULONG SectionId; PARTITION_TABLE_ENTRY PartitionTableEntry; // Find all the message box settings and run them @@ -159,7 +159,7 @@ VOID LoadAndBootPartition(PUCHAR OperatingSystemName) } // Check for validity - if (*((U16*)(0x7c00 + 0x1fe)) != 0xaa55) + if (*((USHORT*)(0x7c00 + 0x1fe)) != 0xaa55) { UiMessageBox("Invalid boot sector magic (0xaa55)"); return; @@ -182,7 +182,7 @@ VOID LoadAndBootDrive(PUCHAR OperatingSystemName) { UCHAR SettingName[80]; UCHAR SettingValue[80]; - U32 SectionId; + ULONG SectionId; // Find all the message box settings and run them UiShowMessageBoxesInSection(OperatingSystemName); @@ -211,7 +211,7 @@ VOID LoadAndBootDrive(PUCHAR OperatingSystemName) } // Check for validity - if (*((U16*)(0x7c00 + 0x1fe)) != 0xaa55) + if (*((USHORT*)(0x7c00 + 0x1fe)) != 0xaa55) { UiMessageBox("Invalid boot sector magic (0xaa55)"); return; diff --git a/reactos/boot/freeldr/freeldr/mm/mem.h b/reactos/boot/freeldr/freeldr/mm/mem.h index 7d24552d6f0..168f3f4027e 100644 --- a/reactos/boot/freeldr/freeldr/mm/mem.h +++ b/reactos/boot/freeldr/freeldr/mm/mem.h @@ -30,8 +30,8 @@ typedef struct { - U32 PageAllocated; // Zero = free, non-zero = allocated - U32 PageAllocationLength; // Number of pages allocated (or zero if this isn't the first page in the chain) + ULONG PageAllocated; // Zero = free, non-zero = allocated + ULONG PageAllocationLength; // Number of pages allocated (or zero if this isn't the first page in the chain) } PACKED PAGE_LOOKUP_TABLE_ITEM, *PPAGE_LOOKUP_TABLE_ITEM; // @@ -44,27 +44,27 @@ typedef struct extern PVOID PageLookupTableAddress; -extern U32 TotalPagesInLookupTable; -extern U32 FreePagesInLookupTable; -extern U32 LastFreePageHint; +extern ULONG TotalPagesInLookupTable; +extern ULONG FreePagesInLookupTable; +extern ULONG LastFreePageHint; #ifdef DEBUG -PUCHAR MmGetSystemMemoryMapTypeString(U32 Type); +PUCHAR MmGetSystemMemoryMapTypeString(ULONG Type); #endif -U32 MmGetPageNumberFromAddress(PVOID Address); // Returns the page number that contains a linear address -PVOID MmGetEndAddressOfAnyMemory(PBIOS_MEMORY_MAP BiosMemoryMap, U32 MapCount); // Returns the last address of memory from the memory map -U32 MmGetAddressablePageCountIncludingHoles(PBIOS_MEMORY_MAP BiosMemoryMap, U32 MapCount); // Returns the count of addressable pages from address zero including any memory holes and reserved memory regions -PVOID MmFindLocationForPageLookupTable(PBIOS_MEMORY_MAP BiosMemoryMap, U32 MapCount); // Returns the address for a memory chunk big enough to hold the page lookup table (starts search from end of memory) -VOID MmSortBiosMemoryMap(PBIOS_MEMORY_MAP BiosMemoryMap, U32 MapCount); // Sorts the BIOS_MEMORY_MAP array so the first element corresponds to the first address in memory -VOID MmInitPageLookupTable(PVOID PageLookupTable, U32 TotalPageCount, PBIOS_MEMORY_MAP BiosMemoryMap, U32 MapCount); // Inits the page lookup table according to the memory types in the memory map -VOID MmMarkPagesInLookupTable(PVOID PageLookupTable, U32 StartPage, U32 PageCount, U32 PageAllocated); // Marks the specified pages as allocated or free in the lookup table -VOID MmAllocatePagesInLookupTable(PVOID PageLookupTable, U32 StartPage, U32 PageCount); // Allocates the specified pages in the lookup table -U32 MmCountFreePagesInLookupTable(PVOID PageLookupTable, U32 TotalPageCount); // Returns the number of free pages in the lookup table -U32 MmFindAvailablePagesFromEnd(PVOID PageLookupTable, U32 TotalPageCount, U32 PagesNeeded); // Returns the page number of the first available page range from the end of memory -U32 MmFindAvailablePagesBeforePage(PVOID PageLookupTable, U32 TotalPageCount, U32 PagesNeeded, U32 LastPage); // Returns the page number of the first available page range before the specified page -VOID MmFixupSystemMemoryMap(PBIOS_MEMORY_MAP BiosMemoryMap, U32* MapCount); // Removes entries in the memory map that describe memory above 4G -VOID MmUpdateLastFreePageHint(PVOID PageLookupTable, U32 TotalPageCount); // Sets the LastFreePageHint to the last usable page of memory -BOOL MmAreMemoryPagesAvailable(PVOID PageLookupTable, U32 TotalPageCount, PVOID PageAddress, U32 PageCount); // Returns TRUE if the specified pages of memory are available, otherwise FALSE +ULONG MmGetPageNumberFromAddress(PVOID Address); // Returns the page number that contains a linear address +PVOID MmGetEndAddressOfAnyMemory(PBIOS_MEMORY_MAP BiosMemoryMap, ULONG MapCount); // Returns the last address of memory from the memory map +ULONG MmGetAddressablePageCountIncludingHoles(PBIOS_MEMORY_MAP BiosMemoryMap, ULONG MapCount); // Returns the count of addressable pages from address zero including any memory holes and reserved memory regions +PVOID MmFindLocationForPageLookupTable(PBIOS_MEMORY_MAP BiosMemoryMap, ULONG MapCount); // Returns the address for a memory chunk big enough to hold the page lookup table (starts search from end of memory) +VOID MmSortBiosMemoryMap(PBIOS_MEMORY_MAP BiosMemoryMap, ULONG MapCount); // Sorts the BIOS_MEMORY_MAP array so the first element corresponds to the first address in memory +VOID MmInitPageLookupTable(PVOID PageLookupTable, ULONG TotalPageCount, PBIOS_MEMORY_MAP BiosMemoryMap, ULONG MapCount); // Inits the page lookup table according to the memory types in the memory map +VOID MmMarkPagesInLookupTable(PVOID PageLookupTable, ULONG StartPage, ULONG PageCount, ULONG PageAllocated); // Marks the specified pages as allocated or free in the lookup table +VOID MmAllocatePagesInLookupTable(PVOID PageLookupTable, ULONG StartPage, ULONG PageCount); // Allocates the specified pages in the lookup table +ULONG MmCountFreePagesInLookupTable(PVOID PageLookupTable, ULONG TotalPageCount); // Returns the number of free pages in the lookup table +ULONG MmFindAvailablePagesFromEnd(PVOID PageLookupTable, ULONG TotalPageCount, ULONG PagesNeeded); // Returns the page number of the first available page range from the end of memory +ULONG MmFindAvailablePagesBeforePage(PVOID PageLookupTable, ULONG TotalPageCount, ULONG PagesNeeded, ULONG LastPage); // Returns the page number of the first available page range before the specified page +VOID MmFixupSystemMemoryMap(PBIOS_MEMORY_MAP BiosMemoryMap, ULONG* MapCount); // Removes entries in the memory map that describe memory above 4G +VOID MmUpdateLastFreePageHint(PVOID PageLookupTable, ULONG TotalPageCount); // Sets the LastFreePageHint to the last usable page of memory +BOOL MmAreMemoryPagesAvailable(PVOID PageLookupTable, ULONG TotalPageCount, PVOID PageAddress, ULONG PageCount); // Returns TRUE if the specified pages of memory are available, otherwise FALSE #endif // defined __MEM_H diff --git a/reactos/boot/freeldr/freeldr/mm/meminit.c b/reactos/boot/freeldr/freeldr/mm/meminit.c index 408e4ff6490..1d93653f4ca 100644 --- a/reactos/boot/freeldr/freeldr/mm/meminit.c +++ b/reactos/boot/freeldr/freeldr/mm/meminit.c @@ -30,11 +30,11 @@ #ifdef DEBUG typedef struct { - U32 Type; + ULONG Type; UCHAR TypeString[20]; } MEMORY_TYPE, *PMEMORY_TYPE; -U32 MemoryTypeCount = 5; +ULONG MemoryTypeCount = 5; MEMORY_TYPE MemoryTypeArray[] = { { 0, "Unknown Memory" }, @@ -46,16 +46,16 @@ MEMORY_TYPE MemoryTypeArray[] = #endif PVOID PageLookupTableAddress = NULL; -U32 TotalPagesInLookupTable = 0; -U32 FreePagesInLookupTable = 0; -U32 LastFreePageHint = 0; +ULONG TotalPagesInLookupTable = 0; +ULONG FreePagesInLookupTable = 0; +ULONG LastFreePageHint = 0; BOOL MmInitializeMemoryManager(VOID) { BIOS_MEMORY_MAP BiosMemoryMap[32]; - U32 BiosMemoryMapEntryCount; + ULONG BiosMemoryMapEntryCount; #ifdef DEBUG - U32 Index; + ULONG Index; #endif DbgPrint((DPRINT_MEMORY, "Initializing Memory Manager.\n")); @@ -105,9 +105,9 @@ BOOL MmInitializeMemoryManager(VOID) } #ifdef DEBUG -PUCHAR MmGetSystemMemoryMapTypeString(U32 Type) +PUCHAR MmGetSystemMemoryMapTypeString(ULONG Type) { - U32 Index; + ULONG Index; for (Index=1; Index= PageLookupTableSize) { - PageLookupTableMemAddress = (PVOID)(U32)(TempBiosMemoryMap[Index].BaseAddress + (TempBiosMemoryMap[Index].Length - PageLookupTableSize)); + PageLookupTableMemAddress = (PVOID)(ULONG)(TempBiosMemoryMap[Index].BaseAddress + (TempBiosMemoryMap[Index].Length - PageLookupTableSize)); break; } } @@ -209,10 +209,10 @@ PVOID MmFindLocationForPageLookupTable(PBIOS_MEMORY_MAP BiosMemoryMap, U32 MapCo return PageLookupTableMemAddress; } -VOID MmSortBiosMemoryMap(PBIOS_MEMORY_MAP BiosMemoryMap, U32 MapCount) +VOID MmSortBiosMemoryMap(PBIOS_MEMORY_MAP BiosMemoryMap, ULONG MapCount) { - U32 Index; - U32 LoopCount; + ULONG Index; + ULONG LoopCount; BIOS_MEMORY_MAP TempMapItem; // Loop once for each entry in the memory map minus one @@ -231,15 +231,15 @@ VOID MmSortBiosMemoryMap(PBIOS_MEMORY_MAP BiosMemoryMap, U32 MapCount) } } -VOID MmInitPageLookupTable(PVOID PageLookupTable, U32 TotalPageCount, PBIOS_MEMORY_MAP BiosMemoryMap, U32 MapCount) +VOID MmInitPageLookupTable(PVOID PageLookupTable, ULONG TotalPageCount, PBIOS_MEMORY_MAP BiosMemoryMap, ULONG MapCount) { - U32 MemoryMapStartPage; - U32 MemoryMapEndPage; - U32 MemoryMapPageCount; - U32 MemoryMapPageAllocated; - U32 PageLookupTableStartPage; - U32 PageLookupTablePageCount; - U32 Index; + ULONG MemoryMapStartPage; + ULONG MemoryMapEndPage; + ULONG MemoryMapPageCount; + ULONG MemoryMapPageAllocated; + ULONG PageLookupTableStartPage; + ULONG PageLookupTablePageCount; + ULONG Index; DbgPrint((DPRINT_MEMORY, "MmInitPageLookupTable()\n")); @@ -250,8 +250,8 @@ VOID MmInitPageLookupTable(PVOID PageLookupTable, U32 TotalPageCount, PBIOS_MEMO for (Index=0; Index TotalPageCount) { @@ -349,11 +349,11 @@ U32 MmFindAvailablePagesFromEnd(PVOID PageLookupTable, U32 TotalPageCount, U32 P return 0; } -U32 MmFindAvailablePagesBeforePage(PVOID PageLookupTable, U32 TotalPageCount, U32 PagesNeeded, U32 LastPage) +ULONG MmFindAvailablePagesBeforePage(PVOID PageLookupTable, ULONG TotalPageCount, ULONG PagesNeeded, ULONG LastPage) { PPAGE_LOOKUP_TABLE_ITEM RealPageLookupTable = (PPAGE_LOOKUP_TABLE_ITEM)PageLookupTable; - U32 AvailablePagesSoFar; - U32 Index; + ULONG AvailablePagesSoFar; + ULONG Index; if (LastPage > TotalPageCount) { @@ -382,7 +382,7 @@ U32 MmFindAvailablePagesBeforePage(PVOID PageLookupTable, U32 TotalPageCount, U3 return 0; } -VOID MmFixupSystemMemoryMap(PBIOS_MEMORY_MAP BiosMemoryMap, U32* MapCount) +VOID MmFixupSystemMemoryMap(PBIOS_MEMORY_MAP BiosMemoryMap, ULONG* MapCount) { int Index; int Index2; @@ -406,10 +406,10 @@ VOID MmFixupSystemMemoryMap(PBIOS_MEMORY_MAP BiosMemoryMap, U32* MapCount) } } -VOID MmUpdateLastFreePageHint(PVOID PageLookupTable, U32 TotalPageCount) +VOID MmUpdateLastFreePageHint(PVOID PageLookupTable, ULONG TotalPageCount) { PPAGE_LOOKUP_TABLE_ITEM RealPageLookupTable = (PPAGE_LOOKUP_TABLE_ITEM)PageLookupTable; - U32 Index; + ULONG Index; for (Index=TotalPageCount-1; Index>0; Index--) { @@ -421,11 +421,11 @@ VOID MmUpdateLastFreePageHint(PVOID PageLookupTable, U32 TotalPageCount) } } -BOOL MmAreMemoryPagesAvailable(PVOID PageLookupTable, U32 TotalPageCount, PVOID PageAddress, U32 PageCount) +BOOL MmAreMemoryPagesAvailable(PVOID PageLookupTable, ULONG TotalPageCount, PVOID PageAddress, ULONG PageCount) { PPAGE_LOOKUP_TABLE_ITEM RealPageLookupTable = (PPAGE_LOOKUP_TABLE_ITEM)PageLookupTable; - U32 StartPage; - U32 Index; + ULONG StartPage; + ULONG Index; StartPage = MmGetPageNumberFromAddress(PageAddress); diff --git a/reactos/boot/freeldr/freeldr/mm/mm.c b/reactos/boot/freeldr/freeldr/mm/mm.c index 1eb5bfdd971..402069a634e 100644 --- a/reactos/boot/freeldr/freeldr/mm/mm.c +++ b/reactos/boot/freeldr/freeldr/mm/mm.c @@ -27,7 +27,7 @@ #ifdef DEBUG -U32 AllocationCount = 0; +ULONG AllocationCount = 0; VOID VerifyHeap(VOID); VOID DumpMemoryAllocMap(VOID); @@ -36,10 +36,10 @@ VOID DecrementAllocationCount(VOID); VOID MemAllocTest(VOID); #endif // DEBUG -PVOID MmAllocateMemory(U32 MemorySize) +PVOID MmAllocateMemory(ULONG MemorySize) { - U32 PagesNeeded; - U32 FirstFreePageFromEnd; + ULONG PagesNeeded; + ULONG FirstFreePageFromEnd; PVOID MemPointer; if (MemorySize == 0) @@ -87,10 +87,10 @@ PVOID MmAllocateMemory(U32 MemorySize) return MemPointer; } -PVOID MmAllocateMemoryAtAddress(U32 MemorySize, PVOID DesiredAddress) +PVOID MmAllocateMemoryAtAddress(ULONG MemorySize, PVOID DesiredAddress) { - U32 PagesNeeded; - U32 StartPageNumber; + ULONG PagesNeeded; + ULONG StartPageNumber; PVOID MemPointer; if (MemorySize == 0) @@ -139,11 +139,11 @@ PVOID MmAllocateMemoryAtAddress(U32 MemorySize, PVOID DesiredAddress) return MemPointer; } -PVOID MmAllocateHighestMemoryBelowAddress(U32 MemorySize, PVOID DesiredAddress) +PVOID MmAllocateHighestMemoryBelowAddress(ULONG MemorySize, PVOID DesiredAddress) { - U32 PagesNeeded; - U32 FirstFreePageFromEnd; - U32 DesiredAddressPageNumber; + ULONG PagesNeeded; + ULONG FirstFreePageFromEnd; + ULONG DesiredAddressPageNumber; PVOID MemPointer; if (MemorySize == 0) @@ -158,7 +158,7 @@ PVOID MmAllocateHighestMemoryBelowAddress(U32 MemorySize, PVOID DesiredAddress) PagesNeeded = ROUND_UP(MemorySize, MM_PAGE_SIZE) / MM_PAGE_SIZE; // Get the page number for their desired address - DesiredAddressPageNumber = (U32)DesiredAddress / MM_PAGE_SIZE; + DesiredAddressPageNumber = (ULONG)DesiredAddress / MM_PAGE_SIZE; // If we don't have enough available mem // then return NULL @@ -196,9 +196,9 @@ PVOID MmAllocateHighestMemoryBelowAddress(U32 MemorySize, PVOID DesiredAddress) VOID MmFreeMemory(PVOID MemoryPointer) { - U32 PageNumber; - U32 PageCount; - U32 Idx; + ULONG PageNumber; + ULONG PageCount; + ULONG Idx; PPAGE_LOOKUP_TABLE_ITEM RealPageLookupTable = (PPAGE_LOOKUP_TABLE_ITEM)PageLookupTableAddress; #ifdef DEBUG @@ -255,9 +255,9 @@ VOID MmFreeMemory(PVOID MemoryPointer) #ifdef DEBUG VOID VerifyHeap(VOID) { - U32 Idx; - U32 Idx2; - U32 Count; + ULONG Idx; + ULONG Idx2; + ULONG Count; PPAGE_LOOKUP_TABLE_ITEM RealPageLookupTable = (PPAGE_LOOKUP_TABLE_ITEM)PageLookupTableAddress; if (DUMP_MEM_MAP_ON_VERIFY) @@ -315,7 +315,7 @@ VOID VerifyHeap(VOID) VOID DumpMemoryAllocMap(VOID) { - U32 Idx; + ULONG Idx; PPAGE_LOOKUP_TABLE_ITEM RealPageLookupTable = (PPAGE_LOOKUP_TABLE_ITEM)PageLookupTableAddress; DbgPrint((DPRINT_MEMORY, "----------- Memory Allocation Bitmap -----------\n")); @@ -400,7 +400,7 @@ VOID MemAllocTest(VOID) } #endif // DEBUG -U32 GetSystemMemorySize(VOID) +ULONG GetSystemMemorySize(VOID) { return (TotalPagesInLookupTable * MM_PAGE_SIZE); } diff --git a/reactos/boot/freeldr/freeldr/multiboot.c b/reactos/boot/freeldr/freeldr/multiboot.c index 024b930f394..97b7191e8f3 100644 --- a/reactos/boot/freeldr/freeldr/multiboot.c +++ b/reactos/boot/freeldr/freeldr/multiboot.c @@ -1,233 +1,728 @@ /* - * FreeLoader - * Copyright (C) 1998-2003 Brian Palmer - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: Freeloader + * FILE: boot/freeldr/freeldr/multiboot.c + * PURPOSE: ReactOS Loader + * PROGRAMMERS: Alex Ionescu (alex@relsoft.net) + * Hartmutt Birr - SMP/PAE Code */ - #include -#include -#include -#include -#include -#include -#include -#include +#include -unsigned long next_module_load_base = 0; -module_t* pOpenModule = NULL; +#define NDEBUG +#include + +/* Base Addres of Kernel in Physical Memory */ +#define KERNEL_BASE_PHYS 0x200000 + +/* Bits to shift to convert a Virtual Address into an Offset in the Page Table */ +#define PFN_SHIFT 12 + +/* Bits to shift to convert a Virtual Address into an Offset in the Page Directory */ +#define PDE_SHIFT 20 +#define PDE_SHIFT_PAE 18 + + +/* Converts a Relative Address read from the Kernel into a Physical Address */ +#define RaToPa(p) \ + (ULONG_PTR)((ULONG_PTR)p + KERNEL_BASE_PHYS) + +/* Converts a Phsyical Address Pointer into a Page Frame Number */ +#define PaPtrToPfn(p) \ + (((ULONG_PTR)&p) >> PFN_SHIFT) + +/* Converts a Phsyical Address into a Page Frame Number */ +#define PaToPfn(p) \ + ((p) >> PFN_SHIFT) + +#define STARTUP_BASE 0xF0000000 +#define HYPERSPACE_BASE 0xF0800000 +#define APIC_BASE 0xFEC00000 +#define KPCR_BASE 0xFF000000 + +#define LowMemPageTableIndex 0 +#define StartupPageTableIndex (STARTUP_BASE >> 20) / sizeof(HARDWARE_PTE_X86) +#define HyperspacePageTableIndex (HYPERSPACE_BASE >> 20) / sizeof(HARDWARE_PTE_X86) +#define KpcrPageTableIndex (KPCR_BASE >> 20) / sizeof(HARDWARE_PTE_X86) +#define ApicPageTableIndex (APIC_BASE >> 20) / sizeof(HARDWARE_PTE_X86) + +#define LowMemPageTableIndexPae 0 +#define StartupPageTableIndexPae (STARTUP_BASE >> 21) +#define HyperspacePageTableIndexPae (HYPERSPACE_BASE >> 21) +#define KpcrPageTableIndexPae (KPCR_BASE >> 21) +#define ApicPageTableIndexPae (APIC_BASE >> 21) -BOOL MultiBootLoadKernel(FILE *KernelImage) -{ - U32* ImageHeaders; - int Idx; - U32 dwHeaderChecksum; - U32 dwFileLoadOffset; - U32 dwDataSize; - U32 dwBssSize; +#define KernelEntryPoint (KernelEntry - KERNEL_BASE_PHYS) + KernelBase - // Allocate 8192 bytes for multiboot header - ImageHeaders = (U32*)MmAllocateMemory(8192); - if (ImageHeaders == NULL) - { - return FALSE; - } +/* Load Address of Next Module */ +ULONG_PTR NextModuleBase = 0; - /* - * Load the first 8192 bytes of the kernel image - * so we can search for the multiboot header - */ - if (!FsReadFile(KernelImage, 8192, NULL, ImageHeaders)) - { - MmFreeMemory(ImageHeaders); - return FALSE; - } +/* Currently Opened Module */ +PFRLDR_MODULE CurrentModule = NULL; - /* - * Now find the multiboot header and copy it - */ - for (Idx=0; Idx<2048; Idx++) - { - // Did we find it? - if (ImageHeaders[Idx] == MULTIBOOT_HEADER_MAGIC) - { - // Yes, copy it and break out of this loop - memcpy(&mb_header, &ImageHeaders[Idx], sizeof(multiboot_header_t)); +/* Unrelocated Kernel Base in Virtual Memory */ +ULONG_PTR KernelBase; - break; - } - } +/* Wether PAE is to be used or not */ +BOOLEAN PaeModeEnabled; - MmFreeMemory(ImageHeaders); +/* Kernel Entrypoint in Physical Memory */ +ULONG_PTR KernelEntry; - /* - * If we reached the end of the 8192 bytes without - * finding the multiboot header then return error - */ - if (Idx == 2048) - { - UiMessageBox("No multiboot header found!"); - return FALSE; - } +/* Page Directory and Tables for non-PAE Systems */ +extern ULONG_PTR startup_pagedirectory; +extern ULONG_PTR lowmem_pagetable; +extern ULONG_PTR kernel_pagetable; +extern ULONG_PTR hyperspace_pagetable; +extern ULONG_PTR _pae_pagedirtable; +extern ULONG_PTR apic_pagetable; +extern ULONG_PTR kpcr_pagetable; - /*printf("multiboot header:\n"); - printf("0x%x\n", mb_header.magic); - printf("0x%x\n", mb_header.flags); - printf("0x%x\n", mb_header.checksum); - printf("0x%x\n", mb_header.header_addr); - printf("0x%x\n", mb_header.load_addr); - printf("0x%x\n", mb_header.load_end_addr); - printf("0x%x\n", mb_header.bss_end_addr); - printf("0x%x\n", mb_header.entry_addr); - getch();*/ +/* Page Directory and Tables for PAE Systems */ +extern ULONG_PTR startup_pagedirectorytable_pae; +extern ULONG_PTR startup_pagedirectory_pae; +extern ULONG_PTR lowmem_pagetable_pae; +extern ULONG_PTR kernel_pagetable_pae; +extern ULONG_PTR hyperspace_pagetable_pae; +extern ULONG_PTR pagedirtable_pae; +extern ULONG_PTR apic_pagetable_pae; +extern ULONG_PTR kpcr_pagetable_pae; - /* - * Calculate the checksum and make sure it matches - */ - dwHeaderChecksum = mb_header.magic; - dwHeaderChecksum += mb_header.flags; - dwHeaderChecksum += mb_header.checksum; - if (dwHeaderChecksum != 0) - { - UiMessageBox("Multiboot header checksum invalid!"); - return FALSE; - } - - /* - * Get the file offset, this should be 0, and move the file pointer - */ - dwFileLoadOffset = (Idx * sizeof(U32)) - (mb_header.header_addr - mb_header.load_addr); - FsSetFilePointer(KernelImage, dwFileLoadOffset); - - /* - * Load the file image - */ - dwDataSize = (mb_header.load_end_addr - mb_header.load_addr); - FsReadFile(KernelImage, dwDataSize, NULL, (void*)mb_header.load_addr); +typedef struct _HARDWARE_PTE_X86 { + ULONG Valid : 1; + ULONG Write : 1; + ULONG Owner : 1; + ULONG WriteThrough : 1; + ULONG CacheDisable : 1; + ULONG Accessed : 1; + ULONG Dirty : 1; + ULONG LargePage : 1; + ULONG Global : 1; + ULONG CopyOnWrite : 1; + ULONG Prototype : 1; + ULONG reserved : 1; + ULONG PageFrameNumber : 20; +} HARDWARE_PTE_X86, *PHARDWARE_PTE_X86; - /* - * Initialize bss area - */ - dwBssSize = (mb_header.bss_end_addr - mb_header.load_end_addr); - memset((void*)mb_header.load_end_addr, 0, dwBssSize); +typedef struct _HARDWARE_PTE_X64 { + ULONG Valid : 1; + ULONG Write : 1; + ULONG Owner : 1; + ULONG WriteThrough : 1; + ULONG CacheDisable : 1; + ULONG Accessed : 1; + ULONG Dirty : 1; + ULONG LargePage : 1; + ULONG Global : 1; + ULONG CopyOnWrite : 1; + ULONG Prototype : 1; + ULONG reserved : 1; + ULONG PageFrameNumber : 20; + ULONG reserved2 : 31; + ULONG NoExecute : 1; +} HARDWARE_PTE_X64, *PHARDWARE_PTE_X64; - next_module_load_base = ROUND_UP(mb_header.bss_end_addr, /*PAGE_SIZE*/4096); +typedef struct _PAGE_DIRECTORY_X86 { + HARDWARE_PTE_X86 Pde[1024]; +} PAGE_DIRECTORY_x86, *PPAGE_DIRECTORY_X86; - return TRUE; +typedef struct _PAGE_DIRECTORY_X64 { + HARDWARE_PTE_X64 Pde[2048]; +} PAGE_DIRECTORY_X64, *PPAGE_DIRECTORY_X64; + +typedef struct _PAGE_DIRECTORY_TABLE_X64 { + HARDWARE_PTE_X64 Pde[4]; +} PAGE_DIRECTORY_TABLE_X64, *PPAGE_DIRECTORY_TABLE_X64; + +/* FUNCTIONS *****************************************************************/ + +/*++ + * FrLdrStartup + * INTERNAL + * + * Prepares the system for loading the Kernel. + * + * Params: + * Magic - Multiboot Magic + * + * Returns: + * None. + * + * Remarks: + * None. + * + *--*/ +VOID +STDCALL +FrLdrStartup(ULONG Magic) +{ + /* Disable Interrupts */ + Ke386DisableInterrupts(); + + /* Re-initalize EFLAGS */ + Ke386EraseFlags(); + + /* Get Kernel Base and Set MmSystemRangeStart */ + FrLdrGetKernelBase(); + + FrLdrGetPaeMode(); + + /* Initialize the page directory */ + FrLdrSetupPageDirectory(); + + /* Initialize Paging, Write-Protection and Load NTOSKRNL */ + FrLdrSetupPae(Magic); } -PVOID MultiBootLoadModule(FILE *ModuleImage, char *ModuleName, U32* ModuleSize) +/*++ + * FrLdrSetupPae + * INTERNAL + * + * Configures PAE on a MP System, and sets the PDBR if it's supported, or if + * the system is UP. + * + * Params: + * Magic - Multiboot Magic + * + * Returns: + * None. + * + * Remarks: + * None. + * + *--*/ +VOID +FASTCALL +FrLdrSetupPae(ULONG Magic) { - U32 dwModuleSize; - module_t* pModule; - char* ModuleNameString; - char * TempName; - - /* - * Get current module data structure and module name string array - */ - pModule = &multiboot_modules[mb_info.mods_count]; - do { - TempName = strchr( ModuleName, '\\' ); - if( TempName ) - ModuleName = TempName + 1; - } while( TempName ); + ULONG_PTR PageDirectoryBaseAddress = (ULONG_PTR)&startup_pagedirectory; + ASMCODE PagedJump; - ModuleNameString = multiboot_module_strings[mb_info.mods_count]; - - dwModuleSize = FsGetFileSize(ModuleImage); - pModule->mod_start = next_module_load_base; - pModule->mod_end = next_module_load_base + dwModuleSize; - strcpy(ModuleNameString, ModuleName); - pModule->string = (unsigned long)ModuleNameString; - - /* - * Load the file image - */ - FsReadFile(ModuleImage, dwModuleSize, NULL, (void*)next_module_load_base); + if (PaeModeEnabled) + { + PageDirectoryBaseAddress = (ULONG_PTR)&startup_pagedirectorytable_pae; + + /* Enable PAE */ + Ke386SetCr4(Ke386GetCr4() | X86_CR4_PAE); + } + + /* Set the PDBR */ + Ke386SetPageTableDirectory(PageDirectoryBaseAddress); + + /* Enable Paging and Write Protect*/ + Ke386SetCr0(Ke386GetCr0() | X86_CR0_PG | X86_CR0_WP); + + /* Jump to Kernel */ + PagedJump = (ASMCODE)KernelEntryPoint; + PagedJump(Magic, &LoaderBlock); + } - next_module_load_base = ROUND_UP(pModule->mod_end, /*PAGE_SIZE*/4096); - mb_info.mods_count++; - - if (ModuleSize != NULL) - *ModuleSize = dwModuleSize; - - return((PVOID)pModule->mod_start); +/*++ + * FrLdrGetKernelBase + * INTERNAL + * + * Gets the Kernel Base to use. + * + * Params: + * + * Returns: + * None. + * + * Remarks: + * Sets both the FreeLdr internal variable as well as the one which + * will be used by the Kernel. + * + *--*/ +VOID +FASTCALL +FrLdrGetKernelBase(VOID) +{ + PCHAR p1; + PCHAR p2; + + /* Read Command Line */ + for(p1 = (PCHAR)&LoaderBlock.CommandLine; *p1 && (p2 = strchr(p1, '/')); p2++) { + + /* Find "/3GB" */ + if (!strnicmp(p2, "3GB", 3)) { + + /* Make sure there's nothing following it */ + if (p2[3] == ' ' || p2[3] == 0) { + + /* Use 3GB */ + KernelBase = 0xC0000000; + + } else { + + /* Use 2GB */ + KernelBase = 0x80000000; + } + } + } + + /* Set KernelBase */ + LoaderBlock.KernelBase = KernelBase; } -#if 0 -int GetBootPartition(char *OperatingSystemName) +/*++ + * FrLdrGetPaeMode + * INTERNAL + * + * Determines whether PAE mode shoudl be enabled or not. + * + * Params: + * None. + * + * Returns: + * None. + * + * Remarks: + * None. + * + *--*/ +VOID +FASTCALL +FrLdrGetPaeMode(VOID) { - int BootPartitionNumber = -1; - char value[1024]; - U32 SectionId; + /* FIXME: Read command line */ + PaeModeEnabled = FALSE; - if (IniOpenSection(OperatingSystemName, &SectionId)) - { - if (IniReadSettingByName(SectionId, "BootPartition", value, 1024)) - { - BootPartitionNumber = atoi(value); - } - } - - return BootPartitionNumber; -} -#endif - -PVOID MultiBootCreateModule(char *ModuleName) -{ - module_t* pModule; - char* ModuleNameString; - - /* - * Get current module data structure and module name string array - */ - pModule = &multiboot_modules[mb_info.mods_count]; - - ModuleNameString = multiboot_module_strings[mb_info.mods_count]; - - pModule->mod_start = next_module_load_base; - pModule->mod_end = -1; - strcpy(ModuleNameString, ModuleName); - pModule->string = (unsigned long)ModuleNameString; - - pOpenModule = pModule; - - return((PVOID)pModule->mod_start); + if (PaeModeEnabled) + { + } } - -BOOL MultiBootCloseModule(PVOID ModuleBase, U32 dwModuleSize) +/*++ + * FrLdrSetupPageDirectory + * INTERNAL + * + * Sets up the ReactOS Startup Page Directory. + * + * Params: + * None. + * + * Returns: + * None. + * + * Remarks: + * We are setting PDEs, but using the equvivalent (for our purpose) PTE structure. + * As such, please note that PageFrameNumber == PageEntryNumber. + * + *--*/ +VOID +FASTCALL +FrLdrSetupPageDirectory(VOID) { - module_t* pModule; + PPAGE_DIRECTORY_X86 PageDir; + PPAGE_DIRECTORY_TABLE_X64 PageDirTablePae; + PPAGE_DIRECTORY_X64 PageDirPae; + ULONG KernelPageTableIndex; + ULONG i; - if ((pOpenModule != NULL) && - ((module_t*)ModuleBase == (module_t*)pOpenModule->mod_start) && - (pOpenModule->mod_end == -1)) - { - pModule = pOpenModule; - pModule->mod_end = pModule->mod_start + dwModuleSize; + if (PaeModeEnabled) { + + /* Get the Kernel Table Index */ + KernelPageTableIndex = (KernelBase >> 21); - next_module_load_base = ROUND_UP(pModule->mod_end, /*PAGE_SIZE*/4096); - mb_info.mods_count++; - pOpenModule = NULL; + /* Get the Startup Page Directory Table */ + PageDirTablePae = (PPAGE_DIRECTORY_TABLE_X64)&startup_pagedirectorytable_pae; - return(TRUE); - } + /* Get the Startup Page Directory */ + PageDirPae = (PPAGE_DIRECTORY_X64)&startup_pagedirectory_pae; - return(FALSE); + /* Set the Startup page directory table */ + for (i = 0; i < 4; i++) + { + PageDirTablePae->Pde[i].Valid = 1; + PageDirTablePae->Pde[i].PageFrameNumber = PaPtrToPfn(startup_pagedirectory_pae) + i; + } + + /* Set up the Low Memory PDE */ + for (i = 0; i < 2; i++) + { + PageDirPae->Pde[LowMemPageTableIndexPae + i].Valid = 1; + PageDirPae->Pde[LowMemPageTableIndexPae + i].Write = 1; + PageDirPae->Pde[LowMemPageTableIndexPae + i].PageFrameNumber = PaPtrToPfn(lowmem_pagetable_pae) + i; + } + + /* Set up the Kernel PDEs */ + for (i = 0; i < 3; i++) + { + PageDirPae->Pde[KernelPageTableIndex + i].Valid = 1; + PageDirPae->Pde[KernelPageTableIndex + i].Write = 1; + PageDirPae->Pde[KernelPageTableIndex + i].PageFrameNumber = PaPtrToPfn(kernel_pagetable_pae) + i; + } + + /* Set up the Startup PDE */ + for (i = 0; i < 4; i++) + { + PageDirPae->Pde[StartupPageTableIndexPae + i].Valid = 1; + PageDirPae->Pde[StartupPageTableIndexPae + i].Write = 1; + PageDirPae->Pde[StartupPageTableIndexPae + i].PageFrameNumber = PaPtrToPfn(startup_pagedirectory_pae) + i; + } + + /* Set up the Hyperspace PDE */ + for (i = 0; i < 2; i++) + { + PageDirPae->Pde[HyperspacePageTableIndexPae + i].Valid = 1; + PageDirPae->Pde[HyperspacePageTableIndexPae + i].Write = 1; + PageDirPae->Pde[HyperspacePageTableIndexPae + i].PageFrameNumber = PaPtrToPfn(hyperspace_pagetable_pae) + i; + } + + /* Set up the Apic PDE */ + for (i = 0; i < 2; i++) + { + PageDirPae->Pde[ApicPageTableIndexPae + i].Valid = 1; + PageDirPae->Pde[ApicPageTableIndexPae + i].Write = 1; + PageDirPae->Pde[ApicPageTableIndexPae + i].PageFrameNumber = PaPtrToPfn(apic_pagetable_pae) + i; + } + + /* Set up the KPCR PDE */ + PageDirPae->Pde[KpcrPageTableIndexPae].Valid = 1; + PageDirPae->Pde[KpcrPageTableIndexPae].Write = 1; + PageDirPae->Pde[KpcrPageTableIndexPae].PageFrameNumber = PaPtrToPfn(kpcr_pagetable_pae); + + /* Set up Low Memory PTEs */ + PageDirPae = (PPAGE_DIRECTORY_X64)&lowmem_pagetable_pae; + for (i=0; i<1024; i++) { + + PageDirPae->Pde[i].Valid = 1; + PageDirPae->Pde[i].Write = 1; + PageDirPae->Pde[i].Owner = 1; + PageDirPae->Pde[i].PageFrameNumber = i; + } + + /* Set up Kernel PTEs */ + PageDirPae = (PPAGE_DIRECTORY_X64)&kernel_pagetable_pae; + for (i=0; i<1536; i++) { + + PageDirPae->Pde[i].Valid = 1; + PageDirPae->Pde[i].Write = 1; + PageDirPae->Pde[i].PageFrameNumber = PaToPfn(KERNEL_BASE_PHYS) + i; + } + + /* Set up APIC PTEs */ + PageDirPae = (PPAGE_DIRECTORY_X64)&apic_pagetable_pae; + PageDirPae->Pde[0].Valid = 1; + PageDirPae->Pde[0].Write = 1; + PageDirPae->Pde[0].CacheDisable = 1; + PageDirPae->Pde[0].WriteThrough = 1; + PageDirPae->Pde[0].PageFrameNumber = PaToPfn(APIC_BASE); + PageDirPae->Pde[0x200].Valid = 1; + PageDirPae->Pde[0x200].Write = 1; + PageDirPae->Pde[0x200].CacheDisable = 1; + PageDirPae->Pde[0x200].WriteThrough = 1; + PageDirPae->Pde[0x200].PageFrameNumber = PaToPfn(APIC_BASE + KERNEL_BASE_PHYS); + + /* Set up KPCR PTEs */ + PageDirPae = (PPAGE_DIRECTORY_X64)&kpcr_pagetable_pae; + PageDirPae->Pde[0].Valid = 1; + PageDirPae->Pde[0].Write = 1; + PageDirPae->Pde[0].PageFrameNumber = 1; + + } else { + + /* Get the Kernel Table Index */ + KernelPageTableIndex = (KernelBase >> PDE_SHIFT) / sizeof(HARDWARE_PTE_X86); + + /* Get the Startup Page Directory */ + PageDir = (PPAGE_DIRECTORY_X86)&startup_pagedirectory; + + /* Set up the Low Memory PDE */ + PageDir->Pde[LowMemPageTableIndex].Valid = 1; + PageDir->Pde[LowMemPageTableIndex].Write = 1; + PageDir->Pde[LowMemPageTableIndex].PageFrameNumber = PaPtrToPfn(lowmem_pagetable); + + /* Set up the Kernel PDEs */ + PageDir->Pde[KernelPageTableIndex].Valid = 1; + PageDir->Pde[KernelPageTableIndex].Write = 1; + PageDir->Pde[KernelPageTableIndex].PageFrameNumber = PaPtrToPfn(kernel_pagetable); + PageDir->Pde[KernelPageTableIndex + 1].Valid = 1; + PageDir->Pde[KernelPageTableIndex + 1].Write = 1; + PageDir->Pde[KernelPageTableIndex + 1].PageFrameNumber = PaPtrToPfn(kernel_pagetable + 4096); + + /* Set up the Startup PDE */ + PageDir->Pde[StartupPageTableIndex].Valid = 1; + PageDir->Pde[StartupPageTableIndex].Write = 1; + PageDir->Pde[StartupPageTableIndex].PageFrameNumber = PaPtrToPfn(startup_pagedirectory); + + /* Set up the Hyperspace PDE */ + PageDir->Pde[HyperspacePageTableIndex].Valid = 1; + PageDir->Pde[HyperspacePageTableIndex].Write = 1; + PageDir->Pde[HyperspacePageTableIndex].PageFrameNumber = PaPtrToPfn(hyperspace_pagetable); + + /* Set up the Apic PDE */ + PageDir->Pde[ApicPageTableIndex].Valid = 1; + PageDir->Pde[ApicPageTableIndex].Write = 1; + PageDir->Pde[ApicPageTableIndex].PageFrameNumber = PaPtrToPfn(apic_pagetable); + + /* Set up the KPCR PDE */ + PageDir->Pde[KpcrPageTableIndex].Valid = 1; + PageDir->Pde[KpcrPageTableIndex].Write = 1; + PageDir->Pde[KpcrPageTableIndex].PageFrameNumber = PaPtrToPfn(kpcr_pagetable); + + /* Set up Low Memory PTEs */ + PageDir = (PPAGE_DIRECTORY_X86)&lowmem_pagetable; + for (i=0; i<1024; i++) { + + PageDir->Pde[i].Valid = 1; + PageDir->Pde[i].Write = 1; + PageDir->Pde[i].Owner = 1; + PageDir->Pde[i].PageFrameNumber = PaToPfn(i * PAGE_SIZE); + } + + /* Set up Kernel PTEs */ + PageDir = (PPAGE_DIRECTORY_X86)&kernel_pagetable; + for (i=0; i<1536; i++) { + + PageDir->Pde[i].Valid = 1; + PageDir->Pde[i].Write = 1; + PageDir->Pde[i].PageFrameNumber = PaToPfn(KERNEL_BASE_PHYS + i * PAGE_SIZE); + } + + /* Set up APIC PTEs */ + PageDir = (PPAGE_DIRECTORY_X86)&apic_pagetable; + PageDir->Pde[0].Valid = 1; + PageDir->Pde[0].Write = 1; + PageDir->Pde[0].CacheDisable = 1; + PageDir->Pde[0].WriteThrough = 1; + PageDir->Pde[0].PageFrameNumber = PaToPfn(APIC_BASE); + PageDir->Pde[0x200].Valid = 1; + PageDir->Pde[0x200].Write = 1; + PageDir->Pde[0x200].CacheDisable = 1; + PageDir->Pde[0x200].WriteThrough = 1; + PageDir->Pde[0x200].PageFrameNumber = PaToPfn(APIC_BASE + KERNEL_BASE_PHYS); + + /* Set up KPCR PTEs */ + PageDir = (PPAGE_DIRECTORY_X86)&kpcr_pagetable; + PageDir->Pde[0].Valid = 1; + PageDir->Pde[0].Write = 1; + PageDir->Pde[0].PageFrameNumber = 1; + } + return; +} + +/*++ + * FrLdrMapKernel + * INTERNAL + * + * Maps the Kernel into memory, does PE Section Mapping, initalizes the + * uninitialized data sections, and relocates the image. + * + * Params: + * KernelImage - FILE Structure representing the ntoskrnl image file. + * + * Returns: + * TRUE if the Kernel was mapped. + * + * Remarks: + * None. + * + *--*/ +BOOL +STDCALL +FrLdrMapKernel(FILE *KernelImage) +{ + PIMAGE_DOS_HEADER ImageHeader; + PIMAGE_NT_HEADERS NtHeader; + PIMAGE_SECTION_HEADER Section; + ULONG SectionCount; + ULONG ImageSize; + ULONG_PTR SourceSection; + ULONG_PTR TargetSection; + ULONG SectionSize; + LONG i; + + /* Allocate 1024 bytes for PE Header */ + ImageHeader = (PIMAGE_DOS_HEADER)MmAllocateMemory(1024); + + /* Make sure it was succesful */ + if (ImageHeader == NULL) { + + return FALSE; + } + + /* Load the first 1024 bytes of the kernel image so we can read the PE header */ + if (!FsReadFile(KernelImage, 1024, NULL, ImageHeader)) { + + /* Fail if we couldn't read */ + MmFreeMemory(ImageHeader); + return FALSE; + } + + /* Now read the MZ header to get the offset to the PE Header */ + NtHeader = (PIMAGE_NT_HEADERS)((PCHAR)ImageHeader + ImageHeader->e_lfanew); + + /* Save the Image Base */ + KernelBase = NtHeader->OptionalHeader.ImageBase; + + /* Save Entrypoint */ + KernelEntry = RaToPa(NtHeader->OptionalHeader.AddressOfEntryPoint); + + /* Save the Image Size */ + ImageSize = NtHeader->OptionalHeader.SizeOfImage; + + /* Free the Header */ + MmFreeMemory(ImageHeader); + + /* Set the file pointer to zero */ + FsSetFilePointer(KernelImage, 0); + + /* Load the file image */ + FsReadFile(KernelImage, ImageSize, NULL, (PVOID)KERNEL_BASE_PHYS); + + /* Reload the NT Header */ + NtHeader = (PIMAGE_NT_HEADERS)((PCHAR)KERNEL_BASE_PHYS + ImageHeader->e_lfanew); + + /* Load the first section */ + Section = IMAGE_FIRST_SECTION(NtHeader); + SectionCount = NtHeader->FileHeader.NumberOfSections - 1; + + /* Now go to the last section */ + Section += SectionCount; + + /* Walk each section backwards */ + for (i=SectionCount; i >= 0; i--, Section--) { + + /* Get the disk location and the memory location, and the size */ + SourceSection = RaToPa(Section->PointerToRawData); + TargetSection = RaToPa(Section->VirtualAddress); + SectionSize = Section->SizeOfRawData; + + /* If the section is already mapped correctly, go to the next */ + if (SourceSection == TargetSection) continue; + + /* Load it into memory */ + memmove((PVOID)TargetSection, (PVOID)SourceSection, SectionSize); + + /* Check for unitilizated data */ + if (Section->SizeOfRawData < Section->Misc.VirtualSize) { + + /* Zero it out */ + memset((PVOID)RaToPa(Section->VirtualAddress + Section->SizeOfRawData), + 0, + Section->Misc.VirtualSize - Section->SizeOfRawData); + } + } + + /* Now relocate the file */ + /* FIXME: ADD RELOC CODE */ + + /* Increase the next Load Base */ + NextModuleBase = ROUND_UP(KERNEL_BASE_PHYS + ImageSize, PAGE_SIZE); + + /* Return Success */ + return TRUE; +} + +ULONG_PTR +STDCALL +FrLdrLoadModule(FILE *ModuleImage, + LPSTR ModuleName, + PULONG ModuleSize) +{ + ULONG LocalModuleSize; + PFRLDR_MODULE ModuleData; + LPSTR NameBuffer; + LPSTR TempName; + + /* Get current module data structure and module name string array */ + ModuleData = &multiboot_modules[LoaderBlock.ModsCount]; + + /* Get only the Module Name */ + do { + + TempName = strchr(ModuleName, '\\'); + + if(TempName) { + ModuleName = TempName + 1; + } + + } while(TempName); + NameBuffer = multiboot_module_strings[LoaderBlock.ModsCount]; + + /* Get Module Size */ + LocalModuleSize = FsGetFileSize(ModuleImage); + + /* Fill out Module Data Structure */ + ModuleData->ModuleStart = NextModuleBase; + ModuleData->ModuleEnd = NextModuleBase + LocalModuleSize; + + /* Save name */ + strcpy(NameBuffer, ModuleName); + ModuleData->ModuleName = NameBuffer; + + /* Load the file image */ + FsReadFile(ModuleImage, LocalModuleSize, NULL, (PVOID)NextModuleBase); + + /* Move to next memory block and increase Module Count */ + NextModuleBase = ROUND_UP(ModuleData->ModuleEnd, PAGE_SIZE); + LoaderBlock.ModsCount++; + + /* Return Module Size if required */ + if (ModuleSize != NULL) { + *ModuleSize = LocalModuleSize; + } + + return(ModuleData->ModuleStart); +} + +ULONG_PTR +STDCALL +FrLdrCreateModule(LPSTR ModuleName) +{ + PFRLDR_MODULE ModuleData; + LPSTR NameBuffer; + + /* Get current module data structure and module name string array */ + ModuleData = &multiboot_modules[LoaderBlock.ModsCount]; + NameBuffer = multiboot_module_strings[LoaderBlock.ModsCount]; + + /* Set up the structure */ + ModuleData->ModuleStart = NextModuleBase; + ModuleData->ModuleEnd = -1; + + /* Copy the name */ + strcpy(NameBuffer, ModuleName); + ModuleData->ModuleName = NameBuffer; + + /* Set the current Module */ + CurrentModule = ModuleData; + + /* Return Module Base Address */ + return(ModuleData->ModuleStart); +} + +BOOL +STDCALL +FrLdrCloseModule(ULONG_PTR ModuleBase, + ULONG ModuleSize) +{ + PFRLDR_MODULE ModuleData = CurrentModule; + + /* Make sure a module is opened */ + if (ModuleData) { + + /* Make sure this is the right module and that it hasn't been closed */ + if ((ModuleBase == ModuleData->ModuleStart) && (ModuleData->ModuleEnd == -1)) { + + /* Close the Module */ + ModuleData->ModuleEnd = ModuleData->ModuleStart + ModuleSize; + + /* Set the next Module Base and increase the number of modules */ + NextModuleBase = ROUND_UP(ModuleData->ModuleEnd, PAGE_SIZE); + LoaderBlock.ModsCount++; + + /* Close the currently opened module */ + CurrentModule = NULL; + + /* Success */ + return(TRUE); + } + } + + /* Failure path */ + return(FALSE); } diff --git a/reactos/boot/freeldr/freeldr/options.c b/reactos/boot/freeldr/freeldr/options.c index e56480c4703..4260283905f 100644 --- a/reactos/boot/freeldr/freeldr/options.c +++ b/reactos/boot/freeldr/freeldr/options.c @@ -67,11 +67,11 @@ enum OptionMenuItems REBOOT = 11, }; -U32 OptionsMenuItemCount = sizeof(OptionsMenuList) / sizeof(OptionsMenuList[0]); +ULONG OptionsMenuItemCount = sizeof(OptionsMenuList) / sizeof(OptionsMenuList[0]); VOID DoOptionsMenu(VOID) { - U32 SelectedMenuItem; + ULONG SelectedMenuItem; if (!UiDisplayMenu(OptionsMenuList, OptionsMenuItemCount, 0, -1, &SelectedMenuItem, TRUE, NULL)) { diff --git a/reactos/boot/freeldr/freeldr/oslist.c b/reactos/boot/freeldr/freeldr/oslist.c index 8c2c5b5eb45..4dbe7ed13f8 100644 --- a/reactos/boot/freeldr/freeldr/oslist.c +++ b/reactos/boot/freeldr/freeldr/oslist.c @@ -24,16 +24,16 @@ #include #include -BOOL InitOperatingSystemList(PUCHAR **SectionNamesPointer, PUCHAR **DisplayNamesPointer, U32* OperatingSystemCountPointer) +BOOL InitOperatingSystemList(PUCHAR **SectionNamesPointer, PUCHAR **DisplayNamesPointer, ULONG* OperatingSystemCountPointer) { - U32 Idx; - U32 CurrentOperatingSystemIndex; + ULONG Idx; + ULONG CurrentOperatingSystemIndex; UCHAR SettingName[260]; UCHAR SettingValue[260]; - U32 OperatingSystemCount; - U32 SectionId; - U32 OperatingSystemSectionId; - U32 SectionSettingCount; + ULONG OperatingSystemCount; + ULONG SectionId; + ULONG OperatingSystemSectionId; + ULONG SectionSettingCount; PUCHAR *OperatingSystemSectionNames; PUCHAR *OperatingSystemDisplayNames; @@ -85,13 +85,13 @@ BOOL InitOperatingSystemList(PUCHAR **SectionNamesPointer, PUCHAR **DisplayNames return TRUE; } -U32 CountOperatingSystems(U32 SectionId) +ULONG CountOperatingSystems(ULONG SectionId) { - U32 Idx; + ULONG Idx; UCHAR SettingName[260]; UCHAR SettingValue[260]; - U32 OperatingSystemCount = 0; - U32 SectionSettingCount; + ULONG OperatingSystemCount = 0; + ULONG SectionSettingCount; // // Loop through and count the operating systems @@ -115,9 +115,9 @@ U32 CountOperatingSystems(U32 SectionId) return OperatingSystemCount; } -BOOL AllocateListMemory(PUCHAR **SectionNamesPointer, PUCHAR **DisplayNamesPointer, U32 OperatingSystemCount) +BOOL AllocateListMemory(PUCHAR **SectionNamesPointer, PUCHAR **DisplayNamesPointer, ULONG OperatingSystemCount) { - U32 Idx; + ULONG Idx; PUCHAR *OperatingSystemSectionNames = NULL; PUCHAR *OperatingSystemDisplayNames = NULL; diff --git a/reactos/boot/freeldr/freeldr/reactos/arcname.c b/reactos/boot/freeldr/freeldr/reactos/arcname.c index 94304459cab..9b1f1487cca 100644 --- a/reactos/boot/freeldr/freeldr/reactos/arcname.c +++ b/reactos/boot/freeldr/freeldr/reactos/arcname.c @@ -23,7 +23,7 @@ #include -BOOL DissectArcPath(char *ArcPath, char *BootPath, U32* BootDrive, U32* BootPartition) +BOOL DissectArcPath(char *ArcPath, char *BootPath, ULONG* BootDrive, ULONG* BootPartition) { char *p; @@ -73,7 +73,7 @@ BOOL DissectArcPath(char *ArcPath, char *BootPath, U32* BootDrive, U32* BootPart return TRUE; } -void ConstructArcPath(PUCHAR ArcPath, PUCHAR SystemFolder, U32 Disk, U32 Partition) +void ConstructArcPath(PUCHAR ArcPath, PUCHAR SystemFolder, ULONG Disk, ULONG Partition) { char tmp[50]; @@ -109,10 +109,10 @@ void ConstructArcPath(PUCHAR ArcPath, PUCHAR SystemFolder, U32 Disk, U32 Partiti } } -U32 ConvertArcNameToBiosDriveNumber(PUCHAR ArcPath) +ULONG ConvertArcNameToBiosDriveNumber(PUCHAR ArcPath) { char * p; - U32 DriveNumber = 0; + ULONG DriveNumber = 0; if (strnicmp(ArcPath, "multi(0)disk(0)", 15) != 0) return 0; diff --git a/reactos/boot/freeldr/freeldr/reactos/binhive.c b/reactos/boot/freeldr/freeldr/reactos/binhive.c index 60f7329253c..8a94e812a8e 100644 --- a/reactos/boot/freeldr/freeldr/reactos/binhive.c +++ b/reactos/boot/freeldr/freeldr/reactos/binhive.c @@ -45,119 +45,119 @@ /* BLOCK_OFFSET = offset in file after header block */ -typedef U32 BLOCK_OFFSET, *PBLOCK_OFFSET; +typedef ULONG BLOCK_OFFSET, *PBLOCK_OFFSET; /* header for registry hive file : */ typedef struct _HIVE_HEADER { /* Hive identifier "regf" (0x66676572) */ - U32 BlockId; + ULONG BlockId; /* Update counter */ - U32 UpdateCounter1; + ULONG UpdateCounter1; /* Update counter */ - U32 UpdateCounter2; + ULONG UpdateCounter2; /* When this hive file was last modified */ - U64 DateModified; /* FILETIME */ + ULONGLONG DateModified; /* FILETIME */ /* Registry format version ? (1?) */ - U32 Unused3; + ULONG Unused3; /* Registry format version ? (3?) */ - U32 Unused4; + ULONG Unused4; /* Registry format version ? (0?) */ - U32 Unused5; + ULONG Unused5; /* Registry format version ? (1?) */ - U32 Unused6; + ULONG Unused6; /* Offset into file from the byte after the end of the base block. If the hive is volatile, this is the actual pointer to the KEY_CELL */ BLOCK_OFFSET RootKeyOffset; /* Size of each hive block ? */ - U32 BlockSize; + ULONG BlockSize; /* (1?) */ - U32 Unused7; + ULONG Unused7; /* Name of hive file */ WCHAR FileName[64]; /* ? */ - U32 Unused8[83]; + ULONG Unused8[83]; /* Checksum of first 0x200 bytes */ - U32 Checksum; + ULONG Checksum; } __attribute__((packed)) HIVE_HEADER, *PHIVE_HEADER; typedef struct _BIN_HEADER { /* Bin identifier "hbin" (0x6E696268) */ - U32 HeaderId; + ULONG HeaderId; /* Bin offset */ BLOCK_OFFSET BinOffset; /* Size in bytes, multiple of the block size (4KB) */ - U32 BinSize; + ULONG BinSize; /* ? */ - U32 Unused1; + ULONG Unused1; /* When this bin was last modified */ - U64 DateModified; /* FILETIME */ + ULONGLONG DateModified; /* FILETIME */ /* ? */ - U32 Unused2; + ULONG Unused2; } __attribute__((packed)) HBIN, *PHBIN; typedef struct _CELL_HEADER { /* <0 if used, >0 if free */ - S32 CellSize; + LONG CellSize; } __attribute__((packed)) CELL_HEADER, *PCELL_HEADER; typedef struct _KEY_CELL { /* Size of this cell */ - S32 CellSize; + LONG CellSize; /* Key cell identifier "kn" (0x6b6e) */ - U16 Id; + USHORT Id; /* ? */ - U16 Type; + USHORT Type; /* Time of last flush */ - U64 LastWriteTime; /* FILETIME */ + ULONGLONG LastWriteTime; /* FILETIME */ /* ? */ - U32 UnUsed1; + ULONG UnUsed1; /* Block offset of parent key cell */ BLOCK_OFFSET ParentKeyOffset; /* Count of sub keys for the key in this key cell */ - U32 NumberOfSubKeys; + ULONG NumberOfSubKeys; /* ? */ - U32 UnUsed2; + ULONG UnUsed2; /* Block offset of has table for FIXME: subkeys/values? */ BLOCK_OFFSET HashTableOffset; /* ? */ - U32 UnUsed3; + ULONG UnUsed3; /* Count of values contained in this key cell */ - U32 NumberOfValues; + ULONG NumberOfValues; /* Block offset of VALUE_LIST_CELL */ BLOCK_OFFSET ValueListOffset; @@ -169,16 +169,16 @@ typedef struct _KEY_CELL BLOCK_OFFSET ClassNameOffset; /* ? */ - U32 Unused4[5]; + ULONG Unused4[5]; /* Size in bytes of key name */ - U16 NameSize; + USHORT NameSize; /* Size of class name in bytes */ - U16 ClassSize; + USHORT ClassSize; /* Name of key (not zero terminated) */ - U8 Name[0]; + UCHAR Name[0]; } __attribute__((packed)) KEY_CELL, *PKEY_CELL; @@ -193,36 +193,36 @@ typedef struct _KEY_CELL typedef struct _HASH_RECORD { BLOCK_OFFSET KeyOffset; - U32 HashValue; + ULONG HashValue; } __attribute__((packed)) HASH_RECORD, *PHASH_RECORD; typedef struct _HASH_TABLE_CELL { - S32 CellSize; - U16 Id; - U16 HashTableSize; + LONG CellSize; + USHORT Id; + USHORT HashTableSize; HASH_RECORD Table[0]; } __attribute__((packed)) HASH_TABLE_CELL, *PHASH_TABLE_CELL; typedef struct _VALUE_LIST_CELL { - S32 CellSize; + LONG CellSize; BLOCK_OFFSET ValueOffset[0]; } __attribute__((packed)) VALUE_LIST_CELL, *PVALUE_LIST_CELL; typedef struct _VALUE_CELL { - S32 CellSize; - U16 Id; // "kv" - U16 NameSize; // length of Name - U32 DataSize; // length of datas in the cell pointed by DataOffset + LONG CellSize; + USHORT Id; // "kv" + USHORT NameSize; // length of Name + ULONG DataSize; // length of datas in the cell pointed by DataOffset BLOCK_OFFSET DataOffset;// datas are here if high bit of DataSize is set - U32 DataType; - U16 Flags; - U16 Unused1; + ULONG DataType; + USHORT Flags; + USHORT Unused1; UCHAR Name[0]; /* warning : not zero terminated */ } __attribute__((packed)) VALUE_CELL, *PVALUE_CELL; @@ -236,26 +236,26 @@ typedef struct _VALUE_CELL typedef struct _DATA_CELL { - S32 CellSize; + LONG CellSize; UCHAR Data[0]; } __attribute__((packed)) DATA_CELL, *PDATA_CELL; typedef struct _REGISTRY_HIVE { - U32 FileSize; + ULONG FileSize; PHIVE_HEADER HiveHeader; - U32 BlockListSize; + ULONG BlockListSize; PHBIN *BlockList; - U32 FreeListSize; - U32 FreeListMax; + ULONG FreeListSize; + ULONG FreeListMax; PCELL_HEADER *FreeList; BLOCK_OFFSET *FreeListOffset; } REGISTRY_HIVE, *PREGISTRY_HIVE; static PVOID MbBase = NULL; -static U32 MbSize = 0; +static ULONG MbSize = 0; /* FUNCTIONS ****************************************************************/ @@ -268,13 +268,13 @@ InitMbMemory (PVOID ChunkBase) static PVOID -AllocateMbMemory (U32 MemSize) +AllocateMbMemory (ULONG MemSize) { PVOID CurBase; CurBase = MbBase; - MbBase = (PVOID)((U32)MbBase + MemSize); + MbBase = (PVOID)((ULONG)MbBase + MemSize); MbSize += MemSize; return CurBase; @@ -286,7 +286,7 @@ FreeMbMemory (VOID) MbSize = 0; } -static U32 +static ULONG GetMbAllocatedSize (VOID) { return MbSize; @@ -329,8 +329,8 @@ static VOID CmiCreateDefaultRootKeyCell (PKEY_CELL RootKeyCell, PCHAR KeyName) { PCHAR BaseKeyName; - U32 NameSize; - U32 CellSize; + ULONG NameSize; + ULONG CellSize; assert (RootKeyCell); @@ -428,12 +428,12 @@ CmiCreateHive (PCHAR KeyName) BinCell->BinOffset = 0; /* Init root key cell */ - RootKeyCell = (PKEY_CELL)((U32)BinCell + REG_HBIN_DATA_OFFSET); + RootKeyCell = (PKEY_CELL)((ULONG)BinCell + REG_HBIN_DATA_OFFSET); CmiCreateDefaultRootKeyCell(RootKeyCell, KeyName); Hive->HiveHeader->RootKeyOffset = REG_HBIN_DATA_OFFSET; /* Init free cell */ - FreeCell = (PCELL_HEADER)((U32)RootKeyCell - RootKeyCell->CellSize); + FreeCell = (PCELL_HEADER)((ULONG)RootKeyCell - RootKeyCell->CellSize); FreeCell->CellSize = REG_BLOCK_SIZE - (REG_HBIN_DATA_OFFSET - RootKeyCell->CellSize); Hive->FreeList[0] = FreeCell; @@ -463,9 +463,9 @@ static PHBIN CmiGetBin (PREGISTRY_HIVE Hive, BLOCK_OFFSET BlockOffset) { - U32 BlockIndex; + ULONG BlockIndex; - if (BlockOffset == (U32) -1) + if (BlockOffset == (ULONG) -1) return NULL; BlockIndex = BlockOffset / REG_BLOCK_SIZE; @@ -483,10 +483,10 @@ CmiMergeFree(PREGISTRY_HIVE RegistryHive, { BLOCK_OFFSET BlockOffset; BLOCK_OFFSET BinOffset; - U32 BlockSize; - U32 BinSize; + ULONG BlockSize; + ULONG BinSize; PHBIN Bin; - U32 i; + ULONG i; DbgPrint((DPRINT_REGISTRY, "CmiMergeFree(Block %lx Offset %lx Size %lx) called\n", FreeBlock, FreeOffset, FreeBlock->CellSize)); @@ -574,9 +574,9 @@ CmiAddFree(PREGISTRY_HIVE RegistryHive, { PCELL_HEADER *tmpList; BLOCK_OFFSET *tmpListOffset; - S32 minInd; - S32 maxInd; - S32 medInd; + LONG minInd; + LONG maxInd; + LONG medInd; assert(RegistryHive); assert(FreeBlock); @@ -675,15 +675,15 @@ CmiAddFree(PREGISTRY_HIVE RegistryHive, static BOOL CmiAddBin(PREGISTRY_HIVE RegistryHive, - U32 BlockCount, + ULONG BlockCount, PVOID *NewBlock, PBLOCK_OFFSET NewBlockOffset) { PCELL_HEADER tmpBlock; PHBIN *BlockList; PHBIN tmpBin; - U32 BinSize; - U32 i; + ULONG BinSize; + ULONG i; BinSize = BlockCount * REG_BLOCK_SIZE; tmpBin = AllocateMbMemory (BinSize); @@ -722,7 +722,7 @@ CmiAddBin(PREGISTRY_HIVE RegistryHive, RegistryHive->BlockListSize += BlockCount; /* Initialize a free block in this heap : */ - tmpBlock = (PCELL_HEADER)((U32) tmpBin + REG_HBIN_DATA_OFFSET); + tmpBlock = (PCELL_HEADER)((ULONG) tmpBin + REG_HBIN_DATA_OFFSET); tmpBlock->CellSize = (REG_BLOCK_SIZE - REG_HBIN_DATA_OFFSET); *NewBlock = (PVOID) tmpBlock; @@ -736,12 +736,12 @@ CmiAddBin(PREGISTRY_HIVE RegistryHive, static BOOL CmiAllocateCell (PREGISTRY_HIVE RegistryHive, - S32 CellSize, + LONG CellSize, PVOID *Block, PBLOCK_OFFSET pBlockOffset) { PCELL_HEADER NewBlock; - U32 i; + ULONG i; *Block = NULL; @@ -790,7 +790,7 @@ CmiAllocateCell (PREGISTRY_HIVE RegistryHive, /* Split the block in two parts */ if (NewBlock->CellSize > CellSize) { - NewBlock = (PCELL_HEADER) ((U32)NewBlock + CellSize); + NewBlock = (PCELL_HEADER) ((ULONG)NewBlock + CellSize); NewBlock->CellSize = ((PCELL_HEADER) (*Block))->CellSize - CellSize; CmiAddFree (RegistryHive, NewBlock, @@ -814,9 +814,9 @@ CmiGetCell (PREGISTRY_HIVE Hive, BLOCK_OFFSET BlockOffset) { PHBIN Bin; - U32 BlockIndex; + ULONG BlockIndex; - if (BlockOffset == (U32) -1) + if (BlockOffset == (ULONG) -1) return NULL; BlockIndex = BlockOffset / REG_BLOCK_SIZE; @@ -827,17 +827,17 @@ CmiGetCell (PREGISTRY_HIVE Hive, if (Bin == NULL) return NULL; - return (PVOID)((U32)Bin + (BlockOffset - Bin->BinOffset)); + return (PVOID)((ULONG)Bin + (BlockOffset - Bin->BinOffset)); } static BOOL CmiAllocateHashTableCell (PREGISTRY_HIVE Hive, PBLOCK_OFFSET HBOffset, - U32 SubKeyCount) + ULONG SubKeyCount) { PHASH_TABLE_CELL HashCell; - U32 NewHashSize; + ULONG NewHashSize; BOOL Status; NewHashSize = sizeof(HASH_TABLE_CELL) + @@ -866,7 +866,7 @@ CmiAddKeyToParentHashTable (PREGISTRY_HIVE Hive, { PHASH_TABLE_CELL HashBlock; PKEY_CELL ParentKeyCell; - U32 i; + ULONG i; ParentKeyCell = CmiGetCell (Hive, ParentKeyOffset); if (ParentKeyCell == NULL) @@ -902,10 +902,10 @@ CmiAddKeyToParentHashTable (PREGISTRY_HIVE Hive, static BOOL CmiAllocateValueListCell (PREGISTRY_HIVE Hive, PBLOCK_OFFSET ValueListOffset, - U32 ValueCount) + ULONG ValueCount) { PVALUE_LIST_CELL ValueListCell; - U32 ValueListSize; + ULONG ValueListSize; BOOL Status; ValueListSize = sizeof(VALUE_LIST_CELL) + @@ -931,7 +931,7 @@ CmiAllocateValueCell(PREGISTRY_HIVE Hive, PCHAR ValueName) { PVALUE_CELL NewValueCell; - U32 NameSize; + ULONG NameSize; BOOL Status; NameSize = (ValueName == NULL) ? 0 : strlen (ValueName); @@ -996,9 +996,9 @@ CmiAddValueToKeyValueList(PREGISTRY_HIVE Hive, static VOID memexpand (PWCHAR Dst, PCHAR Src, - U32 Length) + ULONG Length) { - U32 i; + ULONG i; for (i = 0; i < Length; i++) Dst[i] = (WCHAR)Src[i]; @@ -1008,16 +1008,16 @@ memexpand (PWCHAR Dst, static BOOL CmiExportValue (PREGISTRY_HIVE Hive, BLOCK_OFFSET KeyCellOffset, - HKEY Key, + FRLDRHKEY Key, PVALUE Value) { BLOCK_OFFSET ValueCellOffset; BLOCK_OFFSET DataCellOffset; PVALUE_CELL ValueCell; PDATA_CELL DataCell; - U32 SrcDataSize; - U32 DstDataSize; - U32 DataType; + ULONG SrcDataSize; + ULONG DstDataSize; + ULONG DataType; PUCHAR Data; BOOL Expand = FALSE; @@ -1121,16 +1121,16 @@ CmiExportValue (PREGISTRY_HIVE Hive, static BOOL CmiExportSubKey (PREGISTRY_HIVE Hive, BLOCK_OFFSET ParentKeyOffset, - HKEY ParentKey, - HKEY Key) + FRLDRHKEY ParentKey, + FRLDRHKEY Key) { BLOCK_OFFSET NKBOffset; PKEY_CELL NewKeyCell; - U32 KeyCellSize; - U32 SubKeyCount; - U32 ValueCount; + ULONG KeyCellSize; + ULONG SubKeyCount; + ULONG ValueCount; PLIST_ENTRY Entry; - HKEY SubKey; + FRLDRHKEY SubKey; PVALUE Value; DbgPrint((DPRINT_REGISTRY, "CmiExportSubKey('%s') called\n", Key->Name)); @@ -1243,11 +1243,11 @@ CmiExportSubKey (PREGISTRY_HIVE Hive, static VOID CmiCalcHiveChecksum (PREGISTRY_HIVE Hive) { - U32 *Buffer; - U32 Sum; - U32 i; + ULONG *Buffer; + ULONG Sum; + ULONG i; - Buffer = (U32*)Hive->HiveHeader; + Buffer = (ULONG*)Hive->HiveHeader; Sum = 0; for (i = 0; i < 127; i++) Sum += Buffer[i]; @@ -1261,11 +1261,11 @@ CmiExportHive (PREGISTRY_HIVE Hive, PCHAR KeyName) { PKEY_CELL KeyCell; - HKEY Key; - U32 SubKeyCount; - U32 ValueCount; + FRLDRHKEY Key; + ULONG SubKeyCount; + ULONG ValueCount; PLIST_ENTRY Entry; - HKEY SubKey; + FRLDRHKEY SubKey; PVALUE Value; DbgPrint((DPRINT_REGISTRY, "CmiExportHive(%x, '%s') called\n", Hive, KeyName)); @@ -1354,16 +1354,16 @@ CmiExportHive (PREGISTRY_HIVE Hive, static BOOL RegImportValue (PHBIN RootBin, PVALUE_CELL ValueCell, - HKEY Key) + FRLDRHKEY Key) { PDATA_CELL DataCell; PWCHAR wName; PCHAR cName; - S32 Error; - S32 DataSize; + LONG Error; + LONG DataSize; PCHAR cBuffer; PWCHAR wBuffer; - S32 i; + LONG i; if (ValueCell->CellSize >= 0 || ValueCell->Id != REG_VALUE_CELL_ID) { @@ -1461,16 +1461,16 @@ RegImportValue (PHBIN RootBin, static BOOL RegImportSubKey(PHBIN RootBin, PKEY_CELL KeyCell, - HKEY ParentKey) + FRLDRHKEY ParentKey) { PHASH_TABLE_CELL HashCell; PKEY_CELL SubKeyCell; PVALUE_LIST_CELL ValueListCell; PVALUE_CELL ValueCell = NULL; PCHAR cName; - HKEY SubKey; - S32 Error; - U32 i; + FRLDRHKEY SubKey; + LONG Error; + ULONG i; DbgPrint((DPRINT_REGISTRY, "KeyCell: %x\n", KeyCell)); @@ -1548,16 +1548,16 @@ RegImportSubKey(PHBIN RootBin, BOOL RegImportBinaryHive(PCHAR ChunkBase, - U32 ChunkSize) + ULONG ChunkSize) { PHIVE_HEADER HiveHeader; PHBIN RootBin; PKEY_CELL KeyCell; PHASH_TABLE_CELL HashCell; PKEY_CELL SubKeyCell; - HKEY SystemKey; - U32 i; - S32 Error; + FRLDRHKEY SystemKey; + ULONG i; + LONG Error; DbgPrint((DPRINT_REGISTRY, "RegImportBinaryHive(%x, %u) called\n",ChunkBase,ChunkSize)); @@ -1569,7 +1569,7 @@ RegImportBinaryHive(PCHAR ChunkBase, return FALSE; } - RootBin = (PHBIN)((U32)HiveHeader + REG_BLOCK_SIZE); + RootBin = (PHBIN)((ULONG)HiveHeader + REG_BLOCK_SIZE); DbgPrint((DPRINT_REGISTRY, "RootBin: %x\n", RootBin)); if (RootBin->HeaderId != REG_BIN_ID || RootBin->BinSize == 0) { @@ -1577,7 +1577,7 @@ RegImportBinaryHive(PCHAR ChunkBase, return FALSE; } - KeyCell = (PKEY_CELL)((U32)RootBin + REG_HBIN_DATA_OFFSET); + KeyCell = (PKEY_CELL)((ULONG)RootBin + REG_HBIN_DATA_OFFSET); DbgPrint((DPRINT_REGISTRY, "KeyCell: %x\n", KeyCell)); DbgPrint((DPRINT_REGISTRY, "KeyCell->CellSize: %x\n", KeyCell->CellSize)); DbgPrint((DPRINT_REGISTRY, "KeyCell->Id: %x\n", KeyCell->Id)); @@ -1603,14 +1603,14 @@ RegImportBinaryHive(PCHAR ChunkBase, /* Enumerate and add subkeys */ if (KeyCell->NumberOfSubKeys > 0) { - HashCell = (PHASH_TABLE_CELL)((U32)RootBin + KeyCell->HashTableOffset); + HashCell = (PHASH_TABLE_CELL)((ULONG)RootBin + KeyCell->HashTableOffset); DbgPrint((DPRINT_REGISTRY, "HashCell: %x\n", HashCell)); for (i = 0; i < KeyCell->NumberOfSubKeys; i++) { DbgPrint((DPRINT_REGISTRY, "KeyOffset[%d]: %x\n", i, HashCell->Table[i].KeyOffset)); - SubKeyCell = (PKEY_CELL)((U32)RootBin + HashCell->Table[i].KeyOffset); + SubKeyCell = (PKEY_CELL)((ULONG)RootBin + HashCell->Table[i].KeyOffset); DbgPrint((DPRINT_REGISTRY, "SubKeyCell[%d]: %x\n", i, SubKeyCell)); @@ -1626,7 +1626,7 @@ RegImportBinaryHive(PCHAR ChunkBase, BOOL RegExportBinaryHive(PCHAR KeyName, PCHAR ChunkBase, - U32* ChunkSize) + ULONG* ChunkSize) { PREGISTRY_HIVE Hive; diff --git a/reactos/boot/freeldr/freeldr/reactos/reactos.c b/reactos/boot/freeldr/freeldr/reactos/reactos.c index 77f5a39f050..427f34e6c23 100644 --- a/reactos/boot/freeldr/freeldr/reactos/reactos.c +++ b/reactos/boot/freeldr/freeldr/reactos/reactos.c @@ -1,42 +1,19 @@ /* - * FreeLoader - * - * Copyright (C) 1998-2003 Brian Palmer - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: Freeloader + * FILE: boot/freeldr/freeldr/reactos/rosboot.c + * PURPOSE: ReactOS Loader + * PROGRAMMERS: Alex Ionescu (alex@relsoft.net) */ #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - +#include #include #include "registry.h" - #define NDEBUG +#include #define IsRecognizedPartition(P) \ ((P) == PARTITION_FAT_12 || \ @@ -48,49 +25,52 @@ (P) == PARTITION_FAT32_XINT13 || \ (P) == PARTITION_XINT13) -static BOOL -LoadKernel(PCHAR szFileName, int nPos) +BOOL +STDCALL +FrLdrLoadKernel(PCHAR szFileName, + INT nPos) { - PFILE FilePointer; - PCHAR szShortName; - char szBuffer[256]; + PFILE FilePointer; + PCHAR szShortName; + CHAR szBuffer[256]; - szShortName = strrchr(szFileName, '\\'); - if (szShortName == NULL) - szShortName = szFileName; - else - szShortName = szShortName + 1; - - FilePointer = FsOpenFile(szFileName); - if (FilePointer == NULL) - { - strcpy(szBuffer, szShortName); - strcat(szBuffer, " not found."); - UiMessageBox(szBuffer); - return(FALSE); + /* Extract Kernel filename without path */ + szShortName = strrchr(szFileName, '\\'); + if (szShortName == NULL) { + + /* No path, leave it alone */ + szShortName = szFileName; + + } else { + + /* Skip the path */ + szShortName = szShortName + 1; } - /* - * Update the status bar with the current file - */ - strcpy(szBuffer, "Reading "); - strcat(szBuffer, szShortName); - UiDrawStatusText(szBuffer); + /* Open the Kernel */ + FilePointer = FsOpenFile(szFileName); + + /* Make sure it worked */ + if (FilePointer == NULL) { + + /* Return failure on the short name */ + strcpy(szBuffer, szShortName); + strcat(szBuffer, " not found."); + UiMessageBox(szBuffer); + return(FALSE); + } - /* - * Load the kernel - */ - MultiBootLoadKernel(FilePointer); + /* Update the status bar with the current file */ + strcpy(szBuffer, "Reading "); + strcat(szBuffer, szShortName); + UiDrawStatusText(szBuffer); - UiDrawProgressBarCenter(nPos, 100, "Loading ReactOS..."); + /* Do the actual loading */ + FrLdrMapKernel(FilePointer); - return(TRUE); -} - -static PVOID -FreeldrAllocMem(ULONG_PTR Size) -{ - return MmAllocateMemory((U32) Size); + /* Update Processbar and return success */ + UiDrawProgressBarCenter(nPos, 100, "Loading ReactOS..."); + return(TRUE); } static VOID @@ -99,21 +79,26 @@ FreeldrFreeMem(PVOID Area) MmFreeMemory(Area); } +static PVOID +FreeldrAllocMem(ULONG_PTR Size) +{ + return MmAllocateMemory((ULONG) Size); +} + static BOOLEAN FreeldrReadFile(PVOID FileContext, PVOID Buffer, ULONG Size) { - U32 BytesRead; - - return FsReadFile((PFILE) FileContext, (U32) Size, &BytesRead, Buffer) + ULONG BytesRead; + + return FsReadFile((PFILE) FileContext, (ULONG) Size, &BytesRead, Buffer) && Size == BytesRead; } static BOOLEAN FreeldrSeekFile(PVOID FileContext, ULONG_PTR Position) { - FsSetFilePointer((PFILE) FileContext, (U32) Position); - - return TRUE; + FsSetFilePointer((PFILE) FileContext, (ULONG) Position); + return TRUE; } static BOOL @@ -128,8 +113,8 @@ LoadKernelSymbols(PCHAR szKernelName, int nPos) }; PFILE FilePointer; PROSSYM_INFO RosSymInfo; - U32 Size; - PVOID Base; + ULONG Size; + ULONG_PTR Base; RosSymInit(&FreeldrCallbacks); @@ -138,459 +123,463 @@ LoadKernelSymbols(PCHAR szKernelName, int nPos) { return FALSE; } - if (! RosSymCreateFromFile(FilePointer, &RosSymInfo)) { return FALSE; } - - Base = MultiBootCreateModule("NTOSKRNL.SYM"); + Base = FrLdrCreateModule("NTOSKRNL.SYM"); Size = RosSymGetRawDataLength(RosSymInfo); - RosSymGetRawData(RosSymInfo, Base); - MultiBootCloseModule(Base, Size); - + RosSymGetRawData(RosSymInfo, (PVOID)Base); + FrLdrCloseModule(Base, Size); RosSymDelete(RosSymInfo); - return TRUE; } - -static BOOL -LoadDriver(PCHAR szFileName, int nPos) + +BOOL +FrLdrLoadNlsFile(PCHAR szFileName, + PCHAR szModuleName) { - PFILE FilePointer; - char value[256]; - char *p; + PFILE FilePointer; + CHAR value[256]; + LPSTR p; - FilePointer = FsOpenFile(szFileName); - if (FilePointer == NULL) - { - strcpy(value, szFileName); - strcat(value, " not found."); - UiMessageBox(value); - return(FALSE); + /* Open the Driver */ + FilePointer = FsOpenFile(szFileName); + + /* Make sure we did */ + if (FilePointer == NULL) { + + /* Fail if file wasn't opened */ + strcpy(value, szFileName); + strcat(value, " not found."); + UiMessageBox(value); + return(FALSE); } - /* - * Update the status bar with the current file - */ - strcpy(value, "Reading "); - p = strrchr(szFileName, '\\'); - if (p == NULL) - strcat(value, szFileName); - else - strcat(value, p + 1); - UiDrawStatusText(value); + /* Update the status bar with the current file */ + strcpy(value, "Reading "); + p = strrchr(szFileName, '\\'); + if (p == NULL) { + + strcat(value, szFileName); + + } else { + + strcat(value, p + 1); + } + UiDrawStatusText(value); - /* - * Load the driver - */ - MultiBootLoadModule(FilePointer, szFileName, NULL); - - UiDrawProgressBarCenter(nPos, 100, "Loading ReactOS..."); - - return(TRUE); + /* Load the driver */ + FrLdrLoadModule(FilePointer, szModuleName, NULL); + return(TRUE); } - -static BOOL -LoadNlsFile(PCHAR szFileName, PCHAR szModuleName) +BOOL +FrLdrLoadNlsFiles(PCHAR szSystemRoot, + PCHAR szErrorOut) { - PFILE FilePointer; - char value[256]; - char *p; + LONG rc = ERROR_SUCCESS; + FRLDRHKEY hKey; + CHAR szIdBuffer[80]; + CHAR szNameBuffer[80]; + CHAR szFileName[256]; + ULONG BufferSize; - FilePointer = FsOpenFile(szFileName); - if (FilePointer == NULL) - { - strcpy(value, szFileName); - strcat(value, " not found."); - UiMessageBox(value); - return(FALSE); + /* open the codepage key */ + rc = RegOpenKey(NULL, + "\\Registry\\Machine\\SYSTEM\\CurrentControlSet\\Control\\NLS\\CodePage", + &hKey); + if (rc != ERROR_SUCCESS) { + + strcpy(szErrorOut, "Couldn't open CodePage registry key"); + return(FALSE); + } + + /* get ANSI codepage */ + BufferSize = 80; + rc = RegQueryValue(hKey, "ACP", NULL, (PUCHAR)szIdBuffer, &BufferSize); + if (rc != ERROR_SUCCESS) { + + strcpy(szErrorOut, "Couldn't get ACP NLS setting"); + return(FALSE); } - /* - * Update the status bar with the current file - */ - strcpy(value, "Reading "); - p = strrchr(szFileName, '\\'); - if (p == NULL) - strcat(value, szFileName); - else - strcat(value, p + 1); - UiDrawStatusText(value); + BufferSize = 80; + rc = RegQueryValue(hKey, szIdBuffer, NULL, (PUCHAR)szNameBuffer, &BufferSize); + if (rc != ERROR_SUCCESS) { + + strcpy(szErrorOut, "ACP NLS Setting exists, but isn't readable"); + return(FALSE); + } - /* - * Load the driver - */ - MultiBootLoadModule(FilePointer, szModuleName, NULL); + /* load ANSI codepage table */ + strcpy(szFileName, szSystemRoot); + strcat(szFileName, "system32\\"); + strcat(szFileName, szNameBuffer); + DbgPrint((DPRINT_REACTOS, "ANSI file: %s\n", szFileName)); + if (!FrLdrLoadNlsFile(szFileName, "ansi.nls")) { + + strcpy(szErrorOut, "Couldn't load ansi.nls"); + return(FALSE); + } - return(TRUE); + /* get OEM codepage */ + BufferSize = 80; + rc = RegQueryValue(hKey, "OEMCP", NULL, (PUCHAR)szIdBuffer, &BufferSize); + if (rc != ERROR_SUCCESS) { + + strcpy(szErrorOut, "Couldn't get OEMCP NLS setting"); + return(FALSE); + } + + BufferSize = 80; + rc = RegQueryValue(hKey, szIdBuffer, NULL, (PUCHAR)szNameBuffer, &BufferSize); + if (rc != ERROR_SUCCESS) { + + strcpy(szErrorOut, "OEMCP NLS setting exists, but isn't readable"); + return(FALSE); + } + + /* load OEM codepage table */ + strcpy(szFileName, szSystemRoot); + strcat(szFileName, "system32\\"); + strcat(szFileName, szNameBuffer); + DbgPrint((DPRINT_REACTOS, "Oem file: %s\n", szFileName)); + if (!FrLdrLoadNlsFile(szFileName, "oem.nls")) { + + strcpy(szErrorOut, "Couldn't load oem.nls"); + return(FALSE); + } + + /* open the language key */ + rc = RegOpenKey(NULL, + "\\Registry\\Machine\\SYSTEM\\CurrentControlSet\\Control\\NLS\\Language", + &hKey); + if (rc != ERROR_SUCCESS) { + + strcpy(szErrorOut, "Couldn't open Language registry key"); + return(FALSE); + } + + /* get the Unicode case table */ + BufferSize = 80; + rc = RegQueryValue(hKey, "Default", NULL, (PUCHAR)szIdBuffer, &BufferSize); + if (rc != ERROR_SUCCESS) { + + strcpy(szErrorOut, "Couldn't get Language Default setting"); + return(FALSE); + } + + BufferSize = 80; + rc = RegQueryValue(hKey, szIdBuffer, NULL, (PUCHAR)szNameBuffer, &BufferSize); + if (rc != ERROR_SUCCESS) { + + strcpy(szErrorOut, "Language Default setting exists, but isn't readable"); + return(FALSE); + } + + /* load Unicode case table */ + strcpy(szFileName, szSystemRoot); + strcat(szFileName, "system32\\"); + strcat(szFileName, szNameBuffer); + DbgPrint((DPRINT_REACTOS, "Casemap file: %s\n", szFileName)); + if (!FrLdrLoadNlsFile(szFileName, "casemap.nls")) { + + strcpy(szErrorOut, "casemap.nls"); + return(FALSE); + } + + return(TRUE); } - -static VOID -LoadBootDrivers(PCHAR szSystemRoot, int nPos) +BOOL +FrLdrLoadDriver(PCHAR szFileName, + INT nPos) { - S32 rc = 0; - HKEY hGroupKey, hOrderKey, hServiceKey, hDriverKey; - char GroupNameBuffer[512]; - char ServiceName[256]; - U32 OrderList[128]; - U32 BufferSize; - U32 Index; - U32 TagIndex; - char *GroupName; + PFILE FilePointer; + CHAR value[256]; + LPSTR p; - U32 ValueSize; - U32 ValueType; - U32 StartValue; - U32 TagValue; - UCHAR DriverGroup[256]; - U32 DriverGroupSize; + /* Open the Driver */ + FilePointer = FsOpenFile(szFileName); + + /* Make sure we did */ + if (FilePointer == NULL) { + + /* Fail if file wasn't opened */ + strcpy(value, szFileName); + strcat(value, " not found."); + UiMessageBox(value); + return(FALSE); + } - UCHAR ImagePath[256]; - UCHAR TempImagePath[256]; + /* Update the status bar with the current file */ + strcpy(value, "Reading "); + p = strrchr(szFileName, '\\'); + if (p == NULL) { + + strcat(value, szFileName); + + } else { + + strcat(value, p + 1); + + } + UiDrawStatusText(value); - /* get 'service group order' key */ - rc = RegOpenKey(NULL, - "\\Registry\\Machine\\SYSTEM\\CurrentControlSet\\Control\\ServiceGroupOrder", - &hGroupKey); - if (rc != ERROR_SUCCESS) - { - DbgPrint((DPRINT_REACTOS, "Failed to open the 'ServiceGroupOrder' key (rc %d)\n", (int)rc)); - return; + /* Load the driver */ + FrLdrLoadModule(FilePointer, szFileName, NULL); + + /* Update status and return */ + UiDrawProgressBarCenter(nPos, 100, "Loading ReactOS..."); + return(TRUE); +} + +VOID +FrLdrLoadBootDrivers(PCHAR szSystemRoot, + INT nPos) +{ + LONG rc = 0; + FRLDRHKEY hGroupKey, hOrderKey, hServiceKey, hDriverKey; + CHAR GroupNameBuffer[512]; + CHAR ServiceName[256]; + ULONG OrderList[128]; + ULONG BufferSize; + ULONG Index; + ULONG TagIndex; + LPSTR GroupName; + + ULONG ValueSize; + ULONG ValueType; + ULONG StartValue; + ULONG TagValue; + UCHAR DriverGroup[256]; + ULONG DriverGroupSize; + + UCHAR ImagePath[256]; + UCHAR TempImagePath[256]; + + /* get 'service group order' key */ + rc = RegOpenKey(NULL, + "\\Registry\\Machine\\SYSTEM\\CurrentControlSet\\Control\\ServiceGroupOrder", + &hGroupKey); + if (rc != ERROR_SUCCESS) { + + DbgPrint((DPRINT_REACTOS, "Failed to open the 'ServiceGroupOrder' key (rc %d)\n", (int)rc)); + return; } - /* get 'group order list' key */ - rc = RegOpenKey(NULL, - "\\Registry\\Machine\\SYSTEM\\CurrentControlSet\\Control\\GroupOrderList", - &hOrderKey); - if (rc != ERROR_SUCCESS) - { - DbgPrint((DPRINT_REACTOS, "Failed to open the 'GroupOrderList' key (rc %d)\n", (int)rc)); - return; + /* get 'group order list' key */ + rc = RegOpenKey(NULL, + "\\Registry\\Machine\\SYSTEM\\CurrentControlSet\\Control\\GroupOrderList", + &hOrderKey); + if (rc != ERROR_SUCCESS) { + + DbgPrint((DPRINT_REACTOS, "Failed to open the 'GroupOrderList' key (rc %d)\n", (int)rc)); + return; } - /* enumerate drivers */ - rc = RegOpenKey(NULL, - "\\Registry\\Machine\\SYSTEM\\CurrentControlSet\\Services", - &hServiceKey); - if (rc != ERROR_SUCCESS) - { - DbgPrint((DPRINT_REACTOS, "Failed to open the 'Services' key (rc %d)\n", (int)rc)); - return; + /* enumerate drivers */ + rc = RegOpenKey(NULL, + "\\Registry\\Machine\\SYSTEM\\CurrentControlSet\\Services", + &hServiceKey); + if (rc != ERROR_SUCCESS) { + + DbgPrint((DPRINT_REACTOS, "Failed to open the 'Services' key (rc %d)\n", (int)rc)); + return; } - BufferSize = sizeof(GroupNameBuffer); - rc = RegQueryValue(hGroupKey, "List", NULL, (PUCHAR)GroupNameBuffer, &BufferSize); - DbgPrint((DPRINT_REACTOS, "RegQueryValue(): rc %d\n", (int)rc)); - if (rc != ERROR_SUCCESS) - return; + /* Get the Name Group */ + BufferSize = sizeof(GroupNameBuffer); + rc = RegQueryValue(hGroupKey, "List", NULL, (PUCHAR)GroupNameBuffer, &BufferSize); + DbgPrint((DPRINT_REACTOS, "RegQueryValue(): rc %d\n", (int)rc)); + if (rc != ERROR_SUCCESS) return; + DbgPrint((DPRINT_REACTOS, "BufferSize: %d \n", (int)BufferSize)); + DbgPrint((DPRINT_REACTOS, "GroupNameBuffer: '%s' \n", GroupNameBuffer)); - DbgPrint((DPRINT_REACTOS, "BufferSize: %d \n", (int)BufferSize)); + /* Loop through each group */ + GroupName = GroupNameBuffer; + while (*GroupName) { + DbgPrint((DPRINT_REACTOS, "Driver group: '%s'\n", GroupName)); - DbgPrint((DPRINT_REACTOS, "GroupNameBuffer: '%s' \n", GroupNameBuffer)); - - GroupName = GroupNameBuffer; - while (*GroupName) - { - DbgPrint((DPRINT_REACTOS, "Driver group: '%s'\n", GroupName)); - - BufferSize = sizeof(OrderList); - rc = RegQueryValue(hOrderKey, GroupName, NULL, (PUCHAR)OrderList, &BufferSize); - if (rc != ERROR_SUCCESS) - { - OrderList[0] = 0; - } + /* Query the Order */ + BufferSize = sizeof(OrderList); + rc = RegQueryValue(hOrderKey, GroupName, NULL, (PUCHAR)OrderList, &BufferSize); + if (rc != ERROR_SUCCESS) OrderList[0] = 0; - for (TagIndex = 1; TagIndex <= OrderList[0]; TagIndex++) - { - /* enumerate all drivers */ - Index = 0; - while (TRUE) - { - ValueSize = sizeof(ServiceName); - rc = RegEnumKey(hServiceKey, Index, ServiceName, &ValueSize); - DbgPrint((DPRINT_REACTOS, "RegEnumKey(): rc %d\n", (int)rc)); - if (rc == ERROR_NO_MORE_ITEMS) - break; - if (rc != ERROR_SUCCESS) - return; - DbgPrint((DPRINT_REACTOS, "Service %d: '%s'\n", (int)Index, ServiceName)); + /* enumerate all drivers */ + for (TagIndex = 1; TagIndex <= OrderList[0]; TagIndex++) { + + Index = 0; + + while (TRUE) { + + /* Get the Driver's Name */ + ValueSize = sizeof(ServiceName); + rc = RegEnumKey(hServiceKey, Index, ServiceName, &ValueSize); + DbgPrint((DPRINT_REACTOS, "RegEnumKey(): rc %d\n", (int)rc)); + + /* Makre sure it's valid, and check if we're done */ + if (rc == ERROR_NO_MORE_ITEMS) break; + if (rc != ERROR_SUCCESS) return; + DbgPrint((DPRINT_REACTOS, "Service %d: '%s'\n", (int)Index, ServiceName)); - /* open driver Key */ - rc = RegOpenKey(hServiceKey, ServiceName, &hDriverKey); + /* open driver Key */ + rc = RegOpenKey(hServiceKey, ServiceName, &hDriverKey); - ValueSize = sizeof(U32); - rc = RegQueryValue(hDriverKey, "Start", &ValueType, (PUCHAR)&StartValue, &ValueSize); - DbgPrint((DPRINT_REACTOS, " Start: %x \n", (int)StartValue)); + /* Read the Start Value */ + ValueSize = sizeof(ULONG); + rc = RegQueryValue(hDriverKey, "Start", &ValueType, (PUCHAR)&StartValue, &ValueSize); + DbgPrint((DPRINT_REACTOS, " Start: %x \n", (int)StartValue)); - ValueSize = sizeof(U32); - rc = RegQueryValue(hDriverKey, "Tag", &ValueType, (PUCHAR)&TagValue, &ValueSize); - if (rc != ERROR_SUCCESS) - { - TagValue = (U32)-1; - } - DbgPrint((DPRINT_REACTOS, " Tag: %x \n", (int)TagValue)); - + /* Read the Tag */ + ValueSize = sizeof(ULONG); + rc = RegQueryValue(hDriverKey, "Tag", &ValueType, (PUCHAR)&TagValue, &ValueSize); + if (rc != ERROR_SUCCESS) TagValue = (ULONG)-1; + DbgPrint((DPRINT_REACTOS, " Tag: %x \n", (int)TagValue)); - DriverGroupSize = 256; - rc = RegQueryValue(hDriverKey, "Group", NULL, (PUCHAR)DriverGroup, &DriverGroupSize); - DbgPrint((DPRINT_REACTOS, " Group: '%s' \n", DriverGroup)); + /* Read the driver's group */ + DriverGroupSize = 256; + rc = RegQueryValue(hDriverKey, "Group", NULL, (PUCHAR)DriverGroup, &DriverGroupSize); + DbgPrint((DPRINT_REACTOS, " Group: '%s' \n", DriverGroup)); - if ((StartValue == 0) && (TagValue == OrderList[TagIndex]) &&(stricmp(DriverGroup, GroupName) == 0)) - { - ValueSize = 256; - rc = RegQueryValue(hDriverKey, - "ImagePath", - NULL, - (PUCHAR)TempImagePath, - &ValueSize); - if (rc != ERROR_SUCCESS) - { - DbgPrint((DPRINT_REACTOS, " ImagePath: not found\n")); - strcpy(ImagePath, szSystemRoot); - strcat(ImagePath, "system32\\drivers\\"); - strcat(ImagePath, ServiceName); - strcat(ImagePath, ".sys"); - } - else if (TempImagePath[0] != '\\') - { - strcpy(ImagePath, szSystemRoot); - strcat(ImagePath, TempImagePath); - } - else - { - strcpy(ImagePath, TempImagePath); - DbgPrint((DPRINT_REACTOS, " ImagePath: '%s'\n", ImagePath)); - } - DbgPrint((DPRINT_REACTOS, " Loading driver: '%s'\n", ImagePath)); + /* Make sure it should be started */ + if ((StartValue == 0) && + (TagValue == OrderList[TagIndex]) && + (stricmp(DriverGroup, GroupName) == 0)) { - if (nPos < 100) - nPos += 5; + /* Get the Driver's Location */ + ValueSize = 256; + rc = RegQueryValue(hDriverKey, "ImagePath", NULL, (PUCHAR)TempImagePath, &ValueSize); + + /* Write the whole path if it suceeded, else prepare to fail */ + if (rc != ERROR_SUCCESS) { + DbgPrint((DPRINT_REACTOS, " ImagePath: not found\n")); + strcpy(ImagePath, szSystemRoot); + strcat(ImagePath, "system32\\drivers\\"); + strcat(ImagePath, ServiceName); + strcat(ImagePath, ".sys"); + } else if (TempImagePath[0] != '\\') { + strcpy(ImagePath, szSystemRoot); + strcat(ImagePath, TempImagePath); + } else { + strcpy(ImagePath, TempImagePath); + DbgPrint((DPRINT_REACTOS, " ImagePath: '%s'\n", ImagePath)); + } + + DbgPrint((DPRINT_REACTOS, " Loading driver: '%s'\n", ImagePath)); + + /* Update the position if needed */ + if (nPos < 100) nPos += 5; + + FrLdrLoadDriver(ImagePath, nPos); + + } else { + + DbgPrint((DPRINT_REACTOS, " Skipping driver '%s' with Start %d, Tag %d and Group '%s' (Current Tag %d, current group '%s')\n", + ServiceName, StartValue, TagValue, DriverGroup, OrderList[TagIndex], GroupName)); + } + + Index++; + } + } - LoadDriver(ImagePath, nPos); - } - else - { - DbgPrint((DPRINT_REACTOS, " Skipping driver '%s' with Start %d, Tag %d and Group '%s' (Current Tag %d, current group '%s')\n", - ServiceName, StartValue, TagValue, DriverGroup, OrderList[TagIndex], GroupName)); - } - Index++; - } - } + Index = 0; + while (TRUE) { + + /* Get the Driver's Name */ + ValueSize = sizeof(ServiceName); + rc = RegEnumKey(hServiceKey, Index, ServiceName, &ValueSize); + + DbgPrint((DPRINT_REACTOS, "RegEnumKey(): rc %d\n", (int)rc)); + if (rc == ERROR_NO_MORE_ITEMS) break; + if (rc != ERROR_SUCCESS) return; + DbgPrint((DPRINT_REACTOS, "Service %d: '%s'\n", (int)Index, ServiceName)); - Index = 0; - while (TRUE) - { - ValueSize = sizeof(ServiceName); - rc = RegEnumKey(hServiceKey, Index, ServiceName, &ValueSize); - DbgPrint((DPRINT_REACTOS, "RegEnumKey(): rc %d\n", (int)rc)); - if (rc == ERROR_NO_MORE_ITEMS) - break; - if (rc != ERROR_SUCCESS) - return; - DbgPrint((DPRINT_REACTOS, "Service %d: '%s'\n", (int)Index, ServiceName)); + /* open driver Key */ + rc = RegOpenKey(hServiceKey, ServiceName, &hDriverKey); - /* open driver Key */ - rc = RegOpenKey(hServiceKey, ServiceName, &hDriverKey); + /* Read the Start Value */ + ValueSize = sizeof(ULONG); + rc = RegQueryValue(hDriverKey, "Start", &ValueType, (PUCHAR)&StartValue, &ValueSize); + DbgPrint((DPRINT_REACTOS, " Start: %x \n", (int)StartValue)); - ValueSize = sizeof(U32); - rc = RegQueryValue(hDriverKey, "Start", &ValueType, (PUCHAR)&StartValue, &ValueSize); - DbgPrint((DPRINT_REACTOS, " Start: %x \n", (int)StartValue)); + /* Read the Tag */ + ValueSize = sizeof(ULONG); + rc = RegQueryValue(hDriverKey, "Tag", &ValueType, (PUCHAR)&TagValue, &ValueSize); + if (rc != ERROR_SUCCESS) TagValue = (ULONG)-1; + DbgPrint((DPRINT_REACTOS, " Tag: %x \n", (int)TagValue)); - ValueSize = sizeof(U32); - rc = RegQueryValue(hDriverKey, "Tag", &ValueType, (PUCHAR)&TagValue, &ValueSize); - if (rc != ERROR_SUCCESS) - { - TagValue = (U32)-1; - } - DbgPrint((DPRINT_REACTOS, " Tag: %x \n", (int)TagValue)); + /* Read the driver's group */ + DriverGroupSize = 256; + rc = RegQueryValue(hDriverKey, "Group", NULL, (PUCHAR)DriverGroup, &DriverGroupSize); + DbgPrint((DPRINT_REACTOS, " Group: '%s' \n", DriverGroup)); - DriverGroupSize = 256; - rc = RegQueryValue(hDriverKey, "Group", NULL, (PUCHAR)DriverGroup, &DriverGroupSize); - DbgPrint((DPRINT_REACTOS, " Group: '%s' \n", DriverGroup)); + for (TagIndex = 1; TagIndex <= OrderList[0]; TagIndex++) { + if (TagValue == OrderList[TagIndex]) break; + } + + if ((StartValue == 0) && + (TagIndex > OrderList[0]) && + (stricmp(DriverGroup, GroupName) == 0)) { + + ValueSize = 256; + rc = RegQueryValue(hDriverKey, "ImagePath", NULL, (PUCHAR)TempImagePath, &ValueSize); + if (rc != ERROR_SUCCESS) { + DbgPrint((DPRINT_REACTOS, " ImagePath: not found\n")); + strcpy(ImagePath, szSystemRoot); + strcat(ImagePath, "system32\\drivers\\"); + strcat(ImagePath, ServiceName); + strcat(ImagePath, ".sys"); + } else if (TempImagePath[0] != '\\') { + strcpy(ImagePath, szSystemRoot); + strcat(ImagePath, TempImagePath); + } else { + strcpy(ImagePath, TempImagePath); + DbgPrint((DPRINT_REACTOS, " ImagePath: '%s'\n", ImagePath)); + } + DbgPrint((DPRINT_REACTOS, " Loading driver: '%s'\n", ImagePath)); + + if (nPos < 100) nPos += 5; + + FrLdrLoadDriver(ImagePath, nPos); + + } else { + + DbgPrint((DPRINT_REACTOS, " Skipping driver '%s' with Start %d, Tag %d and Group '%s' (Current group '%s')\n", + ServiceName, StartValue, TagValue, DriverGroup, GroupName)); + } + + Index++; + } - for (TagIndex = 1; TagIndex <= OrderList[0]; TagIndex++) - { - if (TagValue == OrderList[TagIndex]) - break; - } - - if ((StartValue == 0) && (TagIndex > OrderList[0]) && (stricmp(DriverGroup, GroupName) == 0)) - { - ValueSize = 256; - rc = RegQueryValue(hDriverKey, - "ImagePath", - NULL, - (PUCHAR)TempImagePath, - &ValueSize); - if (rc != ERROR_SUCCESS) - { - DbgPrint((DPRINT_REACTOS, " ImagePath: not found\n")); - strcpy(ImagePath, szSystemRoot); - strcat(ImagePath, "system32\\drivers\\"); - strcat(ImagePath, ServiceName); - strcat(ImagePath, ".sys"); - } - else if (TempImagePath[0] != '\\') - { - strcpy(ImagePath, szSystemRoot); - strcat(ImagePath, TempImagePath); - } - else - { - strcpy(ImagePath, TempImagePath); - DbgPrint((DPRINT_REACTOS, " ImagePath: '%s'\n", ImagePath)); - } - DbgPrint((DPRINT_REACTOS, " Loading driver: '%s'\n", ImagePath)); - - if (nPos < 100) - nPos += 5; - - LoadDriver(ImagePath, nPos); - } - else - { - DbgPrint((DPRINT_REACTOS, " Skipping driver '%s' with Start %d, Tag %d and Group '%s' (Current group '%s')\n", - ServiceName, StartValue, TagValue, DriverGroup, GroupName)); - } - Index++; - } - - GroupName = GroupName + strlen(GroupName) + 1; + /* Move to the next group name */ + GroupName = GroupName + strlen(GroupName) + 1; } } - -static BOOL -LoadNlsFiles(PCHAR szSystemRoot, PCHAR szErrorOut) -{ - S32 rc = ERROR_SUCCESS; - HKEY hKey; - char szIdBuffer[80]; - char szNameBuffer[80]; - char szFileName[256]; - U32 BufferSize; - - /* open the codepage key */ - rc = RegOpenKey(NULL, - "\\Registry\\Machine\\SYSTEM\\CurrentControlSet\\Control\\NLS\\CodePage", - &hKey); - if (rc != ERROR_SUCCESS) { - strcpy(szErrorOut, "Couldn't open CodePage registry key"); - return(FALSE); - } - - - /* get ANSI codepage */ - BufferSize = 80; - rc = RegQueryValue(hKey, "ACP", NULL, (PUCHAR)szIdBuffer, &BufferSize); - if (rc != ERROR_SUCCESS) { - strcpy(szErrorOut, "Couldn't get ACP NLS setting"); - return(FALSE); - } - - BufferSize = 80; - rc = RegQueryValue(hKey, szIdBuffer, NULL, (PUCHAR)szNameBuffer, &BufferSize); - if (rc != ERROR_SUCCESS) { - strcpy(szErrorOut, "ACP NLS Setting exists, but isn't readable"); - return(FALSE); - } - - /* load ANSI codepage table */ - strcpy(szFileName, szSystemRoot); - strcat(szFileName, "system32\\"); - strcat(szFileName, szNameBuffer); - DbgPrint((DPRINT_REACTOS, "ANSI file: %s\n", szFileName)); - if (!LoadNlsFile(szFileName, "ansi.nls")) { - strcpy(szErrorOut, "Couldn't load ansi.nls"); - return(FALSE); - } - - /* get OEM codepage */ - BufferSize = 80; - rc = RegQueryValue(hKey, "OEMCP", NULL, (PUCHAR)szIdBuffer, &BufferSize); - if (rc != ERROR_SUCCESS) { - strcpy(szErrorOut, "Couldn't get OEMCP NLS setting"); - return(FALSE); - } - - BufferSize = 80; - rc = RegQueryValue(hKey, szIdBuffer, NULL, (PUCHAR)szNameBuffer, &BufferSize); - if (rc != ERROR_SUCCESS) { - strcpy(szErrorOut, "OEMCP NLS setting exists, but isn't readable"); - return(FALSE); - } - - /* load OEM codepage table */ - strcpy(szFileName, szSystemRoot); - strcat(szFileName, "system32\\"); - strcat(szFileName, szNameBuffer); - DbgPrint((DPRINT_REACTOS, "Oem file: %s\n", szFileName)); - if (!LoadNlsFile(szFileName, "oem.nls")) { - strcpy(szErrorOut, "Couldn't load oem.nls"); - return(FALSE); - } - - /* open the language key */ - rc = RegOpenKey(NULL, - "\\Registry\\Machine\\SYSTEM\\CurrentControlSet\\Control\\NLS\\Language", - &hKey); - if (rc != ERROR_SUCCESS) { - strcpy(szErrorOut, "Couldn't open Language registry key"); - return(FALSE); - } - - /* get the Unicode case table */ - BufferSize = 80; - rc = RegQueryValue(hKey, "Default", NULL, (PUCHAR)szIdBuffer, &BufferSize); - if (rc != ERROR_SUCCESS) { - strcpy(szErrorOut, "Couldn't get Language Default setting"); - return(FALSE); - } - - BufferSize = 80; - rc = RegQueryValue(hKey, szIdBuffer, NULL, (PUCHAR)szNameBuffer, &BufferSize); - if (rc != ERROR_SUCCESS) { - strcpy(szErrorOut, - "Language Default setting exists, but isn't readable"); - return(FALSE); - } - - /* load Unicode case table */ - strcpy(szFileName, szSystemRoot); - strcat(szFileName, "system32\\"); - strcat(szFileName, szNameBuffer); - DbgPrint((DPRINT_REACTOS, "Casemap file: %s\n", szFileName)); - if (!LoadNlsFile(szFileName, "casemap.nls")) { - strcpy(szErrorOut, "casemap.nls"); - return(FALSE); - } - - return(TRUE); -} - - -void +VOID LoadAndBootReactOS(PUCHAR OperatingSystemName) { PFILE FilePointer; - char name[1024]; - char value[1024]; - char szKernelName[1024]; - char szHalName[1024]; - char szFileName[1024]; - char szBootPath[256]; - int i; - char MsgBuffer[256]; - U32 SectionId; + CHAR name[1024]; + CHAR value[1024]; + CHAR szKernelName[1024]; + CHAR szHalName[1024]; + CHAR szFileName[1024]; + CHAR szBootPath[256]; + INT i; + CHAR MsgBuffer[256]; + ULONG SectionId; - char* Base; - U32 Size; + ULONG_PTR Base; + ULONG Size; PARTITION_TABLE_ENTRY PartitionTableEntry; - U32 rosPartition; + ULONG rosPartition; + + extern ULONG PageDirectoryStart; + extern ULONG PageDirectoryEnd; // // Open the operating system section @@ -606,35 +595,37 @@ LoadAndBootReactOS(PUCHAR OperatingSystemName) /* * Setup multiboot information structure */ - mb_info.flags = MB_INFO_FLAG_MEM_SIZE | MB_INFO_FLAG_BOOT_DEVICE | MB_INFO_FLAG_COMMAND_LINE | MB_INFO_FLAG_MODULES; - mb_info.boot_device = 0xffffffff; - mb_info.cmdline = (unsigned long)multiboot_kernel_cmdline; - mb_info.mods_count = 0; - mb_info.mods_addr = (unsigned long)multiboot_modules; - mb_info.mmap_length = (unsigned long)MachGetMemoryMap((PBIOS_MEMORY_MAP)(PVOID)&multiboot_memory_map, 32) * sizeof(memory_map_t); - if (mb_info.mmap_length) + LoaderBlock.Flags = MB_INFO_FLAG_MEM_SIZE | MB_INFO_FLAG_BOOT_DEVICE | MB_INFO_FLAG_COMMAND_LINE | MB_INFO_FLAG_MODULES; + LoaderBlock.PageDirectoryStart = (ULONG)&PageDirectoryStart; + LoaderBlock.PageDirectoryEnd = (ULONG)&PageDirectoryEnd; + LoaderBlock.BootDevice = 0xffffffff; + LoaderBlock.CommandLine = (unsigned long)multiboot_kernel_cmdline; + LoaderBlock.ModsCount = 0; + LoaderBlock.ModsAddr = (unsigned long)multiboot_modules; + LoaderBlock.MmapLength = (unsigned long)MachGetMemoryMap((PBIOS_MEMORY_MAP)(PVOID)&multiboot_memory_map, 32) * sizeof(memory_map_t); + if (LoaderBlock.MmapLength) { - mb_info.mmap_addr = (unsigned long)&multiboot_memory_map; - mb_info.flags |= MB_INFO_FLAG_MEM_SIZE | MB_INFO_FLAG_MEMORY_MAP; + LoaderBlock.MmapAddr = (unsigned long)&multiboot_memory_map; + LoaderBlock.Flags |= MB_INFO_FLAG_MEM_SIZE | MB_INFO_FLAG_MEMORY_MAP; multiboot_memory_map_descriptor_size = sizeof(memory_map_t); // GetBiosMemoryMap uses a fixed value of 24 - DbgPrint((DPRINT_REACTOS, "memory map length: %d\n", mb_info.mmap_length)); + DbgPrint((DPRINT_REACTOS, "memory map length: %d\n", LoaderBlock.MmapLength)); DbgPrint((DPRINT_REACTOS, "dumping memory map:\n")); - for (i=0; i<(mb_info.mmap_length/sizeof(memory_map_t)); i++) + for (i=0; i<(LoaderBlock.MmapLength/sizeof(memory_map_t)); i++) { if (MEMTYPE_USABLE == multiboot_memory_map[i].type && 0 == multiboot_memory_map[i].base_addr_low) { - mb_info.mem_lower = (multiboot_memory_map[i].base_addr_low + multiboot_memory_map[i].length_low) / 1024; - if (640 < mb_info.mem_lower) + LoaderBlock.MemLower = (multiboot_memory_map[i].base_addr_low + multiboot_memory_map[i].length_low) / 1024; + if (640 < LoaderBlock.MemLower) { - mb_info.mem_lower = 640; + LoaderBlock.MemLower = 640; } } if (MEMTYPE_USABLE == multiboot_memory_map[i].type && multiboot_memory_map[i].base_addr_low <= 1024 * 1024 && 1024 * 1024 <= multiboot_memory_map[i].base_addr_low + multiboot_memory_map[i].length_low) { - mb_info.mem_upper = (multiboot_memory_map[i].base_addr_low + multiboot_memory_map[i].length_low) / 1024 - 1024; + LoaderBlock.MemHigher = (multiboot_memory_map[i].base_addr_low + multiboot_memory_map[i].length_low) / 1024 - 1024; } DbgPrint((DPRINT_REACTOS, "start: %x\t size: %x\t type %d\n", multiboot_memory_map[i].base_addr_low, @@ -642,8 +633,8 @@ LoadAndBootReactOS(PUCHAR OperatingSystemName) multiboot_memory_map[i].type)); } } - DbgPrint((DPRINT_REACTOS, "low_mem = %d\n", mb_info.mem_lower)); - DbgPrint((DPRINT_REACTOS, "high_mem = %d\n", mb_info.mem_upper)); + DbgPrint((DPRINT_REACTOS, "low_mem = %d\n", LoaderBlock.MemLower)); + DbgPrint((DPRINT_REACTOS, "high_mem = %d\n", LoaderBlock.MemHigher)); /* * Initialize the registry @@ -715,8 +706,8 @@ LoadAndBootReactOS(PUCHAR OperatingSystemName) } /* Set boot drive and partition */ - ((char *)(&mb_info.boot_device))[0] = (char)BootDrive; - ((char *)(&mb_info.boot_device))[1] = (char)BootPartition; + ((LPSTR )(&LoaderBlock.BootDevice))[0] = (CHAR)BootDrive; + ((LPSTR )(&LoaderBlock.BootDevice))[1] = (CHAR)BootPartition; /* * Read the optional kernel parameters (if any) @@ -784,9 +775,8 @@ LoadAndBootReactOS(PUCHAR OperatingSystemName) strcat(szKernelName, value); } - if (!LoadKernel(szKernelName, 5)) - return; - + if (!FrLdrLoadKernel(szKernelName, 5)) return; + /* * Find the HAL image name * and try to load the kernel off the disk @@ -815,7 +805,7 @@ LoadAndBootReactOS(PUCHAR OperatingSystemName) strcat(szHalName, value); } - if (!LoadDriver(szHalName, 10)) + if (!FrLdrLoadDriver(szHalName, 10)) return; /* @@ -845,8 +835,8 @@ LoadAndBootReactOS(PUCHAR OperatingSystemName) /* * Load the System hive */ - Base = MultiBootLoadModule(FilePointer, szFileName, &Size); - if (Base == NULL || Size == 0) + Base = FrLdrLoadModule(FilePointer, szFileName, &Size); + if (Base == 0 || Size == 0) { UiMessageBox("Could not load the System hive!\n"); return; @@ -856,7 +846,7 @@ LoadAndBootReactOS(PUCHAR OperatingSystemName) /* * Import the loaded system hive */ - RegImportBinaryHive(Base, Size); + RegImportBinaryHive((PCHAR)Base, Size); /* * Initialize the 'CurrentControlSet' link @@ -868,16 +858,16 @@ LoadAndBootReactOS(PUCHAR OperatingSystemName) /* * Export the hardware hive */ - Base = MultiBootCreateModule ("HARDWARE"); - RegExportBinaryHive ("\\Registry\\Machine\\HARDWARE", Base, &Size); - MultiBootCloseModule (Base, Size); + Base = FrLdrCreateModule ("HARDWARE"); + RegExportBinaryHive ("\\Registry\\Machine\\HARDWARE", (PCHAR)Base, &Size); + FrLdrCloseModule (Base, Size); UiDrawProgressBarCenter(20, 100, "Loading ReactOS..."); /* * Load NLS files */ - if (!LoadNlsFiles(szBootPath, MsgBuffer)) + if (!FrLdrLoadNlsFiles(szBootPath, MsgBuffer)) { UiMessageBox(MsgBuffer); return; @@ -893,31 +883,15 @@ LoadAndBootReactOS(PUCHAR OperatingSystemName) /* * Load boot drivers */ - LoadBootDrivers(szBootPath, 40); - -#if 0 - /* - * Clear the screen and redraw the backdrop and status bar - */ - UiDrawBackdrop(); - UiDrawStatusText("Press any key to boot"); - - /* - * Wait for user - */ - strcpy(name, "Kernel and Drivers loaded.\nPress any key to boot "); - strcat(name, OperatingSystemName); - strcat(name, "."); - MessageBox(name); -#endif - + FrLdrLoadBootDrivers(szBootPath, 40); UiUnInitialize("Booting ReactOS..."); /* * Now boot the kernel */ DiskStopFloppyMotor(); - boot_reactos(); + MachVideoPrepareForReactOS(); + FrLdrStartup(0x2badb002); } #undef DbgPrint diff --git a/reactos/boot/freeldr/freeldr/reactos/registry.c b/reactos/boot/freeldr/freeldr/reactos/registry.c index 938ec3f116a..ffc0f1a56a1 100644 --- a/reactos/boot/freeldr/freeldr/reactos/registry.c +++ b/reactos/boot/freeldr/freeldr/reactos/registry.c @@ -26,18 +26,18 @@ #include -static HKEY RootKey; +static FRLDRHKEY RootKey; VOID RegInitializeRegistry (VOID) { #if 0 - HKEY TestKey; + FRLDRHKEY TestKey; #endif /* Create root key */ - RootKey = (HKEY) MmAllocateMemory (sizeof(KEY)); + RootKey = (FRLDRHKEY) MmAllocateMemory (sizeof(KEY)); InitializeListHead (&RootKey->SubKeyList); InitializeListHead (&RootKey->ValueList); @@ -94,19 +94,19 @@ RegInitializeRegistry (VOID) } -S32 +LONG RegInitCurrentControlSet(BOOL LastKnownGood) { CHAR ControlSetKeyName[80]; - HKEY SelectKey; - HKEY SystemKey; - HKEY ControlSetKey; - HKEY LinkKey; - U32 CurrentSet = 0; - U32 DefaultSet = 0; - U32 LastKnownGoodSet = 0; - U32 DataSize; - S32 Error; + FRLDRHKEY SelectKey; + FRLDRHKEY SystemKey; + FRLDRHKEY ControlSetKey; + FRLDRHKEY LinkKey; + ULONG CurrentSet = 0; + ULONG DefaultSet = 0; + ULONG LastKnownGoodSet = 0; + ULONG DataSize; + LONG Error; Error = RegOpenKey(NULL, "\\Registry\\Machine\\SYSTEM\\Select", @@ -117,7 +117,7 @@ RegInitCurrentControlSet(BOOL LastKnownGood) return(Error); } - DataSize = sizeof(U32); + DataSize = sizeof(ULONG); Error = RegQueryValue(SelectKey, "Default", NULL, @@ -129,7 +129,7 @@ RegInitCurrentControlSet(BOOL LastKnownGood) return(Error); } - DataSize = sizeof(U32); + DataSize = sizeof(ULONG); Error = RegQueryValue(SelectKey, "LastKnownGood", NULL, @@ -204,15 +204,15 @@ RegInitCurrentControlSet(BOOL LastKnownGood) } -S32 -RegCreateKey(HKEY ParentKey, +LONG +RegCreateKey(FRLDRHKEY ParentKey, PCHAR KeyName, - PHKEY Key) + PFRLDRHKEY Key) { PLIST_ENTRY Ptr; - HKEY SearchKey = INVALID_HANDLE_VALUE; - HKEY CurrentKey; - HKEY NewKey; + FRLDRHKEY SearchKey = INVALID_HANDLE_VALUE; + FRLDRHKEY CurrentKey; + FRLDRHKEY NewKey; PCHAR p; PCHAR name; int subkeyLength; @@ -237,7 +237,7 @@ RegCreateKey(HKEY ParentKey, /* Check whether current key is a link */ if (CurrentKey->DataType == REG_LINK) { - CurrentKey = (HKEY)CurrentKey->Data; + CurrentKey = (FRLDRHKEY)CurrentKey->Data; } while (*KeyName != 0) @@ -279,7 +279,7 @@ RegCreateKey(HKEY ParentKey, if (Ptr == &CurrentKey->SubKeyList) { /* no key found -> create new subkey */ - NewKey = (HKEY)MmAllocateMemory(sizeof(KEY)); + NewKey = (FRLDRHKEY)MmAllocateMemory(sizeof(KEY)); if (NewKey == NULL) return(ERROR_OUTOFMEMORY); @@ -315,7 +315,7 @@ RegCreateKey(HKEY ParentKey, /* Check whether current key is a link */ if (CurrentKey->DataType == REG_LINK) { - CurrentKey = (HKEY)CurrentKey->Data; + CurrentKey = (FRLDRHKEY)CurrentKey->Data; } } @@ -329,8 +329,8 @@ RegCreateKey(HKEY ParentKey, } -S32 -RegDeleteKey(HKEY Key, +LONG +RegDeleteKey(FRLDRHKEY Key, PCHAR Name) { @@ -344,16 +344,16 @@ RegDeleteKey(HKEY Key, } -S32 -RegEnumKey(HKEY Key, - U32 Index, +LONG +RegEnumKey(FRLDRHKEY Key, + ULONG Index, PCHAR Name, - U32* NameSize) + ULONG* NameSize) { PLIST_ENTRY Ptr; - HKEY SearchKey; - U32 Count = 0; - U32 Size; + FRLDRHKEY SearchKey; + ULONG Count = 0; + ULONG Size; Ptr = Key->SubKeyList.Flink; while (Ptr != &Key->SubKeyList) @@ -382,14 +382,14 @@ RegEnumKey(HKEY Key, } -S32 -RegOpenKey(HKEY ParentKey, +LONG +RegOpenKey(FRLDRHKEY ParentKey, PCHAR KeyName, - PHKEY Key) + PFRLDRHKEY Key) { PLIST_ENTRY Ptr; - HKEY SearchKey = INVALID_HANDLE_VALUE; - HKEY CurrentKey; + FRLDRHKEY SearchKey = INVALID_HANDLE_VALUE; + FRLDRHKEY CurrentKey; PCHAR p; PCHAR name; int subkeyLength; @@ -416,7 +416,7 @@ RegOpenKey(HKEY ParentKey, /* Check whether current key is a link */ if (CurrentKey->DataType == REG_LINK) { - CurrentKey = (HKEY)CurrentKey->Data; + CurrentKey = (FRLDRHKEY)CurrentKey->Data; } while (*KeyName != 0) @@ -468,7 +468,7 @@ RegOpenKey(HKEY ParentKey, /* Check whether current key is a link */ if (CurrentKey->DataType == REG_LINK) { - CurrentKey = (HKEY)CurrentKey->Data; + CurrentKey = (FRLDRHKEY)CurrentKey->Data; } } @@ -482,12 +482,12 @@ RegOpenKey(HKEY ParentKey, } -S32 -RegSetValue(HKEY Key, +LONG +RegSetValue(FRLDRHKEY Key, PCHAR ValueName, - U32 Type, + ULONG Type, PUCHAR Data, - U32 DataSize) + ULONG DataSize) { PLIST_ENTRY Ptr; PVALUE Value = NULL; @@ -583,14 +583,14 @@ RegSetValue(HKEY Key, } -S32 -RegQueryValue(HKEY Key, +LONG +RegQueryValue(FRLDRHKEY Key, PCHAR ValueName, - U32* Type, + ULONG* Type, PUCHAR Data, - U32* DataSize) + ULONG* DataSize) { - U32 Size; + ULONG Size; PLIST_ENTRY Ptr; PVALUE Value = NULL; @@ -670,8 +670,8 @@ RegQueryValue(HKEY Key, } -S32 -RegDeleteValue(HKEY Key, +LONG +RegDeleteValue(FRLDRHKEY Key, PCHAR ValueName) { PLIST_ENTRY Ptr; @@ -727,18 +727,18 @@ RegDeleteValue(HKEY Key, } -S32 -RegEnumValue(HKEY Key, - U32 Index, +LONG +RegEnumValue(FRLDRHKEY Key, + ULONG Index, PCHAR ValueName, - U32* NameSize, - U32* Type, + ULONG* NameSize, + ULONG* Type, PUCHAR Data, - U32* DataSize) + ULONG* DataSize) { PLIST_ENTRY Ptr; PVALUE Value; - U32 Count = 0; + ULONG Count = 0; if (Key->Data != NULL) { @@ -813,15 +813,15 @@ RegEnumValue(HKEY Key, } -U32 -RegGetSubKeyCount (HKEY Key) +ULONG +RegGetSubKeyCount (FRLDRHKEY Key) { return Key->SubKeyCount; } -U32 -RegGetValueCount (HKEY Key) +ULONG +RegGetValueCount (FRLDRHKEY Key) { if (Key->DataSize != 0) return Key->ValueCount + 1; diff --git a/reactos/boot/freeldr/freeldr/reactos/registry.h b/reactos/boot/freeldr/freeldr/reactos/registry.h index 4cfdb0fdc4a..6876301f78d 100644 --- a/reactos/boot/freeldr/freeldr/reactos/registry.h +++ b/reactos/boot/freeldr/freeldr/reactos/registry.h @@ -24,30 +24,23 @@ #define INVALID_HANDLE_VALUE NULL -typedef struct _LIST_ENTRY -{ - struct _LIST_ENTRY *Flink; - struct _LIST_ENTRY *Blink; -} LIST_ENTRY, *PLIST_ENTRY; - - typedef struct _REG_KEY { LIST_ENTRY KeyList; LIST_ENTRY SubKeyList; LIST_ENTRY ValueList; - U32 SubKeyCount; - U32 ValueCount; + ULONG SubKeyCount; + ULONG ValueCount; - U32 NameSize; + ULONG NameSize; PUCHAR Name; /* default data */ - U32 DataType; - U32 DataSize; + ULONG DataType; + ULONG DataSize; PUCHAR Data; -} KEY, *HKEY, **PHKEY; +} KEY, *FRLDRHKEY, **PFRLDRHKEY; typedef struct _REG_VALUE @@ -55,18 +48,17 @@ typedef struct _REG_VALUE LIST_ENTRY ValueList; /* value name */ - U32 NameSize; + ULONG NameSize; PUCHAR Name; /* value data */ - U32 DataType; - U32 DataSize; + ULONG DataType; + ULONG DataSize; PUCHAR Data; } VALUE, *PVALUE; #define ERROR_SUCCESS 0L -#define ERROR_PATH_NOT_FOUND 2L #define ERROR_OUTOFMEMORY 14L #define ERROR_INVALID_PARAMETER 87L #define ERROR_MORE_DATA 234L @@ -149,22 +141,6 @@ typedef struct _REG_VALUE assert((ListEntry)->Flink->Blink == (ListEntry)); \ } -/* - * BOOLEAN - * IsListEmpty ( - * PLIST_ENTRY ListHead - * ); - * - * FUNCTION: - * Checks if a double linked list is empty - * - * ARGUMENTS: - * ListHead = Head of the list -*/ -#define IsListEmpty(ListHead) \ - ((ListHead)->Flink == (ListHead)) - - /* *VOID *RemoveEntryList ( @@ -194,23 +170,6 @@ typedef struct _REG_VALUE (ListEntry)->Blink = NULL; \ } -/* - * PURPOSE: Returns the byte offset of a field within a structure - */ -#define FIELD_OFFSET(Type,Field) (S32)(&(((Type *)(0))->Field)) - -/* - * PURPOSE: Returns the base address structure if the caller knows the - * address of a field within the structure - * ARGUMENTS: - * Address = address of the field - * Type = Type of the whole structure - * Field = Name of the field whose address is none - */ -#define CONTAINING_RECORD(Address,Type,Field) \ - (Type *)(((S32)Address) - FIELD_OFFSET(Type,Field)) - - #define REG_NONE 0 #define REG_SZ 1 #define REG_EXPAND_SZ 2 @@ -229,73 +188,73 @@ typedef struct _REG_VALUE VOID RegInitializeRegistry(VOID); -S32 +LONG RegInitCurrentControlSet(BOOL LastKnownGood); -S32 -RegCreateKey(HKEY ParentKey, +LONG +RegCreateKey(FRLDRHKEY ParentKey, PCHAR KeyName, - PHKEY Key); + PFRLDRHKEY Key); -S32 -RegDeleteKey(HKEY Key, +LONG +RegDeleteKey(FRLDRHKEY Key, PCHAR Name); -S32 -RegEnumKey(HKEY Key, - U32 Index, +LONG +RegEnumKey(FRLDRHKEY Key, + ULONG Index, PCHAR Name, - U32* NameSize); + ULONG* NameSize); -S32 -RegOpenKey(HKEY ParentKey, +LONG +RegOpenKey(FRLDRHKEY ParentKey, PCHAR KeyName, - PHKEY Key); + PFRLDRHKEY Key); -S32 -RegSetValue(HKEY Key, +LONG +RegSetValue(FRLDRHKEY Key, PCHAR ValueName, - U32 Type, + ULONG Type, PUCHAR Data, - U32 DataSize); + ULONG DataSize); -S32 -RegQueryValue(HKEY Key, +LONG +RegQueryValue(FRLDRHKEY Key, PCHAR ValueName, - U32* Type, + ULONG* Type, PUCHAR Data, - U32* DataSize); + ULONG* DataSize); -S32 -RegDeleteValue(HKEY Key, +LONG +RegDeleteValue(FRLDRHKEY Key, PCHAR ValueName); -S32 -RegEnumValue(HKEY Key, - U32 Index, +LONG +RegEnumValue(FRLDRHKEY Key, + ULONG Index, PCHAR ValueName, - U32* NameSize, - U32* Type, + ULONG* NameSize, + ULONG* Type, PUCHAR Data, - U32* DataSize); + ULONG* DataSize); -U32 -RegGetSubKeyCount (HKEY Key); +ULONG +RegGetSubKeyCount (FRLDRHKEY Key); -U32 -RegGetValueCount (HKEY Key); +ULONG +RegGetValueCount (FRLDRHKEY Key); BOOL RegImportBinaryHive (PCHAR ChunkBase, - U32 ChunkSize); + ULONG ChunkSize); BOOL RegExportBinaryHive (PCHAR KeyName, PCHAR ChunkBase, - U32* ChunkSize); + ULONG* ChunkSize); #endif /* __REGISTRY_H */ diff --git a/reactos/boot/freeldr/freeldr/reactos/setupldr.c b/reactos/boot/freeldr/freeldr/reactos/setupldr.c index 23db7fd56ea..50c9c1cc581 100644 --- a/reactos/boot/freeldr/freeldr/reactos/setupldr.c +++ b/reactos/boot/freeldr/freeldr/reactos/setupldr.c @@ -97,7 +97,7 @@ LoadKernel(PCHAR szSourcePath, PCHAR szFileName) /* * Load the kernel */ - MultiBootLoadKernel(FilePointer); + FrLdrMapKernel(FilePointer); return(TRUE); } @@ -162,7 +162,7 @@ LoadDriver(PCHAR szSourcePath, PCHAR szFileName) #endif /* Load the driver */ - MultiBootLoadModule(FilePointer, szFileName, NULL); + FrLdrLoadModule(FilePointer, szFileName, NULL); return(TRUE); } @@ -227,7 +227,7 @@ LoadNlsFile(PCHAR szSourcePath, PCHAR szFileName, PCHAR szModuleName) #endif /* Load the driver */ - MultiBootLoadModule(FilePointer, szModuleName, NULL); + FrLdrLoadModule(FilePointer, szModuleName, NULL); return(TRUE); } @@ -235,44 +235,44 @@ LoadNlsFile(PCHAR szSourcePath, PCHAR szFileName, PCHAR szModuleName) VOID RunLoader(VOID) { - PVOID Base; - U32 Size; + ULONG_PTR Base; + ULONG Size; char *SourcePath; char *LoadOptions; int i; HINF InfHandle; - U32 ErrorLine; + ULONG ErrorLine; INFCONTEXT InfContext; /* Setup multiboot information structure */ - mb_info.flags = MB_INFO_FLAG_BOOT_DEVICE | MB_INFO_FLAG_COMMAND_LINE | MB_INFO_FLAG_MODULES; - mb_info.boot_device = 0xffffffff; - mb_info.cmdline = (unsigned long)multiboot_kernel_cmdline; - mb_info.mods_count = 0; - mb_info.mods_addr = (unsigned long)multiboot_modules; - mb_info.mmap_length = (unsigned long)MachGetMemoryMap((PBIOS_MEMORY_MAP)(PVOID)&multiboot_memory_map, 32) * sizeof(memory_map_t); - if (mb_info.mmap_length) + LoaderBlock.Flags = MB_INFO_FLAG_BOOT_DEVICE | MB_INFO_FLAG_COMMAND_LINE | MB_INFO_FLAG_MODULES; + LoaderBlock.BootDevice = 0xffffffff; + LoaderBlock.CommandLine = (unsigned long)multiboot_kernel_cmdline; + LoaderBlock.ModsCount = 0; + LoaderBlock.ModsAddr = (unsigned long)multiboot_modules; + LoaderBlock.MmapLength = (unsigned long)MachGetMemoryMap((PBIOS_MEMORY_MAP)(PVOID)&multiboot_memory_map, 32) * sizeof(memory_map_t); + if (LoaderBlock.MmapLength) { - mb_info.mmap_addr = (unsigned long)&multiboot_memory_map; - mb_info.flags |= MB_INFO_FLAG_MEM_SIZE | MB_INFO_FLAG_MEMORY_MAP; + LoaderBlock.MmapAddr = (unsigned long)&multiboot_memory_map; + LoaderBlock.Flags |= MB_INFO_FLAG_MEM_SIZE | MB_INFO_FLAG_MEMORY_MAP; multiboot_memory_map_descriptor_size = sizeof(memory_map_t); // GetBiosMemoryMap uses a fixed value of 24 - for (i = 0; i < (mb_info.mmap_length / sizeof(memory_map_t)); i++) + for (i = 0; i < (LoaderBlock.MmapLength / sizeof(memory_map_t)); i++) { if (MEMTYPE_USABLE == multiboot_memory_map[i].type && 0 == multiboot_memory_map[i].base_addr_low) { - mb_info.mem_lower = (multiboot_memory_map[i].base_addr_low + multiboot_memory_map[i].length_low) / 1024; - if (640 < mb_info.mem_lower) + LoaderBlock.MemLower = (multiboot_memory_map[i].base_addr_low + multiboot_memory_map[i].length_low) / 1024; + if (640 < LoaderBlock.MemLower) { - mb_info.mem_lower = 640; + LoaderBlock.MemLower = 640; } } if (MEMTYPE_USABLE == multiboot_memory_map[i].type && multiboot_memory_map[i].base_addr_low <= 1024 * 1024 && 1024 * 1024 <= multiboot_memory_map[i].base_addr_low + multiboot_memory_map[i].length_low) { - mb_info.mem_upper = (multiboot_memory_map[i].base_addr_low + multiboot_memory_map[i].length_low) / 1024 - 1024; + LoaderBlock.MemHigher = (multiboot_memory_map[i].base_addr_low + multiboot_memory_map[i].length_low) / 1024 - 1024; } #if 0 printf("start: %x\t size: %x\t type %d\n", @@ -283,8 +283,8 @@ VOID RunLoader(VOID) } } #if 0 - printf("low_mem = %d\n", mb_info.mem_lower); - printf("high_mem = %d\n", mb_info.mem_upper); + printf("low_mem = %d\n", LoaderBlock.MemLower); + printf("high_mem = %d\n", LoaderBlock.MemHigher); MachConsGetCh(); #endif @@ -308,8 +308,8 @@ VOID RunLoader(VOID) #endif /* set boot drive and partition */ - ((char *)(&mb_info.boot_device))[0] = (char)BootDrive; - ((char *)(&mb_info.boot_device))[1] = (char)BootPartition; + ((char *)(&LoaderBlock.BootDevice))[0] = (char)BootDrive; + ((char *)(&LoaderBlock.BootDevice))[1] = (char)BootPartition; /* Open boot drive */ @@ -383,9 +383,9 @@ VOID RunLoader(VOID) /* Export the hardware hive */ - Base = MultiBootCreateModule ("HARDWARE"); - RegExportBinaryHive ("\\Registry\\Machine\\HARDWARE", Base, &Size); - MultiBootCloseModule (Base, Size); + Base = FrLdrCreateModule ("HARDWARE"); + RegExportBinaryHive ("\\Registry\\Machine\\HARDWARE", (PVOID)Base, &Size); + FrLdrCloseModule (Base, Size); #if 0 printf("Base: %x\n", Base); @@ -571,7 +571,8 @@ for(;;); /* Now boot the kernel */ DiskStopFloppyMotor(); - boot_reactos(); + MachVideoPrepareForReactOS(); + FrLdrStartup(0x2badb002); } /* EOF */ diff --git a/reactos/boot/freeldr/freeldr/rtl/list.c b/reactos/boot/freeldr/freeldr/rtl/list.c index 962289b451f..30a2d6ea33c 100644 --- a/reactos/boot/freeldr/freeldr/rtl/list.c +++ b/reactos/boot/freeldr/freeldr/rtl/list.c @@ -92,9 +92,9 @@ BOOL RtlListIsEmpty(PLIST_ITEM ListHead) return (ListHead->ListNext == NULL); } -U32 RtlListCountEntries(PLIST_ITEM ListHead) +ULONG RtlListCountEntries(PLIST_ITEM ListHead) { - U32 Count = 0; + ULONG Count = 0; while (ListHead != NULL) { diff --git a/reactos/boot/freeldr/freeldr/rtl/string.c b/reactos/boot/freeldr/freeldr/rtl/string.c index 369ae54e6ac..7f5c76e639c 100644 --- a/reactos/boot/freeldr/freeldr/rtl/string.c +++ b/reactos/boot/freeldr/freeldr/rtl/string.c @@ -19,7 +19,7 @@ #include -int strlen(char *str) +size_t strlen(const char *str) { int len; @@ -28,7 +28,7 @@ int strlen(char *str) return len; } -char *strcpy(char *dest, char *src) +char *strcpy(char *dest, const char *src) { char *ret = dest; @@ -39,7 +39,7 @@ char *strcpy(char *dest, char *src) return ret; } -char *strncpy(char *dest, char *src, size_t count) +char *strncpy(char *dest, const char *src, size_t count) { char *ret = dest; @@ -52,7 +52,7 @@ char *strncpy(char *dest, char *src, size_t count) return ret; } -char *strcat(char *dest, char *src) +char *strcat(char *dest, const char *src) { char *ret = dest; diff --git a/reactos/boot/freeldr/freeldr/ui/gui.c b/reactos/boot/freeldr/freeldr/ui/gui.c index 0cdb3ae8ab6..f6bebf98506 100644 --- a/reactos/boot/freeldr/freeldr/ui/gui.c +++ b/reactos/boot/freeldr/freeldr/ui/gui.c @@ -30,19 +30,19 @@ VOID GuiDrawBackdrop(VOID) { } -VOID GuiFillArea(U32 Left, U32 Top, U32 Right, U32 Bottom, UCHAR FillChar, UCHAR Attr /* Color Attributes */) +VOID GuiFillArea(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, UCHAR FillChar, UCHAR Attr /* Color Attributes */) { } -VOID GuiDrawShadow(U32 Left, U32 Top, U32 Right, U32 Bottom) +VOID GuiDrawShadow(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom) { } -VOID GuiDrawBox(U32 Left, U32 Top, U32 Right, U32 Bottom, UCHAR VertStyle, UCHAR HorzStyle, BOOL Fill, BOOL Shadow, UCHAR Attr) +VOID GuiDrawBox(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, UCHAR VertStyle, UCHAR HorzStyle, BOOL Fill, BOOL Shadow, UCHAR Attr) { } -VOID GuiDrawText(U32 X, U32 Y, PUCHAR Text, UCHAR Attr) +VOID GuiDrawText(ULONG X, ULONG Y, PUCHAR Text, UCHAR Attr) { } @@ -70,7 +70,7 @@ VOID GuiMessageBoxCritical(PUCHAR MessageText) { } -VOID GuiDrawProgressBar(U32 Position, U32 Range) +VOID GuiDrawProgressBar(ULONG Position, ULONG Range) { } diff --git a/reactos/boot/freeldr/freeldr/ui/gui.h b/reactos/boot/freeldr/freeldr/ui/gui.h index 4084b043cf7..ad1e031440f 100644 --- a/reactos/boot/freeldr/freeldr/ui/gui.h +++ b/reactos/boot/freeldr/freeldr/ui/gui.h @@ -29,17 +29,17 @@ // /////////////////////////////////////////////////////////////////////////////////////// VOID GuiDrawBackdrop(VOID); // Fills the entire screen with a backdrop -VOID GuiFillArea(U32 Left, U32 Top, U32 Right, U32 Bottom, UCHAR FillChar, UCHAR Attr /* Color Attributes */); // Fills the area specified with FillChar and Attr -VOID GuiDrawShadow(U32 Left, U32 Top, U32 Right, U32 Bottom); // Draws a shadow on the bottom and right sides of the area specified -VOID GuiDrawBox(U32 Left, U32 Top, U32 Right, U32 Bottom, UCHAR VertStyle, UCHAR HorzStyle, BOOL Fill, BOOL Shadow, UCHAR Attr); // Draws a box around the area specified -VOID GuiDrawText(U32 X, U32 Y, PUCHAR Text, UCHAR Attr); // Draws text at coordinates specified +VOID GuiFillArea(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, UCHAR FillChar, UCHAR Attr /* Color Attributes */); // Fills the area specified with FillChar and Attr +VOID GuiDrawShadow(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom); // Draws a shadow on the bottom and right sides of the area specified +VOID GuiDrawBox(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, UCHAR VertStyle, UCHAR HorzStyle, BOOL Fill, BOOL Shadow, UCHAR Attr); // Draws a box around the area specified +VOID GuiDrawText(ULONG X, ULONG Y, PUCHAR Text, UCHAR Attr); // Draws text at coordinates specified VOID GuiDrawStatusText(PUCHAR StatusText); // Draws text at the very bottom line on the screen VOID GuiUpdateDateTime(VOID); // Updates the date and time VOID GuiSaveScreen(PUCHAR Buffer); // Saves the screen so that it can be restored later VOID GuiRestoreScreen(PUCHAR Buffer); // Restores the screen from a previous save VOID GuiMessageBox(PUCHAR MessageText); // Displays a message box on the screen with an ok button VOID GuiMessageBoxCritical(PUCHAR MessageText); // Displays a message box on the screen with an ok button using no system resources -VOID GuiDrawProgressBar(U32 Position, U32 Range); // Draws the progress bar showing nPos percent filled +VOID GuiDrawProgressBar(ULONG Position, ULONG Range); // Draws the progress bar showing nPos percent filled UCHAR GuiTextToColor(PUCHAR ColorText); // Converts the text color into it's equivalent color value UCHAR GuiTextToFillStyle(PUCHAR FillStyleText); // Converts the text fill into it's equivalent fill value @@ -49,7 +49,7 @@ UCHAR GuiTextToFillStyle(PUCHAR FillStyleText); // Converts the text fill int // Menu Functions // /////////////////////////////////////////////////////////////////////////////////////// -BOOL GuiDisplayMenu(PUCHAR MenuItemList[], U32 MenuItemCount, U32 DefaultMenuItem, S32 MenuTimeOut, U32* SelectedMenuItem); +BOOL GuiDisplayMenu(PUCHAR MenuItemList[], ULONG MenuItemCount, ULONG DefaultMenuItem, LONG MenuTimeOut, ULONG* SelectedMenuItem); diff --git a/reactos/boot/freeldr/freeldr/ui/tui.c b/reactos/boot/freeldr/freeldr/ui/tui.c index 68bae1c99c9..c88f6655ee4 100644 --- a/reactos/boot/freeldr/freeldr/ui/tui.c +++ b/reactos/boot/freeldr/freeldr/ui/tui.c @@ -136,10 +136,10 @@ VOID TuiDrawBackdrop(VOID) * FillArea() * This function assumes coordinates are zero-based */ -VOID TuiFillArea(U32 Left, U32 Top, U32 Right, U32 Bottom, UCHAR FillChar, UCHAR Attr /* Color Attributes */) +VOID TuiFillArea(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, UCHAR FillChar, UCHAR Attr /* Color Attributes */) { PUCHAR ScreenMemory = (PUCHAR)TextVideoBuffer; - U32 i, j; + ULONG i, j; // Clip the area to the screen // FIXME: This code seems to have problems... Uncomment and view ;-) @@ -172,10 +172,10 @@ VOID TuiFillArea(U32 Left, U32 Top, U32 Right, U32 Bottom, UCHAR FillChar, UCHAR * DrawShadow() * This function assumes coordinates are zero-based */ -VOID TuiDrawShadow(U32 Left, U32 Top, U32 Right, U32 Bottom) +VOID TuiDrawShadow(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom) { PUCHAR ScreenMemory = (PUCHAR)TextVideoBuffer; - U32 Idx; + ULONG Idx; // Shade the bottom of the area if (Bottom < (UiScreenHeight - 1)) @@ -232,7 +232,7 @@ VOID TuiDrawShadow(U32 Left, U32 Top, U32 Right, U32 Bottom) * DrawBox() * This function assumes coordinates are zero-based */ -VOID TuiDrawBox(U32 Left, U32 Top, U32 Right, U32 Bottom, UCHAR VertStyle, UCHAR HorzStyle, BOOL Fill, BOOL Shadow, UCHAR Attr) +VOID TuiDrawBox(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, UCHAR VertStyle, UCHAR HorzStyle, BOOL Fill, BOOL Shadow, UCHAR Attr) { UCHAR ULCorner, URCorner, LLCorner, LRCorner; @@ -304,10 +304,10 @@ VOID TuiDrawBox(U32 Left, U32 Top, U32 Right, U32 Bottom, UCHAR VertStyle, UCHAR * DrawText() * This function assumes coordinates are zero-based */ -VOID TuiDrawText(U32 X, U32 Y, PUCHAR Text, UCHAR Attr) +VOID TuiDrawText(ULONG X, ULONG Y, PUCHAR Text, UCHAR Attr) { PUCHAR ScreenMemory = (PUCHAR)TextVideoBuffer; - U32 i, j; + ULONG i, j; // Draw the text for (i=X, j=0; Text[j] && i -BOOL TuiDisplayMenu(PUCHAR MenuItemList[], U32 MenuItemCount, U32 DefaultMenuItem, S32 MenuTimeOut, U32* SelectedMenuItem, BOOL CanEscape, UiMenuKeyPressFilterCallback KeyPressFilter) +BOOL TuiDisplayMenu(PUCHAR MenuItemList[], ULONG MenuItemCount, ULONG DefaultMenuItem, LONG MenuTimeOut, ULONG* SelectedMenuItem, BOOL CanEscape, UiMenuKeyPressFilterCallback KeyPressFilter) { TUI_MENU_INFO MenuInformation; - U32 LastClockSecond; - U32 CurrentClockSecond; - U32 KeyPress; + ULONG LastClockSecond; + ULONG CurrentClockSecond; + ULONG KeyPress; // // The first thing we need to check is the timeout @@ -145,10 +145,10 @@ BOOL TuiDisplayMenu(PUCHAR MenuItemList[], U32 MenuItemCount, U32 DefaultMenuIte VOID TuiCalcMenuBoxSize(PTUI_MENU_INFO MenuInfo) { - U32 Idx; - U32 Width; - U32 Height; - U32 Length; + ULONG Idx; + ULONG Width; + ULONG Height; + ULONG Length; // // Height is the menu item count plus 2 (top border & bottom border) @@ -186,7 +186,7 @@ VOID TuiCalcMenuBoxSize(PTUI_MENU_INFO MenuInfo) VOID TuiDrawMenu(PTUI_MENU_INFO MenuInfo) { - U32 Idx; + ULONG Idx; // // Draw the backdrop @@ -218,7 +218,7 @@ VOID TuiDrawMenuBox(PTUI_MENU_INFO MenuInfo) { UCHAR MenuLineText[80]; UCHAR TempString[80]; - U32 Idx; + ULONG Idx; // // Draw the menu box @@ -262,13 +262,13 @@ VOID TuiDrawMenuBox(PTUI_MENU_INFO MenuInfo) } } -VOID TuiDrawMenuItem(PTUI_MENU_INFO MenuInfo, U32 MenuItemNumber) +VOID TuiDrawMenuItem(PTUI_MENU_INFO MenuInfo, ULONG MenuItemNumber) { - U32 Idx; + ULONG Idx; UCHAR MenuLineText[80]; - U32 SpaceTotal; - U32 SpaceLeft; - U32 SpaceRight; + ULONG SpaceTotal; + ULONG SpaceLeft; + ULONG SpaceRight; UCHAR Attribute; // @@ -335,9 +335,9 @@ VOID TuiDrawMenuItem(PTUI_MENU_INFO MenuInfo, U32 MenuItemNumber) } } -U32 TuiProcessMenuKeyboardEvent(PTUI_MENU_INFO MenuInfo, UiMenuKeyPressFilterCallback KeyPressFilter) +ULONG TuiProcessMenuKeyboardEvent(PTUI_MENU_INFO MenuInfo, UiMenuKeyPressFilterCallback KeyPressFilter) { - U32 KeyEvent = 0; + ULONG KeyEvent = 0; // // Check for a keypress diff --git a/reactos/boot/freeldr/freeldr/ui/ui.c b/reactos/boot/freeldr/freeldr/ui/ui.c index b930e7f9174..0b11262e03d 100644 --- a/reactos/boot/freeldr/freeldr/ui/ui.c +++ b/reactos/boot/freeldr/freeldr/ui/ui.c @@ -28,8 +28,8 @@ #include #include -U32 UiScreenWidth = 80; // Screen Width -U32 UiScreenHeight = 25; // Screen Height +ULONG UiScreenWidth = 80; // Screen Width +ULONG UiScreenHeight = 25; // Screen Height UCHAR UiStatusBarFgColor = COLOR_BLACK; // Status bar foreground color UCHAR UiStatusBarBgColor = COLOR_CYAN; // Status bar background color @@ -61,10 +61,10 @@ UCHAR UiMonthNames[12][15] = { "January ", "February ", "March ", "April ", "May BOOL UiInitialize(BOOLEAN ShowGui) { - U32 SectionId; + ULONG SectionId; UCHAR DisplayModeText[260]; UCHAR SettingText[260]; - U32 Depth; + ULONG Depth; if (!ShowGui) { if (!TuiInitialize()) @@ -233,7 +233,7 @@ VOID UiDrawBackdrop(VOID) } } -VOID UiFillArea(U32 Left, U32 Top, U32 Right, U32 Bottom, UCHAR FillChar, UCHAR Attr /* Color Attributes */) +VOID UiFillArea(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, UCHAR FillChar, UCHAR Attr /* Color Attributes */) { if (VideoTextMode == UiDisplayMode) { @@ -246,7 +246,7 @@ VOID UiFillArea(U32 Left, U32 Top, U32 Right, U32 Bottom, UCHAR FillChar, UCHAR } } -VOID UiDrawShadow(U32 Left, U32 Top, U32 Right, U32 Bottom) +VOID UiDrawShadow(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom) { if (VideoTextMode == UiDisplayMode) { @@ -259,7 +259,7 @@ VOID UiDrawShadow(U32 Left, U32 Top, U32 Right, U32 Bottom) } } -VOID UiDrawBox(U32 Left, U32 Top, U32 Right, U32 Bottom, UCHAR VertStyle, UCHAR HorzStyle, BOOL Fill, BOOL Shadow, UCHAR Attr) +VOID UiDrawBox(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, UCHAR VertStyle, UCHAR HorzStyle, BOOL Fill, BOOL Shadow, UCHAR Attr) { if (VideoTextMode == UiDisplayMode) { @@ -272,7 +272,7 @@ VOID UiDrawBox(U32 Left, U32 Top, U32 Right, U32 Bottom, UCHAR VertStyle, UCHAR } } -VOID UiDrawText(U32 X, U32 Y, PUCHAR Text, UCHAR Attr) +VOID UiDrawText(ULONG X, ULONG Y, PUCHAR Text, UCHAR Attr) { if (VideoTextMode == UiDisplayMode) { @@ -285,7 +285,7 @@ VOID UiDrawText(U32 X, U32 Y, PUCHAR Text, UCHAR Attr) } } -VOID UiDrawCenteredText(U32 Left, U32 Top, U32 Right, U32 Bottom, PUCHAR TextString, UCHAR Attr) +VOID UiDrawCenteredText(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, PUCHAR TextString, UCHAR Attr) { if (VideoTextMode == UiDisplayMode) { @@ -328,16 +328,16 @@ VOID UiUpdateDateTime(VOID) VOID UiInfoBox(PUCHAR MessageText) { - U32 TextLength; - U32 BoxWidth; - U32 BoxHeight; - U32 LineBreakCount; - U32 Index; - U32 LastIndex; - U32 Left; - U32 Top; - U32 Right; - U32 Bottom; + ULONG TextLength; + ULONG BoxWidth; + ULONG BoxHeight; + ULONG LineBreakCount; + ULONG Index; + ULONG LastIndex; + ULONG Left; + ULONG Top; + ULONG Right; + ULONG Bottom; TextLength = strlen(MessageText); @@ -465,7 +465,7 @@ UCHAR UiTextToFillStyle(PUCHAR FillStyleText) } } -VOID UiDrawProgressBarCenter(U32 Position, U32 Range, PUCHAR ProgressText) +VOID UiDrawProgressBarCenter(ULONG Position, ULONG Range, PUCHAR ProgressText) { if (!UserInterfaceUp) return; @@ -480,7 +480,7 @@ VOID UiDrawProgressBarCenter(U32 Position, U32 Range, PUCHAR ProgressText) } } -VOID UiDrawProgressBar(U32 Left, U32 Top, U32 Right, U32 Bottom, U32 Position, U32 Range, PUCHAR ProgressText) +VOID UiDrawProgressBar(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, ULONG Position, ULONG Range, PUCHAR ProgressText) { if (VideoTextMode == UiDisplayMode) { @@ -495,12 +495,12 @@ VOID UiDrawProgressBar(U32 Left, U32 Top, U32 Right, U32 Bottom, U32 Position, U VOID UiShowMessageBoxesInSection(PUCHAR SectionName) { - U32 Idx; + ULONG Idx; UCHAR SettingName[80]; UCHAR SettingValue[80]; PUCHAR MessageBoxText; - U32 MessageBoxTextSize; - U32 SectionId; + ULONG MessageBoxTextSize; + ULONG SectionId; if (!IniOpenSection(SectionName, &SectionId)) { @@ -547,7 +547,7 @@ VOID UiShowMessageBoxesInSection(PUCHAR SectionName) VOID UiEscapeString(PUCHAR String) { - U32 Idx; + ULONG Idx; for (Idx=0; Idx MaxChars) { @@ -571,7 +571,7 @@ VOID UiTruncateStringEllipsis(PUCHAR StringText, U32 MaxChars) } } -BOOL UiDisplayMenu(PUCHAR MenuItemList[], U32 MenuItemCount, U32 DefaultMenuItem, S32 MenuTimeOut, U32* SelectedMenuItem, BOOL CanEscape, UiMenuKeyPressFilterCallback KeyPressFilter) +BOOL UiDisplayMenu(PUCHAR MenuItemList[], ULONG MenuItemCount, ULONG DefaultMenuItem, LONG MenuTimeOut, ULONG* SelectedMenuItem, BOOL CanEscape, UiMenuKeyPressFilterCallback KeyPressFilter) { if (VideoTextMode == UiDisplayMode) { @@ -611,7 +611,7 @@ VOID UiFadeOut(VOID) } } -BOOL UiEditBox(PUCHAR MessageText, PUCHAR EditTextBuffer, U32 Length) +BOOL UiEditBox(PUCHAR MessageText, PUCHAR EditTextBuffer, ULONG Length) { if (VideoTextMode == UiDisplayMode) { diff --git a/reactos/boot/freeldr/freeldr/video/fade.c b/reactos/boot/freeldr/freeldr/video/fade.c index db8ab3d98c6..c5d69b37ef8 100644 --- a/reactos/boot/freeldr/freeldr/video/fade.c +++ b/reactos/boot/freeldr/freeldr/video/fade.c @@ -25,9 +25,9 @@ #define RGB_MAX 64 #define RGB_MAX_PER_ITERATION 64 -VOID VideoSetAllColorsToBlack(U32 ColorCount) +VOID VideoSetAllColorsToBlack(ULONG ColorCount) { - U32 Color; + ULONG Color; MachVideoSync(); @@ -37,10 +37,10 @@ VOID VideoSetAllColorsToBlack(U32 ColorCount) } } -VOID VideoFadeIn(PPALETTE_ENTRY Palette, U32 ColorCount) +VOID VideoFadeIn(PPALETTE_ENTRY Palette, ULONG ColorCount) { - U32 Index; - U32 Color; + ULONG Index; + ULONG Color; PALETTE_ENTRY PaletteColors[ColorCount]; for (Index=0; Index #include -VOID VideoSavePaletteState(PPALETTE_ENTRY Palette, U32 ColorCount) +VOID VideoSavePaletteState(PPALETTE_ENTRY Palette, ULONG ColorCount) { - U32 Color; + ULONG Color; for (Color=0; ColorStack = (ULONG)ProcessorStack; + /* Write the page directory page */ + Ke386GetPageTableDirectory(Common->PageDirectory); + /* Write the kernel entry point */ + Common->NtProcessStartup = (ULONG_PTR)RtlImageNtHeader(MmSystemRangeStart)->OptionalHeader.AddressOfEntryPoint + (ULONG_PTR)MmSystemRangeStart; + /* Write the state of the mae mode */ + Common->PaeModeEnabled = Ke386GetCr4() & X86_CR4_PAE ? 1 : 0; + + DPRINT1("%x %x %x %x\n", Common->Stack, Common->PageDirectory, Common->NtProcessStartup, Common->PaeModeEnabled); + DPRINT("CPU %d got stack at 0x%X\n", CPU, Common->Stack); #if 0 diff --git a/reactos/include/ntos/types.h b/reactos/include/ntos/types.h index f3a0973cc24..0ee104f787c 100644 --- a/reactos/include/ntos/types.h +++ b/reactos/include/ntos/types.h @@ -517,6 +517,9 @@ typedef struct _LOADER_PARAMETER_BLOCK ULONG DrivesAddr; ULONG ConfigTable; ULONG BootLoaderName; + ULONG PageDirectoryStart; + ULONG PageDirectoryEnd; + ULONG KernelBase; } LOADER_PARAMETER_BLOCK, *PLOADER_PARAMETER_BLOCK; typedef enum _KAPC_ENVIRONMENT diff --git a/reactos/ntoskrnl/Makefile.i386 b/reactos/ntoskrnl/Makefile.i386 index 3226e79f19e..46b7c9bd006 100644 --- a/reactos/ntoskrnl/Makefile.i386 +++ b/reactos/ntoskrnl/Makefile.i386 @@ -5,7 +5,7 @@ # Defines $(OBJECTS_HAL) # include hal/x86/sources -OBJECTS_BOOT := ke/i386/multiboot.o +OBJECTS_BOOT := ke/i386/main.o OBJECTS_EX_I386 := \ ex/i386/interlck.o diff --git a/reactos/ntoskrnl/dbg/kdb.c b/reactos/ntoskrnl/dbg/kdb.c index c6b7368f818..98954ed9058 100644 --- a/reactos/ntoskrnl/dbg/kdb.c +++ b/reactos/ntoskrnl/dbg/kdb.c @@ -1187,8 +1187,8 @@ DbgBackTraceCommand(ULONG Argc, PCH Argv[], PKTRAP_FRAME Tf) } else { - StackBase = (ULONG_PTR)&init_stack_top; - StackLimit = (ULONG_PTR)&init_stack; + StackBase = (ULONG_PTR)init_stack_top; + StackLimit = (ULONG_PTR)init_stack; } DbgPrintBackTrace((PULONG)&Tf->DebugEbp, StackBase, StackLimit); } diff --git a/reactos/ntoskrnl/include/internal/i386/ke.h b/reactos/ntoskrnl/include/internal/i386/ke.h index 9f0bf8d86e4..06612b5c5a0 100644 --- a/reactos/ntoskrnl/include/internal/i386/ke.h +++ b/reactos/ntoskrnl/include/internal/i386/ke.h @@ -75,10 +75,13 @@ #define X86_EFLAGS_VM 0x00020000 /* Virtual Mode */ #define X86_EFLAGS_ID 0x00200000 /* CPUID detection flag */ +#define X86_CR0_PE 0x00000001 /* enable Protected Mode */ #define X86_CR0_NE 0x00000020 /* enable native FPU error reporting */ #define X86_CR0_TS 0x00000008 /* enable exception on FPU instruction for task switch */ #define X86_CR0_EM 0x00000004 /* enable FPU emulation (disable FPU) */ #define X86_CR0_MP 0x00000002 /* enable FPU monitoring */ +#define X86_CR0_WP 0x00010000 /* enable Write Protect (copy on write) */ +#define X86_CR0_PG 0x80000000 /* enable Paging */ #define X86_CR4_PAE 0x00000020 /* enable physical address extensions */ #define X86_CR4_PGE 0x00000080 /* enable global pages */ @@ -208,8 +211,20 @@ NtEarlyInitVdm(VOID); __asm__("movl %%cr3,%0\n\t" : "=d" (X)); #define Ke386SetPageTableDirectory(X) \ __asm__("movl %0,%%cr3\n\t" \ - : /* no outputs */ \ - : "r" (X)); + : /* no outputs */ \ + : "r" (X)); +#define Ke386SetFileSelector(X) \ + __asm__("movl %0,%%cr3\n\t" \ + : /* no outputs */ \ + : "r" (X)); +#define Ke386SetLocalDescriptorTable(X) \ + __asm__("lldt %0\n\t" \ + : /* no outputs */ \ + : "m" (X)); +#define Ke386SetGlobalDescriptorTable(X) \ + __asm__("lgdt %0\n\t" \ + : /* no outputs */ \ + : "m" (X)); #define Ke386SaveFlags(x) __asm__ __volatile__("pushfl ; popl %0":"=g" (x): /* no input */) #define Ke386RestoreFlags(x) __asm__ __volatile__("pushl %0 ; popfl": /* no output */ :"g" (x):"memory") diff --git a/reactos/ntoskrnl/include/internal/i386/mm.h b/reactos/ntoskrnl/include/internal/i386/mm.h index 9650f1bd32a..06a06a10b48 100644 --- a/reactos/ntoskrnl/include/internal/i386/mm.h +++ b/reactos/ntoskrnl/include/internal/i386/mm.h @@ -54,21 +54,12 @@ struct _EPROCESS; PULONG MmGetPageDirectory(VOID); -VOID MiEnablePAE(PVOID* LastKernelAddress); #define PAGE_MASK(x) ((x)&(~0xfff)) #define PAE_PAGE_MASK(x) ((x)&(~0xfffLL)) -#else - -#ifdef __3GB__ -#define KERNEL_BASE (0xC0000000) -#else -#define KERNEL_BASE (0x80000000) -#endif - #endif /* ASSEMBLER */ #endif /* __NTOSKRNL_INCLUDE_INTERNAL_I386_MM_H */ diff --git a/reactos/ntoskrnl/ke/i386/exp.c b/reactos/ntoskrnl/ke/i386/exp.c index 18f7ebe53e0..5f8c9a8751c 100644 --- a/reactos/ntoskrnl/ke/i386/exp.c +++ b/reactos/ntoskrnl/ke/i386/exp.c @@ -285,8 +285,8 @@ KiDoubleFaultHandler(VOID) } else { - StackLimit = (ULONG)&init_stack_top; - StackBase = (ULONG)&init_stack; + StackLimit = (ULONG)init_stack_top; + StackBase = (ULONG)init_stack; } /* @@ -453,7 +453,7 @@ KiDumpTrapFrame(PKTRAP_FRAME Tf, ULONG Parameter1, ULONG Parameter2) } else { - StackLimit = (ULONG)&init_stack_top; + StackLimit = (ULONG)init_stack_top; } /* diff --git a/reactos/ntoskrnl/ke/i386/irq.c b/reactos/ntoskrnl/ke/i386/irq.c index a666bdd2af0..cf90d44695f 100644 --- a/reactos/ntoskrnl/ke/i386/irq.c +++ b/reactos/ntoskrnl/ke/i386/irq.c @@ -1,4 +1,4 @@ -/* $Id:$ +/* $Id$ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel diff --git a/reactos/ntoskrnl/ke/i386/kernel.c b/reactos/ntoskrnl/ke/i386/kernel.c index 553cea437de..a1ffb830baf 100644 --- a/reactos/ntoskrnl/ke/i386/kernel.c +++ b/reactos/ntoskrnl/ke/i386/kernel.c @@ -1,4 +1,4 @@ -/* $Id:$ +/* $Id$ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -24,7 +24,6 @@ CHAR Ke386CpuidModel[49] = {0,}; ULONG Ke386L1CacheSize; BOOLEAN Ke386NoExecute = FALSE; BOOLEAN Ke386Pae = FALSE; -BOOLEAN Ke386PaeEnabled = FALSE; BOOLEAN Ke386GlobalPagesEnabled = FALSE; ULONG KiFastSystemCallDisable = 1; @@ -286,7 +285,7 @@ KeInit1(PCHAR CommandLine, PULONG LastKernelAddress) } p1 = p2; } - +#if 0 /* * FIXME: * Make the detection of the noexecute feature more portable. @@ -311,15 +310,17 @@ KeInit1(PCHAR CommandLine, PULONG LastKernelAddress) { NoExecute=FALSE; } +#endif - + Ke386Pae = Ke386GetCr4() & X86_CR4_PAE ? TRUE : FALSE; +#if 0 /* Enable PAE mode */ if ((Pae && (KPCR->PrcbData.FeatureBits & X86_FEATURE_PAE)) || NoExecute) { MiEnablePAE((PVOID*)LastKernelAddress); Ke386PaeEnabled = TRUE; } - +#endif if (KPCR->PrcbData.FeatureBits & X86_FEATURE_SYSCALL) { extern void KiFastCallEntry(void); @@ -423,7 +424,7 @@ Ki386SetProcessorFeatures(VOID) (Ke386CpuidExFlags & X86_EXT_FEATURE_3DNOW); SharedUserData->ProcessorFeatures[PF_RDTSC_INSTRUCTION_AVAILABLE] = (Pcr->PrcbData.FeatureBits & X86_FEATURE_TSC); - SharedUserData->ProcessorFeatures[PF_PAE_ENABLED] = Ke386PaeEnabled; + SharedUserData->ProcessorFeatures[PF_PAE_ENABLED] = Ke386Pae; SharedUserData->ProcessorFeatures[PF_XMMI64_INSTRUCTIONS_AVAILABLE] = (Pcr->PrcbData.FeatureBits & X86_FEATURE_SSE2); diff --git a/reactos/ntoskrnl/ke/i386/tss.c b/reactos/ntoskrnl/ke/i386/tss.c index 1c03a6a88a3..03c63f8135e 100644 --- a/reactos/ntoskrnl/ke/i386/tss.c +++ b/reactos/ntoskrnl/ke/i386/tss.c @@ -1,4 +1,4 @@ -/* $Id:$ +/* $Id$ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -25,7 +25,8 @@ KTSS KiBootTss; static KTSSNOIOPM KiBootTrapTss; extern USHORT KiBootGdt[]; - +extern ULONG init_stack; +extern ULONG init_stack_top; extern VOID KiTrap8(VOID); /* FUNCTIONS *****************************************************************/ @@ -182,7 +183,6 @@ VOID INIT_FUNCTION Ki386BootInitializeTSS(VOID) { ULONG cr3_; - extern unsigned int init_stack, init_stack_top; extern unsigned int trap_stack, trap_stack_top; unsigned int base, length; @@ -190,11 +190,11 @@ Ki386BootInitializeTSS(VOID) Ki386TssArray[0] = &KiBootTss; Ki386TrapTssArray[0] = &KiBootTrapTss; - Ki386TrapStackArray[0] = (PVOID)&trap_stack; - Ki386InitialStackArray[0] = (PVOID)&init_stack; + Ki386TrapStackArray[0] = (PVOID)trap_stack; + Ki386InitialStackArray[0] = (PVOID)init_stack; /* Initialize the boot TSS. */ - KiBootTss.Esp0 = (ULONG)&init_stack_top - sizeof(FX_SAVE_AREA); + KiBootTss.Esp0 = (ULONG)init_stack_top - sizeof(FX_SAVE_AREA); KiBootTss.Ss0 = KERNEL_DS; // KiBootTss.IoMapBase = FIELD_OFFSET(KTSS, IoBitmap); KiBootTss.IoMapBase = 0xFFFF; /* No i/o bitmap */ @@ -215,9 +215,9 @@ Ki386BootInitializeTSS(VOID) /* Initialize the TSS used for handling double faults. */ KiBootTrapTss.Eflags = 0; - KiBootTrapTss.Esp0 = (ULONG)&trap_stack_top; /* FIXME: - sizeof(FX_SAVE_AREA)? */ + KiBootTrapTss.Esp0 = (ULONG)trap_stack_top; /* FIXME: - sizeof(FX_SAVE_AREA)? */ KiBootTrapTss.Ss0 = KERNEL_DS; - KiBootTrapTss.Esp = (ULONG)&trap_stack_top; /* FIXME: - sizeof(FX_SAVE_AREA)? */ + KiBootTrapTss.Esp = (ULONG)trap_stack_top; /* FIXME: - sizeof(FX_SAVE_AREA)? */ KiBootTrapTss.Cs = KERNEL_CS; KiBootTrapTss.Eip = (ULONG)KiTrap8; KiBootTrapTss.Ss = KERNEL_DS; diff --git a/reactos/ntoskrnl/ke/kthread.c b/reactos/ntoskrnl/ke/kthread.c index 3f5b4bdc069..5a1eaa2b8ab 100644 --- a/reactos/ntoskrnl/ke/kthread.c +++ b/reactos/ntoskrnl/ke/kthread.c @@ -85,7 +85,7 @@ KeReleaseThread(PKTHREAD Thread) /* FIXME - lock the process */ RemoveEntryList(&Thread->ThreadListEntry); - if (Thread->StackLimit != (ULONG_PTR)&init_stack) + if (Thread->StackLimit != (ULONG_PTR)init_stack) { MmLockAddressSpace(MmGetKernelAddressSpace()); MmFreeMemoryAreaByPtr(MmGetKernelAddressSpace(), @@ -193,10 +193,10 @@ KeInitializeThread(PKPROCESS Process, PKTHREAD Thread, BOOLEAN First) } else { - Thread->InitialStack = (PCHAR)&init_stack_top; - Thread->StackBase = (PCHAR)&init_stack_top; - Thread->StackLimit = (ULONG_PTR)&init_stack; - Thread->KernelStack = (PCHAR)&init_stack_top; + Thread->InitialStack = (PCHAR)init_stack_top; + Thread->StackBase = (PCHAR)init_stack_top; + Thread->StackLimit = (ULONG_PTR)init_stack; + Thread->KernelStack = (PCHAR)init_stack_top; } /* diff --git a/reactos/ntoskrnl/ke/main.c b/reactos/ntoskrnl/ke/main.c index ea48dddb273..c0ccca43c76 100644 --- a/reactos/ntoskrnl/ke/main.c +++ b/reactos/ntoskrnl/ke/main.c @@ -68,6 +68,15 @@ extern CHAR KiTimerSystemAuditing; extern PVOID Ki386InitialStackArray[MAXIMUM_PROCESSORS]; +/* We allocate 4 pages, but we only use 3. The 4th is to guarantee page alignment */ +ULONG kernel_stack[4096]; +ULONG double_trap_stack[4096]; + +/* These point to the aligned 3 pages */ +ULONG init_stack; +ULONG init_stack_top; +ULONG trap_stack; +ULONG trap_stack_top; /* FUNCTIONS ****************************************************************/ @@ -674,7 +683,7 @@ ExpInitializeExecutive(VOID) /* Create the SystemRoot symbolic link */ CPRINT("CommandLine: %s\n", (PCHAR)KeLoaderBlock.CommandLine); - DPRINT1("MmSystemRangeStart: 0x%x\n", MmSystemRangeStart); + DPRINT1("MmSystemRangeStart: 0x%x PageDir: 0x%x\n", MmSystemRangeStart, KeLoaderBlock.PageDirectoryStart); Status = IoCreateSystemRootLink((PCHAR)KeLoaderBlock.CommandLine); if (!NT_SUCCESS(Status)) { @@ -825,6 +834,7 @@ ExpInitializeExecutive(VOID) VOID __attribute((noinline)) KiSystemStartup(BOOLEAN BootProcessor) { + DPRINT1("KiSystemStartup(%d)\n", BootProcessor); if (BootProcessor) { } @@ -866,11 +876,16 @@ _main (ULONG MultiBootMagic, PLOADER_PARAMETER_BLOCK _LoaderBlock) { ULONG i; ULONG size; - extern ULONG _bss_end__; ULONG HalBase; ULONG DriverBase; ULONG DriverSize; + /* Set up the Stacks */ + trap_stack = PAGE_ROUND_UP(&double_trap_stack); + trap_stack_top = trap_stack + 3 * PAGE_SIZE; + init_stack = PAGE_ROUND_UP(&kernel_stack); + init_stack_top = init_stack + 3 * PAGE_SIZE; + /* * Copy the parameters to a local buffer because lowmem will go away */ @@ -880,6 +895,9 @@ _main (ULONG MultiBootMagic, PLOADER_PARAMETER_BLOCK _LoaderBlock) KeLoaderBlock.ModsCount++; KeLoaderBlock.ModsAddr = (ULONG)&KeLoaderModules; + /* Save the Base Address */ + MmSystemRangeStart = (PVOID)KeLoaderBlock.KernelBase; + /* * Convert a path specification in the grub format to one understood by the * rest of the kernel. @@ -937,32 +955,13 @@ _main (ULONG MultiBootMagic, PLOADER_PARAMETER_BLOCK _LoaderBlock) } KeLoaderBlock.CommandLine = (ULONG)KeLoaderCommandLine; - /* Gotta check 3GB setting right *here* before we use KERNEL_BASE! */ - if (!_strnicmp(KeLoaderCommandLine, "3GB", 3)) { - - /* Use 3GB */ - MmSystemRangeStart = (PVOID)0xC0000000; - - } else { - - /* Use 2GB */ - MmSystemRangeStart = (PVOID)0x80000000; - } - strcpy(KeLoaderModuleStrings[0], "ntoskrnl.exe"); KeLoaderModules[0].String = (ULONG)KeLoaderModuleStrings[0]; KeLoaderModules[0].ModStart = KERNEL_BASE; -#ifdef __GNUC__ - KeLoaderModules[0].ModEnd = PAGE_ROUND_UP((ULONG)&_bss_end__); -#else /* Take this value from the PE... */ - { PIMAGE_NT_HEADERS NtHeader = RtlImageNtHeader((PVOID)KeLoaderModules[0].ModStart); PIMAGE_OPTIONAL_HEADER OptHead = &NtHeader->OptionalHeader; - KeLoaderModules[0].ModEnd = - KeLoaderModules[0].ModStart + PAGE_ROUND_UP((ULONG)OptHead->SizeOfImage); - } -#endif + KeLoaderModules[0].ModEnd = KeLoaderModules[0].ModStart + PAGE_ROUND_UP((ULONG)OptHead->SizeOfImage); for (i = 1; i < KeLoaderBlock.ModsCount; i++) { CHAR* s; @@ -974,7 +973,6 @@ _main (ULONG MultiBootMagic, PLOADER_PARAMETER_BLOCK _LoaderBlock) { strcpy(KeLoaderModuleStrings[i], (PCHAR)KeLoaderModules[i].String); } - /* TODO: Fix this hardcoded load address stuff... */ KeLoaderModules[i].ModStart -= 0x200000; KeLoaderModules[i].ModStart += KERNEL_BASE; KeLoaderModules[i].ModEnd -= 0x200000; @@ -1037,6 +1035,9 @@ _main (ULONG MultiBootMagic, PLOADER_PARAMETER_BLOCK _LoaderBlock) KdInitSystem (0, (PLOADER_PARAMETER_BLOCK)&KeLoaderBlock); HalInitSystem (0, (PLOADER_PARAMETER_BLOCK)&KeLoaderBlock); + DPRINT1("_main (%x, %x)\n", MultiBootMagic, _LoaderBlock); + + KiSystemStartup(1); } diff --git a/reactos/ntoskrnl/mm/freelist.c b/reactos/ntoskrnl/mm/freelist.c index 621348762f2..0e6038467a1 100644 --- a/reactos/ntoskrnl/mm/freelist.c +++ b/reactos/ntoskrnl/mm/freelist.c @@ -423,6 +423,17 @@ MmInitializePageList(ULONG_PTR FirstPhysKernelAddress, &MmPageArray[1].ListEntry); MmStats.NrReservedPages++; } + /* Protect the Page Directory. This will be changed in r3 */ + else if (j >= (KeLoaderBlock.PageDirectoryStart / PAGE_SIZE) && j < (KeLoaderBlock.PageDirectoryEnd / PAGE_SIZE)) + { + MmPageArray[j].Flags.Type = MM_PHYSICAL_PAGE_BIOS; + MmPageArray[j].Flags.Zero = 0; + MmPageArray[j].Flags.Consumer = MC_NPPOOL; + MmPageArray[j].ReferenceCount = 1; + InsertTailList(&BiosPageListHead, + &MmPageArray[j].ListEntry); + MmStats.NrReservedPages++; + } else if (j >= 0xa0000 / PAGE_SIZE && j < 0x100000 / PAGE_SIZE) { MmPageArray[j].Flags.Type = MM_PHYSICAL_PAGE_BIOS; diff --git a/reactos/ntoskrnl/mm/i386/page.c b/reactos/ntoskrnl/mm/i386/page.c index aef0d0a11c8..8f21c8b8463 100644 --- a/reactos/ntoskrnl/mm/i386/page.c +++ b/reactos/ntoskrnl/mm/i386/page.c @@ -2353,95 +2353,6 @@ MmInitGlobalKernelPageDirectory(VOID) } } -extern ULONGLONG pae_pagedirtable; - -VOID INIT_FUNCTION -MiEnablePAE(PVOID* LastKernelAddress) -{ - PULONGLONG PageDirTable; - PULONGLONG PageDir; - - ULONG i, k; - - ULONG Flags; - - PageDirTable = &pae_pagedirtable; - - if (LastKernelAddress) - { - /* This is the boot processor */ - memcpy(PageDirTable, (PVOID)PAGEDIRECTORY_MAP, PAGE_SIZE); - - PageDir = (PULONGLONG)*LastKernelAddress; - (*LastKernelAddress) += 6 * PAGE_SIZE; - PageDirTable[0] = MmGetPhysicalAddress((PVOID)PageDir).QuadPart | PA_PRESENT; - PageDirTable[1] = PageDirTable[0] + PAGE_SIZE; - PageDirTable[2] = PageDirTable[1] + PAGE_SIZE; - PageDirTable[3] = PageDirTable[2] + PAGE_SIZE; - - memset(PageDir, 0, 6 * PAGE_SIZE); - - for (i = 0; i < 4; i++) - { - PageDir[PAE_ADDR_TO_PDE_OFFSET(PAGETABLE_MAP) + i] = PageDirTable[i] | PA_READWRITE; - } - PageDir[PAE_ADDR_TO_PDE_OFFSET(HYPERSPACE)] = (PageDirTable[0] + 4 * PAGE_SIZE) | PA_READWRITE; - PageDir[PAE_ADDR_TO_PDE_OFFSET(HYPERSPACE)+1] = (PageDirTable[0] + 5 * PAGE_SIZE) | PA_READWRITE; - - for (i = 0; i < 2048; i++) - { - if (!(i >= PAE_ADDR_TO_PDE_OFFSET(PAGETABLE_MAP) && i < PAE_ADDR_TO_PDE_OFFSET(PAGETABLE_MAP) + 4) && - !(i >= PAE_ADDR_TO_PDE_OFFSET(HYPERSPACE) && i < PAE_ADDR_TO_PDE_OFFSET(HYPERSPACE)+2)) - - { - PVOID Address = (PVOID)(i * 512 * PAGE_SIZE); - PULONG Pde = ADDR_TO_PDE(Address); - PULONGLONG PtePAE=NULL; - - if (*Pde != 0) - { - if (PageDir[i] == 0LL) - { - PtePAE = (PULONGLONG)(ULONG_PTR)*LastKernelAddress; - (*LastKernelAddress) += PAGE_SIZE; - PageDir[i] = MmGetPhysicalAddress((PVOID)PtePAE).QuadPart | PA_PRESENT | PA_READWRITE; - memset(PtePAE, 0, PAGE_SIZE); - } - for (k = 0; k < 512; k++) - { - PULONG Pte = ADDR_TO_PTE(Address + k * PAGE_SIZE); - if (*Pte != 0) - { - PtePAE[k] = *Pte; - - } - } - } - } - } - } - else - { - /* this is an application processor in a mp system */ - if (!Ke386Pae) - { - return; - } - } - - Ke386SaveFlags(Flags); - Ke386DisableInterrupts(); - - Ke386SetPageTableDirectory(MmGetPhysicalAddress(PageDirTable).u.LowPart) - - Ke386SetCr4(Ke386GetCr4() | X86_CR4_PAE); - if (LastKernelAddress) - { - Ke386Pae = TRUE; - } - Ke386RestoreFlags(Flags); -} - ULONG MiGetUserPageDirectoryCount(VOID) { diff --git a/reactos/ntoskrnl/mm/mminit.c b/reactos/ntoskrnl/mm/mminit.c index 911ce43e025..7c7973921b0 100644 --- a/reactos/ntoskrnl/mm/mminit.c +++ b/reactos/ntoskrnl/mm/mminit.c @@ -48,6 +48,8 @@ PVOID MiNonPagedPoolStart; ULONG MiNonPagedPoolLength; //PVOID MiKernelMapStart; +extern ULONG init_stack; +extern ULONG init_stack_top; /* FUNCTIONS ****************************************************************/ @@ -289,17 +291,12 @@ MmInit1(ULONG_PTR FirstKrnlPhysAddr, ULONG i; ULONG kernel_len; ULONG_PTR MappingAddress; -#ifndef CONFIG_SMP - extern unsigned int unmap_me, unmap_me2, unmap_me3; -#endif - extern unsigned int pagetable_start, pagetable_end; DPRINT("MmInit1(FirstKrnlPhysAddr, %p, LastKrnlPhysAddr %p, LastKernelAddress %p)\n", FirstKrnlPhysAddr, LastKrnlPhysAddr, LastKernelAddress); - if ((BIOSMemoryMap != NULL) && (AddressRangeCount > 0)) { // If we have a bios memory map, recalulate the memory size @@ -375,6 +372,7 @@ MmInit1(ULONG_PTR FirstKrnlPhysAddr, MmInitGlobalKernelPageDirectory(); DbgPrint("Used memory %dKb\n", (MmStats.NrTotalPages * PAGE_SIZE) / 1024); + DPRINT1("Kernel Stack Limits. InitTop = 0x%x, Init = 0x%x\n", init_stack_top, init_stack); LastKernelAddress = (ULONG_PTR)MmInitializePageList( FirstKrnlPhysAddr, @@ -395,8 +393,6 @@ MmInit1(ULONG_PTR FirstKrnlPhysAddr, MmDeletePageTable(NULL, 0); #endif - - DPRINT("Invalidating between %x and %x\n", LastKernelAddress, KERNEL_BASE + 0x00600000); for (MappingAddress = LastKernelAddress; @@ -406,20 +402,7 @@ MmInit1(ULONG_PTR FirstKrnlPhysAddr, MmRawDeleteVirtualMapping((PVOID)MappingAddress); } - for (MappingAddress = (ULONG_PTR)&pagetable_start; - MappingAddress < (ULONG_PTR)&pagetable_end; - MappingAddress += PAGE_SIZE) - { - MmDeleteVirtualMapping(NULL, (PVOID)MappingAddress, FALSE, NULL, NULL); - } - DPRINT("Almost done MmInit()\n"); -#ifndef CONFIG_SMP - /* FIXME: This is broken in SMP mode */ - MmDeleteVirtualMapping(NULL, (PVOID)&unmap_me, TRUE, NULL, NULL); - MmDeleteVirtualMapping(NULL, (PVOID)&unmap_me2, TRUE, NULL, NULL); - MmDeleteVirtualMapping(NULL, (PVOID)&unmap_me3, TRUE, NULL, NULL); -#endif /* * Intialize memory areas */ From e2de4723c63b5c58799000eafa46861dab4ed705 Mon Sep 17 00:00:00 2001 From: Alex Ionescu Date: Tue, 8 Feb 2005 01:55:04 +0000 Subject: [PATCH 149/185] Forgot this file svn path=/trunk/; revision=13463 --- reactos/ntoskrnl/ke/i386/main.S | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 reactos/ntoskrnl/ke/i386/main.S diff --git a/reactos/ntoskrnl/ke/i386/main.S b/reactos/ntoskrnl/ke/i386/main.S new file mode 100644 index 00000000000..ab0374f7af9 --- /dev/null +++ b/reactos/ntoskrnl/ke/i386/main.S @@ -0,0 +1,31 @@ +#include +#include +#include +#include +#include +#include +#include + +.globl _NtProcessStartup + +_NtProcessStartup: + + /* FIXME: Application processors should have their own GDT/IDT */ + lgdt _KiGdtDescriptor + lidt _KiIdtDescriptor + + /* Load the PCR selector */ + movl $PCR_SELECTOR, %eax + movl %eax, %fs + + /* Load the initial kernel stack */ + lea _kernel_stack, %eax + add $0x1000, %eax + and $0xFFFFE000, %eax + add $(0x3000 - SIZEOF_FX_SAVE_AREA), %eax + movl %eax, %esp + + /* Call the main kernel initialization */ + pushl %edx + pushl %ecx + call __main From ead52a22789d7c9f6f6ea14cb568669382fb1230 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20van=20Geldorp?= Date: Tue, 8 Feb 2005 12:35:44 +0000 Subject: [PATCH 150/185] Redraw shell background when wallpaper is changed svn path=/trunk/; revision=13464 --- reactos/lib/user32/misc/desktop.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reactos/lib/user32/misc/desktop.c b/reactos/lib/user32/misc/desktop.c index 52e6a8a18a5..f6aaffc6ad5 100644 --- a/reactos/lib/user32/misc/desktop.c +++ b/reactos/lib/user32/misc/desktop.c @@ -177,7 +177,7 @@ SystemParametersInfoA(UINT uiAction, } } - RedrawWindow(GetDesktopWindow(), NULL, NULL, RDW_INVALIDATE | RDW_UPDATENOW); + RedrawWindow(GetShellWindow(), NULL, NULL, RDW_INVALIDATE | RDW_ERASE); return Ret; } @@ -280,7 +280,7 @@ SystemParametersInfoW(UINT uiAction, } } - RedrawWindow(GetDesktopWindow(), NULL, NULL, RDW_INVALIDATE | RDW_UPDATENOW); + RedrawWindow(GetShellWindow(), NULL, NULL, RDW_INVALIDATE | RDW_ERASE); return Ret; } From b03a789169e2be5363820bab443614f2770fe71c Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Tue, 8 Feb 2005 14:46:44 +0000 Subject: [PATCH 151/185] - Convert U32 to ULONG. svn path=/trunk/; revision=13465 --- reactos/boot/freeldr/freeldr/debug.c | 34 ++++++++++---------- reactos/boot/freeldr/freeldr/include/debug.h | 4 +-- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/reactos/boot/freeldr/freeldr/debug.c b/reactos/boot/freeldr/freeldr/debug.c index ac953ea45d2..86cd50c50dd 100644 --- a/reactos/boot/freeldr/freeldr/debug.c +++ b/reactos/boot/freeldr/freeldr/debug.c @@ -33,17 +33,17 @@ #define DEBUG_NONE #if defined (DEBUG_ALL) -U32 DebugPrintMask = DPRINT_WARNING | DPRINT_MEMORY | DPRINT_FILESYSTEM | +ULONG DebugPrintMask = DPRINT_WARNING | DPRINT_MEMORY | DPRINT_FILESYSTEM | DPRINT_UI | DPRINT_DISK | DPRINT_CACHE | DPRINT_REACTOS | DPRINT_LINUX; #elif defined (DEBUG_INIFILE) -U32 DebugPrintMask = DPRINT_INIFILE; +ULONG DebugPrintMask = DPRINT_INIFILE; #elif defined (DEBUG_REACTOS) -U32 DebugPrintMask = DPRINT_REACTOS | DPRINT_REGISTRY; +ULONG DebugPrintMask = DPRINT_REACTOS | DPRINT_REGISTRY; #elif defined (DEBUG_CUSTOM) -U32 DebugPrintMask = DPRINT_WARNING|DPRINT_FILESYSTEM|DPRINT_MEMORY|DPRINT_LINUX; +ULONG DebugPrintMask = DPRINT_WARNING|DPRINT_FILESYSTEM|DPRINT_MEMORY|DPRINT_LINUX; #else //#elif defined (DEBUG_NONE) -U32 DebugPrintMask = 0; +ULONG DebugPrintMask = 0; #endif #define SCREEN 1 @@ -57,13 +57,13 @@ U32 DebugPrintMask = 0; #define BOCHS_OUTPUT_PORT 0xe9 -U32 DebugPort = RS232; -//U32 DebugPort = SCREEN; -//U32 DebugPort = BOCHS; -//U32 DebugPort = SCREEN|BOCHS; -U32 ComPort = COM1; -//U32 BaudRate = 19200; -U32 BaudRate = 115200; +ULONG DebugPort = RS232; +//ULONG DebugPort = SCREEN; +//ULONG DebugPort = BOCHS; +//ULONG DebugPort = SCREEN|BOCHS; +ULONG ComPort = COM1; +//ULONG BaudRate = 19200; +ULONG BaudRate = 115200; BOOL DebugStartOfLine = TRUE; @@ -100,7 +100,7 @@ VOID DebugPrintChar(UCHAR Character) } } -VOID DebugPrintHeader(U32 Mask) +VOID DebugPrintHeader(ULONG Mask) { /* No header */ if (Mask == 0) @@ -309,7 +309,7 @@ static VOID DebugPrintV(char *format, int *dataptr) } -VOID DebugPrint(U32 Mask, char *format, ...) +VOID DebugPrint(ULONG Mask, char *format, ...) { int *dataptr = (int *) &format; @@ -336,11 +336,11 @@ VOID DebugPrint1(char *format, ...) DebugPrintV(format, ++dataptr); } -VOID DebugDumpBuffer(U32 Mask, PVOID Buffer, U32 Length) +VOID DebugDumpBuffer(ULONG Mask, PVOID Buffer, ULONG Length) { PUCHAR BufPtr = (PUCHAR)Buffer; - U32 Idx; - U32 Idx2; + ULONG Idx; + ULONG Idx2; // Mask out unwanted debug messages if (!(Mask & DebugPrintMask)) diff --git a/reactos/boot/freeldr/freeldr/include/debug.h b/reactos/boot/freeldr/freeldr/include/debug.h index 9098dbd7857..d489199d964 100644 --- a/reactos/boot/freeldr/freeldr/include/debug.h +++ b/reactos/boot/freeldr/freeldr/include/debug.h @@ -37,9 +37,9 @@ #define DPRINT_HWDETECT 0x00000400 // OR this with DebugPrintMask to enable hardware detection messages VOID DebugInit(VOID); - VOID DebugPrint(U32 Mask, char *format, ...); + VOID DebugPrint(ULONG Mask, char *format, ...); VOID DebugPrint1(char *format, ...); - VOID DebugDumpBuffer(U32 Mask, PVOID Buffer, U32 Length); + VOID DebugDumpBuffer(ULONG Mask, PVOID Buffer, ULONG Length); #define DbgPrint(_x_) DebugPrint _x_ ; #define DPRINT1 DebugPrint1 From 4b90e54e6f3043128a7f87c81736318489099865 Mon Sep 17 00:00:00 2001 From: Art Yerkes Date: Tue, 8 Feb 2005 17:10:19 +0000 Subject: [PATCH 152/185] There's no need to link ntdll here. svn path=/trunk/; revision=13466 --- reactos/apps/utils/net/ftp/makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/reactos/apps/utils/net/ftp/makefile b/reactos/apps/utils/net/ftp/makefile index 703bb2b0170..a32c246c310 100644 --- a/reactos/apps/utils/net/ftp/makefile +++ b/reactos/apps/utils/net/ftp/makefile @@ -8,7 +8,8 @@ TARGET_NAME = ftp TARGET_INSTALLDIR = system32 -TARGET_SDKLIBS = ws2_32.a iphlpapi.a ntdll.a +TARGET_SDKLIBS = ws2_32.a iphlpapi.a +# ntdll.a TARGET_OBJECTS = \ cmds.o \ From 1914ba8245f6be78a9741cbdf4a5adf0887651b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20van=20Geldorp?= Date: Tue, 8 Feb 2005 18:58:59 +0000 Subject: [PATCH 153/185] Set eol-style svn path=/trunk/; revision=13467 --- reactos/apps/utils/net/ftp/cmds.c | 4752 +++++++++++------------ reactos/apps/utils/net/ftp/domacro.c | 2 +- reactos/apps/utils/net/ftp/fake.c | 688 ++-- reactos/apps/utils/net/ftp/fake.h | 20 +- reactos/apps/utils/net/ftp/ftp.c | 3610 ++++++++--------- reactos/apps/utils/net/ftp/ftp.mak | 744 ++-- reactos/apps/utils/net/ftp/ftp.mak.orig | 800 ++-- reactos/apps/utils/net/ftp/ftp_var.h | 362 +- reactos/apps/utils/net/ftp/main.c | 1204 +++--- reactos/apps/utils/net/ftp/prototypes.h | 64 +- reactos/apps/utils/net/ftp/ruserpass.c | 542 +-- 11 files changed, 6394 insertions(+), 6394 deletions(-) diff --git a/reactos/apps/utils/net/ftp/cmds.c b/reactos/apps/utils/net/ftp/cmds.c index d155320b2ed..c88e3a0f7f8 100644 --- a/reactos/apps/utils/net/ftp/cmds.c +++ b/reactos/apps/utils/net/ftp/cmds.c @@ -1,2376 +1,2376 @@ -/* - * Copyright (c) 1985, 1989 Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -#ifndef lint -static char sccsid[] = "@(#)cmds.c 5.18 (Berkeley) 4/20/89"; -#endif /* not lint */ - -/* - * FTP User Program -- Command Routines. - */ -//#include -//#include -#include -#if !defined(WIN32) -#include -#include -#include -#include -#else -#include -#endif - -#include -#include -#include -#include -#include -#include - -#include "ftp_var.h" -#include "pathnames.h" -#include "prototypes.h" - -extern char *globerr; -extern char **glob(); -extern char home[]; -extern char *remglob(); -extern char *getenv(); -extern int allbinary; -extern off_t restart_point; -extern char reply_string[]; - -char *mname; -jmp_buf jabort; -char *dotrans(), *domap(); - -extern short portnum; -extern char *hostname; -extern int autologin; -/* - * Connect to peer server and - * auto-login, if possible. - */ -void setpeer(int argc, char *argv[]) -{ - char *host, *hookup(); - - if (connected) { - printf("Already connected to %s, use close first.\n", - hostname); - (void) fflush(stdout); - code = -1; - return; - } - if (argc < 2) { - (void) strcat(line, " "); - printf("(to) "); - (void) fflush(stdout); - (void) gets(&line[strlen(line)]); - makeargv(); - argc = margc; - argv = margv; - } - if (argc > 3) { - printf("usage: %s host-name [port]\n", argv[0]); - (void) fflush(stdout); - code = -1; - return; - } - if (argc > 2) { - portnum = atoi(argv[2]); - if (portnum <= 0) { - printf("%s: bad port number-- %s\n", argv[1], argv[2]); - printf ("usage: %s host-name [port]\n", argv[0]); - (void) fflush(stdout); - code = -1; - return; - } - portnum = htons(portnum); - } - host = hookup(argv[1], portnum); - if (host) { -#if defined(unix) && NBBY == 8 - int overbose; -#endif - connected = 1; - if (autologin) - (void) login(argv[1]); - -#if defined(unix) && NBBY == 8 -/* - * this ifdef is to keep someone form "porting" this to an incompatible - * system and not checking this out. This way they have to think about it. - */ - overbose = verbose; - if (debug == 0) - verbose = -1; - allbinary = 0; - if (command("SYST") == COMPLETE && overbose) { - register char *cp, c; - cp = index(reply_string+4, ' '); - if (cp == NULL) - cp = index(reply_string+4, '\r'); - if (cp) { - if (cp[-1] == '.') - cp--; - c = *cp; - *cp = '\0'; - } - - printf("Remote system type is %s.\n", - reply_string+4); - if (cp) - *cp = c; - } - if (!strncmp(reply_string, "215 UNIX Type: L8", 17)) { - setbinary(); - /* allbinary = 1; this violates the RFC */ - if (overbose) - printf("Using %s mode to transfer files.\n", - typename); - } else if (overbose && - !strncmp(reply_string, "215 TOPS20", 10)) { - printf( -"Remember to set tenex mode when transfering binary files from this machine.\n"); - } - verbose = overbose; -#endif /* unix */ - } - (void) fflush(stdout); -} - -struct types { - char *t_name; - char *t_mode; - int t_type; - char *t_arg; -} types[] = { - { "ascii", "A", TYPE_A, 0 }, - { "binary", "I", TYPE_I, 0 }, - { "image", "I", TYPE_I, 0 }, - { "ebcdic", "E", TYPE_E, 0 }, - { "tenex", "L", TYPE_L, bytename }, - 0 -}; - -/* - * Set transfer type. - */ -void settype(argc, argv) - char *argv[]; -{ - register struct types *p; - int comret; - - if (argc > 2) { - char *sep; - - printf("usage: %s [", argv[0]); - sep = " "; - for (p = types; p->t_name; p++) { - printf("%s%s", sep, p->t_name); - if (*sep == ' ') - sep = " | "; - } - printf(" ]\n"); - (void) fflush(stdout); - code = -1; - return; - } - if (argc < 2) { - printf("Using %s mode to transfer files.\n", typename); - (void) fflush(stdout); - code = 0; - return; - } - for (p = types; p->t_name; p++) - if (strcmp(argv[1], p->t_name) == 0) - break; - if (p->t_name == 0) { - printf("%s: unknown mode\n", argv[1]); - (void) fflush(stdout); - code = -1; - return; - } - if ((p->t_arg != NULL) && (*(p->t_arg) != '\0')) - comret = command ("TYPE %s %s", p->t_mode, p->t_arg); - else - comret = command("TYPE %s", p->t_mode); - if (comret == COMPLETE) { - (void) strcpy(typename, p->t_name); - type = p->t_type; - } -} - -char *stype[] = { - "type", - "", - 0 -}; - -/* - * Set binary transfer type. - */ -/*VARARGS*/ -void setbinary() -{ - stype[1] = "binary"; - settype(2, stype); -} - -/* - * Set ascii transfer type. - */ -/*VARARGS*/ -void setascii() -{ - stype[1] = "ascii"; - settype(2, stype); -} - -/* - * Set tenex transfer type. - */ -/*VARARGS*/ -void settenex() -{ - stype[1] = "tenex"; - settype(2, stype); -} - -/* - * Set ebcdic transfer type. - */ -/*VARARGS*/ -void setebcdic() -{ - stype[1] = "ebcdic"; - settype(2, stype); -} - -/* - * Set file transfer mode. - */ -#if 0 -/*ARGSUSED*/ -void setmode(argc, argv) - char *argv[]; -{ - - printf("We only support %s mode, sorry.\n", modename); - (void) fflush(stdout); - code = -1; -} -#endif - -/* - * Set file transfer format. - */ -/*ARGSUSED*/ -void setform(argc, argv) - char *argv[]; -{ - - printf("We only support %s format, sorry.\n", formname); - (void) fflush(stdout); - code = -1; -} - -/* - * Set file transfer structure. - */ -/*ARGSUSED*/ -void setstruct(argc, argv) - char *argv[]; -{ - - printf("We only support %s structure, sorry.\n", structname); - (void) fflush(stdout); - code = -1; -} - -/* - * Send a single file. - */ -void put(argc, argv) - int argc; - char *argv[]; -{ - char *cmd; - int loc = 0; - char *oldargv1, *oldargv2; - - if (argc == 2) { - argc++; - argv[2] = argv[1]; - loc++; - } - if (argc < 2) { - (void) strcat(line, " "); - printf("(local-file) "); - (void) fflush(stdout); - (void) gets(&line[strlen(line)]); - makeargv(); - argc = margc; - argv = margv; - } - if (argc < 2) { -usage: - printf("usage:%s local-file remote-file\n", argv[0]); - (void) fflush(stdout); - code = -1; - return; - } - if (argc < 3) { - (void) strcat(line, " "); - printf("(remote-file) "); - (void) fflush(stdout); - (void) gets(&line[strlen(line)]); - makeargv(); - argc = margc; - argv = margv; - } - if (argc < 3) - goto usage; - oldargv1 = argv[1]; - oldargv2 = argv[2]; - if (!globulize(&argv[1])) { - code = -1; - return; - } - /* - * If "globulize" modifies argv[1], and argv[2] is a copy of - * the old argv[1], make it a copy of the new argv[1]. - */ - if (argv[1] != oldargv1 && argv[2] == oldargv1) { - argv[2] = argv[1]; - } - cmd = (argv[0][0] == 'a') ? "APPE" : ((sunique) ? "STOU" : "STOR"); - if (loc && ntflag) { - argv[2] = dotrans(argv[2]); - } - if (loc && mapflag) { - argv[2] = domap(argv[2]); - } - sendrequest(cmd, argv[1], argv[2], - argv[1] != oldargv1 || argv[2] != oldargv2); -} - -/* - * Send multiple files. - */ -void mput(argc, argv) - char *argv[]; -{ - register int i; - int ointer; - void mabort(); - extern jmp_buf jabort; - char *tp; - - if (argc < 2) { - (void) strcat(line, " "); - printf("(local-files) "); - (void) fflush(stdout); - (void) gets(&line[strlen(line)]); - makeargv(); - argc = margc; - argv = margv; - } - if (argc < 2) { - printf("usage:%s local-files\n", argv[0]); - (void) fflush(stdout); - code = -1; - return; - } - mname = argv[0]; - mflag = 1; -// oldintr = signal(SIGINT, mabort); - (void) setjmp(jabort); - if (proxy) { - char *cp, *tp2, tmpbuf[MAXPATHLEN]; - - while ((cp = remglob(argv,0)) != NULL) { - if (*cp == 0) { - mflag = 0; - continue; - } - if (mflag && confirm(argv[0], cp)) { - tp = cp; - if (mcase) { - while (*tp && !islower(*tp)) { - tp++; - } - if (!*tp) { - tp = cp; - tp2 = tmpbuf; - while ((*tp2 = *tp) != (int) NULL) { - if (isupper(*tp2)) { - *tp2 = 'a' + *tp2 - 'A'; - } - tp++; - tp2++; - } - } - tp = tmpbuf; - } - if (ntflag) { - tp = dotrans(tp); - } - if (mapflag) { - tp = domap(tp); - } - sendrequest((sunique) ? "STOU" : "STOR", - cp, tp, cp != tp || !interactive); - if (!mflag && fromatty) { - ointer = interactive; - interactive = 1; - if (confirm("Continue with","mput")) { - mflag++; - } - interactive = ointer; - } - } - } -// (void) signal(SIGINT, oldintr); - mflag = 0; - return; - } - for (i = 1; i < argc; i++) { - register char **cpp, **gargs; - - if (!doglob) { - if (mflag && confirm(argv[0], argv[i])) { - tp = (ntflag) ? dotrans(argv[i]) : argv[i]; - tp = (mapflag) ? domap(tp) : tp; - sendrequest((sunique) ? "STOU" : "STOR", - argv[i], tp, tp != argv[i] || !interactive); - if (!mflag && fromatty) { - ointer = interactive; - interactive = 1; - if (confirm("Continue with","mput")) { - mflag++; - } - interactive = ointer; - } - } - continue; - } - gargs = glob(argv[i]); - if (globerr != NULL) { - printf("%s\n", globerr); - (void) fflush(stdout); - if (gargs) { - blkfree(gargs); - free((char *)gargs); - } - continue; - } - for (cpp = gargs; cpp && *cpp != NULL; cpp++) { - if (mflag && confirm(argv[0], *cpp)) { - tp = (ntflag) ? dotrans(*cpp) : *cpp; - tp = (mapflag) ? domap(tp) : tp; - sendrequest((sunique) ? "STOU" : "STOR", - *cpp, tp, *cpp != tp || !interactive); - if (!mflag && fromatty) { - ointer = interactive; - interactive = 1; - if (confirm("Continue with","mput")) { - mflag++; - } - interactive = ointer; - } - } - } - if (gargs != NULL) { - blkfree(gargs); - free((char *)gargs); - } - } -// (void) signal(SIGINT, oldintr); - mflag = 0; -} - -void reget(argc, argv) - char *argv[]; -{ - (void) getit(argc, argv, 1, "r+w"); -} - -void get(argc, argv) - char *argv[]; -{ - (void) getit(argc, argv, 0, restart_point ? "r+w" : "w" ); -} - -/* - * Receive one file. - */ -int getit(argc, argv, restartit, mode) - char *argv[]; - char *mode; -{ - int loc = 0; - char *oldargv1, *oldargv2; - - if (argc == 2) { - argc++; - argv[2] = argv[1]; - loc++; - } - if (argc < 2) { - (void) strcat(line, " "); - printf("(remote-file) "); - (void) fflush(stdout); - (void) gets(&line[strlen(line)]); - makeargv(); - argc = margc; - argv = margv; - } - if (argc < 2) { -usage: - printf("usage: %s remote-file [ local-file ]\n", argv[0]); - (void) fflush(stdout); - code = -1; - return (0); - } - if (argc < 3) { - (void) strcat(line, " "); - printf("(local-file) "); - (void) fflush(stdout); - (void) gets(&line[strlen(line)]); - makeargv(); - argc = margc; - argv = margv; - } - if (argc < 3) - goto usage; - oldargv1 = argv[1]; - oldargv2 = argv[2]; - if (!globulize(&argv[2])) { - code = -1; - return (0); - } - if (loc && mcase) { - char *tp = argv[1], *tp2, tmpbuf[MAXPATHLEN]; - - while (*tp && !islower(*tp)) { - tp++; - } - if (!*tp) { - tp = argv[2]; - tp2 = tmpbuf; - while ((*tp2 = *tp) != (int) NULL) { - if (isupper(*tp2)) { - *tp2 = 'a' + *tp2 - 'A'; - } - tp++; - tp2++; - } - argv[2] = tmpbuf; - } - } - if (loc && ntflag) - argv[2] = dotrans(argv[2]); - if (loc && mapflag) - argv[2] = domap(argv[2]); - if (restartit) { - struct stat stbuf; - int ret; - - ret = stat(argv[2], &stbuf); - if (restartit == 1) { - if (ret < 0) { - perror(argv[2]); - return (0); - } - restart_point = stbuf.st_size; - } else { - if (ret == 0) { - int overbose; - - overbose = verbose; - if (debug == 0) - verbose = -1; - if (command("MDTM %s", argv[1]) == COMPLETE) { - int yy, mo, day, hour, min, sec; - struct tm *tm; - verbose = overbose; - sscanf(reply_string, - "%*s %04d%02d%02d%02d%02d%02d", - &yy, &mo, &day, &hour, &min, &sec); - tm = gmtime(&stbuf.st_mtime); - tm->tm_mon++; - if (tm->tm_year > yy%100) - return (1); - else if (tm->tm_year == yy%100) { - if (tm->tm_mon > mo) - return (1); - } else if (tm->tm_mon == mo) { - if (tm->tm_mday > day) - return (1); - } else if (tm->tm_mday == day) { - if (tm->tm_hour > hour) - return (1); - } else if (tm->tm_hour == hour) { - if (tm->tm_min > min) - return (1); - } else if (tm->tm_min == min) { - if (tm->tm_sec > sec) - return (1); - } - } else { - printf("%s\n", reply_string); - (void) fflush(stdout); - verbose = overbose; - return (0); - } - } - } - } - - recvrequest("RETR", argv[2], argv[1], mode, - argv[1] != oldargv1 || argv[2] != oldargv2); - restart_point = 0; - return (0); -} - -void -mabort() -{ - int ointer; - extern jmp_buf jabort; - - printf("\n"); - (void) fflush(stdout); - if (mflag && fromatty) { - ointer = interactive; - interactive = 1; - if (confirm("Continue with", mname)) { - interactive = ointer; - longjmp(jabort,0); - } - interactive = ointer; - } - mflag = 0; - longjmp(jabort,0); -} - -/* - * Get multiple files. - */ -void mget(argc, argv) - char *argv[]; -{ - char *cp, *tp, *tp2, tmpbuf[MAXPATHLEN]; - int ointer; - void mabort(); - extern jmp_buf jabort; - - if (argc < 2) { - (void) strcat(line, " "); - printf("(remote-files) "); - (void) fflush(stdout); - (void) gets(&line[strlen(line)]); - makeargv(); - argc = margc; - argv = margv; - } - if (argc < 2) { - printf("usage:%s remote-files\n", argv[0]); - (void) fflush(stdout); - code = -1; - return; - } - mname = argv[0]; - mflag = 1; -// oldintr = signal(SIGINT,mabort); - (void) setjmp(jabort); - while ((cp = remglob(argv,proxy)) != NULL) { - if (*cp == '\0') { - mflag = 0; - continue; - } - if (mflag && confirm(argv[0], cp)) { - tp = cp; - if (mcase) { - while (*tp && !islower(*tp)) { - tp++; - } - if (!*tp) { - tp = cp; - tp2 = tmpbuf; - while ((*tp2 = *tp) != (int) NULL) { - if (isupper(*tp2)) { - *tp2 = 'a' + *tp2 - 'A'; - } - tp++; - tp2++; - } - } - tp = tmpbuf; - } - if (ntflag) { - tp = dotrans(tp); - } - if (mapflag) { - tp = domap(tp); - } - recvrequest("RETR", tp, cp, "w", - tp != cp || !interactive); - if (!mflag && fromatty) { - ointer = interactive; - interactive = 1; - if (confirm("Continue with","mget")) { - mflag++; - } - interactive = ointer; - } - } - } -// (void) signal(SIGINT,oldintr); - mflag = 0; -} - -char * -remglob(argv,doswitch) - char *argv[]; - int doswitch; -{ - char temp[16]; - static char buf[MAXPATHLEN]; - static FILE *ftemp = NULL; - static char **args; - int oldverbose, oldhash; - char *cp, *mode; - - if (!mflag) { - if (!doglob) { - args = NULL; - } - else { - if (ftemp) { - (void) fclose(ftemp); - ftemp = NULL; - } - } - return(NULL); - } - if (!doglob) { - if (args == NULL) - args = argv; - if ((cp = *++args) == NULL) - args = NULL; - return (cp); - } - if (ftemp == NULL) { - (void) strcpy(temp, _PATH_TMP); - (void) mktemp(temp); - oldverbose = verbose, verbose = 0; - oldhash = hash, hash = 0; - if (doswitch) { - pswitch(!proxy); - } - for (mode = "w"; *++argv != NULL; mode = "a") - recvrequest ("NLST", temp, *argv, mode, 0); - if (doswitch) { - pswitch(!proxy); - } - verbose = oldverbose; hash = oldhash; - ftemp = fopen(temp, "r"); - (void) unlink(temp); - if (ftemp == NULL) { - printf("can't find list of remote files, oops\n"); - (void) fflush(stdout); - return (NULL); - } - } - if (fgets(buf, sizeof (buf), ftemp) == NULL) { - (void) fclose(ftemp), ftemp = NULL; - return (NULL); - } - if ((cp = index(buf, '\n')) != NULL) - *cp = '\0'; - return (buf); -} - -char * -onoff(bool) - int bool; -{ - - return (bool ? "on" : "off"); -} - -/* - * Show status. - */ -/*ARGSUSED*/ -void status(argc, argv) - char *argv[]; -{ - int i; - - if (connected) - printf("Connected to %s.\n", hostname); - else - printf("Not connected.\n"); - if (!proxy) { - pswitch(1); - if (connected) { - printf("Connected for proxy commands to %s.\n", hostname); - } - else { - printf("No proxy connection.\n"); - } - pswitch(0); - } - printf("Mode: %s; Type: %s; Form: %s; Structure: %s\n", - modename, typename, formname, structname); - printf("Verbose: %s; Bell: %s; Prompting: %s; Globbing: %s\n", - onoff(verbose), onoff(bell), onoff(interactive), - onoff(doglob)); - printf("Store unique: %s; Receive unique: %s\n", onoff(sunique), - onoff(runique)); - printf("Case: %s; CR stripping: %s\n",onoff(mcase),onoff(crflag)); - if (ntflag) { - printf("Ntrans: (in) %s (out) %s\n", ntin,ntout); - } - else { - printf("Ntrans: off\n"); - } - if (mapflag) { - printf("Nmap: (in) %s (out) %s\n", mapin, mapout); - } - else { - printf("Nmap: off\n"); - } - printf("Hash mark printing: %s; Use of PORT cmds: %s\n", - onoff(hash), onoff(sendport)); - if (macnum > 0) { - printf("Macros:\n"); - for (i=0; i 1) { - val = atoi(argv[1]); - if (val < 0) { - printf("%s: bad debugging value.\n", argv[1]); - (void) fflush(stdout); - code = -1; - return; - } - } else - val = !debug; - debug = val; - if (debug) - options |= SO_DEBUG; - else - options &= ~SO_DEBUG; - printf("Debugging %s (debug=%d).\n", onoff(debug), debug); - (void) fflush(stdout); - code = debug > 0; -} - -/* - * Set current working directory - * on remote machine. - */ -void cd(argc, argv) - char *argv[]; -{ - - if (argc < 2) { - (void) strcat(line, " "); - printf("(remote-directory) "); - (void) fflush(stdout); - (void) gets(&line[strlen(line)]); - makeargv(); - argc = margc; - argv = margv; - } - if (argc < 2) { - printf("usage:%s remote-directory\n", argv[0]); - (void) fflush(stdout); - code = -1; - return; - } - if (command("CWD %s", argv[1]) == ERROR && code == 500) { - if (verbose) { - printf("CWD command not recognized, trying XCWD\n"); - (void) fflush(stdout); - } - (void) command("XCWD %s", argv[1]); - } -} - -/* - * Set current working directory - * on local machine. - */ -void lcd(argc, argv) - char *argv[]; -{ - char buf[MAXPATHLEN]; - - if (argc < 2) - argc++, argv[1] = home; - if (argc != 2) { - printf("usage:%s local-directory\n", argv[0]); - (void) fflush(stdout); - code = -1; - return; - } - if (!globulize(&argv[1])) { - code = -1; - return; - } - if (chdir(argv[1]) < 0) { - perror(argv[1]); - code = -1; - return; - } - printf("Local directory now %s\n", getcwd(buf,sizeof(buf))); - (void) fflush(stdout); - code = 0; -} - -/* - * Delete a single file. - */ -void delete(argc, argv) - char *argv[]; -{ - - if (argc < 2) { - (void) strcat(line, " "); - printf("(remote-file) "); - (void) fflush(stdout); - (void) gets(&line[strlen(line)]); - makeargv(); - argc = margc; - argv = margv; - } - if (argc < 2) { - printf("usage:%s remote-file\n", argv[0]); - (void) fflush(stdout); - code = -1; - return; - } - (void) command("DELE %s", argv[1]); -} - -/* - * Delete multiple files. - */ -void mdelete(argc, argv) - char *argv[]; -{ - char *cp; - int ointer; - void mabort(); - extern jmp_buf jabort; - - if (argc < 2) { - (void) strcat(line, " "); - printf("(remote-files) "); - (void) fflush(stdout); - (void) gets(&line[strlen(line)]); - makeargv(); - argc = margc; - argv = margv; - } - if (argc < 2) { - printf("usage:%s remote-files\n", argv[0]); - (void) fflush(stdout); - code = -1; - return; - } - mname = argv[0]; - mflag = 1; -// oldintr = signal(SIGINT, mabort); - (void) setjmp(jabort); - while ((cp = remglob(argv,0)) != NULL) { - if (*cp == '\0') { - mflag = 0; - continue; - } - if (mflag && confirm(argv[0], cp)) { - (void) command("DELE %s", cp); - if (!mflag && fromatty) { - ointer = interactive; - interactive = 1; - if (confirm("Continue with", "mdelete")) { - mflag++; - } - interactive = ointer; - } - } - } -// (void) signal(SIGINT, oldintr); - mflag = 0; -} - -/* - * Rename a remote file. - */ -void renamefile(argc, argv) - char *argv[]; -{ - - if (argc < 2) { - (void) strcat(line, " "); - printf("(from-name) "); - (void) fflush(stdout); - (void) gets(&line[strlen(line)]); - makeargv(); - argc = margc; - argv = margv; - } - if (argc < 2) { -usage: - printf("%s from-name to-name\n", argv[0]); - (void) fflush(stdout); - code = -1; - return; - } - if (argc < 3) { - (void) strcat(line, " "); - printf("(to-name) "); - (void) fflush(stdout); - (void) gets(&line[strlen(line)]); - makeargv(); - argc = margc; - argv = margv; - } - if (argc < 3) - goto usage; - if (command("RNFR %s", argv[1]) == CONTINUE) - (void) command("RNTO %s", argv[2]); -} - -/* - * Get a directory listing - * of remote files. - */ -void ls(argc, argv) - char *argv[]; -{ - char *cmd; - - if (argc < 2) - argc++, argv[1] = NULL; - if (argc < 3) - argc++, argv[2] = "-"; - if (argc > 3) { - printf("usage: %s remote-directory local-file\n", argv[0]); - (void) fflush(stdout); - code = -1; - return; - } - cmd = argv[0][0] == 'n' ? "NLST" : "LIST"; -// cmd = argv[0][0] == 'n' ? "NLST -CF" : "NLST -CF"; - if (strcmp(argv[2], "-") && !globulize(&argv[2])) { - code = -1; - return; - } - if (strcmp(argv[2], "-") && *argv[2] != '|') - if (!globulize(&argv[2]) || !confirm("output to local-file:", argv[2])) { - code = -1; - return; - } - recvrequest(cmd, argv[2], argv[1], "w", 0); -} - -/* - * Get a directory listing - * of multiple remote files. - */ -void mls(argc, argv) - char *argv[]; -{ - char *cmd, mode[1], *dest; - int ointer, i; - void mabort(); - extern jmp_buf jabort; - - if (argc < 2) { - (void) strcat(line, " "); - printf("(remote-files) "); - (void) fflush(stdout); - (void) gets(&line[strlen(line)]); - makeargv(); - argc = margc; - argv = margv; - } - if (argc < 3) { - (void) strcat(line, " "); - printf("(local-file) "); - (void) fflush(stdout); - (void) gets(&line[strlen(line)]); - makeargv(); - argc = margc; - argv = margv; - } - if (argc < 3) { - printf("usage:%s remote-files local-file\n", argv[0]); - (void) fflush(stdout); - code = -1; - return; - } - dest = argv[argc - 1]; - argv[argc - 1] = NULL; - if (strcmp(dest, "-") && *dest != '|') - if (!globulize(&dest) || !confirm("output to local-file:", dest)) { - code = -1; - return; - } - cmd = argv[0][1] == 'l' ? "NLST" : "LIST"; - mname = argv[0]; - mflag = 1; -// oldintr = signal(SIGINT, mabort); - (void) setjmp(jabort); - for (i = 1; mflag && i < argc-1; ++i) { - *mode = (i == 1) ? 'w' : 'a'; - recvrequest(cmd, dest, argv[i], mode, 0); - if (!mflag && fromatty) { - ointer = interactive; - interactive = 1; - if (confirm("Continue with", argv[0])) { - mflag ++; - } - interactive = ointer; - } - } -// (void) signal(SIGINT, oldintr); - mflag = 0; -} - -/* - * Do a shell escape - */ -/*ARGSUSED*/ -shell(argc, argv) - char *argv[]; -{ -#if 0 - int pid; - sig_t (*old1)(), (*old2)(); - char shellnam[40], *shell, *namep; - union wait status; - - old1 = signal (SIGINT, SIG_IGN); - old2 = signal (SIGQUIT, SIG_IGN); - if ((pid = fork()) == 0) { - for (pid = 3; pid < 20; pid++) - (void) close(pid); - (void) signal(SIGINT, SIG_DFL); - (void) signal(SIGQUIT, SIG_DFL); - shell = getenv("SHELL"); - if (shell == NULL) - shell = _PATH_BSHELL; - namep = rindex(shell,'/'); - if (namep == NULL) - namep = shell; - (void) strcpy(shellnam,"-"); - (void) strcat(shellnam, ++namep); - if (strcmp(namep, "sh") != 0) - shellnam[0] = '+'; - if (debug) { - printf ("%s\n", shell); - (void) fflush (stdout); - } - if (argc > 1) { - execl(shell,shellnam,"-c",altarg,(char *)0); - } - else { - execl(shell,shellnam,(char *)0); - } - perror(shell); - code = -1; - exit(1); - } - if (pid > 0) - while (wait(&status) != pid) - ; - (void) signal(SIGINT, old1); - (void) signal(SIGQUIT, old2); - if (pid == -1) { - perror("Try again later"); - code = -1; - } - else { - code = 0; - } -#endif - - char * AppName; - char ShellCmd[MAX_PATH]; - char CmdLine[MAX_PATH]; - int i; - PROCESS_INFORMATION ProcessInformation; - BOOL Result; - STARTUPINFO StartupInfo; - char ShellName[] = "COMSPEC"; - int NumBytes; - - NumBytes = GetEnvironmentVariable( ShellName, ShellCmd, MAX_PATH); - - if (NumBytes == 0) - { - return(-1); - } - - AppName = ShellCmd; - strcpy( CmdLine, ShellCmd ); - - if (argc > 1) - { - strncat(CmdLine, " /C", MAX_PATH); - } - - for (i=1; i 4) { - printf("usage: %s username [password] [account]\n", argv[0]); - (void) fflush(stdout); - code = -1; - return (0); - } - n = command("USER %s", argv[1]); - if (n == CONTINUE) { - if (argc < 3 ) - argv[2] = getpass("Password: "), argc++; - n = command("PASS %s", argv[2]); - } - if (n == CONTINUE) { - if (argc < 4) { - printf("Account: "); (void) fflush(stdout); - (void) fflush(stdout); - (void) fgets(acct, sizeof(acct) - 1, stdin); - acct[strlen(acct) - 1] = '\0'; - argv[3] = acct; argc++; - } - n = command("ACCT %s", argv[3]); - aflag++; - } - if (n != COMPLETE) { - fprintf(stdout, "Login failed.\n"); - (void) fflush(stdout); - return (0); - } - if (!aflag && argc == 4) { - (void) command("ACCT %s", argv[3]); - } - return (1); -} - -/* - * Print working directory. - */ -/*VARARGS*/ -void pwd() -{ - int oldverbose = verbose; - - /* - * If we aren't verbose, this doesn't do anything! - */ - verbose = 1; - if (command("PWD") == ERROR && code == 500) { - printf("PWD command not recognized, trying XPWD\n"); - (void) fflush(stdout); - (void) command("XPWD"); - } - verbose = oldverbose; -} - -/* - * Make a directory. - */ -void makedir(argc, argv) - char *argv[]; -{ - - if (argc < 2) { - (void) strcat(line, " "); - printf("(directory-name) "); - (void) fflush(stdout); - (void) gets(&line[strlen(line)]); - makeargv(); - argc = margc; - argv = margv; - } - if (argc < 2) { - printf("usage: %s directory-name\n", argv[0]); - (void) fflush(stdout); - code = -1; - return; - } - if (command("MKD %s", argv[1]) == ERROR && code == 500) { - if (verbose) { - printf("MKD command not recognized, trying XMKD\n"); - (void) fflush(stdout); - } - (void) command("XMKD %s", argv[1]); - } -} - -/* - * Remove a directory. - */ -void removedir(argc, argv) - char *argv[]; -{ - - if (argc < 2) { - (void) strcat(line, " "); - printf("(directory-name) "); - (void) fflush(stdout); - (void) gets(&line[strlen(line)]); - makeargv(); - argc = margc; - argv = margv; - } - if (argc < 2) { - printf("usage: %s directory-name\n", argv[0]); - (void) fflush(stdout); - code = -1; - return; - } - if (command("RMD %s", argv[1]) == ERROR && code == 500) { - if (verbose) { - printf("RMD command not recognized, trying XRMD\n"); - (void) fflush(stdout); - } - (void) command("XRMD %s", argv[1]); - } -} - -/* - * Send a line, verbatim, to the remote machine. - */ -void quote(argc, argv) - char *argv[]; -{ - int i; - char buf[BUFSIZ]; - - if (argc < 2) { - (void) strcat(line, " "); - printf("(command line to send) "); - (void) fflush(stdout); - (void) gets(&line[strlen(line)]); - makeargv(); - argc = margc; - argv = margv; - } - if (argc < 2) { - printf("usage: %s line-to-send\n", argv[0]); - (void) fflush(stdout); - code = -1; - return; - } - (void) strcpy(buf, argv[1]); - for (i = 2; i < argc; i++) { - (void) strcat(buf, " "); - (void) strcat(buf, argv[i]); - } - if (command(buf) == PRELIM) { - while (getreply(0) == PRELIM); - } -} - -/* - * Send a SITE command to the remote machine. The line - * is sent almost verbatim to the remote machine, the - * first argument is changed to SITE. - */ - -void site(argc, argv) - char *argv[]; -{ - int i; - char buf[BUFSIZ]; - - if (argc < 2) { - (void) strcat(line, " "); - printf("(arguments to SITE command) "); - (void) fflush(stdout); - (void) gets(&line[strlen(line)]); - makeargv(); - argc = margc; - argv = margv; - } - if (argc < 2) { - printf("usage: %s line-to-send\n", argv[0]); - (void) fflush(stdout); - code = -1; - return; - } - (void) strcpy(buf, "SITE "); - (void) strcat(buf, argv[1]); - for (i = 2; i < argc; i++) { - (void) strcat(buf, " "); - (void) strcat(buf, argv[i]); - } - if (command(buf) == PRELIM) { - while (getreply(0) == PRELIM); - } -} - -void do_chmod(argc, argv) - char *argv[]; -{ - if (argc == 2) { - printf("usage: %s mode file-name\n", argv[0]); - (void) fflush(stdout); - code = -1; - return; - } - if (argc < 3) { - (void) strcat(line, " "); - printf("(mode and file-name) "); - (void) fflush(stdout); - (void) gets(&line[strlen(line)]); - makeargv(); - argc = margc; - argv = margv; - } - if (argc != 3) { - printf("usage: %s mode file-name\n", argv[0]); - (void) fflush(stdout); - code = -1; - return; - } - (void)command("SITE CHMOD %s %s", argv[1], argv[2]); -} - -void do_umask(argc, argv) - char *argv[]; -{ - int oldverbose = verbose; - - verbose = 1; - (void) command(argc == 1 ? "SITE UMASK" : "SITE UMASK %s", argv[1]); - verbose = oldverbose; -} - -void idle(argc, argv) - char *argv[]; -{ - int oldverbose = verbose; - - verbose = 1; - (void) command(argc == 1 ? "SITE IDLE" : "SITE IDLE %s", argv[1]); - verbose = oldverbose; -} - -/* - * Ask the other side for help. - */ -void rmthelp(argc, argv) - char *argv[]; -{ - int oldverbose = verbose; - - verbose = 1; - (void) command(argc == 1 ? "HELP" : "HELP %s", argv[1]); - verbose = oldverbose; -} - -/* - * Terminate session and exit. - */ -/*VARARGS*/ -void quit() -{ - - if (connected) - disconnect(); - pswitch(1); - if (connected) { - disconnect(); - } - exit(0); -} - -/* - * Terminate session, but don't exit. - */ -void disconnect() -{ - extern int cout; - extern int data; - - if (!connected) - return; - (void) command("QUIT"); - cout = (int) NULL; - connected = 0; - data = -1; - if (!proxy) { - macnum = 0; - } -} - -confirm(cmd, file) - char *cmd, *file; -{ - char line[BUFSIZ]; - - if (!interactive) - return (1); - printf("%s %s? ", cmd, file); - (void) fflush(stdout); - (void) gets(line); - return (*line != 'n' && *line != 'N'); -} - -void fatal(msg) - char *msg; -{ - - fprintf(stderr, "ftp: %s\n", msg); - exit(1); -} - -/* - * Glob a local file name specification with - * the expectation of a single return value. - * Can't control multiple values being expanded - * from the expression, we return only the first. - */ -globulize(cpp) - char **cpp; -{ - char **globbed; - - if (!doglob) - return (1); - globbed = glob(*cpp); - if (globerr != NULL) { - printf("%s: %s\n", *cpp, globerr); - (void) fflush(stdout); - if (globbed) { - blkfree(globbed); - free((char *)globbed); - } - return (0); - } - if (globbed) { - *cpp = *globbed++; - /* don't waste too much memory */ - if (*globbed) { - blkfree(globbed); - free((char *)globbed); - } - } - return (1); -} - -void account(argc,argv) - int argc; - char **argv; -{ - char acct[50], *getpass(), *ap; - - if (argc > 1) { - ++argv; - --argc; - (void) strncpy(acct,*argv,49); - acct[49] = '\0'; - while (argc > 1) { - --argc; - ++argv; - (void) strncat(acct,*argv, 49-strlen(acct)); - } - ap = acct; - } - else { - ap = getpass("Account:"); - } - (void) command("ACCT %s", ap); -} - -jmp_buf abortprox; - -void -proxabort() -{ - extern int proxy; - - if (!proxy) { - pswitch(1); - } - if (connected) { - proxflag = 1; - } - else { - proxflag = 0; - } - pswitch(0); - longjmp(abortprox,1); -} - -void doproxy(argc,argv) - int argc; - char *argv[]; -{ - void proxabort(); - register struct cmd *c; - struct cmd *getcmd(); - extern struct cmd cmdtab[]; - extern jmp_buf abortprox; - - if (argc < 2) { - (void) strcat(line, " "); - printf("(command) "); - (void) fflush(stdout); - (void) gets(&line[strlen(line)]); - makeargv(); - argc = margc; - argv = margv; - } - if (argc < 2) { - printf("usage:%s command\n", argv[0]); - (void) fflush(stdout); - code = -1; - return; - } - c = getcmd(argv[1]); - if (c == (struct cmd *) -1) { - printf("?Ambiguous command\n"); - (void) fflush(stdout); - code = -1; - return; - } - if (c == 0) { - printf("?Invalid command\n"); - (void) fflush(stdout); - code = -1; - return; - } - if (!c->c_proxy) { - printf("?Invalid proxy command\n"); - (void) fflush(stdout); - code = -1; - return; - } - if (setjmp(abortprox)) { - code = -1; - return; - } -// oldintr = signal(SIGINT, proxabort); - pswitch(1); - if (c->c_conn && !connected) { - printf("Not connected\n"); - (void) fflush(stdout); - pswitch(0); -// (void) signal(SIGINT, oldintr); - code = -1; - return; - } - (*c->c_handler)(argc-1, argv+1); - if (connected) { - proxflag = 1; - } - else { - proxflag = 0; - } - pswitch(0); -// (void) signal(SIGINT, oldintr); -} - -void setcase() -{ - mcase = !mcase; - printf("Case mapping %s.\n", onoff(mcase)); - (void) fflush(stdout); - code = mcase; -} - -void setcr() -{ - crflag = !crflag; - printf("Carriage Return stripping %s.\n", onoff(crflag)); - (void) fflush(stdout); - code = crflag; -} - -void setntrans(argc,argv) - int argc; - char *argv[]; -{ - if (argc == 1) { - ntflag = 0; - printf("Ntrans off.\n"); - (void) fflush(stdout); - code = ntflag; - return; - } - ntflag++; - code = ntflag; - (void) strncpy(ntin, argv[1], 16); - ntin[16] = '\0'; - if (argc == 2) { - ntout[0] = '\0'; - return; - } - (void) strncpy(ntout, argv[2], 16); - ntout[16] = '\0'; -} - -char * -dotrans(name) - char *name; -{ - static char new[MAXPATHLEN]; - char *cp1, *cp2 = new; - register int i, ostop, found; - - for (ostop = 0; *(ntout + ostop) && ostop < 16; ostop++); - for (cp1 = name; *cp1; cp1++) { - found = 0; - for (i = 0; *(ntin + i) && i < 16; i++) { - if (*cp1 == *(ntin + i)) { - found++; - if (i < ostop) { - *cp2++ = *(ntout + i); - } - break; - } - } - if (!found) { - *cp2++ = *cp1; - } - } - *cp2 = '\0'; - return(new); -} - - -void -setpassive(argc, argv) - int argc; - char *argv[]; -{ - passivemode = !passivemode; - printf("Passive mode %s.\n", onoff(passivemode)); - (void) fflush(stdout); - code = passivemode; -} - -void setnmap(argc, argv) - int argc; - char *argv[]; -{ - char *cp; - - if (argc == 1) { - mapflag = 0; - printf("Nmap off.\n"); - (void) fflush(stdout); - code = mapflag; - return; - } - if (argc < 3) { - (void) strcat(line, " "); - printf("(mapout) "); - (void) fflush(stdout); - (void) gets(&line[strlen(line)]); - makeargv(); - argc = margc; - argv = margv; - } - if (argc < 3) { - printf("Usage: %s [mapin mapout]\n",argv[0]); - (void) fflush(stdout); - code = -1; - return; - } - mapflag = 1; - code = 1; - cp = index(altarg, ' '); - if (proxy) { - while(*++cp == ' '); - altarg = cp; - cp = index(altarg, ' '); - } - *cp = '\0'; - (void) strncpy(mapin, altarg, MAXPATHLEN - 1); - while (*++cp == ' '); - (void) strncpy(mapout, cp, MAXPATHLEN - 1); -} - -char * -domap(name) - char *name; -{ - static char new[MAXPATHLEN]; - register char *cp1 = name, *cp2 = mapin; - char *tp[9], *te[9]; - int i, toks[9], toknum = 0, match = 1; - - for (i=0; i < 9; ++i) { - toks[i] = 0; - } - while (match && *cp1 && *cp2) { - switch (*cp2) { - case '\\': - if (*++cp2 != *cp1) { - match = 0; - } - break; - case '$': - if (*(cp2+1) >= '1' && (*cp2+1) <= '9') { - if (*cp1 != *(++cp2+1)) { - toks[toknum = *cp2 - '1']++; - tp[toknum] = cp1; - while (*++cp1 && *(cp2+1) - != *cp1); - te[toknum] = cp1; - } - cp2++; - break; - } - /* FALLTHROUGH */ - default: - if (*cp2 != *cp1) { - match = 0; - } - break; - } - if (match && *cp1) { - cp1++; - } - if (match && *cp2) { - cp2++; - } - } - if (!match && *cp1) /* last token mismatch */ - { - toks[toknum] = 0; - } - cp1 = new; - *cp1 = '\0'; - cp2 = mapout; - while (*cp2) { - match = 0; - switch (*cp2) { - case '\\': - if (*(cp2 + 1)) { - *cp1++ = *++cp2; - } - break; - case '[': -LOOP: - if (*++cp2 == '$' && isdigit(*(cp2+1))) { - if (*++cp2 == '0') { - char *cp3 = name; - - while (*cp3) { - *cp1++ = *cp3++; - } - match = 1; - } - else if (toks[toknum = *cp2 - '1']) { - char *cp3 = tp[toknum]; - - while (cp3 != te[toknum]) { - *cp1++ = *cp3++; - } - match = 1; - } - } - else { - while (*cp2 && *cp2 != ',' && - *cp2 != ']') { - if (*cp2 == '\\') { - cp2++; - } - else if (*cp2 == '$' && - isdigit(*(cp2+1))) { - if (*++cp2 == '0') { - char *cp3 = name; - - while (*cp3) { - *cp1++ = *cp3++; - } - } - else if (toks[toknum = - *cp2 - '1']) { - char *cp3=tp[toknum]; - - while (cp3 != - te[toknum]) { - *cp1++ = *cp3++; - } - } - } - else if (*cp2) { - *cp1++ = *cp2++; - } - } - if (!*cp2) { - printf("nmap: unbalanced brackets\n"); - (void) fflush(stdout); - return(name); - } - match = 1; - cp2--; - } - if (match) { - while (*++cp2 && *cp2 != ']') { - if (*cp2 == '\\' && *(cp2 + 1)) { - cp2++; - } - } - if (!*cp2) { - printf("nmap: unbalanced brackets\n"); - (void) fflush(stdout); - return(name); - } - break; - } - switch (*++cp2) { - case ',': - goto LOOP; - case ']': - break; - default: - cp2--; - goto LOOP; - } - break; - case '$': - if (isdigit(*(cp2 + 1))) { - if (*++cp2 == '0') { - char *cp3 = name; - - while (*cp3) { - *cp1++ = *cp3++; - } - } - else if (toks[toknum = *cp2 - '1']) { - char *cp3 = tp[toknum]; - - while (cp3 != te[toknum]) { - *cp1++ = *cp3++; - } - } - break; - } - /* intentional drop through */ - default: - *cp1++ = *cp2; - break; - } - cp2++; - } - *cp1 = '\0'; - if (!*new) { - return(name); - } - return(new); -} - -void setsunique() -{ - sunique = !sunique; - printf("Store unique %s.\n", onoff(sunique)); - (void) fflush(stdout); - code = sunique; -} - -void setrunique() -{ - runique = !runique; - printf("Receive unique %s.\n", onoff(runique)); - (void) fflush(stdout); - code = runique; -} - -/* change directory to perent directory */ -void cdup() -{ - if (command("CDUP") == ERROR && code == 500) { - if (verbose) { - printf("CDUP command not recognized, trying XCUP\n"); - (void) fflush(stdout); - } - (void) command("XCUP"); - } -} - -/* restart transfer at specific point */ -void restart(argc, argv) - int argc; - char *argv[]; -{ - extern long atol(); - if (argc != 2) - printf("restart: offset not specified\n"); - else { - restart_point = atol(argv[1]); - printf("restarting at %ld. %s\n", restart_point, - "execute get, put or append to initiate transfer"); - } - (void) fflush(stdout); -} - -/* show remote system type */ -void syst() -{ - (void) command("SYST"); -} - -void macdef(argc, argv) - int argc; - char *argv[]; -{ - char *tmp; - int c; - - if (macnum == 16) { - printf("Limit of 16 macros have already been defined\n"); - (void) fflush(stdout); - code = -1; - return; - } - if (argc < 2) { - (void) strcat(line, " "); - printf("(macro name) "); - (void) fflush(stdout); - (void) gets(&line[strlen(line)]); - makeargv(); - argc = margc; - argv = margv; - } - if (argc != 2) { - printf("Usage: %s macro_name\n",argv[0]); - (void) fflush(stdout); - code = -1; - return; - } - if (interactive) { - printf("Enter macro line by line, terminating it with a null line\n"); - (void) fflush(stdout); - } - (void) strncpy(macros[macnum].mac_name, argv[1], 8); - if (macnum == 0) { - macros[macnum].mac_start = macbuf; - } - else { - macros[macnum].mac_start = macros[macnum - 1].mac_end + 1; - } - tmp = macros[macnum].mac_start; - while (tmp != macbuf+4096) { - if ((c = getchar()) == EOF) { - printf("macdef:end of file encountered\n"); - (void) fflush(stdout); - code = -1; - return; - } - if ((*tmp = c) == '\n') { - if (tmp == macros[macnum].mac_start) { - macros[macnum++].mac_end = tmp; - code = 0; - return; - } - if (*(tmp-1) == '\0') { - macros[macnum++].mac_end = tmp - 1; - code = 0; - return; - } - *tmp = '\0'; - } - tmp++; - } - while (1) { - while ((c = getchar()) != '\n' && c != EOF) - /* LOOP */; - if (c == EOF || getchar() == '\n') { - printf("Macro not defined - 4k buffer exceeded\n"); - (void) fflush(stdout); - code = -1; - return; - } - } -} - -/* - * get size of file on remote machine - */ -void sizecmd(argc, argv) - char *argv[]; -{ - - if (argc < 2) { - (void) strcat(line, " "); - printf("(filename) "); - (void) fflush(stdout); - (void) gets(&line[strlen(line)]); - makeargv(); - argc = margc; - argv = margv; - } - if (argc < 2) { - printf("usage:%s filename\n", argv[0]); - (void) fflush(stdout); - code = -1; - return; - } - (void) command("SIZE %s", argv[1]); -} - -/* - * get last modification time of file on remote machine - */ -void modtime(argc, argv) - char *argv[]; -{ - int overbose; - - if (argc < 2) { - (void) strcat(line, " "); - printf("(filename) "); - (void) fflush(stdout); - (void) gets(&line[strlen(line)]); - makeargv(); - argc = margc; - argv = margv; - } - if (argc < 2) { - printf("usage:%s filename\n", argv[0]); - (void) fflush(stdout); - code = -1; - return; - } - overbose = verbose; - if (debug == 0) - verbose = -1; - if (command("MDTM %s", argv[1]) == COMPLETE) { - int yy, mo, day, hour, min, sec; - sscanf(reply_string, "%*s %04d%02d%02d%02d%02d%02d", &yy, &mo, - &day, &hour, &min, &sec); - /* might want to print this in local time */ - printf("%s\t%02d/%02d/%04d %02d:%02d:%02d GMT\n", argv[1], - mo, day, yy, hour, min, sec); - } else - printf("%s\n", reply_string); - verbose = overbose; - (void) fflush(stdout); -} - -/* - * show status on reomte machine - */ -void rmtstatus(argc, argv) - char *argv[]; -{ - (void) command(argc > 1 ? "STAT %s" : "STAT" , argv[1]); -} - -/* - * get file if modtime is more recent than current file - */ -void newer(argc, argv) - char *argv[]; -{ - if (getit(argc, argv, -1, "w")) { - printf("Local file \"%s\" is newer than remote file \"%s\"\n", - argv[1], argv[2]); - (void) fflush(stdout); - } -} +/* + * Copyright (c) 1985, 1989 Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms are permitted + * provided that the above copyright notice and this paragraph are + * duplicated in all such forms and that any documentation, + * advertising materials, and other materials related to such + * distribution and use acknowledge that the software was developed + * by the University of California, Berkeley. The name of the + * University may not be used to endorse or promote products derived + * from this software without specific prior written permission. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + */ + +#ifndef lint +static char sccsid[] = "@(#)cmds.c 5.18 (Berkeley) 4/20/89"; +#endif /* not lint */ + +/* + * FTP User Program -- Command Routines. + */ +//#include +//#include +#include +#if !defined(WIN32) +#include +#include +#include +#include +#else +#include +#endif + +#include +#include +#include +#include +#include +#include + +#include "ftp_var.h" +#include "pathnames.h" +#include "prototypes.h" + +extern char *globerr; +extern char **glob(); +extern char home[]; +extern char *remglob(); +extern char *getenv(); +extern int allbinary; +extern off_t restart_point; +extern char reply_string[]; + +char *mname; +jmp_buf jabort; +char *dotrans(), *domap(); + +extern short portnum; +extern char *hostname; +extern int autologin; +/* + * Connect to peer server and + * auto-login, if possible. + */ +void setpeer(int argc, char *argv[]) +{ + char *host, *hookup(); + + if (connected) { + printf("Already connected to %s, use close first.\n", + hostname); + (void) fflush(stdout); + code = -1; + return; + } + if (argc < 2) { + (void) strcat(line, " "); + printf("(to) "); + (void) fflush(stdout); + (void) gets(&line[strlen(line)]); + makeargv(); + argc = margc; + argv = margv; + } + if (argc > 3) { + printf("usage: %s host-name [port]\n", argv[0]); + (void) fflush(stdout); + code = -1; + return; + } + if (argc > 2) { + portnum = atoi(argv[2]); + if (portnum <= 0) { + printf("%s: bad port number-- %s\n", argv[1], argv[2]); + printf ("usage: %s host-name [port]\n", argv[0]); + (void) fflush(stdout); + code = -1; + return; + } + portnum = htons(portnum); + } + host = hookup(argv[1], portnum); + if (host) { +#if defined(unix) && NBBY == 8 + int overbose; +#endif + connected = 1; + if (autologin) + (void) login(argv[1]); + +#if defined(unix) && NBBY == 8 +/* + * this ifdef is to keep someone form "porting" this to an incompatible + * system and not checking this out. This way they have to think about it. + */ + overbose = verbose; + if (debug == 0) + verbose = -1; + allbinary = 0; + if (command("SYST") == COMPLETE && overbose) { + register char *cp, c; + cp = index(reply_string+4, ' '); + if (cp == NULL) + cp = index(reply_string+4, '\r'); + if (cp) { + if (cp[-1] == '.') + cp--; + c = *cp; + *cp = '\0'; + } + + printf("Remote system type is %s.\n", + reply_string+4); + if (cp) + *cp = c; + } + if (!strncmp(reply_string, "215 UNIX Type: L8", 17)) { + setbinary(); + /* allbinary = 1; this violates the RFC */ + if (overbose) + printf("Using %s mode to transfer files.\n", + typename); + } else if (overbose && + !strncmp(reply_string, "215 TOPS20", 10)) { + printf( +"Remember to set tenex mode when transfering binary files from this machine.\n"); + } + verbose = overbose; +#endif /* unix */ + } + (void) fflush(stdout); +} + +struct types { + char *t_name; + char *t_mode; + int t_type; + char *t_arg; +} types[] = { + { "ascii", "A", TYPE_A, 0 }, + { "binary", "I", TYPE_I, 0 }, + { "image", "I", TYPE_I, 0 }, + { "ebcdic", "E", TYPE_E, 0 }, + { "tenex", "L", TYPE_L, bytename }, + 0 +}; + +/* + * Set transfer type. + */ +void settype(argc, argv) + char *argv[]; +{ + register struct types *p; + int comret; + + if (argc > 2) { + char *sep; + + printf("usage: %s [", argv[0]); + sep = " "; + for (p = types; p->t_name; p++) { + printf("%s%s", sep, p->t_name); + if (*sep == ' ') + sep = " | "; + } + printf(" ]\n"); + (void) fflush(stdout); + code = -1; + return; + } + if (argc < 2) { + printf("Using %s mode to transfer files.\n", typename); + (void) fflush(stdout); + code = 0; + return; + } + for (p = types; p->t_name; p++) + if (strcmp(argv[1], p->t_name) == 0) + break; + if (p->t_name == 0) { + printf("%s: unknown mode\n", argv[1]); + (void) fflush(stdout); + code = -1; + return; + } + if ((p->t_arg != NULL) && (*(p->t_arg) != '\0')) + comret = command ("TYPE %s %s", p->t_mode, p->t_arg); + else + comret = command("TYPE %s", p->t_mode); + if (comret == COMPLETE) { + (void) strcpy(typename, p->t_name); + type = p->t_type; + } +} + +char *stype[] = { + "type", + "", + 0 +}; + +/* + * Set binary transfer type. + */ +/*VARARGS*/ +void setbinary() +{ + stype[1] = "binary"; + settype(2, stype); +} + +/* + * Set ascii transfer type. + */ +/*VARARGS*/ +void setascii() +{ + stype[1] = "ascii"; + settype(2, stype); +} + +/* + * Set tenex transfer type. + */ +/*VARARGS*/ +void settenex() +{ + stype[1] = "tenex"; + settype(2, stype); +} + +/* + * Set ebcdic transfer type. + */ +/*VARARGS*/ +void setebcdic() +{ + stype[1] = "ebcdic"; + settype(2, stype); +} + +/* + * Set file transfer mode. + */ +#if 0 +/*ARGSUSED*/ +void setmode(argc, argv) + char *argv[]; +{ + + printf("We only support %s mode, sorry.\n", modename); + (void) fflush(stdout); + code = -1; +} +#endif + +/* + * Set file transfer format. + */ +/*ARGSUSED*/ +void setform(argc, argv) + char *argv[]; +{ + + printf("We only support %s format, sorry.\n", formname); + (void) fflush(stdout); + code = -1; +} + +/* + * Set file transfer structure. + */ +/*ARGSUSED*/ +void setstruct(argc, argv) + char *argv[]; +{ + + printf("We only support %s structure, sorry.\n", structname); + (void) fflush(stdout); + code = -1; +} + +/* + * Send a single file. + */ +void put(argc, argv) + int argc; + char *argv[]; +{ + char *cmd; + int loc = 0; + char *oldargv1, *oldargv2; + + if (argc == 2) { + argc++; + argv[2] = argv[1]; + loc++; + } + if (argc < 2) { + (void) strcat(line, " "); + printf("(local-file) "); + (void) fflush(stdout); + (void) gets(&line[strlen(line)]); + makeargv(); + argc = margc; + argv = margv; + } + if (argc < 2) { +usage: + printf("usage:%s local-file remote-file\n", argv[0]); + (void) fflush(stdout); + code = -1; + return; + } + if (argc < 3) { + (void) strcat(line, " "); + printf("(remote-file) "); + (void) fflush(stdout); + (void) gets(&line[strlen(line)]); + makeargv(); + argc = margc; + argv = margv; + } + if (argc < 3) + goto usage; + oldargv1 = argv[1]; + oldargv2 = argv[2]; + if (!globulize(&argv[1])) { + code = -1; + return; + } + /* + * If "globulize" modifies argv[1], and argv[2] is a copy of + * the old argv[1], make it a copy of the new argv[1]. + */ + if (argv[1] != oldargv1 && argv[2] == oldargv1) { + argv[2] = argv[1]; + } + cmd = (argv[0][0] == 'a') ? "APPE" : ((sunique) ? "STOU" : "STOR"); + if (loc && ntflag) { + argv[2] = dotrans(argv[2]); + } + if (loc && mapflag) { + argv[2] = domap(argv[2]); + } + sendrequest(cmd, argv[1], argv[2], + argv[1] != oldargv1 || argv[2] != oldargv2); +} + +/* + * Send multiple files. + */ +void mput(argc, argv) + char *argv[]; +{ + register int i; + int ointer; + void mabort(); + extern jmp_buf jabort; + char *tp; + + if (argc < 2) { + (void) strcat(line, " "); + printf("(local-files) "); + (void) fflush(stdout); + (void) gets(&line[strlen(line)]); + makeargv(); + argc = margc; + argv = margv; + } + if (argc < 2) { + printf("usage:%s local-files\n", argv[0]); + (void) fflush(stdout); + code = -1; + return; + } + mname = argv[0]; + mflag = 1; +// oldintr = signal(SIGINT, mabort); + (void) setjmp(jabort); + if (proxy) { + char *cp, *tp2, tmpbuf[MAXPATHLEN]; + + while ((cp = remglob(argv,0)) != NULL) { + if (*cp == 0) { + mflag = 0; + continue; + } + if (mflag && confirm(argv[0], cp)) { + tp = cp; + if (mcase) { + while (*tp && !islower(*tp)) { + tp++; + } + if (!*tp) { + tp = cp; + tp2 = tmpbuf; + while ((*tp2 = *tp) != (int) NULL) { + if (isupper(*tp2)) { + *tp2 = 'a' + *tp2 - 'A'; + } + tp++; + tp2++; + } + } + tp = tmpbuf; + } + if (ntflag) { + tp = dotrans(tp); + } + if (mapflag) { + tp = domap(tp); + } + sendrequest((sunique) ? "STOU" : "STOR", + cp, tp, cp != tp || !interactive); + if (!mflag && fromatty) { + ointer = interactive; + interactive = 1; + if (confirm("Continue with","mput")) { + mflag++; + } + interactive = ointer; + } + } + } +// (void) signal(SIGINT, oldintr); + mflag = 0; + return; + } + for (i = 1; i < argc; i++) { + register char **cpp, **gargs; + + if (!doglob) { + if (mflag && confirm(argv[0], argv[i])) { + tp = (ntflag) ? dotrans(argv[i]) : argv[i]; + tp = (mapflag) ? domap(tp) : tp; + sendrequest((sunique) ? "STOU" : "STOR", + argv[i], tp, tp != argv[i] || !interactive); + if (!mflag && fromatty) { + ointer = interactive; + interactive = 1; + if (confirm("Continue with","mput")) { + mflag++; + } + interactive = ointer; + } + } + continue; + } + gargs = glob(argv[i]); + if (globerr != NULL) { + printf("%s\n", globerr); + (void) fflush(stdout); + if (gargs) { + blkfree(gargs); + free((char *)gargs); + } + continue; + } + for (cpp = gargs; cpp && *cpp != NULL; cpp++) { + if (mflag && confirm(argv[0], *cpp)) { + tp = (ntflag) ? dotrans(*cpp) : *cpp; + tp = (mapflag) ? domap(tp) : tp; + sendrequest((sunique) ? "STOU" : "STOR", + *cpp, tp, *cpp != tp || !interactive); + if (!mflag && fromatty) { + ointer = interactive; + interactive = 1; + if (confirm("Continue with","mput")) { + mflag++; + } + interactive = ointer; + } + } + } + if (gargs != NULL) { + blkfree(gargs); + free((char *)gargs); + } + } +// (void) signal(SIGINT, oldintr); + mflag = 0; +} + +void reget(argc, argv) + char *argv[]; +{ + (void) getit(argc, argv, 1, "r+w"); +} + +void get(argc, argv) + char *argv[]; +{ + (void) getit(argc, argv, 0, restart_point ? "r+w" : "w" ); +} + +/* + * Receive one file. + */ +int getit(argc, argv, restartit, mode) + char *argv[]; + char *mode; +{ + int loc = 0; + char *oldargv1, *oldargv2; + + if (argc == 2) { + argc++; + argv[2] = argv[1]; + loc++; + } + if (argc < 2) { + (void) strcat(line, " "); + printf("(remote-file) "); + (void) fflush(stdout); + (void) gets(&line[strlen(line)]); + makeargv(); + argc = margc; + argv = margv; + } + if (argc < 2) { +usage: + printf("usage: %s remote-file [ local-file ]\n", argv[0]); + (void) fflush(stdout); + code = -1; + return (0); + } + if (argc < 3) { + (void) strcat(line, " "); + printf("(local-file) "); + (void) fflush(stdout); + (void) gets(&line[strlen(line)]); + makeargv(); + argc = margc; + argv = margv; + } + if (argc < 3) + goto usage; + oldargv1 = argv[1]; + oldargv2 = argv[2]; + if (!globulize(&argv[2])) { + code = -1; + return (0); + } + if (loc && mcase) { + char *tp = argv[1], *tp2, tmpbuf[MAXPATHLEN]; + + while (*tp && !islower(*tp)) { + tp++; + } + if (!*tp) { + tp = argv[2]; + tp2 = tmpbuf; + while ((*tp2 = *tp) != (int) NULL) { + if (isupper(*tp2)) { + *tp2 = 'a' + *tp2 - 'A'; + } + tp++; + tp2++; + } + argv[2] = tmpbuf; + } + } + if (loc && ntflag) + argv[2] = dotrans(argv[2]); + if (loc && mapflag) + argv[2] = domap(argv[2]); + if (restartit) { + struct stat stbuf; + int ret; + + ret = stat(argv[2], &stbuf); + if (restartit == 1) { + if (ret < 0) { + perror(argv[2]); + return (0); + } + restart_point = stbuf.st_size; + } else { + if (ret == 0) { + int overbose; + + overbose = verbose; + if (debug == 0) + verbose = -1; + if (command("MDTM %s", argv[1]) == COMPLETE) { + int yy, mo, day, hour, min, sec; + struct tm *tm; + verbose = overbose; + sscanf(reply_string, + "%*s %04d%02d%02d%02d%02d%02d", + &yy, &mo, &day, &hour, &min, &sec); + tm = gmtime(&stbuf.st_mtime); + tm->tm_mon++; + if (tm->tm_year > yy%100) + return (1); + else if (tm->tm_year == yy%100) { + if (tm->tm_mon > mo) + return (1); + } else if (tm->tm_mon == mo) { + if (tm->tm_mday > day) + return (1); + } else if (tm->tm_mday == day) { + if (tm->tm_hour > hour) + return (1); + } else if (tm->tm_hour == hour) { + if (tm->tm_min > min) + return (1); + } else if (tm->tm_min == min) { + if (tm->tm_sec > sec) + return (1); + } + } else { + printf("%s\n", reply_string); + (void) fflush(stdout); + verbose = overbose; + return (0); + } + } + } + } + + recvrequest("RETR", argv[2], argv[1], mode, + argv[1] != oldargv1 || argv[2] != oldargv2); + restart_point = 0; + return (0); +} + +void +mabort() +{ + int ointer; + extern jmp_buf jabort; + + printf("\n"); + (void) fflush(stdout); + if (mflag && fromatty) { + ointer = interactive; + interactive = 1; + if (confirm("Continue with", mname)) { + interactive = ointer; + longjmp(jabort,0); + } + interactive = ointer; + } + mflag = 0; + longjmp(jabort,0); +} + +/* + * Get multiple files. + */ +void mget(argc, argv) + char *argv[]; +{ + char *cp, *tp, *tp2, tmpbuf[MAXPATHLEN]; + int ointer; + void mabort(); + extern jmp_buf jabort; + + if (argc < 2) { + (void) strcat(line, " "); + printf("(remote-files) "); + (void) fflush(stdout); + (void) gets(&line[strlen(line)]); + makeargv(); + argc = margc; + argv = margv; + } + if (argc < 2) { + printf("usage:%s remote-files\n", argv[0]); + (void) fflush(stdout); + code = -1; + return; + } + mname = argv[0]; + mflag = 1; +// oldintr = signal(SIGINT,mabort); + (void) setjmp(jabort); + while ((cp = remglob(argv,proxy)) != NULL) { + if (*cp == '\0') { + mflag = 0; + continue; + } + if (mflag && confirm(argv[0], cp)) { + tp = cp; + if (mcase) { + while (*tp && !islower(*tp)) { + tp++; + } + if (!*tp) { + tp = cp; + tp2 = tmpbuf; + while ((*tp2 = *tp) != (int) NULL) { + if (isupper(*tp2)) { + *tp2 = 'a' + *tp2 - 'A'; + } + tp++; + tp2++; + } + } + tp = tmpbuf; + } + if (ntflag) { + tp = dotrans(tp); + } + if (mapflag) { + tp = domap(tp); + } + recvrequest("RETR", tp, cp, "w", + tp != cp || !interactive); + if (!mflag && fromatty) { + ointer = interactive; + interactive = 1; + if (confirm("Continue with","mget")) { + mflag++; + } + interactive = ointer; + } + } + } +// (void) signal(SIGINT,oldintr); + mflag = 0; +} + +char * +remglob(argv,doswitch) + char *argv[]; + int doswitch; +{ + char temp[16]; + static char buf[MAXPATHLEN]; + static FILE *ftemp = NULL; + static char **args; + int oldverbose, oldhash; + char *cp, *mode; + + if (!mflag) { + if (!doglob) { + args = NULL; + } + else { + if (ftemp) { + (void) fclose(ftemp); + ftemp = NULL; + } + } + return(NULL); + } + if (!doglob) { + if (args == NULL) + args = argv; + if ((cp = *++args) == NULL) + args = NULL; + return (cp); + } + if (ftemp == NULL) { + (void) strcpy(temp, _PATH_TMP); + (void) mktemp(temp); + oldverbose = verbose, verbose = 0; + oldhash = hash, hash = 0; + if (doswitch) { + pswitch(!proxy); + } + for (mode = "w"; *++argv != NULL; mode = "a") + recvrequest ("NLST", temp, *argv, mode, 0); + if (doswitch) { + pswitch(!proxy); + } + verbose = oldverbose; hash = oldhash; + ftemp = fopen(temp, "r"); + (void) unlink(temp); + if (ftemp == NULL) { + printf("can't find list of remote files, oops\n"); + (void) fflush(stdout); + return (NULL); + } + } + if (fgets(buf, sizeof (buf), ftemp) == NULL) { + (void) fclose(ftemp), ftemp = NULL; + return (NULL); + } + if ((cp = index(buf, '\n')) != NULL) + *cp = '\0'; + return (buf); +} + +char * +onoff(bool) + int bool; +{ + + return (bool ? "on" : "off"); +} + +/* + * Show status. + */ +/*ARGSUSED*/ +void status(argc, argv) + char *argv[]; +{ + int i; + + if (connected) + printf("Connected to %s.\n", hostname); + else + printf("Not connected.\n"); + if (!proxy) { + pswitch(1); + if (connected) { + printf("Connected for proxy commands to %s.\n", hostname); + } + else { + printf("No proxy connection.\n"); + } + pswitch(0); + } + printf("Mode: %s; Type: %s; Form: %s; Structure: %s\n", + modename, typename, formname, structname); + printf("Verbose: %s; Bell: %s; Prompting: %s; Globbing: %s\n", + onoff(verbose), onoff(bell), onoff(interactive), + onoff(doglob)); + printf("Store unique: %s; Receive unique: %s\n", onoff(sunique), + onoff(runique)); + printf("Case: %s; CR stripping: %s\n",onoff(mcase),onoff(crflag)); + if (ntflag) { + printf("Ntrans: (in) %s (out) %s\n", ntin,ntout); + } + else { + printf("Ntrans: off\n"); + } + if (mapflag) { + printf("Nmap: (in) %s (out) %s\n", mapin, mapout); + } + else { + printf("Nmap: off\n"); + } + printf("Hash mark printing: %s; Use of PORT cmds: %s\n", + onoff(hash), onoff(sendport)); + if (macnum > 0) { + printf("Macros:\n"); + for (i=0; i 1) { + val = atoi(argv[1]); + if (val < 0) { + printf("%s: bad debugging value.\n", argv[1]); + (void) fflush(stdout); + code = -1; + return; + } + } else + val = !debug; + debug = val; + if (debug) + options |= SO_DEBUG; + else + options &= ~SO_DEBUG; + printf("Debugging %s (debug=%d).\n", onoff(debug), debug); + (void) fflush(stdout); + code = debug > 0; +} + +/* + * Set current working directory + * on remote machine. + */ +void cd(argc, argv) + char *argv[]; +{ + + if (argc < 2) { + (void) strcat(line, " "); + printf("(remote-directory) "); + (void) fflush(stdout); + (void) gets(&line[strlen(line)]); + makeargv(); + argc = margc; + argv = margv; + } + if (argc < 2) { + printf("usage:%s remote-directory\n", argv[0]); + (void) fflush(stdout); + code = -1; + return; + } + if (command("CWD %s", argv[1]) == ERROR && code == 500) { + if (verbose) { + printf("CWD command not recognized, trying XCWD\n"); + (void) fflush(stdout); + } + (void) command("XCWD %s", argv[1]); + } +} + +/* + * Set current working directory + * on local machine. + */ +void lcd(argc, argv) + char *argv[]; +{ + char buf[MAXPATHLEN]; + + if (argc < 2) + argc++, argv[1] = home; + if (argc != 2) { + printf("usage:%s local-directory\n", argv[0]); + (void) fflush(stdout); + code = -1; + return; + } + if (!globulize(&argv[1])) { + code = -1; + return; + } + if (chdir(argv[1]) < 0) { + perror(argv[1]); + code = -1; + return; + } + printf("Local directory now %s\n", getcwd(buf,sizeof(buf))); + (void) fflush(stdout); + code = 0; +} + +/* + * Delete a single file. + */ +void delete(argc, argv) + char *argv[]; +{ + + if (argc < 2) { + (void) strcat(line, " "); + printf("(remote-file) "); + (void) fflush(stdout); + (void) gets(&line[strlen(line)]); + makeargv(); + argc = margc; + argv = margv; + } + if (argc < 2) { + printf("usage:%s remote-file\n", argv[0]); + (void) fflush(stdout); + code = -1; + return; + } + (void) command("DELE %s", argv[1]); +} + +/* + * Delete multiple files. + */ +void mdelete(argc, argv) + char *argv[]; +{ + char *cp; + int ointer; + void mabort(); + extern jmp_buf jabort; + + if (argc < 2) { + (void) strcat(line, " "); + printf("(remote-files) "); + (void) fflush(stdout); + (void) gets(&line[strlen(line)]); + makeargv(); + argc = margc; + argv = margv; + } + if (argc < 2) { + printf("usage:%s remote-files\n", argv[0]); + (void) fflush(stdout); + code = -1; + return; + } + mname = argv[0]; + mflag = 1; +// oldintr = signal(SIGINT, mabort); + (void) setjmp(jabort); + while ((cp = remglob(argv,0)) != NULL) { + if (*cp == '\0') { + mflag = 0; + continue; + } + if (mflag && confirm(argv[0], cp)) { + (void) command("DELE %s", cp); + if (!mflag && fromatty) { + ointer = interactive; + interactive = 1; + if (confirm("Continue with", "mdelete")) { + mflag++; + } + interactive = ointer; + } + } + } +// (void) signal(SIGINT, oldintr); + mflag = 0; +} + +/* + * Rename a remote file. + */ +void renamefile(argc, argv) + char *argv[]; +{ + + if (argc < 2) { + (void) strcat(line, " "); + printf("(from-name) "); + (void) fflush(stdout); + (void) gets(&line[strlen(line)]); + makeargv(); + argc = margc; + argv = margv; + } + if (argc < 2) { +usage: + printf("%s from-name to-name\n", argv[0]); + (void) fflush(stdout); + code = -1; + return; + } + if (argc < 3) { + (void) strcat(line, " "); + printf("(to-name) "); + (void) fflush(stdout); + (void) gets(&line[strlen(line)]); + makeargv(); + argc = margc; + argv = margv; + } + if (argc < 3) + goto usage; + if (command("RNFR %s", argv[1]) == CONTINUE) + (void) command("RNTO %s", argv[2]); +} + +/* + * Get a directory listing + * of remote files. + */ +void ls(argc, argv) + char *argv[]; +{ + char *cmd; + + if (argc < 2) + argc++, argv[1] = NULL; + if (argc < 3) + argc++, argv[2] = "-"; + if (argc > 3) { + printf("usage: %s remote-directory local-file\n", argv[0]); + (void) fflush(stdout); + code = -1; + return; + } + cmd = argv[0][0] == 'n' ? "NLST" : "LIST"; +// cmd = argv[0][0] == 'n' ? "NLST -CF" : "NLST -CF"; + if (strcmp(argv[2], "-") && !globulize(&argv[2])) { + code = -1; + return; + } + if (strcmp(argv[2], "-") && *argv[2] != '|') + if (!globulize(&argv[2]) || !confirm("output to local-file:", argv[2])) { + code = -1; + return; + } + recvrequest(cmd, argv[2], argv[1], "w", 0); +} + +/* + * Get a directory listing + * of multiple remote files. + */ +void mls(argc, argv) + char *argv[]; +{ + char *cmd, mode[1], *dest; + int ointer, i; + void mabort(); + extern jmp_buf jabort; + + if (argc < 2) { + (void) strcat(line, " "); + printf("(remote-files) "); + (void) fflush(stdout); + (void) gets(&line[strlen(line)]); + makeargv(); + argc = margc; + argv = margv; + } + if (argc < 3) { + (void) strcat(line, " "); + printf("(local-file) "); + (void) fflush(stdout); + (void) gets(&line[strlen(line)]); + makeargv(); + argc = margc; + argv = margv; + } + if (argc < 3) { + printf("usage:%s remote-files local-file\n", argv[0]); + (void) fflush(stdout); + code = -1; + return; + } + dest = argv[argc - 1]; + argv[argc - 1] = NULL; + if (strcmp(dest, "-") && *dest != '|') + if (!globulize(&dest) || !confirm("output to local-file:", dest)) { + code = -1; + return; + } + cmd = argv[0][1] == 'l' ? "NLST" : "LIST"; + mname = argv[0]; + mflag = 1; +// oldintr = signal(SIGINT, mabort); + (void) setjmp(jabort); + for (i = 1; mflag && i < argc-1; ++i) { + *mode = (i == 1) ? 'w' : 'a'; + recvrequest(cmd, dest, argv[i], mode, 0); + if (!mflag && fromatty) { + ointer = interactive; + interactive = 1; + if (confirm("Continue with", argv[0])) { + mflag ++; + } + interactive = ointer; + } + } +// (void) signal(SIGINT, oldintr); + mflag = 0; +} + +/* + * Do a shell escape + */ +/*ARGSUSED*/ +shell(argc, argv) + char *argv[]; +{ +#if 0 + int pid; + sig_t (*old1)(), (*old2)(); + char shellnam[40], *shell, *namep; + union wait status; + + old1 = signal (SIGINT, SIG_IGN); + old2 = signal (SIGQUIT, SIG_IGN); + if ((pid = fork()) == 0) { + for (pid = 3; pid < 20; pid++) + (void) close(pid); + (void) signal(SIGINT, SIG_DFL); + (void) signal(SIGQUIT, SIG_DFL); + shell = getenv("SHELL"); + if (shell == NULL) + shell = _PATH_BSHELL; + namep = rindex(shell,'/'); + if (namep == NULL) + namep = shell; + (void) strcpy(shellnam,"-"); + (void) strcat(shellnam, ++namep); + if (strcmp(namep, "sh") != 0) + shellnam[0] = '+'; + if (debug) { + printf ("%s\n", shell); + (void) fflush (stdout); + } + if (argc > 1) { + execl(shell,shellnam,"-c",altarg,(char *)0); + } + else { + execl(shell,shellnam,(char *)0); + } + perror(shell); + code = -1; + exit(1); + } + if (pid > 0) + while (wait(&status) != pid) + ; + (void) signal(SIGINT, old1); + (void) signal(SIGQUIT, old2); + if (pid == -1) { + perror("Try again later"); + code = -1; + } + else { + code = 0; + } +#endif + + char * AppName; + char ShellCmd[MAX_PATH]; + char CmdLine[MAX_PATH]; + int i; + PROCESS_INFORMATION ProcessInformation; + BOOL Result; + STARTUPINFO StartupInfo; + char ShellName[] = "COMSPEC"; + int NumBytes; + + NumBytes = GetEnvironmentVariable( ShellName, ShellCmd, MAX_PATH); + + if (NumBytes == 0) + { + return(-1); + } + + AppName = ShellCmd; + strcpy( CmdLine, ShellCmd ); + + if (argc > 1) + { + strncat(CmdLine, " /C", MAX_PATH); + } + + for (i=1; i 4) { + printf("usage: %s username [password] [account]\n", argv[0]); + (void) fflush(stdout); + code = -1; + return (0); + } + n = command("USER %s", argv[1]); + if (n == CONTINUE) { + if (argc < 3 ) + argv[2] = getpass("Password: "), argc++; + n = command("PASS %s", argv[2]); + } + if (n == CONTINUE) { + if (argc < 4) { + printf("Account: "); (void) fflush(stdout); + (void) fflush(stdout); + (void) fgets(acct, sizeof(acct) - 1, stdin); + acct[strlen(acct) - 1] = '\0'; + argv[3] = acct; argc++; + } + n = command("ACCT %s", argv[3]); + aflag++; + } + if (n != COMPLETE) { + fprintf(stdout, "Login failed.\n"); + (void) fflush(stdout); + return (0); + } + if (!aflag && argc == 4) { + (void) command("ACCT %s", argv[3]); + } + return (1); +} + +/* + * Print working directory. + */ +/*VARARGS*/ +void pwd() +{ + int oldverbose = verbose; + + /* + * If we aren't verbose, this doesn't do anything! + */ + verbose = 1; + if (command("PWD") == ERROR && code == 500) { + printf("PWD command not recognized, trying XPWD\n"); + (void) fflush(stdout); + (void) command("XPWD"); + } + verbose = oldverbose; +} + +/* + * Make a directory. + */ +void makedir(argc, argv) + char *argv[]; +{ + + if (argc < 2) { + (void) strcat(line, " "); + printf("(directory-name) "); + (void) fflush(stdout); + (void) gets(&line[strlen(line)]); + makeargv(); + argc = margc; + argv = margv; + } + if (argc < 2) { + printf("usage: %s directory-name\n", argv[0]); + (void) fflush(stdout); + code = -1; + return; + } + if (command("MKD %s", argv[1]) == ERROR && code == 500) { + if (verbose) { + printf("MKD command not recognized, trying XMKD\n"); + (void) fflush(stdout); + } + (void) command("XMKD %s", argv[1]); + } +} + +/* + * Remove a directory. + */ +void removedir(argc, argv) + char *argv[]; +{ + + if (argc < 2) { + (void) strcat(line, " "); + printf("(directory-name) "); + (void) fflush(stdout); + (void) gets(&line[strlen(line)]); + makeargv(); + argc = margc; + argv = margv; + } + if (argc < 2) { + printf("usage: %s directory-name\n", argv[0]); + (void) fflush(stdout); + code = -1; + return; + } + if (command("RMD %s", argv[1]) == ERROR && code == 500) { + if (verbose) { + printf("RMD command not recognized, trying XRMD\n"); + (void) fflush(stdout); + } + (void) command("XRMD %s", argv[1]); + } +} + +/* + * Send a line, verbatim, to the remote machine. + */ +void quote(argc, argv) + char *argv[]; +{ + int i; + char buf[BUFSIZ]; + + if (argc < 2) { + (void) strcat(line, " "); + printf("(command line to send) "); + (void) fflush(stdout); + (void) gets(&line[strlen(line)]); + makeargv(); + argc = margc; + argv = margv; + } + if (argc < 2) { + printf("usage: %s line-to-send\n", argv[0]); + (void) fflush(stdout); + code = -1; + return; + } + (void) strcpy(buf, argv[1]); + for (i = 2; i < argc; i++) { + (void) strcat(buf, " "); + (void) strcat(buf, argv[i]); + } + if (command(buf) == PRELIM) { + while (getreply(0) == PRELIM); + } +} + +/* + * Send a SITE command to the remote machine. The line + * is sent almost verbatim to the remote machine, the + * first argument is changed to SITE. + */ + +void site(argc, argv) + char *argv[]; +{ + int i; + char buf[BUFSIZ]; + + if (argc < 2) { + (void) strcat(line, " "); + printf("(arguments to SITE command) "); + (void) fflush(stdout); + (void) gets(&line[strlen(line)]); + makeargv(); + argc = margc; + argv = margv; + } + if (argc < 2) { + printf("usage: %s line-to-send\n", argv[0]); + (void) fflush(stdout); + code = -1; + return; + } + (void) strcpy(buf, "SITE "); + (void) strcat(buf, argv[1]); + for (i = 2; i < argc; i++) { + (void) strcat(buf, " "); + (void) strcat(buf, argv[i]); + } + if (command(buf) == PRELIM) { + while (getreply(0) == PRELIM); + } +} + +void do_chmod(argc, argv) + char *argv[]; +{ + if (argc == 2) { + printf("usage: %s mode file-name\n", argv[0]); + (void) fflush(stdout); + code = -1; + return; + } + if (argc < 3) { + (void) strcat(line, " "); + printf("(mode and file-name) "); + (void) fflush(stdout); + (void) gets(&line[strlen(line)]); + makeargv(); + argc = margc; + argv = margv; + } + if (argc != 3) { + printf("usage: %s mode file-name\n", argv[0]); + (void) fflush(stdout); + code = -1; + return; + } + (void)command("SITE CHMOD %s %s", argv[1], argv[2]); +} + +void do_umask(argc, argv) + char *argv[]; +{ + int oldverbose = verbose; + + verbose = 1; + (void) command(argc == 1 ? "SITE UMASK" : "SITE UMASK %s", argv[1]); + verbose = oldverbose; +} + +void idle(argc, argv) + char *argv[]; +{ + int oldverbose = verbose; + + verbose = 1; + (void) command(argc == 1 ? "SITE IDLE" : "SITE IDLE %s", argv[1]); + verbose = oldverbose; +} + +/* + * Ask the other side for help. + */ +void rmthelp(argc, argv) + char *argv[]; +{ + int oldverbose = verbose; + + verbose = 1; + (void) command(argc == 1 ? "HELP" : "HELP %s", argv[1]); + verbose = oldverbose; +} + +/* + * Terminate session and exit. + */ +/*VARARGS*/ +void quit() +{ + + if (connected) + disconnect(); + pswitch(1); + if (connected) { + disconnect(); + } + exit(0); +} + +/* + * Terminate session, but don't exit. + */ +void disconnect() +{ + extern int cout; + extern int data; + + if (!connected) + return; + (void) command("QUIT"); + cout = (int) NULL; + connected = 0; + data = -1; + if (!proxy) { + macnum = 0; + } +} + +confirm(cmd, file) + char *cmd, *file; +{ + char line[BUFSIZ]; + + if (!interactive) + return (1); + printf("%s %s? ", cmd, file); + (void) fflush(stdout); + (void) gets(line); + return (*line != 'n' && *line != 'N'); +} + +void fatal(msg) + char *msg; +{ + + fprintf(stderr, "ftp: %s\n", msg); + exit(1); +} + +/* + * Glob a local file name specification with + * the expectation of a single return value. + * Can't control multiple values being expanded + * from the expression, we return only the first. + */ +globulize(cpp) + char **cpp; +{ + char **globbed; + + if (!doglob) + return (1); + globbed = glob(*cpp); + if (globerr != NULL) { + printf("%s: %s\n", *cpp, globerr); + (void) fflush(stdout); + if (globbed) { + blkfree(globbed); + free((char *)globbed); + } + return (0); + } + if (globbed) { + *cpp = *globbed++; + /* don't waste too much memory */ + if (*globbed) { + blkfree(globbed); + free((char *)globbed); + } + } + return (1); +} + +void account(argc,argv) + int argc; + char **argv; +{ + char acct[50], *getpass(), *ap; + + if (argc > 1) { + ++argv; + --argc; + (void) strncpy(acct,*argv,49); + acct[49] = '\0'; + while (argc > 1) { + --argc; + ++argv; + (void) strncat(acct,*argv, 49-strlen(acct)); + } + ap = acct; + } + else { + ap = getpass("Account:"); + } + (void) command("ACCT %s", ap); +} + +jmp_buf abortprox; + +void +proxabort() +{ + extern int proxy; + + if (!proxy) { + pswitch(1); + } + if (connected) { + proxflag = 1; + } + else { + proxflag = 0; + } + pswitch(0); + longjmp(abortprox,1); +} + +void doproxy(argc,argv) + int argc; + char *argv[]; +{ + void proxabort(); + register struct cmd *c; + struct cmd *getcmd(); + extern struct cmd cmdtab[]; + extern jmp_buf abortprox; + + if (argc < 2) { + (void) strcat(line, " "); + printf("(command) "); + (void) fflush(stdout); + (void) gets(&line[strlen(line)]); + makeargv(); + argc = margc; + argv = margv; + } + if (argc < 2) { + printf("usage:%s command\n", argv[0]); + (void) fflush(stdout); + code = -1; + return; + } + c = getcmd(argv[1]); + if (c == (struct cmd *) -1) { + printf("?Ambiguous command\n"); + (void) fflush(stdout); + code = -1; + return; + } + if (c == 0) { + printf("?Invalid command\n"); + (void) fflush(stdout); + code = -1; + return; + } + if (!c->c_proxy) { + printf("?Invalid proxy command\n"); + (void) fflush(stdout); + code = -1; + return; + } + if (setjmp(abortprox)) { + code = -1; + return; + } +// oldintr = signal(SIGINT, proxabort); + pswitch(1); + if (c->c_conn && !connected) { + printf("Not connected\n"); + (void) fflush(stdout); + pswitch(0); +// (void) signal(SIGINT, oldintr); + code = -1; + return; + } + (*c->c_handler)(argc-1, argv+1); + if (connected) { + proxflag = 1; + } + else { + proxflag = 0; + } + pswitch(0); +// (void) signal(SIGINT, oldintr); +} + +void setcase() +{ + mcase = !mcase; + printf("Case mapping %s.\n", onoff(mcase)); + (void) fflush(stdout); + code = mcase; +} + +void setcr() +{ + crflag = !crflag; + printf("Carriage Return stripping %s.\n", onoff(crflag)); + (void) fflush(stdout); + code = crflag; +} + +void setntrans(argc,argv) + int argc; + char *argv[]; +{ + if (argc == 1) { + ntflag = 0; + printf("Ntrans off.\n"); + (void) fflush(stdout); + code = ntflag; + return; + } + ntflag++; + code = ntflag; + (void) strncpy(ntin, argv[1], 16); + ntin[16] = '\0'; + if (argc == 2) { + ntout[0] = '\0'; + return; + } + (void) strncpy(ntout, argv[2], 16); + ntout[16] = '\0'; +} + +char * +dotrans(name) + char *name; +{ + static char new[MAXPATHLEN]; + char *cp1, *cp2 = new; + register int i, ostop, found; + + for (ostop = 0; *(ntout + ostop) && ostop < 16; ostop++); + for (cp1 = name; *cp1; cp1++) { + found = 0; + for (i = 0; *(ntin + i) && i < 16; i++) { + if (*cp1 == *(ntin + i)) { + found++; + if (i < ostop) { + *cp2++ = *(ntout + i); + } + break; + } + } + if (!found) { + *cp2++ = *cp1; + } + } + *cp2 = '\0'; + return(new); +} + + +void +setpassive(argc, argv) + int argc; + char *argv[]; +{ + passivemode = !passivemode; + printf("Passive mode %s.\n", onoff(passivemode)); + (void) fflush(stdout); + code = passivemode; +} + +void setnmap(argc, argv) + int argc; + char *argv[]; +{ + char *cp; + + if (argc == 1) { + mapflag = 0; + printf("Nmap off.\n"); + (void) fflush(stdout); + code = mapflag; + return; + } + if (argc < 3) { + (void) strcat(line, " "); + printf("(mapout) "); + (void) fflush(stdout); + (void) gets(&line[strlen(line)]); + makeargv(); + argc = margc; + argv = margv; + } + if (argc < 3) { + printf("Usage: %s [mapin mapout]\n",argv[0]); + (void) fflush(stdout); + code = -1; + return; + } + mapflag = 1; + code = 1; + cp = index(altarg, ' '); + if (proxy) { + while(*++cp == ' '); + altarg = cp; + cp = index(altarg, ' '); + } + *cp = '\0'; + (void) strncpy(mapin, altarg, MAXPATHLEN - 1); + while (*++cp == ' '); + (void) strncpy(mapout, cp, MAXPATHLEN - 1); +} + +char * +domap(name) + char *name; +{ + static char new[MAXPATHLEN]; + register char *cp1 = name, *cp2 = mapin; + char *tp[9], *te[9]; + int i, toks[9], toknum = 0, match = 1; + + for (i=0; i < 9; ++i) { + toks[i] = 0; + } + while (match && *cp1 && *cp2) { + switch (*cp2) { + case '\\': + if (*++cp2 != *cp1) { + match = 0; + } + break; + case '$': + if (*(cp2+1) >= '1' && (*cp2+1) <= '9') { + if (*cp1 != *(++cp2+1)) { + toks[toknum = *cp2 - '1']++; + tp[toknum] = cp1; + while (*++cp1 && *(cp2+1) + != *cp1); + te[toknum] = cp1; + } + cp2++; + break; + } + /* FALLTHROUGH */ + default: + if (*cp2 != *cp1) { + match = 0; + } + break; + } + if (match && *cp1) { + cp1++; + } + if (match && *cp2) { + cp2++; + } + } + if (!match && *cp1) /* last token mismatch */ + { + toks[toknum] = 0; + } + cp1 = new; + *cp1 = '\0'; + cp2 = mapout; + while (*cp2) { + match = 0; + switch (*cp2) { + case '\\': + if (*(cp2 + 1)) { + *cp1++ = *++cp2; + } + break; + case '[': +LOOP: + if (*++cp2 == '$' && isdigit(*(cp2+1))) { + if (*++cp2 == '0') { + char *cp3 = name; + + while (*cp3) { + *cp1++ = *cp3++; + } + match = 1; + } + else if (toks[toknum = *cp2 - '1']) { + char *cp3 = tp[toknum]; + + while (cp3 != te[toknum]) { + *cp1++ = *cp3++; + } + match = 1; + } + } + else { + while (*cp2 && *cp2 != ',' && + *cp2 != ']') { + if (*cp2 == '\\') { + cp2++; + } + else if (*cp2 == '$' && + isdigit(*(cp2+1))) { + if (*++cp2 == '0') { + char *cp3 = name; + + while (*cp3) { + *cp1++ = *cp3++; + } + } + else if (toks[toknum = + *cp2 - '1']) { + char *cp3=tp[toknum]; + + while (cp3 != + te[toknum]) { + *cp1++ = *cp3++; + } + } + } + else if (*cp2) { + *cp1++ = *cp2++; + } + } + if (!*cp2) { + printf("nmap: unbalanced brackets\n"); + (void) fflush(stdout); + return(name); + } + match = 1; + cp2--; + } + if (match) { + while (*++cp2 && *cp2 != ']') { + if (*cp2 == '\\' && *(cp2 + 1)) { + cp2++; + } + } + if (!*cp2) { + printf("nmap: unbalanced brackets\n"); + (void) fflush(stdout); + return(name); + } + break; + } + switch (*++cp2) { + case ',': + goto LOOP; + case ']': + break; + default: + cp2--; + goto LOOP; + } + break; + case '$': + if (isdigit(*(cp2 + 1))) { + if (*++cp2 == '0') { + char *cp3 = name; + + while (*cp3) { + *cp1++ = *cp3++; + } + } + else if (toks[toknum = *cp2 - '1']) { + char *cp3 = tp[toknum]; + + while (cp3 != te[toknum]) { + *cp1++ = *cp3++; + } + } + break; + } + /* intentional drop through */ + default: + *cp1++ = *cp2; + break; + } + cp2++; + } + *cp1 = '\0'; + if (!*new) { + return(name); + } + return(new); +} + +void setsunique() +{ + sunique = !sunique; + printf("Store unique %s.\n", onoff(sunique)); + (void) fflush(stdout); + code = sunique; +} + +void setrunique() +{ + runique = !runique; + printf("Receive unique %s.\n", onoff(runique)); + (void) fflush(stdout); + code = runique; +} + +/* change directory to perent directory */ +void cdup() +{ + if (command("CDUP") == ERROR && code == 500) { + if (verbose) { + printf("CDUP command not recognized, trying XCUP\n"); + (void) fflush(stdout); + } + (void) command("XCUP"); + } +} + +/* restart transfer at specific point */ +void restart(argc, argv) + int argc; + char *argv[]; +{ + extern long atol(); + if (argc != 2) + printf("restart: offset not specified\n"); + else { + restart_point = atol(argv[1]); + printf("restarting at %ld. %s\n", restart_point, + "execute get, put or append to initiate transfer"); + } + (void) fflush(stdout); +} + +/* show remote system type */ +void syst() +{ + (void) command("SYST"); +} + +void macdef(argc, argv) + int argc; + char *argv[]; +{ + char *tmp; + int c; + + if (macnum == 16) { + printf("Limit of 16 macros have already been defined\n"); + (void) fflush(stdout); + code = -1; + return; + } + if (argc < 2) { + (void) strcat(line, " "); + printf("(macro name) "); + (void) fflush(stdout); + (void) gets(&line[strlen(line)]); + makeargv(); + argc = margc; + argv = margv; + } + if (argc != 2) { + printf("Usage: %s macro_name\n",argv[0]); + (void) fflush(stdout); + code = -1; + return; + } + if (interactive) { + printf("Enter macro line by line, terminating it with a null line\n"); + (void) fflush(stdout); + } + (void) strncpy(macros[macnum].mac_name, argv[1], 8); + if (macnum == 0) { + macros[macnum].mac_start = macbuf; + } + else { + macros[macnum].mac_start = macros[macnum - 1].mac_end + 1; + } + tmp = macros[macnum].mac_start; + while (tmp != macbuf+4096) { + if ((c = getchar()) == EOF) { + printf("macdef:end of file encountered\n"); + (void) fflush(stdout); + code = -1; + return; + } + if ((*tmp = c) == '\n') { + if (tmp == macros[macnum].mac_start) { + macros[macnum++].mac_end = tmp; + code = 0; + return; + } + if (*(tmp-1) == '\0') { + macros[macnum++].mac_end = tmp - 1; + code = 0; + return; + } + *tmp = '\0'; + } + tmp++; + } + while (1) { + while ((c = getchar()) != '\n' && c != EOF) + /* LOOP */; + if (c == EOF || getchar() == '\n') { + printf("Macro not defined - 4k buffer exceeded\n"); + (void) fflush(stdout); + code = -1; + return; + } + } +} + +/* + * get size of file on remote machine + */ +void sizecmd(argc, argv) + char *argv[]; +{ + + if (argc < 2) { + (void) strcat(line, " "); + printf("(filename) "); + (void) fflush(stdout); + (void) gets(&line[strlen(line)]); + makeargv(); + argc = margc; + argv = margv; + } + if (argc < 2) { + printf("usage:%s filename\n", argv[0]); + (void) fflush(stdout); + code = -1; + return; + } + (void) command("SIZE %s", argv[1]); +} + +/* + * get last modification time of file on remote machine + */ +void modtime(argc, argv) + char *argv[]; +{ + int overbose; + + if (argc < 2) { + (void) strcat(line, " "); + printf("(filename) "); + (void) fflush(stdout); + (void) gets(&line[strlen(line)]); + makeargv(); + argc = margc; + argv = margv; + } + if (argc < 2) { + printf("usage:%s filename\n", argv[0]); + (void) fflush(stdout); + code = -1; + return; + } + overbose = verbose; + if (debug == 0) + verbose = -1; + if (command("MDTM %s", argv[1]) == COMPLETE) { + int yy, mo, day, hour, min, sec; + sscanf(reply_string, "%*s %04d%02d%02d%02d%02d%02d", &yy, &mo, + &day, &hour, &min, &sec); + /* might want to print this in local time */ + printf("%s\t%02d/%02d/%04d %02d:%02d:%02d GMT\n", argv[1], + mo, day, yy, hour, min, sec); + } else + printf("%s\n", reply_string); + verbose = overbose; + (void) fflush(stdout); +} + +/* + * show status on reomte machine + */ +void rmtstatus(argc, argv) + char *argv[]; +{ + (void) command(argc > 1 ? "STAT %s" : "STAT" , argv[1]); +} + +/* + * get file if modtime is more recent than current file + */ +void newer(argc, argv) + char *argv[]; +{ + if (getit(argc, argv, -1, "w")) { + printf("Local file \"%s\" is newer than remote file \"%s\"\n", + argv[1], argv[2]); + (void) fflush(stdout); + } +} diff --git a/reactos/apps/utils/net/ftp/domacro.c b/reactos/apps/utils/net/ftp/domacro.c index 75905858591..a4eeed1914a 100644 --- a/reactos/apps/utils/net/ftp/domacro.c +++ b/reactos/apps/utils/net/ftp/domacro.c @@ -19,7 +19,7 @@ static char sccsid[] = "@(#)domacro.c 1.6 (Berkeley) 2/28/89"; #endif /* not lint */ -#include "ftp_var.h" +#include "ftp_var.h" #include "prototypes.h" #include diff --git a/reactos/apps/utils/net/ftp/fake.c b/reactos/apps/utils/net/ftp/fake.c index f93dc80f8bf..24f549f25a3 100644 --- a/reactos/apps/utils/net/ftp/fake.c +++ b/reactos/apps/utils/net/ftp/fake.c @@ -1,344 +1,344 @@ -#include -#include -#include -#include "prototypes.h" - -#define MAX_ASCII 100 - -int checkRecv(SOCKET s); - -int checkRecv(SOCKET s) -{ - int testVal; - fd_set sSet; - struct timeval timeout; - timeout.tv_sec = 60; - - FD_ZERO(&sSet); - - FD_SET(s, &sSet); - - testVal = select(0, &sSet, NULL, NULL, &timeout); - - if (testVal == SOCKET_ERROR) - fprintf(stderr, "Socket Error"); - - return testVal; -} - -void blkfree(char **av0) -{ - register char **av = av0; - - while (*av) - free(*av++); -} - -char *glob(register char *v) -{ - return NULL; -} - - -int sleep(int time) -{ - return time; -} - -int herror(char *string) -{ - return 0; -} -#if 0 - -int gettimeofday(struct timeval *timenow, - struct timezone *zone) -{ - time_t t; - - t = clock(); - - timenow->tv_usec = t; - timenow->tv_sec = t / CLK_TCK; - - return 0; -} - -int fgetcSocket(int s) -{ - int c; - char buffer[10]; - -// checkRecv(s); - - c = recv(s, buffer, 1, 0); - -#ifdef DEBUG_IN - printf("%c", buffer[0]); -#endif - - if (c == INVALID_SOCKET) - return c; - - if (c == 0) - return EOF; - - return buffer[0]; -} - -#else - -int fgetcSocket(int s) -{ - static int index = 0; - static int total = 0; - static unsigned char buffer[4096]; - - if (index == total) - { - index = 0; - total = recv(s, buffer, sizeof(buffer), 0); - - if (total == INVALID_SOCKET) - { - total = 0; - return ERROR; - } - - if (total == 0) - return EOF; - } - return buffer[index++]; -} - -#endif - -char *fprintfSocket(int s, char *format, ...) -{ - va_list argptr; - char buffer[10009]; - - va_start(argptr, format); - vsprintf(buffer, format, argptr); - va_end(argptr); - - send(s, buffer, strlen(buffer), 0); - - return NULL; -} - -char *fputsSocket(char *format, int s) -{ - send(s, format, strlen(format), 0); - - return NULL; -} - -int fputcSocket(int s, char putChar) -{ - char buffer[2]; - - buffer[0] = putChar; - buffer[1] = '\0'; - - if(SOCKET_ERROR==send(s, buffer, 1, 0)) { - int iret=WSAGetLastError (); - fprintf(stdout,"fputcSocket: %d\n",iret); - return 0; - } - else { - return putChar; - } -} -int fputSocket(int s, char *buffer, int len) -{ - int iret; - while(len) { - if(SOCKET_ERROR==(iret=send(s, buffer, len, 0))) - { - iret=WSAGetLastError (); - fprintf(stdout,"fputcSocket: %d\n",iret); - return 0; - } - else { - return len-=iret; - } - } - return 0; -} - -char *fgetsSocket(int s, char *string) -{ - char buffer[2] = {0}; - int i, count; - - for (i = 0, count = 1; count != 0 && buffer[0] != '\n'; i++) - { - checkRecv(s); - - count = recv(s, buffer, 1, 0); - - if (count == SOCKET_ERROR) - { - printf("Error in fgetssocket"); - return NULL; - } - - if (count == 1) - { - string[i] = buffer[0]; - - if (i == MAX_ASCII - 3) - { - count = 0; - string[++i] = '\n'; - string[++i] = '\0'; - } - } - else - { - if (i == 0) - return NULL; - else - { - string[i] = '\n'; - string[i + 1] = '\0'; // This is risky - return string; - } - - } - - } - string[i] = '\0'; - -#ifdef DEBUG_IN - printf("%s", string); -#endif - return string; -} - - -#if 0 -char *getpass(const char *prompt) -{ - static char string[64]; - - printf("%s", prompt); - - gets(string); - - return string; -} -#endif -char *getpass (const char * prompt) -{ - static char input[256]; - HANDLE in; - HANDLE err; - int count; - - in = GetStdHandle (STD_INPUT_HANDLE); - err = GetStdHandle (STD_ERROR_HANDLE); - - if (in == INVALID_HANDLE_VALUE || err == INVALID_HANDLE_VALUE) - return NULL; - - if (WriteFile (err, prompt, strlen (prompt), &count, NULL)) - { - int istty = (GetFileType (in) == FILE_TYPE_CHAR); - DWORD old_flags; - int rc; - - if (istty) - { - if (GetConsoleMode (in, &old_flags)) - SetConsoleMode (in, ENABLE_LINE_INPUT | ENABLE_PROCESSED_INPUT); - else - istty = 0; - } - /* Need to read line one byte at time to avoid blocking, if not a - tty, so always do it this way. */ - count = 0; - while (1) - { - DWORD dummy; - char one_char; - - rc = ReadFile (in, &one_char, 1, &dummy, NULL); - if (rc == 0) - break; - if (one_char == '\r') - { - /* CR is always followed by LF if reading from tty. */ - if (istty) - continue; - else - break; - } - if (one_char == '\n') - break; - /* Silently truncate password string if overly long. */ - if (count < sizeof (input) - 1) - input[count++] = one_char; - } - input[count] = '\0'; - - WriteFile (err, "\r\n", 2, &count, NULL); - if (istty) - SetConsoleMode (in, old_flags); - if (rc) - return input; - } - - return NULL; -} - -// Stubbed out here. Should be changed in Source code... -int access(const char *filename, int accessmethod) -{ - return 0; -} - -#ifndef __GNUC__ -#define EPOCHFILETIME (116444736000000000i64) -#else -#define EPOCHFILETIME (116444736000000000LL) -#endif - -struct timezone { - int tz_minuteswest; /* minutes W of Greenwich */ - int tz_dsttime; /* type of dst correction */ -}; - -__inline int gettimeofday(struct timeval *tv, struct timezone *tz) -{ - FILETIME ft; - LARGE_INTEGER li; - __int64 t; - static int tzflag; - - if (tv) - { - GetSystemTimeAsFileTime(&ft); - //li.LowPart = ft.dwLowDateTime; - //li.HighPart = ft.dwHighDateTime; - t = li.QuadPart; /* In 100-nanosecond intervals */ - t -= EPOCHFILETIME; /* Offset to the Epoch time */ - t /= 10; /* In microseconds */ - tv->tv_sec = (long)(t / 1000000); - tv->tv_usec = (long)(t % 1000000); - } - - if (tz) - { - if (!tzflag) - { - _tzset(); - tzflag++; - } - tz->tz_minuteswest = _timezone / 60; - tz->tz_dsttime = _daylight; - } - - return 0; -} +#include +#include +#include +#include "prototypes.h" + +#define MAX_ASCII 100 + +int checkRecv(SOCKET s); + +int checkRecv(SOCKET s) +{ + int testVal; + fd_set sSet; + struct timeval timeout; + timeout.tv_sec = 60; + + FD_ZERO(&sSet); + + FD_SET(s, &sSet); + + testVal = select(0, &sSet, NULL, NULL, &timeout); + + if (testVal == SOCKET_ERROR) + fprintf(stderr, "Socket Error"); + + return testVal; +} + +void blkfree(char **av0) +{ + register char **av = av0; + + while (*av) + free(*av++); +} + +char *glob(register char *v) +{ + return NULL; +} + + +int sleep(int time) +{ + return time; +} + +int herror(char *string) +{ + return 0; +} +#if 0 + +int gettimeofday(struct timeval *timenow, + struct timezone *zone) +{ + time_t t; + + t = clock(); + + timenow->tv_usec = t; + timenow->tv_sec = t / CLK_TCK; + + return 0; +} + +int fgetcSocket(int s) +{ + int c; + char buffer[10]; + +// checkRecv(s); + + c = recv(s, buffer, 1, 0); + +#ifdef DEBUG_IN + printf("%c", buffer[0]); +#endif + + if (c == INVALID_SOCKET) + return c; + + if (c == 0) + return EOF; + + return buffer[0]; +} + +#else + +int fgetcSocket(int s) +{ + static int index = 0; + static int total = 0; + static unsigned char buffer[4096]; + + if (index == total) + { + index = 0; + total = recv(s, buffer, sizeof(buffer), 0); + + if (total == INVALID_SOCKET) + { + total = 0; + return ERROR; + } + + if (total == 0) + return EOF; + } + return buffer[index++]; +} + +#endif + +char *fprintfSocket(int s, char *format, ...) +{ + va_list argptr; + char buffer[10009]; + + va_start(argptr, format); + vsprintf(buffer, format, argptr); + va_end(argptr); + + send(s, buffer, strlen(buffer), 0); + + return NULL; +} + +char *fputsSocket(char *format, int s) +{ + send(s, format, strlen(format), 0); + + return NULL; +} + +int fputcSocket(int s, char putChar) +{ + char buffer[2]; + + buffer[0] = putChar; + buffer[1] = '\0'; + + if(SOCKET_ERROR==send(s, buffer, 1, 0)) { + int iret=WSAGetLastError (); + fprintf(stdout,"fputcSocket: %d\n",iret); + return 0; + } + else { + return putChar; + } +} +int fputSocket(int s, char *buffer, int len) +{ + int iret; + while(len) { + if(SOCKET_ERROR==(iret=send(s, buffer, len, 0))) + { + iret=WSAGetLastError (); + fprintf(stdout,"fputcSocket: %d\n",iret); + return 0; + } + else { + return len-=iret; + } + } + return 0; +} + +char *fgetsSocket(int s, char *string) +{ + char buffer[2] = {0}; + int i, count; + + for (i = 0, count = 1; count != 0 && buffer[0] != '\n'; i++) + { + checkRecv(s); + + count = recv(s, buffer, 1, 0); + + if (count == SOCKET_ERROR) + { + printf("Error in fgetssocket"); + return NULL; + } + + if (count == 1) + { + string[i] = buffer[0]; + + if (i == MAX_ASCII - 3) + { + count = 0; + string[++i] = '\n'; + string[++i] = '\0'; + } + } + else + { + if (i == 0) + return NULL; + else + { + string[i] = '\n'; + string[i + 1] = '\0'; // This is risky + return string; + } + + } + + } + string[i] = '\0'; + +#ifdef DEBUG_IN + printf("%s", string); +#endif + return string; +} + + +#if 0 +char *getpass(const char *prompt) +{ + static char string[64]; + + printf("%s", prompt); + + gets(string); + + return string; +} +#endif +char *getpass (const char * prompt) +{ + static char input[256]; + HANDLE in; + HANDLE err; + int count; + + in = GetStdHandle (STD_INPUT_HANDLE); + err = GetStdHandle (STD_ERROR_HANDLE); + + if (in == INVALID_HANDLE_VALUE || err == INVALID_HANDLE_VALUE) + return NULL; + + if (WriteFile (err, prompt, strlen (prompt), &count, NULL)) + { + int istty = (GetFileType (in) == FILE_TYPE_CHAR); + DWORD old_flags; + int rc; + + if (istty) + { + if (GetConsoleMode (in, &old_flags)) + SetConsoleMode (in, ENABLE_LINE_INPUT | ENABLE_PROCESSED_INPUT); + else + istty = 0; + } + /* Need to read line one byte at time to avoid blocking, if not a + tty, so always do it this way. */ + count = 0; + while (1) + { + DWORD dummy; + char one_char; + + rc = ReadFile (in, &one_char, 1, &dummy, NULL); + if (rc == 0) + break; + if (one_char == '\r') + { + /* CR is always followed by LF if reading from tty. */ + if (istty) + continue; + else + break; + } + if (one_char == '\n') + break; + /* Silently truncate password string if overly long. */ + if (count < sizeof (input) - 1) + input[count++] = one_char; + } + input[count] = '\0'; + + WriteFile (err, "\r\n", 2, &count, NULL); + if (istty) + SetConsoleMode (in, old_flags); + if (rc) + return input; + } + + return NULL; +} + +// Stubbed out here. Should be changed in Source code... +int access(const char *filename, int accessmethod) +{ + return 0; +} + +#ifndef __GNUC__ +#define EPOCHFILETIME (116444736000000000i64) +#else +#define EPOCHFILETIME (116444736000000000LL) +#endif + +struct timezone { + int tz_minuteswest; /* minutes W of Greenwich */ + int tz_dsttime; /* type of dst correction */ +}; + +__inline int gettimeofday(struct timeval *tv, struct timezone *tz) +{ + FILETIME ft; + LARGE_INTEGER li; + __int64 t; + static int tzflag; + + if (tv) + { + GetSystemTimeAsFileTime(&ft); + //li.LowPart = ft.dwLowDateTime; + //li.HighPart = ft.dwHighDateTime; + t = li.QuadPart; /* In 100-nanosecond intervals */ + t -= EPOCHFILETIME; /* Offset to the Epoch time */ + t /= 10; /* In microseconds */ + tv->tv_sec = (long)(t / 1000000); + tv->tv_usec = (long)(t % 1000000); + } + + if (tz) + { + if (!tzflag) + { + _tzset(); + tzflag++; + } + tz->tz_minuteswest = _timezone / 60; + tz->tz_dsttime = _daylight; + } + + return 0; +} diff --git a/reactos/apps/utils/net/ftp/fake.h b/reactos/apps/utils/net/ftp/fake.h index 82197efba6a..816c7818064 100644 --- a/reactos/apps/utils/net/ftp/fake.h +++ b/reactos/apps/utils/net/ftp/fake.h @@ -1,10 +1,10 @@ -#define bcopy(s,d,l) memcpy((d),(s),(l)) -#define bzero(cp,l) memset((cp),0,(l)) - -#define rindex strrchr -#define index strchr - -#define getwd getcwd - -#define strcasecmp strcmp -#define strncasecmp strnicmp +#define bcopy(s,d,l) memcpy((d),(s),(l)) +#define bzero(cp,l) memset((cp),0,(l)) + +#define rindex strrchr +#define index strchr + +#define getwd getcwd + +#define strcasecmp strcmp +#define strncasecmp strnicmp diff --git a/reactos/apps/utils/net/ftp/ftp.c b/reactos/apps/utils/net/ftp/ftp.c index e67021279df..34d443be6a5 100644 --- a/reactos/apps/utils/net/ftp/ftp.c +++ b/reactos/apps/utils/net/ftp/ftp.c @@ -1,1805 +1,1805 @@ -#define L_SET SEEK_SET -#define L_INCR SEEK_CUR -#define caddr_t void * -/* - * Copyright (c) 1985, 1989 Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -#ifndef lint -static char sccsid[] = "@(#)ftp.c 5.28 (Berkeley) 4/20/89"; -#endif /* not lint */ -#include - -#include - -#if !defined(WIN32) -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#else -#include -#endif - -#include -#include -#include -#include - -#include "ftp_var.h" -#include "prototypes.h" -#ifndef MAXHOSTNAMELEN -#define MAXHOSTNAMELEN 64 -#endif - -#ifdef NOVFPRINTF -#define vfprintf(a,b,c) _doprnt(b,c,a) -#endif - -#ifdef sun -/* FD_SET wasn't defined until 4.0. its a cheap test for uid_t presence */ -#ifndef FD_SET -#define NBBY 8 /* number of bits in a byte */ -/* - * Select uses bit masks of file descriptors in longs. - * These macros manipulate such bit fields (the filesystem macros use chars). - * FD_SETSIZE may be defined by the user, but the default here - * should be >= NOFILE (param.h). - */ -#ifndef FD_SETSIZE -#define FD_SETSIZE 256 -#endif - -typedef long fd_mask; -#define NFDBITS (sizeof(fd_mask) * NBBY) /* bits per mask */ -#ifndef howmany -#define howmany(x, y) (((x)+((y)-1))/(y)) -#endif - -#define FD_SET(n, p) ((p)->fds_bits[(n)/NFDBITS] |= (1 << ((n) % NFDBITS))) -#define FD_CLR(n, p) ((p)->fds_bits[(n)/NFDBITS] &= ~(1 << ((n) % NFDBITS))) -#define FD_ISSET(n, p) ((p)->fds_bits[(n)/NFDBITS] & (1 << ((n) % NFDBITS))) -#define FD_ZERO(p) bzero((char *)(p), sizeof(*(p))) - -typedef int uid_t; -typedef int gid_t; -#endif -#endif - -struct sockaddr_in hisctladdr; -struct sockaddr_in data_addr; -int data = -1; -int abrtflag = 0; -int ptflag = 0; -int allbinary; -struct sockaddr_in myctladdr; -uid_t getuid(); -sig_t lostpeer(); -off_t restart_point = 0; - -int cin, cout; -int dataconn(char *mode); - -int command(char *fmt, ...); - -char *hostname; - -typedef void (*Sig_t)(int); - -// Signal Handlers - -void psabort(int sig); - -char *hookup(char *host, int port) -{ - register struct hostent *hp = 0; - int s,len; - static char hostnamebuf[80]; - - bzero((char *)&hisctladdr, sizeof (hisctladdr)); - hisctladdr.sin_addr.s_addr = inet_addr(host); - if (hisctladdr.sin_addr.s_addr != -1) { - hisctladdr.sin_family = AF_INET; - (void) strncpy(hostnamebuf, host, sizeof(hostnamebuf)); - } else { - hp = gethostbyname(host); - if (hp == NULL) { - fprintf(stderr, "ftp: %s: ", host); - herror((char *)NULL); - code = -1; - return((char *) 0); - } - hisctladdr.sin_family = hp->h_addrtype; - bcopy(hp->h_addr_list[0], - (caddr_t)&hisctladdr.sin_addr, hp->h_length); - (void) strncpy(hostnamebuf, hp->h_name, sizeof(hostnamebuf)); - } - hostname = hostnamebuf; - s = socket(hisctladdr.sin_family, SOCK_STREAM, 0); - if (s < 0) { - perror("ftp: socket"); - code = -1; - return (0); - } - hisctladdr.sin_port = port; - while (connect(s, (struct sockaddr *)&hisctladdr, sizeof (hisctladdr)) < 0) { - if (hp && hp->h_addr_list[1]) { - int oerrno = errno; - - fprintf(stderr, "ftp: connect to address %s: ", - inet_ntoa(hisctladdr.sin_addr)); - errno = oerrno; - perror((char *) 0); - hp->h_addr_list++; - bcopy(hp->h_addr_list[0], - (caddr_t)&hisctladdr.sin_addr, hp->h_length); - fprintf(stdout, "Trying %s...\n", - inet_ntoa(hisctladdr.sin_addr)); - (void) fflush(stdout); - (void) close(s); - s = socket(hisctladdr.sin_family, SOCK_STREAM, 0); - if (s < 0) { - perror("ftp: socket"); - code = -1; - return (0); - } - continue; - } - perror("ftp: connect"); - code = -1; - goto bad; - } - len = sizeof (myctladdr); - if (getsockname(s, (struct sockaddr *)&myctladdr, &len) < 0) { - perror("ftp: getsockname"); - code = -1; - goto bad; - } - cin = cout = s; - if (verbose) { - printf("Connected to %s.\n", hostname); - (void) fflush(stdout); - } - if (getreply(0) > 2) { /* read startup message from server */ - closesocket(cin); - code = -1; - goto bad; - } -#ifdef SO_OOBINLINE - { - int on = 1; - - if (setsockopt(s, SOL_SOCKET, SO_OOBINLINE, (const char *) &on, sizeof(on)) - < 0 && debug) { - perror("ftp: setsockopt"); - } - } -#endif //SO_OOBINLINE - - return (hostname); -bad: - (void) close(s); - return ((char *)0); -} - -int login(char *host) -{ - char tmp[80]; - char *user, *pass, *acct; - int n, aflag = 0; - - user = pass = acct = 0; - if (ruserpass(host, &user, &pass, &acct) < 0) { - code = -1; - return(0); - } - while (user == NULL) { - char *myname = "none"; // This needs to become the usename env - - if (myname) - printf("Name (%s:%s): ", host, myname); - else - printf("Name (%s): ", host); - (void) fflush(stdout); - (void) fgets(tmp, sizeof(tmp) - 1, stdin); - tmp[strlen(tmp) - 1] = '\0'; - if (*tmp == '\0') - user = myname; - else - user = tmp; - } - n = command("USER %s", user); - if (n == CONTINUE) { - if (pass == NULL) - pass = getpass("Password:"); - n = command("PASS %s", pass); - fflush(stdin); - } - if (n == CONTINUE) { - aflag++; - acct = getpass("Account:"); - n = command("ACCT %s", acct); - } - if (n != COMPLETE) { - fprintf(stderr, "Login failed.\n"); - return (0); - } - if (!aflag && acct != NULL) - (void) command("ACCT %s", acct); - if (proxy) - return(1); - for (n = 0; n < macnum; ++n) { - if (!strcmp("init", macros[n].mac_name)) { - (void) strcpy(line, "$init"); - makeargv(); - domacro(margc, margv); - break; - } - } - return (1); -} - -void -cmdabort(int sig) -{ - extern jmp_buf ptabort; - - printf("\n"); - (void) fflush(stdout); - abrtflag++; - if (ptflag) - longjmp(ptabort,1); -} - -/*VARARGS1*/ -int command(char *fmt, ...) -{ - va_list ap; - int r; - void (*oldintr)(int), cmdabort(int); - - abrtflag = 0; - if (debug) { - printf("---> "); - va_start(ap, fmt); - vfprintf(stdout, fmt, ap); - va_end(ap); - printf("\n"); - (void) fflush(stdout); - } - if (cout == (int) NULL) { - perror ("No control connection for command"); - code = -1; - return (0); - } - oldintr = signal(SIGINT,cmdabort); - { - char buffer[1024]; - - va_start(ap, fmt); - vsprintf(buffer, fmt, ap); - va_end(ap); -//DLJ: to work through firewalls - send the command as a single message - strcat(buffer,"\r\n"); - fprintfSocket(cout, buffer); - } -//DLJ: the following two lines are replaced by the strcat above - seems to -// make it work through firewalls. -// fprintfSocket(cout, "\r\n"); -// (void) fflush(cout); - cpend = 1; - r = getreply(!strcmp(fmt, "QUIT")); - if (abrtflag && oldintr != SIG_IGN) - (*oldintr)(SIGINT); -// (void) signal(SIGINT, oldintr); - return(r); -} - -char reply_string[BUFSIZ]; /* last line of previous reply */ - -#include - -getreply(expecteof) - int expecteof; -{ - register int c, n; - register int dig; - register char *cp; - int originalcode = 0, continuation = 0; - void (*oldintr)(int), cmdabort(int); - int pflag = 0; - char *pt = pasv; - - oldintr = signal(SIGINT,cmdabort); - for (;;) { - dig = n = code = 0; - cp = reply_string; - while ((c = fgetcSocket(cin)) != '\n') { - if (c == IAC) { /* handle telnet commands */ - switch (c = fgetcSocket(cin)) { - case WILL: - case WONT: - c = fgetcSocket(cin); - fprintfSocket(cout, "%c%c%c",IAC,DONT,c); - break; - case DO: - case DONT: - c = fgetcSocket(cin); - fprintfSocket(cout, "%c%c%c",IAC,WONT,c); - break; - default: - break; - } - continue; - } - dig++; - if (c == EOF) { - if (expecteof) { -// (void) signal(SIGINT,oldintr); - code = 221; - return (0); - } - lostpeer(); - if (verbose) { - printf("421 Service not available, remote server has closed connection\n"); - (void) fflush(stdout); - } - code = 421; - return(4); - } - if (c != '\r' && (verbose > 0 || - (verbose > -1 && n == '5' && dig > 4))) { - if (proxflag && - (dig == 1 || dig == 5 && verbose == 0)) - printf("%s:",hostname); - (void) putchar(c); - (void) fflush(stdout); - } - if (dig < 4 && isdigit(c)) - code = code * 10 + (c - '0'); - if (!pflag && code == 227) - pflag = 1; - if (dig > 4 && pflag == 1 && isdigit(c)) - pflag = 2; - if (pflag == 2) { - if (c != '\r' && c != ')') - *pt++ = c; - else { - *pt = '\0'; - pflag = 3; - } - } - if (dig == 4 && c == '-') { - if (continuation) - code = 0; - continuation++; - } - if (n == 0) - n = c; - if (cp < &reply_string[sizeof(reply_string) - 1]) - *cp++ = c; - } - if (verbose > 0 || verbose > -1 && n == '5') { - (void) putchar(c); - (void) fflush (stdout); - } - if (continuation && code != originalcode) { - if (originalcode == 0) - originalcode = code; - continue; - } - *cp = '\0'; - if (n != '1') - cpend = 0; - (void) signal(SIGINT,oldintr); - if (code == 421 || originalcode == 421) - lostpeer(); - if (abrtflag && oldintr != cmdabort && oldintr != SIG_IGN) - (*oldintr)(SIGINT); - return (n - '0'); - } -} - -empty(mask, sec) - struct fd_set *mask; - int sec; -{ - struct timeval t; - - t.tv_sec = (long) sec; - t.tv_usec = 0; - return(select(32, mask, (struct fd_set *) 0, (struct fd_set *) 0, &t)); -} - -jmp_buf sendabort; - -void abortsend() -{ - - mflag = 0; - abrtflag = 0; - printf("\nsend aborted\n"); - (void) fflush(stdout); - longjmp(sendabort, 1); -} - -#define HASHBYTES 1024 - -void sendrequest(char *cmd, char *local, char *remote, int printnames) -{ - FILE *fin; - int dout = 0; - int (*closefunc)(), _pclose(), fclose(); - sig_t (*oldintr)(), (*oldintp)(); - void abortsend(); - char buf[BUFSIZ], *bufp; - long bytes = 0, hashbytes = HASHBYTES; - register int c, d; - struct stat st; - struct timeval start, stop; - char *mode; - - if (verbose && printnames) { - if (local && *local != '-') - printf("local: %s ", local); - if (remote) - printf("remote: %s\n", remote); - (void) fflush(stdout); - } - if (proxy) { - proxtrans(cmd, local, remote); - return; - } - closefunc = NULL; - oldintr = NULL; - oldintp = NULL; - mode = "w"; - if (setjmp(sendabort)) { - while (cpend) { - (void) getreply(0); - } - if (data >= 0) { - (void) close(data); - data = -1; - } - if (oldintr) -null();// (void) signal(SIGINT,oldintr); - if (oldintp) -null();// (void) signal(SIGPIPE,oldintp); - code = -1; - return; - } -null();// oldintr = signal(SIGINT, abortsend); - if (strcmp(local, "-") == 0) - fin = stdin; - else if (*local == '|') { -null();// oldintp = signal(SIGPIPE,SIG_IGN); - fin = _popen(local + 1, "r"); - if (fin == NULL) { - perror(local + 1); -null();// (void) signal(SIGINT, oldintr); -null();// (void) signal(SIGPIPE, oldintp); - code = -1; - return; - } - closefunc = _pclose; - } else { - fin = fopen(local, "r"); - if (fin == NULL) { - perror(local); -null();// (void) signal(SIGINT, oldintr); - code = -1; - return; - } - closefunc = fclose; - if (fstat(fileno(fin), &st) < 0 || - (st.st_mode&S_IFMT) != S_IFREG) { - fprintf(stdout, "%s: not a plain file.\n", local); - (void) fflush(stdout); -null();// (void) signal(SIGINT, oldintr); - fclose(fin); - code = -1; - return; - } - } - if (initconn()) { -null();// (void) signal(SIGINT, oldintr); - if (oldintp) -null();// (void) signal(SIGPIPE, oldintp); - code = -1; - if (closefunc != NULL) - (*closefunc)(fin); - return; - } - if (setjmp(sendabort)) - goto abort; - - if (restart_point && - (strcmp(cmd, "STOR") == 0 || strcmp(cmd, "APPE") == 0)) { - if (fseek(fin, (long) restart_point, 0) < 0) { - perror(local); - restart_point = 0; - if (closefunc != NULL) - (*closefunc)(fin); - return; - } - if (command("REST %ld", (long) restart_point) - != CONTINUE) { - restart_point = 0; - if (closefunc != NULL) - (*closefunc)(fin); - return; - } - restart_point = 0; - mode = "r+w"; - } - if (remote) { - if (command("%s %s", cmd, remote) != PRELIM) { -null();// (void) signal(SIGINT, oldintr); - if (oldintp) -null();// (void) signal(SIGPIPE, oldintp); - if (closefunc != NULL) - (*closefunc)(fin); - return; - } - } else - if (command("%s", cmd) != PRELIM) { -null();// (void) signal(SIGINT, oldintr); - if (oldintp) -null();// (void) signal(SIGPIPE, oldintp); - if (closefunc != NULL) - (*closefunc)(fin); - return; - } - dout = dataconn(mode); - if (dout == (int)NULL) - goto abort; - (void) gettimeofday(&start, (struct timezone *)0); -null();// oldintp = signal(SIGPIPE, SIG_IGN); - switch (type) { - - case TYPE_I: - case TYPE_L: - errno = d = 0; - while ((c = read(fileno(fin), buf, sizeof (buf))) > 0) { - bytes += c; - for (bufp = buf; c > 0; c -= d, bufp += d) - if ((d = send(dout, bufp, c, 0)) <= 0) - break; - if (hash) { - while (bytes >= hashbytes) { - (void) putchar('#'); - hashbytes += HASHBYTES; - } - (void) fflush(stdout); - } - } - if (hash && bytes > 0) { - if (bytes < HASHBYTES) - (void) putchar('#'); - (void) putchar('\n'); - (void) fflush(stdout); - } - if (c < 0) - perror(local); - if (d <= 0) { - if (d == 0) - fprintf(stderr, "netout: write returned 0?\n"); - else if (errno != EPIPE) - perror("netout"); - bytes = -1; - } - break; - - case TYPE_A: - { - char buf[1024]; - static int bufsize = 1024; - int ipos=0; - - while ((c = getc(fin)) != EOF) { - if (c == '\n') { - while (hash && (bytes >= hashbytes)) { - (void) putchar('#'); - (void) fflush(stdout); - hashbytes += HASHBYTES; - } -// Szurgot: The following code is unncessary on Win32. -// (void) fputcSocket(dout, '\r'); -// bytes++; - } - - if (ipos >= bufsize) { - fputSocket(dout,buf,ipos); - if(!hash) (void) putchar('.'); - ipos=0; - } - buf[ipos]=c; ++ipos; - bytes++; - } - if (ipos) { - fputSocket(dout,buf,ipos); - ipos=0; - } - if (hash) { - if (bytes < hashbytes) - (void) putchar('#'); - (void) putchar('\n'); - (void) fflush(stdout); - } - else { - (void) putchar('.'); - (void) putchar('\n'); - (void) fflush(stdout); - } - if (ferror(fin)) - perror(local); -// if (ferror(dout)) { -// if (errno != EPIPE) -// perror("netout"); -// bytes = -1; -// } - break; - } - } - (void) gettimeofday(&stop, (struct timezone *)0); - if (closefunc != NULL) - (*closefunc)(fin); - if(closesocket(dout)) { - int iret=WSAGetLastError (); - fprintf(stdout,"Error closing socket(%d)\n",iret); - (void) fflush(stdout); - } - (void) getreply(0); -null();// (void) signal(SIGINT, oldintr); - if (oldintp) -null();// (void) signal(SIGPIPE, oldintp); - if (bytes > 0) - ptransfer("sent", bytes, &start, &stop); - return; -abort: - (void) gettimeofday(&stop, (struct timezone *)0); -null();// (void) signal(SIGINT, oldintr); - if (oldintp) -null();// (void) signal(SIGPIPE, oldintp); - if (!cpend) { - code = -1; - return; - } - if (data >= 0) { - (void) close(data); - data = -1; - } - if (dout) - if(closesocket(dout)) { - int iret=WSAGetLastError (); - fprintf(stdout,"Error closing socket(%d)\n",iret); - (void) fflush(stdout); - } - - (void) getreply(0); - code = -1; - if (closefunc != NULL && fin != NULL) - (*closefunc)(fin); - if (bytes > 0) - ptransfer("sent", bytes, &start, &stop); -} - -jmp_buf recvabort; - - -void abortrecv() -{ - - mflag = 0; - abrtflag = 0; - printf("\n"); - (void) fflush(stdout); - longjmp(recvabort, 1); -} - -void recvrequest(char *cmd, char *local, char *remote, char *mode, - int printnames) -{ - FILE *fout; - int din = 0; - int (*closefunc)(), _pclose(), fclose(); - void (*oldintr)(int), (*oldintp)(int); - void abortrecv(); - int oldverbose, oldtype = 0, is_retr, tcrflag, nfnd, bare_lfs = 0; - char *gunique(), msg; -// static char *buf; // Szurgot: Shouldn't this go SOMEWHERE? - char buf[1024]; - static int bufsize = 1024; - long bytes = 0, hashbytes = HASHBYTES; -// struct - fd_set mask; - register int c, d; - struct timeval start, stop; -// struct stat st; - extern void *malloc(); - - is_retr = strcmp(cmd, "RETR") == 0; - if (is_retr && verbose && printnames) { - if (local && *local != '-') - printf("local: %s ", local); - if (remote) - printf("remote: %s\n", remote); - (void) fflush(stdout); - } - if (proxy && is_retr) { - proxtrans(cmd, local, remote); - return; - } - closefunc = NULL; - oldintr = NULL; - oldintp = NULL; - tcrflag = !crflag && is_retr; - if (setjmp(recvabort)) { - while (cpend) { - (void) getreply(0); - } - if (data >= 0) { - (void) close(data); - data = -1; - } - if (oldintr) -null();// (void) signal(SIGINT, oldintr); - code = -1; - return; - } -null();// oldintr = signal(SIGINT, abortrecv); - if (strcmp(local, "-") && *local != '|') { -#ifndef __WIN32__ -// This whole thing is a problem... access Won't work on non-existent files - if (access(local, 2) < 0) { - char *dir = rindex(local, '/'); - - if (errno != ENOENT && errno != EACCES) { - perror(local); - (void) signal(SIGINT, oldintr); - code = -1; - return; - } - if (dir != NULL) - *dir = 0; - d = access(dir ? local : ".", 2); - if (dir != NULL) - *dir = '/'; - if (d < 0) { - perror(local); - (void) signal(SIGINT, oldintr); - code = -1; - return; - } - if (!runique && errno == EACCES && - chmod(local, 0600) < 0) { - perror(local); - (void) signal(SIGINT, oldintr); - code = -1; - return; - } - if (runique && errno == EACCES && - (local = gunique(local)) == NULL) { - (void) signal(SIGINT, oldintr); - code = -1; - return; - } - } - else if (runique && (local = gunique(local)) == NULL) { - (void) signal(SIGINT, oldintr); - code = -1; - return; - } -#endif - } - if (initconn()) { -null();// (void) signal(SIGINT, oldintr); - code = -1; - return; - } - if (setjmp(recvabort)) - goto abort; - if (!is_retr) { - if (type != TYPE_A && (allbinary == 0 || type != TYPE_I)) { - oldtype = type; - oldverbose = verbose; - if (!debug) - verbose = 0; - setascii(); - verbose = oldverbose; - } - } else if (restart_point) { - if (command("REST %ld", (long) restart_point) != CONTINUE) - return; - } - if (remote) { - if (command("%s %s", cmd, remote) != PRELIM) { -null();// (void) signal(SIGINT, oldintr); - if (oldtype) { - if (!debug) - verbose = 0; - switch (oldtype) { - case TYPE_I: - setbinary(); - break; - case TYPE_E: - setebcdic(); - break; - case TYPE_L: - settenex(); - break; - } - verbose = oldverbose; - } - return; - } - } else { - if (command("%s", cmd) != PRELIM) { -null();// (void) signal(SIGINT, oldintr); - if (oldtype) { - if (!debug) - verbose = 0; - switch (oldtype) { - case TYPE_I: - setbinary(); - break; - case TYPE_E: - setebcdic(); - break; - case TYPE_L: - settenex(); - break; - } - verbose = oldverbose; - } - return; - } - } - din = dataconn("r"); - if (din == (int)NULL) - goto abort; - if (strcmp(local, "-") == 0) - fout = stdout; - else if (*local == '|') { -null();// oldintp = signal(SIGPIPE, SIG_IGN); - fout = _popen(local + 1, "w"); - if (fout == NULL) { - perror(local+1); - goto abort; - } - closefunc = _pclose; - } else { - fout = fopen(local, mode); - if (fout == NULL) { - perror(local); - goto abort; - } - closefunc = fclose; - } - (void) gettimeofday(&start, (struct timezone *)0); - switch (type) { - - case TYPE_I: - case TYPE_L: - if (restart_point && - lseek(fileno(fout), (long) restart_point, L_SET) < 0) { - perror(local); - if (closefunc != NULL) - (*closefunc)(fout); - return; - } - errno = d = 0; -// while ((c = recv(din, buf, bufsize, 1)) > 0) { -// if ((d = write(fileno(fout), buf, c)) != c) -// if ((d = write(fileno(fout), buf, c)) != c) -// break; - while ((c = recv(din, buf, bufsize, 0)) > 0) { - write(fileno(fout), buf, c); - bytes += c; - if (hash) { - while (bytes >= hashbytes) { - (void) putchar('#'); - hashbytes += HASHBYTES; - } - (void) fflush(stdout); - } - } - if (hash && bytes > 0) { - if (bytes < HASHBYTES) - (void) putchar('#'); - (void) putchar('\n'); - (void) fflush(stdout); - } -// if (c < 0) { -// if (errno != EPIPE) -// perror("netin"); -// bytes = -1; -// } -// if (d < c) { -// if (d < 0) -// perror(local); -// else -// fprintf(stderr, "%s: short write\n", local); -// } - break; - - case TYPE_A: - if (restart_point) { - register int i, n, c; - - if (fseek(fout, 0L, L_SET) < 0) - goto done; - n = restart_point; - i = 0; - while (i++ < n) { - if ((c=getc(fout)) == EOF) - goto done; - if (c == '\n') - i++; - } - if (fseek(fout, 0L, L_INCR) < 0) { -done: - perror(local); - if (closefunc != NULL) - (*closefunc)(fout); - return; - } - } - while ((c = fgetcSocket(din)) != EOF) { - if (c == '\n') - bare_lfs++; - while (c == '\r') { - while (hash && (bytes >= hashbytes)) { - (void) putchar('#'); - (void) fflush(stdout); - hashbytes += HASHBYTES; - } - bytes++; - if ((c = fgetcSocket(din)) != '\n' || tcrflag) { - if (ferror(fout)) - goto break2; - (void) putc('\r', fout); - if (c == '\0') { - bytes++; - goto contin2; - } - if (c == EOF) - goto contin2; - } - } - (void) putc(c, fout); - bytes++; - contin2: ; - } -break2: - if (bare_lfs) { - printf("WARNING! %d bare linefeeds received in ASCII mode\n"); - printf("File may not have transferred correctly.\n"); - (void) fflush(stdout); - } - if (hash) { - if (bytes < hashbytes) - (void) putchar('#'); - (void) putchar('\n'); - (void) fflush(stdout); - } -// if (ferror(din)) { -// if (errno != EPIPE) -// perror("netin"); -// bytes = -1; -// } - if (ferror(fout)) - perror(local); - break; - } - if (closefunc != NULL) - (*closefunc)(fout); -null();// (void) signal(SIGINT, oldintr); - if (oldintp) -null();// (void) signal(SIGPIPE, oldintp); - (void) gettimeofday(&stop, (struct timezone *)0); - if(closesocket(din)) { - int iret=WSAGetLastError (); - fprintf(stdout,"Error closing socket(%d)\n",iret); - (void) fflush(stdout); - } - - (void) getreply(0); - if (bytes > 0 && is_retr) - ptransfer("received", bytes, &start, &stop); - if (oldtype) { - if (!debug) - verbose = 0; - switch (oldtype) { - case TYPE_I: - setbinary(); - break; - case TYPE_E: - setebcdic(); - break; - case TYPE_L: - settenex(); - break; - } - verbose = oldverbose; - } - return; -abort: - -/* abort using RFC959 recommended IP,SYNC sequence */ - - (void) gettimeofday(&stop, (struct timezone *)0); - if (oldintp) -null();// (void) signal(SIGPIPE, oldintr); -null();// (void) signal(SIGINT,SIG_IGN); - if (oldtype) { - if (!debug) - verbose = 0; - switch (oldtype) { - case TYPE_I: - setbinary(); - break; - case TYPE_E: - setebcdic(); - break; - case TYPE_L: - settenex(); - break; - } - verbose = oldverbose; - } - if (!cpend) { - code = -1; -null();// (void) signal(SIGINT,oldintr); - return; - } - - fprintfSocket(cout,"%c%c",IAC,IP); - msg = (char)IAC; -/* send IAC in urgent mode instead of DM because UNIX places oob mark */ -/* after urgent byte rather than before as now is protocol */ - if (send(cout,&msg,1,MSG_OOB) != 1) { - perror("abort"); - } - fprintfSocket(cout,"%cABOR\r\n",DM); - FD_ZERO(&mask); - FD_SET(cin, &mask); // Need to correct this - if (din) { - FD_SET(din, &mask); // Need to correct this - } - if ((nfnd = empty(&mask,10)) <= 0) { - if (nfnd < 0) { - perror("abort"); - } - code = -1; - lostpeer(); - } - if (din && FD_ISSET(din, &mask)) { - while ((c = recv(din, buf, bufsize, 0)) > 0) - ; - } - if ((c = getreply(0)) == ERROR && code == 552) { /* needed for nic style abort */ - if (data >= 0) { - (void) close(data); - data = -1; - } - (void) getreply(0); - } - (void) getreply(0); - code = -1; - if (data >= 0) { - (void) close(data); - data = -1; - } - if (closefunc != NULL && fout != NULL) - (*closefunc)(fout); - if (din) - if(closesocket(din)) { - int iret=WSAGetLastError (); - fprintf(stdout,"Error closing socket(%d)\n",iret); - (void) fflush(stdout); - } - - if (bytes > 0) - ptransfer("received", bytes, &start, &stop); -null();// (void) signal(SIGINT,oldintr); -} - -/* - * Need to start a listen on the data channel - * before we send the command, otherwise the - * server's connect may fail. - */ -int sendport = -1; - -initconn() -{ - register char *p, *a; - int result, len, tmpno = 0; - int on = 1; - int a0, a1, a2, a3, p0, p1; - - - if (passivemode) { - data = socket(AF_INET, SOCK_STREAM, 0); - if (data < 0) { - perror("ftp: socket"); - return(1); - } - if ((options & SO_DEBUG) && - setsockopt(data, SOL_SOCKET, SO_DEBUG, (char *)&on, - sizeof (on)) < 0) - perror("ftp: setsockopt (ignored)"); - if (command("PASV") != COMPLETE) { - printf("Passive mode refused.\n"); - goto bad; - } - - /* - * What we've got at this point is a string of comma - * separated one-byte unsigned integer values. - * The first four are the an IP address. The fifth is - * the MSB of the port number, the sixth is the LSB. - * From that we'll prepare a sockaddr_in. - */ - - if (sscanf(pasv,"%d,%d,%d,%d,%d,%d", - &a0, &a1, &a2, &a3, &p0, &p1) != 6) { - printf("Passive mode address scan failure. Shouldn't happen!\n"); - goto bad; - } - - bzero(&data_addr, sizeof(data_addr)); - data_addr.sin_family = AF_INET; - a = (char *)&data_addr.sin_addr.s_addr; - a[0] = a0 & 0xff; - a[1] = a1 & 0xff; - a[2] = a2 & 0xff; - a[3] = a3 & 0xff; - p = (char *)&data_addr.sin_port; - p[0] = p0 & 0xff; - p[1] = p1 & 0xff; - - if (connect(data, (struct sockaddr *)&data_addr, - sizeof(data_addr)) < 0) { - perror("ftp: connect"); - goto bad; - } - return(0); - } - - -noport: - data_addr = myctladdr; - if (sendport) - data_addr.sin_port = 0; /* let system pick one */ - if (data != -1) - (void) close (data); - data = socket(AF_INET, SOCK_STREAM, 0); - if (data < 0) { - perror("ftp: socket"); - if (tmpno) - sendport = 1; - return (1); - } - if (!sendport) - if (setsockopt(data, SOL_SOCKET, SO_REUSEADDR, (char *)&on, sizeof (on)) < 0) { - perror("ftp: setsockopt (reuse address)"); - goto bad; - } - if (bind(data, (struct sockaddr *)&data_addr, sizeof (data_addr)) < 0) { - perror("ftp: bind"); - goto bad; - } - if (options & SO_DEBUG && - setsockopt(data, SOL_SOCKET, SO_DEBUG, (char *)&on, sizeof (on)) < 0) - perror("ftp: setsockopt (ignored)"); - len = sizeof (data_addr); - if (getsockname(data, (struct sockaddr *)&data_addr, &len) < 0) { - perror("ftp: getsockname"); - goto bad; - } - if (listen(data, 1) < 0) - perror("ftp: listen"); - if (sendport) { - a = (char *)&data_addr.sin_addr; - p = (char *)&data_addr.sin_port; -#define UC(b) (((int)b)&0xff) - result = - command("PORT %d,%d,%d,%d,%d,%d", - UC(a[0]), UC(a[1]), UC(a[2]), UC(a[3]), - UC(p[0]), UC(p[1])); - if (result == ERROR && sendport == -1) { - sendport = 0; - tmpno = 1; - goto noport; - } - return (result != COMPLETE); - } - if (tmpno) - sendport = 1; - return (0); -bad: - (void) fflush(stdout); - (void) close(data), data = -1; - if (tmpno) - sendport = 1; - return (1); -} - -int dataconn(char *mode) -{ - struct sockaddr_in from; - int s, fromlen = sizeof (from); - - if (passivemode) - return (data); - - s = accept(data, (struct sockaddr *) &from, &fromlen); - if (s < 0) { - perror("ftp: accept"); - (void) closesocket(data), data = -1; - return (int) (NULL); - } - if(closesocket(data)) { - int iret=WSAGetLastError (); - fprintf(stdout,"Error closing socket(%d)\n",iret); - (void) fflush(stdout); - } - - data = s; - return (data); -} - -void ptransfer(direction, bytes, t0, t1) - char *direction; - long bytes; - struct timeval *t0, *t1; -{ - struct timeval td; - double s, bs; - - if (verbose) { - tvsub(&td, t1, t0); - s = td.tv_sec + (td.tv_usec / 1000000.); -#define nz(x) ((x) == 0 ? 1 : (x)) - bs = bytes / nz(s); - printf("%ld bytes %s in %.2g seconds (%.2g Kbytes/s)\n", - bytes, direction, s, bs / 1024.); - (void) fflush(stdout); - } -} - -/*tvadd(tsum, t0) - struct timeval *tsum, *t0; -{ - - tsum->tv_sec += t0->tv_sec; - tsum->tv_usec += t0->tv_usec; - if (tsum->tv_usec > 1000000) - tsum->tv_sec++, tsum->tv_usec -= 1000000; -} */ - -void tvsub(tdiff, t1, t0) - struct timeval *tdiff, *t1, *t0; -{ - - tdiff->tv_sec = t1->tv_sec - t0->tv_sec; - tdiff->tv_usec = t1->tv_usec - t0->tv_usec; - if (tdiff->tv_usec < 0) - tdiff->tv_sec--, tdiff->tv_usec += 1000000; -} - -void psabort(int flag) -{ - extern int abrtflag; - - abrtflag++; -} - -void pswitch(int flag) -{ - extern int proxy, abrtflag; - Sig_t oldintr; - static struct comvars { - int connect; - char name[MAXHOSTNAMELEN]; - struct sockaddr_in mctl; - struct sockaddr_in hctl; - FILE *in; - FILE *out; - int tpe; - int cpnd; - int sunqe; - int runqe; - int mcse; - int ntflg; - char nti[17]; - char nto[17]; - int mapflg; - char mi[MAXPATHLEN]; - char mo[MAXPATHLEN]; - } proxstruct, tmpstruct; - struct comvars *ip, *op; - - abrtflag = 0; - oldintr = signal(SIGINT, psabort); - if (flag) { - if (proxy) - return; - ip = &tmpstruct; - op = &proxstruct; - proxy++; - } - else { - if (!proxy) - return; - ip = &proxstruct; - op = &tmpstruct; - proxy = 0; - } - ip->connect = connected; - connected = op->connect; - if (hostname) { - (void) strncpy(ip->name, hostname, sizeof(ip->name) - 1); - ip->name[strlen(ip->name)] = '\0'; - } else - ip->name[0] = 0; - hostname = op->name; - ip->hctl = hisctladdr; - hisctladdr = op->hctl; - ip->mctl = myctladdr; - myctladdr = op->mctl; - (int) ip->in = cin; // What the hell am I looking at...? - cin = (int) op->in; - (int) ip->out = cout; // Same again... - cout = (int) op->out; - ip->tpe = type; - type = op->tpe; - if (!type) - type = 1; - ip->cpnd = cpend; - cpend = op->cpnd; - ip->sunqe = sunique; - sunique = op->sunqe; - ip->runqe = runique; - runique = op->runqe; - ip->mcse = mcase; - mcase = op->mcse; - ip->ntflg = ntflag; - ntflag = op->ntflg; - (void) strncpy(ip->nti, ntin, 16); - (ip->nti)[strlen(ip->nti)] = '\0'; - (void) strcpy(ntin, op->nti); - (void) strncpy(ip->nto, ntout, 16); - (ip->nto)[strlen(ip->nto)] = '\0'; - (void) strcpy(ntout, op->nto); - ip->mapflg = mapflag; - mapflag = op->mapflg; - (void) strncpy(ip->mi, mapin, MAXPATHLEN - 1); - (ip->mi)[strlen(ip->mi)] = '\0'; - (void) strcpy(mapin, op->mi); - (void) strncpy(ip->mo, mapout, MAXPATHLEN - 1); - (ip->mo)[strlen(ip->mo)] = '\0'; - (void) strcpy(mapout, op->mo); -// (void) signal(SIGINT, oldintr); - if (abrtflag) { - abrtflag = 0; - (*oldintr)(1); - } -} - -jmp_buf ptabort; -int ptabflg; - -void -abortpt() -{ - printf("\n"); - (void) fflush(stdout); - ptabflg++; - mflag = 0; - abrtflag = 0; - longjmp(ptabort, 1); -} - -void proxtrans(cmd, local, remote) - char *cmd, *local, *remote; -{ -// void (*oldintr)(int); - //void abortpt(int); - int tmptype, oldtype = 0, secndflag = 0, nfnd; - extern jmp_buf ptabort; - char *cmd2; -// struct - fd_set mask; - - if (strcmp(cmd, "RETR")) - cmd2 = "RETR"; - else - cmd2 = runique ? "STOU" : "STOR"; - if (command("PASV") != COMPLETE) { - printf("proxy server does not support third part transfers.\n"); - (void) fflush(stdout); - return; - } - tmptype = type; - pswitch(0); - if (!connected) { - printf("No primary connection\n"); - (void) fflush(stdout); - pswitch(1); - code = -1; - return; - } - if (type != tmptype) { - oldtype = type; - switch (tmptype) { - case TYPE_A: - setascii(); - break; - case TYPE_I: - setbinary(); - break; - case TYPE_E: - setebcdic(); - break; - case TYPE_L: - settenex(); - break; - } - } - if (command("PORT %s", pasv) != COMPLETE) { - switch (oldtype) { - case 0: - break; - case TYPE_A: - setascii(); - break; - case TYPE_I: - setbinary(); - break; - case TYPE_E: - setebcdic(); - break; - case TYPE_L: - settenex(); - break; - } - pswitch(1); - return; - } - if (setjmp(ptabort)) - goto abort; -null();// oldintr = signal(SIGINT, abortpt); - if (command("%s %s", cmd, remote) != PRELIM) { -null();// (void) signal(SIGINT, oldintr); - switch (oldtype) { - case 0: - break; - case TYPE_A: - setascii(); - break; - case TYPE_I: - setbinary(); - break; - case TYPE_E: - setebcdic(); - break; - case TYPE_L: - settenex(); - break; - } - pswitch(1); - return; - } - sleep(2); - pswitch(1); - secndflag++; - if (command("%s %s", cmd2, local) != PRELIM) - goto abort; - ptflag++; - (void) getreply(0); - pswitch(0); - (void) getreply(0); -null();// (void) signal(SIGINT, oldintr); - switch (oldtype) { - case 0: - break; - case TYPE_A: - setascii(); - break; - case TYPE_I: - setbinary(); - break; - case TYPE_E: - setebcdic(); - break; - case TYPE_L: - settenex(); - break; - } - pswitch(1); - ptflag = 0; - printf("local: %s remote: %s\n", local, remote); - (void) fflush(stdout); - return; -abort: -null();// (void) signal(SIGINT, SIG_IGN); - ptflag = 0; - if (strcmp(cmd, "RETR") && !proxy) - pswitch(1); - else if (!strcmp(cmd, "RETR") && proxy) - pswitch(0); - if (!cpend && !secndflag) { /* only here if cmd = "STOR" (proxy=1) */ - if (command("%s %s", cmd2, local) != PRELIM) { - pswitch(0); - switch (oldtype) { - case 0: - break; - case TYPE_A: - setascii(); - break; - case TYPE_I: - setbinary(); - break; - case TYPE_E: - setebcdic(); - break; - case TYPE_L: - settenex(); - break; - } - if (cpend) { - char msg[2]; - - fprintfSocket(cout,"%c%c",IAC,IP); - *msg = (char) IAC; - *(msg+1) = (char) DM; - if (send(cout,msg,2,MSG_OOB) != 2) - perror("abort"); - fprintfSocket(cout,"ABOR\r\n"); - FD_ZERO(&mask); -// FD_SET(fileno(cin), &mask); // Chris: Need to correct this - if ((nfnd = empty(&mask,10)) <= 0) { - if (nfnd < 0) { - perror("abort"); - } - if (ptabflg) - code = -1; - lostpeer(); - } - (void) getreply(0); - (void) getreply(0); - } - } - pswitch(1); - if (ptabflg) - code = -1; -null();// (void) signal(SIGINT, oldintr); - return; - } - if (cpend) { - char msg[2]; - - fprintfSocket(cout,"%c%c",IAC,IP); - *msg = (char)IAC; - *(msg+1) = (char)DM; - if (send(cout,msg,2,MSG_OOB) != 2) - perror("abort"); - fprintfSocket(cout,"ABOR\r\n"); - FD_ZERO(&mask); -// FD_SET(fileno(cin), &mask); // Chris: Need to correct this... - if ((nfnd = empty(&mask,10)) <= 0) { - if (nfnd < 0) { - perror("abort"); - } - if (ptabflg) - code = -1; - lostpeer(); - } - (void) getreply(0); - (void) getreply(0); - } - pswitch(!proxy); - if (!cpend && !secndflag) { /* only if cmd = "RETR" (proxy=1) */ - if (command("%s %s", cmd2, local) != PRELIM) { - pswitch(0); - switch (oldtype) { - case 0: - break; - case TYPE_A: - setascii(); - break; - case TYPE_I: - setbinary(); - break; - case TYPE_E: - setebcdic(); - break; - case TYPE_L: - settenex(); - break; - } - if (cpend) { - char msg[2]; - - fprintfSocket(cout,"%c%c",IAC,IP); - *msg = (char)IAC; - *(msg+1) = (char)DM; - if (send(cout,msg,2,MSG_OOB) != 2) - perror("abort"); - fprintfSocket(cout,"ABOR\r\n"); - FD_ZERO(&mask); -// FD_SET(fileno(cin), &mask); // Chris: - if ((nfnd = empty(&mask,10)) <= 0) { - if (nfnd < 0) { - perror("abort"); - } - if (ptabflg) - code = -1; - lostpeer(); - } - (void) getreply(0); - (void) getreply(0); - } - pswitch(1); - if (ptabflg) - code = -1; -null();// (void) signal(SIGINT, oldintr); - return; - } - } - if (cpend) { - char msg[2]; - - fprintfSocket(cout,"%c%c",IAC,IP); - *msg = (char)IAC; - *(msg+1) = (char)DM; - if (send(cout,msg,2,MSG_OOB) != 2) - perror("abort"); - fprintfSocket(cout,"ABOR\r\n"); - FD_ZERO(&mask); -// FD_SET(fileno(cin), &mask); // Chris: - if ((nfnd = empty(&mask,10)) <= 0) { - if (nfnd < 0) { - perror("abort"); - } - if (ptabflg) - code = -1; - lostpeer(); - } - (void) getreply(0); - (void) getreply(0); - } - pswitch(!proxy); - if (cpend) { - FD_ZERO(&mask); -// FD_SET(fileno(cin), &mask); // Chris: - if ((nfnd = empty(&mask,10)) <= 0) { - if (nfnd < 0) { - perror("abort"); - } - if (ptabflg) - code = -1; - lostpeer(); - } - (void) getreply(0); - (void) getreply(0); - } - if (proxy) - pswitch(0); - switch (oldtype) { - case 0: - break; - case TYPE_A: - setascii(); - break; - case TYPE_I: - setbinary(); - break; - case TYPE_E: - setebcdic(); - break; - case TYPE_L: - settenex(); - break; - } - pswitch(1); - if (ptabflg) - code = -1; -null();// (void) signal(SIGINT, oldintr); -} - -void reset() -{ -// struct - fd_set mask; - int nfnd = 1; - - FD_ZERO(&mask); - while (nfnd > 0) { -// FD_SET(fileno(cin), &mask); // Chris - if ((nfnd = empty(&mask,0)) < 0) { - perror("reset"); - code = -1; - lostpeer(); - } - else if (nfnd) { - (void) getreply(0); - } - } -} - -char * -gunique(local) - char *local; -{ - static char new[MAXPATHLEN]; - char *cp = rindex(local, '/'); - int d, count=0; - char ext = '1'; - - if (cp) - *cp = '\0'; - d = access(cp ? local : ".", 2); - if (cp) - *cp = '/'; - if (d < 0) { - perror(local); - return((char *) 0); - } - (void) strcpy(new, local); - cp = new + strlen(new); - *cp++ = '.'; - while (!d) { - if (++count == 100) { - printf("runique: can't find unique file name.\n"); - (void) fflush(stdout); - return((char *) 0); - } - *cp++ = ext; - *cp = '\0'; - if (ext == '9') - ext = '0'; - else - ext++; - if ((d = access(new, 0)) < 0) - break; - if (ext != '0') - cp--; - else if (*(cp - 2) == '.') - *(cp - 1) = '1'; - else { - *(cp - 2) = *(cp - 2) + 1; - cp--; - } - } - return(new); -} - -int null(void) -{ - return 0; -} +#define L_SET SEEK_SET +#define L_INCR SEEK_CUR +#define caddr_t void * +/* + * Copyright (c) 1985, 1989 Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms are permitted + * provided that the above copyright notice and this paragraph are + * duplicated in all such forms and that any documentation, + * advertising materials, and other materials related to such + * distribution and use acknowledge that the software was developed + * by the University of California, Berkeley. The name of the + * University may not be used to endorse or promote products derived + * from this software without specific prior written permission. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + */ + +#ifndef lint +static char sccsid[] = "@(#)ftp.c 5.28 (Berkeley) 4/20/89"; +#endif /* not lint */ +#include + +#include + +#if !defined(WIN32) +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#else +#include +#endif + +#include +#include +#include +#include + +#include "ftp_var.h" +#include "prototypes.h" +#ifndef MAXHOSTNAMELEN +#define MAXHOSTNAMELEN 64 +#endif + +#ifdef NOVFPRINTF +#define vfprintf(a,b,c) _doprnt(b,c,a) +#endif + +#ifdef sun +/* FD_SET wasn't defined until 4.0. its a cheap test for uid_t presence */ +#ifndef FD_SET +#define NBBY 8 /* number of bits in a byte */ +/* + * Select uses bit masks of file descriptors in longs. + * These macros manipulate such bit fields (the filesystem macros use chars). + * FD_SETSIZE may be defined by the user, but the default here + * should be >= NOFILE (param.h). + */ +#ifndef FD_SETSIZE +#define FD_SETSIZE 256 +#endif + +typedef long fd_mask; +#define NFDBITS (sizeof(fd_mask) * NBBY) /* bits per mask */ +#ifndef howmany +#define howmany(x, y) (((x)+((y)-1))/(y)) +#endif + +#define FD_SET(n, p) ((p)->fds_bits[(n)/NFDBITS] |= (1 << ((n) % NFDBITS))) +#define FD_CLR(n, p) ((p)->fds_bits[(n)/NFDBITS] &= ~(1 << ((n) % NFDBITS))) +#define FD_ISSET(n, p) ((p)->fds_bits[(n)/NFDBITS] & (1 << ((n) % NFDBITS))) +#define FD_ZERO(p) bzero((char *)(p), sizeof(*(p))) + +typedef int uid_t; +typedef int gid_t; +#endif +#endif + +struct sockaddr_in hisctladdr; +struct sockaddr_in data_addr; +int data = -1; +int abrtflag = 0; +int ptflag = 0; +int allbinary; +struct sockaddr_in myctladdr; +uid_t getuid(); +sig_t lostpeer(); +off_t restart_point = 0; + +int cin, cout; +int dataconn(char *mode); + +int command(char *fmt, ...); + +char *hostname; + +typedef void (*Sig_t)(int); + +// Signal Handlers + +void psabort(int sig); + +char *hookup(char *host, int port) +{ + register struct hostent *hp = 0; + int s,len; + static char hostnamebuf[80]; + + bzero((char *)&hisctladdr, sizeof (hisctladdr)); + hisctladdr.sin_addr.s_addr = inet_addr(host); + if (hisctladdr.sin_addr.s_addr != -1) { + hisctladdr.sin_family = AF_INET; + (void) strncpy(hostnamebuf, host, sizeof(hostnamebuf)); + } else { + hp = gethostbyname(host); + if (hp == NULL) { + fprintf(stderr, "ftp: %s: ", host); + herror((char *)NULL); + code = -1; + return((char *) 0); + } + hisctladdr.sin_family = hp->h_addrtype; + bcopy(hp->h_addr_list[0], + (caddr_t)&hisctladdr.sin_addr, hp->h_length); + (void) strncpy(hostnamebuf, hp->h_name, sizeof(hostnamebuf)); + } + hostname = hostnamebuf; + s = socket(hisctladdr.sin_family, SOCK_STREAM, 0); + if (s < 0) { + perror("ftp: socket"); + code = -1; + return (0); + } + hisctladdr.sin_port = port; + while (connect(s, (struct sockaddr *)&hisctladdr, sizeof (hisctladdr)) < 0) { + if (hp && hp->h_addr_list[1]) { + int oerrno = errno; + + fprintf(stderr, "ftp: connect to address %s: ", + inet_ntoa(hisctladdr.sin_addr)); + errno = oerrno; + perror((char *) 0); + hp->h_addr_list++; + bcopy(hp->h_addr_list[0], + (caddr_t)&hisctladdr.sin_addr, hp->h_length); + fprintf(stdout, "Trying %s...\n", + inet_ntoa(hisctladdr.sin_addr)); + (void) fflush(stdout); + (void) close(s); + s = socket(hisctladdr.sin_family, SOCK_STREAM, 0); + if (s < 0) { + perror("ftp: socket"); + code = -1; + return (0); + } + continue; + } + perror("ftp: connect"); + code = -1; + goto bad; + } + len = sizeof (myctladdr); + if (getsockname(s, (struct sockaddr *)&myctladdr, &len) < 0) { + perror("ftp: getsockname"); + code = -1; + goto bad; + } + cin = cout = s; + if (verbose) { + printf("Connected to %s.\n", hostname); + (void) fflush(stdout); + } + if (getreply(0) > 2) { /* read startup message from server */ + closesocket(cin); + code = -1; + goto bad; + } +#ifdef SO_OOBINLINE + { + int on = 1; + + if (setsockopt(s, SOL_SOCKET, SO_OOBINLINE, (const char *) &on, sizeof(on)) + < 0 && debug) { + perror("ftp: setsockopt"); + } + } +#endif //SO_OOBINLINE + + return (hostname); +bad: + (void) close(s); + return ((char *)0); +} + +int login(char *host) +{ + char tmp[80]; + char *user, *pass, *acct; + int n, aflag = 0; + + user = pass = acct = 0; + if (ruserpass(host, &user, &pass, &acct) < 0) { + code = -1; + return(0); + } + while (user == NULL) { + char *myname = "none"; // This needs to become the usename env + + if (myname) + printf("Name (%s:%s): ", host, myname); + else + printf("Name (%s): ", host); + (void) fflush(stdout); + (void) fgets(tmp, sizeof(tmp) - 1, stdin); + tmp[strlen(tmp) - 1] = '\0'; + if (*tmp == '\0') + user = myname; + else + user = tmp; + } + n = command("USER %s", user); + if (n == CONTINUE) { + if (pass == NULL) + pass = getpass("Password:"); + n = command("PASS %s", pass); + fflush(stdin); + } + if (n == CONTINUE) { + aflag++; + acct = getpass("Account:"); + n = command("ACCT %s", acct); + } + if (n != COMPLETE) { + fprintf(stderr, "Login failed.\n"); + return (0); + } + if (!aflag && acct != NULL) + (void) command("ACCT %s", acct); + if (proxy) + return(1); + for (n = 0; n < macnum; ++n) { + if (!strcmp("init", macros[n].mac_name)) { + (void) strcpy(line, "$init"); + makeargv(); + domacro(margc, margv); + break; + } + } + return (1); +} + +void +cmdabort(int sig) +{ + extern jmp_buf ptabort; + + printf("\n"); + (void) fflush(stdout); + abrtflag++; + if (ptflag) + longjmp(ptabort,1); +} + +/*VARARGS1*/ +int command(char *fmt, ...) +{ + va_list ap; + int r; + void (*oldintr)(int), cmdabort(int); + + abrtflag = 0; + if (debug) { + printf("---> "); + va_start(ap, fmt); + vfprintf(stdout, fmt, ap); + va_end(ap); + printf("\n"); + (void) fflush(stdout); + } + if (cout == (int) NULL) { + perror ("No control connection for command"); + code = -1; + return (0); + } + oldintr = signal(SIGINT,cmdabort); + { + char buffer[1024]; + + va_start(ap, fmt); + vsprintf(buffer, fmt, ap); + va_end(ap); +//DLJ: to work through firewalls - send the command as a single message + strcat(buffer,"\r\n"); + fprintfSocket(cout, buffer); + } +//DLJ: the following two lines are replaced by the strcat above - seems to +// make it work through firewalls. +// fprintfSocket(cout, "\r\n"); +// (void) fflush(cout); + cpend = 1; + r = getreply(!strcmp(fmt, "QUIT")); + if (abrtflag && oldintr != SIG_IGN) + (*oldintr)(SIGINT); +// (void) signal(SIGINT, oldintr); + return(r); +} + +char reply_string[BUFSIZ]; /* last line of previous reply */ + +#include + +getreply(expecteof) + int expecteof; +{ + register int c, n; + register int dig; + register char *cp; + int originalcode = 0, continuation = 0; + void (*oldintr)(int), cmdabort(int); + int pflag = 0; + char *pt = pasv; + + oldintr = signal(SIGINT,cmdabort); + for (;;) { + dig = n = code = 0; + cp = reply_string; + while ((c = fgetcSocket(cin)) != '\n') { + if (c == IAC) { /* handle telnet commands */ + switch (c = fgetcSocket(cin)) { + case WILL: + case WONT: + c = fgetcSocket(cin); + fprintfSocket(cout, "%c%c%c",IAC,DONT,c); + break; + case DO: + case DONT: + c = fgetcSocket(cin); + fprintfSocket(cout, "%c%c%c",IAC,WONT,c); + break; + default: + break; + } + continue; + } + dig++; + if (c == EOF) { + if (expecteof) { +// (void) signal(SIGINT,oldintr); + code = 221; + return (0); + } + lostpeer(); + if (verbose) { + printf("421 Service not available, remote server has closed connection\n"); + (void) fflush(stdout); + } + code = 421; + return(4); + } + if (c != '\r' && (verbose > 0 || + (verbose > -1 && n == '5' && dig > 4))) { + if (proxflag && + (dig == 1 || dig == 5 && verbose == 0)) + printf("%s:",hostname); + (void) putchar(c); + (void) fflush(stdout); + } + if (dig < 4 && isdigit(c)) + code = code * 10 + (c - '0'); + if (!pflag && code == 227) + pflag = 1; + if (dig > 4 && pflag == 1 && isdigit(c)) + pflag = 2; + if (pflag == 2) { + if (c != '\r' && c != ')') + *pt++ = c; + else { + *pt = '\0'; + pflag = 3; + } + } + if (dig == 4 && c == '-') { + if (continuation) + code = 0; + continuation++; + } + if (n == 0) + n = c; + if (cp < &reply_string[sizeof(reply_string) - 1]) + *cp++ = c; + } + if (verbose > 0 || verbose > -1 && n == '5') { + (void) putchar(c); + (void) fflush (stdout); + } + if (continuation && code != originalcode) { + if (originalcode == 0) + originalcode = code; + continue; + } + *cp = '\0'; + if (n != '1') + cpend = 0; + (void) signal(SIGINT,oldintr); + if (code == 421 || originalcode == 421) + lostpeer(); + if (abrtflag && oldintr != cmdabort && oldintr != SIG_IGN) + (*oldintr)(SIGINT); + return (n - '0'); + } +} + +empty(mask, sec) + struct fd_set *mask; + int sec; +{ + struct timeval t; + + t.tv_sec = (long) sec; + t.tv_usec = 0; + return(select(32, mask, (struct fd_set *) 0, (struct fd_set *) 0, &t)); +} + +jmp_buf sendabort; + +void abortsend() +{ + + mflag = 0; + abrtflag = 0; + printf("\nsend aborted\n"); + (void) fflush(stdout); + longjmp(sendabort, 1); +} + +#define HASHBYTES 1024 + +void sendrequest(char *cmd, char *local, char *remote, int printnames) +{ + FILE *fin; + int dout = 0; + int (*closefunc)(), _pclose(), fclose(); + sig_t (*oldintr)(), (*oldintp)(); + void abortsend(); + char buf[BUFSIZ], *bufp; + long bytes = 0, hashbytes = HASHBYTES; + register int c, d; + struct stat st; + struct timeval start, stop; + char *mode; + + if (verbose && printnames) { + if (local && *local != '-') + printf("local: %s ", local); + if (remote) + printf("remote: %s\n", remote); + (void) fflush(stdout); + } + if (proxy) { + proxtrans(cmd, local, remote); + return; + } + closefunc = NULL; + oldintr = NULL; + oldintp = NULL; + mode = "w"; + if (setjmp(sendabort)) { + while (cpend) { + (void) getreply(0); + } + if (data >= 0) { + (void) close(data); + data = -1; + } + if (oldintr) +null();// (void) signal(SIGINT,oldintr); + if (oldintp) +null();// (void) signal(SIGPIPE,oldintp); + code = -1; + return; + } +null();// oldintr = signal(SIGINT, abortsend); + if (strcmp(local, "-") == 0) + fin = stdin; + else if (*local == '|') { +null();// oldintp = signal(SIGPIPE,SIG_IGN); + fin = _popen(local + 1, "r"); + if (fin == NULL) { + perror(local + 1); +null();// (void) signal(SIGINT, oldintr); +null();// (void) signal(SIGPIPE, oldintp); + code = -1; + return; + } + closefunc = _pclose; + } else { + fin = fopen(local, "r"); + if (fin == NULL) { + perror(local); +null();// (void) signal(SIGINT, oldintr); + code = -1; + return; + } + closefunc = fclose; + if (fstat(fileno(fin), &st) < 0 || + (st.st_mode&S_IFMT) != S_IFREG) { + fprintf(stdout, "%s: not a plain file.\n", local); + (void) fflush(stdout); +null();// (void) signal(SIGINT, oldintr); + fclose(fin); + code = -1; + return; + } + } + if (initconn()) { +null();// (void) signal(SIGINT, oldintr); + if (oldintp) +null();// (void) signal(SIGPIPE, oldintp); + code = -1; + if (closefunc != NULL) + (*closefunc)(fin); + return; + } + if (setjmp(sendabort)) + goto abort; + + if (restart_point && + (strcmp(cmd, "STOR") == 0 || strcmp(cmd, "APPE") == 0)) { + if (fseek(fin, (long) restart_point, 0) < 0) { + perror(local); + restart_point = 0; + if (closefunc != NULL) + (*closefunc)(fin); + return; + } + if (command("REST %ld", (long) restart_point) + != CONTINUE) { + restart_point = 0; + if (closefunc != NULL) + (*closefunc)(fin); + return; + } + restart_point = 0; + mode = "r+w"; + } + if (remote) { + if (command("%s %s", cmd, remote) != PRELIM) { +null();// (void) signal(SIGINT, oldintr); + if (oldintp) +null();// (void) signal(SIGPIPE, oldintp); + if (closefunc != NULL) + (*closefunc)(fin); + return; + } + } else + if (command("%s", cmd) != PRELIM) { +null();// (void) signal(SIGINT, oldintr); + if (oldintp) +null();// (void) signal(SIGPIPE, oldintp); + if (closefunc != NULL) + (*closefunc)(fin); + return; + } + dout = dataconn(mode); + if (dout == (int)NULL) + goto abort; + (void) gettimeofday(&start, (struct timezone *)0); +null();// oldintp = signal(SIGPIPE, SIG_IGN); + switch (type) { + + case TYPE_I: + case TYPE_L: + errno = d = 0; + while ((c = read(fileno(fin), buf, sizeof (buf))) > 0) { + bytes += c; + for (bufp = buf; c > 0; c -= d, bufp += d) + if ((d = send(dout, bufp, c, 0)) <= 0) + break; + if (hash) { + while (bytes >= hashbytes) { + (void) putchar('#'); + hashbytes += HASHBYTES; + } + (void) fflush(stdout); + } + } + if (hash && bytes > 0) { + if (bytes < HASHBYTES) + (void) putchar('#'); + (void) putchar('\n'); + (void) fflush(stdout); + } + if (c < 0) + perror(local); + if (d <= 0) { + if (d == 0) + fprintf(stderr, "netout: write returned 0?\n"); + else if (errno != EPIPE) + perror("netout"); + bytes = -1; + } + break; + + case TYPE_A: + { + char buf[1024]; + static int bufsize = 1024; + int ipos=0; + + while ((c = getc(fin)) != EOF) { + if (c == '\n') { + while (hash && (bytes >= hashbytes)) { + (void) putchar('#'); + (void) fflush(stdout); + hashbytes += HASHBYTES; + } +// Szurgot: The following code is unncessary on Win32. +// (void) fputcSocket(dout, '\r'); +// bytes++; + } + + if (ipos >= bufsize) { + fputSocket(dout,buf,ipos); + if(!hash) (void) putchar('.'); + ipos=0; + } + buf[ipos]=c; ++ipos; + bytes++; + } + if (ipos) { + fputSocket(dout,buf,ipos); + ipos=0; + } + if (hash) { + if (bytes < hashbytes) + (void) putchar('#'); + (void) putchar('\n'); + (void) fflush(stdout); + } + else { + (void) putchar('.'); + (void) putchar('\n'); + (void) fflush(stdout); + } + if (ferror(fin)) + perror(local); +// if (ferror(dout)) { +// if (errno != EPIPE) +// perror("netout"); +// bytes = -1; +// } + break; + } + } + (void) gettimeofday(&stop, (struct timezone *)0); + if (closefunc != NULL) + (*closefunc)(fin); + if(closesocket(dout)) { + int iret=WSAGetLastError (); + fprintf(stdout,"Error closing socket(%d)\n",iret); + (void) fflush(stdout); + } + (void) getreply(0); +null();// (void) signal(SIGINT, oldintr); + if (oldintp) +null();// (void) signal(SIGPIPE, oldintp); + if (bytes > 0) + ptransfer("sent", bytes, &start, &stop); + return; +abort: + (void) gettimeofday(&stop, (struct timezone *)0); +null();// (void) signal(SIGINT, oldintr); + if (oldintp) +null();// (void) signal(SIGPIPE, oldintp); + if (!cpend) { + code = -1; + return; + } + if (data >= 0) { + (void) close(data); + data = -1; + } + if (dout) + if(closesocket(dout)) { + int iret=WSAGetLastError (); + fprintf(stdout,"Error closing socket(%d)\n",iret); + (void) fflush(stdout); + } + + (void) getreply(0); + code = -1; + if (closefunc != NULL && fin != NULL) + (*closefunc)(fin); + if (bytes > 0) + ptransfer("sent", bytes, &start, &stop); +} + +jmp_buf recvabort; + + +void abortrecv() +{ + + mflag = 0; + abrtflag = 0; + printf("\n"); + (void) fflush(stdout); + longjmp(recvabort, 1); +} + +void recvrequest(char *cmd, char *local, char *remote, char *mode, + int printnames) +{ + FILE *fout; + int din = 0; + int (*closefunc)(), _pclose(), fclose(); + void (*oldintr)(int), (*oldintp)(int); + void abortrecv(); + int oldverbose, oldtype = 0, is_retr, tcrflag, nfnd, bare_lfs = 0; + char *gunique(), msg; +// static char *buf; // Szurgot: Shouldn't this go SOMEWHERE? + char buf[1024]; + static int bufsize = 1024; + long bytes = 0, hashbytes = HASHBYTES; +// struct + fd_set mask; + register int c, d; + struct timeval start, stop; +// struct stat st; + extern void *malloc(); + + is_retr = strcmp(cmd, "RETR") == 0; + if (is_retr && verbose && printnames) { + if (local && *local != '-') + printf("local: %s ", local); + if (remote) + printf("remote: %s\n", remote); + (void) fflush(stdout); + } + if (proxy && is_retr) { + proxtrans(cmd, local, remote); + return; + } + closefunc = NULL; + oldintr = NULL; + oldintp = NULL; + tcrflag = !crflag && is_retr; + if (setjmp(recvabort)) { + while (cpend) { + (void) getreply(0); + } + if (data >= 0) { + (void) close(data); + data = -1; + } + if (oldintr) +null();// (void) signal(SIGINT, oldintr); + code = -1; + return; + } +null();// oldintr = signal(SIGINT, abortrecv); + if (strcmp(local, "-") && *local != '|') { +#ifndef __WIN32__ +// This whole thing is a problem... access Won't work on non-existent files + if (access(local, 2) < 0) { + char *dir = rindex(local, '/'); + + if (errno != ENOENT && errno != EACCES) { + perror(local); + (void) signal(SIGINT, oldintr); + code = -1; + return; + } + if (dir != NULL) + *dir = 0; + d = access(dir ? local : ".", 2); + if (dir != NULL) + *dir = '/'; + if (d < 0) { + perror(local); + (void) signal(SIGINT, oldintr); + code = -1; + return; + } + if (!runique && errno == EACCES && + chmod(local, 0600) < 0) { + perror(local); + (void) signal(SIGINT, oldintr); + code = -1; + return; + } + if (runique && errno == EACCES && + (local = gunique(local)) == NULL) { + (void) signal(SIGINT, oldintr); + code = -1; + return; + } + } + else if (runique && (local = gunique(local)) == NULL) { + (void) signal(SIGINT, oldintr); + code = -1; + return; + } +#endif + } + if (initconn()) { +null();// (void) signal(SIGINT, oldintr); + code = -1; + return; + } + if (setjmp(recvabort)) + goto abort; + if (!is_retr) { + if (type != TYPE_A && (allbinary == 0 || type != TYPE_I)) { + oldtype = type; + oldverbose = verbose; + if (!debug) + verbose = 0; + setascii(); + verbose = oldverbose; + } + } else if (restart_point) { + if (command("REST %ld", (long) restart_point) != CONTINUE) + return; + } + if (remote) { + if (command("%s %s", cmd, remote) != PRELIM) { +null();// (void) signal(SIGINT, oldintr); + if (oldtype) { + if (!debug) + verbose = 0; + switch (oldtype) { + case TYPE_I: + setbinary(); + break; + case TYPE_E: + setebcdic(); + break; + case TYPE_L: + settenex(); + break; + } + verbose = oldverbose; + } + return; + } + } else { + if (command("%s", cmd) != PRELIM) { +null();// (void) signal(SIGINT, oldintr); + if (oldtype) { + if (!debug) + verbose = 0; + switch (oldtype) { + case TYPE_I: + setbinary(); + break; + case TYPE_E: + setebcdic(); + break; + case TYPE_L: + settenex(); + break; + } + verbose = oldverbose; + } + return; + } + } + din = dataconn("r"); + if (din == (int)NULL) + goto abort; + if (strcmp(local, "-") == 0) + fout = stdout; + else if (*local == '|') { +null();// oldintp = signal(SIGPIPE, SIG_IGN); + fout = _popen(local + 1, "w"); + if (fout == NULL) { + perror(local+1); + goto abort; + } + closefunc = _pclose; + } else { + fout = fopen(local, mode); + if (fout == NULL) { + perror(local); + goto abort; + } + closefunc = fclose; + } + (void) gettimeofday(&start, (struct timezone *)0); + switch (type) { + + case TYPE_I: + case TYPE_L: + if (restart_point && + lseek(fileno(fout), (long) restart_point, L_SET) < 0) { + perror(local); + if (closefunc != NULL) + (*closefunc)(fout); + return; + } + errno = d = 0; +// while ((c = recv(din, buf, bufsize, 1)) > 0) { +// if ((d = write(fileno(fout), buf, c)) != c) +// if ((d = write(fileno(fout), buf, c)) != c) +// break; + while ((c = recv(din, buf, bufsize, 0)) > 0) { + write(fileno(fout), buf, c); + bytes += c; + if (hash) { + while (bytes >= hashbytes) { + (void) putchar('#'); + hashbytes += HASHBYTES; + } + (void) fflush(stdout); + } + } + if (hash && bytes > 0) { + if (bytes < HASHBYTES) + (void) putchar('#'); + (void) putchar('\n'); + (void) fflush(stdout); + } +// if (c < 0) { +// if (errno != EPIPE) +// perror("netin"); +// bytes = -1; +// } +// if (d < c) { +// if (d < 0) +// perror(local); +// else +// fprintf(stderr, "%s: short write\n", local); +// } + break; + + case TYPE_A: + if (restart_point) { + register int i, n, c; + + if (fseek(fout, 0L, L_SET) < 0) + goto done; + n = restart_point; + i = 0; + while (i++ < n) { + if ((c=getc(fout)) == EOF) + goto done; + if (c == '\n') + i++; + } + if (fseek(fout, 0L, L_INCR) < 0) { +done: + perror(local); + if (closefunc != NULL) + (*closefunc)(fout); + return; + } + } + while ((c = fgetcSocket(din)) != EOF) { + if (c == '\n') + bare_lfs++; + while (c == '\r') { + while (hash && (bytes >= hashbytes)) { + (void) putchar('#'); + (void) fflush(stdout); + hashbytes += HASHBYTES; + } + bytes++; + if ((c = fgetcSocket(din)) != '\n' || tcrflag) { + if (ferror(fout)) + goto break2; + (void) putc('\r', fout); + if (c == '\0') { + bytes++; + goto contin2; + } + if (c == EOF) + goto contin2; + } + } + (void) putc(c, fout); + bytes++; + contin2: ; + } +break2: + if (bare_lfs) { + printf("WARNING! %d bare linefeeds received in ASCII mode\n"); + printf("File may not have transferred correctly.\n"); + (void) fflush(stdout); + } + if (hash) { + if (bytes < hashbytes) + (void) putchar('#'); + (void) putchar('\n'); + (void) fflush(stdout); + } +// if (ferror(din)) { +// if (errno != EPIPE) +// perror("netin"); +// bytes = -1; +// } + if (ferror(fout)) + perror(local); + break; + } + if (closefunc != NULL) + (*closefunc)(fout); +null();// (void) signal(SIGINT, oldintr); + if (oldintp) +null();// (void) signal(SIGPIPE, oldintp); + (void) gettimeofday(&stop, (struct timezone *)0); + if(closesocket(din)) { + int iret=WSAGetLastError (); + fprintf(stdout,"Error closing socket(%d)\n",iret); + (void) fflush(stdout); + } + + (void) getreply(0); + if (bytes > 0 && is_retr) + ptransfer("received", bytes, &start, &stop); + if (oldtype) { + if (!debug) + verbose = 0; + switch (oldtype) { + case TYPE_I: + setbinary(); + break; + case TYPE_E: + setebcdic(); + break; + case TYPE_L: + settenex(); + break; + } + verbose = oldverbose; + } + return; +abort: + +/* abort using RFC959 recommended IP,SYNC sequence */ + + (void) gettimeofday(&stop, (struct timezone *)0); + if (oldintp) +null();// (void) signal(SIGPIPE, oldintr); +null();// (void) signal(SIGINT,SIG_IGN); + if (oldtype) { + if (!debug) + verbose = 0; + switch (oldtype) { + case TYPE_I: + setbinary(); + break; + case TYPE_E: + setebcdic(); + break; + case TYPE_L: + settenex(); + break; + } + verbose = oldverbose; + } + if (!cpend) { + code = -1; +null();// (void) signal(SIGINT,oldintr); + return; + } + + fprintfSocket(cout,"%c%c",IAC,IP); + msg = (char)IAC; +/* send IAC in urgent mode instead of DM because UNIX places oob mark */ +/* after urgent byte rather than before as now is protocol */ + if (send(cout,&msg,1,MSG_OOB) != 1) { + perror("abort"); + } + fprintfSocket(cout,"%cABOR\r\n",DM); + FD_ZERO(&mask); + FD_SET(cin, &mask); // Need to correct this + if (din) { + FD_SET(din, &mask); // Need to correct this + } + if ((nfnd = empty(&mask,10)) <= 0) { + if (nfnd < 0) { + perror("abort"); + } + code = -1; + lostpeer(); + } + if (din && FD_ISSET(din, &mask)) { + while ((c = recv(din, buf, bufsize, 0)) > 0) + ; + } + if ((c = getreply(0)) == ERROR && code == 552) { /* needed for nic style abort */ + if (data >= 0) { + (void) close(data); + data = -1; + } + (void) getreply(0); + } + (void) getreply(0); + code = -1; + if (data >= 0) { + (void) close(data); + data = -1; + } + if (closefunc != NULL && fout != NULL) + (*closefunc)(fout); + if (din) + if(closesocket(din)) { + int iret=WSAGetLastError (); + fprintf(stdout,"Error closing socket(%d)\n",iret); + (void) fflush(stdout); + } + + if (bytes > 0) + ptransfer("received", bytes, &start, &stop); +null();// (void) signal(SIGINT,oldintr); +} + +/* + * Need to start a listen on the data channel + * before we send the command, otherwise the + * server's connect may fail. + */ +int sendport = -1; + +initconn() +{ + register char *p, *a; + int result, len, tmpno = 0; + int on = 1; + int a0, a1, a2, a3, p0, p1; + + + if (passivemode) { + data = socket(AF_INET, SOCK_STREAM, 0); + if (data < 0) { + perror("ftp: socket"); + return(1); + } + if ((options & SO_DEBUG) && + setsockopt(data, SOL_SOCKET, SO_DEBUG, (char *)&on, + sizeof (on)) < 0) + perror("ftp: setsockopt (ignored)"); + if (command("PASV") != COMPLETE) { + printf("Passive mode refused.\n"); + goto bad; + } + + /* + * What we've got at this point is a string of comma + * separated one-byte unsigned integer values. + * The first four are the an IP address. The fifth is + * the MSB of the port number, the sixth is the LSB. + * From that we'll prepare a sockaddr_in. + */ + + if (sscanf(pasv,"%d,%d,%d,%d,%d,%d", + &a0, &a1, &a2, &a3, &p0, &p1) != 6) { + printf("Passive mode address scan failure. Shouldn't happen!\n"); + goto bad; + } + + bzero(&data_addr, sizeof(data_addr)); + data_addr.sin_family = AF_INET; + a = (char *)&data_addr.sin_addr.s_addr; + a[0] = a0 & 0xff; + a[1] = a1 & 0xff; + a[2] = a2 & 0xff; + a[3] = a3 & 0xff; + p = (char *)&data_addr.sin_port; + p[0] = p0 & 0xff; + p[1] = p1 & 0xff; + + if (connect(data, (struct sockaddr *)&data_addr, + sizeof(data_addr)) < 0) { + perror("ftp: connect"); + goto bad; + } + return(0); + } + + +noport: + data_addr = myctladdr; + if (sendport) + data_addr.sin_port = 0; /* let system pick one */ + if (data != -1) + (void) close (data); + data = socket(AF_INET, SOCK_STREAM, 0); + if (data < 0) { + perror("ftp: socket"); + if (tmpno) + sendport = 1; + return (1); + } + if (!sendport) + if (setsockopt(data, SOL_SOCKET, SO_REUSEADDR, (char *)&on, sizeof (on)) < 0) { + perror("ftp: setsockopt (reuse address)"); + goto bad; + } + if (bind(data, (struct sockaddr *)&data_addr, sizeof (data_addr)) < 0) { + perror("ftp: bind"); + goto bad; + } + if (options & SO_DEBUG && + setsockopt(data, SOL_SOCKET, SO_DEBUG, (char *)&on, sizeof (on)) < 0) + perror("ftp: setsockopt (ignored)"); + len = sizeof (data_addr); + if (getsockname(data, (struct sockaddr *)&data_addr, &len) < 0) { + perror("ftp: getsockname"); + goto bad; + } + if (listen(data, 1) < 0) + perror("ftp: listen"); + if (sendport) { + a = (char *)&data_addr.sin_addr; + p = (char *)&data_addr.sin_port; +#define UC(b) (((int)b)&0xff) + result = + command("PORT %d,%d,%d,%d,%d,%d", + UC(a[0]), UC(a[1]), UC(a[2]), UC(a[3]), + UC(p[0]), UC(p[1])); + if (result == ERROR && sendport == -1) { + sendport = 0; + tmpno = 1; + goto noport; + } + return (result != COMPLETE); + } + if (tmpno) + sendport = 1; + return (0); +bad: + (void) fflush(stdout); + (void) close(data), data = -1; + if (tmpno) + sendport = 1; + return (1); +} + +int dataconn(char *mode) +{ + struct sockaddr_in from; + int s, fromlen = sizeof (from); + + if (passivemode) + return (data); + + s = accept(data, (struct sockaddr *) &from, &fromlen); + if (s < 0) { + perror("ftp: accept"); + (void) closesocket(data), data = -1; + return (int) (NULL); + } + if(closesocket(data)) { + int iret=WSAGetLastError (); + fprintf(stdout,"Error closing socket(%d)\n",iret); + (void) fflush(stdout); + } + + data = s; + return (data); +} + +void ptransfer(direction, bytes, t0, t1) + char *direction; + long bytes; + struct timeval *t0, *t1; +{ + struct timeval td; + double s, bs; + + if (verbose) { + tvsub(&td, t1, t0); + s = td.tv_sec + (td.tv_usec / 1000000.); +#define nz(x) ((x) == 0 ? 1 : (x)) + bs = bytes / nz(s); + printf("%ld bytes %s in %.2g seconds (%.2g Kbytes/s)\n", + bytes, direction, s, bs / 1024.); + (void) fflush(stdout); + } +} + +/*tvadd(tsum, t0) + struct timeval *tsum, *t0; +{ + + tsum->tv_sec += t0->tv_sec; + tsum->tv_usec += t0->tv_usec; + if (tsum->tv_usec > 1000000) + tsum->tv_sec++, tsum->tv_usec -= 1000000; +} */ + +void tvsub(tdiff, t1, t0) + struct timeval *tdiff, *t1, *t0; +{ + + tdiff->tv_sec = t1->tv_sec - t0->tv_sec; + tdiff->tv_usec = t1->tv_usec - t0->tv_usec; + if (tdiff->tv_usec < 0) + tdiff->tv_sec--, tdiff->tv_usec += 1000000; +} + +void psabort(int flag) +{ + extern int abrtflag; + + abrtflag++; +} + +void pswitch(int flag) +{ + extern int proxy, abrtflag; + Sig_t oldintr; + static struct comvars { + int connect; + char name[MAXHOSTNAMELEN]; + struct sockaddr_in mctl; + struct sockaddr_in hctl; + FILE *in; + FILE *out; + int tpe; + int cpnd; + int sunqe; + int runqe; + int mcse; + int ntflg; + char nti[17]; + char nto[17]; + int mapflg; + char mi[MAXPATHLEN]; + char mo[MAXPATHLEN]; + } proxstruct, tmpstruct; + struct comvars *ip, *op; + + abrtflag = 0; + oldintr = signal(SIGINT, psabort); + if (flag) { + if (proxy) + return; + ip = &tmpstruct; + op = &proxstruct; + proxy++; + } + else { + if (!proxy) + return; + ip = &proxstruct; + op = &tmpstruct; + proxy = 0; + } + ip->connect = connected; + connected = op->connect; + if (hostname) { + (void) strncpy(ip->name, hostname, sizeof(ip->name) - 1); + ip->name[strlen(ip->name)] = '\0'; + } else + ip->name[0] = 0; + hostname = op->name; + ip->hctl = hisctladdr; + hisctladdr = op->hctl; + ip->mctl = myctladdr; + myctladdr = op->mctl; + (int) ip->in = cin; // What the hell am I looking at...? + cin = (int) op->in; + (int) ip->out = cout; // Same again... + cout = (int) op->out; + ip->tpe = type; + type = op->tpe; + if (!type) + type = 1; + ip->cpnd = cpend; + cpend = op->cpnd; + ip->sunqe = sunique; + sunique = op->sunqe; + ip->runqe = runique; + runique = op->runqe; + ip->mcse = mcase; + mcase = op->mcse; + ip->ntflg = ntflag; + ntflag = op->ntflg; + (void) strncpy(ip->nti, ntin, 16); + (ip->nti)[strlen(ip->nti)] = '\0'; + (void) strcpy(ntin, op->nti); + (void) strncpy(ip->nto, ntout, 16); + (ip->nto)[strlen(ip->nto)] = '\0'; + (void) strcpy(ntout, op->nto); + ip->mapflg = mapflag; + mapflag = op->mapflg; + (void) strncpy(ip->mi, mapin, MAXPATHLEN - 1); + (ip->mi)[strlen(ip->mi)] = '\0'; + (void) strcpy(mapin, op->mi); + (void) strncpy(ip->mo, mapout, MAXPATHLEN - 1); + (ip->mo)[strlen(ip->mo)] = '\0'; + (void) strcpy(mapout, op->mo); +// (void) signal(SIGINT, oldintr); + if (abrtflag) { + abrtflag = 0; + (*oldintr)(1); + } +} + +jmp_buf ptabort; +int ptabflg; + +void +abortpt() +{ + printf("\n"); + (void) fflush(stdout); + ptabflg++; + mflag = 0; + abrtflag = 0; + longjmp(ptabort, 1); +} + +void proxtrans(cmd, local, remote) + char *cmd, *local, *remote; +{ +// void (*oldintr)(int); + //void abortpt(int); + int tmptype, oldtype = 0, secndflag = 0, nfnd; + extern jmp_buf ptabort; + char *cmd2; +// struct + fd_set mask; + + if (strcmp(cmd, "RETR")) + cmd2 = "RETR"; + else + cmd2 = runique ? "STOU" : "STOR"; + if (command("PASV") != COMPLETE) { + printf("proxy server does not support third part transfers.\n"); + (void) fflush(stdout); + return; + } + tmptype = type; + pswitch(0); + if (!connected) { + printf("No primary connection\n"); + (void) fflush(stdout); + pswitch(1); + code = -1; + return; + } + if (type != tmptype) { + oldtype = type; + switch (tmptype) { + case TYPE_A: + setascii(); + break; + case TYPE_I: + setbinary(); + break; + case TYPE_E: + setebcdic(); + break; + case TYPE_L: + settenex(); + break; + } + } + if (command("PORT %s", pasv) != COMPLETE) { + switch (oldtype) { + case 0: + break; + case TYPE_A: + setascii(); + break; + case TYPE_I: + setbinary(); + break; + case TYPE_E: + setebcdic(); + break; + case TYPE_L: + settenex(); + break; + } + pswitch(1); + return; + } + if (setjmp(ptabort)) + goto abort; +null();// oldintr = signal(SIGINT, abortpt); + if (command("%s %s", cmd, remote) != PRELIM) { +null();// (void) signal(SIGINT, oldintr); + switch (oldtype) { + case 0: + break; + case TYPE_A: + setascii(); + break; + case TYPE_I: + setbinary(); + break; + case TYPE_E: + setebcdic(); + break; + case TYPE_L: + settenex(); + break; + } + pswitch(1); + return; + } + sleep(2); + pswitch(1); + secndflag++; + if (command("%s %s", cmd2, local) != PRELIM) + goto abort; + ptflag++; + (void) getreply(0); + pswitch(0); + (void) getreply(0); +null();// (void) signal(SIGINT, oldintr); + switch (oldtype) { + case 0: + break; + case TYPE_A: + setascii(); + break; + case TYPE_I: + setbinary(); + break; + case TYPE_E: + setebcdic(); + break; + case TYPE_L: + settenex(); + break; + } + pswitch(1); + ptflag = 0; + printf("local: %s remote: %s\n", local, remote); + (void) fflush(stdout); + return; +abort: +null();// (void) signal(SIGINT, SIG_IGN); + ptflag = 0; + if (strcmp(cmd, "RETR") && !proxy) + pswitch(1); + else if (!strcmp(cmd, "RETR") && proxy) + pswitch(0); + if (!cpend && !secndflag) { /* only here if cmd = "STOR" (proxy=1) */ + if (command("%s %s", cmd2, local) != PRELIM) { + pswitch(0); + switch (oldtype) { + case 0: + break; + case TYPE_A: + setascii(); + break; + case TYPE_I: + setbinary(); + break; + case TYPE_E: + setebcdic(); + break; + case TYPE_L: + settenex(); + break; + } + if (cpend) { + char msg[2]; + + fprintfSocket(cout,"%c%c",IAC,IP); + *msg = (char) IAC; + *(msg+1) = (char) DM; + if (send(cout,msg,2,MSG_OOB) != 2) + perror("abort"); + fprintfSocket(cout,"ABOR\r\n"); + FD_ZERO(&mask); +// FD_SET(fileno(cin), &mask); // Chris: Need to correct this + if ((nfnd = empty(&mask,10)) <= 0) { + if (nfnd < 0) { + perror("abort"); + } + if (ptabflg) + code = -1; + lostpeer(); + } + (void) getreply(0); + (void) getreply(0); + } + } + pswitch(1); + if (ptabflg) + code = -1; +null();// (void) signal(SIGINT, oldintr); + return; + } + if (cpend) { + char msg[2]; + + fprintfSocket(cout,"%c%c",IAC,IP); + *msg = (char)IAC; + *(msg+1) = (char)DM; + if (send(cout,msg,2,MSG_OOB) != 2) + perror("abort"); + fprintfSocket(cout,"ABOR\r\n"); + FD_ZERO(&mask); +// FD_SET(fileno(cin), &mask); // Chris: Need to correct this... + if ((nfnd = empty(&mask,10)) <= 0) { + if (nfnd < 0) { + perror("abort"); + } + if (ptabflg) + code = -1; + lostpeer(); + } + (void) getreply(0); + (void) getreply(0); + } + pswitch(!proxy); + if (!cpend && !secndflag) { /* only if cmd = "RETR" (proxy=1) */ + if (command("%s %s", cmd2, local) != PRELIM) { + pswitch(0); + switch (oldtype) { + case 0: + break; + case TYPE_A: + setascii(); + break; + case TYPE_I: + setbinary(); + break; + case TYPE_E: + setebcdic(); + break; + case TYPE_L: + settenex(); + break; + } + if (cpend) { + char msg[2]; + + fprintfSocket(cout,"%c%c",IAC,IP); + *msg = (char)IAC; + *(msg+1) = (char)DM; + if (send(cout,msg,2,MSG_OOB) != 2) + perror("abort"); + fprintfSocket(cout,"ABOR\r\n"); + FD_ZERO(&mask); +// FD_SET(fileno(cin), &mask); // Chris: + if ((nfnd = empty(&mask,10)) <= 0) { + if (nfnd < 0) { + perror("abort"); + } + if (ptabflg) + code = -1; + lostpeer(); + } + (void) getreply(0); + (void) getreply(0); + } + pswitch(1); + if (ptabflg) + code = -1; +null();// (void) signal(SIGINT, oldintr); + return; + } + } + if (cpend) { + char msg[2]; + + fprintfSocket(cout,"%c%c",IAC,IP); + *msg = (char)IAC; + *(msg+1) = (char)DM; + if (send(cout,msg,2,MSG_OOB) != 2) + perror("abort"); + fprintfSocket(cout,"ABOR\r\n"); + FD_ZERO(&mask); +// FD_SET(fileno(cin), &mask); // Chris: + if ((nfnd = empty(&mask,10)) <= 0) { + if (nfnd < 0) { + perror("abort"); + } + if (ptabflg) + code = -1; + lostpeer(); + } + (void) getreply(0); + (void) getreply(0); + } + pswitch(!proxy); + if (cpend) { + FD_ZERO(&mask); +// FD_SET(fileno(cin), &mask); // Chris: + if ((nfnd = empty(&mask,10)) <= 0) { + if (nfnd < 0) { + perror("abort"); + } + if (ptabflg) + code = -1; + lostpeer(); + } + (void) getreply(0); + (void) getreply(0); + } + if (proxy) + pswitch(0); + switch (oldtype) { + case 0: + break; + case TYPE_A: + setascii(); + break; + case TYPE_I: + setbinary(); + break; + case TYPE_E: + setebcdic(); + break; + case TYPE_L: + settenex(); + break; + } + pswitch(1); + if (ptabflg) + code = -1; +null();// (void) signal(SIGINT, oldintr); +} + +void reset() +{ +// struct + fd_set mask; + int nfnd = 1; + + FD_ZERO(&mask); + while (nfnd > 0) { +// FD_SET(fileno(cin), &mask); // Chris + if ((nfnd = empty(&mask,0)) < 0) { + perror("reset"); + code = -1; + lostpeer(); + } + else if (nfnd) { + (void) getreply(0); + } + } +} + +char * +gunique(local) + char *local; +{ + static char new[MAXPATHLEN]; + char *cp = rindex(local, '/'); + int d, count=0; + char ext = '1'; + + if (cp) + *cp = '\0'; + d = access(cp ? local : ".", 2); + if (cp) + *cp = '/'; + if (d < 0) { + perror(local); + return((char *) 0); + } + (void) strcpy(new, local); + cp = new + strlen(new); + *cp++ = '.'; + while (!d) { + if (++count == 100) { + printf("runique: can't find unique file name.\n"); + (void) fflush(stdout); + return((char *) 0); + } + *cp++ = ext; + *cp = '\0'; + if (ext == '9') + ext = '0'; + else + ext++; + if ((d = access(new, 0)) < 0) + break; + if (ext != '0') + cp--; + else if (*(cp - 2) == '.') + *(cp - 1) = '1'; + else { + *(cp - 2) = *(cp - 2) + 1; + cp--; + } + } + return(new); +} + +int null(void) +{ + return 0; +} diff --git a/reactos/apps/utils/net/ftp/ftp.mak b/reactos/apps/utils/net/ftp/ftp.mak index bdd46b3a39a..084404f1927 100644 --- a/reactos/apps/utils/net/ftp/ftp.mak +++ b/reactos/apps/utils/net/ftp/ftp.mak @@ -1,372 +1,372 @@ -# Microsoft Developer Studio Generated NMAKE File, Based on ftp.dsp -!IF "$(CFG)" == "" -CFG=ftp - Win32 Debug -!MESSAGE No configuration specified. Defaulting to ftp - Win32 Debug. -!ENDIF - -!IF "$(CFG)" != "ftp - Win32 Release" && "$(CFG)" != "ftp - Win32 Debug" -!MESSAGE Invalid configuration "$(CFG)" specified. -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "ftp.mak" CFG="ftp - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "ftp - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "ftp - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE -!ERROR An invalid configuration is specified. -!ENDIF - -!IF "$(OS)" == "Windows_NT" -NULL= -!ELSE -NULL=nul -!ENDIF - -!IF "$(CFG)" == "ftp - Win32 Release" - -OUTDIR=.\Release -INTDIR=.\Release -# Begin Custom Macros -OutDir=.\Release -# End Custom Macros - -!IF "$(RECURSE)" == "0" - -ALL : "$(OUTDIR)\ftp.exe" - -!ELSE - -ALL : "$(OUTDIR)\ftp.exe" - -!ENDIF - -CLEAN : - -@erase "$(INTDIR)\cmds.obj" - -@erase "$(INTDIR)\cmdtab.obj" - -@erase "$(INTDIR)\domacro.obj" - -@erase "$(INTDIR)\fake.obj" - -@erase "$(INTDIR)\ftp.obj" - -@erase "$(INTDIR)\main.obj" - -@erase "$(INTDIR)\ruserpass.obj" - -@erase "$(INTDIR)\vc*.idb" - -@erase "$(OUTDIR)\ftp.exe" - -@erase "$(OUTDIR)\ftp.pch" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -CPP=cl.exe -CPP_PROJ=/nologo /ML /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" \ - /D "HAVE_TIMEVAL" /Fp"$(INTDIR)\ftp.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD\ - /c -CPP_OBJS=.\Release/ -CPP_SBRS=. - -.c{$(CPP_OBJS)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(CPP_OBJS)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(CPP_OBJS)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.c{$(CPP_SBRS)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(CPP_SBRS)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(CPP_SBRS)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -RSC=rc.exe -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(OUTDIR)\ftp.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\ - advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib\ - odbccp32.lib wsock32.lib /nologo /subsystem:console /incremental:no\ - /pdb:"$(OUTDIR)\ftp.pdb" /machine:I386 /out:"$(OUTDIR)\ftp.exe" -LINK32_OBJS= \ - "$(INTDIR)\cmds.obj" \ - "$(INTDIR)\cmdtab.obj" \ - "$(INTDIR)\domacro.obj" \ - "$(INTDIR)\fake.obj" \ - "$(INTDIR)\ftp.obj" \ - "$(INTDIR)\main.obj" \ - "$(INTDIR)\ruserpass.obj" - -"$(OUTDIR)\ftp.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -TargetPath=.\Release\ftp.exe -InputPath=.\Release\ftp.exe -SOURCE=$(InputPath) - -!ELSEIF "$(CFG)" == "ftp - Win32 Debug" - -OUTDIR=.\Debug -INTDIR=.\Debug -# Begin Custom Macros -OutDir=.\Debug -# End Custom Macros - -!IF "$(RECURSE)" == "0" - -ALL : "$(OUTDIR)\ftp.exe" - -!ELSE - -ALL : "$(OUTDIR)\ftp.exe" - -!ENDIF - -CLEAN : - -@erase "$(INTDIR)\cmds.obj" - -@erase "$(INTDIR)\cmdtab.obj" - -@erase "$(INTDIR)\domacro.obj" - -@erase "$(INTDIR)\fake.obj" - -@erase "$(INTDIR)\ftp.obj" - -@erase "$(INTDIR)\main.obj" - -@erase "$(INTDIR)\ruserpass.obj" - -@erase "$(INTDIR)\vc*.idb" - -@erase "$(INTDIR)\vc*.pdb" - -@erase "$(OUTDIR)\ftp.exe" - -@erase "$(OUTDIR)\ftp.ilk" - -@erase "$(OUTDIR)\ftp.pdb" - -@erase "$(OUTDIR)\ftp.pch" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -CPP=cl.exe -CPP_PROJ=/nologo /MLd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS"\ - /Fp"$(INTDIR)\ftp.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c -CPP_OBJS=.\Debug/ -CPP_SBRS=. - -.c{$(CPP_OBJS)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(CPP_OBJS)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(CPP_OBJS)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.c{$(CPP_SBRS)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(CPP_SBRS)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(CPP_SBRS)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -RSC=rc.exe -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(OUTDIR)\ftp.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\ - advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib\ - odbccp32.lib wsock32.lib /nologo /subsystem:console /incremental:yes\ - /pdb:"$(OUTDIR)\ftp.pdb" /debug /machine:I386 /out:"$(OUTDIR)\ftp.exe"\ - /pdbtype:sept -LINK32_OBJS= \ - "$(INTDIR)\cmds.obj" \ - "$(INTDIR)\cmdtab.obj" \ - "$(INTDIR)\domacro.obj" \ - "$(INTDIR)\fake.obj" \ - "$(INTDIR)\ftp.obj" \ - "$(INTDIR)\main.obj" \ - "$(INTDIR)\ruserpass.obj" - -"$(OUTDIR)\ftp.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -TargetPath=.\Debug\ftp.exe -InputPath=.\Debug\ftp.exe -SOURCE=$(InputPath) - -!ENDIF - - -!IF "$(CFG)" == "ftp - Win32 Release" || "$(CFG)" == "ftp - Win32 Debug" -SOURCE=.\cmds.c - -!IF "$(CFG)" == "ftp - Win32 Release" - -DEP_CPP_CMDS_=\ - ".\fake.h"\ - ".\ftp_var.h"\ - ".\pathnames.h"\ - ".\prototypes.h"\ - - -"$(INTDIR)\cmds.obj" : $(SOURCE) $(DEP_CPP_CMDS_) "$(INTDIR)" - - -!ELSEIF "$(CFG)" == "ftp - Win32 Debug" - -DEP_CPP_CMDS_=\ - ".\fake.h"\ - ".\ftp_var.h"\ - ".\pathnames.h"\ - ".\prototypes.h"\ - {$(INCLUDE)}"sys\stat.h"\ - {$(INCLUDE)}"sys\types.h"\ - - -"$(INTDIR)\cmds.obj" : $(SOURCE) $(DEP_CPP_CMDS_) "$(INTDIR)" - - -!ENDIF - -SOURCE=.\cmdtab.c -DEP_CPP_CMDTA=\ - ".\fake.h"\ - ".\ftp_var.h"\ - - -"$(INTDIR)\cmdtab.obj" : $(SOURCE) $(DEP_CPP_CMDTA) "$(INTDIR)" - - -SOURCE=.\domacro.c -DEP_CPP_DOMAC=\ - ".\fake.h"\ - ".\ftp_var.h"\ - ".\prototypes.h"\ - - -"$(INTDIR)\domacro.obj" : $(SOURCE) $(DEP_CPP_DOMAC) "$(INTDIR)" - - -SOURCE=.\fake.c -DEP_CPP_FAKE_=\ - ".\prototypes.h"\ - - -"$(INTDIR)\fake.obj" : $(SOURCE) $(DEP_CPP_FAKE_) "$(INTDIR)" - - -SOURCE=.\ftp.c - -!IF "$(CFG)" == "ftp - Win32 Release" - -DEP_CPP_FTP_C=\ - ".\fake.h"\ - ".\ftp_var.h"\ - ".\prototypes.h"\ - - -"$(INTDIR)\ftp.obj" : $(SOURCE) $(DEP_CPP_FTP_C) "$(INTDIR)" - - -!ELSEIF "$(CFG)" == "ftp - Win32 Debug" - -DEP_CPP_FTP_C=\ - ".\fake.h"\ - ".\ftp_var.h"\ - ".\prototypes.h"\ - {$(INCLUDE)}"sys\stat.h"\ - {$(INCLUDE)}"sys\types.h"\ - - -"$(INTDIR)\ftp.obj" : $(SOURCE) $(DEP_CPP_FTP_C) "$(INTDIR)" - - -!ENDIF - -SOURCE=.\main.c - -!IF "$(CFG)" == "ftp - Win32 Release" - -DEP_CPP_MAIN_=\ - ".\fake.h"\ - ".\ftp_var.h"\ - ".\prototypes.h"\ - - -"$(INTDIR)\main.obj" : $(SOURCE) $(DEP_CPP_MAIN_) "$(INTDIR)" - - -!ELSEIF "$(CFG)" == "ftp - Win32 Debug" - -DEP_CPP_MAIN_=\ - ".\fake.h"\ - ".\ftp_var.h"\ - ".\prototypes.h"\ - {$(INCLUDE)}"sys\types.h"\ - - -"$(INTDIR)\main.obj" : $(SOURCE) $(DEP_CPP_MAIN_) "$(INTDIR)" - - -!ENDIF - -SOURCE=.\ruserpass.c - -!IF "$(CFG)" == "ftp - Win32 Release" - -DEP_CPP_RUSER=\ - ".\fake.h"\ - ".\ftp_var.h"\ - ".\prototypes.h"\ - - -"$(INTDIR)\ruserpass.obj" : $(SOURCE) $(DEP_CPP_RUSER) "$(INTDIR)" - - -!ELSEIF "$(CFG)" == "ftp - Win32 Debug" - -DEP_CPP_RUSER=\ - ".\fake.h"\ - ".\ftp_var.h"\ - ".\prototypes.h"\ - {$(INCLUDE)}"sys\stat.h"\ - {$(INCLUDE)}"sys\types.h"\ - - -"$(INTDIR)\ruserpass.obj" : $(SOURCE) $(DEP_CPP_RUSER) "$(INTDIR)" - - -!ENDIF - - -!ENDIF +# Microsoft Developer Studio Generated NMAKE File, Based on ftp.dsp +!IF "$(CFG)" == "" +CFG=ftp - Win32 Debug +!MESSAGE No configuration specified. Defaulting to ftp - Win32 Debug. +!ENDIF + +!IF "$(CFG)" != "ftp - Win32 Release" && "$(CFG)" != "ftp - Win32 Debug" +!MESSAGE Invalid configuration "$(CFG)" specified. +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "ftp.mak" CFG="ftp - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "ftp - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "ftp - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE +!ERROR An invalid configuration is specified. +!ENDIF + +!IF "$(OS)" == "Windows_NT" +NULL= +!ELSE +NULL=nul +!ENDIF + +!IF "$(CFG)" == "ftp - Win32 Release" + +OUTDIR=.\Release +INTDIR=.\Release +# Begin Custom Macros +OutDir=.\Release +# End Custom Macros + +!IF "$(RECURSE)" == "0" + +ALL : "$(OUTDIR)\ftp.exe" + +!ELSE + +ALL : "$(OUTDIR)\ftp.exe" + +!ENDIF + +CLEAN : + -@erase "$(INTDIR)\cmds.obj" + -@erase "$(INTDIR)\cmdtab.obj" + -@erase "$(INTDIR)\domacro.obj" + -@erase "$(INTDIR)\fake.obj" + -@erase "$(INTDIR)\ftp.obj" + -@erase "$(INTDIR)\main.obj" + -@erase "$(INTDIR)\ruserpass.obj" + -@erase "$(INTDIR)\vc*.idb" + -@erase "$(OUTDIR)\ftp.exe" + -@erase "$(OUTDIR)\ftp.pch" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +CPP=cl.exe +CPP_PROJ=/nologo /ML /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" \ + /D "HAVE_TIMEVAL" /Fp"$(INTDIR)\ftp.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD\ + /c +CPP_OBJS=.\Release/ +CPP_SBRS=. + +.c{$(CPP_OBJS)}.obj:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cpp{$(CPP_OBJS)}.obj:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cxx{$(CPP_OBJS)}.obj:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.c{$(CPP_SBRS)}.sbr:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cpp{$(CPP_SBRS)}.sbr:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cxx{$(CPP_SBRS)}.sbr:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +RSC=rc.exe +BSC32=bscmake.exe +BSC32_FLAGS=/nologo /o"$(OUTDIR)\ftp.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\ + advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib\ + odbccp32.lib wsock32.lib /nologo /subsystem:console /incremental:no\ + /pdb:"$(OUTDIR)\ftp.pdb" /machine:I386 /out:"$(OUTDIR)\ftp.exe" +LINK32_OBJS= \ + "$(INTDIR)\cmds.obj" \ + "$(INTDIR)\cmdtab.obj" \ + "$(INTDIR)\domacro.obj" \ + "$(INTDIR)\fake.obj" \ + "$(INTDIR)\ftp.obj" \ + "$(INTDIR)\main.obj" \ + "$(INTDIR)\ruserpass.obj" + +"$(OUTDIR)\ftp.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +TargetPath=.\Release\ftp.exe +InputPath=.\Release\ftp.exe +SOURCE=$(InputPath) + +!ELSEIF "$(CFG)" == "ftp - Win32 Debug" + +OUTDIR=.\Debug +INTDIR=.\Debug +# Begin Custom Macros +OutDir=.\Debug +# End Custom Macros + +!IF "$(RECURSE)" == "0" + +ALL : "$(OUTDIR)\ftp.exe" + +!ELSE + +ALL : "$(OUTDIR)\ftp.exe" + +!ENDIF + +CLEAN : + -@erase "$(INTDIR)\cmds.obj" + -@erase "$(INTDIR)\cmdtab.obj" + -@erase "$(INTDIR)\domacro.obj" + -@erase "$(INTDIR)\fake.obj" + -@erase "$(INTDIR)\ftp.obj" + -@erase "$(INTDIR)\main.obj" + -@erase "$(INTDIR)\ruserpass.obj" + -@erase "$(INTDIR)\vc*.idb" + -@erase "$(INTDIR)\vc*.pdb" + -@erase "$(OUTDIR)\ftp.exe" + -@erase "$(OUTDIR)\ftp.ilk" + -@erase "$(OUTDIR)\ftp.pdb" + -@erase "$(OUTDIR)\ftp.pch" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +CPP=cl.exe +CPP_PROJ=/nologo /MLd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS"\ + /Fp"$(INTDIR)\ftp.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c +CPP_OBJS=.\Debug/ +CPP_SBRS=. + +.c{$(CPP_OBJS)}.obj:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cpp{$(CPP_OBJS)}.obj:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cxx{$(CPP_OBJS)}.obj:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.c{$(CPP_SBRS)}.sbr:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cpp{$(CPP_SBRS)}.sbr:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cxx{$(CPP_SBRS)}.sbr:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +RSC=rc.exe +BSC32=bscmake.exe +BSC32_FLAGS=/nologo /o"$(OUTDIR)\ftp.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\ + advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib\ + odbccp32.lib wsock32.lib /nologo /subsystem:console /incremental:yes\ + /pdb:"$(OUTDIR)\ftp.pdb" /debug /machine:I386 /out:"$(OUTDIR)\ftp.exe"\ + /pdbtype:sept +LINK32_OBJS= \ + "$(INTDIR)\cmds.obj" \ + "$(INTDIR)\cmdtab.obj" \ + "$(INTDIR)\domacro.obj" \ + "$(INTDIR)\fake.obj" \ + "$(INTDIR)\ftp.obj" \ + "$(INTDIR)\main.obj" \ + "$(INTDIR)\ruserpass.obj" + +"$(OUTDIR)\ftp.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +TargetPath=.\Debug\ftp.exe +InputPath=.\Debug\ftp.exe +SOURCE=$(InputPath) + +!ENDIF + + +!IF "$(CFG)" == "ftp - Win32 Release" || "$(CFG)" == "ftp - Win32 Debug" +SOURCE=.\cmds.c + +!IF "$(CFG)" == "ftp - Win32 Release" + +DEP_CPP_CMDS_=\ + ".\fake.h"\ + ".\ftp_var.h"\ + ".\pathnames.h"\ + ".\prototypes.h"\ + + +"$(INTDIR)\cmds.obj" : $(SOURCE) $(DEP_CPP_CMDS_) "$(INTDIR)" + + +!ELSEIF "$(CFG)" == "ftp - Win32 Debug" + +DEP_CPP_CMDS_=\ + ".\fake.h"\ + ".\ftp_var.h"\ + ".\pathnames.h"\ + ".\prototypes.h"\ + {$(INCLUDE)}"sys\stat.h"\ + {$(INCLUDE)}"sys\types.h"\ + + +"$(INTDIR)\cmds.obj" : $(SOURCE) $(DEP_CPP_CMDS_) "$(INTDIR)" + + +!ENDIF + +SOURCE=.\cmdtab.c +DEP_CPP_CMDTA=\ + ".\fake.h"\ + ".\ftp_var.h"\ + + +"$(INTDIR)\cmdtab.obj" : $(SOURCE) $(DEP_CPP_CMDTA) "$(INTDIR)" + + +SOURCE=.\domacro.c +DEP_CPP_DOMAC=\ + ".\fake.h"\ + ".\ftp_var.h"\ + ".\prototypes.h"\ + + +"$(INTDIR)\domacro.obj" : $(SOURCE) $(DEP_CPP_DOMAC) "$(INTDIR)" + + +SOURCE=.\fake.c +DEP_CPP_FAKE_=\ + ".\prototypes.h"\ + + +"$(INTDIR)\fake.obj" : $(SOURCE) $(DEP_CPP_FAKE_) "$(INTDIR)" + + +SOURCE=.\ftp.c + +!IF "$(CFG)" == "ftp - Win32 Release" + +DEP_CPP_FTP_C=\ + ".\fake.h"\ + ".\ftp_var.h"\ + ".\prototypes.h"\ + + +"$(INTDIR)\ftp.obj" : $(SOURCE) $(DEP_CPP_FTP_C) "$(INTDIR)" + + +!ELSEIF "$(CFG)" == "ftp - Win32 Debug" + +DEP_CPP_FTP_C=\ + ".\fake.h"\ + ".\ftp_var.h"\ + ".\prototypes.h"\ + {$(INCLUDE)}"sys\stat.h"\ + {$(INCLUDE)}"sys\types.h"\ + + +"$(INTDIR)\ftp.obj" : $(SOURCE) $(DEP_CPP_FTP_C) "$(INTDIR)" + + +!ENDIF + +SOURCE=.\main.c + +!IF "$(CFG)" == "ftp - Win32 Release" + +DEP_CPP_MAIN_=\ + ".\fake.h"\ + ".\ftp_var.h"\ + ".\prototypes.h"\ + + +"$(INTDIR)\main.obj" : $(SOURCE) $(DEP_CPP_MAIN_) "$(INTDIR)" + + +!ELSEIF "$(CFG)" == "ftp - Win32 Debug" + +DEP_CPP_MAIN_=\ + ".\fake.h"\ + ".\ftp_var.h"\ + ".\prototypes.h"\ + {$(INCLUDE)}"sys\types.h"\ + + +"$(INTDIR)\main.obj" : $(SOURCE) $(DEP_CPP_MAIN_) "$(INTDIR)" + + +!ENDIF + +SOURCE=.\ruserpass.c + +!IF "$(CFG)" == "ftp - Win32 Release" + +DEP_CPP_RUSER=\ + ".\fake.h"\ + ".\ftp_var.h"\ + ".\prototypes.h"\ + + +"$(INTDIR)\ruserpass.obj" : $(SOURCE) $(DEP_CPP_RUSER) "$(INTDIR)" + + +!ELSEIF "$(CFG)" == "ftp - Win32 Debug" + +DEP_CPP_RUSER=\ + ".\fake.h"\ + ".\ftp_var.h"\ + ".\prototypes.h"\ + {$(INCLUDE)}"sys\stat.h"\ + {$(INCLUDE)}"sys\types.h"\ + + +"$(INTDIR)\ruserpass.obj" : $(SOURCE) $(DEP_CPP_RUSER) "$(INTDIR)" + + +!ENDIF + + +!ENDIF diff --git a/reactos/apps/utils/net/ftp/ftp.mak.orig b/reactos/apps/utils/net/ftp/ftp.mak.orig index 73af13e35ce..b482649d551 100644 --- a/reactos/apps/utils/net/ftp/ftp.mak.orig +++ b/reactos/apps/utils/net/ftp/ftp.mak.orig @@ -1,400 +1,400 @@ -# Microsoft Developer Studio Generated NMAKE File, Based on ftp.dsp -!IF "$(CFG)" == "" -CFG=ftp - Win32 Debug -!MESSAGE No configuration specified. Defaulting to ftp - Win32 Debug. -!ENDIF - -!IF "$(CFG)" != "ftp - Win32 Release" && "$(CFG)" != "ftp - Win32 Debug" -!MESSAGE Invalid configuration "$(CFG)" specified. -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "ftp.mak" CFG="ftp - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "ftp - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "ftp - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE -!ERROR An invalid configuration is specified. -!ENDIF - -!IF "$(OS)" == "Windows_NT" -NULL= -!ELSE -NULL=nul -!ENDIF - -!IF "$(CFG)" == "ftp - Win32 Release" - -OUTDIR=.\Release -INTDIR=.\Release -# Begin Custom Macros -OutDir=.\Release -# End Custom Macros - -!IF "$(RECURSE)" == "0" - -ALL : "$(OUTDIR)\ftp.exe" "\emacs-19.34\bin\ftp.exe" - -!ELSE - -ALL : "$(OUTDIR)\ftp.exe" "\emacs-19.34\bin\ftp.exe" - -!ENDIF - -CLEAN : - -@erase "$(INTDIR)\cmds.obj" - -@erase "$(INTDIR)\cmdtab.obj" - -@erase "$(INTDIR)\domacro.obj" - -@erase "$(INTDIR)\fake.obj" - -@erase "$(INTDIR)\ftp.obj" - -@erase "$(INTDIR)\main.obj" - -@erase "$(INTDIR)\ruserpass.obj" - -@erase "$(INTDIR)\vc50.idb" - -@erase "$(OUTDIR)\ftp.exe" - -@erase "\emacs-19.34\bin\ftp.exe" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -CPP=cl.exe -CPP_PROJ=/nologo /ML /W3 /GX /O2 /I "C:\emacs-19.34\nt\inc" /I\ - "C:\emacs-19.34\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D\ - "HAVE_TIMEVAL" /Fp"$(INTDIR)\ftp.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD\ - /c -CPP_OBJS=.\Release/ -CPP_SBRS=. - -.c{$(CPP_OBJS)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(CPP_OBJS)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(CPP_OBJS)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.c{$(CPP_SBRS)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(CPP_SBRS)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(CPP_SBRS)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -RSC=rc.exe -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(OUTDIR)\ftp.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\ - advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib\ - odbccp32.lib /nologo /subsystem:console /incremental:no\ - /pdb:"$(OUTDIR)\ftp.pdb" /machine:I386 /out:"$(OUTDIR)\ftp.exe" -LINK32_OBJS= \ - "$(INTDIR)\cmds.obj" \ - "$(INTDIR)\cmdtab.obj" \ - "$(INTDIR)\domacro.obj" \ - "$(INTDIR)\fake.obj" \ - "$(INTDIR)\ftp.obj" \ - "$(INTDIR)\main.obj" \ - "$(INTDIR)\ruserpass.obj" \ - "d:\Program Files\DevStudio\VC\lib\WSOCK32.LIB" - -"$(OUTDIR)\ftp.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -TargetPath=.\Release\ftp.exe -InputPath=.\Release\ftp.exe -SOURCE=$(InputPath) - -"\emacs-19.34\bin\ftp.exe" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" -# copy $(TargetPath) \emacs-19.34\bin - -!ELSEIF "$(CFG)" == "ftp - Win32 Debug" - -OUTDIR=.\Debug -INTDIR=.\Debug -# Begin Custom Macros -OutDir=.\Debug -# End Custom Macros - -!IF "$(RECURSE)" == "0" - -ALL : "$(OUTDIR)\ftp.exe" "\emacs-19.34\bin\ftp.exe" - -!ELSE - -ALL : "$(OUTDIR)\ftp.exe" "\emacs-19.34\bin\ftp.exe" - -!ENDIF - -CLEAN : - -@erase "$(INTDIR)\cmds.obj" - -@erase "$(INTDIR)\cmdtab.obj" - -@erase "$(INTDIR)\domacro.obj" - -@erase "$(INTDIR)\fake.obj" - -@erase "$(INTDIR)\ftp.obj" - -@erase "$(INTDIR)\main.obj" - -@erase "$(INTDIR)\ruserpass.obj" - -@erase "$(INTDIR)\vc50.idb" - -@erase "$(INTDIR)\vc50.pdb" - -@erase "$(OUTDIR)\ftp.exe" - -@erase "$(OUTDIR)\ftp.ilk" - -@erase "$(OUTDIR)\ftp.pdb" - -@erase "\emacs-19.34\bin\ftp.exe" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -CPP=cl.exe -CPP_PROJ=/nologo /MLd /W3 /Gm /GX /Zi /Od /I "C:\emacs-19.34\nt\inc" /I\ - "C:\emacs-19.34\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS"\ - /Fp"$(INTDIR)\ftp.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c -CPP_OBJS=.\Debug/ -CPP_SBRS=. - -.c{$(CPP_OBJS)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(CPP_OBJS)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(CPP_OBJS)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.c{$(CPP_SBRS)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(CPP_SBRS)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(CPP_SBRS)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -RSC=rc.exe -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(OUTDIR)\ftp.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\ - advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib\ - odbccp32.lib /nologo /subsystem:console /incremental:yes\ - /pdb:"$(OUTDIR)\ftp.pdb" /debug /machine:I386 /out:"$(OUTDIR)\ftp.exe"\ - /pdbtype:sept -LINK32_OBJS= \ - "$(INTDIR)\cmds.obj" \ - "$(INTDIR)\cmdtab.obj" \ - "$(INTDIR)\domacro.obj" \ - "$(INTDIR)\fake.obj" \ - "$(INTDIR)\ftp.obj" \ - "$(INTDIR)\main.obj" \ - "$(INTDIR)\ruserpass.obj" \ - "d:\Program Files\DevStudio\VC\lib\WSOCK32.LIB" - -"$(OUTDIR)\ftp.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -TargetPath=.\Debug\ftp.exe -InputPath=.\Debug\ftp.exe -SOURCE=$(InputPath) - -"\emacs-19.34\bin\ftp.exe" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" -# copy $(TargetPath) \emacs-19.34\bin - -!ENDIF - - -!IF "$(CFG)" == "ftp - Win32 Release" || "$(CFG)" == "ftp - Win32 Debug" -SOURCE=.\cmds.c - -!IF "$(CFG)" == "ftp - Win32 Release" - -DEP_CPP_CMDS_=\ - ".\fake.h"\ - ".\ftp_var.h"\ - ".\pathnames.h"\ - ".\prototypes.h"\ - - -"$(INTDIR)\cmds.obj" : $(SOURCE) $(DEP_CPP_CMDS_) "$(INTDIR)" - - -!ELSEIF "$(CFG)" == "ftp - Win32 Debug" - -DEP_CPP_CMDS_=\ - "..\..\..\emacs-19.34\nt\inc\netdb.h"\ - "..\..\..\emacs-19.34\nt\inc\netinet\in.h"\ - "..\..\..\emacs-19.34\nt\inc\sys\socket.h"\ - "..\..\..\emacs-19.34\src\nt.h"\ - ".\fake.h"\ - ".\ftp_var.h"\ - ".\pathnames.h"\ - ".\prototypes.h"\ - {$(INCLUDE)}"sys\stat.h"\ - {$(INCLUDE)}"sys\types.h"\ - - -"$(INTDIR)\cmds.obj" : $(SOURCE) $(DEP_CPP_CMDS_) "$(INTDIR)" - - -!ENDIF - -SOURCE=.\cmdtab.c -DEP_CPP_CMDTA=\ - ".\fake.h"\ - ".\ftp_var.h"\ - - -"$(INTDIR)\cmdtab.obj" : $(SOURCE) $(DEP_CPP_CMDTA) "$(INTDIR)" - - -SOURCE=.\domacro.c -DEP_CPP_DOMAC=\ - ".\fake.h"\ - ".\ftp_var.h"\ - ".\prototypes.h"\ - - -"$(INTDIR)\domacro.obj" : $(SOURCE) $(DEP_CPP_DOMAC) "$(INTDIR)" - - -SOURCE=.\fake.c -DEP_CPP_FAKE_=\ - ".\prototypes.h"\ - - -"$(INTDIR)\fake.obj" : $(SOURCE) $(DEP_CPP_FAKE_) "$(INTDIR)" - - -SOURCE=.\ftp.c - -!IF "$(CFG)" == "ftp - Win32 Release" - -DEP_CPP_FTP_C=\ - ".\fake.h"\ - ".\ftp_var.h"\ - ".\prototypes.h"\ - - -"$(INTDIR)\ftp.obj" : $(SOURCE) $(DEP_CPP_FTP_C) "$(INTDIR)" - - -!ELSEIF "$(CFG)" == "ftp - Win32 Debug" - -DEP_CPP_FTP_C=\ - "..\..\..\emacs-19.34\nt\inc\netdb.h"\ - "..\..\..\emacs-19.34\nt\inc\netinet\in.h"\ - "..\..\..\emacs-19.34\nt\inc\pwd.h"\ - "..\..\..\emacs-19.34\nt\inc\sys\file.h"\ - "..\..\..\emacs-19.34\nt\inc\sys\ioctl.h"\ - "..\..\..\emacs-19.34\nt\inc\sys\param.h"\ - "..\..\..\emacs-19.34\nt\inc\sys\socket.h"\ - "..\..\..\emacs-19.34\nt\inc\sys\time.h"\ - "..\..\..\emacs-19.34\src\nt.h"\ - ".\fake.h"\ - ".\ftp_var.h"\ - ".\prototypes.h"\ - {$(INCLUDE)}"sys\stat.h"\ - {$(INCLUDE)}"sys\types.h"\ - - -"$(INTDIR)\ftp.obj" : $(SOURCE) $(DEP_CPP_FTP_C) "$(INTDIR)" - - -!ENDIF - -SOURCE=.\main.c - -!IF "$(CFG)" == "ftp - Win32 Release" - -DEP_CPP_MAIN_=\ - ".\fake.h"\ - ".\ftp_var.h"\ - ".\prototypes.h"\ - - -"$(INTDIR)\main.obj" : $(SOURCE) $(DEP_CPP_MAIN_) "$(INTDIR)" - - -!ELSEIF "$(CFG)" == "ftp - Win32 Debug" - -DEP_CPP_MAIN_=\ - "..\..\..\emacs-19.34\nt\inc\netdb.h"\ - "..\..\..\emacs-19.34\nt\inc\pwd.h"\ - "..\..\..\emacs-19.34\nt\inc\sys\ioctl.h"\ - "..\..\..\emacs-19.34\nt\inc\sys\socket.h"\ - "..\..\..\emacs-19.34\src\nt.h"\ - ".\fake.h"\ - ".\ftp_var.h"\ - ".\prototypes.h"\ - {$(INCLUDE)}"sys\types.h"\ - - -"$(INTDIR)\main.obj" : $(SOURCE) $(DEP_CPP_MAIN_) "$(INTDIR)" - - -!ENDIF - -SOURCE=.\ruserpass.c - -!IF "$(CFG)" == "ftp - Win32 Release" - -DEP_CPP_RUSER=\ - ".\fake.h"\ - ".\ftp_var.h"\ - ".\prototypes.h"\ - - -"$(INTDIR)\ruserpass.obj" : $(SOURCE) $(DEP_CPP_RUSER) "$(INTDIR)" - - -!ELSEIF "$(CFG)" == "ftp - Win32 Debug" - -DEP_CPP_RUSER=\ - ".\fake.h"\ - ".\ftp_var.h"\ - ".\prototypes.h"\ - {$(INCLUDE)}"sys\stat.h"\ - {$(INCLUDE)}"sys\types.h"\ - - -"$(INTDIR)\ruserpass.obj" : $(SOURCE) $(DEP_CPP_RUSER) "$(INTDIR)" - - -!ENDIF - - -!ENDIF +# Microsoft Developer Studio Generated NMAKE File, Based on ftp.dsp +!IF "$(CFG)" == "" +CFG=ftp - Win32 Debug +!MESSAGE No configuration specified. Defaulting to ftp - Win32 Debug. +!ENDIF + +!IF "$(CFG)" != "ftp - Win32 Release" && "$(CFG)" != "ftp - Win32 Debug" +!MESSAGE Invalid configuration "$(CFG)" specified. +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "ftp.mak" CFG="ftp - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "ftp - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "ftp - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE +!ERROR An invalid configuration is specified. +!ENDIF + +!IF "$(OS)" == "Windows_NT" +NULL= +!ELSE +NULL=nul +!ENDIF + +!IF "$(CFG)" == "ftp - Win32 Release" + +OUTDIR=.\Release +INTDIR=.\Release +# Begin Custom Macros +OutDir=.\Release +# End Custom Macros + +!IF "$(RECURSE)" == "0" + +ALL : "$(OUTDIR)\ftp.exe" "\emacs-19.34\bin\ftp.exe" + +!ELSE + +ALL : "$(OUTDIR)\ftp.exe" "\emacs-19.34\bin\ftp.exe" + +!ENDIF + +CLEAN : + -@erase "$(INTDIR)\cmds.obj" + -@erase "$(INTDIR)\cmdtab.obj" + -@erase "$(INTDIR)\domacro.obj" + -@erase "$(INTDIR)\fake.obj" + -@erase "$(INTDIR)\ftp.obj" + -@erase "$(INTDIR)\main.obj" + -@erase "$(INTDIR)\ruserpass.obj" + -@erase "$(INTDIR)\vc50.idb" + -@erase "$(OUTDIR)\ftp.exe" + -@erase "\emacs-19.34\bin\ftp.exe" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +CPP=cl.exe +CPP_PROJ=/nologo /ML /W3 /GX /O2 /I "C:\emacs-19.34\nt\inc" /I\ + "C:\emacs-19.34\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D\ + "HAVE_TIMEVAL" /Fp"$(INTDIR)\ftp.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD\ + /c +CPP_OBJS=.\Release/ +CPP_SBRS=. + +.c{$(CPP_OBJS)}.obj:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cpp{$(CPP_OBJS)}.obj:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cxx{$(CPP_OBJS)}.obj:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.c{$(CPP_SBRS)}.sbr:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cpp{$(CPP_SBRS)}.sbr:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cxx{$(CPP_SBRS)}.sbr:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +RSC=rc.exe +BSC32=bscmake.exe +BSC32_FLAGS=/nologo /o"$(OUTDIR)\ftp.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\ + advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib\ + odbccp32.lib /nologo /subsystem:console /incremental:no\ + /pdb:"$(OUTDIR)\ftp.pdb" /machine:I386 /out:"$(OUTDIR)\ftp.exe" +LINK32_OBJS= \ + "$(INTDIR)\cmds.obj" \ + "$(INTDIR)\cmdtab.obj" \ + "$(INTDIR)\domacro.obj" \ + "$(INTDIR)\fake.obj" \ + "$(INTDIR)\ftp.obj" \ + "$(INTDIR)\main.obj" \ + "$(INTDIR)\ruserpass.obj" \ + "d:\Program Files\DevStudio\VC\lib\WSOCK32.LIB" + +"$(OUTDIR)\ftp.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +TargetPath=.\Release\ftp.exe +InputPath=.\Release\ftp.exe +SOURCE=$(InputPath) + +"\emacs-19.34\bin\ftp.exe" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" +# copy $(TargetPath) \emacs-19.34\bin + +!ELSEIF "$(CFG)" == "ftp - Win32 Debug" + +OUTDIR=.\Debug +INTDIR=.\Debug +# Begin Custom Macros +OutDir=.\Debug +# End Custom Macros + +!IF "$(RECURSE)" == "0" + +ALL : "$(OUTDIR)\ftp.exe" "\emacs-19.34\bin\ftp.exe" + +!ELSE + +ALL : "$(OUTDIR)\ftp.exe" "\emacs-19.34\bin\ftp.exe" + +!ENDIF + +CLEAN : + -@erase "$(INTDIR)\cmds.obj" + -@erase "$(INTDIR)\cmdtab.obj" + -@erase "$(INTDIR)\domacro.obj" + -@erase "$(INTDIR)\fake.obj" + -@erase "$(INTDIR)\ftp.obj" + -@erase "$(INTDIR)\main.obj" + -@erase "$(INTDIR)\ruserpass.obj" + -@erase "$(INTDIR)\vc50.idb" + -@erase "$(INTDIR)\vc50.pdb" + -@erase "$(OUTDIR)\ftp.exe" + -@erase "$(OUTDIR)\ftp.ilk" + -@erase "$(OUTDIR)\ftp.pdb" + -@erase "\emacs-19.34\bin\ftp.exe" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +CPP=cl.exe +CPP_PROJ=/nologo /MLd /W3 /Gm /GX /Zi /Od /I "C:\emacs-19.34\nt\inc" /I\ + "C:\emacs-19.34\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS"\ + /Fp"$(INTDIR)\ftp.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c +CPP_OBJS=.\Debug/ +CPP_SBRS=. + +.c{$(CPP_OBJS)}.obj:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cpp{$(CPP_OBJS)}.obj:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cxx{$(CPP_OBJS)}.obj:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.c{$(CPP_SBRS)}.sbr:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cpp{$(CPP_SBRS)}.sbr:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +.cxx{$(CPP_SBRS)}.sbr:: + $(CPP) @<< + $(CPP_PROJ) $< +<< + +RSC=rc.exe +BSC32=bscmake.exe +BSC32_FLAGS=/nologo /o"$(OUTDIR)\ftp.bsc" +BSC32_SBRS= \ + +LINK32=link.exe +LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\ + advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib\ + odbccp32.lib /nologo /subsystem:console /incremental:yes\ + /pdb:"$(OUTDIR)\ftp.pdb" /debug /machine:I386 /out:"$(OUTDIR)\ftp.exe"\ + /pdbtype:sept +LINK32_OBJS= \ + "$(INTDIR)\cmds.obj" \ + "$(INTDIR)\cmdtab.obj" \ + "$(INTDIR)\domacro.obj" \ + "$(INTDIR)\fake.obj" \ + "$(INTDIR)\ftp.obj" \ + "$(INTDIR)\main.obj" \ + "$(INTDIR)\ruserpass.obj" \ + "d:\Program Files\DevStudio\VC\lib\WSOCK32.LIB" + +"$(OUTDIR)\ftp.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +TargetPath=.\Debug\ftp.exe +InputPath=.\Debug\ftp.exe +SOURCE=$(InputPath) + +"\emacs-19.34\bin\ftp.exe" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" +# copy $(TargetPath) \emacs-19.34\bin + +!ENDIF + + +!IF "$(CFG)" == "ftp - Win32 Release" || "$(CFG)" == "ftp - Win32 Debug" +SOURCE=.\cmds.c + +!IF "$(CFG)" == "ftp - Win32 Release" + +DEP_CPP_CMDS_=\ + ".\fake.h"\ + ".\ftp_var.h"\ + ".\pathnames.h"\ + ".\prototypes.h"\ + + +"$(INTDIR)\cmds.obj" : $(SOURCE) $(DEP_CPP_CMDS_) "$(INTDIR)" + + +!ELSEIF "$(CFG)" == "ftp - Win32 Debug" + +DEP_CPP_CMDS_=\ + "..\..\..\emacs-19.34\nt\inc\netdb.h"\ + "..\..\..\emacs-19.34\nt\inc\netinet\in.h"\ + "..\..\..\emacs-19.34\nt\inc\sys\socket.h"\ + "..\..\..\emacs-19.34\src\nt.h"\ + ".\fake.h"\ + ".\ftp_var.h"\ + ".\pathnames.h"\ + ".\prototypes.h"\ + {$(INCLUDE)}"sys\stat.h"\ + {$(INCLUDE)}"sys\types.h"\ + + +"$(INTDIR)\cmds.obj" : $(SOURCE) $(DEP_CPP_CMDS_) "$(INTDIR)" + + +!ENDIF + +SOURCE=.\cmdtab.c +DEP_CPP_CMDTA=\ + ".\fake.h"\ + ".\ftp_var.h"\ + + +"$(INTDIR)\cmdtab.obj" : $(SOURCE) $(DEP_CPP_CMDTA) "$(INTDIR)" + + +SOURCE=.\domacro.c +DEP_CPP_DOMAC=\ + ".\fake.h"\ + ".\ftp_var.h"\ + ".\prototypes.h"\ + + +"$(INTDIR)\domacro.obj" : $(SOURCE) $(DEP_CPP_DOMAC) "$(INTDIR)" + + +SOURCE=.\fake.c +DEP_CPP_FAKE_=\ + ".\prototypes.h"\ + + +"$(INTDIR)\fake.obj" : $(SOURCE) $(DEP_CPP_FAKE_) "$(INTDIR)" + + +SOURCE=.\ftp.c + +!IF "$(CFG)" == "ftp - Win32 Release" + +DEP_CPP_FTP_C=\ + ".\fake.h"\ + ".\ftp_var.h"\ + ".\prototypes.h"\ + + +"$(INTDIR)\ftp.obj" : $(SOURCE) $(DEP_CPP_FTP_C) "$(INTDIR)" + + +!ELSEIF "$(CFG)" == "ftp - Win32 Debug" + +DEP_CPP_FTP_C=\ + "..\..\..\emacs-19.34\nt\inc\netdb.h"\ + "..\..\..\emacs-19.34\nt\inc\netinet\in.h"\ + "..\..\..\emacs-19.34\nt\inc\pwd.h"\ + "..\..\..\emacs-19.34\nt\inc\sys\file.h"\ + "..\..\..\emacs-19.34\nt\inc\sys\ioctl.h"\ + "..\..\..\emacs-19.34\nt\inc\sys\param.h"\ + "..\..\..\emacs-19.34\nt\inc\sys\socket.h"\ + "..\..\..\emacs-19.34\nt\inc\sys\time.h"\ + "..\..\..\emacs-19.34\src\nt.h"\ + ".\fake.h"\ + ".\ftp_var.h"\ + ".\prototypes.h"\ + {$(INCLUDE)}"sys\stat.h"\ + {$(INCLUDE)}"sys\types.h"\ + + +"$(INTDIR)\ftp.obj" : $(SOURCE) $(DEP_CPP_FTP_C) "$(INTDIR)" + + +!ENDIF + +SOURCE=.\main.c + +!IF "$(CFG)" == "ftp - Win32 Release" + +DEP_CPP_MAIN_=\ + ".\fake.h"\ + ".\ftp_var.h"\ + ".\prototypes.h"\ + + +"$(INTDIR)\main.obj" : $(SOURCE) $(DEP_CPP_MAIN_) "$(INTDIR)" + + +!ELSEIF "$(CFG)" == "ftp - Win32 Debug" + +DEP_CPP_MAIN_=\ + "..\..\..\emacs-19.34\nt\inc\netdb.h"\ + "..\..\..\emacs-19.34\nt\inc\pwd.h"\ + "..\..\..\emacs-19.34\nt\inc\sys\ioctl.h"\ + "..\..\..\emacs-19.34\nt\inc\sys\socket.h"\ + "..\..\..\emacs-19.34\src\nt.h"\ + ".\fake.h"\ + ".\ftp_var.h"\ + ".\prototypes.h"\ + {$(INCLUDE)}"sys\types.h"\ + + +"$(INTDIR)\main.obj" : $(SOURCE) $(DEP_CPP_MAIN_) "$(INTDIR)" + + +!ENDIF + +SOURCE=.\ruserpass.c + +!IF "$(CFG)" == "ftp - Win32 Release" + +DEP_CPP_RUSER=\ + ".\fake.h"\ + ".\ftp_var.h"\ + ".\prototypes.h"\ + + +"$(INTDIR)\ruserpass.obj" : $(SOURCE) $(DEP_CPP_RUSER) "$(INTDIR)" + + +!ELSEIF "$(CFG)" == "ftp - Win32 Debug" + +DEP_CPP_RUSER=\ + ".\fake.h"\ + ".\ftp_var.h"\ + ".\prototypes.h"\ + {$(INCLUDE)}"sys\stat.h"\ + {$(INCLUDE)}"sys\types.h"\ + + +"$(INTDIR)\ruserpass.obj" : $(SOURCE) $(DEP_CPP_RUSER) "$(INTDIR)" + + +!ENDIF + + +!ENDIF diff --git a/reactos/apps/utils/net/ftp/ftp_var.h b/reactos/apps/utils/net/ftp/ftp_var.h index b5da7a7470d..7c33434a7e7 100644 --- a/reactos/apps/utils/net/ftp/ftp_var.h +++ b/reactos/apps/utils/net/ftp/ftp_var.h @@ -1,181 +1,181 @@ -#include "fake.h" -#include -#include - -//typedef void (*Sig_t)(int); - -int fgetcSocket(int s); -char *fputsSocket(char *format, int s); - -char *fprintfSocket(int s, char *format, ...); - -int fputcSocket(int s, char putChar); -int fputSocket(int s, char *putChar, int len); -char *fgetsSocket(int s, char *string); - -/* The following defines are from ftp.h and telnet.h from bsd.h */ -/* All relevent copyrights below apply. */ - -#define IAC 255 -#define DONT 254 -#define DO 253 -#define WONT 252 -#define WILL 251 -#define SB 250 -#define GA 249 -#define EL 248 -#define EC 247 -#define AYT 246 -#define AO 245 -#define IP 244 -#define BREAK 243 -#define DM 242 -#define NOP 241 -#define SE 240 -#define EOR 239 -#define ABORT 238 -#define SUSP 237 -#define xEOF 236 - - -#define MAXPATHLEN 255 -#define TYPE_A 'A' -#define TYPE_I 'I' -#define TYPE_E 'E' -#define TYPE_L 'L' - -#define PRELIM 1 -#define COMPLETE 2 -#define CONTINUE 3 -#define TRANSIENT 4 - -#define MODE_S 1 -#define MODE_B 2 -#define MODE_C 3 - -#define STRU_F 1 -#define STRU_R 2 -#define STRU_P 3 - -#define SIGQUIT 1 -#define SIGPIPE 2 -#define SIGALRM 3 - - -#define FORM_N 1 -#define FORM_T 2 -#define FORM_C 3 - - -/* - * Copyright (c) 1985 Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * @(#)ftp_var.h 5.5 (Berkeley) 6/29/88 - */ - -/* - * FTP global variables. - */ - -/* - * Options and other state info. - */ -extern int trace; /* trace packets exchanged */ -extern int hash; /* print # for each buffer transferred */ -extern int sendport; /* use PORT cmd for each data connection */ -extern int verbose; /* print messages coming back from server */ -extern int connected; /* connected to server */ -extern int fromatty; /* input is from a terminal */ -extern int interactive; /* interactively prompt on m* cmds */ -extern int debug; /* debugging level */ -extern int bell; /* ring bell on cmd completion */ -extern int doglob; /* glob local file names */ -extern int proxy; /* proxy server connection active */ -extern int proxflag; /* proxy connection exists */ -extern int sunique; /* store files on server with unique name */ -extern int runique; /* store local files with unique name */ -extern int mcase; /* map upper to lower case for mget names */ -extern int ntflag; /* use ntin ntout tables for name translation */ -extern int mapflag; /* use mapin mapout templates on file names */ -extern int code; /* return/reply code for ftp command */ -extern int crflag; /* if 1, strip car. rets. on ascii gets */ -extern char pasv[64]; /* passive port for proxy data connection */ -extern int passivemode; /* passive mode enabled */ -extern char *altarg; /* argv[1] with no shell-like preprocessing */ -extern char ntin[17]; /* input translation table */ -extern char ntout[17]; /* output translation table */ - -extern char mapin[MAXPATHLEN]; /* input map template */ -extern char mapout[MAXPATHLEN]; /* output map template */ -extern char typename[32]; /* name of file transfer type */ -extern int type; /* file transfer type */ -extern char structname[32]; /* name of file transfer structure */ -extern int stru; /* file transfer structure */ -extern char formname[32]; /* name of file transfer format */ -extern int form; /* file transfer format */ -extern char modename[32]; /* name of file transfer mode */ -extern int mode; /* file transfer mode */ -extern char bytename[32]; /* local byte size in ascii */ -extern int bytesize; /* local byte size in binary */ - -extern jmp_buf toplevel; /* non-local goto stuff for cmd scanner */ - -extern char line[200]; /* input line buffer */ -extern char *stringbase; /* current scan point in line buffer */ -extern char argbuf[200]; /* argument storage buffer */ -extern char *argbase; /* current storage point in arg buffer */ -extern int margc; /* count of arguments on input line */ -extern char *margv[20]; /* args parsed from input line */ -extern int cpend; /* flag: if != 0, then pending server reply */ -extern int mflag; /* flag: if != 0, then active multi command */ - -extern int options; /* used during socket creation */ - -/* - * Format of command table. - */ -struct cmd { - char *c_name; /* name of command */ - char *c_help; /* help string */ - char c_bell; /* give bell when command completes */ - char c_conn; /* must be connected to use command */ - char c_proxy; /* proxy server may execute */ - int (*c_handler)(); /* function to call */ -}; - -struct macel { - char mac_name[9]; /* macro name */ - char *mac_start; /* start of macro in macbuf */ - char *mac_end; /* end of macro in macbuf */ -}; - -int macnum; /* number of defined macros */ -struct macel macros[16]; -char macbuf[4096]; - -extern char *tail(); -extern char *remglob(); -extern int errno; -extern char *mktemp(); - -#if defined(__ANSI__) || defined(sparc) -typedef void sig_t; -#else -typedef int sig_t; -#endif - -typedef int uid_t; -int herror(char *s); +#include "fake.h" +#include +#include + +//typedef void (*Sig_t)(int); + +int fgetcSocket(int s); +char *fputsSocket(char *format, int s); + +char *fprintfSocket(int s, char *format, ...); + +int fputcSocket(int s, char putChar); +int fputSocket(int s, char *putChar, int len); +char *fgetsSocket(int s, char *string); + +/* The following defines are from ftp.h and telnet.h from bsd.h */ +/* All relevent copyrights below apply. */ + +#define IAC 255 +#define DONT 254 +#define DO 253 +#define WONT 252 +#define WILL 251 +#define SB 250 +#define GA 249 +#define EL 248 +#define EC 247 +#define AYT 246 +#define AO 245 +#define IP 244 +#define BREAK 243 +#define DM 242 +#define NOP 241 +#define SE 240 +#define EOR 239 +#define ABORT 238 +#define SUSP 237 +#define xEOF 236 + + +#define MAXPATHLEN 255 +#define TYPE_A 'A' +#define TYPE_I 'I' +#define TYPE_E 'E' +#define TYPE_L 'L' + +#define PRELIM 1 +#define COMPLETE 2 +#define CONTINUE 3 +#define TRANSIENT 4 + +#define MODE_S 1 +#define MODE_B 2 +#define MODE_C 3 + +#define STRU_F 1 +#define STRU_R 2 +#define STRU_P 3 + +#define SIGQUIT 1 +#define SIGPIPE 2 +#define SIGALRM 3 + + +#define FORM_N 1 +#define FORM_T 2 +#define FORM_C 3 + + +/* + * Copyright (c) 1985 Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms are permitted + * provided that the above copyright notice and this paragraph are + * duplicated in all such forms and that any documentation, + * advertising materials, and other materials related to such + * distribution and use acknowledge that the software was developed + * by the University of California, Berkeley. The name of the + * University may not be used to endorse or promote products derived + * from this software without specific prior written permission. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * @(#)ftp_var.h 5.5 (Berkeley) 6/29/88 + */ + +/* + * FTP global variables. + */ + +/* + * Options and other state info. + */ +extern int trace; /* trace packets exchanged */ +extern int hash; /* print # for each buffer transferred */ +extern int sendport; /* use PORT cmd for each data connection */ +extern int verbose; /* print messages coming back from server */ +extern int connected; /* connected to server */ +extern int fromatty; /* input is from a terminal */ +extern int interactive; /* interactively prompt on m* cmds */ +extern int debug; /* debugging level */ +extern int bell; /* ring bell on cmd completion */ +extern int doglob; /* glob local file names */ +extern int proxy; /* proxy server connection active */ +extern int proxflag; /* proxy connection exists */ +extern int sunique; /* store files on server with unique name */ +extern int runique; /* store local files with unique name */ +extern int mcase; /* map upper to lower case for mget names */ +extern int ntflag; /* use ntin ntout tables for name translation */ +extern int mapflag; /* use mapin mapout templates on file names */ +extern int code; /* return/reply code for ftp command */ +extern int crflag; /* if 1, strip car. rets. on ascii gets */ +extern char pasv[64]; /* passive port for proxy data connection */ +extern int passivemode; /* passive mode enabled */ +extern char *altarg; /* argv[1] with no shell-like preprocessing */ +extern char ntin[17]; /* input translation table */ +extern char ntout[17]; /* output translation table */ + +extern char mapin[MAXPATHLEN]; /* input map template */ +extern char mapout[MAXPATHLEN]; /* output map template */ +extern char typename[32]; /* name of file transfer type */ +extern int type; /* file transfer type */ +extern char structname[32]; /* name of file transfer structure */ +extern int stru; /* file transfer structure */ +extern char formname[32]; /* name of file transfer format */ +extern int form; /* file transfer format */ +extern char modename[32]; /* name of file transfer mode */ +extern int mode; /* file transfer mode */ +extern char bytename[32]; /* local byte size in ascii */ +extern int bytesize; /* local byte size in binary */ + +extern jmp_buf toplevel; /* non-local goto stuff for cmd scanner */ + +extern char line[200]; /* input line buffer */ +extern char *stringbase; /* current scan point in line buffer */ +extern char argbuf[200]; /* argument storage buffer */ +extern char *argbase; /* current storage point in arg buffer */ +extern int margc; /* count of arguments on input line */ +extern char *margv[20]; /* args parsed from input line */ +extern int cpend; /* flag: if != 0, then pending server reply */ +extern int mflag; /* flag: if != 0, then active multi command */ + +extern int options; /* used during socket creation */ + +/* + * Format of command table. + */ +struct cmd { + char *c_name; /* name of command */ + char *c_help; /* help string */ + char c_bell; /* give bell when command completes */ + char c_conn; /* must be connected to use command */ + char c_proxy; /* proxy server may execute */ + int (*c_handler)(); /* function to call */ +}; + +struct macel { + char mac_name[9]; /* macro name */ + char *mac_start; /* start of macro in macbuf */ + char *mac_end; /* end of macro in macbuf */ +}; + +int macnum; /* number of defined macros */ +struct macel macros[16]; +char macbuf[4096]; + +extern char *tail(); +extern char *remglob(); +extern int errno; +extern char *mktemp(); + +#if defined(__ANSI__) || defined(sparc) +typedef void sig_t; +#else +typedef int sig_t; +#endif + +typedef int uid_t; +int herror(char *s); diff --git a/reactos/apps/utils/net/ftp/main.c b/reactos/apps/utils/net/ftp/main.c index 409c5c6d342..fd6c506b2b2 100644 --- a/reactos/apps/utils/net/ftp/main.c +++ b/reactos/apps/utils/net/ftp/main.c @@ -1,602 +1,602 @@ -/* - * Copyright (c) 1985, 1989 Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -#ifndef lint -char copyright[] = -"@(#) Copyright (c) 1985, 1989 Regents of the University of California.\n\ - All rights reserved.\n"; -#endif /* not lint */ - -#ifndef lint -static char sccsid[] = "@(#)main.c based on 5.13 (Berkeley) 3/14/89"; -#endif /* not lint */ - -/* - * FTP User Program -- Command Interface. - */ -#if !defined(WIN32) -#include -#include -#include -#include -#include -#include -#endif -#include "ftp_var.h" -#include "prototypes.h" -#include - -#include -#include - -#include -#include -#include -#include - - -#if defined(sun) && !defined(FD_SET) -typedef int uid_t; -#endif - -uid_t getuid(); -void intr(); -void lostpeer(); -char *getlogin(); - -short portnum; - -char home[128]; -char *globerr; -int autologin; - - - -/* Lot's of options... */ -/* - * Options and other state info. - */ -int trace; /* trace packets exchanged */ -int hash; /* print # for each buffer transferred */ -int sendport; /* use PORT cmd for each data connection */ -int verbose; /* print messages coming back from server */ -int connected; /* connected to server */ -int fromatty; /* input is from a terminal */ -int interactive; /* interactively prompt on m* cmds */ -int debug; /* debugging level */ -int bell; /* ring bell on cmd completion */ -int doglob; /* glob local file names */ -int proxy; /* proxy server connection active */ -int passivemode; -int proxflag; /* proxy connection exists */ -int sunique; /* store files on server with unique name */ -int runique; /* store local files with unique name */ -int mcase; /* map upper to lower case for mget names */ -int ntflag; /* use ntin ntout tables for name translation */ -int mapflag; /* use mapin mapout templates on file names */ -int code; /* return/reply code for ftp command */ -int crflag; /* if 1, strip car. rets. on ascii gets */ -char pasv[64]; /* passive port for proxy data connection */ -char *altarg; /* argv[1] with no shell-like preprocessing */ -char ntin[17]; /* input translation table */ -char ntout[17]; /* output translation table */ -// #include -char mapin[MAXPATHLEN]; /* input map template */ -char mapout[MAXPATHLEN]; /* output map template */ -char typename[32]; /* name of file transfer type */ -int type; /* file transfer type */ -char structname[32]; /* name of file transfer structure */ -int stru; /* file transfer structure */ -char formname[32]; /* name of file transfer format */ -int form; /* file transfer format */ -char modename[32]; /* name of file transfer mode */ -int mode; /* file transfer mode */ -char bytename[32]; /* local byte size in ascii */ -int bytesize; /* local byte size in binary */ - -jmp_buf toplevel; /* non-local goto stuff for cmd scanner */ - -char line[200]; /* input line buffer */ -char *stringbase; /* current scan point in line buffer */ -char argbuf[200]; /* argument storage buffer */ -char *argbase; /* current storage point in arg buffer */ -int margc; /* count of arguments on input line */ -char *margv[20]; /* args parsed from input line */ -int cpend; /* flag: if != 0, then pending server reply */ -int mflag; /* flag: if != 0, then active multi command */ - -int options; /* used during socket creation */ - - - -int main(int argc, char *argv[]) -{ - register char *cp; - int top; - struct passwd *pw = NULL; -#if 0 - char homedir[MAXPATHLEN]; -#endif - - int err; - WORD wVerReq; - - WSADATA WSAData; - struct servent *sp; /* service spec for tcp/ftp */ - - /* Disable output buffering, for the benefit of Emacs. */ - //setbuf(stdout, NULL); - - _fmode = O_BINARY; // This causes an error somewhere. - - wVerReq = MAKEWORD(1,1); - - err = WSAStartup(wVerReq, &WSAData); - if (err != 0) - { - fprintf(stderr, "Could not initialize Windows socket interface."); - exit(1); - } - - sp = getservbyname("ftp", "tcp"); - if (sp == 0) { - fprintf(stderr, "ftp: ftp/tcp: unknown service\n"); - exit(1); - } - - portnum = sp->s_port; - - - doglob = 1; - interactive = 1; - autologin = 1; - argc--, argv++; - while (argc > 0 && **argv == '-') { - for (cp = *argv + 1; *cp; cp++) - switch (*cp) { - - case 'd': - options |= SO_DEBUG; - debug++; - break; - - case 'v': - verbose++; - break; - - case 't': - trace++; - break; - - case 'i': - interactive = 0; - break; - - case 'n': - autologin = 0; - break; - - case 'g': - doglob = 0; - break; - - default: - fprintf(stdout, - "ftp: %c: unknown option\n", *cp); - exit(1); - } - argc--, argv++; - } -// fromatty = isatty(fileno(stdin)); - fromatty = 1; // Strengthen this test - /* - * Set up defaults for FTP. - */ - (void) strcpy(typename, "ascii"), type = TYPE_A; - (void) strcpy(formname, "non-print"), form = FORM_N; - (void) strcpy(modename, "stream"), mode = MODE_S; - (void) strcpy(structname, "file"), stru = STRU_F; - (void) strcpy(bytename, "8"), bytesize = 8; - if (fromatty) - verbose++; - cpend = 0; /* no pending replies */ - proxy = 0; /* proxy not active */ - passivemode = 1; /* passive mode *is* active */ - crflag = 1; /* strip c.r. on ascii gets */ - /* - * Set up the home directory in case we're globbing. - */ -#if 0 - cp = getlogin(); - if (cp != NULL) { - pw = getpwnam(cp); - } - if (pw == NULL) - pw = getpwuid(getuid()); - if (pw != NULL) { - home = homedir; - (void) strcpy(home, pw->pw_dir); - } -#endif - strcpy(home, "C:/"); - if (argc > 0) { - if (setjmp(toplevel)) - exit(0); -// (void) signal(SIGINT, intr); -// (void) signal(SIGPIPE, lostpeer); - setpeer(argc + 1, argv - 1); - } - top = setjmp(toplevel) == 0; - if (top) { -// (void) signal(SIGINT, intr); -// (void) signal(SIGPIPE, lostpeer); - } - for (;;) { - cmdscanner(top); - top = 1; - } -} - -void -intr() -{ - - longjmp(toplevel, 1); -} - -void lostpeer(void) -{ - extern int cout; - extern int data; - - if (connected) { - if (cout != (int) NULL) { - closesocket(cout); - cout = (int) NULL; - } - if (data >= 0) { - (void) shutdown(data, 1+1); - (void) close(data); - data = -1; - } - connected = 0; - } - pswitch(1); - if (connected) { - if (cout != (int)NULL) { - closesocket(cout); - cout = (int) NULL; - } - connected = 0; - } - proxflag = 0; - pswitch(0); -} - -/*char * -tail(filename) - char *filename; -{ - register char *s; - - while (*filename) { - s = rindex(filename, '/'); - if (s == NULL) - break; - if (s[1]) - return (s + 1); - *s = '\0'; - } - return (filename); -} -*/ -/* - * Command parser. - */ -void cmdscanner(top) - int top; -{ - register struct cmd *c; - struct cmd *getcmd(); - extern int help(); - - if (!top) - (void) putchar('\n'); - for (;;) { - (void) fflush(stdout); - if (fromatty) { - printf("ftp> "); - (void) fflush(stdout); - } - if (gets(line) == 0) { - if (feof(stdin) || ferror(stdin)) - quit(); - break; - } - if (line[0] == 0) - break; - makeargv(); - if (margc == 0) { - continue; - } - c = getcmd(margv[0]); - if (c == (struct cmd *)-1) { - printf("?Ambiguous command\n"); - continue; - } - if (c == 0) { - printf("?Invalid command\n"); - continue; - } - if (c->c_conn && !connected) { - printf ("Not connected.\n"); - continue; - } - (*c->c_handler)(margc, margv); - if (bell && c->c_bell) - (void) putchar('\007'); - if (c->c_handler != help) - break; - } - (void) fflush(stdout); -// (void) signal(SIGINT, intr); -// (void) signal(SIGPIPE, lostpeer); -} - -struct cmd * -getcmd(name) - register char *name; -{ - extern struct cmd cmdtab[]; - register char *p, *q; - register struct cmd *c, *found; - register int nmatches, longest; - - longest = 0; - nmatches = 0; - found = 0; - for (c = cmdtab; p = c->c_name; c++) { - for (q = name; *q == *p++; q++) - if (*q == 0) /* exact match? */ - return (c); - if (!*q) { /* the name was a prefix */ - if (q - name > longest) { - longest = q - name; - nmatches = 1; - found = c; - } else if (q - name == longest) - nmatches++; - } - } - if (nmatches > 1) - return ((struct cmd *)-1); - return (found); -} - -/* - * Slice a string up into argc/argv. - */ - -int slrflag; - -void makeargv() -{ - char **argp; - char *slurpstring(); - - margc = 0; - argp = margv; - stringbase = line; /* scan from first of buffer */ - argbase = argbuf; /* store from first of buffer */ - slrflag = 0; - while (*argp++ = slurpstring()) - margc++; -} - -/* - * Parse string into argbuf; - * implemented with FSM to - * handle quoting and strings - */ -char * -slurpstring() -{ - int got_one = 0; - register char *sb = stringbase; - register char *ap = argbase; - char *tmp = argbase; /* will return this if token found */ - - if (*sb == '!' || *sb == '$') { /* recognize ! as a token for shell */ - switch (slrflag) { /* and $ as token for macro invoke */ - case 0: - slrflag++; - stringbase++; - return ((*sb == '!') ? "!" : "$"); - /* NOTREACHED */ - case 1: - slrflag++; - altarg = stringbase; - break; - default: - break; - } - } - -S0: - switch (*sb) { - - case '\0': - goto OUT1; - - case ' ': - case '\t': - sb++; goto S0; - - default: - switch (slrflag) { - case 0: - slrflag++; - break; - case 1: - slrflag++; - altarg = sb; - break; - default: - break; - } - goto S1; - } - -S1: - switch (*sb) { - - case ' ': - case '\t': - case '\0': - goto OUT1; /* end of token */ - - case '\\': - sb++; goto S2; /* slurp next character */ - - case '"': - sb++; goto S3; /* slurp quoted string */ - - default: - *ap++ = *sb++; /* add character to token */ - got_one = 1; - goto S1; - } - -S2: - switch (*sb) { - - case '\0': - goto OUT1; - - default: - *ap++ = *sb++; - got_one = 1; - goto S1; - } - -S3: - switch (*sb) { - - case '\0': - goto OUT1; - - case '"': - sb++; goto S1; - - default: - *ap++ = *sb++; - got_one = 1; - goto S3; - } - -OUT1: - if (got_one) - *ap++ = '\0'; - argbase = ap; /* update storage pointer */ - stringbase = sb; /* update scan pointer */ - if (got_one) { - return(tmp); - } - switch (slrflag) { - case 0: - slrflag++; - break; - case 1: - slrflag++; - altarg = (char *) 0; - break; - default: - break; - } - return((char *)0); -} - -#define HELPINDENT (sizeof ("directory")) - -/* - * Help command. - * Call each command handler with argc == 0 and argv[0] == name. - */ -int help(argc, argv) - int argc; - char *argv[]; -{ - extern struct cmd cmdtab[]; - register struct cmd *c; - - if (argc == 1) { - register int i, j, w, k; - int columns, width = 0, lines; - extern int NCMDS; - - printf("Commands may be abbreviated. Commands are:\n\n"); - for (c = cmdtab; c < &cmdtab[NCMDS]; c++) { - int len = strlen(c->c_name); - - if (len > width) - width = len; - } - width = (width + 8) &~ 7; - columns = 80 / width; - if (columns == 0) - columns = 1; - lines = (NCMDS + columns - 1) / columns; - for (i = 0; i < lines; i++) { - for (j = 0; j < columns; j++) { - c = cmdtab + j * lines + i; - if (c->c_name && (!proxy || c->c_proxy)) { - printf("%s", c->c_name); - } - else if (c->c_name) { - for (k=0; k < (int) strlen(c->c_name); k++) { - (void) putchar(' '); - } - } - if (c + lines >= &cmdtab[NCMDS]) { - printf("\n"); - break; - } - w = strlen(c->c_name); - while (w < width) { - w = (w + 8) &~ 7; - (void) putchar('\t'); - } - } - } - (void) fflush(stdout); - return 0; - } - while (--argc > 0) { - register char *arg; - arg = *++argv; - c = getcmd(arg); - if (c == (struct cmd *)-1) - printf("?Ambiguous help command %s\n", arg); - else if (c == (struct cmd *)0) - printf("?Invalid help command %s\n", arg); - else - printf("%-*s\t%s\n", HELPINDENT, - c->c_name, c->c_help); - } - (void) fflush(stdout); - return 0; -} +/* + * Copyright (c) 1985, 1989 Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms are permitted + * provided that the above copyright notice and this paragraph are + * duplicated in all such forms and that any documentation, + * advertising materials, and other materials related to such + * distribution and use acknowledge that the software was developed + * by the University of California, Berkeley. The name of the + * University may not be used to endorse or promote products derived + * from this software without specific prior written permission. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + */ + +#ifndef lint +char copyright[] = +"@(#) Copyright (c) 1985, 1989 Regents of the University of California.\n\ + All rights reserved.\n"; +#endif /* not lint */ + +#ifndef lint +static char sccsid[] = "@(#)main.c based on 5.13 (Berkeley) 3/14/89"; +#endif /* not lint */ + +/* + * FTP User Program -- Command Interface. + */ +#if !defined(WIN32) +#include +#include +#include +#include +#include +#include +#endif +#include "ftp_var.h" +#include "prototypes.h" +#include + +#include +#include + +#include +#include +#include +#include + + +#if defined(sun) && !defined(FD_SET) +typedef int uid_t; +#endif + +uid_t getuid(); +void intr(); +void lostpeer(); +char *getlogin(); + +short portnum; + +char home[128]; +char *globerr; +int autologin; + + + +/* Lot's of options... */ +/* + * Options and other state info. + */ +int trace; /* trace packets exchanged */ +int hash; /* print # for each buffer transferred */ +int sendport; /* use PORT cmd for each data connection */ +int verbose; /* print messages coming back from server */ +int connected; /* connected to server */ +int fromatty; /* input is from a terminal */ +int interactive; /* interactively prompt on m* cmds */ +int debug; /* debugging level */ +int bell; /* ring bell on cmd completion */ +int doglob; /* glob local file names */ +int proxy; /* proxy server connection active */ +int passivemode; +int proxflag; /* proxy connection exists */ +int sunique; /* store files on server with unique name */ +int runique; /* store local files with unique name */ +int mcase; /* map upper to lower case for mget names */ +int ntflag; /* use ntin ntout tables for name translation */ +int mapflag; /* use mapin mapout templates on file names */ +int code; /* return/reply code for ftp command */ +int crflag; /* if 1, strip car. rets. on ascii gets */ +char pasv[64]; /* passive port for proxy data connection */ +char *altarg; /* argv[1] with no shell-like preprocessing */ +char ntin[17]; /* input translation table */ +char ntout[17]; /* output translation table */ +// #include +char mapin[MAXPATHLEN]; /* input map template */ +char mapout[MAXPATHLEN]; /* output map template */ +char typename[32]; /* name of file transfer type */ +int type; /* file transfer type */ +char structname[32]; /* name of file transfer structure */ +int stru; /* file transfer structure */ +char formname[32]; /* name of file transfer format */ +int form; /* file transfer format */ +char modename[32]; /* name of file transfer mode */ +int mode; /* file transfer mode */ +char bytename[32]; /* local byte size in ascii */ +int bytesize; /* local byte size in binary */ + +jmp_buf toplevel; /* non-local goto stuff for cmd scanner */ + +char line[200]; /* input line buffer */ +char *stringbase; /* current scan point in line buffer */ +char argbuf[200]; /* argument storage buffer */ +char *argbase; /* current storage point in arg buffer */ +int margc; /* count of arguments on input line */ +char *margv[20]; /* args parsed from input line */ +int cpend; /* flag: if != 0, then pending server reply */ +int mflag; /* flag: if != 0, then active multi command */ + +int options; /* used during socket creation */ + + + +int main(int argc, char *argv[]) +{ + register char *cp; + int top; + struct passwd *pw = NULL; +#if 0 + char homedir[MAXPATHLEN]; +#endif + + int err; + WORD wVerReq; + + WSADATA WSAData; + struct servent *sp; /* service spec for tcp/ftp */ + + /* Disable output buffering, for the benefit of Emacs. */ + //setbuf(stdout, NULL); + + _fmode = O_BINARY; // This causes an error somewhere. + + wVerReq = MAKEWORD(1,1); + + err = WSAStartup(wVerReq, &WSAData); + if (err != 0) + { + fprintf(stderr, "Could not initialize Windows socket interface."); + exit(1); + } + + sp = getservbyname("ftp", "tcp"); + if (sp == 0) { + fprintf(stderr, "ftp: ftp/tcp: unknown service\n"); + exit(1); + } + + portnum = sp->s_port; + + + doglob = 1; + interactive = 1; + autologin = 1; + argc--, argv++; + while (argc > 0 && **argv == '-') { + for (cp = *argv + 1; *cp; cp++) + switch (*cp) { + + case 'd': + options |= SO_DEBUG; + debug++; + break; + + case 'v': + verbose++; + break; + + case 't': + trace++; + break; + + case 'i': + interactive = 0; + break; + + case 'n': + autologin = 0; + break; + + case 'g': + doglob = 0; + break; + + default: + fprintf(stdout, + "ftp: %c: unknown option\n", *cp); + exit(1); + } + argc--, argv++; + } +// fromatty = isatty(fileno(stdin)); + fromatty = 1; // Strengthen this test + /* + * Set up defaults for FTP. + */ + (void) strcpy(typename, "ascii"), type = TYPE_A; + (void) strcpy(formname, "non-print"), form = FORM_N; + (void) strcpy(modename, "stream"), mode = MODE_S; + (void) strcpy(structname, "file"), stru = STRU_F; + (void) strcpy(bytename, "8"), bytesize = 8; + if (fromatty) + verbose++; + cpend = 0; /* no pending replies */ + proxy = 0; /* proxy not active */ + passivemode = 1; /* passive mode *is* active */ + crflag = 1; /* strip c.r. on ascii gets */ + /* + * Set up the home directory in case we're globbing. + */ +#if 0 + cp = getlogin(); + if (cp != NULL) { + pw = getpwnam(cp); + } + if (pw == NULL) + pw = getpwuid(getuid()); + if (pw != NULL) { + home = homedir; + (void) strcpy(home, pw->pw_dir); + } +#endif + strcpy(home, "C:/"); + if (argc > 0) { + if (setjmp(toplevel)) + exit(0); +// (void) signal(SIGINT, intr); +// (void) signal(SIGPIPE, lostpeer); + setpeer(argc + 1, argv - 1); + } + top = setjmp(toplevel) == 0; + if (top) { +// (void) signal(SIGINT, intr); +// (void) signal(SIGPIPE, lostpeer); + } + for (;;) { + cmdscanner(top); + top = 1; + } +} + +void +intr() +{ + + longjmp(toplevel, 1); +} + +void lostpeer(void) +{ + extern int cout; + extern int data; + + if (connected) { + if (cout != (int) NULL) { + closesocket(cout); + cout = (int) NULL; + } + if (data >= 0) { + (void) shutdown(data, 1+1); + (void) close(data); + data = -1; + } + connected = 0; + } + pswitch(1); + if (connected) { + if (cout != (int)NULL) { + closesocket(cout); + cout = (int) NULL; + } + connected = 0; + } + proxflag = 0; + pswitch(0); +} + +/*char * +tail(filename) + char *filename; +{ + register char *s; + + while (*filename) { + s = rindex(filename, '/'); + if (s == NULL) + break; + if (s[1]) + return (s + 1); + *s = '\0'; + } + return (filename); +} +*/ +/* + * Command parser. + */ +void cmdscanner(top) + int top; +{ + register struct cmd *c; + struct cmd *getcmd(); + extern int help(); + + if (!top) + (void) putchar('\n'); + for (;;) { + (void) fflush(stdout); + if (fromatty) { + printf("ftp> "); + (void) fflush(stdout); + } + if (gets(line) == 0) { + if (feof(stdin) || ferror(stdin)) + quit(); + break; + } + if (line[0] == 0) + break; + makeargv(); + if (margc == 0) { + continue; + } + c = getcmd(margv[0]); + if (c == (struct cmd *)-1) { + printf("?Ambiguous command\n"); + continue; + } + if (c == 0) { + printf("?Invalid command\n"); + continue; + } + if (c->c_conn && !connected) { + printf ("Not connected.\n"); + continue; + } + (*c->c_handler)(margc, margv); + if (bell && c->c_bell) + (void) putchar('\007'); + if (c->c_handler != help) + break; + } + (void) fflush(stdout); +// (void) signal(SIGINT, intr); +// (void) signal(SIGPIPE, lostpeer); +} + +struct cmd * +getcmd(name) + register char *name; +{ + extern struct cmd cmdtab[]; + register char *p, *q; + register struct cmd *c, *found; + register int nmatches, longest; + + longest = 0; + nmatches = 0; + found = 0; + for (c = cmdtab; p = c->c_name; c++) { + for (q = name; *q == *p++; q++) + if (*q == 0) /* exact match? */ + return (c); + if (!*q) { /* the name was a prefix */ + if (q - name > longest) { + longest = q - name; + nmatches = 1; + found = c; + } else if (q - name == longest) + nmatches++; + } + } + if (nmatches > 1) + return ((struct cmd *)-1); + return (found); +} + +/* + * Slice a string up into argc/argv. + */ + +int slrflag; + +void makeargv() +{ + char **argp; + char *slurpstring(); + + margc = 0; + argp = margv; + stringbase = line; /* scan from first of buffer */ + argbase = argbuf; /* store from first of buffer */ + slrflag = 0; + while (*argp++ = slurpstring()) + margc++; +} + +/* + * Parse string into argbuf; + * implemented with FSM to + * handle quoting and strings + */ +char * +slurpstring() +{ + int got_one = 0; + register char *sb = stringbase; + register char *ap = argbase; + char *tmp = argbase; /* will return this if token found */ + + if (*sb == '!' || *sb == '$') { /* recognize ! as a token for shell */ + switch (slrflag) { /* and $ as token for macro invoke */ + case 0: + slrflag++; + stringbase++; + return ((*sb == '!') ? "!" : "$"); + /* NOTREACHED */ + case 1: + slrflag++; + altarg = stringbase; + break; + default: + break; + } + } + +S0: + switch (*sb) { + + case '\0': + goto OUT1; + + case ' ': + case '\t': + sb++; goto S0; + + default: + switch (slrflag) { + case 0: + slrflag++; + break; + case 1: + slrflag++; + altarg = sb; + break; + default: + break; + } + goto S1; + } + +S1: + switch (*sb) { + + case ' ': + case '\t': + case '\0': + goto OUT1; /* end of token */ + + case '\\': + sb++; goto S2; /* slurp next character */ + + case '"': + sb++; goto S3; /* slurp quoted string */ + + default: + *ap++ = *sb++; /* add character to token */ + got_one = 1; + goto S1; + } + +S2: + switch (*sb) { + + case '\0': + goto OUT1; + + default: + *ap++ = *sb++; + got_one = 1; + goto S1; + } + +S3: + switch (*sb) { + + case '\0': + goto OUT1; + + case '"': + sb++; goto S1; + + default: + *ap++ = *sb++; + got_one = 1; + goto S3; + } + +OUT1: + if (got_one) + *ap++ = '\0'; + argbase = ap; /* update storage pointer */ + stringbase = sb; /* update scan pointer */ + if (got_one) { + return(tmp); + } + switch (slrflag) { + case 0: + slrflag++; + break; + case 1: + slrflag++; + altarg = (char *) 0; + break; + default: + break; + } + return((char *)0); +} + +#define HELPINDENT (sizeof ("directory")) + +/* + * Help command. + * Call each command handler with argc == 0 and argv[0] == name. + */ +int help(argc, argv) + int argc; + char *argv[]; +{ + extern struct cmd cmdtab[]; + register struct cmd *c; + + if (argc == 1) { + register int i, j, w, k; + int columns, width = 0, lines; + extern int NCMDS; + + printf("Commands may be abbreviated. Commands are:\n\n"); + for (c = cmdtab; c < &cmdtab[NCMDS]; c++) { + int len = strlen(c->c_name); + + if (len > width) + width = len; + } + width = (width + 8) &~ 7; + columns = 80 / width; + if (columns == 0) + columns = 1; + lines = (NCMDS + columns - 1) / columns; + for (i = 0; i < lines; i++) { + for (j = 0; j < columns; j++) { + c = cmdtab + j * lines + i; + if (c->c_name && (!proxy || c->c_proxy)) { + printf("%s", c->c_name); + } + else if (c->c_name) { + for (k=0; k < (int) strlen(c->c_name); k++) { + (void) putchar(' '); + } + } + if (c + lines >= &cmdtab[NCMDS]) { + printf("\n"); + break; + } + w = strlen(c->c_name); + while (w < width) { + w = (w + 8) &~ 7; + (void) putchar('\t'); + } + } + } + (void) fflush(stdout); + return 0; + } + while (--argc > 0) { + register char *arg; + arg = *++argv; + c = getcmd(arg); + if (c == (struct cmd *)-1) + printf("?Ambiguous help command %s\n", arg); + else if (c == (struct cmd *)0) + printf("?Invalid help command %s\n", arg); + else + printf("%-*s\t%s\n", HELPINDENT, + c->c_name, c->c_help); + } + (void) fflush(stdout); + return 0; +} diff --git a/reactos/apps/utils/net/ftp/prototypes.h b/reactos/apps/utils/net/ftp/prototypes.h index 96648ae0a3c..3bff115d48f 100644 --- a/reactos/apps/utils/net/ftp/prototypes.h +++ b/reactos/apps/utils/net/ftp/prototypes.h @@ -1,32 +1,32 @@ - -int getreply(int expecteof); -int ruserpass(char *host, char **aname, char **apass, char **aacct); -char *getpass(const char *prompt); -void makeargv(void); -void domacro(int argc, char *argv[]); -void proxtrans(char *cmd, char *local, char *remote); -int null(void); -int initconn(void); -void disconnect(void); -void ptransfer(char *direction, long bytes, struct timeval *t0, struct timeval *t1); -void setascii(void); -void setbinary(void); -void setebcdic(void); -void settenex(void); -void tvsub(struct timeval *tdiff, struct timeval *t1, struct timeval *t0); -void setpassive(int argc, char *argv[]); -void setpeer(int argc, char *argv[]); -void cmdscanner(int top); -void pswitch(int flag); -void quit(void); -int login(char *host); -int command(char *fmt, ...); -int globulize(char **cpp); -void sendrequest(char *cmd, char *local, char *remote, int printnames); -void recvrequest(char *cmd, char *local, char *remote, char *mode, - int printnames); -int confirm(char *cmd, char *file); -void blkfree(char **av0); -int getit(int argc, char *argv[], int restartit, char *mode); -static int token(void); -int sleep(int time); + +int getreply(int expecteof); +int ruserpass(char *host, char **aname, char **apass, char **aacct); +char *getpass(const char *prompt); +void makeargv(void); +void domacro(int argc, char *argv[]); +void proxtrans(char *cmd, char *local, char *remote); +int null(void); +int initconn(void); +void disconnect(void); +void ptransfer(char *direction, long bytes, struct timeval *t0, struct timeval *t1); +void setascii(void); +void setbinary(void); +void setebcdic(void); +void settenex(void); +void tvsub(struct timeval *tdiff, struct timeval *t1, struct timeval *t0); +void setpassive(int argc, char *argv[]); +void setpeer(int argc, char *argv[]); +void cmdscanner(int top); +void pswitch(int flag); +void quit(void); +int login(char *host); +int command(char *fmt, ...); +int globulize(char **cpp); +void sendrequest(char *cmd, char *local, char *remote, int printnames); +void recvrequest(char *cmd, char *local, char *remote, char *mode, + int printnames); +int confirm(char *cmd, char *file); +void blkfree(char **av0); +int getit(int argc, char *argv[], int restartit, char *mode); +static int token(void); +int sleep(int time); diff --git a/reactos/apps/utils/net/ftp/ruserpass.c b/reactos/apps/utils/net/ftp/ruserpass.c index e8fec046175..ea6751bae0e 100644 --- a/reactos/apps/utils/net/ftp/ruserpass.c +++ b/reactos/apps/utils/net/ftp/ruserpass.c @@ -1,271 +1,271 @@ -/* - * Copyright (c) 1985 Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by the University of California, Berkeley. The name of the - * University may not be used to endorse or promote products derived - * from this software without specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - */ - -#ifndef lint -static char sccsid[] = "@(#)ruserpass.c 5.1 (Berkeley) 3/1/89"; -#endif /* not lint */ - -#include -#include -//#include -#include -#include -#include -#include "ftp_var.h" -#include "prototypes.h" -#include - -char *renvlook(), *index(), *getenv(), *getpass(), *getlogin(); -void *malloc(); -char *strcpy(); -struct utmp *getutmp(); -static FILE *cfile; - -#ifndef MAXHOSTNAMELEN -#define MAXHOSTNAMELEN 64 -#endif - -#define DEFAULT 1 -#define LOGIN 2 -#define PASSWD 3 -#define ACCOUNT 4 -#define MACDEF 5 -#define ID 10 -#define MACH 11 - -static char tokval[100]; - -static struct toktab { - char *tokstr; - int tval; -} toktab[]= { - "default", DEFAULT, - "login", LOGIN, - "password", PASSWD, - "passwd", PASSWD, - "account", ACCOUNT, - "machine", MACH, - "macdef", MACDEF, - 0, 0 -}; - -extern char *hostname; - -int ruserpass(char *host, char **aname, char **apass, char **aacct) -{ - char *hdir, buf[BUFSIZ], *tmp; - char myname[MAXHOSTNAMELEN], *mydomain; - int t, i, c, usedefault = 0; - struct stat stb; - extern int errno; - - hdir = getenv("HOME"); - if (hdir == NULL) - hdir = "."; - (void) sprintf(buf, "%s/.netrc", hdir); - cfile = fopen(buf, "r"); - if (cfile == NULL) { - if (errno != ENOENT) - perror(buf); - return(0); - } - - - if (gethostname(myname, sizeof(myname)) < 0) - myname[0] = '\0'; - if ((mydomain = index(myname, '.')) == NULL) - mydomain = ""; -next: - while ((t = token())) switch(t) { - - case DEFAULT: - usedefault = 1; - /* FALL THROUGH */ - - case MACH: - if (!usedefault) { - if (token() != ID) - continue; - /* - * Allow match either for user's input host name - * or official hostname. Also allow match of - * incompletely-specified host in local domain. - */ - if (strcasecmp(host, tokval) == 0) - goto match; - if (strcasecmp(hostname, tokval) == 0) - goto match; - if ((tmp = index(hostname, '.')) != NULL && - strcasecmp(tmp, mydomain) == 0 && - strncasecmp(hostname, tokval, tmp - hostname) == 0 && - tokval[tmp - hostname] == '\0') - goto match; - if ((tmp = index(host, '.')) != NULL && - strcasecmp(tmp, mydomain) == 0 && - strncasecmp(host, tokval, tmp - host) == 0 && - tokval[tmp - host] == '\0') - goto match; - continue; - } - match: - while ((t = token()) && t != MACH && t != DEFAULT) switch(t) { - - case LOGIN: - if (token()) - if (*aname == 0) { - *aname = malloc((unsigned) strlen(tokval) + 1); - (void) strcpy(*aname, tokval); - } else { - if (strcmp(*aname, tokval)) - goto next; - } - break; - case PASSWD: - if (strcmp(*aname, "anonymous") && - fstat(fileno(cfile), &stb) >= 0 && - (stb.st_mode & 077) != 0) { - fprintf(stderr, "Error - .netrc file not correct mode.\n"); - fprintf(stderr, "Remove password or correct mode.\n"); - goto bad; - } - if (token() && *apass == 0) { - *apass = malloc((unsigned) strlen(tokval) + 1); - (void) strcpy(*apass, tokval); - } - break; - case ACCOUNT: - if (fstat(fileno(cfile), &stb) >= 0 - && (stb.st_mode & 077) != 0) { - fprintf(stderr, "Error - .netrc file not correct mode.\n"); - fprintf(stderr, "Remove account or correct mode.\n"); - goto bad; - } - if (token() && *aacct == 0) { - *aacct = malloc((unsigned) strlen(tokval) + 1); - (void) strcpy(*aacct, tokval); - } - break; - case MACDEF: - if (proxy) { - (void) fclose(cfile); - return(0); - } - while ((c=getc(cfile)) != EOF && c == ' ' || c == '\t'); - if (c == EOF || c == '\n') { - printf("Missing macdef name argument.\n"); - goto bad; - } - if (macnum == 16) { - printf("Limit of 16 macros have already been defined\n"); - goto bad; - } - tmp = macros[macnum].mac_name; - *tmp++ = c; - for (i=0; i < 8 && (c=getc(cfile)) != EOF && - !isspace(c); ++i) { - *tmp++ = c; - } - if (c == EOF) { - printf("Macro definition missing null line terminator.\n"); - goto bad; - } - *tmp = '\0'; - if (c != '\n') { - while ((c=getc(cfile)) != EOF && c != '\n'); - } - if (c == EOF) { - printf("Macro definition missing null line terminator.\n"); - goto bad; - } - if (macnum == 0) { - macros[macnum].mac_start = macbuf; - } - else { - macros[macnum].mac_start = macros[macnum-1].mac_end + 1; - } - tmp = macros[macnum].mac_start; - while (tmp != macbuf + 4096) { - if ((c=getc(cfile)) == EOF) { - printf("Macro definition missing null line terminator.\n"); - goto bad; - } - *tmp = c; - if (*tmp == '\n') { - if (*(tmp-1) == '\0') { - macros[macnum++].mac_end = tmp - 1; - break; - } - *tmp = '\0'; - } - tmp++; - } - if (tmp == macbuf + 4096) { - printf("4K macro buffer exceeded\n"); - goto bad; - } - break; - default: - fprintf(stderr, "Unknown .netrc keyword %s\n", tokval); - break; - } - goto done; - } -done: - (void) fclose(cfile); - return(0); -bad: - (void) fclose(cfile); - return(-1); -} - -static int token(void) -{ - char *cp; - int c; - struct toktab *t; - - if (feof(cfile)) - return (0); - while ((c = getc(cfile)) != EOF && - (c == '\r' || c == '\n' || c == '\t' || c == ' ' || c == ',')) - continue; - if (c == EOF) - return (0); - cp = tokval; - if (c == '"') { - while ((c = getc(cfile)) != EOF && c != '"') { - if (c == '\\') - c = getc(cfile); - *cp++ = c; - } - } else { - *cp++ = c; - while ((c = getc(cfile)) != EOF - && c != '\n' && c != '\t' && c != ' ' && c != ',' && c != '\r') { - if (c == '\\') - c = getc(cfile); - *cp++ = c; - } - } - *cp = 0; - if (tokval[0] == 0) - return (0); - for (t = toktab; t->tokstr; t++) - if (!strcmp(t->tokstr, tokval)) - return (t->tval); - return (ID); -} +/* + * Copyright (c) 1985 Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms are permitted + * provided that the above copyright notice and this paragraph are + * duplicated in all such forms and that any documentation, + * advertising materials, and other materials related to such + * distribution and use acknowledge that the software was developed + * by the University of California, Berkeley. The name of the + * University may not be used to endorse or promote products derived + * from this software without specific prior written permission. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + */ + +#ifndef lint +static char sccsid[] = "@(#)ruserpass.c 5.1 (Berkeley) 3/1/89"; +#endif /* not lint */ + +#include +#include +//#include +#include +#include +#include +#include "ftp_var.h" +#include "prototypes.h" +#include + +char *renvlook(), *index(), *getenv(), *getpass(), *getlogin(); +void *malloc(); +char *strcpy(); +struct utmp *getutmp(); +static FILE *cfile; + +#ifndef MAXHOSTNAMELEN +#define MAXHOSTNAMELEN 64 +#endif + +#define DEFAULT 1 +#define LOGIN 2 +#define PASSWD 3 +#define ACCOUNT 4 +#define MACDEF 5 +#define ID 10 +#define MACH 11 + +static char tokval[100]; + +static struct toktab { + char *tokstr; + int tval; +} toktab[]= { + "default", DEFAULT, + "login", LOGIN, + "password", PASSWD, + "passwd", PASSWD, + "account", ACCOUNT, + "machine", MACH, + "macdef", MACDEF, + 0, 0 +}; + +extern char *hostname; + +int ruserpass(char *host, char **aname, char **apass, char **aacct) +{ + char *hdir, buf[BUFSIZ], *tmp; + char myname[MAXHOSTNAMELEN], *mydomain; + int t, i, c, usedefault = 0; + struct stat stb; + extern int errno; + + hdir = getenv("HOME"); + if (hdir == NULL) + hdir = "."; + (void) sprintf(buf, "%s/.netrc", hdir); + cfile = fopen(buf, "r"); + if (cfile == NULL) { + if (errno != ENOENT) + perror(buf); + return(0); + } + + + if (gethostname(myname, sizeof(myname)) < 0) + myname[0] = '\0'; + if ((mydomain = index(myname, '.')) == NULL) + mydomain = ""; +next: + while ((t = token())) switch(t) { + + case DEFAULT: + usedefault = 1; + /* FALL THROUGH */ + + case MACH: + if (!usedefault) { + if (token() != ID) + continue; + /* + * Allow match either for user's input host name + * or official hostname. Also allow match of + * incompletely-specified host in local domain. + */ + if (strcasecmp(host, tokval) == 0) + goto match; + if (strcasecmp(hostname, tokval) == 0) + goto match; + if ((tmp = index(hostname, '.')) != NULL && + strcasecmp(tmp, mydomain) == 0 && + strncasecmp(hostname, tokval, tmp - hostname) == 0 && + tokval[tmp - hostname] == '\0') + goto match; + if ((tmp = index(host, '.')) != NULL && + strcasecmp(tmp, mydomain) == 0 && + strncasecmp(host, tokval, tmp - host) == 0 && + tokval[tmp - host] == '\0') + goto match; + continue; + } + match: + while ((t = token()) && t != MACH && t != DEFAULT) switch(t) { + + case LOGIN: + if (token()) + if (*aname == 0) { + *aname = malloc((unsigned) strlen(tokval) + 1); + (void) strcpy(*aname, tokval); + } else { + if (strcmp(*aname, tokval)) + goto next; + } + break; + case PASSWD: + if (strcmp(*aname, "anonymous") && + fstat(fileno(cfile), &stb) >= 0 && + (stb.st_mode & 077) != 0) { + fprintf(stderr, "Error - .netrc file not correct mode.\n"); + fprintf(stderr, "Remove password or correct mode.\n"); + goto bad; + } + if (token() && *apass == 0) { + *apass = malloc((unsigned) strlen(tokval) + 1); + (void) strcpy(*apass, tokval); + } + break; + case ACCOUNT: + if (fstat(fileno(cfile), &stb) >= 0 + && (stb.st_mode & 077) != 0) { + fprintf(stderr, "Error - .netrc file not correct mode.\n"); + fprintf(stderr, "Remove account or correct mode.\n"); + goto bad; + } + if (token() && *aacct == 0) { + *aacct = malloc((unsigned) strlen(tokval) + 1); + (void) strcpy(*aacct, tokval); + } + break; + case MACDEF: + if (proxy) { + (void) fclose(cfile); + return(0); + } + while ((c=getc(cfile)) != EOF && c == ' ' || c == '\t'); + if (c == EOF || c == '\n') { + printf("Missing macdef name argument.\n"); + goto bad; + } + if (macnum == 16) { + printf("Limit of 16 macros have already been defined\n"); + goto bad; + } + tmp = macros[macnum].mac_name; + *tmp++ = c; + for (i=0; i < 8 && (c=getc(cfile)) != EOF && + !isspace(c); ++i) { + *tmp++ = c; + } + if (c == EOF) { + printf("Macro definition missing null line terminator.\n"); + goto bad; + } + *tmp = '\0'; + if (c != '\n') { + while ((c=getc(cfile)) != EOF && c != '\n'); + } + if (c == EOF) { + printf("Macro definition missing null line terminator.\n"); + goto bad; + } + if (macnum == 0) { + macros[macnum].mac_start = macbuf; + } + else { + macros[macnum].mac_start = macros[macnum-1].mac_end + 1; + } + tmp = macros[macnum].mac_start; + while (tmp != macbuf + 4096) { + if ((c=getc(cfile)) == EOF) { + printf("Macro definition missing null line terminator.\n"); + goto bad; + } + *tmp = c; + if (*tmp == '\n') { + if (*(tmp-1) == '\0') { + macros[macnum++].mac_end = tmp - 1; + break; + } + *tmp = '\0'; + } + tmp++; + } + if (tmp == macbuf + 4096) { + printf("4K macro buffer exceeded\n"); + goto bad; + } + break; + default: + fprintf(stderr, "Unknown .netrc keyword %s\n", tokval); + break; + } + goto done; + } +done: + (void) fclose(cfile); + return(0); +bad: + (void) fclose(cfile); + return(-1); +} + +static int token(void) +{ + char *cp; + int c; + struct toktab *t; + + if (feof(cfile)) + return (0); + while ((c = getc(cfile)) != EOF && + (c == '\r' || c == '\n' || c == '\t' || c == ' ' || c == ',')) + continue; + if (c == EOF) + return (0); + cp = tokval; + if (c == '"') { + while ((c = getc(cfile)) != EOF && c != '"') { + if (c == '\\') + c = getc(cfile); + *cp++ = c; + } + } else { + *cp++ = c; + while ((c = getc(cfile)) != EOF + && c != '\n' && c != '\t' && c != ' ' && c != ',' && c != '\r') { + if (c == '\\') + c = getc(cfile); + *cp++ = c; + } + } + *cp = 0; + if (tokval[0] == 0) + return (0); + for (t = toktab; t->tokstr; t++) + if (!strcmp(t->tokstr, tokval)) + return (t->tval); + return (ID); +} From 9b0eaad850721c7b6a02621db4ee751170f5b59f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20van=20Geldorp?= Date: Tue, 8 Feb 2005 21:27:49 +0000 Subject: [PATCH 154/185] =?UTF-8?q?Herv=C3=A9=20Poussineau=20=20Initialize=20default=20partition=20size=20to=20maxi?= =?UTF-8?q?mum=20size.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit svn path=/trunk/; revision=13468 --- reactos/subsys/system/usetup/usetup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reactos/subsys/system/usetup/usetup.c b/reactos/subsys/system/usetup/usetup.c index b83c859a2bb..fc15bc73acf 100644 --- a/reactos/subsys/system/usetup/usetup.c +++ b/reactos/subsys/system/usetup/usetup.c @@ -1710,8 +1710,8 @@ ShowPartitionSizeInputBox(SHORT Left, strlen (Buffer), coPos); - Buffer[0] = 0; - Index = 0; + sprintf(Buffer, "%d", MaxSize); + Index = strlen(Buffer); DrawInputField (PARTITION_SIZE_INPUT_FIELD_LENGTH, iLeft, iTop, From 183a36f0fb2e24038c4b4ed4ab9cb3e08dd6187d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20van=20Geldorp?= Date: Tue, 8 Feb 2005 22:11:27 +0000 Subject: [PATCH 155/185] You can't execute a DLL svn path=/trunk/; revision=13469 --- reactos/lib/kernel32/process/create.c | 33 +++++++++++++++++++-------- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/reactos/lib/kernel32/process/create.c b/reactos/lib/kernel32/process/create.c index 4c0c0c48d5c..72f08276c0a 100644 --- a/reactos/lib/kernel32/process/create.c +++ b/reactos/lib/kernel32/process/create.c @@ -1011,6 +1011,29 @@ CreateProcessW lpProcessInformation); } ///////////////////////////////////////// + + /* + * Get some information about the executable + */ + Status = ZwQuerySection(hSection, + SectionImageInformation, + &Sii, + sizeof(Sii), + &i); + if (! NT_SUCCESS(Status)) + { + NtClose(hSection); + SetLastErrorByStatus(Status); + return FALSE; + } + + if (0 != (Sii.Characteristics & IMAGE_FILE_DLL)) + { + NtClose(hSection); + SetLastError(ERROR_BAD_EXE_FORMAT); + return FALSE; + } + /* * Initialize the process object attributes */ @@ -1133,16 +1156,6 @@ CreateProcessW DUPLICATE_SAME_ACCESS); /* FIXME - handle failure!!!!! */ } - - /* - * Get some information about the executable - */ - Status = ZwQuerySection(hSection, - SectionImageInformation, - &Sii, - sizeof(Sii), - &i); - /* FIXME - handle failure!!!!! */ /* * Close the section From d45db8b7326fc88017c7b7f3bc9b69e457a26143 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20van=20Geldorp?= Date: Tue, 8 Feb 2005 22:23:05 +0000 Subject: [PATCH 156/185] Prefer SEE_MASK_IDLIST, since that one is actually implemented in shell32... svn path=/trunk/; revision=13471 --- reactos/subsys/system/explorer/taskbar/startmenu.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/subsys/system/explorer/taskbar/startmenu.cpp b/reactos/subsys/system/explorer/taskbar/startmenu.cpp index d630b8b2203..a113bfb1651 100644 --- a/reactos/subsys/system/explorer/taskbar/startmenu.cpp +++ b/reactos/subsys/system/explorer/taskbar/startmenu.cpp @@ -1254,7 +1254,7 @@ void StartMenu::ActivateEntry(int id, const ShellEntrySet& entries) SHELLEXECUTEINFO shexinfo; shexinfo.cbSize = sizeof(SHELLEXECUTEINFO); - shexinfo.fMask = SEE_MASK_INVOKEIDLIST; // SEE_MASK_IDLIST is also possible. + shexinfo.fMask = SEE_MASK_IDLIST; // SEE_MASK_INVOKEIDLIST is also possible. shexinfo.hwnd = hparent; shexinfo.lpVerb = NULL; shexinfo.lpFile = NULL; From cf6b823a18e5138569b983bdb7c44889af192cdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20van=20Geldorp?= Date: Tue, 8 Feb 2005 22:52:16 +0000 Subject: [PATCH 157/185] - Add entry for .cpl files - Disable recycle bin for now svn path=/trunk/; revision=13473 --- reactos/bootdata/hivecls.inf | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/reactos/bootdata/hivecls.inf b/reactos/bootdata/hivecls.inf index 2367e082b37..abf3bf6fd07 100644 --- a/reactos/bootdata/hivecls.inf +++ b/reactos/bootdata/hivecls.inf @@ -32,6 +32,11 @@ HKCR,"InternetShortcut","IsShortcut",0x00000000,"yes" HKCR,"InternetShortcut\shell\open\command","",0x00000000,"rundll32.exe shdocvw.dll,OpenURL %l" HKCR,"InternetShortcut\DefaultIcon","",0x00020000,"%SystemRoot%\system32\url.dll,0" +; Control Panel extensions +HKCR,".cpl","",0x00000000,"cplfile" +HKCR,"cplfile\shell\cplopen","",0x00000000,"Open with Control Panel" +HKCR,"cplfile\shell\cplopen\command","",0x00020000,"%SystemRoot%\system32\rundll32.exe shell32.dll,Control_RunDLL %1,%*" + ; install notepad as handler for .txt files HKCR,".txt","",0x00000000,"txtfile" HKCR,".txt","Content Type",0x00000000,"text/plain" @@ -68,20 +73,21 @@ HKCR,"CLSID\{4657278A-411B-11d2-839A-00C04FD918D0}","",0x00000000,"Shell Drag an HKCR,"CLSID\{4657278A-411B-11d2-839A-00C04FD918D0}\InProcServer32","",0x00020000,"%SystemRoot%\system32\shell32.dll" HKCR,"CLSID\{4657278A-411B-11d2-839A-00C04FD918D0}\InProcServer32","ThreadingModel",0x00000000,"Apartment" -HKCR,"CLSID\{645FF040-5081-101B-9F08-00AA002F954E}","",0x00000000,"Recycle Bin" -HKCR,"CLSID\{645FF040-5081-101B-9F08-00AA002F954E}","LocalizedString",0x00020000,"@%SystemRoot%\system32\shell32.dll,-8964" -HKCR,"CLSID\{645FF040-5081-101B-9F08-00AA002F954E}","InfoTip",0x00020000,"@%SystemRoot%\system32\shell32.dll,-22915" -HKCR,"CLSID\{645FF040-5081-101B-9F08-00AA002F954E}","IntroText",0x00020000,"@%SystemRoot%\system32\shell32.dll,-31748" -HKCR,"CLSID\{645FF040-5081-101B-9F08-00AA002F954E}","SortOrderIndex",0x00010001,0x00000060 -HKCR,"CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\DefaultIcon","",0x00020000,"%SystemRoot%\System32\shell32.dll,31" -HKCR,"CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\DefaultIcon","Empty",0x00020000,"%SystemRoot%\System32\shell32.dll,31" -HKCR,"CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\DefaultIcon","Full",0x00020000,"%SystemRoot%\System32\shell32.dll,32" -HKCR,"CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\InProcServer32","",0x00020000,"%SystemRoot%\system32\shell32.dll" -HKCR,"CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\InProcServer32","ThreadingModel",0x00000000,"Apartment" -HKCR,"CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\ShellFolder","Attributes",0x00010001,0x20000140 -HKCR,"CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\ShellFolder","CallForAttributes",0x00010001,0x00000040 -HKCR,"CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\shellex\ContextMenuHandlers\{645FF040-5081-101B-9F08-00AA002F954E}","",0x00000000,"" -HKCR,"CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\shellex\PropertySheetHandlers\{645FF040-5081-101B-9F08-00AA002F954E}","",0x00000000,"" +; Recycle bin is not implemented (yet???) +;HKCR,"CLSID\{645FF040-5081-101B-9F08-00AA002F954E}","",0x00000000,"Recycle Bin" +;HKCR,"CLSID\{645FF040-5081-101B-9F08-00AA002F954E}","LocalizedString",0x00020000,"@%SystemRoot%\system32\shell32.dll,-8964" +;HKCR,"CLSID\{645FF040-5081-101B-9F08-00AA002F954E}","InfoTip",0x00020000,"@%SystemRoot%\system32\shell32.dll,-22915" +;HKCR,"CLSID\{645FF040-5081-101B-9F08-00AA002F954E}","IntroText",0x00020000,"@%SystemRoot%\system32\shell32.dll,-31748" +;HKCR,"CLSID\{645FF040-5081-101B-9F08-00AA002F954E}","SortOrderIndex",0x00010001,0x00000060 +;HKCR,"CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\DefaultIcon","",0x00020000,"%SystemRoot%\System32\shell32.dll,31" +;HKCR,"CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\DefaultIcon","Empty",0x00020000,"%SystemRoot%\System32\shell32.dll,31" +;HKCR,"CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\DefaultIcon","Full",0x00020000,"%SystemRoot%\System32\shell32.dll,32" +;HKCR,"CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\InProcServer32","",0x00020000,"%SystemRoot%\system32\shell32.dll" +;HKCR,"CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\InProcServer32","ThreadingModel",0x00000000,"Apartment" +;HKCR,"CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\ShellFolder","Attributes",0x00010001,0x20000140 +;HKCR,"CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\ShellFolder","CallForAttributes",0x00010001,0x00000040 +;HKCR,"CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\shellex\ContextMenuHandlers\{645FF040-5081-101B-9F08-00AA002F954E}","",0x00000000,"" +;HKCR,"CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\shellex\PropertySheetHandlers\{645FF040-5081-101B-9F08-00AA002F954E}","",0x00000000,"" HKCR,"CLSID\{00000320-0000-0000-C000-000000000046}","",0x00000000,"PSFactoryBuffer" HKCR,"CLSID\{00000320-0000-0000-C000-000000000046}\InProcServer32","",0x00000000,"ole32.dll" From 877b125678c5a98ad5a0726a2424571ef54e27d1 Mon Sep 17 00:00:00 2001 From: Art Yerkes Date: Wed, 9 Feb 2005 08:38:46 +0000 Subject: [PATCH 158/185] Made a nice function CantReadMore which tells if we can't possibly fill the buffer any longer, and don't have waiting data. Return an EOF in every case where a read could hit EOF from tcpip, Return a hard error thereafter. svn path=/trunk/; revision=13474 --- reactos/drivers/net/afd/afd/read.c | 32 ++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/reactos/drivers/net/afd/afd/read.c b/reactos/drivers/net/afd/afd/read.c index 8437c2761a5..125615a0794 100644 --- a/reactos/drivers/net/afd/afd/read.c +++ b/reactos/drivers/net/afd/afd/read.c @@ -28,6 +28,13 @@ static VOID ProcessClose( PAFD_FCB FCB ); +BOOLEAN CantReadMore( PAFD_FCB FCB ) { + UINT BytesAvailable = FCB->Recv.Content - FCB->Recv.BytesUsed; + + return !BytesAvailable && + (FCB->PollState & (AFD_EVENT_CLOSE | AFD_EVENT_DISCONNECT)); +} + NTSTATUS TryToSatisfyRecvRequestFromBuffer( PAFD_FCB FCB, PAFD_RECV_INFO RecvReq, PUINT TotalBytesCopied ) { @@ -41,7 +48,7 @@ NTSTATUS TryToSatisfyRecvRequestFromBuffer( PAFD_FCB FCB, AFD_DbgPrint(MID_TRACE,("Called, BytesAvailable = %d\n", BytesAvailable)); - if( FCB->PollState & AFD_EVENT_CLOSE ) return STATUS_SUCCESS; + if( CantReadMore(FCB) ) return STATUS_SUCCESS; if( !BytesAvailable ) return STATUS_PENDING; Map = (PAFD_MAPBUF)(RecvReq->BufferArray + RecvReq->BufferCount); @@ -213,6 +220,24 @@ NTSTATUS DDKAPI ReceiveComplete Status = STATUS_SUCCESS; } else { + /* Success here means that we got an EOF. Close all pending reads + * with EOF. Data won't have been available before. */ + while( !IsListEmpty( &FCB->PendingIrpList[FUNCTION_RECV] ) ) { + NextIrpEntry = + RemoveHeadList(&FCB->PendingIrpList[FUNCTION_RECV]); + NextIrp = + CONTAINING_RECORD(NextIrpEntry, IRP, Tail.Overlay.ListEntry); + NextIrpSp = IoGetCurrentIrpStackLocation( NextIrp ); + RecvReq = NextIrpSp->Parameters.DeviceIoControl.Type3InputBuffer; + + AFD_DbgPrint(MID_TRACE,("Completing recv %x (%d)\n", NextIrp, + TotalBytesCopied)); + UnlockBuffers( RecvReq->BufferArray, + RecvReq->BufferCount, FALSE ); + NextIrp->IoStatus.Status = Status; + NextIrp->IoStatus.Information = 0; + IoCompleteRequest( NextIrp, IO_NETWORK_INCREMENT ); + } ProcessClose( FCB ); } @@ -272,7 +297,7 @@ AfdConnectedSocketReadData(PDEVICE_OBJECT DeviceObject, PIRP Irp, /* Check if we're not closed down yet */ - if( !(FCB->PollState & AFD_EVENT_CLOSE ) ) { + if( !CantReadMore(FCB) ) { AFD_DbgPrint(MID_TRACE,("Not EOF yet\n")); if( FCB->ReceiveIrp.InFlightRequest ) { AFD_DbgPrint(MID_TRACE,("We're waiting on a previous irp\n")); @@ -288,6 +313,9 @@ AfdConnectedSocketReadData(PDEVICE_OBJECT DeviceObject, PIRP Irp, Status = STATUS_END_OF_FILE; ProcessClose( FCB ); + + return UnlockAndMaybeComplete + ( FCB, STATUS_SUCCESS, Irp, 0, NULL, FALSE); } if( NT_SUCCESS(Status) ) { From 44705e9fdbb6c85850eb90f25f6aa6ce1832697b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20van=20Geldorp?= Date: Wed, 9 Feb 2005 17:33:36 +0000 Subject: [PATCH 159/185] - Fix quoting of .cpl filename. - Use "cplopen" verb to execute .cpl files. svn path=/trunk/; revision=13475 --- reactos/lib/shell32/cpanelfolder.c | 2186 ++++++++++++++-------------- 1 file changed, 1095 insertions(+), 1091 deletions(-) diff --git a/reactos/lib/shell32/cpanelfolder.c b/reactos/lib/shell32/cpanelfolder.c index c207556209b..f20940390cb 100644 --- a/reactos/lib/shell32/cpanelfolder.c +++ b/reactos/lib/shell32/cpanelfolder.c @@ -1,1091 +1,1095 @@ -/* - * Control panel folder - * - * Copyright 2003 Martin Fuchs - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include "config.h" -#include "wine/port.h" - -#include -#include -#include -#include - -#define COBJMACROS -#define NONAMELESSUNION -#define NONAMELESSSTRUCT - -#include "winerror.h" -#include "windef.h" -#include "winbase.h" -#include "winreg.h" -#include "wingdi.h" -#include "winuser.h" - -#include "ole2.h" -#include "shlguid.h" - -#include "cpanel.h" -#include "enumidlist.h" -#include "pidl.h" -#include "undocshell.h" -#include "shell32_main.h" -#include "shresdef.h" -#include "shlwapi.h" -#include "wine/debug.h" -#include "debughlp.h" -#include "shfldr.h" - -WINE_DEFAULT_DEBUG_CHANNEL(shell); - -/*********************************************************************** -* control panel implementation in shell namespace -*/ - -typedef struct { - IShellFolder2Vtbl *lpVtbl; - DWORD ref; - IPersistFolder2Vtbl *lpVtblPersistFolder2; - IShellExecuteHookWVtbl *lpVtblShellExecuteHookW; - IShellExecuteHookAVtbl *lpVtblShellExecuteHookA; - - IUnknown *pUnkOuter; /* used for aggregation */ - - /* both paths are parsible from the desktop */ - LPITEMIDLIST pidlRoot; /* absolute pidl */ - int dwAttributes; /* attributes returned by GetAttributesOf FIXME: use it */ -} ICPanelImpl; - -static IShellFolder2Vtbl vt_ShellFolder2; -static IPersistFolder2Vtbl vt_PersistFolder2; -static IShellExecuteHookWVtbl vt_ShellExecuteHookW; -static IShellExecuteHookAVtbl vt_ShellExecuteHookA; - -#define _IPersistFolder2_Offset ((int)(&(((ICPanelImpl*)0)->lpVtblPersistFolder2))) -#define _ICOM_THIS_From_IPersistFolder2(class, name) class* This = (class*)(((char*)name)-_IPersistFolder2_Offset); - -#define IShellExecuteHookW_Offset ((int)(&(((ICPanelImpl*)0)->lpVtblShellExecuteHookW))) -#define _ICOM_THIS_From_IShellExecuteHookW(class, name) class* This = (class*)(((char*)name)-IShellExecuteHookW_Offset); - -#define IShellExecuteHookA_Offset ((int)(&(((ICPanelImpl*)0)->lpVtblShellExecuteHookA))) -#define _ICOM_THIS_From_IShellExecuteHookA(class, name) class* This = (class*)(((char*)name)-IShellExecuteHookA_Offset); - - -/* - converts This to a interface pointer -*/ -#define _IUnknown_(This) (IUnknown*)&(This->lpVtbl) -#define _IShellFolder_(This) (IShellFolder*)&(This->lpVtbl) -#define _IShellFolder2_(This) (IShellFolder2*)&(This->lpVtbl) - -#define _IPersist_(This) (IPersist*)&(This->lpVtblPersistFolder2) -#define _IPersistFolder_(This) (IPersistFolder*)&(This->lpVtblPersistFolder2) -#define _IPersistFolder2_(This) (IPersistFolder2*)&(This->lpVtblPersistFolder2) -#define _IShellExecuteHookW_(This) (IShellExecuteHookW*)&(This->lpVtblShellExecuteHookW) -#define _IShellExecuteHookA_(This) (IShellExecuteHookA*)&(This->lpVtblShellExecuteHookA) - -/*********************************************************************** -* IShellFolder [ControlPanel] implementation -*/ - -static shvheader ControlPanelSFHeader[] = { - {IDS_SHV_COLUMN8, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 15},/*FIXME*/ - {IDS_SHV_COLUMN9, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 200},/*FIXME*/ -}; - -#define CONROLPANELSHELLVIEWCOLUMNS 2 - -/************************************************************************** -* IControlPanel_Constructor -*/ -HRESULT WINAPI IControlPanel_Constructor(IUnknown* pUnkOuter, REFIID riid, LPVOID * ppv) -{ - ICPanelImpl *sf; - - TRACE("unkOut=%p %s\n", pUnkOuter, shdebugstr_guid(riid)); - - if (!ppv) - return E_POINTER; - if (pUnkOuter && !IsEqualIID (riid, &IID_IUnknown)) - return CLASS_E_NOAGGREGATION; - - sf = (ICPanelImpl *) LocalAlloc(GMEM_ZEROINIT, sizeof(ICPanelImpl)); - if (!sf) - return E_OUTOFMEMORY; - - sf->ref = 0; - sf->lpVtbl = &vt_ShellFolder2; - sf->lpVtblPersistFolder2 = &vt_PersistFolder2; - sf->lpVtblShellExecuteHookW = &vt_ShellExecuteHookW; - sf->lpVtblShellExecuteHookA = &vt_ShellExecuteHookA; - sf->pidlRoot = _ILCreateControlPanel(); /* my qualified pidl */ - sf->pUnkOuter = pUnkOuter ? pUnkOuter : _IUnknown_ (sf); - - if (!SUCCEEDED(IUnknown_QueryInterface(_IUnknown_(sf), riid, ppv))) { - IUnknown_Release(_IUnknown_(sf)); - return E_NOINTERFACE; - } - - TRACE("--(%p)\n", sf); - return S_OK; -} - -/************************************************************************** - * ISF_ControlPanel_fnQueryInterface - * - * NOTES supports not IPersist/IPersistFolder - */ -static HRESULT WINAPI ISF_ControlPanel_fnQueryInterface(IShellFolder2 * iface, REFIID riid, LPVOID * ppvObject) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - - TRACE("(%p)->(%s,%p)\n", This, shdebugstr_guid(riid), ppvObject); - - *ppvObject = NULL; - - if (IsEqualIID(riid, &IID_IUnknown) || - IsEqualIID(riid, &IID_IShellFolder) || IsEqualIID(riid, &IID_IShellFolder2)) - *ppvObject = This; - else if (IsEqualIID(riid, &IID_IPersist) || - IsEqualIID(riid, &IID_IPersistFolder) || IsEqualIID(riid, &IID_IPersistFolder2)) - *ppvObject = _IPersistFolder2_(This); - else if (IsEqualIID(riid, &IID_IShellExecuteHookW)) - *ppvObject = _IShellExecuteHookW_(This); - else if (IsEqualIID(riid, &IID_IShellExecuteHookA)) - *ppvObject = _IShellExecuteHookA_(This); - - if (*ppvObject) { - IUnknown_AddRef((IUnknown *)(*ppvObject)); - TRACE("-- Interface:(%p)->(%p)\n", ppvObject, *ppvObject); - return S_OK; - } - TRACE("-- Interface: E_NOINTERFACE\n"); - return E_NOINTERFACE; -} - -static ULONG WINAPI ISF_ControlPanel_fnAddRef(IShellFolder2 * iface) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - - TRACE("(%p)->(count=%lu)\n", This, This->ref); - - return ++(This->ref); -} - -static ULONG WINAPI ISF_ControlPanel_fnRelease(IShellFolder2 * iface) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - - TRACE("(%p)->(count=%lu)\n", This, This->ref); - - if (!--(This->ref)) { - TRACE("-- destroying IShellFolder(%p)\n", This); - if (This->pidlRoot) - SHFree(This->pidlRoot); - LocalFree((HLOCAL) This); - return 0; - } - return This->ref; -} - -/************************************************************************** -* ISF_ControlPanel_fnParseDisplayName -*/ -static HRESULT WINAPI -ISF_ControlPanel_fnParseDisplayName(IShellFolder2 * iface, - HWND hwndOwner, - LPBC pbc, - LPOLESTR lpszDisplayName, - DWORD * pchEaten, LPITEMIDLIST * ppidl, DWORD * pdwAttributes) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - - HRESULT hr = E_INVALIDARG; - - FIXME("(%p)->(HWND=%p,%p,%p=%s,%p,pidl=%p,%p)\n", - This, hwndOwner, pbc, lpszDisplayName, debugstr_w(lpszDisplayName), pchEaten, ppidl, pdwAttributes); - - *ppidl = 0; - if (pchEaten) - *pchEaten = 0; - - TRACE("(%p)->(-- ret=0x%08lx)\n", This, hr); - - return hr; -} - -static LPITEMIDLIST _ILCreateCPanelApplet(LPCSTR name, LPCSTR displayName, - LPCSTR comment, int iconIdx) -{ - PIDLCPanelStruct *p; - LPITEMIDLIST pidl; - PIDLDATA tmp; - int size0 = (char*)&tmp.u.cpanel.szName-(char*)&tmp.u.cpanel; - int size = size0; - int l; - - tmp.type = PT_CPLAPPLET; - tmp.u.cpanel.dummy = 0; - tmp.u.cpanel.iconIdx = iconIdx; - - l = strlen(name); - size += l+1; - - tmp.u.cpanel.offsDispName = l+1; - l = strlen(displayName); - size += l+1; - - tmp.u.cpanel.offsComment = tmp.u.cpanel.offsDispName+1+l; - l = strlen(comment); - size += l+1; - - pidl = SHAlloc(size+4); - if (!pidl) - return NULL; - - pidl->mkid.cb = size+2; - memcpy(pidl->mkid.abID, &tmp, 2+size0); - - p = &((PIDLDATA*)pidl->mkid.abID)->u.cpanel; - strcpy(p->szName, name); - strcpy(p->szName+tmp.u.cpanel.offsDispName, displayName); - strcpy(p->szName+tmp.u.cpanel.offsComment, comment); - - *(WORD*)((char*)pidl+(size+2)) = 0; - - pcheck(pidl); - - return pidl; -} - -/************************************************************************** - * _ILGetCPanelPointer() - * gets a pointer to the control panel struct stored in the pidl - */ -static PIDLCPanelStruct* _ILGetCPanelPointer(LPCITEMIDLIST pidl) -{ - LPPIDLDATA pdata = _ILGetDataPointer(pidl); - - if (pdata && pdata->type==PT_CPLAPPLET) - return (PIDLCPanelStruct*)&(pdata->u.cpanel); - - return NULL; -} - - /************************************************************************** - * ISF_ControlPanel_fnEnumObjects - */ -static BOOL SHELL_RegisterCPanelApp(IEnumIDList* list, LPCSTR path) -{ - LPITEMIDLIST pidl; - CPlApplet* applet; - CPanel panel; - CPLINFO info; - unsigned i; - int iconIdx; - - char displayName[MAX_PATH]; - char comment[MAX_PATH]; - - WCHAR wpath[MAX_PATH]; - - MultiByteToWideChar(CP_ACP, 0, path, -1, wpath, MAX_PATH); - - panel.first = NULL; - applet = Control_LoadApplet(0, wpath, &panel); - - if (applet) - { - for(i=0; icount; ++i) - { - WideCharToMultiByte(CP_ACP, 0, applet->info[i].szName, -1, displayName, MAX_PATH, 0, 0); - WideCharToMultiByte(CP_ACP, 0, applet->info[i].szInfo, -1, comment, MAX_PATH, 0, 0); - - applet->proc(0, CPL_INQUIRE, i, (LPARAM)&info); - - if (info.idIcon > 0) - iconIdx = -info.idIcon; /* negative icon index instead of icon number */ - else - iconIdx = 0; - - pidl = _ILCreateCPanelApplet(path, displayName, comment, iconIdx); - - if (pidl) - AddToEnumList(list, pidl); - } - Control_UnloadApplet(applet); - } - return TRUE; -} - -static int SHELL_RegisterRegistryCPanelApps(IEnumIDList* list, HKEY hkey_root, LPCSTR szRepPath) -{ - char name[MAX_PATH]; - char value[MAX_PATH]; - HKEY hkey; - - int cnt = 0; - - if (RegOpenKeyA(hkey_root, szRepPath, &hkey) == ERROR_SUCCESS) - { - int idx = 0; - - for(;; ++idx) - { - DWORD nameLen = MAX_PATH; - DWORD valueLen = MAX_PATH; - - if (RegEnumValueA(hkey, idx, name, &nameLen, NULL, NULL, (LPBYTE)&value, &valueLen) != ERROR_SUCCESS) - break; - - if (SHELL_RegisterCPanelApp(list, value)) - ++cnt; - } - RegCloseKey(hkey); - } - - return cnt; -} - -static int SHELL_RegisterCPanelFolders(IEnumIDList* list, HKEY hkey_root, LPCSTR szRepPath) -{ - char name[MAX_PATH]; - HKEY hkey; - - int cnt = 0; - - if (RegOpenKeyA(hkey_root, szRepPath, &hkey) == ERROR_SUCCESS) - { - int idx = 0; - for(;; ++idx) - { - if (RegEnumKeyA(hkey, idx, name, MAX_PATH) != ERROR_SUCCESS) - break; - - if (*name == '{') - { - LPITEMIDLIST pidl = _ILCreateGuidFromStrA(name); - - if (pidl && AddToEnumList(list, pidl)) - ++cnt; - } - } - - RegCloseKey(hkey); - } - - return cnt; -} - -/************************************************************************** - * CreateCPanelEnumList() - */ -static BOOL CreateCPanelEnumList( - IEnumIDList * iface, - DWORD dwFlags) -{ - CHAR szPath[MAX_PATH]; - WIN32_FIND_DATAA wfd; - HANDLE hFile; - - TRACE("(%p)->(flags=0x%08lx) \n",iface,dwFlags); - - /* enumerate control panel folders folders */ - if (dwFlags & SHCONTF_FOLDERS) - SHELL_RegisterCPanelFolders(iface, HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\ControlPanel\\NameSpace"); - - /* enumerate the control panel applets */ - if (dwFlags & SHCONTF_NONFOLDERS) - { - LPSTR p; - - GetSystemDirectoryA(szPath, MAX_PATH); - p = PathAddBackslashA(szPath); - strcpy(p, "*.cpl"); - - TRACE("-- (%p)-> enumerate SHCONTF_NONFOLDERS of %s\n",iface,debugstr_a(szPath)); - hFile = FindFirstFileA(szPath, &wfd); - - if (hFile != INVALID_HANDLE_VALUE) - { - do - { - if (!(dwFlags & SHCONTF_INCLUDEHIDDEN) && (wfd.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN)) - continue; - - if (!(wfd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) { - strcpy(p, wfd.cFileName); - SHELL_RegisterCPanelApp((IEnumIDList*)iface, szPath); - } - } while(FindNextFileA(hFile, &wfd)); - FindClose(hFile); - } - - SHELL_RegisterRegistryCPanelApps((IEnumIDList*)iface, HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Control Panel\\Cpls"); - SHELL_RegisterRegistryCPanelApps((IEnumIDList*)iface, HKEY_CURRENT_USER, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Control Panel\\Cpls"); - } - return TRUE; -} - -/************************************************************************** -* ISF_ControlPanel_fnEnumObjects -*/ -static HRESULT WINAPI -ISF_ControlPanel_fnEnumObjects(IShellFolder2 * iface, HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST * ppEnumIDList) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - - TRACE("(%p)->(HWND=%p flags=0x%08lx pplist=%p)\n", This, hwndOwner, dwFlags, ppEnumIDList); - - *ppEnumIDList = IEnumIDList_Constructor(); - if (*ppEnumIDList) - CreateCPanelEnumList(*ppEnumIDList, dwFlags); - - TRACE("--(%p)->(new ID List: %p)\n", This, *ppEnumIDList); - - return(*ppEnumIDList) ? S_OK : E_OUTOFMEMORY; -} - -/************************************************************************** -* ISF_ControlPanel_fnBindToObject -*/ -static HRESULT WINAPI -ISF_ControlPanel_fnBindToObject(IShellFolder2 * iface, LPCITEMIDLIST pidl, - LPBC pbcReserved, REFIID riid, LPVOID * ppvOut) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - - TRACE("(%p)->(pidl=%p,%p,%s,%p)\n", This, pidl, pbcReserved, shdebugstr_guid(riid), ppvOut); - - return SHELL32_BindToChild(This->pidlRoot, NULL, pidl, riid, ppvOut); -} - -/************************************************************************** -* ISF_ControlPanel_fnBindToStorage -*/ -static HRESULT WINAPI -ISF_ControlPanel_fnBindToStorage(IShellFolder2 * iface, - LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID * ppvOut) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - - FIXME("(%p)->(pidl=%p,%p,%s,%p) stub\n", This, pidl, pbcReserved, shdebugstr_guid(riid), ppvOut); - - *ppvOut = NULL; - return E_NOTIMPL; -} - -/************************************************************************** -* ISF_ControlPanel_fnCompareIDs -*/ - -static HRESULT WINAPI -ISF_ControlPanel_fnCompareIDs(IShellFolder2 * iface, LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - - int nReturn; - - TRACE("(%p)->(0x%08lx,pidl1=%p,pidl2=%p)\n", This, lParam, pidl1, pidl2); - nReturn = SHELL32_CompareIDs(_IShellFolder_(This), lParam, pidl1, pidl2); - TRACE("-- %i\n", nReturn); - return nReturn; -} - -/************************************************************************** -* ISF_ControlPanel_fnCreateViewObject -*/ -static HRESULT WINAPI -ISF_ControlPanel_fnCreateViewObject(IShellFolder2 * iface, HWND hwndOwner, REFIID riid, LPVOID * ppvOut) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - - LPSHELLVIEW pShellView; - HRESULT hr = E_INVALIDARG; - - TRACE("(%p)->(hwnd=%p,%s,%p)\n", This, hwndOwner, shdebugstr_guid(riid), ppvOut); - - if (ppvOut) { - *ppvOut = NULL; - - if (IsEqualIID(riid, &IID_IDropTarget)) { - WARN("IDropTarget not implemented\n"); - hr = E_NOTIMPL; - } else if (IsEqualIID(riid, &IID_IContextMenu)) { - WARN("IContextMenu not implemented\n"); - hr = E_NOTIMPL; - } else if (IsEqualIID(riid, &IID_IShellView)) { - pShellView = IShellView_Constructor((IShellFolder *) iface); - if (pShellView) { - hr = IShellView_QueryInterface(pShellView, riid, ppvOut); - IShellView_Release(pShellView); - } - } - } - TRACE("--(%p)->(interface=%p)\n", This, ppvOut); - return hr; -} - -/************************************************************************** -* ISF_ControlPanel_fnGetAttributesOf -*/ -static HRESULT WINAPI -ISF_ControlPanel_fnGetAttributesOf(IShellFolder2 * iface, UINT cidl, LPCITEMIDLIST * apidl, DWORD * rgfInOut) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - - HRESULT hr = S_OK; - - TRACE("(%p)->(cidl=%d apidl=%p mask=0x%08lx)\n", This, cidl, apidl, *rgfInOut); - - if ((!cidl) ||(!apidl) ||(!rgfInOut)) - return E_INVALIDARG; - - if (*rgfInOut == 0) - *rgfInOut = ~0; - - while(cidl > 0 && *apidl) { - pdump(*apidl); - SHELL32_GetItemAttributes(_IShellFolder_(This), *apidl, rgfInOut); - apidl++; - cidl--; - } - - TRACE("-- result=0x%08lx\n", *rgfInOut); - return hr; -} - -/************************************************************************** -* ISF_ControlPanel_fnGetUIObjectOf -* -* PARAMETERS -* HWND hwndOwner, //[in ] Parent window for any output -* UINT cidl, //[in ] array size -* LPCITEMIDLIST* apidl, //[in ] simple pidl array -* REFIID riid, //[in ] Requested Interface -* UINT* prgfInOut, //[ ] reserved -* LPVOID* ppvObject) //[out] Resulting Interface -* -*/ -static HRESULT WINAPI -ISF_ControlPanel_fnGetUIObjectOf(IShellFolder2 * iface, - HWND hwndOwner, - UINT cidl, LPCITEMIDLIST * apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - - LPITEMIDLIST pidl; - IUnknown *pObj = NULL; - HRESULT hr = E_INVALIDARG; - - TRACE("(%p)->(%p,%u,apidl=%p,%s,%p,%p)\n", - This, hwndOwner, cidl, apidl, shdebugstr_guid(riid), prgfInOut, ppvOut); - - if (ppvOut) { - *ppvOut = NULL; - - if (IsEqualIID(riid, &IID_IContextMenu) &&(cidl >= 1)) { - pObj = (LPUNKNOWN) ISvItemCm_Constructor((IShellFolder *) iface, This->pidlRoot, apidl, cidl); - hr = S_OK; - } else if (IsEqualIID(riid, &IID_IDataObject) &&(cidl >= 1)) { - pObj = (LPUNKNOWN) IDataObject_Constructor(hwndOwner, This->pidlRoot, apidl, cidl); - hr = S_OK; - } else if (IsEqualIID(riid, &IID_IExtractIconA) &&(cidl == 1)) { - pidl = ILCombine(This->pidlRoot, apidl[0]); - pObj = (LPUNKNOWN) IExtractIconA_Constructor(pidl); - SHFree(pidl); - hr = S_OK; - } else if (IsEqualIID(riid, &IID_IExtractIconW) &&(cidl == 1)) { - pidl = ILCombine(This->pidlRoot, apidl[0]); - pObj = (LPUNKNOWN) IExtractIconW_Constructor(pidl); - SHFree(pidl); - hr = S_OK; - } else if ((IsEqualIID(riid,&IID_IShellLinkW) || IsEqualIID(riid,&IID_IShellLinkA)) - && (cidl == 1)) { - pidl = ILCombine(This->pidlRoot, apidl[0]); - hr = IShellLink_ConstructFromFile(NULL, riid, pidl,(LPVOID*)&pObj); - SHFree(pidl); - } else { - hr = E_NOINTERFACE; - } - - if (SUCCEEDED(hr) && !pObj) - hr = E_OUTOFMEMORY; - - *ppvOut = pObj; - } - TRACE("(%p)->hr=0x%08lx\n", This, hr); - return hr; -} - -/************************************************************************** -* ISF_ControlPanel_fnGetDisplayNameOf -*/ -static HRESULT WINAPI ISF_ControlPanel_fnGetDisplayNameOf(IShellFolder2 * iface, LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET strRet) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - - CHAR szPath[MAX_PATH*2]; - PIDLCPanelStruct* pcpanel; - - *szPath = '\0'; - - TRACE("(%p)->(pidl=%p,0x%08lx,%p)\n", This, pidl, dwFlags, strRet); - pdump(pidl); - - if (!pidl || !strRet) - return E_INVALIDARG; - - pcpanel = _ILGetCPanelPointer(pidl); - - if (pcpanel) { - lstrcpyA(szPath, pcpanel->szName+pcpanel->offsDispName); - - if (!(dwFlags & SHGDN_FORPARSING)) - FIXME("retrieve display name from control panel app\n"); - } - /* take names of special folders only if its only this folder */ - else if (_ILIsSpecialFolder(pidl)) { - BOOL bSimplePidl = _ILIsPidlSimple(pidl); - - if (bSimplePidl) { - _ILSimpleGetText(pidl, szPath, MAX_PATH); /* append my own path */ - } else { - FIXME("special pidl\n"); - } - - if ((dwFlags & SHGDN_FORPARSING) && !bSimplePidl) { /* go deeper if needed */ - int len = 0; - - PathAddBackslashA(szPath); /*FIXME*/ - len = lstrlenA(szPath); - - if (!SUCCEEDED - (SHELL32_GetDisplayNameOfChild(iface, pidl, dwFlags | SHGDN_INFOLDER, szPath + len, MAX_PATH - len))) - return E_OUTOFMEMORY; - } - } - - strRet->uType = STRRET_CSTR; - lstrcpynA(strRet->u.cStr, szPath, MAX_PATH); - - TRACE("--(%p)->(%s)\n", This, szPath); - return S_OK; -} - -/************************************************************************** -* ISF_ControlPanel_fnSetNameOf -* Changes the name of a file object or subfolder, possibly changing its item -* identifier in the process. -* -* PARAMETERS -* HWND hwndOwner, //[in ] Owner window for output -* LPCITEMIDLIST pidl, //[in ] simple pidl of item to change -* LPCOLESTR lpszName, //[in ] the items new display name -* DWORD dwFlags, //[in ] SHGNO formatting flags -* LPITEMIDLIST* ppidlOut) //[out] simple pidl returned -*/ -static HRESULT WINAPI ISF_ControlPanel_fnSetNameOf(IShellFolder2 * iface, HWND hwndOwner, LPCITEMIDLIST pidl, /*simple pidl */ - LPCOLESTR lpName, DWORD dwFlags, LPITEMIDLIST * pPidlOut) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - FIXME("(%p)->(%p,pidl=%p,%s,%lu,%p)\n", This, hwndOwner, pidl, debugstr_w(lpName), dwFlags, pPidlOut); - return E_FAIL; -} - -static HRESULT WINAPI ISF_ControlPanel_fnGetDefaultSearchGUID(IShellFolder2 * iface, GUID * pguid) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - FIXME("(%p)\n", This); - return E_NOTIMPL; -} -static HRESULT WINAPI ISF_ControlPanel_fnEnumSearches(IShellFolder2 * iface, IEnumExtraSearch ** ppenum) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - FIXME("(%p)\n", This); - return E_NOTIMPL; -} -static HRESULT WINAPI ISF_ControlPanel_fnGetDefaultColumn(IShellFolder2 * iface, DWORD dwRes, ULONG * pSort, ULONG * pDisplay) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - - TRACE("(%p)\n", This); - - if (pSort) *pSort = 0; - if (pDisplay) *pDisplay = 0; - return S_OK; -} -static HRESULT WINAPI ISF_ControlPanel_fnGetDefaultColumnState(IShellFolder2 * iface, UINT iColumn, DWORD * pcsFlags) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - - TRACE("(%p)\n", This); - - if (!pcsFlags || iColumn >= CONROLPANELSHELLVIEWCOLUMNS) return E_INVALIDARG; - *pcsFlags = ControlPanelSFHeader[iColumn].pcsFlags; - return S_OK; -} -static HRESULT WINAPI ISF_ControlPanel_fnGetDetailsEx(IShellFolder2 * iface, LPCITEMIDLIST pidl, const SHCOLUMNID * pscid, VARIANT * pv) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - FIXME("(%p)\n", This); - return E_NOTIMPL; -} - -static HRESULT WINAPI ISF_ControlPanel_fnGetDetailsOf(IShellFolder2 * iface, LPCITEMIDLIST pidl, UINT iColumn, SHELLDETAILS * psd) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - HRESULT hr; - - TRACE("(%p)->(%p %i %p)\n", This, pidl, iColumn, psd); - - if (!psd || iColumn >= CONROLPANELSHELLVIEWCOLUMNS) - return E_INVALIDARG; - - if (!pidl) { - psd->fmt = ControlPanelSFHeader[iColumn].fmt; - psd->cxChar = ControlPanelSFHeader[iColumn].cxChar; - psd->str.uType = STRRET_CSTR; - LoadStringA(shell32_hInstance, ControlPanelSFHeader[iColumn].colnameid, psd->str.u.cStr, MAX_PATH); - return S_OK; - } else { - psd->str.u.cStr[0] = 0x00; - psd->str.uType = STRRET_CSTR; - switch(iColumn) { - case 0: /* name */ - hr = IShellFolder_GetDisplayNameOf(iface, pidl, SHGDN_NORMAL | SHGDN_INFOLDER, &psd->str); - break; - case 1: /* comment */ - _ILGetFileType(pidl, psd->str.u.cStr, MAX_PATH); - break; - } - hr = S_OK; - } - - return hr; -} -static HRESULT WINAPI ISF_ControlPanel_fnMapColumnToSCID(IShellFolder2 * iface, UINT column, SHCOLUMNID * pscid) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - FIXME("(%p)\n", This); - return E_NOTIMPL; -} - -static IShellFolder2Vtbl vt_ShellFolder2 = -{ - - ISF_ControlPanel_fnQueryInterface, - ISF_ControlPanel_fnAddRef, - ISF_ControlPanel_fnRelease, - ISF_ControlPanel_fnParseDisplayName, - ISF_ControlPanel_fnEnumObjects, - ISF_ControlPanel_fnBindToObject, - ISF_ControlPanel_fnBindToStorage, - ISF_ControlPanel_fnCompareIDs, - ISF_ControlPanel_fnCreateViewObject, - ISF_ControlPanel_fnGetAttributesOf, - ISF_ControlPanel_fnGetUIObjectOf, - ISF_ControlPanel_fnGetDisplayNameOf, - ISF_ControlPanel_fnSetNameOf, - - /* ShellFolder2 */ - ISF_ControlPanel_fnGetDefaultSearchGUID, - ISF_ControlPanel_fnEnumSearches, - ISF_ControlPanel_fnGetDefaultColumn, - ISF_ControlPanel_fnGetDefaultColumnState, - ISF_ControlPanel_fnGetDetailsEx, - ISF_ControlPanel_fnGetDetailsOf, - ISF_ControlPanel_fnMapColumnToSCID -}; - -/************************************************************************ - * ICPanel_PersistFolder2_QueryInterface - */ -static HRESULT WINAPI ICPanel_PersistFolder2_QueryInterface(IPersistFolder2 * iface, REFIID iid, LPVOID * ppvObject) -{ - _ICOM_THIS_From_IPersistFolder2(ICPanelImpl, iface); - - TRACE("(%p)\n", This); - - return IUnknown_QueryInterface(_IUnknown_(This), iid, ppvObject); -} - -/************************************************************************ - * ICPanel_PersistFolder2_AddRef - */ -static ULONG WINAPI ICPanel_PersistFolder2_AddRef(IPersistFolder2 * iface) -{ - _ICOM_THIS_From_IPersistFolder2(ICPanelImpl, iface); - - TRACE("(%p)->(count=%lu)\n", This, This->ref); - - return IUnknown_AddRef(_IUnknown_(This)); -} - -/************************************************************************ - * ISFPersistFolder_Release - */ -static ULONG WINAPI ICPanel_PersistFolder2_Release(IPersistFolder2 * iface) -{ - _ICOM_THIS_From_IPersistFolder2(ICPanelImpl, iface); - - TRACE("(%p)->(count=%lu)\n", This, This->ref); - - return IUnknown_Release(_IUnknown_(This)); -} - -/************************************************************************ - * ICPanel_PersistFolder2_GetClassID - */ -static HRESULT WINAPI ICPanel_PersistFolder2_GetClassID(IPersistFolder2 * iface, CLSID * lpClassId) -{ - _ICOM_THIS_From_IPersistFolder2(ICPanelImpl, iface); - - TRACE("(%p)\n", This); - - if (!lpClassId) - return E_POINTER; - *lpClassId = CLSID_ControlPanel; - - return S_OK; -} - -/************************************************************************ - * ICPanel_PersistFolder2_Initialize - * - * NOTES: it makes no sense to change the pidl - */ -static HRESULT WINAPI ICPanel_PersistFolder2_Initialize(IPersistFolder2 * iface, LPCITEMIDLIST pidl) -{ - _ICOM_THIS_From_IPersistFolder2(ICPanelImpl, iface); - TRACE("(%p)->(%p)\n", This, pidl); - return E_NOTIMPL; -} - -/************************************************************************** - * IPersistFolder2_fnGetCurFolder - */ -static HRESULT WINAPI ICPanel_PersistFolder2_GetCurFolder(IPersistFolder2 * iface, LPITEMIDLIST * pidl) -{ - _ICOM_THIS_From_IPersistFolder2(ICPanelImpl, iface); - - TRACE("(%p)->(%p)\n", This, pidl); - - if (!pidl) - return E_POINTER; - *pidl = ILClone(This->pidlRoot); - return S_OK; -} - -static IPersistFolder2Vtbl vt_PersistFolder2 = -{ - - ICPanel_PersistFolder2_QueryInterface, - ICPanel_PersistFolder2_AddRef, - ICPanel_PersistFolder2_Release, - ICPanel_PersistFolder2_GetClassID, - ICPanel_PersistFolder2_Initialize, - ICPanel_PersistFolder2_GetCurFolder -}; - -HRESULT WINAPI CPanel_GetIconLocationA(LPITEMIDLIST pidl, LPSTR szIconFile, UINT cchMax, int* piIndex) -{ - PIDLCPanelStruct* pcpanel = _ILGetCPanelPointer(pidl); - - if (!pcpanel) - return E_INVALIDARG; - - lstrcpyA(szIconFile, pcpanel->szName); - *piIndex = pcpanel->iconIdx!=-1? pcpanel->iconIdx: 0; - - return S_OK; -} - -HRESULT WINAPI CPanel_GetIconLocationW(LPITEMIDLIST pidl, LPWSTR szIconFile, UINT cchMax, int* piIndex) -{ - PIDLCPanelStruct* pcpanel = _ILGetCPanelPointer(pidl); - - if (!pcpanel) - return E_INVALIDARG; - - MultiByteToWideChar(CP_ACP, 0, pcpanel->szName, -1, szIconFile, cchMax); - *piIndex = pcpanel->iconIdx!=-1? pcpanel->iconIdx: 0; - - return S_OK; -} - - -/************************************************************************** -* IShellExecuteHookW Implementation -*/ - -static HRESULT WINAPI IShellExecuteHookW_fnQueryInterface(IShellExecuteHookW* iface, REFIID riid, void** ppvObject) -{ - _ICOM_THIS_From_IShellExecuteHookW(ICPanelImpl, iface); - - TRACE("(%p)->(count=%lu)\n", This, This->ref); - - return IUnknown_QueryInterface(This->pUnkOuter, riid, ppvObject); -} - -static ULONG STDMETHODCALLTYPE IShellExecuteHookW_fnAddRef(IShellExecuteHookW* iface) -{ - _ICOM_THIS_From_IShellExecuteHookW(ICPanelImpl, iface); - - TRACE("(%p)->(count=%lu)\n", This, This->ref); - - return IUnknown_AddRef(This->pUnkOuter); -} - -static ULONG STDMETHODCALLTYPE IShellExecuteHookW_fnRelease(IShellExecuteHookW* iface) -{ - _ICOM_THIS_From_IShellExecuteHookW(ICPanelImpl, iface); - - TRACE("(%p)\n", This); - - return IUnknown_Release(This->pUnkOuter); -} - -static HRESULT WINAPI IShellExecuteHookW_fnExecute(IShellExecuteHookW* iface, LPSHELLEXECUTEINFOW psei) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - - SHELLEXECUTEINFOW sei_tmp; - PIDLCPanelStruct* pcpanel; - WCHAR path[MAX_PATH]; - BOOL ret; - int l; - - TRACE("(%p)->execute(%p)\n", This, psei); - - if (!psei) - return E_INVALIDARG; - - pcpanel = _ILGetCPanelPointer(ILFindLastID(psei->lpIDList)); - - if (!pcpanel) - return E_INVALIDARG; - - path[0] = '\"'; - l = 1 + MultiByteToWideChar(CP_ACP, 0, pcpanel->szName, -1, path+1, MAX_PATH); - - /* pass applet name to Control_RunDLL to distinguish between applets in one .cpl file */ - path[++l] = '"'; - path[++l] = ' '; - - MultiByteToWideChar(CP_ACP, 0, pcpanel->szName+pcpanel->offsDispName, -1, path+l, MAX_PATH); - - memcpy(&sei_tmp, psei, sizeof(sei_tmp)); - sei_tmp.lpFile = path; - sei_tmp.fMask &= ~SEE_MASK_INVOKEIDLIST; - - ret = ShellExecuteExW(&sei_tmp); - if (ret) - return S_OK; - else - return S_FALSE; -} - -static IShellExecuteHookWVtbl vt_ShellExecuteHookW = -{ - - IShellExecuteHookW_fnQueryInterface, - IShellExecuteHookW_fnAddRef, - IShellExecuteHookW_fnRelease, - - IShellExecuteHookW_fnExecute -}; - - -/************************************************************************** -* IShellExecuteHookA Implementation -*/ - -static HRESULT WINAPI IShellExecuteHookA_fnQueryInterface(IShellExecuteHookA* iface, REFIID riid, void** ppvObject) -{ - _ICOM_THIS_From_IShellExecuteHookA(ICPanelImpl, iface); - - TRACE("(%p)->(count=%lu)\n", This, This->ref); - - return IUnknown_QueryInterface(This->pUnkOuter, riid, ppvObject); -} - -static ULONG STDMETHODCALLTYPE IShellExecuteHookA_fnAddRef(IShellExecuteHookA* iface) -{ - _ICOM_THIS_From_IShellExecuteHookA(ICPanelImpl, iface); - - TRACE("(%p)->(count=%lu)\n", This, This->ref); - - return IUnknown_AddRef(This->pUnkOuter); -} - -static ULONG STDMETHODCALLTYPE IShellExecuteHookA_fnRelease(IShellExecuteHookA* iface) -{ - _ICOM_THIS_From_IShellExecuteHookA(ICPanelImpl, iface); - - TRACE("(%p)\n", This); - - return IUnknown_Release(This->pUnkOuter); -} - -static HRESULT WINAPI IShellExecuteHookA_fnExecute(IShellExecuteHookA* iface, LPSHELLEXECUTEINFOA psei) -{ - ICPanelImpl *This = (ICPanelImpl *)iface; - - SHELLEXECUTEINFOA sei_tmp; - PIDLCPanelStruct* pcpanel; - char path[MAX_PATH]; - BOOL ret; - - TRACE("(%p)->execute(%p)\n", This, psei); - - if (!psei) - return E_INVALIDARG; - - pcpanel = _ILGetCPanelPointer(ILFindLastID(psei->lpIDList)); - - if (!pcpanel) - return E_INVALIDARG; - - path[0] = '\"'; - lstrcpyA(path+1, pcpanel->szName); - - /* pass applet name to Control_RunDLL to distinguish between applets in one .cpl file */ - lstrcatA(path, "\" "); - lstrcatA(path, pcpanel->szName+pcpanel->offsDispName); - - memcpy(&sei_tmp, psei, sizeof(sei_tmp)); - sei_tmp.lpFile = path; - sei_tmp.fMask &= ~SEE_MASK_INVOKEIDLIST; - - ret = ShellExecuteExA(&sei_tmp); - if (ret) - return S_OK; - else - return S_FALSE; -} - -static IShellExecuteHookAVtbl vt_ShellExecuteHookA = -{ - - IShellExecuteHookA_fnQueryInterface, - IShellExecuteHookA_fnAddRef, - IShellExecuteHookA_fnRelease, - - IShellExecuteHookA_fnExecute -}; +/* + * Control panel folder + * + * Copyright 2003 Martin Fuchs + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" +#include "wine/port.h" + +#include +#include +#include +#include + +#define COBJMACROS +#define NONAMELESSUNION +#define NONAMELESSSTRUCT + +#include "winerror.h" +#include "windef.h" +#include "winbase.h" +#include "winreg.h" +#include "wingdi.h" +#include "winuser.h" + +#include "ole2.h" +#include "shlguid.h" + +#include "cpanel.h" +#include "enumidlist.h" +#include "pidl.h" +#include "undocshell.h" +#include "shell32_main.h" +#include "shresdef.h" +#include "shlwapi.h" +#include "wine/debug.h" +#include "debughlp.h" +#include "shfldr.h" + +WINE_DEFAULT_DEBUG_CHANNEL(shell); + +/*********************************************************************** +* control panel implementation in shell namespace +*/ + +typedef struct { + IShellFolder2Vtbl *lpVtbl; + DWORD ref; + IPersistFolder2Vtbl *lpVtblPersistFolder2; + IShellExecuteHookWVtbl *lpVtblShellExecuteHookW; + IShellExecuteHookAVtbl *lpVtblShellExecuteHookA; + + IUnknown *pUnkOuter; /* used for aggregation */ + + /* both paths are parsible from the desktop */ + LPITEMIDLIST pidlRoot; /* absolute pidl */ + int dwAttributes; /* attributes returned by GetAttributesOf FIXME: use it */ +} ICPanelImpl; + +static IShellFolder2Vtbl vt_ShellFolder2; +static IPersistFolder2Vtbl vt_PersistFolder2; +static IShellExecuteHookWVtbl vt_ShellExecuteHookW; +static IShellExecuteHookAVtbl vt_ShellExecuteHookA; + +#define _IPersistFolder2_Offset ((int)(&(((ICPanelImpl*)0)->lpVtblPersistFolder2))) +#define _ICOM_THIS_From_IPersistFolder2(class, name) class* This = (class*)(((char*)name)-_IPersistFolder2_Offset); + +#define IShellExecuteHookW_Offset ((int)(&(((ICPanelImpl*)0)->lpVtblShellExecuteHookW))) +#define _ICOM_THIS_From_IShellExecuteHookW(class, name) class* This = (class*)(((char*)name)-IShellExecuteHookW_Offset); + +#define IShellExecuteHookA_Offset ((int)(&(((ICPanelImpl*)0)->lpVtblShellExecuteHookA))) +#define _ICOM_THIS_From_IShellExecuteHookA(class, name) class* This = (class*)(((char*)name)-IShellExecuteHookA_Offset); + + +/* + converts This to a interface pointer +*/ +#define _IUnknown_(This) (IUnknown*)&(This->lpVtbl) +#define _IShellFolder_(This) (IShellFolder*)&(This->lpVtbl) +#define _IShellFolder2_(This) (IShellFolder2*)&(This->lpVtbl) + +#define _IPersist_(This) (IPersist*)&(This->lpVtblPersistFolder2) +#define _IPersistFolder_(This) (IPersistFolder*)&(This->lpVtblPersistFolder2) +#define _IPersistFolder2_(This) (IPersistFolder2*)&(This->lpVtblPersistFolder2) +#define _IShellExecuteHookW_(This) (IShellExecuteHookW*)&(This->lpVtblShellExecuteHookW) +#define _IShellExecuteHookA_(This) (IShellExecuteHookA*)&(This->lpVtblShellExecuteHookA) + +/*********************************************************************** +* IShellFolder [ControlPanel] implementation +*/ + +static shvheader ControlPanelSFHeader[] = { + {IDS_SHV_COLUMN8, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 15},/*FIXME*/ + {IDS_SHV_COLUMN9, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 200},/*FIXME*/ +}; + +#define CONROLPANELSHELLVIEWCOLUMNS 2 + +/************************************************************************** +* IControlPanel_Constructor +*/ +HRESULT WINAPI IControlPanel_Constructor(IUnknown* pUnkOuter, REFIID riid, LPVOID * ppv) +{ + ICPanelImpl *sf; + + TRACE("unkOut=%p %s\n", pUnkOuter, shdebugstr_guid(riid)); + + if (!ppv) + return E_POINTER; + if (pUnkOuter && !IsEqualIID (riid, &IID_IUnknown)) + return CLASS_E_NOAGGREGATION; + + sf = (ICPanelImpl *) LocalAlloc(GMEM_ZEROINIT, sizeof(ICPanelImpl)); + if (!sf) + return E_OUTOFMEMORY; + + sf->ref = 0; + sf->lpVtbl = &vt_ShellFolder2; + sf->lpVtblPersistFolder2 = &vt_PersistFolder2; + sf->lpVtblShellExecuteHookW = &vt_ShellExecuteHookW; + sf->lpVtblShellExecuteHookA = &vt_ShellExecuteHookA; + sf->pidlRoot = _ILCreateControlPanel(); /* my qualified pidl */ + sf->pUnkOuter = pUnkOuter ? pUnkOuter : _IUnknown_ (sf); + + if (!SUCCEEDED(IUnknown_QueryInterface(_IUnknown_(sf), riid, ppv))) { + IUnknown_Release(_IUnknown_(sf)); + return E_NOINTERFACE; + } + + TRACE("--(%p)\n", sf); + return S_OK; +} + +/************************************************************************** + * ISF_ControlPanel_fnQueryInterface + * + * NOTES supports not IPersist/IPersistFolder + */ +static HRESULT WINAPI ISF_ControlPanel_fnQueryInterface(IShellFolder2 * iface, REFIID riid, LPVOID * ppvObject) +{ + ICPanelImpl *This = (ICPanelImpl *)iface; + + TRACE("(%p)->(%s,%p)\n", This, shdebugstr_guid(riid), ppvObject); + + *ppvObject = NULL; + + if (IsEqualIID(riid, &IID_IUnknown) || + IsEqualIID(riid, &IID_IShellFolder) || IsEqualIID(riid, &IID_IShellFolder2)) + *ppvObject = This; + else if (IsEqualIID(riid, &IID_IPersist) || + IsEqualIID(riid, &IID_IPersistFolder) || IsEqualIID(riid, &IID_IPersistFolder2)) + *ppvObject = _IPersistFolder2_(This); + else if (IsEqualIID(riid, &IID_IShellExecuteHookW)) + *ppvObject = _IShellExecuteHookW_(This); + else if (IsEqualIID(riid, &IID_IShellExecuteHookA)) + *ppvObject = _IShellExecuteHookA_(This); + + if (*ppvObject) { + IUnknown_AddRef((IUnknown *)(*ppvObject)); + TRACE("-- Interface:(%p)->(%p)\n", ppvObject, *ppvObject); + return S_OK; + } + TRACE("-- Interface: E_NOINTERFACE\n"); + return E_NOINTERFACE; +} + +static ULONG WINAPI ISF_ControlPanel_fnAddRef(IShellFolder2 * iface) +{ + ICPanelImpl *This = (ICPanelImpl *)iface; + + TRACE("(%p)->(count=%lu)\n", This, This->ref); + + return ++(This->ref); +} + +static ULONG WINAPI ISF_ControlPanel_fnRelease(IShellFolder2 * iface) +{ + ICPanelImpl *This = (ICPanelImpl *)iface; + + TRACE("(%p)->(count=%lu)\n", This, This->ref); + + if (!--(This->ref)) { + TRACE("-- destroying IShellFolder(%p)\n", This); + if (This->pidlRoot) + SHFree(This->pidlRoot); + LocalFree((HLOCAL) This); + return 0; + } + return This->ref; +} + +/************************************************************************** +* ISF_ControlPanel_fnParseDisplayName +*/ +static HRESULT WINAPI +ISF_ControlPanel_fnParseDisplayName(IShellFolder2 * iface, + HWND hwndOwner, + LPBC pbc, + LPOLESTR lpszDisplayName, + DWORD * pchEaten, LPITEMIDLIST * ppidl, DWORD * pdwAttributes) +{ + ICPanelImpl *This = (ICPanelImpl *)iface; + + HRESULT hr = E_INVALIDARG; + + FIXME("(%p)->(HWND=%p,%p,%p=%s,%p,pidl=%p,%p)\n", + This, hwndOwner, pbc, lpszDisplayName, debugstr_w(lpszDisplayName), pchEaten, ppidl, pdwAttributes); + + *ppidl = 0; + if (pchEaten) + *pchEaten = 0; + + TRACE("(%p)->(-- ret=0x%08lx)\n", This, hr); + + return hr; +} + +static LPITEMIDLIST _ILCreateCPanelApplet(LPCSTR name, LPCSTR displayName, + LPCSTR comment, int iconIdx) +{ + PIDLCPanelStruct *p; + LPITEMIDLIST pidl; + PIDLDATA tmp; + int size0 = (char*)&tmp.u.cpanel.szName-(char*)&tmp.u.cpanel; + int size = size0; + int l; + + tmp.type = PT_CPLAPPLET; + tmp.u.cpanel.dummy = 0; + tmp.u.cpanel.iconIdx = iconIdx; + + l = strlen(name); + size += l+1; + + tmp.u.cpanel.offsDispName = l+1; + l = strlen(displayName); + size += l+1; + + tmp.u.cpanel.offsComment = tmp.u.cpanel.offsDispName+1+l; + l = strlen(comment); + size += l+1; + + pidl = SHAlloc(size+4); + if (!pidl) + return NULL; + + pidl->mkid.cb = size+2; + memcpy(pidl->mkid.abID, &tmp, 2+size0); + + p = &((PIDLDATA*)pidl->mkid.abID)->u.cpanel; + strcpy(p->szName, name); + strcpy(p->szName+tmp.u.cpanel.offsDispName, displayName); + strcpy(p->szName+tmp.u.cpanel.offsComment, comment); + + *(WORD*)((char*)pidl+(size+2)) = 0; + + pcheck(pidl); + + return pidl; +} + +/************************************************************************** + * _ILGetCPanelPointer() + * gets a pointer to the control panel struct stored in the pidl + */ +static PIDLCPanelStruct* _ILGetCPanelPointer(LPCITEMIDLIST pidl) +{ + LPPIDLDATA pdata = _ILGetDataPointer(pidl); + + if (pdata && pdata->type==PT_CPLAPPLET) + return (PIDLCPanelStruct*)&(pdata->u.cpanel); + + return NULL; +} + + /************************************************************************** + * ISF_ControlPanel_fnEnumObjects + */ +static BOOL SHELL_RegisterCPanelApp(IEnumIDList* list, LPCSTR path) +{ + LPITEMIDLIST pidl; + CPlApplet* applet; + CPanel panel; + CPLINFO info; + unsigned i; + int iconIdx; + + char displayName[MAX_PATH]; + char comment[MAX_PATH]; + + WCHAR wpath[MAX_PATH]; + + MultiByteToWideChar(CP_ACP, 0, path, -1, wpath, MAX_PATH); + + panel.first = NULL; + applet = Control_LoadApplet(0, wpath, &panel); + + if (applet) + { + for(i=0; icount; ++i) + { + WideCharToMultiByte(CP_ACP, 0, applet->info[i].szName, -1, displayName, MAX_PATH, 0, 0); + WideCharToMultiByte(CP_ACP, 0, applet->info[i].szInfo, -1, comment, MAX_PATH, 0, 0); + + applet->proc(0, CPL_INQUIRE, i, (LPARAM)&info); + + if (info.idIcon > 0) + iconIdx = -info.idIcon; /* negative icon index instead of icon number */ + else + iconIdx = 0; + + pidl = _ILCreateCPanelApplet(path, displayName, comment, iconIdx); + + if (pidl) + AddToEnumList(list, pidl); + } + Control_UnloadApplet(applet); + } + return TRUE; +} + +static int SHELL_RegisterRegistryCPanelApps(IEnumIDList* list, HKEY hkey_root, LPCSTR szRepPath) +{ + char name[MAX_PATH]; + char value[MAX_PATH]; + HKEY hkey; + + int cnt = 0; + + if (RegOpenKeyA(hkey_root, szRepPath, &hkey) == ERROR_SUCCESS) + { + int idx = 0; + + for(;; ++idx) + { + DWORD nameLen = MAX_PATH; + DWORD valueLen = MAX_PATH; + + if (RegEnumValueA(hkey, idx, name, &nameLen, NULL, NULL, (LPBYTE)&value, &valueLen) != ERROR_SUCCESS) + break; + + if (SHELL_RegisterCPanelApp(list, value)) + ++cnt; + } + RegCloseKey(hkey); + } + + return cnt; +} + +static int SHELL_RegisterCPanelFolders(IEnumIDList* list, HKEY hkey_root, LPCSTR szRepPath) +{ + char name[MAX_PATH]; + HKEY hkey; + + int cnt = 0; + + if (RegOpenKeyA(hkey_root, szRepPath, &hkey) == ERROR_SUCCESS) + { + int idx = 0; + for(;; ++idx) + { + if (RegEnumKeyA(hkey, idx, name, MAX_PATH) != ERROR_SUCCESS) + break; + + if (*name == '{') + { + LPITEMIDLIST pidl = _ILCreateGuidFromStrA(name); + + if (pidl && AddToEnumList(list, pidl)) + ++cnt; + } + } + + RegCloseKey(hkey); + } + + return cnt; +} + +/************************************************************************** + * CreateCPanelEnumList() + */ +static BOOL CreateCPanelEnumList( + IEnumIDList * iface, + DWORD dwFlags) +{ + CHAR szPath[MAX_PATH]; + WIN32_FIND_DATAA wfd; + HANDLE hFile; + + TRACE("(%p)->(flags=0x%08lx) \n",iface,dwFlags); + + /* enumerate control panel folders folders */ + if (dwFlags & SHCONTF_FOLDERS) + SHELL_RegisterCPanelFolders(iface, HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\ControlPanel\\NameSpace"); + + /* enumerate the control panel applets */ + if (dwFlags & SHCONTF_NONFOLDERS) + { + LPSTR p; + + GetSystemDirectoryA(szPath, MAX_PATH); + p = PathAddBackslashA(szPath); + strcpy(p, "*.cpl"); + + TRACE("-- (%p)-> enumerate SHCONTF_NONFOLDERS of %s\n",iface,debugstr_a(szPath)); + hFile = FindFirstFileA(szPath, &wfd); + + if (hFile != INVALID_HANDLE_VALUE) + { + do + { + if (!(dwFlags & SHCONTF_INCLUDEHIDDEN) && (wfd.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN)) + continue; + + if (!(wfd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) { + strcpy(p, wfd.cFileName); + SHELL_RegisterCPanelApp((IEnumIDList*)iface, szPath); + } + } while(FindNextFileA(hFile, &wfd)); + FindClose(hFile); + } + + SHELL_RegisterRegistryCPanelApps((IEnumIDList*)iface, HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Control Panel\\Cpls"); + SHELL_RegisterRegistryCPanelApps((IEnumIDList*)iface, HKEY_CURRENT_USER, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Control Panel\\Cpls"); + } + return TRUE; +} + +/************************************************************************** +* ISF_ControlPanel_fnEnumObjects +*/ +static HRESULT WINAPI +ISF_ControlPanel_fnEnumObjects(IShellFolder2 * iface, HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST * ppEnumIDList) +{ + ICPanelImpl *This = (ICPanelImpl *)iface; + + TRACE("(%p)->(HWND=%p flags=0x%08lx pplist=%p)\n", This, hwndOwner, dwFlags, ppEnumIDList); + + *ppEnumIDList = IEnumIDList_Constructor(); + if (*ppEnumIDList) + CreateCPanelEnumList(*ppEnumIDList, dwFlags); + + TRACE("--(%p)->(new ID List: %p)\n", This, *ppEnumIDList); + + return(*ppEnumIDList) ? S_OK : E_OUTOFMEMORY; +} + +/************************************************************************** +* ISF_ControlPanel_fnBindToObject +*/ +static HRESULT WINAPI +ISF_ControlPanel_fnBindToObject(IShellFolder2 * iface, LPCITEMIDLIST pidl, + LPBC pbcReserved, REFIID riid, LPVOID * ppvOut) +{ + ICPanelImpl *This = (ICPanelImpl *)iface; + + TRACE("(%p)->(pidl=%p,%p,%s,%p)\n", This, pidl, pbcReserved, shdebugstr_guid(riid), ppvOut); + + return SHELL32_BindToChild(This->pidlRoot, NULL, pidl, riid, ppvOut); +} + +/************************************************************************** +* ISF_ControlPanel_fnBindToStorage +*/ +static HRESULT WINAPI +ISF_ControlPanel_fnBindToStorage(IShellFolder2 * iface, + LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID * ppvOut) +{ + ICPanelImpl *This = (ICPanelImpl *)iface; + + FIXME("(%p)->(pidl=%p,%p,%s,%p) stub\n", This, pidl, pbcReserved, shdebugstr_guid(riid), ppvOut); + + *ppvOut = NULL; + return E_NOTIMPL; +} + +/************************************************************************** +* ISF_ControlPanel_fnCompareIDs +*/ + +static HRESULT WINAPI +ISF_ControlPanel_fnCompareIDs(IShellFolder2 * iface, LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) +{ + ICPanelImpl *This = (ICPanelImpl *)iface; + + int nReturn; + + TRACE("(%p)->(0x%08lx,pidl1=%p,pidl2=%p)\n", This, lParam, pidl1, pidl2); + nReturn = SHELL32_CompareIDs(_IShellFolder_(This), lParam, pidl1, pidl2); + TRACE("-- %i\n", nReturn); + return nReturn; +} + +/************************************************************************** +* ISF_ControlPanel_fnCreateViewObject +*/ +static HRESULT WINAPI +ISF_ControlPanel_fnCreateViewObject(IShellFolder2 * iface, HWND hwndOwner, REFIID riid, LPVOID * ppvOut) +{ + ICPanelImpl *This = (ICPanelImpl *)iface; + + LPSHELLVIEW pShellView; + HRESULT hr = E_INVALIDARG; + + TRACE("(%p)->(hwnd=%p,%s,%p)\n", This, hwndOwner, shdebugstr_guid(riid), ppvOut); + + if (ppvOut) { + *ppvOut = NULL; + + if (IsEqualIID(riid, &IID_IDropTarget)) { + WARN("IDropTarget not implemented\n"); + hr = E_NOTIMPL; + } else if (IsEqualIID(riid, &IID_IContextMenu)) { + WARN("IContextMenu not implemented\n"); + hr = E_NOTIMPL; + } else if (IsEqualIID(riid, &IID_IShellView)) { + pShellView = IShellView_Constructor((IShellFolder *) iface); + if (pShellView) { + hr = IShellView_QueryInterface(pShellView, riid, ppvOut); + IShellView_Release(pShellView); + } + } + } + TRACE("--(%p)->(interface=%p)\n", This, ppvOut); + return hr; +} + +/************************************************************************** +* ISF_ControlPanel_fnGetAttributesOf +*/ +static HRESULT WINAPI +ISF_ControlPanel_fnGetAttributesOf(IShellFolder2 * iface, UINT cidl, LPCITEMIDLIST * apidl, DWORD * rgfInOut) +{ + ICPanelImpl *This = (ICPanelImpl *)iface; + + HRESULT hr = S_OK; + + TRACE("(%p)->(cidl=%d apidl=%p mask=0x%08lx)\n", This, cidl, apidl, *rgfInOut); + + if ((!cidl) ||(!apidl) ||(!rgfInOut)) + return E_INVALIDARG; + + if (*rgfInOut == 0) + *rgfInOut = ~0; + + while(cidl > 0 && *apidl) { + pdump(*apidl); + SHELL32_GetItemAttributes(_IShellFolder_(This), *apidl, rgfInOut); + apidl++; + cidl--; + } + + TRACE("-- result=0x%08lx\n", *rgfInOut); + return hr; +} + +/************************************************************************** +* ISF_ControlPanel_fnGetUIObjectOf +* +* PARAMETERS +* HWND hwndOwner, //[in ] Parent window for any output +* UINT cidl, //[in ] array size +* LPCITEMIDLIST* apidl, //[in ] simple pidl array +* REFIID riid, //[in ] Requested Interface +* UINT* prgfInOut, //[ ] reserved +* LPVOID* ppvObject) //[out] Resulting Interface +* +*/ +static HRESULT WINAPI +ISF_ControlPanel_fnGetUIObjectOf(IShellFolder2 * iface, + HWND hwndOwner, + UINT cidl, LPCITEMIDLIST * apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut) +{ + ICPanelImpl *This = (ICPanelImpl *)iface; + + LPITEMIDLIST pidl; + IUnknown *pObj = NULL; + HRESULT hr = E_INVALIDARG; + + TRACE("(%p)->(%p,%u,apidl=%p,%s,%p,%p)\n", + This, hwndOwner, cidl, apidl, shdebugstr_guid(riid), prgfInOut, ppvOut); + + if (ppvOut) { + *ppvOut = NULL; + + if (IsEqualIID(riid, &IID_IContextMenu) &&(cidl >= 1)) { + pObj = (LPUNKNOWN) ISvItemCm_Constructor((IShellFolder *) iface, This->pidlRoot, apidl, cidl); + hr = S_OK; + } else if (IsEqualIID(riid, &IID_IDataObject) &&(cidl >= 1)) { + pObj = (LPUNKNOWN) IDataObject_Constructor(hwndOwner, This->pidlRoot, apidl, cidl); + hr = S_OK; + } else if (IsEqualIID(riid, &IID_IExtractIconA) &&(cidl == 1)) { + pidl = ILCombine(This->pidlRoot, apidl[0]); + pObj = (LPUNKNOWN) IExtractIconA_Constructor(pidl); + SHFree(pidl); + hr = S_OK; + } else if (IsEqualIID(riid, &IID_IExtractIconW) &&(cidl == 1)) { + pidl = ILCombine(This->pidlRoot, apidl[0]); + pObj = (LPUNKNOWN) IExtractIconW_Constructor(pidl); + SHFree(pidl); + hr = S_OK; + } else if ((IsEqualIID(riid,&IID_IShellLinkW) || IsEqualIID(riid,&IID_IShellLinkA)) + && (cidl == 1)) { + pidl = ILCombine(This->pidlRoot, apidl[0]); + hr = IShellLink_ConstructFromFile(NULL, riid, pidl,(LPVOID*)&pObj); + SHFree(pidl); + } else { + hr = E_NOINTERFACE; + } + + if (SUCCEEDED(hr) && !pObj) + hr = E_OUTOFMEMORY; + + *ppvOut = pObj; + } + TRACE("(%p)->hr=0x%08lx\n", This, hr); + return hr; +} + +/************************************************************************** +* ISF_ControlPanel_fnGetDisplayNameOf +*/ +static HRESULT WINAPI ISF_ControlPanel_fnGetDisplayNameOf(IShellFolder2 * iface, LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET strRet) +{ + ICPanelImpl *This = (ICPanelImpl *)iface; + + CHAR szPath[MAX_PATH*2]; + PIDLCPanelStruct* pcpanel; + + *szPath = '\0'; + + TRACE("(%p)->(pidl=%p,0x%08lx,%p)\n", This, pidl, dwFlags, strRet); + pdump(pidl); + + if (!pidl || !strRet) + return E_INVALIDARG; + + pcpanel = _ILGetCPanelPointer(pidl); + + if (pcpanel) { + lstrcpyA(szPath, pcpanel->szName+pcpanel->offsDispName); + + if (!(dwFlags & SHGDN_FORPARSING)) + FIXME("retrieve display name from control panel app\n"); + } + /* take names of special folders only if its only this folder */ + else if (_ILIsSpecialFolder(pidl)) { + BOOL bSimplePidl = _ILIsPidlSimple(pidl); + + if (bSimplePidl) { + _ILSimpleGetText(pidl, szPath, MAX_PATH); /* append my own path */ + } else { + FIXME("special pidl\n"); + } + + if ((dwFlags & SHGDN_FORPARSING) && !bSimplePidl) { /* go deeper if needed */ + int len = 0; + + PathAddBackslashA(szPath); /*FIXME*/ + len = lstrlenA(szPath); + + if (!SUCCEEDED + (SHELL32_GetDisplayNameOfChild(iface, pidl, dwFlags | SHGDN_INFOLDER, szPath + len, MAX_PATH - len))) + return E_OUTOFMEMORY; + } + } + + strRet->uType = STRRET_CSTR; + lstrcpynA(strRet->u.cStr, szPath, MAX_PATH); + + TRACE("--(%p)->(%s)\n", This, szPath); + return S_OK; +} + +/************************************************************************** +* ISF_ControlPanel_fnSetNameOf +* Changes the name of a file object or subfolder, possibly changing its item +* identifier in the process. +* +* PARAMETERS +* HWND hwndOwner, //[in ] Owner window for output +* LPCITEMIDLIST pidl, //[in ] simple pidl of item to change +* LPCOLESTR lpszName, //[in ] the items new display name +* DWORD dwFlags, //[in ] SHGNO formatting flags +* LPITEMIDLIST* ppidlOut) //[out] simple pidl returned +*/ +static HRESULT WINAPI ISF_ControlPanel_fnSetNameOf(IShellFolder2 * iface, HWND hwndOwner, LPCITEMIDLIST pidl, /*simple pidl */ + LPCOLESTR lpName, DWORD dwFlags, LPITEMIDLIST * pPidlOut) +{ + ICPanelImpl *This = (ICPanelImpl *)iface; + FIXME("(%p)->(%p,pidl=%p,%s,%lu,%p)\n", This, hwndOwner, pidl, debugstr_w(lpName), dwFlags, pPidlOut); + return E_FAIL; +} + +static HRESULT WINAPI ISF_ControlPanel_fnGetDefaultSearchGUID(IShellFolder2 * iface, GUID * pguid) +{ + ICPanelImpl *This = (ICPanelImpl *)iface; + FIXME("(%p)\n", This); + return E_NOTIMPL; +} +static HRESULT WINAPI ISF_ControlPanel_fnEnumSearches(IShellFolder2 * iface, IEnumExtraSearch ** ppenum) +{ + ICPanelImpl *This = (ICPanelImpl *)iface; + FIXME("(%p)\n", This); + return E_NOTIMPL; +} +static HRESULT WINAPI ISF_ControlPanel_fnGetDefaultColumn(IShellFolder2 * iface, DWORD dwRes, ULONG * pSort, ULONG * pDisplay) +{ + ICPanelImpl *This = (ICPanelImpl *)iface; + + TRACE("(%p)\n", This); + + if (pSort) *pSort = 0; + if (pDisplay) *pDisplay = 0; + return S_OK; +} +static HRESULT WINAPI ISF_ControlPanel_fnGetDefaultColumnState(IShellFolder2 * iface, UINT iColumn, DWORD * pcsFlags) +{ + ICPanelImpl *This = (ICPanelImpl *)iface; + + TRACE("(%p)\n", This); + + if (!pcsFlags || iColumn >= CONROLPANELSHELLVIEWCOLUMNS) return E_INVALIDARG; + *pcsFlags = ControlPanelSFHeader[iColumn].pcsFlags; + return S_OK; +} +static HRESULT WINAPI ISF_ControlPanel_fnGetDetailsEx(IShellFolder2 * iface, LPCITEMIDLIST pidl, const SHCOLUMNID * pscid, VARIANT * pv) +{ + ICPanelImpl *This = (ICPanelImpl *)iface; + FIXME("(%p)\n", This); + return E_NOTIMPL; +} + +static HRESULT WINAPI ISF_ControlPanel_fnGetDetailsOf(IShellFolder2 * iface, LPCITEMIDLIST pidl, UINT iColumn, SHELLDETAILS * psd) +{ + ICPanelImpl *This = (ICPanelImpl *)iface; + HRESULT hr; + + TRACE("(%p)->(%p %i %p)\n", This, pidl, iColumn, psd); + + if (!psd || iColumn >= CONROLPANELSHELLVIEWCOLUMNS) + return E_INVALIDARG; + + if (!pidl) { + psd->fmt = ControlPanelSFHeader[iColumn].fmt; + psd->cxChar = ControlPanelSFHeader[iColumn].cxChar; + psd->str.uType = STRRET_CSTR; + LoadStringA(shell32_hInstance, ControlPanelSFHeader[iColumn].colnameid, psd->str.u.cStr, MAX_PATH); + return S_OK; + } else { + psd->str.u.cStr[0] = 0x00; + psd->str.uType = STRRET_CSTR; + switch(iColumn) { + case 0: /* name */ + hr = IShellFolder_GetDisplayNameOf(iface, pidl, SHGDN_NORMAL | SHGDN_INFOLDER, &psd->str); + break; + case 1: /* comment */ + _ILGetFileType(pidl, psd->str.u.cStr, MAX_PATH); + break; + } + hr = S_OK; + } + + return hr; +} +static HRESULT WINAPI ISF_ControlPanel_fnMapColumnToSCID(IShellFolder2 * iface, UINT column, SHCOLUMNID * pscid) +{ + ICPanelImpl *This = (ICPanelImpl *)iface; + FIXME("(%p)\n", This); + return E_NOTIMPL; +} + +static IShellFolder2Vtbl vt_ShellFolder2 = +{ + + ISF_ControlPanel_fnQueryInterface, + ISF_ControlPanel_fnAddRef, + ISF_ControlPanel_fnRelease, + ISF_ControlPanel_fnParseDisplayName, + ISF_ControlPanel_fnEnumObjects, + ISF_ControlPanel_fnBindToObject, + ISF_ControlPanel_fnBindToStorage, + ISF_ControlPanel_fnCompareIDs, + ISF_ControlPanel_fnCreateViewObject, + ISF_ControlPanel_fnGetAttributesOf, + ISF_ControlPanel_fnGetUIObjectOf, + ISF_ControlPanel_fnGetDisplayNameOf, + ISF_ControlPanel_fnSetNameOf, + + /* ShellFolder2 */ + ISF_ControlPanel_fnGetDefaultSearchGUID, + ISF_ControlPanel_fnEnumSearches, + ISF_ControlPanel_fnGetDefaultColumn, + ISF_ControlPanel_fnGetDefaultColumnState, + ISF_ControlPanel_fnGetDetailsEx, + ISF_ControlPanel_fnGetDetailsOf, + ISF_ControlPanel_fnMapColumnToSCID +}; + +/************************************************************************ + * ICPanel_PersistFolder2_QueryInterface + */ +static HRESULT WINAPI ICPanel_PersistFolder2_QueryInterface(IPersistFolder2 * iface, REFIID iid, LPVOID * ppvObject) +{ + _ICOM_THIS_From_IPersistFolder2(ICPanelImpl, iface); + + TRACE("(%p)\n", This); + + return IUnknown_QueryInterface(_IUnknown_(This), iid, ppvObject); +} + +/************************************************************************ + * ICPanel_PersistFolder2_AddRef + */ +static ULONG WINAPI ICPanel_PersistFolder2_AddRef(IPersistFolder2 * iface) +{ + _ICOM_THIS_From_IPersistFolder2(ICPanelImpl, iface); + + TRACE("(%p)->(count=%lu)\n", This, This->ref); + + return IUnknown_AddRef(_IUnknown_(This)); +} + +/************************************************************************ + * ISFPersistFolder_Release + */ +static ULONG WINAPI ICPanel_PersistFolder2_Release(IPersistFolder2 * iface) +{ + _ICOM_THIS_From_IPersistFolder2(ICPanelImpl, iface); + + TRACE("(%p)->(count=%lu)\n", This, This->ref); + + return IUnknown_Release(_IUnknown_(This)); +} + +/************************************************************************ + * ICPanel_PersistFolder2_GetClassID + */ +static HRESULT WINAPI ICPanel_PersistFolder2_GetClassID(IPersistFolder2 * iface, CLSID * lpClassId) +{ + _ICOM_THIS_From_IPersistFolder2(ICPanelImpl, iface); + + TRACE("(%p)\n", This); + + if (!lpClassId) + return E_POINTER; + *lpClassId = CLSID_ControlPanel; + + return S_OK; +} + +/************************************************************************ + * ICPanel_PersistFolder2_Initialize + * + * NOTES: it makes no sense to change the pidl + */ +static HRESULT WINAPI ICPanel_PersistFolder2_Initialize(IPersistFolder2 * iface, LPCITEMIDLIST pidl) +{ + _ICOM_THIS_From_IPersistFolder2(ICPanelImpl, iface); + TRACE("(%p)->(%p)\n", This, pidl); + return E_NOTIMPL; +} + +/************************************************************************** + * IPersistFolder2_fnGetCurFolder + */ +static HRESULT WINAPI ICPanel_PersistFolder2_GetCurFolder(IPersistFolder2 * iface, LPITEMIDLIST * pidl) +{ + _ICOM_THIS_From_IPersistFolder2(ICPanelImpl, iface); + + TRACE("(%p)->(%p)\n", This, pidl); + + if (!pidl) + return E_POINTER; + *pidl = ILClone(This->pidlRoot); + return S_OK; +} + +static IPersistFolder2Vtbl vt_PersistFolder2 = +{ + + ICPanel_PersistFolder2_QueryInterface, + ICPanel_PersistFolder2_AddRef, + ICPanel_PersistFolder2_Release, + ICPanel_PersistFolder2_GetClassID, + ICPanel_PersistFolder2_Initialize, + ICPanel_PersistFolder2_GetCurFolder +}; + +HRESULT WINAPI CPanel_GetIconLocationA(LPITEMIDLIST pidl, LPSTR szIconFile, UINT cchMax, int* piIndex) +{ + PIDLCPanelStruct* pcpanel = _ILGetCPanelPointer(pidl); + + if (!pcpanel) + return E_INVALIDARG; + + lstrcpyA(szIconFile, pcpanel->szName); + *piIndex = pcpanel->iconIdx!=-1? pcpanel->iconIdx: 0; + + return S_OK; +} + +HRESULT WINAPI CPanel_GetIconLocationW(LPITEMIDLIST pidl, LPWSTR szIconFile, UINT cchMax, int* piIndex) +{ + PIDLCPanelStruct* pcpanel = _ILGetCPanelPointer(pidl); + + if (!pcpanel) + return E_INVALIDARG; + + MultiByteToWideChar(CP_ACP, 0, pcpanel->szName, -1, szIconFile, cchMax); + *piIndex = pcpanel->iconIdx!=-1? pcpanel->iconIdx: 0; + + return S_OK; +} + + +/************************************************************************** +* IShellExecuteHookW Implementation +*/ + +static HRESULT WINAPI IShellExecuteHookW_fnQueryInterface(IShellExecuteHookW* iface, REFIID riid, void** ppvObject) +{ + _ICOM_THIS_From_IShellExecuteHookW(ICPanelImpl, iface); + + TRACE("(%p)->(count=%lu)\n", This, This->ref); + + return IUnknown_QueryInterface(This->pUnkOuter, riid, ppvObject); +} + +static ULONG STDMETHODCALLTYPE IShellExecuteHookW_fnAddRef(IShellExecuteHookW* iface) +{ + _ICOM_THIS_From_IShellExecuteHookW(ICPanelImpl, iface); + + TRACE("(%p)->(count=%lu)\n", This, This->ref); + + return IUnknown_AddRef(This->pUnkOuter); +} + +static ULONG STDMETHODCALLTYPE IShellExecuteHookW_fnRelease(IShellExecuteHookW* iface) +{ + _ICOM_THIS_From_IShellExecuteHookW(ICPanelImpl, iface); + + TRACE("(%p)\n", This); + + return IUnknown_Release(This->pUnkOuter); +} + +static HRESULT WINAPI IShellExecuteHookW_fnExecute(IShellExecuteHookW* iface, LPSHELLEXECUTEINFOW psei) +{ + static const WCHAR wCplopen[] = {'c','p','l','o','p','e','n','\0'}; + ICPanelImpl *This = (ICPanelImpl *)iface; + + SHELLEXECUTEINFOW sei_tmp; + PIDLCPanelStruct* pcpanel; + WCHAR path[MAX_PATH]; + BOOL ret; + int l; + + TRACE("(%p)->execute(%p)\n", This, psei); + + if (!psei) + return E_INVALIDARG; + + pcpanel = _ILGetCPanelPointer(ILFindLastID(psei->lpIDList)); + + if (!pcpanel) + return E_INVALIDARG; + + path[0] = '\"'; + /* Return value from MultiByteToWideChar includes terminating NUL, which + * compensates for the starting double quote we just put in */ + l = MultiByteToWideChar(CP_ACP, 0, pcpanel->szName, -1, path+1, MAX_PATH); + + /* pass applet name to Control_RunDLL to distinguish between applets in one .cpl file */ + path[l++] = '"'; + path[l++] = ' '; + + MultiByteToWideChar(CP_ACP, 0, pcpanel->szName+pcpanel->offsDispName, -1, path+l, MAX_PATH); + + memcpy(&sei_tmp, psei, sizeof(sei_tmp)); + sei_tmp.lpFile = path; + sei_tmp.fMask &= ~SEE_MASK_INVOKEIDLIST; + sei_tmp.lpVerb = wCplopen; + + ret = ShellExecuteExW(&sei_tmp); + if (ret) + return S_OK; + else + return S_FALSE; +} + +static IShellExecuteHookWVtbl vt_ShellExecuteHookW = +{ + + IShellExecuteHookW_fnQueryInterface, + IShellExecuteHookW_fnAddRef, + IShellExecuteHookW_fnRelease, + + IShellExecuteHookW_fnExecute +}; + + +/************************************************************************** +* IShellExecuteHookA Implementation +*/ + +static HRESULT WINAPI IShellExecuteHookA_fnQueryInterface(IShellExecuteHookA* iface, REFIID riid, void** ppvObject) +{ + _ICOM_THIS_From_IShellExecuteHookA(ICPanelImpl, iface); + + TRACE("(%p)->(count=%lu)\n", This, This->ref); + + return IUnknown_QueryInterface(This->pUnkOuter, riid, ppvObject); +} + +static ULONG STDMETHODCALLTYPE IShellExecuteHookA_fnAddRef(IShellExecuteHookA* iface) +{ + _ICOM_THIS_From_IShellExecuteHookA(ICPanelImpl, iface); + + TRACE("(%p)->(count=%lu)\n", This, This->ref); + + return IUnknown_AddRef(This->pUnkOuter); +} + +static ULONG STDMETHODCALLTYPE IShellExecuteHookA_fnRelease(IShellExecuteHookA* iface) +{ + _ICOM_THIS_From_IShellExecuteHookA(ICPanelImpl, iface); + + TRACE("(%p)\n", This); + + return IUnknown_Release(This->pUnkOuter); +} + +static HRESULT WINAPI IShellExecuteHookA_fnExecute(IShellExecuteHookA* iface, LPSHELLEXECUTEINFOA psei) +{ + ICPanelImpl *This = (ICPanelImpl *)iface; + + SHELLEXECUTEINFOA sei_tmp; + PIDLCPanelStruct* pcpanel; + char path[MAX_PATH]; + BOOL ret; + + TRACE("(%p)->execute(%p)\n", This, psei); + + if (!psei) + return E_INVALIDARG; + + pcpanel = _ILGetCPanelPointer(ILFindLastID(psei->lpIDList)); + + if (!pcpanel) + return E_INVALIDARG; + + path[0] = '\"'; + lstrcpyA(path+1, pcpanel->szName); + + /* pass applet name to Control_RunDLL to distinguish between applets in one .cpl file */ + lstrcatA(path, "\" "); + lstrcatA(path, pcpanel->szName+pcpanel->offsDispName); + + memcpy(&sei_tmp, psei, sizeof(sei_tmp)); + sei_tmp.lpFile = path; + sei_tmp.fMask &= ~SEE_MASK_INVOKEIDLIST; + + ret = ShellExecuteExA(&sei_tmp); + if (ret) + return S_OK; + else + return S_FALSE; +} + +static IShellExecuteHookAVtbl vt_ShellExecuteHookA = +{ + + IShellExecuteHookA_fnQueryInterface, + IShellExecuteHookA_fnAddRef, + IShellExecuteHookA_fnRelease, + + IShellExecuteHookA_fnExecute +}; From 22b2e24aea6706088dd11fc7ea50f1638af2e758 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20van=20Geldorp?= Date: Wed, 9 Feb 2005 18:18:20 +0000 Subject: [PATCH 160/185] Fix EOL setting svn path=/trunk/; revision=13476 --- reactos/lib/shell32/Makefile.in | 184 +- reactos/lib/shell32/Makefile.ros-template | 60 +- reactos/lib/shell32/autocomplete.c | 1288 +- reactos/lib/shell32/brsfolder.c | 1034 +- reactos/lib/shell32/changenotify.c | 960 +- reactos/lib/shell32/classes.c | 760 +- reactos/lib/shell32/clipboard.c | 540 +- reactos/lib/shell32/control.c | 998 +- reactos/lib/shell32/cpanel.h | 94 +- reactos/lib/shell32/dataobject.c | 916 +- reactos/lib/shell32/debughlp.c | 676 +- reactos/lib/shell32/debughlp.h | 70 +- reactos/lib/shell32/dialogs.c | 892 +- reactos/lib/shell32/dragdrophelper.c | 372 +- reactos/lib/shell32/enumidlist.c | 744 +- reactos/lib/shell32/enumidlist.h | 60 +- reactos/lib/shell32/folders.c | 1116 +- reactos/lib/shell32/iconcache.c | 1196 +- reactos/lib/shell32/makefile | 18 +- reactos/lib/shell32/memorystream.c | 592 +- reactos/lib/shell32/pidl.c | 4440 +-- reactos/lib/shell32/pidl.h | 506 +- reactos/lib/shell32/regsvr.c | 1080 +- reactos/lib/shell32/ros-systray.c | 160 +- reactos/lib/shell32/shell.c | 1318 +- reactos/lib/shell32/shell.spec | 90 +- reactos/lib/shell32/shell32.spec | 882 +- reactos/lib/shell32/shell32_Ca.rc | 92 +- reactos/lib/shell32/shell32_Cn.rc | 126 +- reactos/lib/shell32/shell32_Cs.rc | 362 +- reactos/lib/shell32/shell32_Da.rc | 92 +- reactos/lib/shell32/shell32_De.rc | 380 +- reactos/lib/shell32/shell32_En.rc | 442 +- reactos/lib/shell32/shell32_Eo.rc | 92 +- reactos/lib/shell32/shell32_Es.rc | 444 +- reactos/lib/shell32/shell32_Fi.rc | 92 +- reactos/lib/shell32/shell32_Fr.rc | 448 +- reactos/lib/shell32/shell32_Hu.rc | 92 +- reactos/lib/shell32/shell32_It.rc | 382 +- reactos/lib/shell32/shell32_Ja.rc | 280 +- reactos/lib/shell32/shell32_Ko.rc | 92 +- reactos/lib/shell32/shell32_Nl.rc | 92 +- reactos/lib/shell32/shell32_No.rc | 92 +- reactos/lib/shell32/shell32_Pl.rc | 380 +- reactos/lib/shell32/shell32_Pt.rc | 380 +- reactos/lib/shell32/shell32_Ru.rc | 92 +- reactos/lib/shell32/shell32_Si.rc | 120 +- reactos/lib/shell32/shell32_Sk.rc | 120 +- reactos/lib/shell32/shell32_Sv.rc | 92 +- reactos/lib/shell32/shell32_Uk.rc | 356 +- reactos/lib/shell32/shell32_Wa.rc | 102 +- reactos/lib/shell32/shell32_Zh.rc | 124 +- reactos/lib/shell32/shell32_main.c | 1974 +- reactos/lib/shell32/shell32_main.h | 452 +- reactos/lib/shell32/shell32_xx.rc | 40 +- reactos/lib/shell32/shellfolder.h | 136 +- reactos/lib/shell32/shelllink.c | 3604 +-- reactos/lib/shell32/shellole.c | 1604 +- reactos/lib/shell32/shellord.c | 3270 +- reactos/lib/shell32/shellpath.c | 4064 +-- reactos/lib/shell32/shellreg.c | 306 +- reactos/lib/shell32/shellstring.c | 572 +- reactos/lib/shell32/shfldr.h | 116 +- reactos/lib/shell32/shfldr_desktop.c | 1478 +- reactos/lib/shell32/shfldr_fs.c | 2798 +- reactos/lib/shell32/shfldr_mycomp.c | 1664 +- reactos/lib/shell32/shlexec.c | 2896 +- reactos/lib/shell32/shlfileop.c | 2834 +- reactos/lib/shell32/shlfolder.c | 1026 +- reactos/lib/shell32/shlfsbind.c | 444 +- reactos/lib/shell32/shlmenu.c | 2004 +- reactos/lib/shell32/shlview.c | 4814 +-- reactos/lib/shell32/shpolicy.c | 1830 +- reactos/lib/shell32/shres.rc | 33284 ++++++++++---------- reactos/lib/shell32/shresdef.h | 184 +- reactos/lib/shell32/shv_bg_cmenu.c | 890 +- reactos/lib/shell32/shv_item_cmenu.c | 1062 +- reactos/lib/shell32/systray.c | 794 +- reactos/lib/shell32/undocshell.h | 1170 +- reactos/lib/shell32/version.h | 56 +- reactos/lib/shell32/version.rc | 54 +- reactos/lib/shell32/version16.rc | 48 +- 82 files changed, 50940 insertions(+), 50940 deletions(-) diff --git a/reactos/lib/shell32/Makefile.in b/reactos/lib/shell32/Makefile.in index 393750a5cbc..36b71403ad8 100644 --- a/reactos/lib/shell32/Makefile.in +++ b/reactos/lib/shell32/Makefile.in @@ -1,92 +1,92 @@ -EXTRADEFS = -D_SHELL32_ -DCOM_NO_WINDOWS_H -TOPSRCDIR = @top_srcdir@ -TOPOBJDIR = ../.. -SRCDIR = @srcdir@ -VPATH = @srcdir@ -MODULE = shell32.dll -IMPORTS = shlwapi comctl32 user32 gdi32 advapi32 kernel32 -DELAYIMPORTS = ole32 -EXTRALIBS = -luuid $(LIBUNICODE) - -C_SRCS = \ - authors.c \ - autocomplete.c \ - brsfolder.c \ - changenotify.c \ - classes.c \ - clipboard.c \ - control.c \ - cpanelfolder.c \ - dataobject.c \ - debughlp.c \ - dialogs.c \ - dragdrophelper.c \ - enumidlist.c \ - folders.c \ - iconcache.c \ - memorystream.c \ - pidl.c \ - regsvr.c \ - shell32_main.c \ - shelllink.c \ - shellole.c \ - shellord.c \ - shellpath.c \ - shellreg.c \ - shellstring.c \ - shfldr_desktop.c \ - shfldr_fs.c \ - shfldr_mycomp.c \ - shlexec.c \ - shlfileop.c \ - shlfolder.c \ - shlfsbind.c \ - shlmenu.c \ - shlview.c \ - shpolicy.c \ - shv_bg_cmenu.c \ - shv_item_cmenu.c \ - ros-systray.c - -RC_SRCS = shres.rc -RC_BINSRC = shres.rc -RC_BINARIES = \ - cdrom.ico \ - desktop.ico \ - document.ico \ - drive.ico \ - floppy.ico \ - folder.ico \ - folder_open.ico \ - mycomputer.ico \ - netdrive.ico \ - netdrive2.ico \ - ramdisk.ico - -C_SRCS16 = shell.c -RC_SRCS16 = version16.rc -SPEC_SRCS16 = shell.spec - -SUBDIRS = tests - -@MAKE_DLL_RULES@ - -# Special rules for 16-bit resource files - -version16.res: version16.rc - $(LDPATH) $(RC16) $(RC16FLAGS) -fo$@ $(SRCDIR)/version16.rc - -shell.spec.c: shell.spec version16.res - $(WINEBUILD) $(DEFS) $(DLLFLAGS) -o $@ --main-module $(MODULE) --res version16.res --dll $(SRCDIR)/shell.spec - -authors.c: $(TOPSRCDIR)/AUTHORS - (LC_ALL=C; export LC_ALL; echo 'const char * const SHELL_Authors[] = {' && \ - sed -e '1,2d' -e 's/\(.*\)/ \"\1\",/' $(TOPSRCDIR)/AUTHORS && \ - echo ' 0 };') >$@ || ($(RM) $@ && false) - -depend: authors.c - -clean:: - $(RM) authors.c - -### Dependencies: +EXTRADEFS = -D_SHELL32_ -DCOM_NO_WINDOWS_H +TOPSRCDIR = @top_srcdir@ +TOPOBJDIR = ../.. +SRCDIR = @srcdir@ +VPATH = @srcdir@ +MODULE = shell32.dll +IMPORTS = shlwapi comctl32 user32 gdi32 advapi32 kernel32 +DELAYIMPORTS = ole32 +EXTRALIBS = -luuid $(LIBUNICODE) + +C_SRCS = \ + authors.c \ + autocomplete.c \ + brsfolder.c \ + changenotify.c \ + classes.c \ + clipboard.c \ + control.c \ + cpanelfolder.c \ + dataobject.c \ + debughlp.c \ + dialogs.c \ + dragdrophelper.c \ + enumidlist.c \ + folders.c \ + iconcache.c \ + memorystream.c \ + pidl.c \ + regsvr.c \ + shell32_main.c \ + shelllink.c \ + shellole.c \ + shellord.c \ + shellpath.c \ + shellreg.c \ + shellstring.c \ + shfldr_desktop.c \ + shfldr_fs.c \ + shfldr_mycomp.c \ + shlexec.c \ + shlfileop.c \ + shlfolder.c \ + shlfsbind.c \ + shlmenu.c \ + shlview.c \ + shpolicy.c \ + shv_bg_cmenu.c \ + shv_item_cmenu.c \ + ros-systray.c + +RC_SRCS = shres.rc +RC_BINSRC = shres.rc +RC_BINARIES = \ + cdrom.ico \ + desktop.ico \ + document.ico \ + drive.ico \ + floppy.ico \ + folder.ico \ + folder_open.ico \ + mycomputer.ico \ + netdrive.ico \ + netdrive2.ico \ + ramdisk.ico + +C_SRCS16 = shell.c +RC_SRCS16 = version16.rc +SPEC_SRCS16 = shell.spec + +SUBDIRS = tests + +@MAKE_DLL_RULES@ + +# Special rules for 16-bit resource files + +version16.res: version16.rc + $(LDPATH) $(RC16) $(RC16FLAGS) -fo$@ $(SRCDIR)/version16.rc + +shell.spec.c: shell.spec version16.res + $(WINEBUILD) $(DEFS) $(DLLFLAGS) -o $@ --main-module $(MODULE) --res version16.res --dll $(SRCDIR)/shell.spec + +authors.c: $(TOPSRCDIR)/AUTHORS + (LC_ALL=C; export LC_ALL; echo 'const char * const SHELL_Authors[] = {' && \ + sed -e '1,2d' -e 's/\(.*\)/ \"\1\",/' $(TOPSRCDIR)/AUTHORS && \ + echo ' 0 };') >$@ || ($(RM) $@ && false) + +depend: authors.c + +clean:: + $(RM) authors.c + +### Dependencies: diff --git a/reactos/lib/shell32/Makefile.ros-template b/reactos/lib/shell32/Makefile.ros-template index 4321122536a..1268c4a1dde 100644 --- a/reactos/lib/shell32/Makefile.ros-template +++ b/reactos/lib/shell32/Makefile.ros-template @@ -1,30 +1,30 @@ -# $Id: Makefile.ros-template 11910 2004-12-03 23:37:44Z blight $ - -TARGET_NAME = shell32 - -TARGET_OBJECTS = @C_SRCS@ - -TARGET_CFLAGS = @EXTRADEFS@ -D__REACTOS__ - -TARGET_SDKLIBS = wine.a @IMPORTS@ ole32.a wine_uuid.a ntdll.a - -TARGET_BASE = $(TARGET_BASE_LIB_SHELL32) - -TARGET_RC_SRCS = @RC_SRCS@ -TARGET_RC_BINSRC = @RC_BINSRC@ -TARGET_RC_BINARIES = @RC_BINARIES@ - -TARGET_CLEAN = authors.c - -default: all - -authors.c: -ifeq ($(HOST),mingw32-linux) - echo 'const char * const SHELL_Authors[] = { "Copyright 1993-2005 WINE team", "Copyright 1998-2005 ReactOS team", 0 };' > authors.c -else - echo const char * const SHELL_Authors[] = { "Copyright 1993-2005 WINE team", "Copyright 1998-2005 ReactOS team", 0 }; > authors.c -endif - -DEP_OBJECTS = $(TARGET_OBJECTS) - -include $(TOOLS_PATH)/depend.mk +# $Id: Makefile.ros-template 11910 2004-12-03 23:37:44Z blight $ + +TARGET_NAME = shell32 + +TARGET_OBJECTS = @C_SRCS@ + +TARGET_CFLAGS = @EXTRADEFS@ -D__REACTOS__ + +TARGET_SDKLIBS = wine.a @IMPORTS@ ole32.a wine_uuid.a ntdll.a + +TARGET_BASE = $(TARGET_BASE_LIB_SHELL32) + +TARGET_RC_SRCS = @RC_SRCS@ +TARGET_RC_BINSRC = @RC_BINSRC@ +TARGET_RC_BINARIES = @RC_BINARIES@ + +TARGET_CLEAN = authors.c + +default: all + +authors.c: +ifeq ($(HOST),mingw32-linux) + echo 'const char * const SHELL_Authors[] = { "Copyright 1993-2005 WINE team", "Copyright 1998-2005 ReactOS team", 0 };' > authors.c +else + echo const char * const SHELL_Authors[] = { "Copyright 1993-2005 WINE team", "Copyright 1998-2005 ReactOS team", 0 }; > authors.c +endif + +DEP_OBJECTS = $(TARGET_OBJECTS) + +include $(TOOLS_PATH)/depend.mk diff --git a/reactos/lib/shell32/autocomplete.c b/reactos/lib/shell32/autocomplete.c index b947fccdec1..93e2b1f0718 100644 --- a/reactos/lib/shell32/autocomplete.c +++ b/reactos/lib/shell32/autocomplete.c @@ -1,644 +1,644 @@ -/* - * AutoComplete interfaces implementation. - * - * Copyright 2004 Maxime Bellengé - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -/* - Implemented: - - ACO_AUTOAPPEND style - - ACO_AUTOSUGGEST style - - ACO_UPDOWNKEYDROPSLIST style - - - Handle pwzsRegKeyPath and pwszQuickComplete in Init - - TODO: - - implement ACO_SEARCH style - - implement ACO_FILTERPREFIXES style - - implement ACO_USETAB style - - implement ACO_RTLREADING style - - */ -#include "config.h" - -#include -#include -#include - -#define COBJMACROS - -#include "wine/debug.h" -#include "windef.h" -#include "winbase.h" -#include "winreg.h" -#include "undocshell.h" -#include "shlwapi.h" -#include "winerror.h" -#include "objbase.h" - -#include "pidl.h" -#include "shlguid.h" -#include "shlobj.h" -#include "shldisp.h" -#include "debughlp.h" - -#include "wine/unicode.h" - -WINE_DEFAULT_DEBUG_CHANNEL(shell); - -typedef struct -{ - IAutoCompleteVtbl *lpVtbl; - IAutoComplete2Vtbl *lpvtblAutoComplete2; - DWORD ref; - BOOL enabled; - HWND hwndEdit; - HWND hwndListBox; - WNDPROC wpOrigEditProc; - WNDPROC wpOrigLBoxProc; - WCHAR *txtbackup; - WCHAR *quickComplete; - IEnumString *enumstr; - AUTOCOMPLETEOPTIONS options; -} IAutoCompleteImpl; - -static struct IAutoCompleteVtbl acvt; -static struct IAutoComplete2Vtbl ac2vt; - -#define _IAutoComplete2_Offset ((int)(&(((IAutoCompleteImpl*)0)->lpvtblAutoComplete2))) -#define _ICOM_THIS_From_IAutoComplete2(class, name) class* This = (class*)(((char*)name)-_IAutoComplete2_Offset); - -/* - converts This to a interface pointer -*/ -#define _IUnknown_(This) (IUnknown*)&(This->lpVtbl) -#define _IAutoComplete2_(This) (IAutoComplete2*)&(This->lpvtblAutoComplete2) - -static LRESULT APIENTRY ACEditSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam); -static LRESULT APIENTRY ACLBoxSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam); - -/************************************************************************** - * IAutoComplete_Constructor - */ -HRESULT WINAPI IAutoComplete_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv) -{ - IAutoCompleteImpl *lpac; - - if (pUnkOuter && !IsEqualIID (riid, &IID_IUnknown)) - return CLASS_E_NOAGGREGATION; - - lpac = (IAutoCompleteImpl*)HeapAlloc(GetProcessHeap(), - HEAP_ZERO_MEMORY, sizeof(IAutoCompleteImpl)); - if (!lpac) - return E_OUTOFMEMORY; - - lpac->ref = 1; - lpac->lpVtbl = &acvt; - lpac->lpvtblAutoComplete2 = &ac2vt; - lpac->enabled = TRUE; - lpac->enumstr = NULL; - lpac->options = ACO_AUTOAPPEND; - lpac->wpOrigEditProc = NULL; - lpac->hwndListBox = NULL; - lpac->txtbackup = NULL; - lpac->quickComplete = NULL; - - if (!SUCCEEDED (IUnknown_QueryInterface (_IUnknown_ (lpac), riid, ppv))) { - IUnknown_Release (_IUnknown_ (lpac)); - return E_NOINTERFACE; - } - - TRACE("-- (%p)->\n",lpac); - - return S_OK; -} - -/************************************************************************** - * AutoComplete_QueryInterface - */ -static HRESULT WINAPI IAutoComplete_fnQueryInterface( - IAutoComplete * iface, - REFIID riid, - LPVOID *ppvObj) -{ - IAutoCompleteImpl *This = (IAutoCompleteImpl *)iface; - - TRACE("(%p)->(\n\tIID:\t%s,%p)\n", This, shdebugstr_guid(riid), ppvObj); - *ppvObj = NULL; - - if(IsEqualIID(riid, &IID_IUnknown)) - { - *ppvObj = This; - } - else if(IsEqualIID(riid, &IID_IAutoComplete)) - { - *ppvObj = (IAutoComplete*)This; - } - else if(IsEqualIID(riid, &IID_IAutoComplete2)) - { - *ppvObj = _IAutoComplete2_ (This); - } - - if (*ppvObj) - { - IAutoComplete_AddRef((IAutoComplete*)*ppvObj); - TRACE("-- Interface: (%p)->(%p)\n", ppvObj, *ppvObj); - return S_OK; - } - TRACE("-- Interface: E_NOINTERFACE\n"); - return E_NOINTERFACE; -} - -/****************************************************************************** - * IAutoComplete_fnAddRef - */ -static ULONG WINAPI IAutoComplete_fnAddRef( - IAutoComplete * iface) -{ - IAutoCompleteImpl *This = (IAutoCompleteImpl *)iface; - - TRACE("(%p)->(%lu)\n",This,This->ref); - return ++(This->ref); -} - -/****************************************************************************** - * IAutoComplete_fnRelease - */ -static ULONG WINAPI IAutoComplete_fnRelease( - IAutoComplete * iface) -{ - IAutoCompleteImpl *This = (IAutoCompleteImpl *)iface; - - TRACE("(%p)->(%lu)\n",This,This->ref); - - if (!--(This->ref)) { - TRACE(" destroying IAutoComplete(%p)\n",This); - HeapFree(GetProcessHeap(), 0, This->quickComplete); - HeapFree(GetProcessHeap(), 0, This->txtbackup); - if (This->hwndListBox) - DestroyWindow(This->hwndListBox); - if (This->enumstr) - IEnumString_Release(This->enumstr); - HeapFree(GetProcessHeap(), 0, This); - return 0; - } - return This->ref; -} - -/****************************************************************************** - * IAutoComplete_fnEnable - */ -static HRESULT WINAPI IAutoComplete_fnEnable( - IAutoComplete * iface, - BOOL fEnable) -{ - IAutoCompleteImpl *This = (IAutoCompleteImpl *)iface; - - HRESULT hr = S_OK; - - TRACE("(%p)->(%s)\n", This, (fEnable)?"true":"false"); - - This->enabled = fEnable; - - return hr; -} - -/****************************************************************************** - * IAutoComplete_fnInit - */ -static HRESULT WINAPI IAutoComplete_fnInit( - IAutoComplete * iface, - HWND hwndEdit, - IUnknown *punkACL, - LPCOLESTR pwzsRegKeyPath, - LPCOLESTR pwszQuickComplete) -{ - IAutoCompleteImpl *This = (IAutoCompleteImpl *)iface; - static const WCHAR lbName[] = {'L','i','s','t','B','o','x',0}; - - TRACE("(%p)->(0x%08lx, %p, %s, %s)\n", - This, (long)hwndEdit, punkACL, debugstr_w(pwzsRegKeyPath), debugstr_w(pwszQuickComplete)); - - if (This->options & ACO_AUTOSUGGEST) TRACE(" ACO_AUTOSUGGEST\n"); - if (This->options & ACO_AUTOAPPEND) TRACE(" ACO_AUTOAPPEND\n"); - if (This->options & ACO_SEARCH) FIXME(" ACO_SEARCH not supported\n"); - if (This->options & ACO_FILTERPREFIXES) FIXME(" ACO_FILTERPREFIXES not supported\n"); - if (This->options & ACO_USETAB) FIXME(" ACO_USETAB not supported\n"); - if (This->options & ACO_UPDOWNKEYDROPSLIST) TRACE(" ACO_UPDOWNKEYDROPSLIST\n"); - if (This->options & ACO_RTLREADING) FIXME(" ACO_RTLREADING not supported\n"); - - This->hwndEdit = hwndEdit; - - if (!SUCCEEDED (IUnknown_QueryInterface (punkACL, &IID_IEnumString, (LPVOID*)&This->enumstr))) { - TRACE("No IEnumString interface\n"); - return E_NOINTERFACE; - } - - This->wpOrigEditProc = (WNDPROC) SetWindowLongPtrW( hwndEdit, GWLP_WNDPROC, (LONG_PTR) ACEditSubclassProc); - SetWindowLongPtrW( hwndEdit, GWLP_USERDATA, (LONG_PTR)This); - - if (This->options & ACO_AUTOSUGGEST) { - HWND hwndParent; - - hwndParent = GetParent(This->hwndEdit); - - /* FIXME : The listbox should be resizable with the mouse. WS_THICKFRAME looks ugly */ - This->hwndListBox = CreateWindowExW(0, lbName, NULL, - WS_BORDER | WS_CHILD | WS_VSCROLL | LBS_HASSTRINGS | LBS_NOTIFY | LBS_NOINTEGRALHEIGHT, - CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, - hwndParent, NULL, - (HINSTANCE)GetWindowLongPtrW( hwndParent, GWLP_HINSTANCE ), NULL); - - if (This->hwndListBox) { - This->wpOrigLBoxProc = (WNDPROC) SetWindowLongPtrW( This->hwndListBox, GWLP_WNDPROC, (LONG_PTR) ACLBoxSubclassProc); - SetWindowLongPtrW( This->hwndListBox, GWLP_USERDATA, (LONG_PTR)This); - } - } - - if (pwzsRegKeyPath) { - WCHAR *key; - WCHAR result[MAX_PATH]; - WCHAR *value; - HKEY hKey = 0; - LONG res; - LONG len; - - /* pwszRegKeyPath contains the key as well as the value, so we split */ - key = (WCHAR*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (lstrlenW(pwzsRegKeyPath)+1)*sizeof(WCHAR)); - strcpyW(key, pwzsRegKeyPath); - value = strrchrW(key, '\\'); - *value = 0; - value++; - /* Now value contains the value and buffer the key */ - res = RegOpenKeyExW(HKEY_CURRENT_USER, key, 0, KEY_READ, &hKey); - if (res != ERROR_SUCCESS) { - /* if the key is not found, MSDN states we must seek in HKEY_LOCAL_MACHINE */ - res = RegOpenKeyExW(HKEY_LOCAL_MACHINE, key, 0, KEY_READ, &hKey); - } - if (res == ERROR_SUCCESS) { - res = RegQueryValueW(hKey, value, result, &len); - if (res == ERROR_SUCCESS) { - This->quickComplete = (WCHAR*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len*sizeof(WCHAR)); - strcpyW(This->quickComplete, result); - } - RegCloseKey(hKey); - } - HeapFree(GetProcessHeap(), 0, key); - } - - if ((pwszQuickComplete) && (!This->quickComplete)) { - This->quickComplete = (WCHAR*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (lstrlenW(pwszQuickComplete)+1)*sizeof(WCHAR)); - lstrcpyW(This->quickComplete, pwszQuickComplete); - } - - return S_OK; -} - -/************************************************************************** - * IAutoComplete_fnVTable - */ -static IAutoCompleteVtbl acvt = -{ - IAutoComplete_fnQueryInterface, - IAutoComplete_fnAddRef, - IAutoComplete_fnRelease, - IAutoComplete_fnInit, - IAutoComplete_fnEnable, -}; - -/************************************************************************** - * AutoComplete2_QueryInterface - */ -static HRESULT WINAPI IAutoComplete2_fnQueryInterface( - IAutoComplete2 * iface, - REFIID riid, - LPVOID *ppvObj) -{ - _ICOM_THIS_From_IAutoComplete2(IAutoCompleteImpl, iface); - - TRACE ("(%p)->(%s,%p)\n", This, shdebugstr_guid (riid), ppvObj); - - return IAutoComplete_QueryInterface((IAutoComplete*)This, riid, ppvObj); -} - -/****************************************************************************** - * IAutoComplete2_fnAddRef - */ -static ULONG WINAPI IAutoComplete2_fnAddRef( - IAutoComplete2 * iface) -{ - _ICOM_THIS_From_IAutoComplete2(IAutoCompleteImpl,iface); - - TRACE ("(%p)->(count=%lu)\n", This, This->ref); - - return IAutoComplete2_AddRef((IAutoComplete*)This); -} - -/****************************************************************************** - * IAutoComplete2_fnRelease - */ -static ULONG WINAPI IAutoComplete2_fnRelease( - IAutoComplete2 * iface) -{ - _ICOM_THIS_From_IAutoComplete2(IAutoCompleteImpl,iface); - - TRACE ("(%p)->(count=%lu)\n", This, This->ref); - - return IAutoComplete_Release((IAutoComplete*)This); -} - -/****************************************************************************** - * IAutoComplete2_fnEnable - */ -static HRESULT WINAPI IAutoComplete2_fnEnable( - IAutoComplete2 * iface, - BOOL fEnable) -{ - _ICOM_THIS_From_IAutoComplete2(IAutoCompleteImpl, iface); - - TRACE ("(%p)->(%s)\n", This, (fEnable)?"true":"false"); - - return IAutoComplete_Enable((IAutoComplete*)This, fEnable); -} - -/****************************************************************************** - * IAutoComplete2_fnInit - */ -static HRESULT WINAPI IAutoComplete2_fnInit( - IAutoComplete2 * iface, - HWND hwndEdit, - IUnknown *punkACL, - LPCOLESTR pwzsRegKeyPath, - LPCOLESTR pwszQuickComplete) -{ - _ICOM_THIS_From_IAutoComplete2(IAutoCompleteImpl, iface); - - TRACE("(%p)\n", This); - - return IAutoComplete_Init((IAutoComplete*)This, hwndEdit, punkACL, pwzsRegKeyPath, pwszQuickComplete); -} - -/************************************************************************** - * IAutoComplete_fnGetOptions - */ -static HRESULT WINAPI IAutoComplete2_fnGetOptions( - IAutoComplete2 * iface, - DWORD *pdwFlag) -{ - HRESULT hr = S_OK; - - _ICOM_THIS_From_IAutoComplete2(IAutoCompleteImpl, iface); - - TRACE("(%p) -> (%p)\n", This, pdwFlag); - - *pdwFlag = This->options; - - return hr; -} - -/************************************************************************** - * IAutoComplete_fnSetOptions - */ -static HRESULT WINAPI IAutoComplete2_fnSetOptions( - IAutoComplete2 * iface, - DWORD dwFlag) -{ - HRESULT hr = S_OK; - - _ICOM_THIS_From_IAutoComplete2(IAutoCompleteImpl, iface); - - TRACE("(%p) -> (0x%lx)\n", This, dwFlag); - - This->options = dwFlag; - - return hr; -} - -/************************************************************************** - * IAutoComplete2_fnVTable - */ -static IAutoComplete2Vtbl ac2vt = -{ - IAutoComplete2_fnQueryInterface, - IAutoComplete2_fnAddRef, - IAutoComplete2_fnRelease, - IAutoComplete2_fnInit, - IAutoComplete2_fnEnable, - /* IAutoComplete2 */ - IAutoComplete2_fnSetOptions, - IAutoComplete2_fnGetOptions, -}; - -/* - Window procedure for autocompletion - */ -static LRESULT APIENTRY ACEditSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) -{ - IAutoCompleteImpl *This = (IAutoCompleteImpl *)GetWindowLongPtrW(hwnd, GWLP_USERDATA); - LPOLESTR strs; - HRESULT hr; - WCHAR hwndText[255]; - WCHAR *hwndQCText; - RECT r; - BOOL control, filled, displayall = FALSE; - int cpt, height, sel; - - if (!This->enabled) return CallWindowProcW(This->wpOrigEditProc, hwnd, uMsg, wParam, lParam); - - switch (uMsg) - { - case CB_SHOWDROPDOWN: - ShowWindow(This->hwndListBox, SW_HIDE); - break; - case WM_KILLFOCUS: - if ((This->options && ACO_AUTOSUGGEST) && - ((HWND)wParam != This->hwndListBox)) - { - ShowWindow(This->hwndListBox, SW_HIDE); - } - break; - case WM_KEYUP: - - GetWindowTextW( hwnd, (LPWSTR)hwndText, 255); - - switch(wParam) { - case VK_RETURN: - /* If quickComplete is set and control is pressed, replace the string */ - control = GetKeyState(VK_CONTROL) & 0x8000; - if (control && This->quickComplete) { - hwndQCText = (WCHAR*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, - (lstrlenW(This->quickComplete)+lstrlenW(hwndText))*sizeof(WCHAR)); - sel = sprintfW(hwndQCText, This->quickComplete, hwndText); - SendMessageW(hwnd, WM_SETTEXT, 0, (LPARAM)hwndQCText); - SendMessageW(hwnd, EM_SETSEL, 0, sel); - HeapFree(GetProcessHeap(), 0, hwndQCText); - } - - ShowWindow(This->hwndListBox, SW_HIDE); - return 0; - case VK_LEFT: - case VK_RIGHT: - return 0; - case VK_UP: - case VK_DOWN: - /* Two cases here : - - if the listbox is not visible, displays it - with all the entries if the style ACO_UPDOWNKEYDROPSLIST - is present but does not select anything. - - if the listbox is visible, change the selection - */ - if ( (This->options & (ACO_AUTOSUGGEST | ACO_UPDOWNKEYDROPSLIST)) - && (!IsWindowVisible(This->hwndListBox) && (! *hwndText)) ) - { - /* We must dispays all the entries */ - displayall = TRUE; - } else { - if (IsWindowVisible(This->hwndListBox)) { - int count; - - count = SendMessageW(This->hwndListBox, LB_GETCOUNT, 0, 0); - /* Change the selection */ - sel = SendMessageW(This->hwndListBox, LB_GETCURSEL, 0, 0); - if (wParam == VK_UP) - sel = ((sel-1)<0)?count-1:sel-1; - else - sel = ((sel+1)>= count)?-1:sel+1; - SendMessageW(This->hwndListBox, LB_SETCURSEL, sel, 0); - if (sel != -1) { - WCHAR *msg; - int len; - - len = SendMessageW(This->hwndListBox, LB_GETTEXTLEN, sel, (LPARAM)NULL); - msg = (WCHAR*) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (len+1)*sizeof(WCHAR)); - SendMessageW(This->hwndListBox, LB_GETTEXT, sel, (LPARAM)msg); - SendMessageW(hwnd, WM_SETTEXT, 0, (LPARAM)msg); - SendMessageW(hwnd, EM_SETSEL, lstrlenW(msg), lstrlenW(msg)); - HeapFree(GetProcessHeap(), 0, msg); - } else { - SendMessageW(hwnd, WM_SETTEXT, 0, (LPARAM)This->txtbackup); - SendMessageW(hwnd, EM_SETSEL, lstrlenW(This->txtbackup), lstrlenW(This->txtbackup)); - } - } - return 0; - } - break; - case VK_BACK: - case VK_DELETE: - if ((! *hwndText) && (This->options & ACO_AUTOSUGGEST)) { - ShowWindow(This->hwndListBox, SW_HIDE); - return CallWindowProcW(This->wpOrigEditProc, hwnd, uMsg, wParam, lParam); - } - if (This->options & ACO_AUTOAPPEND) { - DWORD b; - SendMessageW(hwnd, EM_GETSEL, (WPARAM)&b, (LPARAM)NULL); - if (b>1) { - hwndText[b-1] = '\0'; - } else { - hwndText[0] = '\0'; - SetWindowTextW(hwnd, hwndText); - } - } - break; - default: - ; - } - - SendMessageW(This->hwndListBox, LB_RESETCONTENT, 0, 0); - - HeapFree(GetProcessHeap(), 0, This->txtbackup); - This->txtbackup = (WCHAR*) HeapAlloc(GetProcessHeap(), - HEAP_ZERO_MEMORY, (lstrlenW(hwndText)+1)*sizeof(WCHAR)); - lstrcpyW(This->txtbackup, hwndText); - - /* Returns if there is no text to search and we doesn't want to display all the entries */ - if ((!displayall) && (! *hwndText) ) - break; - - IEnumString_Reset(This->enumstr); - filled = FALSE; - for(cpt = 0;;) { - hr = IEnumString_Next(This->enumstr, 1, &strs, NULL); - if (hr != S_OK) - break; - - if ((LPWSTR)strstrW(strs, hwndText) == strs) { - - if (This->options & ACO_AUTOAPPEND) { - SetWindowTextW(hwnd, strs); - SendMessageW(hwnd, EM_SETSEL, lstrlenW(hwndText), lstrlenW(strs)); - break; - } - - if (This->options & ACO_AUTOSUGGEST) { - SendMessageW(This->hwndListBox, LB_ADDSTRING, 0, (LPARAM)strs); - filled = TRUE; - cpt++; - } - } - } - - if (This->options & ACO_AUTOSUGGEST) { - if (filled) { - height = SendMessageW(This->hwndListBox, LB_GETITEMHEIGHT, 0, 0); - SendMessageW(This->hwndListBox, LB_CARETOFF, 0, 0); - GetWindowRect(hwnd, &r); - SetParent(This->hwndListBox, HWND_DESKTOP); - /* It seems that Windows XP displays 7 lines at most - and otherwise displays a vertical scroll bar */ - SetWindowPos(This->hwndListBox, HWND_TOP, - r.left, r.bottom + 1, r.right - r.left, min(height * 7, height*(cpt+1)), - SWP_SHOWWINDOW ); - } else { - ShowWindow(This->hwndListBox, SW_HIDE); - } - } - - break; - default: - return CallWindowProcW(This->wpOrigEditProc, hwnd, uMsg, wParam, lParam); - - } - - return 0; -} - -static LRESULT APIENTRY ACLBoxSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) -{ - IAutoCompleteImpl *This = (IAutoCompleteImpl *)GetWindowLongPtrW(hwnd, GWLP_USERDATA); - WCHAR *msg; - int sel = -1, len; - - switch (uMsg) { - case WM_MOUSEMOVE: - sel = SendMessageW(hwnd, LB_ITEMFROMPOINT, 0, lParam); - SendMessageW(hwnd, LB_SETCURSEL, (WPARAM)sel, (LPARAM)0); - break; - case WM_LBUTTONDOWN: - len = SendMessageW(This->hwndListBox, LB_GETTEXTLEN, sel, (LPARAM)NULL); - msg = (WCHAR*) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (len+1)*sizeof(WCHAR)); - sel = (INT)SendMessageW(hwnd, LB_GETCURSEL, 0, 0); - SendMessageW(hwnd, LB_GETTEXT, sel, (LPARAM)msg); - SendMessageW(This->hwndEdit, WM_SETTEXT, 0, (LPARAM)msg); - SendMessageW(This->hwndEdit, EM_SETSEL, 0, lstrlenW(msg)); - ShowWindow(hwnd, SW_HIDE); - HeapFree(GetProcessHeap(), 0, msg); - break; - default: - return CallWindowProcW(This->wpOrigLBoxProc, hwnd, uMsg, wParam, lParam); - } - return 0; -} +/* + * AutoComplete interfaces implementation. + * + * Copyright 2004 Maxime Bellengé + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* + Implemented: + - ACO_AUTOAPPEND style + - ACO_AUTOSUGGEST style + - ACO_UPDOWNKEYDROPSLIST style + + - Handle pwzsRegKeyPath and pwszQuickComplete in Init + + TODO: + - implement ACO_SEARCH style + - implement ACO_FILTERPREFIXES style + - implement ACO_USETAB style + - implement ACO_RTLREADING style + + */ +#include "config.h" + +#include +#include +#include + +#define COBJMACROS + +#include "wine/debug.h" +#include "windef.h" +#include "winbase.h" +#include "winreg.h" +#include "undocshell.h" +#include "shlwapi.h" +#include "winerror.h" +#include "objbase.h" + +#include "pidl.h" +#include "shlguid.h" +#include "shlobj.h" +#include "shldisp.h" +#include "debughlp.h" + +#include "wine/unicode.h" + +WINE_DEFAULT_DEBUG_CHANNEL(shell); + +typedef struct +{ + IAutoCompleteVtbl *lpVtbl; + IAutoComplete2Vtbl *lpvtblAutoComplete2; + DWORD ref; + BOOL enabled; + HWND hwndEdit; + HWND hwndListBox; + WNDPROC wpOrigEditProc; + WNDPROC wpOrigLBoxProc; + WCHAR *txtbackup; + WCHAR *quickComplete; + IEnumString *enumstr; + AUTOCOMPLETEOPTIONS options; +} IAutoCompleteImpl; + +static struct IAutoCompleteVtbl acvt; +static struct IAutoComplete2Vtbl ac2vt; + +#define _IAutoComplete2_Offset ((int)(&(((IAutoCompleteImpl*)0)->lpvtblAutoComplete2))) +#define _ICOM_THIS_From_IAutoComplete2(class, name) class* This = (class*)(((char*)name)-_IAutoComplete2_Offset); + +/* + converts This to a interface pointer +*/ +#define _IUnknown_(This) (IUnknown*)&(This->lpVtbl) +#define _IAutoComplete2_(This) (IAutoComplete2*)&(This->lpvtblAutoComplete2) + +static LRESULT APIENTRY ACEditSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam); +static LRESULT APIENTRY ACLBoxSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam); + +/************************************************************************** + * IAutoComplete_Constructor + */ +HRESULT WINAPI IAutoComplete_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv) +{ + IAutoCompleteImpl *lpac; + + if (pUnkOuter && !IsEqualIID (riid, &IID_IUnknown)) + return CLASS_E_NOAGGREGATION; + + lpac = (IAutoCompleteImpl*)HeapAlloc(GetProcessHeap(), + HEAP_ZERO_MEMORY, sizeof(IAutoCompleteImpl)); + if (!lpac) + return E_OUTOFMEMORY; + + lpac->ref = 1; + lpac->lpVtbl = &acvt; + lpac->lpvtblAutoComplete2 = &ac2vt; + lpac->enabled = TRUE; + lpac->enumstr = NULL; + lpac->options = ACO_AUTOAPPEND; + lpac->wpOrigEditProc = NULL; + lpac->hwndListBox = NULL; + lpac->txtbackup = NULL; + lpac->quickComplete = NULL; + + if (!SUCCEEDED (IUnknown_QueryInterface (_IUnknown_ (lpac), riid, ppv))) { + IUnknown_Release (_IUnknown_ (lpac)); + return E_NOINTERFACE; + } + + TRACE("-- (%p)->\n",lpac); + + return S_OK; +} + +/************************************************************************** + * AutoComplete_QueryInterface + */ +static HRESULT WINAPI IAutoComplete_fnQueryInterface( + IAutoComplete * iface, + REFIID riid, + LPVOID *ppvObj) +{ + IAutoCompleteImpl *This = (IAutoCompleteImpl *)iface; + + TRACE("(%p)->(\n\tIID:\t%s,%p)\n", This, shdebugstr_guid(riid), ppvObj); + *ppvObj = NULL; + + if(IsEqualIID(riid, &IID_IUnknown)) + { + *ppvObj = This; + } + else if(IsEqualIID(riid, &IID_IAutoComplete)) + { + *ppvObj = (IAutoComplete*)This; + } + else if(IsEqualIID(riid, &IID_IAutoComplete2)) + { + *ppvObj = _IAutoComplete2_ (This); + } + + if (*ppvObj) + { + IAutoComplete_AddRef((IAutoComplete*)*ppvObj); + TRACE("-- Interface: (%p)->(%p)\n", ppvObj, *ppvObj); + return S_OK; + } + TRACE("-- Interface: E_NOINTERFACE\n"); + return E_NOINTERFACE; +} + +/****************************************************************************** + * IAutoComplete_fnAddRef + */ +static ULONG WINAPI IAutoComplete_fnAddRef( + IAutoComplete * iface) +{ + IAutoCompleteImpl *This = (IAutoCompleteImpl *)iface; + + TRACE("(%p)->(%lu)\n",This,This->ref); + return ++(This->ref); +} + +/****************************************************************************** + * IAutoComplete_fnRelease + */ +static ULONG WINAPI IAutoComplete_fnRelease( + IAutoComplete * iface) +{ + IAutoCompleteImpl *This = (IAutoCompleteImpl *)iface; + + TRACE("(%p)->(%lu)\n",This,This->ref); + + if (!--(This->ref)) { + TRACE(" destroying IAutoComplete(%p)\n",This); + HeapFree(GetProcessHeap(), 0, This->quickComplete); + HeapFree(GetProcessHeap(), 0, This->txtbackup); + if (This->hwndListBox) + DestroyWindow(This->hwndListBox); + if (This->enumstr) + IEnumString_Release(This->enumstr); + HeapFree(GetProcessHeap(), 0, This); + return 0; + } + return This->ref; +} + +/****************************************************************************** + * IAutoComplete_fnEnable + */ +static HRESULT WINAPI IAutoComplete_fnEnable( + IAutoComplete * iface, + BOOL fEnable) +{ + IAutoCompleteImpl *This = (IAutoCompleteImpl *)iface; + + HRESULT hr = S_OK; + + TRACE("(%p)->(%s)\n", This, (fEnable)?"true":"false"); + + This->enabled = fEnable; + + return hr; +} + +/****************************************************************************** + * IAutoComplete_fnInit + */ +static HRESULT WINAPI IAutoComplete_fnInit( + IAutoComplete * iface, + HWND hwndEdit, + IUnknown *punkACL, + LPCOLESTR pwzsRegKeyPath, + LPCOLESTR pwszQuickComplete) +{ + IAutoCompleteImpl *This = (IAutoCompleteImpl *)iface; + static const WCHAR lbName[] = {'L','i','s','t','B','o','x',0}; + + TRACE("(%p)->(0x%08lx, %p, %s, %s)\n", + This, (long)hwndEdit, punkACL, debugstr_w(pwzsRegKeyPath), debugstr_w(pwszQuickComplete)); + + if (This->options & ACO_AUTOSUGGEST) TRACE(" ACO_AUTOSUGGEST\n"); + if (This->options & ACO_AUTOAPPEND) TRACE(" ACO_AUTOAPPEND\n"); + if (This->options & ACO_SEARCH) FIXME(" ACO_SEARCH not supported\n"); + if (This->options & ACO_FILTERPREFIXES) FIXME(" ACO_FILTERPREFIXES not supported\n"); + if (This->options & ACO_USETAB) FIXME(" ACO_USETAB not supported\n"); + if (This->options & ACO_UPDOWNKEYDROPSLIST) TRACE(" ACO_UPDOWNKEYDROPSLIST\n"); + if (This->options & ACO_RTLREADING) FIXME(" ACO_RTLREADING not supported\n"); + + This->hwndEdit = hwndEdit; + + if (!SUCCEEDED (IUnknown_QueryInterface (punkACL, &IID_IEnumString, (LPVOID*)&This->enumstr))) { + TRACE("No IEnumString interface\n"); + return E_NOINTERFACE; + } + + This->wpOrigEditProc = (WNDPROC) SetWindowLongPtrW( hwndEdit, GWLP_WNDPROC, (LONG_PTR) ACEditSubclassProc); + SetWindowLongPtrW( hwndEdit, GWLP_USERDATA, (LONG_PTR)This); + + if (This->options & ACO_AUTOSUGGEST) { + HWND hwndParent; + + hwndParent = GetParent(This->hwndEdit); + + /* FIXME : The listbox should be resizable with the mouse. WS_THICKFRAME looks ugly */ + This->hwndListBox = CreateWindowExW(0, lbName, NULL, + WS_BORDER | WS_CHILD | WS_VSCROLL | LBS_HASSTRINGS | LBS_NOTIFY | LBS_NOINTEGRALHEIGHT, + CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, + hwndParent, NULL, + (HINSTANCE)GetWindowLongPtrW( hwndParent, GWLP_HINSTANCE ), NULL); + + if (This->hwndListBox) { + This->wpOrigLBoxProc = (WNDPROC) SetWindowLongPtrW( This->hwndListBox, GWLP_WNDPROC, (LONG_PTR) ACLBoxSubclassProc); + SetWindowLongPtrW( This->hwndListBox, GWLP_USERDATA, (LONG_PTR)This); + } + } + + if (pwzsRegKeyPath) { + WCHAR *key; + WCHAR result[MAX_PATH]; + WCHAR *value; + HKEY hKey = 0; + LONG res; + LONG len; + + /* pwszRegKeyPath contains the key as well as the value, so we split */ + key = (WCHAR*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (lstrlenW(pwzsRegKeyPath)+1)*sizeof(WCHAR)); + strcpyW(key, pwzsRegKeyPath); + value = strrchrW(key, '\\'); + *value = 0; + value++; + /* Now value contains the value and buffer the key */ + res = RegOpenKeyExW(HKEY_CURRENT_USER, key, 0, KEY_READ, &hKey); + if (res != ERROR_SUCCESS) { + /* if the key is not found, MSDN states we must seek in HKEY_LOCAL_MACHINE */ + res = RegOpenKeyExW(HKEY_LOCAL_MACHINE, key, 0, KEY_READ, &hKey); + } + if (res == ERROR_SUCCESS) { + res = RegQueryValueW(hKey, value, result, &len); + if (res == ERROR_SUCCESS) { + This->quickComplete = (WCHAR*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len*sizeof(WCHAR)); + strcpyW(This->quickComplete, result); + } + RegCloseKey(hKey); + } + HeapFree(GetProcessHeap(), 0, key); + } + + if ((pwszQuickComplete) && (!This->quickComplete)) { + This->quickComplete = (WCHAR*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (lstrlenW(pwszQuickComplete)+1)*sizeof(WCHAR)); + lstrcpyW(This->quickComplete, pwszQuickComplete); + } + + return S_OK; +} + +/************************************************************************** + * IAutoComplete_fnVTable + */ +static IAutoCompleteVtbl acvt = +{ + IAutoComplete_fnQueryInterface, + IAutoComplete_fnAddRef, + IAutoComplete_fnRelease, + IAutoComplete_fnInit, + IAutoComplete_fnEnable, +}; + +/************************************************************************** + * AutoComplete2_QueryInterface + */ +static HRESULT WINAPI IAutoComplete2_fnQueryInterface( + IAutoComplete2 * iface, + REFIID riid, + LPVOID *ppvObj) +{ + _ICOM_THIS_From_IAutoComplete2(IAutoCompleteImpl, iface); + + TRACE ("(%p)->(%s,%p)\n", This, shdebugstr_guid (riid), ppvObj); + + return IAutoComplete_QueryInterface((IAutoComplete*)This, riid, ppvObj); +} + +/****************************************************************************** + * IAutoComplete2_fnAddRef + */ +static ULONG WINAPI IAutoComplete2_fnAddRef( + IAutoComplete2 * iface) +{ + _ICOM_THIS_From_IAutoComplete2(IAutoCompleteImpl,iface); + + TRACE ("(%p)->(count=%lu)\n", This, This->ref); + + return IAutoComplete2_AddRef((IAutoComplete*)This); +} + +/****************************************************************************** + * IAutoComplete2_fnRelease + */ +static ULONG WINAPI IAutoComplete2_fnRelease( + IAutoComplete2 * iface) +{ + _ICOM_THIS_From_IAutoComplete2(IAutoCompleteImpl,iface); + + TRACE ("(%p)->(count=%lu)\n", This, This->ref); + + return IAutoComplete_Release((IAutoComplete*)This); +} + +/****************************************************************************** + * IAutoComplete2_fnEnable + */ +static HRESULT WINAPI IAutoComplete2_fnEnable( + IAutoComplete2 * iface, + BOOL fEnable) +{ + _ICOM_THIS_From_IAutoComplete2(IAutoCompleteImpl, iface); + + TRACE ("(%p)->(%s)\n", This, (fEnable)?"true":"false"); + + return IAutoComplete_Enable((IAutoComplete*)This, fEnable); +} + +/****************************************************************************** + * IAutoComplete2_fnInit + */ +static HRESULT WINAPI IAutoComplete2_fnInit( + IAutoComplete2 * iface, + HWND hwndEdit, + IUnknown *punkACL, + LPCOLESTR pwzsRegKeyPath, + LPCOLESTR pwszQuickComplete) +{ + _ICOM_THIS_From_IAutoComplete2(IAutoCompleteImpl, iface); + + TRACE("(%p)\n", This); + + return IAutoComplete_Init((IAutoComplete*)This, hwndEdit, punkACL, pwzsRegKeyPath, pwszQuickComplete); +} + +/************************************************************************** + * IAutoComplete_fnGetOptions + */ +static HRESULT WINAPI IAutoComplete2_fnGetOptions( + IAutoComplete2 * iface, + DWORD *pdwFlag) +{ + HRESULT hr = S_OK; + + _ICOM_THIS_From_IAutoComplete2(IAutoCompleteImpl, iface); + + TRACE("(%p) -> (%p)\n", This, pdwFlag); + + *pdwFlag = This->options; + + return hr; +} + +/************************************************************************** + * IAutoComplete_fnSetOptions + */ +static HRESULT WINAPI IAutoComplete2_fnSetOptions( + IAutoComplete2 * iface, + DWORD dwFlag) +{ + HRESULT hr = S_OK; + + _ICOM_THIS_From_IAutoComplete2(IAutoCompleteImpl, iface); + + TRACE("(%p) -> (0x%lx)\n", This, dwFlag); + + This->options = dwFlag; + + return hr; +} + +/************************************************************************** + * IAutoComplete2_fnVTable + */ +static IAutoComplete2Vtbl ac2vt = +{ + IAutoComplete2_fnQueryInterface, + IAutoComplete2_fnAddRef, + IAutoComplete2_fnRelease, + IAutoComplete2_fnInit, + IAutoComplete2_fnEnable, + /* IAutoComplete2 */ + IAutoComplete2_fnSetOptions, + IAutoComplete2_fnGetOptions, +}; + +/* + Window procedure for autocompletion + */ +static LRESULT APIENTRY ACEditSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + IAutoCompleteImpl *This = (IAutoCompleteImpl *)GetWindowLongPtrW(hwnd, GWLP_USERDATA); + LPOLESTR strs; + HRESULT hr; + WCHAR hwndText[255]; + WCHAR *hwndQCText; + RECT r; + BOOL control, filled, displayall = FALSE; + int cpt, height, sel; + + if (!This->enabled) return CallWindowProcW(This->wpOrigEditProc, hwnd, uMsg, wParam, lParam); + + switch (uMsg) + { + case CB_SHOWDROPDOWN: + ShowWindow(This->hwndListBox, SW_HIDE); + break; + case WM_KILLFOCUS: + if ((This->options && ACO_AUTOSUGGEST) && + ((HWND)wParam != This->hwndListBox)) + { + ShowWindow(This->hwndListBox, SW_HIDE); + } + break; + case WM_KEYUP: + + GetWindowTextW( hwnd, (LPWSTR)hwndText, 255); + + switch(wParam) { + case VK_RETURN: + /* If quickComplete is set and control is pressed, replace the string */ + control = GetKeyState(VK_CONTROL) & 0x8000; + if (control && This->quickComplete) { + hwndQCText = (WCHAR*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, + (lstrlenW(This->quickComplete)+lstrlenW(hwndText))*sizeof(WCHAR)); + sel = sprintfW(hwndQCText, This->quickComplete, hwndText); + SendMessageW(hwnd, WM_SETTEXT, 0, (LPARAM)hwndQCText); + SendMessageW(hwnd, EM_SETSEL, 0, sel); + HeapFree(GetProcessHeap(), 0, hwndQCText); + } + + ShowWindow(This->hwndListBox, SW_HIDE); + return 0; + case VK_LEFT: + case VK_RIGHT: + return 0; + case VK_UP: + case VK_DOWN: + /* Two cases here : + - if the listbox is not visible, displays it + with all the entries if the style ACO_UPDOWNKEYDROPSLIST + is present but does not select anything. + - if the listbox is visible, change the selection + */ + if ( (This->options & (ACO_AUTOSUGGEST | ACO_UPDOWNKEYDROPSLIST)) + && (!IsWindowVisible(This->hwndListBox) && (! *hwndText)) ) + { + /* We must dispays all the entries */ + displayall = TRUE; + } else { + if (IsWindowVisible(This->hwndListBox)) { + int count; + + count = SendMessageW(This->hwndListBox, LB_GETCOUNT, 0, 0); + /* Change the selection */ + sel = SendMessageW(This->hwndListBox, LB_GETCURSEL, 0, 0); + if (wParam == VK_UP) + sel = ((sel-1)<0)?count-1:sel-1; + else + sel = ((sel+1)>= count)?-1:sel+1; + SendMessageW(This->hwndListBox, LB_SETCURSEL, sel, 0); + if (sel != -1) { + WCHAR *msg; + int len; + + len = SendMessageW(This->hwndListBox, LB_GETTEXTLEN, sel, (LPARAM)NULL); + msg = (WCHAR*) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (len+1)*sizeof(WCHAR)); + SendMessageW(This->hwndListBox, LB_GETTEXT, sel, (LPARAM)msg); + SendMessageW(hwnd, WM_SETTEXT, 0, (LPARAM)msg); + SendMessageW(hwnd, EM_SETSEL, lstrlenW(msg), lstrlenW(msg)); + HeapFree(GetProcessHeap(), 0, msg); + } else { + SendMessageW(hwnd, WM_SETTEXT, 0, (LPARAM)This->txtbackup); + SendMessageW(hwnd, EM_SETSEL, lstrlenW(This->txtbackup), lstrlenW(This->txtbackup)); + } + } + return 0; + } + break; + case VK_BACK: + case VK_DELETE: + if ((! *hwndText) && (This->options & ACO_AUTOSUGGEST)) { + ShowWindow(This->hwndListBox, SW_HIDE); + return CallWindowProcW(This->wpOrigEditProc, hwnd, uMsg, wParam, lParam); + } + if (This->options & ACO_AUTOAPPEND) { + DWORD b; + SendMessageW(hwnd, EM_GETSEL, (WPARAM)&b, (LPARAM)NULL); + if (b>1) { + hwndText[b-1] = '\0'; + } else { + hwndText[0] = '\0'; + SetWindowTextW(hwnd, hwndText); + } + } + break; + default: + ; + } + + SendMessageW(This->hwndListBox, LB_RESETCONTENT, 0, 0); + + HeapFree(GetProcessHeap(), 0, This->txtbackup); + This->txtbackup = (WCHAR*) HeapAlloc(GetProcessHeap(), + HEAP_ZERO_MEMORY, (lstrlenW(hwndText)+1)*sizeof(WCHAR)); + lstrcpyW(This->txtbackup, hwndText); + + /* Returns if there is no text to search and we doesn't want to display all the entries */ + if ((!displayall) && (! *hwndText) ) + break; + + IEnumString_Reset(This->enumstr); + filled = FALSE; + for(cpt = 0;;) { + hr = IEnumString_Next(This->enumstr, 1, &strs, NULL); + if (hr != S_OK) + break; + + if ((LPWSTR)strstrW(strs, hwndText) == strs) { + + if (This->options & ACO_AUTOAPPEND) { + SetWindowTextW(hwnd, strs); + SendMessageW(hwnd, EM_SETSEL, lstrlenW(hwndText), lstrlenW(strs)); + break; + } + + if (This->options & ACO_AUTOSUGGEST) { + SendMessageW(This->hwndListBox, LB_ADDSTRING, 0, (LPARAM)strs); + filled = TRUE; + cpt++; + } + } + } + + if (This->options & ACO_AUTOSUGGEST) { + if (filled) { + height = SendMessageW(This->hwndListBox, LB_GETITEMHEIGHT, 0, 0); + SendMessageW(This->hwndListBox, LB_CARETOFF, 0, 0); + GetWindowRect(hwnd, &r); + SetParent(This->hwndListBox, HWND_DESKTOP); + /* It seems that Windows XP displays 7 lines at most + and otherwise displays a vertical scroll bar */ + SetWindowPos(This->hwndListBox, HWND_TOP, + r.left, r.bottom + 1, r.right - r.left, min(height * 7, height*(cpt+1)), + SWP_SHOWWINDOW ); + } else { + ShowWindow(This->hwndListBox, SW_HIDE); + } + } + + break; + default: + return CallWindowProcW(This->wpOrigEditProc, hwnd, uMsg, wParam, lParam); + + } + + return 0; +} + +static LRESULT APIENTRY ACLBoxSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + IAutoCompleteImpl *This = (IAutoCompleteImpl *)GetWindowLongPtrW(hwnd, GWLP_USERDATA); + WCHAR *msg; + int sel = -1, len; + + switch (uMsg) { + case WM_MOUSEMOVE: + sel = SendMessageW(hwnd, LB_ITEMFROMPOINT, 0, lParam); + SendMessageW(hwnd, LB_SETCURSEL, (WPARAM)sel, (LPARAM)0); + break; + case WM_LBUTTONDOWN: + len = SendMessageW(This->hwndListBox, LB_GETTEXTLEN, sel, (LPARAM)NULL); + msg = (WCHAR*) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (len+1)*sizeof(WCHAR)); + sel = (INT)SendMessageW(hwnd, LB_GETCURSEL, 0, 0); + SendMessageW(hwnd, LB_GETTEXT, sel, (LPARAM)msg); + SendMessageW(This->hwndEdit, WM_SETTEXT, 0, (LPARAM)msg); + SendMessageW(This->hwndEdit, EM_SETSEL, 0, lstrlenW(msg)); + ShowWindow(hwnd, SW_HIDE); + HeapFree(GetProcessHeap(), 0, msg); + break; + default: + return CallWindowProcW(This->wpOrigLBoxProc, hwnd, uMsg, wParam, lParam); + } + return 0; +} diff --git a/reactos/lib/shell32/brsfolder.c b/reactos/lib/shell32/brsfolder.c index a4786ced83d..198c18d40f8 100644 --- a/reactos/lib/shell32/brsfolder.c +++ b/reactos/lib/shell32/brsfolder.c @@ -1,517 +1,517 @@ -/* - * Copyright 1999 Juergen Schmied - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * FIXME: - * - many memory leaks - * - many flags unimplemented - */ - -#include -#include - -#define COBJMACROS -#define NONAMELESSUNION -#define NONAMELESSSTRUCT - -#include "wine/debug.h" -#include "undocshell.h" -#include "shlguid.h" -#include "pidl.h" -#include "shell32_main.h" -#include "shellapi.h" -#include "shresdef.h" - -WINE_DEFAULT_DEBUG_CHANNEL(shell); - -static HWND hwndTreeView; -static LPBROWSEINFOW lpBrowseInfo; -static LPITEMIDLIST pidlRet; - -static void FillTreeView(LPSHELLFOLDER lpsf, LPITEMIDLIST lpifq, HTREEITEM hParent, IEnumIDList* lpe); -static HTREEITEM InsertTreeViewItem(IShellFolder * lpsf, LPCITEMIDLIST pidl, LPCITEMIDLIST pidlParent, IEnumIDList* pEnumIL, HTREEITEM hParent); - -#define SUPPORTEDFLAGS (BIF_STATUSTEXT | \ - BIF_BROWSEFORCOMPUTER | \ - BIF_RETURNFSANCESTORS | \ - BIF_RETURNONLYFSDIRS | \ - BIF_BROWSEINCLUDEFILES) - -static inline DWORD BrowseFlagsToSHCONTF(UINT ulFlags) -{ - return SHCONTF_FOLDERS | (ulFlags & BIF_BROWSEINCLUDEFILES ? SHCONTF_NONFOLDERS : 0); -} - -static void InitializeTreeView(HWND hwndParent, LPCITEMIDLIST root) -{ - HIMAGELIST hImageList; - IShellFolder * lpsf; - HRESULT hr; - IEnumIDList * pEnumIL = NULL; - LPITEMIDLIST parentofroot; - parentofroot = ILClone(root); - ILRemoveLastID(parentofroot); - - hwndTreeView = GetDlgItem (hwndParent, IDD_TREEVIEW); - Shell_GetImageList(NULL, &hImageList); - - TRACE("dlg=%p tree=%p\n", hwndParent, hwndTreeView ); - - if (hImageList && hwndTreeView) - TreeView_SetImageList(hwndTreeView, hImageList, 0); - - if (_ILIsDesktop (root)) { - hr = SHGetDesktopFolder(&lpsf); - } else { - IShellFolder * lpsfdesktop; - - hr = SHGetDesktopFolder(&lpsfdesktop); - if (SUCCEEDED(hr)) { - hr = IShellFolder_BindToObject(lpsfdesktop, parentofroot, 0,(REFIID)&IID_IShellFolder,(LPVOID *)&lpsf); - IShellFolder_Release(lpsfdesktop); - } - } - if (SUCCEEDED(hr)) - { - IShellFolder * pSFRoot; - if (_ILIsPidlSimple(root)) - { - pSFRoot = lpsf; - IShellFolder_AddRef(pSFRoot); - } - else - hr = IShellFolder_BindToObject(lpsf,ILFindLastID(root),0,&IID_IShellFolder,(LPVOID *)&pSFRoot); - if (SUCCEEDED(hr)) - { - hr = IShellFolder_EnumObjects( - pSFRoot, - hwndParent, - BrowseFlagsToSHCONTF(lpBrowseInfo->ulFlags), - &pEnumIL); - IShellFolder_Release(pSFRoot); - } - } - - if (SUCCEEDED(hr) && hwndTreeView) - { - TreeView_DeleteAllItems(hwndTreeView); - TreeView_Expand(hwndTreeView, - InsertTreeViewItem(lpsf, _ILIsPidlSimple(root) ? root : ILFindLastID(root), parentofroot, pEnumIL, TVI_ROOT), - TVE_EXPAND); - } - - if (SUCCEEDED(hr)) - IShellFolder_Release(lpsf); - - TRACE("done\n"); -} - -static int GetIcon(LPITEMIDLIST lpi, UINT uFlags) -{ - SHFILEINFOW sfi; - SHGetFileInfoW((LPCWSTR)lpi, 0 ,&sfi, sizeof(SHFILEINFOW), uFlags); - return sfi.iIcon; -} - -static void GetNormalAndSelectedIcons(LPITEMIDLIST lpifq, LPTVITEMW lpTV_ITEM) -{ - LPITEMIDLIST pidlDesktop = NULL; - - TRACE("%p %p\n",lpifq, lpTV_ITEM); - - if (!lpifq) - { - pidlDesktop = _ILCreateDesktop(); - lpifq = pidlDesktop; - } - - lpTV_ITEM->iImage = GetIcon(lpifq, SHGFI_PIDL | SHGFI_SYSICONINDEX | SHGFI_SMALLICON); - lpTV_ITEM->iSelectedImage = GetIcon(lpifq, SHGFI_PIDL | SHGFI_SYSICONINDEX | SHGFI_SMALLICON | SHGFI_OPENICON); - - if (pidlDesktop) - ILFree(pidlDesktop); - - return; -} - -typedef struct tagID -{ - LPSHELLFOLDER lpsfParent; - LPITEMIDLIST lpi; - LPITEMIDLIST lpifq; - IEnumIDList* pEnumIL; -} TV_ITEMDATA, *LPTV_ITEMDATA; - -static BOOL GetName(LPSHELLFOLDER lpsf, LPCITEMIDLIST lpi, DWORD dwFlags, LPWSTR lpFriendlyName) -{ - BOOL bSuccess=TRUE; - STRRET str; - - TRACE("%p %p %lx %p\n", lpsf, lpi, dwFlags, lpFriendlyName); - if (SUCCEEDED(IShellFolder_GetDisplayNameOf(lpsf, lpi, dwFlags, &str))) - { - if (FAILED(StrRetToStrNW(lpFriendlyName, MAX_PATH, &str, lpi))) - { - bSuccess = FALSE; - } - } - else - bSuccess = FALSE; - - TRACE("-- %s\n", debugstr_w(lpFriendlyName)); - return bSuccess; -} - -static HTREEITEM InsertTreeViewItem(IShellFolder * lpsf, LPCITEMIDLIST pidl, LPCITEMIDLIST pidlParent, IEnumIDList* pEnumIL, HTREEITEM hParent) -{ - TVITEMW tvi; - TVINSERTSTRUCTW tvins; - WCHAR szBuff[MAX_PATH]; - LPTV_ITEMDATA lptvid=0; - - tvi.mask = TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_PARAM; - - tvi.cChildren= pEnumIL ? 1 : 0; - tvi.mask |= TVIF_CHILDREN; - - if (!(lptvid = (LPTV_ITEMDATA)SHAlloc(sizeof(TV_ITEMDATA)))) - return NULL; - - if (!GetName(lpsf, pidl, SHGDN_NORMAL, szBuff)) - return NULL; - - tvi.pszText = szBuff; - tvi.cchTextMax = MAX_PATH; - tvi.lParam = (LPARAM)lptvid; - - IShellFolder_AddRef(lpsf); - lptvid->lpsfParent = lpsf; - lptvid->lpi = ILClone(pidl); - lptvid->lpifq = pidlParent ? ILCombine(pidlParent, pidl) : ILClone(pidl); - lptvid->pEnumIL = pEnumIL; - GetNormalAndSelectedIcons(lptvid->lpifq, &tvi); - - tvins.u.item = tvi; - tvins.hInsertAfter = NULL; - tvins.hParent = hParent; - - return (HTREEITEM)TreeView_InsertItemW(hwndTreeView, &tvins); -} - -static void FillTreeView(IShellFolder * lpsf, LPITEMIDLIST pidl, HTREEITEM hParent, IEnumIDList* lpe) -{ - HTREEITEM hPrev = 0; - LPITEMIDLIST pidlTemp = 0; - ULONG ulFetched; - HRESULT hr; - HWND hwnd=GetParent(hwndTreeView); - - TRACE("%p %p %x\n",lpsf, pidl, (INT)hParent); - SetCapture(GetParent(hwndTreeView)); - SetCursor(LoadCursorA(0, (LPSTR)IDC_WAIT)); - - while (NOERROR == IEnumIDList_Next(lpe,1,&pidlTemp,&ulFetched)) - { - ULONG ulAttrs = SFGAO_HASSUBFOLDER | SFGAO_FOLDER; - IEnumIDList* pEnumIL = NULL; - IShellFolder* pSFChild = NULL; - IShellFolder_GetAttributesOf(lpsf, 1, (LPCITEMIDLIST*)&pidlTemp, &ulAttrs); - if (ulAttrs & SFGAO_FOLDER) - { - hr = IShellFolder_BindToObject(lpsf,pidlTemp,NULL,&IID_IShellFolder,(LPVOID*)&pSFChild); - if (SUCCEEDED(hr)) - { - hr = IShellFolder_EnumObjects(pSFChild, hwnd, BrowseFlagsToSHCONTF(lpBrowseInfo->ulFlags), &pEnumIL); - if (SUCCEEDED(hr)) - { - if ((IEnumIDList_Skip(pEnumIL, 1) != S_OK) || FAILED(IEnumIDList_Reset(pEnumIL))) - { - IEnumIDList_Release(pEnumIL); - pEnumIL = NULL; - } - } - IShellFolder_Release(pSFChild); - } - } - - if (!(hPrev = InsertTreeViewItem(lpsf, pidlTemp, pidl, pEnumIL, hParent))) - goto Done; - SHFree(pidlTemp); /* Finally, free the pidl that the shell gave us... */ - pidlTemp=NULL; - } - -Done: - ReleaseCapture(); - SetCursor(LoadCursorW(0, (LPWSTR)IDC_ARROW)); - - if (pidlTemp) - SHFree(pidlTemp); -} - -static inline BOOL PIDLIsType(LPCITEMIDLIST pidl, PIDLTYPE type) -{ - LPPIDLDATA data = _ILGetDataPointer(pidl); - if (!data) - return FALSE; - return (data->type == type); -} - -static void BrsFolder_CheckValidSelection(HWND hWndTree, LPTV_ITEMDATA lptvid) -{ - LPCITEMIDLIST pidl = lptvid->lpi; - BOOL bEnabled = TRUE; - DWORD dwAttributes; - if ((lpBrowseInfo->ulFlags & BIF_BROWSEFORCOMPUTER) && - !PIDLIsType(pidl, PT_COMP)) - bEnabled = FALSE; - if (lpBrowseInfo->ulFlags & BIF_RETURNFSANCESTORS) - { - dwAttributes = SFGAO_FILESYSANCESTOR | SFGAO_FILESYSTEM; - if (FAILED(IShellFolder_GetAttributesOf(lptvid->lpsfParent, 1, (LPCITEMIDLIST*)&lptvid->lpi, &dwAttributes)) || - !dwAttributes) - bEnabled = FALSE; - } - if (lpBrowseInfo->ulFlags & BIF_RETURNONLYFSDIRS) - { - dwAttributes = SFGAO_FOLDER | SFGAO_FILESYSTEM; - if (FAILED(IShellFolder_GetAttributesOf(lptvid->lpsfParent, 1, (LPCITEMIDLIST*)&lptvid->lpi, &dwAttributes)) || - (dwAttributes != (SFGAO_FOLDER | SFGAO_FILESYSTEM))) - bEnabled = FALSE; - } - SendMessageW(hWndTree, BFFM_ENABLEOK, 0, (LPARAM)bEnabled); -} - -static LRESULT MsgNotify(HWND hWnd, UINT CtlID, LPNMHDR lpnmh) -{ - NMTREEVIEWW *pnmtv = (NMTREEVIEWW *)lpnmh; - LPTV_ITEMDATA lptvid; /* Long pointer to TreeView item data */ - IShellFolder * lpsf2=0; - - - TRACE("%p %x %p msg=%x\n", hWnd, CtlID, lpnmh, pnmtv->hdr.code); - - switch (pnmtv->hdr.idFrom) - { case IDD_TREEVIEW: - switch (pnmtv->hdr.code) - { - case TVN_DELETEITEMA: - case TVN_DELETEITEMW: - TRACE("TVN_DELETEITEMA/W\n"); - lptvid=(LPTV_ITEMDATA)pnmtv->itemOld.lParam; - IShellFolder_Release(lptvid->lpsfParent); - if (lptvid->pEnumIL) - IEnumIDList_Release(lptvid->pEnumIL); - SHFree(lptvid->lpi); - SHFree(lptvid->lpifq); - SHFree(lptvid); - break; - - case TVN_ITEMEXPANDINGA: - case TVN_ITEMEXPANDINGW: - { - TRACE("TVN_ITEMEXPANDINGA/W\n"); - if ((pnmtv->itemNew.state & TVIS_EXPANDEDONCE)) - break; - - lptvid=(LPTV_ITEMDATA)pnmtv->itemNew.lParam; - if (SUCCEEDED(IShellFolder_BindToObject(lptvid->lpsfParent, lptvid->lpi,0,(REFIID)&IID_IShellFolder,(LPVOID *)&lpsf2))) - { FillTreeView( lpsf2, lptvid->lpifq, pnmtv->itemNew.hItem, lptvid->pEnumIL); - } - /* My Computer is already sorted and trying to do a simple text - * sort will only mess things up */ - if (!_ILIsMyComputer(lptvid->lpi)) - TreeView_SortChildren(hwndTreeView, pnmtv->itemNew.hItem, FALSE); - } - break; - case TVN_SELCHANGEDA: - case TVN_SELCHANGEDW: - lptvid=(LPTV_ITEMDATA)pnmtv->itemNew.lParam; - pidlRet = lptvid->lpifq; - if (lpBrowseInfo->lpfn) - (lpBrowseInfo->lpfn)(hWnd, BFFM_SELCHANGED, (LPARAM)pidlRet, lpBrowseInfo->lParam); - BrsFolder_CheckValidSelection(hWnd, lptvid); - break; - - default: - WARN("unhandled (%d)\n", pnmtv->hdr.code); - break; - } - break; - - default: - break; - } - - return 0; -} - - -/************************************************************************* - * BrsFolderDlgProc32 (not an exported API function) - */ -static INT_PTR CALLBACK BrsFolderDlgProc(HWND hWnd, UINT msg, WPARAM wParam, - LPARAM lParam ) -{ - TRACE("hwnd=%p msg=%04x 0x%08x 0x%08lx\n", hWnd, msg, wParam, lParam ); - - switch(msg) - { case WM_INITDIALOG: - pidlRet = NULL; - lpBrowseInfo = (LPBROWSEINFOW) lParam; - if (lpBrowseInfo->ulFlags & ~SUPPORTEDFLAGS) - FIXME("flags %x not implemented\n", lpBrowseInfo->ulFlags & ~SUPPORTEDFLAGS); - if (lpBrowseInfo->lpszTitle) { - SetWindowTextW(GetDlgItem(hWnd, IDD_TITLE), lpBrowseInfo->lpszTitle); - } else { - ShowWindow(GetDlgItem(hWnd, IDD_TITLE), SW_HIDE); - } - if (!(lpBrowseInfo->ulFlags & BIF_STATUSTEXT)) - ShowWindow(GetDlgItem(hWnd, IDD_STATUS), SW_HIDE); - - InitializeTreeView(hWnd, lpBrowseInfo->pidlRoot); - - if (lpBrowseInfo->lpfn) - (lpBrowseInfo->lpfn)(hWnd, BFFM_INITIALIZED, 0, lpBrowseInfo->lParam); - - return TRUE; - - case WM_NOTIFY: - MsgNotify( hWnd, (UINT)wParam, (LPNMHDR)lParam); - break; - - case WM_COMMAND: - switch (wParam) - { case IDOK: - pdump ( pidlRet ); - if (lpBrowseInfo->pszDisplayName) - SHGetPathFromIDListW(pidlRet, lpBrowseInfo->pszDisplayName); - EndDialog(hWnd, (DWORD) ILClone(pidlRet)); - return TRUE; - - case IDCANCEL: - EndDialog(hWnd, 0); - return TRUE; - } - break; - case BFFM_SETSTATUSTEXTA: - TRACE("Set status %s\n", debugstr_a((LPSTR)lParam)); - SetWindowTextA(GetDlgItem(hWnd, IDD_STATUS), (LPSTR)lParam); - break; - case BFFM_SETSTATUSTEXTW: - TRACE("Set status %s\n", debugstr_w((LPWSTR)lParam)); - SetWindowTextW(GetDlgItem(hWnd, IDD_STATUS), (LPWSTR)lParam); - break; - case BFFM_ENABLEOK: - TRACE("Enable %ld\n", lParam); - EnableWindow(GetDlgItem(hWnd, 1), (lParam)?TRUE:FALSE); - break; - case BFFM_SETOKTEXT: /* unicode only */ - TRACE("Set OK text %s\n", debugstr_w((LPWSTR)wParam)); - SetWindowTextW(GetDlgItem(hWnd, 1), (LPWSTR)wParam); - break; - case BFFM_SETSELECTIONA: - if (wParam) - FIXME("Set selection %s\n", debugstr_a((LPSTR)lParam)); - else - FIXME("Set selection %p\n", (void*)lParam); - break; - case BFFM_SETSELECTIONW: - if (wParam) - FIXME("Set selection %s\n", debugstr_w((LPWSTR)lParam)); - else - FIXME("Set selection %p\n", (void*)lParam); - break; - case BFFM_SETEXPANDED: /* unicode only */ - if (wParam) - FIXME("Set expanded %s\n", debugstr_w((LPWSTR)lParam)); - else - FIXME("Set expanded %p\n", (void*)lParam); - break; - } - return FALSE; -} - -static const WCHAR swBrowseTempName[] = {'S','H','B','R','S','F','O','R','F','O','L','D','E','R','_','M','S','G','B','O','X',0}; - -/************************************************************************* - * SHBrowseForFolderA [SHELL32.@] - * SHBrowseForFolder [SHELL32.@] - */ -LPITEMIDLIST WINAPI SHBrowseForFolderA (LPBROWSEINFOA lpbi) -{ - BROWSEINFOW bi; - LPITEMIDLIST lpid; - INT len; - - TRACE("(%p{lpszTitle=%s,owner=%p})\n", lpbi, - lpbi ? debugstr_a(lpbi->lpszTitle) : NULL, lpbi ? lpbi->hwndOwner : NULL); - - if (!lpbi) - return NULL; - - bi.hwndOwner = lpbi->hwndOwner; - bi.pidlRoot = lpbi->pidlRoot; - if (lpbi->pszDisplayName) - { - /*lpbi->pszDisplayName is assumed to be MAX_PATH (MSDN) */ - bi.pszDisplayName = HeapAlloc(GetProcessHeap(), 0, MAX_PATH * sizeof(WCHAR)); - MultiByteToWideChar(CP_ACP, 0, lpbi->pszDisplayName, -1, bi.pszDisplayName, MAX_PATH); - } - else - bi.pszDisplayName = NULL; - - if (lpbi->lpszTitle) - { - len = MultiByteToWideChar(CP_ACP, 0, lpbi->lpszTitle, -1, NULL, 0); - bi.lpszTitle = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); - MultiByteToWideChar(CP_ACP, 0, lpbi->lpszTitle, -1, (LPWSTR)bi.lpszTitle, len); - } - else - bi.lpszTitle = NULL; - - bi.ulFlags = lpbi->ulFlags; - bi.lpfn = lpbi->lpfn; - bi.lParam = lpbi->lParam; - bi.iImage = lpbi->iImage; - lpid = (LPITEMIDLIST) DialogBoxParamW(shell32_hInstance, - swBrowseTempName, lpbi->hwndOwner, - BrsFolderDlgProc, (INT)&bi); - if (bi.pszDisplayName) - { - WideCharToMultiByte(CP_ACP, 0, bi.pszDisplayName, -1, lpbi->pszDisplayName, MAX_PATH, 0, NULL); - HeapFree(GetProcessHeap(), 0, bi.pszDisplayName); - } - HeapFree(GetProcessHeap(), 0, (LPVOID)bi.lpszTitle); - lpbi->iImage = bi.iImage; - return lpid; -} - - -/************************************************************************* - * SHBrowseForFolderW [SHELL32.@] - */ -LPITEMIDLIST WINAPI SHBrowseForFolderW (LPBROWSEINFOW lpbi) -{ - TRACE("((%p->{lpszTitle=%s,owner=%p})\n", lpbi, - lpbi ? debugstr_w(lpbi->lpszTitle) : NULL, lpbi ? lpbi->hwndOwner : 0); - - if (!lpbi) - return NULL; - - return (LPITEMIDLIST) DialogBoxParamW(shell32_hInstance, - swBrowseTempName, lpbi->hwndOwner, - BrsFolderDlgProc, (INT)lpbi); -} +/* + * Copyright 1999 Juergen Schmied + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * FIXME: + * - many memory leaks + * - many flags unimplemented + */ + +#include +#include + +#define COBJMACROS +#define NONAMELESSUNION +#define NONAMELESSSTRUCT + +#include "wine/debug.h" +#include "undocshell.h" +#include "shlguid.h" +#include "pidl.h" +#include "shell32_main.h" +#include "shellapi.h" +#include "shresdef.h" + +WINE_DEFAULT_DEBUG_CHANNEL(shell); + +static HWND hwndTreeView; +static LPBROWSEINFOW lpBrowseInfo; +static LPITEMIDLIST pidlRet; + +static void FillTreeView(LPSHELLFOLDER lpsf, LPITEMIDLIST lpifq, HTREEITEM hParent, IEnumIDList* lpe); +static HTREEITEM InsertTreeViewItem(IShellFolder * lpsf, LPCITEMIDLIST pidl, LPCITEMIDLIST pidlParent, IEnumIDList* pEnumIL, HTREEITEM hParent); + +#define SUPPORTEDFLAGS (BIF_STATUSTEXT | \ + BIF_BROWSEFORCOMPUTER | \ + BIF_RETURNFSANCESTORS | \ + BIF_RETURNONLYFSDIRS | \ + BIF_BROWSEINCLUDEFILES) + +static inline DWORD BrowseFlagsToSHCONTF(UINT ulFlags) +{ + return SHCONTF_FOLDERS | (ulFlags & BIF_BROWSEINCLUDEFILES ? SHCONTF_NONFOLDERS : 0); +} + +static void InitializeTreeView(HWND hwndParent, LPCITEMIDLIST root) +{ + HIMAGELIST hImageList; + IShellFolder * lpsf; + HRESULT hr; + IEnumIDList * pEnumIL = NULL; + LPITEMIDLIST parentofroot; + parentofroot = ILClone(root); + ILRemoveLastID(parentofroot); + + hwndTreeView = GetDlgItem (hwndParent, IDD_TREEVIEW); + Shell_GetImageList(NULL, &hImageList); + + TRACE("dlg=%p tree=%p\n", hwndParent, hwndTreeView ); + + if (hImageList && hwndTreeView) + TreeView_SetImageList(hwndTreeView, hImageList, 0); + + if (_ILIsDesktop (root)) { + hr = SHGetDesktopFolder(&lpsf); + } else { + IShellFolder * lpsfdesktop; + + hr = SHGetDesktopFolder(&lpsfdesktop); + if (SUCCEEDED(hr)) { + hr = IShellFolder_BindToObject(lpsfdesktop, parentofroot, 0,(REFIID)&IID_IShellFolder,(LPVOID *)&lpsf); + IShellFolder_Release(lpsfdesktop); + } + } + if (SUCCEEDED(hr)) + { + IShellFolder * pSFRoot; + if (_ILIsPidlSimple(root)) + { + pSFRoot = lpsf; + IShellFolder_AddRef(pSFRoot); + } + else + hr = IShellFolder_BindToObject(lpsf,ILFindLastID(root),0,&IID_IShellFolder,(LPVOID *)&pSFRoot); + if (SUCCEEDED(hr)) + { + hr = IShellFolder_EnumObjects( + pSFRoot, + hwndParent, + BrowseFlagsToSHCONTF(lpBrowseInfo->ulFlags), + &pEnumIL); + IShellFolder_Release(pSFRoot); + } + } + + if (SUCCEEDED(hr) && hwndTreeView) + { + TreeView_DeleteAllItems(hwndTreeView); + TreeView_Expand(hwndTreeView, + InsertTreeViewItem(lpsf, _ILIsPidlSimple(root) ? root : ILFindLastID(root), parentofroot, pEnumIL, TVI_ROOT), + TVE_EXPAND); + } + + if (SUCCEEDED(hr)) + IShellFolder_Release(lpsf); + + TRACE("done\n"); +} + +static int GetIcon(LPITEMIDLIST lpi, UINT uFlags) +{ + SHFILEINFOW sfi; + SHGetFileInfoW((LPCWSTR)lpi, 0 ,&sfi, sizeof(SHFILEINFOW), uFlags); + return sfi.iIcon; +} + +static void GetNormalAndSelectedIcons(LPITEMIDLIST lpifq, LPTVITEMW lpTV_ITEM) +{ + LPITEMIDLIST pidlDesktop = NULL; + + TRACE("%p %p\n",lpifq, lpTV_ITEM); + + if (!lpifq) + { + pidlDesktop = _ILCreateDesktop(); + lpifq = pidlDesktop; + } + + lpTV_ITEM->iImage = GetIcon(lpifq, SHGFI_PIDL | SHGFI_SYSICONINDEX | SHGFI_SMALLICON); + lpTV_ITEM->iSelectedImage = GetIcon(lpifq, SHGFI_PIDL | SHGFI_SYSICONINDEX | SHGFI_SMALLICON | SHGFI_OPENICON); + + if (pidlDesktop) + ILFree(pidlDesktop); + + return; +} + +typedef struct tagID +{ + LPSHELLFOLDER lpsfParent; + LPITEMIDLIST lpi; + LPITEMIDLIST lpifq; + IEnumIDList* pEnumIL; +} TV_ITEMDATA, *LPTV_ITEMDATA; + +static BOOL GetName(LPSHELLFOLDER lpsf, LPCITEMIDLIST lpi, DWORD dwFlags, LPWSTR lpFriendlyName) +{ + BOOL bSuccess=TRUE; + STRRET str; + + TRACE("%p %p %lx %p\n", lpsf, lpi, dwFlags, lpFriendlyName); + if (SUCCEEDED(IShellFolder_GetDisplayNameOf(lpsf, lpi, dwFlags, &str))) + { + if (FAILED(StrRetToStrNW(lpFriendlyName, MAX_PATH, &str, lpi))) + { + bSuccess = FALSE; + } + } + else + bSuccess = FALSE; + + TRACE("-- %s\n", debugstr_w(lpFriendlyName)); + return bSuccess; +} + +static HTREEITEM InsertTreeViewItem(IShellFolder * lpsf, LPCITEMIDLIST pidl, LPCITEMIDLIST pidlParent, IEnumIDList* pEnumIL, HTREEITEM hParent) +{ + TVITEMW tvi; + TVINSERTSTRUCTW tvins; + WCHAR szBuff[MAX_PATH]; + LPTV_ITEMDATA lptvid=0; + + tvi.mask = TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_PARAM; + + tvi.cChildren= pEnumIL ? 1 : 0; + tvi.mask |= TVIF_CHILDREN; + + if (!(lptvid = (LPTV_ITEMDATA)SHAlloc(sizeof(TV_ITEMDATA)))) + return NULL; + + if (!GetName(lpsf, pidl, SHGDN_NORMAL, szBuff)) + return NULL; + + tvi.pszText = szBuff; + tvi.cchTextMax = MAX_PATH; + tvi.lParam = (LPARAM)lptvid; + + IShellFolder_AddRef(lpsf); + lptvid->lpsfParent = lpsf; + lptvid->lpi = ILClone(pidl); + lptvid->lpifq = pidlParent ? ILCombine(pidlParent, pidl) : ILClone(pidl); + lptvid->pEnumIL = pEnumIL; + GetNormalAndSelectedIcons(lptvid->lpifq, &tvi); + + tvins.u.item = tvi; + tvins.hInsertAfter = NULL; + tvins.hParent = hParent; + + return (HTREEITEM)TreeView_InsertItemW(hwndTreeView, &tvins); +} + +static void FillTreeView(IShellFolder * lpsf, LPITEMIDLIST pidl, HTREEITEM hParent, IEnumIDList* lpe) +{ + HTREEITEM hPrev = 0; + LPITEMIDLIST pidlTemp = 0; + ULONG ulFetched; + HRESULT hr; + HWND hwnd=GetParent(hwndTreeView); + + TRACE("%p %p %x\n",lpsf, pidl, (INT)hParent); + SetCapture(GetParent(hwndTreeView)); + SetCursor(LoadCursorA(0, (LPSTR)IDC_WAIT)); + + while (NOERROR == IEnumIDList_Next(lpe,1,&pidlTemp,&ulFetched)) + { + ULONG ulAttrs = SFGAO_HASSUBFOLDER | SFGAO_FOLDER; + IEnumIDList* pEnumIL = NULL; + IShellFolder* pSFChild = NULL; + IShellFolder_GetAttributesOf(lpsf, 1, (LPCITEMIDLIST*)&pidlTemp, &ulAttrs); + if (ulAttrs & SFGAO_FOLDER) + { + hr = IShellFolder_BindToObject(lpsf,pidlTemp,NULL,&IID_IShellFolder,(LPVOID*)&pSFChild); + if (SUCCEEDED(hr)) + { + hr = IShellFolder_EnumObjects(pSFChild, hwnd, BrowseFlagsToSHCONTF(lpBrowseInfo->ulFlags), &pEnumIL); + if (SUCCEEDED(hr)) + { + if ((IEnumIDList_Skip(pEnumIL, 1) != S_OK) || FAILED(IEnumIDList_Reset(pEnumIL))) + { + IEnumIDList_Release(pEnumIL); + pEnumIL = NULL; + } + } + IShellFolder_Release(pSFChild); + } + } + + if (!(hPrev = InsertTreeViewItem(lpsf, pidlTemp, pidl, pEnumIL, hParent))) + goto Done; + SHFree(pidlTemp); /* Finally, free the pidl that the shell gave us... */ + pidlTemp=NULL; + } + +Done: + ReleaseCapture(); + SetCursor(LoadCursorW(0, (LPWSTR)IDC_ARROW)); + + if (pidlTemp) + SHFree(pidlTemp); +} + +static inline BOOL PIDLIsType(LPCITEMIDLIST pidl, PIDLTYPE type) +{ + LPPIDLDATA data = _ILGetDataPointer(pidl); + if (!data) + return FALSE; + return (data->type == type); +} + +static void BrsFolder_CheckValidSelection(HWND hWndTree, LPTV_ITEMDATA lptvid) +{ + LPCITEMIDLIST pidl = lptvid->lpi; + BOOL bEnabled = TRUE; + DWORD dwAttributes; + if ((lpBrowseInfo->ulFlags & BIF_BROWSEFORCOMPUTER) && + !PIDLIsType(pidl, PT_COMP)) + bEnabled = FALSE; + if (lpBrowseInfo->ulFlags & BIF_RETURNFSANCESTORS) + { + dwAttributes = SFGAO_FILESYSANCESTOR | SFGAO_FILESYSTEM; + if (FAILED(IShellFolder_GetAttributesOf(lptvid->lpsfParent, 1, (LPCITEMIDLIST*)&lptvid->lpi, &dwAttributes)) || + !dwAttributes) + bEnabled = FALSE; + } + if (lpBrowseInfo->ulFlags & BIF_RETURNONLYFSDIRS) + { + dwAttributes = SFGAO_FOLDER | SFGAO_FILESYSTEM; + if (FAILED(IShellFolder_GetAttributesOf(lptvid->lpsfParent, 1, (LPCITEMIDLIST*)&lptvid->lpi, &dwAttributes)) || + (dwAttributes != (SFGAO_FOLDER | SFGAO_FILESYSTEM))) + bEnabled = FALSE; + } + SendMessageW(hWndTree, BFFM_ENABLEOK, 0, (LPARAM)bEnabled); +} + +static LRESULT MsgNotify(HWND hWnd, UINT CtlID, LPNMHDR lpnmh) +{ + NMTREEVIEWW *pnmtv = (NMTREEVIEWW *)lpnmh; + LPTV_ITEMDATA lptvid; /* Long pointer to TreeView item data */ + IShellFolder * lpsf2=0; + + + TRACE("%p %x %p msg=%x\n", hWnd, CtlID, lpnmh, pnmtv->hdr.code); + + switch (pnmtv->hdr.idFrom) + { case IDD_TREEVIEW: + switch (pnmtv->hdr.code) + { + case TVN_DELETEITEMA: + case TVN_DELETEITEMW: + TRACE("TVN_DELETEITEMA/W\n"); + lptvid=(LPTV_ITEMDATA)pnmtv->itemOld.lParam; + IShellFolder_Release(lptvid->lpsfParent); + if (lptvid->pEnumIL) + IEnumIDList_Release(lptvid->pEnumIL); + SHFree(lptvid->lpi); + SHFree(lptvid->lpifq); + SHFree(lptvid); + break; + + case TVN_ITEMEXPANDINGA: + case TVN_ITEMEXPANDINGW: + { + TRACE("TVN_ITEMEXPANDINGA/W\n"); + if ((pnmtv->itemNew.state & TVIS_EXPANDEDONCE)) + break; + + lptvid=(LPTV_ITEMDATA)pnmtv->itemNew.lParam; + if (SUCCEEDED(IShellFolder_BindToObject(lptvid->lpsfParent, lptvid->lpi,0,(REFIID)&IID_IShellFolder,(LPVOID *)&lpsf2))) + { FillTreeView( lpsf2, lptvid->lpifq, pnmtv->itemNew.hItem, lptvid->pEnumIL); + } + /* My Computer is already sorted and trying to do a simple text + * sort will only mess things up */ + if (!_ILIsMyComputer(lptvid->lpi)) + TreeView_SortChildren(hwndTreeView, pnmtv->itemNew.hItem, FALSE); + } + break; + case TVN_SELCHANGEDA: + case TVN_SELCHANGEDW: + lptvid=(LPTV_ITEMDATA)pnmtv->itemNew.lParam; + pidlRet = lptvid->lpifq; + if (lpBrowseInfo->lpfn) + (lpBrowseInfo->lpfn)(hWnd, BFFM_SELCHANGED, (LPARAM)pidlRet, lpBrowseInfo->lParam); + BrsFolder_CheckValidSelection(hWnd, lptvid); + break; + + default: + WARN("unhandled (%d)\n", pnmtv->hdr.code); + break; + } + break; + + default: + break; + } + + return 0; +} + + +/************************************************************************* + * BrsFolderDlgProc32 (not an exported API function) + */ +static INT_PTR CALLBACK BrsFolderDlgProc(HWND hWnd, UINT msg, WPARAM wParam, + LPARAM lParam ) +{ + TRACE("hwnd=%p msg=%04x 0x%08x 0x%08lx\n", hWnd, msg, wParam, lParam ); + + switch(msg) + { case WM_INITDIALOG: + pidlRet = NULL; + lpBrowseInfo = (LPBROWSEINFOW) lParam; + if (lpBrowseInfo->ulFlags & ~SUPPORTEDFLAGS) + FIXME("flags %x not implemented\n", lpBrowseInfo->ulFlags & ~SUPPORTEDFLAGS); + if (lpBrowseInfo->lpszTitle) { + SetWindowTextW(GetDlgItem(hWnd, IDD_TITLE), lpBrowseInfo->lpszTitle); + } else { + ShowWindow(GetDlgItem(hWnd, IDD_TITLE), SW_HIDE); + } + if (!(lpBrowseInfo->ulFlags & BIF_STATUSTEXT)) + ShowWindow(GetDlgItem(hWnd, IDD_STATUS), SW_HIDE); + + InitializeTreeView(hWnd, lpBrowseInfo->pidlRoot); + + if (lpBrowseInfo->lpfn) + (lpBrowseInfo->lpfn)(hWnd, BFFM_INITIALIZED, 0, lpBrowseInfo->lParam); + + return TRUE; + + case WM_NOTIFY: + MsgNotify( hWnd, (UINT)wParam, (LPNMHDR)lParam); + break; + + case WM_COMMAND: + switch (wParam) + { case IDOK: + pdump ( pidlRet ); + if (lpBrowseInfo->pszDisplayName) + SHGetPathFromIDListW(pidlRet, lpBrowseInfo->pszDisplayName); + EndDialog(hWnd, (DWORD) ILClone(pidlRet)); + return TRUE; + + case IDCANCEL: + EndDialog(hWnd, 0); + return TRUE; + } + break; + case BFFM_SETSTATUSTEXTA: + TRACE("Set status %s\n", debugstr_a((LPSTR)lParam)); + SetWindowTextA(GetDlgItem(hWnd, IDD_STATUS), (LPSTR)lParam); + break; + case BFFM_SETSTATUSTEXTW: + TRACE("Set status %s\n", debugstr_w((LPWSTR)lParam)); + SetWindowTextW(GetDlgItem(hWnd, IDD_STATUS), (LPWSTR)lParam); + break; + case BFFM_ENABLEOK: + TRACE("Enable %ld\n", lParam); + EnableWindow(GetDlgItem(hWnd, 1), (lParam)?TRUE:FALSE); + break; + case BFFM_SETOKTEXT: /* unicode only */ + TRACE("Set OK text %s\n", debugstr_w((LPWSTR)wParam)); + SetWindowTextW(GetDlgItem(hWnd, 1), (LPWSTR)wParam); + break; + case BFFM_SETSELECTIONA: + if (wParam) + FIXME("Set selection %s\n", debugstr_a((LPSTR)lParam)); + else + FIXME("Set selection %p\n", (void*)lParam); + break; + case BFFM_SETSELECTIONW: + if (wParam) + FIXME("Set selection %s\n", debugstr_w((LPWSTR)lParam)); + else + FIXME("Set selection %p\n", (void*)lParam); + break; + case BFFM_SETEXPANDED: /* unicode only */ + if (wParam) + FIXME("Set expanded %s\n", debugstr_w((LPWSTR)lParam)); + else + FIXME("Set expanded %p\n", (void*)lParam); + break; + } + return FALSE; +} + +static const WCHAR swBrowseTempName[] = {'S','H','B','R','S','F','O','R','F','O','L','D','E','R','_','M','S','G','B','O','X',0}; + +/************************************************************************* + * SHBrowseForFolderA [SHELL32.@] + * SHBrowseForFolder [SHELL32.@] + */ +LPITEMIDLIST WINAPI SHBrowseForFolderA (LPBROWSEINFOA lpbi) +{ + BROWSEINFOW bi; + LPITEMIDLIST lpid; + INT len; + + TRACE("(%p{lpszTitle=%s,owner=%p})\n", lpbi, + lpbi ? debugstr_a(lpbi->lpszTitle) : NULL, lpbi ? lpbi->hwndOwner : NULL); + + if (!lpbi) + return NULL; + + bi.hwndOwner = lpbi->hwndOwner; + bi.pidlRoot = lpbi->pidlRoot; + if (lpbi->pszDisplayName) + { + /*lpbi->pszDisplayName is assumed to be MAX_PATH (MSDN) */ + bi.pszDisplayName = HeapAlloc(GetProcessHeap(), 0, MAX_PATH * sizeof(WCHAR)); + MultiByteToWideChar(CP_ACP, 0, lpbi->pszDisplayName, -1, bi.pszDisplayName, MAX_PATH); + } + else + bi.pszDisplayName = NULL; + + if (lpbi->lpszTitle) + { + len = MultiByteToWideChar(CP_ACP, 0, lpbi->lpszTitle, -1, NULL, 0); + bi.lpszTitle = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); + MultiByteToWideChar(CP_ACP, 0, lpbi->lpszTitle, -1, (LPWSTR)bi.lpszTitle, len); + } + else + bi.lpszTitle = NULL; + + bi.ulFlags = lpbi->ulFlags; + bi.lpfn = lpbi->lpfn; + bi.lParam = lpbi->lParam; + bi.iImage = lpbi->iImage; + lpid = (LPITEMIDLIST) DialogBoxParamW(shell32_hInstance, + swBrowseTempName, lpbi->hwndOwner, + BrsFolderDlgProc, (INT)&bi); + if (bi.pszDisplayName) + { + WideCharToMultiByte(CP_ACP, 0, bi.pszDisplayName, -1, lpbi->pszDisplayName, MAX_PATH, 0, NULL); + HeapFree(GetProcessHeap(), 0, bi.pszDisplayName); + } + HeapFree(GetProcessHeap(), 0, (LPVOID)bi.lpszTitle); + lpbi->iImage = bi.iImage; + return lpid; +} + + +/************************************************************************* + * SHBrowseForFolderW [SHELL32.@] + */ +LPITEMIDLIST WINAPI SHBrowseForFolderW (LPBROWSEINFOW lpbi) +{ + TRACE("((%p->{lpszTitle=%s,owner=%p})\n", lpbi, + lpbi ? debugstr_w(lpbi->lpszTitle) : NULL, lpbi ? lpbi->hwndOwner : 0); + + if (!lpbi) + return NULL; + + return (LPITEMIDLIST) DialogBoxParamW(shell32_hInstance, + swBrowseTempName, lpbi->hwndOwner, + BrsFolderDlgProc, (INT)lpbi); +} diff --git a/reactos/lib/shell32/changenotify.c b/reactos/lib/shell32/changenotify.c index 47a7b697d24..36a699849b7 100644 --- a/reactos/lib/shell32/changenotify.c +++ b/reactos/lib/shell32/changenotify.c @@ -1,480 +1,480 @@ -/* - * shell change notification - * - * Copyright 2000 Juergen Schmied - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include -#include - -#define NONAMELESSUNION -#define NONAMELESSSTRUCT -#include "windef.h" -#include "winbase.h" -#include "wine/debug.h" -#include "wingdi.h" -#include "shell32_main.h" - -WINE_DEFAULT_DEBUG_CHANNEL(shell); - -static CRITICAL_SECTION SHELL32_ChangenotifyCS; -static CRITICAL_SECTION_DEBUG critsect_debug = -{ - 0, 0, &SHELL32_ChangenotifyCS, - { &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList }, - 0, 0, { 0, (DWORD)(__FILE__ ": SHELL32_ChangenotifyCS") } -}; -static CRITICAL_SECTION SHELL32_ChangenotifyCS = { &critsect_debug, -1, 0, 0, 0, 0 }; - -typedef SHChangeNotifyEntry *LPNOTIFYREGISTER; - -/* internal list of notification clients (internal) */ -typedef struct _NOTIFICATIONLIST -{ - struct _NOTIFICATIONLIST *next; - struct _NOTIFICATIONLIST *prev; - HWND hwnd; /* window to notify */ - DWORD uMsg; /* message to send */ - LPNOTIFYREGISTER apidl; /* array of entries to watch*/ - UINT cidl; /* number of pidls in array */ - LONG wEventMask; /* subscribed events */ - LONG wSignalledEvent; /* event that occurred */ - DWORD dwFlags; /* client flags */ - LPCITEMIDLIST pidlSignaled; /*pidl of the path that caused the signal*/ - -} NOTIFICATIONLIST, *LPNOTIFICATIONLIST; - -static NOTIFICATIONLIST *head, *tail; - -#define SHCNE_NOITEMEVENTS ( \ - SHCNE_ASSOCCHANGED ) - -#define SHCNE_ONEITEMEVENTS ( \ - SHCNE_ATTRIBUTES | SHCNE_CREATE | SHCNE_DELETE | SHCNE_DRIVEADD | \ - SHCNE_DRIVEADDGUI | SHCNE_DRIVEREMOVED | SHCNE_FREESPACE | \ - SHCNE_MEDIAINSERTED | SHCNE_MEDIAREMOVED | SHCNE_MKDIR | \ - SHCNE_NETSHARE | SHCNE_NETUNSHARE | SHCNE_RMDIR | \ - SHCNE_SERVERDISCONNECT | SHCNE_UPDATEDIR | SHCNE_UPDATEIMAGE ) - -#define SHCNE_TWOITEMEVENTS ( \ - SHCNE_RENAMEFOLDER | SHCNE_RENAMEITEM | SHCNE_UPDATEITEM ) - -/* for dumping events */ -static const char * DumpEvent( LONG event ) -{ - if( event == SHCNE_ALLEVENTS ) - return "SHCNE_ALLEVENTS"; -#define DUMPEV(x) ,( event & SHCNE_##x )? #x " " : "" - return wine_dbg_sprintf( "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s" - DUMPEV(RENAMEITEM) - DUMPEV(CREATE) - DUMPEV(DELETE) - DUMPEV(MKDIR) - DUMPEV(RMDIR) - DUMPEV(MEDIAINSERTED) - DUMPEV(MEDIAREMOVED) - DUMPEV(DRIVEREMOVED) - DUMPEV(DRIVEADD) - DUMPEV(NETSHARE) - DUMPEV(NETUNSHARE) - DUMPEV(ATTRIBUTES) - DUMPEV(UPDATEDIR) - DUMPEV(UPDATEITEM) - DUMPEV(SERVERDISCONNECT) - DUMPEV(UPDATEIMAGE) - DUMPEV(DRIVEADDGUI) - DUMPEV(RENAMEFOLDER) - DUMPEV(FREESPACE) - DUMPEV(EXTENDED_EVENT) - DUMPEV(ASSOCCHANGED) - DUMPEV(INTERRUPT) - ); -#undef DUMPEV -} - -static const char * NodeName(LPNOTIFICATIONLIST item) -{ - const char *str; - WCHAR path[MAX_PATH]; - - if(SHGetPathFromIDListW(item->apidl[0].pidl, path )) - str = wine_dbg_sprintf("%s", debugstr_w(path)); - else - str = wine_dbg_sprintf("" ); - return str; -} - -static void AddNode(LPNOTIFICATIONLIST item) -{ - TRACE("item %p\n", item ); - - /* link items */ - item->prev = tail; - item->next = NULL; - if( tail ) - tail->next = item; - else - head = item; - tail = item; -} - -static LPNOTIFICATIONLIST FindNode( HANDLE hitem ) -{ - LPNOTIFICATIONLIST ptr; - for( ptr = head; ptr; ptr = ptr->next ) - if( ptr == (LPNOTIFICATIONLIST) hitem ) - return ptr; - return NULL; -} - -static void DeleteNode(LPNOTIFICATIONLIST item) -{ - UINT i; - - TRACE("item=%p prev=%p next=%p\n", item, item->prev, item->next); - - /* remove item from list */ - if( item->prev ) - item->prev->next = item->next; - else - head = item->next; - if( item->next ) - item->next->prev = item->prev; - else - tail = item->prev; - - /* free the item */ - for (i=0; icidl; i++) - SHFree((LPITEMIDLIST)item->apidl[i].pidl); - SHFree(item->apidl); - SHFree(item); -} - -void InitChangeNotifications(void) -{ -} - -void FreeChangeNotifications(void) -{ - TRACE("\n"); - - EnterCriticalSection(&SHELL32_ChangenotifyCS); - - while( head ) - DeleteNode( head ); - - LeaveCriticalSection(&SHELL32_ChangenotifyCS); -} - -/************************************************************************* - * SHChangeNotifyRegister [SHELL32.2] - * - */ -ULONG WINAPI -SHChangeNotifyRegister( - HWND hwnd, - int fSources, - LONG wEventMask, - UINT uMsg, - int cItems, - SHChangeNotifyEntry *lpItems) -{ - LPNOTIFICATIONLIST item; - int i; - - item = SHAlloc(sizeof(NOTIFICATIONLIST)); - - TRACE("(%p,0x%08x,0x%08lx,0x%08x,%d,%p) item=%p\n", - hwnd, fSources, wEventMask, uMsg, cItems, lpItems, item); - - item->next = NULL; - item->prev = NULL; - item->cidl = cItems; - item->apidl = SHAlloc(sizeof(SHChangeNotifyEntry) * cItems); - for(i=0;iapidl[i].pidl = ILClone(lpItems[i].pidl); - item->apidl[i].fRecursive = lpItems[i].fRecursive; - } - item->hwnd = hwnd; - item->uMsg = uMsg; - item->wEventMask = wEventMask; - item->wSignalledEvent = 0; - item->dwFlags = fSources; - - TRACE("new node: %s\n", NodeName( item )); - - EnterCriticalSection(&SHELL32_ChangenotifyCS); - - AddNode(item); - - LeaveCriticalSection(&SHELL32_ChangenotifyCS); - - return (ULONG)item; -} - -/************************************************************************* - * SHChangeNotifyDeregister [SHELL32.4] - */ -BOOL WINAPI SHChangeNotifyDeregister(ULONG hNotify) -{ - LPNOTIFICATIONLIST node; - - TRACE("(0x%08lx)\n", hNotify); - - EnterCriticalSection(&SHELL32_ChangenotifyCS); - - node = FindNode((HANDLE)hNotify); - if( node ) - DeleteNode(node); - - LeaveCriticalSection(&SHELL32_ChangenotifyCS); - - return node?TRUE:FALSE; -} - -/************************************************************************* - * SHChangeNotifyUpdateEntryList [SHELL32.5] - */ -BOOL WINAPI SHChangeNotifyUpdateEntryList(DWORD unknown1, DWORD unknown2, - DWORD unknown3, DWORD unknown4) -{ - FIXME("(0x%08lx, 0x%08lx, 0x%08lx, 0x%08lx)\n", - unknown1, unknown2, unknown3, unknown4); - - return -1; -} - -static BOOL should_notify( LPCITEMIDLIST changed, LPCITEMIDLIST watched, BOOL sub ) -{ - TRACE("%p %p %d\n", changed, watched, sub ); - if ( !watched ) - return FALSE; - if (ILIsEqual( watched, changed ) ) - return TRUE; - if( sub && ILIsParent( watched, changed, FALSE ) ) - return TRUE; - return FALSE; -} - -/************************************************************************* - * SHChangeNotify [SHELL32.@] - */ -void WINAPI SHChangeNotify(LONG wEventId, UINT uFlags, LPCVOID dwItem1, LPCVOID dwItem2) -{ - LPCITEMIDLIST Pidls[2]; - LPNOTIFICATIONLIST ptr; - UINT typeFlag = uFlags & SHCNF_TYPE; - - Pidls[0] = NULL; - Pidls[1] = NULL; - - TRACE("(0x%08lx,0x%08x,%p,%p):stub.\n", wEventId, uFlags, dwItem1, dwItem2); - - if( ( wEventId & SHCNE_NOITEMEVENTS ) && ( dwItem1 || dwItem2 ) ) - { - TRACE("dwItem1 and dwItem2 are not zero, but should be\n"); - dwItem1 = 0; - dwItem2 = 0; - return; - } - else if( ( wEventId & SHCNE_ONEITEMEVENTS ) && dwItem2 ) - { - TRACE("dwItem2 is not zero, but should be\n"); - dwItem2 = 0; - return; - } - - if( ( ( wEventId & SHCNE_NOITEMEVENTS ) && - ( wEventId & ~SHCNE_NOITEMEVENTS ) ) || - ( ( wEventId & SHCNE_ONEITEMEVENTS ) && - ( wEventId & ~SHCNE_ONEITEMEVENTS ) ) || - ( ( wEventId & SHCNE_TWOITEMEVENTS ) && - ( wEventId & ~SHCNE_TWOITEMEVENTS ) ) ) - { - WARN("mutually incompatible events listed\n"); - return; - } - - /* convert paths in IDLists*/ - switch (typeFlag) - { - case SHCNF_PATHA: - if (dwItem1) Pidls[0] = SHSimpleIDListFromPathA((LPCSTR)dwItem1); - if (dwItem2) Pidls[1] = SHSimpleIDListFromPathA((LPCSTR)dwItem2); - break; - case SHCNF_PATHW: - if (dwItem1) Pidls[0] = SHSimpleIDListFromPathW((LPCWSTR)dwItem1); - if (dwItem2) Pidls[1] = SHSimpleIDListFromPathW((LPCWSTR)dwItem2); - break; - case SHCNF_IDLIST: - Pidls[0] = (LPCITEMIDLIST)dwItem1; - Pidls[1] = (LPCITEMIDLIST)dwItem2; - break; - case SHCNF_PRINTERA: - case SHCNF_PRINTERW: - FIXME("SHChangeNotify with (uFlags & SHCNF_PRINTER)\n"); - return; - case SHCNF_DWORD: - default: - FIXME("unknown type %08x\n",typeFlag); - return; - } - - { - WCHAR path[MAX_PATH]; - - if( Pidls[0] && SHGetPathFromIDListW(Pidls[0], path )) - TRACE("notify %08lx on item1 = %s\n", wEventId, debugstr_w(path)); - - if( Pidls[1] && SHGetPathFromIDListW(Pidls[1], path )) - TRACE("notify %08lx on item2 = %s\n", wEventId, debugstr_w(path)); - } - - EnterCriticalSection(&SHELL32_ChangenotifyCS); - - /* loop through the list */ - for( ptr = head; ptr; ptr = ptr->next ) - { - BOOL notify; - DWORD i; - - notify = FALSE; - - TRACE("trying %p\n", ptr); - - for( i=0; (icidl) && !notify ; i++ ) - { - LPCITEMIDLIST pidl = ptr->apidl[i].pidl; - BOOL subtree = ptr->apidl[i].fRecursive; - - if (wEventId & ptr->wEventMask) - { - if( !pidl ) /* all ? */ - notify = TRUE; - else if( wEventId & SHCNE_NOITEMEVENTS ) - notify = TRUE; - else if( wEventId & ( SHCNE_ONEITEMEVENTS | SHCNE_TWOITEMEVENTS ) ) - notify = should_notify( Pidls[0], pidl, subtree ); - else if( wEventId & SHCNE_TWOITEMEVENTS ) - notify = should_notify( Pidls[1], pidl, subtree ); - } - } - - if( !notify ) - continue; - - ptr->pidlSignaled = ILClone(Pidls[0]); - - TRACE("notifying %s, event %s(%lx) before\n", NodeName( ptr ), DumpEvent( - wEventId ),wEventId ); - - ptr->wSignalledEvent |= wEventId; - - if (ptr->dwFlags & SHCNRF_NewDelivery) - SendMessageA(ptr->hwnd, ptr->uMsg, (WPARAM) ptr, (LPARAM) GetCurrentProcessId()); - else - SendMessageA(ptr->hwnd, ptr->uMsg, (WPARAM)Pidls, wEventId); - - TRACE("notifying %s, event %s(%lx) after\n", NodeName( ptr ), DumpEvent( - wEventId ),wEventId ); - - } - TRACE("notify Done\n"); - LeaveCriticalSection(&SHELL32_ChangenotifyCS); - - /* if we allocated it, free it. The ANSI flag is also set in its Unicode sibling. */ - if ((typeFlag & SHCNF_PATHA) || (typeFlag & SHCNF_PRINTERA)) - { - if (Pidls[0]) SHFree((LPITEMIDLIST)Pidls[0]); - if (Pidls[1]) SHFree((LPITEMIDLIST)Pidls[1]); - } -} - -/************************************************************************* - * NTSHChangeNotifyRegister [SHELL32.640] - * NOTES - * Idlist is an array of structures and Count specifies how many items in the array - * (usually just one I think). - */ -DWORD WINAPI NTSHChangeNotifyRegister( - HWND hwnd, - LONG events1, - LONG events2, - DWORD msg, - int count, - SHChangeNotifyEntry *idlist) -{ - FIXME("(%p,0x%08lx,0x%08lx,0x%08lx,0x%08x,%p):semi stub.\n", - hwnd,events1,events2,msg,count,idlist); - - return (DWORD) SHChangeNotifyRegister(hwnd, events1, events2, msg, count, idlist); -} - -/************************************************************************* - * SHChangeNotification_Lock [SHELL32.644] - */ -HANDLE WINAPI SHChangeNotification_Lock( - HANDLE hChange, - DWORD dwProcessId, - LPITEMIDLIST **lppidls, - LPLONG lpwEventId) -{ - DWORD i; - LPNOTIFICATIONLIST node; - LPCITEMIDLIST *idlist; - - TRACE("%p %08lx %p %p\n", hChange, dwProcessId, lppidls, lpwEventId); - - /* EnterCriticalSection(&SHELL32_ChangenotifyCS); */ - - node = FindNode( hChange ); - if( node ) - { - idlist = SHAlloc( sizeof(LPCITEMIDLIST *) * node->cidl ); - for(i=0; icidl; i++) - idlist[i] = (LPCITEMIDLIST)node->pidlSignaled; - *lpwEventId = node->wSignalledEvent; - *lppidls = (LPITEMIDLIST*)idlist; - node->wSignalledEvent = 0; - } - else - ERR("Couldn't find %p\n", hChange ); - - /* LeaveCriticalSection(&SHELL32_ChangenotifyCS); */ - - return (HANDLE) node; -} - -/************************************************************************* - * SHChangeNotification_Unlock [SHELL32.645] - */ -BOOL WINAPI SHChangeNotification_Unlock ( HANDLE hLock) -{ - TRACE("\n"); - return 1; -} - -/************************************************************************* - * NTSHChangeNotifyDeregister [SHELL32.641] - */ -DWORD WINAPI NTSHChangeNotifyDeregister(ULONG x1) -{ - FIXME("(0x%08lx):semi stub.\n",x1); - - return SHChangeNotifyDeregister( x1 ); -} +/* + * shell change notification + * + * Copyright 2000 Juergen Schmied + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include +#include + +#define NONAMELESSUNION +#define NONAMELESSSTRUCT +#include "windef.h" +#include "winbase.h" +#include "wine/debug.h" +#include "wingdi.h" +#include "shell32_main.h" + +WINE_DEFAULT_DEBUG_CHANNEL(shell); + +static CRITICAL_SECTION SHELL32_ChangenotifyCS; +static CRITICAL_SECTION_DEBUG critsect_debug = +{ + 0, 0, &SHELL32_ChangenotifyCS, + { &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList }, + 0, 0, { 0, (DWORD)(__FILE__ ": SHELL32_ChangenotifyCS") } +}; +static CRITICAL_SECTION SHELL32_ChangenotifyCS = { &critsect_debug, -1, 0, 0, 0, 0 }; + +typedef SHChangeNotifyEntry *LPNOTIFYREGISTER; + +/* internal list of notification clients (internal) */ +typedef struct _NOTIFICATIONLIST +{ + struct _NOTIFICATIONLIST *next; + struct _NOTIFICATIONLIST *prev; + HWND hwnd; /* window to notify */ + DWORD uMsg; /* message to send */ + LPNOTIFYREGISTER apidl; /* array of entries to watch*/ + UINT cidl; /* number of pidls in array */ + LONG wEventMask; /* subscribed events */ + LONG wSignalledEvent; /* event that occurred */ + DWORD dwFlags; /* client flags */ + LPCITEMIDLIST pidlSignaled; /*pidl of the path that caused the signal*/ + +} NOTIFICATIONLIST, *LPNOTIFICATIONLIST; + +static NOTIFICATIONLIST *head, *tail; + +#define SHCNE_NOITEMEVENTS ( \ + SHCNE_ASSOCCHANGED ) + +#define SHCNE_ONEITEMEVENTS ( \ + SHCNE_ATTRIBUTES | SHCNE_CREATE | SHCNE_DELETE | SHCNE_DRIVEADD | \ + SHCNE_DRIVEADDGUI | SHCNE_DRIVEREMOVED | SHCNE_FREESPACE | \ + SHCNE_MEDIAINSERTED | SHCNE_MEDIAREMOVED | SHCNE_MKDIR | \ + SHCNE_NETSHARE | SHCNE_NETUNSHARE | SHCNE_RMDIR | \ + SHCNE_SERVERDISCONNECT | SHCNE_UPDATEDIR | SHCNE_UPDATEIMAGE ) + +#define SHCNE_TWOITEMEVENTS ( \ + SHCNE_RENAMEFOLDER | SHCNE_RENAMEITEM | SHCNE_UPDATEITEM ) + +/* for dumping events */ +static const char * DumpEvent( LONG event ) +{ + if( event == SHCNE_ALLEVENTS ) + return "SHCNE_ALLEVENTS"; +#define DUMPEV(x) ,( event & SHCNE_##x )? #x " " : "" + return wine_dbg_sprintf( "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s" + DUMPEV(RENAMEITEM) + DUMPEV(CREATE) + DUMPEV(DELETE) + DUMPEV(MKDIR) + DUMPEV(RMDIR) + DUMPEV(MEDIAINSERTED) + DUMPEV(MEDIAREMOVED) + DUMPEV(DRIVEREMOVED) + DUMPEV(DRIVEADD) + DUMPEV(NETSHARE) + DUMPEV(NETUNSHARE) + DUMPEV(ATTRIBUTES) + DUMPEV(UPDATEDIR) + DUMPEV(UPDATEITEM) + DUMPEV(SERVERDISCONNECT) + DUMPEV(UPDATEIMAGE) + DUMPEV(DRIVEADDGUI) + DUMPEV(RENAMEFOLDER) + DUMPEV(FREESPACE) + DUMPEV(EXTENDED_EVENT) + DUMPEV(ASSOCCHANGED) + DUMPEV(INTERRUPT) + ); +#undef DUMPEV +} + +static const char * NodeName(LPNOTIFICATIONLIST item) +{ + const char *str; + WCHAR path[MAX_PATH]; + + if(SHGetPathFromIDListW(item->apidl[0].pidl, path )) + str = wine_dbg_sprintf("%s", debugstr_w(path)); + else + str = wine_dbg_sprintf("" ); + return str; +} + +static void AddNode(LPNOTIFICATIONLIST item) +{ + TRACE("item %p\n", item ); + + /* link items */ + item->prev = tail; + item->next = NULL; + if( tail ) + tail->next = item; + else + head = item; + tail = item; +} + +static LPNOTIFICATIONLIST FindNode( HANDLE hitem ) +{ + LPNOTIFICATIONLIST ptr; + for( ptr = head; ptr; ptr = ptr->next ) + if( ptr == (LPNOTIFICATIONLIST) hitem ) + return ptr; + return NULL; +} + +static void DeleteNode(LPNOTIFICATIONLIST item) +{ + UINT i; + + TRACE("item=%p prev=%p next=%p\n", item, item->prev, item->next); + + /* remove item from list */ + if( item->prev ) + item->prev->next = item->next; + else + head = item->next; + if( item->next ) + item->next->prev = item->prev; + else + tail = item->prev; + + /* free the item */ + for (i=0; icidl; i++) + SHFree((LPITEMIDLIST)item->apidl[i].pidl); + SHFree(item->apidl); + SHFree(item); +} + +void InitChangeNotifications(void) +{ +} + +void FreeChangeNotifications(void) +{ + TRACE("\n"); + + EnterCriticalSection(&SHELL32_ChangenotifyCS); + + while( head ) + DeleteNode( head ); + + LeaveCriticalSection(&SHELL32_ChangenotifyCS); +} + +/************************************************************************* + * SHChangeNotifyRegister [SHELL32.2] + * + */ +ULONG WINAPI +SHChangeNotifyRegister( + HWND hwnd, + int fSources, + LONG wEventMask, + UINT uMsg, + int cItems, + SHChangeNotifyEntry *lpItems) +{ + LPNOTIFICATIONLIST item; + int i; + + item = SHAlloc(sizeof(NOTIFICATIONLIST)); + + TRACE("(%p,0x%08x,0x%08lx,0x%08x,%d,%p) item=%p\n", + hwnd, fSources, wEventMask, uMsg, cItems, lpItems, item); + + item->next = NULL; + item->prev = NULL; + item->cidl = cItems; + item->apidl = SHAlloc(sizeof(SHChangeNotifyEntry) * cItems); + for(i=0;iapidl[i].pidl = ILClone(lpItems[i].pidl); + item->apidl[i].fRecursive = lpItems[i].fRecursive; + } + item->hwnd = hwnd; + item->uMsg = uMsg; + item->wEventMask = wEventMask; + item->wSignalledEvent = 0; + item->dwFlags = fSources; + + TRACE("new node: %s\n", NodeName( item )); + + EnterCriticalSection(&SHELL32_ChangenotifyCS); + + AddNode(item); + + LeaveCriticalSection(&SHELL32_ChangenotifyCS); + + return (ULONG)item; +} + +/************************************************************************* + * SHChangeNotifyDeregister [SHELL32.4] + */ +BOOL WINAPI SHChangeNotifyDeregister(ULONG hNotify) +{ + LPNOTIFICATIONLIST node; + + TRACE("(0x%08lx)\n", hNotify); + + EnterCriticalSection(&SHELL32_ChangenotifyCS); + + node = FindNode((HANDLE)hNotify); + if( node ) + DeleteNode(node); + + LeaveCriticalSection(&SHELL32_ChangenotifyCS); + + return node?TRUE:FALSE; +} + +/************************************************************************* + * SHChangeNotifyUpdateEntryList [SHELL32.5] + */ +BOOL WINAPI SHChangeNotifyUpdateEntryList(DWORD unknown1, DWORD unknown2, + DWORD unknown3, DWORD unknown4) +{ + FIXME("(0x%08lx, 0x%08lx, 0x%08lx, 0x%08lx)\n", + unknown1, unknown2, unknown3, unknown4); + + return -1; +} + +static BOOL should_notify( LPCITEMIDLIST changed, LPCITEMIDLIST watched, BOOL sub ) +{ + TRACE("%p %p %d\n", changed, watched, sub ); + if ( !watched ) + return FALSE; + if (ILIsEqual( watched, changed ) ) + return TRUE; + if( sub && ILIsParent( watched, changed, FALSE ) ) + return TRUE; + return FALSE; +} + +/************************************************************************* + * SHChangeNotify [SHELL32.@] + */ +void WINAPI SHChangeNotify(LONG wEventId, UINT uFlags, LPCVOID dwItem1, LPCVOID dwItem2) +{ + LPCITEMIDLIST Pidls[2]; + LPNOTIFICATIONLIST ptr; + UINT typeFlag = uFlags & SHCNF_TYPE; + + Pidls[0] = NULL; + Pidls[1] = NULL; + + TRACE("(0x%08lx,0x%08x,%p,%p):stub.\n", wEventId, uFlags, dwItem1, dwItem2); + + if( ( wEventId & SHCNE_NOITEMEVENTS ) && ( dwItem1 || dwItem2 ) ) + { + TRACE("dwItem1 and dwItem2 are not zero, but should be\n"); + dwItem1 = 0; + dwItem2 = 0; + return; + } + else if( ( wEventId & SHCNE_ONEITEMEVENTS ) && dwItem2 ) + { + TRACE("dwItem2 is not zero, but should be\n"); + dwItem2 = 0; + return; + } + + if( ( ( wEventId & SHCNE_NOITEMEVENTS ) && + ( wEventId & ~SHCNE_NOITEMEVENTS ) ) || + ( ( wEventId & SHCNE_ONEITEMEVENTS ) && + ( wEventId & ~SHCNE_ONEITEMEVENTS ) ) || + ( ( wEventId & SHCNE_TWOITEMEVENTS ) && + ( wEventId & ~SHCNE_TWOITEMEVENTS ) ) ) + { + WARN("mutually incompatible events listed\n"); + return; + } + + /* convert paths in IDLists*/ + switch (typeFlag) + { + case SHCNF_PATHA: + if (dwItem1) Pidls[0] = SHSimpleIDListFromPathA((LPCSTR)dwItem1); + if (dwItem2) Pidls[1] = SHSimpleIDListFromPathA((LPCSTR)dwItem2); + break; + case SHCNF_PATHW: + if (dwItem1) Pidls[0] = SHSimpleIDListFromPathW((LPCWSTR)dwItem1); + if (dwItem2) Pidls[1] = SHSimpleIDListFromPathW((LPCWSTR)dwItem2); + break; + case SHCNF_IDLIST: + Pidls[0] = (LPCITEMIDLIST)dwItem1; + Pidls[1] = (LPCITEMIDLIST)dwItem2; + break; + case SHCNF_PRINTERA: + case SHCNF_PRINTERW: + FIXME("SHChangeNotify with (uFlags & SHCNF_PRINTER)\n"); + return; + case SHCNF_DWORD: + default: + FIXME("unknown type %08x\n",typeFlag); + return; + } + + { + WCHAR path[MAX_PATH]; + + if( Pidls[0] && SHGetPathFromIDListW(Pidls[0], path )) + TRACE("notify %08lx on item1 = %s\n", wEventId, debugstr_w(path)); + + if( Pidls[1] && SHGetPathFromIDListW(Pidls[1], path )) + TRACE("notify %08lx on item2 = %s\n", wEventId, debugstr_w(path)); + } + + EnterCriticalSection(&SHELL32_ChangenotifyCS); + + /* loop through the list */ + for( ptr = head; ptr; ptr = ptr->next ) + { + BOOL notify; + DWORD i; + + notify = FALSE; + + TRACE("trying %p\n", ptr); + + for( i=0; (icidl) && !notify ; i++ ) + { + LPCITEMIDLIST pidl = ptr->apidl[i].pidl; + BOOL subtree = ptr->apidl[i].fRecursive; + + if (wEventId & ptr->wEventMask) + { + if( !pidl ) /* all ? */ + notify = TRUE; + else if( wEventId & SHCNE_NOITEMEVENTS ) + notify = TRUE; + else if( wEventId & ( SHCNE_ONEITEMEVENTS | SHCNE_TWOITEMEVENTS ) ) + notify = should_notify( Pidls[0], pidl, subtree ); + else if( wEventId & SHCNE_TWOITEMEVENTS ) + notify = should_notify( Pidls[1], pidl, subtree ); + } + } + + if( !notify ) + continue; + + ptr->pidlSignaled = ILClone(Pidls[0]); + + TRACE("notifying %s, event %s(%lx) before\n", NodeName( ptr ), DumpEvent( + wEventId ),wEventId ); + + ptr->wSignalledEvent |= wEventId; + + if (ptr->dwFlags & SHCNRF_NewDelivery) + SendMessageA(ptr->hwnd, ptr->uMsg, (WPARAM) ptr, (LPARAM) GetCurrentProcessId()); + else + SendMessageA(ptr->hwnd, ptr->uMsg, (WPARAM)Pidls, wEventId); + + TRACE("notifying %s, event %s(%lx) after\n", NodeName( ptr ), DumpEvent( + wEventId ),wEventId ); + + } + TRACE("notify Done\n"); + LeaveCriticalSection(&SHELL32_ChangenotifyCS); + + /* if we allocated it, free it. The ANSI flag is also set in its Unicode sibling. */ + if ((typeFlag & SHCNF_PATHA) || (typeFlag & SHCNF_PRINTERA)) + { + if (Pidls[0]) SHFree((LPITEMIDLIST)Pidls[0]); + if (Pidls[1]) SHFree((LPITEMIDLIST)Pidls[1]); + } +} + +/************************************************************************* + * NTSHChangeNotifyRegister [SHELL32.640] + * NOTES + * Idlist is an array of structures and Count specifies how many items in the array + * (usually just one I think). + */ +DWORD WINAPI NTSHChangeNotifyRegister( + HWND hwnd, + LONG events1, + LONG events2, + DWORD msg, + int count, + SHChangeNotifyEntry *idlist) +{ + FIXME("(%p,0x%08lx,0x%08lx,0x%08lx,0x%08x,%p):semi stub.\n", + hwnd,events1,events2,msg,count,idlist); + + return (DWORD) SHChangeNotifyRegister(hwnd, events1, events2, msg, count, idlist); +} + +/************************************************************************* + * SHChangeNotification_Lock [SHELL32.644] + */ +HANDLE WINAPI SHChangeNotification_Lock( + HANDLE hChange, + DWORD dwProcessId, + LPITEMIDLIST **lppidls, + LPLONG lpwEventId) +{ + DWORD i; + LPNOTIFICATIONLIST node; + LPCITEMIDLIST *idlist; + + TRACE("%p %08lx %p %p\n", hChange, dwProcessId, lppidls, lpwEventId); + + /* EnterCriticalSection(&SHELL32_ChangenotifyCS); */ + + node = FindNode( hChange ); + if( node ) + { + idlist = SHAlloc( sizeof(LPCITEMIDLIST *) * node->cidl ); + for(i=0; icidl; i++) + idlist[i] = (LPCITEMIDLIST)node->pidlSignaled; + *lpwEventId = node->wSignalledEvent; + *lppidls = (LPITEMIDLIST*)idlist; + node->wSignalledEvent = 0; + } + else + ERR("Couldn't find %p\n", hChange ); + + /* LeaveCriticalSection(&SHELL32_ChangenotifyCS); */ + + return (HANDLE) node; +} + +/************************************************************************* + * SHChangeNotification_Unlock [SHELL32.645] + */ +BOOL WINAPI SHChangeNotification_Unlock ( HANDLE hLock) +{ + TRACE("\n"); + return 1; +} + +/************************************************************************* + * NTSHChangeNotifyDeregister [SHELL32.641] + */ +DWORD WINAPI NTSHChangeNotifyDeregister(ULONG x1) +{ + FIXME("(0x%08lx):semi stub.\n",x1); + + return SHChangeNotifyDeregister( x1 ); +} diff --git a/reactos/lib/shell32/classes.c b/reactos/lib/shell32/classes.c index 9c56a5b557f..0e47f6f9fb4 100644 --- a/reactos/lib/shell32/classes.c +++ b/reactos/lib/shell32/classes.c @@ -1,380 +1,380 @@ -/* - * file type mapping - * (HKEY_CLASSES_ROOT - Stuff) - * - * Copyright 1998, 1999, 2000 Juergen Schmied - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include "config.h" -#include "wine/port.h" - -#include -#include -#include -#include -#include "wine/debug.h" -#include "winerror.h" -#include "windef.h" -#include "winbase.h" -#include "winreg.h" -#include "wingdi.h" -#include "winuser.h" - -#include "shlobj.h" -#include "shell32_main.h" -#include "shlguid.h" -#include "shresdef.h" -#include "shlwapi.h" -#include "wine/unicode.h" - -WINE_DEFAULT_DEBUG_CHANNEL(shell); - -#define MAX_EXTENSION_LENGTH 20 - -BOOL HCR_MapTypeToValueW(LPCWSTR szExtension, LPWSTR szFileType, DWORD len, BOOL bPrependDot) -{ - HKEY hkey; - WCHAR szTemp[MAX_EXTENSION_LENGTH + 2]; - - TRACE("%s %p\n", debugstr_w(szExtension), debugstr_w(szFileType)); - - /* added because we do not want to have double dots */ - if (szExtension[0] == '.') - bPrependDot = 0; - - if (bPrependDot) - szTemp[0] = '.'; - - lstrcpynW(szTemp + (bPrependDot?1:0), szExtension, MAX_EXTENSION_LENGTH); - - if (RegOpenKeyExW(HKEY_CLASSES_ROOT, szTemp, 0, 0x02000000, &hkey)) - { - return FALSE; - } - - if (RegQueryValueW(hkey, NULL, szFileType, &len)) - { - RegCloseKey(hkey); - return FALSE; - } - - RegCloseKey(hkey); - - TRACE("--UE;\n} %s\n", debugstr_w(szFileType)); - - return TRUE; -} - -BOOL HCR_MapTypeToValueA(LPCSTR szExtension, LPSTR szFileType, DWORD len, BOOL bPrependDot) -{ - HKEY hkey; - char szTemp[MAX_EXTENSION_LENGTH + 2]; - - TRACE("%s %p\n", szExtension, szFileType); - - /* added because we do not want to have double dots */ - if (szExtension[0] == '.') - bPrependDot = 0; - - if (bPrependDot) - szTemp[0] = '.'; - - lstrcpynA(szTemp + (bPrependDot?1:0), szExtension, MAX_EXTENSION_LENGTH); - - if (RegOpenKeyExA(HKEY_CLASSES_ROOT, szTemp, 0, 0x02000000, &hkey)) - { - return FALSE; - } - - if (RegQueryValueA(hkey, NULL, szFileType, &len)) - { - RegCloseKey(hkey); - return FALSE; - } - - RegCloseKey(hkey); - - TRACE("--UE;\n} %s\n", szFileType); - - return TRUE; -} - - -BOOL HCR_GetExecuteCommandW( HKEY hkeyClass, LPCWSTR szClass, LPCWSTR szVerb, LPWSTR szDest, DWORD len ) -{ - static const WCHAR swShell[] = {'\\','s','h','e','l','l','\\',0}; - static const WCHAR swCommand[] = {'\\','c','o','m','m','a','n','d',0}; - BOOL ret = FALSE; - - TRACE("%p %s %s %p\n", hkeyClass, debugstr_w(szClass), debugstr_w(szVerb), szDest); - - if (szClass) - RegOpenKeyExW(HKEY_CLASSES_ROOT, szClass, 0, 0x02000000, &hkeyClass); - - if (hkeyClass) - { - WCHAR sTemp[MAX_PATH]; - lstrcpyW(sTemp, swShell); - lstrcatW(sTemp, szVerb); - lstrcatW(sTemp, swCommand); - - ret = (ERROR_SUCCESS == SHGetValueW(hkeyClass, sTemp, NULL, NULL, szDest, &len)); - - if (szClass) - RegCloseKey(hkeyClass); - } - - TRACE("-- %s\n", debugstr_w(szDest) ); - return ret; -} - -/*************************************************************************************** -* HCR_GetDefaultIcon [internal] -* -* Gets the icon for a filetype -*/ -static BOOL HCR_RegOpenClassIDKey(REFIID riid, HKEY *hkey) -{ - char xriid[50]; - sprintf( xriid, "CLSID\\{%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}", - riid->Data1, riid->Data2, riid->Data3, - riid->Data4[0], riid->Data4[1], riid->Data4[2], riid->Data4[3], - riid->Data4[4], riid->Data4[5], riid->Data4[6], riid->Data4[7] ); - - TRACE("%s\n",xriid ); - - return !RegOpenKeyExA(HKEY_CLASSES_ROOT, xriid, 0, KEY_READ, hkey); -} - -static BOOL HCR_RegGetDefaultIconW(HKEY hkey, LPWSTR szDest, DWORD len, LPDWORD dwNr) -{ - DWORD dwType; - WCHAR sTemp[MAX_PATH]; - WCHAR sNum[5]; - - if (!RegQueryValueExW(hkey, NULL, 0, &dwType, (LPBYTE)szDest, &len)) - { - if (dwType == REG_EXPAND_SZ) - { - ExpandEnvironmentStringsW(szDest, sTemp, MAX_PATH); - lstrcpynW(szDest, sTemp, len); - } - if (ParseFieldW (szDest, 2, sNum, 5)) - *dwNr = atoiW(sNum); - else - *dwNr=0; /* sometimes the icon number is missing */ - ParseFieldW (szDest, 1, szDest, len); - return TRUE; - } - return FALSE; -} - -static BOOL HCR_RegGetDefaultIconA(HKEY hkey, LPSTR szDest, DWORD len, LPDWORD dwNr) -{ - DWORD dwType; - char sTemp[MAX_PATH]; - char sNum[5]; - - if (!RegQueryValueExA(hkey, NULL, 0, &dwType, szDest, &len)) - { - if (dwType == REG_EXPAND_SZ) - { - ExpandEnvironmentStringsA(szDest, sTemp, MAX_PATH); - lstrcpynA(szDest, sTemp, len); - } - if (ParseFieldA (szDest, 2, sNum, 5)) - *dwNr=atoi(sNum); - else - *dwNr=0; /* sometimes the icon number is missing */ - ParseFieldA (szDest, 1, szDest, len); - return TRUE; - } - return FALSE; -} - -BOOL HCR_GetDefaultIconW(LPCWSTR szClass, LPWSTR szDest, DWORD len, LPDWORD dwNr) -{ - static const WCHAR swDefaultIcon[] = {'\\','D','e','f','a','u','l','t','I','c','o','n',0}; - HKEY hkey; - WCHAR sTemp[MAX_PATH]; - BOOL ret = FALSE; - - TRACE("%s\n",debugstr_w(szClass) ); - - lstrcpynW(sTemp, szClass, MAX_PATH); - lstrcatW(sTemp, swDefaultIcon); - - if (!RegOpenKeyExW(HKEY_CLASSES_ROOT, sTemp, 0, 0x02000000, &hkey)) - { - ret = HCR_RegGetDefaultIconW(hkey, szDest, len, dwNr); - RegCloseKey(hkey); - } - TRACE("-- %s %li\n", debugstr_w(szDest), *dwNr ); - return ret; -} - -BOOL HCR_GetDefaultIconA(LPCSTR szClass, LPSTR szDest, DWORD len, LPDWORD dwNr) -{ - HKEY hkey; - char sTemp[MAX_PATH]; - BOOL ret = FALSE; - - TRACE("%s\n",szClass ); - - sprintf(sTemp, "%s\\DefaultIcon",szClass); - - if (!RegOpenKeyExA(HKEY_CLASSES_ROOT, sTemp, 0, 0x02000000, &hkey)) - { - ret = HCR_RegGetDefaultIconA(hkey, szDest, len, dwNr); - RegCloseKey(hkey); - } - TRACE("-- %s %li\n", szDest, *dwNr ); - return ret; -} - -BOOL HCR_GetDefaultIconFromGUIDW(REFIID riid, LPWSTR szDest, DWORD len, LPDWORD dwNr) -{ - HKEY hkey; - BOOL ret = FALSE; - - if (HCR_RegOpenClassIDKey(riid, &hkey)) - { - ret = HCR_RegGetDefaultIconW(hkey, szDest, len, dwNr); - RegCloseKey(hkey); - } - TRACE("-- %s %li\n", debugstr_w(szDest), *dwNr ); - return ret; -} - -/*************************************************************************************** -* HCR_GetClassName [internal] -* -* Gets the name of a registered class -*/ -static const WCHAR swEmpty[] = {0}; - -BOOL HCR_GetClassNameW(REFIID riid, LPWSTR szDest, DWORD len) -{ - HKEY hkey; - BOOL ret = FALSE; - DWORD buflen = len; - - szDest[0] = 0; - if (HCR_RegOpenClassIDKey(riid, &hkey)) - { - if (!RegQueryValueExW(hkey, swEmpty, 0, NULL, (LPBYTE)szDest, &len)) - { - ret = TRUE; - } - RegCloseKey(hkey); - } - - if (!ret || !szDest[0]) - { - if(IsEqualIID(riid, &CLSID_ShellDesktop)) - { - if (LoadStringW(shell32_hInstance, IDS_DESKTOP, szDest, buflen)) - ret = TRUE; - } - else if (IsEqualIID(riid, &CLSID_MyComputer)) - { - if(LoadStringW(shell32_hInstance, IDS_MYCOMPUTER, szDest, buflen)) - ret = TRUE; - } - } - TRACE("-- %s\n", debugstr_w(szDest)); - return ret; -} - -BOOL HCR_GetClassNameA(REFIID riid, LPSTR szDest, DWORD len) -{ HKEY hkey; - BOOL ret = FALSE; - DWORD buflen = len; - - szDest[0] = 0; - if (HCR_RegOpenClassIDKey(riid, &hkey)) - { - if (!RegQueryValueExA(hkey,"",0,NULL,szDest,&len)) - { - ret = TRUE; - } - RegCloseKey(hkey); - } - - if (!ret || !szDest[0]) - { - if(IsEqualIID(riid, &CLSID_ShellDesktop)) - { - if (LoadStringA(shell32_hInstance, IDS_DESKTOP, szDest, buflen)) - ret = TRUE; - } - else if (IsEqualIID(riid, &CLSID_MyComputer)) - { - if(LoadStringA(shell32_hInstance, IDS_MYCOMPUTER, szDest, buflen)) - ret = TRUE; - } - } - - TRACE("-- %s\n", szDest); - - return ret; -} - -/*************************************************************************************** -* HCR_GetFolderAttributes [internal] -* -* gets the folder attributes of a class -* -* FIXME -* verify the defaultvalue for *szDest -*/ -BOOL HCR_GetFolderAttributes (REFIID riid, LPDWORD szDest) -{ HKEY hkey; - char xriid[60]; - DWORD attributes; - DWORD len = 4; - - sprintf( xriid, "CLSID\\{%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}", - riid->Data1, riid->Data2, riid->Data3, - riid->Data4[0], riid->Data4[1], riid->Data4[2], riid->Data4[3], - riid->Data4[4], riid->Data4[5], riid->Data4[6], riid->Data4[7] ); - TRACE("%s\n",xriid ); - - if (!szDest) return FALSE; - *szDest = SFGAO_FOLDER|SFGAO_FILESYSTEM; - - strcat (xriid, "\\ShellFolder"); - - if (RegOpenKeyExA(HKEY_CLASSES_ROOT,xriid,0,KEY_READ,&hkey)) - { - return FALSE; - } - - if (RegQueryValueExA(hkey,"Attributes",0,NULL,(LPBYTE)&attributes,&len)) - { - RegCloseKey(hkey); - return FALSE; - } - - RegCloseKey(hkey); - - TRACE("-- 0x%08lx\n", attributes); - - *szDest = attributes; - - return TRUE; -} +/* + * file type mapping + * (HKEY_CLASSES_ROOT - Stuff) + * + * Copyright 1998, 1999, 2000 Juergen Schmied + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" +#include "wine/port.h" + +#include +#include +#include +#include +#include "wine/debug.h" +#include "winerror.h" +#include "windef.h" +#include "winbase.h" +#include "winreg.h" +#include "wingdi.h" +#include "winuser.h" + +#include "shlobj.h" +#include "shell32_main.h" +#include "shlguid.h" +#include "shresdef.h" +#include "shlwapi.h" +#include "wine/unicode.h" + +WINE_DEFAULT_DEBUG_CHANNEL(shell); + +#define MAX_EXTENSION_LENGTH 20 + +BOOL HCR_MapTypeToValueW(LPCWSTR szExtension, LPWSTR szFileType, DWORD len, BOOL bPrependDot) +{ + HKEY hkey; + WCHAR szTemp[MAX_EXTENSION_LENGTH + 2]; + + TRACE("%s %p\n", debugstr_w(szExtension), debugstr_w(szFileType)); + + /* added because we do not want to have double dots */ + if (szExtension[0] == '.') + bPrependDot = 0; + + if (bPrependDot) + szTemp[0] = '.'; + + lstrcpynW(szTemp + (bPrependDot?1:0), szExtension, MAX_EXTENSION_LENGTH); + + if (RegOpenKeyExW(HKEY_CLASSES_ROOT, szTemp, 0, 0x02000000, &hkey)) + { + return FALSE; + } + + if (RegQueryValueW(hkey, NULL, szFileType, &len)) + { + RegCloseKey(hkey); + return FALSE; + } + + RegCloseKey(hkey); + + TRACE("--UE;\n} %s\n", debugstr_w(szFileType)); + + return TRUE; +} + +BOOL HCR_MapTypeToValueA(LPCSTR szExtension, LPSTR szFileType, DWORD len, BOOL bPrependDot) +{ + HKEY hkey; + char szTemp[MAX_EXTENSION_LENGTH + 2]; + + TRACE("%s %p\n", szExtension, szFileType); + + /* added because we do not want to have double dots */ + if (szExtension[0] == '.') + bPrependDot = 0; + + if (bPrependDot) + szTemp[0] = '.'; + + lstrcpynA(szTemp + (bPrependDot?1:0), szExtension, MAX_EXTENSION_LENGTH); + + if (RegOpenKeyExA(HKEY_CLASSES_ROOT, szTemp, 0, 0x02000000, &hkey)) + { + return FALSE; + } + + if (RegQueryValueA(hkey, NULL, szFileType, &len)) + { + RegCloseKey(hkey); + return FALSE; + } + + RegCloseKey(hkey); + + TRACE("--UE;\n} %s\n", szFileType); + + return TRUE; +} + + +BOOL HCR_GetExecuteCommandW( HKEY hkeyClass, LPCWSTR szClass, LPCWSTR szVerb, LPWSTR szDest, DWORD len ) +{ + static const WCHAR swShell[] = {'\\','s','h','e','l','l','\\',0}; + static const WCHAR swCommand[] = {'\\','c','o','m','m','a','n','d',0}; + BOOL ret = FALSE; + + TRACE("%p %s %s %p\n", hkeyClass, debugstr_w(szClass), debugstr_w(szVerb), szDest); + + if (szClass) + RegOpenKeyExW(HKEY_CLASSES_ROOT, szClass, 0, 0x02000000, &hkeyClass); + + if (hkeyClass) + { + WCHAR sTemp[MAX_PATH]; + lstrcpyW(sTemp, swShell); + lstrcatW(sTemp, szVerb); + lstrcatW(sTemp, swCommand); + + ret = (ERROR_SUCCESS == SHGetValueW(hkeyClass, sTemp, NULL, NULL, szDest, &len)); + + if (szClass) + RegCloseKey(hkeyClass); + } + + TRACE("-- %s\n", debugstr_w(szDest) ); + return ret; +} + +/*************************************************************************************** +* HCR_GetDefaultIcon [internal] +* +* Gets the icon for a filetype +*/ +static BOOL HCR_RegOpenClassIDKey(REFIID riid, HKEY *hkey) +{ + char xriid[50]; + sprintf( xriid, "CLSID\\{%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}", + riid->Data1, riid->Data2, riid->Data3, + riid->Data4[0], riid->Data4[1], riid->Data4[2], riid->Data4[3], + riid->Data4[4], riid->Data4[5], riid->Data4[6], riid->Data4[7] ); + + TRACE("%s\n",xriid ); + + return !RegOpenKeyExA(HKEY_CLASSES_ROOT, xriid, 0, KEY_READ, hkey); +} + +static BOOL HCR_RegGetDefaultIconW(HKEY hkey, LPWSTR szDest, DWORD len, LPDWORD dwNr) +{ + DWORD dwType; + WCHAR sTemp[MAX_PATH]; + WCHAR sNum[5]; + + if (!RegQueryValueExW(hkey, NULL, 0, &dwType, (LPBYTE)szDest, &len)) + { + if (dwType == REG_EXPAND_SZ) + { + ExpandEnvironmentStringsW(szDest, sTemp, MAX_PATH); + lstrcpynW(szDest, sTemp, len); + } + if (ParseFieldW (szDest, 2, sNum, 5)) + *dwNr = atoiW(sNum); + else + *dwNr=0; /* sometimes the icon number is missing */ + ParseFieldW (szDest, 1, szDest, len); + return TRUE; + } + return FALSE; +} + +static BOOL HCR_RegGetDefaultIconA(HKEY hkey, LPSTR szDest, DWORD len, LPDWORD dwNr) +{ + DWORD dwType; + char sTemp[MAX_PATH]; + char sNum[5]; + + if (!RegQueryValueExA(hkey, NULL, 0, &dwType, szDest, &len)) + { + if (dwType == REG_EXPAND_SZ) + { + ExpandEnvironmentStringsA(szDest, sTemp, MAX_PATH); + lstrcpynA(szDest, sTemp, len); + } + if (ParseFieldA (szDest, 2, sNum, 5)) + *dwNr=atoi(sNum); + else + *dwNr=0; /* sometimes the icon number is missing */ + ParseFieldA (szDest, 1, szDest, len); + return TRUE; + } + return FALSE; +} + +BOOL HCR_GetDefaultIconW(LPCWSTR szClass, LPWSTR szDest, DWORD len, LPDWORD dwNr) +{ + static const WCHAR swDefaultIcon[] = {'\\','D','e','f','a','u','l','t','I','c','o','n',0}; + HKEY hkey; + WCHAR sTemp[MAX_PATH]; + BOOL ret = FALSE; + + TRACE("%s\n",debugstr_w(szClass) ); + + lstrcpynW(sTemp, szClass, MAX_PATH); + lstrcatW(sTemp, swDefaultIcon); + + if (!RegOpenKeyExW(HKEY_CLASSES_ROOT, sTemp, 0, 0x02000000, &hkey)) + { + ret = HCR_RegGetDefaultIconW(hkey, szDest, len, dwNr); + RegCloseKey(hkey); + } + TRACE("-- %s %li\n", debugstr_w(szDest), *dwNr ); + return ret; +} + +BOOL HCR_GetDefaultIconA(LPCSTR szClass, LPSTR szDest, DWORD len, LPDWORD dwNr) +{ + HKEY hkey; + char sTemp[MAX_PATH]; + BOOL ret = FALSE; + + TRACE("%s\n",szClass ); + + sprintf(sTemp, "%s\\DefaultIcon",szClass); + + if (!RegOpenKeyExA(HKEY_CLASSES_ROOT, sTemp, 0, 0x02000000, &hkey)) + { + ret = HCR_RegGetDefaultIconA(hkey, szDest, len, dwNr); + RegCloseKey(hkey); + } + TRACE("-- %s %li\n", szDest, *dwNr ); + return ret; +} + +BOOL HCR_GetDefaultIconFromGUIDW(REFIID riid, LPWSTR szDest, DWORD len, LPDWORD dwNr) +{ + HKEY hkey; + BOOL ret = FALSE; + + if (HCR_RegOpenClassIDKey(riid, &hkey)) + { + ret = HCR_RegGetDefaultIconW(hkey, szDest, len, dwNr); + RegCloseKey(hkey); + } + TRACE("-- %s %li\n", debugstr_w(szDest), *dwNr ); + return ret; +} + +/*************************************************************************************** +* HCR_GetClassName [internal] +* +* Gets the name of a registered class +*/ +static const WCHAR swEmpty[] = {0}; + +BOOL HCR_GetClassNameW(REFIID riid, LPWSTR szDest, DWORD len) +{ + HKEY hkey; + BOOL ret = FALSE; + DWORD buflen = len; + + szDest[0] = 0; + if (HCR_RegOpenClassIDKey(riid, &hkey)) + { + if (!RegQueryValueExW(hkey, swEmpty, 0, NULL, (LPBYTE)szDest, &len)) + { + ret = TRUE; + } + RegCloseKey(hkey); + } + + if (!ret || !szDest[0]) + { + if(IsEqualIID(riid, &CLSID_ShellDesktop)) + { + if (LoadStringW(shell32_hInstance, IDS_DESKTOP, szDest, buflen)) + ret = TRUE; + } + else if (IsEqualIID(riid, &CLSID_MyComputer)) + { + if(LoadStringW(shell32_hInstance, IDS_MYCOMPUTER, szDest, buflen)) + ret = TRUE; + } + } + TRACE("-- %s\n", debugstr_w(szDest)); + return ret; +} + +BOOL HCR_GetClassNameA(REFIID riid, LPSTR szDest, DWORD len) +{ HKEY hkey; + BOOL ret = FALSE; + DWORD buflen = len; + + szDest[0] = 0; + if (HCR_RegOpenClassIDKey(riid, &hkey)) + { + if (!RegQueryValueExA(hkey,"",0,NULL,szDest,&len)) + { + ret = TRUE; + } + RegCloseKey(hkey); + } + + if (!ret || !szDest[0]) + { + if(IsEqualIID(riid, &CLSID_ShellDesktop)) + { + if (LoadStringA(shell32_hInstance, IDS_DESKTOP, szDest, buflen)) + ret = TRUE; + } + else if (IsEqualIID(riid, &CLSID_MyComputer)) + { + if(LoadStringA(shell32_hInstance, IDS_MYCOMPUTER, szDest, buflen)) + ret = TRUE; + } + } + + TRACE("-- %s\n", szDest); + + return ret; +} + +/*************************************************************************************** +* HCR_GetFolderAttributes [internal] +* +* gets the folder attributes of a class +* +* FIXME +* verify the defaultvalue for *szDest +*/ +BOOL HCR_GetFolderAttributes (REFIID riid, LPDWORD szDest) +{ HKEY hkey; + char xriid[60]; + DWORD attributes; + DWORD len = 4; + + sprintf( xriid, "CLSID\\{%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}", + riid->Data1, riid->Data2, riid->Data3, + riid->Data4[0], riid->Data4[1], riid->Data4[2], riid->Data4[3], + riid->Data4[4], riid->Data4[5], riid->Data4[6], riid->Data4[7] ); + TRACE("%s\n",xriid ); + + if (!szDest) return FALSE; + *szDest = SFGAO_FOLDER|SFGAO_FILESYSTEM; + + strcat (xriid, "\\ShellFolder"); + + if (RegOpenKeyExA(HKEY_CLASSES_ROOT,xriid,0,KEY_READ,&hkey)) + { + return FALSE; + } + + if (RegQueryValueExA(hkey,"Attributes",0,NULL,(LPBYTE)&attributes,&len)) + { + RegCloseKey(hkey); + return FALSE; + } + + RegCloseKey(hkey); + + TRACE("-- 0x%08lx\n", attributes); + + *szDest = attributes; + + return TRUE; +} diff --git a/reactos/lib/shell32/clipboard.c b/reactos/lib/shell32/clipboard.c index fe0d1bd20d7..71c929365b9 100644 --- a/reactos/lib/shell32/clipboard.c +++ b/reactos/lib/shell32/clipboard.c @@ -1,270 +1,270 @@ -/* - * clipboard helper functions - * - * Copyright 2000 Juergen Schmied - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * NOTES: - * - * For copy & paste functions within contextmenus does the shell use - * the OLE clipboard functions in combination with dataobjects. - * The OLE32.DLL gets loaded with LoadLibrary - * - * - a right mousebutton-copy sets the following formats: - * classic: - * Shell IDList Array - * Prefered Drop Effect - * Shell Object Offsets - * HDROP - * FileName - * ole: - * OlePrivateData (ClipboardDataObjectInterface) - * - */ - -#include -#include - -#include "windef.h" -#include "winbase.h" -#include "winreg.h" -#include "wingdi.h" -#include "pidl.h" -#include "undocshell.h" -#include "shell32_main.h" -#include "shlwapi.h" - -#include "wine/unicode.h" -#include "wine/debug.h" - -WINE_DEFAULT_DEBUG_CHANNEL(shell); - -/************************************************************************** - * RenderHDROP - * - * creates a CF_HDROP structure - */ -HGLOBAL RenderHDROP(LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl) -{ - UINT i; - int rootsize = 0,size = 0; - char szRootPath[MAX_PATH]; - char szFileName[MAX_PATH]; - HGLOBAL hGlobal; - DROPFILES *pDropFiles; - int offset; - - TRACE("(%p,%p,%u)\n", pidlRoot, apidl, cidl); - - /* get the size needed */ - size = sizeof(DROPFILES); - - SHGetPathFromIDListA(pidlRoot, szRootPath); - PathAddBackslashA(szRootPath); - rootsize = strlen(szRootPath); - - for (i=0; ipFiles = sizeof(DROPFILES); - pDropFiles->fWide = FALSE; - - offset = pDropFiles->pFiles; - strcpy(szFileName, szRootPath); - - for (i=0; icidl = cidl; - - /* root pidl */ - offset = sizeof(CIDA) + sizeof (UINT)*(cidl); - pcida->aoffset[0] = offset; /* first element */ - sizePidl = ILGetSize (pidlRoot); - memcpy(((LPBYTE)pcida)+offset, pidlRoot, sizePidl); - offset += sizePidl; - - for(i=0; iaoffset[i+1] = offset; - sizePidl = ILGetSize(apidl[i]); - memcpy(((LPBYTE)pcida)+offset, apidl[i], sizePidl); - offset += sizePidl; - } - - GlobalUnlock(hGlobal); - return hGlobal; -} - -HGLOBAL RenderSHELLIDLISTOFFSET (LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl) -{ - FIXME("\n"); - return 0; -} - -HGLOBAL RenderFILECONTENTS (LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl) -{ - FIXME("\n"); - return 0; -} - -HGLOBAL RenderFILEDESCRIPTOR (LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl) -{ - FIXME("\n"); - return 0; -} - -HGLOBAL RenderFILENAMEA (LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl) -{ - int size = 0; - char szTemp[MAX_PATH], *szFileName; - LPITEMIDLIST pidl; - HGLOBAL hGlobal; - HRESULT hr; - - TRACE("(%p,%p,%u)\n", pidlRoot, apidl, cidl); - - /* get path of combined pidl */ - pidl = ILCombine(pidlRoot, apidl[0]); - if (!pidl) - return 0; - - hr = SHELL_GetPathFromIDListA(pidl, szTemp, MAX_PATH); - SHFree(pidl); - if (FAILED(hr)) - return 0; - - size = strlen(szTemp) + 1; - - /* fill the structure */ - hGlobal = GlobalAlloc(GHND|GMEM_SHARE, size); - if(!hGlobal) return hGlobal; - szFileName = (char *)GlobalLock(hGlobal); - memcpy(szFileName, szTemp, size); - GlobalUnlock(hGlobal); - - return hGlobal; -} - -HGLOBAL RenderFILENAMEW (LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl) -{ - int size = 0; - WCHAR szTemp[MAX_PATH], *szFileName; - LPITEMIDLIST pidl; - HGLOBAL hGlobal; - HRESULT hr; - - TRACE("(%p,%p,%u)\n", pidlRoot, apidl, cidl); - - /* get path of combined pidl */ - pidl = ILCombine(pidlRoot, apidl[0]); - if (!pidl) - return 0; - - hr = SHELL_GetPathFromIDListW(pidl, szTemp, MAX_PATH); - SHFree(pidl); - if (FAILED(hr)) - return 0; - - size = (strlenW(szTemp)+1) * sizeof(WCHAR); - - /* fill the structure */ - hGlobal = GlobalAlloc(GHND|GMEM_SHARE, size); - if(!hGlobal) return hGlobal; - szFileName = (WCHAR *)GlobalLock(hGlobal); - memcpy(szFileName, szTemp, size); - GlobalUnlock(hGlobal); - - return hGlobal; -} - -HGLOBAL RenderPREFEREDDROPEFFECT (DWORD dwFlags) -{ - DWORD * pdwFlag; - HGLOBAL hGlobal; - - TRACE("(0x%08lx)\n", dwFlags); - - hGlobal = GlobalAlloc(GHND|GMEM_SHARE, sizeof(DWORD)); - if(!hGlobal) return hGlobal; - pdwFlag = (DWORD*)GlobalLock(hGlobal); - *pdwFlag = dwFlags; - GlobalUnlock(hGlobal); - return hGlobal; -} - -/************************************************************************** - * IsDataInClipboard - * - * checks if there is something in the clipboard we can use - */ -BOOL IsDataInClipboard (HWND hwnd) -{ - BOOL ret = FALSE; - - if (OpenClipboard(hwnd)) - { - if (GetOpenClipboardWindow()) - { - ret = IsClipboardFormatAvailable(CF_TEXT); - } - CloseClipboard(); - } - return ret; -} +/* + * clipboard helper functions + * + * Copyright 2000 Juergen Schmied + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * NOTES: + * + * For copy & paste functions within contextmenus does the shell use + * the OLE clipboard functions in combination with dataobjects. + * The OLE32.DLL gets loaded with LoadLibrary + * + * - a right mousebutton-copy sets the following formats: + * classic: + * Shell IDList Array + * Prefered Drop Effect + * Shell Object Offsets + * HDROP + * FileName + * ole: + * OlePrivateData (ClipboardDataObjectInterface) + * + */ + +#include +#include + +#include "windef.h" +#include "winbase.h" +#include "winreg.h" +#include "wingdi.h" +#include "pidl.h" +#include "undocshell.h" +#include "shell32_main.h" +#include "shlwapi.h" + +#include "wine/unicode.h" +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(shell); + +/************************************************************************** + * RenderHDROP + * + * creates a CF_HDROP structure + */ +HGLOBAL RenderHDROP(LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl) +{ + UINT i; + int rootsize = 0,size = 0; + char szRootPath[MAX_PATH]; + char szFileName[MAX_PATH]; + HGLOBAL hGlobal; + DROPFILES *pDropFiles; + int offset; + + TRACE("(%p,%p,%u)\n", pidlRoot, apidl, cidl); + + /* get the size needed */ + size = sizeof(DROPFILES); + + SHGetPathFromIDListA(pidlRoot, szRootPath); + PathAddBackslashA(szRootPath); + rootsize = strlen(szRootPath); + + for (i=0; ipFiles = sizeof(DROPFILES); + pDropFiles->fWide = FALSE; + + offset = pDropFiles->pFiles; + strcpy(szFileName, szRootPath); + + for (i=0; icidl = cidl; + + /* root pidl */ + offset = sizeof(CIDA) + sizeof (UINT)*(cidl); + pcida->aoffset[0] = offset; /* first element */ + sizePidl = ILGetSize (pidlRoot); + memcpy(((LPBYTE)pcida)+offset, pidlRoot, sizePidl); + offset += sizePidl; + + for(i=0; iaoffset[i+1] = offset; + sizePidl = ILGetSize(apidl[i]); + memcpy(((LPBYTE)pcida)+offset, apidl[i], sizePidl); + offset += sizePidl; + } + + GlobalUnlock(hGlobal); + return hGlobal; +} + +HGLOBAL RenderSHELLIDLISTOFFSET (LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl) +{ + FIXME("\n"); + return 0; +} + +HGLOBAL RenderFILECONTENTS (LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl) +{ + FIXME("\n"); + return 0; +} + +HGLOBAL RenderFILEDESCRIPTOR (LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl) +{ + FIXME("\n"); + return 0; +} + +HGLOBAL RenderFILENAMEA (LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl) +{ + int size = 0; + char szTemp[MAX_PATH], *szFileName; + LPITEMIDLIST pidl; + HGLOBAL hGlobal; + HRESULT hr; + + TRACE("(%p,%p,%u)\n", pidlRoot, apidl, cidl); + + /* get path of combined pidl */ + pidl = ILCombine(pidlRoot, apidl[0]); + if (!pidl) + return 0; + + hr = SHELL_GetPathFromIDListA(pidl, szTemp, MAX_PATH); + SHFree(pidl); + if (FAILED(hr)) + return 0; + + size = strlen(szTemp) + 1; + + /* fill the structure */ + hGlobal = GlobalAlloc(GHND|GMEM_SHARE, size); + if(!hGlobal) return hGlobal; + szFileName = (char *)GlobalLock(hGlobal); + memcpy(szFileName, szTemp, size); + GlobalUnlock(hGlobal); + + return hGlobal; +} + +HGLOBAL RenderFILENAMEW (LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl) +{ + int size = 0; + WCHAR szTemp[MAX_PATH], *szFileName; + LPITEMIDLIST pidl; + HGLOBAL hGlobal; + HRESULT hr; + + TRACE("(%p,%p,%u)\n", pidlRoot, apidl, cidl); + + /* get path of combined pidl */ + pidl = ILCombine(pidlRoot, apidl[0]); + if (!pidl) + return 0; + + hr = SHELL_GetPathFromIDListW(pidl, szTemp, MAX_PATH); + SHFree(pidl); + if (FAILED(hr)) + return 0; + + size = (strlenW(szTemp)+1) * sizeof(WCHAR); + + /* fill the structure */ + hGlobal = GlobalAlloc(GHND|GMEM_SHARE, size); + if(!hGlobal) return hGlobal; + szFileName = (WCHAR *)GlobalLock(hGlobal); + memcpy(szFileName, szTemp, size); + GlobalUnlock(hGlobal); + + return hGlobal; +} + +HGLOBAL RenderPREFEREDDROPEFFECT (DWORD dwFlags) +{ + DWORD * pdwFlag; + HGLOBAL hGlobal; + + TRACE("(0x%08lx)\n", dwFlags); + + hGlobal = GlobalAlloc(GHND|GMEM_SHARE, sizeof(DWORD)); + if(!hGlobal) return hGlobal; + pdwFlag = (DWORD*)GlobalLock(hGlobal); + *pdwFlag = dwFlags; + GlobalUnlock(hGlobal); + return hGlobal; +} + +/************************************************************************** + * IsDataInClipboard + * + * checks if there is something in the clipboard we can use + */ +BOOL IsDataInClipboard (HWND hwnd) +{ + BOOL ret = FALSE; + + if (OpenClipboard(hwnd)) + { + if (GetOpenClipboardWindow()) + { + ret = IsClipboardFormatAvailable(CF_TEXT); + } + CloseClipboard(); + } + return ret; +} diff --git a/reactos/lib/shell32/control.c b/reactos/lib/shell32/control.c index 3d331d2185b..f0a07167e0f 100644 --- a/reactos/lib/shell32/control.c +++ b/reactos/lib/shell32/control.c @@ -1,499 +1,499 @@ -/* Control Panel management - * - * Copyright 2001 Eric Pouech - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include -#include -#include -#include -#include - -#include "windef.h" -#include "winbase.h" -#include "wingdi.h" -#include "winuser.h" -#include "wine/winbase16.h" -#include "wownt32.h" -#include "wine/debug.h" -#include "cpl.h" -#include "wine/unicode.h" - -#define NO_SHLWAPI_REG -#include "shlwapi.h" - -#include "cpanel.h" - -WINE_DEFAULT_DEBUG_CHANNEL(shlctrl); - -CPlApplet* Control_UnloadApplet(CPlApplet* applet) -{ - unsigned i; - CPlApplet* next; - - for (i = 0; i < applet->count; i++) { - if (!applet->info[i].dwSize) continue; - applet->proc(applet->hWnd, CPL_STOP, i, applet->info[i].lData); - } - if (applet->proc) applet->proc(applet->hWnd, CPL_EXIT, 0L, 0L); - FreeLibrary(applet->hModule); - next = applet->next; - HeapFree(GetProcessHeap(), 0, applet); - return next; -} - -CPlApplet* Control_LoadApplet(HWND hWnd, LPCWSTR cmd, CPanel* panel) -{ - CPlApplet* applet; - unsigned i; - CPLINFO info; - NEWCPLINFOW newinfo; - - if (!(applet = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*applet)))) - return applet; - - applet->hWnd = hWnd; - - if (!(applet->hModule = LoadLibraryW(cmd))) { - WARN("Cannot load control panel applet %s\n", debugstr_w(cmd)); - goto theError; - } - if (!(applet->proc = (APPLET_PROC)GetProcAddress(applet->hModule, "CPlApplet"))) { - WARN("Not a valid control panel applet %s\n", debugstr_w(cmd)); - goto theError; - } - if (!applet->proc(hWnd, CPL_INIT, 0L, 0L)) { - WARN("Init of applet has failed\n"); - goto theError; - } - if ((applet->count = applet->proc(hWnd, CPL_GETCOUNT, 0L, 0L)) == 0) { - WARN("No subprogram in applet\n"); - goto theError; - } - - applet = HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, applet, - sizeof(*applet) + (applet->count - 1) * sizeof(NEWCPLINFOW)); - - for (i = 0; i < applet->count; i++) { - ZeroMemory(&newinfo, sizeof(newinfo)); - newinfo.dwSize = sizeof(NEWCPLINFOA); - applet->info[i].dwSize = sizeof(NEWCPLINFOW); - /* proc is supposed to return a null value upon success for - * CPL_INQUIRE and CPL_NEWINQUIRE - * However, real drivers don't seem to behave like this - * So, use introspection rather than return value - */ - applet->proc(hWnd, CPL_NEWINQUIRE, i, (LPARAM)&newinfo); - if (newinfo.hIcon == 0) { - applet->proc(hWnd, CPL_INQUIRE, i, (LPARAM)&info); - if (info.idIcon == 0 || info.idName == 0) { - WARN("Couldn't get info from sp %u\n", i); - applet->info[i].dwSize = 0; - } else { - /* convert the old data into the new structure */ - applet->info[i].dwFlags = 0; - applet->info[i].dwHelpContext = 0; - applet->info[i].lData = info.lData; - applet->info[i].hIcon = LoadIconW(applet->hModule, - MAKEINTRESOURCEW(info.idIcon)); - LoadStringW(applet->hModule, info.idName, - applet->info[i].szName, sizeof(applet->info[i].szName) / sizeof(WCHAR)); - LoadStringW(applet->hModule, info.idInfo, - applet->info[i].szInfo, sizeof(applet->info[i].szInfo) / sizeof(WCHAR)); - applet->info[i].szHelpFile[0] = '\0'; - } - } - else - { - CopyMemory(&applet->info[i], &newinfo, newinfo.dwSize); - if (newinfo.dwSize != sizeof(NEWCPLINFOW)) - { - applet->info[i].dwSize = sizeof(NEWCPLINFOW); - MultiByteToWideChar(CP_ACP, 0, ((LPNEWCPLINFOA)&newinfo)->szName, - sizeof(((LPNEWCPLINFOA)&newinfo)->szName) / sizeof(CHAR), - applet->info[i].szName, - sizeof(applet->info[i].szName) / sizeof(WCHAR)); - MultiByteToWideChar(CP_ACP, 0, ((LPNEWCPLINFOA)&newinfo)->szInfo, - sizeof(((LPNEWCPLINFOA)&newinfo)->szInfo) / sizeof(CHAR), - applet->info[i].szInfo, - sizeof(applet->info[i].szInfo) / sizeof(WCHAR)); - MultiByteToWideChar(CP_ACP, 0, ((LPNEWCPLINFOA)&newinfo)->szHelpFile, - sizeof(((LPNEWCPLINFOA)&newinfo)->szHelpFile) / sizeof(CHAR), - applet->info[i].szHelpFile, - sizeof(applet->info[i].szHelpFile) / sizeof(WCHAR)); - } - } - } - - applet->next = panel->first; - panel->first = applet; - - return applet; - - theError: - Control_UnloadApplet(applet); - return NULL; -} - -static void Control_WndProc_Create(HWND hWnd, const CREATESTRUCTA* cs) -{ - CPanel* panel = (CPanel*)cs->lpCreateParams; - - SetWindowLongA(hWnd, 0, (LPARAM)panel); - panel->status = 0; - panel->hWnd = hWnd; -} - -#define XICON 32 -#define XSTEP 128 -#define YICON 32 -#define YSTEP 64 - -static BOOL Control_Localize(const CPanel* panel, unsigned cx, unsigned cy, - CPlApplet** papplet, unsigned* psp) -{ - unsigned i, x = (XSTEP-XICON)/2, y = 0; - CPlApplet* applet; - RECT rc; - - GetClientRect(panel->hWnd, &rc); - for (applet = panel->first; applet; applet = applet->next) { - for (i = 0; i < applet->count; i++) { - if (!applet->info[i].dwSize) continue; - if (x + XSTEP >= rc.right - rc.left) { - x = (XSTEP-XICON)/2; - y += YSTEP; - } - if (cx >= x && cx < x + XICON && cy >= y && cy < y + YSTEP) { - *papplet = applet; - *psp = i; - return TRUE; - } - x += XSTEP; - } - } - return FALSE; -} - -static LRESULT Control_WndProc_Paint(const CPanel* panel, WPARAM wParam) -{ - HDC hdc; - PAINTSTRUCT ps; - RECT rc, txtRect; - unsigned i, x = 0, y = 0; - CPlApplet* applet; - HGDIOBJ hOldFont; - - hdc = (wParam) ? (HDC)wParam : BeginPaint(panel->hWnd, &ps); - hOldFont = SelectObject(hdc, GetStockObject(ANSI_VAR_FONT)); - GetClientRect(panel->hWnd, &rc); - for (applet = panel->first; applet; applet = applet->next) { - for (i = 0; i < applet->count; i++) { - if (x + XSTEP >= rc.right - rc.left) { - x = 0; - y += YSTEP; - } - if (!applet->info[i].dwSize) continue; - DrawIcon(hdc, x + (XSTEP-XICON)/2, y, applet->info[i].hIcon); - txtRect.left = x; - txtRect.right = x + XSTEP; - txtRect.top = y + YICON; - txtRect.bottom = y + YSTEP; - DrawTextW(hdc, applet->info[i].szName, -1, &txtRect, - DT_CENTER | DT_VCENTER); - x += XSTEP; - } - } - SelectObject(hdc, hOldFont); - if (!wParam) EndPaint(panel->hWnd, &ps); - return 0; -} - -static LRESULT Control_WndProc_LButton(CPanel* panel, LPARAM lParam, BOOL up) -{ - unsigned i; - CPlApplet* applet; - - if (Control_Localize(panel, LOWORD(lParam), HIWORD(lParam), &applet, &i)) { - if (up) { - if (panel->clkApplet == applet && panel->clkSP == i) { - applet->proc(applet->hWnd, CPL_DBLCLK, i, applet->info[i].lData); - } - } else { - panel->clkApplet = applet; - panel->clkSP = i; - } - } - return 0; -} - -static LRESULT WINAPI Control_WndProc(HWND hWnd, UINT wMsg, - WPARAM lParam1, LPARAM lParam2) -{ - CPanel* panel = (CPanel*)GetWindowLongA(hWnd, 0); - - if (panel || wMsg == WM_CREATE) { - switch (wMsg) { - case WM_CREATE: - Control_WndProc_Create(hWnd, (CREATESTRUCTA*)lParam2); - return 0; - case WM_DESTROY: - { - CPlApplet* applet = panel->first; - while (applet) - applet = Control_UnloadApplet(applet); - } - PostQuitMessage(0); - break; - case WM_PAINT: - return Control_WndProc_Paint(panel, lParam1); - case WM_LBUTTONUP: - return Control_WndProc_LButton(panel, lParam2, TRUE); - case WM_LBUTTONDOWN: - return Control_WndProc_LButton(panel, lParam2, FALSE); -/* EPP case WM_COMMAND: */ -/* EPP return Control_WndProc_Command(mwi, lParam1, lParam2); */ - } - } - - return DefWindowProcA(hWnd, wMsg, lParam1, lParam2); -} - -static void Control_DoInterface(CPanel* panel, HWND hWnd, HINSTANCE hInst) -{ - WNDCLASSA wc; - MSG msg; - const CHAR* appName = "Wine Control Panel"; - wc.style = CS_HREDRAW|CS_VREDRAW; - wc.lpfnWndProc = Control_WndProc; - wc.cbClsExtra = 0; - wc.cbWndExtra = sizeof(CPlApplet*); - wc.hInstance = hInst; - wc.hIcon = 0; - wc.hCursor = 0; - wc.hbrBackground = GetStockObject(WHITE_BRUSH); - wc.lpszMenuName = NULL; - wc.lpszClassName = "Shell_Control_WndClass"; - - if (!RegisterClassA(&wc)) return; - - CreateWindowExA(0, wc.lpszClassName, appName, - WS_OVERLAPPEDWINDOW | WS_VISIBLE, - CW_USEDEFAULT, CW_USEDEFAULT, - CW_USEDEFAULT, CW_USEDEFAULT, - hWnd, NULL, hInst, panel); - if (!panel->hWnd) return; - - if (!panel->first) { - /* FIXME appName & message should be localized */ - MessageBoxA(panel->hWnd, "Cannot load any applets", appName, MB_OK); - return; - } - - while (GetMessageA(&msg, panel->hWnd, 0, 0)) { - TranslateMessage(&msg); - DispatchMessageA(&msg); - } -} - -static void Control_DoWindow(CPanel* panel, HWND hWnd, HINSTANCE hInst) -{ - HANDLE h; - WIN32_FIND_DATAW fd; - WCHAR buffer[MAX_PATH]; - static const WCHAR wszAllCpl[] = {'*','.','c','p','l',0}; - WCHAR *p; - - GetSystemDirectoryW( buffer, MAX_PATH ); - p = buffer + strlenW(buffer); - *p++ = '\\'; - lstrcpyW(p, wszAllCpl); - - if ((h = FindFirstFileW(buffer, &fd)) != INVALID_HANDLE_VALUE) { - do { - lstrcpyW(p, fd.cFileName); - Control_LoadApplet(hWnd, buffer, panel); - } while (FindNextFileW(h, &fd)); - FindClose(h); - } - - Control_DoInterface(panel, hWnd, hInst); -} - -static void Control_DoLaunch(CPanel* panel, HWND hWnd, LPCWSTR wszCmd) - /* forms to parse: - * foo.cpl,@sp,str - * foo.cpl,@sp - * foo.cpl,,str - * foo.cpl @sp - * foo.cpl str - * "a path\foo.cpl" - */ -{ - LPWSTR buffer; - LPWSTR beg = NULL; - LPWSTR end; - WCHAR ch; - LPWSTR ptr; - unsigned sp = 0; - LPWSTR extraPmts = NULL; - int quoted = 0; - - buffer = HeapAlloc(GetProcessHeap(), 0, (lstrlenW(wszCmd) + 1) * sizeof(*wszCmd)); - if (!buffer) return; - - end = lstrcpyW(buffer, wszCmd); - - for (;;) { - ch = *end; - if (ch == '"') quoted = !quoted; - if (!quoted && (ch == ' ' || ch == ',' || ch == '\0')) { - *end = '\0'; - if (beg) { - if (*beg == '@') { - sp = atoiW(beg + 1); - } else if (*beg == '\0') { - sp = 0; - } else { - extraPmts = beg; - } - } - if (ch == '\0') break; - beg = end + 1; - if (ch == ' ') while (end[1] == ' ') end++; - } - end++; - } - while ((ptr = StrChrW(buffer, '"'))) - memmove(ptr, ptr+1, lstrlenW(ptr)*sizeof(WCHAR)); - - TRACE("cmd %s, extra %s, sp %d\n", debugstr_w(buffer), debugstr_w(extraPmts), sp); - - Control_LoadApplet(hWnd, buffer, panel); - - if (panel->first) { - CPlApplet* applet = panel->first; - - assert(applet && applet->next == NULL); - if (sp >= applet->count) { - WARN("Out of bounds (%u >= %u), setting to 0\n", sp, applet->count); - sp = 0; - } - if (applet->info[sp].dwSize) { - if (!applet->proc(applet->hWnd, CPL_STARTWPARMSA, sp, (LPARAM)extraPmts)) - applet->proc(applet->hWnd, CPL_DBLCLK, sp, applet->info[sp].lData); - } - Control_UnloadApplet(applet); - } - HeapFree(GetProcessHeap(), 0, buffer); -} - -/************************************************************************* - * Control_RunDLLW [SHELL32.@] - * - */ -void WINAPI Control_RunDLLW(HWND hWnd, HINSTANCE hInst, LPCWSTR cmd, DWORD nCmdShow) -{ - CPanel panel; - - TRACE("(%p, %p, %s, 0x%08lx)\n", - hWnd, hInst, debugstr_w(cmd), nCmdShow); - - memset(&panel, 0, sizeof(panel)); - - if (!cmd || !*cmd) { - Control_DoWindow(&panel, hWnd, hInst); - } else { - Control_DoLaunch(&panel, hWnd, cmd); - } -} - -/************************************************************************* - * Control_RunDLLA [SHELL32.@] - * - */ -void WINAPI Control_RunDLLA(HWND hWnd, HINSTANCE hInst, LPCSTR cmd, DWORD nCmdShow) -{ - DWORD len = MultiByteToWideChar(CP_ACP, 0, cmd, -1, NULL, 0 ); - LPWSTR wszCmd = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); - if (wszCmd && MultiByteToWideChar(CP_ACP, 0, cmd, -1, wszCmd, len )) - { - Control_RunDLLW(hWnd, hInst, wszCmd, nCmdShow); - } - HeapFree(GetProcessHeap(), 0, wszCmd); -} - -/************************************************************************* - * Control_FillCache_RunDLLW [SHELL32.@] - * - */ -HRESULT WINAPI Control_FillCache_RunDLLW(HWND hWnd, HANDLE hModule, DWORD w, DWORD x) -{ - FIXME("%p %p 0x%08lx 0x%08lx stub\n", hWnd, hModule, w, x); - return 0; -} - -/************************************************************************* - * Control_FillCache_RunDLLA [SHELL32.@] - * - */ -HRESULT WINAPI Control_FillCache_RunDLLA(HWND hWnd, HANDLE hModule, DWORD w, DWORD x) -{ - return Control_FillCache_RunDLLW(hWnd, hModule, w, x); -} - - -/************************************************************************* - * RunDLL_CallEntry16 [SHELL32.122] - * the name is probably wrong - */ -void WINAPI RunDLL_CallEntry16( DWORD proc, HWND hwnd, HINSTANCE inst, - LPCSTR cmdline, INT cmdshow ) -{ -#if !defined(__CYGWIN__) && !defined (__MINGW32__) && !defined(_MSC_VER) - WORD args[5]; - SEGPTR cmdline_seg; - - TRACE( "proc %lx hwnd %p inst %p cmdline %s cmdshow %d\n", - proc, hwnd, inst, debugstr_a(cmdline), cmdshow ); - - cmdline_seg = MapLS( cmdline ); - args[4] = HWND_16(hwnd); - args[3] = MapHModuleLS(inst); - args[2] = SELECTOROF(cmdline_seg); - args[1] = OFFSETOF(cmdline_seg); - args[0] = cmdshow; - WOWCallback16Ex( proc, WCB16_PASCAL, sizeof(args), args, NULL ); - UnMapLS( cmdline_seg ); -#else - FIXME( "proc %lx hwnd %p inst %p cmdline %s cmdshow %d\n", - proc, hwnd, inst, debugstr_a(cmdline), cmdshow ); -#endif -} - -/************************************************************************* - * CallCPLEntry16 [SHELL32.166] - * - * called by desk.cpl on "Advanced" with: - * hMod("DeskCp16.Dll"), pFunc("CplApplet"), 0, 1, 0xc, 0 - * - */ -DWORD WINAPI CallCPLEntry16(HMODULE hMod, FARPROC pFunc, DWORD dw3, DWORD dw4, DWORD dw5, DWORD dw6) -{ - FIXME("(%p, %p, %08lx, %08lx, %08lx, %08lx): stub.\n", hMod, pFunc, dw3, dw4, dw5, dw6); - return 0x0deadbee; -} +/* Control Panel management + * + * Copyright 2001 Eric Pouech + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include +#include +#include +#include +#include + +#include "windef.h" +#include "winbase.h" +#include "wingdi.h" +#include "winuser.h" +#include "wine/winbase16.h" +#include "wownt32.h" +#include "wine/debug.h" +#include "cpl.h" +#include "wine/unicode.h" + +#define NO_SHLWAPI_REG +#include "shlwapi.h" + +#include "cpanel.h" + +WINE_DEFAULT_DEBUG_CHANNEL(shlctrl); + +CPlApplet* Control_UnloadApplet(CPlApplet* applet) +{ + unsigned i; + CPlApplet* next; + + for (i = 0; i < applet->count; i++) { + if (!applet->info[i].dwSize) continue; + applet->proc(applet->hWnd, CPL_STOP, i, applet->info[i].lData); + } + if (applet->proc) applet->proc(applet->hWnd, CPL_EXIT, 0L, 0L); + FreeLibrary(applet->hModule); + next = applet->next; + HeapFree(GetProcessHeap(), 0, applet); + return next; +} + +CPlApplet* Control_LoadApplet(HWND hWnd, LPCWSTR cmd, CPanel* panel) +{ + CPlApplet* applet; + unsigned i; + CPLINFO info; + NEWCPLINFOW newinfo; + + if (!(applet = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*applet)))) + return applet; + + applet->hWnd = hWnd; + + if (!(applet->hModule = LoadLibraryW(cmd))) { + WARN("Cannot load control panel applet %s\n", debugstr_w(cmd)); + goto theError; + } + if (!(applet->proc = (APPLET_PROC)GetProcAddress(applet->hModule, "CPlApplet"))) { + WARN("Not a valid control panel applet %s\n", debugstr_w(cmd)); + goto theError; + } + if (!applet->proc(hWnd, CPL_INIT, 0L, 0L)) { + WARN("Init of applet has failed\n"); + goto theError; + } + if ((applet->count = applet->proc(hWnd, CPL_GETCOUNT, 0L, 0L)) == 0) { + WARN("No subprogram in applet\n"); + goto theError; + } + + applet = HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, applet, + sizeof(*applet) + (applet->count - 1) * sizeof(NEWCPLINFOW)); + + for (i = 0; i < applet->count; i++) { + ZeroMemory(&newinfo, sizeof(newinfo)); + newinfo.dwSize = sizeof(NEWCPLINFOA); + applet->info[i].dwSize = sizeof(NEWCPLINFOW); + /* proc is supposed to return a null value upon success for + * CPL_INQUIRE and CPL_NEWINQUIRE + * However, real drivers don't seem to behave like this + * So, use introspection rather than return value + */ + applet->proc(hWnd, CPL_NEWINQUIRE, i, (LPARAM)&newinfo); + if (newinfo.hIcon == 0) { + applet->proc(hWnd, CPL_INQUIRE, i, (LPARAM)&info); + if (info.idIcon == 0 || info.idName == 0) { + WARN("Couldn't get info from sp %u\n", i); + applet->info[i].dwSize = 0; + } else { + /* convert the old data into the new structure */ + applet->info[i].dwFlags = 0; + applet->info[i].dwHelpContext = 0; + applet->info[i].lData = info.lData; + applet->info[i].hIcon = LoadIconW(applet->hModule, + MAKEINTRESOURCEW(info.idIcon)); + LoadStringW(applet->hModule, info.idName, + applet->info[i].szName, sizeof(applet->info[i].szName) / sizeof(WCHAR)); + LoadStringW(applet->hModule, info.idInfo, + applet->info[i].szInfo, sizeof(applet->info[i].szInfo) / sizeof(WCHAR)); + applet->info[i].szHelpFile[0] = '\0'; + } + } + else + { + CopyMemory(&applet->info[i], &newinfo, newinfo.dwSize); + if (newinfo.dwSize != sizeof(NEWCPLINFOW)) + { + applet->info[i].dwSize = sizeof(NEWCPLINFOW); + MultiByteToWideChar(CP_ACP, 0, ((LPNEWCPLINFOA)&newinfo)->szName, + sizeof(((LPNEWCPLINFOA)&newinfo)->szName) / sizeof(CHAR), + applet->info[i].szName, + sizeof(applet->info[i].szName) / sizeof(WCHAR)); + MultiByteToWideChar(CP_ACP, 0, ((LPNEWCPLINFOA)&newinfo)->szInfo, + sizeof(((LPNEWCPLINFOA)&newinfo)->szInfo) / sizeof(CHAR), + applet->info[i].szInfo, + sizeof(applet->info[i].szInfo) / sizeof(WCHAR)); + MultiByteToWideChar(CP_ACP, 0, ((LPNEWCPLINFOA)&newinfo)->szHelpFile, + sizeof(((LPNEWCPLINFOA)&newinfo)->szHelpFile) / sizeof(CHAR), + applet->info[i].szHelpFile, + sizeof(applet->info[i].szHelpFile) / sizeof(WCHAR)); + } + } + } + + applet->next = panel->first; + panel->first = applet; + + return applet; + + theError: + Control_UnloadApplet(applet); + return NULL; +} + +static void Control_WndProc_Create(HWND hWnd, const CREATESTRUCTA* cs) +{ + CPanel* panel = (CPanel*)cs->lpCreateParams; + + SetWindowLongA(hWnd, 0, (LPARAM)panel); + panel->status = 0; + panel->hWnd = hWnd; +} + +#define XICON 32 +#define XSTEP 128 +#define YICON 32 +#define YSTEP 64 + +static BOOL Control_Localize(const CPanel* panel, unsigned cx, unsigned cy, + CPlApplet** papplet, unsigned* psp) +{ + unsigned i, x = (XSTEP-XICON)/2, y = 0; + CPlApplet* applet; + RECT rc; + + GetClientRect(panel->hWnd, &rc); + for (applet = panel->first; applet; applet = applet->next) { + for (i = 0; i < applet->count; i++) { + if (!applet->info[i].dwSize) continue; + if (x + XSTEP >= rc.right - rc.left) { + x = (XSTEP-XICON)/2; + y += YSTEP; + } + if (cx >= x && cx < x + XICON && cy >= y && cy < y + YSTEP) { + *papplet = applet; + *psp = i; + return TRUE; + } + x += XSTEP; + } + } + return FALSE; +} + +static LRESULT Control_WndProc_Paint(const CPanel* panel, WPARAM wParam) +{ + HDC hdc; + PAINTSTRUCT ps; + RECT rc, txtRect; + unsigned i, x = 0, y = 0; + CPlApplet* applet; + HGDIOBJ hOldFont; + + hdc = (wParam) ? (HDC)wParam : BeginPaint(panel->hWnd, &ps); + hOldFont = SelectObject(hdc, GetStockObject(ANSI_VAR_FONT)); + GetClientRect(panel->hWnd, &rc); + for (applet = panel->first; applet; applet = applet->next) { + for (i = 0; i < applet->count; i++) { + if (x + XSTEP >= rc.right - rc.left) { + x = 0; + y += YSTEP; + } + if (!applet->info[i].dwSize) continue; + DrawIcon(hdc, x + (XSTEP-XICON)/2, y, applet->info[i].hIcon); + txtRect.left = x; + txtRect.right = x + XSTEP; + txtRect.top = y + YICON; + txtRect.bottom = y + YSTEP; + DrawTextW(hdc, applet->info[i].szName, -1, &txtRect, + DT_CENTER | DT_VCENTER); + x += XSTEP; + } + } + SelectObject(hdc, hOldFont); + if (!wParam) EndPaint(panel->hWnd, &ps); + return 0; +} + +static LRESULT Control_WndProc_LButton(CPanel* panel, LPARAM lParam, BOOL up) +{ + unsigned i; + CPlApplet* applet; + + if (Control_Localize(panel, LOWORD(lParam), HIWORD(lParam), &applet, &i)) { + if (up) { + if (panel->clkApplet == applet && panel->clkSP == i) { + applet->proc(applet->hWnd, CPL_DBLCLK, i, applet->info[i].lData); + } + } else { + panel->clkApplet = applet; + panel->clkSP = i; + } + } + return 0; +} + +static LRESULT WINAPI Control_WndProc(HWND hWnd, UINT wMsg, + WPARAM lParam1, LPARAM lParam2) +{ + CPanel* panel = (CPanel*)GetWindowLongA(hWnd, 0); + + if (panel || wMsg == WM_CREATE) { + switch (wMsg) { + case WM_CREATE: + Control_WndProc_Create(hWnd, (CREATESTRUCTA*)lParam2); + return 0; + case WM_DESTROY: + { + CPlApplet* applet = panel->first; + while (applet) + applet = Control_UnloadApplet(applet); + } + PostQuitMessage(0); + break; + case WM_PAINT: + return Control_WndProc_Paint(panel, lParam1); + case WM_LBUTTONUP: + return Control_WndProc_LButton(panel, lParam2, TRUE); + case WM_LBUTTONDOWN: + return Control_WndProc_LButton(panel, lParam2, FALSE); +/* EPP case WM_COMMAND: */ +/* EPP return Control_WndProc_Command(mwi, lParam1, lParam2); */ + } + } + + return DefWindowProcA(hWnd, wMsg, lParam1, lParam2); +} + +static void Control_DoInterface(CPanel* panel, HWND hWnd, HINSTANCE hInst) +{ + WNDCLASSA wc; + MSG msg; + const CHAR* appName = "Wine Control Panel"; + wc.style = CS_HREDRAW|CS_VREDRAW; + wc.lpfnWndProc = Control_WndProc; + wc.cbClsExtra = 0; + wc.cbWndExtra = sizeof(CPlApplet*); + wc.hInstance = hInst; + wc.hIcon = 0; + wc.hCursor = 0; + wc.hbrBackground = GetStockObject(WHITE_BRUSH); + wc.lpszMenuName = NULL; + wc.lpszClassName = "Shell_Control_WndClass"; + + if (!RegisterClassA(&wc)) return; + + CreateWindowExA(0, wc.lpszClassName, appName, + WS_OVERLAPPEDWINDOW | WS_VISIBLE, + CW_USEDEFAULT, CW_USEDEFAULT, + CW_USEDEFAULT, CW_USEDEFAULT, + hWnd, NULL, hInst, panel); + if (!panel->hWnd) return; + + if (!panel->first) { + /* FIXME appName & message should be localized */ + MessageBoxA(panel->hWnd, "Cannot load any applets", appName, MB_OK); + return; + } + + while (GetMessageA(&msg, panel->hWnd, 0, 0)) { + TranslateMessage(&msg); + DispatchMessageA(&msg); + } +} + +static void Control_DoWindow(CPanel* panel, HWND hWnd, HINSTANCE hInst) +{ + HANDLE h; + WIN32_FIND_DATAW fd; + WCHAR buffer[MAX_PATH]; + static const WCHAR wszAllCpl[] = {'*','.','c','p','l',0}; + WCHAR *p; + + GetSystemDirectoryW( buffer, MAX_PATH ); + p = buffer + strlenW(buffer); + *p++ = '\\'; + lstrcpyW(p, wszAllCpl); + + if ((h = FindFirstFileW(buffer, &fd)) != INVALID_HANDLE_VALUE) { + do { + lstrcpyW(p, fd.cFileName); + Control_LoadApplet(hWnd, buffer, panel); + } while (FindNextFileW(h, &fd)); + FindClose(h); + } + + Control_DoInterface(panel, hWnd, hInst); +} + +static void Control_DoLaunch(CPanel* panel, HWND hWnd, LPCWSTR wszCmd) + /* forms to parse: + * foo.cpl,@sp,str + * foo.cpl,@sp + * foo.cpl,,str + * foo.cpl @sp + * foo.cpl str + * "a path\foo.cpl" + */ +{ + LPWSTR buffer; + LPWSTR beg = NULL; + LPWSTR end; + WCHAR ch; + LPWSTR ptr; + unsigned sp = 0; + LPWSTR extraPmts = NULL; + int quoted = 0; + + buffer = HeapAlloc(GetProcessHeap(), 0, (lstrlenW(wszCmd) + 1) * sizeof(*wszCmd)); + if (!buffer) return; + + end = lstrcpyW(buffer, wszCmd); + + for (;;) { + ch = *end; + if (ch == '"') quoted = !quoted; + if (!quoted && (ch == ' ' || ch == ',' || ch == '\0')) { + *end = '\0'; + if (beg) { + if (*beg == '@') { + sp = atoiW(beg + 1); + } else if (*beg == '\0') { + sp = 0; + } else { + extraPmts = beg; + } + } + if (ch == '\0') break; + beg = end + 1; + if (ch == ' ') while (end[1] == ' ') end++; + } + end++; + } + while ((ptr = StrChrW(buffer, '"'))) + memmove(ptr, ptr+1, lstrlenW(ptr)*sizeof(WCHAR)); + + TRACE("cmd %s, extra %s, sp %d\n", debugstr_w(buffer), debugstr_w(extraPmts), sp); + + Control_LoadApplet(hWnd, buffer, panel); + + if (panel->first) { + CPlApplet* applet = panel->first; + + assert(applet && applet->next == NULL); + if (sp >= applet->count) { + WARN("Out of bounds (%u >= %u), setting to 0\n", sp, applet->count); + sp = 0; + } + if (applet->info[sp].dwSize) { + if (!applet->proc(applet->hWnd, CPL_STARTWPARMSA, sp, (LPARAM)extraPmts)) + applet->proc(applet->hWnd, CPL_DBLCLK, sp, applet->info[sp].lData); + } + Control_UnloadApplet(applet); + } + HeapFree(GetProcessHeap(), 0, buffer); +} + +/************************************************************************* + * Control_RunDLLW [SHELL32.@] + * + */ +void WINAPI Control_RunDLLW(HWND hWnd, HINSTANCE hInst, LPCWSTR cmd, DWORD nCmdShow) +{ + CPanel panel; + + TRACE("(%p, %p, %s, 0x%08lx)\n", + hWnd, hInst, debugstr_w(cmd), nCmdShow); + + memset(&panel, 0, sizeof(panel)); + + if (!cmd || !*cmd) { + Control_DoWindow(&panel, hWnd, hInst); + } else { + Control_DoLaunch(&panel, hWnd, cmd); + } +} + +/************************************************************************* + * Control_RunDLLA [SHELL32.@] + * + */ +void WINAPI Control_RunDLLA(HWND hWnd, HINSTANCE hInst, LPCSTR cmd, DWORD nCmdShow) +{ + DWORD len = MultiByteToWideChar(CP_ACP, 0, cmd, -1, NULL, 0 ); + LPWSTR wszCmd = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); + if (wszCmd && MultiByteToWideChar(CP_ACP, 0, cmd, -1, wszCmd, len )) + { + Control_RunDLLW(hWnd, hInst, wszCmd, nCmdShow); + } + HeapFree(GetProcessHeap(), 0, wszCmd); +} + +/************************************************************************* + * Control_FillCache_RunDLLW [SHELL32.@] + * + */ +HRESULT WINAPI Control_FillCache_RunDLLW(HWND hWnd, HANDLE hModule, DWORD w, DWORD x) +{ + FIXME("%p %p 0x%08lx 0x%08lx stub\n", hWnd, hModule, w, x); + return 0; +} + +/************************************************************************* + * Control_FillCache_RunDLLA [SHELL32.@] + * + */ +HRESULT WINAPI Control_FillCache_RunDLLA(HWND hWnd, HANDLE hModule, DWORD w, DWORD x) +{ + return Control_FillCache_RunDLLW(hWnd, hModule, w, x); +} + + +/************************************************************************* + * RunDLL_CallEntry16 [SHELL32.122] + * the name is probably wrong + */ +void WINAPI RunDLL_CallEntry16( DWORD proc, HWND hwnd, HINSTANCE inst, + LPCSTR cmdline, INT cmdshow ) +{ +#if !defined(__CYGWIN__) && !defined (__MINGW32__) && !defined(_MSC_VER) + WORD args[5]; + SEGPTR cmdline_seg; + + TRACE( "proc %lx hwnd %p inst %p cmdline %s cmdshow %d\n", + proc, hwnd, inst, debugstr_a(cmdline), cmdshow ); + + cmdline_seg = MapLS( cmdline ); + args[4] = HWND_16(hwnd); + args[3] = MapHModuleLS(inst); + args[2] = SELECTOROF(cmdline_seg); + args[1] = OFFSETOF(cmdline_seg); + args[0] = cmdshow; + WOWCallback16Ex( proc, WCB16_PASCAL, sizeof(args), args, NULL ); + UnMapLS( cmdline_seg ); +#else + FIXME( "proc %lx hwnd %p inst %p cmdline %s cmdshow %d\n", + proc, hwnd, inst, debugstr_a(cmdline), cmdshow ); +#endif +} + +/************************************************************************* + * CallCPLEntry16 [SHELL32.166] + * + * called by desk.cpl on "Advanced" with: + * hMod("DeskCp16.Dll"), pFunc("CplApplet"), 0, 1, 0xc, 0 + * + */ +DWORD WINAPI CallCPLEntry16(HMODULE hMod, FARPROC pFunc, DWORD dw3, DWORD dw4, DWORD dw5, DWORD dw6) +{ + FIXME("(%p, %p, %08lx, %08lx, %08lx, %08lx): stub.\n", hMod, pFunc, dw3, dw4, dw5, dw6); + return 0x0deadbee; +} diff --git a/reactos/lib/shell32/cpanel.h b/reactos/lib/shell32/cpanel.h index e0a65b9877f..aa6b49962b8 100644 --- a/reactos/lib/shell32/cpanel.h +++ b/reactos/lib/shell32/cpanel.h @@ -1,47 +1,47 @@ -/* Control Panel management - * - * Copyright 2001 Eric Pouech - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#ifndef __WINE_SHELL_CPANEL_H -#define __WINE_SHELL_CPANEL_H - -#include "cpl.h" - -typedef struct CPlApplet { - struct CPlApplet* next; /* linked list */ - HWND hWnd; - unsigned count; /* number of subprograms */ - HMODULE hModule; /* module of loaded applet */ - APPLET_PROC proc; /* entry point address */ - NEWCPLINFOW info[1]; /* array of count information. - * dwSize field is 0 if entry is invalid */ -} CPlApplet; - -typedef struct CPanel { - CPlApplet* first; /* linked list */ - HWND hWnd; - unsigned status; - CPlApplet* clkApplet; - unsigned clkSP; -} CPanel; - - -CPlApplet* Control_LoadApplet(HWND hWnd, LPCWSTR cmd, CPanel* panel); -CPlApplet* Control_UnloadApplet(CPlApplet* applet); - -#endif /* __WINE_SHELL_CPANEL_H */ +/* Control Panel management + * + * Copyright 2001 Eric Pouech + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef __WINE_SHELL_CPANEL_H +#define __WINE_SHELL_CPANEL_H + +#include "cpl.h" + +typedef struct CPlApplet { + struct CPlApplet* next; /* linked list */ + HWND hWnd; + unsigned count; /* number of subprograms */ + HMODULE hModule; /* module of loaded applet */ + APPLET_PROC proc; /* entry point address */ + NEWCPLINFOW info[1]; /* array of count information. + * dwSize field is 0 if entry is invalid */ +} CPlApplet; + +typedef struct CPanel { + CPlApplet* first; /* linked list */ + HWND hWnd; + unsigned status; + CPlApplet* clkApplet; + unsigned clkSP; +} CPanel; + + +CPlApplet* Control_LoadApplet(HWND hWnd, LPCWSTR cmd, CPanel* panel); +CPlApplet* Control_UnloadApplet(CPlApplet* applet); + +#endif /* __WINE_SHELL_CPANEL_H */ diff --git a/reactos/lib/shell32/dataobject.c b/reactos/lib/shell32/dataobject.c index e104e5abf2c..96adeb04a40 100644 --- a/reactos/lib/shell32/dataobject.c +++ b/reactos/lib/shell32/dataobject.c @@ -1,458 +1,458 @@ -/* - * IEnumFORMATETC, IDataObject - * - * selecting and droping objects within the shell and/or common dialogs - * - * Copyright 1998, 1999 - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ -#include - -#define COBJMACROS -#define NONAMELESSUNION -#define NONAMELESSSTRUCT - -#include "windef.h" -#include "wingdi.h" -#include "pidl.h" -#include "winerror.h" -#include "shell32_main.h" -#include "wine/debug.h" -#include "undocshell.h" - -WINE_DEFAULT_DEBUG_CHANNEL(shell); - -/*********************************************************************** -* IEnumFORMATETC implementation -*/ - -typedef struct -{ - /* IUnknown fields */ - IEnumFORMATETCVtbl *lpVtbl; - DWORD ref; - /* IEnumFORMATETC fields */ - UINT posFmt; - UINT countFmt; - LPFORMATETC pFmt; -} IEnumFORMATETCImpl; - -static HRESULT WINAPI IEnumFORMATETC_fnQueryInterface(LPENUMFORMATETC iface, REFIID riid, LPVOID* ppvObj); -static ULONG WINAPI IEnumFORMATETC_fnAddRef(LPENUMFORMATETC iface); -static ULONG WINAPI IEnumFORMATETC_fnRelease(LPENUMFORMATETC iface); -static HRESULT WINAPI IEnumFORMATETC_fnNext(LPENUMFORMATETC iface, ULONG celt, FORMATETC* rgelt, ULONG* pceltFethed); -static HRESULT WINAPI IEnumFORMATETC_fnSkip(LPENUMFORMATETC iface, ULONG celt); -static HRESULT WINAPI IEnumFORMATETC_fnReset(LPENUMFORMATETC iface); -static HRESULT WINAPI IEnumFORMATETC_fnClone(LPENUMFORMATETC iface, LPENUMFORMATETC* ppenum); - -static struct IEnumFORMATETCVtbl efvt = -{ - IEnumFORMATETC_fnQueryInterface, - IEnumFORMATETC_fnAddRef, - IEnumFORMATETC_fnRelease, - IEnumFORMATETC_fnNext, - IEnumFORMATETC_fnSkip, - IEnumFORMATETC_fnReset, - IEnumFORMATETC_fnClone -}; - -LPENUMFORMATETC IEnumFORMATETC_Constructor(UINT cfmt, const FORMATETC afmt[]) -{ - IEnumFORMATETCImpl* ef; - DWORD size=cfmt * sizeof(FORMATETC); - - ef=(IEnumFORMATETCImpl*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IEnumFORMATETCImpl)); - - if(ef) - { - ef->ref=1; - ef->lpVtbl=&efvt; - - ef->countFmt = cfmt; - ef->pFmt = SHAlloc (size); - - if (ef->pFmt) - { - memcpy(ef->pFmt, afmt, size); - } - } - - TRACE("(%p)->(%u,%p)\n",ef, cfmt, afmt); - return (LPENUMFORMATETC)ef; -} - -static HRESULT WINAPI IEnumFORMATETC_fnQueryInterface(LPENUMFORMATETC iface, REFIID riid, LPVOID* ppvObj) -{ - IEnumFORMATETCImpl *This = (IEnumFORMATETCImpl *)iface; - TRACE("(%p)->(\n\tIID:\t%s,%p)\n",This,debugstr_guid(riid),ppvObj); - - *ppvObj = NULL; - - if(IsEqualIID(riid, &IID_IUnknown)) - { - *ppvObj = This; - } - else if(IsEqualIID(riid, &IID_IEnumFORMATETC)) - { - *ppvObj = (IEnumFORMATETC*)This; - } - - if(*ppvObj) - { - IUnknown_AddRef((IUnknown*)(*ppvObj)); - TRACE("-- Interface: (%p)->(%p)\n",ppvObj,*ppvObj); - return S_OK; - } - TRACE("-- Interface: E_NOINTERFACE\n"); - return E_NOINTERFACE; - -} - -static ULONG WINAPI IEnumFORMATETC_fnAddRef(LPENUMFORMATETC iface) -{ - IEnumFORMATETCImpl *This = (IEnumFORMATETCImpl *)iface; - TRACE("(%p)->(count=%lu)\n",This, This->ref); - return ++(This->ref); -} - -static ULONG WINAPI IEnumFORMATETC_fnRelease(LPENUMFORMATETC iface) -{ - IEnumFORMATETCImpl *This = (IEnumFORMATETCImpl *)iface; - TRACE("(%p)->()\n",This); - - if (!--(This->ref)) - { - TRACE(" destroying IEnumFORMATETC(%p)\n",This); - if (This->pFmt) - { - SHFree (This->pFmt); - } - HeapFree(GetProcessHeap(),0,This); - return 0; - } - return This->ref; -} - -static HRESULT WINAPI IEnumFORMATETC_fnNext(LPENUMFORMATETC iface, ULONG celt, FORMATETC *rgelt, ULONG *pceltFethed) -{ - IEnumFORMATETCImpl *This = (IEnumFORMATETCImpl *)iface; - UINT i; - - TRACE("(%p)->(%lu,%p)\n", This, celt, rgelt); - - if(!This->pFmt)return S_FALSE; - if(!rgelt) return E_INVALIDARG; - if (pceltFethed) *pceltFethed = 0; - - for(i = 0; This->posFmt < This->countFmt && celt > i; i++) - { - *rgelt++ = This->pFmt[This->posFmt++]; - } - - if (pceltFethed) *pceltFethed = i; - - return ((i == celt) ? S_OK : S_FALSE); -} - -static HRESULT WINAPI IEnumFORMATETC_fnSkip(LPENUMFORMATETC iface, ULONG celt) -{ - IEnumFORMATETCImpl *This = (IEnumFORMATETCImpl *)iface; - TRACE("(%p)->(num=%lu)\n", This, celt); - - if((This->posFmt + celt) >= This->countFmt) return S_FALSE; - This->posFmt += celt; - return S_OK; -} - -static HRESULT WINAPI IEnumFORMATETC_fnReset(LPENUMFORMATETC iface) -{ - IEnumFORMATETCImpl *This = (IEnumFORMATETCImpl *)iface; - TRACE("(%p)->()\n", This); - - This->posFmt = 0; - return S_OK; -} - -static HRESULT WINAPI IEnumFORMATETC_fnClone(LPENUMFORMATETC iface, LPENUMFORMATETC* ppenum) -{ - IEnumFORMATETCImpl *This = (IEnumFORMATETCImpl *)iface; - TRACE("(%p)->(ppenum=%p)\n", This, ppenum); - - if (!ppenum) return E_INVALIDARG; - *ppenum = IEnumFORMATETC_Constructor(This->countFmt, This->pFmt); - if(*ppenum) - IEnumFORMATETC_fnSkip(*ppenum, This->posFmt); - return S_OK; -} - - -/*********************************************************************** -* IDataObject implementation -*/ - -/* number of supported formats */ -#define MAX_FORMATS 4 - -typedef struct -{ - /* IUnknown fields */ - IDataObjectVtbl *lpVtbl; - DWORD ref; - - /* IDataObject fields */ - LPITEMIDLIST pidl; - LPITEMIDLIST * apidl; - UINT cidl; - - FORMATETC pFormatEtc[MAX_FORMATS]; - UINT cfShellIDList; - UINT cfFileNameA; - UINT cfFileNameW; - -} IDataObjectImpl; - -static struct IDataObjectVtbl dtovt; - -/************************************************************************** -* IDataObject_Constructor -*/ -LPDATAOBJECT IDataObject_Constructor(HWND hwndOwner, LPCITEMIDLIST pMyPidl, LPCITEMIDLIST * apidl, UINT cidl) -{ - IDataObjectImpl* dto; - - dto = (IDataObjectImpl*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDataObjectImpl)); - - if (dto) - { - dto->ref = 1; - dto->lpVtbl = &dtovt; - dto->pidl = ILClone(pMyPidl); - dto->apidl = _ILCopyaPidl(apidl, cidl); - dto->cidl = cidl; - - dto->cfShellIDList = RegisterClipboardFormatA(CFSTR_SHELLIDLIST); - dto->cfFileNameA = RegisterClipboardFormatA(CFSTR_FILENAMEA); - dto->cfFileNameW = RegisterClipboardFormatA(CFSTR_FILENAMEW); - InitFormatEtc(dto->pFormatEtc[0], dto->cfShellIDList, TYMED_HGLOBAL); - InitFormatEtc(dto->pFormatEtc[1], CF_HDROP, TYMED_HGLOBAL); - InitFormatEtc(dto->pFormatEtc[2], dto->cfFileNameA, TYMED_HGLOBAL); - InitFormatEtc(dto->pFormatEtc[3], dto->cfFileNameW, TYMED_HGLOBAL); - } - - TRACE("(%p)->(apidl=%p cidl=%u)\n",dto, apidl, cidl); - return (LPDATAOBJECT)dto; -} - -/*************************************************************************** -* IDataObject_QueryInterface -*/ -static HRESULT WINAPI IDataObject_fnQueryInterface(LPDATAOBJECT iface, REFIID riid, LPVOID * ppvObj) -{ - IDataObjectImpl *This = (IDataObjectImpl *)iface; - TRACE("(%p)->(\n\tIID:\t%s,%p)\n",This,debugstr_guid(riid),ppvObj); - - *ppvObj = NULL; - - if(IsEqualIID(riid, &IID_IUnknown)) /*IUnknown*/ - { - *ppvObj = This; - } - else if(IsEqualIID(riid, &IID_IDataObject)) /*IDataObject*/ - { - *ppvObj = (IDataObject*)This; - } - - if(*ppvObj) - { - IUnknown_AddRef((IUnknown*)*ppvObj); - TRACE("-- Interface: (%p)->(%p)\n",ppvObj,*ppvObj); - return S_OK; - } - TRACE("-- Interface: E_NOINTERFACE\n"); - return E_NOINTERFACE; -} - -/************************************************************************** -* IDataObject_AddRef -*/ -static ULONG WINAPI IDataObject_fnAddRef(LPDATAOBJECT iface) -{ - IDataObjectImpl *This = (IDataObjectImpl *)iface; - TRACE("(%p)->(count=%lu)\n",This, This->ref); - return ++(This->ref); -} - -/************************************************************************** -* IDataObject_Release -*/ -static ULONG WINAPI IDataObject_fnRelease(LPDATAOBJECT iface) -{ - IDataObjectImpl *This = (IDataObjectImpl *)iface; - TRACE("(%p)->()\n",This); - - if (!--(This->ref)) - { - TRACE(" destroying IDataObject(%p)\n",This); - _ILFreeaPidl(This->apidl, This->cidl); - ILFree(This->pidl), - HeapFree(GetProcessHeap(),0,This); - return 0; - } - return This->ref; -} - -/************************************************************************** -* IDataObject_fnGetData -*/ -static HRESULT WINAPI IDataObject_fnGetData(LPDATAOBJECT iface, LPFORMATETC pformatetcIn, STGMEDIUM *pmedium) -{ - IDataObjectImpl *This = (IDataObjectImpl *)iface; - - char szTemp[256]; - - szTemp[0]=0; - GetClipboardFormatNameA (pformatetcIn->cfFormat, szTemp, 256); - TRACE("(%p)->(%p %p format=%s)\n", This, pformatetcIn, pmedium, szTemp); - - if (pformatetcIn->cfFormat == This->cfShellIDList) - { - if (This->cidl < 1) return(E_UNEXPECTED); - pmedium->u.hGlobal = RenderSHELLIDLIST(This->pidl, This->apidl, This->cidl); - } - else if (pformatetcIn->cfFormat == CF_HDROP) - { - if (This->cidl < 1) return(E_UNEXPECTED); - pmedium->u.hGlobal = RenderHDROP(This->pidl, This->apidl, This->cidl); - } - else if (pformatetcIn->cfFormat == This->cfFileNameA) - { - if (This->cidl < 1) return(E_UNEXPECTED); - pmedium->u.hGlobal = RenderFILENAMEA(This->pidl, This->apidl, This->cidl); - } - else if (pformatetcIn->cfFormat == This->cfFileNameW) - { - if (This->cidl < 1) return(E_UNEXPECTED); - pmedium->u.hGlobal = RenderFILENAMEW(This->pidl, This->apidl, This->cidl); - } - else - { - FIXME("-- expected clipformat not implemented\n"); - return (E_INVALIDARG); - } - if (pmedium->u.hGlobal) - { - pmedium->tymed = TYMED_HGLOBAL; - pmedium->pUnkForRelease = NULL; - return S_OK; - } - return E_OUTOFMEMORY; -} - -static HRESULT WINAPI IDataObject_fnGetDataHere(LPDATAOBJECT iface, LPFORMATETC pformatetc, STGMEDIUM *pmedium) -{ - IDataObjectImpl *This = (IDataObjectImpl *)iface; - FIXME("(%p)->()\n", This); - return E_NOTIMPL; -} - -static HRESULT WINAPI IDataObject_fnQueryGetData(LPDATAOBJECT iface, LPFORMATETC pformatetc) -{ - IDataObjectImpl *This = (IDataObjectImpl *)iface; - UINT i; - - TRACE("(%p)->(fmt=0x%08x tym=0x%08lx)\n", This, pformatetc->cfFormat, pformatetc->tymed); - - if(!(DVASPECT_CONTENT & pformatetc->dwAspect)) - return DV_E_DVASPECT; - - /* check our formats table what we have */ - for (i=0; ipFormatEtc[i].cfFormat == pformatetc->cfFormat) - && (This->pFormatEtc[i].tymed == pformatetc->tymed)) - { - return S_OK; - } - } - - return DV_E_TYMED; -} - -static HRESULT WINAPI IDataObject_fnGetCanonicalFormatEtc(LPDATAOBJECT iface, LPFORMATETC pformatectIn, LPFORMATETC pformatetcOut) -{ - IDataObjectImpl *This = (IDataObjectImpl *)iface; - FIXME("(%p)->()\n", This); - return E_NOTIMPL; -} - -static HRESULT WINAPI IDataObject_fnSetData(LPDATAOBJECT iface, LPFORMATETC pformatetc, STGMEDIUM *pmedium, BOOL fRelease) -{ - IDataObjectImpl *This = (IDataObjectImpl *)iface; - FIXME("(%p)->()\n", This); - return E_NOTIMPL; -} - -static HRESULT WINAPI IDataObject_fnEnumFormatEtc(LPDATAOBJECT iface, DWORD dwDirection, IEnumFORMATETC **ppenumFormatEtc) -{ - IDataObjectImpl *This = (IDataObjectImpl *)iface; - - TRACE("(%p)->()\n", This); - *ppenumFormatEtc=NULL; - - /* only get data */ - if (DATADIR_GET == dwDirection) - { - *ppenumFormatEtc = IEnumFORMATETC_Constructor(MAX_FORMATS, This->pFormatEtc); - return (*ppenumFormatEtc) ? S_OK : E_FAIL; - } - - return E_NOTIMPL; -} - -static HRESULT WINAPI IDataObject_fnDAdvise(LPDATAOBJECT iface, FORMATETC *pformatetc, DWORD advf, IAdviseSink *pAdvSink, DWORD *pdwConnection) -{ - IDataObjectImpl *This = (IDataObjectImpl *)iface; - FIXME("(%p)->()\n", This); - return E_NOTIMPL; -} -static HRESULT WINAPI IDataObject_fnDUnadvise(LPDATAOBJECT iface, DWORD dwConnection) -{ - IDataObjectImpl *This = (IDataObjectImpl *)iface; - FIXME("(%p)->()\n", This); - return E_NOTIMPL; -} -static HRESULT WINAPI IDataObject_fnEnumDAdvise(LPDATAOBJECT iface, IEnumSTATDATA **ppenumAdvise) -{ - IDataObjectImpl *This = (IDataObjectImpl *)iface; - FIXME("(%p)->()\n", This); - return E_NOTIMPL; -} - -static struct IDataObjectVtbl dtovt = -{ - IDataObject_fnQueryInterface, - IDataObject_fnAddRef, - IDataObject_fnRelease, - IDataObject_fnGetData, - IDataObject_fnGetDataHere, - IDataObject_fnQueryGetData, - IDataObject_fnGetCanonicalFormatEtc, - IDataObject_fnSetData, - IDataObject_fnEnumFormatEtc, - IDataObject_fnDAdvise, - IDataObject_fnDUnadvise, - IDataObject_fnEnumDAdvise -}; +/* + * IEnumFORMATETC, IDataObject + * + * selecting and droping objects within the shell and/or common dialogs + * + * Copyright 1998, 1999 + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#include + +#define COBJMACROS +#define NONAMELESSUNION +#define NONAMELESSSTRUCT + +#include "windef.h" +#include "wingdi.h" +#include "pidl.h" +#include "winerror.h" +#include "shell32_main.h" +#include "wine/debug.h" +#include "undocshell.h" + +WINE_DEFAULT_DEBUG_CHANNEL(shell); + +/*********************************************************************** +* IEnumFORMATETC implementation +*/ + +typedef struct +{ + /* IUnknown fields */ + IEnumFORMATETCVtbl *lpVtbl; + DWORD ref; + /* IEnumFORMATETC fields */ + UINT posFmt; + UINT countFmt; + LPFORMATETC pFmt; +} IEnumFORMATETCImpl; + +static HRESULT WINAPI IEnumFORMATETC_fnQueryInterface(LPENUMFORMATETC iface, REFIID riid, LPVOID* ppvObj); +static ULONG WINAPI IEnumFORMATETC_fnAddRef(LPENUMFORMATETC iface); +static ULONG WINAPI IEnumFORMATETC_fnRelease(LPENUMFORMATETC iface); +static HRESULT WINAPI IEnumFORMATETC_fnNext(LPENUMFORMATETC iface, ULONG celt, FORMATETC* rgelt, ULONG* pceltFethed); +static HRESULT WINAPI IEnumFORMATETC_fnSkip(LPENUMFORMATETC iface, ULONG celt); +static HRESULT WINAPI IEnumFORMATETC_fnReset(LPENUMFORMATETC iface); +static HRESULT WINAPI IEnumFORMATETC_fnClone(LPENUMFORMATETC iface, LPENUMFORMATETC* ppenum); + +static struct IEnumFORMATETCVtbl efvt = +{ + IEnumFORMATETC_fnQueryInterface, + IEnumFORMATETC_fnAddRef, + IEnumFORMATETC_fnRelease, + IEnumFORMATETC_fnNext, + IEnumFORMATETC_fnSkip, + IEnumFORMATETC_fnReset, + IEnumFORMATETC_fnClone +}; + +LPENUMFORMATETC IEnumFORMATETC_Constructor(UINT cfmt, const FORMATETC afmt[]) +{ + IEnumFORMATETCImpl* ef; + DWORD size=cfmt * sizeof(FORMATETC); + + ef=(IEnumFORMATETCImpl*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IEnumFORMATETCImpl)); + + if(ef) + { + ef->ref=1; + ef->lpVtbl=&efvt; + + ef->countFmt = cfmt; + ef->pFmt = SHAlloc (size); + + if (ef->pFmt) + { + memcpy(ef->pFmt, afmt, size); + } + } + + TRACE("(%p)->(%u,%p)\n",ef, cfmt, afmt); + return (LPENUMFORMATETC)ef; +} + +static HRESULT WINAPI IEnumFORMATETC_fnQueryInterface(LPENUMFORMATETC iface, REFIID riid, LPVOID* ppvObj) +{ + IEnumFORMATETCImpl *This = (IEnumFORMATETCImpl *)iface; + TRACE("(%p)->(\n\tIID:\t%s,%p)\n",This,debugstr_guid(riid),ppvObj); + + *ppvObj = NULL; + + if(IsEqualIID(riid, &IID_IUnknown)) + { + *ppvObj = This; + } + else if(IsEqualIID(riid, &IID_IEnumFORMATETC)) + { + *ppvObj = (IEnumFORMATETC*)This; + } + + if(*ppvObj) + { + IUnknown_AddRef((IUnknown*)(*ppvObj)); + TRACE("-- Interface: (%p)->(%p)\n",ppvObj,*ppvObj); + return S_OK; + } + TRACE("-- Interface: E_NOINTERFACE\n"); + return E_NOINTERFACE; + +} + +static ULONG WINAPI IEnumFORMATETC_fnAddRef(LPENUMFORMATETC iface) +{ + IEnumFORMATETCImpl *This = (IEnumFORMATETCImpl *)iface; + TRACE("(%p)->(count=%lu)\n",This, This->ref); + return ++(This->ref); +} + +static ULONG WINAPI IEnumFORMATETC_fnRelease(LPENUMFORMATETC iface) +{ + IEnumFORMATETCImpl *This = (IEnumFORMATETCImpl *)iface; + TRACE("(%p)->()\n",This); + + if (!--(This->ref)) + { + TRACE(" destroying IEnumFORMATETC(%p)\n",This); + if (This->pFmt) + { + SHFree (This->pFmt); + } + HeapFree(GetProcessHeap(),0,This); + return 0; + } + return This->ref; +} + +static HRESULT WINAPI IEnumFORMATETC_fnNext(LPENUMFORMATETC iface, ULONG celt, FORMATETC *rgelt, ULONG *pceltFethed) +{ + IEnumFORMATETCImpl *This = (IEnumFORMATETCImpl *)iface; + UINT i; + + TRACE("(%p)->(%lu,%p)\n", This, celt, rgelt); + + if(!This->pFmt)return S_FALSE; + if(!rgelt) return E_INVALIDARG; + if (pceltFethed) *pceltFethed = 0; + + for(i = 0; This->posFmt < This->countFmt && celt > i; i++) + { + *rgelt++ = This->pFmt[This->posFmt++]; + } + + if (pceltFethed) *pceltFethed = i; + + return ((i == celt) ? S_OK : S_FALSE); +} + +static HRESULT WINAPI IEnumFORMATETC_fnSkip(LPENUMFORMATETC iface, ULONG celt) +{ + IEnumFORMATETCImpl *This = (IEnumFORMATETCImpl *)iface; + TRACE("(%p)->(num=%lu)\n", This, celt); + + if((This->posFmt + celt) >= This->countFmt) return S_FALSE; + This->posFmt += celt; + return S_OK; +} + +static HRESULT WINAPI IEnumFORMATETC_fnReset(LPENUMFORMATETC iface) +{ + IEnumFORMATETCImpl *This = (IEnumFORMATETCImpl *)iface; + TRACE("(%p)->()\n", This); + + This->posFmt = 0; + return S_OK; +} + +static HRESULT WINAPI IEnumFORMATETC_fnClone(LPENUMFORMATETC iface, LPENUMFORMATETC* ppenum) +{ + IEnumFORMATETCImpl *This = (IEnumFORMATETCImpl *)iface; + TRACE("(%p)->(ppenum=%p)\n", This, ppenum); + + if (!ppenum) return E_INVALIDARG; + *ppenum = IEnumFORMATETC_Constructor(This->countFmt, This->pFmt); + if(*ppenum) + IEnumFORMATETC_fnSkip(*ppenum, This->posFmt); + return S_OK; +} + + +/*********************************************************************** +* IDataObject implementation +*/ + +/* number of supported formats */ +#define MAX_FORMATS 4 + +typedef struct +{ + /* IUnknown fields */ + IDataObjectVtbl *lpVtbl; + DWORD ref; + + /* IDataObject fields */ + LPITEMIDLIST pidl; + LPITEMIDLIST * apidl; + UINT cidl; + + FORMATETC pFormatEtc[MAX_FORMATS]; + UINT cfShellIDList; + UINT cfFileNameA; + UINT cfFileNameW; + +} IDataObjectImpl; + +static struct IDataObjectVtbl dtovt; + +/************************************************************************** +* IDataObject_Constructor +*/ +LPDATAOBJECT IDataObject_Constructor(HWND hwndOwner, LPCITEMIDLIST pMyPidl, LPCITEMIDLIST * apidl, UINT cidl) +{ + IDataObjectImpl* dto; + + dto = (IDataObjectImpl*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDataObjectImpl)); + + if (dto) + { + dto->ref = 1; + dto->lpVtbl = &dtovt; + dto->pidl = ILClone(pMyPidl); + dto->apidl = _ILCopyaPidl(apidl, cidl); + dto->cidl = cidl; + + dto->cfShellIDList = RegisterClipboardFormatA(CFSTR_SHELLIDLIST); + dto->cfFileNameA = RegisterClipboardFormatA(CFSTR_FILENAMEA); + dto->cfFileNameW = RegisterClipboardFormatA(CFSTR_FILENAMEW); + InitFormatEtc(dto->pFormatEtc[0], dto->cfShellIDList, TYMED_HGLOBAL); + InitFormatEtc(dto->pFormatEtc[1], CF_HDROP, TYMED_HGLOBAL); + InitFormatEtc(dto->pFormatEtc[2], dto->cfFileNameA, TYMED_HGLOBAL); + InitFormatEtc(dto->pFormatEtc[3], dto->cfFileNameW, TYMED_HGLOBAL); + } + + TRACE("(%p)->(apidl=%p cidl=%u)\n",dto, apidl, cidl); + return (LPDATAOBJECT)dto; +} + +/*************************************************************************** +* IDataObject_QueryInterface +*/ +static HRESULT WINAPI IDataObject_fnQueryInterface(LPDATAOBJECT iface, REFIID riid, LPVOID * ppvObj) +{ + IDataObjectImpl *This = (IDataObjectImpl *)iface; + TRACE("(%p)->(\n\tIID:\t%s,%p)\n",This,debugstr_guid(riid),ppvObj); + + *ppvObj = NULL; + + if(IsEqualIID(riid, &IID_IUnknown)) /*IUnknown*/ + { + *ppvObj = This; + } + else if(IsEqualIID(riid, &IID_IDataObject)) /*IDataObject*/ + { + *ppvObj = (IDataObject*)This; + } + + if(*ppvObj) + { + IUnknown_AddRef((IUnknown*)*ppvObj); + TRACE("-- Interface: (%p)->(%p)\n",ppvObj,*ppvObj); + return S_OK; + } + TRACE("-- Interface: E_NOINTERFACE\n"); + return E_NOINTERFACE; +} + +/************************************************************************** +* IDataObject_AddRef +*/ +static ULONG WINAPI IDataObject_fnAddRef(LPDATAOBJECT iface) +{ + IDataObjectImpl *This = (IDataObjectImpl *)iface; + TRACE("(%p)->(count=%lu)\n",This, This->ref); + return ++(This->ref); +} + +/************************************************************************** +* IDataObject_Release +*/ +static ULONG WINAPI IDataObject_fnRelease(LPDATAOBJECT iface) +{ + IDataObjectImpl *This = (IDataObjectImpl *)iface; + TRACE("(%p)->()\n",This); + + if (!--(This->ref)) + { + TRACE(" destroying IDataObject(%p)\n",This); + _ILFreeaPidl(This->apidl, This->cidl); + ILFree(This->pidl), + HeapFree(GetProcessHeap(),0,This); + return 0; + } + return This->ref; +} + +/************************************************************************** +* IDataObject_fnGetData +*/ +static HRESULT WINAPI IDataObject_fnGetData(LPDATAOBJECT iface, LPFORMATETC pformatetcIn, STGMEDIUM *pmedium) +{ + IDataObjectImpl *This = (IDataObjectImpl *)iface; + + char szTemp[256]; + + szTemp[0]=0; + GetClipboardFormatNameA (pformatetcIn->cfFormat, szTemp, 256); + TRACE("(%p)->(%p %p format=%s)\n", This, pformatetcIn, pmedium, szTemp); + + if (pformatetcIn->cfFormat == This->cfShellIDList) + { + if (This->cidl < 1) return(E_UNEXPECTED); + pmedium->u.hGlobal = RenderSHELLIDLIST(This->pidl, This->apidl, This->cidl); + } + else if (pformatetcIn->cfFormat == CF_HDROP) + { + if (This->cidl < 1) return(E_UNEXPECTED); + pmedium->u.hGlobal = RenderHDROP(This->pidl, This->apidl, This->cidl); + } + else if (pformatetcIn->cfFormat == This->cfFileNameA) + { + if (This->cidl < 1) return(E_UNEXPECTED); + pmedium->u.hGlobal = RenderFILENAMEA(This->pidl, This->apidl, This->cidl); + } + else if (pformatetcIn->cfFormat == This->cfFileNameW) + { + if (This->cidl < 1) return(E_UNEXPECTED); + pmedium->u.hGlobal = RenderFILENAMEW(This->pidl, This->apidl, This->cidl); + } + else + { + FIXME("-- expected clipformat not implemented\n"); + return (E_INVALIDARG); + } + if (pmedium->u.hGlobal) + { + pmedium->tymed = TYMED_HGLOBAL; + pmedium->pUnkForRelease = NULL; + return S_OK; + } + return E_OUTOFMEMORY; +} + +static HRESULT WINAPI IDataObject_fnGetDataHere(LPDATAOBJECT iface, LPFORMATETC pformatetc, STGMEDIUM *pmedium) +{ + IDataObjectImpl *This = (IDataObjectImpl *)iface; + FIXME("(%p)->()\n", This); + return E_NOTIMPL; +} + +static HRESULT WINAPI IDataObject_fnQueryGetData(LPDATAOBJECT iface, LPFORMATETC pformatetc) +{ + IDataObjectImpl *This = (IDataObjectImpl *)iface; + UINT i; + + TRACE("(%p)->(fmt=0x%08x tym=0x%08lx)\n", This, pformatetc->cfFormat, pformatetc->tymed); + + if(!(DVASPECT_CONTENT & pformatetc->dwAspect)) + return DV_E_DVASPECT; + + /* check our formats table what we have */ + for (i=0; ipFormatEtc[i].cfFormat == pformatetc->cfFormat) + && (This->pFormatEtc[i].tymed == pformatetc->tymed)) + { + return S_OK; + } + } + + return DV_E_TYMED; +} + +static HRESULT WINAPI IDataObject_fnGetCanonicalFormatEtc(LPDATAOBJECT iface, LPFORMATETC pformatectIn, LPFORMATETC pformatetcOut) +{ + IDataObjectImpl *This = (IDataObjectImpl *)iface; + FIXME("(%p)->()\n", This); + return E_NOTIMPL; +} + +static HRESULT WINAPI IDataObject_fnSetData(LPDATAOBJECT iface, LPFORMATETC pformatetc, STGMEDIUM *pmedium, BOOL fRelease) +{ + IDataObjectImpl *This = (IDataObjectImpl *)iface; + FIXME("(%p)->()\n", This); + return E_NOTIMPL; +} + +static HRESULT WINAPI IDataObject_fnEnumFormatEtc(LPDATAOBJECT iface, DWORD dwDirection, IEnumFORMATETC **ppenumFormatEtc) +{ + IDataObjectImpl *This = (IDataObjectImpl *)iface; + + TRACE("(%p)->()\n", This); + *ppenumFormatEtc=NULL; + + /* only get data */ + if (DATADIR_GET == dwDirection) + { + *ppenumFormatEtc = IEnumFORMATETC_Constructor(MAX_FORMATS, This->pFormatEtc); + return (*ppenumFormatEtc) ? S_OK : E_FAIL; + } + + return E_NOTIMPL; +} + +static HRESULT WINAPI IDataObject_fnDAdvise(LPDATAOBJECT iface, FORMATETC *pformatetc, DWORD advf, IAdviseSink *pAdvSink, DWORD *pdwConnection) +{ + IDataObjectImpl *This = (IDataObjectImpl *)iface; + FIXME("(%p)->()\n", This); + return E_NOTIMPL; +} +static HRESULT WINAPI IDataObject_fnDUnadvise(LPDATAOBJECT iface, DWORD dwConnection) +{ + IDataObjectImpl *This = (IDataObjectImpl *)iface; + FIXME("(%p)->()\n", This); + return E_NOTIMPL; +} +static HRESULT WINAPI IDataObject_fnEnumDAdvise(LPDATAOBJECT iface, IEnumSTATDATA **ppenumAdvise) +{ + IDataObjectImpl *This = (IDataObjectImpl *)iface; + FIXME("(%p)->()\n", This); + return E_NOTIMPL; +} + +static struct IDataObjectVtbl dtovt = +{ + IDataObject_fnQueryInterface, + IDataObject_fnAddRef, + IDataObject_fnRelease, + IDataObject_fnGetData, + IDataObject_fnGetDataHere, + IDataObject_fnQueryGetData, + IDataObject_fnGetCanonicalFormatEtc, + IDataObject_fnSetData, + IDataObject_fnEnumFormatEtc, + IDataObject_fnDAdvise, + IDataObject_fnDUnadvise, + IDataObject_fnEnumDAdvise +}; diff --git a/reactos/lib/shell32/debughlp.c b/reactos/lib/shell32/debughlp.c index fc43cbb9504..181410390f5 100644 --- a/reactos/lib/shell32/debughlp.c +++ b/reactos/lib/shell32/debughlp.c @@ -1,338 +1,338 @@ -/* - * Helper functions for debugging - * - * Copyright 1998, 2002 Juergen Schmied - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include -#include -#include -#include -#include "windef.h" -#include "wingdi.h" -#include "pidl.h" -#include "shlguid.h" -#include "shldisp.h" -#include "wine/debug.h" -#include "debughlp.h" -#include "docobj.h" -#include "shell32_main.h" - - -WINE_DEFAULT_DEBUG_CHANNEL(pidl); - -static -LPITEMIDLIST _dbg_ILGetNext(LPCITEMIDLIST pidl) -{ - WORD len; - - if(pidl) - { - len = pidl->mkid.cb; - if (len) - { - return (LPITEMIDLIST) (((LPBYTE)pidl)+len); - } - } - return NULL; -} - -static -BOOL _dbg_ILIsDesktop(LPCITEMIDLIST pidl) -{ - return ( !pidl || (pidl && pidl->mkid.cb == 0x00) ); -} - -static -LPPIDLDATA _dbg_ILGetDataPointer(LPCITEMIDLIST pidl) -{ - if(pidl && pidl->mkid.cb != 0x00) - return (LPPIDLDATA) &(pidl->mkid.abID); - return NULL; -} - -static -LPSTR _dbg_ILGetTextPointer(LPCITEMIDLIST pidl) -{ - LPPIDLDATA pdata =_dbg_ILGetDataPointer(pidl); - - if (pdata) - { - switch (pdata->type) - { - case PT_GUID: - case PT_SHELLEXT: - case PT_YAGUID: - return NULL; - - case PT_DRIVE: - case PT_DRIVE1: - case PT_DRIVE2: - case PT_DRIVE3: - return (LPSTR)&(pdata->u.drive.szDriveName); - - case PT_FOLDER: - case PT_FOLDER1: - case PT_VALUE: - case PT_IESPECIAL1: - case PT_IESPECIAL2: - return (LPSTR)&(pdata->u.file.szNames); - - case PT_WORKGRP: - case PT_COMP: - case PT_NETWORK: - case PT_NETPROVIDER: - case PT_SHARE: - return (LPSTR)&(pdata->u.network.szNames); - } - } - return NULL; -} - -static -LPSTR _dbg_ILGetSTextPointer(LPCITEMIDLIST pidl) -{ - LPPIDLDATA pdata =_dbg_ILGetDataPointer(pidl); - - if (pdata) - { - switch (pdata->type) - { - case PT_FOLDER: - case PT_VALUE: - case PT_IESPECIAL1: - case PT_IESPECIAL2: - return (LPSTR)(pdata->u.file.szNames + strlen (pdata->u.file.szNames) + 1); - - case PT_WORKGRP: - return (LPSTR)(pdata->u.network.szNames + strlen (pdata->u.network.szNames) + 1); - } - } - return NULL; -} - -static -IID* _dbg_ILGetGUIDPointer(LPCITEMIDLIST pidl) -{ - LPPIDLDATA pdata =_ILGetDataPointer(pidl); - - if (pdata) - { - switch (pdata->type) - { - case PT_SHELLEXT: - case PT_GUID: - return &(pdata->u.guid.guid); - } - } - return NULL; -} - -static -DWORD _dbg_ILSimpleGetText (LPCITEMIDLIST pidl, LPSTR szOut, UINT uOutSize) -{ - DWORD dwReturn=0; - LPSTR szSrc; - GUID const * riid; - char szTemp[MAX_PATH]; - - if (!pidl) return 0; - - if (szOut) - *szOut = 0; - - if (_dbg_ILIsDesktop(pidl)) - { - /* desktop */ - if (szOut) strncpy(szOut, "Desktop", uOutSize); - dwReturn = strlen ("Desktop"); - } - else if (( szSrc = _dbg_ILGetTextPointer(pidl) )) - { - /* filesystem */ - if (szOut) strncpy(szOut, szSrc, uOutSize); - dwReturn = strlen(szSrc); - } - else if (( riid = _dbg_ILGetGUIDPointer(pidl) )) - { - if (szOut) - sprintf( szOut, "{%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}", - riid->Data1, riid->Data2, riid->Data3, - riid->Data4[0], riid->Data4[1], riid->Data4[2], riid->Data4[3], - riid->Data4[4], riid->Data4[5], riid->Data4[6], riid->Data4[7] ); - dwReturn = strlen (szTemp); - } - return dwReturn; -} - - - - -void pdump (LPCITEMIDLIST pidl) -{ - LPCITEMIDLIST pidltemp = pidl; - - if (!TRACE_ON(pidl)) return; - - if (! pidltemp) - { - MESSAGE ("-------- pidl=NULL (Desktop)\n"); - } - else - { - MESSAGE ("-------- pidl=%p\n", pidl); - if (pidltemp->mkid.cb) - { - do - { - DWORD dwAttrib = 0; - LPPIDLDATA pData = _dbg_ILGetDataPointer(pidltemp); - DWORD type = pData->type; - LPSTR szLongName = _dbg_ILGetTextPointer(pidltemp); - LPSTR szShortName = _dbg_ILGetSTextPointer(pidltemp); - char szName[MAX_PATH]; - - _dbg_ILSimpleGetText(pidltemp, szName, MAX_PATH); - if( PT_FOLDER == type || PT_VALUE == type) - dwAttrib = pData->u.file.uFileAttribs; - - MESSAGE ("[%p] size=%04u type=%lx attr=0x%08lx name=\"%s\" (%s,%s)\n", - pidltemp, pidltemp->mkid.cb,type,dwAttrib,szName,debugstr_a(szLongName), debugstr_a(szShortName)); - - pidltemp = _dbg_ILGetNext(pidltemp); - - } while (pidltemp->mkid.cb); - } - else - { - MESSAGE ("empty pidl (Desktop)\n"); - } - pcheck(pidl); - } -} -#define BYTES_PRINTED 32 -BOOL pcheck (LPCITEMIDLIST pidl) -{ - DWORD type, ret=TRUE; - LPCITEMIDLIST pidltemp = pidl; - - if (pidltemp && pidltemp->mkid.cb) - { do - { type = _dbg_ILGetDataPointer(pidltemp)->type; - switch (type) - { case PT_CPLAPPLET: - case PT_GUID: - case PT_SHELLEXT: - case PT_DRIVE: - case PT_DRIVE1: - case PT_DRIVE2: - case PT_DRIVE3: - case PT_FOLDER: - case PT_VALUE: - case PT_FOLDER1: - case PT_WORKGRP: - case PT_COMP: - case PT_NETPROVIDER: - case PT_NETWORK: - case PT_IESPECIAL1: - case PT_YAGUID: - case PT_IESPECIAL2: - case PT_SHARE: - break; - default: - { - char szTemp[BYTES_PRINTED*4 + 1]; - int i; - unsigned char c; - - memset(szTemp, ' ', BYTES_PRINTED*4 + 1); - for ( i = 0; (imkid.cb) && (i>4)>9)? (c>>4)+55 : (c>>4)+48; - szTemp[i*3+1] = ((0x0F&c)>9)? (0x0F&c)+55 : (0x0F&c)+48; - szTemp[i*3+2] = ' '; - szTemp[i+BYTES_PRINTED*3] = (c>=0x20 && c <=0x80) ? c : '.'; - } - szTemp[BYTES_PRINTED*4] = 0x00; - ERR("unknown IDLIST %p [%p] size=%u type=%lx\n%s\n",pidl, pidltemp, pidltemp->mkid.cb,type, szTemp); - ret = FALSE; - } - } - pidltemp = _dbg_ILGetNext(pidltemp); - } while (pidltemp->mkid.cb); - } - return ret; -} - -static char shdebugstr_buf1[100]; -static char shdebugstr_buf2[100]; -static char * shdebugstr_buf = shdebugstr_buf1; - -static struct { - REFIID riid; - char *name; -} InterfaceDesc[] = { - {&IID_IUnknown, "IID_IUnknown"}, - {&IID_IClassFactory, "IID_IClassFactory"}, - {&IID_IShellView, "IID_IShellView"}, - {&IID_IOleCommandTarget, "IID_IOleCommandTarget"}, - {&IID_IDropTarget, "IID_IDropTarget"}, - {&IID_IDropSource, "IID_IDropSource"}, - {&IID_IViewObject, "IID_IViewObject"}, - {&IID_IContextMenu, "IID_IContextMenu"}, - {&IID_IShellExtInit, "IID_IShellExtInit"}, - {&IID_IShellFolder, "IID_IShellFolder"}, - {&IID_IShellFolder2, "IID_IShellFolder2"}, - {&IID_IPersist, "IID_IPersist"}, - {&IID_IPersistFolder, "IID_IPersistFolder"}, - {&IID_IPersistFolder2, "IID_IPersistFolder2"}, - {&IID_IPersistFolder3, "IID_IPersistFolder3"}, - {&IID_IExtractIconA, "IID_IExtractIconA"}, - {&IID_IExtractIconW, "IID_IExtractIconW"}, - {&IID_IDataObject, "IID_IDataObject"}, - {&IID_IAutoComplete, "IID_IAutoComplete"}, - {&IID_IAutoComplete2, "IID_IAutoComplete2"}, - {NULL,NULL}}; - -const char * shdebugstr_guid( const struct _GUID *id ) -{ - int i; - char* name = NULL; - char clsidbuf[100]; - - shdebugstr_buf = (shdebugstr_buf == shdebugstr_buf1) ? shdebugstr_buf2 : shdebugstr_buf1; - - if (!id) { - strcpy (shdebugstr_buf, "(null)"); - } else { - for (i=0;InterfaceDesc[i].riid && !name;i++) { - if (IsEqualIID(InterfaceDesc[i].riid, id)) name = InterfaceDesc[i].name; - } - if (!name) { - if (HCR_GetClassNameA(id, clsidbuf, 100)) - name = clsidbuf; - } - - sprintf( shdebugstr_buf, "\n\t{%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x} (%s)", - id->Data1, id->Data2, id->Data3, - id->Data4[0], id->Data4[1], id->Data4[2], id->Data4[3], - id->Data4[4], id->Data4[5], id->Data4[6], id->Data4[7], name ? name : "unknown" ); - } - return shdebugstr_buf; -} +/* + * Helper functions for debugging + * + * Copyright 1998, 2002 Juergen Schmied + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include +#include +#include +#include +#include "windef.h" +#include "wingdi.h" +#include "pidl.h" +#include "shlguid.h" +#include "shldisp.h" +#include "wine/debug.h" +#include "debughlp.h" +#include "docobj.h" +#include "shell32_main.h" + + +WINE_DEFAULT_DEBUG_CHANNEL(pidl); + +static +LPITEMIDLIST _dbg_ILGetNext(LPCITEMIDLIST pidl) +{ + WORD len; + + if(pidl) + { + len = pidl->mkid.cb; + if (len) + { + return (LPITEMIDLIST) (((LPBYTE)pidl)+len); + } + } + return NULL; +} + +static +BOOL _dbg_ILIsDesktop(LPCITEMIDLIST pidl) +{ + return ( !pidl || (pidl && pidl->mkid.cb == 0x00) ); +} + +static +LPPIDLDATA _dbg_ILGetDataPointer(LPCITEMIDLIST pidl) +{ + if(pidl && pidl->mkid.cb != 0x00) + return (LPPIDLDATA) &(pidl->mkid.abID); + return NULL; +} + +static +LPSTR _dbg_ILGetTextPointer(LPCITEMIDLIST pidl) +{ + LPPIDLDATA pdata =_dbg_ILGetDataPointer(pidl); + + if (pdata) + { + switch (pdata->type) + { + case PT_GUID: + case PT_SHELLEXT: + case PT_YAGUID: + return NULL; + + case PT_DRIVE: + case PT_DRIVE1: + case PT_DRIVE2: + case PT_DRIVE3: + return (LPSTR)&(pdata->u.drive.szDriveName); + + case PT_FOLDER: + case PT_FOLDER1: + case PT_VALUE: + case PT_IESPECIAL1: + case PT_IESPECIAL2: + return (LPSTR)&(pdata->u.file.szNames); + + case PT_WORKGRP: + case PT_COMP: + case PT_NETWORK: + case PT_NETPROVIDER: + case PT_SHARE: + return (LPSTR)&(pdata->u.network.szNames); + } + } + return NULL; +} + +static +LPSTR _dbg_ILGetSTextPointer(LPCITEMIDLIST pidl) +{ + LPPIDLDATA pdata =_dbg_ILGetDataPointer(pidl); + + if (pdata) + { + switch (pdata->type) + { + case PT_FOLDER: + case PT_VALUE: + case PT_IESPECIAL1: + case PT_IESPECIAL2: + return (LPSTR)(pdata->u.file.szNames + strlen (pdata->u.file.szNames) + 1); + + case PT_WORKGRP: + return (LPSTR)(pdata->u.network.szNames + strlen (pdata->u.network.szNames) + 1); + } + } + return NULL; +} + +static +IID* _dbg_ILGetGUIDPointer(LPCITEMIDLIST pidl) +{ + LPPIDLDATA pdata =_ILGetDataPointer(pidl); + + if (pdata) + { + switch (pdata->type) + { + case PT_SHELLEXT: + case PT_GUID: + return &(pdata->u.guid.guid); + } + } + return NULL; +} + +static +DWORD _dbg_ILSimpleGetText (LPCITEMIDLIST pidl, LPSTR szOut, UINT uOutSize) +{ + DWORD dwReturn=0; + LPSTR szSrc; + GUID const * riid; + char szTemp[MAX_PATH]; + + if (!pidl) return 0; + + if (szOut) + *szOut = 0; + + if (_dbg_ILIsDesktop(pidl)) + { + /* desktop */ + if (szOut) strncpy(szOut, "Desktop", uOutSize); + dwReturn = strlen ("Desktop"); + } + else if (( szSrc = _dbg_ILGetTextPointer(pidl) )) + { + /* filesystem */ + if (szOut) strncpy(szOut, szSrc, uOutSize); + dwReturn = strlen(szSrc); + } + else if (( riid = _dbg_ILGetGUIDPointer(pidl) )) + { + if (szOut) + sprintf( szOut, "{%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}", + riid->Data1, riid->Data2, riid->Data3, + riid->Data4[0], riid->Data4[1], riid->Data4[2], riid->Data4[3], + riid->Data4[4], riid->Data4[5], riid->Data4[6], riid->Data4[7] ); + dwReturn = strlen (szTemp); + } + return dwReturn; +} + + + + +void pdump (LPCITEMIDLIST pidl) +{ + LPCITEMIDLIST pidltemp = pidl; + + if (!TRACE_ON(pidl)) return; + + if (! pidltemp) + { + MESSAGE ("-------- pidl=NULL (Desktop)\n"); + } + else + { + MESSAGE ("-------- pidl=%p\n", pidl); + if (pidltemp->mkid.cb) + { + do + { + DWORD dwAttrib = 0; + LPPIDLDATA pData = _dbg_ILGetDataPointer(pidltemp); + DWORD type = pData->type; + LPSTR szLongName = _dbg_ILGetTextPointer(pidltemp); + LPSTR szShortName = _dbg_ILGetSTextPointer(pidltemp); + char szName[MAX_PATH]; + + _dbg_ILSimpleGetText(pidltemp, szName, MAX_PATH); + if( PT_FOLDER == type || PT_VALUE == type) + dwAttrib = pData->u.file.uFileAttribs; + + MESSAGE ("[%p] size=%04u type=%lx attr=0x%08lx name=\"%s\" (%s,%s)\n", + pidltemp, pidltemp->mkid.cb,type,dwAttrib,szName,debugstr_a(szLongName), debugstr_a(szShortName)); + + pidltemp = _dbg_ILGetNext(pidltemp); + + } while (pidltemp->mkid.cb); + } + else + { + MESSAGE ("empty pidl (Desktop)\n"); + } + pcheck(pidl); + } +} +#define BYTES_PRINTED 32 +BOOL pcheck (LPCITEMIDLIST pidl) +{ + DWORD type, ret=TRUE; + LPCITEMIDLIST pidltemp = pidl; + + if (pidltemp && pidltemp->mkid.cb) + { do + { type = _dbg_ILGetDataPointer(pidltemp)->type; + switch (type) + { case PT_CPLAPPLET: + case PT_GUID: + case PT_SHELLEXT: + case PT_DRIVE: + case PT_DRIVE1: + case PT_DRIVE2: + case PT_DRIVE3: + case PT_FOLDER: + case PT_VALUE: + case PT_FOLDER1: + case PT_WORKGRP: + case PT_COMP: + case PT_NETPROVIDER: + case PT_NETWORK: + case PT_IESPECIAL1: + case PT_YAGUID: + case PT_IESPECIAL2: + case PT_SHARE: + break; + default: + { + char szTemp[BYTES_PRINTED*4 + 1]; + int i; + unsigned char c; + + memset(szTemp, ' ', BYTES_PRINTED*4 + 1); + for ( i = 0; (imkid.cb) && (i>4)>9)? (c>>4)+55 : (c>>4)+48; + szTemp[i*3+1] = ((0x0F&c)>9)? (0x0F&c)+55 : (0x0F&c)+48; + szTemp[i*3+2] = ' '; + szTemp[i+BYTES_PRINTED*3] = (c>=0x20 && c <=0x80) ? c : '.'; + } + szTemp[BYTES_PRINTED*4] = 0x00; + ERR("unknown IDLIST %p [%p] size=%u type=%lx\n%s\n",pidl, pidltemp, pidltemp->mkid.cb,type, szTemp); + ret = FALSE; + } + } + pidltemp = _dbg_ILGetNext(pidltemp); + } while (pidltemp->mkid.cb); + } + return ret; +} + +static char shdebugstr_buf1[100]; +static char shdebugstr_buf2[100]; +static char * shdebugstr_buf = shdebugstr_buf1; + +static struct { + REFIID riid; + char *name; +} InterfaceDesc[] = { + {&IID_IUnknown, "IID_IUnknown"}, + {&IID_IClassFactory, "IID_IClassFactory"}, + {&IID_IShellView, "IID_IShellView"}, + {&IID_IOleCommandTarget, "IID_IOleCommandTarget"}, + {&IID_IDropTarget, "IID_IDropTarget"}, + {&IID_IDropSource, "IID_IDropSource"}, + {&IID_IViewObject, "IID_IViewObject"}, + {&IID_IContextMenu, "IID_IContextMenu"}, + {&IID_IShellExtInit, "IID_IShellExtInit"}, + {&IID_IShellFolder, "IID_IShellFolder"}, + {&IID_IShellFolder2, "IID_IShellFolder2"}, + {&IID_IPersist, "IID_IPersist"}, + {&IID_IPersistFolder, "IID_IPersistFolder"}, + {&IID_IPersistFolder2, "IID_IPersistFolder2"}, + {&IID_IPersistFolder3, "IID_IPersistFolder3"}, + {&IID_IExtractIconA, "IID_IExtractIconA"}, + {&IID_IExtractIconW, "IID_IExtractIconW"}, + {&IID_IDataObject, "IID_IDataObject"}, + {&IID_IAutoComplete, "IID_IAutoComplete"}, + {&IID_IAutoComplete2, "IID_IAutoComplete2"}, + {NULL,NULL}}; + +const char * shdebugstr_guid( const struct _GUID *id ) +{ + int i; + char* name = NULL; + char clsidbuf[100]; + + shdebugstr_buf = (shdebugstr_buf == shdebugstr_buf1) ? shdebugstr_buf2 : shdebugstr_buf1; + + if (!id) { + strcpy (shdebugstr_buf, "(null)"); + } else { + for (i=0;InterfaceDesc[i].riid && !name;i++) { + if (IsEqualIID(InterfaceDesc[i].riid, id)) name = InterfaceDesc[i].name; + } + if (!name) { + if (HCR_GetClassNameA(id, clsidbuf, 100)) + name = clsidbuf; + } + + sprintf( shdebugstr_buf, "\n\t{%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x} (%s)", + id->Data1, id->Data2, id->Data3, + id->Data4[0], id->Data4[1], id->Data4[2], id->Data4[3], + id->Data4[4], id->Data4[5], id->Data4[6], id->Data4[7], name ? name : "unknown" ); + } + return shdebugstr_buf; +} diff --git a/reactos/lib/shell32/debughlp.h b/reactos/lib/shell32/debughlp.h index d3819ab4583..87166e38ef5 100644 --- a/reactos/lib/shell32/debughlp.h +++ b/reactos/lib/shell32/debughlp.h @@ -1,35 +1,35 @@ -/* - * Definitions for debugging - * - * Copyright 1998, 2002 Juergen Schmied - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#ifndef __WINE_SHELL32_DEBUGHLP_H -#define __WINE_SHELL32_DEBUGHLP_H - -#include - -#include "windef.h" -#include "winbase.h" -#include "winuser.h" -#include "shlobj.h" - -extern void pdump (LPCITEMIDLIST pidl); -extern BOOL pcheck (LPCITEMIDLIST pidl); -extern const char * shdebugstr_guid( const struct _GUID *id ); - -#endif /* __WINE_SHELL32_DEBUGHLP_H */ +/* + * Definitions for debugging + * + * Copyright 1998, 2002 Juergen Schmied + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef __WINE_SHELL32_DEBUGHLP_H +#define __WINE_SHELL32_DEBUGHLP_H + +#include + +#include "windef.h" +#include "winbase.h" +#include "winuser.h" +#include "shlobj.h" + +extern void pdump (LPCITEMIDLIST pidl); +extern BOOL pcheck (LPCITEMIDLIST pidl); +extern const char * shdebugstr_guid( const struct _GUID *id ); + +#endif /* __WINE_SHELL32_DEBUGHLP_H */ diff --git a/reactos/lib/shell32/dialogs.c b/reactos/lib/shell32/dialogs.c index d5a31bf86e6..522e005819d 100644 --- a/reactos/lib/shell32/dialogs.c +++ b/reactos/lib/shell32/dialogs.c @@ -1,446 +1,446 @@ -/* - * common shell dialogs - * - * Copyright 2000 Juergen Schmied - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include "config.h" -#include "wine/port.h" - -#include -#include -#include -#include "winerror.h" -#include "windef.h" -#include "winbase.h" -#include "winreg.h" -#include "wingdi.h" -#include "winuser.h" -#include "commdlg.h" -#include "wine/debug.h" - -#include "shellapi.h" -#include "shlobj.h" -#include "shell32_main.h" -#include "shresdef.h" -#include "undocshell.h" - -typedef struct - { - HWND hwndOwner ; - HICON hIcon ; - LPCSTR lpstrDirectory ; - LPCSTR lpstrTitle ; - LPCSTR lpstrDescription ; - UINT uFlags ; - } RUNFILEDLGPARAMS ; - -typedef BOOL (*LPFNOFN) (OPENFILENAMEA *) ; - -WINE_DEFAULT_DEBUG_CHANNEL(shell); -INT_PTR CALLBACK RunDlgProc (HWND, UINT, WPARAM, LPARAM) ; -void FillList (HWND, char *) ; - - -/************************************************************************* - * PickIconDlg [SHELL32.62] - * - */ -BOOL WINAPI PickIconDlg( - HWND hwndOwner, - LPSTR lpstrFile, - DWORD nMaxFile, - LPDWORD lpdwIconIndex) -{ - FIXME("(%p,%s,%08lx,%p):stub.\n", - hwndOwner, lpstrFile, nMaxFile,lpdwIconIndex); - return 0xffffffff; -} - -/************************************************************************* - * RunFileDlg [SHELL32.61] - * - * NOTES - * Original name: RunFileDlg (exported by ordinal) - */ -void WINAPI RunFileDlg( - HWND hwndOwner, - HICON hIcon, - LPCSTR lpstrDirectory, - LPCSTR lpstrTitle, - LPCSTR lpstrDescription, - UINT uFlags) -{ - - RUNFILEDLGPARAMS rfdp; - HRSRC hRes; - LPVOID template; - TRACE("\n"); - - rfdp.hwndOwner = hwndOwner; - rfdp.hIcon = hIcon; - rfdp.lpstrDirectory = lpstrDirectory; - rfdp.lpstrTitle = lpstrTitle; - rfdp.lpstrDescription = lpstrDescription; - rfdp.uFlags = uFlags; - - if(!(hRes = FindResourceA(shell32_hInstance, "SHELL_RUN_DLG", (LPSTR)RT_DIALOG))) - { - MessageBoxA (hwndOwner, "Couldn't find dialog.", "Nix", MB_OK) ; - return; - } - if(!(template = (LPVOID)LoadResource(shell32_hInstance, hRes))) - { - MessageBoxA (hwndOwner, "Couldn't load dialog.", "Nix", MB_OK) ; - return; - } - - DialogBoxIndirectParamA((HINSTANCE)GetWindowLongPtrW( hwndOwner, - GWLP_HINSTANCE ), - template, hwndOwner, RunDlgProc, (LPARAM)&rfdp); - -} - -/* Dialog procedure for RunFileDlg */ -INT_PTR CALLBACK RunDlgProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) - { - int ic ; - char *psz, szMsg[256] ; - static RUNFILEDLGPARAMS *prfdp = NULL ; - - switch (message) - { - case WM_INITDIALOG : - prfdp = (RUNFILEDLGPARAMS *)lParam ; - SetWindowTextA (hwnd, prfdp->lpstrTitle) ; - SetClassLongA (hwnd, GCL_HICON, (LPARAM)prfdp->hIcon) ; - SendMessageA (GetDlgItem (hwnd, 12297), STM_SETICON, - (WPARAM)LoadIconA (NULL, (LPSTR)IDI_WINLOGO), 0); - FillList (GetDlgItem (hwnd, 12298), NULL) ; - SetFocus (GetDlgItem (hwnd, 12298)) ; - return TRUE ; - - case WM_COMMAND : - switch (LOWORD (wParam)) - { - case IDOK : - { - HWND htxt = NULL ; - if ((ic = GetWindowTextLengthA (htxt = GetDlgItem (hwnd, 12298)))) - { - psz = HeapAlloc( GetProcessHeap(), 0, (ic + 2) ); - GetWindowTextA (htxt, psz, ic + 1) ; - - if (ShellExecuteA(NULL, "open", psz, NULL, NULL, SW_SHOWNORMAL) < (HINSTANCE)33) - { - char *pszSysMsg = NULL ; - FormatMessageA ( - FORMAT_MESSAGE_ALLOCATE_BUFFER | - FORMAT_MESSAGE_FROM_SYSTEM | - FORMAT_MESSAGE_IGNORE_INSERTS, - NULL, GetLastError (), - MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), - (LPSTR)&pszSysMsg, 0, NULL - ) ; - sprintf (szMsg, "Error: %s", pszSysMsg) ; - LocalFree ((HLOCAL)pszSysMsg) ; - MessageBoxA (hwnd, szMsg, "Nix", MB_OK | MB_ICONEXCLAMATION) ; - - HeapFree(GetProcessHeap(), 0, psz); - SendMessageA (htxt, CB_SETEDITSEL, 0, MAKELPARAM (0, -1)) ; - return TRUE ; - } - FillList (htxt, psz) ; - HeapFree(GetProcessHeap(), 0, psz); - EndDialog (hwnd, 0) ; - } - } - - case IDCANCEL : - EndDialog (hwnd, 0) ; - return TRUE ; - - case 12288 : - { - HMODULE hComdlg = NULL ; - LPFNOFN ofnProc = NULL ; - static char szFName[1024] = "", szFileTitle[256] = "", szInitDir[768] = "" ; - static OPENFILENAMEA ofn = - { - sizeof (OPENFILENAMEA), - NULL, - NULL, - "Executable Files\0*.exe\0All Files\0*.*\0\0\0\0", - NULL, - 0, - 0, - szFName, - 1023, - szFileTitle, - 255, - (LPCSTR)szInitDir, - "Browse", - OFN_ENABLESIZING | OFN_FILEMUSTEXIST | OFN_HIDEREADONLY | OFN_PATHMUSTEXIST, - 0, - 0, - NULL, - 0, - (LPOFNHOOKPROC)NULL, - NULL - } ; - - ofn.hwndOwner = hwnd ; - - if (NULL == (hComdlg = LoadLibraryExA ("comdlg32", NULL, 0))) - { - MessageBoxA (hwnd, "Unable to display dialog box (LoadLibraryEx) !", "Nix", MB_OK | MB_ICONEXCLAMATION) ; - return TRUE ; - } - - if ((LPFNOFN)NULL == (ofnProc = (LPFNOFN)GetProcAddress (hComdlg, "GetOpenFileNameA"))) - { - MessageBoxA (hwnd, "Unable to display dialog box (GetProcAddress) !", "Nix", MB_OK | MB_ICONEXCLAMATION) ; - return TRUE ; - } - - ofnProc (&ofn) ; - - SetFocus (GetDlgItem (hwnd, IDOK)) ; - SetWindowTextA (GetDlgItem (hwnd, 12298), szFName) ; - SendMessageA (GetDlgItem (hwnd, 12298), CB_SETEDITSEL, 0, MAKELPARAM (0, -1)) ; - SetFocus (GetDlgItem (hwnd, IDOK)) ; - - FreeLibrary (hComdlg) ; - - return TRUE ; - } - } - return TRUE ; - } - return FALSE ; - } - -/* This grabs the MRU list from the registry and fills the combo for the "Run" dialog above */ -void FillList (HWND hCb, char *pszLatest) - { - HKEY hkey ; -/* char szDbgMsg[256] = "" ; */ - char *pszList = NULL, *pszCmd = NULL, cMatch = 0, cMax = 0x60, szIndex[2] = "-" ; - DWORD icList = 0, icCmd = 0 ; - UINT Nix ; - - SendMessageA (hCb, CB_RESETCONTENT, 0, 0) ; - - if (ERROR_SUCCESS != RegCreateKeyExA ( - HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\RunMRU", - 0, "", REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &hkey, NULL)) - MessageBoxA (hCb, "Unable to open registry key !", "Nix", MB_OK) ; - - RegQueryValueExA (hkey, "MRUList", NULL, NULL, NULL, &icList) ; - - if (icList > 0) - { - pszList = HeapAlloc( GetProcessHeap(), 0, icList) ; - if (ERROR_SUCCESS != RegQueryValueExA (hkey, "MRUList", NULL, NULL, pszList, &icList)) - MessageBoxA (hCb, "Unable to grab MRUList !", "Nix", MB_OK) ; - } - else - { - icList = 1 ; - pszList = HeapAlloc( GetProcessHeap(), 0, icList) ; - pszList[0] = 0 ; - } - - for (Nix = 0 ; Nix < icList - 1 ; Nix++) - { - if (pszList[Nix] > cMax) - cMax = pszList[Nix] ; - - szIndex[0] = pszList[Nix] ; - - if (ERROR_SUCCESS != RegQueryValueExA (hkey, szIndex, NULL, NULL, NULL, &icCmd)) - MessageBoxA (hCb, "Unable to grab size of index", "Nix", MB_OK) ; - if( pszCmd ) - pszCmd = HeapReAlloc(GetProcessHeap(), 0, pszCmd, icCmd) ; - else - pszCmd = HeapAlloc(GetProcessHeap(), 0, icCmd) ; - if (ERROR_SUCCESS != RegQueryValueExA (hkey, szIndex, NULL, NULL, pszCmd, &icCmd)) - MessageBoxA (hCb, "Unable to grab index", "Nix", MB_OK) ; - - if (NULL != pszLatest) - { - if (!strcasecmp (pszCmd, pszLatest)) - { - /* - sprintf (szDbgMsg, "Found existing (%d).\n", Nix) ; - MessageBoxA (hCb, szDbgMsg, "Nix", MB_OK) ; - */ - SendMessageA (hCb, CB_INSERTSTRING, 0, (LPARAM)pszCmd) ; - SetWindowTextA (hCb, pszCmd) ; - SendMessageA (hCb, CB_SETEDITSEL, 0, MAKELPARAM (0, -1)) ; - - cMatch = pszList[Nix] ; - memmove (&pszList[1], pszList, Nix) ; - pszList[0] = cMatch ; - continue ; - } - } - - if (26 != icList - 1 || icList - 2 != Nix || cMatch || NULL == pszLatest) - { - /* - sprintf (szDbgMsg, "Happily appending (%d).\n", Nix) ; - MessageBoxA (hCb, szDbgMsg, "Nix", MB_OK) ; - */ - SendMessageA (hCb, CB_ADDSTRING, 0, (LPARAM)pszCmd) ; - if (!Nix) - { - SetWindowTextA (hCb, pszCmd) ; - SendMessageA (hCb, CB_SETEDITSEL, 0, MAKELPARAM (0, -1)) ; - } - - } - else - { - /* - sprintf (szDbgMsg, "Doing loop thing.\n") ; - MessageBoxA (hCb, szDbgMsg, "Nix", MB_OK) ; - */ - SendMessageA (hCb, CB_INSERTSTRING, 0, (LPARAM)pszLatest) ; - SetWindowTextA (hCb, pszLatest) ; - SendMessageA (hCb, CB_SETEDITSEL, 0, MAKELPARAM (0, -1)) ; - - cMatch = pszList[Nix] ; - memmove (&pszList[1], pszList, Nix) ; - pszList[0] = cMatch ; - szIndex[0] = cMatch ; - RegSetValueExA (hkey, szIndex, 0, REG_SZ, pszLatest, strlen (pszLatest) + 1) ; - } - } - - if (!cMatch && NULL != pszLatest) - { - /* - sprintf (szDbgMsg, "Simply inserting (increasing list).\n") ; - MessageBoxA (hCb, szDbgMsg, "Nix", MB_OK) ; - */ - SendMessageA (hCb, CB_INSERTSTRING, 0, (LPARAM)pszLatest) ; - SetWindowTextA (hCb, pszLatest) ; - SendMessageA (hCb, CB_SETEDITSEL, 0, MAKELPARAM (0, -1)) ; - - cMatch = ++cMax ; - if( pszList ) - pszList = HeapReAlloc(GetProcessHeap(), 0, pszList, ++icList) ; - else - pszList = HeapAlloc(GetProcessHeap(), 0, ++icList) ; - memmove (&pszList[1], pszList, icList - 1) ; - pszList[0] = cMatch ; - szIndex[0] = cMatch ; - RegSetValueExA (hkey, szIndex, 0, REG_SZ, pszLatest, strlen (pszLatest) + 1) ; - } - - RegSetValueExA (hkey, "MRUList", 0, REG_SZ, pszList, strlen (pszList) + 1) ; - - HeapFree( GetProcessHeap(), 0, pszCmd) ; - HeapFree( GetProcessHeap(), 0, pszList) ; - } - - -/************************************************************************* - * ConfirmDialog [internal] - * - * Put up a confirm box, return TRUE if the user confirmed - */ -static BOOL ConfirmDialog(HWND hWndOwner, UINT PromptId, UINT TitleId) -{ - WCHAR Prompt[256]; - WCHAR Title[256]; - - LoadStringW(shell32_hInstance, PromptId, Prompt, sizeof(Prompt) / sizeof(WCHAR)); - LoadStringW(shell32_hInstance, TitleId, Title, sizeof(Title) / sizeof(WCHAR)); - return MessageBoxW(hWndOwner, Prompt, Title, MB_YESNO|MB_ICONQUESTION) == IDYES; -} - - -/************************************************************************* - * RestartDialogEx [SHELL32.730] - */ - -int WINAPI RestartDialogEx(HWND hWndOwner, LPCWSTR lpwstrReason, DWORD uFlags, DWORD uReason) -{ - TRACE("(%p)\n", hWndOwner); - - /*FIXME: use uReason */ - - if (ConfirmDialog(hWndOwner, IDS_RESTART_PROMPT, IDS_RESTART_TITLE)) - { - HANDLE hToken; - TOKEN_PRIVILEGES npr; - - /* enable shutdown privilege for current process */ - if (OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES, &hToken)) - { - LookupPrivilegeValueA(0, "SeShutdownPrivilege", &npr.Privileges[0].Luid); - npr.PrivilegeCount = 1; - npr.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED; - AdjustTokenPrivileges(hToken, FALSE, &npr, 0, 0, 0); - CloseHandle(hToken); - } - ExitWindowsEx(EWX_REBOOT, 0); - } - - return 0; -} - - -/************************************************************************* - * RestartDialog [SHELL32.59] - */ - -int WINAPI RestartDialog(HWND hWndOwner, LPCWSTR lpstrReason, DWORD uFlags) -{ - return RestartDialogEx(hWndOwner, lpstrReason, uFlags, 0); -} - - -/************************************************************************* - * ExitWindowsDialog [SHELL32.60] - * - * NOTES - * exported by ordinal - */ -void WINAPI ExitWindowsDialog (HWND hWndOwner) -{ - TRACE("(%p)\n", hWndOwner); - - if (ConfirmDialog(hWndOwner, IDS_SHUTDOWN_PROMPT, IDS_SHUTDOWN_TITLE)) - { - HANDLE hToken; - TOKEN_PRIVILEGES npr; - - /* enable shutdown privilege for current process */ - if (OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES, &hToken)) - { - LookupPrivilegeValueA(0, "SeShutdownPrivilege", &npr.Privileges[0].Luid); - npr.PrivilegeCount = 1; - npr.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED; - AdjustTokenPrivileges(hToken, FALSE, &npr, 0, 0, 0); - CloseHandle(hToken); - } - ExitWindowsEx(EWX_SHUTDOWN, 0); - } -} +/* + * common shell dialogs + * + * Copyright 2000 Juergen Schmied + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" +#include "wine/port.h" + +#include +#include +#include +#include "winerror.h" +#include "windef.h" +#include "winbase.h" +#include "winreg.h" +#include "wingdi.h" +#include "winuser.h" +#include "commdlg.h" +#include "wine/debug.h" + +#include "shellapi.h" +#include "shlobj.h" +#include "shell32_main.h" +#include "shresdef.h" +#include "undocshell.h" + +typedef struct + { + HWND hwndOwner ; + HICON hIcon ; + LPCSTR lpstrDirectory ; + LPCSTR lpstrTitle ; + LPCSTR lpstrDescription ; + UINT uFlags ; + } RUNFILEDLGPARAMS ; + +typedef BOOL (*LPFNOFN) (OPENFILENAMEA *) ; + +WINE_DEFAULT_DEBUG_CHANNEL(shell); +INT_PTR CALLBACK RunDlgProc (HWND, UINT, WPARAM, LPARAM) ; +void FillList (HWND, char *) ; + + +/************************************************************************* + * PickIconDlg [SHELL32.62] + * + */ +BOOL WINAPI PickIconDlg( + HWND hwndOwner, + LPSTR lpstrFile, + DWORD nMaxFile, + LPDWORD lpdwIconIndex) +{ + FIXME("(%p,%s,%08lx,%p):stub.\n", + hwndOwner, lpstrFile, nMaxFile,lpdwIconIndex); + return 0xffffffff; +} + +/************************************************************************* + * RunFileDlg [SHELL32.61] + * + * NOTES + * Original name: RunFileDlg (exported by ordinal) + */ +void WINAPI RunFileDlg( + HWND hwndOwner, + HICON hIcon, + LPCSTR lpstrDirectory, + LPCSTR lpstrTitle, + LPCSTR lpstrDescription, + UINT uFlags) +{ + + RUNFILEDLGPARAMS rfdp; + HRSRC hRes; + LPVOID template; + TRACE("\n"); + + rfdp.hwndOwner = hwndOwner; + rfdp.hIcon = hIcon; + rfdp.lpstrDirectory = lpstrDirectory; + rfdp.lpstrTitle = lpstrTitle; + rfdp.lpstrDescription = lpstrDescription; + rfdp.uFlags = uFlags; + + if(!(hRes = FindResourceA(shell32_hInstance, "SHELL_RUN_DLG", (LPSTR)RT_DIALOG))) + { + MessageBoxA (hwndOwner, "Couldn't find dialog.", "Nix", MB_OK) ; + return; + } + if(!(template = (LPVOID)LoadResource(shell32_hInstance, hRes))) + { + MessageBoxA (hwndOwner, "Couldn't load dialog.", "Nix", MB_OK) ; + return; + } + + DialogBoxIndirectParamA((HINSTANCE)GetWindowLongPtrW( hwndOwner, + GWLP_HINSTANCE ), + template, hwndOwner, RunDlgProc, (LPARAM)&rfdp); + +} + +/* Dialog procedure for RunFileDlg */ +INT_PTR CALLBACK RunDlgProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) + { + int ic ; + char *psz, szMsg[256] ; + static RUNFILEDLGPARAMS *prfdp = NULL ; + + switch (message) + { + case WM_INITDIALOG : + prfdp = (RUNFILEDLGPARAMS *)lParam ; + SetWindowTextA (hwnd, prfdp->lpstrTitle) ; + SetClassLongA (hwnd, GCL_HICON, (LPARAM)prfdp->hIcon) ; + SendMessageA (GetDlgItem (hwnd, 12297), STM_SETICON, + (WPARAM)LoadIconA (NULL, (LPSTR)IDI_WINLOGO), 0); + FillList (GetDlgItem (hwnd, 12298), NULL) ; + SetFocus (GetDlgItem (hwnd, 12298)) ; + return TRUE ; + + case WM_COMMAND : + switch (LOWORD (wParam)) + { + case IDOK : + { + HWND htxt = NULL ; + if ((ic = GetWindowTextLengthA (htxt = GetDlgItem (hwnd, 12298)))) + { + psz = HeapAlloc( GetProcessHeap(), 0, (ic + 2) ); + GetWindowTextA (htxt, psz, ic + 1) ; + + if (ShellExecuteA(NULL, "open", psz, NULL, NULL, SW_SHOWNORMAL) < (HINSTANCE)33) + { + char *pszSysMsg = NULL ; + FormatMessageA ( + FORMAT_MESSAGE_ALLOCATE_BUFFER | + FORMAT_MESSAGE_FROM_SYSTEM | + FORMAT_MESSAGE_IGNORE_INSERTS, + NULL, GetLastError (), + MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), + (LPSTR)&pszSysMsg, 0, NULL + ) ; + sprintf (szMsg, "Error: %s", pszSysMsg) ; + LocalFree ((HLOCAL)pszSysMsg) ; + MessageBoxA (hwnd, szMsg, "Nix", MB_OK | MB_ICONEXCLAMATION) ; + + HeapFree(GetProcessHeap(), 0, psz); + SendMessageA (htxt, CB_SETEDITSEL, 0, MAKELPARAM (0, -1)) ; + return TRUE ; + } + FillList (htxt, psz) ; + HeapFree(GetProcessHeap(), 0, psz); + EndDialog (hwnd, 0) ; + } + } + + case IDCANCEL : + EndDialog (hwnd, 0) ; + return TRUE ; + + case 12288 : + { + HMODULE hComdlg = NULL ; + LPFNOFN ofnProc = NULL ; + static char szFName[1024] = "", szFileTitle[256] = "", szInitDir[768] = "" ; + static OPENFILENAMEA ofn = + { + sizeof (OPENFILENAMEA), + NULL, + NULL, + "Executable Files\0*.exe\0All Files\0*.*\0\0\0\0", + NULL, + 0, + 0, + szFName, + 1023, + szFileTitle, + 255, + (LPCSTR)szInitDir, + "Browse", + OFN_ENABLESIZING | OFN_FILEMUSTEXIST | OFN_HIDEREADONLY | OFN_PATHMUSTEXIST, + 0, + 0, + NULL, + 0, + (LPOFNHOOKPROC)NULL, + NULL + } ; + + ofn.hwndOwner = hwnd ; + + if (NULL == (hComdlg = LoadLibraryExA ("comdlg32", NULL, 0))) + { + MessageBoxA (hwnd, "Unable to display dialog box (LoadLibraryEx) !", "Nix", MB_OK | MB_ICONEXCLAMATION) ; + return TRUE ; + } + + if ((LPFNOFN)NULL == (ofnProc = (LPFNOFN)GetProcAddress (hComdlg, "GetOpenFileNameA"))) + { + MessageBoxA (hwnd, "Unable to display dialog box (GetProcAddress) !", "Nix", MB_OK | MB_ICONEXCLAMATION) ; + return TRUE ; + } + + ofnProc (&ofn) ; + + SetFocus (GetDlgItem (hwnd, IDOK)) ; + SetWindowTextA (GetDlgItem (hwnd, 12298), szFName) ; + SendMessageA (GetDlgItem (hwnd, 12298), CB_SETEDITSEL, 0, MAKELPARAM (0, -1)) ; + SetFocus (GetDlgItem (hwnd, IDOK)) ; + + FreeLibrary (hComdlg) ; + + return TRUE ; + } + } + return TRUE ; + } + return FALSE ; + } + +/* This grabs the MRU list from the registry and fills the combo for the "Run" dialog above */ +void FillList (HWND hCb, char *pszLatest) + { + HKEY hkey ; +/* char szDbgMsg[256] = "" ; */ + char *pszList = NULL, *pszCmd = NULL, cMatch = 0, cMax = 0x60, szIndex[2] = "-" ; + DWORD icList = 0, icCmd = 0 ; + UINT Nix ; + + SendMessageA (hCb, CB_RESETCONTENT, 0, 0) ; + + if (ERROR_SUCCESS != RegCreateKeyExA ( + HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\RunMRU", + 0, "", REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &hkey, NULL)) + MessageBoxA (hCb, "Unable to open registry key !", "Nix", MB_OK) ; + + RegQueryValueExA (hkey, "MRUList", NULL, NULL, NULL, &icList) ; + + if (icList > 0) + { + pszList = HeapAlloc( GetProcessHeap(), 0, icList) ; + if (ERROR_SUCCESS != RegQueryValueExA (hkey, "MRUList", NULL, NULL, pszList, &icList)) + MessageBoxA (hCb, "Unable to grab MRUList !", "Nix", MB_OK) ; + } + else + { + icList = 1 ; + pszList = HeapAlloc( GetProcessHeap(), 0, icList) ; + pszList[0] = 0 ; + } + + for (Nix = 0 ; Nix < icList - 1 ; Nix++) + { + if (pszList[Nix] > cMax) + cMax = pszList[Nix] ; + + szIndex[0] = pszList[Nix] ; + + if (ERROR_SUCCESS != RegQueryValueExA (hkey, szIndex, NULL, NULL, NULL, &icCmd)) + MessageBoxA (hCb, "Unable to grab size of index", "Nix", MB_OK) ; + if( pszCmd ) + pszCmd = HeapReAlloc(GetProcessHeap(), 0, pszCmd, icCmd) ; + else + pszCmd = HeapAlloc(GetProcessHeap(), 0, icCmd) ; + if (ERROR_SUCCESS != RegQueryValueExA (hkey, szIndex, NULL, NULL, pszCmd, &icCmd)) + MessageBoxA (hCb, "Unable to grab index", "Nix", MB_OK) ; + + if (NULL != pszLatest) + { + if (!strcasecmp (pszCmd, pszLatest)) + { + /* + sprintf (szDbgMsg, "Found existing (%d).\n", Nix) ; + MessageBoxA (hCb, szDbgMsg, "Nix", MB_OK) ; + */ + SendMessageA (hCb, CB_INSERTSTRING, 0, (LPARAM)pszCmd) ; + SetWindowTextA (hCb, pszCmd) ; + SendMessageA (hCb, CB_SETEDITSEL, 0, MAKELPARAM (0, -1)) ; + + cMatch = pszList[Nix] ; + memmove (&pszList[1], pszList, Nix) ; + pszList[0] = cMatch ; + continue ; + } + } + + if (26 != icList - 1 || icList - 2 != Nix || cMatch || NULL == pszLatest) + { + /* + sprintf (szDbgMsg, "Happily appending (%d).\n", Nix) ; + MessageBoxA (hCb, szDbgMsg, "Nix", MB_OK) ; + */ + SendMessageA (hCb, CB_ADDSTRING, 0, (LPARAM)pszCmd) ; + if (!Nix) + { + SetWindowTextA (hCb, pszCmd) ; + SendMessageA (hCb, CB_SETEDITSEL, 0, MAKELPARAM (0, -1)) ; + } + + } + else + { + /* + sprintf (szDbgMsg, "Doing loop thing.\n") ; + MessageBoxA (hCb, szDbgMsg, "Nix", MB_OK) ; + */ + SendMessageA (hCb, CB_INSERTSTRING, 0, (LPARAM)pszLatest) ; + SetWindowTextA (hCb, pszLatest) ; + SendMessageA (hCb, CB_SETEDITSEL, 0, MAKELPARAM (0, -1)) ; + + cMatch = pszList[Nix] ; + memmove (&pszList[1], pszList, Nix) ; + pszList[0] = cMatch ; + szIndex[0] = cMatch ; + RegSetValueExA (hkey, szIndex, 0, REG_SZ, pszLatest, strlen (pszLatest) + 1) ; + } + } + + if (!cMatch && NULL != pszLatest) + { + /* + sprintf (szDbgMsg, "Simply inserting (increasing list).\n") ; + MessageBoxA (hCb, szDbgMsg, "Nix", MB_OK) ; + */ + SendMessageA (hCb, CB_INSERTSTRING, 0, (LPARAM)pszLatest) ; + SetWindowTextA (hCb, pszLatest) ; + SendMessageA (hCb, CB_SETEDITSEL, 0, MAKELPARAM (0, -1)) ; + + cMatch = ++cMax ; + if( pszList ) + pszList = HeapReAlloc(GetProcessHeap(), 0, pszList, ++icList) ; + else + pszList = HeapAlloc(GetProcessHeap(), 0, ++icList) ; + memmove (&pszList[1], pszList, icList - 1) ; + pszList[0] = cMatch ; + szIndex[0] = cMatch ; + RegSetValueExA (hkey, szIndex, 0, REG_SZ, pszLatest, strlen (pszLatest) + 1) ; + } + + RegSetValueExA (hkey, "MRUList", 0, REG_SZ, pszList, strlen (pszList) + 1) ; + + HeapFree( GetProcessHeap(), 0, pszCmd) ; + HeapFree( GetProcessHeap(), 0, pszList) ; + } + + +/************************************************************************* + * ConfirmDialog [internal] + * + * Put up a confirm box, return TRUE if the user confirmed + */ +static BOOL ConfirmDialog(HWND hWndOwner, UINT PromptId, UINT TitleId) +{ + WCHAR Prompt[256]; + WCHAR Title[256]; + + LoadStringW(shell32_hInstance, PromptId, Prompt, sizeof(Prompt) / sizeof(WCHAR)); + LoadStringW(shell32_hInstance, TitleId, Title, sizeof(Title) / sizeof(WCHAR)); + return MessageBoxW(hWndOwner, Prompt, Title, MB_YESNO|MB_ICONQUESTION) == IDYES; +} + + +/************************************************************************* + * RestartDialogEx [SHELL32.730] + */ + +int WINAPI RestartDialogEx(HWND hWndOwner, LPCWSTR lpwstrReason, DWORD uFlags, DWORD uReason) +{ + TRACE("(%p)\n", hWndOwner); + + /*FIXME: use uReason */ + + if (ConfirmDialog(hWndOwner, IDS_RESTART_PROMPT, IDS_RESTART_TITLE)) + { + HANDLE hToken; + TOKEN_PRIVILEGES npr; + + /* enable shutdown privilege for current process */ + if (OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES, &hToken)) + { + LookupPrivilegeValueA(0, "SeShutdownPrivilege", &npr.Privileges[0].Luid); + npr.PrivilegeCount = 1; + npr.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED; + AdjustTokenPrivileges(hToken, FALSE, &npr, 0, 0, 0); + CloseHandle(hToken); + } + ExitWindowsEx(EWX_REBOOT, 0); + } + + return 0; +} + + +/************************************************************************* + * RestartDialog [SHELL32.59] + */ + +int WINAPI RestartDialog(HWND hWndOwner, LPCWSTR lpstrReason, DWORD uFlags) +{ + return RestartDialogEx(hWndOwner, lpstrReason, uFlags, 0); +} + + +/************************************************************************* + * ExitWindowsDialog [SHELL32.60] + * + * NOTES + * exported by ordinal + */ +void WINAPI ExitWindowsDialog (HWND hWndOwner) +{ + TRACE("(%p)\n", hWndOwner); + + if (ConfirmDialog(hWndOwner, IDS_SHUTDOWN_PROMPT, IDS_SHUTDOWN_TITLE)) + { + HANDLE hToken; + TOKEN_PRIVILEGES npr; + + /* enable shutdown privilege for current process */ + if (OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES, &hToken)) + { + LookupPrivilegeValueA(0, "SeShutdownPrivilege", &npr.Privileges[0].Luid); + npr.PrivilegeCount = 1; + npr.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED; + AdjustTokenPrivileges(hToken, FALSE, &npr, 0, 0, 0); + CloseHandle(hToken); + } + ExitWindowsEx(EWX_SHUTDOWN, 0); + } +} diff --git a/reactos/lib/shell32/dragdrophelper.c b/reactos/lib/shell32/dragdrophelper.c index e298407674d..f8005708433 100644 --- a/reactos/lib/shell32/dragdrophelper.c +++ b/reactos/lib/shell32/dragdrophelper.c @@ -1,186 +1,186 @@ -/* - * file system folder - * - * Copyright 1997 Marcus Meissner - * Copyright 1998, 1999, 2002 Juergen Schmied - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include "config.h" -#include "wine/port.h" - -#include -#include - -#define COBJMACROS - -#include "windef.h" -#include "winbase.h" -#include "winreg.h" -#include "wingdi.h" -#include "winuser.h" - -#include "objbase.h" -#include "ole2.h" -#include "shlguid.h" -#include "shlobj.h" - -#include "wine/debug.h" -#include "debughlp.h" - -WINE_DEFAULT_DEBUG_CHANNEL (shell); - -/*********************************************************************** -* IDropTargetHelper implementation -*/ - -typedef struct { - IDropTargetHelperVtbl *lpVtbl; - DWORD ref; -} IDropTargetHelperImpl; - -static struct IDropTargetHelperVtbl vt_IDropTargetHelper; - -#define _IUnknown_(This) (IUnknown*)&(This->lpVtbl) -#define _IDropTargetHelper_(This) (IDropTargetHelper*)&(This->lpVtbl) - -/************************************************************************** -* IDropTargetHelper_Constructor -*/ -HRESULT WINAPI IDropTargetHelper_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv) -{ - IDropTargetHelperImpl *dth; - - TRACE ("unkOut=%p %s\n", pUnkOuter, shdebugstr_guid (riid)); - - if (!ppv) - return E_POINTER; - if (pUnkOuter) - return CLASS_E_NOAGGREGATION; - - dth = (IDropTargetHelperImpl *) LocalAlloc (GMEM_ZEROINIT, sizeof (IDropTargetHelperImpl)); - if (!dth) return E_OUTOFMEMORY; - - dth->ref = 0; - dth->lpVtbl = &vt_IDropTargetHelper; - - if (!SUCCEEDED (IUnknown_QueryInterface (_IUnknown_ (dth), riid, ppv))) { - IUnknown_Release (_IUnknown_ (dth)); - return E_NOINTERFACE; - } - - TRACE ("--(%p)\n", dth); - return S_OK; -} - -/************************************************************************** - * IDropTargetHelper_fnQueryInterface - */ -static HRESULT WINAPI IDropTargetHelper_fnQueryInterface (IDropTargetHelper * iface, REFIID riid, LPVOID * ppvObj) -{ - IDropTargetHelperImpl *This = (IDropTargetHelperImpl *)iface; - - TRACE ("(%p)->(%s,%p)\n", This, shdebugstr_guid (riid), ppvObj); - - *ppvObj = NULL; - - if (IsEqualIID (riid, &IID_IUnknown) || IsEqualIID (riid, &IID_IDropTargetHelper)) { - *ppvObj = This; - } - - if (*ppvObj) { - IUnknown_AddRef ((IUnknown *) (*ppvObj)); - TRACE ("-- Interface: (%p)->(%p)\n", ppvObj, *ppvObj); - return S_OK; - } - FIXME ("-- Interface: E_NOINTERFACE\n"); - return E_NOINTERFACE; -} - -static ULONG WINAPI IDropTargetHelper_fnAddRef (IDropTargetHelper * iface) -{ - IDropTargetHelperImpl *This = (IDropTargetHelperImpl *)iface; - - TRACE ("(%p)->(count=%lu)\n", This, This->ref); - - return ++(This->ref); -} - -static ULONG WINAPI IDropTargetHelper_fnRelease (IDropTargetHelper * iface) -{ - IDropTargetHelperImpl *This = (IDropTargetHelperImpl *)iface; - - TRACE ("(%p)->(count=%lu)\n", This, This->ref); - - if (!--(This->ref)) { - TRACE("-- destroying (%p)\n", This); - LocalFree ((HLOCAL) This); - return 0; - } - return This->ref; -} - -static HRESULT WINAPI IDropTargetHelper_fnDragEnter ( - IDropTargetHelper * iface, - HWND hwndTarget, - IDataObject* pDataObject, - POINT* ppt, - DWORD dwEffect) -{ - IDropTargetHelperImpl *This = (IDropTargetHelperImpl *)iface; - FIXME ("(%p)->(%p %p %p 0x%08lx)\n", This,hwndTarget, pDataObject, ppt, dwEffect); - return E_NOTIMPL; -} - -static HRESULT WINAPI IDropTargetHelper_fnDragLeave (IDropTargetHelper * iface) -{ - IDropTargetHelperImpl *This = (IDropTargetHelperImpl *)iface; - FIXME ("(%p)->()\n", This); - return E_NOTIMPL; -} - -static HRESULT WINAPI IDropTargetHelper_fnDragOver (IDropTargetHelper * iface, POINT* ppt, DWORD dwEffect) -{ - IDropTargetHelperImpl *This = (IDropTargetHelperImpl *)iface; - FIXME ("(%p)->(%p 0x%08lx)\n", This, ppt, dwEffect); - return E_NOTIMPL; -} - -static HRESULT WINAPI IDropTargetHelper_fnDrop (IDropTargetHelper * iface, IDataObject* pDataObject, POINT* ppt, DWORD dwEffect) -{ - IDropTargetHelperImpl *This = (IDropTargetHelperImpl *)iface; - FIXME ("(%p)->(%p %p 0x%08lx)\n", This, pDataObject, ppt, dwEffect); - return E_NOTIMPL; -} - -static HRESULT WINAPI IDropTargetHelper_fnShow (IDropTargetHelper * iface, BOOL fShow) -{ - IDropTargetHelperImpl *This = (IDropTargetHelperImpl *)iface; - FIXME ("(%p)->(%u)\n", This, fShow); - return E_NOTIMPL; -} - -static IDropTargetHelperVtbl vt_IDropTargetHelper = -{ - IDropTargetHelper_fnQueryInterface, - IDropTargetHelper_fnAddRef, - IDropTargetHelper_fnRelease, - IDropTargetHelper_fnDragEnter, - IDropTargetHelper_fnDragLeave, - IDropTargetHelper_fnDragOver, - IDropTargetHelper_fnDrop, - IDropTargetHelper_fnShow -}; +/* + * file system folder + * + * Copyright 1997 Marcus Meissner + * Copyright 1998, 1999, 2002 Juergen Schmied + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" +#include "wine/port.h" + +#include +#include + +#define COBJMACROS + +#include "windef.h" +#include "winbase.h" +#include "winreg.h" +#include "wingdi.h" +#include "winuser.h" + +#include "objbase.h" +#include "ole2.h" +#include "shlguid.h" +#include "shlobj.h" + +#include "wine/debug.h" +#include "debughlp.h" + +WINE_DEFAULT_DEBUG_CHANNEL (shell); + +/*********************************************************************** +* IDropTargetHelper implementation +*/ + +typedef struct { + IDropTargetHelperVtbl *lpVtbl; + DWORD ref; +} IDropTargetHelperImpl; + +static struct IDropTargetHelperVtbl vt_IDropTargetHelper; + +#define _IUnknown_(This) (IUnknown*)&(This->lpVtbl) +#define _IDropTargetHelper_(This) (IDropTargetHelper*)&(This->lpVtbl) + +/************************************************************************** +* IDropTargetHelper_Constructor +*/ +HRESULT WINAPI IDropTargetHelper_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv) +{ + IDropTargetHelperImpl *dth; + + TRACE ("unkOut=%p %s\n", pUnkOuter, shdebugstr_guid (riid)); + + if (!ppv) + return E_POINTER; + if (pUnkOuter) + return CLASS_E_NOAGGREGATION; + + dth = (IDropTargetHelperImpl *) LocalAlloc (GMEM_ZEROINIT, sizeof (IDropTargetHelperImpl)); + if (!dth) return E_OUTOFMEMORY; + + dth->ref = 0; + dth->lpVtbl = &vt_IDropTargetHelper; + + if (!SUCCEEDED (IUnknown_QueryInterface (_IUnknown_ (dth), riid, ppv))) { + IUnknown_Release (_IUnknown_ (dth)); + return E_NOINTERFACE; + } + + TRACE ("--(%p)\n", dth); + return S_OK; +} + +/************************************************************************** + * IDropTargetHelper_fnQueryInterface + */ +static HRESULT WINAPI IDropTargetHelper_fnQueryInterface (IDropTargetHelper * iface, REFIID riid, LPVOID * ppvObj) +{ + IDropTargetHelperImpl *This = (IDropTargetHelperImpl *)iface; + + TRACE ("(%p)->(%s,%p)\n", This, shdebugstr_guid (riid), ppvObj); + + *ppvObj = NULL; + + if (IsEqualIID (riid, &IID_IUnknown) || IsEqualIID (riid, &IID_IDropTargetHelper)) { + *ppvObj = This; + } + + if (*ppvObj) { + IUnknown_AddRef ((IUnknown *) (*ppvObj)); + TRACE ("-- Interface: (%p)->(%p)\n", ppvObj, *ppvObj); + return S_OK; + } + FIXME ("-- Interface: E_NOINTERFACE\n"); + return E_NOINTERFACE; +} + +static ULONG WINAPI IDropTargetHelper_fnAddRef (IDropTargetHelper * iface) +{ + IDropTargetHelperImpl *This = (IDropTargetHelperImpl *)iface; + + TRACE ("(%p)->(count=%lu)\n", This, This->ref); + + return ++(This->ref); +} + +static ULONG WINAPI IDropTargetHelper_fnRelease (IDropTargetHelper * iface) +{ + IDropTargetHelperImpl *This = (IDropTargetHelperImpl *)iface; + + TRACE ("(%p)->(count=%lu)\n", This, This->ref); + + if (!--(This->ref)) { + TRACE("-- destroying (%p)\n", This); + LocalFree ((HLOCAL) This); + return 0; + } + return This->ref; +} + +static HRESULT WINAPI IDropTargetHelper_fnDragEnter ( + IDropTargetHelper * iface, + HWND hwndTarget, + IDataObject* pDataObject, + POINT* ppt, + DWORD dwEffect) +{ + IDropTargetHelperImpl *This = (IDropTargetHelperImpl *)iface; + FIXME ("(%p)->(%p %p %p 0x%08lx)\n", This,hwndTarget, pDataObject, ppt, dwEffect); + return E_NOTIMPL; +} + +static HRESULT WINAPI IDropTargetHelper_fnDragLeave (IDropTargetHelper * iface) +{ + IDropTargetHelperImpl *This = (IDropTargetHelperImpl *)iface; + FIXME ("(%p)->()\n", This); + return E_NOTIMPL; +} + +static HRESULT WINAPI IDropTargetHelper_fnDragOver (IDropTargetHelper * iface, POINT* ppt, DWORD dwEffect) +{ + IDropTargetHelperImpl *This = (IDropTargetHelperImpl *)iface; + FIXME ("(%p)->(%p 0x%08lx)\n", This, ppt, dwEffect); + return E_NOTIMPL; +} + +static HRESULT WINAPI IDropTargetHelper_fnDrop (IDropTargetHelper * iface, IDataObject* pDataObject, POINT* ppt, DWORD dwEffect) +{ + IDropTargetHelperImpl *This = (IDropTargetHelperImpl *)iface; + FIXME ("(%p)->(%p %p 0x%08lx)\n", This, pDataObject, ppt, dwEffect); + return E_NOTIMPL; +} + +static HRESULT WINAPI IDropTargetHelper_fnShow (IDropTargetHelper * iface, BOOL fShow) +{ + IDropTargetHelperImpl *This = (IDropTargetHelperImpl *)iface; + FIXME ("(%p)->(%u)\n", This, fShow); + return E_NOTIMPL; +} + +static IDropTargetHelperVtbl vt_IDropTargetHelper = +{ + IDropTargetHelper_fnQueryInterface, + IDropTargetHelper_fnAddRef, + IDropTargetHelper_fnRelease, + IDropTargetHelper_fnDragEnter, + IDropTargetHelper_fnDragLeave, + IDropTargetHelper_fnDragOver, + IDropTargetHelper_fnDrop, + IDropTargetHelper_fnShow +}; diff --git a/reactos/lib/shell32/enumidlist.c b/reactos/lib/shell32/enumidlist.c index 54a761e0693..31abedbcad7 100644 --- a/reactos/lib/shell32/enumidlist.c +++ b/reactos/lib/shell32/enumidlist.c @@ -1,372 +1,372 @@ -/* - * IEnumIDList - * - * Copyright 1998 Juergen Schmied - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include -#include -#include - -#define COBJMACROS - -#include "wine/debug.h" -#include "windef.h" -#include "winbase.h" -#include "winreg.h" -#include "shlwapi.h" - -#include "pidl.h" -#include "enumidlist.h" - -WINE_DEFAULT_DEBUG_CHANNEL(shell); - -typedef struct tagENUMLIST -{ - struct tagENUMLIST *pNext; - LPITEMIDLIST pidl; - -} ENUMLIST, *LPENUMLIST; - -typedef struct -{ - IEnumIDListVtbl *lpVtbl; - DWORD ref; - LPENUMLIST mpFirst; - LPENUMLIST mpLast; - LPENUMLIST mpCurrent; - -} IEnumIDListImpl; - -static struct IEnumIDListVtbl eidlvt; - -/************************************************************************** - * AddToEnumList() - */ -BOOL AddToEnumList( - IEnumIDList * iface, - LPITEMIDLIST pidl) -{ - IEnumIDListImpl *This = (IEnumIDListImpl *)iface; - - LPENUMLIST pNew; - - TRACE("(%p)->(pidl=%p)\n",This,pidl); - - if (!iface || !pidl) - return FALSE; - - pNew = (LPENUMLIST)SHAlloc(sizeof(ENUMLIST)); - if(pNew) - { - /*set the next pointer */ - pNew->pNext = NULL; - pNew->pidl = pidl; - - /*is This the first item in the list? */ - if(!This->mpFirst) - { - This->mpFirst = pNew; - This->mpCurrent = pNew; - } - - if(This->mpLast) - { - /*add the new item to the end of the list */ - This->mpLast->pNext = pNew; - } - - /*update the last item pointer */ - This->mpLast = pNew; - TRACE("-- (%p)->(first=%p, last=%p)\n",This,This->mpFirst,This->mpLast); - return TRUE; - } - return FALSE; -} - -/************************************************************************** - * CreateFolderEnumList() - */ -BOOL CreateFolderEnumList( - IEnumIDList *list, - LPCSTR lpszPath, - DWORD dwFlags) -{ - LPITEMIDLIST pidl=NULL; - WIN32_FIND_DATAA stffile; - HANDLE hFile; - CHAR szPath[MAX_PATH]; - BOOL succeeded = TRUE; - - TRACE("(%p)->(path=%s flags=0x%08lx) \n",list,debugstr_a(lpszPath),dwFlags); - - if(!lpszPath || !lpszPath[0]) return FALSE; - - strcpy(szPath, lpszPath); - PathAddBackslashA(szPath); - strcat(szPath,"*.*"); - - hFile = FindFirstFileA(szPath,&stffile); - if ( hFile != INVALID_HANDLE_VALUE ) - { - BOOL findFinished = FALSE; - - do - { - if ( !(stffile.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN) - || (dwFlags & SHCONTF_INCLUDEHIDDEN) ) - { - if ( (stffile.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) && - dwFlags & SHCONTF_FOLDERS && - strcmp (stffile.cFileName, ".") && strcmp (stffile.cFileName, "..")) - { - pidl = _ILCreateFromFindDataA(&stffile); - succeeded = succeeded && AddToEnumList(list, pidl); - } - else if (!(stffile.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) - && dwFlags & SHCONTF_NONFOLDERS) - { - pidl = _ILCreateFromFindDataA(&stffile); - succeeded = succeeded && AddToEnumList(list, pidl); - } - } - if (succeeded) - { - if (!FindNextFileA(hFile, &stffile)) - { - if (GetLastError() == ERROR_NO_MORE_FILES) - findFinished = TRUE; - else - succeeded = FALSE; - } - } - } while (succeeded && !findFinished); - FindClose(hFile); - } - return succeeded; -} - -/************************************************************************** -* DeleteList() -*/ -static BOOL DeleteList( - IEnumIDList * iface) -{ - IEnumIDListImpl *This = (IEnumIDListImpl *)iface; - - LPENUMLIST pDelete; - - TRACE("(%p)->()\n",This); - - while(This->mpFirst) - { pDelete = This->mpFirst; - This->mpFirst = pDelete->pNext; - SHFree(pDelete->pidl); - SHFree(pDelete); - } - This->mpFirst = This->mpLast = This->mpCurrent = NULL; - return TRUE; -} - -/************************************************************************** - * IEnumIDList_Folder_Constructor - * - */ - -IEnumIDList * IEnumIDList_Constructor(void) -{ - IEnumIDListImpl *lpeidl = (IEnumIDListImpl*)HeapAlloc(GetProcessHeap(), - HEAP_ZERO_MEMORY, sizeof(IEnumIDListImpl)); - - if (lpeidl) - { - lpeidl->ref = 1; - lpeidl->lpVtbl = &eidlvt; - } - TRACE("-- (%p)->()\n",lpeidl); - - return (IEnumIDList*)lpeidl; -} - -/************************************************************************** - * EnumIDList_QueryInterface - */ -static HRESULT WINAPI IEnumIDList_fnQueryInterface( - IEnumIDList * iface, - REFIID riid, - LPVOID *ppvObj) -{ - IEnumIDListImpl *This = (IEnumIDListImpl *)iface; - - TRACE("(%p)->(\n\tIID:\t%s,%p)\n",This,debugstr_guid(riid),ppvObj); - - *ppvObj = NULL; - - if(IsEqualIID(riid, &IID_IUnknown)) /*IUnknown*/ - { *ppvObj = This; - } - else if(IsEqualIID(riid, &IID_IEnumIDList)) /*IEnumIDList*/ - { *ppvObj = (IEnumIDList*)This; - } - - if(*ppvObj) - { IEnumIDList_AddRef((IEnumIDList*)*ppvObj); - TRACE("-- Interface: (%p)->(%p)\n",ppvObj,*ppvObj); - return S_OK; - } - - TRACE("-- Interface: E_NOINTERFACE\n"); - return E_NOINTERFACE; -} - -/****************************************************************************** - * IEnumIDList_fnAddRef - */ -static ULONG WINAPI IEnumIDList_fnAddRef( - IEnumIDList * iface) -{ - IEnumIDListImpl *This = (IEnumIDListImpl *)iface; - TRACE("(%p)->(%lu)\n",This,This->ref); - return ++(This->ref); -} -/****************************************************************************** - * IEnumIDList_fnRelease - */ -static ULONG WINAPI IEnumIDList_fnRelease( - IEnumIDList * iface) -{ - IEnumIDListImpl *This = (IEnumIDListImpl *)iface; - - TRACE("(%p)->(%lu)\n",This,This->ref); - - if (!--(This->ref)) { - TRACE(" destroying IEnumIDList(%p)\n",This); - DeleteList((IEnumIDList*)This); - HeapFree(GetProcessHeap(),0,This); - return 0; - } - return This->ref; -} - -/************************************************************************** - * IEnumIDList_fnNext - */ - -static HRESULT WINAPI IEnumIDList_fnNext( - IEnumIDList * iface, - ULONG celt, - LPITEMIDLIST * rgelt, - ULONG *pceltFetched) -{ - IEnumIDListImpl *This = (IEnumIDListImpl *)iface; - - ULONG i; - HRESULT hr = S_OK; - LPITEMIDLIST temp; - - TRACE("(%p)->(%ld,%p, %p)\n",This,celt,rgelt,pceltFetched); - -/* It is valid to leave pceltFetched NULL when celt is 1. Some of explorer's - * subsystems actually use it (and so may a third party browser) - */ - if(pceltFetched) - *pceltFetched = 0; - - *rgelt=0; - - if(celt > 1 && !pceltFetched) - { return E_INVALIDARG; - } - - if(celt > 0 && !This->mpCurrent) - { return S_FALSE; - } - - for(i = 0; i < celt; i++) - { if(!(This->mpCurrent)) - break; - - temp = ILClone(This->mpCurrent->pidl); - rgelt[i] = temp; - This->mpCurrent = This->mpCurrent->pNext; - } - if(pceltFetched) - { *pceltFetched = i; - } - - return hr; -} - -/************************************************************************** -* IEnumIDList_fnSkip -*/ -static HRESULT WINAPI IEnumIDList_fnSkip( - IEnumIDList * iface,ULONG celt) -{ - IEnumIDListImpl *This = (IEnumIDListImpl *)iface; - - DWORD dwIndex; - HRESULT hr = S_OK; - - TRACE("(%p)->(%lu)\n",This,celt); - - for(dwIndex = 0; dwIndex < celt; dwIndex++) - { if(!This->mpCurrent) - { hr = S_FALSE; - break; - } - This->mpCurrent = This->mpCurrent->pNext; - } - return hr; -} -/************************************************************************** -* IEnumIDList_fnReset -*/ -static HRESULT WINAPI IEnumIDList_fnReset( - IEnumIDList * iface) -{ - IEnumIDListImpl *This = (IEnumIDListImpl *)iface; - - TRACE("(%p)\n",This); - This->mpCurrent = This->mpFirst; - return S_OK; -} -/************************************************************************** -* IEnumIDList_fnClone -*/ -static HRESULT WINAPI IEnumIDList_fnClone( - IEnumIDList * iface,LPENUMIDLIST * ppenum) -{ - IEnumIDListImpl *This = (IEnumIDListImpl *)iface; - - TRACE("(%p)->() to (%p)->() E_NOTIMPL\n",This,ppenum); - return E_NOTIMPL; -} - -/************************************************************************** - * IEnumIDList_fnVTable - */ -static IEnumIDListVtbl eidlvt = -{ - IEnumIDList_fnQueryInterface, - IEnumIDList_fnAddRef, - IEnumIDList_fnRelease, - IEnumIDList_fnNext, - IEnumIDList_fnSkip, - IEnumIDList_fnReset, - IEnumIDList_fnClone, -}; +/* + * IEnumIDList + * + * Copyright 1998 Juergen Schmied + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include +#include +#include + +#define COBJMACROS + +#include "wine/debug.h" +#include "windef.h" +#include "winbase.h" +#include "winreg.h" +#include "shlwapi.h" + +#include "pidl.h" +#include "enumidlist.h" + +WINE_DEFAULT_DEBUG_CHANNEL(shell); + +typedef struct tagENUMLIST +{ + struct tagENUMLIST *pNext; + LPITEMIDLIST pidl; + +} ENUMLIST, *LPENUMLIST; + +typedef struct +{ + IEnumIDListVtbl *lpVtbl; + DWORD ref; + LPENUMLIST mpFirst; + LPENUMLIST mpLast; + LPENUMLIST mpCurrent; + +} IEnumIDListImpl; + +static struct IEnumIDListVtbl eidlvt; + +/************************************************************************** + * AddToEnumList() + */ +BOOL AddToEnumList( + IEnumIDList * iface, + LPITEMIDLIST pidl) +{ + IEnumIDListImpl *This = (IEnumIDListImpl *)iface; + + LPENUMLIST pNew; + + TRACE("(%p)->(pidl=%p)\n",This,pidl); + + if (!iface || !pidl) + return FALSE; + + pNew = (LPENUMLIST)SHAlloc(sizeof(ENUMLIST)); + if(pNew) + { + /*set the next pointer */ + pNew->pNext = NULL; + pNew->pidl = pidl; + + /*is This the first item in the list? */ + if(!This->mpFirst) + { + This->mpFirst = pNew; + This->mpCurrent = pNew; + } + + if(This->mpLast) + { + /*add the new item to the end of the list */ + This->mpLast->pNext = pNew; + } + + /*update the last item pointer */ + This->mpLast = pNew; + TRACE("-- (%p)->(first=%p, last=%p)\n",This,This->mpFirst,This->mpLast); + return TRUE; + } + return FALSE; +} + +/************************************************************************** + * CreateFolderEnumList() + */ +BOOL CreateFolderEnumList( + IEnumIDList *list, + LPCSTR lpszPath, + DWORD dwFlags) +{ + LPITEMIDLIST pidl=NULL; + WIN32_FIND_DATAA stffile; + HANDLE hFile; + CHAR szPath[MAX_PATH]; + BOOL succeeded = TRUE; + + TRACE("(%p)->(path=%s flags=0x%08lx) \n",list,debugstr_a(lpszPath),dwFlags); + + if(!lpszPath || !lpszPath[0]) return FALSE; + + strcpy(szPath, lpszPath); + PathAddBackslashA(szPath); + strcat(szPath,"*.*"); + + hFile = FindFirstFileA(szPath,&stffile); + if ( hFile != INVALID_HANDLE_VALUE ) + { + BOOL findFinished = FALSE; + + do + { + if ( !(stffile.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN) + || (dwFlags & SHCONTF_INCLUDEHIDDEN) ) + { + if ( (stffile.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) && + dwFlags & SHCONTF_FOLDERS && + strcmp (stffile.cFileName, ".") && strcmp (stffile.cFileName, "..")) + { + pidl = _ILCreateFromFindDataA(&stffile); + succeeded = succeeded && AddToEnumList(list, pidl); + } + else if (!(stffile.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) + && dwFlags & SHCONTF_NONFOLDERS) + { + pidl = _ILCreateFromFindDataA(&stffile); + succeeded = succeeded && AddToEnumList(list, pidl); + } + } + if (succeeded) + { + if (!FindNextFileA(hFile, &stffile)) + { + if (GetLastError() == ERROR_NO_MORE_FILES) + findFinished = TRUE; + else + succeeded = FALSE; + } + } + } while (succeeded && !findFinished); + FindClose(hFile); + } + return succeeded; +} + +/************************************************************************** +* DeleteList() +*/ +static BOOL DeleteList( + IEnumIDList * iface) +{ + IEnumIDListImpl *This = (IEnumIDListImpl *)iface; + + LPENUMLIST pDelete; + + TRACE("(%p)->()\n",This); + + while(This->mpFirst) + { pDelete = This->mpFirst; + This->mpFirst = pDelete->pNext; + SHFree(pDelete->pidl); + SHFree(pDelete); + } + This->mpFirst = This->mpLast = This->mpCurrent = NULL; + return TRUE; +} + +/************************************************************************** + * IEnumIDList_Folder_Constructor + * + */ + +IEnumIDList * IEnumIDList_Constructor(void) +{ + IEnumIDListImpl *lpeidl = (IEnumIDListImpl*)HeapAlloc(GetProcessHeap(), + HEAP_ZERO_MEMORY, sizeof(IEnumIDListImpl)); + + if (lpeidl) + { + lpeidl->ref = 1; + lpeidl->lpVtbl = &eidlvt; + } + TRACE("-- (%p)->()\n",lpeidl); + + return (IEnumIDList*)lpeidl; +} + +/************************************************************************** + * EnumIDList_QueryInterface + */ +static HRESULT WINAPI IEnumIDList_fnQueryInterface( + IEnumIDList * iface, + REFIID riid, + LPVOID *ppvObj) +{ + IEnumIDListImpl *This = (IEnumIDListImpl *)iface; + + TRACE("(%p)->(\n\tIID:\t%s,%p)\n",This,debugstr_guid(riid),ppvObj); + + *ppvObj = NULL; + + if(IsEqualIID(riid, &IID_IUnknown)) /*IUnknown*/ + { *ppvObj = This; + } + else if(IsEqualIID(riid, &IID_IEnumIDList)) /*IEnumIDList*/ + { *ppvObj = (IEnumIDList*)This; + } + + if(*ppvObj) + { IEnumIDList_AddRef((IEnumIDList*)*ppvObj); + TRACE("-- Interface: (%p)->(%p)\n",ppvObj,*ppvObj); + return S_OK; + } + + TRACE("-- Interface: E_NOINTERFACE\n"); + return E_NOINTERFACE; +} + +/****************************************************************************** + * IEnumIDList_fnAddRef + */ +static ULONG WINAPI IEnumIDList_fnAddRef( + IEnumIDList * iface) +{ + IEnumIDListImpl *This = (IEnumIDListImpl *)iface; + TRACE("(%p)->(%lu)\n",This,This->ref); + return ++(This->ref); +} +/****************************************************************************** + * IEnumIDList_fnRelease + */ +static ULONG WINAPI IEnumIDList_fnRelease( + IEnumIDList * iface) +{ + IEnumIDListImpl *This = (IEnumIDListImpl *)iface; + + TRACE("(%p)->(%lu)\n",This,This->ref); + + if (!--(This->ref)) { + TRACE(" destroying IEnumIDList(%p)\n",This); + DeleteList((IEnumIDList*)This); + HeapFree(GetProcessHeap(),0,This); + return 0; + } + return This->ref; +} + +/************************************************************************** + * IEnumIDList_fnNext + */ + +static HRESULT WINAPI IEnumIDList_fnNext( + IEnumIDList * iface, + ULONG celt, + LPITEMIDLIST * rgelt, + ULONG *pceltFetched) +{ + IEnumIDListImpl *This = (IEnumIDListImpl *)iface; + + ULONG i; + HRESULT hr = S_OK; + LPITEMIDLIST temp; + + TRACE("(%p)->(%ld,%p, %p)\n",This,celt,rgelt,pceltFetched); + +/* It is valid to leave pceltFetched NULL when celt is 1. Some of explorer's + * subsystems actually use it (and so may a third party browser) + */ + if(pceltFetched) + *pceltFetched = 0; + + *rgelt=0; + + if(celt > 1 && !pceltFetched) + { return E_INVALIDARG; + } + + if(celt > 0 && !This->mpCurrent) + { return S_FALSE; + } + + for(i = 0; i < celt; i++) + { if(!(This->mpCurrent)) + break; + + temp = ILClone(This->mpCurrent->pidl); + rgelt[i] = temp; + This->mpCurrent = This->mpCurrent->pNext; + } + if(pceltFetched) + { *pceltFetched = i; + } + + return hr; +} + +/************************************************************************** +* IEnumIDList_fnSkip +*/ +static HRESULT WINAPI IEnumIDList_fnSkip( + IEnumIDList * iface,ULONG celt) +{ + IEnumIDListImpl *This = (IEnumIDListImpl *)iface; + + DWORD dwIndex; + HRESULT hr = S_OK; + + TRACE("(%p)->(%lu)\n",This,celt); + + for(dwIndex = 0; dwIndex < celt; dwIndex++) + { if(!This->mpCurrent) + { hr = S_FALSE; + break; + } + This->mpCurrent = This->mpCurrent->pNext; + } + return hr; +} +/************************************************************************** +* IEnumIDList_fnReset +*/ +static HRESULT WINAPI IEnumIDList_fnReset( + IEnumIDList * iface) +{ + IEnumIDListImpl *This = (IEnumIDListImpl *)iface; + + TRACE("(%p)\n",This); + This->mpCurrent = This->mpFirst; + return S_OK; +} +/************************************************************************** +* IEnumIDList_fnClone +*/ +static HRESULT WINAPI IEnumIDList_fnClone( + IEnumIDList * iface,LPENUMIDLIST * ppenum) +{ + IEnumIDListImpl *This = (IEnumIDListImpl *)iface; + + TRACE("(%p)->() to (%p)->() E_NOTIMPL\n",This,ppenum); + return E_NOTIMPL; +} + +/************************************************************************** + * IEnumIDList_fnVTable + */ +static IEnumIDListVtbl eidlvt = +{ + IEnumIDList_fnQueryInterface, + IEnumIDList_fnAddRef, + IEnumIDList_fnRelease, + IEnumIDList_fnNext, + IEnumIDList_fnSkip, + IEnumIDList_fnReset, + IEnumIDList_fnClone, +}; diff --git a/reactos/lib/shell32/enumidlist.h b/reactos/lib/shell32/enumidlist.h index 4cb03721d8b..53b8b5ff111 100644 --- a/reactos/lib/shell32/enumidlist.h +++ b/reactos/lib/shell32/enumidlist.h @@ -1,30 +1,30 @@ -/* - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ -#ifndef __ENUMIDLIST_H__ -#define __ENUMIDLIST_H__ - -#include "shlobj.h" - -/* Creates an IEnumIDList; add LPITEMIDLISTs to it with AddToEnumList. */ -LPENUMIDLIST IEnumIDList_Constructor(void); -BOOL AddToEnumList(IEnumIDList *list, LPITEMIDLIST pidl); - -/* Enumerates the folders and/or files (depending on dwFlags) in lpszPath and - * adds them to the already-created list. - */ -BOOL CreateFolderEnumList(IEnumIDList *list, LPCSTR lpszPath, DWORD dwFlags); - -#endif /* ndef __ENUMIDLIST_H__ */ +/* + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#ifndef __ENUMIDLIST_H__ +#define __ENUMIDLIST_H__ + +#include "shlobj.h" + +/* Creates an IEnumIDList; add LPITEMIDLISTs to it with AddToEnumList. */ +LPENUMIDLIST IEnumIDList_Constructor(void); +BOOL AddToEnumList(IEnumIDList *list, LPITEMIDLIST pidl); + +/* Enumerates the folders and/or files (depending on dwFlags) in lpszPath and + * adds them to the already-created list. + */ +BOOL CreateFolderEnumList(IEnumIDList *list, LPCSTR lpszPath, DWORD dwFlags); + +#endif /* ndef __ENUMIDLIST_H__ */ diff --git a/reactos/lib/shell32/folders.c b/reactos/lib/shell32/folders.c index 808648f75cc..7aa2e7485d5 100644 --- a/reactos/lib/shell32/folders.c +++ b/reactos/lib/shell32/folders.c @@ -1,558 +1,558 @@ -/* - * Copyright 1997 Marcus Meissner - * Copyright 1998 Juergen Schmied - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include "config.h" -#include "wine/port.h" - -#include -#include -#include -#include - -#define COBJMACROS - -#include "windef.h" -#include "winbase.h" -#include "winerror.h" -#include "objbase.h" -#include "undocshell.h" -#include "shlguid.h" -#include "winreg.h" - -#include "wine/debug.h" - -#include "pidl.h" -#include "shell32_main.h" -#include "shfldr.h" - -WINE_DEFAULT_DEBUG_CHANNEL(shell); - -/*********************************************************************** -* IExtractIconW implementation -*/ -typedef struct -{ - IExtractIconWVtbl *lpVtbl; - DWORD ref; - IPersistFileVtbl *lpvtblPersistFile; - IExtractIconAVtbl *lpvtblExtractIconA; - LPITEMIDLIST pidl; -} IExtractIconWImpl; - -static struct IExtractIconAVtbl eiavt; -static struct IExtractIconWVtbl eivt; -static struct IPersistFileVtbl pfvt; - -#define _IPersistFile_Offset ((int)(&(((IExtractIconWImpl*)0)->lpvtblPersistFile))) -#define _ICOM_THIS_From_IPersistFile(class, name) class* This = (class*)(((char*)name)-_IPersistFile_Offset); - -#define _IExtractIconA_Offset ((int)(&(((IExtractIconWImpl*)0)->lpvtblExtractIconA))) -#define _ICOM_THIS_From_IExtractIconA(class, name) class* This = (class*)(((char*)name)-_IExtractIconA_Offset); - -/************************************************************************** -* IExtractIconW_Constructor -*/ -IExtractIconW* IExtractIconW_Constructor(LPCITEMIDLIST pidl) -{ - IExtractIconWImpl* ei; - - TRACE("%p\n", pidl); - - ei = (IExtractIconWImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IExtractIconWImpl)); - ei->ref=1; - ei->lpVtbl = &eivt; - ei->lpvtblPersistFile = &pfvt; - ei->lpvtblExtractIconA = &eiavt; - ei->pidl=ILClone(pidl); - - pdump(pidl); - - TRACE("(%p)\n", ei); - return (IExtractIconW *)ei; -} -/************************************************************************** - * IExtractIconW_QueryInterface - */ -static HRESULT WINAPI IExtractIconW_fnQueryInterface(IExtractIconW *iface, REFIID riid, LPVOID *ppvObj) -{ - IExtractIconWImpl *This = (IExtractIconWImpl *)iface; - - TRACE("(%p)->(\n\tIID:\t%s,%p)\n", This, debugstr_guid(riid), ppvObj); - - *ppvObj = NULL; - - if (IsEqualIID(riid, &IID_IUnknown)) /*IUnknown*/ - { - *ppvObj = This; - } - else if (IsEqualIID(riid, &IID_IPersistFile)) /*IExtractIcon*/ - { - *ppvObj = (IPersistFile*)&(This->lpvtblPersistFile); - } - else if (IsEqualIID(riid, &IID_IExtractIconA)) /*IExtractIcon*/ - { - *ppvObj = (IExtractIconA*)&(This->lpvtblExtractIconA); - } - else if (IsEqualIID(riid, &IID_IExtractIconW)) /*IExtractIcon*/ - { - *ppvObj = (IExtractIconW*)This; - } - - if(*ppvObj) - { - IExtractIconW_AddRef((IExtractIconW*) *ppvObj); - TRACE("-- Interface: (%p)->(%p)\n",ppvObj,*ppvObj); - return S_OK; - } - TRACE("-- Interface: E_NOINTERFACE\n"); - return E_NOINTERFACE; -} - -/************************************************************************** -* IExtractIconW_AddRef -*/ -static ULONG WINAPI IExtractIconW_fnAddRef(IExtractIconW * iface) -{ - IExtractIconWImpl *This = (IExtractIconWImpl *)iface; - - TRACE("(%p)->(count=%lu)\n",This, This->ref ); - - return ++(This->ref); -} -/************************************************************************** -* IExtractIconW_Release -*/ -static ULONG WINAPI IExtractIconW_fnRelease(IExtractIconW * iface) -{ - IExtractIconWImpl *This = (IExtractIconWImpl *)iface; - - TRACE("(%p)->()\n",This); - - if (!--(This->ref)) - { - TRACE(" destroying IExtractIcon(%p)\n",This); - SHFree(This->pidl); - HeapFree(GetProcessHeap(),0,This); - return 0; - } - return This->ref; -} - -static HRESULT getIconLocationForFolder(IExtractIconW *iface, UINT uFlags, - LPWSTR szIconFile, UINT cchMax, int *piIndex, UINT *pwFlags) -{ - IExtractIconWImpl *This = (IExtractIconWImpl *)iface; - DWORD dwNr; - WCHAR wszPath[MAX_PATH]; - WCHAR wszCLSIDValue[CHARS_IN_GUID]; - static const WCHAR shellClassInfo[] = { '.','S','h','e','l','l','C','l','a','s','s','I','n','f','o',0 }; - static const WCHAR iconFile[] = { 'I','c','o','n','F','i','l','e',0 }; - static const WCHAR clsid[] = { 'C','L','S','I','D',0 }; - static const WCHAR clsid2[] = { 'C','L','S','I','D','2',0 }; - static const WCHAR iconIndex[] = { 'I','c','o','n','I','n','d','e','x',0 }; - - if (SHELL32_GetCustomFolderAttribute(This->pidl, shellClassInfo, iconFile, - wszPath, MAX_PATH)) - { - WCHAR wszIconIndex[10]; - SHELL32_GetCustomFolderAttribute(This->pidl, shellClassInfo, iconIndex, - wszIconIndex, 10); - *piIndex = atoiW(wszIconIndex); - } - else if (SHELL32_GetCustomFolderAttribute(This->pidl, shellClassInfo, clsid, - wszCLSIDValue, CHARS_IN_GUID) && - HCR_GetDefaultIconW(wszCLSIDValue, szIconFile, cchMax, &dwNr)) - { - *piIndex = dwNr; - } - else if (SHELL32_GetCustomFolderAttribute(This->pidl, shellClassInfo, clsid2, - wszCLSIDValue, CHARS_IN_GUID) && - HCR_GetDefaultIconW(wszCLSIDValue, szIconFile, cchMax, &dwNr)) - { - *piIndex = dwNr; - } - else - { - static const WCHAR folder[] = { 'F','o','l','d','e','r',0 }; - - if (!HCR_GetDefaultIconW(folder, szIconFile, cchMax, &dwNr)) - { - lstrcpynW(szIconFile, swShell32Name, cchMax); - dwNr = 3; - } - *piIndex = (uFlags & GIL_OPENICON) ? dwNr + 1 : dwNr; - } - return S_OK; -} - -WCHAR swShell32Name[MAX_PATH]; - -/************************************************************************** -* IExtractIconW_GetIconLocation -* -* mapping filetype to icon -*/ -static HRESULT WINAPI IExtractIconW_fnGetIconLocation( - IExtractIconW * iface, - UINT uFlags, /* GIL_ flags */ - LPWSTR szIconFile, - UINT cchMax, - int * piIndex, - UINT * pwFlags) /* returned GIL_ flags */ -{ - IExtractIconWImpl *This = (IExtractIconWImpl *)iface; - - char sTemp[MAX_PATH]; - DWORD dwNr; - GUID const * riid; - LPITEMIDLIST pSimplePidl = ILFindLastID(This->pidl); - - TRACE("(%p) (flags=%u %p %u %p %p)\n", This, uFlags, szIconFile, cchMax, piIndex, pwFlags); - - if (pwFlags) - *pwFlags = 0; - - if (_ILIsDesktop(pSimplePidl)) - { - lstrcpynW(szIconFile, swShell32Name, cchMax); - *piIndex = 34; - } - - /* my computer and other shell extensions */ - else if ((riid = _ILGetGUIDPointer(pSimplePidl))) - { - static const WCHAR fmt[] = { 'C','L','S','I','D','\\', - '{','%','0','8','l','x','-','%','0','4','x','-','%','0','4','x','-', - '%','0','2','x','%','0','2','x','-','%','0','2','x', '%','0','2','x', - '%','0','2','x','%','0','2','x','%','0','2','x','%','0','2','x','}',0 }; - WCHAR xriid[50]; - - sprintfW(xriid, fmt, - riid->Data1, riid->Data2, riid->Data3, - riid->Data4[0], riid->Data4[1], riid->Data4[2], riid->Data4[3], - riid->Data4[4], riid->Data4[5], riid->Data4[6], riid->Data4[7]); - - if (HCR_GetDefaultIconW(xriid, szIconFile, cchMax, &dwNr)) - { - *piIndex = dwNr; - } - else - { - lstrcpynW(szIconFile, swShell32Name, cchMax); - *piIndex = 15; - } - } - - else if (_ILIsDrive (pSimplePidl)) - { - static const WCHAR drive[] = { 'D','r','i','v','e',0 }; - - int icon_idx = -1; - - if (_ILGetDrive(pSimplePidl, sTemp, MAX_PATH)) - { - switch(GetDriveTypeA(sTemp)) - { - case DRIVE_REMOVABLE: icon_idx = 5; break; - case DRIVE_CDROM: icon_idx = 11; break; - case DRIVE_REMOTE: icon_idx = 9; break; - case DRIVE_RAMDISK: icon_idx = 12; break; - } - } - - if (icon_idx != -1) - { - lstrcpynW(szIconFile, swShell32Name, cchMax); - *piIndex = icon_idx; - } - else - { - if (HCR_GetDefaultIconW(drive, szIconFile, cchMax, &dwNr)) - { - *piIndex = dwNr; - } - else - { - lstrcpynW(szIconFile, swShell32Name, cchMax); - *piIndex = 8; - } - } - } - else if (_ILIsFolder (pSimplePidl)) - { - getIconLocationForFolder(iface, uFlags, szIconFile, cchMax, piIndex, - pwFlags); - } - else - { - BOOL found = FALSE; - - if (_ILIsCPanelStruct(pSimplePidl)) - { - if (SUCCEEDED(CPanel_GetIconLocationW(pSimplePidl, szIconFile, cchMax, piIndex))) - found = TRUE; - } - else if (_ILGetExtension(pSimplePidl, sTemp, MAX_PATH)) - { - if (HCR_MapTypeToValueA(sTemp, sTemp, MAX_PATH, TRUE) - && HCR_GetDefaultIconA(sTemp, sTemp, MAX_PATH, &dwNr)) - { - if (!lstrcmpA("%1", sTemp)) /* icon is in the file */ - { - SHGetPathFromIDListW(This->pidl, szIconFile); - *piIndex = 0; - } - else - { - MultiByteToWideChar(CP_ACP, 0, sTemp, -1, szIconFile, cchMax); - *piIndex = dwNr; - } - - found = TRUE; - } - else if (!strcasecmp(sTemp, "lnkfile")) - { - /* extract icon from shell shortcut */ - IShellFolder* dsf; - IShellLinkW* psl; - - if (SUCCEEDED(SHGetDesktopFolder(&dsf))) - { - HRESULT hr = IShellFolder_GetUIObjectOf(dsf, NULL, 1, (LPCITEMIDLIST*)&This->pidl, &IID_IShellLinkW, NULL, (LPVOID*)&psl); - - if (SUCCEEDED(hr)) - { - hr = IShellLinkW_GetIconLocation(psl, szIconFile, MAX_PATH, piIndex); - - if (SUCCEEDED(hr) && *szIconFile) - found = TRUE; - - IShellLinkW_Release(psl); - } - - IShellFolder_Release(dsf); - } - } - } - - if (!found) /* default icon */ - { - lstrcpynW(szIconFile, swShell32Name, cchMax); - *piIndex = 0; - } - } - - TRACE("-- %s %x\n", debugstr_w(szIconFile), *piIndex); - return NOERROR; -} - -/************************************************************************** -* IExtractIconW_Extract -*/ -static HRESULT WINAPI IExtractIconW_fnExtract(IExtractIconW * iface, LPCWSTR pszFile, UINT nIconIndex, HICON *phiconLarge, HICON *phiconSmall, UINT nIconSize) -{ - IExtractIconWImpl *This = (IExtractIconWImpl *)iface; - - FIXME("(%p) (file=%p index=%u %p %p size=%u) semi-stub\n", This, debugstr_w(pszFile), nIconIndex, phiconLarge, phiconSmall, nIconSize); - - if (phiconLarge) - *phiconLarge = ImageList_GetIcon(ShellBigIconList, nIconIndex, ILD_TRANSPARENT); - - if (phiconSmall) - *phiconSmall = ImageList_GetIcon(ShellSmallIconList, nIconIndex, ILD_TRANSPARENT); - - return S_OK; -} - -static struct IExtractIconWVtbl eivt = -{ - IExtractIconW_fnQueryInterface, - IExtractIconW_fnAddRef, - IExtractIconW_fnRelease, - IExtractIconW_fnGetIconLocation, - IExtractIconW_fnExtract -}; - -/************************************************************************** -* IExtractIconA_Constructor -*/ -IExtractIconA* IExtractIconA_Constructor(LPCITEMIDLIST pidl) -{ - IExtractIconWImpl *This = (IExtractIconWImpl *)IExtractIconW_Constructor(pidl); - IExtractIconA *eia = (IExtractIconA *)&This->lpvtblExtractIconA; - - TRACE("(%p)->(%p)\n", This, eia); - return eia; -} -/************************************************************************** - * IExtractIconA_QueryInterface - */ -static HRESULT WINAPI IExtractIconA_fnQueryInterface(IExtractIconA * iface, REFIID riid, LPVOID *ppvObj) -{ - _ICOM_THIS_From_IExtractIconA(IExtractIconW, iface); - - return IExtractIconW_QueryInterface(This, riid, ppvObj); -} - -/************************************************************************** -* IExtractIconA_AddRef -*/ -static ULONG WINAPI IExtractIconA_fnAddRef(IExtractIconA * iface) -{ - _ICOM_THIS_From_IExtractIconA(IExtractIconW, iface); - - return IExtractIconW_AddRef(This); -} -/************************************************************************** -* IExtractIconA_Release -*/ -static ULONG WINAPI IExtractIconA_fnRelease(IExtractIconA * iface) -{ - _ICOM_THIS_From_IExtractIconA(IExtractIconW, iface); - - return IExtractIconW_AddRef(This); -} -/************************************************************************** -* IExtractIconA_GetIconLocation -* -* mapping filetype to icon -*/ -static HRESULT WINAPI IExtractIconA_fnGetIconLocation( - IExtractIconA * iface, - UINT uFlags, - LPSTR szIconFile, - UINT cchMax, - int * piIndex, - UINT * pwFlags) -{ - HRESULT ret; - LPWSTR lpwstrFile = HeapAlloc(GetProcessHeap(), 0, cchMax * sizeof(WCHAR)); - _ICOM_THIS_From_IExtractIconA(IExtractIconW, iface); - - TRACE("(%p) (flags=%u %p %u %p %p)\n", This, uFlags, szIconFile, cchMax, piIndex, pwFlags); - - ret = IExtractIconW_GetIconLocation(This, uFlags, lpwstrFile, cchMax, piIndex, pwFlags); - WideCharToMultiByte(CP_ACP, 0, lpwstrFile, -1, szIconFile, cchMax, NULL, NULL); - HeapFree(GetProcessHeap(), 0, lpwstrFile); - - TRACE("-- %s %x\n", szIconFile, *piIndex); - return ret; -} -/************************************************************************** -* IExtractIconA_Extract -*/ -static HRESULT WINAPI IExtractIconA_fnExtract(IExtractIconA * iface, LPCSTR pszFile, UINT nIconIndex, HICON *phiconLarge, HICON *phiconSmall, UINT nIconSize) -{ - HRESULT ret; - INT len = MultiByteToWideChar(CP_ACP, 0, pszFile, -1, NULL, 0); - LPWSTR lpwstrFile = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); - _ICOM_THIS_From_IExtractIconA(IExtractIconW, iface); - - TRACE("(%p) (file=%p index=%u %p %p size=%u)\n", This, pszFile, nIconIndex, phiconLarge, phiconSmall, nIconSize); - - MultiByteToWideChar(CP_ACP, 0, pszFile, -1, lpwstrFile, len); - ret = IExtractIconW_Extract(This, lpwstrFile, nIconIndex, phiconLarge, phiconSmall, nIconSize); - HeapFree(GetProcessHeap(), 0, lpwstrFile); - return ret; -} - -static struct IExtractIconAVtbl eiavt = -{ - IExtractIconA_fnQueryInterface, - IExtractIconA_fnAddRef, - IExtractIconA_fnRelease, - IExtractIconA_fnGetIconLocation, - IExtractIconA_fnExtract -}; - -/************************************************************************ - * IEIPersistFile_QueryInterface (IUnknown) - */ -static HRESULT WINAPI IEIPersistFile_fnQueryInterface( - IPersistFile *iface, - REFIID iid, - LPVOID *ppvObj) -{ - _ICOM_THIS_From_IPersistFile(IExtractIconW, iface); - - return IExtractIconW_QueryInterface(This, iid, ppvObj); -} - -/************************************************************************ - * IEIPersistFile_AddRef (IUnknown) - */ -static ULONG WINAPI IEIPersistFile_fnAddRef( - IPersistFile *iface) -{ - _ICOM_THIS_From_IPersistFile(IExtractIconW, iface); - - return IExtractIconW_AddRef(This); -} - -/************************************************************************ - * IEIPersistFile_Release (IUnknown) - */ -static ULONG WINAPI IEIPersistFile_fnRelease( - IPersistFile *iface) -{ - _ICOM_THIS_From_IPersistFile(IExtractIconW, iface); - - return IExtractIconW_Release(This); -} - -/************************************************************************ - * IEIPersistFile_GetClassID (IPersist) - */ -static HRESULT WINAPI IEIPersistFile_fnGetClassID( - IPersistFile *iface, - LPCLSID lpClassId) -{ - CLSID StdFolderID = { 0x00000000, 0x0000, 0x0000, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} }; - - if (lpClassId==NULL) - return E_POINTER; - - memcpy(lpClassId, &StdFolderID, sizeof(StdFolderID)); - - return S_OK; -} - -/************************************************************************ - * IEIPersistFile_Load (IPersistFile) - */ -static HRESULT WINAPI IEIPersistFile_fnLoad(IPersistFile* iface, LPCOLESTR pszFileName, DWORD dwMode) -{ - _ICOM_THIS_From_IPersistFile(IExtractIconW, iface); - FIXME("%p\n", This); - return E_NOTIMPL; - -} - -static struct IPersistFileVtbl pfvt = -{ - IEIPersistFile_fnQueryInterface, - IEIPersistFile_fnAddRef, - IEIPersistFile_fnRelease, - IEIPersistFile_fnGetClassID, - (void *) 0xdeadbeef /* IEIPersistFile_fnIsDirty */, - IEIPersistFile_fnLoad, - (void *) 0xdeadbeef /* IEIPersistFile_fnSave */, - (void *) 0xdeadbeef /* IEIPersistFile_fnSaveCompleted */, - (void *) 0xdeadbeef /* IEIPersistFile_fnGetCurFile */ -}; +/* + * Copyright 1997 Marcus Meissner + * Copyright 1998 Juergen Schmied + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" +#include "wine/port.h" + +#include +#include +#include +#include + +#define COBJMACROS + +#include "windef.h" +#include "winbase.h" +#include "winerror.h" +#include "objbase.h" +#include "undocshell.h" +#include "shlguid.h" +#include "winreg.h" + +#include "wine/debug.h" + +#include "pidl.h" +#include "shell32_main.h" +#include "shfldr.h" + +WINE_DEFAULT_DEBUG_CHANNEL(shell); + +/*********************************************************************** +* IExtractIconW implementation +*/ +typedef struct +{ + IExtractIconWVtbl *lpVtbl; + DWORD ref; + IPersistFileVtbl *lpvtblPersistFile; + IExtractIconAVtbl *lpvtblExtractIconA; + LPITEMIDLIST pidl; +} IExtractIconWImpl; + +static struct IExtractIconAVtbl eiavt; +static struct IExtractIconWVtbl eivt; +static struct IPersistFileVtbl pfvt; + +#define _IPersistFile_Offset ((int)(&(((IExtractIconWImpl*)0)->lpvtblPersistFile))) +#define _ICOM_THIS_From_IPersistFile(class, name) class* This = (class*)(((char*)name)-_IPersistFile_Offset); + +#define _IExtractIconA_Offset ((int)(&(((IExtractIconWImpl*)0)->lpvtblExtractIconA))) +#define _ICOM_THIS_From_IExtractIconA(class, name) class* This = (class*)(((char*)name)-_IExtractIconA_Offset); + +/************************************************************************** +* IExtractIconW_Constructor +*/ +IExtractIconW* IExtractIconW_Constructor(LPCITEMIDLIST pidl) +{ + IExtractIconWImpl* ei; + + TRACE("%p\n", pidl); + + ei = (IExtractIconWImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IExtractIconWImpl)); + ei->ref=1; + ei->lpVtbl = &eivt; + ei->lpvtblPersistFile = &pfvt; + ei->lpvtblExtractIconA = &eiavt; + ei->pidl=ILClone(pidl); + + pdump(pidl); + + TRACE("(%p)\n", ei); + return (IExtractIconW *)ei; +} +/************************************************************************** + * IExtractIconW_QueryInterface + */ +static HRESULT WINAPI IExtractIconW_fnQueryInterface(IExtractIconW *iface, REFIID riid, LPVOID *ppvObj) +{ + IExtractIconWImpl *This = (IExtractIconWImpl *)iface; + + TRACE("(%p)->(\n\tIID:\t%s,%p)\n", This, debugstr_guid(riid), ppvObj); + + *ppvObj = NULL; + + if (IsEqualIID(riid, &IID_IUnknown)) /*IUnknown*/ + { + *ppvObj = This; + } + else if (IsEqualIID(riid, &IID_IPersistFile)) /*IExtractIcon*/ + { + *ppvObj = (IPersistFile*)&(This->lpvtblPersistFile); + } + else if (IsEqualIID(riid, &IID_IExtractIconA)) /*IExtractIcon*/ + { + *ppvObj = (IExtractIconA*)&(This->lpvtblExtractIconA); + } + else if (IsEqualIID(riid, &IID_IExtractIconW)) /*IExtractIcon*/ + { + *ppvObj = (IExtractIconW*)This; + } + + if(*ppvObj) + { + IExtractIconW_AddRef((IExtractIconW*) *ppvObj); + TRACE("-- Interface: (%p)->(%p)\n",ppvObj,*ppvObj); + return S_OK; + } + TRACE("-- Interface: E_NOINTERFACE\n"); + return E_NOINTERFACE; +} + +/************************************************************************** +* IExtractIconW_AddRef +*/ +static ULONG WINAPI IExtractIconW_fnAddRef(IExtractIconW * iface) +{ + IExtractIconWImpl *This = (IExtractIconWImpl *)iface; + + TRACE("(%p)->(count=%lu)\n",This, This->ref ); + + return ++(This->ref); +} +/************************************************************************** +* IExtractIconW_Release +*/ +static ULONG WINAPI IExtractIconW_fnRelease(IExtractIconW * iface) +{ + IExtractIconWImpl *This = (IExtractIconWImpl *)iface; + + TRACE("(%p)->()\n",This); + + if (!--(This->ref)) + { + TRACE(" destroying IExtractIcon(%p)\n",This); + SHFree(This->pidl); + HeapFree(GetProcessHeap(),0,This); + return 0; + } + return This->ref; +} + +static HRESULT getIconLocationForFolder(IExtractIconW *iface, UINT uFlags, + LPWSTR szIconFile, UINT cchMax, int *piIndex, UINT *pwFlags) +{ + IExtractIconWImpl *This = (IExtractIconWImpl *)iface; + DWORD dwNr; + WCHAR wszPath[MAX_PATH]; + WCHAR wszCLSIDValue[CHARS_IN_GUID]; + static const WCHAR shellClassInfo[] = { '.','S','h','e','l','l','C','l','a','s','s','I','n','f','o',0 }; + static const WCHAR iconFile[] = { 'I','c','o','n','F','i','l','e',0 }; + static const WCHAR clsid[] = { 'C','L','S','I','D',0 }; + static const WCHAR clsid2[] = { 'C','L','S','I','D','2',0 }; + static const WCHAR iconIndex[] = { 'I','c','o','n','I','n','d','e','x',0 }; + + if (SHELL32_GetCustomFolderAttribute(This->pidl, shellClassInfo, iconFile, + wszPath, MAX_PATH)) + { + WCHAR wszIconIndex[10]; + SHELL32_GetCustomFolderAttribute(This->pidl, shellClassInfo, iconIndex, + wszIconIndex, 10); + *piIndex = atoiW(wszIconIndex); + } + else if (SHELL32_GetCustomFolderAttribute(This->pidl, shellClassInfo, clsid, + wszCLSIDValue, CHARS_IN_GUID) && + HCR_GetDefaultIconW(wszCLSIDValue, szIconFile, cchMax, &dwNr)) + { + *piIndex = dwNr; + } + else if (SHELL32_GetCustomFolderAttribute(This->pidl, shellClassInfo, clsid2, + wszCLSIDValue, CHARS_IN_GUID) && + HCR_GetDefaultIconW(wszCLSIDValue, szIconFile, cchMax, &dwNr)) + { + *piIndex = dwNr; + } + else + { + static const WCHAR folder[] = { 'F','o','l','d','e','r',0 }; + + if (!HCR_GetDefaultIconW(folder, szIconFile, cchMax, &dwNr)) + { + lstrcpynW(szIconFile, swShell32Name, cchMax); + dwNr = 3; + } + *piIndex = (uFlags & GIL_OPENICON) ? dwNr + 1 : dwNr; + } + return S_OK; +} + +WCHAR swShell32Name[MAX_PATH]; + +/************************************************************************** +* IExtractIconW_GetIconLocation +* +* mapping filetype to icon +*/ +static HRESULT WINAPI IExtractIconW_fnGetIconLocation( + IExtractIconW * iface, + UINT uFlags, /* GIL_ flags */ + LPWSTR szIconFile, + UINT cchMax, + int * piIndex, + UINT * pwFlags) /* returned GIL_ flags */ +{ + IExtractIconWImpl *This = (IExtractIconWImpl *)iface; + + char sTemp[MAX_PATH]; + DWORD dwNr; + GUID const * riid; + LPITEMIDLIST pSimplePidl = ILFindLastID(This->pidl); + + TRACE("(%p) (flags=%u %p %u %p %p)\n", This, uFlags, szIconFile, cchMax, piIndex, pwFlags); + + if (pwFlags) + *pwFlags = 0; + + if (_ILIsDesktop(pSimplePidl)) + { + lstrcpynW(szIconFile, swShell32Name, cchMax); + *piIndex = 34; + } + + /* my computer and other shell extensions */ + else if ((riid = _ILGetGUIDPointer(pSimplePidl))) + { + static const WCHAR fmt[] = { 'C','L','S','I','D','\\', + '{','%','0','8','l','x','-','%','0','4','x','-','%','0','4','x','-', + '%','0','2','x','%','0','2','x','-','%','0','2','x', '%','0','2','x', + '%','0','2','x','%','0','2','x','%','0','2','x','%','0','2','x','}',0 }; + WCHAR xriid[50]; + + sprintfW(xriid, fmt, + riid->Data1, riid->Data2, riid->Data3, + riid->Data4[0], riid->Data4[1], riid->Data4[2], riid->Data4[3], + riid->Data4[4], riid->Data4[5], riid->Data4[6], riid->Data4[7]); + + if (HCR_GetDefaultIconW(xriid, szIconFile, cchMax, &dwNr)) + { + *piIndex = dwNr; + } + else + { + lstrcpynW(szIconFile, swShell32Name, cchMax); + *piIndex = 15; + } + } + + else if (_ILIsDrive (pSimplePidl)) + { + static const WCHAR drive[] = { 'D','r','i','v','e',0 }; + + int icon_idx = -1; + + if (_ILGetDrive(pSimplePidl, sTemp, MAX_PATH)) + { + switch(GetDriveTypeA(sTemp)) + { + case DRIVE_REMOVABLE: icon_idx = 5; break; + case DRIVE_CDROM: icon_idx = 11; break; + case DRIVE_REMOTE: icon_idx = 9; break; + case DRIVE_RAMDISK: icon_idx = 12; break; + } + } + + if (icon_idx != -1) + { + lstrcpynW(szIconFile, swShell32Name, cchMax); + *piIndex = icon_idx; + } + else + { + if (HCR_GetDefaultIconW(drive, szIconFile, cchMax, &dwNr)) + { + *piIndex = dwNr; + } + else + { + lstrcpynW(szIconFile, swShell32Name, cchMax); + *piIndex = 8; + } + } + } + else if (_ILIsFolder (pSimplePidl)) + { + getIconLocationForFolder(iface, uFlags, szIconFile, cchMax, piIndex, + pwFlags); + } + else + { + BOOL found = FALSE; + + if (_ILIsCPanelStruct(pSimplePidl)) + { + if (SUCCEEDED(CPanel_GetIconLocationW(pSimplePidl, szIconFile, cchMax, piIndex))) + found = TRUE; + } + else if (_ILGetExtension(pSimplePidl, sTemp, MAX_PATH)) + { + if (HCR_MapTypeToValueA(sTemp, sTemp, MAX_PATH, TRUE) + && HCR_GetDefaultIconA(sTemp, sTemp, MAX_PATH, &dwNr)) + { + if (!lstrcmpA("%1", sTemp)) /* icon is in the file */ + { + SHGetPathFromIDListW(This->pidl, szIconFile); + *piIndex = 0; + } + else + { + MultiByteToWideChar(CP_ACP, 0, sTemp, -1, szIconFile, cchMax); + *piIndex = dwNr; + } + + found = TRUE; + } + else if (!strcasecmp(sTemp, "lnkfile")) + { + /* extract icon from shell shortcut */ + IShellFolder* dsf; + IShellLinkW* psl; + + if (SUCCEEDED(SHGetDesktopFolder(&dsf))) + { + HRESULT hr = IShellFolder_GetUIObjectOf(dsf, NULL, 1, (LPCITEMIDLIST*)&This->pidl, &IID_IShellLinkW, NULL, (LPVOID*)&psl); + + if (SUCCEEDED(hr)) + { + hr = IShellLinkW_GetIconLocation(psl, szIconFile, MAX_PATH, piIndex); + + if (SUCCEEDED(hr) && *szIconFile) + found = TRUE; + + IShellLinkW_Release(psl); + } + + IShellFolder_Release(dsf); + } + } + } + + if (!found) /* default icon */ + { + lstrcpynW(szIconFile, swShell32Name, cchMax); + *piIndex = 0; + } + } + + TRACE("-- %s %x\n", debugstr_w(szIconFile), *piIndex); + return NOERROR; +} + +/************************************************************************** +* IExtractIconW_Extract +*/ +static HRESULT WINAPI IExtractIconW_fnExtract(IExtractIconW * iface, LPCWSTR pszFile, UINT nIconIndex, HICON *phiconLarge, HICON *phiconSmall, UINT nIconSize) +{ + IExtractIconWImpl *This = (IExtractIconWImpl *)iface; + + FIXME("(%p) (file=%p index=%u %p %p size=%u) semi-stub\n", This, debugstr_w(pszFile), nIconIndex, phiconLarge, phiconSmall, nIconSize); + + if (phiconLarge) + *phiconLarge = ImageList_GetIcon(ShellBigIconList, nIconIndex, ILD_TRANSPARENT); + + if (phiconSmall) + *phiconSmall = ImageList_GetIcon(ShellSmallIconList, nIconIndex, ILD_TRANSPARENT); + + return S_OK; +} + +static struct IExtractIconWVtbl eivt = +{ + IExtractIconW_fnQueryInterface, + IExtractIconW_fnAddRef, + IExtractIconW_fnRelease, + IExtractIconW_fnGetIconLocation, + IExtractIconW_fnExtract +}; + +/************************************************************************** +* IExtractIconA_Constructor +*/ +IExtractIconA* IExtractIconA_Constructor(LPCITEMIDLIST pidl) +{ + IExtractIconWImpl *This = (IExtractIconWImpl *)IExtractIconW_Constructor(pidl); + IExtractIconA *eia = (IExtractIconA *)&This->lpvtblExtractIconA; + + TRACE("(%p)->(%p)\n", This, eia); + return eia; +} +/************************************************************************** + * IExtractIconA_QueryInterface + */ +static HRESULT WINAPI IExtractIconA_fnQueryInterface(IExtractIconA * iface, REFIID riid, LPVOID *ppvObj) +{ + _ICOM_THIS_From_IExtractIconA(IExtractIconW, iface); + + return IExtractIconW_QueryInterface(This, riid, ppvObj); +} + +/************************************************************************** +* IExtractIconA_AddRef +*/ +static ULONG WINAPI IExtractIconA_fnAddRef(IExtractIconA * iface) +{ + _ICOM_THIS_From_IExtractIconA(IExtractIconW, iface); + + return IExtractIconW_AddRef(This); +} +/************************************************************************** +* IExtractIconA_Release +*/ +static ULONG WINAPI IExtractIconA_fnRelease(IExtractIconA * iface) +{ + _ICOM_THIS_From_IExtractIconA(IExtractIconW, iface); + + return IExtractIconW_AddRef(This); +} +/************************************************************************** +* IExtractIconA_GetIconLocation +* +* mapping filetype to icon +*/ +static HRESULT WINAPI IExtractIconA_fnGetIconLocation( + IExtractIconA * iface, + UINT uFlags, + LPSTR szIconFile, + UINT cchMax, + int * piIndex, + UINT * pwFlags) +{ + HRESULT ret; + LPWSTR lpwstrFile = HeapAlloc(GetProcessHeap(), 0, cchMax * sizeof(WCHAR)); + _ICOM_THIS_From_IExtractIconA(IExtractIconW, iface); + + TRACE("(%p) (flags=%u %p %u %p %p)\n", This, uFlags, szIconFile, cchMax, piIndex, pwFlags); + + ret = IExtractIconW_GetIconLocation(This, uFlags, lpwstrFile, cchMax, piIndex, pwFlags); + WideCharToMultiByte(CP_ACP, 0, lpwstrFile, -1, szIconFile, cchMax, NULL, NULL); + HeapFree(GetProcessHeap(), 0, lpwstrFile); + + TRACE("-- %s %x\n", szIconFile, *piIndex); + return ret; +} +/************************************************************************** +* IExtractIconA_Extract +*/ +static HRESULT WINAPI IExtractIconA_fnExtract(IExtractIconA * iface, LPCSTR pszFile, UINT nIconIndex, HICON *phiconLarge, HICON *phiconSmall, UINT nIconSize) +{ + HRESULT ret; + INT len = MultiByteToWideChar(CP_ACP, 0, pszFile, -1, NULL, 0); + LPWSTR lpwstrFile = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); + _ICOM_THIS_From_IExtractIconA(IExtractIconW, iface); + + TRACE("(%p) (file=%p index=%u %p %p size=%u)\n", This, pszFile, nIconIndex, phiconLarge, phiconSmall, nIconSize); + + MultiByteToWideChar(CP_ACP, 0, pszFile, -1, lpwstrFile, len); + ret = IExtractIconW_Extract(This, lpwstrFile, nIconIndex, phiconLarge, phiconSmall, nIconSize); + HeapFree(GetProcessHeap(), 0, lpwstrFile); + return ret; +} + +static struct IExtractIconAVtbl eiavt = +{ + IExtractIconA_fnQueryInterface, + IExtractIconA_fnAddRef, + IExtractIconA_fnRelease, + IExtractIconA_fnGetIconLocation, + IExtractIconA_fnExtract +}; + +/************************************************************************ + * IEIPersistFile_QueryInterface (IUnknown) + */ +static HRESULT WINAPI IEIPersistFile_fnQueryInterface( + IPersistFile *iface, + REFIID iid, + LPVOID *ppvObj) +{ + _ICOM_THIS_From_IPersistFile(IExtractIconW, iface); + + return IExtractIconW_QueryInterface(This, iid, ppvObj); +} + +/************************************************************************ + * IEIPersistFile_AddRef (IUnknown) + */ +static ULONG WINAPI IEIPersistFile_fnAddRef( + IPersistFile *iface) +{ + _ICOM_THIS_From_IPersistFile(IExtractIconW, iface); + + return IExtractIconW_AddRef(This); +} + +/************************************************************************ + * IEIPersistFile_Release (IUnknown) + */ +static ULONG WINAPI IEIPersistFile_fnRelease( + IPersistFile *iface) +{ + _ICOM_THIS_From_IPersistFile(IExtractIconW, iface); + + return IExtractIconW_Release(This); +} + +/************************************************************************ + * IEIPersistFile_GetClassID (IPersist) + */ +static HRESULT WINAPI IEIPersistFile_fnGetClassID( + IPersistFile *iface, + LPCLSID lpClassId) +{ + CLSID StdFolderID = { 0x00000000, 0x0000, 0x0000, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} }; + + if (lpClassId==NULL) + return E_POINTER; + + memcpy(lpClassId, &StdFolderID, sizeof(StdFolderID)); + + return S_OK; +} + +/************************************************************************ + * IEIPersistFile_Load (IPersistFile) + */ +static HRESULT WINAPI IEIPersistFile_fnLoad(IPersistFile* iface, LPCOLESTR pszFileName, DWORD dwMode) +{ + _ICOM_THIS_From_IPersistFile(IExtractIconW, iface); + FIXME("%p\n", This); + return E_NOTIMPL; + +} + +static struct IPersistFileVtbl pfvt = +{ + IEIPersistFile_fnQueryInterface, + IEIPersistFile_fnAddRef, + IEIPersistFile_fnRelease, + IEIPersistFile_fnGetClassID, + (void *) 0xdeadbeef /* IEIPersistFile_fnIsDirty */, + IEIPersistFile_fnLoad, + (void *) 0xdeadbeef /* IEIPersistFile_fnSave */, + (void *) 0xdeadbeef /* IEIPersistFile_fnSaveCompleted */, + (void *) 0xdeadbeef /* IEIPersistFile_fnGetCurFile */ +}; diff --git a/reactos/lib/shell32/iconcache.c b/reactos/lib/shell32/iconcache.c index d5f833eb584..3ca829c2fbf 100644 --- a/reactos/lib/shell32/iconcache.c +++ b/reactos/lib/shell32/iconcache.c @@ -1,598 +1,598 @@ -/* - * shell icon cache (SIC) - * - * Copyright 1998, 1999 Juergen Schmied - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include "config.h" -#include "wine/port.h" - -#include -#include -#include -#ifdef HAVE_UNISTD_H -# include -#endif - -#define COBJMACROS - -#include "windef.h" -#include "winbase.h" -#include "wingdi.h" -#include "winuser.h" -#include "winreg.h" -#include "wine/debug.h" - -#include "shellapi.h" -#include "objbase.h" -#include "shlguid.h" -#include "pidl.h" -#include "shell32_main.h" -#include "undocshell.h" - -WINE_DEFAULT_DEBUG_CHANNEL(shell); - -/********************** THE ICON CACHE ********************************/ - -#define INVALID_INDEX -1 - -typedef struct -{ - LPWSTR sSourceFile; /* file (not path!) containing the icon */ - DWORD dwSourceIndex; /* index within the file, if it is a resoure ID it will be negated */ - DWORD dwListIndex; /* index within the iconlist */ - DWORD dwFlags; /* GIL_* flags */ - DWORD dwAccessTime; -} SIC_ENTRY, * LPSIC_ENTRY; - -static HDPA sic_hdpa = 0; - -static CRITICAL_SECTION SHELL32_SicCS; -static CRITICAL_SECTION_DEBUG critsect_debug = -{ - 0, 0, &SHELL32_SicCS, - { &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList }, - 0, 0, { 0, (DWORD)(__FILE__ ": SHELL32_SicCS") } -}; -static CRITICAL_SECTION SHELL32_SicCS = { &critsect_debug, -1, 0, 0, 0, 0 }; - -/***************************************************************************** - * SIC_CompareEntries - * - * NOTES - * Callback for DPA_Search - */ -static INT CALLBACK SIC_CompareEntries( LPVOID p1, LPVOID p2, LPARAM lparam) -{ TRACE("%p %p %8lx\n", p1, p2, lparam); - - if (((LPSIC_ENTRY)p1)->dwSourceIndex != ((LPSIC_ENTRY)p2)->dwSourceIndex) /* first the faster one*/ - return 1; - - if (strcmpiW(((LPSIC_ENTRY)p1)->sSourceFile,((LPSIC_ENTRY)p2)->sSourceFile)) - return 1; - - return 0; -} -/***************************************************************************** - * SIC_IconAppend [internal] - * - * NOTES - * appends an icon pair to the end of the cache - */ -static INT SIC_IconAppend (LPCWSTR sSourceFile, INT dwSourceIndex, HICON hSmallIcon, HICON hBigIcon) -{ LPSIC_ENTRY lpsice; - INT ret, index, index1; - WCHAR path[MAX_PATH]; - TRACE("%s %i %p %p\n", debugstr_w(sSourceFile), dwSourceIndex, hSmallIcon ,hBigIcon); - - lpsice = (LPSIC_ENTRY) SHAlloc (sizeof (SIC_ENTRY)); - - GetFullPathNameW(sSourceFile, MAX_PATH, path, NULL); - lpsice->sSourceFile = HeapAlloc( GetProcessHeap(), 0, (strlenW(path)+1)*sizeof(WCHAR) ); - strcpyW( lpsice->sSourceFile, path ); - - lpsice->dwSourceIndex = dwSourceIndex; - - EnterCriticalSection(&SHELL32_SicCS); - - index = DPA_InsertPtr(sic_hdpa, 0x7fff, lpsice); - if ( INVALID_INDEX == index ) - { - HeapFree(GetProcessHeap(), 0, lpsice->sSourceFile); - SHFree(lpsice); - ret = INVALID_INDEX; - } - else - { - index = ImageList_AddIcon (ShellSmallIconList, hSmallIcon); - index1= ImageList_AddIcon (ShellBigIconList, hBigIcon); - - if (index!=index1) - { - FIXME("iconlists out of sync 0x%x 0x%x\n", index, index1); - } - lpsice->dwListIndex = index; - ret = lpsice->dwListIndex; - } - - LeaveCriticalSection(&SHELL32_SicCS); - return ret; -} -/**************************************************************************** - * SIC_LoadIcon [internal] - * - * NOTES - * gets small/big icon by number from a file - */ -static INT SIC_LoadIcon (LPCWSTR sSourceFile, INT dwSourceIndex) -{ HICON hiconLarge=0; - HICON hiconSmall=0; - -#if defined(__CYGWIN__) || defined (__MINGW32__) || defined(_MSC_VER) - static UINT (WINAPI*PrivateExtractIconExW)(LPCWSTR,int,HICON*,HICON*,UINT) = NULL; - - if (!PrivateExtractIconExW) { - HMODULE hUser32 = GetModuleHandleA("user32"); - PrivateExtractIconExW = (UINT(WINAPI*)(LPCWSTR,int,HICON*,HICON*,UINT)) GetProcAddress(hUser32, "PrivateExtractIconExW"); - } - - if (PrivateExtractIconExW) - PrivateExtractIconExW(sSourceFile, dwSourceIndex, &hiconLarge, &hiconSmall, 1); - else -#endif - { - PrivateExtractIconsW(sSourceFile, dwSourceIndex, 32, 32, &hiconLarge, NULL, 1, 0); - PrivateExtractIconsW(sSourceFile, dwSourceIndex, 16, 16, &hiconSmall, NULL, 1, 0); - } - - if ( !hiconLarge || !hiconSmall) - { - WARN("failure loading icon %i from %s (%p %p)\n", dwSourceIndex, debugstr_w(sSourceFile), hiconLarge, hiconSmall); - return -1; - } - return SIC_IconAppend (sSourceFile, dwSourceIndex, hiconSmall, hiconLarge); -} -/***************************************************************************** - * SIC_GetIconIndex [internal] - * - * Parameters - * sSourceFile [IN] filename of file containing the icon - * index [IN] index/resID (negated) in this file - * - * NOTES - * look in the cache for a proper icon. if not available the icon is taken - * from the file and cached - */ -INT SIC_GetIconIndex (LPCWSTR sSourceFile, INT dwSourceIndex ) -{ - SIC_ENTRY sice; - INT ret, index = INVALID_INDEX; - WCHAR path[MAX_PATH]; - - TRACE("%s %i\n", debugstr_w(sSourceFile), dwSourceIndex); - - GetFullPathNameW(sSourceFile, MAX_PATH, path, NULL); - sice.sSourceFile = path; - sice.dwSourceIndex = dwSourceIndex; - - EnterCriticalSection(&SHELL32_SicCS); - - if (NULL != DPA_GetPtr (sic_hdpa, 0)) - { - /* search linear from position 0*/ - index = DPA_Search (sic_hdpa, &sice, 0, SIC_CompareEntries, 0, 0); - } - - if ( INVALID_INDEX == index ) - { - ret = SIC_LoadIcon (sSourceFile, dwSourceIndex); - } - else - { - TRACE("-- found\n"); - ret = ((LPSIC_ENTRY)DPA_GetPtr(sic_hdpa, index))->dwListIndex; - } - - LeaveCriticalSection(&SHELL32_SicCS); - return ret; -} -/***************************************************************************** - * SIC_Initialize [internal] - * - * NOTES - * hack to load the resources from the shell32.dll under a different dll name - * will be removed when the resource-compiler is ready - */ -BOOL SIC_Initialize(void) -{ - HICON hSm, hLg; - UINT index; - int cx_small, cy_small; - int cx_large, cy_large; - - cx_small = GetSystemMetrics(SM_CXSMICON); - cy_small = GetSystemMetrics(SM_CYSMICON); - cx_large = GetSystemMetrics(SM_CXICON); - cy_large = GetSystemMetrics(SM_CYICON); - - TRACE("\n"); - - if (sic_hdpa) /* already initialized?*/ - return TRUE; - - sic_hdpa = DPA_Create(16); - - if (!sic_hdpa) - { - return(FALSE); - } - - ShellSmallIconList = ImageList_Create(16,16,ILC_COLOR32|ILC_MASK,0,0x20); - ShellBigIconList = ImageList_Create(32,32,ILC_COLOR32|ILC_MASK,0,0x20); - - ImageList_SetBkColor(ShellSmallIconList, CLR_NONE); - ImageList_SetBkColor(ShellBigIconList, CLR_NONE); - - for (index=1; index<39; index++) - { - hSm = (HICON)LoadImageA(shell32_hInstance, MAKEINTRESOURCEA(index), IMAGE_ICON, cx_small, cy_small, LR_SHARED); - hLg = (HICON)LoadImageA(shell32_hInstance, MAKEINTRESOURCEA(index), IMAGE_ICON, cx_large, cy_large, LR_SHARED); - - if(!hSm) - { - hSm = LoadImageA(shell32_hInstance, MAKEINTRESOURCEA(1), IMAGE_ICON, cx_small, cy_small, LR_SHARED); - hLg = LoadImageA(shell32_hInstance, MAKEINTRESOURCEA(1), IMAGE_ICON, cx_large, cy_large, LR_SHARED); - } - SIC_IconAppend (swShell32Name, index, hSm, hLg); - } - - TRACE("hIconSmall=%p hIconBig=%p\n",ShellSmallIconList, ShellBigIconList); - - return TRUE; -} -/************************************************************************* - * SIC_Destroy - * - * frees the cache - */ -static INT CALLBACK sic_free( LPVOID ptr, LPVOID lparam ) -{ - HeapFree(GetProcessHeap(), 0, ((LPSIC_ENTRY)ptr)->sSourceFile); - SHFree(ptr); - return TRUE; -} - -void SIC_Destroy(void) -{ - TRACE("\n"); - - EnterCriticalSection(&SHELL32_SicCS); - - if (sic_hdpa) DPA_DestroyCallback(sic_hdpa, sic_free, NULL ); - - sic_hdpa = NULL; - ImageList_Destroy(ShellSmallIconList); - ShellSmallIconList = 0; - ImageList_Destroy(ShellBigIconList); - ShellBigIconList = 0; - - LeaveCriticalSection(&SHELL32_SicCS); -} - -/************************************************************************* - * Shell_GetImageList [SHELL32.71] - * - * PARAMETERS - * imglist[1|2] [OUT] pointer which receives imagelist handles - * - */ -BOOL WINAPI Shell_GetImageList(HIMAGELIST * lpBigList, HIMAGELIST * lpSmallList) -{ TRACE("(%p,%p)\n",lpBigList,lpSmallList); - if (lpBigList) - { *lpBigList = ShellBigIconList; - } - if (lpSmallList) - { *lpSmallList = ShellSmallIconList; - } - - return TRUE; -} -/************************************************************************* - * PidlToSicIndex [INTERNAL] - * - * PARAMETERS - * sh [IN] IShellFolder - * pidl [IN] - * bBigIcon [IN] - * uFlags [IN] GIL_* - * pIndex [OUT] index within the SIC - * - */ -BOOL PidlToSicIndex ( - IShellFolder * sh, - LPCITEMIDLIST pidl, - BOOL bBigIcon, - UINT uFlags, - int * pIndex) -{ - IExtractIconW *ei; - WCHAR szIconFile[MAX_PATH]; /* file containing the icon */ - INT iSourceIndex; /* index or resID(negated) in this file */ - BOOL ret = FALSE; - UINT dwFlags = 0; - - TRACE("sf=%p pidl=%p %s\n", sh, pidl, bBigIcon?"Big":"Small"); - - if (SUCCEEDED (IShellFolder_GetUIObjectOf(sh, 0, 1, &pidl, &IID_IExtractIconW, 0, (void **)&ei))) - { - if (SUCCEEDED(IExtractIconW_GetIconLocation(ei, uFlags, szIconFile, MAX_PATH, &iSourceIndex, &dwFlags))) - { - *pIndex = SIC_GetIconIndex(szIconFile, iSourceIndex); - ret = TRUE; - } - IExtractIconW_Release(ei); - } - - if (INVALID_INDEX == *pIndex) /* default icon when failed */ - *pIndex = 0; - - return ret; - -} - -/************************************************************************* - * SHMapPIDLToSystemImageListIndex [SHELL32.77] - * - * PARAMETERS - * sh [IN] pointer to an instance of IShellFolder - * pidl [IN] - * pIndex [OUT][OPTIONAL] SIC index for big icon - * - */ -int WINAPI SHMapPIDLToSystemImageListIndex( - IShellFolder *sh, - LPCITEMIDLIST pidl, - int *pIndex) -{ - int Index; - - TRACE("(SF=%p,pidl=%p,%p)\n",sh,pidl,pIndex); - pdump(pidl); - - if (pIndex) - if (!PidlToSicIndex ( sh, pidl, 1, 0, pIndex)) - *pIndex = -1; - - if (!PidlToSicIndex ( sh, pidl, 0, 0, &Index)) - return -1; - - return Index; -} - -/************************************************************************* - * Shell_GetCachedImageIndex [SHELL32.72] - * - */ -INT WINAPI Shell_GetCachedImageIndexA(LPCSTR szPath, INT nIndex, BOOL bSimulateDoc) -{ - INT ret, len; - LPWSTR szTemp; - - WARN("(%s,%08x,%08x) semi-stub.\n",debugstr_a(szPath), nIndex, bSimulateDoc); - - len = MultiByteToWideChar( CP_ACP, 0, szPath, -1, NULL, 0 ); - szTemp = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) ); - MultiByteToWideChar( CP_ACP, 0, szPath, -1, szTemp, len ); - - ret = SIC_GetIconIndex( szTemp, nIndex ); - - HeapFree( GetProcessHeap(), 0, szTemp ); - - return ret; -} - -INT WINAPI Shell_GetCachedImageIndexW(LPCWSTR szPath, INT nIndex, BOOL bSimulateDoc) -{ - WARN("(%s,%08x,%08x) semi-stub.\n",debugstr_w(szPath), nIndex, bSimulateDoc); - - return SIC_GetIconIndex(szPath, nIndex); -} - -INT WINAPI Shell_GetCachedImageIndexAW(LPCVOID szPath, INT nIndex, BOOL bSimulateDoc) -{ if( SHELL_OsIsUnicode()) - return Shell_GetCachedImageIndexW(szPath, nIndex, bSimulateDoc); - return Shell_GetCachedImageIndexA(szPath, nIndex, bSimulateDoc); -} - -/************************************************************************* - * ExtractIconExW [SHELL32.@] - * RETURNS - * 0 no icon found - * -1 file is not valid - * or number of icons extracted - */ -UINT WINAPI ExtractIconExW(LPCWSTR lpszFile, INT nIconIndex, HICON * phiconLarge, HICON * phiconSmall, UINT nIcons) -{ - /* get entry point of undocumented function PrivateExtractIconExW() in user32 */ -#if defined(__CYGWIN__) || defined (__MINGW32__) || defined(_MSC_VER) - static UINT (WINAPI*PrivateExtractIconExW)(LPCWSTR,int,HICON*,HICON*,UINT) = NULL; - - if (!PrivateExtractIconExW) { - HMODULE hUser32 = GetModuleHandleA("user32"); - PrivateExtractIconExW = (UINT(WINAPI*)(LPCWSTR,int,HICON*,HICON*,UINT)) GetProcAddress(hUser32, "PrivateExtractIconExW"); - - if (!PrivateExtractIconExW) - return 0; - } -#endif - - TRACE("%s %i %p %p %i\n", debugstr_w(lpszFile), nIconIndex, phiconLarge, phiconSmall, nIcons); - - return PrivateExtractIconExW(lpszFile, nIconIndex, phiconLarge, phiconSmall, nIcons); -} - -/************************************************************************* - * ExtractIconExA [SHELL32.@] - */ -UINT WINAPI ExtractIconExA(LPCSTR lpszFile, INT nIconIndex, HICON * phiconLarge, HICON * phiconSmall, UINT nIcons) -{ - UINT ret = 0; - INT len = MultiByteToWideChar(CP_ACP, 0, lpszFile, -1, NULL, 0); - LPWSTR lpwstrFile = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); - - TRACE("%s %i %p %p %i\n", lpszFile, nIconIndex, phiconLarge, phiconSmall, nIcons); - - if (lpwstrFile) - { - MultiByteToWideChar(CP_ACP, 0, lpszFile, -1, lpwstrFile, len); - ret = ExtractIconExW(lpwstrFile, nIconIndex, phiconLarge, phiconSmall, nIcons); - HeapFree(GetProcessHeap(), 0, lpwstrFile); - } - return ret; -} - -/************************************************************************* - * ExtractAssociatedIconA (SHELL32.@) - * - * Return icon for given file (either from file itself or from associated - * executable) and patch parameters if needed. - */ -HICON WINAPI ExtractAssociatedIconA(HINSTANCE hInst, LPSTR lpIconPath, LPWORD lpiIcon) -{ - HICON hIcon = NULL; - INT len = MultiByteToWideChar(CP_ACP, 0, lpIconPath, -1, NULL, 0); - LPWSTR lpIconPathW = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); - - TRACE("%p %s %p\n", hInst, debugstr_a(lpIconPath), lpiIcon); - - if (lpIconPathW) - { - MultiByteToWideChar(CP_ACP, 0, lpIconPath, -1, lpIconPathW, len); - hIcon = ExtractAssociatedIconW(hInst, lpIconPathW, lpiIcon); - HeapFree(GetProcessHeap(), 0, lpIconPathW); - } - return hIcon; -} - -HICON WINAPI ExtractAssociatedIconW(HINSTANCE hInst, LPWSTR lpIconPath, LPWORD lpiIcon) -{ - HICON hIcon = NULL; - WORD wDummyIcon = 0; - - TRACE("%p %s %p\n", hInst, debugstr_w(lpIconPath), lpiIcon); - - if(lpiIcon == NULL) - lpiIcon = &wDummyIcon; - - hIcon = ExtractIconW(hInst, lpIconPath, *lpiIcon); - - if( hIcon < (HICON)2 ) - { if( hIcon == (HICON)1 ) /* no icons found in given file */ - { WCHAR tempPath[MAX_PATH]; - HINSTANCE uRet = FindExecutableW(lpIconPath,NULL,tempPath); - - if( uRet > (HINSTANCE)32 && tempPath[0] ) - { lstrcpyW(lpIconPath,tempPath); - hIcon = ExtractIconW(hInst, lpIconPath, *lpiIcon); - if( hIcon > (HICON)2 ) - return hIcon; - } - } - - if( hIcon == (HICON)1 ) - *lpiIcon = 2; /* MSDOS icon - we found .exe but no icons in it */ - else - *lpiIcon = 6; /* generic icon - found nothing */ - - if (GetModuleFileNameW(hInst, lpIconPath, MAX_PATH)) - hIcon = LoadIconW(hInst, MAKEINTRESOURCEW(*lpiIcon)); - } - return hIcon; -} - -/************************************************************************* - * ExtractAssociatedIconExW (SHELL32.@) - * - * Return icon for given file (either from file itself or from associated - * executable) and patch parameters if needed. - */ -HICON WINAPI ExtractAssociatedIconExW(HINSTANCE hInst, LPWSTR lpIconPath, LPWORD lpiIconIdx, LPWORD lpiIconId) -{ - FIXME("%p %s %p %p): stub\n", hInst, debugstr_w(lpIconPath), lpiIconIdx, lpiIconId); - return 0; -} - -/************************************************************************* - * ExtractAssociatedIconExA (SHELL32.@) - * - * Return icon for given file (either from file itself or from associated - * executable) and patch parameters if needed. - */ -HICON WINAPI ExtractAssociatedIconExA(HINSTANCE hInst, LPSTR lpIconPath, LPWORD lpiIconIdx, LPWORD lpiIconId) -{ - HICON ret; - INT len = MultiByteToWideChar( CP_ACP, 0, lpIconPath, -1, NULL, 0 ); - LPWSTR lpwstrFile = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) ); - - TRACE("%p %s %p %p)\n", hInst, lpIconPath, lpiIconIdx, lpiIconId); - - MultiByteToWideChar( CP_ACP, 0, lpIconPath, -1, lpwstrFile, len ); - ret = ExtractAssociatedIconExW(hInst, lpwstrFile, lpiIconIdx, lpiIconId); - HeapFree(GetProcessHeap(), 0, lpwstrFile); - return ret; -} - - -/**************************************************************************** - * SHDefExtractIconW [SHELL32.@] - */ -HRESULT WINAPI SHDefExtractIconW(LPCWSTR pszIconFile, int iIndex, UINT uFlags, - HICON* phiconLarge, HICON* phiconSmall, UINT nIconSize) -{ - UINT ret; - HICON hIcons[2]; - WARN("%s %d 0x%08x %p %p %d, semi-stub\n", debugstr_w(pszIconFile), iIndex, uFlags, phiconLarge, phiconSmall, nIconSize); - - ret = PrivateExtractIconsW(pszIconFile, iIndex, nIconSize, nIconSize, hIcons, NULL, 2, LR_DEFAULTCOLOR); - /* FIXME: deal with uFlags parameter which contains GIL_ flags */ - if (ret == 0xFFFFFFFF) - return E_FAIL; - if (ret > 0) { - *phiconLarge = hIcons[0]; - *phiconSmall = hIcons[1]; - return S_OK; - } - return S_FALSE; -} - -/**************************************************************************** - * SHDefExtractIconA [SHELL32.@] - */ -HRESULT WINAPI SHDefExtractIconA(LPCSTR pszIconFile, int iIndex, UINT uFlags, - HICON* phiconLarge, HICON* phiconSmall, UINT nIconSize) -{ - HRESULT ret; - INT len = MultiByteToWideChar(CP_ACP, 0, pszIconFile, -1, NULL, 0); - LPWSTR lpwstrFile = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); - - TRACE("%s %d 0x%08x %p %p %d\n", pszIconFile, iIndex, uFlags, phiconLarge, phiconSmall, nIconSize); - - MultiByteToWideChar(CP_ACP, 0, pszIconFile, -1, lpwstrFile, len); - ret = SHDefExtractIconW(lpwstrFile, iIndex, uFlags, phiconLarge, phiconSmall, nIconSize); - HeapFree(GetProcessHeap(), 0, lpwstrFile); - return ret; -} +/* + * shell icon cache (SIC) + * + * Copyright 1998, 1999 Juergen Schmied + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" +#include "wine/port.h" + +#include +#include +#include +#ifdef HAVE_UNISTD_H +# include +#endif + +#define COBJMACROS + +#include "windef.h" +#include "winbase.h" +#include "wingdi.h" +#include "winuser.h" +#include "winreg.h" +#include "wine/debug.h" + +#include "shellapi.h" +#include "objbase.h" +#include "shlguid.h" +#include "pidl.h" +#include "shell32_main.h" +#include "undocshell.h" + +WINE_DEFAULT_DEBUG_CHANNEL(shell); + +/********************** THE ICON CACHE ********************************/ + +#define INVALID_INDEX -1 + +typedef struct +{ + LPWSTR sSourceFile; /* file (not path!) containing the icon */ + DWORD dwSourceIndex; /* index within the file, if it is a resoure ID it will be negated */ + DWORD dwListIndex; /* index within the iconlist */ + DWORD dwFlags; /* GIL_* flags */ + DWORD dwAccessTime; +} SIC_ENTRY, * LPSIC_ENTRY; + +static HDPA sic_hdpa = 0; + +static CRITICAL_SECTION SHELL32_SicCS; +static CRITICAL_SECTION_DEBUG critsect_debug = +{ + 0, 0, &SHELL32_SicCS, + { &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList }, + 0, 0, { 0, (DWORD)(__FILE__ ": SHELL32_SicCS") } +}; +static CRITICAL_SECTION SHELL32_SicCS = { &critsect_debug, -1, 0, 0, 0, 0 }; + +/***************************************************************************** + * SIC_CompareEntries + * + * NOTES + * Callback for DPA_Search + */ +static INT CALLBACK SIC_CompareEntries( LPVOID p1, LPVOID p2, LPARAM lparam) +{ TRACE("%p %p %8lx\n", p1, p2, lparam); + + if (((LPSIC_ENTRY)p1)->dwSourceIndex != ((LPSIC_ENTRY)p2)->dwSourceIndex) /* first the faster one*/ + return 1; + + if (strcmpiW(((LPSIC_ENTRY)p1)->sSourceFile,((LPSIC_ENTRY)p2)->sSourceFile)) + return 1; + + return 0; +} +/***************************************************************************** + * SIC_IconAppend [internal] + * + * NOTES + * appends an icon pair to the end of the cache + */ +static INT SIC_IconAppend (LPCWSTR sSourceFile, INT dwSourceIndex, HICON hSmallIcon, HICON hBigIcon) +{ LPSIC_ENTRY lpsice; + INT ret, index, index1; + WCHAR path[MAX_PATH]; + TRACE("%s %i %p %p\n", debugstr_w(sSourceFile), dwSourceIndex, hSmallIcon ,hBigIcon); + + lpsice = (LPSIC_ENTRY) SHAlloc (sizeof (SIC_ENTRY)); + + GetFullPathNameW(sSourceFile, MAX_PATH, path, NULL); + lpsice->sSourceFile = HeapAlloc( GetProcessHeap(), 0, (strlenW(path)+1)*sizeof(WCHAR) ); + strcpyW( lpsice->sSourceFile, path ); + + lpsice->dwSourceIndex = dwSourceIndex; + + EnterCriticalSection(&SHELL32_SicCS); + + index = DPA_InsertPtr(sic_hdpa, 0x7fff, lpsice); + if ( INVALID_INDEX == index ) + { + HeapFree(GetProcessHeap(), 0, lpsice->sSourceFile); + SHFree(lpsice); + ret = INVALID_INDEX; + } + else + { + index = ImageList_AddIcon (ShellSmallIconList, hSmallIcon); + index1= ImageList_AddIcon (ShellBigIconList, hBigIcon); + + if (index!=index1) + { + FIXME("iconlists out of sync 0x%x 0x%x\n", index, index1); + } + lpsice->dwListIndex = index; + ret = lpsice->dwListIndex; + } + + LeaveCriticalSection(&SHELL32_SicCS); + return ret; +} +/**************************************************************************** + * SIC_LoadIcon [internal] + * + * NOTES + * gets small/big icon by number from a file + */ +static INT SIC_LoadIcon (LPCWSTR sSourceFile, INT dwSourceIndex) +{ HICON hiconLarge=0; + HICON hiconSmall=0; + +#if defined(__CYGWIN__) || defined (__MINGW32__) || defined(_MSC_VER) + static UINT (WINAPI*PrivateExtractIconExW)(LPCWSTR,int,HICON*,HICON*,UINT) = NULL; + + if (!PrivateExtractIconExW) { + HMODULE hUser32 = GetModuleHandleA("user32"); + PrivateExtractIconExW = (UINT(WINAPI*)(LPCWSTR,int,HICON*,HICON*,UINT)) GetProcAddress(hUser32, "PrivateExtractIconExW"); + } + + if (PrivateExtractIconExW) + PrivateExtractIconExW(sSourceFile, dwSourceIndex, &hiconLarge, &hiconSmall, 1); + else +#endif + { + PrivateExtractIconsW(sSourceFile, dwSourceIndex, 32, 32, &hiconLarge, NULL, 1, 0); + PrivateExtractIconsW(sSourceFile, dwSourceIndex, 16, 16, &hiconSmall, NULL, 1, 0); + } + + if ( !hiconLarge || !hiconSmall) + { + WARN("failure loading icon %i from %s (%p %p)\n", dwSourceIndex, debugstr_w(sSourceFile), hiconLarge, hiconSmall); + return -1; + } + return SIC_IconAppend (sSourceFile, dwSourceIndex, hiconSmall, hiconLarge); +} +/***************************************************************************** + * SIC_GetIconIndex [internal] + * + * Parameters + * sSourceFile [IN] filename of file containing the icon + * index [IN] index/resID (negated) in this file + * + * NOTES + * look in the cache for a proper icon. if not available the icon is taken + * from the file and cached + */ +INT SIC_GetIconIndex (LPCWSTR sSourceFile, INT dwSourceIndex ) +{ + SIC_ENTRY sice; + INT ret, index = INVALID_INDEX; + WCHAR path[MAX_PATH]; + + TRACE("%s %i\n", debugstr_w(sSourceFile), dwSourceIndex); + + GetFullPathNameW(sSourceFile, MAX_PATH, path, NULL); + sice.sSourceFile = path; + sice.dwSourceIndex = dwSourceIndex; + + EnterCriticalSection(&SHELL32_SicCS); + + if (NULL != DPA_GetPtr (sic_hdpa, 0)) + { + /* search linear from position 0*/ + index = DPA_Search (sic_hdpa, &sice, 0, SIC_CompareEntries, 0, 0); + } + + if ( INVALID_INDEX == index ) + { + ret = SIC_LoadIcon (sSourceFile, dwSourceIndex); + } + else + { + TRACE("-- found\n"); + ret = ((LPSIC_ENTRY)DPA_GetPtr(sic_hdpa, index))->dwListIndex; + } + + LeaveCriticalSection(&SHELL32_SicCS); + return ret; +} +/***************************************************************************** + * SIC_Initialize [internal] + * + * NOTES + * hack to load the resources from the shell32.dll under a different dll name + * will be removed when the resource-compiler is ready + */ +BOOL SIC_Initialize(void) +{ + HICON hSm, hLg; + UINT index; + int cx_small, cy_small; + int cx_large, cy_large; + + cx_small = GetSystemMetrics(SM_CXSMICON); + cy_small = GetSystemMetrics(SM_CYSMICON); + cx_large = GetSystemMetrics(SM_CXICON); + cy_large = GetSystemMetrics(SM_CYICON); + + TRACE("\n"); + + if (sic_hdpa) /* already initialized?*/ + return TRUE; + + sic_hdpa = DPA_Create(16); + + if (!sic_hdpa) + { + return(FALSE); + } + + ShellSmallIconList = ImageList_Create(16,16,ILC_COLOR32|ILC_MASK,0,0x20); + ShellBigIconList = ImageList_Create(32,32,ILC_COLOR32|ILC_MASK,0,0x20); + + ImageList_SetBkColor(ShellSmallIconList, CLR_NONE); + ImageList_SetBkColor(ShellBigIconList, CLR_NONE); + + for (index=1; index<39; index++) + { + hSm = (HICON)LoadImageA(shell32_hInstance, MAKEINTRESOURCEA(index), IMAGE_ICON, cx_small, cy_small, LR_SHARED); + hLg = (HICON)LoadImageA(shell32_hInstance, MAKEINTRESOURCEA(index), IMAGE_ICON, cx_large, cy_large, LR_SHARED); + + if(!hSm) + { + hSm = LoadImageA(shell32_hInstance, MAKEINTRESOURCEA(1), IMAGE_ICON, cx_small, cy_small, LR_SHARED); + hLg = LoadImageA(shell32_hInstance, MAKEINTRESOURCEA(1), IMAGE_ICON, cx_large, cy_large, LR_SHARED); + } + SIC_IconAppend (swShell32Name, index, hSm, hLg); + } + + TRACE("hIconSmall=%p hIconBig=%p\n",ShellSmallIconList, ShellBigIconList); + + return TRUE; +} +/************************************************************************* + * SIC_Destroy + * + * frees the cache + */ +static INT CALLBACK sic_free( LPVOID ptr, LPVOID lparam ) +{ + HeapFree(GetProcessHeap(), 0, ((LPSIC_ENTRY)ptr)->sSourceFile); + SHFree(ptr); + return TRUE; +} + +void SIC_Destroy(void) +{ + TRACE("\n"); + + EnterCriticalSection(&SHELL32_SicCS); + + if (sic_hdpa) DPA_DestroyCallback(sic_hdpa, sic_free, NULL ); + + sic_hdpa = NULL; + ImageList_Destroy(ShellSmallIconList); + ShellSmallIconList = 0; + ImageList_Destroy(ShellBigIconList); + ShellBigIconList = 0; + + LeaveCriticalSection(&SHELL32_SicCS); +} + +/************************************************************************* + * Shell_GetImageList [SHELL32.71] + * + * PARAMETERS + * imglist[1|2] [OUT] pointer which receives imagelist handles + * + */ +BOOL WINAPI Shell_GetImageList(HIMAGELIST * lpBigList, HIMAGELIST * lpSmallList) +{ TRACE("(%p,%p)\n",lpBigList,lpSmallList); + if (lpBigList) + { *lpBigList = ShellBigIconList; + } + if (lpSmallList) + { *lpSmallList = ShellSmallIconList; + } + + return TRUE; +} +/************************************************************************* + * PidlToSicIndex [INTERNAL] + * + * PARAMETERS + * sh [IN] IShellFolder + * pidl [IN] + * bBigIcon [IN] + * uFlags [IN] GIL_* + * pIndex [OUT] index within the SIC + * + */ +BOOL PidlToSicIndex ( + IShellFolder * sh, + LPCITEMIDLIST pidl, + BOOL bBigIcon, + UINT uFlags, + int * pIndex) +{ + IExtractIconW *ei; + WCHAR szIconFile[MAX_PATH]; /* file containing the icon */ + INT iSourceIndex; /* index or resID(negated) in this file */ + BOOL ret = FALSE; + UINT dwFlags = 0; + + TRACE("sf=%p pidl=%p %s\n", sh, pidl, bBigIcon?"Big":"Small"); + + if (SUCCEEDED (IShellFolder_GetUIObjectOf(sh, 0, 1, &pidl, &IID_IExtractIconW, 0, (void **)&ei))) + { + if (SUCCEEDED(IExtractIconW_GetIconLocation(ei, uFlags, szIconFile, MAX_PATH, &iSourceIndex, &dwFlags))) + { + *pIndex = SIC_GetIconIndex(szIconFile, iSourceIndex); + ret = TRUE; + } + IExtractIconW_Release(ei); + } + + if (INVALID_INDEX == *pIndex) /* default icon when failed */ + *pIndex = 0; + + return ret; + +} + +/************************************************************************* + * SHMapPIDLToSystemImageListIndex [SHELL32.77] + * + * PARAMETERS + * sh [IN] pointer to an instance of IShellFolder + * pidl [IN] + * pIndex [OUT][OPTIONAL] SIC index for big icon + * + */ +int WINAPI SHMapPIDLToSystemImageListIndex( + IShellFolder *sh, + LPCITEMIDLIST pidl, + int *pIndex) +{ + int Index; + + TRACE("(SF=%p,pidl=%p,%p)\n",sh,pidl,pIndex); + pdump(pidl); + + if (pIndex) + if (!PidlToSicIndex ( sh, pidl, 1, 0, pIndex)) + *pIndex = -1; + + if (!PidlToSicIndex ( sh, pidl, 0, 0, &Index)) + return -1; + + return Index; +} + +/************************************************************************* + * Shell_GetCachedImageIndex [SHELL32.72] + * + */ +INT WINAPI Shell_GetCachedImageIndexA(LPCSTR szPath, INT nIndex, BOOL bSimulateDoc) +{ + INT ret, len; + LPWSTR szTemp; + + WARN("(%s,%08x,%08x) semi-stub.\n",debugstr_a(szPath), nIndex, bSimulateDoc); + + len = MultiByteToWideChar( CP_ACP, 0, szPath, -1, NULL, 0 ); + szTemp = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) ); + MultiByteToWideChar( CP_ACP, 0, szPath, -1, szTemp, len ); + + ret = SIC_GetIconIndex( szTemp, nIndex ); + + HeapFree( GetProcessHeap(), 0, szTemp ); + + return ret; +} + +INT WINAPI Shell_GetCachedImageIndexW(LPCWSTR szPath, INT nIndex, BOOL bSimulateDoc) +{ + WARN("(%s,%08x,%08x) semi-stub.\n",debugstr_w(szPath), nIndex, bSimulateDoc); + + return SIC_GetIconIndex(szPath, nIndex); +} + +INT WINAPI Shell_GetCachedImageIndexAW(LPCVOID szPath, INT nIndex, BOOL bSimulateDoc) +{ if( SHELL_OsIsUnicode()) + return Shell_GetCachedImageIndexW(szPath, nIndex, bSimulateDoc); + return Shell_GetCachedImageIndexA(szPath, nIndex, bSimulateDoc); +} + +/************************************************************************* + * ExtractIconExW [SHELL32.@] + * RETURNS + * 0 no icon found + * -1 file is not valid + * or number of icons extracted + */ +UINT WINAPI ExtractIconExW(LPCWSTR lpszFile, INT nIconIndex, HICON * phiconLarge, HICON * phiconSmall, UINT nIcons) +{ + /* get entry point of undocumented function PrivateExtractIconExW() in user32 */ +#if defined(__CYGWIN__) || defined (__MINGW32__) || defined(_MSC_VER) + static UINT (WINAPI*PrivateExtractIconExW)(LPCWSTR,int,HICON*,HICON*,UINT) = NULL; + + if (!PrivateExtractIconExW) { + HMODULE hUser32 = GetModuleHandleA("user32"); + PrivateExtractIconExW = (UINT(WINAPI*)(LPCWSTR,int,HICON*,HICON*,UINT)) GetProcAddress(hUser32, "PrivateExtractIconExW"); + + if (!PrivateExtractIconExW) + return 0; + } +#endif + + TRACE("%s %i %p %p %i\n", debugstr_w(lpszFile), nIconIndex, phiconLarge, phiconSmall, nIcons); + + return PrivateExtractIconExW(lpszFile, nIconIndex, phiconLarge, phiconSmall, nIcons); +} + +/************************************************************************* + * ExtractIconExA [SHELL32.@] + */ +UINT WINAPI ExtractIconExA(LPCSTR lpszFile, INT nIconIndex, HICON * phiconLarge, HICON * phiconSmall, UINT nIcons) +{ + UINT ret = 0; + INT len = MultiByteToWideChar(CP_ACP, 0, lpszFile, -1, NULL, 0); + LPWSTR lpwstrFile = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); + + TRACE("%s %i %p %p %i\n", lpszFile, nIconIndex, phiconLarge, phiconSmall, nIcons); + + if (lpwstrFile) + { + MultiByteToWideChar(CP_ACP, 0, lpszFile, -1, lpwstrFile, len); + ret = ExtractIconExW(lpwstrFile, nIconIndex, phiconLarge, phiconSmall, nIcons); + HeapFree(GetProcessHeap(), 0, lpwstrFile); + } + return ret; +} + +/************************************************************************* + * ExtractAssociatedIconA (SHELL32.@) + * + * Return icon for given file (either from file itself or from associated + * executable) and patch parameters if needed. + */ +HICON WINAPI ExtractAssociatedIconA(HINSTANCE hInst, LPSTR lpIconPath, LPWORD lpiIcon) +{ + HICON hIcon = NULL; + INT len = MultiByteToWideChar(CP_ACP, 0, lpIconPath, -1, NULL, 0); + LPWSTR lpIconPathW = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); + + TRACE("%p %s %p\n", hInst, debugstr_a(lpIconPath), lpiIcon); + + if (lpIconPathW) + { + MultiByteToWideChar(CP_ACP, 0, lpIconPath, -1, lpIconPathW, len); + hIcon = ExtractAssociatedIconW(hInst, lpIconPathW, lpiIcon); + HeapFree(GetProcessHeap(), 0, lpIconPathW); + } + return hIcon; +} + +HICON WINAPI ExtractAssociatedIconW(HINSTANCE hInst, LPWSTR lpIconPath, LPWORD lpiIcon) +{ + HICON hIcon = NULL; + WORD wDummyIcon = 0; + + TRACE("%p %s %p\n", hInst, debugstr_w(lpIconPath), lpiIcon); + + if(lpiIcon == NULL) + lpiIcon = &wDummyIcon; + + hIcon = ExtractIconW(hInst, lpIconPath, *lpiIcon); + + if( hIcon < (HICON)2 ) + { if( hIcon == (HICON)1 ) /* no icons found in given file */ + { WCHAR tempPath[MAX_PATH]; + HINSTANCE uRet = FindExecutableW(lpIconPath,NULL,tempPath); + + if( uRet > (HINSTANCE)32 && tempPath[0] ) + { lstrcpyW(lpIconPath,tempPath); + hIcon = ExtractIconW(hInst, lpIconPath, *lpiIcon); + if( hIcon > (HICON)2 ) + return hIcon; + } + } + + if( hIcon == (HICON)1 ) + *lpiIcon = 2; /* MSDOS icon - we found .exe but no icons in it */ + else + *lpiIcon = 6; /* generic icon - found nothing */ + + if (GetModuleFileNameW(hInst, lpIconPath, MAX_PATH)) + hIcon = LoadIconW(hInst, MAKEINTRESOURCEW(*lpiIcon)); + } + return hIcon; +} + +/************************************************************************* + * ExtractAssociatedIconExW (SHELL32.@) + * + * Return icon for given file (either from file itself or from associated + * executable) and patch parameters if needed. + */ +HICON WINAPI ExtractAssociatedIconExW(HINSTANCE hInst, LPWSTR lpIconPath, LPWORD lpiIconIdx, LPWORD lpiIconId) +{ + FIXME("%p %s %p %p): stub\n", hInst, debugstr_w(lpIconPath), lpiIconIdx, lpiIconId); + return 0; +} + +/************************************************************************* + * ExtractAssociatedIconExA (SHELL32.@) + * + * Return icon for given file (either from file itself or from associated + * executable) and patch parameters if needed. + */ +HICON WINAPI ExtractAssociatedIconExA(HINSTANCE hInst, LPSTR lpIconPath, LPWORD lpiIconIdx, LPWORD lpiIconId) +{ + HICON ret; + INT len = MultiByteToWideChar( CP_ACP, 0, lpIconPath, -1, NULL, 0 ); + LPWSTR lpwstrFile = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) ); + + TRACE("%p %s %p %p)\n", hInst, lpIconPath, lpiIconIdx, lpiIconId); + + MultiByteToWideChar( CP_ACP, 0, lpIconPath, -1, lpwstrFile, len ); + ret = ExtractAssociatedIconExW(hInst, lpwstrFile, lpiIconIdx, lpiIconId); + HeapFree(GetProcessHeap(), 0, lpwstrFile); + return ret; +} + + +/**************************************************************************** + * SHDefExtractIconW [SHELL32.@] + */ +HRESULT WINAPI SHDefExtractIconW(LPCWSTR pszIconFile, int iIndex, UINT uFlags, + HICON* phiconLarge, HICON* phiconSmall, UINT nIconSize) +{ + UINT ret; + HICON hIcons[2]; + WARN("%s %d 0x%08x %p %p %d, semi-stub\n", debugstr_w(pszIconFile), iIndex, uFlags, phiconLarge, phiconSmall, nIconSize); + + ret = PrivateExtractIconsW(pszIconFile, iIndex, nIconSize, nIconSize, hIcons, NULL, 2, LR_DEFAULTCOLOR); + /* FIXME: deal with uFlags parameter which contains GIL_ flags */ + if (ret == 0xFFFFFFFF) + return E_FAIL; + if (ret > 0) { + *phiconLarge = hIcons[0]; + *phiconSmall = hIcons[1]; + return S_OK; + } + return S_FALSE; +} + +/**************************************************************************** + * SHDefExtractIconA [SHELL32.@] + */ +HRESULT WINAPI SHDefExtractIconA(LPCSTR pszIconFile, int iIndex, UINT uFlags, + HICON* phiconLarge, HICON* phiconSmall, UINT nIconSize) +{ + HRESULT ret; + INT len = MultiByteToWideChar(CP_ACP, 0, pszIconFile, -1, NULL, 0); + LPWSTR lpwstrFile = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); + + TRACE("%s %d 0x%08x %p %p %d\n", pszIconFile, iIndex, uFlags, phiconLarge, phiconSmall, nIconSize); + + MultiByteToWideChar(CP_ACP, 0, pszIconFile, -1, lpwstrFile, len); + ret = SHDefExtractIconW(lpwstrFile, iIndex, uFlags, phiconLarge, phiconSmall, nIconSize); + HeapFree(GetProcessHeap(), 0, lpwstrFile); + return ret; +} diff --git a/reactos/lib/shell32/makefile b/reactos/lib/shell32/makefile index 263de228b36..b48614a5ce0 100644 --- a/reactos/lib/shell32/makefile +++ b/reactos/lib/shell32/makefile @@ -1,9 +1,9 @@ -# $Id: makefile 7409 2004-01-02 19:49:47Z gvg $ - -PATH_TO_TOP = ../.. - -TARGET_TYPE = winedll - -include $(PATH_TO_TOP)/rules.mak - -include $(TOOLS_PATH)/helper.mk +# $Id: makefile 7409 2004-01-02 19:49:47Z gvg $ + +PATH_TO_TOP = ../.. + +TARGET_TYPE = winedll + +include $(PATH_TO_TOP)/rules.mak + +include $(TOOLS_PATH)/helper.mk diff --git a/reactos/lib/shell32/memorystream.c b/reactos/lib/shell32/memorystream.c index 33cd883cc4c..ff7ea0b00c8 100644 --- a/reactos/lib/shell32/memorystream.c +++ b/reactos/lib/shell32/memorystream.c @@ -1,296 +1,296 @@ -/* - * this class implements a pure IStream object - * and can be used for many purposes - * - * the main reason for implementing this was - * a cleaner implementation of IShellLink which - * needs to be able to load lnk's from a IStream - * interface so it was obvious to capsule the file - * access in a IStream to. - * - * Copyright 1999 Juergen Schmied - * Copyright 2003 Mike McCormack 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include -#include - -#define COBJMACROS - -#include "windef.h" -#include "winbase.h" -#include "winerror.h" -#include "winuser.h" -#include "wingdi.h" -#include "shlobj.h" -#include "wine/debug.h" -#include "shell32_main.h" - -WINE_DEFAULT_DEBUG_CHANNEL(shell); - -static const IStreamVtbl stvt; - -typedef struct -{ - const IStreamVtbl *lpvtst; - DWORD ref; - HANDLE handle; -} ISHFileStream; - -/************************************************************************** - * CreateStreamOnFile() - * - * similar to CreateStreamOnHGlobal - */ -HRESULT CreateStreamOnFile (LPCWSTR pszFilename, DWORD grfMode, IStream ** ppstm) -{ - ISHFileStream* fstr; - HANDLE handle; - DWORD access = GENERIC_READ, creat; - - if( grfMode & STGM_TRANSACTED ) - return E_INVALIDARG; - - if( grfMode & STGM_WRITE ) - access |= GENERIC_WRITE; - if( grfMode & STGM_READWRITE ) - access = GENERIC_WRITE | GENERIC_READ; - - if( grfMode & STGM_CREATE ) - creat = CREATE_ALWAYS; - else - creat = OPEN_EXISTING; - - TRACE("Opening %s\n", debugstr_w(pszFilename) ); - - handle = CreateFileW( pszFilename, access, FILE_SHARE_READ, NULL, creat, 0, NULL ); - if( handle == INVALID_HANDLE_VALUE ) - return HRESULT_FROM_WIN32(GetLastError()); - - fstr = (ISHFileStream*)HeapAlloc(GetProcessHeap(), - HEAP_ZERO_MEMORY,sizeof(ISHFileStream)); - if( !fstr ) - return E_OUTOFMEMORY; - fstr->lpvtst=&stvt; - fstr->ref = 1; - fstr->handle = handle; - - (*ppstm) = (IStream*)fstr; - - return S_OK; -} - -/************************************************************************** -* IStream_fnQueryInterface -*/ -static HRESULT WINAPI IStream_fnQueryInterface(IStream *iface, REFIID riid, LPVOID *ppvObj) -{ - ISHFileStream *This = (ISHFileStream *)iface; - - TRACE("(%p)->(\n\tIID:\t%s,%p)\n",This,debugstr_guid(riid),ppvObj); - - *ppvObj = NULL; - - if(IsEqualIID(riid, &IID_IUnknown) || - IsEqualIID(riid, &IID_IStream)) - { - *ppvObj = This; - } - - if(*ppvObj) - { - IStream_AddRef((IStream*)*ppvObj); - TRACE("-- Interface: (%p)->(%p)\n",ppvObj,*ppvObj); - return S_OK; - } - TRACE("-- Interface: E_NOINTERFACE\n"); - return E_NOINTERFACE; -} - -/************************************************************************** -* IStream_fnAddRef -*/ -static ULONG WINAPI IStream_fnAddRef(IStream *iface) -{ - ISHFileStream *This = (ISHFileStream *)iface; - - TRACE("(%p)->(count=%lu)\n",This, This->ref); - - return ++(This->ref); -} - -/************************************************************************** -* IStream_fnRelease -*/ -static ULONG WINAPI IStream_fnRelease(IStream *iface) -{ - ISHFileStream *This = (ISHFileStream *)iface; - - TRACE("(%p)->()\n",This); - - if (!--(This->ref)) - { - TRACE(" destroying SHFileStream (%p)\n",This); - CloseHandle(This->handle); - HeapFree(GetProcessHeap(),0,This); - } - return This->ref; -} - -static HRESULT WINAPI IStream_fnRead (IStream * iface, void* pv, ULONG cb, ULONG* pcbRead) -{ - ISHFileStream *This = (ISHFileStream *)iface; - - TRACE("(%p)->(%p,0x%08lx,%p)\n",This, pv, cb, pcbRead); - - if ( !pv ) - return STG_E_INVALIDPOINTER; - - if ( ! ReadFile( This->handle, pv, cb, pcbRead, NULL ) ) - return S_FALSE; - - return S_OK; -} - -static HRESULT WINAPI IStream_fnWrite (IStream * iface, const void* pv, ULONG cb, ULONG* pcbWritten) -{ - DWORD dummy_count; - ISHFileStream *This = (ISHFileStream *)iface; - - TRACE("(%p)\n",This); - - if( !pv ) - return STG_E_INVALIDPOINTER; - - /* WriteFile() doesn't allow to specify NULL as write count pointer */ - if (!pcbWritten) - pcbWritten = &dummy_count; - - if( ! WriteFile( This->handle, pv, cb, pcbWritten, NULL ) ) - return E_FAIL; - - return S_OK; -} - -static HRESULT WINAPI IStream_fnSeek (IStream * iface, LARGE_INTEGER dlibMove, DWORD dwOrigin, ULARGE_INTEGER* plibNewPosition) -{ - DWORD pos, newposlo, newposhi; - - ISHFileStream *This = (ISHFileStream *)iface; - - TRACE("(%p)\n",This); - - pos = dlibMove.QuadPart; /* FIXME: truncates */ - newposhi = 0; - newposlo = SetFilePointer( This->handle, pos, &newposhi, dwOrigin ); - if( newposlo == INVALID_SET_FILE_POINTER ) - return E_FAIL; - - plibNewPosition->QuadPart = newposlo | ( (LONGLONG)newposhi<<32); - - return S_OK; -} - -static HRESULT WINAPI IStream_fnSetSize (IStream * iface, ULARGE_INTEGER libNewSize) -{ - ISHFileStream *This = (ISHFileStream *)iface; - - TRACE("(%p)\n",This); - - if( ! SetFilePointer( This->handle, libNewSize.QuadPart, NULL, FILE_BEGIN ) ) - return E_FAIL; - - if( ! SetEndOfFile( This->handle ) ) - return E_FAIL; - - return S_OK; -} -static HRESULT WINAPI IStream_fnCopyTo (IStream * iface, IStream* pstm, ULARGE_INTEGER cb, ULARGE_INTEGER* pcbRead, ULARGE_INTEGER* pcbWritten) -{ - ISHFileStream *This = (ISHFileStream *)iface; - - TRACE("(%p)\n",This); - - return E_NOTIMPL; -} -static HRESULT WINAPI IStream_fnCommit (IStream * iface, DWORD grfCommitFlags) -{ - ISHFileStream *This = (ISHFileStream *)iface; - - TRACE("(%p)\n",This); - - return E_NOTIMPL; -} -static HRESULT WINAPI IStream_fnRevert (IStream * iface) -{ - ISHFileStream *This = (ISHFileStream *)iface; - - TRACE("(%p)\n",This); - - return E_NOTIMPL; -} -static HRESULT WINAPI IStream_fnLockRegion (IStream * iface, ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType) -{ - ISHFileStream *This = (ISHFileStream *)iface; - - TRACE("(%p)\n",This); - - return E_NOTIMPL; -} -static HRESULT WINAPI IStream_fnUnlockRegion (IStream * iface, ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType) -{ - ISHFileStream *This = (ISHFileStream *)iface; - - TRACE("(%p)\n",This); - - return E_NOTIMPL; -} -static HRESULT WINAPI IStream_fnStat (IStream * iface, STATSTG* pstatstg, DWORD grfStatFlag) -{ - ISHFileStream *This = (ISHFileStream *)iface; - - TRACE("(%p)\n",This); - - return E_NOTIMPL; -} -static HRESULT WINAPI IStream_fnClone (IStream * iface, IStream** ppstm) -{ - ISHFileStream *This = (ISHFileStream *)iface; - - TRACE("(%p)\n",This); - - return E_NOTIMPL; -} - -static const IStreamVtbl stvt = -{ - IStream_fnQueryInterface, - IStream_fnAddRef, - IStream_fnRelease, - IStream_fnRead, - IStream_fnWrite, - IStream_fnSeek, - IStream_fnSetSize, - IStream_fnCopyTo, - IStream_fnCommit, - IStream_fnRevert, - IStream_fnLockRegion, - IStream_fnUnlockRegion, - IStream_fnStat, - IStream_fnClone - -}; +/* + * this class implements a pure IStream object + * and can be used for many purposes + * + * the main reason for implementing this was + * a cleaner implementation of IShellLink which + * needs to be able to load lnk's from a IStream + * interface so it was obvious to capsule the file + * access in a IStream to. + * + * Copyright 1999 Juergen Schmied + * Copyright 2003 Mike McCormack 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include +#include + +#define COBJMACROS + +#include "windef.h" +#include "winbase.h" +#include "winerror.h" +#include "winuser.h" +#include "wingdi.h" +#include "shlobj.h" +#include "wine/debug.h" +#include "shell32_main.h" + +WINE_DEFAULT_DEBUG_CHANNEL(shell); + +static const IStreamVtbl stvt; + +typedef struct +{ + const IStreamVtbl *lpvtst; + DWORD ref; + HANDLE handle; +} ISHFileStream; + +/************************************************************************** + * CreateStreamOnFile() + * + * similar to CreateStreamOnHGlobal + */ +HRESULT CreateStreamOnFile (LPCWSTR pszFilename, DWORD grfMode, IStream ** ppstm) +{ + ISHFileStream* fstr; + HANDLE handle; + DWORD access = GENERIC_READ, creat; + + if( grfMode & STGM_TRANSACTED ) + return E_INVALIDARG; + + if( grfMode & STGM_WRITE ) + access |= GENERIC_WRITE; + if( grfMode & STGM_READWRITE ) + access = GENERIC_WRITE | GENERIC_READ; + + if( grfMode & STGM_CREATE ) + creat = CREATE_ALWAYS; + else + creat = OPEN_EXISTING; + + TRACE("Opening %s\n", debugstr_w(pszFilename) ); + + handle = CreateFileW( pszFilename, access, FILE_SHARE_READ, NULL, creat, 0, NULL ); + if( handle == INVALID_HANDLE_VALUE ) + return HRESULT_FROM_WIN32(GetLastError()); + + fstr = (ISHFileStream*)HeapAlloc(GetProcessHeap(), + HEAP_ZERO_MEMORY,sizeof(ISHFileStream)); + if( !fstr ) + return E_OUTOFMEMORY; + fstr->lpvtst=&stvt; + fstr->ref = 1; + fstr->handle = handle; + + (*ppstm) = (IStream*)fstr; + + return S_OK; +} + +/************************************************************************** +* IStream_fnQueryInterface +*/ +static HRESULT WINAPI IStream_fnQueryInterface(IStream *iface, REFIID riid, LPVOID *ppvObj) +{ + ISHFileStream *This = (ISHFileStream *)iface; + + TRACE("(%p)->(\n\tIID:\t%s,%p)\n",This,debugstr_guid(riid),ppvObj); + + *ppvObj = NULL; + + if(IsEqualIID(riid, &IID_IUnknown) || + IsEqualIID(riid, &IID_IStream)) + { + *ppvObj = This; + } + + if(*ppvObj) + { + IStream_AddRef((IStream*)*ppvObj); + TRACE("-- Interface: (%p)->(%p)\n",ppvObj,*ppvObj); + return S_OK; + } + TRACE("-- Interface: E_NOINTERFACE\n"); + return E_NOINTERFACE; +} + +/************************************************************************** +* IStream_fnAddRef +*/ +static ULONG WINAPI IStream_fnAddRef(IStream *iface) +{ + ISHFileStream *This = (ISHFileStream *)iface; + + TRACE("(%p)->(count=%lu)\n",This, This->ref); + + return ++(This->ref); +} + +/************************************************************************** +* IStream_fnRelease +*/ +static ULONG WINAPI IStream_fnRelease(IStream *iface) +{ + ISHFileStream *This = (ISHFileStream *)iface; + + TRACE("(%p)->()\n",This); + + if (!--(This->ref)) + { + TRACE(" destroying SHFileStream (%p)\n",This); + CloseHandle(This->handle); + HeapFree(GetProcessHeap(),0,This); + } + return This->ref; +} + +static HRESULT WINAPI IStream_fnRead (IStream * iface, void* pv, ULONG cb, ULONG* pcbRead) +{ + ISHFileStream *This = (ISHFileStream *)iface; + + TRACE("(%p)->(%p,0x%08lx,%p)\n",This, pv, cb, pcbRead); + + if ( !pv ) + return STG_E_INVALIDPOINTER; + + if ( ! ReadFile( This->handle, pv, cb, pcbRead, NULL ) ) + return S_FALSE; + + return S_OK; +} + +static HRESULT WINAPI IStream_fnWrite (IStream * iface, const void* pv, ULONG cb, ULONG* pcbWritten) +{ + DWORD dummy_count; + ISHFileStream *This = (ISHFileStream *)iface; + + TRACE("(%p)\n",This); + + if( !pv ) + return STG_E_INVALIDPOINTER; + + /* WriteFile() doesn't allow to specify NULL as write count pointer */ + if (!pcbWritten) + pcbWritten = &dummy_count; + + if( ! WriteFile( This->handle, pv, cb, pcbWritten, NULL ) ) + return E_FAIL; + + return S_OK; +} + +static HRESULT WINAPI IStream_fnSeek (IStream * iface, LARGE_INTEGER dlibMove, DWORD dwOrigin, ULARGE_INTEGER* plibNewPosition) +{ + DWORD pos, newposlo, newposhi; + + ISHFileStream *This = (ISHFileStream *)iface; + + TRACE("(%p)\n",This); + + pos = dlibMove.QuadPart; /* FIXME: truncates */ + newposhi = 0; + newposlo = SetFilePointer( This->handle, pos, &newposhi, dwOrigin ); + if( newposlo == INVALID_SET_FILE_POINTER ) + return E_FAIL; + + plibNewPosition->QuadPart = newposlo | ( (LONGLONG)newposhi<<32); + + return S_OK; +} + +static HRESULT WINAPI IStream_fnSetSize (IStream * iface, ULARGE_INTEGER libNewSize) +{ + ISHFileStream *This = (ISHFileStream *)iface; + + TRACE("(%p)\n",This); + + if( ! SetFilePointer( This->handle, libNewSize.QuadPart, NULL, FILE_BEGIN ) ) + return E_FAIL; + + if( ! SetEndOfFile( This->handle ) ) + return E_FAIL; + + return S_OK; +} +static HRESULT WINAPI IStream_fnCopyTo (IStream * iface, IStream* pstm, ULARGE_INTEGER cb, ULARGE_INTEGER* pcbRead, ULARGE_INTEGER* pcbWritten) +{ + ISHFileStream *This = (ISHFileStream *)iface; + + TRACE("(%p)\n",This); + + return E_NOTIMPL; +} +static HRESULT WINAPI IStream_fnCommit (IStream * iface, DWORD grfCommitFlags) +{ + ISHFileStream *This = (ISHFileStream *)iface; + + TRACE("(%p)\n",This); + + return E_NOTIMPL; +} +static HRESULT WINAPI IStream_fnRevert (IStream * iface) +{ + ISHFileStream *This = (ISHFileStream *)iface; + + TRACE("(%p)\n",This); + + return E_NOTIMPL; +} +static HRESULT WINAPI IStream_fnLockRegion (IStream * iface, ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType) +{ + ISHFileStream *This = (ISHFileStream *)iface; + + TRACE("(%p)\n",This); + + return E_NOTIMPL; +} +static HRESULT WINAPI IStream_fnUnlockRegion (IStream * iface, ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType) +{ + ISHFileStream *This = (ISHFileStream *)iface; + + TRACE("(%p)\n",This); + + return E_NOTIMPL; +} +static HRESULT WINAPI IStream_fnStat (IStream * iface, STATSTG* pstatstg, DWORD grfStatFlag) +{ + ISHFileStream *This = (ISHFileStream *)iface; + + TRACE("(%p)\n",This); + + return E_NOTIMPL; +} +static HRESULT WINAPI IStream_fnClone (IStream * iface, IStream** ppstm) +{ + ISHFileStream *This = (ISHFileStream *)iface; + + TRACE("(%p)\n",This); + + return E_NOTIMPL; +} + +static const IStreamVtbl stvt = +{ + IStream_fnQueryInterface, + IStream_fnAddRef, + IStream_fnRelease, + IStream_fnRead, + IStream_fnWrite, + IStream_fnSeek, + IStream_fnSetSize, + IStream_fnCopyTo, + IStream_fnCommit, + IStream_fnRevert, + IStream_fnLockRegion, + IStream_fnUnlockRegion, + IStream_fnStat, + IStream_fnClone + +}; diff --git a/reactos/lib/shell32/pidl.c b/reactos/lib/shell32/pidl.c index dcc4c567224..f77343c7453 100644 --- a/reactos/lib/shell32/pidl.c +++ b/reactos/lib/shell32/pidl.c @@ -1,2220 +1,2220 @@ -/* - * pidl Handling - * - * Copyright 1998 Juergen Schmied - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * NOTES - * a pidl == NULL means desktop and is legal - * - */ - -#include "config.h" -#include "wine/port.h" - -#include -#include -#include -#include - -#define COBJMACROS -#define NONAMELESSUNION -#define NONAMELESSSTRUCT - -#include "windef.h" -#include "winbase.h" -#include "winreg.h" -#include "objbase.h" -#include "shlguid.h" -#include "winerror.h" -#include "winnls.h" -#include "undocshell.h" -#include "shell32_main.h" -#include "shellapi.h" -#include "shlwapi.h" - -#include "pidl.h" -#include "wine/debug.h" - -WINE_DEFAULT_DEBUG_CHANNEL(pidl); -WINE_DECLARE_DEBUG_CHANNEL(shell); - -/* from comctl32.dll */ -extern LPVOID WINAPI Alloc(INT); -extern BOOL WINAPI Free(LPVOID); - -/************************************************************************* - * ILGetDisplayNameEx [SHELL32.186] - * - * Retrieves the display name of an ItemIDList - * - * PARAMS - * psf [I] Shell Folder to start with, if NULL the desktop is used - * pidl [I] ItemIDList relativ to the psf to get the display name for - * path [O] Filled in with the display name, assumed to be at least MAX_PATH long - * type [I] Type of display name to retrieve - * 0 = SHGDN_FORPARSING | SHGDN_FORADDRESSBAR uses always the desktop as root - * 1 = SHGDN_NORMAL relative to the root folder - * 2 = SHGDN_INFOLDER relative to the root folder, only the last name - * - * RETURNS - * True if the display name could be retrieved successfully, False otherwise - */ -BOOL WINAPI ILGetDisplayNameExA(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, LPSTR path, DWORD type) -{ - BOOL ret = FALSE; - WCHAR wPath[MAX_PATH]; - - TRACE("%p %p %p %ld\n", psf, pidl, path, type); - - if (!pidl || !path) - return FALSE; - - ret = ILGetDisplayNameExW(psf, pidl, wPath, type); - WideCharToMultiByte(CP_ACP, 0, wPath, -1, path, MAX_PATH, NULL, NULL); - TRACE("%p %p %s\n", psf, pidl, debugstr_a(path)); - - return ret; -} - -BOOL WINAPI ILGetDisplayNameExW(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, LPWSTR path, DWORD type) -{ - LPSHELLFOLDER psfParent, lsf = psf; - HRESULT ret = NO_ERROR; - LPCITEMIDLIST pidllast; - STRRET strret; - DWORD flag; - - TRACE("%p %p %p %ld\n", psf, pidl, path, type); - - if (!pidl || !path) - return FALSE; - - if (!lsf) - { - ret = SHGetDesktopFolder(&lsf); - if (FAILED(ret)) - return FALSE; - } - - if (type >= 0 && type <= 2) - { - switch (type) - { - case ILGDN_FORPARSING: - flag = SHGDN_FORPARSING | SHGDN_FORADDRESSBAR; - break; - case ILGDN_NORMAL: - flag = SHGDN_NORMAL; - break; - case ILGDN_INFOLDER: - flag = SHGDN_INFOLDER; - break; - default: - FIXME("Unknown type parameter = %lx\n", type); - flag = SHGDN_FORPARSING | SHGDN_FORADDRESSBAR; - break; - } - if (!*(const WORD*)pidl || type == ILGDN_FORPARSING) - { - ret = IShellFolder_GetDisplayNameOf(lsf, pidl, flag, &strret); - if (SUCCEEDED(ret)) - { - ret = StrRetToStrNW(path, MAX_PATH, &strret, pidl); - } - } - else - { - ret = SHBindToParent(pidl, &IID_IShellFolder, (LPVOID*)&psfParent, &pidllast); - if (SUCCEEDED(ret)) - { - ret = IShellFolder_GetDisplayNameOf(psfParent, pidllast, flag, &strret); - if (SUCCEEDED(ret)) - { - ret = StrRetToStrNW(path, MAX_PATH, &strret, pidllast); - } - IShellFolder_Release(psfParent); - } - } - } - - TRACE("%p %p %s\n", psf, pidl, debugstr_w(path)); - - if (!psf) - IShellFolder_Release(lsf); - return SUCCEEDED(ret); -} - -BOOL WINAPI ILGetDisplayNameEx(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, LPVOID path, DWORD type) -{ - TRACE_(shell)("%p %p %p %ld\n", psf, pidl, path, type); - if (SHELL_OsIsUnicode()) - return ILGetDisplayNameExW(psf, pidl, path, type); - return ILGetDisplayNameExA(psf, pidl, path, type); -} - -/************************************************************************* - * ILGetDisplayName [SHELL32.15] - */ -BOOL WINAPI ILGetDisplayName(LPCITEMIDLIST pidl, LPVOID path) -{ - TRACE_(shell)("%p %p\n", pidl, path); - if (SHELL_OsIsUnicode()) - return ILGetDisplayNameExW(NULL, pidl, path, ILGDN_FORPARSING); - return ILGetDisplayNameExA(NULL, pidl, path, ILGDN_FORPARSING); -} - -/************************************************************************* - * ILFindLastID [SHELL32.16] - * - * NOTES - * observed: pidl=Desktop return=pidl - */ -LPITEMIDLIST WINAPI ILFindLastID(LPCITEMIDLIST pidl) -{ - LPCITEMIDLIST pidlLast = pidl; - - TRACE("(pidl=%p)\n",pidl); - - if (!pidl) - return NULL; - - while (pidl->mkid.cb) - { - pidlLast = pidl; - pidl = ILGetNext(pidl); - } - return (LPITEMIDLIST)pidlLast; -} -/************************************************************************* - * ILRemoveLastID [SHELL32.17] - * - * NOTES - * when pidl=Desktop return=FALSE - */ -BOOL WINAPI ILRemoveLastID(LPITEMIDLIST pidl) -{ - TRACE_(shell)("pidl=%p\n",pidl); - - if (!pidl || !pidl->mkid.cb) - return 0; - ILFindLastID(pidl)->mkid.cb = 0; - return 1; -} - -/************************************************************************* - * ILClone [SHELL32.18] - * - * NOTES - * duplicate an idlist - */ -LPITEMIDLIST WINAPI ILClone (LPCITEMIDLIST pidl) -{ DWORD len; - LPITEMIDLIST newpidl; - - if (!pidl) - return NULL; - - len = ILGetSize(pidl); - newpidl = (LPITEMIDLIST)SHAlloc(len); - if (newpidl) - memcpy(newpidl,pidl,len); - - TRACE("pidl=%p newpidl=%p\n",pidl, newpidl); - pdump(pidl); - - return newpidl; -} -/************************************************************************* - * ILCloneFirst [SHELL32.19] - * - * NOTES - * duplicates the first idlist of a complex pidl - */ -LPITEMIDLIST WINAPI ILCloneFirst(LPCITEMIDLIST pidl) -{ DWORD len; - LPITEMIDLIST pidlNew = NULL; - - TRACE("pidl=%p \n",pidl); - pdump(pidl); - - if (pidl) - { - len = pidl->mkid.cb; - pidlNew = (LPITEMIDLIST) SHAlloc (len+2); - if (pidlNew) - { - memcpy(pidlNew,pidl,len+2); /* 2 -> mind a desktop pidl */ - - if (len) - ILGetNext(pidlNew)->mkid.cb = 0x00; - } - } - TRACE("-- newpidl=%p\n",pidlNew); - - return pidlNew; -} - -/************************************************************************* - * ILLoadFromStream (SHELL32.26) - * - * NOTES - * the first two bytes are the len, the pidl is following then - */ -HRESULT WINAPI ILLoadFromStream (IStream * pStream, LPITEMIDLIST * ppPidl) -{ WORD wLen = 0; - DWORD dwBytesRead; - HRESULT ret = E_FAIL; - - - TRACE_(shell)("%p %p\n", pStream , ppPidl); - - if (*ppPidl) - { SHFree(*ppPidl); - *ppPidl = NULL; - } - - IStream_AddRef (pStream); - - if (SUCCEEDED(IStream_Read(pStream, (LPVOID)&wLen, 2, &dwBytesRead))) - { - TRACE("PIDL length is %d\n", wLen); - if (wLen != 0) { - *ppPidl = SHAlloc (wLen); - if (SUCCEEDED(IStream_Read(pStream, *ppPidl , wLen, &dwBytesRead))) { - TRACE("Stream read OK\n"); - ret = S_OK; - } else { - WARN("reading pidl failed\n"); - SHFree(*ppPidl); - *ppPidl = NULL; - } - } else { - *ppPidl = NULL; - ret = S_OK; - } - } - - /* we are not yet fully compatible */ - if (*ppPidl && !pcheck(*ppPidl)) - { - WARN("Check failed\n"); - SHFree(*ppPidl); - *ppPidl = NULL; - } - - - IStream_Release (pStream); - TRACE("done\n"); - return ret; -} - -/************************************************************************* - * ILSaveToStream (SHELL32.27) - * - * NOTES - * the first two bytes are the len, the pidl is following then - */ -HRESULT WINAPI ILSaveToStream (IStream * pStream, LPCITEMIDLIST pPidl) -{ - LPCITEMIDLIST pidl; - WORD wLen = 0; - HRESULT ret = E_FAIL; - - TRACE_(shell)("%p %p\n", pStream, pPidl); - - IStream_AddRef (pStream); - - pidl = pPidl; - while (pidl->mkid.cb) - { - wLen += sizeof(WORD) + pidl->mkid.cb; - pidl = ILGetNext(pidl); - } - - if (SUCCEEDED(IStream_Write(pStream, (LPVOID)&wLen, 2, NULL))) - { - if (SUCCEEDED(IStream_Write(pStream, pPidl, wLen, NULL))) - { ret = S_OK; - } - } - IStream_Release (pStream); - - return ret; -} - -/************************************************************************* - * SHILCreateFromPath [SHELL32.28] - * - * Create an ItemIDList from a path - * - * PARAMS - * path [I] - * ppidl [O] - * attributes [I/O] requested attributes on call and actual attributes when - * the function returns - * - * RETURNS - * NO_ERROR if successful, or an OLE errer code otherwise - * - * NOTES - * Wrapper for IShellFolder_ParseDisplayName(). - */ -HRESULT WINAPI SHILCreateFromPathA(LPCSTR path, LPITEMIDLIST * ppidl, DWORD * attributes) -{ - LPSHELLFOLDER sf; - WCHAR lpszDisplayName[MAX_PATH]; - DWORD pchEaten; - HRESULT ret = E_FAIL; - - TRACE_(shell)("%s %p 0x%08lx\n", path, ppidl, attributes ? *attributes : 0); - - if (!MultiByteToWideChar(CP_ACP, 0, path, -1, lpszDisplayName, MAX_PATH)) - lpszDisplayName[MAX_PATH-1] = 0; - - if (SUCCEEDED (SHGetDesktopFolder(&sf))) - { - ret = IShellFolder_ParseDisplayName(sf, 0, NULL, lpszDisplayName, &pchEaten, ppidl, attributes); - IShellFolder_Release(sf); - } - return ret; -} - -HRESULT WINAPI SHILCreateFromPathW(LPCWSTR path, LPITEMIDLIST * ppidl, DWORD * attributes) -{ - LPSHELLFOLDER sf; - DWORD pchEaten; - HRESULT ret = E_FAIL; - - TRACE_(shell)("%s %p 0x%08lx\n", debugstr_w(path), ppidl, attributes ? *attributes : 0); - - if (SUCCEEDED (SHGetDesktopFolder(&sf))) - { - ret = IShellFolder_ParseDisplayName(sf, 0, NULL, (LPWSTR)path, &pchEaten, ppidl, attributes); - IShellFolder_Release(sf); - } - return ret; -} - -HRESULT WINAPI SHILCreateFromPathAW (LPCVOID path, LPITEMIDLIST * ppidl, DWORD * attributes) -{ - if ( SHELL_OsIsUnicode()) - return SHILCreateFromPathW (path, ppidl, attributes); - return SHILCreateFromPathA (path, ppidl, attributes); -} - -/************************************************************************* - * SHCloneSpecialIDList [SHELL32.89] - * - * Create an ItemIDList to one of the special folders. - - * PARAMS - * hwndOwner [in] - * nFolder [in] CSIDL_xxxxx - * fCreate [in] Create folder if it does not exist - * - * RETURNS - * Success: The newly created pidl - * Failure: NULL, if inputs are invalid. - * - * NOTES - * exported by ordinal. - * Caller is responsible for deallocating the returned ItemIDList with the - * shells IMalloc interface, aka ILFree. - */ -LPITEMIDLIST WINAPI SHCloneSpecialIDList(HWND hwndOwner, DWORD nFolder, BOOL fCreate) -{ LPITEMIDLIST ppidl; - TRACE_(shell)("(hwnd=%p,csidl=0x%lx,%s).\n", hwndOwner, nFolder, fCreate ? "T" : "F"); - - if (fCreate) - nFolder |= CSIDL_FLAG_CREATE; - - SHGetSpecialFolderLocation(hwndOwner, nFolder, &ppidl); - return ppidl; -} - -/************************************************************************* - * ILGlobalClone [SHELL32.20] - * - * Clones an ItemIDList using Alloc. - * - * PARAMS - * pidl [I] ItemIDList to clone - * - * RETURNS - * Newly allocated ItemIDList. - * - * NOTES - * exported by ordinal. - */ -LPITEMIDLIST WINAPI ILGlobalClone(LPCITEMIDLIST pidl) -{ DWORD len; - LPITEMIDLIST newpidl; - - if (!pidl) - return NULL; - - len = ILGetSize(pidl); - newpidl = (LPITEMIDLIST)Alloc(len); - if (newpidl) - memcpy(newpidl,pidl,len); - - TRACE("pidl=%p newpidl=%p\n",pidl, newpidl); - pdump(pidl); - - return newpidl; -} - -/************************************************************************* - * ILIsEqual [SHELL32.21] - * - */ -BOOL WINAPI ILIsEqual(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) -{ - char szData1[MAX_PATH]; - char szData2[MAX_PATH]; - - LPCITEMIDLIST pidltemp1 = pidl1; - LPCITEMIDLIST pidltemp2 = pidl2; - - TRACE("pidl1=%p pidl2=%p\n",pidl1, pidl2); - - /* explorer reads from registry directly (StreamMRU), - so we can only check here */ - if ((!pcheck (pidl1)) || (!pcheck (pidl2))) return FALSE; - - pdump (pidl1); - pdump (pidl2); - - if ( (!pidl1) || (!pidl2) ) return FALSE; - - while (pidltemp1->mkid.cb && pidltemp2->mkid.cb) - { - _ILSimpleGetText(pidltemp1, szData1, MAX_PATH); - _ILSimpleGetText(pidltemp2, szData2, MAX_PATH); - - if (strcasecmp ( szData1, szData2 )!=0 ) - return FALSE; - - pidltemp1 = ILGetNext(pidltemp1); - pidltemp2 = ILGetNext(pidltemp2); - } - - if (!pidltemp1->mkid.cb && !pidltemp2->mkid.cb) - { - return TRUE; - } - - return FALSE; -} -/************************************************************************* - * ILIsParent [SHELL32.23] - * - * Verifies that pidlParent is indeed the (immediate) parent of pidlChild. - * - * PARAMS - * pidlParent [I] - * pidlChild [I] - * bImmediate [I] only return true if the parent is the direct parent - * of the child - * - * RETURNS - * True if the parent ItemIDlist is a complete part of the child ItemIdList, - * False otherwise. - * - * NOTES - * parent = a/b, child = a/b/c -> true, c is in folder a/b - * child = a/b/c/d -> false if bImmediate is true, d is not in folder a/b - * child = a/b/c/d -> true if bImmediate is false, d is in a subfolder of a/b - */ -BOOL WINAPI ILIsParent(LPCITEMIDLIST pidlParent, LPCITEMIDLIST pidlChild, BOOL bImmediate) -{ - char szData1[MAX_PATH]; - char szData2[MAX_PATH]; - - LPCITEMIDLIST pParent = pidlParent; - LPCITEMIDLIST pChild = pidlChild; - - TRACE("%p %p %x\n", pidlParent, pidlChild, bImmediate); - - if (!pParent || !pChild) return FALSE; - - while (pParent->mkid.cb && pChild->mkid.cb) - { - _ILSimpleGetText(pParent, szData1, MAX_PATH); - _ILSimpleGetText(pChild, szData2, MAX_PATH); - - if (strcasecmp ( szData1, szData2 )!=0 ) - return FALSE; - - pParent = ILGetNext(pParent); - pChild = ILGetNext(pChild); - } - - if ( pParent->mkid.cb || ! pChild->mkid.cb) /* child shorter or has equal length to parent */ - return FALSE; - - if ( ILGetNext(pChild)->mkid.cb && bImmediate) /* not immediate descent */ - return FALSE; - - return TRUE; -} - -/************************************************************************* - * ILFindChild [SHELL32.24] - * - * Compares elements from pidl1 and pidl2. - * - * PARAMS - * pidl1 [I] - * pidl2 [I] - * - * RETURNS - * pidl1 is desktop pidl2 - * pidl1 shorter pidl2 pointer to first different element of pidl2 - * if there was at least one equal element - * pidl2 shorter pidl1 0 - * pidl2 equal pidl1 pointer to last 0x00-element of pidl2 - * - * NOTES - * exported by ordinal. - */ -LPITEMIDLIST WINAPI ILFindChild(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) -{ - char szData1[MAX_PATH]; - char szData2[MAX_PATH]; - - LPCITEMIDLIST pidltemp1 = pidl1; - LPCITEMIDLIST pidltemp2 = pidl2; - LPCITEMIDLIST ret=NULL; - - TRACE("pidl1=%p pidl2=%p\n",pidl1, pidl2); - - /* explorer reads from registry directly (StreamMRU), - so we can only check here */ - if ((!pcheck (pidl1)) || (!pcheck (pidl2))) - return FALSE; - - pdump (pidl1); - pdump (pidl2); - - if ( _ILIsDesktop(pidl1) ) - { - ret = pidl2; - } - else - { - while (pidltemp1->mkid.cb && pidltemp2->mkid.cb) - { - _ILSimpleGetText(pidltemp1, szData1, MAX_PATH); - _ILSimpleGetText(pidltemp2, szData2, MAX_PATH); - - if (strcasecmp(szData1,szData2)) - break; - - pidltemp1 = ILGetNext(pidltemp1); - pidltemp2 = ILGetNext(pidltemp2); - ret = pidltemp2; - } - - if (pidltemp1->mkid.cb) - { - ret = NULL; /* elements of pidl1 left*/ - } - } - TRACE_(shell)("--- %p\n", ret); - return (LPITEMIDLIST)ret; /* pidl 1 is shorter */ -} - -/************************************************************************* - * ILCombine [SHELL32.25] - * - * Concatenates two complex ItemIDLists. - * - * PARAMS - * pidl1 [I] first complex ItemIDLists - * pidl2 [I] complex ItemIDLists to append - * - * RETURNS - * if both pidl's == NULL NULL - * if pidl1 == NULL cloned pidl2 - * if pidl2 == NULL cloned pidl1 - * otherwise new pidl with pidl2 appended to pidl1 - * - * NOTES - * exported by ordinal. - * Does not destroy the passed in ItemIDLists! - */ -LPITEMIDLIST WINAPI ILCombine(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) -{ - DWORD len1,len2; - LPITEMIDLIST pidlNew; - - TRACE("pidl=%p pidl=%p\n",pidl1,pidl2); - - if(!pidl1 && !pidl2) return NULL; - - pdump (pidl1); - pdump (pidl2); - - if(!pidl1) - { - pidlNew = ILClone(pidl2); - return pidlNew; - } - - if(!pidl2) - { - pidlNew = ILClone(pidl1); - return pidlNew; - } - - len1 = ILGetSize(pidl1)-2; - len2 = ILGetSize(pidl2); - pidlNew = SHAlloc(len1+len2); - - if (pidlNew) - { - memcpy(pidlNew,pidl1,len1); - memcpy(((BYTE *)pidlNew)+len1,pidl2,len2); - } - - /* TRACE(pidl,"--new pidl=%p\n",pidlNew);*/ - return pidlNew; -} - -/************************************************************************* - * SHGetRealIDL [SHELL32.98] - * - * NOTES - */ -HRESULT WINAPI SHGetRealIDL(LPSHELLFOLDER lpsf, LPCITEMIDLIST pidlSimple, LPITEMIDLIST *pidlReal) -{ - IDataObject* pDataObj; - HRESULT hr = IShellFolder_GetUIObjectOf(lpsf, 0, 1, &pidlSimple, &IID_IDataObject, 0, (LPVOID*)&pDataObj); - - if (SUCCEEDED(hr)) { - STGMEDIUM medium; - FORMATETC fmt; - - fmt.cfFormat = RegisterClipboardFormatA(CFSTR_SHELLIDLIST); - fmt.ptd = NULL; - fmt.dwAspect = DVASPECT_CONTENT; - fmt.lindex = -1; - fmt.tymed = TYMED_HGLOBAL; - - hr = IDataObject_GetData(pDataObj, &fmt, &medium); - - IDataObject_Release(pDataObj); - - if (SUCCEEDED(hr)) { - /*assert(pida->cidl==1);*/ - LPIDA pida = (LPIDA)GlobalLock(medium.u.hGlobal); - - LPCITEMIDLIST pidl_folder = (LPCITEMIDLIST) ((LPBYTE)pida+pida->aoffset[0]); - LPCITEMIDLIST pidl_child = (LPCITEMIDLIST) ((LPBYTE)pida+pida->aoffset[1]); - - *pidlReal = ILCombine(pidl_folder, pidl_child); - - if (!*pidlReal) - hr = E_OUTOFMEMORY; - - GlobalUnlock(medium.u.hGlobal); - GlobalFree(medium.u.hGlobal); - } - } - - return hr; -} - -/************************************************************************* - * SHLogILFromFSIL [SHELL32.95] - * - * NOTES - * pild = CSIDL_DESKTOP ret = 0 - * pild = CSIDL_DRIVES ret = 0 - */ -LPITEMIDLIST WINAPI SHLogILFromFSIL(LPITEMIDLIST pidl) -{ - FIXME("(pidl=%p)\n",pidl); - - pdump(pidl); - - return 0; -} - -/************************************************************************* - * ILGetSize [SHELL32.152] - * - * Gets the byte size of an ItemIDList including zero terminator - * - * PARAMS - * pidl [I] ItemIDList - * - * RETURNS - * size of pidl in bytes - * - * NOTES - * exported by ordinal - */ -UINT WINAPI ILGetSize(LPCITEMIDLIST pidl) -{ - LPCSHITEMID si = &(pidl->mkid); - UINT len=0; - - if (pidl) - { while (si->cb) - { len += si->cb; - si = (LPCSHITEMID)(((const BYTE*)si)+si->cb); - } - len += 2; - } - TRACE("pidl=%p size=%u\n",pidl, len); - return len; -} - -/************************************************************************* - * ILGetNext [SHELL32.153] - * - * Gets the next ItemID of an ItemIDList - * - * PARAMS - * pidl [I] ItemIDList - * - * RETURNS - * null -> null - * desktop -> null - * simple pidl -> pointer to 0x0000 element - * - * NOTES - * exported by ordinal. - */ -LPITEMIDLIST WINAPI ILGetNext(LPCITEMIDLIST pidl) -{ - WORD len; - - TRACE("%p\n", pidl); - - if(pidl) - { - len = pidl->mkid.cb; - if (len) - { - pidl = (LPCITEMIDLIST) (((const BYTE*)pidl)+len); - TRACE("-- %p\n", pidl); - return (LPITEMIDLIST)pidl; - } - } - return NULL; -} - -/************************************************************************* - * ILAppend [SHELL32.154] - * - * Adds the single ItemID item to the ItemIDList indicated by pidl. - * If bEnd is FALSE, inserts the item in the front of the list, - * otherwise it adds the item to the end. (???) - * - * PARAMS - * pidl [I] ItemIDList to extend - * item [I] ItemID to prepend/append - * bEnd [I] Indicates if the item should be appended - * - * NOTES - * Destroys the passed in idlist! (???) - */ -LPITEMIDLIST WINAPI ILAppend(LPITEMIDLIST pidl, LPCITEMIDLIST item, BOOL bEnd) -{ - LPITEMIDLIST idlRet; - - WARN("(pidl=%p,pidl=%p,%08u)semi-stub\n",pidl,item,bEnd); - - pdump (pidl); - pdump (item); - - if (_ILIsDesktop(pidl)) - { - idlRet = ILClone(item); - if (pidl) - SHFree (pidl); - return idlRet; - } - - if (bEnd) - { - idlRet = ILCombine(pidl, item); - } - else - { - idlRet = ILCombine(item, pidl); - } - - SHFree(pidl); - return idlRet; -} - -/************************************************************************* - * ILFree [SHELL32.155] - * - * Frees memory (if not NULL) allocated by SHMalloc allocator - * - * PARAMS - * pidl [I] - * - * NOTES - * exported by ordinal - */ -void WINAPI ILFree(LPITEMIDLIST pidl) -{ - TRACE("(pidl=%p)\n",pidl); - if(pidl) SHFree(pidl); -} - -/************************************************************************* - * ILGlobalFree [SHELL32.156] - * - * Frees memory (if not NULL) allocated by Alloc allocator - * - * PARAMS - * pidl [I] - * - * NOTES - * exported by ordinal. - */ -void WINAPI ILGlobalFree( LPITEMIDLIST pidl) -{ - TRACE("%p\n", pidl); - - if(!pidl) return; - Free(pidl); -} - -/************************************************************************* - * ILCreateFromPathA [SHELL32.189] - * - * Creates a complex ItemIDList from a path and returns it. - * - * PARAMS - * path [I] - * - * RETURNS - * the newly created complex ItemIDList or NULL if failed - * - * NOTES - * exported by ordinal. - */ - -LPITEMIDLIST WINAPI ILCreateFromPathA (LPCSTR path) -{ - LPITEMIDLIST pidlnew = NULL; - - TRACE_(shell)("%s\n", debugstr_a(path)); - - if (SUCCEEDED(SHILCreateFromPathA(path, &pidlnew, NULL))) - return pidlnew; - return NULL; -} - -/************************************************************************* - * ILCreateFromPathW [SHELL32.190] - */ -LPITEMIDLIST WINAPI ILCreateFromPathW (LPCWSTR path) -{ - LPITEMIDLIST pidlnew = NULL; - - TRACE_(shell)("%s\n", debugstr_w(path)); - - if (SUCCEEDED(SHILCreateFromPathW(path, &pidlnew, NULL))) - return pidlnew; - return NULL; -} - -/************************************************************************* - * ILCreateFromPath [SHELL32.157] - */ -LPITEMIDLIST WINAPI ILCreateFromPathAW (LPCVOID path) -{ - if ( SHELL_OsIsUnicode()) - return ILCreateFromPathW (path); - return ILCreateFromPathA (path); -} - -/************************************************************************* - * _ILParsePathW [internal] - * - * Creates an ItemIDList from a path and returns it. - * - * PARAMS - * path [I] path to parse and convert into an ItemIDList - * lpFindFile [I] pointer to buffer to initialize the FileSystem - * Bind Data object with - * bBindCtx [I] indicates to create a BindContext and assign a - * FileSystem Bind Data object - * ppidl [O] the newly create ItemIDList - * prgfInOut [I/O] requested attributes on input and actual - * attributes on return - * - * RETURNS - * NO_ERROR on success or an OLE error code - * - * NOTES - * If either lpFindFile is non-NULL or bBindCtx is TRUE, this function - * creates a BindContext object and assigns a FileSystem Bind Data object - * to it, passing the BindContext to IShellFolder_ParseDisplayName. Each - * IShellFolder uses that FileSystem Bind Data object of the BindContext - * to pass data about the current path element to the next object. This - * is used to avoid having to verify the current path element on disk, so - * that creating an ItemIDList from a non-existent path still can work. - */ -static HRESULT WINAPI _ILParsePathW(LPCWSTR path, LPWIN32_FIND_DATAW lpFindFile, - BOOL bBindCtx, LPITEMIDLIST *ppidl, LPDWORD prgfInOut) -{ - LPSHELLFOLDER pSF = NULL; - LPBC pBC = NULL; - HRESULT ret; - - TRACE("%s %p %d (%p)->%p (%p)->0x%lx\n", debugstr_w(path), lpFindFile, bBindCtx, - ppidl, ppidl ? *ppidl : NULL, - prgfInOut, prgfInOut ? *prgfInOut : 0); - - ret = SHGetDesktopFolder(&pSF); - if (FAILED(ret)) - { - return ret; - } - - if (lpFindFile || bBindCtx) - ret = IFileSystemBindData_Constructor(lpFindFile, &pBC); - - if (SUCCEEDED(ret)) - { - ret = IShellFolder_ParseDisplayName(pSF, 0, pBC, (LPOLESTR)path, NULL, ppidl, prgfInOut); - } - - if (pBC) - { - IBindCtx_Release(pBC); - pBC = NULL; - } - - IShellFolder_Release(pSF); - - if (!SUCCEEDED(ret) && ppidl) - *ppidl = NULL; - - TRACE("%s %p 0x%lx\n", debugstr_w(path), ppidl ? *ppidl : NULL, prgfInOut ? *prgfInOut : 0); - - return ret; -} - -/************************************************************************* - * SHSimpleIDListFromPath [SHELL32.162] - * - * Creates a simple ItemIDList from a path and returns it. This function - * does not fail on non-existent paths. - * - * PARAMS - * path [I] path to parse and convert into an ItemIDList - * - * RETURNS - * the newly created simple ItemIDList - * - * NOTES - * Simple in the name does not mean a relative ItemIDList but rather a - * fully qualified list, where only the file name is filled in and the - * directory flag for those ItemID elements this is known about, eg. - * it is not the last element in the ItemIDList or the actual directory - * exists on disk. - * exported by ordinal. - */ -LPITEMIDLIST WINAPI SHSimpleIDListFromPathA(LPCSTR lpszPath) -{ - LPITEMIDLIST pidl = NULL; - LPWSTR wPath = NULL; - int len; - - TRACE("%s\n", debugstr_a(lpszPath)); - - if (lpszPath) - { - len = MultiByteToWideChar(CP_ACP, 0, lpszPath, -1, NULL, 0); - wPath = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); - MultiByteToWideChar(CP_ACP, 0, lpszPath, -1, wPath, len); - } - - _ILParsePathW(wPath, NULL, TRUE, &pidl, NULL); - - HeapFree(GetProcessHeap(), 0, wPath); - TRACE("%s %p\n", debugstr_a(lpszPath), pidl); - return pidl; -} - -LPITEMIDLIST WINAPI SHSimpleIDListFromPathW(LPCWSTR lpszPath) -{ - LPITEMIDLIST pidl = NULL; - - TRACE("%s\n", debugstr_w(lpszPath)); - - _ILParsePathW(lpszPath, NULL, TRUE, &pidl, NULL); - TRACE("%s %p\n", debugstr_w(lpszPath), pidl); - return pidl; -} - -LPITEMIDLIST WINAPI SHSimpleIDListFromPathAW(LPCVOID lpszPath) -{ - if ( SHELL_OsIsUnicode()) - return SHSimpleIDListFromPathW (lpszPath); - return SHSimpleIDListFromPathA (lpszPath); -} - -/************************************************************************* - * SHGetDataFromIDListA [SHELL32.247] - * - * NOTES - * the pidl can be a simple one. since we can't get the path out of the pidl - * we have to take all data from the pidl - */ -HRESULT WINAPI SHGetDataFromIDListA(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, int nFormat, LPVOID dest, int len) -{ - TRACE_(shell)("sf=%p pidl=%p 0x%04x %p 0x%04x stub\n",psf,pidl,nFormat,dest,len); - - pdump(pidl); - if (!psf || !dest ) return E_INVALIDARG; - - switch (nFormat) - { - case SHGDFIL_FINDDATA: - { - LPSTR filename, shortname; - WIN32_FIND_DATAA * pfd = dest; - - if (_ILIsDrive(pidl)) - return E_INVALIDARG; - - if (len < (int)sizeof(WIN32_FIND_DATAA)) return E_INVALIDARG; - - ZeroMemory(pfd, sizeof (WIN32_FIND_DATAA)); - _ILGetFileDateTime( pidl, &(pfd->ftLastWriteTime)); - pfd->dwFileAttributes = _ILGetFileAttributes(pidl, NULL, 0); - pfd->nFileSizeLow = _ILGetFileSize ( pidl, NULL, 0); - - filename = _ILGetTextPointer(pidl); - shortname = _ILGetSTextPointer(pidl); - - if (filename) - lstrcpynA(pfd->cFileName, filename, MAX_PATH); - else - pfd->cFileName[0] = '\0'; - - if (shortname) - lstrcpynA(pfd->cAlternateFileName, shortname, MAX_PATH); - else - pfd->cAlternateFileName[0] = '\0'; - } - return NOERROR; - - case SHGDFIL_NETRESOURCE: - case SHGDFIL_DESCRIPTIONID: - FIXME_(shell)("SHGDFIL %i stub\n", nFormat); - break; - - default: - ERR_(shell)("Unknown SHGDFIL %i, please report\n", nFormat); - } - - return E_INVALIDARG; -} - -/************************************************************************* - * SHGetDataFromIDListW [SHELL32.248] - * - */ -HRESULT WINAPI SHGetDataFromIDListW(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, int nFormat, LPVOID dest, int len) -{ - TRACE_(shell)("sf=%p pidl=%p 0x%04x %p 0x%04x stub\n",psf,pidl,nFormat,dest,len); - - pdump(pidl); - - if (! psf || !dest ) return E_INVALIDARG; - - switch (nFormat) - { - case SHGDFIL_FINDDATA: - { - LPSTR filename, shortname; - WIN32_FIND_DATAW * pfd = dest; - - if (_ILIsDrive(pidl)) - return E_INVALIDARG; - - if (len < (int)sizeof(WIN32_FIND_DATAW)) return E_INVALIDARG; - - ZeroMemory(pfd, sizeof (WIN32_FIND_DATAA)); - _ILGetFileDateTime( pidl, &(pfd->ftLastWriteTime)); - pfd->dwFileAttributes = _ILGetFileAttributes(pidl, NULL, 0); - pfd->nFileSizeLow = _ILGetFileSize ( pidl, NULL, 0); - - filename = _ILGetTextPointer(pidl); - shortname = _ILGetSTextPointer(pidl); - - if (!filename) - pfd->cFileName[0] = '\0'; - else if (!MultiByteToWideChar(CP_ACP, 0, filename, -1, pfd->cFileName, MAX_PATH)) - pfd->cFileName[MAX_PATH-1] = 0; - - if (!shortname) - pfd->cAlternateFileName[0] = '\0'; - else if (!MultiByteToWideChar(CP_ACP, 0, shortname, -1, pfd->cAlternateFileName, 14)) - pfd->cAlternateFileName[13] = 0; - } - return NOERROR; - case SHGDFIL_NETRESOURCE: - case SHGDFIL_DESCRIPTIONID: - FIXME_(shell)("SHGDFIL %i stub\n", nFormat); - break; - - default: - ERR_(shell)("Unknown SHGDFIL %i, please report\n", nFormat); - } - - return E_INVALIDARG; -} - -/************************************************************************* - * SHELL_GetPathFromIDListA - */ -HRESULT SHELL_GetPathFromIDListA(LPCITEMIDLIST pidl, LPSTR pszPath, UINT uOutSize) -{ - HRESULT hr = S_OK; - - pszPath[0]=0; - - /* One case is a PIDL rooted at desktop level */ - if (_ILIsValue(pidl) || _ILIsFolder(pidl)) { - hr = SHGetSpecialFolderPathA(0, pszPath, CSIDL_DESKTOP, FALSE); - - if (SUCCEEDED(hr)) - PathAddBackslashA(pszPath); - } - /* The only other valid case is a item ID list beginning at "My Computer" */ - else if (_ILIsMyComputer(pidl)) - pidl = ILGetNext(pidl); - - if (SUCCEEDED(hr)) { - LPSTR txt; - - while(pidl && pidl->mkid.cb) { - if (_ILIsSpecialFolder(pidl)) - {hr = E_INVALIDARG; break;} - - txt = _ILGetTextPointer(pidl); - if (!txt) - {hr = E_INVALIDARG; break;} - - if (lstrlenA(txt) > pidl->mkid.cb) - ERR("pidl %p is borked\n",pidl); - - /* make sure there's enough space for the next segment */ - if ( (lstrlenA(txt) + lstrlenA(pszPath)) > uOutSize) - {hr = E_INVALIDARG; break;} - lstrcatA( pszPath, txt ); - - pidl = ILGetNext(pidl); - if (!pidl) - {hr = E_INVALIDARG; break;} - - if (!pidl->mkid.cb) { - /* We are at the end and successfully converted the complete PIDL. */ - break; - } - - if( (lstrlenA(pszPath) + 1) > uOutSize) - {hr = E_INVALIDARG; break;} - if (!PathAddBackslashA(pszPath)) - {hr = E_INVALIDARG; break;} - } - } else - hr = E_INVALIDARG; - - TRACE_(shell)("-- %s, 0x%08lx\n", pszPath, hr); - return hr; -} - -/************************************************************************* - * SHGetPathFromIDListA [SHELL32.@][NT 4.0: SHELL32.220] - * - * PARAMETERS - * pidl, [IN] pidl - * pszPath [OUT] path - * - * RETURNS - * path from a passed PIDL. - * - * NOTES - * NULL returns FALSE - * desktop pidl gives path to desktop directory back - * special pidls returning FALSE - */ -BOOL WINAPI SHGetPathFromIDListA(LPCITEMIDLIST pidl, LPSTR pszPath) -{ - HRESULT hr; - - TRACE_(shell)("(pidl=%p,%p)\n",pidl,pszPath); - pdump(pidl); - - if (!pidl) - return FALSE; - - hr = SHELL_GetPathFromIDListA(pidl, pszPath, MAX_PATH); - - return SUCCEEDED(hr); -} - -/************************************************************************* - * SHELL_GetPathFromIDListW - */ -HRESULT SHELL_GetPathFromIDListW(LPCITEMIDLIST pidl, LPWSTR pszPath, UINT uOutSize) -{ - HRESULT hr = S_OK; - UINT len; - - pszPath[0]=0; - - /* One case is a PIDL rooted at desktop level */ - if (_ILIsValue(pidl) || _ILIsFolder(pidl)) { - hr = SHGetSpecialFolderPathW(0, pszPath, CSIDL_DESKTOP, FALSE); - - if (SUCCEEDED(hr)) - PathAddBackslashW(pszPath); - } - /* The only other valid case is a item ID list beginning at "My Computer" */ - else if (_ILIsMyComputer(pidl)) - pidl = ILGetNext(pidl); - - if (SUCCEEDED(hr)) { - LPSTR txt; - - while(pidl && pidl->mkid.cb) { - if (_ILIsSpecialFolder(pidl)) - {hr = E_INVALIDARG; break;} - - txt = _ILGetTextPointer(pidl); - if (!txt) - {hr = E_INVALIDARG; break;} - - if (lstrlenA(txt) > pidl->mkid.cb) - ERR("pidl %p is borked\n",pidl); - len = MultiByteToWideChar(CP_ACP, 0, txt, -1, NULL, 0); - if ( (lstrlenW(pszPath) + len) > uOutSize ) - {hr = E_INVALIDARG; break;} - - MultiByteToWideChar(CP_ACP, 0, txt, -1, - &pszPath[lstrlenW(pszPath)], len); - - pidl = ILGetNext(pidl); - if (!pidl) - {hr = E_INVALIDARG; break;} - - if (!pidl->mkid.cb) { - /* We are at the end and successfully converted the complete PIDL. */ - break; - } - - if ( (lstrlenW(pszPath) + 1) > uOutSize ) - {hr = E_INVALIDARG; break;} - if (!PathAddBackslashW(pszPath)) - {hr = E_INVALIDARG; break;} - } - } else - hr = E_INVALIDARG; - - TRACE_(shell)("-- %s, 0x%08lx\n", debugstr_w(pszPath), hr); - return hr; -} - -/************************************************************************* - * SHGetPathFromIDListW [SHELL32.@] - */ -BOOL WINAPI SHGetPathFromIDListW(LPCITEMIDLIST pidl, LPWSTR pszPath) -{ - HRESULT hr; - - TRACE_(shell)("(pidl=%p,%p)\n", pidl, debugstr_w(pszPath)); - pdump(pidl); - - if (!pidl) - return FALSE; - - hr = SHELL_GetPathFromIDListW(pidl, pszPath, MAX_PATH); - - TRACE_(shell)("-- %s, 0x%08lx\n",debugstr_w(pszPath), hr); - return SUCCEEDED(hr); -} - -/************************************************************************* - * SHBindToParent [shell version 5.0] - */ -HRESULT WINAPI SHBindToParent(LPCITEMIDLIST pidl, REFIID riid, LPVOID *ppv, LPCITEMIDLIST *ppidlLast) -{ - IShellFolder * psf; - LPITEMIDLIST pidlChild, pidlParent; - HRESULT hr=E_FAIL; - - TRACE_(shell)("pidl=%p\n", pidl); - pdump(pidl); - - *ppv = NULL; - if (ppidlLast) *ppidlLast = NULL; - - if (_ILIsPidlSimple(pidl)) - { - IShellFolder* desktop; - - /* we are on desktop level */ - hr = SHGetDesktopFolder(&desktop); - - if (SUCCEEDED(hr)) - { - hr = IShellFolder_QueryInterface(desktop, riid, ppv); - - if (SUCCEEDED(hr) && ppidlLast) - *ppidlLast = ILClone(pidl); - - IShellFolder_Release(desktop); - } - } - else - { - pidlChild = ILClone(ILFindLastID(pidl)); - pidlParent = ILClone(pidl); - ILRemoveLastID(pidlParent); - - hr = SHGetDesktopFolder(&psf); - - if (SUCCEEDED(hr)) - hr = IShellFolder_BindToObject(psf, pidlParent, NULL, riid, ppv); - - if (SUCCEEDED(hr) && ppidlLast) - *ppidlLast = pidlChild; - else - ILFree (pidlChild); - - SHFree (pidlParent); - if (psf) IShellFolder_Release(psf); - } - - - TRACE_(shell)("-- psf=%p pidl=%p ret=0x%08lx\n", *ppv, (ppidlLast)?*ppidlLast:NULL, hr); - return hr; -} - -/************************************************************************** - * - * internal functions - * - * ### 1. section creating pidls ### - * - ************************************************************************* - */ -LPITEMIDLIST _ILAlloc(PIDLTYPE type, size_t size) -{ - LPITEMIDLIST pidlOut = NULL; - - if((pidlOut = SHAlloc(size + 5))) - { - LPPIDLDATA pData; - LPITEMIDLIST pidlNext; - - ZeroMemory(pidlOut, size + 5); - pidlOut->mkid.cb = size + 3; - - if ((pData = _ILGetDataPointer(pidlOut))) - pData->type = type; - - if ((pidlNext = ILGetNext(pidlOut))) - pidlNext->mkid.cb = 0x00; - TRACE("-- (pidl=%p, size=%u)\n", pidlOut, size); - } - - return pidlOut; -} - -LPITEMIDLIST _ILCreateDesktop() -{ - LPITEMIDLIST ret; - - TRACE("()\n"); - ret = SHAlloc(2); - if (ret) - ret->mkid.cb = 0; - return ret; -} - -LPITEMIDLIST _ILCreateMyComputer() -{ TRACE("()\n"); - return _ILCreateGuid(PT_GUID, &CLSID_MyComputer); -} - -LPITEMIDLIST _ILCreateIExplore() -{ TRACE("()\n"); - return _ILCreateGuid(PT_GUID, &CLSID_Internet); -} - -LPITEMIDLIST _ILCreateControlPanel() -{ - LPITEMIDLIST parent = _ILCreateGuid(PT_GUID, &CLSID_MyComputer), ret = NULL; - - TRACE("()\n"); - if (parent) - { - LPITEMIDLIST cpl = _ILCreateGuid(PT_SHELLEXT, &CLSID_ControlPanel); - - if (cpl) - { - ret = ILCombine(parent, cpl); - SHFree(cpl); - } - SHFree(parent); - } - return ret; -} - -LPITEMIDLIST _ILCreatePrinters() -{ - LPITEMIDLIST parent = _ILCreateGuid(PT_GUID, &CLSID_MyComputer), ret = NULL; - - TRACE("()\n"); - if (parent) - { - LPITEMIDLIST printers = _ILCreateGuid(PT_YAGUID, &CLSID_Printers); - - if (printers) - { - ret = ILCombine(parent, printers); - SHFree(printers); - } - SHFree(parent); - } - return ret; -} - -LPITEMIDLIST _ILCreateNetwork() -{ TRACE("()\n"); - return _ILCreateGuid(PT_GUID, &CLSID_NetworkPlaces); -} - -LPITEMIDLIST _ILCreateBitBucket() -{ TRACE("()\n"); - return _ILCreateGuid(PT_GUID, &CLSID_RecycleBin); -} - -LPITEMIDLIST _ILCreateGuid(PIDLTYPE type, REFIID guid) -{ - LPITEMIDLIST pidlOut; - - if (type == PT_SHELLEXT || type == PT_GUID || type == PT_YAGUID) - { - pidlOut = _ILAlloc(type, sizeof(GUIDStruct)); - if (pidlOut) - { - LPPIDLDATA pData = _ILGetDataPointer(pidlOut); - - memcpy(&(pData->u.guid.guid), guid, sizeof(GUID)); - TRACE("-- create GUID-pidl %s\n", - debugstr_guid(&(pData->u.guid.guid))); - } - } - else - { - WARN("%d: invalid type for GUID\n", type); - pidlOut = NULL; - } - return pidlOut; -} - -LPITEMIDLIST _ILCreateGuidFromStrA(LPCSTR szGUID) -{ - IID iid; - - if (!SUCCEEDED(SHCLSIDFromStringA(szGUID, &iid))) - { - ERR("%s is not a GUID\n", szGUID); - return NULL; - } - return _ILCreateGuid(PT_GUID, &iid); -} - -LPITEMIDLIST _ILCreateFromFindDataA(WIN32_FIND_DATAA * stffile ) -{ - char buff[MAX_PATH + 14 +1]; /* see WIN32_FIND_DATA */ - char * pbuff = buff; - size_t len, len1; - LPITEMIDLIST pidl; - PIDLTYPE type; - - if (!stffile) - return NULL; - - TRACE("(%s, %s)\n",stffile->cAlternateFileName, stffile->cFileName); - - /* prepare buffer with both names */ - len = strlen (stffile->cFileName) + 1; - memcpy (pbuff, stffile->cFileName, len); - pbuff += len; - - len1 = strlen (stffile->cAlternateFileName)+1; - memcpy (pbuff, stffile->cAlternateFileName, len1); - - type = (stffile->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) ? PT_FOLDER : - PT_VALUE; - /* FileStruct already has one byte for the first name, so use len - 1 in - * size calculation - */ - if ((pidl = _ILAlloc(type, sizeof(FileStruct) + (len - 1) + len1))) - { - LPPIDLDATA pData; - LPSTR pszDest; - - /* set attributes */ - if ((pData = _ILGetDataPointer(pidl))) - { - pData->type = type; - FileTimeToDosDateTime(&(stffile->ftLastWriteTime),&pData->u.file.uFileDate,&pData->u.file.uFileTime); - pData->u.file.dwFileSize = stffile->nFileSizeLow; - pData->u.file.uFileAttribs = (WORD)stffile->dwFileAttributes; - } - if ((pszDest = _ILGetTextPointer(pidl))) - { - memcpy(pszDest, buff, len + len1); - TRACE("-- create Value: %s\n",debugstr_a(pszDest)); - } - } - return pidl; -} - -HRESULT _ILCreateFromPathA(LPCSTR szPath, LPITEMIDLIST* ppidl) -{ - HANDLE hFile; - WIN32_FIND_DATAA stffile; - - if (!ppidl) - return E_INVALIDARG; - - hFile = FindFirstFileA(szPath, &stffile); - - if (hFile == INVALID_HANDLE_VALUE) - return HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND); - - FindClose(hFile); - - *ppidl = _ILCreateFromFindDataA(&stffile); - - return *ppidl ? S_OK : E_OUTOFMEMORY; -} - -LPITEMIDLIST _ILCreateDrive(LPCWSTR lpszNew) -{ - WCHAR sTemp[4]; - LPITEMIDLIST pidlOut; - - sTemp[0]=toupperW(lpszNew[0]); - sTemp[1]=':'; - sTemp[2]='\\'; - sTemp[3]=0x00; - TRACE("(%s)\n",debugstr_w(sTemp)); - - if ((pidlOut = _ILAlloc(PT_DRIVE, sizeof(DriveStruct)))) - { - LPSTR pszDest; - - if ((pszDest = _ILGetTextPointer(pidlOut))) - { - WideCharToMultiByte(CP_ACP, 0, sTemp, sizeof(sTemp)/sizeof(WCHAR), pszDest, sizeof(sTemp)/sizeof(WCHAR), NULL, NULL); - TRACE("-- create Drive: %s\n", debugstr_a(pszDest)); - } - } - return pidlOut; -} - -/************************************************************************** - * _ILGetDrive() - * - * Gets the text for the drive eg. 'c:\' - * - * RETURNS - * strlen (lpszText) - */ -DWORD _ILGetDrive(LPCITEMIDLIST pidl,LPSTR pOut, UINT uSize) -{ TRACE("(%p,%p,%u)\n",pidl,pOut,uSize); - - if(_ILIsMyComputer(pidl)) - pidl = ILGetNext(pidl); - - if (pidl && _ILIsDrive(pidl)) - return _ILSimpleGetText(pidl, pOut, uSize); - - return 0; -} - -/************************************************************************** - * - * ### 2. section testing pidls ### - * - ************************************************************************** - * _ILIsDesktop() - * _ILIsMyComputer() - * _ILIsSpecialFolder() - * _ILIsDrive() - * _ILIsFolder() - * _ILIsValue() - * _ILIsPidlSimple() - */ -BOOL _ILIsDesktop(LPCITEMIDLIST pidl) -{ TRACE("(%p)\n",pidl); - return pidl && pidl->mkid.cb ? 0 : 1; -} - -BOOL _ILIsMyComputer(LPCITEMIDLIST pidl) -{ - REFIID iid = _ILGetGUIDPointer(pidl); - - TRACE("(%p)\n",pidl); - - if (iid) - return IsEqualIID(iid, &CLSID_MyComputer); - return FALSE; -} - -BOOL _ILIsSpecialFolder (LPCITEMIDLIST pidl) -{ - LPPIDLDATA lpPData = _ILGetDataPointer(pidl); - TRACE("(%p)\n",pidl); - return (pidl && ( (lpPData && (PT_GUID== lpPData->type || PT_SHELLEXT== lpPData->type)) || - (pidl && pidl->mkid.cb == 0x00) - )); -} - -BOOL _ILIsDrive(LPCITEMIDLIST pidl) -{ LPPIDLDATA lpPData = _ILGetDataPointer(pidl); - TRACE("(%p)\n",pidl); - return (pidl && lpPData && (PT_DRIVE == lpPData->type || - PT_DRIVE1 == lpPData->type || - PT_DRIVE2 == lpPData->type || - PT_DRIVE3 == lpPData->type)); -} - -BOOL _ILIsFolder(LPCITEMIDLIST pidl) -{ LPPIDLDATA lpPData = _ILGetDataPointer(pidl); - TRACE("(%p)\n",pidl); - return (pidl && lpPData && (PT_FOLDER == lpPData->type || PT_FOLDER1 == lpPData->type)); -} - -BOOL _ILIsValue(LPCITEMIDLIST pidl) -{ LPPIDLDATA lpPData = _ILGetDataPointer(pidl); - TRACE("(%p)\n",pidl); - return (pidl && lpPData && PT_VALUE == lpPData->type); -} - -BOOL _ILIsCPanelStruct(LPCITEMIDLIST pidl) -{ LPPIDLDATA lpPData = _ILGetDataPointer(pidl); - TRACE("(%p)\n",pidl); - return (pidl && lpPData && (lpPData->type == 0)); -} - -/************************************************************************** - * _ILIsPidlSimple - */ -BOOL _ILIsPidlSimple ( LPCITEMIDLIST pidl) -{ - BOOL ret = TRUE; - - if(! _ILIsDesktop(pidl)) /* pidl=NULL or mkid.cb=0 */ - { - WORD len = pidl->mkid.cb; - LPCITEMIDLIST pidlnext = (LPCITEMIDLIST) (((const BYTE*)pidl) + len ); - if (pidlnext->mkid.cb) - ret = FALSE; - } - - TRACE("%s\n", ret ? "Yes" : "No"); - return ret; -} - -/************************************************************************** - * - * ### 3. section getting values from pidls ### - */ - - /************************************************************************** - * _ILSimpleGetText - * - * gets the text for the first item in the pidl (eg. simple pidl) - * - * returns the length of the string - */ -DWORD _ILSimpleGetText (LPCITEMIDLIST pidl, LPSTR szOut, UINT uOutSize) -{ - DWORD dwReturn=0; - LPSTR szSrc; - GUID const * riid; - char szTemp[MAX_PATH]; - - TRACE("(%p %p %x)\n",pidl,szOut,uOutSize); - - if (!pidl) return 0; - - if (szOut) - *szOut = 0; - - if (_ILIsDesktop(pidl)) - { - /* desktop */ - if (HCR_GetClassNameA(&CLSID_ShellDesktop, szTemp, MAX_PATH)) - { - if (szOut) - lstrcpynA(szOut, szTemp, uOutSize); - - dwReturn = strlen (szTemp); - } - } - else if (( szSrc = _ILGetTextPointer(pidl) )) - { - /* filesystem */ - if (szOut) - lstrcpynA(szOut, szSrc, uOutSize); - - dwReturn = strlen(szSrc); - } - else if (( riid = _ILGetGUIDPointer(pidl) )) - { - /* special folder */ - if ( HCR_GetClassNameA(riid, szTemp, MAX_PATH) ) - { - if (szOut) - lstrcpynA(szOut, szTemp, uOutSize); - - dwReturn = strlen (szTemp); - } - } - else - { - ERR("-- no text\n"); - } - - TRACE("-- (%p=%s 0x%08lx)\n",szOut,debugstr_a(szOut),dwReturn); - return dwReturn; -} - - /************************************************************************** - * _ILSimpleGetTextW - * - * gets the text for the first item in the pidl (eg. simple pidl) - * - * returns the length of the string - */ -DWORD _ILSimpleGetTextW (LPCITEMIDLIST pidl, LPWSTR szOut, UINT uOutSize) -{ - DWORD dwReturn; - char szTemp[MAX_PATH]; - - TRACE("(%p %p %x)\n",pidl,szOut,uOutSize); - - dwReturn = _ILSimpleGetText(pidl, szTemp, uOutSize); - - if (!MultiByteToWideChar(CP_ACP, 0, szTemp, -1, szOut, MAX_PATH)) - *szOut = 0; - - TRACE("-- (%p=%s 0x%08lx)\n",szOut,debugstr_w(szOut),dwReturn); - return dwReturn; -} - -/************************************************************************** - * - * ### 4. getting pointers to parts of pidls ### - * - ************************************************************************** - * _ILGetDataPointer() - */ -LPPIDLDATA _ILGetDataPointer(LPCITEMIDLIST pidl) -{ - if(pidl && pidl->mkid.cb != 0x00) - return (LPPIDLDATA) &(pidl->mkid.abID); - return NULL; -} - -/************************************************************************** - * _ILGetTextPointer() - * gets a pointer to the long filename string stored in the pidl - */ -LPSTR _ILGetTextPointer(LPCITEMIDLIST pidl) -{/* TRACE(pidl,"(pidl%p)\n", pidl);*/ - - LPPIDLDATA pdata = _ILGetDataPointer(pidl); - - if (pdata) - { - switch (pdata->type) - { - case PT_GUID: - case PT_SHELLEXT: - case PT_YAGUID: - return NULL; - - case PT_DRIVE: - case PT_DRIVE1: - case PT_DRIVE2: - case PT_DRIVE3: - return (LPSTR)&(pdata->u.drive.szDriveName); - - case PT_FOLDER: - case PT_FOLDER1: - case PT_VALUE: - case PT_IESPECIAL1: - case PT_IESPECIAL2: - return (LPSTR)&(pdata->u.file.szNames); - - case PT_WORKGRP: - case PT_COMP: - case PT_NETWORK: - case PT_NETPROVIDER: - case PT_SHARE: - return (LPSTR)&(pdata->u.network.szNames); - } - } - return NULL; -} - -/************************************************************************** - * _ILGetSTextPointer() - * gets a pointer to the short filename string stored in the pidl - */ -LPSTR _ILGetSTextPointer(LPCITEMIDLIST pidl) -{/* TRACE(pidl,"(pidl%p)\n", pidl);*/ - - LPPIDLDATA pdata =_ILGetDataPointer(pidl); - - if (pdata) - { - switch (pdata->type) - { - case PT_FOLDER: - case PT_VALUE: - case PT_IESPECIAL1: - case PT_IESPECIAL2: - return (LPSTR)(pdata->u.file.szNames + strlen (pdata->u.file.szNames) + 1); - - case PT_WORKGRP: - return (LPSTR)(pdata->u.network.szNames + strlen (pdata->u.network.szNames) + 1); - } - } - return NULL; -} - -/************************************************************************** - * _ILGetGUIDPointer() - * - * returns reference to guid stored in some pidls - */ -IID* _ILGetGUIDPointer(LPCITEMIDLIST pidl) -{ - LPPIDLDATA pdata =_ILGetDataPointer(pidl); - - TRACE("%p\n", pidl); - - if (pdata) - { - TRACE("pdata->type 0x%04x\n", pdata->type); - switch (pdata->type) - { - case PT_SHELLEXT: - case PT_GUID: - return &(pdata->u.guid.guid); - - default: - TRACE("Unknown pidl type 0x%04x\n", pdata->type); - break; - } - } - return NULL; -} - -/************************************************************************* - * _ILGetFileDateTime - * - * Given the ItemIdList, get the FileTime - * - * PARAMS - * pidl [I] The ItemIDList - * pFt [I] the resulted FILETIME of the file - * - * RETURNS - * True if Successful - * - * NOTES - * - */ -BOOL _ILGetFileDateTime(LPCITEMIDLIST pidl, FILETIME *pFt) -{ - LPPIDLDATA pdata = _ILGetDataPointer(pidl); - - if(! pdata) return FALSE; - - switch (pdata->type) - { - case PT_FOLDER: - case PT_VALUE: - DosDateTimeToFileTime(pdata->u.file.uFileDate, pdata->u.file.uFileTime, pFt); - break; - default: - return FALSE; - } - return TRUE; -} - -BOOL _ILGetFileDate (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize) -{ - FILETIME ft,lft; - SYSTEMTIME time; - BOOL ret; - - if (_ILGetFileDateTime( pidl, &ft )) { - FileTimeToLocalFileTime(&ft, &lft); - FileTimeToSystemTime (&lft, &time); - ret = GetDateFormatA(LOCALE_USER_DEFAULT,DATE_SHORTDATE,&time, NULL, pOut, uOutSize); - } else { - pOut[0] = '\0'; - ret = FALSE; - } - return ret; - -} - -/************************************************************************* - * _ILGetFileSize - * - * Given the ItemIdList, get the FileSize - * - * PARAMS - * pidl [I] The ItemIDList - * pOut [I] The buffer to save the result - * uOutsize [I] The size of the buffer - * - * RETURNS - * The FileSize - * - * NOTES - * pOut can be null when no string is needed - * - */ -DWORD _ILGetFileSize (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize) -{ - LPPIDLDATA pdata = _ILGetDataPointer(pidl); - DWORD dwSize; - - if(! pdata) return 0; - - switch (pdata->type) - { - case PT_VALUE: - dwSize = pdata->u.file.dwFileSize; - if (pOut) StrFormatByteSizeA(dwSize, pOut, uOutSize); - return dwSize; - } - if (pOut) *pOut = 0x00; - return 0; -} - -BOOL _ILGetExtension (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize) -{ - char szTemp[MAX_PATH]; - const char * pPoint; - LPCITEMIDLIST pidlTemp=pidl; - - TRACE("pidl=%p\n",pidl); - - if (!pidl) return FALSE; - - pidlTemp = ILFindLastID(pidl); - - if (!_ILIsValue(pidlTemp)) return FALSE; - if (!_ILSimpleGetText(pidlTemp, szTemp, MAX_PATH)) return FALSE; - - pPoint = PathFindExtensionA(szTemp); - - if (! *pPoint) return FALSE; - - pPoint++; - lstrcpynA(pOut, pPoint, uOutSize); - TRACE("%s\n",pOut); - - return TRUE; -} - -/************************************************************************* - * _ILGetFileType - * - * Given the ItemIdList, get the file type description - * - * PARAMS - * pidl [I] The ItemIDList (simple) - * pOut [I] The buffer to save the result - * uOutsize [I] The size of the buffer - * - * RETURNS - * nothing - * - * NOTES - * This function copies as much as possible into the buffer. - */ -void _ILGetFileType(LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize) -{ - if(_ILIsValue(pidl)) - { - char sTemp[64]; - if(uOutSize > 0) - { - pOut[0] = 0; - } - if (_ILGetExtension (pidl, sTemp, 64)) - { - if (!( HCR_MapTypeToValueA(sTemp, sTemp, 64, TRUE) - && HCR_MapTypeToValueA(sTemp, pOut, uOutSize, FALSE ))) - { - lstrcpynA (pOut, sTemp, uOutSize - 6); - strcat (pOut, "-file"); - } - } - } - else - { - lstrcpynA(pOut, "Folder", uOutSize); - } -} - -/************************************************************************* - * _ILGetFileAttributes - * - * Given the ItemIdList, get the Attrib string format - * - * PARAMS - * pidl [I] The ItemIDList - * pOut [I] The buffer to save the result - * uOutsize [I] The size of the Buffer - * - * RETURNS - * Attributes - * - * FIXME - * return value 0 in case of error is a valid return value - * - */ -DWORD _ILGetFileAttributes(LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize) -{ - LPPIDLDATA pData = _ILGetDataPointer(pidl); - WORD wAttrib = 0; - int i; - - if(! pData) return 0; - - switch(pData->type) - { - case PT_FOLDER: - case PT_VALUE: - wAttrib = pData->u.file.uFileAttribs; - break; - } - - if(uOutSize >= 6) - { - i=0; - if(wAttrib & FILE_ATTRIBUTE_READONLY) - { - pOut[i++] = 'R'; - } - if(wAttrib & FILE_ATTRIBUTE_HIDDEN) - { - pOut[i++] = 'H'; - } - if(wAttrib & FILE_ATTRIBUTE_SYSTEM) - { - pOut[i++] = 'S'; - } - if(wAttrib & FILE_ATTRIBUTE_ARCHIVE) - { - pOut[i++] = 'A'; - } - if(wAttrib & FILE_ATTRIBUTE_COMPRESSED) - { - pOut[i++] = 'C'; - } - pOut[i] = 0x00; - } - return wAttrib; -} - -/************************************************************************* -* ILFreeaPidl -* -* free a aPidl struct -*/ -void _ILFreeaPidl(LPITEMIDLIST * apidl, UINT cidl) -{ - UINT i; - - if (apidl) - { - for (i = 0; i < cidl; i++) SHFree(apidl[i]); - SHFree(apidl); - } -} - -/************************************************************************* -* ILCopyaPidl -* -* copies an aPidl struct -*/ -LPITEMIDLIST* _ILCopyaPidl(LPCITEMIDLIST * apidlsrc, UINT cidl) -{ - UINT i; - LPITEMIDLIST * apidldest = (LPITEMIDLIST*)SHAlloc(cidl * sizeof(LPITEMIDLIST)); - if(!apidlsrc) return NULL; - - for (i = 0; i < cidl; i++) - apidldest[i] = ILClone(apidlsrc[i]); - - return apidldest; -} - -/************************************************************************* -* _ILCopyCidaToaPidl -* -* creates aPidl from CIDA -*/ -LPITEMIDLIST* _ILCopyCidaToaPidl(LPITEMIDLIST* pidl, LPIDA cida) -{ - UINT i; - LPITEMIDLIST * dst = (LPITEMIDLIST*)SHAlloc(cida->cidl * sizeof(LPITEMIDLIST)); - - if(!dst) return NULL; - - if (pidl) - *pidl = ILClone((LPITEMIDLIST)(&((LPBYTE)cida)[cida->aoffset[0]])); - - for (i = 0; i < cida->cidl; i++) - dst[i] = ILClone((LPITEMIDLIST)(&((LPBYTE)cida)[cida->aoffset[i + 1]])); - - return dst; -} +/* + * pidl Handling + * + * Copyright 1998 Juergen Schmied + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * NOTES + * a pidl == NULL means desktop and is legal + * + */ + +#include "config.h" +#include "wine/port.h" + +#include +#include +#include +#include + +#define COBJMACROS +#define NONAMELESSUNION +#define NONAMELESSSTRUCT + +#include "windef.h" +#include "winbase.h" +#include "winreg.h" +#include "objbase.h" +#include "shlguid.h" +#include "winerror.h" +#include "winnls.h" +#include "undocshell.h" +#include "shell32_main.h" +#include "shellapi.h" +#include "shlwapi.h" + +#include "pidl.h" +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(pidl); +WINE_DECLARE_DEBUG_CHANNEL(shell); + +/* from comctl32.dll */ +extern LPVOID WINAPI Alloc(INT); +extern BOOL WINAPI Free(LPVOID); + +/************************************************************************* + * ILGetDisplayNameEx [SHELL32.186] + * + * Retrieves the display name of an ItemIDList + * + * PARAMS + * psf [I] Shell Folder to start with, if NULL the desktop is used + * pidl [I] ItemIDList relativ to the psf to get the display name for + * path [O] Filled in with the display name, assumed to be at least MAX_PATH long + * type [I] Type of display name to retrieve + * 0 = SHGDN_FORPARSING | SHGDN_FORADDRESSBAR uses always the desktop as root + * 1 = SHGDN_NORMAL relative to the root folder + * 2 = SHGDN_INFOLDER relative to the root folder, only the last name + * + * RETURNS + * True if the display name could be retrieved successfully, False otherwise + */ +BOOL WINAPI ILGetDisplayNameExA(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, LPSTR path, DWORD type) +{ + BOOL ret = FALSE; + WCHAR wPath[MAX_PATH]; + + TRACE("%p %p %p %ld\n", psf, pidl, path, type); + + if (!pidl || !path) + return FALSE; + + ret = ILGetDisplayNameExW(psf, pidl, wPath, type); + WideCharToMultiByte(CP_ACP, 0, wPath, -1, path, MAX_PATH, NULL, NULL); + TRACE("%p %p %s\n", psf, pidl, debugstr_a(path)); + + return ret; +} + +BOOL WINAPI ILGetDisplayNameExW(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, LPWSTR path, DWORD type) +{ + LPSHELLFOLDER psfParent, lsf = psf; + HRESULT ret = NO_ERROR; + LPCITEMIDLIST pidllast; + STRRET strret; + DWORD flag; + + TRACE("%p %p %p %ld\n", psf, pidl, path, type); + + if (!pidl || !path) + return FALSE; + + if (!lsf) + { + ret = SHGetDesktopFolder(&lsf); + if (FAILED(ret)) + return FALSE; + } + + if (type >= 0 && type <= 2) + { + switch (type) + { + case ILGDN_FORPARSING: + flag = SHGDN_FORPARSING | SHGDN_FORADDRESSBAR; + break; + case ILGDN_NORMAL: + flag = SHGDN_NORMAL; + break; + case ILGDN_INFOLDER: + flag = SHGDN_INFOLDER; + break; + default: + FIXME("Unknown type parameter = %lx\n", type); + flag = SHGDN_FORPARSING | SHGDN_FORADDRESSBAR; + break; + } + if (!*(const WORD*)pidl || type == ILGDN_FORPARSING) + { + ret = IShellFolder_GetDisplayNameOf(lsf, pidl, flag, &strret); + if (SUCCEEDED(ret)) + { + ret = StrRetToStrNW(path, MAX_PATH, &strret, pidl); + } + } + else + { + ret = SHBindToParent(pidl, &IID_IShellFolder, (LPVOID*)&psfParent, &pidllast); + if (SUCCEEDED(ret)) + { + ret = IShellFolder_GetDisplayNameOf(psfParent, pidllast, flag, &strret); + if (SUCCEEDED(ret)) + { + ret = StrRetToStrNW(path, MAX_PATH, &strret, pidllast); + } + IShellFolder_Release(psfParent); + } + } + } + + TRACE("%p %p %s\n", psf, pidl, debugstr_w(path)); + + if (!psf) + IShellFolder_Release(lsf); + return SUCCEEDED(ret); +} + +BOOL WINAPI ILGetDisplayNameEx(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, LPVOID path, DWORD type) +{ + TRACE_(shell)("%p %p %p %ld\n", psf, pidl, path, type); + if (SHELL_OsIsUnicode()) + return ILGetDisplayNameExW(psf, pidl, path, type); + return ILGetDisplayNameExA(psf, pidl, path, type); +} + +/************************************************************************* + * ILGetDisplayName [SHELL32.15] + */ +BOOL WINAPI ILGetDisplayName(LPCITEMIDLIST pidl, LPVOID path) +{ + TRACE_(shell)("%p %p\n", pidl, path); + if (SHELL_OsIsUnicode()) + return ILGetDisplayNameExW(NULL, pidl, path, ILGDN_FORPARSING); + return ILGetDisplayNameExA(NULL, pidl, path, ILGDN_FORPARSING); +} + +/************************************************************************* + * ILFindLastID [SHELL32.16] + * + * NOTES + * observed: pidl=Desktop return=pidl + */ +LPITEMIDLIST WINAPI ILFindLastID(LPCITEMIDLIST pidl) +{ + LPCITEMIDLIST pidlLast = pidl; + + TRACE("(pidl=%p)\n",pidl); + + if (!pidl) + return NULL; + + while (pidl->mkid.cb) + { + pidlLast = pidl; + pidl = ILGetNext(pidl); + } + return (LPITEMIDLIST)pidlLast; +} +/************************************************************************* + * ILRemoveLastID [SHELL32.17] + * + * NOTES + * when pidl=Desktop return=FALSE + */ +BOOL WINAPI ILRemoveLastID(LPITEMIDLIST pidl) +{ + TRACE_(shell)("pidl=%p\n",pidl); + + if (!pidl || !pidl->mkid.cb) + return 0; + ILFindLastID(pidl)->mkid.cb = 0; + return 1; +} + +/************************************************************************* + * ILClone [SHELL32.18] + * + * NOTES + * duplicate an idlist + */ +LPITEMIDLIST WINAPI ILClone (LPCITEMIDLIST pidl) +{ DWORD len; + LPITEMIDLIST newpidl; + + if (!pidl) + return NULL; + + len = ILGetSize(pidl); + newpidl = (LPITEMIDLIST)SHAlloc(len); + if (newpidl) + memcpy(newpidl,pidl,len); + + TRACE("pidl=%p newpidl=%p\n",pidl, newpidl); + pdump(pidl); + + return newpidl; +} +/************************************************************************* + * ILCloneFirst [SHELL32.19] + * + * NOTES + * duplicates the first idlist of a complex pidl + */ +LPITEMIDLIST WINAPI ILCloneFirst(LPCITEMIDLIST pidl) +{ DWORD len; + LPITEMIDLIST pidlNew = NULL; + + TRACE("pidl=%p \n",pidl); + pdump(pidl); + + if (pidl) + { + len = pidl->mkid.cb; + pidlNew = (LPITEMIDLIST) SHAlloc (len+2); + if (pidlNew) + { + memcpy(pidlNew,pidl,len+2); /* 2 -> mind a desktop pidl */ + + if (len) + ILGetNext(pidlNew)->mkid.cb = 0x00; + } + } + TRACE("-- newpidl=%p\n",pidlNew); + + return pidlNew; +} + +/************************************************************************* + * ILLoadFromStream (SHELL32.26) + * + * NOTES + * the first two bytes are the len, the pidl is following then + */ +HRESULT WINAPI ILLoadFromStream (IStream * pStream, LPITEMIDLIST * ppPidl) +{ WORD wLen = 0; + DWORD dwBytesRead; + HRESULT ret = E_FAIL; + + + TRACE_(shell)("%p %p\n", pStream , ppPidl); + + if (*ppPidl) + { SHFree(*ppPidl); + *ppPidl = NULL; + } + + IStream_AddRef (pStream); + + if (SUCCEEDED(IStream_Read(pStream, (LPVOID)&wLen, 2, &dwBytesRead))) + { + TRACE("PIDL length is %d\n", wLen); + if (wLen != 0) { + *ppPidl = SHAlloc (wLen); + if (SUCCEEDED(IStream_Read(pStream, *ppPidl , wLen, &dwBytesRead))) { + TRACE("Stream read OK\n"); + ret = S_OK; + } else { + WARN("reading pidl failed\n"); + SHFree(*ppPidl); + *ppPidl = NULL; + } + } else { + *ppPidl = NULL; + ret = S_OK; + } + } + + /* we are not yet fully compatible */ + if (*ppPidl && !pcheck(*ppPidl)) + { + WARN("Check failed\n"); + SHFree(*ppPidl); + *ppPidl = NULL; + } + + + IStream_Release (pStream); + TRACE("done\n"); + return ret; +} + +/************************************************************************* + * ILSaveToStream (SHELL32.27) + * + * NOTES + * the first two bytes are the len, the pidl is following then + */ +HRESULT WINAPI ILSaveToStream (IStream * pStream, LPCITEMIDLIST pPidl) +{ + LPCITEMIDLIST pidl; + WORD wLen = 0; + HRESULT ret = E_FAIL; + + TRACE_(shell)("%p %p\n", pStream, pPidl); + + IStream_AddRef (pStream); + + pidl = pPidl; + while (pidl->mkid.cb) + { + wLen += sizeof(WORD) + pidl->mkid.cb; + pidl = ILGetNext(pidl); + } + + if (SUCCEEDED(IStream_Write(pStream, (LPVOID)&wLen, 2, NULL))) + { + if (SUCCEEDED(IStream_Write(pStream, pPidl, wLen, NULL))) + { ret = S_OK; + } + } + IStream_Release (pStream); + + return ret; +} + +/************************************************************************* + * SHILCreateFromPath [SHELL32.28] + * + * Create an ItemIDList from a path + * + * PARAMS + * path [I] + * ppidl [O] + * attributes [I/O] requested attributes on call and actual attributes when + * the function returns + * + * RETURNS + * NO_ERROR if successful, or an OLE errer code otherwise + * + * NOTES + * Wrapper for IShellFolder_ParseDisplayName(). + */ +HRESULT WINAPI SHILCreateFromPathA(LPCSTR path, LPITEMIDLIST * ppidl, DWORD * attributes) +{ + LPSHELLFOLDER sf; + WCHAR lpszDisplayName[MAX_PATH]; + DWORD pchEaten; + HRESULT ret = E_FAIL; + + TRACE_(shell)("%s %p 0x%08lx\n", path, ppidl, attributes ? *attributes : 0); + + if (!MultiByteToWideChar(CP_ACP, 0, path, -1, lpszDisplayName, MAX_PATH)) + lpszDisplayName[MAX_PATH-1] = 0; + + if (SUCCEEDED (SHGetDesktopFolder(&sf))) + { + ret = IShellFolder_ParseDisplayName(sf, 0, NULL, lpszDisplayName, &pchEaten, ppidl, attributes); + IShellFolder_Release(sf); + } + return ret; +} + +HRESULT WINAPI SHILCreateFromPathW(LPCWSTR path, LPITEMIDLIST * ppidl, DWORD * attributes) +{ + LPSHELLFOLDER sf; + DWORD pchEaten; + HRESULT ret = E_FAIL; + + TRACE_(shell)("%s %p 0x%08lx\n", debugstr_w(path), ppidl, attributes ? *attributes : 0); + + if (SUCCEEDED (SHGetDesktopFolder(&sf))) + { + ret = IShellFolder_ParseDisplayName(sf, 0, NULL, (LPWSTR)path, &pchEaten, ppidl, attributes); + IShellFolder_Release(sf); + } + return ret; +} + +HRESULT WINAPI SHILCreateFromPathAW (LPCVOID path, LPITEMIDLIST * ppidl, DWORD * attributes) +{ + if ( SHELL_OsIsUnicode()) + return SHILCreateFromPathW (path, ppidl, attributes); + return SHILCreateFromPathA (path, ppidl, attributes); +} + +/************************************************************************* + * SHCloneSpecialIDList [SHELL32.89] + * + * Create an ItemIDList to one of the special folders. + + * PARAMS + * hwndOwner [in] + * nFolder [in] CSIDL_xxxxx + * fCreate [in] Create folder if it does not exist + * + * RETURNS + * Success: The newly created pidl + * Failure: NULL, if inputs are invalid. + * + * NOTES + * exported by ordinal. + * Caller is responsible for deallocating the returned ItemIDList with the + * shells IMalloc interface, aka ILFree. + */ +LPITEMIDLIST WINAPI SHCloneSpecialIDList(HWND hwndOwner, DWORD nFolder, BOOL fCreate) +{ LPITEMIDLIST ppidl; + TRACE_(shell)("(hwnd=%p,csidl=0x%lx,%s).\n", hwndOwner, nFolder, fCreate ? "T" : "F"); + + if (fCreate) + nFolder |= CSIDL_FLAG_CREATE; + + SHGetSpecialFolderLocation(hwndOwner, nFolder, &ppidl); + return ppidl; +} + +/************************************************************************* + * ILGlobalClone [SHELL32.20] + * + * Clones an ItemIDList using Alloc. + * + * PARAMS + * pidl [I] ItemIDList to clone + * + * RETURNS + * Newly allocated ItemIDList. + * + * NOTES + * exported by ordinal. + */ +LPITEMIDLIST WINAPI ILGlobalClone(LPCITEMIDLIST pidl) +{ DWORD len; + LPITEMIDLIST newpidl; + + if (!pidl) + return NULL; + + len = ILGetSize(pidl); + newpidl = (LPITEMIDLIST)Alloc(len); + if (newpidl) + memcpy(newpidl,pidl,len); + + TRACE("pidl=%p newpidl=%p\n",pidl, newpidl); + pdump(pidl); + + return newpidl; +} + +/************************************************************************* + * ILIsEqual [SHELL32.21] + * + */ +BOOL WINAPI ILIsEqual(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) +{ + char szData1[MAX_PATH]; + char szData2[MAX_PATH]; + + LPCITEMIDLIST pidltemp1 = pidl1; + LPCITEMIDLIST pidltemp2 = pidl2; + + TRACE("pidl1=%p pidl2=%p\n",pidl1, pidl2); + + /* explorer reads from registry directly (StreamMRU), + so we can only check here */ + if ((!pcheck (pidl1)) || (!pcheck (pidl2))) return FALSE; + + pdump (pidl1); + pdump (pidl2); + + if ( (!pidl1) || (!pidl2) ) return FALSE; + + while (pidltemp1->mkid.cb && pidltemp2->mkid.cb) + { + _ILSimpleGetText(pidltemp1, szData1, MAX_PATH); + _ILSimpleGetText(pidltemp2, szData2, MAX_PATH); + + if (strcasecmp ( szData1, szData2 )!=0 ) + return FALSE; + + pidltemp1 = ILGetNext(pidltemp1); + pidltemp2 = ILGetNext(pidltemp2); + } + + if (!pidltemp1->mkid.cb && !pidltemp2->mkid.cb) + { + return TRUE; + } + + return FALSE; +} +/************************************************************************* + * ILIsParent [SHELL32.23] + * + * Verifies that pidlParent is indeed the (immediate) parent of pidlChild. + * + * PARAMS + * pidlParent [I] + * pidlChild [I] + * bImmediate [I] only return true if the parent is the direct parent + * of the child + * + * RETURNS + * True if the parent ItemIDlist is a complete part of the child ItemIdList, + * False otherwise. + * + * NOTES + * parent = a/b, child = a/b/c -> true, c is in folder a/b + * child = a/b/c/d -> false if bImmediate is true, d is not in folder a/b + * child = a/b/c/d -> true if bImmediate is false, d is in a subfolder of a/b + */ +BOOL WINAPI ILIsParent(LPCITEMIDLIST pidlParent, LPCITEMIDLIST pidlChild, BOOL bImmediate) +{ + char szData1[MAX_PATH]; + char szData2[MAX_PATH]; + + LPCITEMIDLIST pParent = pidlParent; + LPCITEMIDLIST pChild = pidlChild; + + TRACE("%p %p %x\n", pidlParent, pidlChild, bImmediate); + + if (!pParent || !pChild) return FALSE; + + while (pParent->mkid.cb && pChild->mkid.cb) + { + _ILSimpleGetText(pParent, szData1, MAX_PATH); + _ILSimpleGetText(pChild, szData2, MAX_PATH); + + if (strcasecmp ( szData1, szData2 )!=0 ) + return FALSE; + + pParent = ILGetNext(pParent); + pChild = ILGetNext(pChild); + } + + if ( pParent->mkid.cb || ! pChild->mkid.cb) /* child shorter or has equal length to parent */ + return FALSE; + + if ( ILGetNext(pChild)->mkid.cb && bImmediate) /* not immediate descent */ + return FALSE; + + return TRUE; +} + +/************************************************************************* + * ILFindChild [SHELL32.24] + * + * Compares elements from pidl1 and pidl2. + * + * PARAMS + * pidl1 [I] + * pidl2 [I] + * + * RETURNS + * pidl1 is desktop pidl2 + * pidl1 shorter pidl2 pointer to first different element of pidl2 + * if there was at least one equal element + * pidl2 shorter pidl1 0 + * pidl2 equal pidl1 pointer to last 0x00-element of pidl2 + * + * NOTES + * exported by ordinal. + */ +LPITEMIDLIST WINAPI ILFindChild(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) +{ + char szData1[MAX_PATH]; + char szData2[MAX_PATH]; + + LPCITEMIDLIST pidltemp1 = pidl1; + LPCITEMIDLIST pidltemp2 = pidl2; + LPCITEMIDLIST ret=NULL; + + TRACE("pidl1=%p pidl2=%p\n",pidl1, pidl2); + + /* explorer reads from registry directly (StreamMRU), + so we can only check here */ + if ((!pcheck (pidl1)) || (!pcheck (pidl2))) + return FALSE; + + pdump (pidl1); + pdump (pidl2); + + if ( _ILIsDesktop(pidl1) ) + { + ret = pidl2; + } + else + { + while (pidltemp1->mkid.cb && pidltemp2->mkid.cb) + { + _ILSimpleGetText(pidltemp1, szData1, MAX_PATH); + _ILSimpleGetText(pidltemp2, szData2, MAX_PATH); + + if (strcasecmp(szData1,szData2)) + break; + + pidltemp1 = ILGetNext(pidltemp1); + pidltemp2 = ILGetNext(pidltemp2); + ret = pidltemp2; + } + + if (pidltemp1->mkid.cb) + { + ret = NULL; /* elements of pidl1 left*/ + } + } + TRACE_(shell)("--- %p\n", ret); + return (LPITEMIDLIST)ret; /* pidl 1 is shorter */ +} + +/************************************************************************* + * ILCombine [SHELL32.25] + * + * Concatenates two complex ItemIDLists. + * + * PARAMS + * pidl1 [I] first complex ItemIDLists + * pidl2 [I] complex ItemIDLists to append + * + * RETURNS + * if both pidl's == NULL NULL + * if pidl1 == NULL cloned pidl2 + * if pidl2 == NULL cloned pidl1 + * otherwise new pidl with pidl2 appended to pidl1 + * + * NOTES + * exported by ordinal. + * Does not destroy the passed in ItemIDLists! + */ +LPITEMIDLIST WINAPI ILCombine(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) +{ + DWORD len1,len2; + LPITEMIDLIST pidlNew; + + TRACE("pidl=%p pidl=%p\n",pidl1,pidl2); + + if(!pidl1 && !pidl2) return NULL; + + pdump (pidl1); + pdump (pidl2); + + if(!pidl1) + { + pidlNew = ILClone(pidl2); + return pidlNew; + } + + if(!pidl2) + { + pidlNew = ILClone(pidl1); + return pidlNew; + } + + len1 = ILGetSize(pidl1)-2; + len2 = ILGetSize(pidl2); + pidlNew = SHAlloc(len1+len2); + + if (pidlNew) + { + memcpy(pidlNew,pidl1,len1); + memcpy(((BYTE *)pidlNew)+len1,pidl2,len2); + } + + /* TRACE(pidl,"--new pidl=%p\n",pidlNew);*/ + return pidlNew; +} + +/************************************************************************* + * SHGetRealIDL [SHELL32.98] + * + * NOTES + */ +HRESULT WINAPI SHGetRealIDL(LPSHELLFOLDER lpsf, LPCITEMIDLIST pidlSimple, LPITEMIDLIST *pidlReal) +{ + IDataObject* pDataObj; + HRESULT hr = IShellFolder_GetUIObjectOf(lpsf, 0, 1, &pidlSimple, &IID_IDataObject, 0, (LPVOID*)&pDataObj); + + if (SUCCEEDED(hr)) { + STGMEDIUM medium; + FORMATETC fmt; + + fmt.cfFormat = RegisterClipboardFormatA(CFSTR_SHELLIDLIST); + fmt.ptd = NULL; + fmt.dwAspect = DVASPECT_CONTENT; + fmt.lindex = -1; + fmt.tymed = TYMED_HGLOBAL; + + hr = IDataObject_GetData(pDataObj, &fmt, &medium); + + IDataObject_Release(pDataObj); + + if (SUCCEEDED(hr)) { + /*assert(pida->cidl==1);*/ + LPIDA pida = (LPIDA)GlobalLock(medium.u.hGlobal); + + LPCITEMIDLIST pidl_folder = (LPCITEMIDLIST) ((LPBYTE)pida+pida->aoffset[0]); + LPCITEMIDLIST pidl_child = (LPCITEMIDLIST) ((LPBYTE)pida+pida->aoffset[1]); + + *pidlReal = ILCombine(pidl_folder, pidl_child); + + if (!*pidlReal) + hr = E_OUTOFMEMORY; + + GlobalUnlock(medium.u.hGlobal); + GlobalFree(medium.u.hGlobal); + } + } + + return hr; +} + +/************************************************************************* + * SHLogILFromFSIL [SHELL32.95] + * + * NOTES + * pild = CSIDL_DESKTOP ret = 0 + * pild = CSIDL_DRIVES ret = 0 + */ +LPITEMIDLIST WINAPI SHLogILFromFSIL(LPITEMIDLIST pidl) +{ + FIXME("(pidl=%p)\n",pidl); + + pdump(pidl); + + return 0; +} + +/************************************************************************* + * ILGetSize [SHELL32.152] + * + * Gets the byte size of an ItemIDList including zero terminator + * + * PARAMS + * pidl [I] ItemIDList + * + * RETURNS + * size of pidl in bytes + * + * NOTES + * exported by ordinal + */ +UINT WINAPI ILGetSize(LPCITEMIDLIST pidl) +{ + LPCSHITEMID si = &(pidl->mkid); + UINT len=0; + + if (pidl) + { while (si->cb) + { len += si->cb; + si = (LPCSHITEMID)(((const BYTE*)si)+si->cb); + } + len += 2; + } + TRACE("pidl=%p size=%u\n",pidl, len); + return len; +} + +/************************************************************************* + * ILGetNext [SHELL32.153] + * + * Gets the next ItemID of an ItemIDList + * + * PARAMS + * pidl [I] ItemIDList + * + * RETURNS + * null -> null + * desktop -> null + * simple pidl -> pointer to 0x0000 element + * + * NOTES + * exported by ordinal. + */ +LPITEMIDLIST WINAPI ILGetNext(LPCITEMIDLIST pidl) +{ + WORD len; + + TRACE("%p\n", pidl); + + if(pidl) + { + len = pidl->mkid.cb; + if (len) + { + pidl = (LPCITEMIDLIST) (((const BYTE*)pidl)+len); + TRACE("-- %p\n", pidl); + return (LPITEMIDLIST)pidl; + } + } + return NULL; +} + +/************************************************************************* + * ILAppend [SHELL32.154] + * + * Adds the single ItemID item to the ItemIDList indicated by pidl. + * If bEnd is FALSE, inserts the item in the front of the list, + * otherwise it adds the item to the end. (???) + * + * PARAMS + * pidl [I] ItemIDList to extend + * item [I] ItemID to prepend/append + * bEnd [I] Indicates if the item should be appended + * + * NOTES + * Destroys the passed in idlist! (???) + */ +LPITEMIDLIST WINAPI ILAppend(LPITEMIDLIST pidl, LPCITEMIDLIST item, BOOL bEnd) +{ + LPITEMIDLIST idlRet; + + WARN("(pidl=%p,pidl=%p,%08u)semi-stub\n",pidl,item,bEnd); + + pdump (pidl); + pdump (item); + + if (_ILIsDesktop(pidl)) + { + idlRet = ILClone(item); + if (pidl) + SHFree (pidl); + return idlRet; + } + + if (bEnd) + { + idlRet = ILCombine(pidl, item); + } + else + { + idlRet = ILCombine(item, pidl); + } + + SHFree(pidl); + return idlRet; +} + +/************************************************************************* + * ILFree [SHELL32.155] + * + * Frees memory (if not NULL) allocated by SHMalloc allocator + * + * PARAMS + * pidl [I] + * + * NOTES + * exported by ordinal + */ +void WINAPI ILFree(LPITEMIDLIST pidl) +{ + TRACE("(pidl=%p)\n",pidl); + if(pidl) SHFree(pidl); +} + +/************************************************************************* + * ILGlobalFree [SHELL32.156] + * + * Frees memory (if not NULL) allocated by Alloc allocator + * + * PARAMS + * pidl [I] + * + * NOTES + * exported by ordinal. + */ +void WINAPI ILGlobalFree( LPITEMIDLIST pidl) +{ + TRACE("%p\n", pidl); + + if(!pidl) return; + Free(pidl); +} + +/************************************************************************* + * ILCreateFromPathA [SHELL32.189] + * + * Creates a complex ItemIDList from a path and returns it. + * + * PARAMS + * path [I] + * + * RETURNS + * the newly created complex ItemIDList or NULL if failed + * + * NOTES + * exported by ordinal. + */ + +LPITEMIDLIST WINAPI ILCreateFromPathA (LPCSTR path) +{ + LPITEMIDLIST pidlnew = NULL; + + TRACE_(shell)("%s\n", debugstr_a(path)); + + if (SUCCEEDED(SHILCreateFromPathA(path, &pidlnew, NULL))) + return pidlnew; + return NULL; +} + +/************************************************************************* + * ILCreateFromPathW [SHELL32.190] + */ +LPITEMIDLIST WINAPI ILCreateFromPathW (LPCWSTR path) +{ + LPITEMIDLIST pidlnew = NULL; + + TRACE_(shell)("%s\n", debugstr_w(path)); + + if (SUCCEEDED(SHILCreateFromPathW(path, &pidlnew, NULL))) + return pidlnew; + return NULL; +} + +/************************************************************************* + * ILCreateFromPath [SHELL32.157] + */ +LPITEMIDLIST WINAPI ILCreateFromPathAW (LPCVOID path) +{ + if ( SHELL_OsIsUnicode()) + return ILCreateFromPathW (path); + return ILCreateFromPathA (path); +} + +/************************************************************************* + * _ILParsePathW [internal] + * + * Creates an ItemIDList from a path and returns it. + * + * PARAMS + * path [I] path to parse and convert into an ItemIDList + * lpFindFile [I] pointer to buffer to initialize the FileSystem + * Bind Data object with + * bBindCtx [I] indicates to create a BindContext and assign a + * FileSystem Bind Data object + * ppidl [O] the newly create ItemIDList + * prgfInOut [I/O] requested attributes on input and actual + * attributes on return + * + * RETURNS + * NO_ERROR on success or an OLE error code + * + * NOTES + * If either lpFindFile is non-NULL or bBindCtx is TRUE, this function + * creates a BindContext object and assigns a FileSystem Bind Data object + * to it, passing the BindContext to IShellFolder_ParseDisplayName. Each + * IShellFolder uses that FileSystem Bind Data object of the BindContext + * to pass data about the current path element to the next object. This + * is used to avoid having to verify the current path element on disk, so + * that creating an ItemIDList from a non-existent path still can work. + */ +static HRESULT WINAPI _ILParsePathW(LPCWSTR path, LPWIN32_FIND_DATAW lpFindFile, + BOOL bBindCtx, LPITEMIDLIST *ppidl, LPDWORD prgfInOut) +{ + LPSHELLFOLDER pSF = NULL; + LPBC pBC = NULL; + HRESULT ret; + + TRACE("%s %p %d (%p)->%p (%p)->0x%lx\n", debugstr_w(path), lpFindFile, bBindCtx, + ppidl, ppidl ? *ppidl : NULL, + prgfInOut, prgfInOut ? *prgfInOut : 0); + + ret = SHGetDesktopFolder(&pSF); + if (FAILED(ret)) + { + return ret; + } + + if (lpFindFile || bBindCtx) + ret = IFileSystemBindData_Constructor(lpFindFile, &pBC); + + if (SUCCEEDED(ret)) + { + ret = IShellFolder_ParseDisplayName(pSF, 0, pBC, (LPOLESTR)path, NULL, ppidl, prgfInOut); + } + + if (pBC) + { + IBindCtx_Release(pBC); + pBC = NULL; + } + + IShellFolder_Release(pSF); + + if (!SUCCEEDED(ret) && ppidl) + *ppidl = NULL; + + TRACE("%s %p 0x%lx\n", debugstr_w(path), ppidl ? *ppidl : NULL, prgfInOut ? *prgfInOut : 0); + + return ret; +} + +/************************************************************************* + * SHSimpleIDListFromPath [SHELL32.162] + * + * Creates a simple ItemIDList from a path and returns it. This function + * does not fail on non-existent paths. + * + * PARAMS + * path [I] path to parse and convert into an ItemIDList + * + * RETURNS + * the newly created simple ItemIDList + * + * NOTES + * Simple in the name does not mean a relative ItemIDList but rather a + * fully qualified list, where only the file name is filled in and the + * directory flag for those ItemID elements this is known about, eg. + * it is not the last element in the ItemIDList or the actual directory + * exists on disk. + * exported by ordinal. + */ +LPITEMIDLIST WINAPI SHSimpleIDListFromPathA(LPCSTR lpszPath) +{ + LPITEMIDLIST pidl = NULL; + LPWSTR wPath = NULL; + int len; + + TRACE("%s\n", debugstr_a(lpszPath)); + + if (lpszPath) + { + len = MultiByteToWideChar(CP_ACP, 0, lpszPath, -1, NULL, 0); + wPath = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); + MultiByteToWideChar(CP_ACP, 0, lpszPath, -1, wPath, len); + } + + _ILParsePathW(wPath, NULL, TRUE, &pidl, NULL); + + HeapFree(GetProcessHeap(), 0, wPath); + TRACE("%s %p\n", debugstr_a(lpszPath), pidl); + return pidl; +} + +LPITEMIDLIST WINAPI SHSimpleIDListFromPathW(LPCWSTR lpszPath) +{ + LPITEMIDLIST pidl = NULL; + + TRACE("%s\n", debugstr_w(lpszPath)); + + _ILParsePathW(lpszPath, NULL, TRUE, &pidl, NULL); + TRACE("%s %p\n", debugstr_w(lpszPath), pidl); + return pidl; +} + +LPITEMIDLIST WINAPI SHSimpleIDListFromPathAW(LPCVOID lpszPath) +{ + if ( SHELL_OsIsUnicode()) + return SHSimpleIDListFromPathW (lpszPath); + return SHSimpleIDListFromPathA (lpszPath); +} + +/************************************************************************* + * SHGetDataFromIDListA [SHELL32.247] + * + * NOTES + * the pidl can be a simple one. since we can't get the path out of the pidl + * we have to take all data from the pidl + */ +HRESULT WINAPI SHGetDataFromIDListA(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, int nFormat, LPVOID dest, int len) +{ + TRACE_(shell)("sf=%p pidl=%p 0x%04x %p 0x%04x stub\n",psf,pidl,nFormat,dest,len); + + pdump(pidl); + if (!psf || !dest ) return E_INVALIDARG; + + switch (nFormat) + { + case SHGDFIL_FINDDATA: + { + LPSTR filename, shortname; + WIN32_FIND_DATAA * pfd = dest; + + if (_ILIsDrive(pidl)) + return E_INVALIDARG; + + if (len < (int)sizeof(WIN32_FIND_DATAA)) return E_INVALIDARG; + + ZeroMemory(pfd, sizeof (WIN32_FIND_DATAA)); + _ILGetFileDateTime( pidl, &(pfd->ftLastWriteTime)); + pfd->dwFileAttributes = _ILGetFileAttributes(pidl, NULL, 0); + pfd->nFileSizeLow = _ILGetFileSize ( pidl, NULL, 0); + + filename = _ILGetTextPointer(pidl); + shortname = _ILGetSTextPointer(pidl); + + if (filename) + lstrcpynA(pfd->cFileName, filename, MAX_PATH); + else + pfd->cFileName[0] = '\0'; + + if (shortname) + lstrcpynA(pfd->cAlternateFileName, shortname, MAX_PATH); + else + pfd->cAlternateFileName[0] = '\0'; + } + return NOERROR; + + case SHGDFIL_NETRESOURCE: + case SHGDFIL_DESCRIPTIONID: + FIXME_(shell)("SHGDFIL %i stub\n", nFormat); + break; + + default: + ERR_(shell)("Unknown SHGDFIL %i, please report\n", nFormat); + } + + return E_INVALIDARG; +} + +/************************************************************************* + * SHGetDataFromIDListW [SHELL32.248] + * + */ +HRESULT WINAPI SHGetDataFromIDListW(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, int nFormat, LPVOID dest, int len) +{ + TRACE_(shell)("sf=%p pidl=%p 0x%04x %p 0x%04x stub\n",psf,pidl,nFormat,dest,len); + + pdump(pidl); + + if (! psf || !dest ) return E_INVALIDARG; + + switch (nFormat) + { + case SHGDFIL_FINDDATA: + { + LPSTR filename, shortname; + WIN32_FIND_DATAW * pfd = dest; + + if (_ILIsDrive(pidl)) + return E_INVALIDARG; + + if (len < (int)sizeof(WIN32_FIND_DATAW)) return E_INVALIDARG; + + ZeroMemory(pfd, sizeof (WIN32_FIND_DATAA)); + _ILGetFileDateTime( pidl, &(pfd->ftLastWriteTime)); + pfd->dwFileAttributes = _ILGetFileAttributes(pidl, NULL, 0); + pfd->nFileSizeLow = _ILGetFileSize ( pidl, NULL, 0); + + filename = _ILGetTextPointer(pidl); + shortname = _ILGetSTextPointer(pidl); + + if (!filename) + pfd->cFileName[0] = '\0'; + else if (!MultiByteToWideChar(CP_ACP, 0, filename, -1, pfd->cFileName, MAX_PATH)) + pfd->cFileName[MAX_PATH-1] = 0; + + if (!shortname) + pfd->cAlternateFileName[0] = '\0'; + else if (!MultiByteToWideChar(CP_ACP, 0, shortname, -1, pfd->cAlternateFileName, 14)) + pfd->cAlternateFileName[13] = 0; + } + return NOERROR; + case SHGDFIL_NETRESOURCE: + case SHGDFIL_DESCRIPTIONID: + FIXME_(shell)("SHGDFIL %i stub\n", nFormat); + break; + + default: + ERR_(shell)("Unknown SHGDFIL %i, please report\n", nFormat); + } + + return E_INVALIDARG; +} + +/************************************************************************* + * SHELL_GetPathFromIDListA + */ +HRESULT SHELL_GetPathFromIDListA(LPCITEMIDLIST pidl, LPSTR pszPath, UINT uOutSize) +{ + HRESULT hr = S_OK; + + pszPath[0]=0; + + /* One case is a PIDL rooted at desktop level */ + if (_ILIsValue(pidl) || _ILIsFolder(pidl)) { + hr = SHGetSpecialFolderPathA(0, pszPath, CSIDL_DESKTOP, FALSE); + + if (SUCCEEDED(hr)) + PathAddBackslashA(pszPath); + } + /* The only other valid case is a item ID list beginning at "My Computer" */ + else if (_ILIsMyComputer(pidl)) + pidl = ILGetNext(pidl); + + if (SUCCEEDED(hr)) { + LPSTR txt; + + while(pidl && pidl->mkid.cb) { + if (_ILIsSpecialFolder(pidl)) + {hr = E_INVALIDARG; break;} + + txt = _ILGetTextPointer(pidl); + if (!txt) + {hr = E_INVALIDARG; break;} + + if (lstrlenA(txt) > pidl->mkid.cb) + ERR("pidl %p is borked\n",pidl); + + /* make sure there's enough space for the next segment */ + if ( (lstrlenA(txt) + lstrlenA(pszPath)) > uOutSize) + {hr = E_INVALIDARG; break;} + lstrcatA( pszPath, txt ); + + pidl = ILGetNext(pidl); + if (!pidl) + {hr = E_INVALIDARG; break;} + + if (!pidl->mkid.cb) { + /* We are at the end and successfully converted the complete PIDL. */ + break; + } + + if( (lstrlenA(pszPath) + 1) > uOutSize) + {hr = E_INVALIDARG; break;} + if (!PathAddBackslashA(pszPath)) + {hr = E_INVALIDARG; break;} + } + } else + hr = E_INVALIDARG; + + TRACE_(shell)("-- %s, 0x%08lx\n", pszPath, hr); + return hr; +} + +/************************************************************************* + * SHGetPathFromIDListA [SHELL32.@][NT 4.0: SHELL32.220] + * + * PARAMETERS + * pidl, [IN] pidl + * pszPath [OUT] path + * + * RETURNS + * path from a passed PIDL. + * + * NOTES + * NULL returns FALSE + * desktop pidl gives path to desktop directory back + * special pidls returning FALSE + */ +BOOL WINAPI SHGetPathFromIDListA(LPCITEMIDLIST pidl, LPSTR pszPath) +{ + HRESULT hr; + + TRACE_(shell)("(pidl=%p,%p)\n",pidl,pszPath); + pdump(pidl); + + if (!pidl) + return FALSE; + + hr = SHELL_GetPathFromIDListA(pidl, pszPath, MAX_PATH); + + return SUCCEEDED(hr); +} + +/************************************************************************* + * SHELL_GetPathFromIDListW + */ +HRESULT SHELL_GetPathFromIDListW(LPCITEMIDLIST pidl, LPWSTR pszPath, UINT uOutSize) +{ + HRESULT hr = S_OK; + UINT len; + + pszPath[0]=0; + + /* One case is a PIDL rooted at desktop level */ + if (_ILIsValue(pidl) || _ILIsFolder(pidl)) { + hr = SHGetSpecialFolderPathW(0, pszPath, CSIDL_DESKTOP, FALSE); + + if (SUCCEEDED(hr)) + PathAddBackslashW(pszPath); + } + /* The only other valid case is a item ID list beginning at "My Computer" */ + else if (_ILIsMyComputer(pidl)) + pidl = ILGetNext(pidl); + + if (SUCCEEDED(hr)) { + LPSTR txt; + + while(pidl && pidl->mkid.cb) { + if (_ILIsSpecialFolder(pidl)) + {hr = E_INVALIDARG; break;} + + txt = _ILGetTextPointer(pidl); + if (!txt) + {hr = E_INVALIDARG; break;} + + if (lstrlenA(txt) > pidl->mkid.cb) + ERR("pidl %p is borked\n",pidl); + len = MultiByteToWideChar(CP_ACP, 0, txt, -1, NULL, 0); + if ( (lstrlenW(pszPath) + len) > uOutSize ) + {hr = E_INVALIDARG; break;} + + MultiByteToWideChar(CP_ACP, 0, txt, -1, + &pszPath[lstrlenW(pszPath)], len); + + pidl = ILGetNext(pidl); + if (!pidl) + {hr = E_INVALIDARG; break;} + + if (!pidl->mkid.cb) { + /* We are at the end and successfully converted the complete PIDL. */ + break; + } + + if ( (lstrlenW(pszPath) + 1) > uOutSize ) + {hr = E_INVALIDARG; break;} + if (!PathAddBackslashW(pszPath)) + {hr = E_INVALIDARG; break;} + } + } else + hr = E_INVALIDARG; + + TRACE_(shell)("-- %s, 0x%08lx\n", debugstr_w(pszPath), hr); + return hr; +} + +/************************************************************************* + * SHGetPathFromIDListW [SHELL32.@] + */ +BOOL WINAPI SHGetPathFromIDListW(LPCITEMIDLIST pidl, LPWSTR pszPath) +{ + HRESULT hr; + + TRACE_(shell)("(pidl=%p,%p)\n", pidl, debugstr_w(pszPath)); + pdump(pidl); + + if (!pidl) + return FALSE; + + hr = SHELL_GetPathFromIDListW(pidl, pszPath, MAX_PATH); + + TRACE_(shell)("-- %s, 0x%08lx\n",debugstr_w(pszPath), hr); + return SUCCEEDED(hr); +} + +/************************************************************************* + * SHBindToParent [shell version 5.0] + */ +HRESULT WINAPI SHBindToParent(LPCITEMIDLIST pidl, REFIID riid, LPVOID *ppv, LPCITEMIDLIST *ppidlLast) +{ + IShellFolder * psf; + LPITEMIDLIST pidlChild, pidlParent; + HRESULT hr=E_FAIL; + + TRACE_(shell)("pidl=%p\n", pidl); + pdump(pidl); + + *ppv = NULL; + if (ppidlLast) *ppidlLast = NULL; + + if (_ILIsPidlSimple(pidl)) + { + IShellFolder* desktop; + + /* we are on desktop level */ + hr = SHGetDesktopFolder(&desktop); + + if (SUCCEEDED(hr)) + { + hr = IShellFolder_QueryInterface(desktop, riid, ppv); + + if (SUCCEEDED(hr) && ppidlLast) + *ppidlLast = ILClone(pidl); + + IShellFolder_Release(desktop); + } + } + else + { + pidlChild = ILClone(ILFindLastID(pidl)); + pidlParent = ILClone(pidl); + ILRemoveLastID(pidlParent); + + hr = SHGetDesktopFolder(&psf); + + if (SUCCEEDED(hr)) + hr = IShellFolder_BindToObject(psf, pidlParent, NULL, riid, ppv); + + if (SUCCEEDED(hr) && ppidlLast) + *ppidlLast = pidlChild; + else + ILFree (pidlChild); + + SHFree (pidlParent); + if (psf) IShellFolder_Release(psf); + } + + + TRACE_(shell)("-- psf=%p pidl=%p ret=0x%08lx\n", *ppv, (ppidlLast)?*ppidlLast:NULL, hr); + return hr; +} + +/************************************************************************** + * + * internal functions + * + * ### 1. section creating pidls ### + * + ************************************************************************* + */ +LPITEMIDLIST _ILAlloc(PIDLTYPE type, size_t size) +{ + LPITEMIDLIST pidlOut = NULL; + + if((pidlOut = SHAlloc(size + 5))) + { + LPPIDLDATA pData; + LPITEMIDLIST pidlNext; + + ZeroMemory(pidlOut, size + 5); + pidlOut->mkid.cb = size + 3; + + if ((pData = _ILGetDataPointer(pidlOut))) + pData->type = type; + + if ((pidlNext = ILGetNext(pidlOut))) + pidlNext->mkid.cb = 0x00; + TRACE("-- (pidl=%p, size=%u)\n", pidlOut, size); + } + + return pidlOut; +} + +LPITEMIDLIST _ILCreateDesktop() +{ + LPITEMIDLIST ret; + + TRACE("()\n"); + ret = SHAlloc(2); + if (ret) + ret->mkid.cb = 0; + return ret; +} + +LPITEMIDLIST _ILCreateMyComputer() +{ TRACE("()\n"); + return _ILCreateGuid(PT_GUID, &CLSID_MyComputer); +} + +LPITEMIDLIST _ILCreateIExplore() +{ TRACE("()\n"); + return _ILCreateGuid(PT_GUID, &CLSID_Internet); +} + +LPITEMIDLIST _ILCreateControlPanel() +{ + LPITEMIDLIST parent = _ILCreateGuid(PT_GUID, &CLSID_MyComputer), ret = NULL; + + TRACE("()\n"); + if (parent) + { + LPITEMIDLIST cpl = _ILCreateGuid(PT_SHELLEXT, &CLSID_ControlPanel); + + if (cpl) + { + ret = ILCombine(parent, cpl); + SHFree(cpl); + } + SHFree(parent); + } + return ret; +} + +LPITEMIDLIST _ILCreatePrinters() +{ + LPITEMIDLIST parent = _ILCreateGuid(PT_GUID, &CLSID_MyComputer), ret = NULL; + + TRACE("()\n"); + if (parent) + { + LPITEMIDLIST printers = _ILCreateGuid(PT_YAGUID, &CLSID_Printers); + + if (printers) + { + ret = ILCombine(parent, printers); + SHFree(printers); + } + SHFree(parent); + } + return ret; +} + +LPITEMIDLIST _ILCreateNetwork() +{ TRACE("()\n"); + return _ILCreateGuid(PT_GUID, &CLSID_NetworkPlaces); +} + +LPITEMIDLIST _ILCreateBitBucket() +{ TRACE("()\n"); + return _ILCreateGuid(PT_GUID, &CLSID_RecycleBin); +} + +LPITEMIDLIST _ILCreateGuid(PIDLTYPE type, REFIID guid) +{ + LPITEMIDLIST pidlOut; + + if (type == PT_SHELLEXT || type == PT_GUID || type == PT_YAGUID) + { + pidlOut = _ILAlloc(type, sizeof(GUIDStruct)); + if (pidlOut) + { + LPPIDLDATA pData = _ILGetDataPointer(pidlOut); + + memcpy(&(pData->u.guid.guid), guid, sizeof(GUID)); + TRACE("-- create GUID-pidl %s\n", + debugstr_guid(&(pData->u.guid.guid))); + } + } + else + { + WARN("%d: invalid type for GUID\n", type); + pidlOut = NULL; + } + return pidlOut; +} + +LPITEMIDLIST _ILCreateGuidFromStrA(LPCSTR szGUID) +{ + IID iid; + + if (!SUCCEEDED(SHCLSIDFromStringA(szGUID, &iid))) + { + ERR("%s is not a GUID\n", szGUID); + return NULL; + } + return _ILCreateGuid(PT_GUID, &iid); +} + +LPITEMIDLIST _ILCreateFromFindDataA(WIN32_FIND_DATAA * stffile ) +{ + char buff[MAX_PATH + 14 +1]; /* see WIN32_FIND_DATA */ + char * pbuff = buff; + size_t len, len1; + LPITEMIDLIST pidl; + PIDLTYPE type; + + if (!stffile) + return NULL; + + TRACE("(%s, %s)\n",stffile->cAlternateFileName, stffile->cFileName); + + /* prepare buffer with both names */ + len = strlen (stffile->cFileName) + 1; + memcpy (pbuff, stffile->cFileName, len); + pbuff += len; + + len1 = strlen (stffile->cAlternateFileName)+1; + memcpy (pbuff, stffile->cAlternateFileName, len1); + + type = (stffile->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) ? PT_FOLDER : + PT_VALUE; + /* FileStruct already has one byte for the first name, so use len - 1 in + * size calculation + */ + if ((pidl = _ILAlloc(type, sizeof(FileStruct) + (len - 1) + len1))) + { + LPPIDLDATA pData; + LPSTR pszDest; + + /* set attributes */ + if ((pData = _ILGetDataPointer(pidl))) + { + pData->type = type; + FileTimeToDosDateTime(&(stffile->ftLastWriteTime),&pData->u.file.uFileDate,&pData->u.file.uFileTime); + pData->u.file.dwFileSize = stffile->nFileSizeLow; + pData->u.file.uFileAttribs = (WORD)stffile->dwFileAttributes; + } + if ((pszDest = _ILGetTextPointer(pidl))) + { + memcpy(pszDest, buff, len + len1); + TRACE("-- create Value: %s\n",debugstr_a(pszDest)); + } + } + return pidl; +} + +HRESULT _ILCreateFromPathA(LPCSTR szPath, LPITEMIDLIST* ppidl) +{ + HANDLE hFile; + WIN32_FIND_DATAA stffile; + + if (!ppidl) + return E_INVALIDARG; + + hFile = FindFirstFileA(szPath, &stffile); + + if (hFile == INVALID_HANDLE_VALUE) + return HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND); + + FindClose(hFile); + + *ppidl = _ILCreateFromFindDataA(&stffile); + + return *ppidl ? S_OK : E_OUTOFMEMORY; +} + +LPITEMIDLIST _ILCreateDrive(LPCWSTR lpszNew) +{ + WCHAR sTemp[4]; + LPITEMIDLIST pidlOut; + + sTemp[0]=toupperW(lpszNew[0]); + sTemp[1]=':'; + sTemp[2]='\\'; + sTemp[3]=0x00; + TRACE("(%s)\n",debugstr_w(sTemp)); + + if ((pidlOut = _ILAlloc(PT_DRIVE, sizeof(DriveStruct)))) + { + LPSTR pszDest; + + if ((pszDest = _ILGetTextPointer(pidlOut))) + { + WideCharToMultiByte(CP_ACP, 0, sTemp, sizeof(sTemp)/sizeof(WCHAR), pszDest, sizeof(sTemp)/sizeof(WCHAR), NULL, NULL); + TRACE("-- create Drive: %s\n", debugstr_a(pszDest)); + } + } + return pidlOut; +} + +/************************************************************************** + * _ILGetDrive() + * + * Gets the text for the drive eg. 'c:\' + * + * RETURNS + * strlen (lpszText) + */ +DWORD _ILGetDrive(LPCITEMIDLIST pidl,LPSTR pOut, UINT uSize) +{ TRACE("(%p,%p,%u)\n",pidl,pOut,uSize); + + if(_ILIsMyComputer(pidl)) + pidl = ILGetNext(pidl); + + if (pidl && _ILIsDrive(pidl)) + return _ILSimpleGetText(pidl, pOut, uSize); + + return 0; +} + +/************************************************************************** + * + * ### 2. section testing pidls ### + * + ************************************************************************** + * _ILIsDesktop() + * _ILIsMyComputer() + * _ILIsSpecialFolder() + * _ILIsDrive() + * _ILIsFolder() + * _ILIsValue() + * _ILIsPidlSimple() + */ +BOOL _ILIsDesktop(LPCITEMIDLIST pidl) +{ TRACE("(%p)\n",pidl); + return pidl && pidl->mkid.cb ? 0 : 1; +} + +BOOL _ILIsMyComputer(LPCITEMIDLIST pidl) +{ + REFIID iid = _ILGetGUIDPointer(pidl); + + TRACE("(%p)\n",pidl); + + if (iid) + return IsEqualIID(iid, &CLSID_MyComputer); + return FALSE; +} + +BOOL _ILIsSpecialFolder (LPCITEMIDLIST pidl) +{ + LPPIDLDATA lpPData = _ILGetDataPointer(pidl); + TRACE("(%p)\n",pidl); + return (pidl && ( (lpPData && (PT_GUID== lpPData->type || PT_SHELLEXT== lpPData->type)) || + (pidl && pidl->mkid.cb == 0x00) + )); +} + +BOOL _ILIsDrive(LPCITEMIDLIST pidl) +{ LPPIDLDATA lpPData = _ILGetDataPointer(pidl); + TRACE("(%p)\n",pidl); + return (pidl && lpPData && (PT_DRIVE == lpPData->type || + PT_DRIVE1 == lpPData->type || + PT_DRIVE2 == lpPData->type || + PT_DRIVE3 == lpPData->type)); +} + +BOOL _ILIsFolder(LPCITEMIDLIST pidl) +{ LPPIDLDATA lpPData = _ILGetDataPointer(pidl); + TRACE("(%p)\n",pidl); + return (pidl && lpPData && (PT_FOLDER == lpPData->type || PT_FOLDER1 == lpPData->type)); +} + +BOOL _ILIsValue(LPCITEMIDLIST pidl) +{ LPPIDLDATA lpPData = _ILGetDataPointer(pidl); + TRACE("(%p)\n",pidl); + return (pidl && lpPData && PT_VALUE == lpPData->type); +} + +BOOL _ILIsCPanelStruct(LPCITEMIDLIST pidl) +{ LPPIDLDATA lpPData = _ILGetDataPointer(pidl); + TRACE("(%p)\n",pidl); + return (pidl && lpPData && (lpPData->type == 0)); +} + +/************************************************************************** + * _ILIsPidlSimple + */ +BOOL _ILIsPidlSimple ( LPCITEMIDLIST pidl) +{ + BOOL ret = TRUE; + + if(! _ILIsDesktop(pidl)) /* pidl=NULL or mkid.cb=0 */ + { + WORD len = pidl->mkid.cb; + LPCITEMIDLIST pidlnext = (LPCITEMIDLIST) (((const BYTE*)pidl) + len ); + if (pidlnext->mkid.cb) + ret = FALSE; + } + + TRACE("%s\n", ret ? "Yes" : "No"); + return ret; +} + +/************************************************************************** + * + * ### 3. section getting values from pidls ### + */ + + /************************************************************************** + * _ILSimpleGetText + * + * gets the text for the first item in the pidl (eg. simple pidl) + * + * returns the length of the string + */ +DWORD _ILSimpleGetText (LPCITEMIDLIST pidl, LPSTR szOut, UINT uOutSize) +{ + DWORD dwReturn=0; + LPSTR szSrc; + GUID const * riid; + char szTemp[MAX_PATH]; + + TRACE("(%p %p %x)\n",pidl,szOut,uOutSize); + + if (!pidl) return 0; + + if (szOut) + *szOut = 0; + + if (_ILIsDesktop(pidl)) + { + /* desktop */ + if (HCR_GetClassNameA(&CLSID_ShellDesktop, szTemp, MAX_PATH)) + { + if (szOut) + lstrcpynA(szOut, szTemp, uOutSize); + + dwReturn = strlen (szTemp); + } + } + else if (( szSrc = _ILGetTextPointer(pidl) )) + { + /* filesystem */ + if (szOut) + lstrcpynA(szOut, szSrc, uOutSize); + + dwReturn = strlen(szSrc); + } + else if (( riid = _ILGetGUIDPointer(pidl) )) + { + /* special folder */ + if ( HCR_GetClassNameA(riid, szTemp, MAX_PATH) ) + { + if (szOut) + lstrcpynA(szOut, szTemp, uOutSize); + + dwReturn = strlen (szTemp); + } + } + else + { + ERR("-- no text\n"); + } + + TRACE("-- (%p=%s 0x%08lx)\n",szOut,debugstr_a(szOut),dwReturn); + return dwReturn; +} + + /************************************************************************** + * _ILSimpleGetTextW + * + * gets the text for the first item in the pidl (eg. simple pidl) + * + * returns the length of the string + */ +DWORD _ILSimpleGetTextW (LPCITEMIDLIST pidl, LPWSTR szOut, UINT uOutSize) +{ + DWORD dwReturn; + char szTemp[MAX_PATH]; + + TRACE("(%p %p %x)\n",pidl,szOut,uOutSize); + + dwReturn = _ILSimpleGetText(pidl, szTemp, uOutSize); + + if (!MultiByteToWideChar(CP_ACP, 0, szTemp, -1, szOut, MAX_PATH)) + *szOut = 0; + + TRACE("-- (%p=%s 0x%08lx)\n",szOut,debugstr_w(szOut),dwReturn); + return dwReturn; +} + +/************************************************************************** + * + * ### 4. getting pointers to parts of pidls ### + * + ************************************************************************** + * _ILGetDataPointer() + */ +LPPIDLDATA _ILGetDataPointer(LPCITEMIDLIST pidl) +{ + if(pidl && pidl->mkid.cb != 0x00) + return (LPPIDLDATA) &(pidl->mkid.abID); + return NULL; +} + +/************************************************************************** + * _ILGetTextPointer() + * gets a pointer to the long filename string stored in the pidl + */ +LPSTR _ILGetTextPointer(LPCITEMIDLIST pidl) +{/* TRACE(pidl,"(pidl%p)\n", pidl);*/ + + LPPIDLDATA pdata = _ILGetDataPointer(pidl); + + if (pdata) + { + switch (pdata->type) + { + case PT_GUID: + case PT_SHELLEXT: + case PT_YAGUID: + return NULL; + + case PT_DRIVE: + case PT_DRIVE1: + case PT_DRIVE2: + case PT_DRIVE3: + return (LPSTR)&(pdata->u.drive.szDriveName); + + case PT_FOLDER: + case PT_FOLDER1: + case PT_VALUE: + case PT_IESPECIAL1: + case PT_IESPECIAL2: + return (LPSTR)&(pdata->u.file.szNames); + + case PT_WORKGRP: + case PT_COMP: + case PT_NETWORK: + case PT_NETPROVIDER: + case PT_SHARE: + return (LPSTR)&(pdata->u.network.szNames); + } + } + return NULL; +} + +/************************************************************************** + * _ILGetSTextPointer() + * gets a pointer to the short filename string stored in the pidl + */ +LPSTR _ILGetSTextPointer(LPCITEMIDLIST pidl) +{/* TRACE(pidl,"(pidl%p)\n", pidl);*/ + + LPPIDLDATA pdata =_ILGetDataPointer(pidl); + + if (pdata) + { + switch (pdata->type) + { + case PT_FOLDER: + case PT_VALUE: + case PT_IESPECIAL1: + case PT_IESPECIAL2: + return (LPSTR)(pdata->u.file.szNames + strlen (pdata->u.file.szNames) + 1); + + case PT_WORKGRP: + return (LPSTR)(pdata->u.network.szNames + strlen (pdata->u.network.szNames) + 1); + } + } + return NULL; +} + +/************************************************************************** + * _ILGetGUIDPointer() + * + * returns reference to guid stored in some pidls + */ +IID* _ILGetGUIDPointer(LPCITEMIDLIST pidl) +{ + LPPIDLDATA pdata =_ILGetDataPointer(pidl); + + TRACE("%p\n", pidl); + + if (pdata) + { + TRACE("pdata->type 0x%04x\n", pdata->type); + switch (pdata->type) + { + case PT_SHELLEXT: + case PT_GUID: + return &(pdata->u.guid.guid); + + default: + TRACE("Unknown pidl type 0x%04x\n", pdata->type); + break; + } + } + return NULL; +} + +/************************************************************************* + * _ILGetFileDateTime + * + * Given the ItemIdList, get the FileTime + * + * PARAMS + * pidl [I] The ItemIDList + * pFt [I] the resulted FILETIME of the file + * + * RETURNS + * True if Successful + * + * NOTES + * + */ +BOOL _ILGetFileDateTime(LPCITEMIDLIST pidl, FILETIME *pFt) +{ + LPPIDLDATA pdata = _ILGetDataPointer(pidl); + + if(! pdata) return FALSE; + + switch (pdata->type) + { + case PT_FOLDER: + case PT_VALUE: + DosDateTimeToFileTime(pdata->u.file.uFileDate, pdata->u.file.uFileTime, pFt); + break; + default: + return FALSE; + } + return TRUE; +} + +BOOL _ILGetFileDate (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize) +{ + FILETIME ft,lft; + SYSTEMTIME time; + BOOL ret; + + if (_ILGetFileDateTime( pidl, &ft )) { + FileTimeToLocalFileTime(&ft, &lft); + FileTimeToSystemTime (&lft, &time); + ret = GetDateFormatA(LOCALE_USER_DEFAULT,DATE_SHORTDATE,&time, NULL, pOut, uOutSize); + } else { + pOut[0] = '\0'; + ret = FALSE; + } + return ret; + +} + +/************************************************************************* + * _ILGetFileSize + * + * Given the ItemIdList, get the FileSize + * + * PARAMS + * pidl [I] The ItemIDList + * pOut [I] The buffer to save the result + * uOutsize [I] The size of the buffer + * + * RETURNS + * The FileSize + * + * NOTES + * pOut can be null when no string is needed + * + */ +DWORD _ILGetFileSize (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize) +{ + LPPIDLDATA pdata = _ILGetDataPointer(pidl); + DWORD dwSize; + + if(! pdata) return 0; + + switch (pdata->type) + { + case PT_VALUE: + dwSize = pdata->u.file.dwFileSize; + if (pOut) StrFormatByteSizeA(dwSize, pOut, uOutSize); + return dwSize; + } + if (pOut) *pOut = 0x00; + return 0; +} + +BOOL _ILGetExtension (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize) +{ + char szTemp[MAX_PATH]; + const char * pPoint; + LPCITEMIDLIST pidlTemp=pidl; + + TRACE("pidl=%p\n",pidl); + + if (!pidl) return FALSE; + + pidlTemp = ILFindLastID(pidl); + + if (!_ILIsValue(pidlTemp)) return FALSE; + if (!_ILSimpleGetText(pidlTemp, szTemp, MAX_PATH)) return FALSE; + + pPoint = PathFindExtensionA(szTemp); + + if (! *pPoint) return FALSE; + + pPoint++; + lstrcpynA(pOut, pPoint, uOutSize); + TRACE("%s\n",pOut); + + return TRUE; +} + +/************************************************************************* + * _ILGetFileType + * + * Given the ItemIdList, get the file type description + * + * PARAMS + * pidl [I] The ItemIDList (simple) + * pOut [I] The buffer to save the result + * uOutsize [I] The size of the buffer + * + * RETURNS + * nothing + * + * NOTES + * This function copies as much as possible into the buffer. + */ +void _ILGetFileType(LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize) +{ + if(_ILIsValue(pidl)) + { + char sTemp[64]; + if(uOutSize > 0) + { + pOut[0] = 0; + } + if (_ILGetExtension (pidl, sTemp, 64)) + { + if (!( HCR_MapTypeToValueA(sTemp, sTemp, 64, TRUE) + && HCR_MapTypeToValueA(sTemp, pOut, uOutSize, FALSE ))) + { + lstrcpynA (pOut, sTemp, uOutSize - 6); + strcat (pOut, "-file"); + } + } + } + else + { + lstrcpynA(pOut, "Folder", uOutSize); + } +} + +/************************************************************************* + * _ILGetFileAttributes + * + * Given the ItemIdList, get the Attrib string format + * + * PARAMS + * pidl [I] The ItemIDList + * pOut [I] The buffer to save the result + * uOutsize [I] The size of the Buffer + * + * RETURNS + * Attributes + * + * FIXME + * return value 0 in case of error is a valid return value + * + */ +DWORD _ILGetFileAttributes(LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize) +{ + LPPIDLDATA pData = _ILGetDataPointer(pidl); + WORD wAttrib = 0; + int i; + + if(! pData) return 0; + + switch(pData->type) + { + case PT_FOLDER: + case PT_VALUE: + wAttrib = pData->u.file.uFileAttribs; + break; + } + + if(uOutSize >= 6) + { + i=0; + if(wAttrib & FILE_ATTRIBUTE_READONLY) + { + pOut[i++] = 'R'; + } + if(wAttrib & FILE_ATTRIBUTE_HIDDEN) + { + pOut[i++] = 'H'; + } + if(wAttrib & FILE_ATTRIBUTE_SYSTEM) + { + pOut[i++] = 'S'; + } + if(wAttrib & FILE_ATTRIBUTE_ARCHIVE) + { + pOut[i++] = 'A'; + } + if(wAttrib & FILE_ATTRIBUTE_COMPRESSED) + { + pOut[i++] = 'C'; + } + pOut[i] = 0x00; + } + return wAttrib; +} + +/************************************************************************* +* ILFreeaPidl +* +* free a aPidl struct +*/ +void _ILFreeaPidl(LPITEMIDLIST * apidl, UINT cidl) +{ + UINT i; + + if (apidl) + { + for (i = 0; i < cidl; i++) SHFree(apidl[i]); + SHFree(apidl); + } +} + +/************************************************************************* +* ILCopyaPidl +* +* copies an aPidl struct +*/ +LPITEMIDLIST* _ILCopyaPidl(LPCITEMIDLIST * apidlsrc, UINT cidl) +{ + UINT i; + LPITEMIDLIST * apidldest = (LPITEMIDLIST*)SHAlloc(cidl * sizeof(LPITEMIDLIST)); + if(!apidlsrc) return NULL; + + for (i = 0; i < cidl; i++) + apidldest[i] = ILClone(apidlsrc[i]); + + return apidldest; +} + +/************************************************************************* +* _ILCopyCidaToaPidl +* +* creates aPidl from CIDA +*/ +LPITEMIDLIST* _ILCopyCidaToaPidl(LPITEMIDLIST* pidl, LPIDA cida) +{ + UINT i; + LPITEMIDLIST * dst = (LPITEMIDLIST*)SHAlloc(cida->cidl * sizeof(LPITEMIDLIST)); + + if(!dst) return NULL; + + if (pidl) + *pidl = ILClone((LPITEMIDLIST)(&((LPBYTE)cida)[cida->aoffset[0]])); + + for (i = 0; i < cida->cidl; i++) + dst[i] = ILClone((LPITEMIDLIST)(&((LPBYTE)cida)[cida->aoffset[i + 1]])); + + return dst; +} diff --git a/reactos/lib/shell32/pidl.h b/reactos/lib/shell32/pidl.h index 39584092d66..b28d217ff6b 100644 --- a/reactos/lib/shell32/pidl.h +++ b/reactos/lib/shell32/pidl.h @@ -1,253 +1,253 @@ -/* - * internal pidl functions - * - * Copyright 1998 Juergen Schmied - * Copyright 2004 Juan Lang - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * NOTES: - * - * DO NOT use this definitions outside the shell32.dll ! - * - * The contents of a pidl should never used from a application - * directly. - * - * Undocumented: - * MS says: the abID of SHITEMID should be treated as binary data and not - * be interpreted by applications. Applies to everyone but MS itself. - * Word95 interprets the contents of abID (Filesize/Date) so we have to go - * for binary compatibility here. - */ - -#ifndef __WINE_PIDL_H -#define __WINE_PIDL_H - -#include - -#include "windef.h" -#include "winbase.h" -#include "winuser.h" -#include "shlobj.h" - -/* -* the pidl does cache fileattributes to speed up SHGetAttributes when -* displaying a big number of files. -* -* a pidl of NULL means the desktop -* -* The structure of the pidl seems to be a union. The first byte of the -* PIDLDATA desribes the type of pidl. -* -* object ! first byte / ! format ! living space -* ! size -* ---------------------------------------------------------------- -* my computer 0x1F/20 guid (2) (usual) -* network 0x1F guid -* bitbucket 0x1F guid -* drive 0x23/25 drive (usual) -* drive 0x25/25 drive (lnk/persistent) -* drive 0x29/25 drive -* shell extension 0x2E guid -* drive 0x2F drive (lnk/persistent) -* folder/file 0x30 folder/file (1) (lnk/persistent) -* folder 0x31 folder (usual) -* valueA 0x32 file (ANSI file name) -* valueW 0x34 file (Unicode file name) -* workgroup 0x41 network (3) -* computer 0x42 network (4) -* net provider 0x46 network -* whole network 0x47 network (5) -* MSITStore 0x61 htmlhlp (7) -* printers/ras connections 0x70 guid -* history/favorites 0xb1 file -* share 0xc3 network (6) -* -* guess: the persistent elements are non tracking -* -* (1) dummy byte is used, attributes are empty -* (2) IID_MyComputer = 20D04FE0L-3AEA-1069-A2D8-08002B30309D -* (3) two strings "workgroup" "Microsoft Network" -* (4) two strings "\\sirius" "Microsoft Network" -* (5) one string "Entire Network" -* (6) two strings "\\sirius\c" "Microsoft Network" -* (7) contains string "mk:@MSITStore:C:\path\file.chm::/path/filename.htm" -* GUID 871C5380-42A0-1069-A2EA-08002B30309D -*/ - -#define PT_CPLAPPLET 0x00 -#define PT_GUID 0x1F -#define PT_DRIVE 0x23 -#define PT_DRIVE2 0x25 -#define PT_DRIVE3 0x29 -#define PT_SHELLEXT 0x2E -#define PT_DRIVE1 0x2F -#define PT_FOLDER1 0x30 -#define PT_FOLDER 0x31 -#define PT_VALUE 0x32 -#define PT_WORKGRP 0x41 -#define PT_COMP 0x42 -#define PT_NETPROVIDER 0x46 -#define PT_NETWORK 0x47 -#define PT_IESPECIAL1 0x61 -#define PT_YAGUID 0x70 /* yet another guid.. */ -#define PT_IESPECIAL2 0xb1 -#define PT_SHARE 0xc3 - -#include "pshpack1.h" -typedef BYTE PIDLTYPE; - -typedef struct tagPIDLCPanelStruct -{ - BYTE dummy; /*01 is 0x00 */ - DWORD iconIdx; /*02 negative icon ID */ - WORD offsDispName; /*06*/ - WORD offsComment; /*08*/ - CHAR szName[1]; /*10*/ /* terminated by 0x00, followed by display name and comment string */ -} PIDLCPanelStruct; - -typedef struct tagGUIDStruct -{ - BYTE dummy; /* offset 01 is unknown */ - GUID guid; /* offset 02 */ -} GUIDStruct; - -typedef struct tagDriveStruct -{ - CHAR szDriveName[20]; /*01*/ - WORD unknown; /*21*/ -} DriveStruct; - -typedef struct tagFileStruct -{ - BYTE dummy; /*01 is 0x00 for files or dirs */ - DWORD dwFileSize; /*02*/ - WORD uFileDate; /*06*/ - WORD uFileTime; /*08*/ - WORD uFileAttribs; /*10*/ - CHAR szNames[1]; /*12*/ - /* Here are coming two strings. The first is the long name. - The second the dos name when needed or just 0x00 */ -} FileStruct; - -typedef struct tagPIDLDATA -{ PIDLTYPE type; /*00*/ - union - { - struct tagGUIDStruct guid; - struct tagDriveStruct drive; - struct tagFileStruct file; - struct - { WORD dummy; /*01*/ - CHAR szNames[1]; /*03*/ - } network; - struct - { WORD dummy; /*01*/ - DWORD dummy1; /*02*/ - CHAR szName[1]; /*06*/ /* terminated by 0x00 0x00 */ - } htmlhelp; - struct tagPIDLCPanelStruct cpanel; - }u; -} PIDLDATA, *LPPIDLDATA; -#include "poppack.h" - -/* - * getting special values from simple pidls - */ -DWORD _ILSimpleGetText (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize); -DWORD _ILSimpleGetTextW (LPCITEMIDLIST pidl, LPWSTR pOut, UINT uOutSize); -BOOL _ILGetFileDate (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize); -DWORD _ILGetFileSize (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize); -BOOL _ILGetExtension (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize); -void _ILGetFileType (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize); -DWORD _ILGetFileAttributes (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize); - -BOOL _ILGetFileDateTime (LPCITEMIDLIST pidl, FILETIME *ft); -DWORD _ILGetDrive (LPCITEMIDLIST, LPSTR, UINT); - -/* - * testing simple pidls - */ -BOOL _ILIsDesktop (LPCITEMIDLIST pidl); -BOOL _ILIsMyComputer (LPCITEMIDLIST pidl); -BOOL _ILIsDrive (LPCITEMIDLIST pidl); -BOOL _ILIsFolder (LPCITEMIDLIST pidl); -BOOL _ILIsValue (LPCITEMIDLIST pidl); -BOOL _ILIsSpecialFolder (LPCITEMIDLIST pidl); -BOOL _ILIsPidlSimple (LPCITEMIDLIST pidl); -BOOL _ILIsCPanelStruct (LPCITEMIDLIST pidl); - -/* - * simple pidls - */ - -/* Basic PIDL constructor. Allocates size + 5 bytes, where: - * - two bytes are SHITEMID.cb - * - one byte is PIDLDATA.type - * - two bytes are the NULL PIDL terminator - * Sets type of the returned PIDL to type. - */ -LPITEMIDLIST _ILAlloc(PIDLTYPE type, size_t size); - -/* Creates a PIDL with guid format and type type, which must be one of PT_GUID, - * PT_SHELLEXT, or PT_YAGUID. - */ -LPITEMIDLIST _ILCreateGuid(PIDLTYPE type, REFIID guid); - -/* Like _ILCreateGuid, but using the string szGUID. */ -LPITEMIDLIST _ILCreateGuidFromStrA(LPCSTR szGUID); - -/* Commonly used PIDLs representing file system objects. */ -LPITEMIDLIST _ILCreateDesktop (void); -LPITEMIDLIST _ILCreateFromFindDataA(WIN32_FIND_DATAA *stffile); -HRESULT _ILCreateFromPathA (LPCSTR szPath, LPITEMIDLIST* ppidl); - -/* Other helpers */ -LPITEMIDLIST _ILCreateMyComputer (void); -LPITEMIDLIST _ILCreateIExplore (void); -LPITEMIDLIST _ILCreateControlPanel (void); -LPITEMIDLIST _ILCreatePrinters (void); -LPITEMIDLIST _ILCreateNetwork (void); -LPITEMIDLIST _ILCreateBitBucket (void); -LPITEMIDLIST _ILCreateDrive (LPCWSTR); - -/* - * helper functions (getting struct-pointer) - */ -LPPIDLDATA _ILGetDataPointer (LPCITEMIDLIST); -LPSTR _ILGetTextPointer (LPCITEMIDLIST); -LPSTR _ILGetSTextPointer (LPCITEMIDLIST); -IID *_ILGetGUIDPointer (LPCITEMIDLIST pidl); - -/* - * debug helper - */ -void pdump (LPCITEMIDLIST pidl); -BOOL pcheck (LPCITEMIDLIST pidl); - -/* - * aPidl helper - */ -void _ILFreeaPidl(LPITEMIDLIST * apidl, UINT cidl); -LPITEMIDLIST * _ILCopyaPidl(LPCITEMIDLIST * apidlsrc, UINT cidl); -LPITEMIDLIST * _ILCopyCidaToaPidl(LPITEMIDLIST* pidl, LPIDA cida); - -BOOL WINAPI ILGetDisplayNameExA(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, LPSTR path, DWORD type); -BOOL WINAPI ILGetDisplayNameExW(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, LPWSTR path, DWORD type); - -HRESULT SHELL_GetPathFromIDListA(LPCITEMIDLIST pidl, LPSTR pszPath, UINT uOutSize); -HRESULT SHELL_GetPathFromIDListW(LPCITEMIDLIST pidl, LPWSTR pszPath, UINT uOutSize); - -#endif +/* + * internal pidl functions + * + * Copyright 1998 Juergen Schmied + * Copyright 2004 Juan Lang + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * NOTES: + * + * DO NOT use this definitions outside the shell32.dll ! + * + * The contents of a pidl should never used from a application + * directly. + * + * Undocumented: + * MS says: the abID of SHITEMID should be treated as binary data and not + * be interpreted by applications. Applies to everyone but MS itself. + * Word95 interprets the contents of abID (Filesize/Date) so we have to go + * for binary compatibility here. + */ + +#ifndef __WINE_PIDL_H +#define __WINE_PIDL_H + +#include + +#include "windef.h" +#include "winbase.h" +#include "winuser.h" +#include "shlobj.h" + +/* +* the pidl does cache fileattributes to speed up SHGetAttributes when +* displaying a big number of files. +* +* a pidl of NULL means the desktop +* +* The structure of the pidl seems to be a union. The first byte of the +* PIDLDATA desribes the type of pidl. +* +* object ! first byte / ! format ! living space +* ! size +* ---------------------------------------------------------------- +* my computer 0x1F/20 guid (2) (usual) +* network 0x1F guid +* bitbucket 0x1F guid +* drive 0x23/25 drive (usual) +* drive 0x25/25 drive (lnk/persistent) +* drive 0x29/25 drive +* shell extension 0x2E guid +* drive 0x2F drive (lnk/persistent) +* folder/file 0x30 folder/file (1) (lnk/persistent) +* folder 0x31 folder (usual) +* valueA 0x32 file (ANSI file name) +* valueW 0x34 file (Unicode file name) +* workgroup 0x41 network (3) +* computer 0x42 network (4) +* net provider 0x46 network +* whole network 0x47 network (5) +* MSITStore 0x61 htmlhlp (7) +* printers/ras connections 0x70 guid +* history/favorites 0xb1 file +* share 0xc3 network (6) +* +* guess: the persistent elements are non tracking +* +* (1) dummy byte is used, attributes are empty +* (2) IID_MyComputer = 20D04FE0L-3AEA-1069-A2D8-08002B30309D +* (3) two strings "workgroup" "Microsoft Network" +* (4) two strings "\\sirius" "Microsoft Network" +* (5) one string "Entire Network" +* (6) two strings "\\sirius\c" "Microsoft Network" +* (7) contains string "mk:@MSITStore:C:\path\file.chm::/path/filename.htm" +* GUID 871C5380-42A0-1069-A2EA-08002B30309D +*/ + +#define PT_CPLAPPLET 0x00 +#define PT_GUID 0x1F +#define PT_DRIVE 0x23 +#define PT_DRIVE2 0x25 +#define PT_DRIVE3 0x29 +#define PT_SHELLEXT 0x2E +#define PT_DRIVE1 0x2F +#define PT_FOLDER1 0x30 +#define PT_FOLDER 0x31 +#define PT_VALUE 0x32 +#define PT_WORKGRP 0x41 +#define PT_COMP 0x42 +#define PT_NETPROVIDER 0x46 +#define PT_NETWORK 0x47 +#define PT_IESPECIAL1 0x61 +#define PT_YAGUID 0x70 /* yet another guid.. */ +#define PT_IESPECIAL2 0xb1 +#define PT_SHARE 0xc3 + +#include "pshpack1.h" +typedef BYTE PIDLTYPE; + +typedef struct tagPIDLCPanelStruct +{ + BYTE dummy; /*01 is 0x00 */ + DWORD iconIdx; /*02 negative icon ID */ + WORD offsDispName; /*06*/ + WORD offsComment; /*08*/ + CHAR szName[1]; /*10*/ /* terminated by 0x00, followed by display name and comment string */ +} PIDLCPanelStruct; + +typedef struct tagGUIDStruct +{ + BYTE dummy; /* offset 01 is unknown */ + GUID guid; /* offset 02 */ +} GUIDStruct; + +typedef struct tagDriveStruct +{ + CHAR szDriveName[20]; /*01*/ + WORD unknown; /*21*/ +} DriveStruct; + +typedef struct tagFileStruct +{ + BYTE dummy; /*01 is 0x00 for files or dirs */ + DWORD dwFileSize; /*02*/ + WORD uFileDate; /*06*/ + WORD uFileTime; /*08*/ + WORD uFileAttribs; /*10*/ + CHAR szNames[1]; /*12*/ + /* Here are coming two strings. The first is the long name. + The second the dos name when needed or just 0x00 */ +} FileStruct; + +typedef struct tagPIDLDATA +{ PIDLTYPE type; /*00*/ + union + { + struct tagGUIDStruct guid; + struct tagDriveStruct drive; + struct tagFileStruct file; + struct + { WORD dummy; /*01*/ + CHAR szNames[1]; /*03*/ + } network; + struct + { WORD dummy; /*01*/ + DWORD dummy1; /*02*/ + CHAR szName[1]; /*06*/ /* terminated by 0x00 0x00 */ + } htmlhelp; + struct tagPIDLCPanelStruct cpanel; + }u; +} PIDLDATA, *LPPIDLDATA; +#include "poppack.h" + +/* + * getting special values from simple pidls + */ +DWORD _ILSimpleGetText (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize); +DWORD _ILSimpleGetTextW (LPCITEMIDLIST pidl, LPWSTR pOut, UINT uOutSize); +BOOL _ILGetFileDate (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize); +DWORD _ILGetFileSize (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize); +BOOL _ILGetExtension (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize); +void _ILGetFileType (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize); +DWORD _ILGetFileAttributes (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize); + +BOOL _ILGetFileDateTime (LPCITEMIDLIST pidl, FILETIME *ft); +DWORD _ILGetDrive (LPCITEMIDLIST, LPSTR, UINT); + +/* + * testing simple pidls + */ +BOOL _ILIsDesktop (LPCITEMIDLIST pidl); +BOOL _ILIsMyComputer (LPCITEMIDLIST pidl); +BOOL _ILIsDrive (LPCITEMIDLIST pidl); +BOOL _ILIsFolder (LPCITEMIDLIST pidl); +BOOL _ILIsValue (LPCITEMIDLIST pidl); +BOOL _ILIsSpecialFolder (LPCITEMIDLIST pidl); +BOOL _ILIsPidlSimple (LPCITEMIDLIST pidl); +BOOL _ILIsCPanelStruct (LPCITEMIDLIST pidl); + +/* + * simple pidls + */ + +/* Basic PIDL constructor. Allocates size + 5 bytes, where: + * - two bytes are SHITEMID.cb + * - one byte is PIDLDATA.type + * - two bytes are the NULL PIDL terminator + * Sets type of the returned PIDL to type. + */ +LPITEMIDLIST _ILAlloc(PIDLTYPE type, size_t size); + +/* Creates a PIDL with guid format and type type, which must be one of PT_GUID, + * PT_SHELLEXT, or PT_YAGUID. + */ +LPITEMIDLIST _ILCreateGuid(PIDLTYPE type, REFIID guid); + +/* Like _ILCreateGuid, but using the string szGUID. */ +LPITEMIDLIST _ILCreateGuidFromStrA(LPCSTR szGUID); + +/* Commonly used PIDLs representing file system objects. */ +LPITEMIDLIST _ILCreateDesktop (void); +LPITEMIDLIST _ILCreateFromFindDataA(WIN32_FIND_DATAA *stffile); +HRESULT _ILCreateFromPathA (LPCSTR szPath, LPITEMIDLIST* ppidl); + +/* Other helpers */ +LPITEMIDLIST _ILCreateMyComputer (void); +LPITEMIDLIST _ILCreateIExplore (void); +LPITEMIDLIST _ILCreateControlPanel (void); +LPITEMIDLIST _ILCreatePrinters (void); +LPITEMIDLIST _ILCreateNetwork (void); +LPITEMIDLIST _ILCreateBitBucket (void); +LPITEMIDLIST _ILCreateDrive (LPCWSTR); + +/* + * helper functions (getting struct-pointer) + */ +LPPIDLDATA _ILGetDataPointer (LPCITEMIDLIST); +LPSTR _ILGetTextPointer (LPCITEMIDLIST); +LPSTR _ILGetSTextPointer (LPCITEMIDLIST); +IID *_ILGetGUIDPointer (LPCITEMIDLIST pidl); + +/* + * debug helper + */ +void pdump (LPCITEMIDLIST pidl); +BOOL pcheck (LPCITEMIDLIST pidl); + +/* + * aPidl helper + */ +void _ILFreeaPidl(LPITEMIDLIST * apidl, UINT cidl); +LPITEMIDLIST * _ILCopyaPidl(LPCITEMIDLIST * apidlsrc, UINT cidl); +LPITEMIDLIST * _ILCopyCidaToaPidl(LPITEMIDLIST* pidl, LPIDA cida); + +BOOL WINAPI ILGetDisplayNameExA(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, LPSTR path, DWORD type); +BOOL WINAPI ILGetDisplayNameExW(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, LPWSTR path, DWORD type); + +HRESULT SHELL_GetPathFromIDListA(LPCITEMIDLIST pidl, LPSTR pszPath, UINT uOutSize); +HRESULT SHELL_GetPathFromIDListW(LPCITEMIDLIST pidl, LPWSTR pszPath, UINT uOutSize); + +#endif diff --git a/reactos/lib/shell32/regsvr.c b/reactos/lib/shell32/regsvr.c index 78ee19b315f..accf46e5c87 100644 --- a/reactos/lib/shell32/regsvr.c +++ b/reactos/lib/shell32/regsvr.c @@ -1,540 +1,540 @@ -/* - * self-registerable dll functions for shell32.dll -* - * Copyright (C) 2003 John K. Hohm - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include -#include - -#include "windef.h" -#include "winbase.h" -#include "winuser.h" -#include "winreg.h" -#include "winerror.h" - -#include "ole2.h" -#include "shlguid.h" -#include "shell32_main.h" - -#include "wine/debug.h" - -WINE_DEFAULT_DEBUG_CHANNEL(ole); - -/* - * Near the bottom of this file are the exported DllRegisterServer and - * DllUnregisterServer, which make all this worthwhile. - */ - -/*********************************************************************** - * interface for self-registering - */ -struct regsvr_interface -{ - IID const *iid; /* NULL for end of list */ - LPCSTR name; /* can be NULL to omit */ - IID const *base_iid; /* can be NULL to omit */ - int num_methods; /* can be <0 to omit */ - CLSID const *ps_clsid; /* can be NULL to omit */ - CLSID const *ps_clsid32; /* can be NULL to omit */ -}; - -static HRESULT register_interfaces(struct regsvr_interface const *list); -static HRESULT unregister_interfaces(struct regsvr_interface const *list); - -struct regsvr_coclass -{ - CLSID const *clsid; /* NULL for end of list */ - LPCSTR name; /* can be NULL to omit */ - LPCSTR ips; /* can be NULL to omit */ - LPCSTR ips32; /* can be NULL to omit */ - LPCSTR ips32_tmodel; /* can be NULL to omit */ - DWORD flags; - LPCSTR clsid_str; /* can be NULL to omit */ - LPCSTR progid; /* can be NULL to omit */ -}; - -/* flags for regsvr_coclass.flags */ -#define SHELLEX_MAYCHANGEDEFAULTMENU 0x00000001 - -static HRESULT register_coclasses(struct regsvr_coclass const *list); -static HRESULT unregister_coclasses(struct regsvr_coclass const *list); - -/*********************************************************************** - * static string constants - */ -static WCHAR const interface_keyname[10] = { - 'I', 'n', 't', 'e', 'r', 'f', 'a', 'c', 'e', 0 }; -static WCHAR const base_ifa_keyname[14] = { - 'B', 'a', 's', 'e', 'I', 'n', 't', 'e', 'r', 'f', 'a', 'c', - 'e', 0 }; -static WCHAR const num_methods_keyname[11] = { - 'N', 'u', 'm', 'M', 'e', 't', 'h', 'o', 'd', 's', 0 }; -static WCHAR const ps_clsid_keyname[15] = { - 'P', 'r', 'o', 'x', 'y', 'S', 't', 'u', 'b', 'C', 'l', 's', - 'i', 'd', 0 }; -static WCHAR const ps_clsid32_keyname[17] = { - 'P', 'r', 'o', 'x', 'y', 'S', 't', 'u', 'b', 'C', 'l', 's', - 'i', 'd', '3', '2', 0 }; -static WCHAR const clsid_keyname[6] = { - 'C', 'L', 'S', 'I', 'D', 0 }; -static WCHAR const ips_keyname[13] = { - 'I', 'n', 'P', 'r', 'o', 'c', 'S', 'e', 'r', 'v', 'e', 'r', - 0 }; -static WCHAR const ips32_keyname[15] = { - 'I', 'n', 'P', 'r', 'o', 'c', 'S', 'e', 'r', 'v', 'e', 'r', - '3', '2', 0 }; -static WCHAR const progid_keyname[7] = { - 'P', 'r', 'o', 'g', 'I', 'D', 0 }; -static WCHAR const shellex_keyname[8] = { - 's', 'h', 'e', 'l', 'l', 'e', 'x', 0 }; -static WCHAR const mcdm_keyname[21] = { - 'M', 'a', 'y', 'C', 'h', 'a', 'n', 'g', 'e', 'D', 'e', 'f', - 'a', 'u', 'l', 't', 'M', 'e', 'n', 'u', 0 }; -static char const tmodel_valuename[] = "ThreadingModel"; - -/*********************************************************************** - * static helper functions - */ -static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid); -static LONG register_key_defvalueW(HKEY base, WCHAR const *name, - WCHAR const *value); -static LONG register_key_defvalueA(HKEY base, WCHAR const *name, - char const *value); -static LONG recursive_delete_key(HKEY key); -static LONG recursive_delete_keyA(HKEY base, char const *name); -static LONG recursive_delete_keyW(HKEY base, WCHAR const *name); - -/*********************************************************************** - * register_interfaces - */ -static HRESULT register_interfaces(struct regsvr_interface const *list) -{ - LONG res = ERROR_SUCCESS; - HKEY interface_key; - - res = RegCreateKeyExW(HKEY_CLASSES_ROOT, interface_keyname, 0, NULL, 0, - KEY_READ | KEY_WRITE, NULL, &interface_key, NULL); - if (res != ERROR_SUCCESS) goto error_return; - - for (; res == ERROR_SUCCESS && list->iid; ++list) { - WCHAR buf[39]; - HKEY iid_key; - - StringFromGUID2(list->iid, buf, 39); - res = RegCreateKeyExW(interface_key, buf, 0, NULL, 0, - KEY_READ | KEY_WRITE, NULL, &iid_key, NULL); - if (res != ERROR_SUCCESS) goto error_close_interface_key; - - if (list->name) { - res = RegSetValueExA(iid_key, NULL, 0, REG_SZ, - (CONST BYTE*)(list->name), - strlen(list->name) + 1); - if (res != ERROR_SUCCESS) goto error_close_iid_key; - } - - if (list->base_iid) { - register_key_guid(iid_key, base_ifa_keyname, list->base_iid); - if (res != ERROR_SUCCESS) goto error_close_iid_key; - } - - if (0 <= list->num_methods) { - static WCHAR const fmt[3] = { '%', 'd', 0 }; - HKEY key; - - res = RegCreateKeyExW(iid_key, num_methods_keyname, 0, NULL, 0, - KEY_READ | KEY_WRITE, NULL, &key, NULL); - if (res != ERROR_SUCCESS) goto error_close_iid_key; - - wsprintfW(buf, fmt, list->num_methods); - res = RegSetValueExW(key, NULL, 0, REG_SZ, - (CONST BYTE*)buf, - (lstrlenW(buf) + 1) * sizeof(WCHAR)); - RegCloseKey(key); - - if (res != ERROR_SUCCESS) goto error_close_iid_key; - } - - if (list->ps_clsid) { - register_key_guid(iid_key, ps_clsid_keyname, list->ps_clsid); - if (res != ERROR_SUCCESS) goto error_close_iid_key; - } - - if (list->ps_clsid32) { - register_key_guid(iid_key, ps_clsid32_keyname, list->ps_clsid32); - if (res != ERROR_SUCCESS) goto error_close_iid_key; - } - - error_close_iid_key: - RegCloseKey(iid_key); - } - -error_close_interface_key: - RegCloseKey(interface_key); -error_return: - return res != ERROR_SUCCESS ? HRESULT_FROM_WIN32(res) : S_OK; -} - -/*********************************************************************** - * unregister_interfaces - */ -static HRESULT unregister_interfaces(struct regsvr_interface const *list) -{ - LONG res = ERROR_SUCCESS; - HKEY interface_key; - - res = RegOpenKeyExW(HKEY_CLASSES_ROOT, interface_keyname, 0, - KEY_READ | KEY_WRITE, &interface_key); - if (res == ERROR_FILE_NOT_FOUND) return S_OK; - if (res != ERROR_SUCCESS) goto error_return; - - for (; res == ERROR_SUCCESS && list->iid; ++list) { - WCHAR buf[39]; - - StringFromGUID2(list->iid, buf, 39); - res = recursive_delete_keyW(interface_key, buf); - } - - RegCloseKey(interface_key); -error_return: - return res != ERROR_SUCCESS ? HRESULT_FROM_WIN32(res) : S_OK; -} - -/*********************************************************************** - * register_coclasses - */ -static HRESULT register_coclasses(struct regsvr_coclass const *list) -{ - LONG res = ERROR_SUCCESS; - HKEY coclass_key; - - res = RegCreateKeyExW(HKEY_CLASSES_ROOT, clsid_keyname, 0, NULL, 0, - KEY_READ | KEY_WRITE, NULL, &coclass_key, NULL); - if (res != ERROR_SUCCESS) goto error_return; - - for (; res == ERROR_SUCCESS && list->clsid; ++list) { - WCHAR buf[39]; - HKEY clsid_key; - - StringFromGUID2(list->clsid, buf, 39); - res = RegCreateKeyExW(coclass_key, buf, 0, NULL, 0, - KEY_READ | KEY_WRITE, NULL, &clsid_key, NULL); - if (res != ERROR_SUCCESS) goto error_close_coclass_key; - - if (list->name) { - res = RegSetValueExA(clsid_key, NULL, 0, REG_SZ, - (CONST BYTE*)(list->name), - strlen(list->name) + 1); - if (res != ERROR_SUCCESS) goto error_close_clsid_key; - } - - if (list->ips) { - res = register_key_defvalueA(clsid_key, ips_keyname, list->ips); - if (res != ERROR_SUCCESS) goto error_close_clsid_key; - } - - if (list->ips32) { - HKEY ips32_key; - - res = RegCreateKeyExW(clsid_key, ips32_keyname, 0, NULL, 0, - KEY_READ | KEY_WRITE, NULL, - &ips32_key, NULL); - if (res != ERROR_SUCCESS) goto error_close_clsid_key; - - res = RegSetValueExA(ips32_key, NULL, 0, REG_SZ, - (CONST BYTE*)list->ips32, - lstrlenA(list->ips32) + 1); - if (res == ERROR_SUCCESS && list->ips32_tmodel) - res = RegSetValueExA(ips32_key, tmodel_valuename, 0, REG_SZ, - (CONST BYTE*)list->ips32_tmodel, - strlen(list->ips32_tmodel) + 1); - RegCloseKey(ips32_key); - if (res != ERROR_SUCCESS) goto error_close_clsid_key; - } - - if (list->flags & SHELLEX_MAYCHANGEDEFAULTMENU) { - HKEY shellex_key, mcdm_key; - - res = RegCreateKeyExW(clsid_key, shellex_keyname, 0, NULL, 0, - KEY_READ | KEY_WRITE, NULL, - &shellex_key, NULL); - if (res != ERROR_SUCCESS) goto error_close_clsid_key; - res = RegCreateKeyExW(shellex_key, mcdm_keyname, 0, NULL, 0, - KEY_READ | KEY_WRITE, NULL, - &mcdm_key, NULL); - RegCloseKey(shellex_key); - if (res != ERROR_SUCCESS) goto error_close_clsid_key; - RegCloseKey(mcdm_key); - } - - if (list->clsid_str) { - res = register_key_defvalueA(clsid_key, clsid_keyname, - list->clsid_str); - if (res != ERROR_SUCCESS) goto error_close_clsid_key; - } - - if (list->progid) { - HKEY progid_key; - - res = register_key_defvalueA(clsid_key, progid_keyname, - list->progid); - if (res != ERROR_SUCCESS) goto error_close_clsid_key; - - res = RegCreateKeyExA(HKEY_CLASSES_ROOT, list->progid, 0, - NULL, 0, KEY_READ | KEY_WRITE, NULL, - &progid_key, NULL); - if (res != ERROR_SUCCESS) goto error_close_clsid_key; - - res = register_key_defvalueW(progid_key, clsid_keyname, buf); - RegCloseKey(progid_key); - if (res != ERROR_SUCCESS) goto error_close_clsid_key; - } - - error_close_clsid_key: - RegCloseKey(clsid_key); - } - -error_close_coclass_key: - RegCloseKey(coclass_key); -error_return: - return res != ERROR_SUCCESS ? HRESULT_FROM_WIN32(res) : S_OK; -} - -/*********************************************************************** - * unregister_coclasses - */ -static HRESULT unregister_coclasses(struct regsvr_coclass const *list) -{ - LONG res = ERROR_SUCCESS; - HKEY coclass_key; - - res = RegOpenKeyExW(HKEY_CLASSES_ROOT, clsid_keyname, 0, - KEY_READ | KEY_WRITE, &coclass_key); - if (res == ERROR_FILE_NOT_FOUND) return S_OK; - if (res != ERROR_SUCCESS) goto error_return; - - for (; res == ERROR_SUCCESS && list->clsid; ++list) { - WCHAR buf[39]; - - StringFromGUID2(list->clsid, buf, 39); - res = recursive_delete_keyW(coclass_key, buf); - if (res != ERROR_SUCCESS) goto error_close_coclass_key; - - if (list->progid) { - res = recursive_delete_keyA(HKEY_CLASSES_ROOT, list->progid); - if (res != ERROR_SUCCESS) goto error_close_coclass_key; - } - } - -error_close_coclass_key: - RegCloseKey(coclass_key); -error_return: - return res != ERROR_SUCCESS ? HRESULT_FROM_WIN32(res) : S_OK; -} - -/*********************************************************************** - * regsvr_key_guid - */ -static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid) -{ - WCHAR buf[39]; - - StringFromGUID2(guid, buf, 39); - return register_key_defvalueW(base, name, buf); -} - -/*********************************************************************** - * regsvr_key_defvalueW - */ -static LONG register_key_defvalueW( - HKEY base, - WCHAR const *name, - WCHAR const *value) -{ - LONG res; - HKEY key; - - res = RegCreateKeyExW(base, name, 0, NULL, 0, - KEY_READ | KEY_WRITE, NULL, &key, NULL); - if (res != ERROR_SUCCESS) return res; - res = RegSetValueExW(key, NULL, 0, REG_SZ, (CONST BYTE*)value, - (lstrlenW(value) + 1) * sizeof(WCHAR)); - RegCloseKey(key); - return res; -} - -/*********************************************************************** - * regsvr_key_defvalueA - */ -static LONG register_key_defvalueA( - HKEY base, - WCHAR const *name, - char const *value) -{ - LONG res; - HKEY key; - - res = RegCreateKeyExW(base, name, 0, NULL, 0, - KEY_READ | KEY_WRITE, NULL, &key, NULL); - if (res != ERROR_SUCCESS) return res; - res = RegSetValueExA(key, NULL, 0, REG_SZ, (CONST BYTE*)value, - lstrlenA(value) + 1); - RegCloseKey(key); - return res; -} - -/*********************************************************************** - * recursive_delete_key - */ -static LONG recursive_delete_key(HKEY key) -{ - LONG res; - WCHAR subkey_name[MAX_PATH]; - DWORD cName; - HKEY subkey; - - for (;;) { - cName = sizeof(subkey_name) / sizeof(WCHAR); - res = RegEnumKeyExW(key, 0, subkey_name, &cName, - NULL, NULL, NULL, NULL); - if (res != ERROR_SUCCESS && res != ERROR_MORE_DATA) { - res = ERROR_SUCCESS; /* presumably we're done enumerating */ - break; - } - res = RegOpenKeyExW(key, subkey_name, 0, - KEY_READ | KEY_WRITE, &subkey); - if (res == ERROR_FILE_NOT_FOUND) continue; - if (res != ERROR_SUCCESS) break; - - res = recursive_delete_key(subkey); - RegCloseKey(subkey); - if (res != ERROR_SUCCESS) break; - } - - if (res == ERROR_SUCCESS) res = RegDeleteKeyW(key, 0); - return res; -} - -/*********************************************************************** - * recursive_delete_keyA - */ -static LONG recursive_delete_keyA(HKEY base, char const *name) -{ - LONG res; - HKEY key; - - res = RegOpenKeyExA(base, name, 0, KEY_READ | KEY_WRITE, &key); - if (res == ERROR_FILE_NOT_FOUND) return ERROR_SUCCESS; - if (res != ERROR_SUCCESS) return res; - res = recursive_delete_key(key); - RegCloseKey(key); - return res; -} - -/*********************************************************************** - * recursive_delete_keyW - */ -static LONG recursive_delete_keyW(HKEY base, WCHAR const *name) -{ - LONG res; - HKEY key; - - res = RegOpenKeyExW(base, name, 0, KEY_READ | KEY_WRITE, &key); - if (res == ERROR_FILE_NOT_FOUND) return ERROR_SUCCESS; - if (res != ERROR_SUCCESS) return res; - res = recursive_delete_key(key); - RegCloseKey(key); - return res; -} - -/*********************************************************************** - * coclass list - */ -static GUID const CLSID_Desktop = { - 0x00021400, 0x0000, 0x0000, {0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46} }; - -static GUID const CLSID_Shortcut = { - 0x00021401, 0x0000, 0x0000, {0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46} }; - -static struct regsvr_coclass const coclass_list[] = { - { &CLSID_Desktop, - "Desktop", - NULL, - "shell32.dll", - "Apartment" - }, - { &CLSID_MyComputer, - "My Computer", - NULL, - "shell32.dll", - "Apartment" - }, - { &CLSID_Shortcut, - "Shortcut", - NULL, - "shell32.dll", - "Apartment", - SHELLEX_MAYCHANGEDEFAULTMENU - }, - { &CLSID_AutoComplete, - "AutoComplete", - NULL, - "shell32.dll", - "Apartment", - }, - { NULL } /* list terminator */ -}; - -/*********************************************************************** - * interface list - */ - -static struct regsvr_interface const interface_list[] = { - { NULL } /* list terminator */ -}; - -/*********************************************************************** - * DllRegisterServer (SHELL32.@) - */ -HRESULT WINAPI SHELL32_DllRegisterServer() -{ - HRESULT hr; - - TRACE("\n"); - - hr = register_coclasses(coclass_list); - if (SUCCEEDED(hr)) - hr = register_interfaces(interface_list); - if (SUCCEEDED(hr)) - hr = SHELL_RegisterShellFolders(); - return hr; -} - -/*********************************************************************** - * DllUnregisterServer (SHELL32.@) - */ -HRESULT WINAPI SHELL32_DllUnregisterServer() -{ - HRESULT hr; - - TRACE("\n"); - - hr = unregister_coclasses(coclass_list); - if (SUCCEEDED(hr)) - hr = unregister_interfaces(interface_list); - return hr; -} +/* + * self-registerable dll functions for shell32.dll +* + * Copyright (C) 2003 John K. Hohm + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include +#include + +#include "windef.h" +#include "winbase.h" +#include "winuser.h" +#include "winreg.h" +#include "winerror.h" + +#include "ole2.h" +#include "shlguid.h" +#include "shell32_main.h" + +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(ole); + +/* + * Near the bottom of this file are the exported DllRegisterServer and + * DllUnregisterServer, which make all this worthwhile. + */ + +/*********************************************************************** + * interface for self-registering + */ +struct regsvr_interface +{ + IID const *iid; /* NULL for end of list */ + LPCSTR name; /* can be NULL to omit */ + IID const *base_iid; /* can be NULL to omit */ + int num_methods; /* can be <0 to omit */ + CLSID const *ps_clsid; /* can be NULL to omit */ + CLSID const *ps_clsid32; /* can be NULL to omit */ +}; + +static HRESULT register_interfaces(struct regsvr_interface const *list); +static HRESULT unregister_interfaces(struct regsvr_interface const *list); + +struct regsvr_coclass +{ + CLSID const *clsid; /* NULL for end of list */ + LPCSTR name; /* can be NULL to omit */ + LPCSTR ips; /* can be NULL to omit */ + LPCSTR ips32; /* can be NULL to omit */ + LPCSTR ips32_tmodel; /* can be NULL to omit */ + DWORD flags; + LPCSTR clsid_str; /* can be NULL to omit */ + LPCSTR progid; /* can be NULL to omit */ +}; + +/* flags for regsvr_coclass.flags */ +#define SHELLEX_MAYCHANGEDEFAULTMENU 0x00000001 + +static HRESULT register_coclasses(struct regsvr_coclass const *list); +static HRESULT unregister_coclasses(struct regsvr_coclass const *list); + +/*********************************************************************** + * static string constants + */ +static WCHAR const interface_keyname[10] = { + 'I', 'n', 't', 'e', 'r', 'f', 'a', 'c', 'e', 0 }; +static WCHAR const base_ifa_keyname[14] = { + 'B', 'a', 's', 'e', 'I', 'n', 't', 'e', 'r', 'f', 'a', 'c', + 'e', 0 }; +static WCHAR const num_methods_keyname[11] = { + 'N', 'u', 'm', 'M', 'e', 't', 'h', 'o', 'd', 's', 0 }; +static WCHAR const ps_clsid_keyname[15] = { + 'P', 'r', 'o', 'x', 'y', 'S', 't', 'u', 'b', 'C', 'l', 's', + 'i', 'd', 0 }; +static WCHAR const ps_clsid32_keyname[17] = { + 'P', 'r', 'o', 'x', 'y', 'S', 't', 'u', 'b', 'C', 'l', 's', + 'i', 'd', '3', '2', 0 }; +static WCHAR const clsid_keyname[6] = { + 'C', 'L', 'S', 'I', 'D', 0 }; +static WCHAR const ips_keyname[13] = { + 'I', 'n', 'P', 'r', 'o', 'c', 'S', 'e', 'r', 'v', 'e', 'r', + 0 }; +static WCHAR const ips32_keyname[15] = { + 'I', 'n', 'P', 'r', 'o', 'c', 'S', 'e', 'r', 'v', 'e', 'r', + '3', '2', 0 }; +static WCHAR const progid_keyname[7] = { + 'P', 'r', 'o', 'g', 'I', 'D', 0 }; +static WCHAR const shellex_keyname[8] = { + 's', 'h', 'e', 'l', 'l', 'e', 'x', 0 }; +static WCHAR const mcdm_keyname[21] = { + 'M', 'a', 'y', 'C', 'h', 'a', 'n', 'g', 'e', 'D', 'e', 'f', + 'a', 'u', 'l', 't', 'M', 'e', 'n', 'u', 0 }; +static char const tmodel_valuename[] = "ThreadingModel"; + +/*********************************************************************** + * static helper functions + */ +static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid); +static LONG register_key_defvalueW(HKEY base, WCHAR const *name, + WCHAR const *value); +static LONG register_key_defvalueA(HKEY base, WCHAR const *name, + char const *value); +static LONG recursive_delete_key(HKEY key); +static LONG recursive_delete_keyA(HKEY base, char const *name); +static LONG recursive_delete_keyW(HKEY base, WCHAR const *name); + +/*********************************************************************** + * register_interfaces + */ +static HRESULT register_interfaces(struct regsvr_interface const *list) +{ + LONG res = ERROR_SUCCESS; + HKEY interface_key; + + res = RegCreateKeyExW(HKEY_CLASSES_ROOT, interface_keyname, 0, NULL, 0, + KEY_READ | KEY_WRITE, NULL, &interface_key, NULL); + if (res != ERROR_SUCCESS) goto error_return; + + for (; res == ERROR_SUCCESS && list->iid; ++list) { + WCHAR buf[39]; + HKEY iid_key; + + StringFromGUID2(list->iid, buf, 39); + res = RegCreateKeyExW(interface_key, buf, 0, NULL, 0, + KEY_READ | KEY_WRITE, NULL, &iid_key, NULL); + if (res != ERROR_SUCCESS) goto error_close_interface_key; + + if (list->name) { + res = RegSetValueExA(iid_key, NULL, 0, REG_SZ, + (CONST BYTE*)(list->name), + strlen(list->name) + 1); + if (res != ERROR_SUCCESS) goto error_close_iid_key; + } + + if (list->base_iid) { + register_key_guid(iid_key, base_ifa_keyname, list->base_iid); + if (res != ERROR_SUCCESS) goto error_close_iid_key; + } + + if (0 <= list->num_methods) { + static WCHAR const fmt[3] = { '%', 'd', 0 }; + HKEY key; + + res = RegCreateKeyExW(iid_key, num_methods_keyname, 0, NULL, 0, + KEY_READ | KEY_WRITE, NULL, &key, NULL); + if (res != ERROR_SUCCESS) goto error_close_iid_key; + + wsprintfW(buf, fmt, list->num_methods); + res = RegSetValueExW(key, NULL, 0, REG_SZ, + (CONST BYTE*)buf, + (lstrlenW(buf) + 1) * sizeof(WCHAR)); + RegCloseKey(key); + + if (res != ERROR_SUCCESS) goto error_close_iid_key; + } + + if (list->ps_clsid) { + register_key_guid(iid_key, ps_clsid_keyname, list->ps_clsid); + if (res != ERROR_SUCCESS) goto error_close_iid_key; + } + + if (list->ps_clsid32) { + register_key_guid(iid_key, ps_clsid32_keyname, list->ps_clsid32); + if (res != ERROR_SUCCESS) goto error_close_iid_key; + } + + error_close_iid_key: + RegCloseKey(iid_key); + } + +error_close_interface_key: + RegCloseKey(interface_key); +error_return: + return res != ERROR_SUCCESS ? HRESULT_FROM_WIN32(res) : S_OK; +} + +/*********************************************************************** + * unregister_interfaces + */ +static HRESULT unregister_interfaces(struct regsvr_interface const *list) +{ + LONG res = ERROR_SUCCESS; + HKEY interface_key; + + res = RegOpenKeyExW(HKEY_CLASSES_ROOT, interface_keyname, 0, + KEY_READ | KEY_WRITE, &interface_key); + if (res == ERROR_FILE_NOT_FOUND) return S_OK; + if (res != ERROR_SUCCESS) goto error_return; + + for (; res == ERROR_SUCCESS && list->iid; ++list) { + WCHAR buf[39]; + + StringFromGUID2(list->iid, buf, 39); + res = recursive_delete_keyW(interface_key, buf); + } + + RegCloseKey(interface_key); +error_return: + return res != ERROR_SUCCESS ? HRESULT_FROM_WIN32(res) : S_OK; +} + +/*********************************************************************** + * register_coclasses + */ +static HRESULT register_coclasses(struct regsvr_coclass const *list) +{ + LONG res = ERROR_SUCCESS; + HKEY coclass_key; + + res = RegCreateKeyExW(HKEY_CLASSES_ROOT, clsid_keyname, 0, NULL, 0, + KEY_READ | KEY_WRITE, NULL, &coclass_key, NULL); + if (res != ERROR_SUCCESS) goto error_return; + + for (; res == ERROR_SUCCESS && list->clsid; ++list) { + WCHAR buf[39]; + HKEY clsid_key; + + StringFromGUID2(list->clsid, buf, 39); + res = RegCreateKeyExW(coclass_key, buf, 0, NULL, 0, + KEY_READ | KEY_WRITE, NULL, &clsid_key, NULL); + if (res != ERROR_SUCCESS) goto error_close_coclass_key; + + if (list->name) { + res = RegSetValueExA(clsid_key, NULL, 0, REG_SZ, + (CONST BYTE*)(list->name), + strlen(list->name) + 1); + if (res != ERROR_SUCCESS) goto error_close_clsid_key; + } + + if (list->ips) { + res = register_key_defvalueA(clsid_key, ips_keyname, list->ips); + if (res != ERROR_SUCCESS) goto error_close_clsid_key; + } + + if (list->ips32) { + HKEY ips32_key; + + res = RegCreateKeyExW(clsid_key, ips32_keyname, 0, NULL, 0, + KEY_READ | KEY_WRITE, NULL, + &ips32_key, NULL); + if (res != ERROR_SUCCESS) goto error_close_clsid_key; + + res = RegSetValueExA(ips32_key, NULL, 0, REG_SZ, + (CONST BYTE*)list->ips32, + lstrlenA(list->ips32) + 1); + if (res == ERROR_SUCCESS && list->ips32_tmodel) + res = RegSetValueExA(ips32_key, tmodel_valuename, 0, REG_SZ, + (CONST BYTE*)list->ips32_tmodel, + strlen(list->ips32_tmodel) + 1); + RegCloseKey(ips32_key); + if (res != ERROR_SUCCESS) goto error_close_clsid_key; + } + + if (list->flags & SHELLEX_MAYCHANGEDEFAULTMENU) { + HKEY shellex_key, mcdm_key; + + res = RegCreateKeyExW(clsid_key, shellex_keyname, 0, NULL, 0, + KEY_READ | KEY_WRITE, NULL, + &shellex_key, NULL); + if (res != ERROR_SUCCESS) goto error_close_clsid_key; + res = RegCreateKeyExW(shellex_key, mcdm_keyname, 0, NULL, 0, + KEY_READ | KEY_WRITE, NULL, + &mcdm_key, NULL); + RegCloseKey(shellex_key); + if (res != ERROR_SUCCESS) goto error_close_clsid_key; + RegCloseKey(mcdm_key); + } + + if (list->clsid_str) { + res = register_key_defvalueA(clsid_key, clsid_keyname, + list->clsid_str); + if (res != ERROR_SUCCESS) goto error_close_clsid_key; + } + + if (list->progid) { + HKEY progid_key; + + res = register_key_defvalueA(clsid_key, progid_keyname, + list->progid); + if (res != ERROR_SUCCESS) goto error_close_clsid_key; + + res = RegCreateKeyExA(HKEY_CLASSES_ROOT, list->progid, 0, + NULL, 0, KEY_READ | KEY_WRITE, NULL, + &progid_key, NULL); + if (res != ERROR_SUCCESS) goto error_close_clsid_key; + + res = register_key_defvalueW(progid_key, clsid_keyname, buf); + RegCloseKey(progid_key); + if (res != ERROR_SUCCESS) goto error_close_clsid_key; + } + + error_close_clsid_key: + RegCloseKey(clsid_key); + } + +error_close_coclass_key: + RegCloseKey(coclass_key); +error_return: + return res != ERROR_SUCCESS ? HRESULT_FROM_WIN32(res) : S_OK; +} + +/*********************************************************************** + * unregister_coclasses + */ +static HRESULT unregister_coclasses(struct regsvr_coclass const *list) +{ + LONG res = ERROR_SUCCESS; + HKEY coclass_key; + + res = RegOpenKeyExW(HKEY_CLASSES_ROOT, clsid_keyname, 0, + KEY_READ | KEY_WRITE, &coclass_key); + if (res == ERROR_FILE_NOT_FOUND) return S_OK; + if (res != ERROR_SUCCESS) goto error_return; + + for (; res == ERROR_SUCCESS && list->clsid; ++list) { + WCHAR buf[39]; + + StringFromGUID2(list->clsid, buf, 39); + res = recursive_delete_keyW(coclass_key, buf); + if (res != ERROR_SUCCESS) goto error_close_coclass_key; + + if (list->progid) { + res = recursive_delete_keyA(HKEY_CLASSES_ROOT, list->progid); + if (res != ERROR_SUCCESS) goto error_close_coclass_key; + } + } + +error_close_coclass_key: + RegCloseKey(coclass_key); +error_return: + return res != ERROR_SUCCESS ? HRESULT_FROM_WIN32(res) : S_OK; +} + +/*********************************************************************** + * regsvr_key_guid + */ +static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid) +{ + WCHAR buf[39]; + + StringFromGUID2(guid, buf, 39); + return register_key_defvalueW(base, name, buf); +} + +/*********************************************************************** + * regsvr_key_defvalueW + */ +static LONG register_key_defvalueW( + HKEY base, + WCHAR const *name, + WCHAR const *value) +{ + LONG res; + HKEY key; + + res = RegCreateKeyExW(base, name, 0, NULL, 0, + KEY_READ | KEY_WRITE, NULL, &key, NULL); + if (res != ERROR_SUCCESS) return res; + res = RegSetValueExW(key, NULL, 0, REG_SZ, (CONST BYTE*)value, + (lstrlenW(value) + 1) * sizeof(WCHAR)); + RegCloseKey(key); + return res; +} + +/*********************************************************************** + * regsvr_key_defvalueA + */ +static LONG register_key_defvalueA( + HKEY base, + WCHAR const *name, + char const *value) +{ + LONG res; + HKEY key; + + res = RegCreateKeyExW(base, name, 0, NULL, 0, + KEY_READ | KEY_WRITE, NULL, &key, NULL); + if (res != ERROR_SUCCESS) return res; + res = RegSetValueExA(key, NULL, 0, REG_SZ, (CONST BYTE*)value, + lstrlenA(value) + 1); + RegCloseKey(key); + return res; +} + +/*********************************************************************** + * recursive_delete_key + */ +static LONG recursive_delete_key(HKEY key) +{ + LONG res; + WCHAR subkey_name[MAX_PATH]; + DWORD cName; + HKEY subkey; + + for (;;) { + cName = sizeof(subkey_name) / sizeof(WCHAR); + res = RegEnumKeyExW(key, 0, subkey_name, &cName, + NULL, NULL, NULL, NULL); + if (res != ERROR_SUCCESS && res != ERROR_MORE_DATA) { + res = ERROR_SUCCESS; /* presumably we're done enumerating */ + break; + } + res = RegOpenKeyExW(key, subkey_name, 0, + KEY_READ | KEY_WRITE, &subkey); + if (res == ERROR_FILE_NOT_FOUND) continue; + if (res != ERROR_SUCCESS) break; + + res = recursive_delete_key(subkey); + RegCloseKey(subkey); + if (res != ERROR_SUCCESS) break; + } + + if (res == ERROR_SUCCESS) res = RegDeleteKeyW(key, 0); + return res; +} + +/*********************************************************************** + * recursive_delete_keyA + */ +static LONG recursive_delete_keyA(HKEY base, char const *name) +{ + LONG res; + HKEY key; + + res = RegOpenKeyExA(base, name, 0, KEY_READ | KEY_WRITE, &key); + if (res == ERROR_FILE_NOT_FOUND) return ERROR_SUCCESS; + if (res != ERROR_SUCCESS) return res; + res = recursive_delete_key(key); + RegCloseKey(key); + return res; +} + +/*********************************************************************** + * recursive_delete_keyW + */ +static LONG recursive_delete_keyW(HKEY base, WCHAR const *name) +{ + LONG res; + HKEY key; + + res = RegOpenKeyExW(base, name, 0, KEY_READ | KEY_WRITE, &key); + if (res == ERROR_FILE_NOT_FOUND) return ERROR_SUCCESS; + if (res != ERROR_SUCCESS) return res; + res = recursive_delete_key(key); + RegCloseKey(key); + return res; +} + +/*********************************************************************** + * coclass list + */ +static GUID const CLSID_Desktop = { + 0x00021400, 0x0000, 0x0000, {0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46} }; + +static GUID const CLSID_Shortcut = { + 0x00021401, 0x0000, 0x0000, {0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46} }; + +static struct regsvr_coclass const coclass_list[] = { + { &CLSID_Desktop, + "Desktop", + NULL, + "shell32.dll", + "Apartment" + }, + { &CLSID_MyComputer, + "My Computer", + NULL, + "shell32.dll", + "Apartment" + }, + { &CLSID_Shortcut, + "Shortcut", + NULL, + "shell32.dll", + "Apartment", + SHELLEX_MAYCHANGEDEFAULTMENU + }, + { &CLSID_AutoComplete, + "AutoComplete", + NULL, + "shell32.dll", + "Apartment", + }, + { NULL } /* list terminator */ +}; + +/*********************************************************************** + * interface list + */ + +static struct regsvr_interface const interface_list[] = { + { NULL } /* list terminator */ +}; + +/*********************************************************************** + * DllRegisterServer (SHELL32.@) + */ +HRESULT WINAPI SHELL32_DllRegisterServer() +{ + HRESULT hr; + + TRACE("\n"); + + hr = register_coclasses(coclass_list); + if (SUCCEEDED(hr)) + hr = register_interfaces(interface_list); + if (SUCCEEDED(hr)) + hr = SHELL_RegisterShellFolders(); + return hr; +} + +/*********************************************************************** + * DllUnregisterServer (SHELL32.@) + */ +HRESULT WINAPI SHELL32_DllUnregisterServer() +{ + HRESULT hr; + + TRACE("\n"); + + hr = unregister_coclasses(coclass_list); + if (SUCCEEDED(hr)) + hr = unregister_interfaces(interface_list); + return hr; +} diff --git a/reactos/lib/shell32/ros-systray.c b/reactos/lib/shell32/ros-systray.c index 4bce51b1998..f8f418799b1 100644 --- a/reactos/lib/shell32/ros-systray.c +++ b/reactos/lib/shell32/ros-systray.c @@ -1,80 +1,80 @@ -/* - * Copyright 2004 Martin Fuchs - * - * Pass on icon notification messages to the systray implementation - * in the currently running shell. - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include -#include - -#include "windef.h" -#include "winbase.h" -#include "winuser.h" -#include "shellapi.h" - - - /* copy data structure for tray notifications */ -typedef struct TrayNotifyCDS_Dummy { - DWORD cookie; - DWORD notify_code; - DWORD nicon_data[1]; // placeholder for NOTIFYICONDATA structure -} TrayNotifyCDS_Dummy; - - /* The only difference between Shell_NotifyIconA and Shell_NotifyIconW is the call to SendMessageA/W. */ -static BOOL SHELL_NotifyIcon(DWORD dwMessage, void* pnid, HWND nid_hwnd, int nid_size, BOOL unicode) -{ - HWND hwnd; - COPYDATASTRUCT data; - - BOOL ret = FALSE; - int len = sizeof(TrayNotifyCDS_Dummy)-sizeof(DWORD)+nid_size; - - TrayNotifyCDS_Dummy* pnotify_data = (TrayNotifyCDS_Dummy*) alloca(len); - - pnotify_data->cookie = 1; - pnotify_data->notify_code = dwMessage; - memcpy(&pnotify_data->nicon_data, pnid, nid_size); - - data.dwData = 1; - data.cbData = len; - data.lpData = pnotify_data; - - for(hwnd=0; hwnd=FindWindowExW(0, hwnd, L"Shell_TrayWnd", NULL); ) - if ((unicode?SendMessageW:SendMessageA)(hwnd, WM_COPYDATA, (WPARAM)nid_hwnd, (LPARAM)&data)) - ret = TRUE; - - return ret; -} - - -/************************************************************************* - * Shell_NotifyIcon [SHELL32.296] - * Shell_NotifyIconA [SHELL32.297] - */ -BOOL WINAPI Shell_NotifyIconA(DWORD dwMessage, PNOTIFYICONDATAA pnid) -{ - return SHELL_NotifyIcon(dwMessage, pnid, pnid->hWnd, pnid->cbSize, FALSE); -} - -/************************************************************************* - * Shell_NotifyIconW [SHELL32.298] - */ -BOOL WINAPI Shell_NotifyIconW(DWORD dwMessage, PNOTIFYICONDATAW pnid) -{ - return SHELL_NotifyIcon(dwMessage, pnid, pnid->hWnd, pnid->cbSize, TRUE); -} +/* + * Copyright 2004 Martin Fuchs + * + * Pass on icon notification messages to the systray implementation + * in the currently running shell. + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include +#include + +#include "windef.h" +#include "winbase.h" +#include "winuser.h" +#include "shellapi.h" + + + /* copy data structure for tray notifications */ +typedef struct TrayNotifyCDS_Dummy { + DWORD cookie; + DWORD notify_code; + DWORD nicon_data[1]; // placeholder for NOTIFYICONDATA structure +} TrayNotifyCDS_Dummy; + + /* The only difference between Shell_NotifyIconA and Shell_NotifyIconW is the call to SendMessageA/W. */ +static BOOL SHELL_NotifyIcon(DWORD dwMessage, void* pnid, HWND nid_hwnd, int nid_size, BOOL unicode) +{ + HWND hwnd; + COPYDATASTRUCT data; + + BOOL ret = FALSE; + int len = sizeof(TrayNotifyCDS_Dummy)-sizeof(DWORD)+nid_size; + + TrayNotifyCDS_Dummy* pnotify_data = (TrayNotifyCDS_Dummy*) alloca(len); + + pnotify_data->cookie = 1; + pnotify_data->notify_code = dwMessage; + memcpy(&pnotify_data->nicon_data, pnid, nid_size); + + data.dwData = 1; + data.cbData = len; + data.lpData = pnotify_data; + + for(hwnd=0; hwnd=FindWindowExW(0, hwnd, L"Shell_TrayWnd", NULL); ) + if ((unicode?SendMessageW:SendMessageA)(hwnd, WM_COPYDATA, (WPARAM)nid_hwnd, (LPARAM)&data)) + ret = TRUE; + + return ret; +} + + +/************************************************************************* + * Shell_NotifyIcon [SHELL32.296] + * Shell_NotifyIconA [SHELL32.297] + */ +BOOL WINAPI Shell_NotifyIconA(DWORD dwMessage, PNOTIFYICONDATAA pnid) +{ + return SHELL_NotifyIcon(dwMessage, pnid, pnid->hWnd, pnid->cbSize, FALSE); +} + +/************************************************************************* + * Shell_NotifyIconW [SHELL32.298] + */ +BOOL WINAPI Shell_NotifyIconW(DWORD dwMessage, PNOTIFYICONDATAW pnid) +{ + return SHELL_NotifyIcon(dwMessage, pnid, pnid->hWnd, pnid->cbSize, TRUE); +} diff --git a/reactos/lib/shell32/shell.c b/reactos/lib/shell32/shell.c index ed2b07e7b96..b6307a7beea 100644 --- a/reactos/lib/shell32/shell.c +++ b/reactos/lib/shell32/shell.c @@ -1,659 +1,659 @@ -/* - * Shell Library Functions - * - * Copyright 1998 Marcus Meissner - * Copyright 2000 Juergen Schmied - * Copyright 2002 Eric Pouech - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include "config.h" -#include "wine/port.h" - -#include -#include -#include -#ifdef HAVE_UNISTD_H -# include -#endif -#include - -#include "windef.h" -#include "winbase.h" -#include "winerror.h" -#include "winreg.h" -#include "wownt32.h" -#include "dlgs.h" -#include "shellapi.h" -#include "winuser.h" -#include "wingdi.h" -#include "shlobj.h" -#include "shlwapi.h" -#include "ddeml.h" - -#include "wine/winbase16.h" -#include "wine/winuser16.h" -#include "shell32_main.h" - -#include "wine/debug.h" - -WINE_DEFAULT_DEBUG_CHANNEL(shell); -WINE_DECLARE_DEBUG_CHANNEL(exec); - - -typedef struct { /* structure for dropped files */ - WORD wSize; - POINT16 ptMousePos; - BOOL16 fInNonClientArea; - /* memory block with filenames follows */ -} DROPFILESTRUCT16, *LPDROPFILESTRUCT16; - -static const char* lpstrMsgWndCreated = "OTHERWINDOWCREATED"; -static const char* lpstrMsgWndDestroyed = "OTHERWINDOWDESTROYED"; -static const char* lpstrMsgShellActivate = "ACTIVATESHELLWINDOW"; - -static HWND SHELL_hWnd = 0; -static HHOOK SHELL_hHook = 0; -static UINT uMsgWndCreated = 0; -static UINT uMsgWndDestroyed = 0; -static UINT uMsgShellActivate = 0; -HINSTANCE16 SHELL_hInstance = 0; -HINSTANCE SHELL_hInstance32; -static int SHELL_Attach = 0; - -/*********************************************************************** - * DllEntryPoint [SHELL.101] - * - * Initialization code for shell.dll. Automatically loads the - * 32-bit shell32.dll to allow thunking up to 32-bit code. - * - * RETURNS - * Success: TRUE. Initialization completed successfully. - * Failure: FALSE. - */ -BOOL WINAPI SHELL_DllEntryPoint(DWORD Reason, HINSTANCE16 hInst, - WORD ds, WORD HeapSize, DWORD res1, WORD res2) -{ - TRACE("(%08lx, %04x, %04x, %04x, %08lx, %04x)\n", - Reason, hInst, ds, HeapSize, res1, res2); - - switch(Reason) - { - case DLL_PROCESS_ATTACH: - if (SHELL_Attach++) break; - SHELL_hInstance = hInst; - if(!SHELL_hInstance32) - { - if(!(SHELL_hInstance32 = LoadLibraryA("shell32.dll"))) - { - ERR("Could not load sibling shell32.dll\n"); - return FALSE; - } - } - break; - - case DLL_PROCESS_DETACH: - if(!--SHELL_Attach) - { - SHELL_hInstance = 0; - if(SHELL_hInstance32) - FreeLibrary(SHELL_hInstance32); - } - break; - } - return TRUE; -} - -/************************************************************************* - * DragAcceptFiles [SHELL.9] - */ -void WINAPI DragAcceptFiles16(HWND16 hWnd, BOOL16 b) -{ - DragAcceptFiles(HWND_32(hWnd), b); -} - -/************************************************************************* - * DragQueryFile [SHELL.11] - */ -UINT16 WINAPI DragQueryFile16( - HDROP16 hDrop, - WORD wFile, - LPSTR lpszFile, - WORD wLength) -{ - LPSTR lpDrop; - UINT i = 0; - LPDROPFILESTRUCT16 lpDropFileStruct = (LPDROPFILESTRUCT16) GlobalLock16(hDrop); - - TRACE("(%04x, %x, %p, %u)\n", hDrop,wFile,lpszFile,wLength); - - if(!lpDropFileStruct) goto end; - - lpDrop = (LPSTR) lpDropFileStruct + lpDropFileStruct->wSize; - - while (i++ < wFile) - { - while (*lpDrop++); /* skip filename */ - if (!*lpDrop) - { - i = (wFile == 0xFFFF) ? i : 0; - goto end; - } - } - - i = strlen(lpDrop); - i++; - if (!lpszFile ) goto end; /* needed buffer size */ - i = (wLength > i) ? i : wLength; - lstrcpynA (lpszFile, lpDrop, i); -end: - GlobalUnlock16(hDrop); - return i; -} - -/************************************************************************* - * DragFinish [SHELL.12] - */ -void WINAPI DragFinish16(HDROP16 h) -{ - TRACE("\n"); - GlobalFree16((HGLOBAL16)h); -} - - -/************************************************************************* - * DragQueryPoint [SHELL.13] - */ -BOOL16 WINAPI DragQueryPoint16(HDROP16 hDrop, POINT16 *p) -{ - LPDROPFILESTRUCT16 lpDropFileStruct; - BOOL16 bRet; - TRACE("\n"); - lpDropFileStruct = (LPDROPFILESTRUCT16) GlobalLock16(hDrop); - - memcpy(p,&lpDropFileStruct->ptMousePos,sizeof(POINT16)); - bRet = lpDropFileStruct->fInNonClientArea; - - GlobalUnlock16(hDrop); - return bRet; -} - -/************************************************************************* - * FindExecutable (SHELL.21) - */ -HINSTANCE16 WINAPI FindExecutable16( LPCSTR lpFile, LPCSTR lpDirectory, - LPSTR lpResult ) -{ return HINSTANCE_16(FindExecutableA( lpFile, lpDirectory, lpResult )); -} - -/************************************************************************* - * AboutDlgProc (SHELL.33) - */ -BOOL16 WINAPI AboutDlgProc16( HWND16 hWnd, UINT16 msg, WPARAM16 wParam, - LPARAM lParam ) -{ return (BOOL16)AboutDlgProc( HWND_32(hWnd), msg, wParam, lParam ); -} - - -/************************************************************************* - * ShellAbout (SHELL.22) - */ -BOOL16 WINAPI ShellAbout16( HWND16 hWnd, LPCSTR szApp, LPCSTR szOtherStuff, - HICON16 hIcon ) -{ return ShellAboutA( HWND_32(hWnd), szApp, szOtherStuff, HICON_32(hIcon) ); -} - -/************************************************************************* - * InternalExtractIcon [SHELL.39] - * - * This abortion is called directly by Progman - */ -HGLOBAL16 WINAPI InternalExtractIcon16(HINSTANCE16 hInstance, - LPCSTR lpszExeFileName, UINT16 nIconIndex, WORD n ) -{ - HGLOBAL16 hRet = 0; - HICON16 *RetPtr = NULL; - OFSTRUCT ofs; - - TRACE("(%04x,file %s,start %d,extract %d\n", - hInstance, lpszExeFileName, nIconIndex, n); - - if (!n) - return 0; - - hRet = GlobalAlloc16(GMEM_FIXED | GMEM_ZEROINIT, sizeof(*RetPtr) * n); - RetPtr = (HICON16*)GlobalLock16(hRet); - - if (nIconIndex == (UINT16)-1) /* get number of icons */ - { - RetPtr[0] = PrivateExtractIconsA(ofs.szPathName, 0, 0, 0, NULL, NULL, 0, LR_DEFAULTCOLOR); - } - else - { - UINT ret; - HICON *icons; - - icons = HeapAlloc(GetProcessHeap(), 0, n * sizeof(*icons)); - ret = PrivateExtractIconsA(ofs.szPathName, nIconIndex, - GetSystemMetrics(SM_CXICON), - GetSystemMetrics(SM_CYICON), - icons, NULL, n, LR_DEFAULTCOLOR); - if ((ret != 0xffffffff) && ret) - { - int i; - for (i = 0; i < n; i++) RetPtr[i] = HICON_16(icons[i]); - } - else - { - GlobalFree16(hRet); - hRet = 0; - } - HeapFree(GetProcessHeap(), 0, icons); - } - return hRet; -} - -/************************************************************************* - * ExtractIcon (SHELL.34) - */ -HICON16 WINAPI ExtractIcon16( HINSTANCE16 hInstance, LPCSTR lpszExeFileName, - UINT16 nIconIndex ) -{ TRACE("\n"); - return HICON_16(ExtractIconA(HINSTANCE_32(hInstance), lpszExeFileName, nIconIndex)); -} - -/************************************************************************* - * ExtractIconEx (SHELL.40) - */ -HICON16 WINAPI ExtractIconEx16( - LPCSTR lpszFile, INT16 nIconIndex, HICON16 *phiconLarge, - HICON16 *phiconSmall, UINT16 nIcons -) { - HICON *ilarge,*ismall; - UINT16 ret; - int i; - - if (phiconLarge) - ilarge = (HICON*)HeapAlloc(GetProcessHeap(),0,nIcons*sizeof(HICON)); - else - ilarge = NULL; - if (phiconSmall) - ismall = (HICON*)HeapAlloc(GetProcessHeap(),0,nIcons*sizeof(HICON)); - else - ismall = NULL; - ret = HICON_16(ExtractIconExA(lpszFile,nIconIndex,ilarge,ismall,nIcons)); - if (ilarge) { - for (i=0;i 1 ) /* found key */ - { - LPSTR lpKey; - *lpend = '\0'; - lpKey = SHELL_FindString(lpEnv, lpstr+1); - if( lpKey ) /* found key value */ - { - int l = strlen(lpKey); - - if( l > length - (lpbstr - lpBuffer) - 1 ) - { - WARN("-- Env subst aborted - string too short\n"); - *lpend = '%'; - break; - } - strcpy(lpbstr, lpKey); - lpbstr += l; - } - else break; - *lpend = '%'; - lpstr = lpend + 1; - } - else break; /* back off and whine */ - - continue; - } - - *lpbstr++ = *lpstr++; - } - - *lpbstr = '\0'; - if( lpstr - str == strlen(str) ) - { - strncpy(str, lpBuffer, length); - length = 1; - } - else - length = 0; - - TRACE("-- return %s\n", str); - - OemToCharA(str,str); - HeapFree( GetProcessHeap(), 0, lpBuffer); - - /* Return str length in the LOWORD - * and 1 in HIWORD if subst was successful. - */ - return (DWORD)MAKELONG(strlen(str), length); -} - -/************************************************************************* - * SHELL_HookProc - * - * 32-bit version of the system-wide WH_SHELL hook. - */ -static LRESULT WINAPI SHELL_HookProc(INT code, WPARAM wParam, LPARAM lParam) -{ - TRACE("%i, %x, %08lx\n", code, wParam, lParam ); - - if (SHELL_hWnd) - { - switch( code ) - { - case HSHELL_WINDOWCREATED: - PostMessageA( SHELL_hWnd, uMsgWndCreated, wParam, 0 ); - break; - case HSHELL_WINDOWDESTROYED: - PostMessageA( SHELL_hWnd, uMsgWndDestroyed, wParam, 0 ); - break; - case HSHELL_ACTIVATESHELLWINDOW: - PostMessageA( SHELL_hWnd, uMsgShellActivate, wParam, 0 ); - break; - } - } - return CallNextHookEx( SHELL_hHook, code, wParam, lParam ); -} - -/************************************************************************* - * ShellHookProc [SHELL.103] - * System-wide WH_SHELL hook. - */ -LRESULT WINAPI ShellHookProc16(INT16 code, WPARAM16 wParam, LPARAM lParam) -{ - return SHELL_HookProc( code, wParam, lParam ); -} - -/************************************************************************* - * RegisterShellHook [SHELL.102] - */ -BOOL WINAPI RegisterShellHook16(HWND16 hWnd, UINT16 uAction) -{ - TRACE("%04x [%u]\n", hWnd, uAction ); - - switch( uAction ) - { - case 2: /* register hWnd as a shell window */ - if( !SHELL_hHook ) - { - SHELL_hHook = SetWindowsHookExA( WH_SHELL, SHELL_HookProc, - GetModuleHandleA("shell32.dll"), 0 ); - if ( SHELL_hHook ) - { - uMsgWndCreated = RegisterWindowMessageA( lpstrMsgWndCreated ); - uMsgWndDestroyed = RegisterWindowMessageA( lpstrMsgWndDestroyed ); - uMsgShellActivate = RegisterWindowMessageA( lpstrMsgShellActivate ); - } - else - WARN("-- unable to install ShellHookProc()!\n"); - } - - if ( SHELL_hHook ) - return ((SHELL_hWnd = HWND_32(hWnd)) != 0); - break; - - default: - WARN("-- unknown code %i\n", uAction ); - SHELL_hWnd = 0; /* just in case */ - } - return FALSE; -} - - -/*********************************************************************** - * DriveType (SHELL.262) - */ -UINT16 WINAPI DriveType16( UINT16 drive ) -{ - UINT ret; - char path[] = "A:\\"; - path[0] += drive; - ret = GetDriveTypeA(path); - switch(ret) /* some values are not supported in Win16 */ - { - case DRIVE_CDROM: - ret = DRIVE_REMOTE; - break; - case DRIVE_NO_ROOT_DIR: - ret = DRIVE_UNKNOWN; - break; - } - return ret; -} - - -/* 0 and 1 are valid rootkeys in win16 shell.dll and are used by - * some programs. Do not remove those cases. -MM - */ -static inline void fix_win16_hkey( HKEY *hkey ) -{ - if (*hkey == 0 || *hkey == (HKEY)1) *hkey = HKEY_CLASSES_ROOT; -} - -/****************************************************************************** - * RegOpenKey [SHELL.1] - */ -DWORD WINAPI RegOpenKey16( HKEY hkey, LPCSTR name, PHKEY retkey ) -{ - fix_win16_hkey( &hkey ); - return RegOpenKeyA( hkey, name, retkey ); -} - -/****************************************************************************** - * RegCreateKey [SHELL.2] - */ -DWORD WINAPI RegCreateKey16( HKEY hkey, LPCSTR name, PHKEY retkey ) -{ - fix_win16_hkey( &hkey ); - return RegCreateKeyA( hkey, name, retkey ); -} - -/****************************************************************************** - * RegCloseKey [SHELL.3] - */ -DWORD WINAPI RegCloseKey16( HKEY hkey ) -{ - fix_win16_hkey( &hkey ); - return RegCloseKey( hkey ); -} - -/****************************************************************************** - * RegDeleteKey [SHELL.4] - */ -DWORD WINAPI RegDeleteKey16( HKEY hkey, LPCSTR name ) -{ - fix_win16_hkey( &hkey ); - return RegDeleteKeyA( hkey, name ); -} - -/****************************************************************************** - * RegSetValue [SHELL.5] - */ -DWORD WINAPI RegSetValue16( HKEY hkey, LPCSTR name, DWORD type, LPCSTR data, DWORD count ) -{ - fix_win16_hkey( &hkey ); - return RegSetValueA( hkey, name, type, data, count ); -} - -/****************************************************************************** - * RegQueryValue [SHELL.6] - * - * NOTES - * Is this HACK still applicable? - * - * HACK - * The 16bit RegQueryValue doesn't handle selectorblocks anyway, so we just - * mask out the high 16 bit. This (not so much incidently) hopefully fixes - * Aldus FH4) - */ -DWORD WINAPI RegQueryValue16( HKEY hkey, LPCSTR name, LPSTR data, LPDWORD count -) -{ - fix_win16_hkey( &hkey ); - if (count) *count &= 0xffff; - return RegQueryValueA( hkey, name, data, count ); -} - -/****************************************************************************** - * RegEnumKey [SHELL.7] - */ -DWORD WINAPI RegEnumKey16( HKEY hkey, DWORD index, LPSTR name, DWORD name_len ) -{ - fix_win16_hkey( &hkey ); - return RegEnumKeyA( hkey, index, name, name_len ); -} - -/************************************************************************* - * SHELL_Execute16 [Internal] - */ -static UINT SHELL_Execute16(const WCHAR *lpCmd, WCHAR *env, BOOL shWait, - LPSHELLEXECUTEINFOW psei, LPSHELLEXECUTEINFOW psei_out) -{ - UINT ret; - char sCmd[MAX_PATH]; - WideCharToMultiByte(CP_ACP, 0, lpCmd, -1, sCmd, MAX_PATH, NULL, NULL); - ret = WinExec16(sCmd, (UINT16)psei->nShow); - psei_out->hInstApp = HINSTANCE_32(ret); - return ret; -} - -/************************************************************************* - * ShellExecute [SHELL.20] - */ -HINSTANCE16 WINAPI ShellExecute16( HWND16 hWnd, LPCSTR lpOperation, - LPCSTR lpFile, LPCSTR lpParameters, - LPCSTR lpDirectory, INT16 iShowCmd ) -{ - SHELLEXECUTEINFOW seiW; - WCHAR *wVerb = NULL, *wFile = NULL, *wParameters = NULL, *wDirectory = NULL; - HANDLE hProcess = 0; - - seiW.lpVerb = lpOperation ? __SHCloneStrAtoW(&wVerb, lpOperation) : NULL; - seiW.lpFile = lpFile ? __SHCloneStrAtoW(&wFile, lpFile) : NULL; - seiW.lpParameters = lpParameters ? __SHCloneStrAtoW(&wParameters, lpParameters) : NULL; - seiW.lpDirectory = lpDirectory ? __SHCloneStrAtoW(&wDirectory, lpDirectory) : NULL; - - seiW.cbSize = sizeof(seiW); - seiW.fMask = 0; - seiW.hwnd = HWND_32(hWnd); - seiW.nShow = iShowCmd; - seiW.lpIDList = 0; - seiW.lpClass = 0; - seiW.hkeyClass = 0; - seiW.dwHotKey = 0; - seiW.hProcess = hProcess; - - ShellExecuteExW32 (&seiW, SHELL_Execute16); - - if (wVerb) SHFree(wVerb); - if (wFile) SHFree(wFile); - if (wParameters) SHFree(wParameters); - if (wDirectory) SHFree(wDirectory); - - return HINSTANCE_16(seiW.hInstApp); -} +/* + * Shell Library Functions + * + * Copyright 1998 Marcus Meissner + * Copyright 2000 Juergen Schmied + * Copyright 2002 Eric Pouech + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" +#include "wine/port.h" + +#include +#include +#include +#ifdef HAVE_UNISTD_H +# include +#endif +#include + +#include "windef.h" +#include "winbase.h" +#include "winerror.h" +#include "winreg.h" +#include "wownt32.h" +#include "dlgs.h" +#include "shellapi.h" +#include "winuser.h" +#include "wingdi.h" +#include "shlobj.h" +#include "shlwapi.h" +#include "ddeml.h" + +#include "wine/winbase16.h" +#include "wine/winuser16.h" +#include "shell32_main.h" + +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(shell); +WINE_DECLARE_DEBUG_CHANNEL(exec); + + +typedef struct { /* structure for dropped files */ + WORD wSize; + POINT16 ptMousePos; + BOOL16 fInNonClientArea; + /* memory block with filenames follows */ +} DROPFILESTRUCT16, *LPDROPFILESTRUCT16; + +static const char* lpstrMsgWndCreated = "OTHERWINDOWCREATED"; +static const char* lpstrMsgWndDestroyed = "OTHERWINDOWDESTROYED"; +static const char* lpstrMsgShellActivate = "ACTIVATESHELLWINDOW"; + +static HWND SHELL_hWnd = 0; +static HHOOK SHELL_hHook = 0; +static UINT uMsgWndCreated = 0; +static UINT uMsgWndDestroyed = 0; +static UINT uMsgShellActivate = 0; +HINSTANCE16 SHELL_hInstance = 0; +HINSTANCE SHELL_hInstance32; +static int SHELL_Attach = 0; + +/*********************************************************************** + * DllEntryPoint [SHELL.101] + * + * Initialization code for shell.dll. Automatically loads the + * 32-bit shell32.dll to allow thunking up to 32-bit code. + * + * RETURNS + * Success: TRUE. Initialization completed successfully. + * Failure: FALSE. + */ +BOOL WINAPI SHELL_DllEntryPoint(DWORD Reason, HINSTANCE16 hInst, + WORD ds, WORD HeapSize, DWORD res1, WORD res2) +{ + TRACE("(%08lx, %04x, %04x, %04x, %08lx, %04x)\n", + Reason, hInst, ds, HeapSize, res1, res2); + + switch(Reason) + { + case DLL_PROCESS_ATTACH: + if (SHELL_Attach++) break; + SHELL_hInstance = hInst; + if(!SHELL_hInstance32) + { + if(!(SHELL_hInstance32 = LoadLibraryA("shell32.dll"))) + { + ERR("Could not load sibling shell32.dll\n"); + return FALSE; + } + } + break; + + case DLL_PROCESS_DETACH: + if(!--SHELL_Attach) + { + SHELL_hInstance = 0; + if(SHELL_hInstance32) + FreeLibrary(SHELL_hInstance32); + } + break; + } + return TRUE; +} + +/************************************************************************* + * DragAcceptFiles [SHELL.9] + */ +void WINAPI DragAcceptFiles16(HWND16 hWnd, BOOL16 b) +{ + DragAcceptFiles(HWND_32(hWnd), b); +} + +/************************************************************************* + * DragQueryFile [SHELL.11] + */ +UINT16 WINAPI DragQueryFile16( + HDROP16 hDrop, + WORD wFile, + LPSTR lpszFile, + WORD wLength) +{ + LPSTR lpDrop; + UINT i = 0; + LPDROPFILESTRUCT16 lpDropFileStruct = (LPDROPFILESTRUCT16) GlobalLock16(hDrop); + + TRACE("(%04x, %x, %p, %u)\n", hDrop,wFile,lpszFile,wLength); + + if(!lpDropFileStruct) goto end; + + lpDrop = (LPSTR) lpDropFileStruct + lpDropFileStruct->wSize; + + while (i++ < wFile) + { + while (*lpDrop++); /* skip filename */ + if (!*lpDrop) + { + i = (wFile == 0xFFFF) ? i : 0; + goto end; + } + } + + i = strlen(lpDrop); + i++; + if (!lpszFile ) goto end; /* needed buffer size */ + i = (wLength > i) ? i : wLength; + lstrcpynA (lpszFile, lpDrop, i); +end: + GlobalUnlock16(hDrop); + return i; +} + +/************************************************************************* + * DragFinish [SHELL.12] + */ +void WINAPI DragFinish16(HDROP16 h) +{ + TRACE("\n"); + GlobalFree16((HGLOBAL16)h); +} + + +/************************************************************************* + * DragQueryPoint [SHELL.13] + */ +BOOL16 WINAPI DragQueryPoint16(HDROP16 hDrop, POINT16 *p) +{ + LPDROPFILESTRUCT16 lpDropFileStruct; + BOOL16 bRet; + TRACE("\n"); + lpDropFileStruct = (LPDROPFILESTRUCT16) GlobalLock16(hDrop); + + memcpy(p,&lpDropFileStruct->ptMousePos,sizeof(POINT16)); + bRet = lpDropFileStruct->fInNonClientArea; + + GlobalUnlock16(hDrop); + return bRet; +} + +/************************************************************************* + * FindExecutable (SHELL.21) + */ +HINSTANCE16 WINAPI FindExecutable16( LPCSTR lpFile, LPCSTR lpDirectory, + LPSTR lpResult ) +{ return HINSTANCE_16(FindExecutableA( lpFile, lpDirectory, lpResult )); +} + +/************************************************************************* + * AboutDlgProc (SHELL.33) + */ +BOOL16 WINAPI AboutDlgProc16( HWND16 hWnd, UINT16 msg, WPARAM16 wParam, + LPARAM lParam ) +{ return (BOOL16)AboutDlgProc( HWND_32(hWnd), msg, wParam, lParam ); +} + + +/************************************************************************* + * ShellAbout (SHELL.22) + */ +BOOL16 WINAPI ShellAbout16( HWND16 hWnd, LPCSTR szApp, LPCSTR szOtherStuff, + HICON16 hIcon ) +{ return ShellAboutA( HWND_32(hWnd), szApp, szOtherStuff, HICON_32(hIcon) ); +} + +/************************************************************************* + * InternalExtractIcon [SHELL.39] + * + * This abortion is called directly by Progman + */ +HGLOBAL16 WINAPI InternalExtractIcon16(HINSTANCE16 hInstance, + LPCSTR lpszExeFileName, UINT16 nIconIndex, WORD n ) +{ + HGLOBAL16 hRet = 0; + HICON16 *RetPtr = NULL; + OFSTRUCT ofs; + + TRACE("(%04x,file %s,start %d,extract %d\n", + hInstance, lpszExeFileName, nIconIndex, n); + + if (!n) + return 0; + + hRet = GlobalAlloc16(GMEM_FIXED | GMEM_ZEROINIT, sizeof(*RetPtr) * n); + RetPtr = (HICON16*)GlobalLock16(hRet); + + if (nIconIndex == (UINT16)-1) /* get number of icons */ + { + RetPtr[0] = PrivateExtractIconsA(ofs.szPathName, 0, 0, 0, NULL, NULL, 0, LR_DEFAULTCOLOR); + } + else + { + UINT ret; + HICON *icons; + + icons = HeapAlloc(GetProcessHeap(), 0, n * sizeof(*icons)); + ret = PrivateExtractIconsA(ofs.szPathName, nIconIndex, + GetSystemMetrics(SM_CXICON), + GetSystemMetrics(SM_CYICON), + icons, NULL, n, LR_DEFAULTCOLOR); + if ((ret != 0xffffffff) && ret) + { + int i; + for (i = 0; i < n; i++) RetPtr[i] = HICON_16(icons[i]); + } + else + { + GlobalFree16(hRet); + hRet = 0; + } + HeapFree(GetProcessHeap(), 0, icons); + } + return hRet; +} + +/************************************************************************* + * ExtractIcon (SHELL.34) + */ +HICON16 WINAPI ExtractIcon16( HINSTANCE16 hInstance, LPCSTR lpszExeFileName, + UINT16 nIconIndex ) +{ TRACE("\n"); + return HICON_16(ExtractIconA(HINSTANCE_32(hInstance), lpszExeFileName, nIconIndex)); +} + +/************************************************************************* + * ExtractIconEx (SHELL.40) + */ +HICON16 WINAPI ExtractIconEx16( + LPCSTR lpszFile, INT16 nIconIndex, HICON16 *phiconLarge, + HICON16 *phiconSmall, UINT16 nIcons +) { + HICON *ilarge,*ismall; + UINT16 ret; + int i; + + if (phiconLarge) + ilarge = (HICON*)HeapAlloc(GetProcessHeap(),0,nIcons*sizeof(HICON)); + else + ilarge = NULL; + if (phiconSmall) + ismall = (HICON*)HeapAlloc(GetProcessHeap(),0,nIcons*sizeof(HICON)); + else + ismall = NULL; + ret = HICON_16(ExtractIconExA(lpszFile,nIconIndex,ilarge,ismall,nIcons)); + if (ilarge) { + for (i=0;i 1 ) /* found key */ + { + LPSTR lpKey; + *lpend = '\0'; + lpKey = SHELL_FindString(lpEnv, lpstr+1); + if( lpKey ) /* found key value */ + { + int l = strlen(lpKey); + + if( l > length - (lpbstr - lpBuffer) - 1 ) + { + WARN("-- Env subst aborted - string too short\n"); + *lpend = '%'; + break; + } + strcpy(lpbstr, lpKey); + lpbstr += l; + } + else break; + *lpend = '%'; + lpstr = lpend + 1; + } + else break; /* back off and whine */ + + continue; + } + + *lpbstr++ = *lpstr++; + } + + *lpbstr = '\0'; + if( lpstr - str == strlen(str) ) + { + strncpy(str, lpBuffer, length); + length = 1; + } + else + length = 0; + + TRACE("-- return %s\n", str); + + OemToCharA(str,str); + HeapFree( GetProcessHeap(), 0, lpBuffer); + + /* Return str length in the LOWORD + * and 1 in HIWORD if subst was successful. + */ + return (DWORD)MAKELONG(strlen(str), length); +} + +/************************************************************************* + * SHELL_HookProc + * + * 32-bit version of the system-wide WH_SHELL hook. + */ +static LRESULT WINAPI SHELL_HookProc(INT code, WPARAM wParam, LPARAM lParam) +{ + TRACE("%i, %x, %08lx\n", code, wParam, lParam ); + + if (SHELL_hWnd) + { + switch( code ) + { + case HSHELL_WINDOWCREATED: + PostMessageA( SHELL_hWnd, uMsgWndCreated, wParam, 0 ); + break; + case HSHELL_WINDOWDESTROYED: + PostMessageA( SHELL_hWnd, uMsgWndDestroyed, wParam, 0 ); + break; + case HSHELL_ACTIVATESHELLWINDOW: + PostMessageA( SHELL_hWnd, uMsgShellActivate, wParam, 0 ); + break; + } + } + return CallNextHookEx( SHELL_hHook, code, wParam, lParam ); +} + +/************************************************************************* + * ShellHookProc [SHELL.103] + * System-wide WH_SHELL hook. + */ +LRESULT WINAPI ShellHookProc16(INT16 code, WPARAM16 wParam, LPARAM lParam) +{ + return SHELL_HookProc( code, wParam, lParam ); +} + +/************************************************************************* + * RegisterShellHook [SHELL.102] + */ +BOOL WINAPI RegisterShellHook16(HWND16 hWnd, UINT16 uAction) +{ + TRACE("%04x [%u]\n", hWnd, uAction ); + + switch( uAction ) + { + case 2: /* register hWnd as a shell window */ + if( !SHELL_hHook ) + { + SHELL_hHook = SetWindowsHookExA( WH_SHELL, SHELL_HookProc, + GetModuleHandleA("shell32.dll"), 0 ); + if ( SHELL_hHook ) + { + uMsgWndCreated = RegisterWindowMessageA( lpstrMsgWndCreated ); + uMsgWndDestroyed = RegisterWindowMessageA( lpstrMsgWndDestroyed ); + uMsgShellActivate = RegisterWindowMessageA( lpstrMsgShellActivate ); + } + else + WARN("-- unable to install ShellHookProc()!\n"); + } + + if ( SHELL_hHook ) + return ((SHELL_hWnd = HWND_32(hWnd)) != 0); + break; + + default: + WARN("-- unknown code %i\n", uAction ); + SHELL_hWnd = 0; /* just in case */ + } + return FALSE; +} + + +/*********************************************************************** + * DriveType (SHELL.262) + */ +UINT16 WINAPI DriveType16( UINT16 drive ) +{ + UINT ret; + char path[] = "A:\\"; + path[0] += drive; + ret = GetDriveTypeA(path); + switch(ret) /* some values are not supported in Win16 */ + { + case DRIVE_CDROM: + ret = DRIVE_REMOTE; + break; + case DRIVE_NO_ROOT_DIR: + ret = DRIVE_UNKNOWN; + break; + } + return ret; +} + + +/* 0 and 1 are valid rootkeys in win16 shell.dll and are used by + * some programs. Do not remove those cases. -MM + */ +static inline void fix_win16_hkey( HKEY *hkey ) +{ + if (*hkey == 0 || *hkey == (HKEY)1) *hkey = HKEY_CLASSES_ROOT; +} + +/****************************************************************************** + * RegOpenKey [SHELL.1] + */ +DWORD WINAPI RegOpenKey16( HKEY hkey, LPCSTR name, PHKEY retkey ) +{ + fix_win16_hkey( &hkey ); + return RegOpenKeyA( hkey, name, retkey ); +} + +/****************************************************************************** + * RegCreateKey [SHELL.2] + */ +DWORD WINAPI RegCreateKey16( HKEY hkey, LPCSTR name, PHKEY retkey ) +{ + fix_win16_hkey( &hkey ); + return RegCreateKeyA( hkey, name, retkey ); +} + +/****************************************************************************** + * RegCloseKey [SHELL.3] + */ +DWORD WINAPI RegCloseKey16( HKEY hkey ) +{ + fix_win16_hkey( &hkey ); + return RegCloseKey( hkey ); +} + +/****************************************************************************** + * RegDeleteKey [SHELL.4] + */ +DWORD WINAPI RegDeleteKey16( HKEY hkey, LPCSTR name ) +{ + fix_win16_hkey( &hkey ); + return RegDeleteKeyA( hkey, name ); +} + +/****************************************************************************** + * RegSetValue [SHELL.5] + */ +DWORD WINAPI RegSetValue16( HKEY hkey, LPCSTR name, DWORD type, LPCSTR data, DWORD count ) +{ + fix_win16_hkey( &hkey ); + return RegSetValueA( hkey, name, type, data, count ); +} + +/****************************************************************************** + * RegQueryValue [SHELL.6] + * + * NOTES + * Is this HACK still applicable? + * + * HACK + * The 16bit RegQueryValue doesn't handle selectorblocks anyway, so we just + * mask out the high 16 bit. This (not so much incidently) hopefully fixes + * Aldus FH4) + */ +DWORD WINAPI RegQueryValue16( HKEY hkey, LPCSTR name, LPSTR data, LPDWORD count +) +{ + fix_win16_hkey( &hkey ); + if (count) *count &= 0xffff; + return RegQueryValueA( hkey, name, data, count ); +} + +/****************************************************************************** + * RegEnumKey [SHELL.7] + */ +DWORD WINAPI RegEnumKey16( HKEY hkey, DWORD index, LPSTR name, DWORD name_len ) +{ + fix_win16_hkey( &hkey ); + return RegEnumKeyA( hkey, index, name, name_len ); +} + +/************************************************************************* + * SHELL_Execute16 [Internal] + */ +static UINT SHELL_Execute16(const WCHAR *lpCmd, WCHAR *env, BOOL shWait, + LPSHELLEXECUTEINFOW psei, LPSHELLEXECUTEINFOW psei_out) +{ + UINT ret; + char sCmd[MAX_PATH]; + WideCharToMultiByte(CP_ACP, 0, lpCmd, -1, sCmd, MAX_PATH, NULL, NULL); + ret = WinExec16(sCmd, (UINT16)psei->nShow); + psei_out->hInstApp = HINSTANCE_32(ret); + return ret; +} + +/************************************************************************* + * ShellExecute [SHELL.20] + */ +HINSTANCE16 WINAPI ShellExecute16( HWND16 hWnd, LPCSTR lpOperation, + LPCSTR lpFile, LPCSTR lpParameters, + LPCSTR lpDirectory, INT16 iShowCmd ) +{ + SHELLEXECUTEINFOW seiW; + WCHAR *wVerb = NULL, *wFile = NULL, *wParameters = NULL, *wDirectory = NULL; + HANDLE hProcess = 0; + + seiW.lpVerb = lpOperation ? __SHCloneStrAtoW(&wVerb, lpOperation) : NULL; + seiW.lpFile = lpFile ? __SHCloneStrAtoW(&wFile, lpFile) : NULL; + seiW.lpParameters = lpParameters ? __SHCloneStrAtoW(&wParameters, lpParameters) : NULL; + seiW.lpDirectory = lpDirectory ? __SHCloneStrAtoW(&wDirectory, lpDirectory) : NULL; + + seiW.cbSize = sizeof(seiW); + seiW.fMask = 0; + seiW.hwnd = HWND_32(hWnd); + seiW.nShow = iShowCmd; + seiW.lpIDList = 0; + seiW.lpClass = 0; + seiW.hkeyClass = 0; + seiW.dwHotKey = 0; + seiW.hProcess = hProcess; + + ShellExecuteExW32 (&seiW, SHELL_Execute16); + + if (wVerb) SHFree(wVerb); + if (wFile) SHFree(wFile); + if (wParameters) SHFree(wParameters); + if (wDirectory) SHFree(wDirectory); + + return HINSTANCE_16(seiW.hInstApp); +} diff --git a/reactos/lib/shell32/shell.spec b/reactos/lib/shell32/shell.spec index ca3f8625b76..64c5574a891 100644 --- a/reactos/lib/shell32/shell.spec +++ b/reactos/lib/shell32/shell.spec @@ -1,45 +1,45 @@ - 1 pascal RegOpenKey(long str ptr) RegOpenKey16 - 2 pascal RegCreateKey(long str ptr) RegCreateKey16 - 3 pascal RegCloseKey(long) RegCloseKey16 - 4 pascal RegDeleteKey(long str) RegDeleteKey16 - 5 pascal RegSetValue(long str long str long) RegSetValue16 - 6 pascal RegQueryValue(long str ptr ptr) RegQueryValue16 - 7 pascal RegEnumKey(long long ptr long) RegEnumKey16 - 9 pascal -ret16 DragAcceptFiles(word word) DragAcceptFiles16 - 11 pascal -ret16 DragQueryFile(word s_word ptr s_word) DragQueryFile16 - 12 pascal -ret16 DragFinish(word) DragFinish16 - 13 pascal -ret16 DragQueryPoint(word ptr) DragQueryPoint16 - 20 pascal -ret16 ShellExecute(word str str str str s_word) ShellExecute16 - 21 pascal -ret16 FindExecutable(str str ptr) FindExecutable16 - 22 pascal -ret16 ShellAbout(word ptr ptr word) ShellAbout16 - 33 pascal -ret16 AboutDlgProc(word word word long) AboutDlgProc16 - 34 pascal -ret16 ExtractIcon(word str s_word) ExtractIcon16 - 36 pascal -ret16 ExtractAssociatedIcon(word ptr ptr) ExtractAssociatedIcon16 - 37 pascal DoEnvironmentSubst(ptr word) DoEnvironmentSubst16 - 38 pascal FindEnvironmentString(ptr) FindEnvironmentString16 - 39 pascal -ret16 InternalExtractIcon(word ptr s_word word) InternalExtractIcon16 - 40 pascal -ret16 ExtractIconEx(str word ptr ptr word) ExtractIconEx16 -# 98 stub SHL3216_THUNKDATA16 -# 99 stub SHL1632_THUNKDATA16 - -#100 4 0550 HERETHARBETYGARS exported, shared data -#101 8 010e FINDEXEDLGPROC exported, shared data -101 pascal DllEntryPoint(long word word word long word) SHELL_DllEntryPoint - -102 pascal -ret16 RegisterShellHook(word word) RegisterShellHook16 -103 pascal ShellHookProc(word word long) ShellHookProc16 - -157 stub RESTARTDIALOG -# 166 PICKICONDLG - -262 pascal -ret16 DriveType(long) DriveType16 - -# 263 SH16TO32DRIVEIOCTL -# 264 SH16TO32INT2526 -# 300 SHGETFILEINFO -# 400 SHFORMATDRIVE -401 stub SHCHECKDRIVE -# 402 _RUNDLLCHECKDRIVE - -# 8 WEP -#32 WCI + 1 pascal RegOpenKey(long str ptr) RegOpenKey16 + 2 pascal RegCreateKey(long str ptr) RegCreateKey16 + 3 pascal RegCloseKey(long) RegCloseKey16 + 4 pascal RegDeleteKey(long str) RegDeleteKey16 + 5 pascal RegSetValue(long str long str long) RegSetValue16 + 6 pascal RegQueryValue(long str ptr ptr) RegQueryValue16 + 7 pascal RegEnumKey(long long ptr long) RegEnumKey16 + 9 pascal -ret16 DragAcceptFiles(word word) DragAcceptFiles16 + 11 pascal -ret16 DragQueryFile(word s_word ptr s_word) DragQueryFile16 + 12 pascal -ret16 DragFinish(word) DragFinish16 + 13 pascal -ret16 DragQueryPoint(word ptr) DragQueryPoint16 + 20 pascal -ret16 ShellExecute(word str str str str s_word) ShellExecute16 + 21 pascal -ret16 FindExecutable(str str ptr) FindExecutable16 + 22 pascal -ret16 ShellAbout(word ptr ptr word) ShellAbout16 + 33 pascal -ret16 AboutDlgProc(word word word long) AboutDlgProc16 + 34 pascal -ret16 ExtractIcon(word str s_word) ExtractIcon16 + 36 pascal -ret16 ExtractAssociatedIcon(word ptr ptr) ExtractAssociatedIcon16 + 37 pascal DoEnvironmentSubst(ptr word) DoEnvironmentSubst16 + 38 pascal FindEnvironmentString(ptr) FindEnvironmentString16 + 39 pascal -ret16 InternalExtractIcon(word ptr s_word word) InternalExtractIcon16 + 40 pascal -ret16 ExtractIconEx(str word ptr ptr word) ExtractIconEx16 +# 98 stub SHL3216_THUNKDATA16 +# 99 stub SHL1632_THUNKDATA16 + +#100 4 0550 HERETHARBETYGARS exported, shared data +#101 8 010e FINDEXEDLGPROC exported, shared data +101 pascal DllEntryPoint(long word word word long word) SHELL_DllEntryPoint + +102 pascal -ret16 RegisterShellHook(word word) RegisterShellHook16 +103 pascal ShellHookProc(word word long) ShellHookProc16 + +157 stub RESTARTDIALOG +# 166 PICKICONDLG + +262 pascal -ret16 DriveType(long) DriveType16 + +# 263 SH16TO32DRIVEIOCTL +# 264 SH16TO32INT2526 +# 300 SHGETFILEINFO +# 400 SHFORMATDRIVE +401 stub SHCHECKDRIVE +# 402 _RUNDLLCHECKDRIVE + +# 8 WEP +#32 WCI diff --git a/reactos/lib/shell32/shell32.spec b/reactos/lib/shell32/shell32.spec index 54c5479322a..17e70984602 100644 --- a/reactos/lib/shell32/shell32.spec +++ b/reactos/lib/shell32/shell32.spec @@ -1,441 +1,441 @@ -# Functions exported by the Win95 shell32.dll -# (these need to have these exact ordinals, for some -# win95 and winNT dlls import shell32.dll by ordinal) -# This list was updated to dll version 4.72 - - 2 stdcall SHChangeNotifyRegister(long long long long long ptr) - 4 stdcall SHChangeNotifyDeregister (long) - 5 stdcall SHChangeNotifyUpdateEntryList (long long long long) - 9 stub PifMgr_OpenProperties - 10 stub PifMgr_GetProperties - 11 stub PifMgr_SetProperties - 13 stub PifMgr_CloseProperties - 15 stdcall ILGetDisplayName(ptr ptr) - 16 stdcall ILFindLastID(ptr) - 17 stdcall ILRemoveLastID(ptr) - 18 stdcall ILClone(ptr) - 19 stdcall ILCloneFirst (ptr) - 20 stdcall ILGlobalClone (ptr) - 21 stdcall ILIsEqual (ptr ptr) - 23 stdcall ILIsParent (ptr ptr long) - 24 stdcall ILFindChild (ptr ptr) - 25 stdcall ILCombine(ptr ptr) - 26 stdcall ILLoadFromStream (ptr ptr) - 27 stdcall ILSaveToStream(ptr ptr) - 28 stdcall SHILCreateFromPath(ptr ptr ptr) SHILCreateFromPathAW - 29 stdcall PathIsRoot(ptr) PathIsRootAW - 30 stdcall PathBuildRoot(ptr long) PathBuildRootAW - 31 stdcall PathFindExtension(ptr) PathFindExtensionAW - 32 stdcall PathAddBackslash(ptr) PathAddBackslashAW - 33 stdcall PathRemoveBlanks(ptr) PathRemoveBlanksAW - 34 stdcall PathFindFileName(ptr) PathFindFileNameAW - 35 stdcall PathRemoveFileSpec(ptr) PathRemoveFileSpecAW - 36 stdcall PathAppend(ptr ptr) PathAppendAW - 37 stdcall PathCombine(ptr ptr ptr) PathCombineAW - 38 stdcall PathStripPath(ptr)PathStripPathAW - 39 stdcall PathIsUNC (ptr) PathIsUNCAW - 40 stdcall PathIsRelative (ptr) PathIsRelativeAW - 41 stdcall IsLFNDriveA(str) - 42 stdcall IsLFNDriveW(wstr) - 43 stdcall PathIsExe (ptr) PathIsExeAW - 45 stdcall PathFileExists(ptr) PathFileExistsAW - 46 stdcall PathMatchSpec (ptr ptr) PathMatchSpecAW - 47 stdcall PathMakeUniqueName (ptr long ptr ptr ptr)PathMakeUniqueNameAW - 48 stdcall PathSetDlgItemPath (long long ptr) PathSetDlgItemPathAW - 49 stdcall PathQualify (ptr) PathQualifyAW - 50 stdcall PathStripToRoot (ptr) PathStripToRootAW - 51 stdcall PathResolve(str long long) PathResolveAW - 52 stdcall PathGetArgs(str) PathGetArgsAW - 53 stdcall DoEnvironmentSubst (long long) DoEnvironmentSubstAW - 54 stdcall DragAcceptFiles(long long) - 55 stdcall PathQuoteSpaces (ptr) PathQuoteSpacesAW - 56 stdcall PathUnquoteSpaces(str) PathUnquoteSpacesAW - 57 stdcall PathGetDriveNumber (str) PathGetDriveNumberAW - 58 stdcall ParseField(str long ptr long) ParseFieldAW - 59 stdcall RestartDialog(long wstr long) - 60 stdcall ExitWindowsDialog(long) - 61 stdcall RunFileDlg(long long long str str long) - 62 stdcall PickIconDlg(long long long long) - 63 stdcall GetFileNameFromBrowse(long long long long str str str) - 64 stdcall DriveType (long) - 65 stub InvalidateDriveType - 66 stdcall IsNetDrive(long) - 67 stdcall Shell_MergeMenus (long long long long long long) - 68 stdcall SHGetSetSettings(ptr long long) - 69 stub SHGetNetResource - 70 stdcall SHCreateDefClassObject(long long long long long) - 71 stdcall Shell_GetImageList(ptr ptr) - 72 stdcall Shell_GetCachedImageIndex(ptr ptr long) Shell_GetCachedImageIndexAW - 73 stdcall SHShellFolderView_Message(long long long) - 74 stdcall SHCreateStdEnumFmtEtc(long ptr ptr) - 75 stdcall PathYetAnotherMakeUniqueName(ptr wstr wstr wstr) - 76 stub DragQueryInfo - 77 stdcall SHMapPIDLToSystemImageListIndex(ptr ptr ptr) - 78 stdcall OleStrToStrN(str long wstr long) OleStrToStrNAW - 79 stdcall StrToOleStrN(wstr long str long) StrToOleStrNAW - 80 stdcall DragFinish(long) - 81 stdcall DragQueryFile(long long ptr long) DragQueryFileA - 82 stdcall DragQueryFileA(long long ptr long) - 83 stdcall CIDLData_CreateFromIDArray(ptr long ptr ptr) - 84 stub SHIsBadInterfacePtr - 85 stdcall OpenRegStream(long str str long) shlwapi.SHOpenRegStreamA - 86 stdcall SHRegisterDragDrop(long ptr) - 87 stdcall SHRevokeDragDrop(long) - 88 stdcall SHDoDragDrop(long ptr ptr long ptr) - 89 stdcall SHCloneSpecialIDList(long long long) - 90 stdcall SHFindFiles(ptr ptr) - 91 stub SHFindComputer - 92 stdcall PathGetShortPath (ptr) PathGetShortPathAW - 93 stdcall Win32CreateDirectory(wstr ptr) Win32CreateDirectoryAW - 94 stdcall Win32RemoveDirectory(wstr) Win32RemoveDirectoryAW - 95 stdcall SHLogILFromFSIL (ptr) - 96 stdcall StrRetToStrN (ptr long ptr ptr) StrRetToStrNAW - 97 stdcall SHWaitForFileToOpen (long long long) - 98 stdcall SHGetRealIDL (ptr ptr ptr) - 99 stdcall SetAppStartingCursor (long long) - 100 stdcall SHRestricted(long) - - 102 stdcall SHCoCreateInstance(wstr ptr long ptr ptr) - 103 stdcall SignalFileOpen(long) - 104 stdcall FileMenu_DeleteAllItems(long) - 105 stdcall FileMenu_DrawItem(long ptr) - 106 stdcall FileMenu_FindSubMenuByPidl(long ptr) - 107 stdcall FileMenu_GetLastSelectedItemPidls(long ptr ptr) - 108 stdcall FileMenu_HandleMenuChar(long long) - 109 stdcall FileMenu_InitMenuPopup (long) - 110 stdcall FileMenu_InsertUsingPidl (long long ptr long long ptr) - 111 stdcall FileMenu_Invalidate (long) - 112 stdcall FileMenu_MeasureItem(long ptr) - 113 stdcall FileMenu_ReplaceUsingPidl (long long ptr long ptr) - 114 stdcall FileMenu_Create (long long long long long) - 115 stdcall FileMenu_AppendItem (long ptr long long long long) FileMenu_AppendItemAW - 116 stdcall FileMenu_TrackPopupMenuEx (long long long long long long) - 117 stdcall FileMenu_DeleteItemByCmd(long long) - 118 stdcall FileMenu_Destroy (long) - 119 stdcall IsLFNDrive(ptr) IsLFNDriveAW - 120 stdcall FileMenu_AbortInitMenu () - 121 stdcall SHFlushClipboard () - 122 stdcall -noname RunDLL_CallEntry16(long long long str long) #name wrong? - 123 stdcall SHFreeUnusedLibraries () - 124 stdcall FileMenu_AppendFilesForPidl(long ptr long) - 125 stdcall FileMenu_AddFilesForPidl(long long long ptr long long ptr) - 126 stdcall SHOutOfMemoryMessageBox (long long long) - 127 stdcall SHWinHelp (long long long long) - 128 stdcall -private DllGetClassObject(long long ptr) SHELL32_DllGetClassObject - 129 stdcall DAD_AutoScroll(long ptr ptr) - 130 stdcall DAD_DragEnter(long) - 131 stdcall DAD_DragEnterEx(long long long) - 132 stdcall DAD_DragLeave() - 133 stdcall DragQueryFileW(long long ptr long) - 134 stdcall DAD_DragMove(long long) - 135 stdcall DragQueryPoint(long ptr) - 136 stdcall DAD_SetDragImage(long long) - 137 stdcall DAD_ShowDragImage (long) - 139 stub Desktop_UpdateBriefcaseOnEvent - 140 stdcall FileMenu_DeleteItemByIndex(long long) - 141 stdcall FileMenu_DeleteItemByFirstID(long long) - 142 stdcall FileMenu_DeleteSeparator(long) - 143 stdcall FileMenu_EnableItemByCmd(long long long) - 144 stdcall FileMenu_GetItemExtent (long long) - 145 stdcall PathFindOnPath (ptr ptr) PathFindOnPathAW - 146 stdcall RLBuildListOfPaths() - 147 stdcall SHCLSIDFromString(long long) SHCLSIDFromStringAW - 149 stdcall SHFind_InitMenuPopup(long long long long) - - 151 stdcall SHLoadOLE (long) - 152 stdcall ILGetSize(ptr) - 153 stdcall ILGetNext(ptr) - 154 stdcall ILAppend (long long long) - 155 stdcall ILFree (ptr) - 156 stdcall ILGlobalFree (ptr) - 157 stdcall ILCreateFromPath (ptr) ILCreateFromPathAW - 158 stdcall PathGetExtension(str long long) PathGetExtensionAW - 159 stdcall PathIsDirectory(ptr)PathIsDirectoryAW - 160 stub SHNetConnectionDialog - 161 stdcall SHRunControlPanel (long long) - 162 stdcall SHSimpleIDListFromPath (ptr) SHSimpleIDListFromPathAW - 163 stdcall StrToOleStr (wstr str) StrToOleStrAW - 164 stdcall Win32DeleteFile(str) Win32DeleteFileAW - 165 stdcall SHCreateDirectory(long ptr) - 166 stdcall CallCPLEntry16(long long long long long long) - 167 stdcall SHAddFromPropSheetExtArray(long long long) - 168 stdcall SHCreatePropSheetExtArray(long str long) - 169 stdcall SHDestroyPropSheetExtArray(long) - 170 stdcall SHReplaceFromPropSheetExtArray(long long long long) - 171 stdcall PathCleanupSpec(ptr ptr) - 172 stdcall SHCreateLinks(long str ptr long ptr) - 173 stdcall SHValidateUNC(long long long) - 174 stdcall SHCreateShellFolderViewEx (ptr ptr) - 175 stdcall SHGetSpecialFolderPath(long long long long) SHGetSpecialFolderPathAW - 176 stdcall SHSetInstanceExplorer (long) - 177 stub DAD_SetDragImageFromListView - 178 stdcall SHObjectProperties(long long wstr wstr) - 179 stdcall SHGetNewLinkInfoA(str str ptr long long) - 180 stdcall SHGetNewLinkInfoW(wstr wstr ptr long long) - 181 stdcall RegisterShellHook(long long) - 182 varargs ShellMessageBoxW(long long long str long) - 183 varargs ShellMessageBoxA(long long long str long) - 184 stdcall ArrangeWindows(long long long long long) - 185 stub SHHandleDiskFull - 186 stdcall ILGetDisplayNameEx(ptr ptr ptr long) - 187 stub ILGetPseudoNameW - 188 stdcall ShellDDEInit(long) - 189 stdcall ILCreateFromPathA(str) - 190 stdcall ILCreateFromPathW(wstr) - 191 stdcall SHUpdateImageA(str long long long) - 192 stdcall SHUpdateImageW(wstr long long long) - 193 stdcall SHHandleUpdateImage(ptr) - 194 stub SHCreatePropSheetExtArrayEx - 195 stdcall SHFree(ptr) - 196 stdcall SHAlloc(long) - 197 stub SHGlobalDefect - 198 stdcall SHAbortInvokeCommand () - 199 stub SHGetFileIcon - 200 stub SHLocalAlloc - 201 stub SHLocalFree - 202 stub SHLocalReAlloc - 203 stub AddCommasW - 204 stub ShortSizeFormatW - 205 stub Printer_LoadIconsW - 206 stub Link_AddExtraDataSection - 207 stub Link_ReadExtraDataSection - 208 stub Link_RemoveExtraDataSection - 209 stub Int64ToString - 210 stub LargeIntegerToString - 211 stub Printers_GetPidl - 212 stub Printers_AddPrinterPropPages - 213 stub Printers_RegisterWindowW - 214 stub Printers_UnregisterWindow - 215 stdcall SHStartNetConnectionDialog(long str long) - 243 stdcall @(long long) shell32_243 - 244 stdcall SHInitRestricted(ptr ptr) - 247 stdcall SHGetDataFromIDListA (ptr ptr long ptr long) - 248 stdcall SHGetDataFromIDListW (ptr ptr long ptr long) - 249 stdcall PathParseIconLocation (ptr) PathParseIconLocationAW - 250 stdcall PathRemoveExtension (ptr) PathRemoveExtensionAW - 251 stdcall PathRemoveArgs (ptr) PathRemoveArgsAW - 256 stdcall @(ptr ptr) SHELL32_256 - 271 stub SheChangeDirA - 272 stub SheChangeDirExA - 273 stub SheChangeDirExW - 274 stdcall SheChangeDirW(wstr) - 275 stub SheConvertPathW - 276 stub SheFullPathA - 277 stub SheFullPathW - 278 stub SheGetCurDrive - 279 stub SheGetDirA - 280 stub SheGetDirExW - 281 stdcall SheGetDirW (long long) - 282 stub SheGetPathOffsetW - 283 stub SheRemoveQuotesA - 284 stub SheRemoveQuotesW - 285 stub SheSetCurDrive - 286 stub SheShortenPathA - 287 stub SheShortenPathW - 288 stdcall ShellAboutA(long str str long) - 289 stdcall ShellAboutW(long wstr wstr long) - 290 stdcall ShellExecuteA(long str str str str long) - 291 stdcall ShellExecuteEx (long) ShellExecuteExA - 292 stdcall ShellExecuteExA (long) - 293 stdcall ShellExecuteExW (long) - 294 stdcall ShellExecuteW (long wstr wstr wstr wstr long) - 296 stdcall Shell_NotifyIcon(long ptr) Shell_NotifyIconA - 297 stdcall Shell_NotifyIconA(long ptr) - 298 stdcall Shell_NotifyIconW(long ptr) -#299 stub Shl1632_ThunkData32 -#300 stub Shl3216_ThunkData32 - 301 stdcall StrChrA(str long) shlwapi.StrChrA - 302 stdcall StrChrIA(str long) shlwapi.StrChrIA - 303 stdcall StrChrIW(wstr long) shlwapi.StrChrIW - 304 stdcall StrChrW(wstr long) shlwapi.StrChrW - 305 stdcall StrCmpNA(str str long) shlwapi.StrCmpNA - 306 stdcall StrCmpNIA(str str long) shlwapi.StrCmpNIA - 307 stdcall StrCmpNIW(wstr wstr long) shlwapi.StrCmpNIW - 308 stdcall StrCmpNW(wstr wstr long) shlwapi.StrCmpNW - 309 stdcall StrCpyNA (ptr str long) lstrcpynA - 310 stdcall StrCpyNW(wstr wstr long) shlwapi.StrCpyNW - 311 stdcall StrNCmpA(str str long) shlwapi.StrCmpNA - 312 stdcall StrNCmpIA(str str long) shlwapi.StrCmpNIA - 313 stdcall StrNCmpIW(wstr wstr long) shlwapi.StrCmpNIW - 314 stdcall StrNCmpW(wstr wstr long) shlwapi.StrCmpNW - 315 stdcall StrNCpyA (ptr str long) lstrcpynA - 316 stdcall StrNCpyW(wstr wstr long) shlwapi.StrCpyNW - 317 stdcall StrRChrA(str str long) shlwapi.StrRChrA - 318 stdcall StrRChrIA(str str long) shlwapi.StrRChrIA - 319 stdcall StrRChrIW(str str long) shlwapi.StrRChrIW - 320 stdcall StrRChrW(wstr wstr long) shlwapi.StrRChrW - 321 stub StrRStrA - 322 stdcall StrRStrIA(str str str) shlwapi.StrRStrIA - 323 stdcall StrRStrIW(wstr wstr wstr) shlwapi.StrRStrIW - 324 stub StrRStrW - 325 stdcall StrStrA(str str) shlwapi.StrStrA - 326 stdcall StrStrIA(str str) shlwapi.StrStrIA - 327 stdcall StrStrIW(wstr wstr) shlwapi.StrStrIW - 328 stdcall StrStrW(wstr wstr) shlwapi.StrStrW - - 505 stdcall SHRegCloseKey (long) - 506 stdcall SHRegOpenKeyA (long str long) - 507 stdcall SHRegOpenKeyW (long wstr long) - 508 stub SHRegQueryValueA - 509 stdcall SHRegQueryValueExA(long str ptr ptr ptr ptr) - 510 stdcall SHRegQueryValueW (long long long long) - 511 stdcall SHRegQueryValueExW (long wstr ptr ptr ptr ptr) - 512 stdcall SHRegDeleteKeyW (long wstr) - - 520 stdcall -noname SHAllocShared (ptr long long) - 521 stdcall -noname SHLockShared (long long) - 522 stdcall -noname SHUnlockShared (ptr) - 523 stdcall -noname SHFreeShared (long long) - 524 stdcall RealDriveType (long long) - 525 stub RealDriveTypeFlags - - 640 stdcall NTSHChangeNotifyRegister (long long long long long long) - 641 stdcall NTSHChangeNotifyDeregister (long) - - 643 stub SHChangeNotifyReceive - 644 stdcall SHChangeNotification_Lock(long long ptr ptr) - 645 stdcall SHChangeNotification_Unlock(long) - 646 stub SHChangeRegistrationReceive - 647 stub ReceiveAddToRecentDocs - 648 stub SHWaitOp_Operate - - 650 stdcall PathIsSameRoot(ptr ptr)PathIsSameRootAW - -# nt40/win98 - 651 stdcall ReadCabinetState (long long) # OldReadCabinetState - 652 stdcall WriteCabinetState (long) - 653 stdcall PathProcessCommand (long long long long) PathProcessCommandAW - -# win98 - 654 stdcall @(long long)shell32_654 # ReadCabinetState@8 - 660 stdcall FileIconInit(long) - 680 stdcall IsUserAdmin() - -# >= NT5 - 714 stdcall @(ptr)SHELL32_714 # PathIsTemporaryW - 730 stdcall RestartDialogEx(long wstr long long) - -1217 stub FOOBAR1217 # no joke! This is the real name!! - -# -# version 4.0 (win95) -# _WIN32_IE >= 0x0200 -# -@ stdcall CheckEscapesA(str long) -@ stdcall CheckEscapesW(wstr long) -@ stdcall CommandLineToArgvW(wstr ptr) -@ stdcall Control_FillCache_RunDLL(long long long long) Control_FillCache_RunDLLA -@ stdcall Control_FillCache_RunDLLA(long long long long) -@ stdcall Control_FillCache_RunDLLW(long long long long) -@ stdcall Control_RunDLL(ptr ptr str long) Control_RunDLLA -@ stdcall Control_RunDLLA(ptr ptr str long) -@ stdcall Control_RunDLLW(ptr ptr wstr long) -@ stdcall -private DllCanUnloadNow() SHELL32_DllCanUnloadNow -@ stdcall DllInstall(long wstr)SHELL32_DllInstall -@ stdcall -private DllRegisterServer() SHELL32_DllRegisterServer -@ stdcall -private DllUnregisterServer() SHELL32_DllUnregisterServer -@ stdcall DoEnvironmentSubstA(str str) -@ stdcall DoEnvironmentSubstW(wstr wstr) -@ stub DragQueryFileAorW -@ stdcall DuplicateIcon(long long) -@ stdcall ExtractAssociatedIconA(long str ptr) -@ stdcall ExtractAssociatedIconExA(long str long long) -@ stdcall ExtractAssociatedIconExW(long wstr long long) -@ stdcall ExtractAssociatedIconW(long wstr ptr) -@ stdcall ExtractIconA(long str long) -@ stdcall ExtractIconEx(ptr long ptr ptr long) ExtractIconExA -@ stdcall ExtractIconExA(str long ptr ptr long) -@ stdcall ExtractIconExW(wstr long ptr ptr long) -@ stdcall ExtractIconW(long wstr long) -@ stub ExtractIconResInfoA -@ stub ExtractIconResInfoW -@ stub ExtractVersionResource16W -@ stub FindExeDlgProc -@ stdcall FindExecutableA(ptr ptr ptr) -@ stdcall FindExecutableW(wstr wstr wstr) -@ stdcall FreeIconList(long) -@ stub InternalExtractIconListA -@ stub InternalExtractIconListW -@ stub OpenAs_RunDLL -@ stub OpenAs_RunDLLA -@ stub OpenAs_RunDLLW -@ stub PrintersGetCommand_RunDLL -@ stub PrintersGetCommand_RunDLLA -@ stub PrintersGetCommand_RunDLLW -@ stub RealShellExecuteA -@ stub RealShellExecuteExA -@ stub RealShellExecuteExW -@ stub RealShellExecuteW -@ stub RegenerateUserEnvironment -@ stdcall SHAddToRecentDocs (long ptr) -@ stdcall SHAppBarMessage(long ptr) -@ stdcall SHBrowseForFolder(ptr) SHBrowseForFolderA -@ stdcall SHBrowseForFolderA(ptr) -@ stdcall SHBrowseForFolderW(ptr) -@ stdcall SHChangeNotify (long long ptr ptr) -@ stdcall SHCreateDirectoryExA(long str ptr) -@ stdcall SHCreateDirectoryExW(long wstr ptr) -@ stub ShellHookProc -@ stdcall SHEmptyRecycleBinA(long str long) -@ stdcall SHEmptyRecycleBinW(long wstr long) -@ stdcall SHFileOperation(ptr) SHFileOperationA -@ stdcall SHFileOperationA(ptr) -@ stdcall SHFileOperationW(ptr) -@ stdcall SHFormatDrive(long long long long) -@ stdcall SHFreeNameMappings(ptr) -@ stdcall SHGetDesktopFolder(ptr) -@ stdcall SHGetFileInfo(ptr long ptr long long) SHGetFileInfoA -@ stdcall SHGetFileInfoA(ptr long ptr long long) -@ stdcall SHGetFileInfoW(ptr long ptr long long) -@ stdcall SHGetInstanceExplorer(long) -@ stdcall SHGetMalloc(ptr) -@ stdcall SHGetNewLinkInfo(str str ptr long long) SHGetNewLinkInfoA -@ stdcall SHGetPathFromIDList(ptr ptr) SHGetPathFromIDListA -@ stdcall SHGetPathFromIDListA(ptr ptr) -@ stdcall SHGetPathFromIDListW(ptr ptr) -@ stdcall SHGetSettings(ptr long) -@ stdcall SHGetSpecialFolderLocation(long long ptr) -@ stdcall SHHelpShortcuts_RunDLL(long long long long) -@ stub SHHelpShortcuts_RunDLLA -@ stub SHHelpShortcuts_RunDLLW -@ stdcall SHLoadInProc(long) -@ stdcall SHQueryRecycleBinA(str ptr) -@ stdcall SHQueryRecycleBinW(wstr ptr) -@ stub SHUpdateRecycleBinIcon -@ stub WOWShellExecute - -# -# version 4.70 (IE3.0) -# _WIN32_IE >= 0x0300 -# - -# -# version 4.71 (IE4.0) -# _WIN32_IE >= 0x0400 -# -@ stdcall DllGetVersion(ptr)SHELL32_DllGetVersion -@ stub SHGetFreeDiskSpace -@ stdcall SHGetSpecialFolderPathA(long ptr long long) -@ stdcall SHGetSpecialFolderPathW(long ptr long long) -# -# version 4.72 (IE4.01) -# _WIN32_IE >= 0x0401 -# no new exports -# - -# -# version 5.00 (Win2K) -# _WIN32_IE >= 0x0500 -# -@ stdcall SHBindToParent(ptr ptr ptr ptr) -@ stdcall SHGetDiskFreeSpaceA(str ptr ptr ptr) kernel32.GetDiskFreeSpaceExA -@ stdcall SHGetDiskFreeSpaceExA(str ptr ptr ptr) kernel32.GetDiskFreeSpaceExA -@ stdcall SHGetDiskFreeSpaceExW(wstr ptr ptr ptr) kernel32.GetDiskFreeSpaceExW -@ stdcall SHGetFolderPathA(long long long long ptr) -@ stdcall SHGetFolderPathW(long long long long ptr) -@ stdcall SHGetFolderLocation(long long long long ptr) - -# version 6.0 (WinXP) -# _WIN32_IE >= 0x600 -@ stdcall SHDefExtractIconA(str long long ptr ptr long) -@ stdcall SHDefExtractIconW(wstr long long ptr ptr long) +# Functions exported by the Win95 shell32.dll +# (these need to have these exact ordinals, for some +# win95 and winNT dlls import shell32.dll by ordinal) +# This list was updated to dll version 4.72 + + 2 stdcall SHChangeNotifyRegister(long long long long long ptr) + 4 stdcall SHChangeNotifyDeregister (long) + 5 stdcall SHChangeNotifyUpdateEntryList (long long long long) + 9 stub PifMgr_OpenProperties + 10 stub PifMgr_GetProperties + 11 stub PifMgr_SetProperties + 13 stub PifMgr_CloseProperties + 15 stdcall ILGetDisplayName(ptr ptr) + 16 stdcall ILFindLastID(ptr) + 17 stdcall ILRemoveLastID(ptr) + 18 stdcall ILClone(ptr) + 19 stdcall ILCloneFirst (ptr) + 20 stdcall ILGlobalClone (ptr) + 21 stdcall ILIsEqual (ptr ptr) + 23 stdcall ILIsParent (ptr ptr long) + 24 stdcall ILFindChild (ptr ptr) + 25 stdcall ILCombine(ptr ptr) + 26 stdcall ILLoadFromStream (ptr ptr) + 27 stdcall ILSaveToStream(ptr ptr) + 28 stdcall SHILCreateFromPath(ptr ptr ptr) SHILCreateFromPathAW + 29 stdcall PathIsRoot(ptr) PathIsRootAW + 30 stdcall PathBuildRoot(ptr long) PathBuildRootAW + 31 stdcall PathFindExtension(ptr) PathFindExtensionAW + 32 stdcall PathAddBackslash(ptr) PathAddBackslashAW + 33 stdcall PathRemoveBlanks(ptr) PathRemoveBlanksAW + 34 stdcall PathFindFileName(ptr) PathFindFileNameAW + 35 stdcall PathRemoveFileSpec(ptr) PathRemoveFileSpecAW + 36 stdcall PathAppend(ptr ptr) PathAppendAW + 37 stdcall PathCombine(ptr ptr ptr) PathCombineAW + 38 stdcall PathStripPath(ptr)PathStripPathAW + 39 stdcall PathIsUNC (ptr) PathIsUNCAW + 40 stdcall PathIsRelative (ptr) PathIsRelativeAW + 41 stdcall IsLFNDriveA(str) + 42 stdcall IsLFNDriveW(wstr) + 43 stdcall PathIsExe (ptr) PathIsExeAW + 45 stdcall PathFileExists(ptr) PathFileExistsAW + 46 stdcall PathMatchSpec (ptr ptr) PathMatchSpecAW + 47 stdcall PathMakeUniqueName (ptr long ptr ptr ptr)PathMakeUniqueNameAW + 48 stdcall PathSetDlgItemPath (long long ptr) PathSetDlgItemPathAW + 49 stdcall PathQualify (ptr) PathQualifyAW + 50 stdcall PathStripToRoot (ptr) PathStripToRootAW + 51 stdcall PathResolve(str long long) PathResolveAW + 52 stdcall PathGetArgs(str) PathGetArgsAW + 53 stdcall DoEnvironmentSubst (long long) DoEnvironmentSubstAW + 54 stdcall DragAcceptFiles(long long) + 55 stdcall PathQuoteSpaces (ptr) PathQuoteSpacesAW + 56 stdcall PathUnquoteSpaces(str) PathUnquoteSpacesAW + 57 stdcall PathGetDriveNumber (str) PathGetDriveNumberAW + 58 stdcall ParseField(str long ptr long) ParseFieldAW + 59 stdcall RestartDialog(long wstr long) + 60 stdcall ExitWindowsDialog(long) + 61 stdcall RunFileDlg(long long long str str long) + 62 stdcall PickIconDlg(long long long long) + 63 stdcall GetFileNameFromBrowse(long long long long str str str) + 64 stdcall DriveType (long) + 65 stub InvalidateDriveType + 66 stdcall IsNetDrive(long) + 67 stdcall Shell_MergeMenus (long long long long long long) + 68 stdcall SHGetSetSettings(ptr long long) + 69 stub SHGetNetResource + 70 stdcall SHCreateDefClassObject(long long long long long) + 71 stdcall Shell_GetImageList(ptr ptr) + 72 stdcall Shell_GetCachedImageIndex(ptr ptr long) Shell_GetCachedImageIndexAW + 73 stdcall SHShellFolderView_Message(long long long) + 74 stdcall SHCreateStdEnumFmtEtc(long ptr ptr) + 75 stdcall PathYetAnotherMakeUniqueName(ptr wstr wstr wstr) + 76 stub DragQueryInfo + 77 stdcall SHMapPIDLToSystemImageListIndex(ptr ptr ptr) + 78 stdcall OleStrToStrN(str long wstr long) OleStrToStrNAW + 79 stdcall StrToOleStrN(wstr long str long) StrToOleStrNAW + 80 stdcall DragFinish(long) + 81 stdcall DragQueryFile(long long ptr long) DragQueryFileA + 82 stdcall DragQueryFileA(long long ptr long) + 83 stdcall CIDLData_CreateFromIDArray(ptr long ptr ptr) + 84 stub SHIsBadInterfacePtr + 85 stdcall OpenRegStream(long str str long) shlwapi.SHOpenRegStreamA + 86 stdcall SHRegisterDragDrop(long ptr) + 87 stdcall SHRevokeDragDrop(long) + 88 stdcall SHDoDragDrop(long ptr ptr long ptr) + 89 stdcall SHCloneSpecialIDList(long long long) + 90 stdcall SHFindFiles(ptr ptr) + 91 stub SHFindComputer + 92 stdcall PathGetShortPath (ptr) PathGetShortPathAW + 93 stdcall Win32CreateDirectory(wstr ptr) Win32CreateDirectoryAW + 94 stdcall Win32RemoveDirectory(wstr) Win32RemoveDirectoryAW + 95 stdcall SHLogILFromFSIL (ptr) + 96 stdcall StrRetToStrN (ptr long ptr ptr) StrRetToStrNAW + 97 stdcall SHWaitForFileToOpen (long long long) + 98 stdcall SHGetRealIDL (ptr ptr ptr) + 99 stdcall SetAppStartingCursor (long long) + 100 stdcall SHRestricted(long) + + 102 stdcall SHCoCreateInstance(wstr ptr long ptr ptr) + 103 stdcall SignalFileOpen(long) + 104 stdcall FileMenu_DeleteAllItems(long) + 105 stdcall FileMenu_DrawItem(long ptr) + 106 stdcall FileMenu_FindSubMenuByPidl(long ptr) + 107 stdcall FileMenu_GetLastSelectedItemPidls(long ptr ptr) + 108 stdcall FileMenu_HandleMenuChar(long long) + 109 stdcall FileMenu_InitMenuPopup (long) + 110 stdcall FileMenu_InsertUsingPidl (long long ptr long long ptr) + 111 stdcall FileMenu_Invalidate (long) + 112 stdcall FileMenu_MeasureItem(long ptr) + 113 stdcall FileMenu_ReplaceUsingPidl (long long ptr long ptr) + 114 stdcall FileMenu_Create (long long long long long) + 115 stdcall FileMenu_AppendItem (long ptr long long long long) FileMenu_AppendItemAW + 116 stdcall FileMenu_TrackPopupMenuEx (long long long long long long) + 117 stdcall FileMenu_DeleteItemByCmd(long long) + 118 stdcall FileMenu_Destroy (long) + 119 stdcall IsLFNDrive(ptr) IsLFNDriveAW + 120 stdcall FileMenu_AbortInitMenu () + 121 stdcall SHFlushClipboard () + 122 stdcall -noname RunDLL_CallEntry16(long long long str long) #name wrong? + 123 stdcall SHFreeUnusedLibraries () + 124 stdcall FileMenu_AppendFilesForPidl(long ptr long) + 125 stdcall FileMenu_AddFilesForPidl(long long long ptr long long ptr) + 126 stdcall SHOutOfMemoryMessageBox (long long long) + 127 stdcall SHWinHelp (long long long long) + 128 stdcall -private DllGetClassObject(long long ptr) SHELL32_DllGetClassObject + 129 stdcall DAD_AutoScroll(long ptr ptr) + 130 stdcall DAD_DragEnter(long) + 131 stdcall DAD_DragEnterEx(long long long) + 132 stdcall DAD_DragLeave() + 133 stdcall DragQueryFileW(long long ptr long) + 134 stdcall DAD_DragMove(long long) + 135 stdcall DragQueryPoint(long ptr) + 136 stdcall DAD_SetDragImage(long long) + 137 stdcall DAD_ShowDragImage (long) + 139 stub Desktop_UpdateBriefcaseOnEvent + 140 stdcall FileMenu_DeleteItemByIndex(long long) + 141 stdcall FileMenu_DeleteItemByFirstID(long long) + 142 stdcall FileMenu_DeleteSeparator(long) + 143 stdcall FileMenu_EnableItemByCmd(long long long) + 144 stdcall FileMenu_GetItemExtent (long long) + 145 stdcall PathFindOnPath (ptr ptr) PathFindOnPathAW + 146 stdcall RLBuildListOfPaths() + 147 stdcall SHCLSIDFromString(long long) SHCLSIDFromStringAW + 149 stdcall SHFind_InitMenuPopup(long long long long) + + 151 stdcall SHLoadOLE (long) + 152 stdcall ILGetSize(ptr) + 153 stdcall ILGetNext(ptr) + 154 stdcall ILAppend (long long long) + 155 stdcall ILFree (ptr) + 156 stdcall ILGlobalFree (ptr) + 157 stdcall ILCreateFromPath (ptr) ILCreateFromPathAW + 158 stdcall PathGetExtension(str long long) PathGetExtensionAW + 159 stdcall PathIsDirectory(ptr)PathIsDirectoryAW + 160 stub SHNetConnectionDialog + 161 stdcall SHRunControlPanel (long long) + 162 stdcall SHSimpleIDListFromPath (ptr) SHSimpleIDListFromPathAW + 163 stdcall StrToOleStr (wstr str) StrToOleStrAW + 164 stdcall Win32DeleteFile(str) Win32DeleteFileAW + 165 stdcall SHCreateDirectory(long ptr) + 166 stdcall CallCPLEntry16(long long long long long long) + 167 stdcall SHAddFromPropSheetExtArray(long long long) + 168 stdcall SHCreatePropSheetExtArray(long str long) + 169 stdcall SHDestroyPropSheetExtArray(long) + 170 stdcall SHReplaceFromPropSheetExtArray(long long long long) + 171 stdcall PathCleanupSpec(ptr ptr) + 172 stdcall SHCreateLinks(long str ptr long ptr) + 173 stdcall SHValidateUNC(long long long) + 174 stdcall SHCreateShellFolderViewEx (ptr ptr) + 175 stdcall SHGetSpecialFolderPath(long long long long) SHGetSpecialFolderPathAW + 176 stdcall SHSetInstanceExplorer (long) + 177 stub DAD_SetDragImageFromListView + 178 stdcall SHObjectProperties(long long wstr wstr) + 179 stdcall SHGetNewLinkInfoA(str str ptr long long) + 180 stdcall SHGetNewLinkInfoW(wstr wstr ptr long long) + 181 stdcall RegisterShellHook(long long) + 182 varargs ShellMessageBoxW(long long long str long) + 183 varargs ShellMessageBoxA(long long long str long) + 184 stdcall ArrangeWindows(long long long long long) + 185 stub SHHandleDiskFull + 186 stdcall ILGetDisplayNameEx(ptr ptr ptr long) + 187 stub ILGetPseudoNameW + 188 stdcall ShellDDEInit(long) + 189 stdcall ILCreateFromPathA(str) + 190 stdcall ILCreateFromPathW(wstr) + 191 stdcall SHUpdateImageA(str long long long) + 192 stdcall SHUpdateImageW(wstr long long long) + 193 stdcall SHHandleUpdateImage(ptr) + 194 stub SHCreatePropSheetExtArrayEx + 195 stdcall SHFree(ptr) + 196 stdcall SHAlloc(long) + 197 stub SHGlobalDefect + 198 stdcall SHAbortInvokeCommand () + 199 stub SHGetFileIcon + 200 stub SHLocalAlloc + 201 stub SHLocalFree + 202 stub SHLocalReAlloc + 203 stub AddCommasW + 204 stub ShortSizeFormatW + 205 stub Printer_LoadIconsW + 206 stub Link_AddExtraDataSection + 207 stub Link_ReadExtraDataSection + 208 stub Link_RemoveExtraDataSection + 209 stub Int64ToString + 210 stub LargeIntegerToString + 211 stub Printers_GetPidl + 212 stub Printers_AddPrinterPropPages + 213 stub Printers_RegisterWindowW + 214 stub Printers_UnregisterWindow + 215 stdcall SHStartNetConnectionDialog(long str long) + 243 stdcall @(long long) shell32_243 + 244 stdcall SHInitRestricted(ptr ptr) + 247 stdcall SHGetDataFromIDListA (ptr ptr long ptr long) + 248 stdcall SHGetDataFromIDListW (ptr ptr long ptr long) + 249 stdcall PathParseIconLocation (ptr) PathParseIconLocationAW + 250 stdcall PathRemoveExtension (ptr) PathRemoveExtensionAW + 251 stdcall PathRemoveArgs (ptr) PathRemoveArgsAW + 256 stdcall @(ptr ptr) SHELL32_256 + 271 stub SheChangeDirA + 272 stub SheChangeDirExA + 273 stub SheChangeDirExW + 274 stdcall SheChangeDirW(wstr) + 275 stub SheConvertPathW + 276 stub SheFullPathA + 277 stub SheFullPathW + 278 stub SheGetCurDrive + 279 stub SheGetDirA + 280 stub SheGetDirExW + 281 stdcall SheGetDirW (long long) + 282 stub SheGetPathOffsetW + 283 stub SheRemoveQuotesA + 284 stub SheRemoveQuotesW + 285 stub SheSetCurDrive + 286 stub SheShortenPathA + 287 stub SheShortenPathW + 288 stdcall ShellAboutA(long str str long) + 289 stdcall ShellAboutW(long wstr wstr long) + 290 stdcall ShellExecuteA(long str str str str long) + 291 stdcall ShellExecuteEx (long) ShellExecuteExA + 292 stdcall ShellExecuteExA (long) + 293 stdcall ShellExecuteExW (long) + 294 stdcall ShellExecuteW (long wstr wstr wstr wstr long) + 296 stdcall Shell_NotifyIcon(long ptr) Shell_NotifyIconA + 297 stdcall Shell_NotifyIconA(long ptr) + 298 stdcall Shell_NotifyIconW(long ptr) +#299 stub Shl1632_ThunkData32 +#300 stub Shl3216_ThunkData32 + 301 stdcall StrChrA(str long) shlwapi.StrChrA + 302 stdcall StrChrIA(str long) shlwapi.StrChrIA + 303 stdcall StrChrIW(wstr long) shlwapi.StrChrIW + 304 stdcall StrChrW(wstr long) shlwapi.StrChrW + 305 stdcall StrCmpNA(str str long) shlwapi.StrCmpNA + 306 stdcall StrCmpNIA(str str long) shlwapi.StrCmpNIA + 307 stdcall StrCmpNIW(wstr wstr long) shlwapi.StrCmpNIW + 308 stdcall StrCmpNW(wstr wstr long) shlwapi.StrCmpNW + 309 stdcall StrCpyNA (ptr str long) lstrcpynA + 310 stdcall StrCpyNW(wstr wstr long) shlwapi.StrCpyNW + 311 stdcall StrNCmpA(str str long) shlwapi.StrCmpNA + 312 stdcall StrNCmpIA(str str long) shlwapi.StrCmpNIA + 313 stdcall StrNCmpIW(wstr wstr long) shlwapi.StrCmpNIW + 314 stdcall StrNCmpW(wstr wstr long) shlwapi.StrCmpNW + 315 stdcall StrNCpyA (ptr str long) lstrcpynA + 316 stdcall StrNCpyW(wstr wstr long) shlwapi.StrCpyNW + 317 stdcall StrRChrA(str str long) shlwapi.StrRChrA + 318 stdcall StrRChrIA(str str long) shlwapi.StrRChrIA + 319 stdcall StrRChrIW(str str long) shlwapi.StrRChrIW + 320 stdcall StrRChrW(wstr wstr long) shlwapi.StrRChrW + 321 stub StrRStrA + 322 stdcall StrRStrIA(str str str) shlwapi.StrRStrIA + 323 stdcall StrRStrIW(wstr wstr wstr) shlwapi.StrRStrIW + 324 stub StrRStrW + 325 stdcall StrStrA(str str) shlwapi.StrStrA + 326 stdcall StrStrIA(str str) shlwapi.StrStrIA + 327 stdcall StrStrIW(wstr wstr) shlwapi.StrStrIW + 328 stdcall StrStrW(wstr wstr) shlwapi.StrStrW + + 505 stdcall SHRegCloseKey (long) + 506 stdcall SHRegOpenKeyA (long str long) + 507 stdcall SHRegOpenKeyW (long wstr long) + 508 stub SHRegQueryValueA + 509 stdcall SHRegQueryValueExA(long str ptr ptr ptr ptr) + 510 stdcall SHRegQueryValueW (long long long long) + 511 stdcall SHRegQueryValueExW (long wstr ptr ptr ptr ptr) + 512 stdcall SHRegDeleteKeyW (long wstr) + + 520 stdcall -noname SHAllocShared (ptr long long) + 521 stdcall -noname SHLockShared (long long) + 522 stdcall -noname SHUnlockShared (ptr) + 523 stdcall -noname SHFreeShared (long long) + 524 stdcall RealDriveType (long long) + 525 stub RealDriveTypeFlags + + 640 stdcall NTSHChangeNotifyRegister (long long long long long long) + 641 stdcall NTSHChangeNotifyDeregister (long) + + 643 stub SHChangeNotifyReceive + 644 stdcall SHChangeNotification_Lock(long long ptr ptr) + 645 stdcall SHChangeNotification_Unlock(long) + 646 stub SHChangeRegistrationReceive + 647 stub ReceiveAddToRecentDocs + 648 stub SHWaitOp_Operate + + 650 stdcall PathIsSameRoot(ptr ptr)PathIsSameRootAW + +# nt40/win98 + 651 stdcall ReadCabinetState (long long) # OldReadCabinetState + 652 stdcall WriteCabinetState (long) + 653 stdcall PathProcessCommand (long long long long) PathProcessCommandAW + +# win98 + 654 stdcall @(long long)shell32_654 # ReadCabinetState@8 + 660 stdcall FileIconInit(long) + 680 stdcall IsUserAdmin() + +# >= NT5 + 714 stdcall @(ptr)SHELL32_714 # PathIsTemporaryW + 730 stdcall RestartDialogEx(long wstr long long) + +1217 stub FOOBAR1217 # no joke! This is the real name!! + +# +# version 4.0 (win95) +# _WIN32_IE >= 0x0200 +# +@ stdcall CheckEscapesA(str long) +@ stdcall CheckEscapesW(wstr long) +@ stdcall CommandLineToArgvW(wstr ptr) +@ stdcall Control_FillCache_RunDLL(long long long long) Control_FillCache_RunDLLA +@ stdcall Control_FillCache_RunDLLA(long long long long) +@ stdcall Control_FillCache_RunDLLW(long long long long) +@ stdcall Control_RunDLL(ptr ptr str long) Control_RunDLLA +@ stdcall Control_RunDLLA(ptr ptr str long) +@ stdcall Control_RunDLLW(ptr ptr wstr long) +@ stdcall -private DllCanUnloadNow() SHELL32_DllCanUnloadNow +@ stdcall DllInstall(long wstr)SHELL32_DllInstall +@ stdcall -private DllRegisterServer() SHELL32_DllRegisterServer +@ stdcall -private DllUnregisterServer() SHELL32_DllUnregisterServer +@ stdcall DoEnvironmentSubstA(str str) +@ stdcall DoEnvironmentSubstW(wstr wstr) +@ stub DragQueryFileAorW +@ stdcall DuplicateIcon(long long) +@ stdcall ExtractAssociatedIconA(long str ptr) +@ stdcall ExtractAssociatedIconExA(long str long long) +@ stdcall ExtractAssociatedIconExW(long wstr long long) +@ stdcall ExtractAssociatedIconW(long wstr ptr) +@ stdcall ExtractIconA(long str long) +@ stdcall ExtractIconEx(ptr long ptr ptr long) ExtractIconExA +@ stdcall ExtractIconExA(str long ptr ptr long) +@ stdcall ExtractIconExW(wstr long ptr ptr long) +@ stdcall ExtractIconW(long wstr long) +@ stub ExtractIconResInfoA +@ stub ExtractIconResInfoW +@ stub ExtractVersionResource16W +@ stub FindExeDlgProc +@ stdcall FindExecutableA(ptr ptr ptr) +@ stdcall FindExecutableW(wstr wstr wstr) +@ stdcall FreeIconList(long) +@ stub InternalExtractIconListA +@ stub InternalExtractIconListW +@ stub OpenAs_RunDLL +@ stub OpenAs_RunDLLA +@ stub OpenAs_RunDLLW +@ stub PrintersGetCommand_RunDLL +@ stub PrintersGetCommand_RunDLLA +@ stub PrintersGetCommand_RunDLLW +@ stub RealShellExecuteA +@ stub RealShellExecuteExA +@ stub RealShellExecuteExW +@ stub RealShellExecuteW +@ stub RegenerateUserEnvironment +@ stdcall SHAddToRecentDocs (long ptr) +@ stdcall SHAppBarMessage(long ptr) +@ stdcall SHBrowseForFolder(ptr) SHBrowseForFolderA +@ stdcall SHBrowseForFolderA(ptr) +@ stdcall SHBrowseForFolderW(ptr) +@ stdcall SHChangeNotify (long long ptr ptr) +@ stdcall SHCreateDirectoryExA(long str ptr) +@ stdcall SHCreateDirectoryExW(long wstr ptr) +@ stub ShellHookProc +@ stdcall SHEmptyRecycleBinA(long str long) +@ stdcall SHEmptyRecycleBinW(long wstr long) +@ stdcall SHFileOperation(ptr) SHFileOperationA +@ stdcall SHFileOperationA(ptr) +@ stdcall SHFileOperationW(ptr) +@ stdcall SHFormatDrive(long long long long) +@ stdcall SHFreeNameMappings(ptr) +@ stdcall SHGetDesktopFolder(ptr) +@ stdcall SHGetFileInfo(ptr long ptr long long) SHGetFileInfoA +@ stdcall SHGetFileInfoA(ptr long ptr long long) +@ stdcall SHGetFileInfoW(ptr long ptr long long) +@ stdcall SHGetInstanceExplorer(long) +@ stdcall SHGetMalloc(ptr) +@ stdcall SHGetNewLinkInfo(str str ptr long long) SHGetNewLinkInfoA +@ stdcall SHGetPathFromIDList(ptr ptr) SHGetPathFromIDListA +@ stdcall SHGetPathFromIDListA(ptr ptr) +@ stdcall SHGetPathFromIDListW(ptr ptr) +@ stdcall SHGetSettings(ptr long) +@ stdcall SHGetSpecialFolderLocation(long long ptr) +@ stdcall SHHelpShortcuts_RunDLL(long long long long) +@ stub SHHelpShortcuts_RunDLLA +@ stub SHHelpShortcuts_RunDLLW +@ stdcall SHLoadInProc(long) +@ stdcall SHQueryRecycleBinA(str ptr) +@ stdcall SHQueryRecycleBinW(wstr ptr) +@ stub SHUpdateRecycleBinIcon +@ stub WOWShellExecute + +# +# version 4.70 (IE3.0) +# _WIN32_IE >= 0x0300 +# + +# +# version 4.71 (IE4.0) +# _WIN32_IE >= 0x0400 +# +@ stdcall DllGetVersion(ptr)SHELL32_DllGetVersion +@ stub SHGetFreeDiskSpace +@ stdcall SHGetSpecialFolderPathA(long ptr long long) +@ stdcall SHGetSpecialFolderPathW(long ptr long long) +# +# version 4.72 (IE4.01) +# _WIN32_IE >= 0x0401 +# no new exports +# + +# +# version 5.00 (Win2K) +# _WIN32_IE >= 0x0500 +# +@ stdcall SHBindToParent(ptr ptr ptr ptr) +@ stdcall SHGetDiskFreeSpaceA(str ptr ptr ptr) kernel32.GetDiskFreeSpaceExA +@ stdcall SHGetDiskFreeSpaceExA(str ptr ptr ptr) kernel32.GetDiskFreeSpaceExA +@ stdcall SHGetDiskFreeSpaceExW(wstr ptr ptr ptr) kernel32.GetDiskFreeSpaceExW +@ stdcall SHGetFolderPathA(long long long long ptr) +@ stdcall SHGetFolderPathW(long long long long ptr) +@ stdcall SHGetFolderLocation(long long long long ptr) + +# version 6.0 (WinXP) +# _WIN32_IE >= 0x600 +@ stdcall SHDefExtractIconA(str long long ptr ptr long) +@ stdcall SHDefExtractIconW(wstr long long ptr ptr long) diff --git a/reactos/lib/shell32/shell32_Ca.rc b/reactos/lib/shell32/shell32_Ca.rc index fd2052766ba..05c172c6b5f 100644 --- a/reactos/lib/shell32/shell32_Ca.rc +++ b/reactos/lib/shell32/shell32_Ca.rc @@ -1,46 +1,46 @@ -/* - * Copyright 1998 Juergen Schmied - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -LANGUAGE LANG_CATALAN, SUBLANG_DEFAULT - -SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 210, 152 -STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Quant a %s" -FONT 10, "MS Shell Dlg" -{ - DEFPUSHBUTTON "D'Acord", IDOK, 153, 133, 50, 12, WS_TABSTOP - LISTBOX 99, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER - ICON "", 1088, 10, 10, 14, 16 - LTEXT "", 100, 30, 10, 137, 10 - LTEXT "", 101, 30, 22, 137, 10 - LTEXT "ReactOS ha estat construit per:", 98, 8, 55, 137, 10 -} - -SHELL_RUN_DLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 -STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "" -FONT 8, "MS Shell Dlg" -{ - ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE - LTEXT "Type the name of a program, folder, document, or Internet resource, and ReactOS will open it for you.", 12289, 36, 11, 182, 18 - LTEXT "&Open:", 12305, 7, 39, 24, 10 - CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 - DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP - PUSHBUTTON "Cancel", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP - PUSHBUTTON "&Browse...", 12288, 170, 63, 50, 14, WS_TABSTOP -} +/* + * Copyright 1998 Juergen Schmied + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +LANGUAGE LANG_CATALAN, SUBLANG_DEFAULT + +SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 210, 152 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Quant a %s" +FONT 10, "MS Shell Dlg" +{ + DEFPUSHBUTTON "D'Acord", IDOK, 153, 133, 50, 12, WS_TABSTOP + LISTBOX 99, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER + ICON "", 1088, 10, 10, 14, 16 + LTEXT "", 100, 30, 10, 137, 10 + LTEXT "", 101, 30, 22, 137, 10 + LTEXT "ReactOS ha estat construit per:", 98, 8, 55, 137, 10 +} + +SHELL_RUN_DLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "" +FONT 8, "MS Shell Dlg" +{ + ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE + LTEXT "Type the name of a program, folder, document, or Internet resource, and ReactOS will open it for you.", 12289, 36, 11, 182, 18 + LTEXT "&Open:", 12305, 7, 39, 24, 10 + CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 + DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "Cancel", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "&Browse...", 12288, 170, 63, 50, 14, WS_TABSTOP +} diff --git a/reactos/lib/shell32/shell32_Cn.rc b/reactos/lib/shell32/shell32_Cn.rc index edc6be42ade..a305b79a83a 100644 --- a/reactos/lib/shell32/shell32_Cn.rc +++ b/reactos/lib/shell32/shell32_Cn.rc @@ -1,63 +1,63 @@ -/* - * Copyright 2002 Tisheng Chen - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED -#pragma code_page(936) - -SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 210, 152 -STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "¹ØÓÚ %s" -FONT 10, "MS Shell Dlg" -{ - DEFPUSHBUTTON "È·¶¨", IDOK, 153, 133, 50, 12, WS_TABSTOP - LISTBOX 99, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER - ICON "", 1088, 10, 10, 14, 16 - LTEXT "", 100, 30, 10, 137, 10 - LTEXT "", 101, 30, 22, 137, 10 - LTEXT "ReactOS was brought to you by:", 98, 8, 55, 137, 10 -} - -SHELL_RUN_DLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 -STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "" -FONT 8, "MS Shell Dlg" -{ - ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE - LTEXT "ÊäÈë³ÌÐò£¬Ä¿Â¼£¬Îļþ»òÕßInternet×ÊÔ´Ãû£¬ReactOS½«ÎªÄú´ò¿ªËü¡£", 12289, 36, 11, 182, 18 - LTEXT "´ò¿ª(&O):", 12305, 7, 39, 24, 10 - CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 - DEFPUSHBUTTON "È·¶¨", IDOK, 62, 63, 50, 14, WS_TABSTOP - PUSHBUTTON "È¡Ïû", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP - PUSHBUTTON "ä¯ÀÀ(&B)...", 12288, 170, 63, 50, 14, WS_TABSTOP -} - -/* columns in the shellview */ -STRINGTABLE LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED -BEGIN - IDS_SHV_COLUMN1 "Îļþ" - IDS_SHV_COLUMN2 "´óС" - IDS_SHV_COLUMN3 "ÀàÐÍ" - IDS_SHV_COLUMN4 "ÐÞ¸Ä" - IDS_SHV_COLUMN5 "ÊôÐÔ" - IDS_SHV_COLUMN6 "ʹÓÿռä" - IDS_SHV_COLUMN7 "Ê£Óà¿Õ¼ä" - IDS_SHV_COLUMN8 "Name" /*FIXME*/ - IDS_SHV_COLUMN9 "Comments" /*FIXME*/ -END - -#pragma code_page(default) +/* + * Copyright 2002 Tisheng Chen + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED +#pragma code_page(936) + +SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 210, 152 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "¹ØÓÚ %s" +FONT 10, "MS Shell Dlg" +{ + DEFPUSHBUTTON "È·¶¨", IDOK, 153, 133, 50, 12, WS_TABSTOP + LISTBOX 99, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER + ICON "", 1088, 10, 10, 14, 16 + LTEXT "", 100, 30, 10, 137, 10 + LTEXT "", 101, 30, 22, 137, 10 + LTEXT "ReactOS was brought to you by:", 98, 8, 55, 137, 10 +} + +SHELL_RUN_DLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "" +FONT 8, "MS Shell Dlg" +{ + ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE + LTEXT "ÊäÈë³ÌÐò£¬Ä¿Â¼£¬Îļþ»òÕßInternet×ÊÔ´Ãû£¬ReactOS½«ÎªÄú´ò¿ªËü¡£", 12289, 36, 11, 182, 18 + LTEXT "´ò¿ª(&O):", 12305, 7, 39, 24, 10 + CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 + DEFPUSHBUTTON "È·¶¨", IDOK, 62, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "È¡Ïû", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "ä¯ÀÀ(&B)...", 12288, 170, 63, 50, 14, WS_TABSTOP +} + +/* columns in the shellview */ +STRINGTABLE LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED +BEGIN + IDS_SHV_COLUMN1 "Îļþ" + IDS_SHV_COLUMN2 "´óС" + IDS_SHV_COLUMN3 "ÀàÐÍ" + IDS_SHV_COLUMN4 "ÐÞ¸Ä" + IDS_SHV_COLUMN5 "ÊôÐÔ" + IDS_SHV_COLUMN6 "ʹÓÿռä" + IDS_SHV_COLUMN7 "Ê£Óà¿Õ¼ä" + IDS_SHV_COLUMN8 "Name" /*FIXME*/ + IDS_SHV_COLUMN9 "Comments" /*FIXME*/ +END + +#pragma code_page(default) diff --git a/reactos/lib/shell32/shell32_Cs.rc b/reactos/lib/shell32/shell32_Cs.rc index 94313e85f0b..a45cab3ce70 100644 --- a/reactos/lib/shell32/shell32_Cs.rc +++ b/reactos/lib/shell32/shell32_Cs.rc @@ -1,181 +1,181 @@ -/* - * Copyright 1998 Juergen Schmied - * Copyright 2003 Filip Navara - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -LANGUAGE LANG_CZECH, SUBLANG_DEFAULT - -MENU_001 MENU DISCARDABLE -BEGIN - MENUITEM "&Vedle sebe", FCIDM_SHVIEW_BIGICON - MENUITEM "&Ikony", FCIDM_SHVIEW_SMALLICON - MENUITEM "&Seznam", FCIDM_SHVIEW_LISTVIEW - MENUITEM "&Podrobnosti", FCIDM_SHVIEW_REPORTVIEW -END - -/* - shellview background menu -*/ -MENU_002 MENU DISCARDABLE -BEGIN - POPUP "" - BEGIN - POPUP "Z&obrazit" - BEGIN - MENUITEM "&Vedle sebe", FCIDM_SHVIEW_BIGICON - MENUITEM "&Ikony", FCIDM_SHVIEW_SMALLICON - MENUITEM "&Seznam", FCIDM_SHVIEW_LISTVIEW - MENUITEM "&Podrobnosti", FCIDM_SHVIEW_REPORTVIEW - END - MENUITEM SEPARATOR - POPUP "Seøadit &ikony" - BEGIN - MENUITEM "Podle &Názvu", 0x30 /* column 0 */ - MENUITEM "Podle &Typu", 0x32 /* column 2 */ - MENUITEM "Podle &Velikosti", 0x31 /* ... */ - MENUITEM "Podle &Data", 0x33 - MENUITEM SEPARATOR - MENUITEM "&Rovnat automaticky", FCIDM_SHVIEW_AUTOARRANGE - END - MENUITEM "Zarovnat ikony", FCIDM_SHVIEW_SNAPTOGRID - MENUITEM SEPARATOR - MENUITEM "A&ktualizovat", FCIDM_SHVIEW_REFRESH - MENUITEM SEPARATOR - MENUITEM "V&ložit", FCIDM_SHVIEW_INSERT - MENUITEM "Vložit zást&upce", FCIDM_SHVIEW_INSERTLINK - MENUITEM SEPARATOR - POPUP "&Nový" - BEGIN - MENUITEM "Nová &složka", FCIDM_SHVIEW_NEWFOLDER - MENUITEM "Nový &zástupce", FCIDM_SHVIEW_NEWLINK - MENUITEM SEPARATOR - END - MENUITEM SEPARATOR - MENUITEM "&Vlastnosti", FCIDM_SHVIEW_PROPERTIES - END -END - -/* - shellview item menu -*/ -MENU_SHV_FILE MENU DISCARDABLE -BEGIN - POPUP "" - BEGIN - MENUITEM "P&rozkoumat", FCIDM_SHVIEW_EXPLORE - MENUITEM "O&tevøít", FCIDM_SHVIEW_OPEN - MENUITEM SEPARATOR - MENUITEM "Vyj&mout", FCIDM_SHVIEW_CUT - MENUITEM "&Kopírovat", FCIDM_SHVIEW_COPY - MENUITEM SEPARATOR - MENUITEM "Vytvoøit zástupc&e", FCIDM_SHVIEW_CREATELINK - MENUITEM "O&dstranit", FCIDM_SHVIEW_DELETE - MENUITEM "&Pøejmenovat", FCIDM_SHVIEW_RENAME - MENUITEM SEPARATOR - MENUITEM "&Vlastnosti", FCIDM_SHVIEW_PROPERTIES - END -END - -SHBRSFORFOLDER_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 188, 192 -STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU | DS_MODALFRAME | DS_SETFONT | DS_3DLOOK -CAPTION "Procházet..." -FONT 8, "MS Shell Dlg" -{ - DEFPUSHBUTTON "OK", 1, 80, 176, 50, 12, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP - PUSHBUTTON "Storno", 2, 134, 176, 50, 12, WS_GROUP | WS_TABSTOP - LTEXT "", IDD_TITLE, 4, 4, 180, 12 - LTEXT "", IDD_STATUS, 4, 25, 180, 12 - CONTROL "", IDD_TREEVIEW, "SysTreeView32", - TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | - WS_BORDER | WS_TABSTOP, - 4, 40, 180, 120 -} - -SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 210, 152 -STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "O aplikaci %s" -FONT 10, "MS Shell Dlg" -{ - DEFPUSHBUTTON "OK", IDOK, 153, 133, 50, 12, WS_TABSTOP - LISTBOX 99, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER - ICON "", 1088, 10, 10, 14, 16 - LTEXT "", 100, 30, 10, 137, 10 - LTEXT "", 101, 30, 22, 137, 10 - LTEXT "ReactOS je d¡lem:", 98, 8, 55, 137, 10 -} - -SHELL_RUN_DLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 -STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "" -FONT 8, "MS Shell Dlg" -{ - ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE - LTEXT "Zadejte název programu, složky, dokumentu, nebo zdroje v síti Internet a ReactOS jej pro vás otevøe.", 12289, 36, 11, 182, 18 - LTEXT "&Otevøít:", 12305, 7, 39, 24, 10 - CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 - DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP - PUSHBUTTON "Storno", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP - PUSHBUTTON "&Procházet...", 12288, 170, 63, 50, 14, WS_TABSTOP -} - -/* - special folders -*/ -STRINGTABLE DISCARDABLE -{ - IDS_DESKTOP "Plocha" - IDS_MYCOMPUTER "Tento poèítaè" -} - -/* - context menus -*/ -STRINGTABLE DISCARDABLE -{ - IDS_VIEW_LARGE "&Vedle sebe" - IDS_VIEW_SMALL "&Ikony" - IDS_VIEW_LIST "&Seznam" - IDS_VIEW_DETAILS "&Podrobnosti" - IDS_SELECT "Vybrat" - IDS_OPEN "Otevøít" -} - -STRINGTABLE DISCARDABLE -{ - IDS_CREATEFOLDER_DENIED "Nelze vytvoøit novou složku protože pøistup byl odepøen." - IDS_CREATEFOLDER_CAPTION "Chyba pøi pokusu vytvoøit nový adresáø" - IDS_DELETEITEM_CAPTION "Potvrdit odstranìní souboru" - IDS_DELETEFOLDER_CAPTION "Potvrdit odstranìní adresáøe" - IDS_OVERWRITEFILE_CAPTION "Potvrdit pøepsání souboru" - IDS_DELETEITEM_TEXT "Opravdu chcete odstranit '%1'?" - IDS_DELETEMULTIPLE_TEXT "Opravdu chcete odstranit tìchto %1 položek?" - IDS_OVERWRITEFILE_TEXT "Pøejete si pøepsat soubor '%1'?" -} - -/* columns in the shellview */ -STRINGTABLE -BEGIN - IDS_SHV_COLUMN1 "Název" - IDS_SHV_COLUMN2 "Velikost" - IDS_SHV_COLUMN3 "Typ" - IDS_SHV_COLUMN4 "Zmìnìno" - IDS_SHV_COLUMN5 "Atributy" - IDS_SHV_COLUMN6 "Velikost" - IDS_SHV_COLUMN7 "Volné místo" - IDS_SHV_COLUMN8 "Jméno" - IDS_SHV_COLUMN9 "Komentáø" -END +/* + * Copyright 1998 Juergen Schmied + * Copyright 2003 Filip Navara + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +LANGUAGE LANG_CZECH, SUBLANG_DEFAULT + +MENU_001 MENU DISCARDABLE +BEGIN + MENUITEM "&Vedle sebe", FCIDM_SHVIEW_BIGICON + MENUITEM "&Ikony", FCIDM_SHVIEW_SMALLICON + MENUITEM "&Seznam", FCIDM_SHVIEW_LISTVIEW + MENUITEM "&Podrobnosti", FCIDM_SHVIEW_REPORTVIEW +END + +/* + shellview background menu +*/ +MENU_002 MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + POPUP "Z&obrazit" + BEGIN + MENUITEM "&Vedle sebe", FCIDM_SHVIEW_BIGICON + MENUITEM "&Ikony", FCIDM_SHVIEW_SMALLICON + MENUITEM "&Seznam", FCIDM_SHVIEW_LISTVIEW + MENUITEM "&Podrobnosti", FCIDM_SHVIEW_REPORTVIEW + END + MENUITEM SEPARATOR + POPUP "Seøadit &ikony" + BEGIN + MENUITEM "Podle &Názvu", 0x30 /* column 0 */ + MENUITEM "Podle &Typu", 0x32 /* column 2 */ + MENUITEM "Podle &Velikosti", 0x31 /* ... */ + MENUITEM "Podle &Data", 0x33 + MENUITEM SEPARATOR + MENUITEM "&Rovnat automaticky", FCIDM_SHVIEW_AUTOARRANGE + END + MENUITEM "Zarovnat ikony", FCIDM_SHVIEW_SNAPTOGRID + MENUITEM SEPARATOR + MENUITEM "A&ktualizovat", FCIDM_SHVIEW_REFRESH + MENUITEM SEPARATOR + MENUITEM "V&ložit", FCIDM_SHVIEW_INSERT + MENUITEM "Vložit zást&upce", FCIDM_SHVIEW_INSERTLINK + MENUITEM SEPARATOR + POPUP "&Nový" + BEGIN + MENUITEM "Nová &složka", FCIDM_SHVIEW_NEWFOLDER + MENUITEM "Nový &zástupce", FCIDM_SHVIEW_NEWLINK + MENUITEM SEPARATOR + END + MENUITEM SEPARATOR + MENUITEM "&Vlastnosti", FCIDM_SHVIEW_PROPERTIES + END +END + +/* + shellview item menu +*/ +MENU_SHV_FILE MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + MENUITEM "P&rozkoumat", FCIDM_SHVIEW_EXPLORE + MENUITEM "O&tevøít", FCIDM_SHVIEW_OPEN + MENUITEM SEPARATOR + MENUITEM "Vyj&mout", FCIDM_SHVIEW_CUT + MENUITEM "&Kopírovat", FCIDM_SHVIEW_COPY + MENUITEM SEPARATOR + MENUITEM "Vytvoøit zástupc&e", FCIDM_SHVIEW_CREATELINK + MENUITEM "O&dstranit", FCIDM_SHVIEW_DELETE + MENUITEM "&Pøejmenovat", FCIDM_SHVIEW_RENAME + MENUITEM SEPARATOR + MENUITEM "&Vlastnosti", FCIDM_SHVIEW_PROPERTIES + END +END + +SHBRSFORFOLDER_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 188, 192 +STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU | DS_MODALFRAME | DS_SETFONT | DS_3DLOOK +CAPTION "Procházet..." +FONT 8, "MS Shell Dlg" +{ + DEFPUSHBUTTON "OK", 1, 80, 176, 50, 12, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP + PUSHBUTTON "Storno", 2, 134, 176, 50, 12, WS_GROUP | WS_TABSTOP + LTEXT "", IDD_TITLE, 4, 4, 180, 12 + LTEXT "", IDD_STATUS, 4, 25, 180, 12 + CONTROL "", IDD_TREEVIEW, "SysTreeView32", + TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | + WS_BORDER | WS_TABSTOP, + 4, 40, 180, 120 +} + +SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 210, 152 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "O aplikaci %s" +FONT 10, "MS Shell Dlg" +{ + DEFPUSHBUTTON "OK", IDOK, 153, 133, 50, 12, WS_TABSTOP + LISTBOX 99, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER + ICON "", 1088, 10, 10, 14, 16 + LTEXT "", 100, 30, 10, 137, 10 + LTEXT "", 101, 30, 22, 137, 10 + LTEXT "ReactOS je d¡lem:", 98, 8, 55, 137, 10 +} + +SHELL_RUN_DLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "" +FONT 8, "MS Shell Dlg" +{ + ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE + LTEXT "Zadejte název programu, složky, dokumentu, nebo zdroje v síti Internet a ReactOS jej pro vás otevøe.", 12289, 36, 11, 182, 18 + LTEXT "&Otevøít:", 12305, 7, 39, 24, 10 + CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 + DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "Storno", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "&Procházet...", 12288, 170, 63, 50, 14, WS_TABSTOP +} + +/* + special folders +*/ +STRINGTABLE DISCARDABLE +{ + IDS_DESKTOP "Plocha" + IDS_MYCOMPUTER "Tento poèítaè" +} + +/* + context menus +*/ +STRINGTABLE DISCARDABLE +{ + IDS_VIEW_LARGE "&Vedle sebe" + IDS_VIEW_SMALL "&Ikony" + IDS_VIEW_LIST "&Seznam" + IDS_VIEW_DETAILS "&Podrobnosti" + IDS_SELECT "Vybrat" + IDS_OPEN "Otevøít" +} + +STRINGTABLE DISCARDABLE +{ + IDS_CREATEFOLDER_DENIED "Nelze vytvoøit novou složku protože pøistup byl odepøen." + IDS_CREATEFOLDER_CAPTION "Chyba pøi pokusu vytvoøit nový adresáø" + IDS_DELETEITEM_CAPTION "Potvrdit odstranìní souboru" + IDS_DELETEFOLDER_CAPTION "Potvrdit odstranìní adresáøe" + IDS_OVERWRITEFILE_CAPTION "Potvrdit pøepsání souboru" + IDS_DELETEITEM_TEXT "Opravdu chcete odstranit '%1'?" + IDS_DELETEMULTIPLE_TEXT "Opravdu chcete odstranit tìchto %1 položek?" + IDS_OVERWRITEFILE_TEXT "Pøejete si pøepsat soubor '%1'?" +} + +/* columns in the shellview */ +STRINGTABLE +BEGIN + IDS_SHV_COLUMN1 "Název" + IDS_SHV_COLUMN2 "Velikost" + IDS_SHV_COLUMN3 "Typ" + IDS_SHV_COLUMN4 "Zmìnìno" + IDS_SHV_COLUMN5 "Atributy" + IDS_SHV_COLUMN6 "Velikost" + IDS_SHV_COLUMN7 "Volné místo" + IDS_SHV_COLUMN8 "Jméno" + IDS_SHV_COLUMN9 "Komentáø" +END diff --git a/reactos/lib/shell32/shell32_Da.rc b/reactos/lib/shell32/shell32_Da.rc index aab26ff23c6..270cd1294cd 100644 --- a/reactos/lib/shell32/shell32_Da.rc +++ b/reactos/lib/shell32/shell32_Da.rc @@ -1,46 +1,46 @@ -/* - * Copyright 1998 Juergen Schmied - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -LANGUAGE LANG_DANISH, SUBLANG_DEFAULT - -SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 210, 152 -STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Om %s" -FONT 10, "MS Shell Dlg" -{ - DEFPUSHBUTTON "OK", IDOK, 153, 133, 50, 12, WS_TABSTOP - LISTBOX 99, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER - ICON "", 1088, 10, 10, 14, 16 - LTEXT "", 100, 30, 10, 137, 10 - LTEXT "", 101, 30, 22, 137, 10 - LTEXT "ReactOS havde ikke været mulig uden hjælp fra disse personer:", 98, 8, 55, 137, 10 -} - -SHELL_RUN_DLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 -STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "" -FONT 8, "MS Shell Dlg" -{ - ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE - LTEXT "Type the name of a program, folder, document, or Internet resource, and ReactOS will open it for you.", 12289, 36, 11, 182, 18 - LTEXT "&Open:", 12305, 7, 39, 24, 10 - CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 - DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP - PUSHBUTTON "Cancel", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP - PUSHBUTTON "&Browse...", 12288, 170, 63, 50, 14, WS_TABSTOP -} +/* + * Copyright 1998 Juergen Schmied + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +LANGUAGE LANG_DANISH, SUBLANG_DEFAULT + +SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 210, 152 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Om %s" +FONT 10, "MS Shell Dlg" +{ + DEFPUSHBUTTON "OK", IDOK, 153, 133, 50, 12, WS_TABSTOP + LISTBOX 99, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER + ICON "", 1088, 10, 10, 14, 16 + LTEXT "", 100, 30, 10, 137, 10 + LTEXT "", 101, 30, 22, 137, 10 + LTEXT "ReactOS havde ikke været mulig uden hjælp fra disse personer:", 98, 8, 55, 137, 10 +} + +SHELL_RUN_DLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "" +FONT 8, "MS Shell Dlg" +{ + ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE + LTEXT "Type the name of a program, folder, document, or Internet resource, and ReactOS will open it for you.", 12289, 36, 11, 182, 18 + LTEXT "&Open:", 12305, 7, 39, 24, 10 + CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 + DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "Cancel", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "&Browse...", 12288, 170, 63, 50, 14, WS_TABSTOP +} diff --git a/reactos/lib/shell32/shell32_De.rc b/reactos/lib/shell32/shell32_De.rc index 29e05b8702a..0084189fc08 100644 --- a/reactos/lib/shell32/shell32_De.rc +++ b/reactos/lib/shell32/shell32_De.rc @@ -1,190 +1,190 @@ -/* - * Copyright 1998 Juergen Schmied - * Copyright 2004 Henning Gerhardt - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -LANGUAGE LANG_GERMAN, SUBLANG_DEFAULT - -MENU_001 MENU DISCARDABLE -BEGIN - MENUITEM "&Große Symbole", FCIDM_SHVIEW_BIGICON - MENUITEM "&Kleine Symbole", FCIDM_SHVIEW_SMALLICON - MENUITEM "&Liste", FCIDM_SHVIEW_LISTVIEW - MENUITEM "&Details", FCIDM_SHVIEW_REPORTVIEW -END - -/* - shellview background menu -*/ -MENU_002 MENU DISCARDABLE -BEGIN - POPUP "" - BEGIN - POPUP "&Ansicht" - BEGIN - MENUITEM "&Große Symbole", FCIDM_SHVIEW_BIGICON - MENUITEM "&Kleine Symbole", FCIDM_SHVIEW_SMALLICON - MENUITEM "&Liste", FCIDM_SHVIEW_LISTVIEW - MENUITEM "&Details", FCIDM_SHVIEW_REPORTVIEW - END - MENUITEM SEPARATOR - POPUP "Symbole anordnen" - BEGIN - MENUITEM "Nach &Name", 0x30 /* column 0 */ - MENUITEM "Nach &Typ", 0x32 /* column 2 */ - MENUITEM "Nach &Größe", 0x31 /* ... */ - MENUITEM "Nach &Datum", 0x33 - MENUITEM SEPARATOR - MENUITEM "&Automatisch anordnen", FCIDM_SHVIEW_AUTOARRANGE - END - MENUITEM "Icons anordnen", FCIDM_SHVIEW_SNAPTOGRID - MENUITEM SEPARATOR - MENUITEM "Aktualisieren", FCIDM_SHVIEW_REFRESH - MENUITEM SEPARATOR - MENUITEM "Einfügen", FCIDM_SHVIEW_INSERT - MENUITEM "Einfügen als Verweis", FCIDM_SHVIEW_INSERTLINK - MENUITEM SEPARATOR - POPUP "Neu" - BEGIN - MENUITEM "Neues Ver&zeichnis", FCIDM_SHVIEW_NEWFOLDER - MENUITEM "Neuer Ver&weis", FCIDM_SHVIEW_NEWLINK - MENUITEM SEPARATOR - END - MENUITEM SEPARATOR - MENUITEM "&Eigenschaften", FCIDM_SHVIEW_PROPERTIES - END -END - -/* - shellview item menu -*/ -MENU_SHV_FILE MENU DISCARDABLE -BEGIN - POPUP "" - BEGIN - MENUITEM "E&rkunden", FCIDM_SHVIEW_EXPLORE - MENUITEM "&Öffnen", FCIDM_SHVIEW_OPEN - MENUITEM SEPARATOR - MENUITEM "&Ausschneiden", FCIDM_SHVIEW_CUT - MENUITEM "&Kopieren", FCIDM_SHVIEW_COPY - MENUITEM SEPARATOR - MENUITEM "Erstelle Ver&weis", FCIDM_SHVIEW_CREATELINK - MENUITEM "&Löschen", FCIDM_SHVIEW_DELETE - MENUITEM "&Umbenennen", FCIDM_SHVIEW_RENAME - MENUITEM SEPARATOR - MENUITEM "&Eigenschaften", FCIDM_SHVIEW_PROPERTIES - END -END - -SHBRSFORFOLDER_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 188, 192 -STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU | DS_MODALFRAME | DS_SETFONT | DS_3DLOOK -CAPTION "Nach Verzeichnis durchsuchen" -FONT 8, "MS Shell Dlg" -{ - DEFPUSHBUTTON "OK", 1, 80, 176, 50, 12, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP - PUSHBUTTON "Abbrechen", 2, 134, 176, 50, 12, WS_GROUP | WS_TABSTOP - LTEXT "", IDD_TITLE, 4, 4, 180, 12 - LTEXT "", IDD_STATUS, 4, 25, 180, 12 - CONTROL "", IDD_TREEVIEW, "SysTreeView32", - TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | - WS_BORDER | WS_TABSTOP, - 4, 40, 180, 120 -} - -SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 210, 152 -STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Informationen über %s" -FONT 10, "MS Shell Dlg" -{ - DEFPUSHBUTTON "OK", IDOK, 153, 133, 50, 12, WS_TABSTOP - LISTBOX 99, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER - ICON "", 1088, 10, 10, 14, 16 - LTEXT "", 100, 30, 10, 137, 10 - LTEXT "", 101, 30, 22, 137, 10 - LTEXT "ReactOS wurde Ihnen zur Verfügung gestellt von:", 98, 8, 55, 137, 10 -} - -SHELL_RUN_DLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 -STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "" -FONT 8, "MS Shell Dlg" -{ - ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE - LTEXT "Den Namen eines Programmes, eines Ordners, eines Dokumentes oder einer Internet Ressource eingeben, und ReactOS wird es für Sie öffnen", 12289, 36, 11, 182, 18 - LTEXT "&Öffnen:", 12305, 7, 39, 24, 10 - CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 - DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP - PUSHBUTTON "Abbrechen", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP - PUSHBUTTON "&Durchsuchen...", 12288, 170, 63, 50, 14, WS_TABSTOP -} - -/* - special folders -*/ -STRINGTABLE DISCARDABLE -{ - IDS_DESKTOP "Desktop" - IDS_MYCOMPUTER "Arbeitsplatz" -} - -/* - context menus -*/ -STRINGTABLE DISCARDABLE -{ - IDS_VIEW_LARGE "&Große Symbole" - IDS_VIEW_SMALL "&Kleine Symbole" - IDS_VIEW_LIST "&Liste" - IDS_VIEW_DETAILS "&Details" - IDS_SELECT "Auswählen" - IDS_OPEN "Öffnen" -} - -STRINGTABLE DISCARDABLE -{ - IDS_CREATEFOLDER_DENIED "Es konnte kein neues Verzeichnis erstellt werden: Zugriff verweigert." - IDS_CREATEFOLDER_CAPTION "Es trat ein Fehler beim Erstellen eines neuen Verzeichnisses auf" - IDS_DELETEITEM_CAPTION "Bestätigung: Datei löschen" - IDS_DELETEFOLDER_CAPTION "Bestätigung: Verzeichnis löschen" - IDS_DELETEITEM_TEXT "Sind Sie sich sicher, dass Sie die Datei '%1' löschen möchten ?" - IDS_DELETEMULTIPLE_TEXT "Sind Sie sich sicher, dass Sie diese %1 Dateien löschen möchten ?" - IDS_OVERWRITEFILE_TEXT "Möchten Sie, dass die Datei '%1' überschrieben wird ?" - IDS_OVERWRITEFILE_CAPTION "Bestätigung: Datei überschreiben" -} - -/* columns in the shellview */ -STRINGTABLE -BEGIN - IDS_SHV_COLUMN1 "Datei" - IDS_SHV_COLUMN2 "Größe" - IDS_SHV_COLUMN3 "Typ" - IDS_SHV_COLUMN4 "Geändert" - IDS_SHV_COLUMN5 "Attribute" - IDS_SHV_COLUMN6 "Gesamtgröße" - IDS_SHV_COLUMN7 "Freier Speicher" - IDS_SHV_COLUMN8 "Name" - IDS_SHV_COLUMN9 "Kommentar" -END - -/* message box strings */ -STRINGTABLE DISCARDABLE -{ - IDS_RESTART_TITLE "Neustarten" - IDS_RESTART_PROMPT "Möchten Sie, dass ein simulierter Windows Neustart durchgeführt wird ?" - IDS_SHUTDOWN_TITLE "Anhalten" - IDS_SHUTDOWN_PROMPT "Möchten Sie die aktuelle ReactOS Sitzung beenden ?" -} +/* + * Copyright 1998 Juergen Schmied + * Copyright 2004 Henning Gerhardt + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +LANGUAGE LANG_GERMAN, SUBLANG_DEFAULT + +MENU_001 MENU DISCARDABLE +BEGIN + MENUITEM "&Große Symbole", FCIDM_SHVIEW_BIGICON + MENUITEM "&Kleine Symbole", FCIDM_SHVIEW_SMALLICON + MENUITEM "&Liste", FCIDM_SHVIEW_LISTVIEW + MENUITEM "&Details", FCIDM_SHVIEW_REPORTVIEW +END + +/* + shellview background menu +*/ +MENU_002 MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + POPUP "&Ansicht" + BEGIN + MENUITEM "&Große Symbole", FCIDM_SHVIEW_BIGICON + MENUITEM "&Kleine Symbole", FCIDM_SHVIEW_SMALLICON + MENUITEM "&Liste", FCIDM_SHVIEW_LISTVIEW + MENUITEM "&Details", FCIDM_SHVIEW_REPORTVIEW + END + MENUITEM SEPARATOR + POPUP "Symbole anordnen" + BEGIN + MENUITEM "Nach &Name", 0x30 /* column 0 */ + MENUITEM "Nach &Typ", 0x32 /* column 2 */ + MENUITEM "Nach &Größe", 0x31 /* ... */ + MENUITEM "Nach &Datum", 0x33 + MENUITEM SEPARATOR + MENUITEM "&Automatisch anordnen", FCIDM_SHVIEW_AUTOARRANGE + END + MENUITEM "Icons anordnen", FCIDM_SHVIEW_SNAPTOGRID + MENUITEM SEPARATOR + MENUITEM "Aktualisieren", FCIDM_SHVIEW_REFRESH + MENUITEM SEPARATOR + MENUITEM "Einfügen", FCIDM_SHVIEW_INSERT + MENUITEM "Einfügen als Verweis", FCIDM_SHVIEW_INSERTLINK + MENUITEM SEPARATOR + POPUP "Neu" + BEGIN + MENUITEM "Neues Ver&zeichnis", FCIDM_SHVIEW_NEWFOLDER + MENUITEM "Neuer Ver&weis", FCIDM_SHVIEW_NEWLINK + MENUITEM SEPARATOR + END + MENUITEM SEPARATOR + MENUITEM "&Eigenschaften", FCIDM_SHVIEW_PROPERTIES + END +END + +/* + shellview item menu +*/ +MENU_SHV_FILE MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + MENUITEM "E&rkunden", FCIDM_SHVIEW_EXPLORE + MENUITEM "&Öffnen", FCIDM_SHVIEW_OPEN + MENUITEM SEPARATOR + MENUITEM "&Ausschneiden", FCIDM_SHVIEW_CUT + MENUITEM "&Kopieren", FCIDM_SHVIEW_COPY + MENUITEM SEPARATOR + MENUITEM "Erstelle Ver&weis", FCIDM_SHVIEW_CREATELINK + MENUITEM "&Löschen", FCIDM_SHVIEW_DELETE + MENUITEM "&Umbenennen", FCIDM_SHVIEW_RENAME + MENUITEM SEPARATOR + MENUITEM "&Eigenschaften", FCIDM_SHVIEW_PROPERTIES + END +END + +SHBRSFORFOLDER_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 188, 192 +STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU | DS_MODALFRAME | DS_SETFONT | DS_3DLOOK +CAPTION "Nach Verzeichnis durchsuchen" +FONT 8, "MS Shell Dlg" +{ + DEFPUSHBUTTON "OK", 1, 80, 176, 50, 12, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP + PUSHBUTTON "Abbrechen", 2, 134, 176, 50, 12, WS_GROUP | WS_TABSTOP + LTEXT "", IDD_TITLE, 4, 4, 180, 12 + LTEXT "", IDD_STATUS, 4, 25, 180, 12 + CONTROL "", IDD_TREEVIEW, "SysTreeView32", + TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | + WS_BORDER | WS_TABSTOP, + 4, 40, 180, 120 +} + +SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 210, 152 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Informationen über %s" +FONT 10, "MS Shell Dlg" +{ + DEFPUSHBUTTON "OK", IDOK, 153, 133, 50, 12, WS_TABSTOP + LISTBOX 99, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER + ICON "", 1088, 10, 10, 14, 16 + LTEXT "", 100, 30, 10, 137, 10 + LTEXT "", 101, 30, 22, 137, 10 + LTEXT "ReactOS wurde Ihnen zur Verfügung gestellt von:", 98, 8, 55, 137, 10 +} + +SHELL_RUN_DLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "" +FONT 8, "MS Shell Dlg" +{ + ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE + LTEXT "Den Namen eines Programmes, eines Ordners, eines Dokumentes oder einer Internet Ressource eingeben, und ReactOS wird es für Sie öffnen", 12289, 36, 11, 182, 18 + LTEXT "&Öffnen:", 12305, 7, 39, 24, 10 + CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 + DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "Abbrechen", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "&Durchsuchen...", 12288, 170, 63, 50, 14, WS_TABSTOP +} + +/* + special folders +*/ +STRINGTABLE DISCARDABLE +{ + IDS_DESKTOP "Desktop" + IDS_MYCOMPUTER "Arbeitsplatz" +} + +/* + context menus +*/ +STRINGTABLE DISCARDABLE +{ + IDS_VIEW_LARGE "&Große Symbole" + IDS_VIEW_SMALL "&Kleine Symbole" + IDS_VIEW_LIST "&Liste" + IDS_VIEW_DETAILS "&Details" + IDS_SELECT "Auswählen" + IDS_OPEN "Öffnen" +} + +STRINGTABLE DISCARDABLE +{ + IDS_CREATEFOLDER_DENIED "Es konnte kein neues Verzeichnis erstellt werden: Zugriff verweigert." + IDS_CREATEFOLDER_CAPTION "Es trat ein Fehler beim Erstellen eines neuen Verzeichnisses auf" + IDS_DELETEITEM_CAPTION "Bestätigung: Datei löschen" + IDS_DELETEFOLDER_CAPTION "Bestätigung: Verzeichnis löschen" + IDS_DELETEITEM_TEXT "Sind Sie sich sicher, dass Sie die Datei '%1' löschen möchten ?" + IDS_DELETEMULTIPLE_TEXT "Sind Sie sich sicher, dass Sie diese %1 Dateien löschen möchten ?" + IDS_OVERWRITEFILE_TEXT "Möchten Sie, dass die Datei '%1' überschrieben wird ?" + IDS_OVERWRITEFILE_CAPTION "Bestätigung: Datei überschreiben" +} + +/* columns in the shellview */ +STRINGTABLE +BEGIN + IDS_SHV_COLUMN1 "Datei" + IDS_SHV_COLUMN2 "Größe" + IDS_SHV_COLUMN3 "Typ" + IDS_SHV_COLUMN4 "Geändert" + IDS_SHV_COLUMN5 "Attribute" + IDS_SHV_COLUMN6 "Gesamtgröße" + IDS_SHV_COLUMN7 "Freier Speicher" + IDS_SHV_COLUMN8 "Name" + IDS_SHV_COLUMN9 "Kommentar" +END + +/* message box strings */ +STRINGTABLE DISCARDABLE +{ + IDS_RESTART_TITLE "Neustarten" + IDS_RESTART_PROMPT "Möchten Sie, dass ein simulierter Windows Neustart durchgeführt wird ?" + IDS_SHUTDOWN_TITLE "Anhalten" + IDS_SHUTDOWN_PROMPT "Möchten Sie die aktuelle ReactOS Sitzung beenden ?" +} diff --git a/reactos/lib/shell32/shell32_En.rc b/reactos/lib/shell32/shell32_En.rc index a4a5cd06e4e..8a21d1259f4 100644 --- a/reactos/lib/shell32/shell32_En.rc +++ b/reactos/lib/shell32/shell32_En.rc @@ -1,221 +1,221 @@ -/* - * Copyright 1998 Juergen Schmied - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT - -MENU_001 MENU DISCARDABLE -BEGIN - MENUITEM "Lar&ge Icons", FCIDM_SHVIEW_BIGICON - MENUITEM "S&mall Icons", FCIDM_SHVIEW_SMALLICON - MENUITEM "&List", FCIDM_SHVIEW_LISTVIEW - MENUITEM "&Details", FCIDM_SHVIEW_REPORTVIEW -END - -/* - shellview background menu -*/ -MENU_002 MENU DISCARDABLE -BEGIN - POPUP "" - BEGIN - POPUP "&View" - BEGIN - MENUITEM "Lar&ge Icons", FCIDM_SHVIEW_BIGICON - MENUITEM "S&mall Icons", FCIDM_SHVIEW_SMALLICON - MENUITEM "&List", FCIDM_SHVIEW_LISTVIEW - MENUITEM "&Details", FCIDM_SHVIEW_REPORTVIEW - END - MENUITEM SEPARATOR - POPUP "Arrange &Icons" - BEGIN - MENUITEM "By &Name", 0x30 /* column 0 */ - MENUITEM "By &Type", 0x32 /* column 2 */ - MENUITEM "By &Size", 0x31 /* ... */ - MENUITEM "By &Date", 0x33 - MENUITEM SEPARATOR - MENUITEM "&Auto Arrange", FCIDM_SHVIEW_AUTOARRANGE - END - MENUITEM "Line up Icons", FCIDM_SHVIEW_SNAPTOGRID - MENUITEM SEPARATOR - MENUITEM "Refresh", FCIDM_SHVIEW_REFRESH - MENUITEM SEPARATOR - MENUITEM "Paste", FCIDM_SHVIEW_INSERT - MENUITEM "Paste as Link", FCIDM_SHVIEW_INSERTLINK - MENUITEM SEPARATOR - POPUP "New" - BEGIN - MENUITEM "New &Folder", FCIDM_SHVIEW_NEWFOLDER - MENUITEM "New &Link", FCIDM_SHVIEW_NEWLINK - MENUITEM SEPARATOR - END - MENUITEM SEPARATOR - MENUITEM "Properties", FCIDM_SHVIEW_PROPERTIES - END -END - -/* - shellview item menu -*/ -MENU_SHV_FILE MENU DISCARDABLE -BEGIN - POPUP "" - BEGIN - MENUITEM "E&xplore", FCIDM_SHVIEW_EXPLORE - MENUITEM "&Open", FCIDM_SHVIEW_OPEN - MENUITEM SEPARATOR - MENUITEM "C&ut", FCIDM_SHVIEW_CUT - MENUITEM "&Copy", FCIDM_SHVIEW_COPY - MENUITEM SEPARATOR - MENUITEM "Create &Link", FCIDM_SHVIEW_CREATELINK - MENUITEM "&Delete", FCIDM_SHVIEW_DELETE - MENUITEM "&Rename", FCIDM_SHVIEW_RENAME - MENUITEM SEPARATOR - MENUITEM "&Properties", FCIDM_SHVIEW_PROPERTIES - END -END - -SHBRSFORFOLDER_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 188, 192 -STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU | DS_MODALFRAME | DS_SETFONT | DS_3DLOOK -CAPTION "Browse for Folder" -FONT 8, "MS Shell Dlg" -{ - DEFPUSHBUTTON "OK", 1, 80, 176, 50, 12, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP - PUSHBUTTON "Cancel", 2, 134, 176, 50, 12, WS_GROUP | WS_TABSTOP - LTEXT "", IDD_TITLE, 4, 4, 180, 12 - LTEXT "", IDD_STATUS, 4, 25, 180, 12 - CONTROL "", IDD_TREEVIEW, "SysTreeView32", - TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | - WS_BORDER | WS_TABSTOP, - 4, 40, 180, 120 -} - -SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 210, 152 -STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "About %s" -FONT 10, "MS Shell Dlg" -{ - DEFPUSHBUTTON "OK", IDOK, 153, 133, 50, 12, WS_TABSTOP - LISTBOX 99, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER - ICON "", 1088, 10, 10, 14, 16 - LTEXT "", 100, 30, 10, 137, 10 - LTEXT "", 101, 30, 22, 137, 10 - LTEXT "ReactOS was brought to you by:", 98, 8, 55, 137, 10 -} - -SHELL_RUN_DLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 -STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "" -FONT 8, "MS Shell Dlg" -{ - ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE - LTEXT "Type the name of a program, folder, document, or Internet resource, and ReactOS will open it for you.", 12289, 36, 11, 182, 18 - LTEXT "&Open:", 12305, 7, 39, 24, 10 - CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 - DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP - PUSHBUTTON "Cancel", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP - PUSHBUTTON "&Browse...", 12288, 170, 63, 50, 14, WS_TABSTOP -} - -/* - special folders -*/ -STRINGTABLE DISCARDABLE -{ - IDS_DESKTOP "Desktop" - IDS_MYCOMPUTER "My Computer" -} - -/* - context menus -*/ -STRINGTABLE DISCARDABLE -{ - IDS_VIEW_LARGE "Lar&ge Icons" - IDS_VIEW_SMALL "S&mall Icons" - IDS_VIEW_LIST "&List" - IDS_VIEW_DETAILS "&Details" - IDS_SELECT "Select" - IDS_OPEN "Open" -} - -STRINGTABLE DISCARDABLE -{ - IDS_CREATEFOLDER_DENIED "Can not create new Folder: Permission denied." - IDS_CREATEFOLDER_CAPTION "Error during creation of a new folder" - IDS_DELETEITEM_CAPTION "Confirm file delete" - IDS_DELETEFOLDER_CAPTION "Confirm folder delete" - IDS_DELETEITEM_TEXT "Are you sure you want to delete '%1'?" - IDS_DELETEMULTIPLE_TEXT "Are you sure you want to delete these %1 items?" - IDS_OVERWRITEFILE_TEXT "OverWrite File %1?" - IDS_OVERWRITEFILE_CAPTION "Confirm File OverWrite" -} - -/* columns in the shellview */ -STRINGTABLE -BEGIN - IDS_SHV_COLUMN1 "File" - IDS_SHV_COLUMN2 "Size" - IDS_SHV_COLUMN3 "Type" - IDS_SHV_COLUMN4 "Modified" - IDS_SHV_COLUMN5 "Attributes" - IDS_SHV_COLUMN6 "Size" - IDS_SHV_COLUMN7 "Size available" - IDS_SHV_COLUMN8 "Name" - IDS_SHV_COLUMN9 "Comments" -END - -/* message box strings */ -STRINGTABLE DISCARDABLE -{ - IDS_RESTART_TITLE "Restart" - IDS_RESTART_PROMPT "Do you want to restart the system?" - IDS_SHUTDOWN_TITLE "Shutdown" - IDS_SHUTDOWN_PROMPT "Do you want to shutdown?" -} - -/* shell folder path default values */ -STRINGTABLE DISCARDABLE -{ - IDS_PROGRAMS "Start Menu\\Programs" - IDS_PERSONAL "My Documents" - IDS_FAVORITES "Favorites" - IDS_STARTUP "Start Menu\\Programs\\StartUp" - IDS_RECENT "Recent" - IDS_SENDTO "SendTo" - IDS_STARTMENU "Start Menu" - IDS_MYMUSIC "My Documents\\My Music" - IDS_MYVIDEO "My Documents\\My Video" - IDS_DESKTOPDIRECTORY "Desktop" - IDS_NETHOOD "NetHood" - IDS_TEMPLATES "Templates" - IDS_APPDATA "Application Data" - IDS_PRINTHOOD "PrintHood" - IDS_LOCAL_APPDATA "Local Settings\\Application Data" - IDS_INTERNET_CACHE "Temporary Internet Files" - IDS_COOKIES "Cookies" - IDS_HISTORY "History" - IDS_PROGRAM_FILES "Program Files" - IDS_MYPICTURES "My Documents\\My Pictures" - IDS_PROGRAM_FILES_COMMON "Program Files\\Common Files" - IDS_COMMON_DOCUMENTS "Documents" - IDS_ADMINTOOLS "Start Menu\\Programs\\Administrative Tools" - IDS_COMMON_MUSIC "Documents\\My Music" - IDS_COMMON_PICTURES "Documents\\My Pictures" - IDS_COMMON_VIDEO "Documents\\My Video" - IDS_CDBURN_AREA "Local Settings\\Application Data\\Microsoft\\CD Burning" -} +/* + * Copyright 1998 Juergen Schmied + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT + +MENU_001 MENU DISCARDABLE +BEGIN + MENUITEM "Lar&ge Icons", FCIDM_SHVIEW_BIGICON + MENUITEM "S&mall Icons", FCIDM_SHVIEW_SMALLICON + MENUITEM "&List", FCIDM_SHVIEW_LISTVIEW + MENUITEM "&Details", FCIDM_SHVIEW_REPORTVIEW +END + +/* + shellview background menu +*/ +MENU_002 MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + POPUP "&View" + BEGIN + MENUITEM "Lar&ge Icons", FCIDM_SHVIEW_BIGICON + MENUITEM "S&mall Icons", FCIDM_SHVIEW_SMALLICON + MENUITEM "&List", FCIDM_SHVIEW_LISTVIEW + MENUITEM "&Details", FCIDM_SHVIEW_REPORTVIEW + END + MENUITEM SEPARATOR + POPUP "Arrange &Icons" + BEGIN + MENUITEM "By &Name", 0x30 /* column 0 */ + MENUITEM "By &Type", 0x32 /* column 2 */ + MENUITEM "By &Size", 0x31 /* ... */ + MENUITEM "By &Date", 0x33 + MENUITEM SEPARATOR + MENUITEM "&Auto Arrange", FCIDM_SHVIEW_AUTOARRANGE + END + MENUITEM "Line up Icons", FCIDM_SHVIEW_SNAPTOGRID + MENUITEM SEPARATOR + MENUITEM "Refresh", FCIDM_SHVIEW_REFRESH + MENUITEM SEPARATOR + MENUITEM "Paste", FCIDM_SHVIEW_INSERT + MENUITEM "Paste as Link", FCIDM_SHVIEW_INSERTLINK + MENUITEM SEPARATOR + POPUP "New" + BEGIN + MENUITEM "New &Folder", FCIDM_SHVIEW_NEWFOLDER + MENUITEM "New &Link", FCIDM_SHVIEW_NEWLINK + MENUITEM SEPARATOR + END + MENUITEM SEPARATOR + MENUITEM "Properties", FCIDM_SHVIEW_PROPERTIES + END +END + +/* + shellview item menu +*/ +MENU_SHV_FILE MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + MENUITEM "E&xplore", FCIDM_SHVIEW_EXPLORE + MENUITEM "&Open", FCIDM_SHVIEW_OPEN + MENUITEM SEPARATOR + MENUITEM "C&ut", FCIDM_SHVIEW_CUT + MENUITEM "&Copy", FCIDM_SHVIEW_COPY + MENUITEM SEPARATOR + MENUITEM "Create &Link", FCIDM_SHVIEW_CREATELINK + MENUITEM "&Delete", FCIDM_SHVIEW_DELETE + MENUITEM "&Rename", FCIDM_SHVIEW_RENAME + MENUITEM SEPARATOR + MENUITEM "&Properties", FCIDM_SHVIEW_PROPERTIES + END +END + +SHBRSFORFOLDER_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 188, 192 +STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU | DS_MODALFRAME | DS_SETFONT | DS_3DLOOK +CAPTION "Browse for Folder" +FONT 8, "MS Shell Dlg" +{ + DEFPUSHBUTTON "OK", 1, 80, 176, 50, 12, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP + PUSHBUTTON "Cancel", 2, 134, 176, 50, 12, WS_GROUP | WS_TABSTOP + LTEXT "", IDD_TITLE, 4, 4, 180, 12 + LTEXT "", IDD_STATUS, 4, 25, 180, 12 + CONTROL "", IDD_TREEVIEW, "SysTreeView32", + TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | + WS_BORDER | WS_TABSTOP, + 4, 40, 180, 120 +} + +SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 210, 152 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "About %s" +FONT 10, "MS Shell Dlg" +{ + DEFPUSHBUTTON "OK", IDOK, 153, 133, 50, 12, WS_TABSTOP + LISTBOX 99, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER + ICON "", 1088, 10, 10, 14, 16 + LTEXT "", 100, 30, 10, 137, 10 + LTEXT "", 101, 30, 22, 137, 10 + LTEXT "ReactOS was brought to you by:", 98, 8, 55, 137, 10 +} + +SHELL_RUN_DLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "" +FONT 8, "MS Shell Dlg" +{ + ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE + LTEXT "Type the name of a program, folder, document, or Internet resource, and ReactOS will open it for you.", 12289, 36, 11, 182, 18 + LTEXT "&Open:", 12305, 7, 39, 24, 10 + CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 + DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "Cancel", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "&Browse...", 12288, 170, 63, 50, 14, WS_TABSTOP +} + +/* + special folders +*/ +STRINGTABLE DISCARDABLE +{ + IDS_DESKTOP "Desktop" + IDS_MYCOMPUTER "My Computer" +} + +/* + context menus +*/ +STRINGTABLE DISCARDABLE +{ + IDS_VIEW_LARGE "Lar&ge Icons" + IDS_VIEW_SMALL "S&mall Icons" + IDS_VIEW_LIST "&List" + IDS_VIEW_DETAILS "&Details" + IDS_SELECT "Select" + IDS_OPEN "Open" +} + +STRINGTABLE DISCARDABLE +{ + IDS_CREATEFOLDER_DENIED "Can not create new Folder: Permission denied." + IDS_CREATEFOLDER_CAPTION "Error during creation of a new folder" + IDS_DELETEITEM_CAPTION "Confirm file delete" + IDS_DELETEFOLDER_CAPTION "Confirm folder delete" + IDS_DELETEITEM_TEXT "Are you sure you want to delete '%1'?" + IDS_DELETEMULTIPLE_TEXT "Are you sure you want to delete these %1 items?" + IDS_OVERWRITEFILE_TEXT "OverWrite File %1?" + IDS_OVERWRITEFILE_CAPTION "Confirm File OverWrite" +} + +/* columns in the shellview */ +STRINGTABLE +BEGIN + IDS_SHV_COLUMN1 "File" + IDS_SHV_COLUMN2 "Size" + IDS_SHV_COLUMN3 "Type" + IDS_SHV_COLUMN4 "Modified" + IDS_SHV_COLUMN5 "Attributes" + IDS_SHV_COLUMN6 "Size" + IDS_SHV_COLUMN7 "Size available" + IDS_SHV_COLUMN8 "Name" + IDS_SHV_COLUMN9 "Comments" +END + +/* message box strings */ +STRINGTABLE DISCARDABLE +{ + IDS_RESTART_TITLE "Restart" + IDS_RESTART_PROMPT "Do you want to restart the system?" + IDS_SHUTDOWN_TITLE "Shutdown" + IDS_SHUTDOWN_PROMPT "Do you want to shutdown?" +} + +/* shell folder path default values */ +STRINGTABLE DISCARDABLE +{ + IDS_PROGRAMS "Start Menu\\Programs" + IDS_PERSONAL "My Documents" + IDS_FAVORITES "Favorites" + IDS_STARTUP "Start Menu\\Programs\\StartUp" + IDS_RECENT "Recent" + IDS_SENDTO "SendTo" + IDS_STARTMENU "Start Menu" + IDS_MYMUSIC "My Documents\\My Music" + IDS_MYVIDEO "My Documents\\My Video" + IDS_DESKTOPDIRECTORY "Desktop" + IDS_NETHOOD "NetHood" + IDS_TEMPLATES "Templates" + IDS_APPDATA "Application Data" + IDS_PRINTHOOD "PrintHood" + IDS_LOCAL_APPDATA "Local Settings\\Application Data" + IDS_INTERNET_CACHE "Temporary Internet Files" + IDS_COOKIES "Cookies" + IDS_HISTORY "History" + IDS_PROGRAM_FILES "Program Files" + IDS_MYPICTURES "My Documents\\My Pictures" + IDS_PROGRAM_FILES_COMMON "Program Files\\Common Files" + IDS_COMMON_DOCUMENTS "Documents" + IDS_ADMINTOOLS "Start Menu\\Programs\\Administrative Tools" + IDS_COMMON_MUSIC "Documents\\My Music" + IDS_COMMON_PICTURES "Documents\\My Pictures" + IDS_COMMON_VIDEO "Documents\\My Video" + IDS_CDBURN_AREA "Local Settings\\Application Data\\Microsoft\\CD Burning" +} diff --git a/reactos/lib/shell32/shell32_Eo.rc b/reactos/lib/shell32/shell32_Eo.rc index ce4517770fa..7aa142477c8 100644 --- a/reactos/lib/shell32/shell32_Eo.rc +++ b/reactos/lib/shell32/shell32_Eo.rc @@ -1,46 +1,46 @@ -/* - * Copyright 1998 Juergen Schmied - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -LANGUAGE LANG_ESPERANTO, SUBLANG_DEFAULT - -SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 210, 152 -STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Pri %s" -FONT 10, "MS Shell Dlg" -{ - DEFPUSHBUTTON "Enorde", IDOK, 153, 133, 50, 12, WS_TABSTOP - LISTBOX 99, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER - ICON "", 1088, 10, 10, 14, 16 - LTEXT "", 100, 30, 10, 137, 10 - LTEXT "", 101, 30, 22, 137, 10 - LTEXT "ReactOS was brought to you by:", 98, 8, 55, 137, 10 -} - -SHELL_RUN_DLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 -STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "" -FONT 8, "MS Shell Dlg" -{ - ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE - LTEXT "Type the name of a program, folder, document, or Internet resource, and ReactOS will open it for you.", 12289, 36, 11, 182, 18 - LTEXT "&Open:", 12305, 7, 39, 24, 10 - CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 - DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP - PUSHBUTTON "Cancel", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP - PUSHBUTTON "&Browse...", 12288, 170, 63, 50, 14, WS_TABSTOP -} +/* + * Copyright 1998 Juergen Schmied + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +LANGUAGE LANG_ESPERANTO, SUBLANG_DEFAULT + +SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 210, 152 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Pri %s" +FONT 10, "MS Shell Dlg" +{ + DEFPUSHBUTTON "Enorde", IDOK, 153, 133, 50, 12, WS_TABSTOP + LISTBOX 99, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER + ICON "", 1088, 10, 10, 14, 16 + LTEXT "", 100, 30, 10, 137, 10 + LTEXT "", 101, 30, 22, 137, 10 + LTEXT "ReactOS was brought to you by:", 98, 8, 55, 137, 10 +} + +SHELL_RUN_DLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "" +FONT 8, "MS Shell Dlg" +{ + ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE + LTEXT "Type the name of a program, folder, document, or Internet resource, and ReactOS will open it for you.", 12289, 36, 11, 182, 18 + LTEXT "&Open:", 12305, 7, 39, 24, 10 + CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 + DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "Cancel", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "&Browse...", 12288, 170, 63, 50, 14, WS_TABSTOP +} diff --git a/reactos/lib/shell32/shell32_Es.rc b/reactos/lib/shell32/shell32_Es.rc index 151960dc720..ec7bd2d9cf7 100644 --- a/reactos/lib/shell32/shell32_Es.rc +++ b/reactos/lib/shell32/shell32_Es.rc @@ -1,222 +1,222 @@ -/* - * Copyright 1998 Juergen Schmied - * Copyright 2003,2004 José Manuel Ferrer Ortiz - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -LANGUAGE LANG_SPANISH, SUBLANG_DEFAULT - -MENU_001 MENU DISCARDABLE -BEGIN - MENUITEM "Iconos &grandes", FCIDM_SHVIEW_BIGICON - MENUITEM "Iconos &pequeños", FCIDM_SHVIEW_SMALLICON - MENUITEM "&Lista", FCIDM_SHVIEW_LISTVIEW - MENUITEM "&Detalles", FCIDM_SHVIEW_REPORTVIEW -END - -/* - shellview background menu -*/ -MENU_002 MENU DISCARDABLE -BEGIN - POPUP "" - BEGIN - POPUP "&Ver" - BEGIN - MENUITEM "Iconos &grandes", FCIDM_SHVIEW_BIGICON - MENUITEM "Iconos &pequeños", FCIDM_SHVIEW_SMALLICON - MENUITEM "&Lista", FCIDM_SHVIEW_LISTVIEW - MENUITEM "&Detalles", FCIDM_SHVIEW_REPORTVIEW - END - MENUITEM SEPARATOR - POPUP "Ordenar &iconos" - BEGIN - MENUITEM "Por &nombre", 0x30 /* column 0 */ - MENUITEM "Por &tipo", 0x32 /* column 2 */ - MENUITEM "Por t&amaño", 0x31 /* ... */ - MENUITEM "Por &fecha", 0x33 - MENUITEM SEPARATOR - MENUITEM "&Ordenar automáticamente", FCIDM_SHVIEW_AUTOARRANGE - END - MENUITEM "Alinear iconos", FCIDM_SHVIEW_SNAPTOGRID - MENUITEM SEPARATOR - MENUITEM "Actualizar", FCIDM_SHVIEW_REFRESH - MENUITEM SEPARATOR - MENUITEM "Pegar", FCIDM_SHVIEW_INSERT - MENUITEM "Pegar acceso directo", FCIDM_SHVIEW_INSERTLINK - MENUITEM SEPARATOR - POPUP "Nuevo" - BEGIN - MENUITEM "Nueva &carpeta", FCIDM_SHVIEW_NEWFOLDER - MENUITEM "Nuevo &acceso directo", FCIDM_SHVIEW_NEWLINK - MENUITEM SEPARATOR - END - MENUITEM SEPARATOR - MENUITEM "Propiedades", FCIDM_SHVIEW_PROPERTIES - END -END - -/* - shellview item menu -*/ -MENU_SHV_FILE MENU DISCARDABLE -BEGIN - POPUP "" - BEGIN - MENUITEM "E&xplorar", FCIDM_SHVIEW_EXPLORE - MENUITEM "&Abrir", FCIDM_SHVIEW_OPEN - MENUITEM SEPARATOR - MENUITEM "C&ortar", FCIDM_SHVIEW_CUT - MENUITEM "&Copiar", FCIDM_SHVIEW_COPY - MENUITEM SEPARATOR - MENUITEM "C&rear acceso directo", FCIDM_SHVIEW_CREATELINK - MENUITEM "&Eliminar", FCIDM_SHVIEW_DELETE - MENUITEM "Re&nombrar", FCIDM_SHVIEW_RENAME - MENUITEM SEPARATOR - MENUITEM "&Propiedades", FCIDM_SHVIEW_PROPERTIES - END -END - -SHBRSFORFOLDER_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 188, 192 -STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU | DS_MODALFRAME | DS_SETFONT | DS_3DLOOK -CAPTION "Explorar carpeta" -FONT 8, "MS Shell Dlg" -{ - DEFPUSHBUTTON "Aceptar", 1, 80, 176, 50, 12, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP - PUSHBUTTON "Cancelar", 2, 134, 176, 50, 12, WS_GROUP | WS_TABSTOP - LTEXT "", IDD_TITLE, 4, 4, 180, 12 - LTEXT "", IDD_STATUS, 4, 25, 180, 12 - CONTROL "", IDD_TREEVIEW, "SysTreeView32", - TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | - WS_BORDER | WS_TABSTOP, - 4, 40, 180, 120 -} - -SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 210, 152 -STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Acerca de %s" -FONT 10, "MS Shell Dlg" -{ - DEFPUSHBUTTON "Aceptar", IDOK, 153, 133, 50, 12, WS_TABSTOP - LISTBOX 99, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER - ICON "", 1088, 10, 10, 14, 16 - LTEXT "", 100, 30, 10, 137, 10 - LTEXT "", 101, 30, 22, 137, 10 - LTEXT "ReactOS está disponible gracias a:", 98, 8, 55, 137, 10 -} - -SHELL_RUN_DLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 -STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "" -FONT 8, "MS Shell Dlg" -{ - ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE - LTEXT "Introduzca el nombre de un programa, carpeta, documento o recurso de Internet, y ReactOS lo abrirá para usted.", 12289, 36, 11, 182, 18 - LTEXT "&Abrir:", 12305, 7, 39, 24, 10 - CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 - DEFPUSHBUTTON "Aceptar", IDOK, 62, 63, 50, 14, WS_TABSTOP - PUSHBUTTON "Cancelar", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP - PUSHBUTTON "&Examinar...", 12288, 170, 63, 50, 14, WS_TABSTOP -} - -/* - special folders -*/ -STRINGTABLE DISCARDABLE -{ - IDS_DESKTOP "Escritorio" - IDS_MYCOMPUTER "Mi PC" -} - -/* - context menus -*/ -STRINGTABLE DISCARDABLE -{ - IDS_VIEW_LARGE "Iconos &grandes" - IDS_VIEW_SMALL "Iconos &pequeños" - IDS_VIEW_LIST "&Lista" - IDS_VIEW_DETAILS "&Detalles" - IDS_SELECT "Seleccionar" - IDS_OPEN "Abrir" -} - -STRINGTABLE DISCARDABLE -{ - IDS_CREATEFOLDER_DENIED "No se puede crear nueva carpeta: Permiso denegado." - IDS_CREATEFOLDER_CAPTION "Error durante la creación de una nueva carpeta" - IDS_DELETEITEM_CAPTION "Confirmar eliminación de archivo" - IDS_DELETEFOLDER_CAPTION "Confirmar eliminación de carpeta" - IDS_DELETEITEM_TEXT "¿Seguro que desea eliminar '%1'?" - IDS_DELETEMULTIPLE_TEXT "¿Seguro que desea eliminar estos %1 elementos?" - IDS_OVERWRITEFILE_TEXT "¿Sobreescribir el archivo '%1'?" - IDS_OVERWRITEFILE_CAPTION "Confirmar sobreescritura de archivo" -} - -/* columns in the shellview */ -STRINGTABLE -BEGIN - IDS_SHV_COLUMN1 "Archivo" - IDS_SHV_COLUMN2 "Tamaño" - IDS_SHV_COLUMN3 "Tipo" - IDS_SHV_COLUMN4 "Modificado" - IDS_SHV_COLUMN5 "Atributos" - IDS_SHV_COLUMN6 "Tamaño" - IDS_SHV_COLUMN7 "Tamaño disponible" - IDS_SHV_COLUMN8 "Nombre" - IDS_SHV_COLUMN9 "Comentarios" -END - -/* message box strings */ -STRINGTABLE DISCARDABLE -{ - IDS_RESTART_TITLE "Reiniciar" - IDS_RESTART_PROMPT "¿Desea simular un reinicio de Windows?" - IDS_SHUTDOWN_TITLE "Apagar" - IDS_SHUTDOWN_PROMPT "¿Desea terminar su sesión ReactOS?" -} - -/* shell folder path default values */ -STRINGTABLE DISCARDABLE -{ - IDS_PROGRAMS "Menú Inicio\\Programas" - IDS_PERSONAL "Mis documentos" - IDS_FAVORITES "Favoritos" - IDS_STARTUP "Menú Inicio\\Programas\\Inicio" - IDS_RECENT "Recent" - IDS_SENDTO "SendTo" - IDS_STARTMENU "Menú Inicio" - IDS_MYMUSIC "Mis documentos\\Mi música" - IDS_MYVIDEO "Mis documentos\\Mis vídeos" - IDS_DESKTOPDIRECTORY "Escritorio" - IDS_NETHOOD "Entorno de red" - IDS_TEMPLATES "Templates" - IDS_APPDATA "Application Data" - IDS_PRINTHOOD "PrintHood" - IDS_LOCAL_APPDATA "Configuración local\\Datos de programa" - IDS_INTERNET_CACHE "Archivos temporales de Internet" - IDS_COOKIES "Cookies" - IDS_HISTORY "Historial" - IDS_PROGRAM_FILES "Archivos de programa" - IDS_MYPICTURES "Mis documentos\\Mis imágenes" - IDS_PROGRAM_FILES_COMMON "Archivos de programa\\Archivos comunes" - IDS_COMMON_DOCUMENTS "Documentos" - IDS_ADMINTOOLS "Menú Inicio\\Programas\\Accesorios\\Herramientas del sistema" - IDS_COMMON_MUSIC "Documentos\\Mi música" - IDS_COMMON_PICTURES "Documentos\\Mis imágenes" - IDS_COMMON_VIDEO "Documentos\\Mis vídeos" - IDS_CDBURN_AREA "Configuración local\\Datos de programa\\Microsoft\\CD Burning" -} +/* + * Copyright 1998 Juergen Schmied + * Copyright 2003,2004 José Manuel Ferrer Ortiz + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +LANGUAGE LANG_SPANISH, SUBLANG_DEFAULT + +MENU_001 MENU DISCARDABLE +BEGIN + MENUITEM "Iconos &grandes", FCIDM_SHVIEW_BIGICON + MENUITEM "Iconos &pequeños", FCIDM_SHVIEW_SMALLICON + MENUITEM "&Lista", FCIDM_SHVIEW_LISTVIEW + MENUITEM "&Detalles", FCIDM_SHVIEW_REPORTVIEW +END + +/* + shellview background menu +*/ +MENU_002 MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + POPUP "&Ver" + BEGIN + MENUITEM "Iconos &grandes", FCIDM_SHVIEW_BIGICON + MENUITEM "Iconos &pequeños", FCIDM_SHVIEW_SMALLICON + MENUITEM "&Lista", FCIDM_SHVIEW_LISTVIEW + MENUITEM "&Detalles", FCIDM_SHVIEW_REPORTVIEW + END + MENUITEM SEPARATOR + POPUP "Ordenar &iconos" + BEGIN + MENUITEM "Por &nombre", 0x30 /* column 0 */ + MENUITEM "Por &tipo", 0x32 /* column 2 */ + MENUITEM "Por t&amaño", 0x31 /* ... */ + MENUITEM "Por &fecha", 0x33 + MENUITEM SEPARATOR + MENUITEM "&Ordenar automáticamente", FCIDM_SHVIEW_AUTOARRANGE + END + MENUITEM "Alinear iconos", FCIDM_SHVIEW_SNAPTOGRID + MENUITEM SEPARATOR + MENUITEM "Actualizar", FCIDM_SHVIEW_REFRESH + MENUITEM SEPARATOR + MENUITEM "Pegar", FCIDM_SHVIEW_INSERT + MENUITEM "Pegar acceso directo", FCIDM_SHVIEW_INSERTLINK + MENUITEM SEPARATOR + POPUP "Nuevo" + BEGIN + MENUITEM "Nueva &carpeta", FCIDM_SHVIEW_NEWFOLDER + MENUITEM "Nuevo &acceso directo", FCIDM_SHVIEW_NEWLINK + MENUITEM SEPARATOR + END + MENUITEM SEPARATOR + MENUITEM "Propiedades", FCIDM_SHVIEW_PROPERTIES + END +END + +/* + shellview item menu +*/ +MENU_SHV_FILE MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + MENUITEM "E&xplorar", FCIDM_SHVIEW_EXPLORE + MENUITEM "&Abrir", FCIDM_SHVIEW_OPEN + MENUITEM SEPARATOR + MENUITEM "C&ortar", FCIDM_SHVIEW_CUT + MENUITEM "&Copiar", FCIDM_SHVIEW_COPY + MENUITEM SEPARATOR + MENUITEM "C&rear acceso directo", FCIDM_SHVIEW_CREATELINK + MENUITEM "&Eliminar", FCIDM_SHVIEW_DELETE + MENUITEM "Re&nombrar", FCIDM_SHVIEW_RENAME + MENUITEM SEPARATOR + MENUITEM "&Propiedades", FCIDM_SHVIEW_PROPERTIES + END +END + +SHBRSFORFOLDER_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 188, 192 +STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU | DS_MODALFRAME | DS_SETFONT | DS_3DLOOK +CAPTION "Explorar carpeta" +FONT 8, "MS Shell Dlg" +{ + DEFPUSHBUTTON "Aceptar", 1, 80, 176, 50, 12, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP + PUSHBUTTON "Cancelar", 2, 134, 176, 50, 12, WS_GROUP | WS_TABSTOP + LTEXT "", IDD_TITLE, 4, 4, 180, 12 + LTEXT "", IDD_STATUS, 4, 25, 180, 12 + CONTROL "", IDD_TREEVIEW, "SysTreeView32", + TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | + WS_BORDER | WS_TABSTOP, + 4, 40, 180, 120 +} + +SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 210, 152 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Acerca de %s" +FONT 10, "MS Shell Dlg" +{ + DEFPUSHBUTTON "Aceptar", IDOK, 153, 133, 50, 12, WS_TABSTOP + LISTBOX 99, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER + ICON "", 1088, 10, 10, 14, 16 + LTEXT "", 100, 30, 10, 137, 10 + LTEXT "", 101, 30, 22, 137, 10 + LTEXT "ReactOS está disponible gracias a:", 98, 8, 55, 137, 10 +} + +SHELL_RUN_DLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "" +FONT 8, "MS Shell Dlg" +{ + ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE + LTEXT "Introduzca el nombre de un programa, carpeta, documento o recurso de Internet, y ReactOS lo abrirá para usted.", 12289, 36, 11, 182, 18 + LTEXT "&Abrir:", 12305, 7, 39, 24, 10 + CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 + DEFPUSHBUTTON "Aceptar", IDOK, 62, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "Cancelar", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "&Examinar...", 12288, 170, 63, 50, 14, WS_TABSTOP +} + +/* + special folders +*/ +STRINGTABLE DISCARDABLE +{ + IDS_DESKTOP "Escritorio" + IDS_MYCOMPUTER "Mi PC" +} + +/* + context menus +*/ +STRINGTABLE DISCARDABLE +{ + IDS_VIEW_LARGE "Iconos &grandes" + IDS_VIEW_SMALL "Iconos &pequeños" + IDS_VIEW_LIST "&Lista" + IDS_VIEW_DETAILS "&Detalles" + IDS_SELECT "Seleccionar" + IDS_OPEN "Abrir" +} + +STRINGTABLE DISCARDABLE +{ + IDS_CREATEFOLDER_DENIED "No se puede crear nueva carpeta: Permiso denegado." + IDS_CREATEFOLDER_CAPTION "Error durante la creación de una nueva carpeta" + IDS_DELETEITEM_CAPTION "Confirmar eliminación de archivo" + IDS_DELETEFOLDER_CAPTION "Confirmar eliminación de carpeta" + IDS_DELETEITEM_TEXT "¿Seguro que desea eliminar '%1'?" + IDS_DELETEMULTIPLE_TEXT "¿Seguro que desea eliminar estos %1 elementos?" + IDS_OVERWRITEFILE_TEXT "¿Sobreescribir el archivo '%1'?" + IDS_OVERWRITEFILE_CAPTION "Confirmar sobreescritura de archivo" +} + +/* columns in the shellview */ +STRINGTABLE +BEGIN + IDS_SHV_COLUMN1 "Archivo" + IDS_SHV_COLUMN2 "Tamaño" + IDS_SHV_COLUMN3 "Tipo" + IDS_SHV_COLUMN4 "Modificado" + IDS_SHV_COLUMN5 "Atributos" + IDS_SHV_COLUMN6 "Tamaño" + IDS_SHV_COLUMN7 "Tamaño disponible" + IDS_SHV_COLUMN8 "Nombre" + IDS_SHV_COLUMN9 "Comentarios" +END + +/* message box strings */ +STRINGTABLE DISCARDABLE +{ + IDS_RESTART_TITLE "Reiniciar" + IDS_RESTART_PROMPT "¿Desea simular un reinicio de Windows?" + IDS_SHUTDOWN_TITLE "Apagar" + IDS_SHUTDOWN_PROMPT "¿Desea terminar su sesión ReactOS?" +} + +/* shell folder path default values */ +STRINGTABLE DISCARDABLE +{ + IDS_PROGRAMS "Menú Inicio\\Programas" + IDS_PERSONAL "Mis documentos" + IDS_FAVORITES "Favoritos" + IDS_STARTUP "Menú Inicio\\Programas\\Inicio" + IDS_RECENT "Recent" + IDS_SENDTO "SendTo" + IDS_STARTMENU "Menú Inicio" + IDS_MYMUSIC "Mis documentos\\Mi música" + IDS_MYVIDEO "Mis documentos\\Mis vídeos" + IDS_DESKTOPDIRECTORY "Escritorio" + IDS_NETHOOD "Entorno de red" + IDS_TEMPLATES "Templates" + IDS_APPDATA "Application Data" + IDS_PRINTHOOD "PrintHood" + IDS_LOCAL_APPDATA "Configuración local\\Datos de programa" + IDS_INTERNET_CACHE "Archivos temporales de Internet" + IDS_COOKIES "Cookies" + IDS_HISTORY "Historial" + IDS_PROGRAM_FILES "Archivos de programa" + IDS_MYPICTURES "Mis documentos\\Mis imágenes" + IDS_PROGRAM_FILES_COMMON "Archivos de programa\\Archivos comunes" + IDS_COMMON_DOCUMENTS "Documentos" + IDS_ADMINTOOLS "Menú Inicio\\Programas\\Accesorios\\Herramientas del sistema" + IDS_COMMON_MUSIC "Documentos\\Mi música" + IDS_COMMON_PICTURES "Documentos\\Mis imágenes" + IDS_COMMON_VIDEO "Documentos\\Mis vídeos" + IDS_CDBURN_AREA "Configuración local\\Datos de programa\\Microsoft\\CD Burning" +} diff --git a/reactos/lib/shell32/shell32_Fi.rc b/reactos/lib/shell32/shell32_Fi.rc index 709aed26e5f..c70d8a75034 100644 --- a/reactos/lib/shell32/shell32_Fi.rc +++ b/reactos/lib/shell32/shell32_Fi.rc @@ -1,46 +1,46 @@ -/* - * Copyright 1998 Juergen Schmied - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -LANGUAGE LANG_FINNISH, SUBLANG_DEFAULT - -SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 210, 152 -STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Tietoja: %s" -FONT 10, "MS Shell Dlg" -{ - DEFPUSHBUTTON "OK", IDOK, 153, 133, 50, 12, WS_TABSTOP - LISTBOX 99, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER - ICON "", 1088, 10, 10, 14, 16 - LTEXT "", 100, 30, 10, 137, 10 - LTEXT "", 101, 30, 22, 137, 10 - LTEXT "ReactOS:n tekijät:", 98, 8, 55, 137, 10 -} - -SHELL_RUN_DLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 -STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "" -FONT 8, "MS Shell Dlg" -{ - ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE - LTEXT "Type the name of a program, folder, document, or Internet resource, and ReactOS will open it for you.", 12289, 36, 11, 182, 18 - LTEXT "&Open:", 12305, 7, 39, 24, 10 - CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 - DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP - PUSHBUTTON "Cancel", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP - PUSHBUTTON "&Browse...", 12288, 170, 63, 50, 14, WS_TABSTOP -} +/* + * Copyright 1998 Juergen Schmied + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +LANGUAGE LANG_FINNISH, SUBLANG_DEFAULT + +SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 210, 152 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Tietoja: %s" +FONT 10, "MS Shell Dlg" +{ + DEFPUSHBUTTON "OK", IDOK, 153, 133, 50, 12, WS_TABSTOP + LISTBOX 99, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER + ICON "", 1088, 10, 10, 14, 16 + LTEXT "", 100, 30, 10, 137, 10 + LTEXT "", 101, 30, 22, 137, 10 + LTEXT "ReactOS:n tekijät:", 98, 8, 55, 137, 10 +} + +SHELL_RUN_DLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "" +FONT 8, "MS Shell Dlg" +{ + ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE + LTEXT "Type the name of a program, folder, document, or Internet resource, and ReactOS will open it for you.", 12289, 36, 11, 182, 18 + LTEXT "&Open:", 12305, 7, 39, 24, 10 + CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 + DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "Cancel", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "&Browse...", 12288, 170, 63, 50, 14, WS_TABSTOP +} diff --git a/reactos/lib/shell32/shell32_Fr.rc b/reactos/lib/shell32/shell32_Fr.rc index b8cdd92a794..ac8d6416ef7 100644 --- a/reactos/lib/shell32/shell32_Fr.rc +++ b/reactos/lib/shell32/shell32_Fr.rc @@ -1,224 +1,224 @@ -/* - * Shell32 - * French language support - * - * Copyright 1998 Juergen Schmied - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL - -MENU_001 MENU DISCARDABLE -BEGIN - MENUITEM "&Grands icônes", FCIDM_SHVIEW_BIGICON - MENUITEM "&Petits icônes", FCIDM_SHVIEW_SMALLICON - MENUITEM "&Liste", FCIDM_SHVIEW_LISTVIEW - MENUITEM "&Détails", FCIDM_SHVIEW_REPORTVIEW -END - -/* - shellview background menu -*/ -MENU_002 MENU DISCARDABLE -BEGIN - POPUP "" - BEGIN - POPUP "&Affichage" - BEGIN - MENUITEM "&Grands icônes", FCIDM_SHVIEW_BIGICON - MENUITEM "&Petits icônes", FCIDM_SHVIEW_SMALLICON - MENUITEM "&Liste", FCIDM_SHVIEW_LISTVIEW - MENUITEM "&Détails", FCIDM_SHVIEW_REPORTVIEW - END - MENUITEM SEPARATOR - POPUP "Trier les &icônes" - BEGIN - MENUITEM "Par &nom", 0x30 /* column 0 */ - MENUITEM "Par &type", 0x32 /* column 2 */ - MENUITEM "Par t&aille", 0x31 /* ... */ - MENUITEM "Par &date", 0x33 - MENUITEM SEPARATOR - MENUITEM "T&ri automatique", FCIDM_SHVIEW_AUTOARRANGE - END - MENUITEM "Aligner les icônes", FCIDM_SHVIEW_SNAPTOGRID - MENUITEM SEPARATOR - MENUITEM "Rafraîchir", FCIDM_SHVIEW_REFRESH - MENUITEM SEPARATOR - MENUITEM "Coller", FCIDM_SHVIEW_INSERT - MENUITEM "Coller comme un lien", FCIDM_SHVIEW_INSERTLINK - MENUITEM SEPARATOR - POPUP "Nouveau" - BEGIN - MENUITEM "Nouveau d&ossier", FCIDM_SHVIEW_NEWFOLDER - MENUITEM "Nouveau &lien", FCIDM_SHVIEW_NEWLINK - MENUITEM SEPARATOR - END - MENUITEM SEPARATOR - MENUITEM "Propriétés", FCIDM_SHVIEW_PROPERTIES - END -END - -/* - shellview item menu -*/ -MENU_SHV_FILE MENU DISCARDABLE -BEGIN - POPUP "" - BEGIN - MENUITEM "E&xplorer", FCIDM_SHVIEW_EXPLORE - MENUITEM "&Ouvrir", FCIDM_SHVIEW_OPEN - MENUITEM SEPARATOR - MENUITEM "C&ouper", FCIDM_SHVIEW_CUT - MENUITEM "&Copier", FCIDM_SHVIEW_COPY - MENUITEM SEPARATOR - MENUITEM "Créer un &lien", FCIDM_SHVIEW_CREATELINK - MENUITEM "&Supprimer", FCIDM_SHVIEW_DELETE - MENUITEM "&Renommer", FCIDM_SHVIEW_RENAME - MENUITEM SEPARATOR - MENUITEM "&Propriétés", FCIDM_SHVIEW_PROPERTIES - END -END - -SHBRSFORFOLDER_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 188, 192 -STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU | DS_MODALFRAME | DS_SETFONT | DS_3DLOOK -CAPTION "Parcourir" -FONT 8, "MS Shell Dlg" -{ - DEFPUSHBUTTON "OK", 1, 80, 176, 50, 12, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP - PUSHBUTTON "Annuler", 2, 134, 176, 50, 12, WS_GROUP | WS_TABSTOP - LTEXT "", IDD_TITLE, 4, 4, 180, 12 - LTEXT "", IDD_STATUS, 4, 25, 180, 12 - CONTROL "", IDD_TREEVIEW, "SysTreeView32", - TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | - WS_BORDER | WS_TABSTOP, - 4, 40, 180, 120 -} - -SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 210, 152 -STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "À propos de %s" -FONT 10, "MS Shell Dlg" -{ - DEFPUSHBUTTON "OK", IDOK, 153, 133, 50, 12, WS_TABSTOP - LISTBOX 99, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER - ICON "", 1088, 10, 10, 14, 16 - LTEXT "", 100, 30, 10, 137, 10 - LTEXT "", 101, 30, 22, 137, 10 - LTEXT "ReactOS est une réalisation de :", 98, 8, 55, 137, 10 -} - -SHELL_RUN_DLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 -STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "" -FONT 8, "MS Shell Dlg" -{ - ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE - LTEXT "Entrez le nom d'un programme, d'un dossier, d'un document ou d'une ressource Internet, et ReactOS l'ouvrira pour vous.", 12289, 36, 11, 182, 18 - LTEXT "&Ouvrir :", 12305, 7, 39, 24, 10 - CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 - DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP - PUSHBUTTON "Annuler", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP - PUSHBUTTON "&Parcourir...", 12288, 170, 63, 50, 14, WS_TABSTOP -} - -/* - special folders -*/ -STRINGTABLE DISCARDABLE -{ - IDS_DESKTOP "Bureau" - IDS_MYCOMPUTER "Poste de travail" -} - -/* - context menus -*/ -STRINGTABLE DISCARDABLE -{ - IDS_VIEW_LARGE "&Grands icônes" - IDS_VIEW_SMALL "&Petits icônes" - IDS_VIEW_LIST "&Liste" - IDS_VIEW_DETAILS "&Détails" - IDS_SELECT "Sélectionner" - IDS_OPEN "Ouvrir" -} - -STRINGTABLE DISCARDABLE -{ - IDS_CREATEFOLDER_DENIED "Impossible de créer le nouveau dossier : permission refusée." - IDS_CREATEFOLDER_CAPTION "Erreur lors de la création du nouveau dossier" - IDS_DELETEITEM_CAPTION "Confirmer la suppression du fichier" - IDS_DELETEFOLDER_CAPTION "Confirmer la suppression du dossier" - IDS_DELETEITEM_TEXT "Êtes-vous sûr de vouloir supprimer '%1'?" - IDS_DELETEMULTIPLE_TEXT "Êtes-vous sût de vouloir supprimer ces %1 items ?" - IDS_OVERWRITEFILE_TEXT "Écraser le fichier %1?" - IDS_OVERWRITEFILE_CAPTION "Confirmer l'écrasement du fichier" -} - -/* columns in the shellview */ -STRINGTABLE -BEGIN - IDS_SHV_COLUMN1 "Fichier" - IDS_SHV_COLUMN2 "Taille" - IDS_SHV_COLUMN3 "Type" - IDS_SHV_COLUMN4 "Modifié" - IDS_SHV_COLUMN5 "Attributs" - IDS_SHV_COLUMN6 "Capacité" - IDS_SHV_COLUMN7 "Espace disponible" - IDS_SHV_COLUMN8 "Nom" - IDS_SHV_COLUMN9 "Commentaires" -END - -/* message box strings */ -STRINGTABLE DISCARDABLE -{ - IDS_RESTART_TITLE "Redémarrer" - IDS_RESTART_PROMPT "Voulez-vous simuler le redémarrage de Windows?" - IDS_SHUTDOWN_TITLE "Arrêter" - IDS_SHUTDOWN_PROMPT "Voulez-vous fermer la session ReactOS?" -} - -/* shell folder path default values */ -STRINGTABLE DISCARDABLE -{ - IDS_PROGRAMS "Menu Démarrer\\Programmes" - IDS_PERSONAL "Mes documents" - IDS_FAVORITES "Favoris" - IDS_STARTUP "Menu Démarrer\\Programmes\\Démarrage" - IDS_RECENT "Recent" - IDS_SENDTO "SendTo" - IDS_STARTMENU "Menu Démarrer" - IDS_MYMUSIC "Mes documents\\Ma musique" - IDS_MYVIDEO "Mes documents\\Mes vidéos" - IDS_DESKTOPDIRECTORY "Bureau" - IDS_NETHOOD "Voisinage Réseau" - IDS_TEMPLATES "Modèles" - IDS_APPDATA "Application Data" - IDS_PRINTHOOD "Voisinage d'impression" - IDS_LOCAL_APPDATA "Local Settings\\Application Data" - IDS_INTERNET_CACHE "Temporary Internet Files" - IDS_COOKIES "Cookies" - IDS_HISTORY "Historique" - IDS_PROGRAM_FILES "Program Files" - IDS_MYPICTURES "Mes documents\\Mes images" - IDS_PROGRAM_FILES_COMMON "Program Files\\Fichiers communs" - IDS_COMMON_DOCUMENTS "Documents" - IDS_ADMINTOOLS "Menu Démarrer\\Programmes\\Outils d'administration" - IDS_COMMON_MUSIC "Documents\\Ma musique" - IDS_COMMON_PICTURES "Documents\\Mes images" - IDS_COMMON_VIDEO "Documents\\Mes vidéos" - IDS_CDBURN_AREA "Local Settings\\Application Data\\Microsoft\\CD Burning" -} +/* + * Shell32 + * French language support + * + * Copyright 1998 Juergen Schmied + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL + +MENU_001 MENU DISCARDABLE +BEGIN + MENUITEM "&Grands icônes", FCIDM_SHVIEW_BIGICON + MENUITEM "&Petits icônes", FCIDM_SHVIEW_SMALLICON + MENUITEM "&Liste", FCIDM_SHVIEW_LISTVIEW + MENUITEM "&Détails", FCIDM_SHVIEW_REPORTVIEW +END + +/* + shellview background menu +*/ +MENU_002 MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + POPUP "&Affichage" + BEGIN + MENUITEM "&Grands icônes", FCIDM_SHVIEW_BIGICON + MENUITEM "&Petits icônes", FCIDM_SHVIEW_SMALLICON + MENUITEM "&Liste", FCIDM_SHVIEW_LISTVIEW + MENUITEM "&Détails", FCIDM_SHVIEW_REPORTVIEW + END + MENUITEM SEPARATOR + POPUP "Trier les &icônes" + BEGIN + MENUITEM "Par &nom", 0x30 /* column 0 */ + MENUITEM "Par &type", 0x32 /* column 2 */ + MENUITEM "Par t&aille", 0x31 /* ... */ + MENUITEM "Par &date", 0x33 + MENUITEM SEPARATOR + MENUITEM "T&ri automatique", FCIDM_SHVIEW_AUTOARRANGE + END + MENUITEM "Aligner les icônes", FCIDM_SHVIEW_SNAPTOGRID + MENUITEM SEPARATOR + MENUITEM "Rafraîchir", FCIDM_SHVIEW_REFRESH + MENUITEM SEPARATOR + MENUITEM "Coller", FCIDM_SHVIEW_INSERT + MENUITEM "Coller comme un lien", FCIDM_SHVIEW_INSERTLINK + MENUITEM SEPARATOR + POPUP "Nouveau" + BEGIN + MENUITEM "Nouveau d&ossier", FCIDM_SHVIEW_NEWFOLDER + MENUITEM "Nouveau &lien", FCIDM_SHVIEW_NEWLINK + MENUITEM SEPARATOR + END + MENUITEM SEPARATOR + MENUITEM "Propriétés", FCIDM_SHVIEW_PROPERTIES + END +END + +/* + shellview item menu +*/ +MENU_SHV_FILE MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + MENUITEM "E&xplorer", FCIDM_SHVIEW_EXPLORE + MENUITEM "&Ouvrir", FCIDM_SHVIEW_OPEN + MENUITEM SEPARATOR + MENUITEM "C&ouper", FCIDM_SHVIEW_CUT + MENUITEM "&Copier", FCIDM_SHVIEW_COPY + MENUITEM SEPARATOR + MENUITEM "Créer un &lien", FCIDM_SHVIEW_CREATELINK + MENUITEM "&Supprimer", FCIDM_SHVIEW_DELETE + MENUITEM "&Renommer", FCIDM_SHVIEW_RENAME + MENUITEM SEPARATOR + MENUITEM "&Propriétés", FCIDM_SHVIEW_PROPERTIES + END +END + +SHBRSFORFOLDER_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 188, 192 +STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU | DS_MODALFRAME | DS_SETFONT | DS_3DLOOK +CAPTION "Parcourir" +FONT 8, "MS Shell Dlg" +{ + DEFPUSHBUTTON "OK", 1, 80, 176, 50, 12, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP + PUSHBUTTON "Annuler", 2, 134, 176, 50, 12, WS_GROUP | WS_TABSTOP + LTEXT "", IDD_TITLE, 4, 4, 180, 12 + LTEXT "", IDD_STATUS, 4, 25, 180, 12 + CONTROL "", IDD_TREEVIEW, "SysTreeView32", + TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | + WS_BORDER | WS_TABSTOP, + 4, 40, 180, 120 +} + +SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 210, 152 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "À propos de %s" +FONT 10, "MS Shell Dlg" +{ + DEFPUSHBUTTON "OK", IDOK, 153, 133, 50, 12, WS_TABSTOP + LISTBOX 99, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER + ICON "", 1088, 10, 10, 14, 16 + LTEXT "", 100, 30, 10, 137, 10 + LTEXT "", 101, 30, 22, 137, 10 + LTEXT "ReactOS est une réalisation de :", 98, 8, 55, 137, 10 +} + +SHELL_RUN_DLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "" +FONT 8, "MS Shell Dlg" +{ + ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE + LTEXT "Entrez le nom d'un programme, d'un dossier, d'un document ou d'une ressource Internet, et ReactOS l'ouvrira pour vous.", 12289, 36, 11, 182, 18 + LTEXT "&Ouvrir :", 12305, 7, 39, 24, 10 + CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 + DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "Annuler", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "&Parcourir...", 12288, 170, 63, 50, 14, WS_TABSTOP +} + +/* + special folders +*/ +STRINGTABLE DISCARDABLE +{ + IDS_DESKTOP "Bureau" + IDS_MYCOMPUTER "Poste de travail" +} + +/* + context menus +*/ +STRINGTABLE DISCARDABLE +{ + IDS_VIEW_LARGE "&Grands icônes" + IDS_VIEW_SMALL "&Petits icônes" + IDS_VIEW_LIST "&Liste" + IDS_VIEW_DETAILS "&Détails" + IDS_SELECT "Sélectionner" + IDS_OPEN "Ouvrir" +} + +STRINGTABLE DISCARDABLE +{ + IDS_CREATEFOLDER_DENIED "Impossible de créer le nouveau dossier : permission refusée." + IDS_CREATEFOLDER_CAPTION "Erreur lors de la création du nouveau dossier" + IDS_DELETEITEM_CAPTION "Confirmer la suppression du fichier" + IDS_DELETEFOLDER_CAPTION "Confirmer la suppression du dossier" + IDS_DELETEITEM_TEXT "Êtes-vous sûr de vouloir supprimer '%1'?" + IDS_DELETEMULTIPLE_TEXT "Êtes-vous sût de vouloir supprimer ces %1 items ?" + IDS_OVERWRITEFILE_TEXT "Écraser le fichier %1?" + IDS_OVERWRITEFILE_CAPTION "Confirmer l'écrasement du fichier" +} + +/* columns in the shellview */ +STRINGTABLE +BEGIN + IDS_SHV_COLUMN1 "Fichier" + IDS_SHV_COLUMN2 "Taille" + IDS_SHV_COLUMN3 "Type" + IDS_SHV_COLUMN4 "Modifié" + IDS_SHV_COLUMN5 "Attributs" + IDS_SHV_COLUMN6 "Capacité" + IDS_SHV_COLUMN7 "Espace disponible" + IDS_SHV_COLUMN8 "Nom" + IDS_SHV_COLUMN9 "Commentaires" +END + +/* message box strings */ +STRINGTABLE DISCARDABLE +{ + IDS_RESTART_TITLE "Redémarrer" + IDS_RESTART_PROMPT "Voulez-vous simuler le redémarrage de Windows?" + IDS_SHUTDOWN_TITLE "Arrêter" + IDS_SHUTDOWN_PROMPT "Voulez-vous fermer la session ReactOS?" +} + +/* shell folder path default values */ +STRINGTABLE DISCARDABLE +{ + IDS_PROGRAMS "Menu Démarrer\\Programmes" + IDS_PERSONAL "Mes documents" + IDS_FAVORITES "Favoris" + IDS_STARTUP "Menu Démarrer\\Programmes\\Démarrage" + IDS_RECENT "Recent" + IDS_SENDTO "SendTo" + IDS_STARTMENU "Menu Démarrer" + IDS_MYMUSIC "Mes documents\\Ma musique" + IDS_MYVIDEO "Mes documents\\Mes vidéos" + IDS_DESKTOPDIRECTORY "Bureau" + IDS_NETHOOD "Voisinage Réseau" + IDS_TEMPLATES "Modèles" + IDS_APPDATA "Application Data" + IDS_PRINTHOOD "Voisinage d'impression" + IDS_LOCAL_APPDATA "Local Settings\\Application Data" + IDS_INTERNET_CACHE "Temporary Internet Files" + IDS_COOKIES "Cookies" + IDS_HISTORY "Historique" + IDS_PROGRAM_FILES "Program Files" + IDS_MYPICTURES "Mes documents\\Mes images" + IDS_PROGRAM_FILES_COMMON "Program Files\\Fichiers communs" + IDS_COMMON_DOCUMENTS "Documents" + IDS_ADMINTOOLS "Menu Démarrer\\Programmes\\Outils d'administration" + IDS_COMMON_MUSIC "Documents\\Ma musique" + IDS_COMMON_PICTURES "Documents\\Mes images" + IDS_COMMON_VIDEO "Documents\\Mes vidéos" + IDS_CDBURN_AREA "Local Settings\\Application Data\\Microsoft\\CD Burning" +} diff --git a/reactos/lib/shell32/shell32_Hu.rc b/reactos/lib/shell32/shell32_Hu.rc index 0de8dcfbc18..1a37e3d9741 100644 --- a/reactos/lib/shell32/shell32_Hu.rc +++ b/reactos/lib/shell32/shell32_Hu.rc @@ -1,46 +1,46 @@ -/* - * Copyright 1998 Juergen Schmied - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -LANGUAGE LANG_HUNGARIAN, SUBLANG_DEFAULT - -SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 210, 152 -STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "A %s-rõl" -FONT 10, "MS Shell Dlg" -{ - DEFPUSHBUTTON "OK", IDOK, 153, 133, 50, 12, WS_TABSTOP - LISTBOX 99, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER - ICON "", 1088, 10, 10, 14, 16 - LTEXT "", 100, 30, 10, 137, 10 - LTEXT "", 101, 30, 22, 137, 10 - LTEXT "A ReactOS-t írták:", 98, 8, 55, 137, 10 -} - -SHELL_RUN_DLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 -STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "" -FONT 8, "MS Shell Dlg" -{ - ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE - LTEXT "Type the name of a program, folder, document, or Internet resource, and ReactOS will open it for you.", 12289, 36, 11, 182, 18 - LTEXT "&Open:", 12305, 7, 39, 24, 10 - CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 - DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP - PUSHBUTTON "Cancel", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP - PUSHBUTTON "&Browse...", 12288, 170, 63, 50, 14, WS_TABSTOP -} +/* + * Copyright 1998 Juergen Schmied + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +LANGUAGE LANG_HUNGARIAN, SUBLANG_DEFAULT + +SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 210, 152 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "A %s-rõl" +FONT 10, "MS Shell Dlg" +{ + DEFPUSHBUTTON "OK", IDOK, 153, 133, 50, 12, WS_TABSTOP + LISTBOX 99, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER + ICON "", 1088, 10, 10, 14, 16 + LTEXT "", 100, 30, 10, 137, 10 + LTEXT "", 101, 30, 22, 137, 10 + LTEXT "A ReactOS-t írták:", 98, 8, 55, 137, 10 +} + +SHELL_RUN_DLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "" +FONT 8, "MS Shell Dlg" +{ + ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE + LTEXT "Type the name of a program, folder, document, or Internet resource, and ReactOS will open it for you.", 12289, 36, 11, 182, 18 + LTEXT "&Open:", 12305, 7, 39, 24, 10 + CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 + DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "Cancel", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "&Browse...", 12288, 170, 63, 50, 14, WS_TABSTOP +} diff --git a/reactos/lib/shell32/shell32_It.rc b/reactos/lib/shell32/shell32_It.rc index 36ae5fb74c1..dbcf96fb9db 100644 --- a/reactos/lib/shell32/shell32_It.rc +++ b/reactos/lib/shell32/shell32_It.rc @@ -1,191 +1,191 @@ -/* - * Copyright 1998 Juergen Schmied - * Copyright 2003-2004 Puoti - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -LANGUAGE LANG_ITALIAN, SUBLANG_DEFAULT - -MENU_001 MENU DISCARDABLE -BEGIN - MENUITEM "&Icone Grandi", FCIDM_SHVIEW_BIGICON - MENUITEM "&Icone Piccole", FCIDM_SHVIEW_SMALLICON - MENUITEM "&Lista", FCIDM_SHVIEW_LISTVIEW - MENUITEM "&Dettagli", FCIDM_SHVIEW_REPORTVIEW -END - -/* - shellview background menu -*/ -MENU_002 MENU DISCARDABLE -BEGIN - POPUP "" - BEGIN - POPUP "&Visualizza" - BEGIN - MENUITEM "&Icone Grandi", FCIDM_SHVIEW_BIGICON - MENUITEM "&Icone Piccole", FCIDM_SHVIEW_SMALLICON - MENUITEM "&Lista", FCIDM_SHVIEW_LISTVIEW - MENUITEM "&Dettagli", FCIDM_SHVIEW_REPORTVIEW - END - MENUITEM SEPARATOR - POPUP "Disponi &Icone" - BEGIN - MENUITEM "Per &Nome", 0x30 /* column 0 */ - MENUITEM "Per &Tipo", 0x32 /* column 2 */ - MENUITEM "Per &Dimensione", 0x31 /* ... */ - MENUITEM "Per &Data", 0x33 - MENUITEM SEPARATOR - MENUITEM "&Disponi Automaticamente", FCIDM_SHVIEW_AUTOARRANGE - END - MENUITEM "Allinea Icone", FCIDM_SHVIEW_SNAPTOGRID - MENUITEM SEPARATOR - MENUITEM "Aggiorna", FCIDM_SHVIEW_REFRESH - MENUITEM SEPARATOR - MENUITEM "Incolla", FCIDM_SHVIEW_INSERT - MENUITEM "Crea Collegamento", FCIDM_SHVIEW_INSERTLINK - MENUITEM SEPARATOR - POPUP "Nuovo" - BEGIN - MENUITEM "Nuova &Cartella", FCIDM_SHVIEW_NEWFOLDER - MENUITEM "Nuovo &Collegamento", FCIDM_SHVIEW_NEWLINK - MENUITEM SEPARATOR - END - MENUITEM SEPARATOR - MENUITEM "Proprietà", FCIDM_SHVIEW_PROPERTIES - END -END - -/* - shellview item menu -*/ -MENU_SHV_FILE MENU DISCARDABLE -BEGIN - POPUP "" - BEGIN - MENUITEM "E&splora", FCIDM_SHVIEW_EXPLORE - MENUITEM "&Apri", FCIDM_SHVIEW_OPEN - MENUITEM SEPARATOR - MENUITEM "&Taglia", FCIDM_SHVIEW_CUT - MENUITEM "&Copia", FCIDM_SHVIEW_COPY - MENUITEM SEPARATOR - MENUITEM "&Crea Collegamento", FCIDM_SHVIEW_CREATELINK - MENUITEM "&Cancella", FCIDM_SHVIEW_DELETE - MENUITEM "&Rinomina", FCIDM_SHVIEW_RENAME - MENUITEM SEPARATOR - MENUITEM "&Proprietà", FCIDM_SHVIEW_PROPERTIES - END -END - -SHBRSFORFOLDER_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 188, 192 -STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU | DS_MODALFRAME | DS_SETFONT | DS_3DLOOK -CAPTION "Sfoglia Cartella" -FONT 8, "MS Shell Dlg" -{ - DEFPUSHBUTTON "OK", 1, 80, 176, 50, 12, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP - PUSHBUTTON "Annulla", 2, 134, 176, 50, 12, WS_GROUP | WS_TABSTOP - LTEXT "", IDD_TITLE, 4, 4, 180, 12 - LTEXT "", IDD_STATUS, 4, 25, 180, 12 - CONTROL "", IDD_TREEVIEW, "SysTreeView32", - TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | - WS_BORDER | WS_TABSTOP, - 4, 40, 180, 120 -} - -SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 210, 152 -STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Informazioni su %s" -FONT 10, "MS Shell Dlg" -{ - DEFPUSHBUTTON "OK", IDOK, 153, 133, 50, 12, WS_TABSTOP - LISTBOX 99, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER - ICON "", 1088, 10, 10, 14, 16 - LTEXT "", 100, 30, 10, 137, 10 - LTEXT "", 101, 30, 22, 137, 10 - LTEXT "ReactOS è disponibile grazie a:", 98, 8, 55, 137, 10 -} - -SHELL_RUN_DLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 -STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "" -FONT 8, "MS Shell Dlg" -{ - ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE - LTEXT "Digitare il nome del programma, della cartella, del documento o della risorsa internet, e ReactOS la aprirà.", 12289, 36, 11, 182, 18 - LTEXT "&Apri:", 12305, 7, 39, 24, 10 - CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 - DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP - PUSHBUTTON "Annulla", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP - PUSHBUTTON "&Esplora...", 12288, 170, 63, 50, 14, WS_TABSTOP -} - -/* - special folders -*/ -STRINGTABLE DISCARDABLE -{ - IDS_DESKTOP "Desktop" - IDS_MYCOMPUTER "Risorse del Computer" -} - -/* - context menus -*/ -STRINGTABLE DISCARDABLE -{ - IDS_VIEW_LARGE "&Icone Grandi" - IDS_VIEW_SMALL "I&cone Piccole" - IDS_VIEW_LIST "&Lista" - IDS_VIEW_DETAILS "&Dettagli" - IDS_SELECT "Selezione" - IDS_OPEN "Apri" -} - -STRINGTABLE DISCARDABLE -{ - IDS_CREATEFOLDER_DENIED "Impossibile creare la cartella: Accesso negato." - IDS_CREATEFOLDER_CAPTION "Errore durante la creazione della cartella" - IDS_DELETEITEM_CAPTION "Confermare la cancallazione del file" - IDS_DELETEFOLDER_CAPTION "Confermare la cancellazione della cartella" - IDS_DELETEITEM_TEXT "Sei sicuro di voler cancellare '%1'?" - IDS_DELETEMULTIPLE_TEXT "Sei sicuro di voler cancellare questi %1 elementi?" - IDS_OVERWRITEFILE_TEXT "Sovrascrivere il File %1?" - IDS_OVERWRITEFILE_CAPTION "Confermare la sovrascrizione del File" -} - -/* columns in the shellview */ -STRINGTABLE -BEGIN - IDS_SHV_COLUMN1 "File" - IDS_SHV_COLUMN2 "Dimensione" - IDS_SHV_COLUMN3 "Tipo" - IDS_SHV_COLUMN4 "Modificato" - IDS_SHV_COLUMN5 "Attributi" - IDS_SHV_COLUMN6 "Dimensione" - IDS_SHV_COLUMN7 "Dimensione disponibile" - IDS_SHV_COLUMN8 "Nome" - IDS_SHV_COLUMN9 "Commenti" -END - - -/* message box strings */ -STRINGTABLE DISCARDABLE -{ - IDS_RESTART_TITLE "Riavvia" - IDS_RESTART_PROMPT "Vuoi simulare un riavvio do Windows?" - IDS_SHUTDOWN_TITLE "Termina sessione" - IDS_SHUTDOWN_PROMPT "Vuoi terminare la sessione di ReactOS?" -} +/* + * Copyright 1998 Juergen Schmied + * Copyright 2003-2004 Puoti + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +LANGUAGE LANG_ITALIAN, SUBLANG_DEFAULT + +MENU_001 MENU DISCARDABLE +BEGIN + MENUITEM "&Icone Grandi", FCIDM_SHVIEW_BIGICON + MENUITEM "&Icone Piccole", FCIDM_SHVIEW_SMALLICON + MENUITEM "&Lista", FCIDM_SHVIEW_LISTVIEW + MENUITEM "&Dettagli", FCIDM_SHVIEW_REPORTVIEW +END + +/* + shellview background menu +*/ +MENU_002 MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + POPUP "&Visualizza" + BEGIN + MENUITEM "&Icone Grandi", FCIDM_SHVIEW_BIGICON + MENUITEM "&Icone Piccole", FCIDM_SHVIEW_SMALLICON + MENUITEM "&Lista", FCIDM_SHVIEW_LISTVIEW + MENUITEM "&Dettagli", FCIDM_SHVIEW_REPORTVIEW + END + MENUITEM SEPARATOR + POPUP "Disponi &Icone" + BEGIN + MENUITEM "Per &Nome", 0x30 /* column 0 */ + MENUITEM "Per &Tipo", 0x32 /* column 2 */ + MENUITEM "Per &Dimensione", 0x31 /* ... */ + MENUITEM "Per &Data", 0x33 + MENUITEM SEPARATOR + MENUITEM "&Disponi Automaticamente", FCIDM_SHVIEW_AUTOARRANGE + END + MENUITEM "Allinea Icone", FCIDM_SHVIEW_SNAPTOGRID + MENUITEM SEPARATOR + MENUITEM "Aggiorna", FCIDM_SHVIEW_REFRESH + MENUITEM SEPARATOR + MENUITEM "Incolla", FCIDM_SHVIEW_INSERT + MENUITEM "Crea Collegamento", FCIDM_SHVIEW_INSERTLINK + MENUITEM SEPARATOR + POPUP "Nuovo" + BEGIN + MENUITEM "Nuova &Cartella", FCIDM_SHVIEW_NEWFOLDER + MENUITEM "Nuovo &Collegamento", FCIDM_SHVIEW_NEWLINK + MENUITEM SEPARATOR + END + MENUITEM SEPARATOR + MENUITEM "Proprietà", FCIDM_SHVIEW_PROPERTIES + END +END + +/* + shellview item menu +*/ +MENU_SHV_FILE MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + MENUITEM "E&splora", FCIDM_SHVIEW_EXPLORE + MENUITEM "&Apri", FCIDM_SHVIEW_OPEN + MENUITEM SEPARATOR + MENUITEM "&Taglia", FCIDM_SHVIEW_CUT + MENUITEM "&Copia", FCIDM_SHVIEW_COPY + MENUITEM SEPARATOR + MENUITEM "&Crea Collegamento", FCIDM_SHVIEW_CREATELINK + MENUITEM "&Cancella", FCIDM_SHVIEW_DELETE + MENUITEM "&Rinomina", FCIDM_SHVIEW_RENAME + MENUITEM SEPARATOR + MENUITEM "&Proprietà", FCIDM_SHVIEW_PROPERTIES + END +END + +SHBRSFORFOLDER_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 188, 192 +STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU | DS_MODALFRAME | DS_SETFONT | DS_3DLOOK +CAPTION "Sfoglia Cartella" +FONT 8, "MS Shell Dlg" +{ + DEFPUSHBUTTON "OK", 1, 80, 176, 50, 12, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP + PUSHBUTTON "Annulla", 2, 134, 176, 50, 12, WS_GROUP | WS_TABSTOP + LTEXT "", IDD_TITLE, 4, 4, 180, 12 + LTEXT "", IDD_STATUS, 4, 25, 180, 12 + CONTROL "", IDD_TREEVIEW, "SysTreeView32", + TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | + WS_BORDER | WS_TABSTOP, + 4, 40, 180, 120 +} + +SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 210, 152 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Informazioni su %s" +FONT 10, "MS Shell Dlg" +{ + DEFPUSHBUTTON "OK", IDOK, 153, 133, 50, 12, WS_TABSTOP + LISTBOX 99, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER + ICON "", 1088, 10, 10, 14, 16 + LTEXT "", 100, 30, 10, 137, 10 + LTEXT "", 101, 30, 22, 137, 10 + LTEXT "ReactOS è disponibile grazie a:", 98, 8, 55, 137, 10 +} + +SHELL_RUN_DLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "" +FONT 8, "MS Shell Dlg" +{ + ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE + LTEXT "Digitare il nome del programma, della cartella, del documento o della risorsa internet, e ReactOS la aprirà.", 12289, 36, 11, 182, 18 + LTEXT "&Apri:", 12305, 7, 39, 24, 10 + CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 + DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "Annulla", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "&Esplora...", 12288, 170, 63, 50, 14, WS_TABSTOP +} + +/* + special folders +*/ +STRINGTABLE DISCARDABLE +{ + IDS_DESKTOP "Desktop" + IDS_MYCOMPUTER "Risorse del Computer" +} + +/* + context menus +*/ +STRINGTABLE DISCARDABLE +{ + IDS_VIEW_LARGE "&Icone Grandi" + IDS_VIEW_SMALL "I&cone Piccole" + IDS_VIEW_LIST "&Lista" + IDS_VIEW_DETAILS "&Dettagli" + IDS_SELECT "Selezione" + IDS_OPEN "Apri" +} + +STRINGTABLE DISCARDABLE +{ + IDS_CREATEFOLDER_DENIED "Impossibile creare la cartella: Accesso negato." + IDS_CREATEFOLDER_CAPTION "Errore durante la creazione della cartella" + IDS_DELETEITEM_CAPTION "Confermare la cancallazione del file" + IDS_DELETEFOLDER_CAPTION "Confermare la cancellazione della cartella" + IDS_DELETEITEM_TEXT "Sei sicuro di voler cancellare '%1'?" + IDS_DELETEMULTIPLE_TEXT "Sei sicuro di voler cancellare questi %1 elementi?" + IDS_OVERWRITEFILE_TEXT "Sovrascrivere il File %1?" + IDS_OVERWRITEFILE_CAPTION "Confermare la sovrascrizione del File" +} + +/* columns in the shellview */ +STRINGTABLE +BEGIN + IDS_SHV_COLUMN1 "File" + IDS_SHV_COLUMN2 "Dimensione" + IDS_SHV_COLUMN3 "Tipo" + IDS_SHV_COLUMN4 "Modificato" + IDS_SHV_COLUMN5 "Attributi" + IDS_SHV_COLUMN6 "Dimensione" + IDS_SHV_COLUMN7 "Dimensione disponibile" + IDS_SHV_COLUMN8 "Nome" + IDS_SHV_COLUMN9 "Commenti" +END + + +/* message box strings */ +STRINGTABLE DISCARDABLE +{ + IDS_RESTART_TITLE "Riavvia" + IDS_RESTART_PROMPT "Vuoi simulare un riavvio do Windows?" + IDS_SHUTDOWN_TITLE "Termina sessione" + IDS_SHUTDOWN_PROMPT "Vuoi terminare la sessione di ReactOS?" +} diff --git a/reactos/lib/shell32/shell32_Ja.rc b/reactos/lib/shell32/shell32_Ja.rc index 90306a7e09b..963c1a18b1d 100644 --- a/reactos/lib/shell32/shell32_Ja.rc +++ b/reactos/lib/shell32/shell32_Ja.rc @@ -1,140 +1,140 @@ -/* - * Copyright 1998 Juergen Schmied - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT - -MENU_001 MENU DISCARDABLE -BEGIN - MENUITEM "‘å‚«‚ȱ²ºÝ(&G)", FCIDM_SHVIEW_BIGICON - MENUITEM "¬‚³‚ȱ²ºÝ(&M)", FCIDM_SHVIEW_SMALLICON - MENUITEM "ˆê——(&L)", FCIDM_SHVIEW_LISTVIEW - MENUITEM "Ú×(&D)", FCIDM_SHVIEW_REPORTVIEW -END - -MENU_002 MENU DISCARDABLE -BEGIN - POPUP "" - BEGIN - POPUP "•\\ަ(&V)" - BEGIN - MENUITEM "‘å‚«‚¢ƒAƒCƒRƒ“(&G)", FCIDM_SHVIEW_BIGICON - MENUITEM "¬‚³‚¢ƒAƒCƒRƒ“(&M)", FCIDM_SHVIEW_SMALLICON - MENUITEM "ˆê——(&L)", FCIDM_SHVIEW_LISTVIEW - MENUITEM "Ú×(&D)", FCIDM_SHVIEW_REPORTVIEW - END - MENUITEM SEPARATOR - POPUP "ƒAƒCƒRƒ“‚Ì®—ñ(&I)" - BEGIN - MENUITEM "–¼‘O‡(&N)", 0x30 /* column 0 */ - MENUITEM "Ží—Þ‡(&T)", 0x32 /* column 2 */ - MENUITEM "ƒTƒCƒY‡(&S)", 0x31 /* ... */ - MENUITEM "“ú•t‡(&D)", 0x33 - MENUITEM SEPARATOR - MENUITEM "ƒAƒCƒRƒ“‚ÌŽ©“®®—ñ(&A)", FCIDM_SHVIEW_AUTOARRANGE - END - MENUITEM "“™ŠÔŠu‚É®—ñ", FCIDM_SHVIEW_SNAPTOGRID - MENUITEM SEPARATOR - MENUITEM "“\\‚è•t‚¯", FCIDM_SHVIEW_INSERT - MENUITEM "ƒVƒ‡[ƒgƒJƒbƒg‚Ì“\\‚è•t‚¯", FCIDM_SHVIEW_INSERTLINK - POPUP "V‹Kì¬" - BEGIN - MENUITEM "V‹KƒtƒHƒ‹ƒ_(&F)", 0x7053 - MENUITEM "V‹KƒVƒ‡[ƒgƒJƒbƒg(&L)", 0x7052 - MENUITEM SEPARATOR - END - MENUITEM "ƒvƒƒpƒeƒB", FCIDM_SHVIEW_PROPERTIES - END -END - -MENU_SHV_FILE MENU DISCARDABLE -BEGIN - POPUP "" - BEGIN - MENUITEM "Ø‚èŽæ‚è(&U)", FCIDM_SHVIEW_CUT - MENUITEM "ƒRƒs[(&C)", FCIDM_SHVIEW_COPY - MENUITEM SEPARATOR - MENUITEM "ƒVƒ‡[ƒgƒJƒbƒg‚Ìì¬(&L)", 0x7051 - MENUITEM "íœ(&D)", FCIDM_SHVIEW_DELETE - MENUITEM "–¼‘O‚Ì•ÏX(&R)", 0x7050 - MENUITEM SEPARATOR - MENUITEM "ƒvƒƒpƒeƒB(&P)", FCIDM_SHVIEW_PROPERTIES - END -END - -/* - special folders -*/ -STRINGTABLE DISCARDABLE -{ - IDS_DESKTOP "ÃÞ½¸Ä¯Ìß" - IDS_MYCOMPUTER "ϲºÝËß­°À" -} - -/* - context menus -*/ -STRINGTABLE DISCARDABLE -{ - IDS_VIEW_LARGE "‘å‚«‚¢ƒAƒCƒRƒ“(&G)" - IDS_VIEW_SMALL "¬‚³‚¢ƒAƒCƒRƒ“(&M)" - IDS_VIEW_LIST "ˆê——(&L)" - IDS_VIEW_DETAILS "Ú×(&D)" - IDS_SELECT "‘I‘ð" - IDS_OPEN "ŠJ‚­" -} - -SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 210, 152 -STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "%s ‚ɂ‚¢‚Ä" -FONT 10, "MS Shell Dlg" -{ - DEFPUSHBUTTON "OK", IDOK, 153, 133, 50, 12, WS_TABSTOP - LISTBOX 99, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER - ICON "", 1088, 10, 10, 14, 16 - LTEXT "", 100, 30, 10, 137, 10 - LTEXT "", 101, 30, 22, 137, 10 - LTEXT "ReactOS was brought to you by:", 98, 8, 55, 137, 10 -} - -SHELL_RUN_DLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 -STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "" -FONT 8, "MS Shell Dlg" -{ - ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE - LTEXT "Type the name of a program, folder, document, or Internet resource, and ReactOS will open it for you.", 12289, 36, 11, 182, 18 - LTEXT "&Open:", 12305, 7, 39, 24, 10 - CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 - DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP - PUSHBUTTON "Cancel", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP - PUSHBUTTON "&Browse...", 12288, 170, 63, 50, 14, WS_TABSTOP -} - -/* columns in the shellview */ -STRINGTABLE DISCARDABLE -BEGIN - IDS_SHV_COLUMN1 "–¼‘O" - IDS_SHV_COLUMN2 "ƒTƒCƒY" - IDS_SHV_COLUMN3 "ƒtƒ@ƒCƒ‹‚ÌŽí—Þ" - IDS_SHV_COLUMN4 "XV“úŽž" - IDS_SHV_COLUMN5 "‘®«" - IDS_SHV_COLUMN6 "‡ŒvƒTƒCƒY" - IDS_SHV_COLUMN7 "‹ó‚«—e—Ê" - IDS_SHV_COLUMN8 "Name" /*FIXME*/ - IDS_SHV_COLUMN9 "Comments" /*FIXME*/ -END +/* + * Copyright 1998 Juergen Schmied + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT + +MENU_001 MENU DISCARDABLE +BEGIN + MENUITEM "‘å‚«‚ȱ²ºÝ(&G)", FCIDM_SHVIEW_BIGICON + MENUITEM "¬‚³‚ȱ²ºÝ(&M)", FCIDM_SHVIEW_SMALLICON + MENUITEM "ˆê——(&L)", FCIDM_SHVIEW_LISTVIEW + MENUITEM "Ú×(&D)", FCIDM_SHVIEW_REPORTVIEW +END + +MENU_002 MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + POPUP "•\\ަ(&V)" + BEGIN + MENUITEM "‘å‚«‚¢ƒAƒCƒRƒ“(&G)", FCIDM_SHVIEW_BIGICON + MENUITEM "¬‚³‚¢ƒAƒCƒRƒ“(&M)", FCIDM_SHVIEW_SMALLICON + MENUITEM "ˆê——(&L)", FCIDM_SHVIEW_LISTVIEW + MENUITEM "Ú×(&D)", FCIDM_SHVIEW_REPORTVIEW + END + MENUITEM SEPARATOR + POPUP "ƒAƒCƒRƒ“‚Ì®—ñ(&I)" + BEGIN + MENUITEM "–¼‘O‡(&N)", 0x30 /* column 0 */ + MENUITEM "Ží—Þ‡(&T)", 0x32 /* column 2 */ + MENUITEM "ƒTƒCƒY‡(&S)", 0x31 /* ... */ + MENUITEM "“ú•t‡(&D)", 0x33 + MENUITEM SEPARATOR + MENUITEM "ƒAƒCƒRƒ“‚ÌŽ©“®®—ñ(&A)", FCIDM_SHVIEW_AUTOARRANGE + END + MENUITEM "“™ŠÔŠu‚É®—ñ", FCIDM_SHVIEW_SNAPTOGRID + MENUITEM SEPARATOR + MENUITEM "“\\‚è•t‚¯", FCIDM_SHVIEW_INSERT + MENUITEM "ƒVƒ‡[ƒgƒJƒbƒg‚Ì“\\‚è•t‚¯", FCIDM_SHVIEW_INSERTLINK + POPUP "V‹Kì¬" + BEGIN + MENUITEM "V‹KƒtƒHƒ‹ƒ_(&F)", 0x7053 + MENUITEM "V‹KƒVƒ‡[ƒgƒJƒbƒg(&L)", 0x7052 + MENUITEM SEPARATOR + END + MENUITEM "ƒvƒƒpƒeƒB", FCIDM_SHVIEW_PROPERTIES + END +END + +MENU_SHV_FILE MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + MENUITEM "Ø‚èŽæ‚è(&U)", FCIDM_SHVIEW_CUT + MENUITEM "ƒRƒs[(&C)", FCIDM_SHVIEW_COPY + MENUITEM SEPARATOR + MENUITEM "ƒVƒ‡[ƒgƒJƒbƒg‚Ìì¬(&L)", 0x7051 + MENUITEM "íœ(&D)", FCIDM_SHVIEW_DELETE + MENUITEM "–¼‘O‚Ì•ÏX(&R)", 0x7050 + MENUITEM SEPARATOR + MENUITEM "ƒvƒƒpƒeƒB(&P)", FCIDM_SHVIEW_PROPERTIES + END +END + +/* + special folders +*/ +STRINGTABLE DISCARDABLE +{ + IDS_DESKTOP "ÃÞ½¸Ä¯Ìß" + IDS_MYCOMPUTER "ϲºÝËß­°À" +} + +/* + context menus +*/ +STRINGTABLE DISCARDABLE +{ + IDS_VIEW_LARGE "‘å‚«‚¢ƒAƒCƒRƒ“(&G)" + IDS_VIEW_SMALL "¬‚³‚¢ƒAƒCƒRƒ“(&M)" + IDS_VIEW_LIST "ˆê——(&L)" + IDS_VIEW_DETAILS "Ú×(&D)" + IDS_SELECT "‘I‘ð" + IDS_OPEN "ŠJ‚­" +} + +SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 210, 152 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "%s ‚ɂ‚¢‚Ä" +FONT 10, "MS Shell Dlg" +{ + DEFPUSHBUTTON "OK", IDOK, 153, 133, 50, 12, WS_TABSTOP + LISTBOX 99, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER + ICON "", 1088, 10, 10, 14, 16 + LTEXT "", 100, 30, 10, 137, 10 + LTEXT "", 101, 30, 22, 137, 10 + LTEXT "ReactOS was brought to you by:", 98, 8, 55, 137, 10 +} + +SHELL_RUN_DLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "" +FONT 8, "MS Shell Dlg" +{ + ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE + LTEXT "Type the name of a program, folder, document, or Internet resource, and ReactOS will open it for you.", 12289, 36, 11, 182, 18 + LTEXT "&Open:", 12305, 7, 39, 24, 10 + CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 + DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "Cancel", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "&Browse...", 12288, 170, 63, 50, 14, WS_TABSTOP +} + +/* columns in the shellview */ +STRINGTABLE DISCARDABLE +BEGIN + IDS_SHV_COLUMN1 "–¼‘O" + IDS_SHV_COLUMN2 "ƒTƒCƒY" + IDS_SHV_COLUMN3 "ƒtƒ@ƒCƒ‹‚ÌŽí—Þ" + IDS_SHV_COLUMN4 "XV“úŽž" + IDS_SHV_COLUMN5 "‘®«" + IDS_SHV_COLUMN6 "‡ŒvƒTƒCƒY" + IDS_SHV_COLUMN7 "‹ó‚«—e—Ê" + IDS_SHV_COLUMN8 "Name" /*FIXME*/ + IDS_SHV_COLUMN9 "Comments" /*FIXME*/ +END diff --git a/reactos/lib/shell32/shell32_Ko.rc b/reactos/lib/shell32/shell32_Ko.rc index 11975eb7641..b536c38eb47 100644 --- a/reactos/lib/shell32/shell32_Ko.rc +++ b/reactos/lib/shell32/shell32_Ko.rc @@ -1,46 +1,46 @@ -/* - * Copyright 1998 Juergen Schmied - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -LANGUAGE LANG_KOREAN, SUBLANG_DEFAULT - -SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 210, 152 -STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "%s¿¡ °üÇÏ¿©" -FONT 10, "MS Shell Dlg" -{ - DEFPUSHBUTTON "È®ÀÎ", IDOK, 153, 133, 50, 12, WS_TABSTOP - LISTBOX 99, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER - ICON "", 1088, 10, 10, 14, 16 - LTEXT "", 100, 30, 10, 137, 10 - LTEXT "", 101, 30, 22, 137, 10 - LTEXT "ReactOS was brought to you by:", 98, 8, 55, 137, 10 -} - -SHELL_RUN_DLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 -STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "" -FONT 8, "MS Shell Dlg" -{ - ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE - LTEXT "Type the name of a program, folder, document, or Internet resource, and ReactOS will open it for you.", 12289, 36, 11, 182, 18 - LTEXT "&Open:", 12305, 7, 39, 24, 10 - CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 - DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP - PUSHBUTTON "Cancel", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP - PUSHBUTTON "&Browse...", 12288, 170, 63, 50, 14, WS_TABSTOP -} +/* + * Copyright 1998 Juergen Schmied + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +LANGUAGE LANG_KOREAN, SUBLANG_DEFAULT + +SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 210, 152 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "%s¿¡ °üÇÏ¿©" +FONT 10, "MS Shell Dlg" +{ + DEFPUSHBUTTON "È®ÀÎ", IDOK, 153, 133, 50, 12, WS_TABSTOP + LISTBOX 99, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER + ICON "", 1088, 10, 10, 14, 16 + LTEXT "", 100, 30, 10, 137, 10 + LTEXT "", 101, 30, 22, 137, 10 + LTEXT "ReactOS was brought to you by:", 98, 8, 55, 137, 10 +} + +SHELL_RUN_DLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "" +FONT 8, "MS Shell Dlg" +{ + ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE + LTEXT "Type the name of a program, folder, document, or Internet resource, and ReactOS will open it for you.", 12289, 36, 11, 182, 18 + LTEXT "&Open:", 12305, 7, 39, 24, 10 + CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 + DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "Cancel", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "&Browse...", 12288, 170, 63, 50, 14, WS_TABSTOP +} diff --git a/reactos/lib/shell32/shell32_Nl.rc b/reactos/lib/shell32/shell32_Nl.rc index 2e4975b791c..26f89165659 100644 --- a/reactos/lib/shell32/shell32_Nl.rc +++ b/reactos/lib/shell32/shell32_Nl.rc @@ -1,46 +1,46 @@ -/* - * Copyright 1998 Juergen Schmied - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -LANGUAGE LANG_DUTCH, SUBLANG_DEFAULT - -SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 210, 152 -STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Info %s" -FONT 10, "MS Shell Dlg" -{ - DEFPUSHBUTTON "OK", IDOK, 153, 133, 50, 12, WS_TABSTOP - LISTBOX 99, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER - ICON "", 1088, 10, 10, 14, 16 - LTEXT "", 100, 30, 10, 137, 10 - LTEXT "", 101, 30, 22, 137, 10 - LTEXT "ReactOS is geschreven door:", 98, 8, 55, 137, 10 -} - -SHELL_RUN_DLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 -STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "" -FONT 8, "MS Shell Dlg" -{ - ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE - LTEXT "Type the name of a program, folder, document, or Internet resource, and ReactOS will open it for you.", 12289, 36, 11, 182, 18 - LTEXT "&Open:", 12305, 7, 39, 24, 10 - CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 - DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP - PUSHBUTTON "Cancel", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP - PUSHBUTTON "&Browse...", 12288, 170, 63, 50, 14, WS_TABSTOP -} +/* + * Copyright 1998 Juergen Schmied + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +LANGUAGE LANG_DUTCH, SUBLANG_DEFAULT + +SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 210, 152 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Info %s" +FONT 10, "MS Shell Dlg" +{ + DEFPUSHBUTTON "OK", IDOK, 153, 133, 50, 12, WS_TABSTOP + LISTBOX 99, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER + ICON "", 1088, 10, 10, 14, 16 + LTEXT "", 100, 30, 10, 137, 10 + LTEXT "", 101, 30, 22, 137, 10 + LTEXT "ReactOS is geschreven door:", 98, 8, 55, 137, 10 +} + +SHELL_RUN_DLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "" +FONT 8, "MS Shell Dlg" +{ + ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE + LTEXT "Type the name of a program, folder, document, or Internet resource, and ReactOS will open it for you.", 12289, 36, 11, 182, 18 + LTEXT "&Open:", 12305, 7, 39, 24, 10 + CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 + DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "Cancel", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "&Browse...", 12288, 170, 63, 50, 14, WS_TABSTOP +} diff --git a/reactos/lib/shell32/shell32_No.rc b/reactos/lib/shell32/shell32_No.rc index 5a3822f759e..e532f5d0761 100644 --- a/reactos/lib/shell32/shell32_No.rc +++ b/reactos/lib/shell32/shell32_No.rc @@ -1,46 +1,46 @@ -/* - * Copyright 1998 Juergen Schmied - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -LANGUAGE LANG_NORWEGIAN, SUBLANG_DEFAULT - -SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 210, 152 -STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Om %s" -FONT 10, "MS Shell Dlg" -{ - DEFPUSHBUTTON "OK", IDOK, 153, 133, 50, 12, WS_TABSTOP - LISTBOX 99, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER - ICON "", 1088, 10, 10, 14, 16 - LTEXT "", 100, 30, 10, 137, 10 - LTEXT "", 101, 30, 22, 137, 10 - LTEXT "ReactOS was brought to you by:", 98, 8, 55, 137, 10 -} - -SHELL_RUN_DLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 -STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "" -FONT 8, "MS Shell Dlg" -{ - ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE - LTEXT "Type the name of a program, folder, document, or Internet resource, and ReactOS will open it for you.", 12289, 36, 11, 182, 18 - LTEXT "&Open:", 12305, 7, 39, 24, 10 - CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 - DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP - PUSHBUTTON "Cancel", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP - PUSHBUTTON "&Browse...", 12288, 170, 63, 50, 14, WS_TABSTOP -} +/* + * Copyright 1998 Juergen Schmied + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +LANGUAGE LANG_NORWEGIAN, SUBLANG_DEFAULT + +SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 210, 152 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Om %s" +FONT 10, "MS Shell Dlg" +{ + DEFPUSHBUTTON "OK", IDOK, 153, 133, 50, 12, WS_TABSTOP + LISTBOX 99, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER + ICON "", 1088, 10, 10, 14, 16 + LTEXT "", 100, 30, 10, 137, 10 + LTEXT "", 101, 30, 22, 137, 10 + LTEXT "ReactOS was brought to you by:", 98, 8, 55, 137, 10 +} + +SHELL_RUN_DLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "" +FONT 8, "MS Shell Dlg" +{ + ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE + LTEXT "Type the name of a program, folder, document, or Internet resource, and ReactOS will open it for you.", 12289, 36, 11, 182, 18 + LTEXT "&Open:", 12305, 7, 39, 24, 10 + CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 + DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "Cancel", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "&Browse...", 12288, 170, 63, 50, 14, WS_TABSTOP +} diff --git a/reactos/lib/shell32/shell32_Pl.rc b/reactos/lib/shell32/shell32_Pl.rc index 75ba80550c5..371394e93b2 100644 --- a/reactos/lib/shell32/shell32_Pl.rc +++ b/reactos/lib/shell32/shell32_Pl.rc @@ -1,190 +1,190 @@ -/* - * Copyright 1998 Juergen Schmied - * Copyright 2004 Piotr Caban - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -LANGUAGE LANG_POLISH, SUBLANG_DEFAULT - -MENU_001 MENU DISCARDABLE -BEGIN - MENUITEM "&Du¿e Ikony", FCIDM_SHVIEW_BIGICON - MENUITEM "&Ma³e Ikony", FCIDM_SHVIEW_SMALLICON - MENUITEM "&Lista", FCIDM_SHVIEW_LISTVIEW - MENUITEM "&Szczegó³y", FCIDM_SHVIEW_REPORTVIEW -END - -/* - shellview background menu -*/ -MENU_002 MENU DISCARDABLE -BEGIN - POPUP "" - BEGIN - POPUP "&Widok" - BEGIN - MENUITEM "&Du¿e Ikony", FCIDM_SHVIEW_BIGICON - MENUITEM "&Ma³e Ikony", FCIDM_SHVIEW_SMALLICON - MENUITEM "&Lista", FCIDM_SHVIEW_LISTVIEW - MENUITEM "&Szczegó³y", FCIDM_SHVIEW_REPORTVIEW - END - MENUITEM SEPARATOR - POPUP "Rozmieœæ &ikony wed³ug" - BEGIN - MENUITEM "&Nazwy", 0x30 /* column 0 */ - MENUITEM "&Typu", 0x32 /* column 2 */ - MENUITEM "&Wielkoœci", 0x31 /* ... */ - MENUITEM "&Daty", 0x33 - MENUITEM SEPARATOR - MENUITEM "&Autorozmieszczanie", FCIDM_SHVIEW_AUTOARRANGE - END - MENUITEM "&Wyrównaj ikony", FCIDM_SHVIEW_SNAPTOGRID - MENUITEM SEPARATOR - MENUITEM "&Odœwierz", FCIDM_SHVIEW_REFRESH - MENUITEM SEPARATOR - MENUITEM "W&klej", FCIDM_SHVIEW_INSERT - MENUITEM "Wklej s&krót", FCIDM_SHVIEW_INSERTLINK - MENUITEM SEPARATOR - POPUP "&Nowy" - BEGIN - MENUITEM "&Folder", FCIDM_SHVIEW_NEWFOLDER - MENUITEM "&Skrót", FCIDM_SHVIEW_NEWLINK - MENUITEM SEPARATOR - END - MENUITEM SEPARATOR - MENUITEM "W³aœciwoœci", FCIDM_SHVIEW_PROPERTIES - END -END - -/* - shellview item menu -*/ -MENU_SHV_FILE MENU DISCARDABLE -BEGIN - POPUP "" - BEGIN - MENUITEM "&Eksploruj", FCIDM_SHVIEW_EXPLORE - MENUITEM "&Otwórz", FCIDM_SHVIEW_OPEN - MENUITEM SEPARATOR - MENUITEM "&Wytnij", FCIDM_SHVIEW_CUT - MENUITEM "&Kopiuj", FCIDM_SHVIEW_COPY - MENUITEM SEPARATOR - MENUITEM "Utwórz &Skrót", FCIDM_SHVIEW_CREATELINK - MENUITEM "&Usuñ", FCIDM_SHVIEW_DELETE - MENUITEM "&Zmieñ nazwê", FCIDM_SHVIEW_RENAME - MENUITEM SEPARATOR - MENUITEM "W³&aœciwoœci", FCIDM_SHVIEW_PROPERTIES - END -END - -SHBRSFORFOLDER_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 188, 192 -STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU | DS_MODALFRAME | DS_SETFONT | DS_3DLOOK -CAPTION "Wybierz folder" -FONT 8, "MS Shell Dlg" -{ - DEFPUSHBUTTON "OK", 1, 80, 176, 50, 12, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP - PUSHBUTTON "Anuluj", 2, 134, 176, 50, 12, WS_GROUP | WS_TABSTOP - LTEXT "", IDD_TITLE, 4, 4, 180, 12 - LTEXT "", IDD_STATUS, 4, 25, 180, 12 - CONTROL "", IDD_TREEVIEW, "SysTreeView32", - TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | - WS_BORDER | WS_TABSTOP, - 4, 40, 180, 120 -} - -SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 210, 152 -STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "O %s" -FONT 10, "MS Shell Dlg" -{ - DEFPUSHBUTTON "OK", IDOK, 153, 133, 50, 12, WS_TABSTOP - LISTBOX 99, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER - ICON "", 1088, 10, 10, 14, 16 - LTEXT "", 100, 30, 10, 137, 10 - LTEXT "", 101, 30, 22, 137, 10 - LTEXT "Mo¿esz korzystaæ z ReactOS'a dziêki:", 98, 8, 55, 137, 10 -} - -SHELL_RUN_DLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 -STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "" -FONT 8, "MS Shell Dlg" -{ - ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE - LTEXT "Wpisz nazwê programu, katalogu, dokumentu, a ReactOS otworzy go dla ciebie.", 12289, 36, 11, 182, 18 - LTEXT "&Otwórz:", 12305, 7, 39, 24, 10 - CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 - DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP - PUSHBUTTON "Anuluj", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP - PUSHBUTTON "&Przegl¹daj...", 12288, 170, 63, 50, 14, WS_TABSTOP -} - -/* - special folders -*/ -STRINGTABLE DISCARDABLE -{ - IDS_DESKTOP "Pulpit" - IDS_MYCOMPUTER "Mój komputer" -} - -/* - context menus -*/ -STRINGTABLE DISCARDABLE -{ - IDS_VIEW_LARGE "&Du¿e Ikony" - IDS_VIEW_SMALL "&Ma³e Ikony" - IDS_VIEW_LIST "&Lista" - IDS_VIEW_DETAILS "&Szczegó³y" - IDS_SELECT "Zaznacz" - IDS_OPEN "Otwórz" -} - -STRINGTABLE DISCARDABLE -{ - IDS_CREATEFOLDER_DENIED "Nie mogê utworzyæ nowego katalogu: Brak dostêpu." - IDS_CREATEFOLDER_CAPTION "B³¹d przy tworzeniu nowego katalogu." - IDS_DELETEITEM_CAPTION "PotwierdŸ usuniêcia pliku" - IDS_DELETEFOLDER_CAPTION "PotwierdŸ usuniêcie katalogu" - IDS_DELETEITEM_TEXT "Czy jesteœ pewien, ¿e chcesz usun¹æ '%1'?" - IDS_DELETEMULTIPLE_TEXT "Czy jesteœ pewien, ¿e chcesz usun¹æ te %1 pliki?" - IDS_OVERWRITEFILE_TEXT "Zast¹piæ plik %1?" - IDS_OVERWRITEFILE_CAPTION "PotwierdŸ zast¹pienie pliku" -} - -/* columns in the shellview */ -STRINGTABLE -BEGIN - IDS_SHV_COLUMN1 "Plik" - IDS_SHV_COLUMN2 "Wielkoœæ" - IDS_SHV_COLUMN3 "Typ" - IDS_SHV_COLUMN4 "Modyfikacja" - IDS_SHV_COLUMN5 "Atrybuty" - IDS_SHV_COLUMN6 "Wielkoœæ" - IDS_SHV_COLUMN7 "Dostêpna wielkoœæ" - IDS_SHV_COLUMN8 "Nazwa" - IDS_SHV_COLUMN9 "Komentarz" -END - -/* message box strings */ -STRINGTABLE DISCARDABLE -{ - IDS_RESTART_TITLE "Uruchom ponownie" - IDS_RESTART_PROMPT "Czy chcesz zasymulowaæ zrestartowanie Windowsa?" - IDS_SHUTDOWN_TITLE "Wy³¹cz" - IDS_SHUTDOWN_PROMPT "Czy chcesz wy³¹czyæ sesjê ReactOS'a?" -} +/* + * Copyright 1998 Juergen Schmied + * Copyright 2004 Piotr Caban + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +LANGUAGE LANG_POLISH, SUBLANG_DEFAULT + +MENU_001 MENU DISCARDABLE +BEGIN + MENUITEM "&Du¿e Ikony", FCIDM_SHVIEW_BIGICON + MENUITEM "&Ma³e Ikony", FCIDM_SHVIEW_SMALLICON + MENUITEM "&Lista", FCIDM_SHVIEW_LISTVIEW + MENUITEM "&Szczegó³y", FCIDM_SHVIEW_REPORTVIEW +END + +/* + shellview background menu +*/ +MENU_002 MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + POPUP "&Widok" + BEGIN + MENUITEM "&Du¿e Ikony", FCIDM_SHVIEW_BIGICON + MENUITEM "&Ma³e Ikony", FCIDM_SHVIEW_SMALLICON + MENUITEM "&Lista", FCIDM_SHVIEW_LISTVIEW + MENUITEM "&Szczegó³y", FCIDM_SHVIEW_REPORTVIEW + END + MENUITEM SEPARATOR + POPUP "Rozmieœæ &ikony wed³ug" + BEGIN + MENUITEM "&Nazwy", 0x30 /* column 0 */ + MENUITEM "&Typu", 0x32 /* column 2 */ + MENUITEM "&Wielkoœci", 0x31 /* ... */ + MENUITEM "&Daty", 0x33 + MENUITEM SEPARATOR + MENUITEM "&Autorozmieszczanie", FCIDM_SHVIEW_AUTOARRANGE + END + MENUITEM "&Wyrównaj ikony", FCIDM_SHVIEW_SNAPTOGRID + MENUITEM SEPARATOR + MENUITEM "&Odœwierz", FCIDM_SHVIEW_REFRESH + MENUITEM SEPARATOR + MENUITEM "W&klej", FCIDM_SHVIEW_INSERT + MENUITEM "Wklej s&krót", FCIDM_SHVIEW_INSERTLINK + MENUITEM SEPARATOR + POPUP "&Nowy" + BEGIN + MENUITEM "&Folder", FCIDM_SHVIEW_NEWFOLDER + MENUITEM "&Skrót", FCIDM_SHVIEW_NEWLINK + MENUITEM SEPARATOR + END + MENUITEM SEPARATOR + MENUITEM "W³aœciwoœci", FCIDM_SHVIEW_PROPERTIES + END +END + +/* + shellview item menu +*/ +MENU_SHV_FILE MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + MENUITEM "&Eksploruj", FCIDM_SHVIEW_EXPLORE + MENUITEM "&Otwórz", FCIDM_SHVIEW_OPEN + MENUITEM SEPARATOR + MENUITEM "&Wytnij", FCIDM_SHVIEW_CUT + MENUITEM "&Kopiuj", FCIDM_SHVIEW_COPY + MENUITEM SEPARATOR + MENUITEM "Utwórz &Skrót", FCIDM_SHVIEW_CREATELINK + MENUITEM "&Usuñ", FCIDM_SHVIEW_DELETE + MENUITEM "&Zmieñ nazwê", FCIDM_SHVIEW_RENAME + MENUITEM SEPARATOR + MENUITEM "W³&aœciwoœci", FCIDM_SHVIEW_PROPERTIES + END +END + +SHBRSFORFOLDER_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 188, 192 +STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU | DS_MODALFRAME | DS_SETFONT | DS_3DLOOK +CAPTION "Wybierz folder" +FONT 8, "MS Shell Dlg" +{ + DEFPUSHBUTTON "OK", 1, 80, 176, 50, 12, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP + PUSHBUTTON "Anuluj", 2, 134, 176, 50, 12, WS_GROUP | WS_TABSTOP + LTEXT "", IDD_TITLE, 4, 4, 180, 12 + LTEXT "", IDD_STATUS, 4, 25, 180, 12 + CONTROL "", IDD_TREEVIEW, "SysTreeView32", + TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | + WS_BORDER | WS_TABSTOP, + 4, 40, 180, 120 +} + +SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 210, 152 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "O %s" +FONT 10, "MS Shell Dlg" +{ + DEFPUSHBUTTON "OK", IDOK, 153, 133, 50, 12, WS_TABSTOP + LISTBOX 99, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER + ICON "", 1088, 10, 10, 14, 16 + LTEXT "", 100, 30, 10, 137, 10 + LTEXT "", 101, 30, 22, 137, 10 + LTEXT "Mo¿esz korzystaæ z ReactOS'a dziêki:", 98, 8, 55, 137, 10 +} + +SHELL_RUN_DLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "" +FONT 8, "MS Shell Dlg" +{ + ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE + LTEXT "Wpisz nazwê programu, katalogu, dokumentu, a ReactOS otworzy go dla ciebie.", 12289, 36, 11, 182, 18 + LTEXT "&Otwórz:", 12305, 7, 39, 24, 10 + CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 + DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "Anuluj", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "&Przegl¹daj...", 12288, 170, 63, 50, 14, WS_TABSTOP +} + +/* + special folders +*/ +STRINGTABLE DISCARDABLE +{ + IDS_DESKTOP "Pulpit" + IDS_MYCOMPUTER "Mój komputer" +} + +/* + context menus +*/ +STRINGTABLE DISCARDABLE +{ + IDS_VIEW_LARGE "&Du¿e Ikony" + IDS_VIEW_SMALL "&Ma³e Ikony" + IDS_VIEW_LIST "&Lista" + IDS_VIEW_DETAILS "&Szczegó³y" + IDS_SELECT "Zaznacz" + IDS_OPEN "Otwórz" +} + +STRINGTABLE DISCARDABLE +{ + IDS_CREATEFOLDER_DENIED "Nie mogê utworzyæ nowego katalogu: Brak dostêpu." + IDS_CREATEFOLDER_CAPTION "B³¹d przy tworzeniu nowego katalogu." + IDS_DELETEITEM_CAPTION "PotwierdŸ usuniêcia pliku" + IDS_DELETEFOLDER_CAPTION "PotwierdŸ usuniêcie katalogu" + IDS_DELETEITEM_TEXT "Czy jesteœ pewien, ¿e chcesz usun¹æ '%1'?" + IDS_DELETEMULTIPLE_TEXT "Czy jesteœ pewien, ¿e chcesz usun¹æ te %1 pliki?" + IDS_OVERWRITEFILE_TEXT "Zast¹piæ plik %1?" + IDS_OVERWRITEFILE_CAPTION "PotwierdŸ zast¹pienie pliku" +} + +/* columns in the shellview */ +STRINGTABLE +BEGIN + IDS_SHV_COLUMN1 "Plik" + IDS_SHV_COLUMN2 "Wielkoœæ" + IDS_SHV_COLUMN3 "Typ" + IDS_SHV_COLUMN4 "Modyfikacja" + IDS_SHV_COLUMN5 "Atrybuty" + IDS_SHV_COLUMN6 "Wielkoœæ" + IDS_SHV_COLUMN7 "Dostêpna wielkoœæ" + IDS_SHV_COLUMN8 "Nazwa" + IDS_SHV_COLUMN9 "Komentarz" +END + +/* message box strings */ +STRINGTABLE DISCARDABLE +{ + IDS_RESTART_TITLE "Uruchom ponownie" + IDS_RESTART_PROMPT "Czy chcesz zasymulowaæ zrestartowanie Windowsa?" + IDS_SHUTDOWN_TITLE "Wy³¹cz" + IDS_SHUTDOWN_PROMPT "Czy chcesz wy³¹czyæ sesjê ReactOS'a?" +} diff --git a/reactos/lib/shell32/shell32_Pt.rc b/reactos/lib/shell32/shell32_Pt.rc index 4ff1e595ec3..3ebdf5c22ce 100644 --- a/reactos/lib/shell32/shell32_Pt.rc +++ b/reactos/lib/shell32/shell32_Pt.rc @@ -1,190 +1,190 @@ -/* - * Copyright 1998 Juergen Schmied - * Copyright 2003 Marcelo Duarte - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -LANGUAGE LANG_PORTUGUESE, SUBLANG_DEFAULT - -MENU_001 MENU DISCARDABLE -BEGIN - MENUITEM "Ícones &grandes", FCIDM_SHVIEW_BIGICON - MENUITEM "Ícones &pequenos", FCIDM_SHVIEW_SMALLICON - MENUITEM "&Lista", FCIDM_SHVIEW_LISTVIEW - MENUITEM "&Detalhes", FCIDM_SHVIEW_REPORTVIEW -END - -/* - shellview background menu -*/ -MENU_002 MENU DISCARDABLE -BEGIN - POPUP "" - BEGIN - POPUP "&Exibir" - BEGIN - MENUITEM "Ícones &grandes", FCIDM_SHVIEW_BIGICON - MENUITEM "Ícones &pequenos", FCIDM_SHVIEW_SMALLICON - MENUITEM "&Lista", FCIDM_SHVIEW_LISTVIEW - MENUITEM "&Detalhes", FCIDM_SHVIEW_REPORTVIEW - END - MENUITEM SEPARATOR - POPUP "O&rganizar ícones" - BEGIN - MENUITEM "Por &nome", 0x30 /* column 0 */ - MENUITEM "Por &tipo", 0x32 /* column 2 */ - MENUITEM "Por ta&manho", 0x31 /* ... */ - MENUITEM "Por &data", 0x33 - MENUITEM SEPARATOR - MENUITEM "Auto organi&zar", FCIDM_SHVIEW_AUTOARRANGE - END - MENUITEM "Alin&har ícones", FCIDM_SHVIEW_SNAPTOGRID - MENUITEM SEPARATOR - MENUITEM "&Atualizar", FCIDM_SHVIEW_REFRESH - MENUITEM SEPARATOR - MENUITEM "Co&lar", FCIDM_SHVIEW_INSERT - MENUITEM "Colar a&talho", FCIDM_SHVIEW_INSERTLINK - MENUITEM SEPARATOR - POPUP "Novo" - BEGIN - MENUITEM "&Pasta", FCIDM_SHVIEW_NEWFOLDER - MENUITEM "&Atalho", FCIDM_SHVIEW_NEWLINK - MENUITEM SEPARATOR - END - MENUITEM SEPARATOR - MENUITEM "Propriedades", FCIDM_SHVIEW_PROPERTIES - END -END - -/* - shellview item menu -*/ -MENU_SHV_FILE MENU DISCARDABLE -BEGIN - POPUP "" - BEGIN - MENUITEM "&Explorar", FCIDM_SHVIEW_EXPLORE - MENUITEM "A&brir", FCIDM_SHVIEW_OPEN - MENUITEM SEPARATOR - MENUITEM "C&ortar", FCIDM_SHVIEW_CUT - MENUITEM "&Copiar", FCIDM_SHVIEW_COPY - MENUITEM SEPARATOR - MENUITEM "Criar a&talho", FCIDM_SHVIEW_CREATELINK - MENUITEM "E&xcluir", FCIDM_SHVIEW_DELETE - MENUITEM "&Renomear", FCIDM_SHVIEW_RENAME - MENUITEM SEPARATOR - MENUITEM "&Propriedades", FCIDM_SHVIEW_PROPERTIES - END -END - -SHBRSFORFOLDER_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 188, 192 -STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU | DS_MODALFRAME | DS_SETFONT | DS_3DLOOK -CAPTION "Procurar pasta" -FONT 8, "MS Shell Dlg" -{ - DEFPUSHBUTTON "OK", 1, 80, 176, 50, 12, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP - PUSHBUTTON "Cancelar", 2, 134, 176, 50, 12, WS_GROUP | WS_TABSTOP - LTEXT "", IDD_TITLE, 4, 4, 180, 12 - LTEXT "", IDD_STATUS, 4, 25, 180, 12 - CONTROL "", IDD_TREEVIEW, "SysTreeView32", - TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | - WS_BORDER | WS_TABSTOP, - 4, 40, 180, 120 -} - -SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 210, 152 -STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Sobre %s" -FONT 10, "MS Shell Dlg" -{ - DEFPUSHBUTTON "OK", IDOK, 153, 133, 50, 12, WS_TABSTOP - LISTBOX 99, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER - ICON "", 1088, 10, 10, 14, 16 - LTEXT "", 100, 30, 10, 137, 10 - LTEXT "", 101, 30, 22, 137, 10 - LTEXT "ReactOS foi disponibilizado por:", 98, 8, 55, 137, 10 -} - -SHELL_RUN_DLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 -STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "" -FONT 8, "MS Shell Dlg" -{ - ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE - LTEXT "Digite o nome do programa, pasta, documento, ou endereço Internet, que o ReactOS irá abrí-lo para você.", 12289, 36, 11, 182, 18 - LTEXT "&Abrir:", 12305, 7, 39, 24, 10 - CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 - DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP - PUSHBUTTON "Cancelar", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP - PUSHBUTTON "&Procurar...", 12288, 170, 63, 50, 14, WS_TABSTOP -} - -/* - special folders -*/ -STRINGTABLE DISCARDABLE -{ - IDS_DESKTOP "Área de trabalho" - IDS_MYCOMPUTER "Meu computador" -} - -/* - context menus -*/ -STRINGTABLE DISCARDABLE -{ - IDS_VIEW_LARGE "Ícones &grandes" - IDS_VIEW_SMALL "Ícones &pequenos" - IDS_VIEW_LIST "&Lista" - IDS_VIEW_DETAILS "&Detalhes" - IDS_SELECT "Selecionar" - IDS_OPEN "Abrir" -} - -STRINGTABLE DISCARDABLE -{ - IDS_CREATEFOLDER_DENIED "Não pode criar nova pasta: Permissão negada." - IDS_CREATEFOLDER_CAPTION "Erro durante a criação da nova pasta" - IDS_DELETEITEM_CAPTION "Confirmar exclusão de arquivo" - IDS_DELETEFOLDER_CAPTION "Confirmar exclusão de pasta" - IDS_DELETEITEM_TEXT "Você tem certeza que deseja excluir '%1'?" - IDS_DELETEMULTIPLE_TEXT "Você tem certeza que deseja excluir estes %1 itens?" - IDS_OVERWRITEFILE_TEXT "Sobreescrever arquivo %1?" - IDS_OVERWRITEFILE_CAPTION "Confirmar sobreescrever arquivo" -} - -/* colunas no shellview */ -STRINGTABLE -BEGIN - IDS_SHV_COLUMN1 "Arquivo" - IDS_SHV_COLUMN2 "Tamanho" - IDS_SHV_COLUMN3 "Tipo" - IDS_SHV_COLUMN4 "Modificado" - IDS_SHV_COLUMN5 "Atributos" - IDS_SHV_COLUMN6 "Tamanho" - IDS_SHV_COLUMN7 "Disponível" - IDS_SHV_COLUMN8 "Nome" - IDS_SHV_COLUMN9 "Comentários" -END - -/* message box strings */ -STRINGTABLE DISCARDABLE -{ - IDS_RESTART_TITLE "Reiniciar" - IDS_RESTART_PROMPT "Você quer simular a reinicialização do Windows?" - IDS_SHUTDOWN_TITLE "Desligar" - IDS_SHUTDOWN_PROMPT "Você quer finalizar a sessão no ReactOS?" -} +/* + * Copyright 1998 Juergen Schmied + * Copyright 2003 Marcelo Duarte + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +LANGUAGE LANG_PORTUGUESE, SUBLANG_DEFAULT + +MENU_001 MENU DISCARDABLE +BEGIN + MENUITEM "Ícones &grandes", FCIDM_SHVIEW_BIGICON + MENUITEM "Ícones &pequenos", FCIDM_SHVIEW_SMALLICON + MENUITEM "&Lista", FCIDM_SHVIEW_LISTVIEW + MENUITEM "&Detalhes", FCIDM_SHVIEW_REPORTVIEW +END + +/* + shellview background menu +*/ +MENU_002 MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + POPUP "&Exibir" + BEGIN + MENUITEM "Ícones &grandes", FCIDM_SHVIEW_BIGICON + MENUITEM "Ícones &pequenos", FCIDM_SHVIEW_SMALLICON + MENUITEM "&Lista", FCIDM_SHVIEW_LISTVIEW + MENUITEM "&Detalhes", FCIDM_SHVIEW_REPORTVIEW + END + MENUITEM SEPARATOR + POPUP "O&rganizar ícones" + BEGIN + MENUITEM "Por &nome", 0x30 /* column 0 */ + MENUITEM "Por &tipo", 0x32 /* column 2 */ + MENUITEM "Por ta&manho", 0x31 /* ... */ + MENUITEM "Por &data", 0x33 + MENUITEM SEPARATOR + MENUITEM "Auto organi&zar", FCIDM_SHVIEW_AUTOARRANGE + END + MENUITEM "Alin&har ícones", FCIDM_SHVIEW_SNAPTOGRID + MENUITEM SEPARATOR + MENUITEM "&Atualizar", FCIDM_SHVIEW_REFRESH + MENUITEM SEPARATOR + MENUITEM "Co&lar", FCIDM_SHVIEW_INSERT + MENUITEM "Colar a&talho", FCIDM_SHVIEW_INSERTLINK + MENUITEM SEPARATOR + POPUP "Novo" + BEGIN + MENUITEM "&Pasta", FCIDM_SHVIEW_NEWFOLDER + MENUITEM "&Atalho", FCIDM_SHVIEW_NEWLINK + MENUITEM SEPARATOR + END + MENUITEM SEPARATOR + MENUITEM "Propriedades", FCIDM_SHVIEW_PROPERTIES + END +END + +/* + shellview item menu +*/ +MENU_SHV_FILE MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + MENUITEM "&Explorar", FCIDM_SHVIEW_EXPLORE + MENUITEM "A&brir", FCIDM_SHVIEW_OPEN + MENUITEM SEPARATOR + MENUITEM "C&ortar", FCIDM_SHVIEW_CUT + MENUITEM "&Copiar", FCIDM_SHVIEW_COPY + MENUITEM SEPARATOR + MENUITEM "Criar a&talho", FCIDM_SHVIEW_CREATELINK + MENUITEM "E&xcluir", FCIDM_SHVIEW_DELETE + MENUITEM "&Renomear", FCIDM_SHVIEW_RENAME + MENUITEM SEPARATOR + MENUITEM "&Propriedades", FCIDM_SHVIEW_PROPERTIES + END +END + +SHBRSFORFOLDER_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 188, 192 +STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU | DS_MODALFRAME | DS_SETFONT | DS_3DLOOK +CAPTION "Procurar pasta" +FONT 8, "MS Shell Dlg" +{ + DEFPUSHBUTTON "OK", 1, 80, 176, 50, 12, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP + PUSHBUTTON "Cancelar", 2, 134, 176, 50, 12, WS_GROUP | WS_TABSTOP + LTEXT "", IDD_TITLE, 4, 4, 180, 12 + LTEXT "", IDD_STATUS, 4, 25, 180, 12 + CONTROL "", IDD_TREEVIEW, "SysTreeView32", + TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | + WS_BORDER | WS_TABSTOP, + 4, 40, 180, 120 +} + +SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 210, 152 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Sobre %s" +FONT 10, "MS Shell Dlg" +{ + DEFPUSHBUTTON "OK", IDOK, 153, 133, 50, 12, WS_TABSTOP + LISTBOX 99, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER + ICON "", 1088, 10, 10, 14, 16 + LTEXT "", 100, 30, 10, 137, 10 + LTEXT "", 101, 30, 22, 137, 10 + LTEXT "ReactOS foi disponibilizado por:", 98, 8, 55, 137, 10 +} + +SHELL_RUN_DLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "" +FONT 8, "MS Shell Dlg" +{ + ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE + LTEXT "Digite o nome do programa, pasta, documento, ou endereço Internet, que o ReactOS irá abrí-lo para você.", 12289, 36, 11, 182, 18 + LTEXT "&Abrir:", 12305, 7, 39, 24, 10 + CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 + DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "Cancelar", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "&Procurar...", 12288, 170, 63, 50, 14, WS_TABSTOP +} + +/* + special folders +*/ +STRINGTABLE DISCARDABLE +{ + IDS_DESKTOP "Área de trabalho" + IDS_MYCOMPUTER "Meu computador" +} + +/* + context menus +*/ +STRINGTABLE DISCARDABLE +{ + IDS_VIEW_LARGE "Ícones &grandes" + IDS_VIEW_SMALL "Ícones &pequenos" + IDS_VIEW_LIST "&Lista" + IDS_VIEW_DETAILS "&Detalhes" + IDS_SELECT "Selecionar" + IDS_OPEN "Abrir" +} + +STRINGTABLE DISCARDABLE +{ + IDS_CREATEFOLDER_DENIED "Não pode criar nova pasta: Permissão negada." + IDS_CREATEFOLDER_CAPTION "Erro durante a criação da nova pasta" + IDS_DELETEITEM_CAPTION "Confirmar exclusão de arquivo" + IDS_DELETEFOLDER_CAPTION "Confirmar exclusão de pasta" + IDS_DELETEITEM_TEXT "Você tem certeza que deseja excluir '%1'?" + IDS_DELETEMULTIPLE_TEXT "Você tem certeza que deseja excluir estes %1 itens?" + IDS_OVERWRITEFILE_TEXT "Sobreescrever arquivo %1?" + IDS_OVERWRITEFILE_CAPTION "Confirmar sobreescrever arquivo" +} + +/* colunas no shellview */ +STRINGTABLE +BEGIN + IDS_SHV_COLUMN1 "Arquivo" + IDS_SHV_COLUMN2 "Tamanho" + IDS_SHV_COLUMN3 "Tipo" + IDS_SHV_COLUMN4 "Modificado" + IDS_SHV_COLUMN5 "Atributos" + IDS_SHV_COLUMN6 "Tamanho" + IDS_SHV_COLUMN7 "Disponível" + IDS_SHV_COLUMN8 "Nome" + IDS_SHV_COLUMN9 "Comentários" +END + +/* message box strings */ +STRINGTABLE DISCARDABLE +{ + IDS_RESTART_TITLE "Reiniciar" + IDS_RESTART_PROMPT "Você quer simular a reinicialização do Windows?" + IDS_SHUTDOWN_TITLE "Desligar" + IDS_SHUTDOWN_PROMPT "Você quer finalizar a sessão no ReactOS?" +} diff --git a/reactos/lib/shell32/shell32_Ru.rc b/reactos/lib/shell32/shell32_Ru.rc index 3199802b5f5..8c6dcfc0acf 100644 --- a/reactos/lib/shell32/shell32_Ru.rc +++ b/reactos/lib/shell32/shell32_Ru.rc @@ -1,46 +1,46 @@ -/* - * Copyright 1998 Juergen Schmied - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT - -SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 210, 152 -STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Î %s" -FONT 10, "MS Shell Dlg" -{ - DEFPUSHBUTTON "OK", IDOK, 153, 133, 50, 12, WS_TABSTOP - LISTBOX 99, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER - ICON "", 1088, 10, 10, 14, 16 - LTEXT "", 100, 30, 10, 137, 10 - LTEXT "", 101, 30, 22, 137, 10 - LTEXT "Ðàçðàáîò÷èêè ReactOS:", 98, 8, 55, 137, 10 -} - -SHELL_RUN_DLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 -STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "" -FONT 8, "MS Shell Dlg" -{ - ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE - LTEXT "Ââåäèòå èìÿ ïðîãðàììû, ïàïêè, äîêóìåíòà èëè ðåñóðñ Èíòåðíåòà, è ReactOS îòêðîåò èõ.", 12289, 36, 11, 182, 18 - LTEXT "&Îòêðûòü:", 12305, 7, 39, 24, 10 - CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 - DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP - PUSHBUTTON "Îòìåíà", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP - PUSHBUTTON "Îá&çîð...", 12288, 170, 63, 50, 14, WS_TABSTOP -} +/* + * Copyright 1998 Juergen Schmied + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT + +SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 210, 152 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Î %s" +FONT 10, "MS Shell Dlg" +{ + DEFPUSHBUTTON "OK", IDOK, 153, 133, 50, 12, WS_TABSTOP + LISTBOX 99, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER + ICON "", 1088, 10, 10, 14, 16 + LTEXT "", 100, 30, 10, 137, 10 + LTEXT "", 101, 30, 22, 137, 10 + LTEXT "Ðàçðàáîò÷èêè ReactOS:", 98, 8, 55, 137, 10 +} + +SHELL_RUN_DLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "" +FONT 8, "MS Shell Dlg" +{ + ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE + LTEXT "Ââåäèòå èìÿ ïðîãðàììû, ïàïêè, äîêóìåíòà èëè ðåñóðñ Èíòåðíåòà, è ReactOS îòêðîåò èõ.", 12289, 36, 11, 182, 18 + LTEXT "&Îòêðûòü:", 12305, 7, 39, 24, 10 + CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 + DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "Îòìåíà", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "Îá&çîð...", 12288, 170, 63, 50, 14, WS_TABSTOP +} diff --git a/reactos/lib/shell32/shell32_Si.rc b/reactos/lib/shell32/shell32_Si.rc index 97c5387ffb2..66d1ba63025 100644 --- a/reactos/lib/shell32/shell32_Si.rc +++ b/reactos/lib/shell32/shell32_Si.rc @@ -1,60 +1,60 @@ -/* - * Copyright 2002-2003 Rok Mandeljc - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -LANGUAGE LANG_SLOVENIAN, SUBLANG_DEFAULT - -SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 210, 152 -STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "O %s" -FONT 10, "MS Shell Dlg" -{ - DEFPUSHBUTTON "V redu", IDOK, 153, 133, 50, 12, WS_TABSTOP - LISTBOX 99, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER - ICON "", 1088, 10, 10, 14, 16 - LTEXT "", 100, 30, 10, 137, 10 - LTEXT "", 101, 30, 22, 137, 10 - LTEXT "ReactOS so ustvarili:", 98, 8, 55, 137, 10 -} - -SHELL_RUN_DLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 -STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "" -FONT 8, "MS Shell Dlg" -{ - ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE - LTEXT "Vnesite ime programa, mape, dokumenta ali spletne strani, in ReactOS ga (jo) bo odprl.", 12289, 36, 11, 182, 18 - LTEXT "&Odpri:", 12305, 7, 39, 24, 10 - CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 - DEFPUSHBUTTON "V redu", IDOK, 62, 63, 50, 14, WS_TABSTOP - PUSHBUTTON "Preklièi", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP - PUSHBUTTON "Pre&brskaj", 12288, 170, 63, 50, 14, WS_TABSTOP -} - -/* columns in the shellview */ -STRINGTABLE LANGUAGE LANG_SLOVENIAN, SUBLANG_NEUTRAL -BEGIN - IDS_SHV_COLUMN1 "Datoteka" - IDS_SHV_COLUMN2 "Velikost" - IDS_SHV_COLUMN3 "Vrsta" - IDS_SHV_COLUMN4 "Spremenjena" - IDS_SHV_COLUMN5 "Atributi" - IDS_SHV_COLUMN6 "Toèna velikost" - IDS_SHV_COLUMN7 "Prosto" - IDS_SHV_COLUMN8 "Name" /*FIXME*/ - IDS_SHV_COLUMN9 "Comments" /*FIXME*/ -END +/* + * Copyright 2002-2003 Rok Mandeljc + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +LANGUAGE LANG_SLOVENIAN, SUBLANG_DEFAULT + +SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 210, 152 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "O %s" +FONT 10, "MS Shell Dlg" +{ + DEFPUSHBUTTON "V redu", IDOK, 153, 133, 50, 12, WS_TABSTOP + LISTBOX 99, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER + ICON "", 1088, 10, 10, 14, 16 + LTEXT "", 100, 30, 10, 137, 10 + LTEXT "", 101, 30, 22, 137, 10 + LTEXT "ReactOS so ustvarili:", 98, 8, 55, 137, 10 +} + +SHELL_RUN_DLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "" +FONT 8, "MS Shell Dlg" +{ + ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE + LTEXT "Vnesite ime programa, mape, dokumenta ali spletne strani, in ReactOS ga (jo) bo odprl.", 12289, 36, 11, 182, 18 + LTEXT "&Odpri:", 12305, 7, 39, 24, 10 + CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 + DEFPUSHBUTTON "V redu", IDOK, 62, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "Preklièi", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "Pre&brskaj", 12288, 170, 63, 50, 14, WS_TABSTOP +} + +/* columns in the shellview */ +STRINGTABLE LANGUAGE LANG_SLOVENIAN, SUBLANG_NEUTRAL +BEGIN + IDS_SHV_COLUMN1 "Datoteka" + IDS_SHV_COLUMN2 "Velikost" + IDS_SHV_COLUMN3 "Vrsta" + IDS_SHV_COLUMN4 "Spremenjena" + IDS_SHV_COLUMN5 "Atributi" + IDS_SHV_COLUMN6 "Toèna velikost" + IDS_SHV_COLUMN7 "Prosto" + IDS_SHV_COLUMN8 "Name" /*FIXME*/ + IDS_SHV_COLUMN9 "Comments" /*FIXME*/ +END diff --git a/reactos/lib/shell32/shell32_Sk.rc b/reactos/lib/shell32/shell32_Sk.rc index e6924503acc..d3392e82114 100644 --- a/reactos/lib/shell32/shell32_Sk.rc +++ b/reactos/lib/shell32/shell32_Sk.rc @@ -1,60 +1,60 @@ -/* - * Copyright 1998 Juergen Schmied - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -LANGUAGE LANG_SLOVAK, SUBLANG_DEFAULT - -SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 210, 152 -STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "O programe %s" -FONT 10, "MS Shell Dlg" -{ - DEFPUSHBUTTON "OK", IDOK, 153, 133, 50, 12, WS_TABSTOP - LISTBOX 99, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER - ICON "", 1088, 10, 10, 14, 16 - LTEXT "", 100, 30, 10, 137, 10 - LTEXT "", 101, 30, 22, 137, 10 - LTEXT "Víno pre vás pripravili:", 98, 8, 55, 137, 10 -} - -SHELL_RUN_DLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 -STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "" -FONT 8, "MS Shell Dlg" -{ - ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE - LTEXT "Type the name of a program, folder, document, or Internet resource, and ReactOS will open it for you.", 12289, 36, 11, 182, 18 - LTEXT "&Open:", 12305, 7, 39, 24, 10 - CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 - DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP - PUSHBUTTON "Cancel", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP - PUSHBUTTON "&Browse...", 12288, 170, 63, 50, 14, WS_TABSTOP -} - -/* columns in the shellview */ -STRINGTABLE LANGUAGE LANG_SLOVAK, SUBLANG_NEUTRAL -BEGIN - IDS_SHV_COLUMN1 "Súbor" - IDS_SHV_COLUMN2 "Ve¾kos" - IDS_SHV_COLUMN3 "Typ" - IDS_SHV_COLUMN4 "Modifikovaný" - IDS_SHV_COLUMN5 "Atribúty" - IDS_SHV_COLUMN6 "Ve¾kos" - IDS_SHV_COLUMN7 "Ve¾kos k dispozícii" - IDS_SHV_COLUMN8 "Name" /*FIXME*/ - IDS_SHV_COLUMN9 "Comments" /*FIXME*/ -END +/* + * Copyright 1998 Juergen Schmied + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +LANGUAGE LANG_SLOVAK, SUBLANG_DEFAULT + +SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 210, 152 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "O programe %s" +FONT 10, "MS Shell Dlg" +{ + DEFPUSHBUTTON "OK", IDOK, 153, 133, 50, 12, WS_TABSTOP + LISTBOX 99, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER + ICON "", 1088, 10, 10, 14, 16 + LTEXT "", 100, 30, 10, 137, 10 + LTEXT "", 101, 30, 22, 137, 10 + LTEXT "Víno pre vás pripravili:", 98, 8, 55, 137, 10 +} + +SHELL_RUN_DLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "" +FONT 8, "MS Shell Dlg" +{ + ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE + LTEXT "Type the name of a program, folder, document, or Internet resource, and ReactOS will open it for you.", 12289, 36, 11, 182, 18 + LTEXT "&Open:", 12305, 7, 39, 24, 10 + CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 + DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "Cancel", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "&Browse...", 12288, 170, 63, 50, 14, WS_TABSTOP +} + +/* columns in the shellview */ +STRINGTABLE LANGUAGE LANG_SLOVAK, SUBLANG_NEUTRAL +BEGIN + IDS_SHV_COLUMN1 "Súbor" + IDS_SHV_COLUMN2 "Ve¾kos" + IDS_SHV_COLUMN3 "Typ" + IDS_SHV_COLUMN4 "Modifikovaný" + IDS_SHV_COLUMN5 "Atribúty" + IDS_SHV_COLUMN6 "Ve¾kos" + IDS_SHV_COLUMN7 "Ve¾kos k dispozícii" + IDS_SHV_COLUMN8 "Name" /*FIXME*/ + IDS_SHV_COLUMN9 "Comments" /*FIXME*/ +END diff --git a/reactos/lib/shell32/shell32_Sv.rc b/reactos/lib/shell32/shell32_Sv.rc index c4853c28326..86102cc1055 100644 --- a/reactos/lib/shell32/shell32_Sv.rc +++ b/reactos/lib/shell32/shell32_Sv.rc @@ -1,46 +1,46 @@ -/* - * Copyright 1998 Juergen Schmied - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -LANGUAGE LANG_SWEDISH, SUBLANG_DEFAULT - -SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 210, 152 -STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Om %s" -FONT 10, "MS Shell Dlg" -{ - DEFPUSHBUTTON "OK", IDOK, 153, 133, 50, 12, WS_TABSTOP - LISTBOX 99, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER - ICON "", 1088, 10, 10, 14, 16 - LTEXT "", 100, 30, 10, 137, 10 - LTEXT "", 101, 30, 22, 137, 10 - LTEXT "ReactOS hade inte varit möjligt utan dessa personer:", 98, 8, 55, 137, 10 -} - -SHELL_RUN_DLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 -STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "" -FONT 8, "MS Shell Dlg" -{ - ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE - LTEXT "Skriv namnet på ett program, en mapp eller ett dokument och ReactOS kommer att öppna det för dig.", 12289, 36, 11, 182, 18 - LTEXT "&Öppna:", 12305, 7, 39, 24, 10 - CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 - DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP - PUSHBUTTON "Avbryt", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP - PUSHBUTTON "&Bläddra...", 12288, 170, 63, 50, 14, WS_TABSTOP -} +/* + * Copyright 1998 Juergen Schmied + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +LANGUAGE LANG_SWEDISH, SUBLANG_DEFAULT + +SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 210, 152 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Om %s" +FONT 10, "MS Shell Dlg" +{ + DEFPUSHBUTTON "OK", IDOK, 153, 133, 50, 12, WS_TABSTOP + LISTBOX 99, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER + ICON "", 1088, 10, 10, 14, 16 + LTEXT "", 100, 30, 10, 137, 10 + LTEXT "", 101, 30, 22, 137, 10 + LTEXT "ReactOS hade inte varit möjligt utan dessa personer:", 98, 8, 55, 137, 10 +} + +SHELL_RUN_DLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "" +FONT 8, "MS Shell Dlg" +{ + ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE + LTEXT "Skriv namnet på ett program, en mapp eller ett dokument och ReactOS kommer att öppna det för dig.", 12289, 36, 11, 182, 18 + LTEXT "&Öppna:", 12305, 7, 39, 24, 10 + CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 + DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "Avbryt", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "&Bläddra...", 12288, 170, 63, 50, 14, WS_TABSTOP +} diff --git a/reactos/lib/shell32/shell32_Uk.rc b/reactos/lib/shell32/shell32_Uk.rc index b0cf021d21a..fbe7b5edc46 100644 --- a/reactos/lib/shell32/shell32_Uk.rc +++ b/reactos/lib/shell32/shell32_Uk.rc @@ -1,178 +1,178 @@ -/* - * Copyright 2004 Ilya Korniyko - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT - -MENU_001 MENU DISCARDABLE -BEGIN - MENUITEM "&Âåëèê³ ²êîíêè", FCIDM_SHVIEW_BIGICON - MENUITEM "&Ìàë³ ²êîíêè", FCIDM_SHVIEW_SMALLICON - MENUITEM "&Ñïèñîê", FCIDM_SHVIEW_LISTVIEW - MENUITEM "&Ïîäðîáèö³", FCIDM_SHVIEW_REPORTVIEW -END - -/* - shellview background menu -*/ -MENU_002 MENU DISCARDABLE -BEGIN - POPUP "" - BEGIN - POPUP "&Âèãëÿä" - BEGIN - MENUITEM "&Âåëèê³ ²êîíêè", FCIDM_SHVIEW_BIGICON - MENUITEM "&Ìàë³ ²êîíêè", FCIDM_SHVIEW_SMALLICON - MENUITEM "&Ñïèñîê", FCIDM_SHVIEW_LISTVIEW - MENUITEM "&Ïîäðîáèö³", FCIDM_SHVIEW_REPORTVIEW - END - MENUITEM SEPARATOR - POPUP "Âïîðÿäêóâàòè &²êîíêè" - BEGIN - MENUITEM "Çà &Íàçâîþ", 0x30 /* column 0 */ - MENUITEM "Çà &Òèïîì", 0x32 /* column 2 */ - MENUITEM "Çà &Ðîçì³ðîì", 0x31 /* ... */ - MENUITEM "Çà &Äàòîþ", 0x33 - MENUITEM SEPARATOR - MENUITEM "&Àâòîìàòè÷íî", FCIDM_SHVIEW_AUTOARRANGE - END - MENUITEM "Âèð³âíÿòè ²êîíêè", FCIDM_SHVIEW_SNAPTOGRID - MENUITEM SEPARATOR - MENUITEM "Îíîâèòè", FCIDM_SHVIEW_REFRESH - MENUITEM SEPARATOR - MENUITEM "Âñòàâèòè", FCIDM_SHVIEW_INSERT - MENUITEM "Âñòàâèòè Ïîñèëàííÿ", FCIDM_SHVIEW_INSERTLINK - MENUITEM SEPARATOR - POPUP "Ñòâîðèòè" - BEGIN - MENUITEM "Íîâà &Òåêà", FCIDM_SHVIEW_NEWFOLDER - MENUITEM "Íîâå &Ïîñèëàííÿ", FCIDM_SHVIEW_NEWLINK - MENUITEM SEPARATOR - END - MENUITEM SEPARATOR - MENUITEM "Âëàñòèâîñò³", FCIDM_SHVIEW_PROPERTIES - END -END - -/* - shellview item menu -*/ -MENU_SHV_FILE MENU DISCARDABLE -BEGIN - POPUP "" - BEGIN - MENUITEM "&Ïðîâ³äíèê", FCIDM_SHVIEW_EXPLORE - MENUITEM "&³äêðèòè", FCIDM_SHVIEW_OPEN - MENUITEM SEPARATOR - MENUITEM "Âè&ð³çàòè", FCIDM_SHVIEW_CUT - MENUITEM "&Êîï³ÿ", FCIDM_SHVIEW_COPY - MENUITEM SEPARATOR - MENUITEM "&Ñòâîðèòè Ïîñèëàííÿ", FCIDM_SHVIEW_CREATELINK - MENUITEM "Âè&äàëèòè", FCIDM_SHVIEW_DELETE - MENUITEM "Ïåðå&éìåíóâàòè", FCIDM_SHVIEW_RENAME - MENUITEM SEPARATOR - MENUITEM "&Âëàñòèâîñò³", FCIDM_SHVIEW_PROPERTIES - END -END - -SHBRSFORFOLDER_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 188, 192 -STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU | DS_MODALFRAME | DS_SETFONT | DS_3DLOOK -CAPTION "Îãëÿä äî òåêè" -FONT 8, "MS Shell Dlg" -{ - DEFPUSHBUTTON "OK", 1, 80, 176, 50, 12, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP - PUSHBUTTON "³äì³íà", 2, 134, 176, 50, 12, WS_GROUP | WS_TABSTOP - LTEXT "", IDD_TITLE, 4, 4, 180, 12 - LTEXT "", IDD_STATUS, 4, 25, 180, 12 - CONTROL "", IDD_TREEVIEW, "SysTreeView32", - TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | - WS_BORDER | WS_TABSTOP, - 4, 40, 180, 120 -} - -SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 210, 152 -STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Ïðî %s" -FONT 10, "MS Shell Dlg" -{ - DEFPUSHBUTTON "OK", IDOK, 153, 133, 50, 12, WS_TABSTOP - LISTBOX 99, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER - ICON "", 1088, 10, 10, 14, 16 - LTEXT "", 100, 30, 10, 137, 10 - LTEXT "", 101, 30, 22, 137, 10 - LTEXT "Ðîçðîáíèêè ReactOS:", 98, 8, 55, 137, 10 -} - -SHELL_RUN_DLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 -STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "" -FONT 8, "MS Shell Dlg" -{ - ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE - LTEXT "Ââåä³òü ³ì'ÿ ïðîãðàìè, òåêè, äîêóìåíòó ÷è ðåñóðñ ²íòåðíåòó, ³ ReactOS â³äêðèº ¿õ.", 12289, 36, 11, 182, 18 - LTEXT "&³äêðèòè:", 12305, 7, 39, 24, 10 - CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 - DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP - PUSHBUTTON "³äì³íà", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP - PUSHBUTTON "&Îãëÿä...", 12288, 170, 63, 50, 14, WS_TABSTOP -} - -/* - special folders -*/ -STRINGTABLE DISCARDABLE -{ - IDS_DESKTOP "Ñò³ëüíèöÿ" - IDS_MYCOMPUTER "̳é Êîìï'þòåð" -} - -/* - context menus -*/ -STRINGTABLE DISCARDABLE -{ - IDS_VIEW_LARGE "&Âåëèê³ ²êîíêè" - IDS_VIEW_SMALL "&Ìàë³ ²êîíêè" - IDS_VIEW_LIST "&Ñïèñîê" - IDS_VIEW_DETAILS "&Ïîäðîáèö³" - IDS_SELECT "Âè&áðàòè" - IDS_OPEN "³&äêðèòè" -} - -STRINGTABLE DISCARDABLE -{ - IDS_CREATEFOLDER_DENIED "Íå âäàëîñÿ ñòâîðèòè íîâó òåêó: ³äìîâà ó äîñòóï³." - IDS_CREATEFOLDER_CAPTION "Ïîìèëêà ïðè ñòâîðåíí³ íîâî¿ òåêè" - IDS_DELETEITEM_CAPTION "ϳäòâåðäæåííÿ âèëó÷åííÿ ôàéëó" - IDS_DELETEFOLDER_CAPTION "ϳäòâåðäæåííÿ âèëó÷åííÿ òåêè" - IDS_DELETEITEM_TEXT "Âè âïåâíåí³, ùî õî÷åòå âèëó÷èòè '%1'?" - IDS_DELETEMULTIPLE_TEXT "Âè âïåâíåí³, ùî õî÷åòå âèëó÷èòè ö³ %1 åëåìåíòè(³â)?" - IDS_OVERWRITEFILE_TEXT "Ïåðåïèñàòè Ôàéë %1?" - IDS_OVERWRITEFILE_CAPTION "ϳäòâåðäæåííÿ Ïåðåçàïèñó Ôàéëó" -} - -/* columns in the shellview */ -STRINGTABLE -BEGIN - IDS_SHV_COLUMN1 "Ôàéë" - IDS_SHV_COLUMN2 "Ðîçì³ð" - IDS_SHV_COLUMN3 "Òèï" - IDS_SHV_COLUMN4 "Çì³íåíî" - IDS_SHV_COLUMN5 "Àòðèáóòè" - IDS_SHV_COLUMN6 "Ðîçì³ð" - IDS_SHV_COLUMN7 "³ëüíèé Ðîçì³ð" -END +/* + * Copyright 2004 Ilya Korniyko + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT + +MENU_001 MENU DISCARDABLE +BEGIN + MENUITEM "&Âåëèê³ ²êîíêè", FCIDM_SHVIEW_BIGICON + MENUITEM "&Ìàë³ ²êîíêè", FCIDM_SHVIEW_SMALLICON + MENUITEM "&Ñïèñîê", FCIDM_SHVIEW_LISTVIEW + MENUITEM "&Ïîäðîáèö³", FCIDM_SHVIEW_REPORTVIEW +END + +/* + shellview background menu +*/ +MENU_002 MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + POPUP "&Âèãëÿä" + BEGIN + MENUITEM "&Âåëèê³ ²êîíêè", FCIDM_SHVIEW_BIGICON + MENUITEM "&Ìàë³ ²êîíêè", FCIDM_SHVIEW_SMALLICON + MENUITEM "&Ñïèñîê", FCIDM_SHVIEW_LISTVIEW + MENUITEM "&Ïîäðîáèö³", FCIDM_SHVIEW_REPORTVIEW + END + MENUITEM SEPARATOR + POPUP "Âïîðÿäêóâàòè &²êîíêè" + BEGIN + MENUITEM "Çà &Íàçâîþ", 0x30 /* column 0 */ + MENUITEM "Çà &Òèïîì", 0x32 /* column 2 */ + MENUITEM "Çà &Ðîçì³ðîì", 0x31 /* ... */ + MENUITEM "Çà &Äàòîþ", 0x33 + MENUITEM SEPARATOR + MENUITEM "&Àâòîìàòè÷íî", FCIDM_SHVIEW_AUTOARRANGE + END + MENUITEM "Âèð³âíÿòè ²êîíêè", FCIDM_SHVIEW_SNAPTOGRID + MENUITEM SEPARATOR + MENUITEM "Îíîâèòè", FCIDM_SHVIEW_REFRESH + MENUITEM SEPARATOR + MENUITEM "Âñòàâèòè", FCIDM_SHVIEW_INSERT + MENUITEM "Âñòàâèòè Ïîñèëàííÿ", FCIDM_SHVIEW_INSERTLINK + MENUITEM SEPARATOR + POPUP "Ñòâîðèòè" + BEGIN + MENUITEM "Íîâà &Òåêà", FCIDM_SHVIEW_NEWFOLDER + MENUITEM "Íîâå &Ïîñèëàííÿ", FCIDM_SHVIEW_NEWLINK + MENUITEM SEPARATOR + END + MENUITEM SEPARATOR + MENUITEM "Âëàñòèâîñò³", FCIDM_SHVIEW_PROPERTIES + END +END + +/* + shellview item menu +*/ +MENU_SHV_FILE MENU DISCARDABLE +BEGIN + POPUP "" + BEGIN + MENUITEM "&Ïðîâ³äíèê", FCIDM_SHVIEW_EXPLORE + MENUITEM "&³äêðèòè", FCIDM_SHVIEW_OPEN + MENUITEM SEPARATOR + MENUITEM "Âè&ð³çàòè", FCIDM_SHVIEW_CUT + MENUITEM "&Êîï³ÿ", FCIDM_SHVIEW_COPY + MENUITEM SEPARATOR + MENUITEM "&Ñòâîðèòè Ïîñèëàííÿ", FCIDM_SHVIEW_CREATELINK + MENUITEM "Âè&äàëèòè", FCIDM_SHVIEW_DELETE + MENUITEM "Ïåðå&éìåíóâàòè", FCIDM_SHVIEW_RENAME + MENUITEM SEPARATOR + MENUITEM "&Âëàñòèâîñò³", FCIDM_SHVIEW_PROPERTIES + END +END + +SHBRSFORFOLDER_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 188, 192 +STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU | DS_MODALFRAME | DS_SETFONT | DS_3DLOOK +CAPTION "Îãëÿä äî òåêè" +FONT 8, "MS Shell Dlg" +{ + DEFPUSHBUTTON "OK", 1, 80, 176, 50, 12, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP + PUSHBUTTON "³äì³íà", 2, 134, 176, 50, 12, WS_GROUP | WS_TABSTOP + LTEXT "", IDD_TITLE, 4, 4, 180, 12 + LTEXT "", IDD_STATUS, 4, 25, 180, 12 + CONTROL "", IDD_TREEVIEW, "SysTreeView32", + TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | + WS_BORDER | WS_TABSTOP, + 4, 40, 180, 120 +} + +SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 210, 152 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Ïðî %s" +FONT 10, "MS Shell Dlg" +{ + DEFPUSHBUTTON "OK", IDOK, 153, 133, 50, 12, WS_TABSTOP + LISTBOX 99, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER + ICON "", 1088, 10, 10, 14, 16 + LTEXT "", 100, 30, 10, 137, 10 + LTEXT "", 101, 30, 22, 137, 10 + LTEXT "Ðîçðîáíèêè ReactOS:", 98, 8, 55, 137, 10 +} + +SHELL_RUN_DLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "" +FONT 8, "MS Shell Dlg" +{ + ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE + LTEXT "Ââåä³òü ³ì'ÿ ïðîãðàìè, òåêè, äîêóìåíòó ÷è ðåñóðñ ²íòåðíåòó, ³ ReactOS â³äêðèº ¿õ.", 12289, 36, 11, 182, 18 + LTEXT "&³äêðèòè:", 12305, 7, 39, 24, 10 + CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 + DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "³äì³íà", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "&Îãëÿä...", 12288, 170, 63, 50, 14, WS_TABSTOP +} + +/* + special folders +*/ +STRINGTABLE DISCARDABLE +{ + IDS_DESKTOP "Ñò³ëüíèöÿ" + IDS_MYCOMPUTER "̳é Êîìï'þòåð" +} + +/* + context menus +*/ +STRINGTABLE DISCARDABLE +{ + IDS_VIEW_LARGE "&Âåëèê³ ²êîíêè" + IDS_VIEW_SMALL "&Ìàë³ ²êîíêè" + IDS_VIEW_LIST "&Ñïèñîê" + IDS_VIEW_DETAILS "&Ïîäðîáèö³" + IDS_SELECT "Âè&áðàòè" + IDS_OPEN "³&äêðèòè" +} + +STRINGTABLE DISCARDABLE +{ + IDS_CREATEFOLDER_DENIED "Íå âäàëîñÿ ñòâîðèòè íîâó òåêó: ³äìîâà ó äîñòóï³." + IDS_CREATEFOLDER_CAPTION "Ïîìèëêà ïðè ñòâîðåíí³ íîâî¿ òåêè" + IDS_DELETEITEM_CAPTION "ϳäòâåðäæåííÿ âèëó÷åííÿ ôàéëó" + IDS_DELETEFOLDER_CAPTION "ϳäòâåðäæåííÿ âèëó÷åííÿ òåêè" + IDS_DELETEITEM_TEXT "Âè âïåâíåí³, ùî õî÷åòå âèëó÷èòè '%1'?" + IDS_DELETEMULTIPLE_TEXT "Âè âïåâíåí³, ùî õî÷åòå âèëó÷èòè ö³ %1 åëåìåíòè(³â)?" + IDS_OVERWRITEFILE_TEXT "Ïåðåïèñàòè Ôàéë %1?" + IDS_OVERWRITEFILE_CAPTION "ϳäòâåðäæåííÿ Ïåðåçàïèñó Ôàéëó" +} + +/* columns in the shellview */ +STRINGTABLE +BEGIN + IDS_SHV_COLUMN1 "Ôàéë" + IDS_SHV_COLUMN2 "Ðîçì³ð" + IDS_SHV_COLUMN3 "Òèï" + IDS_SHV_COLUMN4 "Çì³íåíî" + IDS_SHV_COLUMN5 "Àòðèáóòè" + IDS_SHV_COLUMN6 "Ðîçì³ð" + IDS_SHV_COLUMN7 "³ëüíèé Ðîçì³ð" +END diff --git a/reactos/lib/shell32/shell32_Wa.rc b/reactos/lib/shell32/shell32_Wa.rc index 3984d4b4abf..3eff061b880 100644 --- a/reactos/lib/shell32/shell32_Wa.rc +++ b/reactos/lib/shell32/shell32_Wa.rc @@ -1,51 +1,51 @@ -/* - * Copyright 1998 Juergen Schmied - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -LANGUAGE LANG_WALON, SUBLANG_DEFAULT - -/* - * Si vos voloz aider avou li ratoûrnaedje des libes programes è walon, - * vos poloz scrîre a l' adresse emile - */ - -SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 210, 152 -STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Å dfait di %s" -FONT 10, "MS Shell Dlg" -{ - DEFPUSHBUTTON "I Va", IDOK, 153, 133, 50, 12, WS_TABSTOP - LISTBOX 99, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER - ICON "", 1088, 10, 10, 14, 16 - LTEXT "", 100, 30, 10, 137, 10 - LTEXT "", 101, 30, 22, 137, 10 - LTEXT "ReactOS a estu fwait par:", 98, 8, 55, 137, 10 -} - -SHELL_RUN_DLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 -STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "" -FONT 8, "MS Shell Dlg" -{ - ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE - LTEXT "Type the name of a program, folder, document, or Internet resource, and ReactOS will open it for you.", 12289, 36, 11, 182, 18 - LTEXT "&Open:", 12305, 7, 39, 24, 10 - CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 - DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP - PUSHBUTTON "Cancel", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP - PUSHBUTTON "&Browse...", 12288, 170, 63, 50, 14, WS_TABSTOP -} +/* + * Copyright 1998 Juergen Schmied + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +LANGUAGE LANG_WALON, SUBLANG_DEFAULT + +/* + * Si vos voloz aider avou li ratoûrnaedje des libes programes è walon, + * vos poloz scrîre a l' adresse emile + */ + +SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 210, 152 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Å dfait di %s" +FONT 10, "MS Shell Dlg" +{ + DEFPUSHBUTTON "I Va", IDOK, 153, 133, 50, 12, WS_TABSTOP + LISTBOX 99, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER + ICON "", 1088, 10, 10, 14, 16 + LTEXT "", 100, 30, 10, 137, 10 + LTEXT "", 101, 30, 22, 137, 10 + LTEXT "ReactOS a estu fwait par:", 98, 8, 55, 137, 10 +} + +SHELL_RUN_DLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "" +FONT 8, "MS Shell Dlg" +{ + ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE + LTEXT "Type the name of a program, folder, document, or Internet resource, and ReactOS will open it for you.", 12289, 36, 11, 182, 18 + LTEXT "&Open:", 12305, 7, 39, 24, 10 + CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 + DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "Cancel", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "&Browse...", 12288, 170, 63, 50, 14, WS_TABSTOP +} diff --git a/reactos/lib/shell32/shell32_Zh.rc b/reactos/lib/shell32/shell32_Zh.rc index ddd8143f1e1..f6172531aa8 100644 --- a/reactos/lib/shell32/shell32_Zh.rc +++ b/reactos/lib/shell32/shell32_Zh.rc @@ -1,62 +1,62 @@ -/* - * Copyright 1998 Juergen Schmied - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL -#pragma code_page(936) /* FIXME: default for CHINESE_TRADITIONAL is 950 */ - -SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 210, 152 -STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "êPì¶ %s" -FONT 8, "MS Shell Dlg" -{ - DEFPUSHBUTTON "´_¶¨", IDOK, 153, 133, 50, 12, WS_TABSTOP - LISTBOX 99, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER - ICON "", 1088, 10, 10, 14, 16 - LTEXT "", 100, 35, 10, 137, 10 - LTEXT "ReactOS was brought to you by:", 98, 8, 55, 137, 10 -} - -SHELL_RUN_DLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 -STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "" -FONT 8, "MS Shell Dlg" -{ - ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE - LTEXT "Type the name of a program, folder, document, or Internet resource, and ReactOS will open it for you.", 12289, 36, 11, 182, 18 - LTEXT "&Open:", 12305, 7, 39, 24, 10 - CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 - DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP - PUSHBUTTON "Cancel", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP - PUSHBUTTON "&Browse...", 12288, 170, 63, 50, 14, WS_TABSTOP -} - -/* columns in the shellview */ -STRINGTABLE LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL -BEGIN - IDS_SHV_COLUMN1 "™n°¸" - IDS_SHV_COLUMN2 "´óС" - IDS_SHV_COLUMN3 "îÐÍ" - IDS_SHV_COLUMN4 "ÒÑÐÞ¸Ä" - IDS_SHV_COLUMN5 "ŒÙÐÔ" - IDS_SHV_COLUMN6 "ʹÓÿÕég" - IDS_SHV_COLUMN7 "Ê£ðN¿Õég" - IDS_SHV_COLUMN8 "Name" /*FIXME*/ - IDS_SHV_COLUMN9 "Comments" /*FIXME*/ -END - -#pragma code_page(default) +/* + * Copyright 1998 Juergen Schmied + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL +#pragma code_page(936) /* FIXME: default for CHINESE_TRADITIONAL is 950 */ + +SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 210, 152 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "êPì¶ %s" +FONT 8, "MS Shell Dlg" +{ + DEFPUSHBUTTON "´_¶¨", IDOK, 153, 133, 50, 12, WS_TABSTOP + LISTBOX 99, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER + ICON "", 1088, 10, 10, 14, 16 + LTEXT "", 100, 35, 10, 137, 10 + LTEXT "ReactOS was brought to you by:", 98, 8, 55, 137, 10 +} + +SHELL_RUN_DLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "" +FONT 8, "MS Shell Dlg" +{ + ICON "", 12297, 7, 11, 18, 20, WS_VISIBLE + LTEXT "Type the name of a program, folder, document, or Internet resource, and ReactOS will open it for you.", 12289, 36, 11, 182, 18 + LTEXT "&Open:", 12305, 7, 39, 24, 10 + CONTROL "", 12298, "COMBOBOX", WS_TABSTOP | WS_GROUP | WS_VSCROLL | WS_VISIBLE | CBS_DISABLENOSCROLL | CBS_AUTOHSCROLL | CBS_DROPDOWN, 36, 37, 183, 100 + DEFPUSHBUTTON "OK", IDOK, 62, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "Cancel", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP + PUSHBUTTON "&Browse...", 12288, 170, 63, 50, 14, WS_TABSTOP +} + +/* columns in the shellview */ +STRINGTABLE LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL +BEGIN + IDS_SHV_COLUMN1 "™n°¸" + IDS_SHV_COLUMN2 "´óС" + IDS_SHV_COLUMN3 "îÐÍ" + IDS_SHV_COLUMN4 "ÒÑÐÞ¸Ä" + IDS_SHV_COLUMN5 "ŒÙÐÔ" + IDS_SHV_COLUMN6 "ʹÓÿÕég" + IDS_SHV_COLUMN7 "Ê£ðN¿Õég" + IDS_SHV_COLUMN8 "Name" /*FIXME*/ + IDS_SHV_COLUMN9 "Comments" /*FIXME*/ +END + +#pragma code_page(default) diff --git a/reactos/lib/shell32/shell32_main.c b/reactos/lib/shell32/shell32_main.c index ec19d72a62c..f107146a5ac 100644 --- a/reactos/lib/shell32/shell32_main.c +++ b/reactos/lib/shell32/shell32_main.c @@ -1,987 +1,987 @@ -/* - * Shell basics - * - * Copyright 1998 Marcus Meissner - * Copyright 1998 Juergen Schmied (jsch) * - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include "config.h" - -#include -#include -#include -#include - -#define COBJMACROS - -#include "windef.h" -#include "winbase.h" -#include "winerror.h" -#include "winreg.h" -#include "dlgs.h" -#include "shellapi.h" -#include "winuser.h" -#include "wingdi.h" -#include "shlobj.h" -#include "shlguid.h" -#include "shlwapi.h" - -#include "undocshell.h" -#include "pidl.h" -#include "shell32_main.h" -#include "version.h" - -#include "wine/debug.h" -#include "wine/unicode.h" - -WINE_DEFAULT_DEBUG_CHANNEL(shell); - -extern const char * const SHELL_Authors[]; - -#define MORE_DEBUG 1 -/************************************************************************* - * CommandLineToArgvW [SHELL32.@] - * - * We must interpret the quotes in the command line to rebuild the argv - * array correctly: - * - arguments are separated by spaces or tabs - * - quotes serve as optional argument delimiters - * '"a b"' -> 'a b' - * - escaped quotes must be converted back to '"' - * '\"' -> '"' - * - an odd number of '\'s followed by '"' correspond to half that number - * of '\' followed by a '"' (extension of the above) - * '\\\"' -> '\"' - * '\\\\\"' -> '\\"' - * - an even number of '\'s followed by a '"' correspond to half that number - * of '\', plus a regular quote serving as an argument delimiter (which - * means it does not appear in the result) - * 'a\\"b c"' -> 'a\b c' - * 'a\\\\"b c"' -> 'a\\b c' - * - '\' that are not followed by a '"' are copied literally - * 'a\b' -> 'a\b' - * 'a\\b' -> 'a\\b' - * - * Note: - * '\t' == 0x0009 - * ' ' == 0x0020 - * '"' == 0x0022 - * '\\' == 0x005c - */ -LPWSTR* WINAPI CommandLineToArgvW(LPCWSTR lpCmdline, int* numargs) -{ - DWORD argc; - HGLOBAL hargv; - LPWSTR *argv; - LPCWSTR cs; - LPWSTR arg,s,d; - LPWSTR cmdline; - int in_quotes,bcount; - - if (*lpCmdline==0) { - /* Return the path to the executable */ - DWORD len, size=16; - - hargv=GlobalAlloc(size, 0); - argv=GlobalLock(hargv); - for (;;) { - len = GetModuleFileNameW(0, (LPWSTR)(argv+1), size-sizeof(LPWSTR)); - if (!len) { - GlobalFree(hargv); - return NULL; - } - if (len < size) break; - size*=2; - hargv=GlobalReAlloc(hargv, size, 0); - argv=GlobalLock(hargv); - } - argv[0]=(LPWSTR)(argv+1); - if (numargs) - *numargs=2; - - return argv; - } - - /* to get a writeable copy */ - argc=0; - bcount=0; - in_quotes=0; - cs=lpCmdline; - while (1) { - if (*cs==0 || ((*cs==0x0009 || *cs==0x0020) && !in_quotes)) { - /* space */ - argc++; - /* skip the remaining spaces */ - while (*cs==0x0009 || *cs==0x0020) { - cs++; - } - if (*cs==0) - break; - bcount=0; - continue; - } else if (*cs==0x005c) { - /* '\', count them */ - bcount++; - } else if ((*cs==0x0022) && ((bcount & 1)==0)) { - /* unescaped '"' */ - in_quotes=!in_quotes; - bcount=0; - } else { - /* a regular character */ - bcount=0; - } - cs++; - } - /* Allocate in a single lump, the string array, and the strings that go with it. - * This way the caller can make a single GlobalFree call to free both, as per MSDN. - */ - hargv=GlobalAlloc(0, argc*sizeof(LPWSTR)+(strlenW(lpCmdline)+1)*sizeof(WCHAR)); - argv=GlobalLock(hargv); - if (!argv) - return NULL; - cmdline=(LPWSTR)(argv+argc); - strcpyW(cmdline, lpCmdline); - - argc=0; - bcount=0; - in_quotes=0; - arg=d=s=cmdline; - while (*s) { - if ((*s==0x0009 || *s==0x0020) && !in_quotes) { - /* Close the argument and copy it */ - *d=0; - argv[argc++]=arg; - - /* skip the remaining spaces */ - do { - s++; - } while (*s==0x0009 || *s==0x0020); - - /* Start with a new argument */ - arg=d=s; - bcount=0; - } else if (*s==0x005c) { - /* '\\' */ - *d++=*s++; - bcount++; - } else if (*s==0x0022) { - /* '"' */ - if ((bcount & 1)==0) { - /* Preceeded by an even number of '\', this is half that - * number of '\', plus a quote which we erase. - */ - d-=bcount/2; - in_quotes=!in_quotes; - s++; - } else { - /* Preceeded by an odd number of '\', this is half that - * number of '\' followed by a '"' - */ - d=d-bcount/2-1; - *d++='"'; - s++; - } - bcount=0; - } else { - /* a regular character */ - *d++=*s++; - bcount=0; - } - } - if (*arg) { - *d='\0'; - argv[argc++]=arg; - } - if (numargs) - *numargs=argc; - - return argv; -} - -/************************************************************************* - * SHGetFileInfoA [SHELL32.@] - * - */ - -DWORD WINAPI SHGetFileInfoW(LPCWSTR path,DWORD dwFileAttributes, - SHFILEINFOW *psfi, UINT sizeofpsfi, - UINT flags ) -{ - WCHAR szLocation[MAX_PATH], szFullPath[MAX_PATH]; - int iIndex; - DWORD ret = TRUE, dwAttributes = 0; - IShellFolder * psfParent = NULL; - IExtractIconW * pei = NULL; - LPITEMIDLIST pidlLast = NULL, pidl = NULL; - HRESULT hr = S_OK; - BOOL IconNotYetLoaded=TRUE; - - TRACE("(%s fattr=0x%lx sfi=%p(attr=0x%08lx) size=0x%x flags=0x%x)\n", - (flags & SHGFI_PIDL)? "pidl" : debugstr_w(path), dwFileAttributes, psfi, psfi->dwAttributes, sizeofpsfi, flags); - - if ((flags & SHGFI_USEFILEATTRIBUTES) && (flags & (SHGFI_ATTRIBUTES|SHGFI_EXETYPE|SHGFI_PIDL))) - return FALSE; - - /* windows initializes this values regardless of the flags */ - if (psfi != NULL) { - psfi->szDisplayName[0] = '\0'; - psfi->szTypeName[0] = '\0'; - psfi->iIcon = 0; - } - - if (!(flags & SHGFI_PIDL)){ - /* SHGitFileInfo should work with absolute and relative paths */ - if (PathIsRelativeW(path)){ - GetCurrentDirectoryW(MAX_PATH, szLocation); - PathCombineW(szFullPath, szLocation, path); - } else { - lstrcpynW(szFullPath, path, MAX_PATH); - } - } - - if (flags & SHGFI_EXETYPE) { - BOOL status = FALSE; - HANDLE hfile; - DWORD BinaryType; - IMAGE_DOS_HEADER mz_header; - IMAGE_NT_HEADERS nt; - DWORD len; - char magic[4]; - - if (flags != SHGFI_EXETYPE) return 0; - - status = GetBinaryTypeW (szFullPath, &BinaryType); - if (!status) return 0; - if ((BinaryType == SCS_DOS_BINARY) - || (BinaryType == SCS_PIF_BINARY)) return 0x4d5a; - - hfile = CreateFileW( szFullPath, GENERIC_READ, FILE_SHARE_READ, - NULL, OPEN_EXISTING, 0, 0 ); - if ( hfile == INVALID_HANDLE_VALUE ) return 0; - - /* The next section is adapted from MODULE_GetBinaryType, as we need - * to examine the image header to get OS and version information. We - * know from calling GetBinaryTypeA that the image is valid and either - * an NE or PE, so much error handling can be omitted. - * Seek to the start of the file and read the header information. - */ - - SetFilePointer( hfile, 0, NULL, SEEK_SET ); - ReadFile( hfile, &mz_header, sizeof(mz_header), &len, NULL ); - - SetFilePointer( hfile, mz_header.e_lfanew, NULL, SEEK_SET ); - ReadFile( hfile, magic, sizeof(magic), &len, NULL ); - if ( *(DWORD*)magic == IMAGE_NT_SIGNATURE ) - { - SetFilePointer( hfile, mz_header.e_lfanew, NULL, SEEK_SET ); - ReadFile( hfile, &nt, sizeof(nt), &len, NULL ); - CloseHandle( hfile ); - if (nt.OptionalHeader.Subsystem == IMAGE_SUBSYSTEM_WINDOWS_GUI) { - return IMAGE_NT_SIGNATURE - | (nt.OptionalHeader.MajorSubsystemVersion << 24) - | (nt.OptionalHeader.MinorSubsystemVersion << 16); - } - return IMAGE_NT_SIGNATURE; - } - else if ( *(WORD*)magic == IMAGE_OS2_SIGNATURE ) - { - IMAGE_OS2_HEADER ne; - SetFilePointer( hfile, mz_header.e_lfanew, NULL, SEEK_SET ); - ReadFile( hfile, &ne, sizeof(ne), &len, NULL ); - CloseHandle( hfile ); - if (ne.ne_exetyp == 2) return IMAGE_OS2_SIGNATURE - | (ne.ne_expver << 16); - return 0; - } - CloseHandle( hfile ); - return 0; - } - - /* psfi is NULL normally to query EXE type. If it is NULL, none of the - * below makes sense anyway. Windows allows this and just returns FALSE */ - if (psfi == NULL) return FALSE; - - /* translate the path into a pidl only when SHGFI_USEFILEATTRIBUTES - * is not specified. - The pidl functions fail on not existing file names */ - - if (flags & SHGFI_PIDL) { - pidl = ILClone((LPCITEMIDLIST)path); - } else if (!(flags & SHGFI_USEFILEATTRIBUTES)) { - hr = SHILCreateFromPathW(szFullPath, &pidl, &dwAttributes); - } - - if ((flags & SHGFI_PIDL) || !(flags & SHGFI_USEFILEATTRIBUTES)) - { - /* get the parent shellfolder */ - if (pidl) { - hr = SHBindToParent(pidl, &IID_IShellFolder, (LPVOID*)&psfParent, (LPCITEMIDLIST*)&pidlLast); - ILFree(pidl); - } else { - ERR("pidl is null!\n"); - return FALSE; - } - } - - /* get the attributes of the child */ - if (SUCCEEDED(hr) && (flags & SHGFI_ATTRIBUTES)) - { - if (!(flags & SHGFI_ATTR_SPECIFIED)) - { - psfi->dwAttributes = 0xffffffff; - } - IShellFolder_GetAttributesOf(psfParent, 1, (LPCITEMIDLIST*)&pidlLast, &(psfi->dwAttributes)); - } - - /* get the displayname */ - if (SUCCEEDED(hr) && (flags & SHGFI_DISPLAYNAME)) - { - if (flags & SHGFI_USEFILEATTRIBUTES) - { - lstrcpyW (psfi->szDisplayName, PathFindFileNameW(szFullPath)); - } - else - { - STRRET str; - hr = IShellFolder_GetDisplayNameOf(psfParent, pidlLast, SHGDN_INFOLDER, &str); - StrRetToStrNW (psfi->szDisplayName, MAX_PATH, &str, pidlLast); - } - } - - /* get the type name */ - if (SUCCEEDED(hr) && (flags & SHGFI_TYPENAME)) - { - static const WCHAR szFile[] = { 'F','i','l','e',0 }; - static const WCHAR szDashFile[] = { '-','f','i','l','e',0 }; - if (!(flags & SHGFI_USEFILEATTRIBUTES)) - { - char ftype[80]; - _ILGetFileType(pidlLast, ftype, 80); - MultiByteToWideChar(CP_ACP, 0, ftype, -1, psfi->szTypeName, 80 ); - } - else - { - if (dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) - strcatW (psfi->szTypeName, szFile); - else - { - WCHAR sTemp[64]; - lstrcpyW(sTemp,PathFindExtensionW(szFullPath)); - if (!( HCR_MapTypeToValueW(sTemp, sTemp, 64, TRUE) - && HCR_MapTypeToValueW(sTemp, psfi->szTypeName, 80, FALSE ))) - { - lstrcpynW (psfi->szTypeName, sTemp, 64); - strcatW (psfi->szTypeName, szDashFile); - } - } - } - } - - /* ### icons ###*/ - if (flags & SHGFI_LINKOVERLAY) - FIXME("set icon to link, stub\n"); - - if (flags & SHGFI_SELECTED) - FIXME("set icon to selected, stub\n"); - - if (flags & SHGFI_SHELLICONSIZE) - FIXME("set icon to shell size, stub\n"); - - /* get the iconlocation */ - if (SUCCEEDED(hr) && (flags & SHGFI_ICONLOCATION )) - { - UINT uDummy,uFlags; - hr = IShellFolder_GetUIObjectOf(psfParent, 0, 1, (LPCITEMIDLIST*)&pidlLast, &IID_IExtractIconA, &uDummy, (LPVOID*)&pei); - - if (SUCCEEDED(hr)) - { - hr = IExtractIconW_GetIconLocation(pei, (flags & SHGFI_OPENICON)? GIL_OPENICON : 0,szLocation, MAX_PATH, &iIndex, &uFlags); - psfi->iIcon = iIndex; - - if(uFlags != GIL_NOTFILENAME) - lstrcpyW (psfi->szDisplayName, szLocation); - else - ret = FALSE; - - IExtractIconA_Release(pei); - } - } - - /* get icon index (or load icon)*/ - if (SUCCEEDED(hr) && (flags & (SHGFI_ICON | SHGFI_SYSICONINDEX))) - { - - if (flags & SHGFI_USEFILEATTRIBUTES) - { - WCHAR sTemp [MAX_PATH]; - WCHAR * szExt; - DWORD dwNr=0; - - lstrcpynW(sTemp, szFullPath, MAX_PATH); - - if (dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) - psfi->iIcon = 2; - else - { - static const WCHAR p1W[] = {'%','1',0}; - psfi->iIcon = 0; - szExt = (LPWSTR) PathFindExtensionW(sTemp); - if ( szExt && HCR_MapTypeToValueW(szExt, sTemp, MAX_PATH, TRUE) - && HCR_GetDefaultIconW(sTemp, sTemp, MAX_PATH, &dwNr)) - { - if (!lstrcmpW(p1W,sTemp)) /* icon is in the file */ - strcpyW(sTemp, szFullPath); - - if (flags & SHGFI_SYSICONINDEX) - { - psfi->iIcon = SIC_GetIconIndex(sTemp,dwNr); - if (psfi->iIcon == -1) psfi->iIcon = 0; - } - else - { - IconNotYetLoaded=FALSE; - PrivateExtractIconsW(sTemp,dwNr,(flags & SHGFI_SMALLICON) ? - GetSystemMetrics(SM_CXSMICON) : GetSystemMetrics(SM_CXICON), - (flags & SHGFI_SMALLICON) ? GetSystemMetrics(SM_CYSMICON) : - GetSystemMetrics(SM_CYICON), &psfi->hIcon,0,1,0); - psfi->iIcon = dwNr; - } - } - } - } - else - { - if (!(PidlToSicIndex(psfParent, pidlLast, !(flags & SHGFI_SMALLICON), - (flags & SHGFI_OPENICON)? GIL_OPENICON : 0, &(psfi->iIcon)))) - { - ret = FALSE; - } - } - if (ret) - { - ret = (DWORD) ((flags & SHGFI_SMALLICON) ? ShellSmallIconList : ShellBigIconList); - } - } - - /* icon handle */ - if (SUCCEEDED(hr) && (flags & SHGFI_ICON) && IconNotYetLoaded) - psfi->hIcon = ImageList_GetIcon((flags & SHGFI_SMALLICON) ? ShellSmallIconList:ShellBigIconList, psfi->iIcon, ILD_NORMAL); - - if (flags & (SHGFI_UNKNOWN1 | SHGFI_UNKNOWN2 | SHGFI_UNKNOWN3)) - FIXME("unknown attribute!\n"); - - if (psfParent) - IShellFolder_Release(psfParent); - - if (hr != S_OK) - ret = FALSE; - - if(pidlLast) SHFree(pidlLast); -#ifdef MORE_DEBUG - TRACE ("icon=%p index=0x%08x attr=0x%08lx name=%s type=%s ret=0x%08lx\n", - psfi->hIcon, psfi->iIcon, psfi->dwAttributes, debugstr_w(psfi->szDisplayName), debugstr_w(psfi->szTypeName), ret); -#endif - return ret; -} - -/************************************************************************* - * SHGetFileInfoW [SHELL32.@] - */ - -DWORD WINAPI SHGetFileInfoA(LPCSTR path,DWORD dwFileAttributes, - SHFILEINFOA *psfi, UINT sizeofpsfi, - UINT flags ) -{ - INT len; - LPWSTR temppath; - DWORD ret; - SHFILEINFOW temppsfi; - - if (flags & SHGFI_PIDL) { - /* path contains a pidl */ - temppath = (LPWSTR) path; - } else { - len = MultiByteToWideChar(CP_ACP, 0, path, -1, NULL, 0); - temppath = HeapAlloc(GetProcessHeap(), 0, len*sizeof(WCHAR)); - MultiByteToWideChar(CP_ACP, 0, path, -1, temppath, len); - } - - if(psfi && (flags & SHGFI_ATTR_SPECIFIED)) - temppsfi.dwAttributes=psfi->dwAttributes; - - ret = SHGetFileInfoW(temppath, dwFileAttributes, (psfi == NULL)? NULL : &temppsfi, sizeof(temppsfi), flags); - - if (psfi) - { - if(flags & SHGFI_ICON) - psfi->hIcon=temppsfi.hIcon; - if(flags & (SHGFI_SYSICONINDEX|SHGFI_ICON|SHGFI_ICONLOCATION)) - psfi->iIcon=temppsfi.iIcon; - if(flags & SHGFI_ATTRIBUTES) - psfi->dwAttributes=temppsfi.dwAttributes; - if(flags & (SHGFI_DISPLAYNAME|SHGFI_ICONLOCATION)) - WideCharToMultiByte(CP_ACP, 0, temppsfi.szDisplayName, -1, psfi->szDisplayName, sizeof(psfi->szDisplayName), NULL, NULL); - if(flags & SHGFI_TYPENAME) - WideCharToMultiByte(CP_ACP, 0, temppsfi.szTypeName, -1, psfi->szTypeName, sizeof(psfi->szTypeName), NULL, NULL); - } - if(!(flags & SHGFI_PIDL)) HeapFree(GetProcessHeap(), 0, temppath); - return ret; -} - -/************************************************************************* - * DuplicateIcon [SHELL32.@] - */ -HICON WINAPI DuplicateIcon( HINSTANCE hInstance, HICON hIcon) -{ - ICONINFO IconInfo; - HICON hDupIcon = 0; - - TRACE("(%p, %p)\n", hInstance, hIcon); - - if(GetIconInfo(hIcon, &IconInfo)) - { - hDupIcon = CreateIconIndirect(&IconInfo); - - /* clean up hbmMask and hbmColor */ - DeleteObject(IconInfo.hbmMask); - DeleteObject(IconInfo.hbmColor); - } - - return hDupIcon; -} - -/************************************************************************* - * ExtractIconA [SHELL32.@] - */ -HICON WINAPI ExtractIconA(HINSTANCE hInstance, LPCSTR lpszFile, UINT nIconIndex) -{ - HICON ret; - INT len = MultiByteToWideChar(CP_ACP, 0, lpszFile, -1, NULL, 0); - LPWSTR lpwstrFile = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); - - TRACE("%p %s %d\n", hInstance, lpszFile, nIconIndex); - - MultiByteToWideChar(CP_ACP, 0, lpszFile, -1, lpwstrFile, len); - ret = ExtractIconW(hInstance, lpwstrFile, nIconIndex); - HeapFree(GetProcessHeap(), 0, lpwstrFile); - return ret; -} - -/************************************************************************* - * ExtractIconW [SHELL32.@] - */ -HICON WINAPI ExtractIconW(HINSTANCE hInstance, LPCWSTR lpszFile, UINT nIconIndex) -{ - HICON hIcon = NULL; - UINT ret; - UINT cx = GetSystemMetrics(SM_CXICON), cy = GetSystemMetrics(SM_CYICON); - - TRACE("%p %s %d\n", hInstance, debugstr_w(lpszFile), nIconIndex); - - if (nIconIndex == 0xFFFFFFFF) { - ret = PrivateExtractIconsW(lpszFile, 0, cx, cy, NULL, NULL, 0, LR_DEFAULTCOLOR); - if (ret != 0xFFFFFFFF && ret) - return (HICON)ret; - return NULL; - } - else - ret = PrivateExtractIconsW(lpszFile, nIconIndex, cx, cy, &hIcon, NULL, 1, LR_DEFAULTCOLOR); - - if (ret == 0xFFFFFFFF) - return (HICON)1; - else if (ret > 0 && hIcon) - return hIcon; - return NULL; -} - -typedef struct -{ - LPCWSTR szApp; - LPCWSTR szOtherStuff; - HICON hIcon; - HFONT hFont; -} ABOUT_INFO; - -#define IDC_STATIC_TEXT1 100 -#define IDC_STATIC_TEXT2 101 -#define IDC_LISTBOX 99 -#define IDC_WINE_TEXT 98 - -#define DROP_FIELD_TOP (-15) -#define DROP_FIELD_HEIGHT 15 - -static BOOL __get_dropline( HWND hWnd, LPRECT lprect ) -{ HWND hWndCtl = GetDlgItem(hWnd, IDC_WINE_TEXT); - if( hWndCtl ) - { GetWindowRect( hWndCtl, lprect ); - MapWindowPoints( 0, hWnd, (LPPOINT)lprect, 2 ); - lprect->bottom = (lprect->top += DROP_FIELD_TOP); - return TRUE; - } - return FALSE; -} - -/************************************************************************* - * SHAppBarMessage [SHELL32.@] - */ -UINT WINAPI SHAppBarMessage(DWORD msg, PAPPBARDATA data) -{ - int width=data->rc.right - data->rc.left; - int height=data->rc.bottom - data->rc.top; - RECT rec=data->rc; - switch (msg) - { case ABM_GETSTATE: - return ABS_ALWAYSONTOP | ABS_AUTOHIDE; - case ABM_GETTASKBARPOS: - GetWindowRect(data->hWnd, &rec); - data->rc=rec; - return TRUE; - case ABM_ACTIVATE: - SetActiveWindow(data->hWnd); - return TRUE; - case ABM_GETAUTOHIDEBAR: - data->hWnd=GetActiveWindow(); - return TRUE; - case ABM_NEW: - SetWindowPos(data->hWnd,HWND_TOP,rec.left,rec.top, - width,height,SWP_SHOWWINDOW); - return TRUE; - case ABM_QUERYPOS: - GetWindowRect(data->hWnd, &(data->rc)); - return TRUE; - case ABM_REMOVE: - FIXME("ABM_REMOVE broken\n"); - /* FIXME: this is wrong; should it be DestroyWindow instead? */ - /*CloseHandle(data->hWnd);*/ - return TRUE; - case ABM_SETAUTOHIDEBAR: - SetWindowPos(data->hWnd,HWND_TOP,rec.left+1000,rec.top, - width,height,SWP_SHOWWINDOW); - return TRUE; - case ABM_SETPOS: - data->uEdge=(ABE_RIGHT | ABE_LEFT); - SetWindowPos(data->hWnd,HWND_TOP,data->rc.left,data->rc.top, - width,height,SWP_SHOWWINDOW); - return TRUE; - case ABM_WINDOWPOSCHANGED: - return TRUE; - } - return FALSE; -} - -/************************************************************************* - * SHHelpShortcuts_RunDLL [SHELL32.@] - * - */ -DWORD WINAPI SHHelpShortcuts_RunDLL (DWORD dwArg1, DWORD dwArg2, DWORD dwArg3, DWORD dwArg4) -{ FIXME("(%lx, %lx, %lx, %lx) empty stub!\n", - dwArg1, dwArg2, dwArg3, dwArg4); - - return 0; -} - -/************************************************************************* - * SHLoadInProc [SHELL32.@] - * Create an instance of specified object class from within - * the shell process and release it immediately - */ - -HRESULT WINAPI SHLoadInProc (REFCLSID rclsid) -{ - void *ptr = NULL; - - TRACE("%s\n", debugstr_guid(rclsid)); - - CoCreateInstance(rclsid, NULL, CLSCTX_INPROC_SERVER, &IID_IUnknown,&ptr); - if(ptr) - { - IUnknown * pUnk = ptr; - IUnknown_Release(pUnk); - return NOERROR; - } - return DISP_E_MEMBERNOTFOUND; -} - -/************************************************************************* - * AboutDlgProc (internal) - */ -INT_PTR CALLBACK AboutDlgProc( HWND hWnd, UINT msg, WPARAM wParam, - LPARAM lParam ) -{ - HWND hWndCtl; - - TRACE("\n"); - - switch(msg) - { - case WM_INITDIALOG: - { - ABOUT_INFO *info = (ABOUT_INFO *)lParam; - WCHAR Template[512], AppTitle[512]; - - if (info) - { - const char* const *pstr = SHELL_Authors; - SendDlgItemMessageW(hWnd, stc1, STM_SETICON,(WPARAM)info->hIcon, 0); - GetWindowTextW( hWnd, Template, sizeof(Template)/sizeof(WCHAR) ); - sprintfW( AppTitle, Template, info->szApp ); - SetWindowTextW( hWnd, AppTitle ); - SetWindowTextW( GetDlgItem(hWnd, IDC_STATIC_TEXT1), info->szApp ); - SetWindowTextW( GetDlgItem(hWnd, IDC_STATIC_TEXT2), info->szOtherStuff ); - hWndCtl = GetDlgItem(hWnd, IDC_LISTBOX); - SendMessageW( hWndCtl, WM_SETREDRAW, 0, 0 ); - SendMessageW( hWndCtl, WM_SETFONT, (WPARAM)info->hFont, 0 ); - while (*pstr) - { - WCHAR name[64]; - /* authors list is in iso-8859-1 format */ - MultiByteToWideChar( 28591, 0, *pstr, -1, name, sizeof(name)/sizeof(WCHAR) ); - SendMessageW( hWndCtl, LB_ADDSTRING, (WPARAM)-1, (LPARAM)name ); - pstr++; - } - SendMessageW( hWndCtl, WM_SETREDRAW, 1, 0 ); - } - } - return 1; - - case WM_PAINT: - { RECT rect; - PAINTSTRUCT ps; - HDC hDC = BeginPaint( hWnd, &ps ); - - if( __get_dropline( hWnd, &rect ) ) { - SelectObject( hDC, GetStockObject( BLACK_PEN ) ); - MoveToEx( hDC, rect.left, rect.top, NULL ); - LineTo( hDC, rect.right, rect.bottom ); - } - EndPaint( hWnd, &ps ); - } - break; - - case WM_COMMAND: - if (wParam == IDOK || wParam == IDCANCEL) - { - EndDialog(hWnd, TRUE); - return TRUE; - } - break; - case WM_CLOSE: - EndDialog(hWnd, TRUE); - break; - } - - return 0; -} - - -/************************************************************************* - * ShellAboutA [SHELL32.288] - */ -BOOL WINAPI ShellAboutA( HWND hWnd, LPCSTR szApp, LPCSTR szOtherStuff, HICON hIcon ) -{ - BOOL ret; - LPWSTR appW = NULL, otherW = NULL; - int len; - - if (szApp) - { - len = MultiByteToWideChar(CP_ACP, 0, szApp, -1, NULL, 0); - appW = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); - MultiByteToWideChar(CP_ACP, 0, szApp, -1, appW, len); - } - if (szOtherStuff) - { - len = MultiByteToWideChar(CP_ACP, 0, szOtherStuff, -1, NULL, 0); - otherW = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); - MultiByteToWideChar(CP_ACP, 0, szOtherStuff, -1, otherW, len); - } - - ret = ShellAboutW(hWnd, appW, otherW, hIcon); - - HeapFree(GetProcessHeap(), 0, otherW); - HeapFree(GetProcessHeap(), 0, appW); - return ret; -} - - -/************************************************************************* - * ShellAboutW [SHELL32.289] - */ -BOOL WINAPI ShellAboutW( HWND hWnd, LPCWSTR szApp, LPCWSTR szOtherStuff, - HICON hIcon ) -{ - ABOUT_INFO info; - LOGFONTW logFont; - HRSRC hRes; - LPVOID template; - BOOL bRet; - static const WCHAR wszSHELL_ABOUT_MSGBOX[] = - {'S','H','E','L','L','_','A','B','O','U','T','_','M','S','G','B','O','X',0}; - - TRACE("\n"); - - if(!(hRes = FindResourceW(shell32_hInstance, wszSHELL_ABOUT_MSGBOX, (LPWSTR)RT_DIALOG))) - return FALSE; - if(!(template = (LPVOID)LoadResource(shell32_hInstance, hRes))) - return FALSE; - info.szApp = szApp; - info.szOtherStuff = szOtherStuff; - info.hIcon = hIcon ? hIcon : LoadIconW( 0, (LPWSTR)IDI_WINLOGO ); - - SystemParametersInfoW( SPI_GETICONTITLELOGFONT, 0, &logFont, 0 ); - info.hFont = CreateFontIndirectW( &logFont ); - - bRet = DialogBoxIndirectParamW((HINSTANCE)GetWindowLongPtrW( hWnd, GWLP_HINSTANCE ), - template, hWnd, AboutDlgProc, (LPARAM)&info ); - DeleteObject(info.hFont); - return bRet; -} - -/************************************************************************* - * FreeIconList (SHELL32.@) - */ -void WINAPI FreeIconList( DWORD dw ) -{ FIXME("(%lx): stub\n",dw); -} - - -/************************************************************************* - * ShellDDEInit (SHELL32.@) - */ -void WINAPI ShellDDEInit(BOOL start) -{ - FIXME("stub: %d\n", start); -} - -/*********************************************************************** - * DllGetVersion [SHELL32.@] - * - * Retrieves version information of the 'SHELL32.DLL' - * - * PARAMS - * pdvi [O] pointer to version information structure. - * - * RETURNS - * Success: S_OK - * Failure: E_INVALIDARG - * - * NOTES - * Returns version of a shell32.dll from IE4.01 SP1. - */ - -HRESULT WINAPI SHELL32_DllGetVersion (DLLVERSIONINFO *pdvi) -{ - /* FIXME: shouldn't these values come from the version resource? */ - if (pdvi->cbSize == sizeof(DLLVERSIONINFO) || - pdvi->cbSize == sizeof(DLLVERSIONINFO2)) - { - pdvi->dwMajorVersion = WINE_FILEVERSION_MAJOR; - pdvi->dwMinorVersion = WINE_FILEVERSION_MINOR; - pdvi->dwBuildNumber = WINE_FILEVERSION_BUILD; - pdvi->dwPlatformID = WINE_FILEVERSION_PLATFORMID; - if (pdvi->cbSize == sizeof(DLLVERSIONINFO2)) - { - DLLVERSIONINFO2 *pdvi2 = (DLLVERSIONINFO2 *)pdvi; - - pdvi2->dwFlags = 0; - pdvi2->ullVersion = MAKEDLLVERULL(WINE_FILEVERSION_MAJOR, - WINE_FILEVERSION_MINOR, - WINE_FILEVERSION_BUILD, - WINE_FILEVERSION_PLATFORMID); - } - TRACE("%lu.%lu.%lu.%lu\n", - pdvi->dwMajorVersion, pdvi->dwMinorVersion, - pdvi->dwBuildNumber, pdvi->dwPlatformID); - return S_OK; - } - else - { - WARN("wrong DLLVERSIONINFO size from app\n"); - return E_INVALIDARG; - } -} -/************************************************************************* - * global variables of the shell32.dll - * all are once per process - * - */ -HINSTANCE shell32_hInstance = 0; -HIMAGELIST ShellSmallIconList = 0; -HIMAGELIST ShellBigIconList = 0; - - -/************************************************************************* - * SHELL32 DllMain - * - * NOTES - * calling oleinitialize here breaks sone apps. - */ - -BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad) -{ - TRACE("%p 0x%lx %p\n", hinstDLL, fdwReason, fImpLoad); - - switch (fdwReason) - { - case DLL_PROCESS_ATTACH: - shell32_hInstance = hinstDLL; - DisableThreadLibraryCalls(shell32_hInstance); - - /* get full path to this DLL for IExtractIconW_fnGetIconLocation() */ - GetModuleFileNameW(hinstDLL, swShell32Name, MAX_PATH); - swShell32Name[MAX_PATH - 1] = '\0'; - - InitCommonControlsEx(NULL); - - SIC_Initialize(); - InitChangeNotifications(); - break; - - case DLL_PROCESS_DETACH: - shell32_hInstance = 0; - SIC_Destroy(); - FreeChangeNotifications(); - break; - } - return TRUE; -} - -/************************************************************************* - * DllInstall [SHELL32.@] - * - * PARAMETERS - * - * BOOL bInstall - TRUE for install, FALSE for uninstall - * LPCWSTR pszCmdLine - command line (unused by shell32?) - */ - -HRESULT WINAPI SHELL32_DllInstall(BOOL bInstall, LPCWSTR cmdline) -{ - FIXME("(%s, %s): stub!\n", bInstall ? "TRUE":"FALSE", debugstr_w(cmdline)); - - return S_OK; /* indicate success */ -} - -/*********************************************************************** - * DllCanUnloadNow (SHELL32.@) - */ -HRESULT WINAPI SHELL32_DllCanUnloadNow(void) -{ - FIXME("(void): stub\n"); - - return S_FALSE; -} +/* + * Shell basics + * + * Copyright 1998 Marcus Meissner + * Copyright 1998 Juergen Schmied (jsch) * + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" + +#include +#include +#include +#include + +#define COBJMACROS + +#include "windef.h" +#include "winbase.h" +#include "winerror.h" +#include "winreg.h" +#include "dlgs.h" +#include "shellapi.h" +#include "winuser.h" +#include "wingdi.h" +#include "shlobj.h" +#include "shlguid.h" +#include "shlwapi.h" + +#include "undocshell.h" +#include "pidl.h" +#include "shell32_main.h" +#include "version.h" + +#include "wine/debug.h" +#include "wine/unicode.h" + +WINE_DEFAULT_DEBUG_CHANNEL(shell); + +extern const char * const SHELL_Authors[]; + +#define MORE_DEBUG 1 +/************************************************************************* + * CommandLineToArgvW [SHELL32.@] + * + * We must interpret the quotes in the command line to rebuild the argv + * array correctly: + * - arguments are separated by spaces or tabs + * - quotes serve as optional argument delimiters + * '"a b"' -> 'a b' + * - escaped quotes must be converted back to '"' + * '\"' -> '"' + * - an odd number of '\'s followed by '"' correspond to half that number + * of '\' followed by a '"' (extension of the above) + * '\\\"' -> '\"' + * '\\\\\"' -> '\\"' + * - an even number of '\'s followed by a '"' correspond to half that number + * of '\', plus a regular quote serving as an argument delimiter (which + * means it does not appear in the result) + * 'a\\"b c"' -> 'a\b c' + * 'a\\\\"b c"' -> 'a\\b c' + * - '\' that are not followed by a '"' are copied literally + * 'a\b' -> 'a\b' + * 'a\\b' -> 'a\\b' + * + * Note: + * '\t' == 0x0009 + * ' ' == 0x0020 + * '"' == 0x0022 + * '\\' == 0x005c + */ +LPWSTR* WINAPI CommandLineToArgvW(LPCWSTR lpCmdline, int* numargs) +{ + DWORD argc; + HGLOBAL hargv; + LPWSTR *argv; + LPCWSTR cs; + LPWSTR arg,s,d; + LPWSTR cmdline; + int in_quotes,bcount; + + if (*lpCmdline==0) { + /* Return the path to the executable */ + DWORD len, size=16; + + hargv=GlobalAlloc(size, 0); + argv=GlobalLock(hargv); + for (;;) { + len = GetModuleFileNameW(0, (LPWSTR)(argv+1), size-sizeof(LPWSTR)); + if (!len) { + GlobalFree(hargv); + return NULL; + } + if (len < size) break; + size*=2; + hargv=GlobalReAlloc(hargv, size, 0); + argv=GlobalLock(hargv); + } + argv[0]=(LPWSTR)(argv+1); + if (numargs) + *numargs=2; + + return argv; + } + + /* to get a writeable copy */ + argc=0; + bcount=0; + in_quotes=0; + cs=lpCmdline; + while (1) { + if (*cs==0 || ((*cs==0x0009 || *cs==0x0020) && !in_quotes)) { + /* space */ + argc++; + /* skip the remaining spaces */ + while (*cs==0x0009 || *cs==0x0020) { + cs++; + } + if (*cs==0) + break; + bcount=0; + continue; + } else if (*cs==0x005c) { + /* '\', count them */ + bcount++; + } else if ((*cs==0x0022) && ((bcount & 1)==0)) { + /* unescaped '"' */ + in_quotes=!in_quotes; + bcount=0; + } else { + /* a regular character */ + bcount=0; + } + cs++; + } + /* Allocate in a single lump, the string array, and the strings that go with it. + * This way the caller can make a single GlobalFree call to free both, as per MSDN. + */ + hargv=GlobalAlloc(0, argc*sizeof(LPWSTR)+(strlenW(lpCmdline)+1)*sizeof(WCHAR)); + argv=GlobalLock(hargv); + if (!argv) + return NULL; + cmdline=(LPWSTR)(argv+argc); + strcpyW(cmdline, lpCmdline); + + argc=0; + bcount=0; + in_quotes=0; + arg=d=s=cmdline; + while (*s) { + if ((*s==0x0009 || *s==0x0020) && !in_quotes) { + /* Close the argument and copy it */ + *d=0; + argv[argc++]=arg; + + /* skip the remaining spaces */ + do { + s++; + } while (*s==0x0009 || *s==0x0020); + + /* Start with a new argument */ + arg=d=s; + bcount=0; + } else if (*s==0x005c) { + /* '\\' */ + *d++=*s++; + bcount++; + } else if (*s==0x0022) { + /* '"' */ + if ((bcount & 1)==0) { + /* Preceeded by an even number of '\', this is half that + * number of '\', plus a quote which we erase. + */ + d-=bcount/2; + in_quotes=!in_quotes; + s++; + } else { + /* Preceeded by an odd number of '\', this is half that + * number of '\' followed by a '"' + */ + d=d-bcount/2-1; + *d++='"'; + s++; + } + bcount=0; + } else { + /* a regular character */ + *d++=*s++; + bcount=0; + } + } + if (*arg) { + *d='\0'; + argv[argc++]=arg; + } + if (numargs) + *numargs=argc; + + return argv; +} + +/************************************************************************* + * SHGetFileInfoA [SHELL32.@] + * + */ + +DWORD WINAPI SHGetFileInfoW(LPCWSTR path,DWORD dwFileAttributes, + SHFILEINFOW *psfi, UINT sizeofpsfi, + UINT flags ) +{ + WCHAR szLocation[MAX_PATH], szFullPath[MAX_PATH]; + int iIndex; + DWORD ret = TRUE, dwAttributes = 0; + IShellFolder * psfParent = NULL; + IExtractIconW * pei = NULL; + LPITEMIDLIST pidlLast = NULL, pidl = NULL; + HRESULT hr = S_OK; + BOOL IconNotYetLoaded=TRUE; + + TRACE("(%s fattr=0x%lx sfi=%p(attr=0x%08lx) size=0x%x flags=0x%x)\n", + (flags & SHGFI_PIDL)? "pidl" : debugstr_w(path), dwFileAttributes, psfi, psfi->dwAttributes, sizeofpsfi, flags); + + if ((flags & SHGFI_USEFILEATTRIBUTES) && (flags & (SHGFI_ATTRIBUTES|SHGFI_EXETYPE|SHGFI_PIDL))) + return FALSE; + + /* windows initializes this values regardless of the flags */ + if (psfi != NULL) { + psfi->szDisplayName[0] = '\0'; + psfi->szTypeName[0] = '\0'; + psfi->iIcon = 0; + } + + if (!(flags & SHGFI_PIDL)){ + /* SHGitFileInfo should work with absolute and relative paths */ + if (PathIsRelativeW(path)){ + GetCurrentDirectoryW(MAX_PATH, szLocation); + PathCombineW(szFullPath, szLocation, path); + } else { + lstrcpynW(szFullPath, path, MAX_PATH); + } + } + + if (flags & SHGFI_EXETYPE) { + BOOL status = FALSE; + HANDLE hfile; + DWORD BinaryType; + IMAGE_DOS_HEADER mz_header; + IMAGE_NT_HEADERS nt; + DWORD len; + char magic[4]; + + if (flags != SHGFI_EXETYPE) return 0; + + status = GetBinaryTypeW (szFullPath, &BinaryType); + if (!status) return 0; + if ((BinaryType == SCS_DOS_BINARY) + || (BinaryType == SCS_PIF_BINARY)) return 0x4d5a; + + hfile = CreateFileW( szFullPath, GENERIC_READ, FILE_SHARE_READ, + NULL, OPEN_EXISTING, 0, 0 ); + if ( hfile == INVALID_HANDLE_VALUE ) return 0; + + /* The next section is adapted from MODULE_GetBinaryType, as we need + * to examine the image header to get OS and version information. We + * know from calling GetBinaryTypeA that the image is valid and either + * an NE or PE, so much error handling can be omitted. + * Seek to the start of the file and read the header information. + */ + + SetFilePointer( hfile, 0, NULL, SEEK_SET ); + ReadFile( hfile, &mz_header, sizeof(mz_header), &len, NULL ); + + SetFilePointer( hfile, mz_header.e_lfanew, NULL, SEEK_SET ); + ReadFile( hfile, magic, sizeof(magic), &len, NULL ); + if ( *(DWORD*)magic == IMAGE_NT_SIGNATURE ) + { + SetFilePointer( hfile, mz_header.e_lfanew, NULL, SEEK_SET ); + ReadFile( hfile, &nt, sizeof(nt), &len, NULL ); + CloseHandle( hfile ); + if (nt.OptionalHeader.Subsystem == IMAGE_SUBSYSTEM_WINDOWS_GUI) { + return IMAGE_NT_SIGNATURE + | (nt.OptionalHeader.MajorSubsystemVersion << 24) + | (nt.OptionalHeader.MinorSubsystemVersion << 16); + } + return IMAGE_NT_SIGNATURE; + } + else if ( *(WORD*)magic == IMAGE_OS2_SIGNATURE ) + { + IMAGE_OS2_HEADER ne; + SetFilePointer( hfile, mz_header.e_lfanew, NULL, SEEK_SET ); + ReadFile( hfile, &ne, sizeof(ne), &len, NULL ); + CloseHandle( hfile ); + if (ne.ne_exetyp == 2) return IMAGE_OS2_SIGNATURE + | (ne.ne_expver << 16); + return 0; + } + CloseHandle( hfile ); + return 0; + } + + /* psfi is NULL normally to query EXE type. If it is NULL, none of the + * below makes sense anyway. Windows allows this and just returns FALSE */ + if (psfi == NULL) return FALSE; + + /* translate the path into a pidl only when SHGFI_USEFILEATTRIBUTES + * is not specified. + The pidl functions fail on not existing file names */ + + if (flags & SHGFI_PIDL) { + pidl = ILClone((LPCITEMIDLIST)path); + } else if (!(flags & SHGFI_USEFILEATTRIBUTES)) { + hr = SHILCreateFromPathW(szFullPath, &pidl, &dwAttributes); + } + + if ((flags & SHGFI_PIDL) || !(flags & SHGFI_USEFILEATTRIBUTES)) + { + /* get the parent shellfolder */ + if (pidl) { + hr = SHBindToParent(pidl, &IID_IShellFolder, (LPVOID*)&psfParent, (LPCITEMIDLIST*)&pidlLast); + ILFree(pidl); + } else { + ERR("pidl is null!\n"); + return FALSE; + } + } + + /* get the attributes of the child */ + if (SUCCEEDED(hr) && (flags & SHGFI_ATTRIBUTES)) + { + if (!(flags & SHGFI_ATTR_SPECIFIED)) + { + psfi->dwAttributes = 0xffffffff; + } + IShellFolder_GetAttributesOf(psfParent, 1, (LPCITEMIDLIST*)&pidlLast, &(psfi->dwAttributes)); + } + + /* get the displayname */ + if (SUCCEEDED(hr) && (flags & SHGFI_DISPLAYNAME)) + { + if (flags & SHGFI_USEFILEATTRIBUTES) + { + lstrcpyW (psfi->szDisplayName, PathFindFileNameW(szFullPath)); + } + else + { + STRRET str; + hr = IShellFolder_GetDisplayNameOf(psfParent, pidlLast, SHGDN_INFOLDER, &str); + StrRetToStrNW (psfi->szDisplayName, MAX_PATH, &str, pidlLast); + } + } + + /* get the type name */ + if (SUCCEEDED(hr) && (flags & SHGFI_TYPENAME)) + { + static const WCHAR szFile[] = { 'F','i','l','e',0 }; + static const WCHAR szDashFile[] = { '-','f','i','l','e',0 }; + if (!(flags & SHGFI_USEFILEATTRIBUTES)) + { + char ftype[80]; + _ILGetFileType(pidlLast, ftype, 80); + MultiByteToWideChar(CP_ACP, 0, ftype, -1, psfi->szTypeName, 80 ); + } + else + { + if (dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) + strcatW (psfi->szTypeName, szFile); + else + { + WCHAR sTemp[64]; + lstrcpyW(sTemp,PathFindExtensionW(szFullPath)); + if (!( HCR_MapTypeToValueW(sTemp, sTemp, 64, TRUE) + && HCR_MapTypeToValueW(sTemp, psfi->szTypeName, 80, FALSE ))) + { + lstrcpynW (psfi->szTypeName, sTemp, 64); + strcatW (psfi->szTypeName, szDashFile); + } + } + } + } + + /* ### icons ###*/ + if (flags & SHGFI_LINKOVERLAY) + FIXME("set icon to link, stub\n"); + + if (flags & SHGFI_SELECTED) + FIXME("set icon to selected, stub\n"); + + if (flags & SHGFI_SHELLICONSIZE) + FIXME("set icon to shell size, stub\n"); + + /* get the iconlocation */ + if (SUCCEEDED(hr) && (flags & SHGFI_ICONLOCATION )) + { + UINT uDummy,uFlags; + hr = IShellFolder_GetUIObjectOf(psfParent, 0, 1, (LPCITEMIDLIST*)&pidlLast, &IID_IExtractIconA, &uDummy, (LPVOID*)&pei); + + if (SUCCEEDED(hr)) + { + hr = IExtractIconW_GetIconLocation(pei, (flags & SHGFI_OPENICON)? GIL_OPENICON : 0,szLocation, MAX_PATH, &iIndex, &uFlags); + psfi->iIcon = iIndex; + + if(uFlags != GIL_NOTFILENAME) + lstrcpyW (psfi->szDisplayName, szLocation); + else + ret = FALSE; + + IExtractIconA_Release(pei); + } + } + + /* get icon index (or load icon)*/ + if (SUCCEEDED(hr) && (flags & (SHGFI_ICON | SHGFI_SYSICONINDEX))) + { + + if (flags & SHGFI_USEFILEATTRIBUTES) + { + WCHAR sTemp [MAX_PATH]; + WCHAR * szExt; + DWORD dwNr=0; + + lstrcpynW(sTemp, szFullPath, MAX_PATH); + + if (dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) + psfi->iIcon = 2; + else + { + static const WCHAR p1W[] = {'%','1',0}; + psfi->iIcon = 0; + szExt = (LPWSTR) PathFindExtensionW(sTemp); + if ( szExt && HCR_MapTypeToValueW(szExt, sTemp, MAX_PATH, TRUE) + && HCR_GetDefaultIconW(sTemp, sTemp, MAX_PATH, &dwNr)) + { + if (!lstrcmpW(p1W,sTemp)) /* icon is in the file */ + strcpyW(sTemp, szFullPath); + + if (flags & SHGFI_SYSICONINDEX) + { + psfi->iIcon = SIC_GetIconIndex(sTemp,dwNr); + if (psfi->iIcon == -1) psfi->iIcon = 0; + } + else + { + IconNotYetLoaded=FALSE; + PrivateExtractIconsW(sTemp,dwNr,(flags & SHGFI_SMALLICON) ? + GetSystemMetrics(SM_CXSMICON) : GetSystemMetrics(SM_CXICON), + (flags & SHGFI_SMALLICON) ? GetSystemMetrics(SM_CYSMICON) : + GetSystemMetrics(SM_CYICON), &psfi->hIcon,0,1,0); + psfi->iIcon = dwNr; + } + } + } + } + else + { + if (!(PidlToSicIndex(psfParent, pidlLast, !(flags & SHGFI_SMALLICON), + (flags & SHGFI_OPENICON)? GIL_OPENICON : 0, &(psfi->iIcon)))) + { + ret = FALSE; + } + } + if (ret) + { + ret = (DWORD) ((flags & SHGFI_SMALLICON) ? ShellSmallIconList : ShellBigIconList); + } + } + + /* icon handle */ + if (SUCCEEDED(hr) && (flags & SHGFI_ICON) && IconNotYetLoaded) + psfi->hIcon = ImageList_GetIcon((flags & SHGFI_SMALLICON) ? ShellSmallIconList:ShellBigIconList, psfi->iIcon, ILD_NORMAL); + + if (flags & (SHGFI_UNKNOWN1 | SHGFI_UNKNOWN2 | SHGFI_UNKNOWN3)) + FIXME("unknown attribute!\n"); + + if (psfParent) + IShellFolder_Release(psfParent); + + if (hr != S_OK) + ret = FALSE; + + if(pidlLast) SHFree(pidlLast); +#ifdef MORE_DEBUG + TRACE ("icon=%p index=0x%08x attr=0x%08lx name=%s type=%s ret=0x%08lx\n", + psfi->hIcon, psfi->iIcon, psfi->dwAttributes, debugstr_w(psfi->szDisplayName), debugstr_w(psfi->szTypeName), ret); +#endif + return ret; +} + +/************************************************************************* + * SHGetFileInfoW [SHELL32.@] + */ + +DWORD WINAPI SHGetFileInfoA(LPCSTR path,DWORD dwFileAttributes, + SHFILEINFOA *psfi, UINT sizeofpsfi, + UINT flags ) +{ + INT len; + LPWSTR temppath; + DWORD ret; + SHFILEINFOW temppsfi; + + if (flags & SHGFI_PIDL) { + /* path contains a pidl */ + temppath = (LPWSTR) path; + } else { + len = MultiByteToWideChar(CP_ACP, 0, path, -1, NULL, 0); + temppath = HeapAlloc(GetProcessHeap(), 0, len*sizeof(WCHAR)); + MultiByteToWideChar(CP_ACP, 0, path, -1, temppath, len); + } + + if(psfi && (flags & SHGFI_ATTR_SPECIFIED)) + temppsfi.dwAttributes=psfi->dwAttributes; + + ret = SHGetFileInfoW(temppath, dwFileAttributes, (psfi == NULL)? NULL : &temppsfi, sizeof(temppsfi), flags); + + if (psfi) + { + if(flags & SHGFI_ICON) + psfi->hIcon=temppsfi.hIcon; + if(flags & (SHGFI_SYSICONINDEX|SHGFI_ICON|SHGFI_ICONLOCATION)) + psfi->iIcon=temppsfi.iIcon; + if(flags & SHGFI_ATTRIBUTES) + psfi->dwAttributes=temppsfi.dwAttributes; + if(flags & (SHGFI_DISPLAYNAME|SHGFI_ICONLOCATION)) + WideCharToMultiByte(CP_ACP, 0, temppsfi.szDisplayName, -1, psfi->szDisplayName, sizeof(psfi->szDisplayName), NULL, NULL); + if(flags & SHGFI_TYPENAME) + WideCharToMultiByte(CP_ACP, 0, temppsfi.szTypeName, -1, psfi->szTypeName, sizeof(psfi->szTypeName), NULL, NULL); + } + if(!(flags & SHGFI_PIDL)) HeapFree(GetProcessHeap(), 0, temppath); + return ret; +} + +/************************************************************************* + * DuplicateIcon [SHELL32.@] + */ +HICON WINAPI DuplicateIcon( HINSTANCE hInstance, HICON hIcon) +{ + ICONINFO IconInfo; + HICON hDupIcon = 0; + + TRACE("(%p, %p)\n", hInstance, hIcon); + + if(GetIconInfo(hIcon, &IconInfo)) + { + hDupIcon = CreateIconIndirect(&IconInfo); + + /* clean up hbmMask and hbmColor */ + DeleteObject(IconInfo.hbmMask); + DeleteObject(IconInfo.hbmColor); + } + + return hDupIcon; +} + +/************************************************************************* + * ExtractIconA [SHELL32.@] + */ +HICON WINAPI ExtractIconA(HINSTANCE hInstance, LPCSTR lpszFile, UINT nIconIndex) +{ + HICON ret; + INT len = MultiByteToWideChar(CP_ACP, 0, lpszFile, -1, NULL, 0); + LPWSTR lpwstrFile = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); + + TRACE("%p %s %d\n", hInstance, lpszFile, nIconIndex); + + MultiByteToWideChar(CP_ACP, 0, lpszFile, -1, lpwstrFile, len); + ret = ExtractIconW(hInstance, lpwstrFile, nIconIndex); + HeapFree(GetProcessHeap(), 0, lpwstrFile); + return ret; +} + +/************************************************************************* + * ExtractIconW [SHELL32.@] + */ +HICON WINAPI ExtractIconW(HINSTANCE hInstance, LPCWSTR lpszFile, UINT nIconIndex) +{ + HICON hIcon = NULL; + UINT ret; + UINT cx = GetSystemMetrics(SM_CXICON), cy = GetSystemMetrics(SM_CYICON); + + TRACE("%p %s %d\n", hInstance, debugstr_w(lpszFile), nIconIndex); + + if (nIconIndex == 0xFFFFFFFF) { + ret = PrivateExtractIconsW(lpszFile, 0, cx, cy, NULL, NULL, 0, LR_DEFAULTCOLOR); + if (ret != 0xFFFFFFFF && ret) + return (HICON)ret; + return NULL; + } + else + ret = PrivateExtractIconsW(lpszFile, nIconIndex, cx, cy, &hIcon, NULL, 1, LR_DEFAULTCOLOR); + + if (ret == 0xFFFFFFFF) + return (HICON)1; + else if (ret > 0 && hIcon) + return hIcon; + return NULL; +} + +typedef struct +{ + LPCWSTR szApp; + LPCWSTR szOtherStuff; + HICON hIcon; + HFONT hFont; +} ABOUT_INFO; + +#define IDC_STATIC_TEXT1 100 +#define IDC_STATIC_TEXT2 101 +#define IDC_LISTBOX 99 +#define IDC_WINE_TEXT 98 + +#define DROP_FIELD_TOP (-15) +#define DROP_FIELD_HEIGHT 15 + +static BOOL __get_dropline( HWND hWnd, LPRECT lprect ) +{ HWND hWndCtl = GetDlgItem(hWnd, IDC_WINE_TEXT); + if( hWndCtl ) + { GetWindowRect( hWndCtl, lprect ); + MapWindowPoints( 0, hWnd, (LPPOINT)lprect, 2 ); + lprect->bottom = (lprect->top += DROP_FIELD_TOP); + return TRUE; + } + return FALSE; +} + +/************************************************************************* + * SHAppBarMessage [SHELL32.@] + */ +UINT WINAPI SHAppBarMessage(DWORD msg, PAPPBARDATA data) +{ + int width=data->rc.right - data->rc.left; + int height=data->rc.bottom - data->rc.top; + RECT rec=data->rc; + switch (msg) + { case ABM_GETSTATE: + return ABS_ALWAYSONTOP | ABS_AUTOHIDE; + case ABM_GETTASKBARPOS: + GetWindowRect(data->hWnd, &rec); + data->rc=rec; + return TRUE; + case ABM_ACTIVATE: + SetActiveWindow(data->hWnd); + return TRUE; + case ABM_GETAUTOHIDEBAR: + data->hWnd=GetActiveWindow(); + return TRUE; + case ABM_NEW: + SetWindowPos(data->hWnd,HWND_TOP,rec.left,rec.top, + width,height,SWP_SHOWWINDOW); + return TRUE; + case ABM_QUERYPOS: + GetWindowRect(data->hWnd, &(data->rc)); + return TRUE; + case ABM_REMOVE: + FIXME("ABM_REMOVE broken\n"); + /* FIXME: this is wrong; should it be DestroyWindow instead? */ + /*CloseHandle(data->hWnd);*/ + return TRUE; + case ABM_SETAUTOHIDEBAR: + SetWindowPos(data->hWnd,HWND_TOP,rec.left+1000,rec.top, + width,height,SWP_SHOWWINDOW); + return TRUE; + case ABM_SETPOS: + data->uEdge=(ABE_RIGHT | ABE_LEFT); + SetWindowPos(data->hWnd,HWND_TOP,data->rc.left,data->rc.top, + width,height,SWP_SHOWWINDOW); + return TRUE; + case ABM_WINDOWPOSCHANGED: + return TRUE; + } + return FALSE; +} + +/************************************************************************* + * SHHelpShortcuts_RunDLL [SHELL32.@] + * + */ +DWORD WINAPI SHHelpShortcuts_RunDLL (DWORD dwArg1, DWORD dwArg2, DWORD dwArg3, DWORD dwArg4) +{ FIXME("(%lx, %lx, %lx, %lx) empty stub!\n", + dwArg1, dwArg2, dwArg3, dwArg4); + + return 0; +} + +/************************************************************************* + * SHLoadInProc [SHELL32.@] + * Create an instance of specified object class from within + * the shell process and release it immediately + */ + +HRESULT WINAPI SHLoadInProc (REFCLSID rclsid) +{ + void *ptr = NULL; + + TRACE("%s\n", debugstr_guid(rclsid)); + + CoCreateInstance(rclsid, NULL, CLSCTX_INPROC_SERVER, &IID_IUnknown,&ptr); + if(ptr) + { + IUnknown * pUnk = ptr; + IUnknown_Release(pUnk); + return NOERROR; + } + return DISP_E_MEMBERNOTFOUND; +} + +/************************************************************************* + * AboutDlgProc (internal) + */ +INT_PTR CALLBACK AboutDlgProc( HWND hWnd, UINT msg, WPARAM wParam, + LPARAM lParam ) +{ + HWND hWndCtl; + + TRACE("\n"); + + switch(msg) + { + case WM_INITDIALOG: + { + ABOUT_INFO *info = (ABOUT_INFO *)lParam; + WCHAR Template[512], AppTitle[512]; + + if (info) + { + const char* const *pstr = SHELL_Authors; + SendDlgItemMessageW(hWnd, stc1, STM_SETICON,(WPARAM)info->hIcon, 0); + GetWindowTextW( hWnd, Template, sizeof(Template)/sizeof(WCHAR) ); + sprintfW( AppTitle, Template, info->szApp ); + SetWindowTextW( hWnd, AppTitle ); + SetWindowTextW( GetDlgItem(hWnd, IDC_STATIC_TEXT1), info->szApp ); + SetWindowTextW( GetDlgItem(hWnd, IDC_STATIC_TEXT2), info->szOtherStuff ); + hWndCtl = GetDlgItem(hWnd, IDC_LISTBOX); + SendMessageW( hWndCtl, WM_SETREDRAW, 0, 0 ); + SendMessageW( hWndCtl, WM_SETFONT, (WPARAM)info->hFont, 0 ); + while (*pstr) + { + WCHAR name[64]; + /* authors list is in iso-8859-1 format */ + MultiByteToWideChar( 28591, 0, *pstr, -1, name, sizeof(name)/sizeof(WCHAR) ); + SendMessageW( hWndCtl, LB_ADDSTRING, (WPARAM)-1, (LPARAM)name ); + pstr++; + } + SendMessageW( hWndCtl, WM_SETREDRAW, 1, 0 ); + } + } + return 1; + + case WM_PAINT: + { RECT rect; + PAINTSTRUCT ps; + HDC hDC = BeginPaint( hWnd, &ps ); + + if( __get_dropline( hWnd, &rect ) ) { + SelectObject( hDC, GetStockObject( BLACK_PEN ) ); + MoveToEx( hDC, rect.left, rect.top, NULL ); + LineTo( hDC, rect.right, rect.bottom ); + } + EndPaint( hWnd, &ps ); + } + break; + + case WM_COMMAND: + if (wParam == IDOK || wParam == IDCANCEL) + { + EndDialog(hWnd, TRUE); + return TRUE; + } + break; + case WM_CLOSE: + EndDialog(hWnd, TRUE); + break; + } + + return 0; +} + + +/************************************************************************* + * ShellAboutA [SHELL32.288] + */ +BOOL WINAPI ShellAboutA( HWND hWnd, LPCSTR szApp, LPCSTR szOtherStuff, HICON hIcon ) +{ + BOOL ret; + LPWSTR appW = NULL, otherW = NULL; + int len; + + if (szApp) + { + len = MultiByteToWideChar(CP_ACP, 0, szApp, -1, NULL, 0); + appW = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); + MultiByteToWideChar(CP_ACP, 0, szApp, -1, appW, len); + } + if (szOtherStuff) + { + len = MultiByteToWideChar(CP_ACP, 0, szOtherStuff, -1, NULL, 0); + otherW = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); + MultiByteToWideChar(CP_ACP, 0, szOtherStuff, -1, otherW, len); + } + + ret = ShellAboutW(hWnd, appW, otherW, hIcon); + + HeapFree(GetProcessHeap(), 0, otherW); + HeapFree(GetProcessHeap(), 0, appW); + return ret; +} + + +/************************************************************************* + * ShellAboutW [SHELL32.289] + */ +BOOL WINAPI ShellAboutW( HWND hWnd, LPCWSTR szApp, LPCWSTR szOtherStuff, + HICON hIcon ) +{ + ABOUT_INFO info; + LOGFONTW logFont; + HRSRC hRes; + LPVOID template; + BOOL bRet; + static const WCHAR wszSHELL_ABOUT_MSGBOX[] = + {'S','H','E','L','L','_','A','B','O','U','T','_','M','S','G','B','O','X',0}; + + TRACE("\n"); + + if(!(hRes = FindResourceW(shell32_hInstance, wszSHELL_ABOUT_MSGBOX, (LPWSTR)RT_DIALOG))) + return FALSE; + if(!(template = (LPVOID)LoadResource(shell32_hInstance, hRes))) + return FALSE; + info.szApp = szApp; + info.szOtherStuff = szOtherStuff; + info.hIcon = hIcon ? hIcon : LoadIconW( 0, (LPWSTR)IDI_WINLOGO ); + + SystemParametersInfoW( SPI_GETICONTITLELOGFONT, 0, &logFont, 0 ); + info.hFont = CreateFontIndirectW( &logFont ); + + bRet = DialogBoxIndirectParamW((HINSTANCE)GetWindowLongPtrW( hWnd, GWLP_HINSTANCE ), + template, hWnd, AboutDlgProc, (LPARAM)&info ); + DeleteObject(info.hFont); + return bRet; +} + +/************************************************************************* + * FreeIconList (SHELL32.@) + */ +void WINAPI FreeIconList( DWORD dw ) +{ FIXME("(%lx): stub\n",dw); +} + + +/************************************************************************* + * ShellDDEInit (SHELL32.@) + */ +void WINAPI ShellDDEInit(BOOL start) +{ + FIXME("stub: %d\n", start); +} + +/*********************************************************************** + * DllGetVersion [SHELL32.@] + * + * Retrieves version information of the 'SHELL32.DLL' + * + * PARAMS + * pdvi [O] pointer to version information structure. + * + * RETURNS + * Success: S_OK + * Failure: E_INVALIDARG + * + * NOTES + * Returns version of a shell32.dll from IE4.01 SP1. + */ + +HRESULT WINAPI SHELL32_DllGetVersion (DLLVERSIONINFO *pdvi) +{ + /* FIXME: shouldn't these values come from the version resource? */ + if (pdvi->cbSize == sizeof(DLLVERSIONINFO) || + pdvi->cbSize == sizeof(DLLVERSIONINFO2)) + { + pdvi->dwMajorVersion = WINE_FILEVERSION_MAJOR; + pdvi->dwMinorVersion = WINE_FILEVERSION_MINOR; + pdvi->dwBuildNumber = WINE_FILEVERSION_BUILD; + pdvi->dwPlatformID = WINE_FILEVERSION_PLATFORMID; + if (pdvi->cbSize == sizeof(DLLVERSIONINFO2)) + { + DLLVERSIONINFO2 *pdvi2 = (DLLVERSIONINFO2 *)pdvi; + + pdvi2->dwFlags = 0; + pdvi2->ullVersion = MAKEDLLVERULL(WINE_FILEVERSION_MAJOR, + WINE_FILEVERSION_MINOR, + WINE_FILEVERSION_BUILD, + WINE_FILEVERSION_PLATFORMID); + } + TRACE("%lu.%lu.%lu.%lu\n", + pdvi->dwMajorVersion, pdvi->dwMinorVersion, + pdvi->dwBuildNumber, pdvi->dwPlatformID); + return S_OK; + } + else + { + WARN("wrong DLLVERSIONINFO size from app\n"); + return E_INVALIDARG; + } +} +/************************************************************************* + * global variables of the shell32.dll + * all are once per process + * + */ +HINSTANCE shell32_hInstance = 0; +HIMAGELIST ShellSmallIconList = 0; +HIMAGELIST ShellBigIconList = 0; + + +/************************************************************************* + * SHELL32 DllMain + * + * NOTES + * calling oleinitialize here breaks sone apps. + */ + +BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad) +{ + TRACE("%p 0x%lx %p\n", hinstDLL, fdwReason, fImpLoad); + + switch (fdwReason) + { + case DLL_PROCESS_ATTACH: + shell32_hInstance = hinstDLL; + DisableThreadLibraryCalls(shell32_hInstance); + + /* get full path to this DLL for IExtractIconW_fnGetIconLocation() */ + GetModuleFileNameW(hinstDLL, swShell32Name, MAX_PATH); + swShell32Name[MAX_PATH - 1] = '\0'; + + InitCommonControlsEx(NULL); + + SIC_Initialize(); + InitChangeNotifications(); + break; + + case DLL_PROCESS_DETACH: + shell32_hInstance = 0; + SIC_Destroy(); + FreeChangeNotifications(); + break; + } + return TRUE; +} + +/************************************************************************* + * DllInstall [SHELL32.@] + * + * PARAMETERS + * + * BOOL bInstall - TRUE for install, FALSE for uninstall + * LPCWSTR pszCmdLine - command line (unused by shell32?) + */ + +HRESULT WINAPI SHELL32_DllInstall(BOOL bInstall, LPCWSTR cmdline) +{ + FIXME("(%s, %s): stub!\n", bInstall ? "TRUE":"FALSE", debugstr_w(cmdline)); + + return S_OK; /* indicate success */ +} + +/*********************************************************************** + * DllCanUnloadNow (SHELL32.@) + */ +HRESULT WINAPI SHELL32_DllCanUnloadNow(void) +{ + FIXME("(void): stub\n"); + + return S_FALSE; +} diff --git a/reactos/lib/shell32/shell32_main.h b/reactos/lib/shell32/shell32_main.h index 378c621e408..f2e013e613d 100644 --- a/reactos/lib/shell32/shell32_main.h +++ b/reactos/lib/shell32/shell32_main.h @@ -1,226 +1,226 @@ -/* - * internal Shell32 Library definitions - * - * Copyright 1998 Marcus Meissner - * Copyright 1998 Juergen Schmied (jsch) * - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#ifndef __WINE_SHELL_MAIN_H -#define __WINE_SHELL_MAIN_H - -#include - -#include "windef.h" -#include "winbase.h" -#include "wingdi.h" -#include "winuser.h" -#include "winnls.h" -#include "commctrl.h" -#include "objbase.h" -#include "docobj.h" -#include "undocshell.h" -#include "shlobj.h" -#include "shellapi.h" -#include "wine/windef16.h" -#include "wine/unicode.h" - -/******************************************* -* global SHELL32.DLL variables -*/ -extern HMODULE huser32; -extern HINSTANCE shell32_hInstance; -extern HIMAGELIST ShellSmallIconList; -extern HIMAGELIST ShellBigIconList; - -BOOL WINAPI Shell_GetImageList(HIMAGELIST * lpBigList, HIMAGELIST * lpSmallList); - -/* Iconcache */ -#define INVALID_INDEX -1 -BOOL SIC_Initialize(void); -void SIC_Destroy(void); -BOOL PidlToSicIndex (IShellFolder * sh, LPCITEMIDLIST pidl, BOOL bBigIcon, UINT uFlags, int * pIndex); -INT SIC_GetIconIndex (LPCWSTR sSourceFile, INT dwSourceIndex ); - -/* Classes Root */ -BOOL HCR_MapTypeToValueW(LPCWSTR szExtension, LPWSTR szFileType, DWORD len, BOOL bPrependDot); -BOOL HCR_GetExecuteCommandW( HKEY hkeyClass, LPCWSTR szClass, LPCWSTR szVerb, LPWSTR szDest, DWORD len ); -BOOL HCR_GetDefaultIconW(LPCWSTR szClass, LPWSTR szDest, DWORD len, LPDWORD dwNr); -BOOL HCR_GetDefaultIconFromGUIDW(REFIID riid, LPWSTR szDest, DWORD len, LPDWORD dwNr); -BOOL HCR_GetClassNameW(REFIID riid, LPWSTR szDest, DWORD len); - -/* ANSI versions of above functions, supposed to go away as soon as they are not used anymore */ -BOOL HCR_MapTypeToValueA(LPCSTR szExtension, LPSTR szFileType, DWORD len, BOOL bPrependDot); -BOOL HCR_GetDefaultIconA(LPCSTR szClass, LPSTR szDest, DWORD len, LPDWORD dwNr); -BOOL HCR_GetClassNameA(REFIID riid, LPSTR szDest, DWORD len); - -BOOL HCR_GetFolderAttributes(REFIID riid, LPDWORD szDest); - -INT_PTR CALLBACK AboutDlgProc(HWND,UINT,WPARAM,LPARAM); -DWORD WINAPI ParseFieldA(LPCSTR src, DWORD nField, LPSTR dst, DWORD len); -DWORD WINAPI ParseFieldW(LPCWSTR src, DWORD nField, LPWSTR dst, DWORD len); - -/**************************************************************************** - * Class constructors - */ -LPDATAOBJECT IDataObject_Constructor(HWND hwndOwner, LPCITEMIDLIST myPidl, LPCITEMIDLIST * apidl, UINT cidl); -LPENUMFORMATETC IEnumFORMATETC_Constructor(UINT, const FORMATETC []); - -LPCLASSFACTORY IClassFactory_Constructor(REFCLSID); -IContextMenu2 * ISvItemCm_Constructor(LPSHELLFOLDER pSFParent, LPCITEMIDLIST pidl, LPCITEMIDLIST *aPidls, UINT uItemCount); -IContextMenu2 * ISvBgCm_Constructor(LPSHELLFOLDER pSFParent); -LPSHELLVIEW IShellView_Constructor(LPSHELLFOLDER); - -HRESULT WINAPI IFSFolder_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv); -HRESULT WINAPI IShellLink_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv); -HRESULT WINAPI IShellLink_ConstructFromFile(IUnknown * pUnkOuter, REFIID riid, LPCITEMIDLIST pidl, LPVOID * ppv); -HRESULT WINAPI ISF_Desktop_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv); -HRESULT WINAPI ISF_MyComputer_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv); -HRESULT WINAPI IDropTargetHelper_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv); -HRESULT WINAPI IFileSystemBindData_Constructor(const WIN32_FIND_DATAW *pfd, LPBC *ppV); -HRESULT WINAPI IControlPanel_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv); -HRESULT WINAPI CPanel_GetIconLocationA(LPITEMIDLIST pidl, LPSTR szIconFile, UINT cchMax, int* piIndex); -HRESULT WINAPI CPanel_GetIconLocationW(LPITEMIDLIST pidl, LPWSTR szIconFile, UINT cchMax, int* piIndex); -HRESULT WINAPI CPanel_ExtractIconA(LPITEMIDLIST pidl, LPCSTR pszFile, UINT nIconIndex, HICON *phiconLarge, HICON *phiconSmall, UINT nIconSize); -HRESULT WINAPI CPanel_ExtractIconW(LPITEMIDLIST pidl, LPCWSTR pszFile, UINT nIconIndex, HICON *phiconLarge, HICON *phiconSmall, UINT nIconSize); - -HRESULT WINAPI IAutoComplete_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv); - -LPEXTRACTICONA IExtractIconA_Constructor(LPCITEMIDLIST); -LPEXTRACTICONW IExtractIconW_Constructor(LPCITEMIDLIST); -HRESULT CreateStreamOnFile (LPCWSTR pszFilename, DWORD grfMode, IStream ** ppstm); - -/* FIXME: rename the functions when the shell32.dll has it's own exports namespace */ -HRESULT WINAPI SHELL32_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID * ppv); -HRESULT WINAPI SHELL32_DllCanUnloadNow(void); - - -/* menu merging */ -#define MM_ADDSEPARATOR 0x00000001L -#define MM_SUBMENUSHAVEIDS 0x00000002L -HRESULT WINAPI Shell_MergeMenus (HMENU hmDst, HMENU hmSrc, UINT uInsert, UINT uIDAdjust, UINT uIDAdjustMax, ULONG uFlags); - -/* initialisation for FORMATETC */ -#define InitFormatEtc(fe, cf, med) \ - {\ - (fe).cfFormat=cf;\ - (fe).dwAspect=DVASPECT_CONTENT;\ - (fe).ptd=NULL;\ - (fe).tymed=med;\ - (fe).lindex=-1;\ - }; - -#define KeyStateToDropEffect(kst)\ - (((kst) & MK_CONTROL) ?\ - (((kst) & MK_SHIFT) ? DROPEFFECT_LINK : DROPEFFECT_COPY):\ - DROPEFFECT_MOVE) - -HGLOBAL RenderHDROP(LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl); -HGLOBAL RenderSHELLIDLIST (LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl); -HGLOBAL RenderSHELLIDLISTOFFSET (LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl); -HGLOBAL RenderFILECONTENTS (LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl); -HGLOBAL RenderFILEDESCRIPTOR (LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl); -HGLOBAL RenderFILENAMEA (LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl); -HGLOBAL RenderFILENAMEW (LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl); -HGLOBAL RenderPREFEREDDROPEFFECT (DWORD dwFlags); - -/* Change Notification */ -void InitChangeNotifications(void); -void FreeChangeNotifications(void); - -/* file operation */ -#define ASK_DELETE_FILE 1 -#define ASK_DELETE_FOLDER 2 -#define ASK_DELETE_MULTIPLE_ITEM 3 -#define ASK_CREATE_FOLDER 4 -#define ASK_OVERWRITE_FILE 5 - -BOOL SHELL_DeleteDirectoryA(LPCSTR pszDir, BOOL bShowUI); -BOOL SHELL_DeleteFileA(LPCSTR pszFile, BOOL bShowUI); -BOOL SHELL_ConfirmDialog(int nKindOfDialog, LPCSTR szDir); - -/* 16-bit functions */ -void WINAPI DragAcceptFiles16(HWND16 hWnd, BOOL16 b); -UINT16 WINAPI DragQueryFile16(HDROP16 hDrop, WORD wFile, LPSTR lpszFile, WORD wLength); -void WINAPI DragFinish16(HDROP16 h); -BOOL16 WINAPI DragQueryPoint16(HDROP16 hDrop, POINT16 *p); -HINSTANCE16 WINAPI ShellExecute16(HWND16,LPCSTR,LPCSTR,LPCSTR,LPCSTR,INT16); -HICON16 WINAPI ExtractIcon16(HINSTANCE16,LPCSTR,UINT16); -HICON16 WINAPI ExtractAssociatedIcon16(HINSTANCE16,LPSTR,LPWORD); -HICON16 WINAPI ExtractIconEx16 ( LPCSTR, INT16, HICON16 *, HICON16 *, UINT16 ); -HINSTANCE16 WINAPI FindExecutable16(LPCSTR,LPCSTR,LPSTR); -HGLOBAL16 WINAPI InternalExtractIcon16(HINSTANCE16,LPCSTR,UINT16,WORD); -BOOL16 WINAPI ShellAbout16(HWND16,LPCSTR,LPCSTR,HICON16); -BOOL16 WINAPI AboutDlgProc16(HWND16,UINT16,WPARAM16,LPARAM); - -inline static BOOL SHELL_OsIsUnicode(void) -{ - /* if high-bit of version is 0, we are emulating NT */ - return !(GetVersion() & 0x80000000); -} - -#define __SHFreeAndNil(ptr) \ - {\ - SHFree(*ptr); \ - *ptr = NULL; \ - }; -inline static void __SHCloneStrA(char ** target,const char * source) -{ - *target = SHAlloc(strlen(source)+1); - strcpy(*target, source); -} - -inline static void __SHCloneStrWtoA(char ** target, const WCHAR * source) -{ - int len = WideCharToMultiByte(CP_ACP, 0, source, -1, NULL, 0, NULL, NULL); - *target = SHAlloc(len); - WideCharToMultiByte(CP_ACP, 0, source, -1, *target, len, NULL, NULL); -} - -inline static void __SHCloneStrW(WCHAR ** target, const WCHAR * source) -{ - *target = SHAlloc( (strlenW(source)+1) * sizeof(WCHAR) ); - strcpyW(*target, source); -} - -inline static WCHAR * __SHCloneStrAtoW(WCHAR ** target, const char * source) -{ - int len = MultiByteToWideChar(CP_ACP, 0, source, -1, NULL, 0); - *target = SHAlloc(len*sizeof(WCHAR)); - MultiByteToWideChar(CP_ACP, 0, source, -1, *target, len); - return *target; -} - -/* handle conversions */ -#define HICON_16(h32) (LOWORD(h32)) -#define HICON_32(h16) ((HICON)(ULONG_PTR)(h16)) -#define HINSTANCE_32(h16) ((HINSTANCE)(ULONG_PTR)(h16)) -#define HINSTANCE_16(h32) (LOWORD(h32)) - -typedef UINT (*SHELL_ExecuteW32)(const WCHAR *lpCmd, WCHAR *env, BOOL shWait, - LPSHELLEXECUTEINFOW sei, LPSHELLEXECUTEINFOW sei_out); - -BOOL WINAPI ShellExecuteExW32(LPSHELLEXECUTEINFOW sei, SHELL_ExecuteW32 execfunc); - -UINT SHELL_FindExecutable(LPCWSTR lpPath, LPCWSTR lpFile, LPCWSTR lpOperation, - LPWSTR lpResult, int resultLen, LPWSTR key, WCHAR **env, LPITEMIDLIST pidl, LPCWSTR args); - -extern WCHAR swShell32Name[MAX_PATH]; - -/* Default shell folder value registration */ -HRESULT SHELL_RegisterShellFolders(void); - -#endif +/* + * internal Shell32 Library definitions + * + * Copyright 1998 Marcus Meissner + * Copyright 1998 Juergen Schmied (jsch) * + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef __WINE_SHELL_MAIN_H +#define __WINE_SHELL_MAIN_H + +#include + +#include "windef.h" +#include "winbase.h" +#include "wingdi.h" +#include "winuser.h" +#include "winnls.h" +#include "commctrl.h" +#include "objbase.h" +#include "docobj.h" +#include "undocshell.h" +#include "shlobj.h" +#include "shellapi.h" +#include "wine/windef16.h" +#include "wine/unicode.h" + +/******************************************* +* global SHELL32.DLL variables +*/ +extern HMODULE huser32; +extern HINSTANCE shell32_hInstance; +extern HIMAGELIST ShellSmallIconList; +extern HIMAGELIST ShellBigIconList; + +BOOL WINAPI Shell_GetImageList(HIMAGELIST * lpBigList, HIMAGELIST * lpSmallList); + +/* Iconcache */ +#define INVALID_INDEX -1 +BOOL SIC_Initialize(void); +void SIC_Destroy(void); +BOOL PidlToSicIndex (IShellFolder * sh, LPCITEMIDLIST pidl, BOOL bBigIcon, UINT uFlags, int * pIndex); +INT SIC_GetIconIndex (LPCWSTR sSourceFile, INT dwSourceIndex ); + +/* Classes Root */ +BOOL HCR_MapTypeToValueW(LPCWSTR szExtension, LPWSTR szFileType, DWORD len, BOOL bPrependDot); +BOOL HCR_GetExecuteCommandW( HKEY hkeyClass, LPCWSTR szClass, LPCWSTR szVerb, LPWSTR szDest, DWORD len ); +BOOL HCR_GetDefaultIconW(LPCWSTR szClass, LPWSTR szDest, DWORD len, LPDWORD dwNr); +BOOL HCR_GetDefaultIconFromGUIDW(REFIID riid, LPWSTR szDest, DWORD len, LPDWORD dwNr); +BOOL HCR_GetClassNameW(REFIID riid, LPWSTR szDest, DWORD len); + +/* ANSI versions of above functions, supposed to go away as soon as they are not used anymore */ +BOOL HCR_MapTypeToValueA(LPCSTR szExtension, LPSTR szFileType, DWORD len, BOOL bPrependDot); +BOOL HCR_GetDefaultIconA(LPCSTR szClass, LPSTR szDest, DWORD len, LPDWORD dwNr); +BOOL HCR_GetClassNameA(REFIID riid, LPSTR szDest, DWORD len); + +BOOL HCR_GetFolderAttributes(REFIID riid, LPDWORD szDest); + +INT_PTR CALLBACK AboutDlgProc(HWND,UINT,WPARAM,LPARAM); +DWORD WINAPI ParseFieldA(LPCSTR src, DWORD nField, LPSTR dst, DWORD len); +DWORD WINAPI ParseFieldW(LPCWSTR src, DWORD nField, LPWSTR dst, DWORD len); + +/**************************************************************************** + * Class constructors + */ +LPDATAOBJECT IDataObject_Constructor(HWND hwndOwner, LPCITEMIDLIST myPidl, LPCITEMIDLIST * apidl, UINT cidl); +LPENUMFORMATETC IEnumFORMATETC_Constructor(UINT, const FORMATETC []); + +LPCLASSFACTORY IClassFactory_Constructor(REFCLSID); +IContextMenu2 * ISvItemCm_Constructor(LPSHELLFOLDER pSFParent, LPCITEMIDLIST pidl, LPCITEMIDLIST *aPidls, UINT uItemCount); +IContextMenu2 * ISvBgCm_Constructor(LPSHELLFOLDER pSFParent); +LPSHELLVIEW IShellView_Constructor(LPSHELLFOLDER); + +HRESULT WINAPI IFSFolder_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv); +HRESULT WINAPI IShellLink_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv); +HRESULT WINAPI IShellLink_ConstructFromFile(IUnknown * pUnkOuter, REFIID riid, LPCITEMIDLIST pidl, LPVOID * ppv); +HRESULT WINAPI ISF_Desktop_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv); +HRESULT WINAPI ISF_MyComputer_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv); +HRESULT WINAPI IDropTargetHelper_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv); +HRESULT WINAPI IFileSystemBindData_Constructor(const WIN32_FIND_DATAW *pfd, LPBC *ppV); +HRESULT WINAPI IControlPanel_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv); +HRESULT WINAPI CPanel_GetIconLocationA(LPITEMIDLIST pidl, LPSTR szIconFile, UINT cchMax, int* piIndex); +HRESULT WINAPI CPanel_GetIconLocationW(LPITEMIDLIST pidl, LPWSTR szIconFile, UINT cchMax, int* piIndex); +HRESULT WINAPI CPanel_ExtractIconA(LPITEMIDLIST pidl, LPCSTR pszFile, UINT nIconIndex, HICON *phiconLarge, HICON *phiconSmall, UINT nIconSize); +HRESULT WINAPI CPanel_ExtractIconW(LPITEMIDLIST pidl, LPCWSTR pszFile, UINT nIconIndex, HICON *phiconLarge, HICON *phiconSmall, UINT nIconSize); + +HRESULT WINAPI IAutoComplete_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv); + +LPEXTRACTICONA IExtractIconA_Constructor(LPCITEMIDLIST); +LPEXTRACTICONW IExtractIconW_Constructor(LPCITEMIDLIST); +HRESULT CreateStreamOnFile (LPCWSTR pszFilename, DWORD grfMode, IStream ** ppstm); + +/* FIXME: rename the functions when the shell32.dll has it's own exports namespace */ +HRESULT WINAPI SHELL32_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID * ppv); +HRESULT WINAPI SHELL32_DllCanUnloadNow(void); + + +/* menu merging */ +#define MM_ADDSEPARATOR 0x00000001L +#define MM_SUBMENUSHAVEIDS 0x00000002L +HRESULT WINAPI Shell_MergeMenus (HMENU hmDst, HMENU hmSrc, UINT uInsert, UINT uIDAdjust, UINT uIDAdjustMax, ULONG uFlags); + +/* initialisation for FORMATETC */ +#define InitFormatEtc(fe, cf, med) \ + {\ + (fe).cfFormat=cf;\ + (fe).dwAspect=DVASPECT_CONTENT;\ + (fe).ptd=NULL;\ + (fe).tymed=med;\ + (fe).lindex=-1;\ + }; + +#define KeyStateToDropEffect(kst)\ + (((kst) & MK_CONTROL) ?\ + (((kst) & MK_SHIFT) ? DROPEFFECT_LINK : DROPEFFECT_COPY):\ + DROPEFFECT_MOVE) + +HGLOBAL RenderHDROP(LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl); +HGLOBAL RenderSHELLIDLIST (LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl); +HGLOBAL RenderSHELLIDLISTOFFSET (LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl); +HGLOBAL RenderFILECONTENTS (LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl); +HGLOBAL RenderFILEDESCRIPTOR (LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl); +HGLOBAL RenderFILENAMEA (LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl); +HGLOBAL RenderFILENAMEW (LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl); +HGLOBAL RenderPREFEREDDROPEFFECT (DWORD dwFlags); + +/* Change Notification */ +void InitChangeNotifications(void); +void FreeChangeNotifications(void); + +/* file operation */ +#define ASK_DELETE_FILE 1 +#define ASK_DELETE_FOLDER 2 +#define ASK_DELETE_MULTIPLE_ITEM 3 +#define ASK_CREATE_FOLDER 4 +#define ASK_OVERWRITE_FILE 5 + +BOOL SHELL_DeleteDirectoryA(LPCSTR pszDir, BOOL bShowUI); +BOOL SHELL_DeleteFileA(LPCSTR pszFile, BOOL bShowUI); +BOOL SHELL_ConfirmDialog(int nKindOfDialog, LPCSTR szDir); + +/* 16-bit functions */ +void WINAPI DragAcceptFiles16(HWND16 hWnd, BOOL16 b); +UINT16 WINAPI DragQueryFile16(HDROP16 hDrop, WORD wFile, LPSTR lpszFile, WORD wLength); +void WINAPI DragFinish16(HDROP16 h); +BOOL16 WINAPI DragQueryPoint16(HDROP16 hDrop, POINT16 *p); +HINSTANCE16 WINAPI ShellExecute16(HWND16,LPCSTR,LPCSTR,LPCSTR,LPCSTR,INT16); +HICON16 WINAPI ExtractIcon16(HINSTANCE16,LPCSTR,UINT16); +HICON16 WINAPI ExtractAssociatedIcon16(HINSTANCE16,LPSTR,LPWORD); +HICON16 WINAPI ExtractIconEx16 ( LPCSTR, INT16, HICON16 *, HICON16 *, UINT16 ); +HINSTANCE16 WINAPI FindExecutable16(LPCSTR,LPCSTR,LPSTR); +HGLOBAL16 WINAPI InternalExtractIcon16(HINSTANCE16,LPCSTR,UINT16,WORD); +BOOL16 WINAPI ShellAbout16(HWND16,LPCSTR,LPCSTR,HICON16); +BOOL16 WINAPI AboutDlgProc16(HWND16,UINT16,WPARAM16,LPARAM); + +inline static BOOL SHELL_OsIsUnicode(void) +{ + /* if high-bit of version is 0, we are emulating NT */ + return !(GetVersion() & 0x80000000); +} + +#define __SHFreeAndNil(ptr) \ + {\ + SHFree(*ptr); \ + *ptr = NULL; \ + }; +inline static void __SHCloneStrA(char ** target,const char * source) +{ + *target = SHAlloc(strlen(source)+1); + strcpy(*target, source); +} + +inline static void __SHCloneStrWtoA(char ** target, const WCHAR * source) +{ + int len = WideCharToMultiByte(CP_ACP, 0, source, -1, NULL, 0, NULL, NULL); + *target = SHAlloc(len); + WideCharToMultiByte(CP_ACP, 0, source, -1, *target, len, NULL, NULL); +} + +inline static void __SHCloneStrW(WCHAR ** target, const WCHAR * source) +{ + *target = SHAlloc( (strlenW(source)+1) * sizeof(WCHAR) ); + strcpyW(*target, source); +} + +inline static WCHAR * __SHCloneStrAtoW(WCHAR ** target, const char * source) +{ + int len = MultiByteToWideChar(CP_ACP, 0, source, -1, NULL, 0); + *target = SHAlloc(len*sizeof(WCHAR)); + MultiByteToWideChar(CP_ACP, 0, source, -1, *target, len); + return *target; +} + +/* handle conversions */ +#define HICON_16(h32) (LOWORD(h32)) +#define HICON_32(h16) ((HICON)(ULONG_PTR)(h16)) +#define HINSTANCE_32(h16) ((HINSTANCE)(ULONG_PTR)(h16)) +#define HINSTANCE_16(h32) (LOWORD(h32)) + +typedef UINT (*SHELL_ExecuteW32)(const WCHAR *lpCmd, WCHAR *env, BOOL shWait, + LPSHELLEXECUTEINFOW sei, LPSHELLEXECUTEINFOW sei_out); + +BOOL WINAPI ShellExecuteExW32(LPSHELLEXECUTEINFOW sei, SHELL_ExecuteW32 execfunc); + +UINT SHELL_FindExecutable(LPCWSTR lpPath, LPCWSTR lpFile, LPCWSTR lpOperation, + LPWSTR lpResult, int resultLen, LPWSTR key, WCHAR **env, LPITEMIDLIST pidl, LPCWSTR args); + +extern WCHAR swShell32Name[MAX_PATH]; + +/* Default shell folder value registration */ +HRESULT SHELL_RegisterShellFolders(void); + +#endif diff --git a/reactos/lib/shell32/shell32_xx.rc b/reactos/lib/shell32/shell32_xx.rc index b99ea36cf70..9a40d049d51 100644 --- a/reactos/lib/shell32/shell32_xx.rc +++ b/reactos/lib/shell32/shell32_xx.rc @@ -1,20 +1,20 @@ -/* Language neutral resources. - * Icons and bitmaps should go in here. - * - * Copyright 1998 Juergen Schmied - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ -LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL +/* Language neutral resources. + * Icons and bitmaps should go in here. + * + * Copyright 1998 Juergen Schmied + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL diff --git a/reactos/lib/shell32/shellfolder.h b/reactos/lib/shell32/shellfolder.h index ff29841d9d8..e222e15d841 100644 --- a/reactos/lib/shell32/shellfolder.h +++ b/reactos/lib/shell32/shellfolder.h @@ -1,68 +1,68 @@ -/* - * defines helperfunctions to manipulate the contents of a IShellFolder - * - * Copyright 2000 Juergen Schmied - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#ifndef __WINE_SHELLFOLDER_HELP_H -#define __WINE_SHELLFOLDER_HELP_H - -#include - -#include "windef.h" -#include "winbase.h" -#include "winuser.h" - -#include "shlobj.h" - -/***************************************************************************** - * Predeclare the interfaces - */ -DEFINE_GUID(IID_ISFHelper, 0x1fe68efbL, 0x1874, 0x9812, 0x56, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00); - -/***************************************************************************** - * ISFHelper interface - */ - -#define INTERFACE ISFHelper -DECLARE_INTERFACE_(ISFHelper,IUnknown) -{ - /*** IUnknown methods ***/ - STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; - STDMETHOD_(ULONG,AddRef)(THIS) PURE; - STDMETHOD_(ULONG,Release)(THIS) PURE; - /*** ISFHelper methods ***/ - STDMETHOD(GetUniqueName)(THIS_ LPSTR lpName, UINT uLen) PURE; - STDMETHOD(AddFolder)(THIS_ HWND hwnd, LPCSTR lpName, LPITEMIDLIST * ppidlOut) PURE; - STDMETHOD(DeleteItems)(THIS_ UINT cidl, LPCITEMIDLIST * apidl) PURE; - STDMETHOD(CopyItems)(THIS_ IShellFolder * pSFFrom, UINT cidl, LPCITEMIDLIST * apidl) PURE; -}; -#undef INTERFACE - -#ifdef COBJMACROS -/*** IUnknown methods ***/ -#define ISFHelper_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) -#define ISFHelper_AddRef(p) (p)->lpVtbl->AddRef(p) -#define ISFHelper_Release(p) (p)->lpVtbl->Release(p) -/*** ISFHelper methods ***/ -#define ISFHelper_GetUniqueName(p,a,b) (p)->lpVtbl->GetUniqueName(p,a,b) -#define ISFHelper_AddFolder(p,a,b,c) (p)->lpVtbl->AddFolder(p,a,b,c) -#define ISFHelper_DeleteItems(p,a,b) (p)->lpVtbl->DeleteItems(p,a,b) -#define ISFHelper_CopyItems(p,a,b,c) (p)->lpVtbl->CopyItems(p,a,b,c) -#endif - -#endif /* __WINE_SHELLFOLDER_HELP_H */ +/* + * defines helperfunctions to manipulate the contents of a IShellFolder + * + * Copyright 2000 Juergen Schmied + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef __WINE_SHELLFOLDER_HELP_H +#define __WINE_SHELLFOLDER_HELP_H + +#include + +#include "windef.h" +#include "winbase.h" +#include "winuser.h" + +#include "shlobj.h" + +/***************************************************************************** + * Predeclare the interfaces + */ +DEFINE_GUID(IID_ISFHelper, 0x1fe68efbL, 0x1874, 0x9812, 0x56, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00); + +/***************************************************************************** + * ISFHelper interface + */ + +#define INTERFACE ISFHelper +DECLARE_INTERFACE_(ISFHelper,IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** ISFHelper methods ***/ + STDMETHOD(GetUniqueName)(THIS_ LPSTR lpName, UINT uLen) PURE; + STDMETHOD(AddFolder)(THIS_ HWND hwnd, LPCSTR lpName, LPITEMIDLIST * ppidlOut) PURE; + STDMETHOD(DeleteItems)(THIS_ UINT cidl, LPCITEMIDLIST * apidl) PURE; + STDMETHOD(CopyItems)(THIS_ IShellFolder * pSFFrom, UINT cidl, LPCITEMIDLIST * apidl) PURE; +}; +#undef INTERFACE + +#ifdef COBJMACROS +/*** IUnknown methods ***/ +#define ISFHelper_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define ISFHelper_AddRef(p) (p)->lpVtbl->AddRef(p) +#define ISFHelper_Release(p) (p)->lpVtbl->Release(p) +/*** ISFHelper methods ***/ +#define ISFHelper_GetUniqueName(p,a,b) (p)->lpVtbl->GetUniqueName(p,a,b) +#define ISFHelper_AddFolder(p,a,b,c) (p)->lpVtbl->AddFolder(p,a,b,c) +#define ISFHelper_DeleteItems(p,a,b) (p)->lpVtbl->DeleteItems(p,a,b) +#define ISFHelper_CopyItems(p,a,b,c) (p)->lpVtbl->CopyItems(p,a,b,c) +#endif + +#endif /* __WINE_SHELLFOLDER_HELP_H */ diff --git a/reactos/lib/shell32/shelllink.c b/reactos/lib/shell32/shelllink.c index 759dd81a926..e0272646ecb 100644 --- a/reactos/lib/shell32/shelllink.c +++ b/reactos/lib/shell32/shelllink.c @@ -1,1802 +1,1802 @@ -/* - * - * Copyright 1997 Marcus Meissner - * Copyright 1998 Juergen Schmied - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * NOTES - * Nearly complete informations about the binary formats - * of .lnk files available at http://www.wotsit.org - * - */ - -#include "config.h" -#include "wine/port.h" - -#include -#include -#include -#include -#ifdef HAVE_UNISTD_H -# include -#endif -#include -#include -#ifdef HAVE_SYS_WAIT_H -# include -#endif - -#define COBJMACROS - -#include "wine/debug.h" -#include "winerror.h" -#include "windef.h" -#include "winbase.h" -#include "winnls.h" -#include "winreg.h" - -#include "winuser.h" -#include "wingdi.h" -#include "shlobj.h" -#include "undocshell.h" - -#include "pidl.h" -#include "shell32_main.h" -#include "shlguid.h" -#include "shlwapi.h" - -WINE_DEFAULT_DEBUG_CHANNEL(shell); - -/* link file formats */ - -/* flag1: lnk elements: simple link has 0x0B */ -#define SCF_PIDL 1 -#define SCF_NORMAL 2 -#define SCF_DESCRIPTION 4 -#define SCF_RELATIVE 8 -#define SCF_WORKDIR 0x10 -#define SCF_ARGS 0x20 -#define SCF_CUSTOMICON 0x40 -#define SCF_UNICODE 0x80 - -#include "pshpack1.h" - -typedef struct _LINK_HEADER -{ - DWORD dwSize; /* 0x00 size of the header - 0x4c */ - GUID MagicGuid; /* 0x04 is CLSID_ShellLink */ - DWORD dwFlags; /* 0x14 describes elements following */ - DWORD dwFileAttr; /* 0x18 attributes of the target file */ - FILETIME Time1; /* 0x1c */ - FILETIME Time2; /* 0x24 */ - FILETIME Time3; /* 0x2c */ - DWORD dwFileLength; /* 0x34 File length */ - DWORD nIcon; /* 0x38 icon number */ - DWORD fStartup; /* 0x3c startup type */ - DWORD wHotKey; /* 0x40 hotkey */ - DWORD Unknown5; /* 0x44 */ - DWORD Unknown6; /* 0x48 */ -} LINK_HEADER, * PLINK_HEADER; - -#define SHLINK_LOCAL 0 -#define SHLINK_REMOTE 1 - -typedef struct _LOCATION_INFO -{ - DWORD dwTotalSize; - DWORD dwHeaderSize; - DWORD dwFlags; - DWORD dwVolTableOfs; - DWORD dwLocalPathOfs; - DWORD dwNetworkVolTableOfs; - DWORD dwFinalPathOfs; -} LOCATION_INFO; - -typedef struct _LOCAL_VOLUME_INFO -{ - DWORD dwSize; - DWORD dwType; - DWORD dwVolSerial; - DWORD dwVolLabelOfs; -} LOCAL_VOLUME_INFO; - -#include "poppack.h" - -static IShellLinkAVtbl slvt; -static IShellLinkWVtbl slvtw; -static IPersistFileVtbl pfvt; -static IPersistStreamVtbl psvt; - -/* IShellLink Implementation */ - -typedef struct -{ - IShellLinkAVtbl *lpVtbl; - DWORD ref; - - IShellLinkWVtbl *lpvtblw; - IPersistFileVtbl *lpvtblPersistFile; - IPersistStreamVtbl *lpvtblPersistStream; - - /* data structures according to the informations in the link */ - LPITEMIDLIST pPidl; - WORD wHotKey; - SYSTEMTIME time1; - SYSTEMTIME time2; - SYSTEMTIME time3; - - DWORD iShowCmd; - LPWSTR sIcoPath; - INT iIcoNdx; - LPWSTR sPath; - LPWSTR sArgs; - LPWSTR sWorkDir; - LPWSTR sDescription; - LPWSTR sPathRel; - - BOOL bDirty; -} IShellLinkImpl; - -#define _IShellLinkW_Offset ((int)(&(((IShellLinkImpl*)0)->lpvtblw))) -#define _ICOM_THIS_From_IShellLinkW(class, name) class* This = (class*)(((char*)name)-_IShellLinkW_Offset) - -#define _IPersistFile_Offset ((int)(&(((IShellLinkImpl*)0)->lpvtblPersistFile))) -#define _ICOM_THIS_From_IPersistFile(class, name) class* This = (class*)(((char*)name)-_IPersistFile_Offset) - -#define _IPersistStream_Offset ((int)(&(((IShellLinkImpl*)0)->lpvtblPersistStream))) -#define _ICOM_THIS_From_IPersistStream(class, name) class* This = (class*)(((char*)name)-_IPersistStream_Offset) - -static HRESULT ShellLink_UpdatePath(LPWSTR sPathRel, LPCWSTR path, LPCWSTR sWorkDir, LPWSTR* psPath); - -/* strdup on the process heap */ -inline static LPWSTR HEAP_strdupAtoW( HANDLE heap, DWORD flags, LPCSTR str) -{ - INT len = MultiByteToWideChar( CP_ACP, 0, str, -1, NULL, 0 ); - LPWSTR p = HeapAlloc( heap, flags, len*sizeof (WCHAR) ); - if( !p ) - return p; - MultiByteToWideChar( CP_ACP, 0, str, -1, p, len ); - return p; -} - - -/************************************************************************** - * IPersistFile_QueryInterface - */ -static HRESULT WINAPI IPersistFile_fnQueryInterface( - IPersistFile* iface, - REFIID riid, - LPVOID *ppvObj) -{ - _ICOM_THIS_From_IPersistFile(IShellLinkImpl, iface); - - TRACE("(%p)\n",This); - - return IShellLinkA_QueryInterface((IShellLinkA*)This, riid, ppvObj); -} - -/****************************************************************************** - * IPersistFile_AddRef - */ -static ULONG WINAPI IPersistFile_fnAddRef(IPersistFile* iface) -{ - _ICOM_THIS_From_IPersistFile(IShellLinkImpl, iface); - - TRACE("(%p)->(count=%lu)\n",This,This->ref); - - return IShellLinkA_AddRef((IShellLinkA*)This); -} -/****************************************************************************** - * IPersistFile_Release - */ -static ULONG WINAPI IPersistFile_fnRelease(IPersistFile* iface) -{ - _ICOM_THIS_From_IPersistFile(IShellLinkImpl, iface); - - TRACE("(%p)->(count=%lu)\n",This,This->ref); - - return IShellLinkA_Release((IShellLinkA*)This); -} - -static HRESULT WINAPI IPersistFile_fnGetClassID(IPersistFile* iface, CLSID *pClassID) -{ - _ICOM_THIS_From_IPersistFile(IShellLinkImpl, iface); - FIXME("(%p)\n",This); - return NOERROR; -} -static HRESULT WINAPI IPersistFile_fnIsDirty(IPersistFile* iface) -{ - _ICOM_THIS_From_IPersistFile(IShellLinkImpl, iface); - - TRACE("(%p)\n",This); - - if (This->bDirty) - return S_OK; - - return S_FALSE; -} -static HRESULT WINAPI IPersistFile_fnLoad(IPersistFile* iface, LPCOLESTR pszFileName, DWORD dwMode) -{ - _ICOM_THIS_From_IPersistFile(IShellLinkImpl, iface); - IPersistStream *StreamThis = (IPersistStream *)&This->lpvtblPersistStream; - HRESULT r; - IStream *stm; - - TRACE("(%p, %s)\n",This, debugstr_w(pszFileName)); - - r = CreateStreamOnFile(pszFileName, dwMode, &stm); - if( SUCCEEDED( r ) ) - { - r = IPersistStream_Load(StreamThis, stm); - ShellLink_UpdatePath(This->sPathRel, pszFileName, This->sWorkDir, &This->sPath); - IStream_Release( stm ); - This->bDirty = FALSE; - } - - return r; -} - -static BOOL StartLinkProcessor( LPCOLESTR szLink ) -{ - static const WCHAR szFormat[] = {'w','i','n','e','m','e','n','u','b','u','i','l','d','e','r','.','e','x','e', - ' ','-','r',' ','"','%','s','"',0 }; - LONG len; - LPWSTR buffer; - STARTUPINFOW si; - PROCESS_INFORMATION pi; - - len = sizeof(szFormat) + lstrlenW( szLink ) * sizeof(WCHAR); - buffer = HeapAlloc( GetProcessHeap(), 0, len ); - if( !buffer ) - return FALSE; - - wsprintfW( buffer, szFormat, szLink ); - - TRACE("starting %s\n",debugstr_w(buffer)); - - memset(&si, 0, sizeof(si)); - si.cb = sizeof(si); - if (!CreateProcessW( NULL, buffer, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi)) return FALSE; - - /* wait for a while to throttle the creation of linker processes */ - if( WAIT_OBJECT_0 != WaitForSingleObject( pi.hProcess, 10000 ) ) - WARN("Timed out waiting for shell linker\n"); - - CloseHandle( pi.hProcess ); - CloseHandle( pi.hThread ); - - return TRUE; -} - -static HRESULT WINAPI IPersistFile_fnSave(IPersistFile* iface, LPCOLESTR pszFileName, BOOL fRemember) -{ - _ICOM_THIS_From_IPersistFile(IShellLinkImpl, iface); - IPersistStream *StreamThis = (IPersistStream *)&This->lpvtblPersistStream; - HRESULT r; - IStream *stm; - - TRACE("(%p)->(%s)\n",This,debugstr_w(pszFileName)); - - if (!pszFileName || !This->sPath) - return E_FAIL; - - r = CreateStreamOnFile(pszFileName, STGM_READWRITE | STGM_CREATE, &stm); - if( SUCCEEDED( r ) ) - { - r = IPersistStream_Save(StreamThis, stm, FALSE); - IStream_Release( stm ); - - if( SUCCEEDED( r ) ) - { - StartLinkProcessor( pszFileName ); - - This->bDirty = FALSE; - } - else - { - DeleteFileW( pszFileName ); - WARN("Failed to create shortcut %s\n", debugstr_w(pszFileName) ); - } - } - - return r; -} - -static HRESULT WINAPI IPersistFile_fnSaveCompleted(IPersistFile* iface, LPCOLESTR pszFileName) -{ - _ICOM_THIS_From_IPersistFile(IShellLinkImpl, iface); - FIXME("(%p)->(%s)\n",This,debugstr_w(pszFileName)); - return NOERROR; -} -static HRESULT WINAPI IPersistFile_fnGetCurFile(IPersistFile* iface, LPOLESTR *ppszFileName) -{ - _ICOM_THIS_From_IPersistFile(IShellLinkImpl, iface); - FIXME("(%p)\n",This); - return NOERROR; -} - -static IPersistFileVtbl pfvt = -{ - IPersistFile_fnQueryInterface, - IPersistFile_fnAddRef, - IPersistFile_fnRelease, - IPersistFile_fnGetClassID, - IPersistFile_fnIsDirty, - IPersistFile_fnLoad, - IPersistFile_fnSave, - IPersistFile_fnSaveCompleted, - IPersistFile_fnGetCurFile -}; - -/************************************************************************ - * IPersistStream_QueryInterface - */ -static HRESULT WINAPI IPersistStream_fnQueryInterface( - IPersistStream* iface, - REFIID riid, - VOID** ppvoid) -{ - _ICOM_THIS_From_IPersistStream(IShellLinkImpl, iface); - - TRACE("(%p)\n",This); - - return IShellLinkA_QueryInterface((IShellLinkA*)This, riid, ppvoid); -} - -/************************************************************************ - * IPersistStream_Release - */ -static ULONG WINAPI IPersistStream_fnRelease( - IPersistStream* iface) -{ - _ICOM_THIS_From_IPersistStream(IShellLinkImpl, iface); - - TRACE("(%p)\n",This); - - return IShellLinkA_Release((IShellLinkA*)This); -} - -/************************************************************************ - * IPersistStream_AddRef - */ -static ULONG WINAPI IPersistStream_fnAddRef( - IPersistStream* iface) -{ - _ICOM_THIS_From_IPersistStream(IShellLinkImpl, iface); - - TRACE("(%p)\n",This); - - return IShellLinkA_AddRef((IShellLinkA*)This); -} - -/************************************************************************ - * IPersistStream_GetClassID - * - */ -static HRESULT WINAPI IPersistStream_fnGetClassID( - IPersistStream* iface, - CLSID* pClassID) -{ - _ICOM_THIS_From_IPersistStream(IShellLinkImpl, iface); - - TRACE("(%p)\n", This); - - if (pClassID==0) - return E_POINTER; - -/* memcpy(pClassID, &CLSID_???, sizeof(CLSID_???)); */ - - return S_OK; -} - -/************************************************************************ - * IPersistStream_IsDirty (IPersistStream) - */ -static HRESULT WINAPI IPersistStream_fnIsDirty( - IPersistStream* iface) -{ - _ICOM_THIS_From_IPersistStream(IShellLinkImpl, iface); - - TRACE("(%p)\n", This); - - return S_OK; -} - - -static HRESULT Stream_LoadString( IStream* stm, BOOL unicode, LPWSTR *pstr ) -{ - DWORD count; - USHORT len; - LPVOID temp; - LPWSTR str; - HRESULT r; - - TRACE("%p\n", stm); - - count = 0; - r = IStream_Read(stm, &len, sizeof(len), &count); - if ( FAILED (r) || ( count != sizeof(len) ) ) - return E_FAIL; - - if( unicode ) - len *= sizeof (WCHAR); - - TRACE("reading %d\n", len); - temp = HeapAlloc(GetProcessHeap(), 0, len+sizeof(WCHAR)); - if( !temp ) - return E_OUTOFMEMORY; - count = 0; - r = IStream_Read(stm, temp, len, &count); - if( FAILED (r) || ( count != len ) ) - { - HeapFree( GetProcessHeap(), 0, temp ); - return E_FAIL; - } - - TRACE("read %s\n", debugstr_an(temp,len)); - - /* convert to unicode if necessary */ - if( !unicode ) - { - count = MultiByteToWideChar( CP_ACP, 0, (LPSTR) temp, len, NULL, 0 ); - str = HeapAlloc( GetProcessHeap(), 0, (count+1)*sizeof (WCHAR) ); - if( str ) - MultiByteToWideChar( CP_ACP, 0, (LPSTR) temp, len, str, count ); - HeapFree( GetProcessHeap(), 0, temp ); - } - else - { - count /= 2; - str = (LPWSTR) temp; - } - str[count] = 0; - - *pstr = str; - - return S_OK; -} - -static HRESULT Stream_LoadLocation( IStream* stm ) -{ - DWORD size; - ULONG count; - HRESULT r; - LOCATION_INFO *loc; - - TRACE("%p\n",stm); - - r = IStream_Read( stm, &size, sizeof(size), &count ); - if( FAILED( r ) ) - return r; - if( count != sizeof(loc->dwTotalSize) ) - return E_FAIL; - - loc = HeapAlloc( GetProcessHeap(), 0, size ); - if( ! loc ) - return E_OUTOFMEMORY; - - r = IStream_Read( stm, &loc->dwHeaderSize, size-sizeof(size), &count ); - if( FAILED( r ) ) - goto end; - if( count != (size - sizeof(size)) ) - { - r = E_FAIL; - goto end; - } - loc->dwTotalSize = size; - - TRACE("Read %ld bytes\n",count); - - /* FIXME: do something useful with it */ - HeapFree( GetProcessHeap(), 0, loc ); - - return S_OK; -end: - HeapFree( GetProcessHeap(), 0, loc ); - return r; -} - -/************************************************************************ - * IPersistStream_Load (IPersistStream) - */ -static HRESULT WINAPI IPersistStream_fnLoad( - IPersistStream* iface, - IStream* stm) -{ - LINK_HEADER hdr; - ULONG dwBytesRead; - BOOL unicode; - WCHAR sTemp[MAX_PATH]; - HRESULT r; - - _ICOM_THIS_From_IPersistStream(IShellLinkImpl, iface); - - TRACE("(%p)(%p)\n", This, stm); - - if( !stm ) - return STG_E_INVALIDPOINTER; - - dwBytesRead = 0; - r = IStream_Read(stm, &hdr, sizeof(hdr), &dwBytesRead); - if( FAILED( r ) ) - return r; - - if( dwBytesRead != sizeof(hdr)) - return E_FAIL; - if( hdr.dwSize != sizeof(hdr)) - return E_FAIL; - if( !IsEqualIID(&hdr.MagicGuid, &CLSID_ShellLink) ) - return E_FAIL; - - /* if( hdr.dwFlags & SCF_PIDL ) */ /* FIXME: seems to always have a PIDL */ - { - r = ILLoadFromStream( stm, &This->pPidl ); - if( FAILED( r ) ) - return r; - } - This->wHotKey = (WORD)hdr.wHotKey; - This->iIcoNdx = hdr.nIcon; - FileTimeToSystemTime (&hdr.Time1, &This->time1); - FileTimeToSystemTime (&hdr.Time2, &This->time2); - FileTimeToSystemTime (&hdr.Time3, &This->time3); -#if 1 - GetDateFormatW(LOCALE_USER_DEFAULT,DATE_SHORTDATE,&This->time1, NULL, sTemp, 256); - TRACE("-- time1: %s\n", debugstr_w(sTemp) ); - GetDateFormatW(LOCALE_USER_DEFAULT,DATE_SHORTDATE,&This->time2, NULL, sTemp, 256); - TRACE("-- time1: %s\n", debugstr_w(sTemp) ); - GetDateFormatW(LOCALE_USER_DEFAULT,DATE_SHORTDATE,&This->time3, NULL, sTemp, 256); - TRACE("-- time1: %s\n", debugstr_w(sTemp) ); - pdump (This->pPidl); -#endif - if( hdr.dwFlags & SCF_NORMAL ) - r = Stream_LoadLocation( stm ); - if( FAILED( r ) ) - goto end; - unicode = hdr.dwFlags & SCF_UNICODE; - if( hdr.dwFlags & SCF_DESCRIPTION ) - { - r = Stream_LoadString( stm, unicode, &This->sDescription ); - TRACE("Description -> %s\n",debugstr_w(This->sDescription)); - } - if( FAILED( r ) ) - goto end; - - if( hdr.dwFlags & SCF_RELATIVE ) - { - r = Stream_LoadString( stm, unicode, &This->sPathRel ); - TRACE("Relative Path-> %s\n",debugstr_w(This->sPathRel)); - } - if( FAILED( r ) ) - goto end; - - if( hdr.dwFlags & SCF_WORKDIR ) - { - r = Stream_LoadString( stm, unicode, &This->sWorkDir ); - TRACE("Working Dir -> %s\n",debugstr_w(This->sWorkDir)); - } - if( FAILED( r ) ) - goto end; - - if( hdr.dwFlags & SCF_ARGS ) - { - r = Stream_LoadString( stm, unicode, &This->sArgs ); - TRACE("Working Dir -> %s\n",debugstr_w(This->sArgs)); - } - if( FAILED( r ) ) - goto end; - - if( hdr.dwFlags & SCF_CUSTOMICON ) - { - r = Stream_LoadString( stm, unicode, &This->sIcoPath ); - TRACE("Icon file -> %s\n",debugstr_w(This->sIcoPath)); - } - if( FAILED( r ) ) - goto end; - - TRACE("OK\n"); - - pdump (This->pPidl); - - return S_OK; -end: - return r; -} - -/************************************************************************ - * Stream_WriteString - * - * Helper function for IPersistStream_Save. Writes a unicode string - * with terminating nul byte to a stream, preceded by the its length. - */ -static HRESULT Stream_WriteString( IStream* stm, LPCWSTR str ) -{ - USHORT len = lstrlenW( str ) + 1; - DWORD count; - HRESULT r; - - r = IStream_Write( stm, &len, sizeof(len), &count ); - if( FAILED( r ) ) - return r; - - len *= sizeof(WCHAR); - - r = IStream_Write( stm, str, len, &count ); - if( FAILED( r ) ) - return r; - - return S_OK; -} - -static HRESULT Stream_WriteLocationInfo( IStream* stm, LPCWSTR filename ) -{ - LOCATION_INFO loc; - ULONG count; - - FIXME("writing empty location info\n"); - - memset( &loc, 0, sizeof(loc) ); - loc.dwTotalSize = sizeof(loc) - sizeof(loc.dwTotalSize); - - /* FIXME: fill this in */ - - return IStream_Write( stm, &loc, loc.dwTotalSize, &count ); -} - -/************************************************************************ - * IPersistStream_Save (IPersistStream) - * - * FIXME: makes assumptions about byte order - */ -static HRESULT WINAPI IPersistStream_fnSave( - IPersistStream* iface, - IStream* stm, - BOOL fClearDirty) -{ - static const WCHAR wOpen[] = {'o','p','e','n',0}; - - LINK_HEADER header; - WCHAR exePath[MAX_PATH]; - ULONG count; - HRESULT r; - - _ICOM_THIS_From_IPersistStream(IShellLinkImpl, iface); - - TRACE("(%p) %p %x\n", This, stm, fClearDirty); - - *exePath = '\0'; - - if (This->sPath) - { - SHELL_FindExecutable(NULL, This->sPath, wOpen, exePath, MAX_PATH, NULL, NULL, NULL, NULL); - /* - * windows can create lnk files to executables that do not exist yet - * so if the executable does not exist the just trust the path they - * gave us - */ - if( !*exePath ) strcpyW(exePath,This->sPath); - } - - /* if there's no PIDL, generate one */ - if( ! This->pPidl ) This->pPidl = ILCreateFromPathW(exePath); - - memset(&header, 0, sizeof(header)); - header.dwSize = sizeof(header); - memcpy(&header.MagicGuid, &CLSID_ShellLink, sizeof(header.MagicGuid) ); - - header.wHotKey = This->wHotKey; - header.nIcon = This->iIcoNdx; - header.dwFlags = SCF_UNICODE; /* strings are in unicode */ - header.dwFlags |= SCF_NORMAL; /* how do we determine this ? */ - if( This->pPidl ) - header.dwFlags |= SCF_PIDL; - if( This->sDescription ) - header.dwFlags |= SCF_DESCRIPTION; - if( This->sWorkDir ) - header.dwFlags |= SCF_WORKDIR; - if( This->sArgs ) - header.dwFlags |= SCF_ARGS; - if( This->sIcoPath ) - header.dwFlags |= SCF_CUSTOMICON; - - SystemTimeToFileTime ( &This->time1, &header.Time1 ); - SystemTimeToFileTime ( &This->time2, &header.Time2 ); - SystemTimeToFileTime ( &This->time3, &header.Time3 ); - - /* write the Shortcut header */ - r = IStream_Write( stm, &header, sizeof(header), &count ); - if( FAILED( r ) ) - { - ERR("Write failed at %d\n",__LINE__); - return r; - } - - TRACE("Writing pidl \n"); - - /* write the PIDL to the shortcut */ - if( This->pPidl ) - { - r = ILSaveToStream( stm, This->pPidl ); - if( FAILED( r ) ) - { - ERR("Failed to write PIDL at %d\n",__LINE__); - return r; - } - } - - Stream_WriteLocationInfo( stm, exePath ); - - TRACE("Description = %s\n", debugstr_w(This->sDescription)); - if( This->sDescription ) - r = Stream_WriteString( stm, This->sDescription ); - - if( This->sPathRel ) - r = Stream_WriteString( stm, This->sPathRel ); - - if( This->sWorkDir ) - r = Stream_WriteString( stm, This->sWorkDir ); - - if( This->sArgs ) - r = Stream_WriteString( stm, This->sArgs ); - - if( This->sIcoPath ) - r = Stream_WriteString( stm, This->sIcoPath ); - - return S_OK; -} - -/************************************************************************ - * IPersistStream_GetSizeMax (IPersistStream) - */ -static HRESULT WINAPI IPersistStream_fnGetSizeMax( - IPersistStream* iface, - ULARGE_INTEGER* pcbSize) -{ - _ICOM_THIS_From_IPersistStream(IShellLinkImpl, iface); - - TRACE("(%p)\n", This); - - return E_NOTIMPL; -} - -static IPersistStreamVtbl psvt = -{ - IPersistStream_fnQueryInterface, - IPersistStream_fnAddRef, - IPersistStream_fnRelease, - IPersistStream_fnGetClassID, - IPersistStream_fnIsDirty, - IPersistStream_fnLoad, - IPersistStream_fnSave, - IPersistStream_fnGetSizeMax -}; - -/************************************************************************** - * IShellLink_Constructor - */ -HRESULT WINAPI IShellLink_Constructor ( - IUnknown * pUnkOuter, - REFIID riid, - LPVOID * ppv) -{ - IShellLinkImpl * sl; - - TRACE("unkOut=%p riid=%s\n",pUnkOuter, debugstr_guid(riid)); - - *ppv = NULL; - - if(pUnkOuter) return CLASS_E_NOAGGREGATION; - sl = (IShellLinkImpl *) LocalAlloc(GMEM_ZEROINIT,sizeof(IShellLinkImpl)); - if (!sl) return E_OUTOFMEMORY; - - sl->ref = 1; - sl->lpVtbl = &slvt; - sl->lpvtblw = &slvtw; - sl->lpvtblPersistFile = &pfvt; - sl->lpvtblPersistStream = &psvt; - sl->iShowCmd = SW_SHOWNORMAL; - sl->bDirty = FALSE; - - TRACE("(%p)->()\n",sl); - - if (IsEqualIID(riid, &IID_IUnknown) || - IsEqualIID(riid, &IID_IShellLinkA)) - *ppv = sl; - else if (IsEqualIID(riid, &IID_IShellLinkW)) - *ppv = &(sl->lpvtblw); - else { - LocalFree((HLOCAL)sl); - ERR("E_NOINTERFACE\n"); - return E_NOINTERFACE; - } - - return S_OK; -} - - -static BOOL SHELL_ExistsFileW(LPCWSTR path) -{ - HANDLE hfile = CreateFileW(path, GENERIC_READ, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL); - - if (hfile != INVALID_HANDLE_VALUE) { - CloseHandle(hfile); - return TRUE; - } else - return FALSE; -} - -/************************************************************************** - * ShellLink_UpdatePath - * update absolute path in sPath using relative path in sPathRel - */ -static HRESULT ShellLink_UpdatePath(LPWSTR sPathRel, LPCWSTR path, LPCWSTR sWorkDir, LPWSTR* psPath) -{ - if (!path || !psPath) - return E_INVALIDARG; - - if (!*psPath && sPathRel) { - WCHAR buffer[2*MAX_PATH], abs_path[2*MAX_PATH]; - LPWSTR final = NULL; - - /* first try if [directory of link file] + [relative path] finds an existing file */ - - GetFullPathNameW( path, MAX_PATH*2, buffer, &final ); - if( !final ) - final = buffer; - lstrcpyW(final, sPathRel); - - *abs_path = '\0'; - - if (SHELL_ExistsFileW(buffer)) { - if (!GetFullPathNameW(buffer, MAX_PATH, abs_path, &final)) - lstrcpyW(abs_path, buffer); - } else { - /* try if [working directory] + [relative path] finds an existing file */ - if (sWorkDir) { - lstrcpyW(buffer, sWorkDir); - lstrcpyW(PathAddBackslashW(buffer), sPathRel); - - if (SHELL_ExistsFileW(buffer)) - if (!GetFullPathNameW(buffer, MAX_PATH, abs_path, &final)) - lstrcpyW(abs_path, buffer); - } - } - - /* FIXME: This is even not enough - not all shell links can be resolved using this algorithm. */ - if (!*abs_path) - lstrcpyW(abs_path, sPathRel); - - *psPath = HeapAlloc(GetProcessHeap(), 0, (lstrlenW(abs_path)+1)*sizeof(WCHAR)); - if (!*psPath) - return E_OUTOFMEMORY; - - lstrcpyW(*psPath, abs_path); - } - - return S_OK; -} - -/************************************************************************** - * IShellLink_ConstructFromFile - */ -HRESULT WINAPI IShellLink_ConstructFromFile ( - IUnknown* pUnkOuter, - REFIID riid, - LPCITEMIDLIST pidl, - LPVOID* ppv -) -{ - IShellLinkW* psl; - - HRESULT hr = IShellLink_Constructor(NULL, riid, (LPVOID*)&psl); - - if (SUCCEEDED(hr)) { - IPersistFile* ppf; - - *ppv = NULL; - - hr = IShellLinkW_QueryInterface(psl, &IID_IPersistFile, (LPVOID*)&ppf); - - if (SUCCEEDED(hr)) { - WCHAR path[MAX_PATH]; - - if (SHGetPathFromIDListW(pidl, path)) - hr = IPersistFile_Load(ppf, path, 0); - else - hr = E_FAIL; - - if (SUCCEEDED(hr)) - *ppv = (IUnknown*) psl; - - IPersistFile_Release(ppf); - } - - if (!*ppv) - IShellLinkW_Release(psl); - } - - return hr; -} - -/************************************************************************** - * IShellLinkA_QueryInterface - */ -static HRESULT WINAPI IShellLinkA_fnQueryInterface( IShellLinkA * iface, REFIID riid, LPVOID *ppvObj) -{ - IShellLinkImpl *This = (IShellLinkImpl *)iface; - - TRACE("(%p)->(\n\tIID:\t%s)\n",This,debugstr_guid(riid)); - - *ppvObj = NULL; - - if(IsEqualIID(riid, &IID_IUnknown) || - IsEqualIID(riid, &IID_IShellLinkA)) - { - *ppvObj = This; - } - else if(IsEqualIID(riid, &IID_IShellLinkW)) - { - *ppvObj = (IShellLinkW *)&(This->lpvtblw); - } - else if(IsEqualIID(riid, &IID_IPersistFile)) - { - *ppvObj = (IPersistFile *)&(This->lpvtblPersistFile); - } - else if(IsEqualIID(riid, &IID_IPersistStream)) - { - *ppvObj = (IPersistStream *)&(This->lpvtblPersistStream); - } - - if(*ppvObj) - { - IUnknown_AddRef((IUnknown*)(*ppvObj)); - TRACE("-- Interface: (%p)->(%p)\n",ppvObj,*ppvObj); - return S_OK; - } - TRACE("-- Interface: E_NOINTERFACE\n"); - return E_NOINTERFACE; -} -/****************************************************************************** - * IShellLinkA_AddRef - */ -static ULONG WINAPI IShellLinkA_fnAddRef(IShellLinkA * iface) -{ - IShellLinkImpl *This = (IShellLinkImpl *)iface; - - TRACE("(%p)->(count=%lu)\n",This,This->ref); - - return ++(This->ref); -} -/****************************************************************************** - * IShellLinkA_Release - */ -static ULONG WINAPI IShellLinkA_fnRelease(IShellLinkA * iface) -{ - IShellLinkImpl *This = (IShellLinkImpl *)iface; - - TRACE("(%p)->(count=%lu)\n",This,This->ref); - - if (--(This->ref)) - return This->ref; - - TRACE("-- destroying IShellLink(%p)\n",This); - - HeapFree(GetProcessHeap(), 0, This->sIcoPath); - HeapFree(GetProcessHeap(), 0, This->sArgs); - HeapFree(GetProcessHeap(), 0, This->sWorkDir); - HeapFree(GetProcessHeap(), 0, This->sDescription); - HeapFree(GetProcessHeap(),0,This->sPath); - - if (This->pPidl) - ILFree(This->pPidl); - - LocalFree((HANDLE)This); - - return 0; -} - -static HRESULT WINAPI IShellLinkA_fnGetPath(IShellLinkA * iface, LPSTR pszFile, - INT cchMaxPath, WIN32_FIND_DATAA *pfd, DWORD fFlags) -{ - IShellLinkImpl *This = (IShellLinkImpl *)iface; - - TRACE("(%p)->(pfile=%p len=%u find_data=%p flags=%lu)(%s)\n", - This, pszFile, cchMaxPath, pfd, fFlags, debugstr_w(This->sPath)); - - if( cchMaxPath ) - pszFile[0] = 0; - if (This->sPath) - WideCharToMultiByte( CP_ACP, 0, This->sPath, -1, - pszFile, cchMaxPath, NULL, NULL); - - if (pfd) FIXME("(%p): WIN32_FIND_DATA is not yet filled.\n", This); - - return NOERROR; -} - -static HRESULT WINAPI IShellLinkA_fnGetIDList(IShellLinkA * iface, LPITEMIDLIST * ppidl) -{ - IShellLinkImpl *This = (IShellLinkImpl *)iface; - - TRACE("(%p)->(ppidl=%p)\n",This, ppidl); - - *ppidl = ILClone(This->pPidl); - - return NOERROR; -} - -static HRESULT WINAPI IShellLinkA_fnSetIDList(IShellLinkA * iface, LPCITEMIDLIST pidl) -{ - IShellLinkImpl *This = (IShellLinkImpl *)iface; - - TRACE("(%p)->(pidl=%p)\n",This, pidl); - - if (This->pPidl) - ILFree(This->pPidl); - This->pPidl = ILClone (pidl); - This->bDirty = TRUE; - - return S_OK; -} - -static HRESULT WINAPI IShellLinkA_fnGetDescription(IShellLinkA * iface, LPSTR pszName,INT cchMaxName) -{ - IShellLinkImpl *This = (IShellLinkImpl *)iface; - - TRACE("(%p)->(%p len=%u)\n",This, pszName, cchMaxName); - - if( cchMaxName ) - pszName[0] = 0; - if( This->sDescription ) - WideCharToMultiByte( CP_ACP, 0, This->sDescription, -1, - pszName, cchMaxName, NULL, NULL); - - return S_OK; -} -static HRESULT WINAPI IShellLinkA_fnSetDescription(IShellLinkA * iface, LPCSTR pszName) -{ - IShellLinkImpl *This = (IShellLinkImpl *)iface; - - TRACE("(%p)->(pName=%s)\n", This, pszName); - - HeapFree(GetProcessHeap(), 0, This->sDescription); - This->sDescription = HEAP_strdupAtoW( GetProcessHeap(), 0, pszName); - if ( !This->sDescription ) - return E_OUTOFMEMORY; - - This->bDirty = TRUE; - - return S_OK; -} - -static HRESULT WINAPI IShellLinkA_fnGetWorkingDirectory(IShellLinkA * iface, LPSTR pszDir,INT cchMaxPath) -{ - IShellLinkImpl *This = (IShellLinkImpl *)iface; - - TRACE("(%p)->(%p len=%u)\n", This, pszDir, cchMaxPath); - - if( cchMaxPath ) - pszDir[0] = 0; - if( This->sWorkDir ) - WideCharToMultiByte( CP_ACP, 0, This->sWorkDir, -1, - pszDir, cchMaxPath, NULL, NULL); - - return S_OK; -} - -static HRESULT WINAPI IShellLinkA_fnSetWorkingDirectory(IShellLinkA * iface, LPCSTR pszDir) -{ - IShellLinkImpl *This = (IShellLinkImpl *)iface; - - TRACE("(%p)->(dir=%s)\n",This, pszDir); - - HeapFree(GetProcessHeap(), 0, This->sWorkDir); - This->sWorkDir = HEAP_strdupAtoW( GetProcessHeap(), 0, pszDir); - if ( !This->sWorkDir ) - return E_OUTOFMEMORY; - - This->bDirty = TRUE; - - return S_OK; -} - -static HRESULT WINAPI IShellLinkA_fnGetArguments(IShellLinkA * iface, LPSTR pszArgs,INT cchMaxPath) -{ - IShellLinkImpl *This = (IShellLinkImpl *)iface; - - TRACE("(%p)->(%p len=%u)\n", This, pszArgs, cchMaxPath); - - if( cchMaxPath ) - pszArgs[0] = 0; - if( This->sArgs ) - WideCharToMultiByte( CP_ACP, 0, This->sArgs, -1, - pszArgs, cchMaxPath, NULL, NULL); - - return S_OK; -} - -static HRESULT WINAPI IShellLinkA_fnSetArguments(IShellLinkA * iface, LPCSTR pszArgs) -{ - IShellLinkImpl *This = (IShellLinkImpl *)iface; - - TRACE("(%p)->(args=%s)\n",This, pszArgs); - - HeapFree(GetProcessHeap(), 0, This->sArgs); - This->sArgs = HEAP_strdupAtoW( GetProcessHeap(), 0, pszArgs); - if( !This->sArgs ) - return E_OUTOFMEMORY; - - This->bDirty = TRUE; - - return S_OK; -} - -static HRESULT WINAPI IShellLinkA_fnGetHotkey(IShellLinkA * iface, WORD *pwHotkey) -{ - IShellLinkImpl *This = (IShellLinkImpl *)iface; - - TRACE("(%p)->(%p)(0x%08x)\n",This, pwHotkey, This->wHotKey); - - *pwHotkey = This->wHotKey; - - return S_OK; -} - -static HRESULT WINAPI IShellLinkA_fnSetHotkey(IShellLinkA * iface, WORD wHotkey) -{ - IShellLinkImpl *This = (IShellLinkImpl *)iface; - - TRACE("(%p)->(hotkey=%x)\n",This, wHotkey); - - This->wHotKey = wHotkey; - This->bDirty = TRUE; - - return S_OK; -} - -static HRESULT WINAPI IShellLinkA_fnGetShowCmd(IShellLinkA * iface, INT *piShowCmd) -{ - IShellLinkImpl *This = (IShellLinkImpl *)iface; - - TRACE("(%p)->(%p)\n",This, piShowCmd); - *piShowCmd = This->iShowCmd; - return S_OK; -} - -static HRESULT WINAPI IShellLinkA_fnSetShowCmd(IShellLinkA * iface, INT iShowCmd) -{ - IShellLinkImpl *This = (IShellLinkImpl *)iface; - - TRACE("(%p) %d\n",This, iShowCmd); - - This->iShowCmd = iShowCmd; - This->bDirty = TRUE; - - return NOERROR; -} - -static HRESULT SHELL_PidlGeticonLocationA(IShellFolder* psf, LPITEMIDLIST pidl, LPSTR pszIconPath, int cchIconPath, int* piIcon) -{ - LPCITEMIDLIST pidlLast; - - HRESULT hr = SHBindToParent(pidl, &IID_IShellFolder, (LPVOID*)&psf, &pidlLast); - - if (SUCCEEDED(hr)) { - IExtractIconA* pei; - - hr = IShellFolder_GetUIObjectOf(psf, 0, 1, (LPCITEMIDLIST*)&pidlLast, &IID_IExtractIconA, NULL, (LPVOID*)&pei); - - if (SUCCEEDED(hr)) { - hr = IExtractIconA_GetIconLocation(pei, 0, pszIconPath, MAX_PATH, piIcon, NULL); - - IExtractIconA_Release(pei); - } - - IShellFolder_Release(psf); - } - - return hr; -} - -static HRESULT WINAPI IShellLinkA_fnGetIconLocation(IShellLinkA * iface, LPSTR pszIconPath,INT cchIconPath,INT *piIcon) -{ - IShellLinkImpl *This = (IShellLinkImpl *)iface; - - TRACE("(%p)->(%p len=%u iicon=%p)\n", This, pszIconPath, cchIconPath, piIcon); - - if (cchIconPath) - pszIconPath[0] = 0; - - if (This->sIcoPath) { - WideCharToMultiByte(CP_ACP, 0, This->sIcoPath, -1, pszIconPath, cchIconPath, NULL, NULL); - *piIcon = This->iIcoNdx; - return S_OK; - } - - if (This->pPidl || This->sPath) { - IShellFolder* pdsk; - - HRESULT hr = SHGetDesktopFolder(&pdsk); - - if (SUCCEEDED(hr)) { - /* first look for an icon using the PIDL (if present) */ - if (This->pPidl) - hr = SHELL_PidlGeticonLocationA(pdsk, This->pPidl, pszIconPath, cchIconPath, piIcon); - else - hr = E_FAIL; - - /* if we couldn't find an icon yet, look for it using the file system path */ - if (FAILED(hr) && This->sPath) { - LPITEMIDLIST pidl; - - hr = IShellFolder_ParseDisplayName(pdsk, 0, NULL, This->sPath, NULL, &pidl, NULL); - - if (SUCCEEDED(hr)) { - hr = SHELL_PidlGeticonLocationA(pdsk, pidl, pszIconPath, cchIconPath, piIcon); - - SHFree(pidl); - } - } - - IShellFolder_Release(pdsk); - } - - return hr; - } else - return E_FAIL; -} - -static HRESULT WINAPI IShellLinkA_fnSetIconLocation(IShellLinkA * iface, LPCSTR pszIconPath,INT iIcon) -{ - IShellLinkImpl *This = (IShellLinkImpl *)iface; - - TRACE("(%p)->(path=%s iicon=%u)\n",This, pszIconPath, iIcon); - - HeapFree(GetProcessHeap(), 0, This->sIcoPath); - This->sIcoPath = HEAP_strdupAtoW(GetProcessHeap(), 0, pszIconPath); - if ( !This->sIcoPath ) - return E_OUTOFMEMORY; - - This->iIcoNdx = iIcon; - This->bDirty = TRUE; - - return S_OK; -} - -static HRESULT WINAPI IShellLinkA_fnSetRelativePath(IShellLinkA * iface, LPCSTR pszPathRel, DWORD dwReserved) -{ - IShellLinkImpl *This = (IShellLinkImpl *)iface; - - FIXME("(%p)->(path=%s %lx)\n",This, pszPathRel, dwReserved); - - HeapFree(GetProcessHeap(), 0, This->sPathRel); - This->sPathRel = HEAP_strdupAtoW(GetProcessHeap(), 0, pszPathRel); - This->bDirty = TRUE; - - return ShellLink_UpdatePath(This->sPathRel, This->sPath, This->sWorkDir, &This->sPath); -} - -static HRESULT WINAPI IShellLinkA_fnResolve(IShellLinkA * iface, HWND hwnd, DWORD fFlags) -{ - HRESULT hr = S_OK; - - IShellLinkImpl *This = (IShellLinkImpl *)iface; - - FIXME("(%p)->(hwnd=%p flags=%lx)\n",This, hwnd, fFlags); - - /*FIXME: use IResolveShellLink interface */ - - if (!This->sPath && This->pPidl) { - WCHAR buffer[MAX_PATH]; - - hr = SHELL_GetPathFromIDListW(This->pPidl, buffer, MAX_PATH); - - if (SUCCEEDED(hr) && *buffer) { - This->sPath = (LPWSTR) HeapAlloc(GetProcessHeap(), 0, (lstrlenW(buffer)+1)*sizeof(WCHAR)); - if (!This->sPath) - return E_OUTOFMEMORY; - - lstrcpyW(This->sPath, buffer); - - This->bDirty = TRUE; - } else - hr = S_OK; /* don't report an error occurred while just caching information */ - } - - if (!This->sIcoPath && This->sPath) { - This->sIcoPath = (LPWSTR) HeapAlloc(GetProcessHeap(), 0, (lstrlenW(This->sPath)+1)*sizeof(WCHAR)); - if (!This->sIcoPath) - return E_OUTOFMEMORY; - - lstrcpyW(This->sIcoPath, This->sPath); - This->iIcoNdx = 0; - - This->bDirty = TRUE; - } - - return hr; -} - -static HRESULT WINAPI IShellLinkA_fnSetPath(IShellLinkA * iface, LPCSTR pszFile) -{ - IShellLinkImpl *This = (IShellLinkImpl *)iface; - char buffer[MAX_PATH]; - LPSTR fname; - - TRACE("(%p)->(path=%s)\n",This, pszFile); - - if (!GetFullPathNameA(pszFile, MAX_PATH, buffer, &fname)) - return E_FAIL; - - HeapFree(GetProcessHeap(), 0, This->sPath); - This->sPath = HEAP_strdupAtoW(GetProcessHeap(), 0, buffer); - if( !This->sPath ) - return E_OUTOFMEMORY; - - This->bDirty = TRUE; - - return S_OK; -} - -/************************************************************************** -* IShellLink Implementation -*/ - -static IShellLinkAVtbl slvt = -{ - IShellLinkA_fnQueryInterface, - IShellLinkA_fnAddRef, - IShellLinkA_fnRelease, - IShellLinkA_fnGetPath, - IShellLinkA_fnGetIDList, - IShellLinkA_fnSetIDList, - IShellLinkA_fnGetDescription, - IShellLinkA_fnSetDescription, - IShellLinkA_fnGetWorkingDirectory, - IShellLinkA_fnSetWorkingDirectory, - IShellLinkA_fnGetArguments, - IShellLinkA_fnSetArguments, - IShellLinkA_fnGetHotkey, - IShellLinkA_fnSetHotkey, - IShellLinkA_fnGetShowCmd, - IShellLinkA_fnSetShowCmd, - IShellLinkA_fnGetIconLocation, - IShellLinkA_fnSetIconLocation, - IShellLinkA_fnSetRelativePath, - IShellLinkA_fnResolve, - IShellLinkA_fnSetPath -}; - - -/************************************************************************** - * IShellLinkW_fnQueryInterface - */ -static HRESULT WINAPI IShellLinkW_fnQueryInterface( - IShellLinkW * iface, REFIID riid, LPVOID *ppvObj) -{ - _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface); - - return IShellLinkA_QueryInterface((IShellLinkA*)This, riid, ppvObj); -} - -/****************************************************************************** - * IShellLinkW_fnAddRef - */ -static ULONG WINAPI IShellLinkW_fnAddRef(IShellLinkW * iface) -{ - _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface); - - TRACE("(%p)->(count=%lu)\n",This,This->ref); - - return IShellLinkA_AddRef((IShellLinkA*)This); -} -/****************************************************************************** - * IShellLinkW_fnRelease - */ - -static ULONG WINAPI IShellLinkW_fnRelease(IShellLinkW * iface) -{ - _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface); - - TRACE("(%p)->(count=%lu)\n",This,This->ref); - - return IShellLinkA_Release((IShellLinkA*)This); -} - -static HRESULT WINAPI IShellLinkW_fnGetPath(IShellLinkW * iface, LPWSTR pszFile,INT cchMaxPath, WIN32_FIND_DATAW *pfd, DWORD fFlags) -{ - _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface); - - TRACE("(%p)->(pfile=%p len=%u find_data=%p flags=%lu)\n", - This, pszFile, cchMaxPath, pfd, fFlags); - - if( cchMaxPath ) - pszFile[0] = 0; - if( This->sPath ) - lstrcpynW( pszFile, This->sPath, cchMaxPath ); - - if (pfd) FIXME("(%p): WIN32_FIND_DATA is not yet filled.\n", This); - - return NOERROR; -} - -static HRESULT WINAPI IShellLinkW_fnGetIDList(IShellLinkW * iface, LPITEMIDLIST * ppidl) -{ - _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface); - - TRACE("(%p)->(ppidl=%p)\n",This, ppidl); - - if( This->pPidl) - *ppidl = ILClone( This->pPidl ); - else - *ppidl = NULL; - - return S_OK; -} - -static HRESULT WINAPI IShellLinkW_fnSetIDList(IShellLinkW * iface, LPCITEMIDLIST pidl) -{ - _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface); - - TRACE("(%p)->(pidl=%p)\n",This, pidl); - - if( This->pPidl ) - ILFree( This->pPidl ); - This->pPidl = ILClone( pidl ); - if( !This->pPidl ) - return E_FAIL; - - This->bDirty = TRUE; - - return S_OK; -} - -static HRESULT WINAPI IShellLinkW_fnGetDescription(IShellLinkW * iface, LPWSTR pszName,INT cchMaxName) -{ - _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface); - - TRACE("(%p)->(%p len=%u)\n",This, pszName, cchMaxName); - - if( cchMaxName ) - pszName[0] = 0; - if( This->sDescription ) - lstrcpynW( pszName, This->sDescription, cchMaxName ); - - return S_OK; -} - -static HRESULT WINAPI IShellLinkW_fnSetDescription(IShellLinkW * iface, LPCWSTR pszName) -{ - _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface); - - TRACE("(%p)->(desc=%s)\n",This, debugstr_w(pszName)); - - HeapFree(GetProcessHeap(), 0, This->sDescription); - This->sDescription = HeapAlloc( GetProcessHeap(), 0, - (lstrlenW( pszName )+1)*sizeof(WCHAR) ); - if ( !This->sDescription ) - return E_OUTOFMEMORY; - - lstrcpyW( This->sDescription, pszName ); - This->bDirty = TRUE; - - return S_OK; -} - -static HRESULT WINAPI IShellLinkW_fnGetWorkingDirectory(IShellLinkW * iface, LPWSTR pszDir,INT cchMaxPath) -{ - _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface); - - TRACE("(%p)->(%p len %u)\n", This, pszDir, cchMaxPath); - - if( cchMaxPath ) - pszDir[0] = 0; - if( This->sWorkDir ) - lstrcpynW( pszDir, This->sWorkDir, cchMaxPath ); - - return S_OK; -} - -static HRESULT WINAPI IShellLinkW_fnSetWorkingDirectory(IShellLinkW * iface, LPCWSTR pszDir) -{ - _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface); - - TRACE("(%p)->(dir=%s)\n",This, debugstr_w(pszDir)); - - HeapFree(GetProcessHeap(), 0, This->sWorkDir); - This->sWorkDir = HeapAlloc( GetProcessHeap(), 0, - (lstrlenW( pszDir )+1)*sizeof (WCHAR) ); - if ( !This->sWorkDir ) - return E_OUTOFMEMORY; - lstrcpyW( This->sWorkDir, pszDir ); - This->bDirty = TRUE; - - return S_OK; -} - -static HRESULT WINAPI IShellLinkW_fnGetArguments(IShellLinkW * iface, LPWSTR pszArgs,INT cchMaxPath) -{ - _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface); - - TRACE("(%p)->(%p len=%u)\n", This, pszArgs, cchMaxPath); - - if( cchMaxPath ) - pszArgs[0] = 0; - if( This->sArgs ) - lstrcpynW( pszArgs, This->sArgs, cchMaxPath ); - - return NOERROR; -} - -static HRESULT WINAPI IShellLinkW_fnSetArguments(IShellLinkW * iface, LPCWSTR pszArgs) -{ - _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface); - - TRACE("(%p)->(args=%s)\n",This, debugstr_w(pszArgs)); - - HeapFree(GetProcessHeap(), 0, This->sArgs); - This->sArgs = HeapAlloc( GetProcessHeap(), 0, - (lstrlenW( pszArgs )+1)*sizeof (WCHAR) ); - if ( !This->sArgs ) - return E_OUTOFMEMORY; - lstrcpyW( This->sArgs, pszArgs ); - This->bDirty = TRUE; - - return S_OK; -} - -static HRESULT WINAPI IShellLinkW_fnGetHotkey(IShellLinkW * iface, WORD *pwHotkey) -{ - _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface); - - TRACE("(%p)->(%p)\n",This, pwHotkey); - - *pwHotkey=This->wHotKey; - - return S_OK; -} - -static HRESULT WINAPI IShellLinkW_fnSetHotkey(IShellLinkW * iface, WORD wHotkey) -{ - _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface); - - TRACE("(%p)->(hotkey=%x)\n",This, wHotkey); - - This->wHotKey = wHotkey; - This->bDirty = TRUE; - - return S_OK; -} - -static HRESULT WINAPI IShellLinkW_fnGetShowCmd(IShellLinkW * iface, INT *piShowCmd) -{ - _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface); - - TRACE("(%p)->(%p)\n",This, piShowCmd); - - *piShowCmd = This->iShowCmd; - - return S_OK; -} - -static HRESULT WINAPI IShellLinkW_fnSetShowCmd(IShellLinkW * iface, INT iShowCmd) -{ - _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface); - - This->iShowCmd = iShowCmd; - This->bDirty = TRUE; - - return S_OK; -} - -static HRESULT SHELL_PidlGeticonLocationW(IShellFolder* psf, LPITEMIDLIST pidl, LPWSTR pszIconPath, int cchIconPath, int* piIcon) -{ - LPCITEMIDLIST pidlLast; - - HRESULT hr = SHBindToParent(pidl, &IID_IShellFolder, (LPVOID*)&psf, &pidlLast); - - if (SUCCEEDED(hr)) { - IExtractIconW* pei; - - hr = IShellFolder_GetUIObjectOf(psf, 0, 1, (LPCITEMIDLIST*)&pidlLast, &IID_IExtractIconW, NULL, (LPVOID*)&pei); - - if (SUCCEEDED(hr)) { - hr = IExtractIconW_GetIconLocation(pei, 0, pszIconPath, MAX_PATH, piIcon, NULL); - - IExtractIconW_Release(pei); - } - - IShellFolder_Release(psf); - } - - return hr; -} - -static HRESULT WINAPI IShellLinkW_fnGetIconLocation(IShellLinkW * iface, LPWSTR pszIconPath,INT cchIconPath,INT *piIcon) -{ - _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface); - - TRACE("(%p)->(%p len=%u iicon=%p)\n", This, pszIconPath, cchIconPath, piIcon); - - if (cchIconPath) - pszIconPath[0] = 0; - - if (This->sIcoPath) { - lstrcpynW(pszIconPath, This->sIcoPath, cchIconPath); - *piIcon = This->iIcoNdx; - return S_OK; - } - - if (This->pPidl || This->sPath) { - IShellFolder* pdsk; - - HRESULT hr = SHGetDesktopFolder(&pdsk); - - if (SUCCEEDED(hr)) { - /* first look for an icon using the PIDL (if present) */ - if (This->pPidl) - hr = SHELL_PidlGeticonLocationW(pdsk, This->pPidl, pszIconPath, cchIconPath, piIcon); - else - hr = E_FAIL; - - /* if we couldn't find an icon yet, look for it using the file system path */ - if (FAILED(hr) && This->sPath) { - LPITEMIDLIST pidl; - - hr = IShellFolder_ParseDisplayName(pdsk, 0, NULL, This->sPath, NULL, &pidl, NULL); - - if (SUCCEEDED(hr)) { - hr = SHELL_PidlGeticonLocationW(pdsk, pidl, pszIconPath, cchIconPath, piIcon); - - SHFree(pidl); - } - } - - IShellFolder_Release(pdsk); - } - - return hr; - } else - return E_FAIL; -} - -static HRESULT WINAPI IShellLinkW_fnSetIconLocation(IShellLinkW * iface, LPCWSTR pszIconPath,INT iIcon) -{ - _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface); - - TRACE("(%p)->(path=%s iicon=%u)\n",This, debugstr_w(pszIconPath), iIcon); - - HeapFree(GetProcessHeap(), 0, This->sIcoPath); - This->sIcoPath = HeapAlloc( GetProcessHeap(), 0, - (lstrlenW( pszIconPath )+1)*sizeof (WCHAR) ); - if ( !This->sIcoPath ) - return E_OUTOFMEMORY; - lstrcpyW( This->sIcoPath, pszIconPath ); - - This->iIcoNdx = iIcon; - This->bDirty = TRUE; - - return S_OK; -} - -static HRESULT WINAPI IShellLinkW_fnSetRelativePath(IShellLinkW * iface, LPCWSTR pszPathRel, DWORD dwReserved) -{ - _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface); - - TRACE("(%p)->(path=%s %lx)\n",This, debugstr_w(pszPathRel), dwReserved); - - HeapFree(GetProcessHeap(), 0, This->sPathRel); - This->sPathRel = HeapAlloc( GetProcessHeap(), 0, - (lstrlenW( pszPathRel )+1) * sizeof (WCHAR) ); - if ( !This->sPathRel ) - return E_OUTOFMEMORY; - lstrcpyW( This->sPathRel, pszPathRel ); - This->bDirty = TRUE; - - return ShellLink_UpdatePath(This->sPathRel, This->sPath, This->sWorkDir, &This->sPath); -} - -static HRESULT WINAPI IShellLinkW_fnResolve(IShellLinkW * iface, HWND hwnd, DWORD fFlags) -{ - HRESULT hr = S_OK; - - _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface); - - FIXME("(%p)->(hwnd=%p flags=%lx)\n",This, hwnd, fFlags); - - /*FIXME: use IResolveShellLink interface */ - - if (!This->sPath && This->pPidl) { - WCHAR buffer[MAX_PATH]; - - hr = SHELL_GetPathFromIDListW(This->pPidl, buffer, MAX_PATH); - - if (SUCCEEDED(hr) && *buffer) { - This->sPath = (LPWSTR) HeapAlloc(GetProcessHeap(), 0, (lstrlenW(buffer)+1)*sizeof(WCHAR)); - if (!This->sPath) - return E_OUTOFMEMORY; - - lstrcpyW(This->sPath, buffer); - - This->bDirty = TRUE; - } else - hr = S_OK; /* don't report an error occurred while just caching information */ - } - - if (!This->sIcoPath && This->sPath) { - This->sIcoPath = (LPWSTR) HeapAlloc(GetProcessHeap(), 0, (lstrlenW(This->sPath)+1)*sizeof(WCHAR)); - if (!This->sIcoPath) - return E_OUTOFMEMORY; - - lstrcpyW(This->sIcoPath, This->sPath); - This->iIcoNdx = 0; - - This->bDirty = TRUE; - } - - return hr; -} - -static HRESULT WINAPI IShellLinkW_fnSetPath(IShellLinkW * iface, LPCWSTR pszFile) -{ - _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface); - WCHAR buffer[MAX_PATH]; - LPWSTR fname; - - TRACE("(%p)->(path=%s)\n",This, debugstr_w(pszFile)); - - if (!GetFullPathNameW(pszFile, MAX_PATH, buffer, &fname)) - return E_FAIL; - - HeapFree(GetProcessHeap(), 0, This->sPath); - This->sPath = HeapAlloc( GetProcessHeap(), 0, - (lstrlenW( buffer )+1) * sizeof (WCHAR) ); - if (!This->sPath) - return E_OUTOFMEMORY; - - lstrcpyW(This->sPath, buffer); - This->bDirty = TRUE; - - return S_OK; -} - -/************************************************************************** -* IShellLinkW Implementation -*/ - -static IShellLinkWVtbl slvtw = -{ - IShellLinkW_fnQueryInterface, - IShellLinkW_fnAddRef, - IShellLinkW_fnRelease, - IShellLinkW_fnGetPath, - IShellLinkW_fnGetIDList, - IShellLinkW_fnSetIDList, - IShellLinkW_fnGetDescription, - IShellLinkW_fnSetDescription, - IShellLinkW_fnGetWorkingDirectory, - IShellLinkW_fnSetWorkingDirectory, - IShellLinkW_fnGetArguments, - IShellLinkW_fnSetArguments, - IShellLinkW_fnGetHotkey, - IShellLinkW_fnSetHotkey, - IShellLinkW_fnGetShowCmd, - IShellLinkW_fnSetShowCmd, - IShellLinkW_fnGetIconLocation, - IShellLinkW_fnSetIconLocation, - IShellLinkW_fnSetRelativePath, - IShellLinkW_fnResolve, - IShellLinkW_fnSetPath -}; +/* + * + * Copyright 1997 Marcus Meissner + * Copyright 1998 Juergen Schmied + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * NOTES + * Nearly complete informations about the binary formats + * of .lnk files available at http://www.wotsit.org + * + */ + +#include "config.h" +#include "wine/port.h" + +#include +#include +#include +#include +#ifdef HAVE_UNISTD_H +# include +#endif +#include +#include +#ifdef HAVE_SYS_WAIT_H +# include +#endif + +#define COBJMACROS + +#include "wine/debug.h" +#include "winerror.h" +#include "windef.h" +#include "winbase.h" +#include "winnls.h" +#include "winreg.h" + +#include "winuser.h" +#include "wingdi.h" +#include "shlobj.h" +#include "undocshell.h" + +#include "pidl.h" +#include "shell32_main.h" +#include "shlguid.h" +#include "shlwapi.h" + +WINE_DEFAULT_DEBUG_CHANNEL(shell); + +/* link file formats */ + +/* flag1: lnk elements: simple link has 0x0B */ +#define SCF_PIDL 1 +#define SCF_NORMAL 2 +#define SCF_DESCRIPTION 4 +#define SCF_RELATIVE 8 +#define SCF_WORKDIR 0x10 +#define SCF_ARGS 0x20 +#define SCF_CUSTOMICON 0x40 +#define SCF_UNICODE 0x80 + +#include "pshpack1.h" + +typedef struct _LINK_HEADER +{ + DWORD dwSize; /* 0x00 size of the header - 0x4c */ + GUID MagicGuid; /* 0x04 is CLSID_ShellLink */ + DWORD dwFlags; /* 0x14 describes elements following */ + DWORD dwFileAttr; /* 0x18 attributes of the target file */ + FILETIME Time1; /* 0x1c */ + FILETIME Time2; /* 0x24 */ + FILETIME Time3; /* 0x2c */ + DWORD dwFileLength; /* 0x34 File length */ + DWORD nIcon; /* 0x38 icon number */ + DWORD fStartup; /* 0x3c startup type */ + DWORD wHotKey; /* 0x40 hotkey */ + DWORD Unknown5; /* 0x44 */ + DWORD Unknown6; /* 0x48 */ +} LINK_HEADER, * PLINK_HEADER; + +#define SHLINK_LOCAL 0 +#define SHLINK_REMOTE 1 + +typedef struct _LOCATION_INFO +{ + DWORD dwTotalSize; + DWORD dwHeaderSize; + DWORD dwFlags; + DWORD dwVolTableOfs; + DWORD dwLocalPathOfs; + DWORD dwNetworkVolTableOfs; + DWORD dwFinalPathOfs; +} LOCATION_INFO; + +typedef struct _LOCAL_VOLUME_INFO +{ + DWORD dwSize; + DWORD dwType; + DWORD dwVolSerial; + DWORD dwVolLabelOfs; +} LOCAL_VOLUME_INFO; + +#include "poppack.h" + +static IShellLinkAVtbl slvt; +static IShellLinkWVtbl slvtw; +static IPersistFileVtbl pfvt; +static IPersistStreamVtbl psvt; + +/* IShellLink Implementation */ + +typedef struct +{ + IShellLinkAVtbl *lpVtbl; + DWORD ref; + + IShellLinkWVtbl *lpvtblw; + IPersistFileVtbl *lpvtblPersistFile; + IPersistStreamVtbl *lpvtblPersistStream; + + /* data structures according to the informations in the link */ + LPITEMIDLIST pPidl; + WORD wHotKey; + SYSTEMTIME time1; + SYSTEMTIME time2; + SYSTEMTIME time3; + + DWORD iShowCmd; + LPWSTR sIcoPath; + INT iIcoNdx; + LPWSTR sPath; + LPWSTR sArgs; + LPWSTR sWorkDir; + LPWSTR sDescription; + LPWSTR sPathRel; + + BOOL bDirty; +} IShellLinkImpl; + +#define _IShellLinkW_Offset ((int)(&(((IShellLinkImpl*)0)->lpvtblw))) +#define _ICOM_THIS_From_IShellLinkW(class, name) class* This = (class*)(((char*)name)-_IShellLinkW_Offset) + +#define _IPersistFile_Offset ((int)(&(((IShellLinkImpl*)0)->lpvtblPersistFile))) +#define _ICOM_THIS_From_IPersistFile(class, name) class* This = (class*)(((char*)name)-_IPersistFile_Offset) + +#define _IPersistStream_Offset ((int)(&(((IShellLinkImpl*)0)->lpvtblPersistStream))) +#define _ICOM_THIS_From_IPersistStream(class, name) class* This = (class*)(((char*)name)-_IPersistStream_Offset) + +static HRESULT ShellLink_UpdatePath(LPWSTR sPathRel, LPCWSTR path, LPCWSTR sWorkDir, LPWSTR* psPath); + +/* strdup on the process heap */ +inline static LPWSTR HEAP_strdupAtoW( HANDLE heap, DWORD flags, LPCSTR str) +{ + INT len = MultiByteToWideChar( CP_ACP, 0, str, -1, NULL, 0 ); + LPWSTR p = HeapAlloc( heap, flags, len*sizeof (WCHAR) ); + if( !p ) + return p; + MultiByteToWideChar( CP_ACP, 0, str, -1, p, len ); + return p; +} + + +/************************************************************************** + * IPersistFile_QueryInterface + */ +static HRESULT WINAPI IPersistFile_fnQueryInterface( + IPersistFile* iface, + REFIID riid, + LPVOID *ppvObj) +{ + _ICOM_THIS_From_IPersistFile(IShellLinkImpl, iface); + + TRACE("(%p)\n",This); + + return IShellLinkA_QueryInterface((IShellLinkA*)This, riid, ppvObj); +} + +/****************************************************************************** + * IPersistFile_AddRef + */ +static ULONG WINAPI IPersistFile_fnAddRef(IPersistFile* iface) +{ + _ICOM_THIS_From_IPersistFile(IShellLinkImpl, iface); + + TRACE("(%p)->(count=%lu)\n",This,This->ref); + + return IShellLinkA_AddRef((IShellLinkA*)This); +} +/****************************************************************************** + * IPersistFile_Release + */ +static ULONG WINAPI IPersistFile_fnRelease(IPersistFile* iface) +{ + _ICOM_THIS_From_IPersistFile(IShellLinkImpl, iface); + + TRACE("(%p)->(count=%lu)\n",This,This->ref); + + return IShellLinkA_Release((IShellLinkA*)This); +} + +static HRESULT WINAPI IPersistFile_fnGetClassID(IPersistFile* iface, CLSID *pClassID) +{ + _ICOM_THIS_From_IPersistFile(IShellLinkImpl, iface); + FIXME("(%p)\n",This); + return NOERROR; +} +static HRESULT WINAPI IPersistFile_fnIsDirty(IPersistFile* iface) +{ + _ICOM_THIS_From_IPersistFile(IShellLinkImpl, iface); + + TRACE("(%p)\n",This); + + if (This->bDirty) + return S_OK; + + return S_FALSE; +} +static HRESULT WINAPI IPersistFile_fnLoad(IPersistFile* iface, LPCOLESTR pszFileName, DWORD dwMode) +{ + _ICOM_THIS_From_IPersistFile(IShellLinkImpl, iface); + IPersistStream *StreamThis = (IPersistStream *)&This->lpvtblPersistStream; + HRESULT r; + IStream *stm; + + TRACE("(%p, %s)\n",This, debugstr_w(pszFileName)); + + r = CreateStreamOnFile(pszFileName, dwMode, &stm); + if( SUCCEEDED( r ) ) + { + r = IPersistStream_Load(StreamThis, stm); + ShellLink_UpdatePath(This->sPathRel, pszFileName, This->sWorkDir, &This->sPath); + IStream_Release( stm ); + This->bDirty = FALSE; + } + + return r; +} + +static BOOL StartLinkProcessor( LPCOLESTR szLink ) +{ + static const WCHAR szFormat[] = {'w','i','n','e','m','e','n','u','b','u','i','l','d','e','r','.','e','x','e', + ' ','-','r',' ','"','%','s','"',0 }; + LONG len; + LPWSTR buffer; + STARTUPINFOW si; + PROCESS_INFORMATION pi; + + len = sizeof(szFormat) + lstrlenW( szLink ) * sizeof(WCHAR); + buffer = HeapAlloc( GetProcessHeap(), 0, len ); + if( !buffer ) + return FALSE; + + wsprintfW( buffer, szFormat, szLink ); + + TRACE("starting %s\n",debugstr_w(buffer)); + + memset(&si, 0, sizeof(si)); + si.cb = sizeof(si); + if (!CreateProcessW( NULL, buffer, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi)) return FALSE; + + /* wait for a while to throttle the creation of linker processes */ + if( WAIT_OBJECT_0 != WaitForSingleObject( pi.hProcess, 10000 ) ) + WARN("Timed out waiting for shell linker\n"); + + CloseHandle( pi.hProcess ); + CloseHandle( pi.hThread ); + + return TRUE; +} + +static HRESULT WINAPI IPersistFile_fnSave(IPersistFile* iface, LPCOLESTR pszFileName, BOOL fRemember) +{ + _ICOM_THIS_From_IPersistFile(IShellLinkImpl, iface); + IPersistStream *StreamThis = (IPersistStream *)&This->lpvtblPersistStream; + HRESULT r; + IStream *stm; + + TRACE("(%p)->(%s)\n",This,debugstr_w(pszFileName)); + + if (!pszFileName || !This->sPath) + return E_FAIL; + + r = CreateStreamOnFile(pszFileName, STGM_READWRITE | STGM_CREATE, &stm); + if( SUCCEEDED( r ) ) + { + r = IPersistStream_Save(StreamThis, stm, FALSE); + IStream_Release( stm ); + + if( SUCCEEDED( r ) ) + { + StartLinkProcessor( pszFileName ); + + This->bDirty = FALSE; + } + else + { + DeleteFileW( pszFileName ); + WARN("Failed to create shortcut %s\n", debugstr_w(pszFileName) ); + } + } + + return r; +} + +static HRESULT WINAPI IPersistFile_fnSaveCompleted(IPersistFile* iface, LPCOLESTR pszFileName) +{ + _ICOM_THIS_From_IPersistFile(IShellLinkImpl, iface); + FIXME("(%p)->(%s)\n",This,debugstr_w(pszFileName)); + return NOERROR; +} +static HRESULT WINAPI IPersistFile_fnGetCurFile(IPersistFile* iface, LPOLESTR *ppszFileName) +{ + _ICOM_THIS_From_IPersistFile(IShellLinkImpl, iface); + FIXME("(%p)\n",This); + return NOERROR; +} + +static IPersistFileVtbl pfvt = +{ + IPersistFile_fnQueryInterface, + IPersistFile_fnAddRef, + IPersistFile_fnRelease, + IPersistFile_fnGetClassID, + IPersistFile_fnIsDirty, + IPersistFile_fnLoad, + IPersistFile_fnSave, + IPersistFile_fnSaveCompleted, + IPersistFile_fnGetCurFile +}; + +/************************************************************************ + * IPersistStream_QueryInterface + */ +static HRESULT WINAPI IPersistStream_fnQueryInterface( + IPersistStream* iface, + REFIID riid, + VOID** ppvoid) +{ + _ICOM_THIS_From_IPersistStream(IShellLinkImpl, iface); + + TRACE("(%p)\n",This); + + return IShellLinkA_QueryInterface((IShellLinkA*)This, riid, ppvoid); +} + +/************************************************************************ + * IPersistStream_Release + */ +static ULONG WINAPI IPersistStream_fnRelease( + IPersistStream* iface) +{ + _ICOM_THIS_From_IPersistStream(IShellLinkImpl, iface); + + TRACE("(%p)\n",This); + + return IShellLinkA_Release((IShellLinkA*)This); +} + +/************************************************************************ + * IPersistStream_AddRef + */ +static ULONG WINAPI IPersistStream_fnAddRef( + IPersistStream* iface) +{ + _ICOM_THIS_From_IPersistStream(IShellLinkImpl, iface); + + TRACE("(%p)\n",This); + + return IShellLinkA_AddRef((IShellLinkA*)This); +} + +/************************************************************************ + * IPersistStream_GetClassID + * + */ +static HRESULT WINAPI IPersistStream_fnGetClassID( + IPersistStream* iface, + CLSID* pClassID) +{ + _ICOM_THIS_From_IPersistStream(IShellLinkImpl, iface); + + TRACE("(%p)\n", This); + + if (pClassID==0) + return E_POINTER; + +/* memcpy(pClassID, &CLSID_???, sizeof(CLSID_???)); */ + + return S_OK; +} + +/************************************************************************ + * IPersistStream_IsDirty (IPersistStream) + */ +static HRESULT WINAPI IPersistStream_fnIsDirty( + IPersistStream* iface) +{ + _ICOM_THIS_From_IPersistStream(IShellLinkImpl, iface); + + TRACE("(%p)\n", This); + + return S_OK; +} + + +static HRESULT Stream_LoadString( IStream* stm, BOOL unicode, LPWSTR *pstr ) +{ + DWORD count; + USHORT len; + LPVOID temp; + LPWSTR str; + HRESULT r; + + TRACE("%p\n", stm); + + count = 0; + r = IStream_Read(stm, &len, sizeof(len), &count); + if ( FAILED (r) || ( count != sizeof(len) ) ) + return E_FAIL; + + if( unicode ) + len *= sizeof (WCHAR); + + TRACE("reading %d\n", len); + temp = HeapAlloc(GetProcessHeap(), 0, len+sizeof(WCHAR)); + if( !temp ) + return E_OUTOFMEMORY; + count = 0; + r = IStream_Read(stm, temp, len, &count); + if( FAILED (r) || ( count != len ) ) + { + HeapFree( GetProcessHeap(), 0, temp ); + return E_FAIL; + } + + TRACE("read %s\n", debugstr_an(temp,len)); + + /* convert to unicode if necessary */ + if( !unicode ) + { + count = MultiByteToWideChar( CP_ACP, 0, (LPSTR) temp, len, NULL, 0 ); + str = HeapAlloc( GetProcessHeap(), 0, (count+1)*sizeof (WCHAR) ); + if( str ) + MultiByteToWideChar( CP_ACP, 0, (LPSTR) temp, len, str, count ); + HeapFree( GetProcessHeap(), 0, temp ); + } + else + { + count /= 2; + str = (LPWSTR) temp; + } + str[count] = 0; + + *pstr = str; + + return S_OK; +} + +static HRESULT Stream_LoadLocation( IStream* stm ) +{ + DWORD size; + ULONG count; + HRESULT r; + LOCATION_INFO *loc; + + TRACE("%p\n",stm); + + r = IStream_Read( stm, &size, sizeof(size), &count ); + if( FAILED( r ) ) + return r; + if( count != sizeof(loc->dwTotalSize) ) + return E_FAIL; + + loc = HeapAlloc( GetProcessHeap(), 0, size ); + if( ! loc ) + return E_OUTOFMEMORY; + + r = IStream_Read( stm, &loc->dwHeaderSize, size-sizeof(size), &count ); + if( FAILED( r ) ) + goto end; + if( count != (size - sizeof(size)) ) + { + r = E_FAIL; + goto end; + } + loc->dwTotalSize = size; + + TRACE("Read %ld bytes\n",count); + + /* FIXME: do something useful with it */ + HeapFree( GetProcessHeap(), 0, loc ); + + return S_OK; +end: + HeapFree( GetProcessHeap(), 0, loc ); + return r; +} + +/************************************************************************ + * IPersistStream_Load (IPersistStream) + */ +static HRESULT WINAPI IPersistStream_fnLoad( + IPersistStream* iface, + IStream* stm) +{ + LINK_HEADER hdr; + ULONG dwBytesRead; + BOOL unicode; + WCHAR sTemp[MAX_PATH]; + HRESULT r; + + _ICOM_THIS_From_IPersistStream(IShellLinkImpl, iface); + + TRACE("(%p)(%p)\n", This, stm); + + if( !stm ) + return STG_E_INVALIDPOINTER; + + dwBytesRead = 0; + r = IStream_Read(stm, &hdr, sizeof(hdr), &dwBytesRead); + if( FAILED( r ) ) + return r; + + if( dwBytesRead != sizeof(hdr)) + return E_FAIL; + if( hdr.dwSize != sizeof(hdr)) + return E_FAIL; + if( !IsEqualIID(&hdr.MagicGuid, &CLSID_ShellLink) ) + return E_FAIL; + + /* if( hdr.dwFlags & SCF_PIDL ) */ /* FIXME: seems to always have a PIDL */ + { + r = ILLoadFromStream( stm, &This->pPidl ); + if( FAILED( r ) ) + return r; + } + This->wHotKey = (WORD)hdr.wHotKey; + This->iIcoNdx = hdr.nIcon; + FileTimeToSystemTime (&hdr.Time1, &This->time1); + FileTimeToSystemTime (&hdr.Time2, &This->time2); + FileTimeToSystemTime (&hdr.Time3, &This->time3); +#if 1 + GetDateFormatW(LOCALE_USER_DEFAULT,DATE_SHORTDATE,&This->time1, NULL, sTemp, 256); + TRACE("-- time1: %s\n", debugstr_w(sTemp) ); + GetDateFormatW(LOCALE_USER_DEFAULT,DATE_SHORTDATE,&This->time2, NULL, sTemp, 256); + TRACE("-- time1: %s\n", debugstr_w(sTemp) ); + GetDateFormatW(LOCALE_USER_DEFAULT,DATE_SHORTDATE,&This->time3, NULL, sTemp, 256); + TRACE("-- time1: %s\n", debugstr_w(sTemp) ); + pdump (This->pPidl); +#endif + if( hdr.dwFlags & SCF_NORMAL ) + r = Stream_LoadLocation( stm ); + if( FAILED( r ) ) + goto end; + unicode = hdr.dwFlags & SCF_UNICODE; + if( hdr.dwFlags & SCF_DESCRIPTION ) + { + r = Stream_LoadString( stm, unicode, &This->sDescription ); + TRACE("Description -> %s\n",debugstr_w(This->sDescription)); + } + if( FAILED( r ) ) + goto end; + + if( hdr.dwFlags & SCF_RELATIVE ) + { + r = Stream_LoadString( stm, unicode, &This->sPathRel ); + TRACE("Relative Path-> %s\n",debugstr_w(This->sPathRel)); + } + if( FAILED( r ) ) + goto end; + + if( hdr.dwFlags & SCF_WORKDIR ) + { + r = Stream_LoadString( stm, unicode, &This->sWorkDir ); + TRACE("Working Dir -> %s\n",debugstr_w(This->sWorkDir)); + } + if( FAILED( r ) ) + goto end; + + if( hdr.dwFlags & SCF_ARGS ) + { + r = Stream_LoadString( stm, unicode, &This->sArgs ); + TRACE("Working Dir -> %s\n",debugstr_w(This->sArgs)); + } + if( FAILED( r ) ) + goto end; + + if( hdr.dwFlags & SCF_CUSTOMICON ) + { + r = Stream_LoadString( stm, unicode, &This->sIcoPath ); + TRACE("Icon file -> %s\n",debugstr_w(This->sIcoPath)); + } + if( FAILED( r ) ) + goto end; + + TRACE("OK\n"); + + pdump (This->pPidl); + + return S_OK; +end: + return r; +} + +/************************************************************************ + * Stream_WriteString + * + * Helper function for IPersistStream_Save. Writes a unicode string + * with terminating nul byte to a stream, preceded by the its length. + */ +static HRESULT Stream_WriteString( IStream* stm, LPCWSTR str ) +{ + USHORT len = lstrlenW( str ) + 1; + DWORD count; + HRESULT r; + + r = IStream_Write( stm, &len, sizeof(len), &count ); + if( FAILED( r ) ) + return r; + + len *= sizeof(WCHAR); + + r = IStream_Write( stm, str, len, &count ); + if( FAILED( r ) ) + return r; + + return S_OK; +} + +static HRESULT Stream_WriteLocationInfo( IStream* stm, LPCWSTR filename ) +{ + LOCATION_INFO loc; + ULONG count; + + FIXME("writing empty location info\n"); + + memset( &loc, 0, sizeof(loc) ); + loc.dwTotalSize = sizeof(loc) - sizeof(loc.dwTotalSize); + + /* FIXME: fill this in */ + + return IStream_Write( stm, &loc, loc.dwTotalSize, &count ); +} + +/************************************************************************ + * IPersistStream_Save (IPersistStream) + * + * FIXME: makes assumptions about byte order + */ +static HRESULT WINAPI IPersistStream_fnSave( + IPersistStream* iface, + IStream* stm, + BOOL fClearDirty) +{ + static const WCHAR wOpen[] = {'o','p','e','n',0}; + + LINK_HEADER header; + WCHAR exePath[MAX_PATH]; + ULONG count; + HRESULT r; + + _ICOM_THIS_From_IPersistStream(IShellLinkImpl, iface); + + TRACE("(%p) %p %x\n", This, stm, fClearDirty); + + *exePath = '\0'; + + if (This->sPath) + { + SHELL_FindExecutable(NULL, This->sPath, wOpen, exePath, MAX_PATH, NULL, NULL, NULL, NULL); + /* + * windows can create lnk files to executables that do not exist yet + * so if the executable does not exist the just trust the path they + * gave us + */ + if( !*exePath ) strcpyW(exePath,This->sPath); + } + + /* if there's no PIDL, generate one */ + if( ! This->pPidl ) This->pPidl = ILCreateFromPathW(exePath); + + memset(&header, 0, sizeof(header)); + header.dwSize = sizeof(header); + memcpy(&header.MagicGuid, &CLSID_ShellLink, sizeof(header.MagicGuid) ); + + header.wHotKey = This->wHotKey; + header.nIcon = This->iIcoNdx; + header.dwFlags = SCF_UNICODE; /* strings are in unicode */ + header.dwFlags |= SCF_NORMAL; /* how do we determine this ? */ + if( This->pPidl ) + header.dwFlags |= SCF_PIDL; + if( This->sDescription ) + header.dwFlags |= SCF_DESCRIPTION; + if( This->sWorkDir ) + header.dwFlags |= SCF_WORKDIR; + if( This->sArgs ) + header.dwFlags |= SCF_ARGS; + if( This->sIcoPath ) + header.dwFlags |= SCF_CUSTOMICON; + + SystemTimeToFileTime ( &This->time1, &header.Time1 ); + SystemTimeToFileTime ( &This->time2, &header.Time2 ); + SystemTimeToFileTime ( &This->time3, &header.Time3 ); + + /* write the Shortcut header */ + r = IStream_Write( stm, &header, sizeof(header), &count ); + if( FAILED( r ) ) + { + ERR("Write failed at %d\n",__LINE__); + return r; + } + + TRACE("Writing pidl \n"); + + /* write the PIDL to the shortcut */ + if( This->pPidl ) + { + r = ILSaveToStream( stm, This->pPidl ); + if( FAILED( r ) ) + { + ERR("Failed to write PIDL at %d\n",__LINE__); + return r; + } + } + + Stream_WriteLocationInfo( stm, exePath ); + + TRACE("Description = %s\n", debugstr_w(This->sDescription)); + if( This->sDescription ) + r = Stream_WriteString( stm, This->sDescription ); + + if( This->sPathRel ) + r = Stream_WriteString( stm, This->sPathRel ); + + if( This->sWorkDir ) + r = Stream_WriteString( stm, This->sWorkDir ); + + if( This->sArgs ) + r = Stream_WriteString( stm, This->sArgs ); + + if( This->sIcoPath ) + r = Stream_WriteString( stm, This->sIcoPath ); + + return S_OK; +} + +/************************************************************************ + * IPersistStream_GetSizeMax (IPersistStream) + */ +static HRESULT WINAPI IPersistStream_fnGetSizeMax( + IPersistStream* iface, + ULARGE_INTEGER* pcbSize) +{ + _ICOM_THIS_From_IPersistStream(IShellLinkImpl, iface); + + TRACE("(%p)\n", This); + + return E_NOTIMPL; +} + +static IPersistStreamVtbl psvt = +{ + IPersistStream_fnQueryInterface, + IPersistStream_fnAddRef, + IPersistStream_fnRelease, + IPersistStream_fnGetClassID, + IPersistStream_fnIsDirty, + IPersistStream_fnLoad, + IPersistStream_fnSave, + IPersistStream_fnGetSizeMax +}; + +/************************************************************************** + * IShellLink_Constructor + */ +HRESULT WINAPI IShellLink_Constructor ( + IUnknown * pUnkOuter, + REFIID riid, + LPVOID * ppv) +{ + IShellLinkImpl * sl; + + TRACE("unkOut=%p riid=%s\n",pUnkOuter, debugstr_guid(riid)); + + *ppv = NULL; + + if(pUnkOuter) return CLASS_E_NOAGGREGATION; + sl = (IShellLinkImpl *) LocalAlloc(GMEM_ZEROINIT,sizeof(IShellLinkImpl)); + if (!sl) return E_OUTOFMEMORY; + + sl->ref = 1; + sl->lpVtbl = &slvt; + sl->lpvtblw = &slvtw; + sl->lpvtblPersistFile = &pfvt; + sl->lpvtblPersistStream = &psvt; + sl->iShowCmd = SW_SHOWNORMAL; + sl->bDirty = FALSE; + + TRACE("(%p)->()\n",sl); + + if (IsEqualIID(riid, &IID_IUnknown) || + IsEqualIID(riid, &IID_IShellLinkA)) + *ppv = sl; + else if (IsEqualIID(riid, &IID_IShellLinkW)) + *ppv = &(sl->lpvtblw); + else { + LocalFree((HLOCAL)sl); + ERR("E_NOINTERFACE\n"); + return E_NOINTERFACE; + } + + return S_OK; +} + + +static BOOL SHELL_ExistsFileW(LPCWSTR path) +{ + HANDLE hfile = CreateFileW(path, GENERIC_READ, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL); + + if (hfile != INVALID_HANDLE_VALUE) { + CloseHandle(hfile); + return TRUE; + } else + return FALSE; +} + +/************************************************************************** + * ShellLink_UpdatePath + * update absolute path in sPath using relative path in sPathRel + */ +static HRESULT ShellLink_UpdatePath(LPWSTR sPathRel, LPCWSTR path, LPCWSTR sWorkDir, LPWSTR* psPath) +{ + if (!path || !psPath) + return E_INVALIDARG; + + if (!*psPath && sPathRel) { + WCHAR buffer[2*MAX_PATH], abs_path[2*MAX_PATH]; + LPWSTR final = NULL; + + /* first try if [directory of link file] + [relative path] finds an existing file */ + + GetFullPathNameW( path, MAX_PATH*2, buffer, &final ); + if( !final ) + final = buffer; + lstrcpyW(final, sPathRel); + + *abs_path = '\0'; + + if (SHELL_ExistsFileW(buffer)) { + if (!GetFullPathNameW(buffer, MAX_PATH, abs_path, &final)) + lstrcpyW(abs_path, buffer); + } else { + /* try if [working directory] + [relative path] finds an existing file */ + if (sWorkDir) { + lstrcpyW(buffer, sWorkDir); + lstrcpyW(PathAddBackslashW(buffer), sPathRel); + + if (SHELL_ExistsFileW(buffer)) + if (!GetFullPathNameW(buffer, MAX_PATH, abs_path, &final)) + lstrcpyW(abs_path, buffer); + } + } + + /* FIXME: This is even not enough - not all shell links can be resolved using this algorithm. */ + if (!*abs_path) + lstrcpyW(abs_path, sPathRel); + + *psPath = HeapAlloc(GetProcessHeap(), 0, (lstrlenW(abs_path)+1)*sizeof(WCHAR)); + if (!*psPath) + return E_OUTOFMEMORY; + + lstrcpyW(*psPath, abs_path); + } + + return S_OK; +} + +/************************************************************************** + * IShellLink_ConstructFromFile + */ +HRESULT WINAPI IShellLink_ConstructFromFile ( + IUnknown* pUnkOuter, + REFIID riid, + LPCITEMIDLIST pidl, + LPVOID* ppv +) +{ + IShellLinkW* psl; + + HRESULT hr = IShellLink_Constructor(NULL, riid, (LPVOID*)&psl); + + if (SUCCEEDED(hr)) { + IPersistFile* ppf; + + *ppv = NULL; + + hr = IShellLinkW_QueryInterface(psl, &IID_IPersistFile, (LPVOID*)&ppf); + + if (SUCCEEDED(hr)) { + WCHAR path[MAX_PATH]; + + if (SHGetPathFromIDListW(pidl, path)) + hr = IPersistFile_Load(ppf, path, 0); + else + hr = E_FAIL; + + if (SUCCEEDED(hr)) + *ppv = (IUnknown*) psl; + + IPersistFile_Release(ppf); + } + + if (!*ppv) + IShellLinkW_Release(psl); + } + + return hr; +} + +/************************************************************************** + * IShellLinkA_QueryInterface + */ +static HRESULT WINAPI IShellLinkA_fnQueryInterface( IShellLinkA * iface, REFIID riid, LPVOID *ppvObj) +{ + IShellLinkImpl *This = (IShellLinkImpl *)iface; + + TRACE("(%p)->(\n\tIID:\t%s)\n",This,debugstr_guid(riid)); + + *ppvObj = NULL; + + if(IsEqualIID(riid, &IID_IUnknown) || + IsEqualIID(riid, &IID_IShellLinkA)) + { + *ppvObj = This; + } + else if(IsEqualIID(riid, &IID_IShellLinkW)) + { + *ppvObj = (IShellLinkW *)&(This->lpvtblw); + } + else if(IsEqualIID(riid, &IID_IPersistFile)) + { + *ppvObj = (IPersistFile *)&(This->lpvtblPersistFile); + } + else if(IsEqualIID(riid, &IID_IPersistStream)) + { + *ppvObj = (IPersistStream *)&(This->lpvtblPersistStream); + } + + if(*ppvObj) + { + IUnknown_AddRef((IUnknown*)(*ppvObj)); + TRACE("-- Interface: (%p)->(%p)\n",ppvObj,*ppvObj); + return S_OK; + } + TRACE("-- Interface: E_NOINTERFACE\n"); + return E_NOINTERFACE; +} +/****************************************************************************** + * IShellLinkA_AddRef + */ +static ULONG WINAPI IShellLinkA_fnAddRef(IShellLinkA * iface) +{ + IShellLinkImpl *This = (IShellLinkImpl *)iface; + + TRACE("(%p)->(count=%lu)\n",This,This->ref); + + return ++(This->ref); +} +/****************************************************************************** + * IShellLinkA_Release + */ +static ULONG WINAPI IShellLinkA_fnRelease(IShellLinkA * iface) +{ + IShellLinkImpl *This = (IShellLinkImpl *)iface; + + TRACE("(%p)->(count=%lu)\n",This,This->ref); + + if (--(This->ref)) + return This->ref; + + TRACE("-- destroying IShellLink(%p)\n",This); + + HeapFree(GetProcessHeap(), 0, This->sIcoPath); + HeapFree(GetProcessHeap(), 0, This->sArgs); + HeapFree(GetProcessHeap(), 0, This->sWorkDir); + HeapFree(GetProcessHeap(), 0, This->sDescription); + HeapFree(GetProcessHeap(),0,This->sPath); + + if (This->pPidl) + ILFree(This->pPidl); + + LocalFree((HANDLE)This); + + return 0; +} + +static HRESULT WINAPI IShellLinkA_fnGetPath(IShellLinkA * iface, LPSTR pszFile, + INT cchMaxPath, WIN32_FIND_DATAA *pfd, DWORD fFlags) +{ + IShellLinkImpl *This = (IShellLinkImpl *)iface; + + TRACE("(%p)->(pfile=%p len=%u find_data=%p flags=%lu)(%s)\n", + This, pszFile, cchMaxPath, pfd, fFlags, debugstr_w(This->sPath)); + + if( cchMaxPath ) + pszFile[0] = 0; + if (This->sPath) + WideCharToMultiByte( CP_ACP, 0, This->sPath, -1, + pszFile, cchMaxPath, NULL, NULL); + + if (pfd) FIXME("(%p): WIN32_FIND_DATA is not yet filled.\n", This); + + return NOERROR; +} + +static HRESULT WINAPI IShellLinkA_fnGetIDList(IShellLinkA * iface, LPITEMIDLIST * ppidl) +{ + IShellLinkImpl *This = (IShellLinkImpl *)iface; + + TRACE("(%p)->(ppidl=%p)\n",This, ppidl); + + *ppidl = ILClone(This->pPidl); + + return NOERROR; +} + +static HRESULT WINAPI IShellLinkA_fnSetIDList(IShellLinkA * iface, LPCITEMIDLIST pidl) +{ + IShellLinkImpl *This = (IShellLinkImpl *)iface; + + TRACE("(%p)->(pidl=%p)\n",This, pidl); + + if (This->pPidl) + ILFree(This->pPidl); + This->pPidl = ILClone (pidl); + This->bDirty = TRUE; + + return S_OK; +} + +static HRESULT WINAPI IShellLinkA_fnGetDescription(IShellLinkA * iface, LPSTR pszName,INT cchMaxName) +{ + IShellLinkImpl *This = (IShellLinkImpl *)iface; + + TRACE("(%p)->(%p len=%u)\n",This, pszName, cchMaxName); + + if( cchMaxName ) + pszName[0] = 0; + if( This->sDescription ) + WideCharToMultiByte( CP_ACP, 0, This->sDescription, -1, + pszName, cchMaxName, NULL, NULL); + + return S_OK; +} +static HRESULT WINAPI IShellLinkA_fnSetDescription(IShellLinkA * iface, LPCSTR pszName) +{ + IShellLinkImpl *This = (IShellLinkImpl *)iface; + + TRACE("(%p)->(pName=%s)\n", This, pszName); + + HeapFree(GetProcessHeap(), 0, This->sDescription); + This->sDescription = HEAP_strdupAtoW( GetProcessHeap(), 0, pszName); + if ( !This->sDescription ) + return E_OUTOFMEMORY; + + This->bDirty = TRUE; + + return S_OK; +} + +static HRESULT WINAPI IShellLinkA_fnGetWorkingDirectory(IShellLinkA * iface, LPSTR pszDir,INT cchMaxPath) +{ + IShellLinkImpl *This = (IShellLinkImpl *)iface; + + TRACE("(%p)->(%p len=%u)\n", This, pszDir, cchMaxPath); + + if( cchMaxPath ) + pszDir[0] = 0; + if( This->sWorkDir ) + WideCharToMultiByte( CP_ACP, 0, This->sWorkDir, -1, + pszDir, cchMaxPath, NULL, NULL); + + return S_OK; +} + +static HRESULT WINAPI IShellLinkA_fnSetWorkingDirectory(IShellLinkA * iface, LPCSTR pszDir) +{ + IShellLinkImpl *This = (IShellLinkImpl *)iface; + + TRACE("(%p)->(dir=%s)\n",This, pszDir); + + HeapFree(GetProcessHeap(), 0, This->sWorkDir); + This->sWorkDir = HEAP_strdupAtoW( GetProcessHeap(), 0, pszDir); + if ( !This->sWorkDir ) + return E_OUTOFMEMORY; + + This->bDirty = TRUE; + + return S_OK; +} + +static HRESULT WINAPI IShellLinkA_fnGetArguments(IShellLinkA * iface, LPSTR pszArgs,INT cchMaxPath) +{ + IShellLinkImpl *This = (IShellLinkImpl *)iface; + + TRACE("(%p)->(%p len=%u)\n", This, pszArgs, cchMaxPath); + + if( cchMaxPath ) + pszArgs[0] = 0; + if( This->sArgs ) + WideCharToMultiByte( CP_ACP, 0, This->sArgs, -1, + pszArgs, cchMaxPath, NULL, NULL); + + return S_OK; +} + +static HRESULT WINAPI IShellLinkA_fnSetArguments(IShellLinkA * iface, LPCSTR pszArgs) +{ + IShellLinkImpl *This = (IShellLinkImpl *)iface; + + TRACE("(%p)->(args=%s)\n",This, pszArgs); + + HeapFree(GetProcessHeap(), 0, This->sArgs); + This->sArgs = HEAP_strdupAtoW( GetProcessHeap(), 0, pszArgs); + if( !This->sArgs ) + return E_OUTOFMEMORY; + + This->bDirty = TRUE; + + return S_OK; +} + +static HRESULT WINAPI IShellLinkA_fnGetHotkey(IShellLinkA * iface, WORD *pwHotkey) +{ + IShellLinkImpl *This = (IShellLinkImpl *)iface; + + TRACE("(%p)->(%p)(0x%08x)\n",This, pwHotkey, This->wHotKey); + + *pwHotkey = This->wHotKey; + + return S_OK; +} + +static HRESULT WINAPI IShellLinkA_fnSetHotkey(IShellLinkA * iface, WORD wHotkey) +{ + IShellLinkImpl *This = (IShellLinkImpl *)iface; + + TRACE("(%p)->(hotkey=%x)\n",This, wHotkey); + + This->wHotKey = wHotkey; + This->bDirty = TRUE; + + return S_OK; +} + +static HRESULT WINAPI IShellLinkA_fnGetShowCmd(IShellLinkA * iface, INT *piShowCmd) +{ + IShellLinkImpl *This = (IShellLinkImpl *)iface; + + TRACE("(%p)->(%p)\n",This, piShowCmd); + *piShowCmd = This->iShowCmd; + return S_OK; +} + +static HRESULT WINAPI IShellLinkA_fnSetShowCmd(IShellLinkA * iface, INT iShowCmd) +{ + IShellLinkImpl *This = (IShellLinkImpl *)iface; + + TRACE("(%p) %d\n",This, iShowCmd); + + This->iShowCmd = iShowCmd; + This->bDirty = TRUE; + + return NOERROR; +} + +static HRESULT SHELL_PidlGeticonLocationA(IShellFolder* psf, LPITEMIDLIST pidl, LPSTR pszIconPath, int cchIconPath, int* piIcon) +{ + LPCITEMIDLIST pidlLast; + + HRESULT hr = SHBindToParent(pidl, &IID_IShellFolder, (LPVOID*)&psf, &pidlLast); + + if (SUCCEEDED(hr)) { + IExtractIconA* pei; + + hr = IShellFolder_GetUIObjectOf(psf, 0, 1, (LPCITEMIDLIST*)&pidlLast, &IID_IExtractIconA, NULL, (LPVOID*)&pei); + + if (SUCCEEDED(hr)) { + hr = IExtractIconA_GetIconLocation(pei, 0, pszIconPath, MAX_PATH, piIcon, NULL); + + IExtractIconA_Release(pei); + } + + IShellFolder_Release(psf); + } + + return hr; +} + +static HRESULT WINAPI IShellLinkA_fnGetIconLocation(IShellLinkA * iface, LPSTR pszIconPath,INT cchIconPath,INT *piIcon) +{ + IShellLinkImpl *This = (IShellLinkImpl *)iface; + + TRACE("(%p)->(%p len=%u iicon=%p)\n", This, pszIconPath, cchIconPath, piIcon); + + if (cchIconPath) + pszIconPath[0] = 0; + + if (This->sIcoPath) { + WideCharToMultiByte(CP_ACP, 0, This->sIcoPath, -1, pszIconPath, cchIconPath, NULL, NULL); + *piIcon = This->iIcoNdx; + return S_OK; + } + + if (This->pPidl || This->sPath) { + IShellFolder* pdsk; + + HRESULT hr = SHGetDesktopFolder(&pdsk); + + if (SUCCEEDED(hr)) { + /* first look for an icon using the PIDL (if present) */ + if (This->pPidl) + hr = SHELL_PidlGeticonLocationA(pdsk, This->pPidl, pszIconPath, cchIconPath, piIcon); + else + hr = E_FAIL; + + /* if we couldn't find an icon yet, look for it using the file system path */ + if (FAILED(hr) && This->sPath) { + LPITEMIDLIST pidl; + + hr = IShellFolder_ParseDisplayName(pdsk, 0, NULL, This->sPath, NULL, &pidl, NULL); + + if (SUCCEEDED(hr)) { + hr = SHELL_PidlGeticonLocationA(pdsk, pidl, pszIconPath, cchIconPath, piIcon); + + SHFree(pidl); + } + } + + IShellFolder_Release(pdsk); + } + + return hr; + } else + return E_FAIL; +} + +static HRESULT WINAPI IShellLinkA_fnSetIconLocation(IShellLinkA * iface, LPCSTR pszIconPath,INT iIcon) +{ + IShellLinkImpl *This = (IShellLinkImpl *)iface; + + TRACE("(%p)->(path=%s iicon=%u)\n",This, pszIconPath, iIcon); + + HeapFree(GetProcessHeap(), 0, This->sIcoPath); + This->sIcoPath = HEAP_strdupAtoW(GetProcessHeap(), 0, pszIconPath); + if ( !This->sIcoPath ) + return E_OUTOFMEMORY; + + This->iIcoNdx = iIcon; + This->bDirty = TRUE; + + return S_OK; +} + +static HRESULT WINAPI IShellLinkA_fnSetRelativePath(IShellLinkA * iface, LPCSTR pszPathRel, DWORD dwReserved) +{ + IShellLinkImpl *This = (IShellLinkImpl *)iface; + + FIXME("(%p)->(path=%s %lx)\n",This, pszPathRel, dwReserved); + + HeapFree(GetProcessHeap(), 0, This->sPathRel); + This->sPathRel = HEAP_strdupAtoW(GetProcessHeap(), 0, pszPathRel); + This->bDirty = TRUE; + + return ShellLink_UpdatePath(This->sPathRel, This->sPath, This->sWorkDir, &This->sPath); +} + +static HRESULT WINAPI IShellLinkA_fnResolve(IShellLinkA * iface, HWND hwnd, DWORD fFlags) +{ + HRESULT hr = S_OK; + + IShellLinkImpl *This = (IShellLinkImpl *)iface; + + FIXME("(%p)->(hwnd=%p flags=%lx)\n",This, hwnd, fFlags); + + /*FIXME: use IResolveShellLink interface */ + + if (!This->sPath && This->pPidl) { + WCHAR buffer[MAX_PATH]; + + hr = SHELL_GetPathFromIDListW(This->pPidl, buffer, MAX_PATH); + + if (SUCCEEDED(hr) && *buffer) { + This->sPath = (LPWSTR) HeapAlloc(GetProcessHeap(), 0, (lstrlenW(buffer)+1)*sizeof(WCHAR)); + if (!This->sPath) + return E_OUTOFMEMORY; + + lstrcpyW(This->sPath, buffer); + + This->bDirty = TRUE; + } else + hr = S_OK; /* don't report an error occurred while just caching information */ + } + + if (!This->sIcoPath && This->sPath) { + This->sIcoPath = (LPWSTR) HeapAlloc(GetProcessHeap(), 0, (lstrlenW(This->sPath)+1)*sizeof(WCHAR)); + if (!This->sIcoPath) + return E_OUTOFMEMORY; + + lstrcpyW(This->sIcoPath, This->sPath); + This->iIcoNdx = 0; + + This->bDirty = TRUE; + } + + return hr; +} + +static HRESULT WINAPI IShellLinkA_fnSetPath(IShellLinkA * iface, LPCSTR pszFile) +{ + IShellLinkImpl *This = (IShellLinkImpl *)iface; + char buffer[MAX_PATH]; + LPSTR fname; + + TRACE("(%p)->(path=%s)\n",This, pszFile); + + if (!GetFullPathNameA(pszFile, MAX_PATH, buffer, &fname)) + return E_FAIL; + + HeapFree(GetProcessHeap(), 0, This->sPath); + This->sPath = HEAP_strdupAtoW(GetProcessHeap(), 0, buffer); + if( !This->sPath ) + return E_OUTOFMEMORY; + + This->bDirty = TRUE; + + return S_OK; +} + +/************************************************************************** +* IShellLink Implementation +*/ + +static IShellLinkAVtbl slvt = +{ + IShellLinkA_fnQueryInterface, + IShellLinkA_fnAddRef, + IShellLinkA_fnRelease, + IShellLinkA_fnGetPath, + IShellLinkA_fnGetIDList, + IShellLinkA_fnSetIDList, + IShellLinkA_fnGetDescription, + IShellLinkA_fnSetDescription, + IShellLinkA_fnGetWorkingDirectory, + IShellLinkA_fnSetWorkingDirectory, + IShellLinkA_fnGetArguments, + IShellLinkA_fnSetArguments, + IShellLinkA_fnGetHotkey, + IShellLinkA_fnSetHotkey, + IShellLinkA_fnGetShowCmd, + IShellLinkA_fnSetShowCmd, + IShellLinkA_fnGetIconLocation, + IShellLinkA_fnSetIconLocation, + IShellLinkA_fnSetRelativePath, + IShellLinkA_fnResolve, + IShellLinkA_fnSetPath +}; + + +/************************************************************************** + * IShellLinkW_fnQueryInterface + */ +static HRESULT WINAPI IShellLinkW_fnQueryInterface( + IShellLinkW * iface, REFIID riid, LPVOID *ppvObj) +{ + _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface); + + return IShellLinkA_QueryInterface((IShellLinkA*)This, riid, ppvObj); +} + +/****************************************************************************** + * IShellLinkW_fnAddRef + */ +static ULONG WINAPI IShellLinkW_fnAddRef(IShellLinkW * iface) +{ + _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface); + + TRACE("(%p)->(count=%lu)\n",This,This->ref); + + return IShellLinkA_AddRef((IShellLinkA*)This); +} +/****************************************************************************** + * IShellLinkW_fnRelease + */ + +static ULONG WINAPI IShellLinkW_fnRelease(IShellLinkW * iface) +{ + _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface); + + TRACE("(%p)->(count=%lu)\n",This,This->ref); + + return IShellLinkA_Release((IShellLinkA*)This); +} + +static HRESULT WINAPI IShellLinkW_fnGetPath(IShellLinkW * iface, LPWSTR pszFile,INT cchMaxPath, WIN32_FIND_DATAW *pfd, DWORD fFlags) +{ + _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface); + + TRACE("(%p)->(pfile=%p len=%u find_data=%p flags=%lu)\n", + This, pszFile, cchMaxPath, pfd, fFlags); + + if( cchMaxPath ) + pszFile[0] = 0; + if( This->sPath ) + lstrcpynW( pszFile, This->sPath, cchMaxPath ); + + if (pfd) FIXME("(%p): WIN32_FIND_DATA is not yet filled.\n", This); + + return NOERROR; +} + +static HRESULT WINAPI IShellLinkW_fnGetIDList(IShellLinkW * iface, LPITEMIDLIST * ppidl) +{ + _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface); + + TRACE("(%p)->(ppidl=%p)\n",This, ppidl); + + if( This->pPidl) + *ppidl = ILClone( This->pPidl ); + else + *ppidl = NULL; + + return S_OK; +} + +static HRESULT WINAPI IShellLinkW_fnSetIDList(IShellLinkW * iface, LPCITEMIDLIST pidl) +{ + _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface); + + TRACE("(%p)->(pidl=%p)\n",This, pidl); + + if( This->pPidl ) + ILFree( This->pPidl ); + This->pPidl = ILClone( pidl ); + if( !This->pPidl ) + return E_FAIL; + + This->bDirty = TRUE; + + return S_OK; +} + +static HRESULT WINAPI IShellLinkW_fnGetDescription(IShellLinkW * iface, LPWSTR pszName,INT cchMaxName) +{ + _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface); + + TRACE("(%p)->(%p len=%u)\n",This, pszName, cchMaxName); + + if( cchMaxName ) + pszName[0] = 0; + if( This->sDescription ) + lstrcpynW( pszName, This->sDescription, cchMaxName ); + + return S_OK; +} + +static HRESULT WINAPI IShellLinkW_fnSetDescription(IShellLinkW * iface, LPCWSTR pszName) +{ + _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface); + + TRACE("(%p)->(desc=%s)\n",This, debugstr_w(pszName)); + + HeapFree(GetProcessHeap(), 0, This->sDescription); + This->sDescription = HeapAlloc( GetProcessHeap(), 0, + (lstrlenW( pszName )+1)*sizeof(WCHAR) ); + if ( !This->sDescription ) + return E_OUTOFMEMORY; + + lstrcpyW( This->sDescription, pszName ); + This->bDirty = TRUE; + + return S_OK; +} + +static HRESULT WINAPI IShellLinkW_fnGetWorkingDirectory(IShellLinkW * iface, LPWSTR pszDir,INT cchMaxPath) +{ + _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface); + + TRACE("(%p)->(%p len %u)\n", This, pszDir, cchMaxPath); + + if( cchMaxPath ) + pszDir[0] = 0; + if( This->sWorkDir ) + lstrcpynW( pszDir, This->sWorkDir, cchMaxPath ); + + return S_OK; +} + +static HRESULT WINAPI IShellLinkW_fnSetWorkingDirectory(IShellLinkW * iface, LPCWSTR pszDir) +{ + _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface); + + TRACE("(%p)->(dir=%s)\n",This, debugstr_w(pszDir)); + + HeapFree(GetProcessHeap(), 0, This->sWorkDir); + This->sWorkDir = HeapAlloc( GetProcessHeap(), 0, + (lstrlenW( pszDir )+1)*sizeof (WCHAR) ); + if ( !This->sWorkDir ) + return E_OUTOFMEMORY; + lstrcpyW( This->sWorkDir, pszDir ); + This->bDirty = TRUE; + + return S_OK; +} + +static HRESULT WINAPI IShellLinkW_fnGetArguments(IShellLinkW * iface, LPWSTR pszArgs,INT cchMaxPath) +{ + _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface); + + TRACE("(%p)->(%p len=%u)\n", This, pszArgs, cchMaxPath); + + if( cchMaxPath ) + pszArgs[0] = 0; + if( This->sArgs ) + lstrcpynW( pszArgs, This->sArgs, cchMaxPath ); + + return NOERROR; +} + +static HRESULT WINAPI IShellLinkW_fnSetArguments(IShellLinkW * iface, LPCWSTR pszArgs) +{ + _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface); + + TRACE("(%p)->(args=%s)\n",This, debugstr_w(pszArgs)); + + HeapFree(GetProcessHeap(), 0, This->sArgs); + This->sArgs = HeapAlloc( GetProcessHeap(), 0, + (lstrlenW( pszArgs )+1)*sizeof (WCHAR) ); + if ( !This->sArgs ) + return E_OUTOFMEMORY; + lstrcpyW( This->sArgs, pszArgs ); + This->bDirty = TRUE; + + return S_OK; +} + +static HRESULT WINAPI IShellLinkW_fnGetHotkey(IShellLinkW * iface, WORD *pwHotkey) +{ + _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface); + + TRACE("(%p)->(%p)\n",This, pwHotkey); + + *pwHotkey=This->wHotKey; + + return S_OK; +} + +static HRESULT WINAPI IShellLinkW_fnSetHotkey(IShellLinkW * iface, WORD wHotkey) +{ + _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface); + + TRACE("(%p)->(hotkey=%x)\n",This, wHotkey); + + This->wHotKey = wHotkey; + This->bDirty = TRUE; + + return S_OK; +} + +static HRESULT WINAPI IShellLinkW_fnGetShowCmd(IShellLinkW * iface, INT *piShowCmd) +{ + _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface); + + TRACE("(%p)->(%p)\n",This, piShowCmd); + + *piShowCmd = This->iShowCmd; + + return S_OK; +} + +static HRESULT WINAPI IShellLinkW_fnSetShowCmd(IShellLinkW * iface, INT iShowCmd) +{ + _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface); + + This->iShowCmd = iShowCmd; + This->bDirty = TRUE; + + return S_OK; +} + +static HRESULT SHELL_PidlGeticonLocationW(IShellFolder* psf, LPITEMIDLIST pidl, LPWSTR pszIconPath, int cchIconPath, int* piIcon) +{ + LPCITEMIDLIST pidlLast; + + HRESULT hr = SHBindToParent(pidl, &IID_IShellFolder, (LPVOID*)&psf, &pidlLast); + + if (SUCCEEDED(hr)) { + IExtractIconW* pei; + + hr = IShellFolder_GetUIObjectOf(psf, 0, 1, (LPCITEMIDLIST*)&pidlLast, &IID_IExtractIconW, NULL, (LPVOID*)&pei); + + if (SUCCEEDED(hr)) { + hr = IExtractIconW_GetIconLocation(pei, 0, pszIconPath, MAX_PATH, piIcon, NULL); + + IExtractIconW_Release(pei); + } + + IShellFolder_Release(psf); + } + + return hr; +} + +static HRESULT WINAPI IShellLinkW_fnGetIconLocation(IShellLinkW * iface, LPWSTR pszIconPath,INT cchIconPath,INT *piIcon) +{ + _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface); + + TRACE("(%p)->(%p len=%u iicon=%p)\n", This, pszIconPath, cchIconPath, piIcon); + + if (cchIconPath) + pszIconPath[0] = 0; + + if (This->sIcoPath) { + lstrcpynW(pszIconPath, This->sIcoPath, cchIconPath); + *piIcon = This->iIcoNdx; + return S_OK; + } + + if (This->pPidl || This->sPath) { + IShellFolder* pdsk; + + HRESULT hr = SHGetDesktopFolder(&pdsk); + + if (SUCCEEDED(hr)) { + /* first look for an icon using the PIDL (if present) */ + if (This->pPidl) + hr = SHELL_PidlGeticonLocationW(pdsk, This->pPidl, pszIconPath, cchIconPath, piIcon); + else + hr = E_FAIL; + + /* if we couldn't find an icon yet, look for it using the file system path */ + if (FAILED(hr) && This->sPath) { + LPITEMIDLIST pidl; + + hr = IShellFolder_ParseDisplayName(pdsk, 0, NULL, This->sPath, NULL, &pidl, NULL); + + if (SUCCEEDED(hr)) { + hr = SHELL_PidlGeticonLocationW(pdsk, pidl, pszIconPath, cchIconPath, piIcon); + + SHFree(pidl); + } + } + + IShellFolder_Release(pdsk); + } + + return hr; + } else + return E_FAIL; +} + +static HRESULT WINAPI IShellLinkW_fnSetIconLocation(IShellLinkW * iface, LPCWSTR pszIconPath,INT iIcon) +{ + _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface); + + TRACE("(%p)->(path=%s iicon=%u)\n",This, debugstr_w(pszIconPath), iIcon); + + HeapFree(GetProcessHeap(), 0, This->sIcoPath); + This->sIcoPath = HeapAlloc( GetProcessHeap(), 0, + (lstrlenW( pszIconPath )+1)*sizeof (WCHAR) ); + if ( !This->sIcoPath ) + return E_OUTOFMEMORY; + lstrcpyW( This->sIcoPath, pszIconPath ); + + This->iIcoNdx = iIcon; + This->bDirty = TRUE; + + return S_OK; +} + +static HRESULT WINAPI IShellLinkW_fnSetRelativePath(IShellLinkW * iface, LPCWSTR pszPathRel, DWORD dwReserved) +{ + _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface); + + TRACE("(%p)->(path=%s %lx)\n",This, debugstr_w(pszPathRel), dwReserved); + + HeapFree(GetProcessHeap(), 0, This->sPathRel); + This->sPathRel = HeapAlloc( GetProcessHeap(), 0, + (lstrlenW( pszPathRel )+1) * sizeof (WCHAR) ); + if ( !This->sPathRel ) + return E_OUTOFMEMORY; + lstrcpyW( This->sPathRel, pszPathRel ); + This->bDirty = TRUE; + + return ShellLink_UpdatePath(This->sPathRel, This->sPath, This->sWorkDir, &This->sPath); +} + +static HRESULT WINAPI IShellLinkW_fnResolve(IShellLinkW * iface, HWND hwnd, DWORD fFlags) +{ + HRESULT hr = S_OK; + + _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface); + + FIXME("(%p)->(hwnd=%p flags=%lx)\n",This, hwnd, fFlags); + + /*FIXME: use IResolveShellLink interface */ + + if (!This->sPath && This->pPidl) { + WCHAR buffer[MAX_PATH]; + + hr = SHELL_GetPathFromIDListW(This->pPidl, buffer, MAX_PATH); + + if (SUCCEEDED(hr) && *buffer) { + This->sPath = (LPWSTR) HeapAlloc(GetProcessHeap(), 0, (lstrlenW(buffer)+1)*sizeof(WCHAR)); + if (!This->sPath) + return E_OUTOFMEMORY; + + lstrcpyW(This->sPath, buffer); + + This->bDirty = TRUE; + } else + hr = S_OK; /* don't report an error occurred while just caching information */ + } + + if (!This->sIcoPath && This->sPath) { + This->sIcoPath = (LPWSTR) HeapAlloc(GetProcessHeap(), 0, (lstrlenW(This->sPath)+1)*sizeof(WCHAR)); + if (!This->sIcoPath) + return E_OUTOFMEMORY; + + lstrcpyW(This->sIcoPath, This->sPath); + This->iIcoNdx = 0; + + This->bDirty = TRUE; + } + + return hr; +} + +static HRESULT WINAPI IShellLinkW_fnSetPath(IShellLinkW * iface, LPCWSTR pszFile) +{ + _ICOM_THIS_From_IShellLinkW(IShellLinkImpl, iface); + WCHAR buffer[MAX_PATH]; + LPWSTR fname; + + TRACE("(%p)->(path=%s)\n",This, debugstr_w(pszFile)); + + if (!GetFullPathNameW(pszFile, MAX_PATH, buffer, &fname)) + return E_FAIL; + + HeapFree(GetProcessHeap(), 0, This->sPath); + This->sPath = HeapAlloc( GetProcessHeap(), 0, + (lstrlenW( buffer )+1) * sizeof (WCHAR) ); + if (!This->sPath) + return E_OUTOFMEMORY; + + lstrcpyW(This->sPath, buffer); + This->bDirty = TRUE; + + return S_OK; +} + +/************************************************************************** +* IShellLinkW Implementation +*/ + +static IShellLinkWVtbl slvtw = +{ + IShellLinkW_fnQueryInterface, + IShellLinkW_fnAddRef, + IShellLinkW_fnRelease, + IShellLinkW_fnGetPath, + IShellLinkW_fnGetIDList, + IShellLinkW_fnSetIDList, + IShellLinkW_fnGetDescription, + IShellLinkW_fnSetDescription, + IShellLinkW_fnGetWorkingDirectory, + IShellLinkW_fnSetWorkingDirectory, + IShellLinkW_fnGetArguments, + IShellLinkW_fnSetArguments, + IShellLinkW_fnGetHotkey, + IShellLinkW_fnSetHotkey, + IShellLinkW_fnGetShowCmd, + IShellLinkW_fnSetShowCmd, + IShellLinkW_fnGetIconLocation, + IShellLinkW_fnSetIconLocation, + IShellLinkW_fnSetRelativePath, + IShellLinkW_fnResolve, + IShellLinkW_fnSetPath +}; diff --git a/reactos/lib/shell32/shellole.c b/reactos/lib/shell32/shellole.c index 58bb9ab3566..0167b16dc2f 100644 --- a/reactos/lib/shell32/shellole.c +++ b/reactos/lib/shell32/shellole.c @@ -1,802 +1,802 @@ -/* - * handling of SHELL32.DLL OLE-Objects - * - * Copyright 1997 Marcus Meissner - * Copyright 1998 Juergen Schmied - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include "config.h" - -#include -#include -#include - -#define COBJMACROS - -#include "windef.h" -#include "winbase.h" -#include "shellapi.h" -#include "wingdi.h" -#include "winuser.h" -#include "shlobj.h" -#include "shlguid.h" -#include "winreg.h" -#include "winerror.h" - -#include "undocshell.h" -#include "wine/unicode.h" -#include "shell32_main.h" - -#include "wine/debug.h" -#include "shlwapi.h" -#include "debughlp.h" - -WINE_DEFAULT_DEBUG_CHANNEL(shell); - -extern HRESULT WINAPI IFSFolder_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv); - -const WCHAR sShell32[12] = {'S','H','E','L','L','3','2','.','D','L','L','\0'}; -const WCHAR sOLE32[10] = {'O','L','E','3','2','.','D','L','L','\0'}; - -HINSTANCE hShellOle32 = 0; -/************************************************************************** - * Default ClassFactory types - */ -typedef HRESULT (CALLBACK *LPFNCREATEINSTANCE)(IUnknown* pUnkOuter, REFIID riid, LPVOID* ppvObject); -IClassFactory * IDefClF_fnConstructor(LPFNCREATEINSTANCE lpfnCI, PLONG pcRefDll, REFIID riidInst); - -/* this table contains all CLSID's of shell32 objects */ -struct { - REFIID riid; - LPFNCREATEINSTANCE lpfnCI; -} InterfaceTable[] = { - {&CLSID_ShellFSFolder, &IFSFolder_Constructor}, - {&CLSID_MyComputer, &ISF_MyComputer_Constructor}, - {&CLSID_ShellDesktop, &ISF_Desktop_Constructor}, - {&CLSID_ShellLink, &IShellLink_Constructor}, - {&CLSID_DragDropHelper, &IDropTargetHelper_Constructor}, - {&CLSID_ControlPanel, &IControlPanel_Constructor}, - {&CLSID_AutoComplete, &IAutoComplete_Constructor}, - {NULL,NULL} -}; - -/************************************************************************* - * SHCoCreateInstance [SHELL32.102] - * - * NOTES - * exported by ordinal - */ - -/* FIXME: this should be SHLWAPI.24 since we can't yet import by ordinal */ - -DWORD WINAPI __SHGUIDToStringW (REFGUID guid, LPWSTR str) -{ - WCHAR sFormat[52] = {'{','%','0','8','l','x','-','%','0','4', - 'x','-','%','0','4','x','-','%','0','2', - 'x','%','0','2','x','-','%','0','2','x', - '%','0','2','x','%','0','2','x','%','0', - '2','x','%','0','2','x','%','0','2','x', - '}','\0'}; - - return wsprintfW ( str, sFormat, - guid->Data1, guid->Data2, guid->Data3, - guid->Data4[0], guid->Data4[1], guid->Data4[2], guid->Data4[3], - guid->Data4[4], guid->Data4[5], guid->Data4[6], guid->Data4[7] ); - -} - -/************************************************************************/ - -HRESULT WINAPI SHCoCreateInstance( - LPCWSTR aclsid, - const CLSID *clsid, - LPUNKNOWN pUnkOuter, - REFIID refiid, - LPVOID *ppv) -{ - DWORD hres; - IID iid; - CLSID * myclsid = (CLSID*)clsid; - WCHAR sKeyName[MAX_PATH]; - const WCHAR sCLSID[7] = {'C','L','S','I','D','\\','\0'}; - WCHAR sClassID[60]; - const WCHAR sInProcServer32[16] ={'\\','I','n','p','r','o','c','S','e','r','v','e','r','3','2','\0'}; - const WCHAR sLoadWithoutCOM[15] ={'L','o','a','d','W','i','t','h','o','u','t','C','O','M','\0'}; - WCHAR sDllPath[MAX_PATH]; - HKEY hKey; - DWORD dwSize; - BOOLEAN bLoadFromShell32 = FALSE; - BOOLEAN bLoadWithoutCOM = FALSE; - IClassFactory * pcf = NULL; - - if(!ppv) return E_POINTER; - *ppv=NULL; - - /* if the clsid is a string, convert it */ - if (!clsid) - { - if (!aclsid) return REGDB_E_CLASSNOTREG; - SHCLSIDFromStringW(aclsid, &iid); - myclsid = &iid; - } - - TRACE("(%p,%s,unk:%p,%s,%p)\n", - aclsid,shdebugstr_guid(myclsid),pUnkOuter,shdebugstr_guid(refiid),ppv); - - /* we look up the dll path in the registry */ - __SHGUIDToStringW(myclsid, sClassID); - lstrcpyW(sKeyName, sCLSID); - lstrcatW(sKeyName, sClassID); - lstrcatW(sKeyName, sInProcServer32); - - if (ERROR_SUCCESS == RegOpenKeyExW(HKEY_CLASSES_ROOT, sKeyName, 0, KEY_READ, &hKey)) { - dwSize = sizeof(sDllPath); - SHQueryValueExW(hKey, NULL, 0,0, sDllPath, &dwSize ); - - /* if a special registry key is set, we load a shell extension without help of OLE32 */ - bLoadWithoutCOM = (ERROR_SUCCESS == SHQueryValueExW(hKey, sLoadWithoutCOM, 0, 0, 0, 0)); - - /* if the com object is inside shell32, omit use of ole32 */ - bLoadFromShell32 = (0==lstrcmpiW( PathFindFileNameW(sDllPath), sShell32)); - - RegCloseKey (hKey); - } else { - /* since we can't find it in the registry we try internally */ - bLoadFromShell32 = TRUE; - } - - TRACE("WithoutCom=%u FromShell=%u\n", bLoadWithoutCOM, bLoadFromShell32); - - /* now we create a instance */ - if (bLoadFromShell32) { - if (! SUCCEEDED(SHELL32_DllGetClassObject(myclsid, &IID_IClassFactory,(LPVOID*)&pcf))) { - ERR("LoadFromShell failed for CLSID=%s\n", shdebugstr_guid(myclsid)); - } - } else if (bLoadWithoutCOM) { - - /* load a external dll without ole32 */ - HANDLE hLibrary; - typedef HRESULT (CALLBACK *DllGetClassObjectFunc)(REFCLSID clsid, REFIID iid, LPVOID *ppv); - DllGetClassObjectFunc DllGetClassObject; - - if ((hLibrary = LoadLibraryExW(sDllPath, 0, LOAD_WITH_ALTERED_SEARCH_PATH)) == 0) { - ERR("couldn't load InprocServer32 dll %s\n", debugstr_w(sDllPath)); - hres = E_ACCESSDENIED; - goto end; - } else if (!(DllGetClassObject = (DllGetClassObjectFunc)GetProcAddress(hLibrary, "DllGetClassObject"))) { - ERR("couldn't find function DllGetClassObject in %s\n", debugstr_w(sDllPath)); - FreeLibrary( hLibrary ); - hres = E_ACCESSDENIED; - goto end; - } else if (! SUCCEEDED(hres = DllGetClassObject(myclsid, &IID_IClassFactory, (LPVOID*)&pcf))) { - TRACE("GetClassObject failed 0x%08lx\n", hres); - goto end; - } - - } else { - - /* load a external dll in the usual way */ - hres = CoCreateInstance(myclsid, pUnkOuter, CLSCTX_INPROC_SERVER, refiid, ppv); - goto end; - } - - /* here we should have a ClassFactory */ - if (!pcf) return E_ACCESSDENIED; - - hres = IClassFactory_CreateInstance(pcf, pUnkOuter, refiid, ppv); - IClassFactory_Release(pcf); -end: - if(hres!=S_OK) - { - ERR("failed (0x%08lx) to create CLSID:%s IID:%s\n", - hres, shdebugstr_guid(myclsid), shdebugstr_guid(refiid)); - ERR("class not found in registry\n"); - } - - TRACE("-- instance: %p\n",*ppv); - return hres; -} - -/************************************************************************* - * DllGetClassObject [SHELL32.128] - */ -HRESULT WINAPI SHELL32_DllGetClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv) -{ - HRESULT hres = E_OUTOFMEMORY; - IClassFactory * pcf = NULL; - int i; - - TRACE("CLSID:%s,IID:%s\n",shdebugstr_guid(rclsid),shdebugstr_guid(iid)); - - if (!ppv) return E_INVALIDARG; - *ppv = NULL; - - /* search our internal interface table */ - for(i=0;InterfaceTable[i].riid;i++) { - if(IsEqualIID(InterfaceTable[i].riid, rclsid)) { - TRACE("index[%u]\n", i); - pcf = IDefClF_fnConstructor(InterfaceTable[i].lpfnCI, NULL, NULL); - } - } - - if (!pcf) { - FIXME("failed for CLSID=%s\n", shdebugstr_guid(rclsid)); - return CLASS_E_CLASSNOTAVAILABLE; - } - - hres = IClassFactory_QueryInterface(pcf, iid, ppv); - IClassFactory_Release(pcf); - - TRACE("-- pointer to class factory: %p\n",*ppv); - return hres; -} - -/************************************************************************* - * SHCLSIDFromString [SHELL32.147] - * - * NOTES - * exported by ordinal - */ -DWORD WINAPI SHCLSIDFromStringA (LPCSTR clsid, CLSID *id) -{ - WCHAR buffer[40]; - TRACE("(%p(%s) %p)\n", clsid, clsid, id); - if (!MultiByteToWideChar( CP_ACP, 0, clsid, -1, buffer, sizeof(buffer)/sizeof(WCHAR) )) - return CO_E_CLASSSTRING; - return CLSIDFromString( buffer, id ); -} -DWORD WINAPI SHCLSIDFromStringW (LPCWSTR clsid, CLSID *id) -{ - TRACE("(%p(%s) %p)\n", clsid, debugstr_w(clsid), id); - return CLSIDFromString((LPWSTR)clsid, id); -} -DWORD WINAPI SHCLSIDFromStringAW (LPVOID clsid, CLSID *id) -{ - if (SHELL_OsIsUnicode()) - return SHCLSIDFromStringW (clsid, id); - return SHCLSIDFromStringA (clsid, id); -} - -/************************************************************************* - * Shell Memory Allocator - */ - -/* set the vtable later */ -static IMallocVtbl VT_Shell_IMalloc32; - -/* this is the static object instance */ -typedef struct { - IMallocVtbl *lpVtbl; - DWORD dummy; -} _ShellMalloc; - -static _ShellMalloc Shell_Malloc = { &VT_Shell_IMalloc32,1}; - -/* this is the global allocator of shell32 */ -static IMalloc * ShellTaskAllocator = NULL; - -/****************************************************************************** - * IShellMalloc_QueryInterface [VTABLE] - */ -static HRESULT WINAPI IShellMalloc_fnQueryInterface(LPMALLOC iface, REFIID refiid, LPVOID *obj) -{ - TRACE("(%s,%p)\n",shdebugstr_guid(refiid),obj); - if (IsEqualIID(refiid, &IID_IUnknown) || IsEqualIID(refiid, &IID_IMalloc)) { - *obj = (LPMALLOC) &Shell_Malloc; - return S_OK; - } - return E_NOINTERFACE; -} - -/****************************************************************************** - * IShellMalloc_AddRefRelease [VTABLE] - */ -static ULONG WINAPI IShellMalloc_fnAddRefRelease(LPMALLOC iface) -{ - return 1; -} - -/****************************************************************************** - * IShellMalloc_Alloc [VTABLE] - */ -static LPVOID WINAPI IShellMalloc_fnAlloc(LPMALLOC iface, DWORD cb) -{ - LPVOID addr; - - addr = (LPVOID) LocalAlloc(GMEM_ZEROINIT, cb); - TRACE("(%p,%ld);\n",addr,cb); - return addr; -} - -/****************************************************************************** - * IShellMalloc_Realloc [VTABLE] - */ -static LPVOID WINAPI IShellMalloc_fnRealloc(LPMALLOC iface, LPVOID pv, DWORD cb) -{ - LPVOID addr; - - if (pv) { - if (cb) { - addr = (LPVOID) LocalReAlloc((HANDLE) pv, cb, GMEM_ZEROINIT | GMEM_MOVEABLE); - } else { - LocalFree((HANDLE) pv); - addr = NULL; - } - } else { - if (cb) { - addr = (LPVOID) LocalAlloc(GMEM_ZEROINIT, cb); - } else { - addr = NULL; - } - } - - TRACE("(%p->%p,%ld)\n",pv,addr,cb); - return addr; -} - -/****************************************************************************** - * IShellMalloc_Free [VTABLE] - */ -static VOID WINAPI IShellMalloc_fnFree(LPMALLOC iface, LPVOID pv) -{ - TRACE("(%p)\n",pv); - LocalFree((HANDLE) pv); -} - -/****************************************************************************** - * IShellMalloc_GetSize [VTABLE] - */ -static DWORD WINAPI IShellMalloc_fnGetSize(LPMALLOC iface, LPVOID pv) -{ - DWORD cb = (DWORD) LocalSize((HANDLE)pv); - TRACE("(%p,%ld)\n", pv, cb); - return cb; -} - -/****************************************************************************** - * IShellMalloc_DidAlloc [VTABLE] - */ -static INT WINAPI IShellMalloc_fnDidAlloc(LPMALLOC iface, LPVOID pv) -{ - TRACE("(%p)\n",pv); - return -1; -} - -/****************************************************************************** - * IShellMalloc_HeapMinimize [VTABLE] - */ -static VOID WINAPI IShellMalloc_fnHeapMinimize(LPMALLOC iface) -{ - TRACE("()\n"); -} - -static IMallocVtbl VT_Shell_IMalloc32 = -{ - IShellMalloc_fnQueryInterface, - IShellMalloc_fnAddRefRelease, - IShellMalloc_fnAddRefRelease, - IShellMalloc_fnAlloc, - IShellMalloc_fnRealloc, - IShellMalloc_fnFree, - IShellMalloc_fnGetSize, - IShellMalloc_fnDidAlloc, - IShellMalloc_fnHeapMinimize -}; - -/************************************************************************* - * SHGetMalloc [SHELL32.@] - * - * Return the shell IMalloc interface. - * - * PARAMS - * lpmal [O] Destination for IMalloc interface. - * - * RETURNS - * Success: S_OK. lpmal contains the shells IMalloc interface. - * Failure. An HRESULT error code. - * - * NOTES - * This function will use CoGetMalloc() if OLE32.DLL is already loaded. - * If not it uses an internal implementation as a fallback. - */ -HRESULT WINAPI SHGetMalloc(LPMALLOC *lpmal) -{ - TRACE("(%p)\n", lpmal); - - if (!ShellTaskAllocator) - { - HMODULE hOle32 = GetModuleHandleA("OLE32.DLL"); - /* this is very suspect. we should not being using a different - * allocator from deallocator based on something undeterministic - * like whether ole32 is loaded. as it happens currently, they - * both map to the same allocator deep down, but this could - * change in the future. */ - if(hOle32) { - CoGetMalloc(MEMCTX_TASK, &ShellTaskAllocator); - TRACE("got ole32 IMalloc\n"); - } - if(!ShellTaskAllocator) { - ShellTaskAllocator = (IMalloc* ) &Shell_Malloc; - TRACE("use fallback allocator\n"); - } - } - *lpmal = ShellTaskAllocator; - return S_OK; -} - -/************************************************************************* - * SHAlloc [SHELL32.196] - * - * NOTES - * exported by ordinal - */ -LPVOID WINAPI SHAlloc(DWORD len) -{ - IMalloc * ppv; - LPBYTE ret; - - if (!ShellTaskAllocator) SHGetMalloc(&ppv); - - ret = (LPVOID) IMalloc_Alloc(ShellTaskAllocator, len); - TRACE("%lu bytes at %p\n",len, ret); - return (LPVOID)ret; -} - -/************************************************************************* - * SHFree [SHELL32.195] - * - * NOTES - * exported by ordinal - */ -void WINAPI SHFree(LPVOID pv) -{ - IMalloc * ppv; - - TRACE("%p\n",pv); - if (!ShellTaskAllocator) SHGetMalloc(&ppv); - IMalloc_Free(ShellTaskAllocator, pv); -} - -/************************************************************************* - * SHGetDesktopFolder [SHELL32.@] - */ -HRESULT WINAPI SHGetDesktopFolder(IShellFolder **psf) -{ - HRESULT hres = S_OK; - TRACE("\n"); - - if(!psf) return E_INVALIDARG; - *psf = NULL; - hres = ISF_Desktop_Constructor(NULL, &IID_IShellFolder,(LPVOID*)psf); - - TRACE("-- %p->(%p)\n",psf, *psf); - return hres; -} -/************************************************************************** - * Default ClassFactory Implementation - * - * SHCreateDefClassObject - * - * NOTES - * helper function for dll's without a own classfactory - * a generic classfactory is returned - * when the CreateInstance of the cf is called the callback is executed - */ - -typedef struct -{ - IClassFactoryVtbl *lpVtbl; - DWORD ref; - CLSID *rclsid; - LPFNCREATEINSTANCE lpfnCI; - const IID * riidInst; - ULONG * pcRefDll; /* pointer to refcounter in external dll (ugrrr...) */ -} IDefClFImpl; - -static IClassFactoryVtbl dclfvt; - -/************************************************************************** - * IDefClF_fnConstructor - */ - -IClassFactory * IDefClF_fnConstructor(LPFNCREATEINSTANCE lpfnCI, PLONG pcRefDll, REFIID riidInst) -{ - IDefClFImpl* lpclf; - - lpclf = (IDefClFImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IDefClFImpl)); - lpclf->ref = 1; - lpclf->lpVtbl = &dclfvt; - lpclf->lpfnCI = lpfnCI; - lpclf->pcRefDll = pcRefDll; - - if (pcRefDll) InterlockedIncrement(pcRefDll); - lpclf->riidInst = riidInst; - - TRACE("(%p)%s\n",lpclf, shdebugstr_guid(riidInst)); - return (LPCLASSFACTORY)lpclf; -} -/************************************************************************** - * IDefClF_fnQueryInterface - */ -static HRESULT WINAPI IDefClF_fnQueryInterface( - LPCLASSFACTORY iface, REFIID riid, LPVOID *ppvObj) -{ - IDefClFImpl *This = (IDefClFImpl *)iface; - - TRACE("(%p)->(%s)\n",This,shdebugstr_guid(riid)); - - *ppvObj = NULL; - - if(IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IClassFactory)) { - *ppvObj = This; - InterlockedIncrement(&This->ref); - return S_OK; - } - - TRACE("-- E_NOINTERFACE\n"); - return E_NOINTERFACE; -} -/****************************************************************************** - * IDefClF_fnAddRef - */ -static ULONG WINAPI IDefClF_fnAddRef(LPCLASSFACTORY iface) -{ - IDefClFImpl *This = (IDefClFImpl *)iface; - TRACE("(%p)->(count=%lu)\n",This,This->ref); - - return InterlockedIncrement(&This->ref); -} -/****************************************************************************** - * IDefClF_fnRelease - */ -static ULONG WINAPI IDefClF_fnRelease(LPCLASSFACTORY iface) -{ - IDefClFImpl *This = (IDefClFImpl *)iface; - TRACE("(%p)->(count=%lu)\n",This,This->ref); - - if (!InterlockedDecrement(&This->ref)) - { - if (This->pcRefDll) InterlockedDecrement(This->pcRefDll); - - TRACE("-- destroying IClassFactory(%p)\n",This); - HeapFree(GetProcessHeap(),0,This); - return 0; - } - return This->ref; -} -/****************************************************************************** - * IDefClF_fnCreateInstance - */ -static HRESULT WINAPI IDefClF_fnCreateInstance( - LPCLASSFACTORY iface, LPUNKNOWN pUnkOuter, REFIID riid, LPVOID *ppvObject) -{ - IDefClFImpl *This = (IDefClFImpl *)iface; - - TRACE("%p->(%p,%s,%p)\n",This,pUnkOuter,shdebugstr_guid(riid),ppvObject); - - *ppvObject = NULL; - - if ( This->riidInst==NULL || - IsEqualCLSID(riid, This->riidInst) || - IsEqualCLSID(riid, &IID_IUnknown) ) - { - return This->lpfnCI(pUnkOuter, riid, ppvObject); - } - - ERR("unknown IID requested %s\n",shdebugstr_guid(riid)); - return E_NOINTERFACE; -} -/****************************************************************************** - * IDefClF_fnLockServer - */ -static HRESULT WINAPI IDefClF_fnLockServer(LPCLASSFACTORY iface, BOOL fLock) -{ - IDefClFImpl *This = (IDefClFImpl *)iface; - TRACE("%p->(0x%x), not implemented\n",This, fLock); - return E_NOTIMPL; -} - -static IClassFactoryVtbl dclfvt = -{ - IDefClF_fnQueryInterface, - IDefClF_fnAddRef, - IDefClF_fnRelease, - IDefClF_fnCreateInstance, - IDefClF_fnLockServer -}; - -/****************************************************************************** - * SHCreateDefClassObject [SHELL32.70] - */ -HRESULT WINAPI SHCreateDefClassObject( - REFIID riid, - LPVOID* ppv, - LPFNCREATEINSTANCE lpfnCI, /* [in] create instance callback entry */ - LPDWORD pcRefDll, /* [in/out] ref count of the dll */ - REFIID riidInst) /* [in] optional interface to the instance */ -{ - IClassFactory * pcf; - - TRACE("%s %p %p %p %s\n", - shdebugstr_guid(riid), ppv, lpfnCI, pcRefDll, shdebugstr_guid(riidInst)); - - if (! IsEqualCLSID(riid, &IID_IClassFactory) ) return E_NOINTERFACE; - if (! (pcf = IDefClF_fnConstructor(lpfnCI, pcRefDll, riidInst))) return E_OUTOFMEMORY; - *ppv = pcf; - return NOERROR; -} - -/************************************************************************* - * DragAcceptFiles [SHELL32.54] - */ -void WINAPI DragAcceptFiles(HWND hWnd, BOOL b) -{ - LONG exstyle; - - if( !IsWindow(hWnd) ) return; - exstyle = GetWindowLongA(hWnd,GWL_EXSTYLE); - if (b) - exstyle |= WS_EX_ACCEPTFILES; - else - exstyle &= ~WS_EX_ACCEPTFILES; - SetWindowLongA(hWnd,GWL_EXSTYLE,exstyle); -} - -/************************************************************************* - * DragFinish [SHELL32.80] - */ -void WINAPI DragFinish(HDROP h) -{ - TRACE("\n"); - GlobalFree((HGLOBAL)h); -} - -/************************************************************************* - * DragQueryPoint [SHELL32.135] - */ -BOOL WINAPI DragQueryPoint(HDROP hDrop, POINT *p) -{ - DROPFILES *lpDropFileStruct; - BOOL bRet; - - TRACE("\n"); - - lpDropFileStruct = (DROPFILES *) GlobalLock(hDrop); - - *p = lpDropFileStruct->pt; - bRet = lpDropFileStruct->fNC; - - GlobalUnlock(hDrop); - return bRet; -} - -/************************************************************************* - * DragQueryFile [SHELL32.81] - * DragQueryFileA [SHELL32.82] - */ -UINT WINAPI DragQueryFileA( - HDROP hDrop, - UINT lFile, - LPSTR lpszFile, - UINT lLength) -{ - LPSTR lpDrop; - UINT i = 0; - DROPFILES *lpDropFileStruct = (DROPFILES *) GlobalLock(hDrop); - - TRACE("(%p, %x, %p, %u)\n", hDrop,lFile,lpszFile,lLength); - - if(!lpDropFileStruct) goto end; - - lpDrop = (LPSTR) lpDropFileStruct + lpDropFileStruct->pFiles; - - if(lpDropFileStruct->fWide) { - LPWSTR lpszFileW = NULL; - - if(lpszFile) { - lpszFileW = (LPWSTR) HeapAlloc(GetProcessHeap(), 0, lLength*sizeof(WCHAR)); - if(lpszFileW == NULL) { - goto end; - } - } - i = DragQueryFileW(hDrop, lFile, lpszFileW, lLength); - - if(lpszFileW) { - WideCharToMultiByte(CP_ACP, 0, lpszFileW, -1, lpszFile, lLength, 0, NULL); - HeapFree(GetProcessHeap(), 0, lpszFileW); - } - goto end; - } - - while (i++ < lFile) - { - while (*lpDrop++); /* skip filename */ - if (!*lpDrop) - { - i = (lFile == 0xFFFFFFFF) ? i : 0; - goto end; - } - } - - i = strlen(lpDrop); - i++; - if (!lpszFile ) goto end; /* needed buffer size */ - i = (lLength > i) ? i : lLength; - lstrcpynA (lpszFile, lpDrop, i); -end: - GlobalUnlock(hDrop); - return i; -} - -/************************************************************************* - * DragQueryFileW [SHELL32.133] - */ -UINT WINAPI DragQueryFileW( - HDROP hDrop, - UINT lFile, - LPWSTR lpszwFile, - UINT lLength) -{ - LPWSTR lpwDrop; - UINT i = 0; - DROPFILES *lpDropFileStruct = (DROPFILES *) GlobalLock(hDrop); - - TRACE("(%p, %x, %p, %u)\n", hDrop,lFile,lpszwFile,lLength); - - if(!lpDropFileStruct) goto end; - - lpwDrop = (LPWSTR) ((LPSTR)lpDropFileStruct + lpDropFileStruct->pFiles); - - if(lpDropFileStruct->fWide == FALSE) { - LPSTR lpszFileA = NULL; - - if(lpszwFile) { - lpszFileA = (LPSTR) HeapAlloc(GetProcessHeap(), 0, lLength); - if(lpszFileA == NULL) { - goto end; - } - } - i = DragQueryFileA(hDrop, lFile, lpszFileA, lLength); - - if(lpszFileA) { - MultiByteToWideChar(CP_ACP, 0, lpszFileA, -1, lpszwFile, lLength); - HeapFree(GetProcessHeap(), 0, lpszFileA); - } - goto end; - } - - i = 0; - while (i++ < lFile) - { - while (*lpwDrop++); /* skip filename */ - if (!*lpwDrop) - { - i = (lFile == 0xFFFFFFFF) ? i : 0; - goto end; - } - } - - i = strlenW(lpwDrop); - i++; - if ( !lpszwFile) goto end; /* needed buffer size */ - - i = (lLength > i) ? i : lLength; - lstrcpynW (lpszwFile, lpwDrop, i); -end: - GlobalUnlock(hDrop); - return i; -} +/* + * handling of SHELL32.DLL OLE-Objects + * + * Copyright 1997 Marcus Meissner + * Copyright 1998 Juergen Schmied + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" + +#include +#include +#include + +#define COBJMACROS + +#include "windef.h" +#include "winbase.h" +#include "shellapi.h" +#include "wingdi.h" +#include "winuser.h" +#include "shlobj.h" +#include "shlguid.h" +#include "winreg.h" +#include "winerror.h" + +#include "undocshell.h" +#include "wine/unicode.h" +#include "shell32_main.h" + +#include "wine/debug.h" +#include "shlwapi.h" +#include "debughlp.h" + +WINE_DEFAULT_DEBUG_CHANNEL(shell); + +extern HRESULT WINAPI IFSFolder_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv); + +const WCHAR sShell32[12] = {'S','H','E','L','L','3','2','.','D','L','L','\0'}; +const WCHAR sOLE32[10] = {'O','L','E','3','2','.','D','L','L','\0'}; + +HINSTANCE hShellOle32 = 0; +/************************************************************************** + * Default ClassFactory types + */ +typedef HRESULT (CALLBACK *LPFNCREATEINSTANCE)(IUnknown* pUnkOuter, REFIID riid, LPVOID* ppvObject); +IClassFactory * IDefClF_fnConstructor(LPFNCREATEINSTANCE lpfnCI, PLONG pcRefDll, REFIID riidInst); + +/* this table contains all CLSID's of shell32 objects */ +struct { + REFIID riid; + LPFNCREATEINSTANCE lpfnCI; +} InterfaceTable[] = { + {&CLSID_ShellFSFolder, &IFSFolder_Constructor}, + {&CLSID_MyComputer, &ISF_MyComputer_Constructor}, + {&CLSID_ShellDesktop, &ISF_Desktop_Constructor}, + {&CLSID_ShellLink, &IShellLink_Constructor}, + {&CLSID_DragDropHelper, &IDropTargetHelper_Constructor}, + {&CLSID_ControlPanel, &IControlPanel_Constructor}, + {&CLSID_AutoComplete, &IAutoComplete_Constructor}, + {NULL,NULL} +}; + +/************************************************************************* + * SHCoCreateInstance [SHELL32.102] + * + * NOTES + * exported by ordinal + */ + +/* FIXME: this should be SHLWAPI.24 since we can't yet import by ordinal */ + +DWORD WINAPI __SHGUIDToStringW (REFGUID guid, LPWSTR str) +{ + WCHAR sFormat[52] = {'{','%','0','8','l','x','-','%','0','4', + 'x','-','%','0','4','x','-','%','0','2', + 'x','%','0','2','x','-','%','0','2','x', + '%','0','2','x','%','0','2','x','%','0', + '2','x','%','0','2','x','%','0','2','x', + '}','\0'}; + + return wsprintfW ( str, sFormat, + guid->Data1, guid->Data2, guid->Data3, + guid->Data4[0], guid->Data4[1], guid->Data4[2], guid->Data4[3], + guid->Data4[4], guid->Data4[5], guid->Data4[6], guid->Data4[7] ); + +} + +/************************************************************************/ + +HRESULT WINAPI SHCoCreateInstance( + LPCWSTR aclsid, + const CLSID *clsid, + LPUNKNOWN pUnkOuter, + REFIID refiid, + LPVOID *ppv) +{ + DWORD hres; + IID iid; + CLSID * myclsid = (CLSID*)clsid; + WCHAR sKeyName[MAX_PATH]; + const WCHAR sCLSID[7] = {'C','L','S','I','D','\\','\0'}; + WCHAR sClassID[60]; + const WCHAR sInProcServer32[16] ={'\\','I','n','p','r','o','c','S','e','r','v','e','r','3','2','\0'}; + const WCHAR sLoadWithoutCOM[15] ={'L','o','a','d','W','i','t','h','o','u','t','C','O','M','\0'}; + WCHAR sDllPath[MAX_PATH]; + HKEY hKey; + DWORD dwSize; + BOOLEAN bLoadFromShell32 = FALSE; + BOOLEAN bLoadWithoutCOM = FALSE; + IClassFactory * pcf = NULL; + + if(!ppv) return E_POINTER; + *ppv=NULL; + + /* if the clsid is a string, convert it */ + if (!clsid) + { + if (!aclsid) return REGDB_E_CLASSNOTREG; + SHCLSIDFromStringW(aclsid, &iid); + myclsid = &iid; + } + + TRACE("(%p,%s,unk:%p,%s,%p)\n", + aclsid,shdebugstr_guid(myclsid),pUnkOuter,shdebugstr_guid(refiid),ppv); + + /* we look up the dll path in the registry */ + __SHGUIDToStringW(myclsid, sClassID); + lstrcpyW(sKeyName, sCLSID); + lstrcatW(sKeyName, sClassID); + lstrcatW(sKeyName, sInProcServer32); + + if (ERROR_SUCCESS == RegOpenKeyExW(HKEY_CLASSES_ROOT, sKeyName, 0, KEY_READ, &hKey)) { + dwSize = sizeof(sDllPath); + SHQueryValueExW(hKey, NULL, 0,0, sDllPath, &dwSize ); + + /* if a special registry key is set, we load a shell extension without help of OLE32 */ + bLoadWithoutCOM = (ERROR_SUCCESS == SHQueryValueExW(hKey, sLoadWithoutCOM, 0, 0, 0, 0)); + + /* if the com object is inside shell32, omit use of ole32 */ + bLoadFromShell32 = (0==lstrcmpiW( PathFindFileNameW(sDllPath), sShell32)); + + RegCloseKey (hKey); + } else { + /* since we can't find it in the registry we try internally */ + bLoadFromShell32 = TRUE; + } + + TRACE("WithoutCom=%u FromShell=%u\n", bLoadWithoutCOM, bLoadFromShell32); + + /* now we create a instance */ + if (bLoadFromShell32) { + if (! SUCCEEDED(SHELL32_DllGetClassObject(myclsid, &IID_IClassFactory,(LPVOID*)&pcf))) { + ERR("LoadFromShell failed for CLSID=%s\n", shdebugstr_guid(myclsid)); + } + } else if (bLoadWithoutCOM) { + + /* load a external dll without ole32 */ + HANDLE hLibrary; + typedef HRESULT (CALLBACK *DllGetClassObjectFunc)(REFCLSID clsid, REFIID iid, LPVOID *ppv); + DllGetClassObjectFunc DllGetClassObject; + + if ((hLibrary = LoadLibraryExW(sDllPath, 0, LOAD_WITH_ALTERED_SEARCH_PATH)) == 0) { + ERR("couldn't load InprocServer32 dll %s\n", debugstr_w(sDllPath)); + hres = E_ACCESSDENIED; + goto end; + } else if (!(DllGetClassObject = (DllGetClassObjectFunc)GetProcAddress(hLibrary, "DllGetClassObject"))) { + ERR("couldn't find function DllGetClassObject in %s\n", debugstr_w(sDllPath)); + FreeLibrary( hLibrary ); + hres = E_ACCESSDENIED; + goto end; + } else if (! SUCCEEDED(hres = DllGetClassObject(myclsid, &IID_IClassFactory, (LPVOID*)&pcf))) { + TRACE("GetClassObject failed 0x%08lx\n", hres); + goto end; + } + + } else { + + /* load a external dll in the usual way */ + hres = CoCreateInstance(myclsid, pUnkOuter, CLSCTX_INPROC_SERVER, refiid, ppv); + goto end; + } + + /* here we should have a ClassFactory */ + if (!pcf) return E_ACCESSDENIED; + + hres = IClassFactory_CreateInstance(pcf, pUnkOuter, refiid, ppv); + IClassFactory_Release(pcf); +end: + if(hres!=S_OK) + { + ERR("failed (0x%08lx) to create CLSID:%s IID:%s\n", + hres, shdebugstr_guid(myclsid), shdebugstr_guid(refiid)); + ERR("class not found in registry\n"); + } + + TRACE("-- instance: %p\n",*ppv); + return hres; +} + +/************************************************************************* + * DllGetClassObject [SHELL32.128] + */ +HRESULT WINAPI SHELL32_DllGetClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv) +{ + HRESULT hres = E_OUTOFMEMORY; + IClassFactory * pcf = NULL; + int i; + + TRACE("CLSID:%s,IID:%s\n",shdebugstr_guid(rclsid),shdebugstr_guid(iid)); + + if (!ppv) return E_INVALIDARG; + *ppv = NULL; + + /* search our internal interface table */ + for(i=0;InterfaceTable[i].riid;i++) { + if(IsEqualIID(InterfaceTable[i].riid, rclsid)) { + TRACE("index[%u]\n", i); + pcf = IDefClF_fnConstructor(InterfaceTable[i].lpfnCI, NULL, NULL); + } + } + + if (!pcf) { + FIXME("failed for CLSID=%s\n", shdebugstr_guid(rclsid)); + return CLASS_E_CLASSNOTAVAILABLE; + } + + hres = IClassFactory_QueryInterface(pcf, iid, ppv); + IClassFactory_Release(pcf); + + TRACE("-- pointer to class factory: %p\n",*ppv); + return hres; +} + +/************************************************************************* + * SHCLSIDFromString [SHELL32.147] + * + * NOTES + * exported by ordinal + */ +DWORD WINAPI SHCLSIDFromStringA (LPCSTR clsid, CLSID *id) +{ + WCHAR buffer[40]; + TRACE("(%p(%s) %p)\n", clsid, clsid, id); + if (!MultiByteToWideChar( CP_ACP, 0, clsid, -1, buffer, sizeof(buffer)/sizeof(WCHAR) )) + return CO_E_CLASSSTRING; + return CLSIDFromString( buffer, id ); +} +DWORD WINAPI SHCLSIDFromStringW (LPCWSTR clsid, CLSID *id) +{ + TRACE("(%p(%s) %p)\n", clsid, debugstr_w(clsid), id); + return CLSIDFromString((LPWSTR)clsid, id); +} +DWORD WINAPI SHCLSIDFromStringAW (LPVOID clsid, CLSID *id) +{ + if (SHELL_OsIsUnicode()) + return SHCLSIDFromStringW (clsid, id); + return SHCLSIDFromStringA (clsid, id); +} + +/************************************************************************* + * Shell Memory Allocator + */ + +/* set the vtable later */ +static IMallocVtbl VT_Shell_IMalloc32; + +/* this is the static object instance */ +typedef struct { + IMallocVtbl *lpVtbl; + DWORD dummy; +} _ShellMalloc; + +static _ShellMalloc Shell_Malloc = { &VT_Shell_IMalloc32,1}; + +/* this is the global allocator of shell32 */ +static IMalloc * ShellTaskAllocator = NULL; + +/****************************************************************************** + * IShellMalloc_QueryInterface [VTABLE] + */ +static HRESULT WINAPI IShellMalloc_fnQueryInterface(LPMALLOC iface, REFIID refiid, LPVOID *obj) +{ + TRACE("(%s,%p)\n",shdebugstr_guid(refiid),obj); + if (IsEqualIID(refiid, &IID_IUnknown) || IsEqualIID(refiid, &IID_IMalloc)) { + *obj = (LPMALLOC) &Shell_Malloc; + return S_OK; + } + return E_NOINTERFACE; +} + +/****************************************************************************** + * IShellMalloc_AddRefRelease [VTABLE] + */ +static ULONG WINAPI IShellMalloc_fnAddRefRelease(LPMALLOC iface) +{ + return 1; +} + +/****************************************************************************** + * IShellMalloc_Alloc [VTABLE] + */ +static LPVOID WINAPI IShellMalloc_fnAlloc(LPMALLOC iface, DWORD cb) +{ + LPVOID addr; + + addr = (LPVOID) LocalAlloc(GMEM_ZEROINIT, cb); + TRACE("(%p,%ld);\n",addr,cb); + return addr; +} + +/****************************************************************************** + * IShellMalloc_Realloc [VTABLE] + */ +static LPVOID WINAPI IShellMalloc_fnRealloc(LPMALLOC iface, LPVOID pv, DWORD cb) +{ + LPVOID addr; + + if (pv) { + if (cb) { + addr = (LPVOID) LocalReAlloc((HANDLE) pv, cb, GMEM_ZEROINIT | GMEM_MOVEABLE); + } else { + LocalFree((HANDLE) pv); + addr = NULL; + } + } else { + if (cb) { + addr = (LPVOID) LocalAlloc(GMEM_ZEROINIT, cb); + } else { + addr = NULL; + } + } + + TRACE("(%p->%p,%ld)\n",pv,addr,cb); + return addr; +} + +/****************************************************************************** + * IShellMalloc_Free [VTABLE] + */ +static VOID WINAPI IShellMalloc_fnFree(LPMALLOC iface, LPVOID pv) +{ + TRACE("(%p)\n",pv); + LocalFree((HANDLE) pv); +} + +/****************************************************************************** + * IShellMalloc_GetSize [VTABLE] + */ +static DWORD WINAPI IShellMalloc_fnGetSize(LPMALLOC iface, LPVOID pv) +{ + DWORD cb = (DWORD) LocalSize((HANDLE)pv); + TRACE("(%p,%ld)\n", pv, cb); + return cb; +} + +/****************************************************************************** + * IShellMalloc_DidAlloc [VTABLE] + */ +static INT WINAPI IShellMalloc_fnDidAlloc(LPMALLOC iface, LPVOID pv) +{ + TRACE("(%p)\n",pv); + return -1; +} + +/****************************************************************************** + * IShellMalloc_HeapMinimize [VTABLE] + */ +static VOID WINAPI IShellMalloc_fnHeapMinimize(LPMALLOC iface) +{ + TRACE("()\n"); +} + +static IMallocVtbl VT_Shell_IMalloc32 = +{ + IShellMalloc_fnQueryInterface, + IShellMalloc_fnAddRefRelease, + IShellMalloc_fnAddRefRelease, + IShellMalloc_fnAlloc, + IShellMalloc_fnRealloc, + IShellMalloc_fnFree, + IShellMalloc_fnGetSize, + IShellMalloc_fnDidAlloc, + IShellMalloc_fnHeapMinimize +}; + +/************************************************************************* + * SHGetMalloc [SHELL32.@] + * + * Return the shell IMalloc interface. + * + * PARAMS + * lpmal [O] Destination for IMalloc interface. + * + * RETURNS + * Success: S_OK. lpmal contains the shells IMalloc interface. + * Failure. An HRESULT error code. + * + * NOTES + * This function will use CoGetMalloc() if OLE32.DLL is already loaded. + * If not it uses an internal implementation as a fallback. + */ +HRESULT WINAPI SHGetMalloc(LPMALLOC *lpmal) +{ + TRACE("(%p)\n", lpmal); + + if (!ShellTaskAllocator) + { + HMODULE hOle32 = GetModuleHandleA("OLE32.DLL"); + /* this is very suspect. we should not being using a different + * allocator from deallocator based on something undeterministic + * like whether ole32 is loaded. as it happens currently, they + * both map to the same allocator deep down, but this could + * change in the future. */ + if(hOle32) { + CoGetMalloc(MEMCTX_TASK, &ShellTaskAllocator); + TRACE("got ole32 IMalloc\n"); + } + if(!ShellTaskAllocator) { + ShellTaskAllocator = (IMalloc* ) &Shell_Malloc; + TRACE("use fallback allocator\n"); + } + } + *lpmal = ShellTaskAllocator; + return S_OK; +} + +/************************************************************************* + * SHAlloc [SHELL32.196] + * + * NOTES + * exported by ordinal + */ +LPVOID WINAPI SHAlloc(DWORD len) +{ + IMalloc * ppv; + LPBYTE ret; + + if (!ShellTaskAllocator) SHGetMalloc(&ppv); + + ret = (LPVOID) IMalloc_Alloc(ShellTaskAllocator, len); + TRACE("%lu bytes at %p\n",len, ret); + return (LPVOID)ret; +} + +/************************************************************************* + * SHFree [SHELL32.195] + * + * NOTES + * exported by ordinal + */ +void WINAPI SHFree(LPVOID pv) +{ + IMalloc * ppv; + + TRACE("%p\n",pv); + if (!ShellTaskAllocator) SHGetMalloc(&ppv); + IMalloc_Free(ShellTaskAllocator, pv); +} + +/************************************************************************* + * SHGetDesktopFolder [SHELL32.@] + */ +HRESULT WINAPI SHGetDesktopFolder(IShellFolder **psf) +{ + HRESULT hres = S_OK; + TRACE("\n"); + + if(!psf) return E_INVALIDARG; + *psf = NULL; + hres = ISF_Desktop_Constructor(NULL, &IID_IShellFolder,(LPVOID*)psf); + + TRACE("-- %p->(%p)\n",psf, *psf); + return hres; +} +/************************************************************************** + * Default ClassFactory Implementation + * + * SHCreateDefClassObject + * + * NOTES + * helper function for dll's without a own classfactory + * a generic classfactory is returned + * when the CreateInstance of the cf is called the callback is executed + */ + +typedef struct +{ + IClassFactoryVtbl *lpVtbl; + DWORD ref; + CLSID *rclsid; + LPFNCREATEINSTANCE lpfnCI; + const IID * riidInst; + ULONG * pcRefDll; /* pointer to refcounter in external dll (ugrrr...) */ +} IDefClFImpl; + +static IClassFactoryVtbl dclfvt; + +/************************************************************************** + * IDefClF_fnConstructor + */ + +IClassFactory * IDefClF_fnConstructor(LPFNCREATEINSTANCE lpfnCI, PLONG pcRefDll, REFIID riidInst) +{ + IDefClFImpl* lpclf; + + lpclf = (IDefClFImpl*)HeapAlloc(GetProcessHeap(),0,sizeof(IDefClFImpl)); + lpclf->ref = 1; + lpclf->lpVtbl = &dclfvt; + lpclf->lpfnCI = lpfnCI; + lpclf->pcRefDll = pcRefDll; + + if (pcRefDll) InterlockedIncrement(pcRefDll); + lpclf->riidInst = riidInst; + + TRACE("(%p)%s\n",lpclf, shdebugstr_guid(riidInst)); + return (LPCLASSFACTORY)lpclf; +} +/************************************************************************** + * IDefClF_fnQueryInterface + */ +static HRESULT WINAPI IDefClF_fnQueryInterface( + LPCLASSFACTORY iface, REFIID riid, LPVOID *ppvObj) +{ + IDefClFImpl *This = (IDefClFImpl *)iface; + + TRACE("(%p)->(%s)\n",This,shdebugstr_guid(riid)); + + *ppvObj = NULL; + + if(IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IClassFactory)) { + *ppvObj = This; + InterlockedIncrement(&This->ref); + return S_OK; + } + + TRACE("-- E_NOINTERFACE\n"); + return E_NOINTERFACE; +} +/****************************************************************************** + * IDefClF_fnAddRef + */ +static ULONG WINAPI IDefClF_fnAddRef(LPCLASSFACTORY iface) +{ + IDefClFImpl *This = (IDefClFImpl *)iface; + TRACE("(%p)->(count=%lu)\n",This,This->ref); + + return InterlockedIncrement(&This->ref); +} +/****************************************************************************** + * IDefClF_fnRelease + */ +static ULONG WINAPI IDefClF_fnRelease(LPCLASSFACTORY iface) +{ + IDefClFImpl *This = (IDefClFImpl *)iface; + TRACE("(%p)->(count=%lu)\n",This,This->ref); + + if (!InterlockedDecrement(&This->ref)) + { + if (This->pcRefDll) InterlockedDecrement(This->pcRefDll); + + TRACE("-- destroying IClassFactory(%p)\n",This); + HeapFree(GetProcessHeap(),0,This); + return 0; + } + return This->ref; +} +/****************************************************************************** + * IDefClF_fnCreateInstance + */ +static HRESULT WINAPI IDefClF_fnCreateInstance( + LPCLASSFACTORY iface, LPUNKNOWN pUnkOuter, REFIID riid, LPVOID *ppvObject) +{ + IDefClFImpl *This = (IDefClFImpl *)iface; + + TRACE("%p->(%p,%s,%p)\n",This,pUnkOuter,shdebugstr_guid(riid),ppvObject); + + *ppvObject = NULL; + + if ( This->riidInst==NULL || + IsEqualCLSID(riid, This->riidInst) || + IsEqualCLSID(riid, &IID_IUnknown) ) + { + return This->lpfnCI(pUnkOuter, riid, ppvObject); + } + + ERR("unknown IID requested %s\n",shdebugstr_guid(riid)); + return E_NOINTERFACE; +} +/****************************************************************************** + * IDefClF_fnLockServer + */ +static HRESULT WINAPI IDefClF_fnLockServer(LPCLASSFACTORY iface, BOOL fLock) +{ + IDefClFImpl *This = (IDefClFImpl *)iface; + TRACE("%p->(0x%x), not implemented\n",This, fLock); + return E_NOTIMPL; +} + +static IClassFactoryVtbl dclfvt = +{ + IDefClF_fnQueryInterface, + IDefClF_fnAddRef, + IDefClF_fnRelease, + IDefClF_fnCreateInstance, + IDefClF_fnLockServer +}; + +/****************************************************************************** + * SHCreateDefClassObject [SHELL32.70] + */ +HRESULT WINAPI SHCreateDefClassObject( + REFIID riid, + LPVOID* ppv, + LPFNCREATEINSTANCE lpfnCI, /* [in] create instance callback entry */ + LPDWORD pcRefDll, /* [in/out] ref count of the dll */ + REFIID riidInst) /* [in] optional interface to the instance */ +{ + IClassFactory * pcf; + + TRACE("%s %p %p %p %s\n", + shdebugstr_guid(riid), ppv, lpfnCI, pcRefDll, shdebugstr_guid(riidInst)); + + if (! IsEqualCLSID(riid, &IID_IClassFactory) ) return E_NOINTERFACE; + if (! (pcf = IDefClF_fnConstructor(lpfnCI, pcRefDll, riidInst))) return E_OUTOFMEMORY; + *ppv = pcf; + return NOERROR; +} + +/************************************************************************* + * DragAcceptFiles [SHELL32.54] + */ +void WINAPI DragAcceptFiles(HWND hWnd, BOOL b) +{ + LONG exstyle; + + if( !IsWindow(hWnd) ) return; + exstyle = GetWindowLongA(hWnd,GWL_EXSTYLE); + if (b) + exstyle |= WS_EX_ACCEPTFILES; + else + exstyle &= ~WS_EX_ACCEPTFILES; + SetWindowLongA(hWnd,GWL_EXSTYLE,exstyle); +} + +/************************************************************************* + * DragFinish [SHELL32.80] + */ +void WINAPI DragFinish(HDROP h) +{ + TRACE("\n"); + GlobalFree((HGLOBAL)h); +} + +/************************************************************************* + * DragQueryPoint [SHELL32.135] + */ +BOOL WINAPI DragQueryPoint(HDROP hDrop, POINT *p) +{ + DROPFILES *lpDropFileStruct; + BOOL bRet; + + TRACE("\n"); + + lpDropFileStruct = (DROPFILES *) GlobalLock(hDrop); + + *p = lpDropFileStruct->pt; + bRet = lpDropFileStruct->fNC; + + GlobalUnlock(hDrop); + return bRet; +} + +/************************************************************************* + * DragQueryFile [SHELL32.81] + * DragQueryFileA [SHELL32.82] + */ +UINT WINAPI DragQueryFileA( + HDROP hDrop, + UINT lFile, + LPSTR lpszFile, + UINT lLength) +{ + LPSTR lpDrop; + UINT i = 0; + DROPFILES *lpDropFileStruct = (DROPFILES *) GlobalLock(hDrop); + + TRACE("(%p, %x, %p, %u)\n", hDrop,lFile,lpszFile,lLength); + + if(!lpDropFileStruct) goto end; + + lpDrop = (LPSTR) lpDropFileStruct + lpDropFileStruct->pFiles; + + if(lpDropFileStruct->fWide) { + LPWSTR lpszFileW = NULL; + + if(lpszFile) { + lpszFileW = (LPWSTR) HeapAlloc(GetProcessHeap(), 0, lLength*sizeof(WCHAR)); + if(lpszFileW == NULL) { + goto end; + } + } + i = DragQueryFileW(hDrop, lFile, lpszFileW, lLength); + + if(lpszFileW) { + WideCharToMultiByte(CP_ACP, 0, lpszFileW, -1, lpszFile, lLength, 0, NULL); + HeapFree(GetProcessHeap(), 0, lpszFileW); + } + goto end; + } + + while (i++ < lFile) + { + while (*lpDrop++); /* skip filename */ + if (!*lpDrop) + { + i = (lFile == 0xFFFFFFFF) ? i : 0; + goto end; + } + } + + i = strlen(lpDrop); + i++; + if (!lpszFile ) goto end; /* needed buffer size */ + i = (lLength > i) ? i : lLength; + lstrcpynA (lpszFile, lpDrop, i); +end: + GlobalUnlock(hDrop); + return i; +} + +/************************************************************************* + * DragQueryFileW [SHELL32.133] + */ +UINT WINAPI DragQueryFileW( + HDROP hDrop, + UINT lFile, + LPWSTR lpszwFile, + UINT lLength) +{ + LPWSTR lpwDrop; + UINT i = 0; + DROPFILES *lpDropFileStruct = (DROPFILES *) GlobalLock(hDrop); + + TRACE("(%p, %x, %p, %u)\n", hDrop,lFile,lpszwFile,lLength); + + if(!lpDropFileStruct) goto end; + + lpwDrop = (LPWSTR) ((LPSTR)lpDropFileStruct + lpDropFileStruct->pFiles); + + if(lpDropFileStruct->fWide == FALSE) { + LPSTR lpszFileA = NULL; + + if(lpszwFile) { + lpszFileA = (LPSTR) HeapAlloc(GetProcessHeap(), 0, lLength); + if(lpszFileA == NULL) { + goto end; + } + } + i = DragQueryFileA(hDrop, lFile, lpszFileA, lLength); + + if(lpszFileA) { + MultiByteToWideChar(CP_ACP, 0, lpszFileA, -1, lpszwFile, lLength); + HeapFree(GetProcessHeap(), 0, lpszFileA); + } + goto end; + } + + i = 0; + while (i++ < lFile) + { + while (*lpwDrop++); /* skip filename */ + if (!*lpwDrop) + { + i = (lFile == 0xFFFFFFFF) ? i : 0; + goto end; + } + } + + i = strlenW(lpwDrop); + i++; + if ( !lpszwFile) goto end; /* needed buffer size */ + + i = (lLength > i) ? i : lLength; + lstrcpynW (lpszwFile, lpwDrop, i); +end: + GlobalUnlock(hDrop); + return i; +} diff --git a/reactos/lib/shell32/shellord.c b/reactos/lib/shell32/shellord.c index 71b7714fceb..ad6261e510f 100644 --- a/reactos/lib/shell32/shellord.c +++ b/reactos/lib/shell32/shellord.c @@ -1,1635 +1,1635 @@ -/* - * The parameters of many functions changes between different OS versions - * (NT uses Unicode strings, 95 uses ASCII strings) - * - * Copyright 1997 Marcus Meissner - * 1998 Jürgen Schmied - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ -#include "config.h" - -#include -#include -#include - -#define COBJMACROS - -#include "winerror.h" -#include "windef.h" -#include "winbase.h" -#include "winreg.h" -#include "wine/debug.h" -#include "winnls.h" - -#include "shellapi.h" -#include "objbase.h" -#include "shlguid.h" -#include "wingdi.h" -#include "winuser.h" -#include "shlobj.h" -#include "shell32_main.h" -#include "undocshell.h" -#include "pidl.h" -#include "shlwapi.h" -#include "commdlg.h" - -WINE_DEFAULT_DEBUG_CHANNEL(shell); -WINE_DECLARE_DEBUG_CHANNEL(pidl); - -/* FIXME: !!! move CREATEMRULIST and flags to header file !!! */ -/* !!! it is in both here and comctl32undoc.c !!! */ -typedef struct tagCREATEMRULIST -{ - DWORD cbSize; /* size of struct */ - DWORD nMaxItems; /* max no. of items in list */ - DWORD dwFlags; /* see below */ - HKEY hKey; /* root reg. key under which list is saved */ - LPCSTR lpszSubKey; /* reg. subkey */ - PROC lpfnCompare; /* item compare proc */ -} CREATEMRULISTA, *LPCREATEMRULISTA; - -/* dwFlags */ -#define MRUF_STRING_LIST 0 /* list will contain strings */ -#define MRUF_BINARY_LIST 1 /* list will contain binary data */ -#define MRUF_DELAYED_SAVE 2 /* only save list order to reg. is FreeMRUList */ - -extern HANDLE WINAPI CreateMRUListA(LPCREATEMRULISTA lpcml); -extern DWORD WINAPI FreeMRUList(HANDLE hMRUList); -extern INT WINAPI AddMRUData(HANDLE hList, LPCVOID lpData, DWORD cbData); -extern INT WINAPI FindMRUData(HANDLE hList, LPCVOID lpData, DWORD cbData, LPINT lpRegNum); -extern INT WINAPI EnumMRUListA(HANDLE hList, INT nItemPos, LPVOID lpBuffer, DWORD nBufferSize); - - -/* Get a function pointer from a DLL handle */ -#define GET_FUNC(func, module, name, fail) \ - do { \ - if (!func) { \ - if (!SHELL32_h##module && !(SHELL32_h##module = LoadLibraryA(#module ".dll"))) return fail; \ - func = (void*)GetProcAddress(SHELL32_h##module, name); \ - if (!func) return fail; \ - } \ - } while (0) - -/* Function pointers for GET_FUNC macro */ -static HMODULE SHELL32_hshlwapi=NULL; -static HANDLE (WINAPI *pSHAllocShared)(LPCVOID,DWORD,DWORD); -static LPVOID (WINAPI *pSHLockShared)(HANDLE,DWORD); -static BOOL (WINAPI *pSHUnlockShared)(LPVOID); -static BOOL (WINAPI *pSHFreeShared)(HANDLE,DWORD); - - -/************************************************************************* - * ParseFieldA [internal] - * - * copies a field from a ',' delimited string - * - * first field is nField = 1 - */ -DWORD WINAPI ParseFieldA( - LPCSTR src, - DWORD nField, - LPSTR dst, - DWORD len) -{ - WARN("(%s,0x%08lx,%p,%ld) semi-stub.\n",debugstr_a(src),nField,dst,len); - - if (!src || !src[0] || !dst || !len) - return 0; - - /* skip n fields delimited by ',' */ - while (nField > 1) - { - if (*src=='\0') return FALSE; - if (*(src++)==',') nField--; - } - - /* copy part till the next ',' to dst */ - while ( *src!='\0' && *src!=',' && (len--)>0 ) *(dst++)=*(src++); - - /* finalize the string */ - *dst=0x0; - - return TRUE; -} - -/************************************************************************* - * ParseFieldW [internal] - * - * copies a field from a ',' delimited string - * - * first field is nField = 1 - */ -DWORD WINAPI ParseFieldW(LPCWSTR src, DWORD nField, LPWSTR dst, DWORD len) -{ - WARN("(%s,0x%08lx,%p,%ld) semi-stub.\n", debugstr_w(src), nField, dst, len); - - if (!src || !src[0] || !dst || !len) - return 0; - - /* skip n fields delimited by ',' */ - while (nField > 1) - { - if (*src == 0x0) return FALSE; - if (*src++ == ',') nField--; - } - - /* copy part till the next ',' to dst */ - while ( *src != 0x0 && *src != ',' && (len--)>0 ) *(dst++) = *(src++); - - /* finalize the string */ - *dst = 0x0; - - return TRUE; -} - -/************************************************************************* - * ParseField [SHELL32.58] - */ -DWORD WINAPI ParseFieldAW(LPCVOID src, DWORD nField, LPVOID dst, DWORD len) -{ - if (SHELL_OsIsUnicode()) - return ParseFieldW(src, nField, dst, len); - return ParseFieldA(src, nField, dst, len); -} - -/************************************************************************* - * GetFileNameFromBrowse [SHELL32.63] - * - */ -BOOL WINAPI GetFileNameFromBrowse( - HWND hwndOwner, - LPSTR lpstrFile, - DWORD nMaxFile, - LPCSTR lpstrInitialDir, - LPCSTR lpstrDefExt, - LPCSTR lpstrFilter, - LPCSTR lpstrTitle) -{ - HMODULE hmodule; - FARPROC pGetOpenFileNameA; - OPENFILENAMEA ofn; - BOOL ret; - - TRACE("%p, %s, %ld, %s, %s, %s, %s)\n", - hwndOwner, lpstrFile, nMaxFile, lpstrInitialDir, lpstrDefExt, - lpstrFilter, lpstrTitle); - - hmodule = LoadLibraryA("comdlg32.dll"); - if(!hmodule) return FALSE; - pGetOpenFileNameA = GetProcAddress(hmodule, "GetOpenFileNameA"); - if(!pGetOpenFileNameA) - { - FreeLibrary(hmodule); - return FALSE; - } - - memset(&ofn, 0, sizeof(ofn)); - - ofn.lStructSize = sizeof(ofn); - ofn.hwndOwner = hwndOwner; - ofn.lpstrFilter = lpstrFilter; - ofn.lpstrFile = lpstrFile; - ofn.nMaxFile = nMaxFile; - ofn.lpstrInitialDir = lpstrInitialDir; - ofn.lpstrTitle = lpstrTitle; - ofn.lpstrDefExt = lpstrDefExt; - ofn.Flags = OFN_EXPLORER | OFN_HIDEREADONLY | OFN_FILEMUSTEXIST; - ret = pGetOpenFileNameA(&ofn); - - FreeLibrary(hmodule); - return ret; -} - -/************************************************************************* - * SHGetSetSettings [SHELL32.68] - */ -VOID WINAPI SHGetSetSettings(LPSHELLSTATE lpss, DWORD dwMask, BOOL bSet) -{ - if(bSet) - { - FIXME("%p 0x%08lx TRUE\n", lpss, dwMask); - } - else - { - SHGetSettings((LPSHELLFLAGSTATE)lpss,dwMask); - } -} - -/************************************************************************* - * SHGetSettings [SHELL32.@] - * - * NOTES - * the registry path are for win98 (tested) - * and possibly are the same in nt40 - * - */ -VOID WINAPI SHGetSettings(LPSHELLFLAGSTATE lpsfs, DWORD dwMask) -{ - HKEY hKey; - DWORD dwData; - DWORD dwDataSize = sizeof (DWORD); - - TRACE("(%p 0x%08lx)\n",lpsfs,dwMask); - - if (RegCreateKeyExA(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced", - 0, 0, 0, KEY_ALL_ACCESS, 0, &hKey, 0)) - return; - - if ( (SSF_SHOWEXTENSIONS & dwMask) && !RegQueryValueExA(hKey, "HideFileExt", 0, 0, (LPBYTE)&dwData, &dwDataSize)) - lpsfs->fShowExtensions = ((dwData == 0) ? 0 : 1); - - if ( (SSF_SHOWINFOTIP & dwMask) && !RegQueryValueExA(hKey, "ShowInfoTip", 0, 0, (LPBYTE)&dwData, &dwDataSize)) - lpsfs->fShowInfoTip = ((dwData == 0) ? 0 : 1); - - if ( (SSF_DONTPRETTYPATH & dwMask) && !RegQueryValueExA(hKey, "DontPrettyPath", 0, 0, (LPBYTE)&dwData, &dwDataSize)) - lpsfs->fDontPrettyPath = ((dwData == 0) ? 0 : 1); - - if ( (SSF_HIDEICONS & dwMask) && !RegQueryValueExA(hKey, "HideIcons", 0, 0, (LPBYTE)&dwData, &dwDataSize)) - lpsfs->fHideIcons = ((dwData == 0) ? 0 : 1); - - if ( (SSF_MAPNETDRVBUTTON & dwMask) && !RegQueryValueExA(hKey, "MapNetDrvBtn", 0, 0, (LPBYTE)&dwData, &dwDataSize)) - lpsfs->fMapNetDrvBtn = ((dwData == 0) ? 0 : 1); - - if ( (SSF_SHOWATTRIBCOL & dwMask) && !RegQueryValueExA(hKey, "ShowAttribCol", 0, 0, (LPBYTE)&dwData, &dwDataSize)) - lpsfs->fShowAttribCol = ((dwData == 0) ? 0 : 1); - - if (((SSF_SHOWALLOBJECTS | SSF_SHOWSYSFILES) & dwMask) && !RegQueryValueExA(hKey, "Hidden", 0, 0, (LPBYTE)&dwData, &dwDataSize)) - { if (dwData == 0) - { if (SSF_SHOWALLOBJECTS & dwMask) lpsfs->fShowAllObjects = 0; - if (SSF_SHOWSYSFILES & dwMask) lpsfs->fShowSysFiles = 0; - } - else if (dwData == 1) - { if (SSF_SHOWALLOBJECTS & dwMask) lpsfs->fShowAllObjects = 1; - if (SSF_SHOWSYSFILES & dwMask) lpsfs->fShowSysFiles = 0; - } - else if (dwData == 2) - { if (SSF_SHOWALLOBJECTS & dwMask) lpsfs->fShowAllObjects = 0; - if (SSF_SHOWSYSFILES & dwMask) lpsfs->fShowSysFiles = 1; - } - } - RegCloseKey (hKey); - - TRACE("-- 0x%04x\n", *(WORD*)lpsfs); -} - -/************************************************************************* - * SHShellFolderView_Message [SHELL32.73] - * - * Send a message to an explorer cabinet window. - * - * PARAMS - * hwndCabinet [I] The window containing the shellview to communicate with - * dwMessage [I] The SFVM message to send - * dwParam [I] Message parameter - * - * RETURNS - * fixme. - * - * NOTES - * Message SFVM_REARRANGE = 1 - * - * This message gets sent when a column gets clicked to instruct the - * shell view to re-sort the item list. dwParam identifies the column - * that was clicked. - */ -LRESULT WINAPI SHShellFolderView_Message( - HWND hwndCabinet, - UINT uMessage, - LPARAM lParam) -{ - FIXME("%p %08x %08lx stub\n",hwndCabinet, uMessage, lParam); - return 0; -} - -/************************************************************************* - * RegisterShellHook [SHELL32.181] - * - * Register a shell hook. - * - * PARAMS - * hwnd [I] Window handle - * dwType [I] Type of hook. - * - * NOTES - * Exported by ordinal - */ -BOOL WINAPI RegisterShellHook( - HWND hWnd, - DWORD dwType) -{ - FIXME("(%p,0x%08lx):stub.\n",hWnd, dwType); - return TRUE; -} - -/************************************************************************* - * ShellMessageBoxW [SHELL32.182] - * - * See ShellMessageBoxA. - */ -int WINAPIV ShellMessageBoxW( - HINSTANCE hInstance, - HWND hWnd, - LPCWSTR lpText, - LPCWSTR lpCaption, - UINT uType, - ...) -{ - WCHAR szText[100],szTitle[100]; - LPCWSTR pszText = szText, pszTitle = szTitle, pszTemp; - va_list args; - int ret; - - va_start(args, uType); - /* wvsprintfA(buf,fmt, args); */ - - TRACE("(%08lx,%08lx,%p,%p,%08x)\n", - (DWORD)hInstance,(DWORD)hWnd,lpText,lpCaption,uType); - - if (!HIWORD(lpCaption)) - LoadStringW(hInstance, (DWORD)lpCaption, szTitle, sizeof(szTitle)/sizeof(szTitle[0])); - else - pszTitle = lpCaption; - - if (!HIWORD(lpText)) - LoadStringW(hInstance, (DWORD)lpText, szText, sizeof(szText)/sizeof(szText[0])); - else - pszText = lpText; - - FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_STRING, - pszText, 0, 0, (LPWSTR)&pszTemp, 0, &args); - - va_end(args); - - ret = MessageBoxW(hWnd,pszTemp,pszTitle,uType); - LocalFree((HLOCAL)pszTemp); - return ret; -} - -/************************************************************************* - * ShellMessageBoxA [SHELL32.183] - * - * Format and output an error message. - * - * PARAMS - * hInstance [I] Instance handle of message creator - * hWnd [I] Window handle of message creator - * lpText [I] Resource Id of title or LPSTR - * lpCaption [I] Resource Id of title or LPSTR - * uType [I] Type of error message - * - * RETURNS - * A return value from MessageBoxA(). - * - * NOTES - * Exported by ordinal - */ -int WINAPIV ShellMessageBoxA( - HINSTANCE hInstance, - HWND hWnd, - LPCSTR lpText, - LPCSTR lpCaption, - UINT uType, - ...) -{ - char szText[100],szTitle[100]; - LPCSTR pszText = szText, pszTitle = szTitle, pszTemp; - va_list args; - int ret; - - va_start(args, uType); - /* wvsprintfA(buf,fmt, args); */ - - TRACE("(%08lx,%08lx,%p,%p,%08x)\n", - (DWORD)hInstance,(DWORD)hWnd,lpText,lpCaption,uType); - - if (!HIWORD(lpCaption)) - LoadStringA(hInstance, (DWORD)lpCaption, szTitle, sizeof(szTitle)); - else - pszTitle = lpCaption; - - if (!HIWORD(lpText)) - LoadStringA(hInstance, (DWORD)lpText, szText, sizeof(szText)); - else - pszText = lpText; - - FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_STRING, - pszText, 0, 0, (LPSTR)&pszTemp, 0, &args); - - va_end(args); - - ret = MessageBoxA(hWnd,pszTemp,pszTitle,uType); - LocalFree((HLOCAL)pszTemp); - return ret; -} - -/************************************************************************* - * SHRegisterDragDrop [SHELL32.86] - * - * NOTES - * exported by ordinal - */ -HRESULT WINAPI SHRegisterDragDrop( - HWND hWnd, - LPDROPTARGET pDropTarget) -{ - FIXME("(%p,%p):stub.\n", hWnd, pDropTarget); - return RegisterDragDrop(hWnd, pDropTarget); -} - -/************************************************************************* - * SHRevokeDragDrop [SHELL32.87] - * - * NOTES - * exported by ordinal - */ -HRESULT WINAPI SHRevokeDragDrop(HWND hWnd) -{ - FIXME("(%p):stub.\n",hWnd); - return RevokeDragDrop(hWnd); -} - -/************************************************************************* - * SHDoDragDrop [SHELL32.88] - * - * NOTES - * exported by ordinal - */ -HRESULT WINAPI SHDoDragDrop( - HWND hWnd, - LPDATAOBJECT lpDataObject, - LPDROPSOURCE lpDropSource, - DWORD dwOKEffect, - LPDWORD pdwEffect) -{ - FIXME("(%p %p %p 0x%08lx %p):stub.\n", - hWnd, lpDataObject, lpDropSource, dwOKEffect, pdwEffect); - return DoDragDrop(lpDataObject, lpDropSource, dwOKEffect, pdwEffect); -} - -/************************************************************************* - * ArrangeWindows [SHELL32.184] - * - */ -WORD WINAPI ArrangeWindows( - HWND hwndParent, - DWORD dwReserved, - LPCRECT lpRect, - WORD cKids, - CONST HWND * lpKids) -{ - FIXME("(%p 0x%08lx %p 0x%04x %p):stub.\n", - hwndParent, dwReserved, lpRect, cKids, lpKids); - return 0; -} - -/************************************************************************* - * SignalFileOpen [SHELL32.103] - * - * NOTES - * exported by ordinal - */ -DWORD WINAPI -SignalFileOpen (DWORD dwParam1) -{ - FIXME("(0x%08lx):stub.\n", dwParam1); - - return 0; -} - -/************************************************************************* - * SHADD_get_policy - helper function for SHAddToRecentDocs - * - * PARAMETERS - * policy [IN] policy name (null termed string) to find - * type [OUT] ptr to DWORD to receive type - * buffer [OUT] ptr to area to hold data retrieved - * len [IN/OUT] ptr to DWORD holding size of buffer and getting - * length filled - * - * RETURNS - * result of the SHQueryValueEx call - */ -static INT SHADD_get_policy(LPSTR policy, LPDWORD type, LPVOID buffer, LPDWORD len) -{ - HKEY Policy_basekey; - INT ret; - - /* Get the key for the policies location in the registry - */ - if (RegOpenKeyExA(HKEY_LOCAL_MACHINE, - "Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer", - 0, KEY_READ, &Policy_basekey)) { - - if (RegOpenKeyExA(HKEY_CURRENT_USER, - "Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer", - 0, KEY_READ, &Policy_basekey)) { - TRACE("No Explorer Policies location exists. Policy wanted=%s\n", - policy); - *len = 0; - return ERROR_FILE_NOT_FOUND; - } - } - - /* Retrieve the data if it exists - */ - ret = SHQueryValueExA(Policy_basekey, policy, 0, type, buffer, len); - RegCloseKey(Policy_basekey); - return ret; -} - - -/************************************************************************* - * SHADD_compare_mru - helper function for SHAddToRecentDocs - * - * PARAMETERS - * data1 [IN] data being looked for - * data2 [IN] data in MRU - * cbdata [IN] length from FindMRUData call (not used) - * - * RETURNS - * position within MRU list that data was added. - */ -static INT CALLBACK SHADD_compare_mru(LPCVOID data1, LPCVOID data2, DWORD cbData) -{ - return lstrcmpiA(data1, data2); -} - -/************************************************************************* - * SHADD_create_add_mru_data - helper function for SHAddToRecentDocs - * - * PARAMETERS - * mruhandle [IN] handle for created MRU list - * doc_name [IN] null termed pure doc name - * new_lnk_name [IN] null termed path and file name for .lnk file - * buffer [IN/OUT] 2048 byte area to consturct MRU data - * len [OUT] ptr to int to receive space used in buffer - * - * RETURNS - * position within MRU list that data was added. - */ -static INT SHADD_create_add_mru_data(HANDLE mruhandle, LPSTR doc_name, LPSTR new_lnk_name, - LPSTR buffer, INT *len) -{ - LPSTR ptr; - INT wlen; - - /*FIXME: Document: - * RecentDocs MRU data structure seems to be: - * +0h document file name w/ terminating 0h - * +nh short int w/ size of remaining - * +n+2h 02h 30h, or 01h 30h, or 00h 30h - unknown - * +n+4h 10 bytes zeros - unknown - * +n+eh shortcut file name w/ terminating 0h - * +n+e+nh 3 zero bytes - unknown - */ - - /* Create the MRU data structure for "RecentDocs" - */ - ptr = buffer; - lstrcpyA(ptr, doc_name); - ptr += (lstrlenA(buffer) + 1); - wlen= lstrlenA(new_lnk_name) + 1 + 12; - *((short int*)ptr) = wlen; - ptr += 2; /* step past the length */ - *(ptr++) = 0x30; /* unknown reason */ - *(ptr++) = 0; /* unknown, but can be 0x00, 0x01, 0x02 */ - memset(ptr, 0, 10); - ptr += 10; - lstrcpyA(ptr, new_lnk_name); - ptr += (lstrlenA(new_lnk_name) + 1); - memset(ptr, 0, 3); - ptr += 3; - *len = ptr - buffer; - - /* Add the new entry into the MRU list - */ - return AddMRUData(mruhandle, (LPCVOID)buffer, *len); -} - -/************************************************************************* - * SHAddToRecentDocs [SHELL32.@] - * - * PARAMETERS - * uFlags [IN] SHARD_PATH or SHARD_PIDL - * pv [IN] string or pidl, NULL clears the list - * - * NOTES - * exported by name - */ -void WINAPI SHAddToRecentDocs (UINT uFlags,LPCVOID pv) -{ -/* If list is a string list lpfnCompare has the following prototype - * int CALLBACK MRUCompareString(LPCSTR s1, LPCSTR s2) - * for binary lists the prototype is - * int CALLBACK MRUCompareBinary(LPCVOID data1, LPCVOID data2, DWORD cbData) - * where cbData is the no. of bytes to compare. - * Need to check what return value means identical - 0? - */ - - - UINT olderrormode; - HKEY HCUbasekey; - CHAR doc_name[MAX_PATH]; - CHAR link_dir[MAX_PATH]; - CHAR new_lnk_filepath[MAX_PATH]; - CHAR new_lnk_name[MAX_PATH]; - IMalloc *ppM; - LPITEMIDLIST pidl; - HWND hwnd = 0; /* FIXME: get real window handle */ - INT ret; - DWORD data[64], datalen, type; - - /*FIXME: Document: - * RecentDocs MRU data structure seems to be: - * +0h document file name w/ terminating 0h - * +nh short int w/ size of remaining - * +n+2h 02h 30h, or 01h 30h, or 00h 30h - unknown - * +n+4h 10 bytes zeros - unknown - * +n+eh shortcut file name w/ terminating 0h - * +n+e+nh 3 zero bytes - unknown - */ - - /* See if we need to do anything. - */ - datalen = 64; - ret=SHADD_get_policy( "NoRecentDocsHistory", &type, &data, &datalen); - if ((ret > 0) && (ret != ERROR_FILE_NOT_FOUND)) { - ERR("Error %d getting policy \"NoRecentDocsHistory\"\n", ret); - return; - } - if (ret == ERROR_SUCCESS) { - if (!( (type == REG_DWORD) || - ((type == REG_BINARY) && (datalen == 4)) )) { - ERR("Error policy data for \"NoRecentDocsHistory\" not formated correctly, type=%ld, len=%ld\n", - type, datalen); - return; - } - - TRACE("policy value for NoRecentDocsHistory = %08lx\n", data[0]); - /* now test the actual policy value */ - if ( data[0] != 0) - return; - } - - /* Open key to where the necessary info is - */ - /* FIXME: This should be done during DLL PROCESS_ATTACH (or THREAD_ATTACH) - * and the close should be done during the _DETACH. The resulting - * key is stored in the DLL global data. - */ - if (RegCreateKeyExA(HKEY_CURRENT_USER, - "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer", - 0, 0, 0, KEY_READ, 0, &HCUbasekey, 0)) { - ERR("Failed to create 'Software\\Microsoft\\Windows\\CurrentVersion\\Explorer'\n"); - return; - } - - /* Get path to user's "Recent" directory - */ - if(SUCCEEDED(SHGetMalloc(&ppM))) { - if (SUCCEEDED(SHGetSpecialFolderLocation(hwnd, CSIDL_RECENT, - &pidl))) { - SHGetPathFromIDListA(pidl, link_dir); - IMalloc_Free(ppM, pidl); - } - else { - /* serious issues */ - link_dir[0] = 0; - ERR("serious issues 1\n"); - } - IMalloc_Release(ppM); - } - else { - /* serious issues */ - link_dir[0] = 0; - ERR("serious issues 2\n"); - } - TRACE("Users Recent dir %s\n", link_dir); - - /* If no input, then go clear the lists */ - if (!pv) { - /* clear user's Recent dir - */ - - /* FIXME: delete all files in "link_dir" - * - * while( more files ) { - * lstrcpyA(old_lnk_name, link_dir); - * PathAppendA(old_lnk_name, filenam); - * DeleteFileA(old_lnk_name); - * } - */ - FIXME("should delete all files in %s\\ \n", link_dir); - - /* clear MRU list - */ - /* MS Bug ?? v4.72.3612.1700 of shell32 does the delete against - * HKEY_LOCAL_MACHINE version of ...CurrentVersion\Explorer - * and naturally it fails w/ rc=2. It should do it against - * HKEY_CURRENT_USER which is where it is stored, and where - * the MRU routines expect it!!!! - */ - RegDeleteKeyA(HCUbasekey, "RecentDocs"); - RegCloseKey(HCUbasekey); - return; - } - - /* Have data to add, the jobs to be done: - * 1. Add document to MRU list in registry "HKCU\Software\ - * Microsoft\Windows\CurrentVersion\Explorer\RecentDocs". - * 2. Add shortcut to document in the user's Recent directory - * (CSIDL_RECENT). - * 3. Add shortcut to Start menu's Documents submenu. - */ - - /* Get the pure document name from the input - */ - if (uFlags & SHARD_PIDL) { - SHGetPathFromIDListA((LPCITEMIDLIST) pv, doc_name); - } - else { - lstrcpyA(doc_name, (LPCSTR) pv); - } - TRACE("full document name %s\n", doc_name); - PathStripPathA(doc_name); - TRACE("stripped document name %s\n", doc_name); - - - /* *** JOB 1: Update registry for ...\Explorer\RecentDocs list *** */ - - { /* on input needs: - * doc_name - pure file-spec, no path - * link_dir - path to the user's Recent directory - * HCUbasekey - key of ...Windows\CurrentVersion\Explorer" node - * creates: - * new_lnk_name- pure file-spec, no path for new .lnk file - * new_lnk_filepath - * - path and file name of new .lnk file - */ - CREATEMRULISTA mymru; - HANDLE mruhandle; - INT len, pos, bufused, err; - INT i; - DWORD attr; - CHAR buffer[2048]; - CHAR *ptr; - CHAR old_lnk_name[MAX_PATH]; - short int slen; - - mymru.cbSize = sizeof(CREATEMRULISTA); - mymru.nMaxItems = 15; - mymru.dwFlags = MRUF_BINARY_LIST | MRUF_DELAYED_SAVE; - mymru.hKey = HCUbasekey; - mymru.lpszSubKey = "RecentDocs"; - mymru.lpfnCompare = &SHADD_compare_mru; - mruhandle = CreateMRUListA(&mymru); - if (!mruhandle) { - /* MRU failed */ - ERR("MRU processing failed, handle zero\n"); - RegCloseKey(HCUbasekey); - return; - } - len = lstrlenA(doc_name); - pos = FindMRUData(mruhandle, doc_name, len, 0); - - /* Now get the MRU entry that will be replaced - * and delete the .lnk file for it - */ - if ((bufused = EnumMRUListA(mruhandle, (pos == -1) ? 14 : pos, - buffer, 2048)) != -1) { - ptr = buffer; - ptr += (lstrlenA(buffer) + 1); - slen = *((short int*)ptr); - ptr += 2; /* skip the length area */ - if (bufused >= slen + (ptr-buffer)) { - /* buffer size looks good */ - ptr += 12; /* get to string */ - len = bufused - (ptr-buffer); /* get length of buf remaining */ - if ((lstrlenA(ptr) > 0) && (lstrlenA(ptr) <= len-1)) { - /* appears to be good string */ - lstrcpyA(old_lnk_name, link_dir); - PathAppendA(old_lnk_name, ptr); - if (!DeleteFileA(old_lnk_name)) { - if ((attr = GetFileAttributesA(old_lnk_name)) == INVALID_FILE_ATTRIBUTES) { - if ((err = GetLastError()) != ERROR_FILE_NOT_FOUND) { - ERR("Delete for %s failed, err=%d, attr=%08lx\n", - old_lnk_name, err, attr); - } - else { - TRACE("old .lnk file %s did not exist\n", - old_lnk_name); - } - } - else { - ERR("Delete for %s failed, attr=%08lx\n", - old_lnk_name, attr); - } - } - else { - TRACE("deleted old .lnk file %s\n", old_lnk_name); - } - } - } - } - - /* Create usable .lnk file name for the "Recent" directory - */ - wsprintfA(new_lnk_name, "%s.lnk", doc_name); - lstrcpyA(new_lnk_filepath, link_dir); - PathAppendA(new_lnk_filepath, new_lnk_name); - i = 1; - olderrormode = SetErrorMode(SEM_FAILCRITICALERRORS); - while (GetFileAttributesA(new_lnk_filepath) != INVALID_FILE_ATTRIBUTES) { - i++; - wsprintfA(new_lnk_name, "%s (%u).lnk", doc_name, i); - lstrcpyA(new_lnk_filepath, link_dir); - PathAppendA(new_lnk_filepath, new_lnk_name); - } - SetErrorMode(olderrormode); - TRACE("new shortcut will be %s\n", new_lnk_filepath); - - /* Now add the new MRU entry and data - */ - pos = SHADD_create_add_mru_data(mruhandle, doc_name, new_lnk_name, - buffer, &len); - FreeMRUList(mruhandle); - TRACE("Updated MRU list, new doc is position %d\n", pos); - } - - /* *** JOB 2: Create shortcut in user's "Recent" directory *** */ - - { /* on input needs: - * doc_name - pure file-spec, no path - * new_lnk_filepath - * - path and file name of new .lnk file - * uFlags[in] - flags on call to SHAddToRecentDocs - * pv[in] - document path/pidl on call to SHAddToRecentDocs - */ - IShellLinkA *psl = NULL; - IPersistFile *pPf = NULL; - HRESULT hres; - CHAR desc[MAX_PATH]; - WCHAR widelink[MAX_PATH]; - - CoInitialize(0); - - hres = CoCreateInstance( &CLSID_ShellLink, - NULL, - CLSCTX_INPROC_SERVER, - &IID_IShellLinkA, - (LPVOID )&psl); - if(SUCCEEDED(hres)) { - - hres = IShellLinkA_QueryInterface(psl, &IID_IPersistFile, - (LPVOID *)&pPf); - if(FAILED(hres)) { - /* bombed */ - ERR("failed QueryInterface for IPersistFile %08lx\n", hres); - goto fail; - } - - /* Set the document path or pidl */ - if (uFlags & SHARD_PIDL) { - hres = IShellLinkA_SetIDList(psl, (LPCITEMIDLIST) pv); - } else { - hres = IShellLinkA_SetPath(psl, (LPCSTR) pv); - } - if(FAILED(hres)) { - /* bombed */ - ERR("failed Set{IDList|Path} %08lx\n", hres); - goto fail; - } - - lstrcpyA(desc, "Shortcut to "); - lstrcatA(desc, doc_name); - hres = IShellLinkA_SetDescription(psl, desc); - if(FAILED(hres)) { - /* bombed */ - ERR("failed SetDescription %08lx\n", hres); - goto fail; - } - - MultiByteToWideChar(CP_ACP, 0, new_lnk_filepath, -1, - widelink, MAX_PATH); - /* create the short cut */ - hres = IPersistFile_Save(pPf, widelink, TRUE); - if(FAILED(hres)) { - /* bombed */ - ERR("failed IPersistFile::Save %08lx\n", hres); - IPersistFile_Release(pPf); - IShellLinkA_Release(psl); - goto fail; - } - hres = IPersistFile_SaveCompleted(pPf, widelink); - IPersistFile_Release(pPf); - IShellLinkA_Release(psl); - TRACE("shortcut %s has been created, result=%08lx\n", - new_lnk_filepath, hres); - } - else { - ERR("CoCreateInstance failed, hres=%08lx\n", hres); - } - } - - fail: - CoUninitialize(); - - /* all done */ - RegCloseKey(HCUbasekey); - return; -} - -/************************************************************************* - * SHCreateShellFolderViewEx [SHELL32.174] - * - * NOTES - * see IShellFolder::CreateViewObject - */ -HRESULT WINAPI SHCreateShellFolderViewEx( - LPCSFV psvcbi, /* [in] shelltemplate struct */ - IShellView **ppv) /* [out] IShellView pointer */ -{ - IShellView * psf; - HRESULT hRes; - - TRACE("sf=%p pidl=%p cb=%p mode=0x%08x parm=%p\n", - psvcbi->pshf, psvcbi->pidl, psvcbi->pfnCallback, - psvcbi->fvm, psvcbi->psvOuter); - - psf = IShellView_Constructor(psvcbi->pshf); - - if (!psf) - return E_OUTOFMEMORY; - - IShellView_AddRef(psf); - hRes = IShellView_QueryInterface(psf, &IID_IShellView, (LPVOID *)ppv); - IShellView_Release(psf); - - return hRes; -} -/************************************************************************* - * SHWinHelp [SHELL32.127] - * - */ -HRESULT WINAPI SHWinHelp (DWORD v, DWORD w, DWORD x, DWORD z) -{ FIXME("0x%08lx 0x%08lx 0x%08lx 0x%08lx stub\n",v,w,x,z); - return 0; -} -/************************************************************************* - * SHRunControlPanel [SHELL32.161] - * - */ -HRESULT WINAPI SHRunControlPanel (DWORD x, DWORD z) -{ FIXME("0x%08lx 0x%08lx stub\n",x,z); - return 0; -} - -static LPUNKNOWN SHELL32_IExplorerInterface=0; -/************************************************************************* - * SHSetInstanceExplorer [SHELL32.176] - * - * NOTES - * Sets the interface - */ -HRESULT WINAPI SHSetInstanceExplorer (LPUNKNOWN lpUnknown) -{ TRACE("%p\n", lpUnknown); - SHELL32_IExplorerInterface = lpUnknown; - return (HRESULT) lpUnknown; -} -/************************************************************************* - * SHGetInstanceExplorer [SHELL32.@] - * - * NOTES - * gets the interface pointer of the explorer and a reference - */ -HRESULT WINAPI SHGetInstanceExplorer (LPUNKNOWN * lpUnknown) -{ TRACE("%p\n", lpUnknown); - - *lpUnknown = SHELL32_IExplorerInterface; - - if (!SHELL32_IExplorerInterface) - return E_FAIL; - - IUnknown_AddRef(SHELL32_IExplorerInterface); - return NOERROR; -} -/************************************************************************* - * SHFreeUnusedLibraries [SHELL32.123] - * - * NOTES - * exported by name - */ -void WINAPI SHFreeUnusedLibraries (void) -{ - FIXME("stub\n"); -} -/************************************************************************* - * DAD_AutoScroll [SHELL32.129] - * - */ -BOOL WINAPI DAD_AutoScroll(HWND hwnd, AUTO_SCROLL_DATA *samples, LPPOINT pt) -{ - FIXME("hwnd = %p %p %p\n",hwnd,samples,pt); - return 0; -} -/************************************************************************* - * DAD_DragEnter [SHELL32.130] - * - */ -BOOL WINAPI DAD_DragEnter(HWND hwnd) -{ - FIXME("hwnd = %p\n",hwnd); - return FALSE; -} -/************************************************************************* - * DAD_DragEnterEx [SHELL32.131] - * - */ -BOOL WINAPI DAD_DragEnterEx(HWND hwnd, POINT p) -{ - FIXME("hwnd = %p (%ld,%ld)\n",hwnd,p.x,p.y); - return FALSE; -} -/************************************************************************* - * DAD_DragMove [SHELL32.134] - * - */ -BOOL WINAPI DAD_DragMove(POINT p) -{ - FIXME("(%ld,%ld)\n",p.x,p.y); - return FALSE; -} -/************************************************************************* - * DAD_DragLeave [SHELL32.132] - * - */ -BOOL WINAPI DAD_DragLeave(VOID) -{ - FIXME("\n"); - return FALSE; -} -/************************************************************************* - * DAD_SetDragImage [SHELL32.136] - * - * NOTES - * exported by name - */ -BOOL WINAPI DAD_SetDragImage( - HIMAGELIST himlTrack, - LPPOINT lppt) -{ - FIXME("%p %p stub\n",himlTrack, lppt); - return 0; -} -/************************************************************************* - * DAD_ShowDragImage [SHELL32.137] - * - * NOTES - * exported by name - */ -BOOL WINAPI DAD_ShowDragImage(BOOL bShow) -{ - FIXME("0x%08x stub\n",bShow); - return 0; -} - -static const WCHAR szwCabLocation[] = { - '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','\\', - 'E','x','p','l','o','r','e','r','\\', - 'C','a','b','i','n','e','t','S','t','a','t','e',0 -}; - -static const WCHAR szwSettings[] = { 'S','e','t','t','i','n','g','s',0 }; - -/************************************************************************* - * ReadCabinetState [SHELL32.651] NT 4.0 - * - */ -BOOL WINAPI ReadCabinetState(CABINETSTATE *cs, int length) -{ - HKEY hkey = 0; - DWORD type, r; - - TRACE("%p %d \n",cs,length); - - if( (cs == NULL) || (length < (int)sizeof(*cs)) ) - return FALSE; - - r = RegOpenKeyW( HKEY_CURRENT_USER, szwCabLocation, &hkey ); - if( r == ERROR_SUCCESS ) - { - type = REG_BINARY; - r = RegQueryValueExW( hkey, szwSettings, - NULL, &type, (LPBYTE)cs, (LPDWORD)&length ); - RegCloseKey( hkey ); - - } - - /* if we can't read from the registry, create default values */ - if ( (r != ERROR_SUCCESS) || (cs->cLength < sizeof(*cs)) || - (cs->cLength != length) ) - { - ERR("Initializing shell cabinet settings\n"); - memset(cs, 0, sizeof(*cs)); - cs->cLength = sizeof(*cs); - cs->nVersion = 2; - cs->fFullPathTitle = FALSE; - cs->fSaveLocalView = TRUE; - cs->fNotShell = FALSE; - cs->fSimpleDefault = TRUE; - cs->fDontShowDescBar = FALSE; - cs->fNewWindowMode = FALSE; - cs->fShowCompColor = FALSE; - cs->fDontPrettyNames = FALSE; - cs->fAdminsCreateCommonGroups = TRUE; - cs->fMenuEnumFilter = 96; - } - - return TRUE; -} - -/************************************************************************* - * WriteCabinetState [SHELL32.652] NT 4.0 - * - */ -BOOL WINAPI WriteCabinetState(CABINETSTATE *cs) -{ - DWORD r; - HKEY hkey = 0; - - TRACE("%p\n",cs); - - if( cs == NULL ) - return FALSE; - - r = RegCreateKeyExW( HKEY_CURRENT_USER, szwCabLocation, 0, - NULL, 0, KEY_ALL_ACCESS, NULL, &hkey, NULL); - if( r == ERROR_SUCCESS ) - { - r = RegSetValueExW( hkey, szwSettings, 0, - REG_BINARY, (LPBYTE) cs, cs->cLength); - - RegCloseKey( hkey ); - } - - return (r==ERROR_SUCCESS); -} - -/************************************************************************* - * FileIconInit [SHELL32.660] - * - */ -BOOL WINAPI FileIconInit(BOOL bFullInit) -{ FIXME("(%s)\n", bFullInit ? "true" : "false"); - return 0; -} -/************************************************************************* - * IsUserAdmin [SHELL32.680] NT 4.0 - * - */ -HRESULT WINAPI IsUserAdmin(void) -{ FIXME("stub\n"); - return TRUE; -} - -/************************************************************************* - * SHAllocShared [SHELL32.520] - * - * See shlwapi.SHAllocShared - */ -HANDLE WINAPI SHAllocShared(LPVOID lpvData, DWORD dwSize, DWORD dwProcId) -{ - GET_FUNC(pSHAllocShared, shlwapi, (char*)7, NULL); - return pSHAllocShared(lpvData, dwSize, dwProcId); -} - -/************************************************************************* - * SHLockShared [SHELL32.521] - * - * See shlwapi.SHLockShared - */ -LPVOID WINAPI SHLockShared(HANDLE hShared, DWORD dwProcId) -{ - GET_FUNC(pSHLockShared, shlwapi, (char*)8, NULL); - return pSHLockShared(hShared, dwProcId); -} - -/************************************************************************* - * SHUnlockShared [SHELL32.522] - * - * See shlwapi.SHUnlockShared - */ -BOOL WINAPI SHUnlockShared(LPVOID lpView) -{ - GET_FUNC(pSHUnlockShared, shlwapi, (char*)9, FALSE); - return pSHUnlockShared(lpView); -} - -/************************************************************************* - * SHFreeShared [SHELL32.523] - * - * See shlwapi.SHFreeShared - */ -BOOL WINAPI SHFreeShared(HANDLE hShared, DWORD dwProcId) -{ - GET_FUNC(pSHFreeShared, shlwapi, (char*)10, FALSE); - return pSHFreeShared(hShared, dwProcId); -} - -/************************************************************************* - * SetAppStartingCursor [SHELL32.99] - */ -HRESULT WINAPI SetAppStartingCursor(HWND u, DWORD v) -{ FIXME("hwnd=%p 0x%04lx stub\n",u,v ); - return 0; -} -/************************************************************************* - * SHLoadOLE [SHELL32.151] - * - */ -HRESULT WINAPI SHLoadOLE(LPARAM lParam) -{ FIXME("0x%04lx stub\n",lParam); - return S_OK; -} -/************************************************************************* - * DriveType [SHELL32.64] - * - */ -HRESULT WINAPI DriveType(DWORD u) -{ FIXME("0x%04lx stub\n",u); - return 0; -} -/************************************************************************* - * SHAbortInvokeCommand [SHELL32.198] - * - */ -HRESULT WINAPI SHAbortInvokeCommand(void) -{ FIXME("stub\n"); - return 1; -} -/************************************************************************* - * SHOutOfMemoryMessageBox [SHELL32.126] - * - */ -int WINAPI SHOutOfMemoryMessageBox( - HWND hwndOwner, - LPCSTR lpCaption, - UINT uType) -{ - FIXME("%p %s 0x%08x stub\n",hwndOwner, lpCaption, uType); - return 0; -} -/************************************************************************* - * SHFlushClipboard [SHELL32.121] - * - */ -HRESULT WINAPI SHFlushClipboard(void) -{ FIXME("stub\n"); - return 1; -} - -/************************************************************************* - * SHWaitForFileToOpen [SHELL32.97] - * - */ -BOOL WINAPI SHWaitForFileToOpen( - LPCITEMIDLIST pidl, - DWORD dwFlags, - DWORD dwTimeout) -{ - FIXME("%p 0x%08lx 0x%08lx stub\n", pidl, dwFlags, dwTimeout); - return 0; -} - -/************************************************************************ - * @ [SHELL32.654] - * - * NOTES: first parameter seems to be a pointer (same as passed to WriteCabinetState) - * second one could be a size (0x0c). The size is the same as the structure saved to - * HCU\Software\Microsoft\Windows\CurrentVersion\Explorer\CabinetState - * I'm (js) guessing: this one is just ReadCabinetState ;-) - */ -HRESULT WINAPI shell32_654 (CABINETSTATE *cs, int length) -{ - TRACE("%p %d\n",cs,length); - return ReadCabinetState(cs,length); -} - -/************************************************************************ - * RLBuildListOfPaths [SHELL32.146] - * - * NOTES - * builds a DPA - */ -DWORD WINAPI RLBuildListOfPaths (void) -{ FIXME("stub\n"); - return 0; -} -/************************************************************************ - * SHValidateUNC [SHELL32.173] - * - */ -HRESULT WINAPI SHValidateUNC (DWORD x, DWORD y, DWORD z) -{ - FIXME("0x%08lx 0x%08lx 0x%08lx stub\n",x,y,z); - return 0; -} - -/************************************************************************ - * DoEnvironmentSubstA [SHELL32.@] - * - */ -HRESULT WINAPI DoEnvironmentSubstA(LPSTR x, LPSTR y) -{ - FIXME("(%s, %s) stub\n", debugstr_a(x), debugstr_a(y)); - return 0; -} - -/************************************************************************ - * DoEnvironmentSubstW [SHELL32.@] - * - */ -HRESULT WINAPI DoEnvironmentSubstW(LPWSTR x, LPWSTR y) -{ - FIXME("(%s, %s): stub\n", debugstr_w(x), debugstr_w(y)); - return 0; -} - -/************************************************************************ - * DoEnvironmentSubst [SHELL32.53] - * - */ -HRESULT WINAPI DoEnvironmentSubstAW(LPVOID x, LPVOID y) -{ - if (SHELL_OsIsUnicode()) - return DoEnvironmentSubstW(x, y); - return DoEnvironmentSubstA(x, y); -} - -/************************************************************************* - * @ [SHELL32.243] - * - * Win98+ by-ordinal routine. In Win98 this routine returns zero and - * does nothing else. Possibly this does something in NT or SHELL32 5.0? - * - */ - -BOOL WINAPI shell32_243(DWORD a, DWORD b) -{ - return FALSE; -} - -/************************************************************************* - * @ [SHELL32.714] - */ -DWORD WINAPI SHELL32_714(LPVOID x) -{ - FIXME("(%s)stub\n", debugstr_w(x)); - return 0; -} - -/************************************************************************* - * SHAddFromPropSheetExtArray [SHELL32.167] - */ -DWORD WINAPI SHAddFromPropSheetExtArray(DWORD a, DWORD b, DWORD c) -{ - FIXME("(%08lx,%08lx,%08lx)stub\n", a, b, c); - return 0; -} - -/************************************************************************* - * SHCreatePropSheetExtArray [SHELL32.168] - */ -DWORD WINAPI SHCreatePropSheetExtArray(DWORD a, LPCSTR b, DWORD c) -{ - FIXME("(%08lx,%s,%08lx)stub\n", a, debugstr_a(b), c); - return 0; -} - -/************************************************************************* - * SHReplaceFromPropSheetExtArray [SHELL32.170] - */ -DWORD WINAPI SHReplaceFromPropSheetExtArray(DWORD a, DWORD b, DWORD c, DWORD d) -{ - FIXME("(%08lx,%08lx,%08lx,%08lx)stub\n", a, b, c, d); - return 0; -} - -/************************************************************************* - * SHDestroyPropSheetExtArray [SHELL32.169] - */ -DWORD WINAPI SHDestroyPropSheetExtArray(DWORD a) -{ - FIXME("(%08lx)stub\n", a); - return 0; -} - -/************************************************************************* - * CIDLData_CreateFromIDArray [SHELL32.83] - * - * Create IDataObject from PIDLs?? - */ -HRESULT WINAPI CIDLData_CreateFromIDArray( - LPCITEMIDLIST pidlFolder, - DWORD cpidlFiles, - LPCITEMIDLIST *lppidlFiles, - LPDATAOBJECT *ppdataObject) -{ - UINT i; - HWND hwnd = 0; /*FIXME: who should be hwnd of owner? set to desktop */ - - TRACE("(%p, %ld, %p, %p)\n", pidlFolder, cpidlFiles, lppidlFiles, ppdataObject); - if (TRACE_ON(pidl)) - { - pdump (pidlFolder); - for (i=0; ii64Size = 0; - pSHQueryRBInfo->i64NumItems = 0; - - return S_OK; -} - -HRESULT WINAPI SHQueryRecycleBinW(LPCWSTR pszRootPath, LPSHQUERYRBINFO pSHQueryRBInfo) -{ - FIXME("%s, %p - stub\n", debugstr_w(pszRootPath), pSHQueryRBInfo); - - pSHQueryRBInfo->i64Size = 0; - pSHQueryRBInfo->i64NumItems = 0; - - return S_OK; -} +/* + * The parameters of many functions changes between different OS versions + * (NT uses Unicode strings, 95 uses ASCII strings) + * + * Copyright 1997 Marcus Meissner + * 1998 Jürgen Schmied + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#include "config.h" + +#include +#include +#include + +#define COBJMACROS + +#include "winerror.h" +#include "windef.h" +#include "winbase.h" +#include "winreg.h" +#include "wine/debug.h" +#include "winnls.h" + +#include "shellapi.h" +#include "objbase.h" +#include "shlguid.h" +#include "wingdi.h" +#include "winuser.h" +#include "shlobj.h" +#include "shell32_main.h" +#include "undocshell.h" +#include "pidl.h" +#include "shlwapi.h" +#include "commdlg.h" + +WINE_DEFAULT_DEBUG_CHANNEL(shell); +WINE_DECLARE_DEBUG_CHANNEL(pidl); + +/* FIXME: !!! move CREATEMRULIST and flags to header file !!! */ +/* !!! it is in both here and comctl32undoc.c !!! */ +typedef struct tagCREATEMRULIST +{ + DWORD cbSize; /* size of struct */ + DWORD nMaxItems; /* max no. of items in list */ + DWORD dwFlags; /* see below */ + HKEY hKey; /* root reg. key under which list is saved */ + LPCSTR lpszSubKey; /* reg. subkey */ + PROC lpfnCompare; /* item compare proc */ +} CREATEMRULISTA, *LPCREATEMRULISTA; + +/* dwFlags */ +#define MRUF_STRING_LIST 0 /* list will contain strings */ +#define MRUF_BINARY_LIST 1 /* list will contain binary data */ +#define MRUF_DELAYED_SAVE 2 /* only save list order to reg. is FreeMRUList */ + +extern HANDLE WINAPI CreateMRUListA(LPCREATEMRULISTA lpcml); +extern DWORD WINAPI FreeMRUList(HANDLE hMRUList); +extern INT WINAPI AddMRUData(HANDLE hList, LPCVOID lpData, DWORD cbData); +extern INT WINAPI FindMRUData(HANDLE hList, LPCVOID lpData, DWORD cbData, LPINT lpRegNum); +extern INT WINAPI EnumMRUListA(HANDLE hList, INT nItemPos, LPVOID lpBuffer, DWORD nBufferSize); + + +/* Get a function pointer from a DLL handle */ +#define GET_FUNC(func, module, name, fail) \ + do { \ + if (!func) { \ + if (!SHELL32_h##module && !(SHELL32_h##module = LoadLibraryA(#module ".dll"))) return fail; \ + func = (void*)GetProcAddress(SHELL32_h##module, name); \ + if (!func) return fail; \ + } \ + } while (0) + +/* Function pointers for GET_FUNC macro */ +static HMODULE SHELL32_hshlwapi=NULL; +static HANDLE (WINAPI *pSHAllocShared)(LPCVOID,DWORD,DWORD); +static LPVOID (WINAPI *pSHLockShared)(HANDLE,DWORD); +static BOOL (WINAPI *pSHUnlockShared)(LPVOID); +static BOOL (WINAPI *pSHFreeShared)(HANDLE,DWORD); + + +/************************************************************************* + * ParseFieldA [internal] + * + * copies a field from a ',' delimited string + * + * first field is nField = 1 + */ +DWORD WINAPI ParseFieldA( + LPCSTR src, + DWORD nField, + LPSTR dst, + DWORD len) +{ + WARN("(%s,0x%08lx,%p,%ld) semi-stub.\n",debugstr_a(src),nField,dst,len); + + if (!src || !src[0] || !dst || !len) + return 0; + + /* skip n fields delimited by ',' */ + while (nField > 1) + { + if (*src=='\0') return FALSE; + if (*(src++)==',') nField--; + } + + /* copy part till the next ',' to dst */ + while ( *src!='\0' && *src!=',' && (len--)>0 ) *(dst++)=*(src++); + + /* finalize the string */ + *dst=0x0; + + return TRUE; +} + +/************************************************************************* + * ParseFieldW [internal] + * + * copies a field from a ',' delimited string + * + * first field is nField = 1 + */ +DWORD WINAPI ParseFieldW(LPCWSTR src, DWORD nField, LPWSTR dst, DWORD len) +{ + WARN("(%s,0x%08lx,%p,%ld) semi-stub.\n", debugstr_w(src), nField, dst, len); + + if (!src || !src[0] || !dst || !len) + return 0; + + /* skip n fields delimited by ',' */ + while (nField > 1) + { + if (*src == 0x0) return FALSE; + if (*src++ == ',') nField--; + } + + /* copy part till the next ',' to dst */ + while ( *src != 0x0 && *src != ',' && (len--)>0 ) *(dst++) = *(src++); + + /* finalize the string */ + *dst = 0x0; + + return TRUE; +} + +/************************************************************************* + * ParseField [SHELL32.58] + */ +DWORD WINAPI ParseFieldAW(LPCVOID src, DWORD nField, LPVOID dst, DWORD len) +{ + if (SHELL_OsIsUnicode()) + return ParseFieldW(src, nField, dst, len); + return ParseFieldA(src, nField, dst, len); +} + +/************************************************************************* + * GetFileNameFromBrowse [SHELL32.63] + * + */ +BOOL WINAPI GetFileNameFromBrowse( + HWND hwndOwner, + LPSTR lpstrFile, + DWORD nMaxFile, + LPCSTR lpstrInitialDir, + LPCSTR lpstrDefExt, + LPCSTR lpstrFilter, + LPCSTR lpstrTitle) +{ + HMODULE hmodule; + FARPROC pGetOpenFileNameA; + OPENFILENAMEA ofn; + BOOL ret; + + TRACE("%p, %s, %ld, %s, %s, %s, %s)\n", + hwndOwner, lpstrFile, nMaxFile, lpstrInitialDir, lpstrDefExt, + lpstrFilter, lpstrTitle); + + hmodule = LoadLibraryA("comdlg32.dll"); + if(!hmodule) return FALSE; + pGetOpenFileNameA = GetProcAddress(hmodule, "GetOpenFileNameA"); + if(!pGetOpenFileNameA) + { + FreeLibrary(hmodule); + return FALSE; + } + + memset(&ofn, 0, sizeof(ofn)); + + ofn.lStructSize = sizeof(ofn); + ofn.hwndOwner = hwndOwner; + ofn.lpstrFilter = lpstrFilter; + ofn.lpstrFile = lpstrFile; + ofn.nMaxFile = nMaxFile; + ofn.lpstrInitialDir = lpstrInitialDir; + ofn.lpstrTitle = lpstrTitle; + ofn.lpstrDefExt = lpstrDefExt; + ofn.Flags = OFN_EXPLORER | OFN_HIDEREADONLY | OFN_FILEMUSTEXIST; + ret = pGetOpenFileNameA(&ofn); + + FreeLibrary(hmodule); + return ret; +} + +/************************************************************************* + * SHGetSetSettings [SHELL32.68] + */ +VOID WINAPI SHGetSetSettings(LPSHELLSTATE lpss, DWORD dwMask, BOOL bSet) +{ + if(bSet) + { + FIXME("%p 0x%08lx TRUE\n", lpss, dwMask); + } + else + { + SHGetSettings((LPSHELLFLAGSTATE)lpss,dwMask); + } +} + +/************************************************************************* + * SHGetSettings [SHELL32.@] + * + * NOTES + * the registry path are for win98 (tested) + * and possibly are the same in nt40 + * + */ +VOID WINAPI SHGetSettings(LPSHELLFLAGSTATE lpsfs, DWORD dwMask) +{ + HKEY hKey; + DWORD dwData; + DWORD dwDataSize = sizeof (DWORD); + + TRACE("(%p 0x%08lx)\n",lpsfs,dwMask); + + if (RegCreateKeyExA(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced", + 0, 0, 0, KEY_ALL_ACCESS, 0, &hKey, 0)) + return; + + if ( (SSF_SHOWEXTENSIONS & dwMask) && !RegQueryValueExA(hKey, "HideFileExt", 0, 0, (LPBYTE)&dwData, &dwDataSize)) + lpsfs->fShowExtensions = ((dwData == 0) ? 0 : 1); + + if ( (SSF_SHOWINFOTIP & dwMask) && !RegQueryValueExA(hKey, "ShowInfoTip", 0, 0, (LPBYTE)&dwData, &dwDataSize)) + lpsfs->fShowInfoTip = ((dwData == 0) ? 0 : 1); + + if ( (SSF_DONTPRETTYPATH & dwMask) && !RegQueryValueExA(hKey, "DontPrettyPath", 0, 0, (LPBYTE)&dwData, &dwDataSize)) + lpsfs->fDontPrettyPath = ((dwData == 0) ? 0 : 1); + + if ( (SSF_HIDEICONS & dwMask) && !RegQueryValueExA(hKey, "HideIcons", 0, 0, (LPBYTE)&dwData, &dwDataSize)) + lpsfs->fHideIcons = ((dwData == 0) ? 0 : 1); + + if ( (SSF_MAPNETDRVBUTTON & dwMask) && !RegQueryValueExA(hKey, "MapNetDrvBtn", 0, 0, (LPBYTE)&dwData, &dwDataSize)) + lpsfs->fMapNetDrvBtn = ((dwData == 0) ? 0 : 1); + + if ( (SSF_SHOWATTRIBCOL & dwMask) && !RegQueryValueExA(hKey, "ShowAttribCol", 0, 0, (LPBYTE)&dwData, &dwDataSize)) + lpsfs->fShowAttribCol = ((dwData == 0) ? 0 : 1); + + if (((SSF_SHOWALLOBJECTS | SSF_SHOWSYSFILES) & dwMask) && !RegQueryValueExA(hKey, "Hidden", 0, 0, (LPBYTE)&dwData, &dwDataSize)) + { if (dwData == 0) + { if (SSF_SHOWALLOBJECTS & dwMask) lpsfs->fShowAllObjects = 0; + if (SSF_SHOWSYSFILES & dwMask) lpsfs->fShowSysFiles = 0; + } + else if (dwData == 1) + { if (SSF_SHOWALLOBJECTS & dwMask) lpsfs->fShowAllObjects = 1; + if (SSF_SHOWSYSFILES & dwMask) lpsfs->fShowSysFiles = 0; + } + else if (dwData == 2) + { if (SSF_SHOWALLOBJECTS & dwMask) lpsfs->fShowAllObjects = 0; + if (SSF_SHOWSYSFILES & dwMask) lpsfs->fShowSysFiles = 1; + } + } + RegCloseKey (hKey); + + TRACE("-- 0x%04x\n", *(WORD*)lpsfs); +} + +/************************************************************************* + * SHShellFolderView_Message [SHELL32.73] + * + * Send a message to an explorer cabinet window. + * + * PARAMS + * hwndCabinet [I] The window containing the shellview to communicate with + * dwMessage [I] The SFVM message to send + * dwParam [I] Message parameter + * + * RETURNS + * fixme. + * + * NOTES + * Message SFVM_REARRANGE = 1 + * + * This message gets sent when a column gets clicked to instruct the + * shell view to re-sort the item list. dwParam identifies the column + * that was clicked. + */ +LRESULT WINAPI SHShellFolderView_Message( + HWND hwndCabinet, + UINT uMessage, + LPARAM lParam) +{ + FIXME("%p %08x %08lx stub\n",hwndCabinet, uMessage, lParam); + return 0; +} + +/************************************************************************* + * RegisterShellHook [SHELL32.181] + * + * Register a shell hook. + * + * PARAMS + * hwnd [I] Window handle + * dwType [I] Type of hook. + * + * NOTES + * Exported by ordinal + */ +BOOL WINAPI RegisterShellHook( + HWND hWnd, + DWORD dwType) +{ + FIXME("(%p,0x%08lx):stub.\n",hWnd, dwType); + return TRUE; +} + +/************************************************************************* + * ShellMessageBoxW [SHELL32.182] + * + * See ShellMessageBoxA. + */ +int WINAPIV ShellMessageBoxW( + HINSTANCE hInstance, + HWND hWnd, + LPCWSTR lpText, + LPCWSTR lpCaption, + UINT uType, + ...) +{ + WCHAR szText[100],szTitle[100]; + LPCWSTR pszText = szText, pszTitle = szTitle, pszTemp; + va_list args; + int ret; + + va_start(args, uType); + /* wvsprintfA(buf,fmt, args); */ + + TRACE("(%08lx,%08lx,%p,%p,%08x)\n", + (DWORD)hInstance,(DWORD)hWnd,lpText,lpCaption,uType); + + if (!HIWORD(lpCaption)) + LoadStringW(hInstance, (DWORD)lpCaption, szTitle, sizeof(szTitle)/sizeof(szTitle[0])); + else + pszTitle = lpCaption; + + if (!HIWORD(lpText)) + LoadStringW(hInstance, (DWORD)lpText, szText, sizeof(szText)/sizeof(szText[0])); + else + pszText = lpText; + + FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_STRING, + pszText, 0, 0, (LPWSTR)&pszTemp, 0, &args); + + va_end(args); + + ret = MessageBoxW(hWnd,pszTemp,pszTitle,uType); + LocalFree((HLOCAL)pszTemp); + return ret; +} + +/************************************************************************* + * ShellMessageBoxA [SHELL32.183] + * + * Format and output an error message. + * + * PARAMS + * hInstance [I] Instance handle of message creator + * hWnd [I] Window handle of message creator + * lpText [I] Resource Id of title or LPSTR + * lpCaption [I] Resource Id of title or LPSTR + * uType [I] Type of error message + * + * RETURNS + * A return value from MessageBoxA(). + * + * NOTES + * Exported by ordinal + */ +int WINAPIV ShellMessageBoxA( + HINSTANCE hInstance, + HWND hWnd, + LPCSTR lpText, + LPCSTR lpCaption, + UINT uType, + ...) +{ + char szText[100],szTitle[100]; + LPCSTR pszText = szText, pszTitle = szTitle, pszTemp; + va_list args; + int ret; + + va_start(args, uType); + /* wvsprintfA(buf,fmt, args); */ + + TRACE("(%08lx,%08lx,%p,%p,%08x)\n", + (DWORD)hInstance,(DWORD)hWnd,lpText,lpCaption,uType); + + if (!HIWORD(lpCaption)) + LoadStringA(hInstance, (DWORD)lpCaption, szTitle, sizeof(szTitle)); + else + pszTitle = lpCaption; + + if (!HIWORD(lpText)) + LoadStringA(hInstance, (DWORD)lpText, szText, sizeof(szText)); + else + pszText = lpText; + + FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_STRING, + pszText, 0, 0, (LPSTR)&pszTemp, 0, &args); + + va_end(args); + + ret = MessageBoxA(hWnd,pszTemp,pszTitle,uType); + LocalFree((HLOCAL)pszTemp); + return ret; +} + +/************************************************************************* + * SHRegisterDragDrop [SHELL32.86] + * + * NOTES + * exported by ordinal + */ +HRESULT WINAPI SHRegisterDragDrop( + HWND hWnd, + LPDROPTARGET pDropTarget) +{ + FIXME("(%p,%p):stub.\n", hWnd, pDropTarget); + return RegisterDragDrop(hWnd, pDropTarget); +} + +/************************************************************************* + * SHRevokeDragDrop [SHELL32.87] + * + * NOTES + * exported by ordinal + */ +HRESULT WINAPI SHRevokeDragDrop(HWND hWnd) +{ + FIXME("(%p):stub.\n",hWnd); + return RevokeDragDrop(hWnd); +} + +/************************************************************************* + * SHDoDragDrop [SHELL32.88] + * + * NOTES + * exported by ordinal + */ +HRESULT WINAPI SHDoDragDrop( + HWND hWnd, + LPDATAOBJECT lpDataObject, + LPDROPSOURCE lpDropSource, + DWORD dwOKEffect, + LPDWORD pdwEffect) +{ + FIXME("(%p %p %p 0x%08lx %p):stub.\n", + hWnd, lpDataObject, lpDropSource, dwOKEffect, pdwEffect); + return DoDragDrop(lpDataObject, lpDropSource, dwOKEffect, pdwEffect); +} + +/************************************************************************* + * ArrangeWindows [SHELL32.184] + * + */ +WORD WINAPI ArrangeWindows( + HWND hwndParent, + DWORD dwReserved, + LPCRECT lpRect, + WORD cKids, + CONST HWND * lpKids) +{ + FIXME("(%p 0x%08lx %p 0x%04x %p):stub.\n", + hwndParent, dwReserved, lpRect, cKids, lpKids); + return 0; +} + +/************************************************************************* + * SignalFileOpen [SHELL32.103] + * + * NOTES + * exported by ordinal + */ +DWORD WINAPI +SignalFileOpen (DWORD dwParam1) +{ + FIXME("(0x%08lx):stub.\n", dwParam1); + + return 0; +} + +/************************************************************************* + * SHADD_get_policy - helper function for SHAddToRecentDocs + * + * PARAMETERS + * policy [IN] policy name (null termed string) to find + * type [OUT] ptr to DWORD to receive type + * buffer [OUT] ptr to area to hold data retrieved + * len [IN/OUT] ptr to DWORD holding size of buffer and getting + * length filled + * + * RETURNS + * result of the SHQueryValueEx call + */ +static INT SHADD_get_policy(LPSTR policy, LPDWORD type, LPVOID buffer, LPDWORD len) +{ + HKEY Policy_basekey; + INT ret; + + /* Get the key for the policies location in the registry + */ + if (RegOpenKeyExA(HKEY_LOCAL_MACHINE, + "Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer", + 0, KEY_READ, &Policy_basekey)) { + + if (RegOpenKeyExA(HKEY_CURRENT_USER, + "Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer", + 0, KEY_READ, &Policy_basekey)) { + TRACE("No Explorer Policies location exists. Policy wanted=%s\n", + policy); + *len = 0; + return ERROR_FILE_NOT_FOUND; + } + } + + /* Retrieve the data if it exists + */ + ret = SHQueryValueExA(Policy_basekey, policy, 0, type, buffer, len); + RegCloseKey(Policy_basekey); + return ret; +} + + +/************************************************************************* + * SHADD_compare_mru - helper function for SHAddToRecentDocs + * + * PARAMETERS + * data1 [IN] data being looked for + * data2 [IN] data in MRU + * cbdata [IN] length from FindMRUData call (not used) + * + * RETURNS + * position within MRU list that data was added. + */ +static INT CALLBACK SHADD_compare_mru(LPCVOID data1, LPCVOID data2, DWORD cbData) +{ + return lstrcmpiA(data1, data2); +} + +/************************************************************************* + * SHADD_create_add_mru_data - helper function for SHAddToRecentDocs + * + * PARAMETERS + * mruhandle [IN] handle for created MRU list + * doc_name [IN] null termed pure doc name + * new_lnk_name [IN] null termed path and file name for .lnk file + * buffer [IN/OUT] 2048 byte area to consturct MRU data + * len [OUT] ptr to int to receive space used in buffer + * + * RETURNS + * position within MRU list that data was added. + */ +static INT SHADD_create_add_mru_data(HANDLE mruhandle, LPSTR doc_name, LPSTR new_lnk_name, + LPSTR buffer, INT *len) +{ + LPSTR ptr; + INT wlen; + + /*FIXME: Document: + * RecentDocs MRU data structure seems to be: + * +0h document file name w/ terminating 0h + * +nh short int w/ size of remaining + * +n+2h 02h 30h, or 01h 30h, or 00h 30h - unknown + * +n+4h 10 bytes zeros - unknown + * +n+eh shortcut file name w/ terminating 0h + * +n+e+nh 3 zero bytes - unknown + */ + + /* Create the MRU data structure for "RecentDocs" + */ + ptr = buffer; + lstrcpyA(ptr, doc_name); + ptr += (lstrlenA(buffer) + 1); + wlen= lstrlenA(new_lnk_name) + 1 + 12; + *((short int*)ptr) = wlen; + ptr += 2; /* step past the length */ + *(ptr++) = 0x30; /* unknown reason */ + *(ptr++) = 0; /* unknown, but can be 0x00, 0x01, 0x02 */ + memset(ptr, 0, 10); + ptr += 10; + lstrcpyA(ptr, new_lnk_name); + ptr += (lstrlenA(new_lnk_name) + 1); + memset(ptr, 0, 3); + ptr += 3; + *len = ptr - buffer; + + /* Add the new entry into the MRU list + */ + return AddMRUData(mruhandle, (LPCVOID)buffer, *len); +} + +/************************************************************************* + * SHAddToRecentDocs [SHELL32.@] + * + * PARAMETERS + * uFlags [IN] SHARD_PATH or SHARD_PIDL + * pv [IN] string or pidl, NULL clears the list + * + * NOTES + * exported by name + */ +void WINAPI SHAddToRecentDocs (UINT uFlags,LPCVOID pv) +{ +/* If list is a string list lpfnCompare has the following prototype + * int CALLBACK MRUCompareString(LPCSTR s1, LPCSTR s2) + * for binary lists the prototype is + * int CALLBACK MRUCompareBinary(LPCVOID data1, LPCVOID data2, DWORD cbData) + * where cbData is the no. of bytes to compare. + * Need to check what return value means identical - 0? + */ + + + UINT olderrormode; + HKEY HCUbasekey; + CHAR doc_name[MAX_PATH]; + CHAR link_dir[MAX_PATH]; + CHAR new_lnk_filepath[MAX_PATH]; + CHAR new_lnk_name[MAX_PATH]; + IMalloc *ppM; + LPITEMIDLIST pidl; + HWND hwnd = 0; /* FIXME: get real window handle */ + INT ret; + DWORD data[64], datalen, type; + + /*FIXME: Document: + * RecentDocs MRU data structure seems to be: + * +0h document file name w/ terminating 0h + * +nh short int w/ size of remaining + * +n+2h 02h 30h, or 01h 30h, or 00h 30h - unknown + * +n+4h 10 bytes zeros - unknown + * +n+eh shortcut file name w/ terminating 0h + * +n+e+nh 3 zero bytes - unknown + */ + + /* See if we need to do anything. + */ + datalen = 64; + ret=SHADD_get_policy( "NoRecentDocsHistory", &type, &data, &datalen); + if ((ret > 0) && (ret != ERROR_FILE_NOT_FOUND)) { + ERR("Error %d getting policy \"NoRecentDocsHistory\"\n", ret); + return; + } + if (ret == ERROR_SUCCESS) { + if (!( (type == REG_DWORD) || + ((type == REG_BINARY) && (datalen == 4)) )) { + ERR("Error policy data for \"NoRecentDocsHistory\" not formated correctly, type=%ld, len=%ld\n", + type, datalen); + return; + } + + TRACE("policy value for NoRecentDocsHistory = %08lx\n", data[0]); + /* now test the actual policy value */ + if ( data[0] != 0) + return; + } + + /* Open key to where the necessary info is + */ + /* FIXME: This should be done during DLL PROCESS_ATTACH (or THREAD_ATTACH) + * and the close should be done during the _DETACH. The resulting + * key is stored in the DLL global data. + */ + if (RegCreateKeyExA(HKEY_CURRENT_USER, + "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer", + 0, 0, 0, KEY_READ, 0, &HCUbasekey, 0)) { + ERR("Failed to create 'Software\\Microsoft\\Windows\\CurrentVersion\\Explorer'\n"); + return; + } + + /* Get path to user's "Recent" directory + */ + if(SUCCEEDED(SHGetMalloc(&ppM))) { + if (SUCCEEDED(SHGetSpecialFolderLocation(hwnd, CSIDL_RECENT, + &pidl))) { + SHGetPathFromIDListA(pidl, link_dir); + IMalloc_Free(ppM, pidl); + } + else { + /* serious issues */ + link_dir[0] = 0; + ERR("serious issues 1\n"); + } + IMalloc_Release(ppM); + } + else { + /* serious issues */ + link_dir[0] = 0; + ERR("serious issues 2\n"); + } + TRACE("Users Recent dir %s\n", link_dir); + + /* If no input, then go clear the lists */ + if (!pv) { + /* clear user's Recent dir + */ + + /* FIXME: delete all files in "link_dir" + * + * while( more files ) { + * lstrcpyA(old_lnk_name, link_dir); + * PathAppendA(old_lnk_name, filenam); + * DeleteFileA(old_lnk_name); + * } + */ + FIXME("should delete all files in %s\\ \n", link_dir); + + /* clear MRU list + */ + /* MS Bug ?? v4.72.3612.1700 of shell32 does the delete against + * HKEY_LOCAL_MACHINE version of ...CurrentVersion\Explorer + * and naturally it fails w/ rc=2. It should do it against + * HKEY_CURRENT_USER which is where it is stored, and where + * the MRU routines expect it!!!! + */ + RegDeleteKeyA(HCUbasekey, "RecentDocs"); + RegCloseKey(HCUbasekey); + return; + } + + /* Have data to add, the jobs to be done: + * 1. Add document to MRU list in registry "HKCU\Software\ + * Microsoft\Windows\CurrentVersion\Explorer\RecentDocs". + * 2. Add shortcut to document in the user's Recent directory + * (CSIDL_RECENT). + * 3. Add shortcut to Start menu's Documents submenu. + */ + + /* Get the pure document name from the input + */ + if (uFlags & SHARD_PIDL) { + SHGetPathFromIDListA((LPCITEMIDLIST) pv, doc_name); + } + else { + lstrcpyA(doc_name, (LPCSTR) pv); + } + TRACE("full document name %s\n", doc_name); + PathStripPathA(doc_name); + TRACE("stripped document name %s\n", doc_name); + + + /* *** JOB 1: Update registry for ...\Explorer\RecentDocs list *** */ + + { /* on input needs: + * doc_name - pure file-spec, no path + * link_dir - path to the user's Recent directory + * HCUbasekey - key of ...Windows\CurrentVersion\Explorer" node + * creates: + * new_lnk_name- pure file-spec, no path for new .lnk file + * new_lnk_filepath + * - path and file name of new .lnk file + */ + CREATEMRULISTA mymru; + HANDLE mruhandle; + INT len, pos, bufused, err; + INT i; + DWORD attr; + CHAR buffer[2048]; + CHAR *ptr; + CHAR old_lnk_name[MAX_PATH]; + short int slen; + + mymru.cbSize = sizeof(CREATEMRULISTA); + mymru.nMaxItems = 15; + mymru.dwFlags = MRUF_BINARY_LIST | MRUF_DELAYED_SAVE; + mymru.hKey = HCUbasekey; + mymru.lpszSubKey = "RecentDocs"; + mymru.lpfnCompare = &SHADD_compare_mru; + mruhandle = CreateMRUListA(&mymru); + if (!mruhandle) { + /* MRU failed */ + ERR("MRU processing failed, handle zero\n"); + RegCloseKey(HCUbasekey); + return; + } + len = lstrlenA(doc_name); + pos = FindMRUData(mruhandle, doc_name, len, 0); + + /* Now get the MRU entry that will be replaced + * and delete the .lnk file for it + */ + if ((bufused = EnumMRUListA(mruhandle, (pos == -1) ? 14 : pos, + buffer, 2048)) != -1) { + ptr = buffer; + ptr += (lstrlenA(buffer) + 1); + slen = *((short int*)ptr); + ptr += 2; /* skip the length area */ + if (bufused >= slen + (ptr-buffer)) { + /* buffer size looks good */ + ptr += 12; /* get to string */ + len = bufused - (ptr-buffer); /* get length of buf remaining */ + if ((lstrlenA(ptr) > 0) && (lstrlenA(ptr) <= len-1)) { + /* appears to be good string */ + lstrcpyA(old_lnk_name, link_dir); + PathAppendA(old_lnk_name, ptr); + if (!DeleteFileA(old_lnk_name)) { + if ((attr = GetFileAttributesA(old_lnk_name)) == INVALID_FILE_ATTRIBUTES) { + if ((err = GetLastError()) != ERROR_FILE_NOT_FOUND) { + ERR("Delete for %s failed, err=%d, attr=%08lx\n", + old_lnk_name, err, attr); + } + else { + TRACE("old .lnk file %s did not exist\n", + old_lnk_name); + } + } + else { + ERR("Delete for %s failed, attr=%08lx\n", + old_lnk_name, attr); + } + } + else { + TRACE("deleted old .lnk file %s\n", old_lnk_name); + } + } + } + } + + /* Create usable .lnk file name for the "Recent" directory + */ + wsprintfA(new_lnk_name, "%s.lnk", doc_name); + lstrcpyA(new_lnk_filepath, link_dir); + PathAppendA(new_lnk_filepath, new_lnk_name); + i = 1; + olderrormode = SetErrorMode(SEM_FAILCRITICALERRORS); + while (GetFileAttributesA(new_lnk_filepath) != INVALID_FILE_ATTRIBUTES) { + i++; + wsprintfA(new_lnk_name, "%s (%u).lnk", doc_name, i); + lstrcpyA(new_lnk_filepath, link_dir); + PathAppendA(new_lnk_filepath, new_lnk_name); + } + SetErrorMode(olderrormode); + TRACE("new shortcut will be %s\n", new_lnk_filepath); + + /* Now add the new MRU entry and data + */ + pos = SHADD_create_add_mru_data(mruhandle, doc_name, new_lnk_name, + buffer, &len); + FreeMRUList(mruhandle); + TRACE("Updated MRU list, new doc is position %d\n", pos); + } + + /* *** JOB 2: Create shortcut in user's "Recent" directory *** */ + + { /* on input needs: + * doc_name - pure file-spec, no path + * new_lnk_filepath + * - path and file name of new .lnk file + * uFlags[in] - flags on call to SHAddToRecentDocs + * pv[in] - document path/pidl on call to SHAddToRecentDocs + */ + IShellLinkA *psl = NULL; + IPersistFile *pPf = NULL; + HRESULT hres; + CHAR desc[MAX_PATH]; + WCHAR widelink[MAX_PATH]; + + CoInitialize(0); + + hres = CoCreateInstance( &CLSID_ShellLink, + NULL, + CLSCTX_INPROC_SERVER, + &IID_IShellLinkA, + (LPVOID )&psl); + if(SUCCEEDED(hres)) { + + hres = IShellLinkA_QueryInterface(psl, &IID_IPersistFile, + (LPVOID *)&pPf); + if(FAILED(hres)) { + /* bombed */ + ERR("failed QueryInterface for IPersistFile %08lx\n", hres); + goto fail; + } + + /* Set the document path or pidl */ + if (uFlags & SHARD_PIDL) { + hres = IShellLinkA_SetIDList(psl, (LPCITEMIDLIST) pv); + } else { + hres = IShellLinkA_SetPath(psl, (LPCSTR) pv); + } + if(FAILED(hres)) { + /* bombed */ + ERR("failed Set{IDList|Path} %08lx\n", hres); + goto fail; + } + + lstrcpyA(desc, "Shortcut to "); + lstrcatA(desc, doc_name); + hres = IShellLinkA_SetDescription(psl, desc); + if(FAILED(hres)) { + /* bombed */ + ERR("failed SetDescription %08lx\n", hres); + goto fail; + } + + MultiByteToWideChar(CP_ACP, 0, new_lnk_filepath, -1, + widelink, MAX_PATH); + /* create the short cut */ + hres = IPersistFile_Save(pPf, widelink, TRUE); + if(FAILED(hres)) { + /* bombed */ + ERR("failed IPersistFile::Save %08lx\n", hres); + IPersistFile_Release(pPf); + IShellLinkA_Release(psl); + goto fail; + } + hres = IPersistFile_SaveCompleted(pPf, widelink); + IPersistFile_Release(pPf); + IShellLinkA_Release(psl); + TRACE("shortcut %s has been created, result=%08lx\n", + new_lnk_filepath, hres); + } + else { + ERR("CoCreateInstance failed, hres=%08lx\n", hres); + } + } + + fail: + CoUninitialize(); + + /* all done */ + RegCloseKey(HCUbasekey); + return; +} + +/************************************************************************* + * SHCreateShellFolderViewEx [SHELL32.174] + * + * NOTES + * see IShellFolder::CreateViewObject + */ +HRESULT WINAPI SHCreateShellFolderViewEx( + LPCSFV psvcbi, /* [in] shelltemplate struct */ + IShellView **ppv) /* [out] IShellView pointer */ +{ + IShellView * psf; + HRESULT hRes; + + TRACE("sf=%p pidl=%p cb=%p mode=0x%08x parm=%p\n", + psvcbi->pshf, psvcbi->pidl, psvcbi->pfnCallback, + psvcbi->fvm, psvcbi->psvOuter); + + psf = IShellView_Constructor(psvcbi->pshf); + + if (!psf) + return E_OUTOFMEMORY; + + IShellView_AddRef(psf); + hRes = IShellView_QueryInterface(psf, &IID_IShellView, (LPVOID *)ppv); + IShellView_Release(psf); + + return hRes; +} +/************************************************************************* + * SHWinHelp [SHELL32.127] + * + */ +HRESULT WINAPI SHWinHelp (DWORD v, DWORD w, DWORD x, DWORD z) +{ FIXME("0x%08lx 0x%08lx 0x%08lx 0x%08lx stub\n",v,w,x,z); + return 0; +} +/************************************************************************* + * SHRunControlPanel [SHELL32.161] + * + */ +HRESULT WINAPI SHRunControlPanel (DWORD x, DWORD z) +{ FIXME("0x%08lx 0x%08lx stub\n",x,z); + return 0; +} + +static LPUNKNOWN SHELL32_IExplorerInterface=0; +/************************************************************************* + * SHSetInstanceExplorer [SHELL32.176] + * + * NOTES + * Sets the interface + */ +HRESULT WINAPI SHSetInstanceExplorer (LPUNKNOWN lpUnknown) +{ TRACE("%p\n", lpUnknown); + SHELL32_IExplorerInterface = lpUnknown; + return (HRESULT) lpUnknown; +} +/************************************************************************* + * SHGetInstanceExplorer [SHELL32.@] + * + * NOTES + * gets the interface pointer of the explorer and a reference + */ +HRESULT WINAPI SHGetInstanceExplorer (LPUNKNOWN * lpUnknown) +{ TRACE("%p\n", lpUnknown); + + *lpUnknown = SHELL32_IExplorerInterface; + + if (!SHELL32_IExplorerInterface) + return E_FAIL; + + IUnknown_AddRef(SHELL32_IExplorerInterface); + return NOERROR; +} +/************************************************************************* + * SHFreeUnusedLibraries [SHELL32.123] + * + * NOTES + * exported by name + */ +void WINAPI SHFreeUnusedLibraries (void) +{ + FIXME("stub\n"); +} +/************************************************************************* + * DAD_AutoScroll [SHELL32.129] + * + */ +BOOL WINAPI DAD_AutoScroll(HWND hwnd, AUTO_SCROLL_DATA *samples, LPPOINT pt) +{ + FIXME("hwnd = %p %p %p\n",hwnd,samples,pt); + return 0; +} +/************************************************************************* + * DAD_DragEnter [SHELL32.130] + * + */ +BOOL WINAPI DAD_DragEnter(HWND hwnd) +{ + FIXME("hwnd = %p\n",hwnd); + return FALSE; +} +/************************************************************************* + * DAD_DragEnterEx [SHELL32.131] + * + */ +BOOL WINAPI DAD_DragEnterEx(HWND hwnd, POINT p) +{ + FIXME("hwnd = %p (%ld,%ld)\n",hwnd,p.x,p.y); + return FALSE; +} +/************************************************************************* + * DAD_DragMove [SHELL32.134] + * + */ +BOOL WINAPI DAD_DragMove(POINT p) +{ + FIXME("(%ld,%ld)\n",p.x,p.y); + return FALSE; +} +/************************************************************************* + * DAD_DragLeave [SHELL32.132] + * + */ +BOOL WINAPI DAD_DragLeave(VOID) +{ + FIXME("\n"); + return FALSE; +} +/************************************************************************* + * DAD_SetDragImage [SHELL32.136] + * + * NOTES + * exported by name + */ +BOOL WINAPI DAD_SetDragImage( + HIMAGELIST himlTrack, + LPPOINT lppt) +{ + FIXME("%p %p stub\n",himlTrack, lppt); + return 0; +} +/************************************************************************* + * DAD_ShowDragImage [SHELL32.137] + * + * NOTES + * exported by name + */ +BOOL WINAPI DAD_ShowDragImage(BOOL bShow) +{ + FIXME("0x%08x stub\n",bShow); + return 0; +} + +static const WCHAR szwCabLocation[] = { + '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','\\', + 'E','x','p','l','o','r','e','r','\\', + 'C','a','b','i','n','e','t','S','t','a','t','e',0 +}; + +static const WCHAR szwSettings[] = { 'S','e','t','t','i','n','g','s',0 }; + +/************************************************************************* + * ReadCabinetState [SHELL32.651] NT 4.0 + * + */ +BOOL WINAPI ReadCabinetState(CABINETSTATE *cs, int length) +{ + HKEY hkey = 0; + DWORD type, r; + + TRACE("%p %d \n",cs,length); + + if( (cs == NULL) || (length < (int)sizeof(*cs)) ) + return FALSE; + + r = RegOpenKeyW( HKEY_CURRENT_USER, szwCabLocation, &hkey ); + if( r == ERROR_SUCCESS ) + { + type = REG_BINARY; + r = RegQueryValueExW( hkey, szwSettings, + NULL, &type, (LPBYTE)cs, (LPDWORD)&length ); + RegCloseKey( hkey ); + + } + + /* if we can't read from the registry, create default values */ + if ( (r != ERROR_SUCCESS) || (cs->cLength < sizeof(*cs)) || + (cs->cLength != length) ) + { + ERR("Initializing shell cabinet settings\n"); + memset(cs, 0, sizeof(*cs)); + cs->cLength = sizeof(*cs); + cs->nVersion = 2; + cs->fFullPathTitle = FALSE; + cs->fSaveLocalView = TRUE; + cs->fNotShell = FALSE; + cs->fSimpleDefault = TRUE; + cs->fDontShowDescBar = FALSE; + cs->fNewWindowMode = FALSE; + cs->fShowCompColor = FALSE; + cs->fDontPrettyNames = FALSE; + cs->fAdminsCreateCommonGroups = TRUE; + cs->fMenuEnumFilter = 96; + } + + return TRUE; +} + +/************************************************************************* + * WriteCabinetState [SHELL32.652] NT 4.0 + * + */ +BOOL WINAPI WriteCabinetState(CABINETSTATE *cs) +{ + DWORD r; + HKEY hkey = 0; + + TRACE("%p\n",cs); + + if( cs == NULL ) + return FALSE; + + r = RegCreateKeyExW( HKEY_CURRENT_USER, szwCabLocation, 0, + NULL, 0, KEY_ALL_ACCESS, NULL, &hkey, NULL); + if( r == ERROR_SUCCESS ) + { + r = RegSetValueExW( hkey, szwSettings, 0, + REG_BINARY, (LPBYTE) cs, cs->cLength); + + RegCloseKey( hkey ); + } + + return (r==ERROR_SUCCESS); +} + +/************************************************************************* + * FileIconInit [SHELL32.660] + * + */ +BOOL WINAPI FileIconInit(BOOL bFullInit) +{ FIXME("(%s)\n", bFullInit ? "true" : "false"); + return 0; +} +/************************************************************************* + * IsUserAdmin [SHELL32.680] NT 4.0 + * + */ +HRESULT WINAPI IsUserAdmin(void) +{ FIXME("stub\n"); + return TRUE; +} + +/************************************************************************* + * SHAllocShared [SHELL32.520] + * + * See shlwapi.SHAllocShared + */ +HANDLE WINAPI SHAllocShared(LPVOID lpvData, DWORD dwSize, DWORD dwProcId) +{ + GET_FUNC(pSHAllocShared, shlwapi, (char*)7, NULL); + return pSHAllocShared(lpvData, dwSize, dwProcId); +} + +/************************************************************************* + * SHLockShared [SHELL32.521] + * + * See shlwapi.SHLockShared + */ +LPVOID WINAPI SHLockShared(HANDLE hShared, DWORD dwProcId) +{ + GET_FUNC(pSHLockShared, shlwapi, (char*)8, NULL); + return pSHLockShared(hShared, dwProcId); +} + +/************************************************************************* + * SHUnlockShared [SHELL32.522] + * + * See shlwapi.SHUnlockShared + */ +BOOL WINAPI SHUnlockShared(LPVOID lpView) +{ + GET_FUNC(pSHUnlockShared, shlwapi, (char*)9, FALSE); + return pSHUnlockShared(lpView); +} + +/************************************************************************* + * SHFreeShared [SHELL32.523] + * + * See shlwapi.SHFreeShared + */ +BOOL WINAPI SHFreeShared(HANDLE hShared, DWORD dwProcId) +{ + GET_FUNC(pSHFreeShared, shlwapi, (char*)10, FALSE); + return pSHFreeShared(hShared, dwProcId); +} + +/************************************************************************* + * SetAppStartingCursor [SHELL32.99] + */ +HRESULT WINAPI SetAppStartingCursor(HWND u, DWORD v) +{ FIXME("hwnd=%p 0x%04lx stub\n",u,v ); + return 0; +} +/************************************************************************* + * SHLoadOLE [SHELL32.151] + * + */ +HRESULT WINAPI SHLoadOLE(LPARAM lParam) +{ FIXME("0x%04lx stub\n",lParam); + return S_OK; +} +/************************************************************************* + * DriveType [SHELL32.64] + * + */ +HRESULT WINAPI DriveType(DWORD u) +{ FIXME("0x%04lx stub\n",u); + return 0; +} +/************************************************************************* + * SHAbortInvokeCommand [SHELL32.198] + * + */ +HRESULT WINAPI SHAbortInvokeCommand(void) +{ FIXME("stub\n"); + return 1; +} +/************************************************************************* + * SHOutOfMemoryMessageBox [SHELL32.126] + * + */ +int WINAPI SHOutOfMemoryMessageBox( + HWND hwndOwner, + LPCSTR lpCaption, + UINT uType) +{ + FIXME("%p %s 0x%08x stub\n",hwndOwner, lpCaption, uType); + return 0; +} +/************************************************************************* + * SHFlushClipboard [SHELL32.121] + * + */ +HRESULT WINAPI SHFlushClipboard(void) +{ FIXME("stub\n"); + return 1; +} + +/************************************************************************* + * SHWaitForFileToOpen [SHELL32.97] + * + */ +BOOL WINAPI SHWaitForFileToOpen( + LPCITEMIDLIST pidl, + DWORD dwFlags, + DWORD dwTimeout) +{ + FIXME("%p 0x%08lx 0x%08lx stub\n", pidl, dwFlags, dwTimeout); + return 0; +} + +/************************************************************************ + * @ [SHELL32.654] + * + * NOTES: first parameter seems to be a pointer (same as passed to WriteCabinetState) + * second one could be a size (0x0c). The size is the same as the structure saved to + * HCU\Software\Microsoft\Windows\CurrentVersion\Explorer\CabinetState + * I'm (js) guessing: this one is just ReadCabinetState ;-) + */ +HRESULT WINAPI shell32_654 (CABINETSTATE *cs, int length) +{ + TRACE("%p %d\n",cs,length); + return ReadCabinetState(cs,length); +} + +/************************************************************************ + * RLBuildListOfPaths [SHELL32.146] + * + * NOTES + * builds a DPA + */ +DWORD WINAPI RLBuildListOfPaths (void) +{ FIXME("stub\n"); + return 0; +} +/************************************************************************ + * SHValidateUNC [SHELL32.173] + * + */ +HRESULT WINAPI SHValidateUNC (DWORD x, DWORD y, DWORD z) +{ + FIXME("0x%08lx 0x%08lx 0x%08lx stub\n",x,y,z); + return 0; +} + +/************************************************************************ + * DoEnvironmentSubstA [SHELL32.@] + * + */ +HRESULT WINAPI DoEnvironmentSubstA(LPSTR x, LPSTR y) +{ + FIXME("(%s, %s) stub\n", debugstr_a(x), debugstr_a(y)); + return 0; +} + +/************************************************************************ + * DoEnvironmentSubstW [SHELL32.@] + * + */ +HRESULT WINAPI DoEnvironmentSubstW(LPWSTR x, LPWSTR y) +{ + FIXME("(%s, %s): stub\n", debugstr_w(x), debugstr_w(y)); + return 0; +} + +/************************************************************************ + * DoEnvironmentSubst [SHELL32.53] + * + */ +HRESULT WINAPI DoEnvironmentSubstAW(LPVOID x, LPVOID y) +{ + if (SHELL_OsIsUnicode()) + return DoEnvironmentSubstW(x, y); + return DoEnvironmentSubstA(x, y); +} + +/************************************************************************* + * @ [SHELL32.243] + * + * Win98+ by-ordinal routine. In Win98 this routine returns zero and + * does nothing else. Possibly this does something in NT or SHELL32 5.0? + * + */ + +BOOL WINAPI shell32_243(DWORD a, DWORD b) +{ + return FALSE; +} + +/************************************************************************* + * @ [SHELL32.714] + */ +DWORD WINAPI SHELL32_714(LPVOID x) +{ + FIXME("(%s)stub\n", debugstr_w(x)); + return 0; +} + +/************************************************************************* + * SHAddFromPropSheetExtArray [SHELL32.167] + */ +DWORD WINAPI SHAddFromPropSheetExtArray(DWORD a, DWORD b, DWORD c) +{ + FIXME("(%08lx,%08lx,%08lx)stub\n", a, b, c); + return 0; +} + +/************************************************************************* + * SHCreatePropSheetExtArray [SHELL32.168] + */ +DWORD WINAPI SHCreatePropSheetExtArray(DWORD a, LPCSTR b, DWORD c) +{ + FIXME("(%08lx,%s,%08lx)stub\n", a, debugstr_a(b), c); + return 0; +} + +/************************************************************************* + * SHReplaceFromPropSheetExtArray [SHELL32.170] + */ +DWORD WINAPI SHReplaceFromPropSheetExtArray(DWORD a, DWORD b, DWORD c, DWORD d) +{ + FIXME("(%08lx,%08lx,%08lx,%08lx)stub\n", a, b, c, d); + return 0; +} + +/************************************************************************* + * SHDestroyPropSheetExtArray [SHELL32.169] + */ +DWORD WINAPI SHDestroyPropSheetExtArray(DWORD a) +{ + FIXME("(%08lx)stub\n", a); + return 0; +} + +/************************************************************************* + * CIDLData_CreateFromIDArray [SHELL32.83] + * + * Create IDataObject from PIDLs?? + */ +HRESULT WINAPI CIDLData_CreateFromIDArray( + LPCITEMIDLIST pidlFolder, + DWORD cpidlFiles, + LPCITEMIDLIST *lppidlFiles, + LPDATAOBJECT *ppdataObject) +{ + UINT i; + HWND hwnd = 0; /*FIXME: who should be hwnd of owner? set to desktop */ + + TRACE("(%p, %ld, %p, %p)\n", pidlFolder, cpidlFiles, lppidlFiles, ppdataObject); + if (TRACE_ON(pidl)) + { + pdump (pidlFolder); + for (i=0; ii64Size = 0; + pSHQueryRBInfo->i64NumItems = 0; + + return S_OK; +} + +HRESULT WINAPI SHQueryRecycleBinW(LPCWSTR pszRootPath, LPSHQUERYRBINFO pSHQueryRBInfo) +{ + FIXME("%s, %p - stub\n", debugstr_w(pszRootPath), pSHQueryRBInfo); + + pSHQueryRBInfo->i64Size = 0; + pSHQueryRBInfo->i64NumItems = 0; + + return S_OK; +} diff --git a/reactos/lib/shell32/shellpath.c b/reactos/lib/shell32/shellpath.c index 012843b4011..f77a9bf10fe 100644 --- a/reactos/lib/shell32/shellpath.c +++ b/reactos/lib/shell32/shellpath.c @@ -1,2032 +1,2032 @@ -/* - * Path Functions - * - * Copyright 1998, 1999, 2000 Juergen Schmied - * Copyright 2004 Juan Lang - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * NOTES: - * - * Many of these functions are in SHLWAPI.DLL also - * - */ - -#include "config.h" -#include "wine/port.h" - -#include -#include -#include -#include "wine/debug.h" -#include "windef.h" -#include "winbase.h" -#include "winnls.h" -#include "winreg.h" -#include "wingdi.h" -#include "winuser.h" - -#include "shlobj.h" -#include "shresdef.h" -#include "shell32_main.h" -#include "undocshell.h" -#include "pidl.h" -#include "wine/unicode.h" -#include "shlwapi.h" - -WINE_DEFAULT_DEBUG_CHANNEL(shell); - -/* - ########## Combining and Constructing paths ########## -*/ - -/************************************************************************* - * PathAppend [SHELL32.36] - */ -BOOL WINAPI PathAppendAW( - LPVOID lpszPath1, - LPCVOID lpszPath2) -{ - if (SHELL_OsIsUnicode()) - return PathAppendW(lpszPath1, lpszPath2); - return PathAppendA(lpszPath1, lpszPath2); -} - -/************************************************************************* - * PathCombine [SHELL32.37] - */ -LPVOID WINAPI PathCombineAW( - LPVOID szDest, - LPCVOID lpszDir, - LPCVOID lpszFile) -{ - if (SHELL_OsIsUnicode()) - return PathCombineW( szDest, lpszDir, lpszFile ); - return PathCombineA( szDest, lpszDir, lpszFile ); -} - -/************************************************************************* - * PathAddBackslash [SHELL32.32] - */ -LPVOID WINAPI PathAddBackslashAW(LPVOID lpszPath) -{ - if(SHELL_OsIsUnicode()) - return PathAddBackslashW(lpszPath); - return PathAddBackslashA(lpszPath); -} - -/************************************************************************* - * PathBuildRoot [SHELL32.30] - */ -LPVOID WINAPI PathBuildRootAW(LPVOID lpszPath, int drive) -{ - if(SHELL_OsIsUnicode()) - return PathBuildRootW(lpszPath, drive); - return PathBuildRootA(lpszPath, drive); -} - -/* - Extracting Component Parts -*/ - -/************************************************************************* - * PathFindFileName [SHELL32.34] - */ -LPVOID WINAPI PathFindFileNameAW(LPCVOID lpszPath) -{ - if(SHELL_OsIsUnicode()) - return PathFindFileNameW(lpszPath); - return PathFindFileNameA(lpszPath); -} - -/************************************************************************* - * PathFindExtension [SHELL32.31] - */ -LPVOID WINAPI PathFindExtensionAW(LPCVOID lpszPath) -{ - if (SHELL_OsIsUnicode()) - return PathFindExtensionW(lpszPath); - return PathFindExtensionA(lpszPath); - -} - -/************************************************************************* - * PathGetExtensionA [internal] - * - * NOTES - * exported by ordinal - * return value points to the first char after the dot - */ -static LPSTR PathGetExtensionA(LPCSTR lpszPath) -{ - TRACE("(%s)\n",lpszPath); - - lpszPath = PathFindExtensionA(lpszPath); - return (LPSTR)(*lpszPath?(lpszPath+1):lpszPath); -} - -/************************************************************************* - * PathGetExtensionW [internal] - */ -static LPWSTR PathGetExtensionW(LPCWSTR lpszPath) -{ - TRACE("(%s)\n",debugstr_w(lpszPath)); - - lpszPath = PathFindExtensionW(lpszPath); - return (LPWSTR)(*lpszPath?(lpszPath+1):lpszPath); -} - -/************************************************************************* - * PathGetExtension [SHELL32.158] - */ -LPVOID WINAPI PathGetExtensionAW(LPCVOID lpszPath,DWORD void1, DWORD void2) -{ - if (SHELL_OsIsUnicode()) - return PathGetExtensionW(lpszPath); - return PathGetExtensionA(lpszPath); -} - -/************************************************************************* - * PathGetArgs [SHELL32.52] - */ -LPVOID WINAPI PathGetArgsAW(LPVOID lpszPath) -{ - if (SHELL_OsIsUnicode()) - return PathGetArgsW(lpszPath); - return PathGetArgsA(lpszPath); -} - -/************************************************************************* - * PathGetDriveNumber [SHELL32.57] - */ -int WINAPI PathGetDriveNumberAW(LPVOID lpszPath) -{ - if (SHELL_OsIsUnicode()) - return PathGetDriveNumberW(lpszPath); - return PathGetDriveNumberA(lpszPath); -} - -/************************************************************************* - * PathRemoveFileSpec [SHELL32.35] - */ -BOOL WINAPI PathRemoveFileSpecAW(LPVOID lpszPath) -{ - if (SHELL_OsIsUnicode()) - return PathRemoveFileSpecW(lpszPath); - return PathRemoveFileSpecA(lpszPath); -} - -/************************************************************************* - * PathStripPath [SHELL32.38] - */ -void WINAPI PathStripPathAW(LPVOID lpszPath) -{ - if (SHELL_OsIsUnicode()) - PathStripPathW(lpszPath); - else - PathStripPathA(lpszPath); -} - -/************************************************************************* - * PathStripToRoot [SHELL32.50] - */ -BOOL WINAPI PathStripToRootAW(LPVOID lpszPath) -{ - if (SHELL_OsIsUnicode()) - return PathStripToRootW(lpszPath); - return PathStripToRootA(lpszPath); -} - -/************************************************************************* - * PathRemoveArgs [SHELL32.251] - */ -void WINAPI PathRemoveArgsAW(LPVOID lpszPath) -{ - if (SHELL_OsIsUnicode()) - PathRemoveArgsW(lpszPath); - else - PathRemoveArgsA(lpszPath); -} - -/************************************************************************* - * PathRemoveExtension [SHELL32.250] - */ -void WINAPI PathRemoveExtensionAW(LPVOID lpszPath) -{ - if (SHELL_OsIsUnicode()) - PathRemoveExtensionW(lpszPath); - else - PathRemoveExtensionA(lpszPath); -} - - -/* - Path Manipulations -*/ - -/************************************************************************* - * PathGetShortPathA [internal] - */ -static void PathGetShortPathA(LPSTR pszPath) -{ - CHAR path[MAX_PATH]; - - TRACE("%s\n", pszPath); - - if (GetShortPathNameA(pszPath, path, MAX_PATH)) - { - lstrcpyA(pszPath, path); - } -} - -/************************************************************************* - * PathGetShortPathW [internal] - */ -static void PathGetShortPathW(LPWSTR pszPath) -{ - WCHAR path[MAX_PATH]; - - TRACE("%s\n", debugstr_w(pszPath)); - - if (GetShortPathNameW(pszPath, path, MAX_PATH)) - { - lstrcpyW(pszPath, path); - } -} - -/************************************************************************* - * PathGetShortPath [SHELL32.92] - */ -VOID WINAPI PathGetShortPathAW(LPVOID pszPath) -{ - if(SHELL_OsIsUnicode()) - PathGetShortPathW(pszPath); - PathGetShortPathA(pszPath); -} - -/************************************************************************* - * PathRemoveBlanks [SHELL32.33] - */ -void WINAPI PathRemoveBlanksAW(LPVOID str) -{ - if(SHELL_OsIsUnicode()) - PathRemoveBlanksW(str); - else - PathRemoveBlanksA(str); -} - -/************************************************************************* - * PathQuoteSpaces [SHELL32.55] - */ -VOID WINAPI PathQuoteSpacesAW (LPVOID lpszPath) -{ - if(SHELL_OsIsUnicode()) - PathQuoteSpacesW(lpszPath); - else - PathQuoteSpacesA(lpszPath); -} - -/************************************************************************* - * PathUnquoteSpaces [SHELL32.56] - */ -VOID WINAPI PathUnquoteSpacesAW(LPVOID str) -{ - if(SHELL_OsIsUnicode()) - PathUnquoteSpacesW(str); - else - PathUnquoteSpacesA(str); -} - -/************************************************************************* - * PathParseIconLocation [SHELL32.249] - */ -int WINAPI PathParseIconLocationAW (LPVOID lpszPath) -{ - if(SHELL_OsIsUnicode()) - return PathParseIconLocationW(lpszPath); - return PathParseIconLocationA(lpszPath); -} - -/* - ########## Path Testing ########## -*/ -/************************************************************************* - * PathIsUNC [SHELL32.39] - */ -BOOL WINAPI PathIsUNCAW (LPCVOID lpszPath) -{ - if (SHELL_OsIsUnicode()) - return PathIsUNCW( lpszPath ); - return PathIsUNCA( lpszPath ); -} - -/************************************************************************* - * PathIsRelative [SHELL32.40] - */ -BOOL WINAPI PathIsRelativeAW (LPCVOID lpszPath) -{ - if (SHELL_OsIsUnicode()) - return PathIsRelativeW( lpszPath ); - return PathIsRelativeA( lpszPath ); -} - -/************************************************************************* - * PathIsRoot [SHELL32.29] - */ -BOOL WINAPI PathIsRootAW(LPCVOID lpszPath) -{ - if (SHELL_OsIsUnicode()) - return PathIsRootW(lpszPath); - return PathIsRootA(lpszPath); -} - -/************************************************************************* - * PathIsExeA [internal] - */ -static BOOL PathIsExeA (LPCSTR lpszPath) -{ - LPCSTR lpszExtension = PathGetExtensionA(lpszPath); - int i; - static const char * const lpszExtensions[] = - {"exe", "com", "pif", "cmd", "bat", "scf", "scr", NULL }; - - TRACE("path=%s\n",lpszPath); - - for(i=0; lpszExtensions[i]; i++) - if (!strcasecmp(lpszExtension,lpszExtensions[i])) return TRUE; - - return FALSE; -} - -/************************************************************************* - * PathIsExeW [internal] - */ -static BOOL PathIsExeW (LPCWSTR lpszPath) -{ - LPCWSTR lpszExtension = PathGetExtensionW(lpszPath); - int i; - static const WCHAR lpszExtensions[][4] = - {{'e','x','e','\0'}, {'c','o','m','\0'}, {'p','i','f','\0'}, - {'c','m','d','\0'}, {'b','a','t','\0'}, {'s','c','f','\0'}, - {'s','c','r','\0'}, {'\0'} }; - - TRACE("path=%s\n",debugstr_w(lpszPath)); - - for(i=0; lpszExtensions[i][0]; i++) - if (!strcmpiW(lpszExtension,lpszExtensions[i])) return TRUE; - - return FALSE; -} - -/************************************************************************* - * PathIsExe [SHELL32.43] - */ -BOOL WINAPI PathIsExeAW (LPCVOID path) -{ - if (SHELL_OsIsUnicode()) - return PathIsExeW (path); - return PathIsExeA(path); -} - -/************************************************************************* - * PathIsDirectory [SHELL32.159] - */ -BOOL WINAPI PathIsDirectoryAW (LPCVOID lpszPath) -{ - if (SHELL_OsIsUnicode()) - return PathIsDirectoryW (lpszPath); - return PathIsDirectoryA (lpszPath); -} - -/************************************************************************* - * PathFileExists [SHELL32.45] - */ -BOOL WINAPI PathFileExistsAW (LPCVOID lpszPath) -{ - if (SHELL_OsIsUnicode()) - return PathFileExistsW (lpszPath); - return PathFileExistsA (lpszPath); -} - -/************************************************************************* - * PathMatchSpec [SHELL32.46] - */ -BOOL WINAPI PathMatchSpecAW(LPVOID name, LPVOID mask) -{ - if (SHELL_OsIsUnicode()) - return PathMatchSpecW( name, mask ); - return PathMatchSpecA( name, mask ); -} - -/************************************************************************* - * PathIsSameRoot [SHELL32.650] - */ -BOOL WINAPI PathIsSameRootAW(LPCVOID lpszPath1, LPCVOID lpszPath2) -{ - if (SHELL_OsIsUnicode()) - return PathIsSameRootW(lpszPath1, lpszPath2); - return PathIsSameRootA(lpszPath1, lpszPath2); -} - -/************************************************************************* - * IsLFNDriveA [SHELL32.41] - */ -BOOL WINAPI IsLFNDriveA(LPCSTR lpszPath) -{ - DWORD fnlen; - - if (!GetVolumeInformationA(lpszPath, NULL, 0, NULL, &fnlen, NULL, NULL, 0)) - return FALSE; - return fnlen > 12; -} - -/************************************************************************* - * IsLFNDriveW [SHELL32.42] - */ -BOOL WINAPI IsLFNDriveW(LPCWSTR lpszPath) -{ - DWORD fnlen; - - if (!GetVolumeInformationW(lpszPath, NULL, 0, NULL, &fnlen, NULL, NULL, 0)) - return FALSE; - return fnlen > 12; -} - -/************************************************************************* - * IsLFNDrive [SHELL32.119] - */ -BOOL WINAPI IsLFNDriveAW(LPCVOID lpszPath) -{ - if (SHELL_OsIsUnicode()) - return IsLFNDriveW(lpszPath); - return IsLFNDriveA(lpszPath); -} - -/* - ########## Creating Something Unique ########## -*/ -/************************************************************************* - * PathMakeUniqueNameA [internal] - */ -BOOL WINAPI PathMakeUniqueNameA( - LPSTR lpszBuffer, - DWORD dwBuffSize, - LPCSTR lpszShortName, - LPCSTR lpszLongName, - LPCSTR lpszPathName) -{ - FIXME("%p %lu %s %s %s stub\n", - lpszBuffer, dwBuffSize, debugstr_a(lpszShortName), - debugstr_a(lpszLongName), debugstr_a(lpszPathName)); - return TRUE; -} - -/************************************************************************* - * PathMakeUniqueNameW [internal] - */ -BOOL WINAPI PathMakeUniqueNameW( - LPWSTR lpszBuffer, - DWORD dwBuffSize, - LPCWSTR lpszShortName, - LPCWSTR lpszLongName, - LPCWSTR lpszPathName) -{ - FIXME("%p %lu %s %s %s stub\n", - lpszBuffer, dwBuffSize, debugstr_w(lpszShortName), - debugstr_w(lpszLongName), debugstr_w(lpszPathName)); - return TRUE; -} - -/************************************************************************* - * PathMakeUniqueName [SHELL32.47] - */ -BOOL WINAPI PathMakeUniqueNameAW( - LPVOID lpszBuffer, - DWORD dwBuffSize, - LPCVOID lpszShortName, - LPCVOID lpszLongName, - LPCVOID lpszPathName) -{ - if (SHELL_OsIsUnicode()) - return PathMakeUniqueNameW(lpszBuffer,dwBuffSize, lpszShortName,lpszLongName,lpszPathName); - return PathMakeUniqueNameA(lpszBuffer,dwBuffSize, lpszShortName,lpszLongName,lpszPathName); -} - -/************************************************************************* - * PathYetAnotherMakeUniqueName [SHELL32.75] - * - * NOTES - * exported by ordinal - */ -BOOL WINAPI PathYetAnotherMakeUniqueName( - LPWSTR lpszBuffer, - LPCWSTR lpszPathName, - LPCWSTR lpszShortName, - LPCWSTR lpszLongName) -{ - FIXME("(%p, %s, %s ,%s):stub.\n", - lpszBuffer, debugstr_w(lpszPathName), debugstr_w(lpszShortName), debugstr_w(lpszLongName)); - return TRUE; -} - - -/* - ########## cleaning and resolving paths ########## - */ - -/************************************************************************* - * PathFindOnPath [SHELL32.145] - */ -BOOL WINAPI PathFindOnPathAW(LPVOID sFile, LPCVOID sOtherDirs) -{ - if (SHELL_OsIsUnicode()) - return PathFindOnPathW(sFile, (LPCWSTR *)sOtherDirs); - return PathFindOnPathA(sFile, (LPCSTR *)sOtherDirs); -} - -/************************************************************************* - * PathCleanupSpec [SHELL32.171] - * - * lpszFile is changed in place. - */ -int WINAPI PathCleanupSpec( LPCWSTR lpszPathW, LPWSTR lpszFileW ) -{ - int i = 0; - DWORD rc = 0; - int length = 0; - - if (SHELL_OsIsUnicode()) - { - LPWSTR p = lpszFileW; - - TRACE("Cleanup %s\n",debugstr_w(lpszFileW)); - - if (lpszPathW) - length = strlenW(lpszPathW); - - while (*p) - { - int gct = PathGetCharTypeW(*p); - if (gct == GCT_INVALID || gct == GCT_WILD || gct == GCT_SEPARATOR) - { - lpszFileW[i]='-'; - rc |= PCS_REPLACEDCHAR; - } - else - lpszFileW[i]=*p; - i++; - p++; - if (length + i == MAX_PATH) - { - rc |= PCS_FATAL | PCS_PATHTOOLONG; - break; - } - } - lpszFileW[i]=0; - } - else - { - LPSTR lpszFileA = (LPSTR)lpszFileW; - LPCSTR lpszPathA = (LPSTR)lpszPathW; - LPSTR p = lpszFileA; - - TRACE("Cleanup %s\n",debugstr_a(lpszFileA)); - - if (lpszPathA) - length = strlen(lpszPathA); - - while (*p) - { - int gct = PathGetCharTypeA(*p); - if (gct == GCT_INVALID || gct == GCT_WILD || gct == GCT_SEPARATOR) - { - lpszFileA[i]='-'; - rc |= PCS_REPLACEDCHAR; - } - else - lpszFileA[i]=*p; - i++; - p++; - if (length + i == MAX_PATH) - { - rc |= PCS_FATAL | PCS_PATHTOOLONG; - break; - } - } - lpszFileA[i]=0; - } - return rc; -} - -/************************************************************************* - * PathQualifyA [SHELL32] - */ -BOOL WINAPI PathQualifyA(LPCSTR pszPath) -{ - FIXME("%s\n",pszPath); - return 0; -} - -/************************************************************************* - * PathQualifyW [SHELL32] - */ -BOOL WINAPI PathQualifyW(LPCWSTR pszPath) -{ - FIXME("%s\n",debugstr_w(pszPath)); - return 0; -} - -/************************************************************************* - * PathQualify [SHELL32.49] - */ -BOOL WINAPI PathQualifyAW(LPCVOID pszPath) -{ - if (SHELL_OsIsUnicode()) - return PathQualifyW(pszPath); - return PathQualifyA(pszPath); -} - -/************************************************************************* - * PathResolveA [SHELL32.51] - */ -BOOL WINAPI PathResolveA( - LPSTR lpszPath, - LPCSTR *alpszPaths, - DWORD dwFlags) -{ - FIXME("(%s,%p,0x%08lx),stub!\n", - lpszPath, *alpszPaths, dwFlags); - return 0; -} - -/************************************************************************* - * PathResolveW [SHELL32] - */ -BOOL WINAPI PathResolveW( - LPWSTR lpszPath, - LPCWSTR *alpszPaths, - DWORD dwFlags) -{ - FIXME("(%s,%p,0x%08lx),stub!\n", - debugstr_w(lpszPath), debugstr_w(*alpszPaths), dwFlags); - return 0; -} - -/************************************************************************* - * PathResolve [SHELL32.51] - */ -BOOL WINAPI PathResolveAW( - LPVOID lpszPath, - LPCVOID *alpszPaths, - DWORD dwFlags) -{ - if (SHELL_OsIsUnicode()) - return PathResolveW(lpszPath, (LPCWSTR*)alpszPaths, dwFlags); - return PathResolveA(lpszPath, (LPCSTR*)alpszPaths, dwFlags); -} - -/************************************************************************* -* PathProcessCommandA [SHELL32.653] -*/ -HRESULT WINAPI PathProcessCommandA ( - LPCSTR lpszPath, - LPSTR lpszBuff, - DWORD dwBuffSize, - DWORD dwFlags) -{ - FIXME("%s %p 0x%04lx 0x%04lx stub\n", - lpszPath, lpszBuff, dwBuffSize, dwFlags); - strcpy(lpszBuff, lpszPath); - return 0; -} - -/************************************************************************* -* PathProcessCommandW -*/ -HRESULT WINAPI PathProcessCommandW ( - LPCWSTR lpszPath, - LPWSTR lpszBuff, - DWORD dwBuffSize, - DWORD dwFlags) -{ - FIXME("(%s, %p, 0x%04lx, 0x%04lx) stub\n", - debugstr_w(lpszPath), lpszBuff, dwBuffSize, dwFlags); - strcpyW(lpszBuff, lpszPath); - return 0; -} - -/************************************************************************* -* PathProcessCommand (SHELL32.653) -*/ -HRESULT WINAPI PathProcessCommandAW ( - LPCVOID lpszPath, - LPVOID lpszBuff, - DWORD dwBuffSize, - DWORD dwFlags) -{ - if (SHELL_OsIsUnicode()) - return PathProcessCommandW(lpszPath, lpszBuff, dwBuffSize, dwFlags); - return PathProcessCommandA(lpszPath, lpszBuff, dwBuffSize, dwFlags); -} - -/* - ########## special ########## -*/ - -/************************************************************************* - * PathSetDlgItemPath (SHELL32.48) - */ -VOID WINAPI PathSetDlgItemPathAW(HWND hDlg, int id, LPCVOID pszPath) -{ - if (SHELL_OsIsUnicode()) - PathSetDlgItemPathW(hDlg, id, pszPath); - else - PathSetDlgItemPathA(hDlg, id, pszPath); -} - -static const WCHAR szCurrentVersion[] = {'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','\0'}; -static const WCHAR Administrative_ToolsW[] = {'A','d','m','i','n','i','s','t','r','a','t','i','v','e',' ','T','o','o','l','s','\0'}; -static const WCHAR AppDataW[] = {'A','p','p','D','a','t','a','\0'}; -static const WCHAR CacheW[] = {'C','a','c','h','e','\0'}; -static const WCHAR CD_BurningW[] = {'C','D',' ','B','u','r','n','i','n','g','\0'}; -static const WCHAR Common_Administrative_ToolsW[] = {'C','o','m','m','o','n',' ','A','d','m','i','n','i','s','t','r','a','t','i','v','e',' ','T','o','o','l','s','\0'}; -static const WCHAR Common_AppDataW[] = {'C','o','m','m','o','n',' ','A','p','p','D','a','t','a','\0'}; -static const WCHAR Common_DesktopW[] = {'C','o','m','m','o','n',' ','D','e','s','k','t','o','p','\0'}; -static const WCHAR Common_DocumentsW[] = {'C','o','m','m','o','n',' ','D','o','c','u','m','e','n','t','s','\0'}; -static const WCHAR CommonFilesDirW[] = {'C','o','m','m','o','n','F','i','l','e','s','D','i','r','\0'}; -static const WCHAR CommonMusicW[] = {'C','o','m','m','o','n','M','u','s','i','c','\0'}; -static const WCHAR CommonPicturesW[] = {'C','o','m','m','o','n','P','i','c','t','u','r','e','s','\0'}; -static const WCHAR Common_ProgramsW[] = {'C','o','m','m','o','n',' ','P','r','o','g','r','a','m','s','\0'}; -static const WCHAR Common_StartUpW[] = {'C','o','m','m','o','n',' ','S','t','a','r','t','U','p','\0'}; -static const WCHAR Common_Start_MenuW[] = {'C','o','m','m','o','n',' ','S','t','a','r','t',' ','M','e','n','u','\0'}; -static const WCHAR Common_TemplatesW[] = {'C','o','m','m','o','n',' ','T','e','m','p','l','a','t','e','s','\0'}; -static const WCHAR CommonVideoW[] = {'C','o','m','m','o','n','V','i','d','e','o','\0'}; -static const WCHAR CookiesW[] = {'C','o','o','k','i','e','s','\0'}; -static const WCHAR DesktopW[] = {'D','e','s','k','t','o','p','\0'}; -static const WCHAR FavoritesW[] = {'F','a','v','o','r','i','t','e','s','\0'}; -static const WCHAR FontsW[] = {'F','o','n','t','s','\0'}; -static const WCHAR HistoryW[] = {'H','i','s','t','o','r','y','\0'}; -static const WCHAR Local_AppDataW[] = {'L','o','c','a','l',' ','A','p','p','D','a','t','a','\0'}; -static const WCHAR My_MusicW[] = {'M','y',' ','M','u','s','i','c','\0'}; -static const WCHAR My_PicturesW[] = {'M','y',' ','P','i','c','t','u','r','e','s','\0'}; -static const WCHAR My_VideoW[] = {'M','y',' ','V','i','d','e','o','\0'}; -static const WCHAR NetHoodW[] = {'N','e','t','H','o','o','d','\0'}; -static const WCHAR PersonalW[] = {'P','e','r','s','o','n','a','l','\0'}; -static const WCHAR PrintHoodW[] = {'P','r','i','n','t','H','o','o','d','\0'}; -static const WCHAR ProgramFilesDirW[] = {'P','r','o','g','r','a','m','F','i','l','e','s','D','i','r','\0'}; -static const WCHAR ProgramsW[] = {'P','r','o','g','r','a','m','s','\0'}; -static const WCHAR RecentW[] = {'R','e','c','e','n','t','\0'}; -static const WCHAR ResourcesW[] = {'R','e','s','o','u','r','c','e','s','\0'}; -static const WCHAR SendToW[] = {'S','e','n','d','T','o','\0'}; -static const WCHAR StartUpW[] = {'S','t','a','r','t','U','p','\0'}; -static const WCHAR Start_MenuW[] = {'S','t','a','r','t',' ','M','e','n','u','\0'}; -static const WCHAR TemplatesW[] = {'T','e','m','p','l','a','t','e','s','\0'}; -static const WCHAR DefaultW[] = {'.','D','e','f','a','u','l','t','\0'}; -static const WCHAR AllUsersProfileW[] = {'%','A','L','L','U','S','E','R','S','P','R','O','F','I','L','E','%','\0'}; -static const WCHAR UserProfileW[] = {'%','U','S','E','R','P','R','O','F','I','L','E','%','\0'}; -static const WCHAR SystemDriveW[] = {'%','S','y','s','t','e','m','D','r','i','v','e','%','\0'}; -static const WCHAR ProfileListW[] = {'S','o','f','t','w','a','r','e','\\','M','i','c','r','o','s','o','f','t','\\','W','i','n','d','o','w','s',' ','N','T','\\','C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\','P','r','o','f','i','l','e','L','i','s','t',0}; -static const WCHAR ProfilesDirectoryW[] = {'P','r','o','f','i','l','e','s','D','i','r','e','c','t','o','r','y',0}; -static const WCHAR AllUsersProfileValueW[] = {'A','l','l','U','s','e','r','s','P','r','o','f','i','l','e','\0'}; -static const WCHAR szSHFolders[] = {'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','\\','E','x','p','l','o','r','e','r','\\','S','h','e','l','l',' ','F','o','l','d','e','r','s','\0'}; -static const WCHAR szSHUserFolders[] = {'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','\\','E','x','p','l','o','r','e','r','\\','U','s','e','r',' ','S','h','e','l','l',' ','F','o','l','d','e','r','s','\0'}; -/* This defaults to L"Documents and Settings" on Windows 2000/XP, but we're - * acting more Windows 9x-like for now. - */ -static const WCHAR szDefaultProfileDirW[] = {'w','i','n','d','o','w','s','\\','p','r','o','f','i','l','e','s','\0'}; -static const WCHAR AllUsersW[] = {'A','l','l',' ','U','s','e','r','s','\0'}; - -typedef enum _CSIDL_Type { - CSIDL_Type_User, - CSIDL_Type_AllUsers, - CSIDL_Type_CurrVer, - CSIDL_Type_Disallowed, - CSIDL_Type_NonExistent, - CSIDL_Type_WindowsPath, - CSIDL_Type_SystemPath, -} CSIDL_Type; - -typedef struct -{ - CSIDL_Type type; - LPCWSTR szValueName; - LPCWSTR szDefaultPath; /* fallback string or resource ID */ -} CSIDL_DATA; - -static const CSIDL_DATA CSIDL_Data[] = -{ - { /* 0x00 - CSIDL_DESKTOP */ - CSIDL_Type_User, - DesktopW, - MAKEINTRESOURCEW(IDS_DESKTOPDIRECTORY) - }, - { /* 0x01 - CSIDL_INTERNET */ - CSIDL_Type_Disallowed, - NULL, - NULL - }, - { /* 0x02 - CSIDL_PROGRAMS */ - CSIDL_Type_User, - ProgramsW, - MAKEINTRESOURCEW(IDS_PROGRAMS) - }, - { /* 0x03 - CSIDL_CONTROLS (.CPL files) */ - CSIDL_Type_SystemPath, - NULL, - NULL - }, - { /* 0x04 - CSIDL_PRINTERS */ - CSIDL_Type_SystemPath, - NULL, - NULL - }, - { /* 0x05 - CSIDL_PERSONAL */ - CSIDL_Type_User, - PersonalW, - MAKEINTRESOURCEW(IDS_PERSONAL) - }, - { /* 0x06 - CSIDL_FAVORITES */ - CSIDL_Type_User, - FavoritesW, - MAKEINTRESOURCEW(IDS_FAVORITES) - }, - { /* 0x07 - CSIDL_STARTUP */ - CSIDL_Type_User, - StartUpW, - MAKEINTRESOURCEW(IDS_STARTUP) - }, - { /* 0x08 - CSIDL_RECENT */ - CSIDL_Type_User, - RecentW, - MAKEINTRESOURCEW(IDS_RECENT) - }, - { /* 0x09 - CSIDL_SENDTO */ - CSIDL_Type_User, - SendToW, - MAKEINTRESOURCEW(IDS_SENDTO) - }, - { /* 0x0a - CSIDL_BITBUCKET - Recycle Bin */ - CSIDL_Type_Disallowed, - NULL, - NULL, - }, - { /* 0x0b - CSIDL_STARTMENU */ - CSIDL_Type_User, - Start_MenuW, - MAKEINTRESOURCEW(IDS_STARTMENU) - }, - { /* 0x0c - CSIDL_MYDOCUMENTS */ - CSIDL_Type_Disallowed, /* matches WinXP--can't get its path */ - NULL, - NULL - }, - { /* 0x0d - CSIDL_MYMUSIC */ - CSIDL_Type_User, - My_MusicW, - MAKEINTRESOURCEW(IDS_MYMUSIC) - }, - { /* 0x0e - CSIDL_MYVIDEO */ - CSIDL_Type_User, - My_VideoW, - MAKEINTRESOURCEW(IDS_MYVIDEO) - }, - { /* 0x0f - unassigned */ - CSIDL_Type_Disallowed, - NULL, - NULL, - }, - { /* 0x10 - CSIDL_DESKTOPDIRECTORY */ - CSIDL_Type_User, - DesktopW, - MAKEINTRESOURCEW(IDS_DESKTOPDIRECTORY) - }, - { /* 0x11 - CSIDL_DRIVES */ - CSIDL_Type_Disallowed, - NULL, - NULL, - }, - { /* 0x12 - CSIDL_NETWORK */ - CSIDL_Type_Disallowed, - NULL, - NULL, - }, - { /* 0x13 - CSIDL_NETHOOD */ - CSIDL_Type_User, - NetHoodW, - MAKEINTRESOURCEW(IDS_NETHOOD) - }, - { /* 0x14 - CSIDL_FONTS */ - CSIDL_Type_WindowsPath, - NULL, - FontsW - }, - { /* 0x15 - CSIDL_TEMPLATES */ - CSIDL_Type_User, - TemplatesW, - MAKEINTRESOURCEW(IDS_TEMPLATES) - }, - { /* 0x16 - CSIDL_COMMON_STARTMENU */ - CSIDL_Type_AllUsers, - Common_Start_MenuW, - MAKEINTRESOURCEW(IDS_STARTMENU) - }, - { /* 0x17 - CSIDL_COMMON_PROGRAMS */ - CSIDL_Type_AllUsers, - Common_ProgramsW, - MAKEINTRESOURCEW(IDS_PROGRAMS) - }, - { /* 0x18 - CSIDL_COMMON_STARTUP */ - CSIDL_Type_AllUsers, - Common_StartUpW, - MAKEINTRESOURCEW(IDS_STARTUP) - }, - { /* 0x19 - CSIDL_COMMON_DESKTOPDIRECTORY */ - CSIDL_Type_AllUsers, - Common_DesktopW, - MAKEINTRESOURCEW(IDS_DESKTOP) - }, - { /* 0x1a - CSIDL_APPDATA */ - CSIDL_Type_User, - AppDataW, - MAKEINTRESOURCEW(IDS_APPDATA) - }, - { /* 0x1b - CSIDL_PRINTHOOD */ - CSIDL_Type_User, - PrintHoodW, - MAKEINTRESOURCEW(IDS_PRINTHOOD) - }, - { /* 0x1c - CSIDL_LOCAL_APPDATA */ - CSIDL_Type_User, - Local_AppDataW, - MAKEINTRESOURCEW(IDS_LOCAL_APPDATA) - }, - { /* 0x1d - CSIDL_ALTSTARTUP */ - CSIDL_Type_NonExistent, - NULL, - NULL - }, - { /* 0x1e - CSIDL_COMMON_ALTSTARTUP */ - CSIDL_Type_NonExistent, - NULL, - NULL - }, - { /* 0x1f - CSIDL_COMMON_FAVORITES */ - CSIDL_Type_AllUsers, - FavoritesW, - MAKEINTRESOURCEW(IDS_FAVORITES) - }, - { /* 0x20 - CSIDL_INTERNET_CACHE */ - CSIDL_Type_User, - CacheW, - MAKEINTRESOURCEW(IDS_INTERNET_CACHE) - }, - { /* 0x21 - CSIDL_COOKIES */ - CSIDL_Type_User, - CookiesW, - MAKEINTRESOURCEW(IDS_COOKIES) - }, - { /* 0x22 - CSIDL_HISTORY */ - CSIDL_Type_User, - HistoryW, - MAKEINTRESOURCEW(IDS_HISTORY) - }, - { /* 0x23 - CSIDL_COMMON_APPDATA */ - CSIDL_Type_AllUsers, - Common_AppDataW, - MAKEINTRESOURCEW(IDS_APPDATA) - }, - { /* 0x24 - CSIDL_WINDOWS */ - CSIDL_Type_WindowsPath, - NULL, - NULL - }, - { /* 0x25 - CSIDL_SYSTEM */ - CSIDL_Type_SystemPath, - NULL, - NULL - }, - { /* 0x26 - CSIDL_PROGRAM_FILES */ - CSIDL_Type_CurrVer, - ProgramFilesDirW, - MAKEINTRESOURCEW(IDS_PROGRAM_FILES) - }, - { /* 0x27 - CSIDL_MYPICTURES */ - CSIDL_Type_User, - My_PicturesW, - MAKEINTRESOURCEW(IDS_MYPICTURES) - }, - { /* 0x28 - CSIDL_PROFILE */ - CSIDL_Type_User, - NULL, - NULL - }, - { /* 0x29 - CSIDL_SYSTEMX86 */ - CSIDL_Type_NonExistent, - NULL, - NULL - }, - { /* 0x2a - CSIDL_PROGRAM_FILESX86 */ - CSIDL_Type_NonExistent, - NULL, - NULL - }, - { /* 0x2b - CSIDL_PROGRAM_FILES_COMMON */ - CSIDL_Type_CurrVer, - CommonFilesDirW, - MAKEINTRESOURCEW(IDS_PROGRAM_FILES_COMMON) - }, - { /* 0x2c - CSIDL_PROGRAM_FILES_COMMONX86 */ - CSIDL_Type_NonExistent, - NULL, - NULL - }, - { /* 0x2d - CSIDL_COMMON_TEMPLATES */ - CSIDL_Type_AllUsers, - Common_TemplatesW, - MAKEINTRESOURCEW(IDS_TEMPLATES) - }, - { /* 0x2e - CSIDL_COMMON_DOCUMENTS */ - CSIDL_Type_AllUsers, - Common_DocumentsW, - MAKEINTRESOURCEW(IDS_COMMON_DOCUMENTS) - }, - { /* 0x2f - CSIDL_COMMON_ADMINTOOLS */ - CSIDL_Type_AllUsers, - Common_Administrative_ToolsW, - MAKEINTRESOURCEW(IDS_ADMINTOOLS) - }, - { /* 0x30 - CSIDL_ADMINTOOLS */ - CSIDL_Type_User, - Administrative_ToolsW, - MAKEINTRESOURCEW(IDS_ADMINTOOLS) - }, - { /* 0x31 - CSIDL_CONNECTIONS */ - CSIDL_Type_Disallowed, - NULL, - NULL - }, - { /* 0x32 - unassigned */ - CSIDL_Type_Disallowed, - NULL, - NULL - }, - { /* 0x33 - unassigned */ - CSIDL_Type_Disallowed, - NULL, - NULL - }, - { /* 0x34 - unassigned */ - CSIDL_Type_Disallowed, - NULL, - NULL - }, - { /* 0x35 - CSIDL_COMMON_MUSIC */ - CSIDL_Type_AllUsers, - CommonMusicW, - MAKEINTRESOURCEW(IDS_COMMON_MUSIC) - }, - { /* 0x36 - CSIDL_COMMON_PICTURES */ - CSIDL_Type_AllUsers, - CommonPicturesW, - MAKEINTRESOURCEW(IDS_COMMON_PICTURES) - }, - { /* 0x37 - CSIDL_COMMON_VIDEO */ - CSIDL_Type_AllUsers, - CommonVideoW, - MAKEINTRESOURCEW(IDS_COMMON_VIDEO) - }, - { /* 0x38 - CSIDL_RESOURCES */ - CSIDL_Type_WindowsPath, - NULL, - ResourcesW - }, - { /* 0x39 - CSIDL_RESOURCES_LOCALIZED */ - CSIDL_Type_NonExistent, - NULL, - NULL - }, - { /* 0x3a - CSIDL_COMMON_OEM_LINKS */ - CSIDL_Type_NonExistent, - NULL, - NULL - }, - { /* 0x3b - CSIDL_CDBURN_AREA */ - CSIDL_Type_User, - CD_BurningW, - MAKEINTRESOURCEW(IDS_CDBURN_AREA) - }, - { /* 0x3c unassigned */ - CSIDL_Type_Disallowed, - NULL, - NULL - }, - { /* 0x3d - CSIDL_COMPUTERSNEARME */ - CSIDL_Type_Disallowed, /* FIXME */ - NULL, - NULL - }, - { /* 0x3e - CSIDL_PROFILES */ - CSIDL_Type_Disallowed, /* oddly, this matches WinXP */ - NULL, - NULL - } -}; - -static HRESULT _SHExpandEnvironmentStrings(LPCWSTR szSrc, LPWSTR szDest); - -/* Gets the value named value from the registry key - * rootKey\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders - * (or from rootKey\userPrefix\... if userPrefix is not NULL) into path, which - * is assumed to be MAX_PATH WCHARs in length. - * If it exists, expands the value and writes the expanded value to - * rootKey\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders - * Returns successful error code if the value was retrieved from the registry, - * and a failure otherwise. - */ -static HRESULT _SHGetUserShellFolderPath(HKEY rootKey, LPCWSTR userPrefix, - LPCWSTR value, LPWSTR path) -{ - HRESULT hr; - WCHAR shellFolderPath[MAX_PATH], userShellFolderPath[MAX_PATH]; - LPCWSTR pShellFolderPath, pUserShellFolderPath; - DWORD dwDisp, dwType, dwPathLen = MAX_PATH; - HKEY userShellFolderKey, shellFolderKey; - - TRACE("%p,%s,%s,%p\n",rootKey, debugstr_w(userPrefix), debugstr_w(value), - path); - - if (userPrefix) - { - strcpyW(shellFolderPath, userPrefix); - PathAddBackslashW(shellFolderPath); - strcatW(shellFolderPath, szSHFolders); - pShellFolderPath = shellFolderPath; - strcpyW(userShellFolderPath, userPrefix); - PathAddBackslashW(userShellFolderPath); - strcatW(userShellFolderPath, szSHUserFolders); - pUserShellFolderPath = userShellFolderPath; - } - else - { - pUserShellFolderPath = szSHUserFolders; - pShellFolderPath = szSHFolders; - } - - if (RegCreateKeyExW(rootKey, pShellFolderPath, 0, NULL, 0, KEY_ALL_ACCESS, - NULL, &shellFolderKey, &dwDisp)) - { - TRACE("Failed to create %s\n", debugstr_w(pShellFolderPath)); - return E_FAIL; - } - if (RegCreateKeyExW(rootKey, pUserShellFolderPath, 0, NULL, 0, - KEY_ALL_ACCESS, NULL, &userShellFolderKey, &dwDisp)) - { - TRACE("Failed to create %s\n", - debugstr_w(pUserShellFolderPath)); - RegCloseKey(shellFolderKey); - return E_FAIL; - } - - if (!RegQueryValueExW(userShellFolderKey, value, NULL, &dwType, - (LPBYTE)path, &dwPathLen) && (dwType == REG_EXPAND_SZ || dwType == REG_SZ)) - { - path[dwPathLen / sizeof(WCHAR)] = '\0'; - if (dwType == REG_EXPAND_SZ && path[0] == '%') - { - WCHAR szTemp[MAX_PATH]; - - _SHExpandEnvironmentStrings(path, szTemp); - strncpyW(path, szTemp, MAX_PATH); - } - RegSetValueExW(shellFolderKey, value, 0, REG_SZ, (LPBYTE)path, - (strlenW(path) + 1) * sizeof(WCHAR)); - hr = S_OK; - } - else - hr = E_FAIL; - RegCloseKey(shellFolderKey); - RegCloseKey(userShellFolderKey); - TRACE("returning 0x%08lx\n", hr); - return hr; -} - -/* Gets a 'semi-expanded' default value of the CSIDL with index folder into - * pszPath, based on the entries in CSIDL_Data. By semi-expanded, I mean: - * - The entry's szDefaultPath may be either a string value or an integer - * resource identifier. In the latter case, the string value of the resource - * is written. - * - Depending on the entry's type, the path may begin with an (unexpanded) - * environment variable name. The caller is responsible for expanding - * environment strings if so desired. - * The types that are prepended with environment variables are: - * CSIDL_Type_User: %USERPROFILE% - * CSIDL_Type_AllUsers: %ALLUSERSPROFILE% - * CSIDL_Type_CurrVer: %SystemDrive% - * (Others might make sense too, but as yet are unneeded.) - * FIXME: there are two special cases for the default value: - * - the "My Documents" (CSIDL_PERSONAL) entry should be $HOME - * - the CSIDL_DESKTOP and CSIDL_DESKTOPDIRECTORY (which have the same path) - * should be $HOME/Desktop if it exists - * But, $HOME doesn't seem to be inherited into the Wine environment. I could - * use getenv, but this returns me a UNIX path, which may or may not be - * reachable from any currently mounted DOS drives. - */ -static HRESULT _SHGetDefaultValue(BYTE folder, LPWSTR pszPath) -{ - HRESULT hr; - WCHAR resourcePath[MAX_PATH]; - LPCWSTR pDefaultPath = NULL; - - TRACE("0x%02x,%p\n", folder, pszPath); - - if (folder >= sizeof(CSIDL_Data) / sizeof(CSIDL_Data[0])) - return E_INVALIDARG; - if (!pszPath) - return E_INVALIDARG; - - if (CSIDL_Data[folder].szDefaultPath && - IS_INTRESOURCE(CSIDL_Data[folder].szDefaultPath)) - { - if (LoadStringW(shell32_hInstance, - (UINT)CSIDL_Data[folder].szDefaultPath, resourcePath, MAX_PATH)) - { - hr = S_OK; - pDefaultPath = resourcePath; - } - else - { - FIXME("LoadString failed, missing translation?\n"); - hr = E_FAIL; - } - } - else - { - hr = S_OK; - pDefaultPath = CSIDL_Data[folder].szDefaultPath; - } - if (SUCCEEDED(hr)) - { - switch (CSIDL_Data[folder].type) - { - case CSIDL_Type_User: - strcpyW(pszPath, UserProfileW); - break; - case CSIDL_Type_AllUsers: - strcpyW(pszPath, AllUsersProfileW); - break; - case CSIDL_Type_CurrVer: - strcpyW(pszPath, SystemDriveW); - break; - default: - ; /* no corresponding env. var, do nothing */ - } - if (pDefaultPath) - { - PathAddBackslashW(pszPath); - strcatW(pszPath, pDefaultPath); - } - } - TRACE("returning 0x%08lx\n", hr); - return hr; -} - -/* Gets the (unexpanded) value of the folder with index folder into pszPath. - * The folder's type is assumed to be CSIDL_Type_CurrVer. Its default value - * can be overridden in the HKLM\\szCurrentVersion key. - * If dwFlags has SHGFP_TYPE_DEFAULT set or if the value isn't overridden in - * the registry, uses _SHGetDefaultValue to get the value. - */ -static HRESULT _SHGetCurrentVersionPath(DWORD dwFlags, BYTE folder, - LPWSTR pszPath) -{ - HRESULT hr; - - TRACE("0x%08lx,0x%02x,%p\n", dwFlags, folder, pszPath); - - if (folder >= sizeof(CSIDL_Data) / sizeof(CSIDL_Data[0])) - return E_INVALIDARG; - if (CSIDL_Data[folder].type != CSIDL_Type_CurrVer) - return E_INVALIDARG; - if (!pszPath) - return E_INVALIDARG; - - if (dwFlags & SHGFP_TYPE_DEFAULT) - hr = _SHGetDefaultValue(folder, pszPath); - else - { - HKEY hKey; - DWORD dwDisp; - - if (RegCreateKeyExW(HKEY_LOCAL_MACHINE, szCurrentVersion, 0, - NULL, 0, KEY_ALL_ACCESS, NULL, &hKey, &dwDisp)) - hr = E_FAIL; - else - { - DWORD dwType, dwPathLen = MAX_PATH * sizeof(WCHAR); - - if (RegQueryValueExW(hKey, CSIDL_Data[folder].szValueName, NULL, - &dwType, (LPBYTE)pszPath, &dwPathLen) || - (dwType != REG_SZ && dwType != REG_EXPAND_SZ)) - { - hr = _SHGetDefaultValue(folder, pszPath); - dwType = REG_EXPAND_SZ; - RegSetValueExW(hKey, CSIDL_Data[folder].szValueName, 0, dwType, - (LPBYTE)pszPath, (strlenW(pszPath)+1)*sizeof(WCHAR)); - } - else - { - pszPath[dwPathLen / sizeof(WCHAR)] = '\0'; - hr = S_OK; - } - RegCloseKey(hKey); - } - } - TRACE("returning 0x%08lx (output path is %s)\n", hr, debugstr_w(pszPath)); - return hr; -} - -/* Gets the user's path (unexpanded) for the CSIDL with index folder: - * If SHGFP_TYPE_DEFAULT is set, calls _SHGetDefaultValue for it. Otherwise - * calls _SHGetUserShellFolderPath for it. Where it looks depends on hToken: - * - if hToken is -1, looks in HKEY_USERS\.Default - * - otherwise looks first in HKEY_CURRENT_USER, followed by HKEY_LOCAL_MACHINE - * if HKEY_CURRENT_USER doesn't contain any entries. If both fail, finally - * calls _SHGetDefaultValue for it. - */ -static HRESULT _SHGetUserProfilePath(HANDLE hToken, DWORD dwFlags, BYTE folder, - LPWSTR pszPath) -{ - HRESULT hr; - - TRACE("%p,0x%08lx,0x%02x,%p\n", hToken, dwFlags, folder, pszPath); - - if (folder >= sizeof(CSIDL_Data) / sizeof(CSIDL_Data[0])) - return E_INVALIDARG; - if (CSIDL_Data[folder].type != CSIDL_Type_User) - return E_INVALIDARG; - if (!pszPath) - return E_INVALIDARG; - - /* Only the current user and the default user are supported right now - * I'm afraid. - * FIXME: should be able to call GetTokenInformation on the token, - * then call ConvertSidToStringSidW on it to get the user prefix. - * But Wine's registry doesn't store user info by sid, it stores it - * by user name (and I don't know how to convert from a token to a - * user name). - */ - if (hToken != NULL && hToken != (HANDLE)-1) - { - FIXME("unsupported for user other than current or default\n"); - return E_FAIL; - } - - if (dwFlags & SHGFP_TYPE_DEFAULT) - hr = _SHGetDefaultValue(folder, pszPath); - else - { - LPCWSTR userPrefix = NULL; - HKEY hRootKey; - - if (hToken == (HANDLE)-1) - { - hRootKey = HKEY_USERS; - userPrefix = DefaultW; - } - else /* hToken == NULL, other values disallowed above */ - hRootKey = HKEY_CURRENT_USER; - hr = _SHGetUserShellFolderPath(hRootKey, userPrefix, - CSIDL_Data[folder].szValueName, pszPath); - if (FAILED(hr) && hRootKey != HKEY_LOCAL_MACHINE) - hr = _SHGetUserShellFolderPath(HKEY_LOCAL_MACHINE, NULL, - CSIDL_Data[folder].szValueName, pszPath); - if (FAILED(hr)) - hr = _SHGetDefaultValue(folder, pszPath); - } - TRACE("returning 0x%08lx (output path is %s)\n", hr, debugstr_w(pszPath)); - return hr; -} - -/* Gets the (unexpanded) path for the CSIDL with index folder. If dwFlags has - * SHGFP_TYPE_DEFAULT set, calls _SHGetDefaultValue. Otherwise calls - * _SHGetUserShellFolderPath for it, looking only in HKEY_LOCAL_MACHINE. - * If this fails, falls back to _SHGetDefaultValue. - */ -static HRESULT _SHGetAllUsersProfilePath(DWORD dwFlags, BYTE folder, - LPWSTR pszPath) -{ - HRESULT hr; - - TRACE("0x%08lx,0x%02x,%p\n", dwFlags, folder, pszPath); - - if (folder >= sizeof(CSIDL_Data) / sizeof(CSIDL_Data[0])) - return E_INVALIDARG; - if (CSIDL_Data[folder].type != CSIDL_Type_AllUsers) - return E_INVALIDARG; - if (!pszPath) - return E_INVALIDARG; - - if (dwFlags & SHGFP_TYPE_DEFAULT) - hr = _SHGetDefaultValue(folder, pszPath); - else - { - hr = _SHGetUserShellFolderPath(HKEY_LOCAL_MACHINE, NULL, - CSIDL_Data[folder].szValueName, pszPath); - if (FAILED(hr)) - hr = _SHGetDefaultValue(folder, pszPath); - } - TRACE("returning 0x%08lx (output path is %s)\n", hr, debugstr_w(pszPath)); - return hr; -} - -static HRESULT _SHOpenProfilesKey(PHKEY pKey) -{ - LONG lRet; - DWORD disp; - - lRet = RegCreateKeyExW(HKEY_LOCAL_MACHINE, ProfileListW, 0, NULL, 0, - KEY_ALL_ACCESS, NULL, pKey, &disp); - return HRESULT_FROM_WIN32(lRet); -} - -/* Reads the value named szValueName from the key profilesKey (assumed to be - * opened by _SHOpenProfilesKey) into szValue, which is assumed to be MAX_PATH - * WCHARs in length. If it doesn't exist, returns szDefault (and saves - * szDefault to the registry). - */ -static HRESULT _SHGetProfilesValue(HKEY profilesKey, LPCWSTR szValueName, - LPWSTR szValue, LPCWSTR szDefault) -{ - HRESULT hr; - DWORD type, dwPathLen = MAX_PATH * sizeof(WCHAR); - LONG lRet; - - TRACE("%p,%s,%p,%s\n", profilesKey, debugstr_w(szValueName), szValue, - debugstr_w(szDefault)); - lRet = RegQueryValueExW(profilesKey, szValueName, NULL, &type, - (LPBYTE)szValue, &dwPathLen); - if (!lRet && (type == REG_SZ || type == REG_EXPAND_SZ) && dwPathLen - && *szValue) - { - dwPathLen /= sizeof(WCHAR); - szValue[dwPathLen] = '\0'; - hr = S_OK; - } - else - { - /* Missing or invalid value, set a default */ - strncpyW(szValue, szDefault, MAX_PATH); - szValue[MAX_PATH - 1] = '\0'; - TRACE("Setting missing value %s to %s\n", debugstr_w(szValueName), - debugstr_w(szValue)); - lRet = RegSetValueExW(profilesKey, szValueName, 0, REG_EXPAND_SZ, - (LPBYTE)szValue, (strlenW(szValue) + 1) * sizeof(WCHAR)); - if (lRet) - hr = HRESULT_FROM_WIN32(lRet); - else - hr = S_OK; - } - TRACE("returning 0x%08lx (output value is %s)\n", hr, debugstr_w(szValue)); - return hr; -} - -/* From the original Wine source: - * - * Attempts to expand environment variables from szSrc into szDest, which is - * assumed to be MAX_PATH characters in length. Before referring to the - * environment, handles a few variables directly, because the environment - * variables may not be set when this is called (as during Wine's installation - * when default values are being written to the registry). - * The directly handled environment variables, and their source, are: - * - ALLUSERSPROFILE, USERPROFILE: reads from the registry - * - SystemDrive: uses GetSystemDirectoryW and uses the drive portion of its - * path - * If one of the directly handled environment variables is expanded, only - * expands a single variable, and only in the beginning of szSrc. - * - * That's fine for Wine, but it breaks in ReactOS where we have profile paths - * like "c:\documents and settings\Administrator.REACTOS". Anyway, we have the - * environment variables handy so we'll just use them instead of hacking around - */ -static HRESULT _SHExpandEnvironmentStrings(LPCWSTR szSrc, LPWSTR szDest) -{ - HRESULT hr; - WCHAR szTemp[MAX_PATH], szProfilesPrefix[MAX_PATH] = { 0 }; - - TRACE("%s, %p\n", debugstr_w(szSrc), szDest); - - if (!szSrc || !szDest) return E_INVALIDARG; - - /* short-circuit if there's nothing to expand */ - if (szSrc[0] != '%') - { - strcpyW(szDest, szSrc); - hr = S_OK; - goto end; - } - - *szDest = 0; - strcpyW(szTemp, szSrc); - while (SUCCEEDED(hr) && szTemp[0] == '%') - { - DWORD ret = ExpandEnvironmentStringsW(szSrc, szDest, MAX_PATH); - - if (ret > MAX_PATH) - hr = HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER); - else if (ret == 0) - hr = HRESULT_FROM_WIN32(GetLastError()); - else - hr = S_OK; - if (SUCCEEDED(hr) && szDest[0] == '%') - strcpyW(szTemp, szDest); - else - { - /* terminate loop */ - szTemp[0] = '\0'; - } - } -end: - TRACE("returning 0x%08lx (input was %s, output is %s)\n", hr, - debugstr_w(szSrc), debugstr_w(szDest)); - return hr; -} - -/************************************************************************* - * SHGetFolderPathW [SHELL32.@] - * - * NOTES - * Converts nFolder to path. Most values can be overridden in either - * HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders - * or in the same location in HKLM. - * The registry usage is explained by the following tech note: - * http://www.microsoft.com/windows2000/techinfo/reskit/en-us/default.asp?url=/windows2000/techinfo/reskit/en-us/regentry/36173.asp - * The "Shell Folders" registry key was used in NT4 and earlier systems. - * Beginning with Windows 2000, the "User Shell Folders" key is used, so - * changes made to it are made to the former key too. This synchronization is - * done on-demand: not until someone requests the value of one of these paths - * (by calling one of the SHGet functions) is the value synchronized. - * Furthermore, as explained here: - * http://www.microsoft.com/windows2000/techinfo/reskit/en-us/default.asp?url=/windows2000/techinfo/reskit/en-us/regentry/36276.asp - * the HKCU paths take precedence over the HKLM paths. - * - **********************************************************************/ -HRESULT WINAPI SHGetFolderPathW( - HWND hwndOwner, - int nFolder, - HANDLE hToken, - DWORD dwFlags, - LPWSTR pszPath) -{ - HRESULT hr; - WCHAR szBuildPath[MAX_PATH], szTemp[MAX_PATH]; - DWORD folder = nFolder & CSIDL_FOLDER_MASK; - CSIDL_Type type; - int ret; - - TRACE("%p,%p,nFolder=0x%04x\n", hwndOwner,pszPath,nFolder); - - /* Windows always NULL-terminates the resulting path regardless of success - * or failure, so do so first - */ - if (pszPath) - *pszPath = '\0'; - if (folder >= sizeof(CSIDL_Data) / sizeof(CSIDL_Data[0])) - return E_INVALIDARG; - szTemp[0] = 0; - type = CSIDL_Data[folder].type; - switch (type) - { - case CSIDL_Type_Disallowed: - hr = E_INVALIDARG; - break; - case CSIDL_Type_NonExistent: - hr = S_FALSE; - break; - case CSIDL_Type_WindowsPath: - GetWindowsDirectoryW(szTemp, MAX_PATH); - if (CSIDL_Data[folder].szDefaultPath && - !IS_INTRESOURCE(CSIDL_Data[folder].szDefaultPath) && - *CSIDL_Data[folder].szDefaultPath) - { - PathAddBackslashW(szTemp); - strcatW(szTemp, CSIDL_Data[folder].szDefaultPath); - } - hr = S_OK; - break; - case CSIDL_Type_SystemPath: - GetSystemDirectoryW(szTemp, MAX_PATH); - if (CSIDL_Data[folder].szDefaultPath && - !IS_INTRESOURCE(CSIDL_Data[folder].szDefaultPath) && - *CSIDL_Data[folder].szDefaultPath) - { - PathAddBackslashW(szTemp); - strcatW(szTemp, CSIDL_Data[folder].szDefaultPath); - } - hr = S_OK; - break; - case CSIDL_Type_CurrVer: - hr = _SHGetCurrentVersionPath(dwFlags, folder, szTemp); - break; - case CSIDL_Type_User: - hr = _SHGetUserProfilePath(hToken, dwFlags, folder, szTemp); - break; - case CSIDL_Type_AllUsers: - hr = _SHGetAllUsersProfilePath(dwFlags, folder, szTemp); - break; - default: - FIXME("bogus type %d, please fix\n", type); - hr = E_INVALIDARG; - break; - } - - /* Expand environment strings if necessary */ - if (*szTemp == '%') - hr = _SHExpandEnvironmentStrings(szTemp, szBuildPath); - else - strcpyW(szBuildPath, szTemp); - /* Copy the path if it's available before we might return */ - if (SUCCEEDED(hr) && pszPath) - strcpyW(pszPath, szBuildPath); - - if (FAILED(hr)) goto end; - - /* if we don't care about existing directories we are ready */ - if(nFolder & CSIDL_FLAG_DONT_VERIFY) goto end; - - if (PathFileExistsW(szBuildPath)) goto end; - - /* not existing but we are not allowed to create it. The return value - * is verified against shell32 version 6.0. - */ - if (!(nFolder & CSIDL_FLAG_CREATE)) - { - hr = HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND); - goto end; - } - - /* create directory/directories */ - ret = SHCreateDirectoryExW(hwndOwner, szBuildPath, NULL); - if (ret && ret != ERROR_ALREADY_EXISTS) - { - ERR("Failed to create directory '%s'.\n", debugstr_w(szBuildPath)); - hr = E_FAIL; - goto end; - } - - TRACE("Created missing system directory '%s'\n", debugstr_w(szBuildPath)); -end: - TRACE("returning 0x%08lx (final path is %s)\n", hr, debugstr_w(szBuildPath)); - return hr; -} - -/************************************************************************* - * SHGetFolderPathA [SHELL32.@] - */ -HRESULT WINAPI SHGetFolderPathA( - HWND hwndOwner, - int nFolder, - HANDLE hToken, - DWORD dwFlags, - LPSTR pszPath) -{ - WCHAR szTemp[MAX_PATH]; - HRESULT hr; - - TRACE("%p,%p,nFolder=0x%04x\n",hwndOwner,pszPath,nFolder); - - if (pszPath) - *pszPath = '\0'; - hr = SHGetFolderPathW(hwndOwner, nFolder, hToken, dwFlags, szTemp); - if (SUCCEEDED(hr) && pszPath) - WideCharToMultiByte(CP_ACP, 0, szTemp, -1, pszPath, MAX_PATH, NULL, - NULL); - - return hr; -} - -/* For each folder in folders, if its value has not been set in the registry, - * call _SHGetUserProfilePath or _SHGetAllUsersProfilePath (depending on the - * folder's type) to get the unexpanded value first. - * This will create the expanded value in the Shell Folders key, and - * return the unexpanded value. - * Write the unexpanded value to User Shell Folders, and query it with - * SHGetFolderPath to force the creation of the directory if it doesn't - * already exist. - */ -static HRESULT _SHRegisterFolders(HKEY hRootKey, HANDLE hToken, - LPCWSTR szUserShellFolderPath, const UINT folders[], UINT foldersLen) -{ - UINT i; - WCHAR path[MAX_PATH]; - HRESULT hr = S_OK; - HKEY hKey = NULL; - DWORD dwDisp, dwType, dwPathLen; - LONG ret; - - TRACE("%p,%p,%s,%p,%u\n", hRootKey, hToken, - debugstr_w(szUserShellFolderPath), folders, foldersLen); - - ret = RegCreateKeyExW(hRootKey, szUserShellFolderPath, 0, NULL, 0, - KEY_ALL_ACCESS, NULL, &hKey, &dwDisp); - if (ret) - hr = HRESULT_FROM_WIN32(ret); - for (i = 0; SUCCEEDED(hr) && i < foldersLen; i++) - { - dwPathLen = MAX_PATH * sizeof(WCHAR); - if (RegQueryValueExW(hKey, CSIDL_Data[folders[i]].szValueName, NULL, - &dwType, (LPBYTE)path, &dwPathLen) || (dwType != REG_SZ && - dwType != REG_EXPAND_SZ)) - { - *path = '\0'; - if (CSIDL_Data[folders[i]].type == CSIDL_Type_User) - _SHGetUserProfilePath(hToken, SHGFP_TYPE_DEFAULT, folders[i], - path); - else if (CSIDL_Data[folders[i]].type == CSIDL_Type_AllUsers) - _SHGetAllUsersProfilePath(SHGFP_TYPE_DEFAULT, folders[i], path); - else - hr = E_FAIL; - if (*path) - { - ret = RegSetValueExW(hKey, CSIDL_Data[folders[i]].szValueName, - 0, REG_EXPAND_SZ, (LPBYTE)path, - (strlenW(path) + 1) * sizeof(WCHAR)); - if (ret) - hr = HRESULT_FROM_WIN32(ret); - else - hr = SHGetFolderPathW(NULL, folders[i] | CSIDL_FLAG_CREATE, - hToken, SHGFP_TYPE_DEFAULT, NULL); - } - } - } - if (hKey) - RegCloseKey(hKey); - - TRACE("returning 0x%08lx\n", hr); - return hr; -} - -static HRESULT _SHRegisterUserShellFolders(BOOL bDefault) -{ - static const UINT folders[] = { - CSIDL_PROGRAMS, - CSIDL_PERSONAL, - CSIDL_FAVORITES, - CSIDL_STARTUP, - CSIDL_RECENT, - CSIDL_SENDTO, - CSIDL_STARTMENU, - CSIDL_DESKTOPDIRECTORY, - CSIDL_NETHOOD, - CSIDL_TEMPLATES, - CSIDL_PRINTHOOD, - CSIDL_COOKIES, - CSIDL_HISTORY, - }; - WCHAR userShellFolderPath[MAX_PATH]; - LPCWSTR pUserShellFolderPath; - HRESULT hr = S_OK; - HKEY hRootKey; - HANDLE hToken; - - TRACE("%s\n", bDefault ? "TRUE" : "FALSE"); - if (bDefault) - { - hToken = (HANDLE)-1; - hRootKey = HKEY_USERS; - strcpyW(userShellFolderPath, DefaultW); - PathAddBackslashW(userShellFolderPath); - strcatW(userShellFolderPath, szSHUserFolders); - pUserShellFolderPath = userShellFolderPath; - } - else - { - hToken = NULL; - hRootKey = HKEY_CURRENT_USER; - pUserShellFolderPath = szSHUserFolders; - } - - hr = _SHRegisterFolders(hRootKey, hToken, pUserShellFolderPath, - folders, sizeof(folders) / sizeof(folders[0])); - TRACE("returning 0x%08lx\n", hr); - return hr; -} - -static HRESULT _SHRegisterCommonShellFolders(void) -{ - static const UINT folders[] = { - CSIDL_COMMON_STARTMENU, - CSIDL_COMMON_PROGRAMS, - CSIDL_COMMON_STARTUP, - CSIDL_COMMON_DESKTOPDIRECTORY, - CSIDL_COMMON_FAVORITES, - CSIDL_COMMON_APPDATA, - CSIDL_COMMON_TEMPLATES, - CSIDL_COMMON_DOCUMENTS, - }; - HRESULT hr; - - TRACE("\n"); - hr = _SHRegisterFolders(HKEY_LOCAL_MACHINE, NULL, szSHUserFolders, - folders, sizeof(folders) / sizeof(folders[0])); - TRACE("returning 0x%08lx\n", hr); - return hr; -} - -/* Register the default values in the registry, as some apps seem to depend - * on their presence. The set registered was taken from Windows XP. - */ -HRESULT SHELL_RegisterShellFolders(void) -{ - HRESULT hr = _SHRegisterUserShellFolders(TRUE); - - if (SUCCEEDED(hr)) - hr = _SHRegisterUserShellFolders(FALSE); - if (SUCCEEDED(hr)) - hr = _SHRegisterCommonShellFolders(); - return hr; -} - -/************************************************************************* - * SHGetSpecialFolderPathA [SHELL32.@] - */ -BOOL WINAPI SHGetSpecialFolderPathA ( - HWND hwndOwner, - LPSTR szPath, - int nFolder, - BOOL bCreate) -{ - return (SHGetFolderPathA( - hwndOwner, - nFolder + (bCreate ? CSIDL_FLAG_CREATE : 0), - NULL, - 0, - szPath)) == S_OK ? TRUE : FALSE; -} - -/************************************************************************* - * SHGetSpecialFolderPathW - */ -BOOL WINAPI SHGetSpecialFolderPathW ( - HWND hwndOwner, - LPWSTR szPath, - int nFolder, - BOOL bCreate) -{ - return (SHGetFolderPathW( - hwndOwner, - nFolder + (bCreate ? CSIDL_FLAG_CREATE : 0), - NULL, - 0, - szPath)) == S_OK ? TRUE : FALSE; -} - -/************************************************************************* - * SHGetSpecialFolderPath (SHELL32.175) - */ -BOOL WINAPI SHGetSpecialFolderPathAW ( - HWND hwndOwner, - LPVOID szPath, - int nFolder, - BOOL bCreate) - -{ - if (SHELL_OsIsUnicode()) - return SHGetSpecialFolderPathW (hwndOwner, szPath, nFolder, bCreate); - return SHGetSpecialFolderPathA (hwndOwner, szPath, nFolder, bCreate); -} - -/************************************************************************* - * SHGetFolderLocation [SHELL32.@] - * - * NOTES - * Gets the folder locations from the registry and creates a pidl. - * Creates missing reg keys and directories. - * Mostly forwards to SHGetFolderPathW, but a few values of nFolder return - * virtual folders that are handled here. - * - * PARAMS - * hwndOwner [I] - * nFolder [I] CSIDL_xxxxx - * hToken [I] token representing user, or NULL for current user, or -1 for - * default user - * dwReserved [I] must be zero - * ppidl [O] PIDL of a special folder - * - * NOTES - */ -HRESULT WINAPI SHGetFolderLocation( - HWND hwndOwner, - int nFolder, - HANDLE hToken, - DWORD dwReserved, - LPITEMIDLIST *ppidl) -{ - HRESULT hr = E_INVALIDARG; - - TRACE("%p 0x%08x %p 0x%08lx %p\n", - hwndOwner, nFolder, hToken, dwReserved, ppidl); - - if (!ppidl) - return E_INVALIDARG; - if (dwReserved) - return E_INVALIDARG; - - /* The virtual folders' locations are not user-dependent */ - *ppidl = NULL; - switch (nFolder) - { - case CSIDL_DESKTOP: - *ppidl = _ILCreateDesktop(); - break; - - case CSIDL_INTERNET: - *ppidl = _ILCreateIExplore(); - break; - - case CSIDL_CONTROLS: - *ppidl = _ILCreateControlPanel(); - break; - - case CSIDL_PRINTERS: - *ppidl = _ILCreatePrinters(); - break; - - case CSIDL_FONTS: - FIXME("virtual font folder"); - break; - - case CSIDL_BITBUCKET: - *ppidl = _ILCreateBitBucket(); - break; - - case CSIDL_DRIVES: - *ppidl = _ILCreateMyComputer(); - break; - - case CSIDL_NETWORK: - *ppidl = _ILCreateNetwork(); - break; - - default: - { - WCHAR szPath[MAX_PATH]; - - hr = SHGetFolderPathW(hwndOwner, nFolder, hToken, - SHGFP_TYPE_CURRENT, szPath); - if (SUCCEEDED(hr)) - { - DWORD attributes=0; - - TRACE("Value=%s\n", debugstr_w(szPath)); - hr = SHILCreateFromPathW(szPath, ppidl, &attributes); - } - else if (hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND)) - { - /* unlike SHGetFolderPath, SHGetFolderLocation in shell32 - * version 6.0 returns E_FAIL for non-existing paths - */ - hr = E_FAIL; - } - } - } - if(*ppidl) - hr = NOERROR; - - TRACE("-- (new pidl %p)\n",*ppidl); - return hr; -} - -/************************************************************************* - * SHGetSpecialFolderLocation [SHELL32.@] - * - * NOTES - * In NT5, SHGetSpecialFolderLocation needs the /Recent - * directory. - */ -HRESULT WINAPI SHGetSpecialFolderLocation( - HWND hwndOwner, - INT nFolder, - LPITEMIDLIST * ppidl) -{ - HRESULT hr = E_INVALIDARG; - - TRACE("(%p,0x%x,%p)\n", hwndOwner,nFolder,ppidl); - - if (!ppidl) - return E_INVALIDARG; - - hr = SHGetFolderLocation(hwndOwner, nFolder, NULL, 0, ppidl); - return hr; -} +/* + * Path Functions + * + * Copyright 1998, 1999, 2000 Juergen Schmied + * Copyright 2004 Juan Lang + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * NOTES: + * + * Many of these functions are in SHLWAPI.DLL also + * + */ + +#include "config.h" +#include "wine/port.h" + +#include +#include +#include +#include "wine/debug.h" +#include "windef.h" +#include "winbase.h" +#include "winnls.h" +#include "winreg.h" +#include "wingdi.h" +#include "winuser.h" + +#include "shlobj.h" +#include "shresdef.h" +#include "shell32_main.h" +#include "undocshell.h" +#include "pidl.h" +#include "wine/unicode.h" +#include "shlwapi.h" + +WINE_DEFAULT_DEBUG_CHANNEL(shell); + +/* + ########## Combining and Constructing paths ########## +*/ + +/************************************************************************* + * PathAppend [SHELL32.36] + */ +BOOL WINAPI PathAppendAW( + LPVOID lpszPath1, + LPCVOID lpszPath2) +{ + if (SHELL_OsIsUnicode()) + return PathAppendW(lpszPath1, lpszPath2); + return PathAppendA(lpszPath1, lpszPath2); +} + +/************************************************************************* + * PathCombine [SHELL32.37] + */ +LPVOID WINAPI PathCombineAW( + LPVOID szDest, + LPCVOID lpszDir, + LPCVOID lpszFile) +{ + if (SHELL_OsIsUnicode()) + return PathCombineW( szDest, lpszDir, lpszFile ); + return PathCombineA( szDest, lpszDir, lpszFile ); +} + +/************************************************************************* + * PathAddBackslash [SHELL32.32] + */ +LPVOID WINAPI PathAddBackslashAW(LPVOID lpszPath) +{ + if(SHELL_OsIsUnicode()) + return PathAddBackslashW(lpszPath); + return PathAddBackslashA(lpszPath); +} + +/************************************************************************* + * PathBuildRoot [SHELL32.30] + */ +LPVOID WINAPI PathBuildRootAW(LPVOID lpszPath, int drive) +{ + if(SHELL_OsIsUnicode()) + return PathBuildRootW(lpszPath, drive); + return PathBuildRootA(lpszPath, drive); +} + +/* + Extracting Component Parts +*/ + +/************************************************************************* + * PathFindFileName [SHELL32.34] + */ +LPVOID WINAPI PathFindFileNameAW(LPCVOID lpszPath) +{ + if(SHELL_OsIsUnicode()) + return PathFindFileNameW(lpszPath); + return PathFindFileNameA(lpszPath); +} + +/************************************************************************* + * PathFindExtension [SHELL32.31] + */ +LPVOID WINAPI PathFindExtensionAW(LPCVOID lpszPath) +{ + if (SHELL_OsIsUnicode()) + return PathFindExtensionW(lpszPath); + return PathFindExtensionA(lpszPath); + +} + +/************************************************************************* + * PathGetExtensionA [internal] + * + * NOTES + * exported by ordinal + * return value points to the first char after the dot + */ +static LPSTR PathGetExtensionA(LPCSTR lpszPath) +{ + TRACE("(%s)\n",lpszPath); + + lpszPath = PathFindExtensionA(lpszPath); + return (LPSTR)(*lpszPath?(lpszPath+1):lpszPath); +} + +/************************************************************************* + * PathGetExtensionW [internal] + */ +static LPWSTR PathGetExtensionW(LPCWSTR lpszPath) +{ + TRACE("(%s)\n",debugstr_w(lpszPath)); + + lpszPath = PathFindExtensionW(lpszPath); + return (LPWSTR)(*lpszPath?(lpszPath+1):lpszPath); +} + +/************************************************************************* + * PathGetExtension [SHELL32.158] + */ +LPVOID WINAPI PathGetExtensionAW(LPCVOID lpszPath,DWORD void1, DWORD void2) +{ + if (SHELL_OsIsUnicode()) + return PathGetExtensionW(lpszPath); + return PathGetExtensionA(lpszPath); +} + +/************************************************************************* + * PathGetArgs [SHELL32.52] + */ +LPVOID WINAPI PathGetArgsAW(LPVOID lpszPath) +{ + if (SHELL_OsIsUnicode()) + return PathGetArgsW(lpszPath); + return PathGetArgsA(lpszPath); +} + +/************************************************************************* + * PathGetDriveNumber [SHELL32.57] + */ +int WINAPI PathGetDriveNumberAW(LPVOID lpszPath) +{ + if (SHELL_OsIsUnicode()) + return PathGetDriveNumberW(lpszPath); + return PathGetDriveNumberA(lpszPath); +} + +/************************************************************************* + * PathRemoveFileSpec [SHELL32.35] + */ +BOOL WINAPI PathRemoveFileSpecAW(LPVOID lpszPath) +{ + if (SHELL_OsIsUnicode()) + return PathRemoveFileSpecW(lpszPath); + return PathRemoveFileSpecA(lpszPath); +} + +/************************************************************************* + * PathStripPath [SHELL32.38] + */ +void WINAPI PathStripPathAW(LPVOID lpszPath) +{ + if (SHELL_OsIsUnicode()) + PathStripPathW(lpszPath); + else + PathStripPathA(lpszPath); +} + +/************************************************************************* + * PathStripToRoot [SHELL32.50] + */ +BOOL WINAPI PathStripToRootAW(LPVOID lpszPath) +{ + if (SHELL_OsIsUnicode()) + return PathStripToRootW(lpszPath); + return PathStripToRootA(lpszPath); +} + +/************************************************************************* + * PathRemoveArgs [SHELL32.251] + */ +void WINAPI PathRemoveArgsAW(LPVOID lpszPath) +{ + if (SHELL_OsIsUnicode()) + PathRemoveArgsW(lpszPath); + else + PathRemoveArgsA(lpszPath); +} + +/************************************************************************* + * PathRemoveExtension [SHELL32.250] + */ +void WINAPI PathRemoveExtensionAW(LPVOID lpszPath) +{ + if (SHELL_OsIsUnicode()) + PathRemoveExtensionW(lpszPath); + else + PathRemoveExtensionA(lpszPath); +} + + +/* + Path Manipulations +*/ + +/************************************************************************* + * PathGetShortPathA [internal] + */ +static void PathGetShortPathA(LPSTR pszPath) +{ + CHAR path[MAX_PATH]; + + TRACE("%s\n", pszPath); + + if (GetShortPathNameA(pszPath, path, MAX_PATH)) + { + lstrcpyA(pszPath, path); + } +} + +/************************************************************************* + * PathGetShortPathW [internal] + */ +static void PathGetShortPathW(LPWSTR pszPath) +{ + WCHAR path[MAX_PATH]; + + TRACE("%s\n", debugstr_w(pszPath)); + + if (GetShortPathNameW(pszPath, path, MAX_PATH)) + { + lstrcpyW(pszPath, path); + } +} + +/************************************************************************* + * PathGetShortPath [SHELL32.92] + */ +VOID WINAPI PathGetShortPathAW(LPVOID pszPath) +{ + if(SHELL_OsIsUnicode()) + PathGetShortPathW(pszPath); + PathGetShortPathA(pszPath); +} + +/************************************************************************* + * PathRemoveBlanks [SHELL32.33] + */ +void WINAPI PathRemoveBlanksAW(LPVOID str) +{ + if(SHELL_OsIsUnicode()) + PathRemoveBlanksW(str); + else + PathRemoveBlanksA(str); +} + +/************************************************************************* + * PathQuoteSpaces [SHELL32.55] + */ +VOID WINAPI PathQuoteSpacesAW (LPVOID lpszPath) +{ + if(SHELL_OsIsUnicode()) + PathQuoteSpacesW(lpszPath); + else + PathQuoteSpacesA(lpszPath); +} + +/************************************************************************* + * PathUnquoteSpaces [SHELL32.56] + */ +VOID WINAPI PathUnquoteSpacesAW(LPVOID str) +{ + if(SHELL_OsIsUnicode()) + PathUnquoteSpacesW(str); + else + PathUnquoteSpacesA(str); +} + +/************************************************************************* + * PathParseIconLocation [SHELL32.249] + */ +int WINAPI PathParseIconLocationAW (LPVOID lpszPath) +{ + if(SHELL_OsIsUnicode()) + return PathParseIconLocationW(lpszPath); + return PathParseIconLocationA(lpszPath); +} + +/* + ########## Path Testing ########## +*/ +/************************************************************************* + * PathIsUNC [SHELL32.39] + */ +BOOL WINAPI PathIsUNCAW (LPCVOID lpszPath) +{ + if (SHELL_OsIsUnicode()) + return PathIsUNCW( lpszPath ); + return PathIsUNCA( lpszPath ); +} + +/************************************************************************* + * PathIsRelative [SHELL32.40] + */ +BOOL WINAPI PathIsRelativeAW (LPCVOID lpszPath) +{ + if (SHELL_OsIsUnicode()) + return PathIsRelativeW( lpszPath ); + return PathIsRelativeA( lpszPath ); +} + +/************************************************************************* + * PathIsRoot [SHELL32.29] + */ +BOOL WINAPI PathIsRootAW(LPCVOID lpszPath) +{ + if (SHELL_OsIsUnicode()) + return PathIsRootW(lpszPath); + return PathIsRootA(lpszPath); +} + +/************************************************************************* + * PathIsExeA [internal] + */ +static BOOL PathIsExeA (LPCSTR lpszPath) +{ + LPCSTR lpszExtension = PathGetExtensionA(lpszPath); + int i; + static const char * const lpszExtensions[] = + {"exe", "com", "pif", "cmd", "bat", "scf", "scr", NULL }; + + TRACE("path=%s\n",lpszPath); + + for(i=0; lpszExtensions[i]; i++) + if (!strcasecmp(lpszExtension,lpszExtensions[i])) return TRUE; + + return FALSE; +} + +/************************************************************************* + * PathIsExeW [internal] + */ +static BOOL PathIsExeW (LPCWSTR lpszPath) +{ + LPCWSTR lpszExtension = PathGetExtensionW(lpszPath); + int i; + static const WCHAR lpszExtensions[][4] = + {{'e','x','e','\0'}, {'c','o','m','\0'}, {'p','i','f','\0'}, + {'c','m','d','\0'}, {'b','a','t','\0'}, {'s','c','f','\0'}, + {'s','c','r','\0'}, {'\0'} }; + + TRACE("path=%s\n",debugstr_w(lpszPath)); + + for(i=0; lpszExtensions[i][0]; i++) + if (!strcmpiW(lpszExtension,lpszExtensions[i])) return TRUE; + + return FALSE; +} + +/************************************************************************* + * PathIsExe [SHELL32.43] + */ +BOOL WINAPI PathIsExeAW (LPCVOID path) +{ + if (SHELL_OsIsUnicode()) + return PathIsExeW (path); + return PathIsExeA(path); +} + +/************************************************************************* + * PathIsDirectory [SHELL32.159] + */ +BOOL WINAPI PathIsDirectoryAW (LPCVOID lpszPath) +{ + if (SHELL_OsIsUnicode()) + return PathIsDirectoryW (lpszPath); + return PathIsDirectoryA (lpszPath); +} + +/************************************************************************* + * PathFileExists [SHELL32.45] + */ +BOOL WINAPI PathFileExistsAW (LPCVOID lpszPath) +{ + if (SHELL_OsIsUnicode()) + return PathFileExistsW (lpszPath); + return PathFileExistsA (lpszPath); +} + +/************************************************************************* + * PathMatchSpec [SHELL32.46] + */ +BOOL WINAPI PathMatchSpecAW(LPVOID name, LPVOID mask) +{ + if (SHELL_OsIsUnicode()) + return PathMatchSpecW( name, mask ); + return PathMatchSpecA( name, mask ); +} + +/************************************************************************* + * PathIsSameRoot [SHELL32.650] + */ +BOOL WINAPI PathIsSameRootAW(LPCVOID lpszPath1, LPCVOID lpszPath2) +{ + if (SHELL_OsIsUnicode()) + return PathIsSameRootW(lpszPath1, lpszPath2); + return PathIsSameRootA(lpszPath1, lpszPath2); +} + +/************************************************************************* + * IsLFNDriveA [SHELL32.41] + */ +BOOL WINAPI IsLFNDriveA(LPCSTR lpszPath) +{ + DWORD fnlen; + + if (!GetVolumeInformationA(lpszPath, NULL, 0, NULL, &fnlen, NULL, NULL, 0)) + return FALSE; + return fnlen > 12; +} + +/************************************************************************* + * IsLFNDriveW [SHELL32.42] + */ +BOOL WINAPI IsLFNDriveW(LPCWSTR lpszPath) +{ + DWORD fnlen; + + if (!GetVolumeInformationW(lpszPath, NULL, 0, NULL, &fnlen, NULL, NULL, 0)) + return FALSE; + return fnlen > 12; +} + +/************************************************************************* + * IsLFNDrive [SHELL32.119] + */ +BOOL WINAPI IsLFNDriveAW(LPCVOID lpszPath) +{ + if (SHELL_OsIsUnicode()) + return IsLFNDriveW(lpszPath); + return IsLFNDriveA(lpszPath); +} + +/* + ########## Creating Something Unique ########## +*/ +/************************************************************************* + * PathMakeUniqueNameA [internal] + */ +BOOL WINAPI PathMakeUniqueNameA( + LPSTR lpszBuffer, + DWORD dwBuffSize, + LPCSTR lpszShortName, + LPCSTR lpszLongName, + LPCSTR lpszPathName) +{ + FIXME("%p %lu %s %s %s stub\n", + lpszBuffer, dwBuffSize, debugstr_a(lpszShortName), + debugstr_a(lpszLongName), debugstr_a(lpszPathName)); + return TRUE; +} + +/************************************************************************* + * PathMakeUniqueNameW [internal] + */ +BOOL WINAPI PathMakeUniqueNameW( + LPWSTR lpszBuffer, + DWORD dwBuffSize, + LPCWSTR lpszShortName, + LPCWSTR lpszLongName, + LPCWSTR lpszPathName) +{ + FIXME("%p %lu %s %s %s stub\n", + lpszBuffer, dwBuffSize, debugstr_w(lpszShortName), + debugstr_w(lpszLongName), debugstr_w(lpszPathName)); + return TRUE; +} + +/************************************************************************* + * PathMakeUniqueName [SHELL32.47] + */ +BOOL WINAPI PathMakeUniqueNameAW( + LPVOID lpszBuffer, + DWORD dwBuffSize, + LPCVOID lpszShortName, + LPCVOID lpszLongName, + LPCVOID lpszPathName) +{ + if (SHELL_OsIsUnicode()) + return PathMakeUniqueNameW(lpszBuffer,dwBuffSize, lpszShortName,lpszLongName,lpszPathName); + return PathMakeUniqueNameA(lpszBuffer,dwBuffSize, lpszShortName,lpszLongName,lpszPathName); +} + +/************************************************************************* + * PathYetAnotherMakeUniqueName [SHELL32.75] + * + * NOTES + * exported by ordinal + */ +BOOL WINAPI PathYetAnotherMakeUniqueName( + LPWSTR lpszBuffer, + LPCWSTR lpszPathName, + LPCWSTR lpszShortName, + LPCWSTR lpszLongName) +{ + FIXME("(%p, %s, %s ,%s):stub.\n", + lpszBuffer, debugstr_w(lpszPathName), debugstr_w(lpszShortName), debugstr_w(lpszLongName)); + return TRUE; +} + + +/* + ########## cleaning and resolving paths ########## + */ + +/************************************************************************* + * PathFindOnPath [SHELL32.145] + */ +BOOL WINAPI PathFindOnPathAW(LPVOID sFile, LPCVOID sOtherDirs) +{ + if (SHELL_OsIsUnicode()) + return PathFindOnPathW(sFile, (LPCWSTR *)sOtherDirs); + return PathFindOnPathA(sFile, (LPCSTR *)sOtherDirs); +} + +/************************************************************************* + * PathCleanupSpec [SHELL32.171] + * + * lpszFile is changed in place. + */ +int WINAPI PathCleanupSpec( LPCWSTR lpszPathW, LPWSTR lpszFileW ) +{ + int i = 0; + DWORD rc = 0; + int length = 0; + + if (SHELL_OsIsUnicode()) + { + LPWSTR p = lpszFileW; + + TRACE("Cleanup %s\n",debugstr_w(lpszFileW)); + + if (lpszPathW) + length = strlenW(lpszPathW); + + while (*p) + { + int gct = PathGetCharTypeW(*p); + if (gct == GCT_INVALID || gct == GCT_WILD || gct == GCT_SEPARATOR) + { + lpszFileW[i]='-'; + rc |= PCS_REPLACEDCHAR; + } + else + lpszFileW[i]=*p; + i++; + p++; + if (length + i == MAX_PATH) + { + rc |= PCS_FATAL | PCS_PATHTOOLONG; + break; + } + } + lpszFileW[i]=0; + } + else + { + LPSTR lpszFileA = (LPSTR)lpszFileW; + LPCSTR lpszPathA = (LPSTR)lpszPathW; + LPSTR p = lpszFileA; + + TRACE("Cleanup %s\n",debugstr_a(lpszFileA)); + + if (lpszPathA) + length = strlen(lpszPathA); + + while (*p) + { + int gct = PathGetCharTypeA(*p); + if (gct == GCT_INVALID || gct == GCT_WILD || gct == GCT_SEPARATOR) + { + lpszFileA[i]='-'; + rc |= PCS_REPLACEDCHAR; + } + else + lpszFileA[i]=*p; + i++; + p++; + if (length + i == MAX_PATH) + { + rc |= PCS_FATAL | PCS_PATHTOOLONG; + break; + } + } + lpszFileA[i]=0; + } + return rc; +} + +/************************************************************************* + * PathQualifyA [SHELL32] + */ +BOOL WINAPI PathQualifyA(LPCSTR pszPath) +{ + FIXME("%s\n",pszPath); + return 0; +} + +/************************************************************************* + * PathQualifyW [SHELL32] + */ +BOOL WINAPI PathQualifyW(LPCWSTR pszPath) +{ + FIXME("%s\n",debugstr_w(pszPath)); + return 0; +} + +/************************************************************************* + * PathQualify [SHELL32.49] + */ +BOOL WINAPI PathQualifyAW(LPCVOID pszPath) +{ + if (SHELL_OsIsUnicode()) + return PathQualifyW(pszPath); + return PathQualifyA(pszPath); +} + +/************************************************************************* + * PathResolveA [SHELL32.51] + */ +BOOL WINAPI PathResolveA( + LPSTR lpszPath, + LPCSTR *alpszPaths, + DWORD dwFlags) +{ + FIXME("(%s,%p,0x%08lx),stub!\n", + lpszPath, *alpszPaths, dwFlags); + return 0; +} + +/************************************************************************* + * PathResolveW [SHELL32] + */ +BOOL WINAPI PathResolveW( + LPWSTR lpszPath, + LPCWSTR *alpszPaths, + DWORD dwFlags) +{ + FIXME("(%s,%p,0x%08lx),stub!\n", + debugstr_w(lpszPath), debugstr_w(*alpszPaths), dwFlags); + return 0; +} + +/************************************************************************* + * PathResolve [SHELL32.51] + */ +BOOL WINAPI PathResolveAW( + LPVOID lpszPath, + LPCVOID *alpszPaths, + DWORD dwFlags) +{ + if (SHELL_OsIsUnicode()) + return PathResolveW(lpszPath, (LPCWSTR*)alpszPaths, dwFlags); + return PathResolveA(lpszPath, (LPCSTR*)alpszPaths, dwFlags); +} + +/************************************************************************* +* PathProcessCommandA [SHELL32.653] +*/ +HRESULT WINAPI PathProcessCommandA ( + LPCSTR lpszPath, + LPSTR lpszBuff, + DWORD dwBuffSize, + DWORD dwFlags) +{ + FIXME("%s %p 0x%04lx 0x%04lx stub\n", + lpszPath, lpszBuff, dwBuffSize, dwFlags); + strcpy(lpszBuff, lpszPath); + return 0; +} + +/************************************************************************* +* PathProcessCommandW +*/ +HRESULT WINAPI PathProcessCommandW ( + LPCWSTR lpszPath, + LPWSTR lpszBuff, + DWORD dwBuffSize, + DWORD dwFlags) +{ + FIXME("(%s, %p, 0x%04lx, 0x%04lx) stub\n", + debugstr_w(lpszPath), lpszBuff, dwBuffSize, dwFlags); + strcpyW(lpszBuff, lpszPath); + return 0; +} + +/************************************************************************* +* PathProcessCommand (SHELL32.653) +*/ +HRESULT WINAPI PathProcessCommandAW ( + LPCVOID lpszPath, + LPVOID lpszBuff, + DWORD dwBuffSize, + DWORD dwFlags) +{ + if (SHELL_OsIsUnicode()) + return PathProcessCommandW(lpszPath, lpszBuff, dwBuffSize, dwFlags); + return PathProcessCommandA(lpszPath, lpszBuff, dwBuffSize, dwFlags); +} + +/* + ########## special ########## +*/ + +/************************************************************************* + * PathSetDlgItemPath (SHELL32.48) + */ +VOID WINAPI PathSetDlgItemPathAW(HWND hDlg, int id, LPCVOID pszPath) +{ + if (SHELL_OsIsUnicode()) + PathSetDlgItemPathW(hDlg, id, pszPath); + else + PathSetDlgItemPathA(hDlg, id, pszPath); +} + +static const WCHAR szCurrentVersion[] = {'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','\0'}; +static const WCHAR Administrative_ToolsW[] = {'A','d','m','i','n','i','s','t','r','a','t','i','v','e',' ','T','o','o','l','s','\0'}; +static const WCHAR AppDataW[] = {'A','p','p','D','a','t','a','\0'}; +static const WCHAR CacheW[] = {'C','a','c','h','e','\0'}; +static const WCHAR CD_BurningW[] = {'C','D',' ','B','u','r','n','i','n','g','\0'}; +static const WCHAR Common_Administrative_ToolsW[] = {'C','o','m','m','o','n',' ','A','d','m','i','n','i','s','t','r','a','t','i','v','e',' ','T','o','o','l','s','\0'}; +static const WCHAR Common_AppDataW[] = {'C','o','m','m','o','n',' ','A','p','p','D','a','t','a','\0'}; +static const WCHAR Common_DesktopW[] = {'C','o','m','m','o','n',' ','D','e','s','k','t','o','p','\0'}; +static const WCHAR Common_DocumentsW[] = {'C','o','m','m','o','n',' ','D','o','c','u','m','e','n','t','s','\0'}; +static const WCHAR CommonFilesDirW[] = {'C','o','m','m','o','n','F','i','l','e','s','D','i','r','\0'}; +static const WCHAR CommonMusicW[] = {'C','o','m','m','o','n','M','u','s','i','c','\0'}; +static const WCHAR CommonPicturesW[] = {'C','o','m','m','o','n','P','i','c','t','u','r','e','s','\0'}; +static const WCHAR Common_ProgramsW[] = {'C','o','m','m','o','n',' ','P','r','o','g','r','a','m','s','\0'}; +static const WCHAR Common_StartUpW[] = {'C','o','m','m','o','n',' ','S','t','a','r','t','U','p','\0'}; +static const WCHAR Common_Start_MenuW[] = {'C','o','m','m','o','n',' ','S','t','a','r','t',' ','M','e','n','u','\0'}; +static const WCHAR Common_TemplatesW[] = {'C','o','m','m','o','n',' ','T','e','m','p','l','a','t','e','s','\0'}; +static const WCHAR CommonVideoW[] = {'C','o','m','m','o','n','V','i','d','e','o','\0'}; +static const WCHAR CookiesW[] = {'C','o','o','k','i','e','s','\0'}; +static const WCHAR DesktopW[] = {'D','e','s','k','t','o','p','\0'}; +static const WCHAR FavoritesW[] = {'F','a','v','o','r','i','t','e','s','\0'}; +static const WCHAR FontsW[] = {'F','o','n','t','s','\0'}; +static const WCHAR HistoryW[] = {'H','i','s','t','o','r','y','\0'}; +static const WCHAR Local_AppDataW[] = {'L','o','c','a','l',' ','A','p','p','D','a','t','a','\0'}; +static const WCHAR My_MusicW[] = {'M','y',' ','M','u','s','i','c','\0'}; +static const WCHAR My_PicturesW[] = {'M','y',' ','P','i','c','t','u','r','e','s','\0'}; +static const WCHAR My_VideoW[] = {'M','y',' ','V','i','d','e','o','\0'}; +static const WCHAR NetHoodW[] = {'N','e','t','H','o','o','d','\0'}; +static const WCHAR PersonalW[] = {'P','e','r','s','o','n','a','l','\0'}; +static const WCHAR PrintHoodW[] = {'P','r','i','n','t','H','o','o','d','\0'}; +static const WCHAR ProgramFilesDirW[] = {'P','r','o','g','r','a','m','F','i','l','e','s','D','i','r','\0'}; +static const WCHAR ProgramsW[] = {'P','r','o','g','r','a','m','s','\0'}; +static const WCHAR RecentW[] = {'R','e','c','e','n','t','\0'}; +static const WCHAR ResourcesW[] = {'R','e','s','o','u','r','c','e','s','\0'}; +static const WCHAR SendToW[] = {'S','e','n','d','T','o','\0'}; +static const WCHAR StartUpW[] = {'S','t','a','r','t','U','p','\0'}; +static const WCHAR Start_MenuW[] = {'S','t','a','r','t',' ','M','e','n','u','\0'}; +static const WCHAR TemplatesW[] = {'T','e','m','p','l','a','t','e','s','\0'}; +static const WCHAR DefaultW[] = {'.','D','e','f','a','u','l','t','\0'}; +static const WCHAR AllUsersProfileW[] = {'%','A','L','L','U','S','E','R','S','P','R','O','F','I','L','E','%','\0'}; +static const WCHAR UserProfileW[] = {'%','U','S','E','R','P','R','O','F','I','L','E','%','\0'}; +static const WCHAR SystemDriveW[] = {'%','S','y','s','t','e','m','D','r','i','v','e','%','\0'}; +static const WCHAR ProfileListW[] = {'S','o','f','t','w','a','r','e','\\','M','i','c','r','o','s','o','f','t','\\','W','i','n','d','o','w','s',' ','N','T','\\','C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\','P','r','o','f','i','l','e','L','i','s','t',0}; +static const WCHAR ProfilesDirectoryW[] = {'P','r','o','f','i','l','e','s','D','i','r','e','c','t','o','r','y',0}; +static const WCHAR AllUsersProfileValueW[] = {'A','l','l','U','s','e','r','s','P','r','o','f','i','l','e','\0'}; +static const WCHAR szSHFolders[] = {'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','\\','E','x','p','l','o','r','e','r','\\','S','h','e','l','l',' ','F','o','l','d','e','r','s','\0'}; +static const WCHAR szSHUserFolders[] = {'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','\\','E','x','p','l','o','r','e','r','\\','U','s','e','r',' ','S','h','e','l','l',' ','F','o','l','d','e','r','s','\0'}; +/* This defaults to L"Documents and Settings" on Windows 2000/XP, but we're + * acting more Windows 9x-like for now. + */ +static const WCHAR szDefaultProfileDirW[] = {'w','i','n','d','o','w','s','\\','p','r','o','f','i','l','e','s','\0'}; +static const WCHAR AllUsersW[] = {'A','l','l',' ','U','s','e','r','s','\0'}; + +typedef enum _CSIDL_Type { + CSIDL_Type_User, + CSIDL_Type_AllUsers, + CSIDL_Type_CurrVer, + CSIDL_Type_Disallowed, + CSIDL_Type_NonExistent, + CSIDL_Type_WindowsPath, + CSIDL_Type_SystemPath, +} CSIDL_Type; + +typedef struct +{ + CSIDL_Type type; + LPCWSTR szValueName; + LPCWSTR szDefaultPath; /* fallback string or resource ID */ +} CSIDL_DATA; + +static const CSIDL_DATA CSIDL_Data[] = +{ + { /* 0x00 - CSIDL_DESKTOP */ + CSIDL_Type_User, + DesktopW, + MAKEINTRESOURCEW(IDS_DESKTOPDIRECTORY) + }, + { /* 0x01 - CSIDL_INTERNET */ + CSIDL_Type_Disallowed, + NULL, + NULL + }, + { /* 0x02 - CSIDL_PROGRAMS */ + CSIDL_Type_User, + ProgramsW, + MAKEINTRESOURCEW(IDS_PROGRAMS) + }, + { /* 0x03 - CSIDL_CONTROLS (.CPL files) */ + CSIDL_Type_SystemPath, + NULL, + NULL + }, + { /* 0x04 - CSIDL_PRINTERS */ + CSIDL_Type_SystemPath, + NULL, + NULL + }, + { /* 0x05 - CSIDL_PERSONAL */ + CSIDL_Type_User, + PersonalW, + MAKEINTRESOURCEW(IDS_PERSONAL) + }, + { /* 0x06 - CSIDL_FAVORITES */ + CSIDL_Type_User, + FavoritesW, + MAKEINTRESOURCEW(IDS_FAVORITES) + }, + { /* 0x07 - CSIDL_STARTUP */ + CSIDL_Type_User, + StartUpW, + MAKEINTRESOURCEW(IDS_STARTUP) + }, + { /* 0x08 - CSIDL_RECENT */ + CSIDL_Type_User, + RecentW, + MAKEINTRESOURCEW(IDS_RECENT) + }, + { /* 0x09 - CSIDL_SENDTO */ + CSIDL_Type_User, + SendToW, + MAKEINTRESOURCEW(IDS_SENDTO) + }, + { /* 0x0a - CSIDL_BITBUCKET - Recycle Bin */ + CSIDL_Type_Disallowed, + NULL, + NULL, + }, + { /* 0x0b - CSIDL_STARTMENU */ + CSIDL_Type_User, + Start_MenuW, + MAKEINTRESOURCEW(IDS_STARTMENU) + }, + { /* 0x0c - CSIDL_MYDOCUMENTS */ + CSIDL_Type_Disallowed, /* matches WinXP--can't get its path */ + NULL, + NULL + }, + { /* 0x0d - CSIDL_MYMUSIC */ + CSIDL_Type_User, + My_MusicW, + MAKEINTRESOURCEW(IDS_MYMUSIC) + }, + { /* 0x0e - CSIDL_MYVIDEO */ + CSIDL_Type_User, + My_VideoW, + MAKEINTRESOURCEW(IDS_MYVIDEO) + }, + { /* 0x0f - unassigned */ + CSIDL_Type_Disallowed, + NULL, + NULL, + }, + { /* 0x10 - CSIDL_DESKTOPDIRECTORY */ + CSIDL_Type_User, + DesktopW, + MAKEINTRESOURCEW(IDS_DESKTOPDIRECTORY) + }, + { /* 0x11 - CSIDL_DRIVES */ + CSIDL_Type_Disallowed, + NULL, + NULL, + }, + { /* 0x12 - CSIDL_NETWORK */ + CSIDL_Type_Disallowed, + NULL, + NULL, + }, + { /* 0x13 - CSIDL_NETHOOD */ + CSIDL_Type_User, + NetHoodW, + MAKEINTRESOURCEW(IDS_NETHOOD) + }, + { /* 0x14 - CSIDL_FONTS */ + CSIDL_Type_WindowsPath, + NULL, + FontsW + }, + { /* 0x15 - CSIDL_TEMPLATES */ + CSIDL_Type_User, + TemplatesW, + MAKEINTRESOURCEW(IDS_TEMPLATES) + }, + { /* 0x16 - CSIDL_COMMON_STARTMENU */ + CSIDL_Type_AllUsers, + Common_Start_MenuW, + MAKEINTRESOURCEW(IDS_STARTMENU) + }, + { /* 0x17 - CSIDL_COMMON_PROGRAMS */ + CSIDL_Type_AllUsers, + Common_ProgramsW, + MAKEINTRESOURCEW(IDS_PROGRAMS) + }, + { /* 0x18 - CSIDL_COMMON_STARTUP */ + CSIDL_Type_AllUsers, + Common_StartUpW, + MAKEINTRESOURCEW(IDS_STARTUP) + }, + { /* 0x19 - CSIDL_COMMON_DESKTOPDIRECTORY */ + CSIDL_Type_AllUsers, + Common_DesktopW, + MAKEINTRESOURCEW(IDS_DESKTOP) + }, + { /* 0x1a - CSIDL_APPDATA */ + CSIDL_Type_User, + AppDataW, + MAKEINTRESOURCEW(IDS_APPDATA) + }, + { /* 0x1b - CSIDL_PRINTHOOD */ + CSIDL_Type_User, + PrintHoodW, + MAKEINTRESOURCEW(IDS_PRINTHOOD) + }, + { /* 0x1c - CSIDL_LOCAL_APPDATA */ + CSIDL_Type_User, + Local_AppDataW, + MAKEINTRESOURCEW(IDS_LOCAL_APPDATA) + }, + { /* 0x1d - CSIDL_ALTSTARTUP */ + CSIDL_Type_NonExistent, + NULL, + NULL + }, + { /* 0x1e - CSIDL_COMMON_ALTSTARTUP */ + CSIDL_Type_NonExistent, + NULL, + NULL + }, + { /* 0x1f - CSIDL_COMMON_FAVORITES */ + CSIDL_Type_AllUsers, + FavoritesW, + MAKEINTRESOURCEW(IDS_FAVORITES) + }, + { /* 0x20 - CSIDL_INTERNET_CACHE */ + CSIDL_Type_User, + CacheW, + MAKEINTRESOURCEW(IDS_INTERNET_CACHE) + }, + { /* 0x21 - CSIDL_COOKIES */ + CSIDL_Type_User, + CookiesW, + MAKEINTRESOURCEW(IDS_COOKIES) + }, + { /* 0x22 - CSIDL_HISTORY */ + CSIDL_Type_User, + HistoryW, + MAKEINTRESOURCEW(IDS_HISTORY) + }, + { /* 0x23 - CSIDL_COMMON_APPDATA */ + CSIDL_Type_AllUsers, + Common_AppDataW, + MAKEINTRESOURCEW(IDS_APPDATA) + }, + { /* 0x24 - CSIDL_WINDOWS */ + CSIDL_Type_WindowsPath, + NULL, + NULL + }, + { /* 0x25 - CSIDL_SYSTEM */ + CSIDL_Type_SystemPath, + NULL, + NULL + }, + { /* 0x26 - CSIDL_PROGRAM_FILES */ + CSIDL_Type_CurrVer, + ProgramFilesDirW, + MAKEINTRESOURCEW(IDS_PROGRAM_FILES) + }, + { /* 0x27 - CSIDL_MYPICTURES */ + CSIDL_Type_User, + My_PicturesW, + MAKEINTRESOURCEW(IDS_MYPICTURES) + }, + { /* 0x28 - CSIDL_PROFILE */ + CSIDL_Type_User, + NULL, + NULL + }, + { /* 0x29 - CSIDL_SYSTEMX86 */ + CSIDL_Type_NonExistent, + NULL, + NULL + }, + { /* 0x2a - CSIDL_PROGRAM_FILESX86 */ + CSIDL_Type_NonExistent, + NULL, + NULL + }, + { /* 0x2b - CSIDL_PROGRAM_FILES_COMMON */ + CSIDL_Type_CurrVer, + CommonFilesDirW, + MAKEINTRESOURCEW(IDS_PROGRAM_FILES_COMMON) + }, + { /* 0x2c - CSIDL_PROGRAM_FILES_COMMONX86 */ + CSIDL_Type_NonExistent, + NULL, + NULL + }, + { /* 0x2d - CSIDL_COMMON_TEMPLATES */ + CSIDL_Type_AllUsers, + Common_TemplatesW, + MAKEINTRESOURCEW(IDS_TEMPLATES) + }, + { /* 0x2e - CSIDL_COMMON_DOCUMENTS */ + CSIDL_Type_AllUsers, + Common_DocumentsW, + MAKEINTRESOURCEW(IDS_COMMON_DOCUMENTS) + }, + { /* 0x2f - CSIDL_COMMON_ADMINTOOLS */ + CSIDL_Type_AllUsers, + Common_Administrative_ToolsW, + MAKEINTRESOURCEW(IDS_ADMINTOOLS) + }, + { /* 0x30 - CSIDL_ADMINTOOLS */ + CSIDL_Type_User, + Administrative_ToolsW, + MAKEINTRESOURCEW(IDS_ADMINTOOLS) + }, + { /* 0x31 - CSIDL_CONNECTIONS */ + CSIDL_Type_Disallowed, + NULL, + NULL + }, + { /* 0x32 - unassigned */ + CSIDL_Type_Disallowed, + NULL, + NULL + }, + { /* 0x33 - unassigned */ + CSIDL_Type_Disallowed, + NULL, + NULL + }, + { /* 0x34 - unassigned */ + CSIDL_Type_Disallowed, + NULL, + NULL + }, + { /* 0x35 - CSIDL_COMMON_MUSIC */ + CSIDL_Type_AllUsers, + CommonMusicW, + MAKEINTRESOURCEW(IDS_COMMON_MUSIC) + }, + { /* 0x36 - CSIDL_COMMON_PICTURES */ + CSIDL_Type_AllUsers, + CommonPicturesW, + MAKEINTRESOURCEW(IDS_COMMON_PICTURES) + }, + { /* 0x37 - CSIDL_COMMON_VIDEO */ + CSIDL_Type_AllUsers, + CommonVideoW, + MAKEINTRESOURCEW(IDS_COMMON_VIDEO) + }, + { /* 0x38 - CSIDL_RESOURCES */ + CSIDL_Type_WindowsPath, + NULL, + ResourcesW + }, + { /* 0x39 - CSIDL_RESOURCES_LOCALIZED */ + CSIDL_Type_NonExistent, + NULL, + NULL + }, + { /* 0x3a - CSIDL_COMMON_OEM_LINKS */ + CSIDL_Type_NonExistent, + NULL, + NULL + }, + { /* 0x3b - CSIDL_CDBURN_AREA */ + CSIDL_Type_User, + CD_BurningW, + MAKEINTRESOURCEW(IDS_CDBURN_AREA) + }, + { /* 0x3c unassigned */ + CSIDL_Type_Disallowed, + NULL, + NULL + }, + { /* 0x3d - CSIDL_COMPUTERSNEARME */ + CSIDL_Type_Disallowed, /* FIXME */ + NULL, + NULL + }, + { /* 0x3e - CSIDL_PROFILES */ + CSIDL_Type_Disallowed, /* oddly, this matches WinXP */ + NULL, + NULL + } +}; + +static HRESULT _SHExpandEnvironmentStrings(LPCWSTR szSrc, LPWSTR szDest); + +/* Gets the value named value from the registry key + * rootKey\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders + * (or from rootKey\userPrefix\... if userPrefix is not NULL) into path, which + * is assumed to be MAX_PATH WCHARs in length. + * If it exists, expands the value and writes the expanded value to + * rootKey\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders + * Returns successful error code if the value was retrieved from the registry, + * and a failure otherwise. + */ +static HRESULT _SHGetUserShellFolderPath(HKEY rootKey, LPCWSTR userPrefix, + LPCWSTR value, LPWSTR path) +{ + HRESULT hr; + WCHAR shellFolderPath[MAX_PATH], userShellFolderPath[MAX_PATH]; + LPCWSTR pShellFolderPath, pUserShellFolderPath; + DWORD dwDisp, dwType, dwPathLen = MAX_PATH; + HKEY userShellFolderKey, shellFolderKey; + + TRACE("%p,%s,%s,%p\n",rootKey, debugstr_w(userPrefix), debugstr_w(value), + path); + + if (userPrefix) + { + strcpyW(shellFolderPath, userPrefix); + PathAddBackslashW(shellFolderPath); + strcatW(shellFolderPath, szSHFolders); + pShellFolderPath = shellFolderPath; + strcpyW(userShellFolderPath, userPrefix); + PathAddBackslashW(userShellFolderPath); + strcatW(userShellFolderPath, szSHUserFolders); + pUserShellFolderPath = userShellFolderPath; + } + else + { + pUserShellFolderPath = szSHUserFolders; + pShellFolderPath = szSHFolders; + } + + if (RegCreateKeyExW(rootKey, pShellFolderPath, 0, NULL, 0, KEY_ALL_ACCESS, + NULL, &shellFolderKey, &dwDisp)) + { + TRACE("Failed to create %s\n", debugstr_w(pShellFolderPath)); + return E_FAIL; + } + if (RegCreateKeyExW(rootKey, pUserShellFolderPath, 0, NULL, 0, + KEY_ALL_ACCESS, NULL, &userShellFolderKey, &dwDisp)) + { + TRACE("Failed to create %s\n", + debugstr_w(pUserShellFolderPath)); + RegCloseKey(shellFolderKey); + return E_FAIL; + } + + if (!RegQueryValueExW(userShellFolderKey, value, NULL, &dwType, + (LPBYTE)path, &dwPathLen) && (dwType == REG_EXPAND_SZ || dwType == REG_SZ)) + { + path[dwPathLen / sizeof(WCHAR)] = '\0'; + if (dwType == REG_EXPAND_SZ && path[0] == '%') + { + WCHAR szTemp[MAX_PATH]; + + _SHExpandEnvironmentStrings(path, szTemp); + strncpyW(path, szTemp, MAX_PATH); + } + RegSetValueExW(shellFolderKey, value, 0, REG_SZ, (LPBYTE)path, + (strlenW(path) + 1) * sizeof(WCHAR)); + hr = S_OK; + } + else + hr = E_FAIL; + RegCloseKey(shellFolderKey); + RegCloseKey(userShellFolderKey); + TRACE("returning 0x%08lx\n", hr); + return hr; +} + +/* Gets a 'semi-expanded' default value of the CSIDL with index folder into + * pszPath, based on the entries in CSIDL_Data. By semi-expanded, I mean: + * - The entry's szDefaultPath may be either a string value or an integer + * resource identifier. In the latter case, the string value of the resource + * is written. + * - Depending on the entry's type, the path may begin with an (unexpanded) + * environment variable name. The caller is responsible for expanding + * environment strings if so desired. + * The types that are prepended with environment variables are: + * CSIDL_Type_User: %USERPROFILE% + * CSIDL_Type_AllUsers: %ALLUSERSPROFILE% + * CSIDL_Type_CurrVer: %SystemDrive% + * (Others might make sense too, but as yet are unneeded.) + * FIXME: there are two special cases for the default value: + * - the "My Documents" (CSIDL_PERSONAL) entry should be $HOME + * - the CSIDL_DESKTOP and CSIDL_DESKTOPDIRECTORY (which have the same path) + * should be $HOME/Desktop if it exists + * But, $HOME doesn't seem to be inherited into the Wine environment. I could + * use getenv, but this returns me a UNIX path, which may or may not be + * reachable from any currently mounted DOS drives. + */ +static HRESULT _SHGetDefaultValue(BYTE folder, LPWSTR pszPath) +{ + HRESULT hr; + WCHAR resourcePath[MAX_PATH]; + LPCWSTR pDefaultPath = NULL; + + TRACE("0x%02x,%p\n", folder, pszPath); + + if (folder >= sizeof(CSIDL_Data) / sizeof(CSIDL_Data[0])) + return E_INVALIDARG; + if (!pszPath) + return E_INVALIDARG; + + if (CSIDL_Data[folder].szDefaultPath && + IS_INTRESOURCE(CSIDL_Data[folder].szDefaultPath)) + { + if (LoadStringW(shell32_hInstance, + (UINT)CSIDL_Data[folder].szDefaultPath, resourcePath, MAX_PATH)) + { + hr = S_OK; + pDefaultPath = resourcePath; + } + else + { + FIXME("LoadString failed, missing translation?\n"); + hr = E_FAIL; + } + } + else + { + hr = S_OK; + pDefaultPath = CSIDL_Data[folder].szDefaultPath; + } + if (SUCCEEDED(hr)) + { + switch (CSIDL_Data[folder].type) + { + case CSIDL_Type_User: + strcpyW(pszPath, UserProfileW); + break; + case CSIDL_Type_AllUsers: + strcpyW(pszPath, AllUsersProfileW); + break; + case CSIDL_Type_CurrVer: + strcpyW(pszPath, SystemDriveW); + break; + default: + ; /* no corresponding env. var, do nothing */ + } + if (pDefaultPath) + { + PathAddBackslashW(pszPath); + strcatW(pszPath, pDefaultPath); + } + } + TRACE("returning 0x%08lx\n", hr); + return hr; +} + +/* Gets the (unexpanded) value of the folder with index folder into pszPath. + * The folder's type is assumed to be CSIDL_Type_CurrVer. Its default value + * can be overridden in the HKLM\\szCurrentVersion key. + * If dwFlags has SHGFP_TYPE_DEFAULT set or if the value isn't overridden in + * the registry, uses _SHGetDefaultValue to get the value. + */ +static HRESULT _SHGetCurrentVersionPath(DWORD dwFlags, BYTE folder, + LPWSTR pszPath) +{ + HRESULT hr; + + TRACE("0x%08lx,0x%02x,%p\n", dwFlags, folder, pszPath); + + if (folder >= sizeof(CSIDL_Data) / sizeof(CSIDL_Data[0])) + return E_INVALIDARG; + if (CSIDL_Data[folder].type != CSIDL_Type_CurrVer) + return E_INVALIDARG; + if (!pszPath) + return E_INVALIDARG; + + if (dwFlags & SHGFP_TYPE_DEFAULT) + hr = _SHGetDefaultValue(folder, pszPath); + else + { + HKEY hKey; + DWORD dwDisp; + + if (RegCreateKeyExW(HKEY_LOCAL_MACHINE, szCurrentVersion, 0, + NULL, 0, KEY_ALL_ACCESS, NULL, &hKey, &dwDisp)) + hr = E_FAIL; + else + { + DWORD dwType, dwPathLen = MAX_PATH * sizeof(WCHAR); + + if (RegQueryValueExW(hKey, CSIDL_Data[folder].szValueName, NULL, + &dwType, (LPBYTE)pszPath, &dwPathLen) || + (dwType != REG_SZ && dwType != REG_EXPAND_SZ)) + { + hr = _SHGetDefaultValue(folder, pszPath); + dwType = REG_EXPAND_SZ; + RegSetValueExW(hKey, CSIDL_Data[folder].szValueName, 0, dwType, + (LPBYTE)pszPath, (strlenW(pszPath)+1)*sizeof(WCHAR)); + } + else + { + pszPath[dwPathLen / sizeof(WCHAR)] = '\0'; + hr = S_OK; + } + RegCloseKey(hKey); + } + } + TRACE("returning 0x%08lx (output path is %s)\n", hr, debugstr_w(pszPath)); + return hr; +} + +/* Gets the user's path (unexpanded) for the CSIDL with index folder: + * If SHGFP_TYPE_DEFAULT is set, calls _SHGetDefaultValue for it. Otherwise + * calls _SHGetUserShellFolderPath for it. Where it looks depends on hToken: + * - if hToken is -1, looks in HKEY_USERS\.Default + * - otherwise looks first in HKEY_CURRENT_USER, followed by HKEY_LOCAL_MACHINE + * if HKEY_CURRENT_USER doesn't contain any entries. If both fail, finally + * calls _SHGetDefaultValue for it. + */ +static HRESULT _SHGetUserProfilePath(HANDLE hToken, DWORD dwFlags, BYTE folder, + LPWSTR pszPath) +{ + HRESULT hr; + + TRACE("%p,0x%08lx,0x%02x,%p\n", hToken, dwFlags, folder, pszPath); + + if (folder >= sizeof(CSIDL_Data) / sizeof(CSIDL_Data[0])) + return E_INVALIDARG; + if (CSIDL_Data[folder].type != CSIDL_Type_User) + return E_INVALIDARG; + if (!pszPath) + return E_INVALIDARG; + + /* Only the current user and the default user are supported right now + * I'm afraid. + * FIXME: should be able to call GetTokenInformation on the token, + * then call ConvertSidToStringSidW on it to get the user prefix. + * But Wine's registry doesn't store user info by sid, it stores it + * by user name (and I don't know how to convert from a token to a + * user name). + */ + if (hToken != NULL && hToken != (HANDLE)-1) + { + FIXME("unsupported for user other than current or default\n"); + return E_FAIL; + } + + if (dwFlags & SHGFP_TYPE_DEFAULT) + hr = _SHGetDefaultValue(folder, pszPath); + else + { + LPCWSTR userPrefix = NULL; + HKEY hRootKey; + + if (hToken == (HANDLE)-1) + { + hRootKey = HKEY_USERS; + userPrefix = DefaultW; + } + else /* hToken == NULL, other values disallowed above */ + hRootKey = HKEY_CURRENT_USER; + hr = _SHGetUserShellFolderPath(hRootKey, userPrefix, + CSIDL_Data[folder].szValueName, pszPath); + if (FAILED(hr) && hRootKey != HKEY_LOCAL_MACHINE) + hr = _SHGetUserShellFolderPath(HKEY_LOCAL_MACHINE, NULL, + CSIDL_Data[folder].szValueName, pszPath); + if (FAILED(hr)) + hr = _SHGetDefaultValue(folder, pszPath); + } + TRACE("returning 0x%08lx (output path is %s)\n", hr, debugstr_w(pszPath)); + return hr; +} + +/* Gets the (unexpanded) path for the CSIDL with index folder. If dwFlags has + * SHGFP_TYPE_DEFAULT set, calls _SHGetDefaultValue. Otherwise calls + * _SHGetUserShellFolderPath for it, looking only in HKEY_LOCAL_MACHINE. + * If this fails, falls back to _SHGetDefaultValue. + */ +static HRESULT _SHGetAllUsersProfilePath(DWORD dwFlags, BYTE folder, + LPWSTR pszPath) +{ + HRESULT hr; + + TRACE("0x%08lx,0x%02x,%p\n", dwFlags, folder, pszPath); + + if (folder >= sizeof(CSIDL_Data) / sizeof(CSIDL_Data[0])) + return E_INVALIDARG; + if (CSIDL_Data[folder].type != CSIDL_Type_AllUsers) + return E_INVALIDARG; + if (!pszPath) + return E_INVALIDARG; + + if (dwFlags & SHGFP_TYPE_DEFAULT) + hr = _SHGetDefaultValue(folder, pszPath); + else + { + hr = _SHGetUserShellFolderPath(HKEY_LOCAL_MACHINE, NULL, + CSIDL_Data[folder].szValueName, pszPath); + if (FAILED(hr)) + hr = _SHGetDefaultValue(folder, pszPath); + } + TRACE("returning 0x%08lx (output path is %s)\n", hr, debugstr_w(pszPath)); + return hr; +} + +static HRESULT _SHOpenProfilesKey(PHKEY pKey) +{ + LONG lRet; + DWORD disp; + + lRet = RegCreateKeyExW(HKEY_LOCAL_MACHINE, ProfileListW, 0, NULL, 0, + KEY_ALL_ACCESS, NULL, pKey, &disp); + return HRESULT_FROM_WIN32(lRet); +} + +/* Reads the value named szValueName from the key profilesKey (assumed to be + * opened by _SHOpenProfilesKey) into szValue, which is assumed to be MAX_PATH + * WCHARs in length. If it doesn't exist, returns szDefault (and saves + * szDefault to the registry). + */ +static HRESULT _SHGetProfilesValue(HKEY profilesKey, LPCWSTR szValueName, + LPWSTR szValue, LPCWSTR szDefault) +{ + HRESULT hr; + DWORD type, dwPathLen = MAX_PATH * sizeof(WCHAR); + LONG lRet; + + TRACE("%p,%s,%p,%s\n", profilesKey, debugstr_w(szValueName), szValue, + debugstr_w(szDefault)); + lRet = RegQueryValueExW(profilesKey, szValueName, NULL, &type, + (LPBYTE)szValue, &dwPathLen); + if (!lRet && (type == REG_SZ || type == REG_EXPAND_SZ) && dwPathLen + && *szValue) + { + dwPathLen /= sizeof(WCHAR); + szValue[dwPathLen] = '\0'; + hr = S_OK; + } + else + { + /* Missing or invalid value, set a default */ + strncpyW(szValue, szDefault, MAX_PATH); + szValue[MAX_PATH - 1] = '\0'; + TRACE("Setting missing value %s to %s\n", debugstr_w(szValueName), + debugstr_w(szValue)); + lRet = RegSetValueExW(profilesKey, szValueName, 0, REG_EXPAND_SZ, + (LPBYTE)szValue, (strlenW(szValue) + 1) * sizeof(WCHAR)); + if (lRet) + hr = HRESULT_FROM_WIN32(lRet); + else + hr = S_OK; + } + TRACE("returning 0x%08lx (output value is %s)\n", hr, debugstr_w(szValue)); + return hr; +} + +/* From the original Wine source: + * + * Attempts to expand environment variables from szSrc into szDest, which is + * assumed to be MAX_PATH characters in length. Before referring to the + * environment, handles a few variables directly, because the environment + * variables may not be set when this is called (as during Wine's installation + * when default values are being written to the registry). + * The directly handled environment variables, and their source, are: + * - ALLUSERSPROFILE, USERPROFILE: reads from the registry + * - SystemDrive: uses GetSystemDirectoryW and uses the drive portion of its + * path + * If one of the directly handled environment variables is expanded, only + * expands a single variable, and only in the beginning of szSrc. + * + * That's fine for Wine, but it breaks in ReactOS where we have profile paths + * like "c:\documents and settings\Administrator.REACTOS". Anyway, we have the + * environment variables handy so we'll just use them instead of hacking around + */ +static HRESULT _SHExpandEnvironmentStrings(LPCWSTR szSrc, LPWSTR szDest) +{ + HRESULT hr; + WCHAR szTemp[MAX_PATH], szProfilesPrefix[MAX_PATH] = { 0 }; + + TRACE("%s, %p\n", debugstr_w(szSrc), szDest); + + if (!szSrc || !szDest) return E_INVALIDARG; + + /* short-circuit if there's nothing to expand */ + if (szSrc[0] != '%') + { + strcpyW(szDest, szSrc); + hr = S_OK; + goto end; + } + + *szDest = 0; + strcpyW(szTemp, szSrc); + while (SUCCEEDED(hr) && szTemp[0] == '%') + { + DWORD ret = ExpandEnvironmentStringsW(szSrc, szDest, MAX_PATH); + + if (ret > MAX_PATH) + hr = HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER); + else if (ret == 0) + hr = HRESULT_FROM_WIN32(GetLastError()); + else + hr = S_OK; + if (SUCCEEDED(hr) && szDest[0] == '%') + strcpyW(szTemp, szDest); + else + { + /* terminate loop */ + szTemp[0] = '\0'; + } + } +end: + TRACE("returning 0x%08lx (input was %s, output is %s)\n", hr, + debugstr_w(szSrc), debugstr_w(szDest)); + return hr; +} + +/************************************************************************* + * SHGetFolderPathW [SHELL32.@] + * + * NOTES + * Converts nFolder to path. Most values can be overridden in either + * HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders + * or in the same location in HKLM. + * The registry usage is explained by the following tech note: + * http://www.microsoft.com/windows2000/techinfo/reskit/en-us/default.asp?url=/windows2000/techinfo/reskit/en-us/regentry/36173.asp + * The "Shell Folders" registry key was used in NT4 and earlier systems. + * Beginning with Windows 2000, the "User Shell Folders" key is used, so + * changes made to it are made to the former key too. This synchronization is + * done on-demand: not until someone requests the value of one of these paths + * (by calling one of the SHGet functions) is the value synchronized. + * Furthermore, as explained here: + * http://www.microsoft.com/windows2000/techinfo/reskit/en-us/default.asp?url=/windows2000/techinfo/reskit/en-us/regentry/36276.asp + * the HKCU paths take precedence over the HKLM paths. + * + **********************************************************************/ +HRESULT WINAPI SHGetFolderPathW( + HWND hwndOwner, + int nFolder, + HANDLE hToken, + DWORD dwFlags, + LPWSTR pszPath) +{ + HRESULT hr; + WCHAR szBuildPath[MAX_PATH], szTemp[MAX_PATH]; + DWORD folder = nFolder & CSIDL_FOLDER_MASK; + CSIDL_Type type; + int ret; + + TRACE("%p,%p,nFolder=0x%04x\n", hwndOwner,pszPath,nFolder); + + /* Windows always NULL-terminates the resulting path regardless of success + * or failure, so do so first + */ + if (pszPath) + *pszPath = '\0'; + if (folder >= sizeof(CSIDL_Data) / sizeof(CSIDL_Data[0])) + return E_INVALIDARG; + szTemp[0] = 0; + type = CSIDL_Data[folder].type; + switch (type) + { + case CSIDL_Type_Disallowed: + hr = E_INVALIDARG; + break; + case CSIDL_Type_NonExistent: + hr = S_FALSE; + break; + case CSIDL_Type_WindowsPath: + GetWindowsDirectoryW(szTemp, MAX_PATH); + if (CSIDL_Data[folder].szDefaultPath && + !IS_INTRESOURCE(CSIDL_Data[folder].szDefaultPath) && + *CSIDL_Data[folder].szDefaultPath) + { + PathAddBackslashW(szTemp); + strcatW(szTemp, CSIDL_Data[folder].szDefaultPath); + } + hr = S_OK; + break; + case CSIDL_Type_SystemPath: + GetSystemDirectoryW(szTemp, MAX_PATH); + if (CSIDL_Data[folder].szDefaultPath && + !IS_INTRESOURCE(CSIDL_Data[folder].szDefaultPath) && + *CSIDL_Data[folder].szDefaultPath) + { + PathAddBackslashW(szTemp); + strcatW(szTemp, CSIDL_Data[folder].szDefaultPath); + } + hr = S_OK; + break; + case CSIDL_Type_CurrVer: + hr = _SHGetCurrentVersionPath(dwFlags, folder, szTemp); + break; + case CSIDL_Type_User: + hr = _SHGetUserProfilePath(hToken, dwFlags, folder, szTemp); + break; + case CSIDL_Type_AllUsers: + hr = _SHGetAllUsersProfilePath(dwFlags, folder, szTemp); + break; + default: + FIXME("bogus type %d, please fix\n", type); + hr = E_INVALIDARG; + break; + } + + /* Expand environment strings if necessary */ + if (*szTemp == '%') + hr = _SHExpandEnvironmentStrings(szTemp, szBuildPath); + else + strcpyW(szBuildPath, szTemp); + /* Copy the path if it's available before we might return */ + if (SUCCEEDED(hr) && pszPath) + strcpyW(pszPath, szBuildPath); + + if (FAILED(hr)) goto end; + + /* if we don't care about existing directories we are ready */ + if(nFolder & CSIDL_FLAG_DONT_VERIFY) goto end; + + if (PathFileExistsW(szBuildPath)) goto end; + + /* not existing but we are not allowed to create it. The return value + * is verified against shell32 version 6.0. + */ + if (!(nFolder & CSIDL_FLAG_CREATE)) + { + hr = HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND); + goto end; + } + + /* create directory/directories */ + ret = SHCreateDirectoryExW(hwndOwner, szBuildPath, NULL); + if (ret && ret != ERROR_ALREADY_EXISTS) + { + ERR("Failed to create directory '%s'.\n", debugstr_w(szBuildPath)); + hr = E_FAIL; + goto end; + } + + TRACE("Created missing system directory '%s'\n", debugstr_w(szBuildPath)); +end: + TRACE("returning 0x%08lx (final path is %s)\n", hr, debugstr_w(szBuildPath)); + return hr; +} + +/************************************************************************* + * SHGetFolderPathA [SHELL32.@] + */ +HRESULT WINAPI SHGetFolderPathA( + HWND hwndOwner, + int nFolder, + HANDLE hToken, + DWORD dwFlags, + LPSTR pszPath) +{ + WCHAR szTemp[MAX_PATH]; + HRESULT hr; + + TRACE("%p,%p,nFolder=0x%04x\n",hwndOwner,pszPath,nFolder); + + if (pszPath) + *pszPath = '\0'; + hr = SHGetFolderPathW(hwndOwner, nFolder, hToken, dwFlags, szTemp); + if (SUCCEEDED(hr) && pszPath) + WideCharToMultiByte(CP_ACP, 0, szTemp, -1, pszPath, MAX_PATH, NULL, + NULL); + + return hr; +} + +/* For each folder in folders, if its value has not been set in the registry, + * call _SHGetUserProfilePath or _SHGetAllUsersProfilePath (depending on the + * folder's type) to get the unexpanded value first. + * This will create the expanded value in the Shell Folders key, and + * return the unexpanded value. + * Write the unexpanded value to User Shell Folders, and query it with + * SHGetFolderPath to force the creation of the directory if it doesn't + * already exist. + */ +static HRESULT _SHRegisterFolders(HKEY hRootKey, HANDLE hToken, + LPCWSTR szUserShellFolderPath, const UINT folders[], UINT foldersLen) +{ + UINT i; + WCHAR path[MAX_PATH]; + HRESULT hr = S_OK; + HKEY hKey = NULL; + DWORD dwDisp, dwType, dwPathLen; + LONG ret; + + TRACE("%p,%p,%s,%p,%u\n", hRootKey, hToken, + debugstr_w(szUserShellFolderPath), folders, foldersLen); + + ret = RegCreateKeyExW(hRootKey, szUserShellFolderPath, 0, NULL, 0, + KEY_ALL_ACCESS, NULL, &hKey, &dwDisp); + if (ret) + hr = HRESULT_FROM_WIN32(ret); + for (i = 0; SUCCEEDED(hr) && i < foldersLen; i++) + { + dwPathLen = MAX_PATH * sizeof(WCHAR); + if (RegQueryValueExW(hKey, CSIDL_Data[folders[i]].szValueName, NULL, + &dwType, (LPBYTE)path, &dwPathLen) || (dwType != REG_SZ && + dwType != REG_EXPAND_SZ)) + { + *path = '\0'; + if (CSIDL_Data[folders[i]].type == CSIDL_Type_User) + _SHGetUserProfilePath(hToken, SHGFP_TYPE_DEFAULT, folders[i], + path); + else if (CSIDL_Data[folders[i]].type == CSIDL_Type_AllUsers) + _SHGetAllUsersProfilePath(SHGFP_TYPE_DEFAULT, folders[i], path); + else + hr = E_FAIL; + if (*path) + { + ret = RegSetValueExW(hKey, CSIDL_Data[folders[i]].szValueName, + 0, REG_EXPAND_SZ, (LPBYTE)path, + (strlenW(path) + 1) * sizeof(WCHAR)); + if (ret) + hr = HRESULT_FROM_WIN32(ret); + else + hr = SHGetFolderPathW(NULL, folders[i] | CSIDL_FLAG_CREATE, + hToken, SHGFP_TYPE_DEFAULT, NULL); + } + } + } + if (hKey) + RegCloseKey(hKey); + + TRACE("returning 0x%08lx\n", hr); + return hr; +} + +static HRESULT _SHRegisterUserShellFolders(BOOL bDefault) +{ + static const UINT folders[] = { + CSIDL_PROGRAMS, + CSIDL_PERSONAL, + CSIDL_FAVORITES, + CSIDL_STARTUP, + CSIDL_RECENT, + CSIDL_SENDTO, + CSIDL_STARTMENU, + CSIDL_DESKTOPDIRECTORY, + CSIDL_NETHOOD, + CSIDL_TEMPLATES, + CSIDL_PRINTHOOD, + CSIDL_COOKIES, + CSIDL_HISTORY, + }; + WCHAR userShellFolderPath[MAX_PATH]; + LPCWSTR pUserShellFolderPath; + HRESULT hr = S_OK; + HKEY hRootKey; + HANDLE hToken; + + TRACE("%s\n", bDefault ? "TRUE" : "FALSE"); + if (bDefault) + { + hToken = (HANDLE)-1; + hRootKey = HKEY_USERS; + strcpyW(userShellFolderPath, DefaultW); + PathAddBackslashW(userShellFolderPath); + strcatW(userShellFolderPath, szSHUserFolders); + pUserShellFolderPath = userShellFolderPath; + } + else + { + hToken = NULL; + hRootKey = HKEY_CURRENT_USER; + pUserShellFolderPath = szSHUserFolders; + } + + hr = _SHRegisterFolders(hRootKey, hToken, pUserShellFolderPath, + folders, sizeof(folders) / sizeof(folders[0])); + TRACE("returning 0x%08lx\n", hr); + return hr; +} + +static HRESULT _SHRegisterCommonShellFolders(void) +{ + static const UINT folders[] = { + CSIDL_COMMON_STARTMENU, + CSIDL_COMMON_PROGRAMS, + CSIDL_COMMON_STARTUP, + CSIDL_COMMON_DESKTOPDIRECTORY, + CSIDL_COMMON_FAVORITES, + CSIDL_COMMON_APPDATA, + CSIDL_COMMON_TEMPLATES, + CSIDL_COMMON_DOCUMENTS, + }; + HRESULT hr; + + TRACE("\n"); + hr = _SHRegisterFolders(HKEY_LOCAL_MACHINE, NULL, szSHUserFolders, + folders, sizeof(folders) / sizeof(folders[0])); + TRACE("returning 0x%08lx\n", hr); + return hr; +} + +/* Register the default values in the registry, as some apps seem to depend + * on their presence. The set registered was taken from Windows XP. + */ +HRESULT SHELL_RegisterShellFolders(void) +{ + HRESULT hr = _SHRegisterUserShellFolders(TRUE); + + if (SUCCEEDED(hr)) + hr = _SHRegisterUserShellFolders(FALSE); + if (SUCCEEDED(hr)) + hr = _SHRegisterCommonShellFolders(); + return hr; +} + +/************************************************************************* + * SHGetSpecialFolderPathA [SHELL32.@] + */ +BOOL WINAPI SHGetSpecialFolderPathA ( + HWND hwndOwner, + LPSTR szPath, + int nFolder, + BOOL bCreate) +{ + return (SHGetFolderPathA( + hwndOwner, + nFolder + (bCreate ? CSIDL_FLAG_CREATE : 0), + NULL, + 0, + szPath)) == S_OK ? TRUE : FALSE; +} + +/************************************************************************* + * SHGetSpecialFolderPathW + */ +BOOL WINAPI SHGetSpecialFolderPathW ( + HWND hwndOwner, + LPWSTR szPath, + int nFolder, + BOOL bCreate) +{ + return (SHGetFolderPathW( + hwndOwner, + nFolder + (bCreate ? CSIDL_FLAG_CREATE : 0), + NULL, + 0, + szPath)) == S_OK ? TRUE : FALSE; +} + +/************************************************************************* + * SHGetSpecialFolderPath (SHELL32.175) + */ +BOOL WINAPI SHGetSpecialFolderPathAW ( + HWND hwndOwner, + LPVOID szPath, + int nFolder, + BOOL bCreate) + +{ + if (SHELL_OsIsUnicode()) + return SHGetSpecialFolderPathW (hwndOwner, szPath, nFolder, bCreate); + return SHGetSpecialFolderPathA (hwndOwner, szPath, nFolder, bCreate); +} + +/************************************************************************* + * SHGetFolderLocation [SHELL32.@] + * + * NOTES + * Gets the folder locations from the registry and creates a pidl. + * Creates missing reg keys and directories. + * Mostly forwards to SHGetFolderPathW, but a few values of nFolder return + * virtual folders that are handled here. + * + * PARAMS + * hwndOwner [I] + * nFolder [I] CSIDL_xxxxx + * hToken [I] token representing user, or NULL for current user, or -1 for + * default user + * dwReserved [I] must be zero + * ppidl [O] PIDL of a special folder + * + * NOTES + */ +HRESULT WINAPI SHGetFolderLocation( + HWND hwndOwner, + int nFolder, + HANDLE hToken, + DWORD dwReserved, + LPITEMIDLIST *ppidl) +{ + HRESULT hr = E_INVALIDARG; + + TRACE("%p 0x%08x %p 0x%08lx %p\n", + hwndOwner, nFolder, hToken, dwReserved, ppidl); + + if (!ppidl) + return E_INVALIDARG; + if (dwReserved) + return E_INVALIDARG; + + /* The virtual folders' locations are not user-dependent */ + *ppidl = NULL; + switch (nFolder) + { + case CSIDL_DESKTOP: + *ppidl = _ILCreateDesktop(); + break; + + case CSIDL_INTERNET: + *ppidl = _ILCreateIExplore(); + break; + + case CSIDL_CONTROLS: + *ppidl = _ILCreateControlPanel(); + break; + + case CSIDL_PRINTERS: + *ppidl = _ILCreatePrinters(); + break; + + case CSIDL_FONTS: + FIXME("virtual font folder"); + break; + + case CSIDL_BITBUCKET: + *ppidl = _ILCreateBitBucket(); + break; + + case CSIDL_DRIVES: + *ppidl = _ILCreateMyComputer(); + break; + + case CSIDL_NETWORK: + *ppidl = _ILCreateNetwork(); + break; + + default: + { + WCHAR szPath[MAX_PATH]; + + hr = SHGetFolderPathW(hwndOwner, nFolder, hToken, + SHGFP_TYPE_CURRENT, szPath); + if (SUCCEEDED(hr)) + { + DWORD attributes=0; + + TRACE("Value=%s\n", debugstr_w(szPath)); + hr = SHILCreateFromPathW(szPath, ppidl, &attributes); + } + else if (hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND)) + { + /* unlike SHGetFolderPath, SHGetFolderLocation in shell32 + * version 6.0 returns E_FAIL for non-existing paths + */ + hr = E_FAIL; + } + } + } + if(*ppidl) + hr = NOERROR; + + TRACE("-- (new pidl %p)\n",*ppidl); + return hr; +} + +/************************************************************************* + * SHGetSpecialFolderLocation [SHELL32.@] + * + * NOTES + * In NT5, SHGetSpecialFolderLocation needs the /Recent + * directory. + */ +HRESULT WINAPI SHGetSpecialFolderLocation( + HWND hwndOwner, + INT nFolder, + LPITEMIDLIST * ppidl) +{ + HRESULT hr = E_INVALIDARG; + + TRACE("(%p,0x%x,%p)\n", hwndOwner,nFolder,ppidl); + + if (!ppidl) + return E_INVALIDARG; + + hr = SHGetFolderLocation(hwndOwner, nFolder, NULL, 0, ppidl); + return hr; +} diff --git a/reactos/lib/shell32/shellreg.c b/reactos/lib/shell32/shellreg.c index 5cef4274b75..700ab519d8f 100644 --- a/reactos/lib/shell32/shellreg.c +++ b/reactos/lib/shell32/shellreg.c @@ -1,153 +1,153 @@ -/* - * Shell Registry Access - * - * Copyright 2000 Juergen Schmied - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include "config.h" - -#include -#include -#include - -#include "windef.h" -#include "winbase.h" -#include "shellapi.h" -#include "wingdi.h" -#include "winuser.h" -#include "shlobj.h" -#include "winerror.h" -#include "winreg.h" -#include "winnls.h" - -#include "undocshell.h" -#include "wine/winbase16.h" - -#include "wine/debug.h" - -WINE_DEFAULT_DEBUG_CHANNEL(shell); - -/************************************************************************* - * SHRegOpenKeyA [SHELL32.506] - * - */ -HRESULT WINAPI SHRegOpenKeyA( - HKEY hKey, - LPSTR lpSubKey, - PHKEY phkResult) -{ - TRACE("(%p, %s, %p)\n", hKey, debugstr_a(lpSubKey), phkResult); - return RegOpenKeyA(hKey, lpSubKey, phkResult); -} - -/************************************************************************* - * SHRegOpenKeyW [SHELL32.507] NT 4.0 - * - */ -HRESULT WINAPI SHRegOpenKeyW ( - HKEY hkey, - LPCWSTR lpszSubKey, - PHKEY retkey) -{ - WARN("%p %s %p\n",hkey,debugstr_w(lpszSubKey),retkey); - return RegOpenKeyW( hkey, lpszSubKey, retkey ); -} - -/************************************************************************* - * SHRegQueryValueExA [SHELL32.509] - * - */ -HRESULT WINAPI SHRegQueryValueExA( - HKEY hkey, - LPSTR lpValueName, - LPDWORD lpReserved, - LPDWORD lpType, - LPBYTE lpData, - LPDWORD lpcbData) -{ - TRACE("%p %s %p %p %p %p\n", hkey, lpValueName, lpReserved, lpType, lpData, lpcbData); - return RegQueryValueExA (hkey, lpValueName, lpReserved, lpType, lpData, lpcbData); -} - -/************************************************************************* - * SHRegQueryValueW [SHELL32.510] NT4.0 - * - */ -HRESULT WINAPI SHRegQueryValueW( - HKEY hkey, - LPWSTR lpszSubKey, - LPWSTR lpszData, - LPDWORD lpcbData ) -{ - WARN("%p %s %p %p semi-stub\n", - hkey, debugstr_w(lpszSubKey), lpszData, lpcbData); - return RegQueryValueW( hkey, lpszSubKey, lpszData, lpcbData ); -} - -/************************************************************************* - * SHRegQueryValueExW [SHELL32.511] NT4.0 - * - * FIXME - * if the datatype REG_EXPAND_SZ then expand the string and change - * *pdwType to REG_SZ. - */ -HRESULT WINAPI SHRegQueryValueExW ( - HKEY hkey, - LPWSTR pszValue, - LPDWORD pdwReserved, - LPDWORD pdwType, - LPVOID pvData, - LPDWORD pcbData) -{ - DWORD ret; - WARN("%p %s %p %p %p %p semi-stub\n", - hkey, debugstr_w(pszValue), pdwReserved, pdwType, pvData, pcbData); - ret = RegQueryValueExW ( hkey, pszValue, pdwReserved, pdwType, pvData, pcbData); - return ret; -} - -/************************************************************************* - * SHRegDeleteKeyA [SHELL32.?] - */ -HRESULT WINAPI SHRegDeleteKeyA( - HKEY hkey, - LPCSTR pszSubKey) -{ - FIXME("hkey=%p, %s\n", hkey, debugstr_a(pszSubKey)); - return 0; -} - -/************************************************************************* - * SHRegDeleteKeyW [SHELL32.512] - */ -HRESULT WINAPI SHRegDeleteKeyW( - HKEY hkey, - LPCWSTR pszSubKey) -{ - FIXME("hkey=%p, %s\n", hkey, debugstr_w(pszSubKey)); - return 0; -} - -/************************************************************************* - * SHRegCloseKey [SHELL32.505] NT 4.0 - * - */ -HRESULT WINAPI SHRegCloseKey (HKEY hkey) -{ - TRACE("%p\n",hkey); - return RegCloseKey( hkey ); -} +/* + * Shell Registry Access + * + * Copyright 2000 Juergen Schmied + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" + +#include +#include +#include + +#include "windef.h" +#include "winbase.h" +#include "shellapi.h" +#include "wingdi.h" +#include "winuser.h" +#include "shlobj.h" +#include "winerror.h" +#include "winreg.h" +#include "winnls.h" + +#include "undocshell.h" +#include "wine/winbase16.h" + +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(shell); + +/************************************************************************* + * SHRegOpenKeyA [SHELL32.506] + * + */ +HRESULT WINAPI SHRegOpenKeyA( + HKEY hKey, + LPSTR lpSubKey, + PHKEY phkResult) +{ + TRACE("(%p, %s, %p)\n", hKey, debugstr_a(lpSubKey), phkResult); + return RegOpenKeyA(hKey, lpSubKey, phkResult); +} + +/************************************************************************* + * SHRegOpenKeyW [SHELL32.507] NT 4.0 + * + */ +HRESULT WINAPI SHRegOpenKeyW ( + HKEY hkey, + LPCWSTR lpszSubKey, + PHKEY retkey) +{ + WARN("%p %s %p\n",hkey,debugstr_w(lpszSubKey),retkey); + return RegOpenKeyW( hkey, lpszSubKey, retkey ); +} + +/************************************************************************* + * SHRegQueryValueExA [SHELL32.509] + * + */ +HRESULT WINAPI SHRegQueryValueExA( + HKEY hkey, + LPSTR lpValueName, + LPDWORD lpReserved, + LPDWORD lpType, + LPBYTE lpData, + LPDWORD lpcbData) +{ + TRACE("%p %s %p %p %p %p\n", hkey, lpValueName, lpReserved, lpType, lpData, lpcbData); + return RegQueryValueExA (hkey, lpValueName, lpReserved, lpType, lpData, lpcbData); +} + +/************************************************************************* + * SHRegQueryValueW [SHELL32.510] NT4.0 + * + */ +HRESULT WINAPI SHRegQueryValueW( + HKEY hkey, + LPWSTR lpszSubKey, + LPWSTR lpszData, + LPDWORD lpcbData ) +{ + WARN("%p %s %p %p semi-stub\n", + hkey, debugstr_w(lpszSubKey), lpszData, lpcbData); + return RegQueryValueW( hkey, lpszSubKey, lpszData, lpcbData ); +} + +/************************************************************************* + * SHRegQueryValueExW [SHELL32.511] NT4.0 + * + * FIXME + * if the datatype REG_EXPAND_SZ then expand the string and change + * *pdwType to REG_SZ. + */ +HRESULT WINAPI SHRegQueryValueExW ( + HKEY hkey, + LPWSTR pszValue, + LPDWORD pdwReserved, + LPDWORD pdwType, + LPVOID pvData, + LPDWORD pcbData) +{ + DWORD ret; + WARN("%p %s %p %p %p %p semi-stub\n", + hkey, debugstr_w(pszValue), pdwReserved, pdwType, pvData, pcbData); + ret = RegQueryValueExW ( hkey, pszValue, pdwReserved, pdwType, pvData, pcbData); + return ret; +} + +/************************************************************************* + * SHRegDeleteKeyA [SHELL32.?] + */ +HRESULT WINAPI SHRegDeleteKeyA( + HKEY hkey, + LPCSTR pszSubKey) +{ + FIXME("hkey=%p, %s\n", hkey, debugstr_a(pszSubKey)); + return 0; +} + +/************************************************************************* + * SHRegDeleteKeyW [SHELL32.512] + */ +HRESULT WINAPI SHRegDeleteKeyW( + HKEY hkey, + LPCWSTR pszSubKey) +{ + FIXME("hkey=%p, %s\n", hkey, debugstr_w(pszSubKey)); + return 0; +} + +/************************************************************************* + * SHRegCloseKey [SHELL32.505] NT 4.0 + * + */ +HRESULT WINAPI SHRegCloseKey (HKEY hkey) +{ + TRACE("%p\n",hkey); + return RegCloseKey( hkey ); +} diff --git a/reactos/lib/shell32/shellstring.c b/reactos/lib/shell32/shellstring.c index abb25c32f5c..3581768d72d 100644 --- a/reactos/lib/shell32/shellstring.c +++ b/reactos/lib/shell32/shellstring.c @@ -1,286 +1,286 @@ -/* - * Copyright 2000 Juergen Schmied - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include -#include -#include -#include -#include - -#define NONAMELESSUNION -#define NONAMELESSSTRUCT -#include "windef.h" -#include "winbase.h" -#include "winnls.h" -#include "winerror.h" -#include "wingdi.h" -#include "winuser.h" -#include "winreg.h" - -#include "shlobj.h" -#include "shellapi.h" -#include "shlwapi.h" -#include "shell32_main.h" -#include "undocshell.h" -#include "wine/unicode.h" -#include "wine/debug.h" - -WINE_DEFAULT_DEBUG_CHANNEL(shell); - -/************************* STRRET functions ****************************/ - -BOOL WINAPI StrRetToStrNA(LPSTR dest, DWORD len, LPSTRRET src, const ITEMIDLIST *pidl) -{ - TRACE("dest=%p len=0x%lx strret=%p(%s) pidl=%p\n", - dest,len,src, - (src->uType == STRRET_WSTR) ? "STRRET_WSTR" : - (src->uType == STRRET_CSTR) ? "STRRET_CSTR" : - (src->uType == STRRET_OFFSET) ? "STRRET_OFFSET" : "STRRET_???", - pidl); - - if (!dest) - return FALSE; - - switch (src->uType) - { - case STRRET_WSTR: - WideCharToMultiByte(CP_ACP, 0, src->u.pOleStr, -1, dest, len, NULL, NULL); - CoTaskMemFree(src->u.pOleStr); - break; - - case STRRET_CSTR: - lstrcpynA(dest, src->u.cStr, len); - break; - - case STRRET_OFFSET: - lstrcpynA(dest, ((LPCSTR)&pidl->mkid)+src->u.uOffset, len); - break; - - default: - FIXME("unknown type!\n"); - if (len) *dest = '\0'; - return FALSE; - } - TRACE("-- %s\n", debugstr_a(dest) ); - return TRUE; -} - -/************************************************************************/ - -BOOL WINAPI StrRetToStrNW(LPWSTR dest, DWORD len, LPSTRRET src, const ITEMIDLIST *pidl) -{ - TRACE("dest=%p len=0x%lx strret=%p(%s) pidl=%p\n", - dest,len,src, - (src->uType == STRRET_WSTR) ? "STRRET_WSTR" : - (src->uType == STRRET_CSTR) ? "STRRET_CSTR" : - (src->uType == STRRET_OFFSET) ? "STRRET_OFFSET" : "STRRET_???", - pidl); - - if (!dest) - return FALSE; - - switch (src->uType) - { - case STRRET_WSTR: - lstrcpynW(dest, src->u.pOleStr, len); - CoTaskMemFree(src->u.pOleStr); - break; - - case STRRET_CSTR: - if (!MultiByteToWideChar( CP_ACP, 0, src->u.cStr, -1, dest, len ) && len) - dest[len-1] = 0; - break; - - case STRRET_OFFSET: - if (!MultiByteToWideChar( CP_ACP, 0, ((LPCSTR)&pidl->mkid)+src->u.uOffset, -1, dest, len ) && len) - dest[len-1] = 0; - break; - - default: - FIXME("unknown type!\n"); - if (len) *dest = '\0'; - return FALSE; - } - return TRUE; -} - - -/************************************************************************* - * StrRetToStrN [SHELL32.96] - * - * converts a STRRET to a normal string - * - * NOTES - * the pidl is for STRRET OFFSET - */ -BOOL WINAPI StrRetToStrNAW(LPVOID dest, DWORD len, LPSTRRET src, const ITEMIDLIST *pidl) -{ - if(SHELL_OsIsUnicode()) - return StrRetToStrNW(dest, len, src, pidl); - else - return StrRetToStrNA(dest, len, src, pidl); -} - -/************************* OLESTR functions ****************************/ - -/************************************************************************ - * StrToOleStr [SHELL32.163] - * - */ -int WINAPI StrToOleStrA (LPWSTR lpWideCharStr, LPCSTR lpMultiByteString) -{ - TRACE("(%p, %p %s)\n", - lpWideCharStr, lpMultiByteString, debugstr_a(lpMultiByteString)); - - return MultiByteToWideChar(0, 0, lpMultiByteString, -1, lpWideCharStr, MAX_PATH); - -} -int WINAPI StrToOleStrW (LPWSTR lpWideCharStr, LPCWSTR lpWString) -{ - TRACE("(%p, %p %s)\n", - lpWideCharStr, lpWString, debugstr_w(lpWString)); - - strcpyW (lpWideCharStr, lpWString ); - return strlenW(lpWideCharStr); -} - -BOOL WINAPI StrToOleStrAW (LPWSTR lpWideCharStr, LPCVOID lpString) -{ - if (SHELL_OsIsUnicode()) - return StrToOleStrW (lpWideCharStr, lpString); - return StrToOleStrA (lpWideCharStr, lpString); -} - -/************************************************************************* - * StrToOleStrN [SHELL32.79] - * lpMulti, nMulti, nWide [IN] - * lpWide [OUT] - */ -BOOL WINAPI StrToOleStrNA (LPWSTR lpWide, INT nWide, LPCSTR lpStrA, INT nStr) -{ - TRACE("(%p, %x, %s, %x)\n", lpWide, nWide, debugstr_an(lpStrA,nStr), nStr); - return MultiByteToWideChar (0, 0, lpStrA, nStr, lpWide, nWide); -} -BOOL WINAPI StrToOleStrNW (LPWSTR lpWide, INT nWide, LPCWSTR lpStrW, INT nStr) -{ - TRACE("(%p, %x, %s, %x)\n", lpWide, nWide, debugstr_wn(lpStrW, nStr), nStr); - - if (lstrcpynW (lpWide, lpStrW, nWide)) - { return lstrlenW (lpWide); - } - return 0; -} - -BOOL WINAPI StrToOleStrNAW (LPWSTR lpWide, INT nWide, LPCVOID lpStr, INT nStr) -{ - if (SHELL_OsIsUnicode()) - return StrToOleStrNW (lpWide, nWide, lpStr, nStr); - return StrToOleStrNA (lpWide, nWide, lpStr, nStr); -} - -/************************************************************************* - * OleStrToStrN [SHELL32.78] - */ -BOOL WINAPI OleStrToStrNA (LPSTR lpStr, INT nStr, LPCWSTR lpOle, INT nOle) -{ - TRACE("(%p, %x, %s, %x)\n", lpStr, nStr, debugstr_wn(lpOle,nOle), nOle); - return WideCharToMultiByte (0, 0, lpOle, nOle, lpStr, nStr, NULL, NULL); -} - -BOOL WINAPI OleStrToStrNW (LPWSTR lpwStr, INT nwStr, LPCWSTR lpOle, INT nOle) -{ - TRACE("(%p, %x, %s, %x)\n", lpwStr, nwStr, debugstr_wn(lpOle,nOle), nOle); - - if (lstrcpynW ( lpwStr, lpOle, nwStr)) - { return lstrlenW (lpwStr); - } - return 0; -} - -BOOL WINAPI OleStrToStrNAW (LPVOID lpOut, INT nOut, LPCVOID lpIn, INT nIn) -{ - if (SHELL_OsIsUnicode()) - return OleStrToStrNW (lpOut, nOut, lpIn, nIn); - return OleStrToStrNA (lpOut, nOut, lpIn, nIn); -} - - -/************************************************************************* - * CheckEscapesA [SHELL32.@] - * - * Checks a string for special characters which are not allowed in a path - * and encloses it in quotes if that is the case. - * - * PARAMS - * string [I/O] string to check and on return eventually quoted - * len [I] length of string - * - * RETURNS - * length of actual string - * - * NOTES - * Not really sure if this function returns actually a value at all. - */ -DWORD WINAPI CheckEscapesA( - LPSTR string, /* [I/O] string to check ??*/ - DWORD len) /* [I] is 0 */ -{ - LPWSTR wString; - DWORD ret = 0; - - TRACE("(%s %ld)\n", debugstr_a(string), len); - wString = (LPWSTR)LocalAlloc(LPTR, len * sizeof(WCHAR)); - if (wString) - { - MultiByteToWideChar(CP_ACP, 0, string, len, wString, len); - ret = CheckEscapesW(wString, len); - WideCharToMultiByte(CP_ACP, 0, wString, len, string, len, NULL, NULL); - LocalFree(wString); - } - return ret; -} - -static const WCHAR strEscapedChars[] = {' ','"',',',';','^',0}; - -/************************************************************************* - * CheckEscapesW [SHELL32.@] - * - * see CheckEscapesA - */ -DWORD WINAPI CheckEscapesW( - LPWSTR string, - DWORD len) -{ - DWORD size = lstrlenW(string); - LPWSTR s, d; - - TRACE("(%s %ld) stub\n", debugstr_w(string), len); - - if (StrPBrkW(string, strEscapedChars) && size + 2 <= len) - { - s = &string[size - 1]; - d = &string[size + 2]; - *d-- = 0; - *d-- = '"'; - for (;d > string;) - *d-- = *s--; - *d = '"'; - return size + 2; - } - return size; -} +/* + * Copyright 2000 Juergen Schmied + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include +#include +#include +#include +#include + +#define NONAMELESSUNION +#define NONAMELESSSTRUCT +#include "windef.h" +#include "winbase.h" +#include "winnls.h" +#include "winerror.h" +#include "wingdi.h" +#include "winuser.h" +#include "winreg.h" + +#include "shlobj.h" +#include "shellapi.h" +#include "shlwapi.h" +#include "shell32_main.h" +#include "undocshell.h" +#include "wine/unicode.h" +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(shell); + +/************************* STRRET functions ****************************/ + +BOOL WINAPI StrRetToStrNA(LPSTR dest, DWORD len, LPSTRRET src, const ITEMIDLIST *pidl) +{ + TRACE("dest=%p len=0x%lx strret=%p(%s) pidl=%p\n", + dest,len,src, + (src->uType == STRRET_WSTR) ? "STRRET_WSTR" : + (src->uType == STRRET_CSTR) ? "STRRET_CSTR" : + (src->uType == STRRET_OFFSET) ? "STRRET_OFFSET" : "STRRET_???", + pidl); + + if (!dest) + return FALSE; + + switch (src->uType) + { + case STRRET_WSTR: + WideCharToMultiByte(CP_ACP, 0, src->u.pOleStr, -1, dest, len, NULL, NULL); + CoTaskMemFree(src->u.pOleStr); + break; + + case STRRET_CSTR: + lstrcpynA(dest, src->u.cStr, len); + break; + + case STRRET_OFFSET: + lstrcpynA(dest, ((LPCSTR)&pidl->mkid)+src->u.uOffset, len); + break; + + default: + FIXME("unknown type!\n"); + if (len) *dest = '\0'; + return FALSE; + } + TRACE("-- %s\n", debugstr_a(dest) ); + return TRUE; +} + +/************************************************************************/ + +BOOL WINAPI StrRetToStrNW(LPWSTR dest, DWORD len, LPSTRRET src, const ITEMIDLIST *pidl) +{ + TRACE("dest=%p len=0x%lx strret=%p(%s) pidl=%p\n", + dest,len,src, + (src->uType == STRRET_WSTR) ? "STRRET_WSTR" : + (src->uType == STRRET_CSTR) ? "STRRET_CSTR" : + (src->uType == STRRET_OFFSET) ? "STRRET_OFFSET" : "STRRET_???", + pidl); + + if (!dest) + return FALSE; + + switch (src->uType) + { + case STRRET_WSTR: + lstrcpynW(dest, src->u.pOleStr, len); + CoTaskMemFree(src->u.pOleStr); + break; + + case STRRET_CSTR: + if (!MultiByteToWideChar( CP_ACP, 0, src->u.cStr, -1, dest, len ) && len) + dest[len-1] = 0; + break; + + case STRRET_OFFSET: + if (!MultiByteToWideChar( CP_ACP, 0, ((LPCSTR)&pidl->mkid)+src->u.uOffset, -1, dest, len ) && len) + dest[len-1] = 0; + break; + + default: + FIXME("unknown type!\n"); + if (len) *dest = '\0'; + return FALSE; + } + return TRUE; +} + + +/************************************************************************* + * StrRetToStrN [SHELL32.96] + * + * converts a STRRET to a normal string + * + * NOTES + * the pidl is for STRRET OFFSET + */ +BOOL WINAPI StrRetToStrNAW(LPVOID dest, DWORD len, LPSTRRET src, const ITEMIDLIST *pidl) +{ + if(SHELL_OsIsUnicode()) + return StrRetToStrNW(dest, len, src, pidl); + else + return StrRetToStrNA(dest, len, src, pidl); +} + +/************************* OLESTR functions ****************************/ + +/************************************************************************ + * StrToOleStr [SHELL32.163] + * + */ +int WINAPI StrToOleStrA (LPWSTR lpWideCharStr, LPCSTR lpMultiByteString) +{ + TRACE("(%p, %p %s)\n", + lpWideCharStr, lpMultiByteString, debugstr_a(lpMultiByteString)); + + return MultiByteToWideChar(0, 0, lpMultiByteString, -1, lpWideCharStr, MAX_PATH); + +} +int WINAPI StrToOleStrW (LPWSTR lpWideCharStr, LPCWSTR lpWString) +{ + TRACE("(%p, %p %s)\n", + lpWideCharStr, lpWString, debugstr_w(lpWString)); + + strcpyW (lpWideCharStr, lpWString ); + return strlenW(lpWideCharStr); +} + +BOOL WINAPI StrToOleStrAW (LPWSTR lpWideCharStr, LPCVOID lpString) +{ + if (SHELL_OsIsUnicode()) + return StrToOleStrW (lpWideCharStr, lpString); + return StrToOleStrA (lpWideCharStr, lpString); +} + +/************************************************************************* + * StrToOleStrN [SHELL32.79] + * lpMulti, nMulti, nWide [IN] + * lpWide [OUT] + */ +BOOL WINAPI StrToOleStrNA (LPWSTR lpWide, INT nWide, LPCSTR lpStrA, INT nStr) +{ + TRACE("(%p, %x, %s, %x)\n", lpWide, nWide, debugstr_an(lpStrA,nStr), nStr); + return MultiByteToWideChar (0, 0, lpStrA, nStr, lpWide, nWide); +} +BOOL WINAPI StrToOleStrNW (LPWSTR lpWide, INT nWide, LPCWSTR lpStrW, INT nStr) +{ + TRACE("(%p, %x, %s, %x)\n", lpWide, nWide, debugstr_wn(lpStrW, nStr), nStr); + + if (lstrcpynW (lpWide, lpStrW, nWide)) + { return lstrlenW (lpWide); + } + return 0; +} + +BOOL WINAPI StrToOleStrNAW (LPWSTR lpWide, INT nWide, LPCVOID lpStr, INT nStr) +{ + if (SHELL_OsIsUnicode()) + return StrToOleStrNW (lpWide, nWide, lpStr, nStr); + return StrToOleStrNA (lpWide, nWide, lpStr, nStr); +} + +/************************************************************************* + * OleStrToStrN [SHELL32.78] + */ +BOOL WINAPI OleStrToStrNA (LPSTR lpStr, INT nStr, LPCWSTR lpOle, INT nOle) +{ + TRACE("(%p, %x, %s, %x)\n", lpStr, nStr, debugstr_wn(lpOle,nOle), nOle); + return WideCharToMultiByte (0, 0, lpOle, nOle, lpStr, nStr, NULL, NULL); +} + +BOOL WINAPI OleStrToStrNW (LPWSTR lpwStr, INT nwStr, LPCWSTR lpOle, INT nOle) +{ + TRACE("(%p, %x, %s, %x)\n", lpwStr, nwStr, debugstr_wn(lpOle,nOle), nOle); + + if (lstrcpynW ( lpwStr, lpOle, nwStr)) + { return lstrlenW (lpwStr); + } + return 0; +} + +BOOL WINAPI OleStrToStrNAW (LPVOID lpOut, INT nOut, LPCVOID lpIn, INT nIn) +{ + if (SHELL_OsIsUnicode()) + return OleStrToStrNW (lpOut, nOut, lpIn, nIn); + return OleStrToStrNA (lpOut, nOut, lpIn, nIn); +} + + +/************************************************************************* + * CheckEscapesA [SHELL32.@] + * + * Checks a string for special characters which are not allowed in a path + * and encloses it in quotes if that is the case. + * + * PARAMS + * string [I/O] string to check and on return eventually quoted + * len [I] length of string + * + * RETURNS + * length of actual string + * + * NOTES + * Not really sure if this function returns actually a value at all. + */ +DWORD WINAPI CheckEscapesA( + LPSTR string, /* [I/O] string to check ??*/ + DWORD len) /* [I] is 0 */ +{ + LPWSTR wString; + DWORD ret = 0; + + TRACE("(%s %ld)\n", debugstr_a(string), len); + wString = (LPWSTR)LocalAlloc(LPTR, len * sizeof(WCHAR)); + if (wString) + { + MultiByteToWideChar(CP_ACP, 0, string, len, wString, len); + ret = CheckEscapesW(wString, len); + WideCharToMultiByte(CP_ACP, 0, wString, len, string, len, NULL, NULL); + LocalFree(wString); + } + return ret; +} + +static const WCHAR strEscapedChars[] = {' ','"',',',';','^',0}; + +/************************************************************************* + * CheckEscapesW [SHELL32.@] + * + * see CheckEscapesA + */ +DWORD WINAPI CheckEscapesW( + LPWSTR string, + DWORD len) +{ + DWORD size = lstrlenW(string); + LPWSTR s, d; + + TRACE("(%s %ld) stub\n", debugstr_w(string), len); + + if (StrPBrkW(string, strEscapedChars) && size + 2 <= len) + { + s = &string[size - 1]; + d = &string[size + 2]; + *d-- = 0; + *d-- = '"'; + for (;d > string;) + *d-- = *s--; + *d = '"'; + return size + 2; + } + return size; +} diff --git a/reactos/lib/shell32/shfldr.h b/reactos/lib/shell32/shfldr.h index f78026da8f9..5666f0d7cc3 100644 --- a/reactos/lib/shell32/shfldr.h +++ b/reactos/lib/shell32/shfldr.h @@ -1,58 +1,58 @@ - -/* - * Virtual Folder - * common definitions - * - * Copyright 1997 Marcus Meissner - * Copyright 1998, 1999, 2002 Juergen Schmied - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#define CHARS_IN_GUID 39 - -typedef struct { - int colnameid; - int pcsFlags; - int fmt; - int cxChar; -} shvheader; - -#define GET_SHGDN_FOR(dwFlags) ((DWORD)dwFlags & (DWORD)0x0000FF00) -#define GET_SHGDN_RELATION(dwFlags) ((DWORD)dwFlags & (DWORD)0x000000FF) - -BOOL SHELL32_GetCustomFolderAttribute (LPCITEMIDLIST pidl, LPCWSTR pwszHeading, LPCWSTR pwszAttribute, LPWSTR pwszValue, DWORD cchValue); - -LPCWSTR GetNextElementW (LPCWSTR pszNext, LPWSTR pszOut, DWORD dwOut); -HRESULT SHELL32_ParseNextElement (IShellFolder2 * psf, HWND hwndOwner, LPBC pbc, LPITEMIDLIST * pidlInOut, - LPOLESTR szNext, DWORD * pEaten, DWORD * pdwAttributes); -HRESULT SHELL32_GetItemAttributes (IShellFolder * psf, LPCITEMIDLIST pidl, LPDWORD pdwAttributes); -HRESULT SHELL32_GetDisplayNameOfChild (IShellFolder2 * psf, LPCITEMIDLIST pidl, DWORD dwFlags, LPSTR szOut, - DWORD dwOutLen); - -HRESULT SHELL32_BindToChild (LPCITEMIDLIST pidlRoot, - LPCSTR pathRoot, LPCITEMIDLIST pidlComplete, REFIID riid, LPVOID * ppvOut); - -HRESULT SHELL32_CompareIDs (IShellFolder * iface, LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2); - -static inline int SHELL32_GUIDToStringA (REFGUID guid, LPSTR str) -{ - return sprintf(str, "{%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}", - guid->Data1, guid->Data2, guid->Data3, - guid->Data4[0], guid->Data4[1], guid->Data4[2], guid->Data4[3], - guid->Data4[4], guid->Data4[5], guid->Data4[6], guid->Data4[7]); -} - -void SHELL_FS_ProcessDisplayFilename(LPSTR szPath, DWORD dwFlags); + +/* + * Virtual Folder + * common definitions + * + * Copyright 1997 Marcus Meissner + * Copyright 1998, 1999, 2002 Juergen Schmied + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#define CHARS_IN_GUID 39 + +typedef struct { + int colnameid; + int pcsFlags; + int fmt; + int cxChar; +} shvheader; + +#define GET_SHGDN_FOR(dwFlags) ((DWORD)dwFlags & (DWORD)0x0000FF00) +#define GET_SHGDN_RELATION(dwFlags) ((DWORD)dwFlags & (DWORD)0x000000FF) + +BOOL SHELL32_GetCustomFolderAttribute (LPCITEMIDLIST pidl, LPCWSTR pwszHeading, LPCWSTR pwszAttribute, LPWSTR pwszValue, DWORD cchValue); + +LPCWSTR GetNextElementW (LPCWSTR pszNext, LPWSTR pszOut, DWORD dwOut); +HRESULT SHELL32_ParseNextElement (IShellFolder2 * psf, HWND hwndOwner, LPBC pbc, LPITEMIDLIST * pidlInOut, + LPOLESTR szNext, DWORD * pEaten, DWORD * pdwAttributes); +HRESULT SHELL32_GetItemAttributes (IShellFolder * psf, LPCITEMIDLIST pidl, LPDWORD pdwAttributes); +HRESULT SHELL32_GetDisplayNameOfChild (IShellFolder2 * psf, LPCITEMIDLIST pidl, DWORD dwFlags, LPSTR szOut, + DWORD dwOutLen); + +HRESULT SHELL32_BindToChild (LPCITEMIDLIST pidlRoot, + LPCSTR pathRoot, LPCITEMIDLIST pidlComplete, REFIID riid, LPVOID * ppvOut); + +HRESULT SHELL32_CompareIDs (IShellFolder * iface, LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2); + +static inline int SHELL32_GUIDToStringA (REFGUID guid, LPSTR str) +{ + return sprintf(str, "{%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}", + guid->Data1, guid->Data2, guid->Data3, + guid->Data4[0], guid->Data4[1], guid->Data4[2], guid->Data4[3], + guid->Data4[4], guid->Data4[5], guid->Data4[6], guid->Data4[7]); +} + +void SHELL_FS_ProcessDisplayFilename(LPSTR szPath, DWORD dwFlags); diff --git a/reactos/lib/shell32/shfldr_desktop.c b/reactos/lib/shell32/shfldr_desktop.c index 57180471467..66b4e8c5d16 100644 --- a/reactos/lib/shell32/shfldr_desktop.c +++ b/reactos/lib/shell32/shfldr_desktop.c @@ -1,739 +1,739 @@ - -/* - * Virtual Desktop Folder - * - * Copyright 1997 Marcus Meissner - * Copyright 1998, 1999, 2002 Juergen Schmied - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include "config.h" -#include "wine/port.h" - -#include -#include -#include -#include - -#define COBJMACROS -#define NONAMELESSUNION -#define NONAMELESSSTRUCT - -#include "winerror.h" -#include "windef.h" -#include "winbase.h" -#include "winreg.h" -#include "wingdi.h" -#include "winuser.h" - -#include "ole2.h" -#include "shlguid.h" - -#include "enumidlist.h" -#include "pidl.h" -#include "undocshell.h" -#include "shell32_main.h" -#include "shresdef.h" -#include "shlwapi.h" -#include "shellfolder.h" -#include "wine/debug.h" -#include "debughlp.h" -#include "shfldr.h" - -WINE_DEFAULT_DEBUG_CHANNEL (shell); - -/*********************************************************************** -* Desktopfolder implementation -*/ - -typedef struct { - IShellFolder2Vtbl *lpVtbl; - DWORD ref; - - CLSID *pclsid; - - /* both paths are parsible from the desktop */ - LPSTR sPathTarget; /* complete path to target used for enumeration and ChangeNotify */ - LPITEMIDLIST pidlRoot; /* absolute pidl */ - - int dwAttributes; /* attributes returned by GetAttributesOf FIXME: use it */ - - UINT cfShellIDList; /* clipboardformat for IDropTarget */ - BOOL fAcceptFmt; /* flag for pending Drop */ -} IGenericSFImpl; - -#define _IUnknown_(This) (IShellFolder*)&(This->lpVtbl) -#define _IShellFolder_(This) (IShellFolder*)&(This->lpVtbl) - -static struct IShellFolder2Vtbl vt_MCFldr_ShellFolder2; - -static shvheader DesktopSFHeader[] = { - {IDS_SHV_COLUMN1, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 15}, - {IDS_SHV_COLUMN2, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10}, - {IDS_SHV_COLUMN3, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10}, - {IDS_SHV_COLUMN4, SHCOLSTATE_TYPE_DATE | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 12}, - {IDS_SHV_COLUMN5, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 5} -}; - -#define DESKTOPSHELLVIEWCOLUMNS 5 - -/************************************************************************** -* ISF_Desktop_Constructor -*/ -HRESULT WINAPI ISF_Desktop_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv) -{ - IGenericSFImpl *sf; - char szMyPath[MAX_PATH]; - - TRACE ("unkOut=%p %s\n", pUnkOuter, shdebugstr_guid (riid)); - - if (!ppv) - return E_POINTER; - if (pUnkOuter) - return CLASS_E_NOAGGREGATION; - - if (!SHGetSpecialFolderPathA (0, szMyPath, CSIDL_DESKTOPDIRECTORY, TRUE)) - return E_UNEXPECTED; - - sf = (IGenericSFImpl *) LocalAlloc (GMEM_ZEROINIT, sizeof (IGenericSFImpl)); - if (!sf) - return E_OUTOFMEMORY; - - sf->ref = 0; - sf->lpVtbl = &vt_MCFldr_ShellFolder2; - sf->pidlRoot = _ILCreateDesktop (); /* my qualified pidl */ - sf->sPathTarget = SHAlloc (strlen (szMyPath) + 1); - lstrcpyA (sf->sPathTarget, szMyPath); - - if (!SUCCEEDED (IUnknown_QueryInterface (_IUnknown_ (sf), riid, ppv))) { - IUnknown_Release (_IUnknown_ (sf)); - return E_NOINTERFACE; - } - - TRACE ("--(%p)\n", sf); - return S_OK; -} - -/************************************************************************** - * ISF_Desktop_fnQueryInterface - * - * NOTES supports not IPersist/IPersistFolder - */ -static HRESULT WINAPI ISF_Desktop_fnQueryInterface (IShellFolder2 * iface, REFIID riid, LPVOID * ppvObj) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - TRACE ("(%p)->(%s,%p)\n", This, shdebugstr_guid (riid), ppvObj); - - *ppvObj = NULL; - - if (IsEqualIID (riid, &IID_IUnknown) || IsEqualIID (riid, &IID_IShellFolder) - || IsEqualIID (riid, &IID_IShellFolder2)) { - *ppvObj = This; - } - - if (*ppvObj) { - IUnknown_AddRef ((IUnknown *) (*ppvObj)); - TRACE ("-- Interface: (%p)->(%p)\n", ppvObj, *ppvObj); - return S_OK; - } - TRACE ("-- Interface: E_NOINTERFACE\n"); - return E_NOINTERFACE; -} - -static ULONG WINAPI ISF_Desktop_fnAddRef (IShellFolder2 * iface) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - TRACE ("(%p)->(count=%lu)\n", This, This->ref); - - return ++(This->ref); -} - -static ULONG WINAPI ISF_Desktop_fnRelease (IShellFolder2 * iface) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - TRACE ("(%p)->(count=%lu)\n", This, This->ref); - - if (!--(This->ref)) { - TRACE ("-- destroying IShellFolder(%p)\n", This); - if (This->pidlRoot) - SHFree (This->pidlRoot); - if (This->sPathTarget) - SHFree (This->sPathTarget); - LocalFree ((HLOCAL) This); - return 0; - } - return This->ref; -} - -/************************************************************************** -* ISF_Desktop_fnParseDisplayName -* -* NOTES -* "::{20D04FE0-3AEA-1069-A2D8-08002B30309D}" and "" binds -* to MyComputer -*/ -static HRESULT WINAPI ISF_Desktop_fnParseDisplayName (IShellFolder2 * iface, - HWND hwndOwner, - LPBC pbc, - LPOLESTR lpszDisplayName, - DWORD * pchEaten, LPITEMIDLIST * ppidl, DWORD * pdwAttributes) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - WCHAR szElement[MAX_PATH]; - LPCWSTR szNext = NULL; - LPITEMIDLIST pidlTemp = NULL; - HRESULT hr = S_OK; - char szPath[MAX_PATH]; - DWORD len; - CLSID clsid; - - TRACE ("(%p)->(HWND=%p,%p,%p=%s,%p,pidl=%p,%p)\n", - This, hwndOwner, pbc, lpszDisplayName, debugstr_w (lpszDisplayName), pchEaten, ppidl, pdwAttributes); - - if (!lpszDisplayName || !ppidl) - return E_INVALIDARG; - - *ppidl = 0; - - if (pchEaten) - *pchEaten = 0; /* strange but like the original */ - - if (lpszDisplayName[0] == ':' && lpszDisplayName[1] == ':') { - szNext = GetNextElementW (lpszDisplayName, szElement, MAX_PATH); - TRACE ("-- element: %s\n", debugstr_w (szElement)); - SHCLSIDFromStringW (szElement + 2, &clsid); - pidlTemp = _ILCreateGuid (PT_GUID, &clsid); - } else if (PathGetDriveNumberW (lpszDisplayName) >= 0) { - /* it's a filesystem path with a drive. Let MyComputer parse it */ - pidlTemp = _ILCreateMyComputer (); - szNext = lpszDisplayName; - } else if (PathIsUNCW(lpszDisplayName)) { - pidlTemp = _ILCreateNetwork(); - szNext = lpszDisplayName; - } else { - /* it's a filesystem path on the desktop. Let a FSFolder parse it */ - - if (*lpszDisplayName) { - /* build a complete path to create a simple pidl */ - lstrcpyA(szPath, This->sPathTarget); - PathAddBackslashA(szPath); - len = lstrlenA(szPath); - WideCharToMultiByte(CP_ACP, 0, lpszDisplayName, -1, szPath + len, MAX_PATH - len, NULL, NULL); - hr = _ILCreateFromPathA(szPath, &pidlTemp); - } else { - pidlTemp = _ILCreateMyComputer(); - } - - szNext = NULL; - } - - if (SUCCEEDED(hr) && pidlTemp) { - if (szNext && *szNext) { - hr = SHELL32_ParseNextElement (iface, hwndOwner, pbc, &pidlTemp, (LPOLESTR) szNext, pchEaten, pdwAttributes); - } else { - if (pdwAttributes && *pdwAttributes) { - hr = SHELL32_GetItemAttributes (_IShellFolder_ (This), pidlTemp, pdwAttributes); - } - } - } - - *ppidl = pidlTemp; - - TRACE ("(%p)->(-- ret=0x%08lx)\n", This, hr); - - return hr; -} - -/************************************************************************** - * CreateDesktopEnumList() - */ -static BOOL CreateDesktopEnumList(IEnumIDList *list, DWORD dwFlags) -{ - BOOL ret = TRUE; - char szPath[MAX_PATH]; - - TRACE("(%p)->(flags=0x%08lx) \n",list,dwFlags); - - /*enumerate the root folders */ - if(dwFlags & SHCONTF_FOLDERS) - { - HKEY hkey; - - /*create the pidl for This item */ - ret = AddToEnumList(list, _ILCreateMyComputer()); - - if (ret && !RegOpenKeyExA(HKEY_LOCAL_MACHINE, - "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\explorer\\desktop\\NameSpace", - 0, KEY_READ, &hkey)) - { - char iid[50]; - int i=0; - BOOL moreKeys = TRUE; - - while (ret && moreKeys) - { - DWORD size = sizeof (iid); - LONG apiRet = RegEnumKeyExA(hkey, i, iid, &size, 0, NULL, NULL, - NULL); - - if (ERROR_SUCCESS == apiRet) - { - ret = AddToEnumList(list, _ILCreateGuidFromStrA(iid)); - i++; - } - else if (ERROR_NO_MORE_ITEMS == apiRet) - moreKeys = FALSE; - else - ret = FALSE; - } - RegCloseKey(hkey); - } - } - - /*enumerate the elements in %windir%\desktop */ - SHGetSpecialFolderPathA(0, szPath, CSIDL_DESKTOPDIRECTORY, FALSE); - ret = ret && CreateFolderEnumList(list, szPath, dwFlags); - - return ret; -} - -/************************************************************************** -* ISF_Desktop_fnEnumObjects -*/ -static HRESULT WINAPI ISF_Desktop_fnEnumObjects (IShellFolder2 * iface, - HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST * ppEnumIDList) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - TRACE ("(%p)->(HWND=%p flags=0x%08lx pplist=%p)\n", This, hwndOwner, dwFlags, ppEnumIDList); - - *ppEnumIDList = IEnumIDList_Constructor(); - if (*ppEnumIDList) - CreateDesktopEnumList(*ppEnumIDList, dwFlags); - - TRACE ("-- (%p)->(new ID List: %p)\n", This, *ppEnumIDList); - - return *ppEnumIDList ? S_OK : E_OUTOFMEMORY; -} - -/************************************************************************** -* ISF_Desktop_fnBindToObject -*/ -static HRESULT WINAPI ISF_Desktop_fnBindToObject (IShellFolder2 * iface, - LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID * ppvOut) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - TRACE ("(%p)->(pidl=%p,%p,%s,%p)\n", This, pidl, pbcReserved, shdebugstr_guid (riid), ppvOut); - - return SHELL32_BindToChild (This->pidlRoot, This->sPathTarget, pidl, riid, ppvOut); -} - -/************************************************************************** -* ISF_Desktop_fnBindToStorage -*/ -static HRESULT WINAPI ISF_Desktop_fnBindToStorage (IShellFolder2 * iface, - LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID * ppvOut) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - FIXME ("(%p)->(pidl=%p,%p,%s,%p) stub\n", This, pidl, pbcReserved, shdebugstr_guid (riid), ppvOut); - - *ppvOut = NULL; - return E_NOTIMPL; -} - -/************************************************************************** -* ISF_Desktop_fnCompareIDs -*/ - -static HRESULT WINAPI ISF_Desktop_fnCompareIDs (IShellFolder2 * iface, - LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - int nReturn; - - TRACE ("(%p)->(0x%08lx,pidl1=%p,pidl2=%p)\n", This, lParam, pidl1, pidl2); - nReturn = SHELL32_CompareIDs (_IShellFolder_ (This), lParam, pidl1, pidl2); - TRACE ("-- %i\n", nReturn); - return nReturn; -} - -/************************************************************************** -* ISF_Desktop_fnCreateViewObject -*/ -static HRESULT WINAPI ISF_Desktop_fnCreateViewObject (IShellFolder2 * iface, - HWND hwndOwner, REFIID riid, LPVOID * ppvOut) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - LPSHELLVIEW pShellView; - HRESULT hr = E_INVALIDARG; - - TRACE ("(%p)->(hwnd=%p,%s,%p)\n", This, hwndOwner, shdebugstr_guid (riid), ppvOut); - - if (ppvOut) { - *ppvOut = NULL; - - if (IsEqualIID (riid, &IID_IDropTarget)) { - WARN ("IDropTarget not implemented\n"); - hr = E_NOTIMPL; - } else if (IsEqualIID (riid, &IID_IContextMenu)) { - WARN ("IContextMenu not implemented\n"); - hr = E_NOTIMPL; - } else if (IsEqualIID (riid, &IID_IShellView)) { - pShellView = IShellView_Constructor ((IShellFolder *) iface); - if (pShellView) { - hr = IShellView_QueryInterface (pShellView, riid, ppvOut); - IShellView_Release (pShellView); - } - } - } - TRACE ("-- (%p)->(interface=%p)\n", This, ppvOut); - return hr; -} - -/************************************************************************** -* ISF_Desktop_fnGetAttributesOf -*/ -static HRESULT WINAPI ISF_Desktop_fnGetAttributesOf (IShellFolder2 * iface, - UINT cidl, LPCITEMIDLIST * apidl, DWORD * rgfInOut) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - HRESULT hr = S_OK; - - TRACE ("(%p)->(cidl=%d apidl=%p mask=0x%08lx)\n", This, cidl, apidl, *rgfInOut); - - if ((!cidl) || (!apidl) || (!rgfInOut)) - return E_INVALIDARG; - - if (*rgfInOut == 0) - *rgfInOut = ~0; - - while (cidl > 0 && *apidl) { - pdump (*apidl); - SHELL32_GetItemAttributes (_IShellFolder_ (This), *apidl, rgfInOut); - apidl++; - cidl--; - } - - TRACE ("-- result=0x%08lx\n", *rgfInOut); - - return hr; -} - -/************************************************************************** -* ISF_Desktop_fnGetUIObjectOf -* -* PARAMETERS -* HWND hwndOwner, //[in ] Parent window for any output -* UINT cidl, //[in ] array size -* LPCITEMIDLIST* apidl, //[in ] simple pidl array -* REFIID riid, //[in ] Requested Interface -* UINT* prgfInOut, //[ ] reserved -* LPVOID* ppvObject) //[out] Resulting Interface -* -*/ -static HRESULT WINAPI ISF_Desktop_fnGetUIObjectOf (IShellFolder2 * iface, - HWND hwndOwner, - UINT cidl, - LPCITEMIDLIST * apidl, - REFIID riid, UINT * prgfInOut, LPVOID * ppvOut) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - LPITEMIDLIST pidl; - IUnknown *pObj = NULL; - HRESULT hr = E_INVALIDARG; - - TRACE ("(%p)->(%p,%u,apidl=%p,%s,%p,%p)\n", - This, hwndOwner, cidl, apidl, shdebugstr_guid (riid), prgfInOut, ppvOut); - - if (ppvOut) { - *ppvOut = NULL; - - if (IsEqualIID (riid, &IID_IContextMenu)) { - pObj = (LPUNKNOWN) ISvItemCm_Constructor ((IShellFolder *) iface, This->pidlRoot, apidl, cidl); - hr = S_OK; - } else if (IsEqualIID (riid, &IID_IDataObject) && (cidl >= 1)) { - pObj = (LPUNKNOWN) IDataObject_Constructor (hwndOwner, This->pidlRoot, apidl, cidl); - hr = S_OK; - } else if (IsEqualIID (riid, &IID_IExtractIconA) && (cidl == 1)) { - pidl = ILCombine (This->pidlRoot, apidl[0]); - pObj = (LPUNKNOWN) IExtractIconA_Constructor (pidl); - SHFree (pidl); - hr = S_OK; - } else if (IsEqualIID (riid, &IID_IExtractIconW) && (cidl == 1)) { - pidl = ILCombine (This->pidlRoot, apidl[0]); - pObj = (LPUNKNOWN) IExtractIconW_Constructor (pidl); - SHFree (pidl); - hr = S_OK; - } else if (IsEqualIID (riid, &IID_IDropTarget) && (cidl >= 1)) { - hr = IShellFolder_QueryInterface (iface, &IID_IDropTarget, (LPVOID *) & pObj); - } else if ((IsEqualIID(riid,&IID_IShellLinkW) || IsEqualIID(riid,&IID_IShellLinkA)) - && (cidl == 1)) { - pidl = ILCombine (This->pidlRoot, apidl[0]); - hr = IShellLink_ConstructFromFile(NULL, riid, pidl, (LPVOID*)&pObj); - SHFree (pidl); - } else { - hr = E_NOINTERFACE; - } - - if (SUCCEEDED(hr) && !pObj) - hr = E_OUTOFMEMORY; - - *ppvOut = pObj; - } - TRACE ("(%p)->hr=0x%08lx\n", This, hr); - return hr; -} - -/************************************************************************** -* ISF_Desktop_fnGetDisplayNameOf -* -* NOTES -* special case: pidl = null gives desktop-name back -*/ -static HRESULT WINAPI ISF_Desktop_fnGetDisplayNameOf (IShellFolder2 * iface, - LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET strRet) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - CHAR szPath[MAX_PATH]; - GUID const *clsid; - HRESULT hr = S_OK; - - *szPath = '\0'; - - TRACE ("(%p)->(pidl=%p,0x%08lx,%p)\n", This, pidl, dwFlags, strRet); - pdump (pidl); - - if (!strRet) - return E_INVALIDARG; - - if (_ILIsDesktop (pidl)) { - if ((GET_SHGDN_RELATION (dwFlags) == SHGDN_NORMAL) && (GET_SHGDN_FOR (dwFlags) == SHGDN_FORPARSING)) { - lstrcpyA (szPath, This->sPathTarget); - } else { - HCR_GetClassNameA(&CLSID_ShellDesktop, szPath, MAX_PATH); - } - } else if (_ILIsPidlSimple (pidl)) { - if ((clsid = _ILGetGUIDPointer (pidl))) { - if (GET_SHGDN_FOR (dwFlags) == SHGDN_FORPARSING) { - int bWantsForParsing; - - /* - * we can only get a filesystem path from a shellfolder if the value WantsFORPARSING in - * CLSID\\{...}\\shellfolder exists - * exception: the MyComputer folder has this keys not but like any filesystem backed - * folder it needs these behaviour - */ - if (IsEqualIID (clsid, &CLSID_MyComputer)) { - bWantsForParsing = 1; - } else { - /* get the "WantsFORPARSING" flag from the registry */ - char szRegPath[100]; - - lstrcpyA (szRegPath, "CLSID\\"); - SHELL32_GUIDToStringA (clsid, &szRegPath[6]); - lstrcatA (szRegPath, "\\shellfolder"); - bWantsForParsing = - (ERROR_SUCCESS == - SHGetValueA (HKEY_CLASSES_ROOT, szRegPath, "WantsFORPARSING", NULL, NULL, NULL)); - } - - if ((GET_SHGDN_RELATION (dwFlags) == SHGDN_NORMAL) && bWantsForParsing) { - /* we need the filesystem path to the destination folder. Only the folder itself can know it */ - hr = SHELL32_GetDisplayNameOfChild (iface, pidl, dwFlags, szPath, MAX_PATH); - } else { - /* parsing name like ::{...} */ - lstrcpyA (szPath, "::"); - SHELL32_GUIDToStringA (clsid, &szPath[2]); - } - } else { - /* user friendly name */ - HCR_GetClassNameA (clsid, szPath, MAX_PATH); - } - } else { - /* file system folder */ - _ILSimpleGetText (pidl, szPath, MAX_PATH); - - if (!_ILIsFolder(pidl)) - SHELL_FS_ProcessDisplayFilename(szPath, dwFlags); - } - } else { - /* a complex pidl, let the subfolder do the work */ - hr = SHELL32_GetDisplayNameOfChild (iface, pidl, dwFlags, szPath, MAX_PATH); - } - - if (SUCCEEDED (hr)) { - strRet->uType = STRRET_CSTR; - lstrcpynA (strRet->u.cStr, szPath, MAX_PATH); - } - - TRACE ("-- (%p)->(%s,0x%08lx)\n", This, szPath, hr); - return hr; -} - -/************************************************************************** -* ISF_Desktop_fnSetNameOf -* Changes the name of a file object or subfolder, possibly changing its item -* identifier in the process. -* -* PARAMETERS -* HWND hwndOwner, //[in ] Owner window for output -* LPCITEMIDLIST pidl, //[in ] simple pidl of item to change -* LPCOLESTR lpszName, //[in ] the items new display name -* DWORD dwFlags, //[in ] SHGNO formatting flags -* LPITEMIDLIST* ppidlOut) //[out] simple pidl returned -*/ -static HRESULT WINAPI ISF_Desktop_fnSetNameOf (IShellFolder2 * iface, HWND hwndOwner, LPCITEMIDLIST pidl, /*simple pidl */ - LPCOLESTR lpName, DWORD dwFlags, LPITEMIDLIST * pPidlOut) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - FIXME ("(%p)->(%p,pidl=%p,%s,%lu,%p)\n", This, hwndOwner, pidl, debugstr_w (lpName), dwFlags, pPidlOut); - - return E_FAIL; -} - -static HRESULT WINAPI ISF_Desktop_fnGetDefaultSearchGUID (IShellFolder2 * iface, GUID * pguid) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - FIXME ("(%p)\n", This); - return E_NOTIMPL; -} -static HRESULT WINAPI ISF_Desktop_fnEnumSearches (IShellFolder2 * iface, IEnumExtraSearch ** ppenum) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - FIXME ("(%p)\n", This); - return E_NOTIMPL; -} -static HRESULT WINAPI ISF_Desktop_fnGetDefaultColumn (IShellFolder2 * iface, - DWORD dwRes, ULONG * pSort, ULONG * pDisplay) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - TRACE ("(%p)\n", This); - - if (pSort) - *pSort = 0; - if (pDisplay) - *pDisplay = 0; - - return S_OK; -} -static HRESULT WINAPI ISF_Desktop_fnGetDefaultColumnState (IShellFolder2 * iface, UINT iColumn, DWORD * pcsFlags) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - TRACE ("(%p)\n", This); - - if (!pcsFlags || iColumn >= DESKTOPSHELLVIEWCOLUMNS) - return E_INVALIDARG; - - *pcsFlags = DesktopSFHeader[iColumn].pcsFlags; - - return S_OK; -} -static HRESULT WINAPI ISF_Desktop_fnGetDetailsEx (IShellFolder2 * iface, - LPCITEMIDLIST pidl, const SHCOLUMNID * pscid, VARIANT * pv) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - FIXME ("(%p)\n", This); - - return E_NOTIMPL; -} -static HRESULT WINAPI ISF_Desktop_fnGetDetailsOf (IShellFolder2 * iface, - LPCITEMIDLIST pidl, UINT iColumn, SHELLDETAILS * psd) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - HRESULT hr = E_FAIL; - - TRACE ("(%p)->(%p %i %p)\n", This, pidl, iColumn, psd); - - if (!psd || iColumn >= DESKTOPSHELLVIEWCOLUMNS) - return E_INVALIDARG; - - if (!pidl) { - psd->fmt = DesktopSFHeader[iColumn].fmt; - psd->cxChar = DesktopSFHeader[iColumn].cxChar; - psd->str.uType = STRRET_CSTR; - LoadStringA (shell32_hInstance, DesktopSFHeader[iColumn].colnameid, psd->str.u.cStr, MAX_PATH); - return S_OK; - } else { - /* the data from the pidl */ - switch (iColumn) { - case 0: /* name */ - hr = IShellFolder_GetDisplayNameOf (iface, pidl, SHGDN_NORMAL | SHGDN_INFOLDER, &psd->str); - break; - case 1: /* size */ - _ILGetFileSize (pidl, psd->str.u.cStr, MAX_PATH); - break; - case 2: /* type */ - _ILGetFileType (pidl, psd->str.u.cStr, MAX_PATH); - break; - case 3: /* date */ - _ILGetFileDate (pidl, psd->str.u.cStr, MAX_PATH); - break; - case 4: /* attributes */ - _ILGetFileAttributes (pidl, psd->str.u.cStr, MAX_PATH); - break; - } - hr = S_OK; - psd->str.uType = STRRET_CSTR; - } - - return hr; -} -static HRESULT WINAPI ISF_Desktop_fnMapColumnToSCID (IShellFolder2 * iface, UINT column, SHCOLUMNID * pscid) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - FIXME ("(%p)\n", This); - return E_NOTIMPL; -} - -static IShellFolder2Vtbl vt_MCFldr_ShellFolder2 = -{ - ISF_Desktop_fnQueryInterface, - ISF_Desktop_fnAddRef, - ISF_Desktop_fnRelease, - ISF_Desktop_fnParseDisplayName, - ISF_Desktop_fnEnumObjects, - ISF_Desktop_fnBindToObject, - ISF_Desktop_fnBindToStorage, - ISF_Desktop_fnCompareIDs, - ISF_Desktop_fnCreateViewObject, - ISF_Desktop_fnGetAttributesOf, - ISF_Desktop_fnGetUIObjectOf, - ISF_Desktop_fnGetDisplayNameOf, - ISF_Desktop_fnSetNameOf, - /* ShellFolder2 */ - ISF_Desktop_fnGetDefaultSearchGUID, - ISF_Desktop_fnEnumSearches, - ISF_Desktop_fnGetDefaultColumn, - ISF_Desktop_fnGetDefaultColumnState, - ISF_Desktop_fnGetDetailsEx, - ISF_Desktop_fnGetDetailsOf, - ISF_Desktop_fnMapColumnToSCID}; + +/* + * Virtual Desktop Folder + * + * Copyright 1997 Marcus Meissner + * Copyright 1998, 1999, 2002 Juergen Schmied + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" +#include "wine/port.h" + +#include +#include +#include +#include + +#define COBJMACROS +#define NONAMELESSUNION +#define NONAMELESSSTRUCT + +#include "winerror.h" +#include "windef.h" +#include "winbase.h" +#include "winreg.h" +#include "wingdi.h" +#include "winuser.h" + +#include "ole2.h" +#include "shlguid.h" + +#include "enumidlist.h" +#include "pidl.h" +#include "undocshell.h" +#include "shell32_main.h" +#include "shresdef.h" +#include "shlwapi.h" +#include "shellfolder.h" +#include "wine/debug.h" +#include "debughlp.h" +#include "shfldr.h" + +WINE_DEFAULT_DEBUG_CHANNEL (shell); + +/*********************************************************************** +* Desktopfolder implementation +*/ + +typedef struct { + IShellFolder2Vtbl *lpVtbl; + DWORD ref; + + CLSID *pclsid; + + /* both paths are parsible from the desktop */ + LPSTR sPathTarget; /* complete path to target used for enumeration and ChangeNotify */ + LPITEMIDLIST pidlRoot; /* absolute pidl */ + + int dwAttributes; /* attributes returned by GetAttributesOf FIXME: use it */ + + UINT cfShellIDList; /* clipboardformat for IDropTarget */ + BOOL fAcceptFmt; /* flag for pending Drop */ +} IGenericSFImpl; + +#define _IUnknown_(This) (IShellFolder*)&(This->lpVtbl) +#define _IShellFolder_(This) (IShellFolder*)&(This->lpVtbl) + +static struct IShellFolder2Vtbl vt_MCFldr_ShellFolder2; + +static shvheader DesktopSFHeader[] = { + {IDS_SHV_COLUMN1, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 15}, + {IDS_SHV_COLUMN2, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10}, + {IDS_SHV_COLUMN3, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10}, + {IDS_SHV_COLUMN4, SHCOLSTATE_TYPE_DATE | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 12}, + {IDS_SHV_COLUMN5, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 5} +}; + +#define DESKTOPSHELLVIEWCOLUMNS 5 + +/************************************************************************** +* ISF_Desktop_Constructor +*/ +HRESULT WINAPI ISF_Desktop_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv) +{ + IGenericSFImpl *sf; + char szMyPath[MAX_PATH]; + + TRACE ("unkOut=%p %s\n", pUnkOuter, shdebugstr_guid (riid)); + + if (!ppv) + return E_POINTER; + if (pUnkOuter) + return CLASS_E_NOAGGREGATION; + + if (!SHGetSpecialFolderPathA (0, szMyPath, CSIDL_DESKTOPDIRECTORY, TRUE)) + return E_UNEXPECTED; + + sf = (IGenericSFImpl *) LocalAlloc (GMEM_ZEROINIT, sizeof (IGenericSFImpl)); + if (!sf) + return E_OUTOFMEMORY; + + sf->ref = 0; + sf->lpVtbl = &vt_MCFldr_ShellFolder2; + sf->pidlRoot = _ILCreateDesktop (); /* my qualified pidl */ + sf->sPathTarget = SHAlloc (strlen (szMyPath) + 1); + lstrcpyA (sf->sPathTarget, szMyPath); + + if (!SUCCEEDED (IUnknown_QueryInterface (_IUnknown_ (sf), riid, ppv))) { + IUnknown_Release (_IUnknown_ (sf)); + return E_NOINTERFACE; + } + + TRACE ("--(%p)\n", sf); + return S_OK; +} + +/************************************************************************** + * ISF_Desktop_fnQueryInterface + * + * NOTES supports not IPersist/IPersistFolder + */ +static HRESULT WINAPI ISF_Desktop_fnQueryInterface (IShellFolder2 * iface, REFIID riid, LPVOID * ppvObj) +{ + IGenericSFImpl *This = (IGenericSFImpl *)iface; + + TRACE ("(%p)->(%s,%p)\n", This, shdebugstr_guid (riid), ppvObj); + + *ppvObj = NULL; + + if (IsEqualIID (riid, &IID_IUnknown) || IsEqualIID (riid, &IID_IShellFolder) + || IsEqualIID (riid, &IID_IShellFolder2)) { + *ppvObj = This; + } + + if (*ppvObj) { + IUnknown_AddRef ((IUnknown *) (*ppvObj)); + TRACE ("-- Interface: (%p)->(%p)\n", ppvObj, *ppvObj); + return S_OK; + } + TRACE ("-- Interface: E_NOINTERFACE\n"); + return E_NOINTERFACE; +} + +static ULONG WINAPI ISF_Desktop_fnAddRef (IShellFolder2 * iface) +{ + IGenericSFImpl *This = (IGenericSFImpl *)iface; + + TRACE ("(%p)->(count=%lu)\n", This, This->ref); + + return ++(This->ref); +} + +static ULONG WINAPI ISF_Desktop_fnRelease (IShellFolder2 * iface) +{ + IGenericSFImpl *This = (IGenericSFImpl *)iface; + + TRACE ("(%p)->(count=%lu)\n", This, This->ref); + + if (!--(This->ref)) { + TRACE ("-- destroying IShellFolder(%p)\n", This); + if (This->pidlRoot) + SHFree (This->pidlRoot); + if (This->sPathTarget) + SHFree (This->sPathTarget); + LocalFree ((HLOCAL) This); + return 0; + } + return This->ref; +} + +/************************************************************************** +* ISF_Desktop_fnParseDisplayName +* +* NOTES +* "::{20D04FE0-3AEA-1069-A2D8-08002B30309D}" and "" binds +* to MyComputer +*/ +static HRESULT WINAPI ISF_Desktop_fnParseDisplayName (IShellFolder2 * iface, + HWND hwndOwner, + LPBC pbc, + LPOLESTR lpszDisplayName, + DWORD * pchEaten, LPITEMIDLIST * ppidl, DWORD * pdwAttributes) +{ + IGenericSFImpl *This = (IGenericSFImpl *)iface; + + WCHAR szElement[MAX_PATH]; + LPCWSTR szNext = NULL; + LPITEMIDLIST pidlTemp = NULL; + HRESULT hr = S_OK; + char szPath[MAX_PATH]; + DWORD len; + CLSID clsid; + + TRACE ("(%p)->(HWND=%p,%p,%p=%s,%p,pidl=%p,%p)\n", + This, hwndOwner, pbc, lpszDisplayName, debugstr_w (lpszDisplayName), pchEaten, ppidl, pdwAttributes); + + if (!lpszDisplayName || !ppidl) + return E_INVALIDARG; + + *ppidl = 0; + + if (pchEaten) + *pchEaten = 0; /* strange but like the original */ + + if (lpszDisplayName[0] == ':' && lpszDisplayName[1] == ':') { + szNext = GetNextElementW (lpszDisplayName, szElement, MAX_PATH); + TRACE ("-- element: %s\n", debugstr_w (szElement)); + SHCLSIDFromStringW (szElement + 2, &clsid); + pidlTemp = _ILCreateGuid (PT_GUID, &clsid); + } else if (PathGetDriveNumberW (lpszDisplayName) >= 0) { + /* it's a filesystem path with a drive. Let MyComputer parse it */ + pidlTemp = _ILCreateMyComputer (); + szNext = lpszDisplayName; + } else if (PathIsUNCW(lpszDisplayName)) { + pidlTemp = _ILCreateNetwork(); + szNext = lpszDisplayName; + } else { + /* it's a filesystem path on the desktop. Let a FSFolder parse it */ + + if (*lpszDisplayName) { + /* build a complete path to create a simple pidl */ + lstrcpyA(szPath, This->sPathTarget); + PathAddBackslashA(szPath); + len = lstrlenA(szPath); + WideCharToMultiByte(CP_ACP, 0, lpszDisplayName, -1, szPath + len, MAX_PATH - len, NULL, NULL); + hr = _ILCreateFromPathA(szPath, &pidlTemp); + } else { + pidlTemp = _ILCreateMyComputer(); + } + + szNext = NULL; + } + + if (SUCCEEDED(hr) && pidlTemp) { + if (szNext && *szNext) { + hr = SHELL32_ParseNextElement (iface, hwndOwner, pbc, &pidlTemp, (LPOLESTR) szNext, pchEaten, pdwAttributes); + } else { + if (pdwAttributes && *pdwAttributes) { + hr = SHELL32_GetItemAttributes (_IShellFolder_ (This), pidlTemp, pdwAttributes); + } + } + } + + *ppidl = pidlTemp; + + TRACE ("(%p)->(-- ret=0x%08lx)\n", This, hr); + + return hr; +} + +/************************************************************************** + * CreateDesktopEnumList() + */ +static BOOL CreateDesktopEnumList(IEnumIDList *list, DWORD dwFlags) +{ + BOOL ret = TRUE; + char szPath[MAX_PATH]; + + TRACE("(%p)->(flags=0x%08lx) \n",list,dwFlags); + + /*enumerate the root folders */ + if(dwFlags & SHCONTF_FOLDERS) + { + HKEY hkey; + + /*create the pidl for This item */ + ret = AddToEnumList(list, _ILCreateMyComputer()); + + if (ret && !RegOpenKeyExA(HKEY_LOCAL_MACHINE, + "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\explorer\\desktop\\NameSpace", + 0, KEY_READ, &hkey)) + { + char iid[50]; + int i=0; + BOOL moreKeys = TRUE; + + while (ret && moreKeys) + { + DWORD size = sizeof (iid); + LONG apiRet = RegEnumKeyExA(hkey, i, iid, &size, 0, NULL, NULL, + NULL); + + if (ERROR_SUCCESS == apiRet) + { + ret = AddToEnumList(list, _ILCreateGuidFromStrA(iid)); + i++; + } + else if (ERROR_NO_MORE_ITEMS == apiRet) + moreKeys = FALSE; + else + ret = FALSE; + } + RegCloseKey(hkey); + } + } + + /*enumerate the elements in %windir%\desktop */ + SHGetSpecialFolderPathA(0, szPath, CSIDL_DESKTOPDIRECTORY, FALSE); + ret = ret && CreateFolderEnumList(list, szPath, dwFlags); + + return ret; +} + +/************************************************************************** +* ISF_Desktop_fnEnumObjects +*/ +static HRESULT WINAPI ISF_Desktop_fnEnumObjects (IShellFolder2 * iface, + HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST * ppEnumIDList) +{ + IGenericSFImpl *This = (IGenericSFImpl *)iface; + + TRACE ("(%p)->(HWND=%p flags=0x%08lx pplist=%p)\n", This, hwndOwner, dwFlags, ppEnumIDList); + + *ppEnumIDList = IEnumIDList_Constructor(); + if (*ppEnumIDList) + CreateDesktopEnumList(*ppEnumIDList, dwFlags); + + TRACE ("-- (%p)->(new ID List: %p)\n", This, *ppEnumIDList); + + return *ppEnumIDList ? S_OK : E_OUTOFMEMORY; +} + +/************************************************************************** +* ISF_Desktop_fnBindToObject +*/ +static HRESULT WINAPI ISF_Desktop_fnBindToObject (IShellFolder2 * iface, + LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID * ppvOut) +{ + IGenericSFImpl *This = (IGenericSFImpl *)iface; + + TRACE ("(%p)->(pidl=%p,%p,%s,%p)\n", This, pidl, pbcReserved, shdebugstr_guid (riid), ppvOut); + + return SHELL32_BindToChild (This->pidlRoot, This->sPathTarget, pidl, riid, ppvOut); +} + +/************************************************************************** +* ISF_Desktop_fnBindToStorage +*/ +static HRESULT WINAPI ISF_Desktop_fnBindToStorage (IShellFolder2 * iface, + LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID * ppvOut) +{ + IGenericSFImpl *This = (IGenericSFImpl *)iface; + + FIXME ("(%p)->(pidl=%p,%p,%s,%p) stub\n", This, pidl, pbcReserved, shdebugstr_guid (riid), ppvOut); + + *ppvOut = NULL; + return E_NOTIMPL; +} + +/************************************************************************** +* ISF_Desktop_fnCompareIDs +*/ + +static HRESULT WINAPI ISF_Desktop_fnCompareIDs (IShellFolder2 * iface, + LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) +{ + IGenericSFImpl *This = (IGenericSFImpl *)iface; + + int nReturn; + + TRACE ("(%p)->(0x%08lx,pidl1=%p,pidl2=%p)\n", This, lParam, pidl1, pidl2); + nReturn = SHELL32_CompareIDs (_IShellFolder_ (This), lParam, pidl1, pidl2); + TRACE ("-- %i\n", nReturn); + return nReturn; +} + +/************************************************************************** +* ISF_Desktop_fnCreateViewObject +*/ +static HRESULT WINAPI ISF_Desktop_fnCreateViewObject (IShellFolder2 * iface, + HWND hwndOwner, REFIID riid, LPVOID * ppvOut) +{ + IGenericSFImpl *This = (IGenericSFImpl *)iface; + + LPSHELLVIEW pShellView; + HRESULT hr = E_INVALIDARG; + + TRACE ("(%p)->(hwnd=%p,%s,%p)\n", This, hwndOwner, shdebugstr_guid (riid), ppvOut); + + if (ppvOut) { + *ppvOut = NULL; + + if (IsEqualIID (riid, &IID_IDropTarget)) { + WARN ("IDropTarget not implemented\n"); + hr = E_NOTIMPL; + } else if (IsEqualIID (riid, &IID_IContextMenu)) { + WARN ("IContextMenu not implemented\n"); + hr = E_NOTIMPL; + } else if (IsEqualIID (riid, &IID_IShellView)) { + pShellView = IShellView_Constructor ((IShellFolder *) iface); + if (pShellView) { + hr = IShellView_QueryInterface (pShellView, riid, ppvOut); + IShellView_Release (pShellView); + } + } + } + TRACE ("-- (%p)->(interface=%p)\n", This, ppvOut); + return hr; +} + +/************************************************************************** +* ISF_Desktop_fnGetAttributesOf +*/ +static HRESULT WINAPI ISF_Desktop_fnGetAttributesOf (IShellFolder2 * iface, + UINT cidl, LPCITEMIDLIST * apidl, DWORD * rgfInOut) +{ + IGenericSFImpl *This = (IGenericSFImpl *)iface; + + HRESULT hr = S_OK; + + TRACE ("(%p)->(cidl=%d apidl=%p mask=0x%08lx)\n", This, cidl, apidl, *rgfInOut); + + if ((!cidl) || (!apidl) || (!rgfInOut)) + return E_INVALIDARG; + + if (*rgfInOut == 0) + *rgfInOut = ~0; + + while (cidl > 0 && *apidl) { + pdump (*apidl); + SHELL32_GetItemAttributes (_IShellFolder_ (This), *apidl, rgfInOut); + apidl++; + cidl--; + } + + TRACE ("-- result=0x%08lx\n", *rgfInOut); + + return hr; +} + +/************************************************************************** +* ISF_Desktop_fnGetUIObjectOf +* +* PARAMETERS +* HWND hwndOwner, //[in ] Parent window for any output +* UINT cidl, //[in ] array size +* LPCITEMIDLIST* apidl, //[in ] simple pidl array +* REFIID riid, //[in ] Requested Interface +* UINT* prgfInOut, //[ ] reserved +* LPVOID* ppvObject) //[out] Resulting Interface +* +*/ +static HRESULT WINAPI ISF_Desktop_fnGetUIObjectOf (IShellFolder2 * iface, + HWND hwndOwner, + UINT cidl, + LPCITEMIDLIST * apidl, + REFIID riid, UINT * prgfInOut, LPVOID * ppvOut) +{ + IGenericSFImpl *This = (IGenericSFImpl *)iface; + + LPITEMIDLIST pidl; + IUnknown *pObj = NULL; + HRESULT hr = E_INVALIDARG; + + TRACE ("(%p)->(%p,%u,apidl=%p,%s,%p,%p)\n", + This, hwndOwner, cidl, apidl, shdebugstr_guid (riid), prgfInOut, ppvOut); + + if (ppvOut) { + *ppvOut = NULL; + + if (IsEqualIID (riid, &IID_IContextMenu)) { + pObj = (LPUNKNOWN) ISvItemCm_Constructor ((IShellFolder *) iface, This->pidlRoot, apidl, cidl); + hr = S_OK; + } else if (IsEqualIID (riid, &IID_IDataObject) && (cidl >= 1)) { + pObj = (LPUNKNOWN) IDataObject_Constructor (hwndOwner, This->pidlRoot, apidl, cidl); + hr = S_OK; + } else if (IsEqualIID (riid, &IID_IExtractIconA) && (cidl == 1)) { + pidl = ILCombine (This->pidlRoot, apidl[0]); + pObj = (LPUNKNOWN) IExtractIconA_Constructor (pidl); + SHFree (pidl); + hr = S_OK; + } else if (IsEqualIID (riid, &IID_IExtractIconW) && (cidl == 1)) { + pidl = ILCombine (This->pidlRoot, apidl[0]); + pObj = (LPUNKNOWN) IExtractIconW_Constructor (pidl); + SHFree (pidl); + hr = S_OK; + } else if (IsEqualIID (riid, &IID_IDropTarget) && (cidl >= 1)) { + hr = IShellFolder_QueryInterface (iface, &IID_IDropTarget, (LPVOID *) & pObj); + } else if ((IsEqualIID(riid,&IID_IShellLinkW) || IsEqualIID(riid,&IID_IShellLinkA)) + && (cidl == 1)) { + pidl = ILCombine (This->pidlRoot, apidl[0]); + hr = IShellLink_ConstructFromFile(NULL, riid, pidl, (LPVOID*)&pObj); + SHFree (pidl); + } else { + hr = E_NOINTERFACE; + } + + if (SUCCEEDED(hr) && !pObj) + hr = E_OUTOFMEMORY; + + *ppvOut = pObj; + } + TRACE ("(%p)->hr=0x%08lx\n", This, hr); + return hr; +} + +/************************************************************************** +* ISF_Desktop_fnGetDisplayNameOf +* +* NOTES +* special case: pidl = null gives desktop-name back +*/ +static HRESULT WINAPI ISF_Desktop_fnGetDisplayNameOf (IShellFolder2 * iface, + LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET strRet) +{ + IGenericSFImpl *This = (IGenericSFImpl *)iface; + + CHAR szPath[MAX_PATH]; + GUID const *clsid; + HRESULT hr = S_OK; + + *szPath = '\0'; + + TRACE ("(%p)->(pidl=%p,0x%08lx,%p)\n", This, pidl, dwFlags, strRet); + pdump (pidl); + + if (!strRet) + return E_INVALIDARG; + + if (_ILIsDesktop (pidl)) { + if ((GET_SHGDN_RELATION (dwFlags) == SHGDN_NORMAL) && (GET_SHGDN_FOR (dwFlags) == SHGDN_FORPARSING)) { + lstrcpyA (szPath, This->sPathTarget); + } else { + HCR_GetClassNameA(&CLSID_ShellDesktop, szPath, MAX_PATH); + } + } else if (_ILIsPidlSimple (pidl)) { + if ((clsid = _ILGetGUIDPointer (pidl))) { + if (GET_SHGDN_FOR (dwFlags) == SHGDN_FORPARSING) { + int bWantsForParsing; + + /* + * we can only get a filesystem path from a shellfolder if the value WantsFORPARSING in + * CLSID\\{...}\\shellfolder exists + * exception: the MyComputer folder has this keys not but like any filesystem backed + * folder it needs these behaviour + */ + if (IsEqualIID (clsid, &CLSID_MyComputer)) { + bWantsForParsing = 1; + } else { + /* get the "WantsFORPARSING" flag from the registry */ + char szRegPath[100]; + + lstrcpyA (szRegPath, "CLSID\\"); + SHELL32_GUIDToStringA (clsid, &szRegPath[6]); + lstrcatA (szRegPath, "\\shellfolder"); + bWantsForParsing = + (ERROR_SUCCESS == + SHGetValueA (HKEY_CLASSES_ROOT, szRegPath, "WantsFORPARSING", NULL, NULL, NULL)); + } + + if ((GET_SHGDN_RELATION (dwFlags) == SHGDN_NORMAL) && bWantsForParsing) { + /* we need the filesystem path to the destination folder. Only the folder itself can know it */ + hr = SHELL32_GetDisplayNameOfChild (iface, pidl, dwFlags, szPath, MAX_PATH); + } else { + /* parsing name like ::{...} */ + lstrcpyA (szPath, "::"); + SHELL32_GUIDToStringA (clsid, &szPath[2]); + } + } else { + /* user friendly name */ + HCR_GetClassNameA (clsid, szPath, MAX_PATH); + } + } else { + /* file system folder */ + _ILSimpleGetText (pidl, szPath, MAX_PATH); + + if (!_ILIsFolder(pidl)) + SHELL_FS_ProcessDisplayFilename(szPath, dwFlags); + } + } else { + /* a complex pidl, let the subfolder do the work */ + hr = SHELL32_GetDisplayNameOfChild (iface, pidl, dwFlags, szPath, MAX_PATH); + } + + if (SUCCEEDED (hr)) { + strRet->uType = STRRET_CSTR; + lstrcpynA (strRet->u.cStr, szPath, MAX_PATH); + } + + TRACE ("-- (%p)->(%s,0x%08lx)\n", This, szPath, hr); + return hr; +} + +/************************************************************************** +* ISF_Desktop_fnSetNameOf +* Changes the name of a file object or subfolder, possibly changing its item +* identifier in the process. +* +* PARAMETERS +* HWND hwndOwner, //[in ] Owner window for output +* LPCITEMIDLIST pidl, //[in ] simple pidl of item to change +* LPCOLESTR lpszName, //[in ] the items new display name +* DWORD dwFlags, //[in ] SHGNO formatting flags +* LPITEMIDLIST* ppidlOut) //[out] simple pidl returned +*/ +static HRESULT WINAPI ISF_Desktop_fnSetNameOf (IShellFolder2 * iface, HWND hwndOwner, LPCITEMIDLIST pidl, /*simple pidl */ + LPCOLESTR lpName, DWORD dwFlags, LPITEMIDLIST * pPidlOut) +{ + IGenericSFImpl *This = (IGenericSFImpl *)iface; + + FIXME ("(%p)->(%p,pidl=%p,%s,%lu,%p)\n", This, hwndOwner, pidl, debugstr_w (lpName), dwFlags, pPidlOut); + + return E_FAIL; +} + +static HRESULT WINAPI ISF_Desktop_fnGetDefaultSearchGUID (IShellFolder2 * iface, GUID * pguid) +{ + IGenericSFImpl *This = (IGenericSFImpl *)iface; + + FIXME ("(%p)\n", This); + return E_NOTIMPL; +} +static HRESULT WINAPI ISF_Desktop_fnEnumSearches (IShellFolder2 * iface, IEnumExtraSearch ** ppenum) +{ + IGenericSFImpl *This = (IGenericSFImpl *)iface; + FIXME ("(%p)\n", This); + return E_NOTIMPL; +} +static HRESULT WINAPI ISF_Desktop_fnGetDefaultColumn (IShellFolder2 * iface, + DWORD dwRes, ULONG * pSort, ULONG * pDisplay) +{ + IGenericSFImpl *This = (IGenericSFImpl *)iface; + + TRACE ("(%p)\n", This); + + if (pSort) + *pSort = 0; + if (pDisplay) + *pDisplay = 0; + + return S_OK; +} +static HRESULT WINAPI ISF_Desktop_fnGetDefaultColumnState (IShellFolder2 * iface, UINT iColumn, DWORD * pcsFlags) +{ + IGenericSFImpl *This = (IGenericSFImpl *)iface; + + TRACE ("(%p)\n", This); + + if (!pcsFlags || iColumn >= DESKTOPSHELLVIEWCOLUMNS) + return E_INVALIDARG; + + *pcsFlags = DesktopSFHeader[iColumn].pcsFlags; + + return S_OK; +} +static HRESULT WINAPI ISF_Desktop_fnGetDetailsEx (IShellFolder2 * iface, + LPCITEMIDLIST pidl, const SHCOLUMNID * pscid, VARIANT * pv) +{ + IGenericSFImpl *This = (IGenericSFImpl *)iface; + FIXME ("(%p)\n", This); + + return E_NOTIMPL; +} +static HRESULT WINAPI ISF_Desktop_fnGetDetailsOf (IShellFolder2 * iface, + LPCITEMIDLIST pidl, UINT iColumn, SHELLDETAILS * psd) +{ + IGenericSFImpl *This = (IGenericSFImpl *)iface; + + HRESULT hr = E_FAIL; + + TRACE ("(%p)->(%p %i %p)\n", This, pidl, iColumn, psd); + + if (!psd || iColumn >= DESKTOPSHELLVIEWCOLUMNS) + return E_INVALIDARG; + + if (!pidl) { + psd->fmt = DesktopSFHeader[iColumn].fmt; + psd->cxChar = DesktopSFHeader[iColumn].cxChar; + psd->str.uType = STRRET_CSTR; + LoadStringA (shell32_hInstance, DesktopSFHeader[iColumn].colnameid, psd->str.u.cStr, MAX_PATH); + return S_OK; + } else { + /* the data from the pidl */ + switch (iColumn) { + case 0: /* name */ + hr = IShellFolder_GetDisplayNameOf (iface, pidl, SHGDN_NORMAL | SHGDN_INFOLDER, &psd->str); + break; + case 1: /* size */ + _ILGetFileSize (pidl, psd->str.u.cStr, MAX_PATH); + break; + case 2: /* type */ + _ILGetFileType (pidl, psd->str.u.cStr, MAX_PATH); + break; + case 3: /* date */ + _ILGetFileDate (pidl, psd->str.u.cStr, MAX_PATH); + break; + case 4: /* attributes */ + _ILGetFileAttributes (pidl, psd->str.u.cStr, MAX_PATH); + break; + } + hr = S_OK; + psd->str.uType = STRRET_CSTR; + } + + return hr; +} +static HRESULT WINAPI ISF_Desktop_fnMapColumnToSCID (IShellFolder2 * iface, UINT column, SHCOLUMNID * pscid) +{ + IGenericSFImpl *This = (IGenericSFImpl *)iface; + FIXME ("(%p)\n", This); + return E_NOTIMPL; +} + +static IShellFolder2Vtbl vt_MCFldr_ShellFolder2 = +{ + ISF_Desktop_fnQueryInterface, + ISF_Desktop_fnAddRef, + ISF_Desktop_fnRelease, + ISF_Desktop_fnParseDisplayName, + ISF_Desktop_fnEnumObjects, + ISF_Desktop_fnBindToObject, + ISF_Desktop_fnBindToStorage, + ISF_Desktop_fnCompareIDs, + ISF_Desktop_fnCreateViewObject, + ISF_Desktop_fnGetAttributesOf, + ISF_Desktop_fnGetUIObjectOf, + ISF_Desktop_fnGetDisplayNameOf, + ISF_Desktop_fnSetNameOf, + /* ShellFolder2 */ + ISF_Desktop_fnGetDefaultSearchGUID, + ISF_Desktop_fnEnumSearches, + ISF_Desktop_fnGetDefaultColumn, + ISF_Desktop_fnGetDefaultColumnState, + ISF_Desktop_fnGetDetailsEx, + ISF_Desktop_fnGetDetailsOf, + ISF_Desktop_fnMapColumnToSCID}; diff --git a/reactos/lib/shell32/shfldr_fs.c b/reactos/lib/shell32/shfldr_fs.c index d7ef8381b43..858628540a4 100644 --- a/reactos/lib/shell32/shfldr_fs.c +++ b/reactos/lib/shell32/shfldr_fs.c @@ -1,1399 +1,1399 @@ - -/* - * file system folder - * - * Copyright 1997 Marcus Meissner - * Copyright 1998, 1999, 2002 Juergen Schmied - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include "config.h" -#include "wine/port.h" - -#include -#include -#include -#include - -#define COBJMACROS -#define NONAMELESSUNION -#define NONAMELESSSTRUCT - -#include "winerror.h" -#include "windef.h" -#include "winbase.h" -#include "winreg.h" -#include "wingdi.h" -#include "winuser.h" - -#include "ole2.h" -#include "shlguid.h" - -#include "enumidlist.h" -#include "pidl.h" -#include "undocshell.h" -#include "shell32_main.h" -#include "shresdef.h" -#include "shlwapi.h" -#include "shellfolder.h" -#include "wine/debug.h" -#include "debughlp.h" -#include "shfldr.h" - -WINE_DEFAULT_DEBUG_CHANNEL (shell); - -/*********************************************************************** -* IShellFolder implementation -*/ - -typedef struct { - IUnknownVtbl *lpVtbl; - DWORD ref; - IShellFolder2Vtbl *lpvtblShellFolder; - IPersistFolder3Vtbl *lpvtblPersistFolder3; - IDropTargetVtbl *lpvtblDropTarget; - ISFHelperVtbl *lpvtblSFHelper; - - IUnknown *pUnkOuter; /* used for aggregation */ - - CLSID *pclsid; - - /* both paths are parsible from the desktop */ - LPSTR sPathTarget; /* complete path to target used for enumeration and ChangeNotify */ - - LPITEMIDLIST pidlRoot; /* absolute pidl */ - - int dwAttributes; /* attributes returned by GetAttributesOf FIXME: use it */ - - UINT cfShellIDList; /* clipboardformat for IDropTarget */ - BOOL fAcceptFmt; /* flag for pending Drop */ -} IGenericSFImpl; - -static struct IUnknownVtbl unkvt; -static struct IShellFolder2Vtbl sfvt; -static struct IPersistFolder3Vtbl vt_FSFldr_PersistFolder3; /* IPersistFolder3 for a FS_Folder */ -static struct IDropTargetVtbl dtvt; -static struct ISFHelperVtbl shvt; - -#define _IShellFolder2_Offset ((int)(&(((IGenericSFImpl*)0)->lpvtblShellFolder))) -#define _ICOM_THIS_From_IShellFolder2(class, name) class* This = (class*)(((char*)name)-_IShellFolder2_Offset); - -#define _IPersistFolder2_Offset ((int)(&(((IGenericSFImpl*)0)->lpvtblPersistFolder3))) -#define _ICOM_THIS_From_IPersistFolder2(class, name) class* This = (class*)(((char*)name)-_IPersistFolder2_Offset); - -#define _IPersistFolder3_Offset ((int)(&(((IGenericSFImpl*)0)->lpvtblPersistFolder3))) -#define _ICOM_THIS_From_IPersistFolder3(class, name) class* This = (class*)(((char*)name)-_IPersistFolder3_Offset); - -#define _IDropTarget_Offset ((int)(&(((IGenericSFImpl*)0)->lpvtblDropTarget))) -#define _ICOM_THIS_From_IDropTarget(class, name) class* This = (class*)(((char*)name)-_IDropTarget_Offset); - -#define _ISFHelper_Offset ((int)(&(((IGenericSFImpl*)0)->lpvtblSFHelper))) -#define _ICOM_THIS_From_ISFHelper(class, name) class* This = (class*)(((char*)name)-_ISFHelper_Offset); - -/* - converts This to a interface pointer -*/ -#define _IUnknown_(This) (IUnknown*)&(This->lpVtbl) -#define _IShellFolder_(This) (IShellFolder*)&(This->lpvtblShellFolder) -#define _IShellFolder2_(This) (IShellFolder2*)&(This->lpvtblShellFolder) -#define _IPersist_(This) (IPersist*)&(This->lpvtblPersistFolder3) -#define _IPersistFolder_(This) (IPersistFolder*)&(This->lpvtblPersistFolder3) -#define _IPersistFolder2_(This) (IPersistFolder2*)&(This->lpvtblPersistFolder3) -#define _IPersistFolder3_(This) (IPersistFolder3*)&(This->lpvtblPersistFolder3) -#define _IDropTarget_(This) (IDropTarget*)&(This->lpvtblDropTarget) -#define _ISFHelper_(This) (ISFHelper*)&(This->lpvtblSFHelper) - -/************************************************************************** -* registers clipboardformat once -*/ -static void SF_RegisterClipFmt (IGenericSFImpl * This) -{ - TRACE ("(%p)\n", This); - - if (!This->cfShellIDList) { - This->cfShellIDList = RegisterClipboardFormatA (CFSTR_SHELLIDLIST); - } -} - -/************************************************************************** -* we need a separate IUnknown to handle aggregation -* (inner IUnknown) -*/ -static HRESULT WINAPI IUnknown_fnQueryInterface (IUnknown * iface, REFIID riid, LPVOID * ppvObj) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - TRACE ("(%p)->(%s,%p)\n", This, shdebugstr_guid (riid), ppvObj); - - *ppvObj = NULL; - - if (IsEqualIID (riid, &IID_IUnknown)) - *ppvObj = _IUnknown_ (This); - else if (IsEqualIID (riid, &IID_IShellFolder)) - *ppvObj = _IShellFolder_ (This); - else if (IsEqualIID (riid, &IID_IShellFolder2)) - *ppvObj = _IShellFolder_ (This); - else if (IsEqualIID (riid, &IID_IPersist)) - *ppvObj = _IPersist_ (This); - else if (IsEqualIID (riid, &IID_IPersistFolder)) - *ppvObj = _IPersistFolder_ (This); - else if (IsEqualIID (riid, &IID_IPersistFolder2)) - *ppvObj = _IPersistFolder2_ (This); - else if (IsEqualIID (riid, &IID_IPersistFolder3)) - *ppvObj = _IPersistFolder3_ (This); - else if (IsEqualIID (riid, &IID_ISFHelper)) - *ppvObj = _ISFHelper_ (This); - else if (IsEqualIID (riid, &IID_IDropTarget)) { - *ppvObj = _IDropTarget_ (This); - SF_RegisterClipFmt (This); - } - - if (*ppvObj) { - IUnknown_AddRef ((IUnknown *) (*ppvObj)); - TRACE ("-- Interface = %p\n", *ppvObj); - return S_OK; - } - TRACE ("-- Interface: E_NOINTERFACE\n"); - return E_NOINTERFACE; -} - -static ULONG WINAPI IUnknown_fnAddRef (IUnknown * iface) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - TRACE ("(%p)->(count=%lu)\n", This, This->ref); - - return ++(This->ref); -} - -static ULONG WINAPI IUnknown_fnRelease (IUnknown * iface) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - TRACE ("(%p)->(count=%lu)\n", This, This->ref); - - if (!--(This->ref)) { - TRACE ("-- destroying IShellFolder(%p)\n", This); - - if (This->pidlRoot) - SHFree (This->pidlRoot); - if (This->sPathTarget) - SHFree (This->sPathTarget); - LocalFree ((HLOCAL) This); - return 0; - } - return This->ref; -} - -static IUnknownVtbl unkvt = -{ - IUnknown_fnQueryInterface, - IUnknown_fnAddRef, - IUnknown_fnRelease, -}; - -static shvheader GenericSFHeader[] = { - {IDS_SHV_COLUMN1, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 15}, - {IDS_SHV_COLUMN2, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10}, - {IDS_SHV_COLUMN3, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10}, - {IDS_SHV_COLUMN4, SHCOLSTATE_TYPE_DATE | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 12}, - {IDS_SHV_COLUMN5, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 5} -}; - -#define GENERICSHELLVIEWCOLUMNS 5 - -/************************************************************************** -* IFSFolder_Constructor -* -* NOTES -* creating undocumented ShellFS_Folder as part of an aggregation -* {F3364BA0-65B9-11CE-A9BA-00AA004AE837} -* -*/ -HRESULT WINAPI IFSFolder_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv) -{ - IGenericSFImpl *sf; - - TRACE ("unkOut=%p %s\n", pUnkOuter, shdebugstr_guid (riid)); - - if (pUnkOuter && !IsEqualIID (riid, &IID_IUnknown)) - return CLASS_E_NOAGGREGATION; - sf = (IGenericSFImpl *) LocalAlloc (GMEM_ZEROINIT, sizeof (IGenericSFImpl)); - if (!sf) - return E_OUTOFMEMORY; - - sf->ref = 0; - sf->lpVtbl = &unkvt; - sf->lpvtblShellFolder = &sfvt; - sf->lpvtblPersistFolder3 = &vt_FSFldr_PersistFolder3; - sf->lpvtblDropTarget = &dtvt; - sf->lpvtblSFHelper = &shvt; - sf->pclsid = (CLSID *) & CLSID_ShellFSFolder; - sf->pUnkOuter = pUnkOuter ? pUnkOuter : _IUnknown_ (sf); - - if (!SUCCEEDED (IUnknown_QueryInterface (_IUnknown_ (sf), riid, ppv))) { - IUnknown_Release (_IUnknown_ (sf)); - return E_NOINTERFACE; - } - - TRACE ("--%p\n", *ppv); - return S_OK; -} - -/************************************************************************** - * IShellFolder_fnQueryInterface - * - * PARAMETERS - * REFIID riid [in ] Requested InterfaceID - * LPVOID* ppvObject [out] Interface* to hold the result - */ -static HRESULT WINAPI IShellFolder_fnQueryInterface (IShellFolder2 * iface, REFIID riid, LPVOID * ppvObj) -{ - _ICOM_THIS_From_IShellFolder2 (IGenericSFImpl, iface) - - TRACE ("(%p)->(%s,%p)\n", This, shdebugstr_guid (riid), ppvObj); - - return IUnknown_QueryInterface (This->pUnkOuter, riid, ppvObj); -} - -/************************************************************************** -* IShellFolder_AddRef -*/ - -static ULONG WINAPI IShellFolder_fnAddRef (IShellFolder2 * iface) -{ - _ICOM_THIS_From_IShellFolder2 (IGenericSFImpl, iface) - - TRACE ("(%p)->(count=%lu)\n", This, This->ref); - - return IUnknown_AddRef (This->pUnkOuter); -} - -/************************************************************************** - * IShellFolder_fnRelease - */ -static ULONG WINAPI IShellFolder_fnRelease (IShellFolder2 * iface) -{ - _ICOM_THIS_From_IShellFolder2 (IGenericSFImpl, iface) - - TRACE ("(%p)->(count=%lu)\n", This, This->ref); - - return IUnknown_Release (This->pUnkOuter); -} - -/************************************************************************** -* IShellFolder_ParseDisplayName {SHELL32} -* -* Parse a display name. -* -* PARAMS -* hwndOwner [in] Parent window for any message's -* pbc [in] optional FileSystemBindData context -* lpszDisplayName [in] Unicode displayname. -* pchEaten [out] (unicode) characters processed -* ppidl [out] complex pidl to item -* pdwAttributes [out] items attributes -* -* NOTES -* Every folder tries to parse only its own (the leftmost) pidl and creates a -* subfolder to evaluate the remaining parts. -* Now we can parse into namespaces implemented by shell extensions -* -* Behaviour on win98: lpszDisplayName=NULL -> crash -* lpszDisplayName="" -> returns mycoputer-pidl -* -* FIXME -* pdwAttributes is not set -* pchEaten is not set like in windows -*/ -static HRESULT WINAPI -IShellFolder_fnParseDisplayName (IShellFolder2 * iface, - HWND hwndOwner, - LPBC pbc, - LPOLESTR lpszDisplayName, - DWORD * pchEaten, LPITEMIDLIST * ppidl, DWORD * pdwAttributes) -{ - _ICOM_THIS_From_IShellFolder2 (IGenericSFImpl, iface) - - HRESULT hr = E_INVALIDARG; - LPCWSTR szNext = NULL; - WCHAR szElement[MAX_PATH]; - CHAR szPath[MAX_PATH]; - LPITEMIDLIST pidlTemp = NULL; - DWORD len; - - TRACE ("(%p)->(HWND=%p,%p,%p=%s,%p,pidl=%p,%p)\n", - This, hwndOwner, pbc, lpszDisplayName, debugstr_w (lpszDisplayName), pchEaten, ppidl, pdwAttributes); - - if (!lpszDisplayName || !ppidl) - return E_INVALIDARG; - - if (pchEaten) - *pchEaten = 0; /* strange but like the original */ - - if (*lpszDisplayName) { - /* get the next element */ - szNext = GetNextElementW (lpszDisplayName, szElement, MAX_PATH); - - /* build the full pathname to the element */ - lstrcpyA(szPath, This->sPathTarget); - PathAddBackslashA(szPath); - len = lstrlenA(szPath); - WideCharToMultiByte(CP_ACP, 0, szElement, -1, szPath + len, MAX_PATH - len, NULL, NULL); - - /* get the pidl */ - hr = _ILCreateFromPathA(szPath, &pidlTemp); - - if (SUCCEEDED(hr)) { - if (szNext && *szNext) { - /* try to analyse the next element */ - hr = SHELL32_ParseNextElement (iface, hwndOwner, pbc, &pidlTemp, (LPOLESTR) szNext, pchEaten, pdwAttributes); - } else { - /* it's the last element */ - if (pdwAttributes && *pdwAttributes) { - hr = SHELL32_GetItemAttributes (_IShellFolder_ (This), pidlTemp, pdwAttributes); - } - } - } - } - - if (SUCCEEDED(hr)) - *ppidl = pidlTemp; - else - *ppidl = NULL; - - TRACE ("(%p)->(-- pidl=%p ret=0x%08lx)\n", This, ppidl ? *ppidl : 0, hr); - - return hr; -} - -/************************************************************************** -* IShellFolder_fnEnumObjects -* PARAMETERS -* HWND hwndOwner, //[in ] Parent Window -* DWORD grfFlags, //[in ] SHCONTF enumeration mask -* LPENUMIDLIST* ppenumIDList //[out] IEnumIDList interface -*/ -static HRESULT WINAPI -IShellFolder_fnEnumObjects (IShellFolder2 * iface, HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST * ppEnumIDList) -{ - _ICOM_THIS_From_IShellFolder2 (IGenericSFImpl, iface) - - TRACE ("(%p)->(HWND=%p flags=0x%08lx pplist=%p)\n", This, hwndOwner, dwFlags, ppEnumIDList); - - *ppEnumIDList = IEnumIDList_Constructor(); - if (*ppEnumIDList) - CreateFolderEnumList(*ppEnumIDList, This->sPathTarget, dwFlags); - - TRACE ("-- (%p)->(new ID List: %p)\n", This, *ppEnumIDList); - - return *ppEnumIDList ? S_OK : E_OUTOFMEMORY; -} - -/************************************************************************** -* IShellFolder_fnBindToObject -* PARAMETERS -* LPCITEMIDLIST pidl, //[in ] relative pidl to open -* LPBC pbc, //[in ] optional FileSystemBindData context -* REFIID riid, //[in ] Initial Interface -* LPVOID* ppvObject //[out] Interface* -*/ -static HRESULT WINAPI -IShellFolder_fnBindToObject (IShellFolder2 * iface, LPCITEMIDLIST pidl, LPBC pbc, REFIID riid, LPVOID * ppvOut) -{ - _ICOM_THIS_From_IShellFolder2 (IGenericSFImpl, iface) - - TRACE ("(%p)->(pidl=%p,%p,%s,%p)\n", This, pidl, pbc, shdebugstr_guid (riid), ppvOut); - - return SHELL32_BindToChild (This->pidlRoot, This->sPathTarget, pidl, riid, ppvOut); -} - -/************************************************************************** -* IShellFolder_fnBindToStorage -* PARAMETERS -* LPCITEMIDLIST pidl, //[in ] complex pidl to store -* LPBC pbc, //[in ] reserved -* REFIID riid, //[in ] Initial storage interface -* LPVOID* ppvObject //[out] Interface* returned -*/ -static HRESULT WINAPI -IShellFolder_fnBindToStorage (IShellFolder2 * iface, LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID * ppvOut) -{ - _ICOM_THIS_From_IShellFolder2 (IGenericSFImpl, iface) - - FIXME ("(%p)->(pidl=%p,%p,%s,%p) stub\n", This, pidl, pbcReserved, shdebugstr_guid (riid), ppvOut); - - *ppvOut = NULL; - return E_NOTIMPL; -} - -/************************************************************************** -* IShellFolder_fnCompareIDs -*/ - -static HRESULT WINAPI -IShellFolder_fnCompareIDs (IShellFolder2 * iface, LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) -{ - _ICOM_THIS_From_IShellFolder2 (IGenericSFImpl, iface) - - int nReturn; - - TRACE ("(%p)->(0x%08lx,pidl1=%p,pidl2=%p)\n", This, lParam, pidl1, pidl2); - nReturn = SHELL32_CompareIDs (_IShellFolder_ (This), lParam, pidl1, pidl2); - TRACE ("-- %i\n", nReturn); - return nReturn; -} - -/************************************************************************** -* IShellFolder_fnCreateViewObject -*/ -static HRESULT WINAPI -IShellFolder_fnCreateViewObject (IShellFolder2 * iface, HWND hwndOwner, REFIID riid, LPVOID * ppvOut) -{ - _ICOM_THIS_From_IShellFolder2 (IGenericSFImpl, iface) - - LPSHELLVIEW pShellView; - HRESULT hr = E_INVALIDARG; - - TRACE ("(%p)->(hwnd=%p,%s,%p)\n", This, hwndOwner, shdebugstr_guid (riid), ppvOut); - - if (ppvOut) { - *ppvOut = NULL; - - if (IsEqualIID (riid, &IID_IDropTarget)) { - hr = IShellFolder_QueryInterface (iface, &IID_IDropTarget, ppvOut); - } else if (IsEqualIID (riid, &IID_IContextMenu)) { - FIXME ("IContextMenu not implemented\n"); - hr = E_NOTIMPL; - } else if (IsEqualIID (riid, &IID_IShellView)) { - pShellView = IShellView_Constructor ((IShellFolder *) iface); - if (pShellView) { - hr = IShellView_QueryInterface (pShellView, riid, ppvOut); - IShellView_Release (pShellView); - } - } - } - TRACE ("-- (%p)->(interface=%p)\n", This, ppvOut); - return hr; -} - -/************************************************************************** -* IShellFolder_fnGetAttributesOf -* -* PARAMETERS -* UINT cidl, //[in ] num elements in pidl array -* LPCITEMIDLIST* apidl, //[in ] simple pidl array -* ULONG* rgfInOut) //[out] result array -* -*/ -static HRESULT WINAPI -IShellFolder_fnGetAttributesOf (IShellFolder2 * iface, UINT cidl, LPCITEMIDLIST * apidl, DWORD * rgfInOut) -{ - _ICOM_THIS_From_IShellFolder2 (IGenericSFImpl, iface) - - HRESULT hr = S_OK; - - TRACE ("(%p)->(cidl=%d apidl=%p mask=0x%08lx)\n", This, cidl, apidl, *rgfInOut); - - if ((!cidl) || (!apidl) || (!rgfInOut)) - return E_INVALIDARG; - - if (*rgfInOut == 0) - *rgfInOut = ~0; - - while (cidl > 0 && *apidl) { - pdump (*apidl); - SHELL32_GetItemAttributes (_IShellFolder_ (This), *apidl, rgfInOut); - apidl++; - cidl--; - } - - TRACE ("-- result=0x%08lx\n", *rgfInOut); - - return hr; -} - -/************************************************************************** -* IShellFolder_fnGetUIObjectOf -* -* PARAMETERS -* HWND hwndOwner, //[in ] Parent window for any output -* UINT cidl, //[in ] array size -* LPCITEMIDLIST* apidl, //[in ] simple pidl array -* REFIID riid, //[in ] Requested Interface -* UINT* prgfInOut, //[ ] reserved -* LPVOID* ppvObject) //[out] Resulting Interface -* -* NOTES -* This function gets asked to return "view objects" for one or more (multiple select) -* items: -* The viewobject typically is an COM object with one of the following interfaces: -* IExtractIcon,IDataObject,IContextMenu -* In order to support icon positions in the default Listview your DataObject -* must implement the SetData method (in addition to GetData :) - the shell passes -* a barely documented "Icon positions" structure to SetData when the drag starts, -* and GetData's it if the drop is in another explorer window that needs the positions. -*/ -static HRESULT WINAPI -IShellFolder_fnGetUIObjectOf (IShellFolder2 * iface, - HWND hwndOwner, - UINT cidl, LPCITEMIDLIST * apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut) -{ - _ICOM_THIS_From_IShellFolder2 (IGenericSFImpl, iface) - - LPITEMIDLIST pidl; - IUnknown *pObj = NULL; - HRESULT hr = E_INVALIDARG; - - TRACE ("(%p)->(%p,%u,apidl=%p,%s,%p,%p)\n", - This, hwndOwner, cidl, apidl, shdebugstr_guid (riid), prgfInOut, ppvOut); - - if (ppvOut) { - *ppvOut = NULL; - - if (IsEqualIID (riid, &IID_IContextMenu) && (cidl >= 1)) { - pObj = (LPUNKNOWN) ISvItemCm_Constructor ((IShellFolder *) iface, This->pidlRoot, apidl, cidl); - hr = S_OK; - } else if (IsEqualIID (riid, &IID_IDataObject) && (cidl >= 1)) { - pObj = (LPUNKNOWN) IDataObject_Constructor (hwndOwner, This->pidlRoot, apidl, cidl); - hr = S_OK; - } else if (IsEqualIID (riid, &IID_IExtractIconA) && (cidl == 1)) { - pidl = ILCombine (This->pidlRoot, apidl[0]); - pObj = (LPUNKNOWN) IExtractIconA_Constructor (pidl); - SHFree (pidl); - hr = S_OK; - } else if (IsEqualIID (riid, &IID_IExtractIconW) && (cidl == 1)) { - pidl = ILCombine (This->pidlRoot, apidl[0]); - pObj = (LPUNKNOWN) IExtractIconW_Constructor (pidl); - SHFree (pidl); - hr = S_OK; - } else if (IsEqualIID (riid, &IID_IDropTarget) && (cidl >= 1)) { - hr = IShellFolder_QueryInterface (iface, &IID_IDropTarget, (LPVOID *) & pObj); - } else if ((IsEqualIID(riid,&IID_IShellLinkW) || IsEqualIID(riid,&IID_IShellLinkA)) - && (cidl == 1)) { - pidl = ILCombine (This->pidlRoot, apidl[0]); - hr = IShellLink_ConstructFromFile(NULL, riid, pidl, (LPVOID*)&pObj); - SHFree (pidl); - } else { - hr = E_NOINTERFACE; - } - - if (SUCCEEDED(hr) && !pObj) - hr = E_OUTOFMEMORY; - - *ppvOut = pObj; - } - TRACE ("(%p)->hr=0x%08lx\n", This, hr); - return hr; -} - -void SHELL_FS_ProcessDisplayFilename(LPSTR szPath, DWORD dwFlags) -{ - /*FIXME: MSDN also mentions SHGDN_FOREDITING which is not yet handled. */ - if (!(dwFlags & SHGDN_FORPARSING) && - ((dwFlags & SHGDN_INFOLDER) || (dwFlags == SHGDN_NORMAL))) { - HKEY hKey; - DWORD dwData; - DWORD dwDataSize = sizeof (DWORD); - BOOL doHide = FALSE; /* The default value is FALSE (win98 at least) */ - - if (!RegCreateKeyExA (HKEY_CURRENT_USER, - "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced", - 0, 0, 0, KEY_ALL_ACCESS, 0, &hKey, 0)) { - if (!RegQueryValueExA (hKey, "HideFileExt", 0, 0, (LPBYTE) & dwData, &dwDataSize)) - doHide = dwData; - - RegCloseKey (hKey); - } - - if (!doHide) { - LPSTR ext = PathFindExtensionA(szPath); - - if (ext) { - HKEY hkey; - char classname[MAX_PATH]; - LONG classlen = MAX_PATH; - - if (!RegQueryValueA(HKEY_CLASSES_ROOT, ext, classname, &classlen)) - if (!RegOpenKeyA(HKEY_CLASSES_ROOT, classname, &hkey)) { - if (!RegQueryValueExA(hkey, "NeverShowExt", 0, NULL, NULL, NULL)) - doHide = TRUE; - - RegCloseKey(hkey); - } - } - } - - if (doHide && szPath[0] != '.') - PathRemoveExtensionA (szPath); - } -} - -/************************************************************************** -* IShellFolder_fnGetDisplayNameOf -* Retrieves the display name for the specified file object or subfolder -* -* PARAMETERS -* LPCITEMIDLIST pidl, //[in ] complex pidl to item -* DWORD dwFlags, //[in ] SHGNO formatting flags -* LPSTRRET lpName) //[out] Returned display name -* -* FIXME -* if the name is in the pidl the ret value should be a STRRET_OFFSET -*/ - -static HRESULT WINAPI -IShellFolder_fnGetDisplayNameOf (IShellFolder2 * iface, LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET strRet) -{ - _ICOM_THIS_From_IShellFolder2 (IGenericSFImpl, iface) - - CHAR szPath[MAX_PATH]; - int len = 0; - BOOL bSimplePidl; - - *szPath = '\0'; - - TRACE ("(%p)->(pidl=%p,0x%08lx,%p)\n", This, pidl, dwFlags, strRet); - pdump (pidl); - - if (!pidl || !strRet) - return E_INVALIDARG; - - bSimplePidl = _ILIsPidlSimple (pidl); - - /* take names of special folders only if its only this folder */ - if (_ILIsSpecialFolder (pidl)) { - if (bSimplePidl) { - _ILSimpleGetText (pidl, szPath, MAX_PATH); /* append my own path */ - } else { - FIXME ("special pidl\n"); - } - } else { - if (!(dwFlags & SHGDN_INFOLDER) && (dwFlags & SHGDN_FORPARSING) && This->sPathTarget) { - lstrcpyA (szPath, This->sPathTarget); /* get path to root */ - PathAddBackslashA (szPath); - len = lstrlenA (szPath); - } - _ILSimpleGetText (pidl, szPath + len, MAX_PATH - len); /* append my own path */ - - if (!_ILIsFolder(pidl)) - SHELL_FS_ProcessDisplayFilename(szPath, dwFlags); - } - - if ((dwFlags & SHGDN_FORPARSING) && !bSimplePidl) { /* go deeper if needed */ - PathAddBackslashA (szPath); - len = lstrlenA (szPath); - - if (!SUCCEEDED - (SHELL32_GetDisplayNameOfChild (iface, pidl, dwFlags | SHGDN_INFOLDER, szPath + len, MAX_PATH - len))) - return E_OUTOFMEMORY; - } - strRet->uType = STRRET_CSTR; - lstrcpynA (strRet->u.cStr, szPath, MAX_PATH); - - TRACE ("-- (%p)->(%s)\n", This, szPath); - return S_OK; -} - -/************************************************************************** -* IShellFolder_fnSetNameOf -* Changes the name of a file object or subfolder, possibly changing its item -* identifier in the process. -* -* PARAMETERS -* HWND hwndOwner, //[in ] Owner window for output -* LPCITEMIDLIST pidl, //[in ] simple pidl of item to change -* LPCOLESTR lpszName, //[in ] the items new display name -* DWORD dwFlags, //[in ] SHGNO formatting flags -* LPITEMIDLIST* ppidlOut) //[out] simple pidl returned -*/ -static HRESULT WINAPI IShellFolder_fnSetNameOf (IShellFolder2 * iface, HWND hwndOwner, LPCITEMIDLIST pidl, /*simple pidl */ - LPCOLESTR lpName, DWORD dwFlags, LPITEMIDLIST * pPidlOut) -{ - _ICOM_THIS_From_IShellFolder2 (IGenericSFImpl, iface) - char szSrc[MAX_PATH], - szDest[MAX_PATH]; - int len; - BOOL bIsFolder = _ILIsFolder (ILFindLastID (pidl)); - - TRACE ("(%p)->(%p,pidl=%p,%s,%lu,%p)\n", This, hwndOwner, pidl, debugstr_w (lpName), dwFlags, pPidlOut); - - /* build source path */ - if (dwFlags & SHGDN_INFOLDER) { - strcpy (szSrc, This->sPathTarget); - PathAddBackslashA (szSrc); - len = strlen (szSrc); - _ILSimpleGetText (pidl, szSrc + len, MAX_PATH - len); - } else { - /* FIXME: Can this work with a simple PIDL? */ - SHGetPathFromIDListA (pidl, szSrc); - } - - /* build destination path */ - strcpy (szDest, This->sPathTarget); - PathAddBackslashA (szDest); - len = strlen (szDest); - WideCharToMultiByte (CP_ACP, 0, lpName, -1, szDest + len, MAX_PATH - len, NULL, NULL); - szDest[MAX_PATH - 1] = 0; - TRACE ("src=%s dest=%s\n", szSrc, szDest); - if (MoveFileA (szSrc, szDest)) { - HRESULT hr = S_OK; - - if (pPidlOut) - hr = _ILCreateFromPathA(szDest, pPidlOut); - - SHChangeNotify (bIsFolder ? SHCNE_RENAMEFOLDER : SHCNE_RENAMEITEM, SHCNF_PATHA, szSrc, szDest); - - return hr; - } - - return E_FAIL; -} - -static HRESULT WINAPI IShellFolder_fnGetDefaultSearchGUID (IShellFolder2 * iface, GUID * pguid) -{ - _ICOM_THIS_From_IShellFolder2 (IGenericSFImpl, iface) - FIXME ("(%p)\n", This); - return E_NOTIMPL; -} -static HRESULT WINAPI IShellFolder_fnEnumSearches (IShellFolder2 * iface, IEnumExtraSearch ** ppenum) -{ - _ICOM_THIS_From_IShellFolder2 (IGenericSFImpl, iface) - FIXME ("(%p)\n", This); - return E_NOTIMPL; -} -static HRESULT WINAPI -IShellFolder_fnGetDefaultColumn (IShellFolder2 * iface, DWORD dwRes, ULONG * pSort, ULONG * pDisplay) -{ - _ICOM_THIS_From_IShellFolder2 (IGenericSFImpl, iface) - - TRACE ("(%p)\n", This); - - if (pSort) - *pSort = 0; - if (pDisplay) - *pDisplay = 0; - - return S_OK; -} -static HRESULT WINAPI IShellFolder_fnGetDefaultColumnState (IShellFolder2 * iface, UINT iColumn, DWORD * pcsFlags) -{ - _ICOM_THIS_From_IShellFolder2 (IGenericSFImpl, iface) - - TRACE ("(%p)\n", This); - - if (!pcsFlags || iColumn >= GENERICSHELLVIEWCOLUMNS) - return E_INVALIDARG; - - *pcsFlags = GenericSFHeader[iColumn].pcsFlags; - - return S_OK; -} -static HRESULT WINAPI -IShellFolder_fnGetDetailsEx (IShellFolder2 * iface, LPCITEMIDLIST pidl, const SHCOLUMNID * pscid, VARIANT * pv) -{ - _ICOM_THIS_From_IShellFolder2 (IGenericSFImpl, iface) - FIXME ("(%p)\n", This); - - return E_NOTIMPL; -} -static HRESULT WINAPI -IShellFolder_fnGetDetailsOf (IShellFolder2 * iface, LPCITEMIDLIST pidl, UINT iColumn, SHELLDETAILS * psd) -{ - _ICOM_THIS_From_IShellFolder2 (IGenericSFImpl, iface) - HRESULT hr = E_FAIL; - - TRACE ("(%p)->(%p %i %p)\n", This, pidl, iColumn, psd); - - if (!psd || iColumn >= GENERICSHELLVIEWCOLUMNS) - return E_INVALIDARG; - - if (!pidl) { - /* the header titles */ - psd->fmt = GenericSFHeader[iColumn].fmt; - psd->cxChar = GenericSFHeader[iColumn].cxChar; - psd->str.uType = STRRET_CSTR; - LoadStringA (shell32_hInstance, GenericSFHeader[iColumn].colnameid, psd->str.u.cStr, MAX_PATH); - return S_OK; - } else { - /* the data from the pidl */ - switch (iColumn) { - case 0: /* name */ - hr = IShellFolder_GetDisplayNameOf (iface, pidl, SHGDN_NORMAL | SHGDN_INFOLDER, &psd->str); - break; - case 1: /* size */ - _ILGetFileSize (pidl, psd->str.u.cStr, MAX_PATH); - break; - case 2: /* type */ - _ILGetFileType (pidl, psd->str.u.cStr, MAX_PATH); - break; - case 3: /* date */ - _ILGetFileDate (pidl, psd->str.u.cStr, MAX_PATH); - break; - case 4: /* attributes */ - _ILGetFileAttributes (pidl, psd->str.u.cStr, MAX_PATH); - break; - } - hr = S_OK; - psd->str.uType = STRRET_CSTR; - } - - return hr; -} -static HRESULT WINAPI IShellFolder_fnMapColumnToSCID (IShellFolder2 * iface, UINT column, SHCOLUMNID * pscid) -{ - _ICOM_THIS_From_IShellFolder2 (IGenericSFImpl, iface) - FIXME ("(%p)\n", This); - return E_NOTIMPL; -} - -static IShellFolder2Vtbl sfvt = -{ - IShellFolder_fnQueryInterface, - IShellFolder_fnAddRef, - IShellFolder_fnRelease, - IShellFolder_fnParseDisplayName, - IShellFolder_fnEnumObjects, - IShellFolder_fnBindToObject, - IShellFolder_fnBindToStorage, - IShellFolder_fnCompareIDs, - IShellFolder_fnCreateViewObject, - IShellFolder_fnGetAttributesOf, - IShellFolder_fnGetUIObjectOf, - IShellFolder_fnGetDisplayNameOf, - IShellFolder_fnSetNameOf, - /* ShellFolder2 */ - IShellFolder_fnGetDefaultSearchGUID, - IShellFolder_fnEnumSearches, - IShellFolder_fnGetDefaultColumn, - IShellFolder_fnGetDefaultColumnState, - IShellFolder_fnGetDetailsEx, - IShellFolder_fnGetDetailsOf, - IShellFolder_fnMapColumnToSCID -}; - -/**************************************************************************** - * ISFHelper for IShellFolder implementation - */ - -static HRESULT WINAPI ISFHelper_fnQueryInterface (ISFHelper * iface, REFIID riid, LPVOID * ppvObj) -{ - _ICOM_THIS_From_ISFHelper (IGenericSFImpl, iface); - - TRACE ("(%p)->(count=%lu)\n", This, This->ref); - - return IUnknown_QueryInterface (This->pUnkOuter, riid, ppvObj); -} - -static ULONG WINAPI ISFHelper_fnAddRef (ISFHelper * iface) -{ - _ICOM_THIS_From_ISFHelper (IGenericSFImpl, iface); - - TRACE ("(%p)->(count=%lu)\n", This, This->ref); - - return IUnknown_AddRef (This->pUnkOuter); -} - -static ULONG WINAPI ISFHelper_fnRelease (ISFHelper * iface) -{ - _ICOM_THIS_From_ISFHelper (IGenericSFImpl, iface); - - TRACE ("(%p)\n", This); - - return IUnknown_Release (This->pUnkOuter); -} - -/**************************************************************************** - * ISFHelper_fnAddFolder - * - * creates a unique folder name - */ - -static HRESULT WINAPI ISFHelper_fnGetUniqueName (ISFHelper * iface, LPSTR lpName, UINT uLen) -{ - _ICOM_THIS_From_ISFHelper (IGenericSFImpl, iface) - IEnumIDList *penum; - HRESULT hr; - char szText[MAX_PATH]; - char *szNewFolder = "New Folder"; - - TRACE ("(%p)(%s %u)\n", This, lpName, uLen); - - if (uLen < strlen (szNewFolder) + 4) - return E_POINTER; - - strcpy (lpName, szNewFolder); - - hr = IShellFolder_fnEnumObjects (_IShellFolder2_ (This), 0, - SHCONTF_FOLDERS | SHCONTF_NONFOLDERS | SHCONTF_INCLUDEHIDDEN, &penum); - if (penum) { - LPITEMIDLIST pidl; - DWORD dwFetched; - int i = 1; - - next:IEnumIDList_Reset (penum); - while (S_OK == IEnumIDList_Next (penum, 1, &pidl, &dwFetched) && dwFetched) { - _ILSimpleGetText (pidl, szText, MAX_PATH); - if (0 == strcasecmp (szText, lpName)) { - sprintf (lpName, "%s %d", szNewFolder, i++); - if (i > 99) { - hr = E_FAIL; - break; - } - goto next; - } - } - - IEnumIDList_Release (penum); - } - return hr; -} - -/**************************************************************************** - * ISFHelper_fnAddFolder - * - * adds a new folder. - */ - -static HRESULT WINAPI ISFHelper_fnAddFolder (ISFHelper * iface, HWND hwnd, LPCSTR lpName, LPITEMIDLIST * ppidlOut) -{ - _ICOM_THIS_From_ISFHelper (IGenericSFImpl, iface) - char lpstrNewDir[MAX_PATH]; - DWORD bRes; - HRESULT hres = E_FAIL; - - TRACE ("(%p)(%s %p)\n", This, lpName, ppidlOut); - - strcpy (lpstrNewDir, This->sPathTarget); - PathAppendA(lpstrNewDir, lpName); - - bRes = CreateDirectoryA (lpstrNewDir, NULL); - if (bRes) { - SHChangeNotify (SHCNE_MKDIR, SHCNF_PATHA, lpstrNewDir, NULL); - - hres = S_OK; - - if (ppidlOut) - hres = _ILCreateFromPathA(lpstrNewDir, ppidlOut); - } else { - char lpstrText[128 + MAX_PATH]; - char lpstrTempText[128]; - char lpstrCaption[256]; - - /* Cannot Create folder because of permissions */ - LoadStringA (shell32_hInstance, IDS_CREATEFOLDER_DENIED, lpstrTempText, sizeof (lpstrTempText)); - LoadStringA (shell32_hInstance, IDS_CREATEFOLDER_CAPTION, lpstrCaption, sizeof (lpstrCaption)); - sprintf (lpstrText, lpstrTempText, lpstrNewDir); - MessageBoxA (hwnd, lpstrText, lpstrCaption, MB_OK | MB_ICONEXCLAMATION); - } - - return hres; -} - -/**************************************************************************** - * ISFHelper_fnDeleteItems - * - * deletes items in folder - */ -static HRESULT WINAPI ISFHelper_fnDeleteItems (ISFHelper * iface, UINT cidl, LPCITEMIDLIST * apidl) -{ - _ICOM_THIS_From_ISFHelper (IGenericSFImpl, iface) - UINT i; - char szPath[MAX_PATH]; - BOOL bConfirm = TRUE; - - TRACE ("(%p)(%u %p)\n", This, cidl, apidl); - - /* deleting multiple items so give a slightly different warning */ - if (cidl != 1) { - char tmp[8]; - - snprintf (tmp, sizeof (tmp), "%d", cidl); - if (!SHELL_ConfirmDialog(ASK_DELETE_MULTIPLE_ITEM, tmp)) - return E_FAIL; - bConfirm = FALSE; - } - - for (i = 0; i < cidl; i++) { - strcpy (szPath, This->sPathTarget); - PathAddBackslashA (szPath); - _ILSimpleGetText (apidl[i], szPath + strlen (szPath), MAX_PATH); - - if (_ILIsFolder (apidl[i])) { - LPITEMIDLIST pidl; - - TRACE ("delete %s\n", szPath); - if (!SHELL_DeleteDirectoryA (szPath, bConfirm)) { - TRACE ("delete %s failed, bConfirm=%d\n", szPath, bConfirm); - return E_FAIL; - } - pidl = ILCombine (This->pidlRoot, apidl[i]); - SHChangeNotify (SHCNE_RMDIR, SHCNF_IDLIST, pidl, NULL); - SHFree (pidl); - } else if (_ILIsValue (apidl[i])) { - LPITEMIDLIST pidl; - - TRACE ("delete %s\n", szPath); - if (!SHELL_DeleteFileA (szPath, bConfirm)) { - TRACE ("delete %s failed, bConfirm=%d\n", szPath, bConfirm); - return E_FAIL; - } - pidl = ILCombine (This->pidlRoot, apidl[i]); - SHChangeNotify (SHCNE_DELETE, SHCNF_IDLIST, pidl, NULL); - SHFree (pidl); - } - - } - return S_OK; -} - -/**************************************************************************** - * ISFHelper_fnCopyItems - * - * copies items to this folder - */ -static HRESULT WINAPI -ISFHelper_fnCopyItems (ISFHelper * iface, IShellFolder * pSFFrom, UINT cidl, LPCITEMIDLIST * apidl) -{ - UINT i; - IPersistFolder2 *ppf2 = NULL; - char szSrcPath[MAX_PATH], - szDstPath[MAX_PATH]; - - _ICOM_THIS_From_ISFHelper (IGenericSFImpl, iface); - - TRACE ("(%p)->(%p,%u,%p)\n", This, pSFFrom, cidl, apidl); - - IShellFolder_QueryInterface (pSFFrom, &IID_IPersistFolder2, (LPVOID *) & ppf2); - if (ppf2) { - LPITEMIDLIST pidl; - - if (SUCCEEDED (IPersistFolder2_GetCurFolder (ppf2, &pidl))) { - for (i = 0; i < cidl; i++) { - SHGetPathFromIDListA (pidl, szSrcPath); - PathAddBackslashA (szSrcPath); - _ILSimpleGetText (apidl[i], szSrcPath + strlen (szSrcPath), MAX_PATH); - - strcpy (szDstPath, This->sPathTarget); - PathAddBackslashA (szDstPath); - _ILSimpleGetText (apidl[i], szDstPath + strlen (szDstPath), MAX_PATH); - MESSAGE ("would copy %s to %s\n", szSrcPath, szDstPath); - } - SHFree (pidl); - } - IPersistFolder2_Release (ppf2); - } - return S_OK; -} - -static ISFHelperVtbl shvt = -{ - ISFHelper_fnQueryInterface, - ISFHelper_fnAddRef, - ISFHelper_fnRelease, - ISFHelper_fnGetUniqueName, - ISFHelper_fnAddFolder, - ISFHelper_fnDeleteItems, - ISFHelper_fnCopyItems -}; - -/************************************************************************ - * IFSFldr_PersistFolder3_QueryInterface - * - */ -static HRESULT WINAPI IFSFldr_PersistFolder3_QueryInterface (IPersistFolder3 * iface, REFIID iid, LPVOID * ppvObj) -{ - _ICOM_THIS_From_IPersistFolder3 (IGenericSFImpl, iface); - - TRACE ("(%p)\n", This); - - return IUnknown_QueryInterface (This->pUnkOuter, iid, ppvObj); -} - -/************************************************************************ - * IFSFldr_PersistFolder3_AddRef - * - */ -static ULONG WINAPI IFSFldr_PersistFolder3_AddRef (IPersistFolder3 * iface) -{ - _ICOM_THIS_From_IPersistFolder3 (IGenericSFImpl, iface); - - TRACE ("(%p)->(count=%lu)\n", This, This->ref); - - return IUnknown_AddRef (This->pUnkOuter); -} - -/************************************************************************ - * IFSFldr_PersistFolder3_Release - * - */ -static ULONG WINAPI IFSFldr_PersistFolder3_Release (IPersistFolder3 * iface) -{ - _ICOM_THIS_From_IPersistFolder3 (IGenericSFImpl, iface); - - TRACE ("(%p)->(count=%lu)\n", This, This->ref); - - return IUnknown_Release (This->pUnkOuter); -} - -/************************************************************************ - * IFSFldr_PersistFolder3_GetClassID - */ -static HRESULT WINAPI IFSFldr_PersistFolder3_GetClassID (IPersistFolder3 * iface, CLSID * lpClassId) -{ - _ICOM_THIS_From_IPersistFolder3 (IGenericSFImpl, iface); - - TRACE ("(%p)\n", This); - - if (!lpClassId) - return E_POINTER; - *lpClassId = *This->pclsid; - - return S_OK; -} - -/************************************************************************ - * IFSFldr_PersistFolder3_Initialize - * - * NOTES - * sPathTarget is not set. Don't know how to handle in a non rooted environment. - */ -static HRESULT WINAPI IFSFldr_PersistFolder3_Initialize (IPersistFolder3 * iface, LPCITEMIDLIST pidl) -{ - char sTemp[MAX_PATH]; - - _ICOM_THIS_From_IPersistFolder3 (IGenericSFImpl, iface); - - TRACE ("(%p)->(%p)\n", This, pidl); - - if (This->pidlRoot) - SHFree (This->pidlRoot); /* free the old pidl */ - This->pidlRoot = ILClone (pidl); /* set my pidl */ - - if (This->sPathTarget) - SHFree (This->sPathTarget); - - /* set my path */ - if (SHGetPathFromIDListA (pidl, sTemp)) { - This->sPathTarget = SHAlloc (strlen (sTemp) + 1); - strcpy (This->sPathTarget, sTemp); - } - - TRACE ("--(%p)->(%s)\n", This, This->sPathTarget); - return S_OK; -} - -/************************************************************************** - * IFSFldr_PersistFolder3_GetCurFolder - */ -static HRESULT WINAPI IFSFldr_PersistFolder3_fnGetCurFolder (IPersistFolder3 * iface, LPITEMIDLIST * pidl) -{ - _ICOM_THIS_From_IPersistFolder3 (IGenericSFImpl, iface); - - TRACE ("(%p)->(%p)\n", This, pidl); - - if (!pidl) return E_POINTER; - *pidl = ILClone (This->pidlRoot); - return S_OK; -} - -/************************************************************************** - * IFSFldr_PersistFolder3_InitializeEx - * - * FIXME: errorhandling - */ -static HRESULT WINAPI -IFSFldr_PersistFolder3_InitializeEx (IPersistFolder3 * iface, - IBindCtx * pbc, LPCITEMIDLIST pidlRoot, const PERSIST_FOLDER_TARGET_INFO * ppfti) -{ - char sTemp[MAX_PATH]; - - _ICOM_THIS_From_IPersistFolder3 (IGenericSFImpl, iface); - - TRACE ("(%p)->(%p,%p,%p)\n", This, pbc, pidlRoot, ppfti); - if (ppfti) - TRACE ("--%p %s %s 0x%08lx 0x%08x\n", - ppfti->pidlTargetFolder, debugstr_w (ppfti->szTargetParsingName), - debugstr_w (ppfti->szNetworkProvider), ppfti->dwAttributes, ppfti->csidl); - - pdump (pidlRoot); - if (ppfti && ppfti->pidlTargetFolder) - pdump (ppfti->pidlTargetFolder); - - if (This->pidlRoot) - __SHFreeAndNil (&This->pidlRoot); /* free the old */ - if (This->sPathTarget) - __SHFreeAndNil (&This->sPathTarget); - - /* - * Root path and pidl - */ - This->pidlRoot = ILClone (pidlRoot); - - /* - * the target folder is spezified in csidl OR pidlTargetFolder OR szTargetParsingName - */ - if (ppfti) { - if (ppfti->csidl != -1) { - if (SHGetSpecialFolderPathA (0, sTemp, ppfti->csidl, ppfti->csidl & CSIDL_FLAG_CREATE)) { - __SHCloneStrA (&This->sPathTarget, sTemp); - } - } else if (ppfti->szTargetParsingName[0]) { - __SHCloneStrWtoA (&This->sPathTarget, ppfti->szTargetParsingName); - } else if (ppfti->pidlTargetFolder) { - if (SHGetPathFromIDListA (ppfti->pidlTargetFolder, sTemp)) { - __SHCloneStrA (&This->sPathTarget, sTemp); - } - } - } - - TRACE ("--(%p)->(target=%s)\n", This, debugstr_a (This->sPathTarget)); - pdump (This->pidlRoot); - return (This->sPathTarget) ? S_OK : E_FAIL; -} - -static HRESULT WINAPI -IFSFldr_PersistFolder3_GetFolderTargetInfo (IPersistFolder3 * iface, PERSIST_FOLDER_TARGET_INFO * ppfti) -{ - _ICOM_THIS_From_IPersistFolder3 (IGenericSFImpl, iface); - FIXME ("(%p)->(%p)\n", This, ppfti); - ZeroMemory (ppfti, sizeof (ppfti)); - return E_NOTIMPL; -} - -static IPersistFolder3Vtbl vt_FSFldr_PersistFolder3 = -{ - IFSFldr_PersistFolder3_QueryInterface, - IFSFldr_PersistFolder3_AddRef, - IFSFldr_PersistFolder3_Release, - IFSFldr_PersistFolder3_GetClassID, - IFSFldr_PersistFolder3_Initialize, - IFSFldr_PersistFolder3_fnGetCurFolder, - IFSFldr_PersistFolder3_InitializeEx, - IFSFldr_PersistFolder3_GetFolderTargetInfo -}; - -/**************************************************************************** - * ISFDropTarget implementation - */ -static BOOL ISFDropTarget_QueryDrop (IDropTarget * iface, DWORD dwKeyState, LPDWORD pdwEffect) -{ - DWORD dwEffect = *pdwEffect; - - _ICOM_THIS_From_IDropTarget (IGenericSFImpl, iface); - - *pdwEffect = DROPEFFECT_NONE; - - if (This->fAcceptFmt) { /* Does our interpretation of the keystate ... */ - *pdwEffect = KeyStateToDropEffect (dwKeyState); - - /* ... matches the desired effect ? */ - if (dwEffect & *pdwEffect) { - return TRUE; - } - } - return FALSE; -} - -static HRESULT WINAPI ISFDropTarget_QueryInterface (IDropTarget * iface, REFIID riid, LPVOID * ppvObj) -{ - _ICOM_THIS_From_IDropTarget (IGenericSFImpl, iface); - - TRACE ("(%p)\n", This); - - return IUnknown_QueryInterface (This->pUnkOuter, riid, ppvObj); -} - -static ULONG WINAPI ISFDropTarget_AddRef (IDropTarget * iface) -{ - _ICOM_THIS_From_IDropTarget (IGenericSFImpl, iface); - - TRACE ("(%p)\n", This); - - return IUnknown_AddRef (This->pUnkOuter); -} - -static ULONG WINAPI ISFDropTarget_Release (IDropTarget * iface) -{ - _ICOM_THIS_From_IDropTarget (IGenericSFImpl, iface); - - TRACE ("(%p)\n", This); - - return IUnknown_Release (This->pUnkOuter); -} - -static HRESULT WINAPI -ISFDropTarget_DragEnter (IDropTarget * iface, IDataObject * pDataObject, DWORD dwKeyState, POINTL pt, DWORD * pdwEffect) -{ - FORMATETC fmt; - - _ICOM_THIS_From_IDropTarget (IGenericSFImpl, iface); - - TRACE ("(%p)->(DataObject=%p)\n", This, pDataObject); - - InitFormatEtc (fmt, This->cfShellIDList, TYMED_HGLOBAL); - - This->fAcceptFmt = (S_OK == IDataObject_QueryGetData (pDataObject, &fmt)) ? TRUE : FALSE; - - ISFDropTarget_QueryDrop (iface, dwKeyState, pdwEffect); - - return S_OK; -} - -static HRESULT WINAPI ISFDropTarget_DragOver (IDropTarget * iface, DWORD dwKeyState, POINTL pt, DWORD * pdwEffect) -{ - _ICOM_THIS_From_IDropTarget (IGenericSFImpl, iface); - - TRACE ("(%p)\n", This); - - if (!pdwEffect) - return E_INVALIDARG; - - ISFDropTarget_QueryDrop (iface, dwKeyState, pdwEffect); - - return S_OK; -} - -static HRESULT WINAPI ISFDropTarget_DragLeave (IDropTarget * iface) -{ - _ICOM_THIS_From_IDropTarget (IGenericSFImpl, iface); - - TRACE ("(%p)\n", This); - - This->fAcceptFmt = FALSE; - - return S_OK; -} - -static HRESULT WINAPI -ISFDropTarget_Drop (IDropTarget * iface, IDataObject * pDataObject, DWORD dwKeyState, POINTL pt, DWORD * pdwEffect) -{ - _ICOM_THIS_From_IDropTarget (IGenericSFImpl, iface); - - FIXME ("(%p) object dropped\n", This); - - return E_NOTIMPL; -} - -static struct IDropTargetVtbl dtvt = { - ISFDropTarget_QueryInterface, - ISFDropTarget_AddRef, - ISFDropTarget_Release, - ISFDropTarget_DragEnter, - ISFDropTarget_DragOver, - ISFDropTarget_DragLeave, - ISFDropTarget_Drop -}; + +/* + * file system folder + * + * Copyright 1997 Marcus Meissner + * Copyright 1998, 1999, 2002 Juergen Schmied + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" +#include "wine/port.h" + +#include +#include +#include +#include + +#define COBJMACROS +#define NONAMELESSUNION +#define NONAMELESSSTRUCT + +#include "winerror.h" +#include "windef.h" +#include "winbase.h" +#include "winreg.h" +#include "wingdi.h" +#include "winuser.h" + +#include "ole2.h" +#include "shlguid.h" + +#include "enumidlist.h" +#include "pidl.h" +#include "undocshell.h" +#include "shell32_main.h" +#include "shresdef.h" +#include "shlwapi.h" +#include "shellfolder.h" +#include "wine/debug.h" +#include "debughlp.h" +#include "shfldr.h" + +WINE_DEFAULT_DEBUG_CHANNEL (shell); + +/*********************************************************************** +* IShellFolder implementation +*/ + +typedef struct { + IUnknownVtbl *lpVtbl; + DWORD ref; + IShellFolder2Vtbl *lpvtblShellFolder; + IPersistFolder3Vtbl *lpvtblPersistFolder3; + IDropTargetVtbl *lpvtblDropTarget; + ISFHelperVtbl *lpvtblSFHelper; + + IUnknown *pUnkOuter; /* used for aggregation */ + + CLSID *pclsid; + + /* both paths are parsible from the desktop */ + LPSTR sPathTarget; /* complete path to target used for enumeration and ChangeNotify */ + + LPITEMIDLIST pidlRoot; /* absolute pidl */ + + int dwAttributes; /* attributes returned by GetAttributesOf FIXME: use it */ + + UINT cfShellIDList; /* clipboardformat for IDropTarget */ + BOOL fAcceptFmt; /* flag for pending Drop */ +} IGenericSFImpl; + +static struct IUnknownVtbl unkvt; +static struct IShellFolder2Vtbl sfvt; +static struct IPersistFolder3Vtbl vt_FSFldr_PersistFolder3; /* IPersistFolder3 for a FS_Folder */ +static struct IDropTargetVtbl dtvt; +static struct ISFHelperVtbl shvt; + +#define _IShellFolder2_Offset ((int)(&(((IGenericSFImpl*)0)->lpvtblShellFolder))) +#define _ICOM_THIS_From_IShellFolder2(class, name) class* This = (class*)(((char*)name)-_IShellFolder2_Offset); + +#define _IPersistFolder2_Offset ((int)(&(((IGenericSFImpl*)0)->lpvtblPersistFolder3))) +#define _ICOM_THIS_From_IPersistFolder2(class, name) class* This = (class*)(((char*)name)-_IPersistFolder2_Offset); + +#define _IPersistFolder3_Offset ((int)(&(((IGenericSFImpl*)0)->lpvtblPersistFolder3))) +#define _ICOM_THIS_From_IPersistFolder3(class, name) class* This = (class*)(((char*)name)-_IPersistFolder3_Offset); + +#define _IDropTarget_Offset ((int)(&(((IGenericSFImpl*)0)->lpvtblDropTarget))) +#define _ICOM_THIS_From_IDropTarget(class, name) class* This = (class*)(((char*)name)-_IDropTarget_Offset); + +#define _ISFHelper_Offset ((int)(&(((IGenericSFImpl*)0)->lpvtblSFHelper))) +#define _ICOM_THIS_From_ISFHelper(class, name) class* This = (class*)(((char*)name)-_ISFHelper_Offset); + +/* + converts This to a interface pointer +*/ +#define _IUnknown_(This) (IUnknown*)&(This->lpVtbl) +#define _IShellFolder_(This) (IShellFolder*)&(This->lpvtblShellFolder) +#define _IShellFolder2_(This) (IShellFolder2*)&(This->lpvtblShellFolder) +#define _IPersist_(This) (IPersist*)&(This->lpvtblPersistFolder3) +#define _IPersistFolder_(This) (IPersistFolder*)&(This->lpvtblPersistFolder3) +#define _IPersistFolder2_(This) (IPersistFolder2*)&(This->lpvtblPersistFolder3) +#define _IPersistFolder3_(This) (IPersistFolder3*)&(This->lpvtblPersistFolder3) +#define _IDropTarget_(This) (IDropTarget*)&(This->lpvtblDropTarget) +#define _ISFHelper_(This) (ISFHelper*)&(This->lpvtblSFHelper) + +/************************************************************************** +* registers clipboardformat once +*/ +static void SF_RegisterClipFmt (IGenericSFImpl * This) +{ + TRACE ("(%p)\n", This); + + if (!This->cfShellIDList) { + This->cfShellIDList = RegisterClipboardFormatA (CFSTR_SHELLIDLIST); + } +} + +/************************************************************************** +* we need a separate IUnknown to handle aggregation +* (inner IUnknown) +*/ +static HRESULT WINAPI IUnknown_fnQueryInterface (IUnknown * iface, REFIID riid, LPVOID * ppvObj) +{ + IGenericSFImpl *This = (IGenericSFImpl *)iface; + + TRACE ("(%p)->(%s,%p)\n", This, shdebugstr_guid (riid), ppvObj); + + *ppvObj = NULL; + + if (IsEqualIID (riid, &IID_IUnknown)) + *ppvObj = _IUnknown_ (This); + else if (IsEqualIID (riid, &IID_IShellFolder)) + *ppvObj = _IShellFolder_ (This); + else if (IsEqualIID (riid, &IID_IShellFolder2)) + *ppvObj = _IShellFolder_ (This); + else if (IsEqualIID (riid, &IID_IPersist)) + *ppvObj = _IPersist_ (This); + else if (IsEqualIID (riid, &IID_IPersistFolder)) + *ppvObj = _IPersistFolder_ (This); + else if (IsEqualIID (riid, &IID_IPersistFolder2)) + *ppvObj = _IPersistFolder2_ (This); + else if (IsEqualIID (riid, &IID_IPersistFolder3)) + *ppvObj = _IPersistFolder3_ (This); + else if (IsEqualIID (riid, &IID_ISFHelper)) + *ppvObj = _ISFHelper_ (This); + else if (IsEqualIID (riid, &IID_IDropTarget)) { + *ppvObj = _IDropTarget_ (This); + SF_RegisterClipFmt (This); + } + + if (*ppvObj) { + IUnknown_AddRef ((IUnknown *) (*ppvObj)); + TRACE ("-- Interface = %p\n", *ppvObj); + return S_OK; + } + TRACE ("-- Interface: E_NOINTERFACE\n"); + return E_NOINTERFACE; +} + +static ULONG WINAPI IUnknown_fnAddRef (IUnknown * iface) +{ + IGenericSFImpl *This = (IGenericSFImpl *)iface; + + TRACE ("(%p)->(count=%lu)\n", This, This->ref); + + return ++(This->ref); +} + +static ULONG WINAPI IUnknown_fnRelease (IUnknown * iface) +{ + IGenericSFImpl *This = (IGenericSFImpl *)iface; + + TRACE ("(%p)->(count=%lu)\n", This, This->ref); + + if (!--(This->ref)) { + TRACE ("-- destroying IShellFolder(%p)\n", This); + + if (This->pidlRoot) + SHFree (This->pidlRoot); + if (This->sPathTarget) + SHFree (This->sPathTarget); + LocalFree ((HLOCAL) This); + return 0; + } + return This->ref; +} + +static IUnknownVtbl unkvt = +{ + IUnknown_fnQueryInterface, + IUnknown_fnAddRef, + IUnknown_fnRelease, +}; + +static shvheader GenericSFHeader[] = { + {IDS_SHV_COLUMN1, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 15}, + {IDS_SHV_COLUMN2, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10}, + {IDS_SHV_COLUMN3, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10}, + {IDS_SHV_COLUMN4, SHCOLSTATE_TYPE_DATE | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 12}, + {IDS_SHV_COLUMN5, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 5} +}; + +#define GENERICSHELLVIEWCOLUMNS 5 + +/************************************************************************** +* IFSFolder_Constructor +* +* NOTES +* creating undocumented ShellFS_Folder as part of an aggregation +* {F3364BA0-65B9-11CE-A9BA-00AA004AE837} +* +*/ +HRESULT WINAPI IFSFolder_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv) +{ + IGenericSFImpl *sf; + + TRACE ("unkOut=%p %s\n", pUnkOuter, shdebugstr_guid (riid)); + + if (pUnkOuter && !IsEqualIID (riid, &IID_IUnknown)) + return CLASS_E_NOAGGREGATION; + sf = (IGenericSFImpl *) LocalAlloc (GMEM_ZEROINIT, sizeof (IGenericSFImpl)); + if (!sf) + return E_OUTOFMEMORY; + + sf->ref = 0; + sf->lpVtbl = &unkvt; + sf->lpvtblShellFolder = &sfvt; + sf->lpvtblPersistFolder3 = &vt_FSFldr_PersistFolder3; + sf->lpvtblDropTarget = &dtvt; + sf->lpvtblSFHelper = &shvt; + sf->pclsid = (CLSID *) & CLSID_ShellFSFolder; + sf->pUnkOuter = pUnkOuter ? pUnkOuter : _IUnknown_ (sf); + + if (!SUCCEEDED (IUnknown_QueryInterface (_IUnknown_ (sf), riid, ppv))) { + IUnknown_Release (_IUnknown_ (sf)); + return E_NOINTERFACE; + } + + TRACE ("--%p\n", *ppv); + return S_OK; +} + +/************************************************************************** + * IShellFolder_fnQueryInterface + * + * PARAMETERS + * REFIID riid [in ] Requested InterfaceID + * LPVOID* ppvObject [out] Interface* to hold the result + */ +static HRESULT WINAPI IShellFolder_fnQueryInterface (IShellFolder2 * iface, REFIID riid, LPVOID * ppvObj) +{ + _ICOM_THIS_From_IShellFolder2 (IGenericSFImpl, iface) + + TRACE ("(%p)->(%s,%p)\n", This, shdebugstr_guid (riid), ppvObj); + + return IUnknown_QueryInterface (This->pUnkOuter, riid, ppvObj); +} + +/************************************************************************** +* IShellFolder_AddRef +*/ + +static ULONG WINAPI IShellFolder_fnAddRef (IShellFolder2 * iface) +{ + _ICOM_THIS_From_IShellFolder2 (IGenericSFImpl, iface) + + TRACE ("(%p)->(count=%lu)\n", This, This->ref); + + return IUnknown_AddRef (This->pUnkOuter); +} + +/************************************************************************** + * IShellFolder_fnRelease + */ +static ULONG WINAPI IShellFolder_fnRelease (IShellFolder2 * iface) +{ + _ICOM_THIS_From_IShellFolder2 (IGenericSFImpl, iface) + + TRACE ("(%p)->(count=%lu)\n", This, This->ref); + + return IUnknown_Release (This->pUnkOuter); +} + +/************************************************************************** +* IShellFolder_ParseDisplayName {SHELL32} +* +* Parse a display name. +* +* PARAMS +* hwndOwner [in] Parent window for any message's +* pbc [in] optional FileSystemBindData context +* lpszDisplayName [in] Unicode displayname. +* pchEaten [out] (unicode) characters processed +* ppidl [out] complex pidl to item +* pdwAttributes [out] items attributes +* +* NOTES +* Every folder tries to parse only its own (the leftmost) pidl and creates a +* subfolder to evaluate the remaining parts. +* Now we can parse into namespaces implemented by shell extensions +* +* Behaviour on win98: lpszDisplayName=NULL -> crash +* lpszDisplayName="" -> returns mycoputer-pidl +* +* FIXME +* pdwAttributes is not set +* pchEaten is not set like in windows +*/ +static HRESULT WINAPI +IShellFolder_fnParseDisplayName (IShellFolder2 * iface, + HWND hwndOwner, + LPBC pbc, + LPOLESTR lpszDisplayName, + DWORD * pchEaten, LPITEMIDLIST * ppidl, DWORD * pdwAttributes) +{ + _ICOM_THIS_From_IShellFolder2 (IGenericSFImpl, iface) + + HRESULT hr = E_INVALIDARG; + LPCWSTR szNext = NULL; + WCHAR szElement[MAX_PATH]; + CHAR szPath[MAX_PATH]; + LPITEMIDLIST pidlTemp = NULL; + DWORD len; + + TRACE ("(%p)->(HWND=%p,%p,%p=%s,%p,pidl=%p,%p)\n", + This, hwndOwner, pbc, lpszDisplayName, debugstr_w (lpszDisplayName), pchEaten, ppidl, pdwAttributes); + + if (!lpszDisplayName || !ppidl) + return E_INVALIDARG; + + if (pchEaten) + *pchEaten = 0; /* strange but like the original */ + + if (*lpszDisplayName) { + /* get the next element */ + szNext = GetNextElementW (lpszDisplayName, szElement, MAX_PATH); + + /* build the full pathname to the element */ + lstrcpyA(szPath, This->sPathTarget); + PathAddBackslashA(szPath); + len = lstrlenA(szPath); + WideCharToMultiByte(CP_ACP, 0, szElement, -1, szPath + len, MAX_PATH - len, NULL, NULL); + + /* get the pidl */ + hr = _ILCreateFromPathA(szPath, &pidlTemp); + + if (SUCCEEDED(hr)) { + if (szNext && *szNext) { + /* try to analyse the next element */ + hr = SHELL32_ParseNextElement (iface, hwndOwner, pbc, &pidlTemp, (LPOLESTR) szNext, pchEaten, pdwAttributes); + } else { + /* it's the last element */ + if (pdwAttributes && *pdwAttributes) { + hr = SHELL32_GetItemAttributes (_IShellFolder_ (This), pidlTemp, pdwAttributes); + } + } + } + } + + if (SUCCEEDED(hr)) + *ppidl = pidlTemp; + else + *ppidl = NULL; + + TRACE ("(%p)->(-- pidl=%p ret=0x%08lx)\n", This, ppidl ? *ppidl : 0, hr); + + return hr; +} + +/************************************************************************** +* IShellFolder_fnEnumObjects +* PARAMETERS +* HWND hwndOwner, //[in ] Parent Window +* DWORD grfFlags, //[in ] SHCONTF enumeration mask +* LPENUMIDLIST* ppenumIDList //[out] IEnumIDList interface +*/ +static HRESULT WINAPI +IShellFolder_fnEnumObjects (IShellFolder2 * iface, HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST * ppEnumIDList) +{ + _ICOM_THIS_From_IShellFolder2 (IGenericSFImpl, iface) + + TRACE ("(%p)->(HWND=%p flags=0x%08lx pplist=%p)\n", This, hwndOwner, dwFlags, ppEnumIDList); + + *ppEnumIDList = IEnumIDList_Constructor(); + if (*ppEnumIDList) + CreateFolderEnumList(*ppEnumIDList, This->sPathTarget, dwFlags); + + TRACE ("-- (%p)->(new ID List: %p)\n", This, *ppEnumIDList); + + return *ppEnumIDList ? S_OK : E_OUTOFMEMORY; +} + +/************************************************************************** +* IShellFolder_fnBindToObject +* PARAMETERS +* LPCITEMIDLIST pidl, //[in ] relative pidl to open +* LPBC pbc, //[in ] optional FileSystemBindData context +* REFIID riid, //[in ] Initial Interface +* LPVOID* ppvObject //[out] Interface* +*/ +static HRESULT WINAPI +IShellFolder_fnBindToObject (IShellFolder2 * iface, LPCITEMIDLIST pidl, LPBC pbc, REFIID riid, LPVOID * ppvOut) +{ + _ICOM_THIS_From_IShellFolder2 (IGenericSFImpl, iface) + + TRACE ("(%p)->(pidl=%p,%p,%s,%p)\n", This, pidl, pbc, shdebugstr_guid (riid), ppvOut); + + return SHELL32_BindToChild (This->pidlRoot, This->sPathTarget, pidl, riid, ppvOut); +} + +/************************************************************************** +* IShellFolder_fnBindToStorage +* PARAMETERS +* LPCITEMIDLIST pidl, //[in ] complex pidl to store +* LPBC pbc, //[in ] reserved +* REFIID riid, //[in ] Initial storage interface +* LPVOID* ppvObject //[out] Interface* returned +*/ +static HRESULT WINAPI +IShellFolder_fnBindToStorage (IShellFolder2 * iface, LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID * ppvOut) +{ + _ICOM_THIS_From_IShellFolder2 (IGenericSFImpl, iface) + + FIXME ("(%p)->(pidl=%p,%p,%s,%p) stub\n", This, pidl, pbcReserved, shdebugstr_guid (riid), ppvOut); + + *ppvOut = NULL; + return E_NOTIMPL; +} + +/************************************************************************** +* IShellFolder_fnCompareIDs +*/ + +static HRESULT WINAPI +IShellFolder_fnCompareIDs (IShellFolder2 * iface, LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) +{ + _ICOM_THIS_From_IShellFolder2 (IGenericSFImpl, iface) + + int nReturn; + + TRACE ("(%p)->(0x%08lx,pidl1=%p,pidl2=%p)\n", This, lParam, pidl1, pidl2); + nReturn = SHELL32_CompareIDs (_IShellFolder_ (This), lParam, pidl1, pidl2); + TRACE ("-- %i\n", nReturn); + return nReturn; +} + +/************************************************************************** +* IShellFolder_fnCreateViewObject +*/ +static HRESULT WINAPI +IShellFolder_fnCreateViewObject (IShellFolder2 * iface, HWND hwndOwner, REFIID riid, LPVOID * ppvOut) +{ + _ICOM_THIS_From_IShellFolder2 (IGenericSFImpl, iface) + + LPSHELLVIEW pShellView; + HRESULT hr = E_INVALIDARG; + + TRACE ("(%p)->(hwnd=%p,%s,%p)\n", This, hwndOwner, shdebugstr_guid (riid), ppvOut); + + if (ppvOut) { + *ppvOut = NULL; + + if (IsEqualIID (riid, &IID_IDropTarget)) { + hr = IShellFolder_QueryInterface (iface, &IID_IDropTarget, ppvOut); + } else if (IsEqualIID (riid, &IID_IContextMenu)) { + FIXME ("IContextMenu not implemented\n"); + hr = E_NOTIMPL; + } else if (IsEqualIID (riid, &IID_IShellView)) { + pShellView = IShellView_Constructor ((IShellFolder *) iface); + if (pShellView) { + hr = IShellView_QueryInterface (pShellView, riid, ppvOut); + IShellView_Release (pShellView); + } + } + } + TRACE ("-- (%p)->(interface=%p)\n", This, ppvOut); + return hr; +} + +/************************************************************************** +* IShellFolder_fnGetAttributesOf +* +* PARAMETERS +* UINT cidl, //[in ] num elements in pidl array +* LPCITEMIDLIST* apidl, //[in ] simple pidl array +* ULONG* rgfInOut) //[out] result array +* +*/ +static HRESULT WINAPI +IShellFolder_fnGetAttributesOf (IShellFolder2 * iface, UINT cidl, LPCITEMIDLIST * apidl, DWORD * rgfInOut) +{ + _ICOM_THIS_From_IShellFolder2 (IGenericSFImpl, iface) + + HRESULT hr = S_OK; + + TRACE ("(%p)->(cidl=%d apidl=%p mask=0x%08lx)\n", This, cidl, apidl, *rgfInOut); + + if ((!cidl) || (!apidl) || (!rgfInOut)) + return E_INVALIDARG; + + if (*rgfInOut == 0) + *rgfInOut = ~0; + + while (cidl > 0 && *apidl) { + pdump (*apidl); + SHELL32_GetItemAttributes (_IShellFolder_ (This), *apidl, rgfInOut); + apidl++; + cidl--; + } + + TRACE ("-- result=0x%08lx\n", *rgfInOut); + + return hr; +} + +/************************************************************************** +* IShellFolder_fnGetUIObjectOf +* +* PARAMETERS +* HWND hwndOwner, //[in ] Parent window for any output +* UINT cidl, //[in ] array size +* LPCITEMIDLIST* apidl, //[in ] simple pidl array +* REFIID riid, //[in ] Requested Interface +* UINT* prgfInOut, //[ ] reserved +* LPVOID* ppvObject) //[out] Resulting Interface +* +* NOTES +* This function gets asked to return "view objects" for one or more (multiple select) +* items: +* The viewobject typically is an COM object with one of the following interfaces: +* IExtractIcon,IDataObject,IContextMenu +* In order to support icon positions in the default Listview your DataObject +* must implement the SetData method (in addition to GetData :) - the shell passes +* a barely documented "Icon positions" structure to SetData when the drag starts, +* and GetData's it if the drop is in another explorer window that needs the positions. +*/ +static HRESULT WINAPI +IShellFolder_fnGetUIObjectOf (IShellFolder2 * iface, + HWND hwndOwner, + UINT cidl, LPCITEMIDLIST * apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut) +{ + _ICOM_THIS_From_IShellFolder2 (IGenericSFImpl, iface) + + LPITEMIDLIST pidl; + IUnknown *pObj = NULL; + HRESULT hr = E_INVALIDARG; + + TRACE ("(%p)->(%p,%u,apidl=%p,%s,%p,%p)\n", + This, hwndOwner, cidl, apidl, shdebugstr_guid (riid), prgfInOut, ppvOut); + + if (ppvOut) { + *ppvOut = NULL; + + if (IsEqualIID (riid, &IID_IContextMenu) && (cidl >= 1)) { + pObj = (LPUNKNOWN) ISvItemCm_Constructor ((IShellFolder *) iface, This->pidlRoot, apidl, cidl); + hr = S_OK; + } else if (IsEqualIID (riid, &IID_IDataObject) && (cidl >= 1)) { + pObj = (LPUNKNOWN) IDataObject_Constructor (hwndOwner, This->pidlRoot, apidl, cidl); + hr = S_OK; + } else if (IsEqualIID (riid, &IID_IExtractIconA) && (cidl == 1)) { + pidl = ILCombine (This->pidlRoot, apidl[0]); + pObj = (LPUNKNOWN) IExtractIconA_Constructor (pidl); + SHFree (pidl); + hr = S_OK; + } else if (IsEqualIID (riid, &IID_IExtractIconW) && (cidl == 1)) { + pidl = ILCombine (This->pidlRoot, apidl[0]); + pObj = (LPUNKNOWN) IExtractIconW_Constructor (pidl); + SHFree (pidl); + hr = S_OK; + } else if (IsEqualIID (riid, &IID_IDropTarget) && (cidl >= 1)) { + hr = IShellFolder_QueryInterface (iface, &IID_IDropTarget, (LPVOID *) & pObj); + } else if ((IsEqualIID(riid,&IID_IShellLinkW) || IsEqualIID(riid,&IID_IShellLinkA)) + && (cidl == 1)) { + pidl = ILCombine (This->pidlRoot, apidl[0]); + hr = IShellLink_ConstructFromFile(NULL, riid, pidl, (LPVOID*)&pObj); + SHFree (pidl); + } else { + hr = E_NOINTERFACE; + } + + if (SUCCEEDED(hr) && !pObj) + hr = E_OUTOFMEMORY; + + *ppvOut = pObj; + } + TRACE ("(%p)->hr=0x%08lx\n", This, hr); + return hr; +} + +void SHELL_FS_ProcessDisplayFilename(LPSTR szPath, DWORD dwFlags) +{ + /*FIXME: MSDN also mentions SHGDN_FOREDITING which is not yet handled. */ + if (!(dwFlags & SHGDN_FORPARSING) && + ((dwFlags & SHGDN_INFOLDER) || (dwFlags == SHGDN_NORMAL))) { + HKEY hKey; + DWORD dwData; + DWORD dwDataSize = sizeof (DWORD); + BOOL doHide = FALSE; /* The default value is FALSE (win98 at least) */ + + if (!RegCreateKeyExA (HKEY_CURRENT_USER, + "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced", + 0, 0, 0, KEY_ALL_ACCESS, 0, &hKey, 0)) { + if (!RegQueryValueExA (hKey, "HideFileExt", 0, 0, (LPBYTE) & dwData, &dwDataSize)) + doHide = dwData; + + RegCloseKey (hKey); + } + + if (!doHide) { + LPSTR ext = PathFindExtensionA(szPath); + + if (ext) { + HKEY hkey; + char classname[MAX_PATH]; + LONG classlen = MAX_PATH; + + if (!RegQueryValueA(HKEY_CLASSES_ROOT, ext, classname, &classlen)) + if (!RegOpenKeyA(HKEY_CLASSES_ROOT, classname, &hkey)) { + if (!RegQueryValueExA(hkey, "NeverShowExt", 0, NULL, NULL, NULL)) + doHide = TRUE; + + RegCloseKey(hkey); + } + } + } + + if (doHide && szPath[0] != '.') + PathRemoveExtensionA (szPath); + } +} + +/************************************************************************** +* IShellFolder_fnGetDisplayNameOf +* Retrieves the display name for the specified file object or subfolder +* +* PARAMETERS +* LPCITEMIDLIST pidl, //[in ] complex pidl to item +* DWORD dwFlags, //[in ] SHGNO formatting flags +* LPSTRRET lpName) //[out] Returned display name +* +* FIXME +* if the name is in the pidl the ret value should be a STRRET_OFFSET +*/ + +static HRESULT WINAPI +IShellFolder_fnGetDisplayNameOf (IShellFolder2 * iface, LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET strRet) +{ + _ICOM_THIS_From_IShellFolder2 (IGenericSFImpl, iface) + + CHAR szPath[MAX_PATH]; + int len = 0; + BOOL bSimplePidl; + + *szPath = '\0'; + + TRACE ("(%p)->(pidl=%p,0x%08lx,%p)\n", This, pidl, dwFlags, strRet); + pdump (pidl); + + if (!pidl || !strRet) + return E_INVALIDARG; + + bSimplePidl = _ILIsPidlSimple (pidl); + + /* take names of special folders only if its only this folder */ + if (_ILIsSpecialFolder (pidl)) { + if (bSimplePidl) { + _ILSimpleGetText (pidl, szPath, MAX_PATH); /* append my own path */ + } else { + FIXME ("special pidl\n"); + } + } else { + if (!(dwFlags & SHGDN_INFOLDER) && (dwFlags & SHGDN_FORPARSING) && This->sPathTarget) { + lstrcpyA (szPath, This->sPathTarget); /* get path to root */ + PathAddBackslashA (szPath); + len = lstrlenA (szPath); + } + _ILSimpleGetText (pidl, szPath + len, MAX_PATH - len); /* append my own path */ + + if (!_ILIsFolder(pidl)) + SHELL_FS_ProcessDisplayFilename(szPath, dwFlags); + } + + if ((dwFlags & SHGDN_FORPARSING) && !bSimplePidl) { /* go deeper if needed */ + PathAddBackslashA (szPath); + len = lstrlenA (szPath); + + if (!SUCCEEDED + (SHELL32_GetDisplayNameOfChild (iface, pidl, dwFlags | SHGDN_INFOLDER, szPath + len, MAX_PATH - len))) + return E_OUTOFMEMORY; + } + strRet->uType = STRRET_CSTR; + lstrcpynA (strRet->u.cStr, szPath, MAX_PATH); + + TRACE ("-- (%p)->(%s)\n", This, szPath); + return S_OK; +} + +/************************************************************************** +* IShellFolder_fnSetNameOf +* Changes the name of a file object or subfolder, possibly changing its item +* identifier in the process. +* +* PARAMETERS +* HWND hwndOwner, //[in ] Owner window for output +* LPCITEMIDLIST pidl, //[in ] simple pidl of item to change +* LPCOLESTR lpszName, //[in ] the items new display name +* DWORD dwFlags, //[in ] SHGNO formatting flags +* LPITEMIDLIST* ppidlOut) //[out] simple pidl returned +*/ +static HRESULT WINAPI IShellFolder_fnSetNameOf (IShellFolder2 * iface, HWND hwndOwner, LPCITEMIDLIST pidl, /*simple pidl */ + LPCOLESTR lpName, DWORD dwFlags, LPITEMIDLIST * pPidlOut) +{ + _ICOM_THIS_From_IShellFolder2 (IGenericSFImpl, iface) + char szSrc[MAX_PATH], + szDest[MAX_PATH]; + int len; + BOOL bIsFolder = _ILIsFolder (ILFindLastID (pidl)); + + TRACE ("(%p)->(%p,pidl=%p,%s,%lu,%p)\n", This, hwndOwner, pidl, debugstr_w (lpName), dwFlags, pPidlOut); + + /* build source path */ + if (dwFlags & SHGDN_INFOLDER) { + strcpy (szSrc, This->sPathTarget); + PathAddBackslashA (szSrc); + len = strlen (szSrc); + _ILSimpleGetText (pidl, szSrc + len, MAX_PATH - len); + } else { + /* FIXME: Can this work with a simple PIDL? */ + SHGetPathFromIDListA (pidl, szSrc); + } + + /* build destination path */ + strcpy (szDest, This->sPathTarget); + PathAddBackslashA (szDest); + len = strlen (szDest); + WideCharToMultiByte (CP_ACP, 0, lpName, -1, szDest + len, MAX_PATH - len, NULL, NULL); + szDest[MAX_PATH - 1] = 0; + TRACE ("src=%s dest=%s\n", szSrc, szDest); + if (MoveFileA (szSrc, szDest)) { + HRESULT hr = S_OK; + + if (pPidlOut) + hr = _ILCreateFromPathA(szDest, pPidlOut); + + SHChangeNotify (bIsFolder ? SHCNE_RENAMEFOLDER : SHCNE_RENAMEITEM, SHCNF_PATHA, szSrc, szDest); + + return hr; + } + + return E_FAIL; +} + +static HRESULT WINAPI IShellFolder_fnGetDefaultSearchGUID (IShellFolder2 * iface, GUID * pguid) +{ + _ICOM_THIS_From_IShellFolder2 (IGenericSFImpl, iface) + FIXME ("(%p)\n", This); + return E_NOTIMPL; +} +static HRESULT WINAPI IShellFolder_fnEnumSearches (IShellFolder2 * iface, IEnumExtraSearch ** ppenum) +{ + _ICOM_THIS_From_IShellFolder2 (IGenericSFImpl, iface) + FIXME ("(%p)\n", This); + return E_NOTIMPL; +} +static HRESULT WINAPI +IShellFolder_fnGetDefaultColumn (IShellFolder2 * iface, DWORD dwRes, ULONG * pSort, ULONG * pDisplay) +{ + _ICOM_THIS_From_IShellFolder2 (IGenericSFImpl, iface) + + TRACE ("(%p)\n", This); + + if (pSort) + *pSort = 0; + if (pDisplay) + *pDisplay = 0; + + return S_OK; +} +static HRESULT WINAPI IShellFolder_fnGetDefaultColumnState (IShellFolder2 * iface, UINT iColumn, DWORD * pcsFlags) +{ + _ICOM_THIS_From_IShellFolder2 (IGenericSFImpl, iface) + + TRACE ("(%p)\n", This); + + if (!pcsFlags || iColumn >= GENERICSHELLVIEWCOLUMNS) + return E_INVALIDARG; + + *pcsFlags = GenericSFHeader[iColumn].pcsFlags; + + return S_OK; +} +static HRESULT WINAPI +IShellFolder_fnGetDetailsEx (IShellFolder2 * iface, LPCITEMIDLIST pidl, const SHCOLUMNID * pscid, VARIANT * pv) +{ + _ICOM_THIS_From_IShellFolder2 (IGenericSFImpl, iface) + FIXME ("(%p)\n", This); + + return E_NOTIMPL; +} +static HRESULT WINAPI +IShellFolder_fnGetDetailsOf (IShellFolder2 * iface, LPCITEMIDLIST pidl, UINT iColumn, SHELLDETAILS * psd) +{ + _ICOM_THIS_From_IShellFolder2 (IGenericSFImpl, iface) + HRESULT hr = E_FAIL; + + TRACE ("(%p)->(%p %i %p)\n", This, pidl, iColumn, psd); + + if (!psd || iColumn >= GENERICSHELLVIEWCOLUMNS) + return E_INVALIDARG; + + if (!pidl) { + /* the header titles */ + psd->fmt = GenericSFHeader[iColumn].fmt; + psd->cxChar = GenericSFHeader[iColumn].cxChar; + psd->str.uType = STRRET_CSTR; + LoadStringA (shell32_hInstance, GenericSFHeader[iColumn].colnameid, psd->str.u.cStr, MAX_PATH); + return S_OK; + } else { + /* the data from the pidl */ + switch (iColumn) { + case 0: /* name */ + hr = IShellFolder_GetDisplayNameOf (iface, pidl, SHGDN_NORMAL | SHGDN_INFOLDER, &psd->str); + break; + case 1: /* size */ + _ILGetFileSize (pidl, psd->str.u.cStr, MAX_PATH); + break; + case 2: /* type */ + _ILGetFileType (pidl, psd->str.u.cStr, MAX_PATH); + break; + case 3: /* date */ + _ILGetFileDate (pidl, psd->str.u.cStr, MAX_PATH); + break; + case 4: /* attributes */ + _ILGetFileAttributes (pidl, psd->str.u.cStr, MAX_PATH); + break; + } + hr = S_OK; + psd->str.uType = STRRET_CSTR; + } + + return hr; +} +static HRESULT WINAPI IShellFolder_fnMapColumnToSCID (IShellFolder2 * iface, UINT column, SHCOLUMNID * pscid) +{ + _ICOM_THIS_From_IShellFolder2 (IGenericSFImpl, iface) + FIXME ("(%p)\n", This); + return E_NOTIMPL; +} + +static IShellFolder2Vtbl sfvt = +{ + IShellFolder_fnQueryInterface, + IShellFolder_fnAddRef, + IShellFolder_fnRelease, + IShellFolder_fnParseDisplayName, + IShellFolder_fnEnumObjects, + IShellFolder_fnBindToObject, + IShellFolder_fnBindToStorage, + IShellFolder_fnCompareIDs, + IShellFolder_fnCreateViewObject, + IShellFolder_fnGetAttributesOf, + IShellFolder_fnGetUIObjectOf, + IShellFolder_fnGetDisplayNameOf, + IShellFolder_fnSetNameOf, + /* ShellFolder2 */ + IShellFolder_fnGetDefaultSearchGUID, + IShellFolder_fnEnumSearches, + IShellFolder_fnGetDefaultColumn, + IShellFolder_fnGetDefaultColumnState, + IShellFolder_fnGetDetailsEx, + IShellFolder_fnGetDetailsOf, + IShellFolder_fnMapColumnToSCID +}; + +/**************************************************************************** + * ISFHelper for IShellFolder implementation + */ + +static HRESULT WINAPI ISFHelper_fnQueryInterface (ISFHelper * iface, REFIID riid, LPVOID * ppvObj) +{ + _ICOM_THIS_From_ISFHelper (IGenericSFImpl, iface); + + TRACE ("(%p)->(count=%lu)\n", This, This->ref); + + return IUnknown_QueryInterface (This->pUnkOuter, riid, ppvObj); +} + +static ULONG WINAPI ISFHelper_fnAddRef (ISFHelper * iface) +{ + _ICOM_THIS_From_ISFHelper (IGenericSFImpl, iface); + + TRACE ("(%p)->(count=%lu)\n", This, This->ref); + + return IUnknown_AddRef (This->pUnkOuter); +} + +static ULONG WINAPI ISFHelper_fnRelease (ISFHelper * iface) +{ + _ICOM_THIS_From_ISFHelper (IGenericSFImpl, iface); + + TRACE ("(%p)\n", This); + + return IUnknown_Release (This->pUnkOuter); +} + +/**************************************************************************** + * ISFHelper_fnAddFolder + * + * creates a unique folder name + */ + +static HRESULT WINAPI ISFHelper_fnGetUniqueName (ISFHelper * iface, LPSTR lpName, UINT uLen) +{ + _ICOM_THIS_From_ISFHelper (IGenericSFImpl, iface) + IEnumIDList *penum; + HRESULT hr; + char szText[MAX_PATH]; + char *szNewFolder = "New Folder"; + + TRACE ("(%p)(%s %u)\n", This, lpName, uLen); + + if (uLen < strlen (szNewFolder) + 4) + return E_POINTER; + + strcpy (lpName, szNewFolder); + + hr = IShellFolder_fnEnumObjects (_IShellFolder2_ (This), 0, + SHCONTF_FOLDERS | SHCONTF_NONFOLDERS | SHCONTF_INCLUDEHIDDEN, &penum); + if (penum) { + LPITEMIDLIST pidl; + DWORD dwFetched; + int i = 1; + + next:IEnumIDList_Reset (penum); + while (S_OK == IEnumIDList_Next (penum, 1, &pidl, &dwFetched) && dwFetched) { + _ILSimpleGetText (pidl, szText, MAX_PATH); + if (0 == strcasecmp (szText, lpName)) { + sprintf (lpName, "%s %d", szNewFolder, i++); + if (i > 99) { + hr = E_FAIL; + break; + } + goto next; + } + } + + IEnumIDList_Release (penum); + } + return hr; +} + +/**************************************************************************** + * ISFHelper_fnAddFolder + * + * adds a new folder. + */ + +static HRESULT WINAPI ISFHelper_fnAddFolder (ISFHelper * iface, HWND hwnd, LPCSTR lpName, LPITEMIDLIST * ppidlOut) +{ + _ICOM_THIS_From_ISFHelper (IGenericSFImpl, iface) + char lpstrNewDir[MAX_PATH]; + DWORD bRes; + HRESULT hres = E_FAIL; + + TRACE ("(%p)(%s %p)\n", This, lpName, ppidlOut); + + strcpy (lpstrNewDir, This->sPathTarget); + PathAppendA(lpstrNewDir, lpName); + + bRes = CreateDirectoryA (lpstrNewDir, NULL); + if (bRes) { + SHChangeNotify (SHCNE_MKDIR, SHCNF_PATHA, lpstrNewDir, NULL); + + hres = S_OK; + + if (ppidlOut) + hres = _ILCreateFromPathA(lpstrNewDir, ppidlOut); + } else { + char lpstrText[128 + MAX_PATH]; + char lpstrTempText[128]; + char lpstrCaption[256]; + + /* Cannot Create folder because of permissions */ + LoadStringA (shell32_hInstance, IDS_CREATEFOLDER_DENIED, lpstrTempText, sizeof (lpstrTempText)); + LoadStringA (shell32_hInstance, IDS_CREATEFOLDER_CAPTION, lpstrCaption, sizeof (lpstrCaption)); + sprintf (lpstrText, lpstrTempText, lpstrNewDir); + MessageBoxA (hwnd, lpstrText, lpstrCaption, MB_OK | MB_ICONEXCLAMATION); + } + + return hres; +} + +/**************************************************************************** + * ISFHelper_fnDeleteItems + * + * deletes items in folder + */ +static HRESULT WINAPI ISFHelper_fnDeleteItems (ISFHelper * iface, UINT cidl, LPCITEMIDLIST * apidl) +{ + _ICOM_THIS_From_ISFHelper (IGenericSFImpl, iface) + UINT i; + char szPath[MAX_PATH]; + BOOL bConfirm = TRUE; + + TRACE ("(%p)(%u %p)\n", This, cidl, apidl); + + /* deleting multiple items so give a slightly different warning */ + if (cidl != 1) { + char tmp[8]; + + snprintf (tmp, sizeof (tmp), "%d", cidl); + if (!SHELL_ConfirmDialog(ASK_DELETE_MULTIPLE_ITEM, tmp)) + return E_FAIL; + bConfirm = FALSE; + } + + for (i = 0; i < cidl; i++) { + strcpy (szPath, This->sPathTarget); + PathAddBackslashA (szPath); + _ILSimpleGetText (apidl[i], szPath + strlen (szPath), MAX_PATH); + + if (_ILIsFolder (apidl[i])) { + LPITEMIDLIST pidl; + + TRACE ("delete %s\n", szPath); + if (!SHELL_DeleteDirectoryA (szPath, bConfirm)) { + TRACE ("delete %s failed, bConfirm=%d\n", szPath, bConfirm); + return E_FAIL; + } + pidl = ILCombine (This->pidlRoot, apidl[i]); + SHChangeNotify (SHCNE_RMDIR, SHCNF_IDLIST, pidl, NULL); + SHFree (pidl); + } else if (_ILIsValue (apidl[i])) { + LPITEMIDLIST pidl; + + TRACE ("delete %s\n", szPath); + if (!SHELL_DeleteFileA (szPath, bConfirm)) { + TRACE ("delete %s failed, bConfirm=%d\n", szPath, bConfirm); + return E_FAIL; + } + pidl = ILCombine (This->pidlRoot, apidl[i]); + SHChangeNotify (SHCNE_DELETE, SHCNF_IDLIST, pidl, NULL); + SHFree (pidl); + } + + } + return S_OK; +} + +/**************************************************************************** + * ISFHelper_fnCopyItems + * + * copies items to this folder + */ +static HRESULT WINAPI +ISFHelper_fnCopyItems (ISFHelper * iface, IShellFolder * pSFFrom, UINT cidl, LPCITEMIDLIST * apidl) +{ + UINT i; + IPersistFolder2 *ppf2 = NULL; + char szSrcPath[MAX_PATH], + szDstPath[MAX_PATH]; + + _ICOM_THIS_From_ISFHelper (IGenericSFImpl, iface); + + TRACE ("(%p)->(%p,%u,%p)\n", This, pSFFrom, cidl, apidl); + + IShellFolder_QueryInterface (pSFFrom, &IID_IPersistFolder2, (LPVOID *) & ppf2); + if (ppf2) { + LPITEMIDLIST pidl; + + if (SUCCEEDED (IPersistFolder2_GetCurFolder (ppf2, &pidl))) { + for (i = 0; i < cidl; i++) { + SHGetPathFromIDListA (pidl, szSrcPath); + PathAddBackslashA (szSrcPath); + _ILSimpleGetText (apidl[i], szSrcPath + strlen (szSrcPath), MAX_PATH); + + strcpy (szDstPath, This->sPathTarget); + PathAddBackslashA (szDstPath); + _ILSimpleGetText (apidl[i], szDstPath + strlen (szDstPath), MAX_PATH); + MESSAGE ("would copy %s to %s\n", szSrcPath, szDstPath); + } + SHFree (pidl); + } + IPersistFolder2_Release (ppf2); + } + return S_OK; +} + +static ISFHelperVtbl shvt = +{ + ISFHelper_fnQueryInterface, + ISFHelper_fnAddRef, + ISFHelper_fnRelease, + ISFHelper_fnGetUniqueName, + ISFHelper_fnAddFolder, + ISFHelper_fnDeleteItems, + ISFHelper_fnCopyItems +}; + +/************************************************************************ + * IFSFldr_PersistFolder3_QueryInterface + * + */ +static HRESULT WINAPI IFSFldr_PersistFolder3_QueryInterface (IPersistFolder3 * iface, REFIID iid, LPVOID * ppvObj) +{ + _ICOM_THIS_From_IPersistFolder3 (IGenericSFImpl, iface); + + TRACE ("(%p)\n", This); + + return IUnknown_QueryInterface (This->pUnkOuter, iid, ppvObj); +} + +/************************************************************************ + * IFSFldr_PersistFolder3_AddRef + * + */ +static ULONG WINAPI IFSFldr_PersistFolder3_AddRef (IPersistFolder3 * iface) +{ + _ICOM_THIS_From_IPersistFolder3 (IGenericSFImpl, iface); + + TRACE ("(%p)->(count=%lu)\n", This, This->ref); + + return IUnknown_AddRef (This->pUnkOuter); +} + +/************************************************************************ + * IFSFldr_PersistFolder3_Release + * + */ +static ULONG WINAPI IFSFldr_PersistFolder3_Release (IPersistFolder3 * iface) +{ + _ICOM_THIS_From_IPersistFolder3 (IGenericSFImpl, iface); + + TRACE ("(%p)->(count=%lu)\n", This, This->ref); + + return IUnknown_Release (This->pUnkOuter); +} + +/************************************************************************ + * IFSFldr_PersistFolder3_GetClassID + */ +static HRESULT WINAPI IFSFldr_PersistFolder3_GetClassID (IPersistFolder3 * iface, CLSID * lpClassId) +{ + _ICOM_THIS_From_IPersistFolder3 (IGenericSFImpl, iface); + + TRACE ("(%p)\n", This); + + if (!lpClassId) + return E_POINTER; + *lpClassId = *This->pclsid; + + return S_OK; +} + +/************************************************************************ + * IFSFldr_PersistFolder3_Initialize + * + * NOTES + * sPathTarget is not set. Don't know how to handle in a non rooted environment. + */ +static HRESULT WINAPI IFSFldr_PersistFolder3_Initialize (IPersistFolder3 * iface, LPCITEMIDLIST pidl) +{ + char sTemp[MAX_PATH]; + + _ICOM_THIS_From_IPersistFolder3 (IGenericSFImpl, iface); + + TRACE ("(%p)->(%p)\n", This, pidl); + + if (This->pidlRoot) + SHFree (This->pidlRoot); /* free the old pidl */ + This->pidlRoot = ILClone (pidl); /* set my pidl */ + + if (This->sPathTarget) + SHFree (This->sPathTarget); + + /* set my path */ + if (SHGetPathFromIDListA (pidl, sTemp)) { + This->sPathTarget = SHAlloc (strlen (sTemp) + 1); + strcpy (This->sPathTarget, sTemp); + } + + TRACE ("--(%p)->(%s)\n", This, This->sPathTarget); + return S_OK; +} + +/************************************************************************** + * IFSFldr_PersistFolder3_GetCurFolder + */ +static HRESULT WINAPI IFSFldr_PersistFolder3_fnGetCurFolder (IPersistFolder3 * iface, LPITEMIDLIST * pidl) +{ + _ICOM_THIS_From_IPersistFolder3 (IGenericSFImpl, iface); + + TRACE ("(%p)->(%p)\n", This, pidl); + + if (!pidl) return E_POINTER; + *pidl = ILClone (This->pidlRoot); + return S_OK; +} + +/************************************************************************** + * IFSFldr_PersistFolder3_InitializeEx + * + * FIXME: errorhandling + */ +static HRESULT WINAPI +IFSFldr_PersistFolder3_InitializeEx (IPersistFolder3 * iface, + IBindCtx * pbc, LPCITEMIDLIST pidlRoot, const PERSIST_FOLDER_TARGET_INFO * ppfti) +{ + char sTemp[MAX_PATH]; + + _ICOM_THIS_From_IPersistFolder3 (IGenericSFImpl, iface); + + TRACE ("(%p)->(%p,%p,%p)\n", This, pbc, pidlRoot, ppfti); + if (ppfti) + TRACE ("--%p %s %s 0x%08lx 0x%08x\n", + ppfti->pidlTargetFolder, debugstr_w (ppfti->szTargetParsingName), + debugstr_w (ppfti->szNetworkProvider), ppfti->dwAttributes, ppfti->csidl); + + pdump (pidlRoot); + if (ppfti && ppfti->pidlTargetFolder) + pdump (ppfti->pidlTargetFolder); + + if (This->pidlRoot) + __SHFreeAndNil (&This->pidlRoot); /* free the old */ + if (This->sPathTarget) + __SHFreeAndNil (&This->sPathTarget); + + /* + * Root path and pidl + */ + This->pidlRoot = ILClone (pidlRoot); + + /* + * the target folder is spezified in csidl OR pidlTargetFolder OR szTargetParsingName + */ + if (ppfti) { + if (ppfti->csidl != -1) { + if (SHGetSpecialFolderPathA (0, sTemp, ppfti->csidl, ppfti->csidl & CSIDL_FLAG_CREATE)) { + __SHCloneStrA (&This->sPathTarget, sTemp); + } + } else if (ppfti->szTargetParsingName[0]) { + __SHCloneStrWtoA (&This->sPathTarget, ppfti->szTargetParsingName); + } else if (ppfti->pidlTargetFolder) { + if (SHGetPathFromIDListA (ppfti->pidlTargetFolder, sTemp)) { + __SHCloneStrA (&This->sPathTarget, sTemp); + } + } + } + + TRACE ("--(%p)->(target=%s)\n", This, debugstr_a (This->sPathTarget)); + pdump (This->pidlRoot); + return (This->sPathTarget) ? S_OK : E_FAIL; +} + +static HRESULT WINAPI +IFSFldr_PersistFolder3_GetFolderTargetInfo (IPersistFolder3 * iface, PERSIST_FOLDER_TARGET_INFO * ppfti) +{ + _ICOM_THIS_From_IPersistFolder3 (IGenericSFImpl, iface); + FIXME ("(%p)->(%p)\n", This, ppfti); + ZeroMemory (ppfti, sizeof (ppfti)); + return E_NOTIMPL; +} + +static IPersistFolder3Vtbl vt_FSFldr_PersistFolder3 = +{ + IFSFldr_PersistFolder3_QueryInterface, + IFSFldr_PersistFolder3_AddRef, + IFSFldr_PersistFolder3_Release, + IFSFldr_PersistFolder3_GetClassID, + IFSFldr_PersistFolder3_Initialize, + IFSFldr_PersistFolder3_fnGetCurFolder, + IFSFldr_PersistFolder3_InitializeEx, + IFSFldr_PersistFolder3_GetFolderTargetInfo +}; + +/**************************************************************************** + * ISFDropTarget implementation + */ +static BOOL ISFDropTarget_QueryDrop (IDropTarget * iface, DWORD dwKeyState, LPDWORD pdwEffect) +{ + DWORD dwEffect = *pdwEffect; + + _ICOM_THIS_From_IDropTarget (IGenericSFImpl, iface); + + *pdwEffect = DROPEFFECT_NONE; + + if (This->fAcceptFmt) { /* Does our interpretation of the keystate ... */ + *pdwEffect = KeyStateToDropEffect (dwKeyState); + + /* ... matches the desired effect ? */ + if (dwEffect & *pdwEffect) { + return TRUE; + } + } + return FALSE; +} + +static HRESULT WINAPI ISFDropTarget_QueryInterface (IDropTarget * iface, REFIID riid, LPVOID * ppvObj) +{ + _ICOM_THIS_From_IDropTarget (IGenericSFImpl, iface); + + TRACE ("(%p)\n", This); + + return IUnknown_QueryInterface (This->pUnkOuter, riid, ppvObj); +} + +static ULONG WINAPI ISFDropTarget_AddRef (IDropTarget * iface) +{ + _ICOM_THIS_From_IDropTarget (IGenericSFImpl, iface); + + TRACE ("(%p)\n", This); + + return IUnknown_AddRef (This->pUnkOuter); +} + +static ULONG WINAPI ISFDropTarget_Release (IDropTarget * iface) +{ + _ICOM_THIS_From_IDropTarget (IGenericSFImpl, iface); + + TRACE ("(%p)\n", This); + + return IUnknown_Release (This->pUnkOuter); +} + +static HRESULT WINAPI +ISFDropTarget_DragEnter (IDropTarget * iface, IDataObject * pDataObject, DWORD dwKeyState, POINTL pt, DWORD * pdwEffect) +{ + FORMATETC fmt; + + _ICOM_THIS_From_IDropTarget (IGenericSFImpl, iface); + + TRACE ("(%p)->(DataObject=%p)\n", This, pDataObject); + + InitFormatEtc (fmt, This->cfShellIDList, TYMED_HGLOBAL); + + This->fAcceptFmt = (S_OK == IDataObject_QueryGetData (pDataObject, &fmt)) ? TRUE : FALSE; + + ISFDropTarget_QueryDrop (iface, dwKeyState, pdwEffect); + + return S_OK; +} + +static HRESULT WINAPI ISFDropTarget_DragOver (IDropTarget * iface, DWORD dwKeyState, POINTL pt, DWORD * pdwEffect) +{ + _ICOM_THIS_From_IDropTarget (IGenericSFImpl, iface); + + TRACE ("(%p)\n", This); + + if (!pdwEffect) + return E_INVALIDARG; + + ISFDropTarget_QueryDrop (iface, dwKeyState, pdwEffect); + + return S_OK; +} + +static HRESULT WINAPI ISFDropTarget_DragLeave (IDropTarget * iface) +{ + _ICOM_THIS_From_IDropTarget (IGenericSFImpl, iface); + + TRACE ("(%p)\n", This); + + This->fAcceptFmt = FALSE; + + return S_OK; +} + +static HRESULT WINAPI +ISFDropTarget_Drop (IDropTarget * iface, IDataObject * pDataObject, DWORD dwKeyState, POINTL pt, DWORD * pdwEffect) +{ + _ICOM_THIS_From_IDropTarget (IGenericSFImpl, iface); + + FIXME ("(%p) object dropped\n", This); + + return E_NOTIMPL; +} + +static struct IDropTargetVtbl dtvt = { + ISFDropTarget_QueryInterface, + ISFDropTarget_AddRef, + ISFDropTarget_Release, + ISFDropTarget_DragEnter, + ISFDropTarget_DragOver, + ISFDropTarget_DragLeave, + ISFDropTarget_Drop +}; diff --git a/reactos/lib/shell32/shfldr_mycomp.c b/reactos/lib/shell32/shfldr_mycomp.c index 21ad1017569..5de8574efcd 100644 --- a/reactos/lib/shell32/shfldr_mycomp.c +++ b/reactos/lib/shell32/shfldr_mycomp.c @@ -1,832 +1,832 @@ - -/* - * Virtual Workplace folder - * - * Copyright 1997 Marcus Meissner - * Copyright 1998, 1999, 2002 Juergen Schmied - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include "config.h" -#include "wine/port.h" - -#include -#include -#include -#include - -#define COBJMACROS -#define NONAMELESSUNION -#define NONAMELESSSTRUCT - -#include "winerror.h" -#include "windef.h" -#include "winbase.h" -#include "winreg.h" - -#include "wingdi.h" -#include "pidl.h" -#include "shlguid.h" -#include "enumidlist.h" -#include "undocshell.h" -#include "shell32_main.h" -#include "shresdef.h" -#include "shlwapi.h" -#include "wine/debug.h" -#include "debughlp.h" -#include "shfldr.h" - -WINE_DEFAULT_DEBUG_CHANNEL (shell); - -/*********************************************************************** -* IShellFolder implementation -*/ - -typedef struct { - IShellFolder2Vtbl *lpVtbl; - DWORD ref; - IPersistFolder2Vtbl *lpVtblPersistFolder2; - - /* both paths are parsible from the desktop */ - LPITEMIDLIST pidlRoot; /* absolute pidl */ - int dwAttributes; /* attributes returned by GetAttributesOf FIXME: use it */ -} IGenericSFImpl; - -static struct IShellFolder2Vtbl vt_ShellFolder2; -static struct IPersistFolder2Vtbl vt_PersistFolder2; - -#define _IPersistFolder2_Offset ((int)(&(((IGenericSFImpl*)0)->lpVtblPersistFolder2))) -#define _ICOM_THIS_From_IPersistFolder2(class, name) class* This = (class*)(((char*)name)-_IPersistFolder2_Offset); - -/* - converts This to a interface pointer -*/ -#define _IUnknown_(This) (IUnknown*)&(This->lpVtbl) -#define _IShellFolder_(This) (IShellFolder*)&(This->lpVtbl) -#define _IShellFolder2_(This) (IShellFolder2*)&(This->lpVtbl) - -#define _IPersist_(This) (IPersist*)&(This->lpVtblPersistFolder2) -#define _IPersistFolder_(This) (IPersistFolder*)&(This->lpVtblPersistFolder2) -#define _IPersistFolder2_(This) (IPersistFolder2*)&(This->lpVtblPersistFolder2) - -/*********************************************************************** -* IShellFolder [MyComputer] implementation -*/ - -static shvheader MyComputerSFHeader[] = { - {IDS_SHV_COLUMN1, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 15}, - {IDS_SHV_COLUMN3, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10}, - {IDS_SHV_COLUMN6, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10}, - {IDS_SHV_COLUMN7, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10}, -}; - -#define MYCOMPUTERSHELLVIEWCOLUMNS 4 - -/************************************************************************** -* ISF_MyComputer_Constructor -*/ -HRESULT WINAPI ISF_MyComputer_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv) -{ - IGenericSFImpl *sf; - - TRACE ("unkOut=%p %s\n", pUnkOuter, shdebugstr_guid (riid)); - - if (!ppv) - return E_POINTER; - if (pUnkOuter) - return CLASS_E_NOAGGREGATION; - - sf = (IGenericSFImpl *) LocalAlloc (GMEM_ZEROINIT, sizeof (IGenericSFImpl)); - if (!sf) - return E_OUTOFMEMORY; - - sf->ref = 0; - sf->lpVtbl = &vt_ShellFolder2; - sf->lpVtblPersistFolder2 = &vt_PersistFolder2; - sf->pidlRoot = _ILCreateMyComputer (); /* my qualified pidl */ - - if (!SUCCEEDED (IUnknown_QueryInterface (_IUnknown_ (sf), riid, ppv))) { - IUnknown_Release (_IUnknown_ (sf)); - return E_NOINTERFACE; - } - - TRACE ("--(%p)\n", sf); - return S_OK; -} - -/************************************************************************** - * ISF_MyComputer_fnQueryInterface - * - * NOTES supports not IPersist/IPersistFolder - */ -static HRESULT WINAPI ISF_MyComputer_fnQueryInterface (IShellFolder2 * iface, REFIID riid, LPVOID * ppvObj) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - TRACE ("(%p)->(%s,%p)\n", This, shdebugstr_guid (riid), ppvObj); - - *ppvObj = NULL; - - if (IsEqualIID (riid, &IID_IUnknown) || - IsEqualIID (riid, &IID_IShellFolder) || IsEqualIID (riid, &IID_IShellFolder2)) { - *ppvObj = This; - } else if (IsEqualIID (riid, &IID_IPersist) || - IsEqualIID (riid, &IID_IPersistFolder) || IsEqualIID (riid, &IID_IPersistFolder2)) { - *ppvObj = _IPersistFolder2_ (This); - } - - if (*ppvObj) { - IUnknown_AddRef ((IUnknown *) (*ppvObj)); - TRACE ("-- Interface: (%p)->(%p)\n", ppvObj, *ppvObj); - return S_OK; - } - TRACE ("-- Interface: E_NOINTERFACE\n"); - return E_NOINTERFACE; -} - -static ULONG WINAPI ISF_MyComputer_fnAddRef (IShellFolder2 * iface) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - TRACE ("(%p)->(count=%lu)\n", This, This->ref); - - return ++(This->ref); -} - -static ULONG WINAPI ISF_MyComputer_fnRelease (IShellFolder2 * iface) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - TRACE ("(%p)->(count=%lu)\n", This, This->ref); - - if (!--(This->ref)) { - TRACE ("-- destroying IShellFolder(%p)\n", This); - if (This->pidlRoot) - SHFree (This->pidlRoot); - LocalFree ((HLOCAL) This); - return 0; - } - return This->ref; -} - -/************************************************************************** -* ISF_MyComputer_fnParseDisplayName -*/ -static HRESULT WINAPI -ISF_MyComputer_fnParseDisplayName (IShellFolder2 * iface, - HWND hwndOwner, - LPBC pbc, - LPOLESTR lpszDisplayName, - DWORD * pchEaten, LPITEMIDLIST * ppidl, DWORD * pdwAttributes) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - HRESULT hr = E_INVALIDARG; - LPCWSTR szNext = NULL; - WCHAR szElement[MAX_PATH]; - LPITEMIDLIST pidlTemp = NULL; - CLSID clsid; - - TRACE ("(%p)->(HWND=%p,%p,%p=%s,%p,pidl=%p,%p)\n", - This, hwndOwner, pbc, lpszDisplayName, debugstr_w (lpszDisplayName), pchEaten, ppidl, pdwAttributes); - - *ppidl = 0; - if (pchEaten) - *pchEaten = 0; /* strange but like the original */ - - /* handle CLSID paths */ - if (lpszDisplayName[0] == ':' && lpszDisplayName[1] == ':') { - szNext = GetNextElementW (lpszDisplayName, szElement, MAX_PATH); - TRACE ("-- element: %s\n", debugstr_w (szElement)); - SHCLSIDFromStringW (szElement + 2, &clsid); - pidlTemp = _ILCreateGuid (PT_GUID, &clsid); - } - /* do we have an absolute path name ? */ - else if (PathGetDriveNumberW (lpszDisplayName) >= 0 && lpszDisplayName[2] == (WCHAR) '\\') { - szNext = GetNextElementW (lpszDisplayName, szElement, MAX_PATH); - szElement[0] = toupper(szElement[0]); /* make drive letter uppercase to enable PIDL comparison */ - pidlTemp = _ILCreateDrive (szElement); - } - - if (szNext && *szNext) { - hr = SHELL32_ParseNextElement (iface, hwndOwner, pbc, &pidlTemp, (LPOLESTR) szNext, pchEaten, pdwAttributes); - } else { - if (pdwAttributes && *pdwAttributes) { - SHELL32_GetItemAttributes (_IShellFolder_ (This), pidlTemp, pdwAttributes); - } - hr = S_OK; - } - - *ppidl = pidlTemp; - - TRACE ("(%p)->(-- ret=0x%08lx)\n", This, hr); - - return hr; -} - -/************************************************************************** - * CreateMyCompEnumList() - */ -static BOOL CreateMyCompEnumList(IEnumIDList *list, DWORD dwFlags) -{ - BOOL ret = TRUE; - - TRACE("(%p)->(flags=0x%08lx) \n",list,dwFlags); - - /*enumerate the folders*/ - if(dwFlags & SHCONTF_FOLDERS) - { - WCHAR wszDriveName[] = {'A', ':', '\\', '\0'}; - DWORD dwDrivemap = GetLogicalDrives(); - HKEY hkey; - - while (ret && wszDriveName[0]<='Z') - { - if(dwDrivemap & 0x00000001L) - ret = AddToEnumList(list, _ILCreateDrive(wszDriveName)); - wszDriveName[0]++; - dwDrivemap = dwDrivemap >> 1; - } - - TRACE("-- (%p)-> enumerate (mycomputer shell extensions)\n",list); - if (ret && !RegOpenKeyExA(HKEY_LOCAL_MACHINE, - "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\explorer\\mycomputer\\NameSpace", - 0, KEY_READ, &hkey)) - { - char iid[50]; - int i=0; - - while (ret) - { - DWORD size = sizeof (iid); - LONG apiRet = RegEnumKeyExA(hkey, i, iid, &size, 0, NULL, NULL, - NULL); - - if (ERROR_SUCCESS == apiRet) - { - /* FIXME: shell extensions, shouldn't the type be - * PT_SHELLEXT? */ - ret = AddToEnumList(list, _ILCreateGuidFromStrA(iid)); - i++; - } - else if (ERROR_NO_MORE_ITEMS == apiRet) - break; - else - ret = FALSE; - } - RegCloseKey(hkey); - } - } - return ret; -} - -/************************************************************************** -* ISF_MyComputer_fnEnumObjects -*/ -static HRESULT WINAPI -ISF_MyComputer_fnEnumObjects (IShellFolder2 * iface, HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST * ppEnumIDList) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - TRACE ("(%p)->(HWND=%p flags=0x%08lx pplist=%p)\n", This, hwndOwner, dwFlags, ppEnumIDList); - - *ppEnumIDList = IEnumIDList_Constructor(); - if (*ppEnumIDList) - CreateMyCompEnumList(*ppEnumIDList, dwFlags); - - TRACE ("-- (%p)->(new ID List: %p)\n", This, *ppEnumIDList); - - return (*ppEnumIDList) ? S_OK : E_OUTOFMEMORY; -} - -/************************************************************************** -* ISF_MyComputer_fnBindToObject -*/ -static HRESULT WINAPI -ISF_MyComputer_fnBindToObject (IShellFolder2 * iface, LPCITEMIDLIST pidl, - LPBC pbcReserved, REFIID riid, LPVOID * ppvOut) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - TRACE ("(%p)->(pidl=%p,%p,%s,%p)\n", This, pidl, pbcReserved, shdebugstr_guid (riid), ppvOut); - - return SHELL32_BindToChild (This->pidlRoot, NULL, pidl, riid, ppvOut); -} - -/************************************************************************** -* ISF_MyComputer_fnBindToStorage -*/ -static HRESULT WINAPI -ISF_MyComputer_fnBindToStorage (IShellFolder2 * iface, - LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID * ppvOut) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - FIXME ("(%p)->(pidl=%p,%p,%s,%p) stub\n", This, pidl, pbcReserved, shdebugstr_guid (riid), ppvOut); - - *ppvOut = NULL; - return E_NOTIMPL; -} - -/************************************************************************** -* ISF_MyComputer_fnCompareIDs -*/ - -static HRESULT WINAPI -ISF_MyComputer_fnCompareIDs (IShellFolder2 * iface, LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - int nReturn; - - TRACE ("(%p)->(0x%08lx,pidl1=%p,pidl2=%p)\n", This, lParam, pidl1, pidl2); - nReturn = SHELL32_CompareIDs (_IShellFolder_ (This), lParam, pidl1, pidl2); - TRACE ("-- %i\n", nReturn); - return nReturn; -} - -/************************************************************************** -* ISF_MyComputer_fnCreateViewObject -*/ -static HRESULT WINAPI -ISF_MyComputer_fnCreateViewObject (IShellFolder2 * iface, HWND hwndOwner, REFIID riid, LPVOID * ppvOut) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - LPSHELLVIEW pShellView; - HRESULT hr = E_INVALIDARG; - - TRACE ("(%p)->(hwnd=%p,%s,%p)\n", This, hwndOwner, shdebugstr_guid (riid), ppvOut); - - if (ppvOut) { - *ppvOut = NULL; - - if (IsEqualIID (riid, &IID_IDropTarget)) { - WARN ("IDropTarget not implemented\n"); - hr = E_NOTIMPL; - } else if (IsEqualIID (riid, &IID_IContextMenu)) { - WARN ("IContextMenu not implemented\n"); - hr = E_NOTIMPL; - } else if (IsEqualIID (riid, &IID_IShellView)) { - pShellView = IShellView_Constructor ((IShellFolder *) iface); - if (pShellView) { - hr = IShellView_QueryInterface (pShellView, riid, ppvOut); - IShellView_Release (pShellView); - } - } - } - TRACE ("-- (%p)->(interface=%p)\n", This, ppvOut); - return hr; -} - -/************************************************************************** -* ISF_MyComputer_fnGetAttributesOf -*/ -static HRESULT WINAPI -ISF_MyComputer_fnGetAttributesOf (IShellFolder2 * iface, UINT cidl, LPCITEMIDLIST * apidl, DWORD * rgfInOut) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - HRESULT hr = S_OK; - - TRACE ("(%p)->(cidl=%d apidl=%p mask=0x%08lx)\n", This, cidl, apidl, *rgfInOut); - - if ((!cidl) || (!apidl) || (!rgfInOut)) - return E_INVALIDARG; - - if (*rgfInOut == 0) - *rgfInOut = ~0; - - while (cidl > 0 && *apidl) { - pdump (*apidl); - SHELL32_GetItemAttributes (_IShellFolder_ (This), *apidl, rgfInOut); - apidl++; - cidl--; - } - - TRACE ("-- result=0x%08lx\n", *rgfInOut); - return hr; -} - -/************************************************************************** -* ISF_MyComputer_fnGetUIObjectOf -* -* PARAMETERS -* HWND hwndOwner, //[in ] Parent window for any output -* UINT cidl, //[in ] array size -* LPCITEMIDLIST* apidl, //[in ] simple pidl array -* REFIID riid, //[in ] Requested Interface -* UINT* prgfInOut, //[ ] reserved -* LPVOID* ppvObject) //[out] Resulting Interface -* -*/ -static HRESULT WINAPI -ISF_MyComputer_fnGetUIObjectOf (IShellFolder2 * iface, - HWND hwndOwner, - UINT cidl, LPCITEMIDLIST * apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - LPITEMIDLIST pidl; - IUnknown *pObj = NULL; - HRESULT hr = E_INVALIDARG; - - TRACE ("(%p)->(%p,%u,apidl=%p,%s,%p,%p)\n", - This, hwndOwner, cidl, apidl, shdebugstr_guid (riid), prgfInOut, ppvOut); - - if (ppvOut) { - *ppvOut = NULL; - - if (IsEqualIID (riid, &IID_IContextMenu) && (cidl >= 1)) { - pObj = (LPUNKNOWN) ISvItemCm_Constructor ((IShellFolder *) iface, This->pidlRoot, apidl, cidl); - hr = S_OK; - } else if (IsEqualIID (riid, &IID_IDataObject) && (cidl >= 1)) { - pObj = (LPUNKNOWN) IDataObject_Constructor (hwndOwner, This->pidlRoot, apidl, cidl); - hr = S_OK; - } else if (IsEqualIID (riid, &IID_IExtractIconA) && (cidl == 1)) { - pidl = ILCombine (This->pidlRoot, apidl[0]); - pObj = (LPUNKNOWN) IExtractIconA_Constructor (pidl); - SHFree (pidl); - hr = S_OK; - } else if (IsEqualIID (riid, &IID_IExtractIconW) && (cidl == 1)) { - pidl = ILCombine (This->pidlRoot, apidl[0]); - pObj = (LPUNKNOWN) IExtractIconW_Constructor (pidl); - SHFree (pidl); - hr = S_OK; - } else if (IsEqualIID (riid, &IID_IDropTarget) && (cidl >= 1)) { - hr = IShellFolder_QueryInterface (iface, &IID_IDropTarget, (LPVOID *) & pObj); - } else if ((IsEqualIID(riid,&IID_IShellLinkW) || IsEqualIID(riid,&IID_IShellLinkA)) - && (cidl == 1)) { - pidl = ILCombine (This->pidlRoot, apidl[0]); - hr = IShellLink_ConstructFromFile(NULL, riid, pidl, (LPVOID*)&pObj); - SHFree (pidl); - } else { - hr = E_NOINTERFACE; - } - - if (SUCCEEDED(hr) && !pObj) - hr = E_OUTOFMEMORY; - - *ppvOut = pObj; - } - TRACE ("(%p)->hr=0x%08lx\n", This, hr); - return hr; -} - -/************************************************************************** -* ISF_MyComputer_fnGetDisplayNameOf -*/ -static HRESULT WINAPI ISF_MyComputer_fnGetDisplayNameOf (IShellFolder2 * iface, LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET strRet) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - char szPath[MAX_PATH], - szDrive[18]; - int len = 0; - BOOL bSimplePidl; - HRESULT hr = S_OK; - - TRACE ("(%p)->(pidl=%p,0x%08lx,%p)\n", This, pidl, dwFlags, strRet); - pdump (pidl); - - if (!strRet) - return E_INVALIDARG; - - szPath[0] = 0x00; - szDrive[0] = 0x00; - - bSimplePidl = _ILIsPidlSimple (pidl); - - if (!pidl->mkid.cb) { - /* parsing name like ::{...} */ - lstrcpyA (szPath, "::"); - SHELL32_GUIDToStringA(&CLSID_MyComputer, &szPath[2]); - } else if (_ILIsSpecialFolder (pidl)) { - /* take names of special folders only if its only this folder */ - if (bSimplePidl) { - GUID const *clsid; - - if ((clsid = _ILGetGUIDPointer (pidl))) { - if (GET_SHGDN_FOR (dwFlags) == SHGDN_FORPARSING) { - int bWantsForParsing; - - /* - * we can only get a filesystem path from a shellfolder if the value WantsFORPARSING in - * CLSID\\{...}\\shellfolder exists - * exception: the MyComputer folder has this keys not but like any filesystem backed - * folder it needs these behaviour - */ - /* get the "WantsFORPARSING" flag from the registry */ - char szRegPath[100]; - - lstrcpyA (szRegPath, "CLSID\\"); - SHELL32_GUIDToStringA (clsid, &szRegPath[6]); - lstrcatA (szRegPath, "\\shellfolder"); - bWantsForParsing = - (ERROR_SUCCESS == - SHGetValueA (HKEY_CLASSES_ROOT, szRegPath, "WantsFORPARSING", NULL, NULL, NULL)); - - if ((GET_SHGDN_RELATION (dwFlags) == SHGDN_NORMAL) && bWantsForParsing) { - /* we need the filesystem path to the destination folder. Only the folder itself can know it */ - hr = SHELL32_GetDisplayNameOfChild (iface, pidl, dwFlags, szPath, MAX_PATH); - } else { - LPSTR p; - - /* parsing name like ::{...} */ - p = lstrcpyA(szPath, "::") + 2; - p += SHELL32_GUIDToStringA(&CLSID_MyComputer, p); - - lstrcatA(p, "\\::"); - p += 3; - SHELL32_GUIDToStringA(clsid, p); - } - } else { - /* user friendly name */ - HCR_GetClassNameA (clsid, szPath, MAX_PATH); - } - } else - _ILSimpleGetText (pidl, szPath, MAX_PATH); /* append my own path */ - } else { - FIXME ("special folder\n"); - } - } else { - if (!_ILIsDrive (pidl)) { - ERR ("Wrong pidl type\n"); - return E_INVALIDARG; - } - - _ILSimpleGetText (pidl, szPath, MAX_PATH); /* append my own path */ - - /* long view "lw_name (C:)" */ - if (bSimplePidl && !(dwFlags & SHGDN_FORPARSING)) { - DWORD dwVolumeSerialNumber, - dwMaximumComponetLength, - dwFileSystemFlags; - - GetVolumeInformationA (szPath, szDrive, sizeof (szDrive) - 6, &dwVolumeSerialNumber, - &dwMaximumComponetLength, &dwFileSystemFlags, NULL, 0); - strcat (szDrive, " ("); - strncat (szDrive, szPath, 2); - strcat (szDrive, ")"); - strcpy (szPath, szDrive); - } - } - - if (!bSimplePidl) { /* go deeper if needed */ - PathAddBackslashA (szPath); - len = strlen (szPath); - - hr = SHELL32_GetDisplayNameOfChild (iface, pidl, dwFlags | SHGDN_INFOLDER, szPath + len, MAX_PATH - len); - } - - if (SUCCEEDED (hr)) { - strRet->uType = STRRET_CSTR; - lstrcpynA (strRet->u.cStr, szPath, MAX_PATH); - } - - TRACE ("-- (%p)->(%s)\n", This, szPath); - return hr; -} - -/************************************************************************** -* ISF_MyComputer_fnSetNameOf -* Changes the name of a file object or subfolder, possibly changing its item -* identifier in the process. -* -* PARAMETERS -* HWND hwndOwner, //[in ] Owner window for output -* LPCITEMIDLIST pidl, //[in ] simple pidl of item to change -* LPCOLESTR lpszName, //[in ] the items new display name -* DWORD dwFlags, //[in ] SHGNO formatting flags -* LPITEMIDLIST* ppidlOut) //[out] simple pidl returned -*/ -static HRESULT WINAPI ISF_MyComputer_fnSetNameOf (IShellFolder2 * iface, HWND hwndOwner, LPCITEMIDLIST pidl, /*simple pidl */ - LPCOLESTR lpName, DWORD dwFlags, LPITEMIDLIST * pPidlOut) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - FIXME ("(%p)->(%p,pidl=%p,%s,%lu,%p)\n", This, hwndOwner, pidl, debugstr_w (lpName), dwFlags, pPidlOut); - return E_FAIL; -} - -static HRESULT WINAPI ISF_MyComputer_fnGetDefaultSearchGUID (IShellFolder2 * iface, GUID * pguid) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - FIXME ("(%p)\n", This); - return E_NOTIMPL; -} -static HRESULT WINAPI ISF_MyComputer_fnEnumSearches (IShellFolder2 * iface, IEnumExtraSearch ** ppenum) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - FIXME ("(%p)\n", This); - return E_NOTIMPL; -} -static HRESULT WINAPI ISF_MyComputer_fnGetDefaultColumn (IShellFolder2 * iface, DWORD dwRes, ULONG * pSort, ULONG * pDisplay) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - TRACE ("(%p)\n", This); - - if (pSort) *pSort = 0; - if (pDisplay) *pDisplay = 0; - return S_OK; -} -static HRESULT WINAPI ISF_MyComputer_fnGetDefaultColumnState (IShellFolder2 * iface, UINT iColumn, DWORD * pcsFlags) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - - TRACE ("(%p)\n", This); - - if (!pcsFlags || iColumn >= MYCOMPUTERSHELLVIEWCOLUMNS) return E_INVALIDARG; - *pcsFlags = MyComputerSFHeader[iColumn].pcsFlags; - return S_OK; -} -static HRESULT WINAPI ISF_MyComputer_fnGetDetailsEx (IShellFolder2 * iface, LPCITEMIDLIST pidl, const SHCOLUMNID * pscid, VARIANT * pv) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - FIXME ("(%p)\n", This); - return E_NOTIMPL; -} - -/* FIXME: drive size >4GB is rolling over */ -static HRESULT WINAPI ISF_MyComputer_fnGetDetailsOf (IShellFolder2 * iface, LPCITEMIDLIST pidl, UINT iColumn, SHELLDETAILS * psd) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - HRESULT hr; - - TRACE ("(%p)->(%p %i %p)\n", This, pidl, iColumn, psd); - - if (!psd || iColumn >= MYCOMPUTERSHELLVIEWCOLUMNS) - return E_INVALIDARG; - - if (!pidl) { - psd->fmt = MyComputerSFHeader[iColumn].fmt; - psd->cxChar = MyComputerSFHeader[iColumn].cxChar; - psd->str.uType = STRRET_CSTR; - LoadStringA (shell32_hInstance, MyComputerSFHeader[iColumn].colnameid, psd->str.u.cStr, MAX_PATH); - return S_OK; - } else { - char szPath[MAX_PATH]; - ULARGE_INTEGER ulBytes; - - psd->str.u.cStr[0] = 0x00; - psd->str.uType = STRRET_CSTR; - switch (iColumn) { - case 0: /* name */ - hr = IShellFolder_GetDisplayNameOf (iface, pidl, SHGDN_NORMAL | SHGDN_INFOLDER, &psd->str); - break; - case 1: /* type */ - _ILGetFileType (pidl, psd->str.u.cStr, MAX_PATH); - break; - case 2: /* total size */ - if (_ILIsDrive (pidl)) { - _ILSimpleGetText (pidl, szPath, MAX_PATH); - GetDiskFreeSpaceExA (szPath, NULL, &ulBytes, NULL); - StrFormatByteSizeA (ulBytes.u.LowPart, psd->str.u.cStr, MAX_PATH); - } - break; - case 3: /* free size */ - if (_ILIsDrive (pidl)) { - _ILSimpleGetText (pidl, szPath, MAX_PATH); - GetDiskFreeSpaceExA (szPath, &ulBytes, NULL, NULL); - StrFormatByteSizeA (ulBytes.u.LowPart, psd->str.u.cStr, MAX_PATH); - } - break; - } - hr = S_OK; - } - - return hr; -} -static HRESULT WINAPI ISF_MyComputer_fnMapColumnToSCID (IShellFolder2 * iface, UINT column, SHCOLUMNID * pscid) -{ - IGenericSFImpl *This = (IGenericSFImpl *)iface; - FIXME ("(%p)\n", This); - return E_NOTIMPL; -} - -static IShellFolder2Vtbl vt_ShellFolder2 = -{ - ISF_MyComputer_fnQueryInterface, - ISF_MyComputer_fnAddRef, - ISF_MyComputer_fnRelease, - ISF_MyComputer_fnParseDisplayName, - ISF_MyComputer_fnEnumObjects, - ISF_MyComputer_fnBindToObject, - ISF_MyComputer_fnBindToStorage, - ISF_MyComputer_fnCompareIDs, - ISF_MyComputer_fnCreateViewObject, - ISF_MyComputer_fnGetAttributesOf, - ISF_MyComputer_fnGetUIObjectOf, - ISF_MyComputer_fnGetDisplayNameOf, - ISF_MyComputer_fnSetNameOf, - /* ShellFolder2 */ - ISF_MyComputer_fnGetDefaultSearchGUID, - ISF_MyComputer_fnEnumSearches, - ISF_MyComputer_fnGetDefaultColumn, - ISF_MyComputer_fnGetDefaultColumnState, - ISF_MyComputer_fnGetDetailsEx, - ISF_MyComputer_fnGetDetailsOf, - ISF_MyComputer_fnMapColumnToSCID -}; - -/************************************************************************ - * IMCFldr_PersistFolder2_QueryInterface - */ -static HRESULT WINAPI IMCFldr_PersistFolder2_QueryInterface (IPersistFolder2 * iface, REFIID iid, LPVOID * ppvObj) -{ - _ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl, iface); - - TRACE ("(%p)\n", This); - - return IUnknown_QueryInterface (_IUnknown_ (This), iid, ppvObj); -} - -/************************************************************************ - * IMCFldr_PersistFolder2_AddRef - */ -static ULONG WINAPI IMCFldr_PersistFolder2_AddRef (IPersistFolder2 * iface) -{ - _ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl, iface); - - TRACE ("(%p)->(count=%lu)\n", This, This->ref); - - return IUnknown_AddRef (_IUnknown_ (This)); -} - -/************************************************************************ - * ISFPersistFolder_Release - */ -static ULONG WINAPI IMCFldr_PersistFolder2_Release (IPersistFolder2 * iface) -{ - _ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl, iface); - - TRACE ("(%p)->(count=%lu)\n", This, This->ref); - - return IUnknown_Release (_IUnknown_ (This)); -} - -/************************************************************************ - * IMCFldr_PersistFolder2_GetClassID - */ -static HRESULT WINAPI IMCFldr_PersistFolder2_GetClassID (IPersistFolder2 * iface, CLSID * lpClassId) -{ - _ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl, iface); - - TRACE ("(%p)\n", This); - - if (!lpClassId) - return E_POINTER; - *lpClassId = CLSID_MyComputer; - - return S_OK; -} - -/************************************************************************ - * IMCFldr_PersistFolder2_Initialize - * - * NOTES: it makes no sense to change the pidl - */ -static HRESULT WINAPI IMCFldr_PersistFolder2_Initialize (IPersistFolder2 * iface, LPCITEMIDLIST pidl) -{ - _ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl, iface); - TRACE ("(%p)->(%p)\n", This, pidl); - return E_NOTIMPL; -} - -/************************************************************************** - * IPersistFolder2_fnGetCurFolder - */ -static HRESULT WINAPI IMCFldr_PersistFolder2_GetCurFolder (IPersistFolder2 * iface, LPITEMIDLIST * pidl) -{ - _ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl, iface); - - TRACE ("(%p)->(%p)\n", This, pidl); - - if (!pidl) - return E_POINTER; - *pidl = ILClone (This->pidlRoot); - return S_OK; -} - -static IPersistFolder2Vtbl vt_PersistFolder2 = -{ - IMCFldr_PersistFolder2_QueryInterface, - IMCFldr_PersistFolder2_AddRef, - IMCFldr_PersistFolder2_Release, - IMCFldr_PersistFolder2_GetClassID, - IMCFldr_PersistFolder2_Initialize, - IMCFldr_PersistFolder2_GetCurFolder -}; + +/* + * Virtual Workplace folder + * + * Copyright 1997 Marcus Meissner + * Copyright 1998, 1999, 2002 Juergen Schmied + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" +#include "wine/port.h" + +#include +#include +#include +#include + +#define COBJMACROS +#define NONAMELESSUNION +#define NONAMELESSSTRUCT + +#include "winerror.h" +#include "windef.h" +#include "winbase.h" +#include "winreg.h" + +#include "wingdi.h" +#include "pidl.h" +#include "shlguid.h" +#include "enumidlist.h" +#include "undocshell.h" +#include "shell32_main.h" +#include "shresdef.h" +#include "shlwapi.h" +#include "wine/debug.h" +#include "debughlp.h" +#include "shfldr.h" + +WINE_DEFAULT_DEBUG_CHANNEL (shell); + +/*********************************************************************** +* IShellFolder implementation +*/ + +typedef struct { + IShellFolder2Vtbl *lpVtbl; + DWORD ref; + IPersistFolder2Vtbl *lpVtblPersistFolder2; + + /* both paths are parsible from the desktop */ + LPITEMIDLIST pidlRoot; /* absolute pidl */ + int dwAttributes; /* attributes returned by GetAttributesOf FIXME: use it */ +} IGenericSFImpl; + +static struct IShellFolder2Vtbl vt_ShellFolder2; +static struct IPersistFolder2Vtbl vt_PersistFolder2; + +#define _IPersistFolder2_Offset ((int)(&(((IGenericSFImpl*)0)->lpVtblPersistFolder2))) +#define _ICOM_THIS_From_IPersistFolder2(class, name) class* This = (class*)(((char*)name)-_IPersistFolder2_Offset); + +/* + converts This to a interface pointer +*/ +#define _IUnknown_(This) (IUnknown*)&(This->lpVtbl) +#define _IShellFolder_(This) (IShellFolder*)&(This->lpVtbl) +#define _IShellFolder2_(This) (IShellFolder2*)&(This->lpVtbl) + +#define _IPersist_(This) (IPersist*)&(This->lpVtblPersistFolder2) +#define _IPersistFolder_(This) (IPersistFolder*)&(This->lpVtblPersistFolder2) +#define _IPersistFolder2_(This) (IPersistFolder2*)&(This->lpVtblPersistFolder2) + +/*********************************************************************** +* IShellFolder [MyComputer] implementation +*/ + +static shvheader MyComputerSFHeader[] = { + {IDS_SHV_COLUMN1, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 15}, + {IDS_SHV_COLUMN3, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10}, + {IDS_SHV_COLUMN6, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10}, + {IDS_SHV_COLUMN7, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10}, +}; + +#define MYCOMPUTERSHELLVIEWCOLUMNS 4 + +/************************************************************************** +* ISF_MyComputer_Constructor +*/ +HRESULT WINAPI ISF_MyComputer_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv) +{ + IGenericSFImpl *sf; + + TRACE ("unkOut=%p %s\n", pUnkOuter, shdebugstr_guid (riid)); + + if (!ppv) + return E_POINTER; + if (pUnkOuter) + return CLASS_E_NOAGGREGATION; + + sf = (IGenericSFImpl *) LocalAlloc (GMEM_ZEROINIT, sizeof (IGenericSFImpl)); + if (!sf) + return E_OUTOFMEMORY; + + sf->ref = 0; + sf->lpVtbl = &vt_ShellFolder2; + sf->lpVtblPersistFolder2 = &vt_PersistFolder2; + sf->pidlRoot = _ILCreateMyComputer (); /* my qualified pidl */ + + if (!SUCCEEDED (IUnknown_QueryInterface (_IUnknown_ (sf), riid, ppv))) { + IUnknown_Release (_IUnknown_ (sf)); + return E_NOINTERFACE; + } + + TRACE ("--(%p)\n", sf); + return S_OK; +} + +/************************************************************************** + * ISF_MyComputer_fnQueryInterface + * + * NOTES supports not IPersist/IPersistFolder + */ +static HRESULT WINAPI ISF_MyComputer_fnQueryInterface (IShellFolder2 * iface, REFIID riid, LPVOID * ppvObj) +{ + IGenericSFImpl *This = (IGenericSFImpl *)iface; + + TRACE ("(%p)->(%s,%p)\n", This, shdebugstr_guid (riid), ppvObj); + + *ppvObj = NULL; + + if (IsEqualIID (riid, &IID_IUnknown) || + IsEqualIID (riid, &IID_IShellFolder) || IsEqualIID (riid, &IID_IShellFolder2)) { + *ppvObj = This; + } else if (IsEqualIID (riid, &IID_IPersist) || + IsEqualIID (riid, &IID_IPersistFolder) || IsEqualIID (riid, &IID_IPersistFolder2)) { + *ppvObj = _IPersistFolder2_ (This); + } + + if (*ppvObj) { + IUnknown_AddRef ((IUnknown *) (*ppvObj)); + TRACE ("-- Interface: (%p)->(%p)\n", ppvObj, *ppvObj); + return S_OK; + } + TRACE ("-- Interface: E_NOINTERFACE\n"); + return E_NOINTERFACE; +} + +static ULONG WINAPI ISF_MyComputer_fnAddRef (IShellFolder2 * iface) +{ + IGenericSFImpl *This = (IGenericSFImpl *)iface; + + TRACE ("(%p)->(count=%lu)\n", This, This->ref); + + return ++(This->ref); +} + +static ULONG WINAPI ISF_MyComputer_fnRelease (IShellFolder2 * iface) +{ + IGenericSFImpl *This = (IGenericSFImpl *)iface; + + TRACE ("(%p)->(count=%lu)\n", This, This->ref); + + if (!--(This->ref)) { + TRACE ("-- destroying IShellFolder(%p)\n", This); + if (This->pidlRoot) + SHFree (This->pidlRoot); + LocalFree ((HLOCAL) This); + return 0; + } + return This->ref; +} + +/************************************************************************** +* ISF_MyComputer_fnParseDisplayName +*/ +static HRESULT WINAPI +ISF_MyComputer_fnParseDisplayName (IShellFolder2 * iface, + HWND hwndOwner, + LPBC pbc, + LPOLESTR lpszDisplayName, + DWORD * pchEaten, LPITEMIDLIST * ppidl, DWORD * pdwAttributes) +{ + IGenericSFImpl *This = (IGenericSFImpl *)iface; + + HRESULT hr = E_INVALIDARG; + LPCWSTR szNext = NULL; + WCHAR szElement[MAX_PATH]; + LPITEMIDLIST pidlTemp = NULL; + CLSID clsid; + + TRACE ("(%p)->(HWND=%p,%p,%p=%s,%p,pidl=%p,%p)\n", + This, hwndOwner, pbc, lpszDisplayName, debugstr_w (lpszDisplayName), pchEaten, ppidl, pdwAttributes); + + *ppidl = 0; + if (pchEaten) + *pchEaten = 0; /* strange but like the original */ + + /* handle CLSID paths */ + if (lpszDisplayName[0] == ':' && lpszDisplayName[1] == ':') { + szNext = GetNextElementW (lpszDisplayName, szElement, MAX_PATH); + TRACE ("-- element: %s\n", debugstr_w (szElement)); + SHCLSIDFromStringW (szElement + 2, &clsid); + pidlTemp = _ILCreateGuid (PT_GUID, &clsid); + } + /* do we have an absolute path name ? */ + else if (PathGetDriveNumberW (lpszDisplayName) >= 0 && lpszDisplayName[2] == (WCHAR) '\\') { + szNext = GetNextElementW (lpszDisplayName, szElement, MAX_PATH); + szElement[0] = toupper(szElement[0]); /* make drive letter uppercase to enable PIDL comparison */ + pidlTemp = _ILCreateDrive (szElement); + } + + if (szNext && *szNext) { + hr = SHELL32_ParseNextElement (iface, hwndOwner, pbc, &pidlTemp, (LPOLESTR) szNext, pchEaten, pdwAttributes); + } else { + if (pdwAttributes && *pdwAttributes) { + SHELL32_GetItemAttributes (_IShellFolder_ (This), pidlTemp, pdwAttributes); + } + hr = S_OK; + } + + *ppidl = pidlTemp; + + TRACE ("(%p)->(-- ret=0x%08lx)\n", This, hr); + + return hr; +} + +/************************************************************************** + * CreateMyCompEnumList() + */ +static BOOL CreateMyCompEnumList(IEnumIDList *list, DWORD dwFlags) +{ + BOOL ret = TRUE; + + TRACE("(%p)->(flags=0x%08lx) \n",list,dwFlags); + + /*enumerate the folders*/ + if(dwFlags & SHCONTF_FOLDERS) + { + WCHAR wszDriveName[] = {'A', ':', '\\', '\0'}; + DWORD dwDrivemap = GetLogicalDrives(); + HKEY hkey; + + while (ret && wszDriveName[0]<='Z') + { + if(dwDrivemap & 0x00000001L) + ret = AddToEnumList(list, _ILCreateDrive(wszDriveName)); + wszDriveName[0]++; + dwDrivemap = dwDrivemap >> 1; + } + + TRACE("-- (%p)-> enumerate (mycomputer shell extensions)\n",list); + if (ret && !RegOpenKeyExA(HKEY_LOCAL_MACHINE, + "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\explorer\\mycomputer\\NameSpace", + 0, KEY_READ, &hkey)) + { + char iid[50]; + int i=0; + + while (ret) + { + DWORD size = sizeof (iid); + LONG apiRet = RegEnumKeyExA(hkey, i, iid, &size, 0, NULL, NULL, + NULL); + + if (ERROR_SUCCESS == apiRet) + { + /* FIXME: shell extensions, shouldn't the type be + * PT_SHELLEXT? */ + ret = AddToEnumList(list, _ILCreateGuidFromStrA(iid)); + i++; + } + else if (ERROR_NO_MORE_ITEMS == apiRet) + break; + else + ret = FALSE; + } + RegCloseKey(hkey); + } + } + return ret; +} + +/************************************************************************** +* ISF_MyComputer_fnEnumObjects +*/ +static HRESULT WINAPI +ISF_MyComputer_fnEnumObjects (IShellFolder2 * iface, HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST * ppEnumIDList) +{ + IGenericSFImpl *This = (IGenericSFImpl *)iface; + + TRACE ("(%p)->(HWND=%p flags=0x%08lx pplist=%p)\n", This, hwndOwner, dwFlags, ppEnumIDList); + + *ppEnumIDList = IEnumIDList_Constructor(); + if (*ppEnumIDList) + CreateMyCompEnumList(*ppEnumIDList, dwFlags); + + TRACE ("-- (%p)->(new ID List: %p)\n", This, *ppEnumIDList); + + return (*ppEnumIDList) ? S_OK : E_OUTOFMEMORY; +} + +/************************************************************************** +* ISF_MyComputer_fnBindToObject +*/ +static HRESULT WINAPI +ISF_MyComputer_fnBindToObject (IShellFolder2 * iface, LPCITEMIDLIST pidl, + LPBC pbcReserved, REFIID riid, LPVOID * ppvOut) +{ + IGenericSFImpl *This = (IGenericSFImpl *)iface; + + TRACE ("(%p)->(pidl=%p,%p,%s,%p)\n", This, pidl, pbcReserved, shdebugstr_guid (riid), ppvOut); + + return SHELL32_BindToChild (This->pidlRoot, NULL, pidl, riid, ppvOut); +} + +/************************************************************************** +* ISF_MyComputer_fnBindToStorage +*/ +static HRESULT WINAPI +ISF_MyComputer_fnBindToStorage (IShellFolder2 * iface, + LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID * ppvOut) +{ + IGenericSFImpl *This = (IGenericSFImpl *)iface; + + FIXME ("(%p)->(pidl=%p,%p,%s,%p) stub\n", This, pidl, pbcReserved, shdebugstr_guid (riid), ppvOut); + + *ppvOut = NULL; + return E_NOTIMPL; +} + +/************************************************************************** +* ISF_MyComputer_fnCompareIDs +*/ + +static HRESULT WINAPI +ISF_MyComputer_fnCompareIDs (IShellFolder2 * iface, LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) +{ + IGenericSFImpl *This = (IGenericSFImpl *)iface; + + int nReturn; + + TRACE ("(%p)->(0x%08lx,pidl1=%p,pidl2=%p)\n", This, lParam, pidl1, pidl2); + nReturn = SHELL32_CompareIDs (_IShellFolder_ (This), lParam, pidl1, pidl2); + TRACE ("-- %i\n", nReturn); + return nReturn; +} + +/************************************************************************** +* ISF_MyComputer_fnCreateViewObject +*/ +static HRESULT WINAPI +ISF_MyComputer_fnCreateViewObject (IShellFolder2 * iface, HWND hwndOwner, REFIID riid, LPVOID * ppvOut) +{ + IGenericSFImpl *This = (IGenericSFImpl *)iface; + + LPSHELLVIEW pShellView; + HRESULT hr = E_INVALIDARG; + + TRACE ("(%p)->(hwnd=%p,%s,%p)\n", This, hwndOwner, shdebugstr_guid (riid), ppvOut); + + if (ppvOut) { + *ppvOut = NULL; + + if (IsEqualIID (riid, &IID_IDropTarget)) { + WARN ("IDropTarget not implemented\n"); + hr = E_NOTIMPL; + } else if (IsEqualIID (riid, &IID_IContextMenu)) { + WARN ("IContextMenu not implemented\n"); + hr = E_NOTIMPL; + } else if (IsEqualIID (riid, &IID_IShellView)) { + pShellView = IShellView_Constructor ((IShellFolder *) iface); + if (pShellView) { + hr = IShellView_QueryInterface (pShellView, riid, ppvOut); + IShellView_Release (pShellView); + } + } + } + TRACE ("-- (%p)->(interface=%p)\n", This, ppvOut); + return hr; +} + +/************************************************************************** +* ISF_MyComputer_fnGetAttributesOf +*/ +static HRESULT WINAPI +ISF_MyComputer_fnGetAttributesOf (IShellFolder2 * iface, UINT cidl, LPCITEMIDLIST * apidl, DWORD * rgfInOut) +{ + IGenericSFImpl *This = (IGenericSFImpl *)iface; + + HRESULT hr = S_OK; + + TRACE ("(%p)->(cidl=%d apidl=%p mask=0x%08lx)\n", This, cidl, apidl, *rgfInOut); + + if ((!cidl) || (!apidl) || (!rgfInOut)) + return E_INVALIDARG; + + if (*rgfInOut == 0) + *rgfInOut = ~0; + + while (cidl > 0 && *apidl) { + pdump (*apidl); + SHELL32_GetItemAttributes (_IShellFolder_ (This), *apidl, rgfInOut); + apidl++; + cidl--; + } + + TRACE ("-- result=0x%08lx\n", *rgfInOut); + return hr; +} + +/************************************************************************** +* ISF_MyComputer_fnGetUIObjectOf +* +* PARAMETERS +* HWND hwndOwner, //[in ] Parent window for any output +* UINT cidl, //[in ] array size +* LPCITEMIDLIST* apidl, //[in ] simple pidl array +* REFIID riid, //[in ] Requested Interface +* UINT* prgfInOut, //[ ] reserved +* LPVOID* ppvObject) //[out] Resulting Interface +* +*/ +static HRESULT WINAPI +ISF_MyComputer_fnGetUIObjectOf (IShellFolder2 * iface, + HWND hwndOwner, + UINT cidl, LPCITEMIDLIST * apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut) +{ + IGenericSFImpl *This = (IGenericSFImpl *)iface; + + LPITEMIDLIST pidl; + IUnknown *pObj = NULL; + HRESULT hr = E_INVALIDARG; + + TRACE ("(%p)->(%p,%u,apidl=%p,%s,%p,%p)\n", + This, hwndOwner, cidl, apidl, shdebugstr_guid (riid), prgfInOut, ppvOut); + + if (ppvOut) { + *ppvOut = NULL; + + if (IsEqualIID (riid, &IID_IContextMenu) && (cidl >= 1)) { + pObj = (LPUNKNOWN) ISvItemCm_Constructor ((IShellFolder *) iface, This->pidlRoot, apidl, cidl); + hr = S_OK; + } else if (IsEqualIID (riid, &IID_IDataObject) && (cidl >= 1)) { + pObj = (LPUNKNOWN) IDataObject_Constructor (hwndOwner, This->pidlRoot, apidl, cidl); + hr = S_OK; + } else if (IsEqualIID (riid, &IID_IExtractIconA) && (cidl == 1)) { + pidl = ILCombine (This->pidlRoot, apidl[0]); + pObj = (LPUNKNOWN) IExtractIconA_Constructor (pidl); + SHFree (pidl); + hr = S_OK; + } else if (IsEqualIID (riid, &IID_IExtractIconW) && (cidl == 1)) { + pidl = ILCombine (This->pidlRoot, apidl[0]); + pObj = (LPUNKNOWN) IExtractIconW_Constructor (pidl); + SHFree (pidl); + hr = S_OK; + } else if (IsEqualIID (riid, &IID_IDropTarget) && (cidl >= 1)) { + hr = IShellFolder_QueryInterface (iface, &IID_IDropTarget, (LPVOID *) & pObj); + } else if ((IsEqualIID(riid,&IID_IShellLinkW) || IsEqualIID(riid,&IID_IShellLinkA)) + && (cidl == 1)) { + pidl = ILCombine (This->pidlRoot, apidl[0]); + hr = IShellLink_ConstructFromFile(NULL, riid, pidl, (LPVOID*)&pObj); + SHFree (pidl); + } else { + hr = E_NOINTERFACE; + } + + if (SUCCEEDED(hr) && !pObj) + hr = E_OUTOFMEMORY; + + *ppvOut = pObj; + } + TRACE ("(%p)->hr=0x%08lx\n", This, hr); + return hr; +} + +/************************************************************************** +* ISF_MyComputer_fnGetDisplayNameOf +*/ +static HRESULT WINAPI ISF_MyComputer_fnGetDisplayNameOf (IShellFolder2 * iface, LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET strRet) +{ + IGenericSFImpl *This = (IGenericSFImpl *)iface; + + char szPath[MAX_PATH], + szDrive[18]; + int len = 0; + BOOL bSimplePidl; + HRESULT hr = S_OK; + + TRACE ("(%p)->(pidl=%p,0x%08lx,%p)\n", This, pidl, dwFlags, strRet); + pdump (pidl); + + if (!strRet) + return E_INVALIDARG; + + szPath[0] = 0x00; + szDrive[0] = 0x00; + + bSimplePidl = _ILIsPidlSimple (pidl); + + if (!pidl->mkid.cb) { + /* parsing name like ::{...} */ + lstrcpyA (szPath, "::"); + SHELL32_GUIDToStringA(&CLSID_MyComputer, &szPath[2]); + } else if (_ILIsSpecialFolder (pidl)) { + /* take names of special folders only if its only this folder */ + if (bSimplePidl) { + GUID const *clsid; + + if ((clsid = _ILGetGUIDPointer (pidl))) { + if (GET_SHGDN_FOR (dwFlags) == SHGDN_FORPARSING) { + int bWantsForParsing; + + /* + * we can only get a filesystem path from a shellfolder if the value WantsFORPARSING in + * CLSID\\{...}\\shellfolder exists + * exception: the MyComputer folder has this keys not but like any filesystem backed + * folder it needs these behaviour + */ + /* get the "WantsFORPARSING" flag from the registry */ + char szRegPath[100]; + + lstrcpyA (szRegPath, "CLSID\\"); + SHELL32_GUIDToStringA (clsid, &szRegPath[6]); + lstrcatA (szRegPath, "\\shellfolder"); + bWantsForParsing = + (ERROR_SUCCESS == + SHGetValueA (HKEY_CLASSES_ROOT, szRegPath, "WantsFORPARSING", NULL, NULL, NULL)); + + if ((GET_SHGDN_RELATION (dwFlags) == SHGDN_NORMAL) && bWantsForParsing) { + /* we need the filesystem path to the destination folder. Only the folder itself can know it */ + hr = SHELL32_GetDisplayNameOfChild (iface, pidl, dwFlags, szPath, MAX_PATH); + } else { + LPSTR p; + + /* parsing name like ::{...} */ + p = lstrcpyA(szPath, "::") + 2; + p += SHELL32_GUIDToStringA(&CLSID_MyComputer, p); + + lstrcatA(p, "\\::"); + p += 3; + SHELL32_GUIDToStringA(clsid, p); + } + } else { + /* user friendly name */ + HCR_GetClassNameA (clsid, szPath, MAX_PATH); + } + } else + _ILSimpleGetText (pidl, szPath, MAX_PATH); /* append my own path */ + } else { + FIXME ("special folder\n"); + } + } else { + if (!_ILIsDrive (pidl)) { + ERR ("Wrong pidl type\n"); + return E_INVALIDARG; + } + + _ILSimpleGetText (pidl, szPath, MAX_PATH); /* append my own path */ + + /* long view "lw_name (C:)" */ + if (bSimplePidl && !(dwFlags & SHGDN_FORPARSING)) { + DWORD dwVolumeSerialNumber, + dwMaximumComponetLength, + dwFileSystemFlags; + + GetVolumeInformationA (szPath, szDrive, sizeof (szDrive) - 6, &dwVolumeSerialNumber, + &dwMaximumComponetLength, &dwFileSystemFlags, NULL, 0); + strcat (szDrive, " ("); + strncat (szDrive, szPath, 2); + strcat (szDrive, ")"); + strcpy (szPath, szDrive); + } + } + + if (!bSimplePidl) { /* go deeper if needed */ + PathAddBackslashA (szPath); + len = strlen (szPath); + + hr = SHELL32_GetDisplayNameOfChild (iface, pidl, dwFlags | SHGDN_INFOLDER, szPath + len, MAX_PATH - len); + } + + if (SUCCEEDED (hr)) { + strRet->uType = STRRET_CSTR; + lstrcpynA (strRet->u.cStr, szPath, MAX_PATH); + } + + TRACE ("-- (%p)->(%s)\n", This, szPath); + return hr; +} + +/************************************************************************** +* ISF_MyComputer_fnSetNameOf +* Changes the name of a file object or subfolder, possibly changing its item +* identifier in the process. +* +* PARAMETERS +* HWND hwndOwner, //[in ] Owner window for output +* LPCITEMIDLIST pidl, //[in ] simple pidl of item to change +* LPCOLESTR lpszName, //[in ] the items new display name +* DWORD dwFlags, //[in ] SHGNO formatting flags +* LPITEMIDLIST* ppidlOut) //[out] simple pidl returned +*/ +static HRESULT WINAPI ISF_MyComputer_fnSetNameOf (IShellFolder2 * iface, HWND hwndOwner, LPCITEMIDLIST pidl, /*simple pidl */ + LPCOLESTR lpName, DWORD dwFlags, LPITEMIDLIST * pPidlOut) +{ + IGenericSFImpl *This = (IGenericSFImpl *)iface; + FIXME ("(%p)->(%p,pidl=%p,%s,%lu,%p)\n", This, hwndOwner, pidl, debugstr_w (lpName), dwFlags, pPidlOut); + return E_FAIL; +} + +static HRESULT WINAPI ISF_MyComputer_fnGetDefaultSearchGUID (IShellFolder2 * iface, GUID * pguid) +{ + IGenericSFImpl *This = (IGenericSFImpl *)iface; + FIXME ("(%p)\n", This); + return E_NOTIMPL; +} +static HRESULT WINAPI ISF_MyComputer_fnEnumSearches (IShellFolder2 * iface, IEnumExtraSearch ** ppenum) +{ + IGenericSFImpl *This = (IGenericSFImpl *)iface; + FIXME ("(%p)\n", This); + return E_NOTIMPL; +} +static HRESULT WINAPI ISF_MyComputer_fnGetDefaultColumn (IShellFolder2 * iface, DWORD dwRes, ULONG * pSort, ULONG * pDisplay) +{ + IGenericSFImpl *This = (IGenericSFImpl *)iface; + + TRACE ("(%p)\n", This); + + if (pSort) *pSort = 0; + if (pDisplay) *pDisplay = 0; + return S_OK; +} +static HRESULT WINAPI ISF_MyComputer_fnGetDefaultColumnState (IShellFolder2 * iface, UINT iColumn, DWORD * pcsFlags) +{ + IGenericSFImpl *This = (IGenericSFImpl *)iface; + + TRACE ("(%p)\n", This); + + if (!pcsFlags || iColumn >= MYCOMPUTERSHELLVIEWCOLUMNS) return E_INVALIDARG; + *pcsFlags = MyComputerSFHeader[iColumn].pcsFlags; + return S_OK; +} +static HRESULT WINAPI ISF_MyComputer_fnGetDetailsEx (IShellFolder2 * iface, LPCITEMIDLIST pidl, const SHCOLUMNID * pscid, VARIANT * pv) +{ + IGenericSFImpl *This = (IGenericSFImpl *)iface; + FIXME ("(%p)\n", This); + return E_NOTIMPL; +} + +/* FIXME: drive size >4GB is rolling over */ +static HRESULT WINAPI ISF_MyComputer_fnGetDetailsOf (IShellFolder2 * iface, LPCITEMIDLIST pidl, UINT iColumn, SHELLDETAILS * psd) +{ + IGenericSFImpl *This = (IGenericSFImpl *)iface; + HRESULT hr; + + TRACE ("(%p)->(%p %i %p)\n", This, pidl, iColumn, psd); + + if (!psd || iColumn >= MYCOMPUTERSHELLVIEWCOLUMNS) + return E_INVALIDARG; + + if (!pidl) { + psd->fmt = MyComputerSFHeader[iColumn].fmt; + psd->cxChar = MyComputerSFHeader[iColumn].cxChar; + psd->str.uType = STRRET_CSTR; + LoadStringA (shell32_hInstance, MyComputerSFHeader[iColumn].colnameid, psd->str.u.cStr, MAX_PATH); + return S_OK; + } else { + char szPath[MAX_PATH]; + ULARGE_INTEGER ulBytes; + + psd->str.u.cStr[0] = 0x00; + psd->str.uType = STRRET_CSTR; + switch (iColumn) { + case 0: /* name */ + hr = IShellFolder_GetDisplayNameOf (iface, pidl, SHGDN_NORMAL | SHGDN_INFOLDER, &psd->str); + break; + case 1: /* type */ + _ILGetFileType (pidl, psd->str.u.cStr, MAX_PATH); + break; + case 2: /* total size */ + if (_ILIsDrive (pidl)) { + _ILSimpleGetText (pidl, szPath, MAX_PATH); + GetDiskFreeSpaceExA (szPath, NULL, &ulBytes, NULL); + StrFormatByteSizeA (ulBytes.u.LowPart, psd->str.u.cStr, MAX_PATH); + } + break; + case 3: /* free size */ + if (_ILIsDrive (pidl)) { + _ILSimpleGetText (pidl, szPath, MAX_PATH); + GetDiskFreeSpaceExA (szPath, &ulBytes, NULL, NULL); + StrFormatByteSizeA (ulBytes.u.LowPart, psd->str.u.cStr, MAX_PATH); + } + break; + } + hr = S_OK; + } + + return hr; +} +static HRESULT WINAPI ISF_MyComputer_fnMapColumnToSCID (IShellFolder2 * iface, UINT column, SHCOLUMNID * pscid) +{ + IGenericSFImpl *This = (IGenericSFImpl *)iface; + FIXME ("(%p)\n", This); + return E_NOTIMPL; +} + +static IShellFolder2Vtbl vt_ShellFolder2 = +{ + ISF_MyComputer_fnQueryInterface, + ISF_MyComputer_fnAddRef, + ISF_MyComputer_fnRelease, + ISF_MyComputer_fnParseDisplayName, + ISF_MyComputer_fnEnumObjects, + ISF_MyComputer_fnBindToObject, + ISF_MyComputer_fnBindToStorage, + ISF_MyComputer_fnCompareIDs, + ISF_MyComputer_fnCreateViewObject, + ISF_MyComputer_fnGetAttributesOf, + ISF_MyComputer_fnGetUIObjectOf, + ISF_MyComputer_fnGetDisplayNameOf, + ISF_MyComputer_fnSetNameOf, + /* ShellFolder2 */ + ISF_MyComputer_fnGetDefaultSearchGUID, + ISF_MyComputer_fnEnumSearches, + ISF_MyComputer_fnGetDefaultColumn, + ISF_MyComputer_fnGetDefaultColumnState, + ISF_MyComputer_fnGetDetailsEx, + ISF_MyComputer_fnGetDetailsOf, + ISF_MyComputer_fnMapColumnToSCID +}; + +/************************************************************************ + * IMCFldr_PersistFolder2_QueryInterface + */ +static HRESULT WINAPI IMCFldr_PersistFolder2_QueryInterface (IPersistFolder2 * iface, REFIID iid, LPVOID * ppvObj) +{ + _ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl, iface); + + TRACE ("(%p)\n", This); + + return IUnknown_QueryInterface (_IUnknown_ (This), iid, ppvObj); +} + +/************************************************************************ + * IMCFldr_PersistFolder2_AddRef + */ +static ULONG WINAPI IMCFldr_PersistFolder2_AddRef (IPersistFolder2 * iface) +{ + _ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl, iface); + + TRACE ("(%p)->(count=%lu)\n", This, This->ref); + + return IUnknown_AddRef (_IUnknown_ (This)); +} + +/************************************************************************ + * ISFPersistFolder_Release + */ +static ULONG WINAPI IMCFldr_PersistFolder2_Release (IPersistFolder2 * iface) +{ + _ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl, iface); + + TRACE ("(%p)->(count=%lu)\n", This, This->ref); + + return IUnknown_Release (_IUnknown_ (This)); +} + +/************************************************************************ + * IMCFldr_PersistFolder2_GetClassID + */ +static HRESULT WINAPI IMCFldr_PersistFolder2_GetClassID (IPersistFolder2 * iface, CLSID * lpClassId) +{ + _ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl, iface); + + TRACE ("(%p)\n", This); + + if (!lpClassId) + return E_POINTER; + *lpClassId = CLSID_MyComputer; + + return S_OK; +} + +/************************************************************************ + * IMCFldr_PersistFolder2_Initialize + * + * NOTES: it makes no sense to change the pidl + */ +static HRESULT WINAPI IMCFldr_PersistFolder2_Initialize (IPersistFolder2 * iface, LPCITEMIDLIST pidl) +{ + _ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl, iface); + TRACE ("(%p)->(%p)\n", This, pidl); + return E_NOTIMPL; +} + +/************************************************************************** + * IPersistFolder2_fnGetCurFolder + */ +static HRESULT WINAPI IMCFldr_PersistFolder2_GetCurFolder (IPersistFolder2 * iface, LPITEMIDLIST * pidl) +{ + _ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl, iface); + + TRACE ("(%p)->(%p)\n", This, pidl); + + if (!pidl) + return E_POINTER; + *pidl = ILClone (This->pidlRoot); + return S_OK; +} + +static IPersistFolder2Vtbl vt_PersistFolder2 = +{ + IMCFldr_PersistFolder2_QueryInterface, + IMCFldr_PersistFolder2_AddRef, + IMCFldr_PersistFolder2_Release, + IMCFldr_PersistFolder2_GetClassID, + IMCFldr_PersistFolder2_Initialize, + IMCFldr_PersistFolder2_GetCurFolder +}; diff --git a/reactos/lib/shell32/shlexec.c b/reactos/lib/shell32/shlexec.c index d1a251dbf29..14bab166d5f 100644 --- a/reactos/lib/shell32/shlexec.c +++ b/reactos/lib/shell32/shlexec.c @@ -1,1448 +1,1448 @@ -/* - * Shell Library Functions - * - * Copyright 1998 Marcus Meissner - * Copyright 2002 Eric Pouech - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include "config.h" -#include "wine/port.h" - -#include -#include -#include -#include -#ifdef HAVE_UNISTD_H -# include -#endif -#include -#include - -#define COBJMACROS - -#include "windef.h" -#include "winbase.h" -#include "winerror.h" -#include "winreg.h" -#include "winuser.h" -#include "shlwapi.h" -#include "ddeml.h" - -#include "wine/winbase16.h" -#include "shell32_main.h" -#include "pidl.h" - -#include "wine/debug.h" - -WINE_DEFAULT_DEBUG_CHANNEL(exec); - -static const WCHAR wszOpen[] = {'o','p','e','n',0}; -static const WCHAR wszExe[] = {'.','e','x','e',0}; -static const WCHAR wszILPtr[] = {':','%','p',0}; -static const WCHAR wszShell[] = {'\\','s','h','e','l','l','\\',0}; -static const WCHAR wszFolder[] = {'F','o','l','d','e','r',0}; -static const WCHAR wszEmpty[] = {0}; - - -/*********************************************************************** - * SHELL_ArgifyW [Internal] - * - * this function is supposed to expand the escape sequences found in the registry - * some diving reported that the following were used: - * + %1, %2... seem to report to parameter of index N in ShellExecute pmts - * %1 file - * %2 printer - * %3 driver - * %4 port - * %I address of a global item ID (explorer switch /idlist) - * %L seems to be %1 as long filename followed by the 8+3 variation - * %S ??? - * %* all following parameters (see batfile) - * - * FIXME: use 'len' - * FIXME: Careful of going over string boundaries. No checking is done to 'res'... - */ -static BOOL SHELL_ArgifyW(WCHAR* out, int len, const WCHAR* fmt, const WCHAR* lpFile, LPITEMIDLIST pidl, LPCWSTR args) -{ - WCHAR xlpFile[1024]; - BOOL done = FALSE; - PWSTR res = out; - PCWSTR cmd; - LPVOID pv; - - TRACE("%p, %d, %s, %s, %p, %p\n", out, len, debugstr_w(fmt), - debugstr_w(lpFile), pidl, args); - - while (*fmt) - { - if (*fmt == '%') - { - switch (*++fmt) - { - case '\0': - case '%': - *res++ = '%'; - break; - - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - case '0': - case '*': - if (args) - { - if (*fmt == '*') - { - *res++ = '"'; - while(*args) - *res++ = *args++; - *res++ = '"'; - } - else - { - while(*args && !isspace(*args)) - *res++ = *args++; - - while(isspace(*args)) - ++args; - } - break; - } - /* else fall through */ - case '1': - if (!done || (*fmt == '1')) - { - /*FIXME Is the call to SearchPathW() really needed? We already have separated out the parameter string in args. */ - if (SearchPathW(NULL, lpFile, wszExe, sizeof(xlpFile)/sizeof(WCHAR), xlpFile, NULL)) - cmd = xlpFile; - else - cmd = lpFile; - - /* Add double quotation marks unless we already have them - (e.g.: "file://%1" %* for exefile) or unless the arg is already - enclosed in double quotation marks */ - if ((res == out || *(fmt + 1) != '"') && *cmd != '"') - { - *res++ = '"'; - strcpyW(res, cmd); - res += strlenW(cmd); - *res++ = '"'; - } - else - { - strcpyW(res, cmd); - res += strlenW(cmd); - } - } - break; - - /* - * IE uses this a lot for activating things such as windows media - * player. This is not verified to be fully correct but it appears - * to work just fine. - */ - case 'l': - case 'L': - if (lpFile) { - strcpyW(res, lpFile); - res += strlenW(lpFile); - } - break; - - case 'i': - case 'I': - if (pidl) { - HGLOBAL hmem = SHAllocShared(pidl, ILGetSize(pidl), 0); - pv = SHLockShared(hmem, 0); - res += sprintfW(res, wszILPtr, pv); - SHUnlockShared(pv); - } - break; - - default: - /* - * Check if this is a env-variable here... - */ - - /* Make sure that we have at least one more %.*/ - if (strchrW(fmt, '%')) - { - WCHAR tmpBuffer[1024]; - PWSTR tmpB = tmpBuffer; - WCHAR tmpEnvBuff[MAX_PATH]; - DWORD envRet; - - while (*fmt != '%') - *tmpB++ = *fmt++; - *tmpB++ = 0; - - TRACE("Checking %s to be a env-var\n", debugstr_w(tmpBuffer)); - - envRet = GetEnvironmentVariableW(tmpBuffer, tmpEnvBuff, MAX_PATH); - if (envRet == 0 || envRet > MAX_PATH) - strcpyW( res, tmpBuffer ); - else - strcpyW( res, tmpEnvBuff ); - res += strlenW(res); - } - done = TRUE; - break; - } - /* Don't skip past terminator (catch a single '%' at the end) */ - if (*fmt != '\0') - { - fmt++; - } - } - else - *res++ = *fmt++; - } - - *res = '\0'; - - return done; -} - -HRESULT SHELL_GetPathFromIDListForExecuteA(LPCITEMIDLIST pidl, LPSTR pszPath, UINT uOutSize) -{ - STRRET strret; - IShellFolder* desktop; - - HRESULT hr = SHGetDesktopFolder(&desktop); - - if (SUCCEEDED(hr)) { - hr = IShellFolder_GetDisplayNameOf(desktop, pidl, SHGDN_FORPARSING, &strret); - - if (SUCCEEDED(hr)) - StrRetToStrNA(pszPath, uOutSize, &strret, pidl); - - IShellFolder_Release(desktop); - } - - return hr; -} - -HRESULT SHELL_GetPathFromIDListForExecuteW(LPCITEMIDLIST pidl, LPWSTR pszPath, UINT uOutSize) -{ - STRRET strret; - IShellFolder* desktop; - - HRESULT hr = SHGetDesktopFolder(&desktop); - - if (SUCCEEDED(hr)) { - hr = IShellFolder_GetDisplayNameOf(desktop, pidl, SHGDN_FORPARSING, &strret); - - if (SUCCEEDED(hr)) - StrRetToStrNW(pszPath, uOutSize, &strret, pidl); - - IShellFolder_Release(desktop); - } - - return hr; -} - -/************************************************************************* - * SHELL_ResolveShortCutW [Internal] - * read shortcut file at 'wcmd' - */ -static HRESULT SHELL_ResolveShortCutW(LPWSTR wcmd, LPWSTR wargs, LPWSTR wdir, HWND hwnd, LPCWSTR lpVerb, int* pshowcmd, LPITEMIDLIST* ppidl) -{ - IShellFolder* psf; - - HRESULT hr = SHGetDesktopFolder(&psf); - - *ppidl = NULL; - - if (SUCCEEDED(hr)) { - LPITEMIDLIST pidl; - ULONG l; - - hr = IShellFolder_ParseDisplayName(psf, 0, 0, wcmd, &l, &pidl, 0); - - if (SUCCEEDED(hr)) { - IShellLinkW* psl; - - hr = IShellFolder_GetUIObjectOf(psf, NULL, 1, (LPCITEMIDLIST*)&pidl, &IID_IShellLinkW, NULL, (LPVOID*)&psl); - - if (SUCCEEDED(hr)) { - hr = IShellLinkW_Resolve(psl, hwnd, 0); - - if (SUCCEEDED(hr)) { - hr = IShellLinkW_GetPath(psl, wcmd, MAX_PATH, NULL, SLGP_UNCPRIORITY); - - if (SUCCEEDED(hr)) { - if (!*wcmd) { - /* We could not translate the PIDL in the shell link into a valid file system path - so return the PIDL instead. */ - hr = IShellLinkW_GetIDList(psl, ppidl); - - if (SUCCEEDED(hr) && *ppidl) { - /* We got a PIDL instead of a file system path - try to translate it. */ - if (SUCCEEDED(SHELL_GetPathFromIDListW(*ppidl, wcmd, MAX_PATH))) { - SHFree(*ppidl); - *ppidl = NULL; - } - } - } - - if (SUCCEEDED(hr)) { - /* get command line arguments, working directory and display mode if available */ - IShellLinkW_GetWorkingDirectory(psl, wdir, MAX_PATH); - IShellLinkW_GetArguments(psl, wargs, MAX_PATH); - IShellLinkW_GetShowCmd(psl, pshowcmd); - } - } - } - - IShellLinkW_Release(psl); - } - - SHFree(pidl); - } - - IShellFolder_Release(psf); - } - - return hr; -} - -/************************************************************************* - * SHELL_ExecuteW [Internal] - * - */ -static UINT SHELL_ExecuteW(const WCHAR *lpCmd, WCHAR *env, BOOL shWait, - LPSHELLEXECUTEINFOW psei, LPSHELLEXECUTEINFOW psei_out) -{ - STARTUPINFOW startup; - PROCESS_INFORMATION info; - UINT retval = 31; - UINT gcdret = 0; - WCHAR curdir[MAX_PATH]; - - TRACE("Execute %s from directory %s\n", debugstr_w(lpCmd), debugstr_w(psei->lpDirectory)); - /* ShellExecute specifies the command from psei->lpDirectory - * if present. Not from the current dir as CreateProcess does */ - if( psei->lpDirectory && psei->lpDirectory[0] ) - if( ( gcdret = GetCurrentDirectoryW( MAX_PATH, curdir))) - if( !SetCurrentDirectoryW( psei->lpDirectory)) - ERR("cannot set directory %s\n", debugstr_w(psei->lpDirectory)); - ZeroMemory(&startup,sizeof(STARTUPINFOW)); - startup.cb = sizeof(STARTUPINFOW); - startup.dwFlags = STARTF_USESHOWWINDOW; - startup.wShowWindow = psei->nShow; - if (CreateProcessW(NULL, (LPWSTR)lpCmd, NULL, NULL, FALSE, CREATE_UNICODE_ENVIRONMENT, - env, *psei->lpDirectory? psei->lpDirectory: NULL, &startup, &info)) - { - /* Give 30 seconds to the app to come up, if desired. Probably only needed - when starting app immediately before making a DDE connection. */ - if (shWait) - if (WaitForInputIdle( info.hProcess, 30000 ) == WAIT_FAILED) - WARN("WaitForInputIdle failed: Error %ld\n", GetLastError() ); - retval = 33; - if (psei->fMask & SEE_MASK_NOCLOSEPROCESS) - psei_out->hProcess = info.hProcess; - else - CloseHandle( info.hProcess ); - CloseHandle( info.hThread ); - } - else if ((retval = GetLastError()) >= 32) - { - FIXME("Strange error set by CreateProcess: %d\n", retval); - retval = ERROR_BAD_FORMAT; - } - - TRACE("returning %u\n", retval); - - psei_out->hInstApp = (HINSTANCE)retval; - if( gcdret ) - if( !SetCurrentDirectoryW( curdir)) - ERR("cannot return to directory %s\n", debugstr_w(curdir)); - - return retval; -} - - -/*********************************************************************** - * SHELL_BuildEnvW [Internal] - * - * Build the environment for the new process, adding the specified - * path to the PATH variable. Returned pointer must be freed by caller. - */ -static void *SHELL_BuildEnvW( const WCHAR *path ) -{ - static const WCHAR wPath[] = {'P','A','T','H','=',0}; - WCHAR *strings, *new_env; - WCHAR *p, *p2; - int total = strlenW(path) + 1; - BOOL got_path = FALSE; - - if (!(strings = GetEnvironmentStringsW())) return NULL; - p = strings; - while (*p) - { - int len = strlenW(p) + 1; - if (!strncmpiW( p, wPath, 5 )) got_path = TRUE; - total += len; - p += len; - } - if (!got_path) total += 5; /* we need to create PATH */ - total++; /* terminating null */ - - if (!(new_env = HeapAlloc( GetProcessHeap(), 0, total * sizeof(WCHAR) ))) - { - FreeEnvironmentStringsW( strings ); - return NULL; - } - p = strings; - p2 = new_env; - while (*p) - { - int len = strlenW(p) + 1; - memcpy( p2, p, len * sizeof(WCHAR) ); - if (!strncmpiW( p, wPath, 5 )) - { - p2[len - 1] = ';'; - strcpyW( p2 + len, path ); - p2 += strlenW(path) + 1; - } - p += len; - p2 += len; - } - if (!got_path) - { - strcpyW( p2, wPath ); - strcatW( p2, path ); - p2 += strlenW(p2) + 1; - } - *p2 = 0; - FreeEnvironmentStringsW( strings ); - return new_env; -} - - -/*********************************************************************** - * SHELL_TryAppPathW [Internal] - * - * Helper function for SHELL_FindExecutable - * @param lpResult - pointer to a buffer of size MAX_PATH - * On entry: szName is a filename (probably without path separators). - * On exit: if szName found in "App Path", place full path in lpResult, and return true - */ -static BOOL SHELL_TryAppPathW( LPCWSTR szName, LPWSTR lpResult, WCHAR **env) -{ - static const WCHAR wszKeyAppPaths[] = {'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','\\','A','p','p',' ','P','a','t','h','s','\\',0}; - static const WCHAR wPath[] = {'P','a','t','h',0}; - HKEY hkApp = 0; - WCHAR buffer[1024]; - LONG len; - LONG res; - BOOL found = FALSE; - - if (env) *env = NULL; - strcpyW(buffer, wszKeyAppPaths); - strcatW(buffer, szName); - res = RegOpenKeyExW(HKEY_LOCAL_MACHINE, buffer, 0, KEY_READ, &hkApp); - if (res) goto end; - - len = MAX_PATH*sizeof(WCHAR); - res = RegQueryValueW(hkApp, NULL, lpResult, &len); - if (res) goto end; - found = TRUE; - - if (env) - { - DWORD count = sizeof(buffer); - if (!RegQueryValueExW(hkApp, wPath, NULL, NULL, (LPBYTE)buffer, &count) && buffer[0]) - *env = SHELL_BuildEnvW( buffer ); - } - -end: - if (hkApp) RegCloseKey(hkApp); - return found; -} - -static UINT SHELL_FindExecutableByOperation(LPCWSTR lpPath, LPCWSTR lpFile, LPCWSTR lpOperation, LPWSTR key, LPWSTR filetype, LPWSTR command, LONG commandlen) -{ - static const WCHAR wCommand[] = {'\\','c','o','m','m','a','n','d',0}; - - /* Looking for ...buffer\shell\\command */ - strcatW(filetype, wszShell); - strcatW(filetype, lpOperation); - strcatW(filetype, wCommand); - - if (RegQueryValueW(HKEY_CLASSES_ROOT, filetype, command, - &commandlen) == ERROR_SUCCESS) - { - commandlen /= sizeof(WCHAR); - if (key) strcpyW(key, filetype); -#if 0 - LPWSTR tmp; - WCHAR param[256]; - LONG paramlen = sizeof(param); - static const WCHAR wSpace[] = {' ',0}; - - /* FIXME: it seems all Windows version don't behave the same here. - * the doc states that this ddeexec information can be found after - * the exec names. - * on Win98, it doesn't appear, but I think it does on Win2k - */ - /* Get the parameters needed by the application - from the associated ddeexec key */ - tmp = strstrW(filetype, wCommand); - tmp[0] = '\0'; - strcatW(filetype, wDdeexec); - if (RegQueryValueW(HKEY_CLASSES_ROOT, filetype, param, - ¶mlen) == ERROR_SUCCESS) - { - paramlen /= sizeof(WCHAR); - strcatW(command, wSpace); - strcatW(command, param); - commandlen += paramlen; - } -#endif - - command[commandlen] = '\0'; - - return 33; /* FIXME see SHELL_FindExecutable() */ - } - - return 31; /* default - 'No association was found' */ -} - -/************************************************************************* - * SHELL_FindExecutable [Internal] - * - * Utility for code sharing between FindExecutable and ShellExecute - * in: - * lpFile the name of a file - * lpOperation the operation on it (open) - * out: - * lpResult a buffer, big enough :-(, to store the command to do the - * operation on the file - * key a buffer, big enough, to get the key name to do actually the - * command (it'll be used afterwards for more information - * on the operation) - */ -UINT SHELL_FindExecutable(LPCWSTR lpPath, LPCWSTR lpFile, LPCWSTR lpOperation, - LPWSTR lpResult, int resultLen, LPWSTR key, WCHAR **env, LPITEMIDLIST pidl, LPCWSTR args) -{ - static const WCHAR wWindows[] = {'w','i','n','d','o','w','s',0}; - static const WCHAR wPrograms[] = {'p','r','o','g','r','a','m','s',0}; - static const WCHAR wExtensions[] = {'e','x','e',' ','p','i','f',' ','b','a','t',' ','c','m','d',' ','c','o','m',0}; - WCHAR *extension = NULL; /* pointer to file extension */ - WCHAR filetype[256]; /* registry name for this filetype */ - LONG filetypelen = sizeof(filetype); /* length of above */ - WCHAR command[1024]; /* command from registry */ - WCHAR wBuffer[256]; /* Used to GetProfileString */ - UINT retval = 31; /* default - 'No association was found' */ - WCHAR *tok; /* token pointer */ - WCHAR xlpFile[256]; /* result of SearchPath */ - DWORD attribs; /* file attributes */ - - TRACE("%s\n", (lpFile != NULL) ? debugstr_w(lpFile) : "-"); - - xlpFile[0] = '\0'; - lpResult[0] = '\0'; /* Start off with an empty return string */ - if (key) *key = '\0'; - - /* trap NULL parameters on entry */ - if ((lpFile == NULL) || (lpResult == NULL) || (lpOperation == NULL)) - { - WARN("(lpFile=%s,lpResult=%s,lpOperation=%s): NULL parameter\n", - debugstr_w(lpFile), debugstr_w(lpOperation), debugstr_w(lpResult)); - return 2; /* File not found. Close enough, I guess. */ - } - - if (SHELL_TryAppPathW( lpFile, lpResult, env )) - { - TRACE("found %s via App Paths\n", debugstr_w(lpResult)); - return 33; - } - - if (SearchPathW(lpPath, lpFile, wszExe, sizeof(xlpFile)/sizeof(WCHAR), xlpFile, NULL)) - { - TRACE("SearchPathW returned non-zero\n"); - lpFile = xlpFile; - /* Hey, isn't this value ignored? Why make this call? Shouldn't we return here? --dank*/ - } - - attribs = GetFileAttributesW(lpFile); - if (attribs!=INVALID_FILE_ATTRIBUTES && (attribs&FILE_ATTRIBUTE_DIRECTORY)) - { - strcpyW(filetype, wszFolder); - filetypelen = 6; /* strlen("Folder") */ - } - else - { - /* First thing we need is the file's extension */ - extension = strrchrW(xlpFile, '.'); /* Assume last "." is the one; */ - /* File->Run in progman uses */ - /* .\FILE.EXE :( */ - TRACE("xlpFile=%s,extension=%s\n", debugstr_w(xlpFile), debugstr_w(extension)); - - if (extension == NULL || extension[1]==0) - { - WARN("Returning 31 - No association\n"); - return 31; /* no association */ - } - - /* Three places to check: */ - /* 1. win.ini, [windows], programs (NB no leading '.') */ - /* 2. Registry, HKEY_CLASS_ROOT\\shell\open\command */ - /* 3. win.ini, [extensions], extension (NB no leading '.' */ - /* All I know of the order is that registry is checked before */ - /* extensions; however, it'd make sense to check the programs */ - /* section first, so that's what happens here. */ - - /* See if it's a program - if GetProfileString fails, we skip this - * section. Actually, if GetProfileString fails, we've probably - * got a lot more to worry about than running a program... */ - if (GetProfileStringW(wWindows, wPrograms, wExtensions, wBuffer, sizeof(wBuffer)/sizeof(WCHAR)) > 0) - { - CharLowerW(wBuffer); - tok = wBuffer; - while (*tok) - { - WCHAR *p = tok; - while (*p && *p != ' ' && *p != '\t') p++; - if (*p) - { - *p++ = 0; - while (*p == ' ' || *p == '\t') p++; - } - - if (strcmpiW(tok, &extension[1]) == 0) /* have to skip the leading "." */ - { - strcpyW(lpResult, xlpFile); - /* Need to perhaps check that the file has a path - * attached */ - TRACE("found %s\n", debugstr_w(lpResult)); - return 33; - - /* Greater than 32 to indicate success FIXME According to the - * docs, I should be returning a handle for the - * executable. Does this mean I'm supposed to open the - * executable file or something? More RTFM, I guess... */ - } - tok = p; - } - } - - /* Check registry */ - if (RegQueryValueW(HKEY_CLASSES_ROOT, extension, filetype, - &filetypelen) == ERROR_SUCCESS) - { - filetypelen /= sizeof(WCHAR); - filetype[filetypelen] = '\0'; - TRACE("File type: %s\n", debugstr_w(filetype)); - } - } - - if (*filetype) - { - if (lpOperation) - { - /* pass the operation string to SHELL_FindExecutableByOperation() */ - filetype[filetypelen] = '\0'; - retval = SHELL_FindExecutableByOperation(lpPath, lpFile, lpOperation, key, filetype, command, sizeof(command)); - } - else - { - WCHAR operation[MAX_PATH]; - HKEY hkey; - - /* Looking for ...buffer\shell\\command */ - strcatW(filetype, wszShell); - - /* enumerate the operation subkeys in the registry and search for one with an associated command */ - if (RegOpenKeyW(HKEY_CLASSES_ROOT, filetype, &hkey) == ERROR_SUCCESS) - { - int idx = 0; - for(;; ++idx) - { - if (RegEnumKeyW(hkey, idx, operation, MAX_PATH) != ERROR_SUCCESS) - break; - - filetype[filetypelen] = '\0'; - retval = SHELL_FindExecutableByOperation(lpPath, lpFile, operation, key, filetype, command, sizeof(command)); - - if (retval > 32) - break; - } - RegCloseKey(hkey); - } - } - - if (retval > 32) - { - SHELL_ArgifyW(lpResult, resultLen, command, xlpFile, pidl, args); - - /* Remove double quotation marks and command line arguments */ - if (*lpResult == '"') - { - WCHAR *p = lpResult; - while (*(p + 1) != '"') - { - *p = *(p + 1); - p++; - } - *p = '\0'; - } - } - } - else /* Check win.ini */ - { - static const WCHAR wExtensions[] = {'e','x','t','e','n','s','i','o','n','s',0}; - - /* Toss the leading dot */ - extension++; - if (GetProfileStringW(wExtensions, extension, wszEmpty, command, sizeof(command)/sizeof(WCHAR)) > 0) - { - if (strlenW(command) != 0) - { - strcpyW(lpResult, command); - tok = strchrW(lpResult, '^'); /* should be ^.extension? */ - if (tok != NULL) - { - tok[0] = '\0'; - strcatW(lpResult, xlpFile); /* what if no dir in xlpFile? */ - tok = strchrW(command, '^'); /* see above */ - if ((tok != NULL) && (strlenW(tok)>5)) - { - strcatW(lpResult, &tok[5]); - } - } - retval = 33; /* FIXME - see above */ - } - } - } - - TRACE("returning %s\n", debugstr_w(lpResult)); - return retval; -} - -/****************************************************************** - * dde_cb - * - * callback for the DDE connection. not really usefull - */ -static HDDEDATA CALLBACK dde_cb(UINT uType, UINT uFmt, HCONV hConv, - HSZ hsz1, HSZ hsz2, HDDEDATA hData, - ULONG_PTR dwData1, ULONG_PTR dwData2) -{ - TRACE("dde_cb: %04x, %04x, %p, %p, %p, %p, %08lx, %08lx\n", - uType, uFmt, hConv, hsz1, hsz2, hData, dwData1, dwData2); - return NULL; -} - -/****************************************************************** - * dde_connect - * - * ShellExecute helper. Used to do an operation with a DDE connection - * - * Handles both the direct connection (try #1), and if it fails, - * launching an application and trying (#2) to connect to it - * - */ -static unsigned dde_connect(WCHAR* key, WCHAR* start, WCHAR* ddeexec, - const WCHAR* lpFile, WCHAR *env, - LPCWSTR szCommandline, LPITEMIDLIST pidl, SHELL_ExecuteW32 execfunc, - LPSHELLEXECUTEINFOW psei, LPSHELLEXECUTEINFOW psei_out) -{ - static const WCHAR wApplication[] = {'\\','a','p','p','l','i','c','a','t','i','o','n',0}; - static const WCHAR wTopic[] = {'\\','t','o','p','i','c',0}; - WCHAR * endkey = key + strlenW(key); - WCHAR app[256], topic[256], ifexec[256], res[256]; - LONG applen, topiclen, ifexeclen; - WCHAR * exec; - DWORD ddeInst = 0; - DWORD tid; - HSZ hszApp, hszTopic; - HCONV hConv; - HDDEDATA hDdeData; - unsigned ret = 31; - - strcpyW(endkey, wApplication); - applen = sizeof(app); - if (RegQueryValueW(HKEY_CLASSES_ROOT, key, app, &applen) != ERROR_SUCCESS) - { - FIXME("default app name NIY %s\n", debugstr_w(key)); - return 2; - } - - strcpyW(endkey, wTopic); - topiclen = sizeof(topic); - if (RegQueryValueW(HKEY_CLASSES_ROOT, key, topic, &topiclen) != ERROR_SUCCESS) - { - static const WCHAR wSystem[] = {'S','y','s','t','e','m',0}; - strcpyW(topic, wSystem); - } - - if (DdeInitializeW(&ddeInst, dde_cb, APPCMD_CLIENTONLY, 0L) != DMLERR_NO_ERROR) - { - return 2; - } - - hszApp = DdeCreateStringHandleW(ddeInst, app, CP_WINUNICODE); - hszTopic = DdeCreateStringHandleW(ddeInst, topic, CP_WINUNICODE); - - hConv = DdeConnect(ddeInst, hszApp, hszTopic, NULL); - exec = ddeexec; - if (!hConv) - { - static const WCHAR wIfexec[] = {'\\','i','f','e','x','e','c',0}; - TRACE("Launching '%s'\n", debugstr_w(start)); - ret = execfunc(start, env, TRUE, psei, psei_out); - if (ret < 32) - { - TRACE("Couldn't launch\n"); - goto error; - } - hConv = DdeConnect(ddeInst, hszApp, hszTopic, NULL); - if (!hConv) - { - TRACE("Couldn't connect. ret=%d\n", ret); - DdeUninitialize(ddeInst); - SetLastError(ERROR_DDE_FAIL); - return 30; /* whatever */ - } - strcpyW(endkey, wIfexec); - ifexeclen = sizeof(ifexec); - if (RegQueryValueW(HKEY_CLASSES_ROOT, key, ifexec, &ifexeclen) == ERROR_SUCCESS) - { - exec = ifexec; - } - } - - SHELL_ArgifyW(res, sizeof(res)/sizeof(WCHAR), exec, lpFile, pidl, szCommandline); - TRACE("%s %s => %s\n", debugstr_w(exec), debugstr_w(lpFile), debugstr_w(res)); - - /* It's documented in the KB 330337 that IE has a bug and returns - * error DMLERR_NOTPROCESSED on XTYP_EXECUTE request. - */ - hDdeData = DdeClientTransaction((LPBYTE)res, (strlenW(res) + 1) * sizeof(WCHAR), hConv, 0L, 0, - XTYP_EXECUTE, 10000, &tid); - if (hDdeData) - DdeFreeDataHandle(hDdeData); - else - WARN("DdeClientTransaction failed with error %04x\n", DdeGetLastError(ddeInst)); - ret = 33; - - DdeDisconnect(hConv); - - error: - DdeUninitialize(ddeInst); - - return ret; -} - -/************************************************************************* - * execute_from_key [Internal] - */ -static UINT execute_from_key(LPWSTR key, LPCWSTR lpFile, WCHAR *env, LPCWSTR szCommandline, - SHELL_ExecuteW32 execfunc, - LPSHELLEXECUTEINFOW psei, LPSHELLEXECUTEINFOW psei_out) -{ - WCHAR cmd[1024]; - LONG cmdlen = sizeof(cmd); - UINT retval = 31; - - cmd[0] = '\0'; - - /* Get the application for the registry */ - if (RegQueryValueW(HKEY_CLASSES_ROOT, key, cmd, &cmdlen) == ERROR_SUCCESS) - { - static const WCHAR wCommand[] = {'c','o','m','m','a','n','d',0}; - static const WCHAR wDdeexec[] = {'d','d','e','e','x','e','c',0}; - LPWSTR tmp; - WCHAR param[256]; - LONG paramlen = sizeof(param); - - param[0] = '\0'; - - /* Get the parameters needed by the application - from the associated ddeexec key */ - tmp = strstrW(key, wCommand); - assert(tmp); - strcpyW(tmp, wDdeexec); - - if (RegQueryValueW(HKEY_CLASSES_ROOT, key, param, ¶mlen) == ERROR_SUCCESS) - { - TRACE("Got ddeexec %s => %s\n", debugstr_w(key), debugstr_w(param)); - retval = dde_connect(key, cmd, param, lpFile, env, szCommandline, psei->lpIDList, execfunc, psei, psei_out); - } - else - { - /* Is there a replace() function anywhere? */ - cmdlen /= sizeof(WCHAR); - cmd[cmdlen] = '\0'; - SHELL_ArgifyW(param, sizeof(param)/sizeof(WCHAR), cmd, lpFile, psei->lpIDList, szCommandline); - retval = execfunc(param, env, FALSE, psei, psei_out); - } - } - else TRACE("ooch\n"); - - return retval; -} - -/************************************************************************* - * FindExecutableA [SHELL32.@] - */ -HINSTANCE WINAPI FindExecutableA(LPCSTR lpFile, LPCSTR lpDirectory, LPSTR lpResult) -{ - HINSTANCE retval; - WCHAR *wFile = NULL, *wDirectory = NULL; - WCHAR wResult[MAX_PATH]; - - if (lpFile) __SHCloneStrAtoW(&wFile, lpFile); - if (lpDirectory) __SHCloneStrAtoW(&wDirectory, lpDirectory); - - retval = FindExecutableW(wFile, wDirectory, wResult); - WideCharToMultiByte(CP_ACP, 0, wResult, -1, lpResult, MAX_PATH, NULL, NULL); - if (wFile) SHFree( wFile ); - if (wDirectory) SHFree( wDirectory ); - - TRACE("returning %s\n", lpResult); - return (HINSTANCE)retval; -} - -/************************************************************************* - * FindExecutableW [SHELL32.@] - */ -HINSTANCE WINAPI FindExecutableW(LPCWSTR lpFile, LPCWSTR lpDirectory, LPWSTR lpResult) -{ - UINT retval = 31; /* default - 'No association was found' */ - WCHAR old_dir[1024]; - - TRACE("File %s, Dir %s\n", - (lpFile != NULL ? debugstr_w(lpFile) : "-"), (lpDirectory != NULL ? debugstr_w(lpDirectory) : "-")); - - lpResult[0] = '\0'; /* Start off with an empty return string */ - - /* trap NULL parameters on entry */ - if ((lpFile == NULL) || (lpResult == NULL)) - { - /* FIXME - should throw a warning, perhaps! */ - return (HINSTANCE)2; /* File not found. Close enough, I guess. */ - } - - if (lpDirectory) - { - GetCurrentDirectoryW(sizeof(old_dir)/sizeof(WCHAR), old_dir); - SetCurrentDirectoryW(lpDirectory); - } - - retval = SHELL_FindExecutable(lpDirectory, lpFile, wszOpen, lpResult, MAX_PATH, NULL, NULL, NULL, NULL); - - TRACE("returning %s\n", debugstr_w(lpResult)); - if (lpDirectory) - SetCurrentDirectoryW(old_dir); - return (HINSTANCE)retval; -} - -/************************************************************************* - * ShellExecuteExW32 [Internal] - */ -BOOL WINAPI ShellExecuteExW32 (LPSHELLEXECUTEINFOW sei, SHELL_ExecuteW32 execfunc) -{ - static const WCHAR wQuote[] = {'"',0}; - static const WCHAR wSpace[] = {' ',0}; - static const WCHAR wWww[] = {'w','w','w',0}; - static const WCHAR wFile[] = {'f','i','l','e',0}; - static const WCHAR wHttp[] = {'h','t','t','p',':','/','/',0}; - static const WCHAR wExtLnk[] = {'.','l','n','k',0}; - static const WCHAR wExplorer[] = {'e','x','p','l','o','r','e','r','.','e','x','e',0}; - - WCHAR wszApplicationName[MAX_PATH+2], wszParameters[1024], wszDir[MAX_PATH]; - SHELLEXECUTEINFOW sei_tmp; /* modifiable copy of SHELLEXECUTEINFO struct */ - WCHAR wfileName[MAX_PATH]; - WCHAR *env; - WCHAR lpstrProtocol[256]; - LPCWSTR lpFile; - UINT retval = 31; - WCHAR wcmd[1024]; - WCHAR buffer[MAX_PATH]; - const WCHAR* ext; - BOOL done; - - /* make a local copy of the LPSHELLEXECUTEINFO structure and work with this from now on */ - memcpy(&sei_tmp, sei, sizeof(sei_tmp)); - - TRACE("mask=0x%08lx hwnd=%p verb=%s file=%s parm=%s dir=%s show=0x%08x class=%s\n", - sei_tmp.fMask, sei_tmp.hwnd, debugstr_w(sei_tmp.lpVerb), - debugstr_w(sei_tmp.lpFile), debugstr_w(sei_tmp.lpParameters), - debugstr_w(sei_tmp.lpDirectory), sei_tmp.nShow, - (sei_tmp.fMask & SEE_MASK_CLASSNAME) ? debugstr_w(sei_tmp.lpClass) : "not used"); - - sei->hProcess = NULL; - - /* make copies of all path/command strings */ - if (sei_tmp.lpFile) - strcpyW(wszApplicationName, sei_tmp.lpFile); - else - *wszApplicationName = '\0'; - - if (sei_tmp.lpParameters) - strcpyW(wszParameters, sei_tmp.lpParameters); - else - *wszParameters = '\0'; - - if (sei_tmp.lpDirectory) - strcpyW(wszDir, sei_tmp.lpDirectory); - else - *wszDir = '\0'; - - /* adjust string pointers to point to the new buffers */ - sei_tmp.lpFile = wszApplicationName; - sei_tmp.lpParameters = wszParameters; - sei_tmp.lpDirectory = wszDir; - - if (sei_tmp.fMask & (SEE_MASK_INVOKEIDLIST | SEE_MASK_ICON | SEE_MASK_HOTKEY | - SEE_MASK_CONNECTNETDRV | SEE_MASK_FLAG_DDEWAIT | - SEE_MASK_DOENVSUBST | SEE_MASK_FLAG_NO_UI | SEE_MASK_UNICODE | - SEE_MASK_NO_CONSOLE | SEE_MASK_ASYNCOK | SEE_MASK_HMONITOR )) - { - FIXME("flags ignored: 0x%08lx\n", sei_tmp.fMask); - } - - /* process the IDList */ - if (sei_tmp.fMask & SEE_MASK_IDLIST) - { - IShellExecuteHookW* pSEH; - - HRESULT hr = SHBindToParent(sei_tmp.lpIDList, &IID_IShellExecuteHookW, (LPVOID*)&pSEH, NULL); - - if (SUCCEEDED(hr)) - { - hr = IShellExecuteHookW_Execute(pSEH, sei); - - IShellExecuteHookW_Release(pSEH); - - if (hr == S_OK) - return TRUE; - } - - wszApplicationName[0] = '"'; - SHGetPathFromIDListW(sei_tmp.lpIDList, wszApplicationName+1); - strcatW(wszApplicationName, wQuote); - TRACE("-- idlist=%p (%s)\n", sei_tmp.lpIDList, debugstr_w(wszApplicationName)); - } - - if (sei_tmp.fMask & (SEE_MASK_CLASSNAME | SEE_MASK_CLASSKEY)) - { - /* launch a document by fileclass like 'WordPad.Document.1' */ - /* the Commandline contains 'c:\Path\wordpad.exe "%1"' */ - /* FIXME: szCommandline should not be of a fixed size. Fixed to 1024, MAX_PATH is way too short! */ - HCR_GetExecuteCommandW((sei_tmp.fMask & SEE_MASK_CLASSKEY) ? sei_tmp.hkeyClass : NULL, - (sei_tmp.fMask & SEE_MASK_CLASSNAME) ? sei_tmp.lpClass: NULL, - (sei_tmp.lpVerb) ? sei_tmp.lpVerb : wszOpen, - wszParameters, sizeof(wszParameters)/sizeof(WCHAR)); - - /* FIXME: get the extension of lpFile, check if it fits to the lpClass */ - TRACE("SEE_MASK_CLASSNAME->'%s', doc->'%s'\n", debugstr_w(wszParameters), debugstr_w(wszApplicationName)); - - wcmd[0] = '\0'; - done = SHELL_ArgifyW(wcmd, sizeof(wcmd)/sizeof(WCHAR), wszParameters, wszApplicationName, sei_tmp.lpIDList, NULL); - if (!done && wszApplicationName[0]) - { - strcatW(wcmd, wSpace); - strcatW(wcmd, wszApplicationName); - } - retval = execfunc(wcmd, NULL, FALSE, &sei_tmp, sei); - if (retval > 32) - return TRUE; - else - return FALSE; - } - - - /* resolve shell shortcuts */ - ext = PathFindExtensionW(sei_tmp.lpFile); - - if (ext && !strncmpiW(ext, wExtLnk, sizeof(wExtLnk) / sizeof(WCHAR) - 1) && - (ext[sizeof(wExtLnk) / sizeof(WCHAR) - 1] == '\0' || - (sei_tmp.lpFile[0] == '"' && ext[sizeof(wExtLnk) / sizeof(WCHAR) - 1] == '"'))) /* or check for: shell_attribs & SFGAO_LINK */ - { - HRESULT hr; - BOOL Quoted; - - if (wszApplicationName[0] == '"') - { - if (wszApplicationName[strlenW(wszApplicationName) - 1] == '"') - { - wszApplicationName[strlenW(wszApplicationName) - 1] = '\0'; - Quoted = TRUE; - } - else - { - Quoted = FALSE; - } - } - else - { - Quoted = FALSE; - } - /* expand paths before reading shell link */ - if (ExpandEnvironmentStringsW(Quoted ? sei_tmp.lpFile + 1 : sei_tmp.lpFile, buffer, MAX_PATH)) - lstrcpyW(Quoted ? wszApplicationName + 1 : wszApplicationName/*sei_tmp.lpFile*/, buffer); - - if (*sei_tmp.lpParameters) - if (ExpandEnvironmentStringsW(sei_tmp.lpParameters, buffer, MAX_PATH)) - lstrcpyW(wszParameters/*sei_tmp.lpParameters*/, buffer); - - hr = SHELL_ResolveShortCutW((LPWSTR)(Quoted ? sei_tmp.lpFile + 1 : sei_tmp.lpFile), - (LPWSTR)sei_tmp.lpParameters, (LPWSTR)sei_tmp.lpDirectory, - sei_tmp.hwnd, sei_tmp.lpVerb?sei_tmp.lpVerb:wszEmpty, &sei_tmp.nShow, (LPITEMIDLIST*)&sei_tmp.lpIDList); - if (Quoted) - { - wszApplicationName[strlenW(wszApplicationName) + 1] = '\0'; - wszApplicationName[strlenW(wszApplicationName)] = '"'; - } - - if (sei->lpIDList) - sei->fMask |= SEE_MASK_IDLIST; - - if (SUCCEEDED(hr)) - { - /* repeat IDList processing if needed */ - if (sei_tmp.fMask & SEE_MASK_IDLIST) - { - IShellExecuteHookW* pSEH; - - HRESULT hr = SHBindToParent(sei_tmp.lpIDList, &IID_IShellExecuteHookW, (LPVOID*)&pSEH, NULL); - - if (SUCCEEDED(hr)) - { - hr = IShellExecuteHookW_Execute(pSEH, sei); - - IShellExecuteHookW_Release(pSEH); - - if (hr == S_OK) - return TRUE; - } - - TRACE("-- idlist=%p (%s)\n", debugstr_w(sei_tmp.lpIDList), debugstr_w(sei_tmp.lpFile)); - } - } - } - - - /* Has the IDList not yet been translated? */ - if (sei_tmp.fMask & SEE_MASK_IDLIST) - { - /* last chance to translate IDList: now also allow CLSID paths */ - if (SUCCEEDED(SHELL_GetPathFromIDListForExecuteW(sei_tmp.lpIDList, buffer, sizeof(buffer)))) { - if (buffer[0]==':' && buffer[1]==':') { - /* open shell folder for the specified class GUID */ - strcpyW(wszParameters, buffer); - strcpyW(wszApplicationName, wExplorer); - - sei_tmp.fMask &= ~SEE_MASK_INVOKEIDLIST; - } else if (HCR_GetExecuteCommandW(0, wszFolder, sei_tmp.lpVerb?sei_tmp.lpVerb:wszOpen, buffer, sizeof(buffer))) { - SHELL_ArgifyW(wszApplicationName, sizeof(wszApplicationName)/sizeof(WCHAR), buffer, NULL, sei_tmp.lpIDList, NULL); - - sei_tmp.fMask &= ~SEE_MASK_INVOKEIDLIST; - } - } - } - - /* expand environment strings */ - if (ExpandEnvironmentStringsW(sei_tmp.lpFile, buffer, MAX_PATH)) - lstrcpyW(wszApplicationName, buffer); - - if (*sei_tmp.lpParameters) - if (ExpandEnvironmentStringsW(sei_tmp.lpParameters, buffer, MAX_PATH)) - lstrcpyW(wszParameters, buffer); - - if (*sei_tmp.lpDirectory) - if (ExpandEnvironmentStringsW(sei_tmp.lpDirectory, buffer, MAX_PATH)) - lstrcpyW(wszDir, buffer); - - /* Else, try to execute the filename */ - TRACE("execute:%s,%s,%s\n", debugstr_w(wszApplicationName), debugstr_w(wszParameters), debugstr_w(wszDir)); - - /* separate out command line arguments from executable file name */ - if (!*sei_tmp.lpParameters) { - /* If the executable path is quoted, handle the rest of the command line as parameters. */ - if (sei_tmp.lpFile[0] == '"') { - LPWSTR src = wszApplicationName/*sei_tmp.lpFile*/ + 1; - LPWSTR dst = wfileName; - LPWSTR end; - - /* copy the unquoted executable path to 'wfileName' */ - while(*src && *src!='"') - *dst++ = *src++; - - *dst = '\0'; - - if (*src == '"') { - end = ++src; - - while(isspace(*src)) - ++src; - } else - end = src; - - /* copy the parameter string to 'wszParameters' */ - strcpyW(wszParameters, src); - - /* terminate previous command string after the quote character */ - *end = '\0'; - } - else - { - /* If the executable name is not quoted, we have to use this search loop here, - that in CreateProcess() is not sufficient because it does not handle shell links. */ - WCHAR buffer[MAX_PATH], xlpFile[MAX_PATH]; - LPWSTR space, s; - - LPWSTR beg = wszApplicationName/*sei_tmp.lpFile*/; - for(s=beg; (space=strchrW(s, ' ')); s=space+1) { - int idx = space-sei_tmp.lpFile; - strncpyW(buffer, sei_tmp.lpFile, idx); - buffer[idx] = '\0'; - - /*FIXME This finds directory paths if the targeted file name contains spaces. */ - if (SearchPathW(*sei_tmp.lpDirectory? sei_tmp.lpDirectory: NULL, buffer, wszExe, sizeof(xlpFile), xlpFile, NULL)) - { - /* separate out command from parameter string */ - LPCWSTR p = space + 1; - - while(isspaceW(*p)) - ++p; - - strcpyW(wszParameters, p); - *space = '\0'; - - break; - } - } - - strcpyW(wfileName, sei_tmp.lpFile); - } - } else - strcpyW(wfileName, sei_tmp.lpFile); - - lpFile = wfileName; - - if (sei_tmp.lpParameters[0]) { - strcatW(wszApplicationName, wSpace); - strcatW(wszApplicationName, wszParameters); - } - - /* We set the default to open, and that should generally work. - But that is not really the way the MS docs say to do it. */ - if (!sei_tmp.lpVerb) - sei_tmp.lpVerb = wszOpen; - - retval = execfunc(wszApplicationName, NULL, FALSE, &sei_tmp, sei); - if (retval > 32) - return TRUE; - - /* Else, try to find the executable */ - wcmd[0] = '\0'; - retval = SHELL_FindExecutable(sei_tmp.lpDirectory, lpFile, sei_tmp.lpVerb, wcmd, 1024, lpstrProtocol, &env, sei_tmp.lpIDList, sei_tmp.lpParameters); - if (retval > 32) /* Found */ - { - WCHAR wszQuotedCmd[MAX_PATH+2]; - /* Must quote to handle case where cmd contains spaces, - * else security hole if malicious user creates executable file "C:\\Program" - */ - strcpyW(wszQuotedCmd, wQuote); - strcatW(wszQuotedCmd, wcmd); - strcatW(wszQuotedCmd, wQuote); - if (wszParameters[0]) { - strcatW(wszQuotedCmd, wSpace); - strcatW(wszQuotedCmd, wszParameters); - } - TRACE("%s/%s => %s/%s\n", debugstr_w(wszApplicationName), debugstr_w(sei_tmp.lpVerb), debugstr_w(wszQuotedCmd), debugstr_w(lpstrProtocol)); - if (*lpstrProtocol) - retval = execute_from_key(lpstrProtocol, wszApplicationName, env, sei_tmp.lpParameters, execfunc, &sei_tmp, sei); - else - retval = execfunc(wszQuotedCmd, env, FALSE, &sei_tmp, sei); - HeapFree( GetProcessHeap(), 0, env ); - } - else if (PathIsURLW((LPWSTR)lpFile)) /* File not found, check for URL */ - { - static const WCHAR wShell[] = {'\\','s','h','e','l','l','\\',0}; - static const WCHAR wCommand[] = {'\\','c','o','m','m','a','n','d',0}; - LPWSTR lpstrRes; - INT iSize; - - lpstrRes = strchrW(lpFile, ':'); - if (lpstrRes) - iSize = lpstrRes - lpFile; - else - iSize = strlenW(lpFile); - - TRACE("Got URL: %s\n", debugstr_w(lpFile)); - /* Looking for ...protocol\shell\lpOperation\command */ - strncpyW(lpstrProtocol, lpFile, iSize); - lpstrProtocol[iSize] = '\0'; - strcatW(lpstrProtocol, wShell); - strcatW(lpstrProtocol, sei_tmp.lpVerb? sei_tmp.lpVerb: wszOpen); - strcatW(lpstrProtocol, wCommand); - - /* Remove File Protocol from lpFile */ - /* In the case file://path/file */ - if (!strncmpiW(lpFile, wFile, iSize)) - { - lpFile += iSize; - while (*lpFile == ':') lpFile++; - } - retval = execute_from_key(lpstrProtocol, lpFile, NULL, sei_tmp.lpParameters, execfunc, &sei_tmp, sei); - } - /* Check if file specified is in the form www.??????.*** */ - else if (!strncmpiW(lpFile, wWww, 3)) - { - /* if so, append lpFile http:// and call ShellExecute */ - WCHAR lpstrTmpFile[256]; - strcpyW(lpstrTmpFile, wHttp); - strcatW(lpstrTmpFile, lpFile); - retval = (UINT)ShellExecuteW(sei_tmp.hwnd, sei_tmp.lpVerb, lpstrTmpFile, NULL, NULL, 0); - } - - TRACE("retval %u\n", retval); - - if (retval <= 32) - { - sei->hInstApp = (HINSTANCE)retval; - return FALSE; - } - - sei->hInstApp = (HINSTANCE)33; - return TRUE; -} - -/************************************************************************* - * ShellExecuteA [SHELL32.290] - */ -HINSTANCE WINAPI ShellExecuteA(HWND hWnd, LPCSTR lpOperation,LPCSTR lpFile, - LPCSTR lpParameters,LPCSTR lpDirectory, INT iShowCmd) -{ - SHELLEXECUTEINFOA sei; - HANDLE hProcess = 0; - - TRACE("%p,%s,%s,%s,%s,%d\n", - hWnd, lpOperation, lpFile, lpParameters, lpDirectory, iShowCmd); - - sei.cbSize = sizeof(sei); - sei.fMask = 0; - sei.hwnd = hWnd; - sei.lpVerb = lpOperation; - sei.lpFile = lpFile; - sei.lpParameters = lpParameters; - sei.lpDirectory = lpDirectory; - sei.nShow = iShowCmd; - sei.lpIDList = 0; - sei.lpClass = 0; - sei.hkeyClass = 0; - sei.dwHotKey = 0; - sei.hProcess = hProcess; - - ShellExecuteExA (&sei); - return sei.hInstApp; -} - -/************************************************************************* - * ShellExecuteExA [SHELL32.292] - * - */ -BOOL WINAPI ShellExecuteExA (LPSHELLEXECUTEINFOA sei) -{ - SHELLEXECUTEINFOW seiW; - BOOL ret; - WCHAR *wVerb = NULL, *wFile = NULL, *wParameters = NULL, *wDirectory = NULL, *wClass = NULL; - - TRACE("%p\n", sei); - - memcpy(&seiW, sei, sizeof(SHELLEXECUTEINFOW)); - - if (sei->lpVerb) - seiW.lpVerb = __SHCloneStrAtoW(&wVerb, sei->lpVerb); - - if (sei->lpFile) - seiW.lpFile = __SHCloneStrAtoW(&wFile, sei->lpFile); - - if (sei->lpParameters) - seiW.lpParameters = __SHCloneStrAtoW(&wParameters, sei->lpParameters); - - if (sei->lpDirectory) - seiW.lpDirectory = __SHCloneStrAtoW(&wDirectory, sei->lpDirectory); - - if ((sei->fMask & SEE_MASK_CLASSNAME) && sei->lpClass) - seiW.lpClass = __SHCloneStrAtoW(&wClass, sei->lpClass); - else - seiW.lpClass = NULL; - - ret = ShellExecuteExW32 (&seiW, SHELL_ExecuteW); - - sei->hInstApp = seiW.hInstApp; - - if (wVerb) SHFree(wVerb); - if (wFile) SHFree(wFile); - if (wParameters) SHFree(wParameters); - if (wDirectory) SHFree(wDirectory); - if (wClass) SHFree(wClass); - - return ret; -} - -/************************************************************************* - * ShellExecuteExW [SHELL32.293] - * - */ -BOOL WINAPI ShellExecuteExW (LPSHELLEXECUTEINFOW sei) -{ - return ShellExecuteExW32 (sei, SHELL_ExecuteW); -} - -/************************************************************************* - * ShellExecuteW [SHELL32.294] - * from shellapi.h - * WINSHELLAPI HINSTANCE APIENTRY ShellExecuteW(HWND hwnd, LPCWSTR lpOperation, - * LPCWSTR lpFile, LPCWSTR lpParameters, LPCWSTR lpDirectory, INT nShowCmd); - */ -HINSTANCE WINAPI ShellExecuteW(HWND hwnd, LPCWSTR lpOperation, LPCWSTR lpFile, - LPCWSTR lpParameters, LPCWSTR lpDirectory, INT nShowCmd) -{ - SHELLEXECUTEINFOW sei; - HANDLE hProcess = 0; - - TRACE("\n"); - sei.cbSize = sizeof(sei); - sei.fMask = 0; - sei.hwnd = hwnd; - sei.lpVerb = lpOperation; - sei.lpFile = lpFile; - sei.lpParameters = lpParameters; - sei.lpDirectory = lpDirectory; - sei.nShow = nShowCmd; - sei.lpIDList = 0; - sei.lpClass = 0; - sei.hkeyClass = 0; - sei.dwHotKey = 0; - sei.hProcess = hProcess; - - ShellExecuteExW32 (&sei, SHELL_ExecuteW); - return sei.hInstApp; -} +/* + * Shell Library Functions + * + * Copyright 1998 Marcus Meissner + * Copyright 2002 Eric Pouech + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" +#include "wine/port.h" + +#include +#include +#include +#include +#ifdef HAVE_UNISTD_H +# include +#endif +#include +#include + +#define COBJMACROS + +#include "windef.h" +#include "winbase.h" +#include "winerror.h" +#include "winreg.h" +#include "winuser.h" +#include "shlwapi.h" +#include "ddeml.h" + +#include "wine/winbase16.h" +#include "shell32_main.h" +#include "pidl.h" + +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(exec); + +static const WCHAR wszOpen[] = {'o','p','e','n',0}; +static const WCHAR wszExe[] = {'.','e','x','e',0}; +static const WCHAR wszILPtr[] = {':','%','p',0}; +static const WCHAR wszShell[] = {'\\','s','h','e','l','l','\\',0}; +static const WCHAR wszFolder[] = {'F','o','l','d','e','r',0}; +static const WCHAR wszEmpty[] = {0}; + + +/*********************************************************************** + * SHELL_ArgifyW [Internal] + * + * this function is supposed to expand the escape sequences found in the registry + * some diving reported that the following were used: + * + %1, %2... seem to report to parameter of index N in ShellExecute pmts + * %1 file + * %2 printer + * %3 driver + * %4 port + * %I address of a global item ID (explorer switch /idlist) + * %L seems to be %1 as long filename followed by the 8+3 variation + * %S ??? + * %* all following parameters (see batfile) + * + * FIXME: use 'len' + * FIXME: Careful of going over string boundaries. No checking is done to 'res'... + */ +static BOOL SHELL_ArgifyW(WCHAR* out, int len, const WCHAR* fmt, const WCHAR* lpFile, LPITEMIDLIST pidl, LPCWSTR args) +{ + WCHAR xlpFile[1024]; + BOOL done = FALSE; + PWSTR res = out; + PCWSTR cmd; + LPVOID pv; + + TRACE("%p, %d, %s, %s, %p, %p\n", out, len, debugstr_w(fmt), + debugstr_w(lpFile), pidl, args); + + while (*fmt) + { + if (*fmt == '%') + { + switch (*++fmt) + { + case '\0': + case '%': + *res++ = '%'; + break; + + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + case '0': + case '*': + if (args) + { + if (*fmt == '*') + { + *res++ = '"'; + while(*args) + *res++ = *args++; + *res++ = '"'; + } + else + { + while(*args && !isspace(*args)) + *res++ = *args++; + + while(isspace(*args)) + ++args; + } + break; + } + /* else fall through */ + case '1': + if (!done || (*fmt == '1')) + { + /*FIXME Is the call to SearchPathW() really needed? We already have separated out the parameter string in args. */ + if (SearchPathW(NULL, lpFile, wszExe, sizeof(xlpFile)/sizeof(WCHAR), xlpFile, NULL)) + cmd = xlpFile; + else + cmd = lpFile; + + /* Add double quotation marks unless we already have them + (e.g.: "file://%1" %* for exefile) or unless the arg is already + enclosed in double quotation marks */ + if ((res == out || *(fmt + 1) != '"') && *cmd != '"') + { + *res++ = '"'; + strcpyW(res, cmd); + res += strlenW(cmd); + *res++ = '"'; + } + else + { + strcpyW(res, cmd); + res += strlenW(cmd); + } + } + break; + + /* + * IE uses this a lot for activating things such as windows media + * player. This is not verified to be fully correct but it appears + * to work just fine. + */ + case 'l': + case 'L': + if (lpFile) { + strcpyW(res, lpFile); + res += strlenW(lpFile); + } + break; + + case 'i': + case 'I': + if (pidl) { + HGLOBAL hmem = SHAllocShared(pidl, ILGetSize(pidl), 0); + pv = SHLockShared(hmem, 0); + res += sprintfW(res, wszILPtr, pv); + SHUnlockShared(pv); + } + break; + + default: + /* + * Check if this is a env-variable here... + */ + + /* Make sure that we have at least one more %.*/ + if (strchrW(fmt, '%')) + { + WCHAR tmpBuffer[1024]; + PWSTR tmpB = tmpBuffer; + WCHAR tmpEnvBuff[MAX_PATH]; + DWORD envRet; + + while (*fmt != '%') + *tmpB++ = *fmt++; + *tmpB++ = 0; + + TRACE("Checking %s to be a env-var\n", debugstr_w(tmpBuffer)); + + envRet = GetEnvironmentVariableW(tmpBuffer, tmpEnvBuff, MAX_PATH); + if (envRet == 0 || envRet > MAX_PATH) + strcpyW( res, tmpBuffer ); + else + strcpyW( res, tmpEnvBuff ); + res += strlenW(res); + } + done = TRUE; + break; + } + /* Don't skip past terminator (catch a single '%' at the end) */ + if (*fmt != '\0') + { + fmt++; + } + } + else + *res++ = *fmt++; + } + + *res = '\0'; + + return done; +} + +HRESULT SHELL_GetPathFromIDListForExecuteA(LPCITEMIDLIST pidl, LPSTR pszPath, UINT uOutSize) +{ + STRRET strret; + IShellFolder* desktop; + + HRESULT hr = SHGetDesktopFolder(&desktop); + + if (SUCCEEDED(hr)) { + hr = IShellFolder_GetDisplayNameOf(desktop, pidl, SHGDN_FORPARSING, &strret); + + if (SUCCEEDED(hr)) + StrRetToStrNA(pszPath, uOutSize, &strret, pidl); + + IShellFolder_Release(desktop); + } + + return hr; +} + +HRESULT SHELL_GetPathFromIDListForExecuteW(LPCITEMIDLIST pidl, LPWSTR pszPath, UINT uOutSize) +{ + STRRET strret; + IShellFolder* desktop; + + HRESULT hr = SHGetDesktopFolder(&desktop); + + if (SUCCEEDED(hr)) { + hr = IShellFolder_GetDisplayNameOf(desktop, pidl, SHGDN_FORPARSING, &strret); + + if (SUCCEEDED(hr)) + StrRetToStrNW(pszPath, uOutSize, &strret, pidl); + + IShellFolder_Release(desktop); + } + + return hr; +} + +/************************************************************************* + * SHELL_ResolveShortCutW [Internal] + * read shortcut file at 'wcmd' + */ +static HRESULT SHELL_ResolveShortCutW(LPWSTR wcmd, LPWSTR wargs, LPWSTR wdir, HWND hwnd, LPCWSTR lpVerb, int* pshowcmd, LPITEMIDLIST* ppidl) +{ + IShellFolder* psf; + + HRESULT hr = SHGetDesktopFolder(&psf); + + *ppidl = NULL; + + if (SUCCEEDED(hr)) { + LPITEMIDLIST pidl; + ULONG l; + + hr = IShellFolder_ParseDisplayName(psf, 0, 0, wcmd, &l, &pidl, 0); + + if (SUCCEEDED(hr)) { + IShellLinkW* psl; + + hr = IShellFolder_GetUIObjectOf(psf, NULL, 1, (LPCITEMIDLIST*)&pidl, &IID_IShellLinkW, NULL, (LPVOID*)&psl); + + if (SUCCEEDED(hr)) { + hr = IShellLinkW_Resolve(psl, hwnd, 0); + + if (SUCCEEDED(hr)) { + hr = IShellLinkW_GetPath(psl, wcmd, MAX_PATH, NULL, SLGP_UNCPRIORITY); + + if (SUCCEEDED(hr)) { + if (!*wcmd) { + /* We could not translate the PIDL in the shell link into a valid file system path - so return the PIDL instead. */ + hr = IShellLinkW_GetIDList(psl, ppidl); + + if (SUCCEEDED(hr) && *ppidl) { + /* We got a PIDL instead of a file system path - try to translate it. */ + if (SUCCEEDED(SHELL_GetPathFromIDListW(*ppidl, wcmd, MAX_PATH))) { + SHFree(*ppidl); + *ppidl = NULL; + } + } + } + + if (SUCCEEDED(hr)) { + /* get command line arguments, working directory and display mode if available */ + IShellLinkW_GetWorkingDirectory(psl, wdir, MAX_PATH); + IShellLinkW_GetArguments(psl, wargs, MAX_PATH); + IShellLinkW_GetShowCmd(psl, pshowcmd); + } + } + } + + IShellLinkW_Release(psl); + } + + SHFree(pidl); + } + + IShellFolder_Release(psf); + } + + return hr; +} + +/************************************************************************* + * SHELL_ExecuteW [Internal] + * + */ +static UINT SHELL_ExecuteW(const WCHAR *lpCmd, WCHAR *env, BOOL shWait, + LPSHELLEXECUTEINFOW psei, LPSHELLEXECUTEINFOW psei_out) +{ + STARTUPINFOW startup; + PROCESS_INFORMATION info; + UINT retval = 31; + UINT gcdret = 0; + WCHAR curdir[MAX_PATH]; + + TRACE("Execute %s from directory %s\n", debugstr_w(lpCmd), debugstr_w(psei->lpDirectory)); + /* ShellExecute specifies the command from psei->lpDirectory + * if present. Not from the current dir as CreateProcess does */ + if( psei->lpDirectory && psei->lpDirectory[0] ) + if( ( gcdret = GetCurrentDirectoryW( MAX_PATH, curdir))) + if( !SetCurrentDirectoryW( psei->lpDirectory)) + ERR("cannot set directory %s\n", debugstr_w(psei->lpDirectory)); + ZeroMemory(&startup,sizeof(STARTUPINFOW)); + startup.cb = sizeof(STARTUPINFOW); + startup.dwFlags = STARTF_USESHOWWINDOW; + startup.wShowWindow = psei->nShow; + if (CreateProcessW(NULL, (LPWSTR)lpCmd, NULL, NULL, FALSE, CREATE_UNICODE_ENVIRONMENT, + env, *psei->lpDirectory? psei->lpDirectory: NULL, &startup, &info)) + { + /* Give 30 seconds to the app to come up, if desired. Probably only needed + when starting app immediately before making a DDE connection. */ + if (shWait) + if (WaitForInputIdle( info.hProcess, 30000 ) == WAIT_FAILED) + WARN("WaitForInputIdle failed: Error %ld\n", GetLastError() ); + retval = 33; + if (psei->fMask & SEE_MASK_NOCLOSEPROCESS) + psei_out->hProcess = info.hProcess; + else + CloseHandle( info.hProcess ); + CloseHandle( info.hThread ); + } + else if ((retval = GetLastError()) >= 32) + { + FIXME("Strange error set by CreateProcess: %d\n", retval); + retval = ERROR_BAD_FORMAT; + } + + TRACE("returning %u\n", retval); + + psei_out->hInstApp = (HINSTANCE)retval; + if( gcdret ) + if( !SetCurrentDirectoryW( curdir)) + ERR("cannot return to directory %s\n", debugstr_w(curdir)); + + return retval; +} + + +/*********************************************************************** + * SHELL_BuildEnvW [Internal] + * + * Build the environment for the new process, adding the specified + * path to the PATH variable. Returned pointer must be freed by caller. + */ +static void *SHELL_BuildEnvW( const WCHAR *path ) +{ + static const WCHAR wPath[] = {'P','A','T','H','=',0}; + WCHAR *strings, *new_env; + WCHAR *p, *p2; + int total = strlenW(path) + 1; + BOOL got_path = FALSE; + + if (!(strings = GetEnvironmentStringsW())) return NULL; + p = strings; + while (*p) + { + int len = strlenW(p) + 1; + if (!strncmpiW( p, wPath, 5 )) got_path = TRUE; + total += len; + p += len; + } + if (!got_path) total += 5; /* we need to create PATH */ + total++; /* terminating null */ + + if (!(new_env = HeapAlloc( GetProcessHeap(), 0, total * sizeof(WCHAR) ))) + { + FreeEnvironmentStringsW( strings ); + return NULL; + } + p = strings; + p2 = new_env; + while (*p) + { + int len = strlenW(p) + 1; + memcpy( p2, p, len * sizeof(WCHAR) ); + if (!strncmpiW( p, wPath, 5 )) + { + p2[len - 1] = ';'; + strcpyW( p2 + len, path ); + p2 += strlenW(path) + 1; + } + p += len; + p2 += len; + } + if (!got_path) + { + strcpyW( p2, wPath ); + strcatW( p2, path ); + p2 += strlenW(p2) + 1; + } + *p2 = 0; + FreeEnvironmentStringsW( strings ); + return new_env; +} + + +/*********************************************************************** + * SHELL_TryAppPathW [Internal] + * + * Helper function for SHELL_FindExecutable + * @param lpResult - pointer to a buffer of size MAX_PATH + * On entry: szName is a filename (probably without path separators). + * On exit: if szName found in "App Path", place full path in lpResult, and return true + */ +static BOOL SHELL_TryAppPathW( LPCWSTR szName, LPWSTR lpResult, WCHAR **env) +{ + static const WCHAR wszKeyAppPaths[] = {'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','\\','A','p','p',' ','P','a','t','h','s','\\',0}; + static const WCHAR wPath[] = {'P','a','t','h',0}; + HKEY hkApp = 0; + WCHAR buffer[1024]; + LONG len; + LONG res; + BOOL found = FALSE; + + if (env) *env = NULL; + strcpyW(buffer, wszKeyAppPaths); + strcatW(buffer, szName); + res = RegOpenKeyExW(HKEY_LOCAL_MACHINE, buffer, 0, KEY_READ, &hkApp); + if (res) goto end; + + len = MAX_PATH*sizeof(WCHAR); + res = RegQueryValueW(hkApp, NULL, lpResult, &len); + if (res) goto end; + found = TRUE; + + if (env) + { + DWORD count = sizeof(buffer); + if (!RegQueryValueExW(hkApp, wPath, NULL, NULL, (LPBYTE)buffer, &count) && buffer[0]) + *env = SHELL_BuildEnvW( buffer ); + } + +end: + if (hkApp) RegCloseKey(hkApp); + return found; +} + +static UINT SHELL_FindExecutableByOperation(LPCWSTR lpPath, LPCWSTR lpFile, LPCWSTR lpOperation, LPWSTR key, LPWSTR filetype, LPWSTR command, LONG commandlen) +{ + static const WCHAR wCommand[] = {'\\','c','o','m','m','a','n','d',0}; + + /* Looking for ...buffer\shell\\command */ + strcatW(filetype, wszShell); + strcatW(filetype, lpOperation); + strcatW(filetype, wCommand); + + if (RegQueryValueW(HKEY_CLASSES_ROOT, filetype, command, + &commandlen) == ERROR_SUCCESS) + { + commandlen /= sizeof(WCHAR); + if (key) strcpyW(key, filetype); +#if 0 + LPWSTR tmp; + WCHAR param[256]; + LONG paramlen = sizeof(param); + static const WCHAR wSpace[] = {' ',0}; + + /* FIXME: it seems all Windows version don't behave the same here. + * the doc states that this ddeexec information can be found after + * the exec names. + * on Win98, it doesn't appear, but I think it does on Win2k + */ + /* Get the parameters needed by the application + from the associated ddeexec key */ + tmp = strstrW(filetype, wCommand); + tmp[0] = '\0'; + strcatW(filetype, wDdeexec); + if (RegQueryValueW(HKEY_CLASSES_ROOT, filetype, param, + ¶mlen) == ERROR_SUCCESS) + { + paramlen /= sizeof(WCHAR); + strcatW(command, wSpace); + strcatW(command, param); + commandlen += paramlen; + } +#endif + + command[commandlen] = '\0'; + + return 33; /* FIXME see SHELL_FindExecutable() */ + } + + return 31; /* default - 'No association was found' */ +} + +/************************************************************************* + * SHELL_FindExecutable [Internal] + * + * Utility for code sharing between FindExecutable and ShellExecute + * in: + * lpFile the name of a file + * lpOperation the operation on it (open) + * out: + * lpResult a buffer, big enough :-(, to store the command to do the + * operation on the file + * key a buffer, big enough, to get the key name to do actually the + * command (it'll be used afterwards for more information + * on the operation) + */ +UINT SHELL_FindExecutable(LPCWSTR lpPath, LPCWSTR lpFile, LPCWSTR lpOperation, + LPWSTR lpResult, int resultLen, LPWSTR key, WCHAR **env, LPITEMIDLIST pidl, LPCWSTR args) +{ + static const WCHAR wWindows[] = {'w','i','n','d','o','w','s',0}; + static const WCHAR wPrograms[] = {'p','r','o','g','r','a','m','s',0}; + static const WCHAR wExtensions[] = {'e','x','e',' ','p','i','f',' ','b','a','t',' ','c','m','d',' ','c','o','m',0}; + WCHAR *extension = NULL; /* pointer to file extension */ + WCHAR filetype[256]; /* registry name for this filetype */ + LONG filetypelen = sizeof(filetype); /* length of above */ + WCHAR command[1024]; /* command from registry */ + WCHAR wBuffer[256]; /* Used to GetProfileString */ + UINT retval = 31; /* default - 'No association was found' */ + WCHAR *tok; /* token pointer */ + WCHAR xlpFile[256]; /* result of SearchPath */ + DWORD attribs; /* file attributes */ + + TRACE("%s\n", (lpFile != NULL) ? debugstr_w(lpFile) : "-"); + + xlpFile[0] = '\0'; + lpResult[0] = '\0'; /* Start off with an empty return string */ + if (key) *key = '\0'; + + /* trap NULL parameters on entry */ + if ((lpFile == NULL) || (lpResult == NULL) || (lpOperation == NULL)) + { + WARN("(lpFile=%s,lpResult=%s,lpOperation=%s): NULL parameter\n", + debugstr_w(lpFile), debugstr_w(lpOperation), debugstr_w(lpResult)); + return 2; /* File not found. Close enough, I guess. */ + } + + if (SHELL_TryAppPathW( lpFile, lpResult, env )) + { + TRACE("found %s via App Paths\n", debugstr_w(lpResult)); + return 33; + } + + if (SearchPathW(lpPath, lpFile, wszExe, sizeof(xlpFile)/sizeof(WCHAR), xlpFile, NULL)) + { + TRACE("SearchPathW returned non-zero\n"); + lpFile = xlpFile; + /* Hey, isn't this value ignored? Why make this call? Shouldn't we return here? --dank*/ + } + + attribs = GetFileAttributesW(lpFile); + if (attribs!=INVALID_FILE_ATTRIBUTES && (attribs&FILE_ATTRIBUTE_DIRECTORY)) + { + strcpyW(filetype, wszFolder); + filetypelen = 6; /* strlen("Folder") */ + } + else + { + /* First thing we need is the file's extension */ + extension = strrchrW(xlpFile, '.'); /* Assume last "." is the one; */ + /* File->Run in progman uses */ + /* .\FILE.EXE :( */ + TRACE("xlpFile=%s,extension=%s\n", debugstr_w(xlpFile), debugstr_w(extension)); + + if (extension == NULL || extension[1]==0) + { + WARN("Returning 31 - No association\n"); + return 31; /* no association */ + } + + /* Three places to check: */ + /* 1. win.ini, [windows], programs (NB no leading '.') */ + /* 2. Registry, HKEY_CLASS_ROOT\\shell\open\command */ + /* 3. win.ini, [extensions], extension (NB no leading '.' */ + /* All I know of the order is that registry is checked before */ + /* extensions; however, it'd make sense to check the programs */ + /* section first, so that's what happens here. */ + + /* See if it's a program - if GetProfileString fails, we skip this + * section. Actually, if GetProfileString fails, we've probably + * got a lot more to worry about than running a program... */ + if (GetProfileStringW(wWindows, wPrograms, wExtensions, wBuffer, sizeof(wBuffer)/sizeof(WCHAR)) > 0) + { + CharLowerW(wBuffer); + tok = wBuffer; + while (*tok) + { + WCHAR *p = tok; + while (*p && *p != ' ' && *p != '\t') p++; + if (*p) + { + *p++ = 0; + while (*p == ' ' || *p == '\t') p++; + } + + if (strcmpiW(tok, &extension[1]) == 0) /* have to skip the leading "." */ + { + strcpyW(lpResult, xlpFile); + /* Need to perhaps check that the file has a path + * attached */ + TRACE("found %s\n", debugstr_w(lpResult)); + return 33; + + /* Greater than 32 to indicate success FIXME According to the + * docs, I should be returning a handle for the + * executable. Does this mean I'm supposed to open the + * executable file or something? More RTFM, I guess... */ + } + tok = p; + } + } + + /* Check registry */ + if (RegQueryValueW(HKEY_CLASSES_ROOT, extension, filetype, + &filetypelen) == ERROR_SUCCESS) + { + filetypelen /= sizeof(WCHAR); + filetype[filetypelen] = '\0'; + TRACE("File type: %s\n", debugstr_w(filetype)); + } + } + + if (*filetype) + { + if (lpOperation) + { + /* pass the operation string to SHELL_FindExecutableByOperation() */ + filetype[filetypelen] = '\0'; + retval = SHELL_FindExecutableByOperation(lpPath, lpFile, lpOperation, key, filetype, command, sizeof(command)); + } + else + { + WCHAR operation[MAX_PATH]; + HKEY hkey; + + /* Looking for ...buffer\shell\\command */ + strcatW(filetype, wszShell); + + /* enumerate the operation subkeys in the registry and search for one with an associated command */ + if (RegOpenKeyW(HKEY_CLASSES_ROOT, filetype, &hkey) == ERROR_SUCCESS) + { + int idx = 0; + for(;; ++idx) + { + if (RegEnumKeyW(hkey, idx, operation, MAX_PATH) != ERROR_SUCCESS) + break; + + filetype[filetypelen] = '\0'; + retval = SHELL_FindExecutableByOperation(lpPath, lpFile, operation, key, filetype, command, sizeof(command)); + + if (retval > 32) + break; + } + RegCloseKey(hkey); + } + } + + if (retval > 32) + { + SHELL_ArgifyW(lpResult, resultLen, command, xlpFile, pidl, args); + + /* Remove double quotation marks and command line arguments */ + if (*lpResult == '"') + { + WCHAR *p = lpResult; + while (*(p + 1) != '"') + { + *p = *(p + 1); + p++; + } + *p = '\0'; + } + } + } + else /* Check win.ini */ + { + static const WCHAR wExtensions[] = {'e','x','t','e','n','s','i','o','n','s',0}; + + /* Toss the leading dot */ + extension++; + if (GetProfileStringW(wExtensions, extension, wszEmpty, command, sizeof(command)/sizeof(WCHAR)) > 0) + { + if (strlenW(command) != 0) + { + strcpyW(lpResult, command); + tok = strchrW(lpResult, '^'); /* should be ^.extension? */ + if (tok != NULL) + { + tok[0] = '\0'; + strcatW(lpResult, xlpFile); /* what if no dir in xlpFile? */ + tok = strchrW(command, '^'); /* see above */ + if ((tok != NULL) && (strlenW(tok)>5)) + { + strcatW(lpResult, &tok[5]); + } + } + retval = 33; /* FIXME - see above */ + } + } + } + + TRACE("returning %s\n", debugstr_w(lpResult)); + return retval; +} + +/****************************************************************** + * dde_cb + * + * callback for the DDE connection. not really usefull + */ +static HDDEDATA CALLBACK dde_cb(UINT uType, UINT uFmt, HCONV hConv, + HSZ hsz1, HSZ hsz2, HDDEDATA hData, + ULONG_PTR dwData1, ULONG_PTR dwData2) +{ + TRACE("dde_cb: %04x, %04x, %p, %p, %p, %p, %08lx, %08lx\n", + uType, uFmt, hConv, hsz1, hsz2, hData, dwData1, dwData2); + return NULL; +} + +/****************************************************************** + * dde_connect + * + * ShellExecute helper. Used to do an operation with a DDE connection + * + * Handles both the direct connection (try #1), and if it fails, + * launching an application and trying (#2) to connect to it + * + */ +static unsigned dde_connect(WCHAR* key, WCHAR* start, WCHAR* ddeexec, + const WCHAR* lpFile, WCHAR *env, + LPCWSTR szCommandline, LPITEMIDLIST pidl, SHELL_ExecuteW32 execfunc, + LPSHELLEXECUTEINFOW psei, LPSHELLEXECUTEINFOW psei_out) +{ + static const WCHAR wApplication[] = {'\\','a','p','p','l','i','c','a','t','i','o','n',0}; + static const WCHAR wTopic[] = {'\\','t','o','p','i','c',0}; + WCHAR * endkey = key + strlenW(key); + WCHAR app[256], topic[256], ifexec[256], res[256]; + LONG applen, topiclen, ifexeclen; + WCHAR * exec; + DWORD ddeInst = 0; + DWORD tid; + HSZ hszApp, hszTopic; + HCONV hConv; + HDDEDATA hDdeData; + unsigned ret = 31; + + strcpyW(endkey, wApplication); + applen = sizeof(app); + if (RegQueryValueW(HKEY_CLASSES_ROOT, key, app, &applen) != ERROR_SUCCESS) + { + FIXME("default app name NIY %s\n", debugstr_w(key)); + return 2; + } + + strcpyW(endkey, wTopic); + topiclen = sizeof(topic); + if (RegQueryValueW(HKEY_CLASSES_ROOT, key, topic, &topiclen) != ERROR_SUCCESS) + { + static const WCHAR wSystem[] = {'S','y','s','t','e','m',0}; + strcpyW(topic, wSystem); + } + + if (DdeInitializeW(&ddeInst, dde_cb, APPCMD_CLIENTONLY, 0L) != DMLERR_NO_ERROR) + { + return 2; + } + + hszApp = DdeCreateStringHandleW(ddeInst, app, CP_WINUNICODE); + hszTopic = DdeCreateStringHandleW(ddeInst, topic, CP_WINUNICODE); + + hConv = DdeConnect(ddeInst, hszApp, hszTopic, NULL); + exec = ddeexec; + if (!hConv) + { + static const WCHAR wIfexec[] = {'\\','i','f','e','x','e','c',0}; + TRACE("Launching '%s'\n", debugstr_w(start)); + ret = execfunc(start, env, TRUE, psei, psei_out); + if (ret < 32) + { + TRACE("Couldn't launch\n"); + goto error; + } + hConv = DdeConnect(ddeInst, hszApp, hszTopic, NULL); + if (!hConv) + { + TRACE("Couldn't connect. ret=%d\n", ret); + DdeUninitialize(ddeInst); + SetLastError(ERROR_DDE_FAIL); + return 30; /* whatever */ + } + strcpyW(endkey, wIfexec); + ifexeclen = sizeof(ifexec); + if (RegQueryValueW(HKEY_CLASSES_ROOT, key, ifexec, &ifexeclen) == ERROR_SUCCESS) + { + exec = ifexec; + } + } + + SHELL_ArgifyW(res, sizeof(res)/sizeof(WCHAR), exec, lpFile, pidl, szCommandline); + TRACE("%s %s => %s\n", debugstr_w(exec), debugstr_w(lpFile), debugstr_w(res)); + + /* It's documented in the KB 330337 that IE has a bug and returns + * error DMLERR_NOTPROCESSED on XTYP_EXECUTE request. + */ + hDdeData = DdeClientTransaction((LPBYTE)res, (strlenW(res) + 1) * sizeof(WCHAR), hConv, 0L, 0, + XTYP_EXECUTE, 10000, &tid); + if (hDdeData) + DdeFreeDataHandle(hDdeData); + else + WARN("DdeClientTransaction failed with error %04x\n", DdeGetLastError(ddeInst)); + ret = 33; + + DdeDisconnect(hConv); + + error: + DdeUninitialize(ddeInst); + + return ret; +} + +/************************************************************************* + * execute_from_key [Internal] + */ +static UINT execute_from_key(LPWSTR key, LPCWSTR lpFile, WCHAR *env, LPCWSTR szCommandline, + SHELL_ExecuteW32 execfunc, + LPSHELLEXECUTEINFOW psei, LPSHELLEXECUTEINFOW psei_out) +{ + WCHAR cmd[1024]; + LONG cmdlen = sizeof(cmd); + UINT retval = 31; + + cmd[0] = '\0'; + + /* Get the application for the registry */ + if (RegQueryValueW(HKEY_CLASSES_ROOT, key, cmd, &cmdlen) == ERROR_SUCCESS) + { + static const WCHAR wCommand[] = {'c','o','m','m','a','n','d',0}; + static const WCHAR wDdeexec[] = {'d','d','e','e','x','e','c',0}; + LPWSTR tmp; + WCHAR param[256]; + LONG paramlen = sizeof(param); + + param[0] = '\0'; + + /* Get the parameters needed by the application + from the associated ddeexec key */ + tmp = strstrW(key, wCommand); + assert(tmp); + strcpyW(tmp, wDdeexec); + + if (RegQueryValueW(HKEY_CLASSES_ROOT, key, param, ¶mlen) == ERROR_SUCCESS) + { + TRACE("Got ddeexec %s => %s\n", debugstr_w(key), debugstr_w(param)); + retval = dde_connect(key, cmd, param, lpFile, env, szCommandline, psei->lpIDList, execfunc, psei, psei_out); + } + else + { + /* Is there a replace() function anywhere? */ + cmdlen /= sizeof(WCHAR); + cmd[cmdlen] = '\0'; + SHELL_ArgifyW(param, sizeof(param)/sizeof(WCHAR), cmd, lpFile, psei->lpIDList, szCommandline); + retval = execfunc(param, env, FALSE, psei, psei_out); + } + } + else TRACE("ooch\n"); + + return retval; +} + +/************************************************************************* + * FindExecutableA [SHELL32.@] + */ +HINSTANCE WINAPI FindExecutableA(LPCSTR lpFile, LPCSTR lpDirectory, LPSTR lpResult) +{ + HINSTANCE retval; + WCHAR *wFile = NULL, *wDirectory = NULL; + WCHAR wResult[MAX_PATH]; + + if (lpFile) __SHCloneStrAtoW(&wFile, lpFile); + if (lpDirectory) __SHCloneStrAtoW(&wDirectory, lpDirectory); + + retval = FindExecutableW(wFile, wDirectory, wResult); + WideCharToMultiByte(CP_ACP, 0, wResult, -1, lpResult, MAX_PATH, NULL, NULL); + if (wFile) SHFree( wFile ); + if (wDirectory) SHFree( wDirectory ); + + TRACE("returning %s\n", lpResult); + return (HINSTANCE)retval; +} + +/************************************************************************* + * FindExecutableW [SHELL32.@] + */ +HINSTANCE WINAPI FindExecutableW(LPCWSTR lpFile, LPCWSTR lpDirectory, LPWSTR lpResult) +{ + UINT retval = 31; /* default - 'No association was found' */ + WCHAR old_dir[1024]; + + TRACE("File %s, Dir %s\n", + (lpFile != NULL ? debugstr_w(lpFile) : "-"), (lpDirectory != NULL ? debugstr_w(lpDirectory) : "-")); + + lpResult[0] = '\0'; /* Start off with an empty return string */ + + /* trap NULL parameters on entry */ + if ((lpFile == NULL) || (lpResult == NULL)) + { + /* FIXME - should throw a warning, perhaps! */ + return (HINSTANCE)2; /* File not found. Close enough, I guess. */ + } + + if (lpDirectory) + { + GetCurrentDirectoryW(sizeof(old_dir)/sizeof(WCHAR), old_dir); + SetCurrentDirectoryW(lpDirectory); + } + + retval = SHELL_FindExecutable(lpDirectory, lpFile, wszOpen, lpResult, MAX_PATH, NULL, NULL, NULL, NULL); + + TRACE("returning %s\n", debugstr_w(lpResult)); + if (lpDirectory) + SetCurrentDirectoryW(old_dir); + return (HINSTANCE)retval; +} + +/************************************************************************* + * ShellExecuteExW32 [Internal] + */ +BOOL WINAPI ShellExecuteExW32 (LPSHELLEXECUTEINFOW sei, SHELL_ExecuteW32 execfunc) +{ + static const WCHAR wQuote[] = {'"',0}; + static const WCHAR wSpace[] = {' ',0}; + static const WCHAR wWww[] = {'w','w','w',0}; + static const WCHAR wFile[] = {'f','i','l','e',0}; + static const WCHAR wHttp[] = {'h','t','t','p',':','/','/',0}; + static const WCHAR wExtLnk[] = {'.','l','n','k',0}; + static const WCHAR wExplorer[] = {'e','x','p','l','o','r','e','r','.','e','x','e',0}; + + WCHAR wszApplicationName[MAX_PATH+2], wszParameters[1024], wszDir[MAX_PATH]; + SHELLEXECUTEINFOW sei_tmp; /* modifiable copy of SHELLEXECUTEINFO struct */ + WCHAR wfileName[MAX_PATH]; + WCHAR *env; + WCHAR lpstrProtocol[256]; + LPCWSTR lpFile; + UINT retval = 31; + WCHAR wcmd[1024]; + WCHAR buffer[MAX_PATH]; + const WCHAR* ext; + BOOL done; + + /* make a local copy of the LPSHELLEXECUTEINFO structure and work with this from now on */ + memcpy(&sei_tmp, sei, sizeof(sei_tmp)); + + TRACE("mask=0x%08lx hwnd=%p verb=%s file=%s parm=%s dir=%s show=0x%08x class=%s\n", + sei_tmp.fMask, sei_tmp.hwnd, debugstr_w(sei_tmp.lpVerb), + debugstr_w(sei_tmp.lpFile), debugstr_w(sei_tmp.lpParameters), + debugstr_w(sei_tmp.lpDirectory), sei_tmp.nShow, + (sei_tmp.fMask & SEE_MASK_CLASSNAME) ? debugstr_w(sei_tmp.lpClass) : "not used"); + + sei->hProcess = NULL; + + /* make copies of all path/command strings */ + if (sei_tmp.lpFile) + strcpyW(wszApplicationName, sei_tmp.lpFile); + else + *wszApplicationName = '\0'; + + if (sei_tmp.lpParameters) + strcpyW(wszParameters, sei_tmp.lpParameters); + else + *wszParameters = '\0'; + + if (sei_tmp.lpDirectory) + strcpyW(wszDir, sei_tmp.lpDirectory); + else + *wszDir = '\0'; + + /* adjust string pointers to point to the new buffers */ + sei_tmp.lpFile = wszApplicationName; + sei_tmp.lpParameters = wszParameters; + sei_tmp.lpDirectory = wszDir; + + if (sei_tmp.fMask & (SEE_MASK_INVOKEIDLIST | SEE_MASK_ICON | SEE_MASK_HOTKEY | + SEE_MASK_CONNECTNETDRV | SEE_MASK_FLAG_DDEWAIT | + SEE_MASK_DOENVSUBST | SEE_MASK_FLAG_NO_UI | SEE_MASK_UNICODE | + SEE_MASK_NO_CONSOLE | SEE_MASK_ASYNCOK | SEE_MASK_HMONITOR )) + { + FIXME("flags ignored: 0x%08lx\n", sei_tmp.fMask); + } + + /* process the IDList */ + if (sei_tmp.fMask & SEE_MASK_IDLIST) + { + IShellExecuteHookW* pSEH; + + HRESULT hr = SHBindToParent(sei_tmp.lpIDList, &IID_IShellExecuteHookW, (LPVOID*)&pSEH, NULL); + + if (SUCCEEDED(hr)) + { + hr = IShellExecuteHookW_Execute(pSEH, sei); + + IShellExecuteHookW_Release(pSEH); + + if (hr == S_OK) + return TRUE; + } + + wszApplicationName[0] = '"'; + SHGetPathFromIDListW(sei_tmp.lpIDList, wszApplicationName+1); + strcatW(wszApplicationName, wQuote); + TRACE("-- idlist=%p (%s)\n", sei_tmp.lpIDList, debugstr_w(wszApplicationName)); + } + + if (sei_tmp.fMask & (SEE_MASK_CLASSNAME | SEE_MASK_CLASSKEY)) + { + /* launch a document by fileclass like 'WordPad.Document.1' */ + /* the Commandline contains 'c:\Path\wordpad.exe "%1"' */ + /* FIXME: szCommandline should not be of a fixed size. Fixed to 1024, MAX_PATH is way too short! */ + HCR_GetExecuteCommandW((sei_tmp.fMask & SEE_MASK_CLASSKEY) ? sei_tmp.hkeyClass : NULL, + (sei_tmp.fMask & SEE_MASK_CLASSNAME) ? sei_tmp.lpClass: NULL, + (sei_tmp.lpVerb) ? sei_tmp.lpVerb : wszOpen, + wszParameters, sizeof(wszParameters)/sizeof(WCHAR)); + + /* FIXME: get the extension of lpFile, check if it fits to the lpClass */ + TRACE("SEE_MASK_CLASSNAME->'%s', doc->'%s'\n", debugstr_w(wszParameters), debugstr_w(wszApplicationName)); + + wcmd[0] = '\0'; + done = SHELL_ArgifyW(wcmd, sizeof(wcmd)/sizeof(WCHAR), wszParameters, wszApplicationName, sei_tmp.lpIDList, NULL); + if (!done && wszApplicationName[0]) + { + strcatW(wcmd, wSpace); + strcatW(wcmd, wszApplicationName); + } + retval = execfunc(wcmd, NULL, FALSE, &sei_tmp, sei); + if (retval > 32) + return TRUE; + else + return FALSE; + } + + + /* resolve shell shortcuts */ + ext = PathFindExtensionW(sei_tmp.lpFile); + + if (ext && !strncmpiW(ext, wExtLnk, sizeof(wExtLnk) / sizeof(WCHAR) - 1) && + (ext[sizeof(wExtLnk) / sizeof(WCHAR) - 1] == '\0' || + (sei_tmp.lpFile[0] == '"' && ext[sizeof(wExtLnk) / sizeof(WCHAR) - 1] == '"'))) /* or check for: shell_attribs & SFGAO_LINK */ + { + HRESULT hr; + BOOL Quoted; + + if (wszApplicationName[0] == '"') + { + if (wszApplicationName[strlenW(wszApplicationName) - 1] == '"') + { + wszApplicationName[strlenW(wszApplicationName) - 1] = '\0'; + Quoted = TRUE; + } + else + { + Quoted = FALSE; + } + } + else + { + Quoted = FALSE; + } + /* expand paths before reading shell link */ + if (ExpandEnvironmentStringsW(Quoted ? sei_tmp.lpFile + 1 : sei_tmp.lpFile, buffer, MAX_PATH)) + lstrcpyW(Quoted ? wszApplicationName + 1 : wszApplicationName/*sei_tmp.lpFile*/, buffer); + + if (*sei_tmp.lpParameters) + if (ExpandEnvironmentStringsW(sei_tmp.lpParameters, buffer, MAX_PATH)) + lstrcpyW(wszParameters/*sei_tmp.lpParameters*/, buffer); + + hr = SHELL_ResolveShortCutW((LPWSTR)(Quoted ? sei_tmp.lpFile + 1 : sei_tmp.lpFile), + (LPWSTR)sei_tmp.lpParameters, (LPWSTR)sei_tmp.lpDirectory, + sei_tmp.hwnd, sei_tmp.lpVerb?sei_tmp.lpVerb:wszEmpty, &sei_tmp.nShow, (LPITEMIDLIST*)&sei_tmp.lpIDList); + if (Quoted) + { + wszApplicationName[strlenW(wszApplicationName) + 1] = '\0'; + wszApplicationName[strlenW(wszApplicationName)] = '"'; + } + + if (sei->lpIDList) + sei->fMask |= SEE_MASK_IDLIST; + + if (SUCCEEDED(hr)) + { + /* repeat IDList processing if needed */ + if (sei_tmp.fMask & SEE_MASK_IDLIST) + { + IShellExecuteHookW* pSEH; + + HRESULT hr = SHBindToParent(sei_tmp.lpIDList, &IID_IShellExecuteHookW, (LPVOID*)&pSEH, NULL); + + if (SUCCEEDED(hr)) + { + hr = IShellExecuteHookW_Execute(pSEH, sei); + + IShellExecuteHookW_Release(pSEH); + + if (hr == S_OK) + return TRUE; + } + + TRACE("-- idlist=%p (%s)\n", debugstr_w(sei_tmp.lpIDList), debugstr_w(sei_tmp.lpFile)); + } + } + } + + + /* Has the IDList not yet been translated? */ + if (sei_tmp.fMask & SEE_MASK_IDLIST) + { + /* last chance to translate IDList: now also allow CLSID paths */ + if (SUCCEEDED(SHELL_GetPathFromIDListForExecuteW(sei_tmp.lpIDList, buffer, sizeof(buffer)))) { + if (buffer[0]==':' && buffer[1]==':') { + /* open shell folder for the specified class GUID */ + strcpyW(wszParameters, buffer); + strcpyW(wszApplicationName, wExplorer); + + sei_tmp.fMask &= ~SEE_MASK_INVOKEIDLIST; + } else if (HCR_GetExecuteCommandW(0, wszFolder, sei_tmp.lpVerb?sei_tmp.lpVerb:wszOpen, buffer, sizeof(buffer))) { + SHELL_ArgifyW(wszApplicationName, sizeof(wszApplicationName)/sizeof(WCHAR), buffer, NULL, sei_tmp.lpIDList, NULL); + + sei_tmp.fMask &= ~SEE_MASK_INVOKEIDLIST; + } + } + } + + /* expand environment strings */ + if (ExpandEnvironmentStringsW(sei_tmp.lpFile, buffer, MAX_PATH)) + lstrcpyW(wszApplicationName, buffer); + + if (*sei_tmp.lpParameters) + if (ExpandEnvironmentStringsW(sei_tmp.lpParameters, buffer, MAX_PATH)) + lstrcpyW(wszParameters, buffer); + + if (*sei_tmp.lpDirectory) + if (ExpandEnvironmentStringsW(sei_tmp.lpDirectory, buffer, MAX_PATH)) + lstrcpyW(wszDir, buffer); + + /* Else, try to execute the filename */ + TRACE("execute:%s,%s,%s\n", debugstr_w(wszApplicationName), debugstr_w(wszParameters), debugstr_w(wszDir)); + + /* separate out command line arguments from executable file name */ + if (!*sei_tmp.lpParameters) { + /* If the executable path is quoted, handle the rest of the command line as parameters. */ + if (sei_tmp.lpFile[0] == '"') { + LPWSTR src = wszApplicationName/*sei_tmp.lpFile*/ + 1; + LPWSTR dst = wfileName; + LPWSTR end; + + /* copy the unquoted executable path to 'wfileName' */ + while(*src && *src!='"') + *dst++ = *src++; + + *dst = '\0'; + + if (*src == '"') { + end = ++src; + + while(isspace(*src)) + ++src; + } else + end = src; + + /* copy the parameter string to 'wszParameters' */ + strcpyW(wszParameters, src); + + /* terminate previous command string after the quote character */ + *end = '\0'; + } + else + { + /* If the executable name is not quoted, we have to use this search loop here, + that in CreateProcess() is not sufficient because it does not handle shell links. */ + WCHAR buffer[MAX_PATH], xlpFile[MAX_PATH]; + LPWSTR space, s; + + LPWSTR beg = wszApplicationName/*sei_tmp.lpFile*/; + for(s=beg; (space=strchrW(s, ' ')); s=space+1) { + int idx = space-sei_tmp.lpFile; + strncpyW(buffer, sei_tmp.lpFile, idx); + buffer[idx] = '\0'; + + /*FIXME This finds directory paths if the targeted file name contains spaces. */ + if (SearchPathW(*sei_tmp.lpDirectory? sei_tmp.lpDirectory: NULL, buffer, wszExe, sizeof(xlpFile), xlpFile, NULL)) + { + /* separate out command from parameter string */ + LPCWSTR p = space + 1; + + while(isspaceW(*p)) + ++p; + + strcpyW(wszParameters, p); + *space = '\0'; + + break; + } + } + + strcpyW(wfileName, sei_tmp.lpFile); + } + } else + strcpyW(wfileName, sei_tmp.lpFile); + + lpFile = wfileName; + + if (sei_tmp.lpParameters[0]) { + strcatW(wszApplicationName, wSpace); + strcatW(wszApplicationName, wszParameters); + } + + /* We set the default to open, and that should generally work. + But that is not really the way the MS docs say to do it. */ + if (!sei_tmp.lpVerb) + sei_tmp.lpVerb = wszOpen; + + retval = execfunc(wszApplicationName, NULL, FALSE, &sei_tmp, sei); + if (retval > 32) + return TRUE; + + /* Else, try to find the executable */ + wcmd[0] = '\0'; + retval = SHELL_FindExecutable(sei_tmp.lpDirectory, lpFile, sei_tmp.lpVerb, wcmd, 1024, lpstrProtocol, &env, sei_tmp.lpIDList, sei_tmp.lpParameters); + if (retval > 32) /* Found */ + { + WCHAR wszQuotedCmd[MAX_PATH+2]; + /* Must quote to handle case where cmd contains spaces, + * else security hole if malicious user creates executable file "C:\\Program" + */ + strcpyW(wszQuotedCmd, wQuote); + strcatW(wszQuotedCmd, wcmd); + strcatW(wszQuotedCmd, wQuote); + if (wszParameters[0]) { + strcatW(wszQuotedCmd, wSpace); + strcatW(wszQuotedCmd, wszParameters); + } + TRACE("%s/%s => %s/%s\n", debugstr_w(wszApplicationName), debugstr_w(sei_tmp.lpVerb), debugstr_w(wszQuotedCmd), debugstr_w(lpstrProtocol)); + if (*lpstrProtocol) + retval = execute_from_key(lpstrProtocol, wszApplicationName, env, sei_tmp.lpParameters, execfunc, &sei_tmp, sei); + else + retval = execfunc(wszQuotedCmd, env, FALSE, &sei_tmp, sei); + HeapFree( GetProcessHeap(), 0, env ); + } + else if (PathIsURLW((LPWSTR)lpFile)) /* File not found, check for URL */ + { + static const WCHAR wShell[] = {'\\','s','h','e','l','l','\\',0}; + static const WCHAR wCommand[] = {'\\','c','o','m','m','a','n','d',0}; + LPWSTR lpstrRes; + INT iSize; + + lpstrRes = strchrW(lpFile, ':'); + if (lpstrRes) + iSize = lpstrRes - lpFile; + else + iSize = strlenW(lpFile); + + TRACE("Got URL: %s\n", debugstr_w(lpFile)); + /* Looking for ...protocol\shell\lpOperation\command */ + strncpyW(lpstrProtocol, lpFile, iSize); + lpstrProtocol[iSize] = '\0'; + strcatW(lpstrProtocol, wShell); + strcatW(lpstrProtocol, sei_tmp.lpVerb? sei_tmp.lpVerb: wszOpen); + strcatW(lpstrProtocol, wCommand); + + /* Remove File Protocol from lpFile */ + /* In the case file://path/file */ + if (!strncmpiW(lpFile, wFile, iSize)) + { + lpFile += iSize; + while (*lpFile == ':') lpFile++; + } + retval = execute_from_key(lpstrProtocol, lpFile, NULL, sei_tmp.lpParameters, execfunc, &sei_tmp, sei); + } + /* Check if file specified is in the form www.??????.*** */ + else if (!strncmpiW(lpFile, wWww, 3)) + { + /* if so, append lpFile http:// and call ShellExecute */ + WCHAR lpstrTmpFile[256]; + strcpyW(lpstrTmpFile, wHttp); + strcatW(lpstrTmpFile, lpFile); + retval = (UINT)ShellExecuteW(sei_tmp.hwnd, sei_tmp.lpVerb, lpstrTmpFile, NULL, NULL, 0); + } + + TRACE("retval %u\n", retval); + + if (retval <= 32) + { + sei->hInstApp = (HINSTANCE)retval; + return FALSE; + } + + sei->hInstApp = (HINSTANCE)33; + return TRUE; +} + +/************************************************************************* + * ShellExecuteA [SHELL32.290] + */ +HINSTANCE WINAPI ShellExecuteA(HWND hWnd, LPCSTR lpOperation,LPCSTR lpFile, + LPCSTR lpParameters,LPCSTR lpDirectory, INT iShowCmd) +{ + SHELLEXECUTEINFOA sei; + HANDLE hProcess = 0; + + TRACE("%p,%s,%s,%s,%s,%d\n", + hWnd, lpOperation, lpFile, lpParameters, lpDirectory, iShowCmd); + + sei.cbSize = sizeof(sei); + sei.fMask = 0; + sei.hwnd = hWnd; + sei.lpVerb = lpOperation; + sei.lpFile = lpFile; + sei.lpParameters = lpParameters; + sei.lpDirectory = lpDirectory; + sei.nShow = iShowCmd; + sei.lpIDList = 0; + sei.lpClass = 0; + sei.hkeyClass = 0; + sei.dwHotKey = 0; + sei.hProcess = hProcess; + + ShellExecuteExA (&sei); + return sei.hInstApp; +} + +/************************************************************************* + * ShellExecuteExA [SHELL32.292] + * + */ +BOOL WINAPI ShellExecuteExA (LPSHELLEXECUTEINFOA sei) +{ + SHELLEXECUTEINFOW seiW; + BOOL ret; + WCHAR *wVerb = NULL, *wFile = NULL, *wParameters = NULL, *wDirectory = NULL, *wClass = NULL; + + TRACE("%p\n", sei); + + memcpy(&seiW, sei, sizeof(SHELLEXECUTEINFOW)); + + if (sei->lpVerb) + seiW.lpVerb = __SHCloneStrAtoW(&wVerb, sei->lpVerb); + + if (sei->lpFile) + seiW.lpFile = __SHCloneStrAtoW(&wFile, sei->lpFile); + + if (sei->lpParameters) + seiW.lpParameters = __SHCloneStrAtoW(&wParameters, sei->lpParameters); + + if (sei->lpDirectory) + seiW.lpDirectory = __SHCloneStrAtoW(&wDirectory, sei->lpDirectory); + + if ((sei->fMask & SEE_MASK_CLASSNAME) && sei->lpClass) + seiW.lpClass = __SHCloneStrAtoW(&wClass, sei->lpClass); + else + seiW.lpClass = NULL; + + ret = ShellExecuteExW32 (&seiW, SHELL_ExecuteW); + + sei->hInstApp = seiW.hInstApp; + + if (wVerb) SHFree(wVerb); + if (wFile) SHFree(wFile); + if (wParameters) SHFree(wParameters); + if (wDirectory) SHFree(wDirectory); + if (wClass) SHFree(wClass); + + return ret; +} + +/************************************************************************* + * ShellExecuteExW [SHELL32.293] + * + */ +BOOL WINAPI ShellExecuteExW (LPSHELLEXECUTEINFOW sei) +{ + return ShellExecuteExW32 (sei, SHELL_ExecuteW); +} + +/************************************************************************* + * ShellExecuteW [SHELL32.294] + * from shellapi.h + * WINSHELLAPI HINSTANCE APIENTRY ShellExecuteW(HWND hwnd, LPCWSTR lpOperation, + * LPCWSTR lpFile, LPCWSTR lpParameters, LPCWSTR lpDirectory, INT nShowCmd); + */ +HINSTANCE WINAPI ShellExecuteW(HWND hwnd, LPCWSTR lpOperation, LPCWSTR lpFile, + LPCWSTR lpParameters, LPCWSTR lpDirectory, INT nShowCmd) +{ + SHELLEXECUTEINFOW sei; + HANDLE hProcess = 0; + + TRACE("\n"); + sei.cbSize = sizeof(sei); + sei.fMask = 0; + sei.hwnd = hwnd; + sei.lpVerb = lpOperation; + sei.lpFile = lpFile; + sei.lpParameters = lpParameters; + sei.lpDirectory = lpDirectory; + sei.nShow = nShowCmd; + sei.lpIDList = 0; + sei.lpClass = 0; + sei.hkeyClass = 0; + sei.dwHotKey = 0; + sei.hProcess = hProcess; + + ShellExecuteExW32 (&sei, SHELL_ExecuteW); + return sei.hInstApp; +} diff --git a/reactos/lib/shell32/shlfileop.c b/reactos/lib/shell32/shlfileop.c index cce85e6e55b..f229819b73b 100644 --- a/reactos/lib/shell32/shlfileop.c +++ b/reactos/lib/shell32/shlfileop.c @@ -1,1417 +1,1417 @@ -/* - * SHFileOperation - * - * Copyright 2000 Juergen Schmied - * Copyright 2002 Andriy Palamarchuk - * Copyright 2004 Dietrich Teickner (from Odin) - * Copyright 2004 Rolf Kalbermatter - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include "config.h" -#include "wine/port.h" - -#include -#include -#include - -#include "windef.h" -#include "winbase.h" -#include "winreg.h" -#include "shellapi.h" -#include "wingdi.h" -#include "winuser.h" -#include "shlobj.h" -#include "shresdef.h" -#define NO_SHLWAPI_STREAM -#include "shlwapi.h" -#include "shell32_main.h" -#include "undocshell.h" -#include "wine/unicode.h" -#include "wine/debug.h" - -WINE_DEFAULT_DEBUG_CHANNEL(shell); - -#define IsAttrib(x, y) ((INVALID_FILE_ATTRIBUTES != (x)) && ((x) & (y))) -#define IsAttribFile(x) (!((x) & FILE_ATTRIBUTE_DIRECTORY)) -#define IsAttribDir(x) IsAttrib(x, FILE_ATTRIBUTE_DIRECTORY) -#define IsDotDir(x) ((x[0] == '.') && ((x[1] == 0) || ((x[1] == '.') && (x[2] == 0)))) - -#define FO_MASK 0xF - -static const WCHAR wWildcardFile[] = {'*',0}; -static const WCHAR wWildcardChars[] = {'*','?',0}; -static const WCHAR wBackslash[] = {'\\',0}; - -static BOOL SHELL_DeleteDirectoryW(LPCWSTR path, BOOL bShowUI); -static DWORD SHNotifyCreateDirectoryA(LPCSTR path, LPSECURITY_ATTRIBUTES sec); -static DWORD SHNotifyCreateDirectoryW(LPCWSTR path, LPSECURITY_ATTRIBUTES sec); -static DWORD SHNotifyRemoveDirectoryA(LPCSTR path); -static DWORD SHNotifyRemoveDirectoryW(LPCWSTR path); -static DWORD SHNotifyDeleteFileA(LPCSTR path); -static DWORD SHNotifyDeleteFileW(LPCWSTR path); -static DWORD SHNotifyMoveFileW(LPCWSTR src, LPCWSTR dest); -static DWORD SHNotifyCopyFileW(LPCWSTR src, LPCWSTR dest, BOOL bFailIfExists); -static DWORD SHFindAttrW(LPCWSTR pName, BOOL fileOnly); - -typedef struct -{ - UINT caption_resource_id, text_resource_id; -} SHELL_ConfirmIDstruc; - -static BOOL SHELL_ConfirmIDs(int nKindOfDialog, SHELL_ConfirmIDstruc *ids) -{ - switch (nKindOfDialog) { - case ASK_DELETE_FILE: - ids->caption_resource_id = IDS_DELETEITEM_CAPTION; - ids->text_resource_id = IDS_DELETEITEM_TEXT; - return TRUE; - case ASK_DELETE_FOLDER: - ids->caption_resource_id = IDS_DELETEFOLDER_CAPTION; - ids->text_resource_id = IDS_DELETEITEM_TEXT; - return TRUE; - case ASK_DELETE_MULTIPLE_ITEM: - ids->caption_resource_id = IDS_DELETEITEM_CAPTION; - ids->text_resource_id = IDS_DELETEMULTIPLE_TEXT; - return TRUE; - case ASK_OVERWRITE_FILE: - ids->caption_resource_id = IDS_OVERWRITEFILE_CAPTION; - ids->text_resource_id = IDS_OVERWRITEFILE_TEXT; - return TRUE; - default: - FIXME(" Unhandled nKindOfDialog %d stub\n", nKindOfDialog); - } - return FALSE; -} - -BOOL SHELL_ConfirmDialog(int nKindOfDialog, LPCSTR szDir) -{ - CHAR szCaption[255], szText[255], szBuffer[MAX_PATH + 256]; - SHELL_ConfirmIDstruc ids; - - if (!SHELL_ConfirmIDs(nKindOfDialog, &ids)) - return FALSE; - - LoadStringA(shell32_hInstance, ids.caption_resource_id, szCaption, sizeof(szCaption)); - LoadStringA(shell32_hInstance, ids.text_resource_id, szText, sizeof(szText)); - - FormatMessageA(FORMAT_MESSAGE_FROM_STRING|FORMAT_MESSAGE_ARGUMENT_ARRAY, - szText, 0, 0, szBuffer, sizeof(szBuffer), (va_list*)&szDir); - - return (IDOK == MessageBoxA(GetActiveWindow(), szBuffer, szCaption, MB_OKCANCEL | MB_ICONEXCLAMATION)); -} - -BOOL SHELL_ConfirmDialogW(int nKindOfDialog, LPCWSTR szDir) -{ - WCHAR szCaption[255], szText[255], szBuffer[MAX_PATH + 256]; - SHELL_ConfirmIDstruc ids; - - if (!SHELL_ConfirmIDs(nKindOfDialog, &ids)) - return FALSE; - - LoadStringW(shell32_hInstance, ids.caption_resource_id, szCaption, sizeof(szCaption)); - LoadStringW(shell32_hInstance, ids.text_resource_id, szText, sizeof(szText)); - - FormatMessageW(FORMAT_MESSAGE_FROM_STRING|FORMAT_MESSAGE_ARGUMENT_ARRAY, - szText, 0, 0, szBuffer, sizeof(szBuffer), (va_list*)&szDir); - - return (IDOK == MessageBoxW(GetActiveWindow(), szBuffer, szCaption, MB_OKCANCEL | MB_ICONEXCLAMATION)); -} - -static DWORD SHELL32_AnsiToUnicodeBuf(LPCSTR aPath, LPWSTR *wPath, DWORD minChars) -{ - DWORD len = MultiByteToWideChar(CP_ACP, 0, aPath, -1, NULL, 0); - - if (len < minChars) - len = minChars; - - *wPath = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); - if (*wPath) - { - MultiByteToWideChar(CP_ACP, 0, aPath, -1, *wPath, len); - return NO_ERROR; - } - return E_OUTOFMEMORY; -} - -static void SHELL32_FreeUnicodeBuf(LPWSTR wPath) -{ - HeapFree(GetProcessHeap(), 0, wPath); -} - -/************************************************************************** - * SHELL_DeleteDirectory() [internal] - * - * Asks for confirmation when bShowUI is true and deletes the directory and - * all its subdirectories and files if necessary. - */ -BOOL SHELL_DeleteDirectoryA(LPCSTR pszDir, BOOL bShowUI) -{ - LPWSTR wPath; - BOOL ret = FALSE; - - if (!SHELL32_AnsiToUnicodeBuf(pszDir, &wPath, 0)) - { - ret = SHELL_DeleteDirectoryW(wPath, bShowUI); - SHELL32_FreeUnicodeBuf(wPath); - } - return ret; -} - -static BOOL SHELL_DeleteDirectoryW(LPCWSTR pszDir, BOOL bShowUI) -{ - BOOL ret = TRUE; - HANDLE hFind; - WIN32_FIND_DATAW wfd; - WCHAR szTemp[MAX_PATH]; - - /* Make sure the directory exists before eventually prompting the user */ - PathCombineW(szTemp, pszDir, wWildcardFile); - hFind = FindFirstFileW(szTemp, &wfd); - if (hFind == INVALID_HANDLE_VALUE) - return FALSE; - - if (!bShowUI || (ret = SHELL_ConfirmDialogW(ASK_DELETE_FOLDER, pszDir))) - { - do - { - LPWSTR lp = wfd.cAlternateFileName; - if (!lp[0]) - lp = wfd.cFileName; - if (IsDotDir(lp)) - continue; - PathCombineW(szTemp, pszDir, lp); - if (FILE_ATTRIBUTE_DIRECTORY & wfd.dwFileAttributes) - ret = SHELL_DeleteDirectoryW(szTemp, FALSE); - else - ret = (SHNotifyDeleteFileW(szTemp) == ERROR_SUCCESS); - } while (ret && FindNextFileW(hFind, &wfd)); - } - FindClose(hFind); - if (ret) - ret = (SHNotifyRemoveDirectoryW(pszDir) == ERROR_SUCCESS); - return ret; -} - -/************************************************************************** - * SHELL_DeleteFileA() [internal] - */ -BOOL SHELL_DeleteFileA(LPCSTR pszFile, BOOL bShowUI) -{ - if (bShowUI && !SHELL_ConfirmDialog(ASK_DELETE_FILE, pszFile)) - return FALSE; - - return (SHNotifyDeleteFileA(pszFile) == ERROR_SUCCESS); -} - -BOOL SHELL_DeleteFileW(LPCWSTR pszFile, BOOL bShowUI) -{ - if (bShowUI && !SHELL_ConfirmDialogW(ASK_DELETE_FILE, pszFile)) - return FALSE; - - return (SHNotifyDeleteFileW(pszFile) == ERROR_SUCCESS); -} - -/************************************************************************** - * Win32CreateDirectory [SHELL32.93] - * - * Creates a directory. Also triggers a change notify if one exists. - * - * PARAMS - * path [I] path to directory to create - * - * RETURNS - * TRUE if successful, FALSE otherwise - * - * NOTES: - * Verified on Win98 / IE 5 (SHELL32 4.72, March 1999 build) to be ANSI. - * This is Unicode on NT/2000 - */ -static DWORD SHNotifyCreateDirectoryA(LPCSTR path, LPSECURITY_ATTRIBUTES sec) -{ - LPWSTR wPath; - DWORD retCode; - - TRACE("(%s, %p)\n", debugstr_a(path), sec); - - retCode = SHELL32_AnsiToUnicodeBuf(path, &wPath, 0); - if (!retCode) - { - retCode = SHNotifyCreateDirectoryW(wPath, sec); - SHELL32_FreeUnicodeBuf(wPath); - } - return retCode; -} - -/**********************************************************************/ - -static DWORD SHNotifyCreateDirectoryW(LPCWSTR path, LPSECURITY_ATTRIBUTES sec) -{ - TRACE("(%s, %p)\n", debugstr_w(path), sec); - - if (CreateDirectoryW(path, sec)) - { - SHChangeNotify(SHCNE_MKDIR, SHCNF_PATHW, path, NULL); - return ERROR_SUCCESS; - } - return GetLastError(); -} - -/**********************************************************************/ - -BOOL WINAPI Win32CreateDirectoryAW(LPCVOID path, LPSECURITY_ATTRIBUTES sec) -{ - if (SHELL_OsIsUnicode()) - return (SHNotifyCreateDirectoryW(path, sec) == ERROR_SUCCESS); - return (SHNotifyCreateDirectoryA(path, sec) == ERROR_SUCCESS); -} - -/************************************************************************ - * Win32RemoveDirectory [SHELL32.94] - * - * Deletes a directory. Also triggers a change notify if one exists. - * - * PARAMS - * path [I] path to directory to delete - * - * RETURNS - * TRUE if successful, FALSE otherwise - * - * NOTES: - * Verified on Win98 / IE 5 (SHELL32 4.72, March 1999 build) to be ANSI. - * This is Unicode on NT/2000 - */ -static DWORD SHNotifyRemoveDirectoryA(LPCSTR path) -{ - LPWSTR wPath; - DWORD retCode; - - TRACE("(%s)\n", debugstr_a(path)); - - retCode = SHELL32_AnsiToUnicodeBuf(path, &wPath, 0); - if (!retCode) - { - retCode = SHNotifyRemoveDirectoryW(wPath); - SHELL32_FreeUnicodeBuf(wPath); - } - return retCode; -} - -/***********************************************************************/ - -static DWORD SHNotifyRemoveDirectoryW(LPCWSTR path) -{ - BOOL ret; - TRACE("(%s)\n", debugstr_w(path)); - - ret = RemoveDirectoryW(path); - if (!ret) - { - /* Directory may be write protected */ - DWORD dwAttr = GetFileAttributesW(path); - if (IsAttrib(dwAttr, FILE_ATTRIBUTE_READONLY)) - if (SetFileAttributesW(path, dwAttr & ~FILE_ATTRIBUTE_READONLY)) - ret = RemoveDirectoryW(path); - } - if (ret) - { - SHChangeNotify(SHCNE_RMDIR, SHCNF_PATHW, path, NULL); - return ERROR_SUCCESS; - } - return GetLastError(); -} - -/***********************************************************************/ - -BOOL WINAPI Win32RemoveDirectoryAW(LPCVOID path) -{ - if (SHELL_OsIsUnicode()) - return (SHNotifyRemoveDirectoryW(path) == ERROR_SUCCESS); - return (SHNotifyRemoveDirectoryA(path) == ERROR_SUCCESS); -} - -/************************************************************************ - * Win32DeleteFile [SHELL32.164] - * - * Deletes a file. Also triggers a change notify if one exists. - * - * PARAMS - * path [I] path to file to delete - * - * RETURNS - * TRUE if successful, FALSE otherwise - * - * NOTES: - * Verified on Win98 / IE 5 (SHELL32 4.72, March 1999 build) to be ANSI. - * This is Unicode on NT/2000 - */ -static DWORD SHNotifyDeleteFileA(LPCSTR path) -{ - LPWSTR wPath; - DWORD retCode; - - TRACE("(%s)\n", debugstr_a(path)); - - retCode = SHELL32_AnsiToUnicodeBuf(path, &wPath, 0); - if (!retCode) - { - retCode = SHNotifyDeleteFileW(wPath); - SHELL32_FreeUnicodeBuf(wPath); - } - return retCode; -} - -/***********************************************************************/ - -static DWORD SHNotifyDeleteFileW(LPCWSTR path) -{ - BOOL ret; - - TRACE("(%s)\n", debugstr_w(path)); - - ret = DeleteFileW(path); - if (!ret) - { - /* File may be write protected or a system file */ - DWORD dwAttr = GetFileAttributesW(path); - if (IsAttrib(dwAttr, FILE_ATTRIBUTE_READONLY | FILE_ATTRIBUTE_SYSTEM)) - if (SetFileAttributesW(path, dwAttr & ~(FILE_ATTRIBUTE_READONLY | FILE_ATTRIBUTE_SYSTEM))) - ret = DeleteFileW(path); - } - if (ret) - { - SHChangeNotify(SHCNE_DELETE, SHCNF_PATHW, path, NULL); - return ERROR_SUCCESS; - } - return GetLastError(); -} - -/***********************************************************************/ - -DWORD WINAPI Win32DeleteFileAW(LPCVOID path) -{ - if (SHELL_OsIsUnicode()) - return (SHNotifyDeleteFileW(path) == ERROR_SUCCESS); - return (SHNotifyDeleteFileA(path) == ERROR_SUCCESS); -} - -/************************************************************************ - * SHNotifyMoveFile [internal] - * - * Moves a file. Also triggers a change notify if one exists. - * - * PARAMS - * src [I] path to source file to move - * dest [I] path to target file to move to - * - * RETURNS - * ERORR_SUCCESS if successful - */ -static DWORD SHNotifyMoveFileW(LPCWSTR src, LPCWSTR dest) -{ - BOOL ret; - - TRACE("(%s %s)\n", debugstr_w(src), debugstr_w(dest)); - - ret = MoveFileW(src, dest); - if (!ret) - { - DWORD dwAttr; - - dwAttr = SHFindAttrW(dest, FALSE); - if (INVALID_FILE_ATTRIBUTES == dwAttr) - { - /* Source file may be write protected or a system file */ - dwAttr = GetFileAttributesW(src); - if (IsAttrib(dwAttr, FILE_ATTRIBUTE_READONLY | FILE_ATTRIBUTE_SYSTEM)) - if (SetFileAttributesW(src, dwAttr & ~(FILE_ATTRIBUTE_READONLY | FILE_ATTRIBUTE_SYSTEM))) - ret = MoveFileW(src, dest); - } - } - if (ret) - { - SHChangeNotify(SHCNE_RENAMEITEM, SHCNF_PATHW, src, dest); - return ERROR_SUCCESS; - } - return GetLastError(); -} - -/************************************************************************ - * SHNotifyCopyFile [internal] - * - * Copies a file. Also triggers a change notify if one exists. - * - * PARAMS - * src [I] path to source file to move - * dest [I] path to target file to move to - * bFailIfExists [I] if TRUE, the target file will not be overwritten if - * a file with this name already exists - * - * RETURNS - * ERROR_SUCCESS if successful - */ -static DWORD SHNotifyCopyFileW(LPCWSTR src, LPCWSTR dest, BOOL bFailIfExists) -{ - BOOL ret; - - TRACE("(%s %s %s)\n", debugstr_w(src), debugstr_w(dest), bFailIfExists ? "failIfExists" : ""); - - ret = CopyFileW(src, dest, bFailIfExists); - if (ret) - { - SHChangeNotify(SHCNE_CREATE, SHCNF_PATHW, dest, NULL); - return ERROR_SUCCESS; - } - return GetLastError(); -} - -/************************************************************************* - * SHCreateDirectory [SHELL32.165] - * - * This function creates a file system folder whose fully qualified path is - * given by path. If one or more of the intermediate folders do not exist, - * they will be created as well. - * - * PARAMS - * hWnd [I] - * path [I] path of directory to create - * - * RETURNS - * ERRROR_SUCCESS or one of the following values: - * ERROR_BAD_PATHNAME if the path is relative - * ERROR_FILE_EXISTS when a file with that name exists - * ERROR_PATH_NOT_FOUND can't find the path, probably invalid - * ERROR_INVLID_NAME if the path contains invalid chars - * ERROR_ALREADY_EXISTS when the directory already exists - * ERROR_FILENAME_EXCED_RANGE if the filename was to long to process - * - * NOTES - * exported by ordinal - * Win9x exports ANSI - * WinNT/2000 exports Unicode - */ -DWORD WINAPI SHCreateDirectory(HWND hWnd, LPCVOID path) -{ - if (SHELL_OsIsUnicode()) - return SHCreateDirectoryExW(hWnd, path, NULL); - return SHCreateDirectoryExA(hWnd, path, NULL); -} - -/************************************************************************* - * SHCreateDirectoryExA [SHELL32.@] - * - * This function creates a file system folder whose fully qualified path is - * given by path. If one or more of the intermediate folders do not exist, - * they will be created as well. - * - * PARAMS - * hWnd [I] - * path [I] path of directory to create - * sec [I] security attributes to use or NULL - * - * RETURNS - * ERRROR_SUCCESS or one of the following values: - * ERROR_BAD_PATHNAME or ERROR_PATH_NOT_FOUND if the path is relative - * ERROR_INVLID_NAME if the path contains invalid chars - * ERROR_FILE_EXISTS when a file with that name exists - * ERROR_ALREADY_EXISTS when the directory already exists - * ERROR_FILENAME_EXCED_RANGE if the filename was to long to process - * - * FIXME: Not implemented yet; - * SHCreateDirectoryEx also verifies that the files in the directory will be visible - * if the path is a network path to deal with network drivers which might have a limited - * but unknown maximum path length. If not: - * - * If hWnd is set to a valid window handle, a message box is displayed warning - * the user that the files may not be accessible. If the user chooses not to - * proceed, the function returns ERROR_CANCELLED. - * - * If hWnd is set to NULL, no user interface is displayed and the function - * returns ERROR_CANCELLED. - */ -int WINAPI SHCreateDirectoryExA(HWND hWnd, LPCSTR path, LPSECURITY_ATTRIBUTES sec) -{ - LPWSTR wPath; - DWORD retCode; - - TRACE("(%s, %p)\n", debugstr_a(path), sec); - - retCode = SHELL32_AnsiToUnicodeBuf(path, &wPath, 0); - if (!retCode) - { - retCode = SHCreateDirectoryExW(hWnd, wPath, sec); - SHELL32_FreeUnicodeBuf(wPath); - } - return retCode; -} - -/************************************************************************* - * SHCreateDirectoryExW [SHELL32.@] - */ -int WINAPI SHCreateDirectoryExW(HWND hWnd, LPCWSTR path, LPSECURITY_ATTRIBUTES sec) -{ - int ret = ERROR_BAD_PATHNAME; - TRACE("(%p, %s, %p)\n", hWnd, debugstr_w(path), sec); - - if (PathIsRelativeW(path)) - { - SetLastError(ret); - } - else - { - ret = SHNotifyCreateDirectoryW(path, sec); - /* Refuse to work on certain error codes before trying to create directories recursively */ - if (ret != ERROR_FILE_EXISTS && - ret != ERROR_ALREADY_EXISTS && - ret != ERROR_FILENAME_EXCED_RANGE) - { - WCHAR *pEnd, *pSlash, szTemp[MAX_PATH + 1]; /* extra for PathAddBackslash() */ - - lstrcpynW(szTemp, path, MAX_PATH); - pEnd = PathAddBackslashW(szTemp); - pSlash = szTemp + 3; - - while (*pSlash) - { - while (*pSlash && *pSlash != '\\') - pSlash = CharNextW(pSlash); - - if (*pSlash) - { - *pSlash = 0; /* terminate path at separator */ - - ret = SHNotifyCreateDirectoryW(szTemp, pSlash + 1 == pEnd ? sec : NULL); - } - *pSlash++ = '\\'; /* put the separator back */ - } - } - - if (ret && hWnd && (ERROR_CANCELLED != ret)) - { - /* We failed and should show a dialog box */ - FIXME("Show system error message, creating path %s, failed with error %d\n", debugstr_w(path), ret); - ret = ERROR_CANCELLED; /* Error has been already presented to user (not really yet!) */ - } - } - return ret; -} - - -/************************************************************************* - * SHFindAttrW [internal] - * - * Get the Attributes for a file or directory. The difference to GetAttributes() - * is that this function will also work for paths containing wildcard characters - * in its filename. - - * PARAMS - * path [I] path of directory or file to check - * fileOnly [I] TRUE if only files should be found - * - * RETURNS - * INVALID_FILE_ATTRIBUTES if the path does not exist, the actual attributes of - * the first file or directory found otherwise - */ -static DWORD SHFindAttrW(LPCWSTR pName, BOOL fileOnly) -{ - WIN32_FIND_DATAW wfd; - BOOL b_FileMask = fileOnly && (NULL != StrPBrkW(pName, wWildcardChars)); - DWORD dwAttr = INVALID_FILE_ATTRIBUTES; - HANDLE hFind = FindFirstFileW(pName, &wfd); - - TRACE("%s %d\n", debugstr_w(pName), fileOnly); - if (INVALID_HANDLE_VALUE != hFind) - { - do - { - if (b_FileMask && IsAttribDir(wfd.dwFileAttributes)) - continue; - dwAttr = wfd.dwFileAttributes; - break; - } - while (FindNextFileW(hFind, &wfd)); - FindClose(hFind); - } - return dwAttr; -} - -/************************************************************************* - * - * SHFileStrICmp HelperFunction for SHFileOperationW - * - */ -BOOL SHFileStrICmpW(LPWSTR p1, LPWSTR p2, LPWSTR p1End, LPWSTR p2End) -{ - WCHAR C1 = '\0'; - WCHAR C2 = '\0'; - int i_Temp = -1; - int i_len1 = lstrlenW(p1); - int i_len2 = lstrlenW(p2); - - if (p1End && (&p1[i_len1] >= p1End) && ('\\' == p1End[0])) - { - C1 = p1End[0]; - p1End[0] = '\0'; - i_len1 = lstrlenW(p1); - } - if (p2End) - { - if ((&p2[i_len2] >= p2End) && ('\\' == p2End[0])) - { - C2 = p2End[0]; - if (C2) - p2End[0] = '\0'; - } - } - else - { - if ((i_len1 <= i_len2) && ('\\' == p2[i_len1])) - { - C2 = p2[i_len1]; - if (C2) - p2[i_len1] = '\0'; - } - } - i_len2 = lstrlenW(p2); - if (i_len1 == i_len2) - i_Temp = lstrcmpiW(p1,p2); - if (C1) - p1[i_len1] = C1; - if (C2) - p2[i_len2] = C2; - return !(i_Temp); -} - -/************************************************************************* - * - * SHFileStrCpyCat HelperFunction for SHFileOperationW - * - */ -LPWSTR SHFileStrCpyCatW(LPWSTR pTo, LPCWSTR pFrom, LPCWSTR pCatStr) -{ - LPWSTR pToFile = NULL; - int i_len; - if (pTo) - { - if (pFrom) - lstrcpyW(pTo, pFrom); - if (pCatStr) - { - i_len = lstrlenW(pTo); - if ((i_len) && (pTo[--i_len] != '\\')) - i_len++; - pTo[i_len] = '\\'; - if (pCatStr[0] == '\\') - pCatStr++; \ - lstrcpyW(&pTo[i_len+1], pCatStr); - } - pToFile = StrRChrW(pTo,NULL,'\\'); - /* termination of the new string-group */ - pTo[(lstrlenW(pTo)) + 1] = '\0'; - } - return pToFile; -} - -/************************************************************************** - * SHELL_FileNamesMatch() - * - * Accepts two \0 delimited lists of the file names. Checks whether number of - * files in both lists is the same, and checks also if source-name exists. - */ -BOOL SHELL_FileNamesMatch(LPCWSTR pszFiles1, LPCWSTR pszFiles2, BOOL bOnlySrc) -{ - while ((pszFiles1[0] != '\0') && - (bOnlySrc || (pszFiles2[0] != '\0'))) - { - if (NULL == StrPBrkW(pszFiles1, wWildcardChars)) - { - if (INVALID_FILE_ATTRIBUTES == GetFileAttributesW(pszFiles1)) - return FALSE; - } - pszFiles1 += lstrlenW(pszFiles1) + 1; - if (!bOnlySrc) - pszFiles2 += lstrlenW(pszFiles2) + 1; - } - return ((pszFiles1[0] == '\0') && (bOnlySrc || (pszFiles2[0] == '\0'))); -} - -/************************************************************************* - * - * SHNameTranslate HelperFunction for SHFileOperationA - * - * Translates a list of 0 terminated ASCII strings into Unicode. If *wString - * is NULL, only the necessary size of the string is determined and returned, - * otherwise the ASCII strings are copied into it and the buffer is increased - * to point to the location after the final 0 termination char. - */ -DWORD SHNameTranslate(LPWSTR* wString, LPCWSTR* pWToFrom, BOOL more) -{ - DWORD size = 0, aSize = 0; - LPCSTR aString = (LPCSTR)*pWToFrom; - - if (aString) - { - do - { - size = lstrlenA(aString) + 1; - aSize += size; - aString += size; - } while ((size != 1) && more); - /* The two sizes might be different in the case of multibyte chars */ - size = MultiByteToWideChar(CP_ACP, 0, aString, aSize, *wString, 0); - if (*wString) /* only in the second loop */ - { - MultiByteToWideChar(CP_ACP, 0, (LPCSTR)*pWToFrom, aSize, *wString, size); - *pWToFrom = *wString; - *wString += size; - } - } - return size; -} -/************************************************************************* - * SHFileOperationA [SHELL32.@] - * - * Function to copy, move, delete and create one or more files with optional - * user prompts. - * - * PARAMS - * lpFileOp [I/O] pointer to a structure containing all the necessary information - * - * NOTES - * exported by name - */ -int WINAPI SHFileOperationA(LPSHFILEOPSTRUCTA lpFileOp) -{ - SHFILEOPSTRUCTW nFileOp = *((LPSHFILEOPSTRUCTW)lpFileOp); - int retCode = 0; - DWORD size; - LPWSTR ForFree = NULL, /* we change wString in SHNameTranslate and can't use it for freeing */ - wString = NULL; /* we change this in SHNameTranslate */ - - TRACE("\n"); - if (FO_DELETE == (nFileOp.wFunc & FO_MASK)) - nFileOp.pTo = NULL; /* we need a NULL or a valid pointer for translation */ - if (!(nFileOp.fFlags & FOF_SIMPLEPROGRESS)) - nFileOp.lpszProgressTitle = NULL; /* we need a NULL or a valid pointer for translation */ - while (1) /* every loop calculate size, second translate also, if we have storage for this */ - { - size = SHNameTranslate(&wString, &nFileOp.lpszProgressTitle, FALSE); /* no loop */ - size += SHNameTranslate(&wString, &nFileOp.pFrom, TRUE); /* internal loop */ - size += SHNameTranslate(&wString, &nFileOp.pTo, TRUE); /* internal loop */ - - if (ForFree) - { - retCode = SHFileOperationW(&nFileOp); - HeapFree(GetProcessHeap(), 0, ForFree); /* we can not use wString, it was changed */ - break; - } - else - { - wString = ForFree = HeapAlloc(GetProcessHeap(), 0, size * sizeof(WCHAR)); - if (ForFree) continue; - retCode = ERROR_OUTOFMEMORY; - nFileOp.fAnyOperationsAborted = TRUE; - SetLastError(retCode); - return retCode; - } - } - - lpFileOp->hNameMappings = nFileOp.hNameMappings; - lpFileOp->fAnyOperationsAborted = nFileOp.fAnyOperationsAborted; - return retCode; -} - -static const char * debug_shfileops_flags( DWORD fFlags ) -{ - return wine_dbg_sprintf( "%s%s%s%s%s%s%s%s%s%s%s%s%s", - fFlags & FOF_MULTIDESTFILES ? "FOF_MULTIDESTFILES " : "", - fFlags & FOF_CONFIRMMOUSE ? "FOF_CONFIRMMOUSE " : "", - fFlags & FOF_SILENT ? "FOF_SILENT " : "", - fFlags & FOF_RENAMEONCOLLISION ? "FOF_RENAMEONCOLLISION " : "", - fFlags & FOF_NOCONFIRMATION ? "FOF_NOCONFIRMATION " : "", - fFlags & FOF_WANTMAPPINGHANDLE ? "FOF_WANTMAPPINGHANDLE " : "", - fFlags & FOF_ALLOWUNDO ? "FOF_ALLOWUNDO " : "", - fFlags & FOF_FILESONLY ? "FOF_FILESONLY " : "", - fFlags & FOF_SIMPLEPROGRESS ? "FOF_SIMPLEPROGRESS " : "", - fFlags & FOF_NOCONFIRMMKDIR ? "FOF_NOCONFIRMMKDIR " : "", - fFlags & FOF_NOERRORUI ? "FOF_NOERRORUI " : "", - fFlags & FOF_NOCOPYSECURITYATTRIBS ? "FOF_NOCOPYSECURITYATTRIBS" : "", - fFlags & 0xf000 ? "MORE-UNKNOWN-Flags" : ""); -} - -static const char * debug_shfileops_action( DWORD op ) -{ - LPCSTR cFO_Name [] = {"FO_????","FO_MOVE","FO_COPY","FO_DELETE","FO_RENAME"}; - return wine_dbg_sprintf("%s", cFO_Name[ op ]); -} - -#define ERROR_SHELL_INTERNAL_FILE_NOT_FOUND 1026 -#define HIGH_ADR (LPWSTR)0xffffffff - -/************************************************************************* - * SHFileOperationW [SHELL32.@] - * - * See SHFileOperationA - */ -int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp) -{ - SHFILEOPSTRUCTW nFileOp = *(lpFileOp); - - LPCWSTR pNextFrom = nFileOp.pFrom; - LPCWSTR pNextTo = nFileOp.pTo; - LPCWSTR pFrom = pNextFrom; - LPCWSTR pTo = NULL; - HANDLE hFind = INVALID_HANDLE_VALUE; - WIN32_FIND_DATAW wfd; - LPWSTR pTempFrom = NULL; - LPWSTR pTempTo = NULL; - LPWSTR pFromFile; - LPWSTR pToFile = NULL; - LPWSTR lpFileName; - int retCode = 0; - DWORD ToAttr; - DWORD ToPathAttr; - DWORD FromPathAttr; - FILEOP_FLAGS OFl = ((FILEOP_FLAGS)lpFileOp->fFlags & 0xfff); - - BOOL b_Multi = (nFileOp.fFlags & FOF_MULTIDESTFILES); - - BOOL b_MultiTo = (FO_DELETE != (lpFileOp->wFunc & FO_MASK)); - BOOL b_MultiPaired = (!b_MultiTo); - BOOL b_MultiFrom = FALSE; - BOOL not_overwrite; - BOOL ask_overwrite; - BOOL b_SameRoot; - BOOL b_SameTailName; - BOOL b_ToInvalidTail = FALSE; - BOOL b_ToValid; /* for W98-Bug for FO_MOVE with source and target in same rootdrive */ - BOOL b_Mask; - BOOL b_ToTailSlash = FALSE; - - long FuncSwitch = (nFileOp.wFunc & FO_MASK); - long level= nFileOp.wFunc>>4; - - /* default no error */ - nFileOp.fAnyOperationsAborted = FALSE; - - if ((FuncSwitch < FO_MOVE) || (FuncSwitch > FO_RENAME)) - goto shfileop_end; /* no valid FunctionCode */ - - if (level == 0) - TRACE("%s: flags (0x%04x) : %s\n", - debug_shfileops_action(FuncSwitch), nFileOp.fFlags, - debug_shfileops_flags(nFileOp.fFlags) ); - - /* establish when pTo is interpreted as the name of the destination file - * or the directory where the Fromfile should be copied to. - * This depends on: - * (1) pTo points to the name of an existing directory; - * (2) the flag FOF_MULTIDESTFILES is present; - * (3) whether pFrom point to multiple filenames. - * - * Some experiments: - * - * destisdir 1 1 1 1 0 0 0 0 - * FOF_MULTIDESTFILES 1 1 0 0 1 1 0 0 - * multiple from filenames 1 0 1 0 1 0 1 0 - * --------------- - * copy files to dir 1 0 1 1 0 0 1 0 - * create dir 0 0 0 0 0 0 1 0 - */ - - /* - * Summary of flags: - * - * implemented flags: - * FOF_MULTIDESTFILES, FOF_NOCONFIRMATION, FOF_FILESONLY - * - * unimplememented and ignored flags: - * FOF_CONFIRMMOUSE, FOF_SILENT, FOF_NOCONFIRMMKDIR, - * FOF_SIMPLEPROGRESS, FOF_NOCOPYSECURITYATTRIBS - * - * partially implemented, breaks if file exists: - * FOF_RENAMEONCOLLISION - * - * unimplemented and break if any other flag set: - * FOF_ALLOWUNDO, FOF_WANTMAPPINGHANDLE - */ - - TRACE("%s level=%ld nFileOp.fFlags=0x%x\n", - debug_shfileops_action(FuncSwitch), level, lpFileOp->fFlags); - - /* OFl &= (-1 - (FOF_MULTIDESTFILES | FOF_FILESONLY)); */ - /* OFl ^= (FOF_SILENT | FOF_NOCONFIRMATION | FOF_SIMPLEPROGRESS | FOF_NOCONFIRMMKDIR); */ - OFl &= (~(FOF_MULTIDESTFILES | FOF_NOCONFIRMATION | FOF_FILESONLY)); /* implemented */ - OFl ^= (FOF_SILENT | FOF_NOCONFIRMMKDIR | FOF_NOERRORUI | FOF_NOCOPYSECURITYATTRIBS); /* ignored, if one */ - OFl &= (~FOF_SIMPLEPROGRESS); /* ignored, only with FOF_SILENT */ - if (OFl) - { - if (OFl & (~(FOF_CONFIRMMOUSE | FOF_SILENT | FOF_RENAMEONCOLLISION | - FOF_NOCONFIRMMKDIR | FOF_NOERRORUI | FOF_NOCOPYSECURITYATTRIBS))) - { - TRACE("%s level=%ld lpFileOp->fFlags=0x%x not implemented, Aborted=TRUE, stub\n", - debug_shfileops_action(FuncSwitch), level, OFl); - retCode = 0x403; /* 1027, we need an extension to shlfileop */ - goto shfileop_end; - } - else - { - TRACE("%s level=%ld lpFileOp->fFlags=0x%x not fully implemented, stub\n", - debug_shfileops_action(FuncSwitch), level, OFl); - } - } - - if ((pNextFrom) && (!(b_MultiTo) || (pNextTo))) - { - nFileOp.pFrom = pTempFrom = HeapAlloc(GetProcessHeap(), 0, ((1 + 2 * (b_MultiTo)) * MAX_PATH + 6) * sizeof(WCHAR)); - if (!pTempFrom) - { - retCode = ERROR_OUTOFMEMORY; - SetLastError(retCode); - goto shfileop_end; - } - if (b_MultiTo) - pTempTo = &pTempFrom[MAX_PATH + 4]; - nFileOp.pTo = pTempTo; - ask_overwrite = (!(nFileOp.fFlags & FOF_NOCONFIRMATION) && !(nFileOp.fFlags & FOF_RENAMEONCOLLISION)); - not_overwrite = (!(nFileOp.fFlags & FOF_NOCONFIRMATION) || (nFileOp.fFlags & FOF_RENAMEONCOLLISION)); - } - else - { - retCode = ERROR_SHELL_INTERNAL_FILE_NOT_FOUND; - goto shfileop_end; - } - /* need break at error before change sourcepointer */ - while(!nFileOp.fAnyOperationsAborted && (pNextFrom[0])) - { - nFileOp.wFunc = ((level + 1) << 4) + FuncSwitch; - nFileOp.fFlags = lpFileOp->fFlags; - - if (b_MultiTo) - { - pTo = pNextTo; - pNextTo = &pNextTo[lstrlenW(pTo)+1]; - b_MultiTo = (b_Multi && pNextTo[0]); - } - - pFrom = pNextFrom; - pNextFrom = &pNextFrom[lstrlenW(pNextFrom)+1]; - if (!b_MultiFrom && !b_MultiTo) - b_MultiFrom = (pNextFrom[0]); - - pFromFile = SHFileStrCpyCatW(pTempFrom, pFrom, NULL); - - if (pTo) - { - pToFile = SHFileStrCpyCatW(pTempTo, pTo, NULL); - } - if (!b_MultiPaired) - { - b_MultiPaired = - SHELL_FileNamesMatch(lpFileOp->pFrom, lpFileOp->pTo, (!b_Multi || b_MultiFrom)); - } - if (!(b_MultiPaired) || !(pFromFile) || !(pFromFile[1]) || ((pTo) && !(pToFile))) - { - retCode = ERROR_SHELL_INTERNAL_FILE_NOT_FOUND; - goto shfileop_end; - } - if (pTo) - { - b_ToTailSlash = (!pToFile[1]); - if (b_ToTailSlash) - { - pToFile[0] = '\0'; - if (StrChrW(pTempTo,'\\')) - { - pToFile = SHFileStrCpyCatW(pTempTo, NULL, NULL); - } - } - b_ToInvalidTail = (NULL != StrPBrkW(&pToFile[1], wWildcardChars)); - } - - /* for all */ - b_Mask = (NULL != StrPBrkW(&pFromFile[1], wWildcardChars)); - if (FO_RENAME == FuncSwitch) - { - /* temporary only for FO_RENAME */ - if (b_MultiTo || b_MultiFrom || (b_Mask && !b_ToInvalidTail)) - { -#ifndef W98_FO_FUNCTION - retCode = ERROR_GEN_FAILURE; /* W2K ERROR_GEN_FAILURE, W98 returns no error */ -#endif - goto shfileop_end; - } - } - - hFind = FindFirstFileW(pFrom, &wfd); - if (INVALID_HANDLE_VALUE == hFind) - { - if ((FO_DELETE == FuncSwitch) && (b_Mask)) - { - pFromFile[0] = '\0'; - FromPathAttr = GetFileAttributesW(pTempFrom); - pFromFile[0] = '\\'; - if (IsAttribDir(FromPathAttr)) - { - /* FO_DELETE with mask and without found is valid */ - goto shfileop_end; - } - } - /* root (without mask) is also not allowed as source, tested in W98 */ - retCode = ERROR_SHELL_INTERNAL_FILE_NOT_FOUND; - goto shfileop_end; - } - - /* for all */ - - /* ??? b_Mask = (!SHFileStrICmpA(&pFromFile[1], &wfd.cFileName[0], HIGH_ADR, HIGH_ADR)); */ - if (!pTo) /* FO_DELETE */ - { - do - { - lpFileName = wfd.cAlternateFileName; - if (!lpFileName[0]) - lpFileName = wfd.cFileName; - if (IsDotDir(lpFileName) || - ((b_Mask) && IsAttribDir(wfd.dwFileAttributes) && (nFileOp.fFlags & FOF_FILESONLY))) - continue; - SHFileStrCpyCatW(&pFromFile[1], lpFileName, NULL); - /* TODO: Check the SHELL_DeleteFileOrDirectoryW() function in shell32.dll */ - if (IsAttribFile(wfd.dwFileAttributes)) - { - if(SHNotifyDeleteFileW(pTempFrom) != ERROR_SUCCESS) - { - nFileOp.fAnyOperationsAborted = TRUE; - retCode = 0x78; /* value unknown */ - } - } - else - { - if(!SHELL_DeleteDirectoryW(pTempFrom, (!(nFileOp.fFlags & FOF_NOCONFIRMATION)))) - { - nFileOp.fAnyOperationsAborted = TRUE; - retCode = 0x79; /* value unknown */ - } - } - } while (!nFileOp.fAnyOperationsAborted && FindNextFileW(hFind, &wfd)); - FindClose(hFind); - hFind = INVALID_HANDLE_VALUE; - if (nFileOp.fAnyOperationsAborted) - goto shfileop_end; - continue; - } /* FO_DELETE ends, pTo must be always valid from here */ - - b_SameRoot = (toupperW(pTempFrom[0]) == toupperW(pTempTo[0])); - b_SameTailName = SHFileStrICmpW(pToFile, pFromFile, NULL, NULL); - - ToPathAttr = ToAttr = GetFileAttributesW(pTempTo); - if (!b_Mask && (ToAttr == INVALID_FILE_ATTRIBUTES) && (pToFile)) - { - pToFile[0] = '\0'; - ToPathAttr = GetFileAttributesW(pTempTo); - pToFile[0] = '\\'; - } - - if (FO_RENAME == FuncSwitch) - { - if (!b_SameRoot || b_Mask /* FO_RENAME works not with Mask */ - || !SHFileStrICmpW(pTempFrom, pTempTo, pFromFile, NULL) - || (SHFileStrICmpW(pTempFrom, pTempTo, pFromFile, HIGH_ADR) && !b_ToTailSlash)) - { - retCode = 0x73; - goto shfileop_end; - } - if (b_ToInvalidTail) - { - retCode=0x2; - goto shfileop_end; - } - if (INVALID_FILE_ATTRIBUTES == ToPathAttr) - { - retCode = 0x75; - goto shfileop_end; - } - if (IsAttribDir(wfd.dwFileAttributes) && IsAttribDir(ToAttr)) - { - retCode = (b_ToTailSlash) ? 0xb7 : 0x7b; - goto shfileop_end; - } - /* we use SHNotifyMoveFile() instead MoveFileW */ - if (SHNotifyMoveFileW(pTempFrom, pTempTo) != ERROR_SUCCESS) - { - /* we need still the value for the returncode, we use the mostly assumed */ - retCode = 0xb7; - goto shfileop_end; - } - goto shfileop_end; - } - - /* W98 Bug with FO_MOVE different from FO_COPY, better the same as FO_COPY */ - b_ToValid = ((b_SameTailName && b_SameRoot && (FO_COPY == FuncSwitch)) || - (b_SameTailName && !b_SameRoot) || (b_ToInvalidTail)); - - /* handle mask in source */ - if (b_Mask) - { - if (!IsAttribDir(ToAttr)) - { - retCode = (b_ToInvalidTail &&/* b_SameTailName &&*/ (FO_MOVE == FuncSwitch)) \ - ? 0x2 : 0x75; - goto shfileop_end; - } - pToFile = SHFileStrCpyCatW(pTempTo, NULL, wBackslash); - nFileOp.fFlags = (nFileOp.fFlags | FOF_MULTIDESTFILES); - do - { - lpFileName = wfd.cAlternateFileName; - if (!lpFileName[0]) - lpFileName = wfd.cFileName; - if (IsDotDir(lpFileName) || - (IsAttribDir(wfd.dwFileAttributes) && (nFileOp.fFlags & FOF_FILESONLY))) - continue; /* next name in pTempFrom(dir) */ - SHFileStrCpyCatW(&pToFile[1], lpFileName, NULL); - SHFileStrCpyCatW(&pFromFile[1], lpFileName, NULL); - retCode = SHFileOperationW (&nFileOp); - } while(!nFileOp.fAnyOperationsAborted && FindNextFileW(hFind, &wfd)); - } - FindClose(hFind); - hFind = INVALID_HANDLE_VALUE; - /* FO_COPY/FO_MOVE with mask, FO_DELETE and FO_RENAME are solved */ - if (b_Mask) - continue; - - /* only FO_COPY/FO_MOVE without mask, all others are (must be) solved */ - if (IsAttribDir(wfd.dwFileAttributes) && (ToAttr == INVALID_FILE_ATTRIBUTES)) - { - if (pToFile) - { - pToFile[0] = '\0'; - ToPathAttr = GetFileAttributesW(pTempTo); - if ((ToPathAttr == INVALID_FILE_ATTRIBUTES) && b_ToValid) - { - /* create dir must be here, sample target D:\y\ *.* create with RC=10003 */ - if (SHNotifyCreateDirectoryW(pTempTo, NULL)) - { - retCode = 0x73;/* value unknown */ - goto shfileop_end; - } - ToPathAttr = GetFileAttributesW(pTempTo); - } - pToFile[0] = '\\'; - if (b_ToInvalidTail) - { - retCode = 0x10003; - goto shfileop_end; - } - } - } - - /* trailing BackSlash is ever removed and pToFile points to BackSlash before */ - if (!b_MultiTo && (b_MultiFrom || (!(b_Multi) && IsAttribDir(ToAttr)))) - { - if ((FO_MOVE == FuncSwitch) && IsAttribDir(ToAttr) && IsAttribDir(wfd.dwFileAttributes)) - { - if (b_Multi) - { - retCode = 0x73; /* !b_Multi = 0x8 ?? */ - goto shfileop_end; - } - } - pToFile = SHFileStrCpyCatW(pTempTo, NULL, wfd.cFileName); - ToAttr = GetFileAttributesW(pTempTo); - } - - if (IsAttribDir(ToAttr)) - { - if (IsAttribFile(wfd.dwFileAttributes)) - { - retCode = (FO_COPY == FuncSwitch) ? 0x75 : 0xb7; - goto shfileop_end; - } - } - else - { - pToFile[0] = '\0'; - ToPathAttr = GetFileAttributesW(pTempTo); - pToFile[0] = '\\'; - if (IsAttribFile(ToPathAttr)) - { - /* error, is this tested ? */ - retCode = 0x777402; - goto shfileop_end; - } - } - - /* singlesource + no mask */ - if (INVALID_FILE_ATTRIBUTES == (ToAttr & ToPathAttr)) - { - /* Target-dir does not exist, and cannot be created */ - retCode=0x75; - goto shfileop_end; - } - - switch(FuncSwitch) - { - case FO_MOVE: - pToFile = NULL; - if ((ToAttr == INVALID_FILE_ATTRIBUTES) && SHFileStrICmpW(pTempFrom, pTempTo, pFromFile, NULL)) - { - nFileOp.wFunc = ((level+1)<<4) + FO_RENAME; - } - else - { - if (b_SameRoot && IsAttribDir(ToAttr) && IsAttribDir(wfd.dwFileAttributes)) - { - /* we need pToFile for FO_DELETE after FO_MOVE contence */ - pToFile = SHFileStrCpyCatW(pTempFrom, NULL, wWildcardFile); - } - else - { - nFileOp.wFunc = ((level+1)<<4) + FO_COPY; - } - } - retCode = SHFileOperationW(&nFileOp); - if (pToFile) - ((DWORD*)pToFile)[0] = '\0'; - if (!nFileOp.fAnyOperationsAborted && (FO_RENAME != (nFileOp.wFunc & 0xf))) - { - nFileOp.wFunc = ((level+1)<<4) + FO_DELETE; - retCode = SHFileOperationW(&nFileOp); - } - continue; - case FO_COPY: - if (SHFileStrICmpW(pTempFrom, pTempTo, NULL, NULL)) - { /* target is the same as source ? */ - /* we still need the value for the returncode, we assume 0x71 */ - retCode = 0x71; - goto shfileop_end; - } - if (IsAttribDir((ToAttr & wfd.dwFileAttributes))) - { - if (IsAttribDir(ToAttr) || !SHNotifyCreateDirectoryW(pTempTo, NULL)) - { - /* ??? nFileOp.fFlags = (nFileOp.fFlags | FOF_MULTIDESTFILES); */ - SHFileStrCpyCatW(pTempFrom, NULL, wWildcardFile); - retCode = SHFileOperationW(&nFileOp); - } - else - { - retCode = 0x750;/* value unknown */ - goto shfileop_end; - } - } - else - { - if (!(ask_overwrite && SHELL_ConfirmDialogW(ASK_OVERWRITE_FILE, pTempTo)) - && (not_overwrite)) - { - /* we still need the value for the returncode, we use the mostly assumed */ - retCode = 0x73; - goto shfileop_end; - } - if (SHNotifyCopyFileW(pTempFrom, pTempTo, TRUE) != ERROR_SUCCESS) - { - retCode = 0x77; /* value unknown */ - goto shfileop_end; - } - } - } - } - -shfileop_end: - if (hFind != INVALID_HANDLE_VALUE) - FindClose(hFind); - hFind = INVALID_HANDLE_VALUE; - HeapFree(GetProcessHeap(), 0, pTempFrom); - if (retCode) - nFileOp.fAnyOperationsAborted = TRUE; - TRACE("%s level=%ld AnyOpsAborted=%s ret=0x%x, with %s %s%s\n", - debug_shfileops_action(FuncSwitch), level, - nFileOp.fAnyOperationsAborted ? "TRUE":"FALSE", - retCode, debugstr_w(pFrom), pTo ? "-> ":"", debugstr_w(pTo)); - - lpFileOp->fAnyOperationsAborted = nFileOp.fAnyOperationsAborted; - return retCode; -} - -#define SHDSA_GetItemCount(hdsa) (*(int*)(hdsa)) - -/************************************************************************* - * SHFreeNameMappings [shell32.246] - * - * Free the mapping handle returned by SHFileoperation if FOF_WANTSMAPPINGHANDLE - * was specified. - * - * PARAMS - * hNameMapping [I] handle to the name mappings used during renaming of files - * - */ -void WINAPI SHFreeNameMappings(HANDLE hNameMapping) -{ - if (hNameMapping) - { - int i = SHDSA_GetItemCount((HDSA)hNameMapping) - 1; - - for (; i>= 0; i--) - { - LPSHNAMEMAPPINGW lp = DSA_GetItemPtr((HDSA)hNameMapping, i); - - SHFree(lp->pszOldPath); - SHFree(lp->pszNewPath); - } - DSA_Destroy((HDSA)hNameMapping); - } -} - -/************************************************************************* - * SheGetDirW [SHELL32.281] - * - */ -HRESULT WINAPI SheGetDirW(LPWSTR u, LPWSTR v) -{ FIXME("%p %p stub\n",u,v); - return 0; -} - -/************************************************************************* - * SheChangeDirW [SHELL32.274] - * - */ -HRESULT WINAPI SheChangeDirW(LPWSTR u) -{ FIXME("(%s),stub\n",debugstr_w(u)); - return 0; -} - -/************************************************************************* - * IsNetDrive [SHELL32.66] - */ -BOOL WINAPI IsNetDrive(DWORD drive) -{ - char root[4]; - strcpy(root, "A:\\"); - root[0] += (char)drive; - return (GetDriveTypeA(root) == DRIVE_REMOTE); -} - - -/************************************************************************* - * RealDriveType [SHELL32.524] - */ -INT WINAPI RealDriveType(INT drive, BOOL bQueryNet) -{ - char root[] = "A:\\"; - root[0] += (char)drive; - return GetDriveTypeA(root); -} +/* + * SHFileOperation + * + * Copyright 2000 Juergen Schmied + * Copyright 2002 Andriy Palamarchuk + * Copyright 2004 Dietrich Teickner (from Odin) + * Copyright 2004 Rolf Kalbermatter + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" +#include "wine/port.h" + +#include +#include +#include + +#include "windef.h" +#include "winbase.h" +#include "winreg.h" +#include "shellapi.h" +#include "wingdi.h" +#include "winuser.h" +#include "shlobj.h" +#include "shresdef.h" +#define NO_SHLWAPI_STREAM +#include "shlwapi.h" +#include "shell32_main.h" +#include "undocshell.h" +#include "wine/unicode.h" +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(shell); + +#define IsAttrib(x, y) ((INVALID_FILE_ATTRIBUTES != (x)) && ((x) & (y))) +#define IsAttribFile(x) (!((x) & FILE_ATTRIBUTE_DIRECTORY)) +#define IsAttribDir(x) IsAttrib(x, FILE_ATTRIBUTE_DIRECTORY) +#define IsDotDir(x) ((x[0] == '.') && ((x[1] == 0) || ((x[1] == '.') && (x[2] == 0)))) + +#define FO_MASK 0xF + +static const WCHAR wWildcardFile[] = {'*',0}; +static const WCHAR wWildcardChars[] = {'*','?',0}; +static const WCHAR wBackslash[] = {'\\',0}; + +static BOOL SHELL_DeleteDirectoryW(LPCWSTR path, BOOL bShowUI); +static DWORD SHNotifyCreateDirectoryA(LPCSTR path, LPSECURITY_ATTRIBUTES sec); +static DWORD SHNotifyCreateDirectoryW(LPCWSTR path, LPSECURITY_ATTRIBUTES sec); +static DWORD SHNotifyRemoveDirectoryA(LPCSTR path); +static DWORD SHNotifyRemoveDirectoryW(LPCWSTR path); +static DWORD SHNotifyDeleteFileA(LPCSTR path); +static DWORD SHNotifyDeleteFileW(LPCWSTR path); +static DWORD SHNotifyMoveFileW(LPCWSTR src, LPCWSTR dest); +static DWORD SHNotifyCopyFileW(LPCWSTR src, LPCWSTR dest, BOOL bFailIfExists); +static DWORD SHFindAttrW(LPCWSTR pName, BOOL fileOnly); + +typedef struct +{ + UINT caption_resource_id, text_resource_id; +} SHELL_ConfirmIDstruc; + +static BOOL SHELL_ConfirmIDs(int nKindOfDialog, SHELL_ConfirmIDstruc *ids) +{ + switch (nKindOfDialog) { + case ASK_DELETE_FILE: + ids->caption_resource_id = IDS_DELETEITEM_CAPTION; + ids->text_resource_id = IDS_DELETEITEM_TEXT; + return TRUE; + case ASK_DELETE_FOLDER: + ids->caption_resource_id = IDS_DELETEFOLDER_CAPTION; + ids->text_resource_id = IDS_DELETEITEM_TEXT; + return TRUE; + case ASK_DELETE_MULTIPLE_ITEM: + ids->caption_resource_id = IDS_DELETEITEM_CAPTION; + ids->text_resource_id = IDS_DELETEMULTIPLE_TEXT; + return TRUE; + case ASK_OVERWRITE_FILE: + ids->caption_resource_id = IDS_OVERWRITEFILE_CAPTION; + ids->text_resource_id = IDS_OVERWRITEFILE_TEXT; + return TRUE; + default: + FIXME(" Unhandled nKindOfDialog %d stub\n", nKindOfDialog); + } + return FALSE; +} + +BOOL SHELL_ConfirmDialog(int nKindOfDialog, LPCSTR szDir) +{ + CHAR szCaption[255], szText[255], szBuffer[MAX_PATH + 256]; + SHELL_ConfirmIDstruc ids; + + if (!SHELL_ConfirmIDs(nKindOfDialog, &ids)) + return FALSE; + + LoadStringA(shell32_hInstance, ids.caption_resource_id, szCaption, sizeof(szCaption)); + LoadStringA(shell32_hInstance, ids.text_resource_id, szText, sizeof(szText)); + + FormatMessageA(FORMAT_MESSAGE_FROM_STRING|FORMAT_MESSAGE_ARGUMENT_ARRAY, + szText, 0, 0, szBuffer, sizeof(szBuffer), (va_list*)&szDir); + + return (IDOK == MessageBoxA(GetActiveWindow(), szBuffer, szCaption, MB_OKCANCEL | MB_ICONEXCLAMATION)); +} + +BOOL SHELL_ConfirmDialogW(int nKindOfDialog, LPCWSTR szDir) +{ + WCHAR szCaption[255], szText[255], szBuffer[MAX_PATH + 256]; + SHELL_ConfirmIDstruc ids; + + if (!SHELL_ConfirmIDs(nKindOfDialog, &ids)) + return FALSE; + + LoadStringW(shell32_hInstance, ids.caption_resource_id, szCaption, sizeof(szCaption)); + LoadStringW(shell32_hInstance, ids.text_resource_id, szText, sizeof(szText)); + + FormatMessageW(FORMAT_MESSAGE_FROM_STRING|FORMAT_MESSAGE_ARGUMENT_ARRAY, + szText, 0, 0, szBuffer, sizeof(szBuffer), (va_list*)&szDir); + + return (IDOK == MessageBoxW(GetActiveWindow(), szBuffer, szCaption, MB_OKCANCEL | MB_ICONEXCLAMATION)); +} + +static DWORD SHELL32_AnsiToUnicodeBuf(LPCSTR aPath, LPWSTR *wPath, DWORD minChars) +{ + DWORD len = MultiByteToWideChar(CP_ACP, 0, aPath, -1, NULL, 0); + + if (len < minChars) + len = minChars; + + *wPath = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); + if (*wPath) + { + MultiByteToWideChar(CP_ACP, 0, aPath, -1, *wPath, len); + return NO_ERROR; + } + return E_OUTOFMEMORY; +} + +static void SHELL32_FreeUnicodeBuf(LPWSTR wPath) +{ + HeapFree(GetProcessHeap(), 0, wPath); +} + +/************************************************************************** + * SHELL_DeleteDirectory() [internal] + * + * Asks for confirmation when bShowUI is true and deletes the directory and + * all its subdirectories and files if necessary. + */ +BOOL SHELL_DeleteDirectoryA(LPCSTR pszDir, BOOL bShowUI) +{ + LPWSTR wPath; + BOOL ret = FALSE; + + if (!SHELL32_AnsiToUnicodeBuf(pszDir, &wPath, 0)) + { + ret = SHELL_DeleteDirectoryW(wPath, bShowUI); + SHELL32_FreeUnicodeBuf(wPath); + } + return ret; +} + +static BOOL SHELL_DeleteDirectoryW(LPCWSTR pszDir, BOOL bShowUI) +{ + BOOL ret = TRUE; + HANDLE hFind; + WIN32_FIND_DATAW wfd; + WCHAR szTemp[MAX_PATH]; + + /* Make sure the directory exists before eventually prompting the user */ + PathCombineW(szTemp, pszDir, wWildcardFile); + hFind = FindFirstFileW(szTemp, &wfd); + if (hFind == INVALID_HANDLE_VALUE) + return FALSE; + + if (!bShowUI || (ret = SHELL_ConfirmDialogW(ASK_DELETE_FOLDER, pszDir))) + { + do + { + LPWSTR lp = wfd.cAlternateFileName; + if (!lp[0]) + lp = wfd.cFileName; + if (IsDotDir(lp)) + continue; + PathCombineW(szTemp, pszDir, lp); + if (FILE_ATTRIBUTE_DIRECTORY & wfd.dwFileAttributes) + ret = SHELL_DeleteDirectoryW(szTemp, FALSE); + else + ret = (SHNotifyDeleteFileW(szTemp) == ERROR_SUCCESS); + } while (ret && FindNextFileW(hFind, &wfd)); + } + FindClose(hFind); + if (ret) + ret = (SHNotifyRemoveDirectoryW(pszDir) == ERROR_SUCCESS); + return ret; +} + +/************************************************************************** + * SHELL_DeleteFileA() [internal] + */ +BOOL SHELL_DeleteFileA(LPCSTR pszFile, BOOL bShowUI) +{ + if (bShowUI && !SHELL_ConfirmDialog(ASK_DELETE_FILE, pszFile)) + return FALSE; + + return (SHNotifyDeleteFileA(pszFile) == ERROR_SUCCESS); +} + +BOOL SHELL_DeleteFileW(LPCWSTR pszFile, BOOL bShowUI) +{ + if (bShowUI && !SHELL_ConfirmDialogW(ASK_DELETE_FILE, pszFile)) + return FALSE; + + return (SHNotifyDeleteFileW(pszFile) == ERROR_SUCCESS); +} + +/************************************************************************** + * Win32CreateDirectory [SHELL32.93] + * + * Creates a directory. Also triggers a change notify if one exists. + * + * PARAMS + * path [I] path to directory to create + * + * RETURNS + * TRUE if successful, FALSE otherwise + * + * NOTES: + * Verified on Win98 / IE 5 (SHELL32 4.72, March 1999 build) to be ANSI. + * This is Unicode on NT/2000 + */ +static DWORD SHNotifyCreateDirectoryA(LPCSTR path, LPSECURITY_ATTRIBUTES sec) +{ + LPWSTR wPath; + DWORD retCode; + + TRACE("(%s, %p)\n", debugstr_a(path), sec); + + retCode = SHELL32_AnsiToUnicodeBuf(path, &wPath, 0); + if (!retCode) + { + retCode = SHNotifyCreateDirectoryW(wPath, sec); + SHELL32_FreeUnicodeBuf(wPath); + } + return retCode; +} + +/**********************************************************************/ + +static DWORD SHNotifyCreateDirectoryW(LPCWSTR path, LPSECURITY_ATTRIBUTES sec) +{ + TRACE("(%s, %p)\n", debugstr_w(path), sec); + + if (CreateDirectoryW(path, sec)) + { + SHChangeNotify(SHCNE_MKDIR, SHCNF_PATHW, path, NULL); + return ERROR_SUCCESS; + } + return GetLastError(); +} + +/**********************************************************************/ + +BOOL WINAPI Win32CreateDirectoryAW(LPCVOID path, LPSECURITY_ATTRIBUTES sec) +{ + if (SHELL_OsIsUnicode()) + return (SHNotifyCreateDirectoryW(path, sec) == ERROR_SUCCESS); + return (SHNotifyCreateDirectoryA(path, sec) == ERROR_SUCCESS); +} + +/************************************************************************ + * Win32RemoveDirectory [SHELL32.94] + * + * Deletes a directory. Also triggers a change notify if one exists. + * + * PARAMS + * path [I] path to directory to delete + * + * RETURNS + * TRUE if successful, FALSE otherwise + * + * NOTES: + * Verified on Win98 / IE 5 (SHELL32 4.72, March 1999 build) to be ANSI. + * This is Unicode on NT/2000 + */ +static DWORD SHNotifyRemoveDirectoryA(LPCSTR path) +{ + LPWSTR wPath; + DWORD retCode; + + TRACE("(%s)\n", debugstr_a(path)); + + retCode = SHELL32_AnsiToUnicodeBuf(path, &wPath, 0); + if (!retCode) + { + retCode = SHNotifyRemoveDirectoryW(wPath); + SHELL32_FreeUnicodeBuf(wPath); + } + return retCode; +} + +/***********************************************************************/ + +static DWORD SHNotifyRemoveDirectoryW(LPCWSTR path) +{ + BOOL ret; + TRACE("(%s)\n", debugstr_w(path)); + + ret = RemoveDirectoryW(path); + if (!ret) + { + /* Directory may be write protected */ + DWORD dwAttr = GetFileAttributesW(path); + if (IsAttrib(dwAttr, FILE_ATTRIBUTE_READONLY)) + if (SetFileAttributesW(path, dwAttr & ~FILE_ATTRIBUTE_READONLY)) + ret = RemoveDirectoryW(path); + } + if (ret) + { + SHChangeNotify(SHCNE_RMDIR, SHCNF_PATHW, path, NULL); + return ERROR_SUCCESS; + } + return GetLastError(); +} + +/***********************************************************************/ + +BOOL WINAPI Win32RemoveDirectoryAW(LPCVOID path) +{ + if (SHELL_OsIsUnicode()) + return (SHNotifyRemoveDirectoryW(path) == ERROR_SUCCESS); + return (SHNotifyRemoveDirectoryA(path) == ERROR_SUCCESS); +} + +/************************************************************************ + * Win32DeleteFile [SHELL32.164] + * + * Deletes a file. Also triggers a change notify if one exists. + * + * PARAMS + * path [I] path to file to delete + * + * RETURNS + * TRUE if successful, FALSE otherwise + * + * NOTES: + * Verified on Win98 / IE 5 (SHELL32 4.72, March 1999 build) to be ANSI. + * This is Unicode on NT/2000 + */ +static DWORD SHNotifyDeleteFileA(LPCSTR path) +{ + LPWSTR wPath; + DWORD retCode; + + TRACE("(%s)\n", debugstr_a(path)); + + retCode = SHELL32_AnsiToUnicodeBuf(path, &wPath, 0); + if (!retCode) + { + retCode = SHNotifyDeleteFileW(wPath); + SHELL32_FreeUnicodeBuf(wPath); + } + return retCode; +} + +/***********************************************************************/ + +static DWORD SHNotifyDeleteFileW(LPCWSTR path) +{ + BOOL ret; + + TRACE("(%s)\n", debugstr_w(path)); + + ret = DeleteFileW(path); + if (!ret) + { + /* File may be write protected or a system file */ + DWORD dwAttr = GetFileAttributesW(path); + if (IsAttrib(dwAttr, FILE_ATTRIBUTE_READONLY | FILE_ATTRIBUTE_SYSTEM)) + if (SetFileAttributesW(path, dwAttr & ~(FILE_ATTRIBUTE_READONLY | FILE_ATTRIBUTE_SYSTEM))) + ret = DeleteFileW(path); + } + if (ret) + { + SHChangeNotify(SHCNE_DELETE, SHCNF_PATHW, path, NULL); + return ERROR_SUCCESS; + } + return GetLastError(); +} + +/***********************************************************************/ + +DWORD WINAPI Win32DeleteFileAW(LPCVOID path) +{ + if (SHELL_OsIsUnicode()) + return (SHNotifyDeleteFileW(path) == ERROR_SUCCESS); + return (SHNotifyDeleteFileA(path) == ERROR_SUCCESS); +} + +/************************************************************************ + * SHNotifyMoveFile [internal] + * + * Moves a file. Also triggers a change notify if one exists. + * + * PARAMS + * src [I] path to source file to move + * dest [I] path to target file to move to + * + * RETURNS + * ERORR_SUCCESS if successful + */ +static DWORD SHNotifyMoveFileW(LPCWSTR src, LPCWSTR dest) +{ + BOOL ret; + + TRACE("(%s %s)\n", debugstr_w(src), debugstr_w(dest)); + + ret = MoveFileW(src, dest); + if (!ret) + { + DWORD dwAttr; + + dwAttr = SHFindAttrW(dest, FALSE); + if (INVALID_FILE_ATTRIBUTES == dwAttr) + { + /* Source file may be write protected or a system file */ + dwAttr = GetFileAttributesW(src); + if (IsAttrib(dwAttr, FILE_ATTRIBUTE_READONLY | FILE_ATTRIBUTE_SYSTEM)) + if (SetFileAttributesW(src, dwAttr & ~(FILE_ATTRIBUTE_READONLY | FILE_ATTRIBUTE_SYSTEM))) + ret = MoveFileW(src, dest); + } + } + if (ret) + { + SHChangeNotify(SHCNE_RENAMEITEM, SHCNF_PATHW, src, dest); + return ERROR_SUCCESS; + } + return GetLastError(); +} + +/************************************************************************ + * SHNotifyCopyFile [internal] + * + * Copies a file. Also triggers a change notify if one exists. + * + * PARAMS + * src [I] path to source file to move + * dest [I] path to target file to move to + * bFailIfExists [I] if TRUE, the target file will not be overwritten if + * a file with this name already exists + * + * RETURNS + * ERROR_SUCCESS if successful + */ +static DWORD SHNotifyCopyFileW(LPCWSTR src, LPCWSTR dest, BOOL bFailIfExists) +{ + BOOL ret; + + TRACE("(%s %s %s)\n", debugstr_w(src), debugstr_w(dest), bFailIfExists ? "failIfExists" : ""); + + ret = CopyFileW(src, dest, bFailIfExists); + if (ret) + { + SHChangeNotify(SHCNE_CREATE, SHCNF_PATHW, dest, NULL); + return ERROR_SUCCESS; + } + return GetLastError(); +} + +/************************************************************************* + * SHCreateDirectory [SHELL32.165] + * + * This function creates a file system folder whose fully qualified path is + * given by path. If one or more of the intermediate folders do not exist, + * they will be created as well. + * + * PARAMS + * hWnd [I] + * path [I] path of directory to create + * + * RETURNS + * ERRROR_SUCCESS or one of the following values: + * ERROR_BAD_PATHNAME if the path is relative + * ERROR_FILE_EXISTS when a file with that name exists + * ERROR_PATH_NOT_FOUND can't find the path, probably invalid + * ERROR_INVLID_NAME if the path contains invalid chars + * ERROR_ALREADY_EXISTS when the directory already exists + * ERROR_FILENAME_EXCED_RANGE if the filename was to long to process + * + * NOTES + * exported by ordinal + * Win9x exports ANSI + * WinNT/2000 exports Unicode + */ +DWORD WINAPI SHCreateDirectory(HWND hWnd, LPCVOID path) +{ + if (SHELL_OsIsUnicode()) + return SHCreateDirectoryExW(hWnd, path, NULL); + return SHCreateDirectoryExA(hWnd, path, NULL); +} + +/************************************************************************* + * SHCreateDirectoryExA [SHELL32.@] + * + * This function creates a file system folder whose fully qualified path is + * given by path. If one or more of the intermediate folders do not exist, + * they will be created as well. + * + * PARAMS + * hWnd [I] + * path [I] path of directory to create + * sec [I] security attributes to use or NULL + * + * RETURNS + * ERRROR_SUCCESS or one of the following values: + * ERROR_BAD_PATHNAME or ERROR_PATH_NOT_FOUND if the path is relative + * ERROR_INVLID_NAME if the path contains invalid chars + * ERROR_FILE_EXISTS when a file with that name exists + * ERROR_ALREADY_EXISTS when the directory already exists + * ERROR_FILENAME_EXCED_RANGE if the filename was to long to process + * + * FIXME: Not implemented yet; + * SHCreateDirectoryEx also verifies that the files in the directory will be visible + * if the path is a network path to deal with network drivers which might have a limited + * but unknown maximum path length. If not: + * + * If hWnd is set to a valid window handle, a message box is displayed warning + * the user that the files may not be accessible. If the user chooses not to + * proceed, the function returns ERROR_CANCELLED. + * + * If hWnd is set to NULL, no user interface is displayed and the function + * returns ERROR_CANCELLED. + */ +int WINAPI SHCreateDirectoryExA(HWND hWnd, LPCSTR path, LPSECURITY_ATTRIBUTES sec) +{ + LPWSTR wPath; + DWORD retCode; + + TRACE("(%s, %p)\n", debugstr_a(path), sec); + + retCode = SHELL32_AnsiToUnicodeBuf(path, &wPath, 0); + if (!retCode) + { + retCode = SHCreateDirectoryExW(hWnd, wPath, sec); + SHELL32_FreeUnicodeBuf(wPath); + } + return retCode; +} + +/************************************************************************* + * SHCreateDirectoryExW [SHELL32.@] + */ +int WINAPI SHCreateDirectoryExW(HWND hWnd, LPCWSTR path, LPSECURITY_ATTRIBUTES sec) +{ + int ret = ERROR_BAD_PATHNAME; + TRACE("(%p, %s, %p)\n", hWnd, debugstr_w(path), sec); + + if (PathIsRelativeW(path)) + { + SetLastError(ret); + } + else + { + ret = SHNotifyCreateDirectoryW(path, sec); + /* Refuse to work on certain error codes before trying to create directories recursively */ + if (ret != ERROR_FILE_EXISTS && + ret != ERROR_ALREADY_EXISTS && + ret != ERROR_FILENAME_EXCED_RANGE) + { + WCHAR *pEnd, *pSlash, szTemp[MAX_PATH + 1]; /* extra for PathAddBackslash() */ + + lstrcpynW(szTemp, path, MAX_PATH); + pEnd = PathAddBackslashW(szTemp); + pSlash = szTemp + 3; + + while (*pSlash) + { + while (*pSlash && *pSlash != '\\') + pSlash = CharNextW(pSlash); + + if (*pSlash) + { + *pSlash = 0; /* terminate path at separator */ + + ret = SHNotifyCreateDirectoryW(szTemp, pSlash + 1 == pEnd ? sec : NULL); + } + *pSlash++ = '\\'; /* put the separator back */ + } + } + + if (ret && hWnd && (ERROR_CANCELLED != ret)) + { + /* We failed and should show a dialog box */ + FIXME("Show system error message, creating path %s, failed with error %d\n", debugstr_w(path), ret); + ret = ERROR_CANCELLED; /* Error has been already presented to user (not really yet!) */ + } + } + return ret; +} + + +/************************************************************************* + * SHFindAttrW [internal] + * + * Get the Attributes for a file or directory. The difference to GetAttributes() + * is that this function will also work for paths containing wildcard characters + * in its filename. + + * PARAMS + * path [I] path of directory or file to check + * fileOnly [I] TRUE if only files should be found + * + * RETURNS + * INVALID_FILE_ATTRIBUTES if the path does not exist, the actual attributes of + * the first file or directory found otherwise + */ +static DWORD SHFindAttrW(LPCWSTR pName, BOOL fileOnly) +{ + WIN32_FIND_DATAW wfd; + BOOL b_FileMask = fileOnly && (NULL != StrPBrkW(pName, wWildcardChars)); + DWORD dwAttr = INVALID_FILE_ATTRIBUTES; + HANDLE hFind = FindFirstFileW(pName, &wfd); + + TRACE("%s %d\n", debugstr_w(pName), fileOnly); + if (INVALID_HANDLE_VALUE != hFind) + { + do + { + if (b_FileMask && IsAttribDir(wfd.dwFileAttributes)) + continue; + dwAttr = wfd.dwFileAttributes; + break; + } + while (FindNextFileW(hFind, &wfd)); + FindClose(hFind); + } + return dwAttr; +} + +/************************************************************************* + * + * SHFileStrICmp HelperFunction for SHFileOperationW + * + */ +BOOL SHFileStrICmpW(LPWSTR p1, LPWSTR p2, LPWSTR p1End, LPWSTR p2End) +{ + WCHAR C1 = '\0'; + WCHAR C2 = '\0'; + int i_Temp = -1; + int i_len1 = lstrlenW(p1); + int i_len2 = lstrlenW(p2); + + if (p1End && (&p1[i_len1] >= p1End) && ('\\' == p1End[0])) + { + C1 = p1End[0]; + p1End[0] = '\0'; + i_len1 = lstrlenW(p1); + } + if (p2End) + { + if ((&p2[i_len2] >= p2End) && ('\\' == p2End[0])) + { + C2 = p2End[0]; + if (C2) + p2End[0] = '\0'; + } + } + else + { + if ((i_len1 <= i_len2) && ('\\' == p2[i_len1])) + { + C2 = p2[i_len1]; + if (C2) + p2[i_len1] = '\0'; + } + } + i_len2 = lstrlenW(p2); + if (i_len1 == i_len2) + i_Temp = lstrcmpiW(p1,p2); + if (C1) + p1[i_len1] = C1; + if (C2) + p2[i_len2] = C2; + return !(i_Temp); +} + +/************************************************************************* + * + * SHFileStrCpyCat HelperFunction for SHFileOperationW + * + */ +LPWSTR SHFileStrCpyCatW(LPWSTR pTo, LPCWSTR pFrom, LPCWSTR pCatStr) +{ + LPWSTR pToFile = NULL; + int i_len; + if (pTo) + { + if (pFrom) + lstrcpyW(pTo, pFrom); + if (pCatStr) + { + i_len = lstrlenW(pTo); + if ((i_len) && (pTo[--i_len] != '\\')) + i_len++; + pTo[i_len] = '\\'; + if (pCatStr[0] == '\\') + pCatStr++; \ + lstrcpyW(&pTo[i_len+1], pCatStr); + } + pToFile = StrRChrW(pTo,NULL,'\\'); + /* termination of the new string-group */ + pTo[(lstrlenW(pTo)) + 1] = '\0'; + } + return pToFile; +} + +/************************************************************************** + * SHELL_FileNamesMatch() + * + * Accepts two \0 delimited lists of the file names. Checks whether number of + * files in both lists is the same, and checks also if source-name exists. + */ +BOOL SHELL_FileNamesMatch(LPCWSTR pszFiles1, LPCWSTR pszFiles2, BOOL bOnlySrc) +{ + while ((pszFiles1[0] != '\0') && + (bOnlySrc || (pszFiles2[0] != '\0'))) + { + if (NULL == StrPBrkW(pszFiles1, wWildcardChars)) + { + if (INVALID_FILE_ATTRIBUTES == GetFileAttributesW(pszFiles1)) + return FALSE; + } + pszFiles1 += lstrlenW(pszFiles1) + 1; + if (!bOnlySrc) + pszFiles2 += lstrlenW(pszFiles2) + 1; + } + return ((pszFiles1[0] == '\0') && (bOnlySrc || (pszFiles2[0] == '\0'))); +} + +/************************************************************************* + * + * SHNameTranslate HelperFunction for SHFileOperationA + * + * Translates a list of 0 terminated ASCII strings into Unicode. If *wString + * is NULL, only the necessary size of the string is determined and returned, + * otherwise the ASCII strings are copied into it and the buffer is increased + * to point to the location after the final 0 termination char. + */ +DWORD SHNameTranslate(LPWSTR* wString, LPCWSTR* pWToFrom, BOOL more) +{ + DWORD size = 0, aSize = 0; + LPCSTR aString = (LPCSTR)*pWToFrom; + + if (aString) + { + do + { + size = lstrlenA(aString) + 1; + aSize += size; + aString += size; + } while ((size != 1) && more); + /* The two sizes might be different in the case of multibyte chars */ + size = MultiByteToWideChar(CP_ACP, 0, aString, aSize, *wString, 0); + if (*wString) /* only in the second loop */ + { + MultiByteToWideChar(CP_ACP, 0, (LPCSTR)*pWToFrom, aSize, *wString, size); + *pWToFrom = *wString; + *wString += size; + } + } + return size; +} +/************************************************************************* + * SHFileOperationA [SHELL32.@] + * + * Function to copy, move, delete and create one or more files with optional + * user prompts. + * + * PARAMS + * lpFileOp [I/O] pointer to a structure containing all the necessary information + * + * NOTES + * exported by name + */ +int WINAPI SHFileOperationA(LPSHFILEOPSTRUCTA lpFileOp) +{ + SHFILEOPSTRUCTW nFileOp = *((LPSHFILEOPSTRUCTW)lpFileOp); + int retCode = 0; + DWORD size; + LPWSTR ForFree = NULL, /* we change wString in SHNameTranslate and can't use it for freeing */ + wString = NULL; /* we change this in SHNameTranslate */ + + TRACE("\n"); + if (FO_DELETE == (nFileOp.wFunc & FO_MASK)) + nFileOp.pTo = NULL; /* we need a NULL or a valid pointer for translation */ + if (!(nFileOp.fFlags & FOF_SIMPLEPROGRESS)) + nFileOp.lpszProgressTitle = NULL; /* we need a NULL or a valid pointer for translation */ + while (1) /* every loop calculate size, second translate also, if we have storage for this */ + { + size = SHNameTranslate(&wString, &nFileOp.lpszProgressTitle, FALSE); /* no loop */ + size += SHNameTranslate(&wString, &nFileOp.pFrom, TRUE); /* internal loop */ + size += SHNameTranslate(&wString, &nFileOp.pTo, TRUE); /* internal loop */ + + if (ForFree) + { + retCode = SHFileOperationW(&nFileOp); + HeapFree(GetProcessHeap(), 0, ForFree); /* we can not use wString, it was changed */ + break; + } + else + { + wString = ForFree = HeapAlloc(GetProcessHeap(), 0, size * sizeof(WCHAR)); + if (ForFree) continue; + retCode = ERROR_OUTOFMEMORY; + nFileOp.fAnyOperationsAborted = TRUE; + SetLastError(retCode); + return retCode; + } + } + + lpFileOp->hNameMappings = nFileOp.hNameMappings; + lpFileOp->fAnyOperationsAborted = nFileOp.fAnyOperationsAborted; + return retCode; +} + +static const char * debug_shfileops_flags( DWORD fFlags ) +{ + return wine_dbg_sprintf( "%s%s%s%s%s%s%s%s%s%s%s%s%s", + fFlags & FOF_MULTIDESTFILES ? "FOF_MULTIDESTFILES " : "", + fFlags & FOF_CONFIRMMOUSE ? "FOF_CONFIRMMOUSE " : "", + fFlags & FOF_SILENT ? "FOF_SILENT " : "", + fFlags & FOF_RENAMEONCOLLISION ? "FOF_RENAMEONCOLLISION " : "", + fFlags & FOF_NOCONFIRMATION ? "FOF_NOCONFIRMATION " : "", + fFlags & FOF_WANTMAPPINGHANDLE ? "FOF_WANTMAPPINGHANDLE " : "", + fFlags & FOF_ALLOWUNDO ? "FOF_ALLOWUNDO " : "", + fFlags & FOF_FILESONLY ? "FOF_FILESONLY " : "", + fFlags & FOF_SIMPLEPROGRESS ? "FOF_SIMPLEPROGRESS " : "", + fFlags & FOF_NOCONFIRMMKDIR ? "FOF_NOCONFIRMMKDIR " : "", + fFlags & FOF_NOERRORUI ? "FOF_NOERRORUI " : "", + fFlags & FOF_NOCOPYSECURITYATTRIBS ? "FOF_NOCOPYSECURITYATTRIBS" : "", + fFlags & 0xf000 ? "MORE-UNKNOWN-Flags" : ""); +} + +static const char * debug_shfileops_action( DWORD op ) +{ + LPCSTR cFO_Name [] = {"FO_????","FO_MOVE","FO_COPY","FO_DELETE","FO_RENAME"}; + return wine_dbg_sprintf("%s", cFO_Name[ op ]); +} + +#define ERROR_SHELL_INTERNAL_FILE_NOT_FOUND 1026 +#define HIGH_ADR (LPWSTR)0xffffffff + +/************************************************************************* + * SHFileOperationW [SHELL32.@] + * + * See SHFileOperationA + */ +int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp) +{ + SHFILEOPSTRUCTW nFileOp = *(lpFileOp); + + LPCWSTR pNextFrom = nFileOp.pFrom; + LPCWSTR pNextTo = nFileOp.pTo; + LPCWSTR pFrom = pNextFrom; + LPCWSTR pTo = NULL; + HANDLE hFind = INVALID_HANDLE_VALUE; + WIN32_FIND_DATAW wfd; + LPWSTR pTempFrom = NULL; + LPWSTR pTempTo = NULL; + LPWSTR pFromFile; + LPWSTR pToFile = NULL; + LPWSTR lpFileName; + int retCode = 0; + DWORD ToAttr; + DWORD ToPathAttr; + DWORD FromPathAttr; + FILEOP_FLAGS OFl = ((FILEOP_FLAGS)lpFileOp->fFlags & 0xfff); + + BOOL b_Multi = (nFileOp.fFlags & FOF_MULTIDESTFILES); + + BOOL b_MultiTo = (FO_DELETE != (lpFileOp->wFunc & FO_MASK)); + BOOL b_MultiPaired = (!b_MultiTo); + BOOL b_MultiFrom = FALSE; + BOOL not_overwrite; + BOOL ask_overwrite; + BOOL b_SameRoot; + BOOL b_SameTailName; + BOOL b_ToInvalidTail = FALSE; + BOOL b_ToValid; /* for W98-Bug for FO_MOVE with source and target in same rootdrive */ + BOOL b_Mask; + BOOL b_ToTailSlash = FALSE; + + long FuncSwitch = (nFileOp.wFunc & FO_MASK); + long level= nFileOp.wFunc>>4; + + /* default no error */ + nFileOp.fAnyOperationsAborted = FALSE; + + if ((FuncSwitch < FO_MOVE) || (FuncSwitch > FO_RENAME)) + goto shfileop_end; /* no valid FunctionCode */ + + if (level == 0) + TRACE("%s: flags (0x%04x) : %s\n", + debug_shfileops_action(FuncSwitch), nFileOp.fFlags, + debug_shfileops_flags(nFileOp.fFlags) ); + + /* establish when pTo is interpreted as the name of the destination file + * or the directory where the Fromfile should be copied to. + * This depends on: + * (1) pTo points to the name of an existing directory; + * (2) the flag FOF_MULTIDESTFILES is present; + * (3) whether pFrom point to multiple filenames. + * + * Some experiments: + * + * destisdir 1 1 1 1 0 0 0 0 + * FOF_MULTIDESTFILES 1 1 0 0 1 1 0 0 + * multiple from filenames 1 0 1 0 1 0 1 0 + * --------------- + * copy files to dir 1 0 1 1 0 0 1 0 + * create dir 0 0 0 0 0 0 1 0 + */ + + /* + * Summary of flags: + * + * implemented flags: + * FOF_MULTIDESTFILES, FOF_NOCONFIRMATION, FOF_FILESONLY + * + * unimplememented and ignored flags: + * FOF_CONFIRMMOUSE, FOF_SILENT, FOF_NOCONFIRMMKDIR, + * FOF_SIMPLEPROGRESS, FOF_NOCOPYSECURITYATTRIBS + * + * partially implemented, breaks if file exists: + * FOF_RENAMEONCOLLISION + * + * unimplemented and break if any other flag set: + * FOF_ALLOWUNDO, FOF_WANTMAPPINGHANDLE + */ + + TRACE("%s level=%ld nFileOp.fFlags=0x%x\n", + debug_shfileops_action(FuncSwitch), level, lpFileOp->fFlags); + + /* OFl &= (-1 - (FOF_MULTIDESTFILES | FOF_FILESONLY)); */ + /* OFl ^= (FOF_SILENT | FOF_NOCONFIRMATION | FOF_SIMPLEPROGRESS | FOF_NOCONFIRMMKDIR); */ + OFl &= (~(FOF_MULTIDESTFILES | FOF_NOCONFIRMATION | FOF_FILESONLY)); /* implemented */ + OFl ^= (FOF_SILENT | FOF_NOCONFIRMMKDIR | FOF_NOERRORUI | FOF_NOCOPYSECURITYATTRIBS); /* ignored, if one */ + OFl &= (~FOF_SIMPLEPROGRESS); /* ignored, only with FOF_SILENT */ + if (OFl) + { + if (OFl & (~(FOF_CONFIRMMOUSE | FOF_SILENT | FOF_RENAMEONCOLLISION | + FOF_NOCONFIRMMKDIR | FOF_NOERRORUI | FOF_NOCOPYSECURITYATTRIBS))) + { + TRACE("%s level=%ld lpFileOp->fFlags=0x%x not implemented, Aborted=TRUE, stub\n", + debug_shfileops_action(FuncSwitch), level, OFl); + retCode = 0x403; /* 1027, we need an extension to shlfileop */ + goto shfileop_end; + } + else + { + TRACE("%s level=%ld lpFileOp->fFlags=0x%x not fully implemented, stub\n", + debug_shfileops_action(FuncSwitch), level, OFl); + } + } + + if ((pNextFrom) && (!(b_MultiTo) || (pNextTo))) + { + nFileOp.pFrom = pTempFrom = HeapAlloc(GetProcessHeap(), 0, ((1 + 2 * (b_MultiTo)) * MAX_PATH + 6) * sizeof(WCHAR)); + if (!pTempFrom) + { + retCode = ERROR_OUTOFMEMORY; + SetLastError(retCode); + goto shfileop_end; + } + if (b_MultiTo) + pTempTo = &pTempFrom[MAX_PATH + 4]; + nFileOp.pTo = pTempTo; + ask_overwrite = (!(nFileOp.fFlags & FOF_NOCONFIRMATION) && !(nFileOp.fFlags & FOF_RENAMEONCOLLISION)); + not_overwrite = (!(nFileOp.fFlags & FOF_NOCONFIRMATION) || (nFileOp.fFlags & FOF_RENAMEONCOLLISION)); + } + else + { + retCode = ERROR_SHELL_INTERNAL_FILE_NOT_FOUND; + goto shfileop_end; + } + /* need break at error before change sourcepointer */ + while(!nFileOp.fAnyOperationsAborted && (pNextFrom[0])) + { + nFileOp.wFunc = ((level + 1) << 4) + FuncSwitch; + nFileOp.fFlags = lpFileOp->fFlags; + + if (b_MultiTo) + { + pTo = pNextTo; + pNextTo = &pNextTo[lstrlenW(pTo)+1]; + b_MultiTo = (b_Multi && pNextTo[0]); + } + + pFrom = pNextFrom; + pNextFrom = &pNextFrom[lstrlenW(pNextFrom)+1]; + if (!b_MultiFrom && !b_MultiTo) + b_MultiFrom = (pNextFrom[0]); + + pFromFile = SHFileStrCpyCatW(pTempFrom, pFrom, NULL); + + if (pTo) + { + pToFile = SHFileStrCpyCatW(pTempTo, pTo, NULL); + } + if (!b_MultiPaired) + { + b_MultiPaired = + SHELL_FileNamesMatch(lpFileOp->pFrom, lpFileOp->pTo, (!b_Multi || b_MultiFrom)); + } + if (!(b_MultiPaired) || !(pFromFile) || !(pFromFile[1]) || ((pTo) && !(pToFile))) + { + retCode = ERROR_SHELL_INTERNAL_FILE_NOT_FOUND; + goto shfileop_end; + } + if (pTo) + { + b_ToTailSlash = (!pToFile[1]); + if (b_ToTailSlash) + { + pToFile[0] = '\0'; + if (StrChrW(pTempTo,'\\')) + { + pToFile = SHFileStrCpyCatW(pTempTo, NULL, NULL); + } + } + b_ToInvalidTail = (NULL != StrPBrkW(&pToFile[1], wWildcardChars)); + } + + /* for all */ + b_Mask = (NULL != StrPBrkW(&pFromFile[1], wWildcardChars)); + if (FO_RENAME == FuncSwitch) + { + /* temporary only for FO_RENAME */ + if (b_MultiTo || b_MultiFrom || (b_Mask && !b_ToInvalidTail)) + { +#ifndef W98_FO_FUNCTION + retCode = ERROR_GEN_FAILURE; /* W2K ERROR_GEN_FAILURE, W98 returns no error */ +#endif + goto shfileop_end; + } + } + + hFind = FindFirstFileW(pFrom, &wfd); + if (INVALID_HANDLE_VALUE == hFind) + { + if ((FO_DELETE == FuncSwitch) && (b_Mask)) + { + pFromFile[0] = '\0'; + FromPathAttr = GetFileAttributesW(pTempFrom); + pFromFile[0] = '\\'; + if (IsAttribDir(FromPathAttr)) + { + /* FO_DELETE with mask and without found is valid */ + goto shfileop_end; + } + } + /* root (without mask) is also not allowed as source, tested in W98 */ + retCode = ERROR_SHELL_INTERNAL_FILE_NOT_FOUND; + goto shfileop_end; + } + + /* for all */ + + /* ??? b_Mask = (!SHFileStrICmpA(&pFromFile[1], &wfd.cFileName[0], HIGH_ADR, HIGH_ADR)); */ + if (!pTo) /* FO_DELETE */ + { + do + { + lpFileName = wfd.cAlternateFileName; + if (!lpFileName[0]) + lpFileName = wfd.cFileName; + if (IsDotDir(lpFileName) || + ((b_Mask) && IsAttribDir(wfd.dwFileAttributes) && (nFileOp.fFlags & FOF_FILESONLY))) + continue; + SHFileStrCpyCatW(&pFromFile[1], lpFileName, NULL); + /* TODO: Check the SHELL_DeleteFileOrDirectoryW() function in shell32.dll */ + if (IsAttribFile(wfd.dwFileAttributes)) + { + if(SHNotifyDeleteFileW(pTempFrom) != ERROR_SUCCESS) + { + nFileOp.fAnyOperationsAborted = TRUE; + retCode = 0x78; /* value unknown */ + } + } + else + { + if(!SHELL_DeleteDirectoryW(pTempFrom, (!(nFileOp.fFlags & FOF_NOCONFIRMATION)))) + { + nFileOp.fAnyOperationsAborted = TRUE; + retCode = 0x79; /* value unknown */ + } + } + } while (!nFileOp.fAnyOperationsAborted && FindNextFileW(hFind, &wfd)); + FindClose(hFind); + hFind = INVALID_HANDLE_VALUE; + if (nFileOp.fAnyOperationsAborted) + goto shfileop_end; + continue; + } /* FO_DELETE ends, pTo must be always valid from here */ + + b_SameRoot = (toupperW(pTempFrom[0]) == toupperW(pTempTo[0])); + b_SameTailName = SHFileStrICmpW(pToFile, pFromFile, NULL, NULL); + + ToPathAttr = ToAttr = GetFileAttributesW(pTempTo); + if (!b_Mask && (ToAttr == INVALID_FILE_ATTRIBUTES) && (pToFile)) + { + pToFile[0] = '\0'; + ToPathAttr = GetFileAttributesW(pTempTo); + pToFile[0] = '\\'; + } + + if (FO_RENAME == FuncSwitch) + { + if (!b_SameRoot || b_Mask /* FO_RENAME works not with Mask */ + || !SHFileStrICmpW(pTempFrom, pTempTo, pFromFile, NULL) + || (SHFileStrICmpW(pTempFrom, pTempTo, pFromFile, HIGH_ADR) && !b_ToTailSlash)) + { + retCode = 0x73; + goto shfileop_end; + } + if (b_ToInvalidTail) + { + retCode=0x2; + goto shfileop_end; + } + if (INVALID_FILE_ATTRIBUTES == ToPathAttr) + { + retCode = 0x75; + goto shfileop_end; + } + if (IsAttribDir(wfd.dwFileAttributes) && IsAttribDir(ToAttr)) + { + retCode = (b_ToTailSlash) ? 0xb7 : 0x7b; + goto shfileop_end; + } + /* we use SHNotifyMoveFile() instead MoveFileW */ + if (SHNotifyMoveFileW(pTempFrom, pTempTo) != ERROR_SUCCESS) + { + /* we need still the value for the returncode, we use the mostly assumed */ + retCode = 0xb7; + goto shfileop_end; + } + goto shfileop_end; + } + + /* W98 Bug with FO_MOVE different from FO_COPY, better the same as FO_COPY */ + b_ToValid = ((b_SameTailName && b_SameRoot && (FO_COPY == FuncSwitch)) || + (b_SameTailName && !b_SameRoot) || (b_ToInvalidTail)); + + /* handle mask in source */ + if (b_Mask) + { + if (!IsAttribDir(ToAttr)) + { + retCode = (b_ToInvalidTail &&/* b_SameTailName &&*/ (FO_MOVE == FuncSwitch)) \ + ? 0x2 : 0x75; + goto shfileop_end; + } + pToFile = SHFileStrCpyCatW(pTempTo, NULL, wBackslash); + nFileOp.fFlags = (nFileOp.fFlags | FOF_MULTIDESTFILES); + do + { + lpFileName = wfd.cAlternateFileName; + if (!lpFileName[0]) + lpFileName = wfd.cFileName; + if (IsDotDir(lpFileName) || + (IsAttribDir(wfd.dwFileAttributes) && (nFileOp.fFlags & FOF_FILESONLY))) + continue; /* next name in pTempFrom(dir) */ + SHFileStrCpyCatW(&pToFile[1], lpFileName, NULL); + SHFileStrCpyCatW(&pFromFile[1], lpFileName, NULL); + retCode = SHFileOperationW (&nFileOp); + } while(!nFileOp.fAnyOperationsAborted && FindNextFileW(hFind, &wfd)); + } + FindClose(hFind); + hFind = INVALID_HANDLE_VALUE; + /* FO_COPY/FO_MOVE with mask, FO_DELETE and FO_RENAME are solved */ + if (b_Mask) + continue; + + /* only FO_COPY/FO_MOVE without mask, all others are (must be) solved */ + if (IsAttribDir(wfd.dwFileAttributes) && (ToAttr == INVALID_FILE_ATTRIBUTES)) + { + if (pToFile) + { + pToFile[0] = '\0'; + ToPathAttr = GetFileAttributesW(pTempTo); + if ((ToPathAttr == INVALID_FILE_ATTRIBUTES) && b_ToValid) + { + /* create dir must be here, sample target D:\y\ *.* create with RC=10003 */ + if (SHNotifyCreateDirectoryW(pTempTo, NULL)) + { + retCode = 0x73;/* value unknown */ + goto shfileop_end; + } + ToPathAttr = GetFileAttributesW(pTempTo); + } + pToFile[0] = '\\'; + if (b_ToInvalidTail) + { + retCode = 0x10003; + goto shfileop_end; + } + } + } + + /* trailing BackSlash is ever removed and pToFile points to BackSlash before */ + if (!b_MultiTo && (b_MultiFrom || (!(b_Multi) && IsAttribDir(ToAttr)))) + { + if ((FO_MOVE == FuncSwitch) && IsAttribDir(ToAttr) && IsAttribDir(wfd.dwFileAttributes)) + { + if (b_Multi) + { + retCode = 0x73; /* !b_Multi = 0x8 ?? */ + goto shfileop_end; + } + } + pToFile = SHFileStrCpyCatW(pTempTo, NULL, wfd.cFileName); + ToAttr = GetFileAttributesW(pTempTo); + } + + if (IsAttribDir(ToAttr)) + { + if (IsAttribFile(wfd.dwFileAttributes)) + { + retCode = (FO_COPY == FuncSwitch) ? 0x75 : 0xb7; + goto shfileop_end; + } + } + else + { + pToFile[0] = '\0'; + ToPathAttr = GetFileAttributesW(pTempTo); + pToFile[0] = '\\'; + if (IsAttribFile(ToPathAttr)) + { + /* error, is this tested ? */ + retCode = 0x777402; + goto shfileop_end; + } + } + + /* singlesource + no mask */ + if (INVALID_FILE_ATTRIBUTES == (ToAttr & ToPathAttr)) + { + /* Target-dir does not exist, and cannot be created */ + retCode=0x75; + goto shfileop_end; + } + + switch(FuncSwitch) + { + case FO_MOVE: + pToFile = NULL; + if ((ToAttr == INVALID_FILE_ATTRIBUTES) && SHFileStrICmpW(pTempFrom, pTempTo, pFromFile, NULL)) + { + nFileOp.wFunc = ((level+1)<<4) + FO_RENAME; + } + else + { + if (b_SameRoot && IsAttribDir(ToAttr) && IsAttribDir(wfd.dwFileAttributes)) + { + /* we need pToFile for FO_DELETE after FO_MOVE contence */ + pToFile = SHFileStrCpyCatW(pTempFrom, NULL, wWildcardFile); + } + else + { + nFileOp.wFunc = ((level+1)<<4) + FO_COPY; + } + } + retCode = SHFileOperationW(&nFileOp); + if (pToFile) + ((DWORD*)pToFile)[0] = '\0'; + if (!nFileOp.fAnyOperationsAborted && (FO_RENAME != (nFileOp.wFunc & 0xf))) + { + nFileOp.wFunc = ((level+1)<<4) + FO_DELETE; + retCode = SHFileOperationW(&nFileOp); + } + continue; + case FO_COPY: + if (SHFileStrICmpW(pTempFrom, pTempTo, NULL, NULL)) + { /* target is the same as source ? */ + /* we still need the value for the returncode, we assume 0x71 */ + retCode = 0x71; + goto shfileop_end; + } + if (IsAttribDir((ToAttr & wfd.dwFileAttributes))) + { + if (IsAttribDir(ToAttr) || !SHNotifyCreateDirectoryW(pTempTo, NULL)) + { + /* ??? nFileOp.fFlags = (nFileOp.fFlags | FOF_MULTIDESTFILES); */ + SHFileStrCpyCatW(pTempFrom, NULL, wWildcardFile); + retCode = SHFileOperationW(&nFileOp); + } + else + { + retCode = 0x750;/* value unknown */ + goto shfileop_end; + } + } + else + { + if (!(ask_overwrite && SHELL_ConfirmDialogW(ASK_OVERWRITE_FILE, pTempTo)) + && (not_overwrite)) + { + /* we still need the value for the returncode, we use the mostly assumed */ + retCode = 0x73; + goto shfileop_end; + } + if (SHNotifyCopyFileW(pTempFrom, pTempTo, TRUE) != ERROR_SUCCESS) + { + retCode = 0x77; /* value unknown */ + goto shfileop_end; + } + } + } + } + +shfileop_end: + if (hFind != INVALID_HANDLE_VALUE) + FindClose(hFind); + hFind = INVALID_HANDLE_VALUE; + HeapFree(GetProcessHeap(), 0, pTempFrom); + if (retCode) + nFileOp.fAnyOperationsAborted = TRUE; + TRACE("%s level=%ld AnyOpsAborted=%s ret=0x%x, with %s %s%s\n", + debug_shfileops_action(FuncSwitch), level, + nFileOp.fAnyOperationsAborted ? "TRUE":"FALSE", + retCode, debugstr_w(pFrom), pTo ? "-> ":"", debugstr_w(pTo)); + + lpFileOp->fAnyOperationsAborted = nFileOp.fAnyOperationsAborted; + return retCode; +} + +#define SHDSA_GetItemCount(hdsa) (*(int*)(hdsa)) + +/************************************************************************* + * SHFreeNameMappings [shell32.246] + * + * Free the mapping handle returned by SHFileoperation if FOF_WANTSMAPPINGHANDLE + * was specified. + * + * PARAMS + * hNameMapping [I] handle to the name mappings used during renaming of files + * + */ +void WINAPI SHFreeNameMappings(HANDLE hNameMapping) +{ + if (hNameMapping) + { + int i = SHDSA_GetItemCount((HDSA)hNameMapping) - 1; + + for (; i>= 0; i--) + { + LPSHNAMEMAPPINGW lp = DSA_GetItemPtr((HDSA)hNameMapping, i); + + SHFree(lp->pszOldPath); + SHFree(lp->pszNewPath); + } + DSA_Destroy((HDSA)hNameMapping); + } +} + +/************************************************************************* + * SheGetDirW [SHELL32.281] + * + */ +HRESULT WINAPI SheGetDirW(LPWSTR u, LPWSTR v) +{ FIXME("%p %p stub\n",u,v); + return 0; +} + +/************************************************************************* + * SheChangeDirW [SHELL32.274] + * + */ +HRESULT WINAPI SheChangeDirW(LPWSTR u) +{ FIXME("(%s),stub\n",debugstr_w(u)); + return 0; +} + +/************************************************************************* + * IsNetDrive [SHELL32.66] + */ +BOOL WINAPI IsNetDrive(DWORD drive) +{ + char root[4]; + strcpy(root, "A:\\"); + root[0] += (char)drive; + return (GetDriveTypeA(root) == DRIVE_REMOTE); +} + + +/************************************************************************* + * RealDriveType [SHELL32.524] + */ +INT WINAPI RealDriveType(INT drive, BOOL bQueryNet) +{ + char root[] = "A:\\"; + root[0] += (char)drive; + return GetDriveTypeA(root); +} diff --git a/reactos/lib/shell32/shlfolder.c b/reactos/lib/shell32/shlfolder.c index 6ef820e7d73..1f5841906d6 100644 --- a/reactos/lib/shell32/shlfolder.c +++ b/reactos/lib/shell32/shlfolder.c @@ -1,513 +1,513 @@ - -/* - * Shell Folder stuff - * - * Copyright 1997 Marcus Meissner - * Copyright 1998, 1999, 2002 Juergen Schmied - * - * IShellFolder2 and related interfaces - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include "config.h" -#include "wine/port.h" - -#include -#include -#include -#include - -#define COBJMACROS - -#include "winerror.h" -#include "windef.h" -#include "winbase.h" -#include "winreg.h" -#include "wingdi.h" -#include "winuser.h" - -#include "ole2.h" -#include "shlguid.h" - -#include "pidl.h" -#include "undocshell.h" -#include "shell32_main.h" -#include "shlwapi.h" -#include "wine/debug.h" -#include "shfldr.h" - -WINE_DEFAULT_DEBUG_CHANNEL (shell); - -/*************************************************************************** - * debughelper: print out the return address - * helps especially to track down unbalanced AddRef/Release - */ -#define MEM_DEBUG 0 - -#if MEM_DEBUG -#define _CALL_TRACE TRACE("called from: 0x%08x\n", *( ((UINT*)&iface)-1 )); -#else -#define _CALL_TRACE -#endif - -static const WCHAR wszDotShellClassInfo[] = {'.','S','h','e','l','l','C','l','a','s','s','I','n','f','o',0}; - -/*************************************************************************** - * SHELL32_GetCustomFolderAttribute (internal function) - * - * Gets a value from the folder's desktop.ini file, if one exists. - * - * PARAMETERS - * pidl [I] Folder containing the desktop.ini file. - * pwszHeading [I] Heading in .ini file. - * pwszAttribute [I] Attribute in .ini file. - * pwszValue [O] Buffer to store value into. - * cchValue [I] Size in characters including NULL of buffer pointed to - * by pwszValue. - * - * RETURNS - * TRUE if returned non-NULL value. - * FALSE otherwise. - */ -BOOL SHELL32_GetCustomFolderAttribute( - LPCITEMIDLIST pidl, LPCWSTR pwszHeading, LPCWSTR pwszAttribute, - LPWSTR pwszValue, DWORD cchValue) -{ -#if 0 /* Hack around not having system attribute on non-Windows file systems */ - DWORD dwAttrib = _ILGetFileAttributes(pidl, NULL, 0); -#else - DWORD dwAttrib = FILE_ATTRIBUTE_SYSTEM; -#endif - if (dwAttrib & FILE_ATTRIBUTE_SYSTEM) - { - DWORD ret; - WCHAR wszDesktopIniPath[MAX_PATH]; - static const WCHAR wszDesktopIni[] = - {'d','e','s','k','t','o','p','.','i','n','i',0}; - static const WCHAR wszDefault[] = - {0}; - if (!SHGetPathFromIDListW(pidl, wszDesktopIniPath)) - return FALSE; - PathAppendW(wszDesktopIniPath, wszDesktopIni); - ret = GetPrivateProfileStringW(pwszHeading, pwszAttribute, - wszDefault, pwszValue, cchValue, wszDesktopIniPath); - if (!ret) return FALSE; - return TRUE; - } - return FALSE; -} - - -/*************************************************************************** - * GetNextElement (internal function) - * - * gets a part of a string till the first backslash - * - * PARAMETERS - * pszNext [IN] string to get the element from - * pszOut [IN] pointer to buffer whitch receives string - * dwOut [IN] length of pszOut - * - * RETURNS - * LPSTR pointer to first, not yet parsed char - */ - -LPCWSTR GetNextElementW (LPCWSTR pszNext, LPWSTR pszOut, DWORD dwOut) -{ - LPCWSTR pszTail = pszNext; - DWORD dwCopy; - - TRACE ("(%s %p 0x%08lx)\n", debugstr_w (pszNext), pszOut, dwOut); - - *pszOut = 0x0000; - - if (!pszNext || !*pszNext) - return NULL; - - while (*pszTail && (*pszTail != (WCHAR) '\\')) - pszTail++; - - dwCopy = (const WCHAR *) pszTail - (const WCHAR *) pszNext + 1; - lstrcpynW (pszOut, pszNext, (dwOut < dwCopy) ? dwOut : dwCopy); - - if (*pszTail) - pszTail++; - else - pszTail = NULL; - - TRACE ("--(%s %s 0x%08lx %p)\n", debugstr_w (pszNext), debugstr_w (pszOut), dwOut, pszTail); - return pszTail; -} - -HRESULT SHELL32_ParseNextElement (IShellFolder2 * psf, HWND hwndOwner, LPBC pbc, - LPITEMIDLIST * pidlInOut, LPOLESTR szNext, DWORD * pEaten, DWORD * pdwAttributes) -{ - HRESULT hr = E_INVALIDARG; - LPITEMIDLIST pidlOut = NULL, - pidlTemp = NULL; - IShellFolder *psfChild; - - TRACE ("(%p, %p, %p, %s)\n", psf, pbc, pidlInOut ? *pidlInOut : NULL, debugstr_w (szNext)); - - /* get the shellfolder for the child pidl and let it analyse further */ - hr = IShellFolder_BindToObject (psf, *pidlInOut, pbc, &IID_IShellFolder, (LPVOID *) & psfChild); - - if (SUCCEEDED(hr)) { - hr = IShellFolder_ParseDisplayName (psfChild, hwndOwner, pbc, szNext, pEaten, &pidlOut, pdwAttributes); - IShellFolder_Release (psfChild); - - if (SUCCEEDED(hr)) { - pidlTemp = ILCombine (*pidlInOut, pidlOut); - - if (!pidlTemp) - hr = E_OUTOFMEMORY; - } - - if (pidlOut) - ILFree (pidlOut); - } - - ILFree (*pidlInOut); - *pidlInOut = pidlTemp; - - TRACE ("-- pidl=%p ret=0x%08lx\n", pidlInOut ? *pidlInOut : NULL, hr); - return hr; -} - -/*********************************************************************** - * SHELL32_CoCreateInitSF - * - * Creates a shell folder and initializes it with a pidl and a root folder - * via IPersistFolder3 or IPersistFolder. - * - * NOTES - * pathRoot can be NULL for Folders beeing a drive. - * In this case the absolute path is build from pidlChild (eg. C:) - */ -HRESULT SHELL32_CoCreateInitSF (LPCITEMIDLIST pidlRoot, LPCSTR pathRoot, - LPCITEMIDLIST pidlChild, REFCLSID clsid, REFIID riid, LPVOID * ppvOut) -{ - HRESULT hr; - - TRACE ("%p %s %p\n", pidlRoot, pathRoot, pidlChild); - - if (SUCCEEDED ((hr = SHCoCreateInstance (NULL, clsid, NULL, riid, ppvOut)))) { - LPITEMIDLIST pidlAbsolute = ILCombine (pidlRoot, pidlChild); - IPersistFolder *pPF; - IPersistFolder3 *ppf; - - if (SUCCEEDED (IUnknown_QueryInterface ((IUnknown *) * ppvOut, &IID_IPersistFolder3, (LPVOID *) & ppf))) { - PERSIST_FOLDER_TARGET_INFO ppfti; - char szDestPath[MAX_PATH]; - - ZeroMemory (&ppfti, sizeof (ppfti)); - - /* build path */ - if (pathRoot) { - lstrcpyA (szDestPath, pathRoot); - PathAddBackslashA(szDestPath); /* FIXME: why have drives a backslash here ? */ - } else { - szDestPath[0] = '\0'; - } - - if (pidlChild) { - LPSTR pszChild = _ILGetTextPointer(pidlChild); - - if (pszChild) - lstrcatA (szDestPath, pszChild); - else - hr = E_INVALIDARG; - } - - /* fill the PERSIST_FOLDER_TARGET_INFO */ - ppfti.dwAttributes = -1; - ppfti.csidl = -1; - MultiByteToWideChar (CP_ACP, 0, szDestPath, -1, ppfti.szTargetParsingName, MAX_PATH); - - IPersistFolder3_InitializeEx (ppf, NULL, pidlAbsolute, &ppfti); - IPersistFolder3_Release (ppf); - } - else if (SUCCEEDED ((hr = IUnknown_QueryInterface ((IUnknown *) * ppvOut, &IID_IPersistFolder, (LPVOID *) & pPF)))) { - IPersistFolder_Initialize (pPF, pidlAbsolute); - IPersistFolder_Release (pPF); - } - ILFree (pidlAbsolute); - } - TRACE ("-- (%p) ret=0x%08lx\n", *ppvOut, hr); - return hr; -} - -/*********************************************************************** - * SHELL32_BindToChild - * - * Common code for IShellFolder_BindToObject. - * Creates a shell folder by binding to a root pidl. - */ -HRESULT SHELL32_BindToChild (LPCITEMIDLIST pidlRoot, - LPCSTR pathRoot, LPCITEMIDLIST pidlComplete, REFIID riid, LPVOID * ppvOut) -{ - GUID const *clsid; - IShellFolder *pSF; - HRESULT hr; - LPITEMIDLIST pidlChild; - - if (!pidlRoot || !ppvOut) - return E_INVALIDARG; - - *ppvOut = NULL; - - pidlChild = ILCloneFirst (pidlComplete); - - if ((clsid = _ILGetGUIDPointer (pidlChild))) { - /* virtual folder */ - hr = SHELL32_CoCreateInitSF (pidlRoot, pathRoot, pidlChild, clsid, &IID_IShellFolder, (LPVOID *) & pSF); - } else { - /* file system folder */ - CLSID clsidFolder = CLSID_ShellFSFolder; - static const WCHAR wszCLSID[] = {'C','L','S','I','D',0}; - WCHAR wszCLSIDValue[CHARS_IN_GUID]; - LPITEMIDLIST pidlAbsolute = ILCombine (pidlRoot, pidlChild); - /* see if folder CLSID should be overridden by desktop.ini file */ - if (SHELL32_GetCustomFolderAttribute (pidlAbsolute, - wszDotShellClassInfo, wszCLSID, wszCLSIDValue, CHARS_IN_GUID)) - CLSIDFromString (wszCLSIDValue, &clsidFolder); - ILFree (pidlAbsolute); - hr = SHELL32_CoCreateInitSF (pidlRoot, pathRoot, pidlChild, - &clsidFolder, &IID_IShellFolder, (LPVOID *)&pSF); - } - ILFree (pidlChild); - - if (SUCCEEDED (hr)) { - if (_ILIsPidlSimple (pidlComplete)) { - /* no sub folders */ - hr = IShellFolder_QueryInterface (pSF, riid, ppvOut); - } else { - /* go deeper */ - hr = IShellFolder_BindToObject (pSF, ILGetNext (pidlComplete), NULL, riid, ppvOut); - } - IShellFolder_Release (pSF); - } - - TRACE ("-- returning (%p) %08lx\n", *ppvOut, hr); - - return hr; -} - -/*********************************************************************** - * SHELL32_GetDisplayNameOfChild - * - * Retrives the display name of a child object of a shellfolder. - * - * For a pidl eg. [subpidl1][subpidl2][subpidl3]: - * - it binds to the child shellfolder [subpidl1] - * - asks it for the displayname of [subpidl2][subpidl3] - * - * Is possible the pidl is a simple pidl. In this case it asks the - * subfolder for the displayname of a empty pidl. The subfolder - * returns the own displayname eg. "::{guid}". This is used for - * virtual folders with the registry key WantsFORPARSING set. - */ -HRESULT SHELL32_GetDisplayNameOfChild (IShellFolder2 * psf, - LPCITEMIDLIST pidl, DWORD dwFlags, LPSTR szOut, DWORD dwOutLen) -{ - LPITEMIDLIST pidlFirst; - HRESULT hr = E_INVALIDARG; - - TRACE ("(%p)->(pidl=%p 0x%08lx %p 0x%08lx)\n", psf, pidl, dwFlags, szOut, dwOutLen); - pdump (pidl); - - pidlFirst = ILCloneFirst (pidl); - if (pidlFirst) { - IShellFolder2 *psfChild; - - hr = IShellFolder_BindToObject (psf, pidlFirst, NULL, &IID_IShellFolder, (LPVOID *) & psfChild); - if (SUCCEEDED (hr)) { - STRRET strTemp; - LPITEMIDLIST pidlNext = ILGetNext (pidl); - - hr = IShellFolder_GetDisplayNameOf (psfChild, pidlNext, dwFlags, &strTemp); - if (SUCCEEDED (hr)) { - hr = StrRetToStrNA (szOut, dwOutLen, &strTemp, pidlNext); - } - IShellFolder_Release (psfChild); - } - ILFree (pidlFirst); - } else - hr = E_OUTOFMEMORY; - - TRACE ("-- ret=0x%08lx %s\n", hr, szOut); - - return hr; -} - -/*********************************************************************** - * SHELL32_GetItemAttributes - * - * NOTES - * observerd values: - * folder: 0xE0000177 FILESYSTEM | HASSUBFOLDER | FOLDER - * file: 0x40000177 FILESYSTEM - * drive: 0xf0000144 FILESYSTEM | HASSUBFOLDER | FOLDER | FILESYSANCESTOR - * mycomputer: 0xb0000154 HASSUBFOLDER | FOLDER | FILESYSANCESTOR - * (seems to be default for shell extensions if no registry entry exists) - * - * win2k: - * folder: 0xF0400177 FILESYSTEM | HASSUBFOLDER | FOLDER | FILESYSANCESTOR | CANMONIKER - * file: 0x40400177 FILESYSTEM | CANMONIKER - * drive 0xF0400154 FILESYSTEM | HASSUBFOLDER | FOLDER | FILESYSANCESTOR | CANMONIKER | CANRENAME (LABEL) - * - * This function does not set flags!! It only resets flags when necessary. - */ -HRESULT SHELL32_GetItemAttributes (IShellFolder * psf, LPCITEMIDLIST pidl, LPDWORD pdwAttributes) -{ - GUID const *clsid; - DWORD dwAttributes; - DWORD dwSupportedAttr=SFGAO_CANCOPY | /*0x00000001 */ - SFGAO_CANMOVE | /*0x00000002 */ - SFGAO_CANLINK | /*0x00000004 */ - SFGAO_CANRENAME | /*0x00000010 */ - SFGAO_CANDELETE | /*0x00000020 */ - SFGAO_HASPROPSHEET | /*0x00000040 */ - SFGAO_DROPTARGET | /*0x00000100 */ - SFGAO_LINK | /*0x00010000 */ - SFGAO_READONLY | /*0x00040000 */ - SFGAO_HIDDEN | /*0x00080000 */ - SFGAO_FILESYSANCESTOR | /*0x10000000 */ - SFGAO_FOLDER | /*0x20000000 */ - SFGAO_FILESYSTEM | /*0x40000000 */ - SFGAO_HASSUBFOLDER; /*0x80000000 */ - - TRACE ("0x%08lx\n", *pdwAttributes); - - if (*pdwAttributes & ~dwSupportedAttr) - { - WARN ("attributes 0x%08lx not implemented\n", (*pdwAttributes & ~dwSupportedAttr)); - *pdwAttributes &= dwSupportedAttr; - } - - if (_ILIsDrive (pidl)) { - *pdwAttributes &= SFGAO_HASSUBFOLDER|SFGAO_FILESYSTEM|SFGAO_FOLDER|SFGAO_FILESYSANCESTOR|SFGAO_DROPTARGET|SFGAO_HASPROPSHEET|SFGAO_CANLINK; - } else if ((clsid = _ILGetGUIDPointer (pidl))) { - if (HCR_GetFolderAttributes (clsid, &dwAttributes)) { - *pdwAttributes &= dwAttributes; - } else { - *pdwAttributes &= SFGAO_HASSUBFOLDER|SFGAO_FOLDER|SFGAO_FILESYSANCESTOR|SFGAO_DROPTARGET|SFGAO_HASPROPSHEET|SFGAO_CANRENAME|SFGAO_CANLINK; - } - } else if (_ILGetDataPointer (pidl)) { - dwAttributes = _ILGetFileAttributes (pidl, NULL, 0); - *pdwAttributes &= ~SFGAO_FILESYSANCESTOR; - - if ((SFGAO_FOLDER & *pdwAttributes) && !(dwAttributes & FILE_ATTRIBUTE_DIRECTORY)) - *pdwAttributes &= ~(SFGAO_FOLDER | SFGAO_HASSUBFOLDER); - - if ((SFGAO_HIDDEN & *pdwAttributes) && !(dwAttributes & FILE_ATTRIBUTE_HIDDEN)) - *pdwAttributes &= ~SFGAO_HIDDEN; - - if ((SFGAO_READONLY & *pdwAttributes) && !(dwAttributes & FILE_ATTRIBUTE_READONLY)) - *pdwAttributes &= ~SFGAO_READONLY; - - if (SFGAO_LINK & *pdwAttributes) { - char ext[MAX_PATH]; - - if (!_ILGetExtension(pidl, ext, MAX_PATH) || strcasecmp(ext, "lnk")) - *pdwAttributes &= ~SFGAO_LINK; - } - } else { - *pdwAttributes &= SFGAO_HASSUBFOLDER|SFGAO_FOLDER|SFGAO_FILESYSANCESTOR|SFGAO_DROPTARGET|SFGAO_HASPROPSHEET|SFGAO_CANRENAME|SFGAO_CANLINK; - } - TRACE ("-- 0x%08lx\n", *pdwAttributes); - return S_OK; -} - -/*********************************************************************** - * SHELL32_CompareIDs - */ -HRESULT SHELL32_CompareIDs (IShellFolder * iface, LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) -{ - int type1, - type2; - char szTemp1[MAX_PATH]; - char szTemp2[MAX_PATH]; - HRESULT nReturn; - LPITEMIDLIST firstpidl, - nextpidl1, - nextpidl2; - IShellFolder *psf; - - /* test for empty pidls */ - BOOL isEmpty1 = _ILIsDesktop (pidl1); - BOOL isEmpty2 = _ILIsDesktop (pidl2); - - if (isEmpty1 && isEmpty2) - return MAKE_HRESULT( SEVERITY_SUCCESS, 0, 0 ); - if (isEmpty1) - return MAKE_HRESULT( SEVERITY_SUCCESS, 0, (WORD)-1 ); - if (isEmpty2) - return MAKE_HRESULT( SEVERITY_SUCCESS, 0, 1 ); - - /* test for different types. Sort order is the PT_* constant */ - type1 = _ILGetDataPointer (pidl1)->type; - type2 = _ILGetDataPointer (pidl2)->type; - if (type1 < type2) - return MAKE_HRESULT( SEVERITY_SUCCESS, 0, (WORD)-1 ); - else if (type1 > type2) - return MAKE_HRESULT( SEVERITY_SUCCESS, 0, 1 ); - - /* test for name of pidl */ - _ILSimpleGetText (pidl1, szTemp1, MAX_PATH); - _ILSimpleGetText (pidl2, szTemp2, MAX_PATH); - nReturn = strcasecmp (szTemp1, szTemp2); - if (nReturn < 0) - return MAKE_HRESULT( SEVERITY_SUCCESS, 0, (WORD)-1 ); - else if (nReturn > 0) - return MAKE_HRESULT( SEVERITY_SUCCESS, 0, 1 ); - - /* test of complex pidls */ - firstpidl = ILCloneFirst (pidl1); - nextpidl1 = ILGetNext (pidl1); - nextpidl2 = ILGetNext (pidl2); - - /* optimizing: test special cases and bind not deeper */ - /* the deeper shellfolder would do the same */ - isEmpty1 = _ILIsDesktop (nextpidl1); - isEmpty2 = _ILIsDesktop (nextpidl2); - - if (isEmpty1 && isEmpty2) { - return MAKE_HRESULT( SEVERITY_SUCCESS, 0, 0 ); - } else if (isEmpty1) { - return MAKE_HRESULT( SEVERITY_SUCCESS, 0, (WORD)-1 ); - } else if (isEmpty2) { - return MAKE_HRESULT( SEVERITY_SUCCESS, 0, 1 ); - /* optimizing end */ - } else if (SUCCEEDED (IShellFolder_BindToObject (iface, firstpidl, NULL, &IID_IShellFolder, (LPVOID *) & psf))) { - nReturn = IShellFolder_CompareIDs (psf, lParam, nextpidl1, nextpidl2); - IShellFolder_Release (psf); - } - ILFree (firstpidl); - return nReturn; -} - -/*********************************************************************** - * SHCreateLinks - * - * Undocumented. - */ -HRESULT WINAPI SHCreateLinks( HWND hWnd, LPCSTR lpszDir, LPDATAOBJECT lpDataObject, - UINT uFlags, LPITEMIDLIST *lppidlLinks) -{ - FIXME("%p %s %p %08x %p\n",hWnd,lpszDir,lpDataObject,uFlags,lppidlLinks); - return E_NOTIMPL; -} + +/* + * Shell Folder stuff + * + * Copyright 1997 Marcus Meissner + * Copyright 1998, 1999, 2002 Juergen Schmied + * + * IShellFolder2 and related interfaces + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" +#include "wine/port.h" + +#include +#include +#include +#include + +#define COBJMACROS + +#include "winerror.h" +#include "windef.h" +#include "winbase.h" +#include "winreg.h" +#include "wingdi.h" +#include "winuser.h" + +#include "ole2.h" +#include "shlguid.h" + +#include "pidl.h" +#include "undocshell.h" +#include "shell32_main.h" +#include "shlwapi.h" +#include "wine/debug.h" +#include "shfldr.h" + +WINE_DEFAULT_DEBUG_CHANNEL (shell); + +/*************************************************************************** + * debughelper: print out the return address + * helps especially to track down unbalanced AddRef/Release + */ +#define MEM_DEBUG 0 + +#if MEM_DEBUG +#define _CALL_TRACE TRACE("called from: 0x%08x\n", *( ((UINT*)&iface)-1 )); +#else +#define _CALL_TRACE +#endif + +static const WCHAR wszDotShellClassInfo[] = {'.','S','h','e','l','l','C','l','a','s','s','I','n','f','o',0}; + +/*************************************************************************** + * SHELL32_GetCustomFolderAttribute (internal function) + * + * Gets a value from the folder's desktop.ini file, if one exists. + * + * PARAMETERS + * pidl [I] Folder containing the desktop.ini file. + * pwszHeading [I] Heading in .ini file. + * pwszAttribute [I] Attribute in .ini file. + * pwszValue [O] Buffer to store value into. + * cchValue [I] Size in characters including NULL of buffer pointed to + * by pwszValue. + * + * RETURNS + * TRUE if returned non-NULL value. + * FALSE otherwise. + */ +BOOL SHELL32_GetCustomFolderAttribute( + LPCITEMIDLIST pidl, LPCWSTR pwszHeading, LPCWSTR pwszAttribute, + LPWSTR pwszValue, DWORD cchValue) +{ +#if 0 /* Hack around not having system attribute on non-Windows file systems */ + DWORD dwAttrib = _ILGetFileAttributes(pidl, NULL, 0); +#else + DWORD dwAttrib = FILE_ATTRIBUTE_SYSTEM; +#endif + if (dwAttrib & FILE_ATTRIBUTE_SYSTEM) + { + DWORD ret; + WCHAR wszDesktopIniPath[MAX_PATH]; + static const WCHAR wszDesktopIni[] = + {'d','e','s','k','t','o','p','.','i','n','i',0}; + static const WCHAR wszDefault[] = + {0}; + if (!SHGetPathFromIDListW(pidl, wszDesktopIniPath)) + return FALSE; + PathAppendW(wszDesktopIniPath, wszDesktopIni); + ret = GetPrivateProfileStringW(pwszHeading, pwszAttribute, + wszDefault, pwszValue, cchValue, wszDesktopIniPath); + if (!ret) return FALSE; + return TRUE; + } + return FALSE; +} + + +/*************************************************************************** + * GetNextElement (internal function) + * + * gets a part of a string till the first backslash + * + * PARAMETERS + * pszNext [IN] string to get the element from + * pszOut [IN] pointer to buffer whitch receives string + * dwOut [IN] length of pszOut + * + * RETURNS + * LPSTR pointer to first, not yet parsed char + */ + +LPCWSTR GetNextElementW (LPCWSTR pszNext, LPWSTR pszOut, DWORD dwOut) +{ + LPCWSTR pszTail = pszNext; + DWORD dwCopy; + + TRACE ("(%s %p 0x%08lx)\n", debugstr_w (pszNext), pszOut, dwOut); + + *pszOut = 0x0000; + + if (!pszNext || !*pszNext) + return NULL; + + while (*pszTail && (*pszTail != (WCHAR) '\\')) + pszTail++; + + dwCopy = (const WCHAR *) pszTail - (const WCHAR *) pszNext + 1; + lstrcpynW (pszOut, pszNext, (dwOut < dwCopy) ? dwOut : dwCopy); + + if (*pszTail) + pszTail++; + else + pszTail = NULL; + + TRACE ("--(%s %s 0x%08lx %p)\n", debugstr_w (pszNext), debugstr_w (pszOut), dwOut, pszTail); + return pszTail; +} + +HRESULT SHELL32_ParseNextElement (IShellFolder2 * psf, HWND hwndOwner, LPBC pbc, + LPITEMIDLIST * pidlInOut, LPOLESTR szNext, DWORD * pEaten, DWORD * pdwAttributes) +{ + HRESULT hr = E_INVALIDARG; + LPITEMIDLIST pidlOut = NULL, + pidlTemp = NULL; + IShellFolder *psfChild; + + TRACE ("(%p, %p, %p, %s)\n", psf, pbc, pidlInOut ? *pidlInOut : NULL, debugstr_w (szNext)); + + /* get the shellfolder for the child pidl and let it analyse further */ + hr = IShellFolder_BindToObject (psf, *pidlInOut, pbc, &IID_IShellFolder, (LPVOID *) & psfChild); + + if (SUCCEEDED(hr)) { + hr = IShellFolder_ParseDisplayName (psfChild, hwndOwner, pbc, szNext, pEaten, &pidlOut, pdwAttributes); + IShellFolder_Release (psfChild); + + if (SUCCEEDED(hr)) { + pidlTemp = ILCombine (*pidlInOut, pidlOut); + + if (!pidlTemp) + hr = E_OUTOFMEMORY; + } + + if (pidlOut) + ILFree (pidlOut); + } + + ILFree (*pidlInOut); + *pidlInOut = pidlTemp; + + TRACE ("-- pidl=%p ret=0x%08lx\n", pidlInOut ? *pidlInOut : NULL, hr); + return hr; +} + +/*********************************************************************** + * SHELL32_CoCreateInitSF + * + * Creates a shell folder and initializes it with a pidl and a root folder + * via IPersistFolder3 or IPersistFolder. + * + * NOTES + * pathRoot can be NULL for Folders beeing a drive. + * In this case the absolute path is build from pidlChild (eg. C:) + */ +HRESULT SHELL32_CoCreateInitSF (LPCITEMIDLIST pidlRoot, LPCSTR pathRoot, + LPCITEMIDLIST pidlChild, REFCLSID clsid, REFIID riid, LPVOID * ppvOut) +{ + HRESULT hr; + + TRACE ("%p %s %p\n", pidlRoot, pathRoot, pidlChild); + + if (SUCCEEDED ((hr = SHCoCreateInstance (NULL, clsid, NULL, riid, ppvOut)))) { + LPITEMIDLIST pidlAbsolute = ILCombine (pidlRoot, pidlChild); + IPersistFolder *pPF; + IPersistFolder3 *ppf; + + if (SUCCEEDED (IUnknown_QueryInterface ((IUnknown *) * ppvOut, &IID_IPersistFolder3, (LPVOID *) & ppf))) { + PERSIST_FOLDER_TARGET_INFO ppfti; + char szDestPath[MAX_PATH]; + + ZeroMemory (&ppfti, sizeof (ppfti)); + + /* build path */ + if (pathRoot) { + lstrcpyA (szDestPath, pathRoot); + PathAddBackslashA(szDestPath); /* FIXME: why have drives a backslash here ? */ + } else { + szDestPath[0] = '\0'; + } + + if (pidlChild) { + LPSTR pszChild = _ILGetTextPointer(pidlChild); + + if (pszChild) + lstrcatA (szDestPath, pszChild); + else + hr = E_INVALIDARG; + } + + /* fill the PERSIST_FOLDER_TARGET_INFO */ + ppfti.dwAttributes = -1; + ppfti.csidl = -1; + MultiByteToWideChar (CP_ACP, 0, szDestPath, -1, ppfti.szTargetParsingName, MAX_PATH); + + IPersistFolder3_InitializeEx (ppf, NULL, pidlAbsolute, &ppfti); + IPersistFolder3_Release (ppf); + } + else if (SUCCEEDED ((hr = IUnknown_QueryInterface ((IUnknown *) * ppvOut, &IID_IPersistFolder, (LPVOID *) & pPF)))) { + IPersistFolder_Initialize (pPF, pidlAbsolute); + IPersistFolder_Release (pPF); + } + ILFree (pidlAbsolute); + } + TRACE ("-- (%p) ret=0x%08lx\n", *ppvOut, hr); + return hr; +} + +/*********************************************************************** + * SHELL32_BindToChild + * + * Common code for IShellFolder_BindToObject. + * Creates a shell folder by binding to a root pidl. + */ +HRESULT SHELL32_BindToChild (LPCITEMIDLIST pidlRoot, + LPCSTR pathRoot, LPCITEMIDLIST pidlComplete, REFIID riid, LPVOID * ppvOut) +{ + GUID const *clsid; + IShellFolder *pSF; + HRESULT hr; + LPITEMIDLIST pidlChild; + + if (!pidlRoot || !ppvOut) + return E_INVALIDARG; + + *ppvOut = NULL; + + pidlChild = ILCloneFirst (pidlComplete); + + if ((clsid = _ILGetGUIDPointer (pidlChild))) { + /* virtual folder */ + hr = SHELL32_CoCreateInitSF (pidlRoot, pathRoot, pidlChild, clsid, &IID_IShellFolder, (LPVOID *) & pSF); + } else { + /* file system folder */ + CLSID clsidFolder = CLSID_ShellFSFolder; + static const WCHAR wszCLSID[] = {'C','L','S','I','D',0}; + WCHAR wszCLSIDValue[CHARS_IN_GUID]; + LPITEMIDLIST pidlAbsolute = ILCombine (pidlRoot, pidlChild); + /* see if folder CLSID should be overridden by desktop.ini file */ + if (SHELL32_GetCustomFolderAttribute (pidlAbsolute, + wszDotShellClassInfo, wszCLSID, wszCLSIDValue, CHARS_IN_GUID)) + CLSIDFromString (wszCLSIDValue, &clsidFolder); + ILFree (pidlAbsolute); + hr = SHELL32_CoCreateInitSF (pidlRoot, pathRoot, pidlChild, + &clsidFolder, &IID_IShellFolder, (LPVOID *)&pSF); + } + ILFree (pidlChild); + + if (SUCCEEDED (hr)) { + if (_ILIsPidlSimple (pidlComplete)) { + /* no sub folders */ + hr = IShellFolder_QueryInterface (pSF, riid, ppvOut); + } else { + /* go deeper */ + hr = IShellFolder_BindToObject (pSF, ILGetNext (pidlComplete), NULL, riid, ppvOut); + } + IShellFolder_Release (pSF); + } + + TRACE ("-- returning (%p) %08lx\n", *ppvOut, hr); + + return hr; +} + +/*********************************************************************** + * SHELL32_GetDisplayNameOfChild + * + * Retrives the display name of a child object of a shellfolder. + * + * For a pidl eg. [subpidl1][subpidl2][subpidl3]: + * - it binds to the child shellfolder [subpidl1] + * - asks it for the displayname of [subpidl2][subpidl3] + * + * Is possible the pidl is a simple pidl. In this case it asks the + * subfolder for the displayname of a empty pidl. The subfolder + * returns the own displayname eg. "::{guid}". This is used for + * virtual folders with the registry key WantsFORPARSING set. + */ +HRESULT SHELL32_GetDisplayNameOfChild (IShellFolder2 * psf, + LPCITEMIDLIST pidl, DWORD dwFlags, LPSTR szOut, DWORD dwOutLen) +{ + LPITEMIDLIST pidlFirst; + HRESULT hr = E_INVALIDARG; + + TRACE ("(%p)->(pidl=%p 0x%08lx %p 0x%08lx)\n", psf, pidl, dwFlags, szOut, dwOutLen); + pdump (pidl); + + pidlFirst = ILCloneFirst (pidl); + if (pidlFirst) { + IShellFolder2 *psfChild; + + hr = IShellFolder_BindToObject (psf, pidlFirst, NULL, &IID_IShellFolder, (LPVOID *) & psfChild); + if (SUCCEEDED (hr)) { + STRRET strTemp; + LPITEMIDLIST pidlNext = ILGetNext (pidl); + + hr = IShellFolder_GetDisplayNameOf (psfChild, pidlNext, dwFlags, &strTemp); + if (SUCCEEDED (hr)) { + hr = StrRetToStrNA (szOut, dwOutLen, &strTemp, pidlNext); + } + IShellFolder_Release (psfChild); + } + ILFree (pidlFirst); + } else + hr = E_OUTOFMEMORY; + + TRACE ("-- ret=0x%08lx %s\n", hr, szOut); + + return hr; +} + +/*********************************************************************** + * SHELL32_GetItemAttributes + * + * NOTES + * observerd values: + * folder: 0xE0000177 FILESYSTEM | HASSUBFOLDER | FOLDER + * file: 0x40000177 FILESYSTEM + * drive: 0xf0000144 FILESYSTEM | HASSUBFOLDER | FOLDER | FILESYSANCESTOR + * mycomputer: 0xb0000154 HASSUBFOLDER | FOLDER | FILESYSANCESTOR + * (seems to be default for shell extensions if no registry entry exists) + * + * win2k: + * folder: 0xF0400177 FILESYSTEM | HASSUBFOLDER | FOLDER | FILESYSANCESTOR | CANMONIKER + * file: 0x40400177 FILESYSTEM | CANMONIKER + * drive 0xF0400154 FILESYSTEM | HASSUBFOLDER | FOLDER | FILESYSANCESTOR | CANMONIKER | CANRENAME (LABEL) + * + * This function does not set flags!! It only resets flags when necessary. + */ +HRESULT SHELL32_GetItemAttributes (IShellFolder * psf, LPCITEMIDLIST pidl, LPDWORD pdwAttributes) +{ + GUID const *clsid; + DWORD dwAttributes; + DWORD dwSupportedAttr=SFGAO_CANCOPY | /*0x00000001 */ + SFGAO_CANMOVE | /*0x00000002 */ + SFGAO_CANLINK | /*0x00000004 */ + SFGAO_CANRENAME | /*0x00000010 */ + SFGAO_CANDELETE | /*0x00000020 */ + SFGAO_HASPROPSHEET | /*0x00000040 */ + SFGAO_DROPTARGET | /*0x00000100 */ + SFGAO_LINK | /*0x00010000 */ + SFGAO_READONLY | /*0x00040000 */ + SFGAO_HIDDEN | /*0x00080000 */ + SFGAO_FILESYSANCESTOR | /*0x10000000 */ + SFGAO_FOLDER | /*0x20000000 */ + SFGAO_FILESYSTEM | /*0x40000000 */ + SFGAO_HASSUBFOLDER; /*0x80000000 */ + + TRACE ("0x%08lx\n", *pdwAttributes); + + if (*pdwAttributes & ~dwSupportedAttr) + { + WARN ("attributes 0x%08lx not implemented\n", (*pdwAttributes & ~dwSupportedAttr)); + *pdwAttributes &= dwSupportedAttr; + } + + if (_ILIsDrive (pidl)) { + *pdwAttributes &= SFGAO_HASSUBFOLDER|SFGAO_FILESYSTEM|SFGAO_FOLDER|SFGAO_FILESYSANCESTOR|SFGAO_DROPTARGET|SFGAO_HASPROPSHEET|SFGAO_CANLINK; + } else if ((clsid = _ILGetGUIDPointer (pidl))) { + if (HCR_GetFolderAttributes (clsid, &dwAttributes)) { + *pdwAttributes &= dwAttributes; + } else { + *pdwAttributes &= SFGAO_HASSUBFOLDER|SFGAO_FOLDER|SFGAO_FILESYSANCESTOR|SFGAO_DROPTARGET|SFGAO_HASPROPSHEET|SFGAO_CANRENAME|SFGAO_CANLINK; + } + } else if (_ILGetDataPointer (pidl)) { + dwAttributes = _ILGetFileAttributes (pidl, NULL, 0); + *pdwAttributes &= ~SFGAO_FILESYSANCESTOR; + + if ((SFGAO_FOLDER & *pdwAttributes) && !(dwAttributes & FILE_ATTRIBUTE_DIRECTORY)) + *pdwAttributes &= ~(SFGAO_FOLDER | SFGAO_HASSUBFOLDER); + + if ((SFGAO_HIDDEN & *pdwAttributes) && !(dwAttributes & FILE_ATTRIBUTE_HIDDEN)) + *pdwAttributes &= ~SFGAO_HIDDEN; + + if ((SFGAO_READONLY & *pdwAttributes) && !(dwAttributes & FILE_ATTRIBUTE_READONLY)) + *pdwAttributes &= ~SFGAO_READONLY; + + if (SFGAO_LINK & *pdwAttributes) { + char ext[MAX_PATH]; + + if (!_ILGetExtension(pidl, ext, MAX_PATH) || strcasecmp(ext, "lnk")) + *pdwAttributes &= ~SFGAO_LINK; + } + } else { + *pdwAttributes &= SFGAO_HASSUBFOLDER|SFGAO_FOLDER|SFGAO_FILESYSANCESTOR|SFGAO_DROPTARGET|SFGAO_HASPROPSHEET|SFGAO_CANRENAME|SFGAO_CANLINK; + } + TRACE ("-- 0x%08lx\n", *pdwAttributes); + return S_OK; +} + +/*********************************************************************** + * SHELL32_CompareIDs + */ +HRESULT SHELL32_CompareIDs (IShellFolder * iface, LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) +{ + int type1, + type2; + char szTemp1[MAX_PATH]; + char szTemp2[MAX_PATH]; + HRESULT nReturn; + LPITEMIDLIST firstpidl, + nextpidl1, + nextpidl2; + IShellFolder *psf; + + /* test for empty pidls */ + BOOL isEmpty1 = _ILIsDesktop (pidl1); + BOOL isEmpty2 = _ILIsDesktop (pidl2); + + if (isEmpty1 && isEmpty2) + return MAKE_HRESULT( SEVERITY_SUCCESS, 0, 0 ); + if (isEmpty1) + return MAKE_HRESULT( SEVERITY_SUCCESS, 0, (WORD)-1 ); + if (isEmpty2) + return MAKE_HRESULT( SEVERITY_SUCCESS, 0, 1 ); + + /* test for different types. Sort order is the PT_* constant */ + type1 = _ILGetDataPointer (pidl1)->type; + type2 = _ILGetDataPointer (pidl2)->type; + if (type1 < type2) + return MAKE_HRESULT( SEVERITY_SUCCESS, 0, (WORD)-1 ); + else if (type1 > type2) + return MAKE_HRESULT( SEVERITY_SUCCESS, 0, 1 ); + + /* test for name of pidl */ + _ILSimpleGetText (pidl1, szTemp1, MAX_PATH); + _ILSimpleGetText (pidl2, szTemp2, MAX_PATH); + nReturn = strcasecmp (szTemp1, szTemp2); + if (nReturn < 0) + return MAKE_HRESULT( SEVERITY_SUCCESS, 0, (WORD)-1 ); + else if (nReturn > 0) + return MAKE_HRESULT( SEVERITY_SUCCESS, 0, 1 ); + + /* test of complex pidls */ + firstpidl = ILCloneFirst (pidl1); + nextpidl1 = ILGetNext (pidl1); + nextpidl2 = ILGetNext (pidl2); + + /* optimizing: test special cases and bind not deeper */ + /* the deeper shellfolder would do the same */ + isEmpty1 = _ILIsDesktop (nextpidl1); + isEmpty2 = _ILIsDesktop (nextpidl2); + + if (isEmpty1 && isEmpty2) { + return MAKE_HRESULT( SEVERITY_SUCCESS, 0, 0 ); + } else if (isEmpty1) { + return MAKE_HRESULT( SEVERITY_SUCCESS, 0, (WORD)-1 ); + } else if (isEmpty2) { + return MAKE_HRESULT( SEVERITY_SUCCESS, 0, 1 ); + /* optimizing end */ + } else if (SUCCEEDED (IShellFolder_BindToObject (iface, firstpidl, NULL, &IID_IShellFolder, (LPVOID *) & psf))) { + nReturn = IShellFolder_CompareIDs (psf, lParam, nextpidl1, nextpidl2); + IShellFolder_Release (psf); + } + ILFree (firstpidl); + return nReturn; +} + +/*********************************************************************** + * SHCreateLinks + * + * Undocumented. + */ +HRESULT WINAPI SHCreateLinks( HWND hWnd, LPCSTR lpszDir, LPDATAOBJECT lpDataObject, + UINT uFlags, LPITEMIDLIST *lppidlLinks) +{ + FIXME("%p %s %p %08x %p\n",hWnd,lpszDir,lpDataObject,uFlags,lppidlLinks); + return E_NOTIMPL; +} diff --git a/reactos/lib/shell32/shlfsbind.c b/reactos/lib/shell32/shlfsbind.c index 4497509cab4..14e1f3a811d 100644 --- a/reactos/lib/shell32/shlfsbind.c +++ b/reactos/lib/shell32/shlfsbind.c @@ -1,222 +1,222 @@ -/* - * File System Bind Data object to use as parameter for the bind context to - * IShellFolder_ParseDisplayName - * - * Copyright 2003 Rolf Kalbermatter - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ -#include "config.h" -#include "wine/port.h" - -#include - -#define COBJMACROS - -#include "windef.h" -#include "winbase.h" -#include "winreg.h" -#include "winuser.h" -#include "shlobj.h" -#include "shell32_main.h" - -#include "wine/debug.h" - -WINE_DEFAULT_DEBUG_CHANNEL(pidl); - -/*********************************************************************** - * IFileSystemBindData implementation - */ -typedef struct -{ - IFileSystemBindDataVtbl *lpVtbl; - DWORD ref; - WIN32_FIND_DATAW findFile; -} IFileSystemBindDataImpl; - -static HRESULT WINAPI IFileSystemBindData_fnQueryInterface(IFileSystemBindData *iface, REFIID riid, LPVOID* ppvObj); -static ULONG WINAPI IFileSystemBindData_fnAddRef(IFileSystemBindData *iface); -static ULONG WINAPI IFileSystemBindData_fnRelease(IFileSystemBindData *iface); -static HRESULT WINAPI IFileSystemBindData_fnGetFindData(IFileSystemBindData *iface, WIN32_FIND_DATAW *pfd); -static HRESULT WINAPI IFileSystemBindData_fnSetFindData(IFileSystemBindData *iface, const WIN32_FIND_DATAW *pfd); - -static struct IFileSystemBindDataVtbl sbvt = -{ - IFileSystemBindData_fnQueryInterface, - IFileSystemBindData_fnAddRef, - IFileSystemBindData_fnRelease, - IFileSystemBindData_fnSetFindData, - IFileSystemBindData_fnGetFindData, -}; - -static const WCHAR wFileSystemBindData[] = {'F','i','l','e',' ','S','y','s','t','e','m',' ','B','i','n','d','D','a','t','a',0}; - -HRESULT WINAPI IFileSystemBindData_Constructor(const WIN32_FIND_DATAW *pfd, LPBC *ppV) -{ - IFileSystemBindDataImpl *sb; - HRESULT ret = E_OUTOFMEMORY; - - TRACE("%p, %p\n", pfd, ppV); - - if (!ppV) - return E_INVALIDARG; - - *ppV = NULL; - - sb = (IFileSystemBindDataImpl*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IFileSystemBindDataImpl)); - if (!sb) - return ret; - - sb->lpVtbl = &sbvt; - sb->ref = 1; - IFileSystemBindData_fnSetFindData((IFileSystemBindData*)sb, pfd); - - ret = CreateBindCtx(0, ppV); - if (SUCCEEDED(ret)) - { - BIND_OPTS bindOpts; - bindOpts.cbStruct = sizeof(BIND_OPTS); - bindOpts.grfFlags = 0; - bindOpts.grfMode = STGM_CREATE; - bindOpts.dwTickCountDeadline = 0; - IBindCtx_SetBindOptions(*ppV, &bindOpts); - IBindCtx_RegisterObjectParam(*ppV, (LPOLESTR)wFileSystemBindData, (LPUNKNOWN)sb); - - IFileSystemBindData_Release((IFileSystemBindData*)sb); - } - else - HeapFree(GetProcessHeap(), 0, sb); - return ret; -} - -HRESULT WINAPI FileSystemBindData_GetFindData(LPBC pbc, WIN32_FIND_DATAW *pfd) -{ - LPUNKNOWN pUnk; - IFileSystemBindData *pfsbd = NULL; - HRESULT ret; - - TRACE("%p, %p\n", pbc, pfd); - - if (!pfd) - return E_INVALIDARG; - - ret = IBindCtx_GetObjectParam(pbc, (LPOLESTR)wFileSystemBindData, &pUnk); - if (SUCCEEDED(ret)) - { - ret = IUnknown_QueryInterface(pUnk, &IID_IFileSystemBindData, (LPVOID *)&pfsbd); - if (SUCCEEDED(ret)) - { - ret = IFileSystemBindData_GetFindData(pfsbd, pfd); - IFileSystemBindData_Release(pfsbd); - } - IUnknown_Release(pUnk); - } - return ret; -} - -HRESULT WINAPI FileSystemBindData_SetFindData(LPBC pbc, const WIN32_FIND_DATAW *pfd) -{ - LPUNKNOWN pUnk; - IFileSystemBindData *pfsbd = NULL; - HRESULT ret; - - TRACE("%p, %p\n", pbc, pfd); - - ret = IBindCtx_GetObjectParam(pbc, (LPOLESTR)wFileSystemBindData, &pUnk); - if (SUCCEEDED(ret)) - { - ret = IUnknown_QueryInterface(pUnk, &IID_IFileSystemBindData, (LPVOID *)&pfsbd); - if (SUCCEEDED(ret)) - { - ret = IFileSystemBindData_SetFindData(pfsbd, pfd); - IFileSystemBindData_Release(pfsbd); - } - IUnknown_Release(pUnk); - } - return ret;} - - - -static HRESULT WINAPI IFileSystemBindData_fnQueryInterface(IFileSystemBindData *iface, REFIID riid, LPVOID *ppV) -{ - IFileSystemBindDataImpl *This = (IFileSystemBindDataImpl *)iface; - TRACE("(%p)->(\n\tIID:\t%s, %p)\n", This, debugstr_guid(riid), ppV); - - *ppV = NULL; - - if (IsEqualIID(riid, &IID_IUnknown)) - { - *ppV = This; - } - else if (IsEqualIID(riid, &IID_IFileSystemBindData)) - { - *ppV = (IFileSystemBindData*)This; - } - - if (*ppV) - { - IUnknown_AddRef((IUnknown*)(*ppV)); - TRACE("-- Interface: (%p)->(%p)\n", ppV, *ppV); - return S_OK; - } - TRACE("-- Interface: E_NOINTERFACE\n"); - return E_NOINTERFACE; -} - -static ULONG WINAPI IFileSystemBindData_fnAddRef(IFileSystemBindData *iface) -{ - IFileSystemBindDataImpl *This = (IFileSystemBindDataImpl *)iface; - TRACE("(%p)\n", This); - return InterlockedIncrement(&This->ref); -} - -static ULONG WINAPI IFileSystemBindData_fnRelease(IFileSystemBindData *iface) -{ - IFileSystemBindDataImpl *This = (IFileSystemBindDataImpl *)iface; - TRACE("(%p)\n", This); - - if (!InterlockedDecrement(&This->ref)) - { - TRACE(" destroying ISFBindPidl(%p)\n",This); - HeapFree(GetProcessHeap(), 0, This); - return 0; - } - return This->ref; -} - -static HRESULT WINAPI IFileSystemBindData_fnGetFindData(IFileSystemBindData *iface, WIN32_FIND_DATAW *pfd) -{ - IFileSystemBindDataImpl *This = (IFileSystemBindDataImpl *)iface; - TRACE("(%p), %p\n", This, pfd); - - if (!pfd) - return E_INVALIDARG; - - memcpy(pfd, &This->findFile, sizeof(WIN32_FIND_DATAW)); - return NOERROR; -} - -static HRESULT WINAPI IFileSystemBindData_fnSetFindData(IFileSystemBindData *iface, const WIN32_FIND_DATAW *pfd) -{ - IFileSystemBindDataImpl *This = (IFileSystemBindDataImpl *)iface; - TRACE("(%p), %p\n", This, pfd); - - if (pfd) - memcpy(&This->findFile, pfd, sizeof(WIN32_FIND_DATAW)); - else - memset(&This->findFile, 0, sizeof(WIN32_FIND_DATAW)); - return NOERROR; -} +/* + * File System Bind Data object to use as parameter for the bind context to + * IShellFolder_ParseDisplayName + * + * Copyright 2003 Rolf Kalbermatter + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ +#include "config.h" +#include "wine/port.h" + +#include + +#define COBJMACROS + +#include "windef.h" +#include "winbase.h" +#include "winreg.h" +#include "winuser.h" +#include "shlobj.h" +#include "shell32_main.h" + +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(pidl); + +/*********************************************************************** + * IFileSystemBindData implementation + */ +typedef struct +{ + IFileSystemBindDataVtbl *lpVtbl; + DWORD ref; + WIN32_FIND_DATAW findFile; +} IFileSystemBindDataImpl; + +static HRESULT WINAPI IFileSystemBindData_fnQueryInterface(IFileSystemBindData *iface, REFIID riid, LPVOID* ppvObj); +static ULONG WINAPI IFileSystemBindData_fnAddRef(IFileSystemBindData *iface); +static ULONG WINAPI IFileSystemBindData_fnRelease(IFileSystemBindData *iface); +static HRESULT WINAPI IFileSystemBindData_fnGetFindData(IFileSystemBindData *iface, WIN32_FIND_DATAW *pfd); +static HRESULT WINAPI IFileSystemBindData_fnSetFindData(IFileSystemBindData *iface, const WIN32_FIND_DATAW *pfd); + +static struct IFileSystemBindDataVtbl sbvt = +{ + IFileSystemBindData_fnQueryInterface, + IFileSystemBindData_fnAddRef, + IFileSystemBindData_fnRelease, + IFileSystemBindData_fnSetFindData, + IFileSystemBindData_fnGetFindData, +}; + +static const WCHAR wFileSystemBindData[] = {'F','i','l','e',' ','S','y','s','t','e','m',' ','B','i','n','d','D','a','t','a',0}; + +HRESULT WINAPI IFileSystemBindData_Constructor(const WIN32_FIND_DATAW *pfd, LPBC *ppV) +{ + IFileSystemBindDataImpl *sb; + HRESULT ret = E_OUTOFMEMORY; + + TRACE("%p, %p\n", pfd, ppV); + + if (!ppV) + return E_INVALIDARG; + + *ppV = NULL; + + sb = (IFileSystemBindDataImpl*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IFileSystemBindDataImpl)); + if (!sb) + return ret; + + sb->lpVtbl = &sbvt; + sb->ref = 1; + IFileSystemBindData_fnSetFindData((IFileSystemBindData*)sb, pfd); + + ret = CreateBindCtx(0, ppV); + if (SUCCEEDED(ret)) + { + BIND_OPTS bindOpts; + bindOpts.cbStruct = sizeof(BIND_OPTS); + bindOpts.grfFlags = 0; + bindOpts.grfMode = STGM_CREATE; + bindOpts.dwTickCountDeadline = 0; + IBindCtx_SetBindOptions(*ppV, &bindOpts); + IBindCtx_RegisterObjectParam(*ppV, (LPOLESTR)wFileSystemBindData, (LPUNKNOWN)sb); + + IFileSystemBindData_Release((IFileSystemBindData*)sb); + } + else + HeapFree(GetProcessHeap(), 0, sb); + return ret; +} + +HRESULT WINAPI FileSystemBindData_GetFindData(LPBC pbc, WIN32_FIND_DATAW *pfd) +{ + LPUNKNOWN pUnk; + IFileSystemBindData *pfsbd = NULL; + HRESULT ret; + + TRACE("%p, %p\n", pbc, pfd); + + if (!pfd) + return E_INVALIDARG; + + ret = IBindCtx_GetObjectParam(pbc, (LPOLESTR)wFileSystemBindData, &pUnk); + if (SUCCEEDED(ret)) + { + ret = IUnknown_QueryInterface(pUnk, &IID_IFileSystemBindData, (LPVOID *)&pfsbd); + if (SUCCEEDED(ret)) + { + ret = IFileSystemBindData_GetFindData(pfsbd, pfd); + IFileSystemBindData_Release(pfsbd); + } + IUnknown_Release(pUnk); + } + return ret; +} + +HRESULT WINAPI FileSystemBindData_SetFindData(LPBC pbc, const WIN32_FIND_DATAW *pfd) +{ + LPUNKNOWN pUnk; + IFileSystemBindData *pfsbd = NULL; + HRESULT ret; + + TRACE("%p, %p\n", pbc, pfd); + + ret = IBindCtx_GetObjectParam(pbc, (LPOLESTR)wFileSystemBindData, &pUnk); + if (SUCCEEDED(ret)) + { + ret = IUnknown_QueryInterface(pUnk, &IID_IFileSystemBindData, (LPVOID *)&pfsbd); + if (SUCCEEDED(ret)) + { + ret = IFileSystemBindData_SetFindData(pfsbd, pfd); + IFileSystemBindData_Release(pfsbd); + } + IUnknown_Release(pUnk); + } + return ret;} + + + +static HRESULT WINAPI IFileSystemBindData_fnQueryInterface(IFileSystemBindData *iface, REFIID riid, LPVOID *ppV) +{ + IFileSystemBindDataImpl *This = (IFileSystemBindDataImpl *)iface; + TRACE("(%p)->(\n\tIID:\t%s, %p)\n", This, debugstr_guid(riid), ppV); + + *ppV = NULL; + + if (IsEqualIID(riid, &IID_IUnknown)) + { + *ppV = This; + } + else if (IsEqualIID(riid, &IID_IFileSystemBindData)) + { + *ppV = (IFileSystemBindData*)This; + } + + if (*ppV) + { + IUnknown_AddRef((IUnknown*)(*ppV)); + TRACE("-- Interface: (%p)->(%p)\n", ppV, *ppV); + return S_OK; + } + TRACE("-- Interface: E_NOINTERFACE\n"); + return E_NOINTERFACE; +} + +static ULONG WINAPI IFileSystemBindData_fnAddRef(IFileSystemBindData *iface) +{ + IFileSystemBindDataImpl *This = (IFileSystemBindDataImpl *)iface; + TRACE("(%p)\n", This); + return InterlockedIncrement(&This->ref); +} + +static ULONG WINAPI IFileSystemBindData_fnRelease(IFileSystemBindData *iface) +{ + IFileSystemBindDataImpl *This = (IFileSystemBindDataImpl *)iface; + TRACE("(%p)\n", This); + + if (!InterlockedDecrement(&This->ref)) + { + TRACE(" destroying ISFBindPidl(%p)\n",This); + HeapFree(GetProcessHeap(), 0, This); + return 0; + } + return This->ref; +} + +static HRESULT WINAPI IFileSystemBindData_fnGetFindData(IFileSystemBindData *iface, WIN32_FIND_DATAW *pfd) +{ + IFileSystemBindDataImpl *This = (IFileSystemBindDataImpl *)iface; + TRACE("(%p), %p\n", This, pfd); + + if (!pfd) + return E_INVALIDARG; + + memcpy(pfd, &This->findFile, sizeof(WIN32_FIND_DATAW)); + return NOERROR; +} + +static HRESULT WINAPI IFileSystemBindData_fnSetFindData(IFileSystemBindData *iface, const WIN32_FIND_DATAW *pfd) +{ + IFileSystemBindDataImpl *This = (IFileSystemBindDataImpl *)iface; + TRACE("(%p), %p\n", This, pfd); + + if (pfd) + memcpy(&This->findFile, pfd, sizeof(WIN32_FIND_DATAW)); + else + memset(&This->findFile, 0, sizeof(WIN32_FIND_DATAW)); + return NOERROR; +} diff --git a/reactos/lib/shell32/shlmenu.c b/reactos/lib/shell32/shlmenu.c index d10acb430bd..6c2b149cf74 100644 --- a/reactos/lib/shell32/shlmenu.c +++ b/reactos/lib/shell32/shlmenu.c @@ -1,1002 +1,1002 @@ -/* - * see www.geocities.com/SiliconValley/4942/filemenu.html - * - * Copyright 1999, 2000 Juergen Schmied - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include -#include - -#define COBJMACROS - -#include "windef.h" -#include "winbase.h" -#include "winreg.h" -#include "wingdi.h" -#include "winuser.h" -#include "shlobj.h" -#include "undocshell.h" -#include "shlwapi.h" -#include "shell32_main.h" -#include "shlguid.h" - -#include "pidl.h" -#include "wine/debug.h" - -#ifdef FM_SEPARATOR -#undef FM_SEPARATOR -#endif -#define FM_SEPARATOR (LPCWSTR)1 - -static BOOL FileMenu_AppendItemW(HMENU hMenu, LPCWSTR lpText, UINT uID, int icon, - HMENU hMenuPopup, int nItemHeight); - -typedef struct -{ - BOOL bInitialized; - BOOL bFixedItems; - /* create */ - COLORREF crBorderColor; - int nBorderWidth; - HBITMAP hBorderBmp; - - /* insert using pidl */ - LPITEMIDLIST pidl; - UINT uID; - UINT uFlags; - UINT uEnumFlags; - LPFNFMCALLBACK lpfnCallback; -} FMINFO, *LPFMINFO; - -typedef struct -{ int cchItemText; - int iIconIndex; - HMENU hMenu; - WCHAR szItemText[1]; -} FMITEM, * LPFMITEM; - -static BOOL bAbortInit; - -#define CCH_MAXITEMTEXT 256 - -WINE_DEFAULT_DEBUG_CHANNEL(shell); - -LPFMINFO FM_GetMenuInfo(HMENU hmenu) -{ MENUINFO MenuInfo; - LPFMINFO menudata; - - MenuInfo.cbSize = sizeof(MENUINFO); - MenuInfo.fMask = MIM_MENUDATA; - - if (! GetMenuInfo(hmenu, &MenuInfo)) - return NULL; - - menudata = (LPFMINFO)MenuInfo.dwMenuData; - - if ((menudata == 0) || (MenuInfo.cbSize != sizeof(MENUINFO))) - { - ERR("menudata corrupt: %p %lu\n", menudata, MenuInfo.cbSize); - return 0; - } - - return menudata; - -} -/************************************************************************* - * FM_SetMenuParameter [internal] - * - */ -static LPFMINFO FM_SetMenuParameter( - HMENU hmenu, - UINT uID, - LPCITEMIDLIST pidl, - UINT uFlags, - UINT uEnumFlags, - LPFNFMCALLBACK lpfnCallback) -{ - LPFMINFO menudata; - - TRACE("\n"); - - menudata = FM_GetMenuInfo(hmenu); - - if ( menudata->pidl) - { SHFree(menudata->pidl); - } - - menudata->uID = uID; - menudata->pidl = ILClone(pidl); - menudata->uFlags = uFlags; - menudata->uEnumFlags = uEnumFlags; - menudata->lpfnCallback = lpfnCallback; - - return menudata; -} - -/************************************************************************* - * FM_InitMenuPopup [internal] - * - */ -static int FM_InitMenuPopup(HMENU hmenu, LPCITEMIDLIST pAlternatePidl) -{ IShellFolder *lpsf, *lpsf2; - ULONG ulItemAttr = SFGAO_FOLDER; - UINT uID, uFlags, uEnumFlags; - LPFNFMCALLBACK lpfnCallback; - LPCITEMIDLIST pidl; - WCHAR sTemp[MAX_PATH]; - int NumberOfItems = 0, iIcon; - MENUINFO MenuInfo; - LPFMINFO menudata; - - TRACE("%p %p\n", hmenu, pAlternatePidl); - - MenuInfo.cbSize = sizeof(MENUINFO); - MenuInfo.fMask = MIM_MENUDATA; - - if (! GetMenuInfo(hmenu, &MenuInfo)) - return FALSE; - - menudata = (LPFMINFO)MenuInfo.dwMenuData; - - if ((menudata == 0) || (MenuInfo.cbSize != sizeof(MENUINFO))) - { - ERR("menudata corrupt: %p %lu\n", menudata, MenuInfo.cbSize); - return 0; - } - - if (menudata->bInitialized) - return 0; - - pidl = (pAlternatePidl? pAlternatePidl: menudata->pidl); - if (!pidl) - return 0; - - uID = menudata->uID; - uFlags = menudata->uFlags; - uEnumFlags = menudata->uEnumFlags; - lpfnCallback = menudata->lpfnCallback; - menudata->bInitialized = FALSE; - - SetMenuInfo(hmenu, &MenuInfo); - - if (SUCCEEDED (SHGetDesktopFolder(&lpsf))) - { - if (SUCCEEDED(IShellFolder_BindToObject(lpsf, pidl,0,(REFIID)&IID_IShellFolder,(LPVOID *)&lpsf2))) - { - IEnumIDList *lpe = NULL; - - if (SUCCEEDED (IShellFolder_EnumObjects(lpsf2, 0, uEnumFlags, &lpe ))) - { - - LPITEMIDLIST pidlTemp = NULL; - ULONG ulFetched; - - while ((!bAbortInit) && (NOERROR == IEnumIDList_Next(lpe,1,&pidlTemp,&ulFetched))) - { - if (SUCCEEDED (IShellFolder_GetAttributesOf(lpsf, 1, (LPCITEMIDLIST*)&pidlTemp, &ulItemAttr))) - { - ILGetDisplayNameExW(NULL, pidlTemp, sTemp, ILGDN_FORPARSING); - if (! (PidlToSicIndex(lpsf, pidlTemp, FALSE, 0, &iIcon))) - iIcon = FM_BLANK_ICON; - if ( SFGAO_FOLDER & ulItemAttr) - { - LPFMINFO lpFmMi; - MENUINFO MenuInfo; - HMENU hMenuPopup = CreatePopupMenu(); - - lpFmMi = (LPFMINFO) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(FMINFO)); - - lpFmMi->pidl = ILCombine(pidl, pidlTemp); - lpFmMi->uEnumFlags = SHCONTF_FOLDERS | SHCONTF_NONFOLDERS; - - MenuInfo.cbSize = sizeof(MENUINFO); - MenuInfo.fMask = MIM_MENUDATA; - MenuInfo.dwMenuData = (DWORD) lpFmMi; - SetMenuInfo (hMenuPopup, &MenuInfo); - - FileMenu_AppendItemW (hmenu, sTemp, uID, iIcon, hMenuPopup, FM_DEFAULT_HEIGHT); - } - else - { - LPWSTR pExt = PathFindExtensionW(sTemp); - if (pExt) - *pExt = 0; - FileMenu_AppendItemW (hmenu, sTemp, uID, iIcon, 0, FM_DEFAULT_HEIGHT); - } - } - - if (lpfnCallback) - { - TRACE("enter callback\n"); - lpfnCallback ( pidl, pidlTemp); - TRACE("leave callback\n"); - } - - NumberOfItems++; - } - IEnumIDList_Release (lpe); - } - IShellFolder_Release(lpsf2); - } - IShellFolder_Release(lpsf); - } - - if ( GetMenuItemCount (hmenu) == 0 ) - { - static const WCHAR szEmpty[] = { '(','e','m','p','t','y',')',0 }; - FileMenu_AppendItemW (hmenu, szEmpty, uID, FM_BLANK_ICON, 0, FM_DEFAULT_HEIGHT); - NumberOfItems++; - } - - menudata->bInitialized = TRUE; - SetMenuInfo(hmenu, &MenuInfo); - - return NumberOfItems; -} -/************************************************************************* - * FileMenu_Create [SHELL32.114] - * - * NOTES - * for non-root menus values are - * (ffffffff,00000000,00000000,00000000,00000000) - */ -HMENU WINAPI FileMenu_Create ( - COLORREF crBorderColor, - int nBorderWidth, - HBITMAP hBorderBmp, - int nSelHeight, - UINT uFlags) -{ - MENUINFO MenuInfo; - LPFMINFO menudata; - - HMENU hMenu = CreatePopupMenu(); - - TRACE("0x%08lx 0x%08x %p 0x%08x 0x%08x hMenu=%p\n", - crBorderColor, nBorderWidth, hBorderBmp, nSelHeight, uFlags, hMenu); - - menudata = (LPFMINFO)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(FMINFO)); - menudata->crBorderColor = crBorderColor; - menudata->nBorderWidth = nBorderWidth; - menudata->hBorderBmp = hBorderBmp; - - MenuInfo.cbSize = sizeof(MENUINFO); - MenuInfo.fMask = MIM_MENUDATA; - MenuInfo.dwMenuData = (DWORD) menudata; - SetMenuInfo (hMenu, &MenuInfo); - - return hMenu; -} - -/************************************************************************* - * FileMenu_Destroy [SHELL32.118] - * - * NOTES - * exported by name - */ -void WINAPI FileMenu_Destroy (HMENU hmenu) -{ - LPFMINFO menudata; - - TRACE("%p\n", hmenu); - - FileMenu_DeleteAllItems (hmenu); - - menudata = FM_GetMenuInfo(hmenu); - - if ( menudata->pidl) - { SHFree( menudata->pidl); - } - HeapFree(GetProcessHeap(), 0, menudata); - - DestroyMenu (hmenu); -} - -/************************************************************************* - * FileMenu_AppendItem [SHELL32.115] - * - */ -static BOOL FileMenu_AppendItemW( - HMENU hMenu, - LPCWSTR lpText, - UINT uID, - int icon, - HMENU hMenuPopup, - int nItemHeight) -{ - MENUITEMINFOW mii; - LPFMITEM myItem; - LPFMINFO menudata; - MENUINFO MenuInfo; - - - TRACE("%p %s 0x%08x 0x%08x %p 0x%08x\n", - hMenu, (lpText!=FM_SEPARATOR) ? debugstr_w(lpText) : NULL, - uID, icon, hMenuPopup, nItemHeight); - - ZeroMemory (&mii, sizeof(MENUITEMINFOW)); - - mii.cbSize = sizeof(MENUITEMINFOW); - - if (lpText != FM_SEPARATOR) - { - int len = strlenW (lpText); - myItem = (LPFMITEM) SHAlloc( sizeof(FMITEM) + len*sizeof(WCHAR)); - strcpyW (myItem->szItemText, lpText); - myItem->cchItemText = len; - myItem->iIconIndex = icon; - myItem->hMenu = hMenu; - mii.fMask = MIIM_DATA; - mii.dwItemData = (DWORD) myItem; - } - - if ( hMenuPopup ) - { /* sub menu */ - mii.fMask |= MIIM_TYPE | MIIM_SUBMENU; - mii.fType = MFT_OWNERDRAW; - mii.hSubMenu = hMenuPopup; - } - else if (lpText == FM_SEPARATOR ) - { mii.fMask |= MIIM_ID | MIIM_TYPE; - mii.fType = MFT_SEPARATOR; - } - else - { /* normal item */ - mii.fMask |= MIIM_ID | MIIM_TYPE | MIIM_STATE; - mii.fState = MFS_ENABLED | MFS_DEFAULT; - mii.fType = MFT_OWNERDRAW; - } - mii.wID = uID; - - InsertMenuItemW (hMenu, (UINT)-1, TRUE, &mii); - - /* set bFixedItems to true */ - MenuInfo.cbSize = sizeof(MENUINFO); - MenuInfo.fMask = MIM_MENUDATA; - - if (! GetMenuInfo(hMenu, &MenuInfo)) - return FALSE; - - menudata = (LPFMINFO)MenuInfo.dwMenuData; - if ((menudata == 0) || (MenuInfo.cbSize != sizeof(MENUINFO))) - { - ERR("menudata corrupt: %p %lu\n", menudata, MenuInfo.cbSize); - return 0; - } - - menudata->bFixedItems = TRUE; - SetMenuInfo(hMenu, &MenuInfo); - - return TRUE; - -} - -/**********************************************************************/ - -BOOL WINAPI FileMenu_AppendItemAW( - HMENU hMenu, - LPCVOID lpText, - UINT uID, - int icon, - HMENU hMenuPopup, - int nItemHeight) -{ - BOOL ret; - - if ((SHELL_OsIsUnicode() && (lpText!=FM_SEPARATOR)) || (lpText == NULL)) - ret = FileMenu_AppendItemW(hMenu, lpText, uID, icon, hMenuPopup, nItemHeight); - else - { - DWORD len = MultiByteToWideChar( CP_ACP, 0, lpText, -1, NULL, 0 ); - LPWSTR lpszText = HeapAlloc ( GetProcessHeap(), 0, len*sizeof(WCHAR) ); - MultiByteToWideChar( CP_ACP, 0, lpText, -1, lpszText, len ); - ret = FileMenu_AppendItemW(hMenu, lpszText, uID, icon, hMenuPopup, nItemHeight); - HeapFree( GetProcessHeap(), 0, lpszText ); - } - - return ret; -} -/************************************************************************* - * FileMenu_InsertUsingPidl [SHELL32.110] - * - * NOTES - * uEnumFlags any SHCONTF flag - */ -int WINAPI FileMenu_InsertUsingPidl ( - HMENU hmenu, - UINT uID, - LPCITEMIDLIST pidl, - UINT uFlags, - UINT uEnumFlags, - LPFNFMCALLBACK lpfnCallback) -{ - TRACE("%p 0x%08x %p 0x%08x 0x%08x %p\n", - hmenu, uID, pidl, uFlags, uEnumFlags, lpfnCallback); - - pdump (pidl); - - bAbortInit = FALSE; - - FM_SetMenuParameter(hmenu, uID, pidl, uFlags, uEnumFlags, lpfnCallback); - - return FM_InitMenuPopup(hmenu, NULL); -} - -/************************************************************************* - * FileMenu_ReplaceUsingPidl [SHELL32.113] - * - * FIXME: the static items are deleted but won't be refreshed - */ -int WINAPI FileMenu_ReplaceUsingPidl( - HMENU hmenu, - UINT uID, - LPCITEMIDLIST pidl, - UINT uEnumFlags, - LPFNFMCALLBACK lpfnCallback) -{ - TRACE("%p 0x%08x %p 0x%08x %p\n", - hmenu, uID, pidl, uEnumFlags, lpfnCallback); - - FileMenu_DeleteAllItems (hmenu); - - FM_SetMenuParameter(hmenu, uID, pidl, 0, uEnumFlags, lpfnCallback); - - return FM_InitMenuPopup(hmenu, NULL); -} - -/************************************************************************* - * FileMenu_Invalidate [SHELL32.111] - */ -void WINAPI FileMenu_Invalidate (HMENU hMenu) -{ - FIXME("%p\n",hMenu); -} - -/************************************************************************* - * FileMenu_FindSubMenuByPidl [SHELL32.106] - */ -HMENU WINAPI FileMenu_FindSubMenuByPidl( - HMENU hMenu, - LPCITEMIDLIST pidl) -{ - FIXME("%p %p\n",hMenu, pidl); - return 0; -} - -/************************************************************************* - * FileMenu_AppendFilesForPidl [SHELL32.124] - */ -int WINAPI FileMenu_AppendFilesForPidl( - HMENU hmenu, - LPCITEMIDLIST pidl, - BOOL bAddSeperator) -{ - LPFMINFO menudata; - - menudata = FM_GetMenuInfo(hmenu); - - menudata->bInitialized = FALSE; - - FM_InitMenuPopup(hmenu, pidl); - - if (bAddSeperator) - FileMenu_AppendItemW (hmenu, FM_SEPARATOR, 0, 0, 0, FM_DEFAULT_HEIGHT); - - TRACE("%p %p 0x%08x\n",hmenu, pidl,bAddSeperator); - - return 0; -} -/************************************************************************* - * FileMenu_AddFilesForPidl [SHELL32.125] - * - * NOTES - * uEnumFlags any SHCONTF flag - */ -int WINAPI FileMenu_AddFilesForPidl ( - HMENU hmenu, - UINT uReserved, - UINT uID, - LPCITEMIDLIST pidl, - UINT uFlags, - UINT uEnumFlags, - LPFNFMCALLBACK lpfnCallback) -{ - TRACE("%p 0x%08x 0x%08x %p 0x%08x 0x%08x %p\n", - hmenu, uReserved, uID, pidl, uFlags, uEnumFlags, lpfnCallback); - - return FileMenu_InsertUsingPidl ( hmenu, uID, pidl, uFlags, uEnumFlags, lpfnCallback); - -} - - -/************************************************************************* - * FileMenu_TrackPopupMenuEx [SHELL32.116] - */ -BOOL WINAPI FileMenu_TrackPopupMenuEx ( - HMENU hMenu, - UINT uFlags, - int x, - int y, - HWND hWnd, - LPTPMPARAMS lptpm) -{ - TRACE("%p 0x%08x 0x%x 0x%x %p %p\n", - hMenu, uFlags, x, y, hWnd, lptpm); - return TrackPopupMenuEx(hMenu, uFlags, x, y, hWnd, lptpm); -} - -/************************************************************************* - * FileMenu_GetLastSelectedItemPidls [SHELL32.107] - */ -BOOL WINAPI FileMenu_GetLastSelectedItemPidls( - UINT uReserved, - LPCITEMIDLIST *ppidlFolder, - LPCITEMIDLIST *ppidlItem) -{ - FIXME("0x%08x %p %p\n",uReserved, ppidlFolder, ppidlItem); - return 0; -} - -#define FM_ICON_SIZE 16 -#define FM_Y_SPACE 4 -#define FM_SPACE1 4 -#define FM_SPACE2 2 -#define FM_LEFTBORDER 2 -#define FM_RIGHTBORDER 8 -/************************************************************************* - * FileMenu_MeasureItem [SHELL32.112] - */ -LRESULT WINAPI FileMenu_MeasureItem( - HWND hWnd, - LPMEASUREITEMSTRUCT lpmis) -{ - LPFMITEM pMyItem = (LPFMITEM)(lpmis->itemData); - HDC hdc = GetDC(hWnd); - SIZE size; - LPFMINFO menuinfo; - - TRACE("%p %p %s\n", hWnd, lpmis, debugstr_w(pMyItem->szItemText)); - - GetTextExtentPoint32W(hdc, pMyItem->szItemText, pMyItem->cchItemText, &size); - - lpmis->itemWidth = size.cx + FM_LEFTBORDER + FM_ICON_SIZE + FM_SPACE1 + FM_SPACE2 + FM_RIGHTBORDER; - lpmis->itemHeight = (size.cy > (FM_ICON_SIZE + FM_Y_SPACE)) ? size.cy : (FM_ICON_SIZE + FM_Y_SPACE); - - /* add the menubitmap */ - menuinfo = FM_GetMenuInfo(pMyItem->hMenu); - if (menuinfo->nBorderWidth) - lpmis->itemWidth += menuinfo->nBorderWidth; - - TRACE("-- 0x%04x 0x%04x\n", lpmis->itemWidth, lpmis->itemHeight); - ReleaseDC (hWnd, hdc); - return 0; -} -/************************************************************************* - * FileMenu_DrawItem [SHELL32.105] - */ -LRESULT WINAPI FileMenu_DrawItem( - HWND hWnd, - LPDRAWITEMSTRUCT lpdis) -{ - LPFMITEM pMyItem = (LPFMITEM)(lpdis->itemData); - COLORREF clrPrevText, clrPrevBkgnd; - int xi,yi,xt,yt; - HIMAGELIST hImageList; - RECT TextRect, BorderRect; - LPFMINFO menuinfo; - - TRACE("%p %p %s\n", hWnd, lpdis, debugstr_w(pMyItem->szItemText)); - - if (lpdis->itemState & ODS_SELECTED) - { - clrPrevText = SetTextColor(lpdis->hDC, GetSysColor (COLOR_HIGHLIGHTTEXT)); - clrPrevBkgnd = SetBkColor(lpdis->hDC, GetSysColor (COLOR_HIGHLIGHT)); - } - else - { - clrPrevText = SetTextColor(lpdis->hDC, GetSysColor (COLOR_MENUTEXT)); - clrPrevBkgnd = SetBkColor(lpdis->hDC, GetSysColor (COLOR_MENU)); - } - - CopyRect(&TextRect, &(lpdis->rcItem)); - - /* add the menubitmap */ - menuinfo = FM_GetMenuInfo(pMyItem->hMenu); - if (menuinfo->nBorderWidth) - TextRect.left += menuinfo->nBorderWidth; - - BorderRect.right = menuinfo->nBorderWidth; -/* FillRect(lpdis->hDC, &BorderRect, CreateSolidBrush( menuinfo->crBorderColor)); -*/ - TextRect.left += FM_LEFTBORDER; - xi = TextRect.left + FM_SPACE1; - yi = TextRect.top + FM_Y_SPACE/2; - TextRect.bottom -= FM_Y_SPACE/2; - - xt = xi + FM_ICON_SIZE + FM_SPACE2; - yt = yi; - - ExtTextOutW (lpdis->hDC, xt , yt, ETO_OPAQUE, &TextRect, pMyItem->szItemText, pMyItem->cchItemText, NULL); - - Shell_GetImageList(0, &hImageList); - ImageList_Draw(hImageList, pMyItem->iIconIndex, lpdis->hDC, xi, yi, ILD_NORMAL); - - TRACE("-- 0x%04lx 0x%04lx 0x%04lx 0x%04lx\n", TextRect.left, TextRect.top, TextRect.right, TextRect.bottom); - - SetTextColor(lpdis->hDC, clrPrevText); - SetBkColor(lpdis->hDC, clrPrevBkgnd); - - return TRUE; -} - -/************************************************************************* - * FileMenu_InitMenuPopup [SHELL32.109] - * - * NOTES - * The filemenu is a ownerdrawn menu. Call this function responding to - * WM_INITPOPUPMENU - * - */ -BOOL WINAPI FileMenu_InitMenuPopup (HMENU hmenu) -{ - FM_InitMenuPopup(hmenu, NULL); - return TRUE; -} - -/************************************************************************* - * FileMenu_HandleMenuChar [SHELL32.108] - */ -LRESULT WINAPI FileMenu_HandleMenuChar( - HMENU hMenu, - WPARAM wParam) -{ - FIXME("%p 0x%08x\n",hMenu,wParam); - return 0; -} - -/************************************************************************* - * FileMenu_DeleteAllItems [SHELL32.104] - * - * NOTES - * exported by name - */ -BOOL WINAPI FileMenu_DeleteAllItems (HMENU hmenu) -{ - MENUITEMINFOW mii; - LPFMINFO menudata; - - int i; - - TRACE("%p\n", hmenu); - - ZeroMemory ( &mii, sizeof(MENUITEMINFOW)); - mii.cbSize = sizeof(MENUITEMINFOW); - mii.fMask = MIIM_SUBMENU|MIIM_DATA; - - for (i = 0; i < GetMenuItemCount( hmenu ); i++) - { GetMenuItemInfoW(hmenu, i, TRUE, &mii ); - - if (mii.dwItemData) - SHFree((LPFMINFO)mii.dwItemData); - - if (mii.hSubMenu) - FileMenu_Destroy(mii.hSubMenu); - } - - while (DeleteMenu (hmenu, 0, MF_BYPOSITION)){}; - - menudata = FM_GetMenuInfo(hmenu); - - menudata->bInitialized = FALSE; - - return TRUE; -} - -/************************************************************************* - * FileMenu_DeleteItemByCmd [SHELL32.117] - * - */ -BOOL WINAPI FileMenu_DeleteItemByCmd (HMENU hMenu, UINT uID) -{ - MENUITEMINFOW mii; - - TRACE("%p 0x%08x\n", hMenu, uID); - - ZeroMemory ( &mii, sizeof(MENUITEMINFOW)); - mii.cbSize = sizeof(MENUITEMINFOW); - mii.fMask = MIIM_SUBMENU; - - GetMenuItemInfoW(hMenu, uID, FALSE, &mii ); - if ( mii.hSubMenu ) - { - /* FIXME: Do what? */ - } - - DeleteMenu(hMenu, MF_BYCOMMAND, uID); - return TRUE; -} - -/************************************************************************* - * FileMenu_DeleteItemByIndex [SHELL32.140] - */ -BOOL WINAPI FileMenu_DeleteItemByIndex ( HMENU hMenu, UINT uPos) -{ - MENUITEMINFOW mii; - - TRACE("%p 0x%08x\n", hMenu, uPos); - - ZeroMemory ( &mii, sizeof(MENUITEMINFOW)); - mii.cbSize = sizeof(MENUITEMINFOW); - mii.fMask = MIIM_SUBMENU; - - GetMenuItemInfoW(hMenu, uPos, TRUE, &mii ); - if ( mii.hSubMenu ) - { - /* FIXME: Do what? */ - } - - DeleteMenu(hMenu, MF_BYPOSITION, uPos); - return TRUE; -} - -/************************************************************************* - * FileMenu_DeleteItemByFirstID [SHELL32.141] - */ -BOOL WINAPI FileMenu_DeleteItemByFirstID( - HMENU hMenu, - UINT uID) -{ - TRACE("%p 0x%08x\n", hMenu, uID); - return 0; -} - -/************************************************************************* - * FileMenu_DeleteSeparator [SHELL32.142] - */ -BOOL WINAPI FileMenu_DeleteSeparator(HMENU hMenu) -{ - TRACE("%p\n", hMenu); - return 0; -} - -/************************************************************************* - * FileMenu_EnableItemByCmd [SHELL32.143] - */ -BOOL WINAPI FileMenu_EnableItemByCmd( - HMENU hMenu, - UINT uID, - BOOL bEnable) -{ - TRACE("%p 0x%08x 0x%08x\n", hMenu, uID,bEnable); - return 0; -} - -/************************************************************************* - * FileMenu_GetItemExtent [SHELL32.144] - * - * NOTES - * if the menu is too big, entries are getting cut away!! - */ -DWORD WINAPI FileMenu_GetItemExtent (HMENU hMenu, UINT uPos) -{ RECT rect; - - FIXME("%p 0x%08x\n", hMenu, uPos); - - if (GetMenuItemRect(0, hMenu, uPos, &rect)) - { FIXME("0x%04lx 0x%04lx 0x%04lx 0x%04lx\n", - rect.right, rect.left, rect.top, rect.bottom); - return ((rect.right-rect.left)<<16) + (rect.top-rect.bottom); - } - return 0x00100010; /*FIXME*/ -} - -/************************************************************************* - * FileMenu_AbortInitMenu [SHELL32.120] - * - */ -void WINAPI FileMenu_AbortInitMenu (void) -{ TRACE("\n"); - bAbortInit = TRUE; -} - -/************************************************************************* - * SHFind_InitMenuPopup [SHELL32.149] - * - * - * PARAMETERS - * hMenu [in] handle of menu previously created - * hWndParent [in] parent window - * w [in] no pointer (0x209 over here) perhaps menu IDs ??? - * x [in] no pointer (0x226 over here) - * - * RETURNS - * LPXXXXX pointer to struct containing a func addr at offset 8 - * or NULL at failure. - */ -LPVOID WINAPI SHFind_InitMenuPopup (HMENU hMenu, HWND hWndParent, DWORD w, DWORD x) -{ FIXME("hmenu=%p hwnd=%p 0x%08lx 0x%08lx stub\n", - hMenu,hWndParent,w,x); - return NULL; /* this is supposed to be a pointer */ -} - -/************************************************************************* - * Shell_MergeMenus [SHELL32.67] - * - */ -BOOL _SHIsMenuSeparator(HMENU hm, int i) -{ - MENUITEMINFOW mii; - - mii.cbSize = sizeof(MENUITEMINFOW); - mii.fMask = MIIM_TYPE; - mii.cch = 0; /* WARNING: We MUST initialize it to 0*/ - if (!GetMenuItemInfoW(hm, i, TRUE, &mii)) - { - return(FALSE); - } - - if (mii.fType & MFT_SEPARATOR) - { - return(TRUE); - } - - return(FALSE); -} - -/**********************************************************************/ - -HRESULT WINAPI Shell_MergeMenus (HMENU hmDst, HMENU hmSrc, UINT uInsert, UINT uIDAdjust, UINT uIDAdjustMax, ULONG uFlags) -{ int nItem; - HMENU hmSubMenu; - BOOL bAlreadySeparated; - MENUITEMINFOW miiSrc; - WCHAR szName[256]; - UINT uTemp, uIDMax = uIDAdjust; - - TRACE("hmenu1=%p hmenu2=%p 0x%04x 0x%04x 0x%04x 0x%04lx\n", - hmDst, hmSrc, uInsert, uIDAdjust, uIDAdjustMax, uFlags); - - if (!hmDst || !hmSrc) - { return uIDMax; - } - - nItem = GetMenuItemCount(hmDst); - - if (uInsert >= (UINT)nItem) /* insert position inside menu? */ - { - uInsert = (UINT)nItem; /* append on the end */ - bAlreadySeparated = TRUE; - } - else - { - bAlreadySeparated = _SHIsMenuSeparator(hmDst, uInsert); - } - - if ((uFlags & MM_ADDSEPARATOR) && !bAlreadySeparated) - { - /* Add a separator between the menus */ - InsertMenuA(hmDst, uInsert, MF_BYPOSITION | MF_SEPARATOR, 0, NULL); - bAlreadySeparated = TRUE; - } - - - /* Go through the menu items and clone them*/ - for (nItem = GetMenuItemCount(hmSrc) - 1; nItem >= 0; nItem--) - { - miiSrc.cbSize = sizeof(MENUITEMINFOW); - miiSrc.fMask = MIIM_STATE | MIIM_ID | MIIM_SUBMENU | MIIM_CHECKMARKS | MIIM_TYPE | MIIM_DATA; - - /* We need to reset this every time through the loop in case menus DON'T have IDs*/ - miiSrc.fType = MFT_STRING; - miiSrc.dwTypeData = szName; - miiSrc.dwItemData = 0; - miiSrc.cch = sizeof(szName)/sizeof(WCHAR); - - if (!GetMenuItemInfoW(hmSrc, nItem, TRUE, &miiSrc)) - { - continue; - } - -/* TRACE("found menu=0x%04x %s id=0x%04x mask=0x%08x smenu=0x%04x\n", hmSrc, debugstr_a(miiSrc.dwTypeData), miiSrc.wID, miiSrc.fMask, miiSrc.hSubMenu); -*/ - if (miiSrc.fType & MFT_SEPARATOR) - { - /* This is a separator; don't put two of them in a row */ - if (bAlreadySeparated) - continue; - - bAlreadySeparated = TRUE; - } - else if (miiSrc.hSubMenu) - { - if (uFlags & MM_SUBMENUSHAVEIDS) - { - miiSrc.wID += uIDAdjust; /* add uIDAdjust to the ID */ - - if (miiSrc.wID > uIDAdjustMax) /* skip ID's higher uIDAdjustMax */ - continue; - - if (uIDMax <= miiSrc.wID) /* remember the highest ID */ - uIDMax = miiSrc.wID + 1; - } - else - { - miiSrc.fMask &= ~MIIM_ID; /* Don't set IDs for submenus that didn't have them already */ - } - hmSubMenu = miiSrc.hSubMenu; - - miiSrc.hSubMenu = CreatePopupMenu(); - - if (!miiSrc.hSubMenu) return(uIDMax); - - uTemp = Shell_MergeMenus(miiSrc.hSubMenu, hmSubMenu, 0, uIDAdjust, uIDAdjustMax, uFlags & MM_SUBMENUSHAVEIDS); - - if (uIDMax <= uTemp) - uIDMax = uTemp; - - bAlreadySeparated = FALSE; - } - else /* normal menu item */ - { - miiSrc.wID += uIDAdjust; /* add uIDAdjust to the ID */ - - if (miiSrc.wID > uIDAdjustMax) /* skip ID's higher uIDAdjustMax */ - continue; - - if (uIDMax <= miiSrc.wID) /* remember the highest ID */ - uIDMax = miiSrc.wID + 1; - - bAlreadySeparated = FALSE; - } - -/* TRACE("inserting menu=0x%04x %s id=0x%04x mask=0x%08x smenu=0x%04x\n", hmDst, debugstr_a(miiSrc.dwTypeData), miiSrc.wID, miiSrc.fMask, miiSrc.hSubMenu); -*/ - if (!InsertMenuItemW(hmDst, uInsert, TRUE, &miiSrc)) - { - return(uIDMax); - } - } - - /* Ensure the correct number of separators at the beginning of the - inserted menu items*/ - if (uInsert == 0) - { - if (bAlreadySeparated) - { - DeleteMenu(hmDst, uInsert, MF_BYPOSITION); - } - } - else - { - if (_SHIsMenuSeparator(hmDst, uInsert-1)) - { - if (bAlreadySeparated) - { - DeleteMenu(hmDst, uInsert, MF_BYPOSITION); - } - } - else - { - if ((uFlags & MM_ADDSEPARATOR) && !bAlreadySeparated) - { - /* Add a separator between the menus*/ - InsertMenuW(hmDst, uInsert, MF_BYPOSITION | MF_SEPARATOR, 0, NULL); - } - } - } - return(uIDMax); -} +/* + * see www.geocities.com/SiliconValley/4942/filemenu.html + * + * Copyright 1999, 2000 Juergen Schmied + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include +#include + +#define COBJMACROS + +#include "windef.h" +#include "winbase.h" +#include "winreg.h" +#include "wingdi.h" +#include "winuser.h" +#include "shlobj.h" +#include "undocshell.h" +#include "shlwapi.h" +#include "shell32_main.h" +#include "shlguid.h" + +#include "pidl.h" +#include "wine/debug.h" + +#ifdef FM_SEPARATOR +#undef FM_SEPARATOR +#endif +#define FM_SEPARATOR (LPCWSTR)1 + +static BOOL FileMenu_AppendItemW(HMENU hMenu, LPCWSTR lpText, UINT uID, int icon, + HMENU hMenuPopup, int nItemHeight); + +typedef struct +{ + BOOL bInitialized; + BOOL bFixedItems; + /* create */ + COLORREF crBorderColor; + int nBorderWidth; + HBITMAP hBorderBmp; + + /* insert using pidl */ + LPITEMIDLIST pidl; + UINT uID; + UINT uFlags; + UINT uEnumFlags; + LPFNFMCALLBACK lpfnCallback; +} FMINFO, *LPFMINFO; + +typedef struct +{ int cchItemText; + int iIconIndex; + HMENU hMenu; + WCHAR szItemText[1]; +} FMITEM, * LPFMITEM; + +static BOOL bAbortInit; + +#define CCH_MAXITEMTEXT 256 + +WINE_DEFAULT_DEBUG_CHANNEL(shell); + +LPFMINFO FM_GetMenuInfo(HMENU hmenu) +{ MENUINFO MenuInfo; + LPFMINFO menudata; + + MenuInfo.cbSize = sizeof(MENUINFO); + MenuInfo.fMask = MIM_MENUDATA; + + if (! GetMenuInfo(hmenu, &MenuInfo)) + return NULL; + + menudata = (LPFMINFO)MenuInfo.dwMenuData; + + if ((menudata == 0) || (MenuInfo.cbSize != sizeof(MENUINFO))) + { + ERR("menudata corrupt: %p %lu\n", menudata, MenuInfo.cbSize); + return 0; + } + + return menudata; + +} +/************************************************************************* + * FM_SetMenuParameter [internal] + * + */ +static LPFMINFO FM_SetMenuParameter( + HMENU hmenu, + UINT uID, + LPCITEMIDLIST pidl, + UINT uFlags, + UINT uEnumFlags, + LPFNFMCALLBACK lpfnCallback) +{ + LPFMINFO menudata; + + TRACE("\n"); + + menudata = FM_GetMenuInfo(hmenu); + + if ( menudata->pidl) + { SHFree(menudata->pidl); + } + + menudata->uID = uID; + menudata->pidl = ILClone(pidl); + menudata->uFlags = uFlags; + menudata->uEnumFlags = uEnumFlags; + menudata->lpfnCallback = lpfnCallback; + + return menudata; +} + +/************************************************************************* + * FM_InitMenuPopup [internal] + * + */ +static int FM_InitMenuPopup(HMENU hmenu, LPCITEMIDLIST pAlternatePidl) +{ IShellFolder *lpsf, *lpsf2; + ULONG ulItemAttr = SFGAO_FOLDER; + UINT uID, uFlags, uEnumFlags; + LPFNFMCALLBACK lpfnCallback; + LPCITEMIDLIST pidl; + WCHAR sTemp[MAX_PATH]; + int NumberOfItems = 0, iIcon; + MENUINFO MenuInfo; + LPFMINFO menudata; + + TRACE("%p %p\n", hmenu, pAlternatePidl); + + MenuInfo.cbSize = sizeof(MENUINFO); + MenuInfo.fMask = MIM_MENUDATA; + + if (! GetMenuInfo(hmenu, &MenuInfo)) + return FALSE; + + menudata = (LPFMINFO)MenuInfo.dwMenuData; + + if ((menudata == 0) || (MenuInfo.cbSize != sizeof(MENUINFO))) + { + ERR("menudata corrupt: %p %lu\n", menudata, MenuInfo.cbSize); + return 0; + } + + if (menudata->bInitialized) + return 0; + + pidl = (pAlternatePidl? pAlternatePidl: menudata->pidl); + if (!pidl) + return 0; + + uID = menudata->uID; + uFlags = menudata->uFlags; + uEnumFlags = menudata->uEnumFlags; + lpfnCallback = menudata->lpfnCallback; + menudata->bInitialized = FALSE; + + SetMenuInfo(hmenu, &MenuInfo); + + if (SUCCEEDED (SHGetDesktopFolder(&lpsf))) + { + if (SUCCEEDED(IShellFolder_BindToObject(lpsf, pidl,0,(REFIID)&IID_IShellFolder,(LPVOID *)&lpsf2))) + { + IEnumIDList *lpe = NULL; + + if (SUCCEEDED (IShellFolder_EnumObjects(lpsf2, 0, uEnumFlags, &lpe ))) + { + + LPITEMIDLIST pidlTemp = NULL; + ULONG ulFetched; + + while ((!bAbortInit) && (NOERROR == IEnumIDList_Next(lpe,1,&pidlTemp,&ulFetched))) + { + if (SUCCEEDED (IShellFolder_GetAttributesOf(lpsf, 1, (LPCITEMIDLIST*)&pidlTemp, &ulItemAttr))) + { + ILGetDisplayNameExW(NULL, pidlTemp, sTemp, ILGDN_FORPARSING); + if (! (PidlToSicIndex(lpsf, pidlTemp, FALSE, 0, &iIcon))) + iIcon = FM_BLANK_ICON; + if ( SFGAO_FOLDER & ulItemAttr) + { + LPFMINFO lpFmMi; + MENUINFO MenuInfo; + HMENU hMenuPopup = CreatePopupMenu(); + + lpFmMi = (LPFMINFO) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(FMINFO)); + + lpFmMi->pidl = ILCombine(pidl, pidlTemp); + lpFmMi->uEnumFlags = SHCONTF_FOLDERS | SHCONTF_NONFOLDERS; + + MenuInfo.cbSize = sizeof(MENUINFO); + MenuInfo.fMask = MIM_MENUDATA; + MenuInfo.dwMenuData = (DWORD) lpFmMi; + SetMenuInfo (hMenuPopup, &MenuInfo); + + FileMenu_AppendItemW (hmenu, sTemp, uID, iIcon, hMenuPopup, FM_DEFAULT_HEIGHT); + } + else + { + LPWSTR pExt = PathFindExtensionW(sTemp); + if (pExt) + *pExt = 0; + FileMenu_AppendItemW (hmenu, sTemp, uID, iIcon, 0, FM_DEFAULT_HEIGHT); + } + } + + if (lpfnCallback) + { + TRACE("enter callback\n"); + lpfnCallback ( pidl, pidlTemp); + TRACE("leave callback\n"); + } + + NumberOfItems++; + } + IEnumIDList_Release (lpe); + } + IShellFolder_Release(lpsf2); + } + IShellFolder_Release(lpsf); + } + + if ( GetMenuItemCount (hmenu) == 0 ) + { + static const WCHAR szEmpty[] = { '(','e','m','p','t','y',')',0 }; + FileMenu_AppendItemW (hmenu, szEmpty, uID, FM_BLANK_ICON, 0, FM_DEFAULT_HEIGHT); + NumberOfItems++; + } + + menudata->bInitialized = TRUE; + SetMenuInfo(hmenu, &MenuInfo); + + return NumberOfItems; +} +/************************************************************************* + * FileMenu_Create [SHELL32.114] + * + * NOTES + * for non-root menus values are + * (ffffffff,00000000,00000000,00000000,00000000) + */ +HMENU WINAPI FileMenu_Create ( + COLORREF crBorderColor, + int nBorderWidth, + HBITMAP hBorderBmp, + int nSelHeight, + UINT uFlags) +{ + MENUINFO MenuInfo; + LPFMINFO menudata; + + HMENU hMenu = CreatePopupMenu(); + + TRACE("0x%08lx 0x%08x %p 0x%08x 0x%08x hMenu=%p\n", + crBorderColor, nBorderWidth, hBorderBmp, nSelHeight, uFlags, hMenu); + + menudata = (LPFMINFO)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(FMINFO)); + menudata->crBorderColor = crBorderColor; + menudata->nBorderWidth = nBorderWidth; + menudata->hBorderBmp = hBorderBmp; + + MenuInfo.cbSize = sizeof(MENUINFO); + MenuInfo.fMask = MIM_MENUDATA; + MenuInfo.dwMenuData = (DWORD) menudata; + SetMenuInfo (hMenu, &MenuInfo); + + return hMenu; +} + +/************************************************************************* + * FileMenu_Destroy [SHELL32.118] + * + * NOTES + * exported by name + */ +void WINAPI FileMenu_Destroy (HMENU hmenu) +{ + LPFMINFO menudata; + + TRACE("%p\n", hmenu); + + FileMenu_DeleteAllItems (hmenu); + + menudata = FM_GetMenuInfo(hmenu); + + if ( menudata->pidl) + { SHFree( menudata->pidl); + } + HeapFree(GetProcessHeap(), 0, menudata); + + DestroyMenu (hmenu); +} + +/************************************************************************* + * FileMenu_AppendItem [SHELL32.115] + * + */ +static BOOL FileMenu_AppendItemW( + HMENU hMenu, + LPCWSTR lpText, + UINT uID, + int icon, + HMENU hMenuPopup, + int nItemHeight) +{ + MENUITEMINFOW mii; + LPFMITEM myItem; + LPFMINFO menudata; + MENUINFO MenuInfo; + + + TRACE("%p %s 0x%08x 0x%08x %p 0x%08x\n", + hMenu, (lpText!=FM_SEPARATOR) ? debugstr_w(lpText) : NULL, + uID, icon, hMenuPopup, nItemHeight); + + ZeroMemory (&mii, sizeof(MENUITEMINFOW)); + + mii.cbSize = sizeof(MENUITEMINFOW); + + if (lpText != FM_SEPARATOR) + { + int len = strlenW (lpText); + myItem = (LPFMITEM) SHAlloc( sizeof(FMITEM) + len*sizeof(WCHAR)); + strcpyW (myItem->szItemText, lpText); + myItem->cchItemText = len; + myItem->iIconIndex = icon; + myItem->hMenu = hMenu; + mii.fMask = MIIM_DATA; + mii.dwItemData = (DWORD) myItem; + } + + if ( hMenuPopup ) + { /* sub menu */ + mii.fMask |= MIIM_TYPE | MIIM_SUBMENU; + mii.fType = MFT_OWNERDRAW; + mii.hSubMenu = hMenuPopup; + } + else if (lpText == FM_SEPARATOR ) + { mii.fMask |= MIIM_ID | MIIM_TYPE; + mii.fType = MFT_SEPARATOR; + } + else + { /* normal item */ + mii.fMask |= MIIM_ID | MIIM_TYPE | MIIM_STATE; + mii.fState = MFS_ENABLED | MFS_DEFAULT; + mii.fType = MFT_OWNERDRAW; + } + mii.wID = uID; + + InsertMenuItemW (hMenu, (UINT)-1, TRUE, &mii); + + /* set bFixedItems to true */ + MenuInfo.cbSize = sizeof(MENUINFO); + MenuInfo.fMask = MIM_MENUDATA; + + if (! GetMenuInfo(hMenu, &MenuInfo)) + return FALSE; + + menudata = (LPFMINFO)MenuInfo.dwMenuData; + if ((menudata == 0) || (MenuInfo.cbSize != sizeof(MENUINFO))) + { + ERR("menudata corrupt: %p %lu\n", menudata, MenuInfo.cbSize); + return 0; + } + + menudata->bFixedItems = TRUE; + SetMenuInfo(hMenu, &MenuInfo); + + return TRUE; + +} + +/**********************************************************************/ + +BOOL WINAPI FileMenu_AppendItemAW( + HMENU hMenu, + LPCVOID lpText, + UINT uID, + int icon, + HMENU hMenuPopup, + int nItemHeight) +{ + BOOL ret; + + if ((SHELL_OsIsUnicode() && (lpText!=FM_SEPARATOR)) || (lpText == NULL)) + ret = FileMenu_AppendItemW(hMenu, lpText, uID, icon, hMenuPopup, nItemHeight); + else + { + DWORD len = MultiByteToWideChar( CP_ACP, 0, lpText, -1, NULL, 0 ); + LPWSTR lpszText = HeapAlloc ( GetProcessHeap(), 0, len*sizeof(WCHAR) ); + MultiByteToWideChar( CP_ACP, 0, lpText, -1, lpszText, len ); + ret = FileMenu_AppendItemW(hMenu, lpszText, uID, icon, hMenuPopup, nItemHeight); + HeapFree( GetProcessHeap(), 0, lpszText ); + } + + return ret; +} +/************************************************************************* + * FileMenu_InsertUsingPidl [SHELL32.110] + * + * NOTES + * uEnumFlags any SHCONTF flag + */ +int WINAPI FileMenu_InsertUsingPidl ( + HMENU hmenu, + UINT uID, + LPCITEMIDLIST pidl, + UINT uFlags, + UINT uEnumFlags, + LPFNFMCALLBACK lpfnCallback) +{ + TRACE("%p 0x%08x %p 0x%08x 0x%08x %p\n", + hmenu, uID, pidl, uFlags, uEnumFlags, lpfnCallback); + + pdump (pidl); + + bAbortInit = FALSE; + + FM_SetMenuParameter(hmenu, uID, pidl, uFlags, uEnumFlags, lpfnCallback); + + return FM_InitMenuPopup(hmenu, NULL); +} + +/************************************************************************* + * FileMenu_ReplaceUsingPidl [SHELL32.113] + * + * FIXME: the static items are deleted but won't be refreshed + */ +int WINAPI FileMenu_ReplaceUsingPidl( + HMENU hmenu, + UINT uID, + LPCITEMIDLIST pidl, + UINT uEnumFlags, + LPFNFMCALLBACK lpfnCallback) +{ + TRACE("%p 0x%08x %p 0x%08x %p\n", + hmenu, uID, pidl, uEnumFlags, lpfnCallback); + + FileMenu_DeleteAllItems (hmenu); + + FM_SetMenuParameter(hmenu, uID, pidl, 0, uEnumFlags, lpfnCallback); + + return FM_InitMenuPopup(hmenu, NULL); +} + +/************************************************************************* + * FileMenu_Invalidate [SHELL32.111] + */ +void WINAPI FileMenu_Invalidate (HMENU hMenu) +{ + FIXME("%p\n",hMenu); +} + +/************************************************************************* + * FileMenu_FindSubMenuByPidl [SHELL32.106] + */ +HMENU WINAPI FileMenu_FindSubMenuByPidl( + HMENU hMenu, + LPCITEMIDLIST pidl) +{ + FIXME("%p %p\n",hMenu, pidl); + return 0; +} + +/************************************************************************* + * FileMenu_AppendFilesForPidl [SHELL32.124] + */ +int WINAPI FileMenu_AppendFilesForPidl( + HMENU hmenu, + LPCITEMIDLIST pidl, + BOOL bAddSeperator) +{ + LPFMINFO menudata; + + menudata = FM_GetMenuInfo(hmenu); + + menudata->bInitialized = FALSE; + + FM_InitMenuPopup(hmenu, pidl); + + if (bAddSeperator) + FileMenu_AppendItemW (hmenu, FM_SEPARATOR, 0, 0, 0, FM_DEFAULT_HEIGHT); + + TRACE("%p %p 0x%08x\n",hmenu, pidl,bAddSeperator); + + return 0; +} +/************************************************************************* + * FileMenu_AddFilesForPidl [SHELL32.125] + * + * NOTES + * uEnumFlags any SHCONTF flag + */ +int WINAPI FileMenu_AddFilesForPidl ( + HMENU hmenu, + UINT uReserved, + UINT uID, + LPCITEMIDLIST pidl, + UINT uFlags, + UINT uEnumFlags, + LPFNFMCALLBACK lpfnCallback) +{ + TRACE("%p 0x%08x 0x%08x %p 0x%08x 0x%08x %p\n", + hmenu, uReserved, uID, pidl, uFlags, uEnumFlags, lpfnCallback); + + return FileMenu_InsertUsingPidl ( hmenu, uID, pidl, uFlags, uEnumFlags, lpfnCallback); + +} + + +/************************************************************************* + * FileMenu_TrackPopupMenuEx [SHELL32.116] + */ +BOOL WINAPI FileMenu_TrackPopupMenuEx ( + HMENU hMenu, + UINT uFlags, + int x, + int y, + HWND hWnd, + LPTPMPARAMS lptpm) +{ + TRACE("%p 0x%08x 0x%x 0x%x %p %p\n", + hMenu, uFlags, x, y, hWnd, lptpm); + return TrackPopupMenuEx(hMenu, uFlags, x, y, hWnd, lptpm); +} + +/************************************************************************* + * FileMenu_GetLastSelectedItemPidls [SHELL32.107] + */ +BOOL WINAPI FileMenu_GetLastSelectedItemPidls( + UINT uReserved, + LPCITEMIDLIST *ppidlFolder, + LPCITEMIDLIST *ppidlItem) +{ + FIXME("0x%08x %p %p\n",uReserved, ppidlFolder, ppidlItem); + return 0; +} + +#define FM_ICON_SIZE 16 +#define FM_Y_SPACE 4 +#define FM_SPACE1 4 +#define FM_SPACE2 2 +#define FM_LEFTBORDER 2 +#define FM_RIGHTBORDER 8 +/************************************************************************* + * FileMenu_MeasureItem [SHELL32.112] + */ +LRESULT WINAPI FileMenu_MeasureItem( + HWND hWnd, + LPMEASUREITEMSTRUCT lpmis) +{ + LPFMITEM pMyItem = (LPFMITEM)(lpmis->itemData); + HDC hdc = GetDC(hWnd); + SIZE size; + LPFMINFO menuinfo; + + TRACE("%p %p %s\n", hWnd, lpmis, debugstr_w(pMyItem->szItemText)); + + GetTextExtentPoint32W(hdc, pMyItem->szItemText, pMyItem->cchItemText, &size); + + lpmis->itemWidth = size.cx + FM_LEFTBORDER + FM_ICON_SIZE + FM_SPACE1 + FM_SPACE2 + FM_RIGHTBORDER; + lpmis->itemHeight = (size.cy > (FM_ICON_SIZE + FM_Y_SPACE)) ? size.cy : (FM_ICON_SIZE + FM_Y_SPACE); + + /* add the menubitmap */ + menuinfo = FM_GetMenuInfo(pMyItem->hMenu); + if (menuinfo->nBorderWidth) + lpmis->itemWidth += menuinfo->nBorderWidth; + + TRACE("-- 0x%04x 0x%04x\n", lpmis->itemWidth, lpmis->itemHeight); + ReleaseDC (hWnd, hdc); + return 0; +} +/************************************************************************* + * FileMenu_DrawItem [SHELL32.105] + */ +LRESULT WINAPI FileMenu_DrawItem( + HWND hWnd, + LPDRAWITEMSTRUCT lpdis) +{ + LPFMITEM pMyItem = (LPFMITEM)(lpdis->itemData); + COLORREF clrPrevText, clrPrevBkgnd; + int xi,yi,xt,yt; + HIMAGELIST hImageList; + RECT TextRect, BorderRect; + LPFMINFO menuinfo; + + TRACE("%p %p %s\n", hWnd, lpdis, debugstr_w(pMyItem->szItemText)); + + if (lpdis->itemState & ODS_SELECTED) + { + clrPrevText = SetTextColor(lpdis->hDC, GetSysColor (COLOR_HIGHLIGHTTEXT)); + clrPrevBkgnd = SetBkColor(lpdis->hDC, GetSysColor (COLOR_HIGHLIGHT)); + } + else + { + clrPrevText = SetTextColor(lpdis->hDC, GetSysColor (COLOR_MENUTEXT)); + clrPrevBkgnd = SetBkColor(lpdis->hDC, GetSysColor (COLOR_MENU)); + } + + CopyRect(&TextRect, &(lpdis->rcItem)); + + /* add the menubitmap */ + menuinfo = FM_GetMenuInfo(pMyItem->hMenu); + if (menuinfo->nBorderWidth) + TextRect.left += menuinfo->nBorderWidth; + + BorderRect.right = menuinfo->nBorderWidth; +/* FillRect(lpdis->hDC, &BorderRect, CreateSolidBrush( menuinfo->crBorderColor)); +*/ + TextRect.left += FM_LEFTBORDER; + xi = TextRect.left + FM_SPACE1; + yi = TextRect.top + FM_Y_SPACE/2; + TextRect.bottom -= FM_Y_SPACE/2; + + xt = xi + FM_ICON_SIZE + FM_SPACE2; + yt = yi; + + ExtTextOutW (lpdis->hDC, xt , yt, ETO_OPAQUE, &TextRect, pMyItem->szItemText, pMyItem->cchItemText, NULL); + + Shell_GetImageList(0, &hImageList); + ImageList_Draw(hImageList, pMyItem->iIconIndex, lpdis->hDC, xi, yi, ILD_NORMAL); + + TRACE("-- 0x%04lx 0x%04lx 0x%04lx 0x%04lx\n", TextRect.left, TextRect.top, TextRect.right, TextRect.bottom); + + SetTextColor(lpdis->hDC, clrPrevText); + SetBkColor(lpdis->hDC, clrPrevBkgnd); + + return TRUE; +} + +/************************************************************************* + * FileMenu_InitMenuPopup [SHELL32.109] + * + * NOTES + * The filemenu is a ownerdrawn menu. Call this function responding to + * WM_INITPOPUPMENU + * + */ +BOOL WINAPI FileMenu_InitMenuPopup (HMENU hmenu) +{ + FM_InitMenuPopup(hmenu, NULL); + return TRUE; +} + +/************************************************************************* + * FileMenu_HandleMenuChar [SHELL32.108] + */ +LRESULT WINAPI FileMenu_HandleMenuChar( + HMENU hMenu, + WPARAM wParam) +{ + FIXME("%p 0x%08x\n",hMenu,wParam); + return 0; +} + +/************************************************************************* + * FileMenu_DeleteAllItems [SHELL32.104] + * + * NOTES + * exported by name + */ +BOOL WINAPI FileMenu_DeleteAllItems (HMENU hmenu) +{ + MENUITEMINFOW mii; + LPFMINFO menudata; + + int i; + + TRACE("%p\n", hmenu); + + ZeroMemory ( &mii, sizeof(MENUITEMINFOW)); + mii.cbSize = sizeof(MENUITEMINFOW); + mii.fMask = MIIM_SUBMENU|MIIM_DATA; + + for (i = 0; i < GetMenuItemCount( hmenu ); i++) + { GetMenuItemInfoW(hmenu, i, TRUE, &mii ); + + if (mii.dwItemData) + SHFree((LPFMINFO)mii.dwItemData); + + if (mii.hSubMenu) + FileMenu_Destroy(mii.hSubMenu); + } + + while (DeleteMenu (hmenu, 0, MF_BYPOSITION)){}; + + menudata = FM_GetMenuInfo(hmenu); + + menudata->bInitialized = FALSE; + + return TRUE; +} + +/************************************************************************* + * FileMenu_DeleteItemByCmd [SHELL32.117] + * + */ +BOOL WINAPI FileMenu_DeleteItemByCmd (HMENU hMenu, UINT uID) +{ + MENUITEMINFOW mii; + + TRACE("%p 0x%08x\n", hMenu, uID); + + ZeroMemory ( &mii, sizeof(MENUITEMINFOW)); + mii.cbSize = sizeof(MENUITEMINFOW); + mii.fMask = MIIM_SUBMENU; + + GetMenuItemInfoW(hMenu, uID, FALSE, &mii ); + if ( mii.hSubMenu ) + { + /* FIXME: Do what? */ + } + + DeleteMenu(hMenu, MF_BYCOMMAND, uID); + return TRUE; +} + +/************************************************************************* + * FileMenu_DeleteItemByIndex [SHELL32.140] + */ +BOOL WINAPI FileMenu_DeleteItemByIndex ( HMENU hMenu, UINT uPos) +{ + MENUITEMINFOW mii; + + TRACE("%p 0x%08x\n", hMenu, uPos); + + ZeroMemory ( &mii, sizeof(MENUITEMINFOW)); + mii.cbSize = sizeof(MENUITEMINFOW); + mii.fMask = MIIM_SUBMENU; + + GetMenuItemInfoW(hMenu, uPos, TRUE, &mii ); + if ( mii.hSubMenu ) + { + /* FIXME: Do what? */ + } + + DeleteMenu(hMenu, MF_BYPOSITION, uPos); + return TRUE; +} + +/************************************************************************* + * FileMenu_DeleteItemByFirstID [SHELL32.141] + */ +BOOL WINAPI FileMenu_DeleteItemByFirstID( + HMENU hMenu, + UINT uID) +{ + TRACE("%p 0x%08x\n", hMenu, uID); + return 0; +} + +/************************************************************************* + * FileMenu_DeleteSeparator [SHELL32.142] + */ +BOOL WINAPI FileMenu_DeleteSeparator(HMENU hMenu) +{ + TRACE("%p\n", hMenu); + return 0; +} + +/************************************************************************* + * FileMenu_EnableItemByCmd [SHELL32.143] + */ +BOOL WINAPI FileMenu_EnableItemByCmd( + HMENU hMenu, + UINT uID, + BOOL bEnable) +{ + TRACE("%p 0x%08x 0x%08x\n", hMenu, uID,bEnable); + return 0; +} + +/************************************************************************* + * FileMenu_GetItemExtent [SHELL32.144] + * + * NOTES + * if the menu is too big, entries are getting cut away!! + */ +DWORD WINAPI FileMenu_GetItemExtent (HMENU hMenu, UINT uPos) +{ RECT rect; + + FIXME("%p 0x%08x\n", hMenu, uPos); + + if (GetMenuItemRect(0, hMenu, uPos, &rect)) + { FIXME("0x%04lx 0x%04lx 0x%04lx 0x%04lx\n", + rect.right, rect.left, rect.top, rect.bottom); + return ((rect.right-rect.left)<<16) + (rect.top-rect.bottom); + } + return 0x00100010; /*FIXME*/ +} + +/************************************************************************* + * FileMenu_AbortInitMenu [SHELL32.120] + * + */ +void WINAPI FileMenu_AbortInitMenu (void) +{ TRACE("\n"); + bAbortInit = TRUE; +} + +/************************************************************************* + * SHFind_InitMenuPopup [SHELL32.149] + * + * + * PARAMETERS + * hMenu [in] handle of menu previously created + * hWndParent [in] parent window + * w [in] no pointer (0x209 over here) perhaps menu IDs ??? + * x [in] no pointer (0x226 over here) + * + * RETURNS + * LPXXXXX pointer to struct containing a func addr at offset 8 + * or NULL at failure. + */ +LPVOID WINAPI SHFind_InitMenuPopup (HMENU hMenu, HWND hWndParent, DWORD w, DWORD x) +{ FIXME("hmenu=%p hwnd=%p 0x%08lx 0x%08lx stub\n", + hMenu,hWndParent,w,x); + return NULL; /* this is supposed to be a pointer */ +} + +/************************************************************************* + * Shell_MergeMenus [SHELL32.67] + * + */ +BOOL _SHIsMenuSeparator(HMENU hm, int i) +{ + MENUITEMINFOW mii; + + mii.cbSize = sizeof(MENUITEMINFOW); + mii.fMask = MIIM_TYPE; + mii.cch = 0; /* WARNING: We MUST initialize it to 0*/ + if (!GetMenuItemInfoW(hm, i, TRUE, &mii)) + { + return(FALSE); + } + + if (mii.fType & MFT_SEPARATOR) + { + return(TRUE); + } + + return(FALSE); +} + +/**********************************************************************/ + +HRESULT WINAPI Shell_MergeMenus (HMENU hmDst, HMENU hmSrc, UINT uInsert, UINT uIDAdjust, UINT uIDAdjustMax, ULONG uFlags) +{ int nItem; + HMENU hmSubMenu; + BOOL bAlreadySeparated; + MENUITEMINFOW miiSrc; + WCHAR szName[256]; + UINT uTemp, uIDMax = uIDAdjust; + + TRACE("hmenu1=%p hmenu2=%p 0x%04x 0x%04x 0x%04x 0x%04lx\n", + hmDst, hmSrc, uInsert, uIDAdjust, uIDAdjustMax, uFlags); + + if (!hmDst || !hmSrc) + { return uIDMax; + } + + nItem = GetMenuItemCount(hmDst); + + if (uInsert >= (UINT)nItem) /* insert position inside menu? */ + { + uInsert = (UINT)nItem; /* append on the end */ + bAlreadySeparated = TRUE; + } + else + { + bAlreadySeparated = _SHIsMenuSeparator(hmDst, uInsert); + } + + if ((uFlags & MM_ADDSEPARATOR) && !bAlreadySeparated) + { + /* Add a separator between the menus */ + InsertMenuA(hmDst, uInsert, MF_BYPOSITION | MF_SEPARATOR, 0, NULL); + bAlreadySeparated = TRUE; + } + + + /* Go through the menu items and clone them*/ + for (nItem = GetMenuItemCount(hmSrc) - 1; nItem >= 0; nItem--) + { + miiSrc.cbSize = sizeof(MENUITEMINFOW); + miiSrc.fMask = MIIM_STATE | MIIM_ID | MIIM_SUBMENU | MIIM_CHECKMARKS | MIIM_TYPE | MIIM_DATA; + + /* We need to reset this every time through the loop in case menus DON'T have IDs*/ + miiSrc.fType = MFT_STRING; + miiSrc.dwTypeData = szName; + miiSrc.dwItemData = 0; + miiSrc.cch = sizeof(szName)/sizeof(WCHAR); + + if (!GetMenuItemInfoW(hmSrc, nItem, TRUE, &miiSrc)) + { + continue; + } + +/* TRACE("found menu=0x%04x %s id=0x%04x mask=0x%08x smenu=0x%04x\n", hmSrc, debugstr_a(miiSrc.dwTypeData), miiSrc.wID, miiSrc.fMask, miiSrc.hSubMenu); +*/ + if (miiSrc.fType & MFT_SEPARATOR) + { + /* This is a separator; don't put two of them in a row */ + if (bAlreadySeparated) + continue; + + bAlreadySeparated = TRUE; + } + else if (miiSrc.hSubMenu) + { + if (uFlags & MM_SUBMENUSHAVEIDS) + { + miiSrc.wID += uIDAdjust; /* add uIDAdjust to the ID */ + + if (miiSrc.wID > uIDAdjustMax) /* skip ID's higher uIDAdjustMax */ + continue; + + if (uIDMax <= miiSrc.wID) /* remember the highest ID */ + uIDMax = miiSrc.wID + 1; + } + else + { + miiSrc.fMask &= ~MIIM_ID; /* Don't set IDs for submenus that didn't have them already */ + } + hmSubMenu = miiSrc.hSubMenu; + + miiSrc.hSubMenu = CreatePopupMenu(); + + if (!miiSrc.hSubMenu) return(uIDMax); + + uTemp = Shell_MergeMenus(miiSrc.hSubMenu, hmSubMenu, 0, uIDAdjust, uIDAdjustMax, uFlags & MM_SUBMENUSHAVEIDS); + + if (uIDMax <= uTemp) + uIDMax = uTemp; + + bAlreadySeparated = FALSE; + } + else /* normal menu item */ + { + miiSrc.wID += uIDAdjust; /* add uIDAdjust to the ID */ + + if (miiSrc.wID > uIDAdjustMax) /* skip ID's higher uIDAdjustMax */ + continue; + + if (uIDMax <= miiSrc.wID) /* remember the highest ID */ + uIDMax = miiSrc.wID + 1; + + bAlreadySeparated = FALSE; + } + +/* TRACE("inserting menu=0x%04x %s id=0x%04x mask=0x%08x smenu=0x%04x\n", hmDst, debugstr_a(miiSrc.dwTypeData), miiSrc.wID, miiSrc.fMask, miiSrc.hSubMenu); +*/ + if (!InsertMenuItemW(hmDst, uInsert, TRUE, &miiSrc)) + { + return(uIDMax); + } + } + + /* Ensure the correct number of separators at the beginning of the + inserted menu items*/ + if (uInsert == 0) + { + if (bAlreadySeparated) + { + DeleteMenu(hmDst, uInsert, MF_BYPOSITION); + } + } + else + { + if (_SHIsMenuSeparator(hmDst, uInsert-1)) + { + if (bAlreadySeparated) + { + DeleteMenu(hmDst, uInsert, MF_BYPOSITION); + } + } + else + { + if ((uFlags & MM_ADDSEPARATOR) && !bAlreadySeparated) + { + /* Add a separator between the menus*/ + InsertMenuW(hmDst, uInsert, MF_BYPOSITION | MF_SEPARATOR, 0, NULL); + } + } + } + return(uIDMax); +} diff --git a/reactos/lib/shell32/shlview.c b/reactos/lib/shell32/shlview.c index e5bac11c710..aa01c94a881 100644 --- a/reactos/lib/shell32/shlview.c +++ b/reactos/lib/shell32/shlview.c @@ -1,2407 +1,2407 @@ -/* - * ShellView - * - * Copyright 1998,1999 - * - * This is the view visualizing the data provied by the shellfolder. - * No direct access to data from pidls should be done from here. - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * FIXME: The order by part of the background context menu should be - * buily according to the columns shown. - * - * FIXME: Load/Save the view state from/into the stream provied by - * the ShellBrowser - * - * FIXME: CheckToolbar: handle the "new folder" and "folder up" button - * - * FIXME: ShellView_FillList: consider sort orders - * - * FIXME: implement the drag and drop in the old (msg-based) way - * - * FIXME: when the ShellView_WndProc gets a WM_NCDESTROY should we do a - * Release() ??? - */ - -#include "config.h" -#include "wine/port.h" - -#include -#include -#include - -#define COBJMACROS -#define NONAMELESSUNION -#define NONAMELESSSTRUCT - -#include "windef.h" -#include "winerror.h" -#include "winbase.h" -#include "winnls.h" -#include "objbase.h" -#include "servprov.h" -#include "shlguid.h" -#include "wingdi.h" -#include "winuser.h" -#include "shlobj.h" -#include "undocshell.h" -#include "shresdef.h" -#include "wine/debug.h" - -#include "docobj.h" -#include "pidl.h" -#include "shell32_main.h" -#include "shellfolder.h" - -WINE_DEFAULT_DEBUG_CHANNEL(shell); - -typedef struct -{ BOOL bIsAscending; - INT nHeaderID; - INT nLastHeaderID; -}LISTVIEW_SORT_INFO, *LPLISTVIEW_SORT_INFO; - -typedef struct -{ - IShellViewVtbl* lpVtbl; - DWORD ref; - IOleCommandTargetVtbl* lpvtblOleCommandTarget; - IDropTargetVtbl* lpvtblDropTarget; - IDropSourceVtbl* lpvtblDropSource; - IViewObjectVtbl* lpvtblViewObject; - IShellFolder* pSFParent; - IShellFolder2* pSF2Parent; - IShellBrowser* pShellBrowser; - ICommDlgBrowser* pCommDlgBrowser; - HWND hWnd; /* SHELLDLL_DefView */ - HWND hWndList; /* ListView control */ - HWND hWndParent; - FOLDERSETTINGS FolderSettings; - HMENU hMenu; - UINT uState; - UINT cidl; - LPITEMIDLIST *apidl; - LISTVIEW_SORT_INFO ListViewSortInfo; - ULONG hNotify; /* change notification handle */ - HANDLE hAccel; -} IShellViewImpl; - -static struct IShellViewVtbl svvt; - -static struct IOleCommandTargetVtbl ctvt; -#define _IOleCommandTarget_Offset ((int)(&(((IShellViewImpl*)0)->lpvtblOleCommandTarget))) -#define _ICOM_THIS_From_IOleCommandTarget(class, name) class* This = (class*)(((char*)name)-_IOleCommandTarget_Offset); - -static struct IDropTargetVtbl dtvt; -#define _IDropTarget_Offset ((int)(&(((IShellViewImpl*)0)->lpvtblDropTarget))) -#define _ICOM_THIS_From_IDropTarget(class, name) class* This = (class*)(((char*)name)-_IDropTarget_Offset); - -static struct IDropSourceVtbl dsvt; -#define _IDropSource_Offset ((int)(&(((IShellViewImpl*)0)->lpvtblDropSource))) -#define _ICOM_THIS_From_IDropSource(class, name) class* This = (class*)(((char*)name)-_IDropSource_Offset); - -static struct IViewObjectVtbl vovt; -#define _IViewObject_Offset ((int)(&(((IShellViewImpl*)0)->lpvtblViewObject))) -#define _ICOM_THIS_From_IViewObject(class, name) class* This = (class*)(((char*)name)-_IViewObject_Offset); - -/* ListView Header ID's */ -#define LISTVIEW_COLUMN_NAME 0 -#define LISTVIEW_COLUMN_SIZE 1 -#define LISTVIEW_COLUMN_TYPE 2 -#define LISTVIEW_COLUMN_TIME 3 -#define LISTVIEW_COLUMN_ATTRIB 4 - -/*menu items */ -#define IDM_VIEW_FILES (FCIDM_SHVIEWFIRST + 0x500) -#define IDM_VIEW_IDW (FCIDM_SHVIEWFIRST + 0x501) -#define IDM_MYFILEITEM (FCIDM_SHVIEWFIRST + 0x502) - -#define ID_LISTVIEW 2000 - -#define SHV_CHANGE_NOTIFY WM_USER + 0x1111 - -/*windowsx.h */ -#define GET_WM_COMMAND_ID(wp, lp) LOWORD(wp) -#define GET_WM_COMMAND_HWND(wp, lp) (HWND)(lp) -#define GET_WM_COMMAND_CMD(wp, lp) HIWORD(wp) - -extern void WINAPI _InsertMenuItem (HMENU hmenu, UINT indexMenu, BOOL fByPosition, - UINT wID, UINT fType, LPSTR dwTypeData, UINT fState); - -/* - Items merged into the toolbar and and the filemenu -*/ -typedef struct -{ int idCommand; - int iImage; - int idButtonString; - int idMenuString; - BYTE bState; - BYTE bStyle; -} MYTOOLINFO, *LPMYTOOLINFO; - -MYTOOLINFO Tools[] = -{ -{ FCIDM_SHVIEW_BIGICON, 0, 0, IDS_VIEW_LARGE, TBSTATE_ENABLED, BTNS_BUTTON }, -{ FCIDM_SHVIEW_SMALLICON, 0, 0, IDS_VIEW_SMALL, TBSTATE_ENABLED, BTNS_BUTTON }, -{ FCIDM_SHVIEW_LISTVIEW, 0, 0, IDS_VIEW_LIST, TBSTATE_ENABLED, BTNS_BUTTON }, -{ FCIDM_SHVIEW_REPORTVIEW, 0, 0, IDS_VIEW_DETAILS, TBSTATE_ENABLED, BTNS_BUTTON }, -{ -1, 0, 0, 0, 0, 0} -}; - -typedef void (CALLBACK *PFNSHGETSETTINGSPROC)(LPSHELLFLAGSTATE lpsfs, DWORD dwMask); - -/********************************************************** - * IShellView_Constructor - */ -IShellView * IShellView_Constructor( IShellFolder * pFolder) -{ IShellViewImpl * sv; - sv=(IShellViewImpl*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IShellViewImpl)); - sv->ref=1; - sv->lpVtbl=&svvt; - sv->lpvtblOleCommandTarget=&ctvt; - sv->lpvtblDropTarget=&dtvt; - sv->lpvtblDropSource=&dsvt; - sv->lpvtblViewObject=&vovt; - - sv->pSFParent = pFolder; - if(pFolder) IShellFolder_AddRef(pFolder); - IShellFolder_QueryInterface(sv->pSFParent, &IID_IShellFolder2, (LPVOID*)&sv->pSF2Parent); - - TRACE("(%p)->(%p)\n",sv, pFolder); - return (IShellView *) sv; -} - -/********************************************************** - * - * ##### helperfunctions for communication with ICommDlgBrowser ##### - */ -static BOOL IsInCommDlg(IShellViewImpl * This) -{ return(This->pCommDlgBrowser != NULL); -} - -static HRESULT IncludeObject(IShellViewImpl * This, LPCITEMIDLIST pidl) -{ - HRESULT ret = S_OK; - - if ( IsInCommDlg(This) ) - { - TRACE("ICommDlgBrowser::IncludeObject pidl=%p\n", pidl); - ret = ICommDlgBrowser_IncludeObject(This->pCommDlgBrowser, (IShellView*)This, pidl); - TRACE("--0x%08lx\n", ret); - } - return ret; -} - -static HRESULT OnDefaultCommand(IShellViewImpl * This) -{ - HRESULT ret = S_FALSE; - - if (IsInCommDlg(This)) - { - TRACE("ICommDlgBrowser::OnDefaultCommand\n"); - ret = ICommDlgBrowser_OnDefaultCommand(This->pCommDlgBrowser, (IShellView*)This); - TRACE("--\n"); - } - return ret; -} - -static HRESULT OnStateChange(IShellViewImpl * This, UINT uFlags) -{ - HRESULT ret = S_FALSE; - - if (IsInCommDlg(This)) - { - TRACE("ICommDlgBrowser::OnStateChange flags=%x\n", uFlags); - ret = ICommDlgBrowser_OnStateChange(This->pCommDlgBrowser, (IShellView*)This, uFlags); - TRACE("--\n"); - } - return ret; -} -/********************************************************** - * set the toolbar of the filedialog buttons - * - * - activates the buttons from the shellbrowser according to - * the view state - */ -static void CheckToolbar(IShellViewImpl * This) -{ - LRESULT result; - - TRACE("\n"); - - if (IsInCommDlg(This)) - { - IShellBrowser_SendControlMsg(This->pShellBrowser, FCW_TOOLBAR, TB_CHECKBUTTON, - FCIDM_TB_SMALLICON, (This->FolderSettings.ViewMode==FVM_LIST)? TRUE : FALSE, &result); - IShellBrowser_SendControlMsg(This->pShellBrowser, FCW_TOOLBAR, TB_CHECKBUTTON, - FCIDM_TB_REPORTVIEW, (This->FolderSettings.ViewMode==FVM_DETAILS)? TRUE : FALSE, &result); - IShellBrowser_SendControlMsg(This->pShellBrowser, FCW_TOOLBAR, TB_ENABLEBUTTON, - FCIDM_TB_SMALLICON, TRUE, &result); - IShellBrowser_SendControlMsg(This->pShellBrowser, FCW_TOOLBAR, TB_ENABLEBUTTON, - FCIDM_TB_REPORTVIEW, TRUE, &result); - } -} - -/********************************************************** - * - * ##### helperfunctions for initializing the view ##### - */ -/********************************************************** - * change the style of the listview control - */ -static void SetStyle(IShellViewImpl * This, DWORD dwAdd, DWORD dwRemove) -{ - DWORD tmpstyle; - - TRACE("(%p)\n", This); - - tmpstyle = GetWindowLongA(This->hWndList, GWL_STYLE); - SetWindowLongA(This->hWndList, GWL_STYLE, dwAdd | (tmpstyle & ~dwRemove)); -} - -/********************************************************** -* ShellView_CreateList() -* -* - creates the list view window -*/ -static BOOL ShellView_CreateList (IShellViewImpl * This) -{ DWORD dwStyle, dwExStyle; - - TRACE("%p\n",This); - - dwStyle = WS_TABSTOP | WS_VISIBLE | WS_CHILDWINDOW | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | - LVS_SHAREIMAGELISTS | LVS_EDITLABELS | LVS_ALIGNLEFT | LVS_AUTOARRANGE; - dwExStyle = WS_EX_CLIENTEDGE; - - switch (This->FolderSettings.ViewMode) - { - case FVM_ICON: dwStyle |= LVS_ICON; break; - case FVM_DETAILS: dwStyle |= LVS_REPORT; break; - case FVM_SMALLICON: dwStyle |= LVS_SMALLICON; break; - case FVM_LIST: dwStyle |= LVS_LIST; break; - default: dwStyle |= LVS_LIST; break; - } - - if (This->FolderSettings.fFlags & FWF_AUTOARRANGE) dwStyle |= LVS_AUTOARRANGE; - if (This->FolderSettings.fFlags & FWF_DESKTOP) - This->FolderSettings.fFlags |= FWF_NOCLIENTEDGE | FWF_NOSCROLL; - if (This->FolderSettings.fFlags & FWF_SINGLESEL) dwStyle |= LVS_SINGLESEL; - if (This->FolderSettings.fFlags & FWF_NOCLIENTEDGE) - dwExStyle &= ~WS_EX_CLIENTEDGE; - - This->hWndList=CreateWindowExA( dwExStyle, - WC_LISTVIEWA, - NULL, - dwStyle, - 0,0,0,0, - This->hWnd, - (HMENU)ID_LISTVIEW, - shell32_hInstance, - NULL); - - if(!This->hWndList) - return FALSE; - - This->ListViewSortInfo.bIsAscending = TRUE; - This->ListViewSortInfo.nHeaderID = -1; - This->ListViewSortInfo.nLastHeaderID = -1; - - if (This->FolderSettings.fFlags & FWF_DESKTOP) { - if (0) /* FIXME: look into registry vale HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ListviewShadow and activate drop shadows */ - ListView_SetTextBkColor(This->hWndList, CLR_NONE); - else - ListView_SetTextBkColor(This->hWndList, GetSysColor(COLOR_DESKTOP)); - - ListView_SetTextColor(This->hWndList, RGB(255,255,255)); - } - - /* UpdateShellSettings(); */ - return TRUE; -} - -/********************************************************** -* ShellView_InitList() -* -* - adds all needed columns to the shellview -*/ -static BOOL ShellView_InitList(IShellViewImpl * This) -{ - LVCOLUMNA lvColumn; - SHELLDETAILS sd; - int i; - char szTemp[50]; - - TRACE("%p\n",This); - - ListView_DeleteAllItems(This->hWndList); - - lvColumn.mask = LVCF_FMT | LVCF_WIDTH | LVCF_TEXT; - lvColumn.pszText = szTemp; - - if (This->pSF2Parent) - { - for (i=0; 1; i++) - { - if (!SUCCEEDED(IShellFolder2_GetDetailsOf(This->pSF2Parent, NULL, i, &sd))) - break; - lvColumn.fmt = sd.fmt; - lvColumn.cx = sd.cxChar*8; /* chars->pixel */ - StrRetToStrNA( szTemp, 50, &sd.str, NULL); - ListView_InsertColumnA(This->hWndList, i, &lvColumn); - } - } - else - { - FIXME("no SF2\n"); - } - - ListView_SetImageList(This->hWndList, ShellSmallIconList, LVSIL_SMALL); - ListView_SetImageList(This->hWndList, ShellBigIconList, LVSIL_NORMAL); - - return TRUE; -} -/********************************************************** -* ShellView_CompareItems() -* -* NOTES -* internal, CALLBACK for DSA_Sort -*/ -static INT CALLBACK ShellView_CompareItems(LPVOID lParam1, LPVOID lParam2, LPARAM lpData) -{ - int ret; - TRACE("pidl1=%p pidl2=%p lpsf=%p\n", lParam1, lParam2, (LPVOID) lpData); - - if(!lpData) return 0; - - ret = (SHORT) SCODE_CODE(IShellFolder_CompareIDs((LPSHELLFOLDER)lpData, 0, (LPITEMIDLIST)lParam1, (LPITEMIDLIST)lParam2)); - TRACE("ret=%i\n",ret); - return ret; -} - -/************************************************************************* - * ShellView_ListViewCompareItems - * - * Compare Function for the Listview (FileOpen Dialog) - * - * PARAMS - * lParam1 [I] the first ItemIdList to compare with - * lParam2 [I] the second ItemIdList to compare with - * lpData [I] The column ID for the header Ctrl to process - * - * RETURNS - * A negative value if the first item should precede the second, - * a positive value if the first item should follow the second, - * or zero if the two items are equivalent - * - * NOTES - * FIXME: function does what ShellView_CompareItems is supposed to do. - * unify it and figure out how to use the undocumented first parameter - * of IShellFolder_CompareIDs to do the job this function does and - * move this code to IShellFolder. - * make LISTVIEW_SORT_INFO obsolete - * the way this function works is only usable if we had only - * filesystemfolders (25/10/99 jsch) - */ -static INT CALLBACK ShellView_ListViewCompareItems(LPVOID lParam1, LPVOID lParam2, LPARAM lpData) -{ - INT nDiff=0; - FILETIME fd1, fd2; - char strName1[MAX_PATH], strName2[MAX_PATH]; - BOOL bIsFolder1, bIsFolder2,bIsBothFolder; - LPITEMIDLIST pItemIdList1 = (LPITEMIDLIST) lParam1; - LPITEMIDLIST pItemIdList2 = (LPITEMIDLIST) lParam2; - LISTVIEW_SORT_INFO *pSortInfo = (LPLISTVIEW_SORT_INFO) lpData; - - - bIsFolder1 = _ILIsFolder(pItemIdList1); - bIsFolder2 = _ILIsFolder(pItemIdList2); - bIsBothFolder = bIsFolder1 && bIsFolder2; - - /* When sorting between a File and a Folder, the Folder gets sorted first */ - if( (bIsFolder1 || bIsFolder2) && !bIsBothFolder) - { - nDiff = bIsFolder1 ? -1 : 1; - } - else - { - /* Sort by Time: Folders or Files can be sorted */ - - if(pSortInfo->nHeaderID == LISTVIEW_COLUMN_TIME) - { - _ILGetFileDateTime(pItemIdList1, &fd1); - _ILGetFileDateTime(pItemIdList2, &fd2); - nDiff = CompareFileTime(&fd2, &fd1); - } - /* Sort by Attribute: Folder or Files can be sorted */ - else if(pSortInfo->nHeaderID == LISTVIEW_COLUMN_ATTRIB) - { - _ILGetFileAttributes(pItemIdList1, strName1, MAX_PATH); - _ILGetFileAttributes(pItemIdList2, strName2, MAX_PATH); - nDiff = strcasecmp(strName1, strName2); - } - /* Sort by FileName: Folder or Files can be sorted */ - else if(pSortInfo->nHeaderID == LISTVIEW_COLUMN_NAME || bIsBothFolder) - { - /* Sort by Text */ - _ILSimpleGetText(pItemIdList1, strName1, MAX_PATH); - _ILSimpleGetText(pItemIdList2, strName2, MAX_PATH); - nDiff = strcasecmp(strName1, strName2); - } - /* Sort by File Size, Only valid for Files */ - else if(pSortInfo->nHeaderID == LISTVIEW_COLUMN_SIZE) - { - nDiff = (INT)(_ILGetFileSize(pItemIdList1, NULL, 0) - _ILGetFileSize(pItemIdList2, NULL, 0)); - } - /* Sort by File Type, Only valid for Files */ - else if(pSortInfo->nHeaderID == LISTVIEW_COLUMN_TYPE) - { - /* Sort by Type */ - _ILGetFileType(pItemIdList1, strName1, MAX_PATH); - _ILGetFileType(pItemIdList2, strName2, MAX_PATH); - nDiff = strcasecmp(strName1, strName2); - } - } - /* If the Date, FileSize, FileType, Attrib was the same, sort by FileName */ - - if(nDiff == 0) - { - _ILSimpleGetText(pItemIdList1, strName1, MAX_PATH); - _ILSimpleGetText(pItemIdList2, strName2, MAX_PATH); - nDiff = strcasecmp(strName1, strName2); - } - - if(!pSortInfo->bIsAscending) - { - nDiff = -nDiff; - } - - return nDiff; - -} - -/********************************************************** -* LV_FindItemByPidl() -*/ -static int LV_FindItemByPidl( - IShellViewImpl * This, - LPCITEMIDLIST pidl) -{ - LVITEMA lvItem; - ZeroMemory(&lvItem, sizeof(LVITEMA)); - lvItem.mask = LVIF_PARAM; - for(lvItem.iItem = 0; ListView_GetItemA(This->hWndList, &lvItem); lvItem.iItem++) - { - LPITEMIDLIST currentpidl = (LPITEMIDLIST) lvItem.lParam; - HRESULT hr = IShellFolder_CompareIDs(This->pSFParent, 0, pidl, currentpidl); - if(SUCCEEDED(hr) && !HRESULT_CODE(hr)) - { - return lvItem.iItem; - } - } - return -1; -} - -/********************************************************** -* LV_AddItem() -*/ -static BOOLEAN LV_AddItem(IShellViewImpl * This, LPCITEMIDLIST pidl) -{ - LVITEMA lvItem; - - TRACE("(%p)(pidl=%p)\n", This, pidl); - - ZeroMemory(&lvItem, sizeof(lvItem)); /* create the listview item*/ - lvItem.mask = LVIF_TEXT | LVIF_IMAGE | LVIF_PARAM; /*set the mask*/ - lvItem.iItem = ListView_GetItemCount(This->hWndList); /*add the item to the end of the list*/ - lvItem.lParam = (LPARAM) ILClone(ILFindLastID(pidl)); /*set the item's data*/ - lvItem.pszText = LPSTR_TEXTCALLBACKA; /*get text on a callback basis*/ - lvItem.iImage = I_IMAGECALLBACK; /*get the image on a callback basis*/ - return (-1==ListView_InsertItemA(This->hWndList, &lvItem))? FALSE: TRUE; -} - -/********************************************************** -* LV_DeleteItem() -*/ -static BOOLEAN LV_DeleteItem(IShellViewImpl * This, LPCITEMIDLIST pidl) -{ - int nIndex; - - TRACE("(%p)(pidl=%p)\n", This, pidl); - - nIndex = LV_FindItemByPidl(This, ILFindLastID(pidl)); - return (-1==ListView_DeleteItem(This->hWndList, nIndex))? FALSE: TRUE; -} - -/********************************************************** -* LV_RenameItem() -*/ -static BOOLEAN LV_RenameItem(IShellViewImpl * This, LPCITEMIDLIST pidlOld, LPCITEMIDLIST pidlNew ) -{ - int nItem; - LVITEMA lvItem; - - TRACE("(%p)(pidlold=%p pidlnew=%p)\n", This, pidlOld, pidlNew); - - nItem = LV_FindItemByPidl(This, ILFindLastID(pidlOld)); - if ( -1 != nItem ) - { - ZeroMemory(&lvItem, sizeof(lvItem)); /* create the listview item*/ - lvItem.mask = LVIF_PARAM; /* only the pidl */ - lvItem.iItem = nItem; - ListView_GetItemA(This->hWndList, &lvItem); - - SHFree((LPITEMIDLIST)lvItem.lParam); - lvItem.mask = LVIF_PARAM; - lvItem.iItem = nItem; - lvItem.lParam = (LPARAM) ILClone(ILFindLastID(pidlNew)); /* set the item's data */ - ListView_SetItemA(This->hWndList, &lvItem); - ListView_Update(This->hWndList, nItem); - return TRUE; /* FIXME: better handling */ - } - return FALSE; -} -/********************************************************** -* ShellView_FillList() -* -* - gets the objectlist from the shellfolder -* - sorts the list -* - fills the list into the view -*/ - -static INT CALLBACK fill_list( LPVOID ptr, LPVOID arg ) -{ - LPITEMIDLIST pidl = ptr; - IShellViewImpl *This = arg; - /* in a commdlg This works as a filemask*/ - if ( IncludeObject(This, pidl)==S_OK ) LV_AddItem(This, pidl); - SHFree(pidl); - return TRUE; -} - -static HRESULT ShellView_FillList(IShellViewImpl * This) -{ - LPENUMIDLIST pEnumIDList; - LPITEMIDLIST pidl; - DWORD dwFetched; - HRESULT hRes; - HDPA hdpa; - - TRACE("%p\n",This); - - /* get the itemlist from the shfolder*/ - hRes = IShellFolder_EnumObjects(This->pSFParent,This->hWnd, SHCONTF_NONFOLDERS | SHCONTF_FOLDERS, &pEnumIDList); - if (hRes != S_OK) - { - if (hRes==S_FALSE) - return(NOERROR); - return(hRes); - } - - /* create a pointer array */ - hdpa = DPA_Create(16); - if (!hdpa) - { - return(E_OUTOFMEMORY); - } - - /* copy the items into the array*/ - while((S_OK == IEnumIDList_Next(pEnumIDList,1, &pidl, &dwFetched)) && dwFetched) - { - if (DPA_InsertPtr(hdpa, 0x7fff, pidl) == -1) - { - SHFree(pidl); - } - } - - /* sort the array */ - DPA_Sort(hdpa, ShellView_CompareItems, (LPARAM)This->pSFParent); - - /*turn the listview's redrawing off*/ - SendMessageA(This->hWndList, WM_SETREDRAW, FALSE, 0); - - DPA_DestroyCallback( hdpa, fill_list, This ); - - /*turn the listview's redrawing back on and force it to draw*/ - SendMessageA(This->hWndList, WM_SETREDRAW, TRUE, 0); - - IEnumIDList_Release(pEnumIDList); /* destroy the list*/ - - return S_OK; -} - -/********************************************************** -* ShellView_OnCreate() -*/ -static LRESULT ShellView_OnCreate(IShellViewImpl * This) -{ - IDropTarget* pdt; - SHChangeNotifyEntry ntreg; - IPersistFolder2 * ppf2 = NULL; - - TRACE("%p\n",This); - - if(ShellView_CreateList(This)) - { - if(ShellView_InitList(This)) - { - ShellView_FillList(This); - } - } - - if (SUCCEEDED(IShellFolder_CreateViewObject(This->pSFParent, This->hWnd, &IID_IDropTarget, (LPVOID*)&pdt))) - { - RegisterDragDrop(This->hWnd, pdt); - IDropTarget_Release(pdt); - } - - /* register for receiving notifications */ - IShellFolder_QueryInterface(This->pSFParent, &IID_IPersistFolder2, (LPVOID*)&ppf2); - if (ppf2) - { - IPersistFolder2_GetCurFolder(ppf2, (LPITEMIDLIST*)&ntreg.pidl); - ntreg.fRecursive = TRUE; - This->hNotify = SHChangeNotifyRegister(This->hWnd, SHCNF_IDLIST, SHCNE_ALLEVENTS, SHV_CHANGE_NOTIFY, 1, &ntreg); - SHFree((LPITEMIDLIST)ntreg.pidl); - IPersistFolder2_Release(ppf2); - } - - This->hAccel = LoadAcceleratorsA(shell32_hInstance, "shv_accel"); - - return S_OK; -} - -/********************************************************** - * #### Handling of the menus #### - */ - -/********************************************************** -* ShellView_BuildFileMenu() -*/ -static HMENU ShellView_BuildFileMenu(IShellViewImpl * This) -{ CHAR szText[MAX_PATH]; - MENUITEMINFOA mii; - int nTools,i; - HMENU hSubMenu; - - TRACE("(%p)\n",This); - - hSubMenu = CreatePopupMenu(); - if(hSubMenu) - { /*get the number of items in our global array*/ - for(nTools = 0; Tools[nTools].idCommand != -1; nTools++){} - - /*add the menu items*/ - for(i = 0; i < nTools; i++) - { - LoadStringA(shell32_hInstance, Tools[i].idMenuString, szText, MAX_PATH); - - ZeroMemory(&mii, sizeof(mii)); - mii.cbSize = sizeof(mii); - mii.fMask = MIIM_TYPE | MIIM_ID | MIIM_STATE; - - if(BTNS_SEP != Tools[i].bStyle) /* no separator*/ - { - mii.fType = MFT_STRING; - mii.fState = MFS_ENABLED; - mii.dwTypeData = szText; - mii.wID = Tools[i].idCommand; - } - else - { - mii.fType = MFT_SEPARATOR; - } - /* tack This item onto the end of the menu */ - InsertMenuItemA(hSubMenu, (UINT)-1, TRUE, &mii); - } - } - TRACE("-- return (menu=%p)\n",hSubMenu); - return hSubMenu; -} -/********************************************************** -* ShellView_MergeFileMenu() -*/ -static void ShellView_MergeFileMenu(IShellViewImpl * This, HMENU hSubMenu) -{ TRACE("(%p)->(submenu=%p) stub\n",This,hSubMenu); - - if(hSubMenu) - { /*insert This item at the beginning of the menu */ - _InsertMenuItem(hSubMenu, 0, TRUE, 0, MFT_SEPARATOR, NULL, MFS_ENABLED); - _InsertMenuItem(hSubMenu, 0, TRUE, IDM_MYFILEITEM, MFT_STRING, "dummy45", MFS_ENABLED); - - } - TRACE("--\n"); -} - -/********************************************************** -* ShellView_MergeViewMenu() -*/ - -static void ShellView_MergeViewMenu(IShellViewImpl * This, HMENU hSubMenu) -{ MENUITEMINFOA mii; - - TRACE("(%p)->(submenu=%p)\n",This,hSubMenu); - - if(hSubMenu) - { /*add a separator at the correct position in the menu*/ - _InsertMenuItem(hSubMenu, FCIDM_MENU_VIEW_SEP_OPTIONS, FALSE, 0, MFT_SEPARATOR, NULL, MFS_ENABLED); - - ZeroMemory(&mii, sizeof(mii)); - mii.cbSize = sizeof(mii); - mii.fMask = MIIM_SUBMENU | MIIM_TYPE | MIIM_DATA; - mii.fType = MFT_STRING; - mii.dwTypeData = "View"; - mii.hSubMenu = LoadMenuA(shell32_hInstance, "MENU_001"); - InsertMenuItemA(hSubMenu, FCIDM_MENU_VIEW_SEP_OPTIONS, FALSE, &mii); - } -} - -/********************************************************** -* ShellView_GetSelections() -* -* - fills the this->apidl list with the selected objects -* -* RETURNS -* number of selected items -*/ -static UINT ShellView_GetSelections(IShellViewImpl * This) -{ - LVITEMA lvItem; - UINT i = 0; - - if (This->apidl) - { - SHFree(This->apidl); - } - - This->cidl = ListView_GetSelectedCount(This->hWndList); - This->apidl = (LPITEMIDLIST*)SHAlloc(This->cidl * sizeof(LPITEMIDLIST)); - - TRACE("selected=%i\n", This->cidl); - - if(This->apidl) - { - TRACE("-- Items selected =%u\n", This->cidl); - - ZeroMemory(&lvItem, sizeof(lvItem)); - lvItem.mask = LVIF_STATE | LVIF_PARAM; - lvItem.stateMask = LVIS_SELECTED; - - while(ListView_GetItemA(This->hWndList, &lvItem) && (i < This->cidl)) - { - if(lvItem.state & LVIS_SELECTED) - { - This->apidl[i] = (LPITEMIDLIST)lvItem.lParam; - i++; - TRACE("-- selected Item found\n"); - } - lvItem.iItem++; - } - } - return This->cidl; - -} - -/********************************************************** - * ShellView_OpenSelectedItems() - */ -static HRESULT ShellView_OpenSelectedItems(IShellViewImpl * This) -{ - static UINT CF_IDLIST = 0; - HRESULT hr; - IDataObject* selection; - FORMATETC fetc; - STGMEDIUM stgm; - LPIDA pIDList; - LPCITEMIDLIST parent_pidl; - int i; - - if (0 == ShellView_GetSelections(This)) - { - return S_OK; - } - hr = IShellFolder_GetUIObjectOf(This->pSFParent, This->hWnd, This->cidl, - (LPCITEMIDLIST*)This->apidl, &IID_IDataObject, - 0, (LPVOID *)&selection); - if (FAILED(hr)) - return hr; - - if (0 == CF_IDLIST) - { - CF_IDLIST = RegisterClipboardFormatA(CFSTR_SHELLIDLIST); - } - fetc.cfFormat = CF_IDLIST; - fetc.ptd = NULL; - fetc.dwAspect = DVASPECT_CONTENT; - fetc.lindex = -1; - fetc.tymed = TYMED_HGLOBAL; - - hr = IDataObject_QueryGetData(selection, &fetc); - if (FAILED(hr)) - return hr; - - hr = IDataObject_GetData(selection, &fetc, &stgm); - if (FAILED(hr)) - return hr; - - pIDList = GlobalLock(stgm.u.hGlobal); - - parent_pidl = (LPCITEMIDLIST) ((LPBYTE)pIDList+pIDList->aoffset[0]); - for (i = pIDList->cidl; i > 0; --i) - { - LPCITEMIDLIST pidl; - SFGAOF attribs; - - pidl = (LPCITEMIDLIST)((LPBYTE)pIDList+pIDList->aoffset[i]); - - attribs = SFGAO_FOLDER; - hr = IShellFolder_GetAttributesOf(This->pSFParent, 1, &pidl, &attribs); - - if (SUCCEEDED(hr) && ! (attribs & SFGAO_FOLDER)) - { - SHELLEXECUTEINFOA shexinfo; - - shexinfo.cbSize = sizeof(SHELLEXECUTEINFOA); - shexinfo.fMask = SEE_MASK_INVOKEIDLIST; /* SEE_MASK_IDLIST is also possible. */ - shexinfo.hwnd = NULL; - shexinfo.lpVerb = NULL; - shexinfo.lpFile = NULL; - shexinfo.lpParameters = NULL; - shexinfo.lpDirectory = NULL; - shexinfo.nShow = SW_NORMAL; - shexinfo.lpIDList = ILCombine(parent_pidl, pidl); - - ShellExecuteExA(&shexinfo); /* Discard error/success info */ - - ILFree((LPITEMIDLIST)shexinfo.lpIDList); - } - } - - GlobalUnlock(stgm.u.hGlobal); - ReleaseStgMedium(&stgm); - - IDataObject_Release(selection); - - return S_OK; -} - -/********************************************************** - * ShellView_DoContextMenu() - */ -static void ShellView_DoContextMenu(IShellViewImpl * This, WORD x, WORD y, BOOL bDefault) -{ UINT uCommand; - DWORD wFlags; - HMENU hMenu; - BOOL fExplore = FALSE; - HWND hwndTree = 0; - LPCONTEXTMENU pContextMenu = NULL; - IContextMenu2 *pCM = NULL; - CMINVOKECOMMANDINFO cmi; - - TRACE("(%p)->(0x%08x 0x%08x 0x%08x) stub\n",This, x, y, bDefault); - - /* look, what's selected and create a context menu object of it*/ - if( ShellView_GetSelections(This) ) - { - IShellFolder_GetUIObjectOf( This->pSFParent, This->hWndParent, This->cidl, (LPCITEMIDLIST*)This->apidl, - (REFIID)&IID_IContextMenu, NULL, (LPVOID *)&pContextMenu); - - if(pContextMenu) - { - TRACE("-- pContextMenu\n"); - hMenu = CreatePopupMenu(); - - if( hMenu ) - { - /* See if we are in Explore or Open mode. If the browser's tree is present, we are in Explore mode.*/ - if(SUCCEEDED(IShellBrowser_GetControlWindow(This->pShellBrowser,FCW_TREE, &hwndTree)) && hwndTree) - { - TRACE("-- explore mode\n"); - fExplore = TRUE; - } - - /* build the flags depending on what we can do with the selected item */ - wFlags = CMF_NORMAL | (This->cidl != 1 ? 0 : CMF_CANRENAME) | (fExplore ? CMF_EXPLORE : 0); - - /* let the ContextMenu merge its items in */ - if (SUCCEEDED(IContextMenu_QueryContextMenu( pContextMenu, hMenu, 0, FCIDM_SHVIEWFIRST, FCIDM_SHVIEWLAST, wFlags ))) - { - if (This->FolderSettings.fFlags & FWF_DESKTOP) - SetMenuDefaultItem(hMenu, FCIDM_SHVIEW_OPEN, MF_BYCOMMAND); - - if( bDefault ) - { - TRACE("-- get menu default command\n"); - uCommand = GetMenuDefaultItem(hMenu, FALSE, GMDI_GOINTOPOPUPS); - } - else - { - TRACE("-- track popup\n"); - uCommand = TrackPopupMenu( hMenu,TPM_LEFTALIGN | TPM_RETURNCMD,x,y,0,This->hWnd,NULL); - } - - if(uCommand > 0) - { - TRACE("-- uCommand=%u\n", uCommand); - if (uCommand==FCIDM_SHVIEW_OPEN && IsInCommDlg(This)) - { - TRACE("-- dlg: OnDefaultCommand\n"); - if (FAILED(OnDefaultCommand(This))) - { - ShellView_OpenSelectedItems(This); - } - } - else - { - TRACE("-- explore -- invoke command\n"); - ZeroMemory(&cmi, sizeof(cmi)); - cmi.cbSize = sizeof(cmi); - cmi.hwnd = This->hWndParent; /* this window has to answer CWM_GETISHELLBROWSER */ - cmi.lpVerb = (LPCSTR)MAKEINTRESOURCEA(uCommand); - IContextMenu_InvokeCommand(pContextMenu, &cmi); - } - } - DestroyMenu(hMenu); - } - } - if (pContextMenu) - IContextMenu_Release(pContextMenu); - } - } - else /* background context menu */ - { - hMenu = CreatePopupMenu(); - - pCM = ISvBgCm_Constructor(This->pSFParent); - IContextMenu2_QueryContextMenu(pCM, hMenu, 0, FCIDM_SHVIEWFIRST, FCIDM_SHVIEWLAST, 0); - - uCommand = TrackPopupMenu( hMenu, TPM_LEFTALIGN | TPM_RETURNCMD,x,y,0,This->hWnd,NULL); - DestroyMenu(hMenu); - - TRACE("-- (%p)->(uCommand=0x%08x )\n",This, uCommand); - - ZeroMemory(&cmi, sizeof(cmi)); - cmi.cbSize = sizeof(cmi); - cmi.lpVerb = (LPCSTR)MAKEINTRESOURCEA(uCommand); - cmi.hwnd = This->hWndParent; - IContextMenu2_InvokeCommand(pCM, &cmi); - - IContextMenu2_Release(pCM); - } -} - -/********************************************************** - * ##### message handling ##### - */ - -/********************************************************** -* ShellView_OnSize() -*/ -static LRESULT ShellView_OnSize(IShellViewImpl * This, WORD wWidth, WORD wHeight) -{ - TRACE("%p width=%u height=%u\n",This, wWidth,wHeight); - - /*resize the ListView to fit our window*/ - if(This->hWndList) - { - MoveWindow(This->hWndList, 0, 0, wWidth, wHeight, TRUE); - } - - return S_OK; -} -/********************************************************** -* ShellView_OnDeactivate() -* -* NOTES -* internal -*/ -static void ShellView_OnDeactivate(IShellViewImpl * This) -{ - TRACE("%p\n",This); - - if(This->uState != SVUIA_DEACTIVATE) - { - if(This->hMenu) - { - IShellBrowser_SetMenuSB(This->pShellBrowser,0, 0, 0); - IShellBrowser_RemoveMenusSB(This->pShellBrowser,This->hMenu); - DestroyMenu(This->hMenu); - This->hMenu = 0; - } - - This->uState = SVUIA_DEACTIVATE; - } -} - -/********************************************************** -* ShellView_OnActivate() -*/ -static LRESULT ShellView_OnActivate(IShellViewImpl * This, UINT uState) -{ OLEMENUGROUPWIDTHS omw = { {0, 0, 0, 0, 0, 0} }; - MENUITEMINFOA mii; - CHAR szText[MAX_PATH]; - - TRACE("%p uState=%x\n",This,uState); - - /*don't do anything if the state isn't really changing */ - if(This->uState == uState) - { - return S_OK; - } - - ShellView_OnDeactivate(This); - - /*only do This if we are active */ - if(uState != SVUIA_DEACTIVATE) - { - /*merge the menus */ - This->hMenu = CreateMenu(); - - if(This->hMenu) - { - IShellBrowser_InsertMenusSB(This->pShellBrowser, This->hMenu, &omw); - TRACE("-- after fnInsertMenusSB\n"); - - /*build the top level menu get the menu item's text*/ - strcpy(szText,"dummy 31"); - - ZeroMemory(&mii, sizeof(mii)); - mii.cbSize = sizeof(mii); - mii.fMask = MIIM_SUBMENU | MIIM_TYPE | MIIM_STATE; - mii.fType = MFT_STRING; - mii.fState = MFS_ENABLED; - mii.dwTypeData = szText; - mii.hSubMenu = ShellView_BuildFileMenu(This); - - /*insert our menu into the menu bar*/ - if(mii.hSubMenu) - { - InsertMenuItemA(This->hMenu, FCIDM_MENU_HELP, FALSE, &mii); - } - - /*get the view menu so we can merge with it*/ - ZeroMemory(&mii, sizeof(mii)); - mii.cbSize = sizeof(mii); - mii.fMask = MIIM_SUBMENU; - - if(GetMenuItemInfoA(This->hMenu, FCIDM_MENU_VIEW, FALSE, &mii)) - { - ShellView_MergeViewMenu(This, mii.hSubMenu); - } - - /*add the items that should only be added if we have the focus*/ - if(SVUIA_ACTIVATE_FOCUS == uState) - { - /*get the file menu so we can merge with it */ - ZeroMemory(&mii, sizeof(mii)); - mii.cbSize = sizeof(mii); - mii.fMask = MIIM_SUBMENU; - - if(GetMenuItemInfoA(This->hMenu, FCIDM_MENU_FILE, FALSE, &mii)) - { - ShellView_MergeFileMenu(This, mii.hSubMenu); - } - } - TRACE("-- before fnSetMenuSB\n"); - IShellBrowser_SetMenuSB(This->pShellBrowser, This->hMenu, 0, This->hWnd); - } - } - This->uState = uState; - TRACE("--\n"); - return S_OK; -} - -/********************************************************** -* ShellView_OnSetFocus() -* -*/ -static LRESULT ShellView_OnSetFocus(IShellViewImpl * This) -{ - TRACE("%p\n",This); - - /* Tell the browser one of our windows has received the focus. This - should always be done before merging menus (OnActivate merges the - menus) if one of our windows has the focus.*/ - - IShellBrowser_OnViewWindowActive(This->pShellBrowser,(IShellView*) This); - ShellView_OnActivate(This, SVUIA_ACTIVATE_FOCUS); - - /* Set the focus to the listview */ - SetFocus(This->hWndList); - - /* Notify the ICommDlgBrowser interface */ - OnStateChange(This,CDBOSC_SETFOCUS); - - return 0; -} - -/********************************************************** -* ShellView_OnKillFocus() -*/ -static LRESULT ShellView_OnKillFocus(IShellViewImpl * This) -{ - TRACE("(%p) stub\n",This); - - ShellView_OnActivate(This, SVUIA_ACTIVATE_NOFOCUS); - /* Notify the ICommDlgBrowser */ - OnStateChange(This,CDBOSC_KILLFOCUS); - - return 0; -} - -/********************************************************** -* ShellView_OnCommand() -* -* NOTES -* the CmdID's are the ones from the context menu -*/ -static LRESULT ShellView_OnCommand(IShellViewImpl * This,DWORD dwCmdID, DWORD dwCmd, HWND hwndCmd) -{ - TRACE("(%p)->(0x%08lx 0x%08lx %p) stub\n",This, dwCmdID, dwCmd, hwndCmd); - - switch(dwCmdID) - { - case FCIDM_SHVIEW_SMALLICON: - This->FolderSettings.ViewMode = FVM_SMALLICON; - SetStyle (This, LVS_SMALLICON, LVS_TYPEMASK); - CheckToolbar(This); - break; - - case FCIDM_SHVIEW_BIGICON: - This->FolderSettings.ViewMode = FVM_ICON; - SetStyle (This, LVS_ICON, LVS_TYPEMASK); - CheckToolbar(This); - break; - - case FCIDM_SHVIEW_LISTVIEW: - This->FolderSettings.ViewMode = FVM_LIST; - SetStyle (This, LVS_LIST, LVS_TYPEMASK); - CheckToolbar(This); - break; - - case FCIDM_SHVIEW_REPORTVIEW: - This->FolderSettings.ViewMode = FVM_DETAILS; - SetStyle (This, LVS_REPORT, LVS_TYPEMASK); - CheckToolbar(This); - break; - - /* the menu-ID's for sorting are 0x30... see shrec.rc */ - case 0x30: - case 0x31: - case 0x32: - case 0x33: - This->ListViewSortInfo.nHeaderID = (LPARAM) (dwCmdID - 0x30); - This->ListViewSortInfo.bIsAscending = TRUE; - This->ListViewSortInfo.nLastHeaderID = This->ListViewSortInfo.nHeaderID; - ListView_SortItems(This->hWndList, ShellView_ListViewCompareItems, (LPARAM) (&(This->ListViewSortInfo))); - break; - - default: - TRACE("-- COMMAND 0x%04lx unhandled\n", dwCmdID); - } - return 0; -} - -/********************************************************** -* ShellView_OnNotify() -*/ - -static LRESULT ShellView_OnNotify(IShellViewImpl * This, UINT CtlID, LPNMHDR lpnmh) -{ LPNMLISTVIEW lpnmlv = (LPNMLISTVIEW)lpnmh; - NMLVDISPINFOA *lpdi = (NMLVDISPINFOA *)lpnmh; - LPITEMIDLIST pidl; - - TRACE("%p CtlID=%u lpnmh->code=%x\n",This,CtlID,lpnmh->code); - - switch(lpnmh->code) - { - case NM_SETFOCUS: - TRACE("-- NM_SETFOCUS %p\n",This); - ShellView_OnSetFocus(This); - break; - - case NM_KILLFOCUS: - TRACE("-- NM_KILLFOCUS %p\n",This); - ShellView_OnDeactivate(This); - /* Notify the ICommDlgBrowser interface */ - OnStateChange(This,CDBOSC_KILLFOCUS); - break; - - case NM_CUSTOMDRAW: - TRACE("-- NM_CUSTOMDRAW %p\n",This); - return CDRF_DODEFAULT; - - case NM_RELEASEDCAPTURE: - TRACE("-- NM_RELEASEDCAPTURE %p\n",This); - break; - - case NM_CLICK: - TRACE("-- NM_CLICK %p\n",This); - break; - - case NM_RCLICK: - TRACE("-- NM_RCLICK %p\n",This); - break; - - case HDN_ENDTRACKA: - TRACE("-- HDN_ENDTRACKA %p\n",This); - /*nColumn1 = ListView_GetColumnWidth(This->hWndList, 0); - nColumn2 = ListView_GetColumnWidth(This->hWndList, 1);*/ - break; - - case LVN_DELETEITEM: - TRACE("-- LVN_DELETEITEM %p\n",This); - SHFree((LPITEMIDLIST)lpnmlv->lParam); /*delete the pidl because we made a copy of it*/ - break; - - case LVN_DELETEALLITEMS: - TRACE("-- LVN_DELETEALLITEMS %p\n",This); - return FALSE; - - case LVN_INSERTITEM: - TRACE("-- LVN_INSERTITEM (STUB)%p\n",This); - break; - - case LVN_ITEMACTIVATE: - TRACE("-- LVN_ITEMACTIVATE %p\n",This); - OnStateChange(This, CDBOSC_SELCHANGE); /* the browser will get the IDataObject now */ - ShellView_DoContextMenu(This, 0, 0, TRUE); - break; - - case LVN_COLUMNCLICK: - This->ListViewSortInfo.nHeaderID = lpnmlv->iSubItem; - if(This->ListViewSortInfo.nLastHeaderID == This->ListViewSortInfo.nHeaderID) - { - This->ListViewSortInfo.bIsAscending = !This->ListViewSortInfo.bIsAscending; - } - else - { - This->ListViewSortInfo.bIsAscending = TRUE; - } - This->ListViewSortInfo.nLastHeaderID = This->ListViewSortInfo.nHeaderID; - - ListView_SortItems(lpnmlv->hdr.hwndFrom, ShellView_ListViewCompareItems, (LPARAM) (&(This->ListViewSortInfo))); - break; - - case LVN_GETDISPINFOA: - case LVN_GETDISPINFOW: - TRACE("-- LVN_GETDISPINFO %p\n",This); - pidl = (LPITEMIDLIST)lpdi->item.lParam; - - if(lpdi->item.mask & LVIF_TEXT) /* text requested */ - { - if (This->pSF2Parent) - { - SHELLDETAILS sd; - IShellFolder2_GetDetailsOf(This->pSF2Parent, pidl, lpdi->item.iSubItem, &sd); - if (lpnmh->code == LVN_GETDISPINFOA) - { - StrRetToStrNA( lpdi->item.pszText, lpdi->item.cchTextMax, &sd.str, NULL); - TRACE("-- text=%s\n",lpdi->item.pszText); - } - else /* LVN_GETDISPINFOW */ - { - StrRetToStrNW( ((NMLVDISPINFOW *)lpdi)->item.pszText, lpdi->item.cchTextMax, &sd.str, NULL); - TRACE("-- text=%s\n",debugstr_w((WCHAR*)(lpdi->item.pszText))); - } - } - else - { - FIXME("no SF2\n"); - } - } - if(lpdi->item.mask & LVIF_IMAGE) /* image requested */ - { - lpdi->item.iImage = SHMapPIDLToSystemImageListIndex(This->pSFParent, pidl, 0); - } - break; - - case LVN_ITEMCHANGED: - TRACE("-- LVN_ITEMCHANGED %p\n",This); - OnStateChange(This, CDBOSC_SELCHANGE); /* the browser will get the IDataObject now */ - break; - - case LVN_BEGINDRAG: - case LVN_BEGINRDRAG: - TRACE("-- LVN_BEGINDRAG\n"); - - if (ShellView_GetSelections(This)) - { - IDataObject * pda; - DWORD dwAttributes = SFGAO_CANLINK; - DWORD dwEffect = DROPEFFECT_COPY | DROPEFFECT_MOVE; - - if (SUCCEEDED(IShellFolder_GetUIObjectOf(This->pSFParent, This->hWnd, This->cidl, (LPCITEMIDLIST*)This->apidl, &IID_IDataObject,0,(LPVOID *)&pda))) - { - IDropSource * pds = (IDropSource*)&(This->lpvtblDropSource); /* own DropSource interface */ - - if (SUCCEEDED(IShellFolder_GetAttributesOf(This->pSFParent, This->cidl, (LPCITEMIDLIST*)This->apidl, &dwAttributes))) - { - if (dwAttributes & SFGAO_CANLINK) - { - dwEffect |= DROPEFFECT_LINK; - } - } - - if (pds) - { - DWORD dwEffect; - DoDragDrop(pda, pds, dwEffect, &dwEffect); - } - IDataObject_Release(pda); - } - } - break; - - case LVN_BEGINLABELEDITA: - { - DWORD dwAttr = SFGAO_CANRENAME; - pidl = (LPITEMIDLIST)lpdi->item.lParam; - - TRACE("-- LVN_BEGINLABELEDITA %p\n",This); - - IShellFolder_GetAttributesOf(This->pSFParent, 1, (LPCITEMIDLIST*)&pidl, &dwAttr); - if (SFGAO_CANRENAME & dwAttr) - { - return FALSE; - } - return TRUE; - } - - case LVN_ENDLABELEDITA: - { - TRACE("-- LVN_ENDLABELEDITA %p\n",This); - if (lpdi->item.pszText) - { - HRESULT hr; - WCHAR wszNewName[MAX_PATH]; - LVITEMA lvItem; - - ZeroMemory(&lvItem, sizeof(LVITEMA)); - lvItem.iItem = lpdi->item.iItem; - lvItem.mask = LVIF_PARAM; - ListView_GetItemA(This->hWndList, &lvItem); - - pidl = (LPITEMIDLIST)lpdi->item.lParam; - if (!MultiByteToWideChar( CP_ACP, 0, lpdi->item.pszText, -1, wszNewName, MAX_PATH )) - wszNewName[MAX_PATH-1] = 0; - hr = IShellFolder_SetNameOf(This->pSFParent, 0, pidl, wszNewName, SHGDN_INFOLDER, &pidl); - - if(SUCCEEDED(hr) && pidl) - { - lvItem.mask = LVIF_PARAM; - lvItem.lParam = (LPARAM)pidl; - ListView_SetItemA(This->hWndList, &lvItem); - return TRUE; - } - } - return FALSE; - } - - case LVN_KEYDOWN: - { - /* MSG msg; - msg.hwnd = This->hWnd; - msg.message = WM_KEYDOWN; - msg.wParam = plvKeyDown->wVKey; - msg.lParam = 0; - msg.time = 0; - msg.pt = 0;*/ - - LPNMLVKEYDOWN plvKeyDown = (LPNMLVKEYDOWN) lpnmh; - - /* initiate a rename of the selected file or directory */ - if(plvKeyDown->wVKey == VK_F2) - { - /* see how many files are selected */ - int i = ListView_GetSelectedCount(This->hWndList); - - /* get selected item */ - if(i == 1) - { - /* get selected item */ - i = ListView_GetNextItem(This->hWndList, -1, - LVNI_SELECTED); - - ListView_EnsureVisible(This->hWndList, i, 0); - ListView_EditLabelA(This->hWndList, i); - } - } -#if 0 - TranslateAccelerator(This->hWnd, This->hAccel, &msg) -#endif - else if(plvKeyDown->wVKey == VK_DELETE) - { - UINT i; - int item_index; - LVITEMA item; - LPITEMIDLIST* pItems; - ISFHelper *psfhlp; - - IShellFolder_QueryInterface(This->pSFParent, &IID_ISFHelper, - (LPVOID*)&psfhlp); - - if (psfhlp == NULL) - break; - - if(!(i = ListView_GetSelectedCount(This->hWndList))) - break; - - /* allocate memory for the pidl array */ - pItems = HeapAlloc(GetProcessHeap(), 0, - sizeof(LPITEMIDLIST) * i); - - /* retrieve all selected items */ - i = 0; - item_index = -1; - while(ListView_GetSelectedCount(This->hWndList) > i) - { - /* get selected item */ - item_index = ListView_GetNextItem(This->hWndList, - item_index, LVNI_SELECTED); - item.iItem = item_index; - item.mask |= LVIF_PARAM; - ListView_GetItemA(This->hWndList, &item); - - /* get item pidl */ - pItems[i] = (LPITEMIDLIST)item.lParam; - - i++; - } - - /* perform the item deletion */ - ISFHelper_DeleteItems(psfhlp, i, (LPCITEMIDLIST*)pItems); - - /* free pidl array memory */ - HeapFree(GetProcessHeap(), 0, pItems); - } - else - FIXME("LVN_KEYDOWN key=0x%08x\n",plvKeyDown->wVKey); - } - break; - - default: - TRACE("-- %p WM_COMMAND %x unhandled\n", This, lpnmh->code); - break; - } - return 0; -} - -/********************************************************** -* ShellView_OnChange() -*/ - -static LRESULT ShellView_OnChange(IShellViewImpl * This, LPITEMIDLIST * Pidls, LONG wEventId) -{ - - TRACE("(%p)(%p,%p,0x%08lx)\n", This, Pidls[0], Pidls[1], wEventId); - switch(wEventId) - { - case SHCNE_MKDIR: - case SHCNE_CREATE: - LV_AddItem(This, Pidls[0]); - break; - case SHCNE_RMDIR: - case SHCNE_DELETE: - LV_DeleteItem(This, Pidls[0]); - break; - case SHCNE_RENAMEFOLDER: - case SHCNE_RENAMEITEM: - LV_RenameItem(This, Pidls[0], Pidls[1]); - break; - case SHCNE_UPDATEITEM: - break; - } - return TRUE; -} -/********************************************************** -* ShellView_WndProc -*/ - -static LRESULT CALLBACK ShellView_WndProc(HWND hWnd, UINT uMessage, WPARAM wParam, LPARAM lParam) -{ - IShellViewImpl * pThis = (IShellViewImpl*)GetWindowLongPtrW(hWnd, GWLP_USERDATA); - LPCREATESTRUCTA lpcs; - - TRACE("(hwnd=%p msg=%x wparm=%x lparm=%lx)\n",hWnd, uMessage, wParam, lParam); - - switch (uMessage) - { - case WM_NCCREATE: - lpcs = (LPCREATESTRUCTA)lParam; - pThis = (IShellViewImpl*)(lpcs->lpCreateParams); - SetWindowLongPtrW(hWnd, GWLP_USERDATA, (ULONG_PTR)pThis); - pThis->hWnd = hWnd; /*set the window handle*/ - break; - - case WM_SIZE: return ShellView_OnSize(pThis,LOWORD(lParam), HIWORD(lParam)); - case WM_SETFOCUS: return ShellView_OnSetFocus(pThis); - case WM_KILLFOCUS: return ShellView_OnKillFocus(pThis); - case WM_CREATE: return ShellView_OnCreate(pThis); - case WM_ACTIVATE: return ShellView_OnActivate(pThis, SVUIA_ACTIVATE_FOCUS); - case WM_NOTIFY: return ShellView_OnNotify(pThis,(UINT)wParam, (LPNMHDR)lParam); - case WM_COMMAND: return ShellView_OnCommand(pThis, - GET_WM_COMMAND_ID(wParam, lParam), - GET_WM_COMMAND_CMD(wParam, lParam), - GET_WM_COMMAND_HWND(wParam, lParam)); - case SHV_CHANGE_NOTIFY: return ShellView_OnChange(pThis, (LPITEMIDLIST*)wParam, (LONG)lParam); - - case WM_CONTEXTMENU: ShellView_DoContextMenu(pThis, LOWORD(lParam), HIWORD(lParam), FALSE); - return 0; - - case WM_SHOWWINDOW: UpdateWindow(pThis->hWndList); - break; - - case WM_GETDLGCODE: return SendMessageA(pThis->hWndList,uMessage,0,0); - - case WM_DESTROY: - RevokeDragDrop(pThis->hWnd); - SHChangeNotifyDeregister(pThis->hNotify); - break; - - case WM_ERASEBKGND: - if ((pThis->FolderSettings.fFlags & FWF_DESKTOP) || - (pThis->FolderSettings.fFlags & FWF_TRANSPARENT)) - return 1; - break; - } - - return DefWindowProcA (hWnd, uMessage, wParam, lParam); -} -/********************************************************** -* -* -* The INTERFACE of the IShellView object -* -* -********************************************************** -* IShellView_QueryInterface -*/ -static HRESULT WINAPI IShellView_fnQueryInterface(IShellView * iface,REFIID riid, LPVOID *ppvObj) -{ - IShellViewImpl *This = (IShellViewImpl *)iface; - - TRACE("(%p)->(\n\tIID:\t%s,%p)\n",This,debugstr_guid(riid),ppvObj); - - *ppvObj = NULL; - - if(IsEqualIID(riid, &IID_IUnknown)) - { - *ppvObj = This; - } - else if(IsEqualIID(riid, &IID_IShellView)) - { - *ppvObj = (IShellView*)This; - } - else if(IsEqualIID(riid, &IID_IOleCommandTarget)) - { - *ppvObj = (IOleCommandTarget*)&(This->lpvtblOleCommandTarget); - } - else if(IsEqualIID(riid, &IID_IDropTarget)) - { - *ppvObj = (IDropTarget*)&(This->lpvtblDropTarget); - } - else if(IsEqualIID(riid, &IID_IDropSource)) - { - *ppvObj = (IDropSource*)&(This->lpvtblDropSource); - } - else if(IsEqualIID(riid, &IID_IViewObject)) - { - *ppvObj = (IViewObject*)&(This->lpvtblViewObject); - } - - if(*ppvObj) - { - IUnknown_AddRef( (IUnknown*)*ppvObj ); - TRACE("-- Interface: (%p)->(%p)\n",ppvObj,*ppvObj); - return S_OK; - } - TRACE("-- Interface: E_NOINTERFACE\n"); - return E_NOINTERFACE; -} - -/********************************************************** -* IShellView_AddRef -*/ -static ULONG WINAPI IShellView_fnAddRef(IShellView * iface) -{ - IShellViewImpl *This = (IShellViewImpl *)iface; - - TRACE("(%p)->(count=%lu)\n",This,This->ref); - - return ++(This->ref); -} -/********************************************************** -* IShellView_Release -*/ -static ULONG WINAPI IShellView_fnRelease(IShellView * iface) -{ - IShellViewImpl *This = (IShellViewImpl *)iface; - - TRACE("(%p)->()\n",This); - - if (!--(This->ref)) - { - TRACE(" destroying IShellView(%p)\n",This); - - DestroyWindow(This->hWndList); - - if(This->pSFParent) - IShellFolder_Release(This->pSFParent); - - if(This->pSF2Parent) - IShellFolder2_Release(This->pSF2Parent); - - if (This->apidl) - SHFree(This->apidl); - - HeapFree(GetProcessHeap(),0,This); - return 0; - } - return This->ref; -} - -/********************************************************** -* ShellView_GetWindow -*/ -static HRESULT WINAPI IShellView_fnGetWindow(IShellView * iface,HWND * phWnd) -{ - IShellViewImpl *This = (IShellViewImpl *)iface; - - TRACE("(%p)\n",This); - - *phWnd = This->hWnd; - - return S_OK; -} - -static HRESULT WINAPI IShellView_fnContextSensitiveHelp(IShellView * iface,BOOL fEnterMode) -{ - IShellViewImpl *This = (IShellViewImpl *)iface; - - FIXME("(%p) stub\n",This); - - return E_NOTIMPL; -} - -/********************************************************** -* IShellView_TranslateAccelerator -* -* FIXME: -* use the accel functions -*/ -static HRESULT WINAPI IShellView_fnTranslateAccelerator(IShellView * iface,LPMSG lpmsg) -{ -#if 0 - IShellViewImpl *This = (IShellViewImpl *)iface; - - FIXME("(%p)->(%p: hwnd=%x msg=%x lp=%lx wp=%x) stub\n",This,lpmsg, lpmsg->hwnd, lpmsg->message, lpmsg->lParam, lpmsg->wParam); -#endif - - if ((lpmsg->message>=WM_KEYFIRST) && (lpmsg->message>=WM_KEYLAST)) - { - TRACE("-- key=0x04%x\n",lpmsg->wParam) ; - } - return S_FALSE; /* not handled */ -} - -static HRESULT WINAPI IShellView_fnEnableModeless(IShellView * iface,BOOL fEnable) -{ - IShellViewImpl *This = (IShellViewImpl *)iface; - - FIXME("(%p) stub\n",This); - - return E_NOTIMPL; -} - -static HRESULT WINAPI IShellView_fnUIActivate(IShellView * iface,UINT uState) -{ - IShellViewImpl *This = (IShellViewImpl *)iface; - -/* - CHAR szName[MAX_PATH]; -*/ - LRESULT lResult; - int nPartArray[1] = {-1}; - - TRACE("(%p)->(state=%x) stub\n",This, uState); - - /*don't do anything if the state isn't really changing*/ - if(This->uState == uState) - { - return S_OK; - } - - /*OnActivate handles the menu merging and internal state*/ - ShellView_OnActivate(This, uState); - - /*only do This if we are active*/ - if(uState != SVUIA_DEACTIVATE) - { - -/* - GetFolderPath is not a method of IShellFolder - IShellFolder_GetFolderPath( This->pSFParent, szName, sizeof(szName) ); -*/ - /* set the number of parts */ - IShellBrowser_SendControlMsg(This->pShellBrowser, FCW_STATUS, SB_SETPARTS, 1, - (LPARAM)nPartArray, &lResult); - - /* set the text for the parts */ -/* - IShellBrowser_SendControlMsg(This->pShellBrowser, FCW_STATUS, SB_SETTEXTA, - 0, (LPARAM)szName, &lResult); -*/ - } - - return S_OK; -} - -static HRESULT WINAPI IShellView_fnRefresh(IShellView * iface) -{ - IShellViewImpl *This = (IShellViewImpl *)iface; - - TRACE("(%p)\n",This); - - ListView_DeleteAllItems(This->hWndList); - ShellView_FillList(This); - - return S_OK; -} - -static HRESULT WINAPI IShellView_fnCreateViewWindow( - IShellView * iface, - IShellView *lpPrevView, - LPCFOLDERSETTINGS lpfs, - IShellBrowser * psb, - RECT * prcView, - HWND *phWnd) -{ - IShellViewImpl *This = (IShellViewImpl *)iface; - - WNDCLASSA wc; - *phWnd = 0; - - - TRACE("(%p)->(shlview=%p set=%p shlbrs=%p rec=%p hwnd=%p) incomplete\n",This, lpPrevView,lpfs, psb, prcView, phWnd); - TRACE("-- vmode=%x flags=%x left=%li top=%li right=%li bottom=%li\n",lpfs->ViewMode, lpfs->fFlags ,prcView->left,prcView->top, prcView->right, prcView->bottom); - - /*set up the member variables*/ - This->pShellBrowser = psb; - This->FolderSettings = *lpfs; - - /*get our parent window*/ - IShellBrowser_AddRef(This->pShellBrowser); - IShellBrowser_GetWindow(This->pShellBrowser, &(This->hWndParent)); - - /* try to get the ICommDlgBrowserInterface, adds a reference !!! */ - This->pCommDlgBrowser=NULL; - if ( SUCCEEDED (IShellBrowser_QueryInterface( This->pShellBrowser, - (REFIID)&IID_ICommDlgBrowser, (LPVOID*) &This->pCommDlgBrowser))) - { - TRACE("-- CommDlgBrowser\n"); - } - - /*if our window class has not been registered, then do so*/ - if(!GetClassInfoA(shell32_hInstance, SV_CLASS_NAME, &wc)) - { - ZeroMemory(&wc, sizeof(wc)); - wc.style = CS_HREDRAW | CS_VREDRAW; - wc.lpfnWndProc = ShellView_WndProc; - wc.cbClsExtra = 0; - wc.cbWndExtra = 0; - wc.hInstance = shell32_hInstance; - wc.hIcon = 0; - wc.hCursor = LoadCursorA (0, (LPSTR)IDC_ARROW); - wc.hbrBackground = (HBRUSH) (COLOR_WINDOW + 1); - wc.lpszMenuName = NULL; - wc.lpszClassName = SV_CLASS_NAME; - - if(!RegisterClassA(&wc)) - return E_FAIL; - } - - *phWnd = CreateWindowExA(0, - SV_CLASS_NAME, - NULL, - WS_CHILD | WS_VISIBLE | WS_TABSTOP, - prcView->left, - prcView->top, - prcView->right - prcView->left, - prcView->bottom - prcView->top, - This->hWndParent, - 0, - shell32_hInstance, - (LPVOID)This); - - CheckToolbar(This); - - if(!*phWnd) return E_FAIL; - - return S_OK; -} - -static HRESULT WINAPI IShellView_fnDestroyViewWindow(IShellView * iface) -{ - IShellViewImpl *This = (IShellViewImpl *)iface; - - TRACE("(%p)\n",This); - - /*Make absolutely sure all our UI is cleaned up.*/ - IShellView_UIActivate((IShellView*)This, SVUIA_DEACTIVATE); - - if(This->hMenu) - { - DestroyMenu(This->hMenu); - } - - DestroyWindow(This->hWnd); - if(This->pShellBrowser) IShellBrowser_Release(This->pShellBrowser); - if(This->pCommDlgBrowser) ICommDlgBrowser_Release(This->pCommDlgBrowser); - - - return S_OK; -} - -static HRESULT WINAPI IShellView_fnGetCurrentInfo(IShellView * iface, LPFOLDERSETTINGS lpfs) -{ - IShellViewImpl *This = (IShellViewImpl *)iface; - - TRACE("(%p)->(%p) vmode=%x flags=%x\n",This, lpfs, - This->FolderSettings.ViewMode, This->FolderSettings.fFlags); - - if (!lpfs) return E_INVALIDARG; - - *lpfs = This->FolderSettings; - return NOERROR; -} - -static HRESULT WINAPI IShellView_fnAddPropertySheetPages(IShellView * iface, DWORD dwReserved,LPFNADDPROPSHEETPAGE lpfn, LPARAM lparam) -{ - IShellViewImpl *This = (IShellViewImpl *)iface; - - FIXME("(%p) stub\n",This); - - return E_NOTIMPL; -} - -static HRESULT WINAPI IShellView_fnSaveViewState(IShellView * iface) -{ - IShellViewImpl *This = (IShellViewImpl *)iface; - - FIXME("(%p) stub\n",This); - - return S_OK; -} - -static HRESULT WINAPI IShellView_fnSelectItem( - IShellView * iface, - LPCITEMIDLIST pidl, - UINT uFlags) -{ - IShellViewImpl *This = (IShellViewImpl *)iface; - int i; - - TRACE("(%p)->(pidl=%p, 0x%08x) stub\n",This, pidl, uFlags); - - i = LV_FindItemByPidl(This, pidl); - - if (i != -1) - { - LVITEMA lvItem; - - if(uFlags & SVSI_ENSUREVISIBLE) - ListView_EnsureVisible(This->hWndList, i, 0); - - ZeroMemory(&lvItem, sizeof(LVITEMA)); - lvItem.mask = LVIF_STATE; - lvItem.iItem = 0; - - while(ListView_GetItemA(This->hWndList, &lvItem)) - { - if (lvItem.iItem == i) - { - if (uFlags & SVSI_SELECT) - lvItem.state |= LVIS_SELECTED; - else - lvItem.state &= ~LVIS_SELECTED; - - if(uFlags & SVSI_FOCUSED) - lvItem.state &= ~LVIS_FOCUSED; - } - else - { - if (uFlags & SVSI_DESELECTOTHERS) - lvItem.state &= ~LVIS_SELECTED; - } - ListView_SetItemA(This->hWndList, &lvItem); - lvItem.iItem++; - } - - - if(uFlags & SVSI_EDIT) - ListView_EditLabelA(This->hWndList, i); - - } - return S_OK; -} - -static HRESULT WINAPI IShellView_fnGetItemObject(IShellView * iface, UINT uItem, REFIID riid, LPVOID *ppvOut) -{ - IShellViewImpl *This = (IShellViewImpl *)iface; - - TRACE("(%p)->(uItem=0x%08x,\n\tIID=%s, ppv=%p)\n",This, uItem, debugstr_guid(riid), ppvOut); - - *ppvOut = NULL; - - switch(uItem) - { - case SVGIO_BACKGROUND: - *ppvOut = ISvBgCm_Constructor(This->pSFParent); - break; - - case SVGIO_SELECTION: - ShellView_GetSelections(This); - IShellFolder_GetUIObjectOf(This->pSFParent, This->hWnd, This->cidl, (LPCITEMIDLIST*)This->apidl, riid, 0, ppvOut); - break; - } - TRACE("-- (%p)->(interface=%p)\n",This, *ppvOut); - - if(!*ppvOut) return E_OUTOFMEMORY; - - return S_OK; -} - -static struct IShellViewVtbl svvt = -{ - IShellView_fnQueryInterface, - IShellView_fnAddRef, - IShellView_fnRelease, - IShellView_fnGetWindow, - IShellView_fnContextSensitiveHelp, - IShellView_fnTranslateAccelerator, - IShellView_fnEnableModeless, - IShellView_fnUIActivate, - IShellView_fnRefresh, - IShellView_fnCreateViewWindow, - IShellView_fnDestroyViewWindow, - IShellView_fnGetCurrentInfo, - IShellView_fnAddPropertySheetPages, - IShellView_fnSaveViewState, - IShellView_fnSelectItem, - IShellView_fnGetItemObject -}; - - -/********************************************************** - * ISVOleCmdTarget_QueryInterface (IUnknown) - */ -static HRESULT WINAPI ISVOleCmdTarget_QueryInterface( - IOleCommandTarget * iface, - REFIID iid, - LPVOID* ppvObj) -{ - _ICOM_THIS_From_IOleCommandTarget(IShellViewImpl, iface); - - return IShellFolder_QueryInterface((IShellFolder*)This, iid, ppvObj); -} - -/********************************************************** - * ISVOleCmdTarget_AddRef (IUnknown) - */ -static ULONG WINAPI ISVOleCmdTarget_AddRef( - IOleCommandTarget * iface) -{ - _ICOM_THIS_From_IOleCommandTarget(IShellFolder, iface); - - return IShellFolder_AddRef((IShellFolder*)This); -} - -/********************************************************** - * ISVOleCmdTarget_Release (IUnknown) - */ -static ULONG WINAPI ISVOleCmdTarget_Release( - IOleCommandTarget * iface) -{ - _ICOM_THIS_From_IOleCommandTarget(IShellViewImpl, iface); - - return IShellFolder_Release((IShellFolder*)This); -} - -/********************************************************** - * ISVOleCmdTarget_QueryStatus (IOleCommandTarget) - */ -static HRESULT WINAPI ISVOleCmdTarget_QueryStatus( - IOleCommandTarget *iface, - const GUID* pguidCmdGroup, - ULONG cCmds, - OLECMD * prgCmds, - OLECMDTEXT* pCmdText) -{ - UINT i; - _ICOM_THIS_From_IOleCommandTarget(IShellViewImpl, iface); - - FIXME("(%p)->(%p(%s) 0x%08lx %p %p\n", - This, pguidCmdGroup, debugstr_guid(pguidCmdGroup), cCmds, prgCmds, pCmdText); - - if (!prgCmds) - return E_POINTER; - for (i = 0; i < cCmds; i++) - { - FIXME("\tprgCmds[%d].cmdID = %ld\n", i, prgCmds[i].cmdID); - prgCmds[i].cmdf = 0; - } - return OLECMDERR_E_UNKNOWNGROUP; -} - -/********************************************************** - * ISVOleCmdTarget_Exec (IOleCommandTarget) - * - * nCmdID is the OLECMDID_* enumeration - */ -static HRESULT WINAPI ISVOleCmdTarget_Exec( - IOleCommandTarget *iface, - const GUID* pguidCmdGroup, - DWORD nCmdID, - DWORD nCmdexecopt, - VARIANT* pvaIn, - VARIANT* pvaOut) -{ - _ICOM_THIS_From_IOleCommandTarget(IShellViewImpl, iface); - - FIXME("(%p)->(\n\tTarget GUID:%s Command:0x%08lx Opt:0x%08lx %p %p)\n", - This, debugstr_guid(pguidCmdGroup), nCmdID, nCmdexecopt, pvaIn, pvaOut); - - if (IsEqualIID(pguidCmdGroup, &CGID_Explorer) && - (nCmdID == 0x29) && - (nCmdexecopt == 4) && pvaOut) - return S_OK; - if (IsEqualIID(pguidCmdGroup, &CGID_ShellDocView) && - (nCmdID == 9) && - (nCmdexecopt == 0)) - return 1; - - return OLECMDERR_E_UNKNOWNGROUP; -} - -static IOleCommandTargetVtbl ctvt = -{ - ISVOleCmdTarget_QueryInterface, - ISVOleCmdTarget_AddRef, - ISVOleCmdTarget_Release, - ISVOleCmdTarget_QueryStatus, - ISVOleCmdTarget_Exec -}; - -/********************************************************** - * ISVDropTarget implementation - */ - -static HRESULT WINAPI ISVDropTarget_QueryInterface( - IDropTarget *iface, - REFIID riid, - LPVOID *ppvObj) -{ - _ICOM_THIS_From_IDropTarget(IShellViewImpl, iface); - - TRACE("(%p)->(\n\tIID:\t%s,%p)\n",This,debugstr_guid(riid),ppvObj); - - return IShellFolder_QueryInterface((IShellFolder*)This, riid, ppvObj); -} - -static ULONG WINAPI ISVDropTarget_AddRef( IDropTarget *iface) -{ - _ICOM_THIS_From_IDropTarget(IShellViewImpl, iface); - - TRACE("(%p)->(count=%lu)\n",This,This->ref); - - return IShellFolder_AddRef((IShellFolder*)This); -} - -static ULONG WINAPI ISVDropTarget_Release( IDropTarget *iface) -{ - _ICOM_THIS_From_IDropTarget(IShellViewImpl, iface); - - TRACE("(%p)->(count=%lu)\n",This,This->ref); - - return IShellFolder_Release((IShellFolder*)This); -} - -static HRESULT WINAPI ISVDropTarget_DragEnter( - IDropTarget *iface, - IDataObject *pDataObject, - DWORD grfKeyState, - POINTL pt, - DWORD *pdwEffect) -{ - - _ICOM_THIS_From_IDropTarget(IShellViewImpl, iface); - - FIXME("Stub: This=%p, DataObject=%p\n",This,pDataObject); - - return E_NOTIMPL; -} - -static HRESULT WINAPI ISVDropTarget_DragOver( - IDropTarget *iface, - DWORD grfKeyState, - POINTL pt, - DWORD *pdwEffect) -{ - _ICOM_THIS_From_IDropTarget(IShellViewImpl, iface); - - FIXME("Stub: This=%p\n",This); - - return E_NOTIMPL; -} - -static HRESULT WINAPI ISVDropTarget_DragLeave( - IDropTarget *iface) -{ - _ICOM_THIS_From_IDropTarget(IShellViewImpl, iface); - - FIXME("Stub: This=%p\n",This); - - return E_NOTIMPL; -} - -static HRESULT WINAPI ISVDropTarget_Drop( - IDropTarget *iface, - IDataObject* pDataObject, - DWORD grfKeyState, - POINTL pt, - DWORD *pdwEffect) -{ - _ICOM_THIS_From_IDropTarget(IShellViewImpl, iface); - - FIXME("Stub: This=%p\n",This); - - return E_NOTIMPL; -} - -static struct IDropTargetVtbl dtvt = -{ - ISVDropTarget_QueryInterface, - ISVDropTarget_AddRef, - ISVDropTarget_Release, - ISVDropTarget_DragEnter, - ISVDropTarget_DragOver, - ISVDropTarget_DragLeave, - ISVDropTarget_Drop -}; - -/********************************************************** - * ISVDropSource implementation - */ - -static HRESULT WINAPI ISVDropSource_QueryInterface( - IDropSource *iface, - REFIID riid, - LPVOID *ppvObj) -{ - _ICOM_THIS_From_IDropSource(IShellViewImpl, iface); - - TRACE("(%p)->(\n\tIID:\t%s,%p)\n",This,debugstr_guid(riid),ppvObj); - - return IShellFolder_QueryInterface((IShellFolder*)This, riid, ppvObj); -} - -static ULONG WINAPI ISVDropSource_AddRef( IDropSource *iface) -{ - _ICOM_THIS_From_IDropSource(IShellViewImpl, iface); - - TRACE("(%p)->(count=%lu)\n",This,This->ref); - - return IShellFolder_AddRef((IShellFolder*)This); -} - -static ULONG WINAPI ISVDropSource_Release( IDropSource *iface) -{ - _ICOM_THIS_From_IDropSource(IShellViewImpl, iface); - - TRACE("(%p)->(count=%lu)\n",This,This->ref); - - return IShellFolder_Release((IShellFolder*)This); -} -static HRESULT WINAPI ISVDropSource_QueryContinueDrag( - IDropSource *iface, - BOOL fEscapePressed, - DWORD grfKeyState) -{ - _ICOM_THIS_From_IDropSource(IShellViewImpl, iface); - TRACE("(%p)\n",This); - - if (fEscapePressed) - return DRAGDROP_S_CANCEL; - else if (!(grfKeyState & MK_LBUTTON) && !(grfKeyState & MK_RBUTTON)) - return DRAGDROP_S_DROP; - else - return NOERROR; -} - -static HRESULT WINAPI ISVDropSource_GiveFeedback( - IDropSource *iface, - DWORD dwEffect) -{ - _ICOM_THIS_From_IDropSource(IShellViewImpl, iface); - TRACE("(%p)\n",This); - - return DRAGDROP_S_USEDEFAULTCURSORS; -} - -static struct IDropSourceVtbl dsvt = -{ - ISVDropSource_QueryInterface, - ISVDropSource_AddRef, - ISVDropSource_Release, - ISVDropSource_QueryContinueDrag, - ISVDropSource_GiveFeedback -}; -/********************************************************** - * ISVViewObject implementation - */ - -static HRESULT WINAPI ISVViewObject_QueryInterface( - IViewObject *iface, - REFIID riid, - LPVOID *ppvObj) -{ - _ICOM_THIS_From_IViewObject(IShellViewImpl, iface); - - TRACE("(%p)->(\n\tIID:\t%s,%p)\n",This,debugstr_guid(riid),ppvObj); - - return IShellFolder_QueryInterface((IShellFolder*)This, riid, ppvObj); -} - -static ULONG WINAPI ISVViewObject_AddRef( IViewObject *iface) -{ - _ICOM_THIS_From_IViewObject(IShellViewImpl, iface); - - TRACE("(%p)->(count=%lu)\n",This,This->ref); - - return IShellFolder_AddRef((IShellFolder*)This); -} - -static ULONG WINAPI ISVViewObject_Release( IViewObject *iface) -{ - _ICOM_THIS_From_IViewObject(IShellViewImpl, iface); - - TRACE("(%p)->(count=%lu)\n",This,This->ref); - - return IShellFolder_Release((IShellFolder*)This); -} - -static HRESULT WINAPI ISVViewObject_Draw( - IViewObject *iface, - DWORD dwDrawAspect, - LONG lindex, - void* pvAspect, - DVTARGETDEVICE* ptd, - HDC hdcTargetDev, - HDC hdcDraw, - LPCRECTL lprcBounds, - LPCRECTL lprcWBounds, - BOOL (CALLBACK *pfnContinue)(ULONG_PTR dwContinue), - ULONG_PTR dwContinue) -{ - - _ICOM_THIS_From_IViewObject(IShellViewImpl, iface); - - FIXME("Stub: This=%p\n",This); - - return E_NOTIMPL; -} -static HRESULT WINAPI ISVViewObject_GetColorSet( - IViewObject *iface, - DWORD dwDrawAspect, - LONG lindex, - void *pvAspect, - DVTARGETDEVICE* ptd, - HDC hicTargetDevice, - LOGPALETTE** ppColorSet) -{ - - _ICOM_THIS_From_IViewObject(IShellViewImpl, iface); - - FIXME("Stub: This=%p\n",This); - - return E_NOTIMPL; -} -static HRESULT WINAPI ISVViewObject_Freeze( - IViewObject *iface, - DWORD dwDrawAspect, - LONG lindex, - void* pvAspect, - DWORD* pdwFreeze) -{ - - _ICOM_THIS_From_IViewObject(IShellViewImpl, iface); - - FIXME("Stub: This=%p\n",This); - - return E_NOTIMPL; -} -static HRESULT WINAPI ISVViewObject_Unfreeze( - IViewObject *iface, - DWORD dwFreeze) -{ - - _ICOM_THIS_From_IViewObject(IShellViewImpl, iface); - - FIXME("Stub: This=%p\n",This); - - return E_NOTIMPL; -} -static HRESULT WINAPI ISVViewObject_SetAdvise( - IViewObject *iface, - DWORD aspects, - DWORD advf, - IAdviseSink* pAdvSink) -{ - - _ICOM_THIS_From_IViewObject(IShellViewImpl, iface); - - FIXME("Stub: This=%p\n",This); - - return E_NOTIMPL; -} -static HRESULT WINAPI ISVViewObject_GetAdvise( - IViewObject *iface, - DWORD* pAspects, - DWORD* pAdvf, - IAdviseSink** ppAdvSink) -{ - - _ICOM_THIS_From_IViewObject(IShellViewImpl, iface); - - FIXME("Stub: This=%p\n",This); - - return E_NOTIMPL; -} - - -static struct IViewObjectVtbl vovt = -{ - ISVViewObject_QueryInterface, - ISVViewObject_AddRef, - ISVViewObject_Release, - ISVViewObject_Draw, - ISVViewObject_GetColorSet, - ISVViewObject_Freeze, - ISVViewObject_Unfreeze, - ISVViewObject_SetAdvise, - ISVViewObject_GetAdvise -}; +/* + * ShellView + * + * Copyright 1998,1999 + * + * This is the view visualizing the data provied by the shellfolder. + * No direct access to data from pidls should be done from here. + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * FIXME: The order by part of the background context menu should be + * buily according to the columns shown. + * + * FIXME: Load/Save the view state from/into the stream provied by + * the ShellBrowser + * + * FIXME: CheckToolbar: handle the "new folder" and "folder up" button + * + * FIXME: ShellView_FillList: consider sort orders + * + * FIXME: implement the drag and drop in the old (msg-based) way + * + * FIXME: when the ShellView_WndProc gets a WM_NCDESTROY should we do a + * Release() ??? + */ + +#include "config.h" +#include "wine/port.h" + +#include +#include +#include + +#define COBJMACROS +#define NONAMELESSUNION +#define NONAMELESSSTRUCT + +#include "windef.h" +#include "winerror.h" +#include "winbase.h" +#include "winnls.h" +#include "objbase.h" +#include "servprov.h" +#include "shlguid.h" +#include "wingdi.h" +#include "winuser.h" +#include "shlobj.h" +#include "undocshell.h" +#include "shresdef.h" +#include "wine/debug.h" + +#include "docobj.h" +#include "pidl.h" +#include "shell32_main.h" +#include "shellfolder.h" + +WINE_DEFAULT_DEBUG_CHANNEL(shell); + +typedef struct +{ BOOL bIsAscending; + INT nHeaderID; + INT nLastHeaderID; +}LISTVIEW_SORT_INFO, *LPLISTVIEW_SORT_INFO; + +typedef struct +{ + IShellViewVtbl* lpVtbl; + DWORD ref; + IOleCommandTargetVtbl* lpvtblOleCommandTarget; + IDropTargetVtbl* lpvtblDropTarget; + IDropSourceVtbl* lpvtblDropSource; + IViewObjectVtbl* lpvtblViewObject; + IShellFolder* pSFParent; + IShellFolder2* pSF2Parent; + IShellBrowser* pShellBrowser; + ICommDlgBrowser* pCommDlgBrowser; + HWND hWnd; /* SHELLDLL_DefView */ + HWND hWndList; /* ListView control */ + HWND hWndParent; + FOLDERSETTINGS FolderSettings; + HMENU hMenu; + UINT uState; + UINT cidl; + LPITEMIDLIST *apidl; + LISTVIEW_SORT_INFO ListViewSortInfo; + ULONG hNotify; /* change notification handle */ + HANDLE hAccel; +} IShellViewImpl; + +static struct IShellViewVtbl svvt; + +static struct IOleCommandTargetVtbl ctvt; +#define _IOleCommandTarget_Offset ((int)(&(((IShellViewImpl*)0)->lpvtblOleCommandTarget))) +#define _ICOM_THIS_From_IOleCommandTarget(class, name) class* This = (class*)(((char*)name)-_IOleCommandTarget_Offset); + +static struct IDropTargetVtbl dtvt; +#define _IDropTarget_Offset ((int)(&(((IShellViewImpl*)0)->lpvtblDropTarget))) +#define _ICOM_THIS_From_IDropTarget(class, name) class* This = (class*)(((char*)name)-_IDropTarget_Offset); + +static struct IDropSourceVtbl dsvt; +#define _IDropSource_Offset ((int)(&(((IShellViewImpl*)0)->lpvtblDropSource))) +#define _ICOM_THIS_From_IDropSource(class, name) class* This = (class*)(((char*)name)-_IDropSource_Offset); + +static struct IViewObjectVtbl vovt; +#define _IViewObject_Offset ((int)(&(((IShellViewImpl*)0)->lpvtblViewObject))) +#define _ICOM_THIS_From_IViewObject(class, name) class* This = (class*)(((char*)name)-_IViewObject_Offset); + +/* ListView Header ID's */ +#define LISTVIEW_COLUMN_NAME 0 +#define LISTVIEW_COLUMN_SIZE 1 +#define LISTVIEW_COLUMN_TYPE 2 +#define LISTVIEW_COLUMN_TIME 3 +#define LISTVIEW_COLUMN_ATTRIB 4 + +/*menu items */ +#define IDM_VIEW_FILES (FCIDM_SHVIEWFIRST + 0x500) +#define IDM_VIEW_IDW (FCIDM_SHVIEWFIRST + 0x501) +#define IDM_MYFILEITEM (FCIDM_SHVIEWFIRST + 0x502) + +#define ID_LISTVIEW 2000 + +#define SHV_CHANGE_NOTIFY WM_USER + 0x1111 + +/*windowsx.h */ +#define GET_WM_COMMAND_ID(wp, lp) LOWORD(wp) +#define GET_WM_COMMAND_HWND(wp, lp) (HWND)(lp) +#define GET_WM_COMMAND_CMD(wp, lp) HIWORD(wp) + +extern void WINAPI _InsertMenuItem (HMENU hmenu, UINT indexMenu, BOOL fByPosition, + UINT wID, UINT fType, LPSTR dwTypeData, UINT fState); + +/* + Items merged into the toolbar and and the filemenu +*/ +typedef struct +{ int idCommand; + int iImage; + int idButtonString; + int idMenuString; + BYTE bState; + BYTE bStyle; +} MYTOOLINFO, *LPMYTOOLINFO; + +MYTOOLINFO Tools[] = +{ +{ FCIDM_SHVIEW_BIGICON, 0, 0, IDS_VIEW_LARGE, TBSTATE_ENABLED, BTNS_BUTTON }, +{ FCIDM_SHVIEW_SMALLICON, 0, 0, IDS_VIEW_SMALL, TBSTATE_ENABLED, BTNS_BUTTON }, +{ FCIDM_SHVIEW_LISTVIEW, 0, 0, IDS_VIEW_LIST, TBSTATE_ENABLED, BTNS_BUTTON }, +{ FCIDM_SHVIEW_REPORTVIEW, 0, 0, IDS_VIEW_DETAILS, TBSTATE_ENABLED, BTNS_BUTTON }, +{ -1, 0, 0, 0, 0, 0} +}; + +typedef void (CALLBACK *PFNSHGETSETTINGSPROC)(LPSHELLFLAGSTATE lpsfs, DWORD dwMask); + +/********************************************************** + * IShellView_Constructor + */ +IShellView * IShellView_Constructor( IShellFolder * pFolder) +{ IShellViewImpl * sv; + sv=(IShellViewImpl*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IShellViewImpl)); + sv->ref=1; + sv->lpVtbl=&svvt; + sv->lpvtblOleCommandTarget=&ctvt; + sv->lpvtblDropTarget=&dtvt; + sv->lpvtblDropSource=&dsvt; + sv->lpvtblViewObject=&vovt; + + sv->pSFParent = pFolder; + if(pFolder) IShellFolder_AddRef(pFolder); + IShellFolder_QueryInterface(sv->pSFParent, &IID_IShellFolder2, (LPVOID*)&sv->pSF2Parent); + + TRACE("(%p)->(%p)\n",sv, pFolder); + return (IShellView *) sv; +} + +/********************************************************** + * + * ##### helperfunctions for communication with ICommDlgBrowser ##### + */ +static BOOL IsInCommDlg(IShellViewImpl * This) +{ return(This->pCommDlgBrowser != NULL); +} + +static HRESULT IncludeObject(IShellViewImpl * This, LPCITEMIDLIST pidl) +{ + HRESULT ret = S_OK; + + if ( IsInCommDlg(This) ) + { + TRACE("ICommDlgBrowser::IncludeObject pidl=%p\n", pidl); + ret = ICommDlgBrowser_IncludeObject(This->pCommDlgBrowser, (IShellView*)This, pidl); + TRACE("--0x%08lx\n", ret); + } + return ret; +} + +static HRESULT OnDefaultCommand(IShellViewImpl * This) +{ + HRESULT ret = S_FALSE; + + if (IsInCommDlg(This)) + { + TRACE("ICommDlgBrowser::OnDefaultCommand\n"); + ret = ICommDlgBrowser_OnDefaultCommand(This->pCommDlgBrowser, (IShellView*)This); + TRACE("--\n"); + } + return ret; +} + +static HRESULT OnStateChange(IShellViewImpl * This, UINT uFlags) +{ + HRESULT ret = S_FALSE; + + if (IsInCommDlg(This)) + { + TRACE("ICommDlgBrowser::OnStateChange flags=%x\n", uFlags); + ret = ICommDlgBrowser_OnStateChange(This->pCommDlgBrowser, (IShellView*)This, uFlags); + TRACE("--\n"); + } + return ret; +} +/********************************************************** + * set the toolbar of the filedialog buttons + * + * - activates the buttons from the shellbrowser according to + * the view state + */ +static void CheckToolbar(IShellViewImpl * This) +{ + LRESULT result; + + TRACE("\n"); + + if (IsInCommDlg(This)) + { + IShellBrowser_SendControlMsg(This->pShellBrowser, FCW_TOOLBAR, TB_CHECKBUTTON, + FCIDM_TB_SMALLICON, (This->FolderSettings.ViewMode==FVM_LIST)? TRUE : FALSE, &result); + IShellBrowser_SendControlMsg(This->pShellBrowser, FCW_TOOLBAR, TB_CHECKBUTTON, + FCIDM_TB_REPORTVIEW, (This->FolderSettings.ViewMode==FVM_DETAILS)? TRUE : FALSE, &result); + IShellBrowser_SendControlMsg(This->pShellBrowser, FCW_TOOLBAR, TB_ENABLEBUTTON, + FCIDM_TB_SMALLICON, TRUE, &result); + IShellBrowser_SendControlMsg(This->pShellBrowser, FCW_TOOLBAR, TB_ENABLEBUTTON, + FCIDM_TB_REPORTVIEW, TRUE, &result); + } +} + +/********************************************************** + * + * ##### helperfunctions for initializing the view ##### + */ +/********************************************************** + * change the style of the listview control + */ +static void SetStyle(IShellViewImpl * This, DWORD dwAdd, DWORD dwRemove) +{ + DWORD tmpstyle; + + TRACE("(%p)\n", This); + + tmpstyle = GetWindowLongA(This->hWndList, GWL_STYLE); + SetWindowLongA(This->hWndList, GWL_STYLE, dwAdd | (tmpstyle & ~dwRemove)); +} + +/********************************************************** +* ShellView_CreateList() +* +* - creates the list view window +*/ +static BOOL ShellView_CreateList (IShellViewImpl * This) +{ DWORD dwStyle, dwExStyle; + + TRACE("%p\n",This); + + dwStyle = WS_TABSTOP | WS_VISIBLE | WS_CHILDWINDOW | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | + LVS_SHAREIMAGELISTS | LVS_EDITLABELS | LVS_ALIGNLEFT | LVS_AUTOARRANGE; + dwExStyle = WS_EX_CLIENTEDGE; + + switch (This->FolderSettings.ViewMode) + { + case FVM_ICON: dwStyle |= LVS_ICON; break; + case FVM_DETAILS: dwStyle |= LVS_REPORT; break; + case FVM_SMALLICON: dwStyle |= LVS_SMALLICON; break; + case FVM_LIST: dwStyle |= LVS_LIST; break; + default: dwStyle |= LVS_LIST; break; + } + + if (This->FolderSettings.fFlags & FWF_AUTOARRANGE) dwStyle |= LVS_AUTOARRANGE; + if (This->FolderSettings.fFlags & FWF_DESKTOP) + This->FolderSettings.fFlags |= FWF_NOCLIENTEDGE | FWF_NOSCROLL; + if (This->FolderSettings.fFlags & FWF_SINGLESEL) dwStyle |= LVS_SINGLESEL; + if (This->FolderSettings.fFlags & FWF_NOCLIENTEDGE) + dwExStyle &= ~WS_EX_CLIENTEDGE; + + This->hWndList=CreateWindowExA( dwExStyle, + WC_LISTVIEWA, + NULL, + dwStyle, + 0,0,0,0, + This->hWnd, + (HMENU)ID_LISTVIEW, + shell32_hInstance, + NULL); + + if(!This->hWndList) + return FALSE; + + This->ListViewSortInfo.bIsAscending = TRUE; + This->ListViewSortInfo.nHeaderID = -1; + This->ListViewSortInfo.nLastHeaderID = -1; + + if (This->FolderSettings.fFlags & FWF_DESKTOP) { + if (0) /* FIXME: look into registry vale HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ListviewShadow and activate drop shadows */ + ListView_SetTextBkColor(This->hWndList, CLR_NONE); + else + ListView_SetTextBkColor(This->hWndList, GetSysColor(COLOR_DESKTOP)); + + ListView_SetTextColor(This->hWndList, RGB(255,255,255)); + } + + /* UpdateShellSettings(); */ + return TRUE; +} + +/********************************************************** +* ShellView_InitList() +* +* - adds all needed columns to the shellview +*/ +static BOOL ShellView_InitList(IShellViewImpl * This) +{ + LVCOLUMNA lvColumn; + SHELLDETAILS sd; + int i; + char szTemp[50]; + + TRACE("%p\n",This); + + ListView_DeleteAllItems(This->hWndList); + + lvColumn.mask = LVCF_FMT | LVCF_WIDTH | LVCF_TEXT; + lvColumn.pszText = szTemp; + + if (This->pSF2Parent) + { + for (i=0; 1; i++) + { + if (!SUCCEEDED(IShellFolder2_GetDetailsOf(This->pSF2Parent, NULL, i, &sd))) + break; + lvColumn.fmt = sd.fmt; + lvColumn.cx = sd.cxChar*8; /* chars->pixel */ + StrRetToStrNA( szTemp, 50, &sd.str, NULL); + ListView_InsertColumnA(This->hWndList, i, &lvColumn); + } + } + else + { + FIXME("no SF2\n"); + } + + ListView_SetImageList(This->hWndList, ShellSmallIconList, LVSIL_SMALL); + ListView_SetImageList(This->hWndList, ShellBigIconList, LVSIL_NORMAL); + + return TRUE; +} +/********************************************************** +* ShellView_CompareItems() +* +* NOTES +* internal, CALLBACK for DSA_Sort +*/ +static INT CALLBACK ShellView_CompareItems(LPVOID lParam1, LPVOID lParam2, LPARAM lpData) +{ + int ret; + TRACE("pidl1=%p pidl2=%p lpsf=%p\n", lParam1, lParam2, (LPVOID) lpData); + + if(!lpData) return 0; + + ret = (SHORT) SCODE_CODE(IShellFolder_CompareIDs((LPSHELLFOLDER)lpData, 0, (LPITEMIDLIST)lParam1, (LPITEMIDLIST)lParam2)); + TRACE("ret=%i\n",ret); + return ret; +} + +/************************************************************************* + * ShellView_ListViewCompareItems + * + * Compare Function for the Listview (FileOpen Dialog) + * + * PARAMS + * lParam1 [I] the first ItemIdList to compare with + * lParam2 [I] the second ItemIdList to compare with + * lpData [I] The column ID for the header Ctrl to process + * + * RETURNS + * A negative value if the first item should precede the second, + * a positive value if the first item should follow the second, + * or zero if the two items are equivalent + * + * NOTES + * FIXME: function does what ShellView_CompareItems is supposed to do. + * unify it and figure out how to use the undocumented first parameter + * of IShellFolder_CompareIDs to do the job this function does and + * move this code to IShellFolder. + * make LISTVIEW_SORT_INFO obsolete + * the way this function works is only usable if we had only + * filesystemfolders (25/10/99 jsch) + */ +static INT CALLBACK ShellView_ListViewCompareItems(LPVOID lParam1, LPVOID lParam2, LPARAM lpData) +{ + INT nDiff=0; + FILETIME fd1, fd2; + char strName1[MAX_PATH], strName2[MAX_PATH]; + BOOL bIsFolder1, bIsFolder2,bIsBothFolder; + LPITEMIDLIST pItemIdList1 = (LPITEMIDLIST) lParam1; + LPITEMIDLIST pItemIdList2 = (LPITEMIDLIST) lParam2; + LISTVIEW_SORT_INFO *pSortInfo = (LPLISTVIEW_SORT_INFO) lpData; + + + bIsFolder1 = _ILIsFolder(pItemIdList1); + bIsFolder2 = _ILIsFolder(pItemIdList2); + bIsBothFolder = bIsFolder1 && bIsFolder2; + + /* When sorting between a File and a Folder, the Folder gets sorted first */ + if( (bIsFolder1 || bIsFolder2) && !bIsBothFolder) + { + nDiff = bIsFolder1 ? -1 : 1; + } + else + { + /* Sort by Time: Folders or Files can be sorted */ + + if(pSortInfo->nHeaderID == LISTVIEW_COLUMN_TIME) + { + _ILGetFileDateTime(pItemIdList1, &fd1); + _ILGetFileDateTime(pItemIdList2, &fd2); + nDiff = CompareFileTime(&fd2, &fd1); + } + /* Sort by Attribute: Folder or Files can be sorted */ + else if(pSortInfo->nHeaderID == LISTVIEW_COLUMN_ATTRIB) + { + _ILGetFileAttributes(pItemIdList1, strName1, MAX_PATH); + _ILGetFileAttributes(pItemIdList2, strName2, MAX_PATH); + nDiff = strcasecmp(strName1, strName2); + } + /* Sort by FileName: Folder or Files can be sorted */ + else if(pSortInfo->nHeaderID == LISTVIEW_COLUMN_NAME || bIsBothFolder) + { + /* Sort by Text */ + _ILSimpleGetText(pItemIdList1, strName1, MAX_PATH); + _ILSimpleGetText(pItemIdList2, strName2, MAX_PATH); + nDiff = strcasecmp(strName1, strName2); + } + /* Sort by File Size, Only valid for Files */ + else if(pSortInfo->nHeaderID == LISTVIEW_COLUMN_SIZE) + { + nDiff = (INT)(_ILGetFileSize(pItemIdList1, NULL, 0) - _ILGetFileSize(pItemIdList2, NULL, 0)); + } + /* Sort by File Type, Only valid for Files */ + else if(pSortInfo->nHeaderID == LISTVIEW_COLUMN_TYPE) + { + /* Sort by Type */ + _ILGetFileType(pItemIdList1, strName1, MAX_PATH); + _ILGetFileType(pItemIdList2, strName2, MAX_PATH); + nDiff = strcasecmp(strName1, strName2); + } + } + /* If the Date, FileSize, FileType, Attrib was the same, sort by FileName */ + + if(nDiff == 0) + { + _ILSimpleGetText(pItemIdList1, strName1, MAX_PATH); + _ILSimpleGetText(pItemIdList2, strName2, MAX_PATH); + nDiff = strcasecmp(strName1, strName2); + } + + if(!pSortInfo->bIsAscending) + { + nDiff = -nDiff; + } + + return nDiff; + +} + +/********************************************************** +* LV_FindItemByPidl() +*/ +static int LV_FindItemByPidl( + IShellViewImpl * This, + LPCITEMIDLIST pidl) +{ + LVITEMA lvItem; + ZeroMemory(&lvItem, sizeof(LVITEMA)); + lvItem.mask = LVIF_PARAM; + for(lvItem.iItem = 0; ListView_GetItemA(This->hWndList, &lvItem); lvItem.iItem++) + { + LPITEMIDLIST currentpidl = (LPITEMIDLIST) lvItem.lParam; + HRESULT hr = IShellFolder_CompareIDs(This->pSFParent, 0, pidl, currentpidl); + if(SUCCEEDED(hr) && !HRESULT_CODE(hr)) + { + return lvItem.iItem; + } + } + return -1; +} + +/********************************************************** +* LV_AddItem() +*/ +static BOOLEAN LV_AddItem(IShellViewImpl * This, LPCITEMIDLIST pidl) +{ + LVITEMA lvItem; + + TRACE("(%p)(pidl=%p)\n", This, pidl); + + ZeroMemory(&lvItem, sizeof(lvItem)); /* create the listview item*/ + lvItem.mask = LVIF_TEXT | LVIF_IMAGE | LVIF_PARAM; /*set the mask*/ + lvItem.iItem = ListView_GetItemCount(This->hWndList); /*add the item to the end of the list*/ + lvItem.lParam = (LPARAM) ILClone(ILFindLastID(pidl)); /*set the item's data*/ + lvItem.pszText = LPSTR_TEXTCALLBACKA; /*get text on a callback basis*/ + lvItem.iImage = I_IMAGECALLBACK; /*get the image on a callback basis*/ + return (-1==ListView_InsertItemA(This->hWndList, &lvItem))? FALSE: TRUE; +} + +/********************************************************** +* LV_DeleteItem() +*/ +static BOOLEAN LV_DeleteItem(IShellViewImpl * This, LPCITEMIDLIST pidl) +{ + int nIndex; + + TRACE("(%p)(pidl=%p)\n", This, pidl); + + nIndex = LV_FindItemByPidl(This, ILFindLastID(pidl)); + return (-1==ListView_DeleteItem(This->hWndList, nIndex))? FALSE: TRUE; +} + +/********************************************************** +* LV_RenameItem() +*/ +static BOOLEAN LV_RenameItem(IShellViewImpl * This, LPCITEMIDLIST pidlOld, LPCITEMIDLIST pidlNew ) +{ + int nItem; + LVITEMA lvItem; + + TRACE("(%p)(pidlold=%p pidlnew=%p)\n", This, pidlOld, pidlNew); + + nItem = LV_FindItemByPidl(This, ILFindLastID(pidlOld)); + if ( -1 != nItem ) + { + ZeroMemory(&lvItem, sizeof(lvItem)); /* create the listview item*/ + lvItem.mask = LVIF_PARAM; /* only the pidl */ + lvItem.iItem = nItem; + ListView_GetItemA(This->hWndList, &lvItem); + + SHFree((LPITEMIDLIST)lvItem.lParam); + lvItem.mask = LVIF_PARAM; + lvItem.iItem = nItem; + lvItem.lParam = (LPARAM) ILClone(ILFindLastID(pidlNew)); /* set the item's data */ + ListView_SetItemA(This->hWndList, &lvItem); + ListView_Update(This->hWndList, nItem); + return TRUE; /* FIXME: better handling */ + } + return FALSE; +} +/********************************************************** +* ShellView_FillList() +* +* - gets the objectlist from the shellfolder +* - sorts the list +* - fills the list into the view +*/ + +static INT CALLBACK fill_list( LPVOID ptr, LPVOID arg ) +{ + LPITEMIDLIST pidl = ptr; + IShellViewImpl *This = arg; + /* in a commdlg This works as a filemask*/ + if ( IncludeObject(This, pidl)==S_OK ) LV_AddItem(This, pidl); + SHFree(pidl); + return TRUE; +} + +static HRESULT ShellView_FillList(IShellViewImpl * This) +{ + LPENUMIDLIST pEnumIDList; + LPITEMIDLIST pidl; + DWORD dwFetched; + HRESULT hRes; + HDPA hdpa; + + TRACE("%p\n",This); + + /* get the itemlist from the shfolder*/ + hRes = IShellFolder_EnumObjects(This->pSFParent,This->hWnd, SHCONTF_NONFOLDERS | SHCONTF_FOLDERS, &pEnumIDList); + if (hRes != S_OK) + { + if (hRes==S_FALSE) + return(NOERROR); + return(hRes); + } + + /* create a pointer array */ + hdpa = DPA_Create(16); + if (!hdpa) + { + return(E_OUTOFMEMORY); + } + + /* copy the items into the array*/ + while((S_OK == IEnumIDList_Next(pEnumIDList,1, &pidl, &dwFetched)) && dwFetched) + { + if (DPA_InsertPtr(hdpa, 0x7fff, pidl) == -1) + { + SHFree(pidl); + } + } + + /* sort the array */ + DPA_Sort(hdpa, ShellView_CompareItems, (LPARAM)This->pSFParent); + + /*turn the listview's redrawing off*/ + SendMessageA(This->hWndList, WM_SETREDRAW, FALSE, 0); + + DPA_DestroyCallback( hdpa, fill_list, This ); + + /*turn the listview's redrawing back on and force it to draw*/ + SendMessageA(This->hWndList, WM_SETREDRAW, TRUE, 0); + + IEnumIDList_Release(pEnumIDList); /* destroy the list*/ + + return S_OK; +} + +/********************************************************** +* ShellView_OnCreate() +*/ +static LRESULT ShellView_OnCreate(IShellViewImpl * This) +{ + IDropTarget* pdt; + SHChangeNotifyEntry ntreg; + IPersistFolder2 * ppf2 = NULL; + + TRACE("%p\n",This); + + if(ShellView_CreateList(This)) + { + if(ShellView_InitList(This)) + { + ShellView_FillList(This); + } + } + + if (SUCCEEDED(IShellFolder_CreateViewObject(This->pSFParent, This->hWnd, &IID_IDropTarget, (LPVOID*)&pdt))) + { + RegisterDragDrop(This->hWnd, pdt); + IDropTarget_Release(pdt); + } + + /* register for receiving notifications */ + IShellFolder_QueryInterface(This->pSFParent, &IID_IPersistFolder2, (LPVOID*)&ppf2); + if (ppf2) + { + IPersistFolder2_GetCurFolder(ppf2, (LPITEMIDLIST*)&ntreg.pidl); + ntreg.fRecursive = TRUE; + This->hNotify = SHChangeNotifyRegister(This->hWnd, SHCNF_IDLIST, SHCNE_ALLEVENTS, SHV_CHANGE_NOTIFY, 1, &ntreg); + SHFree((LPITEMIDLIST)ntreg.pidl); + IPersistFolder2_Release(ppf2); + } + + This->hAccel = LoadAcceleratorsA(shell32_hInstance, "shv_accel"); + + return S_OK; +} + +/********************************************************** + * #### Handling of the menus #### + */ + +/********************************************************** +* ShellView_BuildFileMenu() +*/ +static HMENU ShellView_BuildFileMenu(IShellViewImpl * This) +{ CHAR szText[MAX_PATH]; + MENUITEMINFOA mii; + int nTools,i; + HMENU hSubMenu; + + TRACE("(%p)\n",This); + + hSubMenu = CreatePopupMenu(); + if(hSubMenu) + { /*get the number of items in our global array*/ + for(nTools = 0; Tools[nTools].idCommand != -1; nTools++){} + + /*add the menu items*/ + for(i = 0; i < nTools; i++) + { + LoadStringA(shell32_hInstance, Tools[i].idMenuString, szText, MAX_PATH); + + ZeroMemory(&mii, sizeof(mii)); + mii.cbSize = sizeof(mii); + mii.fMask = MIIM_TYPE | MIIM_ID | MIIM_STATE; + + if(BTNS_SEP != Tools[i].bStyle) /* no separator*/ + { + mii.fType = MFT_STRING; + mii.fState = MFS_ENABLED; + mii.dwTypeData = szText; + mii.wID = Tools[i].idCommand; + } + else + { + mii.fType = MFT_SEPARATOR; + } + /* tack This item onto the end of the menu */ + InsertMenuItemA(hSubMenu, (UINT)-1, TRUE, &mii); + } + } + TRACE("-- return (menu=%p)\n",hSubMenu); + return hSubMenu; +} +/********************************************************** +* ShellView_MergeFileMenu() +*/ +static void ShellView_MergeFileMenu(IShellViewImpl * This, HMENU hSubMenu) +{ TRACE("(%p)->(submenu=%p) stub\n",This,hSubMenu); + + if(hSubMenu) + { /*insert This item at the beginning of the menu */ + _InsertMenuItem(hSubMenu, 0, TRUE, 0, MFT_SEPARATOR, NULL, MFS_ENABLED); + _InsertMenuItem(hSubMenu, 0, TRUE, IDM_MYFILEITEM, MFT_STRING, "dummy45", MFS_ENABLED); + + } + TRACE("--\n"); +} + +/********************************************************** +* ShellView_MergeViewMenu() +*/ + +static void ShellView_MergeViewMenu(IShellViewImpl * This, HMENU hSubMenu) +{ MENUITEMINFOA mii; + + TRACE("(%p)->(submenu=%p)\n",This,hSubMenu); + + if(hSubMenu) + { /*add a separator at the correct position in the menu*/ + _InsertMenuItem(hSubMenu, FCIDM_MENU_VIEW_SEP_OPTIONS, FALSE, 0, MFT_SEPARATOR, NULL, MFS_ENABLED); + + ZeroMemory(&mii, sizeof(mii)); + mii.cbSize = sizeof(mii); + mii.fMask = MIIM_SUBMENU | MIIM_TYPE | MIIM_DATA; + mii.fType = MFT_STRING; + mii.dwTypeData = "View"; + mii.hSubMenu = LoadMenuA(shell32_hInstance, "MENU_001"); + InsertMenuItemA(hSubMenu, FCIDM_MENU_VIEW_SEP_OPTIONS, FALSE, &mii); + } +} + +/********************************************************** +* ShellView_GetSelections() +* +* - fills the this->apidl list with the selected objects +* +* RETURNS +* number of selected items +*/ +static UINT ShellView_GetSelections(IShellViewImpl * This) +{ + LVITEMA lvItem; + UINT i = 0; + + if (This->apidl) + { + SHFree(This->apidl); + } + + This->cidl = ListView_GetSelectedCount(This->hWndList); + This->apidl = (LPITEMIDLIST*)SHAlloc(This->cidl * sizeof(LPITEMIDLIST)); + + TRACE("selected=%i\n", This->cidl); + + if(This->apidl) + { + TRACE("-- Items selected =%u\n", This->cidl); + + ZeroMemory(&lvItem, sizeof(lvItem)); + lvItem.mask = LVIF_STATE | LVIF_PARAM; + lvItem.stateMask = LVIS_SELECTED; + + while(ListView_GetItemA(This->hWndList, &lvItem) && (i < This->cidl)) + { + if(lvItem.state & LVIS_SELECTED) + { + This->apidl[i] = (LPITEMIDLIST)lvItem.lParam; + i++; + TRACE("-- selected Item found\n"); + } + lvItem.iItem++; + } + } + return This->cidl; + +} + +/********************************************************** + * ShellView_OpenSelectedItems() + */ +static HRESULT ShellView_OpenSelectedItems(IShellViewImpl * This) +{ + static UINT CF_IDLIST = 0; + HRESULT hr; + IDataObject* selection; + FORMATETC fetc; + STGMEDIUM stgm; + LPIDA pIDList; + LPCITEMIDLIST parent_pidl; + int i; + + if (0 == ShellView_GetSelections(This)) + { + return S_OK; + } + hr = IShellFolder_GetUIObjectOf(This->pSFParent, This->hWnd, This->cidl, + (LPCITEMIDLIST*)This->apidl, &IID_IDataObject, + 0, (LPVOID *)&selection); + if (FAILED(hr)) + return hr; + + if (0 == CF_IDLIST) + { + CF_IDLIST = RegisterClipboardFormatA(CFSTR_SHELLIDLIST); + } + fetc.cfFormat = CF_IDLIST; + fetc.ptd = NULL; + fetc.dwAspect = DVASPECT_CONTENT; + fetc.lindex = -1; + fetc.tymed = TYMED_HGLOBAL; + + hr = IDataObject_QueryGetData(selection, &fetc); + if (FAILED(hr)) + return hr; + + hr = IDataObject_GetData(selection, &fetc, &stgm); + if (FAILED(hr)) + return hr; + + pIDList = GlobalLock(stgm.u.hGlobal); + + parent_pidl = (LPCITEMIDLIST) ((LPBYTE)pIDList+pIDList->aoffset[0]); + for (i = pIDList->cidl; i > 0; --i) + { + LPCITEMIDLIST pidl; + SFGAOF attribs; + + pidl = (LPCITEMIDLIST)((LPBYTE)pIDList+pIDList->aoffset[i]); + + attribs = SFGAO_FOLDER; + hr = IShellFolder_GetAttributesOf(This->pSFParent, 1, &pidl, &attribs); + + if (SUCCEEDED(hr) && ! (attribs & SFGAO_FOLDER)) + { + SHELLEXECUTEINFOA shexinfo; + + shexinfo.cbSize = sizeof(SHELLEXECUTEINFOA); + shexinfo.fMask = SEE_MASK_INVOKEIDLIST; /* SEE_MASK_IDLIST is also possible. */ + shexinfo.hwnd = NULL; + shexinfo.lpVerb = NULL; + shexinfo.lpFile = NULL; + shexinfo.lpParameters = NULL; + shexinfo.lpDirectory = NULL; + shexinfo.nShow = SW_NORMAL; + shexinfo.lpIDList = ILCombine(parent_pidl, pidl); + + ShellExecuteExA(&shexinfo); /* Discard error/success info */ + + ILFree((LPITEMIDLIST)shexinfo.lpIDList); + } + } + + GlobalUnlock(stgm.u.hGlobal); + ReleaseStgMedium(&stgm); + + IDataObject_Release(selection); + + return S_OK; +} + +/********************************************************** + * ShellView_DoContextMenu() + */ +static void ShellView_DoContextMenu(IShellViewImpl * This, WORD x, WORD y, BOOL bDefault) +{ UINT uCommand; + DWORD wFlags; + HMENU hMenu; + BOOL fExplore = FALSE; + HWND hwndTree = 0; + LPCONTEXTMENU pContextMenu = NULL; + IContextMenu2 *pCM = NULL; + CMINVOKECOMMANDINFO cmi; + + TRACE("(%p)->(0x%08x 0x%08x 0x%08x) stub\n",This, x, y, bDefault); + + /* look, what's selected and create a context menu object of it*/ + if( ShellView_GetSelections(This) ) + { + IShellFolder_GetUIObjectOf( This->pSFParent, This->hWndParent, This->cidl, (LPCITEMIDLIST*)This->apidl, + (REFIID)&IID_IContextMenu, NULL, (LPVOID *)&pContextMenu); + + if(pContextMenu) + { + TRACE("-- pContextMenu\n"); + hMenu = CreatePopupMenu(); + + if( hMenu ) + { + /* See if we are in Explore or Open mode. If the browser's tree is present, we are in Explore mode.*/ + if(SUCCEEDED(IShellBrowser_GetControlWindow(This->pShellBrowser,FCW_TREE, &hwndTree)) && hwndTree) + { + TRACE("-- explore mode\n"); + fExplore = TRUE; + } + + /* build the flags depending on what we can do with the selected item */ + wFlags = CMF_NORMAL | (This->cidl != 1 ? 0 : CMF_CANRENAME) | (fExplore ? CMF_EXPLORE : 0); + + /* let the ContextMenu merge its items in */ + if (SUCCEEDED(IContextMenu_QueryContextMenu( pContextMenu, hMenu, 0, FCIDM_SHVIEWFIRST, FCIDM_SHVIEWLAST, wFlags ))) + { + if (This->FolderSettings.fFlags & FWF_DESKTOP) + SetMenuDefaultItem(hMenu, FCIDM_SHVIEW_OPEN, MF_BYCOMMAND); + + if( bDefault ) + { + TRACE("-- get menu default command\n"); + uCommand = GetMenuDefaultItem(hMenu, FALSE, GMDI_GOINTOPOPUPS); + } + else + { + TRACE("-- track popup\n"); + uCommand = TrackPopupMenu( hMenu,TPM_LEFTALIGN | TPM_RETURNCMD,x,y,0,This->hWnd,NULL); + } + + if(uCommand > 0) + { + TRACE("-- uCommand=%u\n", uCommand); + if (uCommand==FCIDM_SHVIEW_OPEN && IsInCommDlg(This)) + { + TRACE("-- dlg: OnDefaultCommand\n"); + if (FAILED(OnDefaultCommand(This))) + { + ShellView_OpenSelectedItems(This); + } + } + else + { + TRACE("-- explore -- invoke command\n"); + ZeroMemory(&cmi, sizeof(cmi)); + cmi.cbSize = sizeof(cmi); + cmi.hwnd = This->hWndParent; /* this window has to answer CWM_GETISHELLBROWSER */ + cmi.lpVerb = (LPCSTR)MAKEINTRESOURCEA(uCommand); + IContextMenu_InvokeCommand(pContextMenu, &cmi); + } + } + DestroyMenu(hMenu); + } + } + if (pContextMenu) + IContextMenu_Release(pContextMenu); + } + } + else /* background context menu */ + { + hMenu = CreatePopupMenu(); + + pCM = ISvBgCm_Constructor(This->pSFParent); + IContextMenu2_QueryContextMenu(pCM, hMenu, 0, FCIDM_SHVIEWFIRST, FCIDM_SHVIEWLAST, 0); + + uCommand = TrackPopupMenu( hMenu, TPM_LEFTALIGN | TPM_RETURNCMD,x,y,0,This->hWnd,NULL); + DestroyMenu(hMenu); + + TRACE("-- (%p)->(uCommand=0x%08x )\n",This, uCommand); + + ZeroMemory(&cmi, sizeof(cmi)); + cmi.cbSize = sizeof(cmi); + cmi.lpVerb = (LPCSTR)MAKEINTRESOURCEA(uCommand); + cmi.hwnd = This->hWndParent; + IContextMenu2_InvokeCommand(pCM, &cmi); + + IContextMenu2_Release(pCM); + } +} + +/********************************************************** + * ##### message handling ##### + */ + +/********************************************************** +* ShellView_OnSize() +*/ +static LRESULT ShellView_OnSize(IShellViewImpl * This, WORD wWidth, WORD wHeight) +{ + TRACE("%p width=%u height=%u\n",This, wWidth,wHeight); + + /*resize the ListView to fit our window*/ + if(This->hWndList) + { + MoveWindow(This->hWndList, 0, 0, wWidth, wHeight, TRUE); + } + + return S_OK; +} +/********************************************************** +* ShellView_OnDeactivate() +* +* NOTES +* internal +*/ +static void ShellView_OnDeactivate(IShellViewImpl * This) +{ + TRACE("%p\n",This); + + if(This->uState != SVUIA_DEACTIVATE) + { + if(This->hMenu) + { + IShellBrowser_SetMenuSB(This->pShellBrowser,0, 0, 0); + IShellBrowser_RemoveMenusSB(This->pShellBrowser,This->hMenu); + DestroyMenu(This->hMenu); + This->hMenu = 0; + } + + This->uState = SVUIA_DEACTIVATE; + } +} + +/********************************************************** +* ShellView_OnActivate() +*/ +static LRESULT ShellView_OnActivate(IShellViewImpl * This, UINT uState) +{ OLEMENUGROUPWIDTHS omw = { {0, 0, 0, 0, 0, 0} }; + MENUITEMINFOA mii; + CHAR szText[MAX_PATH]; + + TRACE("%p uState=%x\n",This,uState); + + /*don't do anything if the state isn't really changing */ + if(This->uState == uState) + { + return S_OK; + } + + ShellView_OnDeactivate(This); + + /*only do This if we are active */ + if(uState != SVUIA_DEACTIVATE) + { + /*merge the menus */ + This->hMenu = CreateMenu(); + + if(This->hMenu) + { + IShellBrowser_InsertMenusSB(This->pShellBrowser, This->hMenu, &omw); + TRACE("-- after fnInsertMenusSB\n"); + + /*build the top level menu get the menu item's text*/ + strcpy(szText,"dummy 31"); + + ZeroMemory(&mii, sizeof(mii)); + mii.cbSize = sizeof(mii); + mii.fMask = MIIM_SUBMENU | MIIM_TYPE | MIIM_STATE; + mii.fType = MFT_STRING; + mii.fState = MFS_ENABLED; + mii.dwTypeData = szText; + mii.hSubMenu = ShellView_BuildFileMenu(This); + + /*insert our menu into the menu bar*/ + if(mii.hSubMenu) + { + InsertMenuItemA(This->hMenu, FCIDM_MENU_HELP, FALSE, &mii); + } + + /*get the view menu so we can merge with it*/ + ZeroMemory(&mii, sizeof(mii)); + mii.cbSize = sizeof(mii); + mii.fMask = MIIM_SUBMENU; + + if(GetMenuItemInfoA(This->hMenu, FCIDM_MENU_VIEW, FALSE, &mii)) + { + ShellView_MergeViewMenu(This, mii.hSubMenu); + } + + /*add the items that should only be added if we have the focus*/ + if(SVUIA_ACTIVATE_FOCUS == uState) + { + /*get the file menu so we can merge with it */ + ZeroMemory(&mii, sizeof(mii)); + mii.cbSize = sizeof(mii); + mii.fMask = MIIM_SUBMENU; + + if(GetMenuItemInfoA(This->hMenu, FCIDM_MENU_FILE, FALSE, &mii)) + { + ShellView_MergeFileMenu(This, mii.hSubMenu); + } + } + TRACE("-- before fnSetMenuSB\n"); + IShellBrowser_SetMenuSB(This->pShellBrowser, This->hMenu, 0, This->hWnd); + } + } + This->uState = uState; + TRACE("--\n"); + return S_OK; +} + +/********************************************************** +* ShellView_OnSetFocus() +* +*/ +static LRESULT ShellView_OnSetFocus(IShellViewImpl * This) +{ + TRACE("%p\n",This); + + /* Tell the browser one of our windows has received the focus. This + should always be done before merging menus (OnActivate merges the + menus) if one of our windows has the focus.*/ + + IShellBrowser_OnViewWindowActive(This->pShellBrowser,(IShellView*) This); + ShellView_OnActivate(This, SVUIA_ACTIVATE_FOCUS); + + /* Set the focus to the listview */ + SetFocus(This->hWndList); + + /* Notify the ICommDlgBrowser interface */ + OnStateChange(This,CDBOSC_SETFOCUS); + + return 0; +} + +/********************************************************** +* ShellView_OnKillFocus() +*/ +static LRESULT ShellView_OnKillFocus(IShellViewImpl * This) +{ + TRACE("(%p) stub\n",This); + + ShellView_OnActivate(This, SVUIA_ACTIVATE_NOFOCUS); + /* Notify the ICommDlgBrowser */ + OnStateChange(This,CDBOSC_KILLFOCUS); + + return 0; +} + +/********************************************************** +* ShellView_OnCommand() +* +* NOTES +* the CmdID's are the ones from the context menu +*/ +static LRESULT ShellView_OnCommand(IShellViewImpl * This,DWORD dwCmdID, DWORD dwCmd, HWND hwndCmd) +{ + TRACE("(%p)->(0x%08lx 0x%08lx %p) stub\n",This, dwCmdID, dwCmd, hwndCmd); + + switch(dwCmdID) + { + case FCIDM_SHVIEW_SMALLICON: + This->FolderSettings.ViewMode = FVM_SMALLICON; + SetStyle (This, LVS_SMALLICON, LVS_TYPEMASK); + CheckToolbar(This); + break; + + case FCIDM_SHVIEW_BIGICON: + This->FolderSettings.ViewMode = FVM_ICON; + SetStyle (This, LVS_ICON, LVS_TYPEMASK); + CheckToolbar(This); + break; + + case FCIDM_SHVIEW_LISTVIEW: + This->FolderSettings.ViewMode = FVM_LIST; + SetStyle (This, LVS_LIST, LVS_TYPEMASK); + CheckToolbar(This); + break; + + case FCIDM_SHVIEW_REPORTVIEW: + This->FolderSettings.ViewMode = FVM_DETAILS; + SetStyle (This, LVS_REPORT, LVS_TYPEMASK); + CheckToolbar(This); + break; + + /* the menu-ID's for sorting are 0x30... see shrec.rc */ + case 0x30: + case 0x31: + case 0x32: + case 0x33: + This->ListViewSortInfo.nHeaderID = (LPARAM) (dwCmdID - 0x30); + This->ListViewSortInfo.bIsAscending = TRUE; + This->ListViewSortInfo.nLastHeaderID = This->ListViewSortInfo.nHeaderID; + ListView_SortItems(This->hWndList, ShellView_ListViewCompareItems, (LPARAM) (&(This->ListViewSortInfo))); + break; + + default: + TRACE("-- COMMAND 0x%04lx unhandled\n", dwCmdID); + } + return 0; +} + +/********************************************************** +* ShellView_OnNotify() +*/ + +static LRESULT ShellView_OnNotify(IShellViewImpl * This, UINT CtlID, LPNMHDR lpnmh) +{ LPNMLISTVIEW lpnmlv = (LPNMLISTVIEW)lpnmh; + NMLVDISPINFOA *lpdi = (NMLVDISPINFOA *)lpnmh; + LPITEMIDLIST pidl; + + TRACE("%p CtlID=%u lpnmh->code=%x\n",This,CtlID,lpnmh->code); + + switch(lpnmh->code) + { + case NM_SETFOCUS: + TRACE("-- NM_SETFOCUS %p\n",This); + ShellView_OnSetFocus(This); + break; + + case NM_KILLFOCUS: + TRACE("-- NM_KILLFOCUS %p\n",This); + ShellView_OnDeactivate(This); + /* Notify the ICommDlgBrowser interface */ + OnStateChange(This,CDBOSC_KILLFOCUS); + break; + + case NM_CUSTOMDRAW: + TRACE("-- NM_CUSTOMDRAW %p\n",This); + return CDRF_DODEFAULT; + + case NM_RELEASEDCAPTURE: + TRACE("-- NM_RELEASEDCAPTURE %p\n",This); + break; + + case NM_CLICK: + TRACE("-- NM_CLICK %p\n",This); + break; + + case NM_RCLICK: + TRACE("-- NM_RCLICK %p\n",This); + break; + + case HDN_ENDTRACKA: + TRACE("-- HDN_ENDTRACKA %p\n",This); + /*nColumn1 = ListView_GetColumnWidth(This->hWndList, 0); + nColumn2 = ListView_GetColumnWidth(This->hWndList, 1);*/ + break; + + case LVN_DELETEITEM: + TRACE("-- LVN_DELETEITEM %p\n",This); + SHFree((LPITEMIDLIST)lpnmlv->lParam); /*delete the pidl because we made a copy of it*/ + break; + + case LVN_DELETEALLITEMS: + TRACE("-- LVN_DELETEALLITEMS %p\n",This); + return FALSE; + + case LVN_INSERTITEM: + TRACE("-- LVN_INSERTITEM (STUB)%p\n",This); + break; + + case LVN_ITEMACTIVATE: + TRACE("-- LVN_ITEMACTIVATE %p\n",This); + OnStateChange(This, CDBOSC_SELCHANGE); /* the browser will get the IDataObject now */ + ShellView_DoContextMenu(This, 0, 0, TRUE); + break; + + case LVN_COLUMNCLICK: + This->ListViewSortInfo.nHeaderID = lpnmlv->iSubItem; + if(This->ListViewSortInfo.nLastHeaderID == This->ListViewSortInfo.nHeaderID) + { + This->ListViewSortInfo.bIsAscending = !This->ListViewSortInfo.bIsAscending; + } + else + { + This->ListViewSortInfo.bIsAscending = TRUE; + } + This->ListViewSortInfo.nLastHeaderID = This->ListViewSortInfo.nHeaderID; + + ListView_SortItems(lpnmlv->hdr.hwndFrom, ShellView_ListViewCompareItems, (LPARAM) (&(This->ListViewSortInfo))); + break; + + case LVN_GETDISPINFOA: + case LVN_GETDISPINFOW: + TRACE("-- LVN_GETDISPINFO %p\n",This); + pidl = (LPITEMIDLIST)lpdi->item.lParam; + + if(lpdi->item.mask & LVIF_TEXT) /* text requested */ + { + if (This->pSF2Parent) + { + SHELLDETAILS sd; + IShellFolder2_GetDetailsOf(This->pSF2Parent, pidl, lpdi->item.iSubItem, &sd); + if (lpnmh->code == LVN_GETDISPINFOA) + { + StrRetToStrNA( lpdi->item.pszText, lpdi->item.cchTextMax, &sd.str, NULL); + TRACE("-- text=%s\n",lpdi->item.pszText); + } + else /* LVN_GETDISPINFOW */ + { + StrRetToStrNW( ((NMLVDISPINFOW *)lpdi)->item.pszText, lpdi->item.cchTextMax, &sd.str, NULL); + TRACE("-- text=%s\n",debugstr_w((WCHAR*)(lpdi->item.pszText))); + } + } + else + { + FIXME("no SF2\n"); + } + } + if(lpdi->item.mask & LVIF_IMAGE) /* image requested */ + { + lpdi->item.iImage = SHMapPIDLToSystemImageListIndex(This->pSFParent, pidl, 0); + } + break; + + case LVN_ITEMCHANGED: + TRACE("-- LVN_ITEMCHANGED %p\n",This); + OnStateChange(This, CDBOSC_SELCHANGE); /* the browser will get the IDataObject now */ + break; + + case LVN_BEGINDRAG: + case LVN_BEGINRDRAG: + TRACE("-- LVN_BEGINDRAG\n"); + + if (ShellView_GetSelections(This)) + { + IDataObject * pda; + DWORD dwAttributes = SFGAO_CANLINK; + DWORD dwEffect = DROPEFFECT_COPY | DROPEFFECT_MOVE; + + if (SUCCEEDED(IShellFolder_GetUIObjectOf(This->pSFParent, This->hWnd, This->cidl, (LPCITEMIDLIST*)This->apidl, &IID_IDataObject,0,(LPVOID *)&pda))) + { + IDropSource * pds = (IDropSource*)&(This->lpvtblDropSource); /* own DropSource interface */ + + if (SUCCEEDED(IShellFolder_GetAttributesOf(This->pSFParent, This->cidl, (LPCITEMIDLIST*)This->apidl, &dwAttributes))) + { + if (dwAttributes & SFGAO_CANLINK) + { + dwEffect |= DROPEFFECT_LINK; + } + } + + if (pds) + { + DWORD dwEffect; + DoDragDrop(pda, pds, dwEffect, &dwEffect); + } + IDataObject_Release(pda); + } + } + break; + + case LVN_BEGINLABELEDITA: + { + DWORD dwAttr = SFGAO_CANRENAME; + pidl = (LPITEMIDLIST)lpdi->item.lParam; + + TRACE("-- LVN_BEGINLABELEDITA %p\n",This); + + IShellFolder_GetAttributesOf(This->pSFParent, 1, (LPCITEMIDLIST*)&pidl, &dwAttr); + if (SFGAO_CANRENAME & dwAttr) + { + return FALSE; + } + return TRUE; + } + + case LVN_ENDLABELEDITA: + { + TRACE("-- LVN_ENDLABELEDITA %p\n",This); + if (lpdi->item.pszText) + { + HRESULT hr; + WCHAR wszNewName[MAX_PATH]; + LVITEMA lvItem; + + ZeroMemory(&lvItem, sizeof(LVITEMA)); + lvItem.iItem = lpdi->item.iItem; + lvItem.mask = LVIF_PARAM; + ListView_GetItemA(This->hWndList, &lvItem); + + pidl = (LPITEMIDLIST)lpdi->item.lParam; + if (!MultiByteToWideChar( CP_ACP, 0, lpdi->item.pszText, -1, wszNewName, MAX_PATH )) + wszNewName[MAX_PATH-1] = 0; + hr = IShellFolder_SetNameOf(This->pSFParent, 0, pidl, wszNewName, SHGDN_INFOLDER, &pidl); + + if(SUCCEEDED(hr) && pidl) + { + lvItem.mask = LVIF_PARAM; + lvItem.lParam = (LPARAM)pidl; + ListView_SetItemA(This->hWndList, &lvItem); + return TRUE; + } + } + return FALSE; + } + + case LVN_KEYDOWN: + { + /* MSG msg; + msg.hwnd = This->hWnd; + msg.message = WM_KEYDOWN; + msg.wParam = plvKeyDown->wVKey; + msg.lParam = 0; + msg.time = 0; + msg.pt = 0;*/ + + LPNMLVKEYDOWN plvKeyDown = (LPNMLVKEYDOWN) lpnmh; + + /* initiate a rename of the selected file or directory */ + if(plvKeyDown->wVKey == VK_F2) + { + /* see how many files are selected */ + int i = ListView_GetSelectedCount(This->hWndList); + + /* get selected item */ + if(i == 1) + { + /* get selected item */ + i = ListView_GetNextItem(This->hWndList, -1, + LVNI_SELECTED); + + ListView_EnsureVisible(This->hWndList, i, 0); + ListView_EditLabelA(This->hWndList, i); + } + } +#if 0 + TranslateAccelerator(This->hWnd, This->hAccel, &msg) +#endif + else if(plvKeyDown->wVKey == VK_DELETE) + { + UINT i; + int item_index; + LVITEMA item; + LPITEMIDLIST* pItems; + ISFHelper *psfhlp; + + IShellFolder_QueryInterface(This->pSFParent, &IID_ISFHelper, + (LPVOID*)&psfhlp); + + if (psfhlp == NULL) + break; + + if(!(i = ListView_GetSelectedCount(This->hWndList))) + break; + + /* allocate memory for the pidl array */ + pItems = HeapAlloc(GetProcessHeap(), 0, + sizeof(LPITEMIDLIST) * i); + + /* retrieve all selected items */ + i = 0; + item_index = -1; + while(ListView_GetSelectedCount(This->hWndList) > i) + { + /* get selected item */ + item_index = ListView_GetNextItem(This->hWndList, + item_index, LVNI_SELECTED); + item.iItem = item_index; + item.mask |= LVIF_PARAM; + ListView_GetItemA(This->hWndList, &item); + + /* get item pidl */ + pItems[i] = (LPITEMIDLIST)item.lParam; + + i++; + } + + /* perform the item deletion */ + ISFHelper_DeleteItems(psfhlp, i, (LPCITEMIDLIST*)pItems); + + /* free pidl array memory */ + HeapFree(GetProcessHeap(), 0, pItems); + } + else + FIXME("LVN_KEYDOWN key=0x%08x\n",plvKeyDown->wVKey); + } + break; + + default: + TRACE("-- %p WM_COMMAND %x unhandled\n", This, lpnmh->code); + break; + } + return 0; +} + +/********************************************************** +* ShellView_OnChange() +*/ + +static LRESULT ShellView_OnChange(IShellViewImpl * This, LPITEMIDLIST * Pidls, LONG wEventId) +{ + + TRACE("(%p)(%p,%p,0x%08lx)\n", This, Pidls[0], Pidls[1], wEventId); + switch(wEventId) + { + case SHCNE_MKDIR: + case SHCNE_CREATE: + LV_AddItem(This, Pidls[0]); + break; + case SHCNE_RMDIR: + case SHCNE_DELETE: + LV_DeleteItem(This, Pidls[0]); + break; + case SHCNE_RENAMEFOLDER: + case SHCNE_RENAMEITEM: + LV_RenameItem(This, Pidls[0], Pidls[1]); + break; + case SHCNE_UPDATEITEM: + break; + } + return TRUE; +} +/********************************************************** +* ShellView_WndProc +*/ + +static LRESULT CALLBACK ShellView_WndProc(HWND hWnd, UINT uMessage, WPARAM wParam, LPARAM lParam) +{ + IShellViewImpl * pThis = (IShellViewImpl*)GetWindowLongPtrW(hWnd, GWLP_USERDATA); + LPCREATESTRUCTA lpcs; + + TRACE("(hwnd=%p msg=%x wparm=%x lparm=%lx)\n",hWnd, uMessage, wParam, lParam); + + switch (uMessage) + { + case WM_NCCREATE: + lpcs = (LPCREATESTRUCTA)lParam; + pThis = (IShellViewImpl*)(lpcs->lpCreateParams); + SetWindowLongPtrW(hWnd, GWLP_USERDATA, (ULONG_PTR)pThis); + pThis->hWnd = hWnd; /*set the window handle*/ + break; + + case WM_SIZE: return ShellView_OnSize(pThis,LOWORD(lParam), HIWORD(lParam)); + case WM_SETFOCUS: return ShellView_OnSetFocus(pThis); + case WM_KILLFOCUS: return ShellView_OnKillFocus(pThis); + case WM_CREATE: return ShellView_OnCreate(pThis); + case WM_ACTIVATE: return ShellView_OnActivate(pThis, SVUIA_ACTIVATE_FOCUS); + case WM_NOTIFY: return ShellView_OnNotify(pThis,(UINT)wParam, (LPNMHDR)lParam); + case WM_COMMAND: return ShellView_OnCommand(pThis, + GET_WM_COMMAND_ID(wParam, lParam), + GET_WM_COMMAND_CMD(wParam, lParam), + GET_WM_COMMAND_HWND(wParam, lParam)); + case SHV_CHANGE_NOTIFY: return ShellView_OnChange(pThis, (LPITEMIDLIST*)wParam, (LONG)lParam); + + case WM_CONTEXTMENU: ShellView_DoContextMenu(pThis, LOWORD(lParam), HIWORD(lParam), FALSE); + return 0; + + case WM_SHOWWINDOW: UpdateWindow(pThis->hWndList); + break; + + case WM_GETDLGCODE: return SendMessageA(pThis->hWndList,uMessage,0,0); + + case WM_DESTROY: + RevokeDragDrop(pThis->hWnd); + SHChangeNotifyDeregister(pThis->hNotify); + break; + + case WM_ERASEBKGND: + if ((pThis->FolderSettings.fFlags & FWF_DESKTOP) || + (pThis->FolderSettings.fFlags & FWF_TRANSPARENT)) + return 1; + break; + } + + return DefWindowProcA (hWnd, uMessage, wParam, lParam); +} +/********************************************************** +* +* +* The INTERFACE of the IShellView object +* +* +********************************************************** +* IShellView_QueryInterface +*/ +static HRESULT WINAPI IShellView_fnQueryInterface(IShellView * iface,REFIID riid, LPVOID *ppvObj) +{ + IShellViewImpl *This = (IShellViewImpl *)iface; + + TRACE("(%p)->(\n\tIID:\t%s,%p)\n",This,debugstr_guid(riid),ppvObj); + + *ppvObj = NULL; + + if(IsEqualIID(riid, &IID_IUnknown)) + { + *ppvObj = This; + } + else if(IsEqualIID(riid, &IID_IShellView)) + { + *ppvObj = (IShellView*)This; + } + else if(IsEqualIID(riid, &IID_IOleCommandTarget)) + { + *ppvObj = (IOleCommandTarget*)&(This->lpvtblOleCommandTarget); + } + else if(IsEqualIID(riid, &IID_IDropTarget)) + { + *ppvObj = (IDropTarget*)&(This->lpvtblDropTarget); + } + else if(IsEqualIID(riid, &IID_IDropSource)) + { + *ppvObj = (IDropSource*)&(This->lpvtblDropSource); + } + else if(IsEqualIID(riid, &IID_IViewObject)) + { + *ppvObj = (IViewObject*)&(This->lpvtblViewObject); + } + + if(*ppvObj) + { + IUnknown_AddRef( (IUnknown*)*ppvObj ); + TRACE("-- Interface: (%p)->(%p)\n",ppvObj,*ppvObj); + return S_OK; + } + TRACE("-- Interface: E_NOINTERFACE\n"); + return E_NOINTERFACE; +} + +/********************************************************** +* IShellView_AddRef +*/ +static ULONG WINAPI IShellView_fnAddRef(IShellView * iface) +{ + IShellViewImpl *This = (IShellViewImpl *)iface; + + TRACE("(%p)->(count=%lu)\n",This,This->ref); + + return ++(This->ref); +} +/********************************************************** +* IShellView_Release +*/ +static ULONG WINAPI IShellView_fnRelease(IShellView * iface) +{ + IShellViewImpl *This = (IShellViewImpl *)iface; + + TRACE("(%p)->()\n",This); + + if (!--(This->ref)) + { + TRACE(" destroying IShellView(%p)\n",This); + + DestroyWindow(This->hWndList); + + if(This->pSFParent) + IShellFolder_Release(This->pSFParent); + + if(This->pSF2Parent) + IShellFolder2_Release(This->pSF2Parent); + + if (This->apidl) + SHFree(This->apidl); + + HeapFree(GetProcessHeap(),0,This); + return 0; + } + return This->ref; +} + +/********************************************************** +* ShellView_GetWindow +*/ +static HRESULT WINAPI IShellView_fnGetWindow(IShellView * iface,HWND * phWnd) +{ + IShellViewImpl *This = (IShellViewImpl *)iface; + + TRACE("(%p)\n",This); + + *phWnd = This->hWnd; + + return S_OK; +} + +static HRESULT WINAPI IShellView_fnContextSensitiveHelp(IShellView * iface,BOOL fEnterMode) +{ + IShellViewImpl *This = (IShellViewImpl *)iface; + + FIXME("(%p) stub\n",This); + + return E_NOTIMPL; +} + +/********************************************************** +* IShellView_TranslateAccelerator +* +* FIXME: +* use the accel functions +*/ +static HRESULT WINAPI IShellView_fnTranslateAccelerator(IShellView * iface,LPMSG lpmsg) +{ +#if 0 + IShellViewImpl *This = (IShellViewImpl *)iface; + + FIXME("(%p)->(%p: hwnd=%x msg=%x lp=%lx wp=%x) stub\n",This,lpmsg, lpmsg->hwnd, lpmsg->message, lpmsg->lParam, lpmsg->wParam); +#endif + + if ((lpmsg->message>=WM_KEYFIRST) && (lpmsg->message>=WM_KEYLAST)) + { + TRACE("-- key=0x04%x\n",lpmsg->wParam) ; + } + return S_FALSE; /* not handled */ +} + +static HRESULT WINAPI IShellView_fnEnableModeless(IShellView * iface,BOOL fEnable) +{ + IShellViewImpl *This = (IShellViewImpl *)iface; + + FIXME("(%p) stub\n",This); + + return E_NOTIMPL; +} + +static HRESULT WINAPI IShellView_fnUIActivate(IShellView * iface,UINT uState) +{ + IShellViewImpl *This = (IShellViewImpl *)iface; + +/* + CHAR szName[MAX_PATH]; +*/ + LRESULT lResult; + int nPartArray[1] = {-1}; + + TRACE("(%p)->(state=%x) stub\n",This, uState); + + /*don't do anything if the state isn't really changing*/ + if(This->uState == uState) + { + return S_OK; + } + + /*OnActivate handles the menu merging and internal state*/ + ShellView_OnActivate(This, uState); + + /*only do This if we are active*/ + if(uState != SVUIA_DEACTIVATE) + { + +/* + GetFolderPath is not a method of IShellFolder + IShellFolder_GetFolderPath( This->pSFParent, szName, sizeof(szName) ); +*/ + /* set the number of parts */ + IShellBrowser_SendControlMsg(This->pShellBrowser, FCW_STATUS, SB_SETPARTS, 1, + (LPARAM)nPartArray, &lResult); + + /* set the text for the parts */ +/* + IShellBrowser_SendControlMsg(This->pShellBrowser, FCW_STATUS, SB_SETTEXTA, + 0, (LPARAM)szName, &lResult); +*/ + } + + return S_OK; +} + +static HRESULT WINAPI IShellView_fnRefresh(IShellView * iface) +{ + IShellViewImpl *This = (IShellViewImpl *)iface; + + TRACE("(%p)\n",This); + + ListView_DeleteAllItems(This->hWndList); + ShellView_FillList(This); + + return S_OK; +} + +static HRESULT WINAPI IShellView_fnCreateViewWindow( + IShellView * iface, + IShellView *lpPrevView, + LPCFOLDERSETTINGS lpfs, + IShellBrowser * psb, + RECT * prcView, + HWND *phWnd) +{ + IShellViewImpl *This = (IShellViewImpl *)iface; + + WNDCLASSA wc; + *phWnd = 0; + + + TRACE("(%p)->(shlview=%p set=%p shlbrs=%p rec=%p hwnd=%p) incomplete\n",This, lpPrevView,lpfs, psb, prcView, phWnd); + TRACE("-- vmode=%x flags=%x left=%li top=%li right=%li bottom=%li\n",lpfs->ViewMode, lpfs->fFlags ,prcView->left,prcView->top, prcView->right, prcView->bottom); + + /*set up the member variables*/ + This->pShellBrowser = psb; + This->FolderSettings = *lpfs; + + /*get our parent window*/ + IShellBrowser_AddRef(This->pShellBrowser); + IShellBrowser_GetWindow(This->pShellBrowser, &(This->hWndParent)); + + /* try to get the ICommDlgBrowserInterface, adds a reference !!! */ + This->pCommDlgBrowser=NULL; + if ( SUCCEEDED (IShellBrowser_QueryInterface( This->pShellBrowser, + (REFIID)&IID_ICommDlgBrowser, (LPVOID*) &This->pCommDlgBrowser))) + { + TRACE("-- CommDlgBrowser\n"); + } + + /*if our window class has not been registered, then do so*/ + if(!GetClassInfoA(shell32_hInstance, SV_CLASS_NAME, &wc)) + { + ZeroMemory(&wc, sizeof(wc)); + wc.style = CS_HREDRAW | CS_VREDRAW; + wc.lpfnWndProc = ShellView_WndProc; + wc.cbClsExtra = 0; + wc.cbWndExtra = 0; + wc.hInstance = shell32_hInstance; + wc.hIcon = 0; + wc.hCursor = LoadCursorA (0, (LPSTR)IDC_ARROW); + wc.hbrBackground = (HBRUSH) (COLOR_WINDOW + 1); + wc.lpszMenuName = NULL; + wc.lpszClassName = SV_CLASS_NAME; + + if(!RegisterClassA(&wc)) + return E_FAIL; + } + + *phWnd = CreateWindowExA(0, + SV_CLASS_NAME, + NULL, + WS_CHILD | WS_VISIBLE | WS_TABSTOP, + prcView->left, + prcView->top, + prcView->right - prcView->left, + prcView->bottom - prcView->top, + This->hWndParent, + 0, + shell32_hInstance, + (LPVOID)This); + + CheckToolbar(This); + + if(!*phWnd) return E_FAIL; + + return S_OK; +} + +static HRESULT WINAPI IShellView_fnDestroyViewWindow(IShellView * iface) +{ + IShellViewImpl *This = (IShellViewImpl *)iface; + + TRACE("(%p)\n",This); + + /*Make absolutely sure all our UI is cleaned up.*/ + IShellView_UIActivate((IShellView*)This, SVUIA_DEACTIVATE); + + if(This->hMenu) + { + DestroyMenu(This->hMenu); + } + + DestroyWindow(This->hWnd); + if(This->pShellBrowser) IShellBrowser_Release(This->pShellBrowser); + if(This->pCommDlgBrowser) ICommDlgBrowser_Release(This->pCommDlgBrowser); + + + return S_OK; +} + +static HRESULT WINAPI IShellView_fnGetCurrentInfo(IShellView * iface, LPFOLDERSETTINGS lpfs) +{ + IShellViewImpl *This = (IShellViewImpl *)iface; + + TRACE("(%p)->(%p) vmode=%x flags=%x\n",This, lpfs, + This->FolderSettings.ViewMode, This->FolderSettings.fFlags); + + if (!lpfs) return E_INVALIDARG; + + *lpfs = This->FolderSettings; + return NOERROR; +} + +static HRESULT WINAPI IShellView_fnAddPropertySheetPages(IShellView * iface, DWORD dwReserved,LPFNADDPROPSHEETPAGE lpfn, LPARAM lparam) +{ + IShellViewImpl *This = (IShellViewImpl *)iface; + + FIXME("(%p) stub\n",This); + + return E_NOTIMPL; +} + +static HRESULT WINAPI IShellView_fnSaveViewState(IShellView * iface) +{ + IShellViewImpl *This = (IShellViewImpl *)iface; + + FIXME("(%p) stub\n",This); + + return S_OK; +} + +static HRESULT WINAPI IShellView_fnSelectItem( + IShellView * iface, + LPCITEMIDLIST pidl, + UINT uFlags) +{ + IShellViewImpl *This = (IShellViewImpl *)iface; + int i; + + TRACE("(%p)->(pidl=%p, 0x%08x) stub\n",This, pidl, uFlags); + + i = LV_FindItemByPidl(This, pidl); + + if (i != -1) + { + LVITEMA lvItem; + + if(uFlags & SVSI_ENSUREVISIBLE) + ListView_EnsureVisible(This->hWndList, i, 0); + + ZeroMemory(&lvItem, sizeof(LVITEMA)); + lvItem.mask = LVIF_STATE; + lvItem.iItem = 0; + + while(ListView_GetItemA(This->hWndList, &lvItem)) + { + if (lvItem.iItem == i) + { + if (uFlags & SVSI_SELECT) + lvItem.state |= LVIS_SELECTED; + else + lvItem.state &= ~LVIS_SELECTED; + + if(uFlags & SVSI_FOCUSED) + lvItem.state &= ~LVIS_FOCUSED; + } + else + { + if (uFlags & SVSI_DESELECTOTHERS) + lvItem.state &= ~LVIS_SELECTED; + } + ListView_SetItemA(This->hWndList, &lvItem); + lvItem.iItem++; + } + + + if(uFlags & SVSI_EDIT) + ListView_EditLabelA(This->hWndList, i); + + } + return S_OK; +} + +static HRESULT WINAPI IShellView_fnGetItemObject(IShellView * iface, UINT uItem, REFIID riid, LPVOID *ppvOut) +{ + IShellViewImpl *This = (IShellViewImpl *)iface; + + TRACE("(%p)->(uItem=0x%08x,\n\tIID=%s, ppv=%p)\n",This, uItem, debugstr_guid(riid), ppvOut); + + *ppvOut = NULL; + + switch(uItem) + { + case SVGIO_BACKGROUND: + *ppvOut = ISvBgCm_Constructor(This->pSFParent); + break; + + case SVGIO_SELECTION: + ShellView_GetSelections(This); + IShellFolder_GetUIObjectOf(This->pSFParent, This->hWnd, This->cidl, (LPCITEMIDLIST*)This->apidl, riid, 0, ppvOut); + break; + } + TRACE("-- (%p)->(interface=%p)\n",This, *ppvOut); + + if(!*ppvOut) return E_OUTOFMEMORY; + + return S_OK; +} + +static struct IShellViewVtbl svvt = +{ + IShellView_fnQueryInterface, + IShellView_fnAddRef, + IShellView_fnRelease, + IShellView_fnGetWindow, + IShellView_fnContextSensitiveHelp, + IShellView_fnTranslateAccelerator, + IShellView_fnEnableModeless, + IShellView_fnUIActivate, + IShellView_fnRefresh, + IShellView_fnCreateViewWindow, + IShellView_fnDestroyViewWindow, + IShellView_fnGetCurrentInfo, + IShellView_fnAddPropertySheetPages, + IShellView_fnSaveViewState, + IShellView_fnSelectItem, + IShellView_fnGetItemObject +}; + + +/********************************************************** + * ISVOleCmdTarget_QueryInterface (IUnknown) + */ +static HRESULT WINAPI ISVOleCmdTarget_QueryInterface( + IOleCommandTarget * iface, + REFIID iid, + LPVOID* ppvObj) +{ + _ICOM_THIS_From_IOleCommandTarget(IShellViewImpl, iface); + + return IShellFolder_QueryInterface((IShellFolder*)This, iid, ppvObj); +} + +/********************************************************** + * ISVOleCmdTarget_AddRef (IUnknown) + */ +static ULONG WINAPI ISVOleCmdTarget_AddRef( + IOleCommandTarget * iface) +{ + _ICOM_THIS_From_IOleCommandTarget(IShellFolder, iface); + + return IShellFolder_AddRef((IShellFolder*)This); +} + +/********************************************************** + * ISVOleCmdTarget_Release (IUnknown) + */ +static ULONG WINAPI ISVOleCmdTarget_Release( + IOleCommandTarget * iface) +{ + _ICOM_THIS_From_IOleCommandTarget(IShellViewImpl, iface); + + return IShellFolder_Release((IShellFolder*)This); +} + +/********************************************************** + * ISVOleCmdTarget_QueryStatus (IOleCommandTarget) + */ +static HRESULT WINAPI ISVOleCmdTarget_QueryStatus( + IOleCommandTarget *iface, + const GUID* pguidCmdGroup, + ULONG cCmds, + OLECMD * prgCmds, + OLECMDTEXT* pCmdText) +{ + UINT i; + _ICOM_THIS_From_IOleCommandTarget(IShellViewImpl, iface); + + FIXME("(%p)->(%p(%s) 0x%08lx %p %p\n", + This, pguidCmdGroup, debugstr_guid(pguidCmdGroup), cCmds, prgCmds, pCmdText); + + if (!prgCmds) + return E_POINTER; + for (i = 0; i < cCmds; i++) + { + FIXME("\tprgCmds[%d].cmdID = %ld\n", i, prgCmds[i].cmdID); + prgCmds[i].cmdf = 0; + } + return OLECMDERR_E_UNKNOWNGROUP; +} + +/********************************************************** + * ISVOleCmdTarget_Exec (IOleCommandTarget) + * + * nCmdID is the OLECMDID_* enumeration + */ +static HRESULT WINAPI ISVOleCmdTarget_Exec( + IOleCommandTarget *iface, + const GUID* pguidCmdGroup, + DWORD nCmdID, + DWORD nCmdexecopt, + VARIANT* pvaIn, + VARIANT* pvaOut) +{ + _ICOM_THIS_From_IOleCommandTarget(IShellViewImpl, iface); + + FIXME("(%p)->(\n\tTarget GUID:%s Command:0x%08lx Opt:0x%08lx %p %p)\n", + This, debugstr_guid(pguidCmdGroup), nCmdID, nCmdexecopt, pvaIn, pvaOut); + + if (IsEqualIID(pguidCmdGroup, &CGID_Explorer) && + (nCmdID == 0x29) && + (nCmdexecopt == 4) && pvaOut) + return S_OK; + if (IsEqualIID(pguidCmdGroup, &CGID_ShellDocView) && + (nCmdID == 9) && + (nCmdexecopt == 0)) + return 1; + + return OLECMDERR_E_UNKNOWNGROUP; +} + +static IOleCommandTargetVtbl ctvt = +{ + ISVOleCmdTarget_QueryInterface, + ISVOleCmdTarget_AddRef, + ISVOleCmdTarget_Release, + ISVOleCmdTarget_QueryStatus, + ISVOleCmdTarget_Exec +}; + +/********************************************************** + * ISVDropTarget implementation + */ + +static HRESULT WINAPI ISVDropTarget_QueryInterface( + IDropTarget *iface, + REFIID riid, + LPVOID *ppvObj) +{ + _ICOM_THIS_From_IDropTarget(IShellViewImpl, iface); + + TRACE("(%p)->(\n\tIID:\t%s,%p)\n",This,debugstr_guid(riid),ppvObj); + + return IShellFolder_QueryInterface((IShellFolder*)This, riid, ppvObj); +} + +static ULONG WINAPI ISVDropTarget_AddRef( IDropTarget *iface) +{ + _ICOM_THIS_From_IDropTarget(IShellViewImpl, iface); + + TRACE("(%p)->(count=%lu)\n",This,This->ref); + + return IShellFolder_AddRef((IShellFolder*)This); +} + +static ULONG WINAPI ISVDropTarget_Release( IDropTarget *iface) +{ + _ICOM_THIS_From_IDropTarget(IShellViewImpl, iface); + + TRACE("(%p)->(count=%lu)\n",This,This->ref); + + return IShellFolder_Release((IShellFolder*)This); +} + +static HRESULT WINAPI ISVDropTarget_DragEnter( + IDropTarget *iface, + IDataObject *pDataObject, + DWORD grfKeyState, + POINTL pt, + DWORD *pdwEffect) +{ + + _ICOM_THIS_From_IDropTarget(IShellViewImpl, iface); + + FIXME("Stub: This=%p, DataObject=%p\n",This,pDataObject); + + return E_NOTIMPL; +} + +static HRESULT WINAPI ISVDropTarget_DragOver( + IDropTarget *iface, + DWORD grfKeyState, + POINTL pt, + DWORD *pdwEffect) +{ + _ICOM_THIS_From_IDropTarget(IShellViewImpl, iface); + + FIXME("Stub: This=%p\n",This); + + return E_NOTIMPL; +} + +static HRESULT WINAPI ISVDropTarget_DragLeave( + IDropTarget *iface) +{ + _ICOM_THIS_From_IDropTarget(IShellViewImpl, iface); + + FIXME("Stub: This=%p\n",This); + + return E_NOTIMPL; +} + +static HRESULT WINAPI ISVDropTarget_Drop( + IDropTarget *iface, + IDataObject* pDataObject, + DWORD grfKeyState, + POINTL pt, + DWORD *pdwEffect) +{ + _ICOM_THIS_From_IDropTarget(IShellViewImpl, iface); + + FIXME("Stub: This=%p\n",This); + + return E_NOTIMPL; +} + +static struct IDropTargetVtbl dtvt = +{ + ISVDropTarget_QueryInterface, + ISVDropTarget_AddRef, + ISVDropTarget_Release, + ISVDropTarget_DragEnter, + ISVDropTarget_DragOver, + ISVDropTarget_DragLeave, + ISVDropTarget_Drop +}; + +/********************************************************** + * ISVDropSource implementation + */ + +static HRESULT WINAPI ISVDropSource_QueryInterface( + IDropSource *iface, + REFIID riid, + LPVOID *ppvObj) +{ + _ICOM_THIS_From_IDropSource(IShellViewImpl, iface); + + TRACE("(%p)->(\n\tIID:\t%s,%p)\n",This,debugstr_guid(riid),ppvObj); + + return IShellFolder_QueryInterface((IShellFolder*)This, riid, ppvObj); +} + +static ULONG WINAPI ISVDropSource_AddRef( IDropSource *iface) +{ + _ICOM_THIS_From_IDropSource(IShellViewImpl, iface); + + TRACE("(%p)->(count=%lu)\n",This,This->ref); + + return IShellFolder_AddRef((IShellFolder*)This); +} + +static ULONG WINAPI ISVDropSource_Release( IDropSource *iface) +{ + _ICOM_THIS_From_IDropSource(IShellViewImpl, iface); + + TRACE("(%p)->(count=%lu)\n",This,This->ref); + + return IShellFolder_Release((IShellFolder*)This); +} +static HRESULT WINAPI ISVDropSource_QueryContinueDrag( + IDropSource *iface, + BOOL fEscapePressed, + DWORD grfKeyState) +{ + _ICOM_THIS_From_IDropSource(IShellViewImpl, iface); + TRACE("(%p)\n",This); + + if (fEscapePressed) + return DRAGDROP_S_CANCEL; + else if (!(grfKeyState & MK_LBUTTON) && !(grfKeyState & MK_RBUTTON)) + return DRAGDROP_S_DROP; + else + return NOERROR; +} + +static HRESULT WINAPI ISVDropSource_GiveFeedback( + IDropSource *iface, + DWORD dwEffect) +{ + _ICOM_THIS_From_IDropSource(IShellViewImpl, iface); + TRACE("(%p)\n",This); + + return DRAGDROP_S_USEDEFAULTCURSORS; +} + +static struct IDropSourceVtbl dsvt = +{ + ISVDropSource_QueryInterface, + ISVDropSource_AddRef, + ISVDropSource_Release, + ISVDropSource_QueryContinueDrag, + ISVDropSource_GiveFeedback +}; +/********************************************************** + * ISVViewObject implementation + */ + +static HRESULT WINAPI ISVViewObject_QueryInterface( + IViewObject *iface, + REFIID riid, + LPVOID *ppvObj) +{ + _ICOM_THIS_From_IViewObject(IShellViewImpl, iface); + + TRACE("(%p)->(\n\tIID:\t%s,%p)\n",This,debugstr_guid(riid),ppvObj); + + return IShellFolder_QueryInterface((IShellFolder*)This, riid, ppvObj); +} + +static ULONG WINAPI ISVViewObject_AddRef( IViewObject *iface) +{ + _ICOM_THIS_From_IViewObject(IShellViewImpl, iface); + + TRACE("(%p)->(count=%lu)\n",This,This->ref); + + return IShellFolder_AddRef((IShellFolder*)This); +} + +static ULONG WINAPI ISVViewObject_Release( IViewObject *iface) +{ + _ICOM_THIS_From_IViewObject(IShellViewImpl, iface); + + TRACE("(%p)->(count=%lu)\n",This,This->ref); + + return IShellFolder_Release((IShellFolder*)This); +} + +static HRESULT WINAPI ISVViewObject_Draw( + IViewObject *iface, + DWORD dwDrawAspect, + LONG lindex, + void* pvAspect, + DVTARGETDEVICE* ptd, + HDC hdcTargetDev, + HDC hdcDraw, + LPCRECTL lprcBounds, + LPCRECTL lprcWBounds, + BOOL (CALLBACK *pfnContinue)(ULONG_PTR dwContinue), + ULONG_PTR dwContinue) +{ + + _ICOM_THIS_From_IViewObject(IShellViewImpl, iface); + + FIXME("Stub: This=%p\n",This); + + return E_NOTIMPL; +} +static HRESULT WINAPI ISVViewObject_GetColorSet( + IViewObject *iface, + DWORD dwDrawAspect, + LONG lindex, + void *pvAspect, + DVTARGETDEVICE* ptd, + HDC hicTargetDevice, + LOGPALETTE** ppColorSet) +{ + + _ICOM_THIS_From_IViewObject(IShellViewImpl, iface); + + FIXME("Stub: This=%p\n",This); + + return E_NOTIMPL; +} +static HRESULT WINAPI ISVViewObject_Freeze( + IViewObject *iface, + DWORD dwDrawAspect, + LONG lindex, + void* pvAspect, + DWORD* pdwFreeze) +{ + + _ICOM_THIS_From_IViewObject(IShellViewImpl, iface); + + FIXME("Stub: This=%p\n",This); + + return E_NOTIMPL; +} +static HRESULT WINAPI ISVViewObject_Unfreeze( + IViewObject *iface, + DWORD dwFreeze) +{ + + _ICOM_THIS_From_IViewObject(IShellViewImpl, iface); + + FIXME("Stub: This=%p\n",This); + + return E_NOTIMPL; +} +static HRESULT WINAPI ISVViewObject_SetAdvise( + IViewObject *iface, + DWORD aspects, + DWORD advf, + IAdviseSink* pAdvSink) +{ + + _ICOM_THIS_From_IViewObject(IShellViewImpl, iface); + + FIXME("Stub: This=%p\n",This); + + return E_NOTIMPL; +} +static HRESULT WINAPI ISVViewObject_GetAdvise( + IViewObject *iface, + DWORD* pAspects, + DWORD* pAdvf, + IAdviseSink** ppAdvSink) +{ + + _ICOM_THIS_From_IViewObject(IShellViewImpl, iface); + + FIXME("Stub: This=%p\n",This); + + return E_NOTIMPL; +} + + +static struct IViewObjectVtbl vovt = +{ + ISVViewObject_QueryInterface, + ISVViewObject_AddRef, + ISVViewObject_Release, + ISVViewObject_Draw, + ISVViewObject_GetColorSet, + ISVViewObject_Freeze, + ISVViewObject_Unfreeze, + ISVViewObject_SetAdvise, + ISVViewObject_GetAdvise +}; diff --git a/reactos/lib/shell32/shpolicy.c b/reactos/lib/shell32/shpolicy.c index d0d24ec9b8f..8e435425780 100644 --- a/reactos/lib/shell32/shpolicy.c +++ b/reactos/lib/shell32/shpolicy.c @@ -1,915 +1,915 @@ -/* - * shpolicy.c - Data for shell/system policies. - * - * Copyright 1999 Ian Schmidt - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * NOTES: - * - * Some of these policies can be tweaked via the System Policy - * Editor which came with the Win95 Migration Guide, although - * there doesn't appear to be an updated Win98 version that - * would handle the many new policies introduced since then. - * You could easily write one with the information in - * this file... - * - * Up to date as of SHELL32 v5.00 (W2K) - */ - -#include -#include -#include - -#include "windef.h" -#include "winbase.h" -#include "winerror.h" -#include "winreg.h" - -#include "shell32_main.h" -#include "shlobj.h" - -#include "wine/debug.h" - -WINE_DEFAULT_DEBUG_CHANNEL(shell); - -#define SHELL_NO_POLICY 0xffffffff - -typedef struct tagPOLICYDAT -{ - DWORD policy; /* policy value passed to SHRestricted */ - LPCSTR appstr; /* application str such as "Explorer" */ - LPCSTR keystr; /* name of the actual registry key / policy */ - DWORD cache; /* cached value or 0xffffffff for invalid */ -} POLICYDATA, *LPPOLICYDATA; - -/* registry strings */ -static const CHAR strRegistryPolicyA[] = "Software\\Microsoft\\Windows\\CurrentVersion\\Policies"; -static const WCHAR strRegistryPolicyW[] = {'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', - '\\','P','o','l','i','c','i','e','s',0}; -static const CHAR strPolicyA[] = "Policy"; -static const WCHAR strPolicyW[] = {'P','o','l','i','c','y',0}; - -/* application strings */ - -static const char strExplorer[] = {"Explorer"}; -static const char strActiveDesk[] = {"ActiveDesktop"}; -static const char strWinOldApp[] = {"WinOldApp"}; -static const char strAddRemoveProgs[] = {"AddRemoveProgs"}; - -/* key strings */ - -static const char strNoFileURL[] = {"NoFileUrl"}; -static const char strNoFolderOptions[] = {"NoFolderOptions"}; -static const char strNoChangeStartMenu[] = {"NoChangeStartMenu"}; -static const char strNoWindowsUpdate[] = {"NoWindowsUpdate"}; -static const char strNoSetActiveDesktop[] = {"NoSetActiveDesktop"}; -static const char strNoForgetSoftwareUpdate[] = {"NoForgetSoftwareUpdate"}; -static const char strNoMSAppLogo[] = {"NoMSAppLogo5ChannelNotify"}; -static const char strForceCopyACLW[] = {"ForceCopyACLWithFile"}; -static const char strNoResolveTrk[] = {"NoResolveTrack"}; -static const char strNoResolveSearch[] = {"NoResolveSearch"}; -static const char strNoEditComponent[] = {"NoEditingComponents"}; -static const char strNoMovingBand[] = {"NoMovingBands"}; -static const char strNoCloseDragDrop[] = {"NoCloseDragDropBands"}; -static const char strNoCloseComponent[] = {"NoClosingComponents"}; -static const char strNoDelComponent[] = {"NoDeletingComponents"}; -static const char strNoAddComponent[] = {"NoAddingComponents"}; -static const char strNoComponent[] = {"NoComponents"}; -static const char strNoChangeWallpaper[] = {"NoChangingWallpaper"}; -static const char strNoHTMLWallpaper[] = {"NoHTMLWallpaper"}; -static const char strNoCustomWebView[] = {"NoCustomizeWebView"}; -static const char strClassicShell[] = {"ClassicShell"}; -static const char strClearRecentDocs[] = {"ClearRecentDocsOnExit"}; -static const char strNoFavoritesMenu[] = {"NoFavoritesMenu"}; -static const char strNoActiveDesktopChanges[] = {"NoActiveDesktopChanges"}; -static const char strNoActiveDesktop[] = {"NoActiveDesktop"}; -static const char strNoRecentDocMenu[] = {"NoRecentDocsMenu"}; -static const char strNoRecentDocHistory[] = {"NoRecentDocsHistory"}; -static const char strNoInetIcon[] = {"NoInternetIcon"}; -static const char strNoSettingsWizard[] = {"NoSettingsWizards"}; -static const char strNoLogoff[] = {"NoLogoff"}; -static const char strNoNetConDis[] = {"NoNetConnectDisconnect"}; -static const char strNoViewContextMenu[] = {"NoViewContextMenu"}; -static const char strNoTrayContextMenu[] = {"NoTrayContextMenu"}; -static const char strNoWebMenu[] = {"NoWebMenu"}; -static const char strLnkResolveIgnoreLnkInfo[] = {"LinkResolveIgnoreLinkInfo"}; -static const char strNoCommonGroups[] = {"NoCommonGroups"}; -static const char strEnforceShlExtSecurity[] = {"EnforceShellExtensionSecurity"}; -static const char strNoRealMode[] = {"NoRealMode"}; -static const char strMyDocsOnNet[] = {"MyDocsOnNet"}; -static const char strNoStartMenuSubfolder[] = {"NoStartMenuSubFolders"}; -static const char strNoAddPrinters[] = {"NoAddPrinter"}; -static const char strNoDeletePrinters[] = {"NoDeletePrinter"}; -static const char strNoPrintTab[] = {"NoPrinterTabs"}; -static const char strRestrictRun[] = {"RestrictRun"}; -static const char strNoStartBanner[] = {"NoStartBanner"}; -static const char strNoNetworkNeighborhood[] = {"NoNetHood"}; -static const char strNoDriveTypeAtRun[] = {"NoDriveTypeAutoRun"}; -static const char strNoDrivesAutoRun[] = {"NoDriveAutoRun"}; -static const char strSeparateProcess[] = {"SeparateProcess"}; -static const char strNoDrives[] = {"NoDrives"}; -static const char strNoFind[] = {"NoFind"}; -static const char strNoDesktop[] = {"NoDesktop"}; -static const char strNoSetTaskBar[] = {"NoSetTaskbar"}; -static const char strNoSetFld[] = {"NoSetFolders"}; -static const char strNoFileMenu[] = {"NoFileMenu"}; -static const char strNoSaveSetting[] = {"NoSaveSettings"}; -static const char strNoClose[] = {"NoClose"}; -static const char strNoRun[] = {"NoRun"}; - -/* policy data array */ -POLICYDATA sh32_policy_table[] = -{ - { - REST_NORUN, - strExplorer, - strNoRun, - SHELL_NO_POLICY - }, - { - REST_NOCLOSE, - strExplorer, - strNoClose, - SHELL_NO_POLICY - }, - { - REST_NOSAVESET, - strExplorer, - strNoSaveSetting, - SHELL_NO_POLICY - }, - { - REST_NOFILEMENU, - strExplorer, - strNoFileMenu, - SHELL_NO_POLICY - }, - { - REST_NOSETFOLDERS, - strExplorer, - strNoSetFld, - SHELL_NO_POLICY - }, - { - REST_NOSETTASKBAR, - strExplorer, - strNoSetTaskBar, - SHELL_NO_POLICY - }, - { - REST_NODESKTOP, - strExplorer, - strNoDesktop, - SHELL_NO_POLICY - }, - { - REST_NOFIND, - strExplorer, - strNoFind, - SHELL_NO_POLICY - }, - { - REST_NODRIVES, - strExplorer, - strNoDrives, - SHELL_NO_POLICY - }, - { - REST_NODRIVEAUTORUN, - strExplorer, - strNoDrivesAutoRun, - SHELL_NO_POLICY - }, - { - REST_NODRIVETYPEAUTORUN, - strExplorer, - strNoDriveTypeAtRun, - SHELL_NO_POLICY - }, - { - REST_NONETHOOD, - strExplorer, - strNoNetworkNeighborhood, - SHELL_NO_POLICY - }, - { - REST_STARTBANNER, - strExplorer, - strNoStartBanner, - SHELL_NO_POLICY - }, - { - REST_RESTRICTRUN, - strExplorer, - strRestrictRun, - SHELL_NO_POLICY - }, - { - REST_NOPRINTERTABS, - strExplorer, - strNoPrintTab, - SHELL_NO_POLICY - }, - { - REST_NOPRINTERDELETE, - strExplorer, - strNoDeletePrinters, - SHELL_NO_POLICY - }, - { - REST_NOPRINTERADD, - strExplorer, - strNoAddPrinters, - SHELL_NO_POLICY - }, - { - REST_NOSTARTMENUSUBFOLDERS, - strExplorer, - strNoStartMenuSubfolder, - SHELL_NO_POLICY - }, - { - REST_MYDOCSONNET, - strExplorer, - strMyDocsOnNet, - SHELL_NO_POLICY - }, - { - REST_NOEXITTODOS, - strWinOldApp, - strNoRealMode, - SHELL_NO_POLICY - }, - { - REST_ENFORCESHELLEXTSECURITY, - strExplorer, - strEnforceShlExtSecurity, - SHELL_NO_POLICY - }, - { - REST_LINKRESOLVEIGNORELINKINFO, - strExplorer, - strLnkResolveIgnoreLnkInfo, - SHELL_NO_POLICY - }, - { - REST_NOCOMMONGROUPS, - strExplorer, - strNoCommonGroups, - SHELL_NO_POLICY - }, - { - REST_SEPARATEDESKTOPPROCESS, - strExplorer, - strSeparateProcess, - SHELL_NO_POLICY - }, - { - REST_NOWEB, - strExplorer, - strNoWebMenu, - SHELL_NO_POLICY - }, - { - REST_NOTRAYCONTEXTMENU, - strExplorer, - strNoTrayContextMenu, - SHELL_NO_POLICY - }, - { - REST_NOVIEWCONTEXTMENU, - strExplorer, - strNoViewContextMenu, - SHELL_NO_POLICY - }, - { - REST_NONETCONNECTDISCONNECT, - strExplorer, - strNoNetConDis, - SHELL_NO_POLICY - }, - { - REST_STARTMENULOGOFF, - strExplorer, - strNoLogoff, - SHELL_NO_POLICY - }, - { - REST_NOSETTINGSASSIST, - strExplorer, - strNoSettingsWizard, - SHELL_NO_POLICY - }, - { - REST_NOINTERNETICON, - strExplorer, - strNoInetIcon, - SHELL_NO_POLICY - }, - { - REST_NORECENTDOCSHISTORY, - strExplorer, - strNoRecentDocHistory, - SHELL_NO_POLICY - }, - { - REST_NORECENTDOCSMENU, - strExplorer, - strNoRecentDocMenu, - SHELL_NO_POLICY - }, - { - REST_NOACTIVEDESKTOP, - strExplorer, - strNoActiveDesktop, - SHELL_NO_POLICY - }, - { - REST_NOACTIVEDESKTOPCHANGES, - strExplorer, - strNoActiveDesktopChanges, - SHELL_NO_POLICY - }, - { - REST_NOFAVORITESMENU, - strExplorer, - strNoFavoritesMenu, - SHELL_NO_POLICY - }, - { - REST_CLEARRECENTDOCSONEXIT, - strExplorer, - strClearRecentDocs, - SHELL_NO_POLICY - }, - { - REST_CLASSICSHELL, - strExplorer, - strClassicShell, - SHELL_NO_POLICY - }, - { - REST_NOCUSTOMIZEWEBVIEW, - strExplorer, - strNoCustomWebView, - SHELL_NO_POLICY - }, - { - REST_NOHTMLWALLPAPER, - strActiveDesk, - strNoHTMLWallpaper, - SHELL_NO_POLICY - }, - { - REST_NOCHANGINGWALLPAPER, - strActiveDesk, - strNoChangeWallpaper, - SHELL_NO_POLICY - }, - { - REST_NODESKCOMP, - strActiveDesk, - strNoComponent, - SHELL_NO_POLICY - }, - { - REST_NOADDDESKCOMP, - strActiveDesk, - strNoAddComponent, - SHELL_NO_POLICY - }, - { - REST_NODELDESKCOMP, - strActiveDesk, - strNoDelComponent, - SHELL_NO_POLICY - }, - { - REST_NOCLOSEDESKCOMP, - strActiveDesk, - strNoCloseComponent, - SHELL_NO_POLICY - }, - { - REST_NOCLOSE_DRAGDROPBAND, - strActiveDesk, - strNoCloseDragDrop, - SHELL_NO_POLICY - }, - { - REST_NOMOVINGBAND, - strActiveDesk, - strNoMovingBand, - SHELL_NO_POLICY - }, - { - REST_NOEDITDESKCOMP, - strActiveDesk, - strNoEditComponent, - SHELL_NO_POLICY - }, - { - REST_NORESOLVESEARCH, - strExplorer, - strNoResolveSearch, - SHELL_NO_POLICY - }, - { - REST_NORESOLVETRACK, - strExplorer, - strNoResolveTrk, - SHELL_NO_POLICY - }, - { - REST_FORCECOPYACLWITHFILE, - strExplorer, - strForceCopyACLW, - SHELL_NO_POLICY - }, - { - REST_NOLOGO3CHANNELNOTIFY, - strExplorer, - strNoMSAppLogo, - SHELL_NO_POLICY - }, - { - REST_NOFORGETSOFTWAREUPDATE, - strExplorer, - strNoForgetSoftwareUpdate, - SHELL_NO_POLICY - }, - { - REST_NOSETACTIVEDESKTOP, - strExplorer, - strNoSetActiveDesktop, - SHELL_NO_POLICY - }, - { - REST_NOUPDATEWINDOWS, - strExplorer, - strNoWindowsUpdate, - SHELL_NO_POLICY - }, - { - REST_NOCHANGESTARMENU, - strExplorer, - strNoChangeStartMenu, - SHELL_NO_POLICY - }, - { - REST_NOFOLDEROPTIONS, - strExplorer, - strNoFolderOptions, - SHELL_NO_POLICY - }, - { - REST_HASFINDCOMPUTERS, - strExplorer, - "FindComputers", - SHELL_NO_POLICY - }, - { - REST_INTELLIMENUS, - strExplorer, - "IntelliMenus", - SHELL_NO_POLICY - }, - { - REST_RUNDLGMEMCHECKBOX, - strExplorer, - "MemCheckBoxInRunDlg", - SHELL_NO_POLICY - }, - { - REST_ARP_ShowPostSetup, - strAddRemoveProgs, - "ShowPostSetup", - SHELL_NO_POLICY - }, - { - REST_NOCSC, - strExplorer, - "NoSyncAll", - SHELL_NO_POLICY - }, - { - REST_NOCONTROLPANEL, - strExplorer, - "NoControlPanel", - SHELL_NO_POLICY - }, - { - REST_ENUMWORKGROUP, - strExplorer, - "EnumWorkgroup", - SHELL_NO_POLICY - }, - { - REST_ARP_NOARP, - strAddRemoveProgs, - "NoAddRemovePrograms", - SHELL_NO_POLICY - }, - { - REST_ARP_NOREMOVEPAGE, - strAddRemoveProgs, - "NoRemovePage", - SHELL_NO_POLICY - }, - { - REST_ARP_NOADDPAGE, - strAddRemoveProgs, - "NoAddPage", - SHELL_NO_POLICY - }, - { - REST_ARP_NOWINSETUPPAGE, - strAddRemoveProgs, - "NoWindowsSetupPage", - SHELL_NO_POLICY - }, - { - REST_GREYMSIADS, - strExplorer, - "", - SHELL_NO_POLICY - }, - { - REST_NOCHANGEMAPPEDDRIVELABEL, - strExplorer, - "NoChangeMappedDriveLabel", - SHELL_NO_POLICY - }, - { - REST_NOCHANGEMAPPEDDRIVECOMMENT, - strExplorer, - "NoChangeMappedDriveComment", - SHELL_NO_POLICY - }, - { - REST_MaxRecentDocs, - strExplorer, - "MaxRecentDocs", - SHELL_NO_POLICY - }, - { - REST_NONETWORKCONNECTIONS, - strExplorer, - "NoNetworkConnections", - SHELL_NO_POLICY - }, - { - REST_FORCESTARTMENULOGOFF, - strExplorer, - "ForceStartMenuLogoff", - SHELL_NO_POLICY - }, - { - REST_NOWEBVIEW, - strExplorer, - "NoWebView", - SHELL_NO_POLICY - }, - { - REST_NOCUSTOMIZETHISFOLDER, - strExplorer, - "NoCustomizeThisFolder", - SHELL_NO_POLICY - }, - { - REST_NOENCRYPTION, - strExplorer, - "NoEncryption", - SHELL_NO_POLICY - }, - { - REST_ALLOWFRENCHENCRYPTION, - strExplorer, - "AllowFrenchEncryption", - SHELL_NO_POLICY - }, - { - REST_DONTSHOWSUPERHIDDEN, - strExplorer, - "DontShowSuperHidden", - SHELL_NO_POLICY - }, - { - REST_NOSHELLSEARCHBUTTON, - strExplorer, - "NoShellSearchButton", - SHELL_NO_POLICY - }, - { - REST_NOHARDWARETAB, - strExplorer, - "NoHardwareTab", - SHELL_NO_POLICY - }, - { - REST_NORUNASINSTALLPROMPT, - strExplorer, - "NoRunasInstallPrompt", - SHELL_NO_POLICY - }, - { - REST_PROMPTRUNASINSTALLNETPATH, - strExplorer, - "PromptRunasInstallNetPath", - SHELL_NO_POLICY - }, - { - REST_NOMANAGEMYCOMPUTERVERB, - strExplorer, - "NoManageMyComputerVerb", - SHELL_NO_POLICY - }, - { - REST_NORECENTDOCSNETHOOD, - strExplorer, - "NoRecentDocsNetHood", - SHELL_NO_POLICY - }, - { - REST_DISALLOWRUN, - strExplorer, - "DisallowRun", - SHELL_NO_POLICY - }, - { - REST_NOWELCOMESCREEN, - strExplorer, - "NoWelcomeScreen", - SHELL_NO_POLICY - }, - { - REST_RESTRICTCPL, - strExplorer, - "RestrictCpl", - SHELL_NO_POLICY - }, - { - REST_DISALLOWCPL, - strExplorer, - "DisallowCpl", - SHELL_NO_POLICY - }, - { - REST_NOSMBALLOONTIP, - strExplorer, - "NoSMBalloonTip", - SHELL_NO_POLICY - }, - { - REST_NOSMHELP, - strExplorer, - "NoSMHelp", - SHELL_NO_POLICY - }, - { - REST_NOWINKEYS, - strExplorer, - "NoWinKeys", - SHELL_NO_POLICY - }, - { - REST_NOENCRYPTONMOVE, - strExplorer, - "NoEncryptOnMove", - SHELL_NO_POLICY - }, - { - REST_NOLOCALMACHINERUN, - strExplorer, - "DisableLocalMachineRun", - SHELL_NO_POLICY - }, - { - REST_NOCURRENTUSERRUN, - strExplorer, - "DisableCurrentUserRun", - SHELL_NO_POLICY - }, - { - REST_NOLOCALMACHINERUNONCE, - strExplorer, - "DisableLocalMachineRunOnce", - SHELL_NO_POLICY - }, - { - REST_NOCURRENTUSERRUNONCE, - strExplorer, - "DisableCurrentUserRunOnce", - SHELL_NO_POLICY - }, - { - REST_FORCEACTIVEDESKTOPON, - strExplorer, - "ForceActiveDesktopOn", - SHELL_NO_POLICY - }, - { - REST_NOCOMPUTERSNEARME, - strExplorer, - "NoComputersNearMe", - SHELL_NO_POLICY - }, - { - REST_NOVIEWONDRIVE, - strExplorer, - "NoViewOnDrive", - SHELL_NO_POLICY - }, - { - REST_NONETCRAWL, - strExplorer, - "NoNetCrawl", - SHELL_NO_POLICY - }, - { - REST_NOSHAREDDOCUMENTS, - strExplorer, - "NoSharedDocs", - SHELL_NO_POLICY - }, - { - REST_NOSMMYDOCS, - strExplorer, - "NoSMMyDocs", - SHELL_NO_POLICY - }, -/* 0x4000050 - 0x4000060 */ - { - REST_NONLEGACYSHELLMODE, - strExplorer, - "NoneLegacyShellMode", - SHELL_NO_POLICY - }, - { - REST_STARTRUNNOHOMEPATH, - strExplorer, - "StartRunNoHOMEPATH", - SHELL_NO_POLICY - }, -/* 0x4000061 - 0x4000086 */ - { - REST_NODISCONNECT, - strExplorer, - "NoDisconnect", - SHELL_NO_POLICY - }, - { - REST_NOSECURITY, - strExplorer, - "NoNTSecurity", - SHELL_NO_POLICY - }, - { - REST_NOFILEASSOCIATE, - strExplorer, - "NoFileAssociate", - SHELL_NO_POLICY - }, - { - 0x50000024, - strExplorer, - strNoFileURL, - SHELL_NO_POLICY - }, - { - 0, - 0, - 0, - SHELL_NO_POLICY - } -}; - -/************************************************************************* - * SHRestricted [SHELL32.100] - * - * Get the value associated with a policy Id. - * - * PARAMS - * pol [I] Policy Id - * - * RETURNS - * The queried value for the policy. - * - * NOTES - * Exported by ordinal. - * This function caches the retrieved values to prevent unnecessary registry access, - * if SHInitRestricted() was previously called. - * - * REFERENCES - * a: MS System Policy Editor. - * b: 98Lite 2.0 (which uses many of these policy keys) http://www.98lite.net/ - * c: 'The Windows 95 Registry', by John Woram, 1996 MIS: Press - */ -DWORD WINAPI SHRestricted (RESTRICTIONS policy) -{ - char regstr[256]; - HKEY xhkey; - DWORD retval, datsize = 4; - LPPOLICYDATA p; - - TRACE("(%08x)\n", policy); - - /* scan to see if we know this policy ID */ - for (p = sh32_policy_table; p->policy; p++) - { - if (policy == p->policy) - { - break; - } - } - - if (p->policy == 0) - { - /* we don't know this policy, return 0 */ - TRACE("unknown policy: (%08x)\n", policy); - return 0; - } - - /* we have a known policy */ - - /* first check if this policy has been cached, return it if so */ - if (p->cache != SHELL_NO_POLICY) - { - return p->cache; - } - - lstrcpyA(regstr, strRegistryPolicyA); - lstrcatA(regstr, p->appstr); - - /* return 0 and don't set the cache if any registry errors occur */ - retval = 0; - if (RegOpenKeyA(HKEY_CURRENT_USER, regstr, &xhkey) == ERROR_SUCCESS) - { - if (RegQueryValueExA(xhkey, p->keystr, NULL, NULL, (LPBYTE)&retval, &datsize) == ERROR_SUCCESS) - { - p->cache = retval; - } - RegCloseKey(xhkey); - } - return retval; -} - -/************************************************************************* - * SHInitRestricted [SHELL32.244] - * - * Initialise the policy cache to speed up calls to SHRestricted(). - * - * PARAMS - * unused [I] Reserved. - * inpRegKey [I] Registry key to scan. - * - * RETURNS - * Success: -1. The policy cache is initialised. - * Failure: 0, if inpRegKey is any value other than NULL, "Policy", or - * "Software\Microsoft\Windows\CurrentVersion\Policies". - * - * NOTES - * Exported by ordinal. Introduced in Win98. - */ -BOOL WINAPI SHInitRestricted(LPCVOID unused, LPCVOID inpRegKey) -{ - TRACE("(%p, %p)\n", unused, inpRegKey); - - /* first check - if input is non-NULL and points to the secret - key string, then pass. Otherwise return 0. - */ - if (inpRegKey != NULL) - { - if (SHELL_OsIsUnicode()) - { - if (lstrcmpiW((LPCWSTR)inpRegKey, strRegistryPolicyW) && - lstrcmpiW((LPCWSTR)inpRegKey, strPolicyW)) - /* doesn't match, fail */ - return 0; - } - else - { - if (lstrcmpiA((LPCSTR)inpRegKey, strRegistryPolicyA) && - lstrcmpiA((LPCSTR)inpRegKey, strPolicyA)) - /* doesn't match, fail */ - return 0; - } - } - - return TRUE; -} +/* + * shpolicy.c - Data for shell/system policies. + * + * Copyright 1999 Ian Schmidt + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * NOTES: + * + * Some of these policies can be tweaked via the System Policy + * Editor which came with the Win95 Migration Guide, although + * there doesn't appear to be an updated Win98 version that + * would handle the many new policies introduced since then. + * You could easily write one with the information in + * this file... + * + * Up to date as of SHELL32 v5.00 (W2K) + */ + +#include +#include +#include + +#include "windef.h" +#include "winbase.h" +#include "winerror.h" +#include "winreg.h" + +#include "shell32_main.h" +#include "shlobj.h" + +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(shell); + +#define SHELL_NO_POLICY 0xffffffff + +typedef struct tagPOLICYDAT +{ + DWORD policy; /* policy value passed to SHRestricted */ + LPCSTR appstr; /* application str such as "Explorer" */ + LPCSTR keystr; /* name of the actual registry key / policy */ + DWORD cache; /* cached value or 0xffffffff for invalid */ +} POLICYDATA, *LPPOLICYDATA; + +/* registry strings */ +static const CHAR strRegistryPolicyA[] = "Software\\Microsoft\\Windows\\CurrentVersion\\Policies"; +static const WCHAR strRegistryPolicyW[] = {'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', + '\\','P','o','l','i','c','i','e','s',0}; +static const CHAR strPolicyA[] = "Policy"; +static const WCHAR strPolicyW[] = {'P','o','l','i','c','y',0}; + +/* application strings */ + +static const char strExplorer[] = {"Explorer"}; +static const char strActiveDesk[] = {"ActiveDesktop"}; +static const char strWinOldApp[] = {"WinOldApp"}; +static const char strAddRemoveProgs[] = {"AddRemoveProgs"}; + +/* key strings */ + +static const char strNoFileURL[] = {"NoFileUrl"}; +static const char strNoFolderOptions[] = {"NoFolderOptions"}; +static const char strNoChangeStartMenu[] = {"NoChangeStartMenu"}; +static const char strNoWindowsUpdate[] = {"NoWindowsUpdate"}; +static const char strNoSetActiveDesktop[] = {"NoSetActiveDesktop"}; +static const char strNoForgetSoftwareUpdate[] = {"NoForgetSoftwareUpdate"}; +static const char strNoMSAppLogo[] = {"NoMSAppLogo5ChannelNotify"}; +static const char strForceCopyACLW[] = {"ForceCopyACLWithFile"}; +static const char strNoResolveTrk[] = {"NoResolveTrack"}; +static const char strNoResolveSearch[] = {"NoResolveSearch"}; +static const char strNoEditComponent[] = {"NoEditingComponents"}; +static const char strNoMovingBand[] = {"NoMovingBands"}; +static const char strNoCloseDragDrop[] = {"NoCloseDragDropBands"}; +static const char strNoCloseComponent[] = {"NoClosingComponents"}; +static const char strNoDelComponent[] = {"NoDeletingComponents"}; +static const char strNoAddComponent[] = {"NoAddingComponents"}; +static const char strNoComponent[] = {"NoComponents"}; +static const char strNoChangeWallpaper[] = {"NoChangingWallpaper"}; +static const char strNoHTMLWallpaper[] = {"NoHTMLWallpaper"}; +static const char strNoCustomWebView[] = {"NoCustomizeWebView"}; +static const char strClassicShell[] = {"ClassicShell"}; +static const char strClearRecentDocs[] = {"ClearRecentDocsOnExit"}; +static const char strNoFavoritesMenu[] = {"NoFavoritesMenu"}; +static const char strNoActiveDesktopChanges[] = {"NoActiveDesktopChanges"}; +static const char strNoActiveDesktop[] = {"NoActiveDesktop"}; +static const char strNoRecentDocMenu[] = {"NoRecentDocsMenu"}; +static const char strNoRecentDocHistory[] = {"NoRecentDocsHistory"}; +static const char strNoInetIcon[] = {"NoInternetIcon"}; +static const char strNoSettingsWizard[] = {"NoSettingsWizards"}; +static const char strNoLogoff[] = {"NoLogoff"}; +static const char strNoNetConDis[] = {"NoNetConnectDisconnect"}; +static const char strNoViewContextMenu[] = {"NoViewContextMenu"}; +static const char strNoTrayContextMenu[] = {"NoTrayContextMenu"}; +static const char strNoWebMenu[] = {"NoWebMenu"}; +static const char strLnkResolveIgnoreLnkInfo[] = {"LinkResolveIgnoreLinkInfo"}; +static const char strNoCommonGroups[] = {"NoCommonGroups"}; +static const char strEnforceShlExtSecurity[] = {"EnforceShellExtensionSecurity"}; +static const char strNoRealMode[] = {"NoRealMode"}; +static const char strMyDocsOnNet[] = {"MyDocsOnNet"}; +static const char strNoStartMenuSubfolder[] = {"NoStartMenuSubFolders"}; +static const char strNoAddPrinters[] = {"NoAddPrinter"}; +static const char strNoDeletePrinters[] = {"NoDeletePrinter"}; +static const char strNoPrintTab[] = {"NoPrinterTabs"}; +static const char strRestrictRun[] = {"RestrictRun"}; +static const char strNoStartBanner[] = {"NoStartBanner"}; +static const char strNoNetworkNeighborhood[] = {"NoNetHood"}; +static const char strNoDriveTypeAtRun[] = {"NoDriveTypeAutoRun"}; +static const char strNoDrivesAutoRun[] = {"NoDriveAutoRun"}; +static const char strSeparateProcess[] = {"SeparateProcess"}; +static const char strNoDrives[] = {"NoDrives"}; +static const char strNoFind[] = {"NoFind"}; +static const char strNoDesktop[] = {"NoDesktop"}; +static const char strNoSetTaskBar[] = {"NoSetTaskbar"}; +static const char strNoSetFld[] = {"NoSetFolders"}; +static const char strNoFileMenu[] = {"NoFileMenu"}; +static const char strNoSaveSetting[] = {"NoSaveSettings"}; +static const char strNoClose[] = {"NoClose"}; +static const char strNoRun[] = {"NoRun"}; + +/* policy data array */ +POLICYDATA sh32_policy_table[] = +{ + { + REST_NORUN, + strExplorer, + strNoRun, + SHELL_NO_POLICY + }, + { + REST_NOCLOSE, + strExplorer, + strNoClose, + SHELL_NO_POLICY + }, + { + REST_NOSAVESET, + strExplorer, + strNoSaveSetting, + SHELL_NO_POLICY + }, + { + REST_NOFILEMENU, + strExplorer, + strNoFileMenu, + SHELL_NO_POLICY + }, + { + REST_NOSETFOLDERS, + strExplorer, + strNoSetFld, + SHELL_NO_POLICY + }, + { + REST_NOSETTASKBAR, + strExplorer, + strNoSetTaskBar, + SHELL_NO_POLICY + }, + { + REST_NODESKTOP, + strExplorer, + strNoDesktop, + SHELL_NO_POLICY + }, + { + REST_NOFIND, + strExplorer, + strNoFind, + SHELL_NO_POLICY + }, + { + REST_NODRIVES, + strExplorer, + strNoDrives, + SHELL_NO_POLICY + }, + { + REST_NODRIVEAUTORUN, + strExplorer, + strNoDrivesAutoRun, + SHELL_NO_POLICY + }, + { + REST_NODRIVETYPEAUTORUN, + strExplorer, + strNoDriveTypeAtRun, + SHELL_NO_POLICY + }, + { + REST_NONETHOOD, + strExplorer, + strNoNetworkNeighborhood, + SHELL_NO_POLICY + }, + { + REST_STARTBANNER, + strExplorer, + strNoStartBanner, + SHELL_NO_POLICY + }, + { + REST_RESTRICTRUN, + strExplorer, + strRestrictRun, + SHELL_NO_POLICY + }, + { + REST_NOPRINTERTABS, + strExplorer, + strNoPrintTab, + SHELL_NO_POLICY + }, + { + REST_NOPRINTERDELETE, + strExplorer, + strNoDeletePrinters, + SHELL_NO_POLICY + }, + { + REST_NOPRINTERADD, + strExplorer, + strNoAddPrinters, + SHELL_NO_POLICY + }, + { + REST_NOSTARTMENUSUBFOLDERS, + strExplorer, + strNoStartMenuSubfolder, + SHELL_NO_POLICY + }, + { + REST_MYDOCSONNET, + strExplorer, + strMyDocsOnNet, + SHELL_NO_POLICY + }, + { + REST_NOEXITTODOS, + strWinOldApp, + strNoRealMode, + SHELL_NO_POLICY + }, + { + REST_ENFORCESHELLEXTSECURITY, + strExplorer, + strEnforceShlExtSecurity, + SHELL_NO_POLICY + }, + { + REST_LINKRESOLVEIGNORELINKINFO, + strExplorer, + strLnkResolveIgnoreLnkInfo, + SHELL_NO_POLICY + }, + { + REST_NOCOMMONGROUPS, + strExplorer, + strNoCommonGroups, + SHELL_NO_POLICY + }, + { + REST_SEPARATEDESKTOPPROCESS, + strExplorer, + strSeparateProcess, + SHELL_NO_POLICY + }, + { + REST_NOWEB, + strExplorer, + strNoWebMenu, + SHELL_NO_POLICY + }, + { + REST_NOTRAYCONTEXTMENU, + strExplorer, + strNoTrayContextMenu, + SHELL_NO_POLICY + }, + { + REST_NOVIEWCONTEXTMENU, + strExplorer, + strNoViewContextMenu, + SHELL_NO_POLICY + }, + { + REST_NONETCONNECTDISCONNECT, + strExplorer, + strNoNetConDis, + SHELL_NO_POLICY + }, + { + REST_STARTMENULOGOFF, + strExplorer, + strNoLogoff, + SHELL_NO_POLICY + }, + { + REST_NOSETTINGSASSIST, + strExplorer, + strNoSettingsWizard, + SHELL_NO_POLICY + }, + { + REST_NOINTERNETICON, + strExplorer, + strNoInetIcon, + SHELL_NO_POLICY + }, + { + REST_NORECENTDOCSHISTORY, + strExplorer, + strNoRecentDocHistory, + SHELL_NO_POLICY + }, + { + REST_NORECENTDOCSMENU, + strExplorer, + strNoRecentDocMenu, + SHELL_NO_POLICY + }, + { + REST_NOACTIVEDESKTOP, + strExplorer, + strNoActiveDesktop, + SHELL_NO_POLICY + }, + { + REST_NOACTIVEDESKTOPCHANGES, + strExplorer, + strNoActiveDesktopChanges, + SHELL_NO_POLICY + }, + { + REST_NOFAVORITESMENU, + strExplorer, + strNoFavoritesMenu, + SHELL_NO_POLICY + }, + { + REST_CLEARRECENTDOCSONEXIT, + strExplorer, + strClearRecentDocs, + SHELL_NO_POLICY + }, + { + REST_CLASSICSHELL, + strExplorer, + strClassicShell, + SHELL_NO_POLICY + }, + { + REST_NOCUSTOMIZEWEBVIEW, + strExplorer, + strNoCustomWebView, + SHELL_NO_POLICY + }, + { + REST_NOHTMLWALLPAPER, + strActiveDesk, + strNoHTMLWallpaper, + SHELL_NO_POLICY + }, + { + REST_NOCHANGINGWALLPAPER, + strActiveDesk, + strNoChangeWallpaper, + SHELL_NO_POLICY + }, + { + REST_NODESKCOMP, + strActiveDesk, + strNoComponent, + SHELL_NO_POLICY + }, + { + REST_NOADDDESKCOMP, + strActiveDesk, + strNoAddComponent, + SHELL_NO_POLICY + }, + { + REST_NODELDESKCOMP, + strActiveDesk, + strNoDelComponent, + SHELL_NO_POLICY + }, + { + REST_NOCLOSEDESKCOMP, + strActiveDesk, + strNoCloseComponent, + SHELL_NO_POLICY + }, + { + REST_NOCLOSE_DRAGDROPBAND, + strActiveDesk, + strNoCloseDragDrop, + SHELL_NO_POLICY + }, + { + REST_NOMOVINGBAND, + strActiveDesk, + strNoMovingBand, + SHELL_NO_POLICY + }, + { + REST_NOEDITDESKCOMP, + strActiveDesk, + strNoEditComponent, + SHELL_NO_POLICY + }, + { + REST_NORESOLVESEARCH, + strExplorer, + strNoResolveSearch, + SHELL_NO_POLICY + }, + { + REST_NORESOLVETRACK, + strExplorer, + strNoResolveTrk, + SHELL_NO_POLICY + }, + { + REST_FORCECOPYACLWITHFILE, + strExplorer, + strForceCopyACLW, + SHELL_NO_POLICY + }, + { + REST_NOLOGO3CHANNELNOTIFY, + strExplorer, + strNoMSAppLogo, + SHELL_NO_POLICY + }, + { + REST_NOFORGETSOFTWAREUPDATE, + strExplorer, + strNoForgetSoftwareUpdate, + SHELL_NO_POLICY + }, + { + REST_NOSETACTIVEDESKTOP, + strExplorer, + strNoSetActiveDesktop, + SHELL_NO_POLICY + }, + { + REST_NOUPDATEWINDOWS, + strExplorer, + strNoWindowsUpdate, + SHELL_NO_POLICY + }, + { + REST_NOCHANGESTARMENU, + strExplorer, + strNoChangeStartMenu, + SHELL_NO_POLICY + }, + { + REST_NOFOLDEROPTIONS, + strExplorer, + strNoFolderOptions, + SHELL_NO_POLICY + }, + { + REST_HASFINDCOMPUTERS, + strExplorer, + "FindComputers", + SHELL_NO_POLICY + }, + { + REST_INTELLIMENUS, + strExplorer, + "IntelliMenus", + SHELL_NO_POLICY + }, + { + REST_RUNDLGMEMCHECKBOX, + strExplorer, + "MemCheckBoxInRunDlg", + SHELL_NO_POLICY + }, + { + REST_ARP_ShowPostSetup, + strAddRemoveProgs, + "ShowPostSetup", + SHELL_NO_POLICY + }, + { + REST_NOCSC, + strExplorer, + "NoSyncAll", + SHELL_NO_POLICY + }, + { + REST_NOCONTROLPANEL, + strExplorer, + "NoControlPanel", + SHELL_NO_POLICY + }, + { + REST_ENUMWORKGROUP, + strExplorer, + "EnumWorkgroup", + SHELL_NO_POLICY + }, + { + REST_ARP_NOARP, + strAddRemoveProgs, + "NoAddRemovePrograms", + SHELL_NO_POLICY + }, + { + REST_ARP_NOREMOVEPAGE, + strAddRemoveProgs, + "NoRemovePage", + SHELL_NO_POLICY + }, + { + REST_ARP_NOADDPAGE, + strAddRemoveProgs, + "NoAddPage", + SHELL_NO_POLICY + }, + { + REST_ARP_NOWINSETUPPAGE, + strAddRemoveProgs, + "NoWindowsSetupPage", + SHELL_NO_POLICY + }, + { + REST_GREYMSIADS, + strExplorer, + "", + SHELL_NO_POLICY + }, + { + REST_NOCHANGEMAPPEDDRIVELABEL, + strExplorer, + "NoChangeMappedDriveLabel", + SHELL_NO_POLICY + }, + { + REST_NOCHANGEMAPPEDDRIVECOMMENT, + strExplorer, + "NoChangeMappedDriveComment", + SHELL_NO_POLICY + }, + { + REST_MaxRecentDocs, + strExplorer, + "MaxRecentDocs", + SHELL_NO_POLICY + }, + { + REST_NONETWORKCONNECTIONS, + strExplorer, + "NoNetworkConnections", + SHELL_NO_POLICY + }, + { + REST_FORCESTARTMENULOGOFF, + strExplorer, + "ForceStartMenuLogoff", + SHELL_NO_POLICY + }, + { + REST_NOWEBVIEW, + strExplorer, + "NoWebView", + SHELL_NO_POLICY + }, + { + REST_NOCUSTOMIZETHISFOLDER, + strExplorer, + "NoCustomizeThisFolder", + SHELL_NO_POLICY + }, + { + REST_NOENCRYPTION, + strExplorer, + "NoEncryption", + SHELL_NO_POLICY + }, + { + REST_ALLOWFRENCHENCRYPTION, + strExplorer, + "AllowFrenchEncryption", + SHELL_NO_POLICY + }, + { + REST_DONTSHOWSUPERHIDDEN, + strExplorer, + "DontShowSuperHidden", + SHELL_NO_POLICY + }, + { + REST_NOSHELLSEARCHBUTTON, + strExplorer, + "NoShellSearchButton", + SHELL_NO_POLICY + }, + { + REST_NOHARDWARETAB, + strExplorer, + "NoHardwareTab", + SHELL_NO_POLICY + }, + { + REST_NORUNASINSTALLPROMPT, + strExplorer, + "NoRunasInstallPrompt", + SHELL_NO_POLICY + }, + { + REST_PROMPTRUNASINSTALLNETPATH, + strExplorer, + "PromptRunasInstallNetPath", + SHELL_NO_POLICY + }, + { + REST_NOMANAGEMYCOMPUTERVERB, + strExplorer, + "NoManageMyComputerVerb", + SHELL_NO_POLICY + }, + { + REST_NORECENTDOCSNETHOOD, + strExplorer, + "NoRecentDocsNetHood", + SHELL_NO_POLICY + }, + { + REST_DISALLOWRUN, + strExplorer, + "DisallowRun", + SHELL_NO_POLICY + }, + { + REST_NOWELCOMESCREEN, + strExplorer, + "NoWelcomeScreen", + SHELL_NO_POLICY + }, + { + REST_RESTRICTCPL, + strExplorer, + "RestrictCpl", + SHELL_NO_POLICY + }, + { + REST_DISALLOWCPL, + strExplorer, + "DisallowCpl", + SHELL_NO_POLICY + }, + { + REST_NOSMBALLOONTIP, + strExplorer, + "NoSMBalloonTip", + SHELL_NO_POLICY + }, + { + REST_NOSMHELP, + strExplorer, + "NoSMHelp", + SHELL_NO_POLICY + }, + { + REST_NOWINKEYS, + strExplorer, + "NoWinKeys", + SHELL_NO_POLICY + }, + { + REST_NOENCRYPTONMOVE, + strExplorer, + "NoEncryptOnMove", + SHELL_NO_POLICY + }, + { + REST_NOLOCALMACHINERUN, + strExplorer, + "DisableLocalMachineRun", + SHELL_NO_POLICY + }, + { + REST_NOCURRENTUSERRUN, + strExplorer, + "DisableCurrentUserRun", + SHELL_NO_POLICY + }, + { + REST_NOLOCALMACHINERUNONCE, + strExplorer, + "DisableLocalMachineRunOnce", + SHELL_NO_POLICY + }, + { + REST_NOCURRENTUSERRUNONCE, + strExplorer, + "DisableCurrentUserRunOnce", + SHELL_NO_POLICY + }, + { + REST_FORCEACTIVEDESKTOPON, + strExplorer, + "ForceActiveDesktopOn", + SHELL_NO_POLICY + }, + { + REST_NOCOMPUTERSNEARME, + strExplorer, + "NoComputersNearMe", + SHELL_NO_POLICY + }, + { + REST_NOVIEWONDRIVE, + strExplorer, + "NoViewOnDrive", + SHELL_NO_POLICY + }, + { + REST_NONETCRAWL, + strExplorer, + "NoNetCrawl", + SHELL_NO_POLICY + }, + { + REST_NOSHAREDDOCUMENTS, + strExplorer, + "NoSharedDocs", + SHELL_NO_POLICY + }, + { + REST_NOSMMYDOCS, + strExplorer, + "NoSMMyDocs", + SHELL_NO_POLICY + }, +/* 0x4000050 - 0x4000060 */ + { + REST_NONLEGACYSHELLMODE, + strExplorer, + "NoneLegacyShellMode", + SHELL_NO_POLICY + }, + { + REST_STARTRUNNOHOMEPATH, + strExplorer, + "StartRunNoHOMEPATH", + SHELL_NO_POLICY + }, +/* 0x4000061 - 0x4000086 */ + { + REST_NODISCONNECT, + strExplorer, + "NoDisconnect", + SHELL_NO_POLICY + }, + { + REST_NOSECURITY, + strExplorer, + "NoNTSecurity", + SHELL_NO_POLICY + }, + { + REST_NOFILEASSOCIATE, + strExplorer, + "NoFileAssociate", + SHELL_NO_POLICY + }, + { + 0x50000024, + strExplorer, + strNoFileURL, + SHELL_NO_POLICY + }, + { + 0, + 0, + 0, + SHELL_NO_POLICY + } +}; + +/************************************************************************* + * SHRestricted [SHELL32.100] + * + * Get the value associated with a policy Id. + * + * PARAMS + * pol [I] Policy Id + * + * RETURNS + * The queried value for the policy. + * + * NOTES + * Exported by ordinal. + * This function caches the retrieved values to prevent unnecessary registry access, + * if SHInitRestricted() was previously called. + * + * REFERENCES + * a: MS System Policy Editor. + * b: 98Lite 2.0 (which uses many of these policy keys) http://www.98lite.net/ + * c: 'The Windows 95 Registry', by John Woram, 1996 MIS: Press + */ +DWORD WINAPI SHRestricted (RESTRICTIONS policy) +{ + char regstr[256]; + HKEY xhkey; + DWORD retval, datsize = 4; + LPPOLICYDATA p; + + TRACE("(%08x)\n", policy); + + /* scan to see if we know this policy ID */ + for (p = sh32_policy_table; p->policy; p++) + { + if (policy == p->policy) + { + break; + } + } + + if (p->policy == 0) + { + /* we don't know this policy, return 0 */ + TRACE("unknown policy: (%08x)\n", policy); + return 0; + } + + /* we have a known policy */ + + /* first check if this policy has been cached, return it if so */ + if (p->cache != SHELL_NO_POLICY) + { + return p->cache; + } + + lstrcpyA(regstr, strRegistryPolicyA); + lstrcatA(regstr, p->appstr); + + /* return 0 and don't set the cache if any registry errors occur */ + retval = 0; + if (RegOpenKeyA(HKEY_CURRENT_USER, regstr, &xhkey) == ERROR_SUCCESS) + { + if (RegQueryValueExA(xhkey, p->keystr, NULL, NULL, (LPBYTE)&retval, &datsize) == ERROR_SUCCESS) + { + p->cache = retval; + } + RegCloseKey(xhkey); + } + return retval; +} + +/************************************************************************* + * SHInitRestricted [SHELL32.244] + * + * Initialise the policy cache to speed up calls to SHRestricted(). + * + * PARAMS + * unused [I] Reserved. + * inpRegKey [I] Registry key to scan. + * + * RETURNS + * Success: -1. The policy cache is initialised. + * Failure: 0, if inpRegKey is any value other than NULL, "Policy", or + * "Software\Microsoft\Windows\CurrentVersion\Policies". + * + * NOTES + * Exported by ordinal. Introduced in Win98. + */ +BOOL WINAPI SHInitRestricted(LPCVOID unused, LPCVOID inpRegKey) +{ + TRACE("(%p, %p)\n", unused, inpRegKey); + + /* first check - if input is non-NULL and points to the secret + key string, then pass. Otherwise return 0. + */ + if (inpRegKey != NULL) + { + if (SHELL_OsIsUnicode()) + { + if (lstrcmpiW((LPCWSTR)inpRegKey, strRegistryPolicyW) && + lstrcmpiW((LPCWSTR)inpRegKey, strPolicyW)) + /* doesn't match, fail */ + return 0; + } + else + { + if (lstrcmpiA((LPCSTR)inpRegKey, strRegistryPolicyA) && + lstrcmpiA((LPCSTR)inpRegKey, strPolicyA)) + /* doesn't match, fail */ + return 0; + } + } + + return TRUE; +} diff --git a/reactos/lib/shell32/shres.rc b/reactos/lib/shell32/shres.rc index 21ab4ced7d5..66a6f3b81fb 100644 --- a/reactos/lib/shell32/shres.rc +++ b/reactos/lib/shell32/shres.rc @@ -1,16642 +1,16642 @@ -/* - * Top level resource file for shell stuff - * - * Copyright 1998 Juergen Schmied - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include "windef.h" -#include "winbase.h" -#include "winuser.h" -#include "winnls.h" -#include "wingdi.h" -#include "shlobj.h" -#include "shresdef.h" - -#include "version.rc" - -LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL - -shv_accel ACCELERATORS -BEGIN - VK_F5, FCIDM_SHVIEW_REFRESH, VIRTKEY -END - -/* BINRES document.ico */ -1 ICON document.ico -/* { - '00 00 01 00 08 00 20 20 00 00 01 00 08 00 A8 08' - '00 00 86 00 00 00 10 10 00 00 01 00 08 00 68 05' - '00 00 2E 09 00 00 20 20 00 00 01 00 04 00 E8 02' - '00 00 96 0E 00 00 10 10 00 00 01 00 04 00 28 01' - '00 00 7E 11 00 00 30 30 00 00 01 00 08 00 A8 0E' - '00 00 A6 12 00 00 30 30 00 00 01 00 20 00 A8 25' - '00 00 4E 21 00 00 20 20 00 00 01 00 20 00 A8 10' - '00 00 F6 46 00 00 10 10 00 00 01 00 20 00 68 04' - '00 00 9E 57 00 00 28 00 00 00 20 00 00 00 40 00' - '00 00 01 00 08 00 00 00 00 00 00 04 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 11 11 11 00 22 22 22 00 33 33 33 00 55 55' - '55 00 66 66 66 00 77 77 77 00 7F 7F 7F 00 88 88' - '88 00 99 99 99 00 AA AA AA 00 BB BB BB 00 CC CC' - 'CC 00 DD DD DD 00 EE EE EE 00 FF FF FF 00 00 00' - '00 00 33 00 32 00 5C 00 64 00 6F 00 63 00 75 00' - '6D 00 65 00 6E 00 74 00 2E 00 69 00 63 00 6F 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 C0 17 95 00 00 00 38 00 A8 44' - 'F9 77 13 00 00 00 18 0A 38 00 00 00 38 00 18 6C' - '38 00 98 17 95 00 00 00 00 00 E0 19 95 00 F0 88' - 'FA 77 70 38 F5 77 FF FF FF FF A8 44 F9 77 70 7D' - 'F5 77 3A 8A F5 77 86 00 00 00 86 00 00 00 08 00' - '00 00 B0 18 95 00 00 00 00 00 CB 44 F9 77 38 9F' - '07 00 CD 8B F5 77 78 13 05 00 37 90 F5 77 00 00' - '00 00 3E 8A F5 77 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 10 00' - '00 00 00 00 00 00 5A 00 5C 00 00 EC FD 7F 1A 02' - '00 00 4C 16 95 00 40 9F 07 00 FC 15 95 00 FF FF' - 'FF FF B4 1A 95 00 45 00 00 00 28 02 00 00 FF FF' - 'FF FF E2 D8 F5 77 7D 9B F5 77 94 B6 01 00 00 00' - '05 00 F4 17 95 00 80 00 10 C0 B4 1A 95 00 F0 88' - 'FA 77 88 1C F5 77 FF FF FF FF 37 90 F5 77 00 00' - '00 00 3E 8A F5 77 9B B2 E7 77 B7 00 00 00 02 00' - '00 00 A4 1A 95 00 01 00 00 00 18 00 00 00 00 00' - '00 00 10 19 95 00 42 00 00 00 00 00 00 00 F4 18' - '95 00 00 00 00 00 00 00 00 00 00 00 00 00 0C 00' - '00 00 02 00 00 00 01 01 F5 77 00 EC FD 7F 5A 00' - '00 00 00 00 00 00 03 00 00 00 62 00 1A 02 40 9F' - '07 00 00 00 00 00 40 9F 07 00 05 00 00 00 BE B3' - 'E7 77 4C 19 95 00 A3 B4 E7 77 F8 00 00 00 00 00' - '00 C0 00 00 00 00 00 00 00 00 02 00 00 00 80 00' - '00 00 00 00 00 00 8C 1A 95 00 7F E9 4B 00 08 6C' - '0C 01 00 00 00 C0 00 00 00 00 80 1A 95 00 02 00' - '00 00 80 00 00 00 00 00 00 00 C0 27 95 00 C4 F5' - 'AF 00 02 00 00 00 44 3A 5C 6F 73 65 78 70 65 72' - '74 73 5C 72 65 61 63 74 6F 73 5C 6C 69 62 5C 73' - '68 65 6C 6C 33 32 5C 64 6F 63 75 6D 65 6E 74 2E' - '69 63 6F 00 4B 00 14 1A 95 00 1F 3B D4 77 13 00' - '00 00 98 00 00 00 4F 3B D4 77 E0 19 95 00 33 3B' - 'D4 77 64 C5 F5 77 A9 F1 E7 77 F8 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 1A 95 00 18 6C' - '38 00 86 00 00 00 00 00 00 00 C9 F1 E7 77 86 00' - '00 00 A4 1A 95 00 08 00 00 00 00 00 00 00 86 00' - '00 00 86 00 00 00 08 00 00 00 F4 19 95 00 33 3B' - 'D4 77 B4 1A 95 00 09 48 E9 77 B8 10 E9 77 FF FF' - 'FF FF C9 F1 E7 77 16 EA 4B 00 F8 00 00 00 18 6C' - '38 00 86 00 00 00 58 1A 95 00 00 00 00 00 00 00' - '00 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10' - '10 10 10 00 00 00 00 00 00 00 00 00 00 00 00 00' - '10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10' - '10 10 10 10 00 00 00 00 00 00 00 00 00 00 00 00' - '10 01 08 09 09 09 09 09 09 08 09 09 08 09 09 08' - '06 03 10 10 10 00 00 00 00 00 00 00 00 00 00 00' - '10 02 0C 0E 0E 0E 0E 0E 0E 0E 0E 0E 0E 0E 0E 0F' - '0B 08 03 10 10 10 00 00 00 00 00 00 00 00 00 00' - '10 01 0C 0E 0D 0D 0D 0D 0D 0D 0D 0D 0D 0D 0D 0D' - '0A 0C 0A 02 10 10 10 00 00 00 00 00 00 00 00 00' - '10 02 0B 0E 0D 0D 0D 0D 0D 0D 0D 0D 0D 0D 0D 0E' - '0A 0D 0D 0A 02 10 10 10 00 00 00 00 00 00 00 00' - '10 01 0C 0E 0D 0D 0D 0D 0D 0D 0E 0D 0D 0E 0D 0D' - '0B 0D 0E 0E 0A 03 10 10 10 00 00 00 00 00 00 00' - '10 02 0C 0E 0D 0D 0D 0E 0D 0D 0D 0D 0E 0D 0E 0D' - '0A 0D 0F 0E 0E 09 02 10 10 00 00 00 00 00 00 00' - '10 01 0C 0E 0D 0E 0D 0D 0D 0E 0D 0E 0D 0D 0E 0D' - '0B 0D 0E 0F 0E 0F 0A 02 10 10 00 00 00 00 00 00' - '10 02 0C 0E 0D 0D 0E 0D 0E 0D 0D 0E 0E 0D 0D 0E' - '0A 0E 0F 0E 0F 0F 0F 0A 02 10 10 10 00 00 00 00' - '10 01 0C 0E 0D 0E 0E 0D 0D 0E 0E 0D 0D 0E 0E 0E' - '0A 0D 0E 0E 0E 0E 0E 0E 09 03 10 10 00 00 00 00' - '10 02 0C 0E 0E 0D 0D 0E 0E 0D 0E 0E 0E 0D 0E 0E' - '0C 0A 0B 0B 0B 0A 0B 0B 0B 06 10 10 00 00 00 00' - '10 01 0C 0F 0D 0E 0E 0D 0E 0E 0D 0E 0D 0E 0D 0E' - '0E 0E 0E 0E 0E 0E 0E 0E 0F 09 10 10 00 00 00 00' - '10 02 0C 0E 0E 0E 0E 0E 0D 0E 0E 0E 0E 0E 0E 0E' - '0E 0E 0E 0E 0E 0E 0E 0E 0E 08 10 10 00 00 00 00' - '10 01 0C 0F 0E 0E 0E 0E 0E 0E 0E 0E 0E 0E 0E 0E' - '0E 0E 0E 0E 0E 0E 0E 0E 0F 09 10 10 00 00 00 00' - '10 02 0C 0F 0E 0E 0E 0E 0E 0E 0E 0E 0E 0E 0E 0E' - '0E 0F 0E 0E 0E 0E 0E 0F 0E 09 10 10 00 00 00 00' - '10 01 0C 0F 0E 0E 0E 0E 0F 0E 0F 0E 0E 0E 0F 0E' - '0E 0E 0E 0E 0F 0E 0F 0E 0F 09 10 10 00 00 00 00' - '10 02 0C 0F 0E 0F 0E 0F 0E 0F 0E 0F 0F 0F 0E 0F' - '0F 0E 0F 0E 0E 0E 0E 0F 0F 08 10 10 00 00 00 00' - '10 02 0C 0F 0E 0E 0F 0E 0F 0E 0F 0F 0F 0E 0F 0F' - '0F 0F 0F 0F 0F 0F 0F 0E 0F 09 10 10 00 00 00 00' - '10 02 0C 0F 0F 0E 0E 0F 0E 0F 0E 0F 0E 0F 0F 0E' - '0F 0F 0F 0F 0F 0F 0F 0F 0F 09 10 10 00 00 00 00' - '10 02 0C 0F 0E 0F 0F 0E 0F 0F 0F 0F 0F 0F 0F 0F' - '0F 0F 0F 0F 0F 0F 0F 0F 0F 09 10 10 00 00 00 00' - '10 02 0C 0F 0F 0E 0F 0F 0E 0F 0F 0E 0F 0F 0F 0F' - '0F 0F 0F 0F 0F 0F 0F 0F 0F 09 10 10 00 00 00 00' - '10 02 0C 0F 0F 0F 0E 0F 0F 0E 0F 0F 0F 0F 0F 0F' - '0F 0F 0F 0F 0F 0F 0F 0F 0F 09 10 10 00 00 00 00' - '10 02 0D 0F 0E 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F' - '0F 0F 0F 0F 0F 0F 0F 0F 0F 09 10 10 00 00 00 00' - '10 02 0C 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F' - '0F 0F 0F 0F 0F 0F 0F 0F 0F 09 10 10 00 00 00 00' - '10 02 0D 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F' - '0F 0F 0F 0F 0F 0F 0F 0F 0F 09 10 10 00 00 00 00' - '10 01 0D 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F' - '0F 0F 0F 0F 0F 0F 0F 0F 0F 0A 10 10 00 00 00 00' - '10 02 0C 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F' - '0F 0F 0F 0F 0F 0F 0F 0F 0F 09 10 10 00 00 00 00' - '10 02 0D 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F' - '0F 0F 0F 0F 0F 0F 0F 0F 0F 09 10 10 00 00 00 00' - '10 02 0D 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F' - '0F 0F 0F 0F 0F 0F 0F 0F 0F 0A 10 10 00 00 00 00' - '10 01 06 08 06 06 06 06 06 06 06 06 06 06 06 06' - '06 06 05 06 05 06 05 05 06 04 10 10 00 00 00 00' - '10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10' - '10 10 10 10 10 10 10 10 10 10 10 10 00 00 E0 00' - '07 FF C0 00 03 FF C0 00 01 FF C0 00 00 FF C0 00' - '00 7F C0 00 00 3F C0 00 00 1F C0 00 00 1F C0 00' - '00 0F C0 00 00 03 C0 00 00 03 C0 00 00 03 C0 00' - '00 03 C0 00 00 03 C0 00 00 03 C0 00 00 03 C0 00' - '00 03 C0 00 00 03 C0 00 00 03 C0 00 00 03 C0 00' - '00 03 C0 00 00 03 C0 00 00 03 C0 00 00 03 C0 00' - '00 03 C0 00 00 03 C0 00 00 03 C0 00 00 03 C0 00' - '00 03 C0 00 00 03 C0 00 00 03 C0 00 00 03 28 00' - '00 00 10 00 00 00 20 00 00 00 01 00 08 00 00 00' - '00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 11 11 11 00 33 33' - '33 00 44 44 44 00 77 77 77 00 7F 7F 7F 00 99 99' - '99 00 AA AA AA 00 BB BB BB 00 CC CC CC 00 DD DD' - 'DD 00 EE EE EE 00 FF FF FF 00 00 00 00 00 EE EE' - 'EE 00 FF FF FF 00 00 00 00 00 33 00 32 00 5C 00' - '64 00 6F 00 63 00 75 00 6D 00 65 00 6E 00 74 00' - '2E 00 69 00 63 00 6F 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 C0 17' - '95 00 00 00 38 00 A8 44 F9 77 13 00 00 00 18 0A' - '38 00 00 00 38 00 18 6C 38 00 98 17 95 00 00 00' - '00 00 E0 19 95 00 F0 88 FA 77 70 38 F5 77 FF FF' - 'FF FF A8 44 F9 77 70 7D F5 77 3A 8A F5 77 86 00' - '00 00 86 00 00 00 08 00 00 00 B0 18 95 00 00 00' - '00 00 CB 44 F9 77 38 9F 07 00 CD 8B F5 77 78 13' - '05 00 37 90 F5 77 00 00 00 00 3E 8A F5 77 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 10 00 00 00 00 00 00 00 5A 00' - '5C 00 00 EC FD 7F 1A 02 00 00 4C 16 95 00 40 9F' - '07 00 FC 15 95 00 FF FF FF FF B4 1A 95 00 45 00' - '00 00 28 02 00 00 FF FF FF FF E2 D8 F5 77 7D 9B' - 'F5 77 94 B6 01 00 00 00 05 00 F4 17 95 00 80 00' - '10 C0 B4 1A 95 00 F0 88 FA 77 88 1C F5 77 FF FF' - 'FF FF 37 90 F5 77 00 00 00 00 3E 8A F5 77 9B B2' - 'E7 77 B7 00 00 00 02 00 00 00 A4 1A 95 00 01 00' - '00 00 18 00 00 00 00 00 00 00 10 19 95 00 42 00' - '00 00 00 00 00 00 F4 18 95 00 00 00 00 00 00 00' - '00 00 00 00 00 00 0C 00 00 00 02 00 00 00 01 01' - 'F5 77 00 EC FD 7F 5A 00 00 00 00 00 00 00 03 00' - '00 00 62 00 1A 02 40 9F 07 00 00 00 00 00 40 9F' - '07 00 05 00 00 00 BE B3 E7 77 4C 19 95 00 A3 B4' - 'E7 77 F8 00 00 00 00 00 00 C0 00 00 00 00 00 00' - '00 00 02 00 00 00 80 00 00 00 00 00 00 00 8C 1A' - '95 00 7F E9 4B 00 08 6C 0C 01 00 00 00 C0 00 00' - '00 00 80 1A 95 00 02 00 00 00 80 00 00 00 00 00' - '00 00 C0 27 95 00 C4 F5 AF 00 02 00 00 00 44 3A' - '5C 6F 73 65 78 70 65 72 74 73 5C 72 65 61 63 74' - '6F 73 5C 6C 69 62 5C 73 68 65 6C 6C 33 32 5C 64' - '6F 63 75 6D 65 6E 74 2E 69 63 6F 00 4B 00 14 1A' - '95 00 1F 3B D4 77 13 00 00 00 98 00 00 00 4F 3B' - 'D4 77 E0 19 95 00 33 3B D4 77 64 C5 F5 77 A9 F1' - 'E7 77 F8 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 1A 95 00 18 6C 38 00 86 00 00 00 00 00' - '00 00 C9 F1 E7 77 86 00 00 00 A4 1A 95 00 08 00' - '00 00 00 00 00 00 86 00 00 00 86 00 00 00 08 00' - '00 00 F4 19 95 00 33 3B D4 77 B4 1A 95 00 09 48' - 'E9 77 B8 10 E9 77 FF FF FF FF C9 F1 E7 77 16 EA' - '4B 00 F8 00 00 00 18 6C 38 00 86 00 00 00 58 1A' - '95 00 00 00 00 00 00 0D 0D 0D 0D 0D 0D 0D 0D 0D' - '0D 00 00 00 00 00 00 01 07 08 08 07 08 07 08 04' - '0D 0D 00 00 00 00 00 01 09 0B 0A 0B 0B 0B 0A 09' - '06 0D 0D 00 00 00 00 01 0A 0A 0A 0A 0A 0B 0A 09' - '0C 06 0D 0D 00 00 00 01 09 0A 0B 0A 0B 0A 0A 09' - '0C 0C 06 01 0D 00 00 01 0A 0B 0A 0B 0A 0B 0A 09' - '0A 09 0A 04 0D 00 00 01 09 0B 0B 0A 0B 0B 0B 0B' - '0A 0B 0B 08 0D 00 00 01 0A 0C 0B 0B 0B 0B 0B 0B' - '0B 0B 0C 08 0D 00 00 01 0A 0B 0B 0C 0B 0C 0B 0B' - '0C 0B 0C 09 0D 00 00 01 0B 0C 0B 0C 0B 0C 0C 0C' - '0C 0C 0C 08 0D 00 00 01 09 0C 0C 0B 0C 0C 0C 0C' - '0C 0C 0C 09 0D 00 00 01 0B 0C 0C 0C 0C 0C 0C 0C' - '0C 0C 0C 08 0D 00 00 01 0A 0C 0C 0C 0C 0C 0C 0C' - '0C 0C 0C 09 0D 00 00 01 0B 0C 0C 0C 0C 0C 0C 0C' - '0C 0C 0C 09 0D 00 00 01 0B 0C 0C 0C 0C 0C 0C 0C' - '0C 0C 0C 09 0D 00 00 0D 03 03 03 03 03 03 03 02' - '03 02 03 02 0D 00 80 1F 00 00 80 0F 00 00 80 07' - '00 00 80 03 00 00 80 01 00 00 80 01 00 00 80 01' - '00 00 80 01 00 00 80 01 00 00 80 01 00 00 80 01' - '00 00 80 01 00 00 80 01 00 00 80 01 00 00 80 01' - '00 00 80 01 00 00 28 00 00 00 20 00 00 00 40 00' - '00 00 01 00 04 00 00 00 00 00 00 02 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 80 00 00 00 00 80 00 00 80 80 00 00 00 00' - '80 00 80 00 80 00 00 80 80 00 C0 C0 C0 00 80 80' - '80 00 FF 00 00 00 00 FF 00 00 FF FF 00 00 00 00' - 'FF 00 FF 00 FF 00 00 FF FF 00 FF FF FF 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 08' - '88 87 88 78 88 78 88 88 00 00 00 00 00 00 00 00' - '7F F7 FF 7F FF 7F F7 78 80 00 00 00 00 00 00 04' - '7F 7F 77 F7 F7 F7 FF 8F 88 00 00 00 00 00 00 00' - '7F F7 FF 7F 7F 7F 7F 77 F8 80 00 00 00 00 00 08' - '7F 77 F7 F7 F7 F7 F7 77 FF 88 00 00 00 00 00 00' - '7F F7 7F 7F 7F 7F 7F 7F 7F F8 80 00 00 00 00 08' - '7F 7F F7 F7 F7 F7 F7 77 FF FF 88 00 00 00 00 00' - '7F F7 FF 7F 7F F7 FF 8F FF FF F8 80 00 00 00 08' - '7F 7F 77 F7 FF 7F F7 77 F7 F7 FF 84 00 00 00 00' - '7F F7 FF 7F 7F F7 FF 77 77 77 87 78 00 00 00 08' - '7F 7F F7 FF F7 FF 7F FF 7F F7 FF F7 00 00 00 00' - '7F F7 FF 7F 7F 7F F7 FF F7 FF F7 F8 00 00 00 08' - '7F FF F7 F7 FF F7 FF 7F 7F FF 7F F8 00 00 00 00' - '7F 7F FF FF 7F FF 7F FF F7 FF FF F8 00 00 00 04' - '7F FF 7F F7 FF 7F FF F7 FF FF F7 F7 00 00 00 00' - 'FF FF FF FF FF F7 FF FF 7F F7 FF F8 00 00 00 08' - '7F 7F F7 FF FF FF FF FF FF FF FF F8 00 00 00 00' - '7F FF FF F7 FF FF FF FF FF FF FF F8 00 00 00 08' - '7F FF FF FF FF 7F FF FF FF FF FF F7 00 00 00 00' - 'FF F7 FF FF FF FF FF FF FF FF FF F8 00 00 00 08' - '7F FF FF 7F FF FF FF FF FF FF FF F7 00 00 00 00' - '7F FF FF FF FF FF FF FF FF FF FF F8 00 00 00 08' - '7F FF FF FF FF FF FF FF FF FF FF F8 00 00 00 00' - 'FF FF FF FF FF FF FF FF FF FF FF F7 00 00 00 08' - '7F FF FF FF FF FF FF FF FF FF FF F8 00 00 00 00' - 'FF FF FF FF FF FF FF FF FF FF FF F7 00 00 00 04' - '7F FF FF FF FF FF FF FF FF FF FF F8 00 00 00 08' - '7F FF FF FF FF FF FF F7 FF FF FF F7 00 00 00 00' - '88 88 88 88 88 88 88 88 88 88 88 88 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 E0 00' - '07 FF C0 00 03 FF C0 00 01 FF C0 00 00 FF C0 00' - '00 7F C0 00 00 3F C0 00 00 1F C0 00 00 1F C0 00' - '00 0F C0 00 00 03 C0 00 00 03 C0 00 00 03 C0 00' - '00 03 C0 00 00 03 C0 00 00 03 C0 00 00 03 C0 00' - '00 03 C0 00 00 03 C0 00 00 03 C0 00 00 03 C0 00' - '00 03 C0 00 00 03 C0 00 00 03 C0 00 00 03 C0 00' - '00 03 C0 00 00 03 C0 00 00 03 C0 00 00 03 C0 00' - '00 03 C0 00 00 03 C0 00 00 03 C0 00 00 03 28 00' - '00 00 10 00 00 00 20 00 00 00 01 00 04 00 00 00' - '00 00 80 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 80 00 00 00 00 80' - '00 00 80 80 00 00 00 00 80 00 80 00 80 00 00 80' - '80 00 C0 C0 C0 00 80 80 80 00 FF 00 00 00 00 FF' - '00 00 FF FF 00 00 00 00 FF 00 FF 00 FF 00 00 FF' - 'FF 00 FF FF FF 00 00 00 00 00 00 00 00 00 00 77' - '77 77 78 00 00 00 00 7F F7 FF 7F 80 00 00 04 7F' - '7F 7F 77 F8 00 00 00 77 F7 F7 F7 FF 70 00 00 FF' - '7F 7F 7F 7F 78 00 08 77 FF 7F F7 F7 F7 00 00 FF' - '7F FF 7F 7F F7 00 00 7F FF F7 FF FF F7 00 04 7F' - 'FF FF FF FF F7 00 00 FF FF FF FF FF F7 00 00 7F' - 'FF FF FF FF F7 00 00 FF FF FF FF FF F7 00 04 7F' - 'FF FF FF FF F7 00 00 FF FF FF FF FF F7 00 00 88' - '88 88 88 88 88 00 80 1F 00 00 80 0F 00 00 80 07' - '00 00 80 03 00 00 80 01 00 00 80 01 00 00 80 01' - '00 00 80 01 00 00 80 01 00 00 80 01 00 00 80 01' - '00 00 80 01 00 00 80 01 00 00 80 01 00 00 80 01' - '00 00 80 01 00 00 28 00 00 00 30 00 00 00 60 00' - '00 00 01 00 08 00 00 00 00 00 00 09 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 11 11 11 00 22 22 22 00 33 33 33 00 44 44' - '44 00 66 66 66 00 77 77 77 00 7F 7F 7F 00 88 88' - '88 00 99 99 99 00 AA AA AA 00 BB BB BB 00 CC CC' - 'CC 00 DD DD DD 00 EE EE EE 00 FF FF FF 00 00 00' - '00 00 33 00 32 00 5C 00 64 00 6F 00 63 00 75 00' - '6D 00 65 00 6E 00 74 00 2E 00 69 00 63 00 6F 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 C0 17 95 00 00 00 38 00 A8 44' - 'F9 77 13 00 00 00 18 0A 38 00 00 00 38 00 18 6C' - '38 00 98 17 95 00 00 00 00 00 E0 19 95 00 F0 88' - 'FA 77 70 38 F5 77 FF FF FF FF A8 44 F9 77 70 7D' - 'F5 77 3A 8A F5 77 86 00 00 00 86 00 00 00 08 00' - '00 00 B0 18 95 00 00 00 00 00 CB 44 F9 77 38 9F' - '07 00 CD 8B F5 77 78 13 05 00 37 90 F5 77 00 00' - '00 00 3E 8A F5 77 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 10 00' - '00 00 00 00 00 00 5A 00 5C 00 00 EC FD 7F 1A 02' - '00 00 4C 16 95 00 40 9F 07 00 FC 15 95 00 FF FF' - 'FF FF B4 1A 95 00 45 00 00 00 28 02 00 00 FF FF' - 'FF FF E2 D8 F5 77 7D 9B F5 77 94 B6 01 00 00 00' - '05 00 F4 17 95 00 80 00 10 C0 B4 1A 95 00 F0 88' - 'FA 77 88 1C F5 77 FF FF FF FF 37 90 F5 77 00 00' - '00 00 3E 8A F5 77 9B B2 E7 77 B7 00 00 00 02 00' - '00 00 A4 1A 95 00 01 00 00 00 18 00 00 00 00 00' - '00 00 10 19 95 00 42 00 00 00 00 00 00 00 F4 18' - '95 00 00 00 00 00 00 00 00 00 00 00 00 00 0C 00' - '00 00 02 00 00 00 01 01 F5 77 00 EC FD 7F 5A 00' - '00 00 00 00 00 00 03 00 00 00 62 00 1A 02 40 9F' - '07 00 00 00 00 00 40 9F 07 00 05 00 00 00 BE B3' - 'E7 77 4C 19 95 00 A3 B4 E7 77 F8 00 00 00 00 00' - '00 C0 00 00 00 00 00 00 00 00 02 00 00 00 80 00' - '00 00 00 00 00 00 8C 1A 95 00 7F E9 4B 00 08 6C' - '0C 01 00 00 00 C0 00 00 00 00 80 1A 95 00 02 00' - '00 00 80 00 00 00 00 00 00 00 C0 27 95 00 C4 F5' - 'AF 00 02 00 00 00 44 3A 5C 6F 73 65 78 70 65 72' - '74 73 5C 72 65 61 63 74 6F 73 5C 6C 69 62 5C 73' - '68 65 6C 6C 33 32 5C 64 6F 63 75 6D 65 6E 74 2E' - '69 63 6F 00 4B 00 14 1A 95 00 1F 3B D4 77 13 00' - '00 00 98 00 00 00 4F 3B D4 77 E0 19 95 00 33 3B' - 'D4 77 64 C5 F5 77 A9 F1 E7 77 F8 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 1A 95 00 18 6C' - '38 00 86 00 00 00 00 00 00 00 C9 F1 E7 77 86 00' - '00 00 A4 1A 95 00 08 00 00 00 00 00 00 00 86 00' - '00 00 86 00 00 00 08 00 00 00 F4 19 95 00 33 3B' - 'D4 77 B4 1A 95 00 09 48 E9 77 B8 10 E9 77 FF FF' - 'FF FF C9 F1 E7 77 16 EA 4B 00 F8 00 00 00 18 6C' - '38 00 86 00 00 00 58 1A 95 00 00 00 00 00 00 00' - '00 00 10 10 10 10 10 10 10 10 10 10 10 10 10 10' - '10 10 10 10 10 10 10 10 10 10 10 10 10 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10' - '10 10 10 10 10 10 10 10 10 10 10 10 10 10 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10' - '10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 10 10 03 08 08 06 08 08 06 08 06 06 08 06 08' - '06 06 06 06 06 06 06 05 06 05 05 01 10 10 10 10' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 10 10 03 0C 0E 0E 0E 0D 0E 0E 0E 0E 0E 0E 0D' - '0E 0E 0E 0E 0E 0E 0E 0E 0E 0C 08 05 01 10 10 10' - '10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 10 10 03 0C 0F 0D 0D 0D 0D 0D 0D 0D 0D 0E 0D' - '0D 0D 0D 0E 0D 0D 0D 0E 0E 0B 09 0A 05 01 10 10' - '10 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 10 10 03 0B 0F 0C 0D 0D 0D 0D 0D 0D 0D 0D 0D' - '0D 0D 0D 0D 0D 0D 0D 0D 0D 0B 0A 0D 0A 05 02 10' - '10 10 10 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 10 10 03 0C 0F 0D 0D 0D 0D 0D 0D 0D 0D 0D 0D' - '0E 0D 0D 0D 0D 0E 0D 0D 0E 0A 0A 0E 0D 09 06 01' - '10 10 10 10 00 00 00 00 00 00 00 00 00 00 00 00' - '00 10 10 03 0C 0E 0D 0D 0D 0D 0D 0D 0D 0D 0D 0D' - '0D 0D 0D 0D 0D 0D 0D 0E 0D 0B 0A 0E 0D 0E 0A 06' - '01 10 10 10 10 00 00 00 00 00 00 00 00 00 00 00' - '00 10 10 03 0C 0F 0D 0D 0D 0D 0D 0D 0D 0D 0D 0D' - '0D 0D 0D 0E 0D 0D 0D 0D 0E 0B 0A 0E 0E 0E 0E 0A' - '05 01 10 10 10 10 00 00 00 00 00 00 00 00 00 00' - '00 10 10 03 0C 0F 0D 0D 0D 0D 0D 0D 0D 0D 0E 0D' - '0D 0E 0D 0D 0D 0D 0E 0D 0E 0B 0A 0E 0E 0E 0E 0F' - '0A 06 01 10 10 10 10 00 00 00 00 00 00 00 00 00' - '00 10 10 03 0C 0F 0D 0E 0D 0D 0D 0E 0D 0D 0D 0D' - '0E 0D 0E 0D 0E 0D 0D 0E 0D 0B 0A 0E 0F 0E 0E 0E' - '0F 0A 05 01 10 10 10 10 00 00 00 00 00 00 00 00' - '00 10 10 03 0C 0F 0D 0D 0D 0E 0D 0D 0D 0E 0D 0E' - '0D 0D 0D 0E 0D 0D 0E 0D 0E 0B 0A 0F 0E 0E 0F 0E' - '0F 0E 0B 05 02 10 10 10 10 00 00 00 00 00 00 00' - '00 10 10 03 0C 0F 0D 0D 0E 0D 0D 0E 0D 0D 0E 0D' - '0E 0D 0E 0D 0E 0E 0D 0E 0E 0B 0B 0E 0F 0E 0E 0F' - '0E 0F 0F 0B 05 01 10 10 10 10 00 00 00 00 00 00' - '00 10 10 03 0C 0F 0E 0D 0D 0D 0E 0D 0E 0D 0D 0E' - '0D 0E 0D 0E 0D 0D 0E 0D 0E 0B 0A 0F 0E 0F 0F 0F' - '0F 0F 0F 0F 0B 06 01 10 10 10 10 00 00 00 00 00' - '00 10 10 03 0C 0F 0D 0E 0D 0E 0D 0D 0E 0E 0D 0E' - '0D 0D 0E 0D 0E 0E 0D 0E 0E 0B 0B 0F 0F 0F 0F 0F' - '0F 0F 0F 0F 0F 0B 05 02 10 10 10 00 00 00 00 00' - '00 10 10 03 0C 0F 0E 0D 0E 0D 0E 0E 0D 0D 0E 0D' - '0E 0E 0D 0E 0E 0D 0E 0E 0E 0B 09 0B 0B 0B 0A 0B' - '0B 0A 0B 0A 0B 0B 09 05 10 10 10 00 00 00 00 00' - '00 10 10 03 0C 0F 0E 0D 0D 0E 0D 0D 0E 0E 0D 0E' - '0D 0E 0E 0D 0E 0E 0E 0D 0E 0D 0C 0C 0C 0C 0C 0C' - '0C 0C 0C 0C 0B 0C 0C 06 10 10 10 00 00 00 00 00' - '00 10 10 03 0C 0F 0D 0E 0E 0D 0E 0E 0E 0D 0E 0E' - '0E 0E 0D 0E 0E 0E 0D 0E 0E 0E 0E 0E 0E 0E 0E 0E' - '0E 0E 0E 0E 0F 0E 0E 08 10 10 10 00 00 00 00 00' - '00 10 10 04 0C 0F 0E 0D 0E 0E 0D 0E 0E 0E 0D 0E' - '0E 0D 0E 0E 0D 0E 0E 0E 0E 0E 0E 0E 0E 0E 0E 0E' - '0E 0E 0E 0E 0E 0F 0D 06 10 10 10 00 00 00 00 00' - '00 10 10 03 0C 0F 0D 0E 0E 0E 0E 0D 0E 0D 0E 0E' - '0D 0E 0E 0E 0E 0E 0E 0E 0E 0E 0E 0E 0E 0E 0E 0E' - '0F 0E 0E 0E 0E 0E 0E 08 10 10 10 00 00 00 00 00' - '00 10 10 03 0D 0F 0E 0E 0E 0E 0E 0E 0E 0E 0E 0E' - '0E 0E 0E 0E 0E 0E 0E 0E 0E 0E 0E 0E 0E 0E 0E 0E' - '0E 0E 0E 0E 0E 0F 0D 06 10 10 10 00 00 00 00 00' - '00 10 10 03 0C 0F 0E 0E 0E 0E 0E 0F 0E 0E 0E 0E' - '0E 0E 0E 0E 0E 0E 0E 0E 0E 0E 0E 0E 0E 0E 0F 0E' - '0E 0E 0E 0F 0E 0E 0E 08 10 10 10 00 00 00 00 00' - '00 10 10 04 0C 0F 0E 0E 0E 0E 0E 0E 0E 0E 0E 0E' - '0E 0E 0E 0E 0E 0E 0E 0E 0E 0E 0E 0F 0E 0E 0E 0E' - '0E 0F 0E 0E 0E 0F 0E 06 10 10 10 00 00 00 00 00' - '00 10 10 03 0C 0F 0F 0E 0E 0E 0F 0E 0F 0E 0F 0E' - '0F 0E 0E 0E 0E 0E 0E 0F 0E 0E 0E 0E 0E 0E 0E 0F' - '0E 0E 0F 0E 0F 0E 0E 08 10 10 10 00 00 00 00 00' - '00 10 10 03 0D 0F 0E 0E 0E 0F 0E 0E 0E 0F 0E 0F' - '0E 0F 0E 0F 0F 0E 0F 0E 0F 0E 0F 0E 0F 0E 0E 0E' - '0F 0E 0E 0E 0E 0F 0E 06 10 10 10 00 00 00 00 00' - '00 10 10 04 0C 0F 0E 0E 0F 0E 0E 0E 0F 0E 0F 0E' - '0F 0E 0F 0F 0E 0F 0F 0F 0E 0F 0F 0F 0E 0F 0E 0F' - '0E 0F 0E 0F 0F 0E 0E 08 10 10 10 00 00 00 00 00' - '00 10 10 03 0D 0F 0E 0E 0E 0F 0E 0F 0E 0E 0F 0F' - '0E 0F 0F 0E 0F 0E 0F 0F 0F 0F 0E 0F 0F 0F 0F 0E' - '0F 0E 0E 0E 0F 0F 0E 06 10 10 10 00 00 00 00 00' - '00 10 10 04 0C 0F 0F 0E 0F 0E 0F 0E 0F 0F 0F 0E' - '0F 0F 0E 0F 0F 0F 0F 0E 0F 0F 0F 0F 0F 0F 0F 0F' - '0F 0F 0F 0F 0E 0F 0E 08 10 10 10 00 00 00 00 00' - '00 10 10 03 0D 0F 0E 0F 0E 0F 0E 0F 0E 0F 0E 0F' - '0F 0E 0F 0E 0F 0F 0F 0F 0F 0E 0F 0F 0F 0F 0F 0F' - '0F 0F 0F 0F 0F 0F 0E 06 01 10 10 00 00 00 00 00' - '00 10 10 04 0C 0F 0F 0E 0E 0F 0F 0E 0F 0E 0F 0E' - '0F 0F 0F 0F 0F 0E 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F' - '0F 0F 0F 0F 0F 0F 0E 08 10 10 10 00 00 00 00 00' - '00 10 10 03 0D 0F 0E 0F 0F 0E 0E 0F 0F 0F 0F 0F' - '0E 0F 0F 0F 0F 0F 0F 0E 0F 0F 0F 0F 0F 0F 0F 0F' - '0F 0F 0F 0F 0F 0F 0E 06 10 10 10 00 00 00 00 00' - '00 10 10 04 0C 0F 0F 0F 0E 0F 0F 0F 0E 0F 0F 0E' - '0F 0F 0E 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F' - '0F 0F 0F 0F 0F 0F 0E 08 10 10 10 00 00 00 00 00' - '00 10 10 04 0D 0F 0E 0F 0F 0E 0F 0F 0F 0E 0F 0F' - '0F 0F 0F 0F 0E 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F' - '0F 0F 0F 0F 0F 0F 0E 08 10 10 10 00 00 00 00 00' - '00 10 10 03 0C 0F 0F 0E 0F 0F 0F 0E 0F 0F 0F 0F' - '0F 0E 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F' - '0F 0F 0F 0F 0F 0F 0E 08 10 10 10 00 00 00 00 00' - '00 10 10 04 0D 0F 0F 0F 0E 0F 0F 0F 0F 0F 0E 0F' - '0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F' - '0F 0F 0F 0F 0F 0F 0E 08 10 10 10 00 00 00 00 00' - '00 10 10 03 0D 0F 0F 0E 0F 0F 0F 0F 0E 0F 0F 0F' - '0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F' - '0F 0F 0F 0F 0F 0F 0F 08 10 10 10 00 00 00 00 00' - '00 10 10 04 0C 0F 0F 0F 0F 0F 0E 0F 0F 0F 0F 0F' - '0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F' - '0F 0F 0F 0F 0F 0F 0E 08 10 10 10 00 00 00 00 00' - '00 10 10 04 0D 0F 0F 0F 0E 0F 0F 0F 0F 0F 0F 0F' - '0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F' - '0F 0F 0F 0F 0F 0F 0E 08 10 10 10 00 00 00 00 00' - '00 10 10 03 0D 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F' - '0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F' - '0F 0F 0F 0F 0F 0F 0E 08 10 10 10 00 00 00 00 00' - '00 10 10 04 0C 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F' - '0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F' - '0F 0F 0F 0F 0F 0F 0F 08 10 10 10 00 00 00 00 00' - '00 10 10 04 0D 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F' - '0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F' - '0F 0F 0F 0F 0F 0F 0E 08 10 10 10 00 00 00 00 00' - '00 10 10 04 0C 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F' - '0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F' - '0F 0F 0F 0F 0F 0F 0F 08 10 10 10 00 00 00 00 00' - '00 10 10 04 0D 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F' - '0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F' - '0F 0F 0F 0F 0F 0F 0E 08 10 10 10 00 00 00 00 00' - '00 10 10 04 0D 0F 0F 0F 0F 0F 0F 0F 0F 0E 0F 0F' - '0E 0F 0E 0F 0E 0F 0F 0E 0F 0E 0F 0F 0F 0F 0E 0F' - '0F 0F 0E 0F 0E 0F 0E 09 10 10 10 00 00 00 00 00' - '00 10 10 02 0A 09 09 09 09 09 09 09 09 09 09 09' - '09 09 09 08 09 09 08 09 08 09 08 08 08 08 08 08' - '08 08 08 08 08 08 08 05 10 10 10 00 00 00 00 00' - '00 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10' - '10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10' - '10 10 10 10 10 10 10 10 10 10 10 00 00 00 00 00' - '00 00 10 10 10 10 10 10 10 10 10 10 10 10 10 10' - '10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10' - '10 10 10 10 10 10 10 10 10 10 00 00 00 00 F0 00' - '00 01 FF FF 00 00 E0 00 00 00 FF FF 00 00 E0 00' - '00 00 7F FF 00 00 E0 00 00 00 3F FF 00 00 E0 00' - '00 00 1F FF 00 00 E0 00 00 00 0F FF 00 00 E0 00' - '00 00 07 FF 00 00 E0 00 00 00 03 FF 00 00 E0 00' - '00 00 01 FF 00 00 E0 00 00 00 00 FF 00 00 E0 00' - '00 00 00 7F 00 00 E0 00 00 00 00 3F 00 00 E0 00' - '00 00 00 1F 00 00 E0 00 00 00 00 0F 00 00 E0 00' - '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' - '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' - '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' - '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' - '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' - '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' - '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' - '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' - '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' - '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' - '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' - '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' - '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' - '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' - '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' - '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' - '00 00 00 07 00 00 F0 00 00 00 00 0F 00 00 28 00' - '00 00 30 00 00 00 60 00 00 00 01 00 20 00 00 00' - '00 00 00 24 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 04 00 00 00 29 00 00' - '00 38 00 00 00 37 00 00 00 37 00 00 00 37 00 00' - '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' - '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' - '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' - '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' - '00 37 00 00 00 38 00 00 00 34 00 00 00 19 00 00' - '00 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 01 00 00 00 76 00 00 00 F1 00 00' - '00 F9 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' - '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' - '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' - '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' - '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' - '00 F7 00 00 00 F8 00 00 00 F2 00 00 00 B2 00 00' - '00 49 00 00 00 05 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 5A 00 00 00 FF 01 01 01 FF 06 06' - '06 FF 05 05 05 FF 05 05 05 FF 05 05 05 FF 05 05' - '05 FF 05 05 05 FF 05 05 05 FF 05 05 05 FF 05 05' - '05 FF 05 05 05 FF 05 05 05 FF 05 05 05 FF 05 05' - '05 FF 05 05 05 FF 05 05 05 FF 05 05 05 FF 04 04' - '04 FF 04 04 04 FF 04 04 04 FF 03 03 03 FF 02 02' - '02 FF 03 03 03 FF 02 02 02 FF 00 00 00 FF 00 00' - '00 D9 00 00 00 39 00 00 00 06 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 84 00 00 00 FF 2E 2E 2E FF 88 88' - '88 FF 87 87 87 FF 86 86 86 FF 86 86 86 FF 85 85' - '85 FF 84 84 84 FF 84 84 84 FF 83 83 83 FF 82 82' - '82 FF 82 82 82 FF 81 81 81 FF 80 80 80 FF 7F 7F' - '7F FF 7F 7F 7F FF 7E 7E 7E FF 7D 7D 7D FF 7C 7C' - '7C FF 7C 7C 7C FF 7B 7B 7B FF 74 74 74 FF 72 72' - '72 FF 73 73 73 FF 67 67 67 FF 18 18 18 FF 00 00' - '00 FF 00 00 00 D9 00 00 00 58 00 00 00 03 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 84 00 00 00 FF 38 38 38 FF C1 C1' - 'C1 FF F2 F2 F2 FF EA EA EA FF EA EA EA FF EA EA' - 'EA FF EA EA EA FF E9 E9 E9 FF E9 E9 E9 FF E9 E9' - 'E9 FF E9 E9 E9 FF E9 E9 E9 FF E8 E8 E8 FF E8 E8' - 'E8 FF E8 E8 E8 FF E9 E9 E9 FF EB EB EB FF EA EA' - 'EA FF EA EA EA FF EA EA EA FF EB EB EB FF F1 F1' - 'F1 FF C4 C4 C4 FF 8C 8C 8C FF 67 67 67 FF 15 15' - '15 FF 00 00 00 FF 00 00 00 DC 00 00 00 4C 00 00' - '00 06 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 84 00 00 00 FF 35 35 35 FF C8 C8' - 'C8 FF FA FA FA FF DD DD DD FF DE DE DE FF DE DE' - 'DE FF DF DF DF FF DF DF DF FF DF DF DF FF DF DF' - 'DF FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' - 'E0 FF E1 E1 E1 FF E1 E1 E1 FF E2 E2 E2 FF E2 E2' - 'E2 FF E2 E2 E2 FF E2 E2 E2 FF E3 E3 E3 FF E8 E8' - 'E8 FF BA BA BA FF A3 A3 A3 FF A6 A6 A6 FF 6B 6B' - '6B FF 0B 0B 0B FF 00 00 00 FF 00 00 00 EB 00 00' - '00 4B 00 00 00 03 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 84 00 00 00 FF 35 35 35 FF C7 C7' - 'C7 FF F9 F9 F9 FF DA DA DA FF DA DA DA FF DA DA' - 'DA FF DA DA DA FF DB DB DB FF DB DB DB FF DB DB' - 'DB FF DC DC DC FF DC DC DC FF DC DC DC FF DC DC' - 'DC FF DD DD DD FF DD DD DD FF DD DD DD FF DD DD' - 'DD FF DD DD DD FF DD DD DD FF DE DE DE FF E3 E3' - 'E3 FF B7 B7 B7 FF A8 A8 A8 FF DE DE DE FF A8 A8' - 'A8 FF 6C 6C 6C FF 25 25 25 FF 00 00 00 FF 00 00' - '00 DE 00 00 00 57 00 00 00 03 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 84 00 00 00 FF 35 35 35 FF C7 C7' - 'C7 FF F9 F9 F9 FF DC DC DC FF DB DB DB FF DB DB' - 'DB FF DC DC DC FF DD DD DD FF DD DD DD FF DD DD' - 'DD FF DD DD DD FF DE DE DE FF DE DE DE FF DE DE' - 'DE FF DE DE DE FF DE DE DE FF DF DF DF FF DE DE' - 'DE FF DF DF DF FF DF DF DF FF E0 E0 E0 FF E5 E5' - 'E5 FF B8 B8 B8 FF A7 A7 A7 FF EB EB EB FF DE DE' - 'DE FF A4 A4 A4 FF 72 72 72 FF 17 17 17 FF 00 00' - '00 FF 00 00 00 DC 00 00 00 4C 00 00 00 06 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 84 00 00 00 FF 36 36 36 FF C8 C8' - 'C8 FF FA FA FA FF DC DC DC FF DD DD DD FF DD DD' - 'DD FF DD DD DD FF DD DD DD FF DE DE DE FF DE DE' - 'DE FF DE DE DE FF DE DE DE FF DF DF DF FF DF DF' - 'DF FF DF DF DF FF DF DF DF FF E0 E0 E0 FF E0 E0' - 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E1 E1 E1 FF E6 E6' - 'E6 FF B9 B9 B9 FF A9 A9 A9 FF EA EA EA FF EA EA' - 'EA FF E9 E9 E9 FF B1 B1 B1 FF 72 72 72 FF 14 14' - '14 FF 00 00 00 FF 00 00 00 EB 00 00 00 4B 00 00' - '00 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 84 00 00 00 FF 37 37 37 FF C9 C9' - 'C9 FF FA FA FA FF DD DD DD FF DE DE DE FF DE DE' - 'DE FF DE DE DE FF DE DE DE FF DF DF DF FF DF DF' - 'DF FF DF DF DF FF DF DF DF FF E0 E0 E0 FF E0 E0' - 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E1 E1 E1 FF E1 E1' - 'E1 FF E1 E1 E1 FF E1 E1 E1 FF E2 E2 E2 FF E7 E7' - 'E7 FF BA BA BA FF AA AA AA FF EC EC EC FF EA EA' - 'EA FF ED ED ED FF EA EA EA FF B2 B2 B2 FF 6A 6A' - '6A FF 1C 1C 1C FF 00 00 00 FF 00 00 00 DE 00 00' - '00 57 00 00 00 04 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 84 00 00 00 FF 37 37 37 FF C9 C9' - 'C9 FF FA FA FA FF DF DF DF FF DE DE DE FF DF DF' - 'DF FF DF DF DF FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' - 'E0 FF E0 E0 E0 FF E1 E1 E1 FF E1 E1 E1 FF E1 E1' - 'E1 FF E1 E1 E1 FF E2 E2 E2 FF E2 E2 E2 FF E2 E2' - 'E2 FF E2 E2 E2 FF E3 E3 E3 FF E3 E3 E3 FF E8 E8' - 'E8 FF BA BA BA FF AC AC AC FF EF EF EF FF ED ED' - 'ED FF ED ED ED FF F1 F1 F1 FF F1 F1 F1 FF B1 B1' - 'B1 FF 6B 6B 6B FF 13 13 13 FF 00 00 00 FF 00 00' - '00 DC 00 00 00 46 00 00 00 05 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 84 00 00 00 FF 37 37 37 FF C9 C9' - 'C9 FF FA FA FA FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' - 'E0 FF E0 E0 E0 FF E1 E1 E1 FF E1 E1 E1 FF E1 E1' - 'E1 FF E1 E1 E1 FF E2 E2 E2 FF E2 E2 E2 FF E2 E2' - 'E2 FF E2 E2 E2 FF E2 E2 E2 FF E3 E3 E3 FF E3 E3' - 'E3 FF E3 E3 E3 FF E3 E3 E3 FF E4 E4 E4 FF E9 E9' - 'E9 FF BB BB BB FF AD AD AD FF F3 F3 F3 FF F1 F1' - 'F1 FF F1 F1 F1 FF F1 F1 F1 FF F4 F4 F4 FF F5 F5' - 'F5 FF B5 B5 B5 FF 70 70 70 FF 14 14 14 FF 00 00' - '00 FF 00 00 00 E0 00 00 00 3F 00 00 00 02 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 84 00 00 00 FF 37 37 37 FF CA CA' - 'CA FF FB FB FB FF E1 E1 E1 FF E1 E1 E1 FF E1 E1' - 'E1 FF E1 E1 E1 FF E2 E2 E2 FF E2 E2 E2 FF E2 E2' - 'E2 FF E2 E2 E2 FF E3 E3 E3 FF E3 E3 E3 FF E3 E3' - 'E3 FF E3 E3 E3 FF E3 E3 E3 FF E4 E4 E4 FF E4 E4' - 'E4 FF E4 E4 E4 FF E4 E4 E4 FF E5 E5 E5 FF EA EA' - 'EA FF BC BC BC FF AF AF AF FF F5 F5 F5 FF F3 F3' - 'F3 FF F3 F3 F3 FF F3 F3 F3 FF F4 F4 F4 FF F8 F8' - 'F8 FF F4 F4 F4 FF B6 B6 B6 FF 6C 6C 6C FF 22 22' - '22 FF 00 00 00 FF 00 00 00 D4 00 00 00 49 00 00' - '00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 84 00 00 00 FF 38 38 38 FF CA CA' - 'CA FF FB FB FB FF E2 E2 E2 FF E1 E1 E1 FF E2 E2' - 'E2 FF E2 E2 E2 FF E3 E3 E3 FF E3 E3 E3 FF E3 E3' - 'E3 FF E3 E3 E3 FF E4 E4 E4 FF E3 E3 E3 FF E3 E3' - 'E3 FF E4 E4 E4 FF E5 E5 E5 FF E5 E5 E5 FF E5 E5' - 'E5 FF E5 E5 E5 FF E6 E6 E6 FF E6 E6 E6 FF EB EB' - 'EB FF BC BC BC FF B1 B1 B1 FF F8 F8 F8 FF F6 F6' - 'F6 FF F6 F6 F6 FF F7 F7 F7 FF F8 F8 F8 FF F8 F8' - 'F8 FF FC FC FC FF FC FC FC FF B5 B5 B5 FF 70 70' - '70 FF 18 18 18 FF 00 00 00 FF 00 00 00 D4 00 00' - '00 3F 00 00 00 05 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 84 00 00 00 FF 38 38 38 FF CB CB' - 'CB FF FC FC FC FF E3 E3 E3 FF E3 E3 E3 FF E3 E3' - 'E3 FF E3 E3 E3 FF E4 E4 E4 FF E4 E4 E4 FF E4 E4' - 'E4 FF E4 E4 E4 FF E5 E5 E5 FF E5 E5 E5 FF E5 E5' - 'E5 FF E5 E5 E5 FF E6 E6 E6 FF E6 E6 E6 FF E6 E6' - 'E6 FF E6 E6 E6 FF E6 E6 E6 FF E6 E6 E6 FF EC EC' - 'EC FF BD BD BD FF B3 B3 B3 FF FC FC FC FF F9 F9' - 'F9 FF FA FA FA FF FA FA FA FF FB FB FB FF FC FC' - 'FC FF FC FC FC FF FF FF FF FF FF FF FF FF BA BA' - 'BA FF 75 75 75 FF 18 18 18 FF 00 00 00 FF 00 00' - '00 E0 00 00 00 3E 00 00 00 03 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 84 00 00 00 FF 38 38 38 FF CB CB' - 'CB FF FC FC FC FF E4 E4 E4 FF E4 E4 E4 FF E4 E4' - 'E4 FF E4 E4 E4 FF E5 E5 E5 FF E5 E5 E5 FF E5 E5' - 'E5 FF E5 E5 E5 FF E6 E6 E6 FF E6 E6 E6 FF E6 E6' - 'E6 FF E6 E6 E6 FF E6 E6 E6 FF E7 E7 E7 FF E7 E7' - 'E7 FF E7 E7 E7 FF E7 E7 E7 FF E7 E7 E7 FF ED ED' - 'ED FF BE BE BE FF B5 B5 B5 FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FB FB' - 'FB FF BE BE BE FF 6E 6E 6E FF 1C 1C 1C FF 00 00' - '00 FF 00 00 00 BB 00 00 00 1F 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 84 00 00 00 FF 38 38 38 FF CC CC' - 'CC FF FC FC FC FF E4 E4 E4 FF E4 E4 E4 FF E5 E5' - 'E5 FF E5 E5 E5 FF E6 E6 E6 FF E5 E5 E5 FF E5 E5' - 'E5 FF E6 E6 E6 FF E7 E7 E7 FF E6 E6 E6 FF E6 E6' - 'E6 FF E7 E7 E7 FF E7 E7 E7 FF E8 E8 E8 FF E8 E8' - 'E8 FF E8 E8 E8 FF E8 E8 E8 FF E9 E9 E9 FF EE EE' - 'EE FF C3 C3 C3 FF 9A 9A 9A FF B9 B9 B9 FF B8 B8' - 'B8 FF B7 B7 B7 FF B7 B7 B7 FF B7 B7 B7 FF B7 B7' - 'B7 FF B6 B6 B6 FF B5 B5 B5 FF B5 B5 B5 FF B8 B8' - 'B8 FF B5 B5 B5 FF 91 91 91 FF 67 67 67 FF 01 01' - '01 FF 00 00 00 F7 00 00 00 37 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 84 00 00 00 FF 39 39 39 FF CC CC' - 'CC FF FC FC FC FF E6 E6 E6 FF E7 E7 E7 FF E6 E6' - 'E6 FF E6 E6 E6 FF E6 E6 E6 FF E7 E7 E7 FF E7 E7' - 'E7 FF E7 E7 E7 FF E7 E7 E7 FF E8 E8 E8 FF E8 E8' - 'E8 FF E8 E8 E8 FF E8 E8 E8 FF E9 E9 E9 FF E9 E9' - 'E9 FF E9 E9 E9 FF E9 E9 E9 FF EA EA EA FF EB EB' - 'EB FF E2 E2 E2 FF CD CD CD FF CA CA CA FF CA CA' - 'CA FF CA CA CA FF CA CA CA FF C9 C9 C9 FF C9 C9' - 'C9 FF C9 C9 C9 FF C9 C9 C9 FF C9 C9 C9 FF C9 C9' - 'C9 FF CD CD CD FF CC CC CC FF 7A 7A 7A FF 05 05' - '05 FF 00 00 00 F7 00 00 00 37 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 84 00 00 00 FF 39 39 39 FF CC CC' - 'CC FF FC FC FC FF E8 E8 E8 FF E8 E8 E8 FF E8 E8' - 'E8 FF E7 E7 E7 FF E7 E7 E7 FF E8 E8 E8 FF E8 E8' - 'E8 FF E8 E8 E8 FF E8 E8 E8 FF E9 E9 E9 FF E9 E9' - 'E9 FF E9 E9 E9 FF E9 E9 E9 FF EA EA EA FF EA EA' - 'EA FF EA EA EA FF EA EA EA FF EB EB EB FF EB EB' - 'EB FF ED ED ED FF EF EF EF FF F0 F0 F0 FF F0 F0' - 'F0 FF F0 F0 F0 FF F0 F0 F0 FF F1 F1 F1 FF F1 F1' - 'F1 FF F1 F1 F1 FF F1 F1 F1 FF F2 F2 F2 FF F2 F2' - 'F2 FF F6 F6 F6 FF EC EC EC FF 7A 7A 7A FF 04 04' - '04 FF 00 00 00 F7 00 00 00 37 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 84 00 00 00 FF 3A 3A 3A FF CE CE' - 'CE FF FD FD FD FF E9 E9 E9 FF E9 E9 E9 FF EA EA' - 'EA FF E9 E9 E9 FF E8 E8 E8 FF E8 E8 E8 FF E9 E9' - 'E9 FF E9 E9 E9 FF EA EA EA FF EA EA EA FF EA EA' - 'EA FF EA EA EA FF EB EB EB FF EB EB EB FF EA EA' - 'EA FF EB EB EB FF EC EC EC FF EC EC EC FF EC EC' - 'EC FF EC EC EC FF EC EC EC FF ED ED ED FF ED ED' - 'ED FF ED ED ED FF ED ED ED FF EE EE EE FF ED ED' - 'ED FF ED ED ED FF EE EE EE FF EF EF EF FF EF EF' - 'EF FF F2 F2 F2 FF E9 E9 E9 FF 7B 7B 7B FF 04 04' - '04 FF 00 00 00 F7 00 00 00 37 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 84 00 00 00 FF 3A 3A 3A FF CD CD' - 'CD FF FD FD FD FF EA EA EA FF EB EB EB FF EC EC' - 'EC FF ED ED ED FF EC EC EC FF E9 E9 E9 FF EA EA' - 'EA FF EA EA EA FF EB EB EB FF EB EB EB FF EB EB' - 'EB FF EB EB EB FF EB EB EB FF EC EC EC FF EC EC' - 'EC FF EC EC EC FF EC EC EC FF ED ED ED FF ED ED' - 'ED FF ED ED ED FF ED ED ED FF EE EE EE FF EE EE' - 'EE FF EE EE EE FF EE EE EE FF EF EF EF FF EF EF' - 'EF FF EF EF EF FF EF EF EF FF F0 F0 F0 FF F0 F0' - 'F0 FF F4 F4 F4 FF E9 E9 E9 FF 7B 7B 7B FF 04 04' - '04 FF 00 00 00 F7 00 00 00 37 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 84 00 00 00 FF 3A 3A 3A FF CE CE' - 'CE FF FE FE FE FF EC EC EC FF EC EC EC FF ED ED' - 'ED FF EE EE EE FF EF EF EF FF EE EE EE FF EB EB' - 'EB FF EB EB EB FF EC EC EC FF EC EC EC FF EC EC' - 'EC FF EC EC EC FF EC EC EC FF ED ED ED FF ED ED' - 'ED FF ED ED ED FF ED ED ED FF EE EE EE FF EE EE' - 'EE FF EE EE EE FF EE EE EE FF EF EF EF FF EF EF' - 'EF FF EF EF EF FF EF EF EF FF F0 F0 F0 FF F0 F0' - 'F0 FF F0 F0 F0 FF F0 F0 F0 FF F1 F1 F1 FF F1 F1' - 'F1 FF F4 F4 F4 FF EA EA EA FF 7C 7C 7C FF 04 04' - '04 FF 00 00 00 F7 00 00 00 37 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 84 00 00 00 FF 3B 3B 3B FF CE CE' - 'CE FF FE FE FE FF ED ED ED FF ED ED ED FF EE EE' - 'EE FF EF EF EF FF F0 F0 F0 FF F1 F1 F1 FF F0 F0' - 'F0 FF EE EE EE FF EC EC EC FF EC EC EC FF ED ED' - 'ED FF ED ED ED FF EE EE EE FF EE EE EE FF EE EE' - 'EE FF EE EE EE FF EF EF EF FF EF EF EF FF EF EF' - 'EF FF EF EF EF FF EF EF EF FF F0 F0 F0 FF F0 F0' - 'F0 FF F0 F0 F0 FF F0 F0 F0 FF F1 F1 F1 FF F1 F1' - 'F1 FF F1 F1 F1 FF F1 F1 F1 FF F2 F2 F2 FF F1 F1' - 'F1 FF F5 F5 F5 FF EA EA EA FF 7D 7D 7D FF 04 04' - '04 FF 00 00 00 F7 00 00 00 37 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 84 00 00 00 FF 3B 3B 3B FF CF CF' - 'CF FF FE FE FE FF EE EE EE FF EF EF EF FF F0 F0' - 'F0 FF F0 F0 F0 FF F1 F1 F1 FF F2 F2 F2 FF F2 F2' - 'F2 FF F3 F3 F3 FF F1 F1 F1 FF EE EE EE FF EE EE' - 'EE FF EE EE EE FF EE EE EE FF EE EE EE FF EF EF' - 'EF FF EF EF EF FF EF EF EF FF EF EF EF FF F0 F0' - 'F0 FF F0 F0 F0 FF F0 F0 F0 FF F1 F1 F1 FF F1 F1' - 'F1 FF F1 F1 F1 FF F1 F1 F1 FF F2 F2 F2 FF F2 F2' - 'F2 FF F2 F2 F2 FF F2 F2 F2 FF F3 F3 F3 FF F3 F3' - 'F3 FF F6 F6 F6 FF EB EB EB FF 7D 7D 7D FF 05 05' - '05 FF 00 00 00 F7 00 00 00 37 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 84 00 00 00 FF 3B 3B 3B FF CF CF' - 'CF FF FF FF FF FF F0 F0 F0 FF F0 F0 F0 FF F0 F0' - 'F0 FF F1 F1 F1 FF F2 F2 F2 FF F3 F3 F3 FF F3 F3' - 'F3 FF F4 F4 F4 FF F5 F5 F5 FF F5 F5 F5 FF F4 F4' - 'F4 FF F3 F3 F3 FF F2 F2 F2 FF F1 F1 F1 FF F1 F1' - 'F1 FF F0 F0 F0 FF F0 F0 F0 FF F1 F1 F1 FF F1 F1' - 'F1 FF F0 F0 F0 FF F0 F0 F0 FF F1 F1 F1 FF F2 F2' - 'F2 FF F2 F2 F2 FF F2 F2 F2 FF F3 F3 F3 FF F3 F3' - 'F3 FF F3 F3 F3 FF F3 F3 F3 FF F4 F4 F4 FF F4 F4' - 'F4 FF F7 F7 F7 FF EB EB EB FF 7E 7E 7E FF 05 05' - '05 FF 00 00 00 F7 00 00 00 37 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 84 00 00 00 FF 3C 3C 3C FF D0 D0' - 'D0 FF FF FF FF FF F1 F1 F1 FF F1 F1 F1 FF F2 F2' - 'F2 FF F2 F2 F2 FF F3 F3 F3 FF F4 F4 F4 FF F4 F4' - 'F4 FF F5 F5 F5 FF F6 F6 F6 FF F6 F6 F6 FF F7 F7' - 'F7 FF F7 F7 F7 FF F8 F8 F8 FF F8 F8 F8 FF F8 F8' - 'F8 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9 F9 FF F8 F8' - 'F8 FF F6 F6 F6 FF F6 F6 F6 FF F5 F5 F5 FF F3 F3' - 'F3 FF F3 F3 F3 FF F3 F3 F3 FF F3 F3 F3 FF F4 F4' - 'F4 FF F4 F4 F4 FF F4 F4 F4 FF F5 F5 F5 FF F5 F5' - 'F5 FF F8 F8 F8 FF EB EB EB FF 7E 7E 7E FF 05 05' - '05 FF 00 00 00 F7 00 00 00 37 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 84 00 00 00 FF 3D 3D 3D FF D1 D1' - 'D1 FF FF FF FF FF F2 F2 F2 FF F2 F2 F2 FF F3 F3' - 'F3 FF F3 F3 F3 FF F4 F4 F4 FF F5 F5 F5 FF F5 F5' - 'F5 FF F6 F6 F6 FF F7 F7 F7 FF F7 F7 F7 FF F8 F8' - 'F8 FF F8 F8 F8 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9' - 'F9 FF FA FA FA FF FB FB FB FF FB FB FB FF FC FC' - 'FC FF FC FC FC FF FC FC FC FF FC FC FC FF FC FC' - 'FC FF FA FA FA FF F7 F7 F7 FF F5 F5 F5 FF F5 F5' - 'F5 FF F5 F5 F5 FF F5 F5 F5 FF F6 F6 F6 FF F6 F6' - 'F6 FF F9 F9 F9 FF EC EC EC FF 7F 7F 7F FF 05 05' - '05 FF 00 00 00 F7 00 00 00 37 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 84 00 00 00 FF 3D 3D 3D FF D1 D1' - 'D1 FF FF FF FF FF F3 F3 F3 FF F3 F3 F3 FF F4 F4' - 'F4 FF F4 F4 F4 FF F5 F5 F5 FF F6 F6 F6 FF F6 F6' - 'F6 FF F7 F7 F7 FF F8 F8 F8 FF F8 F8 F8 FF F8 F8' - 'F8 FF F9 F9 F9 FF F9 F9 F9 FF FA FA FA FF FA FA' - 'FA FF FA FA FA FF FA FA FA FF FB FB FB FF FC FC' - 'FC FF FC FC FC FF FD FD FD FF FD FD FD FF FD FD' - 'FD FF FD FD FD FF FE FE FE FF FD FD FD FF FA FA' - 'FA FF F7 F7 F7 FF F5 F5 F5 FF F6 F6 F6 FF F7 F7' - 'F7 FF FA FA FA FF EC EC EC FF 80 80 80 FF 05 05' - '05 FF 00 00 00 F7 00 00 00 37 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 84 00 00 00 FF 3E 3E 3E FF D2 D2' - 'D2 FF FF FF FF FF F4 F4 F4 FF F5 F5 F5 FF F5 F5' - 'F5 FF F5 F5 F5 FF F7 F7 F7 FF F7 F7 F7 FF F7 F7' - 'F7 FF F8 F8 F8 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9' - 'F9 FF FA FA FA FF FA FA FA FF FB FB FB FF FB FB' - 'FB FF FB FB FB FF FC FC FC FF FC FC FC FF FC FC' - 'FC FF FD FD FD FF FD FD FD FF FD FD FD FF FE FE' - 'FE FF FE FE FE FF FE FE FE FF FE FE FE FF FF FF' - 'FF FF FE FE FE FF FB FB FB FF F8 F8 F8 FF F7 F7' - 'F7 FF FB FB FB FF ED ED ED FF 81 81 81 FF 05 05' - '05 FF 00 00 00 F7 00 00 00 37 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 84 00 00 00 FF 3E 3E 3E FF D2 D2' - 'D2 FF FF FF FF FF F5 F5 F5 FF F6 F6 F6 FF F6 F6' - 'F6 FF F6 F6 F6 FF F7 F7 F7 FF F8 F8 F8 FF F8 F8' - 'F8 FF F8 F8 F8 FF F8 F8 F8 FF F9 F9 F9 FF FA FA' - 'FA FF FA FA FA FF FA FA FA FF FB FB FB FF FB FB' - 'FB FF FC FC FC FF FC FC FC FF FC FC FC FF FD FD' - 'FD FF FD FD FD FF FD FD FD FF FE FE FE FF FE FE' - 'FE FF FE FE FE FF FE FE FE FF FE FE FE FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FE FE FE FF FA FA' - 'FA FF FC FC FC FF ED ED ED FF 80 80 80 FF 05 05' - '05 FF 00 00 00 F7 00 00 00 37 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 84 00 00 00 FF 3E 3E 3E FF D3 D3' - 'D3 FF FF FF FF FF F6 F6 F6 FF F7 F7 F7 FF F7 F7' - 'F7 FF F7 F7 F7 FF F8 F8 F8 FF F9 F9 F9 FF F9 F9' - 'F9 FF F9 F9 F9 FF FA FA FA FF FA FA FA FF FA FA' - 'FA FF FB FB FB FF FB FB FB FF FC FC FC FF FC FC' - 'FC FF FC FC FC FF FD FD FD FF FD FD FD FF FD FD' - 'FD FF FD FD FD FF FE FE FE FF FE FE FE FF FE FE' - 'FE FF FE FE FE FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF EE EE EE FF 82 82 82 FF 05 05' - '05 FF 00 00 00 F7 00 00 00 37 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 84 00 00 00 FF 3E 3E 3E FF D3 D3' - 'D3 FF FF FF FF FF F7 F7 F7 FF F7 F7 F7 FF F8 F8' - 'F8 FF F9 F9 F9 FF F8 F8 F8 FF F8 F8 F8 FF FA FA' - 'FA FF FA FA FA FF FB FB FB FF FB FB FB FF FB FB' - 'FB FF FC FC FC FF FC FC FC FF FC FC FC FF FC FC' - 'FC FF FD FD FD FF FD FD FD FF FD FD FD FF FD FD' - 'FD FF FE FE FE FF FE FE FE FF FE FE FE FF FE FE' - 'FE FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF F0 F0 F0 FF 82 82 82 FF 05 05' - '05 FF 00 00 00 F7 00 00 00 37 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 84 00 00 00 FF 3F 3F 3F FF D4 D4' - 'D4 FF FF FF FF FF F8 F8 F8 FF F8 F8 F8 FF F9 F9' - 'F9 FF F9 F9 F9 FF FA FA FA FF FA FA FA FF FA FA' - 'FA FF FA FA FA FF FB FB FB FF FB FB FB FF FC FC' - 'FC FF FC FC FC FF FC FC FC FF FD FD FD FF FD FD' - 'FD FF FD FD FD FF FD FD FD FF FE FE FE FF FE FE' - 'FE FF FE FE FE FF FE FE FE FF FE FE FE FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF EF EF EF FF 82 82 82 FF 05 05' - '05 FF 00 00 00 F7 00 00 00 37 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 84 00 00 00 FF 3F 3F 3F FF D5 D5' - 'D5 FF FF FF FF FF F9 F9 F9 FF F9 F9 F9 FF F9 F9' - 'F9 FF FA FA FA FF FB FB FB FF FB FB FB FF FB FB' - 'FB FF FC FC FC FF FC FC FC FF FC FC FC FF FC FC' - 'FC FF FD FD FD FF FD FD FD FF FD FD FD FF FD FD' - 'FD FF FE FE FE FF FE FE FE FF FE FE FE FF FE FE' - 'FE FF FE FE FE FF FE FE FE FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF F0 F0 F0 FF 83 83 83 FF 05 05' - '05 FF 00 00 00 F7 00 00 00 37 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 84 00 00 00 FF 3F 3F 3F FF D5 D5' - 'D5 FF FF FF FF FF FA FA FA FF FA FA FA FF FB FB' - 'FB FF FB FB FB FF FB FB FB FF FB FB FB FF FC FC' - 'FC FF FC FC FC FF FC FC FC FF FD FD FD FF FD FD' - 'FD FF FD FD FD FF FD FD FD FF FE FE FE FF FE FE' - 'FE FF FE FE FE FF FE FE FE FF FE FE FE FF FE FE' - 'FE FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF F0 F0 F0 FF 84 84 84 FF 05 05' - '05 FF 00 00 00 F7 00 00 00 37 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 84 00 00 00 FF 40 40 40 FF D5 D5' - 'D5 FF FF FF FF FF FB FB FB FF FB FB FB FF FB FB' - 'FB FF FC FC FC FF FC FC FC FF FC FC FC FF FC FC' - 'FC FF FD FD FD FF FD FD FD FF FD FD FD FF FD FD' - 'FD FF FD FD FD FF FE FE FE FF FE FE FE FF FE FE' - 'FE FF FE FE FE FF FE FE FE FF FE FE FE FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF F0 F0 F0 FF 85 85 85 FF 05 05' - '05 FF 00 00 00 F7 00 00 00 37 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 84 00 00 00 FF 40 40 40 FF D6 D6' - 'D6 FF FF FF FF FF FB FB FB FF FB FB FB FF FC FC' - 'FC FF FC FC FC FF FD FD FD FF FD FD FD FF FD FD' - 'FD FF FD FD FD FF FD FD FD FF FE FE FE FF FE FE' - 'FE FF FE FE FE FF FE FE FE FF FE FE FE FF FE FE' - 'FE FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF F0 F0 F0 FF 85 85 85 FF 05 05' - '05 FF 00 00 00 F7 00 00 00 37 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 84 00 00 00 FF 41 41 41 FF D6 D6' - 'D6 FF FF FF FF FF FB FB FB FF FC FC FC FF FD FD' - 'FD FF FD FD FD FF FC FC FC FF FD FD FD FF FE FE' - 'FE FF FE FE FE FF FE FE FE FF FE FE FE FF FE FE' - 'FE FF FE FE FE FF FE FE FE FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF F0 F0 F0 FF 86 86 86 FF 05 05' - '05 FF 00 00 00 F7 00 00 00 37 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 84 00 00 00 FF 41 41 41 FF D6 D6' - 'D6 FF FF FF FF FF FD FD FD FF FD FD FD FF FD FD' - 'FD FF FE FE FE FF FE FE FE FF FE FE FE FF FE FE' - 'FE FF FE FE FE FF FE FE FE FF FE FE FE FF FE FE' - 'FE FF FE FE FE FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF F1 F1 F1 FF 87 87 87 FF 05 05' - '05 FF 00 00 00 F7 00 00 00 37 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 84 00 00 00 FF 41 41 41 FF D7 D7' - 'D7 FF FF FF FF FF FD FD FD FF FD FD FD FF FE FE' - 'FE FF FE FE FE FF FE FE FE FF FE FE FE FF FE FE' - 'FE FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF F1 F1 F1 FF 87 87 87 FF 05 05' - '05 FF 00 00 00 F7 00 00 00 37 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 84 00 00 00 FF 41 41 41 FF D7 D7' - 'D7 FF FF FF FF FF FE FE FE FF FE FE FE FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF F1 F1 F1 FF 88 88 88 FF 05 05' - '05 FF 00 00 00 F7 00 00 00 37 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 84 00 00 00 FF 41 41 41 FF D7 D7' - 'D7 FF FF FF FF FF FE FE FE FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF F1 F1 F1 FF 88 88 88 FF 05 05' - '05 FF 00 00 00 F7 00 00 00 37 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 84 00 00 00 FF 42 42 42 FF D8 D8' - 'D8 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF F1 F1 F1 FF 89 89 89 FF 05 05' - '05 FF 00 00 00 F7 00 00 00 37 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 84 00 00 00 FF 42 42 42 FF D9 D9' - 'D9 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF F2 F2 F2 FF 8A 8A 8A FF 05 05' - '05 FF 00 00 00 F7 00 00 00 37 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 84 00 00 00 FF 47 47 47 FF D9 D9' - 'D9 FF FB FB FB FF F8 F8 F8 FF F8 F8 F8 FF F8 F8' - 'F8 FF F7 F7 F7 FF F7 F7 F7 FF F7 F7 F7 FF F7 F7' - 'F7 FF F7 F7 F7 FF F7 F7 F7 FF F7 F7 F7 FF F7 F7' - 'F7 FF F6 F6 F6 FF F6 F6 F6 FF F6 F6 F6 FF F6 F6' - 'F6 FF F6 F6 F6 FF F5 F5 F5 FF F5 F5 F5 FF F5 F5' - 'F5 FF F5 F5 F5 FF F5 F5 F5 FF F4 F4 F4 FF F4 F4' - 'F4 FF F4 F4 F4 FF F4 F4 F4 FF F4 F4 F4 FF F4 F4' - 'F4 FF F4 F4 F4 FF F3 F3 F3 FF F3 F3 F3 FF F3 F3' - 'F3 FF F6 F6 F6 FF E8 E8 E8 FF 8F 8F 8F FF 06 06' - '06 FF 00 00 00 F7 00 00 00 38 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 83 00 00 00 FF 2D 2D 2D FF 98 98' - '98 FF 98 98 98 FF 97 97 97 FF 97 97 97 FF 97 97' - '97 FF 96 96 96 FF 95 95 95 FF 95 95 95 FF 95 95' - '95 FF 93 93 93 FF 93 93 93 FF 93 93 93 FF 92 92' - '92 FF 91 91 91 FF 90 90 90 FF 90 90 90 FF 90 90' - '90 FF 8F 8F 8F FF 8F 8F 8F FF 8E 8E 8E FF 8C 8C' - '8C FF 8C 8C 8C FF 8C 8C 8C FF 8B 8B 8B FF 89 89' - '89 FF 89 89 89 FF 88 88 88 FF 88 88 88 FF 86 86' - '86 FF 86 86 86 FF 86 86 86 FF 86 86 86 FF 84 84' - '84 FF 84 84 84 FF 87 87 87 FF 6C 6C 6C FF 04 04' - '04 FF 00 00 00 F7 00 00 00 33 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 47 00 00 00 F5 00 00 00 FF 04 04' - '04 FF 04 04 04 FF 04 04 04 FF 04 04 04 FF 04 04' - '04 FF 04 04 04 FF 04 04 04 FF 04 04 04 FF 04 04' - '04 FF 04 04 04 FF 04 04 04 FF 04 04 04 FF 04 04' - '04 FF 04 04 04 FF 04 04 04 FF 04 04 04 FF 04 04' - '04 FF 04 04 04 FF 04 04 04 FF 04 04 04 FF 04 04' - '04 FF 03 03 03 FF 03 03 03 FF 03 03 03 FF 03 03' - '03 FF 03 03 03 FF 03 03 03 FF 03 03 03 FF 03 03' - '03 FF 03 03 03 FF 03 03 03 FF 03 03 03 FF 03 03' - '03 FF 03 03 03 FF 03 03 03 FF 03 03 03 FF 00 00' - '00 FF 00 00 00 C1 00 00 00 14 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 52 00 00 00 EA 00 00' - '00 F3 00 00 00 F0 00 00 00 F0 00 00 00 F0 00 00' - '00 F0 00 00 00 F0 00 00 00 F0 00 00 00 F0 00 00' - '00 F0 00 00 00 F0 00 00 00 F0 00 00 00 F0 00 00' - '00 F0 00 00 00 F0 00 00 00 F0 00 00 00 F0 00 00' - '00 F0 00 00 00 F0 00 00 00 F0 00 00 00 F0 00 00' - '00 F0 00 00 00 F0 00 00 00 F0 00 00 00 F0 00 00' - '00 F0 00 00 00 F0 00 00 00 F0 00 00 00 F0 00 00' - '00 F0 00 00 00 F0 00 00 00 F0 00 00 00 F0 00 00' - '00 F0 00 00 00 F0 00 00 00 F0 00 00 00 F4 00 00' - '00 C7 00 00 00 29 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 F0 00 00 01 FF FF 00 00 E0 00' - '00 00 FF FF 00 00 E0 00 00 00 7F FF 00 00 E0 00' - '00 00 3F FF 00 00 E0 00 00 00 1F FF 00 00 E0 00' - '00 00 0F FF 00 00 E0 00 00 00 07 FF 00 00 E0 00' - '00 00 03 FF 00 00 E0 00 00 00 01 FF 00 00 E0 00' - '00 00 00 FF 00 00 E0 00 00 00 00 7F 00 00 E0 00' - '00 00 00 3F 00 00 E0 00 00 00 00 1F 00 00 E0 00' - '00 00 00 0F 00 00 E0 00 00 00 00 07 00 00 E0 00' - '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' - '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' - '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' - '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' - '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' - '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' - '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' - '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' - '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' - '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' - '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' - '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' - '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' - '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' - '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' - '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 F0 00' - '00 00 00 0F 00 00 28 00 00 00 20 00 00 00 40 00' - '00 00 01 00 20 00 00 00 00 00 00 10 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 3C 00 00' - '00 64 00 00 00 61 00 00 00 61 00 00 00 61 00 00' - '00 61 00 00 00 61 00 00 00 61 00 00 00 61 00 00' - '00 61 00 00 00 61 00 00 00 61 00 00 00 61 00 00' - '00 61 00 00 00 61 00 00 00 62 00 00 00 41 00 00' - '00 06 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 4D 01 01 01 FB 05 05' - '05 FF 03 03 03 FF 03 03 03 FF 02 02 02 FF 02 02' - '02 FF 02 02 02 FF 02 02 02 FF 02 02 02 FF 02 02' - '02 FF 02 02 02 FF 02 02 02 FF 02 02 02 FF 01 01' - '01 FF 00 00 00 FF 03 03 03 FF 01 01 01 FD 00 00' - '00 7F 00 00 00 02 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 84 1A 1A 1A FF 8C 8C' - '8C FF 9F 9F 9F FF 9C 9C 9C FF 9A 9A 9A FF 9A 9A' - '9A FF 99 99 99 FF 99 99 99 FF 97 97 97 FF 97 97' - '97 FF 96 96 96 FF 96 96 96 FF 95 95 95 FF 93 93' - '93 FF 8E 8E 8E FF 7D 7D 7D FF 33 33 33 FF 00 00' - '00 FD 00 00 00 79 00 00 00 02 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 84 1D 1D 1D FF C6 C6' - 'C6 FF F7 F7 F7 FF EA EA EA FF EB EB EB FF EB EB' - 'EB FF EB EB EB FF EB EB EB FF EC EC EC FF EC EC' - 'EC FF ED ED ED FF EE EE EE FF EE EE EE FF EF EF' - 'EF FF F3 F3 F3 FF B7 B7 B7 FF 94 94 94 FF 34 34' - '34 FF 00 00 00 FD 00 00 00 7A 00 00 00 02 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 84 1C 1C 1C FF C4 C4' - 'C4 FF EB EB EB FF D8 D8 D8 FF DA DA DA FF DB DB' - 'DB FF DB DB DB FF DC DC DC FF DC DC DC FF DC DC' - 'DC FF DD DD DD FF DD DD DD FF DD DD DD FF DE DE' - 'DE FF E0 E0 E0 FF AE AE AE FF D1 D1 D1 FF A4 A4' - 'A4 FF 32 32 32 FF 00 00 00 FD 00 00 00 7A 00 00' - '00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 84 1C 1C 1C FF C4 C4' - 'C4 FF ED ED ED FF DB DB DB FF DD DD DD FF DD DD' - 'DD FF DE DE DE FF DE DE DE FF DE DE DE FF DF DF' - 'DF FF DF DF DF FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' - 'E0 FF E2 E2 E2 FF AE AE AE FF D9 D9 D9 FF E9 E9' - 'E9 FF A3 A3 A3 FF 2E 2E 2E FF 00 00 00 FD 00 00' - '00 7A 00 00 00 02 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 84 1D 1D 1D FF C6 C6' - 'C6 FF EF EF EF FF DD DD DD FF DF DF DF FF DF DF' - 'DF FF DF DF DF FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' - 'E0 FF E1 E1 E1 FF E1 E1 E1 FF E1 E1 E1 FF E2 E2' - 'E2 FF E4 E4 E4 FF B0 B0 B0 FF DA DA DA FF F1 F1' - 'F1 FF EC EC EC FF A3 A3 A3 FF 2B 2B 2B FF 00 00' - '00 FD 00 00 00 79 00 00 00 01 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 84 1D 1D 1D FF C6 C6' - 'C6 FF EF EF EF FF DE DE DE FF E0 E0 E0 FF E0 E0' - 'E0 FF E1 E1 E1 FF E1 E1 E1 FF E1 E1 E1 FF E2 E2' - 'E2 FF E2 E2 E2 FF E3 E3 E3 FF E3 E3 E3 FF E3 E3' - 'E3 FF E5 E5 E5 FF B1 B1 B1 FF DE DE DE FF F2 F2' - 'F2 FF F4 F4 F4 FF F1 F1 F1 FF A4 A4 A4 FF 2B 2B' - '2B FF 00 00 00 FC 00 00 00 72 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 84 1D 1D 1D FF C7 C7' - 'C7 FF F1 F1 F1 FF E0 E0 E0 FF E2 E2 E2 FF E2 E2' - 'E2 FF E2 E2 E2 FF E3 E3 E3 FF E3 E3 E3 FF E3 E3' - 'E3 FF E4 E4 E4 FF E4 E4 E4 FF E4 E4 E4 FF E5 E5' - 'E5 FF E7 E7 E7 FF B3 B3 B3 FF E1 E1 E1 FF F6 F6' - 'F6 FF F4 F4 F4 FF F9 F9 F9 FF F6 F6 F6 FF A6 A6' - 'A6 FF 2D 2D 2D FF 00 00 00 F9 00 00 00 6F 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 84 1E 1E 1E FF C7 C7' - 'C7 FF F1 F1 F1 FF E2 E2 E2 FF E3 E3 E3 FF E3 E3' - 'E3 FF E4 E4 E4 FF E4 E4 E4 FF E5 E5 E5 FF E5 E5' - 'E5 FF E5 E5 E5 FF E5 E5 E5 FF E6 E6 E6 FF E6 E6' - 'E6 FF E8 E8 E8 FF B5 B5 B5 FF E8 E8 E8 FF FE FE' - 'FE FF FC FC FC FF FD FD FD FF FF FF FF FF FC FC' - 'FC FF AD AD AD FF 31 31 31 FF 00 00 00 F9 00 00' - '00 6F 00 00 00 01 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 84 1E 1E 1E FF C8 C8' - 'C8 FF F3 F3 F3 FF E3 E3 E3 FF E5 E5 E5 FF E5 E5' - 'E5 FF E5 E5 E5 FF E6 E6 E6 FF E6 E6 E6 FF E6 E6' - 'E6 FF E7 E7 E7 FF E7 E7 E7 FF E7 E7 E7 FF E8 E8' - 'E8 FF EA EA EA FF B2 B2 B2 FF D8 D8 D8 FF EC EC' - 'EC FF EA EA EA FF EB EB EB FF EB EB EB FF EF EF' - 'EF FF EA EA EA FF 98 98 98 FF 2C 2C 2C FF 00 00' - '00 F5 00 00 00 42 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 84 1E 1E 1E FF C8 C8' - 'C8 FF F3 F3 F3 FF E5 E5 E5 FF E6 E6 E6 FF E6 E6' - 'E6 FF E7 E7 E7 FF E7 E7 E7 FF E7 E7 E7 FF E8 E8' - 'E8 FF E8 E8 E8 FF E8 E8 E8 FF E9 E9 E9 FF E9 E9' - 'E9 FF EC EC EC FF C9 C9 C9 FF B3 B3 B3 FF B6 B6' - 'B6 FF B5 B5 B5 FF B5 B5 B5 FF B5 B5 B5 FF B4 B4' - 'B4 FF B6 B6 B6 FF BA BA BA FF 80 80 80 FF 03 03' - '03 FF 00 00 00 61 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 84 1F 1F 1F FF C9 C9' - 'C9 FF F5 F5 F5 FF E8 E8 E8 FF E8 E8 E8 FF E8 E8' - 'E8 FF E8 E8 E8 FF E9 E9 E9 FF E9 E9 E9 FF E9 E9' - 'E9 FF EA EA EA FF EA EA EA FF EA EA EA FF EB EB' - 'EB FF EB EB EB FF EE EE EE FF EE EE EE FF ED ED' - 'ED FF EE EE EE FF EE EE EE FF EF EF EF FF EF EF' - 'EF FF F0 F0 F0 FF F7 F7 F7 FF 93 93 93 FF 02 02' - '02 FF 00 00 00 61 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 84 1F 1F 1F FF CA CA' - 'CA FF F7 F7 F7 FF EA EA EA FF EC EC EC FF EA EA' - 'EA FF E9 E9 E9 FF EA EA EA FF EA EA EA FF EB EB' - 'EB FF EB EB EB FF EC EC EC FF EC EC EC FF EC EC' - 'EC FF ED ED ED FF ED ED ED FF EE EE EE FF EE EE' - 'EE FF EE EE EE FF EF EF EF FF EF EF EF FF EF EF' - 'EF FF F1 F1 F1 FF F6 F6 F6 FF 93 93 93 FF 02 02' - '02 FF 00 00 00 61 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 84 1F 1F 1F FF CA CA' - 'CA FF F8 F8 F8 FF EC EC EC FF EE EE EE FF EF EF' - 'EF FF EE EE EE FF EB EB EB FF EB EB EB FF EC EC' - 'EC FF ED ED ED FF ED ED ED FF ED ED ED FF EE EE' - 'EE FF EE EE EE FF EF EF EF FF EF EF EF FF EF EF' - 'EF FF F0 F0 F0 FF F0 F0 F0 FF F0 F0 F0 FF F1 F1' - 'F1 FF F2 F2 F2 FF F7 F7 F7 FF 93 93 93 FF 02 02' - '02 FF 00 00 00 61 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 84 20 20 20 FF CB CB' - 'CB FF F9 F9 F9 FF EE EE EE FF F0 F0 F0 FF F1 F1' - 'F1 FF F2 F2 F2 FF F1 F1 F1 FF EE EE EE FF ED ED' - 'ED FF EE EE EE FF EE EE EE FF EE EE EE FF EF EF' - 'EF FF EF EF EF FF EF EF EF FF F0 F0 F0 FF F1 F1' - 'F1 FF F1 F1 F1 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2' - 'F2 FF F3 F3 F3 FF F8 F8 F8 FF 94 94 94 FF 02 02' - '02 FF 00 00 00 61 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 84 20 20 20 FF CC CC' - 'CC FF FB FB FB FF F0 F0 F0 FF F2 F2 F2 FF F2 F2' - 'F2 FF F4 F4 F4 FF F5 F5 F5 FF F5 F5 F5 FF F4 F4' - 'F4 FF F3 F3 F3 FF F3 F3 F3 FF F3 F3 F3 FF F3 F3' - 'F3 FF F3 F3 F3 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2' - 'F2 FF F2 F2 F2 FF F2 F2 F2 FF F3 F3 F3 FF F4 F4' - 'F4 FF F5 F5 F5 FF F9 F9 F9 FF 94 94 94 FF 02 02' - '02 FF 00 00 00 61 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 84 20 20 20 FF CD CD' - 'CD FF FB FB FB FF F2 F2 F2 FF F3 F3 F3 FF F4 F4' - 'F4 FF F5 F5 F5 FF F6 F6 F6 FF F7 F7 F7 FF F8 F8' - 'F8 FF F9 F9 F9 FF F9 F9 F9 FF FA FA FA FF FB FB' - 'FB FF FB FB FB FF FB FB FB FF FA FA FA FF F8 F8' - 'F8 FF F6 F6 F6 FF F5 F5 F5 FF F4 F4 F4 FF F5 F5' - 'F5 FF F6 F6 F6 FF FA FA FA FF 95 95 95 FF 02 02' - '02 FF 00 00 00 61 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 84 21 21 21 FF CE CE' - 'CE FF FD FD FD FF F4 F4 F4 FF F4 F4 F4 FF F6 F6' - 'F6 FF F6 F6 F6 FF F7 F7 F7 FF F8 F8 F8 FF F8 F8' - 'F8 FF FA FA FA FF FA FA FA FF FB FB FB FF FB FB' - 'FB FF FC FC FC FF FD FD FD FF FD FD FD FF FE FE' - 'FE FF FE FE FE FF FC FC FC FF F9 F9 F9 FF F6 F6' - 'F6 FF F7 F7 F7 FF FB FB FB FF 96 96 96 FF 02 02' - '02 FF 00 00 00 61 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 84 21 21 21 FF CE CE' - 'CE FF FE FE FE FF F5 F5 F5 FF F6 F6 F6 FF F7 F7' - 'F7 FF F8 F8 F8 FF F9 F9 F9 FF F9 F9 F9 FF FA FA' - 'FA FF FB FB FB FF FB FB FB FF FC FC FC FF FC FC' - 'FC FF FD FD FD FF FD FD FD FF FE FE FE FF FE FE' - 'FE FF FE FE FE FF FF FF FF FF FF FF FF FF FD FD' - 'FD FF FB FB FB FF FC FC FC FF 97 97 97 FF 02 02' - '02 FF 00 00 00 61 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 84 21 21 21 FF CF CF' - 'CF FF FF FF FF FF F7 F7 F7 FF F8 F8 F8 FF F8 F8' - 'F8 FF F9 F9 F9 FF FA FA FA FF FA FA FA FF FB FB' - 'FB FF FB FB FB FF FC FC FC FF FC FC FC FF FD FD' - 'FD FF FD FD FD FF FE FE FE FF FE FE FE FF FE FE' - 'FE FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF 98 98 98 FF 02 02' - '02 FF 00 00 00 61 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 84 22 22 22 FF CF CF' - 'CF FF FF FF FF FF F8 F8 F8 FF F9 F9 F9 FF FA FA' - 'FA FF FA FA FA FF FA FA FA FF FB FB FB FF FC FC' - 'FC FF FC FC FC FF FD FD FD FF FD FD FD FF FE FE' - 'FE FF FE FE FE FF FE FE FE FF FE FE FE FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF 99 99 99 FF 02 02' - '02 FF 00 00 00 61 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 84 22 22 22 FF D0 D0' - 'D0 FF FF FF FF FF F9 F9 F9 FF FA FA FA FF FB FB' - 'FB FF FB FB FB FF FB FB FB FF FC FC FC FF FD FD' - 'FD FF FD FD FD FF FE FE FE FF FE FE FE FF FE FE' - 'FE FF FE FE FE FF FE FE FE FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF 99 99 99 FF 02 02' - '02 FF 00 00 00 61 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 84 23 23 23 FF D1 D1' - 'D1 FF FF FF FF FF FA FA FA FF FB FB FB FF FC FC' - 'FC FF FC FC FC FF FD FD FD FF FD FD FD FF FD FD' - 'FD FF FE FE FE FF FE FE FE FF FE FE FE FF FE FE' - 'FE FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF 9A 9A 9A FF 02 02' - '02 FF 00 00 00 61 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 84 23 23 23 FF D1 D1' - 'D1 FF FF FF FF FF FC FC FC FF FC FC FC FF FD FD' - 'FD FF FD FD FD FF FD FD FD FF FE FE FE FF FE FE' - 'FE FF FE FE FE FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF 9B 9B 9B FF 02 02' - '02 FF 00 00 00 61 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 84 23 23 23 FF D2 D2' - 'D2 FF FF FF FF FF FD FD FD FF FD FD FD FF FD FD' - 'FD FF FE FE FE FF FE FE FE FF FE FE FE FF FE FE' - 'FE FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF 9C 9C 9C FF 03 03' - '03 FF 00 00 00 61 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 84 23 23 23 FF D3 D3' - 'D3 FF FF FF FF FF FE FE FE FF FE FE FE FF FE FE' - 'FE FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF 9D 9D 9D FF 03 03' - '03 FF 00 00 00 61 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 84 23 23 23 FF D3 D3' - 'D3 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF 9D 9D 9D FF 03 03' - '03 FF 00 00 00 61 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 84 24 24 24 FF D4 D4' - 'D4 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF 9E 9E 9E FF 03 03' - '03 FF 00 00 00 61 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 84 27 27 27 FF D8 D8' - 'D8 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FE FE FE FF FE FE' - 'FE FF FE FE FE FF FE FE FE FF FE FE FE FF FD FD' - 'FD FF FD FD FD FF FD FD FD FF FD FD FD FF FD FD' - 'FD FF FD FD FD FF FC FC FC FF FC FC FC FF FC FC' - 'FC FF FD FD FD FF FF FF FF FF A3 A3 A3 FF 04 04' - '04 FF 00 00 00 61 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 7F 18 18 18 FF 77 77' - '77 FF 7D 7D 7D FF 7B 7B 7B FF 7A 7A 7A FF 79 79' - '79 FF 79 79 79 FF 78 78 78 FF 78 78 78 FF 77 77' - '77 FF 76 76 76 FF 75 75 75 FF 75 75 75 FF 74 74' - '74 FF 73 73 73 FF 72 72 72 FF 71 71 71 FF 70 70' - '70 FF 70 70 70 FF 6F 6F 6F FF 6E 6E 6E FF 6E 6E' - '6E FF 6D 6D 6D FF 6E 6E 6E FF 59 59 59 FF 03 03' - '03 FF 00 00 00 59 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 2A 00 00 00 D3 00 00' - '00 F5 00 00 00 F0 00 00 00 F0 00 00 00 F0 00 00' - '00 F0 00 00 00 F0 00 00 00 F0 00 00 00 F0 00 00' - '00 F0 00 00 00 F0 00 00 00 F0 00 00 00 F0 00 00' - '00 F0 00 00 00 F0 00 00 00 F0 00 00 00 F0 00 00' - '00 F0 00 00 00 F0 00 00 00 F0 00 00 00 F0 00 00' - '00 F0 00 00 00 F0 00 00 00 F0 00 00 00 F6 00 00' - '00 B6 00 00 00 14 00 00 00 00 00 00 00 00 E0 00' - '07 FF C0 00 03 FF C0 00 01 FF C0 00 00 FF C0 00' - '00 7F C0 00 00 3F C0 00 00 1F C0 00 00 1F C0 00' - '00 0F C0 00 00 03 C0 00 00 03 C0 00 00 03 C0 00' - '00 03 C0 00 00 03 C0 00 00 03 C0 00 00 03 C0 00' - '00 03 C0 00 00 03 C0 00 00 03 C0 00 00 03 C0 00' - '00 03 C0 00 00 03 C0 00 00 03 C0 00 00 03 C0 00' - '00 03 C0 00 00 03 C0 00 00 03 C0 00 00 03 C0 00' - '00 03 C0 00 00 03 C0 00 00 03 C0 00 00 03 28 00' - '00 00 10 00 00 00 20 00 00 00 01 00 20 00 00 00' - '00 00 00 04 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 01 01 01 63 05 05' - '05 AF 04 04 04 A8 04 04 04 A8 04 04 04 A8 04 04' - '04 A8 03 03 03 A8 03 03 03 AA 02 02 02 A0 00 00' - '00 2C 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 13 13 13 CB A8 A8' - 'A8 FF BC BC BC FF B7 B7 B7 FF B7 B7 B7 FF B6 B6' - 'B6 FF B7 B7 B7 FF B6 B6 B6 FF 7A 7A 7A FF 0F 0F' - '0F D5 00 00 00 28 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 17 17 17 CC D1 D1' - 'D1 FF EA EA EA FF E5 E5 E5 FF E6 E6 E6 FF E7 E7' - 'E7 FF E9 E9 E9 FF E3 E3 E3 FF D0 D0 D0 FF 95 95' - '95 FF 0B 0B 0B D5 00 00 00 28 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 17 17 17 CC CD CD' - 'CD FF E4 E4 E4 FF DF DF DF FF E0 E0 E0 FF E1 E1' - 'E1 FF E2 E2 E2 FF DA DA DA FF CE CE CE FF F9 F9' - 'F9 FF 95 95 95 FF 0A 0A 0A D4 00 00 00 25 00 00' - '00 00 00 00 00 00 00 00 00 00 17 17 17 CC D0 D0' - 'D0 FF E7 E7 E7 FF E3 E3 E3 FF E4 E4 E4 FF E4 E4' - 'E4 FF E6 E6 E6 FF DD DD DD FF D2 D2 D2 FF FF FF' - 'FF FF FF FF FF FF 9E 9E 9E FF 0D 0D 0D D1 00 00' - '00 24 00 00 00 00 00 00 00 00 17 17 17 CC D1 D1' - 'D1 FF EB EB EB FF E5 E5 E5 FF E7 E7 E7 FF E7 E7' - 'E7 FF E9 E9 E9 FF E4 E4 E4 FF CB CB CB FF D7 D7' - 'D7 FF D9 D9 D9 FF DF DF DF FF 7C 7C 7C FF 00 00' - '00 9D 00 00 00 00 00 00 00 00 17 17 17 CC D4 D4' - 'D4 FF F0 F0 F0 FF E9 E9 E9 FF E9 E9 E9 FF EA EA' - 'EA FF EB EB EB FF EC EC EC FF E8 E8 E8 FF E4 E4' - 'E4 FF E5 E5 E5 FF EF EF EF FF BC BC BC FF 03 03' - '03 A8 00 00 00 00 00 00 00 00 17 17 17 CC D6 D6' - 'D6 FF F4 F4 F4 FF EF EF EF FF EE EE EE FF ED ED' - 'ED FF ED ED ED FF EE EE EE FF F0 F0 F0 FF F1 F1' - 'F1 FF F1 F1 F1 FF FC FC FC FF BD BD BD FF 02 02' - '02 A8 00 00 00 00 00 00 00 00 18 18 18 CC D8 D8' - 'D8 FF F8 F8 F8 FF F4 F4 F4 FF F5 F5 F5 FF F5 F5' - 'F5 FF F6 F6 F6 FF F6 F6 F6 FF F6 F6 F6 FF F5 F5' - 'F5 FF F4 F4 F4 FF FE FE FE FF BE BE BE FF 03 03' - '03 A8 00 00 00 00 00 00 00 00 18 18 18 CC DB DB' - 'DB FF FB FB FB FF F6 F6 F6 FF F8 F8 F8 FF FA FA' - 'FA FF FB FB FB FF FC FC FC FF FD FD FD FF FE FE' - 'FE FF FD FD FD FF FF FF FF FF C0 C0 C0 FF 02 02' - '02 A8 00 00 00 00 00 00 00 00 18 18 18 CC DC DC' - 'DC FF FE FE FE FF F9 F9 F9 FF FB FB FB FF FC FC' - 'FC FF FC FC FC FF FD FD FD FF FE FE FE FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF C3 C3 C3 FF 02 02' - '02 A8 00 00 00 00 00 00 00 00 18 18 18 CC DE DE' - 'DE FF FF FF FF FF FC FC FC FF FC FC FC FF FD FD' - 'FD FF FE FE FE FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF C4 C4 C4 FF 03 03' - '03 A8 00 00 00 00 00 00 00 00 18 18 18 CC DF DF' - 'DF FF FF FF FF FF FD FD FD FF FE FE FE FF FE FE' - 'FE FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF C5 C5 C5 FF 03 03' - '03 A8 00 00 00 00 00 00 00 00 19 19 19 CC E2 E2' - 'E2 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF C7 C7 C7 FF 03 03' - '03 A8 00 00 00 00 00 00 00 00 19 19 19 CC E2 E2' - 'E2 FF FF FF FF FF FD FD FD FF FD FD FD FF FD FD' - 'FD FF FD FD FD FF FD FD FD FF FC FC FC FF FC FC' - 'FC FF FB FB FB FF FF FF FF FF C6 C6 C6 FF 04 04' - '04 A8 00 00 00 00 00 00 00 00 09 09 09 A0 41 41' - '41 F9 46 46 46 F0 44 44 44 F0 44 44 44 F0 43 43' - '43 F0 42 42 42 F0 42 42 42 F0 41 41 41 F0 3F 3F' - '3F F0 3F 3F 3F F0 40 40 40 F0 36 36 36 FB 02 02' - '02 82 00 00 00 00 80 1F 00 00 80 0F 00 00 80 07' - '00 00 80 03 00 00 80 01 00 00 80 01 00 00 80 01' - '00 00 80 01 00 00 80 01 00 00 80 01 00 00 80 01' - '00 00 80 01 00 00 80 01 00 00 80 01 00 00 80 01' - '00 00 80 01 00 00' -} */ - - -/* BINRES folder.ico */ -3 ICON folder.ico -/* { - '00 00 01 00 08 00 20 20 00 00 01 00 08 00 A8 08' - '00 00 86 00 00 00 10 10 00 00 01 00 08 00 68 05' - '00 00 2E 09 00 00 20 20 00 00 01 00 04 00 E8 02' - '00 00 96 0E 00 00 10 10 00 00 01 00 04 00 28 01' - '00 00 7E 11 00 00 30 30 00 00 01 00 08 00 A8 0E' - '00 00 A6 12 00 00 30 30 00 00 01 00 20 00 A8 25' - '00 00 4E 21 00 00 20 20 00 00 01 00 20 00 A8 10' - '00 00 F6 46 00 00 10 10 00 00 01 00 20 00 68 04' - '00 00 9E 57 00 00 28 00 00 00 20 00 00 00 40 00' - '00 00 01 00 08 00 00 00 00 00 00 04 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 11 00 00 00 00 11 00 00 00 00 11 00 22 00' - '00 00 33 00 00 00 33 33 00 00 33 33 33 00 44 00' - '00 00 66 33 00 00 66 33 33 00 66 66 33 00 7F 7F' - '7F 00 99 33 00 00 99 33 33 00 99 66 33 00 99 66' - '66 00 CC 66 66 00 FF 99 33 00 FF CC 33 00 99 99' - '66 00 CC 99 66 00 FF 99 66 00 CC CC 66 00 FF CC' - '66 00 BB BB BB 00 CC 99 99 00 FF 99 99 00 CC CC' - '99 00 FF CC 99 00 FF FF 99 00 CC 99 CC 00 CC CC' - 'CC 00 DD DD DD 00 FF CC CC 00 FF FF CC 00 FF CC' - 'FF 00 EE EE EE 00 FF FF FF 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 C0 17 95 00 00 00 38 00 A8 44' - 'F9 77 13 00 00 00 18 0A 38 00 00 00 38 00 18 6C' - '38 00 98 17 95 00 00 00 00 00 E0 19 95 00 F0 88' - 'FA 77 70 38 F5 77 FF FF FF FF A8 44 F9 77 70 7D' - 'F5 77 3A 8A F5 77 86 00 00 00 86 00 00 00 08 00' - '00 00 B0 18 95 00 00 00 00 00 CB 44 F9 77 38 9F' - '07 00 CD 8B F5 77 78 13 05 00 37 90 F5 77 00 00' - '00 00 3E 8A F5 77 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 10 00' - '00 00 00 00 00 00 56 00 58 00 00 EC FD 7F 1A 02' - '00 00 4C 16 95 00 40 9F 07 00 FC 15 95 00 FF FF' - 'FF FF B4 1A 95 00 45 00 00 00 28 02 00 00 FF FF' - 'FF FF E2 D8 F5 77 7D 9B F5 77 94 B6 01 00 00 00' - '05 00 F4 17 95 00 80 00 10 C0 B4 1A 95 00 F0 88' - 'FA 77 88 1C F5 77 FF FF FF FF 37 90 F5 77 00 00' - '00 00 3E 8A F5 77 9B B2 E7 77 B7 00 00 00 02 00' - '00 00 A4 1A 95 00 01 00 00 00 18 00 00 00 00 00' - '00 00 10 19 95 00 42 00 00 00 00 00 00 00 F4 18' - '95 00 00 00 00 00 00 00 00 00 00 00 00 00 0C 00' - '00 00 02 00 00 00 01 01 F5 77 00 EC FD 7F 56 00' - '00 00 00 00 00 00 03 00 00 00 5E 00 1A 02 40 9F' - '07 00 00 00 00 00 40 9F 07 00 05 00 00 00 BE B3' - 'E7 77 4C 19 95 00 A3 B4 E7 77 F8 00 00 00 00 00' - '00 C0 00 00 00 00 00 00 00 00 02 00 00 00 80 00' - '00 00 00 00 00 00 8C 1A 95 00 7F E9 4B 00 08 6C' - '0C 01 00 00 00 C0 00 00 00 00 80 1A 95 00 02 00' - '00 00 80 00 00 00 00 00 00 00 C0 27 95 00 C4 F5' - 'AF 00 02 00 00 00 44 3A 5C 6F 73 65 78 70 65 72' - '74 73 5C 72 65 61 63 74 6F 73 5C 6C 69 62 5C 73' - '68 65 6C 6C 33 32 5C 66 6F 6C 64 65 72 2E 69 63' - '6F 00 1A 93 4B 00 14 1A 95 00 1F 3B D4 77 13 00' - '00 00 98 00 00 00 4F 3B D4 77 E0 19 95 00 33 3B' - 'D4 77 64 C5 F5 77 A9 F1 E7 77 F8 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 1A 95 00 18 6C' - '38 00 86 00 00 00 00 00 00 00 C9 F1 E7 77 86 00' - '00 00 A4 1A 95 00 08 00 00 00 00 00 00 00 86 00' - '00 00 86 00 00 00 08 00 00 00 F4 19 95 00 33 3B' - 'D4 77 B4 1A 95 00 09 48 E9 77 B8 10 E9 77 FF FF' - 'FF FF C9 F1 E7 77 16 EA 4B 00 F8 00 00 00 18 6C' - '38 00 86 00 00 00 58 1A 95 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 27 27 27 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 27 02 03 27 27' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 27 03 04 0D 06 27' - '27 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 27 27 27 09 11 22 1A 06' - '27 27 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 27 27 27 0F 1B 22 26 26 1A' - '05 27 27 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 27 02 08 15 1B 1C 26 26 26 26' - '1A 04 27 27 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 27 27 27 08 1A 1D 1A 26 26 26 26 26' - '25 15 04 27 27 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 27 27 27 0A 1D 1D 1A 1D 1D 26 26 26 26' - '26 25 10 04 27 27 00 00 00 00 00 00 00 00 00 00' - '00 00 27 01 01 10 23 1D 15 23 16 12 18 26 26 26' - '26 26 25 10 01 27 27 00 00 00 00 00 00 00 00 00' - '27 27 02 06 1B 23 1D 1A 22 12 12 16 12 1D 26 26' - '26 25 25 25 10 01 27 27 00 00 00 00 00 00 00 27' - '27 27 0E 22 23 1D 1A 22 18 12 16 12 16 12 18 25' - '26 24 25 23 25 10 01 27 27 00 00 00 00 00 27 01' - '04 15 23 22 22 1C 1D 1B 12 16 12 12 18 16 16 1D' - '23 25 25 21 25 22 10 01 27 27 00 00 00 00 03 06' - '1D 25 25 23 1C 1B 1D 13 16 12 18 16 12 16 18 16' - '1D 25 25 25 22 21 21 0F 01 27 27 00 00 00 27 09' - '22 23 22 22 17 1D 16 12 16 16 12 16 16 18 16 18' - '1B 1D 25 21 21 21 20 22 09 02 27 27 00 00 27 27' - '06 22 23 15 1D 16 12 16 16 13 16 18 12 16 18 1B' - '18 1D 1D 21 21 20 22 20 22 0A 27 27 27 00 00 27' - '27 09 16 1D 16 13 16 16 12 16 12 16 16 18 16 18' - '1D 1D 1E 22 20 22 19 20 19 22 0F 27 27 27 00 00' - '27 27 09 16 12 16 16 12 18 16 16 12 18 16 18 1D' - '1D 1D 22 22 23 20 22 19 22 19 1C 0E 27 27 00 00' - '00 27 27 09 16 16 16 18 16 12 18 16 16 1D 1D 1D' - '22 1E 22 23 22 23 20 19 19 22 1F 14 01 27 00 00' - '00 00 27 27 09 12 18 16 12 16 16 1D 1D 1D 1D 23' - '1D 22 23 22 23 23 25 22 19 19 14 02 27 27 00 00' - '00 00 00 27 27 09 16 18 16 18 1D 1D 1D 1D 22 1D' - '23 22 23 23 23 24 23 25 20 1A 04 27 27 00 00 00' - '00 00 00 00 27 27 09 16 18 1D 22 1D 1D 22 1D 23' - '22 23 22 23 24 23 26 26 1D 07 27 27 00 00 00 00' - '00 00 00 00 00 27 27 09 1D 22 1D 22 1D 22 23 22' - '23 22 26 23 25 23 25 22 0A 27 27 00 00 00 00 00' - '00 00 00 00 00 00 27 27 10 1D 22 1E 22 23 22 23' - '22 23 23 24 23 26 25 0B 27 27 00 00 00 00 00 00' - '00 00 00 00 00 00 27 27 15 23 22 22 23 22 23 24' - '23 25 25 23 26 26 0F 27 27 00 00 00 00 00 00 00' - '00 00 00 00 00 00 27 27 05 1C 23 22 22 23 24 23' - '25 25 23 26 26 10 27 27 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 27 27 04 17 22 23 23 25 25' - '23 25 26 26 15 27 27 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 27 27 04 1D 26 26 25 23' - '26 26 25 22 04 27 27 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 27 27 06 22 25 26 26' - '25 26 22 06 27 27 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 27 27 04 1C 26 26' - '26 23 07 27 27 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 27 27 01 1A 26' - '23 0A 27 27 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 27 27 27 06' - '04 27 27 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 27 27' - '27 27 00 00 00 00 00 00 00 00 00 00 00 00 FF FC' - '7F FF FF F8 3F FF FF F0 1F FF FF C0 0F FF FF 80' - '07 FF FF 00 03 FF FC 00 01 FF F8 00 00 FF F0 00' - '00 7F C0 00 00 3F 80 00 00 1F 00 00 00 0F 00 00' - '00 07 00 00 00 03 00 00 00 01 80 00 00 00 C0 00' - '00 00 E0 00 00 00 F0 00 00 00 F8 00 00 01 FC 00' - '00 03 FE 00 00 07 FF 00 00 0F FF 00 00 1F FF 00' - '00 3F FF 80 00 7F FF C0 00 7F FF E0 00 FF FF F0' - '01 FF FF F8 03 FF FF FC 07 FF FF FF 0F FF 28 00' - '00 00 10 00 00 00 20 00 00 00 01 00 08 00 00 00' - '00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 11 00 00 00 00 11' - '00 00 00 00 11 00 11 11 11 00 22 00 00 00 33 00' - '00 00 33 33 00 00 33 00 33 00 22 22 22 00 33 33' - '33 00 66 33 00 00 66 33 33 00 66 66 33 00 44 44' - '44 00 66 66 66 00 77 77 77 00 7F 7F 7F 00 99 66' - '66 00 FF 99 33 00 99 99 66 00 CC 99 66 00 FF 99' - '66 00 FF CC 66 00 CC 99 99 00 CC CC 99 00 FF CC' - '99 00 FF FF 99 00 CC 99 CC 00 CC CC CC 00 DD DD' - 'DD 00 FF CC CC 00 FF FF CC 00 EE EE EE 00 FF FF' - 'FF 00 00 00 00 00 FF CC FF 00 EE EE EE 00 FF FF' - 'FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 C0 17' - '95 00 00 00 38 00 A8 44 F9 77 13 00 00 00 18 0A' - '38 00 00 00 38 00 18 6C 38 00 98 17 95 00 00 00' - '00 00 E0 19 95 00 F0 88 FA 77 70 38 F5 77 FF FF' - 'FF FF A8 44 F9 77 70 7D F5 77 3A 8A F5 77 86 00' - '00 00 86 00 00 00 08 00 00 00 B0 18 95 00 00 00' - '00 00 CB 44 F9 77 38 9F 07 00 CD 8B F5 77 78 13' - '05 00 37 90 F5 77 00 00 00 00 3E 8A F5 77 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 10 00 00 00 00 00 00 00 56 00' - '58 00 00 EC FD 7F 1A 02 00 00 4C 16 95 00 40 9F' - '07 00 FC 15 95 00 FF FF FF FF B4 1A 95 00 45 00' - '00 00 28 02 00 00 FF FF FF FF E2 D8 F5 77 7D 9B' - 'F5 77 94 B6 01 00 00 00 05 00 F4 17 95 00 80 00' - '10 C0 B4 1A 95 00 F0 88 FA 77 88 1C F5 77 FF FF' - 'FF FF 37 90 F5 77 00 00 00 00 3E 8A F5 77 9B B2' - 'E7 77 B7 00 00 00 02 00 00 00 A4 1A 95 00 01 00' - '00 00 18 00 00 00 00 00 00 00 10 19 95 00 42 00' - '00 00 00 00 00 00 F4 18 95 00 00 00 00 00 00 00' - '00 00 00 00 00 00 0C 00 00 00 02 00 00 00 01 01' - 'F5 77 00 EC FD 7F 56 00 00 00 00 00 00 00 03 00' - '00 00 5E 00 1A 02 40 9F 07 00 00 00 00 00 40 9F' - '07 00 05 00 00 00 BE B3 E7 77 4C 19 95 00 A3 B4' - 'E7 77 F8 00 00 00 00 00 00 C0 00 00 00 00 00 00' - '00 00 02 00 00 00 80 00 00 00 00 00 00 00 8C 1A' - '95 00 7F E9 4B 00 08 6C 0C 01 00 00 00 C0 00 00' - '00 00 80 1A 95 00 02 00 00 00 80 00 00 00 00 00' - '00 00 C0 27 95 00 C4 F5 AF 00 02 00 00 00 44 3A' - '5C 6F 73 65 78 70 65 72 74 73 5C 72 65 61 63 74' - '6F 73 5C 6C 69 62 5C 73 68 65 6C 6C 33 32 5C 66' - '6F 6C 64 65 72 2E 69 63 6F 00 1A 93 4B 00 14 1A' - '95 00 1F 3B D4 77 13 00 00 00 98 00 00 00 4F 3B' - 'D4 77 E0 19 95 00 33 3B D4 77 64 C5 F5 77 A9 F1' - 'E7 77 F8 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 1A 95 00 18 6C 38 00 86 00 00 00 00 00' - '00 00 C9 F1 E7 77 86 00 00 00 A4 1A 95 00 08 00' - '00 00 00 00 00 00 86 00 00 00 86 00 00 00 08 00' - '00 00 F4 19 95 00 33 3B D4 77 B4 1A 95 00 09 48' - 'E9 77 B8 10 E9 77 FF FF FF FF C9 F1 E7 77 16 EA' - '4B 00 F8 00 00 00 18 6C 38 00 86 00 00 00 58 1A' - '95 00 00 00 00 00 00 00 00 00 00 00 01 23 23 00' - '00 00 00 00 00 00 00 00 00 00 00 02 03 12 0C 23' - '00 00 00 00 00 00 00 00 00 00 02 08 15 22 20 0A' - '03 00 00 00 00 00 00 00 23 23 0C 1A 1F 22 22 1F' - '07 03 00 00 00 00 00 01 01 10 1A 1A 13 1A 22 22' - '1D 07 23 00 00 00 23 09 1A 1F 1A 13 16 13 1A 21' - '22 1C 06 02 00 00 05 1F 20 1A 16 16 13 17 16 1A' - '1E 21 19 05 23 00 23 0D 1A 16 13 17 16 16 17 1A' - '1A 1E 1D 18 04 01 00 23 0B 17 16 16 13 16 1A 1A' - '20 1F 1D 1F 14 23 00 00 23 0B 17 16 1A 1A 1F 20' - '1F 21 20 1C 0A 23 00 00 00 23 0C 17 1F 1B 1F 1F' - '20 20 21 0D 23 00 00 00 00 00 23 18 20 1F 20 1F' - '22 22 0F 23 00 00 00 00 00 00 23 0E 1A 21 20 22' - '22 14 23 00 00 00 00 00 00 00 00 23 0C 20 22 22' - '18 02 23 00 00 00 00 00 00 00 00 00 23 0E 1F 1D' - '02 23 00 00 00 00 00 00 00 00 00 00 00 23 02 01' - '23 00 00 00 00 00 FC 7F 00 00 F8 3F 00 00 F0 1F' - '00 00 C0 0F 00 00 80 07 00 00 00 03 00 00 00 01' - '00 00 00 00 00 00 80 00 00 00 C0 00 00 00 E0 01' - '00 00 F0 03 00 00 F0 07 00 00 F8 07 00 00 FC 0F' - '00 00 FE 1F 00 00 28 00 00 00 20 00 00 00 40 00' - '00 00 01 00 04 00 00 00 00 00 00 02 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 80 00 00 00 00 80 00 00 80 80 00 00 00 00' - '80 00 80 00 80 00 00 80 80 00 C0 C0 C0 00 80 80' - '80 00 FF 00 00 00 00 FF 00 00 FF FF 00 00 00 00' - 'FF 00 FF 00 FF 00 00 FF FF 00 FF FF FF 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 08 10 00 00 00 00 00 00 00 00 00' - '00 00 00 00 08 BF 81 00 00 00 00 00 00 00 00 00' - '00 00 00 04 1B 7F F8 00 00 00 00 00 00 00 00 00' - '00 00 00 9B 77 FF FF 89 00 00 00 00 00 00 00 00' - '00 00 00 78 7F FF FF F8 20 00 00 00 00 00 00 00' - '00 00 1F B7 78 FF FF F7 10 00 00 00 00 00 00 00' - '00 81 77 8F B7 BF FF FF F8 20 00 00 00 00 00 00' - '08 BF FB FB 8B 8B FF FF F7 18 00 00 00 00 00 00' - '17 7F B7 88 B1 B7 BF FF 7F F8 00 00 00 00 00 0B' - 'FF F8 77 BB 7B 7B 78 FF F7 F7 B0 00 00 00 09 7F' - '7F B7 7B 88 B7 B8 BF BF 7F 77 7B 00 00 00 08 7F' - '7F 87 B8 B7 B8 B8 7B FB F7 F7 F7 90 00 00 00 97' - 'FB 7B 7B 7B 7B 8F B7 BF BF 7F 77 78 00 00 00 08' - 'B7 B8 B7 B8 B8 BB 7B 7B F7 77 77 7F 90 00 00 00' - '1B 7B 8B 7B 87 B7 BF BF 7F F7 77 FB F1 00 00 00' - '08 B8 B7 B7 BB 7B 77 F7 FB FF 77 77 78 00 00 00' - '00 8B 7B 7B B7 77 7F BF BF FF 77 77 80 00 00 00' - '00 08 B8 B7 7B FB F7 F7 F7 FF FF B7 00 00 00 00' - '00 00 1B FB 77 7F BF 7F BF FF FF 78 00 00 00 00' - '00 00 08 BF 7F BF 7F F7 FF BF FF 80 00 00 00 00' - '00 00 00 87 FB F7 FF BF FF FF F8 00 00 00 00 00' - '00 00 00 BF 77 FF BF FF 7F FF 80 00 00 00 00 00' - '00 00 00 07 F7 F7 FF F7 FF F8 00 00 00 00 00 00' - '00 00 00 00 BF 7F 7F FF FF B0 00 00 00 00 00 00' - '00 00 00 00 8B FF FF FF F7 00 00 00 00 00 00 00' - '00 00 00 00 08 7F FF FF 78 00 00 00 00 00 00 00' - '00 00 00 00 00 07 FF F7 80 00 00 00 00 00 00 00' - '00 00 00 00 00 00 8F F8 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 08 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FC' - '7F FF FF F8 3F FF FF F0 1F FF FF C0 0F FF FF 80' - '07 FF FF 00 03 FF FC 00 01 FF F8 00 00 FF F0 00' - '00 7F C0 00 00 3F 80 00 00 1F 00 00 00 0F 00 00' - '00 07 00 00 00 03 00 00 00 01 80 00 00 00 C0 00' - '00 00 E0 00 00 00 F0 00 00 00 F8 00 00 01 FC 00' - '00 03 FE 00 00 07 FF 00 00 0F FF 00 00 1F FF 00' - '00 3F FF 80 00 7F FF C0 00 7F FF E0 00 FF FF F0' - '01 FF FF F8 03 FF FF FC 07 FF FF FF 0F FF 28 00' - '00 00 10 00 00 00 20 00 00 00 01 00 04 00 00 00' - '00 00 80 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 80 00 00 00 00 80' - '00 00 80 80 00 00 00 00 80 00 80 00 80 00 00 80' - '80 00 C0 C0 C0 00 80 80 80 00 FF 00 00 00 00 FF' - '00 00 FF FF 00 00 00 00 FF 00 FF 00 FF 00 00 FF' - 'FF 00 FF FF FF 00 00 00 00 00 00 00 00 00 00 00' - '00 01 80 00 00 00 00 00 01 8F 78 00 00 00 00 00' - '1B FF F7 10 00 00 00 4B 8F B7 FF 70 00 00 08 BF' - '7B 8B FF F7 90 00 07 F7 7B 87 B7 F7 70 00 08 7B' - 'B7 BB 7B 7F 77 00 00 8B 7B B7 BF F7 77 B0 00 08' - 'B7 B7 FB FF F7 00 00 00 17 7F BF 7F F8 00 00 00' - '0B F7 FF FF 80 00 00 00 08 7F 7F F8 00 00 00 00' - '00 8F FF 70 00 00 00 00 00 08 F7 00 00 00 00 00' - '00 00 00 00 00 00 FC 7F 00 00 F8 3F 00 00 F0 1F' - '00 00 C0 0F 00 00 80 07 00 00 00 03 00 00 00 01' - '00 00 00 00 00 00 80 00 00 00 C0 00 00 00 E0 01' - '00 00 F0 03 00 00 F0 07 00 00 F8 07 00 00 FC 0F' - '00 00 FE 1F 00 00 28 00 00 00 30 00 00 00 60 00' - '00 00 01 00 08 00 00 00 00 00 00 09 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 11 00 00 00 00 11 00 00 00 00 11 00 22 00' - '00 00 33 00 00 00 00 22 00 00 33 33 00 00 22 22' - '22 00 44 00 00 00 55 00 00 00 66 00 00 00 66 33' - '00 00 66 33 33 00 66 66 33 00 7F 7F 7F 00 99 33' - '00 00 99 33 33 00 99 66 00 00 99 66 33 00 CC 66' - '00 00 CC 66 33 00 99 66 66 00 CC 66 66 00 CC 99' - '33 00 FF 99 33 00 FF CC 33 00 99 99 66 00 CC 99' - '66 00 FF 99 66 00 CC CC 66 00 FF CC 66 00 BB BB' - 'BB 00 CC 99 99 00 FF 99 99 00 CC CC 99 00 FF CC' - '99 00 FF FF 99 00 CC 99 CC 00 CC CC CC 00 DD DD' - 'DD 00 FF CC CC 00 CC FF CC 00 FF FF CC 00 FF CC' - 'FF 00 EE EE EE 00 FF FF FF 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 C0 17 95 00 00 00 38 00 A8 44' - 'F9 77 13 00 00 00 18 0A 38 00 00 00 38 00 18 6C' - '38 00 98 17 95 00 00 00 00 00 E0 19 95 00 F0 88' - 'FA 77 70 38 F5 77 FF FF FF FF A8 44 F9 77 70 7D' - 'F5 77 3A 8A F5 77 86 00 00 00 86 00 00 00 08 00' - '00 00 B0 18 95 00 00 00 00 00 CB 44 F9 77 38 9F' - '07 00 CD 8B F5 77 78 13 05 00 37 90 F5 77 00 00' - '00 00 3E 8A F5 77 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 10 00' - '00 00 00 00 00 00 56 00 58 00 00 EC FD 7F 1A 02' - '00 00 4C 16 95 00 40 9F 07 00 FC 15 95 00 FF FF' - 'FF FF B4 1A 95 00 45 00 00 00 28 02 00 00 FF FF' - 'FF FF E2 D8 F5 77 7D 9B F5 77 94 B6 01 00 00 00' - '05 00 F4 17 95 00 80 00 10 C0 B4 1A 95 00 F0 88' - 'FA 77 88 1C F5 77 FF FF FF FF 37 90 F5 77 00 00' - '00 00 3E 8A F5 77 9B B2 E7 77 B7 00 00 00 02 00' - '00 00 A4 1A 95 00 01 00 00 00 18 00 00 00 00 00' - '00 00 10 19 95 00 42 00 00 00 00 00 00 00 F4 18' - '95 00 00 00 00 00 00 00 00 00 00 00 00 00 0C 00' - '00 00 02 00 00 00 01 01 F5 77 00 EC FD 7F 56 00' - '00 00 00 00 00 00 03 00 00 00 5E 00 1A 02 40 9F' - '07 00 00 00 00 00 40 9F 07 00 05 00 00 00 BE B3' - 'E7 77 4C 19 95 00 A3 B4 E7 77 F8 00 00 00 00 00' - '00 C0 00 00 00 00 00 00 00 00 02 00 00 00 80 00' - '00 00 00 00 00 00 8C 1A 95 00 7F E9 4B 00 08 6C' - '0C 01 00 00 00 C0 00 00 00 00 80 1A 95 00 02 00' - '00 00 80 00 00 00 00 00 00 00 C0 27 95 00 C4 F5' - 'AF 00 02 00 00 00 44 3A 5C 6F 73 65 78 70 65 72' - '74 73 5C 72 65 61 63 74 6F 73 5C 6C 69 62 5C 73' - '68 65 6C 6C 33 32 5C 66 6F 6C 64 65 72 2E 69 63' - '6F 00 1A 93 4B 00 14 1A 95 00 1F 3B D4 77 13 00' - '00 00 98 00 00 00 4F 3B D4 77 E0 19 95 00 33 3B' - 'D4 77 64 C5 F5 77 A9 F1 E7 77 F8 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 1A 95 00 18 6C' - '38 00 86 00 00 00 00 00 00 00 C9 F1 E7 77 86 00' - '00 00 A4 1A 95 00 08 00 00 00 00 00 00 00 86 00' - '00 00 86 00 00 00 08 00 00 00 F4 19 95 00 33 3B' - 'D4 77 B4 1A 95 00 09 48 E9 77 B8 10 E9 77 FF FF' - 'FF FF C9 F1 E7 77 16 EA 4B 00 F8 00 00 00 18 6C' - '38 00 86 00 00 00 58 1A 95 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 2F 2F 2F 2F 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 2F 2F 2F 2F 2F 2F 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 2F 2F 2F 01 2F 2F 2F 2F 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '2F 2F 2F 2F 09 10 0C 02 2F 2F 2F 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2F' - '2F 2F 04 11 15 1C 17 09 02 2F 2F 2F 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 2F 2F' - '2F 05 13 1C 23 2E 2D 1C 0B 2F 2F 2F 2F 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 2F 2F 2F 2F' - '0B 23 22 21 2E 2E 2E 28 1C 0A 2F 2F 2F 2F 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 2F 2F 2F 01 0C' - '23 22 18 2E 2E 2E 2E 2E 28 1C 05 2F 2F 2F 2F 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 2F 2F 2F 2F 04 13 29' - '24 17 2D 2E 2E 2E 2E 2E 2E 28 17 05 02 2F 2F 2F' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 2F 2F 2F 01 05 1C 2D 24' - '15 2D 2E 2E 2E 2E 2E 2E 2E 2E 27 1C 04 01 2F 2F' - '2F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 2F 2F 2F 01 0C 24 29 1F 17' - '2D 24 24 2E 2E 2E 2E 2E 2E 2E 2E 28 17 06 2F 2F' - '2F 2F 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 2F 2F 2F 2F 05 16 29 29 24 17 29' - '29 19 1D 24 2E 2E 2E 2E 2E 2E 2E 2D 28 17 09 2F' - '2F 2F 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 2F 2F 2F 2F 0C 21 2B 24 24 1D 27 2B' - '19 19 19 1D 29 2E 2E 2E 2E 2E 2D 2E 2E 28 1B 05' - '2F 2F 2F 2F 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 2F 2F 2F 03 10 29 2B 24 29 1D 20 2B 19' - '19 1D 19 19 19 29 2E 2E 2E 2E 2E 2D 2D 2D 29 17' - '04 2F 2F 2F 00 00 00 00 00 00 00 00 00 00 00 00' - '00 2F 2F 2F 2F 05 13 29 2B 24 29 1C 1C 2E 1D 19' - '19 19 1D 19 1D 19 2D 2E 2E 2E 2D 2E 2D 2D 2D 27' - '13 04 2F 2F 2F 00 00 00 00 00 00 00 00 00 00 00' - '2F 2F 2F 2F 0A 21 2B 2B 24 29 24 21 2E 1D 19 1D' - '19 1D 19 1D 19 1F 19 29 2E 2D 2E 2D 29 2D 28 2D' - '28 15 2F 2F 2F 2F 00 00 00 00 00 00 00 00 00 2F' - '2F 2F 04 13 24 28 29 2B 29 24 1C 2B 24 19 1D 19' - '1D 19 1D 1A 1D 1D 1F 1D 2B 2C 2E 2D 2D 2D 2D 28' - '29 27 15 04 2F 2F 2F 00 00 00 00 00 00 00 2F 2F' - '2F 05 13 29 2E 2B 2B 29 24 1C 2D 24 19 1D 1A 1D' - '19 1D 19 1D 19 1D 1D 1F 1D 25 28 2D 2D 2D 29 28' - '28 28 29 13 01 2F 2F 2F 00 00 00 00 00 00 2F 2F' - '0C 22 2E 2B 29 29 2D 2B 1C 29 1F 1D 1D 19 1D 19' - '1D 1A 1D 19 1D 1F 1D 1D 1F 22 2B 2D 2D 28 28 28' - '28 27 28 27 15 2F 2F 2F 2F 00 00 00 00 00 2F 2F' - '0C 2B 29 2B 29 2B 2B 17 24 24 1D 1D 19 1D 1D 1A' - '1D 1D 19 1D 1F 1D 1D 1F 22 1F 1F 29 28 2D 29 28' - '28 28 27 29 20 15 04 2F 2F 2F 2F 00 00 00 2F 2F' - '2F 10 2B 2D 2B 2D 1D 23 24 1D 19 1D 1F 19 1D 1D' - '1A 1D 1D 19 1D 1F 1F 1D 1F 24 22 1F 29 28 2D 28' - '29 28 29 27 29 20 10 2F 2F 2F 2F 00 00 00 2F 2F' - '2F 2F 10 24 2E 1D 1C 24 19 1D 1F 19 1D 1F 19 1D' - '1D 1D 19 1D 1F 1D 1D 1F 22 1F 1F 24 24 29 2A 29' - '28 27 27 27 27 20 29 13 2F 2F 2F 2F 00 00 00 00' - '2F 2F 2F 11 24 1C 24 1D 1D 19 1D 1D 19 1D 1D 1A' - '1D 19 1F 1D 19 1F 1D 24 1F 22 24 24 24 24 29 28' - '27 29 27 29 20 27 28 24 11 02 2F 2F 2F 2F 00 00' - '00 2F 2F 01 12 1D 1F 1D 1A 1D 19 1D 1F 19 1F 1D' - '19 1D 1D 1A 1D 1D 1D 1F 1D 24 24 24 25 29 2B 29' - '28 27 27 27 27 27 21 27 28 10 2F 2F 2F 2F 00 00' - '00 00 2F 2F 04 14 1D 1D 1D 1D 1F 1D 19 1D 19 1D' - '1F 1D 19 1D 1F 1D 1F 24 24 24 25 29 29 25 29 2B' - '29 28 29 20 29 23 27 26 23 29 13 01 2F 2F 00 00' - '00 00 2F 2F 2F 08 10 19 1D 1F 19 1F 1D 1D 1D 1F' - '1D 19 1D 1D 1D 24 24 24 24 24 29 2B 24 29 2B 2B' - '29 2B 20 20 27 27 26 23 26 27 1C 02 2F 2F 00 00' - '00 00 00 2F 2F 2F 01 14 1D 1D 1D 19 1D 1F 1D 19' - '1D 1F 1D 1F 24 24 24 24 2B 24 24 29 2B 29 29 2B' - '2B 29 2E 27 23 26 23 20 20 21 05 2F 2F 2F 00 00' - '00 00 00 00 2F 2F 2F 03 12 19 1D 1D 1F 19 1F 1D' - '1F 1D 24 24 24 24 29 24 24 29 29 2B 29 2B 2B 29' - '2B 2E 2B 29 27 23 26 27 21 07 2F 2F 2F 00 00 00' - '00 00 00 00 00 00 2F 2F 2F 12 1D 1F 1D 1D 1D 1D' - '24 24 24 24 24 24 24 2B 29 24 2B 29 2B 29 2B 2B' - '2C 2B 2D 2E 28 26 23 21 0D 2F 2F 2F 00 00 00 00' - '00 00 00 00 00 00 2F 2F 2F 03 10 18 1D 1D 1F 24' - '24 29 24 24 2B 24 29 29 24 2B 29 2B 29 2B 2B 2C' - '2B 2D 2D 2E 2B 2B 27 0D 2F 2F 2F 00 00 00 00 00' - '00 00 00 00 00 00 00 00 2F 2F 2F 10 1D 1F 24 29' - '24 24 29 24 24 29 25 29 2B 29 2B 29 2E 29 2B 2D' - '2B 2E 2B 29 2E 2B 13 2F 2F 2F 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 2F 2F 2F 0C 24 29 24' - '25 29 24 2B 29 25 29 29 2B 29 2B 2B 29 2B 2D 2B' - '2E 29 2B 2E 2E 13 2F 2F 2F 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 2F 2F 2F 0D 1F 29' - '29 24 29 24 29 29 2B 29 29 2B 29 2D 2B 2D 2D 2B' - '2D 2B 2E 2E 13 01 2F 2F 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 2F 2F 0C 1E 24' - '29 2B 29 2B 29 2B 29 2B 2B 2C 2B 2B 2D 2D 2B 2C' - '2B 2E 2E 1C 01 2F 2F 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 2F 2F 15 2D 29' - '1E 29 2B 29 2B 29 2B 29 2D 2B 2C 2B 2D 2B 2C 2B' - '2E 2D 22 02 01 2F 2F 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 2F 2F 07 22 2B' - '29 24 29 2B 29 2B 2C 2B 2B 2D 2B 2C 2B 2D 2B 2E' - '2E 29 07 2F 2F 2F 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 2F 2F 2F 07 1C' - '2E 23 24 2C 2B 2D 2B 2C 2B 2D 2D 2B 2D 2D 2E 2E' - '24 07 2F 2F 2F 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 2F 2F 2F 04' - '1B 1D 29 2B 2D 2B 2C 2B 2E 2D 2B 2E 2D 2E 2E 29' - '0C 2F 2F 2F 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 2F 2F 2F' - '01 18 2B 2D 2B 2C 2B 2E 2C 2B 2E 2D 2E 2E 29 0E' - '2F 2F 2F 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2F' - '2F 04 1C 2E 2E 2B 2E 2D 2B 2E 2D 2E 2E 2B 13 2F' - '2F 2F 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2F' - '2F 2F 04 1C 2D 2E 2D 2E 2E 2E 2E 2E 2E 1B 01 2F' - '2F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '2F 2F 2F 2F 1C 2D 2E 2E 2E 2E 2E 2E 1C 01 2F 2F' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 2F 2F 2F 2F 13 2B 2E 2E 2E 2E 1E 01 2F 2F 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 2F 2F 2F 0E 29 2E 2D 23 05 2F 2F 2F 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 2F 2F 2F 07 13 07 04 2F 2F 2F 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 2F 2F 2F 2F 2F 2F 2F 2F 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 2F 2F 2F 2F 2F 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF' - 'FF FF FF FF 00 00 FF FF FC 3F FF FF 00 00 FF FF' - 'F8 1F FF FF 00 00 FF FF F0 0F FF FF 00 00 FF FF' - 'C0 07 FF FF 00 00 FF FF 80 03 FF FF 00 00 FF FF' - '00 01 FF FF 00 00 FF FC 00 00 FF FF 00 00 FF F8' - '00 00 7F FF 00 00 FF E0 00 00 3F FF 00 00 FF C0' - '00 00 1F FF 00 00 FF 80 00 00 0F FF 00 00 FE 00' - '00 00 0F FF 00 00 FC 00 00 00 03 FF 00 00 F8 00' - '00 00 03 FF 00 00 E0 00 00 00 01 FF 00 00 C0 00' - '00 00 00 FF 00 00 80 00 00 00 00 7F 00 00 00 00' - '00 00 00 3F 00 00 00 00 00 00 00 1F 00 00 00 00' - '00 00 00 07 00 00 00 00 00 00 00 07 00 00 00 00' - '00 00 00 03 00 00 C0 00 00 00 00 00 00 00 E0 00' - '00 00 00 00 00 00 F0 00 00 00 00 00 00 00 F0 00' - '00 00 00 00 00 00 F8 00 00 00 00 00 00 00 FC 00' - '00 00 00 01 00 00 FF 00 00 00 00 03 00 00 FF 00' - '00 00 00 07 00 00 FF C0 00 00 00 0F 00 00 FF E0' - '00 00 00 1F 00 00 FF F0 00 00 00 3F 00 00 FF F8' - '00 00 00 7F 00 00 FF F8 00 00 00 7F 00 00 FF F8' - '00 00 00 FF 00 00 FF F8 00 00 01 FF 00 00 FF FC' - '00 00 03 FF 00 00 FF FE 00 00 07 FF 00 00 FF FF' - '80 00 0F FF 00 00 FF FF 80 00 1F FF 00 00 FF FF' - 'C0 00 3F FF 00 00 FF FF E0 00 7F FF 00 00 FF FF' - 'F8 00 7F FF 00 00 FF FF FC 00 FF FF 00 00 FF FF' - 'FE 01 FF FF 00 00 FF FF FF 07 FF FF 00 00 28 00' - '00 00 30 00 00 00 60 00 00 00 01 00 20 00 00 00' - '00 00 00 24 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 0E 00 00 00 32 00 00 00 2D 00 00 00 0B 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 31 00 00' - '00 B1 00 00 00 F6 00 00 00 DF 00 00 00 65 00 00' - '00 0D 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 58 00 00 00 F2 00 00' - '00 FF 12 04 00 FF 02 00 00 FF 00 00 00 F6 00 00' - '00 71 00 00 00 08 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 12 00 00 00 9D 00 00 00 F6 00 00 00 FF 59 17' - '00 FF 97 2E 01 FF 6E 20 00 FF 06 00 00 FF 00 00' - '00 F0 00 00 00 65 00 00 00 08 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 3A 00 00' - '00 C2 00 00 00 FF 17 03 00 FF 7A 37 1A FF BE 59' - '2D FF CF 9C 89 FF BF 81 6D FF 5A 1E 08 FF 06 00' - '00 FF 00 00 00 EE 00 00 00 5C 00 00 00 08 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 70 00 00 00 F3 00 00' - '00 FF 32 07 00 FF B1 63 41 FF D5 8F 70 FF E3 BF' - 'AF FF FF FF FF FF EA E7 EA FF C0 82 6C FF 64 1B' - '01 FF 00 00 00 FF 00 00 00 EE 00 00 00 5E 00 00' - '00 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 20 00 00 00 AC 00 00 00 FD 06 00 00 FF 61 1B' - '00 FF D5 9F 86 FF E2 A3 84 FF DB AE 9A FF FD FB' - 'FA FF FF FF FF FF FF FF FF FF E9 E3 E4 FF BD 87' - '77 FF 5A 1A 01 FF 02 00 00 FF 00 00 00 E6 00 00' - '00 52 00 00 00 08 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 2A 00 00' - '00 C4 00 00 00 FF 08 00 00 FF 73 29 0F FF EE BD' - 'A5 FF EB AE 8B FF CA 7F 5C FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF E6 DF' - 'E1 FF BE 7A 63 FF 3D 0E 00 FF 00 00 00 FF 00 00' - '00 E2 00 00 00 3D 00 00 00 01 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 01 00 00 00 6C 00 00 00 E3 00 00' - '00 FF 2F 01 00 FF A7 66 50 FF F5 D0 B8 FF F3 B6' - '8D FF CF 89 67 FF F5 EB E8 FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FD FD' - 'FE FF E4 DA DC FF B6 78 61 FF 44 11 00 FF 00 00' - '00 FF 00 00 00 CB 00 00 00 3C 00 00 00 01 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 1C 00 00 00 8D 00 00 00 FF 07 00 00 FF 4D 1A' - '07 FF C9 81 63 FF FF E3 CD FF F7 BC 91 FF C7 71' - '47 FF F1 E5 E0 FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF E5 D8 DA FF B3 77 61 FF 33 0E' - '00 FF 00 00 00 FF 00 00 00 C8 00 00 00 33 00 00' - '00 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 30 00 00' - '00 D3 00 00 00 FF 0B 00 00 FF 85 36 19 FF E9 B7' - '9F FF FF E6 CB FF F9 B8 88 FF CE 7B 50 FF F2 EE' - 'EF FF FF C8 98 FF FF D7 B6 FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FD FE FF FF E5 DA DB FF BE 7D' - '65 FF 30 0B 00 FF 00 00 00 FF 00 00 00 D2 00 00' - '00 33 00 00 00 01 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 04 00 00 00 72 00 00 00 EA 00 00' - '00 FF 37 0B 00 FF B1 71 56 FF F7 D4 BE FF FF DF' - 'C0 FF FD C3 95 FF D0 80 56 FF E9 D4 CC FF FF D4' - 'AD FF FF 92 39 FF FF 98 44 FF FF D6 B4 FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FE FE FE FF FC FC FB FF F8 F6 F7 FF E4 D9' - 'DA FF B5 80 6B FF 3A 12 02 FF 00 00 00 FF 00 00' - '00 C8 00 00 00 39 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 1F 00 00 00 9F 00 00 00 FF 08 00 00 FF 5F 28' - '11 FF D3 93 74 FF FF EF DE FF FF D9 B5 FF FC C5' - '9B FF D5 83 56 FF E6 CE C4 FF FF EB D2 FF FF 93' - '3A FF FF 94 3D FF FF 93 3B FF FF 95 3E FF FF DD' - 'BF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FD FB FB FF FA F8 F8 FF F8 F6 F6 FF F5 F3' - 'F4 FF E7 DA DA FF B6 82 6C FF 2A 0D 00 FF 00 00' - '00 FF 00 00 00 BF 00 00 00 29 00 00 00 02 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 3D 00 00' - '00 E1 00 00 00 FF 12 00 00 FF 94 3F 15 FF F3 CF' - 'BC FF FF EC D7 FF FF D1 AC FF FF D8 B4 FF DC 91' - '64 FF E0 C0 B3 FF FF E9 D3 FF FF 99 44 FF FF 96' - '40 FF FF 98 44 FF FF 98 43 FF FF 97 42 FF FF 9B' - '46 FF FF D3 AE FF FF FF FF FF FF FF FF FF FE FD' - 'FD FF FC FA FA FF F9 F6 F6 FF F6 F3 F3 FF F4 F0' - 'F0 FF F1 ED EF FF E3 D6 D6 FF BD 77 57 FF 27 08' - '00 FF 00 00 00 FF 00 00 00 C4 00 00 00 28 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 02 00 00 00 60 00 00 00 DD 00 00' - '00 FF 2F 0C 00 FF A1 5E 3C FF F7 D5 C0 FF FF EA' - 'D2 FF FF D4 B0 FF FF DB B8 FF E3 A2 76 FF D6 9E' - '83 FF FF F8 F1 FF FF AB 64 FF FF 95 3D FF FF 9A' - '46 FF FF 99 46 FF FF 99 45 FF FF 9A 47 FF FF 9C' - '49 FF FF A8 5D FF FF E3 CA FF FF FF FF FF FD FC' - 'FD FF FA F8 F8 FF F7 F5 F5 FF F4 F1 F1 FF F2 EE' - 'EE FF F1 EC EC FF EB E6 E8 FF E1 CF CC FF A2 62' - '43 FF 24 0A 00 FF 00 00 00 FF 00 00 00 A1 00 00' - '00 25 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 12 00 00 00 9E 00 00 00 FF 00 00 00 FF 59 1E' - '00 FF D5 99 7A FF FF F5 E8 FF FF E4 C7 FF FF D9' - 'B8 FF FF E0 C1 FF ED B6 8E FF D7 A1 86 FF FD FA' - 'F6 FF FF AC 66 FF FF 98 41 FF FF 9C 49 FF FF 9C' - '49 FF FF 9C 49 FF FF 9C 48 FF FF 9C 49 FF FF A0' - '51 FF FF A3 54 FF FF A7 59 FF FE DF C3 FF FB FF' - 'FF FF F9 F7 F8 FF F6 F3 F3 FF F4 F0 F0 FF F1 EC' - 'EC FF EF E9 E8 FF EC E6 E6 FF E9 E3 E5 FF E4 D0' - 'CA FF AE 6B 48 FF 16 02 00 FF 00 00 00 FF 00 00' - '00 B0 00 00 00 1C 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 48 00 00' - '00 C8 00 00 00 FF 21 04 00 FF 8E 4B 25 FF EF C7' - 'B0 FF FF F0 DE FF FF E3 C9 FF FF DE C0 FF FF E8' - 'CC FF EF BF 99 FF D2 93 71 FF F9 F0 E9 FF FF BF' - '86 FF FF 98 43 FF FF 9D 4C FF FF 9E 4C FF FF 9D' - '4B FF FF 9D 4B FF FF 9D 4B FF FF 9E 4B FF FF A2' - '53 FF FF A7 59 FF FF AA 5E FF FF B0 6A FF FD D7' - 'B5 FF F7 F8 FC FF F5 F3 F3 FF F2 ED ED FF F0 EA' - 'EA FF ED E7 E7 FF EA E3 E3 FF E9 E1 E1 FF E5 DE' - 'E1 FF E0 CA C3 FF B0 6B 44 FF 23 09 00 FF 00 00' - '00 FE 00 00 00 B1 00 00 00 24 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 4C 00 00 00 EB 00 00' - '00 FF 37 11 00 FF B5 72 4C FF FC DD C8 FF FF F8' - 'E8 FF FF E4 C8 FF FF E3 C8 FF FF E9 CF FF F2 CA' - 'A9 FF D4 92 69 FF F8 EC E3 FF FF C4 8E FF FF 98' - '42 FF FF 9F 4F FF FF A0 4F FF FF A0 4E FF FF 9F' - '4E FF FF 9F 4E FF FF 9F 4D FF FF 9F 4E FF FF A3' - '54 FF FF A8 5C FF FF AD 64 FF FF B0 67 FF FF B4' - '6F FF FA D9 BC FF F4 F0 F1 FF F1 ED EE FF EF E9' - 'E9 FF EC E5 E5 FF E9 E2 E2 FF E7 DE DE FF E5 DC' - 'DC FF E2 DA DD FF E3 CC C3 FF A4 5F 37 FF 25 0B' - '00 FF 00 00 00 FF 00 00 00 A1 00 00 00 25 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 EB 02 00 00 FF 6A 2F' - '0C FF E4 AC 8B FF FF FA EF FF FF F1 DC FF FF E7' - 'CE FF FF E8 D0 FF FF EC D5 FF FC E3 C8 FF D2 8B' - '5F FF F0 D2 BD FF FF C9 96 FF FF 9E 4A FF FF A1' - '51 FF FF A2 52 FF FF A1 51 FF FF A1 51 FF FF A1' - '51 FF FF A1 51 FF FF A1 50 FF FF A1 50 FF FF A5' - '57 FF FF AA 5E FF FF AE 66 FF FF B3 6D FF FF B7' - '72 FF FF B9 74 FF F8 D6 B7 FF EF EC EF FF ED E8' - 'E9 FF EB E4 E4 FF E8 E0 E0 FF E6 DD DD FF E3 DA' - 'D9 FF E0 D6 D6 FF DE D5 D8 FF E2 C7 BD FF AF 63' - '36 FF 16 03 00 FF 00 00 00 FF 00 00 00 B0 00 00' - '00 1C 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 ED 06 01 00 FF 7A 3C' - '16 FF F7 CA AA FF FF F4 E0 FF FF E9 D2 FF FF E9' - 'D2 FF FF ED D7 FF FA E1 C7 FF D1 87 58 FF EF C6' - 'A8 FF FF CD 9E FF FF A0 4D FF FF A2 53 FF FF A3' - '54 FF FF A3 54 FF FF A3 54 FF FF A3 53 FF FF A3' - '53 FF FF A3 53 FF FF A3 53 FF FF A3 53 FF FF A7' - '59 FF FF AC 60 FF FF B0 68 FF FF B4 6F FF FF B9' - '76 FF FF BD 7C FF FF C1 81 FF F9 D4 B1 FF EC E6' - 'E8 FF E9 E3 E3 FF E7 DE DE FF E4 DB DB FF E2 D7' - 'D7 FF DF D4 D4 FF DD D1 D0 FF DB D2 D5 FF DF C3' - 'B8 FF A9 5E 30 FF 1D 08 00 FF 00 00 00 FE 00 00' - '00 B1 00 00 00 26 00 00 00 01 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 7D 00 00 00 FF 08 01' - '00 FF 96 46 13 FF FB CF AC FF FF F4 E1 FF FF EB' - 'D6 FF FF F1 DE FF DF A6 7E FF E2 A8 7F FF FF CF' - 'A1 FF FF A2 52 FF FF A2 52 FF FF A3 54 FF FF A3' - '54 FF FF A3 54 FF FF A3 54 FF FF A3 54 FF FF A3' - '54 FF FF A3 54 FF FF A3 54 FF FF A3 54 FF FF A7' - '5A FF FF AC 62 FF FF B1 69 FF FF B5 71 FF FF BA' - '78 FF FF BF 7F FF FF C3 85 FF FF C6 89 FF F5 D7' - 'B9 FF E8 E1 E3 FF E5 DD DE FF E4 DA DA FF E1 D6' - 'D6 FF DD D3 D3 FF DB CF CF FF D8 CB CB FF D9 CF' - 'D3 FF E6 C9 BA FF 95 50 23 FF 0C 00 00 FF 00 00' - '00 FF 00 00 00 91 00 00 00 17 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 01 00 00 00 7C 00 00' - '00 FF 0B 03 00 FF 89 49 1D FF F7 C4 9A FF FF FC' - 'EC FF DF A8 7F FF DE 98 67 FF FF CC 9D FF FF A8' - '5C FF FF A2 52 FF FF A4 56 FF FF A4 55 FF FF A4' - '55 FF FF A4 55 FF FF A4 55 FF FF A4 55 FF FF A3' - '55 FF FF A3 55 FF FF A3 54 FF FF A3 54 FF FF A7' - '5B FF FF AC 62 FF FF B0 69 FF FF B5 71 FF FF BA' - '78 FF FF BF 80 FF FF C4 87 FF FF C8 8C FF FF CC' - '91 FF F4 D7 B9 FF E4 DB DB FF E1 D8 D9 FF DF D5' - 'D5 FF DD D1 D1 FF DB CE CE FF D8 CA CA FF D4 C6' - 'C6 FF D5 CA CE FF E5 C3 B1 FF 9D 5D 34 FF 0A 00' - '00 FF 00 00 00 FA 00 00 00 99 00 00 00 13 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 76 00 00 00 FC 09 00 00 FF 87 4B 20 FF E7 AE' - '83 FF DF 95 60 FF FD C1 8C FF FF A9 5F FF FF A2' - '53 FF FF A4 57 FF FF A4 57 FF FF A4 57 FF FF A4' - '56 FF FF A4 56 FF FF A4 56 FF FF A4 56 FF FF A4' - '56 FF FF A4 56 FF FF A4 55 FF FF A3 55 FF FF A7' - '5B FF FF AC 62 FF FF B1 6A FF FF B5 71 FF FF BA' - '78 FF FF BE 7E FF FF C4 86 FF FF CA 92 FF FF D2' - '9E FF FF D9 A9 FF F4 DE C6 FF E0 D6 D7 FF DD D2' - 'D3 FF DB CF CF FF D9 CC CC FF D6 C8 C8 FF D3 C4' - 'C4 FF D0 BF BF FF D6 CC D0 FF E6 C5 B3 FF 96 54' - '29 FF 11 05 00 FF 00 00 00 F9 00 00 00 82 00 00' - '00 16 00 00 00 01 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 5F 00 00 00 FB 0D 03 00 FF B1 50' - '0F FF FD AB 6A FF FF B3 6D FF FF A3 55 FF FF A5' - '58 FF FF A5 58 FF FF A5 58 FF FF A4 58 FF FF A4' - '58 FF FF A4 58 FF FF A4 58 FF FF A4 57 FF FF A4' - '57 FF FF A4 57 FF FF A4 57 FF FF A4 57 FF FF A8' - '5C FF FF AC 63 FF FF B0 69 FF FF B5 70 FF FF BA' - '7A FF FF C3 88 FF FF CF 9D FF FF D7 AB FF FF DB' - 'B4 FF FF E0 BA FF FF E3 BE FF F4 E0 CA FF DD D1' - 'D1 FF D9 CD CE FF D8 CA CA FF D5 C6 C6 FF D2 C3' - 'C3 FF D0 C0 C0 FF CC BA BA FF D0 C3 C6 FF EA CC' - 'BD FF 97 55 26 FF 0D 02 00 FF 00 00 00 FF 00 00' - '00 7D 00 00 00 0E 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 9E 00 00 00 FF 26 12' - '04 FF B2 5F 23 FF FB 98 48 FF FF AA 5F FF FF A6' - '5A FF FF A6 59 FF FF A6 59 FF FF A6 59 FF FF A6' - '59 FF FF A5 59 FF FF A5 59 FF FF A5 59 FF FF A5' - '58 FF FF A5 58 FF FF A5 58 FF FF A5 58 FF FF A7' - '5B FF FF AC 62 FF FF B5 72 FF FF C2 89 FF FF CB' - '99 FF FF D2 A6 FF FF D7 AD FF FF DA B2 FF FF DD' - 'B8 FF FF E1 BD FF FF E4 C3 FF FF E9 C8 FF F4 E3' - 'CE FF DB CD CC FF D5 C7 C8 FF D4 C5 C5 FF D1 C2' - 'C2 FF CF BE BE FF CC BA BA FF C9 B5 B6 FF CC BD' - 'C0 FF E2 BE AD FF A2 65 3A FF 0E 05 00 FF 00 00' - '00 EC 00 00 00 30 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 14 00 00 00 AC 00 00' - '00 FF 27 12 03 FF A7 53 15 FF F9 93 40 FF FF A7' - '5B FF FF A7 5C FF FF A6 5B FF FF A6 5B FF FF A6' - '5B FF FF A6 5B FF FF A6 5B FF FF A6 5A FF FF A6' - '5A FF FF A6 5A FF FF A5 58 FF FF A5 58 FF FF AE' - '69 FF FF BB 7F FF FF C9 97 FF FF CF A2 FF FF D2' - 'A7 FF FF D5 AC FF FF D9 B1 FF FF DC B8 FF FF E0' - 'BD FF FF E3 C2 FF FF E7 C8 FF FF EA CD FF FF EF' - 'D2 FF F4 E5 D3 FF D7 C9 C8 FF D1 C2 C2 FF D0 C0' - 'C0 FF CE BD BD FF CB B9 B9 FF C8 B5 B5 FF C3 B0' - 'B0 FF D6 C7 CA FF BF 94 78 FF 18 09 00 FF 00 00' - '00 F4 00 00 00 2C 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 04 00 00' - '00 A6 00 00 00 FF 11 08 02 FF A1 4F 12 FF FA 93' - '3F FF FF AC 61 FF FF A7 5D FF FF A7 5C FF FF A6' - '5C FF FF A6 5C FF FF A6 5C FF FF A7 5B FF FF A6' - '5B FF FF A4 57 FF FF A9 60 FF FF BA 7F FF FF C5' - '94 FF FF CB 9C FF FF CE A1 FF FF D1 A6 FF FF D4' - 'AC FF FF D8 B1 FF FF DC B7 FF FF DF BD FF FF E3' - 'C2 FF FF E5 C7 FF FF E8 CC FF FF EC D1 FF FF EE' - 'D6 FF FF F3 DB FF F6 EB D9 FF D3 C3 C3 FF CD BC' - 'BC FF CD BB BB FF CA B7 B7 FF C6 B3 B4 FF CB B9' - 'BC FF BD 92 7B FF 31 19 0B FF 00 00 00 FF 00 00' - '00 8D 00 00 00 03 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 05 00 00 00 A6 00 00 00 FF 16 0B 03 FF A6 54' - '16 FF FA 94 41 FF FF AB 61 FF FF A9 5F FF FF A8' - '5D FF FF A8 5E FF FF A8 5D FF FF A6 5B FF FF A7' - '5D FF FF B2 71 FF FF C2 8E FF FF C8 9A FF FF C9' - '9B FF FF CD A0 FF FF D0 A6 FF FF D4 AC FF FF D7' - 'B1 FF FF DB B7 FF FF DE BC FF FF E1 C1 FF FF E4' - 'C6 FF FF E7 CB FF FF EA D0 FF FF ED D4 FF FF EF' - 'D9 FF FF F2 DD FF FF F8 E3 FF EE E5 D9 FF D1 C1' - 'C0 FF CA B7 B8 FF C8 B5 B5 FF CA B7 B8 FF CB A8' - '9A FF 46 2D 1D FF 00 00 00 FF 00 00 00 C8 00 00' - '00 1F 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 87 00 00 00 FF 0D 06' - '02 FF 92 4B 14 FF FD 96 41 FF FF AB 63 FF FF A9' - '60 FF FF A8 5F FF FF A6 5B FF FF AB 64 FF FF C1' - '8C FF FF CB A0 FF FF CC A0 FF FF CB 9F FF FF CD' - 'A2 FF FF D1 A8 FF FF D4 AD FF FF D7 B2 FF FF DA' - 'B8 FF FF DE BD FF FF E1 C2 FF FF E4 C7 FF FF E7' - 'CB FF FF E9 D0 FF FF EC D4 FF FF EF D8 FF FF F1' - 'DD FF FF F4 E1 FF FF F7 E5 FF FF FD EC FF F2 EA' - 'E0 FF CA B8 B6 FF C8 B6 B9 FF CD AD A1 FF 57 35' - '1B FF 00 00 00 FF 00 00 00 D6 00 00 00 18 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 05 00 00 00 75 00 00' - '00 FD 0C 06 02 FF 7E 42 11 FF F3 91 3F FF FF AC' - '63 FF FF A7 5D FF FF B5 77 FF FF C8 9A FF FF CF' - 'A7 FF FF CE A5 FF FF CF A6 FF FF CF A7 FF FF D1' - 'AA FF FF D4 AF FF FF D8 B4 FF FF DA B9 FF FF DD' - 'BE FF FF E0 C2 FF FF E3 C7 FF FF E6 CC FF FF E9' - 'D0 FF FF EB D4 FF FF EE D8 FF FF F0 DC FF FF F2' - 'E0 FF FF F5 E4 FF FF F8 E9 FF FF F9 EB FF FD F3' - 'E0 FF F3 EC E4 FF DB BD B0 FF 68 46 30 FF 00 00' - '00 FF 00 00 00 D1 00 00 00 32 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 78 00 00 00 F1 00 00 00 FF 7F 43 12 FF EF 90' - '40 FF FF BC 80 FF FF D0 A8 FF FF D3 AD FF FF D2' - 'AC FF FF D2 AD FF FF D3 AD FF FF D3 AE FF FF D5' - 'B1 FF FF D8 B5 FF FF DB BA FF FF DD BF FF FF E0' - 'C4 FF FF E3 C8 FF FF E6 CC FF FF E8 D1 FF FF EB' - 'D5 FF FF ED D8 FF FF EF DC FF FF F2 E0 FF FF F4' - 'E3 FF FF F7 E8 FF FE F5 E6 FF FC EF DC FF FD F7' - 'EA FF FF F0 DA FF 83 5C 3B FF 00 00 00 FF 00 00' - '00 EB 00 00 00 3F 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 54 00 00 00 FD 00 00 00 FF 66 3A' - '14 FF F4 B8 85 FF FF D9 B8 FF FF D6 B3 FF FF D5' - 'B3 FF FF D6 B4 FF FF D6 B5 FF FF D7 B5 FF FF D9' - 'B8 FF FF DC BC FF FF DF C1 FF FF E1 C5 FF FF E4' - 'C9 FF FF E7 CE FF FF E8 D1 FF FF EB D5 FF FF EE' - 'D9 FF FF F0 DD FF FF F1 E0 FF FF F4 E4 FF FF F6' - 'E8 FF FE F2 E1 FF FB EB D7 FF FF FD F6 FF FF F6' - 'E4 FF 9C 66 38 FF 03 00 00 FF 00 00 00 F5 00 00' - '00 46 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 45 00 00 00 E0 01 00' - '00 FF 78 47 1B FF F2 B5 7F FF FF DC BE FF FF DA' - 'BB FF FF DA BB FF FF DB BC FF FF DB BD FF FF DC' - 'BF FF FF DF C3 FF FF E2 C7 FF FF E4 CB FF FF E6' - 'CF FF FF E9 D4 FF FF EB D6 FF FF ED DA FF FF F0' - 'DE FF FF F2 E1 FF FF F3 E5 FF FF F4 E6 FF FC EE' - 'DB FF FD F1 E0 FF FF FC F5 FF FF F5 E3 FF A7 7A' - '51 FF 07 00 00 FF 00 00 00 F3 00 00 00 60 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 8B 00 00' - '00 FF 69 42 1C FF ED AC 6F FF EE BC 90 FF FF E2' - 'C7 FF FF DE C2 FF FF DE C2 FF FF DF C4 FF FF E0' - 'C5 FF FF E2 C9 FF FF E5 CD FF FF E7 D1 FF FF E9' - 'D4 FF FF EC D8 FF FF EE DB FF FF F0 DF FF FF F1' - 'E2 FF FF F4 E6 FF FE F3 E5 FF FC EB D9 FF FD F2' - 'E2 FF FF FC F4 FF FF FF FE FF CB 9A 6C FF 1A 09' - '00 FF 00 00 00 FF 00 00 00 7D 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 9C 02 00' - '00 FF AA 6B 2D FF FF FA EA FF F1 D6 BF FF EC B8' - '88 FF FF E1 C9 FF FF E3 CB FF FF E2 CA FF FF E3' - 'CB FF FF E5 CF FF FF E8 D3 FF FF EA D6 FF FF EC' - 'D9 FF FF ED DD FF FF EF E0 FF FF F2 E3 FF FF F4' - 'E6 FF FD F0 E0 FF FD EF DE FF FE F4 E8 FF FF FB' - 'F4 FF FF FF F7 FF DC B0 84 FF 29 17 09 FF 00 00' - '00 FF 00 00 00 94 00 00 00 0B 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 94 01 00' - '00 FF 51 30 0F FF DF B0 7F FF FF FB F0 FF EF D0' - 'B3 FF F0 C5 9D FF FD E4 CD FF FF E6 D1 FF FF E7' - 'D2 FF FF E8 D5 FF FF EB D9 FF FF ED DC FF FF EF' - 'DF FF FF F0 E2 FF FF F2 E5 FF FF F3 E6 FF FE F0' - 'E1 FF FE F0 E1 FF FE F6 ED FF FF FA F3 FF FF FF' - 'FC FF E5 C3 A0 FF 3B 20 06 FF 00 00 00 FF 00 00' - '00 B0 00 00 00 07 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 1F 00 00' - '00 CC 00 00 00 FF 35 1B 00 FF D4 99 5A FF FF FF' - 'FE FF EC C3 9B FF F4 CE AA FF FF ED DC FF FF EA' - 'D8 FF FF EC DB FF FF EE DF FF FF F0 E1 FF FF F1' - 'E4 FF FF F3 E7 FF FE F2 E6 FF FE EF E0 FF FE F3' - 'E7 FF FF F8 F0 FF FF FA F3 FF FF FF FF FF F3 CD' - 'A6 FF 52 2F 0D FF 00 00 00 FF 00 00 00 B8 00 00' - '00 0F 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 1A 00 00 00 AE 00 00 00 FF 23 13 01 FF BF 8D' - '56 FF F3 B6 77 FF F6 D4 B6 FF FF F0 E3 FF FF ED' - 'DF FF FF EF E1 FF FF F1 E4 FF FF F3 E7 FF FF F3' - 'E9 FF FE F2 E5 FF FE F2 E6 FF FF F6 ED FF FF F9' - 'F2 FF FF F9 F4 FF FF FF FF FF FB DE BE FF 55 37' - '1A FF 00 00 00 FF 00 00 00 CB 00 00 00 1E 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 04 00 00 00 A1 00 00 00 FF 11 07' - '00 FF B5 72 2D FF FF EB CF FF FF F4 EA FF FF F1' - 'E5 FF FF F2 E7 FF FF F4 EA FF FF F4 EB FF FE F3' - 'E9 FF FE F4 EA FF FF F8 F2 FF FF FA F5 FF FF FB' - 'F6 FF FF FF FF FF F7 E5 D0 FF 76 4D 25 FF 00 00' - '00 FF 00 00 00 DB 00 00 00 25 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 80 00 00' - '00 FF 23 14 04 FF C7 99 68 FF FF FF F2 FF FF F8' - 'F1 FF FF F5 ED FF FE F6 ED FF FE F4 EC FF FE F8' - 'F1 FF FF FA F6 FF FF FB F6 FF FF FC F8 FF FF FF' - 'FF FF FF F4 DE FF 8C 61 34 FF 00 00 00 FF 00 00' - '00 EA 00 00 00 3B 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 10 00 00' - '00 BB 00 00 00 FF 28 17 05 FF C1 9C 74 FF FF F6' - 'E7 FF FF FB F8 FF FE F8 F1 FF FF FA F6 FF FF FC' - 'F8 FF FF FC FA FF FF FD FB FF FF FF FF FF FF FD' - 'F5 FF AA 82 56 FF 0E 05 00 FF 00 00 00 F9 00 00' - '00 5A 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 04 00 00 00 A8 00 00 00 FF 06 00 00 FF AB 84' - '58 FF FF FA EB FF FF FF FF FF FF FE FD FF FF FF' - 'FD FF FF FF FF FF FF FF FF FF FF FF FC FF C9 9B' - '66 FF 0F 05 00 FF 00 00 00 FF 00 00 00 68 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 0A 00 00 00 74 00 00 00 FF 0E 05' - '00 FF 79 5C 3A FF FF ED D6 FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FE FF C9 A5 7A FF 19 0D' - '00 FF 00 00 00 FF 00 00 00 82 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 67 00 00' - '00 EE 00 00 00 FF 6E 4E 29 FF F0 DD C5 FF FF FF' - 'F4 FF FF F1 DC FF D1 AC 80 FF 36 1D 02 FF 00 00' - '00 FF 00 00 00 8F 00 00 00 03 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 3F 00 00 00 E0 00 00 00 FF 48 2F 12 FF 87 5D' - '2D FF 53 38 19 FF 12 0A 00 FF 00 00 00 FF 00 00' - '00 AD 00 00 00 08 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 26 00 00 00 BF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 EC 00 00 00 83 00 00' - '00 0D 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 0A 00 00 00 75 00 00' - '00 84 00 00 00 60 00 00 00 24 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 FF FF FF FF FF FF 00 00 FF FF' - 'FC 3F FF FF 00 00 FF FF F8 1F FF FF 00 00 FF FF' - 'F0 0F FF FF 00 00 FF FF C0 07 FF FF 00 00 FF FF' - '80 03 FF FF 00 00 FF FF 00 01 FF FF 00 00 FF FC' - '00 00 FF FF 00 00 FF F8 00 00 7F FF 00 00 FF E0' - '00 00 3F FF 00 00 FF C0 00 00 1F FF 00 00 FF 80' - '00 00 0F FF 00 00 FE 00 00 00 0F FF 00 00 FC 00' - '00 00 03 FF 00 00 F8 00 00 00 03 FF 00 00 E0 00' - '00 00 01 FF 00 00 C0 00 00 00 00 FF 00 00 80 00' - '00 00 00 7F 00 00 00 00 00 00 00 3F 00 00 00 00' - '00 00 00 1F 00 00 00 00 00 00 00 07 00 00 00 00' - '00 00 00 07 00 00 00 00 00 00 00 03 00 00 C0 00' - '00 00 00 00 00 00 E0 00 00 00 00 00 00 00 F0 00' - '00 00 00 00 00 00 F0 00 00 00 00 00 00 00 F8 00' - '00 00 00 00 00 00 FC 00 00 00 00 01 00 00 FF 00' - '00 00 00 03 00 00 FF 00 00 00 00 07 00 00 FF C0' - '00 00 00 0F 00 00 FF E0 00 00 00 1F 00 00 FF F0' - '00 00 00 3F 00 00 FF F8 00 00 00 7F 00 00 FF F8' - '00 00 00 7F 00 00 FF F8 00 00 00 FF 00 00 FF F8' - '00 00 01 FF 00 00 FF FC 00 00 03 FF 00 00 FF FE' - '00 00 07 FF 00 00 FF FF 80 00 0F FF 00 00 FF FF' - '80 00 1F FF 00 00 FF FF C0 00 3F FF 00 00 FF FF' - 'E0 00 7F FF 00 00 FF FF F8 00 7F FF 00 00 FF FF' - 'FC 00 FF FF 00 00 FF FF FE 01 FF FF 00 00 FF FF' - 'FF 07 FF FF 00 00 28 00 00 00 20 00 00 00 40 00' - '00 00 01 00 20 00 00 00 00 00 00 10 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 0E 00 00 00 58 00 00' - '00 3C 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 30 00 00 00 C1 09 00 00 FF 00 00' - '00 ED 00 00 00 59 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 61 00 00 00 E9 33 0D 00 FF 97 3E 19 FF 4D 1D' - '0A FF 00 00 00 F0 00 00 00 52 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 14 00 00 00 9A 02 00' - '00 FF 63 32 1D FF C6 78 55 FF F2 DA D2 FF CC A1' - '95 FF 44 17 07 FF 00 00 00 EB 00 00 00 4C 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 3B 00 00 00 CD 18 03 00 FF 9A 62' - '4A FF E0 9D 7D FF F1 DB D2 FF FF FF FF FF FD FD' - 'FE FF CA 9D 8F FF 3D 15 08 FF 00 00 00 E5 00 00' - '00 45 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 6F 00 00 00 F1 3B 15 09 FF CB 95 7B FF EE AA' - '83 FF E9 C8 B8 FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FD FC FE FF C8 9B 8D FF 39 14 07 FF 00 00' - '00 E2 00 00 00 3C 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 03 00 00 00 80 00 00' - '00 FF 45 1B 0D FF E1 AC 91 FF FC BD 95 FF DB A5' - '8B FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FA F7 F9 FF B5 80 6E FF 1A 05' - '00 FF 00 00 00 CA 00 00 00 1E 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 1F 00 00 00 AC 07 00 00 FF 74 43' - '2F FF EF C3 A7 FF FC C4 9B FF DB A2 86 FF FA D0' - 'AF FF FF BE 87 FF FF FC FA FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF F4 EB EB FF A8 78' - '67 FF 16 05 00 FF 00 00 00 BB 00 00 00 1B 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 4A 00 00 00 DA 24 0A 00 FF AB 76 5E FF FF DE' - 'C1 FF FE CB A2 FF DC A0 80 FF F7 D7 BD FF FF 9D' - '49 FF FF 8E 31 FF FF BB 82 FF FF FB F8 FF FF FF' - 'FF FF FF FF FF FF FD FB FB FF FA FA FB FF F3 EA' - 'E9 FF A6 7B 6A FF 16 05 00 FF 00 00 00 B5 00 00' - '00 16 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 07 00 00 00 82 00 00' - '00 F9 50 28 15 FF D8 A9 8F FF FF E9 CE FF FE D1' - 'AA FF DE A2 81 FF F4 D5 C0 FF FF A6 58 FF FF 96' - '3E FF FF 98 44 FF FF 96 3E FF FF BD 85 FF FF FA' - 'F6 FF FE FF FF FF FA F8 F8 FF F6 F3 F3 FF F4 F2' - 'F3 FF F0 E4 E3 FF A5 74 5E FF 16 05 00 FF 00 00' - '00 B1 00 00 00 16 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 28 00 00 00 B8 0E 00 00 FF 86 55' - '3D FF F6 D3 BA FF FF EB D1 FF FE D9 B7 FF E2 A9' - '88 FF F1 D4 C1 FF FF B0 69 FF FF 98 40 FF FF 9C' - '49 FF FF 9C 48 FF FF 9D 4C FF FF A0 4E FF FF C1' - '89 FF FD F6 F1 FF F8 F9 FB FF F5 F0 F0 FF F1 EB' - 'EB FF EE EA EB FF ED E0 DD FF A6 74 5B FF 16 05' - '00 FF 00 00 00 B1 00 00 00 16 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 4F 00 00 00 E2 30 13 04 FF BB 8B 70 FF FF ED' - 'D8 FF FF EB D1 FF FF E3 C7 FF E5 B0 8C FF ED CB' - 'B6 FF FF B9 7A FF FF 99 44 FF FF 9F 4D FF FF 9E' - '4D FF FF 9E 4C FF FF A0 4F FF FF A6 5A FF FF AA' - '5D FF FE C3 8D FF F7 EE E8 FF F2 F0 F2 FF EE E8' - 'E8 FF EB E3 E3 FF E8 E2 E3 FF EA DA D7 FF A7 72' - '56 FF 18 06 00 FF 00 00 00 B1 00 00 00 17 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 EA 53 27 0F FF E8 BF A3 FF FF F9 E7 FF FF EB' - 'D2 FF FF EF D8 FF EA BC 9B FF E7 BB 9E FF FF C0' - '86 FF FF 9C 47 FF FF A2 51 FF FF A1 51 FF FF A1' - '51 FF FF A1 50 FF FF A2 53 FF FF A9 5D FF FF B0' - '68 FF FF B3 6B FF FD C8 94 FF F1 EA E7 FF EC E8' - 'EA FF E9 E1 E1 FF E5 DC DB FF E2 DA DB FF E7 D4' - 'D0 FF A2 65 42 FF 08 00 00 FF 00 00 00 A8 00 00' - '00 0B 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 EB 5F 32 18 FF F9 D2 B3 FF FF F4 DE FF FF EF' - 'DA FF F4 D4 B9 FF E1 A8 82 FF FD C5 93 FF FF A1' - '50 FF FF A2 53 FF FF A3 54 FF FF A3 54 FF FF A3' - '53 FF FF A3 53 FF FF A3 55 FF FF AB 60 FF FF B2' - '6B FF FF B9 76 FF FF BE 7A FF FA D1 A8 FF EC E4' - 'E2 FF E7 DF E2 FF E4 DA DA FF DF D4 D4 FF DD D4' - 'D6 FF E2 C5 B9 FF 7D 4A 2C FF 01 00 00 FF 00 00' - '00 86 00 00 00 05 00 00 00 00 00 00 00 00 00 00' - '00 51 00 00 00 F3 5A 2F 15 FF F1 C8 A5 FF FC E5' - 'CD FF E1 A2 77 FF FB BB 85 FF FF A5 56 FF FF A3' - '53 FF FF A4 55 FF FF A4 55 FF FF A4 55 FF FF A3' - '55 FF FF A3 55 FF FF A4 57 FF FF AB 61 FF FF B3' - '6C FF FF BA 77 FF FF C0 81 FF FF C6 87 FF F9 D4' - 'AC FF E7 DC DA FF E1 D7 D9 FF DE D2 D2 FF DA CD' - 'CD FF D8 CD D0 FF E1 C4 B8 FF 7F 4F 31 FF 01 00' - '00 FF 00 00 00 83 00 00 00 03 00 00 00 00 00 00' - '00 00 00 00 00 48 00 00 00 EB 56 2F 16 FF E3 94' - '5B FF FB B5 79 FF FF A8 5C FF FF A3 55 FF FF A4' - '58 FF FF A4 56 FF FF A4 56 FF FF A4 56 FF FF A4' - '56 FF FF A4 56 FF FF A5 58 FF FF AB 62 FF FF B2' - '6B FF FF B9 76 FF FF C2 85 FF FF CD 97 FF FF D7' - 'A7 FF F8 DF C1 FF E2 D6 D4 FF DB CF D0 FF D9 CB' - 'CB FF D4 C5 C4 FF D3 C6 C8 FF E2 C5 B8 FF 80 51' - '31 FF 02 00 00 FE 00 00 00 79 00 00 00 06 00 00' - '00 00 00 00 00 00 00 00 00 4E 00 00 00 FF 7A 40' - '16 FF FB 9E 51 FF FF AA 5C FF FF A6 5A FF FF A5' - '59 FF FF A5 59 FF FF A5 58 FF FF A5 59 FF FF A5' - '59 FF FF A4 57 FF FF A4 57 FF FF AB 62 FF FF B8' - '76 FF FF C6 8F FF FF D2 A3 FF FF DA B1 FF FF E0' - 'BA FF FF E5 C1 FF F8 E5 CB FF DE D0 CD FF D4 C6' - 'C7 FF D3 C3 C3 FF CE BC BC FF CD BE C0 FF DE C0' - 'B3 FF 85 56 37 FF 06 01 00 FE 00 00 00 4C 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 6B 00 00' - '00 FB 6D 37 0D FF F5 92 41 FF FF AC 5F FF FF A7' - '5C FF FF A6 5B FF FF A6 5B FF FF A6 5B FF FF A5' - '59 FF FF A5 58 FF FF AE 68 FF FF C0 87 FF FF CC' - '9D FF FF D3 A9 FF FF D8 B0 FF FF DD B8 FF FF E2' - 'C0 FF FF E7 C8 FF FF EE D0 FF F8 EA D5 FF DA CB' - 'C8 FF CF BE BF FF CD BB BB FF C8 B5 B5 FF D3 C0' - 'C1 FF 9B 77 61 FF 09 03 00 FF 00 00 00 4B 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 5B 00 00 00 F7 5D 2F 0C FF F1 90 41 FF FF AD' - '62 FF FF A8 5E FF FF A7 5D FF FF A6 5A FF FF AB' - '64 FF FF BC 83 FF FF C8 98 FF FF CE A1 FF FF D2' - 'A8 FF FF D7 B0 FF FF DC B8 FF FF E1 C0 FF FF E5' - 'C8 FF FF EA CF FF FF EE D6 FF FF F4 DE FF F8 EF' - 'DE FF D6 C6 C4 FF C8 B6 B7 FF D0 BC BD FF A0 80' - '70 FF 10 09 04 FF 00 00 00 8E 00 00 00 04 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 6B 00 00 00 FF 70 3A 0F FF FB 9C' - '4B FF FF AE 64 FF FF A6 5B FF FF AE 6A FF FF C6' - '95 FF FF CD A3 FF FF CD A1 FF FF D1 A8 FF FF D6' - 'B0 FF FF DB B8 FF FF DF C0 FF FF E4 C6 FF FF E8' - 'CD FF FF EC D4 FF FF F0 DB FF FF F3 E1 FF FF FC' - 'EA FF F5 EC E0 FF D3 C2 C3 FF BF A0 95 FF 29 19' - '0C FF 00 00 00 C7 00 00 00 0B 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 69 00 00 00 FB 6F 3C' - '12 FF F7 9B 4C FF FF BC 7F FF FF CD A3 FF FF D1' - 'AB FF FF D0 AA FF FF D2 AC FF FF D6 B1 FF FF DB' - 'B9 FF FF DF C0 FF FF E3 C7 FF FF E7 CD FF FF EB' - 'D4 FF FF EF DA FF FF F3 E0 FF FF F6 E6 FF FE F5' - 'E5 FF FF FF EF FF E9 D0 BA FF 43 2D 20 FF 00 00' - '00 D9 00 00 00 25 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 59 00 00' - '00 F2 60 36 14 FF ED BA 8B FF FF DB B9 FF FF D7' - 'B4 FF FF D6 B5 FF FF D8 B7 FF FF DC BC FF FF E0' - 'C2 FF FF E4 C9 FF FF E8 CF FF FF EB D5 FF FF EF' - 'DB FF FF F2 E1 FF FF F4 E5 FF FE F2 E1 FF FF FA' - 'EE FF F9 EA D3 FF 5B 41 2A FF 00 00 00 E4 00 00' - '00 31 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 4F 00 00 00 F9 A5 74 48 FF FB CF A6 FF FF DE' - 'C1 FF FF DD C0 FF FF DD C1 FF FF E1 C6 FF FF E5' - 'CD FF FF E8 D2 FF FF EC D7 FF FF EE DD FF FF F2' - 'E2 FF FF F3 E4 FF FE F0 DF FF FF F9 EF FF FF F3' - 'E2 FF 70 52 37 FF 00 00 00 F0 00 00 00 42 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 23 03 00 00 FD BF 97 6F FF FF EA D3 FF F4 CC' - 'A9 FF FF E3 CB FF FF E3 CC FF FF E6 CF FF FF EA' - 'D5 FF FF EC DA FF FF EF DF FF FF F2 E4 FF FE F2' - 'E3 FF FE F0 E1 FF FF FA F3 FF FF FA ED FF 83 65' - '48 FF 00 00 00 F6 00 00 00 52 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 12 00 00 00 CD 37 23 0E FF D6 B6 91 FF FD E7' - 'D0 FF F6 D3 B4 FF FF EB D9 FF FF EB D9 FF FF EE' - 'DE FF FF F0 E2 FF FF F2 E6 FF FF F1 E4 FF FE F3' - 'E6 FF FF FA F4 FF FF FE F4 FF 98 79 5A FF 01 00' - '00 FC 00 00 00 65 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 1C 00 00 00 D4 24 13 01 FF D7 A8' - '74 FF FE D8 B5 FF FF F1 E5 FF FF EF E1 FF FF F2' - 'E6 FF FF F4 E9 FF FE F2 E5 FF FF F6 EC FF FF FA' - 'F4 FF FF FF FF FF BB 9C 7B FF 06 01 00 FF 00 00' - '00 85 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 2A 00 00 00 D3 36 1F' - '07 FF EB C5 9C FF FF FF F6 FF FF F4 EA FF FF F5' - 'EB FF FF F4 EB FF FF F7 F0 FF FF FB F7 FF FF FF' - 'FF FF E0 C8 AD FF 29 1A 0B FF 00 00 00 B7 00 00' - '00 0C 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 22 00 00' - '00 DA 3E 2D 1A FF DE C5 A8 FF FF FF FD FF FF FA' - 'F5 FF FF FB F7 FF FF FD FB FF FF FF FF FF EC D9' - 'C2 FF 3A 27 14 FF 00 00 00 C7 00 00 00 16 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 22 00 00 00 C4 25 18 0A FF C6 B0 95 FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF F4 E5 D3 FF 4B 36' - '20 FF 00 00 00 D6 00 00 00 22 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 10 00 00 00 A6 12 09 01 FF AA 94' - '7A FF FF F6 EA FF F0 DE C8 FF 5E 46 2B FF 00 00' - '00 E3 00 00 00 2E 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 02 00 00 00 84 05 01' - '00 FF 44 31 1A FF 26 19 0A FF 00 00 00 E1 00 00' - '00 3D 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 54 00 00 00 84 00 00 00 67 00 00 00 1F 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FC' - '7F FF FF F8 3F FF FF F0 1F FF FF C0 0F FF FF 80' - '07 FF FF 00 03 FF FC 00 01 FF F8 00 00 FF F0 00' - '00 7F C0 00 00 3F 80 00 00 1F 00 00 00 0F 00 00' - '00 07 00 00 00 03 00 00 00 01 80 00 00 00 C0 00' - '00 00 E0 00 00 00 F0 00 00 00 F8 00 00 01 FC 00' - '00 03 FE 00 00 07 FF 00 00 0F FF 00 00 1F FF 00' - '00 3F FF 80 00 7F FF C0 00 7F FF E0 00 FF FF F0' - '01 FF FF F8 03 FF FF FC 07 FF FF FF 0F FF 28 00' - '00 00 10 00 00 00 20 00 00 00 01 00 20 00 00 00' - '00 00 00 04 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 10 00 00 00 8A 00 00 00 67 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 36 1E 0B' - '04 C9 9D 6B 56 FF 5D 3E 32 FE 00 00 00 67 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 69 4C 2F 21 EF CE 9D' - '87 FF FF FF FE FF F0 E3 DF FF 50 36 2D F9 00 00' - '00 5D 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 0A 00 00 00 90 71 4F 3D FF EE B2 90 FF FD D2' - 'B5 FF FF FF FD FF FF FF FF FF E8 D7 D1 FF 3C 27' - '1F F3 00 00 00 47 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 2C 1A 0D' - '07 BF A6 83 6D FF FB CC AC FF F7 BA 8F FF FF 9A' - '44 FF FF C3 91 FF FF FD FC FF FF FF FF FF DC C7' - 'C1 FF 38 26 1D E9 00 00 00 40 00 00 00 00 00 00' - '00 00 00 00 00 00 02 01 00 5C 47 33 27 E8 D6 B9' - 'A1 FF FF E0 C2 FF F3 BF 98 FF FF A3 55 FF FF 9A' - '44 FF FF 9D 4A FF FF CB 9D FF F5 F2 F2 FF F6 F2' - 'F5 FF D5 BD B4 FF 39 24 19 E9 00 00 00 3E 00 00' - '00 00 00 00 00 00 29 16 0B F2 F3 D0 B4 FF FF F3' - 'DC FF EF BC 94 FF FE A9 60 FF FF 9F 4D FF FF A1' - '51 FF FF A5 57 FF FF B1 67 FF F9 D1 AA FF E9 E2' - 'E3 FF EA E2 E5 FF CA AB 9D FF 28 17 0D E2 00 00' - '00 2D 00 00 00 00 06 03 02 67 6D 53 3F FB F7 B8' - '88 FF FF AD 65 FF FF A3 52 FF FF A4 56 FF FF A3' - '54 FF FF A7 5A FF FF B5 6F FF FF C5 88 FF F5 D9' - 'BD FF DE D4 D4 FF DE D1 D3 FF BD 9F 92 FF 2D 1E' - '13 D8 00 00 00 2D 00 00 00 00 00 00 00 6E 76 43' - '1B FF FD A4 53 FF FF AA 5D FF FF A5 57 FF FF A4' - '56 FF FF B0 6C FF FF C6 91 FF FF D7 AE FF FF E4' - 'C0 FF F3 E2 D0 FF D3 C5 C5 FF D9 C7 C9 FF A5 85' - '75 FF 06 03 01 9C 00 00 00 00 00 00 00 00 00 00' - '00 6D 6E 3E 18 FF FF A6 58 FF FF AE 65 FF FF BD' - '85 FF FF CC A0 FF FF D7 B2 FF FF E0 C0 FF FF E9' - 'CE FF FF F3 DC FF F3 EA DF FF CB B4 AF FF 3C 30' - '2A EB 01 01 00 32 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 6F 71 43 1E F6 F7 C2 90 FF FF D8' - 'B5 FF FF D7 B4 FF FF DF C1 FF FF E7 CE FF FF EE' - 'DA FF FF F8 E8 FF FF F7 E4 FF 61 51 44 F8 00 00' - '00 50 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 9F D0 AA 86 FF FF E6' - 'CA FF FF E1 C9 FF FF E8 D3 FF FF EE DD FF FF F4' - 'E7 FF FF FC ED FF 7C 6B 5A FD 00 00 00 64 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 43 53 43 32 F4 F3 D2' - 'B0 FF FF F1 E0 FF FF F0 E3 FF FF F4 E8 FF FF FF' - 'FB FF 98 86 75 FF 00 00 00 7D 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 4E 59 47' - '34 F4 F5 EA D9 FF FF FF FC FF FF FF FF FF BA AC' - '9C FF 0C 07 03 A2 00 00 00 03 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 45 47 3C 31 E3 E3 DC D4 FF C9 BE B0 FF 16 10' - '09 B4 00 00 00 0A 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 2B 19 12 0A BB 0D 09 03 A0 00 00' - '00 12 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 FC 7F 00 00 F8 3F 00 00 F0 1F' - '00 00 C0 0F 00 00 80 07 00 00 00 03 00 00 00 01' - '00 00 00 00 00 00 80 00 00 00 C0 00 00 00 E0 01' - '00 00 F0 03 00 00 F0 07 00 00 F8 07 00 00 FC 0F' - '00 00 FE 1F 00 00' -} */ - -/* BINRES folder_open.ico */ -4 ICON folder_open.ico -/* { - '00 00 01 00 06 00 20 20 00 00 01 00 08 00 A8 08' - '00 00 66 00 00 00 10 10 00 00 01 00 08 00 68 05' - '00 00 0E 09 00 00 30 30 00 00 01 00 20 00 A8 25' - '00 00 76 0E 00 00 20 20 00 00 01 00 20 00 A8 10' - '00 00 1E 34 00 00 10 10 00 00 01 00 20 00 68 04' - '00 00 C6 44 00 00 10 10 00 00 01 00 08 00 68 05' - '00 00 2E 49 00 00 28 00 00 00 20 00 00 00 40 00' - '00 00 01 00 08 00 00 00 00 00 00 04 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 B7 35 09 00 C4 3D 06 00 B5 44 16 00 B5 48' - '23 00 BE 50 2B 00 CE 48 0F 00 CC 4A 15 00 CB 53' - '1B 00 D4 58 1A 00 DC 66 1F 00 C5 53 26 00 D0 5A' - '22 00 D0 59 31 00 DE 69 20 00 DA 72 2B 00 CE 63' - '3C 00 D5 67 31 00 DF 6F 37 00 DC 72 30 00 E4 6C' - '24 00 EA 78 27 00 EB 6D 31 00 E8 75 36 00 F1 76' - '30 00 BB 6C 4F 00 C4 6D 55 00 C4 76 5D 00 CE 7D' - '5F 00 D2 74 50 00 D4 7A 5B 00 E6 72 41 00 C5 7F' - '6B 00 C8 7B 68 00 DB 7E 65 00 F8 8A 29 00 EF 88' - '35 00 F2 8A 34 00 FD 99 35 00 FC 9B 3B 00 FF A3' - '3A 00 BC 89 79 00 E9 88 46 00 E5 85 4B 00 F5 9A' - '44 00 FD 9D 45 00 F0 95 49 00 FA 9C 4D 00 EA 81' - '5B 00 FF A6 40 00 FF A9 45 00 F4 A0 49 00 FF AD' - '4E 00 FA A0 53 00 FE A9 53 00 FD A6 58 00 FA AA' - '5B 00 FF B2 55 00 FF B3 5C 00 C5 80 6C 00 CB 82' - '6C 00 D5 84 69 00 C3 85 77 00 CA 8B 77 00 D4 89' - '78 00 CD 90 7C 00 DA 9B 7E 00 EF 9D 65 00 ED 97' - '6F 00 F4 9E 63 00 F5 9C 6F 00 E3 8C 78 00 E0 9D' - '7E 00 E8 9A 7D 00 F0 9B 79 00 FA AF 65 00 F6 AB' - '6C 00 FD B2 62 00 FF BA 65 00 FE B6 6E 00 FF BF' - '6D 00 EC A1 76 00 EB A2 7A 00 F2 A6 75 00 F7 AC' - '70 00 F0 A3 7D 00 F5 AC 7F 00 FE B7 71 00 FC BC' - '72 00 F9 BA 7F 00 FE C4 78 00 92 8F 8D 00 91 90' - '8E 00 9F 93 8F 00 93 91 91 00 9B 96 94 00 9C 9B' - '9B 00 BC 8F 82 00 A1 93 8D 00 BC 92 85 00 B1 96' - '8A 00 A3 95 91 00 A5 98 94 00 A0 9E 9F 00 BC 9A' - '93 00 BE 9E 98 00 A8 A0 9C 00 B6 A1 9D 00 B9 A3' - '9F 00 A4 A2 A2 00 A9 A6 A6 00 AD AA A6 00 A9 A5' - 'A8 00 AE AB AC 00 B7 A7 A1 00 B9 A3 A0 00 B6 A8' - 'A3 00 BA AA A5 00 B3 AB AB 00 B5 B1 AD 00 B4 AE' - 'B0 00 BB B3 B7 00 C1 93 84 00 C2 93 89 00 CE 97' - '8B 00 C2 9A 8D 00 CF 99 8A 00 D6 98 87 00 C3 9F' - '92 00 CB 9D 92 00 DF 9D 90 00 E4 9A 88 00 C2 A1' - '97 00 CB A0 92 00 C3 A6 9C 00 C8 A4 99 00 DC A4' - '91 00 DB A9 91 00 D0 A3 99 00 E8 A7 80 00 EC AD' - '83 00 F0 AA 82 00 F3 AB 89 00 F0 B7 80 00 FF BF' - '85 00 F3 B2 8C 00 F8 B1 88 00 F5 BB 8C 00 F8 BE' - '8E 00 F1 AE 9A 00 EE B2 95 00 F7 B8 96 00 C1 AC' - 'A5 00 D7 AA A4 00 C4 B1 AD 00 D7 B0 A1 00 DA B5' - 'A6 00 DA B4 AA 00 D9 BB AF 00 C2 BC BD 00 D0 B3' - 'B2 00 DA BD B4 00 D0 BB BB 00 E0 B2 A5 00 EE BD' - 'A2 00 E3 B4 AA 00 E4 BB AF 00 F1 B6 A7 00 F6 BE' - 'A2 00 F0 BA AB 00 E5 BE B3 00 EC BC B0 00 E2 BF' - 'BB 00 FD C9 86 00 F4 C4 97 00 FF CB 95 00 FB C4' - '9C 00 FE CC 9D 00 FD D1 93 00 FE D5 9C 00 FE DB' - '9E 00 EC C5 AF 00 F4 C2 A5 00 FD CD A1 00 F5 C8' - 'AA 00 F9 CB AB 00 FD D4 A3 00 FF DE A4 00 FD D3' - 'AC 00 FD DB A9 00 E9 C2 B7 00 F1 C2 B5 00 F3 CA' - 'B3 00 FA D2 B3 00 FD DC B5 00 FB D6 BB 00 FB DC' - 'BC 00 FF E0 A5 00 FF E2 AE 00 FF E3 B2 00 FE E6' - 'BE 00 FF E8 BF 00 C3 BF C0 00 D0 C1 C1 00 DB C5' - 'C0 00 DD C6 CC 00 DF CA CB 00 DF CF D0 00 EB C5' - 'C0 00 EB CF CA 00 F9 CD C6 00 FC D3 C5 00 FC DC' - 'C5 00 F0 D3 CA 00 FF D7 CB 00 FA DD CA 00 E0 CF' - 'D0 00 E5 D7 DA 00 FA D8 D1 00 F0 DC D9 00 FE E4' - 'C1 00 FF E9 C3 00 FF EE CE 00 F0 E0 D4 00 FC E2' - 'D3 00 FF EE D0 00 F0 E1 DF 00 FD E5 DA 00 FE EB' - 'DC 00 FF F0 D5 00 FE F2 DD 00 ED DE E0 00 F0 DF' - 'E2 00 F1 E3 E3 00 FD E9 E5 00 F0 E7 EF 00 F1 EB' - 'EC 00 FE F5 E3 00 FF F3 EB 00 FF FA EE 00 F3 EE' - 'F0 00 FE F3 F2 00 FF FA F1 00 FF F7 FF 00 FF F9' - 'FC 00 7F 7F 7F 00 09 48 E9 77 B8 10 E9 77 FF FF' - 'FF FF C9 F1 E7 77 16 EA 4B 00 F8 00 00 00 40 B4' - '0C 01 66 00 00 00 58 1A 95 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 5F 5F 5F 5C 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 A5 99 98 76 70 60 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 7F 83 88 7E 68 74 71 67 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 65 47 A7 E3 A9 83 7E 68 75 71 6D 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 9D 8E 95 F4 F4 EA BF 82 7C 68 73 71 6D' - '5C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 9B B1 95 F4 F4 F3 F1 E9 D0 83 7F 7A 6B' - '76 6E 5E 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 89 BA 91 F1 F4 F3 F1 F1 EC E8 AB 83 41' - '63 69 76 70 5E 00 00 00 00 00 00 00 00 00 00 00' - '00 00 62 89 C5 93 E0 E3 F1 F1 F0 F0 EB E9 E2 AA' - '83 40 3E 68 6B 71 6D 00 00 00 00 00 00 00 00 00' - '00 00 BE B6 B4 93 B0 90 B7 C3 DF EC EB E9 E2 E7' - 'E7 AC 83 40 3E 7B 6C 71 70 5C 00 00 00 00 00 00' - '00 00 AB C1 C5 94 97 4F 36 37 8F C0 D5 DB E7 E7' - 'E7 D9 D8 AC 82 3D 20 63 6B 77 6D 00 00 00 00 00' - '00 00 95 C2 C7 B0 91 5A 4D 36 2C 2E 43 96 BE D1' - 'D9 D9 D8 CF CF A1 7E 3C 1B 69 CA 00 00 00 00 00' - '00 66 95 C2 C7 B7 8D AD 4E 3A 36 2C 24 18 2B 48' - 'A5 AC D8 CF CF CD CB A0 3D 3E 9F 60 00 00 00 00' - '00 9E C0 C4 C7 BD 55 B2 5A 4E 3A 36 2C 24 15 14' - '12 3D 88 9D CE CD CB A2 8A 20 9F 6D 00 00 00 00' - '00 9E D4 C8 C9 BD 4A BA AD 5A 4E 3A 34 2C 24 15' - '0E 0C 0C 1D 7F 99 A0 A2 A0 21 79 70 00 00 00 00' - '00 9C E1 DD C9 C2 8E BC AD AD 5A 4E 39 36 2C 25' - '15 0E 0C 08 07 10 3C 7B 8A 21 73 6E 00 00 00 00' - '5D A6 E5 DE DD C4 95 B9 B3 B2 AD 5A 4E 3A 36 2D' - '25 15 14 09 08 06 02 04 19 1A 63 6F 00 00 00 00' - 'D0 D3 E5 E1 DE DC B8 A8 B0 B0 AF AD 5A 4E 3A 39' - '32 26 25 15 0A 09 06 01 03 05 20 76 00 00 00 00' - 'D0 E0 E6 E5 E1 DE DD BC 97 97 B0 94 94 90 50 3A' - '34 32 31 26 23 14 09 01 08 0B 1A 76 00 00 00 00' - 'AB E4 E6 E6 E5 E1 DE DD C9 C2 B7 91 8E 97 AF 50' - '39 34 32 31 28 23 14 08 0C 0B 10 75 60 00 00 66' - 'BF ED ED ED E6 E5 E1 DE DD C9 C9 C7 BA 92 97 AD' - '50 39 34 32 31 26 18 17 0F 0C 0D 69 67 00 00 A1' - 'D6 EE F2 ED E6 E6 E5 E1 DE DD C9 C8 C7 B7 52 91' - '59 57 4D 39 32 27 16 2F 33 13 0D 61 6D 00 00 CC' - 'EA F2 F2 EF ED ED E6 E5 DE DE DD C9 C9 C7 B1 8D' - '8E 92 56 4C 38 35 1F 4B 4E 2E 11 3B 70 00 00 A1' - 'F1 F4 F2 F2 F2 ED E6 E6 E5 E1 DE DD C9 C8 C7 C6' - 'BA 94 52 51 53 46 30 54 58 4B 2A 1C 78 00 00 A1' - 'EA EA F1 EE F2 EF ED E6 D7 C3 C4 DC DC C9 C9 C7' - 'C7 C6 C5 B3 93 44 22 49 8E 53 45 1E 77 00 00 74' - '98 9D D2 DA E0 E3 E4 D4 A9 87 86 B5 C1 B9 C1 C2' - 'C7 C7 C7 C5 B4 8C 81 98 84 61 29 3F 00 00 00 00' - '00 5B 98 98 86 A5 A6 A3 98 00 00 72 86 80 86 A4' - 'B9 B7 BA BD BB 8B 9A 00 00 00 00 6A 00 00 00 00' - '00 00 00 00 00 66 5D 66 00 00 00 00 00 00 00 6B' - '7D 85 B6 B0 AE 42 76 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 9A 84 63 64 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF' - 'FF FF FC 3F FF FF FC 0F FF FF FC 03 FF FF F8 00' - 'FF FF F8 00 1F FF F8 00 07 FF F8 00 01 FF F0 00' - '00 7F F0 00 00 0F F0 00 00 07 F0 00 00 07 E0 00' - '00 03 E0 00 00 03 E0 00 00 03 E0 00 00 03 C0 00' - '00 03 C0 00 00 03 C0 00 00 03 C0 00 00 01 80 00' - '00 01 80 00 00 01 80 00 00 01 80 00 00 01 80 00' - '00 01 80 00 00 03 E0 18 00 7B FE 3F 80 7F FF FF' - 'F0 FF FF FF FF FF FF FF FF FF FF FF FF FF 28 00' - '00 00 10 00 00 00 20 00 00 00 01 00 08 00 00 00' - '00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 B8 47 1D 00 C9 45' - '0E 00 CB 55 1F 00 D7 5F 1F 00 DE 65 1E 00 D0 59' - '28 00 CE 68 3F 00 E2 69 24 00 E7 77 27 00 EB 7B' - '2F 00 F0 7F 39 00 C7 6B 4E 00 DE 7A 45 00 C9 7B' - '60 00 F3 8B 32 00 FD 9C 35 00 BE 80 70 00 BF 91' - '7F 00 F0 96 46 00 F6 99 44 00 F7 99 44 00 E8 8D' - '51 00 ED 8A 5E 00 FD A4 44 00 FF AA 46 00 FF AA' - '49 00 F7 A2 52 00 FF B2 59 00 FF B5 59 00 FF B2' - '5D 00 FF B3 5E 00 C4 84 72 00 EF A1 6B 00 FF B4' - '62 00 FF B5 68 00 F2 A7 73 00 F8 B3 71 00 F8 B5' - '7E 00 FF C3 73 00 FF C5 7A 00 FF C7 7A 00 96 8A' - '85 00 96 90 8E 00 99 91 8E 00 92 91 90 00 96 95' - '94 00 9F 97 94 00 9A 98 97 00 9C 99 98 00 9E 9C' - '9C 00 A6 96 91 00 AD 9C 95 00 B6 9D 93 00 A6 A0' - '9F 00 BB A0 94 00 B7 A0 9B 00 B1 A2 9F 00 BB A0' - '9A 00 A6 A2 A3 00 AE A7 A5 00 AC A7 A8 00 B3 A3' - 'A3 00 BF AB A6 00 BF AE AB 00 B7 AF B0 00 C9 8E' - '82 00 C4 95 8B 00 C9 94 88 00 CD 9A 8E 00 D9 9C' - '85 00 C3 9C 95 00 C2 9E 95 00 CE 9D 91 00 D1 9F' - '94 00 CD A0 90 00 C6 AA 9F 00 DA A3 98 00 DF AA' - '98 00 DF A9 9A 00 DC AB 9F 00 EC B5 8D 00 F1 B2' - '83 00 F3 B3 8B 00 F5 B6 8A 00 F7 B5 8E 00 F7 B8' - '8A 00 EE AC 93 00 F6 BB 99 00 CF B3 A9 00 D9 B0' - 'A0 00 D1 B7 B1 00 D9 BD B2 00 E9 BC A3 00 E5 BE' - 'AF 00 EA BC A8 00 FD C3 8C 00 FF D1 8F 00 FE C7' - '92 00 F8 C3 98 00 F9 C2 9B 00 FC C1 99 00 FF C8' - '9B 00 FA CF 9C 00 FB D0 97 00 FD CD A3 00 F8 CE' - 'AE 00 FC D0 A1 00 F7 D0 AE 00 FF DD AC 00 F4 CB' - 'B0 00 F2 CA B5 00 FF DF B2 00 FF E2 AD 00 FE E0' - 'B3 00 FF E1 B3 00 FF E4 B6 00 FE E0 BA 00 D3 C0' - 'C2 00 DE C1 C1 00 DF C4 C3 00 EF CA C3 00 EA D0' - 'CF 00 F6 D7 CE 00 F6 DA CF 00 F3 DD CD 00 E0 D0' - 'D1 00 EE D6 D4 00 E3 D4 D8 00 FA DF DB 00 FB E2' - 'C7 00 FF E8 C0 00 FF E8 C1 00 FF ED CB 00 FF EC' - 'CC 00 FF ED CC 00 EF E0 DF 00 FB E2 D3 00 FF EB' - 'D2 00 FF F0 D5 00 FF F1 D6 00 FC E5 E0 00 FC E7' - 'E4 00 F0 E6 EA 00 F7 ED ED 00 FB EB EA 00 FF F4' - 'E0 00 FF F9 ED 00 FF FA F6 00 FF F6 FB 00 7F 7F' - '7F 00 F7 B8 96 00 C1 AC A5 00 D7 AA A4 00 C4 B1' - 'AD 00 D7 B0 A1 00 DA B5 A6 00 DA B4 AA 00 D9 BB' - 'AF 00 C2 BC BD 00 D0 B3 B2 00 DA BD B4 00 D0 BB' - 'BB 00 E0 B2 A5 00 EE BD A2 00 E3 B4 AA 00 E4 BB' - 'AF 00 F1 B6 A7 00 F6 BE A2 00 F0 BA AB 00 E5 BE' - 'B3 00 EC BC B0 00 E2 BF BB 00 FD C9 86 00 F4 C4' - '97 00 FF CB 95 00 FB C4 9C 00 FE CC 9D 00 FD D1' - '93 00 FE D5 9C 00 FE DB 9E 00 EC C5 AF 00 F4 C2' - 'A5 00 FD CD A1 00 F5 C8 AA 00 F9 CB AB 00 FD D4' - 'A3 00 FF DE A4 00 FD D3 AC 00 FD DB A9 00 E9 C2' - 'B7 00 F1 C2 B5 00 F3 CA B3 00 FA D2 B3 00 FD DC' - 'B5 00 FB D6 BB 00 FB DC BC 00 FF E0 A5 00 FF E2' - 'AE 00 FF E3 B2 00 FE E6 BE 00 FF E8 BF 00 C3 BF' - 'C0 00 D0 C1 C1 00 DB C5 C0 00 DD C6 CC 00 DF CA' - 'CB 00 DF CF D0 00 EB C5 C0 00 EB CF CA 00 F9 CD' - 'C6 00 FC D3 C5 00 FC DC C5 00 F0 D3 CA 00 FF D7' - 'CB 00 FA DD CA 00 E0 CF D0 00 E5 D7 DA 00 FA D8' - 'D1 00 F0 DC D9 00 FE E4 C1 00 FF E9 C3 00 FF EE' - 'CE 00 F0 E0 D4 00 FC E2 D3 00 FF EE D0 00 F0 E1' - 'DF 00 FD E5 DA 00 FE EB DC 00 FF F0 D5 00 FE F2' - 'DD 00 ED DE E0 00 F0 DF E2 00 F1 E3 E3 00 FD E9' - 'E5 00 F0 E7 EF 00 F1 EB EC 00 FE F5 E3 00 FF F3' - 'EB 00 FF FA EE 00 F3 EE F0 00 FE F3 F2 00 FF FA' - 'F1 00 FF F7 FF 00 FF F9 FC 00 7F 7F 7F 00 09 48' - 'E9 77 B8 10 E9 77 FF FF FF FF C9 F1 E7 77 16 EA' - '4B 00 F8 00 00 00 40 B4 0C 01 66 00 00 00 58 1A' - '95 00 00 00 00 00 00 00 00 2F 31 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 45 4F 48 3D 2D 00 00' - '00 00 00 00 00 00 00 00 00 57 8E 81 50 47 3C 2E' - '00 00 00 00 00 00 00 00 00 63 8D 95 90 7F 4E 43' - '3E 30 00 00 00 00 00 00 59 67 65 66 7D 8F 88 7A' - '4D 42 38 3B 00 00 00 00 5A 6D 56 22 1B 21 5F 80' - '7E 78 4A 20 41 00 00 00 6F 74 54 29 1E 14 0A 0D' - '46 77 76 49 40 00 00 00 82 83 58 61 27 1C 15 09' - '04 06 0E 44 3A 00 00 5B 8A 87 6A 64 62 28 1F 18' - '0F 05 02 01 11 00 00 5C 92 8C 86 75 69 55 60 1D' - '19 10 08 03 0C 32 2B 7B 93 92 8C 87 84 70 53 26' - '23 1A 0B 13 07 36 2C 91 94 93 92 8B 85 84 72 6B' - '52 24 17 25 16 39 00 3F 79 7C 89 5E 4C 6E 6C 73' - '71 68 4B 35 12 2A 00 00 00 00 33 00 00 00 00 37' - '5D 51 34 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 E7 FF 00 00 E0 FF 00 00 E0 3F' - '00 00 E0 0F 00 00 C0 03 00 00 C0 01 00 00 C0 01' - '00 00 C0 01 00 00 80 01 00 00 80 00 00 00 00 00' - '00 00 00 00 00 00 80 00 00 00 F7 87 00 00 FF FF' - '00 00 FF FF 00 00 28 00 00 00 30 00 00 00 60 00' - '00 00 01 00 20 00 00 00 00 00 00 24 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 D5 C9' - 'BE 1C DC C8 BE 54 D4 C6 BE 54 CF C4 BF 54 CB C4' - 'BF 54 CF C7 C2 41 D2 CA C6 2E D6 CE C9 1B DA D3' - 'CD 0C D8 D2 C9 03 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 DC C8' - 'BE 54 F0 C5 BC FF DA BF BE FF CA BA BF FF BF B8' - 'BF FF C9 C2 C9 C3 D4 CC D4 8A DF D8 DF 54 EA E7' - 'EA 26 E6 E2 DF 0A 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 D8 BE' - 'B4 54 E5 A7 9E FF DE 9C 90 FF D5 96 89 FF CA 95' - '89 FF C6 A1 9B EB C2 AE AD D8 BF BD BF C6 CA C9' - 'CA 96 D3 D0 D1 6B DA D2 D4 43 E1 DA DB 24 DE D7' - 'D4 0D 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 D6 B7' - 'AB 54 E0 91 84 FF E3 95 84 FF E3 9B 88 FF DF A2' - '8F FF D4 9B 8C FF C9 99 8E FF BF 9D 95 FF BF A9' - 'A3 DF C4 B8 B6 BD CF C9 CF 98 DA D4 DA 6C DA D5' - 'D6 47 D1 CC C4 27 D8 D1 CB 17 D8 D0 C9 0A 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 D6 B2' - 'A4 54 E0 84 6F FF EA AB 9A FF F5 C9 BA FF FF DF' - 'D0 FF F4 AF 9A FF E9 8C 75 FF DF 78 5F FF C9 88' - '74 FF BA 9A 8F FF B0 AF B0 FF BA B9 BA DB C5 C4' - 'C5 AE D0 D0 D0 78 E4 DF E4 46 E5 DD DF 1E 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 DF C7 BD 71 E7 B4' - 'A6 C6 EA 90 79 FF ED A1 8F FF F4 C1 B6 FF FF F2' - 'EF FF FB E2 DD FF F7 D2 CA FF F4 C1 B4 FF E6 AA' - '98 FF D6 98 84 FF C5 89 7A FF C1 94 8B F3 BD A4' - 'A1 E4 BA BA BA D1 C8 C3 C8 B1 CF C9 CD 89 D0 CD' - 'CA 5B D7 D4 D1 39 D8 D3 CD 1A 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 E5 C4 BA A9 F1 B9' - 'A8 FF F4 A9 8A FF F0 A0 8A FF F4 BC B0 FF FF FC' - 'FF FF FF FC FF FF FF F6 F8 FF FF EC EA FF F8 CE' - 'C3 FF EC B3 A2 FF DA 99 89 FF D2 96 89 FF C9 97' - '8D FF BF 9C 95 FF BF A3 9F EF C1 AF AD D5 C5 C1' - 'C0 B0 CF CC CD 8A D3 CF CF 60 D1 C9 C4 33 D4 CE' - 'C8 22 D5 CE C6 10 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 E5 C2 B5 A9 F4 C3' - 'AA FF FF CD A0 FF F4 A9 8A FF F4 B8 AA FF FF FC' - 'FF FF FF FC FF FF FF FA FF FF FF F7 FF FF FF F3' - 'F5 FF FA EB EA FF F0 DF DF FF EF BD B4 FF E9 9B' - '89 FF DF 77 5F FF CA 7F 6A FF BA 8F 7F FF B0 A7' - 'A0 FF B9 B1 B4 F3 C4 BC C4 D2 CF C8 CF 9C DA D7' - 'DA 66 DB D8 D5 32 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 E5 B8 A6 A9 F4 BA' - '9C FF FF D1 A0 FF F4 A7 83 FF F4 B5 A2 FF FF FC' - 'FF FF FF FC FF FF FF FA FF FF FF F7 FF FF FF F3' - 'F5 FF FD EE EE FF FA E9 EA FF F3 DE DC FF ED CF' - 'CA FF EA BC B4 FF E3 A9 9B FF DA 97 83 FF CF 87' - '6A FF C4 8B 78 FB BD 97 8F F0 BA AC AF DD C4 BC' - 'C0 CB CC C5 C9 A8 D0 C8 C9 73 D7 CF D0 50 D7 D0' - 'CD 29 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 E5 AF 9C A9 F4 B4' - '93 FF FF D9 A5 FF F4 AB 81 FF F4 B5 9D FF FF F8' - 'FA FF FF F9 FD FF FF F9 FF FF FF F7 FF FF FF F3' - 'F5 FF FD F0 F0 FF FA EF F0 FF F3 EF F0 FF F0 EA' - 'EC FF F0 E1 E5 FF EF CA C4 FF EB B2 A3 FF E4 9A' - '7F FF D3 8F 78 FF C7 8C 7C FF BF 91 89 FF C2 9A' - '94 FE C4 A6 A4 EC C4 B4 B9 C9 CB C3 C8 A5 CE C9' - 'CA 77 CC C6 BF 3F D2 CB C6 2E D8 D0 CB 1C DB D3' - 'CF 0C D5 CD C4 04 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 E5 AA 95 A9 F4 B2' - '90 FF FF E4 B0 FF F5 B6 85 FF F5 BA 9A FF FF F1' - 'F0 FF FF F5 FA FF FF F7 FF FF FF F7 FF FF FF F3' - 'F5 FF FA F0 F0 FF F0 EF F0 FF F0 EF F0 FF F0 EC' - 'EF FF F0 E7 EF FF F0 E3 E5 FF F0 E2 E0 FF F0 E2' - 'E0 FF E5 C0 B5 FF DF 9C 8A FF DF 77 5F FF D4 71' - '55 FF C4 79 64 FF B0 90 8F FF B0 A5 A4 FF B5 B5' - 'B5 EA C0 C0 C0 C0 D4 CF D4 8A E4 DC E4 56 EF E8' - 'EF 26 DB D4 CF 0C 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 D8 C8 BE 38 E6 C6 BD A9 EC B6 A2 E2 F4 BE' - '9A FF FF E0 A5 FF F5 BA 88 FF F5 B6 90 FF FF D3' - 'BA FF FF D2 AF FF FF D9 BB FF FF E7 DF FF FF ED' - 'EA FF FA F0 F0 FF F0 EF F0 FF F0 EF F0 FF F0 EC' - 'EF FF F0 E7 EF FF F0 E3 E5 FF F0 E2 E0 FF F0 E2' - 'E0 FF EC D5 D1 FF E9 C8 C3 FF E9 BC B4 FF DF A8' - '9C FF D6 94 85 FF CF 80 6F FF C8 7F 6F FF C2 88' - '7B F8 BF 9A 94 E9 BF B0 B1 D8 C5 C1 C5 BC CF CC' - 'CF 98 D0 CD CC 6C D7 D3 D1 45 E5 DD DE 23 D8 D0' - 'C9 0B 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 DC C8 BE 54 F0 C5 BD FF F3 C0 AD FF F8 C9' - 'A3 FF FF DE A0 FF F5 BD 8A FF F5 B4 8A FF FF C3' - '9F FF FF BD 83 FF FF C0 84 FF FF CB A4 FF FF D2' - 'B3 FF FA D9 C3 FF F0 E1 D5 FF F0 EA E7 FF F0 EC' - 'EF FF F0 E7 EF FF F0 E3 E5 FF EF E1 E0 FF EF E1' - 'E0 FF EF DF E0 FF EF DF E0 FF EF DF E0 FF E5 CB' - 'CA FF DF B2 AC FF DF 95 84 FF D8 89 79 FF D0 84' - '76 FF C9 86 79 FF BF 8F 84 FF BC 9B 93 F5 BF A9' - 'A5 E0 C3 BA B7 BD CD C9 CA 97 DF D7 DF 6F D5 CF' - 'CD 45 D4 CF C8 25 DB D6 CF 0E D5 CE C4 04 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 DC C9 BF 54 F0 C7 BF FF FA CA B5 FF FF D2' - 'AA FF FF DE A0 FF F5 BF 8A FF F5 B5 8A FF FF BF' - '9F FF FF B5 74 FF FF AD 59 FF FF A5 4F FF FF A1' - '4F FF FA AC 6A FF F0 C7 A0 FF F0 E1 D5 FF F0 EC' - 'EF FF F0 E7 EF FF F0 E3 E5 FF EF E1 E0 FF EF DF' - 'E0 FF EF DF E0 FF EF DF E0 FF EF DF E0 FF E5 D9' - 'DF FF E0 D4 DA FF E0 D0 D0 FF DF C4 C4 FF DF AB' - 'A4 FF E0 84 6F FF D5 6A 4F FF CA 68 4F FF BF 7F' - '70 FF B5 99 8F FF B5 AC AA F6 BF B8 BF E4 CA C7' - 'CA AE DA DA DA 70 F0 EF F0 2C DC D6 CF 0E 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 DB C3 B7 54 EF B5 A9 FF F9 D0 B4 FF FF DE' - 'B4 FF FF E2 AA FF FB C7 95 FF F8 BA 8E FF F5 B9' - '95 FF FB BD 7F FF FF B9 6B FF FF AD 59 FF FF A6' - '52 FF FA A4 54 FF F0 A7 60 FF F0 AC 71 FF F0 B5' - '88 FF F0 BF A5 FF F0 D0 C4 FF EF DA D8 FF EF DF' - 'E0 FF EF DF E0 FF EB DD DF FF E5 D9 DF FF E1 D7' - 'DF FF E0 D4 DA FF E0 D0 D0 FF DF CB CC FF DF C3' - 'C1 FF DF B5 AF FF DB A2 96 FF D4 92 81 FF CA 85' - '70 FF C7 7A 64 FF C3 7D 6A FC BF 8C 7F F6 C2 AA' - 'A6 E4 CF C6 C8 C0 E4 DF E4 8A D8 D1 CB 2E 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 DB BF B2 54 EF AB 9A FF F9 D2 B2 FF FF E5' - 'BA FF FF E4 B0 FF FF CE 9E FF FA BD 91 FF F0 B1' - '8A FF FA C1 83 FF FF C1 74 FF FF B3 5F FF FF AC' - '57 FF FB A4 4F FF F5 9B 44 FF F1 95 41 FF EF 96' - '4B FF EF 9D 65 FF EF AB 84 FF ED B8 9F FF EA C4' - 'B5 FF EA CD C6 FF E6 D3 D4 FF E0 D7 DF FF E0 D5' - 'DB FF E0 D3 D6 FF E0 CF D0 FF DF CF D0 FF DF CF' - 'D0 FF DF CF D0 FF DF C2 C1 FF DA B1 AA FF D0 9A' - '8A FF D0 85 74 FF CC 78 64 FF C4 74 5A FF C0 90' - '84 FF C7 B0 AF EB D9 D2 D9 C5 DB D5 D2 4C D8 D2' - 'C9 0A 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 DC BE AF 54 F0 A8 90 FF FA D2 AF FF FF E6' - 'BA FF FF E4 B0 FF FF D4 A4 FF FA BF 94 FF F0 A7' - '80 FF FA BF 80 FF FF C5 75 FF FF B8 60 FF FF B3' - '5F FF FF AD 59 FF FF A5 4F FF F5 9B 45 FF EF 8F' - '3A FF EF 80 30 FF EF 75 25 FF EA 7A 35 FF E0 90' - '60 FF E0 AA 94 FF E0 C2 BE FF E0 D7 DF FF E0 D2' - 'D5 FF E0 CF D0 FF E0 CF D0 FF DF CF D0 FF DF CF' - 'D0 FF DF CF D0 FF DF C9 CF FF DA C4 CA FF D0 C0' - 'C0 FF D0 BA BF FF D0 9F 9A FF D0 6F 50 FF C4 79' - '65 FF C4 97 8F F3 CF C8 CF DD E4 E2 E4 69 E6 E3' - 'DF 1F 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 E1 C7' - 'BD 71 EB C1 B4 C6 F0 B8 A4 FF FA D7 B6 FF FF E5' - 'BA FF FF E4 B0 FF FF DE AC FF FA CA 9C FF F0 A7' - '80 FF FA C7 8E FF FF CF 86 FF FF BD 69 FF FF B8' - '63 FF FF B2 5D FF FF AD 59 FF FB A4 4F FF F6 9A' - '44 FF EF 8F 3A FF EF 81 30 FF ED 7A 2E FF EA 7A' - '35 FF E2 7F 46 FF DF 87 5B FF DF 92 74 FF DF A6' - '94 FF DF BA B3 FF E0 CF D0 FF DF CF D0 FF DF CF' - 'D0 FF DF CF D0 FF DF C9 CF FF DA C4 CA FF D0 C0' - 'C0 FF D0 BD BF FF D0 AD A8 FF D0 8E 7A FF C5 7D' - '65 FF C1 8E 7E F9 C5 C2 C5 EF E1 E0 E1 79 E6 E2' - 'DF 29 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 E7 C8' - 'BD A9 F3 C7 BA FF F5 C7 B4 FF FB DC BB FF FF E6' - 'BB FF FF E4 B5 FF FF E4 B1 FF F9 CD 9E FF EF 9F' - '7A FF F9 CA 97 FF FF D6 95 FF FF C4 74 FF FF BD' - '6A FF FF B8 63 FF FF B3 5F FF FF AC 57 FF FB A4' - '4F FF F5 9B 44 FF F1 8E 3A FF EF 81 30 FF EF 75' - '25 FF E4 6D 21 FF DF 6B 26 FF DF 6D 34 FF DB 7F' - '57 FF DA 92 78 FF DA A7 95 FF DA B1 A6 FF DB BC' - 'B8 FF DF C9 CA FF DF C7 CD FF DA C4 CA FF D0 C0' - 'C0 FF D0 BF C0 FF D0 B6 B3 FF D0 A4 9A FF C8 7C' - '65 FF C3 84 71 FD BF BD BF FB DF DC DF 88 E5 E1' - 'DF 34 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 E6 CC' - 'BF A9 F5 D0 BF FF FF D7 BF FF FF E2 BF FF FF E7' - 'BF FF FF E6 BF FF FF E4 B5 FF F9 C7 9A FF EF 8F' - '70 FF F9 C7 9A FF FF DC A0 FF FF CC 80 FF FF C4' - '74 FF FF BD 6A FF FF B8 60 FF FF B3 5F FF FF AD' - '59 FF FF A5 4F FF F5 9B 45 FF EF 8F 3A FF EF 80' - '30 FF E5 75 25 FF DF 6D 1F FF DF 67 1F FF D5 5D' - '1F FF D0 57 1F FF D0 57 1F FF D0 74 54 FF D5 97' - '89 FF DF BF BF FF DF C4 C9 FF DA C4 CA FF D0 C0' - 'C0 FF D0 BF C0 FF D0 BA BA FF D0 B0 B0 FF D0 78' - '64 FF CA 7A 69 FF BF B7 BF FF DE D7 DE 95 E5 DE' - 'DF 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 E5 C0' - 'B1 A9 F4 CA B5 FF FF E6 CA FF FF E7 C3 FF FF E7' - 'BF FF FF E7 BF FF FF E6 BB FF F9 CD A4 FF EF 9E' - '7A FF F9 CE A5 FF FF DD A7 FF FF CC 80 FF FF C9' - '7C FF FF C4 74 FF FF BD 69 FF FF B8 63 FF FF B2' - '5A FF FF AC 4F FF FB A4 4B FF F6 9A 44 FF EF 8F' - '3A FF EB 81 2F FF E6 76 26 FF DF 6D 1F FF DB 65' - '1F FF D6 5E 1F FF D0 57 1F FF CF 5D 2A FF D1 65' - '38 FF D4 6D 4A FF D4 82 69 FF D2 97 89 FF D0 AF' - 'AA FF D0 B9 B8 FF D0 BC BE FF D0 B8 BA FF D0 7B' - '68 FF C7 79 66 FF B5 B2 B5 FF D4 D2 D4 A1 DE DA' - 'D8 4C 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 E5 BB' - 'AA A9 F4 C7 B1 FF FF EF D5 FF FF EC CA FF FF E9' - 'C3 FF FF E8 C0 FF FF E7 BF FF FA D1 AB FF F0 A7' - '85 FF FA CE AC FF FF DB AC FF FF CE 85 FF FF CC' - '81 FF FF C9 7C FF FF C4 74 FF FF BD 6A FF FF B8' - '5F FF FF B2 55 FF FF AC 54 FF FB A4 4F FF F5 9B' - '44 FF F4 8E 39 FF EF 81 2F FF E5 75 24 FF E1 6D' - '21 FF DB 65 1F FF D5 5C 1F FF D1 55 18 FF CF 4E' - '13 FF CF 48 10 FF CF 58 2B FF CD 6C 4A FF CA 82' - '6A FF C7 91 83 FF C7 9E 96 FF CA A9 A4 FF CE 7C' - '68 FF C7 7B 68 FF B5 A7 A5 FF CE C9 C8 AD D7 D4' - 'D1 58 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 E6 BB' - 'AA A9 F5 C9 B5 FF FF F3 DF FF FF F0 D4 FF FF EC' - 'CA FF FF E8 C0 FF FF E8 C0 FF FA D2 AF FF F0 A7' - '8F FF FA C6 AE FF FF D6 AF FF FF D4 90 FF FF CE' - '85 FF FF CC 80 FF FF CC 80 FF FF C4 74 FF FF BD' - '6A FF FF B8 60 FF FF B3 5F FF FF AD 59 FF FF A5' - '4F FF FF 9B 44 FF F9 8F 39 FF EF 80 2F FF E5 75' - '25 FF DF 6D 1F FF DF 67 1F FF D5 5D 1F FF CF 55' - '1A FF CF 4F 10 FF CF 48 10 FF CA 40 0A FF C0 38' - '00 FF B5 47 1F FF B5 60 45 FF C0 84 70 FF CA 7B' - '64 FF CA 81 6E FF BF 97 8F FF CA BC BA BA D0 CE' - 'CA 65 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 D9 C9 BE 38 E8 C7 BD A9 F4 C3' - 'B7 E2 FB D1 BF FF FF F1 D5 FF FF EF D1 FF FF ED' - 'CD FF FF EC C9 FF FF E9 C3 FF FA D6 B3 FF F0 B2' - '99 FF F3 BB A4 FF F8 C7 A8 FF FF D6 A5 FF FF D7' - 'A1 FF FF D5 98 FF FF CE 89 FF FF C7 7F FF FF C2' - '74 FF FF BD 69 FF FF B8 63 FF FF B2 5D FF FF AC' - '59 FF FF A8 4F FF FD A2 44 FF F9 99 3A FF F6 8D' - '2F FF F0 82 2A FF E9 77 29 FF DF 69 22 FF D6 5D' - '1D FF CF 54 19 FF CF 4E 13 FF CD 47 0E FF C9 40' - '0A FF B8 38 0E FF B1 3F 1A FF B5 56 30 FF C0 56' - '32 FF C3 68 4B FF BF 8A 7A FF CA B5 B2 C6 D6 D2' - 'D4 73 E5 E3 DF 07 D8 D2 C9 02 00 00 00 00 00 00' - '00 00 00 00 00 00 DC C9 C0 54 F2 C9 C2 FF FA CD' - 'C3 FF FF DA C9 FF FF F1 D5 FF FF EF D1 FF FF EE' - 'CF FF FF EE CF FF FF EB C8 FF FB DE BC FF F5 C7' - 'A9 FF F5 BE A3 FF F6 BE A0 FF FA C7 A0 FF F9 C7' - '9F FF FB C8 9B FF FF C9 94 FF FF CA 8D FF FF C9' - '84 FF FF C6 79 FF FF BE 6B FF FF B8 63 FF FF B3' - '5F FF FF B0 58 FF FF AD 4F FF FF A9 44 FF FF 9F' - '3A FF FB 95 35 FF F4 8C 34 FF ED 7D 2A FF E4 6F' - '22 FF DA 62 1F FF D6 59 18 FF D2 50 13 FF CF 48' - '10 FF B9 32 05 FF B1 30 06 FF B5 44 14 FF BC 46' - '1B FF C0 58 38 FF C0 7D 6A FF C6 AD AA D2 D6 D3' - 'D6 83 F0 EF F0 12 DC D6 CF 06 00 00 00 00 00 00' - '00 00 00 00 00 00 DC CB C4 54 F0 CF CF FF FA D9' - 'CF FF FF E5 D4 FF FF F3 DF FF FF F1 D5 FF FF EF' - 'D0 FF FF EE D0 FF FF EE CF FF FF EC CA FF FF E7' - 'C0 FF FF D0 AA FF FA BB 95 FF F0 A7 80 FF EF 9E' - '80 FF F4 A6 8A FF FF BF A0 FF FF CC A0 FF FF D4' - '9A FF FF D4 90 FF FF C6 7A FF FF BD 6A FF FF B8' - '60 FF FF B3 5F FF FF B0 59 FF FF AF 4F FF FF A9' - '45 FF FF A6 40 FF FF A6 40 FF FF 9A 35 FF FA 8A' - '2A FF F0 78 20 FF E4 67 1F FF D9 59 1A FF CF 4F' - '10 FF B9 34 05 FF B4 34 0A FF C0 4F 1F FF C0 49' - '1F FF C0 54 34 FF C0 6F 5F FF C0 A4 9F DF CF CF' - 'CF 95 F0 EF F0 23 DC D6 CF 0B 00 00 00 00 00 00' - '00 00 00 00 00 00 DC C8 BD 54 F0 C4 BA FF FA E0' - 'CF FF FF EF DB FF FF F3 DF FF FF F2 DB FF FF F1' - 'D6 FF FF EF D0 FF FF EE CF FF FF ED CD FF FF EC' - 'C9 FF FF E1 BC FF FD D8 B1 FF F9 D2 AA FF F9 C8' - 'A3 FF FB C2 9C FF FF BF 95 FF F7 AE 86 FF F4 A8' - '81 FF F4 AD 85 FF FB BC 8C FF FF C4 8A FF FF C7' - '7F FF FF BB 6A FF FF B3 5A FF FF AF 4F FF FF AD' - '4B FF FF AA 46 FF FF A6 40 FF FF A1 3C FF FD 9B' - '35 FF F9 91 2A FF F6 85 29 FF EB 72 24 FF D9 59' - '19 FF BD 3F 0F FF B8 3D 11 FF C9 54 1F FF C3 4F' - '1F FF C3 54 2D FF C9 65 4A FF C2 9D 98 EB CF CA' - 'CF A7 EF EA EF 32 DB D4 CF 11 00 00 00 00 00 00' - '00 00 00 00 00 00 DC C5 B9 54 F0 BD AF FF FA E3' - 'D3 FF FF F6 E3 FF FF F4 DF FF FF F3 DF FF FF F2' - 'DB FF FF F1 D5 FF FF EF D1 FF FF EE CF FF FF EE' - 'CF FF FF EB C8 FF FF E9 C3 FF FF E8 C0 FF FF E0' - 'B8 FF FF D7 AE FF FF CC 9F FF F7 B6 8D FF F4 AB' - '86 FF F4 AA 8A FF F7 B0 8E FF FB BC 93 FF FF CE' - '99 FF FF C3 7A FF FF BA 63 FF FF B2 55 FF FF B0' - '51 FF FF AD 4B FF FF A9 44 FF FF A7 41 FF FF A4' - '3C FF FF A1 35 FF FF 98 31 FF F6 85 2B FF E4 67' - '24 FF CC 50 1D FF C4 4B 1B FF CF 59 1F FF C8 54' - '1F FF C8 55 28 FF CF 5C 3A FF C1 97 8F F6 C9 C4' - 'C9 B7 EA E5 EA 42 DA D3 CD 16 00 00 00 00 00 00' - '00 00 00 00 00 00 DC C4 B9 54 F0 BA AF FF FA E4' - 'DA FF FF F8 EA FF FF F6 E0 FF FF F4 DF FF FF F3' - 'DF FF FF F3 DF FF FF F1 D5 FF FF EF D0 FF FF EE' - 'D0 FF FF EE CF FF FF EC CA FF FF E8 C0 FF FF E8' - 'C0 FF FF E7 BF FF FF E6 BF FF FF E4 B5 FF FF DC' - 'AA FF FF CD A0 FF F4 A3 7F FF F4 A3 84 FF FF CC' - 'B0 FF FF CC 90 FF FF C5 75 FF FF B8 60 FF FF B2' - '55 FF FF AF 4F FF FF AF 4F FF FF A9 45 FF FF A6' - '40 FF FF A6 40 FF FF A1 35 FF FA 92 2F FF F0 78' - '2F FF E4 68 2F FF D9 60 2A FF CF 60 20 FF CF 5A' - '1F FF CF 56 24 FF D0 54 2F FF BA 91 84 FF BF BF' - 'BF C5 E0 DF E0 52 D6 D1 CA 1B 00 00 00 00 00 00' - '00 00 E1 C8 BD 71 EE C7 BC C6 F9 C8 BA FF FD E9' - 'DE FF FF F9 EE FF FF F8 EA FF FF F6 E3 FF FF F4' - 'DF FF FF F3 DF FF FF F2 DB FF FF F1 D6 FF FF EF' - 'D0 FF FF EE CF FF FF ED CD FF FF EC C9 FF FF E9' - 'C3 FF FF E7 BF FF FF E7 BF FF FF E6 BB FF FF E2' - 'B4 FF FF DC AA FF FB C4 98 FF F4 B1 8C FF EA A3' - '85 FF F8 C3 97 FF FF CF 91 FF FF C5 75 FF FF BA' - '63 FF FF B3 56 FF FF AF 4F FF FF AD 4B FF FF AA' - '46 FF FF A6 40 FF FF A4 3C FF FA 93 36 FF F0 72' - '2F FF F2 81 3D FF EF 88 3F FF E4 84 35 FF D6 6A' - '26 FF CF 5A 24 FF D0 54 2F FF C1 86 76 FF C3 B1' - 'AD CB D5 D5 D5 64 D3 CD C6 21 00 00 00 00 00 00' - '00 00 E7 CA C1 AA F6 CE C5 FF FF D6 CA FF FF EE' - 'E3 FF FF FA F0 FF FF FA F0 FF FF F8 E8 FF FF F6' - 'E3 FF FF F4 DF FF FF F3 DF FF FF F2 DB FF FF F1' - 'D5 FF FF EF D1 FF FF EE CF FF FF EF CF FF FF EB' - 'C8 FF FF E9 C3 FF FF E8 C0 FF FF E7 BF FF FF E6' - 'BB FF FF E4 B5 FF FF DA AA FF F8 C2 97 FF EA 9F' - '7A FF F1 B1 8C FF F6 BB 8E FF F9 BB 80 FF FD B8' - '75 FF FF B6 6C FF FF B5 64 FF FF B4 5D FF FF B0' - '53 FF FF A9 45 FF FF A7 41 FF F8 92 3A FF EA 6A' - '2F FF F8 92 48 FF FB A5 51 FF F5 A1 4A FF E2 7E' - '35 FF D6 65 2B FF D0 57 2F FF C4 7D 68 FF C4 A4' - '9D D1 CF CD CF 77 D7 D3 CF 2C DB D6 CF 07 00 00' - '00 00 E6 D0 C9 AA F5 D9 D4 FF FF E4 DF FF FF F2' - 'EA FF FF FA F0 FF FF FA F0 FF FF FA F0 FF FF F8' - 'EA FF FF F6 E0 FF FF F4 DF FF FF F3 DF FF FF F3' - 'DF FF FF F1 D5 FF FF EF CF FF FF EF CF FF FF EF' - 'CF FF FF EC CA FF FF E8 C0 FF FF E8 C0 FF FF E7' - 'BF FF FF E6 BF FF FF E4 B5 FF FF D8 A5 FF FF C0' - '90 FF EA 96 70 FF E5 89 6A FF EF 9A 80 FF F9 AD' - '89 FF FF BA 8F FF FF C0 8F FF FF C0 7A FF FF BA' - '65 FF FF B0 50 FF FF A9 45 FF F4 8E 3A FF E0 60' - '2F FF F4 9A 4F FF FF B8 60 FF FF B8 60 FF F4 97' - '4A FF E4 79 39 FF D0 5F 2F FF C5 77 5A FF C5 9A' - '8F D8 CF C7 CF 8A E4 E2 E4 3C F0 F0 F0 16 00 00' - '00 00 E6 CA C2 AA F5 D6 D1 FF FF EC EA FF FF F6' - 'F4 FF FF FA F6 FF FF FA F0 FF FF FA F0 FF FF F9' - 'EE FF FF F8 EA FF FF F6 E3 FF FF F4 DF FF FF F3' - 'DF FF FF F2 DB FF FF F1 D6 FF FF EF CF FF FF EF' - 'CF FF FF EE CD FF FF EC C9 FF FF E9 C3 FF FF E7' - 'BF FF FF E7 BF FF FF E6 BB FF FF E0 B3 FF FF D7' - 'A5 FF F8 CA 9A FF F6 C0 95 FF F9 BB 94 FF F6 B3' - '89 FF F1 A7 7D FF EA 96 6F FF EA 96 68 FF ED 9B' - '65 FF F5 A4 65 FF FB A9 68 FF F8 9C 61 FF E9 7A' - '4F FF F7 AC 68 FF FF C2 71 FF FF BD 69 FF FB AB' - '5B FF EF 90 48 FF D9 6A 2F FF CF 72 4C FF C8 8F' - '7E DE C5 C1 C5 9B D4 CF CB 38 DC D6 CF 07 00 00' - '00 00 E6 C6 BB AA F5 D4 CD FF FF F4 F5 FF FF F9' - 'FB FF FF FB FB FF FF FA F5 FF FF FA F1 FF FF FA' - 'F0 FF FF FA F0 FF FF F8 E8 FF FF F6 E3 FF FF F4' - 'DF FF FF F3 DF FF FF F2 DB FF FF F1 D5 FF FF EF' - 'D1 FF FF EF CF FF FF EF CF FF FF EB C8 FF FF E9' - 'C3 FF FF E8 C0 FF FF E7 BF FF FF E6 BB FF FF E4' - 'B5 FF FF E4 B1 FF FF DE AC FF FF D3 A4 FF F8 C5' - '96 FF F1 B4 86 FF EA A0 75 FF EA 9E 75 FF EC 9F' - '75 FF F0 A4 74 FF F6 A3 74 FF F4 97 6B FF E9 7F' - '5A FF F4 A3 6C FF F9 B6 75 FF FA B9 74 FF FD B7' - '6D FF F7 A6 5D FF E9 87 44 FF D8 73 48 FF CB 87' - '73 EB C5 C1 C5 C2 CD C7 C1 41 00 00 00 00 00 00' - '00 00 E6 C3 B5 AA F5 D4 CA FF FF FC FF FF FF FC' - 'FF FF FF FC FF FF FF FC FF FF FF FA F5 FF FF FA' - 'F0 FF FF FA F0 FF FF FA F0 FF FF F8 EA FF FF F6' - 'E0 FF FF F4 DF FF FF F3 DF FF FF F3 DF FF FF F1' - 'D5 FF FF EF CF FF FF EF CF FF FF EF CF FF FF EC' - 'CA FF FF E8 C0 FF FF E8 BF FF FF E7 BF FF FF E6' - 'BF FF FF E4 B5 FF FF E4 B0 FF FF E4 B0 FF FF E4' - 'B0 FF FF E2 AA FF FF DE A0 FF FF D7 A0 FF FA C8' - '95 FF F0 B0 7F FF EF 95 6A FF E9 7F 5A FF DF 6F' - '4F FF E9 7F 5A FF EF 93 6A FF F0 AC 80 FF F9 B9' - '80 FF FF BD 7A FF FF B7 6F FF DF 7D 4F FF CF 82' - '6F FF CF C7 CF FF D0 C8 C4 55 00 00 00 00 00 00' - '00 00 EA CB C3 AA F6 D0 CA FF F5 D8 D4 FF F5 D5' - 'CD FF F8 D8 D1 FF FF E1 DF FF FF E8 E2 FF FF F0' - 'E8 FF FF FA F0 FF FF FA F0 FF FF F9 EE FF FF F8' - 'EA FF FF F4 E2 FF FB E3 D0 FF F5 C5 B4 FF F4 BD' - 'A9 FF F4 BD A8 FF F5 C4 AF FF FB D1 B6 FF FF DB' - 'BC FF FF E2 BF FF FF E6 BF FF FF E7 BF FF FF E7' - 'BF FF FF E6 BB FF FF E4 B6 FF FF E4 B0 FF FF E4' - 'B0 FF FF E3 AE FF FF E2 AA FF FF DD A3 FF FD D6' - '9C FF F9 CE 94 FF F3 AF 7F FF E6 98 76 FF D4 89' - '79 FF DF A4 93 FF E8 B0 9C FF EF AC 94 FF EC 99' - '78 FF EA 8D 65 FF EA 87 59 FF DF 69 41 FF D7 7F' - '64 C6 D0 C8 C4 55 D1 C9 C0 1C 00 00 00 00 00 00' - '00 00 E3 CE C6 71 EA CD C6 AA E6 C8 BF AA EC C0' - 'B4 BB F3 C2 B7 D7 FA CE C7 FF FA D4 CE FF FA DB' - 'D3 FF FA E2 D5 FF FA E4 D8 FF FB E7 DC FF FF EC' - 'E0 FF FB E2 D1 FF F6 D1 BF FF F0 B8 A9 FF E8 B1' - 'A2 C6 E5 B0 A2 AA E6 B7 A9 AA F3 C5 B1 E2 F9 CD' - 'B5 FF F9 D0 B4 FF F9 CE AE FF F9 D0 AE FF FA D6' - 'B4 FF FD D9 B4 FF FF DE B4 FF FF E4 B5 FF FF E4' - 'B1 FF FF E4 B0 FF FF E4 B0 FF FF E1 A8 FF FF DF' - 'A3 FF FF DE A0 FF F5 B9 86 FF E3 A3 82 FF CA 9C' - '94 FF D5 B9 B1 C6 DE C2 B8 AA E5 B6 A9 AA DE 9F' - '8D AA DB 91 7B AA DB 8D 74 AA E1 83 66 E2 DE 97' - '7F AA 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 E6 BF' - 'B4 33 F0 BC B2 88 F2 C2 B8 FF F0 C1 B8 FF F0 BC' - 'B0 FF F0 B4 A0 FF F0 B8 AA FF F5 C1 B4 FF FF D0' - 'C0 FF F5 BD AA FF F0 BC AA FF F0 CD C0 FF DC CB' - 'BF 55 00 00 00 00 00 00 00 00 E6 CC BF A9 EF C4' - 'B5 FF EF B4 A0 FF EF A2 8A FF EF A2 8A FF F0 B4' - 'A0 FF F9 BF A0 FF FF CF AA FF FF E6 BF FF FF E4' - 'B5 FF FF E4 B0 FF FF E4 B0 FF FF E4 B0 FF FF E2' - 'AA FF FF DE A0 FF F5 B4 80 FF E0 A1 7F FF C0 A7' - 'A0 FF CB BE B4 55 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 E5 CC BF A9 E6 CC' - 'BF AA 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 D8 C6' - 'BB 11 DC C5 BA 2D DC C7 BC 55 DC C7 BC 55 DC C5' - 'B9 55 DC C2 B4 55 E9 BC B0 A6 F1 BC B0 C1 F5 C1' - 'B4 A5 F1 BA AD C2 E8 BD B0 A7 DC CB BF 55 D5 CA' - 'BF 1C 00 00 00 00 00 00 00 00 D8 CA BF 38 DB C8' - 'BB 55 DB C2 B4 55 DB BC AD 55 DB BC AD 55 DC C2' - 'B4 55 EC BF AD C6 F4 BA A3 FF F4 B3 95 FF F4 B2' - '91 FF F4 B9 93 FF F5 C6 9A FF FB CF A1 FF FF D9' - 'A7 FF FF E2 AA FF ED A8 7C FF DC 9D 83 FF CA C1' - 'BF FF CF C7 BF 55 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 D8 CA BF 38 D8 CA' - 'BF 38 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 DF C2 B7 51 E6 BF B4 6C E6 BF' - 'B4 50 E5 BE B3 6D DE C2 B7 52 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 DF C2 B7 71 E5 B8 A9 AA E5 A9 94 AA E5 A9' - '94 AA EA B1 9A C6 F5 C0 A4 FF F8 C0 9E FF F8 C2' - '9A FF F4 C7 9A FF E6 9C 77 FF DA 9D 86 E2 D0 CD' - 'CA AA D1 CB C2 38 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 E0 CD C4 54 FF D4 CF FF F4 B6 A5 FF EA 9F' - '85 FF E0 8F 70 FF E0 8F 70 FF DB A2 8A AA 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 D7 CB C0 1C E1 CD C4 55 DD C3 B6 55 DA BB' - 'AB 55 D6 B6 A4 55 D6 B6 A4 55 D5 BC AD 38 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF' - 'FF FF FF FF 00 00 FF FF FF FF FF FF 00 00 FF 00' - '3F FF FF FF 00 00 FF 00 3F FF FF FF 00 00 FF 00' - '07 FF FF FF 00 00 FF 00 00 FF FF FF 00 00 FF 00' - '00 FF FF FF 00 00 FE 00 00 1F FF FF 00 00 FE 00' - '00 03 FF FF 00 00 FE 00 00 03 FF FF 00 00 FE 00' - '00 00 7F FF 00 00 FE 00 00 00 03 FF 00 00 FE 00' - '00 00 03 FF 00 00 F8 00 00 00 00 7F 00 00 F8 00' - '00 00 00 0F 00 00 F8 00 00 00 00 0F 00 00 F8 00' - '00 00 00 0F 00 00 F8 00 00 00 00 07 00 00 F8 00' - '00 00 00 07 00 00 F0 00 00 00 00 07 00 00 F0 00' - '00 00 00 07 00 00 F0 00 00 00 00 07 00 00 F0 00' - '00 00 00 07 00 00 F0 00 00 00 00 07 00 00 F0 00' - '00 00 00 07 00 00 C0 00 00 00 00 01 00 00 C0 00' - '00 00 00 01 00 00 C0 00 00 00 00 01 00 00 C0 00' - '00 00 00 01 00 00 C0 00 00 00 00 01 00 00 C0 00' - '00 00 00 01 00 00 80 00 00 00 00 01 00 00 80 00' - '00 00 00 00 00 00 80 00 00 00 00 00 00 00 80 00' - '00 00 00 00 00 00 80 00 00 00 00 01 00 00 80 00' - '00 00 00 01 00 00 80 00 00 00 00 01 00 00 80 00' - '00 00 00 07 00 00 F0 00 60 00 03 E7 00 00 F0 00' - '60 00 03 E7 00 00 FF C1 FF 80 03 FF 00 00 FF FF' - 'FF F8 0F FF 00 00 FF FF FF F8 0F FF 00 00 FF FF' - 'FF FF FF FF 00 00 FF FF FF FF FF FF 00 00 FF FF' - 'FF FF FF FF 00 00 FF FF FF FF FF FF 00 00 28 00' - '00 00 20 00 00 00 40 00 00 00 01 00 20 00 00 00' - '00 00 00 10 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 F0 C5' - 'BC FF D0 BC BF FF BF B8 BF FF CF C7 CF A5 DF D8' - 'DF 54 F0 EF F0 0F 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 E0 98' - '8F FF E0 84 6F FF D0 84 6F FF BF 98 90 FF B0 B0' - 'B0 FF C0 C0 C0 B7 DF D7 DF 66 EF E8 EF 1E 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 E0 84' - '6F FF F0 BF B0 FF FF DF D0 FF EF 97 80 FF DF 78' - '5F FF BF 90 80 FF B0 AF B0 FF C0 BF C0 C9 D0 D0' - 'D0 78 EF E7 EF 2D 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 F0 C4 BC FF EF 97' - '7F FF EF 9F 8F FF FF FC FF FF FF FC FF FF FF E7' - 'E0 FF F0 A7 8F FF D0 77 5F FF BF 88 7F FF B0 AF' - 'B0 FF BF B8 BF DB D0 CF D0 8A E0 E0 E0 3C 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 EF BF B0 FF FF CD' - 'A0 FF EF 97 80 FF FF FC FF FF FF FC FF FF FF F7' - 'FF FF FF F1 F0 FF F0 DF DF FF EF AD 9F FF DF 77' - '5F FF C0 84 70 FF B0 A7 A0 FF BF B7 BF ED CF C8' - 'CF 9C E0 E0 E0 4B 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 EF A7 90 FF FF D4' - 'A0 FF EF 8F 6F FF FF FC FF FF FF FC FF FF FF F7' - 'FF FF FF F1 F0 FF FF EF F0 FF F0 EF F0 FF F0 DF' - 'E0 FF EF AD 9F FF DF 77 50 FF C0 78 60 FF B0 9F' - '9F FF BF B7 BF FE CF C7 CF AE DF D8 DF 5D 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 EF 9A 80 FF FF E4' - 'B0 FF F0 9F 70 FF FF F1 F0 FF FF F7 FF FF FF F7' - 'FF FF FF F1 F0 FF F0 EF F0 FF F0 EF F0 FF F0 E7' - 'EF FF F0 E2 E0 FF F0 E2 E0 FF E0 AF A0 FF DF 77' - '5F FF CF 6F 50 FF B0 90 8F FF B0 B0 B0 FF C0 C0' - 'C0 C0 DF D7 DF 6F EF E8 EF 26 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 F0 C4 BC FF F0 B8 A0 FF FF DE' - 'A0 FF F0 AC 80 FF FF C5 A0 FF FF C0 80 FF FF DF' - 'CF FF FF F1 F0 FF F0 EF F0 FF F0 EF F0 FF F0 E7' - 'EF FF F0 E2 E0 FF F0 E2 E0 FF EF DF E0 FF EF DF' - 'E0 FF E0 B7 B0 FF DF 78 5F FF CF 67 4F FF BF 87' - '7F FF B0 AF B0 FF C0 BF C0 D2 D0 D0 D0 81 EF E7' - 'EF 35 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 F0 C7 BF FF FF CC B0 FF FF DE' - 'A0 FF F0 B0 80 FF FF BF 9F FF FF B1 5F FF FF A5' - '4F FF FF 9F 50 FF F0 C7 A0 FF F0 EF F0 FF F0 E7' - 'EF FF F0 E2 E0 FF EF DF E0 FF EF DF E0 FF EF DF' - 'E0 FF E0 D7 DF FF E0 D0 D0 FF DF BF BF FF E0 84' - '6F FF D0 5D 3F FF BF 7F 70 FF B0 A7 A0 FF BF B8' - 'BF E4 D0 D0 D0 93 F0 EF F0 2C 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 EF AD 9F FF FF E6 BF FF FF E4' - 'B0 FF FF C0 90 FF F0 B7 90 FF FF C7 7F FF FF B1' - '5F FF FF A5 4F FF F0 97 40 FF F0 90 3F FF F0 AC' - '80 FF F0 D4 CF FF EF DF E0 FF EF DF E0 FF E0 D7' - 'DF FF E0 D7 DF FF E0 D0 D0 FF DF CF D0 FF DF CF' - 'D0 FF DF B7 B0 FF D0 88 70 FF D0 5D 3F FF BF 77' - '60 FF BF AF AF FF DF D8 DF BA 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 F0 A8 90 FF FF E8 C0 FF FF E4' - 'B0 FF FF CC 9F FF F0 A7 80 FF FF CC 80 FF FF B8' - '60 FF FF B1 5F FF FF A5 4F FF F0 97 40 FF EF 80' - '30 FF EF 70 20 FF E0 90 60 FF E0 B8 AF FF E0 D7' - 'DF FF E0 D0 D0 FF E0 CF D0 FF DF CF D0 FF DF CF' - 'D0 FF DF C7 CF FF D0 C0 C0 FF D0 B7 BF FF D0 6F' - '50 FF BF 7F 70 FF CF C8 CF DD F0 F0 F0 2F 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 F4 C5 BC FF F0 C0 AF FF FF E6 BF FF FF E4' - 'B0 FF FF E4 B0 FF F0 A7 80 FF FF DE A0 FF FF C0' - '6F FF FF B8 60 FF FF B1 5F FF FF A5 4F FF F0 97' - '40 FF EF 80 30 FF EF 70 20 FF DF 67 1F FF DF 70' - '3F FF DF A0 8F FF E0 CF D0 FF DF CF D0 FF DF CF' - 'D0 FF DF C7 CF FF D0 C0 C0 FF D0 BF C0 FF D0 9F' - '90 FF C0 6F 50 FF C0 C0 C0 F9 F0 EF F0 46 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 F0 CD C0 FF FF D7 BF FF FF E8 C0 FF FF E6' - 'BF FF FF E4 B0 FF EF 8F 70 FF FF E4 B0 FF FF CC' - '80 FF FF C0 6F FF FF B8 60 FF FF B1 5F FF FF A5' - '4F FF F0 97 40 FF EF 80 30 FF E0 70 20 FF DF 67' - '1F FF D0 58 1F FF D0 57 1F FF D0 84 6F FF DF BF' - 'BF FF DF C7 CF FF D0 C0 C0 FF D0 BF C0 FF D0 B0' - 'B0 FF D0 5D 3F FF BF B7 BF FF EF E8 EF 60 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 EF B4 A0 FF FF EE D0 FF FF E8 C0 FF FF E8' - 'C0 FF FF E6 BF FF F0 A7 80 FF FF E8 C0 FF FF CC' - '80 FF FF CC 80 FF FF C0 6F FF FF B8 60 FF FF B0' - '50 FF FF A5 4F FF F0 97 40 FF EF 80 2F FF E0 70' - '20 FF DF 67 1F FF D0 58 1F FF CF 4F 10 FF CF 45' - '10 FF CF 6F 4F FF D0 A7 9F FF D0 BF C0 FF D0 BC' - 'BF FF D0 5D 3F FF B0 B0 B0 FF E0 DF E0 7C 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 F0 B4 A0 FF FF F3 DF FF FF EF CF FF FF E8' - 'C0 FF FF E8 C0 FF F0 A7 8F FF FF D7 BF FF FF D4' - '90 FF FF CC 80 FF FF CC 80 FF FF C0 6F FF FF B8' - '60 FF FF B1 5F FF FF A5 4F FF FF 97 3F FF EF 80' - '2F FF E0 70 20 FF DF 67 1F FF D0 58 1F FF CF 4F' - '10 FF CF 45 10 FF C0 38 00 FF B0 4F 30 FF C0 84' - '70 FF D0 77 5F FF BF 97 8F FF D0 D0 D0 98 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 F4 C6' - 'BC FF FF C8 BF FF FF F0 D0 FF FF EE D0 FF FF EF' - 'CF FF FF E8 C0 FF F0 B8 9F FF F0 B4 A0 FF FF D7' - 'B0 FF FF DF AF FF FF CF 8F FF FF C7 7F FF FF C0' - '6F FF FF B8 60 FF FF B1 5F FF FF AF 4F FF FF A6' - '40 FF FF 94 30 FF EF 80 2F FF DF 67 1F FF D0 58' - '1F FF CF 4F 10 FF CF 45 10 FF AF 27 00 FF B0 3F' - '10 FF C0 47 1F FF C0 84 70 FF CF C8 CF B3 F0 F0' - 'F0 0B 00 00 00 00 00 00 00 00 00 00 00 00 F0 CF' - 'CF FF FF DF CF FF FF F3 DF FF FF F0 D0 FF FF EE' - 'D0 FF FF EF CF FF FF E7 C0 FF FF C5 A0 FF F0 A7' - '80 FF EF 9A 80 FF FF BF A0 FF FF D4 A0 FF FF D4' - '90 FF FF C0 6F FF FF B8 60 FF FF B1 5F FF FF AF' - '4F FF FF A6 40 FF FF A6 40 FF FF 94 30 FF F0 78' - '20 FF DF 5F 1F FF CF 4F 10 FF AF 27 00 FF C0 4F' - '1F FF C0 47 1F FF C0 6F 5F FF C0 C0 C0 CF F0 EF' - 'F0 23 00 00 00 00 00 00 00 00 00 00 00 00 F0 BF' - 'B0 FF FF F6 E0 FF FF F3 DF FF FF F3 DF FF FF F0' - 'D0 FF FF EE D0 FF FF EF CF FF FF E8 C0 FF FF E8' - 'C0 FF FF D8 B0 FF FF C0 90 FF EF 8F 6F FF EF 9A' - '80 FF FF C5 A0 FF FF CF 8F FF FF B8 60 FF FF B0' - '50 FF FF AF 4F FF FF A6 40 FF FF A6 40 FF FF 9F' - '30 FF FF 8F 2F FF DF 5F 1F FF B0 37 10 FF CF 57' - '1F FF C0 4F 1F FF CF 60 40 FF BF B7 BF EB EF E8' - 'EF 3B 00 00 00 00 00 00 00 00 00 00 00 00 F0 BA' - 'AF FF FF FA F0 FF FF F6 E0 FF FF F3 DF FF FF F3' - 'DF FF FF F0 D0 FF FF EE D0 FF FF EF CF FF FF E8' - 'C0 FF FF E8 C0 FF FF E6 BF FF FF E4 B0 FF FF CD' - 'A0 FF EF 8F 6F FF FF CC B0 FF FF CC 80 FF FF B8' - '60 FF FF B0 50 FF FF AF 4F FF FF A6 40 FF FF A6' - '40 FF FF 9F 30 FF F0 78 2F FF DF 60 2F FF CF 60' - '20 FF CF 57 1F FF D0 54 2F FF B0 B0 B0 FF E0 DF' - 'E0 52 00 00 00 00 00 00 00 00 F4 C6 BC FF FF D0' - 'C0 FF FF FA F0 FF FF FA F0 FF FF F6 E0 FF FF F3' - 'DF FF FF F3 DF FF FF F0 D0 FF FF EE D0 FF FF EF' - 'CF FF FF E8 C0 FF FF E8 C0 FF FF E6 BF FF FF E4' - 'B0 FF FF CD A0 FF E0 8F 70 FF FF D8 B0 FF FF CC' - '80 FF FF B8 60 FF FF B0 50 FF FF AF 4F FF FF A6' - '40 FF FF A6 40 FF F0 6F 2F FF FF 9F 4F FF F0 97' - '40 FF CF 60 20 FF D0 54 2F FF BF 97 8F FF D0 D0' - 'D0 6E 00 00 00 00 00 00 00 00 F0 D4 CF FF FF E4' - 'DF FF FF FA F0 FF FF FA F0 FF FF FA F0 FF FF F6' - 'E0 FF FF F3 DF FF FF F3 DF FF FF F0 D0 FF FF EF' - 'CF FF FF EF CF FF FF E8 C0 FF FF E8 C0 FF FF E6' - 'BF FF FF E4 B0 FF FF C0 90 FF E0 82 60 FF EF 9A' - '80 FF FF B7 8F FF FF C0 8F FF FF C0 70 FF FF B0' - '50 FF FF A6 40 FF E0 60 2F FF FF B8 60 FF FF B8' - '60 FF EF 87 3F FF D0 5F 2F FF C0 84 70 FF CF C7' - 'CF 8A F0 F0 F0 16 00 00 00 00 F0 C7 BF FF FF F1' - 'F0 FF FF FC FF FF FF FA F0 FF FF FA F0 FF FF FA' - 'F0 FF FF F6 E0 FF FF F3 DF FF FF F3 DF FF FF F0' - 'D0 FF FF EF CF FF FF EF CF FF FF E8 C0 FF FF E8' - 'C0 FF FF E6 BF FF FF E4 B0 FF FF E4 B0 FF FF CC' - '9F FF F0 AC 7F FF E0 82 60 FF E0 82 60 FF F0 9F' - '70 FF FF B0 7F FF EF 88 60 FF FF CC 80 FF FF C0' - '6F FF FF B1 5F FF DF 70 30 FF CF 6F 50 FF C0 BF' - 'C0 A5 00 00 00 00 00 00 00 00 F0 C0 B0 FF FF FC' - 'FF FF FF FC FF FF FF FC FF FF FF FA F0 FF FF FA' - 'F0 FF FF FA F0 FF FF F6 E0 FF FF F3 DF FF FF F3' - 'DF FF FF F0 D0 FF FF EF CF FF FF EF CF FF FF E8' - 'C0 FF FF E8 BF FF FF E6 BF FF FF E4 B0 FF FF E4' - 'B0 FF FF E4 B0 FF FF DE A0 FF FF D4 A0 FF F0 B0' - '7F FF EF 88 60 FF DF 6F 4F FF EF 88 60 FF F0 AC' - '80 FF FF C0 80 FF FF B7 6F FF D0 60 40 FF CF C7' - 'CF FF 00 00 00 00 00 00 00 00 FA D3 D0 FF F0 C7' - 'BF FF F0 BF B0 FF FF D4 CF FF FF E4 DF FF FF FA' - 'F0 FF FF FA F0 FF FF FA F0 FF FF F3 DF FF F0 AF' - '9F FF EF 9F 8F FF F0 AF 9F FF FF CC B0 FF FF DF' - 'BF FF FF E8 C0 FF FF E8 BF FF FF E6 BF FF FF E4' - 'B0 FF FF E4 B0 FF FF E4 B0 FF FF DE A0 FF FF DE' - 'A0 FF F0 AC 7F FF CF 97 8F FF E0 C7 C0 FF EF AD' - '9F FF E0 78 60 FF E0 70 4F FF DF 58 30 FF 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 F0 BA AF 4D F2 C2 B8 FF F0 C1 B8 FF F0 B4' - 'A0 FF F0 BA AF FF FF D0 C0 FF F0 B4 A0 FF F0 CD' - 'C0 FF 00 00 00 00 00 00 00 00 F0 CD C0 FF EF B4' - 'A0 FF EF 9A 80 FF F0 B4 A0 FF FF C5 A0 FF FF E6' - 'BF FF FF E4 B0 FF FF E4 B0 FF FF E4 B0 FF FF DE' - 'A0 FF F0 9F 70 FF C0 A7 A0 FF 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 F0 CD C0 FF 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 F0 BA AF B7 F0 BA AF 79 EF B9 AE B9 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 F0 BA AF FF EF 9A' - '80 FF EF 9A 80 FF F0 B7 90 FF FF CD A0 FF FF E4' - 'B0 FF E0 82 60 FF D0 CF D0 FF 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 FF D4 CF FF EF A7 90 FF E0 8F' - '70 FF E0 8F 70 FF 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 FF FF FF FF FF FF FF FF FC 0F' - 'FF FF FC 03 FF FF FC 00 FF FF F8 00 3F FF F8 00' - '0F FF F8 00 03 FF F8 00 00 7F F0 00 00 1F F0 00' - '00 07 F0 00 00 07 F0 00 00 03 E0 00 00 03 E0 00' - '00 03 E0 00 00 03 E0 00 00 03 C0 00 00 01 C0 00' - '00 01 C0 00 00 01 C0 00 00 01 80 00 00 01 80 00' - '00 00 80 00 00 01 80 00 00 01 80 00 00 03 E0 18' - '00 7B FE 3F 80 7F FF FF F0 FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF 28 00 00 00 10 00 00 00 20 00' - '00 00 01 00 20 00 00 00 00 00 00 04 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 D7 C8 BE 01 DD C6 BD 57 CA C1' - 'BF 65 D8 D1 D0 27 DD D7 D1 03 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 D7 B8 AC 03 DF A0 92 D1 E0 AA' - '9B FD CA A2 98 E7 CC C3 C4 98 D6 D1 CF 38 DC D4' - 'D0 06 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 E4 C3 B7 2A F2 AE 94 F8 FC E7' - 'E4 FF FA DF DB FF DD AC A0 FE C9 9F 97 ED C6 BB' - 'B8 AC D2 CC CA 49 D7 D1 CB 08 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 E6 B1 9D 31 F9 C4 99 FD FC E5' - 'E0 FF FF F6 FB FF F7 ED ED FF EE D6 D4 FF DF AA' - '98 FF C8 96 8C F4 C5 B0 B0 BF CD C7 C5 59 DD D5' - 'D3 15 DE D7 D5 01 00 00 00 00 00 00 00 00 00 00' - '00 00 DB C8 BE 02 EA C5 B8 BF FA CF 9C FF FC C1' - '99 FF FF C8 9B FF F3 DD CD FF F0 E6 EA FF EF E0' - 'DF FF EA D0 CF FF DA A3 98 FF CC 8F 83 F8 C4 A8' - 'A2 D0 D3 CB CC 78 DC D8 D2 19 00 00 00 00 00 00' - '00 00 DB C0 B3 03 ED BC A8 D1 FF DD AC FF F7 B8' - '8A FF FF B4 62 FF F7 A2 52 FF EF A1 6B FF EA BC' - 'A8 FF E3 D4 D8 FF E0 D0 D1 FF DF C4 C3 FF D1 9F' - '94 FF C6 85 72 FB D6 CA CB A6 DC D6 D0 05 00 00' - '00 00 E6 C8 BD 2A F6 CD B7 F8 FF E4 B6 FF F5 B6' - '8A FF FF C7 7A FF FF B2 5D FF F6 99 44 FF EB 7B' - '2F FF DE 7A 45 FF D9 9C 85 FF DE C1 C1 FF D3 C0' - 'C2 FF CE 9D 91 FF CA B6 B3 DA E5 E0 DF 10 00 00' - '00 00 E6 BE AD 31 FC E3 C8 FD FF E8 C0 FF F6 BB' - '99 FF FF D1 8F FF FF C3 73 FF FF B2 59 FF F7 99' - '44 FF E7 77 27 FF D7 5F 1F FF D0 59 28 FF C9 7B' - '60 FF C9 94 88 FF C2 A4 9D E7 D7 D3 D1 19 DB C9' - 'C0 03 ED CB C2 BF FF EB D2 FF FF ED CC FF F8 CE' - 'AE FF F9 C2 9B FF FE C7 92 FF FF C5 7A FF FF B3' - '5E FF FD A4 44 FF F3 8B 32 FF DE 65 1E FF C9 45' - '0E FF B8 47 1D FF C2 81 70 F1 E1 DE DC 30 DC C6' - 'BA 04 EE CB BE D1 FF F4 E0 FF FF F1 D6 FF FF EC' - 'CC FF FE E0 BA FF FD CD A3 FF F7 B5 8E FF FD C3' - '8C FF FF B5 59 FF FF AA 46 FF FD 9C 35 FF E2 69' - '24 FF CB 55 1F FF C9 6B 4E FB DC D6 D7 56 E6 CB' - 'C2 3A FA DA D1 F8 FF F9 ED FF FF F4 E0 FF FF F1' - 'D6 FF FF ED CC FF FF E8 C1 FF FF DF B2 FF F3 B3' - '8B FF F8 B5 7E FF FF B5 68 FF FF AA 49 FF F0 7F' - '39 FF F0 96 46 FF CF 68 3F FE D0 C4 C2 7B E7 C8' - 'BD 40 FC EC EB FD FF FA F6 FF FF F9 ED FF FF F4' - 'E0 FF FF F0 D5 FF FF ED CB FF FF E8 C1 FF FE E0' - 'B3 FF FC D0 A1 FF F1 B2 83 FF F2 A7 73 FF ED 8A' - '5E FF F8 B3 71 FF E8 8D 51 FF CB B4 B0 AB E6 CD' - 'C5 25 EB C9 C1 98 F7 D0 C8 EE F8 DC D0 FC FC E3' - 'D4 FD F0 C5 B4 E8 EC C2 B1 A7 F7 CD B1 FA F9 D1' - 'AF FC FF E1 B3 FF FF E2 AD FF FB D0 97 FF D4 A3' - '92 EB DE B3 A3 94 E2 9B 80 A5 DD AC 9A 3F 00 00' - '00 00 D9 C5 BA 02 DE C6 BB 17 E0 C1 B6 2A EA BF' - 'B3 5D DF C4 B8 25 D9 CA BF 05 DD C1 B2 1A E1 C0' - 'B3 30 E8 B9 A5 93 F4 C3 A7 E8 EF B7 8E FA D4 B5' - 'A8 8B D0 C9 C1 01 D9 CA BF 05 D9 CA BF 05 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 DF CA BF 15 D8 B5 A2 1A D6 BA' - 'A9 05 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 C1 FF' - '00 00 C0 7F 00 00 C0 1F 00 00 C0 03 00 00 80 01' - '00 00 80 00 00 00 80 00 00 00 80 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 80 00 00 00 FF C7 00 00 FF FF 00 00 28 00' - '00 00 10 00 00 00 20 00 00 00 01 00 08 00 00 00' - '00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 7F 7F 7F 00 00 99' - '99 00 66 CC CC 00 99 CC FF 00 99 FF FF 00 F8 F8' - 'F8 00 00 00 00 00 E2 69 24 00 E7 77 27 00 EB 7B' - '2F 00 F0 7F 39 00 C7 6B 4E 00 DE 7A 45 00 C9 7B' - '60 00 F3 8B 32 00 FD 9C 35 00 BE 80 70 00 BF 91' - '7F 00 F0 96 46 00 F6 99 44 00 F7 99 44 00 E8 8D' - '51 00 ED 8A 5E 00 FD A4 44 00 FF AA 46 00 FF AA' - '49 00 F7 A2 52 00 FF B2 59 00 FF B5 59 00 FF B2' - '5D 00 FF B3 5E 00 C4 84 72 00 EF A1 6B 00 FF B4' - '62 00 FF B5 68 00 F2 A7 73 00 F8 B3 71 00 F8 B5' - '7E 00 FF C3 73 00 FF C5 7A 00 FF C7 7A 00 96 8A' - '85 00 96 90 8E 00 99 91 8E 00 92 91 90 00 96 95' - '94 00 9F 97 94 00 9A 98 97 00 3C 17 95 00 00 00' - '38 00 A8 44 F9 77 21 00 00 00 B8 0C 38 00 00 00' - '38 00 30 7E 0D 01 14 17 95 00 B1 A2 9F 00 5C 19' - '95 00 00 40 0D 01 68 19 95 00 77 82 F5 77 98 7F' - 'F5 77 3A 8A F5 77 00 04 00 00 C4 A2 AF 00 10 00' - '00 00 10 00 00 00 C9 94 88 00 CD 9A 8E 00 D9 9C' - '85 00 C3 9C 95 00 C2 9E 95 00 CE 9D 91 00 D1 9F' - '94 00 CD A0 90 00 C6 AA 9F 00 DA A3 98 00 DF AA' - '98 00 DF A9 9A 00 DC AB 9F 00 EC B5 8D 00 F1 B2' - '83 00 F3 B3 8B 00 F5 B6 8A 00 F7 B5 8E 00 F7 B8' - '8A 00 EE AC 93 00 F6 BB 99 00 CF B3 A9 00 D9 B0' - 'A0 00 D1 B7 B1 00 D9 BD B2 00 E9 BC A3 00 E5 BE' - 'AF 00 EA BC A8 00 FD C3 8C 00 FF D1 8F 00 FE C7' - '92 00 F8 C3 98 00 F9 C2 9B 00 FC C1 99 00 FF C8' - '9B 00 FA CF 9C 00 FB D0 97 00 FD CD A3 00 F8 CE' - 'AE 00 FC D0 A1 00 F7 D0 AE 00 FF DD AC 00 F4 CB' - 'B0 00 F2 CA B5 00 FF DF B2 00 FF E2 AD 00 FE E0' - 'B3 00 FF E1 B3 00 FF E4 B6 00 FE E0 BA 00 D3 C0' - 'C2 00 A8 01 38 00 10 44 0D 01 40 00 00 00 00 00' - '00 00 A8 01 38 00 38 44 0D 01 38 44 0D 01 E0 D0' - 'D1 00 EE D6 D4 00 E3 D4 D8 00 FA DF DB 00 FB E2' - 'C7 00 FF E8 C0 00 FF E8 C1 00 FF ED CB 00 FF EC' - 'CC 00 08 44 0D 01 08 44 0D 01 FB E2 D3 00 FF EB' - 'D2 00 FF F0 D5 00 FF F1 D6 00 FC E5 E0 00 FC E7' - 'E4 00 F0 E6 EA 00 00 40 0D 01 A4 18 95 00 E5 3A' - 'F8 77 06 00 00 00 08 44 0D 01 00 00 38 00 00 40' - '0D 01 00 00 00 00 78 19 95 00 CA 8C F5 77 78 01' - '38 00 BE 8E F5 77 08 06 38 00 37 90 F5 77 08 40' - '0D 01 08 40 0D 01 40 00 00 00 40 00 00 00 D0 BB' - 'BB 00 E0 B2 A5 00 EE BD A2 00 E3 B4 AA 00 E4 BB' - 'AF 00 F1 B6 A7 00 F6 BE A2 00 F0 BA AB 00 E5 BE' - 'B3 00 EC BC B0 00 00 40 0D 01 00 40 0D 01 F4 C4' - '97 00 78 01 38 00 08 40 0D 01 E0 07 0D 01 E8 07' - '0D 01 78 01 38 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 F5 C8 AA 00 00 40 0D 01 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 E9 C2' - 'B7 00 08 04 00 00 87 00 00 00 08 04 00 00 08 01' - '00 00 00 00 00 00 00 00 00 00 00 00 01 01 00 00' - '38 00 BC 18 95 00 C0 18 95 00 B0 19 95 00 F0 88' - 'FA 77 88 1C F5 77 FF FF FF FF 37 90 F5 77 81 E9' - '49 00 00 00 38 00 00 00 00 00 08 40 0D 01 08 40' - '0D 01 A4 1A 95 00 40 00 00 00 40 00 00 00 B8 10' - 'E9 77 FF FF FF FF C9 F1 E7 77 16 EA 4B 00 F8 00' - '00 00 B4 1A 95 00 DC E3 49 00 E0 A3 4E 00 FF FF' - 'FF FF 10 00 00 00 10 DA 4B 00 08 40 0D 01 71 CC' - '43 00 08 40 0D 01 30 7E 0D 01 A4 1A 95 00 C4 A2' - 'AF 00 C4 F5 AF 00 02 00 00 00 30 7E 0D 01 0F 02' - '00 00 48 40 0D 01 10 00 00 00 00 00 00 00 20 00' - '00 00 08 40 0D 01 40 00 00 00 10 00 00 00 00 01' - '00 00 00 04 00 00 00 00 00 00 00 00 00 00 10 00' - '00 00 10 00 00 00 28 00 00 00 10 00 00 00 20 00' - '00 00 01 00 20 00 00 00 00 00 00 04 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 07 07 07 07 07 07 07' - '07 07 07 07 07 07 00 00 02 02 02 02 02 02 02 02' - '02 02 02 02 07 07 00 00 02 06 04 05 04 05 04 04' - '04 04 03 02 07 07 00 02 06 05 05 04 05 04 05 04' - '04 04 03 07 02 07 00 02 06 05 05 05 05 05 04 05' - '04 04 02 07 02 07 02 06 05 05 05 05 04 05 05 04' - '05 03 07 03 03 07 02 06 05 05 05 05 05 05 04 05' - '04 03 07 03 03 07 02 02 02 02 02 02 02 02 02 02' - '02 02 03 05 03 07 00 02 06 05 05 05 05 05 05 05' - '05 05 05 05 03 07 00 02 06 05 05 05 05 05 05 05' - '06 06 06 06 03 07 00 02 06 05 05 05 05 05 06 02' - '02 02 02 02 02 00 00 00 02 06 06 06 06 06 02 00' - '00 00 00 00 00 00 00 00 00 02 02 02 02 02 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 FF FF 00 00 FF FF 00 00 E0 00' - '00 00 C0 00 00 00 C0 00 00 00 80 00 00 00 80 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 00' - '00 00 80 00 00 00 80 01 00 00 C0 7F 00 00 E0 FF' - '00 00 FF FF 00 00' -} */ - -/* BINRES floppy.ico */ -5 ICON floppy.ico -/* { - '00 00 01 00 09 00 20 20 00 00 01 00 08 00 A8 08' - '00 00 96 00 00 00 10 10 00 00 01 00 08 00 68 05' - '00 00 3E 09 00 00 10 10 00 00 01 00 04 00 28 01' - '00 00 A6 0E 00 00 20 20 00 00 01 00 04 00 E8 02' - '00 00 CE 0F 00 00 30 30 00 00 01 00 08 00 A8 0E' - '00 00 B6 12 00 00 30 30 00 00 01 00 04 00 68 06' - '00 00 5E 21 00 00 30 30 00 00 01 00 20 00 A8 25' - '00 00 C6 27 00 00 20 20 00 00 01 00 20 00 A8 10' - '00 00 6E 4D 00 00 10 10 00 00 01 00 20 00 68 04' - '00 00 16 5E 00 00 28 00 00 00 20 00 00 00 40 00' - '00 00 01 00 08 00 00 00 00 00 00 04 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 01 01 01 00 02 02 02 00 04 04 04 00 05 05' - '05 00 07 07 07 00 09 09 09 00 0A 0A 0A 00 0C 0C' - '0C 00 0D 0D 0D 00 10 10 10 00 12 12 12 00 13 13' - '13 00 15 15 15 00 16 16 16 00 17 17 17 00 18 18' - '18 00 19 19 19 00 1B 1B 1B 00 1C 1C 1C 00 1E 1E' - '1E 00 1F 1F 1F 00 20 20 20 00 21 21 21 00 23 23' - '23 00 24 24 24 00 25 25 25 00 26 26 26 00 27 27' - '27 00 28 28 24 00 2A 2A 25 00 28 28 28 00 2A 2A' - '2A 00 2B 2B 2B 00 2C 2C 2C 00 2E 2E 2E 00 32 32' - '32 00 33 33 33 00 34 34 34 00 35 35 35 00 37 37' - '37 00 3B 3B 3B 00 3C 3C 3C 00 3D 3D 3D 00 3F 3F' - '3F 00 40 40 40 00 44 44 44 00 45 45 45 00 46 46' - '46 00 47 47 47 00 48 48 48 00 49 49 49 00 4B 4B' - '4B 00 4C 4C 4C 00 4E 4E 4E 00 50 50 50 00 52 52' - '52 00 57 57 57 00 59 59 59 00 5E 5E 5E 00 61 61' - '61 00 64 64 64 00 65 65 65 00 6A 6A 6A 00 7F 60' - '60 00 71 71 71 00 77 77 77 00 79 79 79 00 7F 7F' - '7F 00 D5 40 40 00 00 C0 00 00 00 FF 00 00 87 80' - '7D 00 8B 86 84 00 8A 8A 8A 00 8C 8C 8C 00 8D 8D' - '8D 00 8E 8E 8E 00 97 97 97 00 99 99 99 00 9A 9A' - '9A 00 9E 9E 9E 00 A3 A3 9E 00 A4 A4 A4 00 A7 A7' - 'A7 00 AA AA AA 00 AB AB AB 00 AD A8 AB 00 AE AE' - 'AE 00 AF AF AF 00 B0 B0 B0 00 B2 B2 B2 00 B5 B5' - 'B5 00 B6 B6 B6 00 B7 B7 B7 00 BB BB BB 00 BC BC' - 'BC 00 BD BD BD 00 BF BF BF 00 EA 80 80 00 CA A8' - '94 00 CC AF 9D 00 E9 B6 99 00 E9 B8 9C 00 CE B6' - 'A6 00 D0 B3 A3 00 EB BE A5 00 D2 C3 B9 00 EC C0' - 'A7 00 EF CC B8 00 C2 C2 C2 00 C4 C4 C4 00 C5 C5' - 'C5 00 C6 C6 C6 00 C8 C9 C9 00 C9 C9 C9 00 CA CA' - 'CA 00 CB CB CB 00 CC CC CC 00 CD CD CD 00 CF CF' - 'CF 00 D5 CB C4 00 D0 D0 D0 00 D1 D1 D1 00 D2 D2' - 'D2 00 D3 D3 D3 00 D4 D4 D4 00 D5 D5 D5 00 D6 D6' - 'D6 00 D7 D7 D7 00 D8 D8 D8 00 D9 D9 D9 00 DA DA' - 'D8 00 DB DB DB 00 DC DC DC 00 DD DD DD 00 DE DE' - 'DE 00 DF DF DF 00 F1 D2 C2 00 F2 D6 C7 00 F4 DD' - 'D0 00 E0 E0 E0 00 E1 E1 E1 00 E2 E2 E2 00 E3 E3' - 'E3 00 E4 E4 E4 00 E5 E5 E5 00 E6 E6 E6 00 E7 E7' - 'E7 00 E8 E8 E8 00 E9 E9 E9 00 EA EA EA 00 EB EB' - 'EB 00 EC EC EC 00 ED ED ED 00 F0 F0 F0 00 F2 F2' - 'F2 00 F3 F3 F3 00 F9 F9 F9 00 FA FA FA 00 FF FF' - 'FF 00 00 00 00 00 01 00 00 00 18 00 00 00 00 00' - '00 00 10 19 95 00 42 00 00 00 00 00 00 00 F4 18' - '95 00 00 00 00 00 00 00 00 00 00 00 00 00 0C 00' - '00 00 02 00 00 00 01 01 F5 77 00 EC FD 7F 56 00' - '00 00 00 00 00 00 03 00 00 00 5E 00 1A 02 40 9F' - '07 00 00 00 00 00 40 9F 07 00 05 00 00 00 BE B3' - 'E7 77 4C 19 95 00 A3 B4 E7 77 F8 00 00 00 00 00' - '00 C0 00 00 00 00 00 00 00 00 02 00 00 00 80 00' - '00 00 00 00 00 00 8C 1A 95 00 7F E9 4B 00 08 6C' - '0C 01 00 00 00 C0 00 00 00 00 80 1A 95 00 02 00' - '00 00 80 00 00 00 00 00 00 00 C0 27 95 00 C4 F5' - 'AF 00 02 00 00 00 44 3A 5C 6F 73 65 78 70 65 72' - '74 73 5C 72 65 61 63 74 6F 73 5C 6C 69 62 5C 73' - '68 65 6C 6C 33 32 5C 66 6C 6F 70 70 79 2E 69 63' - '6F 00 1A 93 4B 00 14 1A 95 00 1F 3B D4 77 15 00' - '00 00 A8 00 00 00 4F 3B D4 77 E0 19 95 00 33 3B' - 'D4 77 64 C5 F5 77 A9 F1 E7 77 F8 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 1A 95 00 B0 6C' - '38 00 96 00 00 00 00 00 00 00 C9 F1 E7 77 96 00' - '00 00 A4 1A 95 00 09 00 00 00 00 00 00 00 96 00' - '00 00 96 00 00 00 09 00 00 00 F4 19 95 00 33 3B' - 'D4 77 B4 1A 95 00 09 48 E9 77 B8 10 E9 77 FF FF' - 'FF FF C9 F1 E7 77 16 EA 4B 00 F8 00 00 00 B0 6C' - '38 00 96 00 00 00 58 1A 95 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 2A 2A 2A 2A 40 40 40 40 40 40 40 40 40 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 4B 4B 4B 4B A1 A1 A1 A1 A1 A1 A1 A1 A1 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 1D 00 4B 08 45 45 45 45 45 45 45 45 45 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 1E A1 A1 08 63 63 63 63 63 63 63 63 63 00 A1' - 'A1 A1 A1 A1 A1 A1 A1 A1 A1 A1 A1 A1 A1 A1 A1 A1' - 'A1 03 08 0A 10 9A 94 94 94 94 94 94 94 94 00 A1' - 'A1 17 22 22 21 21 21 21 21 21 21 20 20 20 20 20' - '20 08 08 10 0F 99 94 4F 4F 4F 4F 4F 4F 4F A1 01' - '4A 98 95 95 7E 46 94 95 90 82 7C 77 77 77 72 55' - '23 A1 A1 15 10 97 93 95 95 97 97 98 98 99 A1 11' - '57 98 95 95 47 47 46 89 7F 7C 75 77 77 77 77 2D' - '23 A1 A1 0D 0C 96 94 4F 4F 4F 4F 4F 4F 4F A1 1F' - '7B 98 98 95 95 47 5C 5D 29 29 29 29 29 29 29 5D' - '5D A1 A1 07 09 95 94 90 90 91 91 93 93 94 A1 1F' - '7B 95 98 95 A1 A1 A1 A1 A1 A1 A1 A1 A1 A1 A1 A1' - 'A1 19 15 05 07 92 94 4F 4F 4F 4F 4F 4F 4F A1 1C' - '7C 97 98 98 54 56 58 59 59 59 59 56 56 56 56 56' - '56 24 08 A1 A1 92 92 94 94 96 96 97 97 98 A1 1B' - '7D 98 9A 96 95 91 8F 86 82 7C 7C 7A 7A 7A 7A 7A' - '7A 28 02 03 03 A1 A1 A1 A1 A1 A1 A1 A1 A1 A1 19' - '80 96 8E 8F 8D 89 89 89 8D 8D 8D 8D 8D 8D 8D 8D' - '8D 2C 09 0B 0E 17 1B 2A 2E 30 30 22 22 22 A1 19' - '88 83 6F 62 82 83 83 83 83 83 83 83 83 83 83 83' - '83 2E 18 12 16 21 27 2E 31 30 30 22 22 22 A1 04' - '6E 60 5B 56 5F 7F 7F 7E 7D 7F 81 82 81 7D 7D 7E' - '7F 34 35 23 25 2F 2E 34 34 2A 24 1A 13 0E 00 A1' - '53 78 70 62 73 7C 7A 7A 7A 7F 7F 7F 7F 7F 7A 7E' - '7A 38 39 27 2C 4B 4B 4B 4B 4B 4B 4B 4B 4B 00 A1' - '3A 7A 77 77 74 7D 7D 7E 7F 80 80 80 80 80 7F 85' - '91 3B 3B 3F 2E 4D A0 49 48 69 6C 66 66 66 00 A1' - '2D 7C 74 74 7E 7D 7D 7C 7C 7C 7C 7D 7C 7D 7C 7B' - '7A 3B 3B 3F 2E 4D A0 49 48 69 6C 66 66 66 00 A1' - '05 87 76 7D 7D 7A 7A 7A 7A 7D 7D 7D 7D 7D 7D 7D' - '7D 3E 3F 41 43 51 A0 38 36 8B 6D 67 66 66 00 A1' - 'A1 87 78 7D 7D 7A 7A 7A 7A 7A 78 7D 7D 7D 7D 7D' - '7D 2A 3F 41 43 55 A0 37 35 8C 8A 6A 66 66 00 A1' - 'A1 82 7E 7D 7D 7D 7D 7D 7D 7D 7D 7D 7D 7D 7D 7D' - '7D A1 A1 A1 A1 52 84 84 84 79 6B 68 65 64 00 A1' - 'A1 76 80 7D 7D 80 80 80 80 80 80 80 7D 7D 7D 76' - '73 6F 6E 61 7A 06 A1 00 00 00 00 00 00 00 00 A1' - 'A1 4E 86 86 88 88 87 87 87 87 87 87 87 87 87 87' - '87 94 94 86 71 A1 A1 00 00 00 00 00 00 00 00 00' - 'A1 42 7D 8E 88 88 88 8D 8D 8D 8D 8D 8D 8D 8D 8E' - '8E 94 94 83 5F A1 A1 00 00 00 00 00 00 00 00 00' - 'A1 27 61 93 93 94 98 98 98 98 98 98 98 98 98 94' - '94 94 93 7E 50 A1 A1 00 00 00 00 00 00 00 00 00' - 'A1 14 56 9A 94 99 98 9A 98 98 98 98 98 98 98 98' - '99 92 98 80 4A A1 A1 00 00 00 00 00 00 00 00 00' - '00 A1 4C 6F 5B 5B 98 9B 9B 9B 9B 9B 9B 9B 9B 9D' - '7F 5D 5E 77 3C A1 A1 00 00 00 00 00 00 00 00 00' - '00 A1 3D 87 86 91 9E 9E 9E 9E 9E 9E 9E 9E 9E 9F' - '9C 82 86 5A 26 A1 00 00 00 00 00 00 00 00 00 00' - '00 A1 A1 2B 33 32 32 32 32 32 32 32 32 32 32 32' - '32 33 33 02 A1 00 00 00 00 00 00 00 00 00 00 00' - '00 A1 A1 A1 A1 A1 A1 A1 A1 A1 A1 A1 A1 A1 A1 A1' - 'A1 A1 A1 A1 A1 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF' - 'FF FF FF FF E0 00 FF FF E0 00 FF FF E8 00 FF FF' - 'E0 00 80 00 00 00 80 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 00' - '00 00 80 00 00 00 80 00 00 00 80 00 00 00 80 00' - '00 00 80 00 00 00 80 00 00 7F 80 00 00 7F C0 00' - '00 7F C0 00 00 7F C0 00 00 7F E0 00 00 7F E0 00' - '00 FF E0 00 01 FF E0 00 01 FF FF FF FF FF 28 00' - '00 00 10 00 00 00 20 00 00 00 01 00 08 00 00 00' - '00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 01 01 00 00 01 01' - '01 00 03 06 04 00 05 05 05 00 09 09 09 00 0A 0C' - '0C 00 08 0D 0F 00 13 13 13 00 15 15 15 00 16 16' - '15 00 17 17 17 00 18 18 18 00 19 19 19 00 1D 1D' - '1D 00 1E 1E 1E 00 31 0A 0B 00 1A 1E 20 00 35 19' - '35 00 21 21 21 00 29 23 23 00 30 2A 30 00 31 31' - '31 00 32 33 33 00 34 34 34 00 35 35 35 00 36 36' - '36 00 39 39 39 00 3A 3A 3B 00 3B 3B 3B 00 7A 00' - '00 00 4E 3E 3E 00 3F 41 42 00 44 44 44 00 46 46' - '46 00 4B 4B 4B 00 50 52 52 00 57 57 57 00 59 59' - '59 00 5C 5C 5C 00 5E 5E 5E 00 65 6A 68 00 69 69' - '69 00 6E 6E 6E 00 6F 6E 6E 00 77 6E 69 00 7E 69' - '69 00 72 72 72 00 75 75 75 00 79 73 79 00 79 79' - '79 00 7B 7B 7B 00 7F 7F 7F 00 83 00 00 00 88 70' - '70 00 00 FF 00 00 75 99 75 00 97 97 97 00 9B 9B' - '9B 00 A5 A5 A5 00 A6 A6 A6 00 A8 A2 A8 00 A8 A8' - 'A8 00 A9 A9 A9 00 AF AF AF 00 B8 AC B8 00 B2 B2' - 'B2 00 ED B7 97 00 C0 AE A4 00 DB B7 A2 00 DC B7' - 'A2 00 B7 E6 B7 00 FB C6 A8 00 F9 C7 AB 00 C0 C0' - 'C0 00 C1 C2 C2 00 C2 C2 C2 00 C3 C3 C3 00 C6 CD' - 'CD 00 C7 CE CE 00 C9 C9 C9 00 CA CA CA 00 C8 CF' - 'CF 00 CC CC CC 00 CE CE CE 00 D0 D0 D0 00 D1 D1' - 'D1 00 D2 D2 D2 00 D3 D3 D3 00 D4 D4 D4 00 D5 D5' - 'D5 00 D6 D6 D6 00 D7 D7 D7 00 DE D8 D3 00 D8 D8' - 'D8 00 D9 D9 D9 00 DA DA DA 00 DE DE DE 00 FF C9' - 'C9 00 FF D7 D7 00 FF E3 D0 00 DF E6 E6 00 E0 E0' - 'E0 00 E1 E1 E1 00 E2 E2 E2 00 E4 E4 E4 00 E5 E5' - 'E5 00 E6 E6 E6 00 E8 E3 E1 00 E8 E8 E8 00 E9 E9' - 'E9 00 EA EA EA 00 EB EB EB 00 ED ED ED 00 F3 F3' - 'F3 00 F4 F4 F4 00 F5 F5 F5 00 F6 F6 F6 00 FF F2' - 'FF 00 F9 F9 F9 00 FA FA FA 00 FB FB FB 00 FB FC' - 'FC 00 FC FC FC 00 FF FD FE 00 FE FE FE 00 FF FF' - 'FF 00 00 00 00 00 D6 D6 D6 00 D7 D7 D7 00 D8 D8' - 'D8 00 D9 D9 D9 00 DA DA D8 00 DB DB DB 00 DC DC' - 'DC 00 DD DD DD 00 DE DE DE 00 DF DF DF 00 F1 D2' - 'C2 00 F2 D6 C7 00 F4 DD D0 00 E0 E0 E0 00 E1 E1' - 'E1 00 E2 E2 E2 00 E3 E3 E3 00 E4 E4 E4 00 E5 E5' - 'E5 00 E6 E6 E6 00 E7 E7 E7 00 E8 E8 E8 00 E9 E9' - 'E9 00 EA EA EA 00 EB EB EB 00 EC EC EC 00 ED ED' - 'ED 00 F0 F0 F0 00 F2 F2 F2 00 F3 F3 F3 00 F9 F9' - 'F9 00 FA FA FA 00 FF FF FF 00 00 00 00 00 01 00' - '00 00 18 00 00 00 00 00 00 00 10 19 95 00 42 00' - '00 00 00 00 00 00 F4 18 95 00 00 00 00 00 00 00' - '00 00 00 00 00 00 0C 00 00 00 02 00 00 00 01 01' - 'F5 77 00 EC FD 7F 56 00 00 00 00 00 00 00 03 00' - '00 00 5E 00 1A 02 40 9F 07 00 00 00 00 00 40 9F' - '07 00 05 00 00 00 BE B3 E7 77 4C 19 95 00 A3 B4' - 'E7 77 F8 00 00 00 00 00 00 C0 00 00 00 00 00 00' - '00 00 02 00 00 00 80 00 00 00 00 00 00 00 8C 1A' - '95 00 7F E9 4B 00 08 6C 0C 01 00 00 00 C0 00 00' - '00 00 80 1A 95 00 02 00 00 00 80 00 00 00 00 00' - '00 00 C0 27 95 00 C4 F5 AF 00 02 00 00 00 44 3A' - '5C 6F 73 65 78 70 65 72 74 73 5C 72 65 61 63 74' - '6F 73 5C 6C 69 62 5C 73 68 65 6C 6C 33 32 5C 66' - '6C 6F 70 70 79 2E 69 63 6F 00 1A 93 4B 00 14 1A' - '95 00 1F 3B D4 77 15 00 00 00 A8 00 00 00 4F 3B' - 'D4 77 E0 19 95 00 33 3B D4 77 64 C5 F5 77 A9 F1' - 'E7 77 F8 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 1A 95 00 B0 6C 38 00 96 00 00 00 00 00' - '00 00 C9 F1 E7 77 96 00 00 00 A4 1A 95 00 09 00' - '00 00 00 00 00 00 96 00 00 00 96 00 00 00 09 00' - '00 00 F4 19 95 00 33 3B D4 77 B4 1A 95 00 09 48' - 'E9 77 B8 10 E9 77 FF FF FF FF C9 F1 E7 77 16 EA' - '4B 00 F8 00 00 00 B0 6C 38 00 96 00 00 00 58 1A' - '95 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '06 14 36 2E 2E 2E 00 00 00 00 00 00 00 00 00 0A' - '29 10 35 1E 1E 1E 00 7F 7F 7F 7F 7F 7F 7F 7F 01' - '03 1F 63 62 62 62 7F 2C 3D 38 41 40 3E 3C 3F 0D' - '05 24 65 4E 4F 52 7F 7C 76 37 47 31 33 32 42 08' - '7F 23 6B 51 53 53 7F 7D 7D 12 15 19 19 18 19 13' - '7F 23 7D 66 68 69 7F 7E 72 7D 77 75 72 72 7E 28' - '7F 02 7F 0B 0C 04 7F 7B 3B 58 5B 5A 5C 5B 69 25' - '0F 16 1C 20 11 07 7F 5C 54 54 57 59 5A 5A 67 27' - '25 17 6C 44 46 45 7F 3A 57 58 55 55 56 57 66 26' - '2F 22 4B 2D 48 43 00 2A 61 55 55 55 56 57 67 1D' - '0E 21 7A 5D 64 49 00 1B 71 60 5E 5F 5F 5E 5E 6A' - '71 30 7F 00 00 00 00 04 72 6F 6D 6B 6A 6A 69 70' - '75 1A 00 00 00 00 00 7F 6E 50 77 75 73 74 78 54' - '79 09 00 00 00 00 00 7F 2B 4A 4D 4C 4C 4C 4C 4A' - '39 7F 00 00 00 00 00 00 7F 7F 7F 7F 7F 7F 7F 7F' - '7F 00 00 00 00 00 FF C0 00 00 FF 80 00 00 80 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 00' - '00 00 80 07 00 00 80 0F 00 00 80 0F 00 00 80 0F' - '00 00 C0 1F 00 00 28 00 00 00 10 00 00 00 20 00' - '00 00 01 00 04 00 00 00 00 00 80 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 80 00 00 00 00 80 00 00 80 80 00 00 00 00' - '80 00 80 00 80 00 00 80 80 00 C0 C0 C0 00 80 80' - '80 00 FF 00 00 00 00 FF 00 00 FF FF 00 00 00 00' - 'FF 00 FF 00 FF 00 00 FF FF 00 FF FF FF 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 80 00 00 00 00' - '00 00 00 09 99 99 00 00 00 00 00 0F FF FF 0F FA' - '77 77 00 0F 88 88 0F F0 00 00 00 0F FF FF 0F F7' - '77 77 70 00 00 00 07 77 77 77 70 00 00 00 07 77' - '77 77 70 08 88 88 07 77 77 77 70 08 87 77 07 77' - '77 77 70 07 8F 77 07 77 77 77 77 70 00 00 08 77' - '77 77 77 70 00 00 00 77 77 77 77 70 00 00 00 77' - '77 77 77 70 00 00 00 00 00 00 00 00 00 00 FF 80' - '00 00 FF 80 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 07 00 00 80 07' - '00 00 80 07 00 00 80 0F 00 00 80 0F 00 00 28 00' - '00 00 20 00 00 00 40 00 00 00 01 00 04 00 00 00' - '00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 80 00 00 00 00 80' - '00 00 80 80 00 00 00 00 80 00 80 00 80 00 00 80' - '80 00 C0 C0 C0 00 80 80 80 00 FF 00 00 00 00 FF' - '00 00 FF FF 00 00 00 00 FF 00 FF 00 FF 00 00 FF' - 'FF 00 FF FF FF 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 08 88 88 88 88 00 00 00 00 00 00 00 00 00 08' - '88 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '08 09 99 99 99 99 00 00 00 00 00 00 00 00 00 00' - '00 07 77 77 77 77 00 00 00 00 00 00 00 00 00 00' - '00 0F FF FF FF FF 00 00 00 00 00 00 00 00 00 00' - '00 0F F8 88 88 88 00 8F FF 7A FF F7 77 77 77 00' - '00 0F FF FF FF FF 00 7F FF AA A7 77 77 77 70 00' - '00 0F F8 88 88 88 00 7F FF FA 77 00 00 00 07 70' - '00 0F FF FF FF FF 00 7F FF 00 00 00 00 00 00 00' - '00 0F F8 88 88 88 00 7F FF 77 77 77 77 77 77 70' - '00 0F FF FF FF FF 00 7F FF 77 77 77 77 77 77 70' - '00 00 00 00 00 00 00 7F FF FF FF FF FF FF FF F0' - '00 00 00 88 80 00 00 77 77 77 77 77 77 77 77 78' - '00 00 08 88 80 00 00 77 77 77 77 77 77 77 77 78' - '80 08 88 80 00 00 00 77 77 77 77 77 77 77 77 78' - '80 08 88 88 88 88 00 87 77 77 77 77 77 77 77 78' - '88 88 F8 87 77 77 00 07 77 77 77 77 77 77 77 78' - '88 88 F8 87 77 77 00 07 77 77 77 77 77 77 77 78' - '88 88 F8 87 77 77 00 07 77 77 77 77 77 77 77 70' - '88 87 F8 8F 77 77 00 07 77 77 77 77 77 77 77 70' - '00 07 77 77 77 77 00 07 77 77 77 77 77 77 77 77' - '77 70 00 00 00 00 00 08 77 77 77 77 77 77 77 77' - '77 70 00 00 00 00 00 08 77 77 77 77 77 77 77 77' - '77 70 00 00 00 00 00 00 77 77 77 77 77 77 77 77' - '77 80 00 00 00 00 00 00 77 77 77 77 77 77 77 77' - '77 80 00 00 00 00 00 00 87 77 77 77 77 77 77 77' - '77 80 00 00 00 00 00 00 87 77 77 77 77 77 77 77' - '77 00 00 00 00 00 00 00 00 88 88 88 88 88 88 88' - '80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 FF FF E0 00 FF FF E0 00 FF FF' - 'E0 00 FF FF E8 00 E0 00 00 00 80 00 00 00 80 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 80 00 00 00 80 00 00 00 80 00' - '00 00 80 00 00 00 80 00 00 00 80 00 00 00 80 00' - '00 3F 80 00 00 7F C0 00 00 7F C0 00 00 7F C0 00' - '00 7F E0 00 00 7F E0 00 00 FF E0 00 00 FF E0 00' - '01 FF FF FF FF FF 28 00 00 00 30 00 00 00 60 00' - '00 00 01 00 08 00 00 00 00 00 00 09 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 01 01 01 00 02 02 02 00 03 03 03 00 04 04' - '04 00 05 05 05 00 06 06 06 00 07 07 07 00 08 08' - '08 00 09 09 09 00 0A 0A 0A 00 0B 0B 0B 00 0C 0C' - '0C 00 0D 0D 0D 00 0E 0E 0E 00 10 10 10 00 11 11' - '11 00 12 12 10 00 12 12 12 00 13 13 13 00 14 14' - '14 00 15 15 15 00 16 16 14 00 16 16 16 00 17 17' - '17 00 18 18 18 00 19 19 19 00 1B 1B 1B 00 1C 1C' - '1C 00 1E 1E 1E 00 1F 1F 1F 00 22 22 1F 00 20 20' - '20 00 21 21 21 00 22 22 22 00 23 23 23 00 24 24' - '24 00 25 25 25 00 26 26 26 00 27 27 27 00 28 28' - '24 00 2A 2A 25 00 2B 2B 26 00 28 28 28 00 29 29' - '29 00 2A 2A 2A 00 2B 2B 2B 00 2C 2C 2C 00 2E 2E' - '2E 00 2F 2F 2F 00 30 30 2C 00 30 30 30 00 32 32' - '32 00 33 33 33 00 36 36 30 00 34 34 34 00 35 35' - '35 00 36 36 36 00 37 37 37 00 39 39 39 00 3B 3B' - '3B 00 3C 3C 3C 00 3D 3D 3D 00 3F 3F 3F 00 40 40' - '40 00 41 41 41 00 42 42 42 00 43 43 43 00 44 44' - '44 00 45 45 45 00 46 46 46 00 47 47 47 00 48 48' - '48 00 49 49 49 00 4A 4A 4A 00 4B 4B 4B 00 4C 4C' - '4C 00 4E 4E 4E 00 4F 4F 4F 00 50 50 50 00 52 52' - '52 00 53 53 53 00 54 54 54 00 57 57 57 00 5B 58' - '57 00 59 59 59 00 5D 5D 5D 00 5E 5E 5E 00 5F 5F' - '5F 00 61 61 61 00 64 64 64 00 65 65 65 00 66 66' - '66 00 6D 6A 67 00 6A 6A 6A 00 7F 60 60 00 71 71' - '71 00 75 75 75 00 77 77 77 00 7B 77 75 00 79 79' - '79 00 7A 7A 7A 00 7E 7E 7E 00 7F 7F 7F 00 C0 00' - '00 00 83 7A 75 00 D5 40 40 00 00 C0 00 00 00 FF' - '00 00 87 80 7D 00 80 80 80 00 83 83 83 00 84 84' - '84 00 8B 86 84 00 8A 8A 8A 00 8C 8C 8C 00 8D 8D' - '8D 00 8E 8E 8E 00 90 90 90 00 93 93 93 00 97 97' - '97 00 99 99 99 00 9A 9A 9A 00 9E 9E 9E 00 9F 9F' - '9F 00 A3 A3 9E 00 A4 A4 A4 00 A6 A6 A6 00 A7 A7' - 'A7 00 A8 A8 A8 00 A9 A9 A9 00 AA AA AA 00 AB AB' - 'AB 00 AD A8 AB 00 AB AC AC 00 AD AD AD 00 AE AE' - 'AE 00 AF AF AF 00 B0 B0 B0 00 B1 B1 B1 00 B2 B2' - 'B2 00 B3 B3 B3 00 B5 B5 B5 00 B6 B6 B6 00 B7 B7' - 'B7 00 B8 B4 B6 00 B8 B6 B6 00 B8 B8 B8 00 BA BA' - 'BA 00 BB BB BB 00 BC BC BC 00 BD BD BD 00 BE BE' - 'BE 00 BF BF BF 00 EA 80 80 00 CA A8 94 00 CC AF' - '9D 00 E9 B6 99 00 E9 B8 9C 00 CE B6 A6 00 D0 B3' - 'A3 00 D0 BC B0 00 EA BB A0 00 EA BC A1 00 EB BE' - 'A5 00 D2 C3 B9 00 EC C0 A7 00 EC C2 AA 00 ED C5' - 'AE 00 ED C6 AF 00 EE C8 B3 00 EF CC B8 00 F0 CF' - 'BC 00 F0 D0 BE 00 C0 C0 C0 00 C1 C1 C1 00 C2 C2' - 'C2 00 C3 C3 C3 00 C4 C4 C4 00 C5 C5 C5 00 C6 C6' - 'C6 00 C8 C8 C8 00 C8 C9 C9 00 C9 C9 C9 00 CA CA' - 'CA 00 CB CB CB 00 CC CC CC 00 CD CD CD 00 CE CE' - 'CE 00 CF CF CF 00 D5 CB C4 00 D0 CB C8 00 D7 D2' - 'CE 00 D9 D1 CC 00 D0 D0 D0 00 D1 D1 D1 00 D2 D2' - 'D2 00 D3 D3 D3 00 D4 D4 D4 00 D5 D5 D5 00 D6 D6' - 'D6 00 D7 D7 D7 00 DC D9 D7 00 D8 D8 D8 00 D9 D9' - 'D9 00 DA DA D8 00 DA DA DA 00 DB DB DB 00 DC DC' - 'DC 00 DD DD DD 00 DE DE DE 00 DF DF DF 00 FF C0' - 'C0 00 F1 D2 C2 00 F2 D6 C7 00 F3 D9 CB 00 F4 DD' - 'D0 00 F6 E4 D9 00 E0 E0 E0 00 E1 E1 E1 00 E2 E2' - 'E2 00 E3 E3 E3 00 E4 E4 E4 00 E5 E5 E5 00 E6 E6' - 'E6 00 E7 E7 E7 00 E8 E8 E8 00 E9 E9 E9 00 EA EA' - 'EA 00 EB EB EB 00 EC EC EC 00 ED ED ED 00 EE EE' - 'EE 00 EF EF EF 00 F9 EE E8 00 F0 F0 F0 00 F1 F1' - 'F1 00 F2 F2 F2 00 F3 F3 F3 00 F4 F4 F4 00 F5 F5' - 'F5 00 F6 F6 F6 00 F7 F7 F7 00 FD F9 F7 00 F8 F8' - 'F8 00 F9 F9 F9 00 FA FA FA 00 FF FF FF 00 00 00' - '00 00 C9 F1 E7 77 16 EA 4B 00 F8 00 00 00 B0 6C' - '38 00 96 00 00 00 58 1A 95 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 F8 F8 F8 F8 F8 F8' - 'F8 D4 D4 D4 D4 D4 D4 D4 D4 D4 D4 D4 D4 D4 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 F8 3D 3D 3D 3D 3D' - 'F8 5F 5F 5F 5F 5F 5F 5F 5F 5F 5F 5F 5F 5F 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 F8 73 73 73 73 73' - 'F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 F8 16 36 36 1F 04' - 'F8 68 68 68 68 68 68 68 68 68 68 68 68 68 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 F8 28 00 00 73 0C' - 'F8 6A 6A 6A 6A 6A 6A 6A 6A 6A 6A 6A 6A 6A 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 F8 29 F8 F8 F8 0C' - 'F8 9A 9A 9A 9A 9A 9A 9A 9A 9A 9A 9A 9A 9A 00 00' - '00 00 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8' - 'F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 11 2A 32 1F 0F' - 'F8 D4 D4 D4 D4 D4 D4 D4 D4 D4 D4 D4 D4 D4 00 00' - 'F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8' - 'F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 04 0C 0C 0F 19' - 'F8 E7 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 00 F8' - 'F8 F8 F8 21 2F 2E 2F 2E 2E 2E 2E 2E 2E 2E 2E 2E' - '2E 2E 2D 2D 2D 2D 2D 2D 2D 2D F8 0C 0C 0F 19 18' - 'F8 E6 E1 79 79 79 79 79 79 79 79 79 79 79 00 F8' - 'F8 26 76 91 87 86 85 BB BA B9 B7 B2 B1 B0 B0 B1' - 'AE AF 99 99 96 97 94 97 97 97 F8 0C 0F 19 19 1D' - 'F8 E5 CF DA DA DA DB DB DB DC DD DD DD DE F8 F8' - '01 72 85 E5 E2 E2 E2 C6 6B 6B E1 E2 E2 DD D1 CB' - 'C4 BB BB BB BB BB B6 BB 83 30 F8 F8 F8 19 1E 19' - 'F8 E4 E0 E1 E2 E2 E3 E4 E4 E4 E5 E5 E5 E6 F8 F8' - '1A 85 E5 E5 E2 E2 E2 6C 6C 6C 6B DB D3 C7 BA C4' - 'B9 BB BB BB BB BB BB BB 40 30 F8 F8 F8 1E 15 13' - 'F8 E3 E1 79 79 79 79 79 79 79 79 79 79 79 F8 F8' - '2C 85 E4 E5 E5 E2 E2 6C 6C 6C 6C B9 B5 5C 5C 5C' - '5C 5C 5C 5C 5C 5C 5C BB 77 40 F8 F8 F8 F8 0E 0F' - 'F8 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 F8 F8' - '2B C3 E6 E5 E5 E2 E2 E2 6C 6C 8E 8E 8F 3C 3C 3C' - '3C 3C 3C 3C 3C 3C 3C 8F 8F 8F F8 F8 F8 F8 0A 0D' - 'F8 E2 E1 DD DD DD DD DE DE DF E0 E0 E0 E1 F8 F8' - '2B C3 E8 E2 E5 E2 E2 F8 F8 F8 F8 F8 F8 F8 F8 F8' - 'F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 24 1E 05 07 0A' - 'F8 DF E1 79 79 79 79 79 79 79 79 79 79 79 F8 F8' - '27 C3 E9 E5 E5 E5 E5 6E 3C 3C 3C 3C 3C 3C 3C 3C' - '3C 3C 3C 3C 3C 3C 3C 3C 3C 3C F8 2E 10 02 03 03' - 'F8 D0 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 F8 F8' - '27 C4 ED E4 E5 E5 E5 80 80 84 88 8A 89 89 89 89' - '89 89 84 84 84 84 84 84 84 84 F8 34 0C F8 F8 F8' - 'F8 DF DF E0 E1 E1 E2 E3 E3 E3 E4 E4 E4 E5 F8 F8' - '26 C5 EE E5 E7 E5 E3 E2 E0 DE DC CF D0 CB CC C4' - 'C4 BD C2 C2 C2 C2 C2 C2 C2 C2 F8 3A 02 03 04 04' - 'F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8' - '26 C5 F2 F4 F1 F1 F1 F0 F0 EF EF EE EE EE ED ED' - 'EC EC EC EB EB EB E9 E9 E8 E8 F8 3A 07 09 0B 0D' - '0F 13 1A 1D 27 37 42 46 46 46 46 2F 2F 2F F8 F8' - '24 C8 F7 E3 DB DC DC DA D3 D3 D3 D3 D3 DA DA DA' - 'DA DA DA DA DA DA DA DA DA DA F8 3F 0D 10 12 17' - '1B 21 26 33 3D 44 47 46 46 46 2F 2F 2F 2F F8 F8' - '24 D2 F4 CC B2 95 99 CB CE CC CC CC CC CC CC CC' - 'CC CC CC CC CC CC CC CC CC CC F8 44 23 18 1B 20' - '27 2E 38 40 44 47 4A 46 46 2F 2F 2F 2F 2F F8 F8' - '1E CE EE B4 82 90 8A B1 CE CB CB CB CB CB C9 C9' - 'C9 C9 C9 C9 C9 C9 CB CB CB CB F8 4B 30 1E 25 2E' - '31 3B 43 44 47 4B 49 42 39 2F 23 1C 1C 14 F8 F8' - '05 B0 F1 96 8C B1 84 95 CB C7 C7 C7 C6 C5 C5 C7' - 'C9 CB CB C9 C7 C5 C5 C5 C6 C7 F8 4B 4C 27 30 35' - '3D 45 44 47 4B 4B 45 3D 34 2D 25 1C 1C 17 00 F8' - 'F8 7E EF BD B3 C4 99 B7 C5 C4 C2 C5 C2 C2 C7 C7' - 'C7 C7 C7 C7 C7 C7 C2 C2 C6 C2 F8 50 53 3D 38 3F' - 'F8 73 73 73 73 73 73 73 73 73 73 73 73 73 00 F8' - 'F8 66 E9 C3 BD B9 BD C3 BC BD C7 C7 C7 C7 C7 C7' - 'C7 C7 C7 C7 C7 C7 C7 C7 C7 DB F8 53 57 56 49 45' - 'F8 70 F3 EA D9 D7 AC A8 A2 9D 9D 9D 9D 9D 00 F8' - 'F8 55 E3 C2 BB BB BB B8 C5 C5 C5 C5 C6 C7 C8 C8' - 'C8 C8 C8 C8 C8 C8 C7 C7 CF DE F8 57 57 5B 5E 44' - 'F8 75 F7 BF 71 6D 69 A0 A6 9D 9D 9D 9D 9D 00 F8' - 'F8 40 C9 C4 B8 B9 B8 C6 C5 C5 C5 C3 C4 C4 C4 C4' - 'C4 C4 C5 C4 C5 C5 C4 C4 C3 C2 F8 57 57 5B 5E 44' - 'F8 75 F7 BF 71 6D 69 A0 A6 9D 9D 9D 9D 9D 00 F8' - 'F8 22 90 CF B8 B9 BC C5 C5 BD C3 C2 C2 C2 C2 BD' - 'C5 C5 BC C5 C5 C5 C5 C5 C5 BC F8 57 5B 5E 5E 60' - 'F8 78 F7 92 52 4E 54 AD A9 A3 9D 9D 9D 9D 00 F8' - 'F8 07 7C D1 BA BB C5 C5 C5 C2 C2 C2 C2 C2 C2 C5' - 'C5 C5 C5 C5 C5 C5 C5 C5 C5 C5 F8 5B 5B 5E 60 64' - 'F8 7B F7 89 50 4D 5D D6 AB A7 9E 9D 9D 9D 00 00' - 'F8 F8 6F D1 BD C3 C5 C5 C2 C2 C2 C2 C2 C2 C2 C2' - 'BD C5 C5 C5 C5 C5 C5 C5 C5 C5 F8 5B 5B 5E 64 64' - '3D 83 F7 7F 4F 4C 63 D8 D5 AA A4 9D 9D 9D 00 00' - 'F8 F8 58 D0 C3 C4 C5 C5 C3 C3 C3 C3 C3 C3 C3 C3' - 'C3 C5 C5 C5 C5 C5 C5 C5 C5 C5 F8 5E 60 64 66 66' - 'F8 8B F7 DA D3 CA C1 D9 D7 AC A8 A2 A2 9D 00 00' - 'F8 F8 41 CB C6 C4 C5 C5 C5 C5 C5 C5 C5 C5 C5 C5' - 'C5 C5 C5 C5 C5 C5 C5 C5 C5 C5 F8 F8 F8 F8 F8 F8' - 'F8 7D CD CD CD CD C0 BE A5 A1 9F 9C 9C 9B 00 00' - 'F8 F8 2F BA C8 C7 C5 C5 C8 C8 C8 C8 C8 C8 C8 C8' - 'C8 C8 C8 C5 C5 C5 C5 C5 BA B7 B4 B2 B0 8D 97 C2' - '79 09 F8 F8 00 00 00 00 00 00 00 00 00 00 00 00' - 'F8 F8 19 8A CF CF D2 D2 D2 CC CE CE CE CE CE CE' - 'CE CE CE CE D1 D1 D1 D1 D1 CE D1 D1 E1 CC BA B8' - '65 02 F8 F8 00 00 00 00 00 00 00 00 00 00 00 00' - 'F8 F8 08 78 D0 D3 D0 D2 D2 D2 D1 D1 D1 D1 D1 D1' - 'D1 D1 D1 D1 D1 D1 D1 D1 D1 D1 E1 E1 E1 D1 D0 B4' - '51 F8 F8 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 F8 F8 62 C5 DC DB D2 D2 D2 D2 D2 DA DA DA DA' - 'DA DA DA DA DA DA DA DA DB DB E1 E1 E1 DD CC 95' - '3B F8 F8 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 F8 F8 4B B7 DF DD DE E5 E5 E5 E5 E5 E5 DE DE' - 'DE DE DE DE DE DE DF DF E1 E1 E1 E1 DE E0 C8 81' - '20 F8 F8 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 F8 F8 38 97 E0 E0 E0 E1 E1 E5 E5 E5 E5 E5 E5' - 'E5 E5 E5 E5 E5 E5 E5 E1 E1 E1 E1 E1 E0 E2 C6 7A' - '0B F8 F8 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 F8 F8 1D 84 DE E7 E1 E0 E6 E5 E4 E7 E5 E5 E5' - 'E5 E5 E5 E5 E5 E5 E5 E5 E5 E6 E4 DF E5 E5 C8 72' - 'F8 F8 F8 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 F8 F8 08 79 DE D3 97 AF C8 E6 E7 E7 E8 E8 E7' - 'E6 E5 E5 E6 E7 E8 E8 E7 E8 DE B0 98 C3 E6 C6 61' - 'F8 F8 F8 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 F8 F8 74 DA B2 8C 93 8C E5 EC EB EB EB EB' - 'EB EB EB EB EB EB EB EB EE C7 8A 8F 90 E5 BB 59' - 'F8 F8 F8 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 F8 F8 5A BC D1 D0 C7 DE F5 F5 F5 F5 F5 F5' - 'F5 F5 F5 F5 F5 F5 F5 F5 F6 ED D3 CB D0 C9 8A 37' - 'F8 F8 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 F8 F8 1A 6E 98 C5 C9 CF CB CB CB CB CB CB' - 'CB CB CB CB CB CB CB CB CB CC CC C9 BB 8A 56 06' - 'F8 F8 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 F8 F8 F8 0C 3E 49 48 48 48 48 48 48 48 48' - '48 48 48 48 48 48 48 48 48 48 48 49 49 31 02 F8' - 'F8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8' - 'F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8' - 'F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF' - 'FF FF FF FF 00 00 FF FF FF F0 00 00 00 00 FF FF' - 'FF F0 00 00 00 00 FF FF FF F0 00 00 00 00 FF FF' - 'FF F0 00 00 00 00 FF FF FF F3 00 00 00 00 FF FF' - 'FF F0 00 00 00 00 F0 00 00 00 00 00 00 00 C0 00' - '00 00 00 00 00 00 80 00 00 00 00 00 00 00 80 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 00' - '00 00 00 00 00 00 80 00 00 00 00 00 00 00 80 00' - '00 00 00 00 00 00 80 00 00 00 00 00 00 00 80 00' - '00 00 00 00 00 00 80 00 00 00 00 00 00 00 C0 00' - '00 00 00 00 00 00 C0 00 00 00 00 00 00 00 C0 00' - '00 00 00 00 00 00 C0 00 00 00 03 FF 00 00 C0 00' - '00 00 03 FF 00 00 C0 00 00 00 07 FF 00 00 E0 00' - '00 00 07 FF 00 00 E0 00 00 00 07 FF 00 00 E0 00' - '00 00 07 FF 00 00 E0 00 00 00 07 FF 00 00 E0 00' - '00 00 07 FF 00 00 F0 00 00 00 07 FF 00 00 F0 00' - '00 00 0F FF 00 00 F0 00 00 00 0F FF 00 00 F0 00' - '00 00 1F FF 00 00 F8 00 00 00 3F FF 00 00 FE 00' - '00 00 7F FF 00 00 FF FF FF FF FF FF 00 00 28 00' - '00 00 30 00 00 00 60 00 00 00 01 00 04 00 00 00' - '00 00 80 04 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 80 00 00 00 00 80' - '00 00 80 80 00 00 00 00 80 00 80 00 80 00 00 80' - '80 00 C0 C0 C0 00 80 80 80 00 FF 00 00 00 00 FF' - '00 00 FF FF 00 00 00 00 FF 00 FF 00 FF 00 00 FF' - 'FF 00 FF FF FF 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 07' - '77 77 77 77 77 77 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 08 88 88 88 88 88 88 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 08 88 88 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 09 99 99 99 99 99 99 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 09' - '99 99 99 99 99 99 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 07 77 77 77 77 77 77 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 07' - '77 77 77 77 77 77 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 0F FF FF FF FF FF FF 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0F' - 'F8 88 88 88 88 88 00 00 87 77 77 77 77 77 77 77' - '77 77 77 77 00 00 00 0F 7F FF FF FF FF FF 00 08' - '7F FF F7 AA FF FF 77 77 77 77 77 70 00 00 00 0F' - 'FF FF FF FF FF FF 00 07 FF FF FA AA AF 77 77 77' - '77 77 77 00 00 00 00 0F F8 88 88 88 88 88 00 07' - 'FF FF FA AA A7 78 88 88 88 88 87 80 00 00 00 0F' - 'FF FF FF FF FF FF 00 07 FF FF FF AA 77 70 00 00' - '00 00 07 77 00 00 00 0F FF FF FF FF FF FF 00 07' - 'FF FF F0 00 00 00 00 00 00 00 00 00 00 00 00 0F' - 'F8 88 88 88 88 88 00 07 FF FF F8 00 00 00 00 00' - '00 00 00 00 00 00 00 07 FF FF FF FF FF FF 00 07' - 'FF FF F7 77 77 77 77 77 77 77 77 77 00 00 00 0F' - 'FF FF FF FF FF FF 00 07 FF FF FF FF F7 77 77 77' - '77 77 77 77 00 00 00 00 00 00 00 00 00 00 00 07' - 'FF FF FF FF FF FF FF FF FF FF FF FF 00 00 00 00' - '00 00 88 88 80 00 00 07 F7 7F FF 77 77 7F FF FF' - 'FF FF FF FF 00 00 00 00 00 08 88 88 00 00 00 07' - '77 77 77 77 77 77 77 77 77 7F 77 F7 08 00 00 00' - '00 88 88 80 00 00 00 07 F7 77 77 77 77 77 77 77' - '77 77 77 77 08 00 00 00 88 88 88 00 00 00 00 07' - '77 77 77 77 77 77 77 77 77 77 77 77 08 80 00 08' - '88 88 80 00 00 00 00 07 77 77 77 77 77 77 77 77' - '77 77 77 77 08 80 00 08 88 88 88 88 88 88 00 08' - '77 77 77 77 77 77 77 77 77 77 77 77 08 88 88 08' - 'FF F7 77 77 77 77 00 08 77 77 77 77 77 77 77 77' - '77 77 77 77 08 88 88 08 F7 88 87 77 77 77 00 00' - '77 77 77 77 77 77 77 77 77 77 77 77 08 88 88 08' - 'F7 88 87 77 77 77 00 00 77 77 77 77 77 77 77 77' - '77 77 77 77 08 88 88 08 F7 88 87 77 77 77 00 00' - '87 77 77 77 77 77 77 77 77 77 77 77 08 88 88 08' - 'F7 88 87 77 77 77 00 00 87 77 77 77 77 77 77 77' - '77 77 77 77 08 88 88 07 F7 88 8F 77 77 77 00 00' - '87 77 77 77 77 77 77 77 77 77 77 77 08 88 88 07' - 'FF 77 7F 77 77 77 00 00 87 77 77 77 77 77 77 77' - '77 77 77 77 00 00 00 07 77 77 77 77 77 77 00 00' - '07 77 77 77 77 77 77 77 77 77 77 77 77 77 77 80' - '00 00 00 00 00 00 00 00 07 77 77 77 77 77 77 77' - '77 77 77 77 77 77 77 80 00 00 00 00 00 00 00 00' - '08 77 77 77 77 77 77 77 77 77 77 77 77 77 77 80' - '00 00 00 00 00 00 00 00 08 77 77 77 77 77 77 77' - '77 77 77 77 77 77 77 00 00 00 00 00 00 00 00 00' - '08 77 77 77 77 77 77 77 77 77 77 77 77 77 77 00' - '00 00 00 00 00 00 00 00 00 77 77 77 77 77 77 77' - '77 77 77 77 77 77 77 00 00 00 00 00 00 00 00 00' - '00 77 77 77 77 77 77 77 77 77 77 77 77 77 77 00' - '00 00 00 00 00 00 00 00 00 87 77 77 77 77 77 77' - '77 77 77 77 77 77 78 00 00 00 00 00 00 00 00 00' - '00 87 77 77 77 77 77 77 77 77 77 77 77 77 78 00' - '00 00 00 00 00 00 00 00 00 87 77 77 77 77 77 77' - '77 77 77 77 77 77 70 00 00 00 00 00 00 00 00 00' - '00 08 77 77 77 77 77 77 77 77 77 77 77 77 80 00' - '00 00 00 00 00 00 00 00 00 00 08 88 88 88 88 88' - '88 88 88 88 88 80 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 FF FF FF FF FF FF 00 00 FF FF' - 'FF F0 00 00 00 00 FF FF FF F0 00 00 00 00 FF FF' - 'FF F0 00 00 00 00 FF FF FF F0 00 00 00 00 FF FF' - 'FF F3 00 00 00 00 FF FF FF F0 00 00 00 00 F0 00' - '00 00 00 00 00 00 C0 00 00 00 00 00 00 00 80 00' - '00 00 00 00 00 00 80 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 80 00 00 00 00 00 00 00 80 00' - '00 00 00 00 00 00 80 00 00 00 00 00 00 00 80 00' - '00 00 00 00 00 00 80 00 00 00 00 00 00 00 80 00' - '00 00 00 00 00 00 C0 00 00 00 00 00 00 00 C0 00' - '00 00 00 00 00 00 C0 00 00 00 00 00 00 00 C0 00' - '00 00 03 FF 00 00 C0 00 00 00 03 FF 00 00 C0 00' - '00 00 07 FF 00 00 E0 00 00 00 07 FF 00 00 E0 00' - '00 00 07 FF 00 00 E0 00 00 00 07 FF 00 00 E0 00' - '00 00 07 FF 00 00 E0 00 00 00 07 FF 00 00 F0 00' - '00 00 07 FF 00 00 F0 00 00 00 0F FF 00 00 F0 00' - '00 00 0F FF 00 00 F0 00 00 00 1F FF 00 00 F8 00' - '00 00 3F FF 00 00 FE 00 00 00 7F FF 00 00 FF FF' - 'FF FF FF FF 00 00 28 00 00 00 30 00 00 00 60 00' - '00 00 01 00 20 00 00 00 00 00 00 24 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 24 00 00 00 6C 00 00 00 90 00 00 00 90 00 00' - '00 90 00 00 00 90 00 00 00 90 00 00 00 90 00 00' - '00 90 00 00 00 90 00 00 00 90 00 00 00 90 00 00' - '00 90 00 00 00 90 00 00 00 90 00 00 00 90 00 00' - '00 90 00 00 00 90 00 00 00 90 00 00 00 90 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF FF C0 C0 FF FF C0' - 'C0 FF FF C0 C0 FF FF C0 C0 FF FF C0 C0 FF FF C0' - 'C0 FF FF C0 C0 FF FF C0 C0 FF FF C0 C0 FF FF C0' - 'C0 FF FF C0 C0 FF FF C0 C0 FF FF C0 C0 FF 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 FF 3C 3C 3C FF 3C 3C 3C FF 3C 3C 3C FF 3C 3C' - '3C FF 3C 3C 3C FF 00 00 00 FF 7F 60 60 FF 7F 60' - '60 FF 7F 60 60 FF 7F 60 60 FF 7F 60 60 FF 7F 60' - '60 FF 7F 60 60 FF 7F 60 60 FF 7F 60 60 FF 7F 60' - '60 FF 7F 60 60 FF 7F 60 60 FF 7F 60 60 FF 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 FF 8C 8C 8C FF 8C 8C 8C FF 8C 8C 8C FF 8C 8C' - '8C FF 8C 8C 8C FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 FF 16 16 14 FF 36 36 30 FF 36 36 30 FF 22 22' - '1F FF 04 04 04 FF 00 00 00 FF C0 00 00 FF C0 00' - '00 FF C0 00 00 FF C0 00 00 FF C0 00 00 FF C0 00' - '00 FF C0 00 00 FF C0 00 00 FF C0 00 00 FF C0 00' - '00 FF C0 00 00 FF C0 00 00 FF C0 00 00 FF 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 FF 28 28 24 FF 00 00 00 B4 00 00 00 9C 8C 8C' - '8C FF 0C 0C 0C FF 00 00 00 FF D5 40 40 FF D5 40' - '40 FF D5 40 40 FF D5 40 40 FF D5 40 40 FF D5 40' - '40 FF D5 40 40 FF D5 40 40 FF D5 40 40 FF D5 40' - '40 FF D5 40 40 FF D5 40 40 FF D5 40 40 FF 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 FF 2A 2A 25 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 0C 0C 0C FF 00 00 00 FF EA 80 80 FF EA 80' - '80 FF EA 80 80 FF EA 80 80 FF EA 80 80 FF EA 80' - '80 FF EA 80 80 FF EA 80 80 FF EA 80 80 FF EA 80' - '80 FF EA 80 80 FF EA 80 80 FF EA 80 80 FF 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 16 00 00 00 34 00 00 00 37 00 00 00 37 00 00' - '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' - '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' - '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' - '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' - '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' - '00 FF 12 12 10 FF 2B 2B 26 FF 30 30 2C FF 22 22' - '1F FF 10 10 10 FF 00 00 00 FF FF C0 C0 FF FF C0' - 'C0 FF FF C0 C0 FF FF C0 C0 FF FF C0 C0 FF FF C0' - 'C0 FF FF C0 C0 FF FF C0 C0 FF FF C0 C0 FF FF C0' - 'C0 FF FF C0 C0 FF FF C0 C0 FF FF C0 C0 FF 00 00' - '00 00 00 00 00 00 00 00 00 05 00 00 00 69 00 00' - '00 C5 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' - '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' - '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' - '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' - '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' - '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' - '00 FF 04 04 04 FF 0C 0C 0C FF 0C 0C 0C FF 10 10' - '10 FF 18 18 18 FF 00 00 00 FF ED ED ED FF E7 E7' - 'E7 FF E7 E7 E7 FF E7 E7 E7 FF E7 E7 E7 FF E7 E7' - 'E7 FF E7 E7 E7 FF E7 E7 E7 FF E7 E7 E7 FF E7 E7' - 'E7 FF E7 E7 E7 FF E7 E7 E7 FF E7 E7 E7 FF 00 00' - '00 00 00 00 00 05 00 00 00 9B 00 00 00 FF 00 00' - '00 FF 21 21 21 FF 2C 2C 2C FF 2B 2B 2B FF 2C 2C' - '2C FF 2B 2B 2B FF 2B 2B 2B FF 2B 2B 2B FF 2B 2B' - '2B FF 2B 2B 2B FF 2B 2B 2B FF 2B 2B 2B FF 2B 2B' - '2B FF 2B 2B 2B FF 2B 2B 2B FF 2B 2B 2B FF 2A 2A' - '2A FF 2A 2A 2A FF 2A 2A 2A FF 2A 2A 2A FF 2A 2A' - '2A FF 2A 2A 2A FF 2A 2A 2A FF 2A 2A 2A FF 00 00' - '00 FF 0C 0C 0C FF 0C 0C 0C FF 10 10 10 FF 18 18' - '18 FF 17 17 17 FF 00 00 00 FF EC EC EC FF E7 E7' - 'E7 FF 99 99 99 FF 99 99 99 FF 99 99 99 FF 99 99' - '99 FF 99 99 99 FF 99 99 99 FF 99 99 99 FF 99 99' - '99 FF 99 99 99 FF 99 99 99 FF 99 99 99 FF 00 00' - '00 00 00 00 00 54 00 00 00 FF 26 26 26 FF 90 90' - '90 FF B8 B4 B6 FF AD AD AD FF AB AC AC FF AD A8' - 'AB FF CD CD CD FF CC CC CC FF CB CB CB FF C9 C9' - 'C9 FF C4 C4 C4 FF C3 C3 C3 FF C2 C2 C2 FF C2 C2' - 'C2 FF C3 C3 C3 FF C0 C0 C0 FF C1 C1 C1 FF BF BF' - 'BF FF BF BF BF FF BC BC BC FF BD BD BD FF BA BA' - 'BA FF BD BD BD FF BD BD BD FF BD BD BD FF 00 00' - '00 FF 0C 0C 0C FF 10 10 10 FF 18 18 18 FF 18 18' - '18 FF 1E 1E 1E FF 00 00 00 FF EB EB EB FF DB DB' - 'DB FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E1 E1' - 'E1 FF E1 E1 E1 FF E1 E1 E1 FF E2 E2 E2 FF E3 E3' - 'E3 FF E3 E3 E3 FF E3 E3 E3 FF E4 E4 E4 FF 00 00' - '00 03 00 00 00 AD 01 01 01 FF 8A 8A 8A FF AD A8' - 'AB FF EB EB EB FF E8 E8 E8 FF E8 E8 E8 FF E8 E8' - 'E8 FF D4 D4 D4 FF 00 C0 00 FF 00 C0 00 FF E7 E7' - 'E7 FF E8 E8 E8 FF E8 E8 E8 FF E3 E3 E3 FF DD DD' - 'DD FF D8 D8 D8 FF D2 D2 D2 FF CD CD CD FF CD CD' - 'CD FF CD CD CD FF CD CD CD FF CD CD CD FF C8 C9' - 'C9 FF CD CD CD FF AA AA AA FF 2E 2E 2E FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 18 18 18 FF 1F 1F' - '1F FF 18 18 18 FF 00 00 00 FF EA EA EA FF E6 E6' - 'E6 FF E7 E7 E7 FF E8 E8 E8 FF E8 E8 E8 FF E9 E9' - 'E9 FF EA EA EA FF EA EA EA FF EA EA EA FF EB EB' - 'EB FF EB EB EB FF EB EB EB FF EC EC EC FF 00 00' - '00 15 00 00 00 F0 19 19 19 FF AD A8 AB FF EB EB' - 'EB FF EB EB EB FF E8 E8 E8 FF E8 E8 E8 FF E8 E8' - 'E8 FF 00 FF 00 FF 00 FF 00 FF 00 FF 00 FF 00 C0' - '00 FF E1 E1 E1 FF DF DF DF FF D5 D5 D5 FF CC CC' - 'CC FF D2 D2 D2 FF CB CB CB FF CD CD CD FF CD CD' - 'CD FF CD CD CD FF CD CD CD FF CD CD CD FF CD CD' - 'CD FF CD CD CD FF 40 40 40 FF 2E 2E 2E FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 1F 1F 1F FF 15 15' - '15 FF 13 13 13 FF 00 00 00 FF E9 E9 E9 FF E7 E7' - 'E7 FF 99 99 99 FF 99 99 99 FF 99 99 99 FF 99 99' - '99 FF 99 99 99 FF 99 99 99 FF 99 99 99 FF 99 99' - '99 FF 99 99 99 FF 99 99 99 FF 99 99 99 FF 00 00' - '00 30 00 00 00 FA 29 29 29 FF AD A8 AB FF EA EA' - 'EA FF EB EB EB FF EB EB EB FF E8 E8 E8 FF E8 E8' - 'E8 FF 00 FF 00 FF 00 FF 00 FF 00 FF 00 FF 00 FF' - '00 FF CB CB CB FF C8 C8 C8 FF 66 66 66 FF 66 66' - '66 FF 66 66 66 FF 66 66 66 FF 66 66 66 FF 66 66' - '66 FF 66 66 66 FF 66 66 66 FF 66 66 66 FF 66 66' - '66 FF CD CD CD FF 93 93 93 FF 40 40 40 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 0E 0E' - '0E FF 10 10 10 FF 00 00 00 FF E7 E7 E7 FF E7 E7' - 'E7 FF E7 E7 E7 FF E7 E7 E7 FF E7 E7 E7 FF E7 E7' - 'E7 FF E7 E7 E7 FF E7 E7 E7 FF E7 E7 E7 FF E7 E7' - 'E7 FF E7 E7 E7 FF E7 E7 E7 FF E7 E7 E7 FF 00 00' - '00 34 00 00 00 F9 28 28 28 FF D1 D1 D1 FF EC EC' - 'EC FF EB EB EB FF EB EB EB FF E8 E8 E8 FF E8 E8' - 'E8 FF E8 E8 E8 FF 00 FF 00 FF 00 FF 00 FF B5 B5' - 'B5 FF B5 B5 B5 FF B6 B6 B6 FF 3B 3B 3B FF 3B 3B' - '3B FF 3B 3B 3B FF 3B 3B 3B FF 3B 3B 3B FF 3B 3B' - '3B FF 3B 3B 3B FF 3B 3B 3B FF 3B 3B 3B FF 3B 3B' - '3B FF B6 B6 B6 FF B6 B6 B6 FF B6 B6 B6 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 0A 0A' - '0A FF 0D 0D 0D FF 00 00 00 FF E8 E8 E8 FF E7 E7' - 'E7 FF E3 E3 E3 FF E3 E3 E3 FF E3 E3 E3 FF E3 E3' - 'E3 FF E4 E4 E4 FF E4 E4 E4 FF E5 E5 E5 FF E6 E6' - 'E6 FF E6 E6 E6 FF E6 E6 E6 FF E7 E7 E7 FF 00 00' - '00 33 00 00 00 F9 28 28 28 FF D1 D1 D1 FF EE EE' - 'EE FF E8 E8 E8 FF EB EB EB FF E8 E8 E8 FF E8 E8' - 'E8 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 24 24 24 FF 1F 1F 1F FF 05 05 05 FF 07 07' - '07 FF 0A 0A 0A FF 00 00 00 FF E5 E5 E5 FF E7 E7' - 'E7 FF 99 99 99 FF 99 99 99 FF 99 99 99 FF 99 99' - '99 FF 99 99 99 FF 99 99 99 FF 99 99 99 FF 99 99' - '99 FF 99 99 99 FF 99 99 99 FF 99 99 99 FF 00 00' - '00 33 00 00 00 F9 27 27 27 FF D1 D1 D1 FF EF EF' - 'EF FF EB EB EB FF EB EB EB FF EB EB EB FF EB EB' - 'EB FF 80 80 80 FF 3B 3B 3B FF 3B 3B 3B FF 3B 3B' - '3B FF 3B 3B 3B FF 3B 3B 3B FF 3B 3B 3B FF 3B 3B' - '3B FF 3B 3B 3B FF 3B 3B 3B FF 3B 3B 3B FF 3B 3B' - '3B FF 3B 3B 3B FF 3B 3B 3B FF 3B 3B 3B FF 3B 3B' - '3B FF 3B 3B 3B FF 3B 3B 3B FF 3B 3B 3B FF 00 00' - '00 FF 2B 2B 2B FF 11 11 11 FF 02 02 02 FF 03 03' - '03 FF 03 03 03 FF 00 00 00 FF DC DC DC FF E7 E7' - 'E7 FF E7 E7 E7 FF E7 E7 E7 FF E7 E7 E7 FF E7 E7' - 'E7 FF E7 E7 E7 FF E7 E7 E7 FF E7 E7 E7 FF E7 E7' - 'E7 FF E7 E7 E7 FF E7 E7 E7 FF E7 E7 E7 FF 00 00' - '00 33 00 00 00 F9 27 27 27 FF D2 D2 D2 FF F2 F2' - 'F2 FF EA EA EA FF EB EB EB FF EB EB EB FF EB EB' - 'EB FF A7 A7 A7 FF A7 A7 A7 FF AB AB AB FF AE AE' - 'AE FF B0 B0 B0 FF AF AF AF FF AF AF AF FF AF AF' - 'AF FF AF AF AF FF AF AF AF FF AF AF AF FF AB AB' - 'AB FF AB AB AB FF AB AB AB FF AB AB AB FF AB AB' - 'AB FF AB AB AB FF AB AB AB FF AB AB AB FF 00 00' - '00 FF 32 32 32 FF 0C 0C 0C FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF E5 E5 E5 FF E5 E5' - 'E5 FF E6 E6 E6 FF E7 E7 E7 FF E7 E7 E7 FF E8 E8' - 'E8 FF E9 E9 E9 FF E9 E9 E9 FF E9 E9 E9 FF EA EA' - 'EA FF EA EA EA FF EA EA EA FF EB EB EB FF 00 00' - '00 33 00 00 00 F9 26 26 26 FF D3 D3 D3 FF F3 F3' - 'F3 FF EB EB EB FF ED ED ED FF EB EB EB FF E9 E9' - 'E9 FF E8 E8 E8 FF E6 E6 E6 FF E4 E4 E4 FF E2 E2' - 'E2 FF DB DB DB FF DC DC DC FF D8 D8 D8 FF D9 D9' - 'D9 FF D2 D2 D2 FF D2 D2 D2 FF CF CF CF FF D0 D0' - 'D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0' - 'D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0 D0 FF 00 00' - '00 FF 37 37 37 FF 02 02 02 FF 03 03 03 FF 04 04' - '04 FF 04 04 04 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 33 00 00 00 F9 26 26 26 FF D3 D3 D3 FF F7 F7' - 'F7 FF F8 F8 F8 FF F6 F6 F6 FF F6 F6 F6 FF F6 F6' - 'F6 FF F5 F5 F5 FF F5 F5 F5 FF F4 F4 F4 FF F4 F4' - 'F4 FF F3 F3 F3 FF F3 F3 F3 FF F3 F3 F3 FF F2 F2' - 'F2 FF F2 F2 F2 FF F1 F1 F1 FF F1 F1 F1 FF F1 F1' - 'F1 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0 F0 FF EF EF' - 'EF FF EF EF EF FF EE EE EE FF EE EE EE FF 00 00' - '00 FF 37 37 37 FF 07 07 07 FF 09 09 09 FF 0B 0B' - '0B FF 0D 0D 0D FF 10 10 10 FF 13 13 13 FF 19 19' - '19 FF 1E 1E 1E FF 27 27 27 FF 34 34 34 FF 42 42' - '42 FF 46 46 46 FF 46 46 46 FF 46 46 46 FF 46 46' - '46 FF 2C 2C 2C FF 2C 2C 2C FF 2C 2C 2C FF 00 00' - '00 33 00 00 00 F9 24 24 24 FF D6 D6 D6 FF FF FF' - 'FF FF E9 E9 E9 FF E1 E1 E1 FF E2 E2 E2 FF E2 E2' - 'E2 FF E0 E0 E0 FF DF DF DF FF DF DF DF FF DF DF' - 'DF FF DF DF DF FF DF DF DF FF E0 E0 E0 FF E0 E0' - 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' - 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' - 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF 00 00' - '00 FF 3F 3F 3F FF 0D 0D 0D FF 11 11 11 FF 12 12' - '12 FF 16 16 16 FF 1B 1B 1B FF 21 21 21 FF 26 26' - '26 FF 30 30 30 FF 3C 3C 3C FF 44 44 44 FF 47 47' - '47 FF 46 46 46 FF 46 46 46 FF 46 46 46 FF 2C 2C' - '2C FF 2C 2C 2C FF 2C 2C 2C FF 2C 2C 2C FF 00 00' - '00 34 00 00 00 FA 24 24 24 FF DE DE DE FF F8 F8' - 'F8 FF D9 D9 D9 FF C4 C4 C4 FF BB BB BB FF BF BF' - 'BF FF D8 D8 D8 FF DA DA DA FF D9 D9 D9 FF D9 D9' - 'D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9' - 'D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9' - 'D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9' - 'D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9 D9 FF 00 00' - '00 FF 44 44 44 FF 23 23 23 FF 17 17 17 FF 1B 1B' - '1B FF 20 20 20 FF 27 27 27 FF 2B 2B 2B FF 35 35' - '35 FF 40 40 40 FF 44 44 44 FF 47 47 47 FF 4A 4A' - '4A FF 46 46 46 FF 46 46 46 FF 2C 2C 2C FF 2C 2C' - '2C FF 2C 2C 2C FF 2C 2C 2C FF 2C 2C 2C FF 00 00' - '00 25 00 00 00 F7 1F 1F 1F FF DA DA DA FF F3 F3' - 'F3 FF C6 C6 C6 FF A9 A9 A9 FF B7 B7 B7 FF B0 B0' - 'B0 FF C3 C3 C3 FF DA DA DA FF D8 D8 D8 FF D8 D8' - 'D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8 D8 FF D7 D7' - 'D7 FF D7 D7 D7 FF D7 D7 D7 FF D7 D7 D7 FF D7 D7' - 'D7 FF D7 D7 D7 FF D7 D7 D7 FF D7 D7 D7 FF D8 D8' - 'D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8 D8 FF 00 00' - '00 FF 4B 4B 4B FF 2E 2E 2E FF 1F 1F 1F FF 25 25' - '25 FF 2B 2B 2B FF 2F 2F 2F FF 39 39 39 FF 43 43' - '43 FF 44 44 44 FF 47 47 47 FF 4B 4B 4B FF 49 49' - '49 FF 42 42 42 FF 36 36 36 FF 2C 2C 2C FF 23 23' - '23 FF 1C 1C 1C FF 1C 1C 1C FF 14 14 14 FF 00 00' - '00 07 00 00 00 D0 05 05 05 FF C2 C2 C2 FF F6 F6' - 'F6 FF BC BC BC FF B2 B2 B2 FF C3 C3 C3 FF AB AB' - 'AB FF BB BB BB FF D8 D8 D8 FF D5 D5 D5 FF D5 D5' - 'D5 FF D5 D5 D5 FF D4 D4 D4 FF D3 D3 D3 FF D3 D3' - 'D3 FF D5 D5 D5 FF D7 D7 D7 FF D8 D8 D8 FF D8 D8' - 'D8 FF D7 D7 D7 FF D5 D5 D5 FF D3 D3 D3 FF D3 D3' - 'D3 FF D3 D3 D3 FF D4 D4 D4 FF D5 D5 D5 FF 00 00' - '00 FF 4B 4B 4B FF 4C 4C 4C FF 27 27 27 FF 2E 2E' - '2E FF 33 33 33 FF 3C 3C 3C FF 45 45 45 FF 44 44' - '44 FF 47 47 47 FF 4B 4B 4B FF 4B 4B 4B FF 45 45' - '45 FF 3C 3C 3C FF 32 32 32 FF 2A 2A 2A FF 25 25' - '25 FF 1C 1C 1C FF 1C 1C 1C FF 16 16 16 FF 00 00' - '00 00 00 00 00 9C 00 00 00 FF A4 A4 A4 FF F4 F4' - 'F4 FF CF CF CF FF C5 C5 C5 FF D2 D2 D2 FF BF BF' - 'BF FF C9 C9 C9 FF D3 D3 D3 FF D2 D2 D2 FF D0 D0' - 'D0 FF D3 D3 D3 FF D0 D0 D0 FF D0 D0 D0 FF D5 D5' - 'D5 FF D5 D5 D5 FF D5 D5 D5 FF D5 D5 D5 FF D5 D5' - 'D5 FF D5 D5 D5 FF D5 D5 D5 FF D5 D5 D5 FF D0 D0' - 'D0 FF D0 D0 D0 FF D4 D4 D4 FF D0 D0 D0 FF 00 00' - '00 FF 52 52 52 FF 57 57 57 FF 3C 3C 3C FF 35 35' - '35 FF 3F 3F 3F FF 00 00 00 FF 8C 8C 8C FF 8C 8C' - '8C FF 8C 8C 8C FF 8C 8C 8C FF 8C 8C 8C FF 8C 8C' - '8C FF 8C 8C 8C FF 8C 8C 8C FF 8C 8C 8C FF 8C 8C' - '8C FF 8C 8C 8C FF 8C 8C 8C FF 8C 8C 8C FF 00 00' - '00 00 00 00 00 73 00 00 00 FF 7E 7E 7E FF EF EF' - 'EF FF D1 D1 D1 FF CF CF CF FF CB CB CB FF CF CF' - 'CF FF D1 D1 D1 FF CE CE CE FF CF CF CF FF D5 D5' - 'D5 FF D5 D5 D5 FF D5 D5 D5 FF D5 D5 D5 FF D5 D5' - 'D5 FF D5 D5 D5 FF D5 D5 D5 FF D5 D5 D5 FF D5 D5' - 'D5 FF D5 D5 D5 FF D5 D5 D5 FF D5 D5 D5 FF D5 D5' - 'D5 FF D5 D5 D5 FF D5 D5 D5 FF E1 E1 E1 FF 00 00' - '00 FF 57 57 57 FF 5E 5E 5E FF 5D 5D 5D FF 49 49' - '49 FF 45 45 45 FF 00 00 00 FF 84 84 84 FF FD F9' - 'F7 FF F9 EE E8 FF F6 E4 D9 FF F3 D9 CB FF F0 CF' - 'BC FF ED C5 AE FF EA BB A0 FF E9 B6 99 FF E9 B6' - '99 FF E9 B6 99 FF E9 B6 99 FF E9 B6 99 FF 00 00' - '00 00 00 00 00 59 00 00 00 FF 59 59 59 FF E9 E9' - 'E9 FF D0 D0 D0 FF CD CD CD FF CD CD CD FF CD CD' - 'CD FF CA CA CA FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' - 'D3 FF D3 D3 D3 FF D4 D4 D4 FF D5 D5 D5 FF D6 D6' - 'D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6' - 'D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6 D6 FF D5 D5' - 'D5 FF D5 D5 D5 FF DB DB DB FF E4 E4 E4 FF 00 00' - '00 FF 5E 5E 5E FF 5E 5E 5E FF 65 65 65 FF 6A 6A' - '6A FF 44 44 44 FF 00 00 00 FF 8E 8E 8E FF FF FF' - 'FF FF D0 CB C8 FF 8B 86 84 FF 87 80 7D FF 83 7A' - '75 FF D0 B3 A3 FF EC C0 A7 FF E9 B6 99 FF E9 B6' - '99 FF E9 B6 99 FF E9 B6 99 FF E9 B6 99 FF 00 00' - '00 00 00 00 00 3E 00 00 00 FE 40 40 40 FF D7 D7' - 'D7 FF D2 D2 D2 FF CA CA CA FF CB CB CB FF CA CA' - 'CA FF D4 D4 D4 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' - 'D3 FF D1 D1 D1 FF D2 D2 D2 FF D2 D2 D2 FF D2 D2' - 'D2 FF D2 D2 D2 FF D2 D2 D2 FF D2 D2 D2 FF D3 D3' - 'D3 FF D2 D2 D2 FF D3 D3 D3 FF D3 D3 D3 FF D2 D2' - 'D2 FF D2 D2 D2 FF D1 D1 D1 FF D0 D0 D0 FF 00 00' - '00 FF 5E 5E 5E FF 5E 5E 5E FF 65 65 65 FF 6A 6A' - '6A FF 44 44 44 FF 00 00 00 FF 8E 8E 8E FF FF FF' - 'FF FF D0 CB C8 FF 8B 86 84 FF 87 80 7D FF 83 7A' - '75 FF D0 B3 A3 FF EC C0 A7 FF E9 B6 99 FF E9 B6' - '99 FF E9 B6 99 FF E9 B6 99 FF E9 B6 99 FF 00 00' - '00 00 00 00 00 25 00 00 00 F8 22 22 22 FF B7 B7' - 'B7 FF DB DB DB FF CA CA CA FF CB CB CB FF CE CE' - 'CE FF D3 D3 D3 FF D3 D3 D3 FF CF CF CF FF D1 D1' - 'D1 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0' - 'D0 FF CF CF CF FF D3 D3 D3 FF D3 D3 D3 FF CE CE' - 'CE FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' - 'D3 FF D3 D3 D3 FF D3 D3 D3 FF CE CE CE FF 00 00' - '00 FF 5E 5E 5E FF 65 65 65 FF 6A 6A 6A FF 6A 6A' - '6A FF 71 71 71 FF 00 00 00 FF 97 97 97 FF FF FF' - 'FF FF B8 B6 B6 FF 54 54 54 FF 4F 4F 4F FF 5B 58' - '57 FF F0 D0 BE FF ED C6 AF FF EA BC A1 FF E9 B6' - '99 FF E9 B6 99 FF E9 B6 99 FF E9 B6 99 FF 00 00' - '00 00 00 00 00 0C 00 00 00 E1 07 07 07 FF 9F 9F' - '9F FF DD DD DD FF CC CC CC FF CD CD CD FF D3 D3' - 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D0 D0 D0 FF D0 D0' - 'D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0' - 'D0 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' - 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' - 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF 00 00' - '00 FF 65 65 65 FF 6A 6A 6A FF 6A 6A 6A FF 71 71' - '71 FF 79 79 79 FF 00 00 00 FF 9E 9E 9E FF FF FF' - 'FF FF AF AF AF FF 52 52 52 FF 4E 4E 4E FF 6D 6A' - '67 FF F2 D6 C7 FF EF CC B8 FF EC C2 AA FF E9 B8' - '9C FF E9 B6 99 FF E9 B6 99 FF E9 B6 99 FF 00 00' - '00 00 00 00 00 00 00 00 00 B2 00 00 00 FF 83 83' - '83 FF DD DD DD FF CF CF CF FF D1 D1 D1 FF D3 D3' - 'D3 FF D3 D3 D3 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0' - 'D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0' - 'D0 FF D0 D0 D0 FF CF CF CF FF D3 D3 D3 FF D3 D3' - 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' - 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF 00 00' - '00 FF 65 65 65 FF 6A 6A 6A FF 71 71 71 FF 7E 7E' - '7E FF 79 79 79 FF 00 00 00 FF AA AA AA FF FF FF' - 'FF FF A6 A6 A6 FF 50 50 50 FF 4C 4C 4C FF 7B 77' - '75 FF F4 DD D0 FF F1 D2 C2 FF EE C8 B3 FF EB BE' - 'A5 FF E9 B6 99 FF E9 B6 99 FF E9 B6 99 FF 00 00' - '00 00 00 00 00 00 00 00 00 80 00 00 00 FF 5F 5F' - '5F FF DC DC DC FF D1 D1 D1 FF D2 D2 D2 FF D3 D3' - 'D3 FF D3 D3 D3 FF D1 D1 D1 FF D1 D1 D1 FF D1 D1' - 'D1 FF D1 D1 D1 FF D1 D1 D1 FF D1 D1 D1 FF D1 D1' - 'D1 FF D1 D1 D1 FF D1 D1 D1 FF D3 D3 D3 FF D3 D3' - 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' - 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF 00 00' - '00 FF 65 65 65 FF 71 71 71 FF 79 79 79 FF 7E 7E' - '7E FF 7E 7E 7E FF 00 00 00 FF B1 B1 B1 FF FF FF' - 'FF FF E0 E0 E0 FF DF DF DF FF DC D9 D7 FF D9 D1' - 'CC FF F6 E4 D9 FF F3 D9 CB FF F0 CF BC FF ED C5' - 'AE FF EA BB A0 FF EA BB A0 FF E9 B6 99 FF 00 00' - '00 00 00 00 00 00 00 00 00 4B 00 00 00 FE 41 41' - '41 FF D8 D8 D8 FF D4 D4 D4 FF D2 D2 D2 FF D3 D3' - 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' - 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' - 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' - 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' - 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF A3 A3 9E FF DA DA' - 'D8 FF DA DA D8 FF DA DA D8 FF DA DA D8 FF D7 D2' - 'CE FF D5 CB C4 FF D2 C3 B9 FF D0 BC B0 FF CE B6' - 'A6 FF CC AF 9D FF CC AF 9D FF CA A8 94 FF 00 00' - '00 00 00 00 00 00 00 00 00 1A 00 00 00 F2 2C 2C' - '2C FF CC CC CC FF D6 D6 D6 FF D5 D5 D5 FF D3 D3' - 'D3 FF D3 D3 D3 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6' - 'D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6' - 'D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6' - 'D6 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' - 'D3 FF D3 D3 D3 FF CC CC CC FF C9 C9 C9 FF C6 C6' - 'C6 FF C4 C4 C4 FF C2 C2 C2 FF B3 B3 B3 FF BD BD' - 'BD FF D0 D0 D0 FF 99 99 99 FF 09 09 09 FF 00 00' - '00 CF 00 00 00 19 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 09 00 00 00 D8 18 18' - '18 FF B0 B0 B0 FF DB DB DB FF DB DB DB FF DE DE' - 'DE FF DE DE DE FF DE DE DE FF D9 D9 D9 FF DA DA' - 'DA FF DA DA DA FF DA DA DA FF DA DA DA FF DA DA' - 'DA FF DA DA DA FF DA DA DA FF DA DA DA FF DA DA' - 'DA FF DA DA DA FF DD DD DD FF DD DD DD FF DD DD' - 'DD FF DD DD DD FF DD DD DD FF DA DA DA FF DD DD' - 'DD FF DD DD DD FF E7 E7 E7 FF D9 D9 D9 FF CC CC' - 'CC FF CA CA CA FF 7A 7A 7A FF 02 02 02 FF 00 00' - '00 B8 00 00 00 0A 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 02 00 00 00 BF 08 08' - '08 FF 97 97 97 FF DC DC DC FF DF DF DF FF DC DC' - 'DC FF DE DE DE FF DE DE DE FF DE DE DE FF DD DD' - 'DD FF DD DD DD FF DD DD DD FF DD DD DD FF DD DD' - 'DD FF DD DD DD FF DD DD DD FF DD DD DD FF DD DD' - 'DD FF DD DD DD FF DD DD DD FF DD DD DD FF DD DD' - 'DD FF DD DD DD FF DD DD DD FF DD DD DD FF E7 E7' - 'E7 FF E7 E7 E7 FF E7 E7 E7 FF DD DD DD FF DC DC' - 'DC FF C6 C6 C6 FF 53 53 53 FF 00 00 00 FF 00 00' - '00 A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 A4 00 00' - '00 FF 77 77 77 FF D3 D3 D3 FF E2 E2 E2 FF E1 E1' - 'E1 FF DE DE DE FF DE DE DE FF DE DE DE FF DE DE' - 'DE FF DE DE DE FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' - 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' - 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' - 'E0 FF E0 E0 E0 FF E1 E1 E1 FF E1 E1 E1 FF E7 E7' - 'E7 FF E7 E7 E7 FF E7 E7 E7 FF E3 E3 E3 FF D9 D9' - 'D9 FF BB BB BB FF 39 39 39 FF 00 00 00 FF 00 00' - '00 7E 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 89 00 00' - '00 FF 4B 4B 4B FF C9 C9 C9 FF E5 E5 E5 FF E3 E3' - 'E3 FF E4 E4 E4 FF EB EB EB FF EB EB EB FF EB EB' - 'EB FF EB EB EB FF EB EB EB FF EB EB EB FF E4 E4' - 'E4 FF E4 E4 E4 FF E4 E4 E4 FF E4 E4 E4 FF E4 E4' - 'E4 FF E4 E4 E4 FF E4 E4 E4 FF E4 E4 E4 FF E5 E5' - 'E5 FF E5 E5 E5 FF E7 E7 E7 FF E7 E7 E7 FF E7 E7' - 'E7 FF E7 E7 E7 FF E4 E4 E4 FF E6 E6 E6 FF D6 D6' - 'D6 FF A8 A8 A8 FF 20 20 20 FF 00 00 00 FD 00 00' - '00 4E 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 62 00 00' - '00 FF 35 35 35 FF BD BD BD FF E6 E6 E6 FF E6 E6' - 'E6 FF E6 E6 E6 FF E7 E7 E7 FF E7 E7 E7 FF EB EB' - 'EB FF EB EB EB FF EB EB EB FF EB EB EB FF EB EB' - 'EB FF EB EB EB FF EB EB EB FF EB EB EB FF EB EB' - 'EB FF EB EB EB FF EB EB EB FF EB EB EB FF EB EB' - 'EB FF E7 E7 E7 FF E7 E7 E7 FF E7 E7 E7 FF E7 E7' - 'E7 FF E7 E7 E7 FF E6 E6 E6 FF E8 E8 E8 FF D4 D4' - 'D4 FF 9A 9A 9A FF 0B 0B 0B FF 00 00 00 ED 00 00' - '00 2C 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 2D 00 00' - '00 F9 1E 1E 1E FF AB AB AB FF E4 E4 E4 FF ED ED' - 'ED FF E7 E7 E7 FF E6 E6 E6 FF EC EC EC FF EB EB' - 'EB FF EA EA EA FF ED ED ED FF EB EB EB FF EB EB' - 'EB FF EB EB EB FF EB EB EB FF EB EB EB FF EB EB' - 'EB FF EB EB EB FF EB EB EB FF EB EB EB FF EB EB' - 'EB FF EB EB EB FF EB EB EB FF EC EC EC FF EA EA' - 'EA FF E5 E5 E5 FF EB EB EB FF EB EB EB FF D6 D6' - 'D6 FF 8A 8A 8A FF 00 00 00 FF 00 00 00 C3 00 00' - '00 17 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 09 00 00' - '00 DD 08 08 08 FF 99 99 99 FF E4 E4 E4 FF DF DF' - 'DF FF BD BD BD FF C1 C1 C1 FF D6 D6 D6 FF EC EC' - 'EC FF ED ED ED FF ED ED ED FF EE EE EE FF EE EE' - 'EE FF ED ED ED FF EC EC EC FF EB EB EB FF EB EB' - 'EB FF EC EC EC FF ED ED ED FF EE EE EE FF EE EE' - 'EE FF ED ED ED FF EE EE EE FF E4 E4 E4 FF C2 C2' - 'C2 FF BE BE BE FF D1 D1 D1 FF EC EC EC FF D4 D4' - 'D4 FF 75 75 75 FF 00 00 00 FF 00 00 00 9C 00 00' - '00 06 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 AE 00 00 00 FF 8D 8D 8D FF E0 E0 E0 FF C4 C4' - 'C4 FF B2 B2 B2 FF B8 B8 B8 FF B2 B2 B2 FF EB EB' - 'EB FF F1 F1 F1 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0' - 'F0 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0' - 'F0 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0' - 'F0 FF F0 F0 F0 FF F3 F3 F3 FF D5 D5 D5 FF B0 B0' - 'B0 FF B6 B6 B6 FF B7 B7 B7 FF EB EB EB FF CD CD' - 'CD FF 61 61 61 FF 00 00 00 FF 00 00 00 85 00 00' - '00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 80 00 00 00 FF 64 64 64 FF CE CE CE FF DD DD' - 'DD FF DC DC DC FF D5 D5 D5 FF E4 E4 E4 FF F9 F9' - 'F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9' - 'F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9' - 'F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9' - 'F9 FF F9 F9 F9 FF FA FA FA FF F2 F2 F2 FF DF DF' - 'DF FF D8 D8 D8 FF DC DC DC FF D7 D7 D7 FF B0 B0' - 'B0 FF 34 34 34 FF 00 00 00 FF 00 00 00 67 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 44 00 00 00 FF 19 19 19 FF 80 80 80 FF BE BE' - 'BE FF D3 D3 D3 FF D7 D7 D7 FF DB DB DB FF D8 D8' - 'D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8' - 'D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8' - 'D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8' - 'D8 FF D8 D8 D8 FF D8 D8 D8 FF D9 D9 D9 FF D9 D9' - 'D9 FF D7 D7 D7 FF CD CD CD FF B0 B0 B0 FF 5D 5D' - '5D FF 06 06 06 FF 00 00 00 ED 00 00 00 2B 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 02 00 00 00 9C 00 00 00 FF 0C 0C 0C FF 3D 3D' - '3D FF 49 49 49 FF 48 48 48 FF 48 48 48 FF 48 48' - '48 FF 48 48 48 FF 48 48 48 FF 48 48 48 FF 48 48' - '48 FF 48 48 48 FF 48 48 48 FF 48 48 48 FF 48 48' - '48 FF 48 48 48 FF 48 48 48 FF 48 48 48 FF 48 48' - '48 FF 48 48 48 FF 48 48 48 FF 48 48 48 FF 48 48' - '48 FF 49 49 49 FF 49 49 49 FF 2F 2F 2F FF 02 02' - '02 FF 00 00 00 FF 00 00 00 5C 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 06 00 00 00 7F 00 00 00 F1 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 D6 00 00 00 5C 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 2C 00 00' - '00 7E 00 00 00 84 00 00 00 84 00 00 00 84 00 00' - '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' - '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' - '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' - '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' - '00 84 00 00 00 84 00 00 00 84 00 00 00 70 00 00' - '00 1A 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF' - 'FF F0 00 00 00 00 FF FF FF F0 00 00 00 00 FF FF' - 'FF F0 00 00 00 00 FF FF FF F0 00 00 00 00 FF FF' - 'FF F0 00 00 00 00 FF FF FF F0 00 00 00 00 FF FF' - 'FF F0 00 00 00 00 F0 00 00 00 00 00 00 00 C0 00' - '00 00 00 00 00 00 80 00 00 00 00 00 00 00 80 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 00' - '00 00 00 00 00 00 80 00 00 00 00 00 00 00 80 00' - '00 00 00 00 00 00 80 00 00 00 00 00 00 00 80 00' - '00 00 00 00 00 00 80 00 00 00 00 00 00 00 C0 00' - '00 00 00 00 00 00 C0 00 00 00 00 00 00 00 C0 00' - '00 00 00 00 00 00 C0 00 00 00 03 FF 00 00 C0 00' - '00 00 03 FF 00 00 C0 00 00 00 07 FF 00 00 E0 00' - '00 00 07 FF 00 00 E0 00 00 00 07 FF 00 00 E0 00' - '00 00 07 FF 00 00 E0 00 00 00 07 FF 00 00 E0 00' - '00 00 07 FF 00 00 F0 00 00 00 07 FF 00 00 F0 00' - '00 00 0F FF 00 00 F0 00 00 00 0F FF 00 00 F0 00' - '00 00 1F FF 00 00 F8 00 00 00 3F FF 00 00 FE 00' - '00 00 7F FF 00 00 FF FF FF FF FF FF 00 00 28 00' - '00 00 20 00 00 00 40 00 00 00 01 00 20 00 00 00' - '00 00 00 10 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 24 00 00 00 6C 00 00 00 90 00 00' - '00 90 00 00 00 90 00 00 00 90 00 00 00 90 00 00' - '00 90 00 00 00 90 00 00 00 90 00 00 00 90 00 00' - '00 90 00 00 00 90 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 3C 3C 3C FF 3C 3C 3C FF 3C 3C 3C FF 3C 3C' - '3C FF 7F 60 60 FF 7F 60 60 FF 7F 60 60 FF 7F 60' - '60 FF 7F 60 60 FF 7F 60 60 FF 7F 60 60 FF 7F 60' - '60 FF 7F 60 60 FF 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 8C 8C 8C FF 8C 8C 8C FF 8C 8C 8C FF 8C 8C' - '8C FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 00 00 00 00 00 00 00' - '00 04 00 00 00 14 00 00 00 26 00 00 00 2D 00 00' - '00 2D 00 00 00 2D 00 00 00 2D 00 00 00 2D 00 00' - '00 2D 00 00 00 2D 00 00 00 2D 00 00 00 2D 00 00' - '00 2D 00 00 00 2D 00 00 00 2D 00 00 00 2D 00 00' - '00 2D 28 28 24 FF 00 00 00 8F 8C 8C 8C FF 0C 0C' - '0C FF D5 40 40 FF D5 40 40 FF D5 40 40 FF D5 40' - '40 FF D5 40 40 FF D5 40 40 FF D5 40 40 FF D5 40' - '40 FF D5 40 40 FF 00 00 00 00 00 00 00 07 00 00' - '00 23 00 00 00 55 00 00 00 7E 00 00 00 8C 00 00' - '00 8C 00 00 00 8C 00 00 00 8C 00 00 00 8C 00 00' - '00 8C 00 00 00 8C 00 00 00 8C 00 00 00 8C 00 00' - '00 8C 00 00 00 8C 00 00 00 8C 00 00 00 8C 00 00' - '00 8C 2A 2A 25 FF 00 00 00 FF 00 00 00 FF 0C 0C' - '0C FF EA 80 80 FF EA 80 80 FF EA 80 80 FF EA 80' - '80 FF EA 80 80 FF EA 80 80 FF EA 80 80 FF EA 80' - '80 FF EA 80 80 FF 00 00 00 00 00 00 00 1F 00 00' - '00 C2 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 04 04 04 FF 0C 0C 0C FF 10 10 10 FF 18 18' - '18 FF ED ED ED FF E7 E7 E7 FF E7 E7 E7 FF E7 E7' - 'E7 FF E7 E7 E7 FF E7 E7 E7 FF E7 E7 E7 FF E7 E7' - 'E7 FF E7 E7 E7 FF 00 00 00 00 00 00 00 C0 00 00' - '00 FF 21 21 21 FF 2C 2C 2C FF 2C 2C 2C FF 2B 2B' - '2B FF 2B 2B 2B FF 2B 2B 2B FF 2B 2B 2B FF 2B 2B' - '2B FF 2B 2B 2B FF 2B 2B 2B FF 2A 2A 2A FF 2A 2A' - '2A FF 2A 2A 2A FF 2A 2A 2A FF 2A 2A 2A FF 2A 2A' - '2A FF 0C 0C 0C FF 0C 0C 0C FF 18 18 18 FF 17 17' - '17 FF EC EC EC FF E7 E7 E7 FF 99 99 99 FF 99 99' - '99 FF 99 99 99 FF 99 99 99 FF 99 99 99 FF 99 99' - '99 FF 99 99 99 FF 00 00 00 06 01 01 01 FF 8A 8A' - '8A FF EB EB EB FF E8 E8 E8 FF E8 E8 E8 FF D4 D4' - 'D4 FF 00 C0 00 FF E7 E7 E7 FF E8 E8 E8 FF E3 E3' - 'E3 FF D8 D8 D8 FF D2 D2 D2 FF CD CD CD FF CD CD' - 'CD FF CD CD CD FF C8 C9 C9 FF AA AA AA FF 2E 2E' - '2E FF 00 00 00 FF 00 00 00 FF 1F 1F 1F FF 18 18' - '18 FF EA EA EA FF E6 E6 E6 FF E8 E8 E8 FF E8 E8' - 'E8 FF EA EA EA FF EA EA EA FF EB EB EB FF EB EB' - 'EB FF EC EC EC FF 00 00 00 1B 19 19 19 FF AD A8' - 'AB FF EB EB EB FF E8 E8 E8 FF E8 E8 E8 FF 00 FF' - '00 FF 00 FF 00 FF 00 C0 00 FF DF DF DF FF D5 D5' - 'D5 FF D2 D2 D2 FF CB CB CB FF CD CD CD FF CD CD' - 'CD FF CD CD CD FF CD CD CD FF 40 40 40 FF 2E 2E' - '2E FF 00 00 00 FF 00 00 00 FF 15 15 15 FF 13 13' - '13 FF E9 E9 E9 FF E7 E7 E7 FF 99 99 99 FF 99 99' - '99 FF 99 99 99 FF 99 99 99 FF 99 99 99 FF 99 99' - '99 FF 99 99 99 FF 00 00 00 3A 28 28 28 FF D1 D1' - 'D1 FF EB EB EB FF EB EB EB FF E8 E8 E8 FF E8 E8' - 'E8 FF 00 FF 00 FF B5 B5 B5 FF B6 B6 B6 FF 3B 3B' - '3B FF 3B 3B 3B FF 3B 3B 3B FF 3B 3B 3B FF 3B 3B' - '3B FF 3B 3B 3B FF 3B 3B 3B FF B6 B6 B6 FF B6 B6' - 'B6 FF 00 00 00 FF 00 00 00 FF 0A 0A 0A FF 0D 0D' - '0D FF E8 E8 E8 FF E7 E7 E7 FF E3 E3 E3 FF E3 E3' - 'E3 FF E4 E4 E4 FF E4 E4 E4 FF E6 E6 E6 FF E6 E6' - 'E6 FF E7 E7 E7 FF 00 00 00 39 28 28 28 FF D1 D1' - 'D1 FF E8 E8 E8 FF EB EB EB FF E8 E8 E8 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 24 24 24 FF 1F 1F 1F FF 07 07 07 FF 0A 0A' - '0A FF E5 E5 E5 FF E7 E7 E7 FF 99 99 99 FF 99 99' - '99 FF 99 99 99 FF 99 99 99 FF 99 99 99 FF 99 99' - '99 FF 99 99 99 FF 00 00 00 39 27 27 27 FF D2 D2' - 'D2 FF EA EA EA FF EB EB EB FF EB EB EB FF A7 A7' - 'A7 FF AB AB AB FF AE AE AE FF AF AF AF FF AF AF' - 'AF FF AF AF AF FF AF AF AF FF AB AB AB FF AB AB' - 'AB FF AB AB AB FF AB AB AB FF AB AB AB FF AB AB' - 'AB FF 32 32 32 FF 0C 0C 0C FF 00 00 00 FF 00 00' - '00 FF E5 E5 E5 FF E5 E5 E5 FF E7 E7 E7 FF E7 E7' - 'E7 FF E9 E9 E9 FF E9 E9 E9 FF EA EA EA FF EA EA' - 'EA FF EB EB EB FF 00 00 00 39 26 26 26 FF D3 D3' - 'D3 FF EB EB EB FF ED ED ED FF E9 E9 E9 FF E8 E8' - 'E8 FF E4 E4 E4 FF E2 E2 E2 FF DC DC DC FF D8 D8' - 'D8 FF D2 D2 D2 FF D2 D2 D2 FF D0 D0 D0 FF D0 D0' - 'D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0' - 'D0 FF 37 37 37 FF 02 02 02 FF 04 04 04 FF 04 04' - '04 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 37 24 24 24 FF D6 D6' - 'D6 FF E9 E9 E9 FF E1 E1 E1 FF E2 E2 E2 FF E0 E0' - 'E0 FF DF DF DF FF DF DF DF FF DF DF DF FF E0 E0' - 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' - 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' - 'E0 FF 3F 3F 3F FF 0D 0D 0D FF 12 12 12 FF 16 16' - '16 FF 21 21 21 FF 26 26 26 FF 3C 3C 3C FF 44 44' - '44 FF 46 46 46 FF 46 46 46 FF 2C 2C 2C FF 2C 2C' - '2C FF 2C 2C 2C FF 00 00 00 34 24 24 24 FF DE DE' - 'DE FF D9 D9 D9 FF C4 C4 C4 FF BF BF BF FF D8 D8' - 'D8 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9' - 'D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9' - 'D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9' - 'D9 FF 44 44 44 FF 23 23 23 FF 1B 1B 1B FF 20 20' - '20 FF 2B 2B 2B FF 35 35 35 FF 44 44 44 FF 47 47' - '47 FF 46 46 46 FF 46 46 46 FF 2C 2C 2C FF 2C 2C' - '2C FF 2C 2C 2C FF 00 00 00 07 05 05 05 FF C2 C2' - 'C2 FF BC BC BC FF B2 B2 B2 FF AB AB AB FF BB BB' - 'BB FF D5 D5 D5 FF D5 D5 D5 FF D4 D4 D4 FF D3 D3' - 'D3 FF D5 D5 D5 FF D7 D7 D7 FF D8 D8 D8 FF D7 D7' - 'D7 FF D3 D3 D3 FF D3 D3 D3 FF D4 D4 D4 FF D5 D5' - 'D5 FF 4B 4B 4B FF 4C 4C 4C FF 2E 2E 2E FF 33 33' - '33 FF 45 45 45 FF 44 44 44 FF 4B 4B 4B FF 4B 4B' - '4B FF 3C 3C 3C FF 32 32 32 FF 25 25 25 FF 1C 1C' - '1C FF 16 16 16 FF 00 00 00 00 00 00 00 FF A4 A4' - 'A4 FF CF CF CF FF C5 C5 C5 FF BF BF BF FF C9 C9' - 'C9 FF D2 D2 D2 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0' - 'D0 FF D5 D5 D5 FF D5 D5 D5 FF D5 D5 D5 FF D5 D5' - 'D5 FF D5 D5 D5 FF D0 D0 D0 FF D4 D4 D4 FF D0 D0' - 'D0 FF 52 52 52 FF 57 57 57 FF 35 35 35 FF 3F 3F' - '3F FF 8C 8C 8C FF 8C 8C 8C FF 8C 8C 8C FF 8C 8C' - '8C FF 8C 8C 8C FF 8C 8C 8C FF 8C 8C 8C FF 8C 8C' - '8C FF 8C 8C 8C FF 00 00 00 00 00 00 00 FF 59 59' - '59 FF D0 D0 D0 FF CD CD CD FF CD CD CD FF CA CA' - 'CA FF D3 D3 D3 FF D3 D3 D3 FF D4 D4 D4 FF D5 D5' - 'D5 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6' - 'D6 FF D6 D6 D6 FF D5 D5 D5 FF DB DB DB FF E4 E4' - 'E4 FF 5E 5E 5E FF 5E 5E 5E FF 6A 6A 6A FF 44 44' - '44 FF 8E 8E 8E FF FF FF FF FF 8B 86 84 FF 87 80' - '7D FF D0 B3 A3 FF EC C0 A7 FF E9 B6 99 FF E9 B6' - '99 FF E9 B6 99 FF 00 00 00 00 00 00 00 FF 40 40' - '40 FF D2 D2 D2 FF CA CA CA FF CA CA CA FF D4 D4' - 'D4 FF D3 D3 D3 FF D3 D3 D3 FF D2 D2 D2 FF D2 D2' - 'D2 FF D2 D2 D2 FF D2 D2 D2 FF D3 D3 D3 FF D2 D2' - 'D2 FF D3 D3 D3 FF D2 D2 D2 FF D1 D1 D1 FF D0 D0' - 'D0 FF 5E 5E 5E FF 5E 5E 5E FF 6A 6A 6A FF 44 44' - '44 FF 8E 8E 8E FF FF FF FF FF 8B 86 84 FF 87 80' - '7D FF D0 B3 A3 FF EC C0 A7 FF E9 B6 99 FF E9 B6' - '99 FF E9 B6 99 FF 00 00 00 00 00 00 00 F4 07 07' - '07 FF DD DD DD FF CC CC CC FF D3 D3 D3 FF D3 D3' - 'D3 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0' - 'D0 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' - 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' - 'D3 FF 65 65 65 FF 6A 6A 6A FF 71 71 71 FF 79 79' - '79 FF 9E 9E 9E FF FF FF FF FF 52 52 52 FF 4E 4E' - '4E FF F2 D6 C7 FF EF CC B8 FF E9 B8 9C FF E9 B6' - '99 FF E9 B6 99 FF 00 00 00 00 00 00 00 BA 00 00' - '00 FF DD DD DD FF CF CF CF FF D3 D3 D3 FF D3 D3' - 'D3 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0' - 'D0 FF D0 D0 D0 FF CF CF CF FF D3 D3 D3 FF D3 D3' - 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' - 'D3 FF 3C 3C 3C FF 6A 6A 6A FF 71 71 71 FF 79 79' - '79 FF AA AA AA FF FF FF FF FF 50 50 50 FF 4C 4C' - '4C FF F4 DD D0 FF F1 D2 C2 FF EB BE A5 FF E9 B6' - '99 FF E9 B6 99 FF 00 00 00 00 00 00 00 4D 00 00' - '00 FF D8 D8 D8 FF D4 D4 D4 FF D3 D3 D3 FF D3 D3' - 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' - 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' - 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' - 'D3 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF A3 A3 9E FF DA DA D8 FF DA DA D8 FF DA DA' - 'D8 FF D5 CB C4 FF D2 C3 B9 FF CE B6 A6 FF CC AF' - '9D FF CA A8 94 FF 00 00 00 00 00 00 00 1A 00 00' - '00 FF CC CC CC FF D6 D6 D6 FF D3 D3 D3 FF D3 D3' - 'D3 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6' - 'D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6 D6 FF D3 D3' - 'D3 FF D3 D3 D3 FF D3 D3 D3 FF CC CC CC FF C9 C9' - 'C9 FF C4 C4 C4 FF C2 C2 C2 FF BD BD BD FF D0 D0' - 'D0 FF 09 09 09 FF 00 00 00 FF 00 00 00 6C 00 00' - '00 1D 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 02 00 00' - '00 D2 97 97 97 FF DC DC DC FF DC DC DC FF DE DE' - 'DE FF DE DE DE FF DD DD DD FF DD DD DD FF DD DD' - 'DD FF DD DD DD FF DD DD DD FF DD DD DD FF DD DD' - 'DD FF DD DD DD FF DD DD DD FF DD DD DD FF DD DD' - 'DD FF E7 E7 E7 FF E7 E7 E7 FF DC DC DC FF C6 C6' - 'C6 FF 00 00 00 FF 00 00 00 FF 00 00 00 59 00 00' - '00 14 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 AF 77 77 77 FF D3 D3 D3 FF E1 E1 E1 FF DE DE' - 'DE FF DE DE DE FF DE DE DE FF E0 E0 E0 FF E0 E0' - 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' - 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E1 E1 E1 FF E1 E1' - 'E1 FF E7 E7 E7 FF E7 E7 E7 FF D9 D9 D9 FF BB BB' - 'BB FF 00 00 00 FF 00 00 00 FF 00 00 00 40 00 00' - '00 0A 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 66 35 35 35 FF BD BD BD FF E6 E6 E6 FF E6 E6' - 'E6 FF E7 E7 E7 FF EB EB EB FF EB EB EB FF EB EB' - 'EB FF EB EB EB FF EB EB EB FF EB EB EB FF EB EB' - 'EB FF EB EB EB FF EB EB EB FF E7 E7 E7 FF E7 E7' - 'E7 FF E7 E7 E7 FF E6 E6 E6 FF D4 D4 D4 FF 9A 9A' - '9A FF 00 00 00 FF 00 00 00 A4 00 00 00 2B 00 00' - '00 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 2D 1E 1E 1E FF AB AB AB FF ED ED ED FF E7 E7' - 'E7 FF EC EC EC FF EB EB EB FF ED ED ED FF EB EB' - 'EB FF EB EB EB FF EB EB EB FF EB EB EB FF EB EB' - 'EB FF EB EB EB FF EB EB EB FF EB EB EB FF EC EC' - 'EC FF E5 E5 E5 FF EB EB EB FF D6 D6 D6 FF 8A 8A' - '8A FF 00 00 00 FF 00 00 00 7B 00 00 00 1B 00 00' - '00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 FF 8D 8D 8D FF C4 C4 C4 FF B2 B2' - 'B2 FF B2 B2 B2 FF EB EB EB FF F0 F0 F0 FF F0 F0' - 'F0 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0' - 'F0 FF F0 F0 F0 FF F0 F0 F0 FF F3 F3 F3 FF D5 D5' - 'D5 FF B6 B6 B6 FF B7 B7 B7 FF CD CD CD FF 61 61' - '61 FF 00 00 00 FF 00 00 00 50 00 00 00 0F 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 FF 64 64 64 FF DD DD DD FF DC DC' - 'DC FF E4 E4 E4 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9' - 'F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9' - 'F9 FF F9 F9 F9 FF F9 F9 F9 FF FA FA FA FF F2 F2' - 'F2 FF D8 D8 D8 FF DC DC DC FF B0 B0 B0 FF 34 34' - '34 FF 00 00 00 E5 00 00 00 31 00 00 00 04 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 9C 00 00 00 FF 3D 3D 3D FF 49 49' - '49 FF 48 48 48 FF 48 48 48 FF 48 48 48 FF 48 48' - '48 FF 48 48 48 FF 48 48 48 FF 48 48 48 FF 48 48' - '48 FF 48 48 48 FF 48 48 48 FF 48 48 48 FF 48 48' - '48 FF 49 49 49 FF 49 49 49 FF 02 02 02 FF 00 00' - '00 FF 00 00 00 49 00 00 00 14 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 06 00 00 00 7F 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FA 00 00' - '00 7C 00 00 00 12 00 00 00 04 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 FF FF E0 00 FF FF E0 00 FF FF' - 'E0 00 C0 00 00 00 80 00 00 00 80 00 00 00 80 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 80 00 00 00 80 00 00 00 80 00' - '00 00 80 00 00 00 80 00 00 00 80 00 00 00 80 00' - '00 1F 80 00 00 1F C0 00 00 1F C0 00 00 1F C0 00' - '00 1F E0 00 00 3F E0 00 00 3F E0 00 00 7F E0 00' - '00 7F FF FF FF FF 28 00 00 00 10 00 00 00 20 00' - '00 00 01 00 20 00 00 00 00 00 00 04 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 FF 00 00 00 FF 00 00 00 FF FF C0' - 'C0 FF FF C0 C0 FF FF C0 C0 FF FF C0 C0 FF 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 FF 36 36 30 FF 00 00 00 FF C0 00' - '00 FF C0 00 00 FF C0 00 00 FF C0 00 00 FF 00 00' - '00 00 00 00 00 16 00 00 00 37 00 00 00 37 00 00' - '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' - '00 37 00 00 00 FF 30 30 2C FF 00 00 00 FF FF C0' - 'C0 FF FF C0 C0 FF FF C0 C0 FF FF C0 C0 FF 00 00' - '00 54 90 90 90 FF AB AC AC FF CC CC CC FF C4 C4' - 'C4 FF C2 C2 C2 FF C1 C1 C1 FF BC BC BC FF BD BD' - 'BD FF 00 00 00 FF 18 18 18 FF 00 00 00 FF E0 E0' - 'E0 FF E1 E1 E1 FF E2 E2 E2 FF E3 E3 E3 FF 00 00' - '00 FA EA EA EA FF E8 E8 E8 FF 00 FF 00 FF CB CB' - 'CB FF 66 66 66 FF 66 66 66 FF 66 66 66 FF CD CD' - 'CD FF 00 00 00 FF 00 00 00 FF 00 00 00 FF E7 E7' - 'E7 FF E7 E7 E7 FF E7 E7 E7 FF E7 E7 E7 FF 00 00' - '00 F9 EF EF EF FF EB EB EB FF 3B 3B 3B FF 3B 3B' - '3B FF 3B 3B 3B FF 3B 3B 3B FF 3B 3B 3B FF 3B 3B' - '3B FF 00 00 00 FF 02 02 02 FF 00 00 00 FF E7 E7' - 'E7 FF E7 E7 E7 FF E7 E7 E7 FF E7 E7 E7 FF 00 00' - '00 F9 F7 F7 F7 FF F6 F6 F6 FF F5 F5 F5 FF F3 F3' - 'F3 FF F2 F2 F2 FF F1 F1 F1 FF F0 F0 F0 FF EF EF' - 'EF FF 00 00 00 FF 09 09 09 FF 10 10 10 FF 1E 1E' - '1E FF 42 42 42 FF 46 46 46 FF 2C 2C 2C FF 00 00' - '00 F7 F3 F3 F3 FF B7 B7 B7 FF DA DA DA FF D8 D8' - 'D8 FF D7 D7 D7 FF D7 D7 D7 FF D7 D7 D7 FF D8 D8' - 'D8 FF 00 00 00 FF 1F 1F 1F FF 2F 2F 2F FF 44 44' - '44 FF 49 49 49 FF 2C 2C 2C FF 1C 1C 1C FF 00 00' - '00 73 EF EF EF FF CB CB CB FF CE CE CE FF D5 D5' - 'D5 FF D5 D5 D5 FF D5 D5 D5 FF D5 D5 D5 FF D5 D5' - 'D5 FF 00 00 00 FF 5D 5D 5D FF 00 00 00 FF F9 EE' - 'E8 FF F0 CF BC FF E9 B6 99 FF E9 B6 99 FF 00 00' - '00 25 B7 B7 B7 FF CB CB CB FF D3 D3 D3 FF D0 D0' - 'D0 FF D0 D0 D0 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' - 'D3 FF 00 00 00 FF 6A 6A 6A FF 00 00 00 FF B8 B6' - 'B6 FF 5B 58 57 FF EA BC A1 FF E9 B6 99 FF 00 00' - '00 00 5F 5F 5F FF D2 D2 D2 FF D1 D1 D1 FF D1 D1' - 'D1 FF D1 D1 D1 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' - 'D3 FF 00 00 00 FF 79 79 79 FF 00 00 00 FF E0 E0' - 'E0 FF D9 D1 CC FF F0 CF BC FF EA BB A0 FF 00 00' - '00 00 18 18 18 FF DB DB DB FF DE DE DE FF DA DA' - 'DA FF DA DA DA FF DA DA DA FF DD DD DD FF DD DD' - 'DD FF DD DD DD FF D9 D9 D9 FF 7A 7A 7A FF 00 00' - '00 0A 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 FF E5 E5 E5 FF EB EB EB FF EB EB' - 'EB FF E4 E4 E4 FF E4 E4 E4 FF E4 E4 E4 FF E5 E5' - 'E5 FF E7 E7 E7 FF E6 E6 E6 FF 20 20 20 FF 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 DD E4 E4 E4 FF C1 C1 C1 FF ED ED' - 'ED FF EE EE EE FF EB EB EB FF ED ED ED FF ED ED' - 'ED FF C2 C2 C2 FF EC EC EC FF 00 00 00 FF 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 44 80 80 80 FF D7 D7 D7 FF D8 D8' - 'D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8' - 'D8 FF D9 D9 D9 FF B0 B0 B0 FF 00 00 00 ED 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 2C 00 00 00 84 00 00' - '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' - '00 84 00 00 00 84 00 00 00 70 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF 80' - '00 00 FF 80 00 00 80 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 80 00 00 00 80 07 00 00 80 0F' - '00 00 80 0F 00 00 80 0F 00 00 C0 1F 00 00' -} */ - - -/* BINRES drive.ico */ -8 ICON drive.ico -/* { - '00 00 01 00 08 00 20 20 00 00 01 00 08 00 A8 08' - '00 00 86 00 00 00 10 10 00 00 01 00 08 00 68 05' - '00 00 2E 09 00 00 20 20 00 00 01 00 04 00 E8 02' - '00 00 96 0E 00 00 10 10 00 00 01 00 04 00 28 01' - '00 00 7E 11 00 00 30 30 00 00 01 00 08 00 A8 0E' - '00 00 A6 12 00 00 30 30 00 00 01 00 20 00 A8 25' - '00 00 4E 21 00 00 20 20 00 00 01 00 20 00 A8 10' - '00 00 F6 46 00 00 10 10 00 00 01 00 20 00 68 04' - '00 00 9E 57 00 00 28 00 00 00 20 00 00 00 40 00' - '00 00 01 00 08 00 00 00 00 00 00 04 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 11 00 00 00 00 11 00 00 11 11 11 00 22 22' - '22 00 33 33 33 00 44 44 44 00 55 55 55 00 66 66' - '66 00 77 77 77 00 7F 7F 7F 00 00 CC 66 00 66 99' - '99 00 33 CC 99 00 66 CC 99 00 88 88 88 00 99 99' - '99 00 AA AA AA 00 BB BB BB 00 99 CC 99 00 CC CC' - 'CC 00 DD DD DD 00 EE EE EE 00 FF FF FF 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 C0 17 95 00 00 00 38 00 A8 44' - 'F9 77 13 00 00 00 18 0A 38 00 00 00 38 00 18 6C' - '38 00 98 17 95 00 00 00 00 00 E0 19 95 00 F0 88' - 'FA 77 70 38 F5 77 FF FF FF FF A8 44 F9 77 70 7D' - 'F5 77 3A 8A F5 77 86 00 00 00 86 00 00 00 08 00' - '00 00 B0 18 95 00 00 00 00 00 CB 44 F9 77 38 9F' - '07 00 CD 8B F5 77 78 13 05 00 37 90 F5 77 00 00' - '00 00 3E 8A F5 77 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 10 00' - '00 00 00 00 00 00 54 00 56 00 00 EC FD 7F 1A 02' - '00 00 4C 16 95 00 40 9F 07 00 FC 15 95 00 FF FF' - 'FF FF B4 1A 95 00 45 00 00 00 28 02 00 00 FF FF' - 'FF FF E2 D8 F5 77 7D 9B F5 77 94 B6 01 00 00 00' - '05 00 F4 17 95 00 80 00 10 C0 B4 1A 95 00 F0 88' - 'FA 77 88 1C F5 77 FF FF FF FF 37 90 F5 77 00 00' - '00 00 3E 8A F5 77 9B B2 E7 77 B7 00 00 00 02 00' - '00 00 A4 1A 95 00 01 00 00 00 18 00 00 00 00 00' - '00 00 10 19 95 00 42 00 00 00 00 00 00 00 F4 18' - '95 00 00 00 00 00 00 00 00 00 00 00 00 00 0C 00' - '00 00 02 00 00 00 01 01 F5 77 00 EC FD 7F 54 00' - '00 00 00 00 00 00 03 00 00 00 5C 00 1A 02 40 9F' - '07 00 00 00 00 00 40 9F 07 00 05 00 00 00 BE B3' - 'E7 77 4C 19 95 00 A3 B4 E7 77 F8 00 00 00 00 00' - '00 C0 00 00 00 00 00 00 00 00 02 00 00 00 80 00' - '00 00 00 00 00 00 8C 1A 95 00 7F E9 4B 00 50 6C' - '0C 01 00 00 00 C0 00 00 00 00 80 1A 95 00 02 00' - '00 00 80 00 00 00 00 00 00 00 C0 27 95 00 C4 F5' - 'AF 00 02 00 00 00 44 3A 5C 6F 73 65 78 70 65 72' - '74 73 5C 72 65 61 63 74 6F 73 5C 6C 69 62 5C 73' - '68 65 6C 6C 33 32 5C 64 72 69 76 65 2E 69 63 6F' - '00 00 1A 93 4B 00 14 1A 95 00 1F 3B D4 77 13 00' - '00 00 98 00 00 00 4F 3B D4 77 E0 19 95 00 33 3B' - 'D4 77 64 C5 F5 77 A9 F1 E7 77 F8 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 1A 95 00 18 6C' - '38 00 86 00 00 00 00 00 00 00 C9 F1 E7 77 86 00' - '00 00 A4 1A 95 00 08 00 00 00 00 00 00 00 86 00' - '00 00 86 00 00 00 08 00 00 00 F4 19 95 00 33 3B' - 'D4 77 B4 1A 95 00 09 48 E9 77 B8 10 E9 77 FF FF' - 'FF FF C9 F1 E7 77 16 EA 4B 00 F8 00 00 00 18 6C' - '38 00 86 00 00 00 58 1A 95 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 18 18 18 18 18 18 18 18 18 18 18 18 18 18' - '18 18 18 18 18 02 18 18 18 18 00 00 00 00 00 00' - '00 18 18 03 03 04 03 04 03 03 04 03 03 04 03 03' - '04 03 03 04 03 03 03 04 01 18 18 00 00 00 00 00' - '18 18 06 12 14 12 12 12 12 11 12 12 12 12 12 12' - '12 12 12 12 12 11 0F 10 0C 04 18 18 00 00 00 00' - '18 18 12 16 16 11 07 08 0F 10 11 12 12 11 12 12' - '12 12 12 12 12 12 0D 0B 10 0F 18 18 00 00 00 00' - '18 03 14 16 16 11 06 0F 0F 10 11 11 11 11 10 10' - '11 11 10 11 11 12 13 0E 12 0F 18 18 00 00 00 00' - '18 03 14 16 16 12 09 09 0F 10 10 11 12 0F 0F 10' - '0F 10 0F 10 11 14 12 12 14 10 18 18 00 00 00 00' - '18 03 15 16 16 12 08 0F 0F 10 11 11 12 10 09 0F' - '10 0F 0F 0F 11 14 14 12 14 0F 18 18 00 00 00 00' - '18 03 14 17 15 16 15 15 15 15 15 14 15 14 15 14' - '14 14 14 14 14 14 14 12 14 0F 18 18 00 00 00 00' - '18 03 14 17 17 16 17 17 16 17 16 17 16 17 16 17' - '16 17 16 17 16 16 16 17 15 10 18 18 00 00 00 00' - '18 03 15 16 15 15 15 15 15 15 15 15 15 15 15 15' - '15 15 15 15 15 15 15 15 17 10 18 18 00 00 00 00' - '18 03 15 15 11 11 14 15 15 14 15 15 14 15 14 15' - '14 15 14 15 14 12 11 12 16 10 18 18 00 00 00 00' - '18 18 11 15 12 12 12 14 14 15 15 15 15 16 15 16' - '15 15 15 14 15 11 12 12 16 09 18 18 00 00 00 00' - '18 18 0F 16 14 14 14 15 15 15 16 15 15 15 15 15' - '15 16 15 15 14 15 14 14 16 07 18 18 00 00 00 00' - '00 18 08 16 14 14 14 15 15 15 14 15 15 14 15 14' - '15 14 15 15 16 14 14 14 15 05 18 00 00 00 00 00' - '00 18 05 15 14 14 15 15 14 14 14 14 14 14 14 14' - '14 14 14 14 14 15 14 14 14 03 18 00 00 00 00 00' - '00 18 04 14 14 14 15 14 14 14 15 14 14 14 14 14' - '12 14 14 14 14 14 14 14 11 18 18 00 00 00 00 00' - '00 18 18 12 15 14 15 14 15 14 14 14 15 14 14 12' - '14 12 12 14 14 14 12 15 0F 18 18 00 00 00 00 00' - '00 18 18 10 15 14 14 15 14 15 14 15 14 14 15 15' - '14 12 14 12 12 12 12 14 08 18 18 00 00 00 00 00' - '00 18 18 09 15 15 14 15 14 15 15 15 15 15 14 15' - '15 15 15 15 15 12 14 14 06 18 18 00 00 00 00 00' - '00 00 18 06 15 15 15 14 16 15 15 15 15 15 15 15' - '15 15 15 15 14 15 15 14 05 18 00 00 00 00 00 00' - '00 00 18 05 14 16 15 15 14 15 15 16 15 16 16 15' - '16 15 15 15 15 15 15 11 03 18 00 00 00 00 00 00' - '00 00 18 04 11 15 16 16 16 15 15 15 15 15 15 15' - '15 15 15 15 16 16 15 10 18 18 00 00 00 00 00 00' - '00 00 18 18 11 16 14 14 15 16 16 15 16 15 15 16' - '15 16 16 15 12 15 15 09 18 18 00 00 00 00 00 00' - '00 00 18 18 0F 15 14 12 16 17 17 17 17 17 17 17' - '17 17 17 15 14 14 15 07 18 18 00 00 00 00 00 00' - '00 00 00 18 04 10 15 15 15 15 15 15 15 15 15 15' - '15 15 15 15 15 14 09 03 18 00 00 00 00 00 00 00' - '00 00 00 18 18 03 04 04 04 04 04 04 04 04 04 04' - '04 04 04 04 04 04 18 18 18 00 00 00 00 00 00 00' - '00 00 00 00 18 18 18 18 18 18 18 18 18 18 18 18' - '18 18 18 18 18 18 18 18 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF' - 'FF FF FF FF FF FF FF FF FF FF F0 00 00 0F E0 00' - '00 07 C0 00 00 03 C0 00 00 03 C0 00 00 03 C0 00' - '00 03 C0 00 00 03 C0 00 00 03 C0 00 00 03 C0 00' - '00 03 C0 00 00 03 C0 00 00 03 C0 00 00 03 E0 00' - '00 07 E0 00 00 07 E0 00 00 07 E0 00 00 07 E0 00' - '00 07 E0 00 00 07 F0 00 00 0F F0 00 00 0F F0 00' - '00 0F F0 00 00 0F F0 00 00 0F F8 00 00 1F F8 00' - '00 1F FC 00 00 3F FF FF FF FF FF FF FF FF 28 00' - '00 00 10 00 00 00 20 00 00 00 01 00 08 00 00 00' - '00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 11 00 11 11' - '11 00 22 00 00 00 22 22 22 00 44 44 44 00 55 55' - '55 00 66 66 66 00 77 77 77 00 7F 7F 7F 00 33 CC' - '99 00 88 88 88 00 99 99 99 00 AA AA AA 00 BB BB' - 'BB 00 99 CC 99 00 CC CC CC 00 DD DD DD 00 EE EE' - 'EE 00 00 00 00 00 CC CC CC 00 DD DD DD 00 EE EE' - 'EE 00 FF FF FF 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 C0 17' - '95 00 00 00 38 00 A8 44 F9 77 13 00 00 00 18 0A' - '38 00 00 00 38 00 18 6C 38 00 98 17 95 00 00 00' - '00 00 E0 19 95 00 F0 88 FA 77 70 38 F5 77 FF FF' - 'FF FF A8 44 F9 77 70 7D F5 77 3A 8A F5 77 86 00' - '00 00 86 00 00 00 08 00 00 00 B0 18 95 00 00 00' - '00 00 CB 44 F9 77 38 9F 07 00 CD 8B F5 77 78 13' - '05 00 37 90 F5 77 00 00 00 00 3E 8A F5 77 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 10 00 00 00 00 00 00 00 54 00' - '56 00 00 EC FD 7F 1A 02 00 00 4C 16 95 00 40 9F' - '07 00 FC 15 95 00 FF FF FF FF B4 1A 95 00 45 00' - '00 00 28 02 00 00 FF FF FF FF E2 D8 F5 77 7D 9B' - 'F5 77 94 B6 01 00 00 00 05 00 F4 17 95 00 80 00' - '10 C0 B4 1A 95 00 F0 88 FA 77 88 1C F5 77 FF FF' - 'FF FF 37 90 F5 77 00 00 00 00 3E 8A F5 77 9B B2' - 'E7 77 B7 00 00 00 02 00 00 00 A4 1A 95 00 01 00' - '00 00 18 00 00 00 00 00 00 00 10 19 95 00 42 00' - '00 00 00 00 00 00 F4 18 95 00 00 00 00 00 00 00' - '00 00 00 00 00 00 0C 00 00 00 02 00 00 00 01 01' - 'F5 77 00 EC FD 7F 54 00 00 00 00 00 00 00 03 00' - '00 00 5C 00 1A 02 40 9F 07 00 00 00 00 00 40 9F' - '07 00 05 00 00 00 BE B3 E7 77 4C 19 95 00 A3 B4' - 'E7 77 F8 00 00 00 00 00 00 C0 00 00 00 00 00 00' - '00 00 02 00 00 00 80 00 00 00 00 00 00 00 8C 1A' - '95 00 7F E9 4B 00 50 6C 0C 01 00 00 00 C0 00 00' - '00 00 80 1A 95 00 02 00 00 00 80 00 00 00 00 00' - '00 00 C0 27 95 00 C4 F5 AF 00 02 00 00 00 44 3A' - '5C 6F 73 65 78 70 65 72 74 73 5C 72 65 61 63 74' - '6F 73 5C 6C 69 62 5C 73 68 65 6C 6C 33 32 5C 64' - '72 69 76 65 2E 69 63 6F 00 00 1A 93 4B 00 14 1A' - '95 00 1F 3B D4 77 13 00 00 00 98 00 00 00 4F 3B' - 'D4 77 E0 19 95 00 33 3B D4 77 64 C5 F5 77 A9 F1' - 'E7 77 F8 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 1A 95 00 18 6C 38 00 86 00 00 00 00 00' - '00 00 C9 F1 E7 77 86 00 00 00 A4 1A 95 00 08 00' - '00 00 00 00 00 00 86 00 00 00 86 00 00 00 08 00' - '00 00 F4 19 95 00 33 3B D4 77 B4 1A 95 00 09 48' - 'E9 77 B8 10 E9 77 FF FF FF FF C9 F1 E7 77 16 EA' - '4B 00 F8 00 00 00 18 6C 38 00 86 00 00 00 58 1A' - '95 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 13 13 02 02 02 02 02 02 02' - '02 02 03 01 13 00 00 13 0C 0E 0B 0C 0D 0E 0D 0E' - '0E 0D 0A 07 13 00 00 02 11 10 07 0B 0D 0D 0C 0C' - '0C 0E 0F 0C 13 00 00 02 11 11 0C 0D 0E 0E 0C 0D' - '0C 0E 10 0D 13 00 00 02 11 12 12 12 11 11 12 11' - '11 11 11 0E 13 00 00 13 10 0E 10 10 11 11 11 11' - '11 10 10 0E 13 00 00 13 0D 10 10 11 11 11 11 11' - '11 10 11 0B 13 00 00 13 0B 11 11 11 10 10 10 11' - '10 10 11 07 13 00 00 13 07 11 10 10 11 10 10 0E' - '10 10 10 06 13 00 00 13 05 10 11 11 10 11 11 10' - '11 10 10 04 13 00 00 13 04 11 11 11 11 11 11 11' - '11 11 0E 02 13 00 00 00 13 0E 11 12 12 12 12 12' - '11 12 0D 13 00 00 00 00 13 08 10 11 11 12 11 12' - '10 10 07 13 00 00 00 00 13 13 04 02 04 02 04 02' - '04 02 13 13 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 FF FF 00 00 80 01 00 00 80 01' - '00 00 80 01 00 00 80 01 00 00 80 01 00 00 80 01' - '00 00 80 01 00 00 80 01 00 00 80 01 00 00 80 01' - '00 00 80 01 00 00 C0 03 00 00 C0 03 00 00 C0 03' - '00 00 FF FF 00 00 28 00 00 00 20 00 00 00 40 00' - '00 00 01 00 04 00 00 00 00 00 00 02 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 80 00 00 00 00 80 00 00 80 80 00 00 00 00' - '80 00 80 00 80 00 00 80 80 00 C0 C0 C0 00 80 80' - '80 00 FF 00 00 00 00 FF 00 00 FF FF 00 00 00 00' - 'FF 00 FF 00 FF 00 00 FF FF 00 FF FF FF 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 80 00 80 00 00 00 00 80 82 00 00 00 00 00' - '87 77 77 77 77 77 77 77 77 87 88 88 00 00 00 00' - '7F F7 88 87 87 77 77 77 77 77 2E 88 00 00 00 00' - '7F F8 88 88 78 78 77 88 77 77 77 78 00 00 00 00' - 'F7 F7 88 78 77 77 88 87 88 77 77 78 00 00 00 08' - '7F 77 88 88 87 78 88 78 88 77 77 77 00 00 00 00' - '7F FF 77 77 F7 77 77 77 77 77 77 78 00 00 00 00' - '7F FF FF FF FF FF FF FF FF 7F FF F8 00 00 00 04' - '7F 77 F7 FF 7F 7F 77 F7 F7 FF 77 F8 00 00 00 00' - 'F7 77 7F 77 7F 77 F7 F7 7F 77 77 77 00 00 00 00' - '77 77 77 77 F7 FF 7F 77 F7 77 77 F8 00 00 00 00' - '8F 77 77 FF 7F 77 F7 FF 7F 77 77 F8 00 00 00 00' - '8F 77 7F F7 F7 7F 7F 77 F7 7F 7F 78 00 00 00 00' - '8F 77 F7 77 7F 77 77 F7 7F 77 77 70 00 00 00 00' - '87 7F 77 7F 77 F7 7F 77 77 7F 77 70 00 00 00 00' - '07 77 F7 77 F7 77 77 77 77 77 7F 80 00 00 00 00' - '08 7F 77 F7 77 7F 77 77 77 77 77 80 00 00 00 00' - '08 F7 7F 7F 7F 77 F7 F7 F7 77 77 80 00 00 00 00' - '08 7F 77 F7 F7 FF 7F 7F 7F 77 F7 80 00 00 00 00' - '04 7F 7F 7F 7F 7F F7 F7 F7 F7 77 00 00 00 00 00' - '08 8F FF 77 F7 F7 7F 7F 7F 7F F8 00 00 00 00 00' - '00 77 77 FF 7F 7F F7 F7 FF 77 F8 00 00 00 00 00' - '00 8F 77 FF FF FF FF FF F7 7F 78 00 00 00 00 00' - '00 48 7F 77 F7 F7 7F 7F 77 F7 80 00 00 00 00 00' - '00 00 80 48 08 04 80 80 48 04 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF' - 'FF FF FF FF FF FF FF FF FF FF F0 00 00 0F E0 00' - '00 07 C0 00 00 03 C0 00 00 03 C0 00 00 03 C0 00' - '00 03 C0 00 00 03 C0 00 00 03 C0 00 00 03 C0 00' - '00 03 C0 00 00 03 C0 00 00 03 C0 00 00 03 E0 00' - '00 07 E0 00 00 07 E0 00 00 07 E0 00 00 07 E0 00' - '00 07 E0 00 00 07 F0 00 00 0F F0 00 00 0F F0 00' - '00 0F F0 00 00 0F F0 00 00 0F F8 00 00 1F F8 00' - '00 1F FC 00 00 3F FF FF FF FF FF FF FF FF 28 00' - '00 00 10 00 00 00 20 00 00 00 01 00 04 00 00 00' - '00 00 80 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 80 00 00 00 00 80' - '00 00 80 80 00 00 00 00 80 00 80 00 80 00 00 80' - '80 00 C0 C0 C0 00 80 80 80 00 FF 00 00 00 00 FF' - '00 00 FF FF 00 00 00 00 FF 00 FF 00 FF 00 00 FF' - 'FF 00 FF FF FF 00 00 00 00 00 00 00 00 00 00 00' - '80 00 00 02 00 00 00 87 88 77 77 77 68 00 00 F7' - '88 87 87 87 78 00 08 77 87 77 87 87 77 00 00 FF' - 'F7 FF 7F 7F 77 00 00 77 77 F7 F7 F7 77 00 00 77' - '7F 77 F7 7F 78 00 00 87 F7 7F 77 F7 F8 00 00 8F' - '77 F7 77 77 78 00 00 87 7F 77 7F 77 78 00 00 47' - 'F7 F7 F7 F7 70 00 00 07 F7 FF 7F 7F 70 00 00 08' - '7F 7F F7 F7 80 00 00 00 04 08 00 40 00 00 00 00' - '00 00 00 00 00 00 FF FF 00 00 80 01 00 00 80 01' - '00 00 80 01 00 00 80 01 00 00 80 01 00 00 80 01' - '00 00 80 01 00 00 80 01 00 00 80 01 00 00 80 01' - '00 00 80 01 00 00 C0 03 00 00 C0 03 00 00 C0 03' - '00 00 FF FF 00 00 28 00 00 00 30 00 00 00 60 00' - '00 00 01 00 08 00 00 00 00 00 00 09 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 11 00 11 11 11 00 22 22 22 00 33 33' - '33 00 44 44 44 00 55 55 55 00 66 66 66 00 77 77' - '77 00 7F 7F 7F 00 00 99 66 00 33 99 66 00 00 CC' - '66 00 33 CC 66 00 66 99 99 00 88 88 88 00 99 99' - '99 00 AA AA AA 00 BB BB BB 00 99 CC 99 00 99 FF' - '99 00 99 CC CC 00 CC CC CC 00 DD DD DD 00 EE EE' - 'EE 00 FF FF FF 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 C0 17 95 00 00 00 38 00 A8 44' - 'F9 77 13 00 00 00 18 0A 38 00 00 00 38 00 18 6C' - '38 00 98 17 95 00 00 00 00 00 E0 19 95 00 F0 88' - 'FA 77 70 38 F5 77 FF FF FF FF A8 44 F9 77 70 7D' - 'F5 77 3A 8A F5 77 86 00 00 00 86 00 00 00 08 00' - '00 00 B0 18 95 00 00 00 00 00 CB 44 F9 77 38 9F' - '07 00 CD 8B F5 77 78 13 05 00 37 90 F5 77 00 00' - '00 00 3E 8A F5 77 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 10 00' - '00 00 00 00 00 00 54 00 56 00 00 EC FD 7F 1A 02' - '00 00 4C 16 95 00 40 9F 07 00 FC 15 95 00 FF FF' - 'FF FF B4 1A 95 00 45 00 00 00 28 02 00 00 FF FF' - 'FF FF E2 D8 F5 77 7D 9B F5 77 94 B6 01 00 00 00' - '05 00 F4 17 95 00 80 00 10 C0 B4 1A 95 00 F0 88' - 'FA 77 88 1C F5 77 FF FF FF FF 37 90 F5 77 00 00' - '00 00 3E 8A F5 77 9B B2 E7 77 B7 00 00 00 02 00' - '00 00 A4 1A 95 00 01 00 00 00 18 00 00 00 00 00' - '00 00 10 19 95 00 42 00 00 00 00 00 00 00 F4 18' - '95 00 00 00 00 00 00 00 00 00 00 00 00 00 0C 00' - '00 00 02 00 00 00 01 01 F5 77 00 EC FD 7F 54 00' - '00 00 00 00 00 00 03 00 00 00 5C 00 1A 02 40 9F' - '07 00 00 00 00 00 40 9F 07 00 05 00 00 00 BE B3' - 'E7 77 4C 19 95 00 A3 B4 E7 77 F8 00 00 00 00 00' - '00 C0 00 00 00 00 00 00 00 00 02 00 00 00 80 00' - '00 00 00 00 00 00 8C 1A 95 00 7F E9 4B 00 50 6C' - '0C 01 00 00 00 C0 00 00 00 00 80 1A 95 00 02 00' - '00 00 80 00 00 00 00 00 00 00 C0 27 95 00 C4 F5' - 'AF 00 02 00 00 00 44 3A 5C 6F 73 65 78 70 65 72' - '74 73 5C 72 65 61 63 74 6F 73 5C 6C 69 62 5C 73' - '68 65 6C 6C 33 32 5C 64 72 69 76 65 2E 69 63 6F' - '00 00 1A 93 4B 00 14 1A 95 00 1F 3B D4 77 13 00' - '00 00 98 00 00 00 4F 3B D4 77 E0 19 95 00 33 3B' - 'D4 77 64 C5 F5 77 A9 F1 E7 77 F8 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 1A 95 00 18 6C' - '38 00 86 00 00 00 00 00 00 00 C9 F1 E7 77 86 00' - '00 00 A4 1A 95 00 08 00 00 00 00 00 00 00 86 00' - '00 00 86 00 00 00 08 00 00 00 F4 19 95 00 33 3B' - 'D4 77 B4 1A 95 00 09 48 E9 77 B8 10 E9 77 FF FF' - 'FF FF C9 F1 E7 77 16 EA 4B 00 F8 00 00 00 18 6C' - '38 00 86 00 00 00 58 1A 95 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A' - '1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A' - '1A 1A 1A 1A 1A 1A 1A 00 00 00 00 00 00 00 00 00' - '00 00 00 00 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A' - '1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A' - '1A 1A 1A 1A 1A 1A 1A 1A 1A 00 00 00 00 00 00 00' - '00 00 00 1A 1A 1A 1A 02 03 03 04 03 03 04 03 03' - '04 03 03 04 03 03 03 04 03 03 03 03 04 03 03 04' - '03 03 03 04 01 1A 1A 1A 1A 00 00 00 00 00 00 00' - '00 00 00 1A 1A 03 10 16 16 16 16 16 16 16 16 16' - '12 16 12 12 16 12 12 12 16 12 12 12 12 12 12 11' - '12 12 11 11 11 07 1A 1A 1A 00 00 00 00 00 00 00' - '00 00 1A 1A 1A 0F 17 18 18 17 0F 0F 10 10 10 11' - '12 16 12 16 16 16 16 17 16 16 16 17 16 16 16 16' - '16 11 0B 0B 13 12 06 1A 1A 1A 00 00 00 00 00 00' - '00 00 1A 1A 02 16 18 17 17 16 04 05 06 08 0F 0F' - '11 10 11 11 12 11 10 12 10 12 10 16 10 12 10 16' - '12 0D 0C 0A 0B 16 08 1A 1A 1A 00 00 00 00 00 00' - '00 00 1A 1A 03 16 18 17 18 17 05 06 08 0F 10 10' - '10 11 11 12 12 10 10 12 0F 12 10 12 10 12 0F 12' - '16 10 15 14 0E 16 0F 1A 1A 1A 00 00 00 00 00 00' - '00 00 1A 1A 04 17 18 18 17 16 07 08 08 0F 0F 10' - '10 11 11 11 12 11 08 12 08 11 0F 12 0F 12 08 16' - '16 12 11 10 16 12 10 1A 1A 1A 00 00 00 00 00 00' - '00 00 1A 1A 03 16 18 17 18 17 07 08 08 0F 0F 10' - '11 11 11 11 12 10 08 11 07 10 08 11 0F 11 07 12' - '12 16 12 16 12 16 0F 1A 1A 1A 00 00 00 00 00 00' - '00 00 1A 1A 03 17 18 18 17 17 07 07 08 0F 0F 0F' - '10 11 10 11 12 0F 07 11 06 10 07 12 07 11 06 16' - '16 12 16 12 12 16 0F 1A 1A 1A 00 00 00 00 00 00' - '00 00 1A 1A 03 16 18 18 18 17 11 11 11 11 11 12' - '11 12 12 12 12 12 11 12 11 12 12 12 11 12 11 12' - '16 12 16 12 16 12 10 1A 1A 1A 00 00 00 00 00 00' - '00 00 1A 1A 03 17 18 18 18 18 17 18 18 18 17 17' - '18 17 17 17 17 17 17 17 17 17 16 17 16 16 16 16' - '16 16 12 16 12 16 0F 1A 1A 1A 00 00 00 00 00 00' - '00 00 1A 1A 03 16 18 19 19 18 19 19 18 18 18 19' - '18 19 18 19 18 18 18 18 18 18 18 18 18 18 18 18' - '18 18 18 18 17 17 0F 1A 1A 1A 00 00 00 00 00 00' - '00 00 1A 1A 03 17 19 17 17 18 17 17 18 17 17 17' - '17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17' - '18 17 18 17 19 18 0F 1A 1A 1A 00 00 00 00 00 00' - '00 00 1A 1A 03 17 19 17 16 12 12 17 16 17 17 16' - '17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17' - '16 12 12 16 17 19 10 1A 1A 1A 00 00 00 00 00 00' - '00 00 1A 1A 03 17 18 16 11 11 11 16 17 17 16 17' - '17 16 17 16 17 17 16 17 16 17 16 17 16 17 17 16' - '11 12 11 12 16 19 10 1A 1A 1A 00 00 00 00 00 00' - '00 00 1A 1A 1A 12 19 12 11 16 11 12 17 16 17 17' - '16 17 16 17 16 16 17 16 17 16 17 16 17 17 16 16' - '11 12 12 11 17 19 08 1A 1A 1A 00 00 00 00 00 00' - '00 00 00 1A 1A 11 18 16 16 16 16 16 16 17 16 16' - '17 17 17 18 18 18 18 18 17 18 17 17 16 16 17 16' - '16 16 12 16 16 18 06 1A 1A 00 00 00 00 00 00 00' - '00 00 00 1A 1A 08 18 17 16 16 16 16 16 16 17 18' - '18 17 17 17 17 17 17 17 17 17 17 18 18 18 16 16' - '16 16 16 16 17 17 04 1A 1A 00 00 00 00 00 00 00' - '00 00 00 1A 1A 06 18 16 16 16 16 16 17 18 18 17' - '16 17 17 17 16 17 17 16 17 17 16 17 17 17 18 17' - '16 16 16 16 17 12 03 1A 1A 00 00 00 00 00 00 00' - '00 00 00 1A 1A 05 17 16 16 16 16 16 18 17 16 16' - '16 17 16 16 16 17 16 16 17 16 16 17 16 16 17 18' - '16 16 16 16 17 11 1A 1A 1A 00 00 00 00 00 00 00' - '00 00 00 1A 1A 03 12 17 16 16 16 18 16 16 17 16' - '17 16 17 16 16 16 16 16 16 16 16 16 16 16 16 16' - '18 16 16 16 17 0F 1A 1A 1A 00 00 00 00 00 00 00' - '00 00 00 1A 1A 1A 10 17 16 16 17 16 17 16 16 16' - '16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16' - '16 17 12 16 17 06 1A 1A 1A 00 00 00 00 00 00 00' - '00 00 00 00 1A 1A 0F 17 17 16 17 16 16 17 16 17' - '16 17 16 16 16 16 16 16 12 16 12 16 16 16 12 16' - '16 16 16 16 17 05 1A 1A 00 00 00 00 00 00 00 00' - '00 00 00 00 1A 1A 06 17 16 16 16 17 16 16 16 16' - '16 16 16 16 17 16 16 12 16 12 16 12 16 12 16 12' - '16 12 16 16 17 03 1A 1A 00 00 00 00 00 00 00 00' - '00 00 00 00 1A 1A 05 17 16 17 16 16 17 16 17 16' - '17 16 17 16 16 17 16 16 16 12 16 12 12 12 16 12' - '12 16 12 16 11 03 1A 1A 00 00 00 00 00 00 00 00' - '00 00 00 00 1A 1A 03 16 17 16 16 17 16 17 16 17' - '16 17 16 16 17 16 16 17 16 17 16 16 16 16 12 16' - '16 11 12 16 11 1A 1A 1A 00 00 00 00 00 00 00 00' - '00 00 00 00 1A 1A 02 12 17 17 16 16 17 17 17 17' - '17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 16' - '16 16 16 16 08 1A 1A 1A 00 00 00 00 00 00 00 00' - '00 00 00 00 1A 1A 1A 10 17 17 17 16 17 17 17 17' - '17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17' - '16 17 17 16 06 1A 1A 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 1A 1A 08 17 17 18 17 16 17 17 17' - '17 17 18 17 17 18 17 17 17 17 17 17 18 17 17 16' - '17 17 17 12 04 1A 1A 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 1A 1A 06 16 17 17 18 17 17 16 17' - '17 18 17 18 17 17 18 17 17 18 18 17 17 16 16 18' - '17 18 16 11 03 1A 1A 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 1A 1A 04 12 18 17 17 18 17 17 16' - '17 17 17 17 18 17 17 18 17 17 17 17 16 17 18 17' - '18 17 17 10 1A 1A 1A 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 1A 1A 02 11 18 18 18 18 18 18 18' - '17 17 17 17 17 17 17 17 17 17 17 17 18 18 17 18' - '17 18 17 0F 1A 1A 1A 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 1A 1A 1A 11 17 17 12 12 17 18 18' - '18 18 18 18 18 17 18 18 18 18 18 18 18 17 16 12' - '17 18 16 08 1A 1A 1A 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 1A 1A 0F 17 16 11 12 11 18 18' - '18 18 18 18 18 18 18 18 18 18 18 18 18 17 11 12' - '11 18 16 07 1A 1A 1A 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 1A 1A 07 16 17 17 17 17 19 19' - '19 19 19 19 19 19 19 19 19 19 19 19 19 18 17 17' - '17 17 11 04 1A 1A 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 1A 1A 02 0F 12 17 17 17 17 17' - '17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17' - '17 11 07 1A 1A 1A 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 1A 1A 1A 1A 05 05 05 05 05 05' - '05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05' - '05 04 1A 1A 1A 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 1A 1A 1A 1A 1A 1A 1A 1A 1A' - '1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A' - '1A 1A 1A 1A 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 1A 1A 1A 1A 1A 1A 1A' - '1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A' - '1A 1A 1A 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF' - 'FF FF FF FF 00 00 FF FF FF FF FF FF 00 00 FF FF' - 'FF FF FF FF 00 00 FF FF FF FF FF FF 00 00 FF 00' - '00 00 00 7F 00 00 FC 00 00 00 00 1F 00 00 F8 00' - '00 00 00 1F 00 00 F8 00 00 00 00 1F 00 00 F0 00' - '00 00 00 0F 00 00 F0 00 00 00 00 0F 00 00 F0 00' - '00 00 00 0F 00 00 F0 00 00 00 00 0F 00 00 F0 00' - '00 00 00 0F 00 00 F0 00 00 00 00 0F 00 00 F0 00' - '00 00 00 0F 00 00 F0 00 00 00 00 0F 00 00 F0 00' - '00 00 00 0F 00 00 F0 00 00 00 00 0F 00 00 F0 00' - '00 00 00 0F 00 00 F0 00 00 00 00 0F 00 00 F0 00' - '00 00 00 0F 00 00 F8 00 00 00 00 1F 00 00 F8 00' - '00 00 00 1F 00 00 F8 00 00 00 00 1F 00 00 F8 00' - '00 00 00 1F 00 00 F8 00 00 00 00 1F 00 00 F8 00' - '00 00 00 1F 00 00 FC 00 00 00 00 3F 00 00 FC 00' - '00 00 00 3F 00 00 FC 00 00 00 00 3F 00 00 FC 00' - '00 00 00 3F 00 00 FC 00 00 00 00 3F 00 00 FC 00' - '00 00 00 7F 00 00 FE 00 00 00 00 7F 00 00 FE 00' - '00 00 00 7F 00 00 FE 00 00 00 00 7F 00 00 FE 00' - '00 00 00 7F 00 00 FE 00 00 00 00 7F 00 00 FF 00' - '00 00 00 7F 00 00 FF 00 00 00 00 FF 00 00 FF 00' - '00 00 00 FF 00 00 FF 00 00 00 01 FF 00 00 FF 80' - '00 00 03 FF 00 00 FF E0 00 00 07 FF 00 00 FF FF' - 'FF FF FF FF 00 00 FF FF FF FF FF FF 00 00 FF FF' - 'FF FF FF FF 00 00 FF FF FF FF FF FF 00 00 28 00' - '00 00 30 00 00 00 60 00 00 00 01 00 20 00 00 00' - '00 00 00 24 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 16 00 00 00 34 00 00' - '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' - '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' - '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' - '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' - '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' - '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' - '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' - '00 35 00 00 00 18 00 00 00 04 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 05 00 00 00 69 00 00 00 C5 00 00 00 F7 00 00' - '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' - '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' - '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' - '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' - '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' - '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' - '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' - '00 F1 00 00 00 B1 00 00 00 5C 00 00 00 0D 00 00' - '00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 05 00 00' - '00 9B 00 00 00 FF 00 00 00 FF 21 21 21 FF 2C 2C' - '2C FF 2B 2B 2B FF 2C 2C 2C FF 2B 2B 2B FF 2B 2B' - '2B FF 2B 2B 2B FF 2B 2B 2B FF 2B 2B 2B FF 2B 2B' - '2B FF 2B 2B 2B FF 2B 2B 2B FF 2B 2B 2B FF 2B 2B' - '2B FF 2B 2B 2B FF 2A 2A 2A FF 2A 2A 2A FF 2A 2A' - '2A FF 2A 2A 2A FF 2A 2A 2A FF 2A 2A 2A FF 2A 2A' - '2A FF 2A 2A 2A FF 2A 2A 2A FF 2B 2B 2B FF 2B 2B' - '2B FF 2B 2B 2B FF 2E 2C 2D FF 2E 2C 2D FF 13 13' - '13 FF 00 00 00 FF 00 00 00 F6 00 00 00 69 00 00' - '00 09 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 54 00 00' - '00 FF 26 26 26 FF 90 90 90 FF CA CA CA FF CD CD' - 'CD FF CB CB CB FF CE CE CE FF CD CD CD FF CC CC' - 'CC FF CB CB CB FF C9 C9 C9 FF C7 C7 C7 FF C6 C6' - 'C6 FF C5 C5 C5 FF C4 C4 C4 FF C3 C3 C3 FF C2 C2' - 'C2 FF C2 C2 C2 FF C3 C3 C3 FF C0 C0 C0 FF C1 C1' - 'C1 FF BF BF BF FF BF BF BF FF BC BC BC FF BD BD' - 'BD FF BA BA BA FF BB BB BB FF B5 B5 B5 FF B3 B4' - 'B3 FF B8 B4 B6 FF AD AD AD FF AB AC AC FF AD A8' - 'AB FF 63 63 63 FF 09 09 09 FF 00 00 00 EF 00 00' - '00 42 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 03 00 00 00 AD 01 01' - '01 FF 8A 8A 8A FF EB EB EB FF E8 E8 E8 FF E7 E7' - 'E7 FF D5 D5 D5 FF 85 85 85 FF 88 88 88 FF 92 92' - '92 FF 98 98 98 FF A2 A2 A2 FF AD AD AD FF BA BA' - 'BA FF C0 C0 C0 FF C3 C3 C3 FF C6 C6 C6 FF CB CB' - 'CB FF CA CA CA FF CA CA CA FF D6 D6 D6 FF CA CA' - 'CA FF D3 D3 D3 FF CB CB CB FF D7 D7 D7 FF CC CC' - 'CC FF D4 D4 D4 FF C7 C7 C7 FF C8 C9 C9 FF C6 C2' - 'C4 FF 9D B3 A8 FF 20 A8 63 FF 1C A8 60 FF 90 AF' - 'A0 FF BF BB BD FF 4F 4F 4F FF 00 00 00 FF 00 00' - '00 81 00 00 00 04 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 15 00 00 00 F0 19 19' - '19 FF C7 C7 C7 FF EC EC EC FF E2 E2 E2 FF E6 E6' - 'E6 FF CB CB CB FF 3B 3B 3B FF 3F 3F 3F FF 56 56' - '56 FF 72 72 72 FF 87 87 87 FF 92 92 92 FF 9D 9D' - '9D FF A5 A5 A5 FF A8 A8 A8 FF AC AC AC FF B7 B7' - 'B7 FF A9 A9 A9 FF 9C 9C 9C FF BD BD BD FF 99 99' - '99 FF B7 B7 B7 FF A1 A1 A1 FF C3 C3 C3 FF A3 A3' - 'A3 FF BD BD BD FF 98 98 98 FF C5 C4 C4 FF C7 BF' - 'C3 FF 51 A7 7C FF 17 CE 71 FF 0A BF 61 FF 2F 99' - '64 FF C3 BD C0 FF 84 83 84 FF 01 01 01 FF 00 00' - '00 A3 00 00 00 0B 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 30 00 00 00 FA 29 29' - '29 FF D1 D1 D1 FF EA EA EA FF E4 E4 E4 FF E7 E7' - 'E7 FF CD CD CD FF 47 47 47 FF 5F 5F 5F FF 79 79' - '79 FF 87 87 87 FF 8F 8F 8F FF 97 97 97 FF A0 A0' - 'A0 FF A7 A7 A7 FF AA AA AA FF AE AE AE FF B9 B9' - 'B9 FF A4 A4 A4 FF 90 90 90 FF B8 B8 B8 FF 8A 8A' - '8A FF AF AF AF FF 94 94 94 FF BF BF BF FF 97 97' - '97 FF B7 B7 B7 FF 88 88 88 FF C4 C3 C3 FF C6 C3' - 'C5 FF 95 B2 A3 FF 91 D6 B4 FF 91 D8 B5 FF 83 AB' - '97 FF C4 C1 C3 FF 8E 8E 8E FF 01 01 01 FF 00 00' - '00 B7 00 00 00 13 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 34 00 00 00 F9 28 28' - '28 FF D1 D1 D1 FF EC EC EC FF E6 E6 E6 FF E7 E7' - 'E7 FF D1 D1 D1 FF 68 68 68 FF 74 74 74 FF 7E 7E' - '7E FF 85 85 85 FF 8E 8E 8E FF 97 97 97 FF A0 A0' - 'A0 FF A7 A7 A7 FF AA AA AA FF AE AE AE FF BA BA' - 'BA FF 9F 9F 9F FF 83 83 83 FF B3 B3 B3 FF 7C 7C' - '7C FF A8 A8 A8 FF 87 87 87 FF BB BB BB FF 8A 8A' - '8A FF B2 B2 B2 FF 79 79 79 FF C2 C2 C2 FF C4 C4' - 'C4 FF C6 C3 C4 FF 99 AC A2 FF 96 AB A0 FF C2 BE' - 'C0 FF C4 C4 C4 FF 8D 8D 8D FF 01 01 01 FF 00 00' - '00 BA 00 00 00 14 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 33 00 00 00 F9 28 28' - '28 FF D1 D1 D1 FF EE EE EE FF E7 E7 E7 FF E8 E8' - 'E8 FF D6 D6 D6 FF 70 70 70 FF 71 71 71 FF 7D 7D' - '7D FF 85 85 85 FF 8E 8E 8E FF 97 97 97 FF A0 A0' - 'A0 FF A7 A7 A7 FF AA AA AA FF AE AE AE FF BB BB' - 'BB FF 98 98 98 FF 73 73 73 FF AD AD AD FF 6A 6A' - '6A FF A0 A0 A0 FF 78 78 78 FF B7 B7 B7 FF 7C 7C' - '7C FF AB AB AB FF 67 67 67 FF C2 C2 C2 FF C6 C6' - 'C6 FF C4 C3 C4 FF C7 C4 C5 FF C6 C2 C4 FF BF BF' - 'BF FF C5 C5 C5 FF 8D 8D 8D FF 01 01 01 FF 00 00' - '00 B9 00 00 00 14 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 33 00 00 00 F9 27 27' - '27 FF D1 D1 D1 FF EF EF EF FF E9 E9 E9 FF EB EB' - 'EB FF D6 D6 D6 FF 6A 6A 6A FF 6C 6C 6C FF 78 78' - '78 FF 81 81 81 FF 8A 8A 8A FF 93 93 93 FF 9C 9C' - '9C FF A3 A3 A3 FF A6 A6 A6 FF AB AB AB FF B9 B9' - 'B9 FF 90 90 90 FF 66 66 66 FF A5 A5 A5 FF 5B 5B' - '5B FF 98 98 98 FF 6B 6B 6B FF B1 B1 B1 FF 70 70' - '70 FF A4 A4 A4 FF 58 58 58 FF C1 C1 C1 FF C8 C8' - 'C8 FF C5 C5 C5 FF C3 C3 C3 FF C2 C2 C2 FF C1 C1' - 'C1 FF C6 C6 C6 FF 8E 8E 8E FF 01 01 01 FF 00 00' - '00 B9 00 00 00 14 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 33 00 00 00 F9 27 27' - '27 FF D2 D2 D2 FF F2 F2 F2 FF EB EB EB FF EA EA' - 'EA FF DF DF DF FF A7 A7 A7 FF A7 A7 A7 FF AB AB' - 'AB FF AE AE AE FF B0 B0 B0 FF B3 B3 B3 FF B6 B6' - 'B6 FF B9 B9 B9 FF B9 B9 B9 FF BA BA BA FF BD BD' - 'BD FF B7 B7 B7 FF B1 B1 B1 FF BE BE BE FF AF AF' - 'AF FF BA BA BA FF B1 B1 B1 FF BE BE BE FF B0 B0' - 'B0 FF BA BA BA FF AB AB AB FF C5 C5 C5 FF C8 C8' - 'C8 FF C6 C6 C6 FF C4 C4 C4 FF C3 C3 C3 FF C2 C2' - 'C2 FF C9 C9 C9 FF 8E 8E 8E FF 00 00 00 FF 00 00' - '00 B9 00 00 00 14 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 33 00 00 00 F9 26 26' - '26 FF D3 D3 D3 FF F3 F3 F3 FF EB EB EB FF EB EB' - 'EB FF EA EA EA FF ED ED ED FF EB EB EB FF E9 E9' - 'E9 FF E8 E8 E8 FF E6 E6 E6 FF E4 E4 E4 FF E2 E2' - 'E2 FF E1 E1 E1 FF DF DF DF FF DE DE DE FF DB DB' - 'DB FF DB DB DB FF DC DC DC FF D8 D8 D8 FF D9 D9' - 'D9 FF D6 D6 D6 FF D6 D6 D6 FF D2 D2 D2 FF D2 D2' - 'D2 FF CF CF CF FF D0 D0 D0 FF CB CB CB FF CA CA' - 'CA FF C9 C9 C9 FF C7 C7 C7 FF C4 C4 C4 FF C0 C0' - 'C0 FF CA CA CA FF 8E 8E 8E FF 00 00 00 FF 00 00' - '00 B9 00 00 00 14 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 33 00 00 00 F9 26 26' - '26 FF D3 D3 D3 FF F7 F7 F7 FF F8 F8 F8 FF F6 F6' - 'F6 FF F6 F6 F6 FF F6 F6 F6 FF F5 F5 F5 FF F5 F5' - 'F5 FF F4 F4 F4 FF F4 F4 F4 FF F3 F3 F3 FF F3 F3' - 'F3 FF F3 F3 F3 FF F2 F2 F2 FF F2 F2 F2 FF F1 F1' - 'F1 FF F1 F1 F1 FF F1 F1 F1 FF F0 F0 F0 FF F0 F0' - 'F0 FF F0 F0 F0 FF EF EF EF FF EF EF EF FF EE EE' - 'EE FF EE EE EE FF ED ED ED FF ED ED ED FF ED ED' - 'ED FF EC EC EC FF EC EC EC FF EB EB EB FF E0 E0' - 'E0 FF D0 D0 D0 FF 8D 8D 8D FF 00 00 00 FF 00 00' - '00 B9 00 00 00 14 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 33 00 00 00 F9 24 24' - '24 FF D6 D6 D6 FF FF FF FF FF E9 E9 E9 FF E1 E1' - 'E1 FF E2 E2 E2 FF E2 E2 E2 FF E0 E0 E0 FF DF DF' - 'DF FF DF DF DF FF DF DF DF FF DF DF DF FF DF DF' - 'DF FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' - 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' - 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' - 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E2 E2' - 'E2 FF E3 E3 E3 FF E3 E3 E3 FF E3 E3 E3 FF F8 F8' - 'F8 FF EF EF EF FF 8C 8C 8C FF 00 00 00 FF 00 00' - '00 B9 00 00 00 14 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 34 00 00 00 FA 24 24' - '24 FF DE DE DE FF F8 F8 F8 FF D9 D9 D9 FF C4 C4' - 'C4 FF BB BB BB FF BF BF BF FF D8 D8 D8 FF DA DA' - 'DA FF D9 D9 D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9' - 'D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9' - 'D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9' - 'D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9' - 'D9 FF D9 D9 D9 FF D9 D9 D9 FF DB DB DB FF CF CF' - 'CF FF BC BC BC FF BB BB BB FF D1 D1 D1 FF DE DE' - 'DE FF FF FF FF FF 9A 9A 9A FF 00 00 00 FF 00 00' - '00 BA 00 00 00 14 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 25 00 00 00 F7 1F 1F' - '1F FF DA DA DA FF F3 F3 F3 FF C6 C6 C6 FF A9 A9' - 'A9 FF B7 B7 B7 FF B0 B0 B0 FF C3 C3 C3 FF DA DA' - 'DA FF D8 D8 D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8' - 'D8 FF D8 D8 D8 FF D7 D7 D7 FF D7 D7 D7 FF D7 D7' - 'D7 FF D7 D7 D7 FF D7 D7 D7 FF D7 D7 D7 FF D7 D7' - 'D7 FF D7 D7 D7 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8' - 'D8 FF D8 D8 D8 FF D9 D9 D9 FF D2 D2 D2 FF A8 A8' - 'A8 FF B6 B6 B6 FF B1 B1 B1 FF B5 B5 B5 FF D8 D8' - 'D8 FF FC FC FC FF 9C 9C 9C FF 00 00 00 FF 00 00' - '00 AE 00 00 00 0C 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 07 00 00 00 D0 05 05' - '05 FF C2 C2 C2 FF F6 F6 F6 FF BC BC BC FF B2 B2' - 'B2 FF C3 C3 C3 FF AB AB AB FF BB BB BB FF D8 D8' - 'D8 FF D5 D5 D5 FF D5 D5 D5 FF D5 D5 D5 FF D4 D4' - 'D4 FF D3 D3 D3 FF D3 D3 D3 FF D5 D5 D5 FF D7 D7' - 'D7 FF D8 D8 D8 FF D8 D8 D8 FF D7 D7 D7 FF D5 D5' - 'D5 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D4 D4' - 'D4 FF D5 D5 D5 FF D7 D7 D7 FF C9 C9 C9 FF A6 A6' - 'A6 FF C3 C3 C3 FF B3 B3 B3 FF AD AD AD FF D6 D6' - 'D6 FF F5 F5 F5 FF 76 76 76 FF 00 00 00 FF 00 00' - '00 8C 00 00 00 01 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 9C 00 00' - '00 FF A4 A4 A4 FF F4 F4 F4 FF CF CF CF FF C5 C5' - 'C5 FF D2 D2 D2 FF BF BF BF FF C9 C9 C9 FF D3 D3' - 'D3 FF D2 D2 D2 FF D0 D0 D0 FF D3 D3 D3 FF DD DD' - 'DD FF E1 E1 E1 FF E3 E3 E3 FF E6 E6 E6 FF EA EA' - 'EA FF ED ED ED FF ED ED ED FF EB EB EB FF E7 E7' - 'E7 FF E4 E4 E4 FF E2 E2 E2 FF DE DE DE FF D4 D4' - 'D4 FF D0 D0 D0 FF D2 D2 D2 FF D3 D3 D3 FF C5 C5' - 'C5 FF D0 D0 D0 FF C2 C2 C2 FF BF BF BF FF D9 D9' - 'D9 FF E8 E8 E8 FF 56 56 56 FF 00 00 00 FF 00 00' - '00 72 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 73 00 00' - '00 FF 7E 7E 7E FF EF EF EF FF D1 D1 D1 FF CF CF' - 'CF FF CB CB CB FF CF CF CF FF D1 D1 D1 FF CE CE' - 'CE FF CF CF CF FF DF DF DF FF F0 F0 F0 FF EC EC' - 'EC FF E1 E1 E1 FF DE DE DE FF DD DD DD FF DC DC' - 'DC FF DB DB DB FF DB DB DB FF DC DC DC FF DD DD' - 'DD FF DE DE DE FF E1 E1 E1 FF EC EC EC FF F1 F1' - 'F1 FF E1 E1 E1 FF D1 D1 D1 FF CE CE CE FF D0 D0' - 'D0 FF CB CB CB FF CE CE CE FF D1 D1 D1 FF D9 D9' - 'D9 FF D4 D4 D4 FF 3F 3F 3F FF 00 00 00 FF 00 00' - '00 55 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 59 00 00' - '00 FF 59 59 59 FF E9 E9 E9 FF D0 D0 D0 FF CD CD' - 'CD FF CD CD CD FF CD CD CD FF CA CA CA FF D6 D6' - 'D6 FF ED ED ED FF E6 E6 E6 FF DC DC DC FF D4 D4' - 'D4 FF D5 D5 D5 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6' - 'D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6' - 'D6 FF D6 D6 D6 FF D5 D5 D5 FF D5 D5 D5 FF DB DB' - 'DB FF E4 E4 E4 FF ED ED ED FF DA DA DA FF CA CA' - 'CA FF CD CD CD FF CD CD CD FF CB CB CB FF DF DF' - 'DF FF B8 B8 B8 FF 22 22 22 FF 00 00 00 FB 00 00' - '00 3A 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 3E 00 00' - '00 FE 40 40 40 FF D7 D7 D7 FF D2 D2 D2 FF CA CA' - 'CA FF CB CB CB FF CA CA CA FF D4 D4 D4 FF E9 E9' - 'E9 FF DC DC DC FF D0 D0 D0 FF D1 D1 D1 FF D2 D2' - 'D2 FF D2 D2 D2 FF D2 D2 D2 FF D2 D2 D2 FF D2 D2' - 'D2 FF D2 D2 D2 FF D2 D2 D2 FF D2 D2 D2 FF D2 D2' - 'D2 FF D2 D2 D2 FF D2 D2 D2 FF D2 D2 D2 FF D1 D1' - 'D1 FF D0 D0 D0 FF D8 D8 D8 FF EA EA EA FF D8 D8' - 'D8 FF C9 C9 C9 FF CA CA CA FF C9 C9 C9 FF E0 E0' - 'E0 FF A0 A0 A0 FF 08 08 08 FF 00 00 00 EB 00 00' - '00 22 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 25 00 00' - '00 F8 22 22 22 FF B7 B7 B7 FF DB DB DB FF CA CA' - 'CA FF CB CB CB FF CE CE CE FF E4 E4 E4 FF D4 D4' - 'D4 FF CF CF CF FF D1 D1 D1 FF D0 D0 D0 FF D0 D0' - 'D0 FF D0 D0 D0 FF D0 D0 D0 FF CF CF CF FF CD CD' - 'CD FF CE CE CE FF CE CE CE FF CE CE CE FF CE CE' - 'CE FF CE CE CE FF CE CE CE FF CE CE CE FF CE CE' - 'CE FF CE CE CE FF CC CC CC FF D0 D0 D0 FF E2 E2' - 'E2 FF CF CF CF FF C7 C7 C7 FF C9 C9 C9 FF E2 E2' - 'E2 FF 80 80 80 FF 00 00 00 FF 00 00 00 C2 00 00' - '00 0E 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 0C 00 00' - '00 E1 07 07 07 FF 9F 9F 9F FF DD DD DD FF CC CC' - 'CC FF CD CD CD FF DB DB DB FF D6 D6 D6 FF CE CE' - 'CE FF D0 D0 D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0' - 'D0 FF D0 D0 D0 FF D0 D0 D0 FF CF CF CF FF CC CC' - 'CC FF C9 C9 C9 FF CA CA CA FF CA CA CA FF CA CA' - 'CA FF CA CA CA FF CA CA CA FF CA CA CA FF CA CA' - 'CA FF CA CA CA FF CA CA CA FF C8 C8 C8 FF CF CF' - 'CF FF DA DA DA FF C7 C7 C7 FF C9 C9 C9 FF E2 E2' - 'E2 FF 5A 5A 5A FF 00 00 00 FF 00 00 00 94 00 00' - '00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 B2 00 00 00 FF 83 83 83 FF DD DD DD FF CF CF' - 'CF FF D1 D1 D1 FF DB DB DB FF D1 D1 D1 FF D0 D0' - 'D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0' - 'D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0 D0 FF CF CF' - 'CF FF C9 C9 C9 FF C5 C5 C5 FF C6 C6 C6 FF C6 C6' - 'C6 FF C6 C6 C6 FF C6 C6 C6 FF C6 C6 C6 FF C6 C6' - 'C6 FF C6 C6 C6 FF C6 C6 C6 FF C6 C6 C6 FF C7 C7' - 'C7 FF D3 D3 D3 FF C8 C8 C8 FF C9 C9 C9 FF DE DE' - 'DE FF 42 42 42 FF 00 00 00 FF 00 00 00 6C 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 80 00 00 00 FF 5F 5F 5F FF DC DC DC FF D1 D1' - 'D1 FF D2 D2 D2 FF D4 D4 D4 FF D1 D1 D1 FF D1 D1' - 'D1 FF D1 D1 D1 FF D1 D1 D1 FF D1 D1 D1 FF D1 D1' - 'D1 FF D1 D1 D1 FF D1 D1 D1 FF D1 D1 D1 FF D1 D1' - 'D1 FF D0 D0 D0 FF C8 C8 C8 FF C3 C3 C3 FF C3 C3' - 'C3 FF C3 C3 C3 FF C4 C4 C4 FF C4 C4 C4 FF C4 C4' - 'C4 FF C4 C4 C4 FF C4 C4 C4 FF C4 C4 C4 FF C4 C4' - 'C4 FF C7 C7 C7 FF C5 C5 C5 FF CB CB CB FF CC CC' - 'CC FF 2D 2D 2D FF 00 00 00 F8 00 00 00 40 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 4B 00 00 00 FE 41 41 41 FF D8 D8 D8 FF D4 D4' - 'D4 FF D2 D2 D2 FF D0 D0 D0 FF D3 D3 D3 FF D3 D3' - 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' - 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' - 'D3 FF D3 D3 D3 FF D3 D3 D3 FF CD CD CD FF C7 C7' - 'C7 FF C4 C4 C4 FF C2 C2 C2 FF C1 C1 C1 FF C0 C0' - 'C0 FF C1 C1 C1 FF C1 C1 C1 FF C1 C1 C1 FF C2 C2' - 'C2 FF BF BF BF FF C0 C0 C0 FF CE CE CE FF B2 B2' - 'B2 FF 1A 1A 1A FF 00 00 00 E5 00 00 00 28 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 1A 00 00 00 F2 2C 2C 2C FF CC CC CC FF D6 D6' - 'D6 FF D5 D5 D5 FF CC CC CC FF D5 D5 D5 FF D6 D6' - 'D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6' - 'D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6' - 'D6 FF D6 D6 D6 FF D6 D6 D6 FF D7 D7 D7 FF D6 D6' - 'D6 FF D5 D5 D5 FF D3 D3 D3 FF CF CF CF FF CC CC' - 'CC FF C9 C9 C9 FF C6 C6 C6 FF C4 C4 C4 FF C2 C2' - 'C2 FF B3 B3 B3 FF BD BD BD FF D0 D0 D0 FF 99 99' - '99 FF 09 09 09 FF 00 00 00 CF 00 00 00 19 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 09 00 00 00 D8 18 18 18 FF B0 B0 B0 FF DB DB' - 'DB FF DB DB DB FF D0 D0 D0 FF D2 D2 D2 FF DB DB' - 'DB FF D9 D9 D9 FF DA DA DA FF DA DA DA FF DA DA' - 'DA FF DA DA DA FF DA DA DA FF DA DA DA FF DA DA' - 'DA FF DA DA DA FF DA DA DA FF DA DA DA FF DA DA' - 'DA FF DA DA DA FF DA DA DA FF DB DB DB FF DB DB' - 'DB FF DA DA DA FF D9 D9 D9 FF D9 D9 D9 FF CF CF' - 'CF FF C5 C5 C5 FF CC CC CC FF CA CA CA FF 7A 7A' - '7A FF 02 02 02 FF 00 00 00 B8 00 00 00 0A 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 02 00 00 00 BF 08 08 08 FF 97 97 97 FF DC DC' - 'DC FF DF DF DF FF DC DC DC FF CE CE CE FF D6 D6' - 'D6 FF DE DE DE FF DD DD DD FF DD DD DD FF DD DD' - 'DD FF DD DD DD FF DD DD DD FF DD DD DD FF DD DD' - 'DD FF DD DD DD FF DD DD DD FF DD DD DD FF DD DD' - 'DD FF DD DD DD FF DD DD DD FF DD DD DD FF DD DD' - 'DD FF DD DD DD FF DE DE DE FF D8 D8 D8 FF CE CE' - 'CE FF DD DD DD FF DC DC DC FF C6 C6 C6 FF 53 53' - '53 FF 00 00 00 FF 00 00 00 A0 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 A4 00 00 00 FF 77 77 77 FF D3 D3' - 'D3 FF E2 E2 E2 FF E1 E1 E1 FF DE DE DE FF CE CE' - 'CE FF D7 D7 D7 FF E1 E1 E1 FF E2 E2 E2 FF E0 E0' - 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' - 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' - 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E1 E1' - 'E1 FF E1 E1 E1 FF D9 D9 D9 FF CD CD CD FF DA DA' - 'DA FF E3 E3 E3 FF D9 D9 D9 FF BB BB BB FF 39 39' - '39 FF 00 00 00 FF 00 00 00 7E 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 89 00 00 00 FF 4B 4B 4B FF C9 C9' - 'C9 FF E5 E5 E5 FF E3 E3 E3 FF E4 E4 E4 FF E1 E1' - 'E1 FF D7 D7 D7 FF D2 D2 D2 FF DA DA DA FF E4 E4' - 'E4 FF E5 E5 E5 FF E4 E4 E4 FF E4 E4 E4 FF E4 E4' - 'E4 FF E4 E4 E4 FF E4 E4 E4 FF E4 E4 E4 FF E4 E4' - 'E4 FF E4 E4 E4 FF E5 E5 E5 FF E5 E5 E5 FF DC DC' - 'DC FF D2 D2 D2 FF D6 D6 D6 FF E0 E0 E0 FF E4 E4' - 'E4 FF E6 E6 E6 FF D6 D6 D6 FF A8 A8 A8 FF 20 20' - '20 FF 00 00 00 FD 00 00 00 4E 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 62 00 00 00 FF 35 35 35 FF BD BD' - 'BD FF E6 E6 E6 FF E6 E6 E6 FF E6 E6 E6 FF E7 E7' - 'E7 FF E7 E7 E7 FF DF DF DF FF D2 D2 D2 FF D3 D3' - 'D3 FF DE DE DE FF E3 E3 E3 FF E3 E3 E3 FF E4 E4' - 'E4 FF E4 E4 E4 FF E4 E4 E4 FF E4 E4 E4 FF E3 E3' - 'E3 FF E3 E3 E3 FF DE DE DE FF D4 D4 D4 FF D1 D1' - 'D1 FF DD DD DD FF E7 E7 E7 FF E7 E7 E7 FF E6 E6' - 'E6 FF E8 E8 E8 FF D4 D4 D4 FF 9A 9A 9A FF 0B 0B' - '0B FF 00 00 00 ED 00 00 00 2C 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 2D 00 00 00 F9 1E 1E 1E FF AB AB' - 'AB FF E4 E4 E4 FF ED ED ED FF E7 E7 E7 FF E6 E6' - 'E6 FF EC EC EC FF EB EB EB FF EA EA EA FF E4 E4' - 'E4 FF E0 E0 E0 FF DF DF DF FF DF DF DF FF DD DD' - 'DD FF DC DC DC FF DC DC DC FF DD DD DD FF DF DF' - 'DF FF DF DF DF FF DF DF DF FF E2 E2 E2 FF E9 E9' - 'E9 FF EC EC EC FF EA EA EA FF E5 E5 E5 FF EB EB' - 'EB FF EB EB EB FF D6 D6 D6 FF 8A 8A 8A FF 00 00' - '00 FF 00 00 00 C3 00 00 00 17 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 09 00 00 00 DD 08 08 08 FF 99 99' - '99 FF E4 E4 E4 FF DF DF DF FF BD BD BD FF C1 C1' - 'C1 FF D6 D6 D6 FF EC EC EC FF ED ED ED FF ED ED' - 'ED FF EE EE EE FF EE EE EE FF ED ED ED FF EC EC' - 'EC FF EB EB EB FF EB EB EB FF EC EC EC FF ED ED' - 'ED FF EE EE EE FF EE EE EE FF ED ED ED FF EE EE' - 'EE FF E4 E4 E4 FF C2 C2 C2 FF BE BE BE FF D1 D1' - 'D1 FF EC EC EC FF D4 D4 D4 FF 75 75 75 FF 00 00' - '00 FF 00 00 00 9C 00 00 00 06 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 AE 00 00 00 FF 8D 8D' - '8D FF E0 E0 E0 FF C4 C4 C4 FF B2 B2 B2 FF B8 B8' - 'B8 FF B2 B2 B2 FF EB EB EB FF F1 F1 F1 FF F0 F0' - 'F0 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0' - 'F0 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0' - 'F0 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0 F0 FF F3 F3' - 'F3 FF D5 D5 D5 FF B0 B0 B0 FF B6 B6 B6 FF B7 B7' - 'B7 FF EB EB EB FF CD CD CD FF 61 61 61 FF 00 00' - '00 FF 00 00 00 85 00 00 00 01 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 80 00 00 00 FF 64 64' - '64 FF CE CE CE FF DD DD DD FF DC DC DC FF D5 D5' - 'D5 FF E4 E4 E4 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9' - 'F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9' - 'F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9' - 'F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9 F9 FF FA FA' - 'FA FF F2 F2 F2 FF DF DF DF FF D8 D8 D8 FF DC DC' - 'DC FF D7 D7 D7 FF B0 B0 B0 FF 34 34 34 FF 00 00' - '00 FF 00 00 00 67 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 44 00 00 00 FF 19 19' - '19 FF 80 80 80 FF BE BE BE FF D3 D3 D3 FF D7 D7' - 'D7 FF DB DB DB FF D8 D8 D8 FF D8 D8 D8 FF D8 D8' - 'D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8' - 'D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8' - 'D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8' - 'D8 FF D9 D9 D9 FF D9 D9 D9 FF D7 D7 D7 FF CD CD' - 'CD FF B0 B0 B0 FF 5D 5D 5D FF 06 06 06 FF 00 00' - '00 ED 00 00 00 2B 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 02 00 00 00 9C 00 00' - '00 FF 0C 0C 0C FF 3D 3D 3D FF 49 49 49 FF 48 48' - '48 FF 48 48 48 FF 48 48 48 FF 48 48 48 FF 48 48' - '48 FF 48 48 48 FF 48 48 48 FF 48 48 48 FF 48 48' - '48 FF 48 48 48 FF 48 48 48 FF 48 48 48 FF 48 48' - '48 FF 48 48 48 FF 48 48 48 FF 48 48 48 FF 48 48' - '48 FF 48 48 48 FF 48 48 48 FF 49 49 49 FF 49 49' - '49 FF 2F 2F 2F FF 02 02 02 FF 00 00 00 FF 00 00' - '00 5C 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 06 00 00' - '00 7F 00 00 00 F1 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 D6 00 00 00 5C 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 2C 00 00 00 7E 00 00 00 84 00 00' - '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' - '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' - '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' - '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' - '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' - '00 84 00 00 00 70 00 00 00 1A 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 FF FF FF FF FF FF 00 00 FF FF' - 'FF FF FF FF 00 00 FF FF FF FF FF FF 00 00 FF FF' - 'FF FF FF FF 00 00 FF 00 00 00 00 7F 00 00 FC 00' - '00 00 00 1F 00 00 F8 00 00 00 00 1F 00 00 F8 00' - '00 00 00 1F 00 00 F0 00 00 00 00 0F 00 00 F0 00' - '00 00 00 0F 00 00 F0 00 00 00 00 0F 00 00 F0 00' - '00 00 00 0F 00 00 F0 00 00 00 00 0F 00 00 F0 00' - '00 00 00 0F 00 00 F0 00 00 00 00 0F 00 00 F0 00' - '00 00 00 0F 00 00 F0 00 00 00 00 0F 00 00 F0 00' - '00 00 00 0F 00 00 F0 00 00 00 00 0F 00 00 F0 00' - '00 00 00 0F 00 00 F0 00 00 00 00 0F 00 00 F8 00' - '00 00 00 1F 00 00 F8 00 00 00 00 1F 00 00 F8 00' - '00 00 00 1F 00 00 F8 00 00 00 00 1F 00 00 F8 00' - '00 00 00 1F 00 00 F8 00 00 00 00 1F 00 00 FC 00' - '00 00 00 3F 00 00 FC 00 00 00 00 3F 00 00 FC 00' - '00 00 00 3F 00 00 FC 00 00 00 00 3F 00 00 FC 00' - '00 00 00 3F 00 00 FC 00 00 00 00 7F 00 00 FE 00' - '00 00 00 7F 00 00 FE 00 00 00 00 7F 00 00 FE 00' - '00 00 00 7F 00 00 FE 00 00 00 00 7F 00 00 FE 00' - '00 00 00 7F 00 00 FF 00 00 00 00 7F 00 00 FF 00' - '00 00 00 FF 00 00 FF 00 00 00 00 FF 00 00 FF 00' - '00 00 01 FF 00 00 FF 80 00 00 03 FF 00 00 FF E0' - '00 00 07 FF 00 00 FF FF FF FF FF FF 00 00 FF FF' - 'FF FF FF FF 00 00 FF FF FF FF FF FF 00 00 FF FF' - 'FF FF FF FF 00 00 28 00 00 00 20 00 00 00 40 00' - '00 00 01 00 20 00 00 00 00 00 00 10 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 15 00 00 00 54 00 00 00 63 00 00 00 61 00 00' - '00 61 00 00 00 61 00 00 00 61 00 00 00 61 00 00' - '00 61 00 00 00 61 00 00 00 61 00 00 00 61 00 00' - '00 61 00 00 00 61 00 00 00 61 00 00 00 61 00 00' - '00 61 00 00 00 61 00 00 00 61 00 00 00 61 00 00' - '00 61 00 00 00 63 00 00 00 50 00 00 00 14 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 33 00 00' - '00 D7 0D 0D 0D FF 1B 1B 1B FF 1C 1C 1C FF 1E 1E' - '1E FF 1D 1D 1D FF 1D 1D 1D FF 1C 1C 1C FF 1B 1B' - '1B FF 1B 1B 1B FF 1B 1B 1B FF 1A 1A 1A FF 1A 1A' - '1A FF 1A 1A 1A FF 1A 1A 1A FF 1A 1A 1A FF 1A 1A' - '1A FF 1A 1A 1A FF 1A 1A 1A FF 1A 1A 1A FF 20 1C' - '1E FF 22 1B 1F FF 09 09 09 FF 00 00 00 C3 00 00' - '00 29 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 07 00 00 00 C9 40 40' - '40 FF BA BA BA FF CB CB CB FF BE BE BE FF B3 B3' - 'B3 FF B4 B4 B4 FF B4 B4 B4 FF B7 B7 B7 FF BB BB' - 'BB FF BB BB BB FF BB BB BB FF BC BC BC FF BE BE' - 'BE FF BD BD BD FF BC BC BC FF BB BB BB FF BA BA' - 'BA FF BA BA BA FF B4 B4 B4 FF B1 AE AF FF 8C A4' - '98 FF 80 A5 93 FF 90 91 91 FF 21 21 21 FF 00 00' - '00 AB 00 00 00 07 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 3D 08 08 08 FD B7 B7' - 'B7 FF F2 F2 F2 FF EE EE EE FF AF AF AF FF 51 51' - '51 FF 6E 6E 6E FF 89 89 89 FF 9A 9A 9A FF AB AB' - 'AB FF B3 B3 B3 FF BC BC BC FF B5 B5 B5 FF B5 B5' - 'B5 FF BC BC BC FF BD BD BD FF BE BE BE FF B7 B7' - 'B7 FF C0 C0 C0 FF C4 C1 C3 FF B7 BF BA FF 2A BF' - '75 FF 0E C0 67 FF 8C B8 A2 FF 80 79 7C FF 00 00' - '00 EC 00 00 00 25 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 58 19 19 19 FF CE CE' - 'CE FF EB EB EB FF EB EB EB FF AA AA AA FF 56 56' - '56 FF 7A 7A 7A FF 8C 8C 8C FF 96 96 96 FF A2 A2' - 'A2 FF A9 A9 A9 FF B4 B4 B4 FF A1 A1 A1 FF 97 97' - '97 FF A1 A1 A1 FF A5 A5 A5 FF A5 A5 A5 FF 9B 9B' - '9B FF A7 A7 A7 FF B3 B1 B2 FF BC C1 BE FF 87 C6' - 'A6 FF 85 CC A8 FF A6 BC B1 FF 94 90 92 FF 02 02' - '02 F9 00 00 00 36 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 5A 18 18 18 FF CC CC' - 'CC FF ED ED ED FF EC EC EC FF B9 B9 B9 FF 6D 6D' - '6D FF 7D 7D 7D FF 8B 8B 8B FF 96 96 96 FF A2 A2' - 'A2 FF A9 A9 A9 FF B6 B6 B6 FF 96 96 96 FF 82 82' - '82 FF 8E 8E 8E FF 93 93 93 FF 94 94 94 FF 86 86' - '86 FF 95 95 95 FF A6 A6 A6 FF C8 C8 C8 FF C2 C0' - 'C1 FF BF BD BE FF C9 C6 C7 FF 8E 8E 8E FF 01 01' - '01 FA 00 00 00 37 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 5A 17 17 17 FF CD CD' - 'CD FF F0 F0 F0 FF ED ED ED FF BF BF BF FF 77 77' - '77 FF 85 85 85 FF 91 91 91 FF 9A 9A 9A FF A4 A4' - 'A4 FF AA AA AA FF B5 B5 B5 FF 97 97 97 FF 83 83' - '83 FF 8D 8D 8D FF 92 92 92 FF 93 93 93 FF 86 86' - '86 FF 93 93 93 FF A7 A7 A7 FF CA CA CA FF C4 C3' - 'C4 FF C3 C2 C2 FF C8 C8 C8 FF 8E 8E 8E FF 00 00' - '00 FA 00 00 00 37 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 5A 17 17 17 FF CE CE' - 'CE FF F2 F2 F2 FF EC EC EC FF E6 E6 E6 FF DC DC' - 'DC FF DB DB DB FF DA DA DA FF DA DA DA FF D9 D9' - 'D9 FF D8 D8 D8 FF D7 D7 D7 FF D4 D4 D4 FF D4 D4' - 'D4 FF D2 D2 D2 FF D0 D0 D0 FF CF CF CF FF CC CC' - 'CC FF CB CB CB FF CB CB CB FF CC CC CC FF CA CA' - 'CA FF C7 C7 C7 FF C9 C9 C9 FF 8D 8D 8D FF 00 00' - '00 FA 00 00 00 37 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 5A 17 17 17 FF D0 D0' - 'D0 FF FF FF FF FF F8 F8 F8 FF F8 F8 F8 FF F9 F9' - 'F9 FF F8 F8 F8 FF F7 F7 F7 FF F7 F7 F7 FF F6 F6' - 'F6 FF F6 F6 F6 FF F5 F5 F5 FF F5 F5 F5 FF F5 F5' - 'F5 FF F4 F4 F4 FF F4 F4 F4 FF F4 F4 F4 FF F3 F3' - 'F3 FF F3 F3 F3 FF F2 F2 F2 FF F1 F1 F1 FF F2 F2' - 'F2 FF F3 F3 F3 FF E8 E8 E8 FF 8D 8D 8D FF 00 00' - '00 FA 00 00 00 37 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 5B 17 17 17 FF D7 D7' - 'D7 FF F4 F4 F4 FF DB DB DB FF D8 D8 D8 FF DD DD' - 'DD FF DF DF DF FF DE DE DE FF DE DE DE FF DE DE' - 'DE FF DE DE DE FF DE DE DE FF DE DE DE FF DE DE' - 'DE FF DE DE DE FF DE DE DE FF DE DE DE FF DF DF' - 'DF FF DF DF DF FF E0 E0 E0 FF DD DD DD FF D8 D8' - 'D8 FF E0 E0 E0 FF FB FB FB FF 9C 9C 9C FF 00 00' - '00 FA 00 00 00 38 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 51 11 11 11 FF D3 D3' - 'D3 FF D9 D9 D9 FF AD AD AD FF B0 B0 B0 FF BE BE' - 'BE FF D9 D9 D9 FF D8 D8 D8 FF D7 D7 D7 FF D7 D7' - 'D7 FF D7 D7 D7 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6' - 'D6 FF D6 D6 D6 FF D6 D6 D6 FF D7 D7 D7 FF D7 D7' - 'D7 FF D9 D9 D9 FF D3 D3 D3 FF AF AF AF FF B1 B1' - 'B1 FF B8 B8 B8 FF ED ED ED FF A0 A0 A0 FF 00 00' - '00 F7 00 00 00 2E 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 2B 00 00 00 F8 B3 B3' - 'B3 FF DC DC DC FF B9 B9 B9 FF BA BA BA FF BC BC' - 'BC FF D5 D5 D5 FF D3 D3 D3 FF D4 D4 D4 FF D8 D8' - 'D8 FF DF DF DF FF E3 E3 E3 FF E4 E4 E4 FF E4 E4' - 'E4 FF E3 E3 E3 FF DF DF DF FF D9 D9 D9 FF D4 D4' - 'D4 FF D3 D3 D3 FF CF CF CF FF BA BA BA FF B8 B8' - 'B8 FF B8 B8 B8 FF E9 E9 E9 FF 7C 7C 7C FF 00 00' - '00 DE 00 00 00 17 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 0C 00 00 00 E2 89 89' - '89 FF E5 E5 E5 FF CE CE CE FF D0 D0 D0 FF D0 D0' - 'D0 FF D1 D1 D1 FF DE DE DE FF E5 E5 E5 FF E5 E5' - 'E5 FF E2 E2 E2 FF DE DE DE FF DE DE DE FF DE DE' - 'DE FF DE DE DE FF E2 E2 E2 FF E6 E6 E6 FF E5 E5' - 'E5 FF DF DF DF FF D2 D2 D2 FF CF CF CF FF CF CF' - 'CF FF D0 D0 D0 FF E6 E6 E6 FF 54 54 54 FF 00 00' - '00 BC 00 00 00 07 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 BB 64 64' - '64 FF E2 E2 E2 FF CB CB CB FF CB CB CB FF CE CE' - 'CE FF E2 E2 E2 FF E0 E0 E0 FF D7 D7 D7 FF D3 D3' - 'D3 FF D4 D4 D4 FF D4 D4 D4 FF D4 D4 D4 FF D4 D4' - 'D4 FF D4 D4 D4 FF D4 D4 D4 FF D3 D3 D3 FF D7 D7' - 'D7 FF DF DF DF FF E4 E4 E4 FF D1 D1 D1 FF CB CB' - 'CB FF CF CF CF FF D7 D7 D7 FF 34 34 34 FF 00 00' - '00 99 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 93 3E 3E' - '3E FF DB DB DB FF CC CC CC FF CC CC CC FF DC DC' - 'DC FF D7 D7 D7 FF CF CF CF FF D0 D0 D0 FF D0 D0' - 'D0 FF D0 D0 D0 FF CF CF CF FF CD CD CD FF CD CD' - 'CD FF CD CD CD FF CD CD CD FF CD CD CD FF CD CD' - 'CD FF CC CC CC FF D3 D3 D3 FF DC DC DC FF C9 C9' - 'C9 FF CF CF CF FF C2 C2 C2 FF 1A 1A 1A FF 00 00' - '00 72 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 6B 21 21' - '21 FF C9 C9 C9 FF D2 D2 D2 FF D3 D3 D3 FF D7 D7' - 'D7 FF CF CF CF FF D0 D0 D0 FF D0 D0 D0 FF D0 D0' - 'D0 FF D0 D0 D0 FF CF CF CF FF CA CA CA FF C7 C7' - 'C7 FF C8 C8 C8 FF C8 C8 C8 FF C8 C8 C8 FF C8 C8' - 'C8 FF C8 C8 C8 FF C7 C7 C7 FF CF CF CF FF CC CC' - 'CC FF D0 D0 D0 FF A9 A9 A9 FF 04 04 04 FF 00 00' - '00 4D 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 44 0B 0B' - '0B FF B1 B1 B1 FF D8 D8 D8 FF D2 D2 D2 FF D2 D2' - 'D2 FF D1 D1 D1 FF D1 D1 D1 FF D1 D1 D1 FF D1 D1' - 'D1 FF D1 D1 D1 FF D2 D2 D2 FF D1 D1 D1 FF C9 C9' - 'C9 FF C4 C4 C4 FF C3 C3 C3 FF C3 C3 C3 FF C4 C4' - 'C4 FF C4 C4 C4 FF C4 C4 C4 FF C5 C5 C5 FF C5 C5' - 'C5 FF D2 D2 D2 FF 86 86 86 FF 00 00 00 F3 00 00' - '00 28 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 20 00 00' - '00 F4 93 93 93 FF DF DF DF FF D2 D2 D2 FF D2 D2' - 'D2 FF D5 D5 D5 FF D4 D4 D4 FF D4 D4 D4 FF D4 D4' - 'D4 FF D4 D4 D4 FF D4 D4 D4 FF D5 D5 D5 FF D5 D5' - 'D5 FF D2 D2 D2 FF CD CD CD FF C7 C7 C7 FF C3 C3' - 'C3 FF C2 C2 C2 FF C2 C2 C2 FF BE BE BE FF BC BC' - 'BC FF D0 D0 D0 FF 67 67 67 FF 00 00 00 D9 00 00' - '00 13 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 0B 00 00' - '00 DE 75 75 75 FF DE DE DE FF D7 D7 D7 FF D1 D1' - 'D1 FF DA DA DA FF D9 D9 D9 FF D9 D9 D9 FF D9 D9' - 'D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9' - 'D9 FF DA DA DA FF DA DA DA FF DA DA DA FF D8 D8' - 'D8 FF D6 D6 D6 FF D5 D5 D5 FF C7 C7 C7 FF C5 C5' - 'C5 FF CD CD CD FF 4B 4B 4B FF 00 00 00 BD 00 00' - '00 07 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 B7 53 53 53 FF D9 D9 D9 FF E1 E1 E1 FF D5 D5' - 'D5 FF D5 D5 D5 FF DF DF DF FF DF DF DF FF DE DE' - 'DE FF DE DE DE FF DE DE DE FF DE DE DE FF DE DE' - 'DE FF DE DE DE FF DE DE DE FF DE DE DE FF DF DF' - 'DF FF E0 E0 E0 FF D7 D7 D7 FF D6 D6 D6 FF DE DE' - 'DE FF C3 C3 C3 FF 2C 2C 2C FF 00 00 00 9A 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 90 31 31 31 FF CB CB CB FF E5 E5 E5 FF E4 E4' - 'E4 FF DA DA DA FF D7 D7 D7 FF DD DD DD FF E2 E2' - 'E2 FF E4 E4 E4 FF E4 E4 E4 FF E4 E4 E4 FF E4 E4' - 'E4 FF E4 E4 E4 FF E4 E4 E4 FF E2 E2 E2 FF DE DE' - 'DE FF D7 D7 D7 FF D9 D9 D9 FF E4 E4 E4 FF DF DF' - 'DF FF AB AB AB FF 17 17 17 FF 00 00 00 73 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 67 1A 1A 1A FF B3 B3 B3 FF E8 E8 E8 FF EA EA' - 'EA FF EA EA EA FF E5 E5 E5 FF DE DE DE FF DD DD' - 'DD FF DD DD DD FF DF DF DF FF E0 E0 E0 FF E0 E0' - 'E0 FF E0 E0 E0 FF DD DD DD FF DC DC DC FF DD DD' - 'DD FF E5 E5 E5 FF E9 E9 E9 FF EC EC EC FF DF DF' - 'DF FF 95 95 95 FF 04 04 04 FF 00 00 00 4D 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 41 07 07 07 FE 9F 9F 9F FF E8 E8 E8 FF CD CD' - 'CD FF CB CB CB FF E7 E7 E7 FF EF EF EF FF ED ED' - 'ED FF EA EA EA FF E9 E9 E9 FF E7 E7 E7 FF E7 E7' - 'E7 FF E8 E8 E8 FF EA EA EA FF EC EC EC FF F0 F0' - 'F0 FF DB DB DB FF C6 C6 C6 FF DC DC DC FF E1 E1' - 'E1 FF 78 78 78 FF 00 00 00 F4 00 00 00 29 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 1E 00 00 00 F4 83 83 83 FF E0 E0 E0 FF C9 C9' - 'C9 FF C6 C6 C6 FF EA EA EA FF FA FA FA FF F8 F8' - 'F8 FF F8 F8 F8 FF F8 F8 F8 FF F8 F8 F8 FF F8 F8' - 'F8 FF F8 F8 F8 FF F8 F8 F8 FF F8 F8 F8 FF FB FB' - 'FB FF D9 D9 D9 FF C4 C4 C4 FF D1 D1 D1 FF D2 D2' - 'D2 FF 50 50 50 FF 00 00 00 DA 00 00 00 15 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 BB 24 24 24 FF 98 98 98 FF CF CF' - 'CF FF D2 D2 D2 FF D7 D7 D7 FF D7 D7 D7 FF D7 D7' - 'D7 FF D7 D7 D7 FF D7 D7 D7 FF D7 D7 D7 FF D7 D7' - 'D7 FF D7 D7 D7 FF D7 D7 D7 FF D7 D7 D7 FF D7 D7' - 'D7 FF D7 D7 D7 FF D2 D2 D2 FF C8 C8 C8 FF 7C 7C' - '7C FF 0D 0D 0D FF 00 00 00 9A 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 31 00 00 00 DF 0F 0F 0F FF 29 29' - '29 FF 29 29 29 FF 28 28 28 FF 28 28 28 FF 28 28' - '28 FF 28 28 28 FF 28 28 28 FF 28 28 28 FF 28 28' - '28 FF 28 28 28 FF 28 28 28 FF 28 28 28 FF 28 28' - '28 FF 28 28 28 FF 2A 2A 2A FF 26 26 26 FF 08 08' - '08 FF 00 00 00 C8 00 00 00 1D 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 14 00 00 00 62 00 00' - '00 87 00 00 00 84 00 00 00 84 00 00 00 84 00 00' - '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' - '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' - '00 84 00 00 00 84 00 00 00 84 00 00 00 86 00 00' - '00 55 00 00 00 0A 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF' - 'FF FF FF FF FF FF FF FF FF FF F0 00 00 0F E0 00' - '00 07 C0 00 00 03 C0 00 00 03 C0 00 00 03 C0 00' - '00 03 C0 00 00 03 C0 00 00 03 C0 00 00 03 C0 00' - '00 03 C0 00 00 03 C0 00 00 03 C0 00 00 03 E0 00' - '00 07 E0 00 00 07 E0 00 00 07 E0 00 00 07 E0 00' - '00 07 E0 00 00 07 F0 00 00 0F F0 00 00 0F F0 00' - '00 0F F0 00 00 0F F0 00 00 0F F8 00 00 1F F8 00' - '00 1F FC 00 00 3F FF FF FF FF FF FF FF FF 28 00' - '00 00 10 00 00 00 20 00 00 00 01 00 20 00 00 00' - '00 00 00 04 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 11 04 04' - '04 8A 16 16 16 A8 1B 1B 1B A8 18 18 18 A8 16 16' - '16 A8 15 15 15 A8 16 16 16 A8 15 15 15 A8 15 15' - '15 A8 14 13 14 A8 19 12 16 A8 05 03 04 84 00 00' - '00 0F 00 00 00 00 00 00 00 00 05 05 05 83 9B 9B' - '9B FF C1 C1 C1 FF 83 83 83 FF 9A 9A 9A FF AD AD' - 'AD FF B2 B2 B2 FF B3 B3 B3 FF B5 B5 B5 FF B2 B1' - 'B2 FF AC B2 AF FF 59 B0 84 FF 5B 6C 64 FF 04 01' - '03 71 00 00 00 00 00 00 00 00 13 13 13 B3 DC DC' - 'DC FF CB CB CB FF 65 65 65 FF 8A 8A 8A FF A7 A7' - 'A7 FF AB AB AB FF 95 95 95 FF A2 A2 A2 FF 95 94' - '95 FF BA BF BC FF 8F CC AD FF 93 A1 9A FF 09 06' - '07 95 00 00 00 00 00 00 00 00 13 13 13 B2 D7 D7' - 'D7 FF DE DE DE FF A1 A1 A1 FF AC AC AC FF BA BA' - 'BA FF B7 B7 B7 FF A2 A2 A2 FF A9 A9 A9 FF 9D 9D' - '9D FF C2 C1 C1 FF CF C9 CC FF A2 A0 A1 FF 06 06' - '06 93 00 00 00 00 00 00 00 00 14 14 14 B3 D9 D9' - 'D9 FF ED ED ED FF EA EA EA FF E8 E8 E8 FF E5 E5' - 'E5 FF E5 E5 E5 FF E6 E6 E6 FF E4 E4 E4 FF E4 E4' - 'E4 FF DF DF DF FF E3 E3 E3 FF B2 B2 B2 FF 04 05' - '05 94 00 00 00 00 00 00 00 00 11 11 11 A5 C6 C6' - 'C6 FF BC BC BC FF CA CA CA FF D9 D9 D9 FF DA DA' - 'DA FF DA DA DA FF DB DB DB FF DA DA DA FF DA DA' - 'DA FF C6 C6 C6 FF C5 C5 C5 FF B4 B4 B4 FF 04 04' - '04 8B 00 00 00 00 00 00 00 00 04 04 04 7B A8 A8' - 'A8 FF CE CE CE FF CF CF CF FF DC DC DC FF DD DD' - 'DD FF DE DE DE FF DE DE DE FF DE DE DE FF DC DC' - 'DC FF CF CF CF FF D4 D4 D4 FF 91 91 91 FF 00 00' - '00 69 00 00 00 00 00 00 00 00 00 00 00 53 85 85' - '85 FF DB DB DB FF D7 D7 D7 FF D3 D3 D3 FF D0 D0' - 'D0 FF CE CE CE FF CD CD CD FF CE CE CE FF D0 D0' - 'D0 FF D6 D6 D6 FF D9 D9 D9 FF 6E 6E 6E FE 00 00' - '00 43 00 00 00 00 00 00 00 00 00 00 00 2E 64 64' - '64 FA DD DD DD FF D3 D3 D3 FF D0 D0 D0 FF D1 D1' - 'D1 FF CF CF CF FF C8 C8 C8 FF C4 C4 C4 FF C4 C4' - 'C4 FF C5 C5 C5 FF CF CF CF FF 4D 4D 4D F3 00 00' - '00 20 00 00 00 00 00 00 00 00 00 00 00 0E 42 42' - '42 E8 D7 D7 D7 FF D6 D6 D6 FF D9 D9 D9 FF D8 D8' - 'D8 FF D8 D8 D8 FF D7 D7 D7 FF D4 D4 D4 FF D3 D3' - 'D3 FF CD CD CD FF C5 C5 C5 FF 2C 2C 2C D8 00 00' - '00 0A 00 00 00 00 00 00 00 00 00 00 00 02 22 22' - '22 C5 D1 D1 D1 FF E3 E3 E3 FF DC DC DC FF DF DF' - 'DF FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF DE DE' - 'DE FF E5 E5 E5 FF C0 C0 C0 FF 11 11 11 B6 00 00' - '00 01 00 00 00 00 00 00 00 00 00 00 00 00 08 08' - '08 A1 BE BE BE FF E1 E1 E1 FF EA EA EA FF EB EB' - 'EB FF EB EB EB FF EB EB EB FF EC EC EC FF E5 E5' - 'E5 FF E5 E5 E5 FF A3 A3 A3 FF 01 01 01 93 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 74 78 78 78 FF C7 C7 C7 FF D9 D9 D9 FF DE DE' - 'DE FF DD DD DD FF DD DD DD FF DF DF DF FF D4 D4' - 'D4 FF C7 C7 C7 FF 60 60 60 FF 00 00 00 65 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 11 04 04 04 94 1D 1D 1D CC 1C 1C 1C CC 1C 1C' - '1C CC 1C 1C 1C CC 1C 1C 1C CC 1C 1C 1C CC 1D 1D' - '1D CC 1B 1B 1B CB 02 02 02 88 00 00 00 0C 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 FF FF 00 00 80 01 00 00 80 01' - '00 00 80 01 00 00 80 01 00 00 80 01 00 00 80 01' - '00 00 80 01 00 00 80 01 00 00 80 01 00 00 80 01' - '00 00 80 01 00 00 C0 03 00 00 C0 03 00 00 C0 03' - '00 00 FF FF 00 00' -} */ - -/* BINRES netdrive.ico */ -9 ICON netdrive.ico -/* { - '00 00 01 00 09 00 20 20 00 00 01 00 08 00 A8 08' - '00 00 96 00 00 00 10 10 00 00 01 00 08 00 68 05' - '00 00 3E 09 00 00 20 20 00 00 01 00 04 00 E8 02' - '00 00 A6 0E 00 00 10 10 00 00 01 00 04 00 28 01' - '00 00 8E 11 00 00 30 30 00 00 01 00 08 00 A8 0E' - '00 00 B6 12 00 00 30 30 00 00 01 00 04 00 68 06' - '00 00 5E 21 00 00 30 30 00 00 01 00 20 00 A8 25' - '00 00 C6 27 00 00 20 20 00 00 01 00 20 00 A8 10' - '00 00 6E 4D 00 00 10 10 00 00 01 00 20 00 68 04' - '00 00 16 5E 00 00 28 00 00 00 20 00 00 00 40 00' - '00 00 01 00 08 00 00 00 00 00 00 04 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 02 02 02 00 04 04 04 00 05 06 06 00 06 06' - '06 00 09 09 09 00 0A 0A 0A 00 0C 0C 0C 00 12 12' - '12 00 14 14 14 00 15 15 15 00 16 16 16 00 1D 1D' - '1D 00 1F 1F 1F 00 21 21 21 00 22 22 22 00 23 23' - '23 00 24 24 24 00 25 25 25 00 26 26 26 00 38 38' - '38 00 39 39 39 00 3B 3B 3B 00 00 67 67 00 43 43' - '43 00 46 46 46 00 4A 4A 4A 00 54 4C 50 00 53 53' - '53 00 55 55 55 00 56 56 56 00 58 58 58 00 59 59' - '59 00 5A 58 59 00 5A 5A 5A 00 5B 5B 5B 00 5C 5C' - '5C 00 5D 5D 5D 00 5E 5E 5E 00 65 58 5F 00 60 60' - '60 00 61 61 61 00 62 62 62 00 64 64 64 00 67 67' - '67 00 69 69 69 00 71 71 71 00 72 72 72 00 73 73' - '73 00 75 75 75 00 78 78 78 00 7A 7A 7A 00 7B 7B' - '7B 00 7C 7C 7C 00 7F 7F 7F 00 24 A7 64 00 3C AD' - '74 00 25 DC 7F 00 7D AA 94 00 18 FF FF 00 56 D8' - 'D8 00 81 81 81 00 83 83 83 00 89 89 89 00 8A 8A' - '8A 00 8B 8B 8B 00 8F 8F 8F 00 91 89 8C 00 90 90' - '90 00 91 91 91 00 94 94 94 00 95 95 95 00 97 97' - '97 00 99 99 99 00 9A 9A 9A 00 9C 9C 9C 00 9D 9D' - '9D 00 9E 9E 9E 00 9F 9F 9F 00 A0 91 91 00 94 B6' - 'A4 00 93 BD A9 00 A0 A0 A0 00 A1 A1 A1 00 A3 A3' - 'A3 00 A4 A4 A4 00 A5 A5 A5 00 A8 A8 A8 00 A9 A9' - 'A9 00 AA AA AA 00 AC AC AC 00 AD AD AD 00 AE AE' - 'AE 00 AF AF AF 00 B7 AF AF 00 AD B9 B3 00 B0 B0' - 'B0 00 B1 B1 B1 00 B2 B2 B2 00 B3 B3 B3 00 B4 B4' - 'B4 00 B5 B5 B5 00 B6 B6 B6 00 B7 B7 B7 00 B9 B9' - 'B9 00 BC BC BC 00 BD BD BD 00 BE BE BE 00 BF BF' - 'BF 00 89 CF CF 00 C0 C0 C0 00 C1 C1 C1 00 C2 C0' - 'C1 00 C2 C2 C2 00 C3 C3 C3 00 C4 C1 C2 00 C5 C2' - 'C4 00 C4 C4 C4 00 C5 C5 C5 00 C6 C5 C6 00 C6 C6' - 'C6 00 C8 C3 C5 00 CC C4 C8 00 C8 C8 C8 00 C9 C9' - 'C9 00 CB C9 CA 00 CA CA CA 00 CB CB CB 00 CC CC' - 'CC 00 CD CD CD 00 CE CE CE 00 CF CF CF 00 D2 C1' - 'CA 00 D3 C8 CD 00 D0 D0 D0 00 D1 D1 D1 00 D2 D2' - 'D2 00 D3 D3 D3 00 D4 D4 D4 00 D5 D5 D5 00 D6 D6' - 'D6 00 D7 D7 D7 00 D8 D8 D8 00 D9 D9 D9 00 DA DA' - 'DA 00 DB DB DB 00 DC DC DC 00 DD DD DD 00 DE DE' - 'DE 00 DF DF DF 00 E0 E0 E0 00 E1 E1 E1 00 E2 E2' - 'E2 00 E3 E3 E3 00 E4 E4 E4 00 E5 E5 E5 00 E6 E6' - 'E6 00 E7 E7 E7 00 E8 E8 E8 00 E9 E9 E9 00 EA EA' - 'EA 00 EB EB EB 00 EC EC EC 00 ED ED ED 00 EE EE' - 'EE 00 EF EF EF 00 F0 F0 F0 00 F1 F1 F1 00 F2 F2' - 'F2 00 F4 F4 F4 00 F5 F5 F5 00 F6 F6 F6 00 F7 F7' - 'F7 00 F8 F8 F8 00 F9 F9 F9 00 FC FC FC 00 FD FD' - 'FD 00 FF FF FF 00 00 00 00 00 62 00 1A 02 40 9F' - '07 00 00 00 00 00 40 9F 07 00 05 00 00 00 BE B3' - 'E7 77 4C 19 95 00 A3 B4 E7 77 F8 00 00 00 00 00' - '00 C0 00 00 00 00 00 00 00 00 02 00 00 00 80 00' - '00 00 00 00 00 00 8C 1A 95 00 7F E9 4B 00 08 6C' - '0C 01 00 00 00 C0 00 00 00 00 80 1A 95 00 02 00' - '00 00 80 00 00 00 00 00 00 00 C0 27 95 00 C4 F5' - 'AF 00 02 00 00 00 44 3A 5C 6F 73 65 78 70 65 72' - '74 73 5C 72 65 61 63 74 6F 73 5C 6C 69 62 5C 73' - '68 65 6C 6C 33 32 5C 6E 65 74 64 72 69 76 65 2E' - '69 63 6F 00 4B 00 14 1A 95 00 1F 3B D4 77 15 00' - '00 00 A8 00 00 00 4F 3B D4 77 E0 19 95 00 33 3B' - 'D4 77 64 C5 F5 77 A9 F1 E7 77 F8 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 1A 95 00 B0 6C' - '38 00 96 00 00 00 00 00 00 00 C9 F1 E7 77 96 00' - '00 00 A4 1A 95 00 09 00 00 00 00 00 00 00 96 00' - '00 00 96 00 00 00 09 00 00 00 F4 19 95 00 33 3B' - 'D4 77 B4 1A 95 00 09 48 E9 77 B8 10 E9 77 FF FF' - 'FF FF C9 F1 E7 77 16 EA 4B 00 F8 00 00 00 B0 6C' - '38 00 96 00 00 00 58 1A 95 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 B2 B2' - 'B2 B2 B2 B2 B2 B2 B2 B2 B2 B2 B2 B2 B2 17 17 B2' - 'B2 B2 B2 B2 B2 B2 B2 B2 B2 B2 B2 B2 B2 B2 62 62' - '62 62 62 62 62 62 62 62 62 62 62 5E 6D 3B 3B 6D' - '5E 62 62 62 62 62 62 62 62 62 62 62 62 62 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 3C 3C 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 4F 4F 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 B2 B2 B2 B2 B2 B2 B2 B2 B2 B2 B2 0D 0D B2' - 'B2 B2 B2 B2 B2 B2 B2 B2 B2 B2 00 00 00 00 00 00' - '00 B2 B2 09 26 26 2C 2B 2A 28 26 25 24 1E 1D 22' - '20 1F 1F 1F 1E 21 27 1B 05 B2 B2 00 00 00 00 00' - '00 B2 09 6E AA A0 58 64 68 6F 86 88 8C 8D 92 92' - '91 93 90 8E 82 79 38 51 43 03 B2 00 00 00 00 00' - '00 B2 1E AC 9C 9A 0C 1A 33 41 4C 54 5D 59 4E 4B' - '59 66 56 48 85 3A 39 37 84 13 B2 00 00 00 00 00' - '00 B2 25 A8 9D 99 1C 34 40 46 54 58 64 59 47 44' - '52 60 4A 3F 7D 70 50 5F 73 13 B2 00 00 00 00 00' - '00 B2 23 A9 9F 9E 24 2F 3E 42 4E 56 63 53 32 2E' - '41 52 3D 2C 7F 77 7A 74 6E 12 B2 00 00 00 00 00' - '00 B2 23 AB A2 9E 3D 44 4A 52 58 5B 64 5A 4B 49' - '54 5C 4C 45 7B 76 6F 6F 72 11 B2 00 00 00 00 00' - '00 B2 22 AD A6 A5 AF AE AA A8 A4 A2 9F 9D A0 9E' - '9A 96 96 96 8C 8A 88 7F 75 10 B2 00 00 00 00 00' - '00 B2 20 B1 A5 A3 A2 9D 9D 9C 9D 9D 9E 9D 9D 9D' - '9D 9D 9D 9C 9F A3 A2 AE 8B 0E B2 00 00 00 00 00' - '00 B2 25 B1 78 61 69 8E 8D 8D 8D 8D 8C 8C 8C 8C' - '8D 8D 8D 8E 87 65 65 8C AB 13 B2 00 00 00 00 00' - '00 B2 18 B1 5D 67 57 87 8D 8B 89 87 8A 8B 8B 8A' - '87 88 8A 90 68 62 58 7B 9E 0C B2 00 00 00 00 00' - '00 B2 10 9E 82 86 78 86 82 8F 9A 99 9C A0 A0 9D' - '9A 9B 91 83 83 83 75 8E 6B 06 B2 00 00 00 00 00' - '00 B2 08 87 87 80 81 81 9F 9C 90 8E 8D 8C 8C 8D' - '8E 91 9C 9F 86 7E 81 98 48 B2 B2 00 00 00 00 00' - '00 B2 01 55 8E 7C 81 9B 89 82 86 86 83 86 86 86' - '86 86 81 83 9C 83 78 9F 29 B2 B2 00 00 00 00 00' - '00 B2 B2 31 9A 7C 90 88 82 86 83 86 81 7E 7F 7F' - '7F 7F 7F 7E 80 90 72 A5 15 B2 B2 00 00 00 00 00' - '00 00 B2 19 A0 83 8E 82 86 86 86 86 86 80 71 72' - '75 76 76 76 72 81 76 A1 0A B2 00 00 00 00 00 00' - '00 00 B2 0F A4 87 87 88 87 87 87 87 87 88 81 75' - '6E 6C 6B 6E 6E 6E 78 8C 01 B2 00 00 00 00 00 00' - '00 00 B2 02 94 8F 80 8E 8C 8D 8D 8D 8D 8D 8D 8E' - '8D 8A 86 80 7C 67 7C 63 B2 B2 00 00 00 00 00 00' - '00 00 B2 B2 76 99 89 89 94 92 91 91 91 91 91 91' - '92 92 93 95 8C 89 93 3F B2 B2 00 00 00 00 00 00' - '00 00 00 B2 45 9C 99 8B 8C 96 99 97 97 97 97 97' - '97 99 95 8E 88 9D 8E 1F B2 00 00 00 00 00 00 00' - '00 00 00 B2 2C 9C 9D 9D 95 87 8F 98 99 9A 9A 99' - '98 8F 87 95 9E A1 82 14 B2 00 00 00 00 00 00 00' - '00 00 00 B2 16 93 A0 8F A2 A4 9C 98 97 94 94 97' - '98 9A A4 9A 91 A7 78 0C B2 00 00 00 00 00 00 00' - '00 00 00 B2 13 94 6F 5B 76 A8 A6 A6 A6 A5 A5 A6' - 'A6 A6 A3 65 5B 9D 6A 0B B2 00 00 00 00 00 00 00' - '00 00 00 B2 07 4D A2 9A AB B0 AF AF AF AF AF AF' - 'AF AF AF A7 9C 9B 30 B2 B2 00 00 00 00 00 00 00' - '00 00 00 B2 B2 0B 31 34 33 32 32 32 32 32 32 32' - '32 32 32 33 35 2D 04 B2 00 00 00 00 00 00 00 00' - '00 00 00 00 B2 B2 B2 B2 B2 B2 B2 B2 B2 B2 B2 B2' - 'B2 B2 B2 B2 B2 B2 B2 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF' - 'FF FF 00 00 00 00 00 00 00 00 FF FE 7F FF FF FE' - '7F FF F0 00 00 0F E0 00 00 07 E0 00 00 07 E0 00' - '00 07 E0 00 00 07 E0 00 00 07 E0 00 00 07 E0 00' - '00 07 E0 00 00 07 E0 00 00 07 E0 00 00 07 E0 00' - '00 07 E0 00 00 07 E0 00 00 07 E0 00 00 07 F0 00' - '00 0F F0 00 00 0F F0 00 00 0F F0 00 00 0F F8 00' - '00 1F F8 00 00 1F F8 00 00 1F F8 00 00 1F F8 00' - '00 1F F8 00 00 3F FC 00 00 7F FF FF FF FF 28 00' - '00 00 10 00 00 00 20 00 00 00 01 00 08 00 00 00' - '00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 0C 0C 0C 00 15 15' - '15 00 1F 12 12 00 19 19 19 00 25 20 22 00 29 29' - '29 00 35 35 35 00 3E 3E 3E 00 40 40 40 00 57 57' - '57 00 6D 6D 6D 00 73 73 73 00 75 75 75 00 78 78' - '78 00 7B 7B 7B 00 7D 7D 7D 00 7F 7F 7F 00 89 7D' - '7D 00 66 8E 7A 00 86 7B 81 00 5E CA 93 00 4F D8' - 'D8 00 85 85 85 00 8C 8C 8C 00 8F 8F 8F 00 90 90' - '90 00 91 91 91 00 97 97 97 00 98 95 97 00 99 99' - '99 00 9B 9A 9B 00 9B 9B 9B 00 9F 9F 9F 00 A1 A1' - 'A1 00 A3 A3 A3 00 A5 A5 A5 00 A9 A9 A9 00 AC AC' - 'AC 00 AE AE AE 00 B2 B2 B2 00 B3 B3 B3 00 B4 B4' - 'B4 00 B6 B6 B6 00 B8 B8 B8 00 BA BA BA 00 BF BF' - 'BF 00 C1 C1 C1 00 C2 C2 C2 00 C0 C7 C4 00 C4 C4' - 'C4 00 C7 C7 C7 00 CB C9 CA 00 CA CA CA 00 CC CC' - 'CC 00 CD CD CD 00 CF CF CF 00 D4 C9 CF 00 D0 D0' - 'D0 00 D1 D1 D1 00 D2 D2 D2 00 D3 D3 D3 00 D4 D4' - 'D4 00 D5 D5 D5 00 D6 D6 D6 00 D7 D7 D7 00 D8 D8' - 'D8 00 D9 D9 D9 00 DA DA DA 00 DB DB DB 00 DF DF' - 'DF 00 E0 E0 E0 00 E1 E1 E1 00 E3 E3 E3 00 E4 E4' - 'E4 00 E6 E6 E6 00 E7 E7 E7 00 E9 E9 E9 00 EA EA' - 'EA 00 EC EC EC 00 ED ED ED 00 EF EF EF 00 F0 F0' - 'F0 00 F3 F3 F3 00 F4 F4 F4 00 F7 F7 F7 00 FC FC' - 'FC 00 00 00 00 00 A9 A9 A9 00 AA AA AA 00 AC AC' - 'AC 00 AD AD AD 00 AE AE AE 00 AF AF AF 00 B7 AF' - 'AF 00 AD B9 B3 00 B0 B0 B0 00 B1 B1 B1 00 B2 B2' - 'B2 00 B3 B3 B3 00 B4 B4 B4 00 B5 B5 B5 00 B6 B6' - 'B6 00 B7 B7 B7 00 B9 B9 B9 00 BC BC BC 00 BD BD' - 'BD 00 BE BE BE 00 BF BF BF 00 89 CF CF 00 C0 C0' - 'C0 00 C1 C1 C1 00 C2 C0 C1 00 C2 C2 C2 00 C3 C3' - 'C3 00 C4 C1 C2 00 C5 C2 C4 00 C4 C4 C4 00 C5 C5' - 'C5 00 C6 C5 C6 00 C6 C6 C6 00 C8 C3 C5 00 CC C4' - 'C8 00 C8 C8 C8 00 C9 C9 C9 00 CB C9 CA 00 CA CA' - 'CA 00 CB CB CB 00 CC CC CC 00 CD CD CD 00 CE CE' - 'CE 00 CF CF CF 00 D2 C1 CA 00 D3 C8 CD 00 D0 D0' - 'D0 00 D1 D1 D1 00 D2 D2 D2 00 D3 D3 D3 00 D4 D4' - 'D4 00 D5 D5 D5 00 D6 D6 D6 00 D7 D7 D7 00 D8 D8' - 'D8 00 D9 D9 D9 00 DA DA DA 00 DB DB DB 00 DC DC' - 'DC 00 DD DD DD 00 DE DE DE 00 DF DF DF 00 E0 E0' - 'E0 00 E1 E1 E1 00 E2 E2 E2 00 E3 E3 E3 00 E4 E4' - 'E4 00 E5 E5 E5 00 E6 E6 E6 00 E7 E7 E7 00 E8 E8' - 'E8 00 E9 E9 E9 00 EA EA EA 00 EB EB EB 00 EC EC' - 'EC 00 ED ED ED 00 EE EE EE 00 EF EF EF 00 F0 F0' - 'F0 00 F1 F1 F1 00 F2 F2 F2 00 F4 F4 F4 00 F5 F5' - 'F5 00 F6 F6 F6 00 F7 F7 F7 00 F8 F8 F8 00 F9 F9' - 'F9 00 FC FC FC 00 FD FD FD 00 FF FF FF 00 00 00' - '00 00 62 00 1A 02 40 9F 07 00 00 00 00 00 40 9F' - '07 00 05 00 00 00 BE B3 E7 77 4C 19 95 00 A3 B4' - 'E7 77 F8 00 00 00 00 00 00 C0 00 00 00 00 00 00' - '00 00 02 00 00 00 80 00 00 00 00 00 00 00 8C 1A' - '95 00 7F E9 4B 00 08 6C 0C 01 00 00 00 C0 00 00' - '00 00 80 1A 95 00 02 00 00 00 80 00 00 00 00 00' - '00 00 C0 27 95 00 C4 F5 AF 00 02 00 00 00 44 3A' - '5C 6F 73 65 78 70 65 72 74 73 5C 72 65 61 63 74' - '6F 73 5C 6C 69 62 5C 73 68 65 6C 6C 33 32 5C 6E' - '65 74 64 72 69 76 65 2E 69 63 6F 00 4B 00 14 1A' - '95 00 1F 3B D4 77 15 00 00 00 A8 00 00 00 4F 3B' - 'D4 77 E0 19 95 00 33 3B D4 77 64 C5 F5 77 A9 F1' - 'E7 77 F8 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 1A 95 00 B0 6C 38 00 96 00 00 00 00 00' - '00 00 C9 F1 E7 77 96 00 00 00 A4 1A 95 00 09 00' - '00 00 00 00 00 00 96 00 00 00 96 00 00 00 09 00' - '00 00 F4 19 95 00 33 3B D4 77 B4 1A 95 00 09 48' - 'E9 77 B8 10 E9 77 FF FF FF FF C9 F1 E7 77 16 EA' - '4B 00 F8 00 00 00 B0 6C 38 00 96 00 00 00 58 1A' - '95 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 17 17 17 17 17 17 12 16 16 12' - '17 17 17 17 17 17 00 00 00 57 57 57 57 03 03 57' - '57 57 57 57 00 00 00 00 07 2B 1A 1C 21 20 21 23' - '22 1D 13 05 00 00 00 57 2B 56 08 18 25 2A 1E 29' - '1F 31 15 14 00 00 00 57 27 55 0B 19 24 26 10 20' - '0F 34 39 0D 00 00 00 57 28 56 56 54 52 4F 51 4E' - '4E 4A 51 0E 00 00 00 57 2A 2C 2E 40 3D 3F 3F 3E' - '42 2C 33 1B 00 00 00 00 11 43 35 47 47 48 48 47' - '48 37 46 0A 00 00 00 00 09 46 43 38 38 36 36 37' - '36 43 4B 04 00 00 00 00 01 50 3B 3A 3A 3A 32 2E' - '2E 30 48 57 00 00 00 00 57 4C 3C 45 43 43 44 44' - '41 36 30 57 00 00 00 00 57 2C 4F 42 46 49 49 47' - '43 52 1B 57 00 00 00 00 57 19 43 4F 53 51 51 53' - '49 4D 0C 57 00 00 00 00 00 06 2E 30 30 30 30 30' - '2F 2D 02 00 00 00 00 00 00 00 57 57 57 57 57 57' - '57 57 00 00 00 00 FF FF 00 00 00 00 00 00 E0 03' - '00 00 C0 03 00 00 80 03 00 00 80 03 00 00 80 03' - '00 00 80 03 00 00 C0 03 00 00 C0 03 00 00 C0 03' - '00 00 C0 03 00 00 C0 03 00 00 C0 03 00 00 E0 07' - '00 00 F0 0F 00 00 28 00 00 00 20 00 00 00 40 00' - '00 00 01 00 04 00 00 00 00 00 00 02 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 80 00 00 00 00 80 00 00 80 80 00 00 00 00' - '80 00 80 00 80 00 00 80 80 00 C0 C0 C0 00 80 80' - '80 00 FF 00 00 00 00 FF 00 00 FF FF 00 00 00 00' - 'FF 00 FF 00 FF 00 00 FF FF 00 FF FF FF 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 06 60 00 00 00 00 00 00 00 77 77' - '77 77 77 77 77 7E E7 77 77 77 77 77 77 77 00 00' - '00 00 00 00 00 0E E0 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 08 80 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 88 88 88 88 88 88 88 88 88 88 00 00 00 00 00' - '07 FF 77 77 77 77 77 77 77 77 67 80 00 00 00 00' - '8F FF 08 88 87 77 88 77 78 78 66 70 00 00 00 00' - '8F FF 88 88 77 77 88 77 88 77 77 70 00 00 00 00' - '8F FF 88 88 87 77 88 87 88 77 77 70 00 00 00 00' - '8F FF 88 87 77 77 88 77 88 77 77 70 00 00 00 00' - '8F FF FF FF FF FF FF FF FF 77 77 70 00 00 00 00' - '8F FF FF FF FF FF FF FF FF FF FF 70 00 00 00 00' - '8F 77 77 77 77 77 77 77 77 77 77 F0 00 00 00 00' - '8F 77 77 77 77 77 77 77 77 77 77 F0 00 00 00 00' - '0F 77 77 77 FF FF FF FF 77 77 77 70 00 00 00 00' - '07 77 77 FF 77 77 77 77 FF 77 7F 80 00 00 00 00' - '07 77 7F 77 77 77 77 77 77 F7 7F 80 00 00 00 00' - '08 F7 77 77 77 77 77 77 77 77 7F 00 00 00 00 00' - '08 F7 77 77 77 77 77 77 77 77 7F 00 00 00 00 00' - '00 F7 77 77 77 77 77 77 77 77 77 00 00 00 00 00' - '00 77 77 77 77 77 77 77 77 77 77 00 00 00 00 00' - '00 7F 77 77 77 77 77 77 77 77 78 00 00 00 00 00' - '00 8F F7 7F FF FF FF FF 77 7F 78 00 00 00 00 00' - '00 8F FF 77 7F FF FF F7 77 FF 70 00 00 00 00 00' - '00 07 F7 FF FF F7 7F FF FF 7F 70 00 00 00 00 00' - '00 07 77 7F FF FF FF FF F7 7F 70 00 00 00 00 00' - '00 08 FF FF FF FF FF FF FF FF 80 00 00 00 00 00' - '00 00 88 88 88 88 88 88 88 88 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF' - 'FF FF 00 00 00 00 00 00 00 00 FF FE 7F FF FF FE' - '7F FF F0 00 00 0F E0 00 00 07 E0 00 00 07 E0 00' - '00 07 E0 00 00 07 E0 00 00 07 E0 00 00 07 E0 00' - '00 07 E0 00 00 07 E0 00 00 07 E0 00 00 07 E0 00' - '00 07 E0 00 00 07 E0 00 00 07 E0 00 00 07 F0 00' - '00 0F F0 00 00 0F F0 00 00 0F F0 00 00 0F F8 00' - '00 1F F8 00 00 1F F8 00 00 1F F8 00 00 1F F8 00' - '00 1F F8 00 00 3F FC 00 00 7F FF FF FF FF 28 00' - '00 00 10 00 00 00 20 00 00 00 01 00 04 00 00 00' - '00 00 80 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 80 00 00 00 00 80' - '00 00 80 80 00 00 00 00 80 00 80 00 80 00 00 80' - '80 00 C0 C0 C0 00 80 80 80 00 FF 00 00 00 00 FF' - '00 00 FF FF 00 00 00 00 FF 00 FF 00 FF 00 00 FF' - 'FF 00 FF FF FF 00 00 00 00 00 00 00 00 00 88 88' - '88 8E E8 88 88 88 00 00 00 00 00 00 00 00 00 07' - '88 88 87 78 80 00 00 7F 08 77 87 87 88 00 00 7F' - '88 77 88 87 78 00 00 7F FF FF FF FF F8 00 00 77' - '77 77 77 77 78 00 00 87 7F FF FF F7 78 00 00 07' - '77 77 77 77 F0 00 00 0F 77 77 77 77 F0 00 00 0F' - '77 77 77 77 70 00 00 07 F7 7F FF 7F 80 00 00 08' - '7F FF FF FF 80 00 00 00 77 77 77 77 00 00 00 00' - '00 00 00 00 00 00 FF FF 00 00 00 00 00 00 E0 03' - '00 00 C0 03 00 00 80 03 00 00 80 03 00 00 80 03' - '00 00 80 03 00 00 C0 03 00 00 C0 03 00 00 C0 03' - '00 00 C0 03 00 00 C0 03 00 00 C0 03 00 00 E0 07' - '00 00 F0 0F 00 00 28 00 00 00 30 00 00 00 60 00' - '00 00 01 00 08 00 00 00 00 00 00 09 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 01 01 01 00 02 02 02 00 05 05 05 00 06 06' - '06 00 07 07 07 00 08 08 08 00 09 09 09 00 0B 0B' - '0B 00 0C 0C 0C 00 13 13 13 00 18 18 18 00 19 19' - '19 00 1A 1A 1A 00 1E 1E 1E 00 1F 1F 1F 00 20 20' - '20 00 21 21 21 00 22 22 22 00 24 24 24 00 26 26' - '26 00 27 27 27 00 28 28 28 00 29 29 29 00 2A 2A' - '2A 00 2B 2B 2B 00 2C 2C 2C 00 2D 2D 2D 00 2E 2C' - '2D 00 2F 2F 2F 00 34 34 34 00 35 35 35 00 39 39' - '39 00 3B 3B 3B 00 3D 3D 3D 00 3F 3F 3F 00 40 40' - '40 00 41 41 41 00 42 42 42 00 47 47 47 00 48 48' - '48 00 49 49 49 00 4B 4B 4B 00 4F 4F 4F 00 53 53' - '53 00 56 56 56 00 58 58 58 00 59 59 59 00 5A 5A' - '5A 00 5B 5B 5B 00 5D 5D 5D 00 5F 5F 5F 00 61 61' - '61 00 63 63 63 00 64 64 64 00 66 66 66 00 67 67' - '67 00 68 68 68 00 6A 6A 6A 00 6B 6B 6B 00 6C 6C' - '6C 00 70 70 70 00 71 71 71 00 72 72 72 00 73 73' - '73 00 74 74 74 00 75 75 75 00 76 76 76 00 77 77' - '77 00 78 78 78 00 79 79 79 00 7A 7A 7A 00 7C 7C' - '7C 00 7D 7D 7D 00 7E 7E 7E 00 7F 7F 7F 00 2F 99' - '64 00 1C A8 60 00 0A BF 61 00 20 A8 63 00 51 A7' - '7C 00 17 CE 71 00 00 DC DC 00 00 FF FF 00 6B FF' - 'FF 00 80 80 80 00 81 81 81 00 83 83 83 00 84 83' - '84 00 85 85 85 00 87 87 87 00 88 88 88 00 8A 8A' - '8A 00 8C 8C 8C 00 8D 8D 8D 00 8E 8E 8E 00 8F 8F' - '8F 00 90 90 90 00 92 92 92 00 93 93 93 00 94 94' - '94 00 97 97 97 00 98 98 98 00 99 99 99 00 9A 9A' - '9A 00 9C 9C 9C 00 9D 9D 9D 00 9F 9F 9F 00 83 AB' - '97 00 96 AB A0 00 90 AF A0 00 99 AC A2 00 95 B2' - 'A3 00 9D B3 A8 00 A0 A0 A0 00 A1 A1 A1 00 A2 A2' - 'A2 00 A3 A3 A3 00 A4 A4 A4 00 A5 A5 A5 00 A6 A6' - 'A6 00 A7 A7 A7 00 A8 A8 A8 00 A9 A9 A9 00 AA AA' - 'AA 00 AB AB AB 00 AD A8 AB 00 AB AC AC 00 AC AC' - 'AC 00 AD AD AD 00 AE AE AE 00 AF AF AF 00 B0 B0' - 'B0 00 B1 B1 B1 00 B2 B2 B2 00 B3 B3 B3 00 B3 B4' - 'B3 00 B5 B5 B5 00 B6 B6 B6 00 B7 B7 B7 00 B8 B4' - 'B6 00 B8 B8 B8 00 B9 B9 B9 00 BA BA BA 00 BB BB' - 'BB 00 BF BB BD 00 BC BC BC 00 BD BD BD 00 BE BE' - 'BE 00 BF BF BF 00 91 D6 B4 00 91 D8 B5 00 C3 BD' - 'C0 00 C2 BE C0 00 C7 BF C3 00 C0 C0 C0 00 C1 C1' - 'C1 00 C2 C2 C2 00 C3 C3 C3 00 C4 C1 C3 00 C4 C3' - 'C3 00 C4 C3 C4 00 C6 C2 C4 00 C6 C3 C4 00 C6 C3' - 'C5 00 C4 C4 C4 00 C5 C4 C4 00 C5 C5 C5 00 C7 C4' - 'C5 00 C6 C6 C6 00 C7 C7 C7 00 C8 C8 C8 00 C8 C9' - 'C9 00 C9 C9 C9 00 CA CA CA 00 CB CB CB 00 CC CC' - 'CC 00 CD CD CD 00 CE CE CE 00 CF CF CF 00 D0 D0' - 'D0 00 D1 D1 D1 00 D2 D2 D2 00 D3 D3 D3 00 D4 D4' - 'D4 00 D5 D5 D5 00 D6 D6 D6 00 D7 D7 D7 00 D8 D8' - 'D8 00 D9 D9 D9 00 DA DA DA 00 DB DB DB 00 DC DC' - 'DC 00 DD DD DD 00 DE DE DE 00 DF DF DF 00 E0 E0' - 'E0 00 E1 E1 E1 00 E2 E2 E2 00 E3 E3 E3 00 E4 E4' - 'E4 00 E5 E5 E5 00 E6 E6 E6 00 E7 E7 E7 00 E8 E8' - 'E8 00 E9 E9 E9 00 EA EA EA 00 EB EB EB 00 EC EC' - 'EC 00 ED ED ED 00 EE EE EE 00 EF EF EF 00 F0 F0' - 'F0 00 F1 F1 F1 00 F2 F2 F2 00 F3 F3 F3 00 F4 F4' - 'F4 00 F5 F5 F5 00 F6 F6 F6 00 F7 F7 F7 00 F8 F8' - 'F8 00 F9 F9 F9 00 FA FA FA 00 FC FC FC 00 FF FF' - 'FF 00 00 00 00 00 A9 F1 E7 77 F8 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 1A 95 00 B0 6C' - '38 00 96 00 00 00 00 00 00 00 C9 F1 E7 77 96 00' - '00 00 A4 1A 95 00 09 00 00 00 00 00 00 00 96 00' - '00 00 96 00 00 00 09 00 00 00 F4 19 95 00 33 3B' - 'D4 77 B4 1A 95 00 09 48 E9 77 B8 10 E9 77 FF FF' - 'FF FF C9 F1 E7 77 16 EA 4B 00 F8 00 00 00 B0 6C' - '38 00 96 00 00 00 58 1A 95 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 E1 E1' - 'E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1' - 'E1 E1 E1 E1 E1 52 52 E1 E1 E1 E1 E1 E1 E1 E1 E1' - 'E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 55 55' - '55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55' - '55 55 55 55 52 53 53 52 55 55 55 55 55 55 55 55' - '55 55 55 55 55 55 55 55 55 55 55 55 55 55 9B 9B' - '9B 9B 9B 9B 9B 9B 9B 9B 9B 9B 9B 9B 9B 9B 9B 9B' - '9B 9B 9B 9B 54 54 54 54 9B 9B 9B 9B 9B 9B 9B 9B' - '9B 9B 9B 9B 9B 9B 9B 9B 9B 9B 9B 9B 9B 9B 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 54 54 E1 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 9B 9B E1 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 9B 9B E1 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1' - 'E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1' - 'E1 E1 E1 E1 E1 E1 E1 00 00 00 00 00 00 00 00 00' - '00 00 00 E1 E1 E1 E1 11 1A 19 1A 19 19 19 19 19' - '19 19 19 19 19 19 18 18 18 18 18 18 18 18 18 19' - '19 19 1C 1C 0A E1 E1 E1 00 00 00 00 00 00 00 00' - '00 00 00 E1 E1 14 61 AE B1 AF B2 B1 B0 AF AD AA' - 'A9 A7 A5 9E 9D 9D 9E 9B 9C 95 95 92 93 8F 90 89' - '88 8C 81 7F 7E 35 07 E1 E1 00 00 00 00 00 00 00' - '00 00 E1 E1 01 5C CF CC CB B9 59 5B 62 66 74 81' - '8F 9B 9E A9 AF AE AE BA AE B7 AF BB B0 B8 AA AC' - 'A2 71 4F 4D 6E 91 2B E1 E1 00 00 00 00 00 00 00' - '00 00 E1 E1 0C AA D0 C6 CA AF 21 23 2D 3F 5A 62' - '6A 77 7A 80 8B 7B 69 93 67 8B 73 9E 75 93 66 A6' - '9A 50 51 4E 4C 98 58 01 E1 00 00 00 00 00 00 00' - '00 00 E1 E1 17 B5 CE C8 CB B1 27 33 46 5A 60 65' - '72 79 7C 82 8E 76 61 8D 5C 83 64 95 65 8B 5B A0' - 'A4 70 96 97 6C 9F 5F 01 E1 00 00 00 00 00 00 00' - '00 00 E1 E1 16 B5 D0 CA CB B5 39 41 4A 59 5F 65' - '72 79 7C 82 8F 6B 57 87 48 7A 5A 90 5C 86 46 9D' - 'A5 A3 6F 6D 99 A5 5E 01 E1 00 00 00 00 00 00 00' - '00 00 E1 E1 16 B5 D2 CB CC BA 3D 3E 49 59 5F 65' - '72 79 7C 82 90 66 40 81 3A 72 45 8B 48 7D 38 9D' - 'A9 A1 A8 A2 95 A7 5E 01 E1 00 00 00 00 00 00 00' - '00 00 E1 E1 15 B5 D3 CD CF BA 3A 3C 45 56 5C 63' - '69 75 78 7D 8E 61 37 77 31 66 3B 85 3D 76 2E 9C' - 'AB A7 9E 9D 9C A9 5F 01 E1 00 00 00 00 00 00 00' - '00 00 E1 E1 15 B6 D6 CF CE C3 79 79 7D 82 84 87' - '8A 8E 8E 8F 93 8B 85 94 83 8F 85 94 84 8F 7D A7' - 'AB A9 A5 9E 9D AD 5F E1 E1 00 00 00 00 00 00 00' - '00 00 E1 E1 14 B7 D7 CF CF CE D1 CF CD CC CA C8' - 'C6 C5 C3 C2 BF BF C0 BC BD BA BA B6 B6 B3 B4 AF' - 'AE AD AA A5 9B AE 5F E1 E1 00 00 00 00 00 00 00' - '00 00 E1 E1 14 B7 DB DC DA DA DA D9 D9 D8 D8 D7' - 'D7 D7 D6 D6 D5 D5 D5 D4 D4 D4 D3 D3 D2 D2 D1 D1' - 'D1 D0 D0 CF C4 B4 5E E1 E1 00 00 00 00 00 00 00' - '00 00 E1 E1 13 BA E0 CD C5 C6 C6 C4 C3 C3 C3 C3' - 'C3 C4 C4 C4 C4 C4 C4 C4 C4 C4 C4 C4 C4 C4 C4 C4' - 'C6 C7 C7 C7 DC D3 5D E1 E1 00 00 00 00 00 00 00' - '00 00 E1 E1 13 C2 DC BD A5 90 95 BC BE BD BD BD' - 'BD BD BD BD BD BD BD BD BD BD BD BD BD BD BD BF' - 'B3 92 90 B5 C2 E0 68 E1 E1 00 00 00 00 00 00 00' - '00 00 E1 E1 0F BE D7 A9 7B 8B 84 9E BE BC BC BC' - 'BC BC BB BB BB BB BB BB BB BB BC BC BC BC BD B6' - '7A 8A 85 89 BC DF 69 E1 E1 00 00 00 00 00 00 00' - '00 00 E1 E1 03 9D DA 92 86 9E 7D 90 BC B9 B9 B9' - 'B8 B7 B7 B9 BB BC BC BB B9 B7 B7 B7 B8 B9 BB AD' - '78 9E 87 81 BA D9 43 E1 E1 00 00 00 00 00 00 00' - '00 00 00 E1 E1 76 D8 B3 A7 B6 95 AD B7 B6 B4 B7' - 'C1 C5 C7 CA CE D1 D1 CF CB C8 C6 C2 B8 B4 B6 B7' - 'A7 B4 9D 95 BD CC 2D E1 E1 00 00 00 00 00 00 00' - '00 00 00 E1 E1 4A D3 B5 B3 AF B3 B5 B2 B3 C3 D4' - 'D0 C5 C2 C1 C0 BF BF C0 C1 C2 C5 D0 D5 C5 B5 B2' - 'B4 AF B2 B5 BD B8 23 E1 E1 00 00 00 00 00 00 00' - '00 00 00 E1 E1 2F CD B4 B1 B1 B1 AE BA D1 CA C0' - 'B8 B9 BA BA BA BA BA BA BA BA B9 B9 BF C8 D1 BE' - 'AE B1 B1 AF C3 8D 12 E1 E1 00 00 00 00 00 00 00' - '00 00 00 E1 E1 24 BB B6 AE AF AE B8 CD C0 B4 B5' - 'B6 B6 B6 B6 B6 B6 B6 B6 B6 B6 B6 B6 B5 B4 BC CE' - 'BC AD AE AD C4 72 06 E1 E1 00 00 00 00 00 00 00' - '00 00 00 E1 E1 12 8B BF AE AF B2 C8 B8 B3 B5 B4' - 'B4 B4 B4 B3 B1 B2 B2 B2 B2 B2 B2 B2 B2 B2 B0 B4' - 'C6 B3 AA AD C6 55 E1 E1 E1 00 00 00 00 00 00 00' - '00 00 00 E1 E1 05 6B C1 B0 B1 BF BA B2 B4 B4 B4' - 'B4 B4 B4 B3 B0 AD AE AE AE AE AE AE AE AE AE AB' - 'B3 BE AA AD C6 30 E1 E1 E1 00 00 00 00 00 00 00' - '00 00 00 00 E1 E1 57 C1 B3 B5 BF B5 B4 B4 B4 B4' - 'B4 B4 B4 B4 B3 AD A7 A9 A9 A9 A9 A9 A9 A9 A9 A9' - 'AA B7 AB AD C2 26 E1 E1 00 00 00 00 00 00 00 00' - '00 00 00 00 E1 E1 33 C0 B5 B6 B8 B5 B5 B5 B5 B5' - 'B5 B5 B5 B5 B5 B4 AB 9E 9E 9E A5 A5 A5 A5 A5 A5' - 'A5 AA A7 AF B0 1B E1 E1 00 00 00 00 00 00 00 00' - '00 00 00 00 E1 E1 25 BC B8 B6 B4 B7 B7 B7 B7 B7' - 'B7 B7 B7 B7 B7 B7 B7 B1 AA A5 9D 9C 9B 9C 9C 9C' - '9D 95 9B B2 86 0D E1 E1 00 00 00 00 00 00 00 00' - '00 00 00 00 E1 E1 1A B0 BA B9 B0 B9 BA BA BA BA' - 'BA BA BA BA BA BA BA BB BA B9 B7 B3 B0 AD A9 A5' - '9D 87 93 B4 67 07 E1 E1 00 00 00 00 00 00 00 00' - '00 00 00 00 E1 E1 0B 84 BF BF B4 B6 BF BD BE BE' - 'BE BE BE BE BE BE BE BE BE BE BE BF BF BE BD BD' - 'B3 A7 B0 AE 47 02 E1 E1 00 00 00 00 00 00 00 00' - '00 00 00 00 E1 E1 06 65 C0 C3 C0 B2 BA C2 C1 C1' - 'C1 C1 C1 C1 C1 C1 C1 C1 C1 C1 C1 C1 C1 C1 C2 BC' - 'B2 C1 C0 A9 2C E1 E1 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 E1 E1 44 B7 C6 C5 C2 B2 BB C5 C6' - 'C4 C4 C4 C4 C4 C4 C4 C4 C4 C4 C4 C4 C5 C5 BD B1' - 'BE C7 BD 90 20 E1 E1 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 E1 E1 2A AD C9 C7 C8 C5 BB B6 BE' - 'C8 C9 C8 C8 C8 C8 C8 C8 C8 C8 C9 C9 C0 B6 BA C4' - 'C8 CA BA 7A 10 E1 E1 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 E1 E1 1F 93 CA CA CA CB CB C3 B6' - 'B7 C2 C7 C7 C8 C8 C8 C8 C7 C7 C2 B8 B5 C1 CB CB' - 'CA CC B8 68 08 E1 E1 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 E1 E1 0E 7D C8 D1 CB CA D0 CF CE' - 'C8 C4 C3 C3 C1 C0 C0 C1 C3 C3 C3 C6 CD D0 CE C9' - 'CF CF BA 5C E1 E1 E1 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 E1 E1 06 67 C8 C3 93 9C BA D0 D1' - 'D1 D2 D2 D1 D0 CF CF D0 D1 D2 D2 D1 D2 C8 9D 94' - 'B5 D0 B8 42 E1 E1 E1 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 E1 E1 5E C4 A5 86 8D 86 CF D5' - 'D4 D4 D4 D4 D4 D4 D4 D4 D4 D4 D4 D4 D7 B9 84 8A' - '8B CF B1 34 E1 E1 E1 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 E1 E1 36 B2 C1 C0 B9 C8 DD DD' - 'DD DD DD DD DD DD DD DD DD DD DD DD DE D6 C3 BC' - 'C0 BB 84 1E E1 E1 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 E1 E1 0C 55 94 B7 BB BF BC BC' - 'BC BC BC BC BC BC BC BC BC BC BC BC BC BD BD BB' - 'B1 84 32 04 E1 E1 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 E1 E1 E1 09 22 29 28 28 28 28' - '28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 29' - '29 1D 02 E1 E1 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 E1 E1 E1 E1 E1 E1 E1 E1 E1' - 'E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1' - 'E1 E1 E1 E1 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 E1 E1 E1 E1 E1 E1 E1' - 'E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1' - 'E1 E1 E1 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF' - 'FF FF FF FF 00 00 FF FF FF FF FF FF 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 FF FF FE 3F FF FF 00 00 FF FF' - 'FE 3F FF FF 00 00 FF FF FE 3F FF FF 00 00 FC 00' - '00 00 00 7F 00 00 F8 00 00 00 00 3F 00 00 F8 00' - '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F0 00' - '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F0 00' - '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F0 00' - '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F0 00' - '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F0 00' - '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F0 00' - '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F8 00' - '00 00 00 1F 00 00 F8 00 00 00 00 1F 00 00 F8 00' - '00 00 00 1F 00 00 F8 00 00 00 00 1F 00 00 F8 00' - '00 00 00 1F 00 00 F8 00 00 00 00 1F 00 00 FC 00' - '00 00 00 3F 00 00 FC 00 00 00 00 3F 00 00 FC 00' - '00 00 00 3F 00 00 FC 00 00 00 00 3F 00 00 FC 00' - '00 00 00 3F 00 00 FC 00 00 00 00 7F 00 00 FE 00' - '00 00 00 7F 00 00 FE 00 00 00 00 7F 00 00 FE 00' - '00 00 00 7F 00 00 FE 00 00 00 00 7F 00 00 FE 00' - '00 00 00 7F 00 00 FF 00 00 00 00 7F 00 00 FF 00' - '00 00 00 FF 00 00 FF 00 00 00 00 FF 00 00 FF 00' - '00 00 01 FF 00 00 FF 80 00 00 03 FF 00 00 FF E0' - '00 00 07 FF 00 00 FF FF FF FF FF FF 00 00 28 00' - '00 00 30 00 00 00 60 00 00 00 01 00 04 00 00 00' - '00 00 80 04 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 80 00 00 00 00 80' - '00 00 80 80 00 00 00 00 80 00 80 00 80 00 00 80' - '80 00 C0 C0 C0 00 80 80 80 00 FF 00 00 00 00 FF' - '00 00 FF FF 00 00 00 00 FF 00 FF 00 FF 00 00 FF' - 'FF 00 FF FF FF 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 0E E0 00 00 00 00 00 00 00 00 00 00 00 88 88' - '88 88 88 88 88 88 88 88 88 EE EE 88 88 88 88 88' - '88 88 88 88 88 88 77 77 77 77 77 77 77 77 77 77' - '77 EE EE 77 77 77 77 77 77 77 77 77 77 77 00 00' - '00 00 00 00 00 00 00 00 00 0E E0 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 07 70 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 07 70 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 87 77 77 77 77 77' - '77 77 77 77 77 77 77 77 77 78 00 00 00 00 00 00' - '00 08 FF F7 88 88 77 77 77 77 77 77 77 77 77 77' - '66 87 80 00 00 00 00 00 00 07 FF F7 00 88 88 87' - '77 77 87 87 77 77 87 78 66 67 80 00 00 00 00 00' - '00 07 FF F7 88 88 88 77 77 77 87 87 87 87 87 77' - '77 87 80 00 00 00 00 00 00 07 FF F7 88 88 88 77' - '77 78 87 87 87 87 87 77 77 77 80 00 00 00 00 00' - '00 07 FF F7 88 88 88 77 77 78 87 87 87 87 87 77' - '77 77 80 00 00 00 00 00 00 07 FF F7 88 88 88 87' - '77 78 87 88 87 87 87 77 77 77 80 00 00 00 00 00' - '00 07 FF F7 77 77 77 77 77 77 77 77 77 77 77 77' - '77 77 80 00 00 00 00 00 00 07 FF FF FF FF FF FF' - '77 77 77 77 77 77 77 77 77 77 80 00 00 00 00 00' - '00 07 FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF F7 80 00 00 00 00 00 00 07 FF FF FF 77 77 7F' - 'FF FF FF FF FF FF FF FF FF FF 80 00 00 00 00 00' - '00 07 F7 77 77 77 77 77 77 77 77 77 77 77 77 77' - '77 7F 80 00 00 00 00 00 00 07 F7 77 77 77 77 77' - '77 77 77 77 77 77 77 77 77 7F 80 00 00 00 00 00' - '00 07 F7 77 77 77 77 77 77 77 77 77 77 77 77 77' - '77 7F 80 00 00 00 00 00 00 07 F7 77 77 77 77 7F' - 'FF FF FF FF F7 77 77 77 77 7F 80 00 00 00 00 00' - '00 08 F7 77 77 77 7F FF 77 77 77 77 FF FF 77 77' - '77 77 00 00 00 00 00 00 00 08 F7 77 77 7F F7 77' - '77 77 77 77 77 7F F7 77 77 77 00 00 00 00 00 00' - '00 00 77 77 77 F7 77 77 77 77 77 77 77 77 7F 77' - '77 F7 00 00 00 00 00 00 00 00 77 77 7F 77 77 77' - '77 77 77 77 77 77 77 F7 77 F8 00 00 00 00 00 00' - '00 00 87 77 77 77 77 77 77 77 77 77 77 77 77 77' - '77 F8 00 00 00 00 00 00 00 00 87 77 77 77 77 77' - '77 77 77 77 77 77 77 77 77 78 00 00 00 00 00 00' - '00 00 87 77 77 77 77 77 77 77 77 77 77 77 77 77' - '77 70 00 00 00 00 00 00 00 00 87 77 77 77 77 77' - '77 77 77 77 77 77 77 77 77 70 00 00 00 00 00 00' - '00 00 07 77 77 77 77 77 77 77 77 77 77 77 77 77' - '77 80 00 00 00 00 00 00 00 00 07 77 77 77 77 77' - '77 77 77 77 77 77 77 77 77 80 00 00 00 00 00 00' - '00 00 08 77 77 77 77 77 77 77 77 77 77 77 77 77' - '77 80 00 00 00 00 00 00 00 00 08 7F F7 77 77 77' - '77 77 77 77 77 77 77 7F 77 00 00 00 00 00 00 00' - '00 00 08 7F FF F7 77 77 77 77 77 77 77 77 7F FF' - '77 00 00 00 00 00 00 00 00 00 00 7F FF FF 77 77' - '77 77 77 77 77 77 FF FF 78 00 00 00 00 00 00 00' - '00 00 00 7F FF FF FF FF 77 77 77 77 7F FF FF FF' - '78 00 00 00 00 00 00 00 00 00 00 8F 77 77 FF FF' - 'FF FF FF FF FF FF 77 7F 78 00 00 00 00 00 00 00' - '00 00 00 8F 77 77 FF FF FF FF FF FF FF F7 77 7F' - '78 00 00 00 00 00 00 00 00 00 00 87 77 7F FF FF' - 'FF FF FF FF FF FF 77 77 70 00 00 00 00 00 00 00' - '00 00 00 08 77 77 77 77 77 77 77 77 77 77 77 77' - '80 00 00 00 00 00 00 00 00 00 00 00 08 88 88 88' - '88 88 88 88 88 88 88 80 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 FF FF FF FF FF FF 00 00 FF FF' - 'FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF' - 'FE 3F FF FF 00 00 FF FF FE 3F FF FF 00 00 FF FF' - 'FE 3F FF FF 00 00 FC 00 00 00 00 7F 00 00 F8 00' - '00 00 00 3F 00 00 F8 00 00 00 00 1F 00 00 F0 00' - '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F0 00' - '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F0 00' - '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F0 00' - '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F0 00' - '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F0 00' - '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F0 00' - '00 00 00 1F 00 00 F8 00 00 00 00 1F 00 00 F8 00' - '00 00 00 1F 00 00 F8 00 00 00 00 1F 00 00 F8 00' - '00 00 00 1F 00 00 F8 00 00 00 00 1F 00 00 F8 00' - '00 00 00 1F 00 00 FC 00 00 00 00 3F 00 00 FC 00' - '00 00 00 3F 00 00 FC 00 00 00 00 3F 00 00 FC 00' - '00 00 00 3F 00 00 FC 00 00 00 00 3F 00 00 FC 00' - '00 00 00 7F 00 00 FE 00 00 00 00 7F 00 00 FE 00' - '00 00 00 7F 00 00 FE 00 00 00 00 7F 00 00 FE 00' - '00 00 00 7F 00 00 FE 00 00 00 00 7F 00 00 FF 00' - '00 00 00 7F 00 00 FF 00 00 00 00 FF 00 00 FF 00' - '00 00 00 FF 00 00 FF 00 00 00 01 FF 00 00 FF 80' - '00 00 03 FF 00 00 FF E0 00 00 07 FF 00 00 FF FF' - 'FF FF FF FF 00 00 28 00 00 00 30 00 00 00 60 00' - '00 00 01 00 20 00 00 00 00 00 00 24 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 30 00 00 00 30 00 00 00 30 00 00 00 30 00 00' - '00 30 00 00 00 30 00 00 00 30 00 00 00 30 00 00' - '00 30 00 00 00 30 00 00 00 30 00 00 00 30 00 00' - '00 30 00 00 00 30 00 00 00 30 00 00 00 30 00 00' - '00 30 00 00 00 30 00 00 00 30 00 00 00 30 00 00' - '00 30 00 00 00 30 00 00 00 30 00 00 00 48 00 00' - '00 78 00 00 00 78 00 00 00 48 00 00 00 30 00 00' - '00 30 00 00 00 30 00 00 00 30 00 00 00 30 00 00' - '00 30 00 00 00 30 00 00 00 30 00 00 00 30 00 00' - '00 30 00 00 00 30 00 00 00 30 00 00 00 30 00 00' - '00 30 00 00 00 30 00 00 00 30 00 00 00 30 00 00' - '00 30 00 00 00 30 00 00 00 30 00 00 00 30 00 00' - '00 90 00 00 00 90 00 00 00 90 00 00 00 90 00 00' - '00 90 00 00 00 90 00 00 00 90 00 00 00 90 00 00' - '00 90 00 00 00 90 00 00 00 90 00 00 00 90 00 00' - '00 90 00 00 00 90 00 00 00 90 00 00 00 90 00 00' - '00 90 00 00 00 90 00 00 00 90 00 00 00 90 00 00' - '00 90 00 00 00 90 00 00 00 90 00 DC DC FF 00 DC' - 'DC FF 00 00 00 B4 00 00 00 9C 00 00 00 90 00 00' - '00 90 00 00 00 90 00 00 00 90 00 00 00 90 00 00' - '00 90 00 00 00 90 00 00 00 90 00 00 00 90 00 00' - '00 90 00 00 00 90 00 00 00 90 00 00 00 90 00 00' - '00 90 00 00 00 90 00 00 00 90 00 00 00 90 00 00' - '00 90 00 00 00 90 00 00 00 90 00 00 00 90 80 80' - '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' - '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' - '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' - '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' - '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' - '80 FF 80 80 80 FF 00 DC DC FF 00 FF FF FF 00 FF' - 'FF FF 00 DC DC FF 80 80 80 FF 80 80 80 FF 80 80' - '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' - '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' - '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' - '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' - '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF C0 C0' - 'C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0' - 'C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0' - 'C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0' - 'C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0' - 'C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0' - 'C0 FF C0 C0 C0 FF 6B FF FF FF 6B FF FF FF 6B FF' - 'FF FF 6B FF FF FF C0 C0 C0 FF C0 C0 C0 FF C0 C0' - 'C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0' - 'C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0' - 'C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0' - 'C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0' - 'C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0 C0 FF 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 6B FF FF FF 6B FF' - 'FF FF 00 00 00 90 00 00 00 30 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 C0 C0 C0 FF C0 C0' - 'C0 FF 00 00 00 92 00 00 00 37 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 16 00 00 00 34 00 00 00 37 00 00 00 37 00 00' - '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' - '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' - '00 37 00 00 00 37 00 00 00 37 C0 C0 C0 FF C0 C0' - 'C0 FF 00 00 00 37 00 00 00 37 00 00 00 37 00 00' - '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' - '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' - '00 37 00 00 00 37 00 00 00 35 00 00 00 18 00 00' - '00 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 05 00 00 00 69 00 00' - '00 C5 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' - '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' - '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' - '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' - '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' - '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' - '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' - '00 F7 00 00 00 F7 00 00 00 F1 00 00 00 B1 00 00' - '00 5C 00 00 00 0D 00 00 00 01 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 05 00 00 00 9B 00 00 00 FF 00 00' - '00 FF 21 21 21 FF 2C 2C 2C FF 2B 2B 2B FF 2C 2C' - '2C FF 2B 2B 2B FF 2B 2B 2B FF 2B 2B 2B FF 2B 2B' - '2B FF 2B 2B 2B FF 2B 2B 2B FF 2B 2B 2B FF 2B 2B' - '2B FF 2B 2B 2B FF 2B 2B 2B FF 2B 2B 2B FF 2A 2A' - '2A FF 2A 2A 2A FF 2A 2A 2A FF 2A 2A 2A FF 2A 2A' - '2A FF 2A 2A 2A FF 2A 2A 2A FF 2A 2A 2A FF 2A 2A' - '2A FF 2B 2B 2B FF 2B 2B 2B FF 2B 2B 2B FF 2E 2C' - '2D FF 2E 2C 2D FF 13 13 13 FF 00 00 00 FF 00 00' - '00 F6 00 00 00 69 00 00 00 09 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 54 00 00 00 FF 26 26 26 FF 90 90' - '90 FF CA CA CA FF CD CD CD FF CB CB CB FF CE CE' - 'CE FF CD CD CD FF CC CC CC FF CB CB CB FF C9 C9' - 'C9 FF C7 C7 C7 FF C6 C6 C6 FF C5 C5 C5 FF C4 C4' - 'C4 FF C3 C3 C3 FF C2 C2 C2 FF C2 C2 C2 FF C3 C3' - 'C3 FF C0 C0 C0 FF C1 C1 C1 FF BF BF BF FF BF BF' - 'BF FF BC BC BC FF BD BD BD FF BA BA BA FF BB BB' - 'BB FF B5 B5 B5 FF B3 B4 B3 FF B8 B4 B6 FF AD AD' - 'AD FF AB AC AC FF AD A8 AB FF 63 63 63 FF 09 09' - '09 FF 00 00 00 EF 00 00 00 42 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 03 00 00 00 AD 01 01 01 FF 8A 8A 8A FF EB EB' - 'EB FF E8 E8 E8 FF E7 E7 E7 FF D5 D5 D5 FF 85 85' - '85 FF 88 88 88 FF 92 92 92 FF 98 98 98 FF A2 A2' - 'A2 FF AD AD AD FF BA BA BA FF C0 C0 C0 FF C3 C3' - 'C3 FF C6 C6 C6 FF CB CB CB FF CA CA CA FF CA CA' - 'CA FF D6 D6 D6 FF CA CA CA FF D3 D3 D3 FF CB CB' - 'CB FF D7 D7 D7 FF CC CC CC FF D4 D4 D4 FF C7 C7' - 'C7 FF C8 C9 C9 FF C6 C2 C4 FF 9D B3 A8 FF 20 A8' - '63 FF 1C A8 60 FF 90 AF A0 FF BF BB BD FF 4F 4F' - '4F FF 00 00 00 FF 00 00 00 81 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 15 00 00 00 F0 19 19 19 FF C7 C7 C7 FF EC EC' - 'EC FF E2 E2 E2 FF E6 E6 E6 FF CB CB CB FF 3B 3B' - '3B FF 3F 3F 3F FF 56 56 56 FF 72 72 72 FF 87 87' - '87 FF 92 92 92 FF 9D 9D 9D FF A5 A5 A5 FF A8 A8' - 'A8 FF AC AC AC FF B7 B7 B7 FF A9 A9 A9 FF 9C 9C' - '9C FF BD BD BD FF 99 99 99 FF B7 B7 B7 FF A1 A1' - 'A1 FF C3 C3 C3 FF A3 A3 A3 FF BD BD BD FF 98 98' - '98 FF C5 C4 C4 FF C7 BF C3 FF 51 A7 7C FF 17 CE' - '71 FF 0A BF 61 FF 2F 99 64 FF C3 BD C0 FF 84 83' - '84 FF 01 01 01 FF 00 00 00 A3 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 30 00 00 00 FA 29 29 29 FF D1 D1 D1 FF EA EA' - 'EA FF E4 E4 E4 FF E7 E7 E7 FF CD CD CD FF 47 47' - '47 FF 5F 5F 5F FF 79 79 79 FF 87 87 87 FF 8F 8F' - '8F FF 97 97 97 FF A0 A0 A0 FF A7 A7 A7 FF AA AA' - 'AA FF AE AE AE FF B9 B9 B9 FF A4 A4 A4 FF 90 90' - '90 FF B8 B8 B8 FF 8A 8A 8A FF AF AF AF FF 94 94' - '94 FF BF BF BF FF 97 97 97 FF B7 B7 B7 FF 88 88' - '88 FF C4 C3 C3 FF C6 C3 C5 FF 95 B2 A3 FF 91 D6' - 'B4 FF 91 D8 B5 FF 83 AB 97 FF C4 C1 C3 FF 8E 8E' - '8E FF 01 01 01 FF 00 00 00 B7 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 34 00 00 00 F9 28 28 28 FF D1 D1 D1 FF EC EC' - 'EC FF E6 E6 E6 FF E7 E7 E7 FF D1 D1 D1 FF 68 68' - '68 FF 74 74 74 FF 7E 7E 7E FF 85 85 85 FF 8E 8E' - '8E FF 97 97 97 FF A0 A0 A0 FF A7 A7 A7 FF AA AA' - 'AA FF AE AE AE FF BA BA BA FF 9F 9F 9F FF 83 83' - '83 FF B3 B3 B3 FF 7C 7C 7C FF A8 A8 A8 FF 87 87' - '87 FF BB BB BB FF 8A 8A 8A FF B2 B2 B2 FF 79 79' - '79 FF C2 C2 C2 FF C4 C4 C4 FF C6 C3 C4 FF 99 AC' - 'A2 FF 96 AB A0 FF C2 BE C0 FF C4 C4 C4 FF 8D 8D' - '8D FF 01 01 01 FF 00 00 00 BA 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 33 00 00 00 F9 28 28 28 FF D1 D1 D1 FF EE EE' - 'EE FF E7 E7 E7 FF E8 E8 E8 FF D6 D6 D6 FF 70 70' - '70 FF 71 71 71 FF 7D 7D 7D FF 85 85 85 FF 8E 8E' - '8E FF 97 97 97 FF A0 A0 A0 FF A7 A7 A7 FF AA AA' - 'AA FF AE AE AE FF BB BB BB FF 98 98 98 FF 73 73' - '73 FF AD AD AD FF 6A 6A 6A FF A0 A0 A0 FF 78 78' - '78 FF B7 B7 B7 FF 7C 7C 7C FF AB AB AB FF 67 67' - '67 FF C2 C2 C2 FF C6 C6 C6 FF C4 C3 C4 FF C7 C4' - 'C5 FF C6 C2 C4 FF BF BF BF FF C5 C5 C5 FF 8D 8D' - '8D FF 01 01 01 FF 00 00 00 B9 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 33 00 00 00 F9 27 27 27 FF D1 D1 D1 FF EF EF' - 'EF FF E9 E9 E9 FF EB EB EB FF D6 D6 D6 FF 6A 6A' - '6A FF 6C 6C 6C FF 78 78 78 FF 81 81 81 FF 8A 8A' - '8A FF 93 93 93 FF 9C 9C 9C FF A3 A3 A3 FF A6 A6' - 'A6 FF AB AB AB FF B9 B9 B9 FF 90 90 90 FF 66 66' - '66 FF A5 A5 A5 FF 5B 5B 5B FF 98 98 98 FF 6B 6B' - '6B FF B1 B1 B1 FF 70 70 70 FF A4 A4 A4 FF 58 58' - '58 FF C1 C1 C1 FF C8 C8 C8 FF C5 C5 C5 FF C3 C3' - 'C3 FF C2 C2 C2 FF C1 C1 C1 FF C6 C6 C6 FF 8E 8E' - '8E FF 01 01 01 FF 00 00 00 B9 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 33 00 00 00 F9 27 27 27 FF D2 D2 D2 FF F2 F2' - 'F2 FF EB EB EB FF EA EA EA FF DF DF DF FF A7 A7' - 'A7 FF A7 A7 A7 FF AB AB AB FF AE AE AE FF B0 B0' - 'B0 FF B3 B3 B3 FF B6 B6 B6 FF B9 B9 B9 FF B9 B9' - 'B9 FF BA BA BA FF BD BD BD FF B7 B7 B7 FF B1 B1' - 'B1 FF BE BE BE FF AF AF AF FF BA BA BA FF B1 B1' - 'B1 FF BE BE BE FF B0 B0 B0 FF BA BA BA FF AB AB' - 'AB FF C5 C5 C5 FF C8 C8 C8 FF C6 C6 C6 FF C4 C4' - 'C4 FF C3 C3 C3 FF C2 C2 C2 FF C9 C9 C9 FF 8E 8E' - '8E FF 00 00 00 FF 00 00 00 B9 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 33 00 00 00 F9 26 26 26 FF D3 D3 D3 FF F3 F3' - 'F3 FF EB EB EB FF EB EB EB FF EA EA EA FF ED ED' - 'ED FF EB EB EB FF E9 E9 E9 FF E8 E8 E8 FF E6 E6' - 'E6 FF E4 E4 E4 FF E2 E2 E2 FF E1 E1 E1 FF DF DF' - 'DF FF DE DE DE FF DB DB DB FF DB DB DB FF DC DC' - 'DC FF D8 D8 D8 FF D9 D9 D9 FF D6 D6 D6 FF D6 D6' - 'D6 FF D2 D2 D2 FF D2 D2 D2 FF CF CF CF FF D0 D0' - 'D0 FF CB CB CB FF CA CA CA FF C9 C9 C9 FF C7 C7' - 'C7 FF C4 C4 C4 FF C0 C0 C0 FF CA CA CA FF 8E 8E' - '8E FF 00 00 00 FF 00 00 00 B9 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 33 00 00 00 F9 26 26 26 FF D3 D3 D3 FF F7 F7' - 'F7 FF F8 F8 F8 FF F6 F6 F6 FF F6 F6 F6 FF F6 F6' - 'F6 FF F5 F5 F5 FF F5 F5 F5 FF F4 F4 F4 FF F4 F4' - 'F4 FF F3 F3 F3 FF F3 F3 F3 FF F3 F3 F3 FF F2 F2' - 'F2 FF F2 F2 F2 FF F1 F1 F1 FF F1 F1 F1 FF F1 F1' - 'F1 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0 F0 FF EF EF' - 'EF FF EF EF EF FF EE EE EE FF EE EE EE FF ED ED' - 'ED FF ED ED ED FF ED ED ED FF EC EC EC FF EC EC' - 'EC FF EB EB EB FF E0 E0 E0 FF D0 D0 D0 FF 8D 8D' - '8D FF 00 00 00 FF 00 00 00 B9 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 33 00 00 00 F9 24 24 24 FF D6 D6 D6 FF FF FF' - 'FF FF E9 E9 E9 FF E1 E1 E1 FF E2 E2 E2 FF E2 E2' - 'E2 FF E0 E0 E0 FF DF DF DF FF DF DF DF FF DF DF' - 'DF FF DF DF DF FF DF DF DF FF E0 E0 E0 FF E0 E0' - 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' - 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' - 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' - 'E0 FF E0 E0 E0 FF E2 E2 E2 FF E3 E3 E3 FF E3 E3' - 'E3 FF E3 E3 E3 FF F8 F8 F8 FF EF EF EF FF 8C 8C' - '8C FF 00 00 00 FF 00 00 00 B9 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 34 00 00 00 FA 24 24 24 FF DE DE DE FF F8 F8' - 'F8 FF D9 D9 D9 FF C4 C4 C4 FF BB BB BB FF BF BF' - 'BF FF D8 D8 D8 FF DA DA DA FF D9 D9 D9 FF D9 D9' - 'D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9' - 'D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9' - 'D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9' - 'D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9' - 'D9 FF DB DB DB FF CF CF CF FF BC BC BC FF BB BB' - 'BB FF D1 D1 D1 FF DE DE DE FF FF FF FF FF 9A 9A' - '9A FF 00 00 00 FF 00 00 00 BA 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 25 00 00 00 F7 1F 1F 1F FF DA DA DA FF F3 F3' - 'F3 FF C6 C6 C6 FF A9 A9 A9 FF B7 B7 B7 FF B0 B0' - 'B0 FF C3 C3 C3 FF DA DA DA FF D8 D8 D8 FF D8 D8' - 'D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8 D8 FF D7 D7' - 'D7 FF D7 D7 D7 FF D7 D7 D7 FF D7 D7 D7 FF D7 D7' - 'D7 FF D7 D7 D7 FF D7 D7 D7 FF D7 D7 D7 FF D8 D8' - 'D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8 D8 FF D9 D9' - 'D9 FF D2 D2 D2 FF A8 A8 A8 FF B6 B6 B6 FF B1 B1' - 'B1 FF B5 B5 B5 FF D8 D8 D8 FF FC FC FC FF 9C 9C' - '9C FF 00 00 00 FF 00 00 00 AE 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 07 00 00 00 D0 05 05 05 FF C2 C2 C2 FF F6 F6' - 'F6 FF BC BC BC FF B2 B2 B2 FF C3 C3 C3 FF AB AB' - 'AB FF BB BB BB FF D8 D8 D8 FF D5 D5 D5 FF D5 D5' - 'D5 FF D5 D5 D5 FF D4 D4 D4 FF D3 D3 D3 FF D3 D3' - 'D3 FF D5 D5 D5 FF D7 D7 D7 FF D8 D8 D8 FF D8 D8' - 'D8 FF D7 D7 D7 FF D5 D5 D5 FF D3 D3 D3 FF D3 D3' - 'D3 FF D3 D3 D3 FF D4 D4 D4 FF D5 D5 D5 FF D7 D7' - 'D7 FF C9 C9 C9 FF A6 A6 A6 FF C3 C3 C3 FF B3 B3' - 'B3 FF AD AD AD FF D6 D6 D6 FF F5 F5 F5 FF 76 76' - '76 FF 00 00 00 FF 00 00 00 8C 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 9C 00 00 00 FF A4 A4 A4 FF F4 F4' - 'F4 FF CF CF CF FF C5 C5 C5 FF D2 D2 D2 FF BF BF' - 'BF FF C9 C9 C9 FF D3 D3 D3 FF D2 D2 D2 FF D0 D0' - 'D0 FF D3 D3 D3 FF DD DD DD FF E1 E1 E1 FF E3 E3' - 'E3 FF E6 E6 E6 FF EA EA EA FF ED ED ED FF ED ED' - 'ED FF EB EB EB FF E7 E7 E7 FF E4 E4 E4 FF E2 E2' - 'E2 FF DE DE DE FF D4 D4 D4 FF D0 D0 D0 FF D2 D2' - 'D2 FF D3 D3 D3 FF C5 C5 C5 FF D0 D0 D0 FF C2 C2' - 'C2 FF BF BF BF FF D9 D9 D9 FF E8 E8 E8 FF 56 56' - '56 FF 00 00 00 FF 00 00 00 72 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 73 00 00 00 FF 7E 7E 7E FF EF EF' - 'EF FF D1 D1 D1 FF CF CF CF FF CB CB CB FF CF CF' - 'CF FF D1 D1 D1 FF CE CE CE FF CF CF CF FF DF DF' - 'DF FF F0 F0 F0 FF EC EC EC FF E1 E1 E1 FF DE DE' - 'DE FF DD DD DD FF DC DC DC FF DB DB DB FF DB DB' - 'DB FF DC DC DC FF DD DD DD FF DE DE DE FF E1 E1' - 'E1 FF EC EC EC FF F1 F1 F1 FF E1 E1 E1 FF D1 D1' - 'D1 FF CE CE CE FF D0 D0 D0 FF CB CB CB FF CE CE' - 'CE FF D1 D1 D1 FF D9 D9 D9 FF D4 D4 D4 FF 3F 3F' - '3F FF 00 00 00 FF 00 00 00 55 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 59 00 00 00 FF 59 59 59 FF E9 E9' - 'E9 FF D0 D0 D0 FF CD CD CD FF CD CD CD FF CD CD' - 'CD FF CA CA CA FF D6 D6 D6 FF ED ED ED FF E6 E6' - 'E6 FF DC DC DC FF D4 D4 D4 FF D5 D5 D5 FF D6 D6' - 'D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6' - 'D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6 D6 FF D5 D5' - 'D5 FF D5 D5 D5 FF DB DB DB FF E4 E4 E4 FF ED ED' - 'ED FF DA DA DA FF CA CA CA FF CD CD CD FF CD CD' - 'CD FF CB CB CB FF DF DF DF FF B8 B8 B8 FF 22 22' - '22 FF 00 00 00 FB 00 00 00 3A 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 3E 00 00 00 FE 40 40 40 FF D7 D7' - 'D7 FF D2 D2 D2 FF CA CA CA FF CB CB CB FF CA CA' - 'CA FF D4 D4 D4 FF E9 E9 E9 FF DC DC DC FF D0 D0' - 'D0 FF D1 D1 D1 FF D2 D2 D2 FF D2 D2 D2 FF D2 D2' - 'D2 FF D2 D2 D2 FF D2 D2 D2 FF D2 D2 D2 FF D2 D2' - 'D2 FF D2 D2 D2 FF D2 D2 D2 FF D2 D2 D2 FF D2 D2' - 'D2 FF D2 D2 D2 FF D1 D1 D1 FF D0 D0 D0 FF D8 D8' - 'D8 FF EA EA EA FF D8 D8 D8 FF C9 C9 C9 FF CA CA' - 'CA FF C9 C9 C9 FF E0 E0 E0 FF A0 A0 A0 FF 08 08' - '08 FF 00 00 00 EB 00 00 00 22 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 25 00 00 00 F8 22 22 22 FF B7 B7' - 'B7 FF DB DB DB FF CA CA CA FF CB CB CB FF CE CE' - 'CE FF E4 E4 E4 FF D4 D4 D4 FF CF CF CF FF D1 D1' - 'D1 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0' - 'D0 FF CF CF CF FF CD CD CD FF CE CE CE FF CE CE' - 'CE FF CE CE CE FF CE CE CE FF CE CE CE FF CE CE' - 'CE FF CE CE CE FF CE CE CE FF CE CE CE FF CC CC' - 'CC FF D0 D0 D0 FF E2 E2 E2 FF CF CF CF FF C7 C7' - 'C7 FF C9 C9 C9 FF E2 E2 E2 FF 80 80 80 FF 00 00' - '00 FF 00 00 00 C2 00 00 00 0E 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 0C 00 00 00 E1 07 07 07 FF 9F 9F' - '9F FF DD DD DD FF CC CC CC FF CD CD CD FF DB DB' - 'DB FF D6 D6 D6 FF CE CE CE FF D0 D0 D0 FF D0 D0' - 'D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0' - 'D0 FF CF CF CF FF CC CC CC FF C9 C9 C9 FF CA CA' - 'CA FF CA CA CA FF CA CA CA FF CA CA CA FF CA CA' - 'CA FF CA CA CA FF CA CA CA FF CA CA CA FF CA CA' - 'CA FF C8 C8 C8 FF CF CF CF FF DA DA DA FF C7 C7' - 'C7 FF C9 C9 C9 FF E2 E2 E2 FF 5A 5A 5A FF 00 00' - '00 FF 00 00 00 94 00 00 00 01 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 B2 00 00 00 FF 83 83' - '83 FF DD DD DD FF CF CF CF FF D1 D1 D1 FF DB DB' - 'DB FF D1 D1 D1 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0' - 'D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0' - 'D0 FF D0 D0 D0 FF CF CF CF FF C9 C9 C9 FF C5 C5' - 'C5 FF C6 C6 C6 FF C6 C6 C6 FF C6 C6 C6 FF C6 C6' - 'C6 FF C6 C6 C6 FF C6 C6 C6 FF C6 C6 C6 FF C6 C6' - 'C6 FF C6 C6 C6 FF C7 C7 C7 FF D3 D3 D3 FF C8 C8' - 'C8 FF C9 C9 C9 FF DE DE DE FF 42 42 42 FF 00 00' - '00 FF 00 00 00 6C 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 80 00 00 00 FF 5F 5F' - '5F FF DC DC DC FF D1 D1 D1 FF D2 D2 D2 FF D4 D4' - 'D4 FF D1 D1 D1 FF D1 D1 D1 FF D1 D1 D1 FF D1 D1' - 'D1 FF D1 D1 D1 FF D1 D1 D1 FF D1 D1 D1 FF D1 D1' - 'D1 FF D1 D1 D1 FF D1 D1 D1 FF D0 D0 D0 FF C8 C8' - 'C8 FF C3 C3 C3 FF C3 C3 C3 FF C3 C3 C3 FF C4 C4' - 'C4 FF C4 C4 C4 FF C4 C4 C4 FF C4 C4 C4 FF C4 C4' - 'C4 FF C4 C4 C4 FF C4 C4 C4 FF C7 C7 C7 FF C5 C5' - 'C5 FF CB CB CB FF CC CC CC FF 2D 2D 2D FF 00 00' - '00 F8 00 00 00 40 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 4B 00 00 00 FE 41 41' - '41 FF D8 D8 D8 FF D4 D4 D4 FF D2 D2 D2 FF D0 D0' - 'D0 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' - 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' - 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' - 'D3 FF CD CD CD FF C7 C7 C7 FF C4 C4 C4 FF C2 C2' - 'C2 FF C1 C1 C1 FF C0 C0 C0 FF C1 C1 C1 FF C1 C1' - 'C1 FF C1 C1 C1 FF C2 C2 C2 FF BF BF BF FF C0 C0' - 'C0 FF CE CE CE FF B2 B2 B2 FF 1A 1A 1A FF 00 00' - '00 E5 00 00 00 28 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 1A 00 00 00 F2 2C 2C' - '2C FF CC CC CC FF D6 D6 D6 FF D5 D5 D5 FF CC CC' - 'CC FF D5 D5 D5 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6' - 'D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6' - 'D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6' - 'D6 FF D7 D7 D7 FF D6 D6 D6 FF D5 D5 D5 FF D3 D3' - 'D3 FF CF CF CF FF CC CC CC FF C9 C9 C9 FF C6 C6' - 'C6 FF C4 C4 C4 FF C2 C2 C2 FF B3 B3 B3 FF BD BD' - 'BD FF D0 D0 D0 FF 99 99 99 FF 09 09 09 FF 00 00' - '00 CF 00 00 00 19 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 09 00 00 00 D8 18 18' - '18 FF B0 B0 B0 FF DB DB DB FF DB DB DB FF D0 D0' - 'D0 FF D2 D2 D2 FF DB DB DB FF D9 D9 D9 FF DA DA' - 'DA FF DA DA DA FF DA DA DA FF DA DA DA FF DA DA' - 'DA FF DA DA DA FF DA DA DA FF DA DA DA FF DA DA' - 'DA FF DA DA DA FF DA DA DA FF DA DA DA FF DA DA' - 'DA FF DB DB DB FF DB DB DB FF DA DA DA FF D9 D9' - 'D9 FF D9 D9 D9 FF CF CF CF FF C5 C5 C5 FF CC CC' - 'CC FF CA CA CA FF 7A 7A 7A FF 02 02 02 FF 00 00' - '00 B8 00 00 00 0A 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 02 00 00 00 BF 08 08' - '08 FF 97 97 97 FF DC DC DC FF DF DF DF FF DC DC' - 'DC FF CE CE CE FF D6 D6 D6 FF DE DE DE FF DD DD' - 'DD FF DD DD DD FF DD DD DD FF DD DD DD FF DD DD' - 'DD FF DD DD DD FF DD DD DD FF DD DD DD FF DD DD' - 'DD FF DD DD DD FF DD DD DD FF DD DD DD FF DD DD' - 'DD FF DD DD DD FF DD DD DD FF DD DD DD FF DE DE' - 'DE FF D8 D8 D8 FF CE CE CE FF DD DD DD FF DC DC' - 'DC FF C6 C6 C6 FF 53 53 53 FF 00 00 00 FF 00 00' - '00 A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 A4 00 00' - '00 FF 77 77 77 FF D3 D3 D3 FF E2 E2 E2 FF E1 E1' - 'E1 FF DE DE DE FF CE CE CE FF D7 D7 D7 FF E1 E1' - 'E1 FF E2 E2 E2 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' - 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' - 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' - 'E0 FF E0 E0 E0 FF E1 E1 E1 FF E1 E1 E1 FF D9 D9' - 'D9 FF CD CD CD FF DA DA DA FF E3 E3 E3 FF D9 D9' - 'D9 FF BB BB BB FF 39 39 39 FF 00 00 00 FF 00 00' - '00 7E 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 89 00 00' - '00 FF 4B 4B 4B FF C9 C9 C9 FF E5 E5 E5 FF E3 E3' - 'E3 FF E4 E4 E4 FF E1 E1 E1 FF D7 D7 D7 FF D2 D2' - 'D2 FF DA DA DA FF E4 E4 E4 FF E5 E5 E5 FF E4 E4' - 'E4 FF E4 E4 E4 FF E4 E4 E4 FF E4 E4 E4 FF E4 E4' - 'E4 FF E4 E4 E4 FF E4 E4 E4 FF E4 E4 E4 FF E5 E5' - 'E5 FF E5 E5 E5 FF DC DC DC FF D2 D2 D2 FF D6 D6' - 'D6 FF E0 E0 E0 FF E4 E4 E4 FF E6 E6 E6 FF D6 D6' - 'D6 FF A8 A8 A8 FF 20 20 20 FF 00 00 00 FD 00 00' - '00 4E 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 62 00 00' - '00 FF 35 35 35 FF BD BD BD FF E6 E6 E6 FF E6 E6' - 'E6 FF E6 E6 E6 FF E7 E7 E7 FF E7 E7 E7 FF DF DF' - 'DF FF D2 D2 D2 FF D3 D3 D3 FF DE DE DE FF E3 E3' - 'E3 FF E3 E3 E3 FF E4 E4 E4 FF E4 E4 E4 FF E4 E4' - 'E4 FF E4 E4 E4 FF E3 E3 E3 FF E3 E3 E3 FF DE DE' - 'DE FF D4 D4 D4 FF D1 D1 D1 FF DD DD DD FF E7 E7' - 'E7 FF E7 E7 E7 FF E6 E6 E6 FF E8 E8 E8 FF D4 D4' - 'D4 FF 9A 9A 9A FF 0B 0B 0B FF 00 00 00 ED 00 00' - '00 2C 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 2D 00 00' - '00 F9 1E 1E 1E FF AB AB AB FF E4 E4 E4 FF ED ED' - 'ED FF E7 E7 E7 FF E6 E6 E6 FF EC EC EC FF EB EB' - 'EB FF EA EA EA FF E4 E4 E4 FF E0 E0 E0 FF DF DF' - 'DF FF DF DF DF FF DD DD DD FF DC DC DC FF DC DC' - 'DC FF DD DD DD FF DF DF DF FF DF DF DF FF DF DF' - 'DF FF E2 E2 E2 FF E9 E9 E9 FF EC EC EC FF EA EA' - 'EA FF E5 E5 E5 FF EB EB EB FF EB EB EB FF D6 D6' - 'D6 FF 8A 8A 8A FF 00 00 00 FF 00 00 00 C3 00 00' - '00 17 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 09 00 00' - '00 DD 08 08 08 FF 99 99 99 FF E4 E4 E4 FF DF DF' - 'DF FF BD BD BD FF C1 C1 C1 FF D6 D6 D6 FF EC EC' - 'EC FF ED ED ED FF ED ED ED FF EE EE EE FF EE EE' - 'EE FF ED ED ED FF EC EC EC FF EB EB EB FF EB EB' - 'EB FF EC EC EC FF ED ED ED FF EE EE EE FF EE EE' - 'EE FF ED ED ED FF EE EE EE FF E4 E4 E4 FF C2 C2' - 'C2 FF BE BE BE FF D1 D1 D1 FF EC EC EC FF D4 D4' - 'D4 FF 75 75 75 FF 00 00 00 FF 00 00 00 9C 00 00' - '00 06 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 AE 00 00 00 FF 8D 8D 8D FF E0 E0 E0 FF C4 C4' - 'C4 FF B2 B2 B2 FF B8 B8 B8 FF B2 B2 B2 FF EB EB' - 'EB FF F1 F1 F1 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0' - 'F0 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0' - 'F0 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0' - 'F0 FF F0 F0 F0 FF F3 F3 F3 FF D5 D5 D5 FF B0 B0' - 'B0 FF B6 B6 B6 FF B7 B7 B7 FF EB EB EB FF CD CD' - 'CD FF 61 61 61 FF 00 00 00 FF 00 00 00 85 00 00' - '00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 80 00 00 00 FF 64 64 64 FF CE CE CE FF DD DD' - 'DD FF DC DC DC FF D5 D5 D5 FF E4 E4 E4 FF F9 F9' - 'F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9' - 'F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9' - 'F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9' - 'F9 FF F9 F9 F9 FF FA FA FA FF F2 F2 F2 FF DF DF' - 'DF FF D8 D8 D8 FF DC DC DC FF D7 D7 D7 FF B0 B0' - 'B0 FF 34 34 34 FF 00 00 00 FF 00 00 00 67 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 44 00 00 00 FF 19 19 19 FF 80 80 80 FF BE BE' - 'BE FF D3 D3 D3 FF D7 D7 D7 FF DB DB DB FF D8 D8' - 'D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8' - 'D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8' - 'D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8' - 'D8 FF D8 D8 D8 FF D8 D8 D8 FF D9 D9 D9 FF D9 D9' - 'D9 FF D7 D7 D7 FF CD CD CD FF B0 B0 B0 FF 5D 5D' - '5D FF 06 06 06 FF 00 00 00 ED 00 00 00 2B 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 02 00 00 00 9C 00 00 00 FF 0C 0C 0C FF 3D 3D' - '3D FF 49 49 49 FF 48 48 48 FF 48 48 48 FF 48 48' - '48 FF 48 48 48 FF 48 48 48 FF 48 48 48 FF 48 48' - '48 FF 48 48 48 FF 48 48 48 FF 48 48 48 FF 48 48' - '48 FF 48 48 48 FF 48 48 48 FF 48 48 48 FF 48 48' - '48 FF 48 48 48 FF 48 48 48 FF 48 48 48 FF 48 48' - '48 FF 49 49 49 FF 49 49 49 FF 2F 2F 2F FF 02 02' - '02 FF 00 00 00 FF 00 00 00 5C 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 06 00 00 00 7F 00 00 00 F1 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 D6 00 00 00 5C 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 2C 00 00' - '00 7E 00 00 00 84 00 00 00 84 00 00 00 84 00 00' - '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' - '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' - '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' - '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' - '00 84 00 00 00 84 00 00 00 84 00 00 00 70 00 00' - '00 1A 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF' - 'FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 FF FF FE 1F FF FF 00 00 FF FF' - 'FE 1F FF FF 00 00 FF 00 00 00 00 7F 00 00 FC 00' - '00 00 00 1F 00 00 F8 00 00 00 00 1F 00 00 F8 00' - '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F0 00' - '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F0 00' - '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F0 00' - '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F0 00' - '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F0 00' - '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F0 00' - '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F8 00' - '00 00 00 1F 00 00 F8 00 00 00 00 1F 00 00 F8 00' - '00 00 00 1F 00 00 F8 00 00 00 00 1F 00 00 F8 00' - '00 00 00 1F 00 00 F8 00 00 00 00 1F 00 00 FC 00' - '00 00 00 3F 00 00 FC 00 00 00 00 3F 00 00 FC 00' - '00 00 00 3F 00 00 FC 00 00 00 00 3F 00 00 FC 00' - '00 00 00 3F 00 00 FC 00 00 00 00 7F 00 00 FE 00' - '00 00 00 7F 00 00 FE 00 00 00 00 7F 00 00 FE 00' - '00 00 00 7F 00 00 FE 00 00 00 00 7F 00 00 FE 00' - '00 00 00 7F 00 00 FF 00 00 00 00 7F 00 00 FF 00' - '00 00 00 FF 00 00 FF 00 00 00 00 FF 00 00 FF 00' - '00 00 01 FF 00 00 FF 80 00 00 03 FF 00 00 FF E0' - '00 00 07 FF 00 00 FF FF FF FF FF FF 00 00 28 00' - '00 00 20 00 00 00 40 00 00 00 01 00 20 00 00 00' - '00 00 00 10 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 90 00 00 00 90 00 00' - '00 90 00 00 00 90 00 00 00 90 00 00 00 90 00 00' - '00 90 00 00 00 90 00 00 00 90 00 00 00 90 00 00' - '00 90 00 00 00 90 00 00 00 90 00 00 00 90 00 00' - '00 90 00 DC DC FF 00 DC DC FF 00 00 00 9C 00 00' - '00 90 00 00 00 90 00 00 00 90 00 00 00 90 00 00' - '00 90 00 00 00 90 00 00 00 90 00 00 00 90 00 00' - '00 90 00 00 00 90 00 00 00 90 00 00 00 90 00 00' - '00 90 00 00 00 90 80 80 80 FF 80 80 80 FF 80 80' - '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' - '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' - '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' - '80 FF 00 FF FF FF 00 FF FF FF 80 80 80 FF 80 80' - '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' - '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' - '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' - '80 FF 80 80 80 FF 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 6B FF FF FF 6B FF FF FF 00 00 00 30 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 C0 C0 C0 FF C0 C0 C0 FF 00 00 00 37 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 05 00 00 00 C5 00 00' - '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' - '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' - '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' - '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' - '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F1 00 00' - '00 B1 00 00 00 0D 00 00 00 01 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 05 00 00 00 9B 00 00 00 FF 21 21' - '21 FF 2B 2B 2B FF 2C 2C 2C FF 2B 2B 2B FF 2B 2B' - '2B FF 2B 2B 2B FF 2B 2B 2B FF 2B 2B 2B FF 2B 2B' - '2B FF 2B 2B 2B FF 2A 2A 2A FF 2A 2A 2A FF 2A 2A' - '2A FF 2A 2A 2A FF 2A 2A 2A FF 2A 2A 2A FF 2B 2B' - '2B FF 2B 2B 2B FF 2E 2C 2D FF 13 13 13 FF 00 00' - '00 FF 00 00 00 69 00 00 00 09 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 AD 01 01 01 FF EB EB EB FF E8 E8' - 'E8 FF D5 D5 D5 FF 85 85 85 FF 92 92 92 FF 98 98' - '98 FF AD AD AD FF BA BA BA FF C3 C3 C3 FF C6 C6' - 'C6 FF CA CA CA FF CA CA CA FF CA CA CA FF D3 D3' - 'D3 FF D7 D7 D7 FF CC CC CC FF C7 C7 C7 FF C8 C9' - 'C9 FF 9D B3 A8 FF 20 A8 63 FF 90 AF A0 FF BF BB' - 'BD FF 00 00 00 FF 00 00 00 81 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 F0 19 19 19 FF EC EC EC FF E2 E2' - 'E2 FF CB CB CB FF 3B 3B 3B FF 56 56 56 FF 72 72' - '72 FF 92 92 92 FF 9D 9D 9D FF A8 A8 A8 FF AC AC' - 'AC FF A9 A9 A9 FF 9C 9C 9C FF 99 99 99 FF B7 B7' - 'B7 FF C3 C3 C3 FF A3 A3 A3 FF 98 98 98 FF C5 C4' - 'C4 FF 51 A7 7C FF 17 CE 71 FF 2F 99 64 FF C3 BD' - 'C0 FF 01 01 01 FF 00 00 00 A3 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 F9 28 28 28 FF EC EC EC FF E6 E6' - 'E6 FF D1 D1 D1 FF 68 68 68 FF 7E 7E 7E FF 85 85' - '85 FF 97 97 97 FF A0 A0 A0 FF AA AA AA FF AE AE' - 'AE FF 9F 9F 9F FF 83 83 83 FF 7C 7C 7C FF A8 A8' - 'A8 FF BB BB BB FF 8A 8A 8A FF 79 79 79 FF C2 C2' - 'C2 FF C6 C3 C4 FF 99 AC A2 FF C2 BE C0 FF C4 C4' - 'C4 FF 01 01 01 FF 00 00 00 BA 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 F9 28 28 28 FF EE EE EE FF E7 E7' - 'E7 FF D6 D6 D6 FF 70 70 70 FF 7D 7D 7D FF 85 85' - '85 FF 97 97 97 FF A0 A0 A0 FF AA AA AA FF AE AE' - 'AE FF 98 98 98 FF 73 73 73 FF 6A 6A 6A FF A0 A0' - 'A0 FF B7 B7 B7 FF 7C 7C 7C FF 67 67 67 FF C2 C2' - 'C2 FF C4 C3 C4 FF C7 C4 C5 FF BF BF BF FF C5 C5' - 'C5 FF 01 01 01 FF 00 00 00 B9 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 F9 27 27 27 FF F2 F2 F2 FF EB EB' - 'EB FF DF DF DF FF A7 A7 A7 FF AB AB AB FF AE AE' - 'AE FF B3 B3 B3 FF B6 B6 B6 FF B9 B9 B9 FF BA BA' - 'BA FF B7 B7 B7 FF B1 B1 B1 FF AF AF AF FF BA BA' - 'BA FF BE BE BE FF B0 B0 B0 FF AB AB AB FF C5 C5' - 'C5 FF C6 C6 C6 FF C4 C4 C4 FF C2 C2 C2 FF C9 C9' - 'C9 FF 00 00 00 FF 00 00 00 B9 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 F9 26 26 26 FF F3 F3 F3 FF EB EB' - 'EB FF EA EA EA FF ED ED ED FF E9 E9 E9 FF E8 E8' - 'E8 FF E4 E4 E4 FF E2 E2 E2 FF DF DF DF FF DE DE' - 'DE FF DB DB DB FF DC DC DC FF D9 D9 D9 FF D6 D6' - 'D6 FF D2 D2 D2 FF D2 D2 D2 FF D0 D0 D0 FF CB CB' - 'CB FF C9 C9 C9 FF C7 C7 C7 FF C0 C0 C0 FF CA CA' - 'CA FF 00 00 00 FF 00 00 00 B9 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 F9 24 24 24 FF FF FF FF FF E9 E9' - 'E9 FF E2 E2 E2 FF E2 E2 E2 FF DF DF DF FF DF DF' - 'DF FF DF DF DF FF DF DF DF FF E0 E0 E0 FF E0 E0' - 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' - 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' - 'E0 FF E3 E3 E3 FF E3 E3 E3 FF F8 F8 F8 FF EF EF' - 'EF FF 00 00 00 FF 00 00 00 B9 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 FA 24 24 24 FF F8 F8 F8 FF D9 D9' - 'D9 FF BB BB BB FF BF BF BF FF DA DA DA FF D9 D9' - 'D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9' - 'D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9' - 'D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9 D9 FF DB DB' - 'DB FF BC BC BC FF BB BB BB FF DE DE DE FF FF FF' - 'FF FF 00 00 00 FF 00 00 00 BA 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 D0 05 05 05 FF F6 F6 F6 FF BC BC' - 'BC FF C3 C3 C3 FF AB AB AB FF D8 D8 D8 FF D5 D5' - 'D5 FF D5 D5 D5 FF D4 D4 D4 FF D3 D3 D3 FF D5 D5' - 'D5 FF D8 D8 D8 FF D8 D8 D8 FF D5 D5 D5 FF D3 D3' - 'D3 FF D3 D3 D3 FF D4 D4 D4 FF D7 D7 D7 FF C9 C9' - 'C9 FF C3 C3 C3 FF B3 B3 B3 FF D6 D6 D6 FF F5 F5' - 'F5 FF 00 00 00 FF 00 00 00 8C 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 9C 00 00 00 FF F4 F4 F4 FF CF CF' - 'CF FF D2 D2 D2 FF BF BF BF FF D3 D3 D3 FF D2 D2' - 'D2 FF D3 D3 D3 FF DD DD DD FF E3 E3 E3 FF E6 E6' - 'E6 FF ED ED ED FF ED ED ED FF E7 E7 E7 FF E4 E4' - 'E4 FF DE DE DE FF D4 D4 D4 FF D2 D2 D2 FF D3 D3' - 'D3 FF D0 D0 D0 FF C2 C2 C2 FF D9 D9 D9 FF E8 E8' - 'E8 FF 00 00 00 FF 00 00 00 72 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 59 00 00 00 FF E9 E9 E9 FF D0 D0' - 'D0 FF CD CD CD FF CD CD CD FF D6 D6 D6 FF ED ED' - 'ED FF DC DC DC FF D4 D4 D4 FF D6 D6 D6 FF D6 D6' - 'D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6' - 'D6 FF D5 D5 D5 FF DB DB DB FF ED ED ED FF DA DA' - 'DA FF CD CD CD FF CD CD CD FF DF DF DF FF B8 B8' - 'B8 FF 00 00 00 FB 00 00 00 3A 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 3E 00 00 00 FE D7 D7 D7 FF D2 D2' - 'D2 FF CB CB CB FF CA CA CA FF E9 E9 E9 FF DC DC' - 'DC FF D1 D1 D1 FF D2 D2 D2 FF D2 D2 D2 FF D2 D2' - 'D2 FF D2 D2 D2 FF D2 D2 D2 FF D2 D2 D2 FF D2 D2' - 'D2 FF D2 D2 D2 FF D1 D1 D1 FF D8 D8 D8 FF EA EA' - 'EA FF C9 C9 C9 FF CA CA CA FF E0 E0 E0 FF A0 A0' - 'A0 FF 00 00 00 EB 00 00 00 22 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 0C 00 00 00 E1 9F 9F 9F FF DD DD' - 'DD FF CD CD CD FF DB DB DB FF CE CE CE FF D0 D0' - 'D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0 D0 FF CF CF' - 'CF FF C9 C9 C9 FF CA CA CA FF CA CA CA FF CA CA' - 'CA FF CA CA CA FF CA CA CA FF CA CA CA FF C8 C8' - 'C8 FF DA DA DA FF C7 C7 C7 FF E2 E2 E2 FF 5A 5A' - '5A FF 00 00 00 94 00 00 00 01 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 B2 83 83 83 FF DD DD' - 'DD FF D1 D1 D1 FF DB DB DB FF D0 D0 D0 FF D0 D0' - 'D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0' - 'D0 FF C9 C9 C9 FF C5 C5 C5 FF C6 C6 C6 FF C6 C6' - 'C6 FF C6 C6 C6 FF C6 C6 C6 FF C6 C6 C6 FF C6 C6' - 'C6 FF D3 D3 D3 FF C8 C8 C8 FF DE DE DE FF 42 42' - '42 FF 00 00 00 6C 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 4B 41 41 41 FF D8 D8' - 'D8 FF D2 D2 D2 FF D0 D0 D0 FF D3 D3 D3 FF D3 D3' - 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' - 'D3 FF D3 D3 D3 FF D3 D3 D3 FF C7 C7 C7 FF C4 C4' - 'C4 FF C1 C1 C1 FF C0 C0 C0 FF C1 C1 C1 FF C1 C1' - 'C1 FF BF BF BF FF C0 C0 C0 FF B2 B2 B2 FF 1A 1A' - '1A FF 00 00 00 28 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 1A 2C 2C 2C FF CC CC' - 'CC FF D5 D5 D5 FF CC CC CC FF D6 D6 D6 FF D6 D6' - 'D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6' - 'D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6 D6 FF D5 D5' - 'D5 FF CF CF CF FF CC CC CC FF C6 C6 C6 FF C4 C4' - 'C4 FF B3 B3 B3 FF BD BD BD FF 99 99 99 FF 09 09' - '09 FF 00 00 00 19 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 02 08 08 08 FF 97 97' - '97 FF DF DF DF FF DC DC DC FF D6 D6 D6 FF DE DE' - 'DE FF DD DD DD FF DD DD DD FF DD DD DD FF DD DD' - 'DD FF DD DD DD FF DD DD DD FF DD DD DD FF DD DD' - 'DD FF DD DD DD FF DD DD DD FF DE DE DE FF D8 D8' - 'D8 FF DD DD DD FF DC DC DC FF 53 53 53 FF 00 00' - '00 FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 FF 77 77' - '77 FF E2 E2 E2 FF E1 E1 E1 FF CE CE CE FF D7 D7' - 'D7 FF E2 E2 E2 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' - 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' - 'E0 FF E0 E0 E0 FF E1 E1 E1 FF D9 D9 D9 FF CD CD' - 'CD FF E3 E3 E3 FF D9 D9 D9 FF 39 39 39 FF 00 00' - '00 FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 FF 35 35' - '35 FF E6 E6 E6 FF E6 E6 E6 FF E7 E7 E7 FF E7 E7' - 'E7 FF D2 D2 D2 FF D3 D3 D3 FF E3 E3 E3 FF E3 E3' - 'E3 FF E4 E4 E4 FF E4 E4 E4 FF E3 E3 E3 FF E3 E3' - 'E3 FF D4 D4 D4 FF D1 D1 D1 FF E7 E7 E7 FF E7 E7' - 'E7 FF E8 E8 E8 FF D4 D4 D4 FF 0B 0B 0B FF 00 00' - '00 ED 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 F9 1E 1E' - '1E FF E4 E4 E4 FF ED ED ED FF E6 E6 E6 FF EC EC' - 'EC FF EA EA EA FF E4 E4 E4 FF DF DF DF FF DF DF' - 'DF FF DC DC DC FF DC DC DC FF DF DF DF FF DF DF' - 'DF FF E2 E2 E2 FF E9 E9 E9 FF EA EA EA FF E5 E5' - 'E5 FF EB EB EB FF D6 D6 D6 FF 00 00 00 FF 00 00' - '00 C3 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 AE 00 00' - '00 FF E0 E0 E0 FF C4 C4 C4 FF B8 B8 B8 FF B2 B2' - 'B2 FF F1 F1 F1 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0' - 'F0 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0' - 'F0 FF F0 F0 F0 FF F3 F3 F3 FF B0 B0 B0 FF B6 B6' - 'B6 FF EB EB EB FF CD CD CD FF 00 00 00 FF 00 00' - '00 85 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 80 00 00' - '00 FF CE CE CE FF DD DD DD FF D5 D5 D5 FF E4 E4' - 'E4 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9' - 'F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9' - 'F9 FF F9 F9 F9 FF FA FA FA FF DF DF DF FF D8 D8' - 'D8 FF D7 D7 D7 FF B0 B0 B0 FF 00 00 00 FF 00 00' - '00 67 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 02 00 00' - '00 9C 0C 0C 0C FF 3D 3D 3D FF 48 48 48 FF 48 48' - '48 FF 48 48 48 FF 48 48 48 FF 48 48 48 FF 48 48' - '48 FF 48 48 48 FF 48 48 48 FF 48 48 48 FF 48 48' - '48 FF 48 48 48 FF 48 48 48 FF 48 48 48 FF 49 49' - '49 FF 2F 2F 2F FF 02 02 02 FF 00 00 00 5C 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 06 00 00 00 F1 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 D6 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 FF FF FF FF 00 00 00 00 00 00' - '00 00 FF FE 3F FF FF FE 3F FF F0 00 00 07 E0 00' - '00 07 E0 00 00 07 E0 00 00 07 E0 00 00 07 E0 00' - '00 07 E0 00 00 07 E0 00 00 07 E0 00 00 07 E0 00' - '00 07 E0 00 00 07 E0 00 00 07 E0 00 00 07 E0 00' - '00 07 E0 00 00 07 F0 00 00 0F F0 00 00 0F F0 00' - '00 0F F0 00 00 1F F8 00 00 1F F8 00 00 1F F8 00' - '00 1F F8 00 00 1F F8 00 00 1F F8 00 00 3F FC 00' - '00 7F FF FF FF FF 28 00 00 00 10 00 00 00 20 00' - '00 00 01 00 20 00 00 00 00 00 00 04 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 30 00 00 00 30 00 00 00 30 00 00 00 30 00 00' - '00 30 00 00 00 30 00 00 00 30 00 00 00 30 00 00' - '00 78 00 00 00 30 00 00 00 30 00 00 00 30 00 00' - '00 30 00 00 00 30 00 00 00 30 00 00 00 30 C0 C0' - 'C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0' - 'C0 FF C0 C0 C0 FF C0 C0 C0 FF 6B FF FF FF 6B FF' - 'FF FF C0 C0 C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0' - 'C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0 C0 FF 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 37 00 00' - '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' - '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' - '00 37 00 00 00 04 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 26 26 26 FF CD CD CD FF CD CD' - 'CD FF C9 C9 C9 FF C5 C5 C5 FF C2 C2 C2 FF C0 C0' - 'C0 FF BF BF BF FF BA BA BA FF B3 B4 B3 FF AB AC' - 'AC FF 09 09 09 FF 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 30 D1 D1 D1 FF E7 E7 E7 FF 5F 5F' - '5F FF 8F 8F 8F FF A7 A7 A7 FF B9 B9 B9 FF B8 B8' - 'B8 FF 94 94 94 FF B7 B7 B7 FF C6 C3 C5 FF 91 D8' - 'B5 FF 8E 8E 8E FF 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 33 D1 D1 D1 FF EB EB EB FF 6C 6C' - '6C FF 8A 8A 8A FF A3 A3 A3 FF B9 B9 B9 FF A5 A5' - 'A5 FF 6B 6B 6B FF A4 A4 A4 FF C8 C8 C8 FF C2 C2' - 'C2 FF 8E 8E 8E FF 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 33 D3 D3 D3 FF F6 F6 F6 FF F5 F5' - 'F5 FF F4 F4 F4 FF F3 F3 F3 FF F1 F1 F1 FF F0 F0' - 'F0 FF EF EF EF FF EE EE EE FF ED ED ED FF EB EB' - 'EB FF 8D 8D 8D FF 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 25 DA DA DA FF A9 A9 A9 FF C3 C3' - 'C3 FF D8 D8 D8 FF D8 D8 D8 FF D7 D7 D7 FF D7 D7' - 'D7 FF D8 D8 D8 FF D8 D8 D8 FF A8 A8 A8 FF B5 B5' - 'B5 FF 9C 9C 9C FF 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 7E 7E 7E FF CF CF CF FF D1 D1' - 'D1 FF DF DF DF FF E1 E1 E1 FF DC DC DC FF DC DC' - 'DC FF E1 E1 E1 FF E1 E1 E1 FF D0 D0 D0 FF D1 D1' - 'D1 FF 3F 3F 3F FF 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 22 22 22 FF CA CA CA FF E4 E4' - 'E4 FF D1 D1 D1 FF D0 D0 D0 FF CD CD CD FF CE CE' - 'CE FF CE CE CE FF CE CE CE FF E2 E2 E2 FF C9 C9' - 'C9 FF 00 00 00 FF 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 FF D1 D1 D1 FF D1 D1' - 'D1 FF D1 D1 D1 FF D1 D1 D1 FF D1 D1 D1 FF C3 C3' - 'C3 FF C4 C4 C4 FF C4 C4 C4 FF C4 C4 C4 FF CB CB' - 'CB FF 00 00 00 F8 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 D8 DB DB DB FF D2 D2' - 'D2 FF DA DA DA FF DA DA DA FF DA DA DA FF DA DA' - 'DA FF DA DA DA FF DA DA DA FF CF CF CF FF CA CA' - 'CA FF 00 00 00 B8 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 89 C9 C9 C9 FF E4 E4' - 'E4 FF D2 D2 D2 FF E5 E5 E5 FF E4 E4 E4 FF E4 E4' - 'E4 FF E5 E5 E5 FF D2 D2 D2 FF E4 E4 E4 FF A8 A8' - 'A8 FF 00 00 00 4E 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 09 99 99 99 FF BD BD' - 'BD FF EC EC EC FF EE EE EE FF EC EC EC FF EC EC' - 'EC FF EE EE EE FF E4 E4 E4 FF D1 D1 D1 FF 75 75' - '75 FF 00 00 00 06 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 19 19 19 FF D3 D3' - 'D3 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8' - 'D8 FF D8 D8 D8 FF D9 D9 D9 FF CD CD CD FF 06 06' - '06 FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' - '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 E0 03 00 00 C0 03 00 00 80 03' - '00 00 80 03 00 00 80 03 00 00 80 03 00 00 C0 03' - '00 00 C0 03 00 00 C0 03 00 00 C0 03 00 00 C0 03' - '00 00 C0 03 00 00 E0 07 00 00 F0 0F 00 00' -} */ - -/* BINRES netdrive2.ico */ -10 ICON netdrive2.ico -/* { - '00 00 01 00 09 00 20 20 00 00 01 00 08 00 A8 08' - '00 00 96 00 00 00 10 10 00 00 01 00 08 00 68 05' - '00 00 3E 09 00 00 20 20 00 00 01 00 04 00 E8 02' - '00 00 A6 0E 00 00 10 10 00 00 01 00 04 00 28 01' - '00 00 8E 11 00 00 20 20 00 00 01 00 20 00 A8 10' - '00 00 B6 12 00 00 30 30 00 00 01 00 04 00 68 06' - '00 00 5E 23 00 00 30 30 00 00 01 00 20 00 A8 25' - '00 00 C6 29 00 00 30 30 00 00 01 00 08 00 A8 0E' - '00 00 6E 4F 00 00 10 10 00 00 01 00 20 00 68 04' - '00 00 16 5E 00 00 28 00 00 00 20 00 00 00 40 00' - '00 00 01 00 08 00 00 00 00 00 00 04 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 02 02 02 00 04 04 04 00 05 06 06 00 06 06' - '06 00 00 00 0D 00 09 09 09 00 0A 0A 0A 00 0C 0C' - '0C 00 12 12 12 00 14 14 14 00 15 15 15 00 16 16' - '16 00 1F 1F 10 00 1D 1D 1D 00 00 00 20 00 00 00' - '2C 00 00 00 2D 00 21 21 21 00 22 22 22 00 23 23' - '23 00 24 24 24 00 25 25 25 00 26 26 26 00 38 38' - '38 00 39 39 39 00 3B 3B 3B 00 43 43 43 00 46 46' - '46 00 4A 4A 4A 00 54 4C 50 00 53 53 53 00 55 55' - '55 00 56 56 56 00 59 59 52 00 5A 5A 53 00 5C 5C' - '55 00 5D 5D 56 00 58 58 58 00 59 59 59 00 5A 58' - '59 00 5A 5A 5A 00 5B 5B 5B 00 5C 5C 5C 00 5D 5D' - '5D 00 5E 5E 5E 00 65 58 5F 00 60 60 60 00 61 61' - '61 00 62 62 62 00 64 64 64 00 67 67 67 00 69 69' - '69 00 71 71 71 00 72 72 72 00 73 73 73 00 75 75' - '75 00 78 78 78 00 7A 7A 7A 00 7B 7B 7B 00 7C 7C' - '7C 00 7F 7F 7F 00 24 A7 64 00 3C AD 74 00 25 DC' - '7F 00 7C 7C A3 00 00 00 C9 00 00 00 CD 00 00 00' - 'D3 00 00 00 D8 00 00 00 FF 00 2B 2B FF 00 7D AA' - '94 00 81 81 81 00 83 83 83 00 89 89 89 00 8A 8A' - '8A 00 8B 8B 8B 00 8F 8F 8F 00 91 89 8C 00 90 90' - '90 00 91 91 91 00 94 94 94 00 95 95 95 00 97 97' - '97 00 99 99 99 00 9A 9A 9A 00 9C 9C 9C 00 9D 9D' - '9D 00 9E 9E 9E 00 9F 9F 9F 00 94 B6 A4 00 93 BD' - 'A9 00 A0 A0 A0 00 A1 A1 A1 00 A3 A3 A3 00 A4 A4' - 'A4 00 A5 A5 A5 00 A8 A8 A8 00 A9 A9 A9 00 AA AA' - 'AA 00 AC AC AC 00 AD AD AD 00 AE AE AE 00 AF AF' - 'AF 00 B8 B8 A7 00 AA AA BC 00 AD B9 B3 00 B0 B0' - 'B0 00 B1 B1 B1 00 B2 B2 B2 00 B3 B3 B3 00 B4 B4' - 'B4 00 B5 B5 B5 00 B6 B6 B6 00 B7 B7 B7 00 B9 B9' - 'B9 00 BC BC BC 00 BD BD BD 00 BE BE BE 00 BF BF' - 'BF 00 C0 C0 C0 00 C1 C1 C1 00 C2 C0 C1 00 C2 C2' - 'C2 00 C3 C3 C3 00 C4 C1 C2 00 C5 C2 C4 00 C4 C4' - 'C4 00 C5 C5 C5 00 C6 C5 C6 00 C6 C6 C6 00 C8 C3' - 'C5 00 CC C4 C8 00 C8 C8 C8 00 C9 C9 C9 00 CB C9' - 'CA 00 CA CA CA 00 CB CB CB 00 CC CC CC 00 CD CD' - 'CD 00 CE CE CE 00 CF CF CF 00 D2 C1 CA 00 D3 C8' - 'CD 00 D0 D0 D0 00 D1 D1 D1 00 D2 D2 D2 00 D3 D3' - 'D3 00 D4 D4 D4 00 D5 D5 D5 00 D6 D6 D6 00 D7 D7' - 'D7 00 D8 D8 D8 00 D9 D9 D9 00 DA DA DA 00 DB DB' - 'DB 00 DC DC DC 00 DD DD DD 00 DE DE DE 00 DF DF' - 'DF 00 E0 E0 E0 00 E1 E1 E1 00 E2 E2 E2 00 E3 E3' - 'E3 00 E4 E4 E4 00 E5 E5 E5 00 E6 E6 E6 00 E7 E7' - 'E7 00 E8 E8 E8 00 E9 E9 E9 00 EA EA EA 00 EB EB' - 'EB 00 EC EC EC 00 ED ED ED 00 EE EE EE 00 EF EF' - 'EF 00 F0 F0 F0 00 F1 F1 F1 00 F2 F2 F2 00 F4 F4' - 'F4 00 F5 F5 F5 00 F6 F6 F6 00 F7 F7 F7 00 F8 F8' - 'F8 00 F9 F9 F9 00 FC FC FC 00 FD FD FD 00 FF FF' - 'FF 00 00 00 00 00 00 00 00 00 02 00 00 00 80 00' - '00 00 00 00 00 00 8C 1A 95 00 7F E9 4B 00 08 6C' - '0C 01 00 00 00 C0 00 00 00 00 80 1A 95 00 02 00' - '00 00 80 00 00 00 00 00 00 00 C0 27 95 00 C4 F5' - 'AF 00 02 00 00 00 44 3A 5C 6F 73 65 78 70 65 72' - '74 73 5C 72 65 61 63 74 6F 73 5C 6C 69 62 5C 73' - '68 65 6C 6C 33 32 5C 6E 65 74 64 72 69 76 65 32' - '2E 69 63 6F 00 00 14 1A 95 00 1F 3B D4 77 15 00' - '00 00 A8 00 00 00 4F 3B D4 77 E0 19 95 00 33 3B' - 'D4 77 64 C5 F5 77 A9 F1 E7 77 F8 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 1A 95 00 B0 6C' - '38 00 96 00 00 00 00 00 00 00 C9 F1 E7 77 96 00' - '00 00 A4 1A 95 00 09 00 00 00 00 00 00 00 96 00' - '00 00 96 00 00 00 09 00 00 00 F4 19 95 00 33 3B' - 'D4 77 B4 1A 95 00 09 48 E9 77 B8 10 E9 77 FF FF' - 'FF FF C9 F1 E7 77 16 EA 4B 00 F8 00 00 00 B0 6C' - '38 00 96 00 00 00 58 1A 95 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 42 45 BD 00 45' - '42 BD 00 00 00 00 00 00 00 00 00 00 00 00 BD BD' - 'BD BD BD BD BD BD BD BD BD BD BD 05 46 43 43 46' - '05 BD BD BD BD BD BD BD BD BD BD BD BD BD 6E 6E' - '6E 6E 6E 6E 6E 6E 6E 6E 6E 6E 6E 69 41 46 46 41' - '69 6E 6E 6E 6E 6E 6E 6E 6E 6E 6E 6E 6E 6E 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 47 46 46 47' - 'BD 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 44 46 6A 6A 46' - '44 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 BD BD BD BD BD BD BD BD BD 10 0F 0D 0D 0F' - '11 BD BD BD BD BD BD BD BD 00 00 00 00 00 00 00' - '00 BD BD 0A 2D 2D 33 32 31 2F 2D 25 24 21 20 23' - '22 26 26 26 21 28 2E 1E 06 BD 00 00 00 00 00 00' - '00 BD 0A 79 B5 AB 63 70 74 7A 91 93 97 98 9D 9D' - '9C 9E 9B 99 8D 84 3F 5C 4F 03 BD 00 00 00 00 00' - '00 BD 21 B7 A7 A5 0E 1D 3A 4D 58 5F 68 64 5A 57' - '64 72 61 54 90 48 40 3E 8F 17 BD 00 00 00 00 00' - '00 BD 2C B3 A8 A4 1F 3B 4C 52 5F 63 70 64 53 50' - '5D 6C 56 4B 88 7B 5B 6B 7E 17 BD 00 00 00 00 00' - '00 BD 2A B4 AA A9 2B 36 4A 4E 5A 61 6F 5E 39 35' - '4D 5D 49 33 8A 82 85 7F 79 16 BD 00 00 00 00 00' - '00 BD 2A B6 AD A9 49 50 56 5D 63 66 70 65 57 55' - '5F 67 58 51 86 81 7A 7A 7D 15 BD 00 00 00 00 00' - '00 BD 29 B8 B1 B0 BA B9 B5 B3 AF AD AA A8 AB A9' - 'A5 A1 A1 A1 97 95 93 8A 80 14 BD 00 00 00 00 00' - '00 BD 27 BC B0 AE AD A8 A8 A7 A8 A8 A9 A8 A8 A8' - 'A8 A8 A8 A7 AA AE AD B9 96 12 BD 00 00 00 00 00' - '00 BD 2C BC 83 6D 75 99 98 98 98 98 97 97 97 97' - '98 98 98 99 92 71 71 97 B6 17 BD 00 00 00 00 00' - '00 BD 1B BC 68 73 62 92 98 96 94 92 95 96 96 95' - '92 93 95 9B 74 6E 63 86 A9 0E BD 00 00 00 00 00' - '00 BD 14 A9 8D 91 83 91 8D 9A A5 A4 A7 AB AB A8' - 'A5 A6 9C 8E 8E 8E 80 99 77 07 BD 00 00 00 00 00' - '00 BD 09 92 92 8B 8C 8C AA A7 9B 99 98 97 97 98' - '99 9C A7 AA 91 89 8C A3 54 BD BD 00 00 00 00 00' - '00 BD 01 60 99 87 8C A6 94 8D 91 91 8E 91 91 91' - '91 91 8C 8E A7 8E 83 AA 30 BD BD 00 00 00 00 00' - '00 BD BD 38 A5 87 9B 93 8D 91 8E 91 8C 89 8A 8A' - '8A 8A 8A 89 8B 9B 7D B0 19 BD BD 00 00 00 00 00' - '00 00 BD 1C AB 8E 99 8D 91 91 91 91 91 8B 7C 7D' - '80 81 81 81 7D 8C 81 AC 0B BD 00 00 00 00 00 00' - '00 00 BD 13 AF 92 92 93 92 92 92 92 92 93 8C 80' - '79 78 77 79 79 79 83 97 01 BD 00 00 00 00 00 00' - '00 00 BD 02 9F 9A 8B 99 97 98 98 98 98 98 98 99' - '98 95 91 8B 87 73 87 6F BD BD 00 00 00 00 00 00' - '00 00 BD BD 81 A4 94 94 9F 9D 9C 9C 9C 9C 9C 9C' - '9D 9D 9E A0 97 94 9E 4B BD BD 00 00 00 00 00 00' - '00 00 00 BD 51 A7 A4 96 97 A1 A4 A2 A2 A2 A2 A2' - 'A2 A4 A0 99 93 A8 99 26 BD 00 00 00 00 00 00 00' - '00 00 00 BD 33 A7 A8 A8 A0 92 9A A3 A4 A5 A5 A4' - 'A3 9A 92 A0 A9 AC 8D 18 BD 00 00 00 00 00 00 00' - '00 00 00 BD 1A 9E AB 9A AD AF A7 A3 A2 9F 9F A2' - 'A3 A5 AF A5 9C B2 83 0E BD 00 00 00 00 00 00 00' - '00 00 00 BD 17 9F 7A 66 81 B3 B1 B1 B1 B0 B0 B1' - 'B1 B1 AE 71 66 A8 76 0C BD 00 00 00 00 00 00 00' - '00 00 00 BD 08 59 AD A5 B6 BB BA BA BA BA BA BA' - 'BA BA BA B2 A7 A6 37 BD BD 00 00 00 00 00 00 00' - '00 00 00 BD BD 0C 38 3B 3A 39 39 39 39 39 39 39' - '39 39 39 3A 3C 34 04 BD 00 00 00 00 00 00 00 00' - '00 00 00 00 BD BD BD BD BD BD BD BD BD BD BD BD' - 'BD BD BD BD BD BD BD 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF F8' - '8F FF 00 00 00 00 00 00 00 00 FF FC 1F FF FF F8' - '1F FF F0 00 00 1F E0 00 00 0F E0 00 00 07 E0 00' - '00 07 E0 00 00 07 E0 00 00 07 E0 00 00 07 E0 00' - '00 07 E0 00 00 07 E0 00 00 07 E0 00 00 07 E0 00' - '00 07 E0 00 00 07 E0 00 00 07 E0 00 00 07 F0 00' - '00 0F F0 00 00 0F F0 00 00 0F F0 00 00 0F F8 00' - '00 1F F8 00 00 1F F8 00 00 1F F8 00 00 1F F8 00' - '00 1F F8 00 00 3F FC 00 00 7F FF FF FF FF 28 00' - '00 00 10 00 00 00 20 00 00 00 01 00 08 00 00 00' - '00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 06 06 06 00 09 09' - '09 00 19 19 19 00 22 22 22 00 26 26 26 00 3F 3F' - '3F 00 5F 5F 5F 00 6B 6B 6B 00 6C 6C 6C 00 75 75' - '75 00 7E 7E 7E 00 7F 7F 7F 00 00 00 FF 00 8A 8A' - '8A 00 8D 8D 8D 00 8E 8E 8E 00 8F 8F 8F 00 94 94' - '94 00 99 99 99 00 9C 9C 9C 00 A3 A3 A3 00 A4 A4' - 'A4 00 A5 A5 A5 00 A7 A7 A7 00 A8 A8 A8 00 A9 A9' - 'A9 00 AB AC AC 00 B3 B4 B3 00 B5 B5 B5 00 B7 B7' - 'B7 00 B8 B8 B8 00 B9 B9 B9 00 BA BA BA 00 BD BD' - 'BD 00 BF BF BF 00 91 D8 B5 00 C0 C0 C0 00 C2 C2' - 'C2 00 C3 C3 C3 00 C6 C3 C5 00 C4 C4 C4 00 C5 C5' - 'C5 00 C8 C8 C8 00 C9 C9 C9 00 CA CA CA 00 CB CB' - 'CB 00 CD CD CD 00 CE CE CE 00 CF CF CF 00 D0 D0' - 'D0 00 D1 D1 D1 00 D2 D2 D2 00 D3 D3 D3 00 D7 D7' - 'D7 00 D8 D8 D8 00 D9 D9 D9 00 DA DA DA 00 DB DB' - 'DB 00 DC DC DC 00 DF DF DF 00 E1 E1 E1 00 E2 E2' - 'E2 00 E4 E4 E4 00 E5 E5 E5 00 E7 E7 E7 00 EB EB' - 'EB 00 EC EC EC 00 ED ED ED 00 EE EE EE 00 EF EF' - 'EF 00 F0 F0 F0 00 F1 F1 F1 00 F3 F3 F3 00 F4 F4' - 'F4 00 F5 F5 F5 00 F6 F6 F6 00 00 00 00 00 8F 8F' - '8F 00 91 89 8C 00 90 90 90 00 91 91 91 00 94 94' - '94 00 95 95 95 00 97 97 97 00 99 99 99 00 9A 9A' - '9A 00 9C 9C 9C 00 9D 9D 9D 00 9E 9E 9E 00 9F 9F' - '9F 00 94 B6 A4 00 93 BD A9 00 A0 A0 A0 00 A1 A1' - 'A1 00 A3 A3 A3 00 A4 A4 A4 00 A5 A5 A5 00 A8 A8' - 'A8 00 A9 A9 A9 00 AA AA AA 00 AC AC AC 00 AD AD' - 'AD 00 AE AE AE 00 AF AF AF 00 B8 B8 A7 00 AA AA' - 'BC 00 AD B9 B3 00 B0 B0 B0 00 B1 B1 B1 00 B2 B2' - 'B2 00 B3 B3 B3 00 B4 B4 B4 00 B5 B5 B5 00 B6 B6' - 'B6 00 B7 B7 B7 00 B9 B9 B9 00 BC BC BC 00 BD BD' - 'BD 00 BE BE BE 00 BF BF BF 00 C0 C0 C0 00 C1 C1' - 'C1 00 C2 C0 C1 00 C2 C2 C2 00 C3 C3 C3 00 C4 C1' - 'C2 00 C5 C2 C4 00 C4 C4 C4 00 C5 C5 C5 00 C6 C5' - 'C6 00 C6 C6 C6 00 C8 C3 C5 00 CC C4 C8 00 C8 C8' - 'C8 00 C9 C9 C9 00 CB C9 CA 00 CA CA CA 00 CB CB' - 'CB 00 CC CC CC 00 CD CD CD 00 CE CE CE 00 CF CF' - 'CF 00 D2 C1 CA 00 D3 C8 CD 00 D0 D0 D0 00 D1 D1' - 'D1 00 D2 D2 D2 00 D3 D3 D3 00 D4 D4 D4 00 D5 D5' - 'D5 00 D6 D6 D6 00 D7 D7 D7 00 D8 D8 D8 00 D9 D9' - 'D9 00 DA DA DA 00 DB DB DB 00 DC DC DC 00 DD DD' - 'DD 00 DE DE DE 00 DF DF DF 00 E0 E0 E0 00 E1 E1' - 'E1 00 E2 E2 E2 00 E3 E3 E3 00 E4 E4 E4 00 E5 E5' - 'E5 00 E6 E6 E6 00 E7 E7 E7 00 E8 E8 E8 00 E9 E9' - 'E9 00 EA EA EA 00 EB EB EB 00 EC EC EC 00 ED ED' - 'ED 00 EE EE EE 00 EF EF EF 00 F0 F0 F0 00 F1 F1' - 'F1 00 F2 F2 F2 00 F4 F4 F4 00 F5 F5 F5 00 F6 F6' - 'F6 00 F7 F7 F7 00 F8 F8 F8 00 F9 F9 F9 00 FC FC' - 'FC 00 FD FD FD 00 FF FF FF 00 00 00 00 00 00 00' - '00 00 02 00 00 00 80 00 00 00 00 00 00 00 8C 1A' - '95 00 7F E9 4B 00 08 6C 0C 01 00 00 00 C0 00 00' - '00 00 80 1A 95 00 02 00 00 00 80 00 00 00 00 00' - '00 00 C0 27 95 00 C4 F5 AF 00 02 00 00 00 44 3A' - '5C 6F 73 65 78 70 65 72 74 73 5C 72 65 61 63 74' - '6F 73 5C 6C 69 62 5C 73 68 65 6C 6C 33 32 5C 6E' - '65 74 64 72 69 76 65 32 2E 69 63 6F 00 00 14 1A' - '95 00 1F 3B D4 77 15 00 00 00 A8 00 00 00 4F 3B' - 'D4 77 E0 19 95 00 33 3B D4 77 64 C5 F5 77 A9 F1' - 'E7 77 F8 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 1A 95 00 B0 6C 38 00 96 00 00 00 00 00' - '00 00 C9 F1 E7 77 96 00 00 00 A4 1A 95 00 09 00' - '00 00 00 00 00 00 96 00 00 00 96 00 00 00 09 00' - '00 00 F4 19 95 00 33 3B D4 77 B4 1A 95 00 09 48' - 'E9 77 B8 10 E9 77 FF FF FF FF C9 F1 E7 77 16 EA' - '4B 00 F8 00 00 00 B0 6C 38 00 96 00 00 00 58 1A' - '95 00 00 00 00 00 4D 4D 4D 4D 4D 4D 4D 0D 0D 4D' - '4D 4D 4D 4D 4D 4D 25 25 25 25 25 25 25 0D 0D 25' - '25 25 25 25 25 25 00 00 00 4D 4D 4D 4D 4D 4D 4D' - '4D 4D 4D 4D 00 00 00 00 05 2F 2F 2C 2A 26 25 23' - '21 1C 1B 02 00 00 00 4D 33 41 07 11 18 20 1F 12' - '1E 28 24 10 00 00 00 4D 33 42 09 0E 15 20 17 08' - '16 2B 26 10 00 00 00 4D 35 4C 4B 4A 49 48 47 46' - '45 44 42 0F 00 00 00 4D 39 1A 27 37 37 36 36 37' - '37 19 1D 14 00 00 00 00 0B 31 33 3C 3D 3B 3B 3D' - '3D 32 33 06 00 00 00 00 04 2D 3F 33 32 2F 30 30' - '30 3E 2C 4D 00 00 00 00 4D 33 33 33 33 33 27 29' - '29 29 2E 4D 00 00 00 00 4D 3A 34 39 39 39 39 39' - '39 31 2D 4D 00 00 00 00 4D 2C 3F 34 40 3F 3F 40' - '34 3F 19 4D 00 00 00 00 4D 13 22 43 45 43 43 45' - '3F 33 0A 4D 00 00 00 00 00 03 35 37 37 37 37 37' - '38 2F 01 00 00 00 00 00 00 00 4D 4D 4D 4D 4D 4D' - '4D 4D 00 00 00 00 00 00 00 00 00 00 00 00 E0 03' - '00 00 C0 03 00 00 80 03 00 00 80 03 00 00 80 03' - '00 00 80 03 00 00 C0 03 00 00 C0 03 00 00 C0 03' - '00 00 C0 03 00 00 C0 03 00 00 C0 03 00 00 E0 07' - '00 00 F0 0F 00 00 28 00 00 00 20 00 00 00 40 00' - '00 00 01 00 04 00 00 00 00 00 00 02 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 80 00 00 00 00 80 00 00 80 80 00 00 00 00' - '80 00 80 00 80 00 00 80 80 00 C0 C0 C0 00 80 80' - '80 00 FF 00 00 00 00 FF 00 00 FF FF 00 00 00 00' - 'FF 00 FF 00 FF 00 00 FF FF 00 FF FF FF 00 00 00' - '00 00 00 00 0C C0 0C C0 00 00 00 00 00 00 00 00' - '00 00 00 00 00 CC CC 00 00 00 00 00 00 00 77 77' - '77 77 77 77 77 8C C8 77 77 77 77 77 77 77 00 00' - '00 00 00 00 00 CC CC 00 00 00 00 00 00 00 00 00' - '00 00 00 00 0C C7 7C C0 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 88 88 88 88 88 88 88 88 88 88 00 00 00 00 00' - '07 FF 77 77 77 77 77 77 77 77 67 80 00 00 00 00' - '8F FF 08 88 87 77 88 77 78 78 66 70 00 00 00 00' - '8F FF 88 88 77 77 88 77 88 77 77 70 00 00 00 00' - '8F FF 88 88 87 77 88 87 88 77 77 70 00 00 00 00' - '8F FF 88 87 77 77 88 77 88 77 77 70 00 00 00 00' - '8F FF FF FF FF FF FF FF FF 77 77 70 00 00 00 00' - '8F FF FF FF FF FF FF FF FF FF FF 70 00 00 00 00' - '8F 77 77 77 77 77 77 77 77 77 77 F0 00 00 00 00' - '8F 77 77 77 77 77 77 77 77 77 77 F0 00 00 00 00' - '0F 77 77 77 FF FF FF FF 77 77 77 70 00 00 00 00' - '07 77 77 FF 77 77 77 77 FF 77 7F 80 00 00 00 00' - '07 77 7F 77 77 77 77 77 77 F7 7F 80 00 00 00 00' - '08 F7 77 77 77 77 77 77 77 77 7F 00 00 00 00 00' - '08 F7 77 77 77 77 77 77 77 77 7F 00 00 00 00 00' - '00 F7 77 77 77 77 77 77 77 77 77 00 00 00 00 00' - '00 77 77 77 77 77 77 77 77 77 77 00 00 00 00 00' - '00 7F 77 77 77 77 77 77 77 77 78 00 00 00 00 00' - '00 8F F7 7F FF FF FF FF 77 7F 78 00 00 00 00 00' - '00 8F FF 77 7F FF FF F7 77 FF 70 00 00 00 00 00' - '00 07 F7 FF FF F7 7F FF FF 7F 70 00 00 00 00 00' - '00 07 77 7F FF FF FF FF F7 7F 70 00 00 00 00 00' - '00 08 FF FF FF FF FF FF FF FF 80 00 00 00 00 00' - '00 00 88 88 88 88 88 88 88 88 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF F8' - '8F FF 00 00 00 00 00 00 00 00 FF FC 1F FF FF F8' - '1F FF F0 00 00 07 E0 00 00 07 E0 00 00 07 E0 00' - '00 07 E0 00 00 07 E0 00 00 07 E0 00 00 07 E0 00' - '00 07 E0 00 00 07 E0 00 00 07 E0 00 00 07 E0 00' - '00 07 E0 00 00 07 E0 00 00 07 E0 00 00 07 F0 00' - '00 0F F0 00 00 0F F0 00 00 0F F0 00 00 0F F8 00' - '00 1F F8 00 00 1F F8 00 00 1F F8 00 00 1F F8 00' - '00 1F F8 00 00 3F FC 00 00 7F FF FF FF FF 28 00' - '00 00 10 00 00 00 20 00 00 00 01 00 04 00 00 00' - '00 00 80 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 80 00 00 00 00 80' - '00 00 80 80 00 00 00 00 80 00 80 00 80 00 00 80' - '80 00 C0 C0 C0 00 80 80 80 00 FF 00 00 00 00 FF' - '00 00 FF FF 00 00 00 00 FF 00 FF 00 FF 00 00 FF' - 'FF 00 FF FF FF 00 00 00 00 0C C0 00 00 00 77 77' - '77 7C C7 77 77 77 00 00 00 00 00 00 00 00 00 07' - '77 77 77 77 70 00 00 7F 88 77 78 77 78 00 00 7F' - '88 77 78 77 78 00 00 7F FF FF FF FF F8 00 00 77' - '77 77 77 77 78 00 00 87 77 F7 7F F7 70 00 00 07' - 'F7 77 77 7F 70 00 00 07 77 77 77 77 70 00 00 07' - '77 77 77 77 70 00 00 07 F7 FF FF 7F 70 00 00 08' - '7F FF FF F7 80 00 00 00 77 77 77 77 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 E0 03' - '00 00 C0 03 00 00 80 03 00 00 80 03 00 00 80 03' - '00 00 80 03 00 00 C0 03 00 00 C0 03 00 00 C0 03' - '00 00 C0 03 00 00 C0 03 00 00 C0 03 00 00 E0 07' - '00 00 F0 0F 00 00 28 00 00 00 20 00 00 00 40 00' - '00 00 01 00 20 00 00 00 00 00 00 10 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 FF FF 00 00 FF FF 00 00 00 30 00 00' - '00 00 00 00 FF FF 00 00 FF FF 00 00 00 30 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 90 00 00 00 90 00 00 00 90 00 00 00 90 00 00' - '00 90 00 00 00 90 00 00 00 90 00 00 00 90 00 00' - '00 90 00 00 00 90 00 00 00 90 00 00 00 90 00 00' - '00 90 00 00 00 90 00 00 FF FF 00 00 FF FF 00 00' - 'FF FF 00 00 FF FF 00 00 00 9C 00 00 00 90 00 00' - '00 90 00 00 00 90 00 00 00 90 00 00 00 90 00 00' - '00 90 00 00 00 90 00 00 00 90 00 00 00 90 00 00' - '00 90 00 00 00 90 00 00 00 90 00 00 00 90 80 80' - '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' - '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' - '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' - '80 FF 80 80 80 FF 80 80 80 FF 00 00 FF FF 00 00' - 'FF FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' - '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' - '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' - '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 FF FF 00 00 FF FF 00 00' - 'FF FF 00 00 FF FF 00 00 00 3C 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 01 00 00 00 04 00 00 00 09 00 00' - '00 09 00 00 00 09 00 00 00 09 00 00 00 09 00 00' - '00 09 00 00 FF FF 00 00 FF FF C0 C0 C0 FF C0 C0' - 'C0 FF 00 00 FF FF 00 00 FF FF 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 05 00 00 00 C5 00 00 00 F7 00 00 00 F7 00 00' - '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' - '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' - '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' - '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' - '00 F7 00 00 00 F1 00 00 00 B1 00 00 00 0D 00 00' - '00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 05 00 00' - '00 9B 00 00 00 FF 21 21 21 FF 2B 2B 2B FF 2C 2C' - '2C FF 2B 2B 2B FF 2B 2B 2B FF 2B 2B 2B FF 2B 2B' - '2B FF 2B 2B 2B FF 2B 2B 2B FF 2B 2B 2B FF 2A 2A' - '2A FF 2A 2A 2A FF 2A 2A 2A FF 2A 2A 2A FF 2A 2A' - '2A FF 2A 2A 2A FF 2B 2B 2B FF 2B 2B 2B FF 2E 2C' - '2D FF 13 13 13 FF 00 00 00 FF 00 00 00 69 00 00' - '00 09 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 AD 01 01' - '01 FF EB EB EB FF E8 E8 E8 FF D5 D5 D5 FF 85 85' - '85 FF 92 92 92 FF 98 98 98 FF AD AD AD FF BA BA' - 'BA FF C3 C3 C3 FF C6 C6 C6 FF CA CA CA FF CA CA' - 'CA FF CA CA CA FF D3 D3 D3 FF D7 D7 D7 FF CC CC' - 'CC FF C7 C7 C7 FF C8 C9 C9 FF 9D B3 A8 FF 20 A8' - '63 FF 90 AF A0 FF BF BB BD FF 00 00 00 FF 00 00' - '00 81 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 F0 19 19' - '19 FF EC EC EC FF E2 E2 E2 FF CB CB CB FF 3B 3B' - '3B FF 56 56 56 FF 72 72 72 FF 92 92 92 FF 9D 9D' - '9D FF A8 A8 A8 FF AC AC AC FF A9 A9 A9 FF 9C 9C' - '9C FF 99 99 99 FF B7 B7 B7 FF C3 C3 C3 FF A3 A3' - 'A3 FF 98 98 98 FF C5 C4 C4 FF 51 A7 7C FF 17 CE' - '71 FF 2F 99 64 FF C3 BD C0 FF 01 01 01 FF 00 00' - '00 A3 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 F9 28 28' - '28 FF EC EC EC FF E6 E6 E6 FF D1 D1 D1 FF 68 68' - '68 FF 7E 7E 7E FF 85 85 85 FF 97 97 97 FF A0 A0' - 'A0 FF AA AA AA FF AE AE AE FF 9F 9F 9F FF 83 83' - '83 FF 7C 7C 7C FF A8 A8 A8 FF BB BB BB FF 8A 8A' - '8A FF 79 79 79 FF C2 C2 C2 FF C6 C3 C4 FF 99 AC' - 'A2 FF C2 BE C0 FF C4 C4 C4 FF 01 01 01 FF 00 00' - '00 BA 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 F9 28 28' - '28 FF EE EE EE FF E7 E7 E7 FF D6 D6 D6 FF 70 70' - '70 FF 7D 7D 7D FF 85 85 85 FF 97 97 97 FF A0 A0' - 'A0 FF AA AA AA FF AE AE AE FF 98 98 98 FF 73 73' - '73 FF 6A 6A 6A FF A0 A0 A0 FF B7 B7 B7 FF 7C 7C' - '7C FF 67 67 67 FF C2 C2 C2 FF C4 C3 C4 FF C7 C4' - 'C5 FF BF BF BF FF C5 C5 C5 FF 01 01 01 FF 00 00' - '00 B9 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 F9 27 27' - '27 FF F2 F2 F2 FF EB EB EB FF DF DF DF FF A7 A7' - 'A7 FF AB AB AB FF AE AE AE FF B3 B3 B3 FF B6 B6' - 'B6 FF B9 B9 B9 FF BA BA BA FF B7 B7 B7 FF B1 B1' - 'B1 FF AF AF AF FF BA BA BA FF BE BE BE FF B0 B0' - 'B0 FF AB AB AB FF C5 C5 C5 FF C6 C6 C6 FF C4 C4' - 'C4 FF C2 C2 C2 FF C9 C9 C9 FF 00 00 00 FF 00 00' - '00 B9 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 F9 26 26' - '26 FF F3 F3 F3 FF EB EB EB FF EA EA EA FF ED ED' - 'ED FF E9 E9 E9 FF E8 E8 E8 FF E4 E4 E4 FF E2 E2' - 'E2 FF DF DF DF FF DE DE DE FF DB DB DB FF DC DC' - 'DC FF D9 D9 D9 FF D6 D6 D6 FF D2 D2 D2 FF D2 D2' - 'D2 FF D0 D0 D0 FF CB CB CB FF C9 C9 C9 FF C7 C7' - 'C7 FF C0 C0 C0 FF CA CA CA FF 00 00 00 FF 00 00' - '00 B9 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 F9 24 24' - '24 FF FF FF FF FF E9 E9 E9 FF E2 E2 E2 FF E2 E2' - 'E2 FF DF DF DF FF DF DF DF FF DF DF DF FF DF DF' - 'DF FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' - 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' - 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E3 E3 E3 FF E3 E3' - 'E3 FF F8 F8 F8 FF EF EF EF FF 00 00 00 FF 00 00' - '00 B9 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 FA 24 24' - '24 FF F8 F8 F8 FF D9 D9 D9 FF BB BB BB FF BF BF' - 'BF FF DA DA DA FF D9 D9 D9 FF D9 D9 D9 FF D9 D9' - 'D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9' - 'D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9' - 'D9 FF D9 D9 D9 FF DB DB DB FF BC BC BC FF BB BB' - 'BB FF DE DE DE FF FF FF FF FF 00 00 00 FF 00 00' - '00 BA 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 D0 05 05' - '05 FF F6 F6 F6 FF BC BC BC FF C3 C3 C3 FF AB AB' - 'AB FF D8 D8 D8 FF D5 D5 D5 FF D5 D5 D5 FF D4 D4' - 'D4 FF D3 D3 D3 FF D5 D5 D5 FF D8 D8 D8 FF D8 D8' - 'D8 FF D5 D5 D5 FF D3 D3 D3 FF D3 D3 D3 FF D4 D4' - 'D4 FF D7 D7 D7 FF C9 C9 C9 FF C3 C3 C3 FF B3 B3' - 'B3 FF D6 D6 D6 FF F5 F5 F5 FF 00 00 00 FF 00 00' - '00 8C 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 9C 00 00' - '00 FF F4 F4 F4 FF CF CF CF FF D2 D2 D2 FF BF BF' - 'BF FF D3 D3 D3 FF D2 D2 D2 FF D3 D3 D3 FF DD DD' - 'DD FF E3 E3 E3 FF E6 E6 E6 FF ED ED ED FF ED ED' - 'ED FF E7 E7 E7 FF E4 E4 E4 FF DE DE DE FF D4 D4' - 'D4 FF D2 D2 D2 FF D3 D3 D3 FF D0 D0 D0 FF C2 C2' - 'C2 FF D9 D9 D9 FF E8 E8 E8 FF 00 00 00 FF 00 00' - '00 72 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 59 00 00' - '00 FF E9 E9 E9 FF D0 D0 D0 FF CD CD CD FF CD CD' - 'CD FF D6 D6 D6 FF ED ED ED FF DC DC DC FF D4 D4' - 'D4 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6' - 'D6 FF D6 D6 D6 FF D6 D6 D6 FF D5 D5 D5 FF DB DB' - 'DB FF ED ED ED FF DA DA DA FF CD CD CD FF CD CD' - 'CD FF DF DF DF FF B8 B8 B8 FF 00 00 00 FB 00 00' - '00 3A 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 3E 00 00' - '00 FE D7 D7 D7 FF D2 D2 D2 FF CB CB CB FF CA CA' - 'CA FF E9 E9 E9 FF DC DC DC FF D1 D1 D1 FF D2 D2' - 'D2 FF D2 D2 D2 FF D2 D2 D2 FF D2 D2 D2 FF D2 D2' - 'D2 FF D2 D2 D2 FF D2 D2 D2 FF D2 D2 D2 FF D1 D1' - 'D1 FF D8 D8 D8 FF EA EA EA FF C9 C9 C9 FF CA CA' - 'CA FF E0 E0 E0 FF A0 A0 A0 FF 00 00 00 EB 00 00' - '00 22 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 0C 00 00' - '00 E1 9F 9F 9F FF DD DD DD FF CD CD CD FF DB DB' - 'DB FF CE CE CE FF D0 D0 D0 FF D0 D0 D0 FF D0 D0' - 'D0 FF D0 D0 D0 FF CF CF CF FF C9 C9 C9 FF CA CA' - 'CA FF CA CA CA FF CA CA CA FF CA CA CA FF CA CA' - 'CA FF CA CA CA FF C8 C8 C8 FF DA DA DA FF C7 C7' - 'C7 FF E2 E2 E2 FF 5A 5A 5A FF 00 00 00 94 00 00' - '00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 B2 83 83 83 FF DD DD DD FF D1 D1 D1 FF DB DB' - 'DB FF D0 D0 D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0' - 'D0 FF D0 D0 D0 FF D0 D0 D0 FF C9 C9 C9 FF C5 C5' - 'C5 FF C6 C6 C6 FF C6 C6 C6 FF C6 C6 C6 FF C6 C6' - 'C6 FF C6 C6 C6 FF C6 C6 C6 FF D3 D3 D3 FF C8 C8' - 'C8 FF DE DE DE FF 42 42 42 FF 00 00 00 6C 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 4B 41 41 41 FF D8 D8 D8 FF D2 D2 D2 FF D0 D0' - 'D0 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' - 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' - 'D3 FF C7 C7 C7 FF C4 C4 C4 FF C1 C1 C1 FF C0 C0' - 'C0 FF C1 C1 C1 FF C1 C1 C1 FF BF BF BF FF C0 C0' - 'C0 FF B2 B2 B2 FF 1A 1A 1A FF 00 00 00 28 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 1A 2C 2C 2C FF CC CC CC FF D5 D5 D5 FF CC CC' - 'CC FF D6 D6 D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6' - 'D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6' - 'D6 FF D6 D6 D6 FF D5 D5 D5 FF CF CF CF FF CC CC' - 'CC FF C6 C6 C6 FF C4 C4 C4 FF B3 B3 B3 FF BD BD' - 'BD FF 99 99 99 FF 09 09 09 FF 00 00 00 19 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 02 08 08 08 FF 97 97 97 FF DF DF DF FF DC DC' - 'DC FF D6 D6 D6 FF DE DE DE FF DD DD DD FF DD DD' - 'DD FF DD DD DD FF DD DD DD FF DD DD DD FF DD DD' - 'DD FF DD DD DD FF DD DD DD FF DD DD DD FF DD DD' - 'DD FF DE DE DE FF D8 D8 D8 FF DD DD DD FF DC DC' - 'DC FF 53 53 53 FF 00 00 00 FF 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 FF 77 77 77 FF E2 E2 E2 FF E1 E1' - 'E1 FF CE CE CE FF D7 D7 D7 FF E2 E2 E2 FF E0 E0' - 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' - 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E1 E1' - 'E1 FF D9 D9 D9 FF CD CD CD FF E3 E3 E3 FF D9 D9' - 'D9 FF 39 39 39 FF 00 00 00 FF 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 FF 35 35 35 FF E6 E6 E6 FF E6 E6' - 'E6 FF E7 E7 E7 FF E7 E7 E7 FF D2 D2 D2 FF D3 D3' - 'D3 FF E3 E3 E3 FF E3 E3 E3 FF E4 E4 E4 FF E4 E4' - 'E4 FF E3 E3 E3 FF E3 E3 E3 FF D4 D4 D4 FF D1 D1' - 'D1 FF E7 E7 E7 FF E7 E7 E7 FF E8 E8 E8 FF D4 D4' - 'D4 FF 0B 0B 0B FF 00 00 00 ED 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 F9 1E 1E 1E FF E4 E4 E4 FF ED ED' - 'ED FF E6 E6 E6 FF EC EC EC FF EA EA EA FF E4 E4' - 'E4 FF DF DF DF FF DF DF DF FF DC DC DC FF DC DC' - 'DC FF DF DF DF FF DF DF DF FF E2 E2 E2 FF E9 E9' - 'E9 FF EA EA EA FF E5 E5 E5 FF EB EB EB FF D6 D6' - 'D6 FF 00 00 00 FF 00 00 00 C3 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 AE 00 00 00 FF E0 E0 E0 FF C4 C4' - 'C4 FF B8 B8 B8 FF B2 B2 B2 FF F1 F1 F1 FF F0 F0' - 'F0 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0' - 'F0 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0 F0 FF F3 F3' - 'F3 FF B0 B0 B0 FF B6 B6 B6 FF EB EB EB FF CD CD' - 'CD FF 00 00 00 FF 00 00 00 85 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 80 00 00 00 FF CE CE CE FF DD DD' - 'DD FF D5 D5 D5 FF E4 E4 E4 FF F9 F9 F9 FF F9 F9' - 'F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9' - 'F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9 F9 FF FA FA' - 'FA FF DF DF DF FF D8 D8 D8 FF D7 D7 D7 FF B0 B0' - 'B0 FF 00 00 00 FF 00 00 00 67 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 02 00 00 00 9C 0C 0C 0C FF 3D 3D' - '3D FF 48 48 48 FF 48 48 48 FF 48 48 48 FF 48 48' - '48 FF 48 48 48 FF 48 48 48 FF 48 48 48 FF 48 48' - '48 FF 48 48 48 FF 48 48 48 FF 48 48 48 FF 48 48' - '48 FF 48 48 48 FF 49 49 49 FF 2F 2F 2F FF 02 02' - '02 FF 00 00 00 5C 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 06 00 00 00 F1 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 D6 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF F8' - '8F FF 00 00 00 00 00 00 00 00 FF FC 1F FF F8 00' - '1F FF F0 00 00 07 E0 00 00 07 E0 00 00 07 E0 00' - '00 07 E0 00 00 07 E0 00 00 07 E0 00 00 07 E0 00' - '00 07 E0 00 00 07 E0 00 00 07 E0 00 00 07 E0 00' - '00 07 E0 00 00 07 E0 00 00 07 E0 00 00 07 F0 00' - '00 0F F0 00 00 0F F0 00 00 0F F0 00 00 1F F8 00' - '00 1F F8 00 00 1F F8 00 00 1F F8 00 00 1F F8 00' - '00 1F F8 00 00 3F FC 00 00 7F FF FF FF FF 28 00' - '00 00 30 00 00 00 60 00 00 00 01 00 04 00 00 00' - '00 00 80 04 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 80 00 00 00 00 80' - '00 00 80 80 00 00 00 00 80 00 80 00 80 00 00 80' - '80 00 C0 C0 C0 00 80 80 80 00 FF 00 00 00 00 FF' - '00 00 FF FF 00 00 00 00 FF 00 FF 00 FF 00 00 FF' - 'FF 00 FF FF FF 00 00 00 00 00 00 00 00 00 00 00' - 'CC 00 00 CC 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 CC C0 0C CC 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '0C CC CC C0 00 00 00 00 00 00 00 00 00 00 88 88' - '88 88 88 88 88 88 88 88 88 CC CC 88 88 88 88 88' - '88 88 88 88 88 88 77 77 77 77 77 77 77 77 77 77' - '77 CC CC 77 77 77 77 77 77 77 77 77 77 77 00 00' - '00 00 00 00 00 00 00 00 0C CC CC C0 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - 'CC C7 7C CC 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 CC 07 70 CC 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 87 77 77 77 77 77' - '77 77 77 77 77 77 77 77 77 78 00 00 00 00 00 00' - '00 08 FF F7 88 88 77 77 77 77 77 77 77 77 77 77' - '66 87 80 00 00 00 00 00 00 07 FF F7 00 88 88 87' - '77 77 87 87 77 77 87 78 66 67 80 00 00 00 00 00' - '00 07 FF F7 88 88 88 77 77 77 87 87 87 87 87 77' - '77 87 80 00 00 00 00 00 00 07 FF F7 88 88 88 77' - '77 78 87 87 87 87 87 77 77 77 80 00 00 00 00 00' - '00 07 FF F7 88 88 88 77 77 78 87 87 87 87 87 77' - '77 77 80 00 00 00 00 00 00 07 FF F7 88 88 88 87' - '77 78 87 88 87 87 87 77 77 77 80 00 00 00 00 00' - '00 07 FF F7 77 77 77 77 77 77 77 77 77 77 77 77' - '77 77 80 00 00 00 00 00 00 07 FF FF FF FF FF FF' - '77 77 77 77 77 77 77 77 77 77 80 00 00 00 00 00' - '00 07 FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF F7 80 00 00 00 00 00 00 07 FF FF FF 77 77 7F' - 'FF FF FF FF FF FF FF FF FF FF 80 00 00 00 00 00' - '00 07 F7 77 77 77 77 77 77 77 77 77 77 77 77 77' - '77 7F 80 00 00 00 00 00 00 07 F7 77 77 77 77 77' - '77 77 77 77 77 77 77 77 77 7F 80 00 00 00 00 00' - '00 07 F7 77 77 77 77 77 77 77 77 77 77 77 77 77' - '77 7F 80 00 00 00 00 00 00 07 F7 77 77 77 77 7F' - 'FF FF FF FF F7 77 77 77 77 7F 80 00 00 00 00 00' - '00 08 F7 77 77 77 7F FF 77 77 77 77 FF FF 77 77' - '77 77 00 00 00 00 00 00 00 08 F7 77 77 7F F7 77' - '77 77 77 77 77 7F F7 77 77 77 00 00 00 00 00 00' - '00 00 77 77 77 F7 77 77 77 77 77 77 77 77 7F 77' - '77 F7 00 00 00 00 00 00 00 00 77 77 7F 77 77 77' - '77 77 77 77 77 77 77 F7 77 F8 00 00 00 00 00 00' - '00 00 87 77 77 77 77 77 77 77 77 77 77 77 77 77' - '77 F8 00 00 00 00 00 00 00 00 87 77 77 77 77 77' - '77 77 77 77 77 77 77 77 77 78 00 00 00 00 00 00' - '00 00 87 77 77 77 77 77 77 77 77 77 77 77 77 77' - '77 70 00 00 00 00 00 00 00 00 87 77 77 77 77 77' - '77 77 77 77 77 77 77 77 77 70 00 00 00 00 00 00' - '00 00 07 77 77 77 77 77 77 77 77 77 77 77 77 77' - '77 80 00 00 00 00 00 00 00 00 07 77 77 77 77 77' - '77 77 77 77 77 77 77 77 77 80 00 00 00 00 00 00' - '00 00 08 77 77 77 77 77 77 77 77 77 77 77 77 77' - '77 80 00 00 00 00 00 00 00 00 08 7F F7 77 FF FF' - 'FF FF FF FF FF FF 77 7F 77 00 00 00 00 00 00 00' - '00 00 08 7F FF F7 77 FF FF FF FF FF FF 77 7F FF' - '77 00 00 00 00 00 00 00 00 00 00 7F FF FF 77 77' - 'FF FF FF FF 77 77 FF FF 78 00 00 00 00 00 00 00' - '00 00 00 7F FF FF FF FF 77 77 77 77 7F FF FF FF' - '78 00 00 00 00 00 00 00 00 00 00 8F 77 77 FF FF' - 'FF FF FF FF FF FF 77 7F 78 00 00 00 00 00 00 00' - '00 00 00 8F 77 77 FF FF FF FF FF FF FF F7 77 7F' - '78 00 00 00 00 00 00 00 00 00 00 87 77 7F FF FF' - 'FF FF FF FF FF FF 77 77 70 00 00 00 00 00 00 00' - '00 00 00 08 77 77 77 77 77 77 77 77 77 77 77 77' - '80 00 00 00 00 00 00 00 00 00 00 00 08 88 88 88' - '88 88 88 88 88 88 88 80 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 FF FF F1 C7 FF FF 00 00 FF FF' - 'F0 07 FF FF 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF' - 'F8 0F FF FF 00 00 FF FF F0 07 FF FF 00 00 FF FF' - 'F2 07 FF FF 00 00 FC 00 00 00 00 7F 00 00 F8 00' - '00 00 00 3F 00 00 F8 00 00 00 00 1F 00 00 F0 00' - '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F0 00' - '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F0 00' - '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F0 00' - '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F0 00' - '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F0 00' - '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F0 00' - '00 00 00 1F 00 00 F8 00 00 00 00 1F 00 00 F8 00' - '00 00 00 1F 00 00 F8 00 00 00 00 1F 00 00 F8 00' - '00 00 00 1F 00 00 F8 00 00 00 00 1F 00 00 F8 00' - '00 00 00 1F 00 00 FC 00 00 00 00 3F 00 00 FC 00' - '00 00 00 3F 00 00 FC 00 00 00 00 3F 00 00 FC 00' - '00 00 00 3F 00 00 FC 00 00 00 00 3F 00 00 FC 00' - '00 00 00 7F 00 00 FE 00 00 00 00 7F 00 00 FE 00' - '00 00 00 7F 00 00 FE 00 00 00 00 7F 00 00 FE 00' - '00 00 00 7F 00 00 FE 00 00 00 00 7F 00 00 FF 00' - '00 00 00 7F 00 00 FF 00 00 00 00 FF 00 00 FF 00' - '00 00 00 FF 00 00 FF 00 00 00 01 FF 00 00 FF 80' - '00 00 03 FF 00 00 FF E0 00 00 07 FF 00 00 FF FF' - 'FF FF FF FF 00 00 28 00 00 00 30 00 00 00 60 00' - '00 00 01 00 20 00 00 00 00 00 00 24 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - 'FF FF 00 00 FF FF 00 00 00 30 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 FF FF 00 00 FF FF 00 00' - '00 30 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 30 00 00 00 24 00 00 00 30 00 00 00 30 00 00' - '00 30 00 00 00 30 00 00 00 30 00 00 00 30 00 00' - '00 30 00 00 00 30 00 00 00 30 00 00 00 30 00 00' - '00 30 00 00 00 30 00 00 00 30 00 00 00 30 00 00' - '00 30 00 00 00 30 00 00 00 30 00 00 00 30 00 00' - 'FF FF 00 00 FF FF 00 00 FF FF 00 00 00 30 00 00' - '00 30 00 00 FF FF 00 00 FF FF 00 00 FF FF 00 00' - '00 3C 00 00 00 30 00 00 00 30 00 00 00 30 00 00' - '00 30 00 00 00 30 00 00 00 30 00 00 00 30 00 00' - '00 30 00 00 00 30 00 00 00 30 00 00 00 30 00 00' - '00 30 00 00 00 30 00 00 00 30 00 00 00 30 00 00' - '00 30 00 00 00 30 00 00 00 30 00 00 00 30 00 00' - '00 90 00 00 00 90 00 00 00 90 00 00 00 90 00 00' - '00 90 00 00 00 90 00 00 00 90 00 00 00 90 00 00' - '00 90 00 00 00 90 00 00 00 90 00 00 00 90 00 00' - '00 90 00 00 00 90 00 00 00 90 00 00 00 90 00 00' - '00 90 00 00 00 90 00 00 00 90 00 00 00 90 00 00' - '00 90 00 00 FF FF 00 00 FF FF 00 00 FF FF 00 00' - 'FF FF 00 00 FF FF 00 00 FF FF 00 00 00 9C 00 00' - '00 90 00 00 00 90 00 00 00 90 00 00 00 90 00 00' - '00 90 00 00 00 90 00 00 00 90 00 00 00 90 00 00' - '00 90 00 00 00 90 00 00 00 90 00 00 00 90 00 00' - '00 90 00 00 00 90 00 00 00 90 00 00 00 90 00 00' - '00 90 00 00 00 90 00 00 00 90 00 00 00 90 80 80' - '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' - '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' - '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' - '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' - '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' - '80 FF 80 80 80 FF 00 00 FF FF 00 00 FF FF 00 00' - 'FF FF 00 00 FF FF 80 80 80 FF 80 80 80 FF 80 80' - '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' - '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' - '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' - '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' - '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF C0 C0' - 'C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0' - 'C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0' - 'C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0' - 'C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0' - 'C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0' - 'C0 FF C0 C0 C0 FF 00 00 FF FF 00 00 FF FF 00 00' - 'FF FF 00 00 FF FF C0 C0 C0 FF C0 C0 C0 FF C0 C0' - 'C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0' - 'C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0' - 'C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0' - 'C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0' - 'C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0 C0 FF 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 FF FF 00 00 FF FF 00 00 FF FF 00 00' - 'FF FF 00 00 FF FF 00 00 FF FF 00 00 00 3C 00 00' - '00 18 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 09 00 00' - 'FF FF 00 00 FF FF 00 00 FF FF C0 C0 C0 FF C0 C0' - 'C0 FF 00 00 FF FF 00 00 FF FF 00 00 FF FF 00 00' - '00 15 00 00 00 09 00 00 00 09 00 00 00 09 00 00' - '00 09 00 00 00 09 00 00 00 09 00 00 00 09 00 00' - '00 09 00 00 00 09 00 00 00 09 00 00 00 07 00 00' - '00 04 00 00 00 01 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 16 00 00 00 34 00 00 00 37 00 00 00 37 00 00' - '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' - '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' - 'FF FF 00 00 FF FF 00 00 00 37 C0 C0 C0 FF C0 C0' - 'C0 FF 00 00 00 37 00 00 FF FF 00 00 FF FF 00 00' - '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' - '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' - '00 37 00 00 00 37 00 00 00 35 00 00 00 18 00 00' - '00 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 05 00 00 00 69 00 00' - '00 C5 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' - '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' - '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' - '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' - '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' - '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' - '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' - '00 F7 00 00 00 F7 00 00 00 F1 00 00 00 B1 00 00' - '00 5C 00 00 00 0D 00 00 00 01 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 05 00 00 00 9B 00 00 00 FF 00 00' - '00 FF 21 21 21 FF 2C 2C 2C FF 2B 2B 2B FF 2C 2C' - '2C FF 2B 2B 2B FF 2B 2B 2B FF 2B 2B 2B FF 2B 2B' - '2B FF 2B 2B 2B FF 2B 2B 2B FF 2B 2B 2B FF 2B 2B' - '2B FF 2B 2B 2B FF 2B 2B 2B FF 2B 2B 2B FF 2A 2A' - '2A FF 2A 2A 2A FF 2A 2A 2A FF 2A 2A 2A FF 2A 2A' - '2A FF 2A 2A 2A FF 2A 2A 2A FF 2A 2A 2A FF 2A 2A' - '2A FF 2B 2B 2B FF 2B 2B 2B FF 2B 2B 2B FF 2E 2C' - '2D FF 2E 2C 2D FF 13 13 13 FF 00 00 00 FF 00 00' - '00 F6 00 00 00 69 00 00 00 09 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 54 00 00 00 FF 26 26 26 FF 90 90' - '90 FF CA CA CA FF CD CD CD FF CB CB CB FF CE CE' - 'CE FF CD CD CD FF CC CC CC FF CB CB CB FF C9 C9' - 'C9 FF C7 C7 C7 FF C6 C6 C6 FF C5 C5 C5 FF C4 C4' - 'C4 FF C3 C3 C3 FF C2 C2 C2 FF C2 C2 C2 FF C3 C3' - 'C3 FF C0 C0 C0 FF C1 C1 C1 FF BF BF BF FF BF BF' - 'BF FF BC BC BC FF BD BD BD FF BA BA BA FF BB BB' - 'BB FF B5 B5 B5 FF B3 B4 B3 FF B8 B4 B6 FF AD AD' - 'AD FF AB AC AC FF AD A8 AB FF 63 63 63 FF 09 09' - '09 FF 00 00 00 EF 00 00 00 42 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 03 00 00 00 AD 01 01 01 FF 8A 8A 8A FF EB EB' - 'EB FF E8 E8 E8 FF E7 E7 E7 FF D5 D5 D5 FF 85 85' - '85 FF 88 88 88 FF 92 92 92 FF 98 98 98 FF A2 A2' - 'A2 FF AD AD AD FF BA BA BA FF C0 C0 C0 FF C3 C3' - 'C3 FF C6 C6 C6 FF CB CB CB FF CA CA CA FF CA CA' - 'CA FF D6 D6 D6 FF CA CA CA FF D3 D3 D3 FF CB CB' - 'CB FF D7 D7 D7 FF CC CC CC FF D4 D4 D4 FF C7 C7' - 'C7 FF C8 C9 C9 FF C6 C2 C4 FF 9D B3 A8 FF 20 A8' - '63 FF 1C A8 60 FF 90 AF A0 FF BF BB BD FF 4F 4F' - '4F FF 00 00 00 FF 00 00 00 81 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 15 00 00 00 F0 19 19 19 FF C7 C7 C7 FF EC EC' - 'EC FF E2 E2 E2 FF E6 E6 E6 FF CB CB CB FF 3B 3B' - '3B FF 3F 3F 3F FF 56 56 56 FF 72 72 72 FF 87 87' - '87 FF 92 92 92 FF 9D 9D 9D FF A5 A5 A5 FF A8 A8' - 'A8 FF AC AC AC FF B7 B7 B7 FF A9 A9 A9 FF 9C 9C' - '9C FF BD BD BD FF 99 99 99 FF B7 B7 B7 FF A1 A1' - 'A1 FF C3 C3 C3 FF A3 A3 A3 FF BD BD BD FF 98 98' - '98 FF C5 C4 C4 FF C7 BF C3 FF 51 A7 7C FF 17 CE' - '71 FF 0A BF 61 FF 2F 99 64 FF C3 BD C0 FF 84 83' - '84 FF 01 01 01 FF 00 00 00 A3 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 30 00 00 00 FA 29 29 29 FF D1 D1 D1 FF EA EA' - 'EA FF E4 E4 E4 FF E7 E7 E7 FF CD CD CD FF 47 47' - '47 FF 5F 5F 5F FF 79 79 79 FF 87 87 87 FF 8F 8F' - '8F FF 97 97 97 FF A0 A0 A0 FF A7 A7 A7 FF AA AA' - 'AA FF AE AE AE FF B9 B9 B9 FF A4 A4 A4 FF 90 90' - '90 FF B8 B8 B8 FF 8A 8A 8A FF AF AF AF FF 94 94' - '94 FF BF BF BF FF 97 97 97 FF B7 B7 B7 FF 88 88' - '88 FF C4 C3 C3 FF C6 C3 C5 FF 95 B2 A3 FF 91 D6' - 'B4 FF 91 D8 B5 FF 83 AB 97 FF C4 C1 C3 FF 8E 8E' - '8E FF 01 01 01 FF 00 00 00 B7 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 34 00 00 00 F9 28 28 28 FF D1 D1 D1 FF EC EC' - 'EC FF E6 E6 E6 FF E7 E7 E7 FF D1 D1 D1 FF 68 68' - '68 FF 74 74 74 FF 7E 7E 7E FF 85 85 85 FF 8E 8E' - '8E FF 97 97 97 FF A0 A0 A0 FF A7 A7 A7 FF AA AA' - 'AA FF AE AE AE FF BA BA BA FF 9F 9F 9F FF 83 83' - '83 FF B3 B3 B3 FF 7C 7C 7C FF A8 A8 A8 FF 87 87' - '87 FF BB BB BB FF 8A 8A 8A FF B2 B2 B2 FF 79 79' - '79 FF C2 C2 C2 FF C4 C4 C4 FF C6 C3 C4 FF 99 AC' - 'A2 FF 96 AB A0 FF C2 BE C0 FF C4 C4 C4 FF 8D 8D' - '8D FF 01 01 01 FF 00 00 00 BA 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 33 00 00 00 F9 28 28 28 FF D1 D1 D1 FF EE EE' - 'EE FF E7 E7 E7 FF E8 E8 E8 FF D6 D6 D6 FF 70 70' - '70 FF 71 71 71 FF 7D 7D 7D FF 85 85 85 FF 8E 8E' - '8E FF 97 97 97 FF A0 A0 A0 FF A7 A7 A7 FF AA AA' - 'AA FF AE AE AE FF BB BB BB FF 98 98 98 FF 73 73' - '73 FF AD AD AD FF 6A 6A 6A FF A0 A0 A0 FF 78 78' - '78 FF B7 B7 B7 FF 7C 7C 7C FF AB AB AB FF 67 67' - '67 FF C2 C2 C2 FF C6 C6 C6 FF C4 C3 C4 FF C7 C4' - 'C5 FF C6 C2 C4 FF BF BF BF FF C5 C5 C5 FF 8D 8D' - '8D FF 01 01 01 FF 00 00 00 B9 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 33 00 00 00 F9 27 27 27 FF D1 D1 D1 FF EF EF' - 'EF FF E9 E9 E9 FF EB EB EB FF D6 D6 D6 FF 6A 6A' - '6A FF 6C 6C 6C FF 78 78 78 FF 81 81 81 FF 8A 8A' - '8A FF 93 93 93 FF 9C 9C 9C FF A3 A3 A3 FF A6 A6' - 'A6 FF AB AB AB FF B9 B9 B9 FF 90 90 90 FF 66 66' - '66 FF A5 A5 A5 FF 5B 5B 5B FF 98 98 98 FF 6B 6B' - '6B FF B1 B1 B1 FF 70 70 70 FF A4 A4 A4 FF 58 58' - '58 FF C1 C1 C1 FF C8 C8 C8 FF C5 C5 C5 FF C3 C3' - 'C3 FF C2 C2 C2 FF C1 C1 C1 FF C6 C6 C6 FF 8E 8E' - '8E FF 01 01 01 FF 00 00 00 B9 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 33 00 00 00 F9 27 27 27 FF D2 D2 D2 FF F2 F2' - 'F2 FF EB EB EB FF EA EA EA FF DF DF DF FF A7 A7' - 'A7 FF A7 A7 A7 FF AB AB AB FF AE AE AE FF B0 B0' - 'B0 FF B3 B3 B3 FF B6 B6 B6 FF B9 B9 B9 FF B9 B9' - 'B9 FF BA BA BA FF BD BD BD FF B7 B7 B7 FF B1 B1' - 'B1 FF BE BE BE FF AF AF AF FF BA BA BA FF B1 B1' - 'B1 FF BE BE BE FF B0 B0 B0 FF BA BA BA FF AB AB' - 'AB FF C5 C5 C5 FF C8 C8 C8 FF C6 C6 C6 FF C4 C4' - 'C4 FF C3 C3 C3 FF C2 C2 C2 FF C9 C9 C9 FF 8E 8E' - '8E FF 00 00 00 FF 00 00 00 B9 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 33 00 00 00 F9 26 26 26 FF D3 D3 D3 FF F3 F3' - 'F3 FF EB EB EB FF EB EB EB FF EA EA EA FF ED ED' - 'ED FF EB EB EB FF E9 E9 E9 FF E8 E8 E8 FF E6 E6' - 'E6 FF E4 E4 E4 FF E2 E2 E2 FF E1 E1 E1 FF DF DF' - 'DF FF DE DE DE FF DB DB DB FF DB DB DB FF DC DC' - 'DC FF D8 D8 D8 FF D9 D9 D9 FF D6 D6 D6 FF D6 D6' - 'D6 FF D2 D2 D2 FF D2 D2 D2 FF CF CF CF FF D0 D0' - 'D0 FF CB CB CB FF CA CA CA FF C9 C9 C9 FF C7 C7' - 'C7 FF C4 C4 C4 FF C0 C0 C0 FF CA CA CA FF 8E 8E' - '8E FF 00 00 00 FF 00 00 00 B9 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 33 00 00 00 F9 26 26 26 FF D3 D3 D3 FF F7 F7' - 'F7 FF F8 F8 F8 FF F6 F6 F6 FF F6 F6 F6 FF F6 F6' - 'F6 FF F5 F5 F5 FF F5 F5 F5 FF F4 F4 F4 FF F4 F4' - 'F4 FF F3 F3 F3 FF F3 F3 F3 FF F3 F3 F3 FF F2 F2' - 'F2 FF F2 F2 F2 FF F1 F1 F1 FF F1 F1 F1 FF F1 F1' - 'F1 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0 F0 FF EF EF' - 'EF FF EF EF EF FF EE EE EE FF EE EE EE FF ED ED' - 'ED FF ED ED ED FF ED ED ED FF EC EC EC FF EC EC' - 'EC FF EB EB EB FF E0 E0 E0 FF D0 D0 D0 FF 8D 8D' - '8D FF 00 00 00 FF 00 00 00 B9 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 33 00 00 00 F9 24 24 24 FF D6 D6 D6 FF FF FF' - 'FF FF E9 E9 E9 FF E1 E1 E1 FF E2 E2 E2 FF E2 E2' - 'E2 FF E0 E0 E0 FF DF DF DF FF DF DF DF FF DF DF' - 'DF FF DF DF DF FF DF DF DF FF E0 E0 E0 FF E0 E0' - 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' - 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' - 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' - 'E0 FF E0 E0 E0 FF E2 E2 E2 FF E3 E3 E3 FF E3 E3' - 'E3 FF E3 E3 E3 FF F8 F8 F8 FF EF EF EF FF 8C 8C' - '8C FF 00 00 00 FF 00 00 00 B9 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 34 00 00 00 FA 24 24 24 FF DE DE DE FF F8 F8' - 'F8 FF D9 D9 D9 FF C4 C4 C4 FF BB BB BB FF BF BF' - 'BF FF D8 D8 D8 FF DA DA DA FF D9 D9 D9 FF D9 D9' - 'D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9' - 'D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9' - 'D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9' - 'D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9' - 'D9 FF DB DB DB FF CF CF CF FF BC BC BC FF BB BB' - 'BB FF D1 D1 D1 FF DE DE DE FF FF FF FF FF 9A 9A' - '9A FF 00 00 00 FF 00 00 00 BA 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 25 00 00 00 F7 1F 1F 1F FF DA DA DA FF F3 F3' - 'F3 FF C6 C6 C6 FF A9 A9 A9 FF B7 B7 B7 FF B0 B0' - 'B0 FF C3 C3 C3 FF DA DA DA FF D8 D8 D8 FF D8 D8' - 'D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8 D8 FF D7 D7' - 'D7 FF D7 D7 D7 FF D7 D7 D7 FF D7 D7 D7 FF D7 D7' - 'D7 FF D7 D7 D7 FF D7 D7 D7 FF D7 D7 D7 FF D8 D8' - 'D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8 D8 FF D9 D9' - 'D9 FF D2 D2 D2 FF A8 A8 A8 FF B6 B6 B6 FF B1 B1' - 'B1 FF B5 B5 B5 FF D8 D8 D8 FF FC FC FC FF 9C 9C' - '9C FF 00 00 00 FF 00 00 00 AE 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 07 00 00 00 D0 05 05 05 FF C2 C2 C2 FF F6 F6' - 'F6 FF BC BC BC FF B2 B2 B2 FF C3 C3 C3 FF AB AB' - 'AB FF BB BB BB FF D8 D8 D8 FF D5 D5 D5 FF D5 D5' - 'D5 FF D5 D5 D5 FF D4 D4 D4 FF D3 D3 D3 FF D3 D3' - 'D3 FF D5 D5 D5 FF D7 D7 D7 FF D8 D8 D8 FF D8 D8' - 'D8 FF D7 D7 D7 FF D5 D5 D5 FF D3 D3 D3 FF D3 D3' - 'D3 FF D3 D3 D3 FF D4 D4 D4 FF D5 D5 D5 FF D7 D7' - 'D7 FF C9 C9 C9 FF A6 A6 A6 FF C3 C3 C3 FF B3 B3' - 'B3 FF AD AD AD FF D6 D6 D6 FF F5 F5 F5 FF 76 76' - '76 FF 00 00 00 FF 00 00 00 8C 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 9C 00 00 00 FF A4 A4 A4 FF F4 F4' - 'F4 FF CF CF CF FF C5 C5 C5 FF D2 D2 D2 FF BF BF' - 'BF FF C9 C9 C9 FF D3 D3 D3 FF D2 D2 D2 FF D0 D0' - 'D0 FF D3 D3 D3 FF DD DD DD FF E1 E1 E1 FF E3 E3' - 'E3 FF E6 E6 E6 FF EA EA EA FF ED ED ED FF ED ED' - 'ED FF EB EB EB FF E7 E7 E7 FF E4 E4 E4 FF E2 E2' - 'E2 FF DE DE DE FF D4 D4 D4 FF D0 D0 D0 FF D2 D2' - 'D2 FF D3 D3 D3 FF C5 C5 C5 FF D0 D0 D0 FF C2 C2' - 'C2 FF BF BF BF FF D9 D9 D9 FF E8 E8 E8 FF 56 56' - '56 FF 00 00 00 FF 00 00 00 72 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 73 00 00 00 FF 7E 7E 7E FF EF EF' - 'EF FF D1 D1 D1 FF CF CF CF FF CB CB CB FF CF CF' - 'CF FF D1 D1 D1 FF CE CE CE FF CF CF CF FF DF DF' - 'DF FF F0 F0 F0 FF EC EC EC FF E1 E1 E1 FF DE DE' - 'DE FF DD DD DD FF DC DC DC FF DB DB DB FF DB DB' - 'DB FF DC DC DC FF DD DD DD FF DE DE DE FF E1 E1' - 'E1 FF EC EC EC FF F1 F1 F1 FF E1 E1 E1 FF D1 D1' - 'D1 FF CE CE CE FF D0 D0 D0 FF CB CB CB FF CE CE' - 'CE FF D1 D1 D1 FF D9 D9 D9 FF D4 D4 D4 FF 3F 3F' - '3F FF 00 00 00 FF 00 00 00 55 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 59 00 00 00 FF 59 59 59 FF E9 E9' - 'E9 FF D0 D0 D0 FF CD CD CD FF CD CD CD FF CD CD' - 'CD FF CA CA CA FF D6 D6 D6 FF ED ED ED FF E6 E6' - 'E6 FF DC DC DC FF D4 D4 D4 FF D5 D5 D5 FF D6 D6' - 'D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6' - 'D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6 D6 FF D5 D5' - 'D5 FF D5 D5 D5 FF DB DB DB FF E4 E4 E4 FF ED ED' - 'ED FF DA DA DA FF CA CA CA FF CD CD CD FF CD CD' - 'CD FF CB CB CB FF DF DF DF FF B8 B8 B8 FF 22 22' - '22 FF 00 00 00 FB 00 00 00 3A 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 3E 00 00 00 FE 40 40 40 FF D7 D7' - 'D7 FF D2 D2 D2 FF CA CA CA FF CB CB CB FF CA CA' - 'CA FF D4 D4 D4 FF E9 E9 E9 FF DC DC DC FF D0 D0' - 'D0 FF D1 D1 D1 FF D2 D2 D2 FF D2 D2 D2 FF D2 D2' - 'D2 FF D2 D2 D2 FF D2 D2 D2 FF D2 D2 D2 FF D2 D2' - 'D2 FF D2 D2 D2 FF D2 D2 D2 FF D2 D2 D2 FF D2 D2' - 'D2 FF D2 D2 D2 FF D1 D1 D1 FF D0 D0 D0 FF D8 D8' - 'D8 FF EA EA EA FF D8 D8 D8 FF C9 C9 C9 FF CA CA' - 'CA FF C9 C9 C9 FF E0 E0 E0 FF A0 A0 A0 FF 08 08' - '08 FF 00 00 00 EB 00 00 00 22 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 25 00 00 00 F8 22 22 22 FF B7 B7' - 'B7 FF DB DB DB FF CA CA CA FF CB CB CB FF CE CE' - 'CE FF E4 E4 E4 FF D4 D4 D4 FF CF CF CF FF D1 D1' - 'D1 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0' - 'D0 FF CF CF CF FF CD CD CD FF CE CE CE FF CE CE' - 'CE FF CE CE CE FF CE CE CE FF CE CE CE FF CE CE' - 'CE FF CE CE CE FF CE CE CE FF CE CE CE FF CC CC' - 'CC FF D0 D0 D0 FF E2 E2 E2 FF CF CF CF FF C7 C7' - 'C7 FF C9 C9 C9 FF E2 E2 E2 FF 80 80 80 FF 00 00' - '00 FF 00 00 00 C2 00 00 00 0E 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 0C 00 00 00 E1 07 07 07 FF 9F 9F' - '9F FF DD DD DD FF CC CC CC FF CD CD CD FF DB DB' - 'DB FF D6 D6 D6 FF CE CE CE FF D0 D0 D0 FF D0 D0' - 'D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0' - 'D0 FF CF CF CF FF CC CC CC FF C9 C9 C9 FF CA CA' - 'CA FF CA CA CA FF CA CA CA FF CA CA CA FF CA CA' - 'CA FF CA CA CA FF CA CA CA FF CA CA CA FF CA CA' - 'CA FF C8 C8 C8 FF CF CF CF FF DA DA DA FF C7 C7' - 'C7 FF C9 C9 C9 FF E2 E2 E2 FF 5A 5A 5A FF 00 00' - '00 FF 00 00 00 94 00 00 00 01 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 B2 00 00 00 FF 83 83' - '83 FF DD DD DD FF CF CF CF FF D1 D1 D1 FF DB DB' - 'DB FF D1 D1 D1 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0' - 'D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0' - 'D0 FF D0 D0 D0 FF CF CF CF FF C9 C9 C9 FF C5 C5' - 'C5 FF C6 C6 C6 FF C6 C6 C6 FF C6 C6 C6 FF C6 C6' - 'C6 FF C6 C6 C6 FF C6 C6 C6 FF C6 C6 C6 FF C6 C6' - 'C6 FF C6 C6 C6 FF C7 C7 C7 FF D3 D3 D3 FF C8 C8' - 'C8 FF C9 C9 C9 FF DE DE DE FF 42 42 42 FF 00 00' - '00 FF 00 00 00 6C 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 80 00 00 00 FF 5F 5F' - '5F FF DC DC DC FF D1 D1 D1 FF D2 D2 D2 FF D4 D4' - 'D4 FF D1 D1 D1 FF D1 D1 D1 FF D1 D1 D1 FF D1 D1' - 'D1 FF D1 D1 D1 FF D1 D1 D1 FF D1 D1 D1 FF D1 D1' - 'D1 FF D1 D1 D1 FF D1 D1 D1 FF D0 D0 D0 FF C8 C8' - 'C8 FF C3 C3 C3 FF C3 C3 C3 FF C3 C3 C3 FF C4 C4' - 'C4 FF C4 C4 C4 FF C4 C4 C4 FF C4 C4 C4 FF C4 C4' - 'C4 FF C4 C4 C4 FF C4 C4 C4 FF C7 C7 C7 FF C5 C5' - 'C5 FF CB CB CB FF CC CC CC FF 2D 2D 2D FF 00 00' - '00 F8 00 00 00 40 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 4B 00 00 00 FE 41 41' - '41 FF D8 D8 D8 FF D4 D4 D4 FF D2 D2 D2 FF D0 D0' - 'D0 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' - 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' - 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' - 'D3 FF CD CD CD FF C7 C7 C7 FF C4 C4 C4 FF C2 C2' - 'C2 FF C1 C1 C1 FF C0 C0 C0 FF C1 C1 C1 FF C1 C1' - 'C1 FF C1 C1 C1 FF C2 C2 C2 FF BF BF BF FF C0 C0' - 'C0 FF CE CE CE FF B2 B2 B2 FF 1A 1A 1A FF 00 00' - '00 E5 00 00 00 28 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 1A 00 00 00 F2 2C 2C' - '2C FF CC CC CC FF D6 D6 D6 FF D5 D5 D5 FF CC CC' - 'CC FF D5 D5 D5 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6' - 'D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6' - 'D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6' - 'D6 FF D7 D7 D7 FF D6 D6 D6 FF D5 D5 D5 FF D3 D3' - 'D3 FF CF CF CF FF CC CC CC FF C9 C9 C9 FF C6 C6' - 'C6 FF C4 C4 C4 FF C2 C2 C2 FF B3 B3 B3 FF BD BD' - 'BD FF D0 D0 D0 FF 99 99 99 FF 09 09 09 FF 00 00' - '00 CF 00 00 00 19 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 09 00 00 00 D8 18 18' - '18 FF B0 B0 B0 FF DB DB DB FF DB DB DB FF D0 D0' - 'D0 FF D2 D2 D2 FF DB DB DB FF D9 D9 D9 FF DA DA' - 'DA FF DA DA DA FF DA DA DA FF DA DA DA FF DA DA' - 'DA FF DA DA DA FF DA DA DA FF DA DA DA FF DA DA' - 'DA FF DA DA DA FF DA DA DA FF DA DA DA FF DA DA' - 'DA FF DB DB DB FF DB DB DB FF DA DA DA FF D9 D9' - 'D9 FF D9 D9 D9 FF CF CF CF FF C5 C5 C5 FF CC CC' - 'CC FF CA CA CA FF 7A 7A 7A FF 02 02 02 FF 00 00' - '00 B8 00 00 00 0A 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 02 00 00 00 BF 08 08' - '08 FF 97 97 97 FF DC DC DC FF DF DF DF FF DC DC' - 'DC FF CE CE CE FF D6 D6 D6 FF DE DE DE FF DD DD' - 'DD FF DD DD DD FF DD DD DD FF DD DD DD FF DD DD' - 'DD FF DD DD DD FF DD DD DD FF DD DD DD FF DD DD' - 'DD FF DD DD DD FF DD DD DD FF DD DD DD FF DD DD' - 'DD FF DD DD DD FF DD DD DD FF DD DD DD FF DE DE' - 'DE FF D8 D8 D8 FF CE CE CE FF DD DD DD FF DC DC' - 'DC FF C6 C6 C6 FF 53 53 53 FF 00 00 00 FF 00 00' - '00 A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 A4 00 00' - '00 FF 77 77 77 FF D3 D3 D3 FF E2 E2 E2 FF E1 E1' - 'E1 FF DE DE DE FF CE CE CE FF D7 D7 D7 FF E1 E1' - 'E1 FF E2 E2 E2 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' - 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' - 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' - 'E0 FF E0 E0 E0 FF E1 E1 E1 FF E1 E1 E1 FF D9 D9' - 'D9 FF CD CD CD FF DA DA DA FF E3 E3 E3 FF D9 D9' - 'D9 FF BB BB BB FF 39 39 39 FF 00 00 00 FF 00 00' - '00 7E 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 89 00 00' - '00 FF 4B 4B 4B FF C9 C9 C9 FF E5 E5 E5 FF E3 E3' - 'E3 FF E4 E4 E4 FF E1 E1 E1 FF D7 D7 D7 FF D2 D2' - 'D2 FF DA DA DA FF E4 E4 E4 FF E5 E5 E5 FF E4 E4' - 'E4 FF E4 E4 E4 FF E4 E4 E4 FF E4 E4 E4 FF E4 E4' - 'E4 FF E4 E4 E4 FF E4 E4 E4 FF E4 E4 E4 FF E5 E5' - 'E5 FF E5 E5 E5 FF DC DC DC FF D2 D2 D2 FF D6 D6' - 'D6 FF E0 E0 E0 FF E4 E4 E4 FF E6 E6 E6 FF D6 D6' - 'D6 FF A8 A8 A8 FF 20 20 20 FF 00 00 00 FD 00 00' - '00 4E 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 62 00 00' - '00 FF 35 35 35 FF BD BD BD FF E6 E6 E6 FF E6 E6' - 'E6 FF E6 E6 E6 FF E7 E7 E7 FF E7 E7 E7 FF DF DF' - 'DF FF D2 D2 D2 FF D3 D3 D3 FF DE DE DE FF E3 E3' - 'E3 FF E3 E3 E3 FF E4 E4 E4 FF E4 E4 E4 FF E4 E4' - 'E4 FF E4 E4 E4 FF E3 E3 E3 FF E3 E3 E3 FF DE DE' - 'DE FF D4 D4 D4 FF D1 D1 D1 FF DD DD DD FF E7 E7' - 'E7 FF E7 E7 E7 FF E6 E6 E6 FF E8 E8 E8 FF D4 D4' - 'D4 FF 9A 9A 9A FF 0B 0B 0B FF 00 00 00 ED 00 00' - '00 2C 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 2D 00 00' - '00 F9 1E 1E 1E FF AB AB AB FF E4 E4 E4 FF ED ED' - 'ED FF E7 E7 E7 FF E6 E6 E6 FF EC EC EC FF EB EB' - 'EB FF EA EA EA FF E4 E4 E4 FF E0 E0 E0 FF DF DF' - 'DF FF DF DF DF FF DD DD DD FF DC DC DC FF DC DC' - 'DC FF DD DD DD FF DF DF DF FF DF DF DF FF DF DF' - 'DF FF E2 E2 E2 FF E9 E9 E9 FF EC EC EC FF EA EA' - 'EA FF E5 E5 E5 FF EB EB EB FF EB EB EB FF D6 D6' - 'D6 FF 8A 8A 8A FF 00 00 00 FF 00 00 00 C3 00 00' - '00 17 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 09 00 00' - '00 DD 08 08 08 FF 99 99 99 FF E4 E4 E4 FF DF DF' - 'DF FF BD BD BD FF C1 C1 C1 FF D6 D6 D6 FF EC EC' - 'EC FF ED ED ED FF ED ED ED FF EE EE EE FF EE EE' - 'EE FF ED ED ED FF EC EC EC FF EB EB EB FF EB EB' - 'EB FF EC EC EC FF ED ED ED FF EE EE EE FF EE EE' - 'EE FF ED ED ED FF EE EE EE FF E4 E4 E4 FF C2 C2' - 'C2 FF BE BE BE FF D1 D1 D1 FF EC EC EC FF D4 D4' - 'D4 FF 75 75 75 FF 00 00 00 FF 00 00 00 9C 00 00' - '00 06 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 AE 00 00 00 FF 8D 8D 8D FF E0 E0 E0 FF C4 C4' - 'C4 FF B2 B2 B2 FF B8 B8 B8 FF B2 B2 B2 FF EB EB' - 'EB FF F1 F1 F1 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0' - 'F0 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0' - 'F0 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0' - 'F0 FF F0 F0 F0 FF F3 F3 F3 FF D5 D5 D5 FF B0 B0' - 'B0 FF B6 B6 B6 FF B7 B7 B7 FF EB EB EB FF CD CD' - 'CD FF 61 61 61 FF 00 00 00 FF 00 00 00 85 00 00' - '00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 80 00 00 00 FF 64 64 64 FF CE CE CE FF DD DD' - 'DD FF DC DC DC FF D5 D5 D5 FF E4 E4 E4 FF F9 F9' - 'F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9' - 'F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9' - 'F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9' - 'F9 FF F9 F9 F9 FF FA FA FA FF F2 F2 F2 FF DF DF' - 'DF FF D8 D8 D8 FF DC DC DC FF D7 D7 D7 FF B0 B0' - 'B0 FF 34 34 34 FF 00 00 00 FF 00 00 00 67 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 44 00 00 00 FF 19 19 19 FF 80 80 80 FF BE BE' - 'BE FF D3 D3 D3 FF D7 D7 D7 FF DB DB DB FF D8 D8' - 'D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8' - 'D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8' - 'D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8' - 'D8 FF D8 D8 D8 FF D8 D8 D8 FF D9 D9 D9 FF D9 D9' - 'D9 FF D7 D7 D7 FF CD CD CD FF B0 B0 B0 FF 5D 5D' - '5D FF 06 06 06 FF 00 00 00 ED 00 00 00 2B 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 02 00 00 00 9C 00 00 00 FF 0C 0C 0C FF 3D 3D' - '3D FF 49 49 49 FF 48 48 48 FF 48 48 48 FF 48 48' - '48 FF 48 48 48 FF 48 48 48 FF 48 48 48 FF 48 48' - '48 FF 48 48 48 FF 48 48 48 FF 48 48 48 FF 48 48' - '48 FF 48 48 48 FF 48 48 48 FF 48 48 48 FF 48 48' - '48 FF 48 48 48 FF 48 48 48 FF 48 48 48 FF 48 48' - '48 FF 49 49 49 FF 49 49 49 FF 2F 2F 2F FF 02 02' - '02 FF 00 00 00 FF 00 00 00 5C 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 06 00 00 00 7F 00 00 00 F1 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 D6 00 00 00 5C 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 2C 00 00' - '00 7E 00 00 00 84 00 00 00 84 00 00 00 84 00 00' - '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' - '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' - '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' - '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' - '00 84 00 00 00 84 00 00 00 84 00 00 00 70 00 00' - '00 1A 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF' - 'F1 C7 FF FF 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 FF FF F8 07 FF FF 00 00 FF FF' - 'E0 00 00 3F 00 00 FF 00 00 00 00 7F 00 00 FC 00' - '00 00 00 1F 00 00 F8 00 00 00 00 1F 00 00 F8 00' - '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F0 00' - '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F0 00' - '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F0 00' - '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F0 00' - '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F0 00' - '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F0 00' - '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F8 00' - '00 00 00 1F 00 00 F8 00 00 00 00 1F 00 00 F8 00' - '00 00 00 1F 00 00 F8 00 00 00 00 1F 00 00 F8 00' - '00 00 00 1F 00 00 F8 00 00 00 00 1F 00 00 FC 00' - '00 00 00 3F 00 00 FC 00 00 00 00 3F 00 00 FC 00' - '00 00 00 3F 00 00 FC 00 00 00 00 3F 00 00 FC 00' - '00 00 00 3F 00 00 FC 00 00 00 00 7F 00 00 FE 00' - '00 00 00 7F 00 00 FE 00 00 00 00 7F 00 00 FE 00' - '00 00 00 7F 00 00 FE 00 00 00 00 7F 00 00 FE 00' - '00 00 00 7F 00 00 FF 00 00 00 00 7F 00 00 FF 00' - '00 00 00 FF 00 00 FF 00 00 00 00 FF 00 00 FF 00' - '00 00 01 FF 00 00 FF 80 00 00 03 FF 00 00 FF E0' - '00 00 07 FF 00 00 FF FF FF FF FF FF 00 00 28 00' - '00 00 30 00 00 00 60 00 00 00 01 00 08 00 00 00' - '00 00 00 09 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 01 01 01 00 02 02' - '02 00 05 05 05 00 06 06 06 00 07 07 07 00 08 08' - '08 00 09 09 09 00 0B 0B 0B 00 0C 0C 0C 00 13 13' - '13 00 18 18 18 00 19 19 19 00 1A 1A 1A 00 1E 1E' - '1E 00 1F 1F 1F 00 20 20 20 00 21 21 21 00 22 22' - '22 00 24 24 24 00 26 26 26 00 27 27 27 00 28 28' - '28 00 29 29 29 00 2A 2A 2A 00 2B 2B 2B 00 2C 2C' - '2C 00 2D 2D 2D 00 2E 2C 2D 00 2F 2F 2F 00 34 34' - '34 00 35 35 35 00 39 39 39 00 3B 3B 3B 00 3D 3D' - '3D 00 3F 3F 3F 00 40 40 40 00 41 41 41 00 42 42' - '42 00 47 47 47 00 48 48 48 00 49 49 49 00 4B 4B' - '4B 00 4F 4F 4F 00 53 53 53 00 56 56 56 00 58 58' - '58 00 59 59 59 00 5A 5A 5A 00 5B 5B 5B 00 5D 5D' - '5D 00 5F 5F 5F 00 61 61 61 00 63 63 63 00 64 64' - '64 00 66 66 66 00 67 67 67 00 68 68 68 00 6A 6A' - '6A 00 6B 6B 6B 00 6C 6C 6C 00 70 70 70 00 71 71' - '71 00 72 72 72 00 73 73 73 00 74 74 74 00 75 75' - '75 00 76 76 76 00 77 77 77 00 78 78 78 00 79 79' - '79 00 7A 7A 7A 00 7C 7C 7C 00 7D 7D 7D 00 7E 7E' - '7E 00 7F 7F 7F 00 2F 99 64 00 1C A8 60 00 0A BF' - '61 00 20 A8 63 00 51 A7 7C 00 17 CE 71 00 00 00' - 'FF 00 80 80 80 00 81 81 81 00 83 83 83 00 84 83' - '84 00 85 85 85 00 87 87 87 00 88 88 88 00 8A 8A' - '8A 00 8C 8C 8C 00 8D 8D 8D 00 8E 8E 8E 00 8F 8F' - '8F 00 90 90 90 00 92 92 92 00 93 93 93 00 94 94' - '94 00 97 97 97 00 98 98 98 00 99 99 99 00 9A 9A' - '9A 00 9C 9C 9C 00 9D 9D 9D 00 9F 9F 9F 00 83 AB' - '97 00 96 AB A0 00 90 AF A0 00 99 AC A2 00 95 B2' - 'A3 00 9D B3 A8 00 A0 A0 A0 00 A1 A1 A1 00 A2 A2' - 'A2 00 A3 A3 A3 00 A4 A4 A4 00 A5 A5 A5 00 A6 A6' - 'A6 00 A7 A7 A7 00 A8 A8 A8 00 A9 A9 A9 00 AA AA' - 'AA 00 AB AB AB 00 AD A8 AB 00 AB AC AC 00 AC AC' - 'AC 00 AD AD AD 00 AE AE AE 00 AF AF AF 00 B0 B0' - 'B0 00 B1 B1 B1 00 B2 B2 B2 00 B3 B3 B3 00 B3 B4' - 'B3 00 B5 B5 B5 00 B6 B6 B6 00 B7 B7 B7 00 B8 B4' - 'B6 00 B8 B8 B8 00 B9 B9 B9 00 BA BA BA 00 BB BB' - 'BB 00 BF BB BD 00 BC BC BC 00 BD BD BD 00 BE BE' - 'BE 00 BF BF BF 00 91 D6 B4 00 91 D8 B5 00 C3 BD' - 'C0 00 C2 BE C0 00 C7 BF C3 00 C0 C0 C0 00 C1 C1' - 'C1 00 C2 C2 C2 00 C3 C3 C3 00 C4 C1 C3 00 C4 C3' - 'C3 00 C4 C3 C4 00 C6 C2 C4 00 C6 C3 C4 00 C6 C3' - 'C5 00 C4 C4 C4 00 C5 C4 C4 00 C5 C5 C5 00 C7 C4' - 'C5 00 C6 C6 C6 00 C7 C7 C7 00 C8 C8 C8 00 C8 C9' - 'C9 00 C9 C9 C9 00 CA CA CA 00 CB CB CB 00 CC CC' - 'CC 00 CD CD CD 00 CE CE CE 00 CF CF CF 00 D0 D0' - 'D0 00 D1 D1 D1 00 D2 D2 D2 00 D3 D3 D3 00 D4 D4' - 'D4 00 D5 D5 D5 00 D6 D6 D6 00 D7 D7 D7 00 D8 D8' - 'D8 00 D9 D9 D9 00 DA DA DA 00 DB DB DB 00 DC DC' - 'DC 00 DD DD DD 00 DE DE DE 00 DF DF DF 00 E0 E0' - 'E0 00 E1 E1 E1 00 E2 E2 E2 00 E3 E3 E3 00 E4 E4' - 'E4 00 E5 E5 E5 00 E6 E6 E6 00 E7 E7 E7 00 E8 E8' - 'E8 00 E9 E9 E9 00 EA EA EA 00 EB EB EB 00 EC EC' - 'EC 00 ED ED ED 00 EE EE EE 00 EF EF EF 00 F0 F0' - 'F0 00 F1 F1 F1 00 F2 F2 F2 00 F3 F3 F3 00 F4 F4' - 'F4 00 F5 F5 F5 00 F6 F6 F6 00 F7 F7 F7 00 F8 F8' - 'F8 00 F9 F9 F9 00 FA FA FA 00 FC FC FC 00 FF FF' - 'FF 00 00 00 00 00 10 DA 4B 00 F8 0F 0D 01 71 CC' - '43 00 F8 0F 0D 01 40 E3 0C 01 A4 1A 95 00 2C A3' - 'AF 00 C4 F5 AF 00 03 00 00 00 40 E3 0C 01 2F 0C' - '00 00 B8 10 0D 01 30 00 00 00 00 00 00 00 40 00' - '00 00 F8 0F 0D 01 C0 00 00 00 30 00 00 00 00 09' - '00 00 00 24 00 00 00 00 00 00 00 00 00 00 30 00' - '00 00 30 00 00 00 28 00 00 00 30 00 00 00 60 00' - '00 00 01 00 20 00 00 00 00 00 00 24 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 52 52 DF 00 00 00' - '52 52 DF 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 52 52 52 DF 00 52' - '52 52 DF 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 DF DF DF DF DF DF DF DF DF DF' - 'DF DF DF DF DF DF DF DF DF DF DF 52 52 52 52 52' - '52 DF DF DF DF DF DF DF DF DF DF DF DF DF DF DF' - 'DF DF DF DF DF DF 53 53 53 53 53 53 53 53 53 53' - '53 53 53 53 53 53 53 53 53 53 53 53 52 52 52 52' - '53 53 53 53 53 53 53 53 53 53 53 53 53 53 53 53' - '53 53 53 53 53 53 99 99 99 99 99 99 99 99 99 99' - '99 99 99 99 99 99 99 99 99 99 99 99 52 52 52 52' - '99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99' - '99 99 99 99 99 99 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 52 52 52 52 52' - '52 DF 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 52 52 52 99 99 52' - '52 52 DF 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 52 52 00 99 99 DF' - '52 52 DF 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 DF DF DF DF' - 'DF DF DF DF DF DF DF DF DF DF DF DF DF DF DF DF' - 'DF DF DF DF DF DF DF DF DF DF DF DF DF DF DF 00' - '00 00 00 00 00 00 00 00 00 00 00 DF DF DF DF 11' - '1A 19 1A 19 19 19 19 19 19 19 19 19 19 19 18 18' - '18 18 18 18 18 18 18 19 19 19 1C 1C 0A DF DF DF' - '00 00 00 00 00 00 00 00 00 00 00 DF DF 14 5F AC' - 'AF AD B0 AF AE AD AB A8 A7 A5 A3 9C 9B 9B 9C 99' - '9A 93 93 90 91 8D 8E 87 86 8A 7F 7D 7C 35 07 DF' - 'DF 00 00 00 00 00 00 00 00 00 DF DF 01 5A CD CA' - 'C9 B7 57 59 60 64 72 7F 8D 99 9C A7 AD AC AC B8' - 'AC B5 AD B9 AE B6 A8 AA A0 6F 4F 4D 6C 8F 2B DF' - 'DF 00 00 00 00 00 00 00 00 00 DF DF 0C A8 CE C4' - 'C8 AD 21 23 2D 3F 58 60 68 75 78 7E 89 79 67 91' - '65 89 71 9C 73 91 64 A4 98 50 51 4E 4C 96 56 01' - 'DF 00 00 00 00 00 00 00 00 00 DF DF 17 B3 CC C6' - 'C9 AF 27 33 46 58 5E 63 70 77 7A 80 8C 74 5F 8B' - '5A 81 62 93 63 89 59 9E A2 6E 94 95 6A 9D 5D 01' - 'DF 00 00 00 00 00 00 00 00 00 DF DF 16 B3 CE C8' - 'C9 B3 39 41 4A 57 5D 63 70 77 7A 80 8D 69 55 85' - '48 78 58 8E 5A 84 46 9B A3 A1 6D 6B 97 A3 5C 01' - 'DF 00 00 00 00 00 00 00 00 00 DF DF 16 B3 D0 C9' - 'CA B8 3D 3E 49 57 5D 63 70 77 7A 80 8E 64 40 7F' - '3A 70 45 89 48 7B 38 9B A7 9F A6 A0 93 A5 5C 01' - 'DF 00 00 00 00 00 00 00 00 00 DF DF 15 B3 D1 CB' - 'CD B8 3A 3C 45 54 5A 61 67 73 76 7B 8C 5F 37 75' - '31 64 3B 83 3D 74 2E 9A A9 A5 9C 9B 9A A7 5D 01' - 'DF 00 00 00 00 00 00 00 00 00 DF DF 15 B4 D4 CD' - 'CC C1 77 77 7B 80 82 85 88 8C 8C 8D 91 89 83 92' - '81 8D 83 92 82 8D 7B A5 A9 A7 A3 9C 9B AB 5D DF' - 'DF 00 00 00 00 00 00 00 00 00 DF DF 14 B5 D5 CD' - 'CD CC CF CD CB CA C8 C6 C4 C3 C1 C0 BD BD BE BA' - 'BB B8 B8 B4 B4 B1 B2 AD AC AB A8 A3 99 AC 5D DF' - 'DF 00 00 00 00 00 00 00 00 00 DF DF 14 B5 D9 DA' - 'D8 D8 D8 D7 D7 D6 D6 D5 D5 D5 D4 D4 D3 D3 D3 D2' - 'D2 D2 D1 D1 D0 D0 CF CF CF CE CE CD C2 B2 5C DF' - 'DF 00 00 00 00 00 00 00 00 00 DF DF 13 B8 DE CB' - 'C3 C4 C4 C2 C1 C1 C1 C1 C1 C2 C2 C2 C2 C2 C2 C2' - 'C2 C2 C2 C2 C2 C2 C2 C2 C4 C5 C5 C5 DA D1 5B DF' - 'DF 00 00 00 00 00 00 00 00 00 DF DF 13 C0 DA BB' - 'A3 8E 93 BA BC BB BB BB BB BB BB BB BB BB BB BB' - 'BB BB BB BB BB BB BB BD B1 90 8E B3 C0 DE 66 DF' - 'DF 00 00 00 00 00 00 00 00 00 DF DF 0F BC D5 A7' - '79 89 82 9C BC BA BA BA BA BA B9 B9 B9 B9 B9 B9' - 'B9 B9 BA BA BA BA BB B4 78 88 83 87 BA DD 67 DF' - 'DF 00 00 00 00 00 00 00 00 00 DF DF 03 9B D8 90' - '84 9C 7B 8E BA B7 B7 B7 B6 B5 B5 B7 B9 BA BA B9' - 'B7 B5 B5 B5 B6 B7 B9 AB 76 9C 85 7F B8 D7 43 DF' - 'DF 00 00 00 00 00 00 00 00 00 00 DF DF 74 D6 B1' - 'A5 B4 93 AB B5 B4 B2 B5 BF C3 C5 C8 CC CF CF CD' - 'C9 C6 C4 C0 B6 B2 B4 B5 A5 B2 9B 93 BB CA 2D DF' - 'DF 00 00 00 00 00 00 00 00 00 00 DF DF 4A D1 B3' - 'B1 AD B1 B3 B0 B1 C1 D2 CE C3 C0 BF BE BD BD BE' - 'BF C0 C3 CE D3 C3 B3 B0 B2 AD B0 B3 BB B6 23 DF' - 'DF 00 00 00 00 00 00 00 00 00 00 DF DF 2F CB B2' - 'AF AF AF AC B8 CF C8 BE B6 B7 B8 B8 B8 B8 B8 B8' - 'B8 B8 B7 B7 BD C6 CF BC AC AF AF AD C1 8B 12 DF' - 'DF 00 00 00 00 00 00 00 00 00 00 DF DF 24 B9 B4' - 'AC AD AC B6 CB BE B2 B3 B4 B4 B4 B4 B4 B4 B4 B4' - 'B4 B4 B4 B4 B3 B2 BA CC BA AB AC AB C2 70 06 DF' - 'DF 00 00 00 00 00 00 00 00 00 00 DF DF 12 89 BD' - 'AC AD B0 C6 B6 B1 B3 B2 B2 B2 B2 B1 AF B0 B0 B0' - 'B0 B0 B0 B0 B0 B0 AE B2 C4 B1 A8 AB C4 53 DF DF' - 'DF 00 00 00 00 00 00 00 00 00 00 DF DF 05 69 BF' - 'AE AF BD B8 B0 B2 B2 B2 B2 B2 B2 B1 AE AB AC AC' - 'AC AC AC AC AC AC AC A9 B1 BC A8 AB C4 30 DF DF' - 'DF 00 00 00 00 00 00 00 00 00 00 00 DF DF 55 BF' - 'B1 B3 BD B3 B2 B2 B2 B2 B2 B2 B2 B2 B1 AB A5 A7' - 'A7 A7 A7 A7 A7 A7 A7 A7 A8 B5 A9 AB C0 26 DF DF' - '00 00 00 00 00 00 00 00 00 00 00 00 DF DF 33 BE' - 'B3 B4 B6 B3 B3 B3 B3 B3 B3 B3 B3 B3 B3 B2 A9 9C' - '9C 9C A3 A3 A3 A3 A3 A3 A3 A8 A5 AD AE 1B DF DF' - '00 00 00 00 00 00 00 00 00 00 00 00 DF DF 25 BA' - 'B6 B4 B2 B5 B5 B5 B5 B5 B5 B5 B5 B5 B5 B5 B5 AF' - 'A8 A3 9B 9A 99 9A 9A 9A 9B 93 99 B0 84 0D DF DF' - '00 00 00 00 00 00 00 00 00 00 00 00 DF DF 1A AE' - 'B8 B7 AE B7 B8 B8 B8 B8 B8 B8 B8 B8 B8 B8 B8 B9' - 'B8 B7 B5 B1 AE AB A7 A3 9B 85 91 B2 65 07 DF DF' - '00 00 00 00 00 00 00 00 00 00 00 00 DF DF 0B 82' - 'BD BD B2 B4 BD BB BC BC BC BC BC BC BC BC BC BC' - 'BC BC BC BD BD BC BB BB B1 A5 AE AC 47 02 DF DF' - '00 00 00 00 00 00 00 00 00 00 00 00 DF DF 06 63' - 'BE C1 BE B0 B8 C0 BF BF BF BF BF BF BF BF BF BF' - 'BF BF BF BF BF BF C0 BA B0 BF BE A7 2C DF DF 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 DF DF 44' - 'B5 C4 C3 C0 B0 B9 C3 C4 C2 C2 C2 C2 C2 C2 C2 C2' - 'C2 C2 C2 C2 C3 C3 BB AF BC C5 BB 8E 20 DF DF 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 DF DF 2A' - 'AB C7 C5 C6 C3 B9 B4 BC C6 C7 C6 C6 C6 C6 C6 C6' - 'C6 C6 C7 C7 BE B4 B8 C2 C6 C8 B8 78 10 DF DF 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 DF DF 1F' - '91 C8 C8 C8 C9 C9 C1 B4 B5 C0 C5 C5 C6 C6 C6 C6' - 'C5 C5 C0 B6 B3 BF C9 C9 C8 CA B6 66 08 DF DF 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 DF DF 0E' - '7B C6 CF C9 C8 CE CD CC C6 C2 C1 C1 BF BE BE BF' - 'C1 C1 C1 C4 CB CE CC C7 CD CD B8 5A DF DF DF 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 DF DF 06' - '65 C6 C1 91 9A B8 CE CF CF D0 D0 CF CE CD CD CE' - 'CF D0 D0 CF D0 C6 9B 92 B3 CE B6 42 DF DF DF 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 DF DF' - '5C C2 A3 84 8B 84 CD D3 D2 D2 D2 D2 D2 D2 D2 D2' - 'D2 D2 D2 D2 D5 B7 82 88 89 CD AF 34 DF DF DF 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 DF DF' - '36 B0 BF BE B7 C6 DB DB DB DB DB DB DB DB DB DB' - 'DB DB DB DB DC D4 C1 BA BE B9 82 1E DF DF 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 DF DF' - '0C 53 92 B5 B9 BD BA BA BA BA BA BA BA BA BA BA' - 'BA BA BA BA BA BB BB B9 AF 82 32 04 DF DF 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 DF DF' - 'DF 09 22 29 28 28 28 28 28 28 28 28 28 28 28 28' - '28 28 28 28 28 28 28 29 29 1D 02 DF DF 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 DF' - 'DF DF DF DF DF DF DF DF DF DF DF DF DF DF DF DF' - 'DF DF DF DF DF DF DF DF DF DF DF DF 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 DF DF DF DF DF DF DF DF DF DF DF DF DF DF DF' - 'DF DF DF DF DF DF DF DF DF DF DF 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 FF FF F1 C7 FF FF 00 00 FF FF' - 'F0 87 FF FF 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF' - 'F8 0F FF FF 00 00 FF FF F0 07 FF FF 00 00 FF FF' - 'F2 07 FF FF 00 00 FC 00 00 00 00 7F 00 00 F8 00' - '00 00 00 3F 00 00 F8 00 00 00 00 1F 00 00 F0 00' - '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F0 00' - '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F0 00' - '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F0 00' - '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F0 00' - '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F0 00' - '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F0 00' - '00 00 00 1F 00 00 F8 00 00 00 00 1F 00 00 F8 00' - '00 00 00 1F 00 00 F8 00 00 00 00 1F 00 00 F8 00' - '00 00 00 1F 00 00 F8 00 00 00 00 1F 00 00 F8 00' - '00 00 00 1F 00 00 FC 00 00 00 00 3F 00 00 FC 00' - '00 00 00 3F 00 00 FC 00 00 00 00 3F 00 00 FC 00' - '00 00 00 3F 00 00 FC 00 00 00 00 3F 00 00 FC 00' - '00 00 00 7F 00 00 FE 00 00 00 00 7F 00 00 FE 00' - '00 00 00 7F 00 00 FE 00 00 00 00 7F 00 00 FE 00' - '00 00 00 7F 00 00 FE 00 00 00 00 7F 00 00 FF 00' - '00 00 00 7F 00 00 FF 00 00 00 00 FF 00 00 FF 00' - '00 00 00 FF 00 00 FF 00 00 00 01 FF 00 00 FF 80' - '00 00 03 FF 00 00 FF E0 00 00 07 FF 00 00 FF FF' - 'FF FF FF FF 00 00 28 00 00 00 10 00 00 00 20 00' - '00 00 01 00 20 00 00 00 00 00 00 04 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 24 00 00 00 30 00 00 00 30 00 00 00 30 00 00' - '00 30 00 00 00 30 00 00 00 30 00 00 FF FF 00 00' - 'FF FF 00 00 00 3C 00 00 00 30 00 00 00 30 00 00' - '00 30 00 00 00 30 00 00 00 30 00 00 00 30 C0 C0' - 'C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0' - 'C0 FF C0 C0 C0 FF C0 C0 C0 FF 00 00 FF FF 00 00' - 'FF FF C0 C0 C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0' - 'C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0 C0 FF 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 37 00 00' - '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' - '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' - '00 37 00 00 00 04 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 26 26 26 FF CD CD CD FF CD CD' - 'CD FF C9 C9 C9 FF C5 C5 C5 FF C2 C2 C2 FF C0 C0' - 'C0 FF BF BF BF FF BA BA BA FF B3 B4 B3 FF AB AC' - 'AC FF 09 09 09 FF 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 30 D1 D1 D1 FF E7 E7 E7 FF 5F 5F' - '5F FF 8F 8F 8F FF A7 A7 A7 FF B9 B9 B9 FF B8 B8' - 'B8 FF 94 94 94 FF B7 B7 B7 FF C6 C3 C5 FF 91 D8' - 'B5 FF 8E 8E 8E FF 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 33 D1 D1 D1 FF EB EB EB FF 6C 6C' - '6C FF 8A 8A 8A FF A3 A3 A3 FF B9 B9 B9 FF A5 A5' - 'A5 FF 6B 6B 6B FF A4 A4 A4 FF C8 C8 C8 FF C2 C2' - 'C2 FF 8E 8E 8E FF 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 33 D3 D3 D3 FF F6 F6 F6 FF F5 F5' - 'F5 FF F4 F4 F4 FF F3 F3 F3 FF F1 F1 F1 FF F0 F0' - 'F0 FF EF EF EF FF EE EE EE FF ED ED ED FF EB EB' - 'EB FF 8D 8D 8D FF 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 25 DA DA DA FF A9 A9 A9 FF C3 C3' - 'C3 FF D8 D8 D8 FF D8 D8 D8 FF D7 D7 D7 FF D7 D7' - 'D7 FF D8 D8 D8 FF D8 D8 D8 FF A8 A8 A8 FF B5 B5' - 'B5 FF 9C 9C 9C FF 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 7E 7E 7E FF CF CF CF FF D1 D1' - 'D1 FF DF DF DF FF E1 E1 E1 FF DC DC DC FF DC DC' - 'DC FF E1 E1 E1 FF E1 E1 E1 FF D0 D0 D0 FF D1 D1' - 'D1 FF 3F 3F 3F FF 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 22 22 22 FF CA CA CA FF E4 E4' - 'E4 FF D1 D1 D1 FF D0 D0 D0 FF CD CD CD FF CE CE' - 'CE FF CE CE CE FF CE CE CE FF E2 E2 E2 FF C9 C9' - 'C9 FF 00 00 00 FF 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 FF D1 D1 D1 FF D1 D1' - 'D1 FF D1 D1 D1 FF D1 D1 D1 FF D1 D1 D1 FF C3 C3' - 'C3 FF C4 C4 C4 FF C4 C4 C4 FF C4 C4 C4 FF CB CB' - 'CB FF 00 00 00 F8 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 D8 DB DB DB FF D2 D2' - 'D2 FF DA DA DA FF DA DA DA FF DA DA DA FF DA DA' - 'DA FF DA DA DA FF DA DA DA FF CF CF CF FF CA CA' - 'CA FF 00 00 00 B8 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 89 C9 C9 C9 FF E4 E4' - 'E4 FF D2 D2 D2 FF E5 E5 E5 FF E4 E4 E4 FF E4 E4' - 'E4 FF E5 E5 E5 FF D2 D2 D2 FF E4 E4 E4 FF A8 A8' - 'A8 FF 00 00 00 4E 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 09 99 99 99 FF BD BD' - 'BD FF EC EC EC FF EE EE EE FF EC EC EC FF EC EC' - 'EC FF EE EE EE FF E4 E4 E4 FF D1 D1 D1 FF 75 75' - '75 FF 00 00 00 06 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 19 19 19 FF D3 D3' - 'D3 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8' - 'D8 FF D8 D8 D8 FF D9 D9 D9 FF CD CD CD FF 06 06' - '06 FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' - '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 E0 03 00 00 C0 03 00 00 80 03' - '00 00 80 03 00 00 80 03 00 00 80 03 00 00 C0 03' - '00 00 C0 03 00 00 C0 03 00 00 C0 03 00 00 C0 03' - '00 00 C0 03 00 00 E0 07 00 00 F0 0F 00 00' -} */ - -/* BINRES cdrom.ico */ -11 ICON cdrom.ico -/* { - '00 00 01 00 09 00 20 20 00 00 01 00 08 00 A8 08' - '00 00 96 00 00 00 10 10 00 00 01 00 08 00 68 05' - '00 00 3E 09 00 00 20 20 00 00 01 00 20 00 A8 10' - '00 00 A6 0E 00 00 10 10 00 00 01 00 04 00 28 01' - '00 00 4E 1F 00 00 20 20 00 00 01 00 04 00 E8 02' - '00 00 76 20 00 00 10 10 00 00 01 00 20 00 68 04' - '00 00 5E 23 00 00 30 30 00 00 01 00 04 00 68 06' - '00 00 C6 27 00 00 30 30 00 00 01 00 08 00 A8 0E' - '00 00 2E 2E 00 00 30 30 00 00 01 00 20 00 A8 25' - '00 00 D6 3C 00 00 28 00 00 00 20 00 00 00 40 00' - '00 00 01 00 08 00 00 00 00 00 00 04 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 01 01 01 00 01 02 02 00 02 03 03 00 05 05' - '05 00 06 06 06 00 07 07 07 00 09 09 09 00 0B 0B' - '0B 00 10 10 10 00 13 13 13 00 18 18 18 00 1B 1C' - '1B 00 1E 1E 1E 00 22 26 23 00 23 29 24 00 24 2E' - '25 00 3B 40 3C 00 3E 40 3F 00 40 41 40 00 41 43' - '42 00 42 44 43 00 46 48 47 00 4E 50 4F 00 50 52' - '51 00 54 55 55 00 56 56 56 00 57 57 57 00 57 58' - '58 00 59 59 59 00 5A 5A 5A 00 5A 5B 5B 00 5B 5C' - '5C 00 5D 5E 5E 00 5F 68 5F 00 71 71 72 00 72 72' - '73 00 74 74 74 00 77 76 77 00 78 76 77 00 72 78' - '72 00 79 76 78 00 7A 76 78 00 7B 77 79 00 7D 78' - '7A 00 7F 78 7B 00 7F 7F 7F 00 80 7A 7D 00 81 7C' - '7F 00 0E CE 0E 00 14 C2 15 00 10 CE 10 00 6D 90' - '6D 00 82 7D 80 00 84 80 83 00 86 83 85 00 8D 8B' - '8C 00 90 8F 90 00 95 96 95 00 97 97 97 00 98 98' - '98 00 98 99 99 00 99 9A 9A 00 9B 9C 9B 00 9F A0' - '9F 00 A7 A7 A7 00 A9 A8 A9 00 AB AA AA 00 AD AC' - 'AC 00 AE AE AE 00 B1 B0 B1 00 B3 B2 B3 00 B4 B3' - 'B4 00 B6 B6 B6 00 B8 B8 B8 00 B9 B9 B9 00 BB BB' - 'BB 00 BE BE BE 00 C0 C0 C0 00 C2 C3 C2 00 C3 C3' - 'C2 00 C5 C2 C3 00 C7 C1 C4 00 C9 C3 C5 00 CA C6' - 'C7 00 CA C8 C8 00 CA C9 C9 00 CB CA CA 00 CC CB' - 'CB 00 CD CB CB 00 CD CC CC 00 CD CD CD 00 CE CE' - 'CE 00 CE CF CF 00 CF CF CF 00 D0 D0 D0 00 D1 D1' - 'D1 00 D2 D2 D2 00 D4 D3 D3 00 D4 D4 D4 00 D5 D4' - 'D4 00 D7 D4 D5 00 D6 D6 D6 00 D7 D7 D7 00 D8 D8' - 'D8 00 D9 D9 D9 00 DA DA DA 00 DB DB DB 00 DC DC' - 'DC 00 DD DD DD 00 DE DE DE 00 FB D6 D7 00 FD D4' - 'D5 00 FE D4 D6 00 FE D4 DF 00 F7 D9 DA 00 F0 DE' - 'DF 00 EA DB E2 00 FE D3 E9 00 FE D3 ED 00 FE D4' - 'EF 00 F2 DA E8 00 F9 DA EF 00 FE D4 F1 00 FE D5' - 'F4 00 FE D6 F6 00 FC DB F4 00 FE D8 F9 00 FE DB' - 'F9 00 FE DC F8 00 E1 E0 E0 00 E7 E5 E6 00 E7 E6' - 'E6 00 E7 E7 E7 00 EA E3 E3 00 E8 E8 E8 00 E9 E9' - 'E9 00 EA EA EA 00 EB EB EB 00 EC EC EC 00 ED ED' - 'ED 00 EF EE EE 00 F0 EE EF 00 F0 EF F0 00 F1 F0' - 'F0 00 F1 F1 F1 00 F2 F2 F2 00 F2 F3 F3 00 F3 F5' - 'F5 00 F7 F6 F8 00 FA F7 FA 00 FB FA FB 00 FC F8' - 'FC 00 00 00 00 00 FF FF FF FF 37 90 F5 77 00 00' - '00 00 3E 8A F5 77 9B B2 E7 77 B7 00 00 00 02 00' - '00 00 A4 1A 95 00 01 00 00 00 18 00 00 00 00 00' - '00 00 10 19 95 00 42 00 00 00 00 00 00 00 F4 18' - '95 00 00 00 00 00 00 00 00 00 00 00 00 00 0C 00' - '00 00 02 00 00 00 01 01 F5 77 00 EC FD 7F 54 00' - '00 00 00 00 00 00 03 00 00 00 5C 00 1A 02 40 9F' - '07 00 00 00 00 00 40 9F 07 00 05 00 00 00 BE B3' - 'E7 77 4C 19 95 00 A3 B4 E7 77 F8 00 00 00 00 00' - '00 C0 00 00 00 00 00 00 00 00 02 00 00 00 80 00' - '00 00 00 00 00 00 8C 1A 95 00 7F E9 4B 00 88 36' - '0C 01 00 00 00 C0 00 00 00 00 80 1A 95 00 02 00' - '00 00 80 00 00 00 00 00 00 00 C0 27 95 00 C4 F5' - 'AF 00 02 00 00 00 44 3A 5C 6F 73 65 78 70 65 72' - '74 73 5C 72 65 61 63 74 6F 73 5C 6C 69 62 5C 73' - '68 65 6C 6C 33 32 5C 63 64 72 6F 6D 2E 69 63 6F' - '00 00 1A 93 4B 00 14 1A 95 00 1F 3B D4 77 15 00' - '00 00 A8 00 00 00 4F 3B D4 77 E0 19 95 00 33 3B' - 'D4 77 64 C5 F5 77 A9 F1 E7 77 F8 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 1A 95 00 B0 6C' - '38 00 96 00 00 00 00 00 00 00 C9 F1 E7 77 96 00' - '00 00 A4 1A 95 00 09 00 00 00 00 00 00 00 96 00' - '00 00 96 00 00 00 09 00 00 00 F4 19 95 00 33 3B' - 'D4 77 B4 1A 95 00 09 48 E9 77 B8 10 E9 77 FF FF' - 'FF FF C9 F1 E7 77 16 EA 4B 00 F8 00 00 00 B0 6C' - '38 00 96 00 00 00 58 1A 95 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 99 99 0D 09 08 0C 99 99 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 99 21 11 45 4C 5D 55 21 14 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 99 23 4D 97 7F 7F 76 71 72 74 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 99 23 75 80 7B 7B 72 71 71 71 94 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 10 28 98 7C 78 7B 72 71 71 6F 94 92 00 00' - '99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99' - '99 10 1F 59 7D 78 78 7B 71 71 6F 93 92 92 00 99' - '08 15 19 17 21 23 1F 1D 1D 1E 1E 1D 1D 1C 1C 1F' - '1F 12 40 81 78 78 78 7B 71 71 8E 91 92 92 99 99' - '37 6A 82 83 50 32 98 8B 84 82 67 64 64 64 61 63' - '1B 17 75 7C 78 7B 78 78 7B 7F 7F 7B 93 92 99 03' - '65 94 89 81 31 31 33 79 5C 5E 5A 5B 5B 5B 67 24' - '0E 23 97 7A 92 77 7B 78 7F 53 6F 7F 8E 8F 99 07' - '83 8D 89 98 34 31 41 52 4E 4E 4E 4E 4E 4E 50 4E' - '2F 27 97 93 93 8C 7A 7F 48 40 23 70 7E 90 99 05' - '92 8B 93 3A 2B 38 2A 25 25 25 25 25 25 25 25 26' - '23 3A 97 92 92 93 92 7E 10 00 00 3A 81 93 99 04' - '92 8F 91 44 39 3A 3F 3F 3F 3F 3F 3D 3C 3C 3C 3E' - '35 40 97 92 92 93 76 7E 11 99 00 52 7E 8D 99 03' - '90 8F 89 90 8A 89 87 86 82 82 82 82 82 82 82 83' - '47 3D 97 92 92 93 8E 7C 53 38 52 81 7E 76 99 02' - '96 96 8A 8D 88 87 87 87 88 88 87 87 87 87 85 8B' - '4B 23 97 92 92 92 8F 8D 7F 81 7F 7F 77 7B 99 01' - '97 82 46 46 66 68 67 67 67 67 66 66 66 67 67 6A' - '50 22 95 93 92 92 92 94 72 71 71 76 7B 78 99 99' - '94 5F 44 44 51 69 66 64 63 63 67 68 66 63 63 64' - '82 23 49 97 92 92 92 94 6F 71 71 76 7B 78 00 99' - '55 86 58 55 5C 5F 60 60 61 64 63 63 63 64 5F 62' - '62 84 20 65 94 92 92 71 71 71 71 76 78 78 00 99' - '3F 86 5A 5C 5B 60 63 63 64 66 66 66 66 66 64 68' - '82 68 3B 2D 97 95 6F 71 71 71 77 7B 7B 7C 00 99' - '22 82 55 56 64 61 60 60 60 5F 61 60 60 61 60 5F' - '5C 62 69 3A 38 73 6F 71 71 77 7B 7B 81 75 00 99' - '11 6C 57 5F 62 5F 5F 5E 5E 5F 62 60 62 62 62 62' - '60 62 5C 5B 39 36 57 72 81 81 98 98 48 3A 00 99' - '0B 57 62 61 60 5E 5F 5F 5F 5E 5E 62 62 62 62 62' - '62 62 66 4D 4A 0C 02 13 19 18 16 15 99 00 00 99' - '08 4A 66 61 61 60 60 60 60 60 61 61 61 61 61 61' - '61 61 64 4C 48 0F 99 00 00 00 00 00 00 00 00 99' - '99 3A 82 66 67 67 67 67 67 67 67 67 63 64 64 64' - '63 64 5E 54 5A 10 99 00 00 00 00 00 00 00 00 99' - '99 23 8A 6D 6E 6D 6B 6B 6B 6B 6B 6B 6C 6D 6D 6C' - '6E 83 84 6E 46 0A 99 00 00 00 00 00 00 00 00 00' - '99 11 84 86 82 82 82 82 86 82 82 82 82 82 82 82' - '83 85 84 83 38 02 99 00 00 00 00 00 00 00 00 00' - '99 0B 82 87 85 88 8B 8A 8A 87 88 88 88 88 87 84' - '85 87 85 84 23 99 99 00 00 00 00 00 00 00 00 00' - '99 99 56 90 69 83 8B 8B 8A 8A 8A 89 8A 8B 8B 8B' - '87 69 89 8B 17 99 99 00 00 00 00 00 00 00 00 00' - '99 99 4F 6B 43 45 92 8F 8F 8F 8F 8D 8F 8F 8F 94' - '54 42 5A 92 12 99 99 00 00 00 00 00 00 00 00 00' - '00 99 24 6E 88 8B 97 97 97 97 97 97 97 97 97 97' - '95 87 83 4C 06 99 00 00 00 00 00 00 00 00 00 00' - '00 99 07 1A 30 2C 29 29 29 29 29 29 29 29 29 29' - '2B 2F 23 10 99 99 00 00 00 00 00 00 00 00 00 00' - '00 00 99 99 99 99 99 99 99 99 99 99 99 99 99 99' - '99 99 99 99 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF' - 'FF 00 FF FF FE 00 FF FF FC 00 FF FF F8 00 FF FF' - 'F0 00 C0 00 00 00 80 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 18 00 00 00 08 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 00' - '00 00 80 00 00 00 80 00 00 00 80 00 00 00 80 00' - '00 01 80 00 00 7F 80 00 00 7F 80 00 00 7F C0 00' - '00 7F C0 00 00 7F C0 00 00 7F C0 00 00 7F E0 00' - '00 FF E0 00 00 FF F0 00 03 FF FF FF FF FF 28 00' - '00 00 10 00 00 00 20 00 00 00 01 00 08 00 00 00' - '00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 05 05 05 00 0C 0F' - '0F 00 0D 11 0E 00 15 15 15 00 36 36 36 00 39 39' - '39 00 40 43 41 00 44 47 45 00 53 53 53 00 5B 60' - '5D 00 67 68 68 00 64 6A 69 00 69 69 69 00 6B 6C' - '6B 00 6E 6E 6E 00 6F 6E 6E 00 6F 70 70 00 72 72' - '72 00 7D 7D 7D 00 7E 7E 7E 00 7F 7F 7F 00 00 FF' - '00 00 75 99 75 00 88 6C 88 00 84 7E 84 00 8B 7E' - '82 00 80 80 80 00 84 84 84 00 93 93 93 00 97 97' - '97 00 9A 98 98 00 9B 9B 9B 00 9D 9D 9D 00 9F 9F' - '9F 00 A0 A0 A0 00 A5 A5 A5 00 A6 A6 A6 00 A8 A2' - 'A8 00 B8 AC B8 00 BB BB BB 00 A6 D4 A6 00 D8 AE' - 'C6 00 CB BD C9 00 C0 C0 C0 00 C2 C2 C2 00 C2 C3' - 'C3 00 C3 C3 C3 00 C8 C8 C8 00 C9 C9 C9 00 CE CE' - 'CE 00 CF CF CF 00 D3 C2 CD 00 D0 D0 D0 00 D1 D1' - 'D1 00 D2 D2 D2 00 D3 D3 D3 00 D6 D0 D6 00 D4 D4' - 'D4 00 D5 D5 D5 00 D6 D6 D6 00 D7 D7 D7 00 D8 D8' - 'D8 00 D9 D9 D9 00 DA DA DA 00 DB DB DB 00 DC DC' - 'DC 00 DE DE DE 00 FF D2 CD 00 FF D2 CE 00 E2 C2' - 'DA 00 FF D8 D7 00 FF D4 D8 00 FA DD DA 00 FD DC' - 'DC 00 FF DE DF 00 F4 D7 EA 00 FF D3 E8 00 FF D6' - 'E8 00 FF D7 EF 00 FF D3 F1 00 FF D3 F2 00 FF D3' - 'F3 00 FF D4 F5 00 FF D7 F7 00 FF D9 F7 00 FD D9' - 'FB 00 E1 E1 E1 00 E3 E4 E3 00 E4 E4 E4 00 E5 E5' - 'E5 00 E6 E6 E6 00 E8 E8 E8 00 E9 E9 E9 00 EA EA' - 'EA 00 EA EB EB 00 EB EB EB 00 ED ED ED 00 FF E3' - 'E1 00 F5 EA EF 00 FF EF EF 00 FD E7 F4 00 FB ED' - 'F4 00 FE E7 FA 00 FF E2 FF 00 FF E9 FF 00 FF ED' - 'FE 00 FF EE FF 00 EE F9 F7 00 F1 F1 F1 00 F1 F3' - 'F2 00 F2 F2 F2 00 F3 F3 F3 00 F0 F5 F2 00 F0 F6' - 'F3 00 F0 F7 F7 00 F4 F4 F4 00 F5 F5 F5 00 F6 F6' - 'F6 00 FF F0 FF 00 FF F3 FF 00 FF F6 FF 00 F9 F9' - 'F9 00 FA FA FA 00 FB FB FB 00 FC FC FC 00 FD FD' - 'FD 00 FF FD FE 00 FE FE FE 00 FF FF FF 00 00 00' - '00 00 E7 E5 E6 00 E7 E6 E6 00 E7 E7 E7 00 EA E3' - 'E3 00 E8 E8 E8 00 E9 E9 E9 00 EA EA EA 00 EB EB' - 'EB 00 EC EC EC 00 ED ED ED 00 EF EE EE 00 F0 EE' - 'EF 00 F0 EF F0 00 F1 F0 F0 00 F1 F1 F1 00 F2 F2' - 'F2 00 F2 F3 F3 00 F3 F5 F5 00 F7 F6 F8 00 FA F7' - 'FA 00 FB FA FB 00 FC F8 FC 00 00 00 00 00 FF FF' - 'FF FF 37 90 F5 77 00 00 00 00 3E 8A F5 77 9B B2' - 'E7 77 B7 00 00 00 02 00 00 00 A4 1A 95 00 01 00' - '00 00 18 00 00 00 00 00 00 00 10 19 95 00 42 00' - '00 00 00 00 00 00 F4 18 95 00 00 00 00 00 00 00' - '00 00 00 00 00 00 0C 00 00 00 02 00 00 00 01 01' - 'F5 77 00 EC FD 7F 54 00 00 00 00 00 00 00 03 00' - '00 00 5C 00 1A 02 40 9F 07 00 00 00 00 00 40 9F' - '07 00 05 00 00 00 BE B3 E7 77 4C 19 95 00 A3 B4' - 'E7 77 F8 00 00 00 00 00 00 C0 00 00 00 00 00 00' - '00 00 02 00 00 00 80 00 00 00 00 00 00 00 8C 1A' - '95 00 7F E9 4B 00 88 36 0C 01 00 00 00 C0 00 00' - '00 00 80 1A 95 00 02 00 00 00 80 00 00 00 00 00' - '00 00 C0 27 95 00 C4 F5 AF 00 02 00 00 00 44 3A' - '5C 6F 73 65 78 70 65 72 74 73 5C 72 65 61 63 74' - '6F 73 5C 6C 69 62 5C 73 68 65 6C 6C 33 32 5C 63' - '64 72 6F 6D 2E 69 63 6F 00 00 1A 93 4B 00 14 1A' - '95 00 1F 3B D4 77 15 00 00 00 A8 00 00 00 4F 3B' - 'D4 77 E0 19 95 00 33 3B D4 77 64 C5 F5 77 A9 F1' - 'E7 77 F8 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 1A 95 00 B0 6C 38 00 96 00 00 00 00 00' - '00 00 C9 F1 E7 77 96 00 00 00 A4 1A 95 00 09 00' - '00 00 00 00 00 00 96 00 00 00 96 00 00 00 09 00' - '00 00 F4 19 95 00 33 3B D4 77 B4 1A 95 00 09 48' - 'E9 77 B8 10 E9 77 FF FF FF FF C9 F1 E7 77 16 EA' - '4B 00 F8 00 00 00 B0 6C 38 00 96 00 00 00 58 1A' - '95 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 03 0A 0C 02 00 00 00 00 00 00 00 00 00 00' - '00 0E 6B 68 4B 64 00 82 82 82 82 82 82 82 82 82' - '11 77 53 45 49 73 82 10 26 17 27 25 22 21 23 08' - '4C 52 50 4E 67 71 82 7F 79 16 29 39 33 38 28 09' - '81 63 55 2B 2A 66 82 81 30 18 19 14 14 13 1B 1C' - '80 72 6A 82 07 79 82 81 74 6D 61 60 60 60 6F 1E' - '7E 6E 65 46 56 4F 82 7D 24 38 3D 3B 3D 3C 41 1D' - '5F 74 6C 47 48 51 82 3D 32 32 37 3A 3B 3B 38 58' - '1A 81 4A 44 4D 54 82 20 37 38 35 35 36 37 37 38' - '2E 1F 62 69 78 34 00 0D 43 35 35 35 36 37 37 38' - '36 0B 00 00 00 00 00 06 61 40 3E 3F 3F 3E 3E 42' - '57 12 00 00 00 00 00 01 70 5E 5C 5B 5A 5A 59 60' - '75 05 00 00 00 00 00 82 5D 31 7A 76 74 75 7B 32' - '7C 04 00 00 00 00 00 82 0F 2C 2F 2D 2D 2D 2D 2C' - '1E 82 00 00 00 00 00 00 82 82 82 82 82 82 82 82' - '82 00 00 00 00 00 FF F0 00 00 FF E0 00 00 80 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 0F' - '00 00 80 0F 00 00 80 0F 00 00 80 0F 00 00 80 0F' - '00 00 C0 1F 00 00 28 00 00 00 20 00 00 00 40 00' - '00 00 01 00 20 00 00 00 00 00 00 10 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 0C 00 00 00 30 00 00 00 48 00 00 00 90 00 00' - '00 90 00 00 00 90 00 00 00 78 00 00 00 30 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 3C 86 86' - '86 FF 7A 7A 7A FF AA AA AA FF DA DA DA FF F2 F2' - 'F2 FF CE CE CE FF AA AA AA FF 6E 6E 6E FF 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 0C 7A 7A 7A FF 80 80' - '80 FF FF FF FF FF FF D4 F0 FF FF D4 F0 FF FF D4' - 'F0 FF FF D4 D4 FF FF D4 D4 FF C0 C0 C0 FF 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 09 00 00' - '00 13 00 00 00 78 6E 6E 6E FF FF D4 F0 FF FF D4' - 'F0 FF FF D4 F0 FF FF D4 F0 FF FF D4 D4 FF FF D4' - 'D4 FF FF D4 D4 FF FF D4 D4 FF F2 F2 F2 FF 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 56 62 62 62 FF E6 E6 E6 FF FF D4 F0 FF FF D4' - 'F0 FF FF D4 F0 FF FF D4 F0 FF FF D4 D4 FF FF D4' - 'D4 FF FF D4 D4 FF F2 F2 F2 FF F2 F2 F2 FF 00 00' - '00 00 00 00 00 05 00 00 00 69 00 00 00 F7 00 00' - '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' - '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' - '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' - '00 F7 00 00 00 F7 00 00 00 F7 62 62 62 FF 56 56' - '56 FF FF D4 F0 FF FF D4 F0 FF FF D4 F0 FF FF D4' - 'F0 FF FF D4 F0 FF FF D4 D4 FF FF D4 D4 FF FF D4' - 'D4 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2 F2 FF 00 00' - '00 00 00 00 00 9B 00 00 00 FF 21 21 21 FF 2C 2C' - '2C FF 2C 2C 2C FF 2B 2B 2B FF 2B 2B 2B FF 2B 2B' - '2B FF 2B 2B 2B FF 2B 2B 2B FF 2B 2B 2B FF 2B 2B' - '2B FF 2A 2A 2A FF 2A 2A 2A FF 2A 2A 2A FF 2A 2A' - '2A FF 2A 2A 2A FF 2A 2A 2A FF 4A 4A 4A FF 62 62' - '62 FF FF D4 F0 FF FF D4 F0 FF FF D4 F0 FF FF D4' - 'F0 FF FF D4 F0 FF FF D4 D4 FF FF D4 D4 FF F2 F2' - 'F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2 F2 FF 00 00' - '00 03 01 01 01 FF 8A 8A 8A FF EB EB EB FF E8 E8' - 'E8 FF E8 E8 E8 FF D4 D4 D4 FF 00 C0 00 FF E7 E7' - 'E7 FF E8 E8 E8 FF E3 E3 E3 FF D8 D8 D8 FF D2 D2' - 'D2 FF CD CD CD FF CD CD CD FF CD CD CD FF C8 C9' - 'C9 FF AA AA AA FF 2E 2E 2E FF 62 62 62 FF DA DA' - 'DA FF FF D4 F0 FF FF D4 F0 FF FF D4 F0 FF FF D4' - 'F0 FF FF D4 F0 FF FF D4 FF FF FF D4 FF FF FF D4' - 'FF FF FF D4 F0 FF F2 F2 F2 FF F2 F2 F2 FF 00 00' - '00 15 19 19 19 FF AD A8 AB FF EB EB EB FF E8 E8' - 'E8 FF E8 E8 E8 FF 00 FF 00 FF 00 FF 00 FF 00 C0' - '00 FF DF DF DF FF D5 D5 D5 FF D2 D2 D2 FF CB CB' - 'CB FF CD CD CD FF CD CD CD FF CD CD CD FF CD CD' - 'CD FF 40 40 40 FF 2E 2E 2E FF 7A 7A 7A FF F2 F2' - 'F2 FF FF D4 E3 FF F2 F2 F2 FF FF D4 F0 FF FF D4' - 'F0 FF FF D4 F0 FF FF D4 FF FF FF D4 E3 FF FF D4' - 'E3 FF FF D4 FF FF F2 F2 F2 FF F2 F2 F2 FF 00 00' - '00 34 28 28 28 FF D1 D1 D1 FF EB EB EB FF EB EB' - 'EB FF E8 E8 E8 FF E8 E8 E8 FF 00 FF 00 FF B5 B5' - 'B5 FF B6 B6 B6 FF B6 B6 B6 FF B6 B6 B6 FF B6 B6' - 'B6 FF B6 B6 B6 FF B6 B6 B6 FF B6 B6 B6 FF B6 B6' - 'B6 FF B6 B6 B6 FF B6 B6 B6 FF A4 A0 A0 FF F2 F2' - 'F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2' - 'F2 FF FF D4 F0 FF B6 B6 B6 FF AA AA AA FF 62 62' - '62 FF FF D4 E3 FF FF D4 F0 FF F2 F2 F2 FF 00 00' - '00 33 28 28 28 FF D1 D1 D1 FF E8 E8 E8 FF EB EB' - 'EB FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' - '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' - '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' - '80 FF 80 80 80 FF 80 80 80 FF B6 B6 B6 FF F2 F2' - 'F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2' - 'F2 FF FF D4 E3 FF 6E 6E 6E FF 00 00 00 00 00 00' - '00 00 B6 B6 B6 FF FF D4 F0 FF F2 F2 F2 FF 00 00' - '00 33 27 27 27 FF D2 D2 D2 FF EA EA EA FF EB EB' - 'EB FF A7 A7 A7 FF A7 A7 A7 FF AB AB AB FF AE AE' - 'AE FF AF AF AF FF AF AF AF FF AF AF AF FF AF AF' - 'AF FF AB AB AB FF AB AB AB FF AB AB AB FF AB AB' - 'AB FF AB AB AB FF AB AB AB FF CE CE CE FF F2 F2' - 'F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2 F2 FF FF D4' - 'E3 FF FF D4 E3 FF 80 80 80 FF 00 00 00 78 00 00' - '00 00 FF D4 F0 FF FF D4 F0 FF F2 F2 F2 FF 00 00' - '00 33 26 26 26 FF D3 D3 D3 FF E8 E8 E8 FF E6 E6' - 'E6 FF E2 E2 E2 FF DB DB DB FF D8 D8 D8 FF D9 D9' - 'D9 FF D2 D2 D2 FF CF CF CF FF D0 D0 D0 FF D0 D0' - 'D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0' - 'D0 FF D0 D0 D0 FF D0 D0 D0 FF CE CE CE FF F2 F2' - 'F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2' - 'F2 FF FF D4 F0 FF C0 C0 C0 FF 62 62 62 FF 80 80' - '80 FF FF D4 F0 FF FF D4 F0 FF FF D4 E3 FF 00 00' - '00 33 24 24 24 FF D6 D6 D6 FF E9 E9 E9 FF E1 E1' - 'E1 FF E2 E2 E2 FF E0 E0 E0 FF DF DF DF FF DF DF' - 'DF FF DF DF DF FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' - 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' - 'E0 FF E0 E0 E0 FF E0 E0 E0 FF 92 92 92 FF F2 F2' - 'F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2' - 'F2 FF F2 F2 F2 FF FF D4 FF FF FF D4 FF FF FF D4' - 'FF FF FF D4 F0 FF FF D4 F0 FF FF D4 F0 FF 00 00' - '00 34 24 24 24 FF DE DE DE FF D9 D9 D9 FF C4 C4' - 'C4 FF BF BF BF FF D8 D8 D8 FF D9 D9 D9 FF D9 D9' - 'D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9' - 'D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9' - 'D9 FF D9 D9 D9 FF D9 D9 D9 FF 7A 7A 7A FF F2 F2' - 'F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2' - 'F2 FF F2 F2 F2 FF FF D4 E3 FF FF D4 D4 FF FF D4' - 'D4 FF FF D4 F0 FF FF D4 F0 FF FF D4 F0 FF 00 00' - '00 07 05 05 05 FF C2 C2 C2 FF BC BC BC FF B2 B2' - 'B2 FF AB AB AB FF BB BB BB FF D5 D5 D5 FF D5 D5' - 'D5 FF D4 D4 D4 FF D3 D3 D3 FF D5 D5 D5 FF D7 D7' - 'D7 FF D8 D8 D8 FF D7 D7 D7 FF D3 D3 D3 FF D3 D3' - 'D3 FF D4 D4 D4 FF D5 D5 D5 FF 62 62 62 FF 86 86' - '86 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2' - 'F2 FF F2 F2 F2 FF FF D4 D4 FF FF D4 D4 FF FF D4' - 'D4 FF FF D4 F0 FF FF D4 F0 FF FF D4 F0 FF 00 00' - '00 00 00 00 00 FF A4 A4 A4 FF CF CF CF FF C5 C5' - 'C5 FF BF BF BF FF C9 C9 C9 FF D2 D2 D2 FF D0 D0' - 'D0 FF D0 D0 D0 FF D0 D0 D0 FF D5 D5 D5 FF D5 D5' - 'D5 FF D5 D5 D5 FF D5 D5 D5 FF D5 D5 D5 FF D0 D0' - 'D0 FF D4 D4 D4 FF D0 D0 D0 FF D3 D3 D3 FF 62 62' - '62 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2' - 'F2 FF FF D4 D4 FF FF D4 D4 FF FF D4 D4 FF FF D4' - 'D4 FF FF D4 F0 FF FF D4 F0 FF FF D4 F0 FF 00 00' - '00 00 00 00 00 FF 59 59 59 FF D0 D0 D0 FF CD CD' - 'CD FF CD CD CD FF CA CA CA FF D3 D3 D3 FF D3 D3' - 'D3 FF D4 D4 D4 FF D5 D5 D5 FF D6 D6 D6 FF D6 D6' - 'D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6 D6 FF D5 D5' - 'D5 FF DB DB DB FF E4 E4 E4 FF D3 D3 D3 FF D3 D3' - 'D3 FF 92 92 92 FF F2 F2 F2 FF F2 F2 F2 FF FF D4' - 'D4 FF FF D4 D4 FF FF D4 D4 FF FF D4 D4 FF FF D4' - 'F0 FF FF D4 F0 FF FF D4 F0 FF FF D4 F0 FF 00 00' - '00 00 00 00 00 FE 40 40 40 FF D2 D2 D2 FF CA CA' - 'CA FF CA CA CA FF D4 D4 D4 FF D3 D3 D3 FF D3 D3' - 'D3 FF D2 D2 D2 FF D2 D2 D2 FF D2 D2 D2 FF D2 D2' - 'D2 FF D3 D3 D3 FF D2 D2 D2 FF D3 D3 D3 FF D2 D2' - 'D2 FF D1 D1 D1 FF D0 D0 D0 FF D3 D3 D3 FF D3 D3' - 'D3 FF 6E 6E 6E FF 92 92 92 FF FF D4 D4 FF FF D4' - 'D4 FF FF D4 D4 FF FF D4 D4 FF FF D4 F0 FF FF D4' - 'F0 FF FF D4 F0 FF FF D4 F0 FF FF D4 F0 FF 00 00' - '00 00 00 00 00 E1 07 07 07 FF DD DD DD FF CC CC' - 'CC FF D3 D3 D3 FF D3 D3 D3 FF D0 D0 D0 FF D0 D0' - 'D0 FF D0 D0 D0 FF D0 D0 D0 FF D3 D3 D3 FF D3 D3' - 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' - 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' - 'D3 FF C4 C4 C4 FF B3 B3 B3 FF 62 62 62 FF 9E 9E' - '9E FF FF D4 D4 FF FF D4 F0 FF FF D4 F0 FF FF D4' - 'F0 FF CE CE CE FF 9E 9E 9E FF 92 92 92 FF 00 00' - '00 00 00 00 00 B2 00 00 00 FF DD DD DD FF CF CF' - 'CF FF D3 D3 D3 FF D3 D3 D3 FF D0 D0 D0 FF D0 D0' - 'D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0 D0 FF CF CF' - 'CF FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' - 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' - 'D3 FF B3 B3 B3 FF B3 B3 B3 FF 00 00 00 FF 00 00' - '00 FF 62 62 62 FF 86 86 86 FF 86 86 86 FF 86 86' - '86 FF 6E 6E 6E FF 00 00 00 24 00 00 00 00 00 00' - '00 00 00 00 00 4B 00 00 00 FE D8 D8 D8 FF D4 D4' - 'D4 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' - 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' - 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' - 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' - 'D3 FF B3 B3 B3 FF B3 B3 B3 FF 00 00 00 CF 00 00' - '00 CF 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 1A 00 00 00 F2 CC CC CC FF D6 D6' - 'D6 FF D3 D3 D3 FF D3 D3 D3 FF D6 D6 D6 FF D6 D6' - 'D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6' - 'D6 FF D6 D6 D6 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' - 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF C4 C4' - 'C4 FF BD BD BD FF D0 D0 D0 FF 09 09 09 FF 00 00' - '00 CF 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 02 00 00 00 BF 97 97 97 FF DC DC' - 'DC FF DC DC DC FF DE DE DE FF DE DE DE FF DD DD' - 'DD FF DD DD DD FF DD DD DD FF DD DD DD FF DD DD' - 'DD FF DD DD DD FF DD DD DD FF DD DD DD FF DD DD' - 'DD FF DD DD DD FF DD DD DD FF E7 E7 E7 FF E7 E7' - 'E7 FF DC DC DC FF C6 C6 C6 FF 00 00 00 FF 00 00' - '00 A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 A4 77 77 77 FF D3 D3' - 'D3 FF E1 E1 E1 FF DE DE DE FF DE DE DE FF DE DE' - 'DE FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' - 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' - 'E0 FF E1 E1 E1 FF E1 E1 E1 FF E7 E7 E7 FF E7 E7' - 'E7 FF D9 D9 D9 FF BB BB BB FF 00 00 00 FF 00 00' - '00 7E 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 62 35 35 35 FF BD BD' - 'BD FF E6 E6 E6 FF E6 E6 E6 FF E7 E7 E7 FF EB EB' - 'EB FF EB EB EB FF EB EB EB FF EB EB EB FF EB EB' - 'EB FF EB EB EB FF EB EB EB FF EB EB EB FF EB EB' - 'EB FF E7 E7 E7 FF E7 E7 E7 FF E7 E7 E7 FF E6 E6' - 'E6 FF D4 D4 D4 FF 9A 9A 9A FF 00 00 00 ED 00 00' - '00 2C 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 2D 1E 1E 1E FF AB AB' - 'AB FF ED ED ED FF E7 E7 E7 FF EC EC EC FF EB EB' - 'EB FF ED ED ED FF EB EB EB FF EB EB EB FF EB EB' - 'EB FF EB EB EB FF EB EB EB FF EB EB EB FF EB EB' - 'EB FF EB EB EB FF EC EC EC FF E5 E5 E5 FF EB EB' - 'EB FF D6 D6 D6 FF 8A 8A 8A FF 00 00 00 C3 00 00' - '00 17 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 FF 8D 8D' - '8D FF C4 C4 C4 FF B2 B2 B2 FF B2 B2 B2 FF EB EB' - 'EB FF F0 F0 F0 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0' - 'F0 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0' - 'F0 FF F3 F3 F3 FF D5 D5 D5 FF B6 B6 B6 FF B7 B7' - 'B7 FF CD CD CD FF 61 61 61 FF 00 00 00 85 00 00' - '00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 FF 64 64' - '64 FF DD DD DD FF DC DC DC FF E4 E4 E4 FF F9 F9' - 'F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9' - 'F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9' - 'F9 FF FA FA FA FF F2 F2 F2 FF D8 D8 D8 FF DC DC' - 'DC FF B0 B0 B0 FF 34 34 34 FF 00 00 00 67 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 9C 00 00' - '00 FF 3D 3D 3D FF 49 49 49 FF 48 48 48 FF 48 48' - '48 FF 48 48 48 FF 48 48 48 FF 48 48 48 FF 48 48' - '48 FF 48 48 48 FF 48 48 48 FF 48 48 48 FF 48 48' - '48 FF 48 48 48 FF 48 48 48 FF 49 49 49 FF 49 49' - '49 FF 02 02 02 FF 00 00 00 FF 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 06 00 00' - '00 7F 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 D6 00 00 00 5C 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF' - 'FF 00 FF FF FE 00 FF FF FC 00 FF FF E0 00 FF FF' - 'F0 00 80 00 00 00 80 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 18 00 00 00 08 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 00' - '00 00 80 00 00 00 80 00 00 00 80 00 00 00 80 00' - '00 01 80 00 00 7F 80 00 00 7F 80 00 00 7F C0 00' - '00 7F C0 00 00 7F C0 00 00 7F E0 00 00 7F E0 00' - '00 FF E0 00 01 FF E0 00 01 FF FF FF FF FF 28 00' - '00 00 10 00 00 00 20 00 00 00 01 00 04 00 00 00' - '00 00 80 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 80 00 00 00 00 80' - '00 00 80 80 00 00 00 00 80 00 80 00 80 00 00 80' - '80 00 C0 C0 C0 00 80 80 80 00 FF 00 00 00 00 FF' - '00 00 FF FF 00 00 00 00 FF 00 FF 00 FF 00 00 FF' - 'FF 00 FF FF FF 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 08 FF FF 00 00 00 00 00 8F FF FF 08 88' - '88 88 80 FF FF FF 0F FA F7 77 88 FF F7 FF 0F 88' - '88 88 88 FF F0 8F 0F FF FF FF F8 FF F8 FF 0F 77' - '77 77 78 FF FF FF 07 77 77 77 77 7F FF FF 07 77' - '77 77 77 8F FF FF 07 77 77 77 77 70 28 80 08 77' - '77 77 77 70 00 00 00 77 77 77 77 70 00 00 00 77' - '77 77 77 70 00 00 00 77 77 77 77 70 00 00 00 00' - '00 00 00 00 00 00 FF E0 00 00 FF C0 00 00 80 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01' - '00 00 00 07 00 00 80 07 00 00 80 07 00 00 80 0F' - '00 00 C0 1F 00 00 28 00 00 00 20 00 00 00 40 00' - '00 00 01 00 04 00 00 00 00 00 00 02 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 80 00 00 00 00 80 00 00 80 80 00 00 00 00' - '80 00 80 00 80 00 00 80 80 00 C0 C0 C0 00 80 80' - '80 00 FF 00 00 00 00 FF 00 00 FF FF 00 00 00 00' - 'FF 00 FF 00 FF 00 00 FF FF 00 FF FF FF 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 80 77 77 88 00 00' - '00 00 00 00 00 00 00 00 00 08 7F FF FF FF 00 00' - '00 00 00 00 00 00 00 00 00 8F FF FF FF FF 00 00' - '00 00 00 00 00 00 00 00 08 FF FF FF FF FF 00 00' - '00 00 00 00 00 00 00 00 87 FF FF FF FF FF 00 08' - '88 88 88 88 88 88 88 80 8F FF FF FF FF FF 00 87' - 'FF 7A FF FF 77 77 77 88 FF FF FF FF FF FF 00 7F' - 'FF AA AF 77 77 77 78 08 FF FF FF F7 FF FF 00 FF' - 'FF 8A 77 77 77 77 77 88 FF FF FF 78 8F FF 00 FF' - 'F8 88 88 88 88 88 88 88 FF FF FF 00 08 FF 00 FF' - 'F7 88 88 88 88 88 88 88 FF FF FF 00 07 FF 00 FF' - 'FF FF FF FF FF FF FF 78 FF FF FF 78 7F FF 00 FF' - 'FF FF FF FF FF FF FF 78 FF FF FF FF FF FF 00 FF' - '77 77 77 77 77 77 77 78 FF FF FF FF FF FF 00 F7' - '77 77 77 77 77 77 77 78 7F FF FF FF FF FF 00 77' - '77 77 77 77 77 77 77 77 87 FF FF FF FF FF 00 87' - '77 77 77 77 77 77 77 77 88 FF FF FF FF FF 00 87' - '77 77 77 77 77 77 77 77 78 8F FF FF FF FF 00 07' - '77 77 77 77 77 77 77 77 77 88 7F FF FF 78 00 07' - '77 77 77 77 77 77 77 77 77 70 02 88 88 70 00 07' - '77 77 77 77 77 77 77 77 77 70 00 00 00 00 00 08' - '77 77 77 77 77 77 77 77 77 70 00 00 00 00 00 08' - '77 77 77 77 77 77 77 77 77 70 00 00 00 00 00 00' - '77 77 77 77 77 77 77 77 77 80 00 00 00 00 00 00' - '77 77 77 77 77 77 77 77 77 80 00 00 00 00 00 00' - '77 77 77 77 77 77 77 77 77 80 00 00 00 00 00 00' - '77 77 77 77 77 77 77 77 77 00 00 00 00 00 00 00' - '87 77 77 77 77 77 77 77 77 00 00 00 00 00 00 00' - '08 88 88 88 88 88 88 88 80 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF' - 'FF 00 FF FF FE 00 FF FF FC 00 FF FF F8 00 FF FF' - 'F0 00 C0 00 00 00 80 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 18 00 00 00 08 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 00' - '00 00 80 00 00 00 80 00 00 00 80 00 00 00 80 00' - '00 01 80 00 00 7F 80 00 00 7F 80 00 00 7F C0 00' - '00 7F C0 00 00 7F C0 00 00 7F C0 00 00 7F E0 00' - '00 FF E0 00 00 FF F0 00 03 FF FF FF FF FF 28 00' - '00 00 10 00 00 00 20 00 00 00 01 00 20 00 00 00' - '00 00 00 04 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 78 6E 6E 6E FF 62 62' - '62 FF 00 00 00 9C 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 62 62 62 FF FF D4 F0 FF FF D4 F0 FF FF D4' - 'D4 FF FF D4 D4 FF 00 00 00 00 00 00 00 16 00 00' - '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' - '00 37 00 00 00 37 00 00 00 37 00 00 00 42 62 62' - '62 FF FF D4 F0 FF FF D4 F0 FF FF D4 D4 FF FF D4' - 'D4 FF F2 F2 F2 FF 00 00 00 54 90 90 90 FF AB AC' - 'AC FF CC CC CC FF C4 C4 C4 FF C2 C2 C2 FF C1 C1' - 'C1 FF BC BC BC FF BD BD BD FF 6E 6E 6E FF FF D4' - 'F0 FF FF D4 F0 FF FF D4 F0 FF FF D4 D4 FF FF D4' - 'E3 FF F2 F2 F2 FF 00 00 00 FA EA EA EA FF E8 E8' - 'E8 FF 00 FF 00 FF CB CB CB FF C8 C8 C8 FF C8 C8' - 'C8 FF C8 C8 C8 FF C8 C8 C8 FF 56 56 56 FF F2 F2' - 'F2 FF F2 F2 F2 FF FF D4 F0 FF B6 B6 B6 FF FF B1' - 'C7 FF FF D4 E3 FF 00 00 00 F9 EF EF EF FF EB EB' - 'EB FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' - '80 FF 80 80 80 FF 80 80 80 FF 62 62 62 FF F2 F2' - 'F2 FF F2 F2 F2 FF FF D4 F0 FF 00 00 00 78 62 62' - '62 FF F2 F2 F2 FF 00 00 00 F9 F7 F7 F7 FF F6 F6' - 'F6 FF F5 F5 F5 FF F3 F3 F3 FF F2 F2 F2 FF F1 F1' - 'F1 FF F0 F0 F0 FF EF EF EF FF 62 62 62 FF F2 F2' - 'F2 FF F2 F2 F2 FF FF D4 E3 FF FF D4 E3 FF FF D4' - 'FF FF FF D4 F0 FF 00 00 00 F7 F3 F3 F3 FF B7 B7' - 'B7 FF DA DA DA FF D8 D8 D8 FF D7 D7 D7 FF D7 D7' - 'D7 FF D7 D7 D7 FF D8 D8 D8 FF D3 D3 D3 FF F2 F2' - 'F2 FF F2 F2 F2 FF F2 F2 F2 FF FF D4 D4 FF FF D4' - 'D4 FF FF D4 F0 FF 00 00 00 73 EF EF EF FF CB CB' - 'CB FF CE CE CE FF D5 D5 D5 FF D5 D5 D5 FF D5 D5' - 'D5 FF D5 D5 D5 FF D5 D5 D5 FF D3 D3 D3 FF 7A 7A' - '7A FF F2 F2 F2 FF FF D4 D4 FF FF D4 D4 FF FF D4' - 'F0 FF FF D4 F0 FF 00 00 00 25 B7 B7 B7 FF CB CB' - 'CB FF D3 D3 D3 FF D0 D0 D0 FF D0 D0 D0 FF D3 D3' - 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF C4 C4' - 'C4 FF 80 80 80 FF FF D4 D4 FF FF D4 F0 FF FF D4' - 'F0 FF E6 E6 E6 FF 00 00 00 00 5F 5F 5F FF D2 D2' - 'D2 FF D1 D1 D1 FF D1 D1 D1 FF D1 D1 D1 FF D3 D3' - 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' - 'D3 FF 99 99 99 FF 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 18 18 18 FF DB DB' - 'DB FF DE DE DE FF DA DA DA FF DA DA DA FF DA DA' - 'DA FF DD DD DD FF DD DD DD FF DD DD DD FF D9 D9' - 'D9 FF 7A 7A 7A FF 00 00 00 0A 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 FF E5 E5' - 'E5 FF EB EB EB FF EB EB EB FF E4 E4 E4 FF E4 E4' - 'E4 FF E4 E4 E4 FF E5 E5 E5 FF E7 E7 E7 FF E6 E6' - 'E6 FF 20 20 20 FF 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 DD E4 E4' - 'E4 FF C1 C1 C1 FF ED ED ED FF EE EE EE FF EB EB' - 'EB FF ED ED ED FF ED ED ED FF C2 C2 C2 FF EC EC' - 'EC FF 00 00 00 FF 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 44 80 80' - '80 FF D7 D7 D7 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8' - 'D8 FF D8 D8 D8 FF D8 D8 D8 FF D9 D9 D9 FF B0 B0' - 'B0 FF 00 00 00 ED 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 2C 00 00 00 84 00 00 00 84 00 00 00 84 00 00' - '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' - '00 70 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 FF F0 00 00 FF E0 00 00 80 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 0F' - '00 00 80 07 00 00 80 0F 00 00 80 0F 00 00 80 0F' - '00 00 C0 1F 00 00 28 00 00 00 30 00 00 00 60 00' - '00 00 01 00 04 00 00 00 00 00 80 04 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 80 00 00 00 00 80 00 00 80 80 00 00 00 00' - '80 00 80 00 80 00 00 80 80 00 C0 C0 C0 00 80 80' - '80 00 FF 00 00 00 00 FF 00 00 FF FF 00 00 00 00' - 'FF 00 FF 00 FF 00 00 FF FF 00 FF FF FF 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 08 88 88 80 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '88 87 77 F7 77 88 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 08 87 FF FF FF FF F7 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 87' - 'FF FF FF FF FF FF 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 08 FF FF FF FF FF FF FF 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 08 8F FF' - 'FF FF FF FF FF FF 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 88 7F FF FF FF FF FF FF FF 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 08 88 FF FF' - 'FF FF FF FF FF FF 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 08 8F FF FF FF FF FF FF FF FF 00 00' - '87 77 77 77 77 77 77 77 77 77 77 77 88 8F FF FF' - 'FF FF FF FF FF FF 00 08 7F FF F7 AA FF FF 77 77' - '77 77 77 70 88 7F FF FF FF FF FF FF FF FF 00 07' - 'FF FF FA AA AF 77 77 77 77 77 77 00 88 FF FF FF' - 'FF FF FF FF FF FF 00 07 FF FF FA AA A7 77 77 77' - '77 77 77 80 88 FF FF FF FF FF 78 87 FF FF 00 07' - 'FF FF FF AA 77 77 77 77 77 77 77 77 87 FF FF FF' - 'FF F7 87 88 FF FF 00 07 FF FF 88 88 88 88 88 88' - '88 88 88 88 87 FF FF FF FF F8 00 08 7F FF 00 07' - 'FF FF 88 88 88 88 88 88 88 88 88 88 87 FF FF FF' - 'FF F8 00 08 7F FF 00 07 FF FF 77 77 77 77 77 77' - '77 77 77 77 87 FF FF FF FF F8 00 08 FF FF 00 07' - 'FF FF F7 77 77 77 77 77 77 77 77 77 87 FF FF FF' - 'FF F7 88 8F FF FF 00 07 FF FF FF FF FF FF FF FF' - 'FF FF FF FF 87 FF FF FF FF FF FF FF FF FF 00 07' - 'FF FF FF 77 77 7F FF FF FF FF FF FF 88 FF FF FF' - 'FF FF FF FF FF FF 00 07 77 77 77 77 77 77 77 77' - '77 77 77 77 88 FF FF FF FF FF FF FF FF FF 00 07' - '77 77 77 77 77 77 77 77 77 77 77 77 78 7F FF FF' - 'FF FF FF FF FF FF 00 07 77 77 77 77 77 77 77 77' - '77 77 77 77 78 8F FF FF FF FF FF FF FF FF 00 07' - '77 77 77 77 77 77 77 77 77 77 77 77 77 87 FF FF' - 'FF FF FF FF FF FF 00 08 77 77 77 77 77 77 77 77' - '77 77 77 77 77 88 7F FF FF FF FF FF FF FF 00 08' - '77 77 77 77 77 77 77 77 77 77 77 77 77 78 8F FF' - 'FF FF FF FF FF FF 00 00 77 77 77 77 77 77 77 77' - '77 77 77 77 77 77 88 FF FF FF FF FF FF FF 00 00' - '77 77 77 77 77 77 77 77 77 77 77 77 77 77 78 87' - 'FF FF FF FF FF F8 00 00 87 77 77 77 77 77 77 77' - '77 77 77 77 77 77 77 88 87 FF FF FF 78 88 00 00' - '87 77 77 77 77 77 77 77 77 77 77 77 77 77 77 80' - '08 88 88 88 80 00 00 00 87 77 77 77 77 77 77 77' - '77 77 77 77 77 77 77 80 00 00 00 00 00 00 00 00' - '87 77 77 77 77 77 77 77 77 77 77 77 77 77 77 80' - '00 00 00 00 00 00 00 00 07 77 77 77 77 77 77 77' - '77 77 77 77 77 77 77 80 00 00 00 00 00 00 00 00' - '07 77 77 77 77 77 77 77 77 77 77 77 77 77 77 80' - '00 00 00 00 00 00 00 00 08 77 77 77 77 77 77 77' - '77 77 77 77 77 77 77 80 00 00 00 00 00 00 00 00' - '08 77 77 77 77 77 77 77 77 77 77 77 77 77 77 00' - '00 00 00 00 00 00 00 00 08 77 77 77 77 77 77 77' - '77 77 77 77 77 77 77 00 00 00 00 00 00 00 00 00' - '00 77 77 77 77 77 77 77 77 77 77 77 77 77 78 00' - '00 00 00 00 00 00 00 00 00 77 77 77 77 77 77 77' - '77 77 77 77 77 77 78 00 00 00 00 00 00 00 00 00' - '00 87 77 77 77 77 77 77 77 77 77 77 77 77 78 00' - '00 00 00 00 00 00 00 00 00 87 77 77 77 77 77 77' - '77 77 77 77 77 77 78 00 00 00 00 00 00 00 00 00' - '00 87 77 77 77 77 77 77 77 77 77 77 77 77 70 00' - '00 00 00 00 00 00 00 00 00 08 77 77 77 77 77 77' - '77 77 77 77 77 77 80 00 00 00 00 00 00 00 00 00' - '00 00 08 88 88 88 88 88 88 88 88 88 88 80 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF' - 'FF FF F0 00 00 00 FF FF FF FF E0 00 00 00 FF FF' - 'FF FF C0 00 00 00 FF FF FF FF 80 00 00 00 FF FF' - 'FF FE 00 00 00 00 FF FF FF FE 00 00 00 00 FF FF' - 'FF FC 00 00 00 00 F0 00 00 00 00 00 00 00 C0 00' - '00 00 00 00 00 00 80 00 00 00 00 00 00 00 80 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 E0 00 00 00 00' - '00 00 00 60 00 00 00 00 00 00 00 20 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 00' - '00 00 00 00 00 00 80 00 00 00 00 00 00 00 80 00' - '00 00 00 00 00 00 80 00 00 00 00 00 00 00 80 00' - '00 00 00 00 00 00 80 00 00 00 00 00 00 00 C0 00' - '00 00 00 07 00 00 C0 00 00 00 07 FF 00 00 C0 00' - '00 00 07 FF 00 00 C0 00 00 00 07 FF 00 00 C0 00' - '00 00 07 FF 00 00 C0 00 00 00 07 FF 00 00 E0 00' - '00 00 07 FF 00 00 E0 00 00 00 07 FF 00 00 E0 00' - '00 00 07 FF 00 00 E0 00 00 00 07 FF 00 00 E0 00' - '00 00 07 FF 00 00 F0 00 00 00 07 FF 00 00 F0 00' - '00 00 0F FF 00 00 F0 00 00 00 0F FF 00 00 F0 00' - '00 00 1F FF 00 00 F8 00 00 00 3F FF 00 00 FE 00' - '00 00 7F FF 00 00 FF FF FF FF FF FF 00 00 28 00' - '00 00 30 00 00 00 60 00 00 00 01 00 08 00 00 00' - '00 00 00 09 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 01 01 01 00 02 02' - '02 00 05 05 05 00 06 06 06 00 07 07 07 00 08 08' - '08 00 09 09 09 00 0B 0B 0B 00 0C 0C 0C 00 18 18' - '18 00 19 19 19 00 1E 1E 1E 00 1F 1F 1F 00 20 20' - '20 00 21 21 21 00 22 22 22 00 24 24 24 00 26 26' - '26 00 27 27 27 00 28 28 28 00 29 29 29 00 2A 2A' - '2A 00 2B 2B 2B 00 2C 2C 2C 00 2E 2E 2E 00 2F 2F' - '2F 00 34 34 34 00 35 35 35 00 39 39 39 00 3D 3D' - '3D 00 40 40 40 00 41 41 41 00 48 48 48 00 49 49' - '49 00 4A 4A 4A 00 4B 4B 4B 00 53 53 53 00 56 56' - '56 00 59 59 59 00 5D 5D 5D 00 5F 5F 5F 00 61 61' - '61 00 62 62 62 00 64 64 64 00 6E 6E 6E 00 75 75' - '75 00 77 77 77 00 7A 7A 7A 00 7E 7E 7E 00 7F 7F' - '7F 00 00 C0 00 00 00 FF 00 00 80 80 80 00 83 83' - '83 00 86 86 86 00 8A 8A 8A 00 8D 8D 8D 00 90 90' - '90 00 92 92 92 00 93 93 93 00 97 97 97 00 99 99' - '99 00 9A 9A 9A 00 9E 9E 9E 00 9F 9F 9F 00 A4 A0' - 'A0 00 A4 A4 A4 00 A7 A7 A7 00 A8 A8 A8 00 A9 A9' - 'A9 00 AA AA AA 00 AB AB AB 00 AD A8 AB 00 AB AC' - 'AC 00 AD AD AD 00 AE AE AE 00 AF AF AF 00 B0 B0' - 'B0 00 B2 B2 B2 00 B3 B3 B3 00 B5 B5 B5 00 B6 B6' - 'B6 00 B7 B7 B7 00 B8 B4 B6 00 B8 B8 B8 00 BA BA' - 'BA 00 BB BB BB 00 BC BC BC 00 BD BD BD 00 BE BE' - 'BE 00 BF BF BF 00 FF B1 C7 00 C0 C0 C0 00 C1 C1' - 'C1 00 C2 C2 C2 00 C3 C3 C3 00 C4 C4 C4 00 C5 C5' - 'C5 00 C6 C6 C6 00 C8 C8 C8 00 C8 C9 C9 00 C9 C9' - 'C9 00 CA CA CA 00 CB CB CB 00 CC CC CC 00 CD CD' - 'CD 00 CE CE CE 00 CF CF CF 00 D0 D0 D0 00 D1 D1' - 'D1 00 D2 D2 D2 00 D3 D3 D3 00 D4 D4 D4 00 D5 D5' - 'D5 00 D6 D6 D6 00 D7 D7 D7 00 D8 D8 D8 00 D9 D9' - 'D9 00 DA DA DA 00 DB DB DB 00 DC DC DC 00 DD DD' - 'DD 00 DE DE DE 00 DF DF DF 00 FF D4 D4 00 FF D4' - 'E3 00 FF D4 F0 00 FF D4 FF 00 E0 E0 E0 00 E1 E1' - 'E1 00 E2 E2 E2 00 E3 E3 E3 00 E4 E4 E4 00 E5 E5' - 'E5 00 E6 E6 E6 00 E7 E7 E7 00 E8 E8 E8 00 E9 E9' - 'E9 00 EA EA EA 00 EB EB EB 00 EC EC EC 00 ED ED' - 'ED 00 EE EE EE 00 EF EF EF 00 F0 F0 F0 00 F1 F1' - 'F1 00 F2 F2 F2 00 F3 F3 F3 00 F4 F4 F4 00 F5 F5' - 'F5 00 F6 F6 F6 00 F7 F7 F7 00 F8 F8 F8 00 F9 F9' - 'F9 00 FA FA FA 00 FF FF FF 00 00 00 00 00 78 EE' - '0C 01 78 EE 0C 01 40 00 00 00 40 00 00 00 01 00' - '00 00 18 00 00 00 00 00 00 00 10 19 95 00 42 00' - '00 00 00 00 00 00 F4 18 95 00 00 00 00 00 00 00' - '00 00 00 00 00 00 70 EE 0C 01 00 24 0D 01 01 01' - 'F5 77 78 01 38 00 78 EE 0C 01 E0 19 0D 01 E8 19' - '0D 01 78 01 38 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 BE B3 E7 77 70 EE 0C 01 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 08 04 00 00 E4 00 00 00 08 04 00 00 08 01' - '00 00 00 00 00 00 00 00 00 00 00 00 01 01 00 00' - '38 00 BC 18 95 00 C0 18 95 00 B0 19 95 00 F0 88' - 'FA 77 88 1C F5 77 FF FF FF FF 37 90 F5 77 81 E9' - '49 00 00 00 38 00 00 00 00 00 78 EE 0C 01 78 EE' - '0C 01 A4 1A 95 00 40 00 00 00 40 00 00 00 B8 10' - 'E9 77 FF FF FF FF C9 F1 E7 77 16 EA 4B 00 F8 00' - '00 00 B4 1A 95 00 DC E3 49 00 E0 A3 4E 00 FF FF' - 'FF FF 10 00 00 00 10 DA 4B 00 78 EE 0C 01 71 CC' - '43 00 78 EE 0C 01 50 7E 0D 01 A4 1A 95 00 F8 A2' - 'AF 00 C4 F5 AF 00 04 00 00 00 50 7E 0D 01 0F 02' - '00 00 B8 EE 0C 01 10 00 00 00 00 00 00 00 20 00' - '00 00 78 EE 0C 01 40 00 00 00 10 00 00 00 00 01' - '00 00 00 04 00 00 00 00 00 00 00 00 00 00 10 00' - '00 00 10 00 00 00 28 00 00 00 10 00 00 00 20 00' - '00 00 01 00 20 00 00 00 00 00 00 04 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 9D 9D 9D 9D 9D 9D' - '9D 9D 9D 9D 9D 9D 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 9D 9D 9D 9D 35 2D 2B' - '2B 2B 35 9D 9D 9D 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 9D 9D 37 2D 30 47 6B 77' - '93 77 6B 47 35 2D 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 9D 9D 30 35 6B 9C 7F 7F 7F' - '7F 7D 7D 7D 7D 5D 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 9D 9D 9D 2B 5D 7F 7F 7F 7F 7F 7F' - '7D 7D 7D 7D 7D 93 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 9D 9D 9D 2D 87 7F 7F 7F 7F 7F 7F 7D' - '7D 7D 7D 7D 93 93 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 9D 26 2B 87 7F 7F 7F 7F 7F 7F 7D 7D' - '7D 7D 7D 93 93 93 00 00 00 00 9D 9D 9D 9D 9D 9D' - '9D 9D 9D 9D 9D 9D 9D 9D 9D 9D 9D 9D 9D 9D 9D 9D' - '9D 9D 9D 9D 23 2B 5F 7F 7F 7F 7F 7F 7F 7D 7D 7D' - '7D 7D 93 93 93 93 00 00 9D 9D 9D 9D 9D 9D 9D 9D' - '9D 9D 9D 9D 9D 9D 9D 9D 9D 9D 9D 9D 9D 9D 9D 9D' - '9D 9D 9D 2B 26 3B 7F 7F 7F 7F 7F 7F 7F 7D 7D 7D' - '7D 93 93 93 93 93 00 9D 9D 9D 9D 0F 18 17 18 17' - '17 17 17 17 17 17 17 17 17 17 16 16 16 16 16 16' - '16 16 16 23 2B 93 7F 7F 7F 7F 7F 7F 7F 7D 7D 7D' - '93 93 93 93 93 93 00 9D 9D 12 3A 54 4B 4A 49 6A' - '69 68 66 61 60 5F 5F 60 5D 5E 5B 5B 58 59 56 59' - '59 59 2D 26 40 7F 7F 7F 7F 7F 7F 7F 7F 7D 7D 7F' - '7E 7E 93 93 93 93 9D 9D 01 38 49 8C 89 89 89 71' - '33 33 88 89 89 84 7A 75 6F 6A 6A 6A 6A 6A 65 6A' - '47 19 26 2B 77 7F 7F 7F 7F 7F 7F 7F 7F 80 80 80' - '80 80 7F 93 93 93 9D 9D 0B 49 8C 8C 89 89 89 34' - '34 34 33 82 7C 72 69 6F 68 6A 6A 6A 6A 6A 6A 6A' - '1F 19 26 30 93 93 7E 93 7F 7F 7F 7F 7F 80 7F 7E' - '7E 80 80 93 93 93 9D 9D 15 49 8B 8C 8C 89 89 34' - '34 34 34 68 64 64 64 64 64 64 64 64 64 64 64 64' - '3C 1F 26 3B 93 93 93 93 93 7E 7F 7F 7F 7F 52 35' - '3B 5C 7F 7F 7E 93 9D 9D 14 6E 8D 8C 8C 89 89 89' - '34 34 51 51 52 52 52 52 52 52 52 52 52 52 52 52' - '52 52 26 42 93 93 93 93 93 93 93 7F 7F 52 2D 47' - '2B 30 7E 7F 93 93 9D 9D 14 6E 8F 89 8C 89 35 35' - '35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35' - '35 35 2B 52 93 93 93 93 93 93 93 7F 7E 2D 00 00' - '00 2B 52 7F 93 93 9D 9D 13 6E 90 8C 8C 8C 35 35' - '35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35' - '35 35 2B 52 93 93 93 93 93 93 93 7F 7D 2B 9D 00' - '00 2B 52 7F 93 93 9D 9D 13 6F 93 8B 8C 8C 44 44' - '44 48 4C 4E 4D 4D 4D 4D 4D 4D 48 48 48 48 48 48' - '48 48 2B 6B 93 93 93 93 93 93 7E 7F 7E 35 9D 9D' - '00 30 7F 7F 7E 93 9D 9D 12 70 8A 89 87 85 83 78' - '79 75 76 6F 6F 6C 6D 6D 6D 6D 6D 6D 6D 6D 6D 6D' - '6D 6D 2B 6B 93 93 93 93 93 93 93 7F 7F 5D 30 2B' - '35 87 7F 7F 93 7E 9D 9D 12 70 98 99 97 97 97 96' - '96 95 95 94 94 94 93 93 92 92 92 91 91 91 90 90' - '8F 8F 2B 47 93 93 93 93 93 93 93 7E 7F 7F 7E 7D' - '7E 80 80 7F 7F 7F 9D 9D 11 73 9C 8A 82 83 83 81' - '7C 7C 7C 7C 7C 81 81 81 81 81 81 81 81 81 81 81' - '81 81 2B 3B 93 93 93 93 93 93 93 93 93 80 80 80' - '80 80 7F 7F 7F 7F 9D 9D 11 7B 99 76 61 57 5B 75' - '77 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76' - '76 76 2D 30 93 93 93 93 93 93 93 93 93 7E 7D 7D' - '7D 7D 7F 7F 7F 7F 9D 9D 0D 77 94 63 46 53 4E 60' - '77 75 75 75 75 75 74 74 74 74 74 74 74 74 75 75' - '75 75 70 2B 5D 93 93 93 93 93 93 93 93 93 7D 7D' - '7D 7D 7F 7F 7F 7F 9D 9D 03 5F 97 58 4F 60 48 57' - '75 72 72 72 71 70 70 72 74 75 75 74 72 70 70 70' - '71 72 70 2B 37 93 93 93 93 93 93 93 93 7D 7D 7D' - '7D 7D 7F 7F 7F 7F 00 9D 9D 43 95 6C 62 6F 5B 66' - '70 6F 6D 70 6D 6D 72 72 72 72 72 72 72 72 6D 6D' - '71 6D 70 70 2B 52 93 93 93 93 93 93 7D 7D 7D 7D' - '7D 7D 7F 7F 7F 7F 00 9D 9D 31 90 6E 6C 68 6C 6E' - '6B 6C 72 72 72 72 72 72 72 72 72 72 72 72 72 72' - '72 82 70 70 30 30 5C 93 93 93 93 7D 7D 7D 7D 7D' - '7D 7F 7F 7F 7F 7F 00 9D 9D 27 8A 6D 6A 6A 6A 67' - '70 70 70 70 71 72 73 73 73 73 73 73 73 73 72 72' - '78 85 70 70 70 2D 3B 93 93 93 7D 7D 7D 7D 7D 7D' - '7F 7F 7F 7F 7F 7F 00 9D 9D 1F 74 6F 67 68 67 71' - '70 70 70 6E 6F 6F 6F 6F 6F 6F 70 6F 70 70 6F 6F' - '6E 6D 70 70 70 61 2D 3B 93 7D 7D 7D 7D 7D 7D 7F' - '7F 7F 7F 7F 7F 7F 00 9D 9D 10 53 78 67 68 6B 70' - '70 6C 6E 6D 6D 6D 6D 6C 70 70 6B 70 70 70 70 70' - '70 6B 70 70 70 61 61 2D 35 6B 7D 7D 7D 7D 7F 7F' - '7F 7F 7F 7F 87 3B 00 9D 9D 05 41 7A 69 6A 70 70' - '70 6D 6D 6D 6D 6D 6D 70 70 70 70 70 70 70 70 70' - '70 70 70 70 70 61 61 50 3E 2B 40 5D 7D 7F 7F 7F' - '7F 9C 6B 40 2B 3B 00 00 9D 9D 36 7A 6C 6E 70 70' - '6D 6D 6D 6D 6D 6D 6D 6D 6C 70 70 70 70 70 70 70' - '70 70 70 70 70 70 50 50 3E 9D 9D 30 2B 37 37 37' - '37 2B 2D 00 00 00 00 00 9D 9D 29 79 6E 6F 70 70' - '6E 6E 6E 6E 6E 6E 6E 6E 6E 70 70 70 70 70 70 70' - '70 70 70 70 70 70 50 50 3E 9D 9D 00 00 00 00 00' - '00 00 00 00 00 00 00 00 9D 9D 20 75 71 6F 70 70' - '70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70' - '70 70 70 70 70 70 50 50 3E 9D 9D 00 00 00 00 00' - '00 00 00 00 00 00 00 00 9D 9D 18 69 73 72 70 70' - '73 73 73 73 73 73 73 73 73 73 73 70 70 70 70 70' - '70 70 70 70 61 70 59 6D 3E 07 9D 00 00 00 00 00' - '00 00 00 00 00 00 00 00 9D 9D 0A 4E 78 78 7B 7B' - '7B 76 77 77 77 77 77 77 77 77 77 77 7A 7A 7A 7A' - '7A 77 7A 7A 88 76 69 67 30 02 9D 00 00 00 00 00' - '00 00 00 00 00 00 00 00 9D 9D 06 3D 79 7C 79 7B' - '7B 7B 7A 7A 7A 7A 7A 7A 7A 7A 7A 7A 7A 7A 7A 7A' - '7A 7A 88 88 88 7A 79 63 25 9D 9D 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 9D 9D 2F 70 83 82 7B' - '7B 7B 7B 7B 81 81 81 81 81 81 81 81 81 81 81 81' - '82 82 88 88 88 84 76 57 1D 9D 9D 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 9D 9D 24 66 86 84 85' - '8C 8C 8C 8C 8C 8C 85 85 85 85 85 85 85 85 86 86' - '88 88 88 88 85 87 73 45 0E 9D 9D 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 9D 9D 1C 59 87 87 87' - '88 88 8C 8C 8C 8C 8C 8C 8C 8C 8C 8C 8C 8C 8C 88' - '88 88 88 88 87 89 71 3F 08 9D 9D 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 9D 9D 0C 48 85 8E 88' - '87 8D 8C 8B 8E 8C 8C 8C 8C 8C 8C 8C 8C 8C 8C 8C' - '8C 8D 8B 86 8C 8C 73 38 9D 9D 9D 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 9D 9D 06 3E 85 7C 59' - '5E 73 8D 8E 8E 8F 8F 8E 8D 8C 8C 8D 8E 8F 8F 8E' - '8F 85 5F 5A 6E 8D 71 2E 9D 9D 9D 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 9D 9D 39 81 61 4F' - '55 4F 8C 92 91 91 91 91 91 91 91 91 91 91 91 91' - '94 72 4E 52 53 8C 6A 2A 9D 9D 9D 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 9D 9D 2C 6B 7A 79' - '72 85 9A 9A 9A 9A 9A 9A 9A 9A 9A 9A 9A 9A 9A 9A' - '9B 93 7C 75 79 74 4E 1B 9D 9D 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 9D 9D 0B 35 5A 70' - '74 78 75 75 75 75 75 75 75 75 75 75 75 75 75 75' - '75 76 76 74 6A 4E 28 04 9D 9D 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 9D 9D 9D 09 1E 22' - '21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21' - '21 21 21 22 22 1A 02 9D 9D 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 9D 9D 9D 9D 9D' - '9D 9D 9D 9D 9D 9D 9D 9D 9D 9D 9D 9D 9D 9D 9D 9D' - '9D 9D 9D 9D 9D 9D 9D 9D 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 9D 9D 9D' - '9D 9D 9D 9D 9D 9D 9D 9D 9D 9D 9D 9D 9D 9D 9D 9D' - '9D 9D 9D 9D 9D 9D 9D 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 FF FF FF FF F0 00 00 00 FF FF' - 'FF FF E0 00 00 00 FF FF FF FF C0 00 00 00 FF FF' - 'FF FF 80 00 00 00 FF FF FF FE 00 00 00 00 FF FF' - 'FF FC 00 00 00 00 FF FF FF FC 00 00 00 00 F0 00' - '00 00 00 00 00 00 C0 00 00 00 00 00 00 00 80 00' - '00 00 00 00 00 00 80 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 E0 00 00 00 00 00 00 00 60 00 00 00 00' - '00 00 00 20 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 80 00 00 00 00 00 00 00 80 00' - '00 00 00 00 00 00 80 00 00 00 00 00 00 00 80 00' - '00 00 00 00 00 00 80 00 00 00 00 00 00 00 80 00' - '00 00 00 00 00 00 C0 00 00 00 00 07 00 00 C0 00' - '00 00 07 FF 00 00 C0 00 00 00 07 FF 00 00 C0 00' - '00 00 07 FF 00 00 C0 00 00 00 07 FF 00 00 C0 00' - '00 00 07 FF 00 00 E0 00 00 00 07 FF 00 00 E0 00' - '00 00 07 FF 00 00 E0 00 00 00 07 FF 00 00 E0 00' - '00 00 07 FF 00 00 E0 00 00 00 07 FF 00 00 F0 00' - '00 00 07 FF 00 00 F0 00 00 00 0F FF 00 00 F0 00' - '00 00 0F FF 00 00 F0 00 00 00 1F FF 00 00 F8 00' - '00 00 3F FF 00 00 FE 00 00 00 7F FF 00 00 FF FF' - 'FF FF FF FF 00 00 28 00 00 00 30 00 00 00 60 00' - '00 00 01 00 20 00 00 00 00 00 00 24 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 0C 00 00 00 24 00 00 00 30 00 00 00 48 00 00' - '00 78 00 00 00 90 00 00 00 90 00 00 00 90 00 00' - '00 90 00 00 00 78 00 00 00 48 00 00 00 30 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 0C 00 00' - '00 3C 00 00 00 78 00 00 00 90 80 80 80 FF 6E 6E' - '6E FF 62 62 62 FF 62 62 62 FF 62 62 62 FF 80 80' - '80 FF 00 00 00 B4 00 00 00 9C 00 00 00 90 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 0C 00 00 00 3C 86 86' - '86 FF 6E 6E 6E FF 7A 7A 7A FF AA AA AA FF CE CE' - 'CE FF DA DA DA FF F2 F2 F2 FF DA DA DA FF CE CE' - 'CE FF AA AA AA FF 80 80 80 FF 6E 6E 6E FF 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 0C 00 00 00 3C 7A 7A 7A FF 80 80' - '80 FF CE CE CE FF FF FF FF FF FF D4 F0 FF FF D4' - 'F0 FF FF D4 F0 FF FF D4 F0 FF FF D4 D4 FF FF D4' - 'D4 FF FF D4 D4 FF FF D4 D4 FF C0 C0 C0 FF 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 24 00 00 00 48 62 62 62 FF C0 C0 C0 FF FF D4' - 'F0 FF FF D4 F0 FF FF D4 F0 FF FF D4 F0 FF FF D4' - 'F0 FF FF D4 F0 FF FF D4 D4 FF FF D4 D4 FF FF D4' - 'D4 FF FF D4 D4 FF FF D4 D4 FF F2 F2 F2 FF 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 3E 00 00' - '00 78 6E 6E 6E FF E6 E6 E6 FF FF D4 F0 FF FF D4' - 'F0 FF FF D4 F0 FF FF D4 F0 FF FF D4 F0 FF FF D4' - 'F0 FF FF D4 D4 FF FF D4 D4 FF FF D4 D4 FF FF D4' - 'D4 FF FF D4 D4 FF F2 F2 F2 FF F2 F2 F2 FF 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 56 56 56 56 FF 62 62' - '62 FF E6 E6 E6 FF FF D4 F0 FF FF D4 F0 FF FF D4' - 'F0 FF FF D4 F0 FF FF D4 F0 FF FF D4 F0 FF FF D4' - 'D4 FF FF D4 D4 FF FF D4 D4 FF FF D4 D4 FF FF D4' - 'D4 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2 F2 FF 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 16 00 00 00 34 00 00 00 37 00 00 00 37 00 00' - '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' - '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' - '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' - '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' - '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' - '00 42 00 00 00 42 4A 4A 4A FF 62 62 62 FF C2 C2' - 'C2 FF FF D4 F0 FF FF D4 F0 FF FF D4 F0 FF FF D4' - 'F0 FF FF D4 F0 FF FF D4 F0 FF FF D4 D4 FF FF D4' - 'D4 FF FF D4 D4 FF FF D4 D4 FF FF D4 D4 FF F2 F2' - 'F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2 F2 FF 00 00' - '00 00 00 00 00 00 00 00 00 05 00 00 00 69 00 00' - '00 C5 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' - '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' - '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' - '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' - '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' - '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' - '00 FF 62 62 62 FF 56 56 56 FF 92 92 92 FF FF D4' - 'F0 FF FF D4 F0 FF FF D4 F0 FF FF D4 F0 FF FF D4' - 'F0 FF FF D4 F0 FF FF D4 F0 FF FF D4 D4 FF FF D4' - 'D4 FF FF D4 D4 FF FF D4 D4 FF F2 F2 F2 FF F2 F2' - 'F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2 F2 FF 00 00' - '00 00 00 00 00 05 00 00 00 9B 00 00 00 FF 00 00' - '00 FF 21 21 21 FF 2C 2C 2C FF 2B 2B 2B FF 2C 2C' - '2C FF 2B 2B 2B FF 2B 2B 2B FF 2B 2B 2B FF 2B 2B' - '2B FF 2B 2B 2B FF 2B 2B 2B FF 2B 2B 2B FF 2B 2B' - '2B FF 2B 2B 2B FF 2B 2B 2B FF 2B 2B 2B FF 2A 2A' - '2A FF 2A 2A 2A FF 2A 2A 2A FF 2A 2A 2A FF 2A 2A' - '2A FF 2A 2A 2A FF 2A 2A 2A FF 2A 2A 2A FF 2A 2A' - '2A FF 4A 4A 4A FF 62 62 62 FF F2 F2 F2 FF FF D4' - 'F0 FF FF D4 F0 FF FF D4 F0 FF FF D4 F0 FF FF D4' - 'F0 FF FF D4 F0 FF FF D4 F0 FF FF D4 D4 FF FF D4' - 'D4 FF FF D4 D4 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2' - 'F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2 F2 FF 00 00' - '00 00 00 00 00 54 00 00 00 FF 26 26 26 FF 90 90' - '90 FF B8 B4 B6 FF AD AD AD FF AB AC AC FF AD A8' - 'AB FF CD CD CD FF CC CC CC FF CB CB CB FF C9 C9' - 'C9 FF C4 C4 C4 FF C3 C3 C3 FF C2 C2 C2 FF C2 C2' - 'C2 FF C3 C3 C3 FF C0 C0 C0 FF C1 C1 C1 FF BF BF' - 'BF FF BF BF BF FF BC BC BC FF BD BD BD FF BA BA' - 'BA FF BD BD BD FF BD BD BD FF BD BD BD FF 6E 6E' - '6E FF 56 56 56 FF 9E 9E 9E FF FF D4 F0 FF FF D4' - 'F0 FF FF D4 F0 FF FF D4 F0 FF FF D4 F0 FF FF D4' - 'F0 FF FF D4 F0 FF FF D4 F0 FF FF D4 D4 FF FF D4' - 'D4 FF FF D4 F0 FF FF D4 E3 FF FF D4 E3 FF F2 F2' - 'F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2 F2 FF 00 00' - '00 03 00 00 00 AD 01 01 01 FF 8A 8A 8A FF AD A8' - 'AB FF EB EB EB FF E8 E8 E8 FF E8 E8 E8 FF E8 E8' - 'E8 FF D4 D4 D4 FF 00 C0 00 FF 00 C0 00 FF E7 E7' - 'E7 FF E8 E8 E8 FF E8 E8 E8 FF E3 E3 E3 FF DD DD' - 'DD FF D8 D8 D8 FF D2 D2 D2 FF CD CD CD FF CD CD' - 'CD FF CD CD CD FF CD CD CD FF CD CD CD FF C8 C9' - 'C9 FF CD CD CD FF AA AA AA FF 2E 2E 2E FF 56 56' - '56 FF 62 62 62 FF DA DA DA FF FF D4 F0 FF FF D4' - 'F0 FF FF D4 F0 FF FF D4 F0 FF FF D4 F0 FF FF D4' - 'F0 FF FF D4 F0 FF FF D4 F0 FF FF D4 FF FF FF D4' - 'FF FF FF D4 FF FF FF D4 FF FF FF D4 FF FF FF D4' - 'F0 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2 F2 FF 00 00' - '00 15 00 00 00 F0 19 19 19 FF AD A8 AB FF EB EB' - 'EB FF EB EB EB FF E8 E8 E8 FF E8 E8 E8 FF E8 E8' - 'E8 FF 00 FF 00 FF 00 FF 00 FF 00 FF 00 FF 00 C0' - '00 FF E1 E1 E1 FF DF DF DF FF D5 D5 D5 FF CC CC' - 'CC FF D2 D2 D2 FF CB CB CB FF CD CD CD FF CD CD' - 'CD FF CD CD CD FF CD CD CD FF CD CD CD FF CD CD' - 'CD FF CD CD CD FF 40 40 40 FF 2E 2E 2E FF 56 56' - '56 FF 7A 7A 7A FF F2 F2 F2 FF F2 F2 F2 FF FF D4' - 'E3 FF F2 F2 F2 FF FF D4 F0 FF FF D4 F0 FF FF D4' - 'F0 FF FF D4 F0 FF FF D4 F0 FF FF D4 FF FF FF D4' - 'F0 FF FF D4 E3 FF FF D4 E3 FF FF D4 FF FF FF D4' - 'FF FF F2 F2 F2 FF F2 F2 F2 FF F2 F2 F2 FF 00 00' - '00 30 00 00 00 FA 29 29 29 FF AD A8 AB FF EA EA' - 'EA FF EB EB EB FF EB EB EB FF E8 E8 E8 FF E8 E8' - 'E8 FF 00 FF 00 FF 00 FF 00 FF 00 FF 00 FF 00 FF' - '00 FF CB CB CB FF C8 C8 C8 FF C8 C8 C8 FF C8 C8' - 'C8 FF C8 C8 C8 FF C8 C8 C8 FF C8 C8 C8 FF C8 C8' - 'C8 FF C8 C8 C8 FF C8 C8 C8 FF C8 C8 C8 FF C8 C8' - 'C8 FF C8 C8 C8 FF 93 93 93 FF 40 40 40 FF 56 56' - '56 FF 92 92 92 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2' - 'F2 FF F2 F2 F2 FF F2 F2 F2 FF FF D4 E3 FF FF D4' - 'F0 FF FF D4 F0 FF FF D4 F0 FF FF D4 F0 FF B6 B6' - 'B6 FF 80 80 80 FF 92 92 92 FF FF B1 C7 FF FF D4' - 'F0 FF FF D4 F0 FF FF D4 E3 FF F2 F2 F2 FF 00 00' - '00 34 00 00 00 F9 28 28 28 FF D1 D1 D1 FF EC EC' - 'EC FF EB EB EB FF EB EB EB FF E8 E8 E8 FF E8 E8' - 'E8 FF E8 E8 E8 FF 00 FF 00 FF 00 FF 00 FF B5 B5' - 'B5 FF B5 B5 B5 FF B6 B6 B6 FF B6 B6 B6 FF B6 B6' - 'B6 FF B6 B6 B6 FF B6 B6 B6 FF B6 B6 B6 FF B6 B6' - 'B6 FF B6 B6 B6 FF B6 B6 B6 FF B6 B6 B6 FF B6 B6' - 'B6 FF B6 B6 B6 FF B6 B6 B6 FF B6 B6 B6 FF 56 56' - '56 FF A4 A0 A0 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2' - 'F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2' - 'F2 FF FF D4 F0 FF FF D4 F0 FF B6 B6 B6 FF 6E 6E' - '6E FF AA AA AA FF 62 62 62 FF 7A 7A 7A FF FF D4' - 'E3 FF FF D4 F0 FF F2 F2 F2 FF F2 F2 F2 FF 00 00' - '00 33 00 00 00 F9 28 28 28 FF D1 D1 D1 FF EE EE' - 'EE FF E8 E8 E8 FF EB EB EB FF E8 E8 E8 FF 80 80' - '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' - '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' - '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' - '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' - '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 62 62' - '62 FF B6 B6 B6 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2' - 'F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2' - 'F2 FF FF D4 F0 FF FF D4 E3 FF 6E 6E 6E FF 00 00' - '00 00 00 00 00 00 00 00 00 00 62 62 62 FF B6 B6' - 'B6 FF FF D4 F0 FF F2 F2 F2 FF F2 F2 F2 FF 00 00' - '00 33 00 00 00 F9 27 27 27 FF D1 D1 D1 FF EF EF' - 'EF FF EB EB EB FF EB EB EB FF EB EB EB FF 80 80' - '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' - '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' - '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' - '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' - '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 62 62' - '62 FF B6 B6 B6 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2' - 'F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2' - 'F2 FF FF D4 F0 FF FF D4 D4 FF 62 62 62 FF 00 00' - '00 78 00 00 00 00 00 00 00 00 62 62 62 FF B6 B6' - 'B6 FF FF D4 F0 FF F2 F2 F2 FF F2 F2 F2 FF 00 00' - '00 33 00 00 00 F9 27 27 27 FF D2 D2 D2 FF F2 F2' - 'F2 FF EA EA EA FF EB EB EB FF EB EB EB FF A7 A7' - 'A7 FF A7 A7 A7 FF A7 A7 A7 FF AB AB AB FF AE AE' - 'AE FF B0 B0 B0 FF AF AF AF FF AF AF AF FF AF AF' - 'AF FF AF AF AF FF AF AF AF FF AF AF AF FF AB AB' - 'AB FF AB AB AB FF AB AB AB FF AB AB AB FF AB AB' - 'AB FF AB AB AB FF AB AB AB FF AB AB AB FF 62 62' - '62 FF CE CE CE FF F2 F2 F2 FF F2 F2 F2 FF F2 F2' - 'F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2 F2 FF FF D4' - 'E3 FF FF D4 F0 FF FF D4 E3 FF 80 80 80 FF 00 00' - '00 78 00 00 00 78 00 00 00 00 7A 7A 7A FF FF D4' - 'F0 FF FF D4 F0 FF FF D4 E3 FF F2 F2 F2 FF 00 00' - '00 33 00 00 00 F9 26 26 26 FF D3 D3 D3 FF E9 E9' - 'E9 FF E8 E8 E8 FF E6 E6 E6 FF E4 E4 E4 FF E2 E2' - 'E2 FF DB DB DB FF DC DC DC FF D8 D8 D8 FF D9 D9' - 'D9 FF D2 D2 D2 FF D2 D2 D2 FF CF CF CF FF D0 D0' - 'D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0' - 'D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0' - 'D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0 D0 FF 62 62' - '62 FF CE CE CE FF F2 F2 F2 FF F2 F2 F2 FF F2 F2' - 'F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2' - 'F2 FF FF D4 F0 FF FF D4 F0 FF C0 C0 C0 FF 7A 7A' - '7A FF 62 62 62 FF 80 80 80 FF E6 E6 E6 FF FF D4' - 'F0 FF FF D4 F0 FF F2 F2 F2 FF FF D4 E3 FF 00 00' - '00 33 00 00 00 F9 26 26 26 FF D3 D3 D3 FF F7 F7' - 'F7 FF F8 F8 F8 FF F6 F6 F6 FF F6 F6 F6 FF F6 F6' - 'F6 FF F5 F5 F5 FF F5 F5 F5 FF F4 F4 F4 FF F4 F4' - 'F4 FF F3 F3 F3 FF F3 F3 F3 FF F3 F3 F3 FF F2 F2' - 'F2 FF F2 F2 F2 FF F1 F1 F1 FF F1 F1 F1 FF F1 F1' - 'F1 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0 F0 FF EF EF' - 'EF FF EF EF EF FF EE EE EE FF EE EE EE FF 62 62' - '62 FF AA AA AA FF F2 F2 F2 FF F2 F2 F2 FF F2 F2' - 'F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2' - 'F2 FF FF D4 E3 FF FF D4 F0 FF FF D4 F0 FF FF D4' - 'E3 FF FF D4 D4 FF FF D4 E3 FF FF D4 FF FF FF D4' - 'FF FF FF D4 F0 FF FF D4 F0 FF FF D4 F0 FF 00 00' - '00 33 00 00 00 F9 24 24 24 FF D6 D6 D6 FF FF FF' - 'FF FF E9 E9 E9 FF E1 E1 E1 FF E2 E2 E2 FF E2 E2' - 'E2 FF E0 E0 E0 FF DF DF DF FF DF DF DF FF DF DF' - 'DF FF DF DF DF FF DF DF DF FF E0 E0 E0 FF E0 E0' - 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' - 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' - 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF 62 62' - '62 FF 92 92 92 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2' - 'F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2' - 'F2 FF F2 F2 F2 FF F2 F2 F2 FF FF D4 FF FF FF D4' - 'FF FF FF D4 FF FF FF D4 FF FF FF D4 FF FF FF D4' - 'F0 FF FF D4 F0 FF FF D4 F0 FF FF D4 F0 FF 00 00' - '00 34 00 00 00 FA 24 24 24 FF DE DE DE FF F8 F8' - 'F8 FF D9 D9 D9 FF C4 C4 C4 FF BB BB BB FF BF BF' - 'BF FF D8 D8 D8 FF DA DA DA FF D9 D9 D9 FF D9 D9' - 'D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9' - 'D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9' - 'D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9' - 'D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9 D9 FF 6E 6E' - '6E FF 7A 7A 7A FF F2 F2 F2 FF F2 F2 F2 FF F2 F2' - 'F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2' - 'F2 FF F2 F2 F2 FF F2 F2 F2 FF FF D4 E3 FF FF D4' - 'D4 FF FF D4 D4 FF FF D4 D4 FF FF D4 D4 FF FF D4' - 'F0 FF FF D4 F0 FF FF D4 F0 FF FF D4 F0 FF 00 00' - '00 25 00 00 00 F7 1F 1F 1F FF DA DA DA FF F3 F3' - 'F3 FF C6 C6 C6 FF A9 A9 A9 FF B7 B7 B7 FF B0 B0' - 'B0 FF C3 C3 C3 FF DA DA DA FF D8 D8 D8 FF D8 D8' - 'D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8 D8 FF D7 D7' - 'D7 FF D7 D7 D7 FF D7 D7 D7 FF D7 D7 D7 FF D7 D7' - 'D7 FF D7 D7 D7 FF D7 D7 D7 FF D7 D7 D7 FF D8 D8' - 'D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8 D8 FF D3 D3' - 'D3 FF 62 62 62 FF C0 C0 C0 FF F2 F2 F2 FF F2 F2' - 'F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2' - 'F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2 F2 FF FF D4' - 'D4 FF FF D4 D4 FF FF D4 D4 FF FF D4 D4 FF FF D4' - 'F0 FF FF D4 F0 FF FF D4 F0 FF FF D4 F0 FF 00 00' - '00 07 00 00 00 D0 05 05 05 FF C2 C2 C2 FF F6 F6' - 'F6 FF BC BC BC FF B2 B2 B2 FF C3 C3 C3 FF AB AB' - 'AB FF BB BB BB FF D8 D8 D8 FF D5 D5 D5 FF D5 D5' - 'D5 FF D5 D5 D5 FF D4 D4 D4 FF D3 D3 D3 FF D3 D3' - 'D3 FF D5 D5 D5 FF D7 D7 D7 FF D8 D8 D8 FF D8 D8' - 'D8 FF D7 D7 D7 FF D5 D5 D5 FF D3 D3 D3 FF D3 D3' - 'D3 FF D3 D3 D3 FF D4 D4 D4 FF D5 D5 D5 FF D3 D3' - 'D3 FF 62 62 62 FF 86 86 86 FF F2 F2 F2 FF F2 F2' - 'F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2' - 'F2 FF F2 F2 F2 FF F2 F2 F2 FF FF D4 D4 FF FF D4' - 'D4 FF FF D4 D4 FF FF D4 D4 FF FF D4 D4 FF FF D4' - 'F0 FF FF D4 F0 FF FF D4 F0 FF FF D4 F0 FF 00 00' - '00 00 00 00 00 9C 00 00 00 FF A4 A4 A4 FF F4 F4' - 'F4 FF CF CF CF FF C5 C5 C5 FF D2 D2 D2 FF BF BF' - 'BF FF C9 C9 C9 FF D3 D3 D3 FF D2 D2 D2 FF D0 D0' - 'D0 FF D3 D3 D3 FF D0 D0 D0 FF D0 D0 D0 FF D5 D5' - 'D5 FF D5 D5 D5 FF D5 D5 D5 FF D5 D5 D5 FF D5 D5' - 'D5 FF D5 D5 D5 FF D5 D5 D5 FF D5 D5 D5 FF D0 D0' - 'D0 FF D0 D0 D0 FF D4 D4 D4 FF D0 D0 D0 FF D3 D3' - 'D3 FF D3 D3 D3 FF 62 62 62 FF B6 B6 B6 FF F2 F2' - 'F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2' - 'F2 FF F2 F2 F2 FF FF D4 D4 FF FF D4 D4 FF FF D4' - 'D4 FF FF D4 D4 FF FF D4 D4 FF FF D4 D4 FF FF D4' - 'F0 FF FF D4 F0 FF FF D4 F0 FF FF D4 F0 FF 00 00' - '00 00 00 00 00 73 00 00 00 FF 7E 7E 7E FF EF EF' - 'EF FF D1 D1 D1 FF CF CF CF FF CB CB CB FF CF CF' - 'CF FF D1 D1 D1 FF CE CE CE FF CF CF CF FF D5 D5' - 'D5 FF D5 D5 D5 FF D5 D5 D5 FF D5 D5 D5 FF D5 D5' - 'D5 FF D5 D5 D5 FF D5 D5 D5 FF D5 D5 D5 FF D5 D5' - 'D5 FF D5 D5 D5 FF D5 D5 D5 FF D5 D5 D5 FF D5 D5' - 'D5 FF D5 D5 D5 FF D5 D5 D5 FF E1 E1 E1 FF D3 D3' - 'D3 FF D3 D3 D3 FF 7A 7A 7A FF 7A 7A 7A FF FF B1' - 'C7 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2' - 'F2 FF FF D4 D4 FF FF D4 D4 FF FF D4 D4 FF FF D4' - 'D4 FF FF D4 D4 FF FF D4 D4 FF FF D4 F0 FF FF D4' - 'F0 FF FF D4 F0 FF FF D4 F0 FF FF D4 F0 FF 00 00' - '00 00 00 00 00 59 00 00 00 FF 59 59 59 FF E9 E9' - 'E9 FF D0 D0 D0 FF CD CD CD FF CD CD CD FF CD CD' - 'CD FF CA CA CA FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' - 'D3 FF D3 D3 D3 FF D4 D4 D4 FF D5 D5 D5 FF D6 D6' - 'D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6' - 'D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6 D6 FF D5 D5' - 'D5 FF D5 D5 D5 FF DB DB DB FF E4 E4 E4 FF D3 D3' - 'D3 FF D3 D3 D3 FF D3 D3 D3 FF 6E 6E 6E FF 92 92' - '92 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2 F2 FF FF D4' - 'D4 FF FF D4 D4 FF FF D4 D4 FF FF D4 D4 FF FF D4' - 'D4 FF FF D4 D4 FF FF D4 F0 FF FF D4 F0 FF FF D4' - 'F0 FF FF D4 F0 FF FF D4 F0 FF FF D4 F0 FF 00 00' - '00 00 00 00 00 3E 00 00 00 FE 40 40 40 FF D7 D7' - 'D7 FF D2 D2 D2 FF CA CA CA FF CB CB CB FF CA CA' - 'CA FF D4 D4 D4 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' - 'D3 FF D1 D1 D1 FF D2 D2 D2 FF D2 D2 D2 FF D2 D2' - 'D2 FF D2 D2 D2 FF D2 D2 D2 FF D2 D2 D2 FF D3 D3' - 'D3 FF D2 D2 D2 FF D3 D3 D3 FF D3 D3 D3 FF D2 D2' - 'D2 FF D2 D2 D2 FF D1 D1 D1 FF D0 D0 D0 FF D3 D3' - 'D3 FF D3 D3 D3 FF D3 D3 D3 FF C4 C4 C4 FF 6E 6E' - '6E FF 92 92 92 FF F2 F2 F2 FF FF D4 D4 FF FF D4' - 'D4 FF FF D4 D4 FF FF D4 D4 FF FF D4 D4 FF FF D4' - 'D4 FF FF D4 F0 FF FF D4 F0 FF FF D4 F0 FF FF D4' - 'F0 FF FF D4 F0 FF FF D4 F0 FF FF D4 F0 FF 00 00' - '00 00 00 00 00 25 00 00 00 F8 22 22 22 FF B7 B7' - 'B7 FF DB DB DB FF CA CA CA FF CB CB CB FF CE CE' - 'CE FF D3 D3 D3 FF D3 D3 D3 FF CF CF CF FF D1 D1' - 'D1 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0' - 'D0 FF CF CF CF FF D3 D3 D3 FF D3 D3 D3 FF CE CE' - 'CE FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' - 'D3 FF D3 D3 D3 FF D3 D3 D3 FF CE CE CE FF D3 D3' - 'D3 FF D3 D3 D3 FF D3 D3 D3 FF C4 C4 C4 FF C4 C4' - 'C4 FF 6E 6E 6E FF 80 80 80 FF CE CE CE FF FF D4' - 'D4 FF FF D4 D4 FF FF D4 D4 FF FF D4 D4 FF FF D4' - 'F0 FF FF D4 F0 FF FF D4 F0 FF FF D4 F0 FF FF D4' - 'F0 FF FF D4 F0 FF E6 E6 E6 FF 92 92 92 FF 00 00' - '00 00 00 00 00 0C 00 00 00 E1 07 07 07 FF 9F 9F' - '9F FF DD DD DD FF CC CC CC FF CD CD CD FF D3 D3' - 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D0 D0 D0 FF D0 D0' - 'D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0' - 'D0 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' - 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' - 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' - 'D3 FF D3 D3 D3 FF D3 D3 D3 FF C4 C4 C4 FF C4 C4' - 'C4 FF B3 B3 B3 FF 99 99 99 FF 62 62 62 FF 9E 9E' - '9E FF C0 C0 C0 FF FF D4 D4 FF FF D4 F0 FF FF D4' - 'F0 FF FF D4 F0 FF FF D4 F0 FF FF FF FF FF CE CE' - 'CE FF 9E 9E 9E FF 62 62 62 FF 92 92 92 FF 00 00' - '00 00 00 00 00 00 00 00 00 B2 00 00 00 FF 83 83' - '83 FF DD DD DD FF CF CF CF FF D1 D1 D1 FF D3 D3' - 'D3 FF D3 D3 D3 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0' - 'D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0' - 'D0 FF D0 D0 D0 FF CF CF CF FF D3 D3 D3 FF D3 D3' - 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' - 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' - 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF B3 B3' - 'B3 FF B3 B3 B3 FF 99 99 99 FF 00 00 00 FF 00 00' - '00 FF 7A 7A 7A FF 62 62 62 FF 86 86 86 FF 86 86' - '86 FF 86 86 86 FF 86 86 86 FF 62 62 62 FF 6E 6E' - '6E FF 00 00 00 24 00 00 00 0C 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 80 00 00 00 FF 5F 5F' - '5F FF DC DC DC FF D1 D1 D1 FF D2 D2 D2 FF D3 D3' - 'D3 FF D3 D3 D3 FF D1 D1 D1 FF D1 D1 D1 FF D1 D1' - 'D1 FF D1 D1 D1 FF D1 D1 D1 FF D1 D1 D1 FF D1 D1' - 'D1 FF D1 D1 D1 FF D1 D1 D1 FF D3 D3 D3 FF D3 D3' - 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' - 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' - 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF B3 B3' - 'B3 FF B3 B3 B3 FF 99 99 99 FF 00 00 00 CF 00 00' - '00 CF 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 4B 00 00 00 FE 41 41' - '41 FF D8 D8 D8 FF D4 D4 D4 FF D2 D2 D2 FF D3 D3' - 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' - 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' - 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' - 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' - 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' - 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF B3 B3' - 'B3 FF B3 B3 B3 FF 99 99 99 FF 00 00 00 CF 00 00' - '00 CF 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 1A 00 00 00 F2 2C 2C' - '2C FF CC CC CC FF D6 D6 D6 FF D5 D5 D5 FF D3 D3' - 'D3 FF D3 D3 D3 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6' - 'D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6' - 'D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6' - 'D6 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' - 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' - 'D3 FF D3 D3 D3 FF C4 C4 C4 FF D3 D3 D3 FF BD BD' - 'BD FF D0 D0 D0 FF 99 99 99 FF 09 09 09 FF 00 00' - '00 CF 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 09 00 00 00 D8 18 18' - '18 FF B0 B0 B0 FF DB DB DB FF DB DB DB FF DE DE' - 'DE FF DE DE DE FF DE DE DE FF D9 D9 D9 FF DA DA' - 'DA FF DA DA DA FF DA DA DA FF DA DA DA FF DA DA' - 'DA FF DA DA DA FF DA DA DA FF DA DA DA FF DA DA' - 'DA FF DA DA DA FF DD DD DD FF DD DD DD FF DD DD' - 'DD FF DD DD DD FF DD DD DD FF DA DA DA FF DD DD' - 'DD FF DD DD DD FF E7 E7 E7 FF D9 D9 D9 FF CC CC' - 'CC FF CA CA CA FF 7A 7A 7A FF 02 02 02 FF 00 00' - '00 B8 00 00 00 0A 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 02 00 00 00 BF 08 08' - '08 FF 97 97 97 FF DC DC DC FF DF DF DF FF DC DC' - 'DC FF DE DE DE FF DE DE DE FF DE DE DE FF DD DD' - 'DD FF DD DD DD FF DD DD DD FF DD DD DD FF DD DD' - 'DD FF DD DD DD FF DD DD DD FF DD DD DD FF DD DD' - 'DD FF DD DD DD FF DD DD DD FF DD DD DD FF DD DD' - 'DD FF DD DD DD FF DD DD DD FF DD DD DD FF E7 E7' - 'E7 FF E7 E7 E7 FF E7 E7 E7 FF DD DD DD FF DC DC' - 'DC FF C6 C6 C6 FF 53 53 53 FF 00 00 00 FF 00 00' - '00 A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 A4 00 00' - '00 FF 77 77 77 FF D3 D3 D3 FF E2 E2 E2 FF E1 E1' - 'E1 FF DE DE DE FF DE DE DE FF DE DE DE FF DE DE' - 'DE FF DE DE DE FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' - 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' - 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' - 'E0 FF E0 E0 E0 FF E1 E1 E1 FF E1 E1 E1 FF E7 E7' - 'E7 FF E7 E7 E7 FF E7 E7 E7 FF E3 E3 E3 FF D9 D9' - 'D9 FF BB BB BB FF 39 39 39 FF 00 00 00 FF 00 00' - '00 7E 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 89 00 00' - '00 FF 4B 4B 4B FF C9 C9 C9 FF E5 E5 E5 FF E3 E3' - 'E3 FF E4 E4 E4 FF EB EB EB FF EB EB EB FF EB EB' - 'EB FF EB EB EB FF EB EB EB FF EB EB EB FF E4 E4' - 'E4 FF E4 E4 E4 FF E4 E4 E4 FF E4 E4 E4 FF E4 E4' - 'E4 FF E4 E4 E4 FF E4 E4 E4 FF E4 E4 E4 FF E5 E5' - 'E5 FF E5 E5 E5 FF E7 E7 E7 FF E7 E7 E7 FF E7 E7' - 'E7 FF E7 E7 E7 FF E4 E4 E4 FF E6 E6 E6 FF D6 D6' - 'D6 FF A8 A8 A8 FF 20 20 20 FF 00 00 00 FD 00 00' - '00 4E 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 62 00 00' - '00 FF 35 35 35 FF BD BD BD FF E6 E6 E6 FF E6 E6' - 'E6 FF E6 E6 E6 FF E7 E7 E7 FF E7 E7 E7 FF EB EB' - 'EB FF EB EB EB FF EB EB EB FF EB EB EB FF EB EB' - 'EB FF EB EB EB FF EB EB EB FF EB EB EB FF EB EB' - 'EB FF EB EB EB FF EB EB EB FF EB EB EB FF EB EB' - 'EB FF E7 E7 E7 FF E7 E7 E7 FF E7 E7 E7 FF E7 E7' - 'E7 FF E7 E7 E7 FF E6 E6 E6 FF E8 E8 E8 FF D4 D4' - 'D4 FF 9A 9A 9A FF 0B 0B 0B FF 00 00 00 ED 00 00' - '00 2C 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 2D 00 00' - '00 F9 1E 1E 1E FF AB AB AB FF E4 E4 E4 FF ED ED' - 'ED FF E7 E7 E7 FF E6 E6 E6 FF EC EC EC FF EB EB' - 'EB FF EA EA EA FF ED ED ED FF EB EB EB FF EB EB' - 'EB FF EB EB EB FF EB EB EB FF EB EB EB FF EB EB' - 'EB FF EB EB EB FF EB EB EB FF EB EB EB FF EB EB' - 'EB FF EB EB EB FF EB EB EB FF EC EC EC FF EA EA' - 'EA FF E5 E5 E5 FF EB EB EB FF EB EB EB FF D6 D6' - 'D6 FF 8A 8A 8A FF 00 00 00 FF 00 00 00 C3 00 00' - '00 17 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 09 00 00' - '00 DD 08 08 08 FF 99 99 99 FF E4 E4 E4 FF DF DF' - 'DF FF BD BD BD FF C1 C1 C1 FF D6 D6 D6 FF EC EC' - 'EC FF ED ED ED FF ED ED ED FF EE EE EE FF EE EE' - 'EE FF ED ED ED FF EC EC EC FF EB EB EB FF EB EB' - 'EB FF EC EC EC FF ED ED ED FF EE EE EE FF EE EE' - 'EE FF ED ED ED FF EE EE EE FF E4 E4 E4 FF C2 C2' - 'C2 FF BE BE BE FF D1 D1 D1 FF EC EC EC FF D4 D4' - 'D4 FF 75 75 75 FF 00 00 00 FF 00 00 00 9C 00 00' - '00 06 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 AE 00 00 00 FF 8D 8D 8D FF E0 E0 E0 FF C4 C4' - 'C4 FF B2 B2 B2 FF B8 B8 B8 FF B2 B2 B2 FF EB EB' - 'EB FF F1 F1 F1 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0' - 'F0 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0' - 'F0 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0' - 'F0 FF F0 F0 F0 FF F3 F3 F3 FF D5 D5 D5 FF B0 B0' - 'B0 FF B6 B6 B6 FF B7 B7 B7 FF EB EB EB FF CD CD' - 'CD FF 61 61 61 FF 00 00 00 FF 00 00 00 85 00 00' - '00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 80 00 00 00 FF 64 64 64 FF CE CE CE FF DD DD' - 'DD FF DC DC DC FF D5 D5 D5 FF E4 E4 E4 FF F9 F9' - 'F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9' - 'F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9' - 'F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9' - 'F9 FF F9 F9 F9 FF FA FA FA FF F2 F2 F2 FF DF DF' - 'DF FF D8 D8 D8 FF DC DC DC FF D7 D7 D7 FF B0 B0' - 'B0 FF 34 34 34 FF 00 00 00 FF 00 00 00 67 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 44 00 00 00 FF 19 19 19 FF 80 80 80 FF BE BE' - 'BE FF D3 D3 D3 FF D7 D7 D7 FF DB DB DB FF D8 D8' - 'D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8' - 'D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8' - 'D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8' - 'D8 FF D8 D8 D8 FF D8 D8 D8 FF D9 D9 D9 FF D9 D9' - 'D9 FF D7 D7 D7 FF CD CD CD FF B0 B0 B0 FF 5D 5D' - '5D FF 06 06 06 FF 00 00 00 ED 00 00 00 2B 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 02 00 00 00 9C 00 00 00 FF 0C 0C 0C FF 3D 3D' - '3D FF 49 49 49 FF 48 48 48 FF 48 48 48 FF 48 48' - '48 FF 48 48 48 FF 48 48 48 FF 48 48 48 FF 48 48' - '48 FF 48 48 48 FF 48 48 48 FF 48 48 48 FF 48 48' - '48 FF 48 48 48 FF 48 48 48 FF 48 48 48 FF 48 48' - '48 FF 48 48 48 FF 48 48 48 FF 48 48 48 FF 48 48' - '48 FF 49 49 49 FF 49 49 49 FF 2F 2F 2F FF 02 02' - '02 FF 00 00 00 FF 00 00 00 5C 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 06 00 00 00 7F 00 00 00 F1 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 D6 00 00 00 5C 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 2C 00 00' - '00 7E 00 00 00 84 00 00 00 84 00 00 00 84 00 00' - '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' - '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' - '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' - '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' - '00 84 00 00 00 84 00 00 00 84 00 00 00 70 00 00' - '00 1A 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF' - 'FF FF F0 00 00 00 FF FF FF FF E0 00 00 00 FF FF' - 'FF FF C0 00 00 00 FF FF FF FF 80 00 00 00 FF FF' - 'FF FF 00 00 00 00 FF FF FF FE 00 00 00 00 FF FF' - 'FF FC 00 00 00 00 F0 00 00 00 00 00 00 00 C0 00' - '00 00 00 00 00 00 80 00 00 00 00 00 00 00 80 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 E0 00 00 00 00' - '00 00 00 60 00 00 00 00 00 00 00 20 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 00' - '00 00 00 00 00 00 80 00 00 00 00 00 00 00 80 00' - '00 00 00 00 00 00 80 00 00 00 00 00 00 00 80 00' - '00 00 00 00 00 00 80 00 00 00 00 00 00 00 C0 00' - '00 00 00 01 00 00 C0 00 00 00 07 FF 00 00 C0 00' - '00 00 07 FF 00 00 C0 00 00 00 07 FF 00 00 C0 00' - '00 00 03 FF 00 00 C0 00 00 00 07 FF 00 00 E0 00' - '00 00 07 FF 00 00 E0 00 00 00 07 FF 00 00 E0 00' - '00 00 07 FF 00 00 E0 00 00 00 07 FF 00 00 E0 00' - '00 00 07 FF 00 00 F0 00 00 00 07 FF 00 00 F0 00' - '00 00 0F FF 00 00 F0 00 00 00 0F FF 00 00 F0 00' - '00 00 1F FF 00 00 F8 00 00 00 3F FF 00 00 FE 00' - '00 00 7F FF 00 00 FF FF FF FF FF FF 00 00' -} */ - -/* BINRES ramdisk.ico */ -12 ICON ramdisk.ico -/* { - '00 00 01 00 07 00 20 20 00 00 01 00 04 00 E8 02' - '00 00 76 00 00 00 10 10 00 00 01 00 08 00 68 05' - '00 00 5E 03 00 00 10 10 00 00 01 00 04 00 28 01' - '00 00 C6 08 00 00 30 30 00 00 01 00 08 00 A8 0E' - '00 00 EE 09 00 00 30 30 00 00 01 00 04 00 68 06' - '00 00 96 18 00 00 30 30 00 00 01 00 20 00 A8 25' - '00 00 FE 1E 00 00 20 20 00 00 01 00 20 00 A8 10' - '00 00 A6 44 00 00 28 00 00 00 20 00 00 00 40 00' - '00 00 01 00 04 00 00 00 00 00 00 02 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 80 00 00 00 00 80 00 00 80 80 00 00 00 00' - '80 00 80 00 80 00 00 80 80 00 C0 C0 C0 00 80 80' - '80 00 FF 00 00 00 00 FF 00 00 FF FF 00 00 00 00' - 'FF 00 FF 00 FF 00 00 FF FF 00 FF FF FF 00 00 00' - '00 00 00 88 00 66 00 00 00 00 00 00 00 00 00 00' - '00 00 08 08 80 E6 00 00 00 00 00 00 00 00 00 00' - '00 00 80 08 07 EE 00 00 00 00 00 00 00 00 00 00' - '00 08 00 08 00 0E 00 60 00 00 00 00 00 00 00 00' - '00 80 00 80 80 08 00 66 00 00 00 00 00 00 00 00' - '08 00 08 00 08 00 80 E6 00 00 00 00 00 00 00 00' - '80 00 80 00 00 80 07 EE 00 00 00 00 00 00 00 08' - '00 08 00 00 00 08 00 0E 00 60 00 00 00 00 00 80' - '00 80 00 08 00 00 80 08 00 66 00 00 00 00 00 80' - '08 00 00 80 80 00 08 00 80 E6 00 00 00 00 00 80' - '80 00 08 08 08 00 00 80 07 EE 00 00 00 00 00 88' - '00 00 80 80 80 00 00 08 00 0E 00 60 00 00 66 07' - '00 00 08 08 00 00 00 00 80 08 00 66 00 00 66 00' - '70 00 00 80 00 08 00 00 08 00 80 E6 00 00 EE EE' - '07 00 00 00 00 00 80 00 00 80 07 EE 00 00 0E E0' - '00 70 00 00 08 00 08 00 00 08 00 0E 00 60 00 00' - '66 07 00 00 00 80 00 80 00 00 80 08 00 66 00 00' - '66 00 70 00 00 08 00 08 00 00 08 00 80 E6 00 00' - 'EE EE 07 00 00 00 80 00 80 00 00 80 07 EE 00 00' - '0E E0 00 70 00 00 08 00 00 00 00 08 00 0E 00 00' - '00 00 66 07 00 00 00 80 00 00 00 00 80 08 00 00' - '00 00 66 00 70 00 00 00 08 88 00 00 08 08 00 00' - '00 00 EE EE 07 00 00 00 80 80 80 00 00 87 00 00' - '00 00 0E E0 00 70 00 00 88 08 80 00 00 70 00 00' - '00 00 00 00 66 07 00 00 80 80 80 00 07 00 00 00' - '00 00 00 00 66 00 70 00 08 88 00 00 70 00 00 00' - '00 00 00 00 EE EE 07 00 00 00 00 07 00 00 00 00' - '00 00 00 00 0E E0 00 70 00 00 00 70 00 00 00 00' - '00 00 00 00 00 00 66 07 00 00 07 00 00 00 00 00' - '00 00 00 00 00 00 66 00 70 00 70 00 00 00 00 00' - '00 00 00 00 00 00 EE EE 07 07 00 00 00 00 00 00' - '00 00 00 00 00 00 0E E0 00 70 00 00 00 00 FF CC' - 'FF FF FF 84 FF FF FF 00 FF FF FE 00 DF FF FC 00' - 'CF FF F8 00 4F FF F0 00 0F FF E0 00 0D FF C0 00' - '0C FF C0 00 04 FF C0 00 00 FF C0 00 00 DF 00 00' - '00 CF 00 00 00 4F 08 00 00 0F 9C 00 00 0D F0 00' - '00 0C F0 00 00 04 F0 80 00 00 F9 C0 00 00 FF 00' - '00 00 FF 00 00 00 FF 08 00 00 FF 9C 00 01 FF F0' - '00 03 FF F0 00 07 FF F0 80 0F FF F9 C0 1F FF FF' - '00 3F FF FF 00 7F FF FF 08 FF FF FF 9D FF 28 00' - '00 00 10 00 00 00 20 00 00 00 01 00 08 00 00 00' - '00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 1C 04 04 00 18 18' - '18 00 1A 1A 1A 00 1C 1C 1C 00 36 0E 0E 00 3C 14' - '14 00 34 1C 1C 00 20 20 20 00 24 24 24 00 28 28' - '28 00 30 30 30 00 38 38 38 00 3C 3C 3C 00 40 28' - '28 00 46 46 46 00 48 48 48 00 4C 4C 4C 00 50 50' - '50 00 52 52 52 00 54 54 54 00 56 56 56 00 58 58' - '58 00 68 68 68 00 74 74 74 00 78 78 78 00 7E 7E' - '7E 00 7F 7F 7F 00 00 92 92 00 00 9C 9C 00 00 BC' - 'BC 00 00 C0 C0 00 00 D0 D0 00 00 DF DF 00 00 E3' - 'E3 00 00 E5 E5 00 00 F7 F7 00 00 FB FB 00 00 FF' - 'FF 00 90 90 90 00 A8 A8 A8 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 C0 17' - '95 00 00 00 38 00 A8 44 F9 77 11 00 00 00 B8 09' - '38 00 00 00 38 00 70 63 0C 01 98 17 95 00 00 00' - '00 00 E0 19 95 00 F0 88 FA 77 70 38 F5 77 FF FF' - 'FF FF A8 44 F9 77 70 7D F5 77 3A 8A F5 77 76 00' - '00 00 76 00 00 00 07 00 00 00 B0 18 95 00 00 00' - '00 00 CB 44 F9 77 38 9F 07 00 CD 8B F5 77 78 13' - '05 00 37 90 F5 77 00 00 00 00 3E 8A F5 77 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 10 00 00 00 00 00 00 00 58 00' - '5A 00 00 EC FD 7F 1A 02 00 00 4C 16 95 00 40 9F' - '07 00 FC 15 95 00 FF FF FF FF B4 1A 95 00 45 00' - '00 00 28 02 00 00 FF FF FF FF E2 D8 F5 77 7D 9B' - 'F5 77 94 B6 01 00 00 00 05 00 F4 17 95 00 80 00' - '10 C0 B4 1A 95 00 F0 88 FA 77 88 1C F5 77 FF FF' - 'FF FF 37 90 F5 77 00 00 00 00 3E 8A F5 77 9B B2' - 'E7 77 B7 00 00 00 02 00 00 00 A4 1A 95 00 01 00' - '00 00 18 00 00 00 00 00 00 00 10 19 95 00 42 00' - '00 00 00 00 00 00 F4 18 95 00 00 00 00 00 00 00' - '00 00 00 00 00 00 0C 00 00 00 02 00 00 00 01 01' - 'F5 77 00 EC FD 7F 58 00 00 00 00 00 00 00 03 00' - '00 00 60 00 1A 02 40 9F 07 00 00 00 00 00 40 9F' - '07 00 05 00 00 00 BE B3 E7 77 4C 19 95 00 A3 B4' - 'E7 77 F8 00 00 00 00 00 00 C0 00 00 00 00 00 00' - '00 00 02 00 00 00 80 00 00 00 00 00 00 00 8C 1A' - '95 00 7F E9 4B 00 88 36 0C 01 00 00 00 C0 00 00' - '00 00 80 1A 95 00 02 00 00 00 80 00 00 00 00 00' - '00 00 C0 27 95 00 C4 F5 AF 00 02 00 00 00 44 3A' - '5C 6F 73 65 78 70 65 72 74 73 5C 72 65 61 63 74' - '6F 73 5C 6C 69 62 5C 73 68 65 6C 6C 33 32 5C 72' - '61 6D 64 69 73 6B 2E 69 63 6F 00 93 4B 00 14 1A' - '95 00 1F 3B D4 77 11 00 00 00 88 00 00 00 4F 3B' - 'D4 77 E0 19 95 00 33 3B D4 77 64 C5 F5 77 A9 F1' - 'E7 77 F8 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 1A 95 00 70 63 0C 01 76 00 00 00 00 00' - '00 00 C9 F1 E7 77 76 00 00 00 A4 1A 95 00 07 00' - '00 00 00 00 00 00 76 00 00 00 76 00 00 00 07 00' - '00 00 F4 19 95 00 33 3B D4 77 B4 1A 95 00 09 48' - 'E9 77 B8 10 E9 77 FF FF FF FF C9 F1 E7 77 16 EA' - '4B 00 F8 00 00 00 70 63 0C 01 76 00 00 00 58 1A' - '95 00 00 00 00 00 00 00 00 00 00 18 00 1F 00 00' - '00 00 00 00 00 00 00 00 00 00 04 0F 07 26 00 00' - '00 00 00 00 00 00 00 00 00 08 08 04 13 01 00 20' - '00 00 00 00 00 00 00 00 08 08 0A 29 29 15 07 26' - '00 00 00 00 00 00 00 11 04 0A 29 29 29 29 15 01' - '00 20 00 00 00 00 00 1A 03 29 0B 29 29 29 29 15' - '07 26 00 00 00 00 1C 05 0C 29 29 0B 29 29 29 29' - '15 01 00 20 00 00 21 25 00 0D 29 29 0B 29 29 29' - '29 15 07 26 00 00 00 00 1D 06 0D 29 29 16 12 29' - '29 29 15 01 00 1E 00 00 24 25 00 0D 29 29 14 09' - '29 29 29 15 07 23 00 00 00 00 1D 06 0D 29 29 0A' - '02 12 29 29 13 0E 00 00 00 00 24 25 00 0D 29 29' - '19 17 12 29 29 28 00 00 00 00 00 00 1D 06 0D 29' - '10 19 04 29 27 00 00 00 00 00 00 00 24 25 00 0D' - '29 29 29 27 00 00 00 00 00 00 00 00 00 00 1D 06' - '0D 29 27 00 00 00 00 00 00 00 00 00 00 00 21 22' - '00 1A 00 00 00 00 FA FF 00 00 F0 FF 00 00 E0 BF' - '00 00 C0 3F 00 00 80 2F 00 00 80 0F 00 00 00 0B' - '00 00 20 03 00 00 C0 02 00 00 C8 00 00 00 F0 00' - '00 00 F2 00 00 00 FC 01 00 00 FC 83 00 00 FF 07' - '00 00 FF 2F 00 00 28 00 00 00 10 00 00 00 20 00' - '00 00 01 00 04 00 00 00 00 00 80 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 80 00 00 00 00 80 00 00 80 80 00 00 00 00' - '80 00 80 00 80 00 00 80 80 00 C0 C0 C0 00 80 80' - '80 00 FF 00 00 00 00 FF 00 00 FF FF 00 00 00 00' - 'FF 00 FF 00 FF 00 00 FF FF 00 FF FF FF 00 00 00' - '08 0E 00 00 00 00 00 00 08 0E 00 00 00 00 00 00' - '00 80 0E 00 00 00 00 00 00 08 0E 00 00 00 08 00' - '00 00 80 0E 00 00 08 00 00 00 08 0E 00 00 60 00' - '00 00 00 80 0E 00 EE 00 00 00 00 08 0E 00 00 60' - '00 08 80 00 80 06 00 EE 00 00 80 00 08 0E 00 00' - '60 00 00 08 00 80 00 00 EE 00 00 88 80 07 00 00' - '00 60 00 88 00 80 00 00 00 EE 00 00 08 00 00 00' - '00 00 60 00 80 00 00 00 00 00 EE 08 00 00 FA FF' - '00 00 F0 FF 00 00 E0 BF 00 00 C0 3F 00 00 80 2F' - '00 00 80 0F 00 00 00 0B 00 00 20 03 00 00 C0 02' - '00 00 C8 00 00 00 F0 00 00 00 F2 00 00 00 FC 01' - '00 00 FC 83 00 00 FF 07 00 00 FF 2F 00 00 28 00' - '00 00 30 00 00 00 60 00 00 00 01 00 08 00 00 00' - '00 00 00 09 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 01 01 01 00 02 02' - '02 00 05 05 05 00 06 06 06 00 07 07 07 00 08 08' - '08 00 09 09 09 00 0B 0B 0B 00 0C 0C 0C 00 18 18' - '18 00 19 19 19 00 1E 1E 1E 00 1F 1F 1F 00 20 20' - '20 00 21 21 21 00 22 22 22 00 24 24 24 00 26 26' - '26 00 27 27 27 00 28 28 28 00 29 29 29 00 2B 2B' - '2B 00 2C 2C 2C 00 2F 2F 2F 00 34 34 34 00 35 35' - '35 00 39 39 39 00 3B 3B 3B 00 3D 3D 3D 00 3F 3F' - '3F 00 40 40 40 00 41 41 41 00 47 47 47 00 48 48' - '48 00 49 49 49 00 4B 4B 4B 00 53 53 53 00 56 56' - '56 00 59 59 59 00 5D 5D 5D 00 5F 5F 5F 00 61 61' - '61 00 64 64 64 00 68 68 68 00 6A 6A 6A 00 6C 6C' - '6C 00 70 70 70 00 71 71 71 00 72 72 72 00 74 74' - '74 00 75 75 75 00 77 77 77 00 78 78 78 00 79 79' - '79 00 7A 7A 7A 00 7D 7D 7D 00 7E 7E 7E 00 7F 7F' - '7F 00 00 80 80 00 00 FF FF 00 80 80 80 00 81 81' - '81 00 83 83 83 00 85 85 85 00 87 87 87 00 88 88' - '88 00 8A 8A 8A 00 8D 8D 8D 00 8E 8E 8E 00 8F 8F' - '8F 00 90 90 90 00 92 92 92 00 93 93 93 00 97 97' - '97 00 98 98 98 00 99 99 99 00 9A 9A 9A 00 9C 9C' - '9C 00 9D 9D 9D 00 9F 9F 9F 00 A0 A0 A0 00 A2 A2' - 'A2 00 A4 A4 A4 00 A5 A5 A5 00 A7 A7 A7 00 A8 A8' - 'A8 00 A9 A9 A9 00 AB AB AB 00 AD AD AD 00 AE AE' - 'AE 00 B0 B0 B0 00 B2 B2 B2 00 B3 B3 B3 00 B6 B6' - 'B6 00 B7 B7 B7 00 B8 B8 B8 00 B9 B9 B9 00 BA BA' - 'BA 00 BB BB BB 00 BC BC BC 00 BD BD BD 00 BE BE' - 'BE 00 BF BF BF 00 C0 C0 C0 00 C1 C1 C1 00 C2 C2' - 'C2 00 C3 C3 C3 00 C4 C4 C4 00 C5 C5 C5 00 C6 C6' - 'C6 00 C7 C7 C7 00 C8 C8 C8 00 C9 C9 C9 00 CA CA' - 'CA 00 CB CB CB 00 CC CC CC 00 CD CD CD 00 CE CE' - 'CE 00 CF CF CF 00 D0 D0 D0 00 D1 D1 D1 00 D2 D2' - 'D2 00 D3 D3 D3 00 D4 D4 D4 00 D5 D5 D5 00 D6 D6' - 'D6 00 D7 D7 D7 00 D8 D8 D8 00 D9 D9 D9 00 DA DA' - 'DA 00 DB DB DB 00 DC DC DC 00 DD DD DD 00 DE DE' - 'DE 00 DF DF DF 00 E0 E0 E0 00 E1 E1 E1 00 E2 E2' - 'E2 00 E3 E3 E3 00 E4 E4 E4 00 E5 E5 E5 00 E6 E6' - 'E6 00 E7 E7 E7 00 E8 E8 E8 00 E9 E9 E9 00 EA EA' - 'EA 00 EB EB EB 00 EC EC EC 00 ED ED ED 00 EE EE' - 'EE 00 EF EF EF 00 F0 F0 F0 00 F1 F1 F1 00 F2 F2' - 'F2 00 F3 F3 F3 00 F4 F4 F4 00 F5 F5 F5 00 F6 F6' - 'F6 00 F7 F7 F7 00 F8 F8 F8 00 F9 F9 F9 00 FA FA' - 'FA 00 FF FF FF 00 00 00 00 00 10 19 95 00 42 00' - '00 00 00 00 00 00 F4 18 95 00 00 00 00 00 00 00' - '00 00 00 00 00 00 0C 00 00 00 02 00 00 00 01 01' - 'F5 77 00 EC FD 7F 58 00 00 00 00 00 00 00 03 00' - '00 00 60 00 1A 02 40 9F 07 00 00 00 00 00 40 9F' - '07 00 05 00 00 00 BE B3 E7 77 4C 19 95 00 A3 B4' - 'E7 77 F8 00 00 00 00 00 00 C0 00 00 00 00 00 00' - '00 00 02 00 00 00 80 00 00 00 00 00 00 00 8C 1A' - '95 00 7F E9 4B 00 88 36 0C 01 00 00 00 C0 00 00' - '00 00 80 1A 95 00 02 00 00 00 80 00 00 00 00 00' - '00 00 C0 27 95 00 C4 F5 AF 00 02 00 00 00 44 3A' - '5C 6F 73 65 78 70 65 72 74 73 5C 72 65 61 63 74' - '6F 73 5C 6C 69 62 5C 73 68 65 6C 6C 33 32 5C 72' - '61 6D 64 69 73 6B 2E 69 63 6F 00 93 4B 00 14 1A' - '95 00 1F 3B D4 77 11 00 00 00 88 00 00 00 4F 3B' - 'D4 77 E0 19 95 00 33 3B D4 77 64 C5 F5 77 A9 F1' - 'E7 77 F8 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 1A 95 00 70 63 0C 01 76 00 00 00 00 00' - '00 00 C9 F1 E7 77 76 00 00 00 A4 1A 95 00 07 00' - '00 00 00 00 00 00 76 00 00 00 76 00 00 00 07 00' - '00 00 F4 19 95 00 33 3B D4 77 B4 1A 95 00 09 48' - 'E9 77 B8 10 E9 77 FF FF FF FF C9 F1 E7 77 16 EA' - '4B 00 F8 00 00 00 70 63 0C 01 76 00 00 00 58 1A' - '95 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 A4 A4' - 'A4 A4 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 A4 A4 3D' - '3D A4 A4 3B 3B A4 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 A4 A4 3D A4' - '3D 3D A4 3C 3B A4 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 A4 A4 3D A4 A4' - '3D A4 68 3C 3C A4 00 A4 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 A4 A4 3D A4 A4 A4' - '3D A4 A4 A4 3C A4 00 3B A4 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 A4 A4 3D A4 A4 A4 3D' - 'A4 3D A4 A4 3D A4 00 3B 3B 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 A4 3D A4 A4 A4 3D A4' - 'A4 A4 3D A4 A4 3D 00 3C 3B A4 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 A4 A4 A4 A4 A4 A4' - 'A4 A4 A4 A4 A4 A4 A4 A4 A4 3D A4 A4 A4 3D A4 A4' - 'A4 A4 A4 3D A4 A4 68 3C 3C A4 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 A4 A4 A4 A4 A4 A4 A4 A4' - 'A4 A4 A4 A4 A4 A4 A4 A4 3D A4 A4 A4 3D A4 A4 A4' - 'A4 A4 A4 A4 3D A4 A4 A4 3C A4 00 3B A4 00 00 00' - '00 00 00 00 00 00 00 A4 A4 A4 A4 0F 17 16 17 16' - '16 16 16 16 16 16 16 3D A4 A4 A4 3D A4 A4 A4 A4' - '3D A4 A4 A4 A4 3D A4 A4 3D A4 00 3B 3B A4 00 00' - '00 00 00 00 00 00 00 A4 A4 12 47 72 75 73 76 75' - '74 73 71 6F 6E 6D 6C 3D A4 A4 3D A4 A4 A4 A4 3D' - 'A4 3D A4 A4 A4 A4 3D A4 A4 3D A4 3C 3B A4 00 00' - '00 00 00 00 00 00 A4 A4 01 43 93 90 8F 7D 40 42' - '48 4B 52 59 62 68 6B 3D A4 3D A4 A4 A4 A4 3D A4' - '3D A4 3D A4 A4 A4 A4 3D A4 A4 68 3C 3C A4 00 A4' - '00 00 00 00 00 00 A4 A4 0B 6F 94 8A 8E 73 1C 1E' - '26 31 41 48 4F 54 56 3D 3D A4 A4 A4 A4 3D A4 3D' - 'A4 3D A4 A4 A4 A4 A4 A4 3D A4 A4 A4 3C A4 00 3B' - 'A4 00 00 00 00 00 A4 A4 15 79 92 8C 8F 75 21 29' - '36 41 46 4A 51 3B 3B A4 68 A4 A4 A4 A4 A4 3D A4' - '3D A4 A4 A4 A4 A4 A4 A4 A4 3D A4 A4 3D A4 00 3B' - '3B A4 00 00 00 00 A4 A4 14 79 94 8E 8F 79 2C 32' - '39 40 45 4A 51 3B 3B A4 A4 68 A4 A4 A4 A4 A4 3D' - 'A4 A4 A4 A4 3D A4 A4 A4 A4 A4 3D A4 A4 3D A4 3C' - '3B A4 00 00 00 00 A4 A4 14 79 96 8F 90 7E 2F 30' - '38 40 45 4A 51 3C 3C 3C 3C 4E 68 A4 A4 A4 A4 A4' - 'A4 A4 A4 A4 A4 3D A4 A4 A4 A4 A4 3D A4 A4 68 3C' - '3C A4 00 A4 00 00 A4 A4 13 79 97 91 93 7E 2D 2E' - '35 3E 43 49 4E 4E 3C 3C 4E 4E 4E 68 A4 A4 A4 A4' - 'A4 A4 3D A4 A4 A4 3D A4 A4 A4 A4 A4 3D A4 A4 A4' - '3C A4 00 3B A4 00 A4 A4 13 7A 9A 93 92 87 55 55' - '58 5A 5B 5D 5E 61 61 62 65 3B 3B A4 68 A4 A4 A4' - 'A4 A4 A4 3D A4 A4 A4 3D A4 A4 A4 A4 A4 3D A4 A4' - '3D A4 A4 3B 3B A4 A4 A4 12 7B 9B 93 93 92 95 93' - '91 90 8E 8C 8A 89 87 86 83 3B 3B A4 A4 68 A4 A4' - 'A4 A4 A4 A4 3D A4 A4 A4 3D A4 A4 A4 A4 A4 3D A4' - 'A4 3D A4 3C 3B A4 A4 A4 12 7B 9F A0 9E 9E 9E 9D' - '9D 9C 9C 9B 9B 9B 9A 9A 99 3C 3C 3C 3C 99 68 A4' - 'A4 A4 A4 A4 A4 3D A4 A4 A4 3D A4 A4 A4 A4 A4 3D' - 'A4 A4 68 3C 3C A4 A4 A4 11 7E A3 91 89 8A 8A 88' - '87 87 87 87 87 88 88 88 88 88 3C 3C 81 81 81 68' - 'A4 A4 A4 A4 A4 A4 3D A4 A4 A4 A4 A4 A4 A4 A4 A4' - '3D A4 A4 A4 3C A4 A4 A4 11 86 A0 81 6C 63 67 80' - '82 81 81 81 81 81 81 81 81 81 81 81 81 3B 3B A4' - '68 A4 A4 A4 A4 A4 A4 3D A4 A4 A4 A4 A4 A4 A4 A4' - 'A4 3D A4 A4 3D A4 A4 A4 0D 82 9B 6E 57 5F 5B 6B' - '82 80 80 80 80 80 7F 7F 7F 7F 7F 7F 7F 3B 3B A4' - 'A4 68 A4 A4 A4 A4 A4 A4 A4 A4 3D 3D 3D A4 A4 A4' - 'A4 A4 3D A4 3D A4 A4 A4 03 6A 9E 64 5C 6B 58 63' - '80 7D 7D 7D 7C 7B 7B 7D 7F 80 80 7F 7D 3C 3C 3C' - '3C 7F 68 A4 A4 A4 A4 A4 A4 3D A4 3D A4 3D A4 A4' - 'A4 A4 A4 3D 68 A4 00 A4 A4 53 9C 77 6D 7A 67 71' - '7B 7A 78 7B 85 89 8B 8E 92 95 95 93 8F 8F 3C 3C' - '8F 8F 7F 68 A4 A4 A4 A4 A4 3D 3D A4 3D 3D A4 A4' - 'A4 A4 A4 68 A4 A4 00 A4 A4 39 97 79 77 73 77 79' - '76 77 87 98 94 89 86 85 84 83 83 84 85 86 89 94' - '99 3B 3B A4 68 A4 A4 A4 A4 3D A4 3D A4 3D A4 A4' - 'A4 A4 68 A4 A4 00 00 A4 A4 27 91 78 75 75 75 72' - '7E 95 8E 84 7C 7D 7E 7E 7E 7E 7E 7E 7E 7E 7D 7D' - '83 3B 3B A4 A4 68 A4 A4 A4 A4 3D 3D 3D A4 A4 A4' - 'A4 68 A4 A4 00 00 00 A4 A4 1F 7F 7A 72 73 72 7C' - '91 84 78 79 7A 7A 7A 7A 7A 7A 7A 7A 7A 7A 7A 7A' - '79 3C 3C 3C 3C 4C 68 A4 A4 A4 A4 A4 A4 A4 A4 A4' - '68 A4 A4 00 00 00 00 A4 A4 10 5F 83 72 73 76 8C' - '7C 77 79 78 78 78 78 77 75 76 76 76 76 76 76 76' - '76 76 3C 3C 77 77 4C 68 A4 A4 A4 A4 A4 A4 A4 68' - 'A4 A4 00 00 00 00 00 A4 A4 05 50 85 74 75 83 7E' - '76 78 78 78 78 78 78 77 74 71 72 72 72 72 72 72' - '72 72 72 70 77 3B 3B A4 68 A4 A4 A4 A4 A4 68 A4' - 'A4 00 00 00 00 00 00 00 A4 A4 3F 85 77 79 83 79' - '78 78 78 78 78 78 78 78 77 71 6D 6E 6E 6E 6E 6E' - '6E 6E 6E 6E 6F 3B 3B A4 A4 68 A4 A4 A4 68 A4 A4' - '00 00 00 00 00 00 00 00 A4 A4 29 84 79 7A 7C 79' - '79 79 79 79 79 79 79 79 79 78 70 6B 6B 6B 6C 6C' - '6C 6C 6C 6C 6C 3C 3C 3C 3C 07 68 A4 68 A4 A4 00' - '00 00 00 00 00 00 00 00 A4 A4 20 80 7C 7A 78 7B' - '7B 7B 7B 7B 7B 7B 7B 7B 7B 7B 7B 75 6F 6C 6A 69' - '68 69 69 69 6A 6A 3C 3C 4C 07 A4 68 A4 A4 00 00' - '00 00 00 00 00 00 00 00 A4 A4 17 74 7E 7D 74 7D' - '7E 7E 7E 7E 7E 7E 7E 7E 7E 7E 7E 7F 7E 7D 7B 77' - '74 71 6E 6C 6A 5D 65 78 4C 07 A4 A4 00 00 00 00' - '00 00 00 00 00 00 00 00 A4 A4 0A 5B 83 83 78 7A' - '83 81 82 82 82 82 82 82 82 82 82 82 82 82 82 83' - '83 82 81 81 77 6D 74 72 37 02 A4 00 00 00 00 00' - '00 00 00 00 00 00 00 00 A4 A4 06 4A 84 87 84 76' - '7E 86 85 85 85 85 85 85 85 85 85 85 85 85 85 85' - '85 85 86 80 76 85 84 6E 25 A4 A4 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 A4 A4 34 7B 8A 89 86' - '76 7F 89 8A 88 88 88 88 88 88 88 88 88 88 88 88' - '89 89 81 75 82 8B 81 63 1B A4 A4 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 A4 A4 24 71 8D 8B 8C' - '89 7F 7A 82 8C 8D 8C 8C 8C 8C 8C 8C 8C 8C 8D 8D' - '84 7A 7E 88 8C 8E 7E 56 0E A4 A4 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 A4 A4 1A 65 8E 8E 8E' - '8F 8F 87 7A 7B 86 8B 8B 8C 8C 8C 8C 8B 8B 86 7C' - '79 85 8F 8F 8E 90 7C 4D 08 A4 A4 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 A4 A4 0C 58 8C 95 8F' - '8E 94 93 92 8C 88 87 87 85 84 84 85 87 87 87 8A' - '91 94 92 8D 93 93 7E 43 A4 A4 A4 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 A4 A4 06 4C 8C 87 65' - '69 7E 94 95 95 96 96 95 94 93 93 94 95 96 96 95' - '96 8C 6A 66 79 94 7C 33 A4 A4 A4 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 A4 A4 44 88 6C 5C' - '60 5C 93 99 98 98 98 98 98 98 98 98 98 98 98 98' - '9B 7D 5B 5E 5F 93 75 2A A4 A4 A4 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 A4 A4 2B 76 85 84' - '7D 8C A1 A1 A1 A1 A1 A1 A1 A1 A1 A1 A1 A1 A1 A1' - 'A2 9A 87 80 84 7F 5B 19 A4 A4 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 A4 A4 0B 3D 66 7B' - '7F 83 80 80 80 80 80 80 80 80 80 80 80 80 80 80' - '80 81 81 7F 75 5B 28 04 A4 A4 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 A4 A4 A4 09 1D 23' - '22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22' - '22 22 22 23 23 18 02 A4 A4 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 A4 A4 A4 A4 A4' - 'A4 A4 A4 A4 A4 A4 A4 A4 A4 A4 A4 A4 A4 A4 A4 A4' - 'A4 A4 A4 A4 A4 A4 A4 A4 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 A4 A4 A4' - 'A4 A4 A4 A4 A4 A4 A4 A4 A4 A4 A4 A4 A4 A4 A4 A4' - 'A4 A4 A4 A4 A4 A4 A4 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 FF FF FF 0F FF FF 00 00 FF FF' - 'FE 00 FF FF 00 00 FF FF FC 00 FF FF 00 00 FF FF' - 'F8 00 BF FF 00 00 FF FF F0 00 9F FF 00 00 FF FF' - 'E0 00 9F FF 00 00 FF FF E0 00 8F FF 00 00 F0 00' - '00 00 0F FF 00 00 C0 00 00 00 09 FF 00 00 80 00' - '00 00 08 FF 00 00 80 00 00 00 00 FF 00 00 00 00' - '00 00 00 BF 00 00 00 00 00 00 00 9F 00 00 00 00' - '00 00 00 8F 00 00 00 00 00 00 00 0F 00 00 00 00' - '00 00 00 0B 00 00 00 00 00 00 00 09 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 80 00 00 00 00 00 00 00 80 00' - '00 00 00 01 00 00 80 00 00 00 00 03 00 00 80 00' - '00 00 00 07 00 00 80 00 00 00 00 0F 00 00 80 00' - '00 00 00 1F 00 00 C0 00 00 00 00 3F 00 00 C0 00' - '00 00 00 7F 00 00 C0 00 00 00 00 FF 00 00 C0 00' - '00 00 03 FF 00 00 C0 00 00 00 07 FF 00 00 C0 00' - '00 00 07 FF 00 00 E0 00 00 00 07 FF 00 00 E0 00' - '00 00 07 FF 00 00 E0 00 00 00 07 FF 00 00 E0 00' - '00 00 07 FF 00 00 E0 00 00 00 07 FF 00 00 F0 00' - '00 00 07 FF 00 00 F0 00 00 00 0F FF 00 00 F0 00' - '00 00 0F FF 00 00 F0 00 00 00 1F FF 00 00 F8 00' - '00 00 3F FF 00 00 FE 00 00 00 7F FF 00 00 FF FF' - 'FF FF FF FF 00 00 28 00 00 00 30 00 00 00 60 00' - '00 00 01 00 04 00 00 00 00 00 80 04 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 80 00 00 00 00 80 00 00 80 80 00 00 00 00' - '80 00 80 00 80 00 00 80 80 00 C0 C0 C0 00 80 80' - '80 00 FF 00 00 00 00 FF 00 00 FF FF 00 00 00 00' - 'FF 00 FF 00 FF 00 00 FF FF 00 FF FF FF 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 08 80 06 60 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 80 88 0E 60 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 08 00 80 7E E0 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 80 00 80 00 E0 06 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '08 00 08 08 00 80 06 60 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 80 00 80 00 80 08 0E 60' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 08' - '00 08 00 00 08 00 7E E0 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 80 00 80 00 00 00 80 00 E0' - '06 00 00 00 00 00 00 00 00 00 00 00 00 00 08 00' - '08 00 00 80 00 08 00 80 06 60 00 00 00 00 00 00' - '87 77 77 77 77 77 78 00 80 00 08 08 00 00 80 08' - '0E 60 00 00 00 00 00 08 FF F7 88 88 77 77 78 08' - '00 00 80 80 80 00 08 00 7E E0 00 00 00 00 00 07' - 'FF F7 00 88 88 87 78 80 00 08 08 08 00 00 00 80' - '00 E0 06 00 00 00 00 07 FF F7 88 88 88 76 60 70' - '00 00 80 80 00 00 00 08 00 80 06 60 00 00 00 07' - 'FF F7 88 88 88 76 60 07 00 00 08 00 00 80 00 00' - '80 08 0E 60 00 00 00 07 FF F7 88 88 88 7E EE E8' - '70 00 00 00 00 08 00 00 08 00 7E E0 00 00 00 07' - 'FF F7 88 88 88 88 EE 88 87 00 00 00 80 00 80 00' - '00 80 00 E0 06 00 00 07 FF F7 77 77 77 77 77 76' - '60 70 00 00 08 00 08 00 00 08 00 80 06 60 00 07' - 'FF FF FF FF FF FF 77 76 60 07 00 00 00 80 00 80' - '00 00 80 08 0E 60 00 07 FF FF FF FF FF FF FF FE' - 'EE EF 70 00 00 08 00 08 00 00 08 00 7E E0 00 07' - 'FF FF FF 77 77 7F FF FF EE 77 77 00 00 00 80 00' - '00 00 00 80 00 E0 00 07 77 77 F7 77 77 77 77 77' - '77 76 60 70 00 00 08 00 00 00 00 08 00 80 00 07' - '77 77 F7 77 77 77 77 77 77 76 60 07 00 00 00 00' - '88 80 00 00 80 80 00 07 77 7F F7 77 77 77 77 77' - '77 7E EE E7 70 00 00 08 08 08 00 00 08 70 00 07' - 'FF FF 77 77 77 7F FF FF FF FF EE FF 77 00 00 08' - '80 88 00 00 07 00 00 08 77 77 77 77 7F FF 77 77' - '77 77 FF F6 60 70 00 08 08 08 00 00 70 00 00 08' - '77 77 77 7F F7 77 77 77 77 77 77 76 60 07 00 00' - '88 80 00 07 00 00 00 00 77 77 77 F7 77 77 77 77' - '77 77 77 7E EE E8 70 00 00 00 00 70 00 00 00 00' - '77 77 7F 77 77 77 77 77 77 77 77 77 EE 77 87 00' - '00 00 07 00 00 00 00 00 87 77 77 77 77 77 77 77' - '77 77 77 77 77 76 60 70 00 00 70 00 00 00 00 00' - '87 77 77 77 77 77 77 77 77 77 77 77 77 76 60 07' - '00 07 00 00 00 00 00 00 87 77 77 77 77 77 77 77' - '77 77 77 77 77 7E EE E0 70 70 00 00 00 00 00 00' - '87 77 77 77 77 77 77 77 77 77 77 77 77 77 EE 80' - '07 00 00 00 00 00 00 00 07 77 77 77 77 77 77 77' - '77 77 77 77 77 77 77 80 00 00 00 00 00 00 00 00' - '07 77 77 77 77 77 77 77 77 77 77 77 77 77 77 80' - '00 00 00 00 00 00 00 00 08 77 77 77 77 77 77 77' - '77 77 77 77 77 77 77 80 00 00 00 00 00 00 00 00' - '08 77 77 77 77 77 77 77 77 77 77 77 77 77 77 00' - '00 00 00 00 00 00 00 00 08 77 77 77 77 77 77 77' - '77 77 77 77 77 77 77 00 00 00 00 00 00 00 00 00' - '00 77 77 77 77 77 77 77 77 77 77 77 77 77 78 00' - '00 00 00 00 00 00 00 00 00 7F FF FF F7 77 77 77' - '77 77 77 7F FF FF 78 00 00 00 00 00 00 00 00 00' - '00 8F 77 77 F7 77 77 77 77 77 77 FF 77 7F 78 00' - '00 00 00 00 00 00 00 00 00 8F 77 77 F7 77 77 77' - '77 77 77 F7 77 7F 78 00 00 00 00 00 00 00 00 00' - '00 87 77 7F F7 77 77 77 77 77 77 FF 77 77 70 00' - '00 00 00 00 00 00 00 00 00 08 77 77 77 77 77 77' - '77 77 77 77 77 77 80 00 00 00 00 00 00 00 00 00' - '00 00 08 88 88 88 88 88 88 88 88 88 88 80 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF' - 'FF 01 FF FF 00 00 FF FF FE 00 FF FF 00 00 FF FF' - 'FC 00 FF FF 00 00 FF FF F8 00 BF FF 00 00 FF FF' - 'F0 00 9F FF 00 00 FF FF F0 00 8F FF 00 00 FF FF' - 'E0 00 8F FF 00 00 F0 00 00 00 0F FF 00 00 C0 00' - '00 00 09 FF 00 00 80 00 00 00 08 FF 00 00 80 00' - '00 00 00 FF 00 00 00 00 00 00 00 BF 00 00 00 00' - '00 00 00 9F 00 00 00 00 00 00 00 8F 00 00 00 00' - '00 00 00 0F 00 00 00 00 00 00 00 0B 00 00 00 00' - '00 00 00 09 00 00 00 00 00 00 00 08 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 00' - '00 00 00 00 00 00 80 00 00 00 00 01 00 00 80 00' - '00 00 00 03 00 00 80 00 00 00 00 07 00 00 80 00' - '00 00 00 0F 00 00 80 00 00 00 00 1F 00 00 C0 00' - '00 00 00 3F 00 00 C0 00 00 00 00 7F 00 00 C0 00' - '00 00 00 FF 00 00 C0 00 00 00 03 FF 00 00 C0 00' - '00 00 07 FF 00 00 C0 00 00 00 07 FF 00 00 E0 00' - '00 00 07 FF 00 00 E0 00 00 00 07 FF 00 00 E0 00' - '00 00 07 FF 00 00 E0 00 00 00 07 FF 00 00 E0 00' - '00 00 07 FF 00 00 F0 00 00 00 07 FF 00 00 F0 00' - '00 00 0F FF 00 00 F0 00 00 00 0F FF 00 00 F0 00' - '00 00 1F FF 00 00 F8 00 00 00 3F FF 00 00 FE 00' - '00 00 7F FF 00 00 FF FF FF FF FF FF 00 00 28 00' - '00 00 30 00 00 00 60 00 00 00 01 00 20 00 00 00' - '00 00 00 24 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 3C 00 00' - '00 78 00 00 00 78 00 00 00 3C 00 00 00 30 00 00' - '00 6C 00 00 00 6C 00 00 00 24 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 3C 80 80 80 FF 80 80' - '80 FF 00 00 00 B4 00 00 00 84 00 80 80 FF 00 80' - '80 FF 00 00 00 90 00 00 00 30 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 3C 80 80 80 FF 00 00 00 FF 80 80' - '80 FF 80 80 80 FF 00 00 00 B4 00 FF FF FF 00 80' - '80 FF 00 00 00 90 00 00 00 30 00 00 00 0C 00 00' - '00 18 00 00 00 0C 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 3C 80 80 80 FF 00 00 00 FF 00 00 00 FF 80 80' - '80 FF 00 00 00 FF C0 C0 C0 FF 00 FF FF FF 00 FF' - 'FF FF 00 00 00 90 00 00 00 30 00 00 00 24 00 00' - '00 54 00 00 00 3C 00 00 00 0C 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 3C 80 80' - '80 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 80 80' - '80 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 FF' - 'FF FF 00 00 00 9C 00 00 00 48 00 80 80 FF 00 00' - '00 84 00 00 00 78 00 00 00 24 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 3E 80 80 80 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 80 80 80 FF 00 00' - '00 FF 80 80 80 FF 00 00 00 FF 00 00 00 FF 80 80' - '80 FF 00 00 00 B4 00 00 00 84 00 80 80 FF 00 80' - '80 FF 00 00 00 90 00 00 00 30 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 3E 80 80 80 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 80 80 80 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 80 80 80 FF 00 00 00 FF 00 00' - '00 FF 80 80 80 FF 00 00 00 00 00 FF FF FF 00 80' - '80 FF 00 00 00 90 00 00 00 30 00 00 00 00 00 00' - '00 18 00 00 00 0C 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 16 00 00 00 34 00 00' - '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' - '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' - '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' - '00 3E 80 80 80 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 80 80 80 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 80 80 80 FF 00 00' - '00 FF 00 00 00 FF C0 C0 C0 FF 00 FF FF FF 00 FF' - 'FF FF 00 00 00 90 00 00 00 30 00 00 00 00 00 00' - '00 54 00 00 00 3C 00 00 00 0C 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 05 00 00 00 69 00 00 00 C5 00 00 00 F7 00 00' - '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' - '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' - '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 80 80' - '80 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 80 80' - '80 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 80 80' - '80 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 FF' - 'FF FF 00 00 00 90 00 00 00 30 00 80 80 FF 00 00' - '00 84 00 00 00 78 00 00 00 24 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 05 00 00' - '00 9B 00 00 00 FF 00 00 00 FF 21 21 21 FF 2C 2C' - '2C FF 2B 2B 2B FF 2C 2C 2C FF 2B 2B 2B FF 2B 2B' - '2B FF 2B 2B 2B FF 2B 2B 2B FF 2B 2B 2B FF 2B 2B' - '2B FF 2B 2B 2B FF 2B 2B 2B FF 80 80 80 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 80 80 80 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 80 80' - '80 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 80 80 80 FF 00 00 00 FF 00 00 00 FF 80 80' - '80 FF 00 00 00 90 00 00 00 30 00 80 80 FF 00 80' - '80 FF 00 00 00 90 00 00 00 30 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 54 00 00' - '00 FF 26 26 26 FF 90 90 90 FF CA CA CA FF CD CD' - 'CD FF CB CB CB FF CE CE CE FF CD CD CD FF CC CC' - 'CC FF CB CB CB FF C9 C9 C9 FF C7 C7 C7 FF C6 C6' - 'C6 FF C5 C5 C5 FF C4 C4 C4 FF 80 80 80 FF 00 00' - '00 FF 00 00 00 FF 80 80 80 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 80 80 80 FF 00 00' - '00 FF 80 80 80 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 80 80 80 FF 00 00 00 FF 00 00' - '00 FF 80 80 80 FF 00 00 00 84 00 FF FF FF 00 80' - '80 FF 00 00 00 90 00 00 00 30 00 00 00 0C 00 00' - '00 18 00 00 00 0C 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 03 00 00 00 AD 01 01' - '01 FF 8A 8A 8A FF EB EB EB FF E8 E8 E8 FF E7 E7' - 'E7 FF D5 D5 D5 FF 85 85 85 FF 88 88 88 FF 92 92' - '92 FF 98 98 98 FF A2 A2 A2 FF AD AD AD FF BA BA' - 'BA FF C0 C0 C0 FF C3 C3 C3 FF 80 80 80 FF 00 00' - '00 FF 80 80 80 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 80 80 80 FF 00 00 00 FF 80 80' - '80 FF 00 00 00 FF 80 80 80 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 80 80 80 FF 00 00' - '00 FF 00 00 00 FF C0 C0 C0 FF 00 FF FF FF 00 FF' - 'FF FF 00 00 00 90 00 00 00 30 00 00 00 24 00 00' - '00 54 00 00 00 3C 00 00 00 0C 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 15 00 00 00 F0 19 19' - '19 FF C7 C7 C7 FF EC EC EC FF E2 E2 E2 FF E6 E6' - 'E6 FF CB CB CB FF 3B 3B 3B FF 3F 3F 3F FF 56 56' - '56 FF 72 72 72 FF 87 87 87 FF 92 92 92 FF 9D 9D' - '9D FF A5 A5 A5 FF A8 A8 A8 FF 80 80 80 FF 80 80' - '80 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 80 80 80 FF 00 00 00 FF 80 80 80 FF 00 00' - '00 FF 80 80 80 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 80 80' - '80 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 FF' - 'FF FF 00 00 00 9C 00 00 00 48 00 80 80 FF 00 00' - '00 84 00 00 00 78 00 00 00 24 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 30 00 00 00 FA 29 29' - '29 FF D1 D1 D1 FF EA EA EA FF E4 E4 E4 FF E7 E7' - 'E7 FF CD CD CD FF 47 47 47 FF 5F 5F 5F FF 79 79' - '79 FF 87 87 87 FF 8F 8F 8F FF 97 97 97 FF A0 A0' - 'A0 FF 00 80 80 FF 00 80 80 FF 00 00 00 FF C0 C0' - 'C0 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 80 80 80 FF 00 00 00 FF 80 80' - '80 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 80 80 80 FF 00 00 00 FF 00 00 00 FF 80 80' - '80 FF 00 00 00 B4 00 00 00 84 00 80 80 FF 00 80' - '80 FF 00 00 00 90 00 00 00 30 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 34 00 00 00 F9 28 28' - '28 FF D1 D1 D1 FF EC EC EC FF E6 E6 E6 FF E7 E7' - 'E7 FF D1 D1 D1 FF 68 68 68 FF 74 74 74 FF 7E 7E' - '7E FF 85 85 85 FF 8E 8E 8E FF 97 97 97 FF A0 A0' - 'A0 FF 00 80 80 FF 00 80 80 FF 00 00 00 FF 00 00' - '00 FF C0 C0 C0 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 80 80 80 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 80 80' - '80 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 80 80 80 FF 00 00 00 FF 00 00' - '00 FF 80 80 80 FF 00 00 00 B4 00 FF FF FF 00 80' - '80 FF 00 00 00 90 00 00 00 30 00 00 00 0C 00 00' - '00 18 00 00 00 0C 00 00 00 33 00 00 00 F9 28 28' - '28 FF D1 D1 D1 FF EE EE EE FF E7 E7 E7 FF E8 E8' - 'E8 FF D6 D6 D6 FF 70 70 70 FF 71 71 71 FF 7D 7D' - '7D FF 85 85 85 FF 8E 8E 8E FF 97 97 97 FF A0 A0' - 'A0 FF 00 FF FF FF 00 FF FF FF 00 FF FF FF 00 FF' - 'FF FF 9C 9C 9C FF C0 C0 C0 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 80 80 80 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 80 80 80 FF 00 00' - '00 FF 00 00 00 FF C0 C0 C0 FF 00 FF FF FF 00 FF' - 'FF FF 00 00 00 90 00 00 00 30 00 00 00 24 00 00' - '00 54 00 00 00 3C 00 00 00 33 00 00 00 F9 27 27' - '27 FF D1 D1 D1 FF EF EF EF FF E9 E9 E9 FF EB EB' - 'EB FF D6 D6 D6 FF 6A 6A 6A FF 6C 6C 6C FF 78 78' - '78 FF 81 81 81 FF 8A 8A 8A FF 93 93 93 FF 9C 9C' - '9C FF 9C 9C 9C FF 00 FF FF FF 00 FF FF FF 9C 9C' - '9C FF 9C 9C 9C FF 9C 9C 9C FF C0 C0 C0 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 80 80 80 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 80 80 80 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 80 80' - '80 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 FF' - 'FF FF 00 00 00 9C 00 00 00 48 00 80 80 FF 00 00' - '00 84 00 00 00 78 00 00 00 33 00 00 00 F9 27 27' - '27 FF D2 D2 D2 FF F2 F2 F2 FF EB EB EB FF EA EA' - 'EA FF DF DF DF FF A7 A7 A7 FF A7 A7 A7 FF AB AB' - 'AB FF AE AE AE FF B0 B0 B0 FF B3 B3 B3 FF B6 B6' - 'B6 FF B9 B9 B9 FF B9 B9 B9 FF BA BA BA FF BD BD' - 'BD FF 00 80 80 FF 00 80 80 FF 00 00 00 FF C0 C0' - 'C0 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 80 80 80 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 80 80 80 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 80 80 80 FF 00 00 00 FF 00 00 00 FF 80 80' - '80 FF 00 00 00 B4 00 00 00 84 00 80 80 FF 00 80' - '80 FF 00 00 00 90 00 00 00 33 00 00 00 F9 26 26' - '26 FF D3 D3 D3 FF F3 F3 F3 FF EB EB EB FF EB EB' - 'EB FF EA EA EA FF ED ED ED FF EB EB EB FF E9 E9' - 'E9 FF E8 E8 E8 FF E6 E6 E6 FF E4 E4 E4 FF E2 E2' - 'E2 FF E1 E1 E1 FF DF DF DF FF DE DE DE FF DB DB' - 'DB FF 00 80 80 FF 00 80 80 FF 00 00 00 FF 00 00' - '00 FF C0 C0 C0 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 80 80' - '80 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 80 80' - '80 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 80 80 80 FF 00 00 00 FF 00 00' - '00 FF 80 80 80 FF 00 00 00 B4 00 FF FF FF 00 80' - '80 FF 00 00 00 90 00 00 00 33 00 00 00 F9 26 26' - '26 FF D3 D3 D3 FF F7 F7 F7 FF F8 F8 F8 FF F6 F6' - 'F6 FF F6 F6 F6 FF F6 F6 F6 FF F5 F5 F5 FF F5 F5' - 'F5 FF F4 F4 F4 FF F4 F4 F4 FF F3 F3 F3 FF F3 F3' - 'F3 FF F3 F3 F3 FF F2 F2 F2 FF F2 F2 F2 FF F1 F1' - 'F1 FF 00 FF FF FF 00 FF FF FF 00 FF FF FF 00 FF' - 'FF FF F1 F1 F1 FF C0 C0 C0 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 80 80 80 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 80 80 80 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 80 80 80 FF 00 00' - '00 FF 00 00 00 FF C0 C0 C0 FF 00 FF FF FF 00 FF' - 'FF FF 00 00 00 90 00 00 00 33 00 00 00 F9 24 24' - '24 FF D6 D6 D6 FF FF FF FF FF E9 E9 E9 FF E1 E1' - 'E1 FF E2 E2 E2 FF E2 E2 E2 FF E0 E0 E0 FF DF DF' - 'DF FF DF DF DF FF DF DF DF FF DF DF DF FF DF DF' - 'DF FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' - 'E0 FF E0 E0 E0 FF 00 FF FF FF 00 FF FF FF D9 D9' - 'D9 FF D9 D9 D9 FF D9 D9 D9 FF C0 C0 C0 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 80 80 80 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 80 80' - '80 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 FF' - 'FF FF 00 00 00 90 00 00 00 34 00 00 00 FA 24 24' - '24 FF DE DE DE FF F8 F8 F8 FF D9 D9 D9 FF C4 C4' - 'C4 FF BB BB BB FF BF BF BF FF D8 D8 D8 FF DA DA' - 'DA FF D9 D9 D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9' - 'D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9' - 'D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9' - 'D9 FF 00 80 80 FF 00 80 80 FF 00 00 00 FF C0 C0' - 'C0 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 80 80 80 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 80 80 80 FF 00 00 00 FF 00 00 00 FF 80 80' - '80 FF 00 00 00 90 00 00 00 25 00 00 00 F7 1F 1F' - '1F FF DA DA DA FF F3 F3 F3 FF C6 C6 C6 FF A9 A9' - 'A9 FF B7 B7 B7 FF B0 B0 B0 FF C3 C3 C3 FF DA DA' - 'DA FF D8 D8 D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8' - 'D8 FF D8 D8 D8 FF D7 D7 D7 FF D7 D7 D7 FF D7 D7' - 'D7 FF D7 D7 D7 FF D7 D7 D7 FF D7 D7 D7 FF D7 D7' - 'D7 FF 00 80 80 FF 00 80 80 FF 00 00 00 FF 00 00' - '00 FF C0 C0 C0 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 80 80 80 FF 80 80 80 FF 80 80' - '80 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 80 80 80 FF 00 00 00 FF 80 80' - '80 FF 00 00 00 78 00 00 00 07 00 00 00 D0 05 05' - '05 FF C2 C2 C2 FF F6 F6 F6 FF BC BC BC FF B2 B2' - 'B2 FF C3 C3 C3 FF AB AB AB FF BB BB BB FF D8 D8' - 'D8 FF D5 D5 D5 FF D5 D5 D5 FF D5 D5 D5 FF D4 D4' - 'D4 FF D3 D3 D3 FF D3 D3 D3 FF D5 D5 D5 FF D7 D7' - 'D7 FF D8 D8 D8 FF D8 D8 D8 FF D7 D7 D7 FF D5 D5' - 'D5 FF 00 FF FF FF 00 FF FF FF 00 FF FF FF 00 FF' - 'FF FF D7 D7 D7 FF C0 C0 C0 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 80 80 80 FF 00 00 00 FF 80 80 80 FF 00 00' - '00 FF 80 80 80 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 80 80 80 FF C0 C0' - 'C0 FF 00 00 00 3C 00 00 00 00 00 00 00 9C 00 00' - '00 FF A4 A4 A4 FF F4 F4 F4 FF CF CF CF FF C5 C5' - 'C5 FF D2 D2 D2 FF BF BF BF FF C9 C9 C9 FF D3 D3' - 'D3 FF D2 D2 D2 FF D0 D0 D0 FF D3 D3 D3 FF DD DD' - 'DD FF E1 E1 E1 FF E3 E3 E3 FF E6 E6 E6 FF EA EA' - 'EA FF ED ED ED FF ED ED ED FF EB EB EB FF E7 E7' - 'E7 FF E7 E7 E7 FF 00 FF FF FF 00 FF FF FF E7 E7' - 'E7 FF E7 E7 E7 FF D7 D7 D7 FF C0 C0 C0 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 80 80 80 FF 80 80 80 FF 00 00 00 FF 80 80' - '80 FF 80 80 80 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF C0 C0 C0 FF 00 00' - '00 3C 00 00 00 0C 00 00 00 00 00 00 00 73 00 00' - '00 FF 7E 7E 7E FF EF EF EF FF D1 D1 D1 FF CF CF' - 'CF FF CB CB CB FF CF CF CF FF D1 D1 D1 FF CE CE' - 'CE FF CF CF CF FF DF DF DF FF F0 F0 F0 FF EC EC' - 'EC FF E1 E1 E1 FF DE DE DE FF DD DD DD FF DC DC' - 'DC FF DB DB DB FF DB DB DB FF DC DC DC FF DD DD' - 'DD FF DE DE DE FF E1 E1 E1 FF EC EC EC FF F1 F1' - 'F1 FF 00 80 80 FF 00 80 80 FF 00 00 00 FF C0 C0' - 'C0 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 80 80 80 FF 00 00 00 FF 80 80 80 FF 00 00' - '00 FF 80 80 80 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF C0 C0 C0 FF 00 00 00 3C 00 00' - '00 0C 00 00 00 00 00 00 00 00 00 00 00 59 00 00' - '00 FF 59 59 59 FF E9 E9 E9 FF D0 D0 D0 FF CD CD' - 'CD FF CD CD CD FF CD CD CD FF CA CA CA FF D6 D6' - 'D6 FF ED ED ED FF E6 E6 E6 FF DC DC DC FF D4 D4' - 'D4 FF D5 D5 D5 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6' - 'D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6' - 'D6 FF D6 D6 D6 FF D5 D5 D5 FF D5 D5 D5 FF DB DB' - 'DB FF 00 80 80 FF 00 80 80 FF 00 00 00 FF 00 00' - '00 FF C0 C0 C0 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 80 80 80 FF 80 80 80 FF 80 80' - '80 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF C0 C0 C0 FF 00 00 00 3C 00 00 00 0C 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 3E 00 00' - '00 FE 40 40 40 FF D7 D7 D7 FF D2 D2 D2 FF CA CA' - 'CA FF CB CB CB FF CA CA CA FF D4 D4 D4 FF E9 E9' - 'E9 FF DC DC DC FF D0 D0 D0 FF D1 D1 D1 FF D2 D2' - 'D2 FF D2 D2 D2 FF D2 D2 D2 FF D2 D2 D2 FF D2 D2' - 'D2 FF D2 D2 D2 FF D2 D2 D2 FF D2 D2 D2 FF D2 D2' - 'D2 FF D2 D2 D2 FF D2 D2 D2 FF D2 D2 D2 FF D1 D1' - 'D1 FF 00 FF FF FF 00 FF FF FF 00 FF FF FF 00 FF' - 'FF FF 99 99 99 FF C0 C0 C0 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF C0 C0' - 'C0 FF 00 00 00 3C 00 00 00 0C 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 25 00 00' - '00 F8 22 22 22 FF B7 B7 B7 FF DB DB DB FF CA CA' - 'CA FF CB CB CB FF CE CE CE FF E4 E4 E4 FF D4 D4' - 'D4 FF CF CF CF FF D1 D1 D1 FF D0 D0 D0 FF D0 D0' - 'D0 FF D0 D0 D0 FF D0 D0 D0 FF CF CF CF FF CD CD' - 'CD FF CE CE CE FF CE CE CE FF CE CE CE FF CE CE' - 'CE FF CE CE CE FF CE CE CE FF CE CE CE FF CE CE' - 'CE FF CE CE CE FF 00 FF FF FF 00 FF FF FF CF CF' - 'CF FF CF CF CF FF 99 99 99 FF C0 C0 C0 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF C0 C0 C0 FF 00 00' - '00 3C 00 00 00 0C 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 0C 00 00' - '00 E1 07 07 07 FF 9F 9F 9F FF DD DD DD FF CC CC' - 'CC FF CD CD CD FF DB DB DB FF D6 D6 D6 FF CE CE' - 'CE FF D0 D0 D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0' - 'D0 FF D0 D0 D0 FF D0 D0 D0 FF CF CF CF FF CC CC' - 'CC FF C9 C9 C9 FF CA CA CA FF CA CA CA FF CA CA' - 'CA FF CA CA CA FF CA CA CA FF CA CA CA FF CA CA' - 'CA FF CA CA CA FF CA CA CA FF C8 C8 C8 FF CF CF' - 'CF FF 00 80 80 FF 00 80 80 FF 00 00 00 FF C0 C0' - 'C0 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF C0 C0 C0 FF 00 00 00 3C 00 00' - '00 0C 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 B2 00 00 00 FF 83 83 83 FF DD DD DD FF CF CF' - 'CF FF D1 D1 D1 FF DB DB DB FF D1 D1 D1 FF D0 D0' - 'D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0' - 'D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0 D0 FF CF CF' - 'CF FF C9 C9 C9 FF C5 C5 C5 FF C6 C6 C6 FF C6 C6' - 'C6 FF C6 C6 C6 FF C6 C6 C6 FF C6 C6 C6 FF C6 C6' - 'C6 FF C6 C6 C6 FF C6 C6 C6 FF C6 C6 C6 FF C7 C7' - 'C7 FF 00 80 80 FF 00 80 80 FF 00 00 00 FF 00 00' - '00 FF C0 C0 C0 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF C0 C0 C0 FF 00 00 00 3C 00 00 00 0C 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 80 00 00 00 FF 5F 5F 5F FF DC DC DC FF D1 D1' - 'D1 FF D2 D2 D2 FF D4 D4 D4 FF D1 D1 D1 FF D1 D1' - 'D1 FF D1 D1 D1 FF D1 D1 D1 FF D1 D1 D1 FF D1 D1' - 'D1 FF D1 D1 D1 FF D1 D1 D1 FF D1 D1 D1 FF D1 D1' - 'D1 FF D0 D0 D0 FF C8 C8 C8 FF C3 C3 C3 FF C3 C3' - 'C3 FF C3 C3 C3 FF C4 C4 C4 FF C4 C4 C4 FF C4 C4' - 'C4 FF C4 C4 C4 FF C4 C4 C4 FF C4 C4 C4 FF C4 C4' - 'C4 FF 00 FF FF FF 00 FF FF FF 00 FF FF FF 00 FF' - 'FF FF 09 09 09 FF C0 C0 C0 FF 00 00 00 FF C0 C0' - 'C0 FF 00 00 00 3D 00 00 00 0C 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 4B 00 00 00 FE 41 41 41 FF D8 D8 D8 FF D4 D4' - 'D4 FF D2 D2 D2 FF D0 D0 D0 FF D3 D3 D3 FF D3 D3' - 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' - 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' - 'D3 FF D3 D3 D3 FF D3 D3 D3 FF CD CD CD FF C7 C7' - 'C7 FF C4 C4 C4 FF C2 C2 C2 FF C1 C1 C1 FF C0 C0' - 'C0 FF C1 C1 C1 FF C1 C1 C1 FF C1 C1 C1 FF C2 C2' - 'C2 FF C2 C2 C2 FF 00 FF FF FF 00 FF FF FF 99 99' - '99 FF 09 09 09 FF 00 00 00 CF C0 C0 C0 FF 00 00' - '00 40 00 00 00 0E 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 1A 00 00 00 F2 2C 2C 2C FF CC CC CC FF D6 D6' - 'D6 FF D5 D5 D5 FF CC CC CC FF D5 D5 D5 FF D6 D6' - 'D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6' - 'D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6' - 'D6 FF D6 D6 D6 FF D6 D6 D6 FF D7 D7 D7 FF D6 D6' - 'D6 FF D5 D5 D5 FF D3 D3 D3 FF CF CF CF FF CC CC' - 'CC FF C9 C9 C9 FF C6 C6 C6 FF C4 C4 C4 FF C2 C2' - 'C2 FF B3 B3 B3 FF BD BD BD FF D0 D0 D0 FF 99 99' - '99 FF 09 09 09 FF 00 00 00 CF 00 00 00 3E 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 09 00 00 00 D8 18 18 18 FF B0 B0 B0 FF DB DB' - 'DB FF DB DB DB FF D0 D0 D0 FF D2 D2 D2 FF DB DB' - 'DB FF D9 D9 D9 FF DA DA DA FF DA DA DA FF DA DA' - 'DA FF DA DA DA FF DA DA DA FF DA DA DA FF DA DA' - 'DA FF DA DA DA FF DA DA DA FF DA DA DA FF DA DA' - 'DA FF DA DA DA FF DA DA DA FF DB DB DB FF DB DB' - 'DB FF DA DA DA FF D9 D9 D9 FF D9 D9 D9 FF CF CF' - 'CF FF C5 C5 C5 FF CC CC CC FF CA CA CA FF 7A 7A' - '7A FF 02 02 02 FF 00 00 00 B8 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 02 00 00 00 BF 08 08 08 FF 97 97 97 FF DC DC' - 'DC FF DF DF DF FF DC DC DC FF CE CE CE FF D6 D6' - 'D6 FF DE DE DE FF DD DD DD FF DD DD DD FF DD DD' - 'DD FF DD DD DD FF DD DD DD FF DD DD DD FF DD DD' - 'DD FF DD DD DD FF DD DD DD FF DD DD DD FF DD DD' - 'DD FF DD DD DD FF DD DD DD FF DD DD DD FF DD DD' - 'DD FF DD DD DD FF DE DE DE FF D8 D8 D8 FF CE CE' - 'CE FF DD DD DD FF DC DC DC FF C6 C6 C6 FF 53 53' - '53 FF 00 00 00 FF 00 00 00 A0 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 A4 00 00 00 FF 77 77 77 FF D3 D3' - 'D3 FF E2 E2 E2 FF E1 E1 E1 FF DE DE DE FF CE CE' - 'CE FF D7 D7 D7 FF E1 E1 E1 FF E2 E2 E2 FF E0 E0' - 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' - 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' - 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E1 E1' - 'E1 FF E1 E1 E1 FF D9 D9 D9 FF CD CD CD FF DA DA' - 'DA FF E3 E3 E3 FF D9 D9 D9 FF BB BB BB FF 39 39' - '39 FF 00 00 00 FF 00 00 00 7E 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 89 00 00 00 FF 4B 4B 4B FF C9 C9' - 'C9 FF E5 E5 E5 FF E3 E3 E3 FF E4 E4 E4 FF E1 E1' - 'E1 FF D7 D7 D7 FF D2 D2 D2 FF DA DA DA FF E4 E4' - 'E4 FF E5 E5 E5 FF E4 E4 E4 FF E4 E4 E4 FF E4 E4' - 'E4 FF E4 E4 E4 FF E4 E4 E4 FF E4 E4 E4 FF E4 E4' - 'E4 FF E4 E4 E4 FF E5 E5 E5 FF E5 E5 E5 FF DC DC' - 'DC FF D2 D2 D2 FF D6 D6 D6 FF E0 E0 E0 FF E4 E4' - 'E4 FF E6 E6 E6 FF D6 D6 D6 FF A8 A8 A8 FF 20 20' - '20 FF 00 00 00 FD 00 00 00 4E 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 62 00 00 00 FF 35 35 35 FF BD BD' - 'BD FF E6 E6 E6 FF E6 E6 E6 FF E6 E6 E6 FF E7 E7' - 'E7 FF E7 E7 E7 FF DF DF DF FF D2 D2 D2 FF D3 D3' - 'D3 FF DE DE DE FF E3 E3 E3 FF E3 E3 E3 FF E4 E4' - 'E4 FF E4 E4 E4 FF E4 E4 E4 FF E4 E4 E4 FF E3 E3' - 'E3 FF E3 E3 E3 FF DE DE DE FF D4 D4 D4 FF D1 D1' - 'D1 FF DD DD DD FF E7 E7 E7 FF E7 E7 E7 FF E6 E6' - 'E6 FF E8 E8 E8 FF D4 D4 D4 FF 9A 9A 9A FF 0B 0B' - '0B FF 00 00 00 ED 00 00 00 2C 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 2D 00 00 00 F9 1E 1E 1E FF AB AB' - 'AB FF E4 E4 E4 FF ED ED ED FF E7 E7 E7 FF E6 E6' - 'E6 FF EC EC EC FF EB EB EB FF EA EA EA FF E4 E4' - 'E4 FF E0 E0 E0 FF DF DF DF FF DF DF DF FF DD DD' - 'DD FF DC DC DC FF DC DC DC FF DD DD DD FF DF DF' - 'DF FF DF DF DF FF DF DF DF FF E2 E2 E2 FF E9 E9' - 'E9 FF EC EC EC FF EA EA EA FF E5 E5 E5 FF EB EB' - 'EB FF EB EB EB FF D6 D6 D6 FF 8A 8A 8A FF 00 00' - '00 FF 00 00 00 C3 00 00 00 17 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 09 00 00 00 DD 08 08 08 FF 99 99' - '99 FF E4 E4 E4 FF DF DF DF FF BD BD BD FF C1 C1' - 'C1 FF D6 D6 D6 FF EC EC EC FF ED ED ED FF ED ED' - 'ED FF EE EE EE FF EE EE EE FF ED ED ED FF EC EC' - 'EC FF EB EB EB FF EB EB EB FF EC EC EC FF ED ED' - 'ED FF EE EE EE FF EE EE EE FF ED ED ED FF EE EE' - 'EE FF E4 E4 E4 FF C2 C2 C2 FF BE BE BE FF D1 D1' - 'D1 FF EC EC EC FF D4 D4 D4 FF 75 75 75 FF 00 00' - '00 FF 00 00 00 9C 00 00 00 06 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 AE 00 00 00 FF 8D 8D' - '8D FF E0 E0 E0 FF C4 C4 C4 FF B2 B2 B2 FF B8 B8' - 'B8 FF B2 B2 B2 FF EB EB EB FF F1 F1 F1 FF F0 F0' - 'F0 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0' - 'F0 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0' - 'F0 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0 F0 FF F3 F3' - 'F3 FF D5 D5 D5 FF B0 B0 B0 FF B6 B6 B6 FF B7 B7' - 'B7 FF EB EB EB FF CD CD CD FF 61 61 61 FF 00 00' - '00 FF 00 00 00 85 00 00 00 01 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 80 00 00 00 FF 64 64' - '64 FF CE CE CE FF DD DD DD FF DC DC DC FF D5 D5' - 'D5 FF E4 E4 E4 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9' - 'F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9' - 'F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9' - 'F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9 F9 FF FA FA' - 'FA FF F2 F2 F2 FF DF DF DF FF D8 D8 D8 FF DC DC' - 'DC FF D7 D7 D7 FF B0 B0 B0 FF 34 34 34 FF 00 00' - '00 FF 00 00 00 67 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 44 00 00 00 FF 19 19' - '19 FF 80 80 80 FF BE BE BE FF D3 D3 D3 FF D7 D7' - 'D7 FF DB DB DB FF D8 D8 D8 FF D8 D8 D8 FF D8 D8' - 'D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8' - 'D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8' - 'D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8' - 'D8 FF D9 D9 D9 FF D9 D9 D9 FF D7 D7 D7 FF CD CD' - 'CD FF B0 B0 B0 FF 5D 5D 5D FF 06 06 06 FF 00 00' - '00 ED 00 00 00 2B 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 02 00 00 00 9C 00 00' - '00 FF 0C 0C 0C FF 3D 3D 3D FF 49 49 49 FF 48 48' - '48 FF 48 48 48 FF 48 48 48 FF 48 48 48 FF 48 48' - '48 FF 48 48 48 FF 48 48 48 FF 48 48 48 FF 48 48' - '48 FF 48 48 48 FF 48 48 48 FF 48 48 48 FF 48 48' - '48 FF 48 48 48 FF 48 48 48 FF 48 48 48 FF 48 48' - '48 FF 48 48 48 FF 48 48 48 FF 49 49 49 FF 49 49' - '49 FF 2F 2F 2F FF 02 02 02 FF 00 00 00 FF 00 00' - '00 B9 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 06 00 00' - '00 7F 00 00 00 F1 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 D6 00 00 00 5C 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 2C 00 00 00 7E 00 00 00 84 00 00' - '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' - '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' - '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' - '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' - '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' - '00 84 00 00 00 70 00 00 00 1A 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 FF FF FF 80 7F FF 00 00 FF FF' - 'FF 00 7F FF 00 00 FF FF FE 00 0F FF 00 00 FF FF' - 'FC 00 07 FF 00 00 FF FF F8 00 07 FF 00 00 FF FF' - 'F0 00 07 FF 00 00 FF FF E0 00 84 FF 00 00 F0 00' - '00 00 04 7F 00 00 C0 00 00 00 00 7F 00 00 80 00' - '00 00 00 7F 00 00 80 00 00 00 00 0F 00 00 00 00' - '00 00 00 07 00 00 00 00 00 00 00 07 00 00 00 00' - '00 00 00 07 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 80 00 00 00 00 00 00 00 80 00' - '00 00 00 01 00 00 80 00 00 00 00 03 00 00 80 00' - '00 00 00 07 00 00 80 00 00 00 00 0F 00 00 80 00' - '00 00 00 1F 00 00 C0 00 00 00 00 3F 00 00 C0 00' - '00 00 00 7F 00 00 C0 00 00 00 00 FF 00 00 C0 00' - '00 00 03 FF 00 00 C0 00 00 00 07 FF 00 00 C0 00' - '00 00 07 FF 00 00 E0 00 00 00 07 FF 00 00 E0 00' - '00 00 07 FF 00 00 E0 00 00 00 07 FF 00 00 E0 00' - '00 00 07 FF 00 00 E0 00 00 00 07 FF 00 00 F0 00' - '00 00 07 FF 00 00 F0 00 00 00 0F FF 00 00 F0 00' - '00 00 0F FF 00 00 F0 00 00 00 1F FF 00 00 F8 00' - '00 00 3F FF 00 00 FE 00 00 00 7F FF 00 00 FF FF' - 'FF FF FF FF 00 00 28 00 00 00 20 00 00 00 40 00' - '00 00 01 00 20 00 00 00 00 00 00 10 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 0C 00 00 00 3C 80 80 80 FF 80 80 80 FF 00 00' - '00 B4 00 00 00 84 00 80 80 FF 00 80 80 FF 00 00' - '00 90 00 00 00 30 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 0C 00 00' - '00 3C 80 80 80 FF 00 00 00 FF 80 80 80 FF 80 80' - '80 FF 00 00 00 B4 00 FF FF FF 00 80 80 FF 00 00' - '00 90 00 00 00 30 00 00 00 0C 00 00 00 18 00 00' - '00 0C 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 0C 00 00 00 3C 80 80' - '80 FF 00 00 00 FF 00 00 00 FF 80 80 80 FF 00 00' - '00 FF C0 C0 C0 FF 00 FF FF FF 00 FF FF FF 00 00' - '00 90 00 00 00 30 00 00 00 24 00 00 00 54 00 00' - '00 3C 00 00 00 0C 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 0C 00 00 00 3C 80 80 80 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 80 80 80 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 FF FF FF 00 00' - '00 9C 00 00 00 48 00 80 80 FF 00 00 00 84 00 00' - '00 78 00 00 00 24 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 0C 00 00 00 3C 80 80 80 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 80 80 80 FF 00 00 00 FF 80 80' - '80 FF 00 00 00 FF 00 00 00 FF 80 80 80 FF 00 00' - '00 B4 00 00 00 84 00 80 80 FF 00 80 80 FF 00 00' - '00 90 00 00 00 30 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 0C 00 00' - '00 3C 80 80 80 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 80 80 80 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 80 80 80 FF 00 00 00 FF 00 00 00 FF 80 80' - '80 FF 00 00 00 B4 00 FF FF FF 00 80 80 FF 00 00' - '00 90 00 00 00 30 00 00 00 0C 00 00 00 18 00 00' - '00 0C 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 0C 00 00 00 3C 80 80' - '80 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 80 80' - '80 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 80 80 80 FF 00 00 00 FF 00 00' - '00 FF C0 C0 C0 FF 00 FF FF FF 00 FF FF FF 00 00' - '00 90 00 00 00 30 00 00 00 24 00 00 00 54 00 00' - '00 3C 00 00 00 0C 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 24 80 80 80 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 80 80 80 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 80 80 80 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 FF FF FF 00 00' - '00 9C 00 00 00 48 00 80 80 FF 00 00 00 84 00 00' - '00 78 00 00 00 24 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 80 80 80 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 80 80 80 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 80 80 80 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 80 80' - '80 FF 00 00 00 FF 00 00 00 FF 80 80 80 FF 00 00' - '00 B4 00 00 00 84 00 80 80 FF 00 80 80 FF 00 00' - '00 90 00 00 00 30 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 80 80 80 FF 00 00 00 FF 00 00' - '00 FF 80 80 80 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 80 80 80 FF 00 00 00 FF 80 80' - '80 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 80 80 80 FF 00 00 00 FF 00 00 00 FF 80 80' - '80 FF 00 00 00 B4 00 FF FF FF 00 80 80 FF 00 00' - '00 90 00 00 00 30 00 00 00 0C 00 00 00 18 00 00' - '00 0C 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 0C 00 00 00 24 80 80 80 FF 00 00 00 FF 80 80' - '80 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 80 80 80 FF 00 00 00 FF 80 80 80 FF 00 00' - '00 FF 80 80 80 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 80 80 80 FF 00 00 00 FF 00 00' - '00 FF C0 C0 C0 FF 00 FF FF FF 00 FF FF FF 00 00' - '00 90 00 00 00 30 00 00 00 24 00 00 00 54 00 00' - '00 3C 00 00 00 0C 00 00 00 00 00 00 00 00 00 00' - '00 24 00 00 00 6C 80 80 80 FF 80 80 80 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 80 80' - '80 FF 00 00 00 FF 80 80 80 FF 00 00 00 FF 80 80' - '80 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 80 80 80 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 FF FF FF 00 00' - '00 9C 00 00 00 48 00 80 80 FF 00 00 00 84 00 00' - '00 78 00 00 00 24 00 00 00 00 00 00 00 00 00 80' - '80 FF 00 80 80 FF 00 00 00 FF C0 C0 C0 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 80 80 80 FF 00 00 00 FF 80 80 80 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 80 80' - '80 FF 00 00 00 FF 00 00 00 FF 80 80 80 FF 00 00' - '00 B4 00 00 00 84 00 80 80 FF 00 80 80 FF 00 00' - '00 90 00 00 00 30 00 00 00 00 00 00 00 00 00 80' - '80 FF 00 80 80 FF 00 00 00 FF 00 00 00 FF C0 C0' - 'C0 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 80 80 80 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 80 80 80 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 80 80 80 FF 00 00 00 FF 00 00 00 FF 80 80' - '80 FF 00 00 00 B4 00 FF FF FF 00 80 80 FF 00 00' - '00 90 00 00 00 30 00 00 00 0C 00 00 00 18 00 FF' - 'FF FF 00 FF FF FF 00 FF FF FF 00 FF FF FF 00 00' - '00 48 C0 C0 C0 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 80 80' - '80 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 80 80 80 FF 00 00 00 FF 00 00' - '00 FF C0 C0 C0 FF 00 FF FF FF 00 FF FF FF 00 00' - '00 90 00 00 00 30 00 00 00 24 00 00 00 54 00 00' - '00 00 00 FF FF FF 00 FF FF FF 00 00 00 24 00 00' - '00 30 00 00 00 6C C0 C0 C0 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 80 80 80 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 80 80 80 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 80 80 80 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 FF FF FF 00 00' - '00 9C 00 00 00 48 00 80 80 FF 00 00 00 84 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80' - '80 FF 00 80 80 FF 00 00 00 FF C0 C0 C0 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 80 80 80 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 80 80 80 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 80 80' - '80 FF 00 00 00 FF 00 00 00 FF 80 80 80 FF 00 00' - '00 B4 00 00 00 84 00 80 80 FF 00 80 80 FF 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80' - '80 FF 00 80 80 FF 00 00 00 FF 00 00 00 FF C0 C0' - 'C0 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 80 80 80 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 80 80 80 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 80 80 80 FF 00 00 00 FF 00 00 00 FF 80 80' - '80 FF 00 00 00 B4 00 FF FF FF 00 80 80 FF 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF' - 'FF FF 00 FF FF FF 00 FF FF FF 00 FF FF FF 00 00' - '00 48 C0 C0 C0 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 80 80' - '80 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 80 80' - '80 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 80 80 80 FF 00 00 00 FF 00 00' - '00 FF C0 C0 C0 FF 00 FF FF FF 00 FF FF FF 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 FF FF FF 00 FF FF FF 00 00 00 24 00 00' - '00 30 00 00 00 6C C0 C0 C0 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 80 80 80 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 80 80 80 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 FF FF FF 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80' - '80 FF 00 80 80 FF 00 00 00 FF C0 C0 C0 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 80 80 80 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 80 80' - '80 FF 00 00 00 FF 00 00 00 FF 80 80 80 FF 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80' - '80 FF 00 80 80 FF 00 00 00 FF 00 00 00 FF C0 C0' - 'C0 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 80 80 80 FF 00 00 00 FF 80 80 80 FF 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF' - 'FF FF 00 FF FF FF 00 FF FF FF 00 FF FF FF 00 00' - '00 48 C0 C0 C0 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 80 80' - '80 FF 00 00 00 FF 80 80 80 FF 00 00 00 FF 80 80' - '80 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 80 80 80 FF C0 C0 C0 FF 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 FF FF FF 00 FF FF FF 00 00 00 24 00 00' - '00 30 00 00 00 6C C0 C0 C0 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 80 80' - '80 FF 80 80 80 FF 00 00 00 FF 80 80 80 FF 80 80' - '80 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF C0 C0 C0 FF 00 00 00 3C 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80' - '80 FF 00 80 80 FF 00 00 00 FF C0 C0 C0 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 80 80' - '80 FF 00 00 00 FF 80 80 80 FF 00 00 00 FF 80 80' - '80 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF C0 C0 C0 FF 00 00 00 3C 00 00 00 0C 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80' - '80 FF 00 80 80 FF 00 00 00 FF 00 00 00 FF C0 C0' - 'C0 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF C0 C0' - 'C0 FF 00 00 00 3C 00 00 00 0C 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF' - 'FF FF 00 FF FF FF 00 FF FF FF 00 FF FF FF 00 00' - '00 48 C0 C0 C0 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF C0 C0 C0 FF 00 00' - '00 3C 00 00 00 0C 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 FF FF FF 00 FF FF FF 00 00 00 24 00 00' - '00 30 00 00 00 6C C0 C0 C0 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF C0 C0 C0 FF 00 00 00 3C 00 00' - '00 0C 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80' - '80 FF 00 80 80 FF 00 00 00 FF C0 C0 C0 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF C0 C0 C0 FF 00 00 00 3C 00 00 00 0C 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80' - '80 FF 00 80 80 FF 00 00 00 FF 00 00 00 FF C0 C0' - 'C0 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF C0 C0' - 'C0 FF 00 00 00 3C 00 00 00 0C 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF' - 'FF FF 00 FF FF FF 00 FF FF FF 00 FF FF FF 00 00' - '00 3C C0 C0 C0 FF 00 00 00 FF C0 C0 C0 FF 00 00' - '00 3C 00 00 00 0C 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 FF FF FF 00 FF FF FF 00 00 00 24 00 00' - '00 0C 00 00 00 00 C0 C0 C0 FF 00 00 00 18 00 00' - '00 0C 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF 00' - '3F FF FE 00 07 FF FC 00 03 FF F8 00 03 FF F0 00' - '03 FF E0 00 00 7F C0 00 00 3F C0 00 00 3F C0 00' - '00 3F C0 00 00 07 00 00 00 03 00 00 00 03 00 00' - '00 03 00 00 00 00 00 00 00 00 80 00 00 00 F0 00' - '00 00 F0 00 00 00 F0 00 00 00 F8 00 00 00 FF 00' - '00 00 FF 00 00 00 FF 00 00 00 FF 80 00 00 FF F0' - '00 00 FF F0 00 01 FF F0 00 03 FF F8 00 07 FF FF' - '00 0F FF FF 00 1F FF FF 00 3F FF FF 84 7F' -} */ - - - -/* BINRES mycomputer.ico */ -15 ICON mycomputer.ico -/* { - '00 00 01 00 09 00 20 20 00 00 01 00 08 00 A8 08' - '00 00 96 00 00 00 10 10 00 00 01 00 08 00 68 05' - '00 00 3E 09 00 00 20 20 00 00 01 00 04 00 E8 02' - '00 00 A6 0E 00 00 10 10 00 00 01 00 04 00 28 01' - '00 00 8E 11 00 00 30 30 00 00 01 00 08 00 A8 0E' - '00 00 B6 12 00 00 30 30 00 00 01 00 04 00 68 06' - '00 00 5E 21 00 00 30 30 00 00 01 00 20 00 A8 25' - '00 00 C6 27 00 00 20 20 00 00 01 00 20 00 A8 10' - '00 00 6E 4D 00 00 10 10 00 00 01 00 20 00 68 04' - '00 00 16 5E 00 00 28 00 00 00 20 00 00 00 40 00' - '00 00 01 00 08 00 00 00 00 00 00 04 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 01 00 00 00 02 00 00 00 03 00 00 00 00 00' - '05 00 11 11 11 00 22 22 22 00 33 33 33 00 44 44' - '44 00 55 55 55 00 66 66 66 00 6F 6D 70 00 77 77' - '77 00 7F 7F 7F 00 99 33 00 00 CC 33 00 00 99 66' - '33 00 CC 66 00 00 CC 66 33 00 D0 60 38 00 CC 99' - '33 00 CC 99 66 00 FF 99 66 00 FF CC 66 00 88 88' - '88 00 99 99 99 00 AA AA AA 00 BB BB BB 00 CC 99' - '99 00 CC CC CC 00 DD DD DD 00 FF CC CC 00 EE EE' - 'EE 00 FF FF FF 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 C0 17 95 00 00 00 38 00 A8 44' - 'F9 77 15 00 00 00 78 0A 38 00 00 00 38 00 B0 6C' - '38 00 98 17 95 00 00 00 00 00 E0 19 95 00 F0 88' - 'FA 77 70 38 F5 77 FF FF FF FF A8 44 F9 77 70 7D' - 'F5 77 3A 8A F5 77 96 00 00 00 96 00 00 00 09 00' - '00 00 B0 18 95 00 00 00 00 00 CB 44 F9 77 38 9F' - '07 00 CD 8B F5 77 78 13 05 00 37 90 F5 77 00 00' - '00 00 3E 8A F5 77 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 10 00' - '00 00 00 00 00 00 5E 00 60 00 00 EC FD 7F 1A 02' - '00 00 4C 16 95 00 40 9F 07 00 FC 15 95 00 FF FF' - 'FF FF B4 1A 95 00 45 00 00 00 28 02 00 00 FF FF' - 'FF FF E2 D8 F5 77 7D 9B F5 77 94 B6 01 00 00 00' - '05 00 F4 17 95 00 80 00 10 C0 B4 1A 95 00 F0 88' - 'FA 77 88 1C F5 77 FF FF FF FF 37 90 F5 77 00 00' - '00 00 3E 8A F5 77 9B B2 E7 77 B7 00 00 00 02 00' - '00 00 A4 1A 95 00 01 00 00 00 18 00 00 00 00 00' - '00 00 10 19 95 00 42 00 00 00 00 00 00 00 F4 18' - '95 00 00 00 00 00 00 00 00 00 00 00 00 00 0C 00' - '00 00 02 00 00 00 01 01 F5 77 00 EC FD 7F 5E 00' - '00 00 00 00 00 00 03 00 00 00 66 00 1A 02 40 9F' - '07 00 00 00 00 00 40 9F 07 00 05 00 00 00 BE B3' - 'E7 77 4C 19 95 00 A3 B4 E7 77 F8 00 00 00 00 00' - '00 C0 00 00 00 00 00 00 00 00 02 00 00 00 80 00' - '00 00 00 00 00 00 8C 1A 95 00 7F E9 4B 00 C0 CE' - '0B 01 00 00 00 C0 00 00 00 00 80 1A 95 00 02 00' - '00 00 80 00 00 00 00 00 00 00 C0 27 95 00 C4 F5' - 'AF 00 02 00 00 00 44 3A 5C 6F 73 65 78 70 65 72' - '74 73 5C 72 65 61 63 74 6F 73 5C 6C 69 62 5C 73' - '68 65 6C 6C 33 32 5C 6D 79 63 6F 6D 70 75 74 65' - '72 2E 69 63 6F 00 14 1A 95 00 1F 3B D4 77 15 00' - '00 00 A8 00 00 00 4F 3B D4 77 E0 19 95 00 33 3B' - 'D4 77 64 C5 F5 77 A9 F1 E7 77 F8 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 1A 95 00 B0 6C' - '38 00 96 00 00 00 00 00 00 00 C9 F1 E7 77 96 00' - '00 00 A4 1A 95 00 09 00 00 00 00 00 00 00 96 00' - '00 00 96 00 00 00 09 00 00 00 F4 19 95 00 33 3B' - 'D4 77 B4 1A 95 00 09 48 E9 77 B8 10 E9 77 FF FF' - 'FF FF C9 F1 E7 77 16 EA 4B 00 F8 00 00 00 B0 6C' - '38 00 96 00 00 00 58 1A 95 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 22 22 22 22 22 01 01 01 02 02' - '02 03 04 03 22 22 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 22 0B 1B 1A 1A 1A 1A 19 19 19' - '19 18 0D 18 07 22 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 22 05 1E 21 20 1E 1E 1D 1D 1D 1B' - '1B 1B 19 1A 0D 22 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 22 06 20 21 20 20 20 20 1E 1E 1D' - '1D 1D 1A 1A 18 04 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 05 1D 21 21 21 20 20 20 1E 1E' - '1D 1D 1A 1B 0D 22 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 22 19 21 21 21 21 20 1E 1E 1E' - '1E 1D 1B 1D 09 22 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 22 06 1E 21 21 21 20 1A 1B 20' - '1E 1E 1D 19 05 22 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 22 08 20 21 21 21 1E 1E 20' - '20 20 1A 06 22 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 22 07 1B 21 21 21 21 21' - '1E 18 06 22 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 22 03 07 0A 1A 18 09' - '06 22 22 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 22 22 22 22 22 22 22 22 22 22 04 0C 08 22' - '22 22 22 22 22 22 22 22 22 22 00 00 00 00 00 00' - '00 22 06 19 1A 1A 1A 1A 1A 1A 1A 1A 1A 1D 1B 1A' - '19 19 19 19 19 19 19 19 0C 05 22 00 00 00 00 00' - '22 04 1B 21 21 21 21 21 21 21 20 20 20 1E 1E 1E' - '1E 1E 1E 1E 1E 1E 1D 1D 1E 0D 22 00 00 00 00 00' - '22 06 20 21 20 1E 1E 1E 1E 1E 1E 1E 1E 1E 1E 1E' - '1E 1E 1D 1D 1D 1D 1D 1D 1D 1A 04 00 00 00 00 00' - '22 06 20 21 1C 12 12 14 14 15 15 15 15 15 15 15' - '15 15 14 13 12 12 12 1B 1D 1A 04 00 00 00 00 00' - '22 06 20 21 1C 11 12 12 13 14 14 14 14 14 14 14' - '14 13 12 12 12 12 12 1B 1E 1A 04 00 00 00 00 00' - '22 06 20 21 1C 11 12 12 12 13 13 14 14 14 14 13' - '13 12 12 12 12 11 11 1B 1E 1A 04 00 00 00 00 00' - '22 06 20 21 1C 0F 12 12 12 12 12 12 12 12 12 12' - '12 12 12 12 12 11 11 1B 1E 1A 04 00 00 00 00 00' - '22 06 20 21 1C 0E 11 12 12 12 12 12 12 12 12 12' - '12 12 12 11 11 0E 0E 1B 1E 1A 04 00 00 00 00 00' - '22 06 20 21 15 0E 0E 11 11 12 12 12 12 12 12 12' - '12 12 11 0F 0E 0E 0E 1B 1E 1A 03 00 00 00 00 00' - '22 06 20 21 15 0E 0E 11 12 12 12 12 12 12 12 12' - '12 12 12 12 0E 0E 0E 1B 1E 1A 03 00 00 00 00 00' - '22 06 1E 21 15 0E 12 12 12 13 13 14 14 14 14 14' - '13 13 12 12 12 11 0E 1D 20 1A 02 00 00 00 00 00' - '22 06 1E 21 15 11 12 12 13 14 14 14 15 15 15 14' - '14 14 13 12 12 12 11 1B 20 1A 01 00 00 00 00 00' - '22 06 1E 21 15 12 12 13 14 14 15 15 15 15 15 15' - '15 14 14 13 12 12 12 1D 20 1A 01 00 00 00 00 00' - '22 06 1E 21 15 12 13 14 14 15 15 16 16 16 16 16' - '15 15 14 14 13 12 12 1D 21 1A 22 00 00 00 00 00' - '22 06 1E 21 15 12 14 14 15 15 16 16 16 16 16 16' - '16 15 15 14 13 12 12 1F 21 1A 22 00 00 00 00 00' - '22 06 1E 21 15 12 15 15 15 15 15 16 17 17 17 16' - '15 15 15 15 15 12 10 1F 21 1A 22 00 00 00 00 00' - '22 05 1E 21 20 1E 20 20 20 20 20 20 20 20 20 20' - '20 20 20 20 20 1E 1E 21 21 1A 22 00 00 00 00 00' - '22 22 18 21 21 21 21 21 21 21 21 21 21 21 21 21' - '21 21 21 21 21 21 21 21 20 09 22 00 00 00 00 00' - '00 22 05 09 0C 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B' - '0B 0B 0B 0B 0B 0B 0B 0B 08 02 22 00 00 00 00 00' - '00 00 22 22 22 22 22 22 22 22 22 22 22 22 22 22' - '22 22 22 22 22 22 22 22 22 22 00 00 00 00 FF FF' - 'FF FF FF 00 00 FF FF 00 00 FF FE 00 00 FF FE 00' - '00 FF FF 00 00 FF FF 00 00 FF FF 00 00 FF FF 80' - '01 FF FF C0 03 FF FF E0 07 FF F0 00 00 0F E0 00' - '00 07 C0 00 00 07 C0 00 00 07 C0 00 00 07 C0 00' - '00 07 C0 00 00 07 C0 00 00 07 C0 00 00 07 C0 00' - '00 07 C0 00 00 07 C0 00 00 07 C0 00 00 07 C0 00' - '00 07 C0 00 00 07 C0 00 00 07 C0 00 00 07 C0 00' - '00 07 C0 00 00 07 E0 00 00 07 F0 00 00 0F 28 00' - '00 00 10 00 00 00 20 00 00 00 01 00 08 00 00 00' - '00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 01 00 00 00 02 00' - '00 00 03 00 00 00 00 00 05 00 08 00 00 00 11 11' - '11 00 22 22 22 00 33 33 33 00 44 44 44 00 55 55' - '55 00 66 66 66 00 6F 6D 70 00 77 77 77 00 7F 7F' - '7F 00 99 33 00 00 CC 66 00 00 CC 66 33 00 D0 60' - '38 00 CC 66 66 00 CC 99 33 00 CC 99 66 00 FF 99' - '66 00 FF CC 66 00 88 88 88 00 99 99 99 00 AA AA' - 'AA 00 BB BB BB 00 CC 99 99 00 CC CC 99 00 FF CC' - '99 00 CC CC CC 00 DD DD DD 00 EE EE EE 00 FF FF' - 'FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 C0 17' - '95 00 00 00 38 00 A8 44 F9 77 15 00 00 00 78 0A' - '38 00 00 00 38 00 B0 6C 38 00 98 17 95 00 00 00' - '00 00 E0 19 95 00 F0 88 FA 77 70 38 F5 77 FF FF' - 'FF FF A8 44 F9 77 70 7D F5 77 3A 8A F5 77 96 00' - '00 00 96 00 00 00 09 00 00 00 B0 18 95 00 00 00' - '00 00 CB 44 F9 77 38 9F 07 00 CD 8B F5 77 78 13' - '05 00 37 90 F5 77 00 00 00 00 3E 8A F5 77 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 10 00 00 00 00 00 00 00 5E 00' - '60 00 00 EC FD 7F 1A 02 00 00 4C 16 95 00 40 9F' - '07 00 FC 15 95 00 FF FF FF FF B4 1A 95 00 45 00' - '00 00 28 02 00 00 FF FF FF FF E2 D8 F5 77 7D 9B' - 'F5 77 94 B6 01 00 00 00 05 00 F4 17 95 00 80 00' - '10 C0 B4 1A 95 00 F0 88 FA 77 88 1C F5 77 FF FF' - 'FF FF 37 90 F5 77 00 00 00 00 3E 8A F5 77 9B B2' - 'E7 77 B7 00 00 00 02 00 00 00 A4 1A 95 00 01 00' - '00 00 18 00 00 00 00 00 00 00 10 19 95 00 42 00' - '00 00 00 00 00 00 F4 18 95 00 00 00 00 00 00 00' - '00 00 00 00 00 00 0C 00 00 00 02 00 00 00 01 01' - 'F5 77 00 EC FD 7F 5E 00 00 00 00 00 00 00 03 00' - '00 00 66 00 1A 02 40 9F 07 00 00 00 00 00 40 9F' - '07 00 05 00 00 00 BE B3 E7 77 4C 19 95 00 A3 B4' - 'E7 77 F8 00 00 00 00 00 00 C0 00 00 00 00 00 00' - '00 00 02 00 00 00 80 00 00 00 00 00 00 00 8C 1A' - '95 00 7F E9 4B 00 C0 CE 0B 01 00 00 00 C0 00 00' - '00 00 80 1A 95 00 02 00 00 00 80 00 00 00 00 00' - '00 00 C0 27 95 00 C4 F5 AF 00 02 00 00 00 44 3A' - '5C 6F 73 65 78 70 65 72 74 73 5C 72 65 61 63 74' - '6F 73 5C 6C 69 62 5C 73 68 65 6C 6C 33 32 5C 6D' - '79 63 6F 6D 70 75 74 65 72 2E 69 63 6F 00 14 1A' - '95 00 1F 3B D4 77 15 00 00 00 A8 00 00 00 4F 3B' - 'D4 77 E0 19 95 00 33 3B D4 77 64 C5 F5 77 A9 F1' - 'E7 77 F8 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 1A 95 00 B0 6C 38 00 96 00 00 00 00 00' - '00 00 C9 F1 E7 77 96 00 00 00 A4 1A 95 00 09 00' - '00 00 00 00 00 00 96 00 00 00 96 00 00 00 09 00' - '00 00 F4 19 95 00 33 3B D4 77 B4 1A 95 00 09 48' - 'E9 77 B8 10 E9 77 FF FF FF FF C9 F1 E7 77 16 EA' - '4B 00 F8 00 00 00 B0 6C 38 00 96 00 00 00 58 1A' - '95 00 00 00 00 00 00 00 00 00 01 05 05 05 05 05' - '05 01 00 00 00 00 00 00 00 00 0A 1F 1B 1A 1A 19' - '18 08 00 00 00 00 00 00 00 00 0D 22 21 21 20 1F' - '1B 09 00 00 00 00 00 00 00 00 08 21 22 20 20 21' - '1B 07 00 00 00 00 00 00 00 00 00 0A 20 21 21 1B' - '08 00 00 00 00 00 00 00 02 04 04 23 06 0D 0B 06' - '23 05 05 02 00 00 00 03 19 1F 1F 1F 1B 1F 1B 1B' - '1B 1B 1B 0C 23 00 00 06 21 1E 1E 1E 1E 1E 1E 1D' - '1C 15 1D 1B 05 00 00 07 21 15 10 11 12 14 14 11' - '11 10 15 1B 05 00 00 07 21 15 10 11 11 11 11 11' - '11 0F 15 1B 05 00 00 06 21 11 0F 11 11 11 11 11' - '11 0F 15 1B 05 00 00 06 21 13 11 12 14 14 14 14' - '11 10 15 1B 05 00 00 06 20 15 11 14 15 16 15 15' - '14 11 15 1F 05 00 00 06 20 15 14 15 16 17 17 16' - '15 11 1C 1F 04 00 00 05 1F 22 21 21 21 21 21 21' - '21 21 22 1A 23 00 00 00 07 09 09 09 09 09 09 09' - '09 09 09 06 00 00 F0 0F 00 00 F0 0F 00 00 F0 0F' - '00 00 F0 0F 00 00 F8 1F 00 00 C0 03 00 00 80 01' - '00 00 80 01 00 00 80 01 00 00 80 01 00 00 80 01' - '00 00 80 01 00 00 80 01 00 00 80 01 00 00 80 01' - '00 00 C0 03 00 00 28 00 00 00 20 00 00 00 40 00' - '00 00 01 00 04 00 00 00 00 00 00 02 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 80 00 00 00 00 80 00 00 80 80 00 00 00 00' - '80 00 80 00 80 00 00 80 80 00 C0 C0 C0 00 80 80' - '80 00 FF 00 00 00 00 FF 00 00 FF FF 00 00 00 00' - 'FF 00 FF 00 FF 00 00 FF FF 00 FF FF FF 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 08 77 77 78 88 88 88 80 00 00 00 00 00 00' - '00 00 07 FF 77 77 77 77 87 80 00 00 00 00 00 00' - '00 00 0F FF FF FF 77 77 77 80 00 00 00 00 00 00' - '00 00 07 FF FF FF 77 77 77 80 00 00 00 00 00 00' - '00 00 08 FF FF FF 77 77 77 80 00 00 00 00 00 00' - '00 00 00 FF FF F7 7F F7 78 00 00 00 00 00 00 00' - '00 00 00 8F FF F7 7F FF 70 00 00 00 00 00 00 00' - '00 00 00 00 7F FF FF 78 00 00 00 00 00 00 00 00' - '00 00 00 00 00 87 88 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 08 80 00 00 00 00 00 00 00 00 00' - '08 77 77 77 77 77 77 88 88 88 88 80 00 00 00 00' - '7F FF FF FF FF FF 7F 77 77 77 77 78 00 00 00 00' - 'FF FF 77 77 77 77 77 77 77 77 77 77 00 00 00 00' - 'FF 73 33 88 87 77 77 88 83 33 37 77 00 00 00 00' - 'FF 73 33 33 88 88 88 83 33 33 37 77 00 00 00 00' - 'FF 73 33 33 33 88 33 33 33 33 37 77 00 00 00 00' - 'FF 73 33 33 33 33 33 33 33 33 37 77 00 00 00 00' - 'FF 83 33 33 33 33 33 33 33 33 37 77 00 00 00 00' - 'FF 83 33 33 33 33 33 33 33 33 37 77 00 00 00 00' - 'FF 83 33 33 33 33 33 33 33 33 37 F7 00 00 00 00' - 'FF 83 33 33 33 38 33 33 33 33 37 F7 00 00 00 00' - 'FF 83 33 33 88 88 88 83 33 33 37 F7 00 00 00 00' - '7F 83 33 88 88 87 88 88 83 33 37 F7 00 00 00 00' - '7F 83 38 88 77 77 77 78 88 33 37 F7 00 00 00 00' - '7F 83 38 88 77 77 77 78 88 33 37 F7 00 00 00 00' - '7F 83 88 87 77 77 77 77 88 83 37 F7 00 00 00 00' - '7F FF FF FF FF FF FF FF FF FF 7F F7 00 00 00 00' - '8F FF FF FF FF FF FF FF FF FF FF F8 00 00 00 00' - '08 88 88 88 88 88 88 88 88 88 88 80 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF 00' - '00 FF FE 00 00 7F FE 00 00 7F FE 00 00 7F FE 00' - '00 7F FE 00 00 7F FE 00 00 7F FF 00 00 FF FF 00' - '00 FF FF 80 01 FF F0 00 00 0F E0 00 00 07 C0 00' - '00 03 C0 00 00 03 C0 00 00 03 C0 00 00 03 C0 00' - '00 03 C0 00 00 03 C0 00 00 03 C0 00 00 03 C0 00' - '00 03 C0 00 00 03 C0 00 00 03 C0 00 00 03 C0 00' - '00 03 C0 00 00 03 C0 00 00 03 C0 00 00 03 C0 00' - '00 03 C0 00 00 03 C0 00 00 03 E0 00 00 07 28 00' - '00 00 10 00 00 00 20 00 00 00 01 00 04 00 00 00' - '00 00 80 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 80 00 00 00 00 80' - '00 00 80 80 00 00 00 00 80 00 80 00 80 00 00 80' - '80 00 C0 C0 C0 00 80 80 80 00 FF 00 00 00 00 FF' - '00 00 FF FF 00 00 00 00 FF 00 FF 00 FF 00 00 FF' - 'FF 00 FF FF FF 00 00 00 00 00 00 00 00 00 00 00' - '87 77 78 80 00 00 00 00 8F FF 77 78 00 00 00 00' - '0F FF 7F 70 00 00 00 00 08 FF F7 80 00 00 00 00' - '00 08 80 00 00 00 00 87 77 77 77 77 78 00 00 F7' - '77 77 77 78 77 00 00 F8 33 88 83 33 87 00 00 F8' - '33 33 33 33 87 00 00 F3 33 33 33 33 87 00 00 F3' - '38 88 88 33 87 00 00 F8 38 88 88 83 87 00 00 F8' - '88 77 78 83 77 00 00 7F FF FF FF FF F7 00 00 08' - '88 88 88 88 80 00 E0 0F 00 00 E0 07 00 00 E0 07' - '00 00 E0 07 00 00 F0 0F 00 00 80 01 00 00 80 01' - '00 00 80 01 00 00 80 01 00 00 80 01 00 00 80 01' - '00 00 80 01 00 00 80 01 00 00 80 01 00 00 80 01' - '00 00 80 01 00 00 28 00 00 00 30 00 00 00 60 00' - '00 00 01 00 08 00 00 00 00 00 00 09 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 01 00 00 00 02 00 00 00 03 00 00 00 00 00' - '05 00 08 00 00 00 11 11 11 00 22 22 22 00 33 33' - '33 00 44 44 44 00 55 55 55 00 6D 65 5C 00 69 6E' - '65 00 6F 6D 70 00 77 77 77 00 7F 7F 7F 00 99 33' - '00 00 CC 33 00 00 99 66 33 00 98 69 38 00 CC 66' - '00 00 CC 66 33 00 D0 60 38 00 CC 99 33 00 CC 99' - '66 00 FF 99 66 00 FF CC 66 00 88 88 88 00 99 99' - '99 00 AA AA AA 00 BB BB BB 00 CC 99 99 00 FF CC' - '99 00 CC CC CC 00 DD DD DD 00 EE EE EE 00 FF FF' - 'FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 C0 17 95 00 00 00 38 00 A8 44' - 'F9 77 15 00 00 00 78 0A 38 00 00 00 38 00 B0 6C' - '38 00 98 17 95 00 00 00 00 00 E0 19 95 00 F0 88' - 'FA 77 70 38 F5 77 FF FF FF FF A8 44 F9 77 70 7D' - 'F5 77 3A 8A F5 77 96 00 00 00 96 00 00 00 09 00' - '00 00 B0 18 95 00 00 00 00 00 CB 44 F9 77 38 9F' - '07 00 CD 8B F5 77 78 13 05 00 37 90 F5 77 00 00' - '00 00 3E 8A F5 77 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 10 00' - '00 00 00 00 00 00 5E 00 60 00 00 EC FD 7F 1A 02' - '00 00 4C 16 95 00 40 9F 07 00 FC 15 95 00 FF FF' - 'FF FF B4 1A 95 00 45 00 00 00 28 02 00 00 FF FF' - 'FF FF E2 D8 F5 77 7D 9B F5 77 94 B6 01 00 00 00' - '05 00 F4 17 95 00 80 00 10 C0 B4 1A 95 00 F0 88' - 'FA 77 88 1C F5 77 FF FF FF FF 37 90 F5 77 00 00' - '00 00 3E 8A F5 77 9B B2 E7 77 B7 00 00 00 02 00' - '00 00 A4 1A 95 00 01 00 00 00 18 00 00 00 00 00' - '00 00 10 19 95 00 42 00 00 00 00 00 00 00 F4 18' - '95 00 00 00 00 00 00 00 00 00 00 00 00 00 0C 00' - '00 00 02 00 00 00 01 01 F5 77 00 EC FD 7F 5E 00' - '00 00 00 00 00 00 03 00 00 00 66 00 1A 02 40 9F' - '07 00 00 00 00 00 40 9F 07 00 05 00 00 00 BE B3' - 'E7 77 4C 19 95 00 A3 B4 E7 77 F8 00 00 00 00 00' - '00 C0 00 00 00 00 00 00 00 00 02 00 00 00 80 00' - '00 00 00 00 00 00 8C 1A 95 00 7F E9 4B 00 C0 CE' - '0B 01 00 00 00 C0 00 00 00 00 80 1A 95 00 02 00' - '00 00 80 00 00 00 00 00 00 00 C0 27 95 00 C4 F5' - 'AF 00 02 00 00 00 44 3A 5C 6F 73 65 78 70 65 72' - '74 73 5C 72 65 61 63 74 6F 73 5C 6C 69 62 5C 73' - '68 65 6C 6C 33 32 5C 6D 79 63 6F 6D 70 75 74 65' - '72 2E 69 63 6F 00 14 1A 95 00 1F 3B D4 77 15 00' - '00 00 A8 00 00 00 4F 3B D4 77 E0 19 95 00 33 3B' - 'D4 77 64 C5 F5 77 A9 F1 E7 77 F8 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 1A 95 00 B0 6C' - '38 00 96 00 00 00 00 00 00 00 C9 F1 E7 77 96 00' - '00 00 A4 1A 95 00 09 00 00 00 00 00 00 00 96 00' - '00 00 96 00 00 00 09 00 00 00 F4 19 95 00 33 3B' - 'D4 77 B4 1A 95 00 09 48 E9 77 B8 10 E9 77 FF FF' - 'FF FF C9 F1 E7 77 16 EA 4B 00 F8 00 00 00 B0 6C' - '38 00 96 00 00 00 58 1A 95 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 25 25 25 25 25' - '25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25' - '25 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 25 25 25 25 25 25' - '25 25 25 25 01 01 01 01 01 02 02 03 04 04 03 25' - '25 25 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 25 25 07 1C 1E 1E 1D' - '1D 1D 1D 1D 1D 1D 1D 1C 1C 1C 1C 1B 1B 1B 1B 0A' - '03 25 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 25 25 0A 24 24 23 23' - '22 22 22 22 21 21 21 21 1E 1E 1E 1D 1C 1C 1C 1D' - '07 25 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 25 25 0F 24 24 23 23' - '22 22 22 22 21 21 21 21 1E 1E 1E 1E 1D 1C 1C 1D' - '09 25 25 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 25 25 1C 24 24 24 23' - '23 23 23 23 23 22 22 22 21 21 21 1E 1D 1D 1D 1E' - '09 25 25 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 25 25 1B 24 24 24 24' - '24 24 24 24 24 23 23 22 22 22 21 21 1E 1D 1D 1E' - '09 25 25 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 25 25 0B 24 24 24 23' - '23 23 22 22 22 22 22 21 21 21 1E 1E 1D 1D 1E 1E' - '07 25 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 25 08 23 24 24 24' - '24 24 24 23 23 23 23 22 22 22 22 21 1E 1E 1E 1C' - '06 25 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 25 04 1C 24 24 24' - '24 24 24 24 22 1E 21 22 23 22 22 21 21 1E 1E 09' - '25 25 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 25 25 06 21 24 24' - '24 24 24 24 1D 1C 1C 21 23 22 22 21 21 22 1B 25' - '25 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 25 25 09 21 24' - '24 24 24 24 23 22 22 23 23 23 22 22 22 0E 06 25' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 25 25 08 1E' - '24 24 24 24 24 24 24 24 23 23 23 21 0E 05 25 25' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 25 25 05' - '0A 21 24 24 24 24 24 24 24 22 1C 08 25 25 25 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 25 25' - '25 06 09 0C 1B 1D 1D 0F 0A 08 04 25 25 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 25 25 25 25 25 25 25 25 25 25 25' - '25 25 25 25 04 0F 09 25 25 25 25 25 25 25 25 25' - '25 25 25 25 25 25 25 00 00 00 00 00 00 00 00 00' - '00 00 00 25 25 25 25 25 25 25 25 25 25 25 25 25' - '25 25 25 25 0A 1E 1B 07 25 25 25 25 25 25 25 25' - '25 25 25 25 25 25 25 25 25 00 00 00 00 00 00 00' - '00 00 25 25 04 0A 1D 1D 1D 1D 1D 1D 1D 1D 1D 1D' - '1D 1D 1D 1D 21 21 21 1E 1D 1D 1D 1D 1C 1C 1C 1C' - '1C 1C 1C 1C 1C 1C 08 25 25 00 00 00 00 00 00 00' - '00 00 25 25 0E 24 24 24 24 24 24 24 24 24 23 23' - '23 23 23 23 23 22 22 22 22 22 22 22 22 22 22 22' - '22 21 21 21 21 22 21 08 25 25 00 00 00 00 00 00' - '00 25 25 06 22 24 24 24 23 23 23 23 23 23 23 23' - '23 23 22 22 22 22 22 22 22 22 22 21 21 21 21 21' - '21 21 21 21 1E 1E 22 1D 25 25 00 00 00 00 00 00' - '00 25 25 08 23 24 24 23 23 23 23 23 23 23 23 23' - '23 23 23 23 23 23 22 22 22 22 22 22 22 22 22 22' - '22 22 21 22 21 1E 21 1D 04 25 00 00 00 00 00 00' - '00 25 25 09 23 24 24 21 18 18 18 1F 1F 1F 20 20' - '20 20 20 20 20 20 20 20 20 20 20 20 1F 1F 1F 18' - '18 18 18 1F 22 21 21 1D 04 25 00 00 00 00 00 00' - '00 25 25 08 23 24 24 1F 14 15 15 15 15 16 17 17' - '17 17 17 18 18 18 17 17 17 17 17 16 15 15 15 15' - '15 14 14 15 22 21 21 1D 04 25 00 00 00 00 00 00' - '00 25 25 08 23 24 24 1F 14 15 15 15 15 16 17 17' - '17 17 17 18 18 18 18 17 17 17 17 16 15 15 15 15' - '15 15 14 15 22 21 21 1D 04 25 00 00 00 00 00 00' - '00 25 25 08 23 24 24 1F 14 15 15 15 15 15 16 16' - '17 17 17 17 17 17 17 17 17 16 16 15 15 15 15 15' - '15 15 14 15 22 21 21 1D 04 25 00 00 00 00 00 00' - '00 25 25 08 23 24 24 1F 14 15 15 15 15 15 15 15' - '16 16 16 17 17 17 16 16 16 15 15 15 15 15 15 15' - '15 14 10 15 22 21 21 1D 04 25 00 00 00 00 00 00' - '00 25 25 08 23 24 24 1F 11 14 15 15 15 15 15 15' - '15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15' - '14 14 10 15 22 21 22 1D 04 25 00 00 00 00 00 00' - '00 25 25 08 23 24 24 1F 10 14 14 15 15 15 15 15' - '15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 14' - '14 10 10 15 23 21 22 1D 04 25 00 00 00 00 00 00' - '00 25 25 08 23 24 24 1F 10 11 14 14 15 15 15 15' - '15 15 15 15 15 15 15 15 15 15 15 15 15 14 14 14' - '10 10 10 15 23 21 22 1D 03 25 00 00 00 00 00 00' - '00 25 25 08 23 24 24 1F 10 10 10 14 14 14 14 15' - '15 15 15 15 15 15 15 15 15 15 15 15 14 14 14 10' - '10 10 10 15 23 21 22 1D 03 25 00 00 00 00 00 00' - '00 25 25 08 23 24 24 1F 10 10 10 10 14 14 15 15' - '15 15 15 15 15 15 15 15 15 15 15 15 15 14 14 10' - '10 10 10 15 23 22 22 1D 03 25 00 00 00 00 00 00' - '00 25 25 08 23 24 24 1F 10 10 10 10 15 15 15 15' - '15 15 15 16 16 16 16 15 15 15 15 15 15 15 15 14' - '10 10 10 15 23 22 22 1D 02 25 00 00 00 00 00 00' - '00 25 25 08 23 24 24 1F 10 10 14 15 15 15 15 15' - '16 16 16 17 17 17 17 17 16 16 16 15 15 15 15 15' - '15 10 10 15 23 22 22 1D 02 25 00 00 00 00 00 00' - '00 25 25 08 23 24 24 18 10 14 15 15 15 15 16 16' - '17 17 17 17 17 17 17 17 17 17 17 16 15 15 15 15' - '15 15 10 15 23 22 22 1D 02 25 00 00 00 00 00 00' - '00 25 25 08 23 24 24 18 10 15 15 15 16 16 17 17' - '17 17 18 18 18 18 18 18 17 17 17 17 16 16 15 15' - '15 15 15 15 23 22 22 1D 01 25 00 00 00 00 00 00' - '00 25 25 08 23 24 24 18 14 15 15 15 16 17 17 17' - '18 18 18 18 18 18 18 18 18 18 17 17 17 17 16 15' - '15 15 15 15 23 22 22 1D 01 25 00 00 00 00 00 00' - '00 25 25 08 22 24 24 18 15 15 15 16 17 17 17 18' - '18 18 18 18 19 19 18 18 18 18 18 18 17 17 17 16' - '15 15 15 15 23 22 23 1D 25 25 00 00 00 00 00 00' - '00 25 25 08 22 24 24 18 15 15 16 17 17 17 18 18' - '18 19 19 19 19 19 19 19 19 18 18 18 18 17 17 16' - '16 15 15 15 23 23 23 1D 25 25 00 00 00 00 00 00' - '00 25 25 08 22 24 24 18 14 16 16 17 17 18 18 18' - '19 19 19 19 19 19 19 19 19 19 18 18 18 17 17 17' - '16 15 15 15 23 24 24 1D 25 25 00 00 00 00 00 00' - '00 25 25 07 22 24 24 18 10 15 17 17 17 18 18 19' - '19 19 19 1A 1A 1A 1A 19 19 19 19 18 18 17 17 17' - '16 15 15 15 23 24 24 1D 25 25 00 00 00 00 00 00' - '00 25 25 07 22 24 24 1F 12 15 18 18 18 18 18 18' - '18 18 18 1A 1A 1A 1A 18 18 18 18 18 18 18 18 18' - '18 15 12 13 24 24 24 1D 25 25 00 00 00 00 00 00' - '00 25 25 07 22 24 24 23 23 23 23 23 23 23 23 23' - '23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 22' - '22 22 22 23 24 24 24 1D 25 25 00 00 00 00 00 00' - '00 25 25 06 21 24 24 24 24 24 24 24 24 24 24 24' - '24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24' - '24 24 24 24 24 24 24 0F 25 25 00 00 00 00 00 00' - '00 00 25 25 0A 22 24 24 24 24 24 24 24 24 24 24' - '24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24' - '24 24 24 24 24 24 1D 07 25 25 00 00 00 00 00 00' - '00 00 25 25 01 08 0D 0F 0F 0F 0F 0F 0F 0F 0F 0F' - '0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0E 0E 0E' - '0E 0E 0E 0E 0E 0A 06 25 25 00 00 00 00 00 00 00' - '00 00 00 25 25 25 25 25 25 25 25 25 25 25 25 25' - '25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25' - '25 25 25 25 25 25 25 25 25 00 00 00 00 00 00 00' - '00 00 00 00 00 25 25 25 25 25 25 25 25 25 25 25' - '25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25' - '25 25 25 25 25 25 25 00 00 00 00 00 00 00 FF FF' - 'FF FF FF FF 00 00 FF F8 00 00 1F FF 00 00 FF F0' - '00 00 0F FF 00 00 FF E0 00 00 0F FF 00 00 FF E0' - '00 00 0F FF 00 00 FF E0 00 00 07 FF 00 00 FF E0' - '00 00 07 FF 00 00 FF E0 00 00 07 FF 00 00 FF E0' - '00 00 0F FF 00 00 FF F0 00 00 0F FF 00 00 FF F0' - '00 00 0F FF 00 00 FF F0 00 00 1F FF 00 00 FF F8' - '00 00 3F FF 00 00 FF FC 00 00 3F FF 00 00 FF FE' - '00 00 7F FF 00 00 FF FF 00 01 FF FF 00 00 FE 00' - '00 00 00 7F 00 00 F8 00 00 00 00 1F 00 00 F0 00' - '00 00 00 1F 00 00 F0 00 00 00 00 0F 00 00 E0 00' - '00 00 00 0F 00 00 E0 00 00 00 00 0F 00 00 E0 00' - '00 00 00 0F 00 00 E0 00 00 00 00 0F 00 00 E0 00' - '00 00 00 0F 00 00 E0 00 00 00 00 0F 00 00 E0 00' - '00 00 00 0F 00 00 E0 00 00 00 00 0F 00 00 E0 00' - '00 00 00 0F 00 00 E0 00 00 00 00 0F 00 00 E0 00' - '00 00 00 0F 00 00 E0 00 00 00 00 0F 00 00 E0 00' - '00 00 00 0F 00 00 E0 00 00 00 00 0F 00 00 E0 00' - '00 00 00 0F 00 00 E0 00 00 00 00 0F 00 00 E0 00' - '00 00 00 0F 00 00 E0 00 00 00 00 0F 00 00 E0 00' - '00 00 00 0F 00 00 E0 00 00 00 00 0F 00 00 E0 00' - '00 00 00 0F 00 00 E0 00 00 00 00 0F 00 00 E0 00' - '00 00 00 0F 00 00 E0 00 00 00 00 0F 00 00 F0 00' - '00 00 00 0F 00 00 F0 00 00 00 00 1F 00 00 F8 00' - '00 00 00 1F 00 00 FE 00 00 00 00 7F 00 00 28 00' - '00 00 30 00 00 00 60 00 00 00 01 00 04 00 00 00' - '00 00 80 04 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 80 00 00 00 00 80' - '00 00 80 80 00 00 00 00 80 00 80 00 80 00 00 80' - '80 00 C0 C0 C0 00 80 80 80 00 FF 00 00 00 00 FF' - '00 00 FF FF 00 00 00 00 FF 00 FF 00 FF 00 00 FF' - 'FF 00 FF FF FF 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 87 77 77 77 77 78 88 88 88 88 00' - '00 00 00 00 00 00 00 00 00 00 00 00 08 FF FF FF' - '77 77 77 77 77 88 87 00 00 00 00 00 00 00 00 00' - '00 00 00 00 08 FF FF F7 77 77 77 77 77 78 87 00' - '00 00 00 00 00 00 00 00 00 00 00 00 08 FF FF FF' - 'FF FF 77 77 77 77 77 80 00 00 00 00 00 00 00 00' - '00 00 00 00 08 FF FF FF FF FF FF 77 77 77 77 00' - '00 00 00 00 00 00 00 00 00 00 00 00 08 FF FF FF' - 'F7 77 77 77 77 77 77 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 FF FF FF FF FF FF F7 77 77 78 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 8F FF FF' - 'FF 77 7F FF 77 77 78 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 07 FF FF FF 78 87 FF 77 77 80 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 7F FF' - 'FF F7 FF FF 77 78 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 07 FF FF FF FF FF F7 80 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 87' - 'FF FF FF FF 80 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 08 87 78 80 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 08 80 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 87 80 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 08 77 77 77 77 77 77' - '77 77 77 77 77 77 77 78 88 78 00 00 00 00 00 00' - '00 8F FF FF FF FF FF FF FF FF FF FF F7 77 77 77' - '77 77 70 00 00 00 00 00 00 7F FF FF FF FF FF FF' - 'FF F7 77 77 77 77 77 77 77 77 77 00 00 00 00 00' - '00 FF FF FF FF FF FF FF FF FF FF FF F7 77 77 77' - '77 77 77 00 00 00 00 00 00 FF F7 87 77 77 77 77' - '77 77 77 77 77 77 77 78 87 F7 77 00 00 00 00 00' - '00 FF F7 33 33 33 38 88 88 88 88 88 33 33 33 33' - '33 F7 77 00 00 00 00 00 00 FF F7 33 33 33 38 88' - '88 88 88 88 83 33 33 33 33 F7 77 00 00 00 00 00' - '00 FF F7 33 33 33 33 38 88 88 88 83 33 33 33 33' - '33 F7 77 00 00 00 00 00 00 FF F7 33 33 33 33 33' - '33 33 33 33 33 33 33 33 33 F7 77 00 00 00 00 00' - '00 FF F7 33 33 33 33 33 33 33 33 33 33 33 33 33' - '33 F7 77 00 00 00 00 00 00 FF F7 33 33 33 33 33' - '33 33 33 33 33 33 33 33 13 F7 77 00 00 00 00 00' - '00 FF F7 13 33 33 33 33 33 33 33 33 33 33 33 33' - '13 F7 77 00 00 00 00 00 00 FF F7 13 33 33 33 33' - '33 33 33 33 33 33 33 31 13 F7 77 00 00 00 00 00' - '00 FF F8 11 33 33 33 33 33 33 33 33 33 33 33 11' - '13 F7 77 00 00 00 00 00 00 FF F8 11 13 33 33 33' - '33 33 33 33 33 33 33 11 13 F7 77 00 00 00 00 00' - '00 FF F8 11 33 33 33 33 38 88 83 33 33 33 33 33' - '13 F7 F7 00 00 00 00 00 00 FF F8 13 33 33 33 88' - '88 88 88 88 83 33 33 33 33 F7 F7 00 00 00 00 00' - '00 FF F8 33 33 33 88 88 88 88 88 88 88 33 33 33' - '33 F7 F7 00 00 00 00 00 00 FF F8 33 33 38 88 88' - '88 88 88 88 88 83 33 33 33 F7 F7 00 00 00 00 00' - '00 FF F8 33 33 88 88 88 88 77 78 88 88 88 33 33' - '38 FF F7 00 00 00 00 00 00 FF F8 33 38 88 88 87' - '77 77 77 78 88 88 83 33 38 FF F7 00 00 00 00 00' - '00 FF F8 33 38 88 88 77 77 77 77 77 88 88 88 33' - '33 FF F7 00 00 00 00 00 00 FF F8 33 38 88 87 77' - '77 77 77 77 78 88 83 33 33 FF F7 00 00 00 00 00' - '00 FF F8 38 88 88 87 77 77 77 77 77 78 88 88 88' - '38 FF F7 00 00 00 00 00 00 FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF F7 00 00 00 00 00' - '00 7F FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF F8 00 00 00 00 00 00 8F FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF 70 00 00 00 00 00' - '00 00 88 88 88 88 88 88 88 88 88 88 88 88 88 88' - '88 88 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 FF FF FF FF FF FF 00 00 FF F8' - '00 00 1F FF 00 00 FF F0 00 00 0F FF 00 00 FF E0' - '00 00 0F FF 00 00 FF E0 00 00 0F FF 00 00 FF E0' - '00 00 07 FF 00 00 FF E0 00 00 07 FF 00 00 FF E0' - '00 00 07 FF 00 00 FF E0 00 00 0F FF 00 00 FF F0' - '00 00 0F FF 00 00 FF F0 00 00 0F FF 00 00 FF F0' - '00 00 1F FF 00 00 FF F8 00 00 3F FF 00 00 FF FC' - '00 00 3F FF 00 00 FF FE 00 00 7F FF 00 00 FF FF' - '00 01 FF FF 00 00 FE 00 00 00 00 7F 00 00 F8 00' - '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F0 00' - '00 00 00 0F 00 00 E0 00 00 00 00 0F 00 00 E0 00' - '00 00 00 0F 00 00 E0 00 00 00 00 0F 00 00 E0 00' - '00 00 00 0F 00 00 E0 00 00 00 00 0F 00 00 E0 00' - '00 00 00 0F 00 00 E0 00 00 00 00 0F 00 00 E0 00' - '00 00 00 0F 00 00 E0 00 00 00 00 0F 00 00 E0 00' - '00 00 00 0F 00 00 E0 00 00 00 00 0F 00 00 E0 00' - '00 00 00 0F 00 00 E0 00 00 00 00 0F 00 00 E0 00' - '00 00 00 0F 00 00 E0 00 00 00 00 0F 00 00 E0 00' - '00 00 00 0F 00 00 E0 00 00 00 00 0F 00 00 E0 00' - '00 00 00 0F 00 00 E0 00 00 00 00 0F 00 00 E0 00' - '00 00 00 0F 00 00 E0 00 00 00 00 0F 00 00 E0 00' - '00 00 00 0F 00 00 E0 00 00 00 00 0F 00 00 E0 00' - '00 00 00 0F 00 00 F0 00 00 00 00 0F 00 00 F0 00' - '00 00 00 1F 00 00 F8 00 00 00 00 1F 00 00 FE 00' - '00 00 00 7F 00 00 28 00 00 00 30 00 00 00 60 00' - '00 00 01 00 20 00 00 00 00 00 00 24 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 0C 00 00 00 2F 00 00 00 38 00 00' - '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' - '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' - '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' - '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' - '00 38 00 00 00 2A 00 00 00 0B 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 43 00 00 00 B0 00 00 00 F4 00 00 00 F8 00 00' - '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' - '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' - '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' - '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' - '00 F8 00 00 00 DA 00 00 00 85 00 00 00 28 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 11 00 00' - '00 E2 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 01 01 01 FF 01 01 01 FF 01 01' - '01 FF 01 01 01 FF 01 01 01 FF 02 02 02 FF 02 02' - '02 FF 03 03 03 FF 04 04 04 FF 04 04 04 FF 03 03' - '03 FF 00 00 00 FF 00 00 00 FF 00 00 00 AF 00 00' - '00 12 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 65 00 00' - '00 FF 20 20 20 FF 9B 9B 9B FF B9 B9 B9 FF B5 B5' - 'B5 FF B2 B2 B2 FF B0 B0 B0 FF AE AE AE FF AB AB' - 'AB FF A9 A9 A9 FF A7 A7 A7 FF A4 A4 A4 FF A2 A2' - 'A2 FF 9F 9F 9F FF 9C 9C 9C FF 9B 9B 9B FF 96 96' - '96 FF 8C 8C 8C FF 86 86 86 FF 88 88 88 FF 8E 8E' - '8E FF 5A 5A 5A FF 03 03 03 FF 00 00 00 E9 00 00' - '00 36 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 A6 00 00' - '00 FF 59 59 59 FF FF FF FF FF FA FA FA FF F1 F1' - 'F1 FF EB EB EB FF E4 E4 E4 FF E0 E0 E0 FF DC DC' - 'DC FF D8 D8 D8 FF D4 D4 D4 FF D0 D0 D0 FF CB CB' - 'CB FF C7 C7 C7 FF C3 C3 C3 FF BF BF BF FF BB BB' - 'BB FF B0 B0 B0 FF 9E 9E 9E FF 97 97 97 FF 9E 9E' - '9E FF B0 B0 B0 FF 25 25 25 FF 00 00 00 FD 00 00' - '00 5A 00 00 00 01 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 05 00 00 00 C6 00 00' - '00 FF 82 82 82 FF FF FF FF FF F7 F7 F7 FF F1 F1' - 'F1 FF E9 E9 E9 FF E4 E4 E4 FF DF DF DF FF DA DA' - 'DA FF D6 D6 D6 FF D2 D2 D2 FF CE CE CE FF CA CA' - 'CA FF C7 C7 C7 FF C3 C3 C3 FF BF BF BF FF BB BB' - 'BB FF B8 B8 B8 FF A9 A9 A9 FF 9C 9C 9C FF 98 98' - '98 FF AF AF AF FF 3D 3D 3D FF 00 00 00 FF 00 00' - '00 7C 00 00 00 01 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 09 00 00 00 D4 00 00' - '00 FF 92 92 92 FF FF FF FF FF FF FF FF FF F9 F9' - 'F9 FF F6 F6 F6 FF F6 F6 F6 FF F3 F3 F3 FF EF EF' - 'EF FF EC EC EC FF E6 E6 E6 FF E1 E1 E1 FF DC DC' - 'DC FF D6 D6 D6 FF D1 D1 D1 FF CC CC CC FF C6 C6' - 'C6 FF C3 C3 C3 FF AF AF AF FF A5 A5 A5 FF A8 A8' - 'A8 FF B6 B6 B6 FF 44 44 44 FF 00 00 00 FF 00 00' - '00 85 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 B5 00 00' - '00 FF 84 84 84 FF FF FF FF FF FF FF FF FF F7 F7' - 'F7 FF FB FB FB FF FD FD FD FF FC FC FC FF FC FC' - 'FC FF FA FA FA FF F8 F8 F8 FF F1 F1 F1 FF EB EB' - 'EB FF E5 E5 E5 FF DF DF DF FF D9 D9 D9 FF D3 D3' - 'D3 FF CF CF CF FF B5 B5 B5 FF A3 A3 A3 FF AD AD' - 'AD FF BB BB BB FF 3D 3D 3D FF 00 00 00 FF 00 00' - '00 68 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 88 00 00' - '00 FF 5F 5F 5F FF FF FF FF FF FF FF FF FF FB FB' - 'FB FF EF EF EF FF EE EE EE FF E9 E9 E9 FF E3 E3' - 'E3 FF DF DF DF FF DD DD DD FF DA DA DA FF D5 D5' - 'D5 FF D0 D0 D0 FF CC CC CC FF C7 C7 C7 FF C3 C3' - 'C3 FF BE BE BE FF B0 B0 B0 FF B2 B2 B2 FF B4 B4' - 'B4 FF BA BA BA FF 28 28 28 FF 00 00 00 F7 00 00' - '00 3C 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 34 00 00' - '00 FA 2E 2E 2E FF ED ED ED FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FE FE FE FF FA FA' - 'FA FF F5 F5 F5 FF F4 F4 F4 FF EF EF EF FF EB EB' - 'EB FF E5 E5 E5 FF E0 E0 E0 FF DC DC DC FF D8 D8' - 'D8 FF D2 D2 D2 FF C2 C2 C2 FF BA BA BA FF C1 C1' - 'C1 FF 97 97 97 FF 0A 0A 0A FF 00 00 00 D5 00 00' - '00 19 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 04 00 00' - '00 C8 04 04 04 FF 97 97 97 FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FD FD FD FF DF DF DF FF BE BE BE FF C4 C4' - 'C4 FF E4 E4 E4 FF E6 E6 E6 FF E1 E1 E1 FF DD DD' - 'DD FF D1 D1 D1 FF C5 C5 C5 FF C2 C2 C2 FF BF BF' - 'BF FF 43 43 43 FF 00 00 00 FF 00 00 00 9A 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 6C 00 00 00 FF 18 18 18 FF D1 D1 D1 FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FE FE FE FF B2 B2 B2 FF 9D 9D 9D FF 98 98' - '98 FF D1 D1 D1 FF ED ED ED FF E5 E5 E5 FF DF DF' - 'DF FF D1 D1 D1 FF CC CC CC FF D5 D5 D5 FF 84 84' - '84 FF 00 00 00 FF 00 00 00 E2 00 00 00 29 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 96 00 00 00 FF 3E 3E 3E FF D1 D1' - 'D1 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF ED ED ED FF DE DE DE FF E1 E1' - 'E1 FF EC EC EC FF EE EE EE FF E7 E7 E7 FF DC DC' - 'DC FF DC DC DC FF D7 D7 D7 FF 7B 7B 7B FF 14 14' - '14 FF 00 00 00 FF 00 00 00 5F 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 1A 00 00 00 C6 00 00 00 FF 35 35' - '35 FF C3 C3 C3 FF F9 F9 F9 FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FC FC FC FF FC FC' - 'FC FF F7 F7 F7 FF F0 F0 F0 FF EC EC EC FF EB EB' - 'EB FF CF CF CF FF 77 77 77 FF 07 07 07 FF 00 00' - '00 FD 00 00 00 8F 00 00 00 05 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 05 00 00 00 B6 00 00' - '00 FF 08 08 08 FF 58 58 58 FF CB CB CB FF FD FD' - 'FD FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF F9 F9 F9 FF E3 E3 E3 FF 9E 9E' - '9E FF 31 31 31 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00' - '00 0C 00 00 00 14 00 00 00 14 00 00 00 14 00 00' - '00 14 00 00 00 14 00 00 00 0E 00 00 00 1F 00 00' - '00 7B 00 00 00 E9 00 00 00 FF 10 10 10 FF 3E 3E' - '3E FF 69 69 69 FF 89 89 89 FF B1 B1 B1 FF A2 A2' - 'A2 FF 7E 7E 7E FF 57 57 57 FF 2C 2C 2C FF 04 04' - '04 FF 00 00 00 FF 00 00 00 BF 00 00 00 4F 00 00' - '00 14 00 00 00 11 00 00 00 14 00 00 00 14 00 00' - '00 14 00 00 00 14 00 00 00 14 00 00 00 0C 00 00' - '00 05 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 04 00 00 00 4C 00 00 00 8A 00 00' - '00 AD 00 00 00 BB 00 00 00 B9 00 00 00 B9 00 00' - '00 B9 00 00 00 B9 00 00 00 B9 00 00 00 B5 00 00' - '00 AB 00 00 00 D1 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 04 04 04 FF 7E 7E 7E FF 4B 4B' - '4B FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 F1 00 00 00 BA 00 00 00 AF 00 00' - '00 B7 00 00 00 B9 00 00 00 B9 00 00 00 B9 00 00' - '00 B9 00 00 00 B9 00 00 00 B8 00 00 00 A5 00 00' - '00 85 00 00 00 43 00 00 00 0A 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 06 00 00 00 95 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 54 54 54 FF BD BD BD FF 8A 8A' - '8A FF 1B 1B 1B FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 F0 00 00 00 69 00 00 00 0D 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 7A 00 00 00 FF 04 04 04 FF 5A 5A 5A FF A7 A7' - 'A7 FF AD AD AD FF AB AB AB FF AA AA AA FF AA AA' - 'AA FF AA AA AA FF A9 A9 A9 FF A9 A9 A9 FF A8 A8' - 'A8 FF A8 A8 A8 FF A8 A8 A8 FF A7 A7 A7 FF A6 A6' - 'A6 FF A9 A9 A9 FF C5 C5 C5 FF D3 D3 D3 FF C6 C6' - 'C6 FF B4 B4 B4 FF A3 A3 A3 FF A3 A3 A3 FF A3 A3' - 'A3 FF A2 A2 A2 FF A1 A1 A1 FF A1 A1 A1 FF A1 A1' - 'A1 FF A0 A0 A0 FF A0 A0 A0 FF 9F 9F 9F FF 9F 9F' - '9F FF 9E 9E 9E FF A1 A1 A1 FF 94 94 94 FF 31 31' - '31 FF 00 00 00 FF 00 00 00 F6 00 00 00 5C 00 00' - '00 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 28 00 00' - '00 EA 00 00 00 FF 78 78 78 FF FA FA FA FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FE FE FE FF FB FB' - 'FB FF FA FA FA FF F8 F8 F8 FF F7 F7 F7 FF F4 F4' - 'F4 FF F3 F3 F3 FF F2 F2 F2 FF F0 F0 F0 FF EF EF' - 'EF FF EC EC EC FF E6 E6 E6 FF E2 E2 E2 FF E2 E2' - 'E2 FF E3 E3 E3 FF E4 E4 E4 FF E2 E2 E2 FF E0 E0' - 'E0 FF DE DE DE FF DC DC DC FF DB DB DB FF D9 D9' - 'D9 FF D8 D8 D8 FF D6 D6 D6 FF D4 D4 D4 FF D3 D3' - 'D3 FF D0 D0 D0 FF CF CF CF FF DD DD DD FF CB CB' - 'CB FF 39 39 39 FF 00 00 00 FF 00 00 00 AF 00 00' - '00 17 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 78 00 00' - '00 FF 17 17 17 FF DF DF DF FF FF FF FF FF F7 F7' - 'F7 FF F6 F8 F8 FF F5 F6 F8 FF F3 F4 F5 FF F1 F3' - 'F4 FF EF F0 F2 FF ED EF F0 FF EC ED EE FF E9 EA' - 'EB FF E8 E9 EA FF E6 E7 E9 FF E4 E6 E7 FF E2 E3' - 'E4 FF E0 E1 E3 FF DF E0 E1 FF DD DE DF FF DB DC' - 'DD FF D9 DB DC FF D8 D8 D9 FF D6 D7 D8 FF D4 D5' - 'D7 FF D2 D4 D4 FF D0 D1 D3 FF CE D0 D1 FF CD CE' - 'CF FF CB CD CE FF CA CB CD FF C7 C9 CA FF C6 C8' - 'C9 FF C4 C6 C7 FF C2 C3 C3 FF C0 C0 C0 FF D9 D9' - 'D9 FF A4 A4 A4 FF 00 00 00 FF 00 00 00 EE 00 00' - '00 33 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 84 00 00' - '00 FF 39 39 39 FF F0 F0 F0 FF FF FF FF FF F9 F9' - 'F9 FF F6 F0 EB FF F5 EF EA FF F5 EE EA FF F3 EE' - 'E9 FF F3 ED E9 FF F2 EC E8 FF F2 EC E8 FF F0 EC' - 'E6 FF F0 EB E6 FF F0 EA E6 FF EF EA E4 FF ED E8' - 'E4 FF ED E8 E3 FF EC E7 E2 FF EB E6 E1 FF E9 E5' - 'E0 FF E8 E4 DF FF E7 E2 DD FF E6 E1 DC FF E5 DF' - 'DB FF E3 DE D9 FF E2 DD D8 FF E1 DB D6 FF DF DA' - 'D4 FF DE D8 D3 FF DD D7 D2 FF DB D5 D0 FF D9 D3' - 'CE FF DB D5 D2 FF D3 D2 D2 FF C3 C3 C3 FF CB CB' - 'CB FF AE AE AE FF 05 05 05 FF 00 00 00 F7 00 00' - '00 37 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 84 00 00' - '00 FF 3C 3C 3C FF F1 F1 F1 FF FF FF FF FF FB FF' - 'FF FF E2 CA B9 FF D8 9B 70 FF DC A2 79 FF DE A7' - '7D FF E1 AA 81 FF E3 AF 85 FF E5 B2 88 FF E8 B6' - '8C FF E9 B9 8E FF EB BB 91 FF ED BE 94 FF EE C0' - '95 FF EF C1 96 FF EF C2 97 FF EF C2 97 FF EE C1' - '97 FF EE C0 95 FF EC BE 93 FF EB BB 90 FF E9 B8' - '8E FF E7 B5 8B FF E5 B1 87 FF E3 AE 84 FF E1 AA' - '81 FF DF A6 7D FF DC A2 79 FF D9 9E 75 FF D6 97' - '6E FF E0 AB 8B FF E5 E3 E2 FF C4 C5 C6 FF CC CC' - 'CC FF AB AB AB FF 06 06 06 FF 00 00 00 F7 00 00' - '00 37 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 84 00 00' - '00 FF 3A 3A 3A FF F1 F1 F1 FF FF FF FF FF FD FF' - 'FF FF D0 A9 90 FF BC 56 11 FF C3 63 1F FF C6 69' - '26 FF CA 70 2C FF CD 76 32 FF D1 7B 37 FF D4 81' - '3D FF D7 86 41 FF D9 89 44 FF DC 8D 48 FF DD 90' - '4A FF DF 92 4D FF DF 93 4D FF DF 93 4D FF DE 91' - '4C FF DD 90 4A FF DB 8C 46 FF D8 88 43 FF D6 83' - '3F FF D3 7E 3A FF D0 78 34 FF CC 73 2F FF C8 6D' - '2A FF C5 67 24 FF C1 61 1E FF BD 5A 17 FF B6 4E' - '0A FF C4 6F 38 FF E5 E2 E0 FF C7 C8 C9 FF CF CF' - 'CF FF AC AC AC FF 05 05 05 FF 00 00 00 F7 00 00' - '00 37 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 84 00 00' - '00 FF 39 39 39 FF F0 F0 F0 FF FF FF FF FF FF FF' - 'FF FF D1 AC 94 FF BC 5A 19 FF C2 66 26 FF C6 6C' - '2C FF CA 72 32 FF CD 77 37 FF D0 7C 3C FF D3 81' - '40 FF D5 85 44 FF D7 88 47 FF D9 8C 4A FF DA 8E' - '4C FF DC 8F 4D FF DC 90 4E FF DC 90 4E FF DB 8F' - '4D FF DA 8D 4B FF D9 8A 49 FF D6 87 46 FF D4 83' - '42 FF D1 7F 3E FF CE 7A 39 FF CB 75 34 FF C8 70' - '30 FF C5 6A 2B FF C1 64 25 FF BD 5E 1F FF B7 53' - '12 FF C6 73 3F FF E6 E3 E1 FF C8 C9 CA FF D0 D0' - 'D0 FF AC AC AC FF 05 05 05 FF 00 00 00 F7 00 00' - '00 37 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 84 00 00' - '00 FF 38 38 38 FF F0 F0 F0 FF FF FF FF FF FF FF' - 'FF FF D1 AB 92 FF B9 55 14 FF BF 61 22 FF C3 67' - '28 FF C6 6D 2D FF CA 71 31 FF CC 76 36 FF CF 7B' - '3A FF D1 7E 3D FF D3 81 40 FF D5 85 44 FF D6 87' - '45 FF D7 88 47 FF D7 89 47 FF D7 89 47 FF D7 87' - '47 FF D6 86 45 FF D4 83 42 FF D2 80 3F FF D0 7D' - '3C FF CE 79 38 FF CB 74 34 FF C8 6F 2F FF C5 6A' - '2B FF C2 65 26 FF BE 60 21 FF BA 5A 1B FF B4 4E' - '0F FF C4 70 3C FF E6 E3 E2 FF CA CB CC FF D2 D2' - 'D2 FF AC AC AC FF 05 05 05 FF 00 00 00 F7 00 00' - '00 37 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 84 00 00' - '00 FF 38 38 38 FF F0 F0 F0 FF FF FF FF FF FF FF' - 'FF FF D0 A9 91 FF B7 51 10 FF BD 5C 1D FF C0 62' - '23 FF C3 67 28 FF C6 6C 2C FF C9 71 30 FF CB 75' - '34 FF CE 78 37 FF CF 7B 3A FF D0 7E 3D FF D1 7F' - '3E FF D2 81 40 FF D3 81 40 FF D2 81 40 FF D2 80' - '3F FF D1 7F 3E FF D0 7C 3C FF CE 79 39 FF CD 76' - '36 FF CA 73 32 FF C7 6E 2E FF C5 6A 2A FF C2 66' - '26 FF BF 60 21 FF BC 5B 1C FF B8 55 17 FF B2 4A' - '0A FF C2 6C 39 FF E7 E4 E3 FF CC CD CE FF D4 D4' - 'D4 FF AB AB AB FF 04 04 04 FF 00 00 00 F7 00 00' - '00 37 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 84 00 00' - '00 FF 36 36 36 FF EF EF EF FF FF FF FF FF FF FF' - 'FF FF CE A7 8F FF B3 4C 0B FF B9 58 18 FF BC 5D' - '1E FF C0 62 23 FF C3 66 27 FF C5 6A 2B FF C7 6E' - '2E FF C9 71 31 FF CB 74 33 FF CC 76 36 FF CD 78' - '37 FF CE 79 39 FF CE 79 39 FF CE 79 39 FF CE 79' - '38 FF CD 77 37 FF CC 75 35 FF CA 72 32 FF C8 70' - '30 FF C6 6C 2D FF C3 68 29 FF C1 64 25 FF BE 60' - '21 FF BC 5B 1C FF B8 56 18 FF B5 50 12 FF AF 45' - '05 FF BF 68 35 FF E8 E5 E3 FF CD CF D0 FF D6 D6' - 'D6 FF AB AB AB FF 04 04 04 FF 00 00 00 F7 00 00' - '00 37 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 84 00 00' - '00 FF 36 36 36 FF EE EE EE FF FF FF FF FF FF FF' - 'FF FF CC A4 8C FF B0 46 06 FF B6 51 13 FF B9 57' - '18 FF BC 5B 1D FF BF 60 21 FF C1 64 24 FF C3 67' - '28 FF C5 6A 2B FF C6 6D 2D FF C8 6F 2F FF C9 70' - '30 FF C9 72 32 FF C9 72 32 FF C9 72 32 FF C9 72' - '31 FF C8 70 30 FF C7 6E 2E FF C6 6B 2C FF C4 69' - '2A FF C2 66 26 FF BF 62 22 FF BD 5E 1F FF BA 5A' - '1B FF B8 55 17 FF B5 50 12 FF B2 4B 0D FF AC 40' - '00 FF BC 64 31 FF E9 E5 E4 FF D0 D1 D2 FF D8 D8' - 'D8 FF AA AA AA FF 04 04 04 FF 00 00 00 F7 00 00' - '00 37 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 84 00 00' - '00 FF 35 35 35 FF ED ED ED FF FF FF FF FF FF FF' - 'FF FF CA A0 88 FF AD 40 00 FF B3 4C 0E FF B5 51' - '13 FF B8 56 17 FF BB 5A 1B FF BD 5D 1E FF BF 61' - '21 FF C0 63 24 FF C1 65 25 FF C2 67 28 FF C3 69' - '29 FF C5 69 2A FF C5 6A 2A FF C5 6A 2A FF C4 69' - '29 FF C4 68 28 FF C2 66 27 FF C0 64 24 FF BF 61' - '22 FF BE 5E 20 FF BC 5B 1D FF BA 58 19 FF B7 54' - '16 FF B5 50 12 FF B2 4B 0D FF AF 46 08 FF A8 3B' - '00 FF BB 62 30 FF EA E7 E5 FF D1 D3 D4 FF D9 D9' - 'D9 FF AA AA AA FF 03 03 03 FF 00 00 00 F7 00 00' - '00 37 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 84 00 00' - '00 FF 34 34 34 FF EC EC EC FF FF FF FF FF FF FF' - 'FF FF C6 9D 85 FF A9 3A 00 FF AF 46 09 FF B2 4B' - '0E FF B4 4F 12 FF B6 53 15 FF B8 55 17 FF B9 58' - '19 FF BB 5C 1D FF BF 60 22 FF C2 66 27 FF C4 68' - '29 FF C5 6A 2A FF C5 6B 2B FF C5 6B 2B FF C5 6B' - '2B FF C5 69 2A FF C3 68 29 FF C1 65 26 FF BF 60' - '22 FF BB 59 1B FF B7 54 15 FF B4 4F 11 FF B3 4D' - '0F FF B1 4A 0C FF AE 45 08 FF AB 40 03 FF A6 38' - '00 FF BA 61 2F FF EA E7 E6 FF D3 D4 D5 FF DB DB' - 'DB FF A9 A9 A9 FF 03 03 03 FF 00 00 00 F7 00 00' - '00 37 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 84 00 00' - '00 FF 33 33 33 FF EC EC EC FF FF FF FF FF FF FF' - 'FF FF C4 9A 83 FF A6 37 00 FF AC 40 03 FF AE 45' - '07 FF AF 47 0A FF B3 4D 0F FF B9 57 18 FF BE 5F' - '20 FF C4 68 29 FF C6 6D 2D FF C8 70 30 FF CA 72' - '31 FF CA 73 33 FF CB 74 33 FF CB 74 33 FF CB 73' - '33 FF CA 73 32 FF C9 71 31 FF C8 70 30 FF C7 6D' - '2D FF C4 69 2A FF BF 60 22 FF B8 56 18 FF B3 4D' - '0F FF AC 42 04 FF AA 3F 02 FF A9 3E 01 FF A6 38' - '00 FF BA 61 2F FF EB E8 E6 FF D5 D6 D7 FF DC DC' - 'DC FF A9 A9 A9 FF 03 03 03 FF 00 00 00 F7 00 00' - '00 37 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 84 00 00' - '00 FF 32 32 32 FF EB EB EB FF FF FF FF FF FF FF' - 'FF FF C3 99 81 FF A6 37 00 FF A9 3D 00 FF A9 3D' - '00 FF B1 49 0C FF C0 63 24 FF C6 6D 2D FF C9 71' - '31 FF CA 74 33 FF CB 75 35 FF CD 78 37 FF CE 79' - '39 FF CF 7B 3A FF CF 7B 3B FF CF 7B 3B FF CF 7B' - '3A FF CE 7A 3A FF CD 79 38 FF CC 76 36 FF CB 74' - '34 FF C9 71 32 FF C7 6E 2F FF C6 6B 2B FF C2 66' - '27 FF B7 54 16 FF AA 40 03 FF A8 3C 00 FF A6 38' - '00 FF BA 61 2F FF EC E9 E7 FF D7 D9 D9 FF DF DF' - 'DF FF A8 A8 A8 FF 02 02 02 FF 00 00 00 F7 00 00' - '00 37 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 84 00 00' - '00 FF 31 31 31 FF EA EA EA FF FF FF FF FF FF FF' - 'FF FF C2 98 80 FF A5 36 00 FF A8 3C 00 FF B7 55' - '17 FF C4 6A 2A FF C8 70 31 FF CA 73 33 FF CD 76' - '36 FF CE 79 39 FF D0 7C 3B FF D1 7F 3E FF D2 80' - '3F FF D3 82 41 FF D3 83 42 FF D3 83 42 FF D3 82' - '41 FF D3 81 40 FF D2 80 3F FF D0 7D 3C FF CF 7B' - '3A FF CD 78 37 FF CB 74 34 FF C9 71 30 FF C7 6E' - '2E FF C5 6A 2B FF BE 5F 20 FF B0 4A 0C FF A5 36' - '00 FF BA 61 2F FF EC E9 E8 FF D8 DA DA FF E0 E0' - 'E0 FF A7 A7 A7 FF 02 02 02 FF 00 00 00 F7 00 00' - '00 37 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 84 00 00' - '00 FF 30 30 30 FF E9 E9 E9 FF FF FF FF FF FF FF' - 'FF FF C0 96 7E FF A6 37 00 FF B8 55 17 FF C7 6D' - '2E FF C9 71 31 FF CC 75 35 FF CD 79 39 FF D0 7D' - '3C FF D2 80 3F FF D3 83 42 FF D5 86 44 FF D7 87' - '46 FF D8 89 48 FF D8 8A 48 FF D8 8A 48 FF D8 89' - '48 FF D7 88 47 FF D6 87 45 FF D5 84 43 FF D3 82' - '41 FF D1 7E 3D FF CE 7A 3A FF CD 77 36 FF CA 73' - '33 FF C7 6E 2E FF C5 6B 2B FF C0 63 23 FF AD 41' - '02 FF BA 60 2E FF ED EA E9 FF DA DC DD FF E2 E2' - 'E2 FF A7 A7 A7 FF 02 02 02 FF 00 00 00 F7 00 00' - '00 37 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 84 00 00' - '00 FF 2F 2F 2F FF E8 E8 E8 FF FF FF FF FF FE FF' - 'FF FF BD 92 7B FF AF 45 05 FF C7 6D 2D FF C9 71' - '31 FF CC 76 35 FF CF 7A 3A FF D1 7E 3E FF D4 83' - '42 FF D6 86 46 FF D8 8A 48 FF DA 8D 4B FF DB 8F' - '4D FF DC 90 4E FF DC 91 50 FF DC 91 50 FF DC 91' - '4F FF DC 90 4E FF DA 8E 4C FF D9 8B 49 FF D7 88' - '47 FF D5 84 43 FF D2 80 3F FF D0 7C 3B FF CD 78' - '37 FF CB 73 32 FF C7 6E 2E FF C5 6A 2B FF BC 5B' - '1A FF BD 65 33 FF EE EA E9 FF DC DE DF FF E4 E4' - 'E4 FF A7 A7 A7 FF 01 01 01 FF 00 00 00 F7 00 00' - '00 37 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 84 00 00' - '00 FF 2E 2E 2E FF E7 E7 E7 FF FF FF FF FF FE FF' - 'FF FF BD 93 7B FF BA 57 17 FF C9 71 31 FF CB 74' - '34 FF CE 7A 3A FF D2 7F 3E FF D4 84 43 FF D7 88' - '47 FF DA 8C 4A FF DC 8F 4D FF DE 93 51 FF DF 96' - '54 FF E0 98 56 FF E1 99 56 FF E1 99 56 FF E1 99' - '56 FF E0 97 55 FF DE 94 53 FF DD 91 50 FF DB 8E' - '4C FF D8 8A 48 FF D5 85 44 FF D3 81 40 FF D0 7C' - '3C FF CD 77 37 FF C9 72 32 FF C6 6D 2D FF C2 62' - '21 FF C4 70 3D FF ED EA E8 FF DE DF E0 FF E5 E5' - 'E5 FF A6 A6 A6 FF 01 01 01 FF 00 00 00 F7 00 00' - '00 37 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 84 00 00' - '00 FF 2C 2C 2C FF E5 E5 E5 FF FF FF FF FF FD FF' - 'FF FF BE 96 7E FF C2 64 22 FF CB 74 33 FF CE 79' - '38 FF D1 7F 3E FF D5 84 43 FF D7 89 48 FF DA 8E' - '4C FF DE 92 50 FF E0 96 54 FF E2 9A 58 FF E3 9C' - '5A FF E5 9F 5C FF E6 A0 5D FF E6 A0 5D FF E5 A0' - '5D FF E4 9E 5B FF E3 9B 59 FF E1 98 56 FF DF 94' - '52 FF DC 90 4E FF D8 8B 49 FF D6 86 45 FF D3 81' - '40 FF D0 7C 3B FF CC 77 36 FF C9 70 30 FF C4 68' - '26 FF C8 76 43 FF EE EA E9 FF E1 E2 E3 FF E8 E8' - 'E8 FF A5 A5 A5 FF 00 00 00 FF 00 00 00 F7 00 00' - '00 37 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 84 00 00' - '00 FF 2C 2C 2C FF E5 E5 E5 FF FF FF FF FF FD FF' - 'FF FF BC 94 7B FF C4 67 24 FF CD 77 37 FF D0 7C' - '3C FF D4 83 42 FF D7 88 47 FF DB 8D 4C FF DE 93' - '51 FF E1 97 56 FF E3 9C 59 FF E6 A0 5D FF E7 A3' - '60 FF E9 A6 63 FF EA A8 64 FF EA A8 64 FF E9 A7' - '64 FF E8 A5 62 FF E7 A2 5F FF E4 9E 5B FF E2 99' - '57 FF DF 95 53 FF DC 8F 4D FF D8 8A 49 FF D6 86' - '44 FF D2 80 3F FF CF 7A 3A FF CB 74 33 FF C6 6B' - '29 FF C7 76 43 FF F6 F2 F0 FF F4 F5 F6 FF F6 F6' - 'F6 FF A5 A5 A5 FF 00 00 00 FF 00 00 00 F7 00 00' - '00 37 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 84 00 00' - '00 FF 2B 2B 2B FF E4 E4 E4 FF FF FF FF FF FD FF' - 'FF FF B7 8D 75 FF BC 5A 19 FF CF 7C 3B FF D2 80' - '3E FF D5 85 44 FF D9 8C 4A FF DD 91 4F FF E0 97' - '55 FF E3 9C 5A FF E6 A1 5E FF E9 A5 63 FF EB A9' - '66 FF ED AD 69 FF EF AF 6B FF EF AF 6C FF EE AF' - '6A FF ED AB 68 FF EA A7 65 FF E7 A3 61 FF E4 9E' - '5C FF E1 99 57 FF DE 93 52 FF DA 8E 4C FF D7 88' - '47 FF D4 82 41 FF D0 7C 3C FF CC 77 36 FF C7 6C' - '2A FF C3 6F 3D FF F7 F3 F2 FF F7 F9 FA FF FC FC' - 'FC FF A5 A5 A5 FF 00 00 00 FF 00 00 00 F7 00 00' - '00 37 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 84 00 00' - '00 FF 2A 2A 2A FF E3 E3 E3 FF FF FF FF FF FD FF' - 'FF FF B4 88 70 FF AF 41 01 FF D0 78 34 FF D4 81' - '3E FF D8 87 43 FF DC 8D 49 FF E0 93 4F FF E3 9A' - '55 FF E7 A0 5B FF EB A5 60 FF EE AA 65 FF F1 AF' - '6A FF F3 B3 6E FF F5 B6 70 FF F5 B6 70 FF F4 B5' - '6F FF F2 B2 6C FF F0 AD 67 FF EC A7 62 FF E9 A2' - '5D FF E5 9C 58 FF E1 96 52 FF DE 90 4C FF DA 8A' - '46 FF D6 83 40 FF D2 7D 3A FF CF 78 35 FF C1 5F' - '1B FF BB 5F 2C FF F9 F5 F3 FF F9 FB FB FF FE FE' - 'FE FF A5 A5 A5 FF 00 00 00 FF 00 00 00 F7 00 00' - '00 37 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 84 00 00' - '00 FF 2A 2A 2A FF E3 E3 E3 FF FF FF FF FF FD FF' - 'FF FF B4 95 84 FF A0 4F 23 FF B6 71 43 FF CB 89' - '53 FF CE 8D 57 FF D1 92 5B FF D4 97 61 FF D7 9D' - '66 FF DA A2 6A FF DD A7 6E FF E0 AB 73 FF E4 B0' - '78 FF E6 B4 7B FF E7 B7 7F FF E8 B7 7F FF E6 B6' - '7D FF E5 B2 7A FF E2 AE 76 FF DE A9 71 FF DC A4' - '6C FF D9 9F 68 FF D5 99 63 FF D2 94 5D FF CF 8F' - '59 FF CC 8A 54 FF CA 85 4F FF C3 7E 4A FF A7 5A' - '2C FF B3 73 4F FF FA F8 F7 FF FC FD FD FF FF FF' - 'FF FF A5 A5 A5 FF 00 00 00 FF 00 00 00 F7 00 00' - '00 37 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 84 00 00' - '00 FF 26 26 26 FF E1 E1 E1 FF FF FF FF FF FF FF' - 'FF FF EC EC ED FF E6 E6 E7 FF E6 E5 E6 FF E9 E7' - 'E5 FF E9 E7 E5 FF E9 E7 E5 FF E9 E7 E5 FF E9 E7' - 'E5 FF E9 E8 E6 FF E9 E8 E6 FF EA E8 E6 FF EA E8' - 'E6 FF EA E8 E6 FF EA E8 E6 FF EA E8 E6 FF EA E8' - 'E6 FF EA E8 E6 FF EA E8 E6 FF E9 E8 E6 FF E8 E7' - 'E5 FF E8 E6 E4 FF E8 E6 E4 FF E8 E6 E4 FF E8 E6' - 'E4 FF E7 E5 E3 FF E7 E5 E3 FF E6 E4 E3 FF E3 E3' - 'E3 FF E9 E9 E9 FF FC FC FC FF FD FD FD FF FF FF' - 'FF FF A4 A4 A4 FF 00 00 00 FF 00 00 00 F7 00 00' - '00 37 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 7D 00 00' - '00 FF 0D 0D 0D FF C4 C4 C4 FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FE FE FE FF FF FF FF FF FB FB' - 'FB FF 7F 7F 7F FF 00 00 00 FF 00 00 00 F2 00 00' - '00 30 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 37 00 00' - '00 FB 00 00 00 FF 56 56 56 FF E3 E3 E3 FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FD FD FD FF AF AF' - 'AF FF 21 21 21 FF 00 00 00 FF 00 00 00 B9 00 00' - '00 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 8D 00 00 00 FF 01 01 01 FF 2F 2F 2F FF 6D 6D' - '6D FF 7D 7D 7D FF 7C 7C 7C FF 7C 7C 7C FF 7C 7C' - '7C FF 7C 7C 7C FF 7C 7C 7C FF 7C 7C 7C FF 7C 7C' - '7C FF 7C 7C 7C FF 7C 7C 7C FF 7C 7C 7C FF 7C 7C' - '7C FF 7C 7C 7C FF 7C 7C 7C FF 7C 7C 7C FF 7C 7C' - '7C FF 7C 7C 7C FF 7C 7C 7C FF 7C 7C 7C FF 7C 7C' - '7C FF 7C 7C 7C FF 7C 7C 7C FF 7B 7B 7B FF 7B 7B' - '7B FF 7B 7B 7B FF 7A 7A 7A FF 7A 7A 7A FF 7A 7A' - '7A FF 7A 7A 7A FF 77 77 77 FF 57 57 57 FF 18 18' - '18 FF 00 00 00 FF 00 00 00 FF 00 00 00 57 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 19 00 00 00 B9 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 F5 00 00 00 86 00 00 00 04 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 63 00 00 00 D0 00 00' - '00 F3 00 00 00 F0 00 00 00 F0 00 00 00 F0 00 00' - '00 F0 00 00 00 F0 00 00 00 F0 00 00 00 F0 00 00' - '00 F0 00 00 00 F0 00 00 00 F0 00 00 00 F0 00 00' - '00 F0 00 00 00 F0 00 00 00 F0 00 00 00 F0 00 00' - '00 F0 00 00 00 F0 00 00 00 F0 00 00 00 F0 00 00' - '00 F0 00 00 00 F0 00 00 00 F0 00 00 00 F0 00 00' - '00 F0 00 00 00 F0 00 00 00 F0 00 00 00 F0 00 00' - '00 F0 00 00 00 F0 00 00 00 F1 00 00 00 EF 00 00' - '00 B2 00 00 00 3D 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF F8' - '00 00 1F FF 00 00 FF F0 00 00 0F FF 00 00 FF E0' - '00 00 07 FF 00 00 FF E0 00 00 07 FF 00 00 FF E0' - '00 00 03 FF 00 00 FF C0 00 00 03 FF 00 00 FF C0' - '00 00 07 FF 00 00 FF E0 00 00 07 FF 00 00 FF E0' - '00 00 07 FF 00 00 FF E0 00 00 07 FF 00 00 FF E0' - '00 00 0F FF 00 00 FF F0 00 00 0F FF 00 00 FF F8' - '00 00 1F FF 00 00 FF F8 00 00 1F FF 00 00 FF FC' - '00 00 7F FF 00 00 FE 00 00 00 00 7F 00 00 F8 00' - '00 00 00 1F 00 00 F0 00 00 00 00 0F 00 00 F0 00' - '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' - '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' - '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' - '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' - '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' - '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' - '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' - '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' - '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' - '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' - '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' - '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' - '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' - '00 00 00 07 00 00 F0 00 00 00 00 0F 00 00 F0 00' - '00 00 00 0F 00 00 FC 00 00 00 00 3F 00 00 28 00' - '00 00 20 00 00 00 40 00 00 00 01 00 20 00 00 00' - '00 00 00 10 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 0B 00 00 00 4B 00 00' - '00 63 00 00 00 61 00 00 00 61 00 00 00 61 00 00' - '00 61 00 00 00 61 00 00 00 61 00 00 00 61 00 00' - '00 61 00 00 00 61 00 00 00 61 00 00 00 63 00 00' - '00 3D 00 00 00 05 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 04 00 00 00 AF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 01 01 01 FF 01 01' - '01 FF 01 01 01 FF 02 02 02 FF 02 02 02 FF 02 02' - '02 FF 03 03 03 FF 05 05 05 FF 03 03 03 FF 00 00' - '00 FA 00 00 00 80 00 00 00 03 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 3E 00 00 00 FD 6E 6E 6E FF B7 B7' - 'B7 FF AD AD AD FF A9 A9 A9 FF A5 A5 A5 FF A2 A2' - 'A2 FF 9F 9F 9F FF 9B 9B 9B FF 97 97 97 FF 94 94' - '94 FF 8C 8C 8C FF 83 83 83 FF 85 85 85 FF 38 38' - '38 FF 00 00 00 EA 00 00 00 27 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 67 0F 0F 0F FF D8 D8 D8 FF FF FF' - 'FF FF ED ED ED FF E2 E2 E2 FF DB DB DB FF D3 D3' - 'D3 FF CD CD CD FF C8 C8 C8 FF C2 C2 C2 FF BC BC' - 'BC FF B4 B4 B4 FF 9F 9F 9F FF A2 A2 A2 FF 7F 7F' - '7F FF 00 00 00 FD 00 00 00 47 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 72 1B 1B 1B FF E6 E6 E6 FF FF FF' - 'FF FF F6 F6 F6 FF F5 F5 F5 FF F1 F1 F1 FF EC EC' - 'EC FF E4 E4 E4 FF DC DC DC FF D4 D4 D4 FF CC CC' - 'CC FF C5 C5 C5 FF AB AB AB FF AD AD AD FF 90 90' - '90 FF 04 04 04 FF 00 00 00 50 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 56 0D 0D 0D FF D4 D4 D4 FF FF FF' - 'FF FF F7 F7 F7 FF F8 F8 F8 FF F3 F3 F3 FF F0 F0' - 'F0 FF EC EC EC FF E3 E3 E3 FF DA DA DA FF D2 D2' - 'D2 FF CA CA CA FF B0 B0 B0 FF B8 B8 B8 FF 82 82' - '82 FF 00 00 00 F8 00 00 00 32 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 1F 00 00 00 ED 94 94 94 FF FF FF' - 'FF FF FE FE FE FF FD FD FD FF FA FA FA FF F3 F3' - 'F3 FF E5 E5 E5 FF E1 E1 E1 FF E0 E0 E0 FF DA DA' - 'DA FF D1 D1 D1 FF BF BF BF FF C5 C5 C5 FF 52 52' - '52 FF 00 00 00 CD 00 00 00 0D 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 97 29 29 29 FF E4 E4' - 'E4 FF FF FF FF FF FF FF FF FF FF FF FF FF F0 F0' - 'F0 FF AB AB AB FF B4 B4 B4 FF E8 E8 E8 FF E4 E4' - 'E4 FF D5 D5 D5 FF D3 D3 D3 FF 9D 9D 9D FF 0C 0C' - '0C FF 00 00 00 6C 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 1C 00 00 00 D8 4C 4C' - '4C FF EC EC EC FF FF FF FF FF FF FF FF FF FA FA' - 'FA FF E2 E2 E2 FF E3 E3 E3 FF F0 F0 F0 FF EA EA' - 'EA FF E6 E6 E6 FF B1 B1 B1 FF 23 23 23 FF 00 00' - '00 B7 00 00 00 08 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 2B 00 00' - '00 D5 33 33 33 FF B4 B4 B4 FF F9 F9 F9 FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FB FB FB FF DC DC' - 'DC FF 89 89 89 FF 1A 1A 1A FF 00 00 00 B6 00 00' - '00 14 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 09 00 00 00 28 00 00' - '00 38 00 00 00 37 00 00 00 37 00 00 00 2C 00 00' - '00 50 00 00 00 CC 03 03 03 FF 31 31 31 FF 67 67' - '67 FF A2 A2 A2 FF 90 90 90 FF 59 59 59 FF 22 22' - '22 FF 00 00 00 FF 00 00 00 B4 00 00 00 41 00 00' - '00 2F 00 00 00 37 00 00 00 37 00 00 00 37 00 00' - '00 27 00 00 00 09 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 32 00 00 00 BE 00 00 00 F7 00 00' - '00 FB 00 00 00 FA 00 00 00 FA 00 00 00 FA 00 00' - '00 F3 00 00 00 F2 00 00 00 FF 00 00 00 FF 05 05' - '05 FF 79 79 79 FF 4C 4C 4C FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FD 00 00 00 F0 00 00 00 F6 00 00' - '00 FA 00 00 00 FA 00 00 00 FA 00 00 00 FB 00 00' - '00 F1 00 00 00 AE 00 00 00 29 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 1B 00 00 00 DB 26 26 26 FF 94 94 94 FF AD AD' - 'AD FF AA AA AA FF A9 A9 A9 FF A7 A7 A7 FF A7 A7' - 'A7 FF A6 A6 A6 FF A4 A4 A4 FF A2 A2 A2 FF AB AB' - 'AB FF CD CD CD FF BF BF BF FF A2 A2 A2 FF 9E 9E' - '9E FF 9E 9E 9E FF 9C 9C 9C FF 9C 9C 9C FF 9B 9B' - '9B FF 9A 9A 9A FF 99 99 99 FF 9B 9B 9B FF 77 77' - '77 FF 11 11 11 FF 00 00 00 C1 00 00 00 14 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 6F 06 06 06 FF C0 C0 C0 FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FD FF FF FF FA FD FE FF F7 FA' - 'FC FF F4 F7 F9 FF F1 F4 F6 FF EE F1 F3 FF EA EC' - 'EE FF E2 E4 E6 FF E1 E3 E5 FF E2 E5 E7 FF E1 E2' - 'E5 FF DE E0 E2 FF DA DD DF FF D8 DA DD FF D5 D8' - 'DA FF D3 D6 D8 FF D0 D3 D5 FF CE CF CF FF DD DD' - 'DD FF 81 81 81 FF 00 00 00 FF 00 00 00 4E 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 84 22 22 22 FF EB EB EB FF FF FF FF FF F3 EA' - 'E4 FF F0 E0 D4 FF EF E1 D6 FF EF E1 D6 FF EF E1' - 'D6 FF EE E1 D6 FF ED E1 D6 FF EC E1 D5 FF EC E0' - 'D5 FF EA DE D3 FF E9 DD D2 FF E7 DA CF FF E5 D8' - 'CD FF E2 D5 CA FF DF D2 C7 FF DD CF C4 FF DB CC' - 'C1 FF D8 C9 BE FF D8 C8 BD FF D2 CE CC FF CB CC' - 'CC FF AB AB AB FF 06 06 06 FF 00 00 00 61 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 84 24 24 24 FF EB EB EB FF FF FF FF FF D4 AB' - '8F FF C5 67 26 FF CD 77 39 FF D2 81 42 FF D7 89' - '4A FF DC 91 50 FF E0 97 57 FF E3 9C 5C FF E5 9F' - '5E FF E5 9F 5F FF E4 9E 5D FF E2 9A 5A FF DF 94' - '55 FF DA 8D 4E FF D6 85 47 FF D1 7D 3F FF CC 75' - '37 FF C6 6A 2C FF C5 68 2B FF D8 C3 B5 FF CE D1' - 'D3 FF A9 A9 A9 FF 06 06 06 FF 00 00 00 61 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 84 22 22 22 FF EA EA EA FF FF FF FF FF D0 A5' - '89 FF BD 5A 16 FF C6 6A 2A FF CB 73 32 FF D0 7A' - '3A FF D4 82 40 FF D7 87 45 FF DA 8C 49 FF DB 8E' - '4B FF DB 8E 4C FF DA 8D 4A FF D8 89 47 FF D5 84' - '42 FF D2 7E 3C FF CD 76 35 FF C8 6E 2E FF C3 66' - '26 FF BD 5B 1A FF BB 59 1A FF D7 C0 B2 FF D1 D5' - 'D8 FF A9 A9 A9 FF 05 05 05 FF 00 00 00 61 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 84 22 22 22 FF EA EA EA FF FF FF FF FF D0 A4' - '88 FF BA 54 12 FF C2 65 25 FF C7 6D 2D FF CB 73' - '34 FF CF 7A 39 FF D2 7F 3E FF D3 82 42 FF D4 84' - '43 FF D5 84 43 FF D4 83 42 FF D2 80 3F FF D0 7C' - '3B FF CD 76 36 FF C8 6F 30 FF C4 68 29 FF BF 60' - '21 FF B9 56 17 FF B8 54 17 FF D8 C1 B3 FF D4 D8' - 'DA FF A9 A9 A9 FF 05 05 05 FF 00 00 00 61 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 84 21 21 21 FF E9 E9 E9 FF FF FF FF FF CD A0' - '84 FF B5 4C 0B FF BD 5D 1E FF C1 64 25 FF C5 6B' - '2A FF C9 70 30 FF CB 74 34 FF CD 77 37 FF CD 78' - '38 FF CD 78 38 FF CD 78 37 FF CC 75 35 FF CA 72' - '32 FF C7 6D 2D FF C3 67 27 FF BF 60 21 FF BB 58' - '1A FF B5 4F 10 FF B4 4D 11 FF D8 C0 B2 FF D8 DB' - 'DE FF A9 A9 A9 FF 04 04 04 FF 00 00 00 61 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 84 20 20 20 FF E8 E8 E8 FF FF FF FF FF CA 9B' - '80 FF B0 44 02 FF B8 54 15 FF BC 5A 1C FF BF 60' - '21 FF C1 65 25 FF C4 68 28 FF C5 6B 2B FF C6 6C' - '2D FF C6 6D 2D FF C6 6C 2D FF C4 69 2A FF C2 66' - '26 FF C0 61 22 FF BD 5D 1E FF B9 57 19 FF B5 50' - '12 FF B0 47 08 FF B0 46 0A FF D8 C0 B2 FF DA DE' - 'E0 FF A8 A8 A8 FF 04 04 04 FF 00 00 00 61 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 84 20 20 20 FF E7 E7 E7 FF FF FF FF FF C6 96' - '7B FF AA 3B 00 FF B2 4A 0D FF B4 4F 11 FF B8 55' - '17 FF BD 5E 1F FF C2 65 25 FF C4 69 2A FF C5 6B' - '2C FF C6 6C 2C FF C6 6C 2C FF C4 69 2A FF C2 65' - '26 FF BE 5E 20 FF B8 55 17 FF B3 4C 0E FF AF 46' - '08 FF AB 3F 01 FF AD 43 06 FF DA C2 B4 FF DE E2' - 'E4 FF A7 A7 A7 FF 03 03 03 FF 00 00 00 61 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 84 1F 1F 1F FF E6 E6 E6 FF FF FF FF FF C2 93' - '78 FF A5 34 00 FF AB 40 03 FF B6 52 14 FF C1 64' - '26 FF C7 6E 2F FF CA 73 33 FF CC 77 36 FF CD 78' - '38 FF CD 79 38 FF CD 78 38 FF CC 77 37 FF CB 74' - '34 FF C8 6F 30 FF C4 69 2A FF BC 5C 1D FF AF 47' - '0A FF A7 3A 00 FF AC 43 06 FF DB C3 B5 FF E0 E4' - 'E7 FF A7 A7 A7 FF 03 03 03 FF 00 00 00 61 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 84 1E 1E 1E FF E5 E5 E5 FF FF FF FF FF C1 90' - '76 FF A6 36 00 FF BA 59 1A FF C8 6F 2F FF CC 75' - '35 FF CF 7A 3A FF D1 7F 3E FF D3 82 41 FF D4 83' - '42 FF D4 84 43 FF D4 83 42 FF D3 82 41 FF D1 7E' - '3E FF CF 7A 39 FF CC 75 35 FF C9 70 30 FF C3 67' - '27 FF B3 4D 0E FF AC 42 06 FF DC C4 B6 FF E3 E7' - 'EA FF A7 A7 A7 FF 02 02 02 FF 00 00 00 61 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 84 1D 1D 1D FF E4 E4 E4 FF FF FF FF FF BE 8E' - '73 FF B7 50 0E FF CA 72 32 FF CD 77 37 FF D1 7D' - '3D FF D4 83 43 FF D8 88 47 FF D9 8C 4B FF DB 8F' - '4D FF DB 8F 4D FF DB 8F 4D FF D9 8C 4B FF D8 88' - '47 FF D4 83 43 FF D1 7D 3D FF CD 76 36 FF C9 70' - '30 FF C4 67 27 FF B5 51 14 FF DC C3 B6 FF E6 EA' - 'EC FF A6 A6 A6 FF 01 01 01 FF 00 00 00 61 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 84 1C 1C 1C FF E2 E2 E2 FF FF FF FF FF C3 96' - '7A FF C4 65 22 FF CD 76 36 FF D2 7E 3E FF D6 85' - '44 FF DA 8C 4B FF DD 92 50 FF E0 97 54 FF E1 99' - '57 FF E2 99 58 FF E1 99 57 FF E0 97 54 FF DD 92' - '50 FF DA 8C 4B FF D6 85 44 FF D2 7E 3E FF CC 76' - '36 FF C7 6D 2D FF C2 65 27 FF DE C6 B9 FF E8 EB' - 'EE FF A6 A6 A6 FF 01 01 01 FF 00 00 00 61 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 84 1B 1B 1B FF E1 E1 E1 FF FF FF FF FF C5 9A' - '7E FF C8 6C 28 FF D1 7D 3C FF D6 85 44 FF DA 8D' - '4B FF DF 94 52 FF E3 9B 59 FF E6 A1 5E FF E8 A4' - '62 FF E9 A5 62 FF E8 A4 62 FF E6 A1 5E FF E3 9B' - '59 FF DF 94 52 FF DA 8D 4B FF D6 85 44 FF D0 7D' - '3C FF CA 72 31 FF C7 6D 2E FF E5 CE C1 FF F4 F8' - 'FA FF A7 A7 A7 FF 00 00 00 FF 00 00 00 61 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 84 1A 1A 1A FF E0 E0 E0 FF FF FF FF FF BC 8D' - '70 FF C7 68 23 FF D4 81 3E FF D9 89 46 FF DE 92' - '4E FF E4 9A 56 FF E9 A2 5E FF ED AA 65 FF F0 AE' - '6A FF F1 B0 6B FF F0 AE 6A FF ED AA 65 FF E9 A2' - '5E FF E4 9A 56 FF DE 92 4E FF D9 89 46 FF D4 80' - '3D FF CE 76 33 FF C2 63 23 FF E9 D0 C2 FF FF FF' - 'FF FF AA AA AA FF 00 00 00 FF 00 00 00 61 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 84 1A 1A 1A FF E0 E0 E0 FF FF FF FF FF B5 8D' - '76 FF B4 60 29 FF CF 88 4F FF D4 90 56 FF D9 98' - '5D FF DE A0 65 FF E3 A8 6D FF E7 AF 74 FF EB B5' - '79 FF EC B7 7B FF EB B5 79 FF E7 AF 74 FF E3 A8' - '6D FF DE A0 65 FF D8 98 5D FF D3 90 56 FF CF 87' - '4E FF C7 7C 44 FF B0 5D 2B FF E8 D3 C8 FF FF FF' - 'FF FF AB AB AB FF 00 00 00 FF 00 00 00 61 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 84 15 15 15 FF DB DB DB FF FF FF FF FF EE EC' - 'EC FF E7 E4 E2 FF EB E7 E4 FF EB E8 E5 FF EC E8' - 'E5 FF EC E9 E6 FF EC E9 E6 FF EC EA E7 FF ED EA' - 'E7 FF ED EA E7 FF ED EA E7 FF EC EA E7 FF EC E9' - 'E6 FF EB E8 E5 FF EA E8 E5 FF EA E7 E4 FF EA E6' - 'E3 FF E8 E4 E2 FF E6 E3 E2 FF F8 F8 F7 FF FF FF' - 'FF FF A7 A7 A7 FF 00 00 00 FF 00 00 00 61 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 6C 00 00 00 FF 8E 8E 8E FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF F4 F4' - 'F4 FF 58 58 58 FF 00 00 00 FD 00 00 00 45 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 16 00 00 00 D5 0A 0A 0A FF 53 53 53 FF 74 74' - '74 FF 72 72 72 FF 72 72 72 FF 72 72 72 FF 72 72' - '72 FF 72 72 72 FF 72 72 72 FF 71 71 71 FF 71 71' - '71 FF 71 71 71 FF 71 71 71 FF 71 71 71 FF 71 71' - '71 FF 71 71 71 FF 71 71 71 FF 71 71 71 FF 70 70' - '70 FF 70 70 70 FF 70 70 70 FF 6F 6F 6F FF 3F 3F' - '3F FF 02 02 02 FF 00 00 00 B2 00 00 00 05 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 28 00 00 00 B1 00 00 00 EF 00 00' - '00 F1 00 00 00 F0 00 00 00 F0 00 00 00 F0 00 00' - '00 F0 00 00 00 F0 00 00 00 F0 00 00 00 F0 00 00' - '00 F0 00 00 00 F0 00 00 00 F0 00 00 00 F0 00 00' - '00 F0 00 00 00 F0 00 00 00 F0 00 00 00 F0 00 00' - '00 F0 00 00 00 F0 00 00 00 F0 00 00 00 F2 00 00' - '00 E8 00 00 00 97 00 00 00 15 00 00 00 00 00 00' - '00 00 00 00 00 00 FF 00 00 FF FE 00 00 7F FE 00' - '00 7F FE 00 00 7F FE 00 00 7F FE 00 00 7F FE 00' - '00 7F FF 00 00 FF FF 00 00 FF FF 80 01 FF F0 00' - '00 0F E0 00 00 07 C0 00 00 03 C0 00 00 03 C0 00' - '00 03 C0 00 00 03 C0 00 00 03 C0 00 00 03 C0 00' - '00 03 C0 00 00 03 C0 00 00 03 C0 00 00 03 C0 00' - '00 03 C0 00 00 03 C0 00 00 03 C0 00 00 03 C0 00' - '00 03 C0 00 00 03 C0 00 00 03 C0 00 00 03 C0 00' - '00 03 E0 00 00 07 28 00 00 00 10 00 00 00 20 00' - '00 00 01 00 20 00 00 00 00 00 00 04 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 03 01 01' - '01 7C 08 08 08 AD 08 08 08 A8 08 08 08 A8 08 08' - '08 A8 08 08 08 A8 08 08 08 AD 01 01 01 6D 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 31 57 57' - '57 FA CE CE CE FF BB BB BB FF B1 B1 B1 FF A8 A8' - 'A8 FF 9D 9D 9D FF 8D 8D 8D FF 30 30 30 F2 00 00' - '00 23 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 3A 7B 7B' - '7B FC FF FF FF FF F5 F5 F5 FF EC EC EC FF DD DD' - 'DD FF CA CA CA FF BA BA BA FF 4C 4C 4C F7 00 00' - '00 28 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 0D 37 37' - '37 D7 F5 F5 F5 FF FF FF FF FF E2 E2 E2 FF D9 D9' - 'D9 FF E6 E6 E6 FF B7 B7 B7 FF 1C 1C 1C C5 00 00' - '00 05 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 45 59 59 59 EB E5 E5 E5 FF F1 F1 F1 FF EA EA' - 'EA FF C2 C2 C2 FF 3B 3B 3B E1 00 00 00 35 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 12 02 02 02 78 06 06 06 96 05 06' - '06 8A 00 00 00 C6 16 16 16 FF 77 77 77 FF 66 66' - '66 FF 11 11 11 FF 00 00 00 BC 07 07 07 89 07 07' - '07 96 02 02 02 73 00 00 00 0E 00 00 00 00 00 00' - '00 00 03 03 03 9C 94 94 93 FF D1 D4 D7 FF C7 CD' - 'D0 FF C3 C7 CA FF B9 BD C0 FF C2 C6 C9 FF BB BF' - 'C2 FF B0 B4 B8 FF B2 B7 BA FF B0 B5 B9 FF B1 B4' - 'B6 FF 6E 6D 6D FF 00 00 00 84 00 00 00 00 00 00' - '00 00 19 19 1A CC EC ED ED FF ED C9 B1 FF E6 B4' - '8F FF EB BF 9B FF ED C4 A0 FF EB C3 9E FF E8 C0' - '9B FF E5 BA 95 FF DD AF 8B FF D4 9E 79 FF D9 B9' - 'A5 FF B9 BB BD FF 09 0A 0A A8 00 00 00 00 00 00' - '00 00 1A 1B 1B CC EB EC ED FF CC 86 58 FF C2 5E' - '17 FF CE 75 30 FF D5 80 3B FF D8 85 40 FF D6 82' - '3D FF D1 78 34 FF C8 6A 26 FF BA 4F 08 FF CC 8E' - '68 FF B8 BC C0 FF 09 09 09 A8 00 00 00 00 00 00' - '00 00 19 1A 1A CC EA EB EC FF C7 81 57 FF B9 53' - '12 FF C2 66 26 FF C7 6E 2E FF CA 71 32 FF C8 6F' - '30 FF C4 68 29 FF BD 5C 1E FF B1 45 04 FF C9 8C' - '68 FF BA BE C1 FF 08 09 09 A8 00 00 00 00 00 00' - '00 00 18 19 1A CC E9 EA EB FF BE 73 4A FF AF 44' - '03 FF C0 62 23 FF C6 6D 2D FF C9 71 31 FF C8 70' - '30 FF C4 69 2A FF BB 5A 1B FF A9 39 00 FF C7 88' - '65 FF BC C1 C4 FF 08 08 08 A8 00 00 00 00 00 00' - '00 00 18 18 19 CC E6 E7 E8 FF C1 7A 4F FF C2 62' - '1F FF D0 7C 3C FF D5 85 44 FF D7 88 47 FF D7 87' - '46 FF D3 81 40 FF CC 76 36 FF BB 57 13 FF CC 8F' - '6C FF BD C1 C4 FF 07 08 08 A8 00 00 00 00 00 00' - '00 00 16 17 18 CC E3 E4 E4 FF CD 8D 60 FF D0 78' - '33 FF DA 8C 49 FF E2 98 54 FF E6 9F 5B FF E4 9C' - '59 FF DE 92 4F FF D6 84 42 FF C9 6B 26 FF DA A2' - '7C FF C1 C5 C8 FF 07 07 07 A8 00 00 00 00 00 00' - '00 00 17 17 18 CC E4 E4 E5 FF CA 90 6A FF D5 89' - '4B FF E1 9F 63 FF EB AE 71 FF F0 B9 7A FF EE B5' - '77 FF E6 A7 6A FF DC 97 5B FF CC 7B 3D FF DF AD' - '8D FF D0 D4 D7 FF 06 07 07 A8 00 00 00 00 00 00' - '00 00 09 09 09 C1 CB CC CC FF FA F6 F4 FF F2 EE' - 'EA FF F4 F0 EC FF F4 F1 EE FF F4 F2 EE FF F4 F2' - 'EE FF F4 F0 ED FF F2 EF EA FF F0 EB E8 FF FD FA' - 'F8 FF AF AF AF FF 00 00 00 9F 00 00 00 00 00 00' - '00 00 00 00 00 4A 1E 1E 1D E2 45 46 47 F3 43 45' - '46 F0 42 43 45 F0 42 43 44 F0 42 43 44 F0 42 43' - '44 F0 42 43 44 F0 42 43 44 F0 42 44 45 F0 41 42' - '43 F4 16 16 16 D9 00 00 00 39 00 00 00 00 E0 0F' - '00 00 E0 07 00 00 E0 07 00 00 E0 07 00 00 F0 0F' - '00 00 80 01 00 00 80 01 00 00 80 01 00 00 80 01' - '00 00 80 01 00 00 80 01 00 00 80 01 00 00 80 01' - '00 00 80 01 00 00 80 01 00 00 80 01 00 00' -} */ - - - - -/* BINRES desktop.ico */ -34 ICON desktop.ico -/* { - '00 00 01 00 09 00 20 20 00 00 01 00 08 00 A8 08' - '00 00 96 00 00 00 10 10 00 00 01 00 08 00 68 05' - '00 00 3E 09 00 00 20 20 00 00 01 00 20 00 A8 10' - '00 00 A6 0E 00 00 10 10 00 00 01 00 20 00 68 04' - '00 00 4E 1F 00 00 10 10 00 00 01 00 04 00 28 01' - '00 00 B6 23 00 00 20 20 00 00 01 00 04 00 E8 02' - '00 00 DE 24 00 00 30 30 00 00 01 00 08 00 A8 0E' - '00 00 C6 27 00 00 30 30 00 00 01 00 20 00 A8 25' - '00 00 6E 36 00 00 30 30 00 00 01 00 04 00 68 06' - '00 00 16 5C 00 00 28 00 00 00 20 00 00 00 40 00' - '00 00 01 00 08 00 00 00 00 00 00 04 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 11 11 11 00 33 33 33 00 66 33 00 00 44 44' - '44 00 55 55 55 00 66 66 66 00 77 77 77 00 7F 7F' - '7F 00 99 00 00 00 99 33 00 00 99 33 33 00 CC 33' - '00 00 CC 33 33 00 99 66 00 00 99 66 33 00 CC 66' - '00 00 CC 66 33 00 99 66 66 00 CC 66 66 00 FF 66' - '66 00 99 99 33 00 CC 99 33 00 FF 99 33 00 99 99' - '66 00 CC 99 66 00 FF 99 66 00 CC CC 66 00 FF CC' - '66 00 88 88 88 00 99 99 99 00 AA AA AA 00 BB BB' - 'BB 00 CC 99 99 00 FF 99 99 00 CC CC 99 00 FF CC' - '99 00 99 99 CC 00 CC CC CC 00 DD DD DD 00 FF CC' - 'CC 00 CC FF CC 00 CC CC FF 00 CC FF FF 00 EE EE' - 'EE 00 FF FF FF 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 C0 17 95 00 00 00 38 00 A8 44' - 'F9 77 15 00 00 00 78 0A 38 00 00 00 38 00 B0 6C' - '38 00 98 17 95 00 00 00 00 00 E0 19 95 00 F0 88' - 'FA 77 70 38 F5 77 FF FF FF FF A8 44 F9 77 70 7D' - 'F5 77 3A 8A F5 77 96 00 00 00 96 00 00 00 09 00' - '00 00 B0 18 95 00 00 00 00 00 CB 44 F9 77 38 9F' - '07 00 CD 8B F5 77 78 13 05 00 37 90 F5 77 00 00' - '00 00 3E 8A F5 77 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 10 00' - '00 00 00 00 00 00 58 00 5A 00 00 EC FD 7F 1A 02' - '00 00 4C 16 95 00 40 9F 07 00 FC 15 95 00 FF FF' - 'FF FF B4 1A 95 00 45 00 00 00 28 02 00 00 FF FF' - 'FF FF E2 D8 F5 77 7D 9B F5 77 94 B6 01 00 00 00' - '05 00 F4 17 95 00 80 00 10 C0 B4 1A 95 00 F0 88' - 'FA 77 88 1C F5 77 FF FF FF FF 37 90 F5 77 00 00' - '00 00 3E 8A F5 77 9B B2 E7 77 B7 00 00 00 02 00' - '00 00 A4 1A 95 00 01 00 00 00 18 00 00 00 00 00' - '00 00 10 19 95 00 42 00 00 00 00 00 00 00 F4 18' - '95 00 00 00 00 00 00 00 00 00 00 00 00 00 0C 00' - '00 00 02 00 00 00 01 01 F5 77 00 EC FD 7F 58 00' - '00 00 00 00 00 00 03 00 00 00 60 00 1A 02 40 9F' - '07 00 00 00 00 00 40 9F 07 00 05 00 00 00 BE B3' - 'E7 77 4C 19 95 00 A3 B4 E7 77 F8 00 00 00 00 00' - '00 C0 00 00 00 00 00 00 00 00 02 00 00 00 80 00' - '00 00 00 00 00 00 8C 1A 95 00 7F E9 4B 00 00 63' - '38 00 00 00 00 C0 00 00 00 00 80 1A 95 00 02 00' - '00 00 80 00 00 00 00 00 00 00 C0 27 95 00 C4 F5' - 'AF 00 02 00 00 00 44 3A 5C 6F 73 65 78 70 65 72' - '74 73 5C 72 65 61 63 74 6F 73 5C 6C 69 62 5C 73' - '68 65 6C 6C 33 32 5C 64 65 73 6B 74 6F 70 2E 69' - '63 6F 00 93 4B 00 14 1A 95 00 1F 3B D4 77 15 00' - '00 00 A8 00 00 00 4F 3B D4 77 E0 19 95 00 33 3B' - 'D4 77 64 C5 F5 77 A9 F1 E7 77 F8 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 1A 95 00 B0 6C' - '38 00 96 00 00 00 00 00 00 00 C9 F1 E7 77 96 00' - '00 00 A4 1A 95 00 09 00 00 00 00 00 00 00 96 00' - '00 00 96 00 00 00 09 00 00 00 F4 19 95 00 33 3B' - 'D4 77 B4 1A 95 00 09 48 E9 77 B8 10 E9 77 FF FF' - 'FF FF C9 F1 E7 77 16 EA 4B 00 F8 00 00 00 B0 6C' - '38 00 96 00 00 00 58 1A 95 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E' - '2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 00 00 00 2E' - '2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E' - '2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 00 2E 2E' - '04 1F 20 1F 1F 1F 1F 1F 1F 1F 1F 1F 1F 1F 1F 1E' - '21 1F 1F 1E 1E 1F 1E 1F 1E 1F 06 2E 2E 2E 2E 02' - '2C 2D 2D 2D 2D 2D 2D 2C 2C 2D 2C 2C 2C 2C 28 2C' - '29 27 27 27 27 27 26 26 26 26 27 06 2E 2E 2E 07' - '2D 2D 2D 2D 2D 2D 2C 2D 2C 2A 2D 2C 27 2B 2C 27' - '2A 27 27 29 27 27 2A 27 27 26 26 1E 2E 2E 2E 07' - '2D 2D 28 19 21 1B 22 21 24 24 24 23 24 22 23 24' - '24 22 23 22 21 21 1A 19 23 26 26 1F 2E 2E 2E 1D' - '2D 2D 19 11 10 11 16 16 11 16 13 17 19 16 17 13' - '16 16 11 16 11 10 0B 10 19 26 27 1E 2E 2E 2E 07' - '2D 2D 21 0E 11 11 11 11 11 19 17 19 16 1A 13 16' - '19 11 16 11 10 11 11 0E 13 27 26 1F 2E 2E 2E 07' - '2D 2D 21 10 11 11 0F 11 16 11 11 16 11 16 16 11' - '16 11 11 11 11 0F 10 0C 19 27 26 1E 2E 2E 2E 07' - '2D 2D 19 10 0B 10 11 16 11 11 16 11 16 11 11 16' - '11 11 11 10 0F 10 11 0A 19 26 27 1F 2E 2E 2E 07' - '2D 2D 21 0A 10 0F 10 0D 11 11 0F 11 11 16 11 11' - '11 11 11 11 0C 0A 0C 0E 13 2C 27 1E 2E 2E 2E 07' - '2D 2D 18 0C 0E 0D 11 10 0F 10 11 11 11 11 11 11' - '11 0E 11 0A 12 18 0F 09 16 2A 27 1E 2E 2E 2E 07' - '2D 2D 21 0A 0C 0E 0A 11 11 11 11 16 11 11 11 11' - '11 11 10 0F 2B 2D 1E 0A 13 29 27 1E 2E 2E 2E 07' - '2D 2D 19 0A 0A 0A 11 11 16 11 11 11 16 11 11 16' - '11 16 11 12 27 26 2A 03 16 2C 27 1F 2E 2E 2E 07' - '2D 2D 19 0A 10 11 11 11 11 19 16 11 11 19 11 11' - '17 11 11 0F 20 2C 1E 0A 13 27 27 1E 2E 2E 2E 06' - '2D 2D 21 0A 11 11 16 11 16 16 14 16 19 17 19 16' - '19 11 16 11 11 0F 11 0A 16 2C 2C 1E 2E 2E 2E 07' - '2D 2D 18 10 11 16 11 17 13 16 16 1A 16 19 17 19' - '16 1A 11 15 12 15 0F 11 13 27 2C 1E 2E 2E 2E 06' - '2D 2D 19 11 11 11 16 13 16 19 1A 19 19 1A 19 1A' - '14 16 16 21 20 1F 25 0E 19 2C 2C 1E 2E 2E 2E 07' - '2D 2D 13 11 11 16 19 17 19 17 19 1A 1A 1B 1A 19' - '1B 1A 16 12 2C 27 1F 11 19 2C 2D 1E 2E 2E 2E 06' - '2D 2D 18 11 16 1A 11 19 1A 19 1C 1A 1B 1A 1B 1A' - '1A 19 17 19 20 2C 21 0E 13 2D 2D 1E 2E 2E 2E 06' - '2D 2D 12 10 11 16 19 17 19 1A 19 1C 1A 1C 1A 1B' - '1A 19 19 16 12 0F 15 0D 19 2D 2D 1E 2E 2E 2E 06' - '2D 2D 2C 26 27 27 27 27 27 27 27 27 27 27 27 27' - '27 27 27 28 27 27 28 26 2C 2D 2D 1E 2E 2E 2E 02' - '2D 2D 2D 2D 2D 2D 2D 2D 2D 2D 2D 2D 2D 2D 2D 2D' - '2D 2D 2D 2D 2D 2D 2D 2D 2D 2D 2D 06 2E 2E 2E 2E' - '05 26 26 27 26 27 27 26 27 26 27 27 26 27 26 27' - '27 26 27 26 27 26 27 26 26 26 1D 2E 2E 2E 2E 2E' - '2E 2E 01 01 01 2E 01 01 01 01 2E 01 01 01 01 2E' - '01 01 01 01 2E 01 01 01 01 2E 2E 2E 2E 00 00 00' - '2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E' - '2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF' - 'FF FF FF FF FF FF FF FF FF FF C0 00 00 03 80 00' - '00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 01 C0 00' - '00 03 FF FF FF FF FF FF FF FF FF FF FF FF 28 00' - '00 00 10 00 00 00 20 00 00 00 01 00 08 00 00 00' - '00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 11 00 00 00 00 11' - '00 00 00 00 11 00 11 11 11 00 33 33 33 00 44 44' - '44 00 55 55 55 00 7F 7F 7F 00 99 33 00 00 CC 33' - '00 00 99 66 00 00 99 66 33 00 CC 66 00 00 CC 66' - '33 00 CC 66 66 00 CC 99 33 00 FF 99 33 00 99 99' - '66 00 CC 99 66 00 FF 99 66 00 FF CC 66 00 99 99' - '99 00 AA AA AA 00 BB BB BB 00 CC 99 99 00 FF 99' - '99 00 CC CC 99 00 FF CC 99 00 CC 99 CC 00 99 CC' - 'CC 00 CC CC CC 00 DD DD DD 00 FF CC CC 00 FF FF' - 'CC 00 FF CC FF 00 EE EE EE 00 FF FF FF 00 00 00' - '00 00 DD DD DD 00 FF CC CC 00 CC FF CC 00 CC CC' - 'FF 00 CC FF FF 00 EE EE EE 00 FF FF FF 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 C0 17' - '95 00 00 00 38 00 A8 44 F9 77 15 00 00 00 78 0A' - '38 00 00 00 38 00 B0 6C 38 00 98 17 95 00 00 00' - '00 00 E0 19 95 00 F0 88 FA 77 70 38 F5 77 FF FF' - 'FF FF A8 44 F9 77 70 7D F5 77 3A 8A F5 77 96 00' - '00 00 96 00 00 00 09 00 00 00 B0 18 95 00 00 00' - '00 00 CB 44 F9 77 38 9F 07 00 CD 8B F5 77 78 13' - '05 00 37 90 F5 77 00 00 00 00 3E 8A F5 77 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 10 00 00 00 00 00 00 00 58 00' - '5A 00 00 EC FD 7F 1A 02 00 00 4C 16 95 00 40 9F' - '07 00 FC 15 95 00 FF FF FF FF B4 1A 95 00 45 00' - '00 00 28 02 00 00 FF FF FF FF E2 D8 F5 77 7D 9B' - 'F5 77 94 B6 01 00 00 00 05 00 F4 17 95 00 80 00' - '10 C0 B4 1A 95 00 F0 88 FA 77 88 1C F5 77 FF FF' - 'FF FF 37 90 F5 77 00 00 00 00 3E 8A F5 77 9B B2' - 'E7 77 B7 00 00 00 02 00 00 00 A4 1A 95 00 01 00' - '00 00 18 00 00 00 00 00 00 00 10 19 95 00 42 00' - '00 00 00 00 00 00 F4 18 95 00 00 00 00 00 00 00' - '00 00 00 00 00 00 0C 00 00 00 02 00 00 00 01 01' - 'F5 77 00 EC FD 7F 58 00 00 00 00 00 00 00 03 00' - '00 00 60 00 1A 02 40 9F 07 00 00 00 00 00 40 9F' - '07 00 05 00 00 00 BE B3 E7 77 4C 19 95 00 A3 B4' - 'E7 77 F8 00 00 00 00 00 00 C0 00 00 00 00 00 00' - '00 00 02 00 00 00 80 00 00 00 00 00 00 00 8C 1A' - '95 00 7F E9 4B 00 00 63 38 00 00 00 00 C0 00 00' - '00 00 80 1A 95 00 02 00 00 00 80 00 00 00 00 00' - '00 00 C0 27 95 00 C4 F5 AF 00 02 00 00 00 44 3A' - '5C 6F 73 65 78 70 65 72 74 73 5C 72 65 61 63 74' - '6F 73 5C 6C 69 62 5C 73 68 65 6C 6C 33 32 5C 64' - '65 73 6B 74 6F 70 2E 69 63 6F 00 93 4B 00 14 1A' - '95 00 1F 3B D4 77 15 00 00 00 A8 00 00 00 4F 3B' - 'D4 77 E0 19 95 00 33 3B D4 77 64 C5 F5 77 A9 F1' - 'E7 77 F8 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 1A 95 00 B0 6C 38 00 96 00 00 00 00 00' - '00 00 C9 F1 E7 77 96 00 00 00 A4 1A 95 00 09 00' - '00 00 00 00 00 00 96 00 00 00 96 00 00 00 09 00' - '00 00 F4 19 95 00 33 3B D4 77 B4 1A 95 00 09 48' - 'E9 77 B8 10 E9 77 FF FF FF FF C9 F1 E7 77 16 EA' - '4B 00 F8 00 00 00 B0 6C 38 00 96 00 00 00 58 1A' - '95 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 26 26 26 26 26 26 26 26 26 26' - '02 26 26 26 26 26 26 16 1F 1F 18 18 18 18 17 18' - '17 17 17 17 07 26 06 25 25 23 22 24 22 24 20 21' - '20 20 20 20 17 01 06 25 13 10 0E 14 13 13 14 13' - '10 0E 0E 19 18 03 06 25 13 09 10 0E 10 0E 10 0E' - '0E 0E 0B 1C 17 26 06 25 0F 0D 0C 0E 0E 10 0E 0E' - '0E 0B 0A 19 1E 26 06 25 0C 0D 0A 0E 0E 0D 0E 0E' - '0E 17 0C 19 18 26 06 25 0E 09 10 0E 0E 0F 10 0E' - '0C 20 0F 19 1F 26 06 25 0F 0E 0E 10 13 11 13 10' - '0E 0C 0C 1B 1D 02 05 25 13 0E 10 13 14 13 11 13' - '0F 1F 12 1A 18 26 06 25 0E 0E 10 14 10 15 13 11' - '13 17 0E 1B 1F 26 05 25 18 1B 21 1B 20 21 21 20' - '1C 18 1B 24 20 26 04 17 24 24 20 24 24 20 24 20' - '24 24 20 24 07 26 26 26 04 26 04 04 26 04 26 04' - '04 26 04 26 26 26 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 FF FF 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 FF FF 00 00 28 00 00 00 20 00 00 00 40 00' - '00 00 01 00 20 00 00 00 00 00 00 10 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 23 00 00 00 58 00 00' - '00 61 00 00 00 61 00 00 00 61 00 00 00 61 00 00' - '00 61 00 00 00 61 00 00 00 61 00 00 00 61 00 00' - '00 61 00 00 00 61 00 00 00 61 00 00 00 61 00 00' - '00 61 00 00 00 61 00 00 00 61 00 00 00 61 00 00' - '00 61 00 00 00 61 00 00 00 61 00 00 00 61 00 00' - '00 61 00 00 00 61 00 00 00 61 00 00 00 61 00 00' - '00 3D 00 00 00 08 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 6E 00 00 00 E7 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 01 01 01 FF 01 01 01 FF 01 01' - '01 FF 01 01 01 FF 01 01 01 FF 01 01 01 FF 01 01' - '01 FF 01 01 01 FF 02 02 02 FF 02 02 02 FF 02 02' - '02 FF 02 02 02 FF 02 02 02 FF 00 00 00 FF 00 00' - '00 F7 00 00 00 A7 00 00 00 1D 00 00 00 00 00 00' - '00 5D 00 00 00 FF 47 47 47 FF AA AA AA FF B6 B6' - 'B6 FF B2 B2 B2 FF B1 B1 B1 FF B1 B1 B1 FF AF AF' - 'AF FF AE AE AE FF AE AE AE FF AD AD AD FF AC AC' - 'AC FF AC AC AC FF AB AB AB FF AA AA AA FF A9 A9' - 'A9 FF A8 A8 A8 FF A7 A7 A7 FF A7 A7 A7 FF A5 A5' - 'A5 FF A5 A5 A5 FF A4 A4 A4 FF A3 A3 A3 FF A2 A2' - 'A2 FF A1 A1 A1 FF A2 A2 A2 FF A3 A3 A3 FF 64 64' - '64 FF 05 05 05 FF 00 00 00 AB 00 00 00 0A 00 00' - '00 CF 38 38 38 FF F0 F0 F0 FF FF FF FF FF FF FF' - 'FF FF FE FF FF FF FC FC FC FF F9 FA FA FF F7 F7' - 'F7 FF F4 F5 F5 FF F2 F3 F3 FF F0 F1 F1 FF EE EE' - 'EE FF EC EC EC FF E9 EA EA FF E7 E7 E7 FF E5 E5' - 'E5 FF E3 E3 E3 FF E0 E0 E1 FF DE DE DE FF DC DC' - 'DC FF D9 D9 DA FF D7 D7 D8 FF D5 D5 D5 FF D3 D3' - 'D3 FF D0 D0 D0 FF CE CE CE FF CE CE CE FF DE DE' - 'DE FF 66 66 66 FF 00 00 00 FD 00 00 00 41 00 00' - '00 F2 7C 7C 7C FF FF FF FF FF FA FA FA FF FA FC' - 'FD FF F9 FC FF FF F7 FA FC FF F4 F7 FA FF F3 F6' - 'F8 FF F1 F3 F6 FF EE F1 F4 FF EC EF F2 FF EA ED' - 'F0 FF E8 EB ED FF E7 E9 EC FF E4 E7 E9 FF E2 E5' - 'E8 FF E1 E3 E6 FF DF E2 E4 FF DD E0 E2 FF DB DE' - 'E1 FF D9 DD DF FF D8 DB DD FF D6 D9 DC FF D4 D8' - 'DA FF D3 D6 D9 FF D0 D2 D4 FF C6 C6 C6 FF CF CF' - 'CF FF A3 A3 A3 FF 01 01 01 FF 00 00 00 63 00 00' - '00 F0 7E 7E 7E FF FF FF FF FF FD FE FE FF E2 C8' - 'B7 FF DA A0 77 FF DE A9 82 FF E1 AE 86 FF E4 B2' - '8A FF E6 B6 8F FF E9 BB 92 FF EA BD 95 FF EC C0' - '98 FF ED C2 9A FF EE C3 9A FF EE C2 9A FF EC C1' - '99 FF EB BF 97 FF E9 BC 94 FF E7 B8 90 FF E4 B4' - '8C FF E2 B0 88 FF DF AB 84 FF DC A6 7F FF D9 A1' - '7A FF D4 97 6E FF E0 B8 9F FF D1 D2 D3 FF CE CF' - 'CF FF A2 A2 A2 FF 01 01 01 FF 00 00 00 61 00 00' - '00 F0 7D 7D 7D FF FF FF FF FF FF FF FF FF CC A0' - '82 FF BD 56 0F FF C5 66 23 FF CA 6E 2B FF CE 76' - '31 FF D2 7D 38 FF D6 83 3E FF D9 89 43 FF DC 8D' - '47 FF DE 90 4A FF DF 91 4B FF DF 91 4B FF DD 8F' - '49 FF DB 8C 46 FF D8 87 42 FF D6 81 3C FF D1 7B' - '37 FF CD 73 2F FF C8 6C 28 FF C4 64 21 FF BF 5C' - '1A FF B6 4B 06 FF CD 87 5B FF D4 D7 D8 FF D1 D2' - 'D3 FF A1 A1 A1 FF 01 01 01 FF 00 00 00 61 00 00' - '00 F0 7B 7B 7B FF FF FF FF FF FF FF FF FF CE A3' - '87 FF BD 59 16 FF C4 68 29 FF C8 6F 30 FF CC 76' - '35 FF D0 7C 3B FF D3 81 40 FF D6 86 44 FF D7 89' - '48 FF D9 8C 4A FF DA 8C 4B FF DA 8C 4B FF D9 8B' - '49 FF D7 88 47 FF D4 84 43 FF D2 7F 3F FF CF 7A' - '3A FF CB 74 34 FF C7 6D 2D FF C3 66 27 FF BE 5E' - '20 FF B6 4E 0D FF CD 8A 60 FF D6 D8 DA FF D4 D4' - 'D5 FF A1 A1 A1 FF 00 00 00 FF 00 00 00 61 00 00' - '00 F0 7B 7B 7B FF FF FF FF FF FF FF FF FF CD A1' - '85 FF B9 52 11 FF C0 61 23 FF C4 68 2A FF C8 6F' - '2F FF CB 74 34 FF CE 79 38 FF D1 7D 3C FF D2 80' - '3F FF D4 82 42 FF D3 83 42 FF D3 83 42 FF D3 82' - '41 FF D1 7F 3E FF D0 7C 3B FF CD 77 37 FF CA 72' - '33 FF C7 6D 2D FF C3 66 28 FF BF 60 21 FF BB 59' - '1A FF B2 49 07 FF CB 86 5D FF D8 D9 DB FF D6 D7' - 'D7 FF A1 A1 A1 FF 00 00 00 FF 00 00 00 61 00 00' - '00 F0 7A 7A 7A FF FF FF FF FF FF FF FF FF CB 9E' - '82 FF B5 4C 0A FF BC 5B 1C FF C0 62 22 FF C4 67' - '28 FF C6 6C 2C FF C9 70 31 FF CB 74 34 FF CD 77' - '37 FF CD 79 39 FF CE 79 39 FF CE 79 39 FF CE 78' - '37 FF CC 76 36 FF CB 73 33 FF C8 6F 2F FF C5 6B' - '2B FF C2 65 26 FF BF 60 21 FF BC 59 1A FF B7 53' - '15 FF AE 42 01 FF C8 82 5A FF DA DC DC FF D7 D8' - 'D8 FF A0 A0 A0 FF 00 00 00 FF 00 00 00 61 00 00' - '00 F0 78 78 78 FF FF FF FF FF FF FF FF FF C7 99' - '7E FF B1 46 03 FF B8 54 15 FF BB 5A 1B FF BE 5F' - '20 FF C1 64 25 FF C4 68 29 FF C5 6B 2C FF C7 6D' - '2E FF C8 6F 2F FF C8 6F 2F FF C8 6F 2F FF C7 6E' - '2E FF C6 6C 2C FF C5 6A 2A FF C2 66 27 FF C0 62' - '23 FF BF 5E 1E FF B7 51 10 FF A9 44 05 FF B2 47' - '07 FF AC 3C 00 FF C6 7F 57 FF DC DE DF FF DA DB' - 'DB FF 9F 9F 9F FF 00 00 00 FF 00 00 00 61 00 00' - '00 F0 77 77 77 FF FF FF FF FF FF FF FF FF C4 94' - '79 FF AC 3D 00 FF B3 4C 0F FF B7 52 14 FF B9 57' - '18 FF BB 5A 1C FF BE 5E 1F FF BF 62 23 FF C2 65' - '26 FF C4 68 28 FF C5 69 2A FF C5 69 2A FF C4 69' - '29 FF C2 66 27 FF C0 62 24 FF BD 5E 1F FF BC 5A' - '1A FF AE 4E 12 FF 9A 6B 4D FF AB 92 82 FF 96 57' - '32 FF A4 31 00 FF C6 7E 55 FF DE E0 E2 FF DD DE' - 'DE FF 9E 9E 9E FF 00 00 00 FF 00 00 00 61 00 00' - '00 F0 76 76 76 FF FF FF FF FF FF FF FF FF C0 90' - '76 FF A8 37 00 FF AF 45 07 FF B1 49 0B FF B3 4D' - '10 FF B9 57 18 FF C1 64 25 FF C5 6B 2B FF C7 6E' - '2E FF C8 70 30 FF C9 71 31 FF C9 71 31 FF C9 71' - '31 FF C8 70 2F FF C6 6C 2D FF C4 69 29 FF C3 5F' - '1C FF 93 5C 39 FF DC E4 EA FF ED F3 F6 FF A8 A9' - 'AB FF 86 2F 03 FF C9 7D 52 FF DF E1 E3 FF DE DF' - 'DF FF 9E 9E 9E FF 00 00 00 FF 00 00 00 61 00 00' - '00 F0 75 75 75 FF FF FF FF FF FF FF FF FF BE 8F' - '74 FF A6 35 00 FF AA 3D 01 FF B0 49 0B FF BD 5E' - '1F FF C6 6C 2C FF CA 72 32 FF CC 75 35 FF CD 77' - '37 FF CE 78 39 FF CE 7A 39 FF CE 7A 39 FF CE 79' - '39 FF CD 78 37 FF CC 75 36 FF CB 73 32 FF C9 6B' - '28 FF 96 71 57 FF DC E2 E7 FF D4 D0 CE FF C7 CD' - 'D1 FF 7B 34 0B FF CA 7D 50 FF E0 E3 E5 FF E0 E1' - 'E2 FF 9D 9D 9D FF 00 00 00 FF 00 00 00 61 00 00' - '00 F0 73 73 73 FF FF FF FF FF FF FF FF FF BD 8D' - '72 FF A6 34 00 FF B2 4C 0F FF C4 68 28 FF CA 72' - '32 FF CC 76 36 FF CF 79 39 FF D1 7D 3D FF D2 80' - '3F FF D3 82 42 FF D4 83 42 FF D4 83 42 FF D3 82' - '41 FF D2 81 40 FF D1 7E 3E FF D0 7B 3A FF D2 78' - '34 FF 9E 60 33 FF B4 B5 B4 FF E9 EF F2 FF AC A2' - '9C FF 8D 2C 00 FF C8 7E 54 FF E3 E5 E6 FF E2 E4' - 'E4 FF 9C 9C 9C FF 00 00 00 FF 00 00 00 61 00 00' - '00 F0 72 72 72 FF FF FF FF FF FF FF FF FF BA 8A' - '6E FF AF 43 05 FF C6 6C 2C FF CB 74 33 FF CE 77' - '37 FF D1 7D 3C FF D3 82 41 FF D6 86 44 FF D7 89' - '48 FF D9 8C 4A FF D9 8C 4B FF D9 8C 4B FF D9 8C' - '4A FF D8 8A 49 FF D7 87 46 FF D4 83 42 FF D2 7F' - '3F FF D2 78 34 FF AC 65 2F FF 9A 63 3B FF AD 59' - '21 FF B7 49 08 FF C4 7D 55 FF E5 E6 E7 FF E5 E6' - 'E7 FF 9B 9B 9B FF 00 00 00 FF 00 00 00 61 00 00' - '00 F0 6F 6F 6F FF FF FF FF FF FE FF FF FF BA 8B' - '70 FF BF 5D 1A FF CB 73 33 FF CE 78 38 FF D2 7E' - '3E FF D5 84 43 FF D8 8A 48 FF DB 8E 4C FF DE 92' - '50 FF DE 95 53 FF E0 96 54 FF E0 96 54 FF DF 95' - '53 FF DE 93 51 FF DC 8F 4E FF D9 8B 4A FF D8 86' - '43 FF BD 7D 4A FF A6 75 51 FF AA 75 4E FF 9F 6E' - '44 FF B5 59 18 FF CB 86 5D FF E5 E7 E8 FF E7 E7' - 'E8 FF 9A 9A 9A FF 00 00 00 FF 00 00 00 61 00 00' - '00 F0 6E 6E 6E FF FF FF FF FF FC FF FF FF BE 92' - '77 FF C6 67 24 FF CD 77 37 FF D1 7E 3E FF D5 85' - '43 FF D9 8B 4A FF DD 91 4F FF E0 96 54 FF E2 9A' - '58 FF E4 9E 5B FF E5 9F 5D FF E5 9F 5C FF E5 9E' - '5C FF E3 9B 59 FF E0 97 56 FF DE 93 51 FF D9 87' - '42 FF B8 97 7C FF B0 BA C2 FF B0 B5 BA FF A3 AA' - 'A9 FF A9 5B 22 FF D5 91 66 FF E7 E8 E9 FF EA EA' - 'EB FF 9A 9A 9A FF 00 00 00 FF 00 00 00 61 00 00' - '00 F0 6C 6C 6C FF FF FF FF FF FC FF FF FF BC 90' - '74 FF C8 6B 27 FF D0 7B 3B FF D4 83 42 FF D8 8A' - '48 FF DD 91 4F FF E1 97 56 FF E4 9E 5B FF E7 A2' - '60 FF EA A6 63 FF EA A9 65 FF EB A9 66 FF EA A7' - '64 FF E8 A4 61 FF E6 9F 5D FF E2 99 58 FF E1 91' - '4B FF B3 8D 6C FF D1 D6 DB FF E0 E3 E4 FF B3 AF' - 'AD FF B5 60 24 FF D4 92 67 FF F4 F6 F7 FF FA FA' - 'FB FF 9B 9B 9B FF 00 00 00 FF 00 00 00 61 00 00' - '00 F0 6B 6B 6B FF FF FF FF FF FC FF FF FF B3 82' - '67 FF C4 61 1C FF D4 80 3D FF D7 86 44 FF DC 8D' - '4B FF E0 95 52 FF E5 9C 59 FF E9 A3 60 FF ED AA' - '65 FF F0 AF 6A FF F2 B2 6D FF F2 B3 6D FF F1 B0' - '6C FF EE AC 67 FF EA A5 62 FF E6 9F 5B FF E7 99' - '53 FF B5 81 54 FF C4 C5 C6 FF DA DF E1 FF A6 95' - '89 FF BB 5B 17 FF CC 85 5A FF FA FC FD FF FF FF' - 'FF FF 9B 9B 9B FF 00 00 00 FF 00 00 00 61 00 00' - '00 F0 6A 6A 6A FF FF FF FF FF FD FF FF FF AC 84' - '6D FF AA 52 1C FF CB 80 44 FF D2 88 4A FF D6 8F' - '51 FF DB 96 58 FF DF 9E 60 FF E4 A5 66 FF E8 AC' - '6D FF EC B2 72 FF EE B6 76 FF EE B7 77 FF ED B4' - '74 FF E9 AE 6F FF E5 A8 69 FF E1 A1 62 FF DE 9A' - '5B FF CE 8B 50 FF A9 78 50 FF A5 76 50 FF AD 70' - '41 FF AE 59 20 FF C1 85 64 FF FD FF FF FF FF FF' - 'FF FF 9A 9A 9A FF 00 00 00 FF 00 00 00 61 00 00' - '00 F3 69 69 69 FF FF FF FF FF FF FF FF FF E2 E0' - 'E0 FF DA D6 D4 FF DE DA D6 FF DF DB D7 FF E0 DB' - 'D7 FF E0 DC D8 FF E0 DC D8 FF E1 DD D9 FF E1 DD' - 'D9 FF E1 DE D9 FF E1 DE DA FF E1 DE DA FF E1 DE' - 'DA FF E1 DD D9 FF E1 DD D9 FF E0 DC D8 FF DF DB' - 'D7 FF E1 DC D7 FF E4 DC D4 FF E3 DA D2 FF E1 D9' - 'D3 FF D8 D5 D3 FF E5 E3 E2 FF FE FE FE FF FF FF' - 'FF FF 9B 9B 9B FF 00 00 00 FF 00 00 00 63 00 00' - '00 DE 3A 3A 3A FF F2 F2 F2 FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FE FE' - 'FE FF 67 67 67 FF 00 00 00 FF 00 00 00 45 00 00' - '00 7A 01 01 01 FF 5D 5D 5D FF C3 C3 C3 FF D3 D3' - 'D3 FF D1 D1 D1 FF D1 D1 D1 FF D1 D1 D1 FF D1 D1' - 'D1 FF D1 D1 D1 FF D1 D1 D1 FF D1 D1 D1 FF D1 D1' - 'D1 FF D1 D1 D1 FF D1 D1 D1 FF D1 D1 D1 FF D1 D1' - 'D1 FF D1 D1 D1 FF D1 D1 D1 FF D1 D1 D1 FF D1 D1' - 'D1 FF D0 D0 D0 FF D0 D0 D0 FF CF CF CF FF CF CF' - 'CF FF CE CE CE FF CF CF CF FF C9 C9 C9 FF 7B 7B' - '7B FF 0B 0B 0B FF 00 00 00 BF 00 00 00 0A 00 00' - '00 07 00 00 00 98 00 00 00 FD 08 08 08 FF 11 11' - '11 FF 10 10 10 FF 10 10 10 FF 10 10 10 FF 10 10' - '10 FF 10 10 10 FF 10 10 10 FF 10 10 10 FF 10 10' - '10 FF 10 10 10 FF 10 10 10 FF 10 10 10 FF 10 10' - '10 FF 10 10 10 FF 10 10 10 FF 10 10 10 FF 10 10' - '10 FF 10 10 10 FF 10 10 10 FF 10 10 10 FF 10 10' - '10 FF 10 10 10 FF 11 11 11 FF 0C 0C 0C FF 00 00' - '00 FF 00 00 00 C4 00 00 00 24 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 40 00 00 00 7D 00 00' - '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' - '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' - '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' - '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' - '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' - '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' - '00 59 00 00 00 0A 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF' - 'FF FF FF FF FF FF FF FF FF FF C0 00 00 03 80 00' - '00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 01 C0 00' - '00 03 FF FF FF FF FF FF FF FF FF FF FF FF 28 00' - '00 00 10 00 00 00 20 00 00 00 01 00 20 00 00 00' - '00 00 00 04 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 21 00 00 00 92 05 05' - '05 A8 05 05 05 A8 05 05 05 A8 05 05 05 A8 06 06' - '06 A8 06 06 06 A8 06 06 06 A8 06 06 06 A8 06 06' - '06 A8 07 07 07 A8 07 07 07 A8 06 06 06 A8 00 00' - '00 78 00 00 00 0A 0E 0E 0E B9 98 98 98 FF C9 CB' - 'CC FF C2 C4 C6 FF BF C1 C2 FF BC BE BF FF B8 BA' - 'BC FF B6 B8 B9 FF B4 B5 B7 FF B0 B2 B4 FF AE B1' - 'B2 FF AC AE B0 FF AA AC AE FF AC AC AD FF 55 55' - '55 FF 01 01 01 72 43 43 43 F3 FF FF FF FF FD F5' - 'EF FF F8 EC E3 FF F7 EC E3 FF F5 EB E2 FF F2 E9' - 'E0 FF F0 E7 DE FF ED E4 DB FF E9 DF D6 FF E5 DA' - 'D2 FF E1 D5 CC FF DC D0 C7 FF DB D6 D3 FF B0 B0' - 'B1 FF 08 08 08 AB 48 48 49 F1 FD FE FF FF CF 91' - '67 FF CA 71 31 FF D5 85 47 FF DC 90 52 FF E0 99' - '59 FF E2 9B 5B FF E0 98 59 FF DC 90 51 FF D5 84' - '46 FF CB 76 38 FF C4 66 27 FF D4 B1 9B FF B0 B5' - 'B8 FF 08 08 08 A9 46 47 47 F0 FD FE FF FF C8 84' - '58 FF C0 5D 19 FF CA 71 30 FF D0 7B 39 FF D3 81' - '3F FF D4 83 41 FF D3 80 3E FF CF 7A 38 FF C9 6E' - '2E FF C1 61 1F FF B9 51 10 FF D2 AC 96 FF B2 B7' - 'BA FF 08 08 08 A8 45 46 46 F0 FD FE FF FF C3 7D' - '52 FF B8 52 10 FF C0 64 24 FF C5 6B 2B FF C8 70' - '30 FF C9 71 31 FF C8 6F 2F FF C4 6A 2A FF BF 61' - '21 FF B3 50 12 FF B1 44 04 FF D3 AC 96 FF B3 B9' - 'BC FF 07 07 07 A8 44 45 46 F0 FC FE FE FF BC 72' - '48 FF AE 41 02 FF B8 55 17 FF C0 63 23 FF C5 6A' - '2B FF C6 6C 2D FF C5 6B 2B FF C2 63 23 FF B0 5E' - '28 FF BD A9 9D FF A3 61 3D FF D1 A6 8E FF B5 BB' - 'BD FF 06 06 06 A8 43 43 44 F0 FC FD FD FF B7 6D' - '42 FF B1 47 08 FF C5 6A 2B FF CC 76 36 FF D0 7C' - '3B FF D1 7E 3D FF D0 7C 3C FF CF 76 34 FF B4 71' - '41 FF D1 D5 D6 FF A8 79 5E FF CF A4 8C FF B7 BC' - 'BF FF 06 06 06 A8 41 42 43 F0 FA FA FB FF BE 78' - '4D FF C6 69 26 FF D1 7D 3D FF D6 86 45 FF DA 8D' - '4B FF DB 8F 4E FF DB 8D 4C FF D8 88 46 FF CB 7B' - '3E FF 9F 69 41 FF AB 57 21 FF DA B2 9A FF B7 BC' - 'C0 FF 06 06 06 A8 40 41 41 F0 F7 F8 F9 FF C8 88' - '5C FF CF 77 33 FF D8 89 47 FF DF 95 52 FF E4 9E' - '5A FF E6 A1 5E FF E5 9F 5C FF E2 95 4F FF C8 91' - '63 FF BE BF C0 FF B2 86 65 FF E2 B9 9F FF BA C0' - 'C3 FF 05 05 05 A8 3F 40 40 F0 F7 F7 F8 FF BB 79' - '4D FF CD 75 2F FF D8 8B 47 FF E1 9A 55 FF E9 A6' - '61 FF EC AD 67 FF EA A8 63 FF E5 9C 55 FF C9 8A' - '53 FF B9 AF A6 FF AE 72 49 FF E8 BF A5 FF C5 CB' - 'CE FF 04 04 04 A8 3B 3B 3B F4 FF FF FF FF DB C6' - 'BA FF E2 C5 AE FF E8 CE B7 FF EB D4 BC FF EF D9' - 'C1 FF F1 DC C4 FF EF DA C2 FF EC D5 BD FF E7 CD' - 'B6 FF DF C6 B0 FF D8 BA A7 FF F8 ED E7 FF C8 CA' - 'CB FF 02 02 02 AB 0F 0F 0F C7 AA A9 A9 FF E2 E5' - 'E7 FF DE E3 E6 FF DD E1 E5 FF DD E0 E4 FF DC E0' - 'E3 FF DC DF E3 FF DC E0 E3 FF DD E0 E4 FF DD E1' - 'E4 FF DD E0 E2 FF DE E2 E5 FF D8 DA DB FF 66 66' - '65 FF 00 00 00 78 00 00 00 2E 01 01 01 B1 0F 0F' - '0F CC 0E 0E 0E CC 0E 0E 0E CC 0E 0E 0E CC 0E 0E' - '0E CC 0E 0E 0E CC 0E 0E 0E CC 0E 0E 0E CC 0E 0E' - '0E CC 0E 0E 0E CC 0E 0E 0E CC 0C 0C 0C CB 00 00' - '00 8D 00 00 00 0D 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 FF FF 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 FF FF 00 00 28 00 00 00 10 00 00 00 20 00' - '00 00 01 00 04 00 00 00 00 00 80 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 80 00 00 00 00 80 00 00 80 80 00 00 00 00' - '80 00 80 00 80 00 00 80 80 00 C0 C0 C0 00 80 80' - '80 00 FF 00 00 00 00 FF 00 00 FF FF 00 00 00 00' - 'FF 00 FF 00 FF 00 00 FF FF 00 FF FF FF 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 08 77' - '77 77 77 77 77 80 8F FF FF FF F7 77 77 70 8F 83' - '88 88 88 83 37 70 8F 83 33 38 33 33 37 70 8F 83' - '33 33 33 33 37 70 8F 83 33 33 33 37 37 70 8F 83' - '33 33 33 87 87 70 8F 83 38 88 88 38 37 70 6F 83' - '88 87 88 87 87 70 0F 83 88 77 78 87 87 70 0F 77' - '77 77 77 77 7F 70 07 FF FF F7 FF FF F7 80 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF' - '00 00 80 01 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 80 01 00 00 FF FF 00 00 28 00' - '00 00 20 00 00 00 40 00 00 00 01 00 04 00 00 00' - '00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 80 00 00 00 00 80' - '00 00 80 80 00 00 00 00 80 00 80 00 80 00 00 80' - '80 00 C0 C0 C0 00 80 80 80 00 FF 00 00 00 00 FF' - '00 00 FF FF 00 00 00 00 FF 00 FF 00 FF 00 00 FF' - 'FF 00 FF FF FF 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 87 77 77 77 77 77 77 77 77' - '77 77 77 77 80 00 00 FF FF FF FF FF FF FF FF F7' - '77 77 77 77 78 00 08 FF FF FF FF FF FF FF FF FF' - '77 77 77 77 77 00 08 FF 77 77 77 77 77 77 77 77' - '77 77 78 77 77 00 08 FF 73 33 33 38 88 88 88 83' - '33 33 33 87 77 00 08 FF 73 33 33 38 88 88 88 83' - '33 33 33 87 77 00 08 FF 73 33 33 33 38 88 83 33' - '33 33 33 87 77 00 08 FF 73 33 33 33 33 33 33 33' - '33 33 33 87 77 00 08 FF 83 33 33 33 33 33 33 33' - '33 33 31 87 78 00 08 FF 81 33 33 33 33 33 33 33' - '33 88 31 8F 78 00 08 FF 81 33 33 33 33 33 33 33' - '33 FF 71 8F 78 00 08 FF 81 13 33 33 33 33 33 33' - '38 F7 71 8F F8 00 08 FF 81 33 33 33 38 88 83 33' - '33 7F 71 8F F8 00 08 FF 83 33 33 88 88 88 88 88' - '33 33 33 8F F8 00 08 FF 83 33 38 88 88 88 88 88' - '88 88 83 8F F8 00 08 FF 83 33 88 88 88 88 88 88' - '88 77 73 8F F8 00 08 FF 83 38 88 88 77 77 77 88' - '88 7F 73 8F F8 00 08 FF 83 38 88 87 77 77 77 78' - '88 77 83 8F F8 00 08 FF 83 88 88 87 77 77 77 77' - '88 88 83 8F F8 00 08 FF F7 77 77 77 77 77 77 77' - '77 77 77 FF F8 00 00 FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF F8 00 00 87 77 77 77 77 77 77 77 77' - '77 77 77 77 80 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF 80 00 00 03 80 00 00 01 00 00' - '00 01 00 00 00 01 00 00 00 01 00 00 00 01 00 00' - '00 01 00 00 00 01 00 00 00 01 00 00 00 01 00 00' - '00 01 00 00 00 01 00 00 00 01 00 00 00 01 00 00' - '00 01 00 00 00 01 00 00 00 01 00 00 00 01 00 00' - '00 01 00 00 00 01 00 00 00 01 00 00 00 01 00 00' - '00 01 80 00 00 03 E0 00 00 0F FF FF FF FF FF FF' - 'FF FF FF FF FF FF 28 00 00 00 30 00 00 00 60 00' - '00 00 01 00 08 00 00 00 00 00 00 09 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 11 11 11 00 66 33 00 00 66 33 33 00 66 66' - '33 00 44 44 44 00 55 55 55 00 66 66 66 00 77 77' - '77 00 7F 7F 7F 00 99 33 00 00 99 33 33 00 CC 33' - '00 00 CC 33 33 00 99 66 00 00 99 66 33 00 CC 66' - '00 00 CC 66 33 00 FF 66 33 00 99 66 66 00 CC 66' - '66 00 FF 66 66 00 99 99 33 00 CC 99 33 00 FF 99' - '33 00 FF CC 33 00 99 99 66 00 CC 99 66 00 FF 99' - '66 00 CC CC 66 00 FF CC 66 00 88 88 88 00 99 99' - '99 00 AA AA AA 00 BB BB BB 00 CC 99 99 00 FF 99' - '99 00 99 CC 99 00 CC CC 99 00 FF CC 99 00 99 CC' - 'CC 00 CC CC CC 00 DD DD DD 00 FF CC CC 00 FF FF' - 'CC 00 CC CC FF 00 FF CC FF 00 CC FF FF 00 EE EE' - 'EE 00 FF FF FF 00 00 00 00 00 A8 44 F9 77 21 00' - '00 00 B8 0C 38 00 00 00 38 00 F0 B5 0C 01 14 17' - '95 00 00 00 00 00 5C 19 95 00 28 52 0C 01 68 19' - '95 00 77 82 F5 77 98 7F F5 77 3A 8A F5 77 00 04' - '00 00 90 A2 AF 00 10 00 00 00 10 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 C0 17 95 00 00 00 38 00 A8 44' - 'F9 77 15 00 00 00 78 0A 38 00 00 00 38 00 B0 6C' - '38 00 98 17 95 00 00 00 00 00 E0 19 95 00 F0 88' - 'FA 77 70 38 F5 77 FF FF FF FF A8 44 F9 77 70 7D' - 'F5 77 3A 8A F5 77 96 00 00 00 96 00 00 00 09 00' - '00 00 B0 18 95 00 00 00 00 00 CB 44 F9 77 38 9F' - '07 00 CD 8B F5 77 78 13 05 00 37 90 F5 77 00 00' - '00 00 3E 8A F5 77 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 28 81 0C 01 10 AE 0C 01 20 81' - '0C 01 78 01 38 00 78 01 38 00 38 02 38 00 38 56' - '0C 01 01 00 00 00 03 00 00 00 38 02 38 00 F0 56' - '0C 01 F0 56 0C 01 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 10 00' - '00 00 00 00 00 00 58 00 5A 00 30 56 0C 01 30 56' - '0C 01 4C 16 95 00 40 9F 07 00 FC 15 95 00 FF FF' - 'FF FF B4 1A 95 00 45 00 00 00 28 02 00 00 28 52' - '0C 01 A4 18 95 00 E5 3A F8 77 18 00 00 00 30 56' - '0C 01 00 00 38 00 28 52 0C 01 00 00 00 00 78 19' - '95 00 CA 8C F5 77 78 01 38 00 BE 8E F5 77 08 06' - '38 00 37 90 F5 77 30 52 0C 01 30 52 0C 01 40 00' - '00 00 40 00 00 00 01 00 00 00 18 00 00 00 00 00' - '00 00 10 19 95 00 42 00 00 00 00 00 00 00 F4 18' - '95 00 00 00 00 00 00 00 00 00 00 00 00 00 28 52' - '0C 01 28 52 0C 01 01 01 F5 77 78 01 38 00 30 52' - '0C 01 20 81 0C 01 28 81 0C 01 78 01 38 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 BE B3' - 'E7 77 28 52 0C 01 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 08 04 00 00 99 00' - '00 00 08 04 00 00 08 01 00 00 00 00 00 00 00 00' - '00 00 00 00 01 01 00 00 38 00 BC 18 95 00 C0 18' - '95 00 B0 19 95 00 F0 88 FA 77 88 1C F5 77 FF FF' - 'FF FF 37 90 F5 77 81 E9 49 00 00 00 38 00 00 00' - '00 00 30 52 0C 01 30 52 0C 01 A4 1A 95 00 40 00' - '00 00 40 00 00 00 B8 10 E9 77 FF FF FF FF C9 F1' - 'E7 77 16 EA 4B 00 F8 00 00 00 B4 1A 95 00 DC E3' - '49 00 E0 A3 4E 00 FF FF FF FF 10 00 00 00 10 DA' - '4B 00 30 52 0C 01 71 CC 43 00 30 52 0C 01 F0 B5' - '0C 01 A4 1A 95 00 90 A2 AF 00 C4 F5 AF 00 06 00' - '00 00 F0 B5 0C 01 0F 02 00 00 70 52 0C 01 10 00' - '00 00 00 00 00 00 20 00 00 00 30 52 0C 01 40 00' - '00 00 10 00 00 00 00 01 00 00 00 04 00 00 00 00' - '00 00 00 00 00 00 10 00 00 00 10 00 00 00 28 00' - '00 00 10 00 00 00 20 00 00 00 01 00 20 00 00 00' - '00 00 00 04 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 32 32 32 32 32 32 32 32 32 32 32 32 32 32' - '32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32' - '32 32 32 32 32 32 32 32 32 32 00 00 00 00 00 00' - '32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32' - '32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32' - '32 32 32 32 32 32 32 32 32 32 32 32 00 00 00 32' - '32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32' - '32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32' - '32 32 32 32 32 32 32 32 32 32 32 32 32 00 32 32' - '32 32 05 08 1F 1F 1F 1F 1F 1F 1F 1F 1F 1F 1F 1F' - '1F 1F 1F 1F 1F 1F 1F 1F 1F 1F 1F 1F 1F 1F 1F 1F' - '1F 1F 1F 1F 1F 1F 1F 08 06 32 32 32 32 32 32 32' - '32 1F 31 31 31 31 31 31 31 31 30 31 30 30 30 30' - '30 30 30 2A 30 2A 30 2A 2A 2A 2A 2A 2A 2A 2A 2A' - '29 2A 29 29 29 29 29 29 30 20 01 32 32 32 32 32' - '05 31 31 31 30 31 30 30 30 30 30 30 30 30 2A 30' - '30 2A 2A 30 2A 2A 2A 2A 2A 2A 2A 29 2A 29 29 29' - '29 29 29 29 29 29 22 29 22 30 07 32 32 32 32 32' - '08 31 31 30 31 30 30 31 30 30 30 30 30 2A 30 2A' - '2A 30 2A 2A 2A 2A 2B 2A 2A 29 2A 29 2A 29 29 29' - '29 29 29 29 29 22 29 22 22 2A 21 32 32 32 32 32' - '20 31 31 31 31 31 31 31 31 31 31 31 30 31 31 31' - '2E 2F 31 30 30 31 2F 30 30 31 2A 2C 2D 31 30 30' - '30 30 30 2A 2E 2C 2A 29 29 29 21 32 32 32 32 32' - '1F 31 31 31 2A 1B 1C 1B 1B 1B 23 1B 24 27 1B 26' - '1E 24 1E 26 24 1D 24 27 1E 23 27 24 1E 23 1C 1D' - '23 1B 1B 1C 1B 1B 2A 29 22 2A 21 32 32 32 32 32' - '1F 31 31 31 29 11 0E 11 11 17 11 17 17 11 1C 11' - '1B 18 1B 1C 17 1C 1B 17 15 17 11 1B 11 17 11 11' - '10 11 11 0E 10 0B 2B 29 29 29 21 32 32 32 32 32' - '1F 31 31 31 2A 11 11 11 11 11 17 11 11 1B 17 1C' - '17 1B 14 17 1C 14 18 1B 17 17 1C 11 17 11 17 11' - '11 0F 11 10 0B 10 29 29 29 29 21 32 32 32 32 32' - '1F 31 31 31 2A 0F 10 11 11 11 11 17 11 11 17 11' - '1C 17 17 1C 17 17 1B 12 1B 11 17 1B 11 17 11 11' - '11 11 10 0B 10 11 26 29 29 2A 21 32 32 32 32 32' - '1F 31 31 31 29 10 0F 11 10 11 17 11 11 17 11 1B' - '17 11 1C 11 17 1B 12 1B 11 1B 11 11 17 11 11 11' - '11 10 0F 11 10 0A 2B 29 29 2A 21 32 32 32 32 32' - '1F 31 31 31 2A 11 10 0B 11 11 11 11 17 11 17 11' - '11 1B 11 17 14 11 17 11 17 11 17 11 11 11 11 10' - '11 0F 10 0A 0D 0E 29 2A 29 29 21 32 32 32 32 32' - '1F 31 31 31 2D 10 0B 10 0F 10 11 0E 11 11 11 11' - '17 11 17 11 11 17 11 17 11 17 11 0F 10 11 11 11' - '0E 11 0C 11 0E 0C 2B 29 29 2A 21 32 32 32 32 32' - '1F 31 31 31 2B 0F 10 11 0C 0F 11 11 11 11 11 11' - '11 17 11 11 17 11 17 11 11 11 11 11 11 11 0E 11' - '0D 0E 11 0A 10 0A 29 2A 29 2A 21 32 32 32 32 32' - '1F 31 31 31 29 0F 0C 0B 0E 11 0C 11 10 0F 11 11' - '11 0E 11 17 11 11 11 0F 11 11 10 11 0F 10 11 11' - '0E 10 0A 10 0A 0A 2B 2A 29 2A 21 32 32 32 32 32' - '1F 31 31 31 29 10 0A 10 0C 0F 11 0E 11 10 11 0E' - '11 11 11 10 0F 11 10 11 10 0F 11 11 10 0B 10 0A' - '0B 03 0A 0A 0C 0E 29 2A 2A 2A 20 32 32 32 32 32' - '1F 31 31 31 2A 0A 0E 0C 0F 10 0A 10 0F 0D 0E 11' - '11 11 11 11 11 11 11 11 11 11 11 10 0F 10 0A 1F' - '22 2A 25 0B 0A 0A 27 2A 29 2A 21 32 32 32 32 32' - '08 31 31 31 29 0B 0C 0E 0A 0C 11 0A 10 11 11 11' - '11 17 11 11 17 11 11 17 11 11 11 11 11 11 04 30' - '31 30 29 07 0A 0A 29 2A 29 30 20 32 32 32 32 32' - '1F 31 31 31 29 10 0A 0A 0C 0F 0A 11 11 17 11 11' - '11 11 17 11 11 17 11 11 11 17 11 11 11 10 13 30' - '29 20 30 08 0A 0A 2B 2A 2A 2A 20 32 32 32 32 32' - '1F 31 31 31 29 0A 0A 0C 0E 0C 17 11 11 11 17 11' - '17 11 11 17 15 11 17 11 1B 11 11 17 11 11 0F 29' - '31 30 31 08 02 10 22 30 29 30 20 32 32 32 32 32' - '08 31 31 31 26 0F 0C 0A 11 17 11 11 11 17 11 1B' - '11 17 17 14 17 17 14 17 11 17 17 11 17 11 0F 07' - '2A 31 21 03 0C 0A 2B 2A 2A 2A 21 32 32 32 32 32' - '1F 31 31 31 29 0A 0E 11 11 11 11 17 11 11 17 11' - '1C 11 1B 18 11 1B 18 14 17 14 17 11 14 17 11 0F' - '0F 04 03 10 0B 0A 26 30 2A 2A 20 32 32 32 32 32' - '08 31 31 31 29 0A 10 11 11 11 17 11 17 1B 12 1B' - '11 1C 17 1B 1B 17 1B 18 1B 17 15 17 17 12 17 11' - '11 0F 11 11 10 0A 2B 30 2A 30 20 32 32 32 32 32' - '08 31 31 31 22 0F 11 11 17 11 11 1B 12 17 1B 17' - '1B 17 1C 18 1B 1C 17 1B 1C 17 17 15 17 17 13 13' - '1A 1B 13 0F 11 10 29 2A 2A 30 20 32 32 32 32 32' - '08 31 31 31 22 11 11 11 11 1B 17 11 1B 12 1B 1C' - '17 1C 17 1B 1C 17 1B 1C 17 1C 1B 17 1B 11 23 20' - '21 1F 28 13 0F 10 29 30 2A 30 20 32 32 32 32 32' - '08 31 31 31 22 10 11 17 11 11 1C 17 17 1B 18 1B' - '1C 1B 1C 1B 1C 1C 1B 1B 1C 17 1C 1B 17 14 1A 29' - '2A 2A 22 13 10 0F 2B 30 2A 30 20 32 32 32 32 32' - '08 31 31 31 22 0F 11 11 1B 17 11 17 1B 1C 1B 18' - '1B 1E 1C 1B 1E 1B 1E 1C 1B 1C 1B 18 1B 18 1A 29' - '2A 29 29 1A 11 11 26 31 31 30 20 32 32 32 32 32' - '08 31 31 31 22 0D 17 11 11 1C 17 15 17 1B 1B 1C' - '1B 1C 1D 1C 1B 1E 1B 1C 1E 1B 1C 1B 1C 17 1B 29' - '2A 2A 2A 13 10 11 2B 2F 30 31 20 32 32 32 32 32' - '08 31 31 31 22 0E 11 14 17 11 1B 17 1B 1C 19 1B' - '1C 1D 1C 1C 1E 24 1E 1E 1B 1C 1D 1C 17 1C 13 20' - '29 22 21 0F 11 0C 29 31 31 31 20 32 32 32 32 32' - '08 31 31 31 21 0A 0C 17 17 17 15 17 18 1B 1C 1C' - '1E 1C 1E 1E 24 1E 1C 1C 1E 1C 1C 17 1C 17 18 11' - '16 11 0F 11 10 0A 2B 31 30 31 1F 32 32 32 32 32' - '07 31 31 31 22 1B 20 1B 23 23 1B 26 23 26 23 26' - '23 26 26 23 26 26 26 26 26 23 26 23 26 23 26 23' - '1B 23 1B 23 1F 1A 2A 31 31 31 20 32 32 32 32 32' - '08 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31' - '31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31' - '31 31 31 31 31 31 31 31 31 31 1F 32 32 32 32 32' - '05 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31' - '31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31' - '31 31 31 31 31 31 31 31 31 30 08 32 32 32 32 32' - '01 20 31 31 31 31 31 31 31 31 31 31 31 31 31 31' - '31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31' - '31 31 31 31 31 31 31 31 31 21 01 32 32 32 32 32' - '32 01 07 21 29 22 22 22 22 22 22 22 22 22 22 22' - '22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22' - '22 22 22 22 22 22 22 22 08 01 32 32 32 00 00 32' - '32 32 32 32 01 01 01 01 01 01 01 01 01 01 01 01' - '01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01' - '01 01 01 01 01 01 01 01 32 32 32 32 00 00 00 00' - '32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32' - '32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32' - '32 32 32 32 32 32 32 32 32 32 32 00 00 00 00 00' - '00 00 32 32 32 32 32 32 32 32 32 32 32 32 32 32' - '32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32' - '32 32 32 32 32 32 32 32 32 32 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF' - 'FF FF FF FF 00 00 FF FF FF FF FF FF 00 00 FF FF' - 'FF FF FF FF 00 00 FF FF FF FF FF FF 00 00 F0 00' - '00 00 00 0F 00 00 C0 00 00 00 00 03 00 00 80 00' - '00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 01 00 00 80 00 00 00 00 03 00 00 C0 00' - '00 00 00 07 00 00 F0 00 00 00 00 0F 00 00 FF FF' - 'FF FF FF FF 00 00 FF FF FF FF FF FF 00 00 FF FF' - 'FF FF FF FF 00 00 FF FF FF FF FF FF 00 00 28 00' - '00 00 30 00 00 00 60 00 00 00 01 00 20 00 00 00' - '00 00 00 24 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 17 00 00 00 32 00 00' - '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' - '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' - '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' - '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' - '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' - '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' - '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' - '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' - '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' - '00 28 00 00 00 0C 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 19 00 00 00 75 00 00 00 C8 00 00 00 F4 00 00' - '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' - '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' - '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' - '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' - '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' - '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' - '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' - '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' - '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F6 00 00' - '00 D6 00 00 00 90 00 00 00 3F 00 00 00 08 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 1E 00 00' - '00 C7 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 E3 00 00 00 4A 00 00' - '00 06 00 00 00 00 00 00 00 04 00 00 00 B0 00 00' - '00 FF 05 05 05 FF 47 47 47 FF 83 83 83 FF 90 90' - '90 FF 8E 8E 8E FF 8E 8E 8E FF 8E 8E 8E FF 8D 8D' - '8D FF 8D 8D 8D FF 8D 8D 8D FF 8D 8D 8D FF 8C 8C' - '8C FF 8C 8C 8C FF 8C 8C 8C FF 8B 8B 8B FF 8B 8B' - '8B FF 8B 8B 8B FF 8B 8B 8B FF 8B 8B 8B FF 8A 8A' - '8A FF 8A 8A 8A FF 8A 8A 8A FF 89 89 89 FF 89 89' - '89 FF 89 89 89 FF 89 89 89 FF 89 89 89 FF 88 88' - '88 FF 88 88 88 FF 88 88 88 FF 87 87 87 FF 87 87' - '87 FF 87 87 87 FF 87 87 87 FF 87 87 87 FF 87 87' - '87 FF 86 86 86 FF 88 88 88 FF 83 83 83 FF 53 53' - '53 FF 0B 0B 0B FF 00 00 00 FF 00 00 00 D5 00 00' - '00 34 00 00 00 01 00 00 00 52 00 00 00 FF 06 06' - '06 FF 8B 8B 8B FF FB FB FB FF FF FF FF FF FE FE' - 'FE FF FC FC FC FF FA FA FA FF F9 F9 F9 FF F8 F8' - 'F8 FF F6 F6 F6 FF F5 F5 F5 FF F4 F4 F4 FF F2 F2' - 'F2 FF F1 F1 F1 FF F0 F0 F0 FF EE EE EE FF ED ED' - 'ED FF EB EB EB FF EA EA EA FF E9 E9 E9 FF E7 E7' - 'E7 FF E5 E5 E5 FF E5 E5 E5 FF E3 E3 E3 FF E1 E1' - 'E1 FF E0 E0 E0 FF DF DF DF FF DD DD DD FF DC DC' - 'DC FF DB DB DB FF D9 D9 D9 FF D8 D8 D8 FF D6 D6' - 'D6 FF D5 D5 D5 FF D3 D3 D3 FF D2 D2 D2 FF D1 D1' - 'D1 FF CF CF CF FF CD CD CD FF D1 D1 D1 FF EA EA' - 'EA FF 98 98 98 FF 0C 0C 0C FF 00 00 00 FF 00 00' - '00 8D 00 00 00 0A 00 00 00 C3 00 00 00 FF 49 49' - '49 FF FA FA FA FF FE FE FE FF F7 F7 F7 FF F7 F7' - 'F7 FF F5 F5 F5 FF F3 F3 F3 FF F2 F2 F2 FF F0 F0' - 'F0 FF EF EF EF FF EE EE EE FF EC EC EC FF EA EA' - 'EA FF E9 E9 E9 FF E8 E8 E8 FF E6 E6 E6 FF E5 E5' - 'E5 FF E3 E3 E3 FF E2 E2 E2 FF E1 E1 E1 FF DF DF' - 'DF FF DD DD DD FF DC DC DC FF DA DA DA FF D9 D9' - 'D9 FF D8 D8 D8 FF D6 D6 D6 FF D4 D4 D4 FF D3 D3' - 'D3 FF D2 D2 D2 FF D0 D0 D0 FF CF CF CF FF CD CD' - 'CD FF CC CC CC FF CB CB CB FF C9 C9 C9 FF C7 C7' - 'C7 FF C6 C6 C6 FF C5 C5 C5 FF C2 C2 C2 FF C2 C2' - 'C2 FF E6 E6 E6 FF 73 73 73 FF 00 00 00 FF 00 00' - '00 D4 00 00 00 27 00 00 00 F3 00 00 00 FF 84 84' - '84 FF FF FF FF FF FA FA FA FF F8 F8 F8 FF F7 F7' - 'F7 FF F6 F6 F7 FF F4 F5 F5 FF F3 F4 F4 FF F1 F2' - 'F3 FF EF F0 F1 FF EE EF F0 FF ED ED EE FF EA EB' - 'EC FF E9 EA EB FF E8 E8 E9 FF E6 E7 E7 FF E5 E6' - 'E6 FF E3 E4 E5 FF E1 E2 E3 FF E0 E1 E1 FF DF DF' - 'E0 FF DD DE DE FF DC DC DD FF DA DB DB FF D8 D9' - 'DA FF D7 D8 D9 FF D6 D6 D7 FF D4 D4 D5 FF D3 D3' - 'D4 FF D1 D2 D2 FF CF D0 D1 FF CE CF CF FF CD CD' - 'CE FF CB CC CC FF CA CB CB FF C8 C9 CA FF C6 C7' - 'C8 FF C5 C6 C7 FF C4 C4 C4 FF C5 C4 C4 FF C1 C1' - 'C1 FF D7 D7 D7 FF AD AD AD FF 00 00 00 FF 00 00' - '00 F9 00 00 00 38 00 00 00 F0 00 00 00 FF 8F 8F' - '8F FF FF FF FF FF FC FC FC FF FA FA FA FF FB FB' - 'FB FF FC FC FD FF FB FC FC FF FB FB FB FF FA FA' - 'FA FF F9 FA FA FF F9 F9 FA FF F8 F8 F9 FF F7 F8' - 'F8 FF F7 F7 F7 FF F6 F6 F6 FF F5 F5 F6 FF F4 F5' - 'F5 FF F4 F5 F5 FF F3 F4 F4 FF F3 F3 F3 FF F2 F2' - 'F3 FF F2 F2 F2 FF F1 F1 F2 FF F0 F1 F1 FF EF F0' - 'F0 FF EF EF F0 FF EE EF EF FF ED EE EE FF ED ED' - 'EE FF EC ED ED FF EB EC EC FF EB EB EC FF EA EB' - 'EB FF E9 EA EA FF E9 EA EA FF E8 E9 E9 FF E7 E8' - 'E8 FF E8 E8 E8 FF DE DE DE FF C6 C6 C6 FF C4 C4' - 'C4 FF D0 D0 D0 FF AD AD AD FF 00 00 00 FF 00 00' - '00 F7 00 00 00 37 00 00 00 F0 00 00 00 FF 8D 8D' - '8D FF FF FF FF FF FE FE FE FF FC FC FD FF E3 E1' - 'DF FF D3 99 70 FF D6 93 65 FF D9 99 6B FF DB 9D' - '6E FF DD A1 72 FF E0 A4 76 FF E1 A8 79 FF E4 AC' - '7D FF E6 AF 80 FF E8 B2 83 FF EA B4 85 FF EB B7' - '87 FF EC B9 89 FF ED BA 8B FF EE BB 8B FF EE BB' - '8B FF EE BB 8B FF ED BA 8B FF ED B9 89 FF EB B7' - '87 FF EA B5 86 FF E9 B2 83 FF E6 AF 81 FF E5 AC' - '7E FF E3 A9 7A FF E1 A5 76 FF DF A2 74 FF DD 9E' - '70 FF DB 9A 6C FF D8 97 69 FF D6 93 65 FF D3 8E' - '60 FF D3 8F 62 FF E6 D7 CD FF C9 CC CD FF C5 C5' - 'C5 FF D2 D2 D2 FF AA AA AA FF 00 00 00 FF 00 00' - '00 F7 00 00 00 37 00 00 00 F0 00 00 00 FF 8B 8B' - '8B FF FF FF FF FF FF FF FF FF FD FF FF FF D8 D3' - 'D1 FF BE 67 2C FF C1 5F 1B FF C5 67 25 FF C8 6C' - '29 FF CB 72 2F FF CE 77 34 FF D0 7C 38 FF D3 80' - '3D FF D6 85 41 FF D9 89 44 FF DB 8C 47 FF DD 8F' - '4B FF DE 91 4C FF DF 93 4E FF E0 95 50 FF E0 95' - '50 FF E0 94 50 FF DF 93 4E FF DE 91 4D FF DC 8F' - '49 FF DB 8B 47 FF D8 88 43 FF D5 84 40 FF D3 7F' - '3C FF D0 7B 37 FF CD 75 32 FF CA 70 2D FF C7 6C' - '29 FF C4 66 23 FF C0 60 1E FF BC 5B 1A FF B9 53' - '11 FF B9 54 13 FF DF C8 B9 FF CC CF D2 FF C6 C6' - 'C6 FF D3 D3 D3 FF AB AB AB FF 00 00 00 FF 00 00' - '00 F7 00 00 00 37 00 00 00 F0 00 00 00 FF 8B 8B' - '8B FF FF FF FF FF FF FF FF FF FE FF FF FF DA D5' - 'D3 FF BE 6A 32 FF C1 62 21 FF C5 6A 2B FF C7 6F' - '2F FF CA 74 34 FF CD 78 38 FF CF 7D 3C FF D2 81' - '40 FF D5 84 43 FF D7 88 47 FF D8 8B 4A FF DA 8E' - '4C FF DC 90 4E FF DD 92 50 FF DD 92 51 FF DD 92' - '51 FF DD 92 50 FF DD 91 4F FF DB 8F 4E FF DA 8D' - '4B FF D9 8A 49 FF D6 87 46 FF D4 83 42 FF D2 80' - '3F FF CF 7C 3B FF CC 77 37 FF CA 73 32 FF C7 6E' - '2E FF C3 68 29 FF C1 64 24 FF BD 5F 20 FF B9 57' - '18 FF BA 57 1A FF E0 C9 BB FF CD D1 D3 FF C7 C7' - 'C7 FF D5 D5 D5 FF AA AA AA FF 00 00 00 FF 00 00' - '00 F7 00 00 00 37 00 00 00 F0 00 00 00 FF 8A 8A' - '8A FF FF FF FF FF FF FF FF FF FF FF FF FF DA D6' - 'D3 FF BC 68 30 FF BF 5F 1E FF C3 66 27 FF C5 6B' - '2C FF C8 70 30 FF CB 74 34 FF CD 78 38 FF D0 7C' - '3B FF D2 80 3F FF D4 83 42 FF D6 85 44 FF D7 88' - '47 FF D8 8A 48 FF D9 8B 4A FF DA 8C 4B FF DA 8C' - '4B FF D9 8C 4B FF D9 8B 4A FF D8 8A 48 FF D6 87' - '46 FF D5 85 44 FF D4 82 41 FF D1 7E 3E FF D0 7B' - '3B FF CD 77 37 FF CA 73 33 FF C8 6E 2F FF C5 6A' - '2B FF C2 65 26 FF BF 60 21 FF BC 5B 1C FF B7 53' - '15 FF B8 55 18 FF E0 C9 BB FF CE D2 D4 FF C9 C9' - 'C9 FF D6 D6 D6 FF AA AA AA FF 00 00 00 FF 00 00' - '00 F7 00 00 00 37 00 00 00 F0 00 00 00 FF 8A 8A' - '8A FF FF FF FF FF FF FF FF FF FF FF FF FF DA D6' - 'D3 FF BA 65 2D FF BD 5B 1B FF C0 63 24 FF C2 67' - '28 FF C5 6C 2C FF C8 70 30 FF CA 73 34 FF CD 77' - '37 FF CF 7B 3A FF D1 7D 3D FF D2 80 3F FF D4 83' - '42 FF D5 84 43 FF D6 86 45 FF D6 86 45 FF D6 86' - '45 FF D6 86 45 FF D5 85 44 FF D5 84 43 FF D3 82' - '41 FF D2 80 3F FF D1 7D 3C FF CF 7A 39 FF CD 76' - '36 FF CA 73 33 FF C7 6F 2F FF C5 6A 2B FF C2 66' - '27 FF BF 61 22 FF BC 5D 1E FF B9 58 19 FF B5 50' - '12 FF B6 52 15 FF E0 C9 BB FF D0 D4 D6 FF CB CB' - 'CB FF D7 D7 D7 FF A9 A9 A9 FF 00 00 00 FF 00 00' - '00 F7 00 00 00 37 00 00 00 F0 00 00 00 FF 89 89' - '89 FF FF FF FF FF FF FF FF FF FF FF FF FF DA D6' - 'D3 FF B8 62 2A FF BA 57 17 FF BE 5E 20 FF C0 63' - '24 FF C3 67 28 FF C6 6B 2C FF C8 6F 2F FF CA 72' - '32 FF CC 76 35 FF CD 78 38 FF CF 7B 3A FF D0 7D' - '3C FF D1 7E 3D FF D2 80 3F FF D2 80 3F FF D2 80' - '3F FF D2 80 3F FF D2 7F 3E FF D1 7E 3E FF CF 7C' - '3C FF CE 7A 3A FF CD 77 37 FF CB 74 34 FF CA 71' - '32 FF C7 6E 2E FF C5 6A 2B FF C3 66 27 FF C0 62' - '23 FF BD 5D 1F FF BB 59 1A FF B7 54 16 FF B3 4D' - '0F FF B5 4E 11 FF E0 C9 BA FF D1 D5 D7 FF CC CC' - 'CC FF D8 D8 D8 FF A8 A8 A8 FF 00 00 00 FF 00 00' - '00 F7 00 00 00 37 00 00 00 F0 00 00 00 FF 88 88' - '88 FF FF FF FF FF FF FF FF FF FF FF FF FF DA D5' - 'D3 FF B6 5E 27 FF B7 53 13 FF BB 5A 1C FF BD 5F' - '20 FF C0 63 24 FF C3 66 27 FF C5 6A 2A FF C7 6D' - '2E FF C9 71 31 FF CA 73 33 FF CC 75 35 FF CD 77' - '37 FF CE 79 38 FF CF 7A 3A FF CF 7B 3A FF CF 7B' - '3A FF CF 7A 3A FF CE 7A 39 FF CE 78 38 FF CC 77' - '36 FF CB 75 35 FF CA 72 32 FF C8 6F 2F FF C7 6D' - '2E FF C4 69 2A FF C2 65 26 FF C0 62 23 FF BD 5E' - '1F FF BA 59 1B FF B8 55 17 FF B5 51 13 FF B1 4A' - '0B FF B2 4B 0E FF E0 C8 BA FF D2 D6 D8 FF CD CD' - 'CD FF D9 D9 D9 FF A7 A7 A7 FF 00 00 00 FF 00 00' - '00 F7 00 00 00 37 00 00 00 F0 00 00 00 FF 87 87' - '87 FF FF FF FF FF FF FF FF FF FF FF FF FF D8 D4' - 'D1 FF B4 5A 23 FF B5 4E 0F FF B9 56 18 FF BB 5A' - '1B FF BD 5E 1F FF C0 62 23 FF C2 65 25 FF C3 68' - '29 FF C6 6B 2C FF C7 6D 2E FF C8 70 30 FF C9 71' - '31 FF CA 73 32 FF CB 74 34 FF CB 75 34 FF CB 75' - '34 FF CB 74 34 FF CB 74 33 FF CA 72 32 FF C9 71' - '31 FF C8 6F 2F FF C6 6D 2D FF C5 6A 2A FF C3 67' - '28 FF C1 64 25 FF BE 60 22 FF BD 5D 1E FF BA 59' - '1A FF B8 55 17 FF B6 51 13 FF B3 4C 0F FF AF 46' - '07 FF AF 47 0A FF DF C7 BA FF D4 D8 DB FF CF CF' - 'CF FF DB DB DB FF A6 A6 A6 FF 00 00 00 FF 00 00' - '00 F7 00 00 00 37 00 00 00 F0 00 00 00 FF 86 86' - '86 FF FF FF FF FF FF FF FF FF FF FF FF FF D6 D1' - 'CE FF B1 55 1E FF B2 4A 0B FF B6 51 13 FF B7 54' - '16 FF BA 59 1A FF BC 5D 1E FF BE 60 20 FF BF 62' - '23 FF C2 65 26 FF C3 67 28 FF C4 69 2A FF C5 6B' - '2B FF C6 6C 2C FF C7 6D 2E FF C7 6E 2E FF C7 6E' - '2E FF C7 6E 2E FF C6 6D 2E FF C6 6C 2C FF C5 6A' - '2B FF C4 69 29 FF C3 67 28 FF C1 64 25 FF BF 62' - '23 FF BE 5F 20 FF BC 5C 1D FF BC 58 19 FF BD 54' - '12 FF BA 4F 0D FF B7 4C 0C FF B0 48 0A FF AC 41' - '03 FF AD 43 07 FF DF C7 BA FF D6 DA DC FF D0 D0' - 'D0 FF DC DC DC FF A5 A5 A5 FF 00 00 00 FF 00 00' - '00 F7 00 00 00 37 00 00 00 F0 00 00 00 FF 85 85' - '85 FF FF FF FF FF FF FF FF FF FF FF FF FF D4 CF' - 'CC FF AE 51 1A FF B0 45 06 FF B3 4D 0F FF B4 50' - '12 FF B7 54 16 FF B9 58 19 FF BB 5A 1C FF BC 5D' - '1F FF BE 60 21 FF BF 62 23 FF C0 63 24 FF C1 65' - '25 FF C3 66 26 FF C3 68 28 FF C3 68 29 FF C3 68' - '29 FF C3 68 29 FF C3 67 28 FF C3 66 27 FF C1 65' - '25 FF C0 63 23 FF BF 61 22 FF BD 5E 1F FF BC 5D' - '1E FF BA 5A 1B FF BB 56 17 FF A5 46 0C FF 7D 43' - '1F FF 77 46 27 FF 8D 3B 0B FF AE 41 02 FF AB 3E' - '00 FF AC 42 06 FF E0 C8 BA FF D7 DB DD FF D2 D2' - 'D2 FF DD DD DD FF A3 A3 A3 FF 00 00 00 FF 00 00' - '00 F7 00 00 00 37 00 00 00 F0 00 00 00 FF 84 84' - '84 FF FF FF FF FF FF FF FF FF FF FF FF FF D1 CD' - 'CA FF AB 4D 16 FF AC 40 01 FF B0 48 0B FF B2 4C' - '0E FF B4 4F 11 FF B6 52 14 FF B7 54 16 FF B8 57' - '18 FF BA 58 1A FF BD 5D 1E FF C0 63 24 FF C3 67' - '27 FF C4 69 29 FF C5 6B 2B FF C5 6B 2C FF C6 6C' - '2C FF C6 6C 2C FF C5 6B 2C FF C5 6B 2B FF C4 69' - '29 FF C2 67 28 FF C1 64 25 FF BE 5F 20 FF BA 59' - '1A FF BA 53 13 FF 97 45 12 FF 9B 8E 85 FF C5 CB' - 'CF FF D3 DB E0 FF AC AD AD FF 83 44 21 FF A9 38' - '00 FF AC 42 06 FF E0 C8 BB FF D8 DC DE FF D3 D3' - 'D3 FF DF DF DF FF A3 A3 A3 FF 00 00 00 FF 00 00' - '00 F7 00 00 00 37 00 00 00 F0 00 00 00 FF 83 83' - '83 FF FF FF FF FF FF FF FF FF FF FF FF FF CF CA' - 'C7 FF A8 4A 14 FF A9 3C 00 FF AD 43 06 FF B0 47' - '09 FF B1 4A 0B FF B2 4B 0E FF B4 4F 11 FF B8 56' - '18 FF BF 62 22 FF C4 6A 2A FF C7 6E 2E FF C8 70' - '2F FF C9 70 30 FF CA 72 32 FF CA 72 32 FF CA 72' - '32 FF CA 72 32 FF CA 72 32 FF C9 71 31 FF C9 70' - '30 FF C8 6F 2F FF C7 6E 2E FF C5 6B 2C FF C3 67' - '28 FF C0 5B 18 FF 8D 5B 3C FF EA F2 F7 FF F6 F5' - 'F6 FF E6 E5 E4 FF CD D2 D4 FF 6C 64 5E FF 91 2D' - '00 FF AF 43 06 FF E1 C9 BB FF D9 DD E0 FF D4 D4' - 'D4 FF E0 E0 E0 FF A2 A2 A2 FF 00 00 00 FF 00 00' - '00 F7 00 00 00 37 00 00 00 F0 00 00 00 FF 82 82' - '82 FF FF FF FF FF FF FF FF FF FF FF FF FF CD C8' - 'C5 FF A8 4A 13 FF A9 3B 00 FF AA 3E 02 FF AA 3F' - '02 FF AD 44 07 FF B9 57 18 FF C1 64 24 FF C6 6C' - '2C FF C9 70 30 FF C9 72 32 FF CA 74 34 FF CC 75' - '35 FF CC 76 36 FF CD 78 37 FF CD 78 38 FF CE 79' - '38 FF CE 79 38 FF CD 78 38 FF CD 77 37 FF CC 76' - '36 FF CB 75 35 FF CA 73 33 FF C9 71 31 FF C8 6F' - '30 FF C3 66 24 FF 8C 6B 54 FF DC E2 E6 FF D1 CE' - 'CC FF B1 A5 9F FF E0 E2 E4 FF 7C 7E 80 FF 74 25' - '00 FF B2 44 05 FF E1 C9 BB FF DB DF E1 FF D5 D5' - 'D5 FF E1 E1 E1 FF A1 A1 A1 FF 00 00 00 FF 00 00' - '00 F7 00 00 00 37 00 00 00 F0 00 00 00 FF 81 81' - '81 FF FF FF FF FF FF FF FF FF FF FF FF FF CB C6' - 'C3 FF A8 49 13 FF A9 3B 00 FF A8 3C 00 FF AE 46' - '09 FF BC 5C 1E FF C7 6E 2E FF C9 70 30 FF CA 72' - '32 FF CB 75 35 FF CD 77 37 FF CE 7A 3A FF CF 7B' - '3B FF D0 7D 3C FF D1 7E 3E FF D1 7F 3E FF D2 7F' - '3E FF D2 7F 3E FF D1 7E 3E FF D1 7E 3D FF D0 7C' - '3C FF CF 7B 3B FF CE 79 39 FF CC 77 36 FF CC 75' - '34 FF CB 6F 2C FF 89 60 42 FF CA D0 D5 FF F2 F2' - 'F2 FF F2 F1 F0 FF FF FF FF FF 7C 72 6D FF 89 29' - '00 FF AF 43 06 FF E2 CA BC FF DD E1 E3 FF D7 D7' - 'D7 FF E2 E2 E2 FF A0 A0 A0 FF 00 00 00 FF 00 00' - '00 F7 00 00 00 37 00 00 00 F0 00 00 00 FF 80 80' - '80 FF FF FF FF FF FF FF FF FF FF FF FF FF C9 C4' - 'C1 FF A7 48 13 FF A7 39 00 FF B0 49 0B FF C3 68' - '28 FF C7 6F 2F FF C9 71 31 FF CA 74 34 FF CC 77' - '37 FF CE 7A 3A FF D0 7C 3C FF D1 7F 3E FF D2 81' - '40 FF D4 82 41 FF D5 84 43 FF D5 85 44 FF D5 85' - '44 FF D5 85 44 FF D5 84 43 FF D4 84 43 FF D3 82' - '41 FF D2 81 40 FF D1 7F 3E FF CF 7C 3B FF CE 7A' - '39 FF D1 79 37 FF A6 5D 27 FF 6A 65 62 FF E0 E6' - 'EB FF F5 FA FE FF A6 AE B3 FF 79 3C 18 FF AC 39' - '00 FF AC 42 06 FF E2 CA BC FF DE E2 E4 FF D8 D8' - 'D8 FF E4 E4 E4 FF 9E 9E 9E FF 00 00 00 FF 00 00' - '00 F7 00 00 00 37 00 00 00 F0 00 00 00 FF 7E 7E' - '7E FF FF FF FF FF FF FF FF FF FF FF FF FF C7 C2' - 'C0 FF A5 46 11 FF AE 42 05 FF C2 67 27 FF C7 6E' - '2F FF C9 71 31 FF CB 75 35 FF CD 78 38 FF D0 7C' - '3B FF D2 7F 3F FF D3 82 41 FF D4 84 43 FF D6 86' - '46 FF D7 88 47 FF D8 89 48 FF D8 8A 49 FF D8 8B' - '49 FF D8 8B 49 FF D8 8A 49 FF D8 89 48 FF D6 87' - '47 FF D5 86 45 FF D4 84 43 FF D2 81 3F FF D1 7F' - '3D FF CF 7B 3B FF D2 79 37 FF 9C 56 23 FF 7A 59' - '40 FF 81 63 4D FF 74 41 1E FF B8 5B 1D FF B2 48' - '09 FF AB 41 04 FF E2 CA BC FF DF E3 E5 FF DA DA' - 'DA FF E5 E5 E5 FF 9E 9E 9E FF 00 00 00 FF 00 00' - '00 F7 00 00 00 37 00 00 00 F0 00 00 00 FF 7D 7D' - '7D FF FF FF FF FF FF FF FF FF FF FF FF FF C5 BF' - 'BD FF A7 48 12 FF BE 5D 1C FF C8 6F 2F FF C9 71' - '31 FF CC 75 35 FF CF 79 39 FF D0 7D 3D FF D3 81' - '40 FF D5 84 43 FF D7 87 46 FF D8 8A 49 FF DA 8C' - '4B FF DB 8E 4C FF DC 90 4E FF DC 91 4F FF DC 91' - '4F FF DC 91 4F FF DC 91 4F FF DB 8F 4D FF DA 8E' - '4C FF D9 8C 4A FF D8 89 48 FF D6 86 45 FF D5 83' - '42 FF D3 81 40 FF CF 7A 38 FF D0 76 32 FF C5 6A' - '26 FF BD 61 1E FF C8 66 22 FF C8 68 27 FF BE 5D' - '1E FF AC 43 07 FF E2 CA BC FF E0 E5 E7 FF DC DC' - 'DC FF E6 E6 E6 FF 9D 9D 9D FF 00 00 00 FF 00 00' - '00 F7 00 00 00 37 00 00 00 F0 00 00 00 FF 7B 7B' - '7B FF FF FF FF FF FF FF FF FF FF FF FF FF C1 BC' - 'B9 FF B2 5B 24 FF C7 6C 2A FF C9 70 31 FF CB 75' - '35 FF CE 79 39 FF D1 7E 3D FF D2 82 41 FF D5 85' - '44 FF D8 89 48 FF DA 8C 4B FF DC 8F 4D FF DD 92' - '50 FF DE 94 52 FF DF 96 54 FF E0 97 55 FF E0 97' - '55 FF E0 97 55 FF E0 97 54 FF DF 95 53 FF DE 94' - '52 FF DD 91 50 FF DA 8E 4D FF D9 8B 4A FF D8 88' - '47 FF D6 83 40 FF B2 7D 53 FF 96 7C 69 FF A3 86' - '70 FF AD 8E 79 FF 9A 8A 71 FF 8D 62 37 FF C3 63' - '22 FF B7 54 16 FF E2 CA BC FF E3 E6 E8 FF DD DD' - 'DD FF E7 E7 E7 FF 9B 9B 9B FF 00 00 00 FF 00 00' - '00 F7 00 00 00 37 00 00 00 F0 00 00 00 FF 7A 7A' - '7A FF FF FF FF FF FF FF FF FF FF FF FF FF C0 BA' - 'B8 FF B8 64 2D FF C9 6E 2D FF CA 74 33 FF CD 78' - '38 FF D0 7D 3C FF D3 81 40 FF D5 85 44 FF D8 89' - '48 FF DB 8D 4C FF DD 91 4F FF DF 94 52 FF E0 97' - '55 FF E1 99 57 FF E2 9B 58 FF E3 9C 5A FF E4 9D' - '5A FF E4 9D 5A FF E3 9C 5A FF E2 9B 59 FF E1 99' - '57 FF E0 96 55 FF DE 93 51 FF DC 90 4E FF DB 8D' - '4B FF D2 80 3C FF B2 96 7F FF 96 9F A6 FF A4 A8' - 'AB FF 86 8A 8E FF A9 B9 BC FF 86 78 65 FF B9 5C' - '1C FF C1 61 23 FF E3 CB BD FF E2 E6 E8 FF DE DE' - 'DE FF E8 E8 E8 FF 9A 9A 9A FF 00 00 00 FF 00 00' - '00 F7 00 00 00 37 00 00 00 F0 00 00 00 FF 78 78' - '78 FF FF FF FF FF FF FF FF FF FF FF FF FF BE B8' - 'B6 FF BA 68 30 FF CB 71 2F FF CD 76 36 FF CF 7B' - '3B FF D2 80 3F FF D5 85 44 FF D7 89 48 FF DA 8E' - '4C FF DD 92 50 FF DF 96 54 FF E1 99 57 FF E3 9C' - '5A FF E5 9E 5C FF E6 A1 5E FF E7 A2 60 FF E7 A3' - '60 FF E7 A3 60 FF E7 A2 5F FF E6 A1 5E FF E4 9E' - '5B FF E3 9C 59 FF E1 98 56 FF DE 95 53 FF DD 92' - '4F FF D5 85 41 FF A9 8A 71 FF C4 C9 CD FF DC DC' - 'DC FF D7 D7 D7 FF C5 C8 CC FF 90 75 64 FF BB 5F' - '1E FF C5 67 29 FF E7 D0 C2 FF EA EE F0 FF E5 E5' - 'E5 FF EB EB EB FF 99 99 99 FF 00 00 00 FF 00 00' - '00 F7 00 00 00 37 00 00 00 F0 00 00 00 FF 78 78' - '78 FF FF FF FF FF FF FF FF FF FF FF FF FF BA B5' - 'B2 FF B9 67 2F FF CD 74 32 FF CE 79 39 FF D1 7E' - '3E FF D4 83 42 FF D7 88 47 FF DA 8D 4B FF DD 91' - '4F FF E0 96 54 FF E1 9A 57 FF E4 9D 5B FF E6 A1' - '5E FF E8 A4 61 FF E9 A6 63 FF EA A8 65 FF EB A9' - '65 FF EB A9 65 FF EA A7 64 FF E9 A6 63 FF E7 A4' - '60 FF E6 A0 5E FF E4 9D 5A FF E1 99 57 FF DF 94' - '53 FF DF 8F 48 FF AF 89 69 FF C7 CC D0 FF D6 D6' - 'D6 FF D3 D3 D3 FF C8 CD D2 FF A0 7B 5F FF C6 68' - '24 FF C1 65 26 FF E9 D2 C4 FF F7 FB FD FF F4 F4' - 'F4 FF F6 F6 F6 FF 98 98 98 FF 00 00 00 FF 00 00' - '00 F7 00 00 00 37 00 00 00 F0 00 00 00 FF 76 76' - '76 FF FF FF FF FF FF FF FF FF FF FF FF FF B8 B2' - 'B0 FF B3 5C 25 FF CE 77 35 FF CF 7B 3B FF D2 80' - '40 FF D5 85 44 FF D9 8A 49 FF DB 8F 4D FF DF 95' - '53 FF E2 99 57 FF E3 9E 5B FF E6 A2 5F FF E9 A6' - '63 FF EB A9 65 FF ED AC 68 FF EE AE 6A FF EF AF' - '6B FF EF AF 6B FF EE AD 6A FF ED AB 68 FF EB A8' - '66 FF E8 A5 62 FF E6 A1 5E FF E3 9D 5A FF E1 98' - '56 FF E2 94 4E FF B4 87 5F FF D1 D5 D8 FF E2 E3' - 'E4 FF E0 E1 E2 FF CE D3 D8 FF AA 79 55 FF CD 6F' - '2A FF B9 58 1A FF E8 CF C2 FF F9 FD FF FF F7 F7' - 'F7 FF F8 F8 F8 FF 97 97 97 FF 00 00 00 FF 00 00' - '00 F7 00 00 00 37 00 00 00 F0 00 00 00 FF 75 75' - '75 FF FF FF FF FF FF FF FF FF FF FF FF FF B7 B1' - 'AF FF A5 47 10 FF C7 6A 28 FF D2 7F 3E FF D3 83' - '42 FF D7 88 47 FF DA 8D 4C FF DD 92 50 FF E0 98' - '56 FF E4 9C 5A FF E6 A1 5F FF E9 A6 63 FF EC AB' - '67 FF EE AE 6B FF F0 B1 6E FF F2 B4 71 FF F3 B5' - '72 FF F3 B5 71 FF F2 B4 70 FF F0 B1 6E FF ED AD' - '6A FF EB A9 66 FF E8 A5 62 FF E5 A0 5E FF E3 9B' - '59 FF E5 97 54 FF B9 81 50 FF A1 9D 9B FF BD BC' - 'BA FF BD BC BA FF A3 A1 A0 FF AD 70 42 FF C9 69' - '26 FF AD 43 06 FF E9 D0 C3 FF FB FE FF FF F8 F8' - 'F8 FF F9 F9 F9 FF 95 95 95 FF 00 00 00 FF 00 00' - '00 F7 00 00 00 37 00 00 00 F0 00 00 00 FF 74 74' - '74 FF FF FF FF FF FF FF FF FF FF FF FF FF B2 AD' - 'AB FF 9C 3C 06 FF AE 45 06 FF CF 79 35 FF D6 7F' - '3A FF D9 85 3F FF DC 8A 44 FF DF 90 4A FF E3 96' - '4F FF E7 9C 54 FF EA A1 5A FF ED A7 5F FF F1 AC' - '64 FF F3 B1 68 FF F6 B5 6D FF F8 B9 70 FF FA BB' - '72 FF F9 BA 72 FF F8 B8 6F FF F5 B5 6C FF F2 AF' - '68 FF F0 AA 63 FF ED A6 5D FF E9 A0 58 FF E6 9A' - '53 FF E3 95 4E FF DE 8E 48 FF C2 79 3B FF B7 70' - '36 FF B4 6B 31 FF B6 69 2C FF C9 71 2F FF B1 4C' - '0D FF A5 39 00 FF E9 D1 C3 FF FC FF FF FF FA FA' - 'FA FF FB FB FB FF 94 94 94 FF 00 00 00 FF 00 00' - '00 F7 00 00 00 37 00 00 00 F0 00 00 00 FF 73 73' - '73 FF FF FF FF FF FF FF FF FF FF FF FF FF C4 C3' - 'C2 FF AE 93 84 FF B1 93 83 FF C2 A0 86 FF CE A5' - '83 FF CE A7 87 FF D0 AA 89 FF D2 AD 8C FF D3 B0' - '8E FF D5 B2 91 FF D7 B5 93 FF D8 B8 96 FF DA BA' - '98 FF DB BC 9B FF DD BF 9D FF DE C1 9F FF DE C2' - 'A0 FF DE C2 A0 FF DE C0 9E FF DC BE 9C FF DB BC' - '9A FF DA B9 98 FF D8 B7 95 FF D6 B4 92 FF D4 B2' - '90 FF D2 AF 8E FF D2 AC 8B FF D3 AA 88 FF D2 A8' - '85 FF D0 A5 82 FF CE A2 7F FF C1 9E 84 FF B0 92' - '82 FF B2 94 83 FF EC E5 E1 FF FD FE FE FF FC FC' - 'FC FF FC FC FC FF 94 94 94 FF 00 00 00 FF 00 00' - '00 F7 00 00 00 37 00 00 00 F4 00 00 00 FF 72 72' - '72 FF FF FF FF FF FF FF FF FF FF FF FF FF FE FE' - 'FE FF FD FF FF FF FD FF FF FF FA FF FF FF F9 FF' - 'FF FF F9 FE FF FF F9 FE FF FF F9 FE FF FF F8 FD' - 'FF FF F8 FD FF FF F8 FD FF FF F8 FC FF FF F7 FC' - 'FF FF F7 FC FF FF F7 FB FF FF F7 FB FF FF F7 FB' - 'FF FF F7 FB FF FF F7 FB FF FF F7 FB FF FF F7 FC' - 'FF FF F7 FC FF FF F8 FC FF FF F7 FC FF FF F7 FC' - 'FF FF F7 FC FF FF F8 FD FF FF F7 FD FF FF F7 FD' - 'FF FF F7 FD FF FF F7 FD FF FF F8 FD FF FF FA FF' - 'FF FF FA FF FF FF FC FD FD FF FB FB FB FF FD FD' - 'FD FF FB FB FB FF 93 93 93 FF 00 00 00 FF 00 00' - '00 FA 00 00 00 37 00 00 00 DD 00 00 00 FF 4B 4B' - '4B FF F5 F5 F5 FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FE FE FE FF FE FE FE FF FD FD FD FF FF FF' - 'FF FF F0 F0 F0 FF 6D 6D 6D FF 00 00 00 FF 00 00' - '00 E7 00 00 00 27 00 00 00 7A 00 00 00 FF 0E 0E' - '0E FF 9A 9A 9A FF FD FD FD FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF F8 F8' - 'F8 FF A4 A4 A4 FF 1B 1B 1B FF 00 00 00 FF 00 00' - '00 9B 00 00 00 04 00 00 00 0F 00 00 00 D8 00 00' - '00 FF 14 14 14 FF 6E 6E 6E FF AC AC AC FF B9 B9' - 'B9 FF B8 B8 B8 FF B8 B8 B8 FF B8 B8 B8 FF B8 B8' - 'B8 FF B8 B8 B8 FF B8 B8 B8 FF B8 B8 B8 FF B8 B8' - 'B8 FF B8 B8 B8 FF B8 B8 B8 FF B8 B8 B8 FF B8 B8' - 'B8 FF B8 B8 B8 FF B8 B8 B8 FF B8 B8 B8 FF B8 B8' - 'B8 FF B8 B8 B8 FF B8 B8 B8 FF B8 B8 B8 FF B8 B8' - 'B8 FF B8 B8 B8 FF B8 B8 B8 FF B8 B8 B8 FF B7 B7' - 'B7 FF B7 B7 B7 FF B7 B7 B7 FF B6 B6 B6 FF B6 B6' - 'B6 FF B6 B6 B6 FF B5 B5 B5 FF B5 B5 B5 FF B5 B5' - 'B5 FF B4 B4 B4 FF B5 B5 B5 FF AB AB AB FF 76 76' - '76 FF 1D 1D 1D FF 00 00 00 FF 00 00 00 FA 00 00' - '00 3C 00 00 00 00 00 00 00 00 00 00 00 52 00 00' - '00 F6 00 00 00 FF 00 00 00 FF 0C 0C 0C FF 16 16' - '16 FF 15 15 15 FF 15 15 15 FF 15 15 15 FF 15 15' - '15 FF 15 15 15 FF 15 15 15 FF 15 15 15 FF 15 15' - '15 FF 15 15 15 FF 15 15 15 FF 15 15 15 FF 15 15' - '15 FF 15 15 15 FF 15 15 15 FF 15 15 15 FF 15 15' - '15 FF 15 15 15 FF 15 15 15 FF 15 15 15 FF 15 15' - '15 FF 15 15 15 FF 15 15 15 FF 15 15 15 FF 15 15' - '15 FF 15 15 15 FF 15 15 15 FF 15 15 15 FF 15 15' - '15 FF 15 15 15 FF 15 15 15 FF 15 15 15 FF 15 15' - '15 FF 15 15 15 FF 16 16 16 FF 10 10 10 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 6F 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 39 00 00 00 B0 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' - '00 FF 00 00 00 C1 00 00 00 51 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 49 00 00 00 80 00 00' - '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' - '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' - '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' - '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' - '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' - '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' - '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' - '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' - '00 84 00 00 00 84 00 00 00 84 00 00 00 82 00 00' - '00 57 00 00 00 0B 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 FF FF FF FF FF FF 00 00 FF FF' - 'FF FF FF FF 00 00 FF FF FF FF FF FF 00 00 FF FF' - 'FF FF FF FF 00 00 F0 00 00 00 00 0F 00 00 C0 00' - '00 00 00 03 00 00 80 00 00 00 00 01 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 01 00 00 80 00' - '00 00 00 03 00 00 C0 00 00 00 00 07 00 00 F0 00' - '00 00 00 0F 00 00 FF FF FF FF FF FF 00 00 FF FF' - 'FF FF FF FF 00 00 FF FF FF FF FF FF 00 00 FF FF' - 'FF FF FF FF 00 00 28 00 00 00 30 00 00 00 60 00' - '00 00 01 00 04 00 00 00 00 00 80 04 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 80 00 00 00 00 80 00 00 80 80 00 00 00 00' - '80 00 80 00 80 00 00 80 80 00 C0 C0 C0 00 80 80' - '80 00 FF 00 00 00 00 FF 00 00 FF FF 00 00 00 00' - 'FF 00 FF 00 FF 00 00 FF FF 00 FF FF FF 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 88 88 88 88 88 88 88 88' - '88 88 88 88 88 88 88 88 88 88 88 80 00 00 00 08' - 'FF FF FF FF FF FF FF FF FF FF FF FF 77 77 77 77' - '77 77 77 F8 00 00 00 8F FF FF FF FF FF FF FF FF' - 'FF 77 77 77 77 77 77 77 77 77 77 7F 80 00 00 8F' - 'FF FF FF FF FF FF FF FF FF 77 77 77 77 77 77 77' - '77 77 77 77 70 00 00 8F FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF 77 77 70 00 00 8F' - 'FF F8 88 87 77 77 77 77 77 77 77 77 77 77 77 88' - '88 88 77 77 70 00 00 8F FF 73 33 33 33 38 88 88' - '88 88 88 88 83 33 33 33 33 33 77 77 70 00 00 8F' - 'FF 73 33 33 33 38 88 88 88 88 88 88 88 33 33 33' - '33 33 77 77 70 00 00 8F FF 73 33 33 33 33 88 88' - '88 88 88 88 83 33 33 33 33 33 77 77 70 00 00 8F' - 'FF 73 33 33 33 33 33 88 88 88 88 83 33 33 33 33' - '33 33 77 77 70 00 00 8F FF 73 33 33 33 33 33 33' - '33 33 33 33 33 33 33 33 33 33 77 77 70 00 00 8F' - 'FF 73 33 33 33 33 33 33 33 33 33 33 33 33 33 33' - '33 33 77 77 70 00 00 8F FF 73 33 33 33 33 33 33' - '33 33 33 33 33 33 33 33 33 33 77 77 70 00 00 8F' - 'FF 73 33 33 33 33 33 33 33 33 33 33 33 33 33 33' - '33 33 77 77 70 00 00 8F FF 73 33 33 33 33 33 33' - '33 33 33 33 33 33 33 33 13 13 77 77 70 00 00 8F' - 'FF 73 13 33 33 33 33 33 33 33 33 33 33 33 38 77' - '73 13 77 77 70 00 00 8F FF 73 13 33 33 33 33 33' - '33 33 33 33 33 33 3F FF 78 13 77 7F 70 00 00 8F' - 'FF 73 11 13 33 33 33 33 33 33 33 33 33 33 8F 77' - 'F8 13 77 7F 70 00 00 8F FF 73 11 33 33 33 33 33' - '33 33 33 33 33 33 87 FF F8 13 7F 7F 70 00 00 8F' - 'FF 73 13 33 33 33 33 38 88 88 88 83 33 33 38 FF' - '71 13 7F 7F 80 00 00 8F FF 73 33 33 33 33 88 88' - '88 88 88 88 83 33 33 38 33 33 7F 7F 80 00 00 8F' - 'FF 73 33 33 33 38 88 88 88 88 88 88 88 83 33 33' - '33 33 7F 7F 80 00 00 8F FF 73 33 33 38 88 88 88' - '88 88 88 88 88 83 88 88 83 33 7F 7F 80 00 00 8F' - 'FF 73 33 33 38 88 88 88 88 88 88 88 88 83 88 78' - '78 33 7F 7F 80 00 00 8F FF 73 33 33 88 88 88 88' - '77 77 77 88 88 88 87 77 78 33 7F FF 80 00 00 8F' - 'FF 73 33 38 88 88 88 77 77 77 77 77 88 88 87 77' - '78 33 7F FF 80 00 00 8F FF 73 33 38 88 88 87 77' - '77 77 77 77 78 88 87 FF 78 33 7F FF 80 00 00 8F' - 'FF 73 33 88 88 88 77 77 77 77 77 77 77 88 88 77' - '78 33 7F FF 80 00 00 8F FF 71 33 33 88 88 77 77' - '77 77 77 77 77 88 83 33 33 31 7F FF 80 00 00 8F' - 'FF 78 87 77 77 77 77 77 77 77 77 77 77 77 77 77' - '77 88 FF FF 80 00 00 8F FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF FF 80 00 00 8F' - 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' - 'FF FF FF FF 80 00 00 08 FF FF FF FF FF FF FF FF' - 'FF FF FF FF FF FF FF FF FF FF FF F7 00 00 00 00' - '87 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77' - '77 77 77 80 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' - '00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF' - 'FF FF FF FF 00 00 FF FF FF FF FF FF 00 00 FF FF' - 'FF FF FF FF 00 00 FF FF FF FF FF FF 00 00 FF FF' - 'FF FF FF FF 00 00 E0 00 00 00 00 0F 00 00 C0 00' - '00 00 00 07 00 00 80 00 00 00 00 03 00 00 80 00' - '00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00' - '00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00' - '00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00' - '00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00' - '00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00' - '00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00' - '00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00' - '00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00' - '00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00' - '00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00' - '00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00' - '00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00' - '00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00' - '00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00' - '00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00' - '00 00 00 01 00 00 00 00 00 00 00 01 00 00 80 00' - '00 00 00 03 00 00 C0 00 00 00 00 03 00 00 E0 00' - '00 00 00 0F 00 00 F8 00 00 00 00 3F 00 00 FF FF' - 'FF FF FF FF 00 00 FF FF FF FF FF FF 00 00 FF FF' - 'FF FF FF FF 00 00 FF FF FF FF FF FF 00 00' -} */ - - - - -/*--------------------- END FIXME ------------------------*/ - -/* - * Everything that does not depend on language, - * like textless bitmaps etc, go into the - * neutral language. This will prevent them from - * being duplicated for each language. - */ -#include "shell32_xx.rc" - -/* - * Everything specific to any language goes - * in one of the specific files. - * Note that you can and may override resources - * which also have a neutral version. This is to - * get localized bitmaps for example. - */ -#include "shell32_Ca.rc" -#include "shell32_Cn.rc" -#include "shell32_Cs.rc" -#include "shell32_Da.rc" -#include "shell32_De.rc" -#include "shell32_En.rc" -#include "shell32_Eo.rc" -#include "shell32_Es.rc" -#include "shell32_Fi.rc" -#include "shell32_Fr.rc" -#include "shell32_Hu.rc" -#include "shell32_It.rc" -#include "shell32_Ja.rc" -#include "shell32_Ko.rc" -#include "shell32_Nl.rc" -#include "shell32_No.rc" -#include "shell32_Pl.rc" -#include "shell32_Pt.rc" -#include "shell32_Ru.rc" -#include "shell32_Si.rc" -#include "shell32_Sk.rc" -#include "shell32_Sv.rc" -#include "shell32_Uk.rc" -#include "shell32_Wa.rc" -#include "shell32_Zh.rc" +/* + * Top level resource file for shell stuff + * + * Copyright 1998 Juergen Schmied + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "windef.h" +#include "winbase.h" +#include "winuser.h" +#include "winnls.h" +#include "wingdi.h" +#include "shlobj.h" +#include "shresdef.h" + +#include "version.rc" + +LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL + +shv_accel ACCELERATORS +BEGIN + VK_F5, FCIDM_SHVIEW_REFRESH, VIRTKEY +END + +/* BINRES document.ico */ +1 ICON document.ico +/* { + '00 00 01 00 08 00 20 20 00 00 01 00 08 00 A8 08' + '00 00 86 00 00 00 10 10 00 00 01 00 08 00 68 05' + '00 00 2E 09 00 00 20 20 00 00 01 00 04 00 E8 02' + '00 00 96 0E 00 00 10 10 00 00 01 00 04 00 28 01' + '00 00 7E 11 00 00 30 30 00 00 01 00 08 00 A8 0E' + '00 00 A6 12 00 00 30 30 00 00 01 00 20 00 A8 25' + '00 00 4E 21 00 00 20 20 00 00 01 00 20 00 A8 10' + '00 00 F6 46 00 00 10 10 00 00 01 00 20 00 68 04' + '00 00 9E 57 00 00 28 00 00 00 20 00 00 00 40 00' + '00 00 01 00 08 00 00 00 00 00 00 04 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 11 11 11 00 22 22 22 00 33 33 33 00 55 55' + '55 00 66 66 66 00 77 77 77 00 7F 7F 7F 00 88 88' + '88 00 99 99 99 00 AA AA AA 00 BB BB BB 00 CC CC' + 'CC 00 DD DD DD 00 EE EE EE 00 FF FF FF 00 00 00' + '00 00 33 00 32 00 5C 00 64 00 6F 00 63 00 75 00' + '6D 00 65 00 6E 00 74 00 2E 00 69 00 63 00 6F 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 C0 17 95 00 00 00 38 00 A8 44' + 'F9 77 13 00 00 00 18 0A 38 00 00 00 38 00 18 6C' + '38 00 98 17 95 00 00 00 00 00 E0 19 95 00 F0 88' + 'FA 77 70 38 F5 77 FF FF FF FF A8 44 F9 77 70 7D' + 'F5 77 3A 8A F5 77 86 00 00 00 86 00 00 00 08 00' + '00 00 B0 18 95 00 00 00 00 00 CB 44 F9 77 38 9F' + '07 00 CD 8B F5 77 78 13 05 00 37 90 F5 77 00 00' + '00 00 3E 8A F5 77 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 10 00' + '00 00 00 00 00 00 5A 00 5C 00 00 EC FD 7F 1A 02' + '00 00 4C 16 95 00 40 9F 07 00 FC 15 95 00 FF FF' + 'FF FF B4 1A 95 00 45 00 00 00 28 02 00 00 FF FF' + 'FF FF E2 D8 F5 77 7D 9B F5 77 94 B6 01 00 00 00' + '05 00 F4 17 95 00 80 00 10 C0 B4 1A 95 00 F0 88' + 'FA 77 88 1C F5 77 FF FF FF FF 37 90 F5 77 00 00' + '00 00 3E 8A F5 77 9B B2 E7 77 B7 00 00 00 02 00' + '00 00 A4 1A 95 00 01 00 00 00 18 00 00 00 00 00' + '00 00 10 19 95 00 42 00 00 00 00 00 00 00 F4 18' + '95 00 00 00 00 00 00 00 00 00 00 00 00 00 0C 00' + '00 00 02 00 00 00 01 01 F5 77 00 EC FD 7F 5A 00' + '00 00 00 00 00 00 03 00 00 00 62 00 1A 02 40 9F' + '07 00 00 00 00 00 40 9F 07 00 05 00 00 00 BE B3' + 'E7 77 4C 19 95 00 A3 B4 E7 77 F8 00 00 00 00 00' + '00 C0 00 00 00 00 00 00 00 00 02 00 00 00 80 00' + '00 00 00 00 00 00 8C 1A 95 00 7F E9 4B 00 08 6C' + '0C 01 00 00 00 C0 00 00 00 00 80 1A 95 00 02 00' + '00 00 80 00 00 00 00 00 00 00 C0 27 95 00 C4 F5' + 'AF 00 02 00 00 00 44 3A 5C 6F 73 65 78 70 65 72' + '74 73 5C 72 65 61 63 74 6F 73 5C 6C 69 62 5C 73' + '68 65 6C 6C 33 32 5C 64 6F 63 75 6D 65 6E 74 2E' + '69 63 6F 00 4B 00 14 1A 95 00 1F 3B D4 77 13 00' + '00 00 98 00 00 00 4F 3B D4 77 E0 19 95 00 33 3B' + 'D4 77 64 C5 F5 77 A9 F1 E7 77 F8 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 1A 95 00 18 6C' + '38 00 86 00 00 00 00 00 00 00 C9 F1 E7 77 86 00' + '00 00 A4 1A 95 00 08 00 00 00 00 00 00 00 86 00' + '00 00 86 00 00 00 08 00 00 00 F4 19 95 00 33 3B' + 'D4 77 B4 1A 95 00 09 48 E9 77 B8 10 E9 77 FF FF' + 'FF FF C9 F1 E7 77 16 EA 4B 00 F8 00 00 00 18 6C' + '38 00 86 00 00 00 58 1A 95 00 00 00 00 00 00 00' + '00 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10' + '10 10 10 00 00 00 00 00 00 00 00 00 00 00 00 00' + '10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10' + '10 10 10 10 00 00 00 00 00 00 00 00 00 00 00 00' + '10 01 08 09 09 09 09 09 09 08 09 09 08 09 09 08' + '06 03 10 10 10 00 00 00 00 00 00 00 00 00 00 00' + '10 02 0C 0E 0E 0E 0E 0E 0E 0E 0E 0E 0E 0E 0E 0F' + '0B 08 03 10 10 10 00 00 00 00 00 00 00 00 00 00' + '10 01 0C 0E 0D 0D 0D 0D 0D 0D 0D 0D 0D 0D 0D 0D' + '0A 0C 0A 02 10 10 10 00 00 00 00 00 00 00 00 00' + '10 02 0B 0E 0D 0D 0D 0D 0D 0D 0D 0D 0D 0D 0D 0E' + '0A 0D 0D 0A 02 10 10 10 00 00 00 00 00 00 00 00' + '10 01 0C 0E 0D 0D 0D 0D 0D 0D 0E 0D 0D 0E 0D 0D' + '0B 0D 0E 0E 0A 03 10 10 10 00 00 00 00 00 00 00' + '10 02 0C 0E 0D 0D 0D 0E 0D 0D 0D 0D 0E 0D 0E 0D' + '0A 0D 0F 0E 0E 09 02 10 10 00 00 00 00 00 00 00' + '10 01 0C 0E 0D 0E 0D 0D 0D 0E 0D 0E 0D 0D 0E 0D' + '0B 0D 0E 0F 0E 0F 0A 02 10 10 00 00 00 00 00 00' + '10 02 0C 0E 0D 0D 0E 0D 0E 0D 0D 0E 0E 0D 0D 0E' + '0A 0E 0F 0E 0F 0F 0F 0A 02 10 10 10 00 00 00 00' + '10 01 0C 0E 0D 0E 0E 0D 0D 0E 0E 0D 0D 0E 0E 0E' + '0A 0D 0E 0E 0E 0E 0E 0E 09 03 10 10 00 00 00 00' + '10 02 0C 0E 0E 0D 0D 0E 0E 0D 0E 0E 0E 0D 0E 0E' + '0C 0A 0B 0B 0B 0A 0B 0B 0B 06 10 10 00 00 00 00' + '10 01 0C 0F 0D 0E 0E 0D 0E 0E 0D 0E 0D 0E 0D 0E' + '0E 0E 0E 0E 0E 0E 0E 0E 0F 09 10 10 00 00 00 00' + '10 02 0C 0E 0E 0E 0E 0E 0D 0E 0E 0E 0E 0E 0E 0E' + '0E 0E 0E 0E 0E 0E 0E 0E 0E 08 10 10 00 00 00 00' + '10 01 0C 0F 0E 0E 0E 0E 0E 0E 0E 0E 0E 0E 0E 0E' + '0E 0E 0E 0E 0E 0E 0E 0E 0F 09 10 10 00 00 00 00' + '10 02 0C 0F 0E 0E 0E 0E 0E 0E 0E 0E 0E 0E 0E 0E' + '0E 0F 0E 0E 0E 0E 0E 0F 0E 09 10 10 00 00 00 00' + '10 01 0C 0F 0E 0E 0E 0E 0F 0E 0F 0E 0E 0E 0F 0E' + '0E 0E 0E 0E 0F 0E 0F 0E 0F 09 10 10 00 00 00 00' + '10 02 0C 0F 0E 0F 0E 0F 0E 0F 0E 0F 0F 0F 0E 0F' + '0F 0E 0F 0E 0E 0E 0E 0F 0F 08 10 10 00 00 00 00' + '10 02 0C 0F 0E 0E 0F 0E 0F 0E 0F 0F 0F 0E 0F 0F' + '0F 0F 0F 0F 0F 0F 0F 0E 0F 09 10 10 00 00 00 00' + '10 02 0C 0F 0F 0E 0E 0F 0E 0F 0E 0F 0E 0F 0F 0E' + '0F 0F 0F 0F 0F 0F 0F 0F 0F 09 10 10 00 00 00 00' + '10 02 0C 0F 0E 0F 0F 0E 0F 0F 0F 0F 0F 0F 0F 0F' + '0F 0F 0F 0F 0F 0F 0F 0F 0F 09 10 10 00 00 00 00' + '10 02 0C 0F 0F 0E 0F 0F 0E 0F 0F 0E 0F 0F 0F 0F' + '0F 0F 0F 0F 0F 0F 0F 0F 0F 09 10 10 00 00 00 00' + '10 02 0C 0F 0F 0F 0E 0F 0F 0E 0F 0F 0F 0F 0F 0F' + '0F 0F 0F 0F 0F 0F 0F 0F 0F 09 10 10 00 00 00 00' + '10 02 0D 0F 0E 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F' + '0F 0F 0F 0F 0F 0F 0F 0F 0F 09 10 10 00 00 00 00' + '10 02 0C 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F' + '0F 0F 0F 0F 0F 0F 0F 0F 0F 09 10 10 00 00 00 00' + '10 02 0D 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F' + '0F 0F 0F 0F 0F 0F 0F 0F 0F 09 10 10 00 00 00 00' + '10 01 0D 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F' + '0F 0F 0F 0F 0F 0F 0F 0F 0F 0A 10 10 00 00 00 00' + '10 02 0C 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F' + '0F 0F 0F 0F 0F 0F 0F 0F 0F 09 10 10 00 00 00 00' + '10 02 0D 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F' + '0F 0F 0F 0F 0F 0F 0F 0F 0F 09 10 10 00 00 00 00' + '10 02 0D 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F' + '0F 0F 0F 0F 0F 0F 0F 0F 0F 0A 10 10 00 00 00 00' + '10 01 06 08 06 06 06 06 06 06 06 06 06 06 06 06' + '06 06 05 06 05 06 05 05 06 04 10 10 00 00 00 00' + '10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10' + '10 10 10 10 10 10 10 10 10 10 10 10 00 00 E0 00' + '07 FF C0 00 03 FF C0 00 01 FF C0 00 00 FF C0 00' + '00 7F C0 00 00 3F C0 00 00 1F C0 00 00 1F C0 00' + '00 0F C0 00 00 03 C0 00 00 03 C0 00 00 03 C0 00' + '00 03 C0 00 00 03 C0 00 00 03 C0 00 00 03 C0 00' + '00 03 C0 00 00 03 C0 00 00 03 C0 00 00 03 C0 00' + '00 03 C0 00 00 03 C0 00 00 03 C0 00 00 03 C0 00' + '00 03 C0 00 00 03 C0 00 00 03 C0 00 00 03 C0 00' + '00 03 C0 00 00 03 C0 00 00 03 C0 00 00 03 28 00' + '00 00 10 00 00 00 20 00 00 00 01 00 08 00 00 00' + '00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 11 11 11 00 33 33' + '33 00 44 44 44 00 77 77 77 00 7F 7F 7F 00 99 99' + '99 00 AA AA AA 00 BB BB BB 00 CC CC CC 00 DD DD' + 'DD 00 EE EE EE 00 FF FF FF 00 00 00 00 00 EE EE' + 'EE 00 FF FF FF 00 00 00 00 00 33 00 32 00 5C 00' + '64 00 6F 00 63 00 75 00 6D 00 65 00 6E 00 74 00' + '2E 00 69 00 63 00 6F 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 C0 17' + '95 00 00 00 38 00 A8 44 F9 77 13 00 00 00 18 0A' + '38 00 00 00 38 00 18 6C 38 00 98 17 95 00 00 00' + '00 00 E0 19 95 00 F0 88 FA 77 70 38 F5 77 FF FF' + 'FF FF A8 44 F9 77 70 7D F5 77 3A 8A F5 77 86 00' + '00 00 86 00 00 00 08 00 00 00 B0 18 95 00 00 00' + '00 00 CB 44 F9 77 38 9F 07 00 CD 8B F5 77 78 13' + '05 00 37 90 F5 77 00 00 00 00 3E 8A F5 77 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 10 00 00 00 00 00 00 00 5A 00' + '5C 00 00 EC FD 7F 1A 02 00 00 4C 16 95 00 40 9F' + '07 00 FC 15 95 00 FF FF FF FF B4 1A 95 00 45 00' + '00 00 28 02 00 00 FF FF FF FF E2 D8 F5 77 7D 9B' + 'F5 77 94 B6 01 00 00 00 05 00 F4 17 95 00 80 00' + '10 C0 B4 1A 95 00 F0 88 FA 77 88 1C F5 77 FF FF' + 'FF FF 37 90 F5 77 00 00 00 00 3E 8A F5 77 9B B2' + 'E7 77 B7 00 00 00 02 00 00 00 A4 1A 95 00 01 00' + '00 00 18 00 00 00 00 00 00 00 10 19 95 00 42 00' + '00 00 00 00 00 00 F4 18 95 00 00 00 00 00 00 00' + '00 00 00 00 00 00 0C 00 00 00 02 00 00 00 01 01' + 'F5 77 00 EC FD 7F 5A 00 00 00 00 00 00 00 03 00' + '00 00 62 00 1A 02 40 9F 07 00 00 00 00 00 40 9F' + '07 00 05 00 00 00 BE B3 E7 77 4C 19 95 00 A3 B4' + 'E7 77 F8 00 00 00 00 00 00 C0 00 00 00 00 00 00' + '00 00 02 00 00 00 80 00 00 00 00 00 00 00 8C 1A' + '95 00 7F E9 4B 00 08 6C 0C 01 00 00 00 C0 00 00' + '00 00 80 1A 95 00 02 00 00 00 80 00 00 00 00 00' + '00 00 C0 27 95 00 C4 F5 AF 00 02 00 00 00 44 3A' + '5C 6F 73 65 78 70 65 72 74 73 5C 72 65 61 63 74' + '6F 73 5C 6C 69 62 5C 73 68 65 6C 6C 33 32 5C 64' + '6F 63 75 6D 65 6E 74 2E 69 63 6F 00 4B 00 14 1A' + '95 00 1F 3B D4 77 13 00 00 00 98 00 00 00 4F 3B' + 'D4 77 E0 19 95 00 33 3B D4 77 64 C5 F5 77 A9 F1' + 'E7 77 F8 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 1A 95 00 18 6C 38 00 86 00 00 00 00 00' + '00 00 C9 F1 E7 77 86 00 00 00 A4 1A 95 00 08 00' + '00 00 00 00 00 00 86 00 00 00 86 00 00 00 08 00' + '00 00 F4 19 95 00 33 3B D4 77 B4 1A 95 00 09 48' + 'E9 77 B8 10 E9 77 FF FF FF FF C9 F1 E7 77 16 EA' + '4B 00 F8 00 00 00 18 6C 38 00 86 00 00 00 58 1A' + '95 00 00 00 00 00 00 0D 0D 0D 0D 0D 0D 0D 0D 0D' + '0D 00 00 00 00 00 00 01 07 08 08 07 08 07 08 04' + '0D 0D 00 00 00 00 00 01 09 0B 0A 0B 0B 0B 0A 09' + '06 0D 0D 00 00 00 00 01 0A 0A 0A 0A 0A 0B 0A 09' + '0C 06 0D 0D 00 00 00 01 09 0A 0B 0A 0B 0A 0A 09' + '0C 0C 06 01 0D 00 00 01 0A 0B 0A 0B 0A 0B 0A 09' + '0A 09 0A 04 0D 00 00 01 09 0B 0B 0A 0B 0B 0B 0B' + '0A 0B 0B 08 0D 00 00 01 0A 0C 0B 0B 0B 0B 0B 0B' + '0B 0B 0C 08 0D 00 00 01 0A 0B 0B 0C 0B 0C 0B 0B' + '0C 0B 0C 09 0D 00 00 01 0B 0C 0B 0C 0B 0C 0C 0C' + '0C 0C 0C 08 0D 00 00 01 09 0C 0C 0B 0C 0C 0C 0C' + '0C 0C 0C 09 0D 00 00 01 0B 0C 0C 0C 0C 0C 0C 0C' + '0C 0C 0C 08 0D 00 00 01 0A 0C 0C 0C 0C 0C 0C 0C' + '0C 0C 0C 09 0D 00 00 01 0B 0C 0C 0C 0C 0C 0C 0C' + '0C 0C 0C 09 0D 00 00 01 0B 0C 0C 0C 0C 0C 0C 0C' + '0C 0C 0C 09 0D 00 00 0D 03 03 03 03 03 03 03 02' + '03 02 03 02 0D 00 80 1F 00 00 80 0F 00 00 80 07' + '00 00 80 03 00 00 80 01 00 00 80 01 00 00 80 01' + '00 00 80 01 00 00 80 01 00 00 80 01 00 00 80 01' + '00 00 80 01 00 00 80 01 00 00 80 01 00 00 80 01' + '00 00 80 01 00 00 28 00 00 00 20 00 00 00 40 00' + '00 00 01 00 04 00 00 00 00 00 00 02 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 80 00 00 00 00 80 00 00 80 80 00 00 00 00' + '80 00 80 00 80 00 00 80 80 00 C0 C0 C0 00 80 80' + '80 00 FF 00 00 00 00 FF 00 00 FF FF 00 00 00 00' + 'FF 00 FF 00 FF 00 00 FF FF 00 FF FF FF 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 08' + '88 87 88 78 88 78 88 88 00 00 00 00 00 00 00 00' + '7F F7 FF 7F FF 7F F7 78 80 00 00 00 00 00 00 04' + '7F 7F 77 F7 F7 F7 FF 8F 88 00 00 00 00 00 00 00' + '7F F7 FF 7F 7F 7F 7F 77 F8 80 00 00 00 00 00 08' + '7F 77 F7 F7 F7 F7 F7 77 FF 88 00 00 00 00 00 00' + '7F F7 7F 7F 7F 7F 7F 7F 7F F8 80 00 00 00 00 08' + '7F 7F F7 F7 F7 F7 F7 77 FF FF 88 00 00 00 00 00' + '7F F7 FF 7F 7F F7 FF 8F FF FF F8 80 00 00 00 08' + '7F 7F 77 F7 FF 7F F7 77 F7 F7 FF 84 00 00 00 00' + '7F F7 FF 7F 7F F7 FF 77 77 77 87 78 00 00 00 08' + '7F 7F F7 FF F7 FF 7F FF 7F F7 FF F7 00 00 00 00' + '7F F7 FF 7F 7F 7F F7 FF F7 FF F7 F8 00 00 00 08' + '7F FF F7 F7 FF F7 FF 7F 7F FF 7F F8 00 00 00 00' + '7F 7F FF FF 7F FF 7F FF F7 FF FF F8 00 00 00 04' + '7F FF 7F F7 FF 7F FF F7 FF FF F7 F7 00 00 00 00' + 'FF FF FF FF FF F7 FF FF 7F F7 FF F8 00 00 00 08' + '7F 7F F7 FF FF FF FF FF FF FF FF F8 00 00 00 00' + '7F FF FF F7 FF FF FF FF FF FF FF F8 00 00 00 08' + '7F FF FF FF FF 7F FF FF FF FF FF F7 00 00 00 00' + 'FF F7 FF FF FF FF FF FF FF FF FF F8 00 00 00 08' + '7F FF FF 7F FF FF FF FF FF FF FF F7 00 00 00 00' + '7F FF FF FF FF FF FF FF FF FF FF F8 00 00 00 08' + '7F FF FF FF FF FF FF FF FF FF FF F8 00 00 00 00' + 'FF FF FF FF FF FF FF FF FF FF FF F7 00 00 00 08' + '7F FF FF FF FF FF FF FF FF FF FF F8 00 00 00 00' + 'FF FF FF FF FF FF FF FF FF FF FF F7 00 00 00 04' + '7F FF FF FF FF FF FF FF FF FF FF F8 00 00 00 08' + '7F FF FF FF FF FF FF F7 FF FF FF F7 00 00 00 00' + '88 88 88 88 88 88 88 88 88 88 88 88 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 E0 00' + '07 FF C0 00 03 FF C0 00 01 FF C0 00 00 FF C0 00' + '00 7F C0 00 00 3F C0 00 00 1F C0 00 00 1F C0 00' + '00 0F C0 00 00 03 C0 00 00 03 C0 00 00 03 C0 00' + '00 03 C0 00 00 03 C0 00 00 03 C0 00 00 03 C0 00' + '00 03 C0 00 00 03 C0 00 00 03 C0 00 00 03 C0 00' + '00 03 C0 00 00 03 C0 00 00 03 C0 00 00 03 C0 00' + '00 03 C0 00 00 03 C0 00 00 03 C0 00 00 03 C0 00' + '00 03 C0 00 00 03 C0 00 00 03 C0 00 00 03 28 00' + '00 00 10 00 00 00 20 00 00 00 01 00 04 00 00 00' + '00 00 80 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 80 00 00 00 00 80' + '00 00 80 80 00 00 00 00 80 00 80 00 80 00 00 80' + '80 00 C0 C0 C0 00 80 80 80 00 FF 00 00 00 00 FF' + '00 00 FF FF 00 00 00 00 FF 00 FF 00 FF 00 00 FF' + 'FF 00 FF FF FF 00 00 00 00 00 00 00 00 00 00 77' + '77 77 78 00 00 00 00 7F F7 FF 7F 80 00 00 04 7F' + '7F 7F 77 F8 00 00 00 77 F7 F7 F7 FF 70 00 00 FF' + '7F 7F 7F 7F 78 00 08 77 FF 7F F7 F7 F7 00 00 FF' + '7F FF 7F 7F F7 00 00 7F FF F7 FF FF F7 00 04 7F' + 'FF FF FF FF F7 00 00 FF FF FF FF FF F7 00 00 7F' + 'FF FF FF FF F7 00 00 FF FF FF FF FF F7 00 04 7F' + 'FF FF FF FF F7 00 00 FF FF FF FF FF F7 00 00 88' + '88 88 88 88 88 00 80 1F 00 00 80 0F 00 00 80 07' + '00 00 80 03 00 00 80 01 00 00 80 01 00 00 80 01' + '00 00 80 01 00 00 80 01 00 00 80 01 00 00 80 01' + '00 00 80 01 00 00 80 01 00 00 80 01 00 00 80 01' + '00 00 80 01 00 00 28 00 00 00 30 00 00 00 60 00' + '00 00 01 00 08 00 00 00 00 00 00 09 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 11 11 11 00 22 22 22 00 33 33 33 00 44 44' + '44 00 66 66 66 00 77 77 77 00 7F 7F 7F 00 88 88' + '88 00 99 99 99 00 AA AA AA 00 BB BB BB 00 CC CC' + 'CC 00 DD DD DD 00 EE EE EE 00 FF FF FF 00 00 00' + '00 00 33 00 32 00 5C 00 64 00 6F 00 63 00 75 00' + '6D 00 65 00 6E 00 74 00 2E 00 69 00 63 00 6F 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 C0 17 95 00 00 00 38 00 A8 44' + 'F9 77 13 00 00 00 18 0A 38 00 00 00 38 00 18 6C' + '38 00 98 17 95 00 00 00 00 00 E0 19 95 00 F0 88' + 'FA 77 70 38 F5 77 FF FF FF FF A8 44 F9 77 70 7D' + 'F5 77 3A 8A F5 77 86 00 00 00 86 00 00 00 08 00' + '00 00 B0 18 95 00 00 00 00 00 CB 44 F9 77 38 9F' + '07 00 CD 8B F5 77 78 13 05 00 37 90 F5 77 00 00' + '00 00 3E 8A F5 77 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 10 00' + '00 00 00 00 00 00 5A 00 5C 00 00 EC FD 7F 1A 02' + '00 00 4C 16 95 00 40 9F 07 00 FC 15 95 00 FF FF' + 'FF FF B4 1A 95 00 45 00 00 00 28 02 00 00 FF FF' + 'FF FF E2 D8 F5 77 7D 9B F5 77 94 B6 01 00 00 00' + '05 00 F4 17 95 00 80 00 10 C0 B4 1A 95 00 F0 88' + 'FA 77 88 1C F5 77 FF FF FF FF 37 90 F5 77 00 00' + '00 00 3E 8A F5 77 9B B2 E7 77 B7 00 00 00 02 00' + '00 00 A4 1A 95 00 01 00 00 00 18 00 00 00 00 00' + '00 00 10 19 95 00 42 00 00 00 00 00 00 00 F4 18' + '95 00 00 00 00 00 00 00 00 00 00 00 00 00 0C 00' + '00 00 02 00 00 00 01 01 F5 77 00 EC FD 7F 5A 00' + '00 00 00 00 00 00 03 00 00 00 62 00 1A 02 40 9F' + '07 00 00 00 00 00 40 9F 07 00 05 00 00 00 BE B3' + 'E7 77 4C 19 95 00 A3 B4 E7 77 F8 00 00 00 00 00' + '00 C0 00 00 00 00 00 00 00 00 02 00 00 00 80 00' + '00 00 00 00 00 00 8C 1A 95 00 7F E9 4B 00 08 6C' + '0C 01 00 00 00 C0 00 00 00 00 80 1A 95 00 02 00' + '00 00 80 00 00 00 00 00 00 00 C0 27 95 00 C4 F5' + 'AF 00 02 00 00 00 44 3A 5C 6F 73 65 78 70 65 72' + '74 73 5C 72 65 61 63 74 6F 73 5C 6C 69 62 5C 73' + '68 65 6C 6C 33 32 5C 64 6F 63 75 6D 65 6E 74 2E' + '69 63 6F 00 4B 00 14 1A 95 00 1F 3B D4 77 13 00' + '00 00 98 00 00 00 4F 3B D4 77 E0 19 95 00 33 3B' + 'D4 77 64 C5 F5 77 A9 F1 E7 77 F8 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 1A 95 00 18 6C' + '38 00 86 00 00 00 00 00 00 00 C9 F1 E7 77 86 00' + '00 00 A4 1A 95 00 08 00 00 00 00 00 00 00 86 00' + '00 00 86 00 00 00 08 00 00 00 F4 19 95 00 33 3B' + 'D4 77 B4 1A 95 00 09 48 E9 77 B8 10 E9 77 FF FF' + 'FF FF C9 F1 E7 77 16 EA 4B 00 F8 00 00 00 18 6C' + '38 00 86 00 00 00 58 1A 95 00 00 00 00 00 00 00' + '00 00 10 10 10 10 10 10 10 10 10 10 10 10 10 10' + '10 10 10 10 10 10 10 10 10 10 10 10 10 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10' + '10 10 10 10 10 10 10 10 10 10 10 10 10 10 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10' + '10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 10 10 03 08 08 06 08 08 06 08 06 06 08 06 08' + '06 06 06 06 06 06 06 05 06 05 05 01 10 10 10 10' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 10 10 03 0C 0E 0E 0E 0D 0E 0E 0E 0E 0E 0E 0D' + '0E 0E 0E 0E 0E 0E 0E 0E 0E 0C 08 05 01 10 10 10' + '10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 10 10 03 0C 0F 0D 0D 0D 0D 0D 0D 0D 0D 0E 0D' + '0D 0D 0D 0E 0D 0D 0D 0E 0E 0B 09 0A 05 01 10 10' + '10 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 10 10 03 0B 0F 0C 0D 0D 0D 0D 0D 0D 0D 0D 0D' + '0D 0D 0D 0D 0D 0D 0D 0D 0D 0B 0A 0D 0A 05 02 10' + '10 10 10 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 10 10 03 0C 0F 0D 0D 0D 0D 0D 0D 0D 0D 0D 0D' + '0E 0D 0D 0D 0D 0E 0D 0D 0E 0A 0A 0E 0D 09 06 01' + '10 10 10 10 00 00 00 00 00 00 00 00 00 00 00 00' + '00 10 10 03 0C 0E 0D 0D 0D 0D 0D 0D 0D 0D 0D 0D' + '0D 0D 0D 0D 0D 0D 0D 0E 0D 0B 0A 0E 0D 0E 0A 06' + '01 10 10 10 10 00 00 00 00 00 00 00 00 00 00 00' + '00 10 10 03 0C 0F 0D 0D 0D 0D 0D 0D 0D 0D 0D 0D' + '0D 0D 0D 0E 0D 0D 0D 0D 0E 0B 0A 0E 0E 0E 0E 0A' + '05 01 10 10 10 10 00 00 00 00 00 00 00 00 00 00' + '00 10 10 03 0C 0F 0D 0D 0D 0D 0D 0D 0D 0D 0E 0D' + '0D 0E 0D 0D 0D 0D 0E 0D 0E 0B 0A 0E 0E 0E 0E 0F' + '0A 06 01 10 10 10 10 00 00 00 00 00 00 00 00 00' + '00 10 10 03 0C 0F 0D 0E 0D 0D 0D 0E 0D 0D 0D 0D' + '0E 0D 0E 0D 0E 0D 0D 0E 0D 0B 0A 0E 0F 0E 0E 0E' + '0F 0A 05 01 10 10 10 10 00 00 00 00 00 00 00 00' + '00 10 10 03 0C 0F 0D 0D 0D 0E 0D 0D 0D 0E 0D 0E' + '0D 0D 0D 0E 0D 0D 0E 0D 0E 0B 0A 0F 0E 0E 0F 0E' + '0F 0E 0B 05 02 10 10 10 10 00 00 00 00 00 00 00' + '00 10 10 03 0C 0F 0D 0D 0E 0D 0D 0E 0D 0D 0E 0D' + '0E 0D 0E 0D 0E 0E 0D 0E 0E 0B 0B 0E 0F 0E 0E 0F' + '0E 0F 0F 0B 05 01 10 10 10 10 00 00 00 00 00 00' + '00 10 10 03 0C 0F 0E 0D 0D 0D 0E 0D 0E 0D 0D 0E' + '0D 0E 0D 0E 0D 0D 0E 0D 0E 0B 0A 0F 0E 0F 0F 0F' + '0F 0F 0F 0F 0B 06 01 10 10 10 10 00 00 00 00 00' + '00 10 10 03 0C 0F 0D 0E 0D 0E 0D 0D 0E 0E 0D 0E' + '0D 0D 0E 0D 0E 0E 0D 0E 0E 0B 0B 0F 0F 0F 0F 0F' + '0F 0F 0F 0F 0F 0B 05 02 10 10 10 00 00 00 00 00' + '00 10 10 03 0C 0F 0E 0D 0E 0D 0E 0E 0D 0D 0E 0D' + '0E 0E 0D 0E 0E 0D 0E 0E 0E 0B 09 0B 0B 0B 0A 0B' + '0B 0A 0B 0A 0B 0B 09 05 10 10 10 00 00 00 00 00' + '00 10 10 03 0C 0F 0E 0D 0D 0E 0D 0D 0E 0E 0D 0E' + '0D 0E 0E 0D 0E 0E 0E 0D 0E 0D 0C 0C 0C 0C 0C 0C' + '0C 0C 0C 0C 0B 0C 0C 06 10 10 10 00 00 00 00 00' + '00 10 10 03 0C 0F 0D 0E 0E 0D 0E 0E 0E 0D 0E 0E' + '0E 0E 0D 0E 0E 0E 0D 0E 0E 0E 0E 0E 0E 0E 0E 0E' + '0E 0E 0E 0E 0F 0E 0E 08 10 10 10 00 00 00 00 00' + '00 10 10 04 0C 0F 0E 0D 0E 0E 0D 0E 0E 0E 0D 0E' + '0E 0D 0E 0E 0D 0E 0E 0E 0E 0E 0E 0E 0E 0E 0E 0E' + '0E 0E 0E 0E 0E 0F 0D 06 10 10 10 00 00 00 00 00' + '00 10 10 03 0C 0F 0D 0E 0E 0E 0E 0D 0E 0D 0E 0E' + '0D 0E 0E 0E 0E 0E 0E 0E 0E 0E 0E 0E 0E 0E 0E 0E' + '0F 0E 0E 0E 0E 0E 0E 08 10 10 10 00 00 00 00 00' + '00 10 10 03 0D 0F 0E 0E 0E 0E 0E 0E 0E 0E 0E 0E' + '0E 0E 0E 0E 0E 0E 0E 0E 0E 0E 0E 0E 0E 0E 0E 0E' + '0E 0E 0E 0E 0E 0F 0D 06 10 10 10 00 00 00 00 00' + '00 10 10 03 0C 0F 0E 0E 0E 0E 0E 0F 0E 0E 0E 0E' + '0E 0E 0E 0E 0E 0E 0E 0E 0E 0E 0E 0E 0E 0E 0F 0E' + '0E 0E 0E 0F 0E 0E 0E 08 10 10 10 00 00 00 00 00' + '00 10 10 04 0C 0F 0E 0E 0E 0E 0E 0E 0E 0E 0E 0E' + '0E 0E 0E 0E 0E 0E 0E 0E 0E 0E 0E 0F 0E 0E 0E 0E' + '0E 0F 0E 0E 0E 0F 0E 06 10 10 10 00 00 00 00 00' + '00 10 10 03 0C 0F 0F 0E 0E 0E 0F 0E 0F 0E 0F 0E' + '0F 0E 0E 0E 0E 0E 0E 0F 0E 0E 0E 0E 0E 0E 0E 0F' + '0E 0E 0F 0E 0F 0E 0E 08 10 10 10 00 00 00 00 00' + '00 10 10 03 0D 0F 0E 0E 0E 0F 0E 0E 0E 0F 0E 0F' + '0E 0F 0E 0F 0F 0E 0F 0E 0F 0E 0F 0E 0F 0E 0E 0E' + '0F 0E 0E 0E 0E 0F 0E 06 10 10 10 00 00 00 00 00' + '00 10 10 04 0C 0F 0E 0E 0F 0E 0E 0E 0F 0E 0F 0E' + '0F 0E 0F 0F 0E 0F 0F 0F 0E 0F 0F 0F 0E 0F 0E 0F' + '0E 0F 0E 0F 0F 0E 0E 08 10 10 10 00 00 00 00 00' + '00 10 10 03 0D 0F 0E 0E 0E 0F 0E 0F 0E 0E 0F 0F' + '0E 0F 0F 0E 0F 0E 0F 0F 0F 0F 0E 0F 0F 0F 0F 0E' + '0F 0E 0E 0E 0F 0F 0E 06 10 10 10 00 00 00 00 00' + '00 10 10 04 0C 0F 0F 0E 0F 0E 0F 0E 0F 0F 0F 0E' + '0F 0F 0E 0F 0F 0F 0F 0E 0F 0F 0F 0F 0F 0F 0F 0F' + '0F 0F 0F 0F 0E 0F 0E 08 10 10 10 00 00 00 00 00' + '00 10 10 03 0D 0F 0E 0F 0E 0F 0E 0F 0E 0F 0E 0F' + '0F 0E 0F 0E 0F 0F 0F 0F 0F 0E 0F 0F 0F 0F 0F 0F' + '0F 0F 0F 0F 0F 0F 0E 06 01 10 10 00 00 00 00 00' + '00 10 10 04 0C 0F 0F 0E 0E 0F 0F 0E 0F 0E 0F 0E' + '0F 0F 0F 0F 0F 0E 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F' + '0F 0F 0F 0F 0F 0F 0E 08 10 10 10 00 00 00 00 00' + '00 10 10 03 0D 0F 0E 0F 0F 0E 0E 0F 0F 0F 0F 0F' + '0E 0F 0F 0F 0F 0F 0F 0E 0F 0F 0F 0F 0F 0F 0F 0F' + '0F 0F 0F 0F 0F 0F 0E 06 10 10 10 00 00 00 00 00' + '00 10 10 04 0C 0F 0F 0F 0E 0F 0F 0F 0E 0F 0F 0E' + '0F 0F 0E 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F' + '0F 0F 0F 0F 0F 0F 0E 08 10 10 10 00 00 00 00 00' + '00 10 10 04 0D 0F 0E 0F 0F 0E 0F 0F 0F 0E 0F 0F' + '0F 0F 0F 0F 0E 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F' + '0F 0F 0F 0F 0F 0F 0E 08 10 10 10 00 00 00 00 00' + '00 10 10 03 0C 0F 0F 0E 0F 0F 0F 0E 0F 0F 0F 0F' + '0F 0E 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F' + '0F 0F 0F 0F 0F 0F 0E 08 10 10 10 00 00 00 00 00' + '00 10 10 04 0D 0F 0F 0F 0E 0F 0F 0F 0F 0F 0E 0F' + '0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F' + '0F 0F 0F 0F 0F 0F 0E 08 10 10 10 00 00 00 00 00' + '00 10 10 03 0D 0F 0F 0E 0F 0F 0F 0F 0E 0F 0F 0F' + '0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F' + '0F 0F 0F 0F 0F 0F 0F 08 10 10 10 00 00 00 00 00' + '00 10 10 04 0C 0F 0F 0F 0F 0F 0E 0F 0F 0F 0F 0F' + '0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F' + '0F 0F 0F 0F 0F 0F 0E 08 10 10 10 00 00 00 00 00' + '00 10 10 04 0D 0F 0F 0F 0E 0F 0F 0F 0F 0F 0F 0F' + '0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F' + '0F 0F 0F 0F 0F 0F 0E 08 10 10 10 00 00 00 00 00' + '00 10 10 03 0D 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F' + '0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F' + '0F 0F 0F 0F 0F 0F 0E 08 10 10 10 00 00 00 00 00' + '00 10 10 04 0C 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F' + '0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F' + '0F 0F 0F 0F 0F 0F 0F 08 10 10 10 00 00 00 00 00' + '00 10 10 04 0D 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F' + '0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F' + '0F 0F 0F 0F 0F 0F 0E 08 10 10 10 00 00 00 00 00' + '00 10 10 04 0C 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F' + '0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F' + '0F 0F 0F 0F 0F 0F 0F 08 10 10 10 00 00 00 00 00' + '00 10 10 04 0D 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F' + '0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F' + '0F 0F 0F 0F 0F 0F 0E 08 10 10 10 00 00 00 00 00' + '00 10 10 04 0D 0F 0F 0F 0F 0F 0F 0F 0F 0E 0F 0F' + '0E 0F 0E 0F 0E 0F 0F 0E 0F 0E 0F 0F 0F 0F 0E 0F' + '0F 0F 0E 0F 0E 0F 0E 09 10 10 10 00 00 00 00 00' + '00 10 10 02 0A 09 09 09 09 09 09 09 09 09 09 09' + '09 09 09 08 09 09 08 09 08 09 08 08 08 08 08 08' + '08 08 08 08 08 08 08 05 10 10 10 00 00 00 00 00' + '00 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10' + '10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10' + '10 10 10 10 10 10 10 10 10 10 10 00 00 00 00 00' + '00 00 10 10 10 10 10 10 10 10 10 10 10 10 10 10' + '10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10' + '10 10 10 10 10 10 10 10 10 10 00 00 00 00 F0 00' + '00 01 FF FF 00 00 E0 00 00 00 FF FF 00 00 E0 00' + '00 00 7F FF 00 00 E0 00 00 00 3F FF 00 00 E0 00' + '00 00 1F FF 00 00 E0 00 00 00 0F FF 00 00 E0 00' + '00 00 07 FF 00 00 E0 00 00 00 03 FF 00 00 E0 00' + '00 00 01 FF 00 00 E0 00 00 00 00 FF 00 00 E0 00' + '00 00 00 7F 00 00 E0 00 00 00 00 3F 00 00 E0 00' + '00 00 00 1F 00 00 E0 00 00 00 00 0F 00 00 E0 00' + '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' + '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' + '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' + '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' + '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' + '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' + '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' + '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' + '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' + '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' + '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' + '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' + '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' + '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' + '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' + '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' + '00 00 00 07 00 00 F0 00 00 00 00 0F 00 00 28 00' + '00 00 30 00 00 00 60 00 00 00 01 00 20 00 00 00' + '00 00 00 24 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 04 00 00 00 29 00 00' + '00 38 00 00 00 37 00 00 00 37 00 00 00 37 00 00' + '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' + '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' + '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' + '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' + '00 37 00 00 00 38 00 00 00 34 00 00 00 19 00 00' + '00 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 01 00 00 00 76 00 00 00 F1 00 00' + '00 F9 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' + '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' + '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' + '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' + '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' + '00 F7 00 00 00 F8 00 00 00 F2 00 00 00 B2 00 00' + '00 49 00 00 00 05 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 5A 00 00 00 FF 01 01 01 FF 06 06' + '06 FF 05 05 05 FF 05 05 05 FF 05 05 05 FF 05 05' + '05 FF 05 05 05 FF 05 05 05 FF 05 05 05 FF 05 05' + '05 FF 05 05 05 FF 05 05 05 FF 05 05 05 FF 05 05' + '05 FF 05 05 05 FF 05 05 05 FF 05 05 05 FF 04 04' + '04 FF 04 04 04 FF 04 04 04 FF 03 03 03 FF 02 02' + '02 FF 03 03 03 FF 02 02 02 FF 00 00 00 FF 00 00' + '00 D9 00 00 00 39 00 00 00 06 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 84 00 00 00 FF 2E 2E 2E FF 88 88' + '88 FF 87 87 87 FF 86 86 86 FF 86 86 86 FF 85 85' + '85 FF 84 84 84 FF 84 84 84 FF 83 83 83 FF 82 82' + '82 FF 82 82 82 FF 81 81 81 FF 80 80 80 FF 7F 7F' + '7F FF 7F 7F 7F FF 7E 7E 7E FF 7D 7D 7D FF 7C 7C' + '7C FF 7C 7C 7C FF 7B 7B 7B FF 74 74 74 FF 72 72' + '72 FF 73 73 73 FF 67 67 67 FF 18 18 18 FF 00 00' + '00 FF 00 00 00 D9 00 00 00 58 00 00 00 03 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 84 00 00 00 FF 38 38 38 FF C1 C1' + 'C1 FF F2 F2 F2 FF EA EA EA FF EA EA EA FF EA EA' + 'EA FF EA EA EA FF E9 E9 E9 FF E9 E9 E9 FF E9 E9' + 'E9 FF E9 E9 E9 FF E9 E9 E9 FF E8 E8 E8 FF E8 E8' + 'E8 FF E8 E8 E8 FF E9 E9 E9 FF EB EB EB FF EA EA' + 'EA FF EA EA EA FF EA EA EA FF EB EB EB FF F1 F1' + 'F1 FF C4 C4 C4 FF 8C 8C 8C FF 67 67 67 FF 15 15' + '15 FF 00 00 00 FF 00 00 00 DC 00 00 00 4C 00 00' + '00 06 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 84 00 00 00 FF 35 35 35 FF C8 C8' + 'C8 FF FA FA FA FF DD DD DD FF DE DE DE FF DE DE' + 'DE FF DF DF DF FF DF DF DF FF DF DF DF FF DF DF' + 'DF FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' + 'E0 FF E1 E1 E1 FF E1 E1 E1 FF E2 E2 E2 FF E2 E2' + 'E2 FF E2 E2 E2 FF E2 E2 E2 FF E3 E3 E3 FF E8 E8' + 'E8 FF BA BA BA FF A3 A3 A3 FF A6 A6 A6 FF 6B 6B' + '6B FF 0B 0B 0B FF 00 00 00 FF 00 00 00 EB 00 00' + '00 4B 00 00 00 03 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 84 00 00 00 FF 35 35 35 FF C7 C7' + 'C7 FF F9 F9 F9 FF DA DA DA FF DA DA DA FF DA DA' + 'DA FF DA DA DA FF DB DB DB FF DB DB DB FF DB DB' + 'DB FF DC DC DC FF DC DC DC FF DC DC DC FF DC DC' + 'DC FF DD DD DD FF DD DD DD FF DD DD DD FF DD DD' + 'DD FF DD DD DD FF DD DD DD FF DE DE DE FF E3 E3' + 'E3 FF B7 B7 B7 FF A8 A8 A8 FF DE DE DE FF A8 A8' + 'A8 FF 6C 6C 6C FF 25 25 25 FF 00 00 00 FF 00 00' + '00 DE 00 00 00 57 00 00 00 03 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 84 00 00 00 FF 35 35 35 FF C7 C7' + 'C7 FF F9 F9 F9 FF DC DC DC FF DB DB DB FF DB DB' + 'DB FF DC DC DC FF DD DD DD FF DD DD DD FF DD DD' + 'DD FF DD DD DD FF DE DE DE FF DE DE DE FF DE DE' + 'DE FF DE DE DE FF DE DE DE FF DF DF DF FF DE DE' + 'DE FF DF DF DF FF DF DF DF FF E0 E0 E0 FF E5 E5' + 'E5 FF B8 B8 B8 FF A7 A7 A7 FF EB EB EB FF DE DE' + 'DE FF A4 A4 A4 FF 72 72 72 FF 17 17 17 FF 00 00' + '00 FF 00 00 00 DC 00 00 00 4C 00 00 00 06 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 84 00 00 00 FF 36 36 36 FF C8 C8' + 'C8 FF FA FA FA FF DC DC DC FF DD DD DD FF DD DD' + 'DD FF DD DD DD FF DD DD DD FF DE DE DE FF DE DE' + 'DE FF DE DE DE FF DE DE DE FF DF DF DF FF DF DF' + 'DF FF DF DF DF FF DF DF DF FF E0 E0 E0 FF E0 E0' + 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E1 E1 E1 FF E6 E6' + 'E6 FF B9 B9 B9 FF A9 A9 A9 FF EA EA EA FF EA EA' + 'EA FF E9 E9 E9 FF B1 B1 B1 FF 72 72 72 FF 14 14' + '14 FF 00 00 00 FF 00 00 00 EB 00 00 00 4B 00 00' + '00 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 84 00 00 00 FF 37 37 37 FF C9 C9' + 'C9 FF FA FA FA FF DD DD DD FF DE DE DE FF DE DE' + 'DE FF DE DE DE FF DE DE DE FF DF DF DF FF DF DF' + 'DF FF DF DF DF FF DF DF DF FF E0 E0 E0 FF E0 E0' + 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E1 E1 E1 FF E1 E1' + 'E1 FF E1 E1 E1 FF E1 E1 E1 FF E2 E2 E2 FF E7 E7' + 'E7 FF BA BA BA FF AA AA AA FF EC EC EC FF EA EA' + 'EA FF ED ED ED FF EA EA EA FF B2 B2 B2 FF 6A 6A' + '6A FF 1C 1C 1C FF 00 00 00 FF 00 00 00 DE 00 00' + '00 57 00 00 00 04 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 84 00 00 00 FF 37 37 37 FF C9 C9' + 'C9 FF FA FA FA FF DF DF DF FF DE DE DE FF DF DF' + 'DF FF DF DF DF FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' + 'E0 FF E0 E0 E0 FF E1 E1 E1 FF E1 E1 E1 FF E1 E1' + 'E1 FF E1 E1 E1 FF E2 E2 E2 FF E2 E2 E2 FF E2 E2' + 'E2 FF E2 E2 E2 FF E3 E3 E3 FF E3 E3 E3 FF E8 E8' + 'E8 FF BA BA BA FF AC AC AC FF EF EF EF FF ED ED' + 'ED FF ED ED ED FF F1 F1 F1 FF F1 F1 F1 FF B1 B1' + 'B1 FF 6B 6B 6B FF 13 13 13 FF 00 00 00 FF 00 00' + '00 DC 00 00 00 46 00 00 00 05 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 84 00 00 00 FF 37 37 37 FF C9 C9' + 'C9 FF FA FA FA FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' + 'E0 FF E0 E0 E0 FF E1 E1 E1 FF E1 E1 E1 FF E1 E1' + 'E1 FF E1 E1 E1 FF E2 E2 E2 FF E2 E2 E2 FF E2 E2' + 'E2 FF E2 E2 E2 FF E2 E2 E2 FF E3 E3 E3 FF E3 E3' + 'E3 FF E3 E3 E3 FF E3 E3 E3 FF E4 E4 E4 FF E9 E9' + 'E9 FF BB BB BB FF AD AD AD FF F3 F3 F3 FF F1 F1' + 'F1 FF F1 F1 F1 FF F1 F1 F1 FF F4 F4 F4 FF F5 F5' + 'F5 FF B5 B5 B5 FF 70 70 70 FF 14 14 14 FF 00 00' + '00 FF 00 00 00 E0 00 00 00 3F 00 00 00 02 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 84 00 00 00 FF 37 37 37 FF CA CA' + 'CA FF FB FB FB FF E1 E1 E1 FF E1 E1 E1 FF E1 E1' + 'E1 FF E1 E1 E1 FF E2 E2 E2 FF E2 E2 E2 FF E2 E2' + 'E2 FF E2 E2 E2 FF E3 E3 E3 FF E3 E3 E3 FF E3 E3' + 'E3 FF E3 E3 E3 FF E3 E3 E3 FF E4 E4 E4 FF E4 E4' + 'E4 FF E4 E4 E4 FF E4 E4 E4 FF E5 E5 E5 FF EA EA' + 'EA FF BC BC BC FF AF AF AF FF F5 F5 F5 FF F3 F3' + 'F3 FF F3 F3 F3 FF F3 F3 F3 FF F4 F4 F4 FF F8 F8' + 'F8 FF F4 F4 F4 FF B6 B6 B6 FF 6C 6C 6C FF 22 22' + '22 FF 00 00 00 FF 00 00 00 D4 00 00 00 49 00 00' + '00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 84 00 00 00 FF 38 38 38 FF CA CA' + 'CA FF FB FB FB FF E2 E2 E2 FF E1 E1 E1 FF E2 E2' + 'E2 FF E2 E2 E2 FF E3 E3 E3 FF E3 E3 E3 FF E3 E3' + 'E3 FF E3 E3 E3 FF E4 E4 E4 FF E3 E3 E3 FF E3 E3' + 'E3 FF E4 E4 E4 FF E5 E5 E5 FF E5 E5 E5 FF E5 E5' + 'E5 FF E5 E5 E5 FF E6 E6 E6 FF E6 E6 E6 FF EB EB' + 'EB FF BC BC BC FF B1 B1 B1 FF F8 F8 F8 FF F6 F6' + 'F6 FF F6 F6 F6 FF F7 F7 F7 FF F8 F8 F8 FF F8 F8' + 'F8 FF FC FC FC FF FC FC FC FF B5 B5 B5 FF 70 70' + '70 FF 18 18 18 FF 00 00 00 FF 00 00 00 D4 00 00' + '00 3F 00 00 00 05 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 84 00 00 00 FF 38 38 38 FF CB CB' + 'CB FF FC FC FC FF E3 E3 E3 FF E3 E3 E3 FF E3 E3' + 'E3 FF E3 E3 E3 FF E4 E4 E4 FF E4 E4 E4 FF E4 E4' + 'E4 FF E4 E4 E4 FF E5 E5 E5 FF E5 E5 E5 FF E5 E5' + 'E5 FF E5 E5 E5 FF E6 E6 E6 FF E6 E6 E6 FF E6 E6' + 'E6 FF E6 E6 E6 FF E6 E6 E6 FF E6 E6 E6 FF EC EC' + 'EC FF BD BD BD FF B3 B3 B3 FF FC FC FC FF F9 F9' + 'F9 FF FA FA FA FF FA FA FA FF FB FB FB FF FC FC' + 'FC FF FC FC FC FF FF FF FF FF FF FF FF FF BA BA' + 'BA FF 75 75 75 FF 18 18 18 FF 00 00 00 FF 00 00' + '00 E0 00 00 00 3E 00 00 00 03 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 84 00 00 00 FF 38 38 38 FF CB CB' + 'CB FF FC FC FC FF E4 E4 E4 FF E4 E4 E4 FF E4 E4' + 'E4 FF E4 E4 E4 FF E5 E5 E5 FF E5 E5 E5 FF E5 E5' + 'E5 FF E5 E5 E5 FF E6 E6 E6 FF E6 E6 E6 FF E6 E6' + 'E6 FF E6 E6 E6 FF E6 E6 E6 FF E7 E7 E7 FF E7 E7' + 'E7 FF E7 E7 E7 FF E7 E7 E7 FF E7 E7 E7 FF ED ED' + 'ED FF BE BE BE FF B5 B5 B5 FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FB FB' + 'FB FF BE BE BE FF 6E 6E 6E FF 1C 1C 1C FF 00 00' + '00 FF 00 00 00 BB 00 00 00 1F 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 84 00 00 00 FF 38 38 38 FF CC CC' + 'CC FF FC FC FC FF E4 E4 E4 FF E4 E4 E4 FF E5 E5' + 'E5 FF E5 E5 E5 FF E6 E6 E6 FF E5 E5 E5 FF E5 E5' + 'E5 FF E6 E6 E6 FF E7 E7 E7 FF E6 E6 E6 FF E6 E6' + 'E6 FF E7 E7 E7 FF E7 E7 E7 FF E8 E8 E8 FF E8 E8' + 'E8 FF E8 E8 E8 FF E8 E8 E8 FF E9 E9 E9 FF EE EE' + 'EE FF C3 C3 C3 FF 9A 9A 9A FF B9 B9 B9 FF B8 B8' + 'B8 FF B7 B7 B7 FF B7 B7 B7 FF B7 B7 B7 FF B7 B7' + 'B7 FF B6 B6 B6 FF B5 B5 B5 FF B5 B5 B5 FF B8 B8' + 'B8 FF B5 B5 B5 FF 91 91 91 FF 67 67 67 FF 01 01' + '01 FF 00 00 00 F7 00 00 00 37 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 84 00 00 00 FF 39 39 39 FF CC CC' + 'CC FF FC FC FC FF E6 E6 E6 FF E7 E7 E7 FF E6 E6' + 'E6 FF E6 E6 E6 FF E6 E6 E6 FF E7 E7 E7 FF E7 E7' + 'E7 FF E7 E7 E7 FF E7 E7 E7 FF E8 E8 E8 FF E8 E8' + 'E8 FF E8 E8 E8 FF E8 E8 E8 FF E9 E9 E9 FF E9 E9' + 'E9 FF E9 E9 E9 FF E9 E9 E9 FF EA EA EA FF EB EB' + 'EB FF E2 E2 E2 FF CD CD CD FF CA CA CA FF CA CA' + 'CA FF CA CA CA FF CA CA CA FF C9 C9 C9 FF C9 C9' + 'C9 FF C9 C9 C9 FF C9 C9 C9 FF C9 C9 C9 FF C9 C9' + 'C9 FF CD CD CD FF CC CC CC FF 7A 7A 7A FF 05 05' + '05 FF 00 00 00 F7 00 00 00 37 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 84 00 00 00 FF 39 39 39 FF CC CC' + 'CC FF FC FC FC FF E8 E8 E8 FF E8 E8 E8 FF E8 E8' + 'E8 FF E7 E7 E7 FF E7 E7 E7 FF E8 E8 E8 FF E8 E8' + 'E8 FF E8 E8 E8 FF E8 E8 E8 FF E9 E9 E9 FF E9 E9' + 'E9 FF E9 E9 E9 FF E9 E9 E9 FF EA EA EA FF EA EA' + 'EA FF EA EA EA FF EA EA EA FF EB EB EB FF EB EB' + 'EB FF ED ED ED FF EF EF EF FF F0 F0 F0 FF F0 F0' + 'F0 FF F0 F0 F0 FF F0 F0 F0 FF F1 F1 F1 FF F1 F1' + 'F1 FF F1 F1 F1 FF F1 F1 F1 FF F2 F2 F2 FF F2 F2' + 'F2 FF F6 F6 F6 FF EC EC EC FF 7A 7A 7A FF 04 04' + '04 FF 00 00 00 F7 00 00 00 37 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 84 00 00 00 FF 3A 3A 3A FF CE CE' + 'CE FF FD FD FD FF E9 E9 E9 FF E9 E9 E9 FF EA EA' + 'EA FF E9 E9 E9 FF E8 E8 E8 FF E8 E8 E8 FF E9 E9' + 'E9 FF E9 E9 E9 FF EA EA EA FF EA EA EA FF EA EA' + 'EA FF EA EA EA FF EB EB EB FF EB EB EB FF EA EA' + 'EA FF EB EB EB FF EC EC EC FF EC EC EC FF EC EC' + 'EC FF EC EC EC FF EC EC EC FF ED ED ED FF ED ED' + 'ED FF ED ED ED FF ED ED ED FF EE EE EE FF ED ED' + 'ED FF ED ED ED FF EE EE EE FF EF EF EF FF EF EF' + 'EF FF F2 F2 F2 FF E9 E9 E9 FF 7B 7B 7B FF 04 04' + '04 FF 00 00 00 F7 00 00 00 37 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 84 00 00 00 FF 3A 3A 3A FF CD CD' + 'CD FF FD FD FD FF EA EA EA FF EB EB EB FF EC EC' + 'EC FF ED ED ED FF EC EC EC FF E9 E9 E9 FF EA EA' + 'EA FF EA EA EA FF EB EB EB FF EB EB EB FF EB EB' + 'EB FF EB EB EB FF EB EB EB FF EC EC EC FF EC EC' + 'EC FF EC EC EC FF EC EC EC FF ED ED ED FF ED ED' + 'ED FF ED ED ED FF ED ED ED FF EE EE EE FF EE EE' + 'EE FF EE EE EE FF EE EE EE FF EF EF EF FF EF EF' + 'EF FF EF EF EF FF EF EF EF FF F0 F0 F0 FF F0 F0' + 'F0 FF F4 F4 F4 FF E9 E9 E9 FF 7B 7B 7B FF 04 04' + '04 FF 00 00 00 F7 00 00 00 37 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 84 00 00 00 FF 3A 3A 3A FF CE CE' + 'CE FF FE FE FE FF EC EC EC FF EC EC EC FF ED ED' + 'ED FF EE EE EE FF EF EF EF FF EE EE EE FF EB EB' + 'EB FF EB EB EB FF EC EC EC FF EC EC EC FF EC EC' + 'EC FF EC EC EC FF EC EC EC FF ED ED ED FF ED ED' + 'ED FF ED ED ED FF ED ED ED FF EE EE EE FF EE EE' + 'EE FF EE EE EE FF EE EE EE FF EF EF EF FF EF EF' + 'EF FF EF EF EF FF EF EF EF FF F0 F0 F0 FF F0 F0' + 'F0 FF F0 F0 F0 FF F0 F0 F0 FF F1 F1 F1 FF F1 F1' + 'F1 FF F4 F4 F4 FF EA EA EA FF 7C 7C 7C FF 04 04' + '04 FF 00 00 00 F7 00 00 00 37 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 84 00 00 00 FF 3B 3B 3B FF CE CE' + 'CE FF FE FE FE FF ED ED ED FF ED ED ED FF EE EE' + 'EE FF EF EF EF FF F0 F0 F0 FF F1 F1 F1 FF F0 F0' + 'F0 FF EE EE EE FF EC EC EC FF EC EC EC FF ED ED' + 'ED FF ED ED ED FF EE EE EE FF EE EE EE FF EE EE' + 'EE FF EE EE EE FF EF EF EF FF EF EF EF FF EF EF' + 'EF FF EF EF EF FF EF EF EF FF F0 F0 F0 FF F0 F0' + 'F0 FF F0 F0 F0 FF F0 F0 F0 FF F1 F1 F1 FF F1 F1' + 'F1 FF F1 F1 F1 FF F1 F1 F1 FF F2 F2 F2 FF F1 F1' + 'F1 FF F5 F5 F5 FF EA EA EA FF 7D 7D 7D FF 04 04' + '04 FF 00 00 00 F7 00 00 00 37 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 84 00 00 00 FF 3B 3B 3B FF CF CF' + 'CF FF FE FE FE FF EE EE EE FF EF EF EF FF F0 F0' + 'F0 FF F0 F0 F0 FF F1 F1 F1 FF F2 F2 F2 FF F2 F2' + 'F2 FF F3 F3 F3 FF F1 F1 F1 FF EE EE EE FF EE EE' + 'EE FF EE EE EE FF EE EE EE FF EE EE EE FF EF EF' + 'EF FF EF EF EF FF EF EF EF FF EF EF EF FF F0 F0' + 'F0 FF F0 F0 F0 FF F0 F0 F0 FF F1 F1 F1 FF F1 F1' + 'F1 FF F1 F1 F1 FF F1 F1 F1 FF F2 F2 F2 FF F2 F2' + 'F2 FF F2 F2 F2 FF F2 F2 F2 FF F3 F3 F3 FF F3 F3' + 'F3 FF F6 F6 F6 FF EB EB EB FF 7D 7D 7D FF 05 05' + '05 FF 00 00 00 F7 00 00 00 37 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 84 00 00 00 FF 3B 3B 3B FF CF CF' + 'CF FF FF FF FF FF F0 F0 F0 FF F0 F0 F0 FF F0 F0' + 'F0 FF F1 F1 F1 FF F2 F2 F2 FF F3 F3 F3 FF F3 F3' + 'F3 FF F4 F4 F4 FF F5 F5 F5 FF F5 F5 F5 FF F4 F4' + 'F4 FF F3 F3 F3 FF F2 F2 F2 FF F1 F1 F1 FF F1 F1' + 'F1 FF F0 F0 F0 FF F0 F0 F0 FF F1 F1 F1 FF F1 F1' + 'F1 FF F0 F0 F0 FF F0 F0 F0 FF F1 F1 F1 FF F2 F2' + 'F2 FF F2 F2 F2 FF F2 F2 F2 FF F3 F3 F3 FF F3 F3' + 'F3 FF F3 F3 F3 FF F3 F3 F3 FF F4 F4 F4 FF F4 F4' + 'F4 FF F7 F7 F7 FF EB EB EB FF 7E 7E 7E FF 05 05' + '05 FF 00 00 00 F7 00 00 00 37 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 84 00 00 00 FF 3C 3C 3C FF D0 D0' + 'D0 FF FF FF FF FF F1 F1 F1 FF F1 F1 F1 FF F2 F2' + 'F2 FF F2 F2 F2 FF F3 F3 F3 FF F4 F4 F4 FF F4 F4' + 'F4 FF F5 F5 F5 FF F6 F6 F6 FF F6 F6 F6 FF F7 F7' + 'F7 FF F7 F7 F7 FF F8 F8 F8 FF F8 F8 F8 FF F8 F8' + 'F8 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9 F9 FF F8 F8' + 'F8 FF F6 F6 F6 FF F6 F6 F6 FF F5 F5 F5 FF F3 F3' + 'F3 FF F3 F3 F3 FF F3 F3 F3 FF F3 F3 F3 FF F4 F4' + 'F4 FF F4 F4 F4 FF F4 F4 F4 FF F5 F5 F5 FF F5 F5' + 'F5 FF F8 F8 F8 FF EB EB EB FF 7E 7E 7E FF 05 05' + '05 FF 00 00 00 F7 00 00 00 37 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 84 00 00 00 FF 3D 3D 3D FF D1 D1' + 'D1 FF FF FF FF FF F2 F2 F2 FF F2 F2 F2 FF F3 F3' + 'F3 FF F3 F3 F3 FF F4 F4 F4 FF F5 F5 F5 FF F5 F5' + 'F5 FF F6 F6 F6 FF F7 F7 F7 FF F7 F7 F7 FF F8 F8' + 'F8 FF F8 F8 F8 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9' + 'F9 FF FA FA FA FF FB FB FB FF FB FB FB FF FC FC' + 'FC FF FC FC FC FF FC FC FC FF FC FC FC FF FC FC' + 'FC FF FA FA FA FF F7 F7 F7 FF F5 F5 F5 FF F5 F5' + 'F5 FF F5 F5 F5 FF F5 F5 F5 FF F6 F6 F6 FF F6 F6' + 'F6 FF F9 F9 F9 FF EC EC EC FF 7F 7F 7F FF 05 05' + '05 FF 00 00 00 F7 00 00 00 37 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 84 00 00 00 FF 3D 3D 3D FF D1 D1' + 'D1 FF FF FF FF FF F3 F3 F3 FF F3 F3 F3 FF F4 F4' + 'F4 FF F4 F4 F4 FF F5 F5 F5 FF F6 F6 F6 FF F6 F6' + 'F6 FF F7 F7 F7 FF F8 F8 F8 FF F8 F8 F8 FF F8 F8' + 'F8 FF F9 F9 F9 FF F9 F9 F9 FF FA FA FA FF FA FA' + 'FA FF FA FA FA FF FA FA FA FF FB FB FB FF FC FC' + 'FC FF FC FC FC FF FD FD FD FF FD FD FD FF FD FD' + 'FD FF FD FD FD FF FE FE FE FF FD FD FD FF FA FA' + 'FA FF F7 F7 F7 FF F5 F5 F5 FF F6 F6 F6 FF F7 F7' + 'F7 FF FA FA FA FF EC EC EC FF 80 80 80 FF 05 05' + '05 FF 00 00 00 F7 00 00 00 37 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 84 00 00 00 FF 3E 3E 3E FF D2 D2' + 'D2 FF FF FF FF FF F4 F4 F4 FF F5 F5 F5 FF F5 F5' + 'F5 FF F5 F5 F5 FF F7 F7 F7 FF F7 F7 F7 FF F7 F7' + 'F7 FF F8 F8 F8 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9' + 'F9 FF FA FA FA FF FA FA FA FF FB FB FB FF FB FB' + 'FB FF FB FB FB FF FC FC FC FF FC FC FC FF FC FC' + 'FC FF FD FD FD FF FD FD FD FF FD FD FD FF FE FE' + 'FE FF FE FE FE FF FE FE FE FF FE FE FE FF FF FF' + 'FF FF FE FE FE FF FB FB FB FF F8 F8 F8 FF F7 F7' + 'F7 FF FB FB FB FF ED ED ED FF 81 81 81 FF 05 05' + '05 FF 00 00 00 F7 00 00 00 37 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 84 00 00 00 FF 3E 3E 3E FF D2 D2' + 'D2 FF FF FF FF FF F5 F5 F5 FF F6 F6 F6 FF F6 F6' + 'F6 FF F6 F6 F6 FF F7 F7 F7 FF F8 F8 F8 FF F8 F8' + 'F8 FF F8 F8 F8 FF F8 F8 F8 FF F9 F9 F9 FF FA FA' + 'FA FF FA FA FA FF FA FA FA FF FB FB FB FF FB FB' + 'FB FF FC FC FC FF FC FC FC FF FC FC FC FF FD FD' + 'FD FF FD FD FD FF FD FD FD FF FE FE FE FF FE FE' + 'FE FF FE FE FE FF FE FE FE FF FE FE FE FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FE FE FE FF FA FA' + 'FA FF FC FC FC FF ED ED ED FF 80 80 80 FF 05 05' + '05 FF 00 00 00 F7 00 00 00 37 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 84 00 00 00 FF 3E 3E 3E FF D3 D3' + 'D3 FF FF FF FF FF F6 F6 F6 FF F7 F7 F7 FF F7 F7' + 'F7 FF F7 F7 F7 FF F8 F8 F8 FF F9 F9 F9 FF F9 F9' + 'F9 FF F9 F9 F9 FF FA FA FA FF FA FA FA FF FA FA' + 'FA FF FB FB FB FF FB FB FB FF FC FC FC FF FC FC' + 'FC FF FC FC FC FF FD FD FD FF FD FD FD FF FD FD' + 'FD FF FD FD FD FF FE FE FE FF FE FE FE FF FE FE' + 'FE FF FE FE FE FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF EE EE EE FF 82 82 82 FF 05 05' + '05 FF 00 00 00 F7 00 00 00 37 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 84 00 00 00 FF 3E 3E 3E FF D3 D3' + 'D3 FF FF FF FF FF F7 F7 F7 FF F7 F7 F7 FF F8 F8' + 'F8 FF F9 F9 F9 FF F8 F8 F8 FF F8 F8 F8 FF FA FA' + 'FA FF FA FA FA FF FB FB FB FF FB FB FB FF FB FB' + 'FB FF FC FC FC FF FC FC FC FF FC FC FC FF FC FC' + 'FC FF FD FD FD FF FD FD FD FF FD FD FD FF FD FD' + 'FD FF FE FE FE FF FE FE FE FF FE FE FE FF FE FE' + 'FE FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF F0 F0 F0 FF 82 82 82 FF 05 05' + '05 FF 00 00 00 F7 00 00 00 37 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 84 00 00 00 FF 3F 3F 3F FF D4 D4' + 'D4 FF FF FF FF FF F8 F8 F8 FF F8 F8 F8 FF F9 F9' + 'F9 FF F9 F9 F9 FF FA FA FA FF FA FA FA FF FA FA' + 'FA FF FA FA FA FF FB FB FB FF FB FB FB FF FC FC' + 'FC FF FC FC FC FF FC FC FC FF FD FD FD FF FD FD' + 'FD FF FD FD FD FF FD FD FD FF FE FE FE FF FE FE' + 'FE FF FE FE FE FF FE FE FE FF FE FE FE FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF EF EF EF FF 82 82 82 FF 05 05' + '05 FF 00 00 00 F7 00 00 00 37 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 84 00 00 00 FF 3F 3F 3F FF D5 D5' + 'D5 FF FF FF FF FF F9 F9 F9 FF F9 F9 F9 FF F9 F9' + 'F9 FF FA FA FA FF FB FB FB FF FB FB FB FF FB FB' + 'FB FF FC FC FC FF FC FC FC FF FC FC FC FF FC FC' + 'FC FF FD FD FD FF FD FD FD FF FD FD FD FF FD FD' + 'FD FF FE FE FE FF FE FE FE FF FE FE FE FF FE FE' + 'FE FF FE FE FE FF FE FE FE FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF F0 F0 F0 FF 83 83 83 FF 05 05' + '05 FF 00 00 00 F7 00 00 00 37 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 84 00 00 00 FF 3F 3F 3F FF D5 D5' + 'D5 FF FF FF FF FF FA FA FA FF FA FA FA FF FB FB' + 'FB FF FB FB FB FF FB FB FB FF FB FB FB FF FC FC' + 'FC FF FC FC FC FF FC FC FC FF FD FD FD FF FD FD' + 'FD FF FD FD FD FF FD FD FD FF FE FE FE FF FE FE' + 'FE FF FE FE FE FF FE FE FE FF FE FE FE FF FE FE' + 'FE FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF F0 F0 F0 FF 84 84 84 FF 05 05' + '05 FF 00 00 00 F7 00 00 00 37 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 84 00 00 00 FF 40 40 40 FF D5 D5' + 'D5 FF FF FF FF FF FB FB FB FF FB FB FB FF FB FB' + 'FB FF FC FC FC FF FC FC FC FF FC FC FC FF FC FC' + 'FC FF FD FD FD FF FD FD FD FF FD FD FD FF FD FD' + 'FD FF FD FD FD FF FE FE FE FF FE FE FE FF FE FE' + 'FE FF FE FE FE FF FE FE FE FF FE FE FE FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF F0 F0 F0 FF 85 85 85 FF 05 05' + '05 FF 00 00 00 F7 00 00 00 37 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 84 00 00 00 FF 40 40 40 FF D6 D6' + 'D6 FF FF FF FF FF FB FB FB FF FB FB FB FF FC FC' + 'FC FF FC FC FC FF FD FD FD FF FD FD FD FF FD FD' + 'FD FF FD FD FD FF FD FD FD FF FE FE FE FF FE FE' + 'FE FF FE FE FE FF FE FE FE FF FE FE FE FF FE FE' + 'FE FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF F0 F0 F0 FF 85 85 85 FF 05 05' + '05 FF 00 00 00 F7 00 00 00 37 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 84 00 00 00 FF 41 41 41 FF D6 D6' + 'D6 FF FF FF FF FF FB FB FB FF FC FC FC FF FD FD' + 'FD FF FD FD FD FF FC FC FC FF FD FD FD FF FE FE' + 'FE FF FE FE FE FF FE FE FE FF FE FE FE FF FE FE' + 'FE FF FE FE FE FF FE FE FE FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF F0 F0 F0 FF 86 86 86 FF 05 05' + '05 FF 00 00 00 F7 00 00 00 37 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 84 00 00 00 FF 41 41 41 FF D6 D6' + 'D6 FF FF FF FF FF FD FD FD FF FD FD FD FF FD FD' + 'FD FF FE FE FE FF FE FE FE FF FE FE FE FF FE FE' + 'FE FF FE FE FE FF FE FE FE FF FE FE FE FF FE FE' + 'FE FF FE FE FE FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF F1 F1 F1 FF 87 87 87 FF 05 05' + '05 FF 00 00 00 F7 00 00 00 37 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 84 00 00 00 FF 41 41 41 FF D7 D7' + 'D7 FF FF FF FF FF FD FD FD FF FD FD FD FF FE FE' + 'FE FF FE FE FE FF FE FE FE FF FE FE FE FF FE FE' + 'FE FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF F1 F1 F1 FF 87 87 87 FF 05 05' + '05 FF 00 00 00 F7 00 00 00 37 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 84 00 00 00 FF 41 41 41 FF D7 D7' + 'D7 FF FF FF FF FF FE FE FE FF FE FE FE FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF F1 F1 F1 FF 88 88 88 FF 05 05' + '05 FF 00 00 00 F7 00 00 00 37 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 84 00 00 00 FF 41 41 41 FF D7 D7' + 'D7 FF FF FF FF FF FE FE FE FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF F1 F1 F1 FF 88 88 88 FF 05 05' + '05 FF 00 00 00 F7 00 00 00 37 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 84 00 00 00 FF 42 42 42 FF D8 D8' + 'D8 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF F1 F1 F1 FF 89 89 89 FF 05 05' + '05 FF 00 00 00 F7 00 00 00 37 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 84 00 00 00 FF 42 42 42 FF D9 D9' + 'D9 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF F2 F2 F2 FF 8A 8A 8A FF 05 05' + '05 FF 00 00 00 F7 00 00 00 37 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 84 00 00 00 FF 47 47 47 FF D9 D9' + 'D9 FF FB FB FB FF F8 F8 F8 FF F8 F8 F8 FF F8 F8' + 'F8 FF F7 F7 F7 FF F7 F7 F7 FF F7 F7 F7 FF F7 F7' + 'F7 FF F7 F7 F7 FF F7 F7 F7 FF F7 F7 F7 FF F7 F7' + 'F7 FF F6 F6 F6 FF F6 F6 F6 FF F6 F6 F6 FF F6 F6' + 'F6 FF F6 F6 F6 FF F5 F5 F5 FF F5 F5 F5 FF F5 F5' + 'F5 FF F5 F5 F5 FF F5 F5 F5 FF F4 F4 F4 FF F4 F4' + 'F4 FF F4 F4 F4 FF F4 F4 F4 FF F4 F4 F4 FF F4 F4' + 'F4 FF F4 F4 F4 FF F3 F3 F3 FF F3 F3 F3 FF F3 F3' + 'F3 FF F6 F6 F6 FF E8 E8 E8 FF 8F 8F 8F FF 06 06' + '06 FF 00 00 00 F7 00 00 00 38 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 83 00 00 00 FF 2D 2D 2D FF 98 98' + '98 FF 98 98 98 FF 97 97 97 FF 97 97 97 FF 97 97' + '97 FF 96 96 96 FF 95 95 95 FF 95 95 95 FF 95 95' + '95 FF 93 93 93 FF 93 93 93 FF 93 93 93 FF 92 92' + '92 FF 91 91 91 FF 90 90 90 FF 90 90 90 FF 90 90' + '90 FF 8F 8F 8F FF 8F 8F 8F FF 8E 8E 8E FF 8C 8C' + '8C FF 8C 8C 8C FF 8C 8C 8C FF 8B 8B 8B FF 89 89' + '89 FF 89 89 89 FF 88 88 88 FF 88 88 88 FF 86 86' + '86 FF 86 86 86 FF 86 86 86 FF 86 86 86 FF 84 84' + '84 FF 84 84 84 FF 87 87 87 FF 6C 6C 6C FF 04 04' + '04 FF 00 00 00 F7 00 00 00 33 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 47 00 00 00 F5 00 00 00 FF 04 04' + '04 FF 04 04 04 FF 04 04 04 FF 04 04 04 FF 04 04' + '04 FF 04 04 04 FF 04 04 04 FF 04 04 04 FF 04 04' + '04 FF 04 04 04 FF 04 04 04 FF 04 04 04 FF 04 04' + '04 FF 04 04 04 FF 04 04 04 FF 04 04 04 FF 04 04' + '04 FF 04 04 04 FF 04 04 04 FF 04 04 04 FF 04 04' + '04 FF 03 03 03 FF 03 03 03 FF 03 03 03 FF 03 03' + '03 FF 03 03 03 FF 03 03 03 FF 03 03 03 FF 03 03' + '03 FF 03 03 03 FF 03 03 03 FF 03 03 03 FF 03 03' + '03 FF 03 03 03 FF 03 03 03 FF 03 03 03 FF 00 00' + '00 FF 00 00 00 C1 00 00 00 14 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 52 00 00 00 EA 00 00' + '00 F3 00 00 00 F0 00 00 00 F0 00 00 00 F0 00 00' + '00 F0 00 00 00 F0 00 00 00 F0 00 00 00 F0 00 00' + '00 F0 00 00 00 F0 00 00 00 F0 00 00 00 F0 00 00' + '00 F0 00 00 00 F0 00 00 00 F0 00 00 00 F0 00 00' + '00 F0 00 00 00 F0 00 00 00 F0 00 00 00 F0 00 00' + '00 F0 00 00 00 F0 00 00 00 F0 00 00 00 F0 00 00' + '00 F0 00 00 00 F0 00 00 00 F0 00 00 00 F0 00 00' + '00 F0 00 00 00 F0 00 00 00 F0 00 00 00 F0 00 00' + '00 F0 00 00 00 F0 00 00 00 F0 00 00 00 F4 00 00' + '00 C7 00 00 00 29 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 F0 00 00 01 FF FF 00 00 E0 00' + '00 00 FF FF 00 00 E0 00 00 00 7F FF 00 00 E0 00' + '00 00 3F FF 00 00 E0 00 00 00 1F FF 00 00 E0 00' + '00 00 0F FF 00 00 E0 00 00 00 07 FF 00 00 E0 00' + '00 00 03 FF 00 00 E0 00 00 00 01 FF 00 00 E0 00' + '00 00 00 FF 00 00 E0 00 00 00 00 7F 00 00 E0 00' + '00 00 00 3F 00 00 E0 00 00 00 00 1F 00 00 E0 00' + '00 00 00 0F 00 00 E0 00 00 00 00 07 00 00 E0 00' + '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' + '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' + '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' + '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' + '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' + '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' + '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' + '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' + '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' + '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' + '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' + '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' + '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' + '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' + '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' + '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 F0 00' + '00 00 00 0F 00 00 28 00 00 00 20 00 00 00 40 00' + '00 00 01 00 20 00 00 00 00 00 00 10 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 3C 00 00' + '00 64 00 00 00 61 00 00 00 61 00 00 00 61 00 00' + '00 61 00 00 00 61 00 00 00 61 00 00 00 61 00 00' + '00 61 00 00 00 61 00 00 00 61 00 00 00 61 00 00' + '00 61 00 00 00 61 00 00 00 62 00 00 00 41 00 00' + '00 06 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 4D 01 01 01 FB 05 05' + '05 FF 03 03 03 FF 03 03 03 FF 02 02 02 FF 02 02' + '02 FF 02 02 02 FF 02 02 02 FF 02 02 02 FF 02 02' + '02 FF 02 02 02 FF 02 02 02 FF 02 02 02 FF 01 01' + '01 FF 00 00 00 FF 03 03 03 FF 01 01 01 FD 00 00' + '00 7F 00 00 00 02 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 84 1A 1A 1A FF 8C 8C' + '8C FF 9F 9F 9F FF 9C 9C 9C FF 9A 9A 9A FF 9A 9A' + '9A FF 99 99 99 FF 99 99 99 FF 97 97 97 FF 97 97' + '97 FF 96 96 96 FF 96 96 96 FF 95 95 95 FF 93 93' + '93 FF 8E 8E 8E FF 7D 7D 7D FF 33 33 33 FF 00 00' + '00 FD 00 00 00 79 00 00 00 02 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 84 1D 1D 1D FF C6 C6' + 'C6 FF F7 F7 F7 FF EA EA EA FF EB EB EB FF EB EB' + 'EB FF EB EB EB FF EB EB EB FF EC EC EC FF EC EC' + 'EC FF ED ED ED FF EE EE EE FF EE EE EE FF EF EF' + 'EF FF F3 F3 F3 FF B7 B7 B7 FF 94 94 94 FF 34 34' + '34 FF 00 00 00 FD 00 00 00 7A 00 00 00 02 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 84 1C 1C 1C FF C4 C4' + 'C4 FF EB EB EB FF D8 D8 D8 FF DA DA DA FF DB DB' + 'DB FF DB DB DB FF DC DC DC FF DC DC DC FF DC DC' + 'DC FF DD DD DD FF DD DD DD FF DD DD DD FF DE DE' + 'DE FF E0 E0 E0 FF AE AE AE FF D1 D1 D1 FF A4 A4' + 'A4 FF 32 32 32 FF 00 00 00 FD 00 00 00 7A 00 00' + '00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 84 1C 1C 1C FF C4 C4' + 'C4 FF ED ED ED FF DB DB DB FF DD DD DD FF DD DD' + 'DD FF DE DE DE FF DE DE DE FF DE DE DE FF DF DF' + 'DF FF DF DF DF FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' + 'E0 FF E2 E2 E2 FF AE AE AE FF D9 D9 D9 FF E9 E9' + 'E9 FF A3 A3 A3 FF 2E 2E 2E FF 00 00 00 FD 00 00' + '00 7A 00 00 00 02 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 84 1D 1D 1D FF C6 C6' + 'C6 FF EF EF EF FF DD DD DD FF DF DF DF FF DF DF' + 'DF FF DF DF DF FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' + 'E0 FF E1 E1 E1 FF E1 E1 E1 FF E1 E1 E1 FF E2 E2' + 'E2 FF E4 E4 E4 FF B0 B0 B0 FF DA DA DA FF F1 F1' + 'F1 FF EC EC EC FF A3 A3 A3 FF 2B 2B 2B FF 00 00' + '00 FD 00 00 00 79 00 00 00 01 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 84 1D 1D 1D FF C6 C6' + 'C6 FF EF EF EF FF DE DE DE FF E0 E0 E0 FF E0 E0' + 'E0 FF E1 E1 E1 FF E1 E1 E1 FF E1 E1 E1 FF E2 E2' + 'E2 FF E2 E2 E2 FF E3 E3 E3 FF E3 E3 E3 FF E3 E3' + 'E3 FF E5 E5 E5 FF B1 B1 B1 FF DE DE DE FF F2 F2' + 'F2 FF F4 F4 F4 FF F1 F1 F1 FF A4 A4 A4 FF 2B 2B' + '2B FF 00 00 00 FC 00 00 00 72 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 84 1D 1D 1D FF C7 C7' + 'C7 FF F1 F1 F1 FF E0 E0 E0 FF E2 E2 E2 FF E2 E2' + 'E2 FF E2 E2 E2 FF E3 E3 E3 FF E3 E3 E3 FF E3 E3' + 'E3 FF E4 E4 E4 FF E4 E4 E4 FF E4 E4 E4 FF E5 E5' + 'E5 FF E7 E7 E7 FF B3 B3 B3 FF E1 E1 E1 FF F6 F6' + 'F6 FF F4 F4 F4 FF F9 F9 F9 FF F6 F6 F6 FF A6 A6' + 'A6 FF 2D 2D 2D FF 00 00 00 F9 00 00 00 6F 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 84 1E 1E 1E FF C7 C7' + 'C7 FF F1 F1 F1 FF E2 E2 E2 FF E3 E3 E3 FF E3 E3' + 'E3 FF E4 E4 E4 FF E4 E4 E4 FF E5 E5 E5 FF E5 E5' + 'E5 FF E5 E5 E5 FF E5 E5 E5 FF E6 E6 E6 FF E6 E6' + 'E6 FF E8 E8 E8 FF B5 B5 B5 FF E8 E8 E8 FF FE FE' + 'FE FF FC FC FC FF FD FD FD FF FF FF FF FF FC FC' + 'FC FF AD AD AD FF 31 31 31 FF 00 00 00 F9 00 00' + '00 6F 00 00 00 01 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 84 1E 1E 1E FF C8 C8' + 'C8 FF F3 F3 F3 FF E3 E3 E3 FF E5 E5 E5 FF E5 E5' + 'E5 FF E5 E5 E5 FF E6 E6 E6 FF E6 E6 E6 FF E6 E6' + 'E6 FF E7 E7 E7 FF E7 E7 E7 FF E7 E7 E7 FF E8 E8' + 'E8 FF EA EA EA FF B2 B2 B2 FF D8 D8 D8 FF EC EC' + 'EC FF EA EA EA FF EB EB EB FF EB EB EB FF EF EF' + 'EF FF EA EA EA FF 98 98 98 FF 2C 2C 2C FF 00 00' + '00 F5 00 00 00 42 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 84 1E 1E 1E FF C8 C8' + 'C8 FF F3 F3 F3 FF E5 E5 E5 FF E6 E6 E6 FF E6 E6' + 'E6 FF E7 E7 E7 FF E7 E7 E7 FF E7 E7 E7 FF E8 E8' + 'E8 FF E8 E8 E8 FF E8 E8 E8 FF E9 E9 E9 FF E9 E9' + 'E9 FF EC EC EC FF C9 C9 C9 FF B3 B3 B3 FF B6 B6' + 'B6 FF B5 B5 B5 FF B5 B5 B5 FF B5 B5 B5 FF B4 B4' + 'B4 FF B6 B6 B6 FF BA BA BA FF 80 80 80 FF 03 03' + '03 FF 00 00 00 61 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 84 1F 1F 1F FF C9 C9' + 'C9 FF F5 F5 F5 FF E8 E8 E8 FF E8 E8 E8 FF E8 E8' + 'E8 FF E8 E8 E8 FF E9 E9 E9 FF E9 E9 E9 FF E9 E9' + 'E9 FF EA EA EA FF EA EA EA FF EA EA EA FF EB EB' + 'EB FF EB EB EB FF EE EE EE FF EE EE EE FF ED ED' + 'ED FF EE EE EE FF EE EE EE FF EF EF EF FF EF EF' + 'EF FF F0 F0 F0 FF F7 F7 F7 FF 93 93 93 FF 02 02' + '02 FF 00 00 00 61 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 84 1F 1F 1F FF CA CA' + 'CA FF F7 F7 F7 FF EA EA EA FF EC EC EC FF EA EA' + 'EA FF E9 E9 E9 FF EA EA EA FF EA EA EA FF EB EB' + 'EB FF EB EB EB FF EC EC EC FF EC EC EC FF EC EC' + 'EC FF ED ED ED FF ED ED ED FF EE EE EE FF EE EE' + 'EE FF EE EE EE FF EF EF EF FF EF EF EF FF EF EF' + 'EF FF F1 F1 F1 FF F6 F6 F6 FF 93 93 93 FF 02 02' + '02 FF 00 00 00 61 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 84 1F 1F 1F FF CA CA' + 'CA FF F8 F8 F8 FF EC EC EC FF EE EE EE FF EF EF' + 'EF FF EE EE EE FF EB EB EB FF EB EB EB FF EC EC' + 'EC FF ED ED ED FF ED ED ED FF ED ED ED FF EE EE' + 'EE FF EE EE EE FF EF EF EF FF EF EF EF FF EF EF' + 'EF FF F0 F0 F0 FF F0 F0 F0 FF F0 F0 F0 FF F1 F1' + 'F1 FF F2 F2 F2 FF F7 F7 F7 FF 93 93 93 FF 02 02' + '02 FF 00 00 00 61 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 84 20 20 20 FF CB CB' + 'CB FF F9 F9 F9 FF EE EE EE FF F0 F0 F0 FF F1 F1' + 'F1 FF F2 F2 F2 FF F1 F1 F1 FF EE EE EE FF ED ED' + 'ED FF EE EE EE FF EE EE EE FF EE EE EE FF EF EF' + 'EF FF EF EF EF FF EF EF EF FF F0 F0 F0 FF F1 F1' + 'F1 FF F1 F1 F1 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2' + 'F2 FF F3 F3 F3 FF F8 F8 F8 FF 94 94 94 FF 02 02' + '02 FF 00 00 00 61 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 84 20 20 20 FF CC CC' + 'CC FF FB FB FB FF F0 F0 F0 FF F2 F2 F2 FF F2 F2' + 'F2 FF F4 F4 F4 FF F5 F5 F5 FF F5 F5 F5 FF F4 F4' + 'F4 FF F3 F3 F3 FF F3 F3 F3 FF F3 F3 F3 FF F3 F3' + 'F3 FF F3 F3 F3 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2' + 'F2 FF F2 F2 F2 FF F2 F2 F2 FF F3 F3 F3 FF F4 F4' + 'F4 FF F5 F5 F5 FF F9 F9 F9 FF 94 94 94 FF 02 02' + '02 FF 00 00 00 61 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 84 20 20 20 FF CD CD' + 'CD FF FB FB FB FF F2 F2 F2 FF F3 F3 F3 FF F4 F4' + 'F4 FF F5 F5 F5 FF F6 F6 F6 FF F7 F7 F7 FF F8 F8' + 'F8 FF F9 F9 F9 FF F9 F9 F9 FF FA FA FA FF FB FB' + 'FB FF FB FB FB FF FB FB FB FF FA FA FA FF F8 F8' + 'F8 FF F6 F6 F6 FF F5 F5 F5 FF F4 F4 F4 FF F5 F5' + 'F5 FF F6 F6 F6 FF FA FA FA FF 95 95 95 FF 02 02' + '02 FF 00 00 00 61 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 84 21 21 21 FF CE CE' + 'CE FF FD FD FD FF F4 F4 F4 FF F4 F4 F4 FF F6 F6' + 'F6 FF F6 F6 F6 FF F7 F7 F7 FF F8 F8 F8 FF F8 F8' + 'F8 FF FA FA FA FF FA FA FA FF FB FB FB FF FB FB' + 'FB FF FC FC FC FF FD FD FD FF FD FD FD FF FE FE' + 'FE FF FE FE FE FF FC FC FC FF F9 F9 F9 FF F6 F6' + 'F6 FF F7 F7 F7 FF FB FB FB FF 96 96 96 FF 02 02' + '02 FF 00 00 00 61 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 84 21 21 21 FF CE CE' + 'CE FF FE FE FE FF F5 F5 F5 FF F6 F6 F6 FF F7 F7' + 'F7 FF F8 F8 F8 FF F9 F9 F9 FF F9 F9 F9 FF FA FA' + 'FA FF FB FB FB FF FB FB FB FF FC FC FC FF FC FC' + 'FC FF FD FD FD FF FD FD FD FF FE FE FE FF FE FE' + 'FE FF FE FE FE FF FF FF FF FF FF FF FF FF FD FD' + 'FD FF FB FB FB FF FC FC FC FF 97 97 97 FF 02 02' + '02 FF 00 00 00 61 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 84 21 21 21 FF CF CF' + 'CF FF FF FF FF FF F7 F7 F7 FF F8 F8 F8 FF F8 F8' + 'F8 FF F9 F9 F9 FF FA FA FA FF FA FA FA FF FB FB' + 'FB FF FB FB FB FF FC FC FC FF FC FC FC FF FD FD' + 'FD FF FD FD FD FF FE FE FE FF FE FE FE FF FE FE' + 'FE FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF 98 98 98 FF 02 02' + '02 FF 00 00 00 61 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 84 22 22 22 FF CF CF' + 'CF FF FF FF FF FF F8 F8 F8 FF F9 F9 F9 FF FA FA' + 'FA FF FA FA FA FF FA FA FA FF FB FB FB FF FC FC' + 'FC FF FC FC FC FF FD FD FD FF FD FD FD FF FE FE' + 'FE FF FE FE FE FF FE FE FE FF FE FE FE FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF 99 99 99 FF 02 02' + '02 FF 00 00 00 61 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 84 22 22 22 FF D0 D0' + 'D0 FF FF FF FF FF F9 F9 F9 FF FA FA FA FF FB FB' + 'FB FF FB FB FB FF FB FB FB FF FC FC FC FF FD FD' + 'FD FF FD FD FD FF FE FE FE FF FE FE FE FF FE FE' + 'FE FF FE FE FE FF FE FE FE FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF 99 99 99 FF 02 02' + '02 FF 00 00 00 61 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 84 23 23 23 FF D1 D1' + 'D1 FF FF FF FF FF FA FA FA FF FB FB FB FF FC FC' + 'FC FF FC FC FC FF FD FD FD FF FD FD FD FF FD FD' + 'FD FF FE FE FE FF FE FE FE FF FE FE FE FF FE FE' + 'FE FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF 9A 9A 9A FF 02 02' + '02 FF 00 00 00 61 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 84 23 23 23 FF D1 D1' + 'D1 FF FF FF FF FF FC FC FC FF FC FC FC FF FD FD' + 'FD FF FD FD FD FF FD FD FD FF FE FE FE FF FE FE' + 'FE FF FE FE FE FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF 9B 9B 9B FF 02 02' + '02 FF 00 00 00 61 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 84 23 23 23 FF D2 D2' + 'D2 FF FF FF FF FF FD FD FD FF FD FD FD FF FD FD' + 'FD FF FE FE FE FF FE FE FE FF FE FE FE FF FE FE' + 'FE FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF 9C 9C 9C FF 03 03' + '03 FF 00 00 00 61 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 84 23 23 23 FF D3 D3' + 'D3 FF FF FF FF FF FE FE FE FF FE FE FE FF FE FE' + 'FE FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF 9D 9D 9D FF 03 03' + '03 FF 00 00 00 61 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 84 23 23 23 FF D3 D3' + 'D3 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF 9D 9D 9D FF 03 03' + '03 FF 00 00 00 61 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 84 24 24 24 FF D4 D4' + 'D4 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF 9E 9E 9E FF 03 03' + '03 FF 00 00 00 61 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 84 27 27 27 FF D8 D8' + 'D8 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FE FE FE FF FE FE' + 'FE FF FE FE FE FF FE FE FE FF FE FE FE FF FD FD' + 'FD FF FD FD FD FF FD FD FD FF FD FD FD FF FD FD' + 'FD FF FD FD FD FF FC FC FC FF FC FC FC FF FC FC' + 'FC FF FD FD FD FF FF FF FF FF A3 A3 A3 FF 04 04' + '04 FF 00 00 00 61 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 7F 18 18 18 FF 77 77' + '77 FF 7D 7D 7D FF 7B 7B 7B FF 7A 7A 7A FF 79 79' + '79 FF 79 79 79 FF 78 78 78 FF 78 78 78 FF 77 77' + '77 FF 76 76 76 FF 75 75 75 FF 75 75 75 FF 74 74' + '74 FF 73 73 73 FF 72 72 72 FF 71 71 71 FF 70 70' + '70 FF 70 70 70 FF 6F 6F 6F FF 6E 6E 6E FF 6E 6E' + '6E FF 6D 6D 6D FF 6E 6E 6E FF 59 59 59 FF 03 03' + '03 FF 00 00 00 59 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 2A 00 00 00 D3 00 00' + '00 F5 00 00 00 F0 00 00 00 F0 00 00 00 F0 00 00' + '00 F0 00 00 00 F0 00 00 00 F0 00 00 00 F0 00 00' + '00 F0 00 00 00 F0 00 00 00 F0 00 00 00 F0 00 00' + '00 F0 00 00 00 F0 00 00 00 F0 00 00 00 F0 00 00' + '00 F0 00 00 00 F0 00 00 00 F0 00 00 00 F0 00 00' + '00 F0 00 00 00 F0 00 00 00 F0 00 00 00 F6 00 00' + '00 B6 00 00 00 14 00 00 00 00 00 00 00 00 E0 00' + '07 FF C0 00 03 FF C0 00 01 FF C0 00 00 FF C0 00' + '00 7F C0 00 00 3F C0 00 00 1F C0 00 00 1F C0 00' + '00 0F C0 00 00 03 C0 00 00 03 C0 00 00 03 C0 00' + '00 03 C0 00 00 03 C0 00 00 03 C0 00 00 03 C0 00' + '00 03 C0 00 00 03 C0 00 00 03 C0 00 00 03 C0 00' + '00 03 C0 00 00 03 C0 00 00 03 C0 00 00 03 C0 00' + '00 03 C0 00 00 03 C0 00 00 03 C0 00 00 03 C0 00' + '00 03 C0 00 00 03 C0 00 00 03 C0 00 00 03 28 00' + '00 00 10 00 00 00 20 00 00 00 01 00 20 00 00 00' + '00 00 00 04 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 01 01 01 63 05 05' + '05 AF 04 04 04 A8 04 04 04 A8 04 04 04 A8 04 04' + '04 A8 03 03 03 A8 03 03 03 AA 02 02 02 A0 00 00' + '00 2C 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 13 13 13 CB A8 A8' + 'A8 FF BC BC BC FF B7 B7 B7 FF B7 B7 B7 FF B6 B6' + 'B6 FF B7 B7 B7 FF B6 B6 B6 FF 7A 7A 7A FF 0F 0F' + '0F D5 00 00 00 28 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 17 17 17 CC D1 D1' + 'D1 FF EA EA EA FF E5 E5 E5 FF E6 E6 E6 FF E7 E7' + 'E7 FF E9 E9 E9 FF E3 E3 E3 FF D0 D0 D0 FF 95 95' + '95 FF 0B 0B 0B D5 00 00 00 28 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 17 17 17 CC CD CD' + 'CD FF E4 E4 E4 FF DF DF DF FF E0 E0 E0 FF E1 E1' + 'E1 FF E2 E2 E2 FF DA DA DA FF CE CE CE FF F9 F9' + 'F9 FF 95 95 95 FF 0A 0A 0A D4 00 00 00 25 00 00' + '00 00 00 00 00 00 00 00 00 00 17 17 17 CC D0 D0' + 'D0 FF E7 E7 E7 FF E3 E3 E3 FF E4 E4 E4 FF E4 E4' + 'E4 FF E6 E6 E6 FF DD DD DD FF D2 D2 D2 FF FF FF' + 'FF FF FF FF FF FF 9E 9E 9E FF 0D 0D 0D D1 00 00' + '00 24 00 00 00 00 00 00 00 00 17 17 17 CC D1 D1' + 'D1 FF EB EB EB FF E5 E5 E5 FF E7 E7 E7 FF E7 E7' + 'E7 FF E9 E9 E9 FF E4 E4 E4 FF CB CB CB FF D7 D7' + 'D7 FF D9 D9 D9 FF DF DF DF FF 7C 7C 7C FF 00 00' + '00 9D 00 00 00 00 00 00 00 00 17 17 17 CC D4 D4' + 'D4 FF F0 F0 F0 FF E9 E9 E9 FF E9 E9 E9 FF EA EA' + 'EA FF EB EB EB FF EC EC EC FF E8 E8 E8 FF E4 E4' + 'E4 FF E5 E5 E5 FF EF EF EF FF BC BC BC FF 03 03' + '03 A8 00 00 00 00 00 00 00 00 17 17 17 CC D6 D6' + 'D6 FF F4 F4 F4 FF EF EF EF FF EE EE EE FF ED ED' + 'ED FF ED ED ED FF EE EE EE FF F0 F0 F0 FF F1 F1' + 'F1 FF F1 F1 F1 FF FC FC FC FF BD BD BD FF 02 02' + '02 A8 00 00 00 00 00 00 00 00 18 18 18 CC D8 D8' + 'D8 FF F8 F8 F8 FF F4 F4 F4 FF F5 F5 F5 FF F5 F5' + 'F5 FF F6 F6 F6 FF F6 F6 F6 FF F6 F6 F6 FF F5 F5' + 'F5 FF F4 F4 F4 FF FE FE FE FF BE BE BE FF 03 03' + '03 A8 00 00 00 00 00 00 00 00 18 18 18 CC DB DB' + 'DB FF FB FB FB FF F6 F6 F6 FF F8 F8 F8 FF FA FA' + 'FA FF FB FB FB FF FC FC FC FF FD FD FD FF FE FE' + 'FE FF FD FD FD FF FF FF FF FF C0 C0 C0 FF 02 02' + '02 A8 00 00 00 00 00 00 00 00 18 18 18 CC DC DC' + 'DC FF FE FE FE FF F9 F9 F9 FF FB FB FB FF FC FC' + 'FC FF FC FC FC FF FD FD FD FF FE FE FE FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF C3 C3 C3 FF 02 02' + '02 A8 00 00 00 00 00 00 00 00 18 18 18 CC DE DE' + 'DE FF FF FF FF FF FC FC FC FF FC FC FC FF FD FD' + 'FD FF FE FE FE FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF C4 C4 C4 FF 03 03' + '03 A8 00 00 00 00 00 00 00 00 18 18 18 CC DF DF' + 'DF FF FF FF FF FF FD FD FD FF FE FE FE FF FE FE' + 'FE FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF C5 C5 C5 FF 03 03' + '03 A8 00 00 00 00 00 00 00 00 19 19 19 CC E2 E2' + 'E2 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF C7 C7 C7 FF 03 03' + '03 A8 00 00 00 00 00 00 00 00 19 19 19 CC E2 E2' + 'E2 FF FF FF FF FF FD FD FD FF FD FD FD FF FD FD' + 'FD FF FD FD FD FF FD FD FD FF FC FC FC FF FC FC' + 'FC FF FB FB FB FF FF FF FF FF C6 C6 C6 FF 04 04' + '04 A8 00 00 00 00 00 00 00 00 09 09 09 A0 41 41' + '41 F9 46 46 46 F0 44 44 44 F0 44 44 44 F0 43 43' + '43 F0 42 42 42 F0 42 42 42 F0 41 41 41 F0 3F 3F' + '3F F0 3F 3F 3F F0 40 40 40 F0 36 36 36 FB 02 02' + '02 82 00 00 00 00 80 1F 00 00 80 0F 00 00 80 07' + '00 00 80 03 00 00 80 01 00 00 80 01 00 00 80 01' + '00 00 80 01 00 00 80 01 00 00 80 01 00 00 80 01' + '00 00 80 01 00 00 80 01 00 00 80 01 00 00 80 01' + '00 00 80 01 00 00' +} */ + + +/* BINRES folder.ico */ +3 ICON folder.ico +/* { + '00 00 01 00 08 00 20 20 00 00 01 00 08 00 A8 08' + '00 00 86 00 00 00 10 10 00 00 01 00 08 00 68 05' + '00 00 2E 09 00 00 20 20 00 00 01 00 04 00 E8 02' + '00 00 96 0E 00 00 10 10 00 00 01 00 04 00 28 01' + '00 00 7E 11 00 00 30 30 00 00 01 00 08 00 A8 0E' + '00 00 A6 12 00 00 30 30 00 00 01 00 20 00 A8 25' + '00 00 4E 21 00 00 20 20 00 00 01 00 20 00 A8 10' + '00 00 F6 46 00 00 10 10 00 00 01 00 20 00 68 04' + '00 00 9E 57 00 00 28 00 00 00 20 00 00 00 40 00' + '00 00 01 00 08 00 00 00 00 00 00 04 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 11 00 00 00 00 11 00 00 00 00 11 00 22 00' + '00 00 33 00 00 00 33 33 00 00 33 33 33 00 44 00' + '00 00 66 33 00 00 66 33 33 00 66 66 33 00 7F 7F' + '7F 00 99 33 00 00 99 33 33 00 99 66 33 00 99 66' + '66 00 CC 66 66 00 FF 99 33 00 FF CC 33 00 99 99' + '66 00 CC 99 66 00 FF 99 66 00 CC CC 66 00 FF CC' + '66 00 BB BB BB 00 CC 99 99 00 FF 99 99 00 CC CC' + '99 00 FF CC 99 00 FF FF 99 00 CC 99 CC 00 CC CC' + 'CC 00 DD DD DD 00 FF CC CC 00 FF FF CC 00 FF CC' + 'FF 00 EE EE EE 00 FF FF FF 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 C0 17 95 00 00 00 38 00 A8 44' + 'F9 77 13 00 00 00 18 0A 38 00 00 00 38 00 18 6C' + '38 00 98 17 95 00 00 00 00 00 E0 19 95 00 F0 88' + 'FA 77 70 38 F5 77 FF FF FF FF A8 44 F9 77 70 7D' + 'F5 77 3A 8A F5 77 86 00 00 00 86 00 00 00 08 00' + '00 00 B0 18 95 00 00 00 00 00 CB 44 F9 77 38 9F' + '07 00 CD 8B F5 77 78 13 05 00 37 90 F5 77 00 00' + '00 00 3E 8A F5 77 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 10 00' + '00 00 00 00 00 00 56 00 58 00 00 EC FD 7F 1A 02' + '00 00 4C 16 95 00 40 9F 07 00 FC 15 95 00 FF FF' + 'FF FF B4 1A 95 00 45 00 00 00 28 02 00 00 FF FF' + 'FF FF E2 D8 F5 77 7D 9B F5 77 94 B6 01 00 00 00' + '05 00 F4 17 95 00 80 00 10 C0 B4 1A 95 00 F0 88' + 'FA 77 88 1C F5 77 FF FF FF FF 37 90 F5 77 00 00' + '00 00 3E 8A F5 77 9B B2 E7 77 B7 00 00 00 02 00' + '00 00 A4 1A 95 00 01 00 00 00 18 00 00 00 00 00' + '00 00 10 19 95 00 42 00 00 00 00 00 00 00 F4 18' + '95 00 00 00 00 00 00 00 00 00 00 00 00 00 0C 00' + '00 00 02 00 00 00 01 01 F5 77 00 EC FD 7F 56 00' + '00 00 00 00 00 00 03 00 00 00 5E 00 1A 02 40 9F' + '07 00 00 00 00 00 40 9F 07 00 05 00 00 00 BE B3' + 'E7 77 4C 19 95 00 A3 B4 E7 77 F8 00 00 00 00 00' + '00 C0 00 00 00 00 00 00 00 00 02 00 00 00 80 00' + '00 00 00 00 00 00 8C 1A 95 00 7F E9 4B 00 08 6C' + '0C 01 00 00 00 C0 00 00 00 00 80 1A 95 00 02 00' + '00 00 80 00 00 00 00 00 00 00 C0 27 95 00 C4 F5' + 'AF 00 02 00 00 00 44 3A 5C 6F 73 65 78 70 65 72' + '74 73 5C 72 65 61 63 74 6F 73 5C 6C 69 62 5C 73' + '68 65 6C 6C 33 32 5C 66 6F 6C 64 65 72 2E 69 63' + '6F 00 1A 93 4B 00 14 1A 95 00 1F 3B D4 77 13 00' + '00 00 98 00 00 00 4F 3B D4 77 E0 19 95 00 33 3B' + 'D4 77 64 C5 F5 77 A9 F1 E7 77 F8 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 1A 95 00 18 6C' + '38 00 86 00 00 00 00 00 00 00 C9 F1 E7 77 86 00' + '00 00 A4 1A 95 00 08 00 00 00 00 00 00 00 86 00' + '00 00 86 00 00 00 08 00 00 00 F4 19 95 00 33 3B' + 'D4 77 B4 1A 95 00 09 48 E9 77 B8 10 E9 77 FF FF' + 'FF FF C9 F1 E7 77 16 EA 4B 00 F8 00 00 00 18 6C' + '38 00 86 00 00 00 58 1A 95 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 27 27 27 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 27 02 03 27 27' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 27 03 04 0D 06 27' + '27 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 27 27 27 09 11 22 1A 06' + '27 27 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 27 27 27 0F 1B 22 26 26 1A' + '05 27 27 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 27 02 08 15 1B 1C 26 26 26 26' + '1A 04 27 27 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 27 27 27 08 1A 1D 1A 26 26 26 26 26' + '25 15 04 27 27 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 27 27 27 0A 1D 1D 1A 1D 1D 26 26 26 26' + '26 25 10 04 27 27 00 00 00 00 00 00 00 00 00 00' + '00 00 27 01 01 10 23 1D 15 23 16 12 18 26 26 26' + '26 26 25 10 01 27 27 00 00 00 00 00 00 00 00 00' + '27 27 02 06 1B 23 1D 1A 22 12 12 16 12 1D 26 26' + '26 25 25 25 10 01 27 27 00 00 00 00 00 00 00 27' + '27 27 0E 22 23 1D 1A 22 18 12 16 12 16 12 18 25' + '26 24 25 23 25 10 01 27 27 00 00 00 00 00 27 01' + '04 15 23 22 22 1C 1D 1B 12 16 12 12 18 16 16 1D' + '23 25 25 21 25 22 10 01 27 27 00 00 00 00 03 06' + '1D 25 25 23 1C 1B 1D 13 16 12 18 16 12 16 18 16' + '1D 25 25 25 22 21 21 0F 01 27 27 00 00 00 27 09' + '22 23 22 22 17 1D 16 12 16 16 12 16 16 18 16 18' + '1B 1D 25 21 21 21 20 22 09 02 27 27 00 00 27 27' + '06 22 23 15 1D 16 12 16 16 13 16 18 12 16 18 1B' + '18 1D 1D 21 21 20 22 20 22 0A 27 27 27 00 00 27' + '27 09 16 1D 16 13 16 16 12 16 12 16 16 18 16 18' + '1D 1D 1E 22 20 22 19 20 19 22 0F 27 27 27 00 00' + '27 27 09 16 12 16 16 12 18 16 16 12 18 16 18 1D' + '1D 1D 22 22 23 20 22 19 22 19 1C 0E 27 27 00 00' + '00 27 27 09 16 16 16 18 16 12 18 16 16 1D 1D 1D' + '22 1E 22 23 22 23 20 19 19 22 1F 14 01 27 00 00' + '00 00 27 27 09 12 18 16 12 16 16 1D 1D 1D 1D 23' + '1D 22 23 22 23 23 25 22 19 19 14 02 27 27 00 00' + '00 00 00 27 27 09 16 18 16 18 1D 1D 1D 1D 22 1D' + '23 22 23 23 23 24 23 25 20 1A 04 27 27 00 00 00' + '00 00 00 00 27 27 09 16 18 1D 22 1D 1D 22 1D 23' + '22 23 22 23 24 23 26 26 1D 07 27 27 00 00 00 00' + '00 00 00 00 00 27 27 09 1D 22 1D 22 1D 22 23 22' + '23 22 26 23 25 23 25 22 0A 27 27 00 00 00 00 00' + '00 00 00 00 00 00 27 27 10 1D 22 1E 22 23 22 23' + '22 23 23 24 23 26 25 0B 27 27 00 00 00 00 00 00' + '00 00 00 00 00 00 27 27 15 23 22 22 23 22 23 24' + '23 25 25 23 26 26 0F 27 27 00 00 00 00 00 00 00' + '00 00 00 00 00 00 27 27 05 1C 23 22 22 23 24 23' + '25 25 23 26 26 10 27 27 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 27 27 04 17 22 23 23 25 25' + '23 25 26 26 15 27 27 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 27 27 04 1D 26 26 25 23' + '26 26 25 22 04 27 27 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 27 27 06 22 25 26 26' + '25 26 22 06 27 27 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 27 27 04 1C 26 26' + '26 23 07 27 27 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 27 27 01 1A 26' + '23 0A 27 27 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 27 27 27 06' + '04 27 27 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 27 27' + '27 27 00 00 00 00 00 00 00 00 00 00 00 00 FF FC' + '7F FF FF F8 3F FF FF F0 1F FF FF C0 0F FF FF 80' + '07 FF FF 00 03 FF FC 00 01 FF F8 00 00 FF F0 00' + '00 7F C0 00 00 3F 80 00 00 1F 00 00 00 0F 00 00' + '00 07 00 00 00 03 00 00 00 01 80 00 00 00 C0 00' + '00 00 E0 00 00 00 F0 00 00 00 F8 00 00 01 FC 00' + '00 03 FE 00 00 07 FF 00 00 0F FF 00 00 1F FF 00' + '00 3F FF 80 00 7F FF C0 00 7F FF E0 00 FF FF F0' + '01 FF FF F8 03 FF FF FC 07 FF FF FF 0F FF 28 00' + '00 00 10 00 00 00 20 00 00 00 01 00 08 00 00 00' + '00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 11 00 00 00 00 11' + '00 00 00 00 11 00 11 11 11 00 22 00 00 00 33 00' + '00 00 33 33 00 00 33 00 33 00 22 22 22 00 33 33' + '33 00 66 33 00 00 66 33 33 00 66 66 33 00 44 44' + '44 00 66 66 66 00 77 77 77 00 7F 7F 7F 00 99 66' + '66 00 FF 99 33 00 99 99 66 00 CC 99 66 00 FF 99' + '66 00 FF CC 66 00 CC 99 99 00 CC CC 99 00 FF CC' + '99 00 FF FF 99 00 CC 99 CC 00 CC CC CC 00 DD DD' + 'DD 00 FF CC CC 00 FF FF CC 00 EE EE EE 00 FF FF' + 'FF 00 00 00 00 00 FF CC FF 00 EE EE EE 00 FF FF' + 'FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 C0 17' + '95 00 00 00 38 00 A8 44 F9 77 13 00 00 00 18 0A' + '38 00 00 00 38 00 18 6C 38 00 98 17 95 00 00 00' + '00 00 E0 19 95 00 F0 88 FA 77 70 38 F5 77 FF FF' + 'FF FF A8 44 F9 77 70 7D F5 77 3A 8A F5 77 86 00' + '00 00 86 00 00 00 08 00 00 00 B0 18 95 00 00 00' + '00 00 CB 44 F9 77 38 9F 07 00 CD 8B F5 77 78 13' + '05 00 37 90 F5 77 00 00 00 00 3E 8A F5 77 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 10 00 00 00 00 00 00 00 56 00' + '58 00 00 EC FD 7F 1A 02 00 00 4C 16 95 00 40 9F' + '07 00 FC 15 95 00 FF FF FF FF B4 1A 95 00 45 00' + '00 00 28 02 00 00 FF FF FF FF E2 D8 F5 77 7D 9B' + 'F5 77 94 B6 01 00 00 00 05 00 F4 17 95 00 80 00' + '10 C0 B4 1A 95 00 F0 88 FA 77 88 1C F5 77 FF FF' + 'FF FF 37 90 F5 77 00 00 00 00 3E 8A F5 77 9B B2' + 'E7 77 B7 00 00 00 02 00 00 00 A4 1A 95 00 01 00' + '00 00 18 00 00 00 00 00 00 00 10 19 95 00 42 00' + '00 00 00 00 00 00 F4 18 95 00 00 00 00 00 00 00' + '00 00 00 00 00 00 0C 00 00 00 02 00 00 00 01 01' + 'F5 77 00 EC FD 7F 56 00 00 00 00 00 00 00 03 00' + '00 00 5E 00 1A 02 40 9F 07 00 00 00 00 00 40 9F' + '07 00 05 00 00 00 BE B3 E7 77 4C 19 95 00 A3 B4' + 'E7 77 F8 00 00 00 00 00 00 C0 00 00 00 00 00 00' + '00 00 02 00 00 00 80 00 00 00 00 00 00 00 8C 1A' + '95 00 7F E9 4B 00 08 6C 0C 01 00 00 00 C0 00 00' + '00 00 80 1A 95 00 02 00 00 00 80 00 00 00 00 00' + '00 00 C0 27 95 00 C4 F5 AF 00 02 00 00 00 44 3A' + '5C 6F 73 65 78 70 65 72 74 73 5C 72 65 61 63 74' + '6F 73 5C 6C 69 62 5C 73 68 65 6C 6C 33 32 5C 66' + '6F 6C 64 65 72 2E 69 63 6F 00 1A 93 4B 00 14 1A' + '95 00 1F 3B D4 77 13 00 00 00 98 00 00 00 4F 3B' + 'D4 77 E0 19 95 00 33 3B D4 77 64 C5 F5 77 A9 F1' + 'E7 77 F8 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 1A 95 00 18 6C 38 00 86 00 00 00 00 00' + '00 00 C9 F1 E7 77 86 00 00 00 A4 1A 95 00 08 00' + '00 00 00 00 00 00 86 00 00 00 86 00 00 00 08 00' + '00 00 F4 19 95 00 33 3B D4 77 B4 1A 95 00 09 48' + 'E9 77 B8 10 E9 77 FF FF FF FF C9 F1 E7 77 16 EA' + '4B 00 F8 00 00 00 18 6C 38 00 86 00 00 00 58 1A' + '95 00 00 00 00 00 00 00 00 00 00 00 01 23 23 00' + '00 00 00 00 00 00 00 00 00 00 00 02 03 12 0C 23' + '00 00 00 00 00 00 00 00 00 00 02 08 15 22 20 0A' + '03 00 00 00 00 00 00 00 23 23 0C 1A 1F 22 22 1F' + '07 03 00 00 00 00 00 01 01 10 1A 1A 13 1A 22 22' + '1D 07 23 00 00 00 23 09 1A 1F 1A 13 16 13 1A 21' + '22 1C 06 02 00 00 05 1F 20 1A 16 16 13 17 16 1A' + '1E 21 19 05 23 00 23 0D 1A 16 13 17 16 16 17 1A' + '1A 1E 1D 18 04 01 00 23 0B 17 16 16 13 16 1A 1A' + '20 1F 1D 1F 14 23 00 00 23 0B 17 16 1A 1A 1F 20' + '1F 21 20 1C 0A 23 00 00 00 23 0C 17 1F 1B 1F 1F' + '20 20 21 0D 23 00 00 00 00 00 23 18 20 1F 20 1F' + '22 22 0F 23 00 00 00 00 00 00 23 0E 1A 21 20 22' + '22 14 23 00 00 00 00 00 00 00 00 23 0C 20 22 22' + '18 02 23 00 00 00 00 00 00 00 00 00 23 0E 1F 1D' + '02 23 00 00 00 00 00 00 00 00 00 00 00 23 02 01' + '23 00 00 00 00 00 FC 7F 00 00 F8 3F 00 00 F0 1F' + '00 00 C0 0F 00 00 80 07 00 00 00 03 00 00 00 01' + '00 00 00 00 00 00 80 00 00 00 C0 00 00 00 E0 01' + '00 00 F0 03 00 00 F0 07 00 00 F8 07 00 00 FC 0F' + '00 00 FE 1F 00 00 28 00 00 00 20 00 00 00 40 00' + '00 00 01 00 04 00 00 00 00 00 00 02 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 80 00 00 00 00 80 00 00 80 80 00 00 00 00' + '80 00 80 00 80 00 00 80 80 00 C0 C0 C0 00 80 80' + '80 00 FF 00 00 00 00 FF 00 00 FF FF 00 00 00 00' + 'FF 00 FF 00 FF 00 00 FF FF 00 FF FF FF 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 08 10 00 00 00 00 00 00 00 00 00' + '00 00 00 00 08 BF 81 00 00 00 00 00 00 00 00 00' + '00 00 00 04 1B 7F F8 00 00 00 00 00 00 00 00 00' + '00 00 00 9B 77 FF FF 89 00 00 00 00 00 00 00 00' + '00 00 00 78 7F FF FF F8 20 00 00 00 00 00 00 00' + '00 00 1F B7 78 FF FF F7 10 00 00 00 00 00 00 00' + '00 81 77 8F B7 BF FF FF F8 20 00 00 00 00 00 00' + '08 BF FB FB 8B 8B FF FF F7 18 00 00 00 00 00 00' + '17 7F B7 88 B1 B7 BF FF 7F F8 00 00 00 00 00 0B' + 'FF F8 77 BB 7B 7B 78 FF F7 F7 B0 00 00 00 09 7F' + '7F B7 7B 88 B7 B8 BF BF 7F 77 7B 00 00 00 08 7F' + '7F 87 B8 B7 B8 B8 7B FB F7 F7 F7 90 00 00 00 97' + 'FB 7B 7B 7B 7B 8F B7 BF BF 7F 77 78 00 00 00 08' + 'B7 B8 B7 B8 B8 BB 7B 7B F7 77 77 7F 90 00 00 00' + '1B 7B 8B 7B 87 B7 BF BF 7F F7 77 FB F1 00 00 00' + '08 B8 B7 B7 BB 7B 77 F7 FB FF 77 77 78 00 00 00' + '00 8B 7B 7B B7 77 7F BF BF FF 77 77 80 00 00 00' + '00 08 B8 B7 7B FB F7 F7 F7 FF FF B7 00 00 00 00' + '00 00 1B FB 77 7F BF 7F BF FF FF 78 00 00 00 00' + '00 00 08 BF 7F BF 7F F7 FF BF FF 80 00 00 00 00' + '00 00 00 87 FB F7 FF BF FF FF F8 00 00 00 00 00' + '00 00 00 BF 77 FF BF FF 7F FF 80 00 00 00 00 00' + '00 00 00 07 F7 F7 FF F7 FF F8 00 00 00 00 00 00' + '00 00 00 00 BF 7F 7F FF FF B0 00 00 00 00 00 00' + '00 00 00 00 8B FF FF FF F7 00 00 00 00 00 00 00' + '00 00 00 00 08 7F FF FF 78 00 00 00 00 00 00 00' + '00 00 00 00 00 07 FF F7 80 00 00 00 00 00 00 00' + '00 00 00 00 00 00 8F F8 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 08 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FC' + '7F FF FF F8 3F FF FF F0 1F FF FF C0 0F FF FF 80' + '07 FF FF 00 03 FF FC 00 01 FF F8 00 00 FF F0 00' + '00 7F C0 00 00 3F 80 00 00 1F 00 00 00 0F 00 00' + '00 07 00 00 00 03 00 00 00 01 80 00 00 00 C0 00' + '00 00 E0 00 00 00 F0 00 00 00 F8 00 00 01 FC 00' + '00 03 FE 00 00 07 FF 00 00 0F FF 00 00 1F FF 00' + '00 3F FF 80 00 7F FF C0 00 7F FF E0 00 FF FF F0' + '01 FF FF F8 03 FF FF FC 07 FF FF FF 0F FF 28 00' + '00 00 10 00 00 00 20 00 00 00 01 00 04 00 00 00' + '00 00 80 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 80 00 00 00 00 80' + '00 00 80 80 00 00 00 00 80 00 80 00 80 00 00 80' + '80 00 C0 C0 C0 00 80 80 80 00 FF 00 00 00 00 FF' + '00 00 FF FF 00 00 00 00 FF 00 FF 00 FF 00 00 FF' + 'FF 00 FF FF FF 00 00 00 00 00 00 00 00 00 00 00' + '00 01 80 00 00 00 00 00 01 8F 78 00 00 00 00 00' + '1B FF F7 10 00 00 00 4B 8F B7 FF 70 00 00 08 BF' + '7B 8B FF F7 90 00 07 F7 7B 87 B7 F7 70 00 08 7B' + 'B7 BB 7B 7F 77 00 00 8B 7B B7 BF F7 77 B0 00 08' + 'B7 B7 FB FF F7 00 00 00 17 7F BF 7F F8 00 00 00' + '0B F7 FF FF 80 00 00 00 08 7F 7F F8 00 00 00 00' + '00 8F FF 70 00 00 00 00 00 08 F7 00 00 00 00 00' + '00 00 00 00 00 00 FC 7F 00 00 F8 3F 00 00 F0 1F' + '00 00 C0 0F 00 00 80 07 00 00 00 03 00 00 00 01' + '00 00 00 00 00 00 80 00 00 00 C0 00 00 00 E0 01' + '00 00 F0 03 00 00 F0 07 00 00 F8 07 00 00 FC 0F' + '00 00 FE 1F 00 00 28 00 00 00 30 00 00 00 60 00' + '00 00 01 00 08 00 00 00 00 00 00 09 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 11 00 00 00 00 11 00 00 00 00 11 00 22 00' + '00 00 33 00 00 00 00 22 00 00 33 33 00 00 22 22' + '22 00 44 00 00 00 55 00 00 00 66 00 00 00 66 33' + '00 00 66 33 33 00 66 66 33 00 7F 7F 7F 00 99 33' + '00 00 99 33 33 00 99 66 00 00 99 66 33 00 CC 66' + '00 00 CC 66 33 00 99 66 66 00 CC 66 66 00 CC 99' + '33 00 FF 99 33 00 FF CC 33 00 99 99 66 00 CC 99' + '66 00 FF 99 66 00 CC CC 66 00 FF CC 66 00 BB BB' + 'BB 00 CC 99 99 00 FF 99 99 00 CC CC 99 00 FF CC' + '99 00 FF FF 99 00 CC 99 CC 00 CC CC CC 00 DD DD' + 'DD 00 FF CC CC 00 CC FF CC 00 FF FF CC 00 FF CC' + 'FF 00 EE EE EE 00 FF FF FF 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 C0 17 95 00 00 00 38 00 A8 44' + 'F9 77 13 00 00 00 18 0A 38 00 00 00 38 00 18 6C' + '38 00 98 17 95 00 00 00 00 00 E0 19 95 00 F0 88' + 'FA 77 70 38 F5 77 FF FF FF FF A8 44 F9 77 70 7D' + 'F5 77 3A 8A F5 77 86 00 00 00 86 00 00 00 08 00' + '00 00 B0 18 95 00 00 00 00 00 CB 44 F9 77 38 9F' + '07 00 CD 8B F5 77 78 13 05 00 37 90 F5 77 00 00' + '00 00 3E 8A F5 77 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 10 00' + '00 00 00 00 00 00 56 00 58 00 00 EC FD 7F 1A 02' + '00 00 4C 16 95 00 40 9F 07 00 FC 15 95 00 FF FF' + 'FF FF B4 1A 95 00 45 00 00 00 28 02 00 00 FF FF' + 'FF FF E2 D8 F5 77 7D 9B F5 77 94 B6 01 00 00 00' + '05 00 F4 17 95 00 80 00 10 C0 B4 1A 95 00 F0 88' + 'FA 77 88 1C F5 77 FF FF FF FF 37 90 F5 77 00 00' + '00 00 3E 8A F5 77 9B B2 E7 77 B7 00 00 00 02 00' + '00 00 A4 1A 95 00 01 00 00 00 18 00 00 00 00 00' + '00 00 10 19 95 00 42 00 00 00 00 00 00 00 F4 18' + '95 00 00 00 00 00 00 00 00 00 00 00 00 00 0C 00' + '00 00 02 00 00 00 01 01 F5 77 00 EC FD 7F 56 00' + '00 00 00 00 00 00 03 00 00 00 5E 00 1A 02 40 9F' + '07 00 00 00 00 00 40 9F 07 00 05 00 00 00 BE B3' + 'E7 77 4C 19 95 00 A3 B4 E7 77 F8 00 00 00 00 00' + '00 C0 00 00 00 00 00 00 00 00 02 00 00 00 80 00' + '00 00 00 00 00 00 8C 1A 95 00 7F E9 4B 00 08 6C' + '0C 01 00 00 00 C0 00 00 00 00 80 1A 95 00 02 00' + '00 00 80 00 00 00 00 00 00 00 C0 27 95 00 C4 F5' + 'AF 00 02 00 00 00 44 3A 5C 6F 73 65 78 70 65 72' + '74 73 5C 72 65 61 63 74 6F 73 5C 6C 69 62 5C 73' + '68 65 6C 6C 33 32 5C 66 6F 6C 64 65 72 2E 69 63' + '6F 00 1A 93 4B 00 14 1A 95 00 1F 3B D4 77 13 00' + '00 00 98 00 00 00 4F 3B D4 77 E0 19 95 00 33 3B' + 'D4 77 64 C5 F5 77 A9 F1 E7 77 F8 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 1A 95 00 18 6C' + '38 00 86 00 00 00 00 00 00 00 C9 F1 E7 77 86 00' + '00 00 A4 1A 95 00 08 00 00 00 00 00 00 00 86 00' + '00 00 86 00 00 00 08 00 00 00 F4 19 95 00 33 3B' + 'D4 77 B4 1A 95 00 09 48 E9 77 B8 10 E9 77 FF FF' + 'FF FF C9 F1 E7 77 16 EA 4B 00 F8 00 00 00 18 6C' + '38 00 86 00 00 00 58 1A 95 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 2F 2F 2F 2F 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 2F 2F 2F 2F 2F 2F 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 2F 2F 2F 01 2F 2F 2F 2F 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '2F 2F 2F 2F 09 10 0C 02 2F 2F 2F 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2F' + '2F 2F 04 11 15 1C 17 09 02 2F 2F 2F 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 2F 2F' + '2F 05 13 1C 23 2E 2D 1C 0B 2F 2F 2F 2F 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 2F 2F 2F 2F' + '0B 23 22 21 2E 2E 2E 28 1C 0A 2F 2F 2F 2F 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 2F 2F 2F 01 0C' + '23 22 18 2E 2E 2E 2E 2E 28 1C 05 2F 2F 2F 2F 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 2F 2F 2F 2F 04 13 29' + '24 17 2D 2E 2E 2E 2E 2E 2E 28 17 05 02 2F 2F 2F' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 2F 2F 2F 01 05 1C 2D 24' + '15 2D 2E 2E 2E 2E 2E 2E 2E 2E 27 1C 04 01 2F 2F' + '2F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 2F 2F 2F 01 0C 24 29 1F 17' + '2D 24 24 2E 2E 2E 2E 2E 2E 2E 2E 28 17 06 2F 2F' + '2F 2F 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 2F 2F 2F 2F 05 16 29 29 24 17 29' + '29 19 1D 24 2E 2E 2E 2E 2E 2E 2E 2D 28 17 09 2F' + '2F 2F 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 2F 2F 2F 2F 0C 21 2B 24 24 1D 27 2B' + '19 19 19 1D 29 2E 2E 2E 2E 2E 2D 2E 2E 28 1B 05' + '2F 2F 2F 2F 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 2F 2F 2F 03 10 29 2B 24 29 1D 20 2B 19' + '19 1D 19 19 19 29 2E 2E 2E 2E 2E 2D 2D 2D 29 17' + '04 2F 2F 2F 00 00 00 00 00 00 00 00 00 00 00 00' + '00 2F 2F 2F 2F 05 13 29 2B 24 29 1C 1C 2E 1D 19' + '19 19 1D 19 1D 19 2D 2E 2E 2E 2D 2E 2D 2D 2D 27' + '13 04 2F 2F 2F 00 00 00 00 00 00 00 00 00 00 00' + '2F 2F 2F 2F 0A 21 2B 2B 24 29 24 21 2E 1D 19 1D' + '19 1D 19 1D 19 1F 19 29 2E 2D 2E 2D 29 2D 28 2D' + '28 15 2F 2F 2F 2F 00 00 00 00 00 00 00 00 00 2F' + '2F 2F 04 13 24 28 29 2B 29 24 1C 2B 24 19 1D 19' + '1D 19 1D 1A 1D 1D 1F 1D 2B 2C 2E 2D 2D 2D 2D 28' + '29 27 15 04 2F 2F 2F 00 00 00 00 00 00 00 2F 2F' + '2F 05 13 29 2E 2B 2B 29 24 1C 2D 24 19 1D 1A 1D' + '19 1D 19 1D 19 1D 1D 1F 1D 25 28 2D 2D 2D 29 28' + '28 28 29 13 01 2F 2F 2F 00 00 00 00 00 00 2F 2F' + '0C 22 2E 2B 29 29 2D 2B 1C 29 1F 1D 1D 19 1D 19' + '1D 1A 1D 19 1D 1F 1D 1D 1F 22 2B 2D 2D 28 28 28' + '28 27 28 27 15 2F 2F 2F 2F 00 00 00 00 00 2F 2F' + '0C 2B 29 2B 29 2B 2B 17 24 24 1D 1D 19 1D 1D 1A' + '1D 1D 19 1D 1F 1D 1D 1F 22 1F 1F 29 28 2D 29 28' + '28 28 27 29 20 15 04 2F 2F 2F 2F 00 00 00 2F 2F' + '2F 10 2B 2D 2B 2D 1D 23 24 1D 19 1D 1F 19 1D 1D' + '1A 1D 1D 19 1D 1F 1F 1D 1F 24 22 1F 29 28 2D 28' + '29 28 29 27 29 20 10 2F 2F 2F 2F 00 00 00 2F 2F' + '2F 2F 10 24 2E 1D 1C 24 19 1D 1F 19 1D 1F 19 1D' + '1D 1D 19 1D 1F 1D 1D 1F 22 1F 1F 24 24 29 2A 29' + '28 27 27 27 27 20 29 13 2F 2F 2F 2F 00 00 00 00' + '2F 2F 2F 11 24 1C 24 1D 1D 19 1D 1D 19 1D 1D 1A' + '1D 19 1F 1D 19 1F 1D 24 1F 22 24 24 24 24 29 28' + '27 29 27 29 20 27 28 24 11 02 2F 2F 2F 2F 00 00' + '00 2F 2F 01 12 1D 1F 1D 1A 1D 19 1D 1F 19 1F 1D' + '19 1D 1D 1A 1D 1D 1D 1F 1D 24 24 24 25 29 2B 29' + '28 27 27 27 27 27 21 27 28 10 2F 2F 2F 2F 00 00' + '00 00 2F 2F 04 14 1D 1D 1D 1D 1F 1D 19 1D 19 1D' + '1F 1D 19 1D 1F 1D 1F 24 24 24 25 29 29 25 29 2B' + '29 28 29 20 29 23 27 26 23 29 13 01 2F 2F 00 00' + '00 00 2F 2F 2F 08 10 19 1D 1F 19 1F 1D 1D 1D 1F' + '1D 19 1D 1D 1D 24 24 24 24 24 29 2B 24 29 2B 2B' + '29 2B 20 20 27 27 26 23 26 27 1C 02 2F 2F 00 00' + '00 00 00 2F 2F 2F 01 14 1D 1D 1D 19 1D 1F 1D 19' + '1D 1F 1D 1F 24 24 24 24 2B 24 24 29 2B 29 29 2B' + '2B 29 2E 27 23 26 23 20 20 21 05 2F 2F 2F 00 00' + '00 00 00 00 2F 2F 2F 03 12 19 1D 1D 1F 19 1F 1D' + '1F 1D 24 24 24 24 29 24 24 29 29 2B 29 2B 2B 29' + '2B 2E 2B 29 27 23 26 27 21 07 2F 2F 2F 00 00 00' + '00 00 00 00 00 00 2F 2F 2F 12 1D 1F 1D 1D 1D 1D' + '24 24 24 24 24 24 24 2B 29 24 2B 29 2B 29 2B 2B' + '2C 2B 2D 2E 28 26 23 21 0D 2F 2F 2F 00 00 00 00' + '00 00 00 00 00 00 2F 2F 2F 03 10 18 1D 1D 1F 24' + '24 29 24 24 2B 24 29 29 24 2B 29 2B 29 2B 2B 2C' + '2B 2D 2D 2E 2B 2B 27 0D 2F 2F 2F 00 00 00 00 00' + '00 00 00 00 00 00 00 00 2F 2F 2F 10 1D 1F 24 29' + '24 24 29 24 24 29 25 29 2B 29 2B 29 2E 29 2B 2D' + '2B 2E 2B 29 2E 2B 13 2F 2F 2F 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 2F 2F 2F 0C 24 29 24' + '25 29 24 2B 29 25 29 29 2B 29 2B 2B 29 2B 2D 2B' + '2E 29 2B 2E 2E 13 2F 2F 2F 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 2F 2F 2F 0D 1F 29' + '29 24 29 24 29 29 2B 29 29 2B 29 2D 2B 2D 2D 2B' + '2D 2B 2E 2E 13 01 2F 2F 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 2F 2F 0C 1E 24' + '29 2B 29 2B 29 2B 29 2B 2B 2C 2B 2B 2D 2D 2B 2C' + '2B 2E 2E 1C 01 2F 2F 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 2F 2F 15 2D 29' + '1E 29 2B 29 2B 29 2B 29 2D 2B 2C 2B 2D 2B 2C 2B' + '2E 2D 22 02 01 2F 2F 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 2F 2F 07 22 2B' + '29 24 29 2B 29 2B 2C 2B 2B 2D 2B 2C 2B 2D 2B 2E' + '2E 29 07 2F 2F 2F 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 2F 2F 2F 07 1C' + '2E 23 24 2C 2B 2D 2B 2C 2B 2D 2D 2B 2D 2D 2E 2E' + '24 07 2F 2F 2F 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 2F 2F 2F 04' + '1B 1D 29 2B 2D 2B 2C 2B 2E 2D 2B 2E 2D 2E 2E 29' + '0C 2F 2F 2F 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 2F 2F 2F' + '01 18 2B 2D 2B 2C 2B 2E 2C 2B 2E 2D 2E 2E 29 0E' + '2F 2F 2F 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2F' + '2F 04 1C 2E 2E 2B 2E 2D 2B 2E 2D 2E 2E 2B 13 2F' + '2F 2F 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2F' + '2F 2F 04 1C 2D 2E 2D 2E 2E 2E 2E 2E 2E 1B 01 2F' + '2F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '2F 2F 2F 2F 1C 2D 2E 2E 2E 2E 2E 2E 1C 01 2F 2F' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 2F 2F 2F 2F 13 2B 2E 2E 2E 2E 1E 01 2F 2F 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 2F 2F 2F 0E 29 2E 2D 23 05 2F 2F 2F 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 2F 2F 2F 07 13 07 04 2F 2F 2F 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 2F 2F 2F 2F 2F 2F 2F 2F 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 2F 2F 2F 2F 2F 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF' + 'FF FF FF FF 00 00 FF FF FC 3F FF FF 00 00 FF FF' + 'F8 1F FF FF 00 00 FF FF F0 0F FF FF 00 00 FF FF' + 'C0 07 FF FF 00 00 FF FF 80 03 FF FF 00 00 FF FF' + '00 01 FF FF 00 00 FF FC 00 00 FF FF 00 00 FF F8' + '00 00 7F FF 00 00 FF E0 00 00 3F FF 00 00 FF C0' + '00 00 1F FF 00 00 FF 80 00 00 0F FF 00 00 FE 00' + '00 00 0F FF 00 00 FC 00 00 00 03 FF 00 00 F8 00' + '00 00 03 FF 00 00 E0 00 00 00 01 FF 00 00 C0 00' + '00 00 00 FF 00 00 80 00 00 00 00 7F 00 00 00 00' + '00 00 00 3F 00 00 00 00 00 00 00 1F 00 00 00 00' + '00 00 00 07 00 00 00 00 00 00 00 07 00 00 00 00' + '00 00 00 03 00 00 C0 00 00 00 00 00 00 00 E0 00' + '00 00 00 00 00 00 F0 00 00 00 00 00 00 00 F0 00' + '00 00 00 00 00 00 F8 00 00 00 00 00 00 00 FC 00' + '00 00 00 01 00 00 FF 00 00 00 00 03 00 00 FF 00' + '00 00 00 07 00 00 FF C0 00 00 00 0F 00 00 FF E0' + '00 00 00 1F 00 00 FF F0 00 00 00 3F 00 00 FF F8' + '00 00 00 7F 00 00 FF F8 00 00 00 7F 00 00 FF F8' + '00 00 00 FF 00 00 FF F8 00 00 01 FF 00 00 FF FC' + '00 00 03 FF 00 00 FF FE 00 00 07 FF 00 00 FF FF' + '80 00 0F FF 00 00 FF FF 80 00 1F FF 00 00 FF FF' + 'C0 00 3F FF 00 00 FF FF E0 00 7F FF 00 00 FF FF' + 'F8 00 7F FF 00 00 FF FF FC 00 FF FF 00 00 FF FF' + 'FE 01 FF FF 00 00 FF FF FF 07 FF FF 00 00 28 00' + '00 00 30 00 00 00 60 00 00 00 01 00 20 00 00 00' + '00 00 00 24 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 0E 00 00 00 32 00 00 00 2D 00 00 00 0B 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 31 00 00' + '00 B1 00 00 00 F6 00 00 00 DF 00 00 00 65 00 00' + '00 0D 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 58 00 00 00 F2 00 00' + '00 FF 12 04 00 FF 02 00 00 FF 00 00 00 F6 00 00' + '00 71 00 00 00 08 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 12 00 00 00 9D 00 00 00 F6 00 00 00 FF 59 17' + '00 FF 97 2E 01 FF 6E 20 00 FF 06 00 00 FF 00 00' + '00 F0 00 00 00 65 00 00 00 08 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 3A 00 00' + '00 C2 00 00 00 FF 17 03 00 FF 7A 37 1A FF BE 59' + '2D FF CF 9C 89 FF BF 81 6D FF 5A 1E 08 FF 06 00' + '00 FF 00 00 00 EE 00 00 00 5C 00 00 00 08 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 70 00 00 00 F3 00 00' + '00 FF 32 07 00 FF B1 63 41 FF D5 8F 70 FF E3 BF' + 'AF FF FF FF FF FF EA E7 EA FF C0 82 6C FF 64 1B' + '01 FF 00 00 00 FF 00 00 00 EE 00 00 00 5E 00 00' + '00 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 20 00 00 00 AC 00 00 00 FD 06 00 00 FF 61 1B' + '00 FF D5 9F 86 FF E2 A3 84 FF DB AE 9A FF FD FB' + 'FA FF FF FF FF FF FF FF FF FF E9 E3 E4 FF BD 87' + '77 FF 5A 1A 01 FF 02 00 00 FF 00 00 00 E6 00 00' + '00 52 00 00 00 08 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 2A 00 00' + '00 C4 00 00 00 FF 08 00 00 FF 73 29 0F FF EE BD' + 'A5 FF EB AE 8B FF CA 7F 5C FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF E6 DF' + 'E1 FF BE 7A 63 FF 3D 0E 00 FF 00 00 00 FF 00 00' + '00 E2 00 00 00 3D 00 00 00 01 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 01 00 00 00 6C 00 00 00 E3 00 00' + '00 FF 2F 01 00 FF A7 66 50 FF F5 D0 B8 FF F3 B6' + '8D FF CF 89 67 FF F5 EB E8 FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FD FD' + 'FE FF E4 DA DC FF B6 78 61 FF 44 11 00 FF 00 00' + '00 FF 00 00 00 CB 00 00 00 3C 00 00 00 01 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 1C 00 00 00 8D 00 00 00 FF 07 00 00 FF 4D 1A' + '07 FF C9 81 63 FF FF E3 CD FF F7 BC 91 FF C7 71' + '47 FF F1 E5 E0 FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF E5 D8 DA FF B3 77 61 FF 33 0E' + '00 FF 00 00 00 FF 00 00 00 C8 00 00 00 33 00 00' + '00 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 30 00 00' + '00 D3 00 00 00 FF 0B 00 00 FF 85 36 19 FF E9 B7' + '9F FF FF E6 CB FF F9 B8 88 FF CE 7B 50 FF F2 EE' + 'EF FF FF C8 98 FF FF D7 B6 FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FD FE FF FF E5 DA DB FF BE 7D' + '65 FF 30 0B 00 FF 00 00 00 FF 00 00 00 D2 00 00' + '00 33 00 00 00 01 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 04 00 00 00 72 00 00 00 EA 00 00' + '00 FF 37 0B 00 FF B1 71 56 FF F7 D4 BE FF FF DF' + 'C0 FF FD C3 95 FF D0 80 56 FF E9 D4 CC FF FF D4' + 'AD FF FF 92 39 FF FF 98 44 FF FF D6 B4 FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FE FE FE FF FC FC FB FF F8 F6 F7 FF E4 D9' + 'DA FF B5 80 6B FF 3A 12 02 FF 00 00 00 FF 00 00' + '00 C8 00 00 00 39 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 1F 00 00 00 9F 00 00 00 FF 08 00 00 FF 5F 28' + '11 FF D3 93 74 FF FF EF DE FF FF D9 B5 FF FC C5' + '9B FF D5 83 56 FF E6 CE C4 FF FF EB D2 FF FF 93' + '3A FF FF 94 3D FF FF 93 3B FF FF 95 3E FF FF DD' + 'BF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FD FB FB FF FA F8 F8 FF F8 F6 F6 FF F5 F3' + 'F4 FF E7 DA DA FF B6 82 6C FF 2A 0D 00 FF 00 00' + '00 FF 00 00 00 BF 00 00 00 29 00 00 00 02 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 3D 00 00' + '00 E1 00 00 00 FF 12 00 00 FF 94 3F 15 FF F3 CF' + 'BC FF FF EC D7 FF FF D1 AC FF FF D8 B4 FF DC 91' + '64 FF E0 C0 B3 FF FF E9 D3 FF FF 99 44 FF FF 96' + '40 FF FF 98 44 FF FF 98 43 FF FF 97 42 FF FF 9B' + '46 FF FF D3 AE FF FF FF FF FF FF FF FF FF FE FD' + 'FD FF FC FA FA FF F9 F6 F6 FF F6 F3 F3 FF F4 F0' + 'F0 FF F1 ED EF FF E3 D6 D6 FF BD 77 57 FF 27 08' + '00 FF 00 00 00 FF 00 00 00 C4 00 00 00 28 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 02 00 00 00 60 00 00 00 DD 00 00' + '00 FF 2F 0C 00 FF A1 5E 3C FF F7 D5 C0 FF FF EA' + 'D2 FF FF D4 B0 FF FF DB B8 FF E3 A2 76 FF D6 9E' + '83 FF FF F8 F1 FF FF AB 64 FF FF 95 3D FF FF 9A' + '46 FF FF 99 46 FF FF 99 45 FF FF 9A 47 FF FF 9C' + '49 FF FF A8 5D FF FF E3 CA FF FF FF FF FF FD FC' + 'FD FF FA F8 F8 FF F7 F5 F5 FF F4 F1 F1 FF F2 EE' + 'EE FF F1 EC EC FF EB E6 E8 FF E1 CF CC FF A2 62' + '43 FF 24 0A 00 FF 00 00 00 FF 00 00 00 A1 00 00' + '00 25 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 12 00 00 00 9E 00 00 00 FF 00 00 00 FF 59 1E' + '00 FF D5 99 7A FF FF F5 E8 FF FF E4 C7 FF FF D9' + 'B8 FF FF E0 C1 FF ED B6 8E FF D7 A1 86 FF FD FA' + 'F6 FF FF AC 66 FF FF 98 41 FF FF 9C 49 FF FF 9C' + '49 FF FF 9C 49 FF FF 9C 48 FF FF 9C 49 FF FF A0' + '51 FF FF A3 54 FF FF A7 59 FF FE DF C3 FF FB FF' + 'FF FF F9 F7 F8 FF F6 F3 F3 FF F4 F0 F0 FF F1 EC' + 'EC FF EF E9 E8 FF EC E6 E6 FF E9 E3 E5 FF E4 D0' + 'CA FF AE 6B 48 FF 16 02 00 FF 00 00 00 FF 00 00' + '00 B0 00 00 00 1C 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 48 00 00' + '00 C8 00 00 00 FF 21 04 00 FF 8E 4B 25 FF EF C7' + 'B0 FF FF F0 DE FF FF E3 C9 FF FF DE C0 FF FF E8' + 'CC FF EF BF 99 FF D2 93 71 FF F9 F0 E9 FF FF BF' + '86 FF FF 98 43 FF FF 9D 4C FF FF 9E 4C FF FF 9D' + '4B FF FF 9D 4B FF FF 9D 4B FF FF 9E 4B FF FF A2' + '53 FF FF A7 59 FF FF AA 5E FF FF B0 6A FF FD D7' + 'B5 FF F7 F8 FC FF F5 F3 F3 FF F2 ED ED FF F0 EA' + 'EA FF ED E7 E7 FF EA E3 E3 FF E9 E1 E1 FF E5 DE' + 'E1 FF E0 CA C3 FF B0 6B 44 FF 23 09 00 FF 00 00' + '00 FE 00 00 00 B1 00 00 00 24 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 4C 00 00 00 EB 00 00' + '00 FF 37 11 00 FF B5 72 4C FF FC DD C8 FF FF F8' + 'E8 FF FF E4 C8 FF FF E3 C8 FF FF E9 CF FF F2 CA' + 'A9 FF D4 92 69 FF F8 EC E3 FF FF C4 8E FF FF 98' + '42 FF FF 9F 4F FF FF A0 4F FF FF A0 4E FF FF 9F' + '4E FF FF 9F 4E FF FF 9F 4D FF FF 9F 4E FF FF A3' + '54 FF FF A8 5C FF FF AD 64 FF FF B0 67 FF FF B4' + '6F FF FA D9 BC FF F4 F0 F1 FF F1 ED EE FF EF E9' + 'E9 FF EC E5 E5 FF E9 E2 E2 FF E7 DE DE FF E5 DC' + 'DC FF E2 DA DD FF E3 CC C3 FF A4 5F 37 FF 25 0B' + '00 FF 00 00 00 FF 00 00 00 A1 00 00 00 25 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 EB 02 00 00 FF 6A 2F' + '0C FF E4 AC 8B FF FF FA EF FF FF F1 DC FF FF E7' + 'CE FF FF E8 D0 FF FF EC D5 FF FC E3 C8 FF D2 8B' + '5F FF F0 D2 BD FF FF C9 96 FF FF 9E 4A FF FF A1' + '51 FF FF A2 52 FF FF A1 51 FF FF A1 51 FF FF A1' + '51 FF FF A1 51 FF FF A1 50 FF FF A1 50 FF FF A5' + '57 FF FF AA 5E FF FF AE 66 FF FF B3 6D FF FF B7' + '72 FF FF B9 74 FF F8 D6 B7 FF EF EC EF FF ED E8' + 'E9 FF EB E4 E4 FF E8 E0 E0 FF E6 DD DD FF E3 DA' + 'D9 FF E0 D6 D6 FF DE D5 D8 FF E2 C7 BD FF AF 63' + '36 FF 16 03 00 FF 00 00 00 FF 00 00 00 B0 00 00' + '00 1C 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 ED 06 01 00 FF 7A 3C' + '16 FF F7 CA AA FF FF F4 E0 FF FF E9 D2 FF FF E9' + 'D2 FF FF ED D7 FF FA E1 C7 FF D1 87 58 FF EF C6' + 'A8 FF FF CD 9E FF FF A0 4D FF FF A2 53 FF FF A3' + '54 FF FF A3 54 FF FF A3 54 FF FF A3 53 FF FF A3' + '53 FF FF A3 53 FF FF A3 53 FF FF A3 53 FF FF A7' + '59 FF FF AC 60 FF FF B0 68 FF FF B4 6F FF FF B9' + '76 FF FF BD 7C FF FF C1 81 FF F9 D4 B1 FF EC E6' + 'E8 FF E9 E3 E3 FF E7 DE DE FF E4 DB DB FF E2 D7' + 'D7 FF DF D4 D4 FF DD D1 D0 FF DB D2 D5 FF DF C3' + 'B8 FF A9 5E 30 FF 1D 08 00 FF 00 00 00 FE 00 00' + '00 B1 00 00 00 26 00 00 00 01 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 7D 00 00 00 FF 08 01' + '00 FF 96 46 13 FF FB CF AC FF FF F4 E1 FF FF EB' + 'D6 FF FF F1 DE FF DF A6 7E FF E2 A8 7F FF FF CF' + 'A1 FF FF A2 52 FF FF A2 52 FF FF A3 54 FF FF A3' + '54 FF FF A3 54 FF FF A3 54 FF FF A3 54 FF FF A3' + '54 FF FF A3 54 FF FF A3 54 FF FF A3 54 FF FF A7' + '5A FF FF AC 62 FF FF B1 69 FF FF B5 71 FF FF BA' + '78 FF FF BF 7F FF FF C3 85 FF FF C6 89 FF F5 D7' + 'B9 FF E8 E1 E3 FF E5 DD DE FF E4 DA DA FF E1 D6' + 'D6 FF DD D3 D3 FF DB CF CF FF D8 CB CB FF D9 CF' + 'D3 FF E6 C9 BA FF 95 50 23 FF 0C 00 00 FF 00 00' + '00 FF 00 00 00 91 00 00 00 17 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 01 00 00 00 7C 00 00' + '00 FF 0B 03 00 FF 89 49 1D FF F7 C4 9A FF FF FC' + 'EC FF DF A8 7F FF DE 98 67 FF FF CC 9D FF FF A8' + '5C FF FF A2 52 FF FF A4 56 FF FF A4 55 FF FF A4' + '55 FF FF A4 55 FF FF A4 55 FF FF A4 55 FF FF A3' + '55 FF FF A3 55 FF FF A3 54 FF FF A3 54 FF FF A7' + '5B FF FF AC 62 FF FF B0 69 FF FF B5 71 FF FF BA' + '78 FF FF BF 80 FF FF C4 87 FF FF C8 8C FF FF CC' + '91 FF F4 D7 B9 FF E4 DB DB FF E1 D8 D9 FF DF D5' + 'D5 FF DD D1 D1 FF DB CE CE FF D8 CA CA FF D4 C6' + 'C6 FF D5 CA CE FF E5 C3 B1 FF 9D 5D 34 FF 0A 00' + '00 FF 00 00 00 FA 00 00 00 99 00 00 00 13 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 76 00 00 00 FC 09 00 00 FF 87 4B 20 FF E7 AE' + '83 FF DF 95 60 FF FD C1 8C FF FF A9 5F FF FF A2' + '53 FF FF A4 57 FF FF A4 57 FF FF A4 57 FF FF A4' + '56 FF FF A4 56 FF FF A4 56 FF FF A4 56 FF FF A4' + '56 FF FF A4 56 FF FF A4 55 FF FF A3 55 FF FF A7' + '5B FF FF AC 62 FF FF B1 6A FF FF B5 71 FF FF BA' + '78 FF FF BE 7E FF FF C4 86 FF FF CA 92 FF FF D2' + '9E FF FF D9 A9 FF F4 DE C6 FF E0 D6 D7 FF DD D2' + 'D3 FF DB CF CF FF D9 CC CC FF D6 C8 C8 FF D3 C4' + 'C4 FF D0 BF BF FF D6 CC D0 FF E6 C5 B3 FF 96 54' + '29 FF 11 05 00 FF 00 00 00 F9 00 00 00 82 00 00' + '00 16 00 00 00 01 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 5F 00 00 00 FB 0D 03 00 FF B1 50' + '0F FF FD AB 6A FF FF B3 6D FF FF A3 55 FF FF A5' + '58 FF FF A5 58 FF FF A5 58 FF FF A4 58 FF FF A4' + '58 FF FF A4 58 FF FF A4 58 FF FF A4 57 FF FF A4' + '57 FF FF A4 57 FF FF A4 57 FF FF A4 57 FF FF A8' + '5C FF FF AC 63 FF FF B0 69 FF FF B5 70 FF FF BA' + '7A FF FF C3 88 FF FF CF 9D FF FF D7 AB FF FF DB' + 'B4 FF FF E0 BA FF FF E3 BE FF F4 E0 CA FF DD D1' + 'D1 FF D9 CD CE FF D8 CA CA FF D5 C6 C6 FF D2 C3' + 'C3 FF D0 C0 C0 FF CC BA BA FF D0 C3 C6 FF EA CC' + 'BD FF 97 55 26 FF 0D 02 00 FF 00 00 00 FF 00 00' + '00 7D 00 00 00 0E 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 9E 00 00 00 FF 26 12' + '04 FF B2 5F 23 FF FB 98 48 FF FF AA 5F FF FF A6' + '5A FF FF A6 59 FF FF A6 59 FF FF A6 59 FF FF A6' + '59 FF FF A5 59 FF FF A5 59 FF FF A5 59 FF FF A5' + '58 FF FF A5 58 FF FF A5 58 FF FF A5 58 FF FF A7' + '5B FF FF AC 62 FF FF B5 72 FF FF C2 89 FF FF CB' + '99 FF FF D2 A6 FF FF D7 AD FF FF DA B2 FF FF DD' + 'B8 FF FF E1 BD FF FF E4 C3 FF FF E9 C8 FF F4 E3' + 'CE FF DB CD CC FF D5 C7 C8 FF D4 C5 C5 FF D1 C2' + 'C2 FF CF BE BE FF CC BA BA FF C9 B5 B6 FF CC BD' + 'C0 FF E2 BE AD FF A2 65 3A FF 0E 05 00 FF 00 00' + '00 EC 00 00 00 30 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 14 00 00 00 AC 00 00' + '00 FF 27 12 03 FF A7 53 15 FF F9 93 40 FF FF A7' + '5B FF FF A7 5C FF FF A6 5B FF FF A6 5B FF FF A6' + '5B FF FF A6 5B FF FF A6 5B FF FF A6 5A FF FF A6' + '5A FF FF A6 5A FF FF A5 58 FF FF A5 58 FF FF AE' + '69 FF FF BB 7F FF FF C9 97 FF FF CF A2 FF FF D2' + 'A7 FF FF D5 AC FF FF D9 B1 FF FF DC B8 FF FF E0' + 'BD FF FF E3 C2 FF FF E7 C8 FF FF EA CD FF FF EF' + 'D2 FF F4 E5 D3 FF D7 C9 C8 FF D1 C2 C2 FF D0 C0' + 'C0 FF CE BD BD FF CB B9 B9 FF C8 B5 B5 FF C3 B0' + 'B0 FF D6 C7 CA FF BF 94 78 FF 18 09 00 FF 00 00' + '00 F4 00 00 00 2C 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 04 00 00' + '00 A6 00 00 00 FF 11 08 02 FF A1 4F 12 FF FA 93' + '3F FF FF AC 61 FF FF A7 5D FF FF A7 5C FF FF A6' + '5C FF FF A6 5C FF FF A6 5C FF FF A7 5B FF FF A6' + '5B FF FF A4 57 FF FF A9 60 FF FF BA 7F FF FF C5' + '94 FF FF CB 9C FF FF CE A1 FF FF D1 A6 FF FF D4' + 'AC FF FF D8 B1 FF FF DC B7 FF FF DF BD FF FF E3' + 'C2 FF FF E5 C7 FF FF E8 CC FF FF EC D1 FF FF EE' + 'D6 FF FF F3 DB FF F6 EB D9 FF D3 C3 C3 FF CD BC' + 'BC FF CD BB BB FF CA B7 B7 FF C6 B3 B4 FF CB B9' + 'BC FF BD 92 7B FF 31 19 0B FF 00 00 00 FF 00 00' + '00 8D 00 00 00 03 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 05 00 00 00 A6 00 00 00 FF 16 0B 03 FF A6 54' + '16 FF FA 94 41 FF FF AB 61 FF FF A9 5F FF FF A8' + '5D FF FF A8 5E FF FF A8 5D FF FF A6 5B FF FF A7' + '5D FF FF B2 71 FF FF C2 8E FF FF C8 9A FF FF C9' + '9B FF FF CD A0 FF FF D0 A6 FF FF D4 AC FF FF D7' + 'B1 FF FF DB B7 FF FF DE BC FF FF E1 C1 FF FF E4' + 'C6 FF FF E7 CB FF FF EA D0 FF FF ED D4 FF FF EF' + 'D9 FF FF F2 DD FF FF F8 E3 FF EE E5 D9 FF D1 C1' + 'C0 FF CA B7 B8 FF C8 B5 B5 FF CA B7 B8 FF CB A8' + '9A FF 46 2D 1D FF 00 00 00 FF 00 00 00 C8 00 00' + '00 1F 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 87 00 00 00 FF 0D 06' + '02 FF 92 4B 14 FF FD 96 41 FF FF AB 63 FF FF A9' + '60 FF FF A8 5F FF FF A6 5B FF FF AB 64 FF FF C1' + '8C FF FF CB A0 FF FF CC A0 FF FF CB 9F FF FF CD' + 'A2 FF FF D1 A8 FF FF D4 AD FF FF D7 B2 FF FF DA' + 'B8 FF FF DE BD FF FF E1 C2 FF FF E4 C7 FF FF E7' + 'CB FF FF E9 D0 FF FF EC D4 FF FF EF D8 FF FF F1' + 'DD FF FF F4 E1 FF FF F7 E5 FF FF FD EC FF F2 EA' + 'E0 FF CA B8 B6 FF C8 B6 B9 FF CD AD A1 FF 57 35' + '1B FF 00 00 00 FF 00 00 00 D6 00 00 00 18 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 05 00 00 00 75 00 00' + '00 FD 0C 06 02 FF 7E 42 11 FF F3 91 3F FF FF AC' + '63 FF FF A7 5D FF FF B5 77 FF FF C8 9A FF FF CF' + 'A7 FF FF CE A5 FF FF CF A6 FF FF CF A7 FF FF D1' + 'AA FF FF D4 AF FF FF D8 B4 FF FF DA B9 FF FF DD' + 'BE FF FF E0 C2 FF FF E3 C7 FF FF E6 CC FF FF E9' + 'D0 FF FF EB D4 FF FF EE D8 FF FF F0 DC FF FF F2' + 'E0 FF FF F5 E4 FF FF F8 E9 FF FF F9 EB FF FD F3' + 'E0 FF F3 EC E4 FF DB BD B0 FF 68 46 30 FF 00 00' + '00 FF 00 00 00 D1 00 00 00 32 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 78 00 00 00 F1 00 00 00 FF 7F 43 12 FF EF 90' + '40 FF FF BC 80 FF FF D0 A8 FF FF D3 AD FF FF D2' + 'AC FF FF D2 AD FF FF D3 AD FF FF D3 AE FF FF D5' + 'B1 FF FF D8 B5 FF FF DB BA FF FF DD BF FF FF E0' + 'C4 FF FF E3 C8 FF FF E6 CC FF FF E8 D1 FF FF EB' + 'D5 FF FF ED D8 FF FF EF DC FF FF F2 E0 FF FF F4' + 'E3 FF FF F7 E8 FF FE F5 E6 FF FC EF DC FF FD F7' + 'EA FF FF F0 DA FF 83 5C 3B FF 00 00 00 FF 00 00' + '00 EB 00 00 00 3F 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 54 00 00 00 FD 00 00 00 FF 66 3A' + '14 FF F4 B8 85 FF FF D9 B8 FF FF D6 B3 FF FF D5' + 'B3 FF FF D6 B4 FF FF D6 B5 FF FF D7 B5 FF FF D9' + 'B8 FF FF DC BC FF FF DF C1 FF FF E1 C5 FF FF E4' + 'C9 FF FF E7 CE FF FF E8 D1 FF FF EB D5 FF FF EE' + 'D9 FF FF F0 DD FF FF F1 E0 FF FF F4 E4 FF FF F6' + 'E8 FF FE F2 E1 FF FB EB D7 FF FF FD F6 FF FF F6' + 'E4 FF 9C 66 38 FF 03 00 00 FF 00 00 00 F5 00 00' + '00 46 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 45 00 00 00 E0 01 00' + '00 FF 78 47 1B FF F2 B5 7F FF FF DC BE FF FF DA' + 'BB FF FF DA BB FF FF DB BC FF FF DB BD FF FF DC' + 'BF FF FF DF C3 FF FF E2 C7 FF FF E4 CB FF FF E6' + 'CF FF FF E9 D4 FF FF EB D6 FF FF ED DA FF FF F0' + 'DE FF FF F2 E1 FF FF F3 E5 FF FF F4 E6 FF FC EE' + 'DB FF FD F1 E0 FF FF FC F5 FF FF F5 E3 FF A7 7A' + '51 FF 07 00 00 FF 00 00 00 F3 00 00 00 60 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 8B 00 00' + '00 FF 69 42 1C FF ED AC 6F FF EE BC 90 FF FF E2' + 'C7 FF FF DE C2 FF FF DE C2 FF FF DF C4 FF FF E0' + 'C5 FF FF E2 C9 FF FF E5 CD FF FF E7 D1 FF FF E9' + 'D4 FF FF EC D8 FF FF EE DB FF FF F0 DF FF FF F1' + 'E2 FF FF F4 E6 FF FE F3 E5 FF FC EB D9 FF FD F2' + 'E2 FF FF FC F4 FF FF FF FE FF CB 9A 6C FF 1A 09' + '00 FF 00 00 00 FF 00 00 00 7D 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 9C 02 00' + '00 FF AA 6B 2D FF FF FA EA FF F1 D6 BF FF EC B8' + '88 FF FF E1 C9 FF FF E3 CB FF FF E2 CA FF FF E3' + 'CB FF FF E5 CF FF FF E8 D3 FF FF EA D6 FF FF EC' + 'D9 FF FF ED DD FF FF EF E0 FF FF F2 E3 FF FF F4' + 'E6 FF FD F0 E0 FF FD EF DE FF FE F4 E8 FF FF FB' + 'F4 FF FF FF F7 FF DC B0 84 FF 29 17 09 FF 00 00' + '00 FF 00 00 00 94 00 00 00 0B 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 94 01 00' + '00 FF 51 30 0F FF DF B0 7F FF FF FB F0 FF EF D0' + 'B3 FF F0 C5 9D FF FD E4 CD FF FF E6 D1 FF FF E7' + 'D2 FF FF E8 D5 FF FF EB D9 FF FF ED DC FF FF EF' + 'DF FF FF F0 E2 FF FF F2 E5 FF FF F3 E6 FF FE F0' + 'E1 FF FE F0 E1 FF FE F6 ED FF FF FA F3 FF FF FF' + 'FC FF E5 C3 A0 FF 3B 20 06 FF 00 00 00 FF 00 00' + '00 B0 00 00 00 07 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 1F 00 00' + '00 CC 00 00 00 FF 35 1B 00 FF D4 99 5A FF FF FF' + 'FE FF EC C3 9B FF F4 CE AA FF FF ED DC FF FF EA' + 'D8 FF FF EC DB FF FF EE DF FF FF F0 E1 FF FF F1' + 'E4 FF FF F3 E7 FF FE F2 E6 FF FE EF E0 FF FE F3' + 'E7 FF FF F8 F0 FF FF FA F3 FF FF FF FF FF F3 CD' + 'A6 FF 52 2F 0D FF 00 00 00 FF 00 00 00 B8 00 00' + '00 0F 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 1A 00 00 00 AE 00 00 00 FF 23 13 01 FF BF 8D' + '56 FF F3 B6 77 FF F6 D4 B6 FF FF F0 E3 FF FF ED' + 'DF FF FF EF E1 FF FF F1 E4 FF FF F3 E7 FF FF F3' + 'E9 FF FE F2 E5 FF FE F2 E6 FF FF F6 ED FF FF F9' + 'F2 FF FF F9 F4 FF FF FF FF FF FB DE BE FF 55 37' + '1A FF 00 00 00 FF 00 00 00 CB 00 00 00 1E 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 04 00 00 00 A1 00 00 00 FF 11 07' + '00 FF B5 72 2D FF FF EB CF FF FF F4 EA FF FF F1' + 'E5 FF FF F2 E7 FF FF F4 EA FF FF F4 EB FF FE F3' + 'E9 FF FE F4 EA FF FF F8 F2 FF FF FA F5 FF FF FB' + 'F6 FF FF FF FF FF F7 E5 D0 FF 76 4D 25 FF 00 00' + '00 FF 00 00 00 DB 00 00 00 25 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 80 00 00' + '00 FF 23 14 04 FF C7 99 68 FF FF FF F2 FF FF F8' + 'F1 FF FF F5 ED FF FE F6 ED FF FE F4 EC FF FE F8' + 'F1 FF FF FA F6 FF FF FB F6 FF FF FC F8 FF FF FF' + 'FF FF FF F4 DE FF 8C 61 34 FF 00 00 00 FF 00 00' + '00 EA 00 00 00 3B 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 10 00 00' + '00 BB 00 00 00 FF 28 17 05 FF C1 9C 74 FF FF F6' + 'E7 FF FF FB F8 FF FE F8 F1 FF FF FA F6 FF FF FC' + 'F8 FF FF FC FA FF FF FD FB FF FF FF FF FF FF FD' + 'F5 FF AA 82 56 FF 0E 05 00 FF 00 00 00 F9 00 00' + '00 5A 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 04 00 00 00 A8 00 00 00 FF 06 00 00 FF AB 84' + '58 FF FF FA EB FF FF FF FF FF FF FE FD FF FF FF' + 'FD FF FF FF FF FF FF FF FF FF FF FF FC FF C9 9B' + '66 FF 0F 05 00 FF 00 00 00 FF 00 00 00 68 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 0A 00 00 00 74 00 00 00 FF 0E 05' + '00 FF 79 5C 3A FF FF ED D6 FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FE FF C9 A5 7A FF 19 0D' + '00 FF 00 00 00 FF 00 00 00 82 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 67 00 00' + '00 EE 00 00 00 FF 6E 4E 29 FF F0 DD C5 FF FF FF' + 'F4 FF FF F1 DC FF D1 AC 80 FF 36 1D 02 FF 00 00' + '00 FF 00 00 00 8F 00 00 00 03 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 3F 00 00 00 E0 00 00 00 FF 48 2F 12 FF 87 5D' + '2D FF 53 38 19 FF 12 0A 00 FF 00 00 00 FF 00 00' + '00 AD 00 00 00 08 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 26 00 00 00 BF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 EC 00 00 00 83 00 00' + '00 0D 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 0A 00 00 00 75 00 00' + '00 84 00 00 00 60 00 00 00 24 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 FF FF FF FF FF FF 00 00 FF FF' + 'FC 3F FF FF 00 00 FF FF F8 1F FF FF 00 00 FF FF' + 'F0 0F FF FF 00 00 FF FF C0 07 FF FF 00 00 FF FF' + '80 03 FF FF 00 00 FF FF 00 01 FF FF 00 00 FF FC' + '00 00 FF FF 00 00 FF F8 00 00 7F FF 00 00 FF E0' + '00 00 3F FF 00 00 FF C0 00 00 1F FF 00 00 FF 80' + '00 00 0F FF 00 00 FE 00 00 00 0F FF 00 00 FC 00' + '00 00 03 FF 00 00 F8 00 00 00 03 FF 00 00 E0 00' + '00 00 01 FF 00 00 C0 00 00 00 00 FF 00 00 80 00' + '00 00 00 7F 00 00 00 00 00 00 00 3F 00 00 00 00' + '00 00 00 1F 00 00 00 00 00 00 00 07 00 00 00 00' + '00 00 00 07 00 00 00 00 00 00 00 03 00 00 C0 00' + '00 00 00 00 00 00 E0 00 00 00 00 00 00 00 F0 00' + '00 00 00 00 00 00 F0 00 00 00 00 00 00 00 F8 00' + '00 00 00 00 00 00 FC 00 00 00 00 01 00 00 FF 00' + '00 00 00 03 00 00 FF 00 00 00 00 07 00 00 FF C0' + '00 00 00 0F 00 00 FF E0 00 00 00 1F 00 00 FF F0' + '00 00 00 3F 00 00 FF F8 00 00 00 7F 00 00 FF F8' + '00 00 00 7F 00 00 FF F8 00 00 00 FF 00 00 FF F8' + '00 00 01 FF 00 00 FF FC 00 00 03 FF 00 00 FF FE' + '00 00 07 FF 00 00 FF FF 80 00 0F FF 00 00 FF FF' + '80 00 1F FF 00 00 FF FF C0 00 3F FF 00 00 FF FF' + 'E0 00 7F FF 00 00 FF FF F8 00 7F FF 00 00 FF FF' + 'FC 00 FF FF 00 00 FF FF FE 01 FF FF 00 00 FF FF' + 'FF 07 FF FF 00 00 28 00 00 00 20 00 00 00 40 00' + '00 00 01 00 20 00 00 00 00 00 00 10 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 0E 00 00 00 58 00 00' + '00 3C 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 30 00 00 00 C1 09 00 00 FF 00 00' + '00 ED 00 00 00 59 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 61 00 00 00 E9 33 0D 00 FF 97 3E 19 FF 4D 1D' + '0A FF 00 00 00 F0 00 00 00 52 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 14 00 00 00 9A 02 00' + '00 FF 63 32 1D FF C6 78 55 FF F2 DA D2 FF CC A1' + '95 FF 44 17 07 FF 00 00 00 EB 00 00 00 4C 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 3B 00 00 00 CD 18 03 00 FF 9A 62' + '4A FF E0 9D 7D FF F1 DB D2 FF FF FF FF FF FD FD' + 'FE FF CA 9D 8F FF 3D 15 08 FF 00 00 00 E5 00 00' + '00 45 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 6F 00 00 00 F1 3B 15 09 FF CB 95 7B FF EE AA' + '83 FF E9 C8 B8 FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FD FC FE FF C8 9B 8D FF 39 14 07 FF 00 00' + '00 E2 00 00 00 3C 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 03 00 00 00 80 00 00' + '00 FF 45 1B 0D FF E1 AC 91 FF FC BD 95 FF DB A5' + '8B FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FA F7 F9 FF B5 80 6E FF 1A 05' + '00 FF 00 00 00 CA 00 00 00 1E 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 1F 00 00 00 AC 07 00 00 FF 74 43' + '2F FF EF C3 A7 FF FC C4 9B FF DB A2 86 FF FA D0' + 'AF FF FF BE 87 FF FF FC FA FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF F4 EB EB FF A8 78' + '67 FF 16 05 00 FF 00 00 00 BB 00 00 00 1B 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 4A 00 00 00 DA 24 0A 00 FF AB 76 5E FF FF DE' + 'C1 FF FE CB A2 FF DC A0 80 FF F7 D7 BD FF FF 9D' + '49 FF FF 8E 31 FF FF BB 82 FF FF FB F8 FF FF FF' + 'FF FF FF FF FF FF FD FB FB FF FA FA FB FF F3 EA' + 'E9 FF A6 7B 6A FF 16 05 00 FF 00 00 00 B5 00 00' + '00 16 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 07 00 00 00 82 00 00' + '00 F9 50 28 15 FF D8 A9 8F FF FF E9 CE FF FE D1' + 'AA FF DE A2 81 FF F4 D5 C0 FF FF A6 58 FF FF 96' + '3E FF FF 98 44 FF FF 96 3E FF FF BD 85 FF FF FA' + 'F6 FF FE FF FF FF FA F8 F8 FF F6 F3 F3 FF F4 F2' + 'F3 FF F0 E4 E3 FF A5 74 5E FF 16 05 00 FF 00 00' + '00 B1 00 00 00 16 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 28 00 00 00 B8 0E 00 00 FF 86 55' + '3D FF F6 D3 BA FF FF EB D1 FF FE D9 B7 FF E2 A9' + '88 FF F1 D4 C1 FF FF B0 69 FF FF 98 40 FF FF 9C' + '49 FF FF 9C 48 FF FF 9D 4C FF FF A0 4E FF FF C1' + '89 FF FD F6 F1 FF F8 F9 FB FF F5 F0 F0 FF F1 EB' + 'EB FF EE EA EB FF ED E0 DD FF A6 74 5B FF 16 05' + '00 FF 00 00 00 B1 00 00 00 16 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 4F 00 00 00 E2 30 13 04 FF BB 8B 70 FF FF ED' + 'D8 FF FF EB D1 FF FF E3 C7 FF E5 B0 8C FF ED CB' + 'B6 FF FF B9 7A FF FF 99 44 FF FF 9F 4D FF FF 9E' + '4D FF FF 9E 4C FF FF A0 4F FF FF A6 5A FF FF AA' + '5D FF FE C3 8D FF F7 EE E8 FF F2 F0 F2 FF EE E8' + 'E8 FF EB E3 E3 FF E8 E2 E3 FF EA DA D7 FF A7 72' + '56 FF 18 06 00 FF 00 00 00 B1 00 00 00 17 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 EA 53 27 0F FF E8 BF A3 FF FF F9 E7 FF FF EB' + 'D2 FF FF EF D8 FF EA BC 9B FF E7 BB 9E FF FF C0' + '86 FF FF 9C 47 FF FF A2 51 FF FF A1 51 FF FF A1' + '51 FF FF A1 50 FF FF A2 53 FF FF A9 5D FF FF B0' + '68 FF FF B3 6B FF FD C8 94 FF F1 EA E7 FF EC E8' + 'EA FF E9 E1 E1 FF E5 DC DB FF E2 DA DB FF E7 D4' + 'D0 FF A2 65 42 FF 08 00 00 FF 00 00 00 A8 00 00' + '00 0B 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 EB 5F 32 18 FF F9 D2 B3 FF FF F4 DE FF FF EF' + 'DA FF F4 D4 B9 FF E1 A8 82 FF FD C5 93 FF FF A1' + '50 FF FF A2 53 FF FF A3 54 FF FF A3 54 FF FF A3' + '53 FF FF A3 53 FF FF A3 55 FF FF AB 60 FF FF B2' + '6B FF FF B9 76 FF FF BE 7A FF FA D1 A8 FF EC E4' + 'E2 FF E7 DF E2 FF E4 DA DA FF DF D4 D4 FF DD D4' + 'D6 FF E2 C5 B9 FF 7D 4A 2C FF 01 00 00 FF 00 00' + '00 86 00 00 00 05 00 00 00 00 00 00 00 00 00 00' + '00 51 00 00 00 F3 5A 2F 15 FF F1 C8 A5 FF FC E5' + 'CD FF E1 A2 77 FF FB BB 85 FF FF A5 56 FF FF A3' + '53 FF FF A4 55 FF FF A4 55 FF FF A4 55 FF FF A3' + '55 FF FF A3 55 FF FF A4 57 FF FF AB 61 FF FF B3' + '6C FF FF BA 77 FF FF C0 81 FF FF C6 87 FF F9 D4' + 'AC FF E7 DC DA FF E1 D7 D9 FF DE D2 D2 FF DA CD' + 'CD FF D8 CD D0 FF E1 C4 B8 FF 7F 4F 31 FF 01 00' + '00 FF 00 00 00 83 00 00 00 03 00 00 00 00 00 00' + '00 00 00 00 00 48 00 00 00 EB 56 2F 16 FF E3 94' + '5B FF FB B5 79 FF FF A8 5C FF FF A3 55 FF FF A4' + '58 FF FF A4 56 FF FF A4 56 FF FF A4 56 FF FF A4' + '56 FF FF A4 56 FF FF A5 58 FF FF AB 62 FF FF B2' + '6B FF FF B9 76 FF FF C2 85 FF FF CD 97 FF FF D7' + 'A7 FF F8 DF C1 FF E2 D6 D4 FF DB CF D0 FF D9 CB' + 'CB FF D4 C5 C4 FF D3 C6 C8 FF E2 C5 B8 FF 80 51' + '31 FF 02 00 00 FE 00 00 00 79 00 00 00 06 00 00' + '00 00 00 00 00 00 00 00 00 4E 00 00 00 FF 7A 40' + '16 FF FB 9E 51 FF FF AA 5C FF FF A6 5A FF FF A5' + '59 FF FF A5 59 FF FF A5 58 FF FF A5 59 FF FF A5' + '59 FF FF A4 57 FF FF A4 57 FF FF AB 62 FF FF B8' + '76 FF FF C6 8F FF FF D2 A3 FF FF DA B1 FF FF E0' + 'BA FF FF E5 C1 FF F8 E5 CB FF DE D0 CD FF D4 C6' + 'C7 FF D3 C3 C3 FF CE BC BC FF CD BE C0 FF DE C0' + 'B3 FF 85 56 37 FF 06 01 00 FE 00 00 00 4C 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 6B 00 00' + '00 FB 6D 37 0D FF F5 92 41 FF FF AC 5F FF FF A7' + '5C FF FF A6 5B FF FF A6 5B FF FF A6 5B FF FF A5' + '59 FF FF A5 58 FF FF AE 68 FF FF C0 87 FF FF CC' + '9D FF FF D3 A9 FF FF D8 B0 FF FF DD B8 FF FF E2' + 'C0 FF FF E7 C8 FF FF EE D0 FF F8 EA D5 FF DA CB' + 'C8 FF CF BE BF FF CD BB BB FF C8 B5 B5 FF D3 C0' + 'C1 FF 9B 77 61 FF 09 03 00 FF 00 00 00 4B 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 5B 00 00 00 F7 5D 2F 0C FF F1 90 41 FF FF AD' + '62 FF FF A8 5E FF FF A7 5D FF FF A6 5A FF FF AB' + '64 FF FF BC 83 FF FF C8 98 FF FF CE A1 FF FF D2' + 'A8 FF FF D7 B0 FF FF DC B8 FF FF E1 C0 FF FF E5' + 'C8 FF FF EA CF FF FF EE D6 FF FF F4 DE FF F8 EF' + 'DE FF D6 C6 C4 FF C8 B6 B7 FF D0 BC BD FF A0 80' + '70 FF 10 09 04 FF 00 00 00 8E 00 00 00 04 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 6B 00 00 00 FF 70 3A 0F FF FB 9C' + '4B FF FF AE 64 FF FF A6 5B FF FF AE 6A FF FF C6' + '95 FF FF CD A3 FF FF CD A1 FF FF D1 A8 FF FF D6' + 'B0 FF FF DB B8 FF FF DF C0 FF FF E4 C6 FF FF E8' + 'CD FF FF EC D4 FF FF F0 DB FF FF F3 E1 FF FF FC' + 'EA FF F5 EC E0 FF D3 C2 C3 FF BF A0 95 FF 29 19' + '0C FF 00 00 00 C7 00 00 00 0B 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 69 00 00 00 FB 6F 3C' + '12 FF F7 9B 4C FF FF BC 7F FF FF CD A3 FF FF D1' + 'AB FF FF D0 AA FF FF D2 AC FF FF D6 B1 FF FF DB' + 'B9 FF FF DF C0 FF FF E3 C7 FF FF E7 CD FF FF EB' + 'D4 FF FF EF DA FF FF F3 E0 FF FF F6 E6 FF FE F5' + 'E5 FF FF FF EF FF E9 D0 BA FF 43 2D 20 FF 00 00' + '00 D9 00 00 00 25 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 59 00 00' + '00 F2 60 36 14 FF ED BA 8B FF FF DB B9 FF FF D7' + 'B4 FF FF D6 B5 FF FF D8 B7 FF FF DC BC FF FF E0' + 'C2 FF FF E4 C9 FF FF E8 CF FF FF EB D5 FF FF EF' + 'DB FF FF F2 E1 FF FF F4 E5 FF FE F2 E1 FF FF FA' + 'EE FF F9 EA D3 FF 5B 41 2A FF 00 00 00 E4 00 00' + '00 31 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 4F 00 00 00 F9 A5 74 48 FF FB CF A6 FF FF DE' + 'C1 FF FF DD C0 FF FF DD C1 FF FF E1 C6 FF FF E5' + 'CD FF FF E8 D2 FF FF EC D7 FF FF EE DD FF FF F2' + 'E2 FF FF F3 E4 FF FE F0 DF FF FF F9 EF FF FF F3' + 'E2 FF 70 52 37 FF 00 00 00 F0 00 00 00 42 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 23 03 00 00 FD BF 97 6F FF FF EA D3 FF F4 CC' + 'A9 FF FF E3 CB FF FF E3 CC FF FF E6 CF FF FF EA' + 'D5 FF FF EC DA FF FF EF DF FF FF F2 E4 FF FE F2' + 'E3 FF FE F0 E1 FF FF FA F3 FF FF FA ED FF 83 65' + '48 FF 00 00 00 F6 00 00 00 52 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 12 00 00 00 CD 37 23 0E FF D6 B6 91 FF FD E7' + 'D0 FF F6 D3 B4 FF FF EB D9 FF FF EB D9 FF FF EE' + 'DE FF FF F0 E2 FF FF F2 E6 FF FF F1 E4 FF FE F3' + 'E6 FF FF FA F4 FF FF FE F4 FF 98 79 5A FF 01 00' + '00 FC 00 00 00 65 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 1C 00 00 00 D4 24 13 01 FF D7 A8' + '74 FF FE D8 B5 FF FF F1 E5 FF FF EF E1 FF FF F2' + 'E6 FF FF F4 E9 FF FE F2 E5 FF FF F6 EC FF FF FA' + 'F4 FF FF FF FF FF BB 9C 7B FF 06 01 00 FF 00 00' + '00 85 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 2A 00 00 00 D3 36 1F' + '07 FF EB C5 9C FF FF FF F6 FF FF F4 EA FF FF F5' + 'EB FF FF F4 EB FF FF F7 F0 FF FF FB F7 FF FF FF' + 'FF FF E0 C8 AD FF 29 1A 0B FF 00 00 00 B7 00 00' + '00 0C 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 22 00 00' + '00 DA 3E 2D 1A FF DE C5 A8 FF FF FF FD FF FF FA' + 'F5 FF FF FB F7 FF FF FD FB FF FF FF FF FF EC D9' + 'C2 FF 3A 27 14 FF 00 00 00 C7 00 00 00 16 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 22 00 00 00 C4 25 18 0A FF C6 B0 95 FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF F4 E5 D3 FF 4B 36' + '20 FF 00 00 00 D6 00 00 00 22 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 10 00 00 00 A6 12 09 01 FF AA 94' + '7A FF FF F6 EA FF F0 DE C8 FF 5E 46 2B FF 00 00' + '00 E3 00 00 00 2E 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 02 00 00 00 84 05 01' + '00 FF 44 31 1A FF 26 19 0A FF 00 00 00 E1 00 00' + '00 3D 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 54 00 00 00 84 00 00 00 67 00 00 00 1F 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FC' + '7F FF FF F8 3F FF FF F0 1F FF FF C0 0F FF FF 80' + '07 FF FF 00 03 FF FC 00 01 FF F8 00 00 FF F0 00' + '00 7F C0 00 00 3F 80 00 00 1F 00 00 00 0F 00 00' + '00 07 00 00 00 03 00 00 00 01 80 00 00 00 C0 00' + '00 00 E0 00 00 00 F0 00 00 00 F8 00 00 01 FC 00' + '00 03 FE 00 00 07 FF 00 00 0F FF 00 00 1F FF 00' + '00 3F FF 80 00 7F FF C0 00 7F FF E0 00 FF FF F0' + '01 FF FF F8 03 FF FF FC 07 FF FF FF 0F FF 28 00' + '00 00 10 00 00 00 20 00 00 00 01 00 20 00 00 00' + '00 00 00 04 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 10 00 00 00 8A 00 00 00 67 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 36 1E 0B' + '04 C9 9D 6B 56 FF 5D 3E 32 FE 00 00 00 67 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 69 4C 2F 21 EF CE 9D' + '87 FF FF FF FE FF F0 E3 DF FF 50 36 2D F9 00 00' + '00 5D 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 0A 00 00 00 90 71 4F 3D FF EE B2 90 FF FD D2' + 'B5 FF FF FF FD FF FF FF FF FF E8 D7 D1 FF 3C 27' + '1F F3 00 00 00 47 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 2C 1A 0D' + '07 BF A6 83 6D FF FB CC AC FF F7 BA 8F FF FF 9A' + '44 FF FF C3 91 FF FF FD FC FF FF FF FF FF DC C7' + 'C1 FF 38 26 1D E9 00 00 00 40 00 00 00 00 00 00' + '00 00 00 00 00 00 02 01 00 5C 47 33 27 E8 D6 B9' + 'A1 FF FF E0 C2 FF F3 BF 98 FF FF A3 55 FF FF 9A' + '44 FF FF 9D 4A FF FF CB 9D FF F5 F2 F2 FF F6 F2' + 'F5 FF D5 BD B4 FF 39 24 19 E9 00 00 00 3E 00 00' + '00 00 00 00 00 00 29 16 0B F2 F3 D0 B4 FF FF F3' + 'DC FF EF BC 94 FF FE A9 60 FF FF 9F 4D FF FF A1' + '51 FF FF A5 57 FF FF B1 67 FF F9 D1 AA FF E9 E2' + 'E3 FF EA E2 E5 FF CA AB 9D FF 28 17 0D E2 00 00' + '00 2D 00 00 00 00 06 03 02 67 6D 53 3F FB F7 B8' + '88 FF FF AD 65 FF FF A3 52 FF FF A4 56 FF FF A3' + '54 FF FF A7 5A FF FF B5 6F FF FF C5 88 FF F5 D9' + 'BD FF DE D4 D4 FF DE D1 D3 FF BD 9F 92 FF 2D 1E' + '13 D8 00 00 00 2D 00 00 00 00 00 00 00 6E 76 43' + '1B FF FD A4 53 FF FF AA 5D FF FF A5 57 FF FF A4' + '56 FF FF B0 6C FF FF C6 91 FF FF D7 AE FF FF E4' + 'C0 FF F3 E2 D0 FF D3 C5 C5 FF D9 C7 C9 FF A5 85' + '75 FF 06 03 01 9C 00 00 00 00 00 00 00 00 00 00' + '00 6D 6E 3E 18 FF FF A6 58 FF FF AE 65 FF FF BD' + '85 FF FF CC A0 FF FF D7 B2 FF FF E0 C0 FF FF E9' + 'CE FF FF F3 DC FF F3 EA DF FF CB B4 AF FF 3C 30' + '2A EB 01 01 00 32 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 6F 71 43 1E F6 F7 C2 90 FF FF D8' + 'B5 FF FF D7 B4 FF FF DF C1 FF FF E7 CE FF FF EE' + 'DA FF FF F8 E8 FF FF F7 E4 FF 61 51 44 F8 00 00' + '00 50 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 9F D0 AA 86 FF FF E6' + 'CA FF FF E1 C9 FF FF E8 D3 FF FF EE DD FF FF F4' + 'E7 FF FF FC ED FF 7C 6B 5A FD 00 00 00 64 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 43 53 43 32 F4 F3 D2' + 'B0 FF FF F1 E0 FF FF F0 E3 FF FF F4 E8 FF FF FF' + 'FB FF 98 86 75 FF 00 00 00 7D 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 4E 59 47' + '34 F4 F5 EA D9 FF FF FF FC FF FF FF FF FF BA AC' + '9C FF 0C 07 03 A2 00 00 00 03 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 45 47 3C 31 E3 E3 DC D4 FF C9 BE B0 FF 16 10' + '09 B4 00 00 00 0A 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 2B 19 12 0A BB 0D 09 03 A0 00 00' + '00 12 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 FC 7F 00 00 F8 3F 00 00 F0 1F' + '00 00 C0 0F 00 00 80 07 00 00 00 03 00 00 00 01' + '00 00 00 00 00 00 80 00 00 00 C0 00 00 00 E0 01' + '00 00 F0 03 00 00 F0 07 00 00 F8 07 00 00 FC 0F' + '00 00 FE 1F 00 00' +} */ + +/* BINRES folder_open.ico */ +4 ICON folder_open.ico +/* { + '00 00 01 00 06 00 20 20 00 00 01 00 08 00 A8 08' + '00 00 66 00 00 00 10 10 00 00 01 00 08 00 68 05' + '00 00 0E 09 00 00 30 30 00 00 01 00 20 00 A8 25' + '00 00 76 0E 00 00 20 20 00 00 01 00 20 00 A8 10' + '00 00 1E 34 00 00 10 10 00 00 01 00 20 00 68 04' + '00 00 C6 44 00 00 10 10 00 00 01 00 08 00 68 05' + '00 00 2E 49 00 00 28 00 00 00 20 00 00 00 40 00' + '00 00 01 00 08 00 00 00 00 00 00 04 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 B7 35 09 00 C4 3D 06 00 B5 44 16 00 B5 48' + '23 00 BE 50 2B 00 CE 48 0F 00 CC 4A 15 00 CB 53' + '1B 00 D4 58 1A 00 DC 66 1F 00 C5 53 26 00 D0 5A' + '22 00 D0 59 31 00 DE 69 20 00 DA 72 2B 00 CE 63' + '3C 00 D5 67 31 00 DF 6F 37 00 DC 72 30 00 E4 6C' + '24 00 EA 78 27 00 EB 6D 31 00 E8 75 36 00 F1 76' + '30 00 BB 6C 4F 00 C4 6D 55 00 C4 76 5D 00 CE 7D' + '5F 00 D2 74 50 00 D4 7A 5B 00 E6 72 41 00 C5 7F' + '6B 00 C8 7B 68 00 DB 7E 65 00 F8 8A 29 00 EF 88' + '35 00 F2 8A 34 00 FD 99 35 00 FC 9B 3B 00 FF A3' + '3A 00 BC 89 79 00 E9 88 46 00 E5 85 4B 00 F5 9A' + '44 00 FD 9D 45 00 F0 95 49 00 FA 9C 4D 00 EA 81' + '5B 00 FF A6 40 00 FF A9 45 00 F4 A0 49 00 FF AD' + '4E 00 FA A0 53 00 FE A9 53 00 FD A6 58 00 FA AA' + '5B 00 FF B2 55 00 FF B3 5C 00 C5 80 6C 00 CB 82' + '6C 00 D5 84 69 00 C3 85 77 00 CA 8B 77 00 D4 89' + '78 00 CD 90 7C 00 DA 9B 7E 00 EF 9D 65 00 ED 97' + '6F 00 F4 9E 63 00 F5 9C 6F 00 E3 8C 78 00 E0 9D' + '7E 00 E8 9A 7D 00 F0 9B 79 00 FA AF 65 00 F6 AB' + '6C 00 FD B2 62 00 FF BA 65 00 FE B6 6E 00 FF BF' + '6D 00 EC A1 76 00 EB A2 7A 00 F2 A6 75 00 F7 AC' + '70 00 F0 A3 7D 00 F5 AC 7F 00 FE B7 71 00 FC BC' + '72 00 F9 BA 7F 00 FE C4 78 00 92 8F 8D 00 91 90' + '8E 00 9F 93 8F 00 93 91 91 00 9B 96 94 00 9C 9B' + '9B 00 BC 8F 82 00 A1 93 8D 00 BC 92 85 00 B1 96' + '8A 00 A3 95 91 00 A5 98 94 00 A0 9E 9F 00 BC 9A' + '93 00 BE 9E 98 00 A8 A0 9C 00 B6 A1 9D 00 B9 A3' + '9F 00 A4 A2 A2 00 A9 A6 A6 00 AD AA A6 00 A9 A5' + 'A8 00 AE AB AC 00 B7 A7 A1 00 B9 A3 A0 00 B6 A8' + 'A3 00 BA AA A5 00 B3 AB AB 00 B5 B1 AD 00 B4 AE' + 'B0 00 BB B3 B7 00 C1 93 84 00 C2 93 89 00 CE 97' + '8B 00 C2 9A 8D 00 CF 99 8A 00 D6 98 87 00 C3 9F' + '92 00 CB 9D 92 00 DF 9D 90 00 E4 9A 88 00 C2 A1' + '97 00 CB A0 92 00 C3 A6 9C 00 C8 A4 99 00 DC A4' + '91 00 DB A9 91 00 D0 A3 99 00 E8 A7 80 00 EC AD' + '83 00 F0 AA 82 00 F3 AB 89 00 F0 B7 80 00 FF BF' + '85 00 F3 B2 8C 00 F8 B1 88 00 F5 BB 8C 00 F8 BE' + '8E 00 F1 AE 9A 00 EE B2 95 00 F7 B8 96 00 C1 AC' + 'A5 00 D7 AA A4 00 C4 B1 AD 00 D7 B0 A1 00 DA B5' + 'A6 00 DA B4 AA 00 D9 BB AF 00 C2 BC BD 00 D0 B3' + 'B2 00 DA BD B4 00 D0 BB BB 00 E0 B2 A5 00 EE BD' + 'A2 00 E3 B4 AA 00 E4 BB AF 00 F1 B6 A7 00 F6 BE' + 'A2 00 F0 BA AB 00 E5 BE B3 00 EC BC B0 00 E2 BF' + 'BB 00 FD C9 86 00 F4 C4 97 00 FF CB 95 00 FB C4' + '9C 00 FE CC 9D 00 FD D1 93 00 FE D5 9C 00 FE DB' + '9E 00 EC C5 AF 00 F4 C2 A5 00 FD CD A1 00 F5 C8' + 'AA 00 F9 CB AB 00 FD D4 A3 00 FF DE A4 00 FD D3' + 'AC 00 FD DB A9 00 E9 C2 B7 00 F1 C2 B5 00 F3 CA' + 'B3 00 FA D2 B3 00 FD DC B5 00 FB D6 BB 00 FB DC' + 'BC 00 FF E0 A5 00 FF E2 AE 00 FF E3 B2 00 FE E6' + 'BE 00 FF E8 BF 00 C3 BF C0 00 D0 C1 C1 00 DB C5' + 'C0 00 DD C6 CC 00 DF CA CB 00 DF CF D0 00 EB C5' + 'C0 00 EB CF CA 00 F9 CD C6 00 FC D3 C5 00 FC DC' + 'C5 00 F0 D3 CA 00 FF D7 CB 00 FA DD CA 00 E0 CF' + 'D0 00 E5 D7 DA 00 FA D8 D1 00 F0 DC D9 00 FE E4' + 'C1 00 FF E9 C3 00 FF EE CE 00 F0 E0 D4 00 FC E2' + 'D3 00 FF EE D0 00 F0 E1 DF 00 FD E5 DA 00 FE EB' + 'DC 00 FF F0 D5 00 FE F2 DD 00 ED DE E0 00 F0 DF' + 'E2 00 F1 E3 E3 00 FD E9 E5 00 F0 E7 EF 00 F1 EB' + 'EC 00 FE F5 E3 00 FF F3 EB 00 FF FA EE 00 F3 EE' + 'F0 00 FE F3 F2 00 FF FA F1 00 FF F7 FF 00 FF F9' + 'FC 00 7F 7F 7F 00 09 48 E9 77 B8 10 E9 77 FF FF' + 'FF FF C9 F1 E7 77 16 EA 4B 00 F8 00 00 00 40 B4' + '0C 01 66 00 00 00 58 1A 95 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 5F 5F 5F 5C 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 A5 99 98 76 70 60 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 7F 83 88 7E 68 74 71 67 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 65 47 A7 E3 A9 83 7E 68 75 71 6D 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 9D 8E 95 F4 F4 EA BF 82 7C 68 73 71 6D' + '5C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 9B B1 95 F4 F4 F3 F1 E9 D0 83 7F 7A 6B' + '76 6E 5E 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 89 BA 91 F1 F4 F3 F1 F1 EC E8 AB 83 41' + '63 69 76 70 5E 00 00 00 00 00 00 00 00 00 00 00' + '00 00 62 89 C5 93 E0 E3 F1 F1 F0 F0 EB E9 E2 AA' + '83 40 3E 68 6B 71 6D 00 00 00 00 00 00 00 00 00' + '00 00 BE B6 B4 93 B0 90 B7 C3 DF EC EB E9 E2 E7' + 'E7 AC 83 40 3E 7B 6C 71 70 5C 00 00 00 00 00 00' + '00 00 AB C1 C5 94 97 4F 36 37 8F C0 D5 DB E7 E7' + 'E7 D9 D8 AC 82 3D 20 63 6B 77 6D 00 00 00 00 00' + '00 00 95 C2 C7 B0 91 5A 4D 36 2C 2E 43 96 BE D1' + 'D9 D9 D8 CF CF A1 7E 3C 1B 69 CA 00 00 00 00 00' + '00 66 95 C2 C7 B7 8D AD 4E 3A 36 2C 24 18 2B 48' + 'A5 AC D8 CF CF CD CB A0 3D 3E 9F 60 00 00 00 00' + '00 9E C0 C4 C7 BD 55 B2 5A 4E 3A 36 2C 24 15 14' + '12 3D 88 9D CE CD CB A2 8A 20 9F 6D 00 00 00 00' + '00 9E D4 C8 C9 BD 4A BA AD 5A 4E 3A 34 2C 24 15' + '0E 0C 0C 1D 7F 99 A0 A2 A0 21 79 70 00 00 00 00' + '00 9C E1 DD C9 C2 8E BC AD AD 5A 4E 39 36 2C 25' + '15 0E 0C 08 07 10 3C 7B 8A 21 73 6E 00 00 00 00' + '5D A6 E5 DE DD C4 95 B9 B3 B2 AD 5A 4E 3A 36 2D' + '25 15 14 09 08 06 02 04 19 1A 63 6F 00 00 00 00' + 'D0 D3 E5 E1 DE DC B8 A8 B0 B0 AF AD 5A 4E 3A 39' + '32 26 25 15 0A 09 06 01 03 05 20 76 00 00 00 00' + 'D0 E0 E6 E5 E1 DE DD BC 97 97 B0 94 94 90 50 3A' + '34 32 31 26 23 14 09 01 08 0B 1A 76 00 00 00 00' + 'AB E4 E6 E6 E5 E1 DE DD C9 C2 B7 91 8E 97 AF 50' + '39 34 32 31 28 23 14 08 0C 0B 10 75 60 00 00 66' + 'BF ED ED ED E6 E5 E1 DE DD C9 C9 C7 BA 92 97 AD' + '50 39 34 32 31 26 18 17 0F 0C 0D 69 67 00 00 A1' + 'D6 EE F2 ED E6 E6 E5 E1 DE DD C9 C8 C7 B7 52 91' + '59 57 4D 39 32 27 16 2F 33 13 0D 61 6D 00 00 CC' + 'EA F2 F2 EF ED ED E6 E5 DE DE DD C9 C9 C7 B1 8D' + '8E 92 56 4C 38 35 1F 4B 4E 2E 11 3B 70 00 00 A1' + 'F1 F4 F2 F2 F2 ED E6 E6 E5 E1 DE DD C9 C8 C7 C6' + 'BA 94 52 51 53 46 30 54 58 4B 2A 1C 78 00 00 A1' + 'EA EA F1 EE F2 EF ED E6 D7 C3 C4 DC DC C9 C9 C7' + 'C7 C6 C5 B3 93 44 22 49 8E 53 45 1E 77 00 00 74' + '98 9D D2 DA E0 E3 E4 D4 A9 87 86 B5 C1 B9 C1 C2' + 'C7 C7 C7 C5 B4 8C 81 98 84 61 29 3F 00 00 00 00' + '00 5B 98 98 86 A5 A6 A3 98 00 00 72 86 80 86 A4' + 'B9 B7 BA BD BB 8B 9A 00 00 00 00 6A 00 00 00 00' + '00 00 00 00 00 66 5D 66 00 00 00 00 00 00 00 6B' + '7D 85 B6 B0 AE 42 76 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 9A 84 63 64 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF' + 'FF FF FC 3F FF FF FC 0F FF FF FC 03 FF FF F8 00' + 'FF FF F8 00 1F FF F8 00 07 FF F8 00 01 FF F0 00' + '00 7F F0 00 00 0F F0 00 00 07 F0 00 00 07 E0 00' + '00 03 E0 00 00 03 E0 00 00 03 E0 00 00 03 C0 00' + '00 03 C0 00 00 03 C0 00 00 03 C0 00 00 01 80 00' + '00 01 80 00 00 01 80 00 00 01 80 00 00 01 80 00' + '00 01 80 00 00 03 E0 18 00 7B FE 3F 80 7F FF FF' + 'F0 FF FF FF FF FF FF FF FF FF FF FF FF FF 28 00' + '00 00 10 00 00 00 20 00 00 00 01 00 08 00 00 00' + '00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 B8 47 1D 00 C9 45' + '0E 00 CB 55 1F 00 D7 5F 1F 00 DE 65 1E 00 D0 59' + '28 00 CE 68 3F 00 E2 69 24 00 E7 77 27 00 EB 7B' + '2F 00 F0 7F 39 00 C7 6B 4E 00 DE 7A 45 00 C9 7B' + '60 00 F3 8B 32 00 FD 9C 35 00 BE 80 70 00 BF 91' + '7F 00 F0 96 46 00 F6 99 44 00 F7 99 44 00 E8 8D' + '51 00 ED 8A 5E 00 FD A4 44 00 FF AA 46 00 FF AA' + '49 00 F7 A2 52 00 FF B2 59 00 FF B5 59 00 FF B2' + '5D 00 FF B3 5E 00 C4 84 72 00 EF A1 6B 00 FF B4' + '62 00 FF B5 68 00 F2 A7 73 00 F8 B3 71 00 F8 B5' + '7E 00 FF C3 73 00 FF C5 7A 00 FF C7 7A 00 96 8A' + '85 00 96 90 8E 00 99 91 8E 00 92 91 90 00 96 95' + '94 00 9F 97 94 00 9A 98 97 00 9C 99 98 00 9E 9C' + '9C 00 A6 96 91 00 AD 9C 95 00 B6 9D 93 00 A6 A0' + '9F 00 BB A0 94 00 B7 A0 9B 00 B1 A2 9F 00 BB A0' + '9A 00 A6 A2 A3 00 AE A7 A5 00 AC A7 A8 00 B3 A3' + 'A3 00 BF AB A6 00 BF AE AB 00 B7 AF B0 00 C9 8E' + '82 00 C4 95 8B 00 C9 94 88 00 CD 9A 8E 00 D9 9C' + '85 00 C3 9C 95 00 C2 9E 95 00 CE 9D 91 00 D1 9F' + '94 00 CD A0 90 00 C6 AA 9F 00 DA A3 98 00 DF AA' + '98 00 DF A9 9A 00 DC AB 9F 00 EC B5 8D 00 F1 B2' + '83 00 F3 B3 8B 00 F5 B6 8A 00 F7 B5 8E 00 F7 B8' + '8A 00 EE AC 93 00 F6 BB 99 00 CF B3 A9 00 D9 B0' + 'A0 00 D1 B7 B1 00 D9 BD B2 00 E9 BC A3 00 E5 BE' + 'AF 00 EA BC A8 00 FD C3 8C 00 FF D1 8F 00 FE C7' + '92 00 F8 C3 98 00 F9 C2 9B 00 FC C1 99 00 FF C8' + '9B 00 FA CF 9C 00 FB D0 97 00 FD CD A3 00 F8 CE' + 'AE 00 FC D0 A1 00 F7 D0 AE 00 FF DD AC 00 F4 CB' + 'B0 00 F2 CA B5 00 FF DF B2 00 FF E2 AD 00 FE E0' + 'B3 00 FF E1 B3 00 FF E4 B6 00 FE E0 BA 00 D3 C0' + 'C2 00 DE C1 C1 00 DF C4 C3 00 EF CA C3 00 EA D0' + 'CF 00 F6 D7 CE 00 F6 DA CF 00 F3 DD CD 00 E0 D0' + 'D1 00 EE D6 D4 00 E3 D4 D8 00 FA DF DB 00 FB E2' + 'C7 00 FF E8 C0 00 FF E8 C1 00 FF ED CB 00 FF EC' + 'CC 00 FF ED CC 00 EF E0 DF 00 FB E2 D3 00 FF EB' + 'D2 00 FF F0 D5 00 FF F1 D6 00 FC E5 E0 00 FC E7' + 'E4 00 F0 E6 EA 00 F7 ED ED 00 FB EB EA 00 FF F4' + 'E0 00 FF F9 ED 00 FF FA F6 00 FF F6 FB 00 7F 7F' + '7F 00 F7 B8 96 00 C1 AC A5 00 D7 AA A4 00 C4 B1' + 'AD 00 D7 B0 A1 00 DA B5 A6 00 DA B4 AA 00 D9 BB' + 'AF 00 C2 BC BD 00 D0 B3 B2 00 DA BD B4 00 D0 BB' + 'BB 00 E0 B2 A5 00 EE BD A2 00 E3 B4 AA 00 E4 BB' + 'AF 00 F1 B6 A7 00 F6 BE A2 00 F0 BA AB 00 E5 BE' + 'B3 00 EC BC B0 00 E2 BF BB 00 FD C9 86 00 F4 C4' + '97 00 FF CB 95 00 FB C4 9C 00 FE CC 9D 00 FD D1' + '93 00 FE D5 9C 00 FE DB 9E 00 EC C5 AF 00 F4 C2' + 'A5 00 FD CD A1 00 F5 C8 AA 00 F9 CB AB 00 FD D4' + 'A3 00 FF DE A4 00 FD D3 AC 00 FD DB A9 00 E9 C2' + 'B7 00 F1 C2 B5 00 F3 CA B3 00 FA D2 B3 00 FD DC' + 'B5 00 FB D6 BB 00 FB DC BC 00 FF E0 A5 00 FF E2' + 'AE 00 FF E3 B2 00 FE E6 BE 00 FF E8 BF 00 C3 BF' + 'C0 00 D0 C1 C1 00 DB C5 C0 00 DD C6 CC 00 DF CA' + 'CB 00 DF CF D0 00 EB C5 C0 00 EB CF CA 00 F9 CD' + 'C6 00 FC D3 C5 00 FC DC C5 00 F0 D3 CA 00 FF D7' + 'CB 00 FA DD CA 00 E0 CF D0 00 E5 D7 DA 00 FA D8' + 'D1 00 F0 DC D9 00 FE E4 C1 00 FF E9 C3 00 FF EE' + 'CE 00 F0 E0 D4 00 FC E2 D3 00 FF EE D0 00 F0 E1' + 'DF 00 FD E5 DA 00 FE EB DC 00 FF F0 D5 00 FE F2' + 'DD 00 ED DE E0 00 F0 DF E2 00 F1 E3 E3 00 FD E9' + 'E5 00 F0 E7 EF 00 F1 EB EC 00 FE F5 E3 00 FF F3' + 'EB 00 FF FA EE 00 F3 EE F0 00 FE F3 F2 00 FF FA' + 'F1 00 FF F7 FF 00 FF F9 FC 00 7F 7F 7F 00 09 48' + 'E9 77 B8 10 E9 77 FF FF FF FF C9 F1 E7 77 16 EA' + '4B 00 F8 00 00 00 40 B4 0C 01 66 00 00 00 58 1A' + '95 00 00 00 00 00 00 00 00 2F 31 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 45 4F 48 3D 2D 00 00' + '00 00 00 00 00 00 00 00 00 57 8E 81 50 47 3C 2E' + '00 00 00 00 00 00 00 00 00 63 8D 95 90 7F 4E 43' + '3E 30 00 00 00 00 00 00 59 67 65 66 7D 8F 88 7A' + '4D 42 38 3B 00 00 00 00 5A 6D 56 22 1B 21 5F 80' + '7E 78 4A 20 41 00 00 00 6F 74 54 29 1E 14 0A 0D' + '46 77 76 49 40 00 00 00 82 83 58 61 27 1C 15 09' + '04 06 0E 44 3A 00 00 5B 8A 87 6A 64 62 28 1F 18' + '0F 05 02 01 11 00 00 5C 92 8C 86 75 69 55 60 1D' + '19 10 08 03 0C 32 2B 7B 93 92 8C 87 84 70 53 26' + '23 1A 0B 13 07 36 2C 91 94 93 92 8B 85 84 72 6B' + '52 24 17 25 16 39 00 3F 79 7C 89 5E 4C 6E 6C 73' + '71 68 4B 35 12 2A 00 00 00 00 33 00 00 00 00 37' + '5D 51 34 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 E7 FF 00 00 E0 FF 00 00 E0 3F' + '00 00 E0 0F 00 00 C0 03 00 00 C0 01 00 00 C0 01' + '00 00 C0 01 00 00 80 01 00 00 80 00 00 00 00 00' + '00 00 00 00 00 00 80 00 00 00 F7 87 00 00 FF FF' + '00 00 FF FF 00 00 28 00 00 00 30 00 00 00 60 00' + '00 00 01 00 20 00 00 00 00 00 00 24 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 D5 C9' + 'BE 1C DC C8 BE 54 D4 C6 BE 54 CF C4 BF 54 CB C4' + 'BF 54 CF C7 C2 41 D2 CA C6 2E D6 CE C9 1B DA D3' + 'CD 0C D8 D2 C9 03 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 DC C8' + 'BE 54 F0 C5 BC FF DA BF BE FF CA BA BF FF BF B8' + 'BF FF C9 C2 C9 C3 D4 CC D4 8A DF D8 DF 54 EA E7' + 'EA 26 E6 E2 DF 0A 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 D8 BE' + 'B4 54 E5 A7 9E FF DE 9C 90 FF D5 96 89 FF CA 95' + '89 FF C6 A1 9B EB C2 AE AD D8 BF BD BF C6 CA C9' + 'CA 96 D3 D0 D1 6B DA D2 D4 43 E1 DA DB 24 DE D7' + 'D4 0D 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 D6 B7' + 'AB 54 E0 91 84 FF E3 95 84 FF E3 9B 88 FF DF A2' + '8F FF D4 9B 8C FF C9 99 8E FF BF 9D 95 FF BF A9' + 'A3 DF C4 B8 B6 BD CF C9 CF 98 DA D4 DA 6C DA D5' + 'D6 47 D1 CC C4 27 D8 D1 CB 17 D8 D0 C9 0A 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 D6 B2' + 'A4 54 E0 84 6F FF EA AB 9A FF F5 C9 BA FF FF DF' + 'D0 FF F4 AF 9A FF E9 8C 75 FF DF 78 5F FF C9 88' + '74 FF BA 9A 8F FF B0 AF B0 FF BA B9 BA DB C5 C4' + 'C5 AE D0 D0 D0 78 E4 DF E4 46 E5 DD DF 1E 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 DF C7 BD 71 E7 B4' + 'A6 C6 EA 90 79 FF ED A1 8F FF F4 C1 B6 FF FF F2' + 'EF FF FB E2 DD FF F7 D2 CA FF F4 C1 B4 FF E6 AA' + '98 FF D6 98 84 FF C5 89 7A FF C1 94 8B F3 BD A4' + 'A1 E4 BA BA BA D1 C8 C3 C8 B1 CF C9 CD 89 D0 CD' + 'CA 5B D7 D4 D1 39 D8 D3 CD 1A 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 E5 C4 BA A9 F1 B9' + 'A8 FF F4 A9 8A FF F0 A0 8A FF F4 BC B0 FF FF FC' + 'FF FF FF FC FF FF FF F6 F8 FF FF EC EA FF F8 CE' + 'C3 FF EC B3 A2 FF DA 99 89 FF D2 96 89 FF C9 97' + '8D FF BF 9C 95 FF BF A3 9F EF C1 AF AD D5 C5 C1' + 'C0 B0 CF CC CD 8A D3 CF CF 60 D1 C9 C4 33 D4 CE' + 'C8 22 D5 CE C6 10 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 E5 C2 B5 A9 F4 C3' + 'AA FF FF CD A0 FF F4 A9 8A FF F4 B8 AA FF FF FC' + 'FF FF FF FC FF FF FF FA FF FF FF F7 FF FF FF F3' + 'F5 FF FA EB EA FF F0 DF DF FF EF BD B4 FF E9 9B' + '89 FF DF 77 5F FF CA 7F 6A FF BA 8F 7F FF B0 A7' + 'A0 FF B9 B1 B4 F3 C4 BC C4 D2 CF C8 CF 9C DA D7' + 'DA 66 DB D8 D5 32 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 E5 B8 A6 A9 F4 BA' + '9C FF FF D1 A0 FF F4 A7 83 FF F4 B5 A2 FF FF FC' + 'FF FF FF FC FF FF FF FA FF FF FF F7 FF FF FF F3' + 'F5 FF FD EE EE FF FA E9 EA FF F3 DE DC FF ED CF' + 'CA FF EA BC B4 FF E3 A9 9B FF DA 97 83 FF CF 87' + '6A FF C4 8B 78 FB BD 97 8F F0 BA AC AF DD C4 BC' + 'C0 CB CC C5 C9 A8 D0 C8 C9 73 D7 CF D0 50 D7 D0' + 'CD 29 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 E5 AF 9C A9 F4 B4' + '93 FF FF D9 A5 FF F4 AB 81 FF F4 B5 9D FF FF F8' + 'FA FF FF F9 FD FF FF F9 FF FF FF F7 FF FF FF F3' + 'F5 FF FD F0 F0 FF FA EF F0 FF F3 EF F0 FF F0 EA' + 'EC FF F0 E1 E5 FF EF CA C4 FF EB B2 A3 FF E4 9A' + '7F FF D3 8F 78 FF C7 8C 7C FF BF 91 89 FF C2 9A' + '94 FE C4 A6 A4 EC C4 B4 B9 C9 CB C3 C8 A5 CE C9' + 'CA 77 CC C6 BF 3F D2 CB C6 2E D8 D0 CB 1C DB D3' + 'CF 0C D5 CD C4 04 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 E5 AA 95 A9 F4 B2' + '90 FF FF E4 B0 FF F5 B6 85 FF F5 BA 9A FF FF F1' + 'F0 FF FF F5 FA FF FF F7 FF FF FF F7 FF FF FF F3' + 'F5 FF FA F0 F0 FF F0 EF F0 FF F0 EF F0 FF F0 EC' + 'EF FF F0 E7 EF FF F0 E3 E5 FF F0 E2 E0 FF F0 E2' + 'E0 FF E5 C0 B5 FF DF 9C 8A FF DF 77 5F FF D4 71' + '55 FF C4 79 64 FF B0 90 8F FF B0 A5 A4 FF B5 B5' + 'B5 EA C0 C0 C0 C0 D4 CF D4 8A E4 DC E4 56 EF E8' + 'EF 26 DB D4 CF 0C 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 D8 C8 BE 38 E6 C6 BD A9 EC B6 A2 E2 F4 BE' + '9A FF FF E0 A5 FF F5 BA 88 FF F5 B6 90 FF FF D3' + 'BA FF FF D2 AF FF FF D9 BB FF FF E7 DF FF FF ED' + 'EA FF FA F0 F0 FF F0 EF F0 FF F0 EF F0 FF F0 EC' + 'EF FF F0 E7 EF FF F0 E3 E5 FF F0 E2 E0 FF F0 E2' + 'E0 FF EC D5 D1 FF E9 C8 C3 FF E9 BC B4 FF DF A8' + '9C FF D6 94 85 FF CF 80 6F FF C8 7F 6F FF C2 88' + '7B F8 BF 9A 94 E9 BF B0 B1 D8 C5 C1 C5 BC CF CC' + 'CF 98 D0 CD CC 6C D7 D3 D1 45 E5 DD DE 23 D8 D0' + 'C9 0B 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 DC C8 BE 54 F0 C5 BD FF F3 C0 AD FF F8 C9' + 'A3 FF FF DE A0 FF F5 BD 8A FF F5 B4 8A FF FF C3' + '9F FF FF BD 83 FF FF C0 84 FF FF CB A4 FF FF D2' + 'B3 FF FA D9 C3 FF F0 E1 D5 FF F0 EA E7 FF F0 EC' + 'EF FF F0 E7 EF FF F0 E3 E5 FF EF E1 E0 FF EF E1' + 'E0 FF EF DF E0 FF EF DF E0 FF EF DF E0 FF E5 CB' + 'CA FF DF B2 AC FF DF 95 84 FF D8 89 79 FF D0 84' + '76 FF C9 86 79 FF BF 8F 84 FF BC 9B 93 F5 BF A9' + 'A5 E0 C3 BA B7 BD CD C9 CA 97 DF D7 DF 6F D5 CF' + 'CD 45 D4 CF C8 25 DB D6 CF 0E D5 CE C4 04 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 DC C9 BF 54 F0 C7 BF FF FA CA B5 FF FF D2' + 'AA FF FF DE A0 FF F5 BF 8A FF F5 B5 8A FF FF BF' + '9F FF FF B5 74 FF FF AD 59 FF FF A5 4F FF FF A1' + '4F FF FA AC 6A FF F0 C7 A0 FF F0 E1 D5 FF F0 EC' + 'EF FF F0 E7 EF FF F0 E3 E5 FF EF E1 E0 FF EF DF' + 'E0 FF EF DF E0 FF EF DF E0 FF EF DF E0 FF E5 D9' + 'DF FF E0 D4 DA FF E0 D0 D0 FF DF C4 C4 FF DF AB' + 'A4 FF E0 84 6F FF D5 6A 4F FF CA 68 4F FF BF 7F' + '70 FF B5 99 8F FF B5 AC AA F6 BF B8 BF E4 CA C7' + 'CA AE DA DA DA 70 F0 EF F0 2C DC D6 CF 0E 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 DB C3 B7 54 EF B5 A9 FF F9 D0 B4 FF FF DE' + 'B4 FF FF E2 AA FF FB C7 95 FF F8 BA 8E FF F5 B9' + '95 FF FB BD 7F FF FF B9 6B FF FF AD 59 FF FF A6' + '52 FF FA A4 54 FF F0 A7 60 FF F0 AC 71 FF F0 B5' + '88 FF F0 BF A5 FF F0 D0 C4 FF EF DA D8 FF EF DF' + 'E0 FF EF DF E0 FF EB DD DF FF E5 D9 DF FF E1 D7' + 'DF FF E0 D4 DA FF E0 D0 D0 FF DF CB CC FF DF C3' + 'C1 FF DF B5 AF FF DB A2 96 FF D4 92 81 FF CA 85' + '70 FF C7 7A 64 FF C3 7D 6A FC BF 8C 7F F6 C2 AA' + 'A6 E4 CF C6 C8 C0 E4 DF E4 8A D8 D1 CB 2E 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 DB BF B2 54 EF AB 9A FF F9 D2 B2 FF FF E5' + 'BA FF FF E4 B0 FF FF CE 9E FF FA BD 91 FF F0 B1' + '8A FF FA C1 83 FF FF C1 74 FF FF B3 5F FF FF AC' + '57 FF FB A4 4F FF F5 9B 44 FF F1 95 41 FF EF 96' + '4B FF EF 9D 65 FF EF AB 84 FF ED B8 9F FF EA C4' + 'B5 FF EA CD C6 FF E6 D3 D4 FF E0 D7 DF FF E0 D5' + 'DB FF E0 D3 D6 FF E0 CF D0 FF DF CF D0 FF DF CF' + 'D0 FF DF CF D0 FF DF C2 C1 FF DA B1 AA FF D0 9A' + '8A FF D0 85 74 FF CC 78 64 FF C4 74 5A FF C0 90' + '84 FF C7 B0 AF EB D9 D2 D9 C5 DB D5 D2 4C D8 D2' + 'C9 0A 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 DC BE AF 54 F0 A8 90 FF FA D2 AF FF FF E6' + 'BA FF FF E4 B0 FF FF D4 A4 FF FA BF 94 FF F0 A7' + '80 FF FA BF 80 FF FF C5 75 FF FF B8 60 FF FF B3' + '5F FF FF AD 59 FF FF A5 4F FF F5 9B 45 FF EF 8F' + '3A FF EF 80 30 FF EF 75 25 FF EA 7A 35 FF E0 90' + '60 FF E0 AA 94 FF E0 C2 BE FF E0 D7 DF FF E0 D2' + 'D5 FF E0 CF D0 FF E0 CF D0 FF DF CF D0 FF DF CF' + 'D0 FF DF CF D0 FF DF C9 CF FF DA C4 CA FF D0 C0' + 'C0 FF D0 BA BF FF D0 9F 9A FF D0 6F 50 FF C4 79' + '65 FF C4 97 8F F3 CF C8 CF DD E4 E2 E4 69 E6 E3' + 'DF 1F 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 E1 C7' + 'BD 71 EB C1 B4 C6 F0 B8 A4 FF FA D7 B6 FF FF E5' + 'BA FF FF E4 B0 FF FF DE AC FF FA CA 9C FF F0 A7' + '80 FF FA C7 8E FF FF CF 86 FF FF BD 69 FF FF B8' + '63 FF FF B2 5D FF FF AD 59 FF FB A4 4F FF F6 9A' + '44 FF EF 8F 3A FF EF 81 30 FF ED 7A 2E FF EA 7A' + '35 FF E2 7F 46 FF DF 87 5B FF DF 92 74 FF DF A6' + '94 FF DF BA B3 FF E0 CF D0 FF DF CF D0 FF DF CF' + 'D0 FF DF CF D0 FF DF C9 CF FF DA C4 CA FF D0 C0' + 'C0 FF D0 BD BF FF D0 AD A8 FF D0 8E 7A FF C5 7D' + '65 FF C1 8E 7E F9 C5 C2 C5 EF E1 E0 E1 79 E6 E2' + 'DF 29 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 E7 C8' + 'BD A9 F3 C7 BA FF F5 C7 B4 FF FB DC BB FF FF E6' + 'BB FF FF E4 B5 FF FF E4 B1 FF F9 CD 9E FF EF 9F' + '7A FF F9 CA 97 FF FF D6 95 FF FF C4 74 FF FF BD' + '6A FF FF B8 63 FF FF B3 5F FF FF AC 57 FF FB A4' + '4F FF F5 9B 44 FF F1 8E 3A FF EF 81 30 FF EF 75' + '25 FF E4 6D 21 FF DF 6B 26 FF DF 6D 34 FF DB 7F' + '57 FF DA 92 78 FF DA A7 95 FF DA B1 A6 FF DB BC' + 'B8 FF DF C9 CA FF DF C7 CD FF DA C4 CA FF D0 C0' + 'C0 FF D0 BF C0 FF D0 B6 B3 FF D0 A4 9A FF C8 7C' + '65 FF C3 84 71 FD BF BD BF FB DF DC DF 88 E5 E1' + 'DF 34 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 E6 CC' + 'BF A9 F5 D0 BF FF FF D7 BF FF FF E2 BF FF FF E7' + 'BF FF FF E6 BF FF FF E4 B5 FF F9 C7 9A FF EF 8F' + '70 FF F9 C7 9A FF FF DC A0 FF FF CC 80 FF FF C4' + '74 FF FF BD 6A FF FF B8 60 FF FF B3 5F FF FF AD' + '59 FF FF A5 4F FF F5 9B 45 FF EF 8F 3A FF EF 80' + '30 FF E5 75 25 FF DF 6D 1F FF DF 67 1F FF D5 5D' + '1F FF D0 57 1F FF D0 57 1F FF D0 74 54 FF D5 97' + '89 FF DF BF BF FF DF C4 C9 FF DA C4 CA FF D0 C0' + 'C0 FF D0 BF C0 FF D0 BA BA FF D0 B0 B0 FF D0 78' + '64 FF CA 7A 69 FF BF B7 BF FF DE D7 DE 95 E5 DE' + 'DF 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 E5 C0' + 'B1 A9 F4 CA B5 FF FF E6 CA FF FF E7 C3 FF FF E7' + 'BF FF FF E7 BF FF FF E6 BB FF F9 CD A4 FF EF 9E' + '7A FF F9 CE A5 FF FF DD A7 FF FF CC 80 FF FF C9' + '7C FF FF C4 74 FF FF BD 69 FF FF B8 63 FF FF B2' + '5A FF FF AC 4F FF FB A4 4B FF F6 9A 44 FF EF 8F' + '3A FF EB 81 2F FF E6 76 26 FF DF 6D 1F FF DB 65' + '1F FF D6 5E 1F FF D0 57 1F FF CF 5D 2A FF D1 65' + '38 FF D4 6D 4A FF D4 82 69 FF D2 97 89 FF D0 AF' + 'AA FF D0 B9 B8 FF D0 BC BE FF D0 B8 BA FF D0 7B' + '68 FF C7 79 66 FF B5 B2 B5 FF D4 D2 D4 A1 DE DA' + 'D8 4C 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 E5 BB' + 'AA A9 F4 C7 B1 FF FF EF D5 FF FF EC CA FF FF E9' + 'C3 FF FF E8 C0 FF FF E7 BF FF FA D1 AB FF F0 A7' + '85 FF FA CE AC FF FF DB AC FF FF CE 85 FF FF CC' + '81 FF FF C9 7C FF FF C4 74 FF FF BD 6A FF FF B8' + '5F FF FF B2 55 FF FF AC 54 FF FB A4 4F FF F5 9B' + '44 FF F4 8E 39 FF EF 81 2F FF E5 75 24 FF E1 6D' + '21 FF DB 65 1F FF D5 5C 1F FF D1 55 18 FF CF 4E' + '13 FF CF 48 10 FF CF 58 2B FF CD 6C 4A FF CA 82' + '6A FF C7 91 83 FF C7 9E 96 FF CA A9 A4 FF CE 7C' + '68 FF C7 7B 68 FF B5 A7 A5 FF CE C9 C8 AD D7 D4' + 'D1 58 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 E6 BB' + 'AA A9 F5 C9 B5 FF FF F3 DF FF FF F0 D4 FF FF EC' + 'CA FF FF E8 C0 FF FF E8 C0 FF FA D2 AF FF F0 A7' + '8F FF FA C6 AE FF FF D6 AF FF FF D4 90 FF FF CE' + '85 FF FF CC 80 FF FF CC 80 FF FF C4 74 FF FF BD' + '6A FF FF B8 60 FF FF B3 5F FF FF AD 59 FF FF A5' + '4F FF FF 9B 44 FF F9 8F 39 FF EF 80 2F FF E5 75' + '25 FF DF 6D 1F FF DF 67 1F FF D5 5D 1F FF CF 55' + '1A FF CF 4F 10 FF CF 48 10 FF CA 40 0A FF C0 38' + '00 FF B5 47 1F FF B5 60 45 FF C0 84 70 FF CA 7B' + '64 FF CA 81 6E FF BF 97 8F FF CA BC BA BA D0 CE' + 'CA 65 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 D9 C9 BE 38 E8 C7 BD A9 F4 C3' + 'B7 E2 FB D1 BF FF FF F1 D5 FF FF EF D1 FF FF ED' + 'CD FF FF EC C9 FF FF E9 C3 FF FA D6 B3 FF F0 B2' + '99 FF F3 BB A4 FF F8 C7 A8 FF FF D6 A5 FF FF D7' + 'A1 FF FF D5 98 FF FF CE 89 FF FF C7 7F FF FF C2' + '74 FF FF BD 69 FF FF B8 63 FF FF B2 5D FF FF AC' + '59 FF FF A8 4F FF FD A2 44 FF F9 99 3A FF F6 8D' + '2F FF F0 82 2A FF E9 77 29 FF DF 69 22 FF D6 5D' + '1D FF CF 54 19 FF CF 4E 13 FF CD 47 0E FF C9 40' + '0A FF B8 38 0E FF B1 3F 1A FF B5 56 30 FF C0 56' + '32 FF C3 68 4B FF BF 8A 7A FF CA B5 B2 C6 D6 D2' + 'D4 73 E5 E3 DF 07 D8 D2 C9 02 00 00 00 00 00 00' + '00 00 00 00 00 00 DC C9 C0 54 F2 C9 C2 FF FA CD' + 'C3 FF FF DA C9 FF FF F1 D5 FF FF EF D1 FF FF EE' + 'CF FF FF EE CF FF FF EB C8 FF FB DE BC FF F5 C7' + 'A9 FF F5 BE A3 FF F6 BE A0 FF FA C7 A0 FF F9 C7' + '9F FF FB C8 9B FF FF C9 94 FF FF CA 8D FF FF C9' + '84 FF FF C6 79 FF FF BE 6B FF FF B8 63 FF FF B3' + '5F FF FF B0 58 FF FF AD 4F FF FF A9 44 FF FF 9F' + '3A FF FB 95 35 FF F4 8C 34 FF ED 7D 2A FF E4 6F' + '22 FF DA 62 1F FF D6 59 18 FF D2 50 13 FF CF 48' + '10 FF B9 32 05 FF B1 30 06 FF B5 44 14 FF BC 46' + '1B FF C0 58 38 FF C0 7D 6A FF C6 AD AA D2 D6 D3' + 'D6 83 F0 EF F0 12 DC D6 CF 06 00 00 00 00 00 00' + '00 00 00 00 00 00 DC CB C4 54 F0 CF CF FF FA D9' + 'CF FF FF E5 D4 FF FF F3 DF FF FF F1 D5 FF FF EF' + 'D0 FF FF EE D0 FF FF EE CF FF FF EC CA FF FF E7' + 'C0 FF FF D0 AA FF FA BB 95 FF F0 A7 80 FF EF 9E' + '80 FF F4 A6 8A FF FF BF A0 FF FF CC A0 FF FF D4' + '9A FF FF D4 90 FF FF C6 7A FF FF BD 6A FF FF B8' + '60 FF FF B3 5F FF FF B0 59 FF FF AF 4F FF FF A9' + '45 FF FF A6 40 FF FF A6 40 FF FF 9A 35 FF FA 8A' + '2A FF F0 78 20 FF E4 67 1F FF D9 59 1A FF CF 4F' + '10 FF B9 34 05 FF B4 34 0A FF C0 4F 1F FF C0 49' + '1F FF C0 54 34 FF C0 6F 5F FF C0 A4 9F DF CF CF' + 'CF 95 F0 EF F0 23 DC D6 CF 0B 00 00 00 00 00 00' + '00 00 00 00 00 00 DC C8 BD 54 F0 C4 BA FF FA E0' + 'CF FF FF EF DB FF FF F3 DF FF FF F2 DB FF FF F1' + 'D6 FF FF EF D0 FF FF EE CF FF FF ED CD FF FF EC' + 'C9 FF FF E1 BC FF FD D8 B1 FF F9 D2 AA FF F9 C8' + 'A3 FF FB C2 9C FF FF BF 95 FF F7 AE 86 FF F4 A8' + '81 FF F4 AD 85 FF FB BC 8C FF FF C4 8A FF FF C7' + '7F FF FF BB 6A FF FF B3 5A FF FF AF 4F FF FF AD' + '4B FF FF AA 46 FF FF A6 40 FF FF A1 3C FF FD 9B' + '35 FF F9 91 2A FF F6 85 29 FF EB 72 24 FF D9 59' + '19 FF BD 3F 0F FF B8 3D 11 FF C9 54 1F FF C3 4F' + '1F FF C3 54 2D FF C9 65 4A FF C2 9D 98 EB CF CA' + 'CF A7 EF EA EF 32 DB D4 CF 11 00 00 00 00 00 00' + '00 00 00 00 00 00 DC C5 B9 54 F0 BD AF FF FA E3' + 'D3 FF FF F6 E3 FF FF F4 DF FF FF F3 DF FF FF F2' + 'DB FF FF F1 D5 FF FF EF D1 FF FF EE CF FF FF EE' + 'CF FF FF EB C8 FF FF E9 C3 FF FF E8 C0 FF FF E0' + 'B8 FF FF D7 AE FF FF CC 9F FF F7 B6 8D FF F4 AB' + '86 FF F4 AA 8A FF F7 B0 8E FF FB BC 93 FF FF CE' + '99 FF FF C3 7A FF FF BA 63 FF FF B2 55 FF FF B0' + '51 FF FF AD 4B FF FF A9 44 FF FF A7 41 FF FF A4' + '3C FF FF A1 35 FF FF 98 31 FF F6 85 2B FF E4 67' + '24 FF CC 50 1D FF C4 4B 1B FF CF 59 1F FF C8 54' + '1F FF C8 55 28 FF CF 5C 3A FF C1 97 8F F6 C9 C4' + 'C9 B7 EA E5 EA 42 DA D3 CD 16 00 00 00 00 00 00' + '00 00 00 00 00 00 DC C4 B9 54 F0 BA AF FF FA E4' + 'DA FF FF F8 EA FF FF F6 E0 FF FF F4 DF FF FF F3' + 'DF FF FF F3 DF FF FF F1 D5 FF FF EF D0 FF FF EE' + 'D0 FF FF EE CF FF FF EC CA FF FF E8 C0 FF FF E8' + 'C0 FF FF E7 BF FF FF E6 BF FF FF E4 B5 FF FF DC' + 'AA FF FF CD A0 FF F4 A3 7F FF F4 A3 84 FF FF CC' + 'B0 FF FF CC 90 FF FF C5 75 FF FF B8 60 FF FF B2' + '55 FF FF AF 4F FF FF AF 4F FF FF A9 45 FF FF A6' + '40 FF FF A6 40 FF FF A1 35 FF FA 92 2F FF F0 78' + '2F FF E4 68 2F FF D9 60 2A FF CF 60 20 FF CF 5A' + '1F FF CF 56 24 FF D0 54 2F FF BA 91 84 FF BF BF' + 'BF C5 E0 DF E0 52 D6 D1 CA 1B 00 00 00 00 00 00' + '00 00 E1 C8 BD 71 EE C7 BC C6 F9 C8 BA FF FD E9' + 'DE FF FF F9 EE FF FF F8 EA FF FF F6 E3 FF FF F4' + 'DF FF FF F3 DF FF FF F2 DB FF FF F1 D6 FF FF EF' + 'D0 FF FF EE CF FF FF ED CD FF FF EC C9 FF FF E9' + 'C3 FF FF E7 BF FF FF E7 BF FF FF E6 BB FF FF E2' + 'B4 FF FF DC AA FF FB C4 98 FF F4 B1 8C FF EA A3' + '85 FF F8 C3 97 FF FF CF 91 FF FF C5 75 FF FF BA' + '63 FF FF B3 56 FF FF AF 4F FF FF AD 4B FF FF AA' + '46 FF FF A6 40 FF FF A4 3C FF FA 93 36 FF F0 72' + '2F FF F2 81 3D FF EF 88 3F FF E4 84 35 FF D6 6A' + '26 FF CF 5A 24 FF D0 54 2F FF C1 86 76 FF C3 B1' + 'AD CB D5 D5 D5 64 D3 CD C6 21 00 00 00 00 00 00' + '00 00 E7 CA C1 AA F6 CE C5 FF FF D6 CA FF FF EE' + 'E3 FF FF FA F0 FF FF FA F0 FF FF F8 E8 FF FF F6' + 'E3 FF FF F4 DF FF FF F3 DF FF FF F2 DB FF FF F1' + 'D5 FF FF EF D1 FF FF EE CF FF FF EF CF FF FF EB' + 'C8 FF FF E9 C3 FF FF E8 C0 FF FF E7 BF FF FF E6' + 'BB FF FF E4 B5 FF FF DA AA FF F8 C2 97 FF EA 9F' + '7A FF F1 B1 8C FF F6 BB 8E FF F9 BB 80 FF FD B8' + '75 FF FF B6 6C FF FF B5 64 FF FF B4 5D FF FF B0' + '53 FF FF A9 45 FF FF A7 41 FF F8 92 3A FF EA 6A' + '2F FF F8 92 48 FF FB A5 51 FF F5 A1 4A FF E2 7E' + '35 FF D6 65 2B FF D0 57 2F FF C4 7D 68 FF C4 A4' + '9D D1 CF CD CF 77 D7 D3 CF 2C DB D6 CF 07 00 00' + '00 00 E6 D0 C9 AA F5 D9 D4 FF FF E4 DF FF FF F2' + 'EA FF FF FA F0 FF FF FA F0 FF FF FA F0 FF FF F8' + 'EA FF FF F6 E0 FF FF F4 DF FF FF F3 DF FF FF F3' + 'DF FF FF F1 D5 FF FF EF CF FF FF EF CF FF FF EF' + 'CF FF FF EC CA FF FF E8 C0 FF FF E8 C0 FF FF E7' + 'BF FF FF E6 BF FF FF E4 B5 FF FF D8 A5 FF FF C0' + '90 FF EA 96 70 FF E5 89 6A FF EF 9A 80 FF F9 AD' + '89 FF FF BA 8F FF FF C0 8F FF FF C0 7A FF FF BA' + '65 FF FF B0 50 FF FF A9 45 FF F4 8E 3A FF E0 60' + '2F FF F4 9A 4F FF FF B8 60 FF FF B8 60 FF F4 97' + '4A FF E4 79 39 FF D0 5F 2F FF C5 77 5A FF C5 9A' + '8F D8 CF C7 CF 8A E4 E2 E4 3C F0 F0 F0 16 00 00' + '00 00 E6 CA C2 AA F5 D6 D1 FF FF EC EA FF FF F6' + 'F4 FF FF FA F6 FF FF FA F0 FF FF FA F0 FF FF F9' + 'EE FF FF F8 EA FF FF F6 E3 FF FF F4 DF FF FF F3' + 'DF FF FF F2 DB FF FF F1 D6 FF FF EF CF FF FF EF' + 'CF FF FF EE CD FF FF EC C9 FF FF E9 C3 FF FF E7' + 'BF FF FF E7 BF FF FF E6 BB FF FF E0 B3 FF FF D7' + 'A5 FF F8 CA 9A FF F6 C0 95 FF F9 BB 94 FF F6 B3' + '89 FF F1 A7 7D FF EA 96 6F FF EA 96 68 FF ED 9B' + '65 FF F5 A4 65 FF FB A9 68 FF F8 9C 61 FF E9 7A' + '4F FF F7 AC 68 FF FF C2 71 FF FF BD 69 FF FB AB' + '5B FF EF 90 48 FF D9 6A 2F FF CF 72 4C FF C8 8F' + '7E DE C5 C1 C5 9B D4 CF CB 38 DC D6 CF 07 00 00' + '00 00 E6 C6 BB AA F5 D4 CD FF FF F4 F5 FF FF F9' + 'FB FF FF FB FB FF FF FA F5 FF FF FA F1 FF FF FA' + 'F0 FF FF FA F0 FF FF F8 E8 FF FF F6 E3 FF FF F4' + 'DF FF FF F3 DF FF FF F2 DB FF FF F1 D5 FF FF EF' + 'D1 FF FF EF CF FF FF EF CF FF FF EB C8 FF FF E9' + 'C3 FF FF E8 C0 FF FF E7 BF FF FF E6 BB FF FF E4' + 'B5 FF FF E4 B1 FF FF DE AC FF FF D3 A4 FF F8 C5' + '96 FF F1 B4 86 FF EA A0 75 FF EA 9E 75 FF EC 9F' + '75 FF F0 A4 74 FF F6 A3 74 FF F4 97 6B FF E9 7F' + '5A FF F4 A3 6C FF F9 B6 75 FF FA B9 74 FF FD B7' + '6D FF F7 A6 5D FF E9 87 44 FF D8 73 48 FF CB 87' + '73 EB C5 C1 C5 C2 CD C7 C1 41 00 00 00 00 00 00' + '00 00 E6 C3 B5 AA F5 D4 CA FF FF FC FF FF FF FC' + 'FF FF FF FC FF FF FF FC FF FF FF FA F5 FF FF FA' + 'F0 FF FF FA F0 FF FF FA F0 FF FF F8 EA FF FF F6' + 'E0 FF FF F4 DF FF FF F3 DF FF FF F3 DF FF FF F1' + 'D5 FF FF EF CF FF FF EF CF FF FF EF CF FF FF EC' + 'CA FF FF E8 C0 FF FF E8 BF FF FF E7 BF FF FF E6' + 'BF FF FF E4 B5 FF FF E4 B0 FF FF E4 B0 FF FF E4' + 'B0 FF FF E2 AA FF FF DE A0 FF FF D7 A0 FF FA C8' + '95 FF F0 B0 7F FF EF 95 6A FF E9 7F 5A FF DF 6F' + '4F FF E9 7F 5A FF EF 93 6A FF F0 AC 80 FF F9 B9' + '80 FF FF BD 7A FF FF B7 6F FF DF 7D 4F FF CF 82' + '6F FF CF C7 CF FF D0 C8 C4 55 00 00 00 00 00 00' + '00 00 EA CB C3 AA F6 D0 CA FF F5 D8 D4 FF F5 D5' + 'CD FF F8 D8 D1 FF FF E1 DF FF FF E8 E2 FF FF F0' + 'E8 FF FF FA F0 FF FF FA F0 FF FF F9 EE FF FF F8' + 'EA FF FF F4 E2 FF FB E3 D0 FF F5 C5 B4 FF F4 BD' + 'A9 FF F4 BD A8 FF F5 C4 AF FF FB D1 B6 FF FF DB' + 'BC FF FF E2 BF FF FF E6 BF FF FF E7 BF FF FF E7' + 'BF FF FF E6 BB FF FF E4 B6 FF FF E4 B0 FF FF E4' + 'B0 FF FF E3 AE FF FF E2 AA FF FF DD A3 FF FD D6' + '9C FF F9 CE 94 FF F3 AF 7F FF E6 98 76 FF D4 89' + '79 FF DF A4 93 FF E8 B0 9C FF EF AC 94 FF EC 99' + '78 FF EA 8D 65 FF EA 87 59 FF DF 69 41 FF D7 7F' + '64 C6 D0 C8 C4 55 D1 C9 C0 1C 00 00 00 00 00 00' + '00 00 E3 CE C6 71 EA CD C6 AA E6 C8 BF AA EC C0' + 'B4 BB F3 C2 B7 D7 FA CE C7 FF FA D4 CE FF FA DB' + 'D3 FF FA E2 D5 FF FA E4 D8 FF FB E7 DC FF FF EC' + 'E0 FF FB E2 D1 FF F6 D1 BF FF F0 B8 A9 FF E8 B1' + 'A2 C6 E5 B0 A2 AA E6 B7 A9 AA F3 C5 B1 E2 F9 CD' + 'B5 FF F9 D0 B4 FF F9 CE AE FF F9 D0 AE FF FA D6' + 'B4 FF FD D9 B4 FF FF DE B4 FF FF E4 B5 FF FF E4' + 'B1 FF FF E4 B0 FF FF E4 B0 FF FF E1 A8 FF FF DF' + 'A3 FF FF DE A0 FF F5 B9 86 FF E3 A3 82 FF CA 9C' + '94 FF D5 B9 B1 C6 DE C2 B8 AA E5 B6 A9 AA DE 9F' + '8D AA DB 91 7B AA DB 8D 74 AA E1 83 66 E2 DE 97' + '7F AA 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 E6 BF' + 'B4 33 F0 BC B2 88 F2 C2 B8 FF F0 C1 B8 FF F0 BC' + 'B0 FF F0 B4 A0 FF F0 B8 AA FF F5 C1 B4 FF FF D0' + 'C0 FF F5 BD AA FF F0 BC AA FF F0 CD C0 FF DC CB' + 'BF 55 00 00 00 00 00 00 00 00 E6 CC BF A9 EF C4' + 'B5 FF EF B4 A0 FF EF A2 8A FF EF A2 8A FF F0 B4' + 'A0 FF F9 BF A0 FF FF CF AA FF FF E6 BF FF FF E4' + 'B5 FF FF E4 B0 FF FF E4 B0 FF FF E4 B0 FF FF E2' + 'AA FF FF DE A0 FF F5 B4 80 FF E0 A1 7F FF C0 A7' + 'A0 FF CB BE B4 55 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 E5 CC BF A9 E6 CC' + 'BF AA 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 D8 C6' + 'BB 11 DC C5 BA 2D DC C7 BC 55 DC C7 BC 55 DC C5' + 'B9 55 DC C2 B4 55 E9 BC B0 A6 F1 BC B0 C1 F5 C1' + 'B4 A5 F1 BA AD C2 E8 BD B0 A7 DC CB BF 55 D5 CA' + 'BF 1C 00 00 00 00 00 00 00 00 D8 CA BF 38 DB C8' + 'BB 55 DB C2 B4 55 DB BC AD 55 DB BC AD 55 DC C2' + 'B4 55 EC BF AD C6 F4 BA A3 FF F4 B3 95 FF F4 B2' + '91 FF F4 B9 93 FF F5 C6 9A FF FB CF A1 FF FF D9' + 'A7 FF FF E2 AA FF ED A8 7C FF DC 9D 83 FF CA C1' + 'BF FF CF C7 BF 55 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 D8 CA BF 38 D8 CA' + 'BF 38 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 DF C2 B7 51 E6 BF B4 6C E6 BF' + 'B4 50 E5 BE B3 6D DE C2 B7 52 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 DF C2 B7 71 E5 B8 A9 AA E5 A9 94 AA E5 A9' + '94 AA EA B1 9A C6 F5 C0 A4 FF F8 C0 9E FF F8 C2' + '9A FF F4 C7 9A FF E6 9C 77 FF DA 9D 86 E2 D0 CD' + 'CA AA D1 CB C2 38 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 E0 CD C4 54 FF D4 CF FF F4 B6 A5 FF EA 9F' + '85 FF E0 8F 70 FF E0 8F 70 FF DB A2 8A AA 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 D7 CB C0 1C E1 CD C4 55 DD C3 B6 55 DA BB' + 'AB 55 D6 B6 A4 55 D6 B6 A4 55 D5 BC AD 38 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF' + 'FF FF FF FF 00 00 FF FF FF FF FF FF 00 00 FF 00' + '3F FF FF FF 00 00 FF 00 3F FF FF FF 00 00 FF 00' + '07 FF FF FF 00 00 FF 00 00 FF FF FF 00 00 FF 00' + '00 FF FF FF 00 00 FE 00 00 1F FF FF 00 00 FE 00' + '00 03 FF FF 00 00 FE 00 00 03 FF FF 00 00 FE 00' + '00 00 7F FF 00 00 FE 00 00 00 03 FF 00 00 FE 00' + '00 00 03 FF 00 00 F8 00 00 00 00 7F 00 00 F8 00' + '00 00 00 0F 00 00 F8 00 00 00 00 0F 00 00 F8 00' + '00 00 00 0F 00 00 F8 00 00 00 00 07 00 00 F8 00' + '00 00 00 07 00 00 F0 00 00 00 00 07 00 00 F0 00' + '00 00 00 07 00 00 F0 00 00 00 00 07 00 00 F0 00' + '00 00 00 07 00 00 F0 00 00 00 00 07 00 00 F0 00' + '00 00 00 07 00 00 C0 00 00 00 00 01 00 00 C0 00' + '00 00 00 01 00 00 C0 00 00 00 00 01 00 00 C0 00' + '00 00 00 01 00 00 C0 00 00 00 00 01 00 00 C0 00' + '00 00 00 01 00 00 80 00 00 00 00 01 00 00 80 00' + '00 00 00 00 00 00 80 00 00 00 00 00 00 00 80 00' + '00 00 00 00 00 00 80 00 00 00 00 01 00 00 80 00' + '00 00 00 01 00 00 80 00 00 00 00 01 00 00 80 00' + '00 00 00 07 00 00 F0 00 60 00 03 E7 00 00 F0 00' + '60 00 03 E7 00 00 FF C1 FF 80 03 FF 00 00 FF FF' + 'FF F8 0F FF 00 00 FF FF FF F8 0F FF 00 00 FF FF' + 'FF FF FF FF 00 00 FF FF FF FF FF FF 00 00 FF FF' + 'FF FF FF FF 00 00 FF FF FF FF FF FF 00 00 28 00' + '00 00 20 00 00 00 40 00 00 00 01 00 20 00 00 00' + '00 00 00 10 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 F0 C5' + 'BC FF D0 BC BF FF BF B8 BF FF CF C7 CF A5 DF D8' + 'DF 54 F0 EF F0 0F 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 E0 98' + '8F FF E0 84 6F FF D0 84 6F FF BF 98 90 FF B0 B0' + 'B0 FF C0 C0 C0 B7 DF D7 DF 66 EF E8 EF 1E 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 E0 84' + '6F FF F0 BF B0 FF FF DF D0 FF EF 97 80 FF DF 78' + '5F FF BF 90 80 FF B0 AF B0 FF C0 BF C0 C9 D0 D0' + 'D0 78 EF E7 EF 2D 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 F0 C4 BC FF EF 97' + '7F FF EF 9F 8F FF FF FC FF FF FF FC FF FF FF E7' + 'E0 FF F0 A7 8F FF D0 77 5F FF BF 88 7F FF B0 AF' + 'B0 FF BF B8 BF DB D0 CF D0 8A E0 E0 E0 3C 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 EF BF B0 FF FF CD' + 'A0 FF EF 97 80 FF FF FC FF FF FF FC FF FF FF F7' + 'FF FF FF F1 F0 FF F0 DF DF FF EF AD 9F FF DF 77' + '5F FF C0 84 70 FF B0 A7 A0 FF BF B7 BF ED CF C8' + 'CF 9C E0 E0 E0 4B 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 EF A7 90 FF FF D4' + 'A0 FF EF 8F 6F FF FF FC FF FF FF FC FF FF FF F7' + 'FF FF FF F1 F0 FF FF EF F0 FF F0 EF F0 FF F0 DF' + 'E0 FF EF AD 9F FF DF 77 50 FF C0 78 60 FF B0 9F' + '9F FF BF B7 BF FE CF C7 CF AE DF D8 DF 5D 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 EF 9A 80 FF FF E4' + 'B0 FF F0 9F 70 FF FF F1 F0 FF FF F7 FF FF FF F7' + 'FF FF FF F1 F0 FF F0 EF F0 FF F0 EF F0 FF F0 E7' + 'EF FF F0 E2 E0 FF F0 E2 E0 FF E0 AF A0 FF DF 77' + '5F FF CF 6F 50 FF B0 90 8F FF B0 B0 B0 FF C0 C0' + 'C0 C0 DF D7 DF 6F EF E8 EF 26 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 F0 C4 BC FF F0 B8 A0 FF FF DE' + 'A0 FF F0 AC 80 FF FF C5 A0 FF FF C0 80 FF FF DF' + 'CF FF FF F1 F0 FF F0 EF F0 FF F0 EF F0 FF F0 E7' + 'EF FF F0 E2 E0 FF F0 E2 E0 FF EF DF E0 FF EF DF' + 'E0 FF E0 B7 B0 FF DF 78 5F FF CF 67 4F FF BF 87' + '7F FF B0 AF B0 FF C0 BF C0 D2 D0 D0 D0 81 EF E7' + 'EF 35 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 F0 C7 BF FF FF CC B0 FF FF DE' + 'A0 FF F0 B0 80 FF FF BF 9F FF FF B1 5F FF FF A5' + '4F FF FF 9F 50 FF F0 C7 A0 FF F0 EF F0 FF F0 E7' + 'EF FF F0 E2 E0 FF EF DF E0 FF EF DF E0 FF EF DF' + 'E0 FF E0 D7 DF FF E0 D0 D0 FF DF BF BF FF E0 84' + '6F FF D0 5D 3F FF BF 7F 70 FF B0 A7 A0 FF BF B8' + 'BF E4 D0 D0 D0 93 F0 EF F0 2C 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 EF AD 9F FF FF E6 BF FF FF E4' + 'B0 FF FF C0 90 FF F0 B7 90 FF FF C7 7F FF FF B1' + '5F FF FF A5 4F FF F0 97 40 FF F0 90 3F FF F0 AC' + '80 FF F0 D4 CF FF EF DF E0 FF EF DF E0 FF E0 D7' + 'DF FF E0 D7 DF FF E0 D0 D0 FF DF CF D0 FF DF CF' + 'D0 FF DF B7 B0 FF D0 88 70 FF D0 5D 3F FF BF 77' + '60 FF BF AF AF FF DF D8 DF BA 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 F0 A8 90 FF FF E8 C0 FF FF E4' + 'B0 FF FF CC 9F FF F0 A7 80 FF FF CC 80 FF FF B8' + '60 FF FF B1 5F FF FF A5 4F FF F0 97 40 FF EF 80' + '30 FF EF 70 20 FF E0 90 60 FF E0 B8 AF FF E0 D7' + 'DF FF E0 D0 D0 FF E0 CF D0 FF DF CF D0 FF DF CF' + 'D0 FF DF C7 CF FF D0 C0 C0 FF D0 B7 BF FF D0 6F' + '50 FF BF 7F 70 FF CF C8 CF DD F0 F0 F0 2F 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 F4 C5 BC FF F0 C0 AF FF FF E6 BF FF FF E4' + 'B0 FF FF E4 B0 FF F0 A7 80 FF FF DE A0 FF FF C0' + '6F FF FF B8 60 FF FF B1 5F FF FF A5 4F FF F0 97' + '40 FF EF 80 30 FF EF 70 20 FF DF 67 1F FF DF 70' + '3F FF DF A0 8F FF E0 CF D0 FF DF CF D0 FF DF CF' + 'D0 FF DF C7 CF FF D0 C0 C0 FF D0 BF C0 FF D0 9F' + '90 FF C0 6F 50 FF C0 C0 C0 F9 F0 EF F0 46 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 F0 CD C0 FF FF D7 BF FF FF E8 C0 FF FF E6' + 'BF FF FF E4 B0 FF EF 8F 70 FF FF E4 B0 FF FF CC' + '80 FF FF C0 6F FF FF B8 60 FF FF B1 5F FF FF A5' + '4F FF F0 97 40 FF EF 80 30 FF E0 70 20 FF DF 67' + '1F FF D0 58 1F FF D0 57 1F FF D0 84 6F FF DF BF' + 'BF FF DF C7 CF FF D0 C0 C0 FF D0 BF C0 FF D0 B0' + 'B0 FF D0 5D 3F FF BF B7 BF FF EF E8 EF 60 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 EF B4 A0 FF FF EE D0 FF FF E8 C0 FF FF E8' + 'C0 FF FF E6 BF FF F0 A7 80 FF FF E8 C0 FF FF CC' + '80 FF FF CC 80 FF FF C0 6F FF FF B8 60 FF FF B0' + '50 FF FF A5 4F FF F0 97 40 FF EF 80 2F FF E0 70' + '20 FF DF 67 1F FF D0 58 1F FF CF 4F 10 FF CF 45' + '10 FF CF 6F 4F FF D0 A7 9F FF D0 BF C0 FF D0 BC' + 'BF FF D0 5D 3F FF B0 B0 B0 FF E0 DF E0 7C 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 F0 B4 A0 FF FF F3 DF FF FF EF CF FF FF E8' + 'C0 FF FF E8 C0 FF F0 A7 8F FF FF D7 BF FF FF D4' + '90 FF FF CC 80 FF FF CC 80 FF FF C0 6F FF FF B8' + '60 FF FF B1 5F FF FF A5 4F FF FF 97 3F FF EF 80' + '2F FF E0 70 20 FF DF 67 1F FF D0 58 1F FF CF 4F' + '10 FF CF 45 10 FF C0 38 00 FF B0 4F 30 FF C0 84' + '70 FF D0 77 5F FF BF 97 8F FF D0 D0 D0 98 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 F4 C6' + 'BC FF FF C8 BF FF FF F0 D0 FF FF EE D0 FF FF EF' + 'CF FF FF E8 C0 FF F0 B8 9F FF F0 B4 A0 FF FF D7' + 'B0 FF FF DF AF FF FF CF 8F FF FF C7 7F FF FF C0' + '6F FF FF B8 60 FF FF B1 5F FF FF AF 4F FF FF A6' + '40 FF FF 94 30 FF EF 80 2F FF DF 67 1F FF D0 58' + '1F FF CF 4F 10 FF CF 45 10 FF AF 27 00 FF B0 3F' + '10 FF C0 47 1F FF C0 84 70 FF CF C8 CF B3 F0 F0' + 'F0 0B 00 00 00 00 00 00 00 00 00 00 00 00 F0 CF' + 'CF FF FF DF CF FF FF F3 DF FF FF F0 D0 FF FF EE' + 'D0 FF FF EF CF FF FF E7 C0 FF FF C5 A0 FF F0 A7' + '80 FF EF 9A 80 FF FF BF A0 FF FF D4 A0 FF FF D4' + '90 FF FF C0 6F FF FF B8 60 FF FF B1 5F FF FF AF' + '4F FF FF A6 40 FF FF A6 40 FF FF 94 30 FF F0 78' + '20 FF DF 5F 1F FF CF 4F 10 FF AF 27 00 FF C0 4F' + '1F FF C0 47 1F FF C0 6F 5F FF C0 C0 C0 CF F0 EF' + 'F0 23 00 00 00 00 00 00 00 00 00 00 00 00 F0 BF' + 'B0 FF FF F6 E0 FF FF F3 DF FF FF F3 DF FF FF F0' + 'D0 FF FF EE D0 FF FF EF CF FF FF E8 C0 FF FF E8' + 'C0 FF FF D8 B0 FF FF C0 90 FF EF 8F 6F FF EF 9A' + '80 FF FF C5 A0 FF FF CF 8F FF FF B8 60 FF FF B0' + '50 FF FF AF 4F FF FF A6 40 FF FF A6 40 FF FF 9F' + '30 FF FF 8F 2F FF DF 5F 1F FF B0 37 10 FF CF 57' + '1F FF C0 4F 1F FF CF 60 40 FF BF B7 BF EB EF E8' + 'EF 3B 00 00 00 00 00 00 00 00 00 00 00 00 F0 BA' + 'AF FF FF FA F0 FF FF F6 E0 FF FF F3 DF FF FF F3' + 'DF FF FF F0 D0 FF FF EE D0 FF FF EF CF FF FF E8' + 'C0 FF FF E8 C0 FF FF E6 BF FF FF E4 B0 FF FF CD' + 'A0 FF EF 8F 6F FF FF CC B0 FF FF CC 80 FF FF B8' + '60 FF FF B0 50 FF FF AF 4F FF FF A6 40 FF FF A6' + '40 FF FF 9F 30 FF F0 78 2F FF DF 60 2F FF CF 60' + '20 FF CF 57 1F FF D0 54 2F FF B0 B0 B0 FF E0 DF' + 'E0 52 00 00 00 00 00 00 00 00 F4 C6 BC FF FF D0' + 'C0 FF FF FA F0 FF FF FA F0 FF FF F6 E0 FF FF F3' + 'DF FF FF F3 DF FF FF F0 D0 FF FF EE D0 FF FF EF' + 'CF FF FF E8 C0 FF FF E8 C0 FF FF E6 BF FF FF E4' + 'B0 FF FF CD A0 FF E0 8F 70 FF FF D8 B0 FF FF CC' + '80 FF FF B8 60 FF FF B0 50 FF FF AF 4F FF FF A6' + '40 FF FF A6 40 FF F0 6F 2F FF FF 9F 4F FF F0 97' + '40 FF CF 60 20 FF D0 54 2F FF BF 97 8F FF D0 D0' + 'D0 6E 00 00 00 00 00 00 00 00 F0 D4 CF FF FF E4' + 'DF FF FF FA F0 FF FF FA F0 FF FF FA F0 FF FF F6' + 'E0 FF FF F3 DF FF FF F3 DF FF FF F0 D0 FF FF EF' + 'CF FF FF EF CF FF FF E8 C0 FF FF E8 C0 FF FF E6' + 'BF FF FF E4 B0 FF FF C0 90 FF E0 82 60 FF EF 9A' + '80 FF FF B7 8F FF FF C0 8F FF FF C0 70 FF FF B0' + '50 FF FF A6 40 FF E0 60 2F FF FF B8 60 FF FF B8' + '60 FF EF 87 3F FF D0 5F 2F FF C0 84 70 FF CF C7' + 'CF 8A F0 F0 F0 16 00 00 00 00 F0 C7 BF FF FF F1' + 'F0 FF FF FC FF FF FF FA F0 FF FF FA F0 FF FF FA' + 'F0 FF FF F6 E0 FF FF F3 DF FF FF F3 DF FF FF F0' + 'D0 FF FF EF CF FF FF EF CF FF FF E8 C0 FF FF E8' + 'C0 FF FF E6 BF FF FF E4 B0 FF FF E4 B0 FF FF CC' + '9F FF F0 AC 7F FF E0 82 60 FF E0 82 60 FF F0 9F' + '70 FF FF B0 7F FF EF 88 60 FF FF CC 80 FF FF C0' + '6F FF FF B1 5F FF DF 70 30 FF CF 6F 50 FF C0 BF' + 'C0 A5 00 00 00 00 00 00 00 00 F0 C0 B0 FF FF FC' + 'FF FF FF FC FF FF FF FC FF FF FF FA F0 FF FF FA' + 'F0 FF FF FA F0 FF FF F6 E0 FF FF F3 DF FF FF F3' + 'DF FF FF F0 D0 FF FF EF CF FF FF EF CF FF FF E8' + 'C0 FF FF E8 BF FF FF E6 BF FF FF E4 B0 FF FF E4' + 'B0 FF FF E4 B0 FF FF DE A0 FF FF D4 A0 FF F0 B0' + '7F FF EF 88 60 FF DF 6F 4F FF EF 88 60 FF F0 AC' + '80 FF FF C0 80 FF FF B7 6F FF D0 60 40 FF CF C7' + 'CF FF 00 00 00 00 00 00 00 00 FA D3 D0 FF F0 C7' + 'BF FF F0 BF B0 FF FF D4 CF FF FF E4 DF FF FF FA' + 'F0 FF FF FA F0 FF FF FA F0 FF FF F3 DF FF F0 AF' + '9F FF EF 9F 8F FF F0 AF 9F FF FF CC B0 FF FF DF' + 'BF FF FF E8 C0 FF FF E8 BF FF FF E6 BF FF FF E4' + 'B0 FF FF E4 B0 FF FF E4 B0 FF FF DE A0 FF FF DE' + 'A0 FF F0 AC 7F FF CF 97 8F FF E0 C7 C0 FF EF AD' + '9F FF E0 78 60 FF E0 70 4F FF DF 58 30 FF 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 F0 BA AF 4D F2 C2 B8 FF F0 C1 B8 FF F0 B4' + 'A0 FF F0 BA AF FF FF D0 C0 FF F0 B4 A0 FF F0 CD' + 'C0 FF 00 00 00 00 00 00 00 00 F0 CD C0 FF EF B4' + 'A0 FF EF 9A 80 FF F0 B4 A0 FF FF C5 A0 FF FF E6' + 'BF FF FF E4 B0 FF FF E4 B0 FF FF E4 B0 FF FF DE' + 'A0 FF F0 9F 70 FF C0 A7 A0 FF 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 F0 CD C0 FF 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 F0 BA AF B7 F0 BA AF 79 EF B9 AE B9 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 F0 BA AF FF EF 9A' + '80 FF EF 9A 80 FF F0 B7 90 FF FF CD A0 FF FF E4' + 'B0 FF E0 82 60 FF D0 CF D0 FF 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 FF D4 CF FF EF A7 90 FF E0 8F' + '70 FF E0 8F 70 FF 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 FF FF FF FF FF FF FF FF FC 0F' + 'FF FF FC 03 FF FF FC 00 FF FF F8 00 3F FF F8 00' + '0F FF F8 00 03 FF F8 00 00 7F F0 00 00 1F F0 00' + '00 07 F0 00 00 07 F0 00 00 03 E0 00 00 03 E0 00' + '00 03 E0 00 00 03 E0 00 00 03 C0 00 00 01 C0 00' + '00 01 C0 00 00 01 C0 00 00 01 80 00 00 01 80 00' + '00 00 80 00 00 01 80 00 00 01 80 00 00 03 E0 18' + '00 7B FE 3F 80 7F FF FF F0 FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF 28 00 00 00 10 00 00 00 20 00' + '00 00 01 00 20 00 00 00 00 00 00 04 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 D7 C8 BE 01 DD C6 BD 57 CA C1' + 'BF 65 D8 D1 D0 27 DD D7 D1 03 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 D7 B8 AC 03 DF A0 92 D1 E0 AA' + '9B FD CA A2 98 E7 CC C3 C4 98 D6 D1 CF 38 DC D4' + 'D0 06 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 E4 C3 B7 2A F2 AE 94 F8 FC E7' + 'E4 FF FA DF DB FF DD AC A0 FE C9 9F 97 ED C6 BB' + 'B8 AC D2 CC CA 49 D7 D1 CB 08 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 E6 B1 9D 31 F9 C4 99 FD FC E5' + 'E0 FF FF F6 FB FF F7 ED ED FF EE D6 D4 FF DF AA' + '98 FF C8 96 8C F4 C5 B0 B0 BF CD C7 C5 59 DD D5' + 'D3 15 DE D7 D5 01 00 00 00 00 00 00 00 00 00 00' + '00 00 DB C8 BE 02 EA C5 B8 BF FA CF 9C FF FC C1' + '99 FF FF C8 9B FF F3 DD CD FF F0 E6 EA FF EF E0' + 'DF FF EA D0 CF FF DA A3 98 FF CC 8F 83 F8 C4 A8' + 'A2 D0 D3 CB CC 78 DC D8 D2 19 00 00 00 00 00 00' + '00 00 DB C0 B3 03 ED BC A8 D1 FF DD AC FF F7 B8' + '8A FF FF B4 62 FF F7 A2 52 FF EF A1 6B FF EA BC' + 'A8 FF E3 D4 D8 FF E0 D0 D1 FF DF C4 C3 FF D1 9F' + '94 FF C6 85 72 FB D6 CA CB A6 DC D6 D0 05 00 00' + '00 00 E6 C8 BD 2A F6 CD B7 F8 FF E4 B6 FF F5 B6' + '8A FF FF C7 7A FF FF B2 5D FF F6 99 44 FF EB 7B' + '2F FF DE 7A 45 FF D9 9C 85 FF DE C1 C1 FF D3 C0' + 'C2 FF CE 9D 91 FF CA B6 B3 DA E5 E0 DF 10 00 00' + '00 00 E6 BE AD 31 FC E3 C8 FD FF E8 C0 FF F6 BB' + '99 FF FF D1 8F FF FF C3 73 FF FF B2 59 FF F7 99' + '44 FF E7 77 27 FF D7 5F 1F FF D0 59 28 FF C9 7B' + '60 FF C9 94 88 FF C2 A4 9D E7 D7 D3 D1 19 DB C9' + 'C0 03 ED CB C2 BF FF EB D2 FF FF ED CC FF F8 CE' + 'AE FF F9 C2 9B FF FE C7 92 FF FF C5 7A FF FF B3' + '5E FF FD A4 44 FF F3 8B 32 FF DE 65 1E FF C9 45' + '0E FF B8 47 1D FF C2 81 70 F1 E1 DE DC 30 DC C6' + 'BA 04 EE CB BE D1 FF F4 E0 FF FF F1 D6 FF FF EC' + 'CC FF FE E0 BA FF FD CD A3 FF F7 B5 8E FF FD C3' + '8C FF FF B5 59 FF FF AA 46 FF FD 9C 35 FF E2 69' + '24 FF CB 55 1F FF C9 6B 4E FB DC D6 D7 56 E6 CB' + 'C2 3A FA DA D1 F8 FF F9 ED FF FF F4 E0 FF FF F1' + 'D6 FF FF ED CC FF FF E8 C1 FF FF DF B2 FF F3 B3' + '8B FF F8 B5 7E FF FF B5 68 FF FF AA 49 FF F0 7F' + '39 FF F0 96 46 FF CF 68 3F FE D0 C4 C2 7B E7 C8' + 'BD 40 FC EC EB FD FF FA F6 FF FF F9 ED FF FF F4' + 'E0 FF FF F0 D5 FF FF ED CB FF FF E8 C1 FF FE E0' + 'B3 FF FC D0 A1 FF F1 B2 83 FF F2 A7 73 FF ED 8A' + '5E FF F8 B3 71 FF E8 8D 51 FF CB B4 B0 AB E6 CD' + 'C5 25 EB C9 C1 98 F7 D0 C8 EE F8 DC D0 FC FC E3' + 'D4 FD F0 C5 B4 E8 EC C2 B1 A7 F7 CD B1 FA F9 D1' + 'AF FC FF E1 B3 FF FF E2 AD FF FB D0 97 FF D4 A3' + '92 EB DE B3 A3 94 E2 9B 80 A5 DD AC 9A 3F 00 00' + '00 00 D9 C5 BA 02 DE C6 BB 17 E0 C1 B6 2A EA BF' + 'B3 5D DF C4 B8 25 D9 CA BF 05 DD C1 B2 1A E1 C0' + 'B3 30 E8 B9 A5 93 F4 C3 A7 E8 EF B7 8E FA D4 B5' + 'A8 8B D0 C9 C1 01 D9 CA BF 05 D9 CA BF 05 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 DF CA BF 15 D8 B5 A2 1A D6 BA' + 'A9 05 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 C1 FF' + '00 00 C0 7F 00 00 C0 1F 00 00 C0 03 00 00 80 01' + '00 00 80 00 00 00 80 00 00 00 80 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 80 00 00 00 FF C7 00 00 FF FF 00 00 28 00' + '00 00 10 00 00 00 20 00 00 00 01 00 08 00 00 00' + '00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 7F 7F 7F 00 00 99' + '99 00 66 CC CC 00 99 CC FF 00 99 FF FF 00 F8 F8' + 'F8 00 00 00 00 00 E2 69 24 00 E7 77 27 00 EB 7B' + '2F 00 F0 7F 39 00 C7 6B 4E 00 DE 7A 45 00 C9 7B' + '60 00 F3 8B 32 00 FD 9C 35 00 BE 80 70 00 BF 91' + '7F 00 F0 96 46 00 F6 99 44 00 F7 99 44 00 E8 8D' + '51 00 ED 8A 5E 00 FD A4 44 00 FF AA 46 00 FF AA' + '49 00 F7 A2 52 00 FF B2 59 00 FF B5 59 00 FF B2' + '5D 00 FF B3 5E 00 C4 84 72 00 EF A1 6B 00 FF B4' + '62 00 FF B5 68 00 F2 A7 73 00 F8 B3 71 00 F8 B5' + '7E 00 FF C3 73 00 FF C5 7A 00 FF C7 7A 00 96 8A' + '85 00 96 90 8E 00 99 91 8E 00 92 91 90 00 96 95' + '94 00 9F 97 94 00 9A 98 97 00 3C 17 95 00 00 00' + '38 00 A8 44 F9 77 21 00 00 00 B8 0C 38 00 00 00' + '38 00 30 7E 0D 01 14 17 95 00 B1 A2 9F 00 5C 19' + '95 00 00 40 0D 01 68 19 95 00 77 82 F5 77 98 7F' + 'F5 77 3A 8A F5 77 00 04 00 00 C4 A2 AF 00 10 00' + '00 00 10 00 00 00 C9 94 88 00 CD 9A 8E 00 D9 9C' + '85 00 C3 9C 95 00 C2 9E 95 00 CE 9D 91 00 D1 9F' + '94 00 CD A0 90 00 C6 AA 9F 00 DA A3 98 00 DF AA' + '98 00 DF A9 9A 00 DC AB 9F 00 EC B5 8D 00 F1 B2' + '83 00 F3 B3 8B 00 F5 B6 8A 00 F7 B5 8E 00 F7 B8' + '8A 00 EE AC 93 00 F6 BB 99 00 CF B3 A9 00 D9 B0' + 'A0 00 D1 B7 B1 00 D9 BD B2 00 E9 BC A3 00 E5 BE' + 'AF 00 EA BC A8 00 FD C3 8C 00 FF D1 8F 00 FE C7' + '92 00 F8 C3 98 00 F9 C2 9B 00 FC C1 99 00 FF C8' + '9B 00 FA CF 9C 00 FB D0 97 00 FD CD A3 00 F8 CE' + 'AE 00 FC D0 A1 00 F7 D0 AE 00 FF DD AC 00 F4 CB' + 'B0 00 F2 CA B5 00 FF DF B2 00 FF E2 AD 00 FE E0' + 'B3 00 FF E1 B3 00 FF E4 B6 00 FE E0 BA 00 D3 C0' + 'C2 00 A8 01 38 00 10 44 0D 01 40 00 00 00 00 00' + '00 00 A8 01 38 00 38 44 0D 01 38 44 0D 01 E0 D0' + 'D1 00 EE D6 D4 00 E3 D4 D8 00 FA DF DB 00 FB E2' + 'C7 00 FF E8 C0 00 FF E8 C1 00 FF ED CB 00 FF EC' + 'CC 00 08 44 0D 01 08 44 0D 01 FB E2 D3 00 FF EB' + 'D2 00 FF F0 D5 00 FF F1 D6 00 FC E5 E0 00 FC E7' + 'E4 00 F0 E6 EA 00 00 40 0D 01 A4 18 95 00 E5 3A' + 'F8 77 06 00 00 00 08 44 0D 01 00 00 38 00 00 40' + '0D 01 00 00 00 00 78 19 95 00 CA 8C F5 77 78 01' + '38 00 BE 8E F5 77 08 06 38 00 37 90 F5 77 08 40' + '0D 01 08 40 0D 01 40 00 00 00 40 00 00 00 D0 BB' + 'BB 00 E0 B2 A5 00 EE BD A2 00 E3 B4 AA 00 E4 BB' + 'AF 00 F1 B6 A7 00 F6 BE A2 00 F0 BA AB 00 E5 BE' + 'B3 00 EC BC B0 00 00 40 0D 01 00 40 0D 01 F4 C4' + '97 00 78 01 38 00 08 40 0D 01 E0 07 0D 01 E8 07' + '0D 01 78 01 38 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 F5 C8 AA 00 00 40 0D 01 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 E9 C2' + 'B7 00 08 04 00 00 87 00 00 00 08 04 00 00 08 01' + '00 00 00 00 00 00 00 00 00 00 00 00 01 01 00 00' + '38 00 BC 18 95 00 C0 18 95 00 B0 19 95 00 F0 88' + 'FA 77 88 1C F5 77 FF FF FF FF 37 90 F5 77 81 E9' + '49 00 00 00 38 00 00 00 00 00 08 40 0D 01 08 40' + '0D 01 A4 1A 95 00 40 00 00 00 40 00 00 00 B8 10' + 'E9 77 FF FF FF FF C9 F1 E7 77 16 EA 4B 00 F8 00' + '00 00 B4 1A 95 00 DC E3 49 00 E0 A3 4E 00 FF FF' + 'FF FF 10 00 00 00 10 DA 4B 00 08 40 0D 01 71 CC' + '43 00 08 40 0D 01 30 7E 0D 01 A4 1A 95 00 C4 A2' + 'AF 00 C4 F5 AF 00 02 00 00 00 30 7E 0D 01 0F 02' + '00 00 48 40 0D 01 10 00 00 00 00 00 00 00 20 00' + '00 00 08 40 0D 01 40 00 00 00 10 00 00 00 00 01' + '00 00 00 04 00 00 00 00 00 00 00 00 00 00 10 00' + '00 00 10 00 00 00 28 00 00 00 10 00 00 00 20 00' + '00 00 01 00 20 00 00 00 00 00 00 04 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 07 07 07 07 07 07 07' + '07 07 07 07 07 07 00 00 02 02 02 02 02 02 02 02' + '02 02 02 02 07 07 00 00 02 06 04 05 04 05 04 04' + '04 04 03 02 07 07 00 02 06 05 05 04 05 04 05 04' + '04 04 03 07 02 07 00 02 06 05 05 05 05 05 04 05' + '04 04 02 07 02 07 02 06 05 05 05 05 04 05 05 04' + '05 03 07 03 03 07 02 06 05 05 05 05 05 05 04 05' + '04 03 07 03 03 07 02 02 02 02 02 02 02 02 02 02' + '02 02 03 05 03 07 00 02 06 05 05 05 05 05 05 05' + '05 05 05 05 03 07 00 02 06 05 05 05 05 05 05 05' + '06 06 06 06 03 07 00 02 06 05 05 05 05 05 06 02' + '02 02 02 02 02 00 00 00 02 06 06 06 06 06 02 00' + '00 00 00 00 00 00 00 00 00 02 02 02 02 02 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 FF FF 00 00 FF FF 00 00 E0 00' + '00 00 C0 00 00 00 C0 00 00 00 80 00 00 00 80 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 00' + '00 00 80 00 00 00 80 01 00 00 C0 7F 00 00 E0 FF' + '00 00 FF FF 00 00' +} */ + +/* BINRES floppy.ico */ +5 ICON floppy.ico +/* { + '00 00 01 00 09 00 20 20 00 00 01 00 08 00 A8 08' + '00 00 96 00 00 00 10 10 00 00 01 00 08 00 68 05' + '00 00 3E 09 00 00 10 10 00 00 01 00 04 00 28 01' + '00 00 A6 0E 00 00 20 20 00 00 01 00 04 00 E8 02' + '00 00 CE 0F 00 00 30 30 00 00 01 00 08 00 A8 0E' + '00 00 B6 12 00 00 30 30 00 00 01 00 04 00 68 06' + '00 00 5E 21 00 00 30 30 00 00 01 00 20 00 A8 25' + '00 00 C6 27 00 00 20 20 00 00 01 00 20 00 A8 10' + '00 00 6E 4D 00 00 10 10 00 00 01 00 20 00 68 04' + '00 00 16 5E 00 00 28 00 00 00 20 00 00 00 40 00' + '00 00 01 00 08 00 00 00 00 00 00 04 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 01 01 01 00 02 02 02 00 04 04 04 00 05 05' + '05 00 07 07 07 00 09 09 09 00 0A 0A 0A 00 0C 0C' + '0C 00 0D 0D 0D 00 10 10 10 00 12 12 12 00 13 13' + '13 00 15 15 15 00 16 16 16 00 17 17 17 00 18 18' + '18 00 19 19 19 00 1B 1B 1B 00 1C 1C 1C 00 1E 1E' + '1E 00 1F 1F 1F 00 20 20 20 00 21 21 21 00 23 23' + '23 00 24 24 24 00 25 25 25 00 26 26 26 00 27 27' + '27 00 28 28 24 00 2A 2A 25 00 28 28 28 00 2A 2A' + '2A 00 2B 2B 2B 00 2C 2C 2C 00 2E 2E 2E 00 32 32' + '32 00 33 33 33 00 34 34 34 00 35 35 35 00 37 37' + '37 00 3B 3B 3B 00 3C 3C 3C 00 3D 3D 3D 00 3F 3F' + '3F 00 40 40 40 00 44 44 44 00 45 45 45 00 46 46' + '46 00 47 47 47 00 48 48 48 00 49 49 49 00 4B 4B' + '4B 00 4C 4C 4C 00 4E 4E 4E 00 50 50 50 00 52 52' + '52 00 57 57 57 00 59 59 59 00 5E 5E 5E 00 61 61' + '61 00 64 64 64 00 65 65 65 00 6A 6A 6A 00 7F 60' + '60 00 71 71 71 00 77 77 77 00 79 79 79 00 7F 7F' + '7F 00 D5 40 40 00 00 C0 00 00 00 FF 00 00 87 80' + '7D 00 8B 86 84 00 8A 8A 8A 00 8C 8C 8C 00 8D 8D' + '8D 00 8E 8E 8E 00 97 97 97 00 99 99 99 00 9A 9A' + '9A 00 9E 9E 9E 00 A3 A3 9E 00 A4 A4 A4 00 A7 A7' + 'A7 00 AA AA AA 00 AB AB AB 00 AD A8 AB 00 AE AE' + 'AE 00 AF AF AF 00 B0 B0 B0 00 B2 B2 B2 00 B5 B5' + 'B5 00 B6 B6 B6 00 B7 B7 B7 00 BB BB BB 00 BC BC' + 'BC 00 BD BD BD 00 BF BF BF 00 EA 80 80 00 CA A8' + '94 00 CC AF 9D 00 E9 B6 99 00 E9 B8 9C 00 CE B6' + 'A6 00 D0 B3 A3 00 EB BE A5 00 D2 C3 B9 00 EC C0' + 'A7 00 EF CC B8 00 C2 C2 C2 00 C4 C4 C4 00 C5 C5' + 'C5 00 C6 C6 C6 00 C8 C9 C9 00 C9 C9 C9 00 CA CA' + 'CA 00 CB CB CB 00 CC CC CC 00 CD CD CD 00 CF CF' + 'CF 00 D5 CB C4 00 D0 D0 D0 00 D1 D1 D1 00 D2 D2' + 'D2 00 D3 D3 D3 00 D4 D4 D4 00 D5 D5 D5 00 D6 D6' + 'D6 00 D7 D7 D7 00 D8 D8 D8 00 D9 D9 D9 00 DA DA' + 'D8 00 DB DB DB 00 DC DC DC 00 DD DD DD 00 DE DE' + 'DE 00 DF DF DF 00 F1 D2 C2 00 F2 D6 C7 00 F4 DD' + 'D0 00 E0 E0 E0 00 E1 E1 E1 00 E2 E2 E2 00 E3 E3' + 'E3 00 E4 E4 E4 00 E5 E5 E5 00 E6 E6 E6 00 E7 E7' + 'E7 00 E8 E8 E8 00 E9 E9 E9 00 EA EA EA 00 EB EB' + 'EB 00 EC EC EC 00 ED ED ED 00 F0 F0 F0 00 F2 F2' + 'F2 00 F3 F3 F3 00 F9 F9 F9 00 FA FA FA 00 FF FF' + 'FF 00 00 00 00 00 01 00 00 00 18 00 00 00 00 00' + '00 00 10 19 95 00 42 00 00 00 00 00 00 00 F4 18' + '95 00 00 00 00 00 00 00 00 00 00 00 00 00 0C 00' + '00 00 02 00 00 00 01 01 F5 77 00 EC FD 7F 56 00' + '00 00 00 00 00 00 03 00 00 00 5E 00 1A 02 40 9F' + '07 00 00 00 00 00 40 9F 07 00 05 00 00 00 BE B3' + 'E7 77 4C 19 95 00 A3 B4 E7 77 F8 00 00 00 00 00' + '00 C0 00 00 00 00 00 00 00 00 02 00 00 00 80 00' + '00 00 00 00 00 00 8C 1A 95 00 7F E9 4B 00 08 6C' + '0C 01 00 00 00 C0 00 00 00 00 80 1A 95 00 02 00' + '00 00 80 00 00 00 00 00 00 00 C0 27 95 00 C4 F5' + 'AF 00 02 00 00 00 44 3A 5C 6F 73 65 78 70 65 72' + '74 73 5C 72 65 61 63 74 6F 73 5C 6C 69 62 5C 73' + '68 65 6C 6C 33 32 5C 66 6C 6F 70 70 79 2E 69 63' + '6F 00 1A 93 4B 00 14 1A 95 00 1F 3B D4 77 15 00' + '00 00 A8 00 00 00 4F 3B D4 77 E0 19 95 00 33 3B' + 'D4 77 64 C5 F5 77 A9 F1 E7 77 F8 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 1A 95 00 B0 6C' + '38 00 96 00 00 00 00 00 00 00 C9 F1 E7 77 96 00' + '00 00 A4 1A 95 00 09 00 00 00 00 00 00 00 96 00' + '00 00 96 00 00 00 09 00 00 00 F4 19 95 00 33 3B' + 'D4 77 B4 1A 95 00 09 48 E9 77 B8 10 E9 77 FF FF' + 'FF FF C9 F1 E7 77 16 EA 4B 00 F8 00 00 00 B0 6C' + '38 00 96 00 00 00 58 1A 95 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 2A 2A 2A 2A 40 40 40 40 40 40 40 40 40 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 4B 4B 4B 4B A1 A1 A1 A1 A1 A1 A1 A1 A1 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 1D 00 4B 08 45 45 45 45 45 45 45 45 45 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 1E A1 A1 08 63 63 63 63 63 63 63 63 63 00 A1' + 'A1 A1 A1 A1 A1 A1 A1 A1 A1 A1 A1 A1 A1 A1 A1 A1' + 'A1 03 08 0A 10 9A 94 94 94 94 94 94 94 94 00 A1' + 'A1 17 22 22 21 21 21 21 21 21 21 20 20 20 20 20' + '20 08 08 10 0F 99 94 4F 4F 4F 4F 4F 4F 4F A1 01' + '4A 98 95 95 7E 46 94 95 90 82 7C 77 77 77 72 55' + '23 A1 A1 15 10 97 93 95 95 97 97 98 98 99 A1 11' + '57 98 95 95 47 47 46 89 7F 7C 75 77 77 77 77 2D' + '23 A1 A1 0D 0C 96 94 4F 4F 4F 4F 4F 4F 4F A1 1F' + '7B 98 98 95 95 47 5C 5D 29 29 29 29 29 29 29 5D' + '5D A1 A1 07 09 95 94 90 90 91 91 93 93 94 A1 1F' + '7B 95 98 95 A1 A1 A1 A1 A1 A1 A1 A1 A1 A1 A1 A1' + 'A1 19 15 05 07 92 94 4F 4F 4F 4F 4F 4F 4F A1 1C' + '7C 97 98 98 54 56 58 59 59 59 59 56 56 56 56 56' + '56 24 08 A1 A1 92 92 94 94 96 96 97 97 98 A1 1B' + '7D 98 9A 96 95 91 8F 86 82 7C 7C 7A 7A 7A 7A 7A' + '7A 28 02 03 03 A1 A1 A1 A1 A1 A1 A1 A1 A1 A1 19' + '80 96 8E 8F 8D 89 89 89 8D 8D 8D 8D 8D 8D 8D 8D' + '8D 2C 09 0B 0E 17 1B 2A 2E 30 30 22 22 22 A1 19' + '88 83 6F 62 82 83 83 83 83 83 83 83 83 83 83 83' + '83 2E 18 12 16 21 27 2E 31 30 30 22 22 22 A1 04' + '6E 60 5B 56 5F 7F 7F 7E 7D 7F 81 82 81 7D 7D 7E' + '7F 34 35 23 25 2F 2E 34 34 2A 24 1A 13 0E 00 A1' + '53 78 70 62 73 7C 7A 7A 7A 7F 7F 7F 7F 7F 7A 7E' + '7A 38 39 27 2C 4B 4B 4B 4B 4B 4B 4B 4B 4B 00 A1' + '3A 7A 77 77 74 7D 7D 7E 7F 80 80 80 80 80 7F 85' + '91 3B 3B 3F 2E 4D A0 49 48 69 6C 66 66 66 00 A1' + '2D 7C 74 74 7E 7D 7D 7C 7C 7C 7C 7D 7C 7D 7C 7B' + '7A 3B 3B 3F 2E 4D A0 49 48 69 6C 66 66 66 00 A1' + '05 87 76 7D 7D 7A 7A 7A 7A 7D 7D 7D 7D 7D 7D 7D' + '7D 3E 3F 41 43 51 A0 38 36 8B 6D 67 66 66 00 A1' + 'A1 87 78 7D 7D 7A 7A 7A 7A 7A 78 7D 7D 7D 7D 7D' + '7D 2A 3F 41 43 55 A0 37 35 8C 8A 6A 66 66 00 A1' + 'A1 82 7E 7D 7D 7D 7D 7D 7D 7D 7D 7D 7D 7D 7D 7D' + '7D A1 A1 A1 A1 52 84 84 84 79 6B 68 65 64 00 A1' + 'A1 76 80 7D 7D 80 80 80 80 80 80 80 7D 7D 7D 76' + '73 6F 6E 61 7A 06 A1 00 00 00 00 00 00 00 00 A1' + 'A1 4E 86 86 88 88 87 87 87 87 87 87 87 87 87 87' + '87 94 94 86 71 A1 A1 00 00 00 00 00 00 00 00 00' + 'A1 42 7D 8E 88 88 88 8D 8D 8D 8D 8D 8D 8D 8D 8E' + '8E 94 94 83 5F A1 A1 00 00 00 00 00 00 00 00 00' + 'A1 27 61 93 93 94 98 98 98 98 98 98 98 98 98 94' + '94 94 93 7E 50 A1 A1 00 00 00 00 00 00 00 00 00' + 'A1 14 56 9A 94 99 98 9A 98 98 98 98 98 98 98 98' + '99 92 98 80 4A A1 A1 00 00 00 00 00 00 00 00 00' + '00 A1 4C 6F 5B 5B 98 9B 9B 9B 9B 9B 9B 9B 9B 9D' + '7F 5D 5E 77 3C A1 A1 00 00 00 00 00 00 00 00 00' + '00 A1 3D 87 86 91 9E 9E 9E 9E 9E 9E 9E 9E 9E 9F' + '9C 82 86 5A 26 A1 00 00 00 00 00 00 00 00 00 00' + '00 A1 A1 2B 33 32 32 32 32 32 32 32 32 32 32 32' + '32 33 33 02 A1 00 00 00 00 00 00 00 00 00 00 00' + '00 A1 A1 A1 A1 A1 A1 A1 A1 A1 A1 A1 A1 A1 A1 A1' + 'A1 A1 A1 A1 A1 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF' + 'FF FF FF FF E0 00 FF FF E0 00 FF FF E8 00 FF FF' + 'E0 00 80 00 00 00 80 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 00' + '00 00 80 00 00 00 80 00 00 00 80 00 00 00 80 00' + '00 00 80 00 00 00 80 00 00 7F 80 00 00 7F C0 00' + '00 7F C0 00 00 7F C0 00 00 7F E0 00 00 7F E0 00' + '00 FF E0 00 01 FF E0 00 01 FF FF FF FF FF 28 00' + '00 00 10 00 00 00 20 00 00 00 01 00 08 00 00 00' + '00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 01 01 00 00 01 01' + '01 00 03 06 04 00 05 05 05 00 09 09 09 00 0A 0C' + '0C 00 08 0D 0F 00 13 13 13 00 15 15 15 00 16 16' + '15 00 17 17 17 00 18 18 18 00 19 19 19 00 1D 1D' + '1D 00 1E 1E 1E 00 31 0A 0B 00 1A 1E 20 00 35 19' + '35 00 21 21 21 00 29 23 23 00 30 2A 30 00 31 31' + '31 00 32 33 33 00 34 34 34 00 35 35 35 00 36 36' + '36 00 39 39 39 00 3A 3A 3B 00 3B 3B 3B 00 7A 00' + '00 00 4E 3E 3E 00 3F 41 42 00 44 44 44 00 46 46' + '46 00 4B 4B 4B 00 50 52 52 00 57 57 57 00 59 59' + '59 00 5C 5C 5C 00 5E 5E 5E 00 65 6A 68 00 69 69' + '69 00 6E 6E 6E 00 6F 6E 6E 00 77 6E 69 00 7E 69' + '69 00 72 72 72 00 75 75 75 00 79 73 79 00 79 79' + '79 00 7B 7B 7B 00 7F 7F 7F 00 83 00 00 00 88 70' + '70 00 00 FF 00 00 75 99 75 00 97 97 97 00 9B 9B' + '9B 00 A5 A5 A5 00 A6 A6 A6 00 A8 A2 A8 00 A8 A8' + 'A8 00 A9 A9 A9 00 AF AF AF 00 B8 AC B8 00 B2 B2' + 'B2 00 ED B7 97 00 C0 AE A4 00 DB B7 A2 00 DC B7' + 'A2 00 B7 E6 B7 00 FB C6 A8 00 F9 C7 AB 00 C0 C0' + 'C0 00 C1 C2 C2 00 C2 C2 C2 00 C3 C3 C3 00 C6 CD' + 'CD 00 C7 CE CE 00 C9 C9 C9 00 CA CA CA 00 C8 CF' + 'CF 00 CC CC CC 00 CE CE CE 00 D0 D0 D0 00 D1 D1' + 'D1 00 D2 D2 D2 00 D3 D3 D3 00 D4 D4 D4 00 D5 D5' + 'D5 00 D6 D6 D6 00 D7 D7 D7 00 DE D8 D3 00 D8 D8' + 'D8 00 D9 D9 D9 00 DA DA DA 00 DE DE DE 00 FF C9' + 'C9 00 FF D7 D7 00 FF E3 D0 00 DF E6 E6 00 E0 E0' + 'E0 00 E1 E1 E1 00 E2 E2 E2 00 E4 E4 E4 00 E5 E5' + 'E5 00 E6 E6 E6 00 E8 E3 E1 00 E8 E8 E8 00 E9 E9' + 'E9 00 EA EA EA 00 EB EB EB 00 ED ED ED 00 F3 F3' + 'F3 00 F4 F4 F4 00 F5 F5 F5 00 F6 F6 F6 00 FF F2' + 'FF 00 F9 F9 F9 00 FA FA FA 00 FB FB FB 00 FB FC' + 'FC 00 FC FC FC 00 FF FD FE 00 FE FE FE 00 FF FF' + 'FF 00 00 00 00 00 D6 D6 D6 00 D7 D7 D7 00 D8 D8' + 'D8 00 D9 D9 D9 00 DA DA D8 00 DB DB DB 00 DC DC' + 'DC 00 DD DD DD 00 DE DE DE 00 DF DF DF 00 F1 D2' + 'C2 00 F2 D6 C7 00 F4 DD D0 00 E0 E0 E0 00 E1 E1' + 'E1 00 E2 E2 E2 00 E3 E3 E3 00 E4 E4 E4 00 E5 E5' + 'E5 00 E6 E6 E6 00 E7 E7 E7 00 E8 E8 E8 00 E9 E9' + 'E9 00 EA EA EA 00 EB EB EB 00 EC EC EC 00 ED ED' + 'ED 00 F0 F0 F0 00 F2 F2 F2 00 F3 F3 F3 00 F9 F9' + 'F9 00 FA FA FA 00 FF FF FF 00 00 00 00 00 01 00' + '00 00 18 00 00 00 00 00 00 00 10 19 95 00 42 00' + '00 00 00 00 00 00 F4 18 95 00 00 00 00 00 00 00' + '00 00 00 00 00 00 0C 00 00 00 02 00 00 00 01 01' + 'F5 77 00 EC FD 7F 56 00 00 00 00 00 00 00 03 00' + '00 00 5E 00 1A 02 40 9F 07 00 00 00 00 00 40 9F' + '07 00 05 00 00 00 BE B3 E7 77 4C 19 95 00 A3 B4' + 'E7 77 F8 00 00 00 00 00 00 C0 00 00 00 00 00 00' + '00 00 02 00 00 00 80 00 00 00 00 00 00 00 8C 1A' + '95 00 7F E9 4B 00 08 6C 0C 01 00 00 00 C0 00 00' + '00 00 80 1A 95 00 02 00 00 00 80 00 00 00 00 00' + '00 00 C0 27 95 00 C4 F5 AF 00 02 00 00 00 44 3A' + '5C 6F 73 65 78 70 65 72 74 73 5C 72 65 61 63 74' + '6F 73 5C 6C 69 62 5C 73 68 65 6C 6C 33 32 5C 66' + '6C 6F 70 70 79 2E 69 63 6F 00 1A 93 4B 00 14 1A' + '95 00 1F 3B D4 77 15 00 00 00 A8 00 00 00 4F 3B' + 'D4 77 E0 19 95 00 33 3B D4 77 64 C5 F5 77 A9 F1' + 'E7 77 F8 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 1A 95 00 B0 6C 38 00 96 00 00 00 00 00' + '00 00 C9 F1 E7 77 96 00 00 00 A4 1A 95 00 09 00' + '00 00 00 00 00 00 96 00 00 00 96 00 00 00 09 00' + '00 00 F4 19 95 00 33 3B D4 77 B4 1A 95 00 09 48' + 'E9 77 B8 10 E9 77 FF FF FF FF C9 F1 E7 77 16 EA' + '4B 00 F8 00 00 00 B0 6C 38 00 96 00 00 00 58 1A' + '95 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '06 14 36 2E 2E 2E 00 00 00 00 00 00 00 00 00 0A' + '29 10 35 1E 1E 1E 00 7F 7F 7F 7F 7F 7F 7F 7F 01' + '03 1F 63 62 62 62 7F 2C 3D 38 41 40 3E 3C 3F 0D' + '05 24 65 4E 4F 52 7F 7C 76 37 47 31 33 32 42 08' + '7F 23 6B 51 53 53 7F 7D 7D 12 15 19 19 18 19 13' + '7F 23 7D 66 68 69 7F 7E 72 7D 77 75 72 72 7E 28' + '7F 02 7F 0B 0C 04 7F 7B 3B 58 5B 5A 5C 5B 69 25' + '0F 16 1C 20 11 07 7F 5C 54 54 57 59 5A 5A 67 27' + '25 17 6C 44 46 45 7F 3A 57 58 55 55 56 57 66 26' + '2F 22 4B 2D 48 43 00 2A 61 55 55 55 56 57 67 1D' + '0E 21 7A 5D 64 49 00 1B 71 60 5E 5F 5F 5E 5E 6A' + '71 30 7F 00 00 00 00 04 72 6F 6D 6B 6A 6A 69 70' + '75 1A 00 00 00 00 00 7F 6E 50 77 75 73 74 78 54' + '79 09 00 00 00 00 00 7F 2B 4A 4D 4C 4C 4C 4C 4A' + '39 7F 00 00 00 00 00 00 7F 7F 7F 7F 7F 7F 7F 7F' + '7F 00 00 00 00 00 FF C0 00 00 FF 80 00 00 80 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 00' + '00 00 80 07 00 00 80 0F 00 00 80 0F 00 00 80 0F' + '00 00 C0 1F 00 00 28 00 00 00 10 00 00 00 20 00' + '00 00 01 00 04 00 00 00 00 00 80 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 80 00 00 00 00 80 00 00 80 80 00 00 00 00' + '80 00 80 00 80 00 00 80 80 00 C0 C0 C0 00 80 80' + '80 00 FF 00 00 00 00 FF 00 00 FF FF 00 00 00 00' + 'FF 00 FF 00 FF 00 00 FF FF 00 FF FF FF 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 80 00 00 00 00' + '00 00 00 09 99 99 00 00 00 00 00 0F FF FF 0F FA' + '77 77 00 0F 88 88 0F F0 00 00 00 0F FF FF 0F F7' + '77 77 70 00 00 00 07 77 77 77 70 00 00 00 07 77' + '77 77 70 08 88 88 07 77 77 77 70 08 87 77 07 77' + '77 77 70 07 8F 77 07 77 77 77 77 70 00 00 08 77' + '77 77 77 70 00 00 00 77 77 77 77 70 00 00 00 77' + '77 77 77 70 00 00 00 00 00 00 00 00 00 00 FF 80' + '00 00 FF 80 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 07 00 00 80 07' + '00 00 80 07 00 00 80 0F 00 00 80 0F 00 00 28 00' + '00 00 20 00 00 00 40 00 00 00 01 00 04 00 00 00' + '00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 80 00 00 00 00 80' + '00 00 80 80 00 00 00 00 80 00 80 00 80 00 00 80' + '80 00 C0 C0 C0 00 80 80 80 00 FF 00 00 00 00 FF' + '00 00 FF FF 00 00 00 00 FF 00 FF 00 FF 00 00 FF' + 'FF 00 FF FF FF 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 08 88 88 88 88 00 00 00 00 00 00 00 00 00 08' + '88 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '08 09 99 99 99 99 00 00 00 00 00 00 00 00 00 00' + '00 07 77 77 77 77 00 00 00 00 00 00 00 00 00 00' + '00 0F FF FF FF FF 00 00 00 00 00 00 00 00 00 00' + '00 0F F8 88 88 88 00 8F FF 7A FF F7 77 77 77 00' + '00 0F FF FF FF FF 00 7F FF AA A7 77 77 77 70 00' + '00 0F F8 88 88 88 00 7F FF FA 77 00 00 00 07 70' + '00 0F FF FF FF FF 00 7F FF 00 00 00 00 00 00 00' + '00 0F F8 88 88 88 00 7F FF 77 77 77 77 77 77 70' + '00 0F FF FF FF FF 00 7F FF 77 77 77 77 77 77 70' + '00 00 00 00 00 00 00 7F FF FF FF FF FF FF FF F0' + '00 00 00 88 80 00 00 77 77 77 77 77 77 77 77 78' + '00 00 08 88 80 00 00 77 77 77 77 77 77 77 77 78' + '80 08 88 80 00 00 00 77 77 77 77 77 77 77 77 78' + '80 08 88 88 88 88 00 87 77 77 77 77 77 77 77 78' + '88 88 F8 87 77 77 00 07 77 77 77 77 77 77 77 78' + '88 88 F8 87 77 77 00 07 77 77 77 77 77 77 77 78' + '88 88 F8 87 77 77 00 07 77 77 77 77 77 77 77 70' + '88 87 F8 8F 77 77 00 07 77 77 77 77 77 77 77 70' + '00 07 77 77 77 77 00 07 77 77 77 77 77 77 77 77' + '77 70 00 00 00 00 00 08 77 77 77 77 77 77 77 77' + '77 70 00 00 00 00 00 08 77 77 77 77 77 77 77 77' + '77 70 00 00 00 00 00 00 77 77 77 77 77 77 77 77' + '77 80 00 00 00 00 00 00 77 77 77 77 77 77 77 77' + '77 80 00 00 00 00 00 00 87 77 77 77 77 77 77 77' + '77 80 00 00 00 00 00 00 87 77 77 77 77 77 77 77' + '77 00 00 00 00 00 00 00 00 88 88 88 88 88 88 88' + '80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 FF FF E0 00 FF FF E0 00 FF FF' + 'E0 00 FF FF E8 00 E0 00 00 00 80 00 00 00 80 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 80 00 00 00 80 00 00 00 80 00' + '00 00 80 00 00 00 80 00 00 00 80 00 00 00 80 00' + '00 3F 80 00 00 7F C0 00 00 7F C0 00 00 7F C0 00' + '00 7F E0 00 00 7F E0 00 00 FF E0 00 00 FF E0 00' + '01 FF FF FF FF FF 28 00 00 00 30 00 00 00 60 00' + '00 00 01 00 08 00 00 00 00 00 00 09 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 01 01 01 00 02 02 02 00 03 03 03 00 04 04' + '04 00 05 05 05 00 06 06 06 00 07 07 07 00 08 08' + '08 00 09 09 09 00 0A 0A 0A 00 0B 0B 0B 00 0C 0C' + '0C 00 0D 0D 0D 00 0E 0E 0E 00 10 10 10 00 11 11' + '11 00 12 12 10 00 12 12 12 00 13 13 13 00 14 14' + '14 00 15 15 15 00 16 16 14 00 16 16 16 00 17 17' + '17 00 18 18 18 00 19 19 19 00 1B 1B 1B 00 1C 1C' + '1C 00 1E 1E 1E 00 1F 1F 1F 00 22 22 1F 00 20 20' + '20 00 21 21 21 00 22 22 22 00 23 23 23 00 24 24' + '24 00 25 25 25 00 26 26 26 00 27 27 27 00 28 28' + '24 00 2A 2A 25 00 2B 2B 26 00 28 28 28 00 29 29' + '29 00 2A 2A 2A 00 2B 2B 2B 00 2C 2C 2C 00 2E 2E' + '2E 00 2F 2F 2F 00 30 30 2C 00 30 30 30 00 32 32' + '32 00 33 33 33 00 36 36 30 00 34 34 34 00 35 35' + '35 00 36 36 36 00 37 37 37 00 39 39 39 00 3B 3B' + '3B 00 3C 3C 3C 00 3D 3D 3D 00 3F 3F 3F 00 40 40' + '40 00 41 41 41 00 42 42 42 00 43 43 43 00 44 44' + '44 00 45 45 45 00 46 46 46 00 47 47 47 00 48 48' + '48 00 49 49 49 00 4A 4A 4A 00 4B 4B 4B 00 4C 4C' + '4C 00 4E 4E 4E 00 4F 4F 4F 00 50 50 50 00 52 52' + '52 00 53 53 53 00 54 54 54 00 57 57 57 00 5B 58' + '57 00 59 59 59 00 5D 5D 5D 00 5E 5E 5E 00 5F 5F' + '5F 00 61 61 61 00 64 64 64 00 65 65 65 00 66 66' + '66 00 6D 6A 67 00 6A 6A 6A 00 7F 60 60 00 71 71' + '71 00 75 75 75 00 77 77 77 00 7B 77 75 00 79 79' + '79 00 7A 7A 7A 00 7E 7E 7E 00 7F 7F 7F 00 C0 00' + '00 00 83 7A 75 00 D5 40 40 00 00 C0 00 00 00 FF' + '00 00 87 80 7D 00 80 80 80 00 83 83 83 00 84 84' + '84 00 8B 86 84 00 8A 8A 8A 00 8C 8C 8C 00 8D 8D' + '8D 00 8E 8E 8E 00 90 90 90 00 93 93 93 00 97 97' + '97 00 99 99 99 00 9A 9A 9A 00 9E 9E 9E 00 9F 9F' + '9F 00 A3 A3 9E 00 A4 A4 A4 00 A6 A6 A6 00 A7 A7' + 'A7 00 A8 A8 A8 00 A9 A9 A9 00 AA AA AA 00 AB AB' + 'AB 00 AD A8 AB 00 AB AC AC 00 AD AD AD 00 AE AE' + 'AE 00 AF AF AF 00 B0 B0 B0 00 B1 B1 B1 00 B2 B2' + 'B2 00 B3 B3 B3 00 B5 B5 B5 00 B6 B6 B6 00 B7 B7' + 'B7 00 B8 B4 B6 00 B8 B6 B6 00 B8 B8 B8 00 BA BA' + 'BA 00 BB BB BB 00 BC BC BC 00 BD BD BD 00 BE BE' + 'BE 00 BF BF BF 00 EA 80 80 00 CA A8 94 00 CC AF' + '9D 00 E9 B6 99 00 E9 B8 9C 00 CE B6 A6 00 D0 B3' + 'A3 00 D0 BC B0 00 EA BB A0 00 EA BC A1 00 EB BE' + 'A5 00 D2 C3 B9 00 EC C0 A7 00 EC C2 AA 00 ED C5' + 'AE 00 ED C6 AF 00 EE C8 B3 00 EF CC B8 00 F0 CF' + 'BC 00 F0 D0 BE 00 C0 C0 C0 00 C1 C1 C1 00 C2 C2' + 'C2 00 C3 C3 C3 00 C4 C4 C4 00 C5 C5 C5 00 C6 C6' + 'C6 00 C8 C8 C8 00 C8 C9 C9 00 C9 C9 C9 00 CA CA' + 'CA 00 CB CB CB 00 CC CC CC 00 CD CD CD 00 CE CE' + 'CE 00 CF CF CF 00 D5 CB C4 00 D0 CB C8 00 D7 D2' + 'CE 00 D9 D1 CC 00 D0 D0 D0 00 D1 D1 D1 00 D2 D2' + 'D2 00 D3 D3 D3 00 D4 D4 D4 00 D5 D5 D5 00 D6 D6' + 'D6 00 D7 D7 D7 00 DC D9 D7 00 D8 D8 D8 00 D9 D9' + 'D9 00 DA DA D8 00 DA DA DA 00 DB DB DB 00 DC DC' + 'DC 00 DD DD DD 00 DE DE DE 00 DF DF DF 00 FF C0' + 'C0 00 F1 D2 C2 00 F2 D6 C7 00 F3 D9 CB 00 F4 DD' + 'D0 00 F6 E4 D9 00 E0 E0 E0 00 E1 E1 E1 00 E2 E2' + 'E2 00 E3 E3 E3 00 E4 E4 E4 00 E5 E5 E5 00 E6 E6' + 'E6 00 E7 E7 E7 00 E8 E8 E8 00 E9 E9 E9 00 EA EA' + 'EA 00 EB EB EB 00 EC EC EC 00 ED ED ED 00 EE EE' + 'EE 00 EF EF EF 00 F9 EE E8 00 F0 F0 F0 00 F1 F1' + 'F1 00 F2 F2 F2 00 F3 F3 F3 00 F4 F4 F4 00 F5 F5' + 'F5 00 F6 F6 F6 00 F7 F7 F7 00 FD F9 F7 00 F8 F8' + 'F8 00 F9 F9 F9 00 FA FA FA 00 FF FF FF 00 00 00' + '00 00 C9 F1 E7 77 16 EA 4B 00 F8 00 00 00 B0 6C' + '38 00 96 00 00 00 58 1A 95 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 F8 F8 F8 F8 F8 F8' + 'F8 D4 D4 D4 D4 D4 D4 D4 D4 D4 D4 D4 D4 D4 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 F8 3D 3D 3D 3D 3D' + 'F8 5F 5F 5F 5F 5F 5F 5F 5F 5F 5F 5F 5F 5F 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 F8 73 73 73 73 73' + 'F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 F8 16 36 36 1F 04' + 'F8 68 68 68 68 68 68 68 68 68 68 68 68 68 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 F8 28 00 00 73 0C' + 'F8 6A 6A 6A 6A 6A 6A 6A 6A 6A 6A 6A 6A 6A 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 F8 29 F8 F8 F8 0C' + 'F8 9A 9A 9A 9A 9A 9A 9A 9A 9A 9A 9A 9A 9A 00 00' + '00 00 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8' + 'F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 11 2A 32 1F 0F' + 'F8 D4 D4 D4 D4 D4 D4 D4 D4 D4 D4 D4 D4 D4 00 00' + 'F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8' + 'F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 04 0C 0C 0F 19' + 'F8 E7 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 00 F8' + 'F8 F8 F8 21 2F 2E 2F 2E 2E 2E 2E 2E 2E 2E 2E 2E' + '2E 2E 2D 2D 2D 2D 2D 2D 2D 2D F8 0C 0C 0F 19 18' + 'F8 E6 E1 79 79 79 79 79 79 79 79 79 79 79 00 F8' + 'F8 26 76 91 87 86 85 BB BA B9 B7 B2 B1 B0 B0 B1' + 'AE AF 99 99 96 97 94 97 97 97 F8 0C 0F 19 19 1D' + 'F8 E5 CF DA DA DA DB DB DB DC DD DD DD DE F8 F8' + '01 72 85 E5 E2 E2 E2 C6 6B 6B E1 E2 E2 DD D1 CB' + 'C4 BB BB BB BB BB B6 BB 83 30 F8 F8 F8 19 1E 19' + 'F8 E4 E0 E1 E2 E2 E3 E4 E4 E4 E5 E5 E5 E6 F8 F8' + '1A 85 E5 E5 E2 E2 E2 6C 6C 6C 6B DB D3 C7 BA C4' + 'B9 BB BB BB BB BB BB BB 40 30 F8 F8 F8 1E 15 13' + 'F8 E3 E1 79 79 79 79 79 79 79 79 79 79 79 F8 F8' + '2C 85 E4 E5 E5 E2 E2 6C 6C 6C 6C B9 B5 5C 5C 5C' + '5C 5C 5C 5C 5C 5C 5C BB 77 40 F8 F8 F8 F8 0E 0F' + 'F8 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 F8 F8' + '2B C3 E6 E5 E5 E2 E2 E2 6C 6C 8E 8E 8F 3C 3C 3C' + '3C 3C 3C 3C 3C 3C 3C 8F 8F 8F F8 F8 F8 F8 0A 0D' + 'F8 E2 E1 DD DD DD DD DE DE DF E0 E0 E0 E1 F8 F8' + '2B C3 E8 E2 E5 E2 E2 F8 F8 F8 F8 F8 F8 F8 F8 F8' + 'F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 24 1E 05 07 0A' + 'F8 DF E1 79 79 79 79 79 79 79 79 79 79 79 F8 F8' + '27 C3 E9 E5 E5 E5 E5 6E 3C 3C 3C 3C 3C 3C 3C 3C' + '3C 3C 3C 3C 3C 3C 3C 3C 3C 3C F8 2E 10 02 03 03' + 'F8 D0 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 F8 F8' + '27 C4 ED E4 E5 E5 E5 80 80 84 88 8A 89 89 89 89' + '89 89 84 84 84 84 84 84 84 84 F8 34 0C F8 F8 F8' + 'F8 DF DF E0 E1 E1 E2 E3 E3 E3 E4 E4 E4 E5 F8 F8' + '26 C5 EE E5 E7 E5 E3 E2 E0 DE DC CF D0 CB CC C4' + 'C4 BD C2 C2 C2 C2 C2 C2 C2 C2 F8 3A 02 03 04 04' + 'F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8' + '26 C5 F2 F4 F1 F1 F1 F0 F0 EF EF EE EE EE ED ED' + 'EC EC EC EB EB EB E9 E9 E8 E8 F8 3A 07 09 0B 0D' + '0F 13 1A 1D 27 37 42 46 46 46 46 2F 2F 2F F8 F8' + '24 C8 F7 E3 DB DC DC DA D3 D3 D3 D3 D3 DA DA DA' + 'DA DA DA DA DA DA DA DA DA DA F8 3F 0D 10 12 17' + '1B 21 26 33 3D 44 47 46 46 46 2F 2F 2F 2F F8 F8' + '24 D2 F4 CC B2 95 99 CB CE CC CC CC CC CC CC CC' + 'CC CC CC CC CC CC CC CC CC CC F8 44 23 18 1B 20' + '27 2E 38 40 44 47 4A 46 46 2F 2F 2F 2F 2F F8 F8' + '1E CE EE B4 82 90 8A B1 CE CB CB CB CB CB C9 C9' + 'C9 C9 C9 C9 C9 C9 CB CB CB CB F8 4B 30 1E 25 2E' + '31 3B 43 44 47 4B 49 42 39 2F 23 1C 1C 14 F8 F8' + '05 B0 F1 96 8C B1 84 95 CB C7 C7 C7 C6 C5 C5 C7' + 'C9 CB CB C9 C7 C5 C5 C5 C6 C7 F8 4B 4C 27 30 35' + '3D 45 44 47 4B 4B 45 3D 34 2D 25 1C 1C 17 00 F8' + 'F8 7E EF BD B3 C4 99 B7 C5 C4 C2 C5 C2 C2 C7 C7' + 'C7 C7 C7 C7 C7 C7 C2 C2 C6 C2 F8 50 53 3D 38 3F' + 'F8 73 73 73 73 73 73 73 73 73 73 73 73 73 00 F8' + 'F8 66 E9 C3 BD B9 BD C3 BC BD C7 C7 C7 C7 C7 C7' + 'C7 C7 C7 C7 C7 C7 C7 C7 C7 DB F8 53 57 56 49 45' + 'F8 70 F3 EA D9 D7 AC A8 A2 9D 9D 9D 9D 9D 00 F8' + 'F8 55 E3 C2 BB BB BB B8 C5 C5 C5 C5 C6 C7 C8 C8' + 'C8 C8 C8 C8 C8 C8 C7 C7 CF DE F8 57 57 5B 5E 44' + 'F8 75 F7 BF 71 6D 69 A0 A6 9D 9D 9D 9D 9D 00 F8' + 'F8 40 C9 C4 B8 B9 B8 C6 C5 C5 C5 C3 C4 C4 C4 C4' + 'C4 C4 C5 C4 C5 C5 C4 C4 C3 C2 F8 57 57 5B 5E 44' + 'F8 75 F7 BF 71 6D 69 A0 A6 9D 9D 9D 9D 9D 00 F8' + 'F8 22 90 CF B8 B9 BC C5 C5 BD C3 C2 C2 C2 C2 BD' + 'C5 C5 BC C5 C5 C5 C5 C5 C5 BC F8 57 5B 5E 5E 60' + 'F8 78 F7 92 52 4E 54 AD A9 A3 9D 9D 9D 9D 00 F8' + 'F8 07 7C D1 BA BB C5 C5 C5 C2 C2 C2 C2 C2 C2 C5' + 'C5 C5 C5 C5 C5 C5 C5 C5 C5 C5 F8 5B 5B 5E 60 64' + 'F8 7B F7 89 50 4D 5D D6 AB A7 9E 9D 9D 9D 00 00' + 'F8 F8 6F D1 BD C3 C5 C5 C2 C2 C2 C2 C2 C2 C2 C2' + 'BD C5 C5 C5 C5 C5 C5 C5 C5 C5 F8 5B 5B 5E 64 64' + '3D 83 F7 7F 4F 4C 63 D8 D5 AA A4 9D 9D 9D 00 00' + 'F8 F8 58 D0 C3 C4 C5 C5 C3 C3 C3 C3 C3 C3 C3 C3' + 'C3 C5 C5 C5 C5 C5 C5 C5 C5 C5 F8 5E 60 64 66 66' + 'F8 8B F7 DA D3 CA C1 D9 D7 AC A8 A2 A2 9D 00 00' + 'F8 F8 41 CB C6 C4 C5 C5 C5 C5 C5 C5 C5 C5 C5 C5' + 'C5 C5 C5 C5 C5 C5 C5 C5 C5 C5 F8 F8 F8 F8 F8 F8' + 'F8 7D CD CD CD CD C0 BE A5 A1 9F 9C 9C 9B 00 00' + 'F8 F8 2F BA C8 C7 C5 C5 C8 C8 C8 C8 C8 C8 C8 C8' + 'C8 C8 C8 C5 C5 C5 C5 C5 BA B7 B4 B2 B0 8D 97 C2' + '79 09 F8 F8 00 00 00 00 00 00 00 00 00 00 00 00' + 'F8 F8 19 8A CF CF D2 D2 D2 CC CE CE CE CE CE CE' + 'CE CE CE CE D1 D1 D1 D1 D1 CE D1 D1 E1 CC BA B8' + '65 02 F8 F8 00 00 00 00 00 00 00 00 00 00 00 00' + 'F8 F8 08 78 D0 D3 D0 D2 D2 D2 D1 D1 D1 D1 D1 D1' + 'D1 D1 D1 D1 D1 D1 D1 D1 D1 D1 E1 E1 E1 D1 D0 B4' + '51 F8 F8 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 F8 F8 62 C5 DC DB D2 D2 D2 D2 D2 DA DA DA DA' + 'DA DA DA DA DA DA DA DA DB DB E1 E1 E1 DD CC 95' + '3B F8 F8 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 F8 F8 4B B7 DF DD DE E5 E5 E5 E5 E5 E5 DE DE' + 'DE DE DE DE DE DE DF DF E1 E1 E1 E1 DE E0 C8 81' + '20 F8 F8 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 F8 F8 38 97 E0 E0 E0 E1 E1 E5 E5 E5 E5 E5 E5' + 'E5 E5 E5 E5 E5 E5 E5 E1 E1 E1 E1 E1 E0 E2 C6 7A' + '0B F8 F8 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 F8 F8 1D 84 DE E7 E1 E0 E6 E5 E4 E7 E5 E5 E5' + 'E5 E5 E5 E5 E5 E5 E5 E5 E5 E6 E4 DF E5 E5 C8 72' + 'F8 F8 F8 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 F8 F8 08 79 DE D3 97 AF C8 E6 E7 E7 E8 E8 E7' + 'E6 E5 E5 E6 E7 E8 E8 E7 E8 DE B0 98 C3 E6 C6 61' + 'F8 F8 F8 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 F8 F8 74 DA B2 8C 93 8C E5 EC EB EB EB EB' + 'EB EB EB EB EB EB EB EB EE C7 8A 8F 90 E5 BB 59' + 'F8 F8 F8 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 F8 F8 5A BC D1 D0 C7 DE F5 F5 F5 F5 F5 F5' + 'F5 F5 F5 F5 F5 F5 F5 F5 F6 ED D3 CB D0 C9 8A 37' + 'F8 F8 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 F8 F8 1A 6E 98 C5 C9 CF CB CB CB CB CB CB' + 'CB CB CB CB CB CB CB CB CB CC CC C9 BB 8A 56 06' + 'F8 F8 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 F8 F8 F8 0C 3E 49 48 48 48 48 48 48 48 48' + '48 48 48 48 48 48 48 48 48 48 48 49 49 31 02 F8' + 'F8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8' + 'F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8' + 'F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 F8 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF' + 'FF FF FF FF 00 00 FF FF FF F0 00 00 00 00 FF FF' + 'FF F0 00 00 00 00 FF FF FF F0 00 00 00 00 FF FF' + 'FF F0 00 00 00 00 FF FF FF F3 00 00 00 00 FF FF' + 'FF F0 00 00 00 00 F0 00 00 00 00 00 00 00 C0 00' + '00 00 00 00 00 00 80 00 00 00 00 00 00 00 80 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 00' + '00 00 00 00 00 00 80 00 00 00 00 00 00 00 80 00' + '00 00 00 00 00 00 80 00 00 00 00 00 00 00 80 00' + '00 00 00 00 00 00 80 00 00 00 00 00 00 00 C0 00' + '00 00 00 00 00 00 C0 00 00 00 00 00 00 00 C0 00' + '00 00 00 00 00 00 C0 00 00 00 03 FF 00 00 C0 00' + '00 00 03 FF 00 00 C0 00 00 00 07 FF 00 00 E0 00' + '00 00 07 FF 00 00 E0 00 00 00 07 FF 00 00 E0 00' + '00 00 07 FF 00 00 E0 00 00 00 07 FF 00 00 E0 00' + '00 00 07 FF 00 00 F0 00 00 00 07 FF 00 00 F0 00' + '00 00 0F FF 00 00 F0 00 00 00 0F FF 00 00 F0 00' + '00 00 1F FF 00 00 F8 00 00 00 3F FF 00 00 FE 00' + '00 00 7F FF 00 00 FF FF FF FF FF FF 00 00 28 00' + '00 00 30 00 00 00 60 00 00 00 01 00 04 00 00 00' + '00 00 80 04 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 80 00 00 00 00 80' + '00 00 80 80 00 00 00 00 80 00 80 00 80 00 00 80' + '80 00 C0 C0 C0 00 80 80 80 00 FF 00 00 00 00 FF' + '00 00 FF FF 00 00 00 00 FF 00 FF 00 FF 00 00 FF' + 'FF 00 FF FF FF 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 07' + '77 77 77 77 77 77 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 08 88 88 88 88 88 88 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 08 88 88 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 09 99 99 99 99 99 99 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 09' + '99 99 99 99 99 99 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 07 77 77 77 77 77 77 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 07' + '77 77 77 77 77 77 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 0F FF FF FF FF FF FF 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0F' + 'F8 88 88 88 88 88 00 00 87 77 77 77 77 77 77 77' + '77 77 77 77 00 00 00 0F 7F FF FF FF FF FF 00 08' + '7F FF F7 AA FF FF 77 77 77 77 77 70 00 00 00 0F' + 'FF FF FF FF FF FF 00 07 FF FF FA AA AF 77 77 77' + '77 77 77 00 00 00 00 0F F8 88 88 88 88 88 00 07' + 'FF FF FA AA A7 78 88 88 88 88 87 80 00 00 00 0F' + 'FF FF FF FF FF FF 00 07 FF FF FF AA 77 70 00 00' + '00 00 07 77 00 00 00 0F FF FF FF FF FF FF 00 07' + 'FF FF F0 00 00 00 00 00 00 00 00 00 00 00 00 0F' + 'F8 88 88 88 88 88 00 07 FF FF F8 00 00 00 00 00' + '00 00 00 00 00 00 00 07 FF FF FF FF FF FF 00 07' + 'FF FF F7 77 77 77 77 77 77 77 77 77 00 00 00 0F' + 'FF FF FF FF FF FF 00 07 FF FF FF FF F7 77 77 77' + '77 77 77 77 00 00 00 00 00 00 00 00 00 00 00 07' + 'FF FF FF FF FF FF FF FF FF FF FF FF 00 00 00 00' + '00 00 88 88 80 00 00 07 F7 7F FF 77 77 7F FF FF' + 'FF FF FF FF 00 00 00 00 00 08 88 88 00 00 00 07' + '77 77 77 77 77 77 77 77 77 7F 77 F7 08 00 00 00' + '00 88 88 80 00 00 00 07 F7 77 77 77 77 77 77 77' + '77 77 77 77 08 00 00 00 88 88 88 00 00 00 00 07' + '77 77 77 77 77 77 77 77 77 77 77 77 08 80 00 08' + '88 88 80 00 00 00 00 07 77 77 77 77 77 77 77 77' + '77 77 77 77 08 80 00 08 88 88 88 88 88 88 00 08' + '77 77 77 77 77 77 77 77 77 77 77 77 08 88 88 08' + 'FF F7 77 77 77 77 00 08 77 77 77 77 77 77 77 77' + '77 77 77 77 08 88 88 08 F7 88 87 77 77 77 00 00' + '77 77 77 77 77 77 77 77 77 77 77 77 08 88 88 08' + 'F7 88 87 77 77 77 00 00 77 77 77 77 77 77 77 77' + '77 77 77 77 08 88 88 08 F7 88 87 77 77 77 00 00' + '87 77 77 77 77 77 77 77 77 77 77 77 08 88 88 08' + 'F7 88 87 77 77 77 00 00 87 77 77 77 77 77 77 77' + '77 77 77 77 08 88 88 07 F7 88 8F 77 77 77 00 00' + '87 77 77 77 77 77 77 77 77 77 77 77 08 88 88 07' + 'FF 77 7F 77 77 77 00 00 87 77 77 77 77 77 77 77' + '77 77 77 77 00 00 00 07 77 77 77 77 77 77 00 00' + '07 77 77 77 77 77 77 77 77 77 77 77 77 77 77 80' + '00 00 00 00 00 00 00 00 07 77 77 77 77 77 77 77' + '77 77 77 77 77 77 77 80 00 00 00 00 00 00 00 00' + '08 77 77 77 77 77 77 77 77 77 77 77 77 77 77 80' + '00 00 00 00 00 00 00 00 08 77 77 77 77 77 77 77' + '77 77 77 77 77 77 77 00 00 00 00 00 00 00 00 00' + '08 77 77 77 77 77 77 77 77 77 77 77 77 77 77 00' + '00 00 00 00 00 00 00 00 00 77 77 77 77 77 77 77' + '77 77 77 77 77 77 77 00 00 00 00 00 00 00 00 00' + '00 77 77 77 77 77 77 77 77 77 77 77 77 77 77 00' + '00 00 00 00 00 00 00 00 00 87 77 77 77 77 77 77' + '77 77 77 77 77 77 78 00 00 00 00 00 00 00 00 00' + '00 87 77 77 77 77 77 77 77 77 77 77 77 77 78 00' + '00 00 00 00 00 00 00 00 00 87 77 77 77 77 77 77' + '77 77 77 77 77 77 70 00 00 00 00 00 00 00 00 00' + '00 08 77 77 77 77 77 77 77 77 77 77 77 77 80 00' + '00 00 00 00 00 00 00 00 00 00 08 88 88 88 88 88' + '88 88 88 88 88 80 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 FF FF FF FF FF FF 00 00 FF FF' + 'FF F0 00 00 00 00 FF FF FF F0 00 00 00 00 FF FF' + 'FF F0 00 00 00 00 FF FF FF F0 00 00 00 00 FF FF' + 'FF F3 00 00 00 00 FF FF FF F0 00 00 00 00 F0 00' + '00 00 00 00 00 00 C0 00 00 00 00 00 00 00 80 00' + '00 00 00 00 00 00 80 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 80 00 00 00 00 00 00 00 80 00' + '00 00 00 00 00 00 80 00 00 00 00 00 00 00 80 00' + '00 00 00 00 00 00 80 00 00 00 00 00 00 00 80 00' + '00 00 00 00 00 00 C0 00 00 00 00 00 00 00 C0 00' + '00 00 00 00 00 00 C0 00 00 00 00 00 00 00 C0 00' + '00 00 03 FF 00 00 C0 00 00 00 03 FF 00 00 C0 00' + '00 00 07 FF 00 00 E0 00 00 00 07 FF 00 00 E0 00' + '00 00 07 FF 00 00 E0 00 00 00 07 FF 00 00 E0 00' + '00 00 07 FF 00 00 E0 00 00 00 07 FF 00 00 F0 00' + '00 00 07 FF 00 00 F0 00 00 00 0F FF 00 00 F0 00' + '00 00 0F FF 00 00 F0 00 00 00 1F FF 00 00 F8 00' + '00 00 3F FF 00 00 FE 00 00 00 7F FF 00 00 FF FF' + 'FF FF FF FF 00 00 28 00 00 00 30 00 00 00 60 00' + '00 00 01 00 20 00 00 00 00 00 00 24 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 24 00 00 00 6C 00 00 00 90 00 00 00 90 00 00' + '00 90 00 00 00 90 00 00 00 90 00 00 00 90 00 00' + '00 90 00 00 00 90 00 00 00 90 00 00 00 90 00 00' + '00 90 00 00 00 90 00 00 00 90 00 00 00 90 00 00' + '00 90 00 00 00 90 00 00 00 90 00 00 00 90 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF FF C0 C0 FF FF C0' + 'C0 FF FF C0 C0 FF FF C0 C0 FF FF C0 C0 FF FF C0' + 'C0 FF FF C0 C0 FF FF C0 C0 FF FF C0 C0 FF FF C0' + 'C0 FF FF C0 C0 FF FF C0 C0 FF FF C0 C0 FF 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 FF 3C 3C 3C FF 3C 3C 3C FF 3C 3C 3C FF 3C 3C' + '3C FF 3C 3C 3C FF 00 00 00 FF 7F 60 60 FF 7F 60' + '60 FF 7F 60 60 FF 7F 60 60 FF 7F 60 60 FF 7F 60' + '60 FF 7F 60 60 FF 7F 60 60 FF 7F 60 60 FF 7F 60' + '60 FF 7F 60 60 FF 7F 60 60 FF 7F 60 60 FF 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 FF 8C 8C 8C FF 8C 8C 8C FF 8C 8C 8C FF 8C 8C' + '8C FF 8C 8C 8C FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 FF 16 16 14 FF 36 36 30 FF 36 36 30 FF 22 22' + '1F FF 04 04 04 FF 00 00 00 FF C0 00 00 FF C0 00' + '00 FF C0 00 00 FF C0 00 00 FF C0 00 00 FF C0 00' + '00 FF C0 00 00 FF C0 00 00 FF C0 00 00 FF C0 00' + '00 FF C0 00 00 FF C0 00 00 FF C0 00 00 FF 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 FF 28 28 24 FF 00 00 00 B4 00 00 00 9C 8C 8C' + '8C FF 0C 0C 0C FF 00 00 00 FF D5 40 40 FF D5 40' + '40 FF D5 40 40 FF D5 40 40 FF D5 40 40 FF D5 40' + '40 FF D5 40 40 FF D5 40 40 FF D5 40 40 FF D5 40' + '40 FF D5 40 40 FF D5 40 40 FF D5 40 40 FF 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 FF 2A 2A 25 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 0C 0C 0C FF 00 00 00 FF EA 80 80 FF EA 80' + '80 FF EA 80 80 FF EA 80 80 FF EA 80 80 FF EA 80' + '80 FF EA 80 80 FF EA 80 80 FF EA 80 80 FF EA 80' + '80 FF EA 80 80 FF EA 80 80 FF EA 80 80 FF 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 16 00 00 00 34 00 00 00 37 00 00 00 37 00 00' + '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' + '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' + '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' + '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' + '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' + '00 FF 12 12 10 FF 2B 2B 26 FF 30 30 2C FF 22 22' + '1F FF 10 10 10 FF 00 00 00 FF FF C0 C0 FF FF C0' + 'C0 FF FF C0 C0 FF FF C0 C0 FF FF C0 C0 FF FF C0' + 'C0 FF FF C0 C0 FF FF C0 C0 FF FF C0 C0 FF FF C0' + 'C0 FF FF C0 C0 FF FF C0 C0 FF FF C0 C0 FF 00 00' + '00 00 00 00 00 00 00 00 00 05 00 00 00 69 00 00' + '00 C5 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' + '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' + '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' + '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' + '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' + '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' + '00 FF 04 04 04 FF 0C 0C 0C FF 0C 0C 0C FF 10 10' + '10 FF 18 18 18 FF 00 00 00 FF ED ED ED FF E7 E7' + 'E7 FF E7 E7 E7 FF E7 E7 E7 FF E7 E7 E7 FF E7 E7' + 'E7 FF E7 E7 E7 FF E7 E7 E7 FF E7 E7 E7 FF E7 E7' + 'E7 FF E7 E7 E7 FF E7 E7 E7 FF E7 E7 E7 FF 00 00' + '00 00 00 00 00 05 00 00 00 9B 00 00 00 FF 00 00' + '00 FF 21 21 21 FF 2C 2C 2C FF 2B 2B 2B FF 2C 2C' + '2C FF 2B 2B 2B FF 2B 2B 2B FF 2B 2B 2B FF 2B 2B' + '2B FF 2B 2B 2B FF 2B 2B 2B FF 2B 2B 2B FF 2B 2B' + '2B FF 2B 2B 2B FF 2B 2B 2B FF 2B 2B 2B FF 2A 2A' + '2A FF 2A 2A 2A FF 2A 2A 2A FF 2A 2A 2A FF 2A 2A' + '2A FF 2A 2A 2A FF 2A 2A 2A FF 2A 2A 2A FF 00 00' + '00 FF 0C 0C 0C FF 0C 0C 0C FF 10 10 10 FF 18 18' + '18 FF 17 17 17 FF 00 00 00 FF EC EC EC FF E7 E7' + 'E7 FF 99 99 99 FF 99 99 99 FF 99 99 99 FF 99 99' + '99 FF 99 99 99 FF 99 99 99 FF 99 99 99 FF 99 99' + '99 FF 99 99 99 FF 99 99 99 FF 99 99 99 FF 00 00' + '00 00 00 00 00 54 00 00 00 FF 26 26 26 FF 90 90' + '90 FF B8 B4 B6 FF AD AD AD FF AB AC AC FF AD A8' + 'AB FF CD CD CD FF CC CC CC FF CB CB CB FF C9 C9' + 'C9 FF C4 C4 C4 FF C3 C3 C3 FF C2 C2 C2 FF C2 C2' + 'C2 FF C3 C3 C3 FF C0 C0 C0 FF C1 C1 C1 FF BF BF' + 'BF FF BF BF BF FF BC BC BC FF BD BD BD FF BA BA' + 'BA FF BD BD BD FF BD BD BD FF BD BD BD FF 00 00' + '00 FF 0C 0C 0C FF 10 10 10 FF 18 18 18 FF 18 18' + '18 FF 1E 1E 1E FF 00 00 00 FF EB EB EB FF DB DB' + 'DB FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E1 E1' + 'E1 FF E1 E1 E1 FF E1 E1 E1 FF E2 E2 E2 FF E3 E3' + 'E3 FF E3 E3 E3 FF E3 E3 E3 FF E4 E4 E4 FF 00 00' + '00 03 00 00 00 AD 01 01 01 FF 8A 8A 8A FF AD A8' + 'AB FF EB EB EB FF E8 E8 E8 FF E8 E8 E8 FF E8 E8' + 'E8 FF D4 D4 D4 FF 00 C0 00 FF 00 C0 00 FF E7 E7' + 'E7 FF E8 E8 E8 FF E8 E8 E8 FF E3 E3 E3 FF DD DD' + 'DD FF D8 D8 D8 FF D2 D2 D2 FF CD CD CD FF CD CD' + 'CD FF CD CD CD FF CD CD CD FF CD CD CD FF C8 C9' + 'C9 FF CD CD CD FF AA AA AA FF 2E 2E 2E FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 18 18 18 FF 1F 1F' + '1F FF 18 18 18 FF 00 00 00 FF EA EA EA FF E6 E6' + 'E6 FF E7 E7 E7 FF E8 E8 E8 FF E8 E8 E8 FF E9 E9' + 'E9 FF EA EA EA FF EA EA EA FF EA EA EA FF EB EB' + 'EB FF EB EB EB FF EB EB EB FF EC EC EC FF 00 00' + '00 15 00 00 00 F0 19 19 19 FF AD A8 AB FF EB EB' + 'EB FF EB EB EB FF E8 E8 E8 FF E8 E8 E8 FF E8 E8' + 'E8 FF 00 FF 00 FF 00 FF 00 FF 00 FF 00 FF 00 C0' + '00 FF E1 E1 E1 FF DF DF DF FF D5 D5 D5 FF CC CC' + 'CC FF D2 D2 D2 FF CB CB CB FF CD CD CD FF CD CD' + 'CD FF CD CD CD FF CD CD CD FF CD CD CD FF CD CD' + 'CD FF CD CD CD FF 40 40 40 FF 2E 2E 2E FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 1F 1F 1F FF 15 15' + '15 FF 13 13 13 FF 00 00 00 FF E9 E9 E9 FF E7 E7' + 'E7 FF 99 99 99 FF 99 99 99 FF 99 99 99 FF 99 99' + '99 FF 99 99 99 FF 99 99 99 FF 99 99 99 FF 99 99' + '99 FF 99 99 99 FF 99 99 99 FF 99 99 99 FF 00 00' + '00 30 00 00 00 FA 29 29 29 FF AD A8 AB FF EA EA' + 'EA FF EB EB EB FF EB EB EB FF E8 E8 E8 FF E8 E8' + 'E8 FF 00 FF 00 FF 00 FF 00 FF 00 FF 00 FF 00 FF' + '00 FF CB CB CB FF C8 C8 C8 FF 66 66 66 FF 66 66' + '66 FF 66 66 66 FF 66 66 66 FF 66 66 66 FF 66 66' + '66 FF 66 66 66 FF 66 66 66 FF 66 66 66 FF 66 66' + '66 FF CD CD CD FF 93 93 93 FF 40 40 40 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 0E 0E' + '0E FF 10 10 10 FF 00 00 00 FF E7 E7 E7 FF E7 E7' + 'E7 FF E7 E7 E7 FF E7 E7 E7 FF E7 E7 E7 FF E7 E7' + 'E7 FF E7 E7 E7 FF E7 E7 E7 FF E7 E7 E7 FF E7 E7' + 'E7 FF E7 E7 E7 FF E7 E7 E7 FF E7 E7 E7 FF 00 00' + '00 34 00 00 00 F9 28 28 28 FF D1 D1 D1 FF EC EC' + 'EC FF EB EB EB FF EB EB EB FF E8 E8 E8 FF E8 E8' + 'E8 FF E8 E8 E8 FF 00 FF 00 FF 00 FF 00 FF B5 B5' + 'B5 FF B5 B5 B5 FF B6 B6 B6 FF 3B 3B 3B FF 3B 3B' + '3B FF 3B 3B 3B FF 3B 3B 3B FF 3B 3B 3B FF 3B 3B' + '3B FF 3B 3B 3B FF 3B 3B 3B FF 3B 3B 3B FF 3B 3B' + '3B FF B6 B6 B6 FF B6 B6 B6 FF B6 B6 B6 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 0A 0A' + '0A FF 0D 0D 0D FF 00 00 00 FF E8 E8 E8 FF E7 E7' + 'E7 FF E3 E3 E3 FF E3 E3 E3 FF E3 E3 E3 FF E3 E3' + 'E3 FF E4 E4 E4 FF E4 E4 E4 FF E5 E5 E5 FF E6 E6' + 'E6 FF E6 E6 E6 FF E6 E6 E6 FF E7 E7 E7 FF 00 00' + '00 33 00 00 00 F9 28 28 28 FF D1 D1 D1 FF EE EE' + 'EE FF E8 E8 E8 FF EB EB EB FF E8 E8 E8 FF E8 E8' + 'E8 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 24 24 24 FF 1F 1F 1F FF 05 05 05 FF 07 07' + '07 FF 0A 0A 0A FF 00 00 00 FF E5 E5 E5 FF E7 E7' + 'E7 FF 99 99 99 FF 99 99 99 FF 99 99 99 FF 99 99' + '99 FF 99 99 99 FF 99 99 99 FF 99 99 99 FF 99 99' + '99 FF 99 99 99 FF 99 99 99 FF 99 99 99 FF 00 00' + '00 33 00 00 00 F9 27 27 27 FF D1 D1 D1 FF EF EF' + 'EF FF EB EB EB FF EB EB EB FF EB EB EB FF EB EB' + 'EB FF 80 80 80 FF 3B 3B 3B FF 3B 3B 3B FF 3B 3B' + '3B FF 3B 3B 3B FF 3B 3B 3B FF 3B 3B 3B FF 3B 3B' + '3B FF 3B 3B 3B FF 3B 3B 3B FF 3B 3B 3B FF 3B 3B' + '3B FF 3B 3B 3B FF 3B 3B 3B FF 3B 3B 3B FF 3B 3B' + '3B FF 3B 3B 3B FF 3B 3B 3B FF 3B 3B 3B FF 00 00' + '00 FF 2B 2B 2B FF 11 11 11 FF 02 02 02 FF 03 03' + '03 FF 03 03 03 FF 00 00 00 FF DC DC DC FF E7 E7' + 'E7 FF E7 E7 E7 FF E7 E7 E7 FF E7 E7 E7 FF E7 E7' + 'E7 FF E7 E7 E7 FF E7 E7 E7 FF E7 E7 E7 FF E7 E7' + 'E7 FF E7 E7 E7 FF E7 E7 E7 FF E7 E7 E7 FF 00 00' + '00 33 00 00 00 F9 27 27 27 FF D2 D2 D2 FF F2 F2' + 'F2 FF EA EA EA FF EB EB EB FF EB EB EB FF EB EB' + 'EB FF A7 A7 A7 FF A7 A7 A7 FF AB AB AB FF AE AE' + 'AE FF B0 B0 B0 FF AF AF AF FF AF AF AF FF AF AF' + 'AF FF AF AF AF FF AF AF AF FF AF AF AF FF AB AB' + 'AB FF AB AB AB FF AB AB AB FF AB AB AB FF AB AB' + 'AB FF AB AB AB FF AB AB AB FF AB AB AB FF 00 00' + '00 FF 32 32 32 FF 0C 0C 0C FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF E5 E5 E5 FF E5 E5' + 'E5 FF E6 E6 E6 FF E7 E7 E7 FF E7 E7 E7 FF E8 E8' + 'E8 FF E9 E9 E9 FF E9 E9 E9 FF E9 E9 E9 FF EA EA' + 'EA FF EA EA EA FF EA EA EA FF EB EB EB FF 00 00' + '00 33 00 00 00 F9 26 26 26 FF D3 D3 D3 FF F3 F3' + 'F3 FF EB EB EB FF ED ED ED FF EB EB EB FF E9 E9' + 'E9 FF E8 E8 E8 FF E6 E6 E6 FF E4 E4 E4 FF E2 E2' + 'E2 FF DB DB DB FF DC DC DC FF D8 D8 D8 FF D9 D9' + 'D9 FF D2 D2 D2 FF D2 D2 D2 FF CF CF CF FF D0 D0' + 'D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0' + 'D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0 D0 FF 00 00' + '00 FF 37 37 37 FF 02 02 02 FF 03 03 03 FF 04 04' + '04 FF 04 04 04 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 33 00 00 00 F9 26 26 26 FF D3 D3 D3 FF F7 F7' + 'F7 FF F8 F8 F8 FF F6 F6 F6 FF F6 F6 F6 FF F6 F6' + 'F6 FF F5 F5 F5 FF F5 F5 F5 FF F4 F4 F4 FF F4 F4' + 'F4 FF F3 F3 F3 FF F3 F3 F3 FF F3 F3 F3 FF F2 F2' + 'F2 FF F2 F2 F2 FF F1 F1 F1 FF F1 F1 F1 FF F1 F1' + 'F1 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0 F0 FF EF EF' + 'EF FF EF EF EF FF EE EE EE FF EE EE EE FF 00 00' + '00 FF 37 37 37 FF 07 07 07 FF 09 09 09 FF 0B 0B' + '0B FF 0D 0D 0D FF 10 10 10 FF 13 13 13 FF 19 19' + '19 FF 1E 1E 1E FF 27 27 27 FF 34 34 34 FF 42 42' + '42 FF 46 46 46 FF 46 46 46 FF 46 46 46 FF 46 46' + '46 FF 2C 2C 2C FF 2C 2C 2C FF 2C 2C 2C FF 00 00' + '00 33 00 00 00 F9 24 24 24 FF D6 D6 D6 FF FF FF' + 'FF FF E9 E9 E9 FF E1 E1 E1 FF E2 E2 E2 FF E2 E2' + 'E2 FF E0 E0 E0 FF DF DF DF FF DF DF DF FF DF DF' + 'DF FF DF DF DF FF DF DF DF FF E0 E0 E0 FF E0 E0' + 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' + 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' + 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF 00 00' + '00 FF 3F 3F 3F FF 0D 0D 0D FF 11 11 11 FF 12 12' + '12 FF 16 16 16 FF 1B 1B 1B FF 21 21 21 FF 26 26' + '26 FF 30 30 30 FF 3C 3C 3C FF 44 44 44 FF 47 47' + '47 FF 46 46 46 FF 46 46 46 FF 46 46 46 FF 2C 2C' + '2C FF 2C 2C 2C FF 2C 2C 2C FF 2C 2C 2C FF 00 00' + '00 34 00 00 00 FA 24 24 24 FF DE DE DE FF F8 F8' + 'F8 FF D9 D9 D9 FF C4 C4 C4 FF BB BB BB FF BF BF' + 'BF FF D8 D8 D8 FF DA DA DA FF D9 D9 D9 FF D9 D9' + 'D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9' + 'D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9' + 'D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9' + 'D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9 D9 FF 00 00' + '00 FF 44 44 44 FF 23 23 23 FF 17 17 17 FF 1B 1B' + '1B FF 20 20 20 FF 27 27 27 FF 2B 2B 2B FF 35 35' + '35 FF 40 40 40 FF 44 44 44 FF 47 47 47 FF 4A 4A' + '4A FF 46 46 46 FF 46 46 46 FF 2C 2C 2C FF 2C 2C' + '2C FF 2C 2C 2C FF 2C 2C 2C FF 2C 2C 2C FF 00 00' + '00 25 00 00 00 F7 1F 1F 1F FF DA DA DA FF F3 F3' + 'F3 FF C6 C6 C6 FF A9 A9 A9 FF B7 B7 B7 FF B0 B0' + 'B0 FF C3 C3 C3 FF DA DA DA FF D8 D8 D8 FF D8 D8' + 'D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8 D8 FF D7 D7' + 'D7 FF D7 D7 D7 FF D7 D7 D7 FF D7 D7 D7 FF D7 D7' + 'D7 FF D7 D7 D7 FF D7 D7 D7 FF D7 D7 D7 FF D8 D8' + 'D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8 D8 FF 00 00' + '00 FF 4B 4B 4B FF 2E 2E 2E FF 1F 1F 1F FF 25 25' + '25 FF 2B 2B 2B FF 2F 2F 2F FF 39 39 39 FF 43 43' + '43 FF 44 44 44 FF 47 47 47 FF 4B 4B 4B FF 49 49' + '49 FF 42 42 42 FF 36 36 36 FF 2C 2C 2C FF 23 23' + '23 FF 1C 1C 1C FF 1C 1C 1C FF 14 14 14 FF 00 00' + '00 07 00 00 00 D0 05 05 05 FF C2 C2 C2 FF F6 F6' + 'F6 FF BC BC BC FF B2 B2 B2 FF C3 C3 C3 FF AB AB' + 'AB FF BB BB BB FF D8 D8 D8 FF D5 D5 D5 FF D5 D5' + 'D5 FF D5 D5 D5 FF D4 D4 D4 FF D3 D3 D3 FF D3 D3' + 'D3 FF D5 D5 D5 FF D7 D7 D7 FF D8 D8 D8 FF D8 D8' + 'D8 FF D7 D7 D7 FF D5 D5 D5 FF D3 D3 D3 FF D3 D3' + 'D3 FF D3 D3 D3 FF D4 D4 D4 FF D5 D5 D5 FF 00 00' + '00 FF 4B 4B 4B FF 4C 4C 4C FF 27 27 27 FF 2E 2E' + '2E FF 33 33 33 FF 3C 3C 3C FF 45 45 45 FF 44 44' + '44 FF 47 47 47 FF 4B 4B 4B FF 4B 4B 4B FF 45 45' + '45 FF 3C 3C 3C FF 32 32 32 FF 2A 2A 2A FF 25 25' + '25 FF 1C 1C 1C FF 1C 1C 1C FF 16 16 16 FF 00 00' + '00 00 00 00 00 9C 00 00 00 FF A4 A4 A4 FF F4 F4' + 'F4 FF CF CF CF FF C5 C5 C5 FF D2 D2 D2 FF BF BF' + 'BF FF C9 C9 C9 FF D3 D3 D3 FF D2 D2 D2 FF D0 D0' + 'D0 FF D3 D3 D3 FF D0 D0 D0 FF D0 D0 D0 FF D5 D5' + 'D5 FF D5 D5 D5 FF D5 D5 D5 FF D5 D5 D5 FF D5 D5' + 'D5 FF D5 D5 D5 FF D5 D5 D5 FF D5 D5 D5 FF D0 D0' + 'D0 FF D0 D0 D0 FF D4 D4 D4 FF D0 D0 D0 FF 00 00' + '00 FF 52 52 52 FF 57 57 57 FF 3C 3C 3C FF 35 35' + '35 FF 3F 3F 3F FF 00 00 00 FF 8C 8C 8C FF 8C 8C' + '8C FF 8C 8C 8C FF 8C 8C 8C FF 8C 8C 8C FF 8C 8C' + '8C FF 8C 8C 8C FF 8C 8C 8C FF 8C 8C 8C FF 8C 8C' + '8C FF 8C 8C 8C FF 8C 8C 8C FF 8C 8C 8C FF 00 00' + '00 00 00 00 00 73 00 00 00 FF 7E 7E 7E FF EF EF' + 'EF FF D1 D1 D1 FF CF CF CF FF CB CB CB FF CF CF' + 'CF FF D1 D1 D1 FF CE CE CE FF CF CF CF FF D5 D5' + 'D5 FF D5 D5 D5 FF D5 D5 D5 FF D5 D5 D5 FF D5 D5' + 'D5 FF D5 D5 D5 FF D5 D5 D5 FF D5 D5 D5 FF D5 D5' + 'D5 FF D5 D5 D5 FF D5 D5 D5 FF D5 D5 D5 FF D5 D5' + 'D5 FF D5 D5 D5 FF D5 D5 D5 FF E1 E1 E1 FF 00 00' + '00 FF 57 57 57 FF 5E 5E 5E FF 5D 5D 5D FF 49 49' + '49 FF 45 45 45 FF 00 00 00 FF 84 84 84 FF FD F9' + 'F7 FF F9 EE E8 FF F6 E4 D9 FF F3 D9 CB FF F0 CF' + 'BC FF ED C5 AE FF EA BB A0 FF E9 B6 99 FF E9 B6' + '99 FF E9 B6 99 FF E9 B6 99 FF E9 B6 99 FF 00 00' + '00 00 00 00 00 59 00 00 00 FF 59 59 59 FF E9 E9' + 'E9 FF D0 D0 D0 FF CD CD CD FF CD CD CD FF CD CD' + 'CD FF CA CA CA FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' + 'D3 FF D3 D3 D3 FF D4 D4 D4 FF D5 D5 D5 FF D6 D6' + 'D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6' + 'D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6 D6 FF D5 D5' + 'D5 FF D5 D5 D5 FF DB DB DB FF E4 E4 E4 FF 00 00' + '00 FF 5E 5E 5E FF 5E 5E 5E FF 65 65 65 FF 6A 6A' + '6A FF 44 44 44 FF 00 00 00 FF 8E 8E 8E FF FF FF' + 'FF FF D0 CB C8 FF 8B 86 84 FF 87 80 7D FF 83 7A' + '75 FF D0 B3 A3 FF EC C0 A7 FF E9 B6 99 FF E9 B6' + '99 FF E9 B6 99 FF E9 B6 99 FF E9 B6 99 FF 00 00' + '00 00 00 00 00 3E 00 00 00 FE 40 40 40 FF D7 D7' + 'D7 FF D2 D2 D2 FF CA CA CA FF CB CB CB FF CA CA' + 'CA FF D4 D4 D4 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' + 'D3 FF D1 D1 D1 FF D2 D2 D2 FF D2 D2 D2 FF D2 D2' + 'D2 FF D2 D2 D2 FF D2 D2 D2 FF D2 D2 D2 FF D3 D3' + 'D3 FF D2 D2 D2 FF D3 D3 D3 FF D3 D3 D3 FF D2 D2' + 'D2 FF D2 D2 D2 FF D1 D1 D1 FF D0 D0 D0 FF 00 00' + '00 FF 5E 5E 5E FF 5E 5E 5E FF 65 65 65 FF 6A 6A' + '6A FF 44 44 44 FF 00 00 00 FF 8E 8E 8E FF FF FF' + 'FF FF D0 CB C8 FF 8B 86 84 FF 87 80 7D FF 83 7A' + '75 FF D0 B3 A3 FF EC C0 A7 FF E9 B6 99 FF E9 B6' + '99 FF E9 B6 99 FF E9 B6 99 FF E9 B6 99 FF 00 00' + '00 00 00 00 00 25 00 00 00 F8 22 22 22 FF B7 B7' + 'B7 FF DB DB DB FF CA CA CA FF CB CB CB FF CE CE' + 'CE FF D3 D3 D3 FF D3 D3 D3 FF CF CF CF FF D1 D1' + 'D1 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0' + 'D0 FF CF CF CF FF D3 D3 D3 FF D3 D3 D3 FF CE CE' + 'CE FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' + 'D3 FF D3 D3 D3 FF D3 D3 D3 FF CE CE CE FF 00 00' + '00 FF 5E 5E 5E FF 65 65 65 FF 6A 6A 6A FF 6A 6A' + '6A FF 71 71 71 FF 00 00 00 FF 97 97 97 FF FF FF' + 'FF FF B8 B6 B6 FF 54 54 54 FF 4F 4F 4F FF 5B 58' + '57 FF F0 D0 BE FF ED C6 AF FF EA BC A1 FF E9 B6' + '99 FF E9 B6 99 FF E9 B6 99 FF E9 B6 99 FF 00 00' + '00 00 00 00 00 0C 00 00 00 E1 07 07 07 FF 9F 9F' + '9F FF DD DD DD FF CC CC CC FF CD CD CD FF D3 D3' + 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D0 D0 D0 FF D0 D0' + 'D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0' + 'D0 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' + 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' + 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF 00 00' + '00 FF 65 65 65 FF 6A 6A 6A FF 6A 6A 6A FF 71 71' + '71 FF 79 79 79 FF 00 00 00 FF 9E 9E 9E FF FF FF' + 'FF FF AF AF AF FF 52 52 52 FF 4E 4E 4E FF 6D 6A' + '67 FF F2 D6 C7 FF EF CC B8 FF EC C2 AA FF E9 B8' + '9C FF E9 B6 99 FF E9 B6 99 FF E9 B6 99 FF 00 00' + '00 00 00 00 00 00 00 00 00 B2 00 00 00 FF 83 83' + '83 FF DD DD DD FF CF CF CF FF D1 D1 D1 FF D3 D3' + 'D3 FF D3 D3 D3 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0' + 'D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0' + 'D0 FF D0 D0 D0 FF CF CF CF FF D3 D3 D3 FF D3 D3' + 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' + 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF 00 00' + '00 FF 65 65 65 FF 6A 6A 6A FF 71 71 71 FF 7E 7E' + '7E FF 79 79 79 FF 00 00 00 FF AA AA AA FF FF FF' + 'FF FF A6 A6 A6 FF 50 50 50 FF 4C 4C 4C FF 7B 77' + '75 FF F4 DD D0 FF F1 D2 C2 FF EE C8 B3 FF EB BE' + 'A5 FF E9 B6 99 FF E9 B6 99 FF E9 B6 99 FF 00 00' + '00 00 00 00 00 00 00 00 00 80 00 00 00 FF 5F 5F' + '5F FF DC DC DC FF D1 D1 D1 FF D2 D2 D2 FF D3 D3' + 'D3 FF D3 D3 D3 FF D1 D1 D1 FF D1 D1 D1 FF D1 D1' + 'D1 FF D1 D1 D1 FF D1 D1 D1 FF D1 D1 D1 FF D1 D1' + 'D1 FF D1 D1 D1 FF D1 D1 D1 FF D3 D3 D3 FF D3 D3' + 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' + 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF 00 00' + '00 FF 65 65 65 FF 71 71 71 FF 79 79 79 FF 7E 7E' + '7E FF 7E 7E 7E FF 00 00 00 FF B1 B1 B1 FF FF FF' + 'FF FF E0 E0 E0 FF DF DF DF FF DC D9 D7 FF D9 D1' + 'CC FF F6 E4 D9 FF F3 D9 CB FF F0 CF BC FF ED C5' + 'AE FF EA BB A0 FF EA BB A0 FF E9 B6 99 FF 00 00' + '00 00 00 00 00 00 00 00 00 4B 00 00 00 FE 41 41' + '41 FF D8 D8 D8 FF D4 D4 D4 FF D2 D2 D2 FF D3 D3' + 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' + 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' + 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' + 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' + 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF A3 A3 9E FF DA DA' + 'D8 FF DA DA D8 FF DA DA D8 FF DA DA D8 FF D7 D2' + 'CE FF D5 CB C4 FF D2 C3 B9 FF D0 BC B0 FF CE B6' + 'A6 FF CC AF 9D FF CC AF 9D FF CA A8 94 FF 00 00' + '00 00 00 00 00 00 00 00 00 1A 00 00 00 F2 2C 2C' + '2C FF CC CC CC FF D6 D6 D6 FF D5 D5 D5 FF D3 D3' + 'D3 FF D3 D3 D3 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6' + 'D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6' + 'D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6' + 'D6 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' + 'D3 FF D3 D3 D3 FF CC CC CC FF C9 C9 C9 FF C6 C6' + 'C6 FF C4 C4 C4 FF C2 C2 C2 FF B3 B3 B3 FF BD BD' + 'BD FF D0 D0 D0 FF 99 99 99 FF 09 09 09 FF 00 00' + '00 CF 00 00 00 19 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 09 00 00 00 D8 18 18' + '18 FF B0 B0 B0 FF DB DB DB FF DB DB DB FF DE DE' + 'DE FF DE DE DE FF DE DE DE FF D9 D9 D9 FF DA DA' + 'DA FF DA DA DA FF DA DA DA FF DA DA DA FF DA DA' + 'DA FF DA DA DA FF DA DA DA FF DA DA DA FF DA DA' + 'DA FF DA DA DA FF DD DD DD FF DD DD DD FF DD DD' + 'DD FF DD DD DD FF DD DD DD FF DA DA DA FF DD DD' + 'DD FF DD DD DD FF E7 E7 E7 FF D9 D9 D9 FF CC CC' + 'CC FF CA CA CA FF 7A 7A 7A FF 02 02 02 FF 00 00' + '00 B8 00 00 00 0A 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 02 00 00 00 BF 08 08' + '08 FF 97 97 97 FF DC DC DC FF DF DF DF FF DC DC' + 'DC FF DE DE DE FF DE DE DE FF DE DE DE FF DD DD' + 'DD FF DD DD DD FF DD DD DD FF DD DD DD FF DD DD' + 'DD FF DD DD DD FF DD DD DD FF DD DD DD FF DD DD' + 'DD FF DD DD DD FF DD DD DD FF DD DD DD FF DD DD' + 'DD FF DD DD DD FF DD DD DD FF DD DD DD FF E7 E7' + 'E7 FF E7 E7 E7 FF E7 E7 E7 FF DD DD DD FF DC DC' + 'DC FF C6 C6 C6 FF 53 53 53 FF 00 00 00 FF 00 00' + '00 A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 A4 00 00' + '00 FF 77 77 77 FF D3 D3 D3 FF E2 E2 E2 FF E1 E1' + 'E1 FF DE DE DE FF DE DE DE FF DE DE DE FF DE DE' + 'DE FF DE DE DE FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' + 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' + 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' + 'E0 FF E0 E0 E0 FF E1 E1 E1 FF E1 E1 E1 FF E7 E7' + 'E7 FF E7 E7 E7 FF E7 E7 E7 FF E3 E3 E3 FF D9 D9' + 'D9 FF BB BB BB FF 39 39 39 FF 00 00 00 FF 00 00' + '00 7E 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 89 00 00' + '00 FF 4B 4B 4B FF C9 C9 C9 FF E5 E5 E5 FF E3 E3' + 'E3 FF E4 E4 E4 FF EB EB EB FF EB EB EB FF EB EB' + 'EB FF EB EB EB FF EB EB EB FF EB EB EB FF E4 E4' + 'E4 FF E4 E4 E4 FF E4 E4 E4 FF E4 E4 E4 FF E4 E4' + 'E4 FF E4 E4 E4 FF E4 E4 E4 FF E4 E4 E4 FF E5 E5' + 'E5 FF E5 E5 E5 FF E7 E7 E7 FF E7 E7 E7 FF E7 E7' + 'E7 FF E7 E7 E7 FF E4 E4 E4 FF E6 E6 E6 FF D6 D6' + 'D6 FF A8 A8 A8 FF 20 20 20 FF 00 00 00 FD 00 00' + '00 4E 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 62 00 00' + '00 FF 35 35 35 FF BD BD BD FF E6 E6 E6 FF E6 E6' + 'E6 FF E6 E6 E6 FF E7 E7 E7 FF E7 E7 E7 FF EB EB' + 'EB FF EB EB EB FF EB EB EB FF EB EB EB FF EB EB' + 'EB FF EB EB EB FF EB EB EB FF EB EB EB FF EB EB' + 'EB FF EB EB EB FF EB EB EB FF EB EB EB FF EB EB' + 'EB FF E7 E7 E7 FF E7 E7 E7 FF E7 E7 E7 FF E7 E7' + 'E7 FF E7 E7 E7 FF E6 E6 E6 FF E8 E8 E8 FF D4 D4' + 'D4 FF 9A 9A 9A FF 0B 0B 0B FF 00 00 00 ED 00 00' + '00 2C 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 2D 00 00' + '00 F9 1E 1E 1E FF AB AB AB FF E4 E4 E4 FF ED ED' + 'ED FF E7 E7 E7 FF E6 E6 E6 FF EC EC EC FF EB EB' + 'EB FF EA EA EA FF ED ED ED FF EB EB EB FF EB EB' + 'EB FF EB EB EB FF EB EB EB FF EB EB EB FF EB EB' + 'EB FF EB EB EB FF EB EB EB FF EB EB EB FF EB EB' + 'EB FF EB EB EB FF EB EB EB FF EC EC EC FF EA EA' + 'EA FF E5 E5 E5 FF EB EB EB FF EB EB EB FF D6 D6' + 'D6 FF 8A 8A 8A FF 00 00 00 FF 00 00 00 C3 00 00' + '00 17 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 09 00 00' + '00 DD 08 08 08 FF 99 99 99 FF E4 E4 E4 FF DF DF' + 'DF FF BD BD BD FF C1 C1 C1 FF D6 D6 D6 FF EC EC' + 'EC FF ED ED ED FF ED ED ED FF EE EE EE FF EE EE' + 'EE FF ED ED ED FF EC EC EC FF EB EB EB FF EB EB' + 'EB FF EC EC EC FF ED ED ED FF EE EE EE FF EE EE' + 'EE FF ED ED ED FF EE EE EE FF E4 E4 E4 FF C2 C2' + 'C2 FF BE BE BE FF D1 D1 D1 FF EC EC EC FF D4 D4' + 'D4 FF 75 75 75 FF 00 00 00 FF 00 00 00 9C 00 00' + '00 06 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 AE 00 00 00 FF 8D 8D 8D FF E0 E0 E0 FF C4 C4' + 'C4 FF B2 B2 B2 FF B8 B8 B8 FF B2 B2 B2 FF EB EB' + 'EB FF F1 F1 F1 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0' + 'F0 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0' + 'F0 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0' + 'F0 FF F0 F0 F0 FF F3 F3 F3 FF D5 D5 D5 FF B0 B0' + 'B0 FF B6 B6 B6 FF B7 B7 B7 FF EB EB EB FF CD CD' + 'CD FF 61 61 61 FF 00 00 00 FF 00 00 00 85 00 00' + '00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 80 00 00 00 FF 64 64 64 FF CE CE CE FF DD DD' + 'DD FF DC DC DC FF D5 D5 D5 FF E4 E4 E4 FF F9 F9' + 'F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9' + 'F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9' + 'F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9' + 'F9 FF F9 F9 F9 FF FA FA FA FF F2 F2 F2 FF DF DF' + 'DF FF D8 D8 D8 FF DC DC DC FF D7 D7 D7 FF B0 B0' + 'B0 FF 34 34 34 FF 00 00 00 FF 00 00 00 67 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 44 00 00 00 FF 19 19 19 FF 80 80 80 FF BE BE' + 'BE FF D3 D3 D3 FF D7 D7 D7 FF DB DB DB FF D8 D8' + 'D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8' + 'D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8' + 'D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8' + 'D8 FF D8 D8 D8 FF D8 D8 D8 FF D9 D9 D9 FF D9 D9' + 'D9 FF D7 D7 D7 FF CD CD CD FF B0 B0 B0 FF 5D 5D' + '5D FF 06 06 06 FF 00 00 00 ED 00 00 00 2B 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 02 00 00 00 9C 00 00 00 FF 0C 0C 0C FF 3D 3D' + '3D FF 49 49 49 FF 48 48 48 FF 48 48 48 FF 48 48' + '48 FF 48 48 48 FF 48 48 48 FF 48 48 48 FF 48 48' + '48 FF 48 48 48 FF 48 48 48 FF 48 48 48 FF 48 48' + '48 FF 48 48 48 FF 48 48 48 FF 48 48 48 FF 48 48' + '48 FF 48 48 48 FF 48 48 48 FF 48 48 48 FF 48 48' + '48 FF 49 49 49 FF 49 49 49 FF 2F 2F 2F FF 02 02' + '02 FF 00 00 00 FF 00 00 00 5C 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 06 00 00 00 7F 00 00 00 F1 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 D6 00 00 00 5C 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 2C 00 00' + '00 7E 00 00 00 84 00 00 00 84 00 00 00 84 00 00' + '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' + '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' + '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' + '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' + '00 84 00 00 00 84 00 00 00 84 00 00 00 70 00 00' + '00 1A 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF' + 'FF F0 00 00 00 00 FF FF FF F0 00 00 00 00 FF FF' + 'FF F0 00 00 00 00 FF FF FF F0 00 00 00 00 FF FF' + 'FF F0 00 00 00 00 FF FF FF F0 00 00 00 00 FF FF' + 'FF F0 00 00 00 00 F0 00 00 00 00 00 00 00 C0 00' + '00 00 00 00 00 00 80 00 00 00 00 00 00 00 80 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 00' + '00 00 00 00 00 00 80 00 00 00 00 00 00 00 80 00' + '00 00 00 00 00 00 80 00 00 00 00 00 00 00 80 00' + '00 00 00 00 00 00 80 00 00 00 00 00 00 00 C0 00' + '00 00 00 00 00 00 C0 00 00 00 00 00 00 00 C0 00' + '00 00 00 00 00 00 C0 00 00 00 03 FF 00 00 C0 00' + '00 00 03 FF 00 00 C0 00 00 00 07 FF 00 00 E0 00' + '00 00 07 FF 00 00 E0 00 00 00 07 FF 00 00 E0 00' + '00 00 07 FF 00 00 E0 00 00 00 07 FF 00 00 E0 00' + '00 00 07 FF 00 00 F0 00 00 00 07 FF 00 00 F0 00' + '00 00 0F FF 00 00 F0 00 00 00 0F FF 00 00 F0 00' + '00 00 1F FF 00 00 F8 00 00 00 3F FF 00 00 FE 00' + '00 00 7F FF 00 00 FF FF FF FF FF FF 00 00 28 00' + '00 00 20 00 00 00 40 00 00 00 01 00 20 00 00 00' + '00 00 00 10 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 24 00 00 00 6C 00 00 00 90 00 00' + '00 90 00 00 00 90 00 00 00 90 00 00 00 90 00 00' + '00 90 00 00 00 90 00 00 00 90 00 00 00 90 00 00' + '00 90 00 00 00 90 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 3C 3C 3C FF 3C 3C 3C FF 3C 3C 3C FF 3C 3C' + '3C FF 7F 60 60 FF 7F 60 60 FF 7F 60 60 FF 7F 60' + '60 FF 7F 60 60 FF 7F 60 60 FF 7F 60 60 FF 7F 60' + '60 FF 7F 60 60 FF 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 8C 8C 8C FF 8C 8C 8C FF 8C 8C 8C FF 8C 8C' + '8C FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 00 00 00 00 00 00 00' + '00 04 00 00 00 14 00 00 00 26 00 00 00 2D 00 00' + '00 2D 00 00 00 2D 00 00 00 2D 00 00 00 2D 00 00' + '00 2D 00 00 00 2D 00 00 00 2D 00 00 00 2D 00 00' + '00 2D 00 00 00 2D 00 00 00 2D 00 00 00 2D 00 00' + '00 2D 28 28 24 FF 00 00 00 8F 8C 8C 8C FF 0C 0C' + '0C FF D5 40 40 FF D5 40 40 FF D5 40 40 FF D5 40' + '40 FF D5 40 40 FF D5 40 40 FF D5 40 40 FF D5 40' + '40 FF D5 40 40 FF 00 00 00 00 00 00 00 07 00 00' + '00 23 00 00 00 55 00 00 00 7E 00 00 00 8C 00 00' + '00 8C 00 00 00 8C 00 00 00 8C 00 00 00 8C 00 00' + '00 8C 00 00 00 8C 00 00 00 8C 00 00 00 8C 00 00' + '00 8C 00 00 00 8C 00 00 00 8C 00 00 00 8C 00 00' + '00 8C 2A 2A 25 FF 00 00 00 FF 00 00 00 FF 0C 0C' + '0C FF EA 80 80 FF EA 80 80 FF EA 80 80 FF EA 80' + '80 FF EA 80 80 FF EA 80 80 FF EA 80 80 FF EA 80' + '80 FF EA 80 80 FF 00 00 00 00 00 00 00 1F 00 00' + '00 C2 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 04 04 04 FF 0C 0C 0C FF 10 10 10 FF 18 18' + '18 FF ED ED ED FF E7 E7 E7 FF E7 E7 E7 FF E7 E7' + 'E7 FF E7 E7 E7 FF E7 E7 E7 FF E7 E7 E7 FF E7 E7' + 'E7 FF E7 E7 E7 FF 00 00 00 00 00 00 00 C0 00 00' + '00 FF 21 21 21 FF 2C 2C 2C FF 2C 2C 2C FF 2B 2B' + '2B FF 2B 2B 2B FF 2B 2B 2B FF 2B 2B 2B FF 2B 2B' + '2B FF 2B 2B 2B FF 2B 2B 2B FF 2A 2A 2A FF 2A 2A' + '2A FF 2A 2A 2A FF 2A 2A 2A FF 2A 2A 2A FF 2A 2A' + '2A FF 0C 0C 0C FF 0C 0C 0C FF 18 18 18 FF 17 17' + '17 FF EC EC EC FF E7 E7 E7 FF 99 99 99 FF 99 99' + '99 FF 99 99 99 FF 99 99 99 FF 99 99 99 FF 99 99' + '99 FF 99 99 99 FF 00 00 00 06 01 01 01 FF 8A 8A' + '8A FF EB EB EB FF E8 E8 E8 FF E8 E8 E8 FF D4 D4' + 'D4 FF 00 C0 00 FF E7 E7 E7 FF E8 E8 E8 FF E3 E3' + 'E3 FF D8 D8 D8 FF D2 D2 D2 FF CD CD CD FF CD CD' + 'CD FF CD CD CD FF C8 C9 C9 FF AA AA AA FF 2E 2E' + '2E FF 00 00 00 FF 00 00 00 FF 1F 1F 1F FF 18 18' + '18 FF EA EA EA FF E6 E6 E6 FF E8 E8 E8 FF E8 E8' + 'E8 FF EA EA EA FF EA EA EA FF EB EB EB FF EB EB' + 'EB FF EC EC EC FF 00 00 00 1B 19 19 19 FF AD A8' + 'AB FF EB EB EB FF E8 E8 E8 FF E8 E8 E8 FF 00 FF' + '00 FF 00 FF 00 FF 00 C0 00 FF DF DF DF FF D5 D5' + 'D5 FF D2 D2 D2 FF CB CB CB FF CD CD CD FF CD CD' + 'CD FF CD CD CD FF CD CD CD FF 40 40 40 FF 2E 2E' + '2E FF 00 00 00 FF 00 00 00 FF 15 15 15 FF 13 13' + '13 FF E9 E9 E9 FF E7 E7 E7 FF 99 99 99 FF 99 99' + '99 FF 99 99 99 FF 99 99 99 FF 99 99 99 FF 99 99' + '99 FF 99 99 99 FF 00 00 00 3A 28 28 28 FF D1 D1' + 'D1 FF EB EB EB FF EB EB EB FF E8 E8 E8 FF E8 E8' + 'E8 FF 00 FF 00 FF B5 B5 B5 FF B6 B6 B6 FF 3B 3B' + '3B FF 3B 3B 3B FF 3B 3B 3B FF 3B 3B 3B FF 3B 3B' + '3B FF 3B 3B 3B FF 3B 3B 3B FF B6 B6 B6 FF B6 B6' + 'B6 FF 00 00 00 FF 00 00 00 FF 0A 0A 0A FF 0D 0D' + '0D FF E8 E8 E8 FF E7 E7 E7 FF E3 E3 E3 FF E3 E3' + 'E3 FF E4 E4 E4 FF E4 E4 E4 FF E6 E6 E6 FF E6 E6' + 'E6 FF E7 E7 E7 FF 00 00 00 39 28 28 28 FF D1 D1' + 'D1 FF E8 E8 E8 FF EB EB EB FF E8 E8 E8 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 24 24 24 FF 1F 1F 1F FF 07 07 07 FF 0A 0A' + '0A FF E5 E5 E5 FF E7 E7 E7 FF 99 99 99 FF 99 99' + '99 FF 99 99 99 FF 99 99 99 FF 99 99 99 FF 99 99' + '99 FF 99 99 99 FF 00 00 00 39 27 27 27 FF D2 D2' + 'D2 FF EA EA EA FF EB EB EB FF EB EB EB FF A7 A7' + 'A7 FF AB AB AB FF AE AE AE FF AF AF AF FF AF AF' + 'AF FF AF AF AF FF AF AF AF FF AB AB AB FF AB AB' + 'AB FF AB AB AB FF AB AB AB FF AB AB AB FF AB AB' + 'AB FF 32 32 32 FF 0C 0C 0C FF 00 00 00 FF 00 00' + '00 FF E5 E5 E5 FF E5 E5 E5 FF E7 E7 E7 FF E7 E7' + 'E7 FF E9 E9 E9 FF E9 E9 E9 FF EA EA EA FF EA EA' + 'EA FF EB EB EB FF 00 00 00 39 26 26 26 FF D3 D3' + 'D3 FF EB EB EB FF ED ED ED FF E9 E9 E9 FF E8 E8' + 'E8 FF E4 E4 E4 FF E2 E2 E2 FF DC DC DC FF D8 D8' + 'D8 FF D2 D2 D2 FF D2 D2 D2 FF D0 D0 D0 FF D0 D0' + 'D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0' + 'D0 FF 37 37 37 FF 02 02 02 FF 04 04 04 FF 04 04' + '04 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 37 24 24 24 FF D6 D6' + 'D6 FF E9 E9 E9 FF E1 E1 E1 FF E2 E2 E2 FF E0 E0' + 'E0 FF DF DF DF FF DF DF DF FF DF DF DF FF E0 E0' + 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' + 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' + 'E0 FF 3F 3F 3F FF 0D 0D 0D FF 12 12 12 FF 16 16' + '16 FF 21 21 21 FF 26 26 26 FF 3C 3C 3C FF 44 44' + '44 FF 46 46 46 FF 46 46 46 FF 2C 2C 2C FF 2C 2C' + '2C FF 2C 2C 2C FF 00 00 00 34 24 24 24 FF DE DE' + 'DE FF D9 D9 D9 FF C4 C4 C4 FF BF BF BF FF D8 D8' + 'D8 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9' + 'D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9' + 'D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9' + 'D9 FF 44 44 44 FF 23 23 23 FF 1B 1B 1B FF 20 20' + '20 FF 2B 2B 2B FF 35 35 35 FF 44 44 44 FF 47 47' + '47 FF 46 46 46 FF 46 46 46 FF 2C 2C 2C FF 2C 2C' + '2C FF 2C 2C 2C FF 00 00 00 07 05 05 05 FF C2 C2' + 'C2 FF BC BC BC FF B2 B2 B2 FF AB AB AB FF BB BB' + 'BB FF D5 D5 D5 FF D5 D5 D5 FF D4 D4 D4 FF D3 D3' + 'D3 FF D5 D5 D5 FF D7 D7 D7 FF D8 D8 D8 FF D7 D7' + 'D7 FF D3 D3 D3 FF D3 D3 D3 FF D4 D4 D4 FF D5 D5' + 'D5 FF 4B 4B 4B FF 4C 4C 4C FF 2E 2E 2E FF 33 33' + '33 FF 45 45 45 FF 44 44 44 FF 4B 4B 4B FF 4B 4B' + '4B FF 3C 3C 3C FF 32 32 32 FF 25 25 25 FF 1C 1C' + '1C FF 16 16 16 FF 00 00 00 00 00 00 00 FF A4 A4' + 'A4 FF CF CF CF FF C5 C5 C5 FF BF BF BF FF C9 C9' + 'C9 FF D2 D2 D2 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0' + 'D0 FF D5 D5 D5 FF D5 D5 D5 FF D5 D5 D5 FF D5 D5' + 'D5 FF D5 D5 D5 FF D0 D0 D0 FF D4 D4 D4 FF D0 D0' + 'D0 FF 52 52 52 FF 57 57 57 FF 35 35 35 FF 3F 3F' + '3F FF 8C 8C 8C FF 8C 8C 8C FF 8C 8C 8C FF 8C 8C' + '8C FF 8C 8C 8C FF 8C 8C 8C FF 8C 8C 8C FF 8C 8C' + '8C FF 8C 8C 8C FF 00 00 00 00 00 00 00 FF 59 59' + '59 FF D0 D0 D0 FF CD CD CD FF CD CD CD FF CA CA' + 'CA FF D3 D3 D3 FF D3 D3 D3 FF D4 D4 D4 FF D5 D5' + 'D5 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6' + 'D6 FF D6 D6 D6 FF D5 D5 D5 FF DB DB DB FF E4 E4' + 'E4 FF 5E 5E 5E FF 5E 5E 5E FF 6A 6A 6A FF 44 44' + '44 FF 8E 8E 8E FF FF FF FF FF 8B 86 84 FF 87 80' + '7D FF D0 B3 A3 FF EC C0 A7 FF E9 B6 99 FF E9 B6' + '99 FF E9 B6 99 FF 00 00 00 00 00 00 00 FF 40 40' + '40 FF D2 D2 D2 FF CA CA CA FF CA CA CA FF D4 D4' + 'D4 FF D3 D3 D3 FF D3 D3 D3 FF D2 D2 D2 FF D2 D2' + 'D2 FF D2 D2 D2 FF D2 D2 D2 FF D3 D3 D3 FF D2 D2' + 'D2 FF D3 D3 D3 FF D2 D2 D2 FF D1 D1 D1 FF D0 D0' + 'D0 FF 5E 5E 5E FF 5E 5E 5E FF 6A 6A 6A FF 44 44' + '44 FF 8E 8E 8E FF FF FF FF FF 8B 86 84 FF 87 80' + '7D FF D0 B3 A3 FF EC C0 A7 FF E9 B6 99 FF E9 B6' + '99 FF E9 B6 99 FF 00 00 00 00 00 00 00 F4 07 07' + '07 FF DD DD DD FF CC CC CC FF D3 D3 D3 FF D3 D3' + 'D3 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0' + 'D0 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' + 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' + 'D3 FF 65 65 65 FF 6A 6A 6A FF 71 71 71 FF 79 79' + '79 FF 9E 9E 9E FF FF FF FF FF 52 52 52 FF 4E 4E' + '4E FF F2 D6 C7 FF EF CC B8 FF E9 B8 9C FF E9 B6' + '99 FF E9 B6 99 FF 00 00 00 00 00 00 00 BA 00 00' + '00 FF DD DD DD FF CF CF CF FF D3 D3 D3 FF D3 D3' + 'D3 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0' + 'D0 FF D0 D0 D0 FF CF CF CF FF D3 D3 D3 FF D3 D3' + 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' + 'D3 FF 3C 3C 3C FF 6A 6A 6A FF 71 71 71 FF 79 79' + '79 FF AA AA AA FF FF FF FF FF 50 50 50 FF 4C 4C' + '4C FF F4 DD D0 FF F1 D2 C2 FF EB BE A5 FF E9 B6' + '99 FF E9 B6 99 FF 00 00 00 00 00 00 00 4D 00 00' + '00 FF D8 D8 D8 FF D4 D4 D4 FF D3 D3 D3 FF D3 D3' + 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' + 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' + 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' + 'D3 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF A3 A3 9E FF DA DA D8 FF DA DA D8 FF DA DA' + 'D8 FF D5 CB C4 FF D2 C3 B9 FF CE B6 A6 FF CC AF' + '9D FF CA A8 94 FF 00 00 00 00 00 00 00 1A 00 00' + '00 FF CC CC CC FF D6 D6 D6 FF D3 D3 D3 FF D3 D3' + 'D3 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6' + 'D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6 D6 FF D3 D3' + 'D3 FF D3 D3 D3 FF D3 D3 D3 FF CC CC CC FF C9 C9' + 'C9 FF C4 C4 C4 FF C2 C2 C2 FF BD BD BD FF D0 D0' + 'D0 FF 09 09 09 FF 00 00 00 FF 00 00 00 6C 00 00' + '00 1D 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 02 00 00' + '00 D2 97 97 97 FF DC DC DC FF DC DC DC FF DE DE' + 'DE FF DE DE DE FF DD DD DD FF DD DD DD FF DD DD' + 'DD FF DD DD DD FF DD DD DD FF DD DD DD FF DD DD' + 'DD FF DD DD DD FF DD DD DD FF DD DD DD FF DD DD' + 'DD FF E7 E7 E7 FF E7 E7 E7 FF DC DC DC FF C6 C6' + 'C6 FF 00 00 00 FF 00 00 00 FF 00 00 00 59 00 00' + '00 14 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 AF 77 77 77 FF D3 D3 D3 FF E1 E1 E1 FF DE DE' + 'DE FF DE DE DE FF DE DE DE FF E0 E0 E0 FF E0 E0' + 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' + 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E1 E1 E1 FF E1 E1' + 'E1 FF E7 E7 E7 FF E7 E7 E7 FF D9 D9 D9 FF BB BB' + 'BB FF 00 00 00 FF 00 00 00 FF 00 00 00 40 00 00' + '00 0A 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 66 35 35 35 FF BD BD BD FF E6 E6 E6 FF E6 E6' + 'E6 FF E7 E7 E7 FF EB EB EB FF EB EB EB FF EB EB' + 'EB FF EB EB EB FF EB EB EB FF EB EB EB FF EB EB' + 'EB FF EB EB EB FF EB EB EB FF E7 E7 E7 FF E7 E7' + 'E7 FF E7 E7 E7 FF E6 E6 E6 FF D4 D4 D4 FF 9A 9A' + '9A FF 00 00 00 FF 00 00 00 A4 00 00 00 2B 00 00' + '00 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 2D 1E 1E 1E FF AB AB AB FF ED ED ED FF E7 E7' + 'E7 FF EC EC EC FF EB EB EB FF ED ED ED FF EB EB' + 'EB FF EB EB EB FF EB EB EB FF EB EB EB FF EB EB' + 'EB FF EB EB EB FF EB EB EB FF EB EB EB FF EC EC' + 'EC FF E5 E5 E5 FF EB EB EB FF D6 D6 D6 FF 8A 8A' + '8A FF 00 00 00 FF 00 00 00 7B 00 00 00 1B 00 00' + '00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 FF 8D 8D 8D FF C4 C4 C4 FF B2 B2' + 'B2 FF B2 B2 B2 FF EB EB EB FF F0 F0 F0 FF F0 F0' + 'F0 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0' + 'F0 FF F0 F0 F0 FF F0 F0 F0 FF F3 F3 F3 FF D5 D5' + 'D5 FF B6 B6 B6 FF B7 B7 B7 FF CD CD CD FF 61 61' + '61 FF 00 00 00 FF 00 00 00 50 00 00 00 0F 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 FF 64 64 64 FF DD DD DD FF DC DC' + 'DC FF E4 E4 E4 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9' + 'F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9' + 'F9 FF F9 F9 F9 FF F9 F9 F9 FF FA FA FA FF F2 F2' + 'F2 FF D8 D8 D8 FF DC DC DC FF B0 B0 B0 FF 34 34' + '34 FF 00 00 00 E5 00 00 00 31 00 00 00 04 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 9C 00 00 00 FF 3D 3D 3D FF 49 49' + '49 FF 48 48 48 FF 48 48 48 FF 48 48 48 FF 48 48' + '48 FF 48 48 48 FF 48 48 48 FF 48 48 48 FF 48 48' + '48 FF 48 48 48 FF 48 48 48 FF 48 48 48 FF 48 48' + '48 FF 49 49 49 FF 49 49 49 FF 02 02 02 FF 00 00' + '00 FF 00 00 00 49 00 00 00 14 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 06 00 00 00 7F 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FA 00 00' + '00 7C 00 00 00 12 00 00 00 04 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 FF FF E0 00 FF FF E0 00 FF FF' + 'E0 00 C0 00 00 00 80 00 00 00 80 00 00 00 80 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 80 00 00 00 80 00 00 00 80 00' + '00 00 80 00 00 00 80 00 00 00 80 00 00 00 80 00' + '00 1F 80 00 00 1F C0 00 00 1F C0 00 00 1F C0 00' + '00 1F E0 00 00 3F E0 00 00 3F E0 00 00 7F E0 00' + '00 7F FF FF FF FF 28 00 00 00 10 00 00 00 20 00' + '00 00 01 00 20 00 00 00 00 00 00 04 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 FF 00 00 00 FF 00 00 00 FF FF C0' + 'C0 FF FF C0 C0 FF FF C0 C0 FF FF C0 C0 FF 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 FF 36 36 30 FF 00 00 00 FF C0 00' + '00 FF C0 00 00 FF C0 00 00 FF C0 00 00 FF 00 00' + '00 00 00 00 00 16 00 00 00 37 00 00 00 37 00 00' + '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' + '00 37 00 00 00 FF 30 30 2C FF 00 00 00 FF FF C0' + 'C0 FF FF C0 C0 FF FF C0 C0 FF FF C0 C0 FF 00 00' + '00 54 90 90 90 FF AB AC AC FF CC CC CC FF C4 C4' + 'C4 FF C2 C2 C2 FF C1 C1 C1 FF BC BC BC FF BD BD' + 'BD FF 00 00 00 FF 18 18 18 FF 00 00 00 FF E0 E0' + 'E0 FF E1 E1 E1 FF E2 E2 E2 FF E3 E3 E3 FF 00 00' + '00 FA EA EA EA FF E8 E8 E8 FF 00 FF 00 FF CB CB' + 'CB FF 66 66 66 FF 66 66 66 FF 66 66 66 FF CD CD' + 'CD FF 00 00 00 FF 00 00 00 FF 00 00 00 FF E7 E7' + 'E7 FF E7 E7 E7 FF E7 E7 E7 FF E7 E7 E7 FF 00 00' + '00 F9 EF EF EF FF EB EB EB FF 3B 3B 3B FF 3B 3B' + '3B FF 3B 3B 3B FF 3B 3B 3B FF 3B 3B 3B FF 3B 3B' + '3B FF 00 00 00 FF 02 02 02 FF 00 00 00 FF E7 E7' + 'E7 FF E7 E7 E7 FF E7 E7 E7 FF E7 E7 E7 FF 00 00' + '00 F9 F7 F7 F7 FF F6 F6 F6 FF F5 F5 F5 FF F3 F3' + 'F3 FF F2 F2 F2 FF F1 F1 F1 FF F0 F0 F0 FF EF EF' + 'EF FF 00 00 00 FF 09 09 09 FF 10 10 10 FF 1E 1E' + '1E FF 42 42 42 FF 46 46 46 FF 2C 2C 2C FF 00 00' + '00 F7 F3 F3 F3 FF B7 B7 B7 FF DA DA DA FF D8 D8' + 'D8 FF D7 D7 D7 FF D7 D7 D7 FF D7 D7 D7 FF D8 D8' + 'D8 FF 00 00 00 FF 1F 1F 1F FF 2F 2F 2F FF 44 44' + '44 FF 49 49 49 FF 2C 2C 2C FF 1C 1C 1C FF 00 00' + '00 73 EF EF EF FF CB CB CB FF CE CE CE FF D5 D5' + 'D5 FF D5 D5 D5 FF D5 D5 D5 FF D5 D5 D5 FF D5 D5' + 'D5 FF 00 00 00 FF 5D 5D 5D FF 00 00 00 FF F9 EE' + 'E8 FF F0 CF BC FF E9 B6 99 FF E9 B6 99 FF 00 00' + '00 25 B7 B7 B7 FF CB CB CB FF D3 D3 D3 FF D0 D0' + 'D0 FF D0 D0 D0 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' + 'D3 FF 00 00 00 FF 6A 6A 6A FF 00 00 00 FF B8 B6' + 'B6 FF 5B 58 57 FF EA BC A1 FF E9 B6 99 FF 00 00' + '00 00 5F 5F 5F FF D2 D2 D2 FF D1 D1 D1 FF D1 D1' + 'D1 FF D1 D1 D1 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' + 'D3 FF 00 00 00 FF 79 79 79 FF 00 00 00 FF E0 E0' + 'E0 FF D9 D1 CC FF F0 CF BC FF EA BB A0 FF 00 00' + '00 00 18 18 18 FF DB DB DB FF DE DE DE FF DA DA' + 'DA FF DA DA DA FF DA DA DA FF DD DD DD FF DD DD' + 'DD FF DD DD DD FF D9 D9 D9 FF 7A 7A 7A FF 00 00' + '00 0A 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 FF E5 E5 E5 FF EB EB EB FF EB EB' + 'EB FF E4 E4 E4 FF E4 E4 E4 FF E4 E4 E4 FF E5 E5' + 'E5 FF E7 E7 E7 FF E6 E6 E6 FF 20 20 20 FF 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 DD E4 E4 E4 FF C1 C1 C1 FF ED ED' + 'ED FF EE EE EE FF EB EB EB FF ED ED ED FF ED ED' + 'ED FF C2 C2 C2 FF EC EC EC FF 00 00 00 FF 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 44 80 80 80 FF D7 D7 D7 FF D8 D8' + 'D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8' + 'D8 FF D9 D9 D9 FF B0 B0 B0 FF 00 00 00 ED 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 2C 00 00 00 84 00 00' + '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' + '00 84 00 00 00 84 00 00 00 70 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF 80' + '00 00 FF 80 00 00 80 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 80 00 00 00 80 07 00 00 80 0F' + '00 00 80 0F 00 00 80 0F 00 00 C0 1F 00 00' +} */ + + +/* BINRES drive.ico */ +8 ICON drive.ico +/* { + '00 00 01 00 08 00 20 20 00 00 01 00 08 00 A8 08' + '00 00 86 00 00 00 10 10 00 00 01 00 08 00 68 05' + '00 00 2E 09 00 00 20 20 00 00 01 00 04 00 E8 02' + '00 00 96 0E 00 00 10 10 00 00 01 00 04 00 28 01' + '00 00 7E 11 00 00 30 30 00 00 01 00 08 00 A8 0E' + '00 00 A6 12 00 00 30 30 00 00 01 00 20 00 A8 25' + '00 00 4E 21 00 00 20 20 00 00 01 00 20 00 A8 10' + '00 00 F6 46 00 00 10 10 00 00 01 00 20 00 68 04' + '00 00 9E 57 00 00 28 00 00 00 20 00 00 00 40 00' + '00 00 01 00 08 00 00 00 00 00 00 04 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 11 00 00 00 00 11 00 00 11 11 11 00 22 22' + '22 00 33 33 33 00 44 44 44 00 55 55 55 00 66 66' + '66 00 77 77 77 00 7F 7F 7F 00 00 CC 66 00 66 99' + '99 00 33 CC 99 00 66 CC 99 00 88 88 88 00 99 99' + '99 00 AA AA AA 00 BB BB BB 00 99 CC 99 00 CC CC' + 'CC 00 DD DD DD 00 EE EE EE 00 FF FF FF 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 C0 17 95 00 00 00 38 00 A8 44' + 'F9 77 13 00 00 00 18 0A 38 00 00 00 38 00 18 6C' + '38 00 98 17 95 00 00 00 00 00 E0 19 95 00 F0 88' + 'FA 77 70 38 F5 77 FF FF FF FF A8 44 F9 77 70 7D' + 'F5 77 3A 8A F5 77 86 00 00 00 86 00 00 00 08 00' + '00 00 B0 18 95 00 00 00 00 00 CB 44 F9 77 38 9F' + '07 00 CD 8B F5 77 78 13 05 00 37 90 F5 77 00 00' + '00 00 3E 8A F5 77 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 10 00' + '00 00 00 00 00 00 54 00 56 00 00 EC FD 7F 1A 02' + '00 00 4C 16 95 00 40 9F 07 00 FC 15 95 00 FF FF' + 'FF FF B4 1A 95 00 45 00 00 00 28 02 00 00 FF FF' + 'FF FF E2 D8 F5 77 7D 9B F5 77 94 B6 01 00 00 00' + '05 00 F4 17 95 00 80 00 10 C0 B4 1A 95 00 F0 88' + 'FA 77 88 1C F5 77 FF FF FF FF 37 90 F5 77 00 00' + '00 00 3E 8A F5 77 9B B2 E7 77 B7 00 00 00 02 00' + '00 00 A4 1A 95 00 01 00 00 00 18 00 00 00 00 00' + '00 00 10 19 95 00 42 00 00 00 00 00 00 00 F4 18' + '95 00 00 00 00 00 00 00 00 00 00 00 00 00 0C 00' + '00 00 02 00 00 00 01 01 F5 77 00 EC FD 7F 54 00' + '00 00 00 00 00 00 03 00 00 00 5C 00 1A 02 40 9F' + '07 00 00 00 00 00 40 9F 07 00 05 00 00 00 BE B3' + 'E7 77 4C 19 95 00 A3 B4 E7 77 F8 00 00 00 00 00' + '00 C0 00 00 00 00 00 00 00 00 02 00 00 00 80 00' + '00 00 00 00 00 00 8C 1A 95 00 7F E9 4B 00 50 6C' + '0C 01 00 00 00 C0 00 00 00 00 80 1A 95 00 02 00' + '00 00 80 00 00 00 00 00 00 00 C0 27 95 00 C4 F5' + 'AF 00 02 00 00 00 44 3A 5C 6F 73 65 78 70 65 72' + '74 73 5C 72 65 61 63 74 6F 73 5C 6C 69 62 5C 73' + '68 65 6C 6C 33 32 5C 64 72 69 76 65 2E 69 63 6F' + '00 00 1A 93 4B 00 14 1A 95 00 1F 3B D4 77 13 00' + '00 00 98 00 00 00 4F 3B D4 77 E0 19 95 00 33 3B' + 'D4 77 64 C5 F5 77 A9 F1 E7 77 F8 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 1A 95 00 18 6C' + '38 00 86 00 00 00 00 00 00 00 C9 F1 E7 77 86 00' + '00 00 A4 1A 95 00 08 00 00 00 00 00 00 00 86 00' + '00 00 86 00 00 00 08 00 00 00 F4 19 95 00 33 3B' + 'D4 77 B4 1A 95 00 09 48 E9 77 B8 10 E9 77 FF FF' + 'FF FF C9 F1 E7 77 16 EA 4B 00 F8 00 00 00 18 6C' + '38 00 86 00 00 00 58 1A 95 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 18 18 18 18 18 18 18 18 18 18 18 18 18 18' + '18 18 18 18 18 02 18 18 18 18 00 00 00 00 00 00' + '00 18 18 03 03 04 03 04 03 03 04 03 03 04 03 03' + '04 03 03 04 03 03 03 04 01 18 18 00 00 00 00 00' + '18 18 06 12 14 12 12 12 12 11 12 12 12 12 12 12' + '12 12 12 12 12 11 0F 10 0C 04 18 18 00 00 00 00' + '18 18 12 16 16 11 07 08 0F 10 11 12 12 11 12 12' + '12 12 12 12 12 12 0D 0B 10 0F 18 18 00 00 00 00' + '18 03 14 16 16 11 06 0F 0F 10 11 11 11 11 10 10' + '11 11 10 11 11 12 13 0E 12 0F 18 18 00 00 00 00' + '18 03 14 16 16 12 09 09 0F 10 10 11 12 0F 0F 10' + '0F 10 0F 10 11 14 12 12 14 10 18 18 00 00 00 00' + '18 03 15 16 16 12 08 0F 0F 10 11 11 12 10 09 0F' + '10 0F 0F 0F 11 14 14 12 14 0F 18 18 00 00 00 00' + '18 03 14 17 15 16 15 15 15 15 15 14 15 14 15 14' + '14 14 14 14 14 14 14 12 14 0F 18 18 00 00 00 00' + '18 03 14 17 17 16 17 17 16 17 16 17 16 17 16 17' + '16 17 16 17 16 16 16 17 15 10 18 18 00 00 00 00' + '18 03 15 16 15 15 15 15 15 15 15 15 15 15 15 15' + '15 15 15 15 15 15 15 15 17 10 18 18 00 00 00 00' + '18 03 15 15 11 11 14 15 15 14 15 15 14 15 14 15' + '14 15 14 15 14 12 11 12 16 10 18 18 00 00 00 00' + '18 18 11 15 12 12 12 14 14 15 15 15 15 16 15 16' + '15 15 15 14 15 11 12 12 16 09 18 18 00 00 00 00' + '18 18 0F 16 14 14 14 15 15 15 16 15 15 15 15 15' + '15 16 15 15 14 15 14 14 16 07 18 18 00 00 00 00' + '00 18 08 16 14 14 14 15 15 15 14 15 15 14 15 14' + '15 14 15 15 16 14 14 14 15 05 18 00 00 00 00 00' + '00 18 05 15 14 14 15 15 14 14 14 14 14 14 14 14' + '14 14 14 14 14 15 14 14 14 03 18 00 00 00 00 00' + '00 18 04 14 14 14 15 14 14 14 15 14 14 14 14 14' + '12 14 14 14 14 14 14 14 11 18 18 00 00 00 00 00' + '00 18 18 12 15 14 15 14 15 14 14 14 15 14 14 12' + '14 12 12 14 14 14 12 15 0F 18 18 00 00 00 00 00' + '00 18 18 10 15 14 14 15 14 15 14 15 14 14 15 15' + '14 12 14 12 12 12 12 14 08 18 18 00 00 00 00 00' + '00 18 18 09 15 15 14 15 14 15 15 15 15 15 14 15' + '15 15 15 15 15 12 14 14 06 18 18 00 00 00 00 00' + '00 00 18 06 15 15 15 14 16 15 15 15 15 15 15 15' + '15 15 15 15 14 15 15 14 05 18 00 00 00 00 00 00' + '00 00 18 05 14 16 15 15 14 15 15 16 15 16 16 15' + '16 15 15 15 15 15 15 11 03 18 00 00 00 00 00 00' + '00 00 18 04 11 15 16 16 16 15 15 15 15 15 15 15' + '15 15 15 15 16 16 15 10 18 18 00 00 00 00 00 00' + '00 00 18 18 11 16 14 14 15 16 16 15 16 15 15 16' + '15 16 16 15 12 15 15 09 18 18 00 00 00 00 00 00' + '00 00 18 18 0F 15 14 12 16 17 17 17 17 17 17 17' + '17 17 17 15 14 14 15 07 18 18 00 00 00 00 00 00' + '00 00 00 18 04 10 15 15 15 15 15 15 15 15 15 15' + '15 15 15 15 15 14 09 03 18 00 00 00 00 00 00 00' + '00 00 00 18 18 03 04 04 04 04 04 04 04 04 04 04' + '04 04 04 04 04 04 18 18 18 00 00 00 00 00 00 00' + '00 00 00 00 18 18 18 18 18 18 18 18 18 18 18 18' + '18 18 18 18 18 18 18 18 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF' + 'FF FF FF FF FF FF FF FF FF FF F0 00 00 0F E0 00' + '00 07 C0 00 00 03 C0 00 00 03 C0 00 00 03 C0 00' + '00 03 C0 00 00 03 C0 00 00 03 C0 00 00 03 C0 00' + '00 03 C0 00 00 03 C0 00 00 03 C0 00 00 03 E0 00' + '00 07 E0 00 00 07 E0 00 00 07 E0 00 00 07 E0 00' + '00 07 E0 00 00 07 F0 00 00 0F F0 00 00 0F F0 00' + '00 0F F0 00 00 0F F0 00 00 0F F8 00 00 1F F8 00' + '00 1F FC 00 00 3F FF FF FF FF FF FF FF FF 28 00' + '00 00 10 00 00 00 20 00 00 00 01 00 08 00 00 00' + '00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 11 00 11 11' + '11 00 22 00 00 00 22 22 22 00 44 44 44 00 55 55' + '55 00 66 66 66 00 77 77 77 00 7F 7F 7F 00 33 CC' + '99 00 88 88 88 00 99 99 99 00 AA AA AA 00 BB BB' + 'BB 00 99 CC 99 00 CC CC CC 00 DD DD DD 00 EE EE' + 'EE 00 00 00 00 00 CC CC CC 00 DD DD DD 00 EE EE' + 'EE 00 FF FF FF 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 C0 17' + '95 00 00 00 38 00 A8 44 F9 77 13 00 00 00 18 0A' + '38 00 00 00 38 00 18 6C 38 00 98 17 95 00 00 00' + '00 00 E0 19 95 00 F0 88 FA 77 70 38 F5 77 FF FF' + 'FF FF A8 44 F9 77 70 7D F5 77 3A 8A F5 77 86 00' + '00 00 86 00 00 00 08 00 00 00 B0 18 95 00 00 00' + '00 00 CB 44 F9 77 38 9F 07 00 CD 8B F5 77 78 13' + '05 00 37 90 F5 77 00 00 00 00 3E 8A F5 77 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 10 00 00 00 00 00 00 00 54 00' + '56 00 00 EC FD 7F 1A 02 00 00 4C 16 95 00 40 9F' + '07 00 FC 15 95 00 FF FF FF FF B4 1A 95 00 45 00' + '00 00 28 02 00 00 FF FF FF FF E2 D8 F5 77 7D 9B' + 'F5 77 94 B6 01 00 00 00 05 00 F4 17 95 00 80 00' + '10 C0 B4 1A 95 00 F0 88 FA 77 88 1C F5 77 FF FF' + 'FF FF 37 90 F5 77 00 00 00 00 3E 8A F5 77 9B B2' + 'E7 77 B7 00 00 00 02 00 00 00 A4 1A 95 00 01 00' + '00 00 18 00 00 00 00 00 00 00 10 19 95 00 42 00' + '00 00 00 00 00 00 F4 18 95 00 00 00 00 00 00 00' + '00 00 00 00 00 00 0C 00 00 00 02 00 00 00 01 01' + 'F5 77 00 EC FD 7F 54 00 00 00 00 00 00 00 03 00' + '00 00 5C 00 1A 02 40 9F 07 00 00 00 00 00 40 9F' + '07 00 05 00 00 00 BE B3 E7 77 4C 19 95 00 A3 B4' + 'E7 77 F8 00 00 00 00 00 00 C0 00 00 00 00 00 00' + '00 00 02 00 00 00 80 00 00 00 00 00 00 00 8C 1A' + '95 00 7F E9 4B 00 50 6C 0C 01 00 00 00 C0 00 00' + '00 00 80 1A 95 00 02 00 00 00 80 00 00 00 00 00' + '00 00 C0 27 95 00 C4 F5 AF 00 02 00 00 00 44 3A' + '5C 6F 73 65 78 70 65 72 74 73 5C 72 65 61 63 74' + '6F 73 5C 6C 69 62 5C 73 68 65 6C 6C 33 32 5C 64' + '72 69 76 65 2E 69 63 6F 00 00 1A 93 4B 00 14 1A' + '95 00 1F 3B D4 77 13 00 00 00 98 00 00 00 4F 3B' + 'D4 77 E0 19 95 00 33 3B D4 77 64 C5 F5 77 A9 F1' + 'E7 77 F8 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 1A 95 00 18 6C 38 00 86 00 00 00 00 00' + '00 00 C9 F1 E7 77 86 00 00 00 A4 1A 95 00 08 00' + '00 00 00 00 00 00 86 00 00 00 86 00 00 00 08 00' + '00 00 F4 19 95 00 33 3B D4 77 B4 1A 95 00 09 48' + 'E9 77 B8 10 E9 77 FF FF FF FF C9 F1 E7 77 16 EA' + '4B 00 F8 00 00 00 18 6C 38 00 86 00 00 00 58 1A' + '95 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 13 13 02 02 02 02 02 02 02' + '02 02 03 01 13 00 00 13 0C 0E 0B 0C 0D 0E 0D 0E' + '0E 0D 0A 07 13 00 00 02 11 10 07 0B 0D 0D 0C 0C' + '0C 0E 0F 0C 13 00 00 02 11 11 0C 0D 0E 0E 0C 0D' + '0C 0E 10 0D 13 00 00 02 11 12 12 12 11 11 12 11' + '11 11 11 0E 13 00 00 13 10 0E 10 10 11 11 11 11' + '11 10 10 0E 13 00 00 13 0D 10 10 11 11 11 11 11' + '11 10 11 0B 13 00 00 13 0B 11 11 11 10 10 10 11' + '10 10 11 07 13 00 00 13 07 11 10 10 11 10 10 0E' + '10 10 10 06 13 00 00 13 05 10 11 11 10 11 11 10' + '11 10 10 04 13 00 00 13 04 11 11 11 11 11 11 11' + '11 11 0E 02 13 00 00 00 13 0E 11 12 12 12 12 12' + '11 12 0D 13 00 00 00 00 13 08 10 11 11 12 11 12' + '10 10 07 13 00 00 00 00 13 13 04 02 04 02 04 02' + '04 02 13 13 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 FF FF 00 00 80 01 00 00 80 01' + '00 00 80 01 00 00 80 01 00 00 80 01 00 00 80 01' + '00 00 80 01 00 00 80 01 00 00 80 01 00 00 80 01' + '00 00 80 01 00 00 C0 03 00 00 C0 03 00 00 C0 03' + '00 00 FF FF 00 00 28 00 00 00 20 00 00 00 40 00' + '00 00 01 00 04 00 00 00 00 00 00 02 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 80 00 00 00 00 80 00 00 80 80 00 00 00 00' + '80 00 80 00 80 00 00 80 80 00 C0 C0 C0 00 80 80' + '80 00 FF 00 00 00 00 FF 00 00 FF FF 00 00 00 00' + 'FF 00 FF 00 FF 00 00 FF FF 00 FF FF FF 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 80 00 80 00 00 00 00 80 82 00 00 00 00 00' + '87 77 77 77 77 77 77 77 77 87 88 88 00 00 00 00' + '7F F7 88 87 87 77 77 77 77 77 2E 88 00 00 00 00' + '7F F8 88 88 78 78 77 88 77 77 77 78 00 00 00 00' + 'F7 F7 88 78 77 77 88 87 88 77 77 78 00 00 00 08' + '7F 77 88 88 87 78 88 78 88 77 77 77 00 00 00 00' + '7F FF 77 77 F7 77 77 77 77 77 77 78 00 00 00 00' + '7F FF FF FF FF FF FF FF FF 7F FF F8 00 00 00 04' + '7F 77 F7 FF 7F 7F 77 F7 F7 FF 77 F8 00 00 00 00' + 'F7 77 7F 77 7F 77 F7 F7 7F 77 77 77 00 00 00 00' + '77 77 77 77 F7 FF 7F 77 F7 77 77 F8 00 00 00 00' + '8F 77 77 FF 7F 77 F7 FF 7F 77 77 F8 00 00 00 00' + '8F 77 7F F7 F7 7F 7F 77 F7 7F 7F 78 00 00 00 00' + '8F 77 F7 77 7F 77 77 F7 7F 77 77 70 00 00 00 00' + '87 7F 77 7F 77 F7 7F 77 77 7F 77 70 00 00 00 00' + '07 77 F7 77 F7 77 77 77 77 77 7F 80 00 00 00 00' + '08 7F 77 F7 77 7F 77 77 77 77 77 80 00 00 00 00' + '08 F7 7F 7F 7F 77 F7 F7 F7 77 77 80 00 00 00 00' + '08 7F 77 F7 F7 FF 7F 7F 7F 77 F7 80 00 00 00 00' + '04 7F 7F 7F 7F 7F F7 F7 F7 F7 77 00 00 00 00 00' + '08 8F FF 77 F7 F7 7F 7F 7F 7F F8 00 00 00 00 00' + '00 77 77 FF 7F 7F F7 F7 FF 77 F8 00 00 00 00 00' + '00 8F 77 FF FF FF FF FF F7 7F 78 00 00 00 00 00' + '00 48 7F 77 F7 F7 7F 7F 77 F7 80 00 00 00 00 00' + '00 00 80 48 08 04 80 80 48 04 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF' + 'FF FF FF FF FF FF FF FF FF FF F0 00 00 0F E0 00' + '00 07 C0 00 00 03 C0 00 00 03 C0 00 00 03 C0 00' + '00 03 C0 00 00 03 C0 00 00 03 C0 00 00 03 C0 00' + '00 03 C0 00 00 03 C0 00 00 03 C0 00 00 03 E0 00' + '00 07 E0 00 00 07 E0 00 00 07 E0 00 00 07 E0 00' + '00 07 E0 00 00 07 F0 00 00 0F F0 00 00 0F F0 00' + '00 0F F0 00 00 0F F0 00 00 0F F8 00 00 1F F8 00' + '00 1F FC 00 00 3F FF FF FF FF FF FF FF FF 28 00' + '00 00 10 00 00 00 20 00 00 00 01 00 04 00 00 00' + '00 00 80 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 80 00 00 00 00 80' + '00 00 80 80 00 00 00 00 80 00 80 00 80 00 00 80' + '80 00 C0 C0 C0 00 80 80 80 00 FF 00 00 00 00 FF' + '00 00 FF FF 00 00 00 00 FF 00 FF 00 FF 00 00 FF' + 'FF 00 FF FF FF 00 00 00 00 00 00 00 00 00 00 00' + '80 00 00 02 00 00 00 87 88 77 77 77 68 00 00 F7' + '88 87 87 87 78 00 08 77 87 77 87 87 77 00 00 FF' + 'F7 FF 7F 7F 77 00 00 77 77 F7 F7 F7 77 00 00 77' + '7F 77 F7 7F 78 00 00 87 F7 7F 77 F7 F8 00 00 8F' + '77 F7 77 77 78 00 00 87 7F 77 7F 77 78 00 00 47' + 'F7 F7 F7 F7 70 00 00 07 F7 FF 7F 7F 70 00 00 08' + '7F 7F F7 F7 80 00 00 00 04 08 00 40 00 00 00 00' + '00 00 00 00 00 00 FF FF 00 00 80 01 00 00 80 01' + '00 00 80 01 00 00 80 01 00 00 80 01 00 00 80 01' + '00 00 80 01 00 00 80 01 00 00 80 01 00 00 80 01' + '00 00 80 01 00 00 C0 03 00 00 C0 03 00 00 C0 03' + '00 00 FF FF 00 00 28 00 00 00 30 00 00 00 60 00' + '00 00 01 00 08 00 00 00 00 00 00 09 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 11 00 11 11 11 00 22 22 22 00 33 33' + '33 00 44 44 44 00 55 55 55 00 66 66 66 00 77 77' + '77 00 7F 7F 7F 00 00 99 66 00 33 99 66 00 00 CC' + '66 00 33 CC 66 00 66 99 99 00 88 88 88 00 99 99' + '99 00 AA AA AA 00 BB BB BB 00 99 CC 99 00 99 FF' + '99 00 99 CC CC 00 CC CC CC 00 DD DD DD 00 EE EE' + 'EE 00 FF FF FF 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 C0 17 95 00 00 00 38 00 A8 44' + 'F9 77 13 00 00 00 18 0A 38 00 00 00 38 00 18 6C' + '38 00 98 17 95 00 00 00 00 00 E0 19 95 00 F0 88' + 'FA 77 70 38 F5 77 FF FF FF FF A8 44 F9 77 70 7D' + 'F5 77 3A 8A F5 77 86 00 00 00 86 00 00 00 08 00' + '00 00 B0 18 95 00 00 00 00 00 CB 44 F9 77 38 9F' + '07 00 CD 8B F5 77 78 13 05 00 37 90 F5 77 00 00' + '00 00 3E 8A F5 77 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 10 00' + '00 00 00 00 00 00 54 00 56 00 00 EC FD 7F 1A 02' + '00 00 4C 16 95 00 40 9F 07 00 FC 15 95 00 FF FF' + 'FF FF B4 1A 95 00 45 00 00 00 28 02 00 00 FF FF' + 'FF FF E2 D8 F5 77 7D 9B F5 77 94 B6 01 00 00 00' + '05 00 F4 17 95 00 80 00 10 C0 B4 1A 95 00 F0 88' + 'FA 77 88 1C F5 77 FF FF FF FF 37 90 F5 77 00 00' + '00 00 3E 8A F5 77 9B B2 E7 77 B7 00 00 00 02 00' + '00 00 A4 1A 95 00 01 00 00 00 18 00 00 00 00 00' + '00 00 10 19 95 00 42 00 00 00 00 00 00 00 F4 18' + '95 00 00 00 00 00 00 00 00 00 00 00 00 00 0C 00' + '00 00 02 00 00 00 01 01 F5 77 00 EC FD 7F 54 00' + '00 00 00 00 00 00 03 00 00 00 5C 00 1A 02 40 9F' + '07 00 00 00 00 00 40 9F 07 00 05 00 00 00 BE B3' + 'E7 77 4C 19 95 00 A3 B4 E7 77 F8 00 00 00 00 00' + '00 C0 00 00 00 00 00 00 00 00 02 00 00 00 80 00' + '00 00 00 00 00 00 8C 1A 95 00 7F E9 4B 00 50 6C' + '0C 01 00 00 00 C0 00 00 00 00 80 1A 95 00 02 00' + '00 00 80 00 00 00 00 00 00 00 C0 27 95 00 C4 F5' + 'AF 00 02 00 00 00 44 3A 5C 6F 73 65 78 70 65 72' + '74 73 5C 72 65 61 63 74 6F 73 5C 6C 69 62 5C 73' + '68 65 6C 6C 33 32 5C 64 72 69 76 65 2E 69 63 6F' + '00 00 1A 93 4B 00 14 1A 95 00 1F 3B D4 77 13 00' + '00 00 98 00 00 00 4F 3B D4 77 E0 19 95 00 33 3B' + 'D4 77 64 C5 F5 77 A9 F1 E7 77 F8 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 1A 95 00 18 6C' + '38 00 86 00 00 00 00 00 00 00 C9 F1 E7 77 86 00' + '00 00 A4 1A 95 00 08 00 00 00 00 00 00 00 86 00' + '00 00 86 00 00 00 08 00 00 00 F4 19 95 00 33 3B' + 'D4 77 B4 1A 95 00 09 48 E9 77 B8 10 E9 77 FF FF' + 'FF FF C9 F1 E7 77 16 EA 4B 00 F8 00 00 00 18 6C' + '38 00 86 00 00 00 58 1A 95 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A' + '1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A' + '1A 1A 1A 1A 1A 1A 1A 00 00 00 00 00 00 00 00 00' + '00 00 00 00 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A' + '1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A' + '1A 1A 1A 1A 1A 1A 1A 1A 1A 00 00 00 00 00 00 00' + '00 00 00 1A 1A 1A 1A 02 03 03 04 03 03 04 03 03' + '04 03 03 04 03 03 03 04 03 03 03 03 04 03 03 04' + '03 03 03 04 01 1A 1A 1A 1A 00 00 00 00 00 00 00' + '00 00 00 1A 1A 03 10 16 16 16 16 16 16 16 16 16' + '12 16 12 12 16 12 12 12 16 12 12 12 12 12 12 11' + '12 12 11 11 11 07 1A 1A 1A 00 00 00 00 00 00 00' + '00 00 1A 1A 1A 0F 17 18 18 17 0F 0F 10 10 10 11' + '12 16 12 16 16 16 16 17 16 16 16 17 16 16 16 16' + '16 11 0B 0B 13 12 06 1A 1A 1A 00 00 00 00 00 00' + '00 00 1A 1A 02 16 18 17 17 16 04 05 06 08 0F 0F' + '11 10 11 11 12 11 10 12 10 12 10 16 10 12 10 16' + '12 0D 0C 0A 0B 16 08 1A 1A 1A 00 00 00 00 00 00' + '00 00 1A 1A 03 16 18 17 18 17 05 06 08 0F 10 10' + '10 11 11 12 12 10 10 12 0F 12 10 12 10 12 0F 12' + '16 10 15 14 0E 16 0F 1A 1A 1A 00 00 00 00 00 00' + '00 00 1A 1A 04 17 18 18 17 16 07 08 08 0F 0F 10' + '10 11 11 11 12 11 08 12 08 11 0F 12 0F 12 08 16' + '16 12 11 10 16 12 10 1A 1A 1A 00 00 00 00 00 00' + '00 00 1A 1A 03 16 18 17 18 17 07 08 08 0F 0F 10' + '11 11 11 11 12 10 08 11 07 10 08 11 0F 11 07 12' + '12 16 12 16 12 16 0F 1A 1A 1A 00 00 00 00 00 00' + '00 00 1A 1A 03 17 18 18 17 17 07 07 08 0F 0F 0F' + '10 11 10 11 12 0F 07 11 06 10 07 12 07 11 06 16' + '16 12 16 12 12 16 0F 1A 1A 1A 00 00 00 00 00 00' + '00 00 1A 1A 03 16 18 18 18 17 11 11 11 11 11 12' + '11 12 12 12 12 12 11 12 11 12 12 12 11 12 11 12' + '16 12 16 12 16 12 10 1A 1A 1A 00 00 00 00 00 00' + '00 00 1A 1A 03 17 18 18 18 18 17 18 18 18 17 17' + '18 17 17 17 17 17 17 17 17 17 16 17 16 16 16 16' + '16 16 12 16 12 16 0F 1A 1A 1A 00 00 00 00 00 00' + '00 00 1A 1A 03 16 18 19 19 18 19 19 18 18 18 19' + '18 19 18 19 18 18 18 18 18 18 18 18 18 18 18 18' + '18 18 18 18 17 17 0F 1A 1A 1A 00 00 00 00 00 00' + '00 00 1A 1A 03 17 19 17 17 18 17 17 18 17 17 17' + '17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17' + '18 17 18 17 19 18 0F 1A 1A 1A 00 00 00 00 00 00' + '00 00 1A 1A 03 17 19 17 16 12 12 17 16 17 17 16' + '17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17' + '16 12 12 16 17 19 10 1A 1A 1A 00 00 00 00 00 00' + '00 00 1A 1A 03 17 18 16 11 11 11 16 17 17 16 17' + '17 16 17 16 17 17 16 17 16 17 16 17 16 17 17 16' + '11 12 11 12 16 19 10 1A 1A 1A 00 00 00 00 00 00' + '00 00 1A 1A 1A 12 19 12 11 16 11 12 17 16 17 17' + '16 17 16 17 16 16 17 16 17 16 17 16 17 17 16 16' + '11 12 12 11 17 19 08 1A 1A 1A 00 00 00 00 00 00' + '00 00 00 1A 1A 11 18 16 16 16 16 16 16 17 16 16' + '17 17 17 18 18 18 18 18 17 18 17 17 16 16 17 16' + '16 16 12 16 16 18 06 1A 1A 00 00 00 00 00 00 00' + '00 00 00 1A 1A 08 18 17 16 16 16 16 16 16 17 18' + '18 17 17 17 17 17 17 17 17 17 17 18 18 18 16 16' + '16 16 16 16 17 17 04 1A 1A 00 00 00 00 00 00 00' + '00 00 00 1A 1A 06 18 16 16 16 16 16 17 18 18 17' + '16 17 17 17 16 17 17 16 17 17 16 17 17 17 18 17' + '16 16 16 16 17 12 03 1A 1A 00 00 00 00 00 00 00' + '00 00 00 1A 1A 05 17 16 16 16 16 16 18 17 16 16' + '16 17 16 16 16 17 16 16 17 16 16 17 16 16 17 18' + '16 16 16 16 17 11 1A 1A 1A 00 00 00 00 00 00 00' + '00 00 00 1A 1A 03 12 17 16 16 16 18 16 16 17 16' + '17 16 17 16 16 16 16 16 16 16 16 16 16 16 16 16' + '18 16 16 16 17 0F 1A 1A 1A 00 00 00 00 00 00 00' + '00 00 00 1A 1A 1A 10 17 16 16 17 16 17 16 16 16' + '16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16' + '16 17 12 16 17 06 1A 1A 1A 00 00 00 00 00 00 00' + '00 00 00 00 1A 1A 0F 17 17 16 17 16 16 17 16 17' + '16 17 16 16 16 16 16 16 12 16 12 16 16 16 12 16' + '16 16 16 16 17 05 1A 1A 00 00 00 00 00 00 00 00' + '00 00 00 00 1A 1A 06 17 16 16 16 17 16 16 16 16' + '16 16 16 16 17 16 16 12 16 12 16 12 16 12 16 12' + '16 12 16 16 17 03 1A 1A 00 00 00 00 00 00 00 00' + '00 00 00 00 1A 1A 05 17 16 17 16 16 17 16 17 16' + '17 16 17 16 16 17 16 16 16 12 16 12 12 12 16 12' + '12 16 12 16 11 03 1A 1A 00 00 00 00 00 00 00 00' + '00 00 00 00 1A 1A 03 16 17 16 16 17 16 17 16 17' + '16 17 16 16 17 16 16 17 16 17 16 16 16 16 12 16' + '16 11 12 16 11 1A 1A 1A 00 00 00 00 00 00 00 00' + '00 00 00 00 1A 1A 02 12 17 17 16 16 17 17 17 17' + '17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 16' + '16 16 16 16 08 1A 1A 1A 00 00 00 00 00 00 00 00' + '00 00 00 00 1A 1A 1A 10 17 17 17 16 17 17 17 17' + '17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17' + '16 17 17 16 06 1A 1A 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 1A 1A 08 17 17 18 17 16 17 17 17' + '17 17 18 17 17 18 17 17 17 17 17 17 18 17 17 16' + '17 17 17 12 04 1A 1A 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 1A 1A 06 16 17 17 18 17 17 16 17' + '17 18 17 18 17 17 18 17 17 18 18 17 17 16 16 18' + '17 18 16 11 03 1A 1A 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 1A 1A 04 12 18 17 17 18 17 17 16' + '17 17 17 17 18 17 17 18 17 17 17 17 16 17 18 17' + '18 17 17 10 1A 1A 1A 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 1A 1A 02 11 18 18 18 18 18 18 18' + '17 17 17 17 17 17 17 17 17 17 17 17 18 18 17 18' + '17 18 17 0F 1A 1A 1A 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 1A 1A 1A 11 17 17 12 12 17 18 18' + '18 18 18 18 18 17 18 18 18 18 18 18 18 17 16 12' + '17 18 16 08 1A 1A 1A 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 1A 1A 0F 17 16 11 12 11 18 18' + '18 18 18 18 18 18 18 18 18 18 18 18 18 17 11 12' + '11 18 16 07 1A 1A 1A 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 1A 1A 07 16 17 17 17 17 19 19' + '19 19 19 19 19 19 19 19 19 19 19 19 19 18 17 17' + '17 17 11 04 1A 1A 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 1A 1A 02 0F 12 17 17 17 17 17' + '17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17' + '17 11 07 1A 1A 1A 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 1A 1A 1A 1A 05 05 05 05 05 05' + '05 05 05 05 05 05 05 05 05 05 05 05 05 05 05 05' + '05 04 1A 1A 1A 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 1A 1A 1A 1A 1A 1A 1A 1A 1A' + '1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A' + '1A 1A 1A 1A 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 1A 1A 1A 1A 1A 1A 1A' + '1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A 1A' + '1A 1A 1A 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF' + 'FF FF FF FF 00 00 FF FF FF FF FF FF 00 00 FF FF' + 'FF FF FF FF 00 00 FF FF FF FF FF FF 00 00 FF 00' + '00 00 00 7F 00 00 FC 00 00 00 00 1F 00 00 F8 00' + '00 00 00 1F 00 00 F8 00 00 00 00 1F 00 00 F0 00' + '00 00 00 0F 00 00 F0 00 00 00 00 0F 00 00 F0 00' + '00 00 00 0F 00 00 F0 00 00 00 00 0F 00 00 F0 00' + '00 00 00 0F 00 00 F0 00 00 00 00 0F 00 00 F0 00' + '00 00 00 0F 00 00 F0 00 00 00 00 0F 00 00 F0 00' + '00 00 00 0F 00 00 F0 00 00 00 00 0F 00 00 F0 00' + '00 00 00 0F 00 00 F0 00 00 00 00 0F 00 00 F0 00' + '00 00 00 0F 00 00 F8 00 00 00 00 1F 00 00 F8 00' + '00 00 00 1F 00 00 F8 00 00 00 00 1F 00 00 F8 00' + '00 00 00 1F 00 00 F8 00 00 00 00 1F 00 00 F8 00' + '00 00 00 1F 00 00 FC 00 00 00 00 3F 00 00 FC 00' + '00 00 00 3F 00 00 FC 00 00 00 00 3F 00 00 FC 00' + '00 00 00 3F 00 00 FC 00 00 00 00 3F 00 00 FC 00' + '00 00 00 7F 00 00 FE 00 00 00 00 7F 00 00 FE 00' + '00 00 00 7F 00 00 FE 00 00 00 00 7F 00 00 FE 00' + '00 00 00 7F 00 00 FE 00 00 00 00 7F 00 00 FF 00' + '00 00 00 7F 00 00 FF 00 00 00 00 FF 00 00 FF 00' + '00 00 00 FF 00 00 FF 00 00 00 01 FF 00 00 FF 80' + '00 00 03 FF 00 00 FF E0 00 00 07 FF 00 00 FF FF' + 'FF FF FF FF 00 00 FF FF FF FF FF FF 00 00 FF FF' + 'FF FF FF FF 00 00 FF FF FF FF FF FF 00 00 28 00' + '00 00 30 00 00 00 60 00 00 00 01 00 20 00 00 00' + '00 00 00 24 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 16 00 00 00 34 00 00' + '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' + '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' + '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' + '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' + '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' + '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' + '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' + '00 35 00 00 00 18 00 00 00 04 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 05 00 00 00 69 00 00 00 C5 00 00 00 F7 00 00' + '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' + '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' + '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' + '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' + '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' + '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' + '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' + '00 F1 00 00 00 B1 00 00 00 5C 00 00 00 0D 00 00' + '00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 05 00 00' + '00 9B 00 00 00 FF 00 00 00 FF 21 21 21 FF 2C 2C' + '2C FF 2B 2B 2B FF 2C 2C 2C FF 2B 2B 2B FF 2B 2B' + '2B FF 2B 2B 2B FF 2B 2B 2B FF 2B 2B 2B FF 2B 2B' + '2B FF 2B 2B 2B FF 2B 2B 2B FF 2B 2B 2B FF 2B 2B' + '2B FF 2B 2B 2B FF 2A 2A 2A FF 2A 2A 2A FF 2A 2A' + '2A FF 2A 2A 2A FF 2A 2A 2A FF 2A 2A 2A FF 2A 2A' + '2A FF 2A 2A 2A FF 2A 2A 2A FF 2B 2B 2B FF 2B 2B' + '2B FF 2B 2B 2B FF 2E 2C 2D FF 2E 2C 2D FF 13 13' + '13 FF 00 00 00 FF 00 00 00 F6 00 00 00 69 00 00' + '00 09 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 54 00 00' + '00 FF 26 26 26 FF 90 90 90 FF CA CA CA FF CD CD' + 'CD FF CB CB CB FF CE CE CE FF CD CD CD FF CC CC' + 'CC FF CB CB CB FF C9 C9 C9 FF C7 C7 C7 FF C6 C6' + 'C6 FF C5 C5 C5 FF C4 C4 C4 FF C3 C3 C3 FF C2 C2' + 'C2 FF C2 C2 C2 FF C3 C3 C3 FF C0 C0 C0 FF C1 C1' + 'C1 FF BF BF BF FF BF BF BF FF BC BC BC FF BD BD' + 'BD FF BA BA BA FF BB BB BB FF B5 B5 B5 FF B3 B4' + 'B3 FF B8 B4 B6 FF AD AD AD FF AB AC AC FF AD A8' + 'AB FF 63 63 63 FF 09 09 09 FF 00 00 00 EF 00 00' + '00 42 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 03 00 00 00 AD 01 01' + '01 FF 8A 8A 8A FF EB EB EB FF E8 E8 E8 FF E7 E7' + 'E7 FF D5 D5 D5 FF 85 85 85 FF 88 88 88 FF 92 92' + '92 FF 98 98 98 FF A2 A2 A2 FF AD AD AD FF BA BA' + 'BA FF C0 C0 C0 FF C3 C3 C3 FF C6 C6 C6 FF CB CB' + 'CB FF CA CA CA FF CA CA CA FF D6 D6 D6 FF CA CA' + 'CA FF D3 D3 D3 FF CB CB CB FF D7 D7 D7 FF CC CC' + 'CC FF D4 D4 D4 FF C7 C7 C7 FF C8 C9 C9 FF C6 C2' + 'C4 FF 9D B3 A8 FF 20 A8 63 FF 1C A8 60 FF 90 AF' + 'A0 FF BF BB BD FF 4F 4F 4F FF 00 00 00 FF 00 00' + '00 81 00 00 00 04 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 15 00 00 00 F0 19 19' + '19 FF C7 C7 C7 FF EC EC EC FF E2 E2 E2 FF E6 E6' + 'E6 FF CB CB CB FF 3B 3B 3B FF 3F 3F 3F FF 56 56' + '56 FF 72 72 72 FF 87 87 87 FF 92 92 92 FF 9D 9D' + '9D FF A5 A5 A5 FF A8 A8 A8 FF AC AC AC FF B7 B7' + 'B7 FF A9 A9 A9 FF 9C 9C 9C FF BD BD BD FF 99 99' + '99 FF B7 B7 B7 FF A1 A1 A1 FF C3 C3 C3 FF A3 A3' + 'A3 FF BD BD BD FF 98 98 98 FF C5 C4 C4 FF C7 BF' + 'C3 FF 51 A7 7C FF 17 CE 71 FF 0A BF 61 FF 2F 99' + '64 FF C3 BD C0 FF 84 83 84 FF 01 01 01 FF 00 00' + '00 A3 00 00 00 0B 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 30 00 00 00 FA 29 29' + '29 FF D1 D1 D1 FF EA EA EA FF E4 E4 E4 FF E7 E7' + 'E7 FF CD CD CD FF 47 47 47 FF 5F 5F 5F FF 79 79' + '79 FF 87 87 87 FF 8F 8F 8F FF 97 97 97 FF A0 A0' + 'A0 FF A7 A7 A7 FF AA AA AA FF AE AE AE FF B9 B9' + 'B9 FF A4 A4 A4 FF 90 90 90 FF B8 B8 B8 FF 8A 8A' + '8A FF AF AF AF FF 94 94 94 FF BF BF BF FF 97 97' + '97 FF B7 B7 B7 FF 88 88 88 FF C4 C3 C3 FF C6 C3' + 'C5 FF 95 B2 A3 FF 91 D6 B4 FF 91 D8 B5 FF 83 AB' + '97 FF C4 C1 C3 FF 8E 8E 8E FF 01 01 01 FF 00 00' + '00 B7 00 00 00 13 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 34 00 00 00 F9 28 28' + '28 FF D1 D1 D1 FF EC EC EC FF E6 E6 E6 FF E7 E7' + 'E7 FF D1 D1 D1 FF 68 68 68 FF 74 74 74 FF 7E 7E' + '7E FF 85 85 85 FF 8E 8E 8E FF 97 97 97 FF A0 A0' + 'A0 FF A7 A7 A7 FF AA AA AA FF AE AE AE FF BA BA' + 'BA FF 9F 9F 9F FF 83 83 83 FF B3 B3 B3 FF 7C 7C' + '7C FF A8 A8 A8 FF 87 87 87 FF BB BB BB FF 8A 8A' + '8A FF B2 B2 B2 FF 79 79 79 FF C2 C2 C2 FF C4 C4' + 'C4 FF C6 C3 C4 FF 99 AC A2 FF 96 AB A0 FF C2 BE' + 'C0 FF C4 C4 C4 FF 8D 8D 8D FF 01 01 01 FF 00 00' + '00 BA 00 00 00 14 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 33 00 00 00 F9 28 28' + '28 FF D1 D1 D1 FF EE EE EE FF E7 E7 E7 FF E8 E8' + 'E8 FF D6 D6 D6 FF 70 70 70 FF 71 71 71 FF 7D 7D' + '7D FF 85 85 85 FF 8E 8E 8E FF 97 97 97 FF A0 A0' + 'A0 FF A7 A7 A7 FF AA AA AA FF AE AE AE FF BB BB' + 'BB FF 98 98 98 FF 73 73 73 FF AD AD AD FF 6A 6A' + '6A FF A0 A0 A0 FF 78 78 78 FF B7 B7 B7 FF 7C 7C' + '7C FF AB AB AB FF 67 67 67 FF C2 C2 C2 FF C6 C6' + 'C6 FF C4 C3 C4 FF C7 C4 C5 FF C6 C2 C4 FF BF BF' + 'BF FF C5 C5 C5 FF 8D 8D 8D FF 01 01 01 FF 00 00' + '00 B9 00 00 00 14 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 33 00 00 00 F9 27 27' + '27 FF D1 D1 D1 FF EF EF EF FF E9 E9 E9 FF EB EB' + 'EB FF D6 D6 D6 FF 6A 6A 6A FF 6C 6C 6C FF 78 78' + '78 FF 81 81 81 FF 8A 8A 8A FF 93 93 93 FF 9C 9C' + '9C FF A3 A3 A3 FF A6 A6 A6 FF AB AB AB FF B9 B9' + 'B9 FF 90 90 90 FF 66 66 66 FF A5 A5 A5 FF 5B 5B' + '5B FF 98 98 98 FF 6B 6B 6B FF B1 B1 B1 FF 70 70' + '70 FF A4 A4 A4 FF 58 58 58 FF C1 C1 C1 FF C8 C8' + 'C8 FF C5 C5 C5 FF C3 C3 C3 FF C2 C2 C2 FF C1 C1' + 'C1 FF C6 C6 C6 FF 8E 8E 8E FF 01 01 01 FF 00 00' + '00 B9 00 00 00 14 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 33 00 00 00 F9 27 27' + '27 FF D2 D2 D2 FF F2 F2 F2 FF EB EB EB FF EA EA' + 'EA FF DF DF DF FF A7 A7 A7 FF A7 A7 A7 FF AB AB' + 'AB FF AE AE AE FF B0 B0 B0 FF B3 B3 B3 FF B6 B6' + 'B6 FF B9 B9 B9 FF B9 B9 B9 FF BA BA BA FF BD BD' + 'BD FF B7 B7 B7 FF B1 B1 B1 FF BE BE BE FF AF AF' + 'AF FF BA BA BA FF B1 B1 B1 FF BE BE BE FF B0 B0' + 'B0 FF BA BA BA FF AB AB AB FF C5 C5 C5 FF C8 C8' + 'C8 FF C6 C6 C6 FF C4 C4 C4 FF C3 C3 C3 FF C2 C2' + 'C2 FF C9 C9 C9 FF 8E 8E 8E FF 00 00 00 FF 00 00' + '00 B9 00 00 00 14 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 33 00 00 00 F9 26 26' + '26 FF D3 D3 D3 FF F3 F3 F3 FF EB EB EB FF EB EB' + 'EB FF EA EA EA FF ED ED ED FF EB EB EB FF E9 E9' + 'E9 FF E8 E8 E8 FF E6 E6 E6 FF E4 E4 E4 FF E2 E2' + 'E2 FF E1 E1 E1 FF DF DF DF FF DE DE DE FF DB DB' + 'DB FF DB DB DB FF DC DC DC FF D8 D8 D8 FF D9 D9' + 'D9 FF D6 D6 D6 FF D6 D6 D6 FF D2 D2 D2 FF D2 D2' + 'D2 FF CF CF CF FF D0 D0 D0 FF CB CB CB FF CA CA' + 'CA FF C9 C9 C9 FF C7 C7 C7 FF C4 C4 C4 FF C0 C0' + 'C0 FF CA CA CA FF 8E 8E 8E FF 00 00 00 FF 00 00' + '00 B9 00 00 00 14 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 33 00 00 00 F9 26 26' + '26 FF D3 D3 D3 FF F7 F7 F7 FF F8 F8 F8 FF F6 F6' + 'F6 FF F6 F6 F6 FF F6 F6 F6 FF F5 F5 F5 FF F5 F5' + 'F5 FF F4 F4 F4 FF F4 F4 F4 FF F3 F3 F3 FF F3 F3' + 'F3 FF F3 F3 F3 FF F2 F2 F2 FF F2 F2 F2 FF F1 F1' + 'F1 FF F1 F1 F1 FF F1 F1 F1 FF F0 F0 F0 FF F0 F0' + 'F0 FF F0 F0 F0 FF EF EF EF FF EF EF EF FF EE EE' + 'EE FF EE EE EE FF ED ED ED FF ED ED ED FF ED ED' + 'ED FF EC EC EC FF EC EC EC FF EB EB EB FF E0 E0' + 'E0 FF D0 D0 D0 FF 8D 8D 8D FF 00 00 00 FF 00 00' + '00 B9 00 00 00 14 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 33 00 00 00 F9 24 24' + '24 FF D6 D6 D6 FF FF FF FF FF E9 E9 E9 FF E1 E1' + 'E1 FF E2 E2 E2 FF E2 E2 E2 FF E0 E0 E0 FF DF DF' + 'DF FF DF DF DF FF DF DF DF FF DF DF DF FF DF DF' + 'DF FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' + 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' + 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' + 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E2 E2' + 'E2 FF E3 E3 E3 FF E3 E3 E3 FF E3 E3 E3 FF F8 F8' + 'F8 FF EF EF EF FF 8C 8C 8C FF 00 00 00 FF 00 00' + '00 B9 00 00 00 14 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 34 00 00 00 FA 24 24' + '24 FF DE DE DE FF F8 F8 F8 FF D9 D9 D9 FF C4 C4' + 'C4 FF BB BB BB FF BF BF BF FF D8 D8 D8 FF DA DA' + 'DA FF D9 D9 D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9' + 'D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9' + 'D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9' + 'D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9' + 'D9 FF D9 D9 D9 FF D9 D9 D9 FF DB DB DB FF CF CF' + 'CF FF BC BC BC FF BB BB BB FF D1 D1 D1 FF DE DE' + 'DE FF FF FF FF FF 9A 9A 9A FF 00 00 00 FF 00 00' + '00 BA 00 00 00 14 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 25 00 00 00 F7 1F 1F' + '1F FF DA DA DA FF F3 F3 F3 FF C6 C6 C6 FF A9 A9' + 'A9 FF B7 B7 B7 FF B0 B0 B0 FF C3 C3 C3 FF DA DA' + 'DA FF D8 D8 D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8' + 'D8 FF D8 D8 D8 FF D7 D7 D7 FF D7 D7 D7 FF D7 D7' + 'D7 FF D7 D7 D7 FF D7 D7 D7 FF D7 D7 D7 FF D7 D7' + 'D7 FF D7 D7 D7 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8' + 'D8 FF D8 D8 D8 FF D9 D9 D9 FF D2 D2 D2 FF A8 A8' + 'A8 FF B6 B6 B6 FF B1 B1 B1 FF B5 B5 B5 FF D8 D8' + 'D8 FF FC FC FC FF 9C 9C 9C FF 00 00 00 FF 00 00' + '00 AE 00 00 00 0C 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 07 00 00 00 D0 05 05' + '05 FF C2 C2 C2 FF F6 F6 F6 FF BC BC BC FF B2 B2' + 'B2 FF C3 C3 C3 FF AB AB AB FF BB BB BB FF D8 D8' + 'D8 FF D5 D5 D5 FF D5 D5 D5 FF D5 D5 D5 FF D4 D4' + 'D4 FF D3 D3 D3 FF D3 D3 D3 FF D5 D5 D5 FF D7 D7' + 'D7 FF D8 D8 D8 FF D8 D8 D8 FF D7 D7 D7 FF D5 D5' + 'D5 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D4 D4' + 'D4 FF D5 D5 D5 FF D7 D7 D7 FF C9 C9 C9 FF A6 A6' + 'A6 FF C3 C3 C3 FF B3 B3 B3 FF AD AD AD FF D6 D6' + 'D6 FF F5 F5 F5 FF 76 76 76 FF 00 00 00 FF 00 00' + '00 8C 00 00 00 01 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 9C 00 00' + '00 FF A4 A4 A4 FF F4 F4 F4 FF CF CF CF FF C5 C5' + 'C5 FF D2 D2 D2 FF BF BF BF FF C9 C9 C9 FF D3 D3' + 'D3 FF D2 D2 D2 FF D0 D0 D0 FF D3 D3 D3 FF DD DD' + 'DD FF E1 E1 E1 FF E3 E3 E3 FF E6 E6 E6 FF EA EA' + 'EA FF ED ED ED FF ED ED ED FF EB EB EB FF E7 E7' + 'E7 FF E4 E4 E4 FF E2 E2 E2 FF DE DE DE FF D4 D4' + 'D4 FF D0 D0 D0 FF D2 D2 D2 FF D3 D3 D3 FF C5 C5' + 'C5 FF D0 D0 D0 FF C2 C2 C2 FF BF BF BF FF D9 D9' + 'D9 FF E8 E8 E8 FF 56 56 56 FF 00 00 00 FF 00 00' + '00 72 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 73 00 00' + '00 FF 7E 7E 7E FF EF EF EF FF D1 D1 D1 FF CF CF' + 'CF FF CB CB CB FF CF CF CF FF D1 D1 D1 FF CE CE' + 'CE FF CF CF CF FF DF DF DF FF F0 F0 F0 FF EC EC' + 'EC FF E1 E1 E1 FF DE DE DE FF DD DD DD FF DC DC' + 'DC FF DB DB DB FF DB DB DB FF DC DC DC FF DD DD' + 'DD FF DE DE DE FF E1 E1 E1 FF EC EC EC FF F1 F1' + 'F1 FF E1 E1 E1 FF D1 D1 D1 FF CE CE CE FF D0 D0' + 'D0 FF CB CB CB FF CE CE CE FF D1 D1 D1 FF D9 D9' + 'D9 FF D4 D4 D4 FF 3F 3F 3F FF 00 00 00 FF 00 00' + '00 55 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 59 00 00' + '00 FF 59 59 59 FF E9 E9 E9 FF D0 D0 D0 FF CD CD' + 'CD FF CD CD CD FF CD CD CD FF CA CA CA FF D6 D6' + 'D6 FF ED ED ED FF E6 E6 E6 FF DC DC DC FF D4 D4' + 'D4 FF D5 D5 D5 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6' + 'D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6' + 'D6 FF D6 D6 D6 FF D5 D5 D5 FF D5 D5 D5 FF DB DB' + 'DB FF E4 E4 E4 FF ED ED ED FF DA DA DA FF CA CA' + 'CA FF CD CD CD FF CD CD CD FF CB CB CB FF DF DF' + 'DF FF B8 B8 B8 FF 22 22 22 FF 00 00 00 FB 00 00' + '00 3A 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 3E 00 00' + '00 FE 40 40 40 FF D7 D7 D7 FF D2 D2 D2 FF CA CA' + 'CA FF CB CB CB FF CA CA CA FF D4 D4 D4 FF E9 E9' + 'E9 FF DC DC DC FF D0 D0 D0 FF D1 D1 D1 FF D2 D2' + 'D2 FF D2 D2 D2 FF D2 D2 D2 FF D2 D2 D2 FF D2 D2' + 'D2 FF D2 D2 D2 FF D2 D2 D2 FF D2 D2 D2 FF D2 D2' + 'D2 FF D2 D2 D2 FF D2 D2 D2 FF D2 D2 D2 FF D1 D1' + 'D1 FF D0 D0 D0 FF D8 D8 D8 FF EA EA EA FF D8 D8' + 'D8 FF C9 C9 C9 FF CA CA CA FF C9 C9 C9 FF E0 E0' + 'E0 FF A0 A0 A0 FF 08 08 08 FF 00 00 00 EB 00 00' + '00 22 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 25 00 00' + '00 F8 22 22 22 FF B7 B7 B7 FF DB DB DB FF CA CA' + 'CA FF CB CB CB FF CE CE CE FF E4 E4 E4 FF D4 D4' + 'D4 FF CF CF CF FF D1 D1 D1 FF D0 D0 D0 FF D0 D0' + 'D0 FF D0 D0 D0 FF D0 D0 D0 FF CF CF CF FF CD CD' + 'CD FF CE CE CE FF CE CE CE FF CE CE CE FF CE CE' + 'CE FF CE CE CE FF CE CE CE FF CE CE CE FF CE CE' + 'CE FF CE CE CE FF CC CC CC FF D0 D0 D0 FF E2 E2' + 'E2 FF CF CF CF FF C7 C7 C7 FF C9 C9 C9 FF E2 E2' + 'E2 FF 80 80 80 FF 00 00 00 FF 00 00 00 C2 00 00' + '00 0E 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 0C 00 00' + '00 E1 07 07 07 FF 9F 9F 9F FF DD DD DD FF CC CC' + 'CC FF CD CD CD FF DB DB DB FF D6 D6 D6 FF CE CE' + 'CE FF D0 D0 D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0' + 'D0 FF D0 D0 D0 FF D0 D0 D0 FF CF CF CF FF CC CC' + 'CC FF C9 C9 C9 FF CA CA CA FF CA CA CA FF CA CA' + 'CA FF CA CA CA FF CA CA CA FF CA CA CA FF CA CA' + 'CA FF CA CA CA FF CA CA CA FF C8 C8 C8 FF CF CF' + 'CF FF DA DA DA FF C7 C7 C7 FF C9 C9 C9 FF E2 E2' + 'E2 FF 5A 5A 5A FF 00 00 00 FF 00 00 00 94 00 00' + '00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 B2 00 00 00 FF 83 83 83 FF DD DD DD FF CF CF' + 'CF FF D1 D1 D1 FF DB DB DB FF D1 D1 D1 FF D0 D0' + 'D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0' + 'D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0 D0 FF CF CF' + 'CF FF C9 C9 C9 FF C5 C5 C5 FF C6 C6 C6 FF C6 C6' + 'C6 FF C6 C6 C6 FF C6 C6 C6 FF C6 C6 C6 FF C6 C6' + 'C6 FF C6 C6 C6 FF C6 C6 C6 FF C6 C6 C6 FF C7 C7' + 'C7 FF D3 D3 D3 FF C8 C8 C8 FF C9 C9 C9 FF DE DE' + 'DE FF 42 42 42 FF 00 00 00 FF 00 00 00 6C 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 80 00 00 00 FF 5F 5F 5F FF DC DC DC FF D1 D1' + 'D1 FF D2 D2 D2 FF D4 D4 D4 FF D1 D1 D1 FF D1 D1' + 'D1 FF D1 D1 D1 FF D1 D1 D1 FF D1 D1 D1 FF D1 D1' + 'D1 FF D1 D1 D1 FF D1 D1 D1 FF D1 D1 D1 FF D1 D1' + 'D1 FF D0 D0 D0 FF C8 C8 C8 FF C3 C3 C3 FF C3 C3' + 'C3 FF C3 C3 C3 FF C4 C4 C4 FF C4 C4 C4 FF C4 C4' + 'C4 FF C4 C4 C4 FF C4 C4 C4 FF C4 C4 C4 FF C4 C4' + 'C4 FF C7 C7 C7 FF C5 C5 C5 FF CB CB CB FF CC CC' + 'CC FF 2D 2D 2D FF 00 00 00 F8 00 00 00 40 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 4B 00 00 00 FE 41 41 41 FF D8 D8 D8 FF D4 D4' + 'D4 FF D2 D2 D2 FF D0 D0 D0 FF D3 D3 D3 FF D3 D3' + 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' + 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' + 'D3 FF D3 D3 D3 FF D3 D3 D3 FF CD CD CD FF C7 C7' + 'C7 FF C4 C4 C4 FF C2 C2 C2 FF C1 C1 C1 FF C0 C0' + 'C0 FF C1 C1 C1 FF C1 C1 C1 FF C1 C1 C1 FF C2 C2' + 'C2 FF BF BF BF FF C0 C0 C0 FF CE CE CE FF B2 B2' + 'B2 FF 1A 1A 1A FF 00 00 00 E5 00 00 00 28 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 1A 00 00 00 F2 2C 2C 2C FF CC CC CC FF D6 D6' + 'D6 FF D5 D5 D5 FF CC CC CC FF D5 D5 D5 FF D6 D6' + 'D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6' + 'D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6' + 'D6 FF D6 D6 D6 FF D6 D6 D6 FF D7 D7 D7 FF D6 D6' + 'D6 FF D5 D5 D5 FF D3 D3 D3 FF CF CF CF FF CC CC' + 'CC FF C9 C9 C9 FF C6 C6 C6 FF C4 C4 C4 FF C2 C2' + 'C2 FF B3 B3 B3 FF BD BD BD FF D0 D0 D0 FF 99 99' + '99 FF 09 09 09 FF 00 00 00 CF 00 00 00 19 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 09 00 00 00 D8 18 18 18 FF B0 B0 B0 FF DB DB' + 'DB FF DB DB DB FF D0 D0 D0 FF D2 D2 D2 FF DB DB' + 'DB FF D9 D9 D9 FF DA DA DA FF DA DA DA FF DA DA' + 'DA FF DA DA DA FF DA DA DA FF DA DA DA FF DA DA' + 'DA FF DA DA DA FF DA DA DA FF DA DA DA FF DA DA' + 'DA FF DA DA DA FF DA DA DA FF DB DB DB FF DB DB' + 'DB FF DA DA DA FF D9 D9 D9 FF D9 D9 D9 FF CF CF' + 'CF FF C5 C5 C5 FF CC CC CC FF CA CA CA FF 7A 7A' + '7A FF 02 02 02 FF 00 00 00 B8 00 00 00 0A 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 02 00 00 00 BF 08 08 08 FF 97 97 97 FF DC DC' + 'DC FF DF DF DF FF DC DC DC FF CE CE CE FF D6 D6' + 'D6 FF DE DE DE FF DD DD DD FF DD DD DD FF DD DD' + 'DD FF DD DD DD FF DD DD DD FF DD DD DD FF DD DD' + 'DD FF DD DD DD FF DD DD DD FF DD DD DD FF DD DD' + 'DD FF DD DD DD FF DD DD DD FF DD DD DD FF DD DD' + 'DD FF DD DD DD FF DE DE DE FF D8 D8 D8 FF CE CE' + 'CE FF DD DD DD FF DC DC DC FF C6 C6 C6 FF 53 53' + '53 FF 00 00 00 FF 00 00 00 A0 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 A4 00 00 00 FF 77 77 77 FF D3 D3' + 'D3 FF E2 E2 E2 FF E1 E1 E1 FF DE DE DE FF CE CE' + 'CE FF D7 D7 D7 FF E1 E1 E1 FF E2 E2 E2 FF E0 E0' + 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' + 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' + 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E1 E1' + 'E1 FF E1 E1 E1 FF D9 D9 D9 FF CD CD CD FF DA DA' + 'DA FF E3 E3 E3 FF D9 D9 D9 FF BB BB BB FF 39 39' + '39 FF 00 00 00 FF 00 00 00 7E 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 89 00 00 00 FF 4B 4B 4B FF C9 C9' + 'C9 FF E5 E5 E5 FF E3 E3 E3 FF E4 E4 E4 FF E1 E1' + 'E1 FF D7 D7 D7 FF D2 D2 D2 FF DA DA DA FF E4 E4' + 'E4 FF E5 E5 E5 FF E4 E4 E4 FF E4 E4 E4 FF E4 E4' + 'E4 FF E4 E4 E4 FF E4 E4 E4 FF E4 E4 E4 FF E4 E4' + 'E4 FF E4 E4 E4 FF E5 E5 E5 FF E5 E5 E5 FF DC DC' + 'DC FF D2 D2 D2 FF D6 D6 D6 FF E0 E0 E0 FF E4 E4' + 'E4 FF E6 E6 E6 FF D6 D6 D6 FF A8 A8 A8 FF 20 20' + '20 FF 00 00 00 FD 00 00 00 4E 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 62 00 00 00 FF 35 35 35 FF BD BD' + 'BD FF E6 E6 E6 FF E6 E6 E6 FF E6 E6 E6 FF E7 E7' + 'E7 FF E7 E7 E7 FF DF DF DF FF D2 D2 D2 FF D3 D3' + 'D3 FF DE DE DE FF E3 E3 E3 FF E3 E3 E3 FF E4 E4' + 'E4 FF E4 E4 E4 FF E4 E4 E4 FF E4 E4 E4 FF E3 E3' + 'E3 FF E3 E3 E3 FF DE DE DE FF D4 D4 D4 FF D1 D1' + 'D1 FF DD DD DD FF E7 E7 E7 FF E7 E7 E7 FF E6 E6' + 'E6 FF E8 E8 E8 FF D4 D4 D4 FF 9A 9A 9A FF 0B 0B' + '0B FF 00 00 00 ED 00 00 00 2C 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 2D 00 00 00 F9 1E 1E 1E FF AB AB' + 'AB FF E4 E4 E4 FF ED ED ED FF E7 E7 E7 FF E6 E6' + 'E6 FF EC EC EC FF EB EB EB FF EA EA EA FF E4 E4' + 'E4 FF E0 E0 E0 FF DF DF DF FF DF DF DF FF DD DD' + 'DD FF DC DC DC FF DC DC DC FF DD DD DD FF DF DF' + 'DF FF DF DF DF FF DF DF DF FF E2 E2 E2 FF E9 E9' + 'E9 FF EC EC EC FF EA EA EA FF E5 E5 E5 FF EB EB' + 'EB FF EB EB EB FF D6 D6 D6 FF 8A 8A 8A FF 00 00' + '00 FF 00 00 00 C3 00 00 00 17 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 09 00 00 00 DD 08 08 08 FF 99 99' + '99 FF E4 E4 E4 FF DF DF DF FF BD BD BD FF C1 C1' + 'C1 FF D6 D6 D6 FF EC EC EC FF ED ED ED FF ED ED' + 'ED FF EE EE EE FF EE EE EE FF ED ED ED FF EC EC' + 'EC FF EB EB EB FF EB EB EB FF EC EC EC FF ED ED' + 'ED FF EE EE EE FF EE EE EE FF ED ED ED FF EE EE' + 'EE FF E4 E4 E4 FF C2 C2 C2 FF BE BE BE FF D1 D1' + 'D1 FF EC EC EC FF D4 D4 D4 FF 75 75 75 FF 00 00' + '00 FF 00 00 00 9C 00 00 00 06 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 AE 00 00 00 FF 8D 8D' + '8D FF E0 E0 E0 FF C4 C4 C4 FF B2 B2 B2 FF B8 B8' + 'B8 FF B2 B2 B2 FF EB EB EB FF F1 F1 F1 FF F0 F0' + 'F0 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0' + 'F0 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0' + 'F0 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0 F0 FF F3 F3' + 'F3 FF D5 D5 D5 FF B0 B0 B0 FF B6 B6 B6 FF B7 B7' + 'B7 FF EB EB EB FF CD CD CD FF 61 61 61 FF 00 00' + '00 FF 00 00 00 85 00 00 00 01 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 80 00 00 00 FF 64 64' + '64 FF CE CE CE FF DD DD DD FF DC DC DC FF D5 D5' + 'D5 FF E4 E4 E4 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9' + 'F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9' + 'F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9' + 'F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9 F9 FF FA FA' + 'FA FF F2 F2 F2 FF DF DF DF FF D8 D8 D8 FF DC DC' + 'DC FF D7 D7 D7 FF B0 B0 B0 FF 34 34 34 FF 00 00' + '00 FF 00 00 00 67 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 44 00 00 00 FF 19 19' + '19 FF 80 80 80 FF BE BE BE FF D3 D3 D3 FF D7 D7' + 'D7 FF DB DB DB FF D8 D8 D8 FF D8 D8 D8 FF D8 D8' + 'D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8' + 'D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8' + 'D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8' + 'D8 FF D9 D9 D9 FF D9 D9 D9 FF D7 D7 D7 FF CD CD' + 'CD FF B0 B0 B0 FF 5D 5D 5D FF 06 06 06 FF 00 00' + '00 ED 00 00 00 2B 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 02 00 00 00 9C 00 00' + '00 FF 0C 0C 0C FF 3D 3D 3D FF 49 49 49 FF 48 48' + '48 FF 48 48 48 FF 48 48 48 FF 48 48 48 FF 48 48' + '48 FF 48 48 48 FF 48 48 48 FF 48 48 48 FF 48 48' + '48 FF 48 48 48 FF 48 48 48 FF 48 48 48 FF 48 48' + '48 FF 48 48 48 FF 48 48 48 FF 48 48 48 FF 48 48' + '48 FF 48 48 48 FF 48 48 48 FF 49 49 49 FF 49 49' + '49 FF 2F 2F 2F FF 02 02 02 FF 00 00 00 FF 00 00' + '00 5C 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 06 00 00' + '00 7F 00 00 00 F1 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 D6 00 00 00 5C 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 2C 00 00 00 7E 00 00 00 84 00 00' + '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' + '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' + '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' + '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' + '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' + '00 84 00 00 00 70 00 00 00 1A 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 FF FF FF FF FF FF 00 00 FF FF' + 'FF FF FF FF 00 00 FF FF FF FF FF FF 00 00 FF FF' + 'FF FF FF FF 00 00 FF 00 00 00 00 7F 00 00 FC 00' + '00 00 00 1F 00 00 F8 00 00 00 00 1F 00 00 F8 00' + '00 00 00 1F 00 00 F0 00 00 00 00 0F 00 00 F0 00' + '00 00 00 0F 00 00 F0 00 00 00 00 0F 00 00 F0 00' + '00 00 00 0F 00 00 F0 00 00 00 00 0F 00 00 F0 00' + '00 00 00 0F 00 00 F0 00 00 00 00 0F 00 00 F0 00' + '00 00 00 0F 00 00 F0 00 00 00 00 0F 00 00 F0 00' + '00 00 00 0F 00 00 F0 00 00 00 00 0F 00 00 F0 00' + '00 00 00 0F 00 00 F0 00 00 00 00 0F 00 00 F8 00' + '00 00 00 1F 00 00 F8 00 00 00 00 1F 00 00 F8 00' + '00 00 00 1F 00 00 F8 00 00 00 00 1F 00 00 F8 00' + '00 00 00 1F 00 00 F8 00 00 00 00 1F 00 00 FC 00' + '00 00 00 3F 00 00 FC 00 00 00 00 3F 00 00 FC 00' + '00 00 00 3F 00 00 FC 00 00 00 00 3F 00 00 FC 00' + '00 00 00 3F 00 00 FC 00 00 00 00 7F 00 00 FE 00' + '00 00 00 7F 00 00 FE 00 00 00 00 7F 00 00 FE 00' + '00 00 00 7F 00 00 FE 00 00 00 00 7F 00 00 FE 00' + '00 00 00 7F 00 00 FF 00 00 00 00 7F 00 00 FF 00' + '00 00 00 FF 00 00 FF 00 00 00 00 FF 00 00 FF 00' + '00 00 01 FF 00 00 FF 80 00 00 03 FF 00 00 FF E0' + '00 00 07 FF 00 00 FF FF FF FF FF FF 00 00 FF FF' + 'FF FF FF FF 00 00 FF FF FF FF FF FF 00 00 FF FF' + 'FF FF FF FF 00 00 28 00 00 00 20 00 00 00 40 00' + '00 00 01 00 20 00 00 00 00 00 00 10 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 15 00 00 00 54 00 00 00 63 00 00 00 61 00 00' + '00 61 00 00 00 61 00 00 00 61 00 00 00 61 00 00' + '00 61 00 00 00 61 00 00 00 61 00 00 00 61 00 00' + '00 61 00 00 00 61 00 00 00 61 00 00 00 61 00 00' + '00 61 00 00 00 61 00 00 00 61 00 00 00 61 00 00' + '00 61 00 00 00 63 00 00 00 50 00 00 00 14 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 33 00 00' + '00 D7 0D 0D 0D FF 1B 1B 1B FF 1C 1C 1C FF 1E 1E' + '1E FF 1D 1D 1D FF 1D 1D 1D FF 1C 1C 1C FF 1B 1B' + '1B FF 1B 1B 1B FF 1B 1B 1B FF 1A 1A 1A FF 1A 1A' + '1A FF 1A 1A 1A FF 1A 1A 1A FF 1A 1A 1A FF 1A 1A' + '1A FF 1A 1A 1A FF 1A 1A 1A FF 1A 1A 1A FF 20 1C' + '1E FF 22 1B 1F FF 09 09 09 FF 00 00 00 C3 00 00' + '00 29 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 07 00 00 00 C9 40 40' + '40 FF BA BA BA FF CB CB CB FF BE BE BE FF B3 B3' + 'B3 FF B4 B4 B4 FF B4 B4 B4 FF B7 B7 B7 FF BB BB' + 'BB FF BB BB BB FF BB BB BB FF BC BC BC FF BE BE' + 'BE FF BD BD BD FF BC BC BC FF BB BB BB FF BA BA' + 'BA FF BA BA BA FF B4 B4 B4 FF B1 AE AF FF 8C A4' + '98 FF 80 A5 93 FF 90 91 91 FF 21 21 21 FF 00 00' + '00 AB 00 00 00 07 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 3D 08 08 08 FD B7 B7' + 'B7 FF F2 F2 F2 FF EE EE EE FF AF AF AF FF 51 51' + '51 FF 6E 6E 6E FF 89 89 89 FF 9A 9A 9A FF AB AB' + 'AB FF B3 B3 B3 FF BC BC BC FF B5 B5 B5 FF B5 B5' + 'B5 FF BC BC BC FF BD BD BD FF BE BE BE FF B7 B7' + 'B7 FF C0 C0 C0 FF C4 C1 C3 FF B7 BF BA FF 2A BF' + '75 FF 0E C0 67 FF 8C B8 A2 FF 80 79 7C FF 00 00' + '00 EC 00 00 00 25 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 58 19 19 19 FF CE CE' + 'CE FF EB EB EB FF EB EB EB FF AA AA AA FF 56 56' + '56 FF 7A 7A 7A FF 8C 8C 8C FF 96 96 96 FF A2 A2' + 'A2 FF A9 A9 A9 FF B4 B4 B4 FF A1 A1 A1 FF 97 97' + '97 FF A1 A1 A1 FF A5 A5 A5 FF A5 A5 A5 FF 9B 9B' + '9B FF A7 A7 A7 FF B3 B1 B2 FF BC C1 BE FF 87 C6' + 'A6 FF 85 CC A8 FF A6 BC B1 FF 94 90 92 FF 02 02' + '02 F9 00 00 00 36 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 5A 18 18 18 FF CC CC' + 'CC FF ED ED ED FF EC EC EC FF B9 B9 B9 FF 6D 6D' + '6D FF 7D 7D 7D FF 8B 8B 8B FF 96 96 96 FF A2 A2' + 'A2 FF A9 A9 A9 FF B6 B6 B6 FF 96 96 96 FF 82 82' + '82 FF 8E 8E 8E FF 93 93 93 FF 94 94 94 FF 86 86' + '86 FF 95 95 95 FF A6 A6 A6 FF C8 C8 C8 FF C2 C0' + 'C1 FF BF BD BE FF C9 C6 C7 FF 8E 8E 8E FF 01 01' + '01 FA 00 00 00 37 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 5A 17 17 17 FF CD CD' + 'CD FF F0 F0 F0 FF ED ED ED FF BF BF BF FF 77 77' + '77 FF 85 85 85 FF 91 91 91 FF 9A 9A 9A FF A4 A4' + 'A4 FF AA AA AA FF B5 B5 B5 FF 97 97 97 FF 83 83' + '83 FF 8D 8D 8D FF 92 92 92 FF 93 93 93 FF 86 86' + '86 FF 93 93 93 FF A7 A7 A7 FF CA CA CA FF C4 C3' + 'C4 FF C3 C2 C2 FF C8 C8 C8 FF 8E 8E 8E FF 00 00' + '00 FA 00 00 00 37 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 5A 17 17 17 FF CE CE' + 'CE FF F2 F2 F2 FF EC EC EC FF E6 E6 E6 FF DC DC' + 'DC FF DB DB DB FF DA DA DA FF DA DA DA FF D9 D9' + 'D9 FF D8 D8 D8 FF D7 D7 D7 FF D4 D4 D4 FF D4 D4' + 'D4 FF D2 D2 D2 FF D0 D0 D0 FF CF CF CF FF CC CC' + 'CC FF CB CB CB FF CB CB CB FF CC CC CC FF CA CA' + 'CA FF C7 C7 C7 FF C9 C9 C9 FF 8D 8D 8D FF 00 00' + '00 FA 00 00 00 37 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 5A 17 17 17 FF D0 D0' + 'D0 FF FF FF FF FF F8 F8 F8 FF F8 F8 F8 FF F9 F9' + 'F9 FF F8 F8 F8 FF F7 F7 F7 FF F7 F7 F7 FF F6 F6' + 'F6 FF F6 F6 F6 FF F5 F5 F5 FF F5 F5 F5 FF F5 F5' + 'F5 FF F4 F4 F4 FF F4 F4 F4 FF F4 F4 F4 FF F3 F3' + 'F3 FF F3 F3 F3 FF F2 F2 F2 FF F1 F1 F1 FF F2 F2' + 'F2 FF F3 F3 F3 FF E8 E8 E8 FF 8D 8D 8D FF 00 00' + '00 FA 00 00 00 37 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 5B 17 17 17 FF D7 D7' + 'D7 FF F4 F4 F4 FF DB DB DB FF D8 D8 D8 FF DD DD' + 'DD FF DF DF DF FF DE DE DE FF DE DE DE FF DE DE' + 'DE FF DE DE DE FF DE DE DE FF DE DE DE FF DE DE' + 'DE FF DE DE DE FF DE DE DE FF DE DE DE FF DF DF' + 'DF FF DF DF DF FF E0 E0 E0 FF DD DD DD FF D8 D8' + 'D8 FF E0 E0 E0 FF FB FB FB FF 9C 9C 9C FF 00 00' + '00 FA 00 00 00 38 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 51 11 11 11 FF D3 D3' + 'D3 FF D9 D9 D9 FF AD AD AD FF B0 B0 B0 FF BE BE' + 'BE FF D9 D9 D9 FF D8 D8 D8 FF D7 D7 D7 FF D7 D7' + 'D7 FF D7 D7 D7 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6' + 'D6 FF D6 D6 D6 FF D6 D6 D6 FF D7 D7 D7 FF D7 D7' + 'D7 FF D9 D9 D9 FF D3 D3 D3 FF AF AF AF FF B1 B1' + 'B1 FF B8 B8 B8 FF ED ED ED FF A0 A0 A0 FF 00 00' + '00 F7 00 00 00 2E 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 2B 00 00 00 F8 B3 B3' + 'B3 FF DC DC DC FF B9 B9 B9 FF BA BA BA FF BC BC' + 'BC FF D5 D5 D5 FF D3 D3 D3 FF D4 D4 D4 FF D8 D8' + 'D8 FF DF DF DF FF E3 E3 E3 FF E4 E4 E4 FF E4 E4' + 'E4 FF E3 E3 E3 FF DF DF DF FF D9 D9 D9 FF D4 D4' + 'D4 FF D3 D3 D3 FF CF CF CF FF BA BA BA FF B8 B8' + 'B8 FF B8 B8 B8 FF E9 E9 E9 FF 7C 7C 7C FF 00 00' + '00 DE 00 00 00 17 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 0C 00 00 00 E2 89 89' + '89 FF E5 E5 E5 FF CE CE CE FF D0 D0 D0 FF D0 D0' + 'D0 FF D1 D1 D1 FF DE DE DE FF E5 E5 E5 FF E5 E5' + 'E5 FF E2 E2 E2 FF DE DE DE FF DE DE DE FF DE DE' + 'DE FF DE DE DE FF E2 E2 E2 FF E6 E6 E6 FF E5 E5' + 'E5 FF DF DF DF FF D2 D2 D2 FF CF CF CF FF CF CF' + 'CF FF D0 D0 D0 FF E6 E6 E6 FF 54 54 54 FF 00 00' + '00 BC 00 00 00 07 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 BB 64 64' + '64 FF E2 E2 E2 FF CB CB CB FF CB CB CB FF CE CE' + 'CE FF E2 E2 E2 FF E0 E0 E0 FF D7 D7 D7 FF D3 D3' + 'D3 FF D4 D4 D4 FF D4 D4 D4 FF D4 D4 D4 FF D4 D4' + 'D4 FF D4 D4 D4 FF D4 D4 D4 FF D3 D3 D3 FF D7 D7' + 'D7 FF DF DF DF FF E4 E4 E4 FF D1 D1 D1 FF CB CB' + 'CB FF CF CF CF FF D7 D7 D7 FF 34 34 34 FF 00 00' + '00 99 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 93 3E 3E' + '3E FF DB DB DB FF CC CC CC FF CC CC CC FF DC DC' + 'DC FF D7 D7 D7 FF CF CF CF FF D0 D0 D0 FF D0 D0' + 'D0 FF D0 D0 D0 FF CF CF CF FF CD CD CD FF CD CD' + 'CD FF CD CD CD FF CD CD CD FF CD CD CD FF CD CD' + 'CD FF CC CC CC FF D3 D3 D3 FF DC DC DC FF C9 C9' + 'C9 FF CF CF CF FF C2 C2 C2 FF 1A 1A 1A FF 00 00' + '00 72 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 6B 21 21' + '21 FF C9 C9 C9 FF D2 D2 D2 FF D3 D3 D3 FF D7 D7' + 'D7 FF CF CF CF FF D0 D0 D0 FF D0 D0 D0 FF D0 D0' + 'D0 FF D0 D0 D0 FF CF CF CF FF CA CA CA FF C7 C7' + 'C7 FF C8 C8 C8 FF C8 C8 C8 FF C8 C8 C8 FF C8 C8' + 'C8 FF C8 C8 C8 FF C7 C7 C7 FF CF CF CF FF CC CC' + 'CC FF D0 D0 D0 FF A9 A9 A9 FF 04 04 04 FF 00 00' + '00 4D 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 44 0B 0B' + '0B FF B1 B1 B1 FF D8 D8 D8 FF D2 D2 D2 FF D2 D2' + 'D2 FF D1 D1 D1 FF D1 D1 D1 FF D1 D1 D1 FF D1 D1' + 'D1 FF D1 D1 D1 FF D2 D2 D2 FF D1 D1 D1 FF C9 C9' + 'C9 FF C4 C4 C4 FF C3 C3 C3 FF C3 C3 C3 FF C4 C4' + 'C4 FF C4 C4 C4 FF C4 C4 C4 FF C5 C5 C5 FF C5 C5' + 'C5 FF D2 D2 D2 FF 86 86 86 FF 00 00 00 F3 00 00' + '00 28 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 20 00 00' + '00 F4 93 93 93 FF DF DF DF FF D2 D2 D2 FF D2 D2' + 'D2 FF D5 D5 D5 FF D4 D4 D4 FF D4 D4 D4 FF D4 D4' + 'D4 FF D4 D4 D4 FF D4 D4 D4 FF D5 D5 D5 FF D5 D5' + 'D5 FF D2 D2 D2 FF CD CD CD FF C7 C7 C7 FF C3 C3' + 'C3 FF C2 C2 C2 FF C2 C2 C2 FF BE BE BE FF BC BC' + 'BC FF D0 D0 D0 FF 67 67 67 FF 00 00 00 D9 00 00' + '00 13 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 0B 00 00' + '00 DE 75 75 75 FF DE DE DE FF D7 D7 D7 FF D1 D1' + 'D1 FF DA DA DA FF D9 D9 D9 FF D9 D9 D9 FF D9 D9' + 'D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9' + 'D9 FF DA DA DA FF DA DA DA FF DA DA DA FF D8 D8' + 'D8 FF D6 D6 D6 FF D5 D5 D5 FF C7 C7 C7 FF C5 C5' + 'C5 FF CD CD CD FF 4B 4B 4B FF 00 00 00 BD 00 00' + '00 07 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 B7 53 53 53 FF D9 D9 D9 FF E1 E1 E1 FF D5 D5' + 'D5 FF D5 D5 D5 FF DF DF DF FF DF DF DF FF DE DE' + 'DE FF DE DE DE FF DE DE DE FF DE DE DE FF DE DE' + 'DE FF DE DE DE FF DE DE DE FF DE DE DE FF DF DF' + 'DF FF E0 E0 E0 FF D7 D7 D7 FF D6 D6 D6 FF DE DE' + 'DE FF C3 C3 C3 FF 2C 2C 2C FF 00 00 00 9A 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 90 31 31 31 FF CB CB CB FF E5 E5 E5 FF E4 E4' + 'E4 FF DA DA DA FF D7 D7 D7 FF DD DD DD FF E2 E2' + 'E2 FF E4 E4 E4 FF E4 E4 E4 FF E4 E4 E4 FF E4 E4' + 'E4 FF E4 E4 E4 FF E4 E4 E4 FF E2 E2 E2 FF DE DE' + 'DE FF D7 D7 D7 FF D9 D9 D9 FF E4 E4 E4 FF DF DF' + 'DF FF AB AB AB FF 17 17 17 FF 00 00 00 73 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 67 1A 1A 1A FF B3 B3 B3 FF E8 E8 E8 FF EA EA' + 'EA FF EA EA EA FF E5 E5 E5 FF DE DE DE FF DD DD' + 'DD FF DD DD DD FF DF DF DF FF E0 E0 E0 FF E0 E0' + 'E0 FF E0 E0 E0 FF DD DD DD FF DC DC DC FF DD DD' + 'DD FF E5 E5 E5 FF E9 E9 E9 FF EC EC EC FF DF DF' + 'DF FF 95 95 95 FF 04 04 04 FF 00 00 00 4D 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 41 07 07 07 FE 9F 9F 9F FF E8 E8 E8 FF CD CD' + 'CD FF CB CB CB FF E7 E7 E7 FF EF EF EF FF ED ED' + 'ED FF EA EA EA FF E9 E9 E9 FF E7 E7 E7 FF E7 E7' + 'E7 FF E8 E8 E8 FF EA EA EA FF EC EC EC FF F0 F0' + 'F0 FF DB DB DB FF C6 C6 C6 FF DC DC DC FF E1 E1' + 'E1 FF 78 78 78 FF 00 00 00 F4 00 00 00 29 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 1E 00 00 00 F4 83 83 83 FF E0 E0 E0 FF C9 C9' + 'C9 FF C6 C6 C6 FF EA EA EA FF FA FA FA FF F8 F8' + 'F8 FF F8 F8 F8 FF F8 F8 F8 FF F8 F8 F8 FF F8 F8' + 'F8 FF F8 F8 F8 FF F8 F8 F8 FF F8 F8 F8 FF FB FB' + 'FB FF D9 D9 D9 FF C4 C4 C4 FF D1 D1 D1 FF D2 D2' + 'D2 FF 50 50 50 FF 00 00 00 DA 00 00 00 15 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 BB 24 24 24 FF 98 98 98 FF CF CF' + 'CF FF D2 D2 D2 FF D7 D7 D7 FF D7 D7 D7 FF D7 D7' + 'D7 FF D7 D7 D7 FF D7 D7 D7 FF D7 D7 D7 FF D7 D7' + 'D7 FF D7 D7 D7 FF D7 D7 D7 FF D7 D7 D7 FF D7 D7' + 'D7 FF D7 D7 D7 FF D2 D2 D2 FF C8 C8 C8 FF 7C 7C' + '7C FF 0D 0D 0D FF 00 00 00 9A 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 31 00 00 00 DF 0F 0F 0F FF 29 29' + '29 FF 29 29 29 FF 28 28 28 FF 28 28 28 FF 28 28' + '28 FF 28 28 28 FF 28 28 28 FF 28 28 28 FF 28 28' + '28 FF 28 28 28 FF 28 28 28 FF 28 28 28 FF 28 28' + '28 FF 28 28 28 FF 2A 2A 2A FF 26 26 26 FF 08 08' + '08 FF 00 00 00 C8 00 00 00 1D 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 14 00 00 00 62 00 00' + '00 87 00 00 00 84 00 00 00 84 00 00 00 84 00 00' + '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' + '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' + '00 84 00 00 00 84 00 00 00 84 00 00 00 86 00 00' + '00 55 00 00 00 0A 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF' + 'FF FF FF FF FF FF FF FF FF FF F0 00 00 0F E0 00' + '00 07 C0 00 00 03 C0 00 00 03 C0 00 00 03 C0 00' + '00 03 C0 00 00 03 C0 00 00 03 C0 00 00 03 C0 00' + '00 03 C0 00 00 03 C0 00 00 03 C0 00 00 03 E0 00' + '00 07 E0 00 00 07 E0 00 00 07 E0 00 00 07 E0 00' + '00 07 E0 00 00 07 F0 00 00 0F F0 00 00 0F F0 00' + '00 0F F0 00 00 0F F0 00 00 0F F8 00 00 1F F8 00' + '00 1F FC 00 00 3F FF FF FF FF FF FF FF FF 28 00' + '00 00 10 00 00 00 20 00 00 00 01 00 20 00 00 00' + '00 00 00 04 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 11 04 04' + '04 8A 16 16 16 A8 1B 1B 1B A8 18 18 18 A8 16 16' + '16 A8 15 15 15 A8 16 16 16 A8 15 15 15 A8 15 15' + '15 A8 14 13 14 A8 19 12 16 A8 05 03 04 84 00 00' + '00 0F 00 00 00 00 00 00 00 00 05 05 05 83 9B 9B' + '9B FF C1 C1 C1 FF 83 83 83 FF 9A 9A 9A FF AD AD' + 'AD FF B2 B2 B2 FF B3 B3 B3 FF B5 B5 B5 FF B2 B1' + 'B2 FF AC B2 AF FF 59 B0 84 FF 5B 6C 64 FF 04 01' + '03 71 00 00 00 00 00 00 00 00 13 13 13 B3 DC DC' + 'DC FF CB CB CB FF 65 65 65 FF 8A 8A 8A FF A7 A7' + 'A7 FF AB AB AB FF 95 95 95 FF A2 A2 A2 FF 95 94' + '95 FF BA BF BC FF 8F CC AD FF 93 A1 9A FF 09 06' + '07 95 00 00 00 00 00 00 00 00 13 13 13 B2 D7 D7' + 'D7 FF DE DE DE FF A1 A1 A1 FF AC AC AC FF BA BA' + 'BA FF B7 B7 B7 FF A2 A2 A2 FF A9 A9 A9 FF 9D 9D' + '9D FF C2 C1 C1 FF CF C9 CC FF A2 A0 A1 FF 06 06' + '06 93 00 00 00 00 00 00 00 00 14 14 14 B3 D9 D9' + 'D9 FF ED ED ED FF EA EA EA FF E8 E8 E8 FF E5 E5' + 'E5 FF E5 E5 E5 FF E6 E6 E6 FF E4 E4 E4 FF E4 E4' + 'E4 FF DF DF DF FF E3 E3 E3 FF B2 B2 B2 FF 04 05' + '05 94 00 00 00 00 00 00 00 00 11 11 11 A5 C6 C6' + 'C6 FF BC BC BC FF CA CA CA FF D9 D9 D9 FF DA DA' + 'DA FF DA DA DA FF DB DB DB FF DA DA DA FF DA DA' + 'DA FF C6 C6 C6 FF C5 C5 C5 FF B4 B4 B4 FF 04 04' + '04 8B 00 00 00 00 00 00 00 00 04 04 04 7B A8 A8' + 'A8 FF CE CE CE FF CF CF CF FF DC DC DC FF DD DD' + 'DD FF DE DE DE FF DE DE DE FF DE DE DE FF DC DC' + 'DC FF CF CF CF FF D4 D4 D4 FF 91 91 91 FF 00 00' + '00 69 00 00 00 00 00 00 00 00 00 00 00 53 85 85' + '85 FF DB DB DB FF D7 D7 D7 FF D3 D3 D3 FF D0 D0' + 'D0 FF CE CE CE FF CD CD CD FF CE CE CE FF D0 D0' + 'D0 FF D6 D6 D6 FF D9 D9 D9 FF 6E 6E 6E FE 00 00' + '00 43 00 00 00 00 00 00 00 00 00 00 00 2E 64 64' + '64 FA DD DD DD FF D3 D3 D3 FF D0 D0 D0 FF D1 D1' + 'D1 FF CF CF CF FF C8 C8 C8 FF C4 C4 C4 FF C4 C4' + 'C4 FF C5 C5 C5 FF CF CF CF FF 4D 4D 4D F3 00 00' + '00 20 00 00 00 00 00 00 00 00 00 00 00 0E 42 42' + '42 E8 D7 D7 D7 FF D6 D6 D6 FF D9 D9 D9 FF D8 D8' + 'D8 FF D8 D8 D8 FF D7 D7 D7 FF D4 D4 D4 FF D3 D3' + 'D3 FF CD CD CD FF C5 C5 C5 FF 2C 2C 2C D8 00 00' + '00 0A 00 00 00 00 00 00 00 00 00 00 00 02 22 22' + '22 C5 D1 D1 D1 FF E3 E3 E3 FF DC DC DC FF DF DF' + 'DF FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF DE DE' + 'DE FF E5 E5 E5 FF C0 C0 C0 FF 11 11 11 B6 00 00' + '00 01 00 00 00 00 00 00 00 00 00 00 00 00 08 08' + '08 A1 BE BE BE FF E1 E1 E1 FF EA EA EA FF EB EB' + 'EB FF EB EB EB FF EB EB EB FF EC EC EC FF E5 E5' + 'E5 FF E5 E5 E5 FF A3 A3 A3 FF 01 01 01 93 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 74 78 78 78 FF C7 C7 C7 FF D9 D9 D9 FF DE DE' + 'DE FF DD DD DD FF DD DD DD FF DF DF DF FF D4 D4' + 'D4 FF C7 C7 C7 FF 60 60 60 FF 00 00 00 65 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 11 04 04 04 94 1D 1D 1D CC 1C 1C 1C CC 1C 1C' + '1C CC 1C 1C 1C CC 1C 1C 1C CC 1C 1C 1C CC 1D 1D' + '1D CC 1B 1B 1B CB 02 02 02 88 00 00 00 0C 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 FF FF 00 00 80 01 00 00 80 01' + '00 00 80 01 00 00 80 01 00 00 80 01 00 00 80 01' + '00 00 80 01 00 00 80 01 00 00 80 01 00 00 80 01' + '00 00 80 01 00 00 C0 03 00 00 C0 03 00 00 C0 03' + '00 00 FF FF 00 00' +} */ + +/* BINRES netdrive.ico */ +9 ICON netdrive.ico +/* { + '00 00 01 00 09 00 20 20 00 00 01 00 08 00 A8 08' + '00 00 96 00 00 00 10 10 00 00 01 00 08 00 68 05' + '00 00 3E 09 00 00 20 20 00 00 01 00 04 00 E8 02' + '00 00 A6 0E 00 00 10 10 00 00 01 00 04 00 28 01' + '00 00 8E 11 00 00 30 30 00 00 01 00 08 00 A8 0E' + '00 00 B6 12 00 00 30 30 00 00 01 00 04 00 68 06' + '00 00 5E 21 00 00 30 30 00 00 01 00 20 00 A8 25' + '00 00 C6 27 00 00 20 20 00 00 01 00 20 00 A8 10' + '00 00 6E 4D 00 00 10 10 00 00 01 00 20 00 68 04' + '00 00 16 5E 00 00 28 00 00 00 20 00 00 00 40 00' + '00 00 01 00 08 00 00 00 00 00 00 04 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 02 02 02 00 04 04 04 00 05 06 06 00 06 06' + '06 00 09 09 09 00 0A 0A 0A 00 0C 0C 0C 00 12 12' + '12 00 14 14 14 00 15 15 15 00 16 16 16 00 1D 1D' + '1D 00 1F 1F 1F 00 21 21 21 00 22 22 22 00 23 23' + '23 00 24 24 24 00 25 25 25 00 26 26 26 00 38 38' + '38 00 39 39 39 00 3B 3B 3B 00 00 67 67 00 43 43' + '43 00 46 46 46 00 4A 4A 4A 00 54 4C 50 00 53 53' + '53 00 55 55 55 00 56 56 56 00 58 58 58 00 59 59' + '59 00 5A 58 59 00 5A 5A 5A 00 5B 5B 5B 00 5C 5C' + '5C 00 5D 5D 5D 00 5E 5E 5E 00 65 58 5F 00 60 60' + '60 00 61 61 61 00 62 62 62 00 64 64 64 00 67 67' + '67 00 69 69 69 00 71 71 71 00 72 72 72 00 73 73' + '73 00 75 75 75 00 78 78 78 00 7A 7A 7A 00 7B 7B' + '7B 00 7C 7C 7C 00 7F 7F 7F 00 24 A7 64 00 3C AD' + '74 00 25 DC 7F 00 7D AA 94 00 18 FF FF 00 56 D8' + 'D8 00 81 81 81 00 83 83 83 00 89 89 89 00 8A 8A' + '8A 00 8B 8B 8B 00 8F 8F 8F 00 91 89 8C 00 90 90' + '90 00 91 91 91 00 94 94 94 00 95 95 95 00 97 97' + '97 00 99 99 99 00 9A 9A 9A 00 9C 9C 9C 00 9D 9D' + '9D 00 9E 9E 9E 00 9F 9F 9F 00 A0 91 91 00 94 B6' + 'A4 00 93 BD A9 00 A0 A0 A0 00 A1 A1 A1 00 A3 A3' + 'A3 00 A4 A4 A4 00 A5 A5 A5 00 A8 A8 A8 00 A9 A9' + 'A9 00 AA AA AA 00 AC AC AC 00 AD AD AD 00 AE AE' + 'AE 00 AF AF AF 00 B7 AF AF 00 AD B9 B3 00 B0 B0' + 'B0 00 B1 B1 B1 00 B2 B2 B2 00 B3 B3 B3 00 B4 B4' + 'B4 00 B5 B5 B5 00 B6 B6 B6 00 B7 B7 B7 00 B9 B9' + 'B9 00 BC BC BC 00 BD BD BD 00 BE BE BE 00 BF BF' + 'BF 00 89 CF CF 00 C0 C0 C0 00 C1 C1 C1 00 C2 C0' + 'C1 00 C2 C2 C2 00 C3 C3 C3 00 C4 C1 C2 00 C5 C2' + 'C4 00 C4 C4 C4 00 C5 C5 C5 00 C6 C5 C6 00 C6 C6' + 'C6 00 C8 C3 C5 00 CC C4 C8 00 C8 C8 C8 00 C9 C9' + 'C9 00 CB C9 CA 00 CA CA CA 00 CB CB CB 00 CC CC' + 'CC 00 CD CD CD 00 CE CE CE 00 CF CF CF 00 D2 C1' + 'CA 00 D3 C8 CD 00 D0 D0 D0 00 D1 D1 D1 00 D2 D2' + 'D2 00 D3 D3 D3 00 D4 D4 D4 00 D5 D5 D5 00 D6 D6' + 'D6 00 D7 D7 D7 00 D8 D8 D8 00 D9 D9 D9 00 DA DA' + 'DA 00 DB DB DB 00 DC DC DC 00 DD DD DD 00 DE DE' + 'DE 00 DF DF DF 00 E0 E0 E0 00 E1 E1 E1 00 E2 E2' + 'E2 00 E3 E3 E3 00 E4 E4 E4 00 E5 E5 E5 00 E6 E6' + 'E6 00 E7 E7 E7 00 E8 E8 E8 00 E9 E9 E9 00 EA EA' + 'EA 00 EB EB EB 00 EC EC EC 00 ED ED ED 00 EE EE' + 'EE 00 EF EF EF 00 F0 F0 F0 00 F1 F1 F1 00 F2 F2' + 'F2 00 F4 F4 F4 00 F5 F5 F5 00 F6 F6 F6 00 F7 F7' + 'F7 00 F8 F8 F8 00 F9 F9 F9 00 FC FC FC 00 FD FD' + 'FD 00 FF FF FF 00 00 00 00 00 62 00 1A 02 40 9F' + '07 00 00 00 00 00 40 9F 07 00 05 00 00 00 BE B3' + 'E7 77 4C 19 95 00 A3 B4 E7 77 F8 00 00 00 00 00' + '00 C0 00 00 00 00 00 00 00 00 02 00 00 00 80 00' + '00 00 00 00 00 00 8C 1A 95 00 7F E9 4B 00 08 6C' + '0C 01 00 00 00 C0 00 00 00 00 80 1A 95 00 02 00' + '00 00 80 00 00 00 00 00 00 00 C0 27 95 00 C4 F5' + 'AF 00 02 00 00 00 44 3A 5C 6F 73 65 78 70 65 72' + '74 73 5C 72 65 61 63 74 6F 73 5C 6C 69 62 5C 73' + '68 65 6C 6C 33 32 5C 6E 65 74 64 72 69 76 65 2E' + '69 63 6F 00 4B 00 14 1A 95 00 1F 3B D4 77 15 00' + '00 00 A8 00 00 00 4F 3B D4 77 E0 19 95 00 33 3B' + 'D4 77 64 C5 F5 77 A9 F1 E7 77 F8 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 1A 95 00 B0 6C' + '38 00 96 00 00 00 00 00 00 00 C9 F1 E7 77 96 00' + '00 00 A4 1A 95 00 09 00 00 00 00 00 00 00 96 00' + '00 00 96 00 00 00 09 00 00 00 F4 19 95 00 33 3B' + 'D4 77 B4 1A 95 00 09 48 E9 77 B8 10 E9 77 FF FF' + 'FF FF C9 F1 E7 77 16 EA 4B 00 F8 00 00 00 B0 6C' + '38 00 96 00 00 00 58 1A 95 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 B2 B2' + 'B2 B2 B2 B2 B2 B2 B2 B2 B2 B2 B2 B2 B2 17 17 B2' + 'B2 B2 B2 B2 B2 B2 B2 B2 B2 B2 B2 B2 B2 B2 62 62' + '62 62 62 62 62 62 62 62 62 62 62 5E 6D 3B 3B 6D' + '5E 62 62 62 62 62 62 62 62 62 62 62 62 62 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 3C 3C 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 4F 4F 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 B2 B2 B2 B2 B2 B2 B2 B2 B2 B2 B2 0D 0D B2' + 'B2 B2 B2 B2 B2 B2 B2 B2 B2 B2 00 00 00 00 00 00' + '00 B2 B2 09 26 26 2C 2B 2A 28 26 25 24 1E 1D 22' + '20 1F 1F 1F 1E 21 27 1B 05 B2 B2 00 00 00 00 00' + '00 B2 09 6E AA A0 58 64 68 6F 86 88 8C 8D 92 92' + '91 93 90 8E 82 79 38 51 43 03 B2 00 00 00 00 00' + '00 B2 1E AC 9C 9A 0C 1A 33 41 4C 54 5D 59 4E 4B' + '59 66 56 48 85 3A 39 37 84 13 B2 00 00 00 00 00' + '00 B2 25 A8 9D 99 1C 34 40 46 54 58 64 59 47 44' + '52 60 4A 3F 7D 70 50 5F 73 13 B2 00 00 00 00 00' + '00 B2 23 A9 9F 9E 24 2F 3E 42 4E 56 63 53 32 2E' + '41 52 3D 2C 7F 77 7A 74 6E 12 B2 00 00 00 00 00' + '00 B2 23 AB A2 9E 3D 44 4A 52 58 5B 64 5A 4B 49' + '54 5C 4C 45 7B 76 6F 6F 72 11 B2 00 00 00 00 00' + '00 B2 22 AD A6 A5 AF AE AA A8 A4 A2 9F 9D A0 9E' + '9A 96 96 96 8C 8A 88 7F 75 10 B2 00 00 00 00 00' + '00 B2 20 B1 A5 A3 A2 9D 9D 9C 9D 9D 9E 9D 9D 9D' + '9D 9D 9D 9C 9F A3 A2 AE 8B 0E B2 00 00 00 00 00' + '00 B2 25 B1 78 61 69 8E 8D 8D 8D 8D 8C 8C 8C 8C' + '8D 8D 8D 8E 87 65 65 8C AB 13 B2 00 00 00 00 00' + '00 B2 18 B1 5D 67 57 87 8D 8B 89 87 8A 8B 8B 8A' + '87 88 8A 90 68 62 58 7B 9E 0C B2 00 00 00 00 00' + '00 B2 10 9E 82 86 78 86 82 8F 9A 99 9C A0 A0 9D' + '9A 9B 91 83 83 83 75 8E 6B 06 B2 00 00 00 00 00' + '00 B2 08 87 87 80 81 81 9F 9C 90 8E 8D 8C 8C 8D' + '8E 91 9C 9F 86 7E 81 98 48 B2 B2 00 00 00 00 00' + '00 B2 01 55 8E 7C 81 9B 89 82 86 86 83 86 86 86' + '86 86 81 83 9C 83 78 9F 29 B2 B2 00 00 00 00 00' + '00 B2 B2 31 9A 7C 90 88 82 86 83 86 81 7E 7F 7F' + '7F 7F 7F 7E 80 90 72 A5 15 B2 B2 00 00 00 00 00' + '00 00 B2 19 A0 83 8E 82 86 86 86 86 86 80 71 72' + '75 76 76 76 72 81 76 A1 0A B2 00 00 00 00 00 00' + '00 00 B2 0F A4 87 87 88 87 87 87 87 87 88 81 75' + '6E 6C 6B 6E 6E 6E 78 8C 01 B2 00 00 00 00 00 00' + '00 00 B2 02 94 8F 80 8E 8C 8D 8D 8D 8D 8D 8D 8E' + '8D 8A 86 80 7C 67 7C 63 B2 B2 00 00 00 00 00 00' + '00 00 B2 B2 76 99 89 89 94 92 91 91 91 91 91 91' + '92 92 93 95 8C 89 93 3F B2 B2 00 00 00 00 00 00' + '00 00 00 B2 45 9C 99 8B 8C 96 99 97 97 97 97 97' + '97 99 95 8E 88 9D 8E 1F B2 00 00 00 00 00 00 00' + '00 00 00 B2 2C 9C 9D 9D 95 87 8F 98 99 9A 9A 99' + '98 8F 87 95 9E A1 82 14 B2 00 00 00 00 00 00 00' + '00 00 00 B2 16 93 A0 8F A2 A4 9C 98 97 94 94 97' + '98 9A A4 9A 91 A7 78 0C B2 00 00 00 00 00 00 00' + '00 00 00 B2 13 94 6F 5B 76 A8 A6 A6 A6 A5 A5 A6' + 'A6 A6 A3 65 5B 9D 6A 0B B2 00 00 00 00 00 00 00' + '00 00 00 B2 07 4D A2 9A AB B0 AF AF AF AF AF AF' + 'AF AF AF A7 9C 9B 30 B2 B2 00 00 00 00 00 00 00' + '00 00 00 B2 B2 0B 31 34 33 32 32 32 32 32 32 32' + '32 32 32 33 35 2D 04 B2 00 00 00 00 00 00 00 00' + '00 00 00 00 B2 B2 B2 B2 B2 B2 B2 B2 B2 B2 B2 B2' + 'B2 B2 B2 B2 B2 B2 B2 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF' + 'FF FF 00 00 00 00 00 00 00 00 FF FE 7F FF FF FE' + '7F FF F0 00 00 0F E0 00 00 07 E0 00 00 07 E0 00' + '00 07 E0 00 00 07 E0 00 00 07 E0 00 00 07 E0 00' + '00 07 E0 00 00 07 E0 00 00 07 E0 00 00 07 E0 00' + '00 07 E0 00 00 07 E0 00 00 07 E0 00 00 07 F0 00' + '00 0F F0 00 00 0F F0 00 00 0F F0 00 00 0F F8 00' + '00 1F F8 00 00 1F F8 00 00 1F F8 00 00 1F F8 00' + '00 1F F8 00 00 3F FC 00 00 7F FF FF FF FF 28 00' + '00 00 10 00 00 00 20 00 00 00 01 00 08 00 00 00' + '00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 0C 0C 0C 00 15 15' + '15 00 1F 12 12 00 19 19 19 00 25 20 22 00 29 29' + '29 00 35 35 35 00 3E 3E 3E 00 40 40 40 00 57 57' + '57 00 6D 6D 6D 00 73 73 73 00 75 75 75 00 78 78' + '78 00 7B 7B 7B 00 7D 7D 7D 00 7F 7F 7F 00 89 7D' + '7D 00 66 8E 7A 00 86 7B 81 00 5E CA 93 00 4F D8' + 'D8 00 85 85 85 00 8C 8C 8C 00 8F 8F 8F 00 90 90' + '90 00 91 91 91 00 97 97 97 00 98 95 97 00 99 99' + '99 00 9B 9A 9B 00 9B 9B 9B 00 9F 9F 9F 00 A1 A1' + 'A1 00 A3 A3 A3 00 A5 A5 A5 00 A9 A9 A9 00 AC AC' + 'AC 00 AE AE AE 00 B2 B2 B2 00 B3 B3 B3 00 B4 B4' + 'B4 00 B6 B6 B6 00 B8 B8 B8 00 BA BA BA 00 BF BF' + 'BF 00 C1 C1 C1 00 C2 C2 C2 00 C0 C7 C4 00 C4 C4' + 'C4 00 C7 C7 C7 00 CB C9 CA 00 CA CA CA 00 CC CC' + 'CC 00 CD CD CD 00 CF CF CF 00 D4 C9 CF 00 D0 D0' + 'D0 00 D1 D1 D1 00 D2 D2 D2 00 D3 D3 D3 00 D4 D4' + 'D4 00 D5 D5 D5 00 D6 D6 D6 00 D7 D7 D7 00 D8 D8' + 'D8 00 D9 D9 D9 00 DA DA DA 00 DB DB DB 00 DF DF' + 'DF 00 E0 E0 E0 00 E1 E1 E1 00 E3 E3 E3 00 E4 E4' + 'E4 00 E6 E6 E6 00 E7 E7 E7 00 E9 E9 E9 00 EA EA' + 'EA 00 EC EC EC 00 ED ED ED 00 EF EF EF 00 F0 F0' + 'F0 00 F3 F3 F3 00 F4 F4 F4 00 F7 F7 F7 00 FC FC' + 'FC 00 00 00 00 00 A9 A9 A9 00 AA AA AA 00 AC AC' + 'AC 00 AD AD AD 00 AE AE AE 00 AF AF AF 00 B7 AF' + 'AF 00 AD B9 B3 00 B0 B0 B0 00 B1 B1 B1 00 B2 B2' + 'B2 00 B3 B3 B3 00 B4 B4 B4 00 B5 B5 B5 00 B6 B6' + 'B6 00 B7 B7 B7 00 B9 B9 B9 00 BC BC BC 00 BD BD' + 'BD 00 BE BE BE 00 BF BF BF 00 89 CF CF 00 C0 C0' + 'C0 00 C1 C1 C1 00 C2 C0 C1 00 C2 C2 C2 00 C3 C3' + 'C3 00 C4 C1 C2 00 C5 C2 C4 00 C4 C4 C4 00 C5 C5' + 'C5 00 C6 C5 C6 00 C6 C6 C6 00 C8 C3 C5 00 CC C4' + 'C8 00 C8 C8 C8 00 C9 C9 C9 00 CB C9 CA 00 CA CA' + 'CA 00 CB CB CB 00 CC CC CC 00 CD CD CD 00 CE CE' + 'CE 00 CF CF CF 00 D2 C1 CA 00 D3 C8 CD 00 D0 D0' + 'D0 00 D1 D1 D1 00 D2 D2 D2 00 D3 D3 D3 00 D4 D4' + 'D4 00 D5 D5 D5 00 D6 D6 D6 00 D7 D7 D7 00 D8 D8' + 'D8 00 D9 D9 D9 00 DA DA DA 00 DB DB DB 00 DC DC' + 'DC 00 DD DD DD 00 DE DE DE 00 DF DF DF 00 E0 E0' + 'E0 00 E1 E1 E1 00 E2 E2 E2 00 E3 E3 E3 00 E4 E4' + 'E4 00 E5 E5 E5 00 E6 E6 E6 00 E7 E7 E7 00 E8 E8' + 'E8 00 E9 E9 E9 00 EA EA EA 00 EB EB EB 00 EC EC' + 'EC 00 ED ED ED 00 EE EE EE 00 EF EF EF 00 F0 F0' + 'F0 00 F1 F1 F1 00 F2 F2 F2 00 F4 F4 F4 00 F5 F5' + 'F5 00 F6 F6 F6 00 F7 F7 F7 00 F8 F8 F8 00 F9 F9' + 'F9 00 FC FC FC 00 FD FD FD 00 FF FF FF 00 00 00' + '00 00 62 00 1A 02 40 9F 07 00 00 00 00 00 40 9F' + '07 00 05 00 00 00 BE B3 E7 77 4C 19 95 00 A3 B4' + 'E7 77 F8 00 00 00 00 00 00 C0 00 00 00 00 00 00' + '00 00 02 00 00 00 80 00 00 00 00 00 00 00 8C 1A' + '95 00 7F E9 4B 00 08 6C 0C 01 00 00 00 C0 00 00' + '00 00 80 1A 95 00 02 00 00 00 80 00 00 00 00 00' + '00 00 C0 27 95 00 C4 F5 AF 00 02 00 00 00 44 3A' + '5C 6F 73 65 78 70 65 72 74 73 5C 72 65 61 63 74' + '6F 73 5C 6C 69 62 5C 73 68 65 6C 6C 33 32 5C 6E' + '65 74 64 72 69 76 65 2E 69 63 6F 00 4B 00 14 1A' + '95 00 1F 3B D4 77 15 00 00 00 A8 00 00 00 4F 3B' + 'D4 77 E0 19 95 00 33 3B D4 77 64 C5 F5 77 A9 F1' + 'E7 77 F8 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 1A 95 00 B0 6C 38 00 96 00 00 00 00 00' + '00 00 C9 F1 E7 77 96 00 00 00 A4 1A 95 00 09 00' + '00 00 00 00 00 00 96 00 00 00 96 00 00 00 09 00' + '00 00 F4 19 95 00 33 3B D4 77 B4 1A 95 00 09 48' + 'E9 77 B8 10 E9 77 FF FF FF FF C9 F1 E7 77 16 EA' + '4B 00 F8 00 00 00 B0 6C 38 00 96 00 00 00 58 1A' + '95 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 17 17 17 17 17 17 12 16 16 12' + '17 17 17 17 17 17 00 00 00 57 57 57 57 03 03 57' + '57 57 57 57 00 00 00 00 07 2B 1A 1C 21 20 21 23' + '22 1D 13 05 00 00 00 57 2B 56 08 18 25 2A 1E 29' + '1F 31 15 14 00 00 00 57 27 55 0B 19 24 26 10 20' + '0F 34 39 0D 00 00 00 57 28 56 56 54 52 4F 51 4E' + '4E 4A 51 0E 00 00 00 57 2A 2C 2E 40 3D 3F 3F 3E' + '42 2C 33 1B 00 00 00 00 11 43 35 47 47 48 48 47' + '48 37 46 0A 00 00 00 00 09 46 43 38 38 36 36 37' + '36 43 4B 04 00 00 00 00 01 50 3B 3A 3A 3A 32 2E' + '2E 30 48 57 00 00 00 00 57 4C 3C 45 43 43 44 44' + '41 36 30 57 00 00 00 00 57 2C 4F 42 46 49 49 47' + '43 52 1B 57 00 00 00 00 57 19 43 4F 53 51 51 53' + '49 4D 0C 57 00 00 00 00 00 06 2E 30 30 30 30 30' + '2F 2D 02 00 00 00 00 00 00 00 57 57 57 57 57 57' + '57 57 00 00 00 00 FF FF 00 00 00 00 00 00 E0 03' + '00 00 C0 03 00 00 80 03 00 00 80 03 00 00 80 03' + '00 00 80 03 00 00 C0 03 00 00 C0 03 00 00 C0 03' + '00 00 C0 03 00 00 C0 03 00 00 C0 03 00 00 E0 07' + '00 00 F0 0F 00 00 28 00 00 00 20 00 00 00 40 00' + '00 00 01 00 04 00 00 00 00 00 00 02 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 80 00 00 00 00 80 00 00 80 80 00 00 00 00' + '80 00 80 00 80 00 00 80 80 00 C0 C0 C0 00 80 80' + '80 00 FF 00 00 00 00 FF 00 00 FF FF 00 00 00 00' + 'FF 00 FF 00 FF 00 00 FF FF 00 FF FF FF 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 06 60 00 00 00 00 00 00 00 77 77' + '77 77 77 77 77 7E E7 77 77 77 77 77 77 77 00 00' + '00 00 00 00 00 0E E0 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 08 80 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 88 88 88 88 88 88 88 88 88 88 00 00 00 00 00' + '07 FF 77 77 77 77 77 77 77 77 67 80 00 00 00 00' + '8F FF 08 88 87 77 88 77 78 78 66 70 00 00 00 00' + '8F FF 88 88 77 77 88 77 88 77 77 70 00 00 00 00' + '8F FF 88 88 87 77 88 87 88 77 77 70 00 00 00 00' + '8F FF 88 87 77 77 88 77 88 77 77 70 00 00 00 00' + '8F FF FF FF FF FF FF FF FF 77 77 70 00 00 00 00' + '8F FF FF FF FF FF FF FF FF FF FF 70 00 00 00 00' + '8F 77 77 77 77 77 77 77 77 77 77 F0 00 00 00 00' + '8F 77 77 77 77 77 77 77 77 77 77 F0 00 00 00 00' + '0F 77 77 77 FF FF FF FF 77 77 77 70 00 00 00 00' + '07 77 77 FF 77 77 77 77 FF 77 7F 80 00 00 00 00' + '07 77 7F 77 77 77 77 77 77 F7 7F 80 00 00 00 00' + '08 F7 77 77 77 77 77 77 77 77 7F 00 00 00 00 00' + '08 F7 77 77 77 77 77 77 77 77 7F 00 00 00 00 00' + '00 F7 77 77 77 77 77 77 77 77 77 00 00 00 00 00' + '00 77 77 77 77 77 77 77 77 77 77 00 00 00 00 00' + '00 7F 77 77 77 77 77 77 77 77 78 00 00 00 00 00' + '00 8F F7 7F FF FF FF FF 77 7F 78 00 00 00 00 00' + '00 8F FF 77 7F FF FF F7 77 FF 70 00 00 00 00 00' + '00 07 F7 FF FF F7 7F FF FF 7F 70 00 00 00 00 00' + '00 07 77 7F FF FF FF FF F7 7F 70 00 00 00 00 00' + '00 08 FF FF FF FF FF FF FF FF 80 00 00 00 00 00' + '00 00 88 88 88 88 88 88 88 88 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF' + 'FF FF 00 00 00 00 00 00 00 00 FF FE 7F FF FF FE' + '7F FF F0 00 00 0F E0 00 00 07 E0 00 00 07 E0 00' + '00 07 E0 00 00 07 E0 00 00 07 E0 00 00 07 E0 00' + '00 07 E0 00 00 07 E0 00 00 07 E0 00 00 07 E0 00' + '00 07 E0 00 00 07 E0 00 00 07 E0 00 00 07 F0 00' + '00 0F F0 00 00 0F F0 00 00 0F F0 00 00 0F F8 00' + '00 1F F8 00 00 1F F8 00 00 1F F8 00 00 1F F8 00' + '00 1F F8 00 00 3F FC 00 00 7F FF FF FF FF 28 00' + '00 00 10 00 00 00 20 00 00 00 01 00 04 00 00 00' + '00 00 80 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 80 00 00 00 00 80' + '00 00 80 80 00 00 00 00 80 00 80 00 80 00 00 80' + '80 00 C0 C0 C0 00 80 80 80 00 FF 00 00 00 00 FF' + '00 00 FF FF 00 00 00 00 FF 00 FF 00 FF 00 00 FF' + 'FF 00 FF FF FF 00 00 00 00 00 00 00 00 00 88 88' + '88 8E E8 88 88 88 00 00 00 00 00 00 00 00 00 07' + '88 88 87 78 80 00 00 7F 08 77 87 87 88 00 00 7F' + '88 77 88 87 78 00 00 7F FF FF FF FF F8 00 00 77' + '77 77 77 77 78 00 00 87 7F FF FF F7 78 00 00 07' + '77 77 77 77 F0 00 00 0F 77 77 77 77 F0 00 00 0F' + '77 77 77 77 70 00 00 07 F7 7F FF 7F 80 00 00 08' + '7F FF FF FF 80 00 00 00 77 77 77 77 00 00 00 00' + '00 00 00 00 00 00 FF FF 00 00 00 00 00 00 E0 03' + '00 00 C0 03 00 00 80 03 00 00 80 03 00 00 80 03' + '00 00 80 03 00 00 C0 03 00 00 C0 03 00 00 C0 03' + '00 00 C0 03 00 00 C0 03 00 00 C0 03 00 00 E0 07' + '00 00 F0 0F 00 00 28 00 00 00 30 00 00 00 60 00' + '00 00 01 00 08 00 00 00 00 00 00 09 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 01 01 01 00 02 02 02 00 05 05 05 00 06 06' + '06 00 07 07 07 00 08 08 08 00 09 09 09 00 0B 0B' + '0B 00 0C 0C 0C 00 13 13 13 00 18 18 18 00 19 19' + '19 00 1A 1A 1A 00 1E 1E 1E 00 1F 1F 1F 00 20 20' + '20 00 21 21 21 00 22 22 22 00 24 24 24 00 26 26' + '26 00 27 27 27 00 28 28 28 00 29 29 29 00 2A 2A' + '2A 00 2B 2B 2B 00 2C 2C 2C 00 2D 2D 2D 00 2E 2C' + '2D 00 2F 2F 2F 00 34 34 34 00 35 35 35 00 39 39' + '39 00 3B 3B 3B 00 3D 3D 3D 00 3F 3F 3F 00 40 40' + '40 00 41 41 41 00 42 42 42 00 47 47 47 00 48 48' + '48 00 49 49 49 00 4B 4B 4B 00 4F 4F 4F 00 53 53' + '53 00 56 56 56 00 58 58 58 00 59 59 59 00 5A 5A' + '5A 00 5B 5B 5B 00 5D 5D 5D 00 5F 5F 5F 00 61 61' + '61 00 63 63 63 00 64 64 64 00 66 66 66 00 67 67' + '67 00 68 68 68 00 6A 6A 6A 00 6B 6B 6B 00 6C 6C' + '6C 00 70 70 70 00 71 71 71 00 72 72 72 00 73 73' + '73 00 74 74 74 00 75 75 75 00 76 76 76 00 77 77' + '77 00 78 78 78 00 79 79 79 00 7A 7A 7A 00 7C 7C' + '7C 00 7D 7D 7D 00 7E 7E 7E 00 7F 7F 7F 00 2F 99' + '64 00 1C A8 60 00 0A BF 61 00 20 A8 63 00 51 A7' + '7C 00 17 CE 71 00 00 DC DC 00 00 FF FF 00 6B FF' + 'FF 00 80 80 80 00 81 81 81 00 83 83 83 00 84 83' + '84 00 85 85 85 00 87 87 87 00 88 88 88 00 8A 8A' + '8A 00 8C 8C 8C 00 8D 8D 8D 00 8E 8E 8E 00 8F 8F' + '8F 00 90 90 90 00 92 92 92 00 93 93 93 00 94 94' + '94 00 97 97 97 00 98 98 98 00 99 99 99 00 9A 9A' + '9A 00 9C 9C 9C 00 9D 9D 9D 00 9F 9F 9F 00 83 AB' + '97 00 96 AB A0 00 90 AF A0 00 99 AC A2 00 95 B2' + 'A3 00 9D B3 A8 00 A0 A0 A0 00 A1 A1 A1 00 A2 A2' + 'A2 00 A3 A3 A3 00 A4 A4 A4 00 A5 A5 A5 00 A6 A6' + 'A6 00 A7 A7 A7 00 A8 A8 A8 00 A9 A9 A9 00 AA AA' + 'AA 00 AB AB AB 00 AD A8 AB 00 AB AC AC 00 AC AC' + 'AC 00 AD AD AD 00 AE AE AE 00 AF AF AF 00 B0 B0' + 'B0 00 B1 B1 B1 00 B2 B2 B2 00 B3 B3 B3 00 B3 B4' + 'B3 00 B5 B5 B5 00 B6 B6 B6 00 B7 B7 B7 00 B8 B4' + 'B6 00 B8 B8 B8 00 B9 B9 B9 00 BA BA BA 00 BB BB' + 'BB 00 BF BB BD 00 BC BC BC 00 BD BD BD 00 BE BE' + 'BE 00 BF BF BF 00 91 D6 B4 00 91 D8 B5 00 C3 BD' + 'C0 00 C2 BE C0 00 C7 BF C3 00 C0 C0 C0 00 C1 C1' + 'C1 00 C2 C2 C2 00 C3 C3 C3 00 C4 C1 C3 00 C4 C3' + 'C3 00 C4 C3 C4 00 C6 C2 C4 00 C6 C3 C4 00 C6 C3' + 'C5 00 C4 C4 C4 00 C5 C4 C4 00 C5 C5 C5 00 C7 C4' + 'C5 00 C6 C6 C6 00 C7 C7 C7 00 C8 C8 C8 00 C8 C9' + 'C9 00 C9 C9 C9 00 CA CA CA 00 CB CB CB 00 CC CC' + 'CC 00 CD CD CD 00 CE CE CE 00 CF CF CF 00 D0 D0' + 'D0 00 D1 D1 D1 00 D2 D2 D2 00 D3 D3 D3 00 D4 D4' + 'D4 00 D5 D5 D5 00 D6 D6 D6 00 D7 D7 D7 00 D8 D8' + 'D8 00 D9 D9 D9 00 DA DA DA 00 DB DB DB 00 DC DC' + 'DC 00 DD DD DD 00 DE DE DE 00 DF DF DF 00 E0 E0' + 'E0 00 E1 E1 E1 00 E2 E2 E2 00 E3 E3 E3 00 E4 E4' + 'E4 00 E5 E5 E5 00 E6 E6 E6 00 E7 E7 E7 00 E8 E8' + 'E8 00 E9 E9 E9 00 EA EA EA 00 EB EB EB 00 EC EC' + 'EC 00 ED ED ED 00 EE EE EE 00 EF EF EF 00 F0 F0' + 'F0 00 F1 F1 F1 00 F2 F2 F2 00 F3 F3 F3 00 F4 F4' + 'F4 00 F5 F5 F5 00 F6 F6 F6 00 F7 F7 F7 00 F8 F8' + 'F8 00 F9 F9 F9 00 FA FA FA 00 FC FC FC 00 FF FF' + 'FF 00 00 00 00 00 A9 F1 E7 77 F8 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 1A 95 00 B0 6C' + '38 00 96 00 00 00 00 00 00 00 C9 F1 E7 77 96 00' + '00 00 A4 1A 95 00 09 00 00 00 00 00 00 00 96 00' + '00 00 96 00 00 00 09 00 00 00 F4 19 95 00 33 3B' + 'D4 77 B4 1A 95 00 09 48 E9 77 B8 10 E9 77 FF FF' + 'FF FF C9 F1 E7 77 16 EA 4B 00 F8 00 00 00 B0 6C' + '38 00 96 00 00 00 58 1A 95 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 E1 E1' + 'E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1' + 'E1 E1 E1 E1 E1 52 52 E1 E1 E1 E1 E1 E1 E1 E1 E1' + 'E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 55 55' + '55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55' + '55 55 55 55 52 53 53 52 55 55 55 55 55 55 55 55' + '55 55 55 55 55 55 55 55 55 55 55 55 55 55 9B 9B' + '9B 9B 9B 9B 9B 9B 9B 9B 9B 9B 9B 9B 9B 9B 9B 9B' + '9B 9B 9B 9B 54 54 54 54 9B 9B 9B 9B 9B 9B 9B 9B' + '9B 9B 9B 9B 9B 9B 9B 9B 9B 9B 9B 9B 9B 9B 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 54 54 E1 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 9B 9B E1 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 9B 9B E1 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1' + 'E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1' + 'E1 E1 E1 E1 E1 E1 E1 00 00 00 00 00 00 00 00 00' + '00 00 00 E1 E1 E1 E1 11 1A 19 1A 19 19 19 19 19' + '19 19 19 19 19 19 18 18 18 18 18 18 18 18 18 19' + '19 19 1C 1C 0A E1 E1 E1 00 00 00 00 00 00 00 00' + '00 00 00 E1 E1 14 61 AE B1 AF B2 B1 B0 AF AD AA' + 'A9 A7 A5 9E 9D 9D 9E 9B 9C 95 95 92 93 8F 90 89' + '88 8C 81 7F 7E 35 07 E1 E1 00 00 00 00 00 00 00' + '00 00 E1 E1 01 5C CF CC CB B9 59 5B 62 66 74 81' + '8F 9B 9E A9 AF AE AE BA AE B7 AF BB B0 B8 AA AC' + 'A2 71 4F 4D 6E 91 2B E1 E1 00 00 00 00 00 00 00' + '00 00 E1 E1 0C AA D0 C6 CA AF 21 23 2D 3F 5A 62' + '6A 77 7A 80 8B 7B 69 93 67 8B 73 9E 75 93 66 A6' + '9A 50 51 4E 4C 98 58 01 E1 00 00 00 00 00 00 00' + '00 00 E1 E1 17 B5 CE C8 CB B1 27 33 46 5A 60 65' + '72 79 7C 82 8E 76 61 8D 5C 83 64 95 65 8B 5B A0' + 'A4 70 96 97 6C 9F 5F 01 E1 00 00 00 00 00 00 00' + '00 00 E1 E1 16 B5 D0 CA CB B5 39 41 4A 59 5F 65' + '72 79 7C 82 8F 6B 57 87 48 7A 5A 90 5C 86 46 9D' + 'A5 A3 6F 6D 99 A5 5E 01 E1 00 00 00 00 00 00 00' + '00 00 E1 E1 16 B5 D2 CB CC BA 3D 3E 49 59 5F 65' + '72 79 7C 82 90 66 40 81 3A 72 45 8B 48 7D 38 9D' + 'A9 A1 A8 A2 95 A7 5E 01 E1 00 00 00 00 00 00 00' + '00 00 E1 E1 15 B5 D3 CD CF BA 3A 3C 45 56 5C 63' + '69 75 78 7D 8E 61 37 77 31 66 3B 85 3D 76 2E 9C' + 'AB A7 9E 9D 9C A9 5F 01 E1 00 00 00 00 00 00 00' + '00 00 E1 E1 15 B6 D6 CF CE C3 79 79 7D 82 84 87' + '8A 8E 8E 8F 93 8B 85 94 83 8F 85 94 84 8F 7D A7' + 'AB A9 A5 9E 9D AD 5F E1 E1 00 00 00 00 00 00 00' + '00 00 E1 E1 14 B7 D7 CF CF CE D1 CF CD CC CA C8' + 'C6 C5 C3 C2 BF BF C0 BC BD BA BA B6 B6 B3 B4 AF' + 'AE AD AA A5 9B AE 5F E1 E1 00 00 00 00 00 00 00' + '00 00 E1 E1 14 B7 DB DC DA DA DA D9 D9 D8 D8 D7' + 'D7 D7 D6 D6 D5 D5 D5 D4 D4 D4 D3 D3 D2 D2 D1 D1' + 'D1 D0 D0 CF C4 B4 5E E1 E1 00 00 00 00 00 00 00' + '00 00 E1 E1 13 BA E0 CD C5 C6 C6 C4 C3 C3 C3 C3' + 'C3 C4 C4 C4 C4 C4 C4 C4 C4 C4 C4 C4 C4 C4 C4 C4' + 'C6 C7 C7 C7 DC D3 5D E1 E1 00 00 00 00 00 00 00' + '00 00 E1 E1 13 C2 DC BD A5 90 95 BC BE BD BD BD' + 'BD BD BD BD BD BD BD BD BD BD BD BD BD BD BD BF' + 'B3 92 90 B5 C2 E0 68 E1 E1 00 00 00 00 00 00 00' + '00 00 E1 E1 0F BE D7 A9 7B 8B 84 9E BE BC BC BC' + 'BC BC BB BB BB BB BB BB BB BB BC BC BC BC BD B6' + '7A 8A 85 89 BC DF 69 E1 E1 00 00 00 00 00 00 00' + '00 00 E1 E1 03 9D DA 92 86 9E 7D 90 BC B9 B9 B9' + 'B8 B7 B7 B9 BB BC BC BB B9 B7 B7 B7 B8 B9 BB AD' + '78 9E 87 81 BA D9 43 E1 E1 00 00 00 00 00 00 00' + '00 00 00 E1 E1 76 D8 B3 A7 B6 95 AD B7 B6 B4 B7' + 'C1 C5 C7 CA CE D1 D1 CF CB C8 C6 C2 B8 B4 B6 B7' + 'A7 B4 9D 95 BD CC 2D E1 E1 00 00 00 00 00 00 00' + '00 00 00 E1 E1 4A D3 B5 B3 AF B3 B5 B2 B3 C3 D4' + 'D0 C5 C2 C1 C0 BF BF C0 C1 C2 C5 D0 D5 C5 B5 B2' + 'B4 AF B2 B5 BD B8 23 E1 E1 00 00 00 00 00 00 00' + '00 00 00 E1 E1 2F CD B4 B1 B1 B1 AE BA D1 CA C0' + 'B8 B9 BA BA BA BA BA BA BA BA B9 B9 BF C8 D1 BE' + 'AE B1 B1 AF C3 8D 12 E1 E1 00 00 00 00 00 00 00' + '00 00 00 E1 E1 24 BB B6 AE AF AE B8 CD C0 B4 B5' + 'B6 B6 B6 B6 B6 B6 B6 B6 B6 B6 B6 B6 B5 B4 BC CE' + 'BC AD AE AD C4 72 06 E1 E1 00 00 00 00 00 00 00' + '00 00 00 E1 E1 12 8B BF AE AF B2 C8 B8 B3 B5 B4' + 'B4 B4 B4 B3 B1 B2 B2 B2 B2 B2 B2 B2 B2 B2 B0 B4' + 'C6 B3 AA AD C6 55 E1 E1 E1 00 00 00 00 00 00 00' + '00 00 00 E1 E1 05 6B C1 B0 B1 BF BA B2 B4 B4 B4' + 'B4 B4 B4 B3 B0 AD AE AE AE AE AE AE AE AE AE AB' + 'B3 BE AA AD C6 30 E1 E1 E1 00 00 00 00 00 00 00' + '00 00 00 00 E1 E1 57 C1 B3 B5 BF B5 B4 B4 B4 B4' + 'B4 B4 B4 B4 B3 AD A7 A9 A9 A9 A9 A9 A9 A9 A9 A9' + 'AA B7 AB AD C2 26 E1 E1 00 00 00 00 00 00 00 00' + '00 00 00 00 E1 E1 33 C0 B5 B6 B8 B5 B5 B5 B5 B5' + 'B5 B5 B5 B5 B5 B4 AB 9E 9E 9E A5 A5 A5 A5 A5 A5' + 'A5 AA A7 AF B0 1B E1 E1 00 00 00 00 00 00 00 00' + '00 00 00 00 E1 E1 25 BC B8 B6 B4 B7 B7 B7 B7 B7' + 'B7 B7 B7 B7 B7 B7 B7 B1 AA A5 9D 9C 9B 9C 9C 9C' + '9D 95 9B B2 86 0D E1 E1 00 00 00 00 00 00 00 00' + '00 00 00 00 E1 E1 1A B0 BA B9 B0 B9 BA BA BA BA' + 'BA BA BA BA BA BA BA BB BA B9 B7 B3 B0 AD A9 A5' + '9D 87 93 B4 67 07 E1 E1 00 00 00 00 00 00 00 00' + '00 00 00 00 E1 E1 0B 84 BF BF B4 B6 BF BD BE BE' + 'BE BE BE BE BE BE BE BE BE BE BE BF BF BE BD BD' + 'B3 A7 B0 AE 47 02 E1 E1 00 00 00 00 00 00 00 00' + '00 00 00 00 E1 E1 06 65 C0 C3 C0 B2 BA C2 C1 C1' + 'C1 C1 C1 C1 C1 C1 C1 C1 C1 C1 C1 C1 C1 C1 C2 BC' + 'B2 C1 C0 A9 2C E1 E1 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 E1 E1 44 B7 C6 C5 C2 B2 BB C5 C6' + 'C4 C4 C4 C4 C4 C4 C4 C4 C4 C4 C4 C4 C5 C5 BD B1' + 'BE C7 BD 90 20 E1 E1 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 E1 E1 2A AD C9 C7 C8 C5 BB B6 BE' + 'C8 C9 C8 C8 C8 C8 C8 C8 C8 C8 C9 C9 C0 B6 BA C4' + 'C8 CA BA 7A 10 E1 E1 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 E1 E1 1F 93 CA CA CA CB CB C3 B6' + 'B7 C2 C7 C7 C8 C8 C8 C8 C7 C7 C2 B8 B5 C1 CB CB' + 'CA CC B8 68 08 E1 E1 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 E1 E1 0E 7D C8 D1 CB CA D0 CF CE' + 'C8 C4 C3 C3 C1 C0 C0 C1 C3 C3 C3 C6 CD D0 CE C9' + 'CF CF BA 5C E1 E1 E1 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 E1 E1 06 67 C8 C3 93 9C BA D0 D1' + 'D1 D2 D2 D1 D0 CF CF D0 D1 D2 D2 D1 D2 C8 9D 94' + 'B5 D0 B8 42 E1 E1 E1 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 E1 E1 5E C4 A5 86 8D 86 CF D5' + 'D4 D4 D4 D4 D4 D4 D4 D4 D4 D4 D4 D4 D7 B9 84 8A' + '8B CF B1 34 E1 E1 E1 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 E1 E1 36 B2 C1 C0 B9 C8 DD DD' + 'DD DD DD DD DD DD DD DD DD DD DD DD DE D6 C3 BC' + 'C0 BB 84 1E E1 E1 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 E1 E1 0C 55 94 B7 BB BF BC BC' + 'BC BC BC BC BC BC BC BC BC BC BC BC BC BD BD BB' + 'B1 84 32 04 E1 E1 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 E1 E1 E1 09 22 29 28 28 28 28' + '28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 29' + '29 1D 02 E1 E1 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 E1 E1 E1 E1 E1 E1 E1 E1 E1' + 'E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1' + 'E1 E1 E1 E1 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 E1 E1 E1 E1 E1 E1 E1' + 'E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1 E1' + 'E1 E1 E1 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF' + 'FF FF FF FF 00 00 FF FF FF FF FF FF 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 FF FF FE 3F FF FF 00 00 FF FF' + 'FE 3F FF FF 00 00 FF FF FE 3F FF FF 00 00 FC 00' + '00 00 00 7F 00 00 F8 00 00 00 00 3F 00 00 F8 00' + '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F0 00' + '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F0 00' + '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F0 00' + '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F0 00' + '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F0 00' + '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F0 00' + '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F8 00' + '00 00 00 1F 00 00 F8 00 00 00 00 1F 00 00 F8 00' + '00 00 00 1F 00 00 F8 00 00 00 00 1F 00 00 F8 00' + '00 00 00 1F 00 00 F8 00 00 00 00 1F 00 00 FC 00' + '00 00 00 3F 00 00 FC 00 00 00 00 3F 00 00 FC 00' + '00 00 00 3F 00 00 FC 00 00 00 00 3F 00 00 FC 00' + '00 00 00 3F 00 00 FC 00 00 00 00 7F 00 00 FE 00' + '00 00 00 7F 00 00 FE 00 00 00 00 7F 00 00 FE 00' + '00 00 00 7F 00 00 FE 00 00 00 00 7F 00 00 FE 00' + '00 00 00 7F 00 00 FF 00 00 00 00 7F 00 00 FF 00' + '00 00 00 FF 00 00 FF 00 00 00 00 FF 00 00 FF 00' + '00 00 01 FF 00 00 FF 80 00 00 03 FF 00 00 FF E0' + '00 00 07 FF 00 00 FF FF FF FF FF FF 00 00 28 00' + '00 00 30 00 00 00 60 00 00 00 01 00 04 00 00 00' + '00 00 80 04 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 80 00 00 00 00 80' + '00 00 80 80 00 00 00 00 80 00 80 00 80 00 00 80' + '80 00 C0 C0 C0 00 80 80 80 00 FF 00 00 00 00 FF' + '00 00 FF FF 00 00 00 00 FF 00 FF 00 FF 00 00 FF' + 'FF 00 FF FF FF 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 0E E0 00 00 00 00 00 00 00 00 00 00 00 88 88' + '88 88 88 88 88 88 88 88 88 EE EE 88 88 88 88 88' + '88 88 88 88 88 88 77 77 77 77 77 77 77 77 77 77' + '77 EE EE 77 77 77 77 77 77 77 77 77 77 77 00 00' + '00 00 00 00 00 00 00 00 00 0E E0 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 07 70 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 07 70 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 87 77 77 77 77 77' + '77 77 77 77 77 77 77 77 77 78 00 00 00 00 00 00' + '00 08 FF F7 88 88 77 77 77 77 77 77 77 77 77 77' + '66 87 80 00 00 00 00 00 00 07 FF F7 00 88 88 87' + '77 77 87 87 77 77 87 78 66 67 80 00 00 00 00 00' + '00 07 FF F7 88 88 88 77 77 77 87 87 87 87 87 77' + '77 87 80 00 00 00 00 00 00 07 FF F7 88 88 88 77' + '77 78 87 87 87 87 87 77 77 77 80 00 00 00 00 00' + '00 07 FF F7 88 88 88 77 77 78 87 87 87 87 87 77' + '77 77 80 00 00 00 00 00 00 07 FF F7 88 88 88 87' + '77 78 87 88 87 87 87 77 77 77 80 00 00 00 00 00' + '00 07 FF F7 77 77 77 77 77 77 77 77 77 77 77 77' + '77 77 80 00 00 00 00 00 00 07 FF FF FF FF FF FF' + '77 77 77 77 77 77 77 77 77 77 80 00 00 00 00 00' + '00 07 FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF F7 80 00 00 00 00 00 00 07 FF FF FF 77 77 7F' + 'FF FF FF FF FF FF FF FF FF FF 80 00 00 00 00 00' + '00 07 F7 77 77 77 77 77 77 77 77 77 77 77 77 77' + '77 7F 80 00 00 00 00 00 00 07 F7 77 77 77 77 77' + '77 77 77 77 77 77 77 77 77 7F 80 00 00 00 00 00' + '00 07 F7 77 77 77 77 77 77 77 77 77 77 77 77 77' + '77 7F 80 00 00 00 00 00 00 07 F7 77 77 77 77 7F' + 'FF FF FF FF F7 77 77 77 77 7F 80 00 00 00 00 00' + '00 08 F7 77 77 77 7F FF 77 77 77 77 FF FF 77 77' + '77 77 00 00 00 00 00 00 00 08 F7 77 77 7F F7 77' + '77 77 77 77 77 7F F7 77 77 77 00 00 00 00 00 00' + '00 00 77 77 77 F7 77 77 77 77 77 77 77 77 7F 77' + '77 F7 00 00 00 00 00 00 00 00 77 77 7F 77 77 77' + '77 77 77 77 77 77 77 F7 77 F8 00 00 00 00 00 00' + '00 00 87 77 77 77 77 77 77 77 77 77 77 77 77 77' + '77 F8 00 00 00 00 00 00 00 00 87 77 77 77 77 77' + '77 77 77 77 77 77 77 77 77 78 00 00 00 00 00 00' + '00 00 87 77 77 77 77 77 77 77 77 77 77 77 77 77' + '77 70 00 00 00 00 00 00 00 00 87 77 77 77 77 77' + '77 77 77 77 77 77 77 77 77 70 00 00 00 00 00 00' + '00 00 07 77 77 77 77 77 77 77 77 77 77 77 77 77' + '77 80 00 00 00 00 00 00 00 00 07 77 77 77 77 77' + '77 77 77 77 77 77 77 77 77 80 00 00 00 00 00 00' + '00 00 08 77 77 77 77 77 77 77 77 77 77 77 77 77' + '77 80 00 00 00 00 00 00 00 00 08 7F F7 77 77 77' + '77 77 77 77 77 77 77 7F 77 00 00 00 00 00 00 00' + '00 00 08 7F FF F7 77 77 77 77 77 77 77 77 7F FF' + '77 00 00 00 00 00 00 00 00 00 00 7F FF FF 77 77' + '77 77 77 77 77 77 FF FF 78 00 00 00 00 00 00 00' + '00 00 00 7F FF FF FF FF 77 77 77 77 7F FF FF FF' + '78 00 00 00 00 00 00 00 00 00 00 8F 77 77 FF FF' + 'FF FF FF FF FF FF 77 7F 78 00 00 00 00 00 00 00' + '00 00 00 8F 77 77 FF FF FF FF FF FF FF F7 77 7F' + '78 00 00 00 00 00 00 00 00 00 00 87 77 7F FF FF' + 'FF FF FF FF FF FF 77 77 70 00 00 00 00 00 00 00' + '00 00 00 08 77 77 77 77 77 77 77 77 77 77 77 77' + '80 00 00 00 00 00 00 00 00 00 00 00 08 88 88 88' + '88 88 88 88 88 88 88 80 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 FF FF FF FF FF FF 00 00 FF FF' + 'FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF' + 'FE 3F FF FF 00 00 FF FF FE 3F FF FF 00 00 FF FF' + 'FE 3F FF FF 00 00 FC 00 00 00 00 7F 00 00 F8 00' + '00 00 00 3F 00 00 F8 00 00 00 00 1F 00 00 F0 00' + '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F0 00' + '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F0 00' + '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F0 00' + '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F0 00' + '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F0 00' + '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F0 00' + '00 00 00 1F 00 00 F8 00 00 00 00 1F 00 00 F8 00' + '00 00 00 1F 00 00 F8 00 00 00 00 1F 00 00 F8 00' + '00 00 00 1F 00 00 F8 00 00 00 00 1F 00 00 F8 00' + '00 00 00 1F 00 00 FC 00 00 00 00 3F 00 00 FC 00' + '00 00 00 3F 00 00 FC 00 00 00 00 3F 00 00 FC 00' + '00 00 00 3F 00 00 FC 00 00 00 00 3F 00 00 FC 00' + '00 00 00 7F 00 00 FE 00 00 00 00 7F 00 00 FE 00' + '00 00 00 7F 00 00 FE 00 00 00 00 7F 00 00 FE 00' + '00 00 00 7F 00 00 FE 00 00 00 00 7F 00 00 FF 00' + '00 00 00 7F 00 00 FF 00 00 00 00 FF 00 00 FF 00' + '00 00 00 FF 00 00 FF 00 00 00 01 FF 00 00 FF 80' + '00 00 03 FF 00 00 FF E0 00 00 07 FF 00 00 FF FF' + 'FF FF FF FF 00 00 28 00 00 00 30 00 00 00 60 00' + '00 00 01 00 20 00 00 00 00 00 00 24 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 30 00 00 00 30 00 00 00 30 00 00 00 30 00 00' + '00 30 00 00 00 30 00 00 00 30 00 00 00 30 00 00' + '00 30 00 00 00 30 00 00 00 30 00 00 00 30 00 00' + '00 30 00 00 00 30 00 00 00 30 00 00 00 30 00 00' + '00 30 00 00 00 30 00 00 00 30 00 00 00 30 00 00' + '00 30 00 00 00 30 00 00 00 30 00 00 00 48 00 00' + '00 78 00 00 00 78 00 00 00 48 00 00 00 30 00 00' + '00 30 00 00 00 30 00 00 00 30 00 00 00 30 00 00' + '00 30 00 00 00 30 00 00 00 30 00 00 00 30 00 00' + '00 30 00 00 00 30 00 00 00 30 00 00 00 30 00 00' + '00 30 00 00 00 30 00 00 00 30 00 00 00 30 00 00' + '00 30 00 00 00 30 00 00 00 30 00 00 00 30 00 00' + '00 90 00 00 00 90 00 00 00 90 00 00 00 90 00 00' + '00 90 00 00 00 90 00 00 00 90 00 00 00 90 00 00' + '00 90 00 00 00 90 00 00 00 90 00 00 00 90 00 00' + '00 90 00 00 00 90 00 00 00 90 00 00 00 90 00 00' + '00 90 00 00 00 90 00 00 00 90 00 00 00 90 00 00' + '00 90 00 00 00 90 00 00 00 90 00 DC DC FF 00 DC' + 'DC FF 00 00 00 B4 00 00 00 9C 00 00 00 90 00 00' + '00 90 00 00 00 90 00 00 00 90 00 00 00 90 00 00' + '00 90 00 00 00 90 00 00 00 90 00 00 00 90 00 00' + '00 90 00 00 00 90 00 00 00 90 00 00 00 90 00 00' + '00 90 00 00 00 90 00 00 00 90 00 00 00 90 00 00' + '00 90 00 00 00 90 00 00 00 90 00 00 00 90 80 80' + '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' + '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' + '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' + '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' + '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' + '80 FF 80 80 80 FF 00 DC DC FF 00 FF FF FF 00 FF' + 'FF FF 00 DC DC FF 80 80 80 FF 80 80 80 FF 80 80' + '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' + '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' + '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' + '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' + '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF C0 C0' + 'C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0' + 'C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0' + 'C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0' + 'C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0' + 'C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0' + 'C0 FF C0 C0 C0 FF 6B FF FF FF 6B FF FF FF 6B FF' + 'FF FF 6B FF FF FF C0 C0 C0 FF C0 C0 C0 FF C0 C0' + 'C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0' + 'C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0' + 'C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0' + 'C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0' + 'C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0 C0 FF 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 6B FF FF FF 6B FF' + 'FF FF 00 00 00 90 00 00 00 30 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 C0 C0 C0 FF C0 C0' + 'C0 FF 00 00 00 92 00 00 00 37 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 16 00 00 00 34 00 00 00 37 00 00 00 37 00 00' + '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' + '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' + '00 37 00 00 00 37 00 00 00 37 C0 C0 C0 FF C0 C0' + 'C0 FF 00 00 00 37 00 00 00 37 00 00 00 37 00 00' + '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' + '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' + '00 37 00 00 00 37 00 00 00 35 00 00 00 18 00 00' + '00 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 05 00 00 00 69 00 00' + '00 C5 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' + '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' + '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' + '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' + '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' + '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' + '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' + '00 F7 00 00 00 F7 00 00 00 F1 00 00 00 B1 00 00' + '00 5C 00 00 00 0D 00 00 00 01 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 05 00 00 00 9B 00 00 00 FF 00 00' + '00 FF 21 21 21 FF 2C 2C 2C FF 2B 2B 2B FF 2C 2C' + '2C FF 2B 2B 2B FF 2B 2B 2B FF 2B 2B 2B FF 2B 2B' + '2B FF 2B 2B 2B FF 2B 2B 2B FF 2B 2B 2B FF 2B 2B' + '2B FF 2B 2B 2B FF 2B 2B 2B FF 2B 2B 2B FF 2A 2A' + '2A FF 2A 2A 2A FF 2A 2A 2A FF 2A 2A 2A FF 2A 2A' + '2A FF 2A 2A 2A FF 2A 2A 2A FF 2A 2A 2A FF 2A 2A' + '2A FF 2B 2B 2B FF 2B 2B 2B FF 2B 2B 2B FF 2E 2C' + '2D FF 2E 2C 2D FF 13 13 13 FF 00 00 00 FF 00 00' + '00 F6 00 00 00 69 00 00 00 09 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 54 00 00 00 FF 26 26 26 FF 90 90' + '90 FF CA CA CA FF CD CD CD FF CB CB CB FF CE CE' + 'CE FF CD CD CD FF CC CC CC FF CB CB CB FF C9 C9' + 'C9 FF C7 C7 C7 FF C6 C6 C6 FF C5 C5 C5 FF C4 C4' + 'C4 FF C3 C3 C3 FF C2 C2 C2 FF C2 C2 C2 FF C3 C3' + 'C3 FF C0 C0 C0 FF C1 C1 C1 FF BF BF BF FF BF BF' + 'BF FF BC BC BC FF BD BD BD FF BA BA BA FF BB BB' + 'BB FF B5 B5 B5 FF B3 B4 B3 FF B8 B4 B6 FF AD AD' + 'AD FF AB AC AC FF AD A8 AB FF 63 63 63 FF 09 09' + '09 FF 00 00 00 EF 00 00 00 42 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 03 00 00 00 AD 01 01 01 FF 8A 8A 8A FF EB EB' + 'EB FF E8 E8 E8 FF E7 E7 E7 FF D5 D5 D5 FF 85 85' + '85 FF 88 88 88 FF 92 92 92 FF 98 98 98 FF A2 A2' + 'A2 FF AD AD AD FF BA BA BA FF C0 C0 C0 FF C3 C3' + 'C3 FF C6 C6 C6 FF CB CB CB FF CA CA CA FF CA CA' + 'CA FF D6 D6 D6 FF CA CA CA FF D3 D3 D3 FF CB CB' + 'CB FF D7 D7 D7 FF CC CC CC FF D4 D4 D4 FF C7 C7' + 'C7 FF C8 C9 C9 FF C6 C2 C4 FF 9D B3 A8 FF 20 A8' + '63 FF 1C A8 60 FF 90 AF A0 FF BF BB BD FF 4F 4F' + '4F FF 00 00 00 FF 00 00 00 81 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 15 00 00 00 F0 19 19 19 FF C7 C7 C7 FF EC EC' + 'EC FF E2 E2 E2 FF E6 E6 E6 FF CB CB CB FF 3B 3B' + '3B FF 3F 3F 3F FF 56 56 56 FF 72 72 72 FF 87 87' + '87 FF 92 92 92 FF 9D 9D 9D FF A5 A5 A5 FF A8 A8' + 'A8 FF AC AC AC FF B7 B7 B7 FF A9 A9 A9 FF 9C 9C' + '9C FF BD BD BD FF 99 99 99 FF B7 B7 B7 FF A1 A1' + 'A1 FF C3 C3 C3 FF A3 A3 A3 FF BD BD BD FF 98 98' + '98 FF C5 C4 C4 FF C7 BF C3 FF 51 A7 7C FF 17 CE' + '71 FF 0A BF 61 FF 2F 99 64 FF C3 BD C0 FF 84 83' + '84 FF 01 01 01 FF 00 00 00 A3 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 30 00 00 00 FA 29 29 29 FF D1 D1 D1 FF EA EA' + 'EA FF E4 E4 E4 FF E7 E7 E7 FF CD CD CD FF 47 47' + '47 FF 5F 5F 5F FF 79 79 79 FF 87 87 87 FF 8F 8F' + '8F FF 97 97 97 FF A0 A0 A0 FF A7 A7 A7 FF AA AA' + 'AA FF AE AE AE FF B9 B9 B9 FF A4 A4 A4 FF 90 90' + '90 FF B8 B8 B8 FF 8A 8A 8A FF AF AF AF FF 94 94' + '94 FF BF BF BF FF 97 97 97 FF B7 B7 B7 FF 88 88' + '88 FF C4 C3 C3 FF C6 C3 C5 FF 95 B2 A3 FF 91 D6' + 'B4 FF 91 D8 B5 FF 83 AB 97 FF C4 C1 C3 FF 8E 8E' + '8E FF 01 01 01 FF 00 00 00 B7 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 34 00 00 00 F9 28 28 28 FF D1 D1 D1 FF EC EC' + 'EC FF E6 E6 E6 FF E7 E7 E7 FF D1 D1 D1 FF 68 68' + '68 FF 74 74 74 FF 7E 7E 7E FF 85 85 85 FF 8E 8E' + '8E FF 97 97 97 FF A0 A0 A0 FF A7 A7 A7 FF AA AA' + 'AA FF AE AE AE FF BA BA BA FF 9F 9F 9F FF 83 83' + '83 FF B3 B3 B3 FF 7C 7C 7C FF A8 A8 A8 FF 87 87' + '87 FF BB BB BB FF 8A 8A 8A FF B2 B2 B2 FF 79 79' + '79 FF C2 C2 C2 FF C4 C4 C4 FF C6 C3 C4 FF 99 AC' + 'A2 FF 96 AB A0 FF C2 BE C0 FF C4 C4 C4 FF 8D 8D' + '8D FF 01 01 01 FF 00 00 00 BA 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 33 00 00 00 F9 28 28 28 FF D1 D1 D1 FF EE EE' + 'EE FF E7 E7 E7 FF E8 E8 E8 FF D6 D6 D6 FF 70 70' + '70 FF 71 71 71 FF 7D 7D 7D FF 85 85 85 FF 8E 8E' + '8E FF 97 97 97 FF A0 A0 A0 FF A7 A7 A7 FF AA AA' + 'AA FF AE AE AE FF BB BB BB FF 98 98 98 FF 73 73' + '73 FF AD AD AD FF 6A 6A 6A FF A0 A0 A0 FF 78 78' + '78 FF B7 B7 B7 FF 7C 7C 7C FF AB AB AB FF 67 67' + '67 FF C2 C2 C2 FF C6 C6 C6 FF C4 C3 C4 FF C7 C4' + 'C5 FF C6 C2 C4 FF BF BF BF FF C5 C5 C5 FF 8D 8D' + '8D FF 01 01 01 FF 00 00 00 B9 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 33 00 00 00 F9 27 27 27 FF D1 D1 D1 FF EF EF' + 'EF FF E9 E9 E9 FF EB EB EB FF D6 D6 D6 FF 6A 6A' + '6A FF 6C 6C 6C FF 78 78 78 FF 81 81 81 FF 8A 8A' + '8A FF 93 93 93 FF 9C 9C 9C FF A3 A3 A3 FF A6 A6' + 'A6 FF AB AB AB FF B9 B9 B9 FF 90 90 90 FF 66 66' + '66 FF A5 A5 A5 FF 5B 5B 5B FF 98 98 98 FF 6B 6B' + '6B FF B1 B1 B1 FF 70 70 70 FF A4 A4 A4 FF 58 58' + '58 FF C1 C1 C1 FF C8 C8 C8 FF C5 C5 C5 FF C3 C3' + 'C3 FF C2 C2 C2 FF C1 C1 C1 FF C6 C6 C6 FF 8E 8E' + '8E FF 01 01 01 FF 00 00 00 B9 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 33 00 00 00 F9 27 27 27 FF D2 D2 D2 FF F2 F2' + 'F2 FF EB EB EB FF EA EA EA FF DF DF DF FF A7 A7' + 'A7 FF A7 A7 A7 FF AB AB AB FF AE AE AE FF B0 B0' + 'B0 FF B3 B3 B3 FF B6 B6 B6 FF B9 B9 B9 FF B9 B9' + 'B9 FF BA BA BA FF BD BD BD FF B7 B7 B7 FF B1 B1' + 'B1 FF BE BE BE FF AF AF AF FF BA BA BA FF B1 B1' + 'B1 FF BE BE BE FF B0 B0 B0 FF BA BA BA FF AB AB' + 'AB FF C5 C5 C5 FF C8 C8 C8 FF C6 C6 C6 FF C4 C4' + 'C4 FF C3 C3 C3 FF C2 C2 C2 FF C9 C9 C9 FF 8E 8E' + '8E FF 00 00 00 FF 00 00 00 B9 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 33 00 00 00 F9 26 26 26 FF D3 D3 D3 FF F3 F3' + 'F3 FF EB EB EB FF EB EB EB FF EA EA EA FF ED ED' + 'ED FF EB EB EB FF E9 E9 E9 FF E8 E8 E8 FF E6 E6' + 'E6 FF E4 E4 E4 FF E2 E2 E2 FF E1 E1 E1 FF DF DF' + 'DF FF DE DE DE FF DB DB DB FF DB DB DB FF DC DC' + 'DC FF D8 D8 D8 FF D9 D9 D9 FF D6 D6 D6 FF D6 D6' + 'D6 FF D2 D2 D2 FF D2 D2 D2 FF CF CF CF FF D0 D0' + 'D0 FF CB CB CB FF CA CA CA FF C9 C9 C9 FF C7 C7' + 'C7 FF C4 C4 C4 FF C0 C0 C0 FF CA CA CA FF 8E 8E' + '8E FF 00 00 00 FF 00 00 00 B9 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 33 00 00 00 F9 26 26 26 FF D3 D3 D3 FF F7 F7' + 'F7 FF F8 F8 F8 FF F6 F6 F6 FF F6 F6 F6 FF F6 F6' + 'F6 FF F5 F5 F5 FF F5 F5 F5 FF F4 F4 F4 FF F4 F4' + 'F4 FF F3 F3 F3 FF F3 F3 F3 FF F3 F3 F3 FF F2 F2' + 'F2 FF F2 F2 F2 FF F1 F1 F1 FF F1 F1 F1 FF F1 F1' + 'F1 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0 F0 FF EF EF' + 'EF FF EF EF EF FF EE EE EE FF EE EE EE FF ED ED' + 'ED FF ED ED ED FF ED ED ED FF EC EC EC FF EC EC' + 'EC FF EB EB EB FF E0 E0 E0 FF D0 D0 D0 FF 8D 8D' + '8D FF 00 00 00 FF 00 00 00 B9 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 33 00 00 00 F9 24 24 24 FF D6 D6 D6 FF FF FF' + 'FF FF E9 E9 E9 FF E1 E1 E1 FF E2 E2 E2 FF E2 E2' + 'E2 FF E0 E0 E0 FF DF DF DF FF DF DF DF FF DF DF' + 'DF FF DF DF DF FF DF DF DF FF E0 E0 E0 FF E0 E0' + 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' + 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' + 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' + 'E0 FF E0 E0 E0 FF E2 E2 E2 FF E3 E3 E3 FF E3 E3' + 'E3 FF E3 E3 E3 FF F8 F8 F8 FF EF EF EF FF 8C 8C' + '8C FF 00 00 00 FF 00 00 00 B9 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 34 00 00 00 FA 24 24 24 FF DE DE DE FF F8 F8' + 'F8 FF D9 D9 D9 FF C4 C4 C4 FF BB BB BB FF BF BF' + 'BF FF D8 D8 D8 FF DA DA DA FF D9 D9 D9 FF D9 D9' + 'D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9' + 'D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9' + 'D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9' + 'D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9' + 'D9 FF DB DB DB FF CF CF CF FF BC BC BC FF BB BB' + 'BB FF D1 D1 D1 FF DE DE DE FF FF FF FF FF 9A 9A' + '9A FF 00 00 00 FF 00 00 00 BA 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 25 00 00 00 F7 1F 1F 1F FF DA DA DA FF F3 F3' + 'F3 FF C6 C6 C6 FF A9 A9 A9 FF B7 B7 B7 FF B0 B0' + 'B0 FF C3 C3 C3 FF DA DA DA FF D8 D8 D8 FF D8 D8' + 'D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8 D8 FF D7 D7' + 'D7 FF D7 D7 D7 FF D7 D7 D7 FF D7 D7 D7 FF D7 D7' + 'D7 FF D7 D7 D7 FF D7 D7 D7 FF D7 D7 D7 FF D8 D8' + 'D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8 D8 FF D9 D9' + 'D9 FF D2 D2 D2 FF A8 A8 A8 FF B6 B6 B6 FF B1 B1' + 'B1 FF B5 B5 B5 FF D8 D8 D8 FF FC FC FC FF 9C 9C' + '9C FF 00 00 00 FF 00 00 00 AE 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 07 00 00 00 D0 05 05 05 FF C2 C2 C2 FF F6 F6' + 'F6 FF BC BC BC FF B2 B2 B2 FF C3 C3 C3 FF AB AB' + 'AB FF BB BB BB FF D8 D8 D8 FF D5 D5 D5 FF D5 D5' + 'D5 FF D5 D5 D5 FF D4 D4 D4 FF D3 D3 D3 FF D3 D3' + 'D3 FF D5 D5 D5 FF D7 D7 D7 FF D8 D8 D8 FF D8 D8' + 'D8 FF D7 D7 D7 FF D5 D5 D5 FF D3 D3 D3 FF D3 D3' + 'D3 FF D3 D3 D3 FF D4 D4 D4 FF D5 D5 D5 FF D7 D7' + 'D7 FF C9 C9 C9 FF A6 A6 A6 FF C3 C3 C3 FF B3 B3' + 'B3 FF AD AD AD FF D6 D6 D6 FF F5 F5 F5 FF 76 76' + '76 FF 00 00 00 FF 00 00 00 8C 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 9C 00 00 00 FF A4 A4 A4 FF F4 F4' + 'F4 FF CF CF CF FF C5 C5 C5 FF D2 D2 D2 FF BF BF' + 'BF FF C9 C9 C9 FF D3 D3 D3 FF D2 D2 D2 FF D0 D0' + 'D0 FF D3 D3 D3 FF DD DD DD FF E1 E1 E1 FF E3 E3' + 'E3 FF E6 E6 E6 FF EA EA EA FF ED ED ED FF ED ED' + 'ED FF EB EB EB FF E7 E7 E7 FF E4 E4 E4 FF E2 E2' + 'E2 FF DE DE DE FF D4 D4 D4 FF D0 D0 D0 FF D2 D2' + 'D2 FF D3 D3 D3 FF C5 C5 C5 FF D0 D0 D0 FF C2 C2' + 'C2 FF BF BF BF FF D9 D9 D9 FF E8 E8 E8 FF 56 56' + '56 FF 00 00 00 FF 00 00 00 72 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 73 00 00 00 FF 7E 7E 7E FF EF EF' + 'EF FF D1 D1 D1 FF CF CF CF FF CB CB CB FF CF CF' + 'CF FF D1 D1 D1 FF CE CE CE FF CF CF CF FF DF DF' + 'DF FF F0 F0 F0 FF EC EC EC FF E1 E1 E1 FF DE DE' + 'DE FF DD DD DD FF DC DC DC FF DB DB DB FF DB DB' + 'DB FF DC DC DC FF DD DD DD FF DE DE DE FF E1 E1' + 'E1 FF EC EC EC FF F1 F1 F1 FF E1 E1 E1 FF D1 D1' + 'D1 FF CE CE CE FF D0 D0 D0 FF CB CB CB FF CE CE' + 'CE FF D1 D1 D1 FF D9 D9 D9 FF D4 D4 D4 FF 3F 3F' + '3F FF 00 00 00 FF 00 00 00 55 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 59 00 00 00 FF 59 59 59 FF E9 E9' + 'E9 FF D0 D0 D0 FF CD CD CD FF CD CD CD FF CD CD' + 'CD FF CA CA CA FF D6 D6 D6 FF ED ED ED FF E6 E6' + 'E6 FF DC DC DC FF D4 D4 D4 FF D5 D5 D5 FF D6 D6' + 'D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6' + 'D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6 D6 FF D5 D5' + 'D5 FF D5 D5 D5 FF DB DB DB FF E4 E4 E4 FF ED ED' + 'ED FF DA DA DA FF CA CA CA FF CD CD CD FF CD CD' + 'CD FF CB CB CB FF DF DF DF FF B8 B8 B8 FF 22 22' + '22 FF 00 00 00 FB 00 00 00 3A 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 3E 00 00 00 FE 40 40 40 FF D7 D7' + 'D7 FF D2 D2 D2 FF CA CA CA FF CB CB CB FF CA CA' + 'CA FF D4 D4 D4 FF E9 E9 E9 FF DC DC DC FF D0 D0' + 'D0 FF D1 D1 D1 FF D2 D2 D2 FF D2 D2 D2 FF D2 D2' + 'D2 FF D2 D2 D2 FF D2 D2 D2 FF D2 D2 D2 FF D2 D2' + 'D2 FF D2 D2 D2 FF D2 D2 D2 FF D2 D2 D2 FF D2 D2' + 'D2 FF D2 D2 D2 FF D1 D1 D1 FF D0 D0 D0 FF D8 D8' + 'D8 FF EA EA EA FF D8 D8 D8 FF C9 C9 C9 FF CA CA' + 'CA FF C9 C9 C9 FF E0 E0 E0 FF A0 A0 A0 FF 08 08' + '08 FF 00 00 00 EB 00 00 00 22 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 25 00 00 00 F8 22 22 22 FF B7 B7' + 'B7 FF DB DB DB FF CA CA CA FF CB CB CB FF CE CE' + 'CE FF E4 E4 E4 FF D4 D4 D4 FF CF CF CF FF D1 D1' + 'D1 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0' + 'D0 FF CF CF CF FF CD CD CD FF CE CE CE FF CE CE' + 'CE FF CE CE CE FF CE CE CE FF CE CE CE FF CE CE' + 'CE FF CE CE CE FF CE CE CE FF CE CE CE FF CC CC' + 'CC FF D0 D0 D0 FF E2 E2 E2 FF CF CF CF FF C7 C7' + 'C7 FF C9 C9 C9 FF E2 E2 E2 FF 80 80 80 FF 00 00' + '00 FF 00 00 00 C2 00 00 00 0E 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 0C 00 00 00 E1 07 07 07 FF 9F 9F' + '9F FF DD DD DD FF CC CC CC FF CD CD CD FF DB DB' + 'DB FF D6 D6 D6 FF CE CE CE FF D0 D0 D0 FF D0 D0' + 'D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0' + 'D0 FF CF CF CF FF CC CC CC FF C9 C9 C9 FF CA CA' + 'CA FF CA CA CA FF CA CA CA FF CA CA CA FF CA CA' + 'CA FF CA CA CA FF CA CA CA FF CA CA CA FF CA CA' + 'CA FF C8 C8 C8 FF CF CF CF FF DA DA DA FF C7 C7' + 'C7 FF C9 C9 C9 FF E2 E2 E2 FF 5A 5A 5A FF 00 00' + '00 FF 00 00 00 94 00 00 00 01 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 B2 00 00 00 FF 83 83' + '83 FF DD DD DD FF CF CF CF FF D1 D1 D1 FF DB DB' + 'DB FF D1 D1 D1 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0' + 'D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0' + 'D0 FF D0 D0 D0 FF CF CF CF FF C9 C9 C9 FF C5 C5' + 'C5 FF C6 C6 C6 FF C6 C6 C6 FF C6 C6 C6 FF C6 C6' + 'C6 FF C6 C6 C6 FF C6 C6 C6 FF C6 C6 C6 FF C6 C6' + 'C6 FF C6 C6 C6 FF C7 C7 C7 FF D3 D3 D3 FF C8 C8' + 'C8 FF C9 C9 C9 FF DE DE DE FF 42 42 42 FF 00 00' + '00 FF 00 00 00 6C 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 80 00 00 00 FF 5F 5F' + '5F FF DC DC DC FF D1 D1 D1 FF D2 D2 D2 FF D4 D4' + 'D4 FF D1 D1 D1 FF D1 D1 D1 FF D1 D1 D1 FF D1 D1' + 'D1 FF D1 D1 D1 FF D1 D1 D1 FF D1 D1 D1 FF D1 D1' + 'D1 FF D1 D1 D1 FF D1 D1 D1 FF D0 D0 D0 FF C8 C8' + 'C8 FF C3 C3 C3 FF C3 C3 C3 FF C3 C3 C3 FF C4 C4' + 'C4 FF C4 C4 C4 FF C4 C4 C4 FF C4 C4 C4 FF C4 C4' + 'C4 FF C4 C4 C4 FF C4 C4 C4 FF C7 C7 C7 FF C5 C5' + 'C5 FF CB CB CB FF CC CC CC FF 2D 2D 2D FF 00 00' + '00 F8 00 00 00 40 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 4B 00 00 00 FE 41 41' + '41 FF D8 D8 D8 FF D4 D4 D4 FF D2 D2 D2 FF D0 D0' + 'D0 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' + 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' + 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' + 'D3 FF CD CD CD FF C7 C7 C7 FF C4 C4 C4 FF C2 C2' + 'C2 FF C1 C1 C1 FF C0 C0 C0 FF C1 C1 C1 FF C1 C1' + 'C1 FF C1 C1 C1 FF C2 C2 C2 FF BF BF BF FF C0 C0' + 'C0 FF CE CE CE FF B2 B2 B2 FF 1A 1A 1A FF 00 00' + '00 E5 00 00 00 28 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 1A 00 00 00 F2 2C 2C' + '2C FF CC CC CC FF D6 D6 D6 FF D5 D5 D5 FF CC CC' + 'CC FF D5 D5 D5 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6' + 'D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6' + 'D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6' + 'D6 FF D7 D7 D7 FF D6 D6 D6 FF D5 D5 D5 FF D3 D3' + 'D3 FF CF CF CF FF CC CC CC FF C9 C9 C9 FF C6 C6' + 'C6 FF C4 C4 C4 FF C2 C2 C2 FF B3 B3 B3 FF BD BD' + 'BD FF D0 D0 D0 FF 99 99 99 FF 09 09 09 FF 00 00' + '00 CF 00 00 00 19 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 09 00 00 00 D8 18 18' + '18 FF B0 B0 B0 FF DB DB DB FF DB DB DB FF D0 D0' + 'D0 FF D2 D2 D2 FF DB DB DB FF D9 D9 D9 FF DA DA' + 'DA FF DA DA DA FF DA DA DA FF DA DA DA FF DA DA' + 'DA FF DA DA DA FF DA DA DA FF DA DA DA FF DA DA' + 'DA FF DA DA DA FF DA DA DA FF DA DA DA FF DA DA' + 'DA FF DB DB DB FF DB DB DB FF DA DA DA FF D9 D9' + 'D9 FF D9 D9 D9 FF CF CF CF FF C5 C5 C5 FF CC CC' + 'CC FF CA CA CA FF 7A 7A 7A FF 02 02 02 FF 00 00' + '00 B8 00 00 00 0A 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 02 00 00 00 BF 08 08' + '08 FF 97 97 97 FF DC DC DC FF DF DF DF FF DC DC' + 'DC FF CE CE CE FF D6 D6 D6 FF DE DE DE FF DD DD' + 'DD FF DD DD DD FF DD DD DD FF DD DD DD FF DD DD' + 'DD FF DD DD DD FF DD DD DD FF DD DD DD FF DD DD' + 'DD FF DD DD DD FF DD DD DD FF DD DD DD FF DD DD' + 'DD FF DD DD DD FF DD DD DD FF DD DD DD FF DE DE' + 'DE FF D8 D8 D8 FF CE CE CE FF DD DD DD FF DC DC' + 'DC FF C6 C6 C6 FF 53 53 53 FF 00 00 00 FF 00 00' + '00 A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 A4 00 00' + '00 FF 77 77 77 FF D3 D3 D3 FF E2 E2 E2 FF E1 E1' + 'E1 FF DE DE DE FF CE CE CE FF D7 D7 D7 FF E1 E1' + 'E1 FF E2 E2 E2 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' + 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' + 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' + 'E0 FF E0 E0 E0 FF E1 E1 E1 FF E1 E1 E1 FF D9 D9' + 'D9 FF CD CD CD FF DA DA DA FF E3 E3 E3 FF D9 D9' + 'D9 FF BB BB BB FF 39 39 39 FF 00 00 00 FF 00 00' + '00 7E 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 89 00 00' + '00 FF 4B 4B 4B FF C9 C9 C9 FF E5 E5 E5 FF E3 E3' + 'E3 FF E4 E4 E4 FF E1 E1 E1 FF D7 D7 D7 FF D2 D2' + 'D2 FF DA DA DA FF E4 E4 E4 FF E5 E5 E5 FF E4 E4' + 'E4 FF E4 E4 E4 FF E4 E4 E4 FF E4 E4 E4 FF E4 E4' + 'E4 FF E4 E4 E4 FF E4 E4 E4 FF E4 E4 E4 FF E5 E5' + 'E5 FF E5 E5 E5 FF DC DC DC FF D2 D2 D2 FF D6 D6' + 'D6 FF E0 E0 E0 FF E4 E4 E4 FF E6 E6 E6 FF D6 D6' + 'D6 FF A8 A8 A8 FF 20 20 20 FF 00 00 00 FD 00 00' + '00 4E 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 62 00 00' + '00 FF 35 35 35 FF BD BD BD FF E6 E6 E6 FF E6 E6' + 'E6 FF E6 E6 E6 FF E7 E7 E7 FF E7 E7 E7 FF DF DF' + 'DF FF D2 D2 D2 FF D3 D3 D3 FF DE DE DE FF E3 E3' + 'E3 FF E3 E3 E3 FF E4 E4 E4 FF E4 E4 E4 FF E4 E4' + 'E4 FF E4 E4 E4 FF E3 E3 E3 FF E3 E3 E3 FF DE DE' + 'DE FF D4 D4 D4 FF D1 D1 D1 FF DD DD DD FF E7 E7' + 'E7 FF E7 E7 E7 FF E6 E6 E6 FF E8 E8 E8 FF D4 D4' + 'D4 FF 9A 9A 9A FF 0B 0B 0B FF 00 00 00 ED 00 00' + '00 2C 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 2D 00 00' + '00 F9 1E 1E 1E FF AB AB AB FF E4 E4 E4 FF ED ED' + 'ED FF E7 E7 E7 FF E6 E6 E6 FF EC EC EC FF EB EB' + 'EB FF EA EA EA FF E4 E4 E4 FF E0 E0 E0 FF DF DF' + 'DF FF DF DF DF FF DD DD DD FF DC DC DC FF DC DC' + 'DC FF DD DD DD FF DF DF DF FF DF DF DF FF DF DF' + 'DF FF E2 E2 E2 FF E9 E9 E9 FF EC EC EC FF EA EA' + 'EA FF E5 E5 E5 FF EB EB EB FF EB EB EB FF D6 D6' + 'D6 FF 8A 8A 8A FF 00 00 00 FF 00 00 00 C3 00 00' + '00 17 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 09 00 00' + '00 DD 08 08 08 FF 99 99 99 FF E4 E4 E4 FF DF DF' + 'DF FF BD BD BD FF C1 C1 C1 FF D6 D6 D6 FF EC EC' + 'EC FF ED ED ED FF ED ED ED FF EE EE EE FF EE EE' + 'EE FF ED ED ED FF EC EC EC FF EB EB EB FF EB EB' + 'EB FF EC EC EC FF ED ED ED FF EE EE EE FF EE EE' + 'EE FF ED ED ED FF EE EE EE FF E4 E4 E4 FF C2 C2' + 'C2 FF BE BE BE FF D1 D1 D1 FF EC EC EC FF D4 D4' + 'D4 FF 75 75 75 FF 00 00 00 FF 00 00 00 9C 00 00' + '00 06 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 AE 00 00 00 FF 8D 8D 8D FF E0 E0 E0 FF C4 C4' + 'C4 FF B2 B2 B2 FF B8 B8 B8 FF B2 B2 B2 FF EB EB' + 'EB FF F1 F1 F1 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0' + 'F0 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0' + 'F0 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0' + 'F0 FF F0 F0 F0 FF F3 F3 F3 FF D5 D5 D5 FF B0 B0' + 'B0 FF B6 B6 B6 FF B7 B7 B7 FF EB EB EB FF CD CD' + 'CD FF 61 61 61 FF 00 00 00 FF 00 00 00 85 00 00' + '00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 80 00 00 00 FF 64 64 64 FF CE CE CE FF DD DD' + 'DD FF DC DC DC FF D5 D5 D5 FF E4 E4 E4 FF F9 F9' + 'F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9' + 'F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9' + 'F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9' + 'F9 FF F9 F9 F9 FF FA FA FA FF F2 F2 F2 FF DF DF' + 'DF FF D8 D8 D8 FF DC DC DC FF D7 D7 D7 FF B0 B0' + 'B0 FF 34 34 34 FF 00 00 00 FF 00 00 00 67 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 44 00 00 00 FF 19 19 19 FF 80 80 80 FF BE BE' + 'BE FF D3 D3 D3 FF D7 D7 D7 FF DB DB DB FF D8 D8' + 'D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8' + 'D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8' + 'D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8' + 'D8 FF D8 D8 D8 FF D8 D8 D8 FF D9 D9 D9 FF D9 D9' + 'D9 FF D7 D7 D7 FF CD CD CD FF B0 B0 B0 FF 5D 5D' + '5D FF 06 06 06 FF 00 00 00 ED 00 00 00 2B 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 02 00 00 00 9C 00 00 00 FF 0C 0C 0C FF 3D 3D' + '3D FF 49 49 49 FF 48 48 48 FF 48 48 48 FF 48 48' + '48 FF 48 48 48 FF 48 48 48 FF 48 48 48 FF 48 48' + '48 FF 48 48 48 FF 48 48 48 FF 48 48 48 FF 48 48' + '48 FF 48 48 48 FF 48 48 48 FF 48 48 48 FF 48 48' + '48 FF 48 48 48 FF 48 48 48 FF 48 48 48 FF 48 48' + '48 FF 49 49 49 FF 49 49 49 FF 2F 2F 2F FF 02 02' + '02 FF 00 00 00 FF 00 00 00 5C 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 06 00 00 00 7F 00 00 00 F1 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 D6 00 00 00 5C 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 2C 00 00' + '00 7E 00 00 00 84 00 00 00 84 00 00 00 84 00 00' + '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' + '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' + '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' + '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' + '00 84 00 00 00 84 00 00 00 84 00 00 00 70 00 00' + '00 1A 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF' + 'FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 FF FF FE 1F FF FF 00 00 FF FF' + 'FE 1F FF FF 00 00 FF 00 00 00 00 7F 00 00 FC 00' + '00 00 00 1F 00 00 F8 00 00 00 00 1F 00 00 F8 00' + '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F0 00' + '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F0 00' + '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F0 00' + '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F0 00' + '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F0 00' + '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F0 00' + '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F8 00' + '00 00 00 1F 00 00 F8 00 00 00 00 1F 00 00 F8 00' + '00 00 00 1F 00 00 F8 00 00 00 00 1F 00 00 F8 00' + '00 00 00 1F 00 00 F8 00 00 00 00 1F 00 00 FC 00' + '00 00 00 3F 00 00 FC 00 00 00 00 3F 00 00 FC 00' + '00 00 00 3F 00 00 FC 00 00 00 00 3F 00 00 FC 00' + '00 00 00 3F 00 00 FC 00 00 00 00 7F 00 00 FE 00' + '00 00 00 7F 00 00 FE 00 00 00 00 7F 00 00 FE 00' + '00 00 00 7F 00 00 FE 00 00 00 00 7F 00 00 FE 00' + '00 00 00 7F 00 00 FF 00 00 00 00 7F 00 00 FF 00' + '00 00 00 FF 00 00 FF 00 00 00 00 FF 00 00 FF 00' + '00 00 01 FF 00 00 FF 80 00 00 03 FF 00 00 FF E0' + '00 00 07 FF 00 00 FF FF FF FF FF FF 00 00 28 00' + '00 00 20 00 00 00 40 00 00 00 01 00 20 00 00 00' + '00 00 00 10 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 90 00 00 00 90 00 00' + '00 90 00 00 00 90 00 00 00 90 00 00 00 90 00 00' + '00 90 00 00 00 90 00 00 00 90 00 00 00 90 00 00' + '00 90 00 00 00 90 00 00 00 90 00 00 00 90 00 00' + '00 90 00 DC DC FF 00 DC DC FF 00 00 00 9C 00 00' + '00 90 00 00 00 90 00 00 00 90 00 00 00 90 00 00' + '00 90 00 00 00 90 00 00 00 90 00 00 00 90 00 00' + '00 90 00 00 00 90 00 00 00 90 00 00 00 90 00 00' + '00 90 00 00 00 90 80 80 80 FF 80 80 80 FF 80 80' + '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' + '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' + '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' + '80 FF 00 FF FF FF 00 FF FF FF 80 80 80 FF 80 80' + '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' + '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' + '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' + '80 FF 80 80 80 FF 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 6B FF FF FF 6B FF FF FF 00 00 00 30 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 C0 C0 C0 FF C0 C0 C0 FF 00 00 00 37 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 05 00 00 00 C5 00 00' + '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' + '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' + '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' + '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' + '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F1 00 00' + '00 B1 00 00 00 0D 00 00 00 01 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 05 00 00 00 9B 00 00 00 FF 21 21' + '21 FF 2B 2B 2B FF 2C 2C 2C FF 2B 2B 2B FF 2B 2B' + '2B FF 2B 2B 2B FF 2B 2B 2B FF 2B 2B 2B FF 2B 2B' + '2B FF 2B 2B 2B FF 2A 2A 2A FF 2A 2A 2A FF 2A 2A' + '2A FF 2A 2A 2A FF 2A 2A 2A FF 2A 2A 2A FF 2B 2B' + '2B FF 2B 2B 2B FF 2E 2C 2D FF 13 13 13 FF 00 00' + '00 FF 00 00 00 69 00 00 00 09 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 AD 01 01 01 FF EB EB EB FF E8 E8' + 'E8 FF D5 D5 D5 FF 85 85 85 FF 92 92 92 FF 98 98' + '98 FF AD AD AD FF BA BA BA FF C3 C3 C3 FF C6 C6' + 'C6 FF CA CA CA FF CA CA CA FF CA CA CA FF D3 D3' + 'D3 FF D7 D7 D7 FF CC CC CC FF C7 C7 C7 FF C8 C9' + 'C9 FF 9D B3 A8 FF 20 A8 63 FF 90 AF A0 FF BF BB' + 'BD FF 00 00 00 FF 00 00 00 81 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 F0 19 19 19 FF EC EC EC FF E2 E2' + 'E2 FF CB CB CB FF 3B 3B 3B FF 56 56 56 FF 72 72' + '72 FF 92 92 92 FF 9D 9D 9D FF A8 A8 A8 FF AC AC' + 'AC FF A9 A9 A9 FF 9C 9C 9C FF 99 99 99 FF B7 B7' + 'B7 FF C3 C3 C3 FF A3 A3 A3 FF 98 98 98 FF C5 C4' + 'C4 FF 51 A7 7C FF 17 CE 71 FF 2F 99 64 FF C3 BD' + 'C0 FF 01 01 01 FF 00 00 00 A3 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 F9 28 28 28 FF EC EC EC FF E6 E6' + 'E6 FF D1 D1 D1 FF 68 68 68 FF 7E 7E 7E FF 85 85' + '85 FF 97 97 97 FF A0 A0 A0 FF AA AA AA FF AE AE' + 'AE FF 9F 9F 9F FF 83 83 83 FF 7C 7C 7C FF A8 A8' + 'A8 FF BB BB BB FF 8A 8A 8A FF 79 79 79 FF C2 C2' + 'C2 FF C6 C3 C4 FF 99 AC A2 FF C2 BE C0 FF C4 C4' + 'C4 FF 01 01 01 FF 00 00 00 BA 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 F9 28 28 28 FF EE EE EE FF E7 E7' + 'E7 FF D6 D6 D6 FF 70 70 70 FF 7D 7D 7D FF 85 85' + '85 FF 97 97 97 FF A0 A0 A0 FF AA AA AA FF AE AE' + 'AE FF 98 98 98 FF 73 73 73 FF 6A 6A 6A FF A0 A0' + 'A0 FF B7 B7 B7 FF 7C 7C 7C FF 67 67 67 FF C2 C2' + 'C2 FF C4 C3 C4 FF C7 C4 C5 FF BF BF BF FF C5 C5' + 'C5 FF 01 01 01 FF 00 00 00 B9 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 F9 27 27 27 FF F2 F2 F2 FF EB EB' + 'EB FF DF DF DF FF A7 A7 A7 FF AB AB AB FF AE AE' + 'AE FF B3 B3 B3 FF B6 B6 B6 FF B9 B9 B9 FF BA BA' + 'BA FF B7 B7 B7 FF B1 B1 B1 FF AF AF AF FF BA BA' + 'BA FF BE BE BE FF B0 B0 B0 FF AB AB AB FF C5 C5' + 'C5 FF C6 C6 C6 FF C4 C4 C4 FF C2 C2 C2 FF C9 C9' + 'C9 FF 00 00 00 FF 00 00 00 B9 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 F9 26 26 26 FF F3 F3 F3 FF EB EB' + 'EB FF EA EA EA FF ED ED ED FF E9 E9 E9 FF E8 E8' + 'E8 FF E4 E4 E4 FF E2 E2 E2 FF DF DF DF FF DE DE' + 'DE FF DB DB DB FF DC DC DC FF D9 D9 D9 FF D6 D6' + 'D6 FF D2 D2 D2 FF D2 D2 D2 FF D0 D0 D0 FF CB CB' + 'CB FF C9 C9 C9 FF C7 C7 C7 FF C0 C0 C0 FF CA CA' + 'CA FF 00 00 00 FF 00 00 00 B9 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 F9 24 24 24 FF FF FF FF FF E9 E9' + 'E9 FF E2 E2 E2 FF E2 E2 E2 FF DF DF DF FF DF DF' + 'DF FF DF DF DF FF DF DF DF FF E0 E0 E0 FF E0 E0' + 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' + 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' + 'E0 FF E3 E3 E3 FF E3 E3 E3 FF F8 F8 F8 FF EF EF' + 'EF FF 00 00 00 FF 00 00 00 B9 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 FA 24 24 24 FF F8 F8 F8 FF D9 D9' + 'D9 FF BB BB BB FF BF BF BF FF DA DA DA FF D9 D9' + 'D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9' + 'D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9' + 'D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9 D9 FF DB DB' + 'DB FF BC BC BC FF BB BB BB FF DE DE DE FF FF FF' + 'FF FF 00 00 00 FF 00 00 00 BA 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 D0 05 05 05 FF F6 F6 F6 FF BC BC' + 'BC FF C3 C3 C3 FF AB AB AB FF D8 D8 D8 FF D5 D5' + 'D5 FF D5 D5 D5 FF D4 D4 D4 FF D3 D3 D3 FF D5 D5' + 'D5 FF D8 D8 D8 FF D8 D8 D8 FF D5 D5 D5 FF D3 D3' + 'D3 FF D3 D3 D3 FF D4 D4 D4 FF D7 D7 D7 FF C9 C9' + 'C9 FF C3 C3 C3 FF B3 B3 B3 FF D6 D6 D6 FF F5 F5' + 'F5 FF 00 00 00 FF 00 00 00 8C 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 9C 00 00 00 FF F4 F4 F4 FF CF CF' + 'CF FF D2 D2 D2 FF BF BF BF FF D3 D3 D3 FF D2 D2' + 'D2 FF D3 D3 D3 FF DD DD DD FF E3 E3 E3 FF E6 E6' + 'E6 FF ED ED ED FF ED ED ED FF E7 E7 E7 FF E4 E4' + 'E4 FF DE DE DE FF D4 D4 D4 FF D2 D2 D2 FF D3 D3' + 'D3 FF D0 D0 D0 FF C2 C2 C2 FF D9 D9 D9 FF E8 E8' + 'E8 FF 00 00 00 FF 00 00 00 72 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 59 00 00 00 FF E9 E9 E9 FF D0 D0' + 'D0 FF CD CD CD FF CD CD CD FF D6 D6 D6 FF ED ED' + 'ED FF DC DC DC FF D4 D4 D4 FF D6 D6 D6 FF D6 D6' + 'D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6' + 'D6 FF D5 D5 D5 FF DB DB DB FF ED ED ED FF DA DA' + 'DA FF CD CD CD FF CD CD CD FF DF DF DF FF B8 B8' + 'B8 FF 00 00 00 FB 00 00 00 3A 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 3E 00 00 00 FE D7 D7 D7 FF D2 D2' + 'D2 FF CB CB CB FF CA CA CA FF E9 E9 E9 FF DC DC' + 'DC FF D1 D1 D1 FF D2 D2 D2 FF D2 D2 D2 FF D2 D2' + 'D2 FF D2 D2 D2 FF D2 D2 D2 FF D2 D2 D2 FF D2 D2' + 'D2 FF D2 D2 D2 FF D1 D1 D1 FF D8 D8 D8 FF EA EA' + 'EA FF C9 C9 C9 FF CA CA CA FF E0 E0 E0 FF A0 A0' + 'A0 FF 00 00 00 EB 00 00 00 22 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 0C 00 00 00 E1 9F 9F 9F FF DD DD' + 'DD FF CD CD CD FF DB DB DB FF CE CE CE FF D0 D0' + 'D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0 D0 FF CF CF' + 'CF FF C9 C9 C9 FF CA CA CA FF CA CA CA FF CA CA' + 'CA FF CA CA CA FF CA CA CA FF CA CA CA FF C8 C8' + 'C8 FF DA DA DA FF C7 C7 C7 FF E2 E2 E2 FF 5A 5A' + '5A FF 00 00 00 94 00 00 00 01 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 B2 83 83 83 FF DD DD' + 'DD FF D1 D1 D1 FF DB DB DB FF D0 D0 D0 FF D0 D0' + 'D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0' + 'D0 FF C9 C9 C9 FF C5 C5 C5 FF C6 C6 C6 FF C6 C6' + 'C6 FF C6 C6 C6 FF C6 C6 C6 FF C6 C6 C6 FF C6 C6' + 'C6 FF D3 D3 D3 FF C8 C8 C8 FF DE DE DE FF 42 42' + '42 FF 00 00 00 6C 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 4B 41 41 41 FF D8 D8' + 'D8 FF D2 D2 D2 FF D0 D0 D0 FF D3 D3 D3 FF D3 D3' + 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' + 'D3 FF D3 D3 D3 FF D3 D3 D3 FF C7 C7 C7 FF C4 C4' + 'C4 FF C1 C1 C1 FF C0 C0 C0 FF C1 C1 C1 FF C1 C1' + 'C1 FF BF BF BF FF C0 C0 C0 FF B2 B2 B2 FF 1A 1A' + '1A FF 00 00 00 28 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 1A 2C 2C 2C FF CC CC' + 'CC FF D5 D5 D5 FF CC CC CC FF D6 D6 D6 FF D6 D6' + 'D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6' + 'D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6 D6 FF D5 D5' + 'D5 FF CF CF CF FF CC CC CC FF C6 C6 C6 FF C4 C4' + 'C4 FF B3 B3 B3 FF BD BD BD FF 99 99 99 FF 09 09' + '09 FF 00 00 00 19 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 02 08 08 08 FF 97 97' + '97 FF DF DF DF FF DC DC DC FF D6 D6 D6 FF DE DE' + 'DE FF DD DD DD FF DD DD DD FF DD DD DD FF DD DD' + 'DD FF DD DD DD FF DD DD DD FF DD DD DD FF DD DD' + 'DD FF DD DD DD FF DD DD DD FF DE DE DE FF D8 D8' + 'D8 FF DD DD DD FF DC DC DC FF 53 53 53 FF 00 00' + '00 FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 FF 77 77' + '77 FF E2 E2 E2 FF E1 E1 E1 FF CE CE CE FF D7 D7' + 'D7 FF E2 E2 E2 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' + 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' + 'E0 FF E0 E0 E0 FF E1 E1 E1 FF D9 D9 D9 FF CD CD' + 'CD FF E3 E3 E3 FF D9 D9 D9 FF 39 39 39 FF 00 00' + '00 FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 FF 35 35' + '35 FF E6 E6 E6 FF E6 E6 E6 FF E7 E7 E7 FF E7 E7' + 'E7 FF D2 D2 D2 FF D3 D3 D3 FF E3 E3 E3 FF E3 E3' + 'E3 FF E4 E4 E4 FF E4 E4 E4 FF E3 E3 E3 FF E3 E3' + 'E3 FF D4 D4 D4 FF D1 D1 D1 FF E7 E7 E7 FF E7 E7' + 'E7 FF E8 E8 E8 FF D4 D4 D4 FF 0B 0B 0B FF 00 00' + '00 ED 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 F9 1E 1E' + '1E FF E4 E4 E4 FF ED ED ED FF E6 E6 E6 FF EC EC' + 'EC FF EA EA EA FF E4 E4 E4 FF DF DF DF FF DF DF' + 'DF FF DC DC DC FF DC DC DC FF DF DF DF FF DF DF' + 'DF FF E2 E2 E2 FF E9 E9 E9 FF EA EA EA FF E5 E5' + 'E5 FF EB EB EB FF D6 D6 D6 FF 00 00 00 FF 00 00' + '00 C3 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 AE 00 00' + '00 FF E0 E0 E0 FF C4 C4 C4 FF B8 B8 B8 FF B2 B2' + 'B2 FF F1 F1 F1 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0' + 'F0 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0' + 'F0 FF F0 F0 F0 FF F3 F3 F3 FF B0 B0 B0 FF B6 B6' + 'B6 FF EB EB EB FF CD CD CD FF 00 00 00 FF 00 00' + '00 85 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 80 00 00' + '00 FF CE CE CE FF DD DD DD FF D5 D5 D5 FF E4 E4' + 'E4 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9' + 'F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9' + 'F9 FF F9 F9 F9 FF FA FA FA FF DF DF DF FF D8 D8' + 'D8 FF D7 D7 D7 FF B0 B0 B0 FF 00 00 00 FF 00 00' + '00 67 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 02 00 00' + '00 9C 0C 0C 0C FF 3D 3D 3D FF 48 48 48 FF 48 48' + '48 FF 48 48 48 FF 48 48 48 FF 48 48 48 FF 48 48' + '48 FF 48 48 48 FF 48 48 48 FF 48 48 48 FF 48 48' + '48 FF 48 48 48 FF 48 48 48 FF 48 48 48 FF 49 49' + '49 FF 2F 2F 2F FF 02 02 02 FF 00 00 00 5C 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 06 00 00 00 F1 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 D6 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 FF FF FF FF 00 00 00 00 00 00' + '00 00 FF FE 3F FF FF FE 3F FF F0 00 00 07 E0 00' + '00 07 E0 00 00 07 E0 00 00 07 E0 00 00 07 E0 00' + '00 07 E0 00 00 07 E0 00 00 07 E0 00 00 07 E0 00' + '00 07 E0 00 00 07 E0 00 00 07 E0 00 00 07 E0 00' + '00 07 E0 00 00 07 F0 00 00 0F F0 00 00 0F F0 00' + '00 0F F0 00 00 1F F8 00 00 1F F8 00 00 1F F8 00' + '00 1F F8 00 00 1F F8 00 00 1F F8 00 00 3F FC 00' + '00 7F FF FF FF FF 28 00 00 00 10 00 00 00 20 00' + '00 00 01 00 20 00 00 00 00 00 00 04 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 30 00 00 00 30 00 00 00 30 00 00 00 30 00 00' + '00 30 00 00 00 30 00 00 00 30 00 00 00 30 00 00' + '00 78 00 00 00 30 00 00 00 30 00 00 00 30 00 00' + '00 30 00 00 00 30 00 00 00 30 00 00 00 30 C0 C0' + 'C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0' + 'C0 FF C0 C0 C0 FF C0 C0 C0 FF 6B FF FF FF 6B FF' + 'FF FF C0 C0 C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0' + 'C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0 C0 FF 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 37 00 00' + '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' + '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' + '00 37 00 00 00 04 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 26 26 26 FF CD CD CD FF CD CD' + 'CD FF C9 C9 C9 FF C5 C5 C5 FF C2 C2 C2 FF C0 C0' + 'C0 FF BF BF BF FF BA BA BA FF B3 B4 B3 FF AB AC' + 'AC FF 09 09 09 FF 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 30 D1 D1 D1 FF E7 E7 E7 FF 5F 5F' + '5F FF 8F 8F 8F FF A7 A7 A7 FF B9 B9 B9 FF B8 B8' + 'B8 FF 94 94 94 FF B7 B7 B7 FF C6 C3 C5 FF 91 D8' + 'B5 FF 8E 8E 8E FF 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 33 D1 D1 D1 FF EB EB EB FF 6C 6C' + '6C FF 8A 8A 8A FF A3 A3 A3 FF B9 B9 B9 FF A5 A5' + 'A5 FF 6B 6B 6B FF A4 A4 A4 FF C8 C8 C8 FF C2 C2' + 'C2 FF 8E 8E 8E FF 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 33 D3 D3 D3 FF F6 F6 F6 FF F5 F5' + 'F5 FF F4 F4 F4 FF F3 F3 F3 FF F1 F1 F1 FF F0 F0' + 'F0 FF EF EF EF FF EE EE EE FF ED ED ED FF EB EB' + 'EB FF 8D 8D 8D FF 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 25 DA DA DA FF A9 A9 A9 FF C3 C3' + 'C3 FF D8 D8 D8 FF D8 D8 D8 FF D7 D7 D7 FF D7 D7' + 'D7 FF D8 D8 D8 FF D8 D8 D8 FF A8 A8 A8 FF B5 B5' + 'B5 FF 9C 9C 9C FF 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 7E 7E 7E FF CF CF CF FF D1 D1' + 'D1 FF DF DF DF FF E1 E1 E1 FF DC DC DC FF DC DC' + 'DC FF E1 E1 E1 FF E1 E1 E1 FF D0 D0 D0 FF D1 D1' + 'D1 FF 3F 3F 3F FF 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 22 22 22 FF CA CA CA FF E4 E4' + 'E4 FF D1 D1 D1 FF D0 D0 D0 FF CD CD CD FF CE CE' + 'CE FF CE CE CE FF CE CE CE FF E2 E2 E2 FF C9 C9' + 'C9 FF 00 00 00 FF 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 FF D1 D1 D1 FF D1 D1' + 'D1 FF D1 D1 D1 FF D1 D1 D1 FF D1 D1 D1 FF C3 C3' + 'C3 FF C4 C4 C4 FF C4 C4 C4 FF C4 C4 C4 FF CB CB' + 'CB FF 00 00 00 F8 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 D8 DB DB DB FF D2 D2' + 'D2 FF DA DA DA FF DA DA DA FF DA DA DA FF DA DA' + 'DA FF DA DA DA FF DA DA DA FF CF CF CF FF CA CA' + 'CA FF 00 00 00 B8 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 89 C9 C9 C9 FF E4 E4' + 'E4 FF D2 D2 D2 FF E5 E5 E5 FF E4 E4 E4 FF E4 E4' + 'E4 FF E5 E5 E5 FF D2 D2 D2 FF E4 E4 E4 FF A8 A8' + 'A8 FF 00 00 00 4E 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 09 99 99 99 FF BD BD' + 'BD FF EC EC EC FF EE EE EE FF EC EC EC FF EC EC' + 'EC FF EE EE EE FF E4 E4 E4 FF D1 D1 D1 FF 75 75' + '75 FF 00 00 00 06 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 19 19 19 FF D3 D3' + 'D3 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8' + 'D8 FF D8 D8 D8 FF D9 D9 D9 FF CD CD CD FF 06 06' + '06 FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' + '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 E0 03 00 00 C0 03 00 00 80 03' + '00 00 80 03 00 00 80 03 00 00 80 03 00 00 C0 03' + '00 00 C0 03 00 00 C0 03 00 00 C0 03 00 00 C0 03' + '00 00 C0 03 00 00 E0 07 00 00 F0 0F 00 00' +} */ + +/* BINRES netdrive2.ico */ +10 ICON netdrive2.ico +/* { + '00 00 01 00 09 00 20 20 00 00 01 00 08 00 A8 08' + '00 00 96 00 00 00 10 10 00 00 01 00 08 00 68 05' + '00 00 3E 09 00 00 20 20 00 00 01 00 04 00 E8 02' + '00 00 A6 0E 00 00 10 10 00 00 01 00 04 00 28 01' + '00 00 8E 11 00 00 20 20 00 00 01 00 20 00 A8 10' + '00 00 B6 12 00 00 30 30 00 00 01 00 04 00 68 06' + '00 00 5E 23 00 00 30 30 00 00 01 00 20 00 A8 25' + '00 00 C6 29 00 00 30 30 00 00 01 00 08 00 A8 0E' + '00 00 6E 4F 00 00 10 10 00 00 01 00 20 00 68 04' + '00 00 16 5E 00 00 28 00 00 00 20 00 00 00 40 00' + '00 00 01 00 08 00 00 00 00 00 00 04 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 02 02 02 00 04 04 04 00 05 06 06 00 06 06' + '06 00 00 00 0D 00 09 09 09 00 0A 0A 0A 00 0C 0C' + '0C 00 12 12 12 00 14 14 14 00 15 15 15 00 16 16' + '16 00 1F 1F 10 00 1D 1D 1D 00 00 00 20 00 00 00' + '2C 00 00 00 2D 00 21 21 21 00 22 22 22 00 23 23' + '23 00 24 24 24 00 25 25 25 00 26 26 26 00 38 38' + '38 00 39 39 39 00 3B 3B 3B 00 43 43 43 00 46 46' + '46 00 4A 4A 4A 00 54 4C 50 00 53 53 53 00 55 55' + '55 00 56 56 56 00 59 59 52 00 5A 5A 53 00 5C 5C' + '55 00 5D 5D 56 00 58 58 58 00 59 59 59 00 5A 58' + '59 00 5A 5A 5A 00 5B 5B 5B 00 5C 5C 5C 00 5D 5D' + '5D 00 5E 5E 5E 00 65 58 5F 00 60 60 60 00 61 61' + '61 00 62 62 62 00 64 64 64 00 67 67 67 00 69 69' + '69 00 71 71 71 00 72 72 72 00 73 73 73 00 75 75' + '75 00 78 78 78 00 7A 7A 7A 00 7B 7B 7B 00 7C 7C' + '7C 00 7F 7F 7F 00 24 A7 64 00 3C AD 74 00 25 DC' + '7F 00 7C 7C A3 00 00 00 C9 00 00 00 CD 00 00 00' + 'D3 00 00 00 D8 00 00 00 FF 00 2B 2B FF 00 7D AA' + '94 00 81 81 81 00 83 83 83 00 89 89 89 00 8A 8A' + '8A 00 8B 8B 8B 00 8F 8F 8F 00 91 89 8C 00 90 90' + '90 00 91 91 91 00 94 94 94 00 95 95 95 00 97 97' + '97 00 99 99 99 00 9A 9A 9A 00 9C 9C 9C 00 9D 9D' + '9D 00 9E 9E 9E 00 9F 9F 9F 00 94 B6 A4 00 93 BD' + 'A9 00 A0 A0 A0 00 A1 A1 A1 00 A3 A3 A3 00 A4 A4' + 'A4 00 A5 A5 A5 00 A8 A8 A8 00 A9 A9 A9 00 AA AA' + 'AA 00 AC AC AC 00 AD AD AD 00 AE AE AE 00 AF AF' + 'AF 00 B8 B8 A7 00 AA AA BC 00 AD B9 B3 00 B0 B0' + 'B0 00 B1 B1 B1 00 B2 B2 B2 00 B3 B3 B3 00 B4 B4' + 'B4 00 B5 B5 B5 00 B6 B6 B6 00 B7 B7 B7 00 B9 B9' + 'B9 00 BC BC BC 00 BD BD BD 00 BE BE BE 00 BF BF' + 'BF 00 C0 C0 C0 00 C1 C1 C1 00 C2 C0 C1 00 C2 C2' + 'C2 00 C3 C3 C3 00 C4 C1 C2 00 C5 C2 C4 00 C4 C4' + 'C4 00 C5 C5 C5 00 C6 C5 C6 00 C6 C6 C6 00 C8 C3' + 'C5 00 CC C4 C8 00 C8 C8 C8 00 C9 C9 C9 00 CB C9' + 'CA 00 CA CA CA 00 CB CB CB 00 CC CC CC 00 CD CD' + 'CD 00 CE CE CE 00 CF CF CF 00 D2 C1 CA 00 D3 C8' + 'CD 00 D0 D0 D0 00 D1 D1 D1 00 D2 D2 D2 00 D3 D3' + 'D3 00 D4 D4 D4 00 D5 D5 D5 00 D6 D6 D6 00 D7 D7' + 'D7 00 D8 D8 D8 00 D9 D9 D9 00 DA DA DA 00 DB DB' + 'DB 00 DC DC DC 00 DD DD DD 00 DE DE DE 00 DF DF' + 'DF 00 E0 E0 E0 00 E1 E1 E1 00 E2 E2 E2 00 E3 E3' + 'E3 00 E4 E4 E4 00 E5 E5 E5 00 E6 E6 E6 00 E7 E7' + 'E7 00 E8 E8 E8 00 E9 E9 E9 00 EA EA EA 00 EB EB' + 'EB 00 EC EC EC 00 ED ED ED 00 EE EE EE 00 EF EF' + 'EF 00 F0 F0 F0 00 F1 F1 F1 00 F2 F2 F2 00 F4 F4' + 'F4 00 F5 F5 F5 00 F6 F6 F6 00 F7 F7 F7 00 F8 F8' + 'F8 00 F9 F9 F9 00 FC FC FC 00 FD FD FD 00 FF FF' + 'FF 00 00 00 00 00 00 00 00 00 02 00 00 00 80 00' + '00 00 00 00 00 00 8C 1A 95 00 7F E9 4B 00 08 6C' + '0C 01 00 00 00 C0 00 00 00 00 80 1A 95 00 02 00' + '00 00 80 00 00 00 00 00 00 00 C0 27 95 00 C4 F5' + 'AF 00 02 00 00 00 44 3A 5C 6F 73 65 78 70 65 72' + '74 73 5C 72 65 61 63 74 6F 73 5C 6C 69 62 5C 73' + '68 65 6C 6C 33 32 5C 6E 65 74 64 72 69 76 65 32' + '2E 69 63 6F 00 00 14 1A 95 00 1F 3B D4 77 15 00' + '00 00 A8 00 00 00 4F 3B D4 77 E0 19 95 00 33 3B' + 'D4 77 64 C5 F5 77 A9 F1 E7 77 F8 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 1A 95 00 B0 6C' + '38 00 96 00 00 00 00 00 00 00 C9 F1 E7 77 96 00' + '00 00 A4 1A 95 00 09 00 00 00 00 00 00 00 96 00' + '00 00 96 00 00 00 09 00 00 00 F4 19 95 00 33 3B' + 'D4 77 B4 1A 95 00 09 48 E9 77 B8 10 E9 77 FF FF' + 'FF FF C9 F1 E7 77 16 EA 4B 00 F8 00 00 00 B0 6C' + '38 00 96 00 00 00 58 1A 95 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 42 45 BD 00 45' + '42 BD 00 00 00 00 00 00 00 00 00 00 00 00 BD BD' + 'BD BD BD BD BD BD BD BD BD BD BD 05 46 43 43 46' + '05 BD BD BD BD BD BD BD BD BD BD BD BD BD 6E 6E' + '6E 6E 6E 6E 6E 6E 6E 6E 6E 6E 6E 69 41 46 46 41' + '69 6E 6E 6E 6E 6E 6E 6E 6E 6E 6E 6E 6E 6E 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 47 46 46 47' + 'BD 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 44 46 6A 6A 46' + '44 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 BD BD BD BD BD BD BD BD BD 10 0F 0D 0D 0F' + '11 BD BD BD BD BD BD BD BD 00 00 00 00 00 00 00' + '00 BD BD 0A 2D 2D 33 32 31 2F 2D 25 24 21 20 23' + '22 26 26 26 21 28 2E 1E 06 BD 00 00 00 00 00 00' + '00 BD 0A 79 B5 AB 63 70 74 7A 91 93 97 98 9D 9D' + '9C 9E 9B 99 8D 84 3F 5C 4F 03 BD 00 00 00 00 00' + '00 BD 21 B7 A7 A5 0E 1D 3A 4D 58 5F 68 64 5A 57' + '64 72 61 54 90 48 40 3E 8F 17 BD 00 00 00 00 00' + '00 BD 2C B3 A8 A4 1F 3B 4C 52 5F 63 70 64 53 50' + '5D 6C 56 4B 88 7B 5B 6B 7E 17 BD 00 00 00 00 00' + '00 BD 2A B4 AA A9 2B 36 4A 4E 5A 61 6F 5E 39 35' + '4D 5D 49 33 8A 82 85 7F 79 16 BD 00 00 00 00 00' + '00 BD 2A B6 AD A9 49 50 56 5D 63 66 70 65 57 55' + '5F 67 58 51 86 81 7A 7A 7D 15 BD 00 00 00 00 00' + '00 BD 29 B8 B1 B0 BA B9 B5 B3 AF AD AA A8 AB A9' + 'A5 A1 A1 A1 97 95 93 8A 80 14 BD 00 00 00 00 00' + '00 BD 27 BC B0 AE AD A8 A8 A7 A8 A8 A9 A8 A8 A8' + 'A8 A8 A8 A7 AA AE AD B9 96 12 BD 00 00 00 00 00' + '00 BD 2C BC 83 6D 75 99 98 98 98 98 97 97 97 97' + '98 98 98 99 92 71 71 97 B6 17 BD 00 00 00 00 00' + '00 BD 1B BC 68 73 62 92 98 96 94 92 95 96 96 95' + '92 93 95 9B 74 6E 63 86 A9 0E BD 00 00 00 00 00' + '00 BD 14 A9 8D 91 83 91 8D 9A A5 A4 A7 AB AB A8' + 'A5 A6 9C 8E 8E 8E 80 99 77 07 BD 00 00 00 00 00' + '00 BD 09 92 92 8B 8C 8C AA A7 9B 99 98 97 97 98' + '99 9C A7 AA 91 89 8C A3 54 BD BD 00 00 00 00 00' + '00 BD 01 60 99 87 8C A6 94 8D 91 91 8E 91 91 91' + '91 91 8C 8E A7 8E 83 AA 30 BD BD 00 00 00 00 00' + '00 BD BD 38 A5 87 9B 93 8D 91 8E 91 8C 89 8A 8A' + '8A 8A 8A 89 8B 9B 7D B0 19 BD BD 00 00 00 00 00' + '00 00 BD 1C AB 8E 99 8D 91 91 91 91 91 8B 7C 7D' + '80 81 81 81 7D 8C 81 AC 0B BD 00 00 00 00 00 00' + '00 00 BD 13 AF 92 92 93 92 92 92 92 92 93 8C 80' + '79 78 77 79 79 79 83 97 01 BD 00 00 00 00 00 00' + '00 00 BD 02 9F 9A 8B 99 97 98 98 98 98 98 98 99' + '98 95 91 8B 87 73 87 6F BD BD 00 00 00 00 00 00' + '00 00 BD BD 81 A4 94 94 9F 9D 9C 9C 9C 9C 9C 9C' + '9D 9D 9E A0 97 94 9E 4B BD BD 00 00 00 00 00 00' + '00 00 00 BD 51 A7 A4 96 97 A1 A4 A2 A2 A2 A2 A2' + 'A2 A4 A0 99 93 A8 99 26 BD 00 00 00 00 00 00 00' + '00 00 00 BD 33 A7 A8 A8 A0 92 9A A3 A4 A5 A5 A4' + 'A3 9A 92 A0 A9 AC 8D 18 BD 00 00 00 00 00 00 00' + '00 00 00 BD 1A 9E AB 9A AD AF A7 A3 A2 9F 9F A2' + 'A3 A5 AF A5 9C B2 83 0E BD 00 00 00 00 00 00 00' + '00 00 00 BD 17 9F 7A 66 81 B3 B1 B1 B1 B0 B0 B1' + 'B1 B1 AE 71 66 A8 76 0C BD 00 00 00 00 00 00 00' + '00 00 00 BD 08 59 AD A5 B6 BB BA BA BA BA BA BA' + 'BA BA BA B2 A7 A6 37 BD BD 00 00 00 00 00 00 00' + '00 00 00 BD BD 0C 38 3B 3A 39 39 39 39 39 39 39' + '39 39 39 3A 3C 34 04 BD 00 00 00 00 00 00 00 00' + '00 00 00 00 BD BD BD BD BD BD BD BD BD BD BD BD' + 'BD BD BD BD BD BD BD 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF F8' + '8F FF 00 00 00 00 00 00 00 00 FF FC 1F FF FF F8' + '1F FF F0 00 00 1F E0 00 00 0F E0 00 00 07 E0 00' + '00 07 E0 00 00 07 E0 00 00 07 E0 00 00 07 E0 00' + '00 07 E0 00 00 07 E0 00 00 07 E0 00 00 07 E0 00' + '00 07 E0 00 00 07 E0 00 00 07 E0 00 00 07 F0 00' + '00 0F F0 00 00 0F F0 00 00 0F F0 00 00 0F F8 00' + '00 1F F8 00 00 1F F8 00 00 1F F8 00 00 1F F8 00' + '00 1F F8 00 00 3F FC 00 00 7F FF FF FF FF 28 00' + '00 00 10 00 00 00 20 00 00 00 01 00 08 00 00 00' + '00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 06 06 06 00 09 09' + '09 00 19 19 19 00 22 22 22 00 26 26 26 00 3F 3F' + '3F 00 5F 5F 5F 00 6B 6B 6B 00 6C 6C 6C 00 75 75' + '75 00 7E 7E 7E 00 7F 7F 7F 00 00 00 FF 00 8A 8A' + '8A 00 8D 8D 8D 00 8E 8E 8E 00 8F 8F 8F 00 94 94' + '94 00 99 99 99 00 9C 9C 9C 00 A3 A3 A3 00 A4 A4' + 'A4 00 A5 A5 A5 00 A7 A7 A7 00 A8 A8 A8 00 A9 A9' + 'A9 00 AB AC AC 00 B3 B4 B3 00 B5 B5 B5 00 B7 B7' + 'B7 00 B8 B8 B8 00 B9 B9 B9 00 BA BA BA 00 BD BD' + 'BD 00 BF BF BF 00 91 D8 B5 00 C0 C0 C0 00 C2 C2' + 'C2 00 C3 C3 C3 00 C6 C3 C5 00 C4 C4 C4 00 C5 C5' + 'C5 00 C8 C8 C8 00 C9 C9 C9 00 CA CA CA 00 CB CB' + 'CB 00 CD CD CD 00 CE CE CE 00 CF CF CF 00 D0 D0' + 'D0 00 D1 D1 D1 00 D2 D2 D2 00 D3 D3 D3 00 D7 D7' + 'D7 00 D8 D8 D8 00 D9 D9 D9 00 DA DA DA 00 DB DB' + 'DB 00 DC DC DC 00 DF DF DF 00 E1 E1 E1 00 E2 E2' + 'E2 00 E4 E4 E4 00 E5 E5 E5 00 E7 E7 E7 00 EB EB' + 'EB 00 EC EC EC 00 ED ED ED 00 EE EE EE 00 EF EF' + 'EF 00 F0 F0 F0 00 F1 F1 F1 00 F3 F3 F3 00 F4 F4' + 'F4 00 F5 F5 F5 00 F6 F6 F6 00 00 00 00 00 8F 8F' + '8F 00 91 89 8C 00 90 90 90 00 91 91 91 00 94 94' + '94 00 95 95 95 00 97 97 97 00 99 99 99 00 9A 9A' + '9A 00 9C 9C 9C 00 9D 9D 9D 00 9E 9E 9E 00 9F 9F' + '9F 00 94 B6 A4 00 93 BD A9 00 A0 A0 A0 00 A1 A1' + 'A1 00 A3 A3 A3 00 A4 A4 A4 00 A5 A5 A5 00 A8 A8' + 'A8 00 A9 A9 A9 00 AA AA AA 00 AC AC AC 00 AD AD' + 'AD 00 AE AE AE 00 AF AF AF 00 B8 B8 A7 00 AA AA' + 'BC 00 AD B9 B3 00 B0 B0 B0 00 B1 B1 B1 00 B2 B2' + 'B2 00 B3 B3 B3 00 B4 B4 B4 00 B5 B5 B5 00 B6 B6' + 'B6 00 B7 B7 B7 00 B9 B9 B9 00 BC BC BC 00 BD BD' + 'BD 00 BE BE BE 00 BF BF BF 00 C0 C0 C0 00 C1 C1' + 'C1 00 C2 C0 C1 00 C2 C2 C2 00 C3 C3 C3 00 C4 C1' + 'C2 00 C5 C2 C4 00 C4 C4 C4 00 C5 C5 C5 00 C6 C5' + 'C6 00 C6 C6 C6 00 C8 C3 C5 00 CC C4 C8 00 C8 C8' + 'C8 00 C9 C9 C9 00 CB C9 CA 00 CA CA CA 00 CB CB' + 'CB 00 CC CC CC 00 CD CD CD 00 CE CE CE 00 CF CF' + 'CF 00 D2 C1 CA 00 D3 C8 CD 00 D0 D0 D0 00 D1 D1' + 'D1 00 D2 D2 D2 00 D3 D3 D3 00 D4 D4 D4 00 D5 D5' + 'D5 00 D6 D6 D6 00 D7 D7 D7 00 D8 D8 D8 00 D9 D9' + 'D9 00 DA DA DA 00 DB DB DB 00 DC DC DC 00 DD DD' + 'DD 00 DE DE DE 00 DF DF DF 00 E0 E0 E0 00 E1 E1' + 'E1 00 E2 E2 E2 00 E3 E3 E3 00 E4 E4 E4 00 E5 E5' + 'E5 00 E6 E6 E6 00 E7 E7 E7 00 E8 E8 E8 00 E9 E9' + 'E9 00 EA EA EA 00 EB EB EB 00 EC EC EC 00 ED ED' + 'ED 00 EE EE EE 00 EF EF EF 00 F0 F0 F0 00 F1 F1' + 'F1 00 F2 F2 F2 00 F4 F4 F4 00 F5 F5 F5 00 F6 F6' + 'F6 00 F7 F7 F7 00 F8 F8 F8 00 F9 F9 F9 00 FC FC' + 'FC 00 FD FD FD 00 FF FF FF 00 00 00 00 00 00 00' + '00 00 02 00 00 00 80 00 00 00 00 00 00 00 8C 1A' + '95 00 7F E9 4B 00 08 6C 0C 01 00 00 00 C0 00 00' + '00 00 80 1A 95 00 02 00 00 00 80 00 00 00 00 00' + '00 00 C0 27 95 00 C4 F5 AF 00 02 00 00 00 44 3A' + '5C 6F 73 65 78 70 65 72 74 73 5C 72 65 61 63 74' + '6F 73 5C 6C 69 62 5C 73 68 65 6C 6C 33 32 5C 6E' + '65 74 64 72 69 76 65 32 2E 69 63 6F 00 00 14 1A' + '95 00 1F 3B D4 77 15 00 00 00 A8 00 00 00 4F 3B' + 'D4 77 E0 19 95 00 33 3B D4 77 64 C5 F5 77 A9 F1' + 'E7 77 F8 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 1A 95 00 B0 6C 38 00 96 00 00 00 00 00' + '00 00 C9 F1 E7 77 96 00 00 00 A4 1A 95 00 09 00' + '00 00 00 00 00 00 96 00 00 00 96 00 00 00 09 00' + '00 00 F4 19 95 00 33 3B D4 77 B4 1A 95 00 09 48' + 'E9 77 B8 10 E9 77 FF FF FF FF C9 F1 E7 77 16 EA' + '4B 00 F8 00 00 00 B0 6C 38 00 96 00 00 00 58 1A' + '95 00 00 00 00 00 4D 4D 4D 4D 4D 4D 4D 0D 0D 4D' + '4D 4D 4D 4D 4D 4D 25 25 25 25 25 25 25 0D 0D 25' + '25 25 25 25 25 25 00 00 00 4D 4D 4D 4D 4D 4D 4D' + '4D 4D 4D 4D 00 00 00 00 05 2F 2F 2C 2A 26 25 23' + '21 1C 1B 02 00 00 00 4D 33 41 07 11 18 20 1F 12' + '1E 28 24 10 00 00 00 4D 33 42 09 0E 15 20 17 08' + '16 2B 26 10 00 00 00 4D 35 4C 4B 4A 49 48 47 46' + '45 44 42 0F 00 00 00 4D 39 1A 27 37 37 36 36 37' + '37 19 1D 14 00 00 00 00 0B 31 33 3C 3D 3B 3B 3D' + '3D 32 33 06 00 00 00 00 04 2D 3F 33 32 2F 30 30' + '30 3E 2C 4D 00 00 00 00 4D 33 33 33 33 33 27 29' + '29 29 2E 4D 00 00 00 00 4D 3A 34 39 39 39 39 39' + '39 31 2D 4D 00 00 00 00 4D 2C 3F 34 40 3F 3F 40' + '34 3F 19 4D 00 00 00 00 4D 13 22 43 45 43 43 45' + '3F 33 0A 4D 00 00 00 00 00 03 35 37 37 37 37 37' + '38 2F 01 00 00 00 00 00 00 00 4D 4D 4D 4D 4D 4D' + '4D 4D 00 00 00 00 00 00 00 00 00 00 00 00 E0 03' + '00 00 C0 03 00 00 80 03 00 00 80 03 00 00 80 03' + '00 00 80 03 00 00 C0 03 00 00 C0 03 00 00 C0 03' + '00 00 C0 03 00 00 C0 03 00 00 C0 03 00 00 E0 07' + '00 00 F0 0F 00 00 28 00 00 00 20 00 00 00 40 00' + '00 00 01 00 04 00 00 00 00 00 00 02 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 80 00 00 00 00 80 00 00 80 80 00 00 00 00' + '80 00 80 00 80 00 00 80 80 00 C0 C0 C0 00 80 80' + '80 00 FF 00 00 00 00 FF 00 00 FF FF 00 00 00 00' + 'FF 00 FF 00 FF 00 00 FF FF 00 FF FF FF 00 00 00' + '00 00 00 00 0C C0 0C C0 00 00 00 00 00 00 00 00' + '00 00 00 00 00 CC CC 00 00 00 00 00 00 00 77 77' + '77 77 77 77 77 8C C8 77 77 77 77 77 77 77 00 00' + '00 00 00 00 00 CC CC 00 00 00 00 00 00 00 00 00' + '00 00 00 00 0C C7 7C C0 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 88 88 88 88 88 88 88 88 88 88 00 00 00 00 00' + '07 FF 77 77 77 77 77 77 77 77 67 80 00 00 00 00' + '8F FF 08 88 87 77 88 77 78 78 66 70 00 00 00 00' + '8F FF 88 88 77 77 88 77 88 77 77 70 00 00 00 00' + '8F FF 88 88 87 77 88 87 88 77 77 70 00 00 00 00' + '8F FF 88 87 77 77 88 77 88 77 77 70 00 00 00 00' + '8F FF FF FF FF FF FF FF FF 77 77 70 00 00 00 00' + '8F FF FF FF FF FF FF FF FF FF FF 70 00 00 00 00' + '8F 77 77 77 77 77 77 77 77 77 77 F0 00 00 00 00' + '8F 77 77 77 77 77 77 77 77 77 77 F0 00 00 00 00' + '0F 77 77 77 FF FF FF FF 77 77 77 70 00 00 00 00' + '07 77 77 FF 77 77 77 77 FF 77 7F 80 00 00 00 00' + '07 77 7F 77 77 77 77 77 77 F7 7F 80 00 00 00 00' + '08 F7 77 77 77 77 77 77 77 77 7F 00 00 00 00 00' + '08 F7 77 77 77 77 77 77 77 77 7F 00 00 00 00 00' + '00 F7 77 77 77 77 77 77 77 77 77 00 00 00 00 00' + '00 77 77 77 77 77 77 77 77 77 77 00 00 00 00 00' + '00 7F 77 77 77 77 77 77 77 77 78 00 00 00 00 00' + '00 8F F7 7F FF FF FF FF 77 7F 78 00 00 00 00 00' + '00 8F FF 77 7F FF FF F7 77 FF 70 00 00 00 00 00' + '00 07 F7 FF FF F7 7F FF FF 7F 70 00 00 00 00 00' + '00 07 77 7F FF FF FF FF F7 7F 70 00 00 00 00 00' + '00 08 FF FF FF FF FF FF FF FF 80 00 00 00 00 00' + '00 00 88 88 88 88 88 88 88 88 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF F8' + '8F FF 00 00 00 00 00 00 00 00 FF FC 1F FF FF F8' + '1F FF F0 00 00 07 E0 00 00 07 E0 00 00 07 E0 00' + '00 07 E0 00 00 07 E0 00 00 07 E0 00 00 07 E0 00' + '00 07 E0 00 00 07 E0 00 00 07 E0 00 00 07 E0 00' + '00 07 E0 00 00 07 E0 00 00 07 E0 00 00 07 F0 00' + '00 0F F0 00 00 0F F0 00 00 0F F0 00 00 0F F8 00' + '00 1F F8 00 00 1F F8 00 00 1F F8 00 00 1F F8 00' + '00 1F F8 00 00 3F FC 00 00 7F FF FF FF FF 28 00' + '00 00 10 00 00 00 20 00 00 00 01 00 04 00 00 00' + '00 00 80 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 80 00 00 00 00 80' + '00 00 80 80 00 00 00 00 80 00 80 00 80 00 00 80' + '80 00 C0 C0 C0 00 80 80 80 00 FF 00 00 00 00 FF' + '00 00 FF FF 00 00 00 00 FF 00 FF 00 FF 00 00 FF' + 'FF 00 FF FF FF 00 00 00 00 0C C0 00 00 00 77 77' + '77 7C C7 77 77 77 00 00 00 00 00 00 00 00 00 07' + '77 77 77 77 70 00 00 7F 88 77 78 77 78 00 00 7F' + '88 77 78 77 78 00 00 7F FF FF FF FF F8 00 00 77' + '77 77 77 77 78 00 00 87 77 F7 7F F7 70 00 00 07' + 'F7 77 77 7F 70 00 00 07 77 77 77 77 70 00 00 07' + '77 77 77 77 70 00 00 07 F7 FF FF 7F 70 00 00 08' + '7F FF FF F7 80 00 00 00 77 77 77 77 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 E0 03' + '00 00 C0 03 00 00 80 03 00 00 80 03 00 00 80 03' + '00 00 80 03 00 00 C0 03 00 00 C0 03 00 00 C0 03' + '00 00 C0 03 00 00 C0 03 00 00 C0 03 00 00 E0 07' + '00 00 F0 0F 00 00 28 00 00 00 20 00 00 00 40 00' + '00 00 01 00 20 00 00 00 00 00 00 10 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 FF FF 00 00 FF FF 00 00 00 30 00 00' + '00 00 00 00 FF FF 00 00 FF FF 00 00 00 30 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 90 00 00 00 90 00 00 00 90 00 00 00 90 00 00' + '00 90 00 00 00 90 00 00 00 90 00 00 00 90 00 00' + '00 90 00 00 00 90 00 00 00 90 00 00 00 90 00 00' + '00 90 00 00 00 90 00 00 FF FF 00 00 FF FF 00 00' + 'FF FF 00 00 FF FF 00 00 00 9C 00 00 00 90 00 00' + '00 90 00 00 00 90 00 00 00 90 00 00 00 90 00 00' + '00 90 00 00 00 90 00 00 00 90 00 00 00 90 00 00' + '00 90 00 00 00 90 00 00 00 90 00 00 00 90 80 80' + '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' + '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' + '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' + '80 FF 80 80 80 FF 80 80 80 FF 00 00 FF FF 00 00' + 'FF FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' + '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' + '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' + '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 FF FF 00 00 FF FF 00 00' + 'FF FF 00 00 FF FF 00 00 00 3C 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 01 00 00 00 04 00 00 00 09 00 00' + '00 09 00 00 00 09 00 00 00 09 00 00 00 09 00 00' + '00 09 00 00 FF FF 00 00 FF FF C0 C0 C0 FF C0 C0' + 'C0 FF 00 00 FF FF 00 00 FF FF 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 05 00 00 00 C5 00 00 00 F7 00 00 00 F7 00 00' + '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' + '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' + '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' + '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' + '00 F7 00 00 00 F1 00 00 00 B1 00 00 00 0D 00 00' + '00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 05 00 00' + '00 9B 00 00 00 FF 21 21 21 FF 2B 2B 2B FF 2C 2C' + '2C FF 2B 2B 2B FF 2B 2B 2B FF 2B 2B 2B FF 2B 2B' + '2B FF 2B 2B 2B FF 2B 2B 2B FF 2B 2B 2B FF 2A 2A' + '2A FF 2A 2A 2A FF 2A 2A 2A FF 2A 2A 2A FF 2A 2A' + '2A FF 2A 2A 2A FF 2B 2B 2B FF 2B 2B 2B FF 2E 2C' + '2D FF 13 13 13 FF 00 00 00 FF 00 00 00 69 00 00' + '00 09 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 AD 01 01' + '01 FF EB EB EB FF E8 E8 E8 FF D5 D5 D5 FF 85 85' + '85 FF 92 92 92 FF 98 98 98 FF AD AD AD FF BA BA' + 'BA FF C3 C3 C3 FF C6 C6 C6 FF CA CA CA FF CA CA' + 'CA FF CA CA CA FF D3 D3 D3 FF D7 D7 D7 FF CC CC' + 'CC FF C7 C7 C7 FF C8 C9 C9 FF 9D B3 A8 FF 20 A8' + '63 FF 90 AF A0 FF BF BB BD FF 00 00 00 FF 00 00' + '00 81 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 F0 19 19' + '19 FF EC EC EC FF E2 E2 E2 FF CB CB CB FF 3B 3B' + '3B FF 56 56 56 FF 72 72 72 FF 92 92 92 FF 9D 9D' + '9D FF A8 A8 A8 FF AC AC AC FF A9 A9 A9 FF 9C 9C' + '9C FF 99 99 99 FF B7 B7 B7 FF C3 C3 C3 FF A3 A3' + 'A3 FF 98 98 98 FF C5 C4 C4 FF 51 A7 7C FF 17 CE' + '71 FF 2F 99 64 FF C3 BD C0 FF 01 01 01 FF 00 00' + '00 A3 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 F9 28 28' + '28 FF EC EC EC FF E6 E6 E6 FF D1 D1 D1 FF 68 68' + '68 FF 7E 7E 7E FF 85 85 85 FF 97 97 97 FF A0 A0' + 'A0 FF AA AA AA FF AE AE AE FF 9F 9F 9F FF 83 83' + '83 FF 7C 7C 7C FF A8 A8 A8 FF BB BB BB FF 8A 8A' + '8A FF 79 79 79 FF C2 C2 C2 FF C6 C3 C4 FF 99 AC' + 'A2 FF C2 BE C0 FF C4 C4 C4 FF 01 01 01 FF 00 00' + '00 BA 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 F9 28 28' + '28 FF EE EE EE FF E7 E7 E7 FF D6 D6 D6 FF 70 70' + '70 FF 7D 7D 7D FF 85 85 85 FF 97 97 97 FF A0 A0' + 'A0 FF AA AA AA FF AE AE AE FF 98 98 98 FF 73 73' + '73 FF 6A 6A 6A FF A0 A0 A0 FF B7 B7 B7 FF 7C 7C' + '7C FF 67 67 67 FF C2 C2 C2 FF C4 C3 C4 FF C7 C4' + 'C5 FF BF BF BF FF C5 C5 C5 FF 01 01 01 FF 00 00' + '00 B9 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 F9 27 27' + '27 FF F2 F2 F2 FF EB EB EB FF DF DF DF FF A7 A7' + 'A7 FF AB AB AB FF AE AE AE FF B3 B3 B3 FF B6 B6' + 'B6 FF B9 B9 B9 FF BA BA BA FF B7 B7 B7 FF B1 B1' + 'B1 FF AF AF AF FF BA BA BA FF BE BE BE FF B0 B0' + 'B0 FF AB AB AB FF C5 C5 C5 FF C6 C6 C6 FF C4 C4' + 'C4 FF C2 C2 C2 FF C9 C9 C9 FF 00 00 00 FF 00 00' + '00 B9 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 F9 26 26' + '26 FF F3 F3 F3 FF EB EB EB FF EA EA EA FF ED ED' + 'ED FF E9 E9 E9 FF E8 E8 E8 FF E4 E4 E4 FF E2 E2' + 'E2 FF DF DF DF FF DE DE DE FF DB DB DB FF DC DC' + 'DC FF D9 D9 D9 FF D6 D6 D6 FF D2 D2 D2 FF D2 D2' + 'D2 FF D0 D0 D0 FF CB CB CB FF C9 C9 C9 FF C7 C7' + 'C7 FF C0 C0 C0 FF CA CA CA FF 00 00 00 FF 00 00' + '00 B9 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 F9 24 24' + '24 FF FF FF FF FF E9 E9 E9 FF E2 E2 E2 FF E2 E2' + 'E2 FF DF DF DF FF DF DF DF FF DF DF DF FF DF DF' + 'DF FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' + 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' + 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E3 E3 E3 FF E3 E3' + 'E3 FF F8 F8 F8 FF EF EF EF FF 00 00 00 FF 00 00' + '00 B9 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 FA 24 24' + '24 FF F8 F8 F8 FF D9 D9 D9 FF BB BB BB FF BF BF' + 'BF FF DA DA DA FF D9 D9 D9 FF D9 D9 D9 FF D9 D9' + 'D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9' + 'D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9' + 'D9 FF D9 D9 D9 FF DB DB DB FF BC BC BC FF BB BB' + 'BB FF DE DE DE FF FF FF FF FF 00 00 00 FF 00 00' + '00 BA 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 D0 05 05' + '05 FF F6 F6 F6 FF BC BC BC FF C3 C3 C3 FF AB AB' + 'AB FF D8 D8 D8 FF D5 D5 D5 FF D5 D5 D5 FF D4 D4' + 'D4 FF D3 D3 D3 FF D5 D5 D5 FF D8 D8 D8 FF D8 D8' + 'D8 FF D5 D5 D5 FF D3 D3 D3 FF D3 D3 D3 FF D4 D4' + 'D4 FF D7 D7 D7 FF C9 C9 C9 FF C3 C3 C3 FF B3 B3' + 'B3 FF D6 D6 D6 FF F5 F5 F5 FF 00 00 00 FF 00 00' + '00 8C 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 9C 00 00' + '00 FF F4 F4 F4 FF CF CF CF FF D2 D2 D2 FF BF BF' + 'BF FF D3 D3 D3 FF D2 D2 D2 FF D3 D3 D3 FF DD DD' + 'DD FF E3 E3 E3 FF E6 E6 E6 FF ED ED ED FF ED ED' + 'ED FF E7 E7 E7 FF E4 E4 E4 FF DE DE DE FF D4 D4' + 'D4 FF D2 D2 D2 FF D3 D3 D3 FF D0 D0 D0 FF C2 C2' + 'C2 FF D9 D9 D9 FF E8 E8 E8 FF 00 00 00 FF 00 00' + '00 72 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 59 00 00' + '00 FF E9 E9 E9 FF D0 D0 D0 FF CD CD CD FF CD CD' + 'CD FF D6 D6 D6 FF ED ED ED FF DC DC DC FF D4 D4' + 'D4 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6' + 'D6 FF D6 D6 D6 FF D6 D6 D6 FF D5 D5 D5 FF DB DB' + 'DB FF ED ED ED FF DA DA DA FF CD CD CD FF CD CD' + 'CD FF DF DF DF FF B8 B8 B8 FF 00 00 00 FB 00 00' + '00 3A 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 3E 00 00' + '00 FE D7 D7 D7 FF D2 D2 D2 FF CB CB CB FF CA CA' + 'CA FF E9 E9 E9 FF DC DC DC FF D1 D1 D1 FF D2 D2' + 'D2 FF D2 D2 D2 FF D2 D2 D2 FF D2 D2 D2 FF D2 D2' + 'D2 FF D2 D2 D2 FF D2 D2 D2 FF D2 D2 D2 FF D1 D1' + 'D1 FF D8 D8 D8 FF EA EA EA FF C9 C9 C9 FF CA CA' + 'CA FF E0 E0 E0 FF A0 A0 A0 FF 00 00 00 EB 00 00' + '00 22 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 0C 00 00' + '00 E1 9F 9F 9F FF DD DD DD FF CD CD CD FF DB DB' + 'DB FF CE CE CE FF D0 D0 D0 FF D0 D0 D0 FF D0 D0' + 'D0 FF D0 D0 D0 FF CF CF CF FF C9 C9 C9 FF CA CA' + 'CA FF CA CA CA FF CA CA CA FF CA CA CA FF CA CA' + 'CA FF CA CA CA FF C8 C8 C8 FF DA DA DA FF C7 C7' + 'C7 FF E2 E2 E2 FF 5A 5A 5A FF 00 00 00 94 00 00' + '00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 B2 83 83 83 FF DD DD DD FF D1 D1 D1 FF DB DB' + 'DB FF D0 D0 D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0' + 'D0 FF D0 D0 D0 FF D0 D0 D0 FF C9 C9 C9 FF C5 C5' + 'C5 FF C6 C6 C6 FF C6 C6 C6 FF C6 C6 C6 FF C6 C6' + 'C6 FF C6 C6 C6 FF C6 C6 C6 FF D3 D3 D3 FF C8 C8' + 'C8 FF DE DE DE FF 42 42 42 FF 00 00 00 6C 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 4B 41 41 41 FF D8 D8 D8 FF D2 D2 D2 FF D0 D0' + 'D0 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' + 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' + 'D3 FF C7 C7 C7 FF C4 C4 C4 FF C1 C1 C1 FF C0 C0' + 'C0 FF C1 C1 C1 FF C1 C1 C1 FF BF BF BF FF C0 C0' + 'C0 FF B2 B2 B2 FF 1A 1A 1A FF 00 00 00 28 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 1A 2C 2C 2C FF CC CC CC FF D5 D5 D5 FF CC CC' + 'CC FF D6 D6 D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6' + 'D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6' + 'D6 FF D6 D6 D6 FF D5 D5 D5 FF CF CF CF FF CC CC' + 'CC FF C6 C6 C6 FF C4 C4 C4 FF B3 B3 B3 FF BD BD' + 'BD FF 99 99 99 FF 09 09 09 FF 00 00 00 19 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 02 08 08 08 FF 97 97 97 FF DF DF DF FF DC DC' + 'DC FF D6 D6 D6 FF DE DE DE FF DD DD DD FF DD DD' + 'DD FF DD DD DD FF DD DD DD FF DD DD DD FF DD DD' + 'DD FF DD DD DD FF DD DD DD FF DD DD DD FF DD DD' + 'DD FF DE DE DE FF D8 D8 D8 FF DD DD DD FF DC DC' + 'DC FF 53 53 53 FF 00 00 00 FF 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 FF 77 77 77 FF E2 E2 E2 FF E1 E1' + 'E1 FF CE CE CE FF D7 D7 D7 FF E2 E2 E2 FF E0 E0' + 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' + 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E1 E1' + 'E1 FF D9 D9 D9 FF CD CD CD FF E3 E3 E3 FF D9 D9' + 'D9 FF 39 39 39 FF 00 00 00 FF 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 FF 35 35 35 FF E6 E6 E6 FF E6 E6' + 'E6 FF E7 E7 E7 FF E7 E7 E7 FF D2 D2 D2 FF D3 D3' + 'D3 FF E3 E3 E3 FF E3 E3 E3 FF E4 E4 E4 FF E4 E4' + 'E4 FF E3 E3 E3 FF E3 E3 E3 FF D4 D4 D4 FF D1 D1' + 'D1 FF E7 E7 E7 FF E7 E7 E7 FF E8 E8 E8 FF D4 D4' + 'D4 FF 0B 0B 0B FF 00 00 00 ED 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 F9 1E 1E 1E FF E4 E4 E4 FF ED ED' + 'ED FF E6 E6 E6 FF EC EC EC FF EA EA EA FF E4 E4' + 'E4 FF DF DF DF FF DF DF DF FF DC DC DC FF DC DC' + 'DC FF DF DF DF FF DF DF DF FF E2 E2 E2 FF E9 E9' + 'E9 FF EA EA EA FF E5 E5 E5 FF EB EB EB FF D6 D6' + 'D6 FF 00 00 00 FF 00 00 00 C3 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 AE 00 00 00 FF E0 E0 E0 FF C4 C4' + 'C4 FF B8 B8 B8 FF B2 B2 B2 FF F1 F1 F1 FF F0 F0' + 'F0 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0' + 'F0 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0 F0 FF F3 F3' + 'F3 FF B0 B0 B0 FF B6 B6 B6 FF EB EB EB FF CD CD' + 'CD FF 00 00 00 FF 00 00 00 85 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 80 00 00 00 FF CE CE CE FF DD DD' + 'DD FF D5 D5 D5 FF E4 E4 E4 FF F9 F9 F9 FF F9 F9' + 'F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9' + 'F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9 F9 FF FA FA' + 'FA FF DF DF DF FF D8 D8 D8 FF D7 D7 D7 FF B0 B0' + 'B0 FF 00 00 00 FF 00 00 00 67 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 02 00 00 00 9C 0C 0C 0C FF 3D 3D' + '3D FF 48 48 48 FF 48 48 48 FF 48 48 48 FF 48 48' + '48 FF 48 48 48 FF 48 48 48 FF 48 48 48 FF 48 48' + '48 FF 48 48 48 FF 48 48 48 FF 48 48 48 FF 48 48' + '48 FF 48 48 48 FF 49 49 49 FF 2F 2F 2F FF 02 02' + '02 FF 00 00 00 5C 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 06 00 00 00 F1 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 D6 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF F8' + '8F FF 00 00 00 00 00 00 00 00 FF FC 1F FF F8 00' + '1F FF F0 00 00 07 E0 00 00 07 E0 00 00 07 E0 00' + '00 07 E0 00 00 07 E0 00 00 07 E0 00 00 07 E0 00' + '00 07 E0 00 00 07 E0 00 00 07 E0 00 00 07 E0 00' + '00 07 E0 00 00 07 E0 00 00 07 E0 00 00 07 F0 00' + '00 0F F0 00 00 0F F0 00 00 0F F0 00 00 1F F8 00' + '00 1F F8 00 00 1F F8 00 00 1F F8 00 00 1F F8 00' + '00 1F F8 00 00 3F FC 00 00 7F FF FF FF FF 28 00' + '00 00 30 00 00 00 60 00 00 00 01 00 04 00 00 00' + '00 00 80 04 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 80 00 00 00 00 80' + '00 00 80 80 00 00 00 00 80 00 80 00 80 00 00 80' + '80 00 C0 C0 C0 00 80 80 80 00 FF 00 00 00 00 FF' + '00 00 FF FF 00 00 00 00 FF 00 FF 00 FF 00 00 FF' + 'FF 00 FF FF FF 00 00 00 00 00 00 00 00 00 00 00' + 'CC 00 00 CC 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 CC C0 0C CC 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '0C CC CC C0 00 00 00 00 00 00 00 00 00 00 88 88' + '88 88 88 88 88 88 88 88 88 CC CC 88 88 88 88 88' + '88 88 88 88 88 88 77 77 77 77 77 77 77 77 77 77' + '77 CC CC 77 77 77 77 77 77 77 77 77 77 77 00 00' + '00 00 00 00 00 00 00 00 0C CC CC C0 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + 'CC C7 7C CC 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 CC 07 70 CC 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 87 77 77 77 77 77' + '77 77 77 77 77 77 77 77 77 78 00 00 00 00 00 00' + '00 08 FF F7 88 88 77 77 77 77 77 77 77 77 77 77' + '66 87 80 00 00 00 00 00 00 07 FF F7 00 88 88 87' + '77 77 87 87 77 77 87 78 66 67 80 00 00 00 00 00' + '00 07 FF F7 88 88 88 77 77 77 87 87 87 87 87 77' + '77 87 80 00 00 00 00 00 00 07 FF F7 88 88 88 77' + '77 78 87 87 87 87 87 77 77 77 80 00 00 00 00 00' + '00 07 FF F7 88 88 88 77 77 78 87 87 87 87 87 77' + '77 77 80 00 00 00 00 00 00 07 FF F7 88 88 88 87' + '77 78 87 88 87 87 87 77 77 77 80 00 00 00 00 00' + '00 07 FF F7 77 77 77 77 77 77 77 77 77 77 77 77' + '77 77 80 00 00 00 00 00 00 07 FF FF FF FF FF FF' + '77 77 77 77 77 77 77 77 77 77 80 00 00 00 00 00' + '00 07 FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF F7 80 00 00 00 00 00 00 07 FF FF FF 77 77 7F' + 'FF FF FF FF FF FF FF FF FF FF 80 00 00 00 00 00' + '00 07 F7 77 77 77 77 77 77 77 77 77 77 77 77 77' + '77 7F 80 00 00 00 00 00 00 07 F7 77 77 77 77 77' + '77 77 77 77 77 77 77 77 77 7F 80 00 00 00 00 00' + '00 07 F7 77 77 77 77 77 77 77 77 77 77 77 77 77' + '77 7F 80 00 00 00 00 00 00 07 F7 77 77 77 77 7F' + 'FF FF FF FF F7 77 77 77 77 7F 80 00 00 00 00 00' + '00 08 F7 77 77 77 7F FF 77 77 77 77 FF FF 77 77' + '77 77 00 00 00 00 00 00 00 08 F7 77 77 7F F7 77' + '77 77 77 77 77 7F F7 77 77 77 00 00 00 00 00 00' + '00 00 77 77 77 F7 77 77 77 77 77 77 77 77 7F 77' + '77 F7 00 00 00 00 00 00 00 00 77 77 7F 77 77 77' + '77 77 77 77 77 77 77 F7 77 F8 00 00 00 00 00 00' + '00 00 87 77 77 77 77 77 77 77 77 77 77 77 77 77' + '77 F8 00 00 00 00 00 00 00 00 87 77 77 77 77 77' + '77 77 77 77 77 77 77 77 77 78 00 00 00 00 00 00' + '00 00 87 77 77 77 77 77 77 77 77 77 77 77 77 77' + '77 70 00 00 00 00 00 00 00 00 87 77 77 77 77 77' + '77 77 77 77 77 77 77 77 77 70 00 00 00 00 00 00' + '00 00 07 77 77 77 77 77 77 77 77 77 77 77 77 77' + '77 80 00 00 00 00 00 00 00 00 07 77 77 77 77 77' + '77 77 77 77 77 77 77 77 77 80 00 00 00 00 00 00' + '00 00 08 77 77 77 77 77 77 77 77 77 77 77 77 77' + '77 80 00 00 00 00 00 00 00 00 08 7F F7 77 FF FF' + 'FF FF FF FF FF FF 77 7F 77 00 00 00 00 00 00 00' + '00 00 08 7F FF F7 77 FF FF FF FF FF FF 77 7F FF' + '77 00 00 00 00 00 00 00 00 00 00 7F FF FF 77 77' + 'FF FF FF FF 77 77 FF FF 78 00 00 00 00 00 00 00' + '00 00 00 7F FF FF FF FF 77 77 77 77 7F FF FF FF' + '78 00 00 00 00 00 00 00 00 00 00 8F 77 77 FF FF' + 'FF FF FF FF FF FF 77 7F 78 00 00 00 00 00 00 00' + '00 00 00 8F 77 77 FF FF FF FF FF FF FF F7 77 7F' + '78 00 00 00 00 00 00 00 00 00 00 87 77 7F FF FF' + 'FF FF FF FF FF FF 77 77 70 00 00 00 00 00 00 00' + '00 00 00 08 77 77 77 77 77 77 77 77 77 77 77 77' + '80 00 00 00 00 00 00 00 00 00 00 00 08 88 88 88' + '88 88 88 88 88 88 88 80 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 FF FF F1 C7 FF FF 00 00 FF FF' + 'F0 07 FF FF 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF' + 'F8 0F FF FF 00 00 FF FF F0 07 FF FF 00 00 FF FF' + 'F2 07 FF FF 00 00 FC 00 00 00 00 7F 00 00 F8 00' + '00 00 00 3F 00 00 F8 00 00 00 00 1F 00 00 F0 00' + '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F0 00' + '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F0 00' + '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F0 00' + '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F0 00' + '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F0 00' + '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F0 00' + '00 00 00 1F 00 00 F8 00 00 00 00 1F 00 00 F8 00' + '00 00 00 1F 00 00 F8 00 00 00 00 1F 00 00 F8 00' + '00 00 00 1F 00 00 F8 00 00 00 00 1F 00 00 F8 00' + '00 00 00 1F 00 00 FC 00 00 00 00 3F 00 00 FC 00' + '00 00 00 3F 00 00 FC 00 00 00 00 3F 00 00 FC 00' + '00 00 00 3F 00 00 FC 00 00 00 00 3F 00 00 FC 00' + '00 00 00 7F 00 00 FE 00 00 00 00 7F 00 00 FE 00' + '00 00 00 7F 00 00 FE 00 00 00 00 7F 00 00 FE 00' + '00 00 00 7F 00 00 FE 00 00 00 00 7F 00 00 FF 00' + '00 00 00 7F 00 00 FF 00 00 00 00 FF 00 00 FF 00' + '00 00 00 FF 00 00 FF 00 00 00 01 FF 00 00 FF 80' + '00 00 03 FF 00 00 FF E0 00 00 07 FF 00 00 FF FF' + 'FF FF FF FF 00 00 28 00 00 00 30 00 00 00 60 00' + '00 00 01 00 20 00 00 00 00 00 00 24 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + 'FF FF 00 00 FF FF 00 00 00 30 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 FF FF 00 00 FF FF 00 00' + '00 30 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 30 00 00 00 24 00 00 00 30 00 00 00 30 00 00' + '00 30 00 00 00 30 00 00 00 30 00 00 00 30 00 00' + '00 30 00 00 00 30 00 00 00 30 00 00 00 30 00 00' + '00 30 00 00 00 30 00 00 00 30 00 00 00 30 00 00' + '00 30 00 00 00 30 00 00 00 30 00 00 00 30 00 00' + 'FF FF 00 00 FF FF 00 00 FF FF 00 00 00 30 00 00' + '00 30 00 00 FF FF 00 00 FF FF 00 00 FF FF 00 00' + '00 3C 00 00 00 30 00 00 00 30 00 00 00 30 00 00' + '00 30 00 00 00 30 00 00 00 30 00 00 00 30 00 00' + '00 30 00 00 00 30 00 00 00 30 00 00 00 30 00 00' + '00 30 00 00 00 30 00 00 00 30 00 00 00 30 00 00' + '00 30 00 00 00 30 00 00 00 30 00 00 00 30 00 00' + '00 90 00 00 00 90 00 00 00 90 00 00 00 90 00 00' + '00 90 00 00 00 90 00 00 00 90 00 00 00 90 00 00' + '00 90 00 00 00 90 00 00 00 90 00 00 00 90 00 00' + '00 90 00 00 00 90 00 00 00 90 00 00 00 90 00 00' + '00 90 00 00 00 90 00 00 00 90 00 00 00 90 00 00' + '00 90 00 00 FF FF 00 00 FF FF 00 00 FF FF 00 00' + 'FF FF 00 00 FF FF 00 00 FF FF 00 00 00 9C 00 00' + '00 90 00 00 00 90 00 00 00 90 00 00 00 90 00 00' + '00 90 00 00 00 90 00 00 00 90 00 00 00 90 00 00' + '00 90 00 00 00 90 00 00 00 90 00 00 00 90 00 00' + '00 90 00 00 00 90 00 00 00 90 00 00 00 90 00 00' + '00 90 00 00 00 90 00 00 00 90 00 00 00 90 80 80' + '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' + '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' + '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' + '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' + '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' + '80 FF 80 80 80 FF 00 00 FF FF 00 00 FF FF 00 00' + 'FF FF 00 00 FF FF 80 80 80 FF 80 80 80 FF 80 80' + '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' + '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' + '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' + '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' + '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF C0 C0' + 'C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0' + 'C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0' + 'C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0' + 'C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0' + 'C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0' + 'C0 FF C0 C0 C0 FF 00 00 FF FF 00 00 FF FF 00 00' + 'FF FF 00 00 FF FF C0 C0 C0 FF C0 C0 C0 FF C0 C0' + 'C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0' + 'C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0' + 'C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0' + 'C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0' + 'C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0 C0 FF 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 FF FF 00 00 FF FF 00 00 FF FF 00 00' + 'FF FF 00 00 FF FF 00 00 FF FF 00 00 00 3C 00 00' + '00 18 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 09 00 00' + 'FF FF 00 00 FF FF 00 00 FF FF C0 C0 C0 FF C0 C0' + 'C0 FF 00 00 FF FF 00 00 FF FF 00 00 FF FF 00 00' + '00 15 00 00 00 09 00 00 00 09 00 00 00 09 00 00' + '00 09 00 00 00 09 00 00 00 09 00 00 00 09 00 00' + '00 09 00 00 00 09 00 00 00 09 00 00 00 07 00 00' + '00 04 00 00 00 01 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 16 00 00 00 34 00 00 00 37 00 00 00 37 00 00' + '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' + '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' + 'FF FF 00 00 FF FF 00 00 00 37 C0 C0 C0 FF C0 C0' + 'C0 FF 00 00 00 37 00 00 FF FF 00 00 FF FF 00 00' + '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' + '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' + '00 37 00 00 00 37 00 00 00 35 00 00 00 18 00 00' + '00 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 05 00 00 00 69 00 00' + '00 C5 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' + '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' + '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' + '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' + '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' + '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' + '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' + '00 F7 00 00 00 F7 00 00 00 F1 00 00 00 B1 00 00' + '00 5C 00 00 00 0D 00 00 00 01 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 05 00 00 00 9B 00 00 00 FF 00 00' + '00 FF 21 21 21 FF 2C 2C 2C FF 2B 2B 2B FF 2C 2C' + '2C FF 2B 2B 2B FF 2B 2B 2B FF 2B 2B 2B FF 2B 2B' + '2B FF 2B 2B 2B FF 2B 2B 2B FF 2B 2B 2B FF 2B 2B' + '2B FF 2B 2B 2B FF 2B 2B 2B FF 2B 2B 2B FF 2A 2A' + '2A FF 2A 2A 2A FF 2A 2A 2A FF 2A 2A 2A FF 2A 2A' + '2A FF 2A 2A 2A FF 2A 2A 2A FF 2A 2A 2A FF 2A 2A' + '2A FF 2B 2B 2B FF 2B 2B 2B FF 2B 2B 2B FF 2E 2C' + '2D FF 2E 2C 2D FF 13 13 13 FF 00 00 00 FF 00 00' + '00 F6 00 00 00 69 00 00 00 09 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 54 00 00 00 FF 26 26 26 FF 90 90' + '90 FF CA CA CA FF CD CD CD FF CB CB CB FF CE CE' + 'CE FF CD CD CD FF CC CC CC FF CB CB CB FF C9 C9' + 'C9 FF C7 C7 C7 FF C6 C6 C6 FF C5 C5 C5 FF C4 C4' + 'C4 FF C3 C3 C3 FF C2 C2 C2 FF C2 C2 C2 FF C3 C3' + 'C3 FF C0 C0 C0 FF C1 C1 C1 FF BF BF BF FF BF BF' + 'BF FF BC BC BC FF BD BD BD FF BA BA BA FF BB BB' + 'BB FF B5 B5 B5 FF B3 B4 B3 FF B8 B4 B6 FF AD AD' + 'AD FF AB AC AC FF AD A8 AB FF 63 63 63 FF 09 09' + '09 FF 00 00 00 EF 00 00 00 42 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 03 00 00 00 AD 01 01 01 FF 8A 8A 8A FF EB EB' + 'EB FF E8 E8 E8 FF E7 E7 E7 FF D5 D5 D5 FF 85 85' + '85 FF 88 88 88 FF 92 92 92 FF 98 98 98 FF A2 A2' + 'A2 FF AD AD AD FF BA BA BA FF C0 C0 C0 FF C3 C3' + 'C3 FF C6 C6 C6 FF CB CB CB FF CA CA CA FF CA CA' + 'CA FF D6 D6 D6 FF CA CA CA FF D3 D3 D3 FF CB CB' + 'CB FF D7 D7 D7 FF CC CC CC FF D4 D4 D4 FF C7 C7' + 'C7 FF C8 C9 C9 FF C6 C2 C4 FF 9D B3 A8 FF 20 A8' + '63 FF 1C A8 60 FF 90 AF A0 FF BF BB BD FF 4F 4F' + '4F FF 00 00 00 FF 00 00 00 81 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 15 00 00 00 F0 19 19 19 FF C7 C7 C7 FF EC EC' + 'EC FF E2 E2 E2 FF E6 E6 E6 FF CB CB CB FF 3B 3B' + '3B FF 3F 3F 3F FF 56 56 56 FF 72 72 72 FF 87 87' + '87 FF 92 92 92 FF 9D 9D 9D FF A5 A5 A5 FF A8 A8' + 'A8 FF AC AC AC FF B7 B7 B7 FF A9 A9 A9 FF 9C 9C' + '9C FF BD BD BD FF 99 99 99 FF B7 B7 B7 FF A1 A1' + 'A1 FF C3 C3 C3 FF A3 A3 A3 FF BD BD BD FF 98 98' + '98 FF C5 C4 C4 FF C7 BF C3 FF 51 A7 7C FF 17 CE' + '71 FF 0A BF 61 FF 2F 99 64 FF C3 BD C0 FF 84 83' + '84 FF 01 01 01 FF 00 00 00 A3 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 30 00 00 00 FA 29 29 29 FF D1 D1 D1 FF EA EA' + 'EA FF E4 E4 E4 FF E7 E7 E7 FF CD CD CD FF 47 47' + '47 FF 5F 5F 5F FF 79 79 79 FF 87 87 87 FF 8F 8F' + '8F FF 97 97 97 FF A0 A0 A0 FF A7 A7 A7 FF AA AA' + 'AA FF AE AE AE FF B9 B9 B9 FF A4 A4 A4 FF 90 90' + '90 FF B8 B8 B8 FF 8A 8A 8A FF AF AF AF FF 94 94' + '94 FF BF BF BF FF 97 97 97 FF B7 B7 B7 FF 88 88' + '88 FF C4 C3 C3 FF C6 C3 C5 FF 95 B2 A3 FF 91 D6' + 'B4 FF 91 D8 B5 FF 83 AB 97 FF C4 C1 C3 FF 8E 8E' + '8E FF 01 01 01 FF 00 00 00 B7 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 34 00 00 00 F9 28 28 28 FF D1 D1 D1 FF EC EC' + 'EC FF E6 E6 E6 FF E7 E7 E7 FF D1 D1 D1 FF 68 68' + '68 FF 74 74 74 FF 7E 7E 7E FF 85 85 85 FF 8E 8E' + '8E FF 97 97 97 FF A0 A0 A0 FF A7 A7 A7 FF AA AA' + 'AA FF AE AE AE FF BA BA BA FF 9F 9F 9F FF 83 83' + '83 FF B3 B3 B3 FF 7C 7C 7C FF A8 A8 A8 FF 87 87' + '87 FF BB BB BB FF 8A 8A 8A FF B2 B2 B2 FF 79 79' + '79 FF C2 C2 C2 FF C4 C4 C4 FF C6 C3 C4 FF 99 AC' + 'A2 FF 96 AB A0 FF C2 BE C0 FF C4 C4 C4 FF 8D 8D' + '8D FF 01 01 01 FF 00 00 00 BA 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 33 00 00 00 F9 28 28 28 FF D1 D1 D1 FF EE EE' + 'EE FF E7 E7 E7 FF E8 E8 E8 FF D6 D6 D6 FF 70 70' + '70 FF 71 71 71 FF 7D 7D 7D FF 85 85 85 FF 8E 8E' + '8E FF 97 97 97 FF A0 A0 A0 FF A7 A7 A7 FF AA AA' + 'AA FF AE AE AE FF BB BB BB FF 98 98 98 FF 73 73' + '73 FF AD AD AD FF 6A 6A 6A FF A0 A0 A0 FF 78 78' + '78 FF B7 B7 B7 FF 7C 7C 7C FF AB AB AB FF 67 67' + '67 FF C2 C2 C2 FF C6 C6 C6 FF C4 C3 C4 FF C7 C4' + 'C5 FF C6 C2 C4 FF BF BF BF FF C5 C5 C5 FF 8D 8D' + '8D FF 01 01 01 FF 00 00 00 B9 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 33 00 00 00 F9 27 27 27 FF D1 D1 D1 FF EF EF' + 'EF FF E9 E9 E9 FF EB EB EB FF D6 D6 D6 FF 6A 6A' + '6A FF 6C 6C 6C FF 78 78 78 FF 81 81 81 FF 8A 8A' + '8A FF 93 93 93 FF 9C 9C 9C FF A3 A3 A3 FF A6 A6' + 'A6 FF AB AB AB FF B9 B9 B9 FF 90 90 90 FF 66 66' + '66 FF A5 A5 A5 FF 5B 5B 5B FF 98 98 98 FF 6B 6B' + '6B FF B1 B1 B1 FF 70 70 70 FF A4 A4 A4 FF 58 58' + '58 FF C1 C1 C1 FF C8 C8 C8 FF C5 C5 C5 FF C3 C3' + 'C3 FF C2 C2 C2 FF C1 C1 C1 FF C6 C6 C6 FF 8E 8E' + '8E FF 01 01 01 FF 00 00 00 B9 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 33 00 00 00 F9 27 27 27 FF D2 D2 D2 FF F2 F2' + 'F2 FF EB EB EB FF EA EA EA FF DF DF DF FF A7 A7' + 'A7 FF A7 A7 A7 FF AB AB AB FF AE AE AE FF B0 B0' + 'B0 FF B3 B3 B3 FF B6 B6 B6 FF B9 B9 B9 FF B9 B9' + 'B9 FF BA BA BA FF BD BD BD FF B7 B7 B7 FF B1 B1' + 'B1 FF BE BE BE FF AF AF AF FF BA BA BA FF B1 B1' + 'B1 FF BE BE BE FF B0 B0 B0 FF BA BA BA FF AB AB' + 'AB FF C5 C5 C5 FF C8 C8 C8 FF C6 C6 C6 FF C4 C4' + 'C4 FF C3 C3 C3 FF C2 C2 C2 FF C9 C9 C9 FF 8E 8E' + '8E FF 00 00 00 FF 00 00 00 B9 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 33 00 00 00 F9 26 26 26 FF D3 D3 D3 FF F3 F3' + 'F3 FF EB EB EB FF EB EB EB FF EA EA EA FF ED ED' + 'ED FF EB EB EB FF E9 E9 E9 FF E8 E8 E8 FF E6 E6' + 'E6 FF E4 E4 E4 FF E2 E2 E2 FF E1 E1 E1 FF DF DF' + 'DF FF DE DE DE FF DB DB DB FF DB DB DB FF DC DC' + 'DC FF D8 D8 D8 FF D9 D9 D9 FF D6 D6 D6 FF D6 D6' + 'D6 FF D2 D2 D2 FF D2 D2 D2 FF CF CF CF FF D0 D0' + 'D0 FF CB CB CB FF CA CA CA FF C9 C9 C9 FF C7 C7' + 'C7 FF C4 C4 C4 FF C0 C0 C0 FF CA CA CA FF 8E 8E' + '8E FF 00 00 00 FF 00 00 00 B9 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 33 00 00 00 F9 26 26 26 FF D3 D3 D3 FF F7 F7' + 'F7 FF F8 F8 F8 FF F6 F6 F6 FF F6 F6 F6 FF F6 F6' + 'F6 FF F5 F5 F5 FF F5 F5 F5 FF F4 F4 F4 FF F4 F4' + 'F4 FF F3 F3 F3 FF F3 F3 F3 FF F3 F3 F3 FF F2 F2' + 'F2 FF F2 F2 F2 FF F1 F1 F1 FF F1 F1 F1 FF F1 F1' + 'F1 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0 F0 FF EF EF' + 'EF FF EF EF EF FF EE EE EE FF EE EE EE FF ED ED' + 'ED FF ED ED ED FF ED ED ED FF EC EC EC FF EC EC' + 'EC FF EB EB EB FF E0 E0 E0 FF D0 D0 D0 FF 8D 8D' + '8D FF 00 00 00 FF 00 00 00 B9 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 33 00 00 00 F9 24 24 24 FF D6 D6 D6 FF FF FF' + 'FF FF E9 E9 E9 FF E1 E1 E1 FF E2 E2 E2 FF E2 E2' + 'E2 FF E0 E0 E0 FF DF DF DF FF DF DF DF FF DF DF' + 'DF FF DF DF DF FF DF DF DF FF E0 E0 E0 FF E0 E0' + 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' + 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' + 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' + 'E0 FF E0 E0 E0 FF E2 E2 E2 FF E3 E3 E3 FF E3 E3' + 'E3 FF E3 E3 E3 FF F8 F8 F8 FF EF EF EF FF 8C 8C' + '8C FF 00 00 00 FF 00 00 00 B9 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 34 00 00 00 FA 24 24 24 FF DE DE DE FF F8 F8' + 'F8 FF D9 D9 D9 FF C4 C4 C4 FF BB BB BB FF BF BF' + 'BF FF D8 D8 D8 FF DA DA DA FF D9 D9 D9 FF D9 D9' + 'D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9' + 'D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9' + 'D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9' + 'D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9' + 'D9 FF DB DB DB FF CF CF CF FF BC BC BC FF BB BB' + 'BB FF D1 D1 D1 FF DE DE DE FF FF FF FF FF 9A 9A' + '9A FF 00 00 00 FF 00 00 00 BA 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 25 00 00 00 F7 1F 1F 1F FF DA DA DA FF F3 F3' + 'F3 FF C6 C6 C6 FF A9 A9 A9 FF B7 B7 B7 FF B0 B0' + 'B0 FF C3 C3 C3 FF DA DA DA FF D8 D8 D8 FF D8 D8' + 'D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8 D8 FF D7 D7' + 'D7 FF D7 D7 D7 FF D7 D7 D7 FF D7 D7 D7 FF D7 D7' + 'D7 FF D7 D7 D7 FF D7 D7 D7 FF D7 D7 D7 FF D8 D8' + 'D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8 D8 FF D9 D9' + 'D9 FF D2 D2 D2 FF A8 A8 A8 FF B6 B6 B6 FF B1 B1' + 'B1 FF B5 B5 B5 FF D8 D8 D8 FF FC FC FC FF 9C 9C' + '9C FF 00 00 00 FF 00 00 00 AE 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 07 00 00 00 D0 05 05 05 FF C2 C2 C2 FF F6 F6' + 'F6 FF BC BC BC FF B2 B2 B2 FF C3 C3 C3 FF AB AB' + 'AB FF BB BB BB FF D8 D8 D8 FF D5 D5 D5 FF D5 D5' + 'D5 FF D5 D5 D5 FF D4 D4 D4 FF D3 D3 D3 FF D3 D3' + 'D3 FF D5 D5 D5 FF D7 D7 D7 FF D8 D8 D8 FF D8 D8' + 'D8 FF D7 D7 D7 FF D5 D5 D5 FF D3 D3 D3 FF D3 D3' + 'D3 FF D3 D3 D3 FF D4 D4 D4 FF D5 D5 D5 FF D7 D7' + 'D7 FF C9 C9 C9 FF A6 A6 A6 FF C3 C3 C3 FF B3 B3' + 'B3 FF AD AD AD FF D6 D6 D6 FF F5 F5 F5 FF 76 76' + '76 FF 00 00 00 FF 00 00 00 8C 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 9C 00 00 00 FF A4 A4 A4 FF F4 F4' + 'F4 FF CF CF CF FF C5 C5 C5 FF D2 D2 D2 FF BF BF' + 'BF FF C9 C9 C9 FF D3 D3 D3 FF D2 D2 D2 FF D0 D0' + 'D0 FF D3 D3 D3 FF DD DD DD FF E1 E1 E1 FF E3 E3' + 'E3 FF E6 E6 E6 FF EA EA EA FF ED ED ED FF ED ED' + 'ED FF EB EB EB FF E7 E7 E7 FF E4 E4 E4 FF E2 E2' + 'E2 FF DE DE DE FF D4 D4 D4 FF D0 D0 D0 FF D2 D2' + 'D2 FF D3 D3 D3 FF C5 C5 C5 FF D0 D0 D0 FF C2 C2' + 'C2 FF BF BF BF FF D9 D9 D9 FF E8 E8 E8 FF 56 56' + '56 FF 00 00 00 FF 00 00 00 72 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 73 00 00 00 FF 7E 7E 7E FF EF EF' + 'EF FF D1 D1 D1 FF CF CF CF FF CB CB CB FF CF CF' + 'CF FF D1 D1 D1 FF CE CE CE FF CF CF CF FF DF DF' + 'DF FF F0 F0 F0 FF EC EC EC FF E1 E1 E1 FF DE DE' + 'DE FF DD DD DD FF DC DC DC FF DB DB DB FF DB DB' + 'DB FF DC DC DC FF DD DD DD FF DE DE DE FF E1 E1' + 'E1 FF EC EC EC FF F1 F1 F1 FF E1 E1 E1 FF D1 D1' + 'D1 FF CE CE CE FF D0 D0 D0 FF CB CB CB FF CE CE' + 'CE FF D1 D1 D1 FF D9 D9 D9 FF D4 D4 D4 FF 3F 3F' + '3F FF 00 00 00 FF 00 00 00 55 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 59 00 00 00 FF 59 59 59 FF E9 E9' + 'E9 FF D0 D0 D0 FF CD CD CD FF CD CD CD FF CD CD' + 'CD FF CA CA CA FF D6 D6 D6 FF ED ED ED FF E6 E6' + 'E6 FF DC DC DC FF D4 D4 D4 FF D5 D5 D5 FF D6 D6' + 'D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6' + 'D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6 D6 FF D5 D5' + 'D5 FF D5 D5 D5 FF DB DB DB FF E4 E4 E4 FF ED ED' + 'ED FF DA DA DA FF CA CA CA FF CD CD CD FF CD CD' + 'CD FF CB CB CB FF DF DF DF FF B8 B8 B8 FF 22 22' + '22 FF 00 00 00 FB 00 00 00 3A 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 3E 00 00 00 FE 40 40 40 FF D7 D7' + 'D7 FF D2 D2 D2 FF CA CA CA FF CB CB CB FF CA CA' + 'CA FF D4 D4 D4 FF E9 E9 E9 FF DC DC DC FF D0 D0' + 'D0 FF D1 D1 D1 FF D2 D2 D2 FF D2 D2 D2 FF D2 D2' + 'D2 FF D2 D2 D2 FF D2 D2 D2 FF D2 D2 D2 FF D2 D2' + 'D2 FF D2 D2 D2 FF D2 D2 D2 FF D2 D2 D2 FF D2 D2' + 'D2 FF D2 D2 D2 FF D1 D1 D1 FF D0 D0 D0 FF D8 D8' + 'D8 FF EA EA EA FF D8 D8 D8 FF C9 C9 C9 FF CA CA' + 'CA FF C9 C9 C9 FF E0 E0 E0 FF A0 A0 A0 FF 08 08' + '08 FF 00 00 00 EB 00 00 00 22 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 25 00 00 00 F8 22 22 22 FF B7 B7' + 'B7 FF DB DB DB FF CA CA CA FF CB CB CB FF CE CE' + 'CE FF E4 E4 E4 FF D4 D4 D4 FF CF CF CF FF D1 D1' + 'D1 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0' + 'D0 FF CF CF CF FF CD CD CD FF CE CE CE FF CE CE' + 'CE FF CE CE CE FF CE CE CE FF CE CE CE FF CE CE' + 'CE FF CE CE CE FF CE CE CE FF CE CE CE FF CC CC' + 'CC FF D0 D0 D0 FF E2 E2 E2 FF CF CF CF FF C7 C7' + 'C7 FF C9 C9 C9 FF E2 E2 E2 FF 80 80 80 FF 00 00' + '00 FF 00 00 00 C2 00 00 00 0E 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 0C 00 00 00 E1 07 07 07 FF 9F 9F' + '9F FF DD DD DD FF CC CC CC FF CD CD CD FF DB DB' + 'DB FF D6 D6 D6 FF CE CE CE FF D0 D0 D0 FF D0 D0' + 'D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0' + 'D0 FF CF CF CF FF CC CC CC FF C9 C9 C9 FF CA CA' + 'CA FF CA CA CA FF CA CA CA FF CA CA CA FF CA CA' + 'CA FF CA CA CA FF CA CA CA FF CA CA CA FF CA CA' + 'CA FF C8 C8 C8 FF CF CF CF FF DA DA DA FF C7 C7' + 'C7 FF C9 C9 C9 FF E2 E2 E2 FF 5A 5A 5A FF 00 00' + '00 FF 00 00 00 94 00 00 00 01 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 B2 00 00 00 FF 83 83' + '83 FF DD DD DD FF CF CF CF FF D1 D1 D1 FF DB DB' + 'DB FF D1 D1 D1 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0' + 'D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0' + 'D0 FF D0 D0 D0 FF CF CF CF FF C9 C9 C9 FF C5 C5' + 'C5 FF C6 C6 C6 FF C6 C6 C6 FF C6 C6 C6 FF C6 C6' + 'C6 FF C6 C6 C6 FF C6 C6 C6 FF C6 C6 C6 FF C6 C6' + 'C6 FF C6 C6 C6 FF C7 C7 C7 FF D3 D3 D3 FF C8 C8' + 'C8 FF C9 C9 C9 FF DE DE DE FF 42 42 42 FF 00 00' + '00 FF 00 00 00 6C 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 80 00 00 00 FF 5F 5F' + '5F FF DC DC DC FF D1 D1 D1 FF D2 D2 D2 FF D4 D4' + 'D4 FF D1 D1 D1 FF D1 D1 D1 FF D1 D1 D1 FF D1 D1' + 'D1 FF D1 D1 D1 FF D1 D1 D1 FF D1 D1 D1 FF D1 D1' + 'D1 FF D1 D1 D1 FF D1 D1 D1 FF D0 D0 D0 FF C8 C8' + 'C8 FF C3 C3 C3 FF C3 C3 C3 FF C3 C3 C3 FF C4 C4' + 'C4 FF C4 C4 C4 FF C4 C4 C4 FF C4 C4 C4 FF C4 C4' + 'C4 FF C4 C4 C4 FF C4 C4 C4 FF C7 C7 C7 FF C5 C5' + 'C5 FF CB CB CB FF CC CC CC FF 2D 2D 2D FF 00 00' + '00 F8 00 00 00 40 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 4B 00 00 00 FE 41 41' + '41 FF D8 D8 D8 FF D4 D4 D4 FF D2 D2 D2 FF D0 D0' + 'D0 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' + 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' + 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' + 'D3 FF CD CD CD FF C7 C7 C7 FF C4 C4 C4 FF C2 C2' + 'C2 FF C1 C1 C1 FF C0 C0 C0 FF C1 C1 C1 FF C1 C1' + 'C1 FF C1 C1 C1 FF C2 C2 C2 FF BF BF BF FF C0 C0' + 'C0 FF CE CE CE FF B2 B2 B2 FF 1A 1A 1A FF 00 00' + '00 E5 00 00 00 28 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 1A 00 00 00 F2 2C 2C' + '2C FF CC CC CC FF D6 D6 D6 FF D5 D5 D5 FF CC CC' + 'CC FF D5 D5 D5 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6' + 'D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6' + 'D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6' + 'D6 FF D7 D7 D7 FF D6 D6 D6 FF D5 D5 D5 FF D3 D3' + 'D3 FF CF CF CF FF CC CC CC FF C9 C9 C9 FF C6 C6' + 'C6 FF C4 C4 C4 FF C2 C2 C2 FF B3 B3 B3 FF BD BD' + 'BD FF D0 D0 D0 FF 99 99 99 FF 09 09 09 FF 00 00' + '00 CF 00 00 00 19 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 09 00 00 00 D8 18 18' + '18 FF B0 B0 B0 FF DB DB DB FF DB DB DB FF D0 D0' + 'D0 FF D2 D2 D2 FF DB DB DB FF D9 D9 D9 FF DA DA' + 'DA FF DA DA DA FF DA DA DA FF DA DA DA FF DA DA' + 'DA FF DA DA DA FF DA DA DA FF DA DA DA FF DA DA' + 'DA FF DA DA DA FF DA DA DA FF DA DA DA FF DA DA' + 'DA FF DB DB DB FF DB DB DB FF DA DA DA FF D9 D9' + 'D9 FF D9 D9 D9 FF CF CF CF FF C5 C5 C5 FF CC CC' + 'CC FF CA CA CA FF 7A 7A 7A FF 02 02 02 FF 00 00' + '00 B8 00 00 00 0A 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 02 00 00 00 BF 08 08' + '08 FF 97 97 97 FF DC DC DC FF DF DF DF FF DC DC' + 'DC FF CE CE CE FF D6 D6 D6 FF DE DE DE FF DD DD' + 'DD FF DD DD DD FF DD DD DD FF DD DD DD FF DD DD' + 'DD FF DD DD DD FF DD DD DD FF DD DD DD FF DD DD' + 'DD FF DD DD DD FF DD DD DD FF DD DD DD FF DD DD' + 'DD FF DD DD DD FF DD DD DD FF DD DD DD FF DE DE' + 'DE FF D8 D8 D8 FF CE CE CE FF DD DD DD FF DC DC' + 'DC FF C6 C6 C6 FF 53 53 53 FF 00 00 00 FF 00 00' + '00 A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 A4 00 00' + '00 FF 77 77 77 FF D3 D3 D3 FF E2 E2 E2 FF E1 E1' + 'E1 FF DE DE DE FF CE CE CE FF D7 D7 D7 FF E1 E1' + 'E1 FF E2 E2 E2 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' + 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' + 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' + 'E0 FF E0 E0 E0 FF E1 E1 E1 FF E1 E1 E1 FF D9 D9' + 'D9 FF CD CD CD FF DA DA DA FF E3 E3 E3 FF D9 D9' + 'D9 FF BB BB BB FF 39 39 39 FF 00 00 00 FF 00 00' + '00 7E 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 89 00 00' + '00 FF 4B 4B 4B FF C9 C9 C9 FF E5 E5 E5 FF E3 E3' + 'E3 FF E4 E4 E4 FF E1 E1 E1 FF D7 D7 D7 FF D2 D2' + 'D2 FF DA DA DA FF E4 E4 E4 FF E5 E5 E5 FF E4 E4' + 'E4 FF E4 E4 E4 FF E4 E4 E4 FF E4 E4 E4 FF E4 E4' + 'E4 FF E4 E4 E4 FF E4 E4 E4 FF E4 E4 E4 FF E5 E5' + 'E5 FF E5 E5 E5 FF DC DC DC FF D2 D2 D2 FF D6 D6' + 'D6 FF E0 E0 E0 FF E4 E4 E4 FF E6 E6 E6 FF D6 D6' + 'D6 FF A8 A8 A8 FF 20 20 20 FF 00 00 00 FD 00 00' + '00 4E 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 62 00 00' + '00 FF 35 35 35 FF BD BD BD FF E6 E6 E6 FF E6 E6' + 'E6 FF E6 E6 E6 FF E7 E7 E7 FF E7 E7 E7 FF DF DF' + 'DF FF D2 D2 D2 FF D3 D3 D3 FF DE DE DE FF E3 E3' + 'E3 FF E3 E3 E3 FF E4 E4 E4 FF E4 E4 E4 FF E4 E4' + 'E4 FF E4 E4 E4 FF E3 E3 E3 FF E3 E3 E3 FF DE DE' + 'DE FF D4 D4 D4 FF D1 D1 D1 FF DD DD DD FF E7 E7' + 'E7 FF E7 E7 E7 FF E6 E6 E6 FF E8 E8 E8 FF D4 D4' + 'D4 FF 9A 9A 9A FF 0B 0B 0B FF 00 00 00 ED 00 00' + '00 2C 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 2D 00 00' + '00 F9 1E 1E 1E FF AB AB AB FF E4 E4 E4 FF ED ED' + 'ED FF E7 E7 E7 FF E6 E6 E6 FF EC EC EC FF EB EB' + 'EB FF EA EA EA FF E4 E4 E4 FF E0 E0 E0 FF DF DF' + 'DF FF DF DF DF FF DD DD DD FF DC DC DC FF DC DC' + 'DC FF DD DD DD FF DF DF DF FF DF DF DF FF DF DF' + 'DF FF E2 E2 E2 FF E9 E9 E9 FF EC EC EC FF EA EA' + 'EA FF E5 E5 E5 FF EB EB EB FF EB EB EB FF D6 D6' + 'D6 FF 8A 8A 8A FF 00 00 00 FF 00 00 00 C3 00 00' + '00 17 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 09 00 00' + '00 DD 08 08 08 FF 99 99 99 FF E4 E4 E4 FF DF DF' + 'DF FF BD BD BD FF C1 C1 C1 FF D6 D6 D6 FF EC EC' + 'EC FF ED ED ED FF ED ED ED FF EE EE EE FF EE EE' + 'EE FF ED ED ED FF EC EC EC FF EB EB EB FF EB EB' + 'EB FF EC EC EC FF ED ED ED FF EE EE EE FF EE EE' + 'EE FF ED ED ED FF EE EE EE FF E4 E4 E4 FF C2 C2' + 'C2 FF BE BE BE FF D1 D1 D1 FF EC EC EC FF D4 D4' + 'D4 FF 75 75 75 FF 00 00 00 FF 00 00 00 9C 00 00' + '00 06 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 AE 00 00 00 FF 8D 8D 8D FF E0 E0 E0 FF C4 C4' + 'C4 FF B2 B2 B2 FF B8 B8 B8 FF B2 B2 B2 FF EB EB' + 'EB FF F1 F1 F1 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0' + 'F0 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0' + 'F0 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0' + 'F0 FF F0 F0 F0 FF F3 F3 F3 FF D5 D5 D5 FF B0 B0' + 'B0 FF B6 B6 B6 FF B7 B7 B7 FF EB EB EB FF CD CD' + 'CD FF 61 61 61 FF 00 00 00 FF 00 00 00 85 00 00' + '00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 80 00 00 00 FF 64 64 64 FF CE CE CE FF DD DD' + 'DD FF DC DC DC FF D5 D5 D5 FF E4 E4 E4 FF F9 F9' + 'F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9' + 'F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9' + 'F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9' + 'F9 FF F9 F9 F9 FF FA FA FA FF F2 F2 F2 FF DF DF' + 'DF FF D8 D8 D8 FF DC DC DC FF D7 D7 D7 FF B0 B0' + 'B0 FF 34 34 34 FF 00 00 00 FF 00 00 00 67 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 44 00 00 00 FF 19 19 19 FF 80 80 80 FF BE BE' + 'BE FF D3 D3 D3 FF D7 D7 D7 FF DB DB DB FF D8 D8' + 'D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8' + 'D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8' + 'D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8' + 'D8 FF D8 D8 D8 FF D8 D8 D8 FF D9 D9 D9 FF D9 D9' + 'D9 FF D7 D7 D7 FF CD CD CD FF B0 B0 B0 FF 5D 5D' + '5D FF 06 06 06 FF 00 00 00 ED 00 00 00 2B 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 02 00 00 00 9C 00 00 00 FF 0C 0C 0C FF 3D 3D' + '3D FF 49 49 49 FF 48 48 48 FF 48 48 48 FF 48 48' + '48 FF 48 48 48 FF 48 48 48 FF 48 48 48 FF 48 48' + '48 FF 48 48 48 FF 48 48 48 FF 48 48 48 FF 48 48' + '48 FF 48 48 48 FF 48 48 48 FF 48 48 48 FF 48 48' + '48 FF 48 48 48 FF 48 48 48 FF 48 48 48 FF 48 48' + '48 FF 49 49 49 FF 49 49 49 FF 2F 2F 2F FF 02 02' + '02 FF 00 00 00 FF 00 00 00 5C 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 06 00 00 00 7F 00 00 00 F1 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 D6 00 00 00 5C 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 2C 00 00' + '00 7E 00 00 00 84 00 00 00 84 00 00 00 84 00 00' + '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' + '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' + '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' + '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' + '00 84 00 00 00 84 00 00 00 84 00 00 00 70 00 00' + '00 1A 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF' + 'F1 C7 FF FF 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 FF FF F8 07 FF FF 00 00 FF FF' + 'E0 00 00 3F 00 00 FF 00 00 00 00 7F 00 00 FC 00' + '00 00 00 1F 00 00 F8 00 00 00 00 1F 00 00 F8 00' + '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F0 00' + '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F0 00' + '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F0 00' + '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F0 00' + '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F0 00' + '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F0 00' + '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F8 00' + '00 00 00 1F 00 00 F8 00 00 00 00 1F 00 00 F8 00' + '00 00 00 1F 00 00 F8 00 00 00 00 1F 00 00 F8 00' + '00 00 00 1F 00 00 F8 00 00 00 00 1F 00 00 FC 00' + '00 00 00 3F 00 00 FC 00 00 00 00 3F 00 00 FC 00' + '00 00 00 3F 00 00 FC 00 00 00 00 3F 00 00 FC 00' + '00 00 00 3F 00 00 FC 00 00 00 00 7F 00 00 FE 00' + '00 00 00 7F 00 00 FE 00 00 00 00 7F 00 00 FE 00' + '00 00 00 7F 00 00 FE 00 00 00 00 7F 00 00 FE 00' + '00 00 00 7F 00 00 FF 00 00 00 00 7F 00 00 FF 00' + '00 00 00 FF 00 00 FF 00 00 00 00 FF 00 00 FF 00' + '00 00 01 FF 00 00 FF 80 00 00 03 FF 00 00 FF E0' + '00 00 07 FF 00 00 FF FF FF FF FF FF 00 00 28 00' + '00 00 30 00 00 00 60 00 00 00 01 00 08 00 00 00' + '00 00 00 09 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 01 01 01 00 02 02' + '02 00 05 05 05 00 06 06 06 00 07 07 07 00 08 08' + '08 00 09 09 09 00 0B 0B 0B 00 0C 0C 0C 00 13 13' + '13 00 18 18 18 00 19 19 19 00 1A 1A 1A 00 1E 1E' + '1E 00 1F 1F 1F 00 20 20 20 00 21 21 21 00 22 22' + '22 00 24 24 24 00 26 26 26 00 27 27 27 00 28 28' + '28 00 29 29 29 00 2A 2A 2A 00 2B 2B 2B 00 2C 2C' + '2C 00 2D 2D 2D 00 2E 2C 2D 00 2F 2F 2F 00 34 34' + '34 00 35 35 35 00 39 39 39 00 3B 3B 3B 00 3D 3D' + '3D 00 3F 3F 3F 00 40 40 40 00 41 41 41 00 42 42' + '42 00 47 47 47 00 48 48 48 00 49 49 49 00 4B 4B' + '4B 00 4F 4F 4F 00 53 53 53 00 56 56 56 00 58 58' + '58 00 59 59 59 00 5A 5A 5A 00 5B 5B 5B 00 5D 5D' + '5D 00 5F 5F 5F 00 61 61 61 00 63 63 63 00 64 64' + '64 00 66 66 66 00 67 67 67 00 68 68 68 00 6A 6A' + '6A 00 6B 6B 6B 00 6C 6C 6C 00 70 70 70 00 71 71' + '71 00 72 72 72 00 73 73 73 00 74 74 74 00 75 75' + '75 00 76 76 76 00 77 77 77 00 78 78 78 00 79 79' + '79 00 7A 7A 7A 00 7C 7C 7C 00 7D 7D 7D 00 7E 7E' + '7E 00 7F 7F 7F 00 2F 99 64 00 1C A8 60 00 0A BF' + '61 00 20 A8 63 00 51 A7 7C 00 17 CE 71 00 00 00' + 'FF 00 80 80 80 00 81 81 81 00 83 83 83 00 84 83' + '84 00 85 85 85 00 87 87 87 00 88 88 88 00 8A 8A' + '8A 00 8C 8C 8C 00 8D 8D 8D 00 8E 8E 8E 00 8F 8F' + '8F 00 90 90 90 00 92 92 92 00 93 93 93 00 94 94' + '94 00 97 97 97 00 98 98 98 00 99 99 99 00 9A 9A' + '9A 00 9C 9C 9C 00 9D 9D 9D 00 9F 9F 9F 00 83 AB' + '97 00 96 AB A0 00 90 AF A0 00 99 AC A2 00 95 B2' + 'A3 00 9D B3 A8 00 A0 A0 A0 00 A1 A1 A1 00 A2 A2' + 'A2 00 A3 A3 A3 00 A4 A4 A4 00 A5 A5 A5 00 A6 A6' + 'A6 00 A7 A7 A7 00 A8 A8 A8 00 A9 A9 A9 00 AA AA' + 'AA 00 AB AB AB 00 AD A8 AB 00 AB AC AC 00 AC AC' + 'AC 00 AD AD AD 00 AE AE AE 00 AF AF AF 00 B0 B0' + 'B0 00 B1 B1 B1 00 B2 B2 B2 00 B3 B3 B3 00 B3 B4' + 'B3 00 B5 B5 B5 00 B6 B6 B6 00 B7 B7 B7 00 B8 B4' + 'B6 00 B8 B8 B8 00 B9 B9 B9 00 BA BA BA 00 BB BB' + 'BB 00 BF BB BD 00 BC BC BC 00 BD BD BD 00 BE BE' + 'BE 00 BF BF BF 00 91 D6 B4 00 91 D8 B5 00 C3 BD' + 'C0 00 C2 BE C0 00 C7 BF C3 00 C0 C0 C0 00 C1 C1' + 'C1 00 C2 C2 C2 00 C3 C3 C3 00 C4 C1 C3 00 C4 C3' + 'C3 00 C4 C3 C4 00 C6 C2 C4 00 C6 C3 C4 00 C6 C3' + 'C5 00 C4 C4 C4 00 C5 C4 C4 00 C5 C5 C5 00 C7 C4' + 'C5 00 C6 C6 C6 00 C7 C7 C7 00 C8 C8 C8 00 C8 C9' + 'C9 00 C9 C9 C9 00 CA CA CA 00 CB CB CB 00 CC CC' + 'CC 00 CD CD CD 00 CE CE CE 00 CF CF CF 00 D0 D0' + 'D0 00 D1 D1 D1 00 D2 D2 D2 00 D3 D3 D3 00 D4 D4' + 'D4 00 D5 D5 D5 00 D6 D6 D6 00 D7 D7 D7 00 D8 D8' + 'D8 00 D9 D9 D9 00 DA DA DA 00 DB DB DB 00 DC DC' + 'DC 00 DD DD DD 00 DE DE DE 00 DF DF DF 00 E0 E0' + 'E0 00 E1 E1 E1 00 E2 E2 E2 00 E3 E3 E3 00 E4 E4' + 'E4 00 E5 E5 E5 00 E6 E6 E6 00 E7 E7 E7 00 E8 E8' + 'E8 00 E9 E9 E9 00 EA EA EA 00 EB EB EB 00 EC EC' + 'EC 00 ED ED ED 00 EE EE EE 00 EF EF EF 00 F0 F0' + 'F0 00 F1 F1 F1 00 F2 F2 F2 00 F3 F3 F3 00 F4 F4' + 'F4 00 F5 F5 F5 00 F6 F6 F6 00 F7 F7 F7 00 F8 F8' + 'F8 00 F9 F9 F9 00 FA FA FA 00 FC FC FC 00 FF FF' + 'FF 00 00 00 00 00 10 DA 4B 00 F8 0F 0D 01 71 CC' + '43 00 F8 0F 0D 01 40 E3 0C 01 A4 1A 95 00 2C A3' + 'AF 00 C4 F5 AF 00 03 00 00 00 40 E3 0C 01 2F 0C' + '00 00 B8 10 0D 01 30 00 00 00 00 00 00 00 40 00' + '00 00 F8 0F 0D 01 C0 00 00 00 30 00 00 00 00 09' + '00 00 00 24 00 00 00 00 00 00 00 00 00 00 30 00' + '00 00 30 00 00 00 28 00 00 00 30 00 00 00 60 00' + '00 00 01 00 20 00 00 00 00 00 00 24 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 52 52 DF 00 00 00' + '52 52 DF 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 52 52 52 DF 00 52' + '52 52 DF 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 DF DF DF DF DF DF DF DF DF DF' + 'DF DF DF DF DF DF DF DF DF DF DF 52 52 52 52 52' + '52 DF DF DF DF DF DF DF DF DF DF DF DF DF DF DF' + 'DF DF DF DF DF DF 53 53 53 53 53 53 53 53 53 53' + '53 53 53 53 53 53 53 53 53 53 53 53 52 52 52 52' + '53 53 53 53 53 53 53 53 53 53 53 53 53 53 53 53' + '53 53 53 53 53 53 99 99 99 99 99 99 99 99 99 99' + '99 99 99 99 99 99 99 99 99 99 99 99 52 52 52 52' + '99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99' + '99 99 99 99 99 99 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 52 52 52 52 52' + '52 DF 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 52 52 52 99 99 52' + '52 52 DF 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 52 52 00 99 99 DF' + '52 52 DF 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 DF DF DF DF' + 'DF DF DF DF DF DF DF DF DF DF DF DF DF DF DF DF' + 'DF DF DF DF DF DF DF DF DF DF DF DF DF DF DF 00' + '00 00 00 00 00 00 00 00 00 00 00 DF DF DF DF 11' + '1A 19 1A 19 19 19 19 19 19 19 19 19 19 19 18 18' + '18 18 18 18 18 18 18 19 19 19 1C 1C 0A DF DF DF' + '00 00 00 00 00 00 00 00 00 00 00 DF DF 14 5F AC' + 'AF AD B0 AF AE AD AB A8 A7 A5 A3 9C 9B 9B 9C 99' + '9A 93 93 90 91 8D 8E 87 86 8A 7F 7D 7C 35 07 DF' + 'DF 00 00 00 00 00 00 00 00 00 DF DF 01 5A CD CA' + 'C9 B7 57 59 60 64 72 7F 8D 99 9C A7 AD AC AC B8' + 'AC B5 AD B9 AE B6 A8 AA A0 6F 4F 4D 6C 8F 2B DF' + 'DF 00 00 00 00 00 00 00 00 00 DF DF 0C A8 CE C4' + 'C8 AD 21 23 2D 3F 58 60 68 75 78 7E 89 79 67 91' + '65 89 71 9C 73 91 64 A4 98 50 51 4E 4C 96 56 01' + 'DF 00 00 00 00 00 00 00 00 00 DF DF 17 B3 CC C6' + 'C9 AF 27 33 46 58 5E 63 70 77 7A 80 8C 74 5F 8B' + '5A 81 62 93 63 89 59 9E A2 6E 94 95 6A 9D 5D 01' + 'DF 00 00 00 00 00 00 00 00 00 DF DF 16 B3 CE C8' + 'C9 B3 39 41 4A 57 5D 63 70 77 7A 80 8D 69 55 85' + '48 78 58 8E 5A 84 46 9B A3 A1 6D 6B 97 A3 5C 01' + 'DF 00 00 00 00 00 00 00 00 00 DF DF 16 B3 D0 C9' + 'CA B8 3D 3E 49 57 5D 63 70 77 7A 80 8E 64 40 7F' + '3A 70 45 89 48 7B 38 9B A7 9F A6 A0 93 A5 5C 01' + 'DF 00 00 00 00 00 00 00 00 00 DF DF 15 B3 D1 CB' + 'CD B8 3A 3C 45 54 5A 61 67 73 76 7B 8C 5F 37 75' + '31 64 3B 83 3D 74 2E 9A A9 A5 9C 9B 9A A7 5D 01' + 'DF 00 00 00 00 00 00 00 00 00 DF DF 15 B4 D4 CD' + 'CC C1 77 77 7B 80 82 85 88 8C 8C 8D 91 89 83 92' + '81 8D 83 92 82 8D 7B A5 A9 A7 A3 9C 9B AB 5D DF' + 'DF 00 00 00 00 00 00 00 00 00 DF DF 14 B5 D5 CD' + 'CD CC CF CD CB CA C8 C6 C4 C3 C1 C0 BD BD BE BA' + 'BB B8 B8 B4 B4 B1 B2 AD AC AB A8 A3 99 AC 5D DF' + 'DF 00 00 00 00 00 00 00 00 00 DF DF 14 B5 D9 DA' + 'D8 D8 D8 D7 D7 D6 D6 D5 D5 D5 D4 D4 D3 D3 D3 D2' + 'D2 D2 D1 D1 D0 D0 CF CF CF CE CE CD C2 B2 5C DF' + 'DF 00 00 00 00 00 00 00 00 00 DF DF 13 B8 DE CB' + 'C3 C4 C4 C2 C1 C1 C1 C1 C1 C2 C2 C2 C2 C2 C2 C2' + 'C2 C2 C2 C2 C2 C2 C2 C2 C4 C5 C5 C5 DA D1 5B DF' + 'DF 00 00 00 00 00 00 00 00 00 DF DF 13 C0 DA BB' + 'A3 8E 93 BA BC BB BB BB BB BB BB BB BB BB BB BB' + 'BB BB BB BB BB BB BB BD B1 90 8E B3 C0 DE 66 DF' + 'DF 00 00 00 00 00 00 00 00 00 DF DF 0F BC D5 A7' + '79 89 82 9C BC BA BA BA BA BA B9 B9 B9 B9 B9 B9' + 'B9 B9 BA BA BA BA BB B4 78 88 83 87 BA DD 67 DF' + 'DF 00 00 00 00 00 00 00 00 00 DF DF 03 9B D8 90' + '84 9C 7B 8E BA B7 B7 B7 B6 B5 B5 B7 B9 BA BA B9' + 'B7 B5 B5 B5 B6 B7 B9 AB 76 9C 85 7F B8 D7 43 DF' + 'DF 00 00 00 00 00 00 00 00 00 00 DF DF 74 D6 B1' + 'A5 B4 93 AB B5 B4 B2 B5 BF C3 C5 C8 CC CF CF CD' + 'C9 C6 C4 C0 B6 B2 B4 B5 A5 B2 9B 93 BB CA 2D DF' + 'DF 00 00 00 00 00 00 00 00 00 00 DF DF 4A D1 B3' + 'B1 AD B1 B3 B0 B1 C1 D2 CE C3 C0 BF BE BD BD BE' + 'BF C0 C3 CE D3 C3 B3 B0 B2 AD B0 B3 BB B6 23 DF' + 'DF 00 00 00 00 00 00 00 00 00 00 DF DF 2F CB B2' + 'AF AF AF AC B8 CF C8 BE B6 B7 B8 B8 B8 B8 B8 B8' + 'B8 B8 B7 B7 BD C6 CF BC AC AF AF AD C1 8B 12 DF' + 'DF 00 00 00 00 00 00 00 00 00 00 DF DF 24 B9 B4' + 'AC AD AC B6 CB BE B2 B3 B4 B4 B4 B4 B4 B4 B4 B4' + 'B4 B4 B4 B4 B3 B2 BA CC BA AB AC AB C2 70 06 DF' + 'DF 00 00 00 00 00 00 00 00 00 00 DF DF 12 89 BD' + 'AC AD B0 C6 B6 B1 B3 B2 B2 B2 B2 B1 AF B0 B0 B0' + 'B0 B0 B0 B0 B0 B0 AE B2 C4 B1 A8 AB C4 53 DF DF' + 'DF 00 00 00 00 00 00 00 00 00 00 DF DF 05 69 BF' + 'AE AF BD B8 B0 B2 B2 B2 B2 B2 B2 B1 AE AB AC AC' + 'AC AC AC AC AC AC AC A9 B1 BC A8 AB C4 30 DF DF' + 'DF 00 00 00 00 00 00 00 00 00 00 00 DF DF 55 BF' + 'B1 B3 BD B3 B2 B2 B2 B2 B2 B2 B2 B2 B1 AB A5 A7' + 'A7 A7 A7 A7 A7 A7 A7 A7 A8 B5 A9 AB C0 26 DF DF' + '00 00 00 00 00 00 00 00 00 00 00 00 DF DF 33 BE' + 'B3 B4 B6 B3 B3 B3 B3 B3 B3 B3 B3 B3 B3 B2 A9 9C' + '9C 9C A3 A3 A3 A3 A3 A3 A3 A8 A5 AD AE 1B DF DF' + '00 00 00 00 00 00 00 00 00 00 00 00 DF DF 25 BA' + 'B6 B4 B2 B5 B5 B5 B5 B5 B5 B5 B5 B5 B5 B5 B5 AF' + 'A8 A3 9B 9A 99 9A 9A 9A 9B 93 99 B0 84 0D DF DF' + '00 00 00 00 00 00 00 00 00 00 00 00 DF DF 1A AE' + 'B8 B7 AE B7 B8 B8 B8 B8 B8 B8 B8 B8 B8 B8 B8 B9' + 'B8 B7 B5 B1 AE AB A7 A3 9B 85 91 B2 65 07 DF DF' + '00 00 00 00 00 00 00 00 00 00 00 00 DF DF 0B 82' + 'BD BD B2 B4 BD BB BC BC BC BC BC BC BC BC BC BC' + 'BC BC BC BD BD BC BB BB B1 A5 AE AC 47 02 DF DF' + '00 00 00 00 00 00 00 00 00 00 00 00 DF DF 06 63' + 'BE C1 BE B0 B8 C0 BF BF BF BF BF BF BF BF BF BF' + 'BF BF BF BF BF BF C0 BA B0 BF BE A7 2C DF DF 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 DF DF 44' + 'B5 C4 C3 C0 B0 B9 C3 C4 C2 C2 C2 C2 C2 C2 C2 C2' + 'C2 C2 C2 C2 C3 C3 BB AF BC C5 BB 8E 20 DF DF 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 DF DF 2A' + 'AB C7 C5 C6 C3 B9 B4 BC C6 C7 C6 C6 C6 C6 C6 C6' + 'C6 C6 C7 C7 BE B4 B8 C2 C6 C8 B8 78 10 DF DF 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 DF DF 1F' + '91 C8 C8 C8 C9 C9 C1 B4 B5 C0 C5 C5 C6 C6 C6 C6' + 'C5 C5 C0 B6 B3 BF C9 C9 C8 CA B6 66 08 DF DF 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 DF DF 0E' + '7B C6 CF C9 C8 CE CD CC C6 C2 C1 C1 BF BE BE BF' + 'C1 C1 C1 C4 CB CE CC C7 CD CD B8 5A DF DF DF 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 DF DF 06' + '65 C6 C1 91 9A B8 CE CF CF D0 D0 CF CE CD CD CE' + 'CF D0 D0 CF D0 C6 9B 92 B3 CE B6 42 DF DF DF 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 DF DF' + '5C C2 A3 84 8B 84 CD D3 D2 D2 D2 D2 D2 D2 D2 D2' + 'D2 D2 D2 D2 D5 B7 82 88 89 CD AF 34 DF DF DF 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 DF DF' + '36 B0 BF BE B7 C6 DB DB DB DB DB DB DB DB DB DB' + 'DB DB DB DB DC D4 C1 BA BE B9 82 1E DF DF 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 DF DF' + '0C 53 92 B5 B9 BD BA BA BA BA BA BA BA BA BA BA' + 'BA BA BA BA BA BB BB B9 AF 82 32 04 DF DF 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 DF DF' + 'DF 09 22 29 28 28 28 28 28 28 28 28 28 28 28 28' + '28 28 28 28 28 28 28 29 29 1D 02 DF DF 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 DF' + 'DF DF DF DF DF DF DF DF DF DF DF DF DF DF DF DF' + 'DF DF DF DF DF DF DF DF DF DF DF DF 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 DF DF DF DF DF DF DF DF DF DF DF DF DF DF DF' + 'DF DF DF DF DF DF DF DF DF DF DF 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 FF FF F1 C7 FF FF 00 00 FF FF' + 'F0 87 FF FF 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF' + 'F8 0F FF FF 00 00 FF FF F0 07 FF FF 00 00 FF FF' + 'F2 07 FF FF 00 00 FC 00 00 00 00 7F 00 00 F8 00' + '00 00 00 3F 00 00 F8 00 00 00 00 1F 00 00 F0 00' + '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F0 00' + '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F0 00' + '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F0 00' + '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F0 00' + '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F0 00' + '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F0 00' + '00 00 00 1F 00 00 F8 00 00 00 00 1F 00 00 F8 00' + '00 00 00 1F 00 00 F8 00 00 00 00 1F 00 00 F8 00' + '00 00 00 1F 00 00 F8 00 00 00 00 1F 00 00 F8 00' + '00 00 00 1F 00 00 FC 00 00 00 00 3F 00 00 FC 00' + '00 00 00 3F 00 00 FC 00 00 00 00 3F 00 00 FC 00' + '00 00 00 3F 00 00 FC 00 00 00 00 3F 00 00 FC 00' + '00 00 00 7F 00 00 FE 00 00 00 00 7F 00 00 FE 00' + '00 00 00 7F 00 00 FE 00 00 00 00 7F 00 00 FE 00' + '00 00 00 7F 00 00 FE 00 00 00 00 7F 00 00 FF 00' + '00 00 00 7F 00 00 FF 00 00 00 00 FF 00 00 FF 00' + '00 00 00 FF 00 00 FF 00 00 00 01 FF 00 00 FF 80' + '00 00 03 FF 00 00 FF E0 00 00 07 FF 00 00 FF FF' + 'FF FF FF FF 00 00 28 00 00 00 10 00 00 00 20 00' + '00 00 01 00 20 00 00 00 00 00 00 04 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 24 00 00 00 30 00 00 00 30 00 00 00 30 00 00' + '00 30 00 00 00 30 00 00 00 30 00 00 FF FF 00 00' + 'FF FF 00 00 00 3C 00 00 00 30 00 00 00 30 00 00' + '00 30 00 00 00 30 00 00 00 30 00 00 00 30 C0 C0' + 'C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0' + 'C0 FF C0 C0 C0 FF C0 C0 C0 FF 00 00 FF FF 00 00' + 'FF FF C0 C0 C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0' + 'C0 FF C0 C0 C0 FF C0 C0 C0 FF C0 C0 C0 FF 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 37 00 00' + '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' + '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' + '00 37 00 00 00 04 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 26 26 26 FF CD CD CD FF CD CD' + 'CD FF C9 C9 C9 FF C5 C5 C5 FF C2 C2 C2 FF C0 C0' + 'C0 FF BF BF BF FF BA BA BA FF B3 B4 B3 FF AB AC' + 'AC FF 09 09 09 FF 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 30 D1 D1 D1 FF E7 E7 E7 FF 5F 5F' + '5F FF 8F 8F 8F FF A7 A7 A7 FF B9 B9 B9 FF B8 B8' + 'B8 FF 94 94 94 FF B7 B7 B7 FF C6 C3 C5 FF 91 D8' + 'B5 FF 8E 8E 8E FF 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 33 D1 D1 D1 FF EB EB EB FF 6C 6C' + '6C FF 8A 8A 8A FF A3 A3 A3 FF B9 B9 B9 FF A5 A5' + 'A5 FF 6B 6B 6B FF A4 A4 A4 FF C8 C8 C8 FF C2 C2' + 'C2 FF 8E 8E 8E FF 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 33 D3 D3 D3 FF F6 F6 F6 FF F5 F5' + 'F5 FF F4 F4 F4 FF F3 F3 F3 FF F1 F1 F1 FF F0 F0' + 'F0 FF EF EF EF FF EE EE EE FF ED ED ED FF EB EB' + 'EB FF 8D 8D 8D FF 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 25 DA DA DA FF A9 A9 A9 FF C3 C3' + 'C3 FF D8 D8 D8 FF D8 D8 D8 FF D7 D7 D7 FF D7 D7' + 'D7 FF D8 D8 D8 FF D8 D8 D8 FF A8 A8 A8 FF B5 B5' + 'B5 FF 9C 9C 9C FF 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 7E 7E 7E FF CF CF CF FF D1 D1' + 'D1 FF DF DF DF FF E1 E1 E1 FF DC DC DC FF DC DC' + 'DC FF E1 E1 E1 FF E1 E1 E1 FF D0 D0 D0 FF D1 D1' + 'D1 FF 3F 3F 3F FF 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 22 22 22 FF CA CA CA FF E4 E4' + 'E4 FF D1 D1 D1 FF D0 D0 D0 FF CD CD CD FF CE CE' + 'CE FF CE CE CE FF CE CE CE FF E2 E2 E2 FF C9 C9' + 'C9 FF 00 00 00 FF 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 FF D1 D1 D1 FF D1 D1' + 'D1 FF D1 D1 D1 FF D1 D1 D1 FF D1 D1 D1 FF C3 C3' + 'C3 FF C4 C4 C4 FF C4 C4 C4 FF C4 C4 C4 FF CB CB' + 'CB FF 00 00 00 F8 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 D8 DB DB DB FF D2 D2' + 'D2 FF DA DA DA FF DA DA DA FF DA DA DA FF DA DA' + 'DA FF DA DA DA FF DA DA DA FF CF CF CF FF CA CA' + 'CA FF 00 00 00 B8 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 89 C9 C9 C9 FF E4 E4' + 'E4 FF D2 D2 D2 FF E5 E5 E5 FF E4 E4 E4 FF E4 E4' + 'E4 FF E5 E5 E5 FF D2 D2 D2 FF E4 E4 E4 FF A8 A8' + 'A8 FF 00 00 00 4E 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 09 99 99 99 FF BD BD' + 'BD FF EC EC EC FF EE EE EE FF EC EC EC FF EC EC' + 'EC FF EE EE EE FF E4 E4 E4 FF D1 D1 D1 FF 75 75' + '75 FF 00 00 00 06 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 19 19 19 FF D3 D3' + 'D3 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8' + 'D8 FF D8 D8 D8 FF D9 D9 D9 FF CD CD CD FF 06 06' + '06 FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' + '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 E0 03 00 00 C0 03 00 00 80 03' + '00 00 80 03 00 00 80 03 00 00 80 03 00 00 C0 03' + '00 00 C0 03 00 00 C0 03 00 00 C0 03 00 00 C0 03' + '00 00 C0 03 00 00 E0 07 00 00 F0 0F 00 00' +} */ + +/* BINRES cdrom.ico */ +11 ICON cdrom.ico +/* { + '00 00 01 00 09 00 20 20 00 00 01 00 08 00 A8 08' + '00 00 96 00 00 00 10 10 00 00 01 00 08 00 68 05' + '00 00 3E 09 00 00 20 20 00 00 01 00 20 00 A8 10' + '00 00 A6 0E 00 00 10 10 00 00 01 00 04 00 28 01' + '00 00 4E 1F 00 00 20 20 00 00 01 00 04 00 E8 02' + '00 00 76 20 00 00 10 10 00 00 01 00 20 00 68 04' + '00 00 5E 23 00 00 30 30 00 00 01 00 04 00 68 06' + '00 00 C6 27 00 00 30 30 00 00 01 00 08 00 A8 0E' + '00 00 2E 2E 00 00 30 30 00 00 01 00 20 00 A8 25' + '00 00 D6 3C 00 00 28 00 00 00 20 00 00 00 40 00' + '00 00 01 00 08 00 00 00 00 00 00 04 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 01 01 01 00 01 02 02 00 02 03 03 00 05 05' + '05 00 06 06 06 00 07 07 07 00 09 09 09 00 0B 0B' + '0B 00 10 10 10 00 13 13 13 00 18 18 18 00 1B 1C' + '1B 00 1E 1E 1E 00 22 26 23 00 23 29 24 00 24 2E' + '25 00 3B 40 3C 00 3E 40 3F 00 40 41 40 00 41 43' + '42 00 42 44 43 00 46 48 47 00 4E 50 4F 00 50 52' + '51 00 54 55 55 00 56 56 56 00 57 57 57 00 57 58' + '58 00 59 59 59 00 5A 5A 5A 00 5A 5B 5B 00 5B 5C' + '5C 00 5D 5E 5E 00 5F 68 5F 00 71 71 72 00 72 72' + '73 00 74 74 74 00 77 76 77 00 78 76 77 00 72 78' + '72 00 79 76 78 00 7A 76 78 00 7B 77 79 00 7D 78' + '7A 00 7F 78 7B 00 7F 7F 7F 00 80 7A 7D 00 81 7C' + '7F 00 0E CE 0E 00 14 C2 15 00 10 CE 10 00 6D 90' + '6D 00 82 7D 80 00 84 80 83 00 86 83 85 00 8D 8B' + '8C 00 90 8F 90 00 95 96 95 00 97 97 97 00 98 98' + '98 00 98 99 99 00 99 9A 9A 00 9B 9C 9B 00 9F A0' + '9F 00 A7 A7 A7 00 A9 A8 A9 00 AB AA AA 00 AD AC' + 'AC 00 AE AE AE 00 B1 B0 B1 00 B3 B2 B3 00 B4 B3' + 'B4 00 B6 B6 B6 00 B8 B8 B8 00 B9 B9 B9 00 BB BB' + 'BB 00 BE BE BE 00 C0 C0 C0 00 C2 C3 C2 00 C3 C3' + 'C2 00 C5 C2 C3 00 C7 C1 C4 00 C9 C3 C5 00 CA C6' + 'C7 00 CA C8 C8 00 CA C9 C9 00 CB CA CA 00 CC CB' + 'CB 00 CD CB CB 00 CD CC CC 00 CD CD CD 00 CE CE' + 'CE 00 CE CF CF 00 CF CF CF 00 D0 D0 D0 00 D1 D1' + 'D1 00 D2 D2 D2 00 D4 D3 D3 00 D4 D4 D4 00 D5 D4' + 'D4 00 D7 D4 D5 00 D6 D6 D6 00 D7 D7 D7 00 D8 D8' + 'D8 00 D9 D9 D9 00 DA DA DA 00 DB DB DB 00 DC DC' + 'DC 00 DD DD DD 00 DE DE DE 00 FB D6 D7 00 FD D4' + 'D5 00 FE D4 D6 00 FE D4 DF 00 F7 D9 DA 00 F0 DE' + 'DF 00 EA DB E2 00 FE D3 E9 00 FE D3 ED 00 FE D4' + 'EF 00 F2 DA E8 00 F9 DA EF 00 FE D4 F1 00 FE D5' + 'F4 00 FE D6 F6 00 FC DB F4 00 FE D8 F9 00 FE DB' + 'F9 00 FE DC F8 00 E1 E0 E0 00 E7 E5 E6 00 E7 E6' + 'E6 00 E7 E7 E7 00 EA E3 E3 00 E8 E8 E8 00 E9 E9' + 'E9 00 EA EA EA 00 EB EB EB 00 EC EC EC 00 ED ED' + 'ED 00 EF EE EE 00 F0 EE EF 00 F0 EF F0 00 F1 F0' + 'F0 00 F1 F1 F1 00 F2 F2 F2 00 F2 F3 F3 00 F3 F5' + 'F5 00 F7 F6 F8 00 FA F7 FA 00 FB FA FB 00 FC F8' + 'FC 00 00 00 00 00 FF FF FF FF 37 90 F5 77 00 00' + '00 00 3E 8A F5 77 9B B2 E7 77 B7 00 00 00 02 00' + '00 00 A4 1A 95 00 01 00 00 00 18 00 00 00 00 00' + '00 00 10 19 95 00 42 00 00 00 00 00 00 00 F4 18' + '95 00 00 00 00 00 00 00 00 00 00 00 00 00 0C 00' + '00 00 02 00 00 00 01 01 F5 77 00 EC FD 7F 54 00' + '00 00 00 00 00 00 03 00 00 00 5C 00 1A 02 40 9F' + '07 00 00 00 00 00 40 9F 07 00 05 00 00 00 BE B3' + 'E7 77 4C 19 95 00 A3 B4 E7 77 F8 00 00 00 00 00' + '00 C0 00 00 00 00 00 00 00 00 02 00 00 00 80 00' + '00 00 00 00 00 00 8C 1A 95 00 7F E9 4B 00 88 36' + '0C 01 00 00 00 C0 00 00 00 00 80 1A 95 00 02 00' + '00 00 80 00 00 00 00 00 00 00 C0 27 95 00 C4 F5' + 'AF 00 02 00 00 00 44 3A 5C 6F 73 65 78 70 65 72' + '74 73 5C 72 65 61 63 74 6F 73 5C 6C 69 62 5C 73' + '68 65 6C 6C 33 32 5C 63 64 72 6F 6D 2E 69 63 6F' + '00 00 1A 93 4B 00 14 1A 95 00 1F 3B D4 77 15 00' + '00 00 A8 00 00 00 4F 3B D4 77 E0 19 95 00 33 3B' + 'D4 77 64 C5 F5 77 A9 F1 E7 77 F8 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 1A 95 00 B0 6C' + '38 00 96 00 00 00 00 00 00 00 C9 F1 E7 77 96 00' + '00 00 A4 1A 95 00 09 00 00 00 00 00 00 00 96 00' + '00 00 96 00 00 00 09 00 00 00 F4 19 95 00 33 3B' + 'D4 77 B4 1A 95 00 09 48 E9 77 B8 10 E9 77 FF FF' + 'FF FF C9 F1 E7 77 16 EA 4B 00 F8 00 00 00 B0 6C' + '38 00 96 00 00 00 58 1A 95 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 99 99 0D 09 08 0C 99 99 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 99 21 11 45 4C 5D 55 21 14 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 99 23 4D 97 7F 7F 76 71 72 74 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 99 23 75 80 7B 7B 72 71 71 71 94 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 10 28 98 7C 78 7B 72 71 71 6F 94 92 00 00' + '99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99' + '99 10 1F 59 7D 78 78 7B 71 71 6F 93 92 92 00 99' + '08 15 19 17 21 23 1F 1D 1D 1E 1E 1D 1D 1C 1C 1F' + '1F 12 40 81 78 78 78 7B 71 71 8E 91 92 92 99 99' + '37 6A 82 83 50 32 98 8B 84 82 67 64 64 64 61 63' + '1B 17 75 7C 78 7B 78 78 7B 7F 7F 7B 93 92 99 03' + '65 94 89 81 31 31 33 79 5C 5E 5A 5B 5B 5B 67 24' + '0E 23 97 7A 92 77 7B 78 7F 53 6F 7F 8E 8F 99 07' + '83 8D 89 98 34 31 41 52 4E 4E 4E 4E 4E 4E 50 4E' + '2F 27 97 93 93 8C 7A 7F 48 40 23 70 7E 90 99 05' + '92 8B 93 3A 2B 38 2A 25 25 25 25 25 25 25 25 26' + '23 3A 97 92 92 93 92 7E 10 00 00 3A 81 93 99 04' + '92 8F 91 44 39 3A 3F 3F 3F 3F 3F 3D 3C 3C 3C 3E' + '35 40 97 92 92 93 76 7E 11 99 00 52 7E 8D 99 03' + '90 8F 89 90 8A 89 87 86 82 82 82 82 82 82 82 83' + '47 3D 97 92 92 93 8E 7C 53 38 52 81 7E 76 99 02' + '96 96 8A 8D 88 87 87 87 88 88 87 87 87 87 85 8B' + '4B 23 97 92 92 92 8F 8D 7F 81 7F 7F 77 7B 99 01' + '97 82 46 46 66 68 67 67 67 67 66 66 66 67 67 6A' + '50 22 95 93 92 92 92 94 72 71 71 76 7B 78 99 99' + '94 5F 44 44 51 69 66 64 63 63 67 68 66 63 63 64' + '82 23 49 97 92 92 92 94 6F 71 71 76 7B 78 00 99' + '55 86 58 55 5C 5F 60 60 61 64 63 63 63 64 5F 62' + '62 84 20 65 94 92 92 71 71 71 71 76 78 78 00 99' + '3F 86 5A 5C 5B 60 63 63 64 66 66 66 66 66 64 68' + '82 68 3B 2D 97 95 6F 71 71 71 77 7B 7B 7C 00 99' + '22 82 55 56 64 61 60 60 60 5F 61 60 60 61 60 5F' + '5C 62 69 3A 38 73 6F 71 71 77 7B 7B 81 75 00 99' + '11 6C 57 5F 62 5F 5F 5E 5E 5F 62 60 62 62 62 62' + '60 62 5C 5B 39 36 57 72 81 81 98 98 48 3A 00 99' + '0B 57 62 61 60 5E 5F 5F 5F 5E 5E 62 62 62 62 62' + '62 62 66 4D 4A 0C 02 13 19 18 16 15 99 00 00 99' + '08 4A 66 61 61 60 60 60 60 60 61 61 61 61 61 61' + '61 61 64 4C 48 0F 99 00 00 00 00 00 00 00 00 99' + '99 3A 82 66 67 67 67 67 67 67 67 67 63 64 64 64' + '63 64 5E 54 5A 10 99 00 00 00 00 00 00 00 00 99' + '99 23 8A 6D 6E 6D 6B 6B 6B 6B 6B 6B 6C 6D 6D 6C' + '6E 83 84 6E 46 0A 99 00 00 00 00 00 00 00 00 00' + '99 11 84 86 82 82 82 82 86 82 82 82 82 82 82 82' + '83 85 84 83 38 02 99 00 00 00 00 00 00 00 00 00' + '99 0B 82 87 85 88 8B 8A 8A 87 88 88 88 88 87 84' + '85 87 85 84 23 99 99 00 00 00 00 00 00 00 00 00' + '99 99 56 90 69 83 8B 8B 8A 8A 8A 89 8A 8B 8B 8B' + '87 69 89 8B 17 99 99 00 00 00 00 00 00 00 00 00' + '99 99 4F 6B 43 45 92 8F 8F 8F 8F 8D 8F 8F 8F 94' + '54 42 5A 92 12 99 99 00 00 00 00 00 00 00 00 00' + '00 99 24 6E 88 8B 97 97 97 97 97 97 97 97 97 97' + '95 87 83 4C 06 99 00 00 00 00 00 00 00 00 00 00' + '00 99 07 1A 30 2C 29 29 29 29 29 29 29 29 29 29' + '2B 2F 23 10 99 99 00 00 00 00 00 00 00 00 00 00' + '00 00 99 99 99 99 99 99 99 99 99 99 99 99 99 99' + '99 99 99 99 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF' + 'FF 00 FF FF FE 00 FF FF FC 00 FF FF F8 00 FF FF' + 'F0 00 C0 00 00 00 80 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 18 00 00 00 08 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 00' + '00 00 80 00 00 00 80 00 00 00 80 00 00 00 80 00' + '00 01 80 00 00 7F 80 00 00 7F 80 00 00 7F C0 00' + '00 7F C0 00 00 7F C0 00 00 7F C0 00 00 7F E0 00' + '00 FF E0 00 00 FF F0 00 03 FF FF FF FF FF 28 00' + '00 00 10 00 00 00 20 00 00 00 01 00 08 00 00 00' + '00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 05 05 05 00 0C 0F' + '0F 00 0D 11 0E 00 15 15 15 00 36 36 36 00 39 39' + '39 00 40 43 41 00 44 47 45 00 53 53 53 00 5B 60' + '5D 00 67 68 68 00 64 6A 69 00 69 69 69 00 6B 6C' + '6B 00 6E 6E 6E 00 6F 6E 6E 00 6F 70 70 00 72 72' + '72 00 7D 7D 7D 00 7E 7E 7E 00 7F 7F 7F 00 00 FF' + '00 00 75 99 75 00 88 6C 88 00 84 7E 84 00 8B 7E' + '82 00 80 80 80 00 84 84 84 00 93 93 93 00 97 97' + '97 00 9A 98 98 00 9B 9B 9B 00 9D 9D 9D 00 9F 9F' + '9F 00 A0 A0 A0 00 A5 A5 A5 00 A6 A6 A6 00 A8 A2' + 'A8 00 B8 AC B8 00 BB BB BB 00 A6 D4 A6 00 D8 AE' + 'C6 00 CB BD C9 00 C0 C0 C0 00 C2 C2 C2 00 C2 C3' + 'C3 00 C3 C3 C3 00 C8 C8 C8 00 C9 C9 C9 00 CE CE' + 'CE 00 CF CF CF 00 D3 C2 CD 00 D0 D0 D0 00 D1 D1' + 'D1 00 D2 D2 D2 00 D3 D3 D3 00 D6 D0 D6 00 D4 D4' + 'D4 00 D5 D5 D5 00 D6 D6 D6 00 D7 D7 D7 00 D8 D8' + 'D8 00 D9 D9 D9 00 DA DA DA 00 DB DB DB 00 DC DC' + 'DC 00 DE DE DE 00 FF D2 CD 00 FF D2 CE 00 E2 C2' + 'DA 00 FF D8 D7 00 FF D4 D8 00 FA DD DA 00 FD DC' + 'DC 00 FF DE DF 00 F4 D7 EA 00 FF D3 E8 00 FF D6' + 'E8 00 FF D7 EF 00 FF D3 F1 00 FF D3 F2 00 FF D3' + 'F3 00 FF D4 F5 00 FF D7 F7 00 FF D9 F7 00 FD D9' + 'FB 00 E1 E1 E1 00 E3 E4 E3 00 E4 E4 E4 00 E5 E5' + 'E5 00 E6 E6 E6 00 E8 E8 E8 00 E9 E9 E9 00 EA EA' + 'EA 00 EA EB EB 00 EB EB EB 00 ED ED ED 00 FF E3' + 'E1 00 F5 EA EF 00 FF EF EF 00 FD E7 F4 00 FB ED' + 'F4 00 FE E7 FA 00 FF E2 FF 00 FF E9 FF 00 FF ED' + 'FE 00 FF EE FF 00 EE F9 F7 00 F1 F1 F1 00 F1 F3' + 'F2 00 F2 F2 F2 00 F3 F3 F3 00 F0 F5 F2 00 F0 F6' + 'F3 00 F0 F7 F7 00 F4 F4 F4 00 F5 F5 F5 00 F6 F6' + 'F6 00 FF F0 FF 00 FF F3 FF 00 FF F6 FF 00 F9 F9' + 'F9 00 FA FA FA 00 FB FB FB 00 FC FC FC 00 FD FD' + 'FD 00 FF FD FE 00 FE FE FE 00 FF FF FF 00 00 00' + '00 00 E7 E5 E6 00 E7 E6 E6 00 E7 E7 E7 00 EA E3' + 'E3 00 E8 E8 E8 00 E9 E9 E9 00 EA EA EA 00 EB EB' + 'EB 00 EC EC EC 00 ED ED ED 00 EF EE EE 00 F0 EE' + 'EF 00 F0 EF F0 00 F1 F0 F0 00 F1 F1 F1 00 F2 F2' + 'F2 00 F2 F3 F3 00 F3 F5 F5 00 F7 F6 F8 00 FA F7' + 'FA 00 FB FA FB 00 FC F8 FC 00 00 00 00 00 FF FF' + 'FF FF 37 90 F5 77 00 00 00 00 3E 8A F5 77 9B B2' + 'E7 77 B7 00 00 00 02 00 00 00 A4 1A 95 00 01 00' + '00 00 18 00 00 00 00 00 00 00 10 19 95 00 42 00' + '00 00 00 00 00 00 F4 18 95 00 00 00 00 00 00 00' + '00 00 00 00 00 00 0C 00 00 00 02 00 00 00 01 01' + 'F5 77 00 EC FD 7F 54 00 00 00 00 00 00 00 03 00' + '00 00 5C 00 1A 02 40 9F 07 00 00 00 00 00 40 9F' + '07 00 05 00 00 00 BE B3 E7 77 4C 19 95 00 A3 B4' + 'E7 77 F8 00 00 00 00 00 00 C0 00 00 00 00 00 00' + '00 00 02 00 00 00 80 00 00 00 00 00 00 00 8C 1A' + '95 00 7F E9 4B 00 88 36 0C 01 00 00 00 C0 00 00' + '00 00 80 1A 95 00 02 00 00 00 80 00 00 00 00 00' + '00 00 C0 27 95 00 C4 F5 AF 00 02 00 00 00 44 3A' + '5C 6F 73 65 78 70 65 72 74 73 5C 72 65 61 63 74' + '6F 73 5C 6C 69 62 5C 73 68 65 6C 6C 33 32 5C 63' + '64 72 6F 6D 2E 69 63 6F 00 00 1A 93 4B 00 14 1A' + '95 00 1F 3B D4 77 15 00 00 00 A8 00 00 00 4F 3B' + 'D4 77 E0 19 95 00 33 3B D4 77 64 C5 F5 77 A9 F1' + 'E7 77 F8 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 1A 95 00 B0 6C 38 00 96 00 00 00 00 00' + '00 00 C9 F1 E7 77 96 00 00 00 A4 1A 95 00 09 00' + '00 00 00 00 00 00 96 00 00 00 96 00 00 00 09 00' + '00 00 F4 19 95 00 33 3B D4 77 B4 1A 95 00 09 48' + 'E9 77 B8 10 E9 77 FF FF FF FF C9 F1 E7 77 16 EA' + '4B 00 F8 00 00 00 B0 6C 38 00 96 00 00 00 58 1A' + '95 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 03 0A 0C 02 00 00 00 00 00 00 00 00 00 00' + '00 0E 6B 68 4B 64 00 82 82 82 82 82 82 82 82 82' + '11 77 53 45 49 73 82 10 26 17 27 25 22 21 23 08' + '4C 52 50 4E 67 71 82 7F 79 16 29 39 33 38 28 09' + '81 63 55 2B 2A 66 82 81 30 18 19 14 14 13 1B 1C' + '80 72 6A 82 07 79 82 81 74 6D 61 60 60 60 6F 1E' + '7E 6E 65 46 56 4F 82 7D 24 38 3D 3B 3D 3C 41 1D' + '5F 74 6C 47 48 51 82 3D 32 32 37 3A 3B 3B 38 58' + '1A 81 4A 44 4D 54 82 20 37 38 35 35 36 37 37 38' + '2E 1F 62 69 78 34 00 0D 43 35 35 35 36 37 37 38' + '36 0B 00 00 00 00 00 06 61 40 3E 3F 3F 3E 3E 42' + '57 12 00 00 00 00 00 01 70 5E 5C 5B 5A 5A 59 60' + '75 05 00 00 00 00 00 82 5D 31 7A 76 74 75 7B 32' + '7C 04 00 00 00 00 00 82 0F 2C 2F 2D 2D 2D 2D 2C' + '1E 82 00 00 00 00 00 00 82 82 82 82 82 82 82 82' + '82 00 00 00 00 00 FF F0 00 00 FF E0 00 00 80 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 0F' + '00 00 80 0F 00 00 80 0F 00 00 80 0F 00 00 80 0F' + '00 00 C0 1F 00 00 28 00 00 00 20 00 00 00 40 00' + '00 00 01 00 20 00 00 00 00 00 00 10 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 0C 00 00 00 30 00 00 00 48 00 00 00 90 00 00' + '00 90 00 00 00 90 00 00 00 78 00 00 00 30 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 3C 86 86' + '86 FF 7A 7A 7A FF AA AA AA FF DA DA DA FF F2 F2' + 'F2 FF CE CE CE FF AA AA AA FF 6E 6E 6E FF 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 0C 7A 7A 7A FF 80 80' + '80 FF FF FF FF FF FF D4 F0 FF FF D4 F0 FF FF D4' + 'F0 FF FF D4 D4 FF FF D4 D4 FF C0 C0 C0 FF 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 09 00 00' + '00 13 00 00 00 78 6E 6E 6E FF FF D4 F0 FF FF D4' + 'F0 FF FF D4 F0 FF FF D4 F0 FF FF D4 D4 FF FF D4' + 'D4 FF FF D4 D4 FF FF D4 D4 FF F2 F2 F2 FF 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 56 62 62 62 FF E6 E6 E6 FF FF D4 F0 FF FF D4' + 'F0 FF FF D4 F0 FF FF D4 F0 FF FF D4 D4 FF FF D4' + 'D4 FF FF D4 D4 FF F2 F2 F2 FF F2 F2 F2 FF 00 00' + '00 00 00 00 00 05 00 00 00 69 00 00 00 F7 00 00' + '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' + '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' + '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' + '00 F7 00 00 00 F7 00 00 00 F7 62 62 62 FF 56 56' + '56 FF FF D4 F0 FF FF D4 F0 FF FF D4 F0 FF FF D4' + 'F0 FF FF D4 F0 FF FF D4 D4 FF FF D4 D4 FF FF D4' + 'D4 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2 F2 FF 00 00' + '00 00 00 00 00 9B 00 00 00 FF 21 21 21 FF 2C 2C' + '2C FF 2C 2C 2C FF 2B 2B 2B FF 2B 2B 2B FF 2B 2B' + '2B FF 2B 2B 2B FF 2B 2B 2B FF 2B 2B 2B FF 2B 2B' + '2B FF 2A 2A 2A FF 2A 2A 2A FF 2A 2A 2A FF 2A 2A' + '2A FF 2A 2A 2A FF 2A 2A 2A FF 4A 4A 4A FF 62 62' + '62 FF FF D4 F0 FF FF D4 F0 FF FF D4 F0 FF FF D4' + 'F0 FF FF D4 F0 FF FF D4 D4 FF FF D4 D4 FF F2 F2' + 'F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2 F2 FF 00 00' + '00 03 01 01 01 FF 8A 8A 8A FF EB EB EB FF E8 E8' + 'E8 FF E8 E8 E8 FF D4 D4 D4 FF 00 C0 00 FF E7 E7' + 'E7 FF E8 E8 E8 FF E3 E3 E3 FF D8 D8 D8 FF D2 D2' + 'D2 FF CD CD CD FF CD CD CD FF CD CD CD FF C8 C9' + 'C9 FF AA AA AA FF 2E 2E 2E FF 62 62 62 FF DA DA' + 'DA FF FF D4 F0 FF FF D4 F0 FF FF D4 F0 FF FF D4' + 'F0 FF FF D4 F0 FF FF D4 FF FF FF D4 FF FF FF D4' + 'FF FF FF D4 F0 FF F2 F2 F2 FF F2 F2 F2 FF 00 00' + '00 15 19 19 19 FF AD A8 AB FF EB EB EB FF E8 E8' + 'E8 FF E8 E8 E8 FF 00 FF 00 FF 00 FF 00 FF 00 C0' + '00 FF DF DF DF FF D5 D5 D5 FF D2 D2 D2 FF CB CB' + 'CB FF CD CD CD FF CD CD CD FF CD CD CD FF CD CD' + 'CD FF 40 40 40 FF 2E 2E 2E FF 7A 7A 7A FF F2 F2' + 'F2 FF FF D4 E3 FF F2 F2 F2 FF FF D4 F0 FF FF D4' + 'F0 FF FF D4 F0 FF FF D4 FF FF FF D4 E3 FF FF D4' + 'E3 FF FF D4 FF FF F2 F2 F2 FF F2 F2 F2 FF 00 00' + '00 34 28 28 28 FF D1 D1 D1 FF EB EB EB FF EB EB' + 'EB FF E8 E8 E8 FF E8 E8 E8 FF 00 FF 00 FF B5 B5' + 'B5 FF B6 B6 B6 FF B6 B6 B6 FF B6 B6 B6 FF B6 B6' + 'B6 FF B6 B6 B6 FF B6 B6 B6 FF B6 B6 B6 FF B6 B6' + 'B6 FF B6 B6 B6 FF B6 B6 B6 FF A4 A0 A0 FF F2 F2' + 'F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2' + 'F2 FF FF D4 F0 FF B6 B6 B6 FF AA AA AA FF 62 62' + '62 FF FF D4 E3 FF FF D4 F0 FF F2 F2 F2 FF 00 00' + '00 33 28 28 28 FF D1 D1 D1 FF E8 E8 E8 FF EB EB' + 'EB FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' + '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' + '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' + '80 FF 80 80 80 FF 80 80 80 FF B6 B6 B6 FF F2 F2' + 'F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2' + 'F2 FF FF D4 E3 FF 6E 6E 6E FF 00 00 00 00 00 00' + '00 00 B6 B6 B6 FF FF D4 F0 FF F2 F2 F2 FF 00 00' + '00 33 27 27 27 FF D2 D2 D2 FF EA EA EA FF EB EB' + 'EB FF A7 A7 A7 FF A7 A7 A7 FF AB AB AB FF AE AE' + 'AE FF AF AF AF FF AF AF AF FF AF AF AF FF AF AF' + 'AF FF AB AB AB FF AB AB AB FF AB AB AB FF AB AB' + 'AB FF AB AB AB FF AB AB AB FF CE CE CE FF F2 F2' + 'F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2 F2 FF FF D4' + 'E3 FF FF D4 E3 FF 80 80 80 FF 00 00 00 78 00 00' + '00 00 FF D4 F0 FF FF D4 F0 FF F2 F2 F2 FF 00 00' + '00 33 26 26 26 FF D3 D3 D3 FF E8 E8 E8 FF E6 E6' + 'E6 FF E2 E2 E2 FF DB DB DB FF D8 D8 D8 FF D9 D9' + 'D9 FF D2 D2 D2 FF CF CF CF FF D0 D0 D0 FF D0 D0' + 'D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0' + 'D0 FF D0 D0 D0 FF D0 D0 D0 FF CE CE CE FF F2 F2' + 'F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2' + 'F2 FF FF D4 F0 FF C0 C0 C0 FF 62 62 62 FF 80 80' + '80 FF FF D4 F0 FF FF D4 F0 FF FF D4 E3 FF 00 00' + '00 33 24 24 24 FF D6 D6 D6 FF E9 E9 E9 FF E1 E1' + 'E1 FF E2 E2 E2 FF E0 E0 E0 FF DF DF DF FF DF DF' + 'DF FF DF DF DF FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' + 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' + 'E0 FF E0 E0 E0 FF E0 E0 E0 FF 92 92 92 FF F2 F2' + 'F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2' + 'F2 FF F2 F2 F2 FF FF D4 FF FF FF D4 FF FF FF D4' + 'FF FF FF D4 F0 FF FF D4 F0 FF FF D4 F0 FF 00 00' + '00 34 24 24 24 FF DE DE DE FF D9 D9 D9 FF C4 C4' + 'C4 FF BF BF BF FF D8 D8 D8 FF D9 D9 D9 FF D9 D9' + 'D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9' + 'D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9' + 'D9 FF D9 D9 D9 FF D9 D9 D9 FF 7A 7A 7A FF F2 F2' + 'F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2' + 'F2 FF F2 F2 F2 FF FF D4 E3 FF FF D4 D4 FF FF D4' + 'D4 FF FF D4 F0 FF FF D4 F0 FF FF D4 F0 FF 00 00' + '00 07 05 05 05 FF C2 C2 C2 FF BC BC BC FF B2 B2' + 'B2 FF AB AB AB FF BB BB BB FF D5 D5 D5 FF D5 D5' + 'D5 FF D4 D4 D4 FF D3 D3 D3 FF D5 D5 D5 FF D7 D7' + 'D7 FF D8 D8 D8 FF D7 D7 D7 FF D3 D3 D3 FF D3 D3' + 'D3 FF D4 D4 D4 FF D5 D5 D5 FF 62 62 62 FF 86 86' + '86 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2' + 'F2 FF F2 F2 F2 FF FF D4 D4 FF FF D4 D4 FF FF D4' + 'D4 FF FF D4 F0 FF FF D4 F0 FF FF D4 F0 FF 00 00' + '00 00 00 00 00 FF A4 A4 A4 FF CF CF CF FF C5 C5' + 'C5 FF BF BF BF FF C9 C9 C9 FF D2 D2 D2 FF D0 D0' + 'D0 FF D0 D0 D0 FF D0 D0 D0 FF D5 D5 D5 FF D5 D5' + 'D5 FF D5 D5 D5 FF D5 D5 D5 FF D5 D5 D5 FF D0 D0' + 'D0 FF D4 D4 D4 FF D0 D0 D0 FF D3 D3 D3 FF 62 62' + '62 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2' + 'F2 FF FF D4 D4 FF FF D4 D4 FF FF D4 D4 FF FF D4' + 'D4 FF FF D4 F0 FF FF D4 F0 FF FF D4 F0 FF 00 00' + '00 00 00 00 00 FF 59 59 59 FF D0 D0 D0 FF CD CD' + 'CD FF CD CD CD FF CA CA CA FF D3 D3 D3 FF D3 D3' + 'D3 FF D4 D4 D4 FF D5 D5 D5 FF D6 D6 D6 FF D6 D6' + 'D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6 D6 FF D5 D5' + 'D5 FF DB DB DB FF E4 E4 E4 FF D3 D3 D3 FF D3 D3' + 'D3 FF 92 92 92 FF F2 F2 F2 FF F2 F2 F2 FF FF D4' + 'D4 FF FF D4 D4 FF FF D4 D4 FF FF D4 D4 FF FF D4' + 'F0 FF FF D4 F0 FF FF D4 F0 FF FF D4 F0 FF 00 00' + '00 00 00 00 00 FE 40 40 40 FF D2 D2 D2 FF CA CA' + 'CA FF CA CA CA FF D4 D4 D4 FF D3 D3 D3 FF D3 D3' + 'D3 FF D2 D2 D2 FF D2 D2 D2 FF D2 D2 D2 FF D2 D2' + 'D2 FF D3 D3 D3 FF D2 D2 D2 FF D3 D3 D3 FF D2 D2' + 'D2 FF D1 D1 D1 FF D0 D0 D0 FF D3 D3 D3 FF D3 D3' + 'D3 FF 6E 6E 6E FF 92 92 92 FF FF D4 D4 FF FF D4' + 'D4 FF FF D4 D4 FF FF D4 D4 FF FF D4 F0 FF FF D4' + 'F0 FF FF D4 F0 FF FF D4 F0 FF FF D4 F0 FF 00 00' + '00 00 00 00 00 E1 07 07 07 FF DD DD DD FF CC CC' + 'CC FF D3 D3 D3 FF D3 D3 D3 FF D0 D0 D0 FF D0 D0' + 'D0 FF D0 D0 D0 FF D0 D0 D0 FF D3 D3 D3 FF D3 D3' + 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' + 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' + 'D3 FF C4 C4 C4 FF B3 B3 B3 FF 62 62 62 FF 9E 9E' + '9E FF FF D4 D4 FF FF D4 F0 FF FF D4 F0 FF FF D4' + 'F0 FF CE CE CE FF 9E 9E 9E FF 92 92 92 FF 00 00' + '00 00 00 00 00 B2 00 00 00 FF DD DD DD FF CF CF' + 'CF FF D3 D3 D3 FF D3 D3 D3 FF D0 D0 D0 FF D0 D0' + 'D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0 D0 FF CF CF' + 'CF FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' + 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' + 'D3 FF B3 B3 B3 FF B3 B3 B3 FF 00 00 00 FF 00 00' + '00 FF 62 62 62 FF 86 86 86 FF 86 86 86 FF 86 86' + '86 FF 6E 6E 6E FF 00 00 00 24 00 00 00 00 00 00' + '00 00 00 00 00 4B 00 00 00 FE D8 D8 D8 FF D4 D4' + 'D4 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' + 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' + 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' + 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' + 'D3 FF B3 B3 B3 FF B3 B3 B3 FF 00 00 00 CF 00 00' + '00 CF 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 1A 00 00 00 F2 CC CC CC FF D6 D6' + 'D6 FF D3 D3 D3 FF D3 D3 D3 FF D6 D6 D6 FF D6 D6' + 'D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6' + 'D6 FF D6 D6 D6 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' + 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF C4 C4' + 'C4 FF BD BD BD FF D0 D0 D0 FF 09 09 09 FF 00 00' + '00 CF 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 02 00 00 00 BF 97 97 97 FF DC DC' + 'DC FF DC DC DC FF DE DE DE FF DE DE DE FF DD DD' + 'DD FF DD DD DD FF DD DD DD FF DD DD DD FF DD DD' + 'DD FF DD DD DD FF DD DD DD FF DD DD DD FF DD DD' + 'DD FF DD DD DD FF DD DD DD FF E7 E7 E7 FF E7 E7' + 'E7 FF DC DC DC FF C6 C6 C6 FF 00 00 00 FF 00 00' + '00 A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 A4 77 77 77 FF D3 D3' + 'D3 FF E1 E1 E1 FF DE DE DE FF DE DE DE FF DE DE' + 'DE FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' + 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' + 'E0 FF E1 E1 E1 FF E1 E1 E1 FF E7 E7 E7 FF E7 E7' + 'E7 FF D9 D9 D9 FF BB BB BB FF 00 00 00 FF 00 00' + '00 7E 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 62 35 35 35 FF BD BD' + 'BD FF E6 E6 E6 FF E6 E6 E6 FF E7 E7 E7 FF EB EB' + 'EB FF EB EB EB FF EB EB EB FF EB EB EB FF EB EB' + 'EB FF EB EB EB FF EB EB EB FF EB EB EB FF EB EB' + 'EB FF E7 E7 E7 FF E7 E7 E7 FF E7 E7 E7 FF E6 E6' + 'E6 FF D4 D4 D4 FF 9A 9A 9A FF 00 00 00 ED 00 00' + '00 2C 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 2D 1E 1E 1E FF AB AB' + 'AB FF ED ED ED FF E7 E7 E7 FF EC EC EC FF EB EB' + 'EB FF ED ED ED FF EB EB EB FF EB EB EB FF EB EB' + 'EB FF EB EB EB FF EB EB EB FF EB EB EB FF EB EB' + 'EB FF EB EB EB FF EC EC EC FF E5 E5 E5 FF EB EB' + 'EB FF D6 D6 D6 FF 8A 8A 8A FF 00 00 00 C3 00 00' + '00 17 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 FF 8D 8D' + '8D FF C4 C4 C4 FF B2 B2 B2 FF B2 B2 B2 FF EB EB' + 'EB FF F0 F0 F0 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0' + 'F0 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0' + 'F0 FF F3 F3 F3 FF D5 D5 D5 FF B6 B6 B6 FF B7 B7' + 'B7 FF CD CD CD FF 61 61 61 FF 00 00 00 85 00 00' + '00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 FF 64 64' + '64 FF DD DD DD FF DC DC DC FF E4 E4 E4 FF F9 F9' + 'F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9' + 'F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9' + 'F9 FF FA FA FA FF F2 F2 F2 FF D8 D8 D8 FF DC DC' + 'DC FF B0 B0 B0 FF 34 34 34 FF 00 00 00 67 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 9C 00 00' + '00 FF 3D 3D 3D FF 49 49 49 FF 48 48 48 FF 48 48' + '48 FF 48 48 48 FF 48 48 48 FF 48 48 48 FF 48 48' + '48 FF 48 48 48 FF 48 48 48 FF 48 48 48 FF 48 48' + '48 FF 48 48 48 FF 48 48 48 FF 49 49 49 FF 49 49' + '49 FF 02 02 02 FF 00 00 00 FF 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 06 00 00' + '00 7F 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 D6 00 00 00 5C 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF' + 'FF 00 FF FF FE 00 FF FF FC 00 FF FF E0 00 FF FF' + 'F0 00 80 00 00 00 80 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 18 00 00 00 08 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 00' + '00 00 80 00 00 00 80 00 00 00 80 00 00 00 80 00' + '00 01 80 00 00 7F 80 00 00 7F 80 00 00 7F C0 00' + '00 7F C0 00 00 7F C0 00 00 7F E0 00 00 7F E0 00' + '00 FF E0 00 01 FF E0 00 01 FF FF FF FF FF 28 00' + '00 00 10 00 00 00 20 00 00 00 01 00 04 00 00 00' + '00 00 80 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 80 00 00 00 00 80' + '00 00 80 80 00 00 00 00 80 00 80 00 80 00 00 80' + '80 00 C0 C0 C0 00 80 80 80 00 FF 00 00 00 00 FF' + '00 00 FF FF 00 00 00 00 FF 00 FF 00 FF 00 00 FF' + 'FF 00 FF FF FF 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 08 FF FF 00 00 00 00 00 8F FF FF 08 88' + '88 88 80 FF FF FF 0F FA F7 77 88 FF F7 FF 0F 88' + '88 88 88 FF F0 8F 0F FF FF FF F8 FF F8 FF 0F 77' + '77 77 78 FF FF FF 07 77 77 77 77 7F FF FF 07 77' + '77 77 77 8F FF FF 07 77 77 77 77 70 28 80 08 77' + '77 77 77 70 00 00 00 77 77 77 77 70 00 00 00 77' + '77 77 77 70 00 00 00 77 77 77 77 70 00 00 00 00' + '00 00 00 00 00 00 FF E0 00 00 FF C0 00 00 80 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01' + '00 00 00 07 00 00 80 07 00 00 80 07 00 00 80 0F' + '00 00 C0 1F 00 00 28 00 00 00 20 00 00 00 40 00' + '00 00 01 00 04 00 00 00 00 00 00 02 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 80 00 00 00 00 80 00 00 80 80 00 00 00 00' + '80 00 80 00 80 00 00 80 80 00 C0 C0 C0 00 80 80' + '80 00 FF 00 00 00 00 FF 00 00 FF FF 00 00 00 00' + 'FF 00 FF 00 FF 00 00 FF FF 00 FF FF FF 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 80 77 77 88 00 00' + '00 00 00 00 00 00 00 00 00 08 7F FF FF FF 00 00' + '00 00 00 00 00 00 00 00 00 8F FF FF FF FF 00 00' + '00 00 00 00 00 00 00 00 08 FF FF FF FF FF 00 00' + '00 00 00 00 00 00 00 00 87 FF FF FF FF FF 00 08' + '88 88 88 88 88 88 88 80 8F FF FF FF FF FF 00 87' + 'FF 7A FF FF 77 77 77 88 FF FF FF FF FF FF 00 7F' + 'FF AA AF 77 77 77 78 08 FF FF FF F7 FF FF 00 FF' + 'FF 8A 77 77 77 77 77 88 FF FF FF 78 8F FF 00 FF' + 'F8 88 88 88 88 88 88 88 FF FF FF 00 08 FF 00 FF' + 'F7 88 88 88 88 88 88 88 FF FF FF 00 07 FF 00 FF' + 'FF FF FF FF FF FF FF 78 FF FF FF 78 7F FF 00 FF' + 'FF FF FF FF FF FF FF 78 FF FF FF FF FF FF 00 FF' + '77 77 77 77 77 77 77 78 FF FF FF FF FF FF 00 F7' + '77 77 77 77 77 77 77 78 7F FF FF FF FF FF 00 77' + '77 77 77 77 77 77 77 77 87 FF FF FF FF FF 00 87' + '77 77 77 77 77 77 77 77 88 FF FF FF FF FF 00 87' + '77 77 77 77 77 77 77 77 78 8F FF FF FF FF 00 07' + '77 77 77 77 77 77 77 77 77 88 7F FF FF 78 00 07' + '77 77 77 77 77 77 77 77 77 70 02 88 88 70 00 07' + '77 77 77 77 77 77 77 77 77 70 00 00 00 00 00 08' + '77 77 77 77 77 77 77 77 77 70 00 00 00 00 00 08' + '77 77 77 77 77 77 77 77 77 70 00 00 00 00 00 00' + '77 77 77 77 77 77 77 77 77 80 00 00 00 00 00 00' + '77 77 77 77 77 77 77 77 77 80 00 00 00 00 00 00' + '77 77 77 77 77 77 77 77 77 80 00 00 00 00 00 00' + '77 77 77 77 77 77 77 77 77 00 00 00 00 00 00 00' + '87 77 77 77 77 77 77 77 77 00 00 00 00 00 00 00' + '08 88 88 88 88 88 88 88 80 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF' + 'FF 00 FF FF FE 00 FF FF FC 00 FF FF F8 00 FF FF' + 'F0 00 C0 00 00 00 80 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 18 00 00 00 08 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 00' + '00 00 80 00 00 00 80 00 00 00 80 00 00 00 80 00' + '00 01 80 00 00 7F 80 00 00 7F 80 00 00 7F C0 00' + '00 7F C0 00 00 7F C0 00 00 7F C0 00 00 7F E0 00' + '00 FF E0 00 00 FF F0 00 03 FF FF FF FF FF 28 00' + '00 00 10 00 00 00 20 00 00 00 01 00 20 00 00 00' + '00 00 00 04 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 78 6E 6E 6E FF 62 62' + '62 FF 00 00 00 9C 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 62 62 62 FF FF D4 F0 FF FF D4 F0 FF FF D4' + 'D4 FF FF D4 D4 FF 00 00 00 00 00 00 00 16 00 00' + '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' + '00 37 00 00 00 37 00 00 00 37 00 00 00 42 62 62' + '62 FF FF D4 F0 FF FF D4 F0 FF FF D4 D4 FF FF D4' + 'D4 FF F2 F2 F2 FF 00 00 00 54 90 90 90 FF AB AC' + 'AC FF CC CC CC FF C4 C4 C4 FF C2 C2 C2 FF C1 C1' + 'C1 FF BC BC BC FF BD BD BD FF 6E 6E 6E FF FF D4' + 'F0 FF FF D4 F0 FF FF D4 F0 FF FF D4 D4 FF FF D4' + 'E3 FF F2 F2 F2 FF 00 00 00 FA EA EA EA FF E8 E8' + 'E8 FF 00 FF 00 FF CB CB CB FF C8 C8 C8 FF C8 C8' + 'C8 FF C8 C8 C8 FF C8 C8 C8 FF 56 56 56 FF F2 F2' + 'F2 FF F2 F2 F2 FF FF D4 F0 FF B6 B6 B6 FF FF B1' + 'C7 FF FF D4 E3 FF 00 00 00 F9 EF EF EF FF EB EB' + 'EB FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' + '80 FF 80 80 80 FF 80 80 80 FF 62 62 62 FF F2 F2' + 'F2 FF F2 F2 F2 FF FF D4 F0 FF 00 00 00 78 62 62' + '62 FF F2 F2 F2 FF 00 00 00 F9 F7 F7 F7 FF F6 F6' + 'F6 FF F5 F5 F5 FF F3 F3 F3 FF F2 F2 F2 FF F1 F1' + 'F1 FF F0 F0 F0 FF EF EF EF FF 62 62 62 FF F2 F2' + 'F2 FF F2 F2 F2 FF FF D4 E3 FF FF D4 E3 FF FF D4' + 'FF FF FF D4 F0 FF 00 00 00 F7 F3 F3 F3 FF B7 B7' + 'B7 FF DA DA DA FF D8 D8 D8 FF D7 D7 D7 FF D7 D7' + 'D7 FF D7 D7 D7 FF D8 D8 D8 FF D3 D3 D3 FF F2 F2' + 'F2 FF F2 F2 F2 FF F2 F2 F2 FF FF D4 D4 FF FF D4' + 'D4 FF FF D4 F0 FF 00 00 00 73 EF EF EF FF CB CB' + 'CB FF CE CE CE FF D5 D5 D5 FF D5 D5 D5 FF D5 D5' + 'D5 FF D5 D5 D5 FF D5 D5 D5 FF D3 D3 D3 FF 7A 7A' + '7A FF F2 F2 F2 FF FF D4 D4 FF FF D4 D4 FF FF D4' + 'F0 FF FF D4 F0 FF 00 00 00 25 B7 B7 B7 FF CB CB' + 'CB FF D3 D3 D3 FF D0 D0 D0 FF D0 D0 D0 FF D3 D3' + 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF C4 C4' + 'C4 FF 80 80 80 FF FF D4 D4 FF FF D4 F0 FF FF D4' + 'F0 FF E6 E6 E6 FF 00 00 00 00 5F 5F 5F FF D2 D2' + 'D2 FF D1 D1 D1 FF D1 D1 D1 FF D1 D1 D1 FF D3 D3' + 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' + 'D3 FF 99 99 99 FF 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 18 18 18 FF DB DB' + 'DB FF DE DE DE FF DA DA DA FF DA DA DA FF DA DA' + 'DA FF DD DD DD FF DD DD DD FF DD DD DD FF D9 D9' + 'D9 FF 7A 7A 7A FF 00 00 00 0A 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 FF E5 E5' + 'E5 FF EB EB EB FF EB EB EB FF E4 E4 E4 FF E4 E4' + 'E4 FF E4 E4 E4 FF E5 E5 E5 FF E7 E7 E7 FF E6 E6' + 'E6 FF 20 20 20 FF 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 DD E4 E4' + 'E4 FF C1 C1 C1 FF ED ED ED FF EE EE EE FF EB EB' + 'EB FF ED ED ED FF ED ED ED FF C2 C2 C2 FF EC EC' + 'EC FF 00 00 00 FF 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 44 80 80' + '80 FF D7 D7 D7 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8' + 'D8 FF D8 D8 D8 FF D8 D8 D8 FF D9 D9 D9 FF B0 B0' + 'B0 FF 00 00 00 ED 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 2C 00 00 00 84 00 00 00 84 00 00 00 84 00 00' + '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' + '00 70 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 FF F0 00 00 FF E0 00 00 80 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 0F' + '00 00 80 07 00 00 80 0F 00 00 80 0F 00 00 80 0F' + '00 00 C0 1F 00 00 28 00 00 00 30 00 00 00 60 00' + '00 00 01 00 04 00 00 00 00 00 80 04 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 80 00 00 00 00 80 00 00 80 80 00 00 00 00' + '80 00 80 00 80 00 00 80 80 00 C0 C0 C0 00 80 80' + '80 00 FF 00 00 00 00 FF 00 00 FF FF 00 00 00 00' + 'FF 00 FF 00 FF 00 00 FF FF 00 FF FF FF 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 08 88 88 80 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '88 87 77 F7 77 88 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 08 87 FF FF FF FF F7 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 87' + 'FF FF FF FF FF FF 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 08 FF FF FF FF FF FF FF 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 08 8F FF' + 'FF FF FF FF FF FF 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 88 7F FF FF FF FF FF FF FF 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 08 88 FF FF' + 'FF FF FF FF FF FF 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 08 8F FF FF FF FF FF FF FF FF 00 00' + '87 77 77 77 77 77 77 77 77 77 77 77 88 8F FF FF' + 'FF FF FF FF FF FF 00 08 7F FF F7 AA FF FF 77 77' + '77 77 77 70 88 7F FF FF FF FF FF FF FF FF 00 07' + 'FF FF FA AA AF 77 77 77 77 77 77 00 88 FF FF FF' + 'FF FF FF FF FF FF 00 07 FF FF FA AA A7 77 77 77' + '77 77 77 80 88 FF FF FF FF FF 78 87 FF FF 00 07' + 'FF FF FF AA 77 77 77 77 77 77 77 77 87 FF FF FF' + 'FF F7 87 88 FF FF 00 07 FF FF 88 88 88 88 88 88' + '88 88 88 88 87 FF FF FF FF F8 00 08 7F FF 00 07' + 'FF FF 88 88 88 88 88 88 88 88 88 88 87 FF FF FF' + 'FF F8 00 08 7F FF 00 07 FF FF 77 77 77 77 77 77' + '77 77 77 77 87 FF FF FF FF F8 00 08 FF FF 00 07' + 'FF FF F7 77 77 77 77 77 77 77 77 77 87 FF FF FF' + 'FF F7 88 8F FF FF 00 07 FF FF FF FF FF FF FF FF' + 'FF FF FF FF 87 FF FF FF FF FF FF FF FF FF 00 07' + 'FF FF FF 77 77 7F FF FF FF FF FF FF 88 FF FF FF' + 'FF FF FF FF FF FF 00 07 77 77 77 77 77 77 77 77' + '77 77 77 77 88 FF FF FF FF FF FF FF FF FF 00 07' + '77 77 77 77 77 77 77 77 77 77 77 77 78 7F FF FF' + 'FF FF FF FF FF FF 00 07 77 77 77 77 77 77 77 77' + '77 77 77 77 78 8F FF FF FF FF FF FF FF FF 00 07' + '77 77 77 77 77 77 77 77 77 77 77 77 77 87 FF FF' + 'FF FF FF FF FF FF 00 08 77 77 77 77 77 77 77 77' + '77 77 77 77 77 88 7F FF FF FF FF FF FF FF 00 08' + '77 77 77 77 77 77 77 77 77 77 77 77 77 78 8F FF' + 'FF FF FF FF FF FF 00 00 77 77 77 77 77 77 77 77' + '77 77 77 77 77 77 88 FF FF FF FF FF FF FF 00 00' + '77 77 77 77 77 77 77 77 77 77 77 77 77 77 78 87' + 'FF FF FF FF FF F8 00 00 87 77 77 77 77 77 77 77' + '77 77 77 77 77 77 77 88 87 FF FF FF 78 88 00 00' + '87 77 77 77 77 77 77 77 77 77 77 77 77 77 77 80' + '08 88 88 88 80 00 00 00 87 77 77 77 77 77 77 77' + '77 77 77 77 77 77 77 80 00 00 00 00 00 00 00 00' + '87 77 77 77 77 77 77 77 77 77 77 77 77 77 77 80' + '00 00 00 00 00 00 00 00 07 77 77 77 77 77 77 77' + '77 77 77 77 77 77 77 80 00 00 00 00 00 00 00 00' + '07 77 77 77 77 77 77 77 77 77 77 77 77 77 77 80' + '00 00 00 00 00 00 00 00 08 77 77 77 77 77 77 77' + '77 77 77 77 77 77 77 80 00 00 00 00 00 00 00 00' + '08 77 77 77 77 77 77 77 77 77 77 77 77 77 77 00' + '00 00 00 00 00 00 00 00 08 77 77 77 77 77 77 77' + '77 77 77 77 77 77 77 00 00 00 00 00 00 00 00 00' + '00 77 77 77 77 77 77 77 77 77 77 77 77 77 78 00' + '00 00 00 00 00 00 00 00 00 77 77 77 77 77 77 77' + '77 77 77 77 77 77 78 00 00 00 00 00 00 00 00 00' + '00 87 77 77 77 77 77 77 77 77 77 77 77 77 78 00' + '00 00 00 00 00 00 00 00 00 87 77 77 77 77 77 77' + '77 77 77 77 77 77 78 00 00 00 00 00 00 00 00 00' + '00 87 77 77 77 77 77 77 77 77 77 77 77 77 70 00' + '00 00 00 00 00 00 00 00 00 08 77 77 77 77 77 77' + '77 77 77 77 77 77 80 00 00 00 00 00 00 00 00 00' + '00 00 08 88 88 88 88 88 88 88 88 88 88 80 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF' + 'FF FF F0 00 00 00 FF FF FF FF E0 00 00 00 FF FF' + 'FF FF C0 00 00 00 FF FF FF FF 80 00 00 00 FF FF' + 'FF FE 00 00 00 00 FF FF FF FE 00 00 00 00 FF FF' + 'FF FC 00 00 00 00 F0 00 00 00 00 00 00 00 C0 00' + '00 00 00 00 00 00 80 00 00 00 00 00 00 00 80 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 E0 00 00 00 00' + '00 00 00 60 00 00 00 00 00 00 00 20 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 00' + '00 00 00 00 00 00 80 00 00 00 00 00 00 00 80 00' + '00 00 00 00 00 00 80 00 00 00 00 00 00 00 80 00' + '00 00 00 00 00 00 80 00 00 00 00 00 00 00 C0 00' + '00 00 00 07 00 00 C0 00 00 00 07 FF 00 00 C0 00' + '00 00 07 FF 00 00 C0 00 00 00 07 FF 00 00 C0 00' + '00 00 07 FF 00 00 C0 00 00 00 07 FF 00 00 E0 00' + '00 00 07 FF 00 00 E0 00 00 00 07 FF 00 00 E0 00' + '00 00 07 FF 00 00 E0 00 00 00 07 FF 00 00 E0 00' + '00 00 07 FF 00 00 F0 00 00 00 07 FF 00 00 F0 00' + '00 00 0F FF 00 00 F0 00 00 00 0F FF 00 00 F0 00' + '00 00 1F FF 00 00 F8 00 00 00 3F FF 00 00 FE 00' + '00 00 7F FF 00 00 FF FF FF FF FF FF 00 00 28 00' + '00 00 30 00 00 00 60 00 00 00 01 00 08 00 00 00' + '00 00 00 09 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 01 01 01 00 02 02' + '02 00 05 05 05 00 06 06 06 00 07 07 07 00 08 08' + '08 00 09 09 09 00 0B 0B 0B 00 0C 0C 0C 00 18 18' + '18 00 19 19 19 00 1E 1E 1E 00 1F 1F 1F 00 20 20' + '20 00 21 21 21 00 22 22 22 00 24 24 24 00 26 26' + '26 00 27 27 27 00 28 28 28 00 29 29 29 00 2A 2A' + '2A 00 2B 2B 2B 00 2C 2C 2C 00 2E 2E 2E 00 2F 2F' + '2F 00 34 34 34 00 35 35 35 00 39 39 39 00 3D 3D' + '3D 00 40 40 40 00 41 41 41 00 48 48 48 00 49 49' + '49 00 4A 4A 4A 00 4B 4B 4B 00 53 53 53 00 56 56' + '56 00 59 59 59 00 5D 5D 5D 00 5F 5F 5F 00 61 61' + '61 00 62 62 62 00 64 64 64 00 6E 6E 6E 00 75 75' + '75 00 77 77 77 00 7A 7A 7A 00 7E 7E 7E 00 7F 7F' + '7F 00 00 C0 00 00 00 FF 00 00 80 80 80 00 83 83' + '83 00 86 86 86 00 8A 8A 8A 00 8D 8D 8D 00 90 90' + '90 00 92 92 92 00 93 93 93 00 97 97 97 00 99 99' + '99 00 9A 9A 9A 00 9E 9E 9E 00 9F 9F 9F 00 A4 A0' + 'A0 00 A4 A4 A4 00 A7 A7 A7 00 A8 A8 A8 00 A9 A9' + 'A9 00 AA AA AA 00 AB AB AB 00 AD A8 AB 00 AB AC' + 'AC 00 AD AD AD 00 AE AE AE 00 AF AF AF 00 B0 B0' + 'B0 00 B2 B2 B2 00 B3 B3 B3 00 B5 B5 B5 00 B6 B6' + 'B6 00 B7 B7 B7 00 B8 B4 B6 00 B8 B8 B8 00 BA BA' + 'BA 00 BB BB BB 00 BC BC BC 00 BD BD BD 00 BE BE' + 'BE 00 BF BF BF 00 FF B1 C7 00 C0 C0 C0 00 C1 C1' + 'C1 00 C2 C2 C2 00 C3 C3 C3 00 C4 C4 C4 00 C5 C5' + 'C5 00 C6 C6 C6 00 C8 C8 C8 00 C8 C9 C9 00 C9 C9' + 'C9 00 CA CA CA 00 CB CB CB 00 CC CC CC 00 CD CD' + 'CD 00 CE CE CE 00 CF CF CF 00 D0 D0 D0 00 D1 D1' + 'D1 00 D2 D2 D2 00 D3 D3 D3 00 D4 D4 D4 00 D5 D5' + 'D5 00 D6 D6 D6 00 D7 D7 D7 00 D8 D8 D8 00 D9 D9' + 'D9 00 DA DA DA 00 DB DB DB 00 DC DC DC 00 DD DD' + 'DD 00 DE DE DE 00 DF DF DF 00 FF D4 D4 00 FF D4' + 'E3 00 FF D4 F0 00 FF D4 FF 00 E0 E0 E0 00 E1 E1' + 'E1 00 E2 E2 E2 00 E3 E3 E3 00 E4 E4 E4 00 E5 E5' + 'E5 00 E6 E6 E6 00 E7 E7 E7 00 E8 E8 E8 00 E9 E9' + 'E9 00 EA EA EA 00 EB EB EB 00 EC EC EC 00 ED ED' + 'ED 00 EE EE EE 00 EF EF EF 00 F0 F0 F0 00 F1 F1' + 'F1 00 F2 F2 F2 00 F3 F3 F3 00 F4 F4 F4 00 F5 F5' + 'F5 00 F6 F6 F6 00 F7 F7 F7 00 F8 F8 F8 00 F9 F9' + 'F9 00 FA FA FA 00 FF FF FF 00 00 00 00 00 78 EE' + '0C 01 78 EE 0C 01 40 00 00 00 40 00 00 00 01 00' + '00 00 18 00 00 00 00 00 00 00 10 19 95 00 42 00' + '00 00 00 00 00 00 F4 18 95 00 00 00 00 00 00 00' + '00 00 00 00 00 00 70 EE 0C 01 00 24 0D 01 01 01' + 'F5 77 78 01 38 00 78 EE 0C 01 E0 19 0D 01 E8 19' + '0D 01 78 01 38 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 BE B3 E7 77 70 EE 0C 01 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 08 04 00 00 E4 00 00 00 08 04 00 00 08 01' + '00 00 00 00 00 00 00 00 00 00 00 00 01 01 00 00' + '38 00 BC 18 95 00 C0 18 95 00 B0 19 95 00 F0 88' + 'FA 77 88 1C F5 77 FF FF FF FF 37 90 F5 77 81 E9' + '49 00 00 00 38 00 00 00 00 00 78 EE 0C 01 78 EE' + '0C 01 A4 1A 95 00 40 00 00 00 40 00 00 00 B8 10' + 'E9 77 FF FF FF FF C9 F1 E7 77 16 EA 4B 00 F8 00' + '00 00 B4 1A 95 00 DC E3 49 00 E0 A3 4E 00 FF FF' + 'FF FF 10 00 00 00 10 DA 4B 00 78 EE 0C 01 71 CC' + '43 00 78 EE 0C 01 50 7E 0D 01 A4 1A 95 00 F8 A2' + 'AF 00 C4 F5 AF 00 04 00 00 00 50 7E 0D 01 0F 02' + '00 00 B8 EE 0C 01 10 00 00 00 00 00 00 00 20 00' + '00 00 78 EE 0C 01 40 00 00 00 10 00 00 00 00 01' + '00 00 00 04 00 00 00 00 00 00 00 00 00 00 10 00' + '00 00 10 00 00 00 28 00 00 00 10 00 00 00 20 00' + '00 00 01 00 20 00 00 00 00 00 00 04 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 9D 9D 9D 9D 9D 9D' + '9D 9D 9D 9D 9D 9D 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 9D 9D 9D 9D 35 2D 2B' + '2B 2B 35 9D 9D 9D 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 9D 9D 37 2D 30 47 6B 77' + '93 77 6B 47 35 2D 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 9D 9D 30 35 6B 9C 7F 7F 7F' + '7F 7D 7D 7D 7D 5D 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 9D 9D 9D 2B 5D 7F 7F 7F 7F 7F 7F' + '7D 7D 7D 7D 7D 93 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 9D 9D 9D 2D 87 7F 7F 7F 7F 7F 7F 7D' + '7D 7D 7D 7D 93 93 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 9D 26 2B 87 7F 7F 7F 7F 7F 7F 7D 7D' + '7D 7D 7D 93 93 93 00 00 00 00 9D 9D 9D 9D 9D 9D' + '9D 9D 9D 9D 9D 9D 9D 9D 9D 9D 9D 9D 9D 9D 9D 9D' + '9D 9D 9D 9D 23 2B 5F 7F 7F 7F 7F 7F 7F 7D 7D 7D' + '7D 7D 93 93 93 93 00 00 9D 9D 9D 9D 9D 9D 9D 9D' + '9D 9D 9D 9D 9D 9D 9D 9D 9D 9D 9D 9D 9D 9D 9D 9D' + '9D 9D 9D 2B 26 3B 7F 7F 7F 7F 7F 7F 7F 7D 7D 7D' + '7D 93 93 93 93 93 00 9D 9D 9D 9D 0F 18 17 18 17' + '17 17 17 17 17 17 17 17 17 17 16 16 16 16 16 16' + '16 16 16 23 2B 93 7F 7F 7F 7F 7F 7F 7F 7D 7D 7D' + '93 93 93 93 93 93 00 9D 9D 12 3A 54 4B 4A 49 6A' + '69 68 66 61 60 5F 5F 60 5D 5E 5B 5B 58 59 56 59' + '59 59 2D 26 40 7F 7F 7F 7F 7F 7F 7F 7F 7D 7D 7F' + '7E 7E 93 93 93 93 9D 9D 01 38 49 8C 89 89 89 71' + '33 33 88 89 89 84 7A 75 6F 6A 6A 6A 6A 6A 65 6A' + '47 19 26 2B 77 7F 7F 7F 7F 7F 7F 7F 7F 80 80 80' + '80 80 7F 93 93 93 9D 9D 0B 49 8C 8C 89 89 89 34' + '34 34 33 82 7C 72 69 6F 68 6A 6A 6A 6A 6A 6A 6A' + '1F 19 26 30 93 93 7E 93 7F 7F 7F 7F 7F 80 7F 7E' + '7E 80 80 93 93 93 9D 9D 15 49 8B 8C 8C 89 89 34' + '34 34 34 68 64 64 64 64 64 64 64 64 64 64 64 64' + '3C 1F 26 3B 93 93 93 93 93 7E 7F 7F 7F 7F 52 35' + '3B 5C 7F 7F 7E 93 9D 9D 14 6E 8D 8C 8C 89 89 89' + '34 34 51 51 52 52 52 52 52 52 52 52 52 52 52 52' + '52 52 26 42 93 93 93 93 93 93 93 7F 7F 52 2D 47' + '2B 30 7E 7F 93 93 9D 9D 14 6E 8F 89 8C 89 35 35' + '35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35' + '35 35 2B 52 93 93 93 93 93 93 93 7F 7E 2D 00 00' + '00 2B 52 7F 93 93 9D 9D 13 6E 90 8C 8C 8C 35 35' + '35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35' + '35 35 2B 52 93 93 93 93 93 93 93 7F 7D 2B 9D 00' + '00 2B 52 7F 93 93 9D 9D 13 6F 93 8B 8C 8C 44 44' + '44 48 4C 4E 4D 4D 4D 4D 4D 4D 48 48 48 48 48 48' + '48 48 2B 6B 93 93 93 93 93 93 7E 7F 7E 35 9D 9D' + '00 30 7F 7F 7E 93 9D 9D 12 70 8A 89 87 85 83 78' + '79 75 76 6F 6F 6C 6D 6D 6D 6D 6D 6D 6D 6D 6D 6D' + '6D 6D 2B 6B 93 93 93 93 93 93 93 7F 7F 5D 30 2B' + '35 87 7F 7F 93 7E 9D 9D 12 70 98 99 97 97 97 96' + '96 95 95 94 94 94 93 93 92 92 92 91 91 91 90 90' + '8F 8F 2B 47 93 93 93 93 93 93 93 7E 7F 7F 7E 7D' + '7E 80 80 7F 7F 7F 9D 9D 11 73 9C 8A 82 83 83 81' + '7C 7C 7C 7C 7C 81 81 81 81 81 81 81 81 81 81 81' + '81 81 2B 3B 93 93 93 93 93 93 93 93 93 80 80 80' + '80 80 7F 7F 7F 7F 9D 9D 11 7B 99 76 61 57 5B 75' + '77 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76' + '76 76 2D 30 93 93 93 93 93 93 93 93 93 7E 7D 7D' + '7D 7D 7F 7F 7F 7F 9D 9D 0D 77 94 63 46 53 4E 60' + '77 75 75 75 75 75 74 74 74 74 74 74 74 74 75 75' + '75 75 70 2B 5D 93 93 93 93 93 93 93 93 93 7D 7D' + '7D 7D 7F 7F 7F 7F 9D 9D 03 5F 97 58 4F 60 48 57' + '75 72 72 72 71 70 70 72 74 75 75 74 72 70 70 70' + '71 72 70 2B 37 93 93 93 93 93 93 93 93 7D 7D 7D' + '7D 7D 7F 7F 7F 7F 00 9D 9D 43 95 6C 62 6F 5B 66' + '70 6F 6D 70 6D 6D 72 72 72 72 72 72 72 72 6D 6D' + '71 6D 70 70 2B 52 93 93 93 93 93 93 7D 7D 7D 7D' + '7D 7D 7F 7F 7F 7F 00 9D 9D 31 90 6E 6C 68 6C 6E' + '6B 6C 72 72 72 72 72 72 72 72 72 72 72 72 72 72' + '72 82 70 70 30 30 5C 93 93 93 93 7D 7D 7D 7D 7D' + '7D 7F 7F 7F 7F 7F 00 9D 9D 27 8A 6D 6A 6A 6A 67' + '70 70 70 70 71 72 73 73 73 73 73 73 73 73 72 72' + '78 85 70 70 70 2D 3B 93 93 93 7D 7D 7D 7D 7D 7D' + '7F 7F 7F 7F 7F 7F 00 9D 9D 1F 74 6F 67 68 67 71' + '70 70 70 6E 6F 6F 6F 6F 6F 6F 70 6F 70 70 6F 6F' + '6E 6D 70 70 70 61 2D 3B 93 7D 7D 7D 7D 7D 7D 7F' + '7F 7F 7F 7F 7F 7F 00 9D 9D 10 53 78 67 68 6B 70' + '70 6C 6E 6D 6D 6D 6D 6C 70 70 6B 70 70 70 70 70' + '70 6B 70 70 70 61 61 2D 35 6B 7D 7D 7D 7D 7F 7F' + '7F 7F 7F 7F 87 3B 00 9D 9D 05 41 7A 69 6A 70 70' + '70 6D 6D 6D 6D 6D 6D 70 70 70 70 70 70 70 70 70' + '70 70 70 70 70 61 61 50 3E 2B 40 5D 7D 7F 7F 7F' + '7F 9C 6B 40 2B 3B 00 00 9D 9D 36 7A 6C 6E 70 70' + '6D 6D 6D 6D 6D 6D 6D 6D 6C 70 70 70 70 70 70 70' + '70 70 70 70 70 70 50 50 3E 9D 9D 30 2B 37 37 37' + '37 2B 2D 00 00 00 00 00 9D 9D 29 79 6E 6F 70 70' + '6E 6E 6E 6E 6E 6E 6E 6E 6E 70 70 70 70 70 70 70' + '70 70 70 70 70 70 50 50 3E 9D 9D 00 00 00 00 00' + '00 00 00 00 00 00 00 00 9D 9D 20 75 71 6F 70 70' + '70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70' + '70 70 70 70 70 70 50 50 3E 9D 9D 00 00 00 00 00' + '00 00 00 00 00 00 00 00 9D 9D 18 69 73 72 70 70' + '73 73 73 73 73 73 73 73 73 73 73 70 70 70 70 70' + '70 70 70 70 61 70 59 6D 3E 07 9D 00 00 00 00 00' + '00 00 00 00 00 00 00 00 9D 9D 0A 4E 78 78 7B 7B' + '7B 76 77 77 77 77 77 77 77 77 77 77 7A 7A 7A 7A' + '7A 77 7A 7A 88 76 69 67 30 02 9D 00 00 00 00 00' + '00 00 00 00 00 00 00 00 9D 9D 06 3D 79 7C 79 7B' + '7B 7B 7A 7A 7A 7A 7A 7A 7A 7A 7A 7A 7A 7A 7A 7A' + '7A 7A 88 88 88 7A 79 63 25 9D 9D 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 9D 9D 2F 70 83 82 7B' + '7B 7B 7B 7B 81 81 81 81 81 81 81 81 81 81 81 81' + '82 82 88 88 88 84 76 57 1D 9D 9D 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 9D 9D 24 66 86 84 85' + '8C 8C 8C 8C 8C 8C 85 85 85 85 85 85 85 85 86 86' + '88 88 88 88 85 87 73 45 0E 9D 9D 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 9D 9D 1C 59 87 87 87' + '88 88 8C 8C 8C 8C 8C 8C 8C 8C 8C 8C 8C 8C 8C 88' + '88 88 88 88 87 89 71 3F 08 9D 9D 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 9D 9D 0C 48 85 8E 88' + '87 8D 8C 8B 8E 8C 8C 8C 8C 8C 8C 8C 8C 8C 8C 8C' + '8C 8D 8B 86 8C 8C 73 38 9D 9D 9D 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 9D 9D 06 3E 85 7C 59' + '5E 73 8D 8E 8E 8F 8F 8E 8D 8C 8C 8D 8E 8F 8F 8E' + '8F 85 5F 5A 6E 8D 71 2E 9D 9D 9D 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 9D 9D 39 81 61 4F' + '55 4F 8C 92 91 91 91 91 91 91 91 91 91 91 91 91' + '94 72 4E 52 53 8C 6A 2A 9D 9D 9D 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 9D 9D 2C 6B 7A 79' + '72 85 9A 9A 9A 9A 9A 9A 9A 9A 9A 9A 9A 9A 9A 9A' + '9B 93 7C 75 79 74 4E 1B 9D 9D 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 9D 9D 0B 35 5A 70' + '74 78 75 75 75 75 75 75 75 75 75 75 75 75 75 75' + '75 76 76 74 6A 4E 28 04 9D 9D 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 9D 9D 9D 09 1E 22' + '21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21' + '21 21 21 22 22 1A 02 9D 9D 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 9D 9D 9D 9D 9D' + '9D 9D 9D 9D 9D 9D 9D 9D 9D 9D 9D 9D 9D 9D 9D 9D' + '9D 9D 9D 9D 9D 9D 9D 9D 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 9D 9D 9D' + '9D 9D 9D 9D 9D 9D 9D 9D 9D 9D 9D 9D 9D 9D 9D 9D' + '9D 9D 9D 9D 9D 9D 9D 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 FF FF FF FF F0 00 00 00 FF FF' + 'FF FF E0 00 00 00 FF FF FF FF C0 00 00 00 FF FF' + 'FF FF 80 00 00 00 FF FF FF FE 00 00 00 00 FF FF' + 'FF FC 00 00 00 00 FF FF FF FC 00 00 00 00 F0 00' + '00 00 00 00 00 00 C0 00 00 00 00 00 00 00 80 00' + '00 00 00 00 00 00 80 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 E0 00 00 00 00 00 00 00 60 00 00 00 00' + '00 00 00 20 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 80 00 00 00 00 00 00 00 80 00' + '00 00 00 00 00 00 80 00 00 00 00 00 00 00 80 00' + '00 00 00 00 00 00 80 00 00 00 00 00 00 00 80 00' + '00 00 00 00 00 00 C0 00 00 00 00 07 00 00 C0 00' + '00 00 07 FF 00 00 C0 00 00 00 07 FF 00 00 C0 00' + '00 00 07 FF 00 00 C0 00 00 00 07 FF 00 00 C0 00' + '00 00 07 FF 00 00 E0 00 00 00 07 FF 00 00 E0 00' + '00 00 07 FF 00 00 E0 00 00 00 07 FF 00 00 E0 00' + '00 00 07 FF 00 00 E0 00 00 00 07 FF 00 00 F0 00' + '00 00 07 FF 00 00 F0 00 00 00 0F FF 00 00 F0 00' + '00 00 0F FF 00 00 F0 00 00 00 1F FF 00 00 F8 00' + '00 00 3F FF 00 00 FE 00 00 00 7F FF 00 00 FF FF' + 'FF FF FF FF 00 00 28 00 00 00 30 00 00 00 60 00' + '00 00 01 00 20 00 00 00 00 00 00 24 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 0C 00 00 00 24 00 00 00 30 00 00 00 48 00 00' + '00 78 00 00 00 90 00 00 00 90 00 00 00 90 00 00' + '00 90 00 00 00 78 00 00 00 48 00 00 00 30 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 0C 00 00' + '00 3C 00 00 00 78 00 00 00 90 80 80 80 FF 6E 6E' + '6E FF 62 62 62 FF 62 62 62 FF 62 62 62 FF 80 80' + '80 FF 00 00 00 B4 00 00 00 9C 00 00 00 90 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 0C 00 00 00 3C 86 86' + '86 FF 6E 6E 6E FF 7A 7A 7A FF AA AA AA FF CE CE' + 'CE FF DA DA DA FF F2 F2 F2 FF DA DA DA FF CE CE' + 'CE FF AA AA AA FF 80 80 80 FF 6E 6E 6E FF 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 0C 00 00 00 3C 7A 7A 7A FF 80 80' + '80 FF CE CE CE FF FF FF FF FF FF D4 F0 FF FF D4' + 'F0 FF FF D4 F0 FF FF D4 F0 FF FF D4 D4 FF FF D4' + 'D4 FF FF D4 D4 FF FF D4 D4 FF C0 C0 C0 FF 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 24 00 00 00 48 62 62 62 FF C0 C0 C0 FF FF D4' + 'F0 FF FF D4 F0 FF FF D4 F0 FF FF D4 F0 FF FF D4' + 'F0 FF FF D4 F0 FF FF D4 D4 FF FF D4 D4 FF FF D4' + 'D4 FF FF D4 D4 FF FF D4 D4 FF F2 F2 F2 FF 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 3E 00 00' + '00 78 6E 6E 6E FF E6 E6 E6 FF FF D4 F0 FF FF D4' + 'F0 FF FF D4 F0 FF FF D4 F0 FF FF D4 F0 FF FF D4' + 'F0 FF FF D4 D4 FF FF D4 D4 FF FF D4 D4 FF FF D4' + 'D4 FF FF D4 D4 FF F2 F2 F2 FF F2 F2 F2 FF 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 56 56 56 56 FF 62 62' + '62 FF E6 E6 E6 FF FF D4 F0 FF FF D4 F0 FF FF D4' + 'F0 FF FF D4 F0 FF FF D4 F0 FF FF D4 F0 FF FF D4' + 'D4 FF FF D4 D4 FF FF D4 D4 FF FF D4 D4 FF FF D4' + 'D4 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2 F2 FF 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 16 00 00 00 34 00 00 00 37 00 00 00 37 00 00' + '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' + '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' + '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' + '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' + '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' + '00 42 00 00 00 42 4A 4A 4A FF 62 62 62 FF C2 C2' + 'C2 FF FF D4 F0 FF FF D4 F0 FF FF D4 F0 FF FF D4' + 'F0 FF FF D4 F0 FF FF D4 F0 FF FF D4 D4 FF FF D4' + 'D4 FF FF D4 D4 FF FF D4 D4 FF FF D4 D4 FF F2 F2' + 'F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2 F2 FF 00 00' + '00 00 00 00 00 00 00 00 00 05 00 00 00 69 00 00' + '00 C5 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' + '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' + '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' + '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' + '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' + '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' + '00 FF 62 62 62 FF 56 56 56 FF 92 92 92 FF FF D4' + 'F0 FF FF D4 F0 FF FF D4 F0 FF FF D4 F0 FF FF D4' + 'F0 FF FF D4 F0 FF FF D4 F0 FF FF D4 D4 FF FF D4' + 'D4 FF FF D4 D4 FF FF D4 D4 FF F2 F2 F2 FF F2 F2' + 'F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2 F2 FF 00 00' + '00 00 00 00 00 05 00 00 00 9B 00 00 00 FF 00 00' + '00 FF 21 21 21 FF 2C 2C 2C FF 2B 2B 2B FF 2C 2C' + '2C FF 2B 2B 2B FF 2B 2B 2B FF 2B 2B 2B FF 2B 2B' + '2B FF 2B 2B 2B FF 2B 2B 2B FF 2B 2B 2B FF 2B 2B' + '2B FF 2B 2B 2B FF 2B 2B 2B FF 2B 2B 2B FF 2A 2A' + '2A FF 2A 2A 2A FF 2A 2A 2A FF 2A 2A 2A FF 2A 2A' + '2A FF 2A 2A 2A FF 2A 2A 2A FF 2A 2A 2A FF 2A 2A' + '2A FF 4A 4A 4A FF 62 62 62 FF F2 F2 F2 FF FF D4' + 'F0 FF FF D4 F0 FF FF D4 F0 FF FF D4 F0 FF FF D4' + 'F0 FF FF D4 F0 FF FF D4 F0 FF FF D4 D4 FF FF D4' + 'D4 FF FF D4 D4 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2' + 'F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2 F2 FF 00 00' + '00 00 00 00 00 54 00 00 00 FF 26 26 26 FF 90 90' + '90 FF B8 B4 B6 FF AD AD AD FF AB AC AC FF AD A8' + 'AB FF CD CD CD FF CC CC CC FF CB CB CB FF C9 C9' + 'C9 FF C4 C4 C4 FF C3 C3 C3 FF C2 C2 C2 FF C2 C2' + 'C2 FF C3 C3 C3 FF C0 C0 C0 FF C1 C1 C1 FF BF BF' + 'BF FF BF BF BF FF BC BC BC FF BD BD BD FF BA BA' + 'BA FF BD BD BD FF BD BD BD FF BD BD BD FF 6E 6E' + '6E FF 56 56 56 FF 9E 9E 9E FF FF D4 F0 FF FF D4' + 'F0 FF FF D4 F0 FF FF D4 F0 FF FF D4 F0 FF FF D4' + 'F0 FF FF D4 F0 FF FF D4 F0 FF FF D4 D4 FF FF D4' + 'D4 FF FF D4 F0 FF FF D4 E3 FF FF D4 E3 FF F2 F2' + 'F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2 F2 FF 00 00' + '00 03 00 00 00 AD 01 01 01 FF 8A 8A 8A FF AD A8' + 'AB FF EB EB EB FF E8 E8 E8 FF E8 E8 E8 FF E8 E8' + 'E8 FF D4 D4 D4 FF 00 C0 00 FF 00 C0 00 FF E7 E7' + 'E7 FF E8 E8 E8 FF E8 E8 E8 FF E3 E3 E3 FF DD DD' + 'DD FF D8 D8 D8 FF D2 D2 D2 FF CD CD CD FF CD CD' + 'CD FF CD CD CD FF CD CD CD FF CD CD CD FF C8 C9' + 'C9 FF CD CD CD FF AA AA AA FF 2E 2E 2E FF 56 56' + '56 FF 62 62 62 FF DA DA DA FF FF D4 F0 FF FF D4' + 'F0 FF FF D4 F0 FF FF D4 F0 FF FF D4 F0 FF FF D4' + 'F0 FF FF D4 F0 FF FF D4 F0 FF FF D4 FF FF FF D4' + 'FF FF FF D4 FF FF FF D4 FF FF FF D4 FF FF FF D4' + 'F0 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2 F2 FF 00 00' + '00 15 00 00 00 F0 19 19 19 FF AD A8 AB FF EB EB' + 'EB FF EB EB EB FF E8 E8 E8 FF E8 E8 E8 FF E8 E8' + 'E8 FF 00 FF 00 FF 00 FF 00 FF 00 FF 00 FF 00 C0' + '00 FF E1 E1 E1 FF DF DF DF FF D5 D5 D5 FF CC CC' + 'CC FF D2 D2 D2 FF CB CB CB FF CD CD CD FF CD CD' + 'CD FF CD CD CD FF CD CD CD FF CD CD CD FF CD CD' + 'CD FF CD CD CD FF 40 40 40 FF 2E 2E 2E FF 56 56' + '56 FF 7A 7A 7A FF F2 F2 F2 FF F2 F2 F2 FF FF D4' + 'E3 FF F2 F2 F2 FF FF D4 F0 FF FF D4 F0 FF FF D4' + 'F0 FF FF D4 F0 FF FF D4 F0 FF FF D4 FF FF FF D4' + 'F0 FF FF D4 E3 FF FF D4 E3 FF FF D4 FF FF FF D4' + 'FF FF F2 F2 F2 FF F2 F2 F2 FF F2 F2 F2 FF 00 00' + '00 30 00 00 00 FA 29 29 29 FF AD A8 AB FF EA EA' + 'EA FF EB EB EB FF EB EB EB FF E8 E8 E8 FF E8 E8' + 'E8 FF 00 FF 00 FF 00 FF 00 FF 00 FF 00 FF 00 FF' + '00 FF CB CB CB FF C8 C8 C8 FF C8 C8 C8 FF C8 C8' + 'C8 FF C8 C8 C8 FF C8 C8 C8 FF C8 C8 C8 FF C8 C8' + 'C8 FF C8 C8 C8 FF C8 C8 C8 FF C8 C8 C8 FF C8 C8' + 'C8 FF C8 C8 C8 FF 93 93 93 FF 40 40 40 FF 56 56' + '56 FF 92 92 92 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2' + 'F2 FF F2 F2 F2 FF F2 F2 F2 FF FF D4 E3 FF FF D4' + 'F0 FF FF D4 F0 FF FF D4 F0 FF FF D4 F0 FF B6 B6' + 'B6 FF 80 80 80 FF 92 92 92 FF FF B1 C7 FF FF D4' + 'F0 FF FF D4 F0 FF FF D4 E3 FF F2 F2 F2 FF 00 00' + '00 34 00 00 00 F9 28 28 28 FF D1 D1 D1 FF EC EC' + 'EC FF EB EB EB FF EB EB EB FF E8 E8 E8 FF E8 E8' + 'E8 FF E8 E8 E8 FF 00 FF 00 FF 00 FF 00 FF B5 B5' + 'B5 FF B5 B5 B5 FF B6 B6 B6 FF B6 B6 B6 FF B6 B6' + 'B6 FF B6 B6 B6 FF B6 B6 B6 FF B6 B6 B6 FF B6 B6' + 'B6 FF B6 B6 B6 FF B6 B6 B6 FF B6 B6 B6 FF B6 B6' + 'B6 FF B6 B6 B6 FF B6 B6 B6 FF B6 B6 B6 FF 56 56' + '56 FF A4 A0 A0 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2' + 'F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2' + 'F2 FF FF D4 F0 FF FF D4 F0 FF B6 B6 B6 FF 6E 6E' + '6E FF AA AA AA FF 62 62 62 FF 7A 7A 7A FF FF D4' + 'E3 FF FF D4 F0 FF F2 F2 F2 FF F2 F2 F2 FF 00 00' + '00 33 00 00 00 F9 28 28 28 FF D1 D1 D1 FF EE EE' + 'EE FF E8 E8 E8 FF EB EB EB FF E8 E8 E8 FF 80 80' + '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' + '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' + '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' + '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' + '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 62 62' + '62 FF B6 B6 B6 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2' + 'F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2' + 'F2 FF FF D4 F0 FF FF D4 E3 FF 6E 6E 6E FF 00 00' + '00 00 00 00 00 00 00 00 00 00 62 62 62 FF B6 B6' + 'B6 FF FF D4 F0 FF F2 F2 F2 FF F2 F2 F2 FF 00 00' + '00 33 00 00 00 F9 27 27 27 FF D1 D1 D1 FF EF EF' + 'EF FF EB EB EB FF EB EB EB FF EB EB EB FF 80 80' + '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' + '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' + '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' + '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 80 80' + '80 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 62 62' + '62 FF B6 B6 B6 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2' + 'F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2' + 'F2 FF FF D4 F0 FF FF D4 D4 FF 62 62 62 FF 00 00' + '00 78 00 00 00 00 00 00 00 00 62 62 62 FF B6 B6' + 'B6 FF FF D4 F0 FF F2 F2 F2 FF F2 F2 F2 FF 00 00' + '00 33 00 00 00 F9 27 27 27 FF D2 D2 D2 FF F2 F2' + 'F2 FF EA EA EA FF EB EB EB FF EB EB EB FF A7 A7' + 'A7 FF A7 A7 A7 FF A7 A7 A7 FF AB AB AB FF AE AE' + 'AE FF B0 B0 B0 FF AF AF AF FF AF AF AF FF AF AF' + 'AF FF AF AF AF FF AF AF AF FF AF AF AF FF AB AB' + 'AB FF AB AB AB FF AB AB AB FF AB AB AB FF AB AB' + 'AB FF AB AB AB FF AB AB AB FF AB AB AB FF 62 62' + '62 FF CE CE CE FF F2 F2 F2 FF F2 F2 F2 FF F2 F2' + 'F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2 F2 FF FF D4' + 'E3 FF FF D4 F0 FF FF D4 E3 FF 80 80 80 FF 00 00' + '00 78 00 00 00 78 00 00 00 00 7A 7A 7A FF FF D4' + 'F0 FF FF D4 F0 FF FF D4 E3 FF F2 F2 F2 FF 00 00' + '00 33 00 00 00 F9 26 26 26 FF D3 D3 D3 FF E9 E9' + 'E9 FF E8 E8 E8 FF E6 E6 E6 FF E4 E4 E4 FF E2 E2' + 'E2 FF DB DB DB FF DC DC DC FF D8 D8 D8 FF D9 D9' + 'D9 FF D2 D2 D2 FF D2 D2 D2 FF CF CF CF FF D0 D0' + 'D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0' + 'D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0' + 'D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0 D0 FF 62 62' + '62 FF CE CE CE FF F2 F2 F2 FF F2 F2 F2 FF F2 F2' + 'F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2' + 'F2 FF FF D4 F0 FF FF D4 F0 FF C0 C0 C0 FF 7A 7A' + '7A FF 62 62 62 FF 80 80 80 FF E6 E6 E6 FF FF D4' + 'F0 FF FF D4 F0 FF F2 F2 F2 FF FF D4 E3 FF 00 00' + '00 33 00 00 00 F9 26 26 26 FF D3 D3 D3 FF F7 F7' + 'F7 FF F8 F8 F8 FF F6 F6 F6 FF F6 F6 F6 FF F6 F6' + 'F6 FF F5 F5 F5 FF F5 F5 F5 FF F4 F4 F4 FF F4 F4' + 'F4 FF F3 F3 F3 FF F3 F3 F3 FF F3 F3 F3 FF F2 F2' + 'F2 FF F2 F2 F2 FF F1 F1 F1 FF F1 F1 F1 FF F1 F1' + 'F1 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0 F0 FF EF EF' + 'EF FF EF EF EF FF EE EE EE FF EE EE EE FF 62 62' + '62 FF AA AA AA FF F2 F2 F2 FF F2 F2 F2 FF F2 F2' + 'F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2' + 'F2 FF FF D4 E3 FF FF D4 F0 FF FF D4 F0 FF FF D4' + 'E3 FF FF D4 D4 FF FF D4 E3 FF FF D4 FF FF FF D4' + 'FF FF FF D4 F0 FF FF D4 F0 FF FF D4 F0 FF 00 00' + '00 33 00 00 00 F9 24 24 24 FF D6 D6 D6 FF FF FF' + 'FF FF E9 E9 E9 FF E1 E1 E1 FF E2 E2 E2 FF E2 E2' + 'E2 FF E0 E0 E0 FF DF DF DF FF DF DF DF FF DF DF' + 'DF FF DF DF DF FF DF DF DF FF E0 E0 E0 FF E0 E0' + 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' + 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' + 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF 62 62' + '62 FF 92 92 92 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2' + 'F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2' + 'F2 FF F2 F2 F2 FF F2 F2 F2 FF FF D4 FF FF FF D4' + 'FF FF FF D4 FF FF FF D4 FF FF FF D4 FF FF FF D4' + 'F0 FF FF D4 F0 FF FF D4 F0 FF FF D4 F0 FF 00 00' + '00 34 00 00 00 FA 24 24 24 FF DE DE DE FF F8 F8' + 'F8 FF D9 D9 D9 FF C4 C4 C4 FF BB BB BB FF BF BF' + 'BF FF D8 D8 D8 FF DA DA DA FF D9 D9 D9 FF D9 D9' + 'D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9' + 'D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9' + 'D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9' + 'D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9 D9 FF 6E 6E' + '6E FF 7A 7A 7A FF F2 F2 F2 FF F2 F2 F2 FF F2 F2' + 'F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2' + 'F2 FF F2 F2 F2 FF F2 F2 F2 FF FF D4 E3 FF FF D4' + 'D4 FF FF D4 D4 FF FF D4 D4 FF FF D4 D4 FF FF D4' + 'F0 FF FF D4 F0 FF FF D4 F0 FF FF D4 F0 FF 00 00' + '00 25 00 00 00 F7 1F 1F 1F FF DA DA DA FF F3 F3' + 'F3 FF C6 C6 C6 FF A9 A9 A9 FF B7 B7 B7 FF B0 B0' + 'B0 FF C3 C3 C3 FF DA DA DA FF D8 D8 D8 FF D8 D8' + 'D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8 D8 FF D7 D7' + 'D7 FF D7 D7 D7 FF D7 D7 D7 FF D7 D7 D7 FF D7 D7' + 'D7 FF D7 D7 D7 FF D7 D7 D7 FF D7 D7 D7 FF D8 D8' + 'D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8 D8 FF D3 D3' + 'D3 FF 62 62 62 FF C0 C0 C0 FF F2 F2 F2 FF F2 F2' + 'F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2' + 'F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2 F2 FF FF D4' + 'D4 FF FF D4 D4 FF FF D4 D4 FF FF D4 D4 FF FF D4' + 'F0 FF FF D4 F0 FF FF D4 F0 FF FF D4 F0 FF 00 00' + '00 07 00 00 00 D0 05 05 05 FF C2 C2 C2 FF F6 F6' + 'F6 FF BC BC BC FF B2 B2 B2 FF C3 C3 C3 FF AB AB' + 'AB FF BB BB BB FF D8 D8 D8 FF D5 D5 D5 FF D5 D5' + 'D5 FF D5 D5 D5 FF D4 D4 D4 FF D3 D3 D3 FF D3 D3' + 'D3 FF D5 D5 D5 FF D7 D7 D7 FF D8 D8 D8 FF D8 D8' + 'D8 FF D7 D7 D7 FF D5 D5 D5 FF D3 D3 D3 FF D3 D3' + 'D3 FF D3 D3 D3 FF D4 D4 D4 FF D5 D5 D5 FF D3 D3' + 'D3 FF 62 62 62 FF 86 86 86 FF F2 F2 F2 FF F2 F2' + 'F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2' + 'F2 FF F2 F2 F2 FF F2 F2 F2 FF FF D4 D4 FF FF D4' + 'D4 FF FF D4 D4 FF FF D4 D4 FF FF D4 D4 FF FF D4' + 'F0 FF FF D4 F0 FF FF D4 F0 FF FF D4 F0 FF 00 00' + '00 00 00 00 00 9C 00 00 00 FF A4 A4 A4 FF F4 F4' + 'F4 FF CF CF CF FF C5 C5 C5 FF D2 D2 D2 FF BF BF' + 'BF FF C9 C9 C9 FF D3 D3 D3 FF D2 D2 D2 FF D0 D0' + 'D0 FF D3 D3 D3 FF D0 D0 D0 FF D0 D0 D0 FF D5 D5' + 'D5 FF D5 D5 D5 FF D5 D5 D5 FF D5 D5 D5 FF D5 D5' + 'D5 FF D5 D5 D5 FF D5 D5 D5 FF D5 D5 D5 FF D0 D0' + 'D0 FF D0 D0 D0 FF D4 D4 D4 FF D0 D0 D0 FF D3 D3' + 'D3 FF D3 D3 D3 FF 62 62 62 FF B6 B6 B6 FF F2 F2' + 'F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2' + 'F2 FF F2 F2 F2 FF FF D4 D4 FF FF D4 D4 FF FF D4' + 'D4 FF FF D4 D4 FF FF D4 D4 FF FF D4 D4 FF FF D4' + 'F0 FF FF D4 F0 FF FF D4 F0 FF FF D4 F0 FF 00 00' + '00 00 00 00 00 73 00 00 00 FF 7E 7E 7E FF EF EF' + 'EF FF D1 D1 D1 FF CF CF CF FF CB CB CB FF CF CF' + 'CF FF D1 D1 D1 FF CE CE CE FF CF CF CF FF D5 D5' + 'D5 FF D5 D5 D5 FF D5 D5 D5 FF D5 D5 D5 FF D5 D5' + 'D5 FF D5 D5 D5 FF D5 D5 D5 FF D5 D5 D5 FF D5 D5' + 'D5 FF D5 D5 D5 FF D5 D5 D5 FF D5 D5 D5 FF D5 D5' + 'D5 FF D5 D5 D5 FF D5 D5 D5 FF E1 E1 E1 FF D3 D3' + 'D3 FF D3 D3 D3 FF 7A 7A 7A FF 7A 7A 7A FF FF B1' + 'C7 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2' + 'F2 FF FF D4 D4 FF FF D4 D4 FF FF D4 D4 FF FF D4' + 'D4 FF FF D4 D4 FF FF D4 D4 FF FF D4 F0 FF FF D4' + 'F0 FF FF D4 F0 FF FF D4 F0 FF FF D4 F0 FF 00 00' + '00 00 00 00 00 59 00 00 00 FF 59 59 59 FF E9 E9' + 'E9 FF D0 D0 D0 FF CD CD CD FF CD CD CD FF CD CD' + 'CD FF CA CA CA FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' + 'D3 FF D3 D3 D3 FF D4 D4 D4 FF D5 D5 D5 FF D6 D6' + 'D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6' + 'D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6 D6 FF D5 D5' + 'D5 FF D5 D5 D5 FF DB DB DB FF E4 E4 E4 FF D3 D3' + 'D3 FF D3 D3 D3 FF D3 D3 D3 FF 6E 6E 6E FF 92 92' + '92 FF F2 F2 F2 FF F2 F2 F2 FF F2 F2 F2 FF FF D4' + 'D4 FF FF D4 D4 FF FF D4 D4 FF FF D4 D4 FF FF D4' + 'D4 FF FF D4 D4 FF FF D4 F0 FF FF D4 F0 FF FF D4' + 'F0 FF FF D4 F0 FF FF D4 F0 FF FF D4 F0 FF 00 00' + '00 00 00 00 00 3E 00 00 00 FE 40 40 40 FF D7 D7' + 'D7 FF D2 D2 D2 FF CA CA CA FF CB CB CB FF CA CA' + 'CA FF D4 D4 D4 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' + 'D3 FF D1 D1 D1 FF D2 D2 D2 FF D2 D2 D2 FF D2 D2' + 'D2 FF D2 D2 D2 FF D2 D2 D2 FF D2 D2 D2 FF D3 D3' + 'D3 FF D2 D2 D2 FF D3 D3 D3 FF D3 D3 D3 FF D2 D2' + 'D2 FF D2 D2 D2 FF D1 D1 D1 FF D0 D0 D0 FF D3 D3' + 'D3 FF D3 D3 D3 FF D3 D3 D3 FF C4 C4 C4 FF 6E 6E' + '6E FF 92 92 92 FF F2 F2 F2 FF FF D4 D4 FF FF D4' + 'D4 FF FF D4 D4 FF FF D4 D4 FF FF D4 D4 FF FF D4' + 'D4 FF FF D4 F0 FF FF D4 F0 FF FF D4 F0 FF FF D4' + 'F0 FF FF D4 F0 FF FF D4 F0 FF FF D4 F0 FF 00 00' + '00 00 00 00 00 25 00 00 00 F8 22 22 22 FF B7 B7' + 'B7 FF DB DB DB FF CA CA CA FF CB CB CB FF CE CE' + 'CE FF D3 D3 D3 FF D3 D3 D3 FF CF CF CF FF D1 D1' + 'D1 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0' + 'D0 FF CF CF CF FF D3 D3 D3 FF D3 D3 D3 FF CE CE' + 'CE FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' + 'D3 FF D3 D3 D3 FF D3 D3 D3 FF CE CE CE FF D3 D3' + 'D3 FF D3 D3 D3 FF D3 D3 D3 FF C4 C4 C4 FF C4 C4' + 'C4 FF 6E 6E 6E FF 80 80 80 FF CE CE CE FF FF D4' + 'D4 FF FF D4 D4 FF FF D4 D4 FF FF D4 D4 FF FF D4' + 'F0 FF FF D4 F0 FF FF D4 F0 FF FF D4 F0 FF FF D4' + 'F0 FF FF D4 F0 FF E6 E6 E6 FF 92 92 92 FF 00 00' + '00 00 00 00 00 0C 00 00 00 E1 07 07 07 FF 9F 9F' + '9F FF DD DD DD FF CC CC CC FF CD CD CD FF D3 D3' + 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D0 D0 D0 FF D0 D0' + 'D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0' + 'D0 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' + 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' + 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' + 'D3 FF D3 D3 D3 FF D3 D3 D3 FF C4 C4 C4 FF C4 C4' + 'C4 FF B3 B3 B3 FF 99 99 99 FF 62 62 62 FF 9E 9E' + '9E FF C0 C0 C0 FF FF D4 D4 FF FF D4 F0 FF FF D4' + 'F0 FF FF D4 F0 FF FF D4 F0 FF FF FF FF FF CE CE' + 'CE FF 9E 9E 9E FF 62 62 62 FF 92 92 92 FF 00 00' + '00 00 00 00 00 00 00 00 00 B2 00 00 00 FF 83 83' + '83 FF DD DD DD FF CF CF CF FF D1 D1 D1 FF D3 D3' + 'D3 FF D3 D3 D3 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0' + 'D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0' + 'D0 FF D0 D0 D0 FF CF CF CF FF D3 D3 D3 FF D3 D3' + 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' + 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' + 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF B3 B3' + 'B3 FF B3 B3 B3 FF 99 99 99 FF 00 00 00 FF 00 00' + '00 FF 7A 7A 7A FF 62 62 62 FF 86 86 86 FF 86 86' + '86 FF 86 86 86 FF 86 86 86 FF 62 62 62 FF 6E 6E' + '6E FF 00 00 00 24 00 00 00 0C 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 80 00 00 00 FF 5F 5F' + '5F FF DC DC DC FF D1 D1 D1 FF D2 D2 D2 FF D3 D3' + 'D3 FF D3 D3 D3 FF D1 D1 D1 FF D1 D1 D1 FF D1 D1' + 'D1 FF D1 D1 D1 FF D1 D1 D1 FF D1 D1 D1 FF D1 D1' + 'D1 FF D1 D1 D1 FF D1 D1 D1 FF D3 D3 D3 FF D3 D3' + 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' + 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' + 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF B3 B3' + 'B3 FF B3 B3 B3 FF 99 99 99 FF 00 00 00 CF 00 00' + '00 CF 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 4B 00 00 00 FE 41 41' + '41 FF D8 D8 D8 FF D4 D4 D4 FF D2 D2 D2 FF D3 D3' + 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' + 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' + 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' + 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' + 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' + 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF B3 B3' + 'B3 FF B3 B3 B3 FF 99 99 99 FF 00 00 00 CF 00 00' + '00 CF 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 1A 00 00 00 F2 2C 2C' + '2C FF CC CC CC FF D6 D6 D6 FF D5 D5 D5 FF D3 D3' + 'D3 FF D3 D3 D3 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6' + 'D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6' + 'D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6' + 'D6 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' + 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' + 'D3 FF D3 D3 D3 FF C4 C4 C4 FF D3 D3 D3 FF BD BD' + 'BD FF D0 D0 D0 FF 99 99 99 FF 09 09 09 FF 00 00' + '00 CF 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 09 00 00 00 D8 18 18' + '18 FF B0 B0 B0 FF DB DB DB FF DB DB DB FF DE DE' + 'DE FF DE DE DE FF DE DE DE FF D9 D9 D9 FF DA DA' + 'DA FF DA DA DA FF DA DA DA FF DA DA DA FF DA DA' + 'DA FF DA DA DA FF DA DA DA FF DA DA DA FF DA DA' + 'DA FF DA DA DA FF DD DD DD FF DD DD DD FF DD DD' + 'DD FF DD DD DD FF DD DD DD FF DA DA DA FF DD DD' + 'DD FF DD DD DD FF E7 E7 E7 FF D9 D9 D9 FF CC CC' + 'CC FF CA CA CA FF 7A 7A 7A FF 02 02 02 FF 00 00' + '00 B8 00 00 00 0A 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 02 00 00 00 BF 08 08' + '08 FF 97 97 97 FF DC DC DC FF DF DF DF FF DC DC' + 'DC FF DE DE DE FF DE DE DE FF DE DE DE FF DD DD' + 'DD FF DD DD DD FF DD DD DD FF DD DD DD FF DD DD' + 'DD FF DD DD DD FF DD DD DD FF DD DD DD FF DD DD' + 'DD FF DD DD DD FF DD DD DD FF DD DD DD FF DD DD' + 'DD FF DD DD DD FF DD DD DD FF DD DD DD FF E7 E7' + 'E7 FF E7 E7 E7 FF E7 E7 E7 FF DD DD DD FF DC DC' + 'DC FF C6 C6 C6 FF 53 53 53 FF 00 00 00 FF 00 00' + '00 A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 A4 00 00' + '00 FF 77 77 77 FF D3 D3 D3 FF E2 E2 E2 FF E1 E1' + 'E1 FF DE DE DE FF DE DE DE FF DE DE DE FF DE DE' + 'DE FF DE DE DE FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' + 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' + 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' + 'E0 FF E0 E0 E0 FF E1 E1 E1 FF E1 E1 E1 FF E7 E7' + 'E7 FF E7 E7 E7 FF E7 E7 E7 FF E3 E3 E3 FF D9 D9' + 'D9 FF BB BB BB FF 39 39 39 FF 00 00 00 FF 00 00' + '00 7E 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 89 00 00' + '00 FF 4B 4B 4B FF C9 C9 C9 FF E5 E5 E5 FF E3 E3' + 'E3 FF E4 E4 E4 FF EB EB EB FF EB EB EB FF EB EB' + 'EB FF EB EB EB FF EB EB EB FF EB EB EB FF E4 E4' + 'E4 FF E4 E4 E4 FF E4 E4 E4 FF E4 E4 E4 FF E4 E4' + 'E4 FF E4 E4 E4 FF E4 E4 E4 FF E4 E4 E4 FF E5 E5' + 'E5 FF E5 E5 E5 FF E7 E7 E7 FF E7 E7 E7 FF E7 E7' + 'E7 FF E7 E7 E7 FF E4 E4 E4 FF E6 E6 E6 FF D6 D6' + 'D6 FF A8 A8 A8 FF 20 20 20 FF 00 00 00 FD 00 00' + '00 4E 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 62 00 00' + '00 FF 35 35 35 FF BD BD BD FF E6 E6 E6 FF E6 E6' + 'E6 FF E6 E6 E6 FF E7 E7 E7 FF E7 E7 E7 FF EB EB' + 'EB FF EB EB EB FF EB EB EB FF EB EB EB FF EB EB' + 'EB FF EB EB EB FF EB EB EB FF EB EB EB FF EB EB' + 'EB FF EB EB EB FF EB EB EB FF EB EB EB FF EB EB' + 'EB FF E7 E7 E7 FF E7 E7 E7 FF E7 E7 E7 FF E7 E7' + 'E7 FF E7 E7 E7 FF E6 E6 E6 FF E8 E8 E8 FF D4 D4' + 'D4 FF 9A 9A 9A FF 0B 0B 0B FF 00 00 00 ED 00 00' + '00 2C 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 2D 00 00' + '00 F9 1E 1E 1E FF AB AB AB FF E4 E4 E4 FF ED ED' + 'ED FF E7 E7 E7 FF E6 E6 E6 FF EC EC EC FF EB EB' + 'EB FF EA EA EA FF ED ED ED FF EB EB EB FF EB EB' + 'EB FF EB EB EB FF EB EB EB FF EB EB EB FF EB EB' + 'EB FF EB EB EB FF EB EB EB FF EB EB EB FF EB EB' + 'EB FF EB EB EB FF EB EB EB FF EC EC EC FF EA EA' + 'EA FF E5 E5 E5 FF EB EB EB FF EB EB EB FF D6 D6' + 'D6 FF 8A 8A 8A FF 00 00 00 FF 00 00 00 C3 00 00' + '00 17 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 09 00 00' + '00 DD 08 08 08 FF 99 99 99 FF E4 E4 E4 FF DF DF' + 'DF FF BD BD BD FF C1 C1 C1 FF D6 D6 D6 FF EC EC' + 'EC FF ED ED ED FF ED ED ED FF EE EE EE FF EE EE' + 'EE FF ED ED ED FF EC EC EC FF EB EB EB FF EB EB' + 'EB FF EC EC EC FF ED ED ED FF EE EE EE FF EE EE' + 'EE FF ED ED ED FF EE EE EE FF E4 E4 E4 FF C2 C2' + 'C2 FF BE BE BE FF D1 D1 D1 FF EC EC EC FF D4 D4' + 'D4 FF 75 75 75 FF 00 00 00 FF 00 00 00 9C 00 00' + '00 06 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 AE 00 00 00 FF 8D 8D 8D FF E0 E0 E0 FF C4 C4' + 'C4 FF B2 B2 B2 FF B8 B8 B8 FF B2 B2 B2 FF EB EB' + 'EB FF F1 F1 F1 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0' + 'F0 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0' + 'F0 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0' + 'F0 FF F0 F0 F0 FF F3 F3 F3 FF D5 D5 D5 FF B0 B0' + 'B0 FF B6 B6 B6 FF B7 B7 B7 FF EB EB EB FF CD CD' + 'CD FF 61 61 61 FF 00 00 00 FF 00 00 00 85 00 00' + '00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 80 00 00 00 FF 64 64 64 FF CE CE CE FF DD DD' + 'DD FF DC DC DC FF D5 D5 D5 FF E4 E4 E4 FF F9 F9' + 'F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9' + 'F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9' + 'F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9' + 'F9 FF F9 F9 F9 FF FA FA FA FF F2 F2 F2 FF DF DF' + 'DF FF D8 D8 D8 FF DC DC DC FF D7 D7 D7 FF B0 B0' + 'B0 FF 34 34 34 FF 00 00 00 FF 00 00 00 67 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 44 00 00 00 FF 19 19 19 FF 80 80 80 FF BE BE' + 'BE FF D3 D3 D3 FF D7 D7 D7 FF DB DB DB FF D8 D8' + 'D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8' + 'D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8' + 'D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8' + 'D8 FF D8 D8 D8 FF D8 D8 D8 FF D9 D9 D9 FF D9 D9' + 'D9 FF D7 D7 D7 FF CD CD CD FF B0 B0 B0 FF 5D 5D' + '5D FF 06 06 06 FF 00 00 00 ED 00 00 00 2B 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 02 00 00 00 9C 00 00 00 FF 0C 0C 0C FF 3D 3D' + '3D FF 49 49 49 FF 48 48 48 FF 48 48 48 FF 48 48' + '48 FF 48 48 48 FF 48 48 48 FF 48 48 48 FF 48 48' + '48 FF 48 48 48 FF 48 48 48 FF 48 48 48 FF 48 48' + '48 FF 48 48 48 FF 48 48 48 FF 48 48 48 FF 48 48' + '48 FF 48 48 48 FF 48 48 48 FF 48 48 48 FF 48 48' + '48 FF 49 49 49 FF 49 49 49 FF 2F 2F 2F FF 02 02' + '02 FF 00 00 00 FF 00 00 00 5C 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 06 00 00 00 7F 00 00 00 F1 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 D6 00 00 00 5C 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 2C 00 00' + '00 7E 00 00 00 84 00 00 00 84 00 00 00 84 00 00' + '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' + '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' + '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' + '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' + '00 84 00 00 00 84 00 00 00 84 00 00 00 70 00 00' + '00 1A 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF' + 'FF FF F0 00 00 00 FF FF FF FF E0 00 00 00 FF FF' + 'FF FF C0 00 00 00 FF FF FF FF 80 00 00 00 FF FF' + 'FF FF 00 00 00 00 FF FF FF FE 00 00 00 00 FF FF' + 'FF FC 00 00 00 00 F0 00 00 00 00 00 00 00 C0 00' + '00 00 00 00 00 00 80 00 00 00 00 00 00 00 80 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 E0 00 00 00 00' + '00 00 00 60 00 00 00 00 00 00 00 20 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 00' + '00 00 00 00 00 00 80 00 00 00 00 00 00 00 80 00' + '00 00 00 00 00 00 80 00 00 00 00 00 00 00 80 00' + '00 00 00 00 00 00 80 00 00 00 00 00 00 00 C0 00' + '00 00 00 01 00 00 C0 00 00 00 07 FF 00 00 C0 00' + '00 00 07 FF 00 00 C0 00 00 00 07 FF 00 00 C0 00' + '00 00 03 FF 00 00 C0 00 00 00 07 FF 00 00 E0 00' + '00 00 07 FF 00 00 E0 00 00 00 07 FF 00 00 E0 00' + '00 00 07 FF 00 00 E0 00 00 00 07 FF 00 00 E0 00' + '00 00 07 FF 00 00 F0 00 00 00 07 FF 00 00 F0 00' + '00 00 0F FF 00 00 F0 00 00 00 0F FF 00 00 F0 00' + '00 00 1F FF 00 00 F8 00 00 00 3F FF 00 00 FE 00' + '00 00 7F FF 00 00 FF FF FF FF FF FF 00 00' +} */ + +/* BINRES ramdisk.ico */ +12 ICON ramdisk.ico +/* { + '00 00 01 00 07 00 20 20 00 00 01 00 04 00 E8 02' + '00 00 76 00 00 00 10 10 00 00 01 00 08 00 68 05' + '00 00 5E 03 00 00 10 10 00 00 01 00 04 00 28 01' + '00 00 C6 08 00 00 30 30 00 00 01 00 08 00 A8 0E' + '00 00 EE 09 00 00 30 30 00 00 01 00 04 00 68 06' + '00 00 96 18 00 00 30 30 00 00 01 00 20 00 A8 25' + '00 00 FE 1E 00 00 20 20 00 00 01 00 20 00 A8 10' + '00 00 A6 44 00 00 28 00 00 00 20 00 00 00 40 00' + '00 00 01 00 04 00 00 00 00 00 00 02 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 80 00 00 00 00 80 00 00 80 80 00 00 00 00' + '80 00 80 00 80 00 00 80 80 00 C0 C0 C0 00 80 80' + '80 00 FF 00 00 00 00 FF 00 00 FF FF 00 00 00 00' + 'FF 00 FF 00 FF 00 00 FF FF 00 FF FF FF 00 00 00' + '00 00 00 88 00 66 00 00 00 00 00 00 00 00 00 00' + '00 00 08 08 80 E6 00 00 00 00 00 00 00 00 00 00' + '00 00 80 08 07 EE 00 00 00 00 00 00 00 00 00 00' + '00 08 00 08 00 0E 00 60 00 00 00 00 00 00 00 00' + '00 80 00 80 80 08 00 66 00 00 00 00 00 00 00 00' + '08 00 08 00 08 00 80 E6 00 00 00 00 00 00 00 00' + '80 00 80 00 00 80 07 EE 00 00 00 00 00 00 00 08' + '00 08 00 00 00 08 00 0E 00 60 00 00 00 00 00 80' + '00 80 00 08 00 00 80 08 00 66 00 00 00 00 00 80' + '08 00 00 80 80 00 08 00 80 E6 00 00 00 00 00 80' + '80 00 08 08 08 00 00 80 07 EE 00 00 00 00 00 88' + '00 00 80 80 80 00 00 08 00 0E 00 60 00 00 66 07' + '00 00 08 08 00 00 00 00 80 08 00 66 00 00 66 00' + '70 00 00 80 00 08 00 00 08 00 80 E6 00 00 EE EE' + '07 00 00 00 00 00 80 00 00 80 07 EE 00 00 0E E0' + '00 70 00 00 08 00 08 00 00 08 00 0E 00 60 00 00' + '66 07 00 00 00 80 00 80 00 00 80 08 00 66 00 00' + '66 00 70 00 00 08 00 08 00 00 08 00 80 E6 00 00' + 'EE EE 07 00 00 00 80 00 80 00 00 80 07 EE 00 00' + '0E E0 00 70 00 00 08 00 00 00 00 08 00 0E 00 00' + '00 00 66 07 00 00 00 80 00 00 00 00 80 08 00 00' + '00 00 66 00 70 00 00 00 08 88 00 00 08 08 00 00' + '00 00 EE EE 07 00 00 00 80 80 80 00 00 87 00 00' + '00 00 0E E0 00 70 00 00 88 08 80 00 00 70 00 00' + '00 00 00 00 66 07 00 00 80 80 80 00 07 00 00 00' + '00 00 00 00 66 00 70 00 08 88 00 00 70 00 00 00' + '00 00 00 00 EE EE 07 00 00 00 00 07 00 00 00 00' + '00 00 00 00 0E E0 00 70 00 00 00 70 00 00 00 00' + '00 00 00 00 00 00 66 07 00 00 07 00 00 00 00 00' + '00 00 00 00 00 00 66 00 70 00 70 00 00 00 00 00' + '00 00 00 00 00 00 EE EE 07 07 00 00 00 00 00 00' + '00 00 00 00 00 00 0E E0 00 70 00 00 00 00 FF CC' + 'FF FF FF 84 FF FF FF 00 FF FF FE 00 DF FF FC 00' + 'CF FF F8 00 4F FF F0 00 0F FF E0 00 0D FF C0 00' + '0C FF C0 00 04 FF C0 00 00 FF C0 00 00 DF 00 00' + '00 CF 00 00 00 4F 08 00 00 0F 9C 00 00 0D F0 00' + '00 0C F0 00 00 04 F0 80 00 00 F9 C0 00 00 FF 00' + '00 00 FF 00 00 00 FF 08 00 00 FF 9C 00 01 FF F0' + '00 03 FF F0 00 07 FF F0 80 0F FF F9 C0 1F FF FF' + '00 3F FF FF 00 7F FF FF 08 FF FF FF 9D FF 28 00' + '00 00 10 00 00 00 20 00 00 00 01 00 08 00 00 00' + '00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 1C 04 04 00 18 18' + '18 00 1A 1A 1A 00 1C 1C 1C 00 36 0E 0E 00 3C 14' + '14 00 34 1C 1C 00 20 20 20 00 24 24 24 00 28 28' + '28 00 30 30 30 00 38 38 38 00 3C 3C 3C 00 40 28' + '28 00 46 46 46 00 48 48 48 00 4C 4C 4C 00 50 50' + '50 00 52 52 52 00 54 54 54 00 56 56 56 00 58 58' + '58 00 68 68 68 00 74 74 74 00 78 78 78 00 7E 7E' + '7E 00 7F 7F 7F 00 00 92 92 00 00 9C 9C 00 00 BC' + 'BC 00 00 C0 C0 00 00 D0 D0 00 00 DF DF 00 00 E3' + 'E3 00 00 E5 E5 00 00 F7 F7 00 00 FB FB 00 00 FF' + 'FF 00 90 90 90 00 A8 A8 A8 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 C0 17' + '95 00 00 00 38 00 A8 44 F9 77 11 00 00 00 B8 09' + '38 00 00 00 38 00 70 63 0C 01 98 17 95 00 00 00' + '00 00 E0 19 95 00 F0 88 FA 77 70 38 F5 77 FF FF' + 'FF FF A8 44 F9 77 70 7D F5 77 3A 8A F5 77 76 00' + '00 00 76 00 00 00 07 00 00 00 B0 18 95 00 00 00' + '00 00 CB 44 F9 77 38 9F 07 00 CD 8B F5 77 78 13' + '05 00 37 90 F5 77 00 00 00 00 3E 8A F5 77 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 10 00 00 00 00 00 00 00 58 00' + '5A 00 00 EC FD 7F 1A 02 00 00 4C 16 95 00 40 9F' + '07 00 FC 15 95 00 FF FF FF FF B4 1A 95 00 45 00' + '00 00 28 02 00 00 FF FF FF FF E2 D8 F5 77 7D 9B' + 'F5 77 94 B6 01 00 00 00 05 00 F4 17 95 00 80 00' + '10 C0 B4 1A 95 00 F0 88 FA 77 88 1C F5 77 FF FF' + 'FF FF 37 90 F5 77 00 00 00 00 3E 8A F5 77 9B B2' + 'E7 77 B7 00 00 00 02 00 00 00 A4 1A 95 00 01 00' + '00 00 18 00 00 00 00 00 00 00 10 19 95 00 42 00' + '00 00 00 00 00 00 F4 18 95 00 00 00 00 00 00 00' + '00 00 00 00 00 00 0C 00 00 00 02 00 00 00 01 01' + 'F5 77 00 EC FD 7F 58 00 00 00 00 00 00 00 03 00' + '00 00 60 00 1A 02 40 9F 07 00 00 00 00 00 40 9F' + '07 00 05 00 00 00 BE B3 E7 77 4C 19 95 00 A3 B4' + 'E7 77 F8 00 00 00 00 00 00 C0 00 00 00 00 00 00' + '00 00 02 00 00 00 80 00 00 00 00 00 00 00 8C 1A' + '95 00 7F E9 4B 00 88 36 0C 01 00 00 00 C0 00 00' + '00 00 80 1A 95 00 02 00 00 00 80 00 00 00 00 00' + '00 00 C0 27 95 00 C4 F5 AF 00 02 00 00 00 44 3A' + '5C 6F 73 65 78 70 65 72 74 73 5C 72 65 61 63 74' + '6F 73 5C 6C 69 62 5C 73 68 65 6C 6C 33 32 5C 72' + '61 6D 64 69 73 6B 2E 69 63 6F 00 93 4B 00 14 1A' + '95 00 1F 3B D4 77 11 00 00 00 88 00 00 00 4F 3B' + 'D4 77 E0 19 95 00 33 3B D4 77 64 C5 F5 77 A9 F1' + 'E7 77 F8 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 1A 95 00 70 63 0C 01 76 00 00 00 00 00' + '00 00 C9 F1 E7 77 76 00 00 00 A4 1A 95 00 07 00' + '00 00 00 00 00 00 76 00 00 00 76 00 00 00 07 00' + '00 00 F4 19 95 00 33 3B D4 77 B4 1A 95 00 09 48' + 'E9 77 B8 10 E9 77 FF FF FF FF C9 F1 E7 77 16 EA' + '4B 00 F8 00 00 00 70 63 0C 01 76 00 00 00 58 1A' + '95 00 00 00 00 00 00 00 00 00 00 18 00 1F 00 00' + '00 00 00 00 00 00 00 00 00 00 04 0F 07 26 00 00' + '00 00 00 00 00 00 00 00 00 08 08 04 13 01 00 20' + '00 00 00 00 00 00 00 00 08 08 0A 29 29 15 07 26' + '00 00 00 00 00 00 00 11 04 0A 29 29 29 29 15 01' + '00 20 00 00 00 00 00 1A 03 29 0B 29 29 29 29 15' + '07 26 00 00 00 00 1C 05 0C 29 29 0B 29 29 29 29' + '15 01 00 20 00 00 21 25 00 0D 29 29 0B 29 29 29' + '29 15 07 26 00 00 00 00 1D 06 0D 29 29 16 12 29' + '29 29 15 01 00 1E 00 00 24 25 00 0D 29 29 14 09' + '29 29 29 15 07 23 00 00 00 00 1D 06 0D 29 29 0A' + '02 12 29 29 13 0E 00 00 00 00 24 25 00 0D 29 29' + '19 17 12 29 29 28 00 00 00 00 00 00 1D 06 0D 29' + '10 19 04 29 27 00 00 00 00 00 00 00 24 25 00 0D' + '29 29 29 27 00 00 00 00 00 00 00 00 00 00 1D 06' + '0D 29 27 00 00 00 00 00 00 00 00 00 00 00 21 22' + '00 1A 00 00 00 00 FA FF 00 00 F0 FF 00 00 E0 BF' + '00 00 C0 3F 00 00 80 2F 00 00 80 0F 00 00 00 0B' + '00 00 20 03 00 00 C0 02 00 00 C8 00 00 00 F0 00' + '00 00 F2 00 00 00 FC 01 00 00 FC 83 00 00 FF 07' + '00 00 FF 2F 00 00 28 00 00 00 10 00 00 00 20 00' + '00 00 01 00 04 00 00 00 00 00 80 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 80 00 00 00 00 80 00 00 80 80 00 00 00 00' + '80 00 80 00 80 00 00 80 80 00 C0 C0 C0 00 80 80' + '80 00 FF 00 00 00 00 FF 00 00 FF FF 00 00 00 00' + 'FF 00 FF 00 FF 00 00 FF FF 00 FF FF FF 00 00 00' + '08 0E 00 00 00 00 00 00 08 0E 00 00 00 00 00 00' + '00 80 0E 00 00 00 00 00 00 08 0E 00 00 00 08 00' + '00 00 80 0E 00 00 08 00 00 00 08 0E 00 00 60 00' + '00 00 00 80 0E 00 EE 00 00 00 00 08 0E 00 00 60' + '00 08 80 00 80 06 00 EE 00 00 80 00 08 0E 00 00' + '60 00 00 08 00 80 00 00 EE 00 00 88 80 07 00 00' + '00 60 00 88 00 80 00 00 00 EE 00 00 08 00 00 00' + '00 00 60 00 80 00 00 00 00 00 EE 08 00 00 FA FF' + '00 00 F0 FF 00 00 E0 BF 00 00 C0 3F 00 00 80 2F' + '00 00 80 0F 00 00 00 0B 00 00 20 03 00 00 C0 02' + '00 00 C8 00 00 00 F0 00 00 00 F2 00 00 00 FC 01' + '00 00 FC 83 00 00 FF 07 00 00 FF 2F 00 00 28 00' + '00 00 30 00 00 00 60 00 00 00 01 00 08 00 00 00' + '00 00 00 09 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 01 01 01 00 02 02' + '02 00 05 05 05 00 06 06 06 00 07 07 07 00 08 08' + '08 00 09 09 09 00 0B 0B 0B 00 0C 0C 0C 00 18 18' + '18 00 19 19 19 00 1E 1E 1E 00 1F 1F 1F 00 20 20' + '20 00 21 21 21 00 22 22 22 00 24 24 24 00 26 26' + '26 00 27 27 27 00 28 28 28 00 29 29 29 00 2B 2B' + '2B 00 2C 2C 2C 00 2F 2F 2F 00 34 34 34 00 35 35' + '35 00 39 39 39 00 3B 3B 3B 00 3D 3D 3D 00 3F 3F' + '3F 00 40 40 40 00 41 41 41 00 47 47 47 00 48 48' + '48 00 49 49 49 00 4B 4B 4B 00 53 53 53 00 56 56' + '56 00 59 59 59 00 5D 5D 5D 00 5F 5F 5F 00 61 61' + '61 00 64 64 64 00 68 68 68 00 6A 6A 6A 00 6C 6C' + '6C 00 70 70 70 00 71 71 71 00 72 72 72 00 74 74' + '74 00 75 75 75 00 77 77 77 00 78 78 78 00 79 79' + '79 00 7A 7A 7A 00 7D 7D 7D 00 7E 7E 7E 00 7F 7F' + '7F 00 00 80 80 00 00 FF FF 00 80 80 80 00 81 81' + '81 00 83 83 83 00 85 85 85 00 87 87 87 00 88 88' + '88 00 8A 8A 8A 00 8D 8D 8D 00 8E 8E 8E 00 8F 8F' + '8F 00 90 90 90 00 92 92 92 00 93 93 93 00 97 97' + '97 00 98 98 98 00 99 99 99 00 9A 9A 9A 00 9C 9C' + '9C 00 9D 9D 9D 00 9F 9F 9F 00 A0 A0 A0 00 A2 A2' + 'A2 00 A4 A4 A4 00 A5 A5 A5 00 A7 A7 A7 00 A8 A8' + 'A8 00 A9 A9 A9 00 AB AB AB 00 AD AD AD 00 AE AE' + 'AE 00 B0 B0 B0 00 B2 B2 B2 00 B3 B3 B3 00 B6 B6' + 'B6 00 B7 B7 B7 00 B8 B8 B8 00 B9 B9 B9 00 BA BA' + 'BA 00 BB BB BB 00 BC BC BC 00 BD BD BD 00 BE BE' + 'BE 00 BF BF BF 00 C0 C0 C0 00 C1 C1 C1 00 C2 C2' + 'C2 00 C3 C3 C3 00 C4 C4 C4 00 C5 C5 C5 00 C6 C6' + 'C6 00 C7 C7 C7 00 C8 C8 C8 00 C9 C9 C9 00 CA CA' + 'CA 00 CB CB CB 00 CC CC CC 00 CD CD CD 00 CE CE' + 'CE 00 CF CF CF 00 D0 D0 D0 00 D1 D1 D1 00 D2 D2' + 'D2 00 D3 D3 D3 00 D4 D4 D4 00 D5 D5 D5 00 D6 D6' + 'D6 00 D7 D7 D7 00 D8 D8 D8 00 D9 D9 D9 00 DA DA' + 'DA 00 DB DB DB 00 DC DC DC 00 DD DD DD 00 DE DE' + 'DE 00 DF DF DF 00 E0 E0 E0 00 E1 E1 E1 00 E2 E2' + 'E2 00 E3 E3 E3 00 E4 E4 E4 00 E5 E5 E5 00 E6 E6' + 'E6 00 E7 E7 E7 00 E8 E8 E8 00 E9 E9 E9 00 EA EA' + 'EA 00 EB EB EB 00 EC EC EC 00 ED ED ED 00 EE EE' + 'EE 00 EF EF EF 00 F0 F0 F0 00 F1 F1 F1 00 F2 F2' + 'F2 00 F3 F3 F3 00 F4 F4 F4 00 F5 F5 F5 00 F6 F6' + 'F6 00 F7 F7 F7 00 F8 F8 F8 00 F9 F9 F9 00 FA FA' + 'FA 00 FF FF FF 00 00 00 00 00 10 19 95 00 42 00' + '00 00 00 00 00 00 F4 18 95 00 00 00 00 00 00 00' + '00 00 00 00 00 00 0C 00 00 00 02 00 00 00 01 01' + 'F5 77 00 EC FD 7F 58 00 00 00 00 00 00 00 03 00' + '00 00 60 00 1A 02 40 9F 07 00 00 00 00 00 40 9F' + '07 00 05 00 00 00 BE B3 E7 77 4C 19 95 00 A3 B4' + 'E7 77 F8 00 00 00 00 00 00 C0 00 00 00 00 00 00' + '00 00 02 00 00 00 80 00 00 00 00 00 00 00 8C 1A' + '95 00 7F E9 4B 00 88 36 0C 01 00 00 00 C0 00 00' + '00 00 80 1A 95 00 02 00 00 00 80 00 00 00 00 00' + '00 00 C0 27 95 00 C4 F5 AF 00 02 00 00 00 44 3A' + '5C 6F 73 65 78 70 65 72 74 73 5C 72 65 61 63 74' + '6F 73 5C 6C 69 62 5C 73 68 65 6C 6C 33 32 5C 72' + '61 6D 64 69 73 6B 2E 69 63 6F 00 93 4B 00 14 1A' + '95 00 1F 3B D4 77 11 00 00 00 88 00 00 00 4F 3B' + 'D4 77 E0 19 95 00 33 3B D4 77 64 C5 F5 77 A9 F1' + 'E7 77 F8 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 1A 95 00 70 63 0C 01 76 00 00 00 00 00' + '00 00 C9 F1 E7 77 76 00 00 00 A4 1A 95 00 07 00' + '00 00 00 00 00 00 76 00 00 00 76 00 00 00 07 00' + '00 00 F4 19 95 00 33 3B D4 77 B4 1A 95 00 09 48' + 'E9 77 B8 10 E9 77 FF FF FF FF C9 F1 E7 77 16 EA' + '4B 00 F8 00 00 00 70 63 0C 01 76 00 00 00 58 1A' + '95 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 A4 A4' + 'A4 A4 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 A4 A4 3D' + '3D A4 A4 3B 3B A4 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 A4 A4 3D A4' + '3D 3D A4 3C 3B A4 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 A4 A4 3D A4 A4' + '3D A4 68 3C 3C A4 00 A4 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 A4 A4 3D A4 A4 A4' + '3D A4 A4 A4 3C A4 00 3B A4 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 A4 A4 3D A4 A4 A4 3D' + 'A4 3D A4 A4 3D A4 00 3B 3B 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 A4 3D A4 A4 A4 3D A4' + 'A4 A4 3D A4 A4 3D 00 3C 3B A4 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 A4 A4 A4 A4 A4 A4' + 'A4 A4 A4 A4 A4 A4 A4 A4 A4 3D A4 A4 A4 3D A4 A4' + 'A4 A4 A4 3D A4 A4 68 3C 3C A4 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 A4 A4 A4 A4 A4 A4 A4 A4' + 'A4 A4 A4 A4 A4 A4 A4 A4 3D A4 A4 A4 3D A4 A4 A4' + 'A4 A4 A4 A4 3D A4 A4 A4 3C A4 00 3B A4 00 00 00' + '00 00 00 00 00 00 00 A4 A4 A4 A4 0F 17 16 17 16' + '16 16 16 16 16 16 16 3D A4 A4 A4 3D A4 A4 A4 A4' + '3D A4 A4 A4 A4 3D A4 A4 3D A4 00 3B 3B A4 00 00' + '00 00 00 00 00 00 00 A4 A4 12 47 72 75 73 76 75' + '74 73 71 6F 6E 6D 6C 3D A4 A4 3D A4 A4 A4 A4 3D' + 'A4 3D A4 A4 A4 A4 3D A4 A4 3D A4 3C 3B A4 00 00' + '00 00 00 00 00 00 A4 A4 01 43 93 90 8F 7D 40 42' + '48 4B 52 59 62 68 6B 3D A4 3D A4 A4 A4 A4 3D A4' + '3D A4 3D A4 A4 A4 A4 3D A4 A4 68 3C 3C A4 00 A4' + '00 00 00 00 00 00 A4 A4 0B 6F 94 8A 8E 73 1C 1E' + '26 31 41 48 4F 54 56 3D 3D A4 A4 A4 A4 3D A4 3D' + 'A4 3D A4 A4 A4 A4 A4 A4 3D A4 A4 A4 3C A4 00 3B' + 'A4 00 00 00 00 00 A4 A4 15 79 92 8C 8F 75 21 29' + '36 41 46 4A 51 3B 3B A4 68 A4 A4 A4 A4 A4 3D A4' + '3D A4 A4 A4 A4 A4 A4 A4 A4 3D A4 A4 3D A4 00 3B' + '3B A4 00 00 00 00 A4 A4 14 79 94 8E 8F 79 2C 32' + '39 40 45 4A 51 3B 3B A4 A4 68 A4 A4 A4 A4 A4 3D' + 'A4 A4 A4 A4 3D A4 A4 A4 A4 A4 3D A4 A4 3D A4 3C' + '3B A4 00 00 00 00 A4 A4 14 79 96 8F 90 7E 2F 30' + '38 40 45 4A 51 3C 3C 3C 3C 4E 68 A4 A4 A4 A4 A4' + 'A4 A4 A4 A4 A4 3D A4 A4 A4 A4 A4 3D A4 A4 68 3C' + '3C A4 00 A4 00 00 A4 A4 13 79 97 91 93 7E 2D 2E' + '35 3E 43 49 4E 4E 3C 3C 4E 4E 4E 68 A4 A4 A4 A4' + 'A4 A4 3D A4 A4 A4 3D A4 A4 A4 A4 A4 3D A4 A4 A4' + '3C A4 00 3B A4 00 A4 A4 13 7A 9A 93 92 87 55 55' + '58 5A 5B 5D 5E 61 61 62 65 3B 3B A4 68 A4 A4 A4' + 'A4 A4 A4 3D A4 A4 A4 3D A4 A4 A4 A4 A4 3D A4 A4' + '3D A4 A4 3B 3B A4 A4 A4 12 7B 9B 93 93 92 95 93' + '91 90 8E 8C 8A 89 87 86 83 3B 3B A4 A4 68 A4 A4' + 'A4 A4 A4 A4 3D A4 A4 A4 3D A4 A4 A4 A4 A4 3D A4' + 'A4 3D A4 3C 3B A4 A4 A4 12 7B 9F A0 9E 9E 9E 9D' + '9D 9C 9C 9B 9B 9B 9A 9A 99 3C 3C 3C 3C 99 68 A4' + 'A4 A4 A4 A4 A4 3D A4 A4 A4 3D A4 A4 A4 A4 A4 3D' + 'A4 A4 68 3C 3C A4 A4 A4 11 7E A3 91 89 8A 8A 88' + '87 87 87 87 87 88 88 88 88 88 3C 3C 81 81 81 68' + 'A4 A4 A4 A4 A4 A4 3D A4 A4 A4 A4 A4 A4 A4 A4 A4' + '3D A4 A4 A4 3C A4 A4 A4 11 86 A0 81 6C 63 67 80' + '82 81 81 81 81 81 81 81 81 81 81 81 81 3B 3B A4' + '68 A4 A4 A4 A4 A4 A4 3D A4 A4 A4 A4 A4 A4 A4 A4' + 'A4 3D A4 A4 3D A4 A4 A4 0D 82 9B 6E 57 5F 5B 6B' + '82 80 80 80 80 80 7F 7F 7F 7F 7F 7F 7F 3B 3B A4' + 'A4 68 A4 A4 A4 A4 A4 A4 A4 A4 3D 3D 3D A4 A4 A4' + 'A4 A4 3D A4 3D A4 A4 A4 03 6A 9E 64 5C 6B 58 63' + '80 7D 7D 7D 7C 7B 7B 7D 7F 80 80 7F 7D 3C 3C 3C' + '3C 7F 68 A4 A4 A4 A4 A4 A4 3D A4 3D A4 3D A4 A4' + 'A4 A4 A4 3D 68 A4 00 A4 A4 53 9C 77 6D 7A 67 71' + '7B 7A 78 7B 85 89 8B 8E 92 95 95 93 8F 8F 3C 3C' + '8F 8F 7F 68 A4 A4 A4 A4 A4 3D 3D A4 3D 3D A4 A4' + 'A4 A4 A4 68 A4 A4 00 A4 A4 39 97 79 77 73 77 79' + '76 77 87 98 94 89 86 85 84 83 83 84 85 86 89 94' + '99 3B 3B A4 68 A4 A4 A4 A4 3D A4 3D A4 3D A4 A4' + 'A4 A4 68 A4 A4 00 00 A4 A4 27 91 78 75 75 75 72' + '7E 95 8E 84 7C 7D 7E 7E 7E 7E 7E 7E 7E 7E 7D 7D' + '83 3B 3B A4 A4 68 A4 A4 A4 A4 3D 3D 3D A4 A4 A4' + 'A4 68 A4 A4 00 00 00 A4 A4 1F 7F 7A 72 73 72 7C' + '91 84 78 79 7A 7A 7A 7A 7A 7A 7A 7A 7A 7A 7A 7A' + '79 3C 3C 3C 3C 4C 68 A4 A4 A4 A4 A4 A4 A4 A4 A4' + '68 A4 A4 00 00 00 00 A4 A4 10 5F 83 72 73 76 8C' + '7C 77 79 78 78 78 78 77 75 76 76 76 76 76 76 76' + '76 76 3C 3C 77 77 4C 68 A4 A4 A4 A4 A4 A4 A4 68' + 'A4 A4 00 00 00 00 00 A4 A4 05 50 85 74 75 83 7E' + '76 78 78 78 78 78 78 77 74 71 72 72 72 72 72 72' + '72 72 72 70 77 3B 3B A4 68 A4 A4 A4 A4 A4 68 A4' + 'A4 00 00 00 00 00 00 00 A4 A4 3F 85 77 79 83 79' + '78 78 78 78 78 78 78 78 77 71 6D 6E 6E 6E 6E 6E' + '6E 6E 6E 6E 6F 3B 3B A4 A4 68 A4 A4 A4 68 A4 A4' + '00 00 00 00 00 00 00 00 A4 A4 29 84 79 7A 7C 79' + '79 79 79 79 79 79 79 79 79 78 70 6B 6B 6B 6C 6C' + '6C 6C 6C 6C 6C 3C 3C 3C 3C 07 68 A4 68 A4 A4 00' + '00 00 00 00 00 00 00 00 A4 A4 20 80 7C 7A 78 7B' + '7B 7B 7B 7B 7B 7B 7B 7B 7B 7B 7B 75 6F 6C 6A 69' + '68 69 69 69 6A 6A 3C 3C 4C 07 A4 68 A4 A4 00 00' + '00 00 00 00 00 00 00 00 A4 A4 17 74 7E 7D 74 7D' + '7E 7E 7E 7E 7E 7E 7E 7E 7E 7E 7E 7F 7E 7D 7B 77' + '74 71 6E 6C 6A 5D 65 78 4C 07 A4 A4 00 00 00 00' + '00 00 00 00 00 00 00 00 A4 A4 0A 5B 83 83 78 7A' + '83 81 82 82 82 82 82 82 82 82 82 82 82 82 82 83' + '83 82 81 81 77 6D 74 72 37 02 A4 00 00 00 00 00' + '00 00 00 00 00 00 00 00 A4 A4 06 4A 84 87 84 76' + '7E 86 85 85 85 85 85 85 85 85 85 85 85 85 85 85' + '85 85 86 80 76 85 84 6E 25 A4 A4 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 A4 A4 34 7B 8A 89 86' + '76 7F 89 8A 88 88 88 88 88 88 88 88 88 88 88 88' + '89 89 81 75 82 8B 81 63 1B A4 A4 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 A4 A4 24 71 8D 8B 8C' + '89 7F 7A 82 8C 8D 8C 8C 8C 8C 8C 8C 8C 8C 8D 8D' + '84 7A 7E 88 8C 8E 7E 56 0E A4 A4 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 A4 A4 1A 65 8E 8E 8E' + '8F 8F 87 7A 7B 86 8B 8B 8C 8C 8C 8C 8B 8B 86 7C' + '79 85 8F 8F 8E 90 7C 4D 08 A4 A4 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 A4 A4 0C 58 8C 95 8F' + '8E 94 93 92 8C 88 87 87 85 84 84 85 87 87 87 8A' + '91 94 92 8D 93 93 7E 43 A4 A4 A4 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 A4 A4 06 4C 8C 87 65' + '69 7E 94 95 95 96 96 95 94 93 93 94 95 96 96 95' + '96 8C 6A 66 79 94 7C 33 A4 A4 A4 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 A4 A4 44 88 6C 5C' + '60 5C 93 99 98 98 98 98 98 98 98 98 98 98 98 98' + '9B 7D 5B 5E 5F 93 75 2A A4 A4 A4 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 A4 A4 2B 76 85 84' + '7D 8C A1 A1 A1 A1 A1 A1 A1 A1 A1 A1 A1 A1 A1 A1' + 'A2 9A 87 80 84 7F 5B 19 A4 A4 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 A4 A4 0B 3D 66 7B' + '7F 83 80 80 80 80 80 80 80 80 80 80 80 80 80 80' + '80 81 81 7F 75 5B 28 04 A4 A4 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 A4 A4 A4 09 1D 23' + '22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22' + '22 22 22 23 23 18 02 A4 A4 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 A4 A4 A4 A4 A4' + 'A4 A4 A4 A4 A4 A4 A4 A4 A4 A4 A4 A4 A4 A4 A4 A4' + 'A4 A4 A4 A4 A4 A4 A4 A4 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 A4 A4 A4' + 'A4 A4 A4 A4 A4 A4 A4 A4 A4 A4 A4 A4 A4 A4 A4 A4' + 'A4 A4 A4 A4 A4 A4 A4 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 FF FF FF 0F FF FF 00 00 FF FF' + 'FE 00 FF FF 00 00 FF FF FC 00 FF FF 00 00 FF FF' + 'F8 00 BF FF 00 00 FF FF F0 00 9F FF 00 00 FF FF' + 'E0 00 9F FF 00 00 FF FF E0 00 8F FF 00 00 F0 00' + '00 00 0F FF 00 00 C0 00 00 00 09 FF 00 00 80 00' + '00 00 08 FF 00 00 80 00 00 00 00 FF 00 00 00 00' + '00 00 00 BF 00 00 00 00 00 00 00 9F 00 00 00 00' + '00 00 00 8F 00 00 00 00 00 00 00 0F 00 00 00 00' + '00 00 00 0B 00 00 00 00 00 00 00 09 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 80 00 00 00 00 00 00 00 80 00' + '00 00 00 01 00 00 80 00 00 00 00 03 00 00 80 00' + '00 00 00 07 00 00 80 00 00 00 00 0F 00 00 80 00' + '00 00 00 1F 00 00 C0 00 00 00 00 3F 00 00 C0 00' + '00 00 00 7F 00 00 C0 00 00 00 00 FF 00 00 C0 00' + '00 00 03 FF 00 00 C0 00 00 00 07 FF 00 00 C0 00' + '00 00 07 FF 00 00 E0 00 00 00 07 FF 00 00 E0 00' + '00 00 07 FF 00 00 E0 00 00 00 07 FF 00 00 E0 00' + '00 00 07 FF 00 00 E0 00 00 00 07 FF 00 00 F0 00' + '00 00 07 FF 00 00 F0 00 00 00 0F FF 00 00 F0 00' + '00 00 0F FF 00 00 F0 00 00 00 1F FF 00 00 F8 00' + '00 00 3F FF 00 00 FE 00 00 00 7F FF 00 00 FF FF' + 'FF FF FF FF 00 00 28 00 00 00 30 00 00 00 60 00' + '00 00 01 00 04 00 00 00 00 00 80 04 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 80 00 00 00 00 80 00 00 80 80 00 00 00 00' + '80 00 80 00 80 00 00 80 80 00 C0 C0 C0 00 80 80' + '80 00 FF 00 00 00 00 FF 00 00 FF FF 00 00 00 00' + 'FF 00 FF 00 FF 00 00 FF FF 00 FF FF FF 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 08 80 06 60 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 80 88 0E 60 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 08 00 80 7E E0 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 80 00 80 00 E0 06 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '08 00 08 08 00 80 06 60 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 80 00 80 00 80 08 0E 60' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 08' + '00 08 00 00 08 00 7E E0 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 80 00 80 00 00 00 80 00 E0' + '06 00 00 00 00 00 00 00 00 00 00 00 00 00 08 00' + '08 00 00 80 00 08 00 80 06 60 00 00 00 00 00 00' + '87 77 77 77 77 77 78 00 80 00 08 08 00 00 80 08' + '0E 60 00 00 00 00 00 08 FF F7 88 88 77 77 78 08' + '00 00 80 80 80 00 08 00 7E E0 00 00 00 00 00 07' + 'FF F7 00 88 88 87 78 80 00 08 08 08 00 00 00 80' + '00 E0 06 00 00 00 00 07 FF F7 88 88 88 76 60 70' + '00 00 80 80 00 00 00 08 00 80 06 60 00 00 00 07' + 'FF F7 88 88 88 76 60 07 00 00 08 00 00 80 00 00' + '80 08 0E 60 00 00 00 07 FF F7 88 88 88 7E EE E8' + '70 00 00 00 00 08 00 00 08 00 7E E0 00 00 00 07' + 'FF F7 88 88 88 88 EE 88 87 00 00 00 80 00 80 00' + '00 80 00 E0 06 00 00 07 FF F7 77 77 77 77 77 76' + '60 70 00 00 08 00 08 00 00 08 00 80 06 60 00 07' + 'FF FF FF FF FF FF 77 76 60 07 00 00 00 80 00 80' + '00 00 80 08 0E 60 00 07 FF FF FF FF FF FF FF FE' + 'EE EF 70 00 00 08 00 08 00 00 08 00 7E E0 00 07' + 'FF FF FF 77 77 7F FF FF EE 77 77 00 00 00 80 00' + '00 00 00 80 00 E0 00 07 77 77 F7 77 77 77 77 77' + '77 76 60 70 00 00 08 00 00 00 00 08 00 80 00 07' + '77 77 F7 77 77 77 77 77 77 76 60 07 00 00 00 00' + '88 80 00 00 80 80 00 07 77 7F F7 77 77 77 77 77' + '77 7E EE E7 70 00 00 08 08 08 00 00 08 70 00 07' + 'FF FF 77 77 77 7F FF FF FF FF EE FF 77 00 00 08' + '80 88 00 00 07 00 00 08 77 77 77 77 7F FF 77 77' + '77 77 FF F6 60 70 00 08 08 08 00 00 70 00 00 08' + '77 77 77 7F F7 77 77 77 77 77 77 76 60 07 00 00' + '88 80 00 07 00 00 00 00 77 77 77 F7 77 77 77 77' + '77 77 77 7E EE E8 70 00 00 00 00 70 00 00 00 00' + '77 77 7F 77 77 77 77 77 77 77 77 77 EE 77 87 00' + '00 00 07 00 00 00 00 00 87 77 77 77 77 77 77 77' + '77 77 77 77 77 76 60 70 00 00 70 00 00 00 00 00' + '87 77 77 77 77 77 77 77 77 77 77 77 77 76 60 07' + '00 07 00 00 00 00 00 00 87 77 77 77 77 77 77 77' + '77 77 77 77 77 7E EE E0 70 70 00 00 00 00 00 00' + '87 77 77 77 77 77 77 77 77 77 77 77 77 77 EE 80' + '07 00 00 00 00 00 00 00 07 77 77 77 77 77 77 77' + '77 77 77 77 77 77 77 80 00 00 00 00 00 00 00 00' + '07 77 77 77 77 77 77 77 77 77 77 77 77 77 77 80' + '00 00 00 00 00 00 00 00 08 77 77 77 77 77 77 77' + '77 77 77 77 77 77 77 80 00 00 00 00 00 00 00 00' + '08 77 77 77 77 77 77 77 77 77 77 77 77 77 77 00' + '00 00 00 00 00 00 00 00 08 77 77 77 77 77 77 77' + '77 77 77 77 77 77 77 00 00 00 00 00 00 00 00 00' + '00 77 77 77 77 77 77 77 77 77 77 77 77 77 78 00' + '00 00 00 00 00 00 00 00 00 7F FF FF F7 77 77 77' + '77 77 77 7F FF FF 78 00 00 00 00 00 00 00 00 00' + '00 8F 77 77 F7 77 77 77 77 77 77 FF 77 7F 78 00' + '00 00 00 00 00 00 00 00 00 8F 77 77 F7 77 77 77' + '77 77 77 F7 77 7F 78 00 00 00 00 00 00 00 00 00' + '00 87 77 7F F7 77 77 77 77 77 77 FF 77 77 70 00' + '00 00 00 00 00 00 00 00 00 08 77 77 77 77 77 77' + '77 77 77 77 77 77 80 00 00 00 00 00 00 00 00 00' + '00 00 08 88 88 88 88 88 88 88 88 88 88 80 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF' + 'FF 01 FF FF 00 00 FF FF FE 00 FF FF 00 00 FF FF' + 'FC 00 FF FF 00 00 FF FF F8 00 BF FF 00 00 FF FF' + 'F0 00 9F FF 00 00 FF FF F0 00 8F FF 00 00 FF FF' + 'E0 00 8F FF 00 00 F0 00 00 00 0F FF 00 00 C0 00' + '00 00 09 FF 00 00 80 00 00 00 08 FF 00 00 80 00' + '00 00 00 FF 00 00 00 00 00 00 00 BF 00 00 00 00' + '00 00 00 9F 00 00 00 00 00 00 00 8F 00 00 00 00' + '00 00 00 0F 00 00 00 00 00 00 00 0B 00 00 00 00' + '00 00 00 09 00 00 00 00 00 00 00 08 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 00' + '00 00 00 00 00 00 80 00 00 00 00 01 00 00 80 00' + '00 00 00 03 00 00 80 00 00 00 00 07 00 00 80 00' + '00 00 00 0F 00 00 80 00 00 00 00 1F 00 00 C0 00' + '00 00 00 3F 00 00 C0 00 00 00 00 7F 00 00 C0 00' + '00 00 00 FF 00 00 C0 00 00 00 03 FF 00 00 C0 00' + '00 00 07 FF 00 00 C0 00 00 00 07 FF 00 00 E0 00' + '00 00 07 FF 00 00 E0 00 00 00 07 FF 00 00 E0 00' + '00 00 07 FF 00 00 E0 00 00 00 07 FF 00 00 E0 00' + '00 00 07 FF 00 00 F0 00 00 00 07 FF 00 00 F0 00' + '00 00 0F FF 00 00 F0 00 00 00 0F FF 00 00 F0 00' + '00 00 1F FF 00 00 F8 00 00 00 3F FF 00 00 FE 00' + '00 00 7F FF 00 00 FF FF FF FF FF FF 00 00 28 00' + '00 00 30 00 00 00 60 00 00 00 01 00 20 00 00 00' + '00 00 00 24 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 3C 00 00' + '00 78 00 00 00 78 00 00 00 3C 00 00 00 30 00 00' + '00 6C 00 00 00 6C 00 00 00 24 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 3C 80 80 80 FF 80 80' + '80 FF 00 00 00 B4 00 00 00 84 00 80 80 FF 00 80' + '80 FF 00 00 00 90 00 00 00 30 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 3C 80 80 80 FF 00 00 00 FF 80 80' + '80 FF 80 80 80 FF 00 00 00 B4 00 FF FF FF 00 80' + '80 FF 00 00 00 90 00 00 00 30 00 00 00 0C 00 00' + '00 18 00 00 00 0C 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 3C 80 80 80 FF 00 00 00 FF 00 00 00 FF 80 80' + '80 FF 00 00 00 FF C0 C0 C0 FF 00 FF FF FF 00 FF' + 'FF FF 00 00 00 90 00 00 00 30 00 00 00 24 00 00' + '00 54 00 00 00 3C 00 00 00 0C 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 3C 80 80' + '80 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 80 80' + '80 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 FF' + 'FF FF 00 00 00 9C 00 00 00 48 00 80 80 FF 00 00' + '00 84 00 00 00 78 00 00 00 24 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 3E 80 80 80 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 80 80 80 FF 00 00' + '00 FF 80 80 80 FF 00 00 00 FF 00 00 00 FF 80 80' + '80 FF 00 00 00 B4 00 00 00 84 00 80 80 FF 00 80' + '80 FF 00 00 00 90 00 00 00 30 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 3E 80 80 80 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 80 80 80 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 80 80 80 FF 00 00 00 FF 00 00' + '00 FF 80 80 80 FF 00 00 00 00 00 FF FF FF 00 80' + '80 FF 00 00 00 90 00 00 00 30 00 00 00 00 00 00' + '00 18 00 00 00 0C 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 16 00 00 00 34 00 00' + '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' + '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' + '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' + '00 3E 80 80 80 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 80 80 80 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 80 80 80 FF 00 00' + '00 FF 00 00 00 FF C0 C0 C0 FF 00 FF FF FF 00 FF' + 'FF FF 00 00 00 90 00 00 00 30 00 00 00 00 00 00' + '00 54 00 00 00 3C 00 00 00 0C 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 05 00 00 00 69 00 00 00 C5 00 00 00 F7 00 00' + '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' + '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' + '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 80 80' + '80 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 80 80' + '80 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 80 80' + '80 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 FF' + 'FF FF 00 00 00 90 00 00 00 30 00 80 80 FF 00 00' + '00 84 00 00 00 78 00 00 00 24 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 05 00 00' + '00 9B 00 00 00 FF 00 00 00 FF 21 21 21 FF 2C 2C' + '2C FF 2B 2B 2B FF 2C 2C 2C FF 2B 2B 2B FF 2B 2B' + '2B FF 2B 2B 2B FF 2B 2B 2B FF 2B 2B 2B FF 2B 2B' + '2B FF 2B 2B 2B FF 2B 2B 2B FF 80 80 80 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 80 80 80 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 80 80' + '80 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 80 80 80 FF 00 00 00 FF 00 00 00 FF 80 80' + '80 FF 00 00 00 90 00 00 00 30 00 80 80 FF 00 80' + '80 FF 00 00 00 90 00 00 00 30 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 54 00 00' + '00 FF 26 26 26 FF 90 90 90 FF CA CA CA FF CD CD' + 'CD FF CB CB CB FF CE CE CE FF CD CD CD FF CC CC' + 'CC FF CB CB CB FF C9 C9 C9 FF C7 C7 C7 FF C6 C6' + 'C6 FF C5 C5 C5 FF C4 C4 C4 FF 80 80 80 FF 00 00' + '00 FF 00 00 00 FF 80 80 80 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 80 80 80 FF 00 00' + '00 FF 80 80 80 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 80 80 80 FF 00 00 00 FF 00 00' + '00 FF 80 80 80 FF 00 00 00 84 00 FF FF FF 00 80' + '80 FF 00 00 00 90 00 00 00 30 00 00 00 0C 00 00' + '00 18 00 00 00 0C 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 03 00 00 00 AD 01 01' + '01 FF 8A 8A 8A FF EB EB EB FF E8 E8 E8 FF E7 E7' + 'E7 FF D5 D5 D5 FF 85 85 85 FF 88 88 88 FF 92 92' + '92 FF 98 98 98 FF A2 A2 A2 FF AD AD AD FF BA BA' + 'BA FF C0 C0 C0 FF C3 C3 C3 FF 80 80 80 FF 00 00' + '00 FF 80 80 80 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 80 80 80 FF 00 00 00 FF 80 80' + '80 FF 00 00 00 FF 80 80 80 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 80 80 80 FF 00 00' + '00 FF 00 00 00 FF C0 C0 C0 FF 00 FF FF FF 00 FF' + 'FF FF 00 00 00 90 00 00 00 30 00 00 00 24 00 00' + '00 54 00 00 00 3C 00 00 00 0C 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 15 00 00 00 F0 19 19' + '19 FF C7 C7 C7 FF EC EC EC FF E2 E2 E2 FF E6 E6' + 'E6 FF CB CB CB FF 3B 3B 3B FF 3F 3F 3F FF 56 56' + '56 FF 72 72 72 FF 87 87 87 FF 92 92 92 FF 9D 9D' + '9D FF A5 A5 A5 FF A8 A8 A8 FF 80 80 80 FF 80 80' + '80 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 80 80 80 FF 00 00 00 FF 80 80 80 FF 00 00' + '00 FF 80 80 80 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 80 80' + '80 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 FF' + 'FF FF 00 00 00 9C 00 00 00 48 00 80 80 FF 00 00' + '00 84 00 00 00 78 00 00 00 24 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 30 00 00 00 FA 29 29' + '29 FF D1 D1 D1 FF EA EA EA FF E4 E4 E4 FF E7 E7' + 'E7 FF CD CD CD FF 47 47 47 FF 5F 5F 5F FF 79 79' + '79 FF 87 87 87 FF 8F 8F 8F FF 97 97 97 FF A0 A0' + 'A0 FF 00 80 80 FF 00 80 80 FF 00 00 00 FF C0 C0' + 'C0 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 80 80 80 FF 00 00 00 FF 80 80' + '80 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 80 80 80 FF 00 00 00 FF 00 00 00 FF 80 80' + '80 FF 00 00 00 B4 00 00 00 84 00 80 80 FF 00 80' + '80 FF 00 00 00 90 00 00 00 30 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 34 00 00 00 F9 28 28' + '28 FF D1 D1 D1 FF EC EC EC FF E6 E6 E6 FF E7 E7' + 'E7 FF D1 D1 D1 FF 68 68 68 FF 74 74 74 FF 7E 7E' + '7E FF 85 85 85 FF 8E 8E 8E FF 97 97 97 FF A0 A0' + 'A0 FF 00 80 80 FF 00 80 80 FF 00 00 00 FF 00 00' + '00 FF C0 C0 C0 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 80 80 80 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 80 80' + '80 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 80 80 80 FF 00 00 00 FF 00 00' + '00 FF 80 80 80 FF 00 00 00 B4 00 FF FF FF 00 80' + '80 FF 00 00 00 90 00 00 00 30 00 00 00 0C 00 00' + '00 18 00 00 00 0C 00 00 00 33 00 00 00 F9 28 28' + '28 FF D1 D1 D1 FF EE EE EE FF E7 E7 E7 FF E8 E8' + 'E8 FF D6 D6 D6 FF 70 70 70 FF 71 71 71 FF 7D 7D' + '7D FF 85 85 85 FF 8E 8E 8E FF 97 97 97 FF A0 A0' + 'A0 FF 00 FF FF FF 00 FF FF FF 00 FF FF FF 00 FF' + 'FF FF 9C 9C 9C FF C0 C0 C0 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 80 80 80 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 80 80 80 FF 00 00' + '00 FF 00 00 00 FF C0 C0 C0 FF 00 FF FF FF 00 FF' + 'FF FF 00 00 00 90 00 00 00 30 00 00 00 24 00 00' + '00 54 00 00 00 3C 00 00 00 33 00 00 00 F9 27 27' + '27 FF D1 D1 D1 FF EF EF EF FF E9 E9 E9 FF EB EB' + 'EB FF D6 D6 D6 FF 6A 6A 6A FF 6C 6C 6C FF 78 78' + '78 FF 81 81 81 FF 8A 8A 8A FF 93 93 93 FF 9C 9C' + '9C FF 9C 9C 9C FF 00 FF FF FF 00 FF FF FF 9C 9C' + '9C FF 9C 9C 9C FF 9C 9C 9C FF C0 C0 C0 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 80 80 80 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 80 80 80 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 80 80' + '80 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 FF' + 'FF FF 00 00 00 9C 00 00 00 48 00 80 80 FF 00 00' + '00 84 00 00 00 78 00 00 00 33 00 00 00 F9 27 27' + '27 FF D2 D2 D2 FF F2 F2 F2 FF EB EB EB FF EA EA' + 'EA FF DF DF DF FF A7 A7 A7 FF A7 A7 A7 FF AB AB' + 'AB FF AE AE AE FF B0 B0 B0 FF B3 B3 B3 FF B6 B6' + 'B6 FF B9 B9 B9 FF B9 B9 B9 FF BA BA BA FF BD BD' + 'BD FF 00 80 80 FF 00 80 80 FF 00 00 00 FF C0 C0' + 'C0 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 80 80 80 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 80 80 80 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 80 80 80 FF 00 00 00 FF 00 00 00 FF 80 80' + '80 FF 00 00 00 B4 00 00 00 84 00 80 80 FF 00 80' + '80 FF 00 00 00 90 00 00 00 33 00 00 00 F9 26 26' + '26 FF D3 D3 D3 FF F3 F3 F3 FF EB EB EB FF EB EB' + 'EB FF EA EA EA FF ED ED ED FF EB EB EB FF E9 E9' + 'E9 FF E8 E8 E8 FF E6 E6 E6 FF E4 E4 E4 FF E2 E2' + 'E2 FF E1 E1 E1 FF DF DF DF FF DE DE DE FF DB DB' + 'DB FF 00 80 80 FF 00 80 80 FF 00 00 00 FF 00 00' + '00 FF C0 C0 C0 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 80 80' + '80 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 80 80' + '80 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 80 80 80 FF 00 00 00 FF 00 00' + '00 FF 80 80 80 FF 00 00 00 B4 00 FF FF FF 00 80' + '80 FF 00 00 00 90 00 00 00 33 00 00 00 F9 26 26' + '26 FF D3 D3 D3 FF F7 F7 F7 FF F8 F8 F8 FF F6 F6' + 'F6 FF F6 F6 F6 FF F6 F6 F6 FF F5 F5 F5 FF F5 F5' + 'F5 FF F4 F4 F4 FF F4 F4 F4 FF F3 F3 F3 FF F3 F3' + 'F3 FF F3 F3 F3 FF F2 F2 F2 FF F2 F2 F2 FF F1 F1' + 'F1 FF 00 FF FF FF 00 FF FF FF 00 FF FF FF 00 FF' + 'FF FF F1 F1 F1 FF C0 C0 C0 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 80 80 80 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 80 80 80 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 80 80 80 FF 00 00' + '00 FF 00 00 00 FF C0 C0 C0 FF 00 FF FF FF 00 FF' + 'FF FF 00 00 00 90 00 00 00 33 00 00 00 F9 24 24' + '24 FF D6 D6 D6 FF FF FF FF FF E9 E9 E9 FF E1 E1' + 'E1 FF E2 E2 E2 FF E2 E2 E2 FF E0 E0 E0 FF DF DF' + 'DF FF DF DF DF FF DF DF DF FF DF DF DF FF DF DF' + 'DF FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' + 'E0 FF E0 E0 E0 FF 00 FF FF FF 00 FF FF FF D9 D9' + 'D9 FF D9 D9 D9 FF D9 D9 D9 FF C0 C0 C0 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 80 80 80 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 80 80' + '80 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 FF' + 'FF FF 00 00 00 90 00 00 00 34 00 00 00 FA 24 24' + '24 FF DE DE DE FF F8 F8 F8 FF D9 D9 D9 FF C4 C4' + 'C4 FF BB BB BB FF BF BF BF FF D8 D8 D8 FF DA DA' + 'DA FF D9 D9 D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9' + 'D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9' + 'D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9 D9 FF D9 D9' + 'D9 FF 00 80 80 FF 00 80 80 FF 00 00 00 FF C0 C0' + 'C0 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 80 80 80 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 80 80 80 FF 00 00 00 FF 00 00 00 FF 80 80' + '80 FF 00 00 00 90 00 00 00 25 00 00 00 F7 1F 1F' + '1F FF DA DA DA FF F3 F3 F3 FF C6 C6 C6 FF A9 A9' + 'A9 FF B7 B7 B7 FF B0 B0 B0 FF C3 C3 C3 FF DA DA' + 'DA FF D8 D8 D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8' + 'D8 FF D8 D8 D8 FF D7 D7 D7 FF D7 D7 D7 FF D7 D7' + 'D7 FF D7 D7 D7 FF D7 D7 D7 FF D7 D7 D7 FF D7 D7' + 'D7 FF 00 80 80 FF 00 80 80 FF 00 00 00 FF 00 00' + '00 FF C0 C0 C0 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 80 80 80 FF 80 80 80 FF 80 80' + '80 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 80 80 80 FF 00 00 00 FF 80 80' + '80 FF 00 00 00 78 00 00 00 07 00 00 00 D0 05 05' + '05 FF C2 C2 C2 FF F6 F6 F6 FF BC BC BC FF B2 B2' + 'B2 FF C3 C3 C3 FF AB AB AB FF BB BB BB FF D8 D8' + 'D8 FF D5 D5 D5 FF D5 D5 D5 FF D5 D5 D5 FF D4 D4' + 'D4 FF D3 D3 D3 FF D3 D3 D3 FF D5 D5 D5 FF D7 D7' + 'D7 FF D8 D8 D8 FF D8 D8 D8 FF D7 D7 D7 FF D5 D5' + 'D5 FF 00 FF FF FF 00 FF FF FF 00 FF FF FF 00 FF' + 'FF FF D7 D7 D7 FF C0 C0 C0 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 80 80 80 FF 00 00 00 FF 80 80 80 FF 00 00' + '00 FF 80 80 80 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 80 80 80 FF C0 C0' + 'C0 FF 00 00 00 3C 00 00 00 00 00 00 00 9C 00 00' + '00 FF A4 A4 A4 FF F4 F4 F4 FF CF CF CF FF C5 C5' + 'C5 FF D2 D2 D2 FF BF BF BF FF C9 C9 C9 FF D3 D3' + 'D3 FF D2 D2 D2 FF D0 D0 D0 FF D3 D3 D3 FF DD DD' + 'DD FF E1 E1 E1 FF E3 E3 E3 FF E6 E6 E6 FF EA EA' + 'EA FF ED ED ED FF ED ED ED FF EB EB EB FF E7 E7' + 'E7 FF E7 E7 E7 FF 00 FF FF FF 00 FF FF FF E7 E7' + 'E7 FF E7 E7 E7 FF D7 D7 D7 FF C0 C0 C0 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 80 80 80 FF 80 80 80 FF 00 00 00 FF 80 80' + '80 FF 80 80 80 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF C0 C0 C0 FF 00 00' + '00 3C 00 00 00 0C 00 00 00 00 00 00 00 73 00 00' + '00 FF 7E 7E 7E FF EF EF EF FF D1 D1 D1 FF CF CF' + 'CF FF CB CB CB FF CF CF CF FF D1 D1 D1 FF CE CE' + 'CE FF CF CF CF FF DF DF DF FF F0 F0 F0 FF EC EC' + 'EC FF E1 E1 E1 FF DE DE DE FF DD DD DD FF DC DC' + 'DC FF DB DB DB FF DB DB DB FF DC DC DC FF DD DD' + 'DD FF DE DE DE FF E1 E1 E1 FF EC EC EC FF F1 F1' + 'F1 FF 00 80 80 FF 00 80 80 FF 00 00 00 FF C0 C0' + 'C0 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 80 80 80 FF 00 00 00 FF 80 80 80 FF 00 00' + '00 FF 80 80 80 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF C0 C0 C0 FF 00 00 00 3C 00 00' + '00 0C 00 00 00 00 00 00 00 00 00 00 00 59 00 00' + '00 FF 59 59 59 FF E9 E9 E9 FF D0 D0 D0 FF CD CD' + 'CD FF CD CD CD FF CD CD CD FF CA CA CA FF D6 D6' + 'D6 FF ED ED ED FF E6 E6 E6 FF DC DC DC FF D4 D4' + 'D4 FF D5 D5 D5 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6' + 'D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6' + 'D6 FF D6 D6 D6 FF D5 D5 D5 FF D5 D5 D5 FF DB DB' + 'DB FF 00 80 80 FF 00 80 80 FF 00 00 00 FF 00 00' + '00 FF C0 C0 C0 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 80 80 80 FF 80 80 80 FF 80 80' + '80 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF C0 C0 C0 FF 00 00 00 3C 00 00 00 0C 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 3E 00 00' + '00 FE 40 40 40 FF D7 D7 D7 FF D2 D2 D2 FF CA CA' + 'CA FF CB CB CB FF CA CA CA FF D4 D4 D4 FF E9 E9' + 'E9 FF DC DC DC FF D0 D0 D0 FF D1 D1 D1 FF D2 D2' + 'D2 FF D2 D2 D2 FF D2 D2 D2 FF D2 D2 D2 FF D2 D2' + 'D2 FF D2 D2 D2 FF D2 D2 D2 FF D2 D2 D2 FF D2 D2' + 'D2 FF D2 D2 D2 FF D2 D2 D2 FF D2 D2 D2 FF D1 D1' + 'D1 FF 00 FF FF FF 00 FF FF FF 00 FF FF FF 00 FF' + 'FF FF 99 99 99 FF C0 C0 C0 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF C0 C0' + 'C0 FF 00 00 00 3C 00 00 00 0C 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 25 00 00' + '00 F8 22 22 22 FF B7 B7 B7 FF DB DB DB FF CA CA' + 'CA FF CB CB CB FF CE CE CE FF E4 E4 E4 FF D4 D4' + 'D4 FF CF CF CF FF D1 D1 D1 FF D0 D0 D0 FF D0 D0' + 'D0 FF D0 D0 D0 FF D0 D0 D0 FF CF CF CF FF CD CD' + 'CD FF CE CE CE FF CE CE CE FF CE CE CE FF CE CE' + 'CE FF CE CE CE FF CE CE CE FF CE CE CE FF CE CE' + 'CE FF CE CE CE FF 00 FF FF FF 00 FF FF FF CF CF' + 'CF FF CF CF CF FF 99 99 99 FF C0 C0 C0 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF C0 C0 C0 FF 00 00' + '00 3C 00 00 00 0C 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 0C 00 00' + '00 E1 07 07 07 FF 9F 9F 9F FF DD DD DD FF CC CC' + 'CC FF CD CD CD FF DB DB DB FF D6 D6 D6 FF CE CE' + 'CE FF D0 D0 D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0' + 'D0 FF D0 D0 D0 FF D0 D0 D0 FF CF CF CF FF CC CC' + 'CC FF C9 C9 C9 FF CA CA CA FF CA CA CA FF CA CA' + 'CA FF CA CA CA FF CA CA CA FF CA CA CA FF CA CA' + 'CA FF CA CA CA FF CA CA CA FF C8 C8 C8 FF CF CF' + 'CF FF 00 80 80 FF 00 80 80 FF 00 00 00 FF C0 C0' + 'C0 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF C0 C0 C0 FF 00 00 00 3C 00 00' + '00 0C 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 B2 00 00 00 FF 83 83 83 FF DD DD DD FF CF CF' + 'CF FF D1 D1 D1 FF DB DB DB FF D1 D1 D1 FF D0 D0' + 'D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0' + 'D0 FF D0 D0 D0 FF D0 D0 D0 FF D0 D0 D0 FF CF CF' + 'CF FF C9 C9 C9 FF C5 C5 C5 FF C6 C6 C6 FF C6 C6' + 'C6 FF C6 C6 C6 FF C6 C6 C6 FF C6 C6 C6 FF C6 C6' + 'C6 FF C6 C6 C6 FF C6 C6 C6 FF C6 C6 C6 FF C7 C7' + 'C7 FF 00 80 80 FF 00 80 80 FF 00 00 00 FF 00 00' + '00 FF C0 C0 C0 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF C0 C0 C0 FF 00 00 00 3C 00 00 00 0C 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 80 00 00 00 FF 5F 5F 5F FF DC DC DC FF D1 D1' + 'D1 FF D2 D2 D2 FF D4 D4 D4 FF D1 D1 D1 FF D1 D1' + 'D1 FF D1 D1 D1 FF D1 D1 D1 FF D1 D1 D1 FF D1 D1' + 'D1 FF D1 D1 D1 FF D1 D1 D1 FF D1 D1 D1 FF D1 D1' + 'D1 FF D0 D0 D0 FF C8 C8 C8 FF C3 C3 C3 FF C3 C3' + 'C3 FF C3 C3 C3 FF C4 C4 C4 FF C4 C4 C4 FF C4 C4' + 'C4 FF C4 C4 C4 FF C4 C4 C4 FF C4 C4 C4 FF C4 C4' + 'C4 FF 00 FF FF FF 00 FF FF FF 00 FF FF FF 00 FF' + 'FF FF 09 09 09 FF C0 C0 C0 FF 00 00 00 FF C0 C0' + 'C0 FF 00 00 00 3D 00 00 00 0C 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 4B 00 00 00 FE 41 41 41 FF D8 D8 D8 FF D4 D4' + 'D4 FF D2 D2 D2 FF D0 D0 D0 FF D3 D3 D3 FF D3 D3' + 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' + 'D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3 D3 FF D3 D3' + 'D3 FF D3 D3 D3 FF D3 D3 D3 FF CD CD CD FF C7 C7' + 'C7 FF C4 C4 C4 FF C2 C2 C2 FF C1 C1 C1 FF C0 C0' + 'C0 FF C1 C1 C1 FF C1 C1 C1 FF C1 C1 C1 FF C2 C2' + 'C2 FF C2 C2 C2 FF 00 FF FF FF 00 FF FF FF 99 99' + '99 FF 09 09 09 FF 00 00 00 CF C0 C0 C0 FF 00 00' + '00 40 00 00 00 0E 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 1A 00 00 00 F2 2C 2C 2C FF CC CC CC FF D6 D6' + 'D6 FF D5 D5 D5 FF CC CC CC FF D5 D5 D5 FF D6 D6' + 'D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6' + 'D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6 D6 FF D6 D6' + 'D6 FF D6 D6 D6 FF D6 D6 D6 FF D7 D7 D7 FF D6 D6' + 'D6 FF D5 D5 D5 FF D3 D3 D3 FF CF CF CF FF CC CC' + 'CC FF C9 C9 C9 FF C6 C6 C6 FF C4 C4 C4 FF C2 C2' + 'C2 FF B3 B3 B3 FF BD BD BD FF D0 D0 D0 FF 99 99' + '99 FF 09 09 09 FF 00 00 00 CF 00 00 00 3E 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 09 00 00 00 D8 18 18 18 FF B0 B0 B0 FF DB DB' + 'DB FF DB DB DB FF D0 D0 D0 FF D2 D2 D2 FF DB DB' + 'DB FF D9 D9 D9 FF DA DA DA FF DA DA DA FF DA DA' + 'DA FF DA DA DA FF DA DA DA FF DA DA DA FF DA DA' + 'DA FF DA DA DA FF DA DA DA FF DA DA DA FF DA DA' + 'DA FF DA DA DA FF DA DA DA FF DB DB DB FF DB DB' + 'DB FF DA DA DA FF D9 D9 D9 FF D9 D9 D9 FF CF CF' + 'CF FF C5 C5 C5 FF CC CC CC FF CA CA CA FF 7A 7A' + '7A FF 02 02 02 FF 00 00 00 B8 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 02 00 00 00 BF 08 08 08 FF 97 97 97 FF DC DC' + 'DC FF DF DF DF FF DC DC DC FF CE CE CE FF D6 D6' + 'D6 FF DE DE DE FF DD DD DD FF DD DD DD FF DD DD' + 'DD FF DD DD DD FF DD DD DD FF DD DD DD FF DD DD' + 'DD FF DD DD DD FF DD DD DD FF DD DD DD FF DD DD' + 'DD FF DD DD DD FF DD DD DD FF DD DD DD FF DD DD' + 'DD FF DD DD DD FF DE DE DE FF D8 D8 D8 FF CE CE' + 'CE FF DD DD DD FF DC DC DC FF C6 C6 C6 FF 53 53' + '53 FF 00 00 00 FF 00 00 00 A0 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 A4 00 00 00 FF 77 77 77 FF D3 D3' + 'D3 FF E2 E2 E2 FF E1 E1 E1 FF DE DE DE FF CE CE' + 'CE FF D7 D7 D7 FF E1 E1 E1 FF E2 E2 E2 FF E0 E0' + 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' + 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0' + 'E0 FF E0 E0 E0 FF E0 E0 E0 FF E0 E0 E0 FF E1 E1' + 'E1 FF E1 E1 E1 FF D9 D9 D9 FF CD CD CD FF DA DA' + 'DA FF E3 E3 E3 FF D9 D9 D9 FF BB BB BB FF 39 39' + '39 FF 00 00 00 FF 00 00 00 7E 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 89 00 00 00 FF 4B 4B 4B FF C9 C9' + 'C9 FF E5 E5 E5 FF E3 E3 E3 FF E4 E4 E4 FF E1 E1' + 'E1 FF D7 D7 D7 FF D2 D2 D2 FF DA DA DA FF E4 E4' + 'E4 FF E5 E5 E5 FF E4 E4 E4 FF E4 E4 E4 FF E4 E4' + 'E4 FF E4 E4 E4 FF E4 E4 E4 FF E4 E4 E4 FF E4 E4' + 'E4 FF E4 E4 E4 FF E5 E5 E5 FF E5 E5 E5 FF DC DC' + 'DC FF D2 D2 D2 FF D6 D6 D6 FF E0 E0 E0 FF E4 E4' + 'E4 FF E6 E6 E6 FF D6 D6 D6 FF A8 A8 A8 FF 20 20' + '20 FF 00 00 00 FD 00 00 00 4E 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 62 00 00 00 FF 35 35 35 FF BD BD' + 'BD FF E6 E6 E6 FF E6 E6 E6 FF E6 E6 E6 FF E7 E7' + 'E7 FF E7 E7 E7 FF DF DF DF FF D2 D2 D2 FF D3 D3' + 'D3 FF DE DE DE FF E3 E3 E3 FF E3 E3 E3 FF E4 E4' + 'E4 FF E4 E4 E4 FF E4 E4 E4 FF E4 E4 E4 FF E3 E3' + 'E3 FF E3 E3 E3 FF DE DE DE FF D4 D4 D4 FF D1 D1' + 'D1 FF DD DD DD FF E7 E7 E7 FF E7 E7 E7 FF E6 E6' + 'E6 FF E8 E8 E8 FF D4 D4 D4 FF 9A 9A 9A FF 0B 0B' + '0B FF 00 00 00 ED 00 00 00 2C 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 2D 00 00 00 F9 1E 1E 1E FF AB AB' + 'AB FF E4 E4 E4 FF ED ED ED FF E7 E7 E7 FF E6 E6' + 'E6 FF EC EC EC FF EB EB EB FF EA EA EA FF E4 E4' + 'E4 FF E0 E0 E0 FF DF DF DF FF DF DF DF FF DD DD' + 'DD FF DC DC DC FF DC DC DC FF DD DD DD FF DF DF' + 'DF FF DF DF DF FF DF DF DF FF E2 E2 E2 FF E9 E9' + 'E9 FF EC EC EC FF EA EA EA FF E5 E5 E5 FF EB EB' + 'EB FF EB EB EB FF D6 D6 D6 FF 8A 8A 8A FF 00 00' + '00 FF 00 00 00 C3 00 00 00 17 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 09 00 00 00 DD 08 08 08 FF 99 99' + '99 FF E4 E4 E4 FF DF DF DF FF BD BD BD FF C1 C1' + 'C1 FF D6 D6 D6 FF EC EC EC FF ED ED ED FF ED ED' + 'ED FF EE EE EE FF EE EE EE FF ED ED ED FF EC EC' + 'EC FF EB EB EB FF EB EB EB FF EC EC EC FF ED ED' + 'ED FF EE EE EE FF EE EE EE FF ED ED ED FF EE EE' + 'EE FF E4 E4 E4 FF C2 C2 C2 FF BE BE BE FF D1 D1' + 'D1 FF EC EC EC FF D4 D4 D4 FF 75 75 75 FF 00 00' + '00 FF 00 00 00 9C 00 00 00 06 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 AE 00 00 00 FF 8D 8D' + '8D FF E0 E0 E0 FF C4 C4 C4 FF B2 B2 B2 FF B8 B8' + 'B8 FF B2 B2 B2 FF EB EB EB FF F1 F1 F1 FF F0 F0' + 'F0 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0' + 'F0 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0' + 'F0 FF F0 F0 F0 FF F0 F0 F0 FF F0 F0 F0 FF F3 F3' + 'F3 FF D5 D5 D5 FF B0 B0 B0 FF B6 B6 B6 FF B7 B7' + 'B7 FF EB EB EB FF CD CD CD FF 61 61 61 FF 00 00' + '00 FF 00 00 00 85 00 00 00 01 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 80 00 00 00 FF 64 64' + '64 FF CE CE CE FF DD DD DD FF DC DC DC FF D5 D5' + 'D5 FF E4 E4 E4 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9' + 'F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9' + 'F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9' + 'F9 FF F9 F9 F9 FF F9 F9 F9 FF F9 F9 F9 FF FA FA' + 'FA FF F2 F2 F2 FF DF DF DF FF D8 D8 D8 FF DC DC' + 'DC FF D7 D7 D7 FF B0 B0 B0 FF 34 34 34 FF 00 00' + '00 FF 00 00 00 67 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 44 00 00 00 FF 19 19' + '19 FF 80 80 80 FF BE BE BE FF D3 D3 D3 FF D7 D7' + 'D7 FF DB DB DB FF D8 D8 D8 FF D8 D8 D8 FF D8 D8' + 'D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8' + 'D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8' + 'D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8 D8 FF D8 D8' + 'D8 FF D9 D9 D9 FF D9 D9 D9 FF D7 D7 D7 FF CD CD' + 'CD FF B0 B0 B0 FF 5D 5D 5D FF 06 06 06 FF 00 00' + '00 ED 00 00 00 2B 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 02 00 00 00 9C 00 00' + '00 FF 0C 0C 0C FF 3D 3D 3D FF 49 49 49 FF 48 48' + '48 FF 48 48 48 FF 48 48 48 FF 48 48 48 FF 48 48' + '48 FF 48 48 48 FF 48 48 48 FF 48 48 48 FF 48 48' + '48 FF 48 48 48 FF 48 48 48 FF 48 48 48 FF 48 48' + '48 FF 48 48 48 FF 48 48 48 FF 48 48 48 FF 48 48' + '48 FF 48 48 48 FF 48 48 48 FF 49 49 49 FF 49 49' + '49 FF 2F 2F 2F FF 02 02 02 FF 00 00 00 FF 00 00' + '00 B9 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 06 00 00' + '00 7F 00 00 00 F1 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 D6 00 00 00 5C 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 2C 00 00 00 7E 00 00 00 84 00 00' + '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' + '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' + '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' + '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' + '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' + '00 84 00 00 00 70 00 00 00 1A 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 FF FF FF 80 7F FF 00 00 FF FF' + 'FF 00 7F FF 00 00 FF FF FE 00 0F FF 00 00 FF FF' + 'FC 00 07 FF 00 00 FF FF F8 00 07 FF 00 00 FF FF' + 'F0 00 07 FF 00 00 FF FF E0 00 84 FF 00 00 F0 00' + '00 00 04 7F 00 00 C0 00 00 00 00 7F 00 00 80 00' + '00 00 00 7F 00 00 80 00 00 00 00 0F 00 00 00 00' + '00 00 00 07 00 00 00 00 00 00 00 07 00 00 00 00' + '00 00 00 07 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 80 00 00 00 00 00 00 00 80 00' + '00 00 00 01 00 00 80 00 00 00 00 03 00 00 80 00' + '00 00 00 07 00 00 80 00 00 00 00 0F 00 00 80 00' + '00 00 00 1F 00 00 C0 00 00 00 00 3F 00 00 C0 00' + '00 00 00 7F 00 00 C0 00 00 00 00 FF 00 00 C0 00' + '00 00 03 FF 00 00 C0 00 00 00 07 FF 00 00 C0 00' + '00 00 07 FF 00 00 E0 00 00 00 07 FF 00 00 E0 00' + '00 00 07 FF 00 00 E0 00 00 00 07 FF 00 00 E0 00' + '00 00 07 FF 00 00 E0 00 00 00 07 FF 00 00 F0 00' + '00 00 07 FF 00 00 F0 00 00 00 0F FF 00 00 F0 00' + '00 00 0F FF 00 00 F0 00 00 00 1F FF 00 00 F8 00' + '00 00 3F FF 00 00 FE 00 00 00 7F FF 00 00 FF FF' + 'FF FF FF FF 00 00 28 00 00 00 20 00 00 00 40 00' + '00 00 01 00 20 00 00 00 00 00 00 10 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 0C 00 00 00 3C 80 80 80 FF 80 80 80 FF 00 00' + '00 B4 00 00 00 84 00 80 80 FF 00 80 80 FF 00 00' + '00 90 00 00 00 30 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 0C 00 00' + '00 3C 80 80 80 FF 00 00 00 FF 80 80 80 FF 80 80' + '80 FF 00 00 00 B4 00 FF FF FF 00 80 80 FF 00 00' + '00 90 00 00 00 30 00 00 00 0C 00 00 00 18 00 00' + '00 0C 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 0C 00 00 00 3C 80 80' + '80 FF 00 00 00 FF 00 00 00 FF 80 80 80 FF 00 00' + '00 FF C0 C0 C0 FF 00 FF FF FF 00 FF FF FF 00 00' + '00 90 00 00 00 30 00 00 00 24 00 00 00 54 00 00' + '00 3C 00 00 00 0C 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 0C 00 00 00 3C 80 80 80 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 80 80 80 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 FF FF FF 00 00' + '00 9C 00 00 00 48 00 80 80 FF 00 00 00 84 00 00' + '00 78 00 00 00 24 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 0C 00 00 00 3C 80 80 80 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 80 80 80 FF 00 00 00 FF 80 80' + '80 FF 00 00 00 FF 00 00 00 FF 80 80 80 FF 00 00' + '00 B4 00 00 00 84 00 80 80 FF 00 80 80 FF 00 00' + '00 90 00 00 00 30 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 0C 00 00' + '00 3C 80 80 80 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 80 80 80 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 80 80 80 FF 00 00 00 FF 00 00 00 FF 80 80' + '80 FF 00 00 00 B4 00 FF FF FF 00 80 80 FF 00 00' + '00 90 00 00 00 30 00 00 00 0C 00 00 00 18 00 00' + '00 0C 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 0C 00 00 00 3C 80 80' + '80 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 80 80' + '80 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 80 80 80 FF 00 00 00 FF 00 00' + '00 FF C0 C0 C0 FF 00 FF FF FF 00 FF FF FF 00 00' + '00 90 00 00 00 30 00 00 00 24 00 00 00 54 00 00' + '00 3C 00 00 00 0C 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 24 80 80 80 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 80 80 80 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 80 80 80 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 FF FF FF 00 00' + '00 9C 00 00 00 48 00 80 80 FF 00 00 00 84 00 00' + '00 78 00 00 00 24 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 80 80 80 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 80 80 80 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 80 80 80 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 80 80' + '80 FF 00 00 00 FF 00 00 00 FF 80 80 80 FF 00 00' + '00 B4 00 00 00 84 00 80 80 FF 00 80 80 FF 00 00' + '00 90 00 00 00 30 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 80 80 80 FF 00 00 00 FF 00 00' + '00 FF 80 80 80 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 80 80 80 FF 00 00 00 FF 80 80' + '80 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 80 80 80 FF 00 00 00 FF 00 00 00 FF 80 80' + '80 FF 00 00 00 B4 00 FF FF FF 00 80 80 FF 00 00' + '00 90 00 00 00 30 00 00 00 0C 00 00 00 18 00 00' + '00 0C 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 0C 00 00 00 24 80 80 80 FF 00 00 00 FF 80 80' + '80 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 80 80 80 FF 00 00 00 FF 80 80 80 FF 00 00' + '00 FF 80 80 80 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 80 80 80 FF 00 00 00 FF 00 00' + '00 FF C0 C0 C0 FF 00 FF FF FF 00 FF FF FF 00 00' + '00 90 00 00 00 30 00 00 00 24 00 00 00 54 00 00' + '00 3C 00 00 00 0C 00 00 00 00 00 00 00 00 00 00' + '00 24 00 00 00 6C 80 80 80 FF 80 80 80 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 80 80' + '80 FF 00 00 00 FF 80 80 80 FF 00 00 00 FF 80 80' + '80 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 80 80 80 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 FF FF FF 00 00' + '00 9C 00 00 00 48 00 80 80 FF 00 00 00 84 00 00' + '00 78 00 00 00 24 00 00 00 00 00 00 00 00 00 80' + '80 FF 00 80 80 FF 00 00 00 FF C0 C0 C0 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 80 80 80 FF 00 00 00 FF 80 80 80 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 80 80' + '80 FF 00 00 00 FF 00 00 00 FF 80 80 80 FF 00 00' + '00 B4 00 00 00 84 00 80 80 FF 00 80 80 FF 00 00' + '00 90 00 00 00 30 00 00 00 00 00 00 00 00 00 80' + '80 FF 00 80 80 FF 00 00 00 FF 00 00 00 FF C0 C0' + 'C0 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 80 80 80 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 80 80 80 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 80 80 80 FF 00 00 00 FF 00 00 00 FF 80 80' + '80 FF 00 00 00 B4 00 FF FF FF 00 80 80 FF 00 00' + '00 90 00 00 00 30 00 00 00 0C 00 00 00 18 00 FF' + 'FF FF 00 FF FF FF 00 FF FF FF 00 FF FF FF 00 00' + '00 48 C0 C0 C0 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 80 80' + '80 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 80 80 80 FF 00 00 00 FF 00 00' + '00 FF C0 C0 C0 FF 00 FF FF FF 00 FF FF FF 00 00' + '00 90 00 00 00 30 00 00 00 24 00 00 00 54 00 00' + '00 00 00 FF FF FF 00 FF FF FF 00 00 00 24 00 00' + '00 30 00 00 00 6C C0 C0 C0 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 80 80 80 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 80 80 80 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 80 80 80 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 FF FF FF 00 00' + '00 9C 00 00 00 48 00 80 80 FF 00 00 00 84 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80' + '80 FF 00 80 80 FF 00 00 00 FF C0 C0 C0 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 80 80 80 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 80 80 80 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 80 80' + '80 FF 00 00 00 FF 00 00 00 FF 80 80 80 FF 00 00' + '00 B4 00 00 00 84 00 80 80 FF 00 80 80 FF 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80' + '80 FF 00 80 80 FF 00 00 00 FF 00 00 00 FF C0 C0' + 'C0 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 80 80 80 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 80 80 80 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 80 80 80 FF 00 00 00 FF 00 00 00 FF 80 80' + '80 FF 00 00 00 B4 00 FF FF FF 00 80 80 FF 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF' + 'FF FF 00 FF FF FF 00 FF FF FF 00 FF FF FF 00 00' + '00 48 C0 C0 C0 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 80 80' + '80 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 80 80' + '80 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 80 80 80 FF 00 00 00 FF 00 00' + '00 FF C0 C0 C0 FF 00 FF FF FF 00 FF FF FF 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 FF FF FF 00 FF FF FF 00 00 00 24 00 00' + '00 30 00 00 00 6C C0 C0 C0 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 80 80 80 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 80 80 80 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 FF FF FF 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80' + '80 FF 00 80 80 FF 00 00 00 FF C0 C0 C0 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 80 80 80 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 80 80' + '80 FF 00 00 00 FF 00 00 00 FF 80 80 80 FF 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80' + '80 FF 00 80 80 FF 00 00 00 FF 00 00 00 FF C0 C0' + 'C0 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 80 80 80 FF 00 00 00 FF 80 80 80 FF 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF' + 'FF FF 00 FF FF FF 00 FF FF FF 00 FF FF FF 00 00' + '00 48 C0 C0 C0 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 80 80' + '80 FF 00 00 00 FF 80 80 80 FF 00 00 00 FF 80 80' + '80 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 80 80 80 FF C0 C0 C0 FF 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 FF FF FF 00 FF FF FF 00 00 00 24 00 00' + '00 30 00 00 00 6C C0 C0 C0 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 80 80' + '80 FF 80 80 80 FF 00 00 00 FF 80 80 80 FF 80 80' + '80 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF C0 C0 C0 FF 00 00 00 3C 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80' + '80 FF 00 80 80 FF 00 00 00 FF C0 C0 C0 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 80 80' + '80 FF 00 00 00 FF 80 80 80 FF 00 00 00 FF 80 80' + '80 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF C0 C0 C0 FF 00 00 00 3C 00 00 00 0C 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80' + '80 FF 00 80 80 FF 00 00 00 FF 00 00 00 FF C0 C0' + 'C0 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 80 80 80 FF 80 80 80 FF 80 80 80 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF C0 C0' + 'C0 FF 00 00 00 3C 00 00 00 0C 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF' + 'FF FF 00 FF FF FF 00 FF FF FF 00 FF FF FF 00 00' + '00 48 C0 C0 C0 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF C0 C0 C0 FF 00 00' + '00 3C 00 00 00 0C 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 FF FF FF 00 FF FF FF 00 00 00 24 00 00' + '00 30 00 00 00 6C C0 C0 C0 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF C0 C0 C0 FF 00 00 00 3C 00 00' + '00 0C 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80' + '80 FF 00 80 80 FF 00 00 00 FF C0 C0 C0 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF C0 C0 C0 FF 00 00 00 3C 00 00 00 0C 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80' + '80 FF 00 80 80 FF 00 00 00 FF 00 00 00 FF C0 C0' + 'C0 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF C0 C0' + 'C0 FF 00 00 00 3C 00 00 00 0C 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF' + 'FF FF 00 FF FF FF 00 FF FF FF 00 FF FF FF 00 00' + '00 3C C0 C0 C0 FF 00 00 00 FF C0 C0 C0 FF 00 00' + '00 3C 00 00 00 0C 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 FF FF FF 00 FF FF FF 00 00 00 24 00 00' + '00 0C 00 00 00 00 C0 C0 C0 FF 00 00 00 18 00 00' + '00 0C 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF 00' + '3F FF FE 00 07 FF FC 00 03 FF F8 00 03 FF F0 00' + '03 FF E0 00 00 7F C0 00 00 3F C0 00 00 3F C0 00' + '00 3F C0 00 00 07 00 00 00 03 00 00 00 03 00 00' + '00 03 00 00 00 00 00 00 00 00 80 00 00 00 F0 00' + '00 00 F0 00 00 00 F0 00 00 00 F8 00 00 00 FF 00' + '00 00 FF 00 00 00 FF 00 00 00 FF 80 00 00 FF F0' + '00 00 FF F0 00 01 FF F0 00 03 FF F8 00 07 FF FF' + '00 0F FF FF 00 1F FF FF 00 3F FF FF 84 7F' +} */ + + + +/* BINRES mycomputer.ico */ +15 ICON mycomputer.ico +/* { + '00 00 01 00 09 00 20 20 00 00 01 00 08 00 A8 08' + '00 00 96 00 00 00 10 10 00 00 01 00 08 00 68 05' + '00 00 3E 09 00 00 20 20 00 00 01 00 04 00 E8 02' + '00 00 A6 0E 00 00 10 10 00 00 01 00 04 00 28 01' + '00 00 8E 11 00 00 30 30 00 00 01 00 08 00 A8 0E' + '00 00 B6 12 00 00 30 30 00 00 01 00 04 00 68 06' + '00 00 5E 21 00 00 30 30 00 00 01 00 20 00 A8 25' + '00 00 C6 27 00 00 20 20 00 00 01 00 20 00 A8 10' + '00 00 6E 4D 00 00 10 10 00 00 01 00 20 00 68 04' + '00 00 16 5E 00 00 28 00 00 00 20 00 00 00 40 00' + '00 00 01 00 08 00 00 00 00 00 00 04 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 01 00 00 00 02 00 00 00 03 00 00 00 00 00' + '05 00 11 11 11 00 22 22 22 00 33 33 33 00 44 44' + '44 00 55 55 55 00 66 66 66 00 6F 6D 70 00 77 77' + '77 00 7F 7F 7F 00 99 33 00 00 CC 33 00 00 99 66' + '33 00 CC 66 00 00 CC 66 33 00 D0 60 38 00 CC 99' + '33 00 CC 99 66 00 FF 99 66 00 FF CC 66 00 88 88' + '88 00 99 99 99 00 AA AA AA 00 BB BB BB 00 CC 99' + '99 00 CC CC CC 00 DD DD DD 00 FF CC CC 00 EE EE' + 'EE 00 FF FF FF 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 C0 17 95 00 00 00 38 00 A8 44' + 'F9 77 15 00 00 00 78 0A 38 00 00 00 38 00 B0 6C' + '38 00 98 17 95 00 00 00 00 00 E0 19 95 00 F0 88' + 'FA 77 70 38 F5 77 FF FF FF FF A8 44 F9 77 70 7D' + 'F5 77 3A 8A F5 77 96 00 00 00 96 00 00 00 09 00' + '00 00 B0 18 95 00 00 00 00 00 CB 44 F9 77 38 9F' + '07 00 CD 8B F5 77 78 13 05 00 37 90 F5 77 00 00' + '00 00 3E 8A F5 77 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 10 00' + '00 00 00 00 00 00 5E 00 60 00 00 EC FD 7F 1A 02' + '00 00 4C 16 95 00 40 9F 07 00 FC 15 95 00 FF FF' + 'FF FF B4 1A 95 00 45 00 00 00 28 02 00 00 FF FF' + 'FF FF E2 D8 F5 77 7D 9B F5 77 94 B6 01 00 00 00' + '05 00 F4 17 95 00 80 00 10 C0 B4 1A 95 00 F0 88' + 'FA 77 88 1C F5 77 FF FF FF FF 37 90 F5 77 00 00' + '00 00 3E 8A F5 77 9B B2 E7 77 B7 00 00 00 02 00' + '00 00 A4 1A 95 00 01 00 00 00 18 00 00 00 00 00' + '00 00 10 19 95 00 42 00 00 00 00 00 00 00 F4 18' + '95 00 00 00 00 00 00 00 00 00 00 00 00 00 0C 00' + '00 00 02 00 00 00 01 01 F5 77 00 EC FD 7F 5E 00' + '00 00 00 00 00 00 03 00 00 00 66 00 1A 02 40 9F' + '07 00 00 00 00 00 40 9F 07 00 05 00 00 00 BE B3' + 'E7 77 4C 19 95 00 A3 B4 E7 77 F8 00 00 00 00 00' + '00 C0 00 00 00 00 00 00 00 00 02 00 00 00 80 00' + '00 00 00 00 00 00 8C 1A 95 00 7F E9 4B 00 C0 CE' + '0B 01 00 00 00 C0 00 00 00 00 80 1A 95 00 02 00' + '00 00 80 00 00 00 00 00 00 00 C0 27 95 00 C4 F5' + 'AF 00 02 00 00 00 44 3A 5C 6F 73 65 78 70 65 72' + '74 73 5C 72 65 61 63 74 6F 73 5C 6C 69 62 5C 73' + '68 65 6C 6C 33 32 5C 6D 79 63 6F 6D 70 75 74 65' + '72 2E 69 63 6F 00 14 1A 95 00 1F 3B D4 77 15 00' + '00 00 A8 00 00 00 4F 3B D4 77 E0 19 95 00 33 3B' + 'D4 77 64 C5 F5 77 A9 F1 E7 77 F8 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 1A 95 00 B0 6C' + '38 00 96 00 00 00 00 00 00 00 C9 F1 E7 77 96 00' + '00 00 A4 1A 95 00 09 00 00 00 00 00 00 00 96 00' + '00 00 96 00 00 00 09 00 00 00 F4 19 95 00 33 3B' + 'D4 77 B4 1A 95 00 09 48 E9 77 B8 10 E9 77 FF FF' + 'FF FF C9 F1 E7 77 16 EA 4B 00 F8 00 00 00 B0 6C' + '38 00 96 00 00 00 58 1A 95 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 22 22 22 22 22 01 01 01 02 02' + '02 03 04 03 22 22 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 22 0B 1B 1A 1A 1A 1A 19 19 19' + '19 18 0D 18 07 22 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 22 05 1E 21 20 1E 1E 1D 1D 1D 1B' + '1B 1B 19 1A 0D 22 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 22 06 20 21 20 20 20 20 1E 1E 1D' + '1D 1D 1A 1A 18 04 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 05 1D 21 21 21 20 20 20 1E 1E' + '1D 1D 1A 1B 0D 22 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 22 19 21 21 21 21 20 1E 1E 1E' + '1E 1D 1B 1D 09 22 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 22 06 1E 21 21 21 20 1A 1B 20' + '1E 1E 1D 19 05 22 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 22 08 20 21 21 21 1E 1E 20' + '20 20 1A 06 22 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 22 07 1B 21 21 21 21 21' + '1E 18 06 22 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 22 03 07 0A 1A 18 09' + '06 22 22 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 22 22 22 22 22 22 22 22 22 22 04 0C 08 22' + '22 22 22 22 22 22 22 22 22 22 00 00 00 00 00 00' + '00 22 06 19 1A 1A 1A 1A 1A 1A 1A 1A 1A 1D 1B 1A' + '19 19 19 19 19 19 19 19 0C 05 22 00 00 00 00 00' + '22 04 1B 21 21 21 21 21 21 21 20 20 20 1E 1E 1E' + '1E 1E 1E 1E 1E 1E 1D 1D 1E 0D 22 00 00 00 00 00' + '22 06 20 21 20 1E 1E 1E 1E 1E 1E 1E 1E 1E 1E 1E' + '1E 1E 1D 1D 1D 1D 1D 1D 1D 1A 04 00 00 00 00 00' + '22 06 20 21 1C 12 12 14 14 15 15 15 15 15 15 15' + '15 15 14 13 12 12 12 1B 1D 1A 04 00 00 00 00 00' + '22 06 20 21 1C 11 12 12 13 14 14 14 14 14 14 14' + '14 13 12 12 12 12 12 1B 1E 1A 04 00 00 00 00 00' + '22 06 20 21 1C 11 12 12 12 13 13 14 14 14 14 13' + '13 12 12 12 12 11 11 1B 1E 1A 04 00 00 00 00 00' + '22 06 20 21 1C 0F 12 12 12 12 12 12 12 12 12 12' + '12 12 12 12 12 11 11 1B 1E 1A 04 00 00 00 00 00' + '22 06 20 21 1C 0E 11 12 12 12 12 12 12 12 12 12' + '12 12 12 11 11 0E 0E 1B 1E 1A 04 00 00 00 00 00' + '22 06 20 21 15 0E 0E 11 11 12 12 12 12 12 12 12' + '12 12 11 0F 0E 0E 0E 1B 1E 1A 03 00 00 00 00 00' + '22 06 20 21 15 0E 0E 11 12 12 12 12 12 12 12 12' + '12 12 12 12 0E 0E 0E 1B 1E 1A 03 00 00 00 00 00' + '22 06 1E 21 15 0E 12 12 12 13 13 14 14 14 14 14' + '13 13 12 12 12 11 0E 1D 20 1A 02 00 00 00 00 00' + '22 06 1E 21 15 11 12 12 13 14 14 14 15 15 15 14' + '14 14 13 12 12 12 11 1B 20 1A 01 00 00 00 00 00' + '22 06 1E 21 15 12 12 13 14 14 15 15 15 15 15 15' + '15 14 14 13 12 12 12 1D 20 1A 01 00 00 00 00 00' + '22 06 1E 21 15 12 13 14 14 15 15 16 16 16 16 16' + '15 15 14 14 13 12 12 1D 21 1A 22 00 00 00 00 00' + '22 06 1E 21 15 12 14 14 15 15 16 16 16 16 16 16' + '16 15 15 14 13 12 12 1F 21 1A 22 00 00 00 00 00' + '22 06 1E 21 15 12 15 15 15 15 15 16 17 17 17 16' + '15 15 15 15 15 12 10 1F 21 1A 22 00 00 00 00 00' + '22 05 1E 21 20 1E 20 20 20 20 20 20 20 20 20 20' + '20 20 20 20 20 1E 1E 21 21 1A 22 00 00 00 00 00' + '22 22 18 21 21 21 21 21 21 21 21 21 21 21 21 21' + '21 21 21 21 21 21 21 21 20 09 22 00 00 00 00 00' + '00 22 05 09 0C 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B' + '0B 0B 0B 0B 0B 0B 0B 0B 08 02 22 00 00 00 00 00' + '00 00 22 22 22 22 22 22 22 22 22 22 22 22 22 22' + '22 22 22 22 22 22 22 22 22 22 00 00 00 00 FF FF' + 'FF FF FF 00 00 FF FF 00 00 FF FE 00 00 FF FE 00' + '00 FF FF 00 00 FF FF 00 00 FF FF 00 00 FF FF 80' + '01 FF FF C0 03 FF FF E0 07 FF F0 00 00 0F E0 00' + '00 07 C0 00 00 07 C0 00 00 07 C0 00 00 07 C0 00' + '00 07 C0 00 00 07 C0 00 00 07 C0 00 00 07 C0 00' + '00 07 C0 00 00 07 C0 00 00 07 C0 00 00 07 C0 00' + '00 07 C0 00 00 07 C0 00 00 07 C0 00 00 07 C0 00' + '00 07 C0 00 00 07 E0 00 00 07 F0 00 00 0F 28 00' + '00 00 10 00 00 00 20 00 00 00 01 00 08 00 00 00' + '00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 01 00 00 00 02 00' + '00 00 03 00 00 00 00 00 05 00 08 00 00 00 11 11' + '11 00 22 22 22 00 33 33 33 00 44 44 44 00 55 55' + '55 00 66 66 66 00 6F 6D 70 00 77 77 77 00 7F 7F' + '7F 00 99 33 00 00 CC 66 00 00 CC 66 33 00 D0 60' + '38 00 CC 66 66 00 CC 99 33 00 CC 99 66 00 FF 99' + '66 00 FF CC 66 00 88 88 88 00 99 99 99 00 AA AA' + 'AA 00 BB BB BB 00 CC 99 99 00 CC CC 99 00 FF CC' + '99 00 CC CC CC 00 DD DD DD 00 EE EE EE 00 FF FF' + 'FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 C0 17' + '95 00 00 00 38 00 A8 44 F9 77 15 00 00 00 78 0A' + '38 00 00 00 38 00 B0 6C 38 00 98 17 95 00 00 00' + '00 00 E0 19 95 00 F0 88 FA 77 70 38 F5 77 FF FF' + 'FF FF A8 44 F9 77 70 7D F5 77 3A 8A F5 77 96 00' + '00 00 96 00 00 00 09 00 00 00 B0 18 95 00 00 00' + '00 00 CB 44 F9 77 38 9F 07 00 CD 8B F5 77 78 13' + '05 00 37 90 F5 77 00 00 00 00 3E 8A F5 77 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 10 00 00 00 00 00 00 00 5E 00' + '60 00 00 EC FD 7F 1A 02 00 00 4C 16 95 00 40 9F' + '07 00 FC 15 95 00 FF FF FF FF B4 1A 95 00 45 00' + '00 00 28 02 00 00 FF FF FF FF E2 D8 F5 77 7D 9B' + 'F5 77 94 B6 01 00 00 00 05 00 F4 17 95 00 80 00' + '10 C0 B4 1A 95 00 F0 88 FA 77 88 1C F5 77 FF FF' + 'FF FF 37 90 F5 77 00 00 00 00 3E 8A F5 77 9B B2' + 'E7 77 B7 00 00 00 02 00 00 00 A4 1A 95 00 01 00' + '00 00 18 00 00 00 00 00 00 00 10 19 95 00 42 00' + '00 00 00 00 00 00 F4 18 95 00 00 00 00 00 00 00' + '00 00 00 00 00 00 0C 00 00 00 02 00 00 00 01 01' + 'F5 77 00 EC FD 7F 5E 00 00 00 00 00 00 00 03 00' + '00 00 66 00 1A 02 40 9F 07 00 00 00 00 00 40 9F' + '07 00 05 00 00 00 BE B3 E7 77 4C 19 95 00 A3 B4' + 'E7 77 F8 00 00 00 00 00 00 C0 00 00 00 00 00 00' + '00 00 02 00 00 00 80 00 00 00 00 00 00 00 8C 1A' + '95 00 7F E9 4B 00 C0 CE 0B 01 00 00 00 C0 00 00' + '00 00 80 1A 95 00 02 00 00 00 80 00 00 00 00 00' + '00 00 C0 27 95 00 C4 F5 AF 00 02 00 00 00 44 3A' + '5C 6F 73 65 78 70 65 72 74 73 5C 72 65 61 63 74' + '6F 73 5C 6C 69 62 5C 73 68 65 6C 6C 33 32 5C 6D' + '79 63 6F 6D 70 75 74 65 72 2E 69 63 6F 00 14 1A' + '95 00 1F 3B D4 77 15 00 00 00 A8 00 00 00 4F 3B' + 'D4 77 E0 19 95 00 33 3B D4 77 64 C5 F5 77 A9 F1' + 'E7 77 F8 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 1A 95 00 B0 6C 38 00 96 00 00 00 00 00' + '00 00 C9 F1 E7 77 96 00 00 00 A4 1A 95 00 09 00' + '00 00 00 00 00 00 96 00 00 00 96 00 00 00 09 00' + '00 00 F4 19 95 00 33 3B D4 77 B4 1A 95 00 09 48' + 'E9 77 B8 10 E9 77 FF FF FF FF C9 F1 E7 77 16 EA' + '4B 00 F8 00 00 00 B0 6C 38 00 96 00 00 00 58 1A' + '95 00 00 00 00 00 00 00 00 00 01 05 05 05 05 05' + '05 01 00 00 00 00 00 00 00 00 0A 1F 1B 1A 1A 19' + '18 08 00 00 00 00 00 00 00 00 0D 22 21 21 20 1F' + '1B 09 00 00 00 00 00 00 00 00 08 21 22 20 20 21' + '1B 07 00 00 00 00 00 00 00 00 00 0A 20 21 21 1B' + '08 00 00 00 00 00 00 00 02 04 04 23 06 0D 0B 06' + '23 05 05 02 00 00 00 03 19 1F 1F 1F 1B 1F 1B 1B' + '1B 1B 1B 0C 23 00 00 06 21 1E 1E 1E 1E 1E 1E 1D' + '1C 15 1D 1B 05 00 00 07 21 15 10 11 12 14 14 11' + '11 10 15 1B 05 00 00 07 21 15 10 11 11 11 11 11' + '11 0F 15 1B 05 00 00 06 21 11 0F 11 11 11 11 11' + '11 0F 15 1B 05 00 00 06 21 13 11 12 14 14 14 14' + '11 10 15 1B 05 00 00 06 20 15 11 14 15 16 15 15' + '14 11 15 1F 05 00 00 06 20 15 14 15 16 17 17 16' + '15 11 1C 1F 04 00 00 05 1F 22 21 21 21 21 21 21' + '21 21 22 1A 23 00 00 00 07 09 09 09 09 09 09 09' + '09 09 09 06 00 00 F0 0F 00 00 F0 0F 00 00 F0 0F' + '00 00 F0 0F 00 00 F8 1F 00 00 C0 03 00 00 80 01' + '00 00 80 01 00 00 80 01 00 00 80 01 00 00 80 01' + '00 00 80 01 00 00 80 01 00 00 80 01 00 00 80 01' + '00 00 C0 03 00 00 28 00 00 00 20 00 00 00 40 00' + '00 00 01 00 04 00 00 00 00 00 00 02 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 80 00 00 00 00 80 00 00 80 80 00 00 00 00' + '80 00 80 00 80 00 00 80 80 00 C0 C0 C0 00 80 80' + '80 00 FF 00 00 00 00 FF 00 00 FF FF 00 00 00 00' + 'FF 00 FF 00 FF 00 00 FF FF 00 FF FF FF 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 08 77 77 78 88 88 88 80 00 00 00 00 00 00' + '00 00 07 FF 77 77 77 77 87 80 00 00 00 00 00 00' + '00 00 0F FF FF FF 77 77 77 80 00 00 00 00 00 00' + '00 00 07 FF FF FF 77 77 77 80 00 00 00 00 00 00' + '00 00 08 FF FF FF 77 77 77 80 00 00 00 00 00 00' + '00 00 00 FF FF F7 7F F7 78 00 00 00 00 00 00 00' + '00 00 00 8F FF F7 7F FF 70 00 00 00 00 00 00 00' + '00 00 00 00 7F FF FF 78 00 00 00 00 00 00 00 00' + '00 00 00 00 00 87 88 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 08 80 00 00 00 00 00 00 00 00 00' + '08 77 77 77 77 77 77 88 88 88 88 80 00 00 00 00' + '7F FF FF FF FF FF 7F 77 77 77 77 78 00 00 00 00' + 'FF FF 77 77 77 77 77 77 77 77 77 77 00 00 00 00' + 'FF 73 33 88 87 77 77 88 83 33 37 77 00 00 00 00' + 'FF 73 33 33 88 88 88 83 33 33 37 77 00 00 00 00' + 'FF 73 33 33 33 88 33 33 33 33 37 77 00 00 00 00' + 'FF 73 33 33 33 33 33 33 33 33 37 77 00 00 00 00' + 'FF 83 33 33 33 33 33 33 33 33 37 77 00 00 00 00' + 'FF 83 33 33 33 33 33 33 33 33 37 77 00 00 00 00' + 'FF 83 33 33 33 33 33 33 33 33 37 F7 00 00 00 00' + 'FF 83 33 33 33 38 33 33 33 33 37 F7 00 00 00 00' + 'FF 83 33 33 88 88 88 83 33 33 37 F7 00 00 00 00' + '7F 83 33 88 88 87 88 88 83 33 37 F7 00 00 00 00' + '7F 83 38 88 77 77 77 78 88 33 37 F7 00 00 00 00' + '7F 83 38 88 77 77 77 78 88 33 37 F7 00 00 00 00' + '7F 83 88 87 77 77 77 77 88 83 37 F7 00 00 00 00' + '7F FF FF FF FF FF FF FF FF FF 7F F7 00 00 00 00' + '8F FF FF FF FF FF FF FF FF FF FF F8 00 00 00 00' + '08 88 88 88 88 88 88 88 88 88 88 80 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF 00' + '00 FF FE 00 00 7F FE 00 00 7F FE 00 00 7F FE 00' + '00 7F FE 00 00 7F FE 00 00 7F FF 00 00 FF FF 00' + '00 FF FF 80 01 FF F0 00 00 0F E0 00 00 07 C0 00' + '00 03 C0 00 00 03 C0 00 00 03 C0 00 00 03 C0 00' + '00 03 C0 00 00 03 C0 00 00 03 C0 00 00 03 C0 00' + '00 03 C0 00 00 03 C0 00 00 03 C0 00 00 03 C0 00' + '00 03 C0 00 00 03 C0 00 00 03 C0 00 00 03 C0 00' + '00 03 C0 00 00 03 C0 00 00 03 E0 00 00 07 28 00' + '00 00 10 00 00 00 20 00 00 00 01 00 04 00 00 00' + '00 00 80 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 80 00 00 00 00 80' + '00 00 80 80 00 00 00 00 80 00 80 00 80 00 00 80' + '80 00 C0 C0 C0 00 80 80 80 00 FF 00 00 00 00 FF' + '00 00 FF FF 00 00 00 00 FF 00 FF 00 FF 00 00 FF' + 'FF 00 FF FF FF 00 00 00 00 00 00 00 00 00 00 00' + '87 77 78 80 00 00 00 00 8F FF 77 78 00 00 00 00' + '0F FF 7F 70 00 00 00 00 08 FF F7 80 00 00 00 00' + '00 08 80 00 00 00 00 87 77 77 77 77 78 00 00 F7' + '77 77 77 78 77 00 00 F8 33 88 83 33 87 00 00 F8' + '33 33 33 33 87 00 00 F3 33 33 33 33 87 00 00 F3' + '38 88 88 33 87 00 00 F8 38 88 88 83 87 00 00 F8' + '88 77 78 83 77 00 00 7F FF FF FF FF F7 00 00 08' + '88 88 88 88 80 00 E0 0F 00 00 E0 07 00 00 E0 07' + '00 00 E0 07 00 00 F0 0F 00 00 80 01 00 00 80 01' + '00 00 80 01 00 00 80 01 00 00 80 01 00 00 80 01' + '00 00 80 01 00 00 80 01 00 00 80 01 00 00 80 01' + '00 00 80 01 00 00 28 00 00 00 30 00 00 00 60 00' + '00 00 01 00 08 00 00 00 00 00 00 09 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 01 00 00 00 02 00 00 00 03 00 00 00 00 00' + '05 00 08 00 00 00 11 11 11 00 22 22 22 00 33 33' + '33 00 44 44 44 00 55 55 55 00 6D 65 5C 00 69 6E' + '65 00 6F 6D 70 00 77 77 77 00 7F 7F 7F 00 99 33' + '00 00 CC 33 00 00 99 66 33 00 98 69 38 00 CC 66' + '00 00 CC 66 33 00 D0 60 38 00 CC 99 33 00 CC 99' + '66 00 FF 99 66 00 FF CC 66 00 88 88 88 00 99 99' + '99 00 AA AA AA 00 BB BB BB 00 CC 99 99 00 FF CC' + '99 00 CC CC CC 00 DD DD DD 00 EE EE EE 00 FF FF' + 'FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 C0 17 95 00 00 00 38 00 A8 44' + 'F9 77 15 00 00 00 78 0A 38 00 00 00 38 00 B0 6C' + '38 00 98 17 95 00 00 00 00 00 E0 19 95 00 F0 88' + 'FA 77 70 38 F5 77 FF FF FF FF A8 44 F9 77 70 7D' + 'F5 77 3A 8A F5 77 96 00 00 00 96 00 00 00 09 00' + '00 00 B0 18 95 00 00 00 00 00 CB 44 F9 77 38 9F' + '07 00 CD 8B F5 77 78 13 05 00 37 90 F5 77 00 00' + '00 00 3E 8A F5 77 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 10 00' + '00 00 00 00 00 00 5E 00 60 00 00 EC FD 7F 1A 02' + '00 00 4C 16 95 00 40 9F 07 00 FC 15 95 00 FF FF' + 'FF FF B4 1A 95 00 45 00 00 00 28 02 00 00 FF FF' + 'FF FF E2 D8 F5 77 7D 9B F5 77 94 B6 01 00 00 00' + '05 00 F4 17 95 00 80 00 10 C0 B4 1A 95 00 F0 88' + 'FA 77 88 1C F5 77 FF FF FF FF 37 90 F5 77 00 00' + '00 00 3E 8A F5 77 9B B2 E7 77 B7 00 00 00 02 00' + '00 00 A4 1A 95 00 01 00 00 00 18 00 00 00 00 00' + '00 00 10 19 95 00 42 00 00 00 00 00 00 00 F4 18' + '95 00 00 00 00 00 00 00 00 00 00 00 00 00 0C 00' + '00 00 02 00 00 00 01 01 F5 77 00 EC FD 7F 5E 00' + '00 00 00 00 00 00 03 00 00 00 66 00 1A 02 40 9F' + '07 00 00 00 00 00 40 9F 07 00 05 00 00 00 BE B3' + 'E7 77 4C 19 95 00 A3 B4 E7 77 F8 00 00 00 00 00' + '00 C0 00 00 00 00 00 00 00 00 02 00 00 00 80 00' + '00 00 00 00 00 00 8C 1A 95 00 7F E9 4B 00 C0 CE' + '0B 01 00 00 00 C0 00 00 00 00 80 1A 95 00 02 00' + '00 00 80 00 00 00 00 00 00 00 C0 27 95 00 C4 F5' + 'AF 00 02 00 00 00 44 3A 5C 6F 73 65 78 70 65 72' + '74 73 5C 72 65 61 63 74 6F 73 5C 6C 69 62 5C 73' + '68 65 6C 6C 33 32 5C 6D 79 63 6F 6D 70 75 74 65' + '72 2E 69 63 6F 00 14 1A 95 00 1F 3B D4 77 15 00' + '00 00 A8 00 00 00 4F 3B D4 77 E0 19 95 00 33 3B' + 'D4 77 64 C5 F5 77 A9 F1 E7 77 F8 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 1A 95 00 B0 6C' + '38 00 96 00 00 00 00 00 00 00 C9 F1 E7 77 96 00' + '00 00 A4 1A 95 00 09 00 00 00 00 00 00 00 96 00' + '00 00 96 00 00 00 09 00 00 00 F4 19 95 00 33 3B' + 'D4 77 B4 1A 95 00 09 48 E9 77 B8 10 E9 77 FF FF' + 'FF FF C9 F1 E7 77 16 EA 4B 00 F8 00 00 00 B0 6C' + '38 00 96 00 00 00 58 1A 95 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 25 25 25 25 25' + '25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25' + '25 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 25 25 25 25 25 25' + '25 25 25 25 01 01 01 01 01 02 02 03 04 04 03 25' + '25 25 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 25 25 07 1C 1E 1E 1D' + '1D 1D 1D 1D 1D 1D 1D 1C 1C 1C 1C 1B 1B 1B 1B 0A' + '03 25 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 25 25 0A 24 24 23 23' + '22 22 22 22 21 21 21 21 1E 1E 1E 1D 1C 1C 1C 1D' + '07 25 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 25 25 0F 24 24 23 23' + '22 22 22 22 21 21 21 21 1E 1E 1E 1E 1D 1C 1C 1D' + '09 25 25 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 25 25 1C 24 24 24 23' + '23 23 23 23 23 22 22 22 21 21 21 1E 1D 1D 1D 1E' + '09 25 25 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 25 25 1B 24 24 24 24' + '24 24 24 24 24 23 23 22 22 22 21 21 1E 1D 1D 1E' + '09 25 25 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 25 25 0B 24 24 24 23' + '23 23 22 22 22 22 22 21 21 21 1E 1E 1D 1D 1E 1E' + '07 25 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 25 08 23 24 24 24' + '24 24 24 23 23 23 23 22 22 22 22 21 1E 1E 1E 1C' + '06 25 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 25 04 1C 24 24 24' + '24 24 24 24 22 1E 21 22 23 22 22 21 21 1E 1E 09' + '25 25 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 25 25 06 21 24 24' + '24 24 24 24 1D 1C 1C 21 23 22 22 21 21 22 1B 25' + '25 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 25 25 09 21 24' + '24 24 24 24 23 22 22 23 23 23 22 22 22 0E 06 25' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 25 25 08 1E' + '24 24 24 24 24 24 24 24 23 23 23 21 0E 05 25 25' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 25 25 05' + '0A 21 24 24 24 24 24 24 24 22 1C 08 25 25 25 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 25 25' + '25 06 09 0C 1B 1D 1D 0F 0A 08 04 25 25 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 25 25 25 25 25 25 25 25 25 25 25' + '25 25 25 25 04 0F 09 25 25 25 25 25 25 25 25 25' + '25 25 25 25 25 25 25 00 00 00 00 00 00 00 00 00' + '00 00 00 25 25 25 25 25 25 25 25 25 25 25 25 25' + '25 25 25 25 0A 1E 1B 07 25 25 25 25 25 25 25 25' + '25 25 25 25 25 25 25 25 25 00 00 00 00 00 00 00' + '00 00 25 25 04 0A 1D 1D 1D 1D 1D 1D 1D 1D 1D 1D' + '1D 1D 1D 1D 21 21 21 1E 1D 1D 1D 1D 1C 1C 1C 1C' + '1C 1C 1C 1C 1C 1C 08 25 25 00 00 00 00 00 00 00' + '00 00 25 25 0E 24 24 24 24 24 24 24 24 24 23 23' + '23 23 23 23 23 22 22 22 22 22 22 22 22 22 22 22' + '22 21 21 21 21 22 21 08 25 25 00 00 00 00 00 00' + '00 25 25 06 22 24 24 24 23 23 23 23 23 23 23 23' + '23 23 22 22 22 22 22 22 22 22 22 21 21 21 21 21' + '21 21 21 21 1E 1E 22 1D 25 25 00 00 00 00 00 00' + '00 25 25 08 23 24 24 23 23 23 23 23 23 23 23 23' + '23 23 23 23 23 23 22 22 22 22 22 22 22 22 22 22' + '22 22 21 22 21 1E 21 1D 04 25 00 00 00 00 00 00' + '00 25 25 09 23 24 24 21 18 18 18 1F 1F 1F 20 20' + '20 20 20 20 20 20 20 20 20 20 20 20 1F 1F 1F 18' + '18 18 18 1F 22 21 21 1D 04 25 00 00 00 00 00 00' + '00 25 25 08 23 24 24 1F 14 15 15 15 15 16 17 17' + '17 17 17 18 18 18 17 17 17 17 17 16 15 15 15 15' + '15 14 14 15 22 21 21 1D 04 25 00 00 00 00 00 00' + '00 25 25 08 23 24 24 1F 14 15 15 15 15 16 17 17' + '17 17 17 18 18 18 18 17 17 17 17 16 15 15 15 15' + '15 15 14 15 22 21 21 1D 04 25 00 00 00 00 00 00' + '00 25 25 08 23 24 24 1F 14 15 15 15 15 15 16 16' + '17 17 17 17 17 17 17 17 17 16 16 15 15 15 15 15' + '15 15 14 15 22 21 21 1D 04 25 00 00 00 00 00 00' + '00 25 25 08 23 24 24 1F 14 15 15 15 15 15 15 15' + '16 16 16 17 17 17 16 16 16 15 15 15 15 15 15 15' + '15 14 10 15 22 21 21 1D 04 25 00 00 00 00 00 00' + '00 25 25 08 23 24 24 1F 11 14 15 15 15 15 15 15' + '15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15' + '14 14 10 15 22 21 22 1D 04 25 00 00 00 00 00 00' + '00 25 25 08 23 24 24 1F 10 14 14 15 15 15 15 15' + '15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 14' + '14 10 10 15 23 21 22 1D 04 25 00 00 00 00 00 00' + '00 25 25 08 23 24 24 1F 10 11 14 14 15 15 15 15' + '15 15 15 15 15 15 15 15 15 15 15 15 15 14 14 14' + '10 10 10 15 23 21 22 1D 03 25 00 00 00 00 00 00' + '00 25 25 08 23 24 24 1F 10 10 10 14 14 14 14 15' + '15 15 15 15 15 15 15 15 15 15 15 15 14 14 14 10' + '10 10 10 15 23 21 22 1D 03 25 00 00 00 00 00 00' + '00 25 25 08 23 24 24 1F 10 10 10 10 14 14 15 15' + '15 15 15 15 15 15 15 15 15 15 15 15 15 14 14 10' + '10 10 10 15 23 22 22 1D 03 25 00 00 00 00 00 00' + '00 25 25 08 23 24 24 1F 10 10 10 10 15 15 15 15' + '15 15 15 16 16 16 16 15 15 15 15 15 15 15 15 14' + '10 10 10 15 23 22 22 1D 02 25 00 00 00 00 00 00' + '00 25 25 08 23 24 24 1F 10 10 14 15 15 15 15 15' + '16 16 16 17 17 17 17 17 16 16 16 15 15 15 15 15' + '15 10 10 15 23 22 22 1D 02 25 00 00 00 00 00 00' + '00 25 25 08 23 24 24 18 10 14 15 15 15 15 16 16' + '17 17 17 17 17 17 17 17 17 17 17 16 15 15 15 15' + '15 15 10 15 23 22 22 1D 02 25 00 00 00 00 00 00' + '00 25 25 08 23 24 24 18 10 15 15 15 16 16 17 17' + '17 17 18 18 18 18 18 18 17 17 17 17 16 16 15 15' + '15 15 15 15 23 22 22 1D 01 25 00 00 00 00 00 00' + '00 25 25 08 23 24 24 18 14 15 15 15 16 17 17 17' + '18 18 18 18 18 18 18 18 18 18 17 17 17 17 16 15' + '15 15 15 15 23 22 22 1D 01 25 00 00 00 00 00 00' + '00 25 25 08 22 24 24 18 15 15 15 16 17 17 17 18' + '18 18 18 18 19 19 18 18 18 18 18 18 17 17 17 16' + '15 15 15 15 23 22 23 1D 25 25 00 00 00 00 00 00' + '00 25 25 08 22 24 24 18 15 15 16 17 17 17 18 18' + '18 19 19 19 19 19 19 19 19 18 18 18 18 17 17 16' + '16 15 15 15 23 23 23 1D 25 25 00 00 00 00 00 00' + '00 25 25 08 22 24 24 18 14 16 16 17 17 18 18 18' + '19 19 19 19 19 19 19 19 19 19 18 18 18 17 17 17' + '16 15 15 15 23 24 24 1D 25 25 00 00 00 00 00 00' + '00 25 25 07 22 24 24 18 10 15 17 17 17 18 18 19' + '19 19 19 1A 1A 1A 1A 19 19 19 19 18 18 17 17 17' + '16 15 15 15 23 24 24 1D 25 25 00 00 00 00 00 00' + '00 25 25 07 22 24 24 1F 12 15 18 18 18 18 18 18' + '18 18 18 1A 1A 1A 1A 18 18 18 18 18 18 18 18 18' + '18 15 12 13 24 24 24 1D 25 25 00 00 00 00 00 00' + '00 25 25 07 22 24 24 23 23 23 23 23 23 23 23 23' + '23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 22' + '22 22 22 23 24 24 24 1D 25 25 00 00 00 00 00 00' + '00 25 25 06 21 24 24 24 24 24 24 24 24 24 24 24' + '24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24' + '24 24 24 24 24 24 24 0F 25 25 00 00 00 00 00 00' + '00 00 25 25 0A 22 24 24 24 24 24 24 24 24 24 24' + '24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24' + '24 24 24 24 24 24 1D 07 25 25 00 00 00 00 00 00' + '00 00 25 25 01 08 0D 0F 0F 0F 0F 0F 0F 0F 0F 0F' + '0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0E 0E 0E' + '0E 0E 0E 0E 0E 0A 06 25 25 00 00 00 00 00 00 00' + '00 00 00 25 25 25 25 25 25 25 25 25 25 25 25 25' + '25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25' + '25 25 25 25 25 25 25 25 25 00 00 00 00 00 00 00' + '00 00 00 00 00 25 25 25 25 25 25 25 25 25 25 25' + '25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25' + '25 25 25 25 25 25 25 00 00 00 00 00 00 00 FF FF' + 'FF FF FF FF 00 00 FF F8 00 00 1F FF 00 00 FF F0' + '00 00 0F FF 00 00 FF E0 00 00 0F FF 00 00 FF E0' + '00 00 0F FF 00 00 FF E0 00 00 07 FF 00 00 FF E0' + '00 00 07 FF 00 00 FF E0 00 00 07 FF 00 00 FF E0' + '00 00 0F FF 00 00 FF F0 00 00 0F FF 00 00 FF F0' + '00 00 0F FF 00 00 FF F0 00 00 1F FF 00 00 FF F8' + '00 00 3F FF 00 00 FF FC 00 00 3F FF 00 00 FF FE' + '00 00 7F FF 00 00 FF FF 00 01 FF FF 00 00 FE 00' + '00 00 00 7F 00 00 F8 00 00 00 00 1F 00 00 F0 00' + '00 00 00 1F 00 00 F0 00 00 00 00 0F 00 00 E0 00' + '00 00 00 0F 00 00 E0 00 00 00 00 0F 00 00 E0 00' + '00 00 00 0F 00 00 E0 00 00 00 00 0F 00 00 E0 00' + '00 00 00 0F 00 00 E0 00 00 00 00 0F 00 00 E0 00' + '00 00 00 0F 00 00 E0 00 00 00 00 0F 00 00 E0 00' + '00 00 00 0F 00 00 E0 00 00 00 00 0F 00 00 E0 00' + '00 00 00 0F 00 00 E0 00 00 00 00 0F 00 00 E0 00' + '00 00 00 0F 00 00 E0 00 00 00 00 0F 00 00 E0 00' + '00 00 00 0F 00 00 E0 00 00 00 00 0F 00 00 E0 00' + '00 00 00 0F 00 00 E0 00 00 00 00 0F 00 00 E0 00' + '00 00 00 0F 00 00 E0 00 00 00 00 0F 00 00 E0 00' + '00 00 00 0F 00 00 E0 00 00 00 00 0F 00 00 E0 00' + '00 00 00 0F 00 00 E0 00 00 00 00 0F 00 00 F0 00' + '00 00 00 0F 00 00 F0 00 00 00 00 1F 00 00 F8 00' + '00 00 00 1F 00 00 FE 00 00 00 00 7F 00 00 28 00' + '00 00 30 00 00 00 60 00 00 00 01 00 04 00 00 00' + '00 00 80 04 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 80 00 00 00 00 80' + '00 00 80 80 00 00 00 00 80 00 80 00 80 00 00 80' + '80 00 C0 C0 C0 00 80 80 80 00 FF 00 00 00 00 FF' + '00 00 FF FF 00 00 00 00 FF 00 FF 00 FF 00 00 FF' + 'FF 00 FF FF FF 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 87 77 77 77 77 78 88 88 88 88 00' + '00 00 00 00 00 00 00 00 00 00 00 00 08 FF FF FF' + '77 77 77 77 77 88 87 00 00 00 00 00 00 00 00 00' + '00 00 00 00 08 FF FF F7 77 77 77 77 77 78 87 00' + '00 00 00 00 00 00 00 00 00 00 00 00 08 FF FF FF' + 'FF FF 77 77 77 77 77 80 00 00 00 00 00 00 00 00' + '00 00 00 00 08 FF FF FF FF FF FF 77 77 77 77 00' + '00 00 00 00 00 00 00 00 00 00 00 00 08 FF FF FF' + 'F7 77 77 77 77 77 77 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 FF FF FF FF FF FF F7 77 77 78 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 8F FF FF' + 'FF 77 7F FF 77 77 78 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 07 FF FF FF 78 87 FF 77 77 80 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 7F FF' + 'FF F7 FF FF 77 78 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 07 FF FF FF FF FF F7 80 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 87' + 'FF FF FF FF 80 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 08 87 78 80 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 08 80 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 87 80 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 08 77 77 77 77 77 77' + '77 77 77 77 77 77 77 78 88 78 00 00 00 00 00 00' + '00 8F FF FF FF FF FF FF FF FF FF FF F7 77 77 77' + '77 77 70 00 00 00 00 00 00 7F FF FF FF FF FF FF' + 'FF F7 77 77 77 77 77 77 77 77 77 00 00 00 00 00' + '00 FF FF FF FF FF FF FF FF FF FF FF F7 77 77 77' + '77 77 77 00 00 00 00 00 00 FF F7 87 77 77 77 77' + '77 77 77 77 77 77 77 78 87 F7 77 00 00 00 00 00' + '00 FF F7 33 33 33 38 88 88 88 88 88 33 33 33 33' + '33 F7 77 00 00 00 00 00 00 FF F7 33 33 33 38 88' + '88 88 88 88 83 33 33 33 33 F7 77 00 00 00 00 00' + '00 FF F7 33 33 33 33 38 88 88 88 83 33 33 33 33' + '33 F7 77 00 00 00 00 00 00 FF F7 33 33 33 33 33' + '33 33 33 33 33 33 33 33 33 F7 77 00 00 00 00 00' + '00 FF F7 33 33 33 33 33 33 33 33 33 33 33 33 33' + '33 F7 77 00 00 00 00 00 00 FF F7 33 33 33 33 33' + '33 33 33 33 33 33 33 33 13 F7 77 00 00 00 00 00' + '00 FF F7 13 33 33 33 33 33 33 33 33 33 33 33 33' + '13 F7 77 00 00 00 00 00 00 FF F7 13 33 33 33 33' + '33 33 33 33 33 33 33 31 13 F7 77 00 00 00 00 00' + '00 FF F8 11 33 33 33 33 33 33 33 33 33 33 33 11' + '13 F7 77 00 00 00 00 00 00 FF F8 11 13 33 33 33' + '33 33 33 33 33 33 33 11 13 F7 77 00 00 00 00 00' + '00 FF F8 11 33 33 33 33 38 88 83 33 33 33 33 33' + '13 F7 F7 00 00 00 00 00 00 FF F8 13 33 33 33 88' + '88 88 88 88 83 33 33 33 33 F7 F7 00 00 00 00 00' + '00 FF F8 33 33 33 88 88 88 88 88 88 88 33 33 33' + '33 F7 F7 00 00 00 00 00 00 FF F8 33 33 38 88 88' + '88 88 88 88 88 83 33 33 33 F7 F7 00 00 00 00 00' + '00 FF F8 33 33 88 88 88 88 77 78 88 88 88 33 33' + '38 FF F7 00 00 00 00 00 00 FF F8 33 38 88 88 87' + '77 77 77 78 88 88 83 33 38 FF F7 00 00 00 00 00' + '00 FF F8 33 38 88 88 77 77 77 77 77 88 88 88 33' + '33 FF F7 00 00 00 00 00 00 FF F8 33 38 88 87 77' + '77 77 77 77 78 88 83 33 33 FF F7 00 00 00 00 00' + '00 FF F8 38 88 88 87 77 77 77 77 77 78 88 88 88' + '38 FF F7 00 00 00 00 00 00 FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF F7 00 00 00 00 00' + '00 7F FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF F8 00 00 00 00 00 00 8F FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF 70 00 00 00 00 00' + '00 00 88 88 88 88 88 88 88 88 88 88 88 88 88 88' + '88 88 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 FF FF FF FF FF FF 00 00 FF F8' + '00 00 1F FF 00 00 FF F0 00 00 0F FF 00 00 FF E0' + '00 00 0F FF 00 00 FF E0 00 00 0F FF 00 00 FF E0' + '00 00 07 FF 00 00 FF E0 00 00 07 FF 00 00 FF E0' + '00 00 07 FF 00 00 FF E0 00 00 0F FF 00 00 FF F0' + '00 00 0F FF 00 00 FF F0 00 00 0F FF 00 00 FF F0' + '00 00 1F FF 00 00 FF F8 00 00 3F FF 00 00 FF FC' + '00 00 3F FF 00 00 FF FE 00 00 7F FF 00 00 FF FF' + '00 01 FF FF 00 00 FE 00 00 00 00 7F 00 00 F8 00' + '00 00 00 1F 00 00 F0 00 00 00 00 1F 00 00 F0 00' + '00 00 00 0F 00 00 E0 00 00 00 00 0F 00 00 E0 00' + '00 00 00 0F 00 00 E0 00 00 00 00 0F 00 00 E0 00' + '00 00 00 0F 00 00 E0 00 00 00 00 0F 00 00 E0 00' + '00 00 00 0F 00 00 E0 00 00 00 00 0F 00 00 E0 00' + '00 00 00 0F 00 00 E0 00 00 00 00 0F 00 00 E0 00' + '00 00 00 0F 00 00 E0 00 00 00 00 0F 00 00 E0 00' + '00 00 00 0F 00 00 E0 00 00 00 00 0F 00 00 E0 00' + '00 00 00 0F 00 00 E0 00 00 00 00 0F 00 00 E0 00' + '00 00 00 0F 00 00 E0 00 00 00 00 0F 00 00 E0 00' + '00 00 00 0F 00 00 E0 00 00 00 00 0F 00 00 E0 00' + '00 00 00 0F 00 00 E0 00 00 00 00 0F 00 00 E0 00' + '00 00 00 0F 00 00 E0 00 00 00 00 0F 00 00 E0 00' + '00 00 00 0F 00 00 F0 00 00 00 00 0F 00 00 F0 00' + '00 00 00 1F 00 00 F8 00 00 00 00 1F 00 00 FE 00' + '00 00 00 7F 00 00 28 00 00 00 30 00 00 00 60 00' + '00 00 01 00 20 00 00 00 00 00 00 24 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 0C 00 00 00 2F 00 00 00 38 00 00' + '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' + '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' + '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' + '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' + '00 38 00 00 00 2A 00 00 00 0B 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 43 00 00 00 B0 00 00 00 F4 00 00 00 F8 00 00' + '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' + '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' + '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' + '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' + '00 F8 00 00 00 DA 00 00 00 85 00 00 00 28 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 11 00 00' + '00 E2 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 01 01 01 FF 01 01 01 FF 01 01' + '01 FF 01 01 01 FF 01 01 01 FF 02 02 02 FF 02 02' + '02 FF 03 03 03 FF 04 04 04 FF 04 04 04 FF 03 03' + '03 FF 00 00 00 FF 00 00 00 FF 00 00 00 AF 00 00' + '00 12 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 65 00 00' + '00 FF 20 20 20 FF 9B 9B 9B FF B9 B9 B9 FF B5 B5' + 'B5 FF B2 B2 B2 FF B0 B0 B0 FF AE AE AE FF AB AB' + 'AB FF A9 A9 A9 FF A7 A7 A7 FF A4 A4 A4 FF A2 A2' + 'A2 FF 9F 9F 9F FF 9C 9C 9C FF 9B 9B 9B FF 96 96' + '96 FF 8C 8C 8C FF 86 86 86 FF 88 88 88 FF 8E 8E' + '8E FF 5A 5A 5A FF 03 03 03 FF 00 00 00 E9 00 00' + '00 36 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 A6 00 00' + '00 FF 59 59 59 FF FF FF FF FF FA FA FA FF F1 F1' + 'F1 FF EB EB EB FF E4 E4 E4 FF E0 E0 E0 FF DC DC' + 'DC FF D8 D8 D8 FF D4 D4 D4 FF D0 D0 D0 FF CB CB' + 'CB FF C7 C7 C7 FF C3 C3 C3 FF BF BF BF FF BB BB' + 'BB FF B0 B0 B0 FF 9E 9E 9E FF 97 97 97 FF 9E 9E' + '9E FF B0 B0 B0 FF 25 25 25 FF 00 00 00 FD 00 00' + '00 5A 00 00 00 01 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 05 00 00 00 C6 00 00' + '00 FF 82 82 82 FF FF FF FF FF F7 F7 F7 FF F1 F1' + 'F1 FF E9 E9 E9 FF E4 E4 E4 FF DF DF DF FF DA DA' + 'DA FF D6 D6 D6 FF D2 D2 D2 FF CE CE CE FF CA CA' + 'CA FF C7 C7 C7 FF C3 C3 C3 FF BF BF BF FF BB BB' + 'BB FF B8 B8 B8 FF A9 A9 A9 FF 9C 9C 9C FF 98 98' + '98 FF AF AF AF FF 3D 3D 3D FF 00 00 00 FF 00 00' + '00 7C 00 00 00 01 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 09 00 00 00 D4 00 00' + '00 FF 92 92 92 FF FF FF FF FF FF FF FF FF F9 F9' + 'F9 FF F6 F6 F6 FF F6 F6 F6 FF F3 F3 F3 FF EF EF' + 'EF FF EC EC EC FF E6 E6 E6 FF E1 E1 E1 FF DC DC' + 'DC FF D6 D6 D6 FF D1 D1 D1 FF CC CC CC FF C6 C6' + 'C6 FF C3 C3 C3 FF AF AF AF FF A5 A5 A5 FF A8 A8' + 'A8 FF B6 B6 B6 FF 44 44 44 FF 00 00 00 FF 00 00' + '00 85 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 B5 00 00' + '00 FF 84 84 84 FF FF FF FF FF FF FF FF FF F7 F7' + 'F7 FF FB FB FB FF FD FD FD FF FC FC FC FF FC FC' + 'FC FF FA FA FA FF F8 F8 F8 FF F1 F1 F1 FF EB EB' + 'EB FF E5 E5 E5 FF DF DF DF FF D9 D9 D9 FF D3 D3' + 'D3 FF CF CF CF FF B5 B5 B5 FF A3 A3 A3 FF AD AD' + 'AD FF BB BB BB FF 3D 3D 3D FF 00 00 00 FF 00 00' + '00 68 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 88 00 00' + '00 FF 5F 5F 5F FF FF FF FF FF FF FF FF FF FB FB' + 'FB FF EF EF EF FF EE EE EE FF E9 E9 E9 FF E3 E3' + 'E3 FF DF DF DF FF DD DD DD FF DA DA DA FF D5 D5' + 'D5 FF D0 D0 D0 FF CC CC CC FF C7 C7 C7 FF C3 C3' + 'C3 FF BE BE BE FF B0 B0 B0 FF B2 B2 B2 FF B4 B4' + 'B4 FF BA BA BA FF 28 28 28 FF 00 00 00 F7 00 00' + '00 3C 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 34 00 00' + '00 FA 2E 2E 2E FF ED ED ED FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FE FE FE FF FA FA' + 'FA FF F5 F5 F5 FF F4 F4 F4 FF EF EF EF FF EB EB' + 'EB FF E5 E5 E5 FF E0 E0 E0 FF DC DC DC FF D8 D8' + 'D8 FF D2 D2 D2 FF C2 C2 C2 FF BA BA BA FF C1 C1' + 'C1 FF 97 97 97 FF 0A 0A 0A FF 00 00 00 D5 00 00' + '00 19 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 04 00 00' + '00 C8 04 04 04 FF 97 97 97 FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FD FD FD FF DF DF DF FF BE BE BE FF C4 C4' + 'C4 FF E4 E4 E4 FF E6 E6 E6 FF E1 E1 E1 FF DD DD' + 'DD FF D1 D1 D1 FF C5 C5 C5 FF C2 C2 C2 FF BF BF' + 'BF FF 43 43 43 FF 00 00 00 FF 00 00 00 9A 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 6C 00 00 00 FF 18 18 18 FF D1 D1 D1 FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FE FE FE FF B2 B2 B2 FF 9D 9D 9D FF 98 98' + '98 FF D1 D1 D1 FF ED ED ED FF E5 E5 E5 FF DF DF' + 'DF FF D1 D1 D1 FF CC CC CC FF D5 D5 D5 FF 84 84' + '84 FF 00 00 00 FF 00 00 00 E2 00 00 00 29 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 96 00 00 00 FF 3E 3E 3E FF D1 D1' + 'D1 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF ED ED ED FF DE DE DE FF E1 E1' + 'E1 FF EC EC EC FF EE EE EE FF E7 E7 E7 FF DC DC' + 'DC FF DC DC DC FF D7 D7 D7 FF 7B 7B 7B FF 14 14' + '14 FF 00 00 00 FF 00 00 00 5F 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 1A 00 00 00 C6 00 00 00 FF 35 35' + '35 FF C3 C3 C3 FF F9 F9 F9 FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FC FC FC FF FC FC' + 'FC FF F7 F7 F7 FF F0 F0 F0 FF EC EC EC FF EB EB' + 'EB FF CF CF CF FF 77 77 77 FF 07 07 07 FF 00 00' + '00 FD 00 00 00 8F 00 00 00 05 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 05 00 00 00 B6 00 00' + '00 FF 08 08 08 FF 58 58 58 FF CB CB CB FF FD FD' + 'FD FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF F9 F9 F9 FF E3 E3 E3 FF 9E 9E' + '9E FF 31 31 31 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00' + '00 0C 00 00 00 14 00 00 00 14 00 00 00 14 00 00' + '00 14 00 00 00 14 00 00 00 0E 00 00 00 1F 00 00' + '00 7B 00 00 00 E9 00 00 00 FF 10 10 10 FF 3E 3E' + '3E FF 69 69 69 FF 89 89 89 FF B1 B1 B1 FF A2 A2' + 'A2 FF 7E 7E 7E FF 57 57 57 FF 2C 2C 2C FF 04 04' + '04 FF 00 00 00 FF 00 00 00 BF 00 00 00 4F 00 00' + '00 14 00 00 00 11 00 00 00 14 00 00 00 14 00 00' + '00 14 00 00 00 14 00 00 00 14 00 00 00 0C 00 00' + '00 05 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 04 00 00 00 4C 00 00 00 8A 00 00' + '00 AD 00 00 00 BB 00 00 00 B9 00 00 00 B9 00 00' + '00 B9 00 00 00 B9 00 00 00 B9 00 00 00 B5 00 00' + '00 AB 00 00 00 D1 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 04 04 04 FF 7E 7E 7E FF 4B 4B' + '4B FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 F1 00 00 00 BA 00 00 00 AF 00 00' + '00 B7 00 00 00 B9 00 00 00 B9 00 00 00 B9 00 00' + '00 B9 00 00 00 B9 00 00 00 B8 00 00 00 A5 00 00' + '00 85 00 00 00 43 00 00 00 0A 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 06 00 00 00 95 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 54 54 54 FF BD BD BD FF 8A 8A' + '8A FF 1B 1B 1B FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 F0 00 00 00 69 00 00 00 0D 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 7A 00 00 00 FF 04 04 04 FF 5A 5A 5A FF A7 A7' + 'A7 FF AD AD AD FF AB AB AB FF AA AA AA FF AA AA' + 'AA FF AA AA AA FF A9 A9 A9 FF A9 A9 A9 FF A8 A8' + 'A8 FF A8 A8 A8 FF A8 A8 A8 FF A7 A7 A7 FF A6 A6' + 'A6 FF A9 A9 A9 FF C5 C5 C5 FF D3 D3 D3 FF C6 C6' + 'C6 FF B4 B4 B4 FF A3 A3 A3 FF A3 A3 A3 FF A3 A3' + 'A3 FF A2 A2 A2 FF A1 A1 A1 FF A1 A1 A1 FF A1 A1' + 'A1 FF A0 A0 A0 FF A0 A0 A0 FF 9F 9F 9F FF 9F 9F' + '9F FF 9E 9E 9E FF A1 A1 A1 FF 94 94 94 FF 31 31' + '31 FF 00 00 00 FF 00 00 00 F6 00 00 00 5C 00 00' + '00 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 28 00 00' + '00 EA 00 00 00 FF 78 78 78 FF FA FA FA FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FE FE FE FF FB FB' + 'FB FF FA FA FA FF F8 F8 F8 FF F7 F7 F7 FF F4 F4' + 'F4 FF F3 F3 F3 FF F2 F2 F2 FF F0 F0 F0 FF EF EF' + 'EF FF EC EC EC FF E6 E6 E6 FF E2 E2 E2 FF E2 E2' + 'E2 FF E3 E3 E3 FF E4 E4 E4 FF E2 E2 E2 FF E0 E0' + 'E0 FF DE DE DE FF DC DC DC FF DB DB DB FF D9 D9' + 'D9 FF D8 D8 D8 FF D6 D6 D6 FF D4 D4 D4 FF D3 D3' + 'D3 FF D0 D0 D0 FF CF CF CF FF DD DD DD FF CB CB' + 'CB FF 39 39 39 FF 00 00 00 FF 00 00 00 AF 00 00' + '00 17 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 78 00 00' + '00 FF 17 17 17 FF DF DF DF FF FF FF FF FF F7 F7' + 'F7 FF F6 F8 F8 FF F5 F6 F8 FF F3 F4 F5 FF F1 F3' + 'F4 FF EF F0 F2 FF ED EF F0 FF EC ED EE FF E9 EA' + 'EB FF E8 E9 EA FF E6 E7 E9 FF E4 E6 E7 FF E2 E3' + 'E4 FF E0 E1 E3 FF DF E0 E1 FF DD DE DF FF DB DC' + 'DD FF D9 DB DC FF D8 D8 D9 FF D6 D7 D8 FF D4 D5' + 'D7 FF D2 D4 D4 FF D0 D1 D3 FF CE D0 D1 FF CD CE' + 'CF FF CB CD CE FF CA CB CD FF C7 C9 CA FF C6 C8' + 'C9 FF C4 C6 C7 FF C2 C3 C3 FF C0 C0 C0 FF D9 D9' + 'D9 FF A4 A4 A4 FF 00 00 00 FF 00 00 00 EE 00 00' + '00 33 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 84 00 00' + '00 FF 39 39 39 FF F0 F0 F0 FF FF FF FF FF F9 F9' + 'F9 FF F6 F0 EB FF F5 EF EA FF F5 EE EA FF F3 EE' + 'E9 FF F3 ED E9 FF F2 EC E8 FF F2 EC E8 FF F0 EC' + 'E6 FF F0 EB E6 FF F0 EA E6 FF EF EA E4 FF ED E8' + 'E4 FF ED E8 E3 FF EC E7 E2 FF EB E6 E1 FF E9 E5' + 'E0 FF E8 E4 DF FF E7 E2 DD FF E6 E1 DC FF E5 DF' + 'DB FF E3 DE D9 FF E2 DD D8 FF E1 DB D6 FF DF DA' + 'D4 FF DE D8 D3 FF DD D7 D2 FF DB D5 D0 FF D9 D3' + 'CE FF DB D5 D2 FF D3 D2 D2 FF C3 C3 C3 FF CB CB' + 'CB FF AE AE AE FF 05 05 05 FF 00 00 00 F7 00 00' + '00 37 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 84 00 00' + '00 FF 3C 3C 3C FF F1 F1 F1 FF FF FF FF FF FB FF' + 'FF FF E2 CA B9 FF D8 9B 70 FF DC A2 79 FF DE A7' + '7D FF E1 AA 81 FF E3 AF 85 FF E5 B2 88 FF E8 B6' + '8C FF E9 B9 8E FF EB BB 91 FF ED BE 94 FF EE C0' + '95 FF EF C1 96 FF EF C2 97 FF EF C2 97 FF EE C1' + '97 FF EE C0 95 FF EC BE 93 FF EB BB 90 FF E9 B8' + '8E FF E7 B5 8B FF E5 B1 87 FF E3 AE 84 FF E1 AA' + '81 FF DF A6 7D FF DC A2 79 FF D9 9E 75 FF D6 97' + '6E FF E0 AB 8B FF E5 E3 E2 FF C4 C5 C6 FF CC CC' + 'CC FF AB AB AB FF 06 06 06 FF 00 00 00 F7 00 00' + '00 37 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 84 00 00' + '00 FF 3A 3A 3A FF F1 F1 F1 FF FF FF FF FF FD FF' + 'FF FF D0 A9 90 FF BC 56 11 FF C3 63 1F FF C6 69' + '26 FF CA 70 2C FF CD 76 32 FF D1 7B 37 FF D4 81' + '3D FF D7 86 41 FF D9 89 44 FF DC 8D 48 FF DD 90' + '4A FF DF 92 4D FF DF 93 4D FF DF 93 4D FF DE 91' + '4C FF DD 90 4A FF DB 8C 46 FF D8 88 43 FF D6 83' + '3F FF D3 7E 3A FF D0 78 34 FF CC 73 2F FF C8 6D' + '2A FF C5 67 24 FF C1 61 1E FF BD 5A 17 FF B6 4E' + '0A FF C4 6F 38 FF E5 E2 E0 FF C7 C8 C9 FF CF CF' + 'CF FF AC AC AC FF 05 05 05 FF 00 00 00 F7 00 00' + '00 37 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 84 00 00' + '00 FF 39 39 39 FF F0 F0 F0 FF FF FF FF FF FF FF' + 'FF FF D1 AC 94 FF BC 5A 19 FF C2 66 26 FF C6 6C' + '2C FF CA 72 32 FF CD 77 37 FF D0 7C 3C FF D3 81' + '40 FF D5 85 44 FF D7 88 47 FF D9 8C 4A FF DA 8E' + '4C FF DC 8F 4D FF DC 90 4E FF DC 90 4E FF DB 8F' + '4D FF DA 8D 4B FF D9 8A 49 FF D6 87 46 FF D4 83' + '42 FF D1 7F 3E FF CE 7A 39 FF CB 75 34 FF C8 70' + '30 FF C5 6A 2B FF C1 64 25 FF BD 5E 1F FF B7 53' + '12 FF C6 73 3F FF E6 E3 E1 FF C8 C9 CA FF D0 D0' + 'D0 FF AC AC AC FF 05 05 05 FF 00 00 00 F7 00 00' + '00 37 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 84 00 00' + '00 FF 38 38 38 FF F0 F0 F0 FF FF FF FF FF FF FF' + 'FF FF D1 AB 92 FF B9 55 14 FF BF 61 22 FF C3 67' + '28 FF C6 6D 2D FF CA 71 31 FF CC 76 36 FF CF 7B' + '3A FF D1 7E 3D FF D3 81 40 FF D5 85 44 FF D6 87' + '45 FF D7 88 47 FF D7 89 47 FF D7 89 47 FF D7 87' + '47 FF D6 86 45 FF D4 83 42 FF D2 80 3F FF D0 7D' + '3C FF CE 79 38 FF CB 74 34 FF C8 6F 2F FF C5 6A' + '2B FF C2 65 26 FF BE 60 21 FF BA 5A 1B FF B4 4E' + '0F FF C4 70 3C FF E6 E3 E2 FF CA CB CC FF D2 D2' + 'D2 FF AC AC AC FF 05 05 05 FF 00 00 00 F7 00 00' + '00 37 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 84 00 00' + '00 FF 38 38 38 FF F0 F0 F0 FF FF FF FF FF FF FF' + 'FF FF D0 A9 91 FF B7 51 10 FF BD 5C 1D FF C0 62' + '23 FF C3 67 28 FF C6 6C 2C FF C9 71 30 FF CB 75' + '34 FF CE 78 37 FF CF 7B 3A FF D0 7E 3D FF D1 7F' + '3E FF D2 81 40 FF D3 81 40 FF D2 81 40 FF D2 80' + '3F FF D1 7F 3E FF D0 7C 3C FF CE 79 39 FF CD 76' + '36 FF CA 73 32 FF C7 6E 2E FF C5 6A 2A FF C2 66' + '26 FF BF 60 21 FF BC 5B 1C FF B8 55 17 FF B2 4A' + '0A FF C2 6C 39 FF E7 E4 E3 FF CC CD CE FF D4 D4' + 'D4 FF AB AB AB FF 04 04 04 FF 00 00 00 F7 00 00' + '00 37 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 84 00 00' + '00 FF 36 36 36 FF EF EF EF FF FF FF FF FF FF FF' + 'FF FF CE A7 8F FF B3 4C 0B FF B9 58 18 FF BC 5D' + '1E FF C0 62 23 FF C3 66 27 FF C5 6A 2B FF C7 6E' + '2E FF C9 71 31 FF CB 74 33 FF CC 76 36 FF CD 78' + '37 FF CE 79 39 FF CE 79 39 FF CE 79 39 FF CE 79' + '38 FF CD 77 37 FF CC 75 35 FF CA 72 32 FF C8 70' + '30 FF C6 6C 2D FF C3 68 29 FF C1 64 25 FF BE 60' + '21 FF BC 5B 1C FF B8 56 18 FF B5 50 12 FF AF 45' + '05 FF BF 68 35 FF E8 E5 E3 FF CD CF D0 FF D6 D6' + 'D6 FF AB AB AB FF 04 04 04 FF 00 00 00 F7 00 00' + '00 37 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 84 00 00' + '00 FF 36 36 36 FF EE EE EE FF FF FF FF FF FF FF' + 'FF FF CC A4 8C FF B0 46 06 FF B6 51 13 FF B9 57' + '18 FF BC 5B 1D FF BF 60 21 FF C1 64 24 FF C3 67' + '28 FF C5 6A 2B FF C6 6D 2D FF C8 6F 2F FF C9 70' + '30 FF C9 72 32 FF C9 72 32 FF C9 72 32 FF C9 72' + '31 FF C8 70 30 FF C7 6E 2E FF C6 6B 2C FF C4 69' + '2A FF C2 66 26 FF BF 62 22 FF BD 5E 1F FF BA 5A' + '1B FF B8 55 17 FF B5 50 12 FF B2 4B 0D FF AC 40' + '00 FF BC 64 31 FF E9 E5 E4 FF D0 D1 D2 FF D8 D8' + 'D8 FF AA AA AA FF 04 04 04 FF 00 00 00 F7 00 00' + '00 37 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 84 00 00' + '00 FF 35 35 35 FF ED ED ED FF FF FF FF FF FF FF' + 'FF FF CA A0 88 FF AD 40 00 FF B3 4C 0E FF B5 51' + '13 FF B8 56 17 FF BB 5A 1B FF BD 5D 1E FF BF 61' + '21 FF C0 63 24 FF C1 65 25 FF C2 67 28 FF C3 69' + '29 FF C5 69 2A FF C5 6A 2A FF C5 6A 2A FF C4 69' + '29 FF C4 68 28 FF C2 66 27 FF C0 64 24 FF BF 61' + '22 FF BE 5E 20 FF BC 5B 1D FF BA 58 19 FF B7 54' + '16 FF B5 50 12 FF B2 4B 0D FF AF 46 08 FF A8 3B' + '00 FF BB 62 30 FF EA E7 E5 FF D1 D3 D4 FF D9 D9' + 'D9 FF AA AA AA FF 03 03 03 FF 00 00 00 F7 00 00' + '00 37 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 84 00 00' + '00 FF 34 34 34 FF EC EC EC FF FF FF FF FF FF FF' + 'FF FF C6 9D 85 FF A9 3A 00 FF AF 46 09 FF B2 4B' + '0E FF B4 4F 12 FF B6 53 15 FF B8 55 17 FF B9 58' + '19 FF BB 5C 1D FF BF 60 22 FF C2 66 27 FF C4 68' + '29 FF C5 6A 2A FF C5 6B 2B FF C5 6B 2B FF C5 6B' + '2B FF C5 69 2A FF C3 68 29 FF C1 65 26 FF BF 60' + '22 FF BB 59 1B FF B7 54 15 FF B4 4F 11 FF B3 4D' + '0F FF B1 4A 0C FF AE 45 08 FF AB 40 03 FF A6 38' + '00 FF BA 61 2F FF EA E7 E6 FF D3 D4 D5 FF DB DB' + 'DB FF A9 A9 A9 FF 03 03 03 FF 00 00 00 F7 00 00' + '00 37 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 84 00 00' + '00 FF 33 33 33 FF EC EC EC FF FF FF FF FF FF FF' + 'FF FF C4 9A 83 FF A6 37 00 FF AC 40 03 FF AE 45' + '07 FF AF 47 0A FF B3 4D 0F FF B9 57 18 FF BE 5F' + '20 FF C4 68 29 FF C6 6D 2D FF C8 70 30 FF CA 72' + '31 FF CA 73 33 FF CB 74 33 FF CB 74 33 FF CB 73' + '33 FF CA 73 32 FF C9 71 31 FF C8 70 30 FF C7 6D' + '2D FF C4 69 2A FF BF 60 22 FF B8 56 18 FF B3 4D' + '0F FF AC 42 04 FF AA 3F 02 FF A9 3E 01 FF A6 38' + '00 FF BA 61 2F FF EB E8 E6 FF D5 D6 D7 FF DC DC' + 'DC FF A9 A9 A9 FF 03 03 03 FF 00 00 00 F7 00 00' + '00 37 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 84 00 00' + '00 FF 32 32 32 FF EB EB EB FF FF FF FF FF FF FF' + 'FF FF C3 99 81 FF A6 37 00 FF A9 3D 00 FF A9 3D' + '00 FF B1 49 0C FF C0 63 24 FF C6 6D 2D FF C9 71' + '31 FF CA 74 33 FF CB 75 35 FF CD 78 37 FF CE 79' + '39 FF CF 7B 3A FF CF 7B 3B FF CF 7B 3B FF CF 7B' + '3A FF CE 7A 3A FF CD 79 38 FF CC 76 36 FF CB 74' + '34 FF C9 71 32 FF C7 6E 2F FF C6 6B 2B FF C2 66' + '27 FF B7 54 16 FF AA 40 03 FF A8 3C 00 FF A6 38' + '00 FF BA 61 2F FF EC E9 E7 FF D7 D9 D9 FF DF DF' + 'DF FF A8 A8 A8 FF 02 02 02 FF 00 00 00 F7 00 00' + '00 37 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 84 00 00' + '00 FF 31 31 31 FF EA EA EA FF FF FF FF FF FF FF' + 'FF FF C2 98 80 FF A5 36 00 FF A8 3C 00 FF B7 55' + '17 FF C4 6A 2A FF C8 70 31 FF CA 73 33 FF CD 76' + '36 FF CE 79 39 FF D0 7C 3B FF D1 7F 3E FF D2 80' + '3F FF D3 82 41 FF D3 83 42 FF D3 83 42 FF D3 82' + '41 FF D3 81 40 FF D2 80 3F FF D0 7D 3C FF CF 7B' + '3A FF CD 78 37 FF CB 74 34 FF C9 71 30 FF C7 6E' + '2E FF C5 6A 2B FF BE 5F 20 FF B0 4A 0C FF A5 36' + '00 FF BA 61 2F FF EC E9 E8 FF D8 DA DA FF E0 E0' + 'E0 FF A7 A7 A7 FF 02 02 02 FF 00 00 00 F7 00 00' + '00 37 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 84 00 00' + '00 FF 30 30 30 FF E9 E9 E9 FF FF FF FF FF FF FF' + 'FF FF C0 96 7E FF A6 37 00 FF B8 55 17 FF C7 6D' + '2E FF C9 71 31 FF CC 75 35 FF CD 79 39 FF D0 7D' + '3C FF D2 80 3F FF D3 83 42 FF D5 86 44 FF D7 87' + '46 FF D8 89 48 FF D8 8A 48 FF D8 8A 48 FF D8 89' + '48 FF D7 88 47 FF D6 87 45 FF D5 84 43 FF D3 82' + '41 FF D1 7E 3D FF CE 7A 3A FF CD 77 36 FF CA 73' + '33 FF C7 6E 2E FF C5 6B 2B FF C0 63 23 FF AD 41' + '02 FF BA 60 2E FF ED EA E9 FF DA DC DD FF E2 E2' + 'E2 FF A7 A7 A7 FF 02 02 02 FF 00 00 00 F7 00 00' + '00 37 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 84 00 00' + '00 FF 2F 2F 2F FF E8 E8 E8 FF FF FF FF FF FE FF' + 'FF FF BD 92 7B FF AF 45 05 FF C7 6D 2D FF C9 71' + '31 FF CC 76 35 FF CF 7A 3A FF D1 7E 3E FF D4 83' + '42 FF D6 86 46 FF D8 8A 48 FF DA 8D 4B FF DB 8F' + '4D FF DC 90 4E FF DC 91 50 FF DC 91 50 FF DC 91' + '4F FF DC 90 4E FF DA 8E 4C FF D9 8B 49 FF D7 88' + '47 FF D5 84 43 FF D2 80 3F FF D0 7C 3B FF CD 78' + '37 FF CB 73 32 FF C7 6E 2E FF C5 6A 2B FF BC 5B' + '1A FF BD 65 33 FF EE EA E9 FF DC DE DF FF E4 E4' + 'E4 FF A7 A7 A7 FF 01 01 01 FF 00 00 00 F7 00 00' + '00 37 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 84 00 00' + '00 FF 2E 2E 2E FF E7 E7 E7 FF FF FF FF FF FE FF' + 'FF FF BD 93 7B FF BA 57 17 FF C9 71 31 FF CB 74' + '34 FF CE 7A 3A FF D2 7F 3E FF D4 84 43 FF D7 88' + '47 FF DA 8C 4A FF DC 8F 4D FF DE 93 51 FF DF 96' + '54 FF E0 98 56 FF E1 99 56 FF E1 99 56 FF E1 99' + '56 FF E0 97 55 FF DE 94 53 FF DD 91 50 FF DB 8E' + '4C FF D8 8A 48 FF D5 85 44 FF D3 81 40 FF D0 7C' + '3C FF CD 77 37 FF C9 72 32 FF C6 6D 2D FF C2 62' + '21 FF C4 70 3D FF ED EA E8 FF DE DF E0 FF E5 E5' + 'E5 FF A6 A6 A6 FF 01 01 01 FF 00 00 00 F7 00 00' + '00 37 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 84 00 00' + '00 FF 2C 2C 2C FF E5 E5 E5 FF FF FF FF FF FD FF' + 'FF FF BE 96 7E FF C2 64 22 FF CB 74 33 FF CE 79' + '38 FF D1 7F 3E FF D5 84 43 FF D7 89 48 FF DA 8E' + '4C FF DE 92 50 FF E0 96 54 FF E2 9A 58 FF E3 9C' + '5A FF E5 9F 5C FF E6 A0 5D FF E6 A0 5D FF E5 A0' + '5D FF E4 9E 5B FF E3 9B 59 FF E1 98 56 FF DF 94' + '52 FF DC 90 4E FF D8 8B 49 FF D6 86 45 FF D3 81' + '40 FF D0 7C 3B FF CC 77 36 FF C9 70 30 FF C4 68' + '26 FF C8 76 43 FF EE EA E9 FF E1 E2 E3 FF E8 E8' + 'E8 FF A5 A5 A5 FF 00 00 00 FF 00 00 00 F7 00 00' + '00 37 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 84 00 00' + '00 FF 2C 2C 2C FF E5 E5 E5 FF FF FF FF FF FD FF' + 'FF FF BC 94 7B FF C4 67 24 FF CD 77 37 FF D0 7C' + '3C FF D4 83 42 FF D7 88 47 FF DB 8D 4C FF DE 93' + '51 FF E1 97 56 FF E3 9C 59 FF E6 A0 5D FF E7 A3' + '60 FF E9 A6 63 FF EA A8 64 FF EA A8 64 FF E9 A7' + '64 FF E8 A5 62 FF E7 A2 5F FF E4 9E 5B FF E2 99' + '57 FF DF 95 53 FF DC 8F 4D FF D8 8A 49 FF D6 86' + '44 FF D2 80 3F FF CF 7A 3A FF CB 74 33 FF C6 6B' + '29 FF C7 76 43 FF F6 F2 F0 FF F4 F5 F6 FF F6 F6' + 'F6 FF A5 A5 A5 FF 00 00 00 FF 00 00 00 F7 00 00' + '00 37 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 84 00 00' + '00 FF 2B 2B 2B FF E4 E4 E4 FF FF FF FF FF FD FF' + 'FF FF B7 8D 75 FF BC 5A 19 FF CF 7C 3B FF D2 80' + '3E FF D5 85 44 FF D9 8C 4A FF DD 91 4F FF E0 97' + '55 FF E3 9C 5A FF E6 A1 5E FF E9 A5 63 FF EB A9' + '66 FF ED AD 69 FF EF AF 6B FF EF AF 6C FF EE AF' + '6A FF ED AB 68 FF EA A7 65 FF E7 A3 61 FF E4 9E' + '5C FF E1 99 57 FF DE 93 52 FF DA 8E 4C FF D7 88' + '47 FF D4 82 41 FF D0 7C 3C FF CC 77 36 FF C7 6C' + '2A FF C3 6F 3D FF F7 F3 F2 FF F7 F9 FA FF FC FC' + 'FC FF A5 A5 A5 FF 00 00 00 FF 00 00 00 F7 00 00' + '00 37 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 84 00 00' + '00 FF 2A 2A 2A FF E3 E3 E3 FF FF FF FF FF FD FF' + 'FF FF B4 88 70 FF AF 41 01 FF D0 78 34 FF D4 81' + '3E FF D8 87 43 FF DC 8D 49 FF E0 93 4F FF E3 9A' + '55 FF E7 A0 5B FF EB A5 60 FF EE AA 65 FF F1 AF' + '6A FF F3 B3 6E FF F5 B6 70 FF F5 B6 70 FF F4 B5' + '6F FF F2 B2 6C FF F0 AD 67 FF EC A7 62 FF E9 A2' + '5D FF E5 9C 58 FF E1 96 52 FF DE 90 4C FF DA 8A' + '46 FF D6 83 40 FF D2 7D 3A FF CF 78 35 FF C1 5F' + '1B FF BB 5F 2C FF F9 F5 F3 FF F9 FB FB FF FE FE' + 'FE FF A5 A5 A5 FF 00 00 00 FF 00 00 00 F7 00 00' + '00 37 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 84 00 00' + '00 FF 2A 2A 2A FF E3 E3 E3 FF FF FF FF FF FD FF' + 'FF FF B4 95 84 FF A0 4F 23 FF B6 71 43 FF CB 89' + '53 FF CE 8D 57 FF D1 92 5B FF D4 97 61 FF D7 9D' + '66 FF DA A2 6A FF DD A7 6E FF E0 AB 73 FF E4 B0' + '78 FF E6 B4 7B FF E7 B7 7F FF E8 B7 7F FF E6 B6' + '7D FF E5 B2 7A FF E2 AE 76 FF DE A9 71 FF DC A4' + '6C FF D9 9F 68 FF D5 99 63 FF D2 94 5D FF CF 8F' + '59 FF CC 8A 54 FF CA 85 4F FF C3 7E 4A FF A7 5A' + '2C FF B3 73 4F FF FA F8 F7 FF FC FD FD FF FF FF' + 'FF FF A5 A5 A5 FF 00 00 00 FF 00 00 00 F7 00 00' + '00 37 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 84 00 00' + '00 FF 26 26 26 FF E1 E1 E1 FF FF FF FF FF FF FF' + 'FF FF EC EC ED FF E6 E6 E7 FF E6 E5 E6 FF E9 E7' + 'E5 FF E9 E7 E5 FF E9 E7 E5 FF E9 E7 E5 FF E9 E7' + 'E5 FF E9 E8 E6 FF E9 E8 E6 FF EA E8 E6 FF EA E8' + 'E6 FF EA E8 E6 FF EA E8 E6 FF EA E8 E6 FF EA E8' + 'E6 FF EA E8 E6 FF EA E8 E6 FF E9 E8 E6 FF E8 E7' + 'E5 FF E8 E6 E4 FF E8 E6 E4 FF E8 E6 E4 FF E8 E6' + 'E4 FF E7 E5 E3 FF E7 E5 E3 FF E6 E4 E3 FF E3 E3' + 'E3 FF E9 E9 E9 FF FC FC FC FF FD FD FD FF FF FF' + 'FF FF A4 A4 A4 FF 00 00 00 FF 00 00 00 F7 00 00' + '00 37 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 7D 00 00' + '00 FF 0D 0D 0D FF C4 C4 C4 FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FE FE FE FF FF FF FF FF FB FB' + 'FB FF 7F 7F 7F FF 00 00 00 FF 00 00 00 F2 00 00' + '00 30 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 37 00 00' + '00 FB 00 00 00 FF 56 56 56 FF E3 E3 E3 FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FD FD FD FF AF AF' + 'AF FF 21 21 21 FF 00 00 00 FF 00 00 00 B9 00 00' + '00 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 8D 00 00 00 FF 01 01 01 FF 2F 2F 2F FF 6D 6D' + '6D FF 7D 7D 7D FF 7C 7C 7C FF 7C 7C 7C FF 7C 7C' + '7C FF 7C 7C 7C FF 7C 7C 7C FF 7C 7C 7C FF 7C 7C' + '7C FF 7C 7C 7C FF 7C 7C 7C FF 7C 7C 7C FF 7C 7C' + '7C FF 7C 7C 7C FF 7C 7C 7C FF 7C 7C 7C FF 7C 7C' + '7C FF 7C 7C 7C FF 7C 7C 7C FF 7C 7C 7C FF 7C 7C' + '7C FF 7C 7C 7C FF 7C 7C 7C FF 7B 7B 7B FF 7B 7B' + '7B FF 7B 7B 7B FF 7A 7A 7A FF 7A 7A 7A FF 7A 7A' + '7A FF 7A 7A 7A FF 77 77 77 FF 57 57 57 FF 18 18' + '18 FF 00 00 00 FF 00 00 00 FF 00 00 00 57 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 19 00 00 00 B9 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 F5 00 00 00 86 00 00 00 04 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 63 00 00 00 D0 00 00' + '00 F3 00 00 00 F0 00 00 00 F0 00 00 00 F0 00 00' + '00 F0 00 00 00 F0 00 00 00 F0 00 00 00 F0 00 00' + '00 F0 00 00 00 F0 00 00 00 F0 00 00 00 F0 00 00' + '00 F0 00 00 00 F0 00 00 00 F0 00 00 00 F0 00 00' + '00 F0 00 00 00 F0 00 00 00 F0 00 00 00 F0 00 00' + '00 F0 00 00 00 F0 00 00 00 F0 00 00 00 F0 00 00' + '00 F0 00 00 00 F0 00 00 00 F0 00 00 00 F0 00 00' + '00 F0 00 00 00 F0 00 00 00 F1 00 00 00 EF 00 00' + '00 B2 00 00 00 3D 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF F8' + '00 00 1F FF 00 00 FF F0 00 00 0F FF 00 00 FF E0' + '00 00 07 FF 00 00 FF E0 00 00 07 FF 00 00 FF E0' + '00 00 03 FF 00 00 FF C0 00 00 03 FF 00 00 FF C0' + '00 00 07 FF 00 00 FF E0 00 00 07 FF 00 00 FF E0' + '00 00 07 FF 00 00 FF E0 00 00 07 FF 00 00 FF E0' + '00 00 0F FF 00 00 FF F0 00 00 0F FF 00 00 FF F8' + '00 00 1F FF 00 00 FF F8 00 00 1F FF 00 00 FF FC' + '00 00 7F FF 00 00 FE 00 00 00 00 7F 00 00 F8 00' + '00 00 00 1F 00 00 F0 00 00 00 00 0F 00 00 F0 00' + '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' + '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' + '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' + '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' + '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' + '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' + '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' + '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' + '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' + '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' + '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' + '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' + '00 00 00 07 00 00 E0 00 00 00 00 07 00 00 E0 00' + '00 00 00 07 00 00 F0 00 00 00 00 0F 00 00 F0 00' + '00 00 00 0F 00 00 FC 00 00 00 00 3F 00 00 28 00' + '00 00 20 00 00 00 40 00 00 00 01 00 20 00 00 00' + '00 00 00 10 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 0B 00 00 00 4B 00 00' + '00 63 00 00 00 61 00 00 00 61 00 00 00 61 00 00' + '00 61 00 00 00 61 00 00 00 61 00 00 00 61 00 00' + '00 61 00 00 00 61 00 00 00 61 00 00 00 63 00 00' + '00 3D 00 00 00 05 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 04 00 00 00 AF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 01 01 01 FF 01 01' + '01 FF 01 01 01 FF 02 02 02 FF 02 02 02 FF 02 02' + '02 FF 03 03 03 FF 05 05 05 FF 03 03 03 FF 00 00' + '00 FA 00 00 00 80 00 00 00 03 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 3E 00 00 00 FD 6E 6E 6E FF B7 B7' + 'B7 FF AD AD AD FF A9 A9 A9 FF A5 A5 A5 FF A2 A2' + 'A2 FF 9F 9F 9F FF 9B 9B 9B FF 97 97 97 FF 94 94' + '94 FF 8C 8C 8C FF 83 83 83 FF 85 85 85 FF 38 38' + '38 FF 00 00 00 EA 00 00 00 27 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 67 0F 0F 0F FF D8 D8 D8 FF FF FF' + 'FF FF ED ED ED FF E2 E2 E2 FF DB DB DB FF D3 D3' + 'D3 FF CD CD CD FF C8 C8 C8 FF C2 C2 C2 FF BC BC' + 'BC FF B4 B4 B4 FF 9F 9F 9F FF A2 A2 A2 FF 7F 7F' + '7F FF 00 00 00 FD 00 00 00 47 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 72 1B 1B 1B FF E6 E6 E6 FF FF FF' + 'FF FF F6 F6 F6 FF F5 F5 F5 FF F1 F1 F1 FF EC EC' + 'EC FF E4 E4 E4 FF DC DC DC FF D4 D4 D4 FF CC CC' + 'CC FF C5 C5 C5 FF AB AB AB FF AD AD AD FF 90 90' + '90 FF 04 04 04 FF 00 00 00 50 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 56 0D 0D 0D FF D4 D4 D4 FF FF FF' + 'FF FF F7 F7 F7 FF F8 F8 F8 FF F3 F3 F3 FF F0 F0' + 'F0 FF EC EC EC FF E3 E3 E3 FF DA DA DA FF D2 D2' + 'D2 FF CA CA CA FF B0 B0 B0 FF B8 B8 B8 FF 82 82' + '82 FF 00 00 00 F8 00 00 00 32 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 1F 00 00 00 ED 94 94 94 FF FF FF' + 'FF FF FE FE FE FF FD FD FD FF FA FA FA FF F3 F3' + 'F3 FF E5 E5 E5 FF E1 E1 E1 FF E0 E0 E0 FF DA DA' + 'DA FF D1 D1 D1 FF BF BF BF FF C5 C5 C5 FF 52 52' + '52 FF 00 00 00 CD 00 00 00 0D 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 97 29 29 29 FF E4 E4' + 'E4 FF FF FF FF FF FF FF FF FF FF FF FF FF F0 F0' + 'F0 FF AB AB AB FF B4 B4 B4 FF E8 E8 E8 FF E4 E4' + 'E4 FF D5 D5 D5 FF D3 D3 D3 FF 9D 9D 9D FF 0C 0C' + '0C FF 00 00 00 6C 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 1C 00 00 00 D8 4C 4C' + '4C FF EC EC EC FF FF FF FF FF FF FF FF FF FA FA' + 'FA FF E2 E2 E2 FF E3 E3 E3 FF F0 F0 F0 FF EA EA' + 'EA FF E6 E6 E6 FF B1 B1 B1 FF 23 23 23 FF 00 00' + '00 B7 00 00 00 08 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 2B 00 00' + '00 D5 33 33 33 FF B4 B4 B4 FF F9 F9 F9 FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FB FB FB FF DC DC' + 'DC FF 89 89 89 FF 1A 1A 1A FF 00 00 00 B6 00 00' + '00 14 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 09 00 00 00 28 00 00' + '00 38 00 00 00 37 00 00 00 37 00 00 00 2C 00 00' + '00 50 00 00 00 CC 03 03 03 FF 31 31 31 FF 67 67' + '67 FF A2 A2 A2 FF 90 90 90 FF 59 59 59 FF 22 22' + '22 FF 00 00 00 FF 00 00 00 B4 00 00 00 41 00 00' + '00 2F 00 00 00 37 00 00 00 37 00 00 00 37 00 00' + '00 27 00 00 00 09 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 32 00 00 00 BE 00 00 00 F7 00 00' + '00 FB 00 00 00 FA 00 00 00 FA 00 00 00 FA 00 00' + '00 F3 00 00 00 F2 00 00 00 FF 00 00 00 FF 05 05' + '05 FF 79 79 79 FF 4C 4C 4C FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FD 00 00 00 F0 00 00 00 F6 00 00' + '00 FA 00 00 00 FA 00 00 00 FA 00 00 00 FB 00 00' + '00 F1 00 00 00 AE 00 00 00 29 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 1B 00 00 00 DB 26 26 26 FF 94 94 94 FF AD AD' + 'AD FF AA AA AA FF A9 A9 A9 FF A7 A7 A7 FF A7 A7' + 'A7 FF A6 A6 A6 FF A4 A4 A4 FF A2 A2 A2 FF AB AB' + 'AB FF CD CD CD FF BF BF BF FF A2 A2 A2 FF 9E 9E' + '9E FF 9E 9E 9E FF 9C 9C 9C FF 9C 9C 9C FF 9B 9B' + '9B FF 9A 9A 9A FF 99 99 99 FF 9B 9B 9B FF 77 77' + '77 FF 11 11 11 FF 00 00 00 C1 00 00 00 14 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 6F 06 06 06 FF C0 C0 C0 FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FD FF FF FF FA FD FE FF F7 FA' + 'FC FF F4 F7 F9 FF F1 F4 F6 FF EE F1 F3 FF EA EC' + 'EE FF E2 E4 E6 FF E1 E3 E5 FF E2 E5 E7 FF E1 E2' + 'E5 FF DE E0 E2 FF DA DD DF FF D8 DA DD FF D5 D8' + 'DA FF D3 D6 D8 FF D0 D3 D5 FF CE CF CF FF DD DD' + 'DD FF 81 81 81 FF 00 00 00 FF 00 00 00 4E 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 84 22 22 22 FF EB EB EB FF FF FF FF FF F3 EA' + 'E4 FF F0 E0 D4 FF EF E1 D6 FF EF E1 D6 FF EF E1' + 'D6 FF EE E1 D6 FF ED E1 D6 FF EC E1 D5 FF EC E0' + 'D5 FF EA DE D3 FF E9 DD D2 FF E7 DA CF FF E5 D8' + 'CD FF E2 D5 CA FF DF D2 C7 FF DD CF C4 FF DB CC' + 'C1 FF D8 C9 BE FF D8 C8 BD FF D2 CE CC FF CB CC' + 'CC FF AB AB AB FF 06 06 06 FF 00 00 00 61 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 84 24 24 24 FF EB EB EB FF FF FF FF FF D4 AB' + '8F FF C5 67 26 FF CD 77 39 FF D2 81 42 FF D7 89' + '4A FF DC 91 50 FF E0 97 57 FF E3 9C 5C FF E5 9F' + '5E FF E5 9F 5F FF E4 9E 5D FF E2 9A 5A FF DF 94' + '55 FF DA 8D 4E FF D6 85 47 FF D1 7D 3F FF CC 75' + '37 FF C6 6A 2C FF C5 68 2B FF D8 C3 B5 FF CE D1' + 'D3 FF A9 A9 A9 FF 06 06 06 FF 00 00 00 61 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 84 22 22 22 FF EA EA EA FF FF FF FF FF D0 A5' + '89 FF BD 5A 16 FF C6 6A 2A FF CB 73 32 FF D0 7A' + '3A FF D4 82 40 FF D7 87 45 FF DA 8C 49 FF DB 8E' + '4B FF DB 8E 4C FF DA 8D 4A FF D8 89 47 FF D5 84' + '42 FF D2 7E 3C FF CD 76 35 FF C8 6E 2E FF C3 66' + '26 FF BD 5B 1A FF BB 59 1A FF D7 C0 B2 FF D1 D5' + 'D8 FF A9 A9 A9 FF 05 05 05 FF 00 00 00 61 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 84 22 22 22 FF EA EA EA FF FF FF FF FF D0 A4' + '88 FF BA 54 12 FF C2 65 25 FF C7 6D 2D FF CB 73' + '34 FF CF 7A 39 FF D2 7F 3E FF D3 82 42 FF D4 84' + '43 FF D5 84 43 FF D4 83 42 FF D2 80 3F FF D0 7C' + '3B FF CD 76 36 FF C8 6F 30 FF C4 68 29 FF BF 60' + '21 FF B9 56 17 FF B8 54 17 FF D8 C1 B3 FF D4 D8' + 'DA FF A9 A9 A9 FF 05 05 05 FF 00 00 00 61 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 84 21 21 21 FF E9 E9 E9 FF FF FF FF FF CD A0' + '84 FF B5 4C 0B FF BD 5D 1E FF C1 64 25 FF C5 6B' + '2A FF C9 70 30 FF CB 74 34 FF CD 77 37 FF CD 78' + '38 FF CD 78 38 FF CD 78 37 FF CC 75 35 FF CA 72' + '32 FF C7 6D 2D FF C3 67 27 FF BF 60 21 FF BB 58' + '1A FF B5 4F 10 FF B4 4D 11 FF D8 C0 B2 FF D8 DB' + 'DE FF A9 A9 A9 FF 04 04 04 FF 00 00 00 61 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 84 20 20 20 FF E8 E8 E8 FF FF FF FF FF CA 9B' + '80 FF B0 44 02 FF B8 54 15 FF BC 5A 1C FF BF 60' + '21 FF C1 65 25 FF C4 68 28 FF C5 6B 2B FF C6 6C' + '2D FF C6 6D 2D FF C6 6C 2D FF C4 69 2A FF C2 66' + '26 FF C0 61 22 FF BD 5D 1E FF B9 57 19 FF B5 50' + '12 FF B0 47 08 FF B0 46 0A FF D8 C0 B2 FF DA DE' + 'E0 FF A8 A8 A8 FF 04 04 04 FF 00 00 00 61 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 84 20 20 20 FF E7 E7 E7 FF FF FF FF FF C6 96' + '7B FF AA 3B 00 FF B2 4A 0D FF B4 4F 11 FF B8 55' + '17 FF BD 5E 1F FF C2 65 25 FF C4 69 2A FF C5 6B' + '2C FF C6 6C 2C FF C6 6C 2C FF C4 69 2A FF C2 65' + '26 FF BE 5E 20 FF B8 55 17 FF B3 4C 0E FF AF 46' + '08 FF AB 3F 01 FF AD 43 06 FF DA C2 B4 FF DE E2' + 'E4 FF A7 A7 A7 FF 03 03 03 FF 00 00 00 61 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 84 1F 1F 1F FF E6 E6 E6 FF FF FF FF FF C2 93' + '78 FF A5 34 00 FF AB 40 03 FF B6 52 14 FF C1 64' + '26 FF C7 6E 2F FF CA 73 33 FF CC 77 36 FF CD 78' + '38 FF CD 79 38 FF CD 78 38 FF CC 77 37 FF CB 74' + '34 FF C8 6F 30 FF C4 69 2A FF BC 5C 1D FF AF 47' + '0A FF A7 3A 00 FF AC 43 06 FF DB C3 B5 FF E0 E4' + 'E7 FF A7 A7 A7 FF 03 03 03 FF 00 00 00 61 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 84 1E 1E 1E FF E5 E5 E5 FF FF FF FF FF C1 90' + '76 FF A6 36 00 FF BA 59 1A FF C8 6F 2F FF CC 75' + '35 FF CF 7A 3A FF D1 7F 3E FF D3 82 41 FF D4 83' + '42 FF D4 84 43 FF D4 83 42 FF D3 82 41 FF D1 7E' + '3E FF CF 7A 39 FF CC 75 35 FF C9 70 30 FF C3 67' + '27 FF B3 4D 0E FF AC 42 06 FF DC C4 B6 FF E3 E7' + 'EA FF A7 A7 A7 FF 02 02 02 FF 00 00 00 61 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 84 1D 1D 1D FF E4 E4 E4 FF FF FF FF FF BE 8E' + '73 FF B7 50 0E FF CA 72 32 FF CD 77 37 FF D1 7D' + '3D FF D4 83 43 FF D8 88 47 FF D9 8C 4B FF DB 8F' + '4D FF DB 8F 4D FF DB 8F 4D FF D9 8C 4B FF D8 88' + '47 FF D4 83 43 FF D1 7D 3D FF CD 76 36 FF C9 70' + '30 FF C4 67 27 FF B5 51 14 FF DC C3 B6 FF E6 EA' + 'EC FF A6 A6 A6 FF 01 01 01 FF 00 00 00 61 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 84 1C 1C 1C FF E2 E2 E2 FF FF FF FF FF C3 96' + '7A FF C4 65 22 FF CD 76 36 FF D2 7E 3E FF D6 85' + '44 FF DA 8C 4B FF DD 92 50 FF E0 97 54 FF E1 99' + '57 FF E2 99 58 FF E1 99 57 FF E0 97 54 FF DD 92' + '50 FF DA 8C 4B FF D6 85 44 FF D2 7E 3E FF CC 76' + '36 FF C7 6D 2D FF C2 65 27 FF DE C6 B9 FF E8 EB' + 'EE FF A6 A6 A6 FF 01 01 01 FF 00 00 00 61 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 84 1B 1B 1B FF E1 E1 E1 FF FF FF FF FF C5 9A' + '7E FF C8 6C 28 FF D1 7D 3C FF D6 85 44 FF DA 8D' + '4B FF DF 94 52 FF E3 9B 59 FF E6 A1 5E FF E8 A4' + '62 FF E9 A5 62 FF E8 A4 62 FF E6 A1 5E FF E3 9B' + '59 FF DF 94 52 FF DA 8D 4B FF D6 85 44 FF D0 7D' + '3C FF CA 72 31 FF C7 6D 2E FF E5 CE C1 FF F4 F8' + 'FA FF A7 A7 A7 FF 00 00 00 FF 00 00 00 61 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 84 1A 1A 1A FF E0 E0 E0 FF FF FF FF FF BC 8D' + '70 FF C7 68 23 FF D4 81 3E FF D9 89 46 FF DE 92' + '4E FF E4 9A 56 FF E9 A2 5E FF ED AA 65 FF F0 AE' + '6A FF F1 B0 6B FF F0 AE 6A FF ED AA 65 FF E9 A2' + '5E FF E4 9A 56 FF DE 92 4E FF D9 89 46 FF D4 80' + '3D FF CE 76 33 FF C2 63 23 FF E9 D0 C2 FF FF FF' + 'FF FF AA AA AA FF 00 00 00 FF 00 00 00 61 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 84 1A 1A 1A FF E0 E0 E0 FF FF FF FF FF B5 8D' + '76 FF B4 60 29 FF CF 88 4F FF D4 90 56 FF D9 98' + '5D FF DE A0 65 FF E3 A8 6D FF E7 AF 74 FF EB B5' + '79 FF EC B7 7B FF EB B5 79 FF E7 AF 74 FF E3 A8' + '6D FF DE A0 65 FF D8 98 5D FF D3 90 56 FF CF 87' + '4E FF C7 7C 44 FF B0 5D 2B FF E8 D3 C8 FF FF FF' + 'FF FF AB AB AB FF 00 00 00 FF 00 00 00 61 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 84 15 15 15 FF DB DB DB FF FF FF FF FF EE EC' + 'EC FF E7 E4 E2 FF EB E7 E4 FF EB E8 E5 FF EC E8' + 'E5 FF EC E9 E6 FF EC E9 E6 FF EC EA E7 FF ED EA' + 'E7 FF ED EA E7 FF ED EA E7 FF EC EA E7 FF EC E9' + 'E6 FF EB E8 E5 FF EA E8 E5 FF EA E7 E4 FF EA E6' + 'E3 FF E8 E4 E2 FF E6 E3 E2 FF F8 F8 F7 FF FF FF' + 'FF FF A7 A7 A7 FF 00 00 00 FF 00 00 00 61 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 6C 00 00 00 FF 8E 8E 8E FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF F4 F4' + 'F4 FF 58 58 58 FF 00 00 00 FD 00 00 00 45 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 16 00 00 00 D5 0A 0A 0A FF 53 53 53 FF 74 74' + '74 FF 72 72 72 FF 72 72 72 FF 72 72 72 FF 72 72' + '72 FF 72 72 72 FF 72 72 72 FF 71 71 71 FF 71 71' + '71 FF 71 71 71 FF 71 71 71 FF 71 71 71 FF 71 71' + '71 FF 71 71 71 FF 71 71 71 FF 71 71 71 FF 70 70' + '70 FF 70 70 70 FF 70 70 70 FF 6F 6F 6F FF 3F 3F' + '3F FF 02 02 02 FF 00 00 00 B2 00 00 00 05 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 28 00 00 00 B1 00 00 00 EF 00 00' + '00 F1 00 00 00 F0 00 00 00 F0 00 00 00 F0 00 00' + '00 F0 00 00 00 F0 00 00 00 F0 00 00 00 F0 00 00' + '00 F0 00 00 00 F0 00 00 00 F0 00 00 00 F0 00 00' + '00 F0 00 00 00 F0 00 00 00 F0 00 00 00 F0 00 00' + '00 F0 00 00 00 F0 00 00 00 F0 00 00 00 F2 00 00' + '00 E8 00 00 00 97 00 00 00 15 00 00 00 00 00 00' + '00 00 00 00 00 00 FF 00 00 FF FE 00 00 7F FE 00' + '00 7F FE 00 00 7F FE 00 00 7F FE 00 00 7F FE 00' + '00 7F FF 00 00 FF FF 00 00 FF FF 80 01 FF F0 00' + '00 0F E0 00 00 07 C0 00 00 03 C0 00 00 03 C0 00' + '00 03 C0 00 00 03 C0 00 00 03 C0 00 00 03 C0 00' + '00 03 C0 00 00 03 C0 00 00 03 C0 00 00 03 C0 00' + '00 03 C0 00 00 03 C0 00 00 03 C0 00 00 03 C0 00' + '00 03 C0 00 00 03 C0 00 00 03 C0 00 00 03 C0 00' + '00 03 E0 00 00 07 28 00 00 00 10 00 00 00 20 00' + '00 00 01 00 20 00 00 00 00 00 00 04 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 03 01 01' + '01 7C 08 08 08 AD 08 08 08 A8 08 08 08 A8 08 08' + '08 A8 08 08 08 A8 08 08 08 AD 01 01 01 6D 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 31 57 57' + '57 FA CE CE CE FF BB BB BB FF B1 B1 B1 FF A8 A8' + 'A8 FF 9D 9D 9D FF 8D 8D 8D FF 30 30 30 F2 00 00' + '00 23 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 3A 7B 7B' + '7B FC FF FF FF FF F5 F5 F5 FF EC EC EC FF DD DD' + 'DD FF CA CA CA FF BA BA BA FF 4C 4C 4C F7 00 00' + '00 28 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 0D 37 37' + '37 D7 F5 F5 F5 FF FF FF FF FF E2 E2 E2 FF D9 D9' + 'D9 FF E6 E6 E6 FF B7 B7 B7 FF 1C 1C 1C C5 00 00' + '00 05 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 45 59 59 59 EB E5 E5 E5 FF F1 F1 F1 FF EA EA' + 'EA FF C2 C2 C2 FF 3B 3B 3B E1 00 00 00 35 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 12 02 02 02 78 06 06 06 96 05 06' + '06 8A 00 00 00 C6 16 16 16 FF 77 77 77 FF 66 66' + '66 FF 11 11 11 FF 00 00 00 BC 07 07 07 89 07 07' + '07 96 02 02 02 73 00 00 00 0E 00 00 00 00 00 00' + '00 00 03 03 03 9C 94 94 93 FF D1 D4 D7 FF C7 CD' + 'D0 FF C3 C7 CA FF B9 BD C0 FF C2 C6 C9 FF BB BF' + 'C2 FF B0 B4 B8 FF B2 B7 BA FF B0 B5 B9 FF B1 B4' + 'B6 FF 6E 6D 6D FF 00 00 00 84 00 00 00 00 00 00' + '00 00 19 19 1A CC EC ED ED FF ED C9 B1 FF E6 B4' + '8F FF EB BF 9B FF ED C4 A0 FF EB C3 9E FF E8 C0' + '9B FF E5 BA 95 FF DD AF 8B FF D4 9E 79 FF D9 B9' + 'A5 FF B9 BB BD FF 09 0A 0A A8 00 00 00 00 00 00' + '00 00 1A 1B 1B CC EB EC ED FF CC 86 58 FF C2 5E' + '17 FF CE 75 30 FF D5 80 3B FF D8 85 40 FF D6 82' + '3D FF D1 78 34 FF C8 6A 26 FF BA 4F 08 FF CC 8E' + '68 FF B8 BC C0 FF 09 09 09 A8 00 00 00 00 00 00' + '00 00 19 1A 1A CC EA EB EC FF C7 81 57 FF B9 53' + '12 FF C2 66 26 FF C7 6E 2E FF CA 71 32 FF C8 6F' + '30 FF C4 68 29 FF BD 5C 1E FF B1 45 04 FF C9 8C' + '68 FF BA BE C1 FF 08 09 09 A8 00 00 00 00 00 00' + '00 00 18 19 1A CC E9 EA EB FF BE 73 4A FF AF 44' + '03 FF C0 62 23 FF C6 6D 2D FF C9 71 31 FF C8 70' + '30 FF C4 69 2A FF BB 5A 1B FF A9 39 00 FF C7 88' + '65 FF BC C1 C4 FF 08 08 08 A8 00 00 00 00 00 00' + '00 00 18 18 19 CC E6 E7 E8 FF C1 7A 4F FF C2 62' + '1F FF D0 7C 3C FF D5 85 44 FF D7 88 47 FF D7 87' + '46 FF D3 81 40 FF CC 76 36 FF BB 57 13 FF CC 8F' + '6C FF BD C1 C4 FF 07 08 08 A8 00 00 00 00 00 00' + '00 00 16 17 18 CC E3 E4 E4 FF CD 8D 60 FF D0 78' + '33 FF DA 8C 49 FF E2 98 54 FF E6 9F 5B FF E4 9C' + '59 FF DE 92 4F FF D6 84 42 FF C9 6B 26 FF DA A2' + '7C FF C1 C5 C8 FF 07 07 07 A8 00 00 00 00 00 00' + '00 00 17 17 18 CC E4 E4 E5 FF CA 90 6A FF D5 89' + '4B FF E1 9F 63 FF EB AE 71 FF F0 B9 7A FF EE B5' + '77 FF E6 A7 6A FF DC 97 5B FF CC 7B 3D FF DF AD' + '8D FF D0 D4 D7 FF 06 07 07 A8 00 00 00 00 00 00' + '00 00 09 09 09 C1 CB CC CC FF FA F6 F4 FF F2 EE' + 'EA FF F4 F0 EC FF F4 F1 EE FF F4 F2 EE FF F4 F2' + 'EE FF F4 F0 ED FF F2 EF EA FF F0 EB E8 FF FD FA' + 'F8 FF AF AF AF FF 00 00 00 9F 00 00 00 00 00 00' + '00 00 00 00 00 4A 1E 1E 1D E2 45 46 47 F3 43 45' + '46 F0 42 43 45 F0 42 43 44 F0 42 43 44 F0 42 43' + '44 F0 42 43 44 F0 42 43 44 F0 42 44 45 F0 41 42' + '43 F4 16 16 16 D9 00 00 00 39 00 00 00 00 E0 0F' + '00 00 E0 07 00 00 E0 07 00 00 E0 07 00 00 F0 0F' + '00 00 80 01 00 00 80 01 00 00 80 01 00 00 80 01' + '00 00 80 01 00 00 80 01 00 00 80 01 00 00 80 01' + '00 00 80 01 00 00 80 01 00 00 80 01 00 00' +} */ + + + + +/* BINRES desktop.ico */ +34 ICON desktop.ico +/* { + '00 00 01 00 09 00 20 20 00 00 01 00 08 00 A8 08' + '00 00 96 00 00 00 10 10 00 00 01 00 08 00 68 05' + '00 00 3E 09 00 00 20 20 00 00 01 00 20 00 A8 10' + '00 00 A6 0E 00 00 10 10 00 00 01 00 20 00 68 04' + '00 00 4E 1F 00 00 10 10 00 00 01 00 04 00 28 01' + '00 00 B6 23 00 00 20 20 00 00 01 00 04 00 E8 02' + '00 00 DE 24 00 00 30 30 00 00 01 00 08 00 A8 0E' + '00 00 C6 27 00 00 30 30 00 00 01 00 20 00 A8 25' + '00 00 6E 36 00 00 30 30 00 00 01 00 04 00 68 06' + '00 00 16 5C 00 00 28 00 00 00 20 00 00 00 40 00' + '00 00 01 00 08 00 00 00 00 00 00 04 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 11 11 11 00 33 33 33 00 66 33 00 00 44 44' + '44 00 55 55 55 00 66 66 66 00 77 77 77 00 7F 7F' + '7F 00 99 00 00 00 99 33 00 00 99 33 33 00 CC 33' + '00 00 CC 33 33 00 99 66 00 00 99 66 33 00 CC 66' + '00 00 CC 66 33 00 99 66 66 00 CC 66 66 00 FF 66' + '66 00 99 99 33 00 CC 99 33 00 FF 99 33 00 99 99' + '66 00 CC 99 66 00 FF 99 66 00 CC CC 66 00 FF CC' + '66 00 88 88 88 00 99 99 99 00 AA AA AA 00 BB BB' + 'BB 00 CC 99 99 00 FF 99 99 00 CC CC 99 00 FF CC' + '99 00 99 99 CC 00 CC CC CC 00 DD DD DD 00 FF CC' + 'CC 00 CC FF CC 00 CC CC FF 00 CC FF FF 00 EE EE' + 'EE 00 FF FF FF 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 C0 17 95 00 00 00 38 00 A8 44' + 'F9 77 15 00 00 00 78 0A 38 00 00 00 38 00 B0 6C' + '38 00 98 17 95 00 00 00 00 00 E0 19 95 00 F0 88' + 'FA 77 70 38 F5 77 FF FF FF FF A8 44 F9 77 70 7D' + 'F5 77 3A 8A F5 77 96 00 00 00 96 00 00 00 09 00' + '00 00 B0 18 95 00 00 00 00 00 CB 44 F9 77 38 9F' + '07 00 CD 8B F5 77 78 13 05 00 37 90 F5 77 00 00' + '00 00 3E 8A F5 77 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 10 00' + '00 00 00 00 00 00 58 00 5A 00 00 EC FD 7F 1A 02' + '00 00 4C 16 95 00 40 9F 07 00 FC 15 95 00 FF FF' + 'FF FF B4 1A 95 00 45 00 00 00 28 02 00 00 FF FF' + 'FF FF E2 D8 F5 77 7D 9B F5 77 94 B6 01 00 00 00' + '05 00 F4 17 95 00 80 00 10 C0 B4 1A 95 00 F0 88' + 'FA 77 88 1C F5 77 FF FF FF FF 37 90 F5 77 00 00' + '00 00 3E 8A F5 77 9B B2 E7 77 B7 00 00 00 02 00' + '00 00 A4 1A 95 00 01 00 00 00 18 00 00 00 00 00' + '00 00 10 19 95 00 42 00 00 00 00 00 00 00 F4 18' + '95 00 00 00 00 00 00 00 00 00 00 00 00 00 0C 00' + '00 00 02 00 00 00 01 01 F5 77 00 EC FD 7F 58 00' + '00 00 00 00 00 00 03 00 00 00 60 00 1A 02 40 9F' + '07 00 00 00 00 00 40 9F 07 00 05 00 00 00 BE B3' + 'E7 77 4C 19 95 00 A3 B4 E7 77 F8 00 00 00 00 00' + '00 C0 00 00 00 00 00 00 00 00 02 00 00 00 80 00' + '00 00 00 00 00 00 8C 1A 95 00 7F E9 4B 00 00 63' + '38 00 00 00 00 C0 00 00 00 00 80 1A 95 00 02 00' + '00 00 80 00 00 00 00 00 00 00 C0 27 95 00 C4 F5' + 'AF 00 02 00 00 00 44 3A 5C 6F 73 65 78 70 65 72' + '74 73 5C 72 65 61 63 74 6F 73 5C 6C 69 62 5C 73' + '68 65 6C 6C 33 32 5C 64 65 73 6B 74 6F 70 2E 69' + '63 6F 00 93 4B 00 14 1A 95 00 1F 3B D4 77 15 00' + '00 00 A8 00 00 00 4F 3B D4 77 E0 19 95 00 33 3B' + 'D4 77 64 C5 F5 77 A9 F1 E7 77 F8 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 1A 95 00 B0 6C' + '38 00 96 00 00 00 00 00 00 00 C9 F1 E7 77 96 00' + '00 00 A4 1A 95 00 09 00 00 00 00 00 00 00 96 00' + '00 00 96 00 00 00 09 00 00 00 F4 19 95 00 33 3B' + 'D4 77 B4 1A 95 00 09 48 E9 77 B8 10 E9 77 FF FF' + 'FF FF C9 F1 E7 77 16 EA 4B 00 F8 00 00 00 B0 6C' + '38 00 96 00 00 00 58 1A 95 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E' + '2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 00 00 00 2E' + '2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E' + '2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 00 2E 2E' + '04 1F 20 1F 1F 1F 1F 1F 1F 1F 1F 1F 1F 1F 1F 1E' + '21 1F 1F 1E 1E 1F 1E 1F 1E 1F 06 2E 2E 2E 2E 02' + '2C 2D 2D 2D 2D 2D 2D 2C 2C 2D 2C 2C 2C 2C 28 2C' + '29 27 27 27 27 27 26 26 26 26 27 06 2E 2E 2E 07' + '2D 2D 2D 2D 2D 2D 2C 2D 2C 2A 2D 2C 27 2B 2C 27' + '2A 27 27 29 27 27 2A 27 27 26 26 1E 2E 2E 2E 07' + '2D 2D 28 19 21 1B 22 21 24 24 24 23 24 22 23 24' + '24 22 23 22 21 21 1A 19 23 26 26 1F 2E 2E 2E 1D' + '2D 2D 19 11 10 11 16 16 11 16 13 17 19 16 17 13' + '16 16 11 16 11 10 0B 10 19 26 27 1E 2E 2E 2E 07' + '2D 2D 21 0E 11 11 11 11 11 19 17 19 16 1A 13 16' + '19 11 16 11 10 11 11 0E 13 27 26 1F 2E 2E 2E 07' + '2D 2D 21 10 11 11 0F 11 16 11 11 16 11 16 16 11' + '16 11 11 11 11 0F 10 0C 19 27 26 1E 2E 2E 2E 07' + '2D 2D 19 10 0B 10 11 16 11 11 16 11 16 11 11 16' + '11 11 11 10 0F 10 11 0A 19 26 27 1F 2E 2E 2E 07' + '2D 2D 21 0A 10 0F 10 0D 11 11 0F 11 11 16 11 11' + '11 11 11 11 0C 0A 0C 0E 13 2C 27 1E 2E 2E 2E 07' + '2D 2D 18 0C 0E 0D 11 10 0F 10 11 11 11 11 11 11' + '11 0E 11 0A 12 18 0F 09 16 2A 27 1E 2E 2E 2E 07' + '2D 2D 21 0A 0C 0E 0A 11 11 11 11 16 11 11 11 11' + '11 11 10 0F 2B 2D 1E 0A 13 29 27 1E 2E 2E 2E 07' + '2D 2D 19 0A 0A 0A 11 11 16 11 11 11 16 11 11 16' + '11 16 11 12 27 26 2A 03 16 2C 27 1F 2E 2E 2E 07' + '2D 2D 19 0A 10 11 11 11 11 19 16 11 11 19 11 11' + '17 11 11 0F 20 2C 1E 0A 13 27 27 1E 2E 2E 2E 06' + '2D 2D 21 0A 11 11 16 11 16 16 14 16 19 17 19 16' + '19 11 16 11 11 0F 11 0A 16 2C 2C 1E 2E 2E 2E 07' + '2D 2D 18 10 11 16 11 17 13 16 16 1A 16 19 17 19' + '16 1A 11 15 12 15 0F 11 13 27 2C 1E 2E 2E 2E 06' + '2D 2D 19 11 11 11 16 13 16 19 1A 19 19 1A 19 1A' + '14 16 16 21 20 1F 25 0E 19 2C 2C 1E 2E 2E 2E 07' + '2D 2D 13 11 11 16 19 17 19 17 19 1A 1A 1B 1A 19' + '1B 1A 16 12 2C 27 1F 11 19 2C 2D 1E 2E 2E 2E 06' + '2D 2D 18 11 16 1A 11 19 1A 19 1C 1A 1B 1A 1B 1A' + '1A 19 17 19 20 2C 21 0E 13 2D 2D 1E 2E 2E 2E 06' + '2D 2D 12 10 11 16 19 17 19 1A 19 1C 1A 1C 1A 1B' + '1A 19 19 16 12 0F 15 0D 19 2D 2D 1E 2E 2E 2E 06' + '2D 2D 2C 26 27 27 27 27 27 27 27 27 27 27 27 27' + '27 27 27 28 27 27 28 26 2C 2D 2D 1E 2E 2E 2E 02' + '2D 2D 2D 2D 2D 2D 2D 2D 2D 2D 2D 2D 2D 2D 2D 2D' + '2D 2D 2D 2D 2D 2D 2D 2D 2D 2D 2D 06 2E 2E 2E 2E' + '05 26 26 27 26 27 27 26 27 26 27 27 26 27 26 27' + '27 26 27 26 27 26 27 26 26 26 1D 2E 2E 2E 2E 2E' + '2E 2E 01 01 01 2E 01 01 01 01 2E 01 01 01 01 2E' + '01 01 01 01 2E 01 01 01 01 2E 2E 2E 2E 00 00 00' + '2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E' + '2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF' + 'FF FF FF FF FF FF FF FF FF FF C0 00 00 03 80 00' + '00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 01 C0 00' + '00 03 FF FF FF FF FF FF FF FF FF FF FF FF 28 00' + '00 00 10 00 00 00 20 00 00 00 01 00 08 00 00 00' + '00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 11 00 00 00 00 11' + '00 00 00 00 11 00 11 11 11 00 33 33 33 00 44 44' + '44 00 55 55 55 00 7F 7F 7F 00 99 33 00 00 CC 33' + '00 00 99 66 00 00 99 66 33 00 CC 66 00 00 CC 66' + '33 00 CC 66 66 00 CC 99 33 00 FF 99 33 00 99 99' + '66 00 CC 99 66 00 FF 99 66 00 FF CC 66 00 99 99' + '99 00 AA AA AA 00 BB BB BB 00 CC 99 99 00 FF 99' + '99 00 CC CC 99 00 FF CC 99 00 CC 99 CC 00 99 CC' + 'CC 00 CC CC CC 00 DD DD DD 00 FF CC CC 00 FF FF' + 'CC 00 FF CC FF 00 EE EE EE 00 FF FF FF 00 00 00' + '00 00 DD DD DD 00 FF CC CC 00 CC FF CC 00 CC CC' + 'FF 00 CC FF FF 00 EE EE EE 00 FF FF FF 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 C0 17' + '95 00 00 00 38 00 A8 44 F9 77 15 00 00 00 78 0A' + '38 00 00 00 38 00 B0 6C 38 00 98 17 95 00 00 00' + '00 00 E0 19 95 00 F0 88 FA 77 70 38 F5 77 FF FF' + 'FF FF A8 44 F9 77 70 7D F5 77 3A 8A F5 77 96 00' + '00 00 96 00 00 00 09 00 00 00 B0 18 95 00 00 00' + '00 00 CB 44 F9 77 38 9F 07 00 CD 8B F5 77 78 13' + '05 00 37 90 F5 77 00 00 00 00 3E 8A F5 77 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 10 00 00 00 00 00 00 00 58 00' + '5A 00 00 EC FD 7F 1A 02 00 00 4C 16 95 00 40 9F' + '07 00 FC 15 95 00 FF FF FF FF B4 1A 95 00 45 00' + '00 00 28 02 00 00 FF FF FF FF E2 D8 F5 77 7D 9B' + 'F5 77 94 B6 01 00 00 00 05 00 F4 17 95 00 80 00' + '10 C0 B4 1A 95 00 F0 88 FA 77 88 1C F5 77 FF FF' + 'FF FF 37 90 F5 77 00 00 00 00 3E 8A F5 77 9B B2' + 'E7 77 B7 00 00 00 02 00 00 00 A4 1A 95 00 01 00' + '00 00 18 00 00 00 00 00 00 00 10 19 95 00 42 00' + '00 00 00 00 00 00 F4 18 95 00 00 00 00 00 00 00' + '00 00 00 00 00 00 0C 00 00 00 02 00 00 00 01 01' + 'F5 77 00 EC FD 7F 58 00 00 00 00 00 00 00 03 00' + '00 00 60 00 1A 02 40 9F 07 00 00 00 00 00 40 9F' + '07 00 05 00 00 00 BE B3 E7 77 4C 19 95 00 A3 B4' + 'E7 77 F8 00 00 00 00 00 00 C0 00 00 00 00 00 00' + '00 00 02 00 00 00 80 00 00 00 00 00 00 00 8C 1A' + '95 00 7F E9 4B 00 00 63 38 00 00 00 00 C0 00 00' + '00 00 80 1A 95 00 02 00 00 00 80 00 00 00 00 00' + '00 00 C0 27 95 00 C4 F5 AF 00 02 00 00 00 44 3A' + '5C 6F 73 65 78 70 65 72 74 73 5C 72 65 61 63 74' + '6F 73 5C 6C 69 62 5C 73 68 65 6C 6C 33 32 5C 64' + '65 73 6B 74 6F 70 2E 69 63 6F 00 93 4B 00 14 1A' + '95 00 1F 3B D4 77 15 00 00 00 A8 00 00 00 4F 3B' + 'D4 77 E0 19 95 00 33 3B D4 77 64 C5 F5 77 A9 F1' + 'E7 77 F8 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 1A 95 00 B0 6C 38 00 96 00 00 00 00 00' + '00 00 C9 F1 E7 77 96 00 00 00 A4 1A 95 00 09 00' + '00 00 00 00 00 00 96 00 00 00 96 00 00 00 09 00' + '00 00 F4 19 95 00 33 3B D4 77 B4 1A 95 00 09 48' + 'E9 77 B8 10 E9 77 FF FF FF FF C9 F1 E7 77 16 EA' + '4B 00 F8 00 00 00 B0 6C 38 00 96 00 00 00 58 1A' + '95 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 26 26 26 26 26 26 26 26 26 26' + '02 26 26 26 26 26 26 16 1F 1F 18 18 18 18 17 18' + '17 17 17 17 07 26 06 25 25 23 22 24 22 24 20 21' + '20 20 20 20 17 01 06 25 13 10 0E 14 13 13 14 13' + '10 0E 0E 19 18 03 06 25 13 09 10 0E 10 0E 10 0E' + '0E 0E 0B 1C 17 26 06 25 0F 0D 0C 0E 0E 10 0E 0E' + '0E 0B 0A 19 1E 26 06 25 0C 0D 0A 0E 0E 0D 0E 0E' + '0E 17 0C 19 18 26 06 25 0E 09 10 0E 0E 0F 10 0E' + '0C 20 0F 19 1F 26 06 25 0F 0E 0E 10 13 11 13 10' + '0E 0C 0C 1B 1D 02 05 25 13 0E 10 13 14 13 11 13' + '0F 1F 12 1A 18 26 06 25 0E 0E 10 14 10 15 13 11' + '13 17 0E 1B 1F 26 05 25 18 1B 21 1B 20 21 21 20' + '1C 18 1B 24 20 26 04 17 24 24 20 24 24 20 24 20' + '24 24 20 24 07 26 26 26 04 26 04 04 26 04 26 04' + '04 26 04 26 26 26 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 FF FF 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 FF FF 00 00 28 00 00 00 20 00 00 00 40 00' + '00 00 01 00 20 00 00 00 00 00 00 10 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 23 00 00 00 58 00 00' + '00 61 00 00 00 61 00 00 00 61 00 00 00 61 00 00' + '00 61 00 00 00 61 00 00 00 61 00 00 00 61 00 00' + '00 61 00 00 00 61 00 00 00 61 00 00 00 61 00 00' + '00 61 00 00 00 61 00 00 00 61 00 00 00 61 00 00' + '00 61 00 00 00 61 00 00 00 61 00 00 00 61 00 00' + '00 61 00 00 00 61 00 00 00 61 00 00 00 61 00 00' + '00 3D 00 00 00 08 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 6E 00 00 00 E7 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 01 01 01 FF 01 01 01 FF 01 01' + '01 FF 01 01 01 FF 01 01 01 FF 01 01 01 FF 01 01' + '01 FF 01 01 01 FF 02 02 02 FF 02 02 02 FF 02 02' + '02 FF 02 02 02 FF 02 02 02 FF 00 00 00 FF 00 00' + '00 F7 00 00 00 A7 00 00 00 1D 00 00 00 00 00 00' + '00 5D 00 00 00 FF 47 47 47 FF AA AA AA FF B6 B6' + 'B6 FF B2 B2 B2 FF B1 B1 B1 FF B1 B1 B1 FF AF AF' + 'AF FF AE AE AE FF AE AE AE FF AD AD AD FF AC AC' + 'AC FF AC AC AC FF AB AB AB FF AA AA AA FF A9 A9' + 'A9 FF A8 A8 A8 FF A7 A7 A7 FF A7 A7 A7 FF A5 A5' + 'A5 FF A5 A5 A5 FF A4 A4 A4 FF A3 A3 A3 FF A2 A2' + 'A2 FF A1 A1 A1 FF A2 A2 A2 FF A3 A3 A3 FF 64 64' + '64 FF 05 05 05 FF 00 00 00 AB 00 00 00 0A 00 00' + '00 CF 38 38 38 FF F0 F0 F0 FF FF FF FF FF FF FF' + 'FF FF FE FF FF FF FC FC FC FF F9 FA FA FF F7 F7' + 'F7 FF F4 F5 F5 FF F2 F3 F3 FF F0 F1 F1 FF EE EE' + 'EE FF EC EC EC FF E9 EA EA FF E7 E7 E7 FF E5 E5' + 'E5 FF E3 E3 E3 FF E0 E0 E1 FF DE DE DE FF DC DC' + 'DC FF D9 D9 DA FF D7 D7 D8 FF D5 D5 D5 FF D3 D3' + 'D3 FF D0 D0 D0 FF CE CE CE FF CE CE CE FF DE DE' + 'DE FF 66 66 66 FF 00 00 00 FD 00 00 00 41 00 00' + '00 F2 7C 7C 7C FF FF FF FF FF FA FA FA FF FA FC' + 'FD FF F9 FC FF FF F7 FA FC FF F4 F7 FA FF F3 F6' + 'F8 FF F1 F3 F6 FF EE F1 F4 FF EC EF F2 FF EA ED' + 'F0 FF E8 EB ED FF E7 E9 EC FF E4 E7 E9 FF E2 E5' + 'E8 FF E1 E3 E6 FF DF E2 E4 FF DD E0 E2 FF DB DE' + 'E1 FF D9 DD DF FF D8 DB DD FF D6 D9 DC FF D4 D8' + 'DA FF D3 D6 D9 FF D0 D2 D4 FF C6 C6 C6 FF CF CF' + 'CF FF A3 A3 A3 FF 01 01 01 FF 00 00 00 63 00 00' + '00 F0 7E 7E 7E FF FF FF FF FF FD FE FE FF E2 C8' + 'B7 FF DA A0 77 FF DE A9 82 FF E1 AE 86 FF E4 B2' + '8A FF E6 B6 8F FF E9 BB 92 FF EA BD 95 FF EC C0' + '98 FF ED C2 9A FF EE C3 9A FF EE C2 9A FF EC C1' + '99 FF EB BF 97 FF E9 BC 94 FF E7 B8 90 FF E4 B4' + '8C FF E2 B0 88 FF DF AB 84 FF DC A6 7F FF D9 A1' + '7A FF D4 97 6E FF E0 B8 9F FF D1 D2 D3 FF CE CF' + 'CF FF A2 A2 A2 FF 01 01 01 FF 00 00 00 61 00 00' + '00 F0 7D 7D 7D FF FF FF FF FF FF FF FF FF CC A0' + '82 FF BD 56 0F FF C5 66 23 FF CA 6E 2B FF CE 76' + '31 FF D2 7D 38 FF D6 83 3E FF D9 89 43 FF DC 8D' + '47 FF DE 90 4A FF DF 91 4B FF DF 91 4B FF DD 8F' + '49 FF DB 8C 46 FF D8 87 42 FF D6 81 3C FF D1 7B' + '37 FF CD 73 2F FF C8 6C 28 FF C4 64 21 FF BF 5C' + '1A FF B6 4B 06 FF CD 87 5B FF D4 D7 D8 FF D1 D2' + 'D3 FF A1 A1 A1 FF 01 01 01 FF 00 00 00 61 00 00' + '00 F0 7B 7B 7B FF FF FF FF FF FF FF FF FF CE A3' + '87 FF BD 59 16 FF C4 68 29 FF C8 6F 30 FF CC 76' + '35 FF D0 7C 3B FF D3 81 40 FF D6 86 44 FF D7 89' + '48 FF D9 8C 4A FF DA 8C 4B FF DA 8C 4B FF D9 8B' + '49 FF D7 88 47 FF D4 84 43 FF D2 7F 3F FF CF 7A' + '3A FF CB 74 34 FF C7 6D 2D FF C3 66 27 FF BE 5E' + '20 FF B6 4E 0D FF CD 8A 60 FF D6 D8 DA FF D4 D4' + 'D5 FF A1 A1 A1 FF 00 00 00 FF 00 00 00 61 00 00' + '00 F0 7B 7B 7B FF FF FF FF FF FF FF FF FF CD A1' + '85 FF B9 52 11 FF C0 61 23 FF C4 68 2A FF C8 6F' + '2F FF CB 74 34 FF CE 79 38 FF D1 7D 3C FF D2 80' + '3F FF D4 82 42 FF D3 83 42 FF D3 83 42 FF D3 82' + '41 FF D1 7F 3E FF D0 7C 3B FF CD 77 37 FF CA 72' + '33 FF C7 6D 2D FF C3 66 28 FF BF 60 21 FF BB 59' + '1A FF B2 49 07 FF CB 86 5D FF D8 D9 DB FF D6 D7' + 'D7 FF A1 A1 A1 FF 00 00 00 FF 00 00 00 61 00 00' + '00 F0 7A 7A 7A FF FF FF FF FF FF FF FF FF CB 9E' + '82 FF B5 4C 0A FF BC 5B 1C FF C0 62 22 FF C4 67' + '28 FF C6 6C 2C FF C9 70 31 FF CB 74 34 FF CD 77' + '37 FF CD 79 39 FF CE 79 39 FF CE 79 39 FF CE 78' + '37 FF CC 76 36 FF CB 73 33 FF C8 6F 2F FF C5 6B' + '2B FF C2 65 26 FF BF 60 21 FF BC 59 1A FF B7 53' + '15 FF AE 42 01 FF C8 82 5A FF DA DC DC FF D7 D8' + 'D8 FF A0 A0 A0 FF 00 00 00 FF 00 00 00 61 00 00' + '00 F0 78 78 78 FF FF FF FF FF FF FF FF FF C7 99' + '7E FF B1 46 03 FF B8 54 15 FF BB 5A 1B FF BE 5F' + '20 FF C1 64 25 FF C4 68 29 FF C5 6B 2C FF C7 6D' + '2E FF C8 6F 2F FF C8 6F 2F FF C8 6F 2F FF C7 6E' + '2E FF C6 6C 2C FF C5 6A 2A FF C2 66 27 FF C0 62' + '23 FF BF 5E 1E FF B7 51 10 FF A9 44 05 FF B2 47' + '07 FF AC 3C 00 FF C6 7F 57 FF DC DE DF FF DA DB' + 'DB FF 9F 9F 9F FF 00 00 00 FF 00 00 00 61 00 00' + '00 F0 77 77 77 FF FF FF FF FF FF FF FF FF C4 94' + '79 FF AC 3D 00 FF B3 4C 0F FF B7 52 14 FF B9 57' + '18 FF BB 5A 1C FF BE 5E 1F FF BF 62 23 FF C2 65' + '26 FF C4 68 28 FF C5 69 2A FF C5 69 2A FF C4 69' + '29 FF C2 66 27 FF C0 62 24 FF BD 5E 1F FF BC 5A' + '1A FF AE 4E 12 FF 9A 6B 4D FF AB 92 82 FF 96 57' + '32 FF A4 31 00 FF C6 7E 55 FF DE E0 E2 FF DD DE' + 'DE FF 9E 9E 9E FF 00 00 00 FF 00 00 00 61 00 00' + '00 F0 76 76 76 FF FF FF FF FF FF FF FF FF C0 90' + '76 FF A8 37 00 FF AF 45 07 FF B1 49 0B FF B3 4D' + '10 FF B9 57 18 FF C1 64 25 FF C5 6B 2B FF C7 6E' + '2E FF C8 70 30 FF C9 71 31 FF C9 71 31 FF C9 71' + '31 FF C8 70 2F FF C6 6C 2D FF C4 69 29 FF C3 5F' + '1C FF 93 5C 39 FF DC E4 EA FF ED F3 F6 FF A8 A9' + 'AB FF 86 2F 03 FF C9 7D 52 FF DF E1 E3 FF DE DF' + 'DF FF 9E 9E 9E FF 00 00 00 FF 00 00 00 61 00 00' + '00 F0 75 75 75 FF FF FF FF FF FF FF FF FF BE 8F' + '74 FF A6 35 00 FF AA 3D 01 FF B0 49 0B FF BD 5E' + '1F FF C6 6C 2C FF CA 72 32 FF CC 75 35 FF CD 77' + '37 FF CE 78 39 FF CE 7A 39 FF CE 7A 39 FF CE 79' + '39 FF CD 78 37 FF CC 75 36 FF CB 73 32 FF C9 6B' + '28 FF 96 71 57 FF DC E2 E7 FF D4 D0 CE FF C7 CD' + 'D1 FF 7B 34 0B FF CA 7D 50 FF E0 E3 E5 FF E0 E1' + 'E2 FF 9D 9D 9D FF 00 00 00 FF 00 00 00 61 00 00' + '00 F0 73 73 73 FF FF FF FF FF FF FF FF FF BD 8D' + '72 FF A6 34 00 FF B2 4C 0F FF C4 68 28 FF CA 72' + '32 FF CC 76 36 FF CF 79 39 FF D1 7D 3D FF D2 80' + '3F FF D3 82 42 FF D4 83 42 FF D4 83 42 FF D3 82' + '41 FF D2 81 40 FF D1 7E 3E FF D0 7B 3A FF D2 78' + '34 FF 9E 60 33 FF B4 B5 B4 FF E9 EF F2 FF AC A2' + '9C FF 8D 2C 00 FF C8 7E 54 FF E3 E5 E6 FF E2 E4' + 'E4 FF 9C 9C 9C FF 00 00 00 FF 00 00 00 61 00 00' + '00 F0 72 72 72 FF FF FF FF FF FF FF FF FF BA 8A' + '6E FF AF 43 05 FF C6 6C 2C FF CB 74 33 FF CE 77' + '37 FF D1 7D 3C FF D3 82 41 FF D6 86 44 FF D7 89' + '48 FF D9 8C 4A FF D9 8C 4B FF D9 8C 4B FF D9 8C' + '4A FF D8 8A 49 FF D7 87 46 FF D4 83 42 FF D2 7F' + '3F FF D2 78 34 FF AC 65 2F FF 9A 63 3B FF AD 59' + '21 FF B7 49 08 FF C4 7D 55 FF E5 E6 E7 FF E5 E6' + 'E7 FF 9B 9B 9B FF 00 00 00 FF 00 00 00 61 00 00' + '00 F0 6F 6F 6F FF FF FF FF FF FE FF FF FF BA 8B' + '70 FF BF 5D 1A FF CB 73 33 FF CE 78 38 FF D2 7E' + '3E FF D5 84 43 FF D8 8A 48 FF DB 8E 4C FF DE 92' + '50 FF DE 95 53 FF E0 96 54 FF E0 96 54 FF DF 95' + '53 FF DE 93 51 FF DC 8F 4E FF D9 8B 4A FF D8 86' + '43 FF BD 7D 4A FF A6 75 51 FF AA 75 4E FF 9F 6E' + '44 FF B5 59 18 FF CB 86 5D FF E5 E7 E8 FF E7 E7' + 'E8 FF 9A 9A 9A FF 00 00 00 FF 00 00 00 61 00 00' + '00 F0 6E 6E 6E FF FF FF FF FF FC FF FF FF BE 92' + '77 FF C6 67 24 FF CD 77 37 FF D1 7E 3E FF D5 85' + '43 FF D9 8B 4A FF DD 91 4F FF E0 96 54 FF E2 9A' + '58 FF E4 9E 5B FF E5 9F 5D FF E5 9F 5C FF E5 9E' + '5C FF E3 9B 59 FF E0 97 56 FF DE 93 51 FF D9 87' + '42 FF B8 97 7C FF B0 BA C2 FF B0 B5 BA FF A3 AA' + 'A9 FF A9 5B 22 FF D5 91 66 FF E7 E8 E9 FF EA EA' + 'EB FF 9A 9A 9A FF 00 00 00 FF 00 00 00 61 00 00' + '00 F0 6C 6C 6C FF FF FF FF FF FC FF FF FF BC 90' + '74 FF C8 6B 27 FF D0 7B 3B FF D4 83 42 FF D8 8A' + '48 FF DD 91 4F FF E1 97 56 FF E4 9E 5B FF E7 A2' + '60 FF EA A6 63 FF EA A9 65 FF EB A9 66 FF EA A7' + '64 FF E8 A4 61 FF E6 9F 5D FF E2 99 58 FF E1 91' + '4B FF B3 8D 6C FF D1 D6 DB FF E0 E3 E4 FF B3 AF' + 'AD FF B5 60 24 FF D4 92 67 FF F4 F6 F7 FF FA FA' + 'FB FF 9B 9B 9B FF 00 00 00 FF 00 00 00 61 00 00' + '00 F0 6B 6B 6B FF FF FF FF FF FC FF FF FF B3 82' + '67 FF C4 61 1C FF D4 80 3D FF D7 86 44 FF DC 8D' + '4B FF E0 95 52 FF E5 9C 59 FF E9 A3 60 FF ED AA' + '65 FF F0 AF 6A FF F2 B2 6D FF F2 B3 6D FF F1 B0' + '6C FF EE AC 67 FF EA A5 62 FF E6 9F 5B FF E7 99' + '53 FF B5 81 54 FF C4 C5 C6 FF DA DF E1 FF A6 95' + '89 FF BB 5B 17 FF CC 85 5A FF FA FC FD FF FF FF' + 'FF FF 9B 9B 9B FF 00 00 00 FF 00 00 00 61 00 00' + '00 F0 6A 6A 6A FF FF FF FF FF FD FF FF FF AC 84' + '6D FF AA 52 1C FF CB 80 44 FF D2 88 4A FF D6 8F' + '51 FF DB 96 58 FF DF 9E 60 FF E4 A5 66 FF E8 AC' + '6D FF EC B2 72 FF EE B6 76 FF EE B7 77 FF ED B4' + '74 FF E9 AE 6F FF E5 A8 69 FF E1 A1 62 FF DE 9A' + '5B FF CE 8B 50 FF A9 78 50 FF A5 76 50 FF AD 70' + '41 FF AE 59 20 FF C1 85 64 FF FD FF FF FF FF FF' + 'FF FF 9A 9A 9A FF 00 00 00 FF 00 00 00 61 00 00' + '00 F3 69 69 69 FF FF FF FF FF FF FF FF FF E2 E0' + 'E0 FF DA D6 D4 FF DE DA D6 FF DF DB D7 FF E0 DB' + 'D7 FF E0 DC D8 FF E0 DC D8 FF E1 DD D9 FF E1 DD' + 'D9 FF E1 DE D9 FF E1 DE DA FF E1 DE DA FF E1 DE' + 'DA FF E1 DD D9 FF E1 DD D9 FF E0 DC D8 FF DF DB' + 'D7 FF E1 DC D7 FF E4 DC D4 FF E3 DA D2 FF E1 D9' + 'D3 FF D8 D5 D3 FF E5 E3 E2 FF FE FE FE FF FF FF' + 'FF FF 9B 9B 9B FF 00 00 00 FF 00 00 00 63 00 00' + '00 DE 3A 3A 3A FF F2 F2 F2 FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FE FE' + 'FE FF 67 67 67 FF 00 00 00 FF 00 00 00 45 00 00' + '00 7A 01 01 01 FF 5D 5D 5D FF C3 C3 C3 FF D3 D3' + 'D3 FF D1 D1 D1 FF D1 D1 D1 FF D1 D1 D1 FF D1 D1' + 'D1 FF D1 D1 D1 FF D1 D1 D1 FF D1 D1 D1 FF D1 D1' + 'D1 FF D1 D1 D1 FF D1 D1 D1 FF D1 D1 D1 FF D1 D1' + 'D1 FF D1 D1 D1 FF D1 D1 D1 FF D1 D1 D1 FF D1 D1' + 'D1 FF D0 D0 D0 FF D0 D0 D0 FF CF CF CF FF CF CF' + 'CF FF CE CE CE FF CF CF CF FF C9 C9 C9 FF 7B 7B' + '7B FF 0B 0B 0B FF 00 00 00 BF 00 00 00 0A 00 00' + '00 07 00 00 00 98 00 00 00 FD 08 08 08 FF 11 11' + '11 FF 10 10 10 FF 10 10 10 FF 10 10 10 FF 10 10' + '10 FF 10 10 10 FF 10 10 10 FF 10 10 10 FF 10 10' + '10 FF 10 10 10 FF 10 10 10 FF 10 10 10 FF 10 10' + '10 FF 10 10 10 FF 10 10 10 FF 10 10 10 FF 10 10' + '10 FF 10 10 10 FF 10 10 10 FF 10 10 10 FF 10 10' + '10 FF 10 10 10 FF 11 11 11 FF 0C 0C 0C FF 00 00' + '00 FF 00 00 00 C4 00 00 00 24 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 40 00 00 00 7D 00 00' + '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' + '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' + '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' + '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' + '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' + '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' + '00 59 00 00 00 0A 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF' + 'FF FF FF FF FF FF FF FF FF FF C0 00 00 03 80 00' + '00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 01 C0 00' + '00 03 FF FF FF FF FF FF FF FF FF FF FF FF 28 00' + '00 00 10 00 00 00 20 00 00 00 01 00 20 00 00 00' + '00 00 00 04 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 21 00 00 00 92 05 05' + '05 A8 05 05 05 A8 05 05 05 A8 05 05 05 A8 06 06' + '06 A8 06 06 06 A8 06 06 06 A8 06 06 06 A8 06 06' + '06 A8 07 07 07 A8 07 07 07 A8 06 06 06 A8 00 00' + '00 78 00 00 00 0A 0E 0E 0E B9 98 98 98 FF C9 CB' + 'CC FF C2 C4 C6 FF BF C1 C2 FF BC BE BF FF B8 BA' + 'BC FF B6 B8 B9 FF B4 B5 B7 FF B0 B2 B4 FF AE B1' + 'B2 FF AC AE B0 FF AA AC AE FF AC AC AD FF 55 55' + '55 FF 01 01 01 72 43 43 43 F3 FF FF FF FF FD F5' + 'EF FF F8 EC E3 FF F7 EC E3 FF F5 EB E2 FF F2 E9' + 'E0 FF F0 E7 DE FF ED E4 DB FF E9 DF D6 FF E5 DA' + 'D2 FF E1 D5 CC FF DC D0 C7 FF DB D6 D3 FF B0 B0' + 'B1 FF 08 08 08 AB 48 48 49 F1 FD FE FF FF CF 91' + '67 FF CA 71 31 FF D5 85 47 FF DC 90 52 FF E0 99' + '59 FF E2 9B 5B FF E0 98 59 FF DC 90 51 FF D5 84' + '46 FF CB 76 38 FF C4 66 27 FF D4 B1 9B FF B0 B5' + 'B8 FF 08 08 08 A9 46 47 47 F0 FD FE FF FF C8 84' + '58 FF C0 5D 19 FF CA 71 30 FF D0 7B 39 FF D3 81' + '3F FF D4 83 41 FF D3 80 3E FF CF 7A 38 FF C9 6E' + '2E FF C1 61 1F FF B9 51 10 FF D2 AC 96 FF B2 B7' + 'BA FF 08 08 08 A8 45 46 46 F0 FD FE FF FF C3 7D' + '52 FF B8 52 10 FF C0 64 24 FF C5 6B 2B FF C8 70' + '30 FF C9 71 31 FF C8 6F 2F FF C4 6A 2A FF BF 61' + '21 FF B3 50 12 FF B1 44 04 FF D3 AC 96 FF B3 B9' + 'BC FF 07 07 07 A8 44 45 46 F0 FC FE FE FF BC 72' + '48 FF AE 41 02 FF B8 55 17 FF C0 63 23 FF C5 6A' + '2B FF C6 6C 2D FF C5 6B 2B FF C2 63 23 FF B0 5E' + '28 FF BD A9 9D FF A3 61 3D FF D1 A6 8E FF B5 BB' + 'BD FF 06 06 06 A8 43 43 44 F0 FC FD FD FF B7 6D' + '42 FF B1 47 08 FF C5 6A 2B FF CC 76 36 FF D0 7C' + '3B FF D1 7E 3D FF D0 7C 3C FF CF 76 34 FF B4 71' + '41 FF D1 D5 D6 FF A8 79 5E FF CF A4 8C FF B7 BC' + 'BF FF 06 06 06 A8 41 42 43 F0 FA FA FB FF BE 78' + '4D FF C6 69 26 FF D1 7D 3D FF D6 86 45 FF DA 8D' + '4B FF DB 8F 4E FF DB 8D 4C FF D8 88 46 FF CB 7B' + '3E FF 9F 69 41 FF AB 57 21 FF DA B2 9A FF B7 BC' + 'C0 FF 06 06 06 A8 40 41 41 F0 F7 F8 F9 FF C8 88' + '5C FF CF 77 33 FF D8 89 47 FF DF 95 52 FF E4 9E' + '5A FF E6 A1 5E FF E5 9F 5C FF E2 95 4F FF C8 91' + '63 FF BE BF C0 FF B2 86 65 FF E2 B9 9F FF BA C0' + 'C3 FF 05 05 05 A8 3F 40 40 F0 F7 F7 F8 FF BB 79' + '4D FF CD 75 2F FF D8 8B 47 FF E1 9A 55 FF E9 A6' + '61 FF EC AD 67 FF EA A8 63 FF E5 9C 55 FF C9 8A' + '53 FF B9 AF A6 FF AE 72 49 FF E8 BF A5 FF C5 CB' + 'CE FF 04 04 04 A8 3B 3B 3B F4 FF FF FF FF DB C6' + 'BA FF E2 C5 AE FF E8 CE B7 FF EB D4 BC FF EF D9' + 'C1 FF F1 DC C4 FF EF DA C2 FF EC D5 BD FF E7 CD' + 'B6 FF DF C6 B0 FF D8 BA A7 FF F8 ED E7 FF C8 CA' + 'CB FF 02 02 02 AB 0F 0F 0F C7 AA A9 A9 FF E2 E5' + 'E7 FF DE E3 E6 FF DD E1 E5 FF DD E0 E4 FF DC E0' + 'E3 FF DC DF E3 FF DC E0 E3 FF DD E0 E4 FF DD E1' + 'E4 FF DD E0 E2 FF DE E2 E5 FF D8 DA DB FF 66 66' + '65 FF 00 00 00 78 00 00 00 2E 01 01 01 B1 0F 0F' + '0F CC 0E 0E 0E CC 0E 0E 0E CC 0E 0E 0E CC 0E 0E' + '0E CC 0E 0E 0E CC 0E 0E 0E CC 0E 0E 0E CC 0E 0E' + '0E CC 0E 0E 0E CC 0E 0E 0E CC 0C 0C 0C CB 00 00' + '00 8D 00 00 00 0D 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 FF FF 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 FF FF 00 00 28 00 00 00 10 00 00 00 20 00' + '00 00 01 00 04 00 00 00 00 00 80 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 80 00 00 00 00 80 00 00 80 80 00 00 00 00' + '80 00 80 00 80 00 00 80 80 00 C0 C0 C0 00 80 80' + '80 00 FF 00 00 00 00 FF 00 00 FF FF 00 00 00 00' + 'FF 00 FF 00 FF 00 00 FF FF 00 FF FF FF 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 08 77' + '77 77 77 77 77 80 8F FF FF FF F7 77 77 70 8F 83' + '88 88 88 83 37 70 8F 83 33 38 33 33 37 70 8F 83' + '33 33 33 33 37 70 8F 83 33 33 33 37 37 70 8F 83' + '33 33 33 87 87 70 8F 83 38 88 88 38 37 70 6F 83' + '88 87 88 87 87 70 0F 83 88 77 78 87 87 70 0F 77' + '77 77 77 77 7F 70 07 FF FF F7 FF FF F7 80 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF' + '00 00 80 01 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 80 01 00 00 FF FF 00 00 28 00' + '00 00 20 00 00 00 40 00 00 00 01 00 04 00 00 00' + '00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 80 00 00 00 00 80' + '00 00 80 80 00 00 00 00 80 00 80 00 80 00 00 80' + '80 00 C0 C0 C0 00 80 80 80 00 FF 00 00 00 00 FF' + '00 00 FF FF 00 00 00 00 FF 00 FF 00 FF 00 00 FF' + 'FF 00 FF FF FF 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 87 77 77 77 77 77 77 77 77' + '77 77 77 77 80 00 00 FF FF FF FF FF FF FF FF F7' + '77 77 77 77 78 00 08 FF FF FF FF FF FF FF FF FF' + '77 77 77 77 77 00 08 FF 77 77 77 77 77 77 77 77' + '77 77 78 77 77 00 08 FF 73 33 33 38 88 88 88 83' + '33 33 33 87 77 00 08 FF 73 33 33 38 88 88 88 83' + '33 33 33 87 77 00 08 FF 73 33 33 33 38 88 83 33' + '33 33 33 87 77 00 08 FF 73 33 33 33 33 33 33 33' + '33 33 33 87 77 00 08 FF 83 33 33 33 33 33 33 33' + '33 33 31 87 78 00 08 FF 81 33 33 33 33 33 33 33' + '33 88 31 8F 78 00 08 FF 81 33 33 33 33 33 33 33' + '33 FF 71 8F 78 00 08 FF 81 13 33 33 33 33 33 33' + '38 F7 71 8F F8 00 08 FF 81 33 33 33 38 88 83 33' + '33 7F 71 8F F8 00 08 FF 83 33 33 88 88 88 88 88' + '33 33 33 8F F8 00 08 FF 83 33 38 88 88 88 88 88' + '88 88 83 8F F8 00 08 FF 83 33 88 88 88 88 88 88' + '88 77 73 8F F8 00 08 FF 83 38 88 88 77 77 77 88' + '88 7F 73 8F F8 00 08 FF 83 38 88 87 77 77 77 78' + '88 77 83 8F F8 00 08 FF 83 88 88 87 77 77 77 77' + '88 88 83 8F F8 00 08 FF F7 77 77 77 77 77 77 77' + '77 77 77 FF F8 00 00 FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF F8 00 00 87 77 77 77 77 77 77 77 77' + '77 77 77 77 80 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF 80 00 00 03 80 00 00 01 00 00' + '00 01 00 00 00 01 00 00 00 01 00 00 00 01 00 00' + '00 01 00 00 00 01 00 00 00 01 00 00 00 01 00 00' + '00 01 00 00 00 01 00 00 00 01 00 00 00 01 00 00' + '00 01 00 00 00 01 00 00 00 01 00 00 00 01 00 00' + '00 01 00 00 00 01 00 00 00 01 00 00 00 01 00 00' + '00 01 80 00 00 03 E0 00 00 0F FF FF FF FF FF FF' + 'FF FF FF FF FF FF 28 00 00 00 30 00 00 00 60 00' + '00 00 01 00 08 00 00 00 00 00 00 09 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 11 11 11 00 66 33 00 00 66 33 33 00 66 66' + '33 00 44 44 44 00 55 55 55 00 66 66 66 00 77 77' + '77 00 7F 7F 7F 00 99 33 00 00 99 33 33 00 CC 33' + '00 00 CC 33 33 00 99 66 00 00 99 66 33 00 CC 66' + '00 00 CC 66 33 00 FF 66 33 00 99 66 66 00 CC 66' + '66 00 FF 66 66 00 99 99 33 00 CC 99 33 00 FF 99' + '33 00 FF CC 33 00 99 99 66 00 CC 99 66 00 FF 99' + '66 00 CC CC 66 00 FF CC 66 00 88 88 88 00 99 99' + '99 00 AA AA AA 00 BB BB BB 00 CC 99 99 00 FF 99' + '99 00 99 CC 99 00 CC CC 99 00 FF CC 99 00 99 CC' + 'CC 00 CC CC CC 00 DD DD DD 00 FF CC CC 00 FF FF' + 'CC 00 CC CC FF 00 FF CC FF 00 CC FF FF 00 EE EE' + 'EE 00 FF FF FF 00 00 00 00 00 A8 44 F9 77 21 00' + '00 00 B8 0C 38 00 00 00 38 00 F0 B5 0C 01 14 17' + '95 00 00 00 00 00 5C 19 95 00 28 52 0C 01 68 19' + '95 00 77 82 F5 77 98 7F F5 77 3A 8A F5 77 00 04' + '00 00 90 A2 AF 00 10 00 00 00 10 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 C0 17 95 00 00 00 38 00 A8 44' + 'F9 77 15 00 00 00 78 0A 38 00 00 00 38 00 B0 6C' + '38 00 98 17 95 00 00 00 00 00 E0 19 95 00 F0 88' + 'FA 77 70 38 F5 77 FF FF FF FF A8 44 F9 77 70 7D' + 'F5 77 3A 8A F5 77 96 00 00 00 96 00 00 00 09 00' + '00 00 B0 18 95 00 00 00 00 00 CB 44 F9 77 38 9F' + '07 00 CD 8B F5 77 78 13 05 00 37 90 F5 77 00 00' + '00 00 3E 8A F5 77 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 28 81 0C 01 10 AE 0C 01 20 81' + '0C 01 78 01 38 00 78 01 38 00 38 02 38 00 38 56' + '0C 01 01 00 00 00 03 00 00 00 38 02 38 00 F0 56' + '0C 01 F0 56 0C 01 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 10 00' + '00 00 00 00 00 00 58 00 5A 00 30 56 0C 01 30 56' + '0C 01 4C 16 95 00 40 9F 07 00 FC 15 95 00 FF FF' + 'FF FF B4 1A 95 00 45 00 00 00 28 02 00 00 28 52' + '0C 01 A4 18 95 00 E5 3A F8 77 18 00 00 00 30 56' + '0C 01 00 00 38 00 28 52 0C 01 00 00 00 00 78 19' + '95 00 CA 8C F5 77 78 01 38 00 BE 8E F5 77 08 06' + '38 00 37 90 F5 77 30 52 0C 01 30 52 0C 01 40 00' + '00 00 40 00 00 00 01 00 00 00 18 00 00 00 00 00' + '00 00 10 19 95 00 42 00 00 00 00 00 00 00 F4 18' + '95 00 00 00 00 00 00 00 00 00 00 00 00 00 28 52' + '0C 01 28 52 0C 01 01 01 F5 77 78 01 38 00 30 52' + '0C 01 20 81 0C 01 28 81 0C 01 78 01 38 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 BE B3' + 'E7 77 28 52 0C 01 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 08 04 00 00 99 00' + '00 00 08 04 00 00 08 01 00 00 00 00 00 00 00 00' + '00 00 00 00 01 01 00 00 38 00 BC 18 95 00 C0 18' + '95 00 B0 19 95 00 F0 88 FA 77 88 1C F5 77 FF FF' + 'FF FF 37 90 F5 77 81 E9 49 00 00 00 38 00 00 00' + '00 00 30 52 0C 01 30 52 0C 01 A4 1A 95 00 40 00' + '00 00 40 00 00 00 B8 10 E9 77 FF FF FF FF C9 F1' + 'E7 77 16 EA 4B 00 F8 00 00 00 B4 1A 95 00 DC E3' + '49 00 E0 A3 4E 00 FF FF FF FF 10 00 00 00 10 DA' + '4B 00 30 52 0C 01 71 CC 43 00 30 52 0C 01 F0 B5' + '0C 01 A4 1A 95 00 90 A2 AF 00 C4 F5 AF 00 06 00' + '00 00 F0 B5 0C 01 0F 02 00 00 70 52 0C 01 10 00' + '00 00 00 00 00 00 20 00 00 00 30 52 0C 01 40 00' + '00 00 10 00 00 00 00 01 00 00 00 04 00 00 00 00' + '00 00 00 00 00 00 10 00 00 00 10 00 00 00 28 00' + '00 00 10 00 00 00 20 00 00 00 01 00 20 00 00 00' + '00 00 00 04 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 32 32 32 32 32 32 32 32 32 32 32 32 32 32' + '32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32' + '32 32 32 32 32 32 32 32 32 32 00 00 00 00 00 00' + '32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32' + '32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32' + '32 32 32 32 32 32 32 32 32 32 32 32 00 00 00 32' + '32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32' + '32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32' + '32 32 32 32 32 32 32 32 32 32 32 32 32 00 32 32' + '32 32 05 08 1F 1F 1F 1F 1F 1F 1F 1F 1F 1F 1F 1F' + '1F 1F 1F 1F 1F 1F 1F 1F 1F 1F 1F 1F 1F 1F 1F 1F' + '1F 1F 1F 1F 1F 1F 1F 08 06 32 32 32 32 32 32 32' + '32 1F 31 31 31 31 31 31 31 31 30 31 30 30 30 30' + '30 30 30 2A 30 2A 30 2A 2A 2A 2A 2A 2A 2A 2A 2A' + '29 2A 29 29 29 29 29 29 30 20 01 32 32 32 32 32' + '05 31 31 31 30 31 30 30 30 30 30 30 30 30 2A 30' + '30 2A 2A 30 2A 2A 2A 2A 2A 2A 2A 29 2A 29 29 29' + '29 29 29 29 29 29 22 29 22 30 07 32 32 32 32 32' + '08 31 31 30 31 30 30 31 30 30 30 30 30 2A 30 2A' + '2A 30 2A 2A 2A 2A 2B 2A 2A 29 2A 29 2A 29 29 29' + '29 29 29 29 29 22 29 22 22 2A 21 32 32 32 32 32' + '20 31 31 31 31 31 31 31 31 31 31 31 30 31 31 31' + '2E 2F 31 30 30 31 2F 30 30 31 2A 2C 2D 31 30 30' + '30 30 30 2A 2E 2C 2A 29 29 29 21 32 32 32 32 32' + '1F 31 31 31 2A 1B 1C 1B 1B 1B 23 1B 24 27 1B 26' + '1E 24 1E 26 24 1D 24 27 1E 23 27 24 1E 23 1C 1D' + '23 1B 1B 1C 1B 1B 2A 29 22 2A 21 32 32 32 32 32' + '1F 31 31 31 29 11 0E 11 11 17 11 17 17 11 1C 11' + '1B 18 1B 1C 17 1C 1B 17 15 17 11 1B 11 17 11 11' + '10 11 11 0E 10 0B 2B 29 29 29 21 32 32 32 32 32' + '1F 31 31 31 2A 11 11 11 11 11 17 11 11 1B 17 1C' + '17 1B 14 17 1C 14 18 1B 17 17 1C 11 17 11 17 11' + '11 0F 11 10 0B 10 29 29 29 29 21 32 32 32 32 32' + '1F 31 31 31 2A 0F 10 11 11 11 11 17 11 11 17 11' + '1C 17 17 1C 17 17 1B 12 1B 11 17 1B 11 17 11 11' + '11 11 10 0B 10 11 26 29 29 2A 21 32 32 32 32 32' + '1F 31 31 31 29 10 0F 11 10 11 17 11 11 17 11 1B' + '17 11 1C 11 17 1B 12 1B 11 1B 11 11 17 11 11 11' + '11 10 0F 11 10 0A 2B 29 29 2A 21 32 32 32 32 32' + '1F 31 31 31 2A 11 10 0B 11 11 11 11 17 11 17 11' + '11 1B 11 17 14 11 17 11 17 11 17 11 11 11 11 10' + '11 0F 10 0A 0D 0E 29 2A 29 29 21 32 32 32 32 32' + '1F 31 31 31 2D 10 0B 10 0F 10 11 0E 11 11 11 11' + '17 11 17 11 11 17 11 17 11 17 11 0F 10 11 11 11' + '0E 11 0C 11 0E 0C 2B 29 29 2A 21 32 32 32 32 32' + '1F 31 31 31 2B 0F 10 11 0C 0F 11 11 11 11 11 11' + '11 17 11 11 17 11 17 11 11 11 11 11 11 11 0E 11' + '0D 0E 11 0A 10 0A 29 2A 29 2A 21 32 32 32 32 32' + '1F 31 31 31 29 0F 0C 0B 0E 11 0C 11 10 0F 11 11' + '11 0E 11 17 11 11 11 0F 11 11 10 11 0F 10 11 11' + '0E 10 0A 10 0A 0A 2B 2A 29 2A 21 32 32 32 32 32' + '1F 31 31 31 29 10 0A 10 0C 0F 11 0E 11 10 11 0E' + '11 11 11 10 0F 11 10 11 10 0F 11 11 10 0B 10 0A' + '0B 03 0A 0A 0C 0E 29 2A 2A 2A 20 32 32 32 32 32' + '1F 31 31 31 2A 0A 0E 0C 0F 10 0A 10 0F 0D 0E 11' + '11 11 11 11 11 11 11 11 11 11 11 10 0F 10 0A 1F' + '22 2A 25 0B 0A 0A 27 2A 29 2A 21 32 32 32 32 32' + '08 31 31 31 29 0B 0C 0E 0A 0C 11 0A 10 11 11 11' + '11 17 11 11 17 11 11 17 11 11 11 11 11 11 04 30' + '31 30 29 07 0A 0A 29 2A 29 30 20 32 32 32 32 32' + '1F 31 31 31 29 10 0A 0A 0C 0F 0A 11 11 17 11 11' + '11 11 17 11 11 17 11 11 11 17 11 11 11 10 13 30' + '29 20 30 08 0A 0A 2B 2A 2A 2A 20 32 32 32 32 32' + '1F 31 31 31 29 0A 0A 0C 0E 0C 17 11 11 11 17 11' + '17 11 11 17 15 11 17 11 1B 11 11 17 11 11 0F 29' + '31 30 31 08 02 10 22 30 29 30 20 32 32 32 32 32' + '08 31 31 31 26 0F 0C 0A 11 17 11 11 11 17 11 1B' + '11 17 17 14 17 17 14 17 11 17 17 11 17 11 0F 07' + '2A 31 21 03 0C 0A 2B 2A 2A 2A 21 32 32 32 32 32' + '1F 31 31 31 29 0A 0E 11 11 11 11 17 11 11 17 11' + '1C 11 1B 18 11 1B 18 14 17 14 17 11 14 17 11 0F' + '0F 04 03 10 0B 0A 26 30 2A 2A 20 32 32 32 32 32' + '08 31 31 31 29 0A 10 11 11 11 17 11 17 1B 12 1B' + '11 1C 17 1B 1B 17 1B 18 1B 17 15 17 17 12 17 11' + '11 0F 11 11 10 0A 2B 30 2A 30 20 32 32 32 32 32' + '08 31 31 31 22 0F 11 11 17 11 11 1B 12 17 1B 17' + '1B 17 1C 18 1B 1C 17 1B 1C 17 17 15 17 17 13 13' + '1A 1B 13 0F 11 10 29 2A 2A 30 20 32 32 32 32 32' + '08 31 31 31 22 11 11 11 11 1B 17 11 1B 12 1B 1C' + '17 1C 17 1B 1C 17 1B 1C 17 1C 1B 17 1B 11 23 20' + '21 1F 28 13 0F 10 29 30 2A 30 20 32 32 32 32 32' + '08 31 31 31 22 10 11 17 11 11 1C 17 17 1B 18 1B' + '1C 1B 1C 1B 1C 1C 1B 1B 1C 17 1C 1B 17 14 1A 29' + '2A 2A 22 13 10 0F 2B 30 2A 30 20 32 32 32 32 32' + '08 31 31 31 22 0F 11 11 1B 17 11 17 1B 1C 1B 18' + '1B 1E 1C 1B 1E 1B 1E 1C 1B 1C 1B 18 1B 18 1A 29' + '2A 29 29 1A 11 11 26 31 31 30 20 32 32 32 32 32' + '08 31 31 31 22 0D 17 11 11 1C 17 15 17 1B 1B 1C' + '1B 1C 1D 1C 1B 1E 1B 1C 1E 1B 1C 1B 1C 17 1B 29' + '2A 2A 2A 13 10 11 2B 2F 30 31 20 32 32 32 32 32' + '08 31 31 31 22 0E 11 14 17 11 1B 17 1B 1C 19 1B' + '1C 1D 1C 1C 1E 24 1E 1E 1B 1C 1D 1C 17 1C 13 20' + '29 22 21 0F 11 0C 29 31 31 31 20 32 32 32 32 32' + '08 31 31 31 21 0A 0C 17 17 17 15 17 18 1B 1C 1C' + '1E 1C 1E 1E 24 1E 1C 1C 1E 1C 1C 17 1C 17 18 11' + '16 11 0F 11 10 0A 2B 31 30 31 1F 32 32 32 32 32' + '07 31 31 31 22 1B 20 1B 23 23 1B 26 23 26 23 26' + '23 26 26 23 26 26 26 26 26 23 26 23 26 23 26 23' + '1B 23 1B 23 1F 1A 2A 31 31 31 20 32 32 32 32 32' + '08 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31' + '31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31' + '31 31 31 31 31 31 31 31 31 31 1F 32 32 32 32 32' + '05 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31' + '31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31' + '31 31 31 31 31 31 31 31 31 30 08 32 32 32 32 32' + '01 20 31 31 31 31 31 31 31 31 31 31 31 31 31 31' + '31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31' + '31 31 31 31 31 31 31 31 31 21 01 32 32 32 32 32' + '32 01 07 21 29 22 22 22 22 22 22 22 22 22 22 22' + '22 22 22 22 22 22 22 22 22 22 22 22 22 22 22 22' + '22 22 22 22 22 22 22 22 08 01 32 32 32 00 00 32' + '32 32 32 32 01 01 01 01 01 01 01 01 01 01 01 01' + '01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01' + '01 01 01 01 01 01 01 01 32 32 32 32 00 00 00 00' + '32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32' + '32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32' + '32 32 32 32 32 32 32 32 32 32 32 00 00 00 00 00' + '00 00 32 32 32 32 32 32 32 32 32 32 32 32 32 32' + '32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32' + '32 32 32 32 32 32 32 32 32 32 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF' + 'FF FF FF FF 00 00 FF FF FF FF FF FF 00 00 FF FF' + 'FF FF FF FF 00 00 FF FF FF FF FF FF 00 00 F0 00' + '00 00 00 0F 00 00 C0 00 00 00 00 03 00 00 80 00' + '00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 01 00 00 80 00 00 00 00 03 00 00 C0 00' + '00 00 00 07 00 00 F0 00 00 00 00 0F 00 00 FF FF' + 'FF FF FF FF 00 00 FF FF FF FF FF FF 00 00 FF FF' + 'FF FF FF FF 00 00 FF FF FF FF FF FF 00 00 28 00' + '00 00 30 00 00 00 60 00 00 00 01 00 20 00 00 00' + '00 00 00 24 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 17 00 00 00 32 00 00' + '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' + '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' + '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' + '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' + '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' + '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' + '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' + '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' + '00 37 00 00 00 37 00 00 00 37 00 00 00 37 00 00' + '00 28 00 00 00 0C 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 19 00 00 00 75 00 00 00 C8 00 00 00 F4 00 00' + '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' + '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' + '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' + '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' + '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' + '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' + '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' + '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F7 00 00' + '00 F7 00 00 00 F7 00 00 00 F7 00 00 00 F6 00 00' + '00 D6 00 00 00 90 00 00 00 3F 00 00 00 08 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 1E 00 00' + '00 C7 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 E3 00 00 00 4A 00 00' + '00 06 00 00 00 00 00 00 00 04 00 00 00 B0 00 00' + '00 FF 05 05 05 FF 47 47 47 FF 83 83 83 FF 90 90' + '90 FF 8E 8E 8E FF 8E 8E 8E FF 8E 8E 8E FF 8D 8D' + '8D FF 8D 8D 8D FF 8D 8D 8D FF 8D 8D 8D FF 8C 8C' + '8C FF 8C 8C 8C FF 8C 8C 8C FF 8B 8B 8B FF 8B 8B' + '8B FF 8B 8B 8B FF 8B 8B 8B FF 8B 8B 8B FF 8A 8A' + '8A FF 8A 8A 8A FF 8A 8A 8A FF 89 89 89 FF 89 89' + '89 FF 89 89 89 FF 89 89 89 FF 89 89 89 FF 88 88' + '88 FF 88 88 88 FF 88 88 88 FF 87 87 87 FF 87 87' + '87 FF 87 87 87 FF 87 87 87 FF 87 87 87 FF 87 87' + '87 FF 86 86 86 FF 88 88 88 FF 83 83 83 FF 53 53' + '53 FF 0B 0B 0B FF 00 00 00 FF 00 00 00 D5 00 00' + '00 34 00 00 00 01 00 00 00 52 00 00 00 FF 06 06' + '06 FF 8B 8B 8B FF FB FB FB FF FF FF FF FF FE FE' + 'FE FF FC FC FC FF FA FA FA FF F9 F9 F9 FF F8 F8' + 'F8 FF F6 F6 F6 FF F5 F5 F5 FF F4 F4 F4 FF F2 F2' + 'F2 FF F1 F1 F1 FF F0 F0 F0 FF EE EE EE FF ED ED' + 'ED FF EB EB EB FF EA EA EA FF E9 E9 E9 FF E7 E7' + 'E7 FF E5 E5 E5 FF E5 E5 E5 FF E3 E3 E3 FF E1 E1' + 'E1 FF E0 E0 E0 FF DF DF DF FF DD DD DD FF DC DC' + 'DC FF DB DB DB FF D9 D9 D9 FF D8 D8 D8 FF D6 D6' + 'D6 FF D5 D5 D5 FF D3 D3 D3 FF D2 D2 D2 FF D1 D1' + 'D1 FF CF CF CF FF CD CD CD FF D1 D1 D1 FF EA EA' + 'EA FF 98 98 98 FF 0C 0C 0C FF 00 00 00 FF 00 00' + '00 8D 00 00 00 0A 00 00 00 C3 00 00 00 FF 49 49' + '49 FF FA FA FA FF FE FE FE FF F7 F7 F7 FF F7 F7' + 'F7 FF F5 F5 F5 FF F3 F3 F3 FF F2 F2 F2 FF F0 F0' + 'F0 FF EF EF EF FF EE EE EE FF EC EC EC FF EA EA' + 'EA FF E9 E9 E9 FF E8 E8 E8 FF E6 E6 E6 FF E5 E5' + 'E5 FF E3 E3 E3 FF E2 E2 E2 FF E1 E1 E1 FF DF DF' + 'DF FF DD DD DD FF DC DC DC FF DA DA DA FF D9 D9' + 'D9 FF D8 D8 D8 FF D6 D6 D6 FF D4 D4 D4 FF D3 D3' + 'D3 FF D2 D2 D2 FF D0 D0 D0 FF CF CF CF FF CD CD' + 'CD FF CC CC CC FF CB CB CB FF C9 C9 C9 FF C7 C7' + 'C7 FF C6 C6 C6 FF C5 C5 C5 FF C2 C2 C2 FF C2 C2' + 'C2 FF E6 E6 E6 FF 73 73 73 FF 00 00 00 FF 00 00' + '00 D4 00 00 00 27 00 00 00 F3 00 00 00 FF 84 84' + '84 FF FF FF FF FF FA FA FA FF F8 F8 F8 FF F7 F7' + 'F7 FF F6 F6 F7 FF F4 F5 F5 FF F3 F4 F4 FF F1 F2' + 'F3 FF EF F0 F1 FF EE EF F0 FF ED ED EE FF EA EB' + 'EC FF E9 EA EB FF E8 E8 E9 FF E6 E7 E7 FF E5 E6' + 'E6 FF E3 E4 E5 FF E1 E2 E3 FF E0 E1 E1 FF DF DF' + 'E0 FF DD DE DE FF DC DC DD FF DA DB DB FF D8 D9' + 'DA FF D7 D8 D9 FF D6 D6 D7 FF D4 D4 D5 FF D3 D3' + 'D4 FF D1 D2 D2 FF CF D0 D1 FF CE CF CF FF CD CD' + 'CE FF CB CC CC FF CA CB CB FF C8 C9 CA FF C6 C7' + 'C8 FF C5 C6 C7 FF C4 C4 C4 FF C5 C4 C4 FF C1 C1' + 'C1 FF D7 D7 D7 FF AD AD AD FF 00 00 00 FF 00 00' + '00 F9 00 00 00 38 00 00 00 F0 00 00 00 FF 8F 8F' + '8F FF FF FF FF FF FC FC FC FF FA FA FA FF FB FB' + 'FB FF FC FC FD FF FB FC FC FF FB FB FB FF FA FA' + 'FA FF F9 FA FA FF F9 F9 FA FF F8 F8 F9 FF F7 F8' + 'F8 FF F7 F7 F7 FF F6 F6 F6 FF F5 F5 F6 FF F4 F5' + 'F5 FF F4 F5 F5 FF F3 F4 F4 FF F3 F3 F3 FF F2 F2' + 'F3 FF F2 F2 F2 FF F1 F1 F2 FF F0 F1 F1 FF EF F0' + 'F0 FF EF EF F0 FF EE EF EF FF ED EE EE FF ED ED' + 'EE FF EC ED ED FF EB EC EC FF EB EB EC FF EA EB' + 'EB FF E9 EA EA FF E9 EA EA FF E8 E9 E9 FF E7 E8' + 'E8 FF E8 E8 E8 FF DE DE DE FF C6 C6 C6 FF C4 C4' + 'C4 FF D0 D0 D0 FF AD AD AD FF 00 00 00 FF 00 00' + '00 F7 00 00 00 37 00 00 00 F0 00 00 00 FF 8D 8D' + '8D FF FF FF FF FF FE FE FE FF FC FC FD FF E3 E1' + 'DF FF D3 99 70 FF D6 93 65 FF D9 99 6B FF DB 9D' + '6E FF DD A1 72 FF E0 A4 76 FF E1 A8 79 FF E4 AC' + '7D FF E6 AF 80 FF E8 B2 83 FF EA B4 85 FF EB B7' + '87 FF EC B9 89 FF ED BA 8B FF EE BB 8B FF EE BB' + '8B FF EE BB 8B FF ED BA 8B FF ED B9 89 FF EB B7' + '87 FF EA B5 86 FF E9 B2 83 FF E6 AF 81 FF E5 AC' + '7E FF E3 A9 7A FF E1 A5 76 FF DF A2 74 FF DD 9E' + '70 FF DB 9A 6C FF D8 97 69 FF D6 93 65 FF D3 8E' + '60 FF D3 8F 62 FF E6 D7 CD FF C9 CC CD FF C5 C5' + 'C5 FF D2 D2 D2 FF AA AA AA FF 00 00 00 FF 00 00' + '00 F7 00 00 00 37 00 00 00 F0 00 00 00 FF 8B 8B' + '8B FF FF FF FF FF FF FF FF FF FD FF FF FF D8 D3' + 'D1 FF BE 67 2C FF C1 5F 1B FF C5 67 25 FF C8 6C' + '29 FF CB 72 2F FF CE 77 34 FF D0 7C 38 FF D3 80' + '3D FF D6 85 41 FF D9 89 44 FF DB 8C 47 FF DD 8F' + '4B FF DE 91 4C FF DF 93 4E FF E0 95 50 FF E0 95' + '50 FF E0 94 50 FF DF 93 4E FF DE 91 4D FF DC 8F' + '49 FF DB 8B 47 FF D8 88 43 FF D5 84 40 FF D3 7F' + '3C FF D0 7B 37 FF CD 75 32 FF CA 70 2D FF C7 6C' + '29 FF C4 66 23 FF C0 60 1E FF BC 5B 1A FF B9 53' + '11 FF B9 54 13 FF DF C8 B9 FF CC CF D2 FF C6 C6' + 'C6 FF D3 D3 D3 FF AB AB AB FF 00 00 00 FF 00 00' + '00 F7 00 00 00 37 00 00 00 F0 00 00 00 FF 8B 8B' + '8B FF FF FF FF FF FF FF FF FF FE FF FF FF DA D5' + 'D3 FF BE 6A 32 FF C1 62 21 FF C5 6A 2B FF C7 6F' + '2F FF CA 74 34 FF CD 78 38 FF CF 7D 3C FF D2 81' + '40 FF D5 84 43 FF D7 88 47 FF D8 8B 4A FF DA 8E' + '4C FF DC 90 4E FF DD 92 50 FF DD 92 51 FF DD 92' + '51 FF DD 92 50 FF DD 91 4F FF DB 8F 4E FF DA 8D' + '4B FF D9 8A 49 FF D6 87 46 FF D4 83 42 FF D2 80' + '3F FF CF 7C 3B FF CC 77 37 FF CA 73 32 FF C7 6E' + '2E FF C3 68 29 FF C1 64 24 FF BD 5F 20 FF B9 57' + '18 FF BA 57 1A FF E0 C9 BB FF CD D1 D3 FF C7 C7' + 'C7 FF D5 D5 D5 FF AA AA AA FF 00 00 00 FF 00 00' + '00 F7 00 00 00 37 00 00 00 F0 00 00 00 FF 8A 8A' + '8A FF FF FF FF FF FF FF FF FF FF FF FF FF DA D6' + 'D3 FF BC 68 30 FF BF 5F 1E FF C3 66 27 FF C5 6B' + '2C FF C8 70 30 FF CB 74 34 FF CD 78 38 FF D0 7C' + '3B FF D2 80 3F FF D4 83 42 FF D6 85 44 FF D7 88' + '47 FF D8 8A 48 FF D9 8B 4A FF DA 8C 4B FF DA 8C' + '4B FF D9 8C 4B FF D9 8B 4A FF D8 8A 48 FF D6 87' + '46 FF D5 85 44 FF D4 82 41 FF D1 7E 3E FF D0 7B' + '3B FF CD 77 37 FF CA 73 33 FF C8 6E 2F FF C5 6A' + '2B FF C2 65 26 FF BF 60 21 FF BC 5B 1C FF B7 53' + '15 FF B8 55 18 FF E0 C9 BB FF CE D2 D4 FF C9 C9' + 'C9 FF D6 D6 D6 FF AA AA AA FF 00 00 00 FF 00 00' + '00 F7 00 00 00 37 00 00 00 F0 00 00 00 FF 8A 8A' + '8A FF FF FF FF FF FF FF FF FF FF FF FF FF DA D6' + 'D3 FF BA 65 2D FF BD 5B 1B FF C0 63 24 FF C2 67' + '28 FF C5 6C 2C FF C8 70 30 FF CA 73 34 FF CD 77' + '37 FF CF 7B 3A FF D1 7D 3D FF D2 80 3F FF D4 83' + '42 FF D5 84 43 FF D6 86 45 FF D6 86 45 FF D6 86' + '45 FF D6 86 45 FF D5 85 44 FF D5 84 43 FF D3 82' + '41 FF D2 80 3F FF D1 7D 3C FF CF 7A 39 FF CD 76' + '36 FF CA 73 33 FF C7 6F 2F FF C5 6A 2B FF C2 66' + '27 FF BF 61 22 FF BC 5D 1E FF B9 58 19 FF B5 50' + '12 FF B6 52 15 FF E0 C9 BB FF D0 D4 D6 FF CB CB' + 'CB FF D7 D7 D7 FF A9 A9 A9 FF 00 00 00 FF 00 00' + '00 F7 00 00 00 37 00 00 00 F0 00 00 00 FF 89 89' + '89 FF FF FF FF FF FF FF FF FF FF FF FF FF DA D6' + 'D3 FF B8 62 2A FF BA 57 17 FF BE 5E 20 FF C0 63' + '24 FF C3 67 28 FF C6 6B 2C FF C8 6F 2F FF CA 72' + '32 FF CC 76 35 FF CD 78 38 FF CF 7B 3A FF D0 7D' + '3C FF D1 7E 3D FF D2 80 3F FF D2 80 3F FF D2 80' + '3F FF D2 80 3F FF D2 7F 3E FF D1 7E 3E FF CF 7C' + '3C FF CE 7A 3A FF CD 77 37 FF CB 74 34 FF CA 71' + '32 FF C7 6E 2E FF C5 6A 2B FF C3 66 27 FF C0 62' + '23 FF BD 5D 1F FF BB 59 1A FF B7 54 16 FF B3 4D' + '0F FF B5 4E 11 FF E0 C9 BA FF D1 D5 D7 FF CC CC' + 'CC FF D8 D8 D8 FF A8 A8 A8 FF 00 00 00 FF 00 00' + '00 F7 00 00 00 37 00 00 00 F0 00 00 00 FF 88 88' + '88 FF FF FF FF FF FF FF FF FF FF FF FF FF DA D5' + 'D3 FF B6 5E 27 FF B7 53 13 FF BB 5A 1C FF BD 5F' + '20 FF C0 63 24 FF C3 66 27 FF C5 6A 2A FF C7 6D' + '2E FF C9 71 31 FF CA 73 33 FF CC 75 35 FF CD 77' + '37 FF CE 79 38 FF CF 7A 3A FF CF 7B 3A FF CF 7B' + '3A FF CF 7A 3A FF CE 7A 39 FF CE 78 38 FF CC 77' + '36 FF CB 75 35 FF CA 72 32 FF C8 6F 2F FF C7 6D' + '2E FF C4 69 2A FF C2 65 26 FF C0 62 23 FF BD 5E' + '1F FF BA 59 1B FF B8 55 17 FF B5 51 13 FF B1 4A' + '0B FF B2 4B 0E FF E0 C8 BA FF D2 D6 D8 FF CD CD' + 'CD FF D9 D9 D9 FF A7 A7 A7 FF 00 00 00 FF 00 00' + '00 F7 00 00 00 37 00 00 00 F0 00 00 00 FF 87 87' + '87 FF FF FF FF FF FF FF FF FF FF FF FF FF D8 D4' + 'D1 FF B4 5A 23 FF B5 4E 0F FF B9 56 18 FF BB 5A' + '1B FF BD 5E 1F FF C0 62 23 FF C2 65 25 FF C3 68' + '29 FF C6 6B 2C FF C7 6D 2E FF C8 70 30 FF C9 71' + '31 FF CA 73 32 FF CB 74 34 FF CB 75 34 FF CB 75' + '34 FF CB 74 34 FF CB 74 33 FF CA 72 32 FF C9 71' + '31 FF C8 6F 2F FF C6 6D 2D FF C5 6A 2A FF C3 67' + '28 FF C1 64 25 FF BE 60 22 FF BD 5D 1E FF BA 59' + '1A FF B8 55 17 FF B6 51 13 FF B3 4C 0F FF AF 46' + '07 FF AF 47 0A FF DF C7 BA FF D4 D8 DB FF CF CF' + 'CF FF DB DB DB FF A6 A6 A6 FF 00 00 00 FF 00 00' + '00 F7 00 00 00 37 00 00 00 F0 00 00 00 FF 86 86' + '86 FF FF FF FF FF FF FF FF FF FF FF FF FF D6 D1' + 'CE FF B1 55 1E FF B2 4A 0B FF B6 51 13 FF B7 54' + '16 FF BA 59 1A FF BC 5D 1E FF BE 60 20 FF BF 62' + '23 FF C2 65 26 FF C3 67 28 FF C4 69 2A FF C5 6B' + '2B FF C6 6C 2C FF C7 6D 2E FF C7 6E 2E FF C7 6E' + '2E FF C7 6E 2E FF C6 6D 2E FF C6 6C 2C FF C5 6A' + '2B FF C4 69 29 FF C3 67 28 FF C1 64 25 FF BF 62' + '23 FF BE 5F 20 FF BC 5C 1D FF BC 58 19 FF BD 54' + '12 FF BA 4F 0D FF B7 4C 0C FF B0 48 0A FF AC 41' + '03 FF AD 43 07 FF DF C7 BA FF D6 DA DC FF D0 D0' + 'D0 FF DC DC DC FF A5 A5 A5 FF 00 00 00 FF 00 00' + '00 F7 00 00 00 37 00 00 00 F0 00 00 00 FF 85 85' + '85 FF FF FF FF FF FF FF FF FF FF FF FF FF D4 CF' + 'CC FF AE 51 1A FF B0 45 06 FF B3 4D 0F FF B4 50' + '12 FF B7 54 16 FF B9 58 19 FF BB 5A 1C FF BC 5D' + '1F FF BE 60 21 FF BF 62 23 FF C0 63 24 FF C1 65' + '25 FF C3 66 26 FF C3 68 28 FF C3 68 29 FF C3 68' + '29 FF C3 68 29 FF C3 67 28 FF C3 66 27 FF C1 65' + '25 FF C0 63 23 FF BF 61 22 FF BD 5E 1F FF BC 5D' + '1E FF BA 5A 1B FF BB 56 17 FF A5 46 0C FF 7D 43' + '1F FF 77 46 27 FF 8D 3B 0B FF AE 41 02 FF AB 3E' + '00 FF AC 42 06 FF E0 C8 BA FF D7 DB DD FF D2 D2' + 'D2 FF DD DD DD FF A3 A3 A3 FF 00 00 00 FF 00 00' + '00 F7 00 00 00 37 00 00 00 F0 00 00 00 FF 84 84' + '84 FF FF FF FF FF FF FF FF FF FF FF FF FF D1 CD' + 'CA FF AB 4D 16 FF AC 40 01 FF B0 48 0B FF B2 4C' + '0E FF B4 4F 11 FF B6 52 14 FF B7 54 16 FF B8 57' + '18 FF BA 58 1A FF BD 5D 1E FF C0 63 24 FF C3 67' + '27 FF C4 69 29 FF C5 6B 2B FF C5 6B 2C FF C6 6C' + '2C FF C6 6C 2C FF C5 6B 2C FF C5 6B 2B FF C4 69' + '29 FF C2 67 28 FF C1 64 25 FF BE 5F 20 FF BA 59' + '1A FF BA 53 13 FF 97 45 12 FF 9B 8E 85 FF C5 CB' + 'CF FF D3 DB E0 FF AC AD AD FF 83 44 21 FF A9 38' + '00 FF AC 42 06 FF E0 C8 BB FF D8 DC DE FF D3 D3' + 'D3 FF DF DF DF FF A3 A3 A3 FF 00 00 00 FF 00 00' + '00 F7 00 00 00 37 00 00 00 F0 00 00 00 FF 83 83' + '83 FF FF FF FF FF FF FF FF FF FF FF FF FF CF CA' + 'C7 FF A8 4A 14 FF A9 3C 00 FF AD 43 06 FF B0 47' + '09 FF B1 4A 0B FF B2 4B 0E FF B4 4F 11 FF B8 56' + '18 FF BF 62 22 FF C4 6A 2A FF C7 6E 2E FF C8 70' + '2F FF C9 70 30 FF CA 72 32 FF CA 72 32 FF CA 72' + '32 FF CA 72 32 FF CA 72 32 FF C9 71 31 FF C9 70' + '30 FF C8 6F 2F FF C7 6E 2E FF C5 6B 2C FF C3 67' + '28 FF C0 5B 18 FF 8D 5B 3C FF EA F2 F7 FF F6 F5' + 'F6 FF E6 E5 E4 FF CD D2 D4 FF 6C 64 5E FF 91 2D' + '00 FF AF 43 06 FF E1 C9 BB FF D9 DD E0 FF D4 D4' + 'D4 FF E0 E0 E0 FF A2 A2 A2 FF 00 00 00 FF 00 00' + '00 F7 00 00 00 37 00 00 00 F0 00 00 00 FF 82 82' + '82 FF FF FF FF FF FF FF FF FF FF FF FF FF CD C8' + 'C5 FF A8 4A 13 FF A9 3B 00 FF AA 3E 02 FF AA 3F' + '02 FF AD 44 07 FF B9 57 18 FF C1 64 24 FF C6 6C' + '2C FF C9 70 30 FF C9 72 32 FF CA 74 34 FF CC 75' + '35 FF CC 76 36 FF CD 78 37 FF CD 78 38 FF CE 79' + '38 FF CE 79 38 FF CD 78 38 FF CD 77 37 FF CC 76' + '36 FF CB 75 35 FF CA 73 33 FF C9 71 31 FF C8 6F' + '30 FF C3 66 24 FF 8C 6B 54 FF DC E2 E6 FF D1 CE' + 'CC FF B1 A5 9F FF E0 E2 E4 FF 7C 7E 80 FF 74 25' + '00 FF B2 44 05 FF E1 C9 BB FF DB DF E1 FF D5 D5' + 'D5 FF E1 E1 E1 FF A1 A1 A1 FF 00 00 00 FF 00 00' + '00 F7 00 00 00 37 00 00 00 F0 00 00 00 FF 81 81' + '81 FF FF FF FF FF FF FF FF FF FF FF FF FF CB C6' + 'C3 FF A8 49 13 FF A9 3B 00 FF A8 3C 00 FF AE 46' + '09 FF BC 5C 1E FF C7 6E 2E FF C9 70 30 FF CA 72' + '32 FF CB 75 35 FF CD 77 37 FF CE 7A 3A FF CF 7B' + '3B FF D0 7D 3C FF D1 7E 3E FF D1 7F 3E FF D2 7F' + '3E FF D2 7F 3E FF D1 7E 3E FF D1 7E 3D FF D0 7C' + '3C FF CF 7B 3B FF CE 79 39 FF CC 77 36 FF CC 75' + '34 FF CB 6F 2C FF 89 60 42 FF CA D0 D5 FF F2 F2' + 'F2 FF F2 F1 F0 FF FF FF FF FF 7C 72 6D FF 89 29' + '00 FF AF 43 06 FF E2 CA BC FF DD E1 E3 FF D7 D7' + 'D7 FF E2 E2 E2 FF A0 A0 A0 FF 00 00 00 FF 00 00' + '00 F7 00 00 00 37 00 00 00 F0 00 00 00 FF 80 80' + '80 FF FF FF FF FF FF FF FF FF FF FF FF FF C9 C4' + 'C1 FF A7 48 13 FF A7 39 00 FF B0 49 0B FF C3 68' + '28 FF C7 6F 2F FF C9 71 31 FF CA 74 34 FF CC 77' + '37 FF CE 7A 3A FF D0 7C 3C FF D1 7F 3E FF D2 81' + '40 FF D4 82 41 FF D5 84 43 FF D5 85 44 FF D5 85' + '44 FF D5 85 44 FF D5 84 43 FF D4 84 43 FF D3 82' + '41 FF D2 81 40 FF D1 7F 3E FF CF 7C 3B FF CE 7A' + '39 FF D1 79 37 FF A6 5D 27 FF 6A 65 62 FF E0 E6' + 'EB FF F5 FA FE FF A6 AE B3 FF 79 3C 18 FF AC 39' + '00 FF AC 42 06 FF E2 CA BC FF DE E2 E4 FF D8 D8' + 'D8 FF E4 E4 E4 FF 9E 9E 9E FF 00 00 00 FF 00 00' + '00 F7 00 00 00 37 00 00 00 F0 00 00 00 FF 7E 7E' + '7E FF FF FF FF FF FF FF FF FF FF FF FF FF C7 C2' + 'C0 FF A5 46 11 FF AE 42 05 FF C2 67 27 FF C7 6E' + '2F FF C9 71 31 FF CB 75 35 FF CD 78 38 FF D0 7C' + '3B FF D2 7F 3F FF D3 82 41 FF D4 84 43 FF D6 86' + '46 FF D7 88 47 FF D8 89 48 FF D8 8A 49 FF D8 8B' + '49 FF D8 8B 49 FF D8 8A 49 FF D8 89 48 FF D6 87' + '47 FF D5 86 45 FF D4 84 43 FF D2 81 3F FF D1 7F' + '3D FF CF 7B 3B FF D2 79 37 FF 9C 56 23 FF 7A 59' + '40 FF 81 63 4D FF 74 41 1E FF B8 5B 1D FF B2 48' + '09 FF AB 41 04 FF E2 CA BC FF DF E3 E5 FF DA DA' + 'DA FF E5 E5 E5 FF 9E 9E 9E FF 00 00 00 FF 00 00' + '00 F7 00 00 00 37 00 00 00 F0 00 00 00 FF 7D 7D' + '7D FF FF FF FF FF FF FF FF FF FF FF FF FF C5 BF' + 'BD FF A7 48 12 FF BE 5D 1C FF C8 6F 2F FF C9 71' + '31 FF CC 75 35 FF CF 79 39 FF D0 7D 3D FF D3 81' + '40 FF D5 84 43 FF D7 87 46 FF D8 8A 49 FF DA 8C' + '4B FF DB 8E 4C FF DC 90 4E FF DC 91 4F FF DC 91' + '4F FF DC 91 4F FF DC 91 4F FF DB 8F 4D FF DA 8E' + '4C FF D9 8C 4A FF D8 89 48 FF D6 86 45 FF D5 83' + '42 FF D3 81 40 FF CF 7A 38 FF D0 76 32 FF C5 6A' + '26 FF BD 61 1E FF C8 66 22 FF C8 68 27 FF BE 5D' + '1E FF AC 43 07 FF E2 CA BC FF E0 E5 E7 FF DC DC' + 'DC FF E6 E6 E6 FF 9D 9D 9D FF 00 00 00 FF 00 00' + '00 F7 00 00 00 37 00 00 00 F0 00 00 00 FF 7B 7B' + '7B FF FF FF FF FF FF FF FF FF FF FF FF FF C1 BC' + 'B9 FF B2 5B 24 FF C7 6C 2A FF C9 70 31 FF CB 75' + '35 FF CE 79 39 FF D1 7E 3D FF D2 82 41 FF D5 85' + '44 FF D8 89 48 FF DA 8C 4B FF DC 8F 4D FF DD 92' + '50 FF DE 94 52 FF DF 96 54 FF E0 97 55 FF E0 97' + '55 FF E0 97 55 FF E0 97 54 FF DF 95 53 FF DE 94' + '52 FF DD 91 50 FF DA 8E 4D FF D9 8B 4A FF D8 88' + '47 FF D6 83 40 FF B2 7D 53 FF 96 7C 69 FF A3 86' + '70 FF AD 8E 79 FF 9A 8A 71 FF 8D 62 37 FF C3 63' + '22 FF B7 54 16 FF E2 CA BC FF E3 E6 E8 FF DD DD' + 'DD FF E7 E7 E7 FF 9B 9B 9B FF 00 00 00 FF 00 00' + '00 F7 00 00 00 37 00 00 00 F0 00 00 00 FF 7A 7A' + '7A FF FF FF FF FF FF FF FF FF FF FF FF FF C0 BA' + 'B8 FF B8 64 2D FF C9 6E 2D FF CA 74 33 FF CD 78' + '38 FF D0 7D 3C FF D3 81 40 FF D5 85 44 FF D8 89' + '48 FF DB 8D 4C FF DD 91 4F FF DF 94 52 FF E0 97' + '55 FF E1 99 57 FF E2 9B 58 FF E3 9C 5A FF E4 9D' + '5A FF E4 9D 5A FF E3 9C 5A FF E2 9B 59 FF E1 99' + '57 FF E0 96 55 FF DE 93 51 FF DC 90 4E FF DB 8D' + '4B FF D2 80 3C FF B2 96 7F FF 96 9F A6 FF A4 A8' + 'AB FF 86 8A 8E FF A9 B9 BC FF 86 78 65 FF B9 5C' + '1C FF C1 61 23 FF E3 CB BD FF E2 E6 E8 FF DE DE' + 'DE FF E8 E8 E8 FF 9A 9A 9A FF 00 00 00 FF 00 00' + '00 F7 00 00 00 37 00 00 00 F0 00 00 00 FF 78 78' + '78 FF FF FF FF FF FF FF FF FF FF FF FF FF BE B8' + 'B6 FF BA 68 30 FF CB 71 2F FF CD 76 36 FF CF 7B' + '3B FF D2 80 3F FF D5 85 44 FF D7 89 48 FF DA 8E' + '4C FF DD 92 50 FF DF 96 54 FF E1 99 57 FF E3 9C' + '5A FF E5 9E 5C FF E6 A1 5E FF E7 A2 60 FF E7 A3' + '60 FF E7 A3 60 FF E7 A2 5F FF E6 A1 5E FF E4 9E' + '5B FF E3 9C 59 FF E1 98 56 FF DE 95 53 FF DD 92' + '4F FF D5 85 41 FF A9 8A 71 FF C4 C9 CD FF DC DC' + 'DC FF D7 D7 D7 FF C5 C8 CC FF 90 75 64 FF BB 5F' + '1E FF C5 67 29 FF E7 D0 C2 FF EA EE F0 FF E5 E5' + 'E5 FF EB EB EB FF 99 99 99 FF 00 00 00 FF 00 00' + '00 F7 00 00 00 37 00 00 00 F0 00 00 00 FF 78 78' + '78 FF FF FF FF FF FF FF FF FF FF FF FF FF BA B5' + 'B2 FF B9 67 2F FF CD 74 32 FF CE 79 39 FF D1 7E' + '3E FF D4 83 42 FF D7 88 47 FF DA 8D 4B FF DD 91' + '4F FF E0 96 54 FF E1 9A 57 FF E4 9D 5B FF E6 A1' + '5E FF E8 A4 61 FF E9 A6 63 FF EA A8 65 FF EB A9' + '65 FF EB A9 65 FF EA A7 64 FF E9 A6 63 FF E7 A4' + '60 FF E6 A0 5E FF E4 9D 5A FF E1 99 57 FF DF 94' + '53 FF DF 8F 48 FF AF 89 69 FF C7 CC D0 FF D6 D6' + 'D6 FF D3 D3 D3 FF C8 CD D2 FF A0 7B 5F FF C6 68' + '24 FF C1 65 26 FF E9 D2 C4 FF F7 FB FD FF F4 F4' + 'F4 FF F6 F6 F6 FF 98 98 98 FF 00 00 00 FF 00 00' + '00 F7 00 00 00 37 00 00 00 F0 00 00 00 FF 76 76' + '76 FF FF FF FF FF FF FF FF FF FF FF FF FF B8 B2' + 'B0 FF B3 5C 25 FF CE 77 35 FF CF 7B 3B FF D2 80' + '40 FF D5 85 44 FF D9 8A 49 FF DB 8F 4D FF DF 95' + '53 FF E2 99 57 FF E3 9E 5B FF E6 A2 5F FF E9 A6' + '63 FF EB A9 65 FF ED AC 68 FF EE AE 6A FF EF AF' + '6B FF EF AF 6B FF EE AD 6A FF ED AB 68 FF EB A8' + '66 FF E8 A5 62 FF E6 A1 5E FF E3 9D 5A FF E1 98' + '56 FF E2 94 4E FF B4 87 5F FF D1 D5 D8 FF E2 E3' + 'E4 FF E0 E1 E2 FF CE D3 D8 FF AA 79 55 FF CD 6F' + '2A FF B9 58 1A FF E8 CF C2 FF F9 FD FF FF F7 F7' + 'F7 FF F8 F8 F8 FF 97 97 97 FF 00 00 00 FF 00 00' + '00 F7 00 00 00 37 00 00 00 F0 00 00 00 FF 75 75' + '75 FF FF FF FF FF FF FF FF FF FF FF FF FF B7 B1' + 'AF FF A5 47 10 FF C7 6A 28 FF D2 7F 3E FF D3 83' + '42 FF D7 88 47 FF DA 8D 4C FF DD 92 50 FF E0 98' + '56 FF E4 9C 5A FF E6 A1 5F FF E9 A6 63 FF EC AB' + '67 FF EE AE 6B FF F0 B1 6E FF F2 B4 71 FF F3 B5' + '72 FF F3 B5 71 FF F2 B4 70 FF F0 B1 6E FF ED AD' + '6A FF EB A9 66 FF E8 A5 62 FF E5 A0 5E FF E3 9B' + '59 FF E5 97 54 FF B9 81 50 FF A1 9D 9B FF BD BC' + 'BA FF BD BC BA FF A3 A1 A0 FF AD 70 42 FF C9 69' + '26 FF AD 43 06 FF E9 D0 C3 FF FB FE FF FF F8 F8' + 'F8 FF F9 F9 F9 FF 95 95 95 FF 00 00 00 FF 00 00' + '00 F7 00 00 00 37 00 00 00 F0 00 00 00 FF 74 74' + '74 FF FF FF FF FF FF FF FF FF FF FF FF FF B2 AD' + 'AB FF 9C 3C 06 FF AE 45 06 FF CF 79 35 FF D6 7F' + '3A FF D9 85 3F FF DC 8A 44 FF DF 90 4A FF E3 96' + '4F FF E7 9C 54 FF EA A1 5A FF ED A7 5F FF F1 AC' + '64 FF F3 B1 68 FF F6 B5 6D FF F8 B9 70 FF FA BB' + '72 FF F9 BA 72 FF F8 B8 6F FF F5 B5 6C FF F2 AF' + '68 FF F0 AA 63 FF ED A6 5D FF E9 A0 58 FF E6 9A' + '53 FF E3 95 4E FF DE 8E 48 FF C2 79 3B FF B7 70' + '36 FF B4 6B 31 FF B6 69 2C FF C9 71 2F FF B1 4C' + '0D FF A5 39 00 FF E9 D1 C3 FF FC FF FF FF FA FA' + 'FA FF FB FB FB FF 94 94 94 FF 00 00 00 FF 00 00' + '00 F7 00 00 00 37 00 00 00 F0 00 00 00 FF 73 73' + '73 FF FF FF FF FF FF FF FF FF FF FF FF FF C4 C3' + 'C2 FF AE 93 84 FF B1 93 83 FF C2 A0 86 FF CE A5' + '83 FF CE A7 87 FF D0 AA 89 FF D2 AD 8C FF D3 B0' + '8E FF D5 B2 91 FF D7 B5 93 FF D8 B8 96 FF DA BA' + '98 FF DB BC 9B FF DD BF 9D FF DE C1 9F FF DE C2' + 'A0 FF DE C2 A0 FF DE C0 9E FF DC BE 9C FF DB BC' + '9A FF DA B9 98 FF D8 B7 95 FF D6 B4 92 FF D4 B2' + '90 FF D2 AF 8E FF D2 AC 8B FF D3 AA 88 FF D2 A8' + '85 FF D0 A5 82 FF CE A2 7F FF C1 9E 84 FF B0 92' + '82 FF B2 94 83 FF EC E5 E1 FF FD FE FE FF FC FC' + 'FC FF FC FC FC FF 94 94 94 FF 00 00 00 FF 00 00' + '00 F7 00 00 00 37 00 00 00 F4 00 00 00 FF 72 72' + '72 FF FF FF FF FF FF FF FF FF FF FF FF FF FE FE' + 'FE FF FD FF FF FF FD FF FF FF FA FF FF FF F9 FF' + 'FF FF F9 FE FF FF F9 FE FF FF F9 FE FF FF F8 FD' + 'FF FF F8 FD FF FF F8 FD FF FF F8 FC FF FF F7 FC' + 'FF FF F7 FC FF FF F7 FB FF FF F7 FB FF FF F7 FB' + 'FF FF F7 FB FF FF F7 FB FF FF F7 FB FF FF F7 FC' + 'FF FF F7 FC FF FF F8 FC FF FF F7 FC FF FF F7 FC' + 'FF FF F7 FC FF FF F8 FD FF FF F7 FD FF FF F7 FD' + 'FF FF F7 FD FF FF F7 FD FF FF F8 FD FF FF FA FF' + 'FF FF FA FF FF FF FC FD FD FF FB FB FB FF FD FD' + 'FD FF FB FB FB FF 93 93 93 FF 00 00 00 FF 00 00' + '00 FA 00 00 00 37 00 00 00 DD 00 00 00 FF 4B 4B' + '4B FF F5 F5 F5 FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FE FE FE FF FE FE FE FF FD FD FD FF FF FF' + 'FF FF F0 F0 F0 FF 6D 6D 6D FF 00 00 00 FF 00 00' + '00 E7 00 00 00 27 00 00 00 7A 00 00 00 FF 0E 0E' + '0E FF 9A 9A 9A FF FD FD FD FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF F8 F8' + 'F8 FF A4 A4 A4 FF 1B 1B 1B FF 00 00 00 FF 00 00' + '00 9B 00 00 00 04 00 00 00 0F 00 00 00 D8 00 00' + '00 FF 14 14 14 FF 6E 6E 6E FF AC AC AC FF B9 B9' + 'B9 FF B8 B8 B8 FF B8 B8 B8 FF B8 B8 B8 FF B8 B8' + 'B8 FF B8 B8 B8 FF B8 B8 B8 FF B8 B8 B8 FF B8 B8' + 'B8 FF B8 B8 B8 FF B8 B8 B8 FF B8 B8 B8 FF B8 B8' + 'B8 FF B8 B8 B8 FF B8 B8 B8 FF B8 B8 B8 FF B8 B8' + 'B8 FF B8 B8 B8 FF B8 B8 B8 FF B8 B8 B8 FF B8 B8' + 'B8 FF B8 B8 B8 FF B8 B8 B8 FF B8 B8 B8 FF B7 B7' + 'B7 FF B7 B7 B7 FF B7 B7 B7 FF B6 B6 B6 FF B6 B6' + 'B6 FF B6 B6 B6 FF B5 B5 B5 FF B5 B5 B5 FF B5 B5' + 'B5 FF B4 B4 B4 FF B5 B5 B5 FF AB AB AB FF 76 76' + '76 FF 1D 1D 1D FF 00 00 00 FF 00 00 00 FA 00 00' + '00 3C 00 00 00 00 00 00 00 00 00 00 00 52 00 00' + '00 F6 00 00 00 FF 00 00 00 FF 0C 0C 0C FF 16 16' + '16 FF 15 15 15 FF 15 15 15 FF 15 15 15 FF 15 15' + '15 FF 15 15 15 FF 15 15 15 FF 15 15 15 FF 15 15' + '15 FF 15 15 15 FF 15 15 15 FF 15 15 15 FF 15 15' + '15 FF 15 15 15 FF 15 15 15 FF 15 15 15 FF 15 15' + '15 FF 15 15 15 FF 15 15 15 FF 15 15 15 FF 15 15' + '15 FF 15 15 15 FF 15 15 15 FF 15 15 15 FF 15 15' + '15 FF 15 15 15 FF 15 15 15 FF 15 15 15 FF 15 15' + '15 FF 15 15 15 FF 15 15 15 FF 15 15 15 FF 15 15' + '15 FF 15 15 15 FF 16 16 16 FF 10 10 10 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 6F 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 39 00 00 00 B0 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 FF 00 00 00 FF 00 00 00 FF 00 00' + '00 FF 00 00 00 C1 00 00 00 51 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 49 00 00 00 80 00 00' + '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' + '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' + '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' + '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' + '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' + '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' + '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' + '00 84 00 00 00 84 00 00 00 84 00 00 00 84 00 00' + '00 84 00 00 00 84 00 00 00 84 00 00 00 82 00 00' + '00 57 00 00 00 0B 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 FF FF FF FF FF FF 00 00 FF FF' + 'FF FF FF FF 00 00 FF FF FF FF FF FF 00 00 FF FF' + 'FF FF FF FF 00 00 F0 00 00 00 00 0F 00 00 C0 00' + '00 00 00 03 00 00 80 00 00 00 00 01 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 01 00 00 80 00' + '00 00 00 03 00 00 C0 00 00 00 00 07 00 00 F0 00' + '00 00 00 0F 00 00 FF FF FF FF FF FF 00 00 FF FF' + 'FF FF FF FF 00 00 FF FF FF FF FF FF 00 00 FF FF' + 'FF FF FF FF 00 00 28 00 00 00 30 00 00 00 60 00' + '00 00 01 00 04 00 00 00 00 00 80 04 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 80 00 00 00 00 80 00 00 80 80 00 00 00 00' + '80 00 80 00 80 00 00 80 80 00 C0 C0 C0 00 80 80' + '80 00 FF 00 00 00 00 FF 00 00 FF FF 00 00 00 00' + 'FF 00 FF 00 FF 00 00 FF FF 00 FF FF FF 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 88 88 88 88 88 88 88 88' + '88 88 88 88 88 88 88 88 88 88 88 80 00 00 00 08' + 'FF FF FF FF FF FF FF FF FF FF FF FF 77 77 77 77' + '77 77 77 F8 00 00 00 8F FF FF FF FF FF FF FF FF' + 'FF 77 77 77 77 77 77 77 77 77 77 7F 80 00 00 8F' + 'FF FF FF FF FF FF FF FF FF 77 77 77 77 77 77 77' + '77 77 77 77 70 00 00 8F FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF 77 77 70 00 00 8F' + 'FF F8 88 87 77 77 77 77 77 77 77 77 77 77 77 88' + '88 88 77 77 70 00 00 8F FF 73 33 33 33 38 88 88' + '88 88 88 88 83 33 33 33 33 33 77 77 70 00 00 8F' + 'FF 73 33 33 33 38 88 88 88 88 88 88 88 33 33 33' + '33 33 77 77 70 00 00 8F FF 73 33 33 33 33 88 88' + '88 88 88 88 83 33 33 33 33 33 77 77 70 00 00 8F' + 'FF 73 33 33 33 33 33 88 88 88 88 83 33 33 33 33' + '33 33 77 77 70 00 00 8F FF 73 33 33 33 33 33 33' + '33 33 33 33 33 33 33 33 33 33 77 77 70 00 00 8F' + 'FF 73 33 33 33 33 33 33 33 33 33 33 33 33 33 33' + '33 33 77 77 70 00 00 8F FF 73 33 33 33 33 33 33' + '33 33 33 33 33 33 33 33 33 33 77 77 70 00 00 8F' + 'FF 73 33 33 33 33 33 33 33 33 33 33 33 33 33 33' + '33 33 77 77 70 00 00 8F FF 73 33 33 33 33 33 33' + '33 33 33 33 33 33 33 33 13 13 77 77 70 00 00 8F' + 'FF 73 13 33 33 33 33 33 33 33 33 33 33 33 38 77' + '73 13 77 77 70 00 00 8F FF 73 13 33 33 33 33 33' + '33 33 33 33 33 33 3F FF 78 13 77 7F 70 00 00 8F' + 'FF 73 11 13 33 33 33 33 33 33 33 33 33 33 8F 77' + 'F8 13 77 7F 70 00 00 8F FF 73 11 33 33 33 33 33' + '33 33 33 33 33 33 87 FF F8 13 7F 7F 70 00 00 8F' + 'FF 73 13 33 33 33 33 38 88 88 88 83 33 33 38 FF' + '71 13 7F 7F 80 00 00 8F FF 73 33 33 33 33 88 88' + '88 88 88 88 83 33 33 38 33 33 7F 7F 80 00 00 8F' + 'FF 73 33 33 33 38 88 88 88 88 88 88 88 83 33 33' + '33 33 7F 7F 80 00 00 8F FF 73 33 33 38 88 88 88' + '88 88 88 88 88 83 88 88 83 33 7F 7F 80 00 00 8F' + 'FF 73 33 33 38 88 88 88 88 88 88 88 88 83 88 78' + '78 33 7F 7F 80 00 00 8F FF 73 33 33 88 88 88 88' + '77 77 77 88 88 88 87 77 78 33 7F FF 80 00 00 8F' + 'FF 73 33 38 88 88 88 77 77 77 77 77 88 88 87 77' + '78 33 7F FF 80 00 00 8F FF 73 33 38 88 88 87 77' + '77 77 77 77 78 88 87 FF 78 33 7F FF 80 00 00 8F' + 'FF 73 33 88 88 88 77 77 77 77 77 77 77 88 88 77' + '78 33 7F FF 80 00 00 8F FF 71 33 33 88 88 77 77' + '77 77 77 77 77 88 83 33 33 31 7F FF 80 00 00 8F' + 'FF 78 87 77 77 77 77 77 77 77 77 77 77 77 77 77' + '77 88 FF FF 80 00 00 8F FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF FF 80 00 00 8F' + 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF' + 'FF FF FF FF 80 00 00 08 FF FF FF FF FF FF FF FF' + 'FF FF FF FF FF FF FF FF FF FF FF F7 00 00 00 00' + '87 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77' + '77 77 77 80 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF' + 'FF FF FF FF 00 00 FF FF FF FF FF FF 00 00 FF FF' + 'FF FF FF FF 00 00 FF FF FF FF FF FF 00 00 FF FF' + 'FF FF FF FF 00 00 E0 00 00 00 00 0F 00 00 C0 00' + '00 00 00 07 00 00 80 00 00 00 00 03 00 00 80 00' + '00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00' + '00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00' + '00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00' + '00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00' + '00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00' + '00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00' + '00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00' + '00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00' + '00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00' + '00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00' + '00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00' + '00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00' + '00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00' + '00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00' + '00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00' + '00 00 00 01 00 00 00 00 00 00 00 01 00 00 80 00' + '00 00 00 03 00 00 C0 00 00 00 00 03 00 00 E0 00' + '00 00 00 0F 00 00 F8 00 00 00 00 3F 00 00 FF FF' + 'FF FF FF FF 00 00 FF FF FF FF FF FF 00 00 FF FF' + 'FF FF FF FF 00 00 FF FF FF FF FF FF 00 00' +} */ + + + + +/*--------------------- END FIXME ------------------------*/ + +/* + * Everything that does not depend on language, + * like textless bitmaps etc, go into the + * neutral language. This will prevent them from + * being duplicated for each language. + */ +#include "shell32_xx.rc" + +/* + * Everything specific to any language goes + * in one of the specific files. + * Note that you can and may override resources + * which also have a neutral version. This is to + * get localized bitmaps for example. + */ +#include "shell32_Ca.rc" +#include "shell32_Cn.rc" +#include "shell32_Cs.rc" +#include "shell32_Da.rc" +#include "shell32_De.rc" +#include "shell32_En.rc" +#include "shell32_Eo.rc" +#include "shell32_Es.rc" +#include "shell32_Fi.rc" +#include "shell32_Fr.rc" +#include "shell32_Hu.rc" +#include "shell32_It.rc" +#include "shell32_Ja.rc" +#include "shell32_Ko.rc" +#include "shell32_Nl.rc" +#include "shell32_No.rc" +#include "shell32_Pl.rc" +#include "shell32_Pt.rc" +#include "shell32_Ru.rc" +#include "shell32_Si.rc" +#include "shell32_Sk.rc" +#include "shell32_Sv.rc" +#include "shell32_Uk.rc" +#include "shell32_Wa.rc" +#include "shell32_Zh.rc" diff --git a/reactos/lib/shell32/shresdef.h b/reactos/lib/shell32/shresdef.h index c3c454a4806..d7419cc70f7 100644 --- a/reactos/lib/shell32/shresdef.h +++ b/reactos/lib/shell32/shresdef.h @@ -1,92 +1,92 @@ -/* - * Copyright 2000 Juergen Schmied - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#ifndef __WINE_SHELL_RES_H -#define __WINE_SHELL_RES_H - -/* - columntitles for the shellview -*/ -#define IDS_SHV_COLUMN1 7 -#define IDS_SHV_COLUMN2 8 -#define IDS_SHV_COLUMN3 9 -#define IDS_SHV_COLUMN4 10 -#define IDS_SHV_COLUMN5 11 -#define IDS_SHV_COLUMN6 12 -#define IDS_SHV_COLUMN7 13 -#define IDS_SHV_COLUMN8 14 -#define IDS_SHV_COLUMN9 15 - -#define IDS_DESKTOP 20 -#define IDS_MYCOMPUTER 21 - -#define IDS_SELECT 22 -#define IDS_OPEN 23 -#define IDS_VIEW_LARGE 24 -#define IDS_VIEW_SMALL 25 -#define IDS_VIEW_LIST 26 -#define IDS_VIEW_DETAILS 27 - -#define IDS_CREATEFOLDER_DENIED 30 -#define IDS_CREATEFOLDER_CAPTION 31 -#define IDS_DELETEITEM_CAPTION 32 -#define IDS_DELETEFOLDER_CAPTION 33 -#define IDS_DELETEITEM_TEXT 34 -#define IDS_DELETEMULTIPLE_TEXT 35 -#define IDS_OVERWRITEFILE_CAPTION 36 -#define IDS_OVERWRITEFILE_TEXT 37 - -#define IDS_RESTART_TITLE 40 -#define IDS_RESTART_PROMPT 41 -#define IDS_SHUTDOWN_TITLE 42 -#define IDS_SHUTDOWN_PROMPT 43 - -#define IDS_PROGRAMS 45 -#define IDS_PERSONAL 46 -#define IDS_FAVORITES 47 -#define IDS_STARTUP 48 -#define IDS_RECENT 49 -#define IDS_SENDTO 50 -#define IDS_STARTMENU 51 -#define IDS_MYMUSIC 52 -#define IDS_MYVIDEO 53 -#define IDS_DESKTOPDIRECTORY 54 -#define IDS_NETHOOD 55 -#define IDS_TEMPLATES 56 -#define IDS_APPDATA 57 -#define IDS_PRINTHOOD 58 -#define IDS_LOCAL_APPDATA 59 -#define IDS_INTERNET_CACHE 60 -#define IDS_COOKIES 61 -#define IDS_HISTORY 62 -#define IDS_PROGRAM_FILES 63 -#define IDS_MYPICTURES 64 -#define IDS_PROGRAM_FILES_COMMON 65 -#define IDS_COMMON_DOCUMENTS 66 -#define IDS_ADMINTOOLS 67 -#define IDS_COMMON_MUSIC 68 -#define IDS_COMMON_PICTURES 69 -#define IDS_COMMON_VIDEO 70 -#define IDS_CDBURN_AREA 71 - -/* browse for folder dialog box */ -#define IDD_STATUS 0x3743 -#define IDD_TITLE 0x3742 -#define IDD_TREEVIEW 0x3741 - -#endif +/* + * Copyright 2000 Juergen Schmied + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef __WINE_SHELL_RES_H +#define __WINE_SHELL_RES_H + +/* + columntitles for the shellview +*/ +#define IDS_SHV_COLUMN1 7 +#define IDS_SHV_COLUMN2 8 +#define IDS_SHV_COLUMN3 9 +#define IDS_SHV_COLUMN4 10 +#define IDS_SHV_COLUMN5 11 +#define IDS_SHV_COLUMN6 12 +#define IDS_SHV_COLUMN7 13 +#define IDS_SHV_COLUMN8 14 +#define IDS_SHV_COLUMN9 15 + +#define IDS_DESKTOP 20 +#define IDS_MYCOMPUTER 21 + +#define IDS_SELECT 22 +#define IDS_OPEN 23 +#define IDS_VIEW_LARGE 24 +#define IDS_VIEW_SMALL 25 +#define IDS_VIEW_LIST 26 +#define IDS_VIEW_DETAILS 27 + +#define IDS_CREATEFOLDER_DENIED 30 +#define IDS_CREATEFOLDER_CAPTION 31 +#define IDS_DELETEITEM_CAPTION 32 +#define IDS_DELETEFOLDER_CAPTION 33 +#define IDS_DELETEITEM_TEXT 34 +#define IDS_DELETEMULTIPLE_TEXT 35 +#define IDS_OVERWRITEFILE_CAPTION 36 +#define IDS_OVERWRITEFILE_TEXT 37 + +#define IDS_RESTART_TITLE 40 +#define IDS_RESTART_PROMPT 41 +#define IDS_SHUTDOWN_TITLE 42 +#define IDS_SHUTDOWN_PROMPT 43 + +#define IDS_PROGRAMS 45 +#define IDS_PERSONAL 46 +#define IDS_FAVORITES 47 +#define IDS_STARTUP 48 +#define IDS_RECENT 49 +#define IDS_SENDTO 50 +#define IDS_STARTMENU 51 +#define IDS_MYMUSIC 52 +#define IDS_MYVIDEO 53 +#define IDS_DESKTOPDIRECTORY 54 +#define IDS_NETHOOD 55 +#define IDS_TEMPLATES 56 +#define IDS_APPDATA 57 +#define IDS_PRINTHOOD 58 +#define IDS_LOCAL_APPDATA 59 +#define IDS_INTERNET_CACHE 60 +#define IDS_COOKIES 61 +#define IDS_HISTORY 62 +#define IDS_PROGRAM_FILES 63 +#define IDS_MYPICTURES 64 +#define IDS_PROGRAM_FILES_COMMON 65 +#define IDS_COMMON_DOCUMENTS 66 +#define IDS_ADMINTOOLS 67 +#define IDS_COMMON_MUSIC 68 +#define IDS_COMMON_PICTURES 69 +#define IDS_COMMON_VIDEO 70 +#define IDS_CDBURN_AREA 71 + +/* browse for folder dialog box */ +#define IDD_STATUS 0x3743 +#define IDD_TITLE 0x3742 +#define IDD_TREEVIEW 0x3741 + +#endif diff --git a/reactos/lib/shell32/shv_bg_cmenu.c b/reactos/lib/shell32/shv_bg_cmenu.c index 40d3afd84a2..9dd5dc6cb90 100644 --- a/reactos/lib/shell32/shv_bg_cmenu.c +++ b/reactos/lib/shell32/shv_bg_cmenu.c @@ -1,445 +1,445 @@ -/* - * IContextMenu - * ShellView Background Context Menu (shv_bg_cm) - * - * Copyright 1999 Juergen Schmied - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ -#include - -#define COBJMACROS -#define NONAMELESSUNION -#define NONAMELESSSTRUCT - -#include "wine/debug.h" - -#include "windef.h" -#include "wingdi.h" -#include "pidl.h" -#include "shlguid.h" -#include "shlobj.h" - -#include "shell32_main.h" -#include "shellfolder.h" -#include "undocshell.h" - -WINE_DEFAULT_DEBUG_CHANNEL(shell); - -/************************************************************************** -* IContextMenu Implementation -*/ -typedef struct -{ - IContextMenu2Vtbl *lpVtbl; - IShellFolder* pSFParent; - DWORD ref; -} BgCmImpl; - - -static struct IContextMenu2Vtbl cmvt; - -/************************************************************************** -* ISVBgCm_Constructor() -*/ -IContextMenu2 *ISvBgCm_Constructor(IShellFolder* pSFParent) -{ - BgCmImpl* cm; - - cm = (BgCmImpl*)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(BgCmImpl)); - cm->lpVtbl = &cmvt; - cm->ref = 1; - cm->pSFParent = pSFParent; - if(pSFParent) IShellFolder_AddRef(pSFParent); - - TRACE("(%p)->()\n",cm); - return (IContextMenu2*)cm; -} - -/************************************************************************** -* ISVBgCm_fnQueryInterface -*/ -static HRESULT WINAPI ISVBgCm_fnQueryInterface(IContextMenu2 *iface, REFIID riid, LPVOID *ppvObj) -{ - BgCmImpl *This = (BgCmImpl *)iface; - - TRACE("(%p)->(\n\tIID:\t%s,%p)\n",This,debugstr_guid(riid),ppvObj); - - *ppvObj = NULL; - - if(IsEqualIID(riid, &IID_IUnknown) || - IsEqualIID(riid, &IID_IContextMenu) || - IsEqualIID(riid, &IID_IContextMenu2)) - { - *ppvObj = This; - } - else if(IsEqualIID(riid, &IID_IShellExtInit)) /*IShellExtInit*/ - { - FIXME("-- LPSHELLEXTINIT pointer requested\n"); - } - - if(*ppvObj) - { - IUnknown_AddRef((IUnknown*)*ppvObj); - TRACE("-- Interface: (%p)->(%p)\n",ppvObj,*ppvObj); - return S_OK; - } - TRACE("-- Interface: E_NOINTERFACE\n"); - return E_NOINTERFACE; -} - -/************************************************************************** -* ISVBgCm_fnAddRef -*/ -static ULONG WINAPI ISVBgCm_fnAddRef(IContextMenu2 *iface) -{ - BgCmImpl *This = (BgCmImpl *)iface; - - TRACE("(%p)->(count=%lu)\n",This, This->ref); - - return ++(This->ref); -} - -/************************************************************************** -* ISVBgCm_fnRelease -*/ -static ULONG WINAPI ISVBgCm_fnRelease(IContextMenu2 *iface) -{ - BgCmImpl *This = (BgCmImpl *)iface; - - TRACE("(%p)->()\n",This); - - if (!--(This->ref)) - { - TRACE(" destroying IContextMenu(%p)\n",This); - - if(This->pSFParent) - IShellFolder_Release(This->pSFParent); - - HeapFree(GetProcessHeap(),0,This); - return 0; - } - - return This->ref; -} - -/************************************************************************** -* ISVBgCm_fnQueryContextMenu() -*/ - -static HRESULT WINAPI ISVBgCm_fnQueryContextMenu( - IContextMenu2 *iface, - HMENU hMenu, - UINT indexMenu, - UINT idCmdFirst, - UINT idCmdLast, - UINT uFlags) -{ - HMENU hMyMenu; - UINT idMax; - HRESULT hr; - - BgCmImpl *This = (BgCmImpl *)iface; - - TRACE("(%p)->(hmenu=%p indexmenu=%x cmdfirst=%x cmdlast=%x flags=%x )\n", - This, hMenu, indexMenu, idCmdFirst, idCmdLast, uFlags); - - - hMyMenu = LoadMenuA(shell32_hInstance, "MENU_002"); - if (uFlags & CMF_DEFAULTONLY) - { - HMENU ourMenu = GetSubMenu(hMyMenu,0); - UINT oldDef = GetMenuDefaultItem(hMenu,TRUE,GMDI_USEDISABLED); - UINT newDef = GetMenuDefaultItem(ourMenu,TRUE,GMDI_USEDISABLED); - if (newDef != oldDef) - SetMenuDefaultItem(hMenu,newDef,TRUE); - if (newDef!=0xFFFFFFFF) - hr = MAKE_HRESULT(SEVERITY_SUCCESS, FACILITY_NULL, newDef+1); - else - hr = MAKE_HRESULT(SEVERITY_SUCCESS, FACILITY_NULL, 0); - } - else - { - idMax = Shell_MergeMenus (hMenu, GetSubMenu(hMyMenu,0), indexMenu, - idCmdFirst, idCmdLast, MM_SUBMENUSHAVEIDS); - hr = MAKE_HRESULT(SEVERITY_SUCCESS, FACILITY_NULL, idMax-idCmdFirst+1); - } - DestroyMenu(hMyMenu); - - TRACE("(%p)->returning 0x%lx\n",This,hr); - return hr; -} - -/************************************************************************** -* DoNewFolder -*/ -static void DoNewFolder( - IContextMenu2 *iface, - IShellView *psv) -{ - BgCmImpl *This = (BgCmImpl *)iface; - ISFHelper * psfhlp; - char szName[MAX_PATH]; - - IShellFolder_QueryInterface(This->pSFParent, &IID_ISFHelper, (LPVOID*)&psfhlp); - if (psfhlp) - { - LPITEMIDLIST pidl; - ISFHelper_GetUniqueName(psfhlp, szName, MAX_PATH); - ISFHelper_AddFolder(psfhlp, 0, szName, &pidl); - - if(psv) - { - /* if we are in a shellview do labeledit */ - IShellView_SelectItem(psv, - pidl,(SVSI_DESELECTOTHERS | SVSI_EDIT | SVSI_ENSUREVISIBLE - |SVSI_FOCUSED|SVSI_SELECT)); - } - SHFree(pidl); - - ISFHelper_Release(psfhlp); - } -} - -/************************************************************************** -* DoPaste -*/ -static BOOL DoPaste( - IContextMenu2 *iface) -{ - BgCmImpl *This = (BgCmImpl *)iface; - BOOL bSuccess = FALSE; - IDataObject * pda; - - TRACE("\n"); - - if(SUCCEEDED(OleGetClipboard(&pda))) - { - STGMEDIUM medium; - FORMATETC formatetc; - - TRACE("pda=%p\n", pda); - - /* Set the FORMATETC structure*/ - InitFormatEtc(formatetc, RegisterClipboardFormatA(CFSTR_SHELLIDLIST), TYMED_HGLOBAL); - - /* Get the pidls from IDataObject */ - if(SUCCEEDED(IDataObject_GetData(pda,&formatetc,&medium))) - { - LPITEMIDLIST * apidl; - LPITEMIDLIST pidl; - IShellFolder *psfFrom = NULL, *psfDesktop; - - LPIDA lpcida = GlobalLock(medium.u.hGlobal); - TRACE("cida=%p\n", lpcida); - - apidl = _ILCopyCidaToaPidl(&pidl, lpcida); - - /* bind to the source shellfolder */ - SHGetDesktopFolder(&psfDesktop); - if(psfDesktop) - { - IShellFolder_BindToObject(psfDesktop, pidl, NULL, &IID_IShellFolder, (LPVOID*)&psfFrom); - IShellFolder_Release(psfDesktop); - } - - if (psfFrom) - { - /* get source and destination shellfolder */ - ISFHelper *psfhlpdst, *psfhlpsrc; - IShellFolder_QueryInterface(This->pSFParent, &IID_ISFHelper, (LPVOID*)&psfhlpdst); - IShellFolder_QueryInterface(psfFrom, &IID_ISFHelper, (LPVOID*)&psfhlpsrc); - - /* do the copy/move */ - if (psfhlpdst && psfhlpsrc) - { - ISFHelper_CopyItems(psfhlpdst, psfFrom, lpcida->cidl, (LPCITEMIDLIST*)apidl); - /* FIXME handle move - ISFHelper_DeleteItems(psfhlpsrc, lpcida->cidl, apidl); - */ - } - if(psfhlpdst) ISFHelper_Release(psfhlpdst); - if(psfhlpsrc) ISFHelper_Release(psfhlpsrc); - IShellFolder_Release(psfFrom); - } - - _ILFreeaPidl(apidl, lpcida->cidl); - SHFree(pidl); - - /* release the medium*/ - ReleaseStgMedium(&medium); - } - IDataObject_Release(pda); - } -#if 0 - HGLOBAL hMem; - - OpenClipboard(NULL); - hMem = GetClipboardData(CF_HDROP); - - if(hMem) - { - char * pDropFiles = (char *)GlobalLock(hMem); - if(pDropFiles) - { - int len, offset = sizeof(DROPFILESTRUCT); - - while( pDropFiles[offset] != 0) - { - len = strlen(pDropFiles + offset); - TRACE("%s\n", pDropFiles + offset); - offset += len+1; - } - } - GlobalUnlock(hMem); - } - CloseClipboard(); -#endif - return bSuccess; -} - -/************************************************************************** -* ISVBgCm_fnInvokeCommand() -*/ -static HRESULT WINAPI ISVBgCm_fnInvokeCommand( - IContextMenu2 *iface, - LPCMINVOKECOMMANDINFO lpcmi) -{ - BgCmImpl *This = (BgCmImpl *)iface; - - LPSHELLBROWSER lpSB; - LPSHELLVIEW lpSV = NULL; - HWND hWndSV = 0; - - TRACE("(%p)->(invcom=%p verb=%p wnd=%p)\n",This,lpcmi,lpcmi->lpVerb, lpcmi->hwnd); - - /* get the active IShellView */ - if((lpSB = (LPSHELLBROWSER)SendMessageA(lpcmi->hwnd, CWM_GETISHELLBROWSER,0,0))) - { - if(SUCCEEDED(IShellBrowser_QueryActiveShellView(lpSB, &lpSV))) - { - IShellView_GetWindow(lpSV, &hWndSV); - } - } - - if(HIWORD(lpcmi->lpVerb)) - { - TRACE("%s\n",lpcmi->lpVerb); - - if (! strcmp(lpcmi->lpVerb,CMDSTR_NEWFOLDERA)) - { - DoNewFolder(iface, lpSV); - } - else if (! strcmp(lpcmi->lpVerb,CMDSTR_VIEWLISTA)) - { - if(hWndSV) SendMessageA(hWndSV, WM_COMMAND, MAKEWPARAM(FCIDM_SHVIEW_LISTVIEW,0),0 ); - } - else if (! strcmp(lpcmi->lpVerb,CMDSTR_VIEWDETAILSA)) - { - if(hWndSV) SendMessageA(hWndSV, WM_COMMAND, MAKEWPARAM(FCIDM_SHVIEW_REPORTVIEW,0),0 ); - } - else - { - FIXME("please report: unknown verb %s\n",lpcmi->lpVerb); - } - } - else - { - switch(LOWORD(lpcmi->lpVerb)) - { - case FCIDM_SHVIEW_NEWFOLDER: - DoNewFolder(iface, lpSV); - break; - case FCIDM_SHVIEW_INSERT: - DoPaste(iface); - break; - default: - /* if it's a id just pass it to the parent shv */ - SendMessageA(hWndSV, WM_COMMAND, MAKEWPARAM(LOWORD(lpcmi->lpVerb), 0),0 ); - break; - } - } - - if (lpSV) - IShellView_Release(lpSV); /* QueryActiveShellView does AddRef*/ - - return NOERROR; -} - -/************************************************************************** - * ISVBgCm_fnGetCommandString() - * - */ -static HRESULT WINAPI ISVBgCm_fnGetCommandString( - IContextMenu2 *iface, - UINT idCommand, - UINT uFlags, - UINT* lpReserved, - LPSTR lpszName, - UINT uMaxNameLen) -{ - BgCmImpl *This = (BgCmImpl *)iface; - - TRACE("(%p)->(idcom=%x flags=%x %p name=%p len=%x)\n",This, idCommand, uFlags, lpReserved, lpszName, uMaxNameLen); - - /* test the existence of the menu items, the file dialog enables - the buttons according to this */ - if (uFlags == GCS_VALIDATEA) - { - if(HIWORD(idCommand)) - { - if (!strcmp((LPSTR)idCommand, CMDSTR_VIEWLISTA) || - !strcmp((LPSTR)idCommand, CMDSTR_VIEWDETAILSA) || - !strcmp((LPSTR)idCommand, CMDSTR_NEWFOLDERA)) - { - return NOERROR; - } - } - } - - FIXME("unknown command string\n"); - return E_FAIL; -} - -/************************************************************************** -* ISVBgCm_fnHandleMenuMsg() -*/ -static HRESULT WINAPI ISVBgCm_fnHandleMenuMsg( - IContextMenu2 *iface, - UINT uMsg, - WPARAM wParam, - LPARAM lParam) -{ - BgCmImpl *This = (BgCmImpl *)iface; - - FIXME("(%p)->(msg=%x wp=%x lp=%lx)\n",This, uMsg, wParam, lParam); - - return E_NOTIMPL; -} - -/************************************************************************** -* IContextMenu2 VTable -* -*/ -static struct IContextMenu2Vtbl cmvt = -{ - ISVBgCm_fnQueryInterface, - ISVBgCm_fnAddRef, - ISVBgCm_fnRelease, - ISVBgCm_fnQueryContextMenu, - ISVBgCm_fnInvokeCommand, - ISVBgCm_fnGetCommandString, - ISVBgCm_fnHandleMenuMsg -}; +/* + * IContextMenu + * ShellView Background Context Menu (shv_bg_cm) + * + * Copyright 1999 Juergen Schmied + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#include + +#define COBJMACROS +#define NONAMELESSUNION +#define NONAMELESSSTRUCT + +#include "wine/debug.h" + +#include "windef.h" +#include "wingdi.h" +#include "pidl.h" +#include "shlguid.h" +#include "shlobj.h" + +#include "shell32_main.h" +#include "shellfolder.h" +#include "undocshell.h" + +WINE_DEFAULT_DEBUG_CHANNEL(shell); + +/************************************************************************** +* IContextMenu Implementation +*/ +typedef struct +{ + IContextMenu2Vtbl *lpVtbl; + IShellFolder* pSFParent; + DWORD ref; +} BgCmImpl; + + +static struct IContextMenu2Vtbl cmvt; + +/************************************************************************** +* ISVBgCm_Constructor() +*/ +IContextMenu2 *ISvBgCm_Constructor(IShellFolder* pSFParent) +{ + BgCmImpl* cm; + + cm = (BgCmImpl*)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(BgCmImpl)); + cm->lpVtbl = &cmvt; + cm->ref = 1; + cm->pSFParent = pSFParent; + if(pSFParent) IShellFolder_AddRef(pSFParent); + + TRACE("(%p)->()\n",cm); + return (IContextMenu2*)cm; +} + +/************************************************************************** +* ISVBgCm_fnQueryInterface +*/ +static HRESULT WINAPI ISVBgCm_fnQueryInterface(IContextMenu2 *iface, REFIID riid, LPVOID *ppvObj) +{ + BgCmImpl *This = (BgCmImpl *)iface; + + TRACE("(%p)->(\n\tIID:\t%s,%p)\n",This,debugstr_guid(riid),ppvObj); + + *ppvObj = NULL; + + if(IsEqualIID(riid, &IID_IUnknown) || + IsEqualIID(riid, &IID_IContextMenu) || + IsEqualIID(riid, &IID_IContextMenu2)) + { + *ppvObj = This; + } + else if(IsEqualIID(riid, &IID_IShellExtInit)) /*IShellExtInit*/ + { + FIXME("-- LPSHELLEXTINIT pointer requested\n"); + } + + if(*ppvObj) + { + IUnknown_AddRef((IUnknown*)*ppvObj); + TRACE("-- Interface: (%p)->(%p)\n",ppvObj,*ppvObj); + return S_OK; + } + TRACE("-- Interface: E_NOINTERFACE\n"); + return E_NOINTERFACE; +} + +/************************************************************************** +* ISVBgCm_fnAddRef +*/ +static ULONG WINAPI ISVBgCm_fnAddRef(IContextMenu2 *iface) +{ + BgCmImpl *This = (BgCmImpl *)iface; + + TRACE("(%p)->(count=%lu)\n",This, This->ref); + + return ++(This->ref); +} + +/************************************************************************** +* ISVBgCm_fnRelease +*/ +static ULONG WINAPI ISVBgCm_fnRelease(IContextMenu2 *iface) +{ + BgCmImpl *This = (BgCmImpl *)iface; + + TRACE("(%p)->()\n",This); + + if (!--(This->ref)) + { + TRACE(" destroying IContextMenu(%p)\n",This); + + if(This->pSFParent) + IShellFolder_Release(This->pSFParent); + + HeapFree(GetProcessHeap(),0,This); + return 0; + } + + return This->ref; +} + +/************************************************************************** +* ISVBgCm_fnQueryContextMenu() +*/ + +static HRESULT WINAPI ISVBgCm_fnQueryContextMenu( + IContextMenu2 *iface, + HMENU hMenu, + UINT indexMenu, + UINT idCmdFirst, + UINT idCmdLast, + UINT uFlags) +{ + HMENU hMyMenu; + UINT idMax; + HRESULT hr; + + BgCmImpl *This = (BgCmImpl *)iface; + + TRACE("(%p)->(hmenu=%p indexmenu=%x cmdfirst=%x cmdlast=%x flags=%x )\n", + This, hMenu, indexMenu, idCmdFirst, idCmdLast, uFlags); + + + hMyMenu = LoadMenuA(shell32_hInstance, "MENU_002"); + if (uFlags & CMF_DEFAULTONLY) + { + HMENU ourMenu = GetSubMenu(hMyMenu,0); + UINT oldDef = GetMenuDefaultItem(hMenu,TRUE,GMDI_USEDISABLED); + UINT newDef = GetMenuDefaultItem(ourMenu,TRUE,GMDI_USEDISABLED); + if (newDef != oldDef) + SetMenuDefaultItem(hMenu,newDef,TRUE); + if (newDef!=0xFFFFFFFF) + hr = MAKE_HRESULT(SEVERITY_SUCCESS, FACILITY_NULL, newDef+1); + else + hr = MAKE_HRESULT(SEVERITY_SUCCESS, FACILITY_NULL, 0); + } + else + { + idMax = Shell_MergeMenus (hMenu, GetSubMenu(hMyMenu,0), indexMenu, + idCmdFirst, idCmdLast, MM_SUBMENUSHAVEIDS); + hr = MAKE_HRESULT(SEVERITY_SUCCESS, FACILITY_NULL, idMax-idCmdFirst+1); + } + DestroyMenu(hMyMenu); + + TRACE("(%p)->returning 0x%lx\n",This,hr); + return hr; +} + +/************************************************************************** +* DoNewFolder +*/ +static void DoNewFolder( + IContextMenu2 *iface, + IShellView *psv) +{ + BgCmImpl *This = (BgCmImpl *)iface; + ISFHelper * psfhlp; + char szName[MAX_PATH]; + + IShellFolder_QueryInterface(This->pSFParent, &IID_ISFHelper, (LPVOID*)&psfhlp); + if (psfhlp) + { + LPITEMIDLIST pidl; + ISFHelper_GetUniqueName(psfhlp, szName, MAX_PATH); + ISFHelper_AddFolder(psfhlp, 0, szName, &pidl); + + if(psv) + { + /* if we are in a shellview do labeledit */ + IShellView_SelectItem(psv, + pidl,(SVSI_DESELECTOTHERS | SVSI_EDIT | SVSI_ENSUREVISIBLE + |SVSI_FOCUSED|SVSI_SELECT)); + } + SHFree(pidl); + + ISFHelper_Release(psfhlp); + } +} + +/************************************************************************** +* DoPaste +*/ +static BOOL DoPaste( + IContextMenu2 *iface) +{ + BgCmImpl *This = (BgCmImpl *)iface; + BOOL bSuccess = FALSE; + IDataObject * pda; + + TRACE("\n"); + + if(SUCCEEDED(OleGetClipboard(&pda))) + { + STGMEDIUM medium; + FORMATETC formatetc; + + TRACE("pda=%p\n", pda); + + /* Set the FORMATETC structure*/ + InitFormatEtc(formatetc, RegisterClipboardFormatA(CFSTR_SHELLIDLIST), TYMED_HGLOBAL); + + /* Get the pidls from IDataObject */ + if(SUCCEEDED(IDataObject_GetData(pda,&formatetc,&medium))) + { + LPITEMIDLIST * apidl; + LPITEMIDLIST pidl; + IShellFolder *psfFrom = NULL, *psfDesktop; + + LPIDA lpcida = GlobalLock(medium.u.hGlobal); + TRACE("cida=%p\n", lpcida); + + apidl = _ILCopyCidaToaPidl(&pidl, lpcida); + + /* bind to the source shellfolder */ + SHGetDesktopFolder(&psfDesktop); + if(psfDesktop) + { + IShellFolder_BindToObject(psfDesktop, pidl, NULL, &IID_IShellFolder, (LPVOID*)&psfFrom); + IShellFolder_Release(psfDesktop); + } + + if (psfFrom) + { + /* get source and destination shellfolder */ + ISFHelper *psfhlpdst, *psfhlpsrc; + IShellFolder_QueryInterface(This->pSFParent, &IID_ISFHelper, (LPVOID*)&psfhlpdst); + IShellFolder_QueryInterface(psfFrom, &IID_ISFHelper, (LPVOID*)&psfhlpsrc); + + /* do the copy/move */ + if (psfhlpdst && psfhlpsrc) + { + ISFHelper_CopyItems(psfhlpdst, psfFrom, lpcida->cidl, (LPCITEMIDLIST*)apidl); + /* FIXME handle move + ISFHelper_DeleteItems(psfhlpsrc, lpcida->cidl, apidl); + */ + } + if(psfhlpdst) ISFHelper_Release(psfhlpdst); + if(psfhlpsrc) ISFHelper_Release(psfhlpsrc); + IShellFolder_Release(psfFrom); + } + + _ILFreeaPidl(apidl, lpcida->cidl); + SHFree(pidl); + + /* release the medium*/ + ReleaseStgMedium(&medium); + } + IDataObject_Release(pda); + } +#if 0 + HGLOBAL hMem; + + OpenClipboard(NULL); + hMem = GetClipboardData(CF_HDROP); + + if(hMem) + { + char * pDropFiles = (char *)GlobalLock(hMem); + if(pDropFiles) + { + int len, offset = sizeof(DROPFILESTRUCT); + + while( pDropFiles[offset] != 0) + { + len = strlen(pDropFiles + offset); + TRACE("%s\n", pDropFiles + offset); + offset += len+1; + } + } + GlobalUnlock(hMem); + } + CloseClipboard(); +#endif + return bSuccess; +} + +/************************************************************************** +* ISVBgCm_fnInvokeCommand() +*/ +static HRESULT WINAPI ISVBgCm_fnInvokeCommand( + IContextMenu2 *iface, + LPCMINVOKECOMMANDINFO lpcmi) +{ + BgCmImpl *This = (BgCmImpl *)iface; + + LPSHELLBROWSER lpSB; + LPSHELLVIEW lpSV = NULL; + HWND hWndSV = 0; + + TRACE("(%p)->(invcom=%p verb=%p wnd=%p)\n",This,lpcmi,lpcmi->lpVerb, lpcmi->hwnd); + + /* get the active IShellView */ + if((lpSB = (LPSHELLBROWSER)SendMessageA(lpcmi->hwnd, CWM_GETISHELLBROWSER,0,0))) + { + if(SUCCEEDED(IShellBrowser_QueryActiveShellView(lpSB, &lpSV))) + { + IShellView_GetWindow(lpSV, &hWndSV); + } + } + + if(HIWORD(lpcmi->lpVerb)) + { + TRACE("%s\n",lpcmi->lpVerb); + + if (! strcmp(lpcmi->lpVerb,CMDSTR_NEWFOLDERA)) + { + DoNewFolder(iface, lpSV); + } + else if (! strcmp(lpcmi->lpVerb,CMDSTR_VIEWLISTA)) + { + if(hWndSV) SendMessageA(hWndSV, WM_COMMAND, MAKEWPARAM(FCIDM_SHVIEW_LISTVIEW,0),0 ); + } + else if (! strcmp(lpcmi->lpVerb,CMDSTR_VIEWDETAILSA)) + { + if(hWndSV) SendMessageA(hWndSV, WM_COMMAND, MAKEWPARAM(FCIDM_SHVIEW_REPORTVIEW,0),0 ); + } + else + { + FIXME("please report: unknown verb %s\n",lpcmi->lpVerb); + } + } + else + { + switch(LOWORD(lpcmi->lpVerb)) + { + case FCIDM_SHVIEW_NEWFOLDER: + DoNewFolder(iface, lpSV); + break; + case FCIDM_SHVIEW_INSERT: + DoPaste(iface); + break; + default: + /* if it's a id just pass it to the parent shv */ + SendMessageA(hWndSV, WM_COMMAND, MAKEWPARAM(LOWORD(lpcmi->lpVerb), 0),0 ); + break; + } + } + + if (lpSV) + IShellView_Release(lpSV); /* QueryActiveShellView does AddRef*/ + + return NOERROR; +} + +/************************************************************************** + * ISVBgCm_fnGetCommandString() + * + */ +static HRESULT WINAPI ISVBgCm_fnGetCommandString( + IContextMenu2 *iface, + UINT idCommand, + UINT uFlags, + UINT* lpReserved, + LPSTR lpszName, + UINT uMaxNameLen) +{ + BgCmImpl *This = (BgCmImpl *)iface; + + TRACE("(%p)->(idcom=%x flags=%x %p name=%p len=%x)\n",This, idCommand, uFlags, lpReserved, lpszName, uMaxNameLen); + + /* test the existence of the menu items, the file dialog enables + the buttons according to this */ + if (uFlags == GCS_VALIDATEA) + { + if(HIWORD(idCommand)) + { + if (!strcmp((LPSTR)idCommand, CMDSTR_VIEWLISTA) || + !strcmp((LPSTR)idCommand, CMDSTR_VIEWDETAILSA) || + !strcmp((LPSTR)idCommand, CMDSTR_NEWFOLDERA)) + { + return NOERROR; + } + } + } + + FIXME("unknown command string\n"); + return E_FAIL; +} + +/************************************************************************** +* ISVBgCm_fnHandleMenuMsg() +*/ +static HRESULT WINAPI ISVBgCm_fnHandleMenuMsg( + IContextMenu2 *iface, + UINT uMsg, + WPARAM wParam, + LPARAM lParam) +{ + BgCmImpl *This = (BgCmImpl *)iface; + + FIXME("(%p)->(msg=%x wp=%x lp=%lx)\n",This, uMsg, wParam, lParam); + + return E_NOTIMPL; +} + +/************************************************************************** +* IContextMenu2 VTable +* +*/ +static struct IContextMenu2Vtbl cmvt = +{ + ISVBgCm_fnQueryInterface, + ISVBgCm_fnAddRef, + ISVBgCm_fnRelease, + ISVBgCm_fnQueryContextMenu, + ISVBgCm_fnInvokeCommand, + ISVBgCm_fnGetCommandString, + ISVBgCm_fnHandleMenuMsg +}; diff --git a/reactos/lib/shell32/shv_item_cmenu.c b/reactos/lib/shell32/shv_item_cmenu.c index 6db0b03e442..96584068191 100644 --- a/reactos/lib/shell32/shv_item_cmenu.c +++ b/reactos/lib/shell32/shv_item_cmenu.c @@ -1,531 +1,531 @@ -/* - * IContextMenu for items in the shellview - * - * Copyright 1998, 2000 Juergen Schmied - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include - -#define COBJMACROS -#define NONAMELESSUNION -#define NONAMELESSSTRUCT - -#include "winerror.h" -#include "wine/debug.h" - -#include "windef.h" -#include "wingdi.h" -#include "pidl.h" -#include "shlguid.h" -#include "undocshell.h" -#include "shlobj.h" - -#include "shell32_main.h" -#include "shellfolder.h" - -WINE_DEFAULT_DEBUG_CHANNEL(shell); - -/************************************************************************** -* IContextMenu Implementation -*/ -typedef struct -{ IContextMenu2Vtbl *lpVtbl; - DWORD ref; - IShellFolder* pSFParent; - LPITEMIDLIST pidl; /* root pidl */ - LPITEMIDLIST *apidl; /* array of child pidls */ - UINT cidl; - BOOL bAllValues; -} ItemCmImpl; - - -static struct IContextMenu2Vtbl cmvt; - -/************************************************************************** -* ISvItemCm_CanRenameItems() -*/ -static BOOL ISvItemCm_CanRenameItems(ItemCmImpl *This) -{ UINT i; - DWORD dwAttributes; - - TRACE("(%p)->()\n",This); - - if(This->apidl) - { - for(i = 0; i < This->cidl; i++){} - if(i > 1) return FALSE; /* can't rename more than one item at a time*/ - dwAttributes = SFGAO_CANRENAME; - IShellFolder_GetAttributesOf(This->pSFParent, 1, (LPCITEMIDLIST*)This->apidl, &dwAttributes); - return dwAttributes & SFGAO_CANRENAME; - } - return FALSE; -} - -/************************************************************************** -* ISvItemCm_Constructor() -*/ -IContextMenu2 *ISvItemCm_Constructor(LPSHELLFOLDER pSFParent, LPCITEMIDLIST pidl, LPCITEMIDLIST *apidl, UINT cidl) -{ ItemCmImpl* cm; - UINT u; - - cm = (ItemCmImpl*)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(ItemCmImpl)); - cm->lpVtbl = &cmvt; - cm->ref = 1; - cm->pidl = ILClone(pidl); - cm->pSFParent = pSFParent; - - if(pSFParent) IShellFolder_AddRef(pSFParent); - - cm->apidl = _ILCopyaPidl(apidl, cidl); - cm->cidl = cidl; - - cm->bAllValues = 1; - for(u = 0; u < cidl; u++) - { - cm->bAllValues &= (_ILIsValue(apidl[u]) ? 1 : 0); - } - - TRACE("(%p)->()\n",cm); - - return (IContextMenu2*)cm; -} - -/************************************************************************** -* ISvItemCm_fnQueryInterface -*/ -static HRESULT WINAPI ISvItemCm_fnQueryInterface(IContextMenu2 *iface, REFIID riid, LPVOID *ppvObj) -{ - ItemCmImpl *This = (ItemCmImpl *)iface; - - TRACE("(%p)->(\n\tIID:\t%s,%p)\n",This,debugstr_guid(riid),ppvObj); - - *ppvObj = NULL; - - if(IsEqualIID(riid, &IID_IUnknown) || - IsEqualIID(riid, &IID_IContextMenu) || - IsEqualIID(riid, &IID_IContextMenu2)) - { - *ppvObj = This; - } - else if(IsEqualIID(riid, &IID_IShellExtInit)) /*IShellExtInit*/ - { - FIXME("-- LPSHELLEXTINIT pointer requested\n"); - } - - if(*ppvObj) - { - IUnknown_AddRef((IUnknown*)*ppvObj); - TRACE("-- Interface: (%p)->(%p)\n",ppvObj,*ppvObj); - return S_OK; - } - TRACE("-- Interface: E_NOINTERFACE\n"); - return E_NOINTERFACE; -} - -/************************************************************************** -* ISvItemCm_fnAddRef -*/ -static ULONG WINAPI ISvItemCm_fnAddRef(IContextMenu2 *iface) -{ - ItemCmImpl *This = (ItemCmImpl *)iface; - - TRACE("(%p)->(count=%lu)\n",This, This->ref); - - return ++(This->ref); -} - -/************************************************************************** -* ISvItemCm_fnRelease -*/ -static ULONG WINAPI ISvItemCm_fnRelease(IContextMenu2 *iface) -{ - ItemCmImpl *This = (ItemCmImpl *)iface; - - TRACE("(%p)->()\n",This); - - if (!--(This->ref)) - { - TRACE(" destroying IContextMenu(%p)\n",This); - - if(This->pSFParent) - IShellFolder_Release(This->pSFParent); - - if(This->pidl) - SHFree(This->pidl); - - /*make sure the pidl is freed*/ - _ILFreeaPidl(This->apidl, This->cidl); - - HeapFree(GetProcessHeap(),0,This); - return 0; - } - return This->ref; -} - -/************************************************************************** -* ICM_InsertItem() -*/ -void WINAPI _InsertMenuItem ( - HMENU hmenu, - UINT indexMenu, - BOOL fByPosition, - UINT wID, - UINT fType, - LPSTR dwTypeData, - UINT fState) -{ - MENUITEMINFOA mii; - - ZeroMemory(&mii, sizeof(mii)); - mii.cbSize = sizeof(mii); - if (fType == MFT_SEPARATOR) - { - mii.fMask = MIIM_ID | MIIM_TYPE; - } - else - { - mii.fMask = MIIM_ID | MIIM_TYPE | MIIM_STATE; - mii.dwTypeData = dwTypeData; - mii.fState = fState; - } - mii.wID = wID; - mii.fType = fType; - InsertMenuItemA( hmenu, indexMenu, fByPosition, &mii); -} - -/************************************************************************** -* ISvItemCm_fnQueryContextMenu() -* FIXME: load menu MENU_SHV_FILE out of resources instead if creating -* each menu item by calling _InsertMenuItem() -*/ -static HRESULT WINAPI ISvItemCm_fnQueryContextMenu( - IContextMenu2 *iface, - HMENU hmenu, - UINT indexMenu, - UINT idCmdFirst, - UINT idCmdLast, - UINT uFlags) -{ - ItemCmImpl *This = (ItemCmImpl *)iface; - - TRACE("(%p)->(hmenu=%p indexmenu=%x cmdfirst=%x cmdlast=%x flags=%x )\n",This, hmenu, indexMenu, idCmdFirst, idCmdLast, uFlags); - - if (idCmdFirst != 0) - FIXME("We should use idCmdFirst=%d and idCmdLast=%d for command ids\n", idCmdFirst, idCmdLast); - - if(!(CMF_DEFAULTONLY & uFlags) && This->cidl>0) - { - if(!(uFlags & CMF_EXPLORE)) - _InsertMenuItem(hmenu, indexMenu++, TRUE, FCIDM_SHVIEW_OPEN, MFT_STRING, "&Select", MFS_ENABLED); - - if(This->bAllValues) - { - _InsertMenuItem(hmenu, indexMenu++, TRUE, FCIDM_SHVIEW_OPEN, MFT_STRING, "&Open", MFS_ENABLED); - _InsertMenuItem(hmenu, indexMenu++, TRUE, FCIDM_SHVIEW_EXPLORE, MFT_STRING, "&Explore", MFS_ENABLED); - } - else - { - _InsertMenuItem(hmenu, indexMenu++, TRUE, FCIDM_SHVIEW_EXPLORE, MFT_STRING, "&Explore", MFS_ENABLED); - _InsertMenuItem(hmenu, indexMenu++, TRUE, FCIDM_SHVIEW_OPEN, MFT_STRING, "&Open", MFS_ENABLED); - } - - SetMenuDefaultItem(hmenu, 0, MF_BYPOSITION); - - _InsertMenuItem(hmenu, indexMenu++, TRUE, 0, MFT_SEPARATOR, NULL, 0); - _InsertMenuItem(hmenu, indexMenu++, TRUE, FCIDM_SHVIEW_COPY, MFT_STRING, "&Copy", MFS_ENABLED); - _InsertMenuItem(hmenu, indexMenu++, TRUE, FCIDM_SHVIEW_CUT, MFT_STRING, "&Cut", MFS_ENABLED); - - _InsertMenuItem(hmenu, indexMenu++, TRUE, 0, MFT_SEPARATOR, NULL, 0); - _InsertMenuItem(hmenu, indexMenu++, TRUE, FCIDM_SHVIEW_DELETE, MFT_STRING, "&Delete", MFS_ENABLED); - - if(uFlags & CMF_CANRENAME) - _InsertMenuItem(hmenu, indexMenu++, TRUE, FCIDM_SHVIEW_RENAME, MFT_STRING, "&Rename", ISvItemCm_CanRenameItems(This) ? MFS_ENABLED : MFS_DISABLED); - - return MAKE_HRESULT(SEVERITY_SUCCESS, 0, (FCIDM_SHVIEWLAST)); - } - return MAKE_HRESULT(SEVERITY_SUCCESS, 0, 0); -} - -/************************************************************************** -* DoOpenExplore -* -* for folders only -*/ - -static void DoOpenExplore( - IContextMenu2 *iface, - HWND hwnd, - LPCSTR verb) -{ - ItemCmImpl *This = (ItemCmImpl *)iface; - - UINT i, bFolderFound = FALSE; - LPITEMIDLIST pidlFQ; - SHELLEXECUTEINFOA sei; - - /* Find the first item in the list that is not a value. These commands - should never be invoked if there isn't at least one folder item in the list.*/ - - for(i = 0; icidl; i++) - { - if(!_ILIsValue(This->apidl[i])) - { - bFolderFound = TRUE; - break; - } - } - - if (!bFolderFound) return; - - pidlFQ = ILCombine(This->pidl, This->apidl[i]); - - ZeroMemory(&sei, sizeof(sei)); - sei.cbSize = sizeof(sei); - sei.fMask = SEE_MASK_IDLIST | SEE_MASK_CLASSNAME; - sei.lpIDList = pidlFQ; - sei.lpClass = "Folder"; - sei.hwnd = hwnd; - sei.nShow = SW_SHOWNORMAL; - sei.lpVerb = verb; - ShellExecuteExA(&sei); - SHFree(pidlFQ); -} - -/************************************************************************** -* DoRename -*/ -static void DoRename( - IContextMenu2 *iface, - HWND hwnd) -{ - ItemCmImpl *This = (ItemCmImpl *)iface; - - LPSHELLBROWSER lpSB; - LPSHELLVIEW lpSV; - - TRACE("(%p)->(wnd=%p)\n",This, hwnd); - - /* get the active IShellView */ - if ((lpSB = (LPSHELLBROWSER)SendMessageA(hwnd, CWM_GETISHELLBROWSER,0,0))) - { - if(SUCCEEDED(IShellBrowser_QueryActiveShellView(lpSB, &lpSV))) - { - TRACE("(sv=%p)\n",lpSV); - IShellView_SelectItem(lpSV, This->apidl[0], - SVSI_DESELECTOTHERS|SVSI_EDIT|SVSI_ENSUREVISIBLE|SVSI_FOCUSED|SVSI_SELECT); - IShellView_Release(lpSV); - } - } -} - -/************************************************************************** - * DoDelete - * - * deletes the currently selected items - */ -static void DoDelete(IContextMenu2 *iface) -{ - ItemCmImpl *This = (ItemCmImpl *)iface; - ISFHelper * psfhlp; - - IShellFolder_QueryInterface(This->pSFParent, &IID_ISFHelper, (LPVOID*)&psfhlp); - if (psfhlp) - { - ISFHelper_DeleteItems(psfhlp, This->cidl, (LPCITEMIDLIST *)This->apidl); - ISFHelper_Release(psfhlp); - } -} - -/************************************************************************** - * DoCopyOrCut - * - * copies the currently selected items into the clipboard - */ -static BOOL DoCopyOrCut( - IContextMenu2 *iface, - HWND hwnd, - BOOL bCut) -{ - ItemCmImpl *This = (ItemCmImpl *)iface; - - LPSHELLBROWSER lpSB; - LPSHELLVIEW lpSV; - LPDATAOBJECT lpDo; - - TRACE("(%p)->(wnd=%p,bCut=0x%08x)\n",This, hwnd, bCut); - - /* get the active IShellView */ - if ((lpSB = (LPSHELLBROWSER)SendMessageA(hwnd, CWM_GETISHELLBROWSER,0,0))) - { - if (SUCCEEDED(IShellBrowser_QueryActiveShellView(lpSB, &lpSV))) - { - if (SUCCEEDED(IShellView_GetItemObject(lpSV, SVGIO_SELECTION, &IID_IDataObject, (LPVOID*)&lpDo))) - { - OleSetClipboard(lpDo); - IDataObject_Release(lpDo); - } - IShellView_Release(lpSV); - } - } - return TRUE; -} -/************************************************************************** -* ISvItemCm_fnInvokeCommand() -*/ -static HRESULT WINAPI ISvItemCm_fnInvokeCommand( - IContextMenu2 *iface, - LPCMINVOKECOMMANDINFO lpcmi) -{ - ItemCmImpl *This = (ItemCmImpl *)iface; - - if (lpcmi->cbSize != sizeof(CMINVOKECOMMANDINFO)) - FIXME("Is an EX structure\n"); - - TRACE("(%p)->(invcom=%p verb=%p wnd=%p)\n",This,lpcmi,lpcmi->lpVerb, lpcmi->hwnd); - - if( HIWORD(lpcmi->lpVerb)==0 && LOWORD(lpcmi->lpVerb) > FCIDM_SHVIEWLAST) - { - TRACE("Invalid Verb %x\n",LOWORD(lpcmi->lpVerb)); - return E_INVALIDARG; - } - - if (HIWORD(lpcmi->lpVerb) == 0) - { - switch(LOWORD(lpcmi->lpVerb)) - { - case FCIDM_SHVIEW_EXPLORE: - TRACE("Verb FCIDM_SHVIEW_EXPLORE\n"); - DoOpenExplore(iface, lpcmi->hwnd, "explore"); - break; - case FCIDM_SHVIEW_OPEN: - TRACE("Verb FCIDM_SHVIEW_OPEN\n"); - DoOpenExplore(iface, lpcmi->hwnd, "open"); - break; - case FCIDM_SHVIEW_RENAME: - TRACE("Verb FCIDM_SHVIEW_RENAME\n"); - DoRename(iface, lpcmi->hwnd); - break; - case FCIDM_SHVIEW_DELETE: - TRACE("Verb FCIDM_SHVIEW_DELETE\n"); - DoDelete(iface); - break; - case FCIDM_SHVIEW_COPY: - TRACE("Verb FCIDM_SHVIEW_COPY\n"); - DoCopyOrCut(iface, lpcmi->hwnd, FALSE); - break; - case FCIDM_SHVIEW_CUT: - TRACE("Verb FCIDM_SHVIEW_CUT\n"); - DoCopyOrCut(iface, lpcmi->hwnd, TRUE); - break; - default: - FIXME("Unhandled Verb %xl\n",LOWORD(lpcmi->lpVerb)); - } - } - else - { - TRACE("Verb is %s\n",debugstr_a(lpcmi->lpVerb)); - if (strcmp(lpcmi->lpVerb,"delete")==0) - DoDelete(iface); - else - FIXME("Unhandled string verb %s\n",debugstr_a(lpcmi->lpVerb)); - } - return NOERROR; -} - -/************************************************************************** -* ISvItemCm_fnGetCommandString() -*/ -static HRESULT WINAPI ISvItemCm_fnGetCommandString( - IContextMenu2 *iface, - UINT idCommand, - UINT uFlags, - UINT* lpReserved, - LPSTR lpszName, - UINT uMaxNameLen) -{ - ItemCmImpl *This = (ItemCmImpl *)iface; - - HRESULT hr = E_INVALIDARG; - - TRACE("(%p)->(idcom=%x flags=%x %p name=%p len=%x)\n",This, idCommand, uFlags, lpReserved, lpszName, uMaxNameLen); - - switch(uFlags) - { - case GCS_HELPTEXTA: - case GCS_HELPTEXTW: - hr = E_NOTIMPL; - break; - - case GCS_VERBA: - switch(idCommand) - { - case FCIDM_SHVIEW_RENAME: - strcpy((LPSTR)lpszName, "rename"); - hr = NOERROR; - break; - } - break; - - /* NT 4.0 with IE 3.0x or no IE will always call This with GCS_VERBW. In This - case, you need to do the lstrcpyW to the pointer passed.*/ - case GCS_VERBW: - switch(idCommand) - { case FCIDM_SHVIEW_RENAME: - MultiByteToWideChar( CP_ACP, 0, "rename", -1, (LPWSTR)lpszName, uMaxNameLen ); - hr = NOERROR; - break; - } - break; - - case GCS_VALIDATEA: - case GCS_VALIDATEW: - hr = NOERROR; - break; - } - TRACE("-- (%p)->(name=%s)\n",This, lpszName); - return hr; -} - -/************************************************************************** -* ISvItemCm_fnHandleMenuMsg() -* NOTES -* should be only in IContextMenu2 and IContextMenu3 -* is nevertheless called from word95 -*/ -static HRESULT WINAPI ISvItemCm_fnHandleMenuMsg( - IContextMenu2 *iface, - UINT uMsg, - WPARAM wParam, - LPARAM lParam) -{ - ItemCmImpl *This = (ItemCmImpl *)iface; - - TRACE("(%p)->(msg=%x wp=%x lp=%lx)\n",This, uMsg, wParam, lParam); - - return E_NOTIMPL; -} - -static struct IContextMenu2Vtbl cmvt = -{ - ISvItemCm_fnQueryInterface, - ISvItemCm_fnAddRef, - ISvItemCm_fnRelease, - ISvItemCm_fnQueryContextMenu, - ISvItemCm_fnInvokeCommand, - ISvItemCm_fnGetCommandString, - ISvItemCm_fnHandleMenuMsg -}; +/* + * IContextMenu for items in the shellview + * + * Copyright 1998, 2000 Juergen Schmied + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include + +#define COBJMACROS +#define NONAMELESSUNION +#define NONAMELESSSTRUCT + +#include "winerror.h" +#include "wine/debug.h" + +#include "windef.h" +#include "wingdi.h" +#include "pidl.h" +#include "shlguid.h" +#include "undocshell.h" +#include "shlobj.h" + +#include "shell32_main.h" +#include "shellfolder.h" + +WINE_DEFAULT_DEBUG_CHANNEL(shell); + +/************************************************************************** +* IContextMenu Implementation +*/ +typedef struct +{ IContextMenu2Vtbl *lpVtbl; + DWORD ref; + IShellFolder* pSFParent; + LPITEMIDLIST pidl; /* root pidl */ + LPITEMIDLIST *apidl; /* array of child pidls */ + UINT cidl; + BOOL bAllValues; +} ItemCmImpl; + + +static struct IContextMenu2Vtbl cmvt; + +/************************************************************************** +* ISvItemCm_CanRenameItems() +*/ +static BOOL ISvItemCm_CanRenameItems(ItemCmImpl *This) +{ UINT i; + DWORD dwAttributes; + + TRACE("(%p)->()\n",This); + + if(This->apidl) + { + for(i = 0; i < This->cidl; i++){} + if(i > 1) return FALSE; /* can't rename more than one item at a time*/ + dwAttributes = SFGAO_CANRENAME; + IShellFolder_GetAttributesOf(This->pSFParent, 1, (LPCITEMIDLIST*)This->apidl, &dwAttributes); + return dwAttributes & SFGAO_CANRENAME; + } + return FALSE; +} + +/************************************************************************** +* ISvItemCm_Constructor() +*/ +IContextMenu2 *ISvItemCm_Constructor(LPSHELLFOLDER pSFParent, LPCITEMIDLIST pidl, LPCITEMIDLIST *apidl, UINT cidl) +{ ItemCmImpl* cm; + UINT u; + + cm = (ItemCmImpl*)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(ItemCmImpl)); + cm->lpVtbl = &cmvt; + cm->ref = 1; + cm->pidl = ILClone(pidl); + cm->pSFParent = pSFParent; + + if(pSFParent) IShellFolder_AddRef(pSFParent); + + cm->apidl = _ILCopyaPidl(apidl, cidl); + cm->cidl = cidl; + + cm->bAllValues = 1; + for(u = 0; u < cidl; u++) + { + cm->bAllValues &= (_ILIsValue(apidl[u]) ? 1 : 0); + } + + TRACE("(%p)->()\n",cm); + + return (IContextMenu2*)cm; +} + +/************************************************************************** +* ISvItemCm_fnQueryInterface +*/ +static HRESULT WINAPI ISvItemCm_fnQueryInterface(IContextMenu2 *iface, REFIID riid, LPVOID *ppvObj) +{ + ItemCmImpl *This = (ItemCmImpl *)iface; + + TRACE("(%p)->(\n\tIID:\t%s,%p)\n",This,debugstr_guid(riid),ppvObj); + + *ppvObj = NULL; + + if(IsEqualIID(riid, &IID_IUnknown) || + IsEqualIID(riid, &IID_IContextMenu) || + IsEqualIID(riid, &IID_IContextMenu2)) + { + *ppvObj = This; + } + else if(IsEqualIID(riid, &IID_IShellExtInit)) /*IShellExtInit*/ + { + FIXME("-- LPSHELLEXTINIT pointer requested\n"); + } + + if(*ppvObj) + { + IUnknown_AddRef((IUnknown*)*ppvObj); + TRACE("-- Interface: (%p)->(%p)\n",ppvObj,*ppvObj); + return S_OK; + } + TRACE("-- Interface: E_NOINTERFACE\n"); + return E_NOINTERFACE; +} + +/************************************************************************** +* ISvItemCm_fnAddRef +*/ +static ULONG WINAPI ISvItemCm_fnAddRef(IContextMenu2 *iface) +{ + ItemCmImpl *This = (ItemCmImpl *)iface; + + TRACE("(%p)->(count=%lu)\n",This, This->ref); + + return ++(This->ref); +} + +/************************************************************************** +* ISvItemCm_fnRelease +*/ +static ULONG WINAPI ISvItemCm_fnRelease(IContextMenu2 *iface) +{ + ItemCmImpl *This = (ItemCmImpl *)iface; + + TRACE("(%p)->()\n",This); + + if (!--(This->ref)) + { + TRACE(" destroying IContextMenu(%p)\n",This); + + if(This->pSFParent) + IShellFolder_Release(This->pSFParent); + + if(This->pidl) + SHFree(This->pidl); + + /*make sure the pidl is freed*/ + _ILFreeaPidl(This->apidl, This->cidl); + + HeapFree(GetProcessHeap(),0,This); + return 0; + } + return This->ref; +} + +/************************************************************************** +* ICM_InsertItem() +*/ +void WINAPI _InsertMenuItem ( + HMENU hmenu, + UINT indexMenu, + BOOL fByPosition, + UINT wID, + UINT fType, + LPSTR dwTypeData, + UINT fState) +{ + MENUITEMINFOA mii; + + ZeroMemory(&mii, sizeof(mii)); + mii.cbSize = sizeof(mii); + if (fType == MFT_SEPARATOR) + { + mii.fMask = MIIM_ID | MIIM_TYPE; + } + else + { + mii.fMask = MIIM_ID | MIIM_TYPE | MIIM_STATE; + mii.dwTypeData = dwTypeData; + mii.fState = fState; + } + mii.wID = wID; + mii.fType = fType; + InsertMenuItemA( hmenu, indexMenu, fByPosition, &mii); +} + +/************************************************************************** +* ISvItemCm_fnQueryContextMenu() +* FIXME: load menu MENU_SHV_FILE out of resources instead if creating +* each menu item by calling _InsertMenuItem() +*/ +static HRESULT WINAPI ISvItemCm_fnQueryContextMenu( + IContextMenu2 *iface, + HMENU hmenu, + UINT indexMenu, + UINT idCmdFirst, + UINT idCmdLast, + UINT uFlags) +{ + ItemCmImpl *This = (ItemCmImpl *)iface; + + TRACE("(%p)->(hmenu=%p indexmenu=%x cmdfirst=%x cmdlast=%x flags=%x )\n",This, hmenu, indexMenu, idCmdFirst, idCmdLast, uFlags); + + if (idCmdFirst != 0) + FIXME("We should use idCmdFirst=%d and idCmdLast=%d for command ids\n", idCmdFirst, idCmdLast); + + if(!(CMF_DEFAULTONLY & uFlags) && This->cidl>0) + { + if(!(uFlags & CMF_EXPLORE)) + _InsertMenuItem(hmenu, indexMenu++, TRUE, FCIDM_SHVIEW_OPEN, MFT_STRING, "&Select", MFS_ENABLED); + + if(This->bAllValues) + { + _InsertMenuItem(hmenu, indexMenu++, TRUE, FCIDM_SHVIEW_OPEN, MFT_STRING, "&Open", MFS_ENABLED); + _InsertMenuItem(hmenu, indexMenu++, TRUE, FCIDM_SHVIEW_EXPLORE, MFT_STRING, "&Explore", MFS_ENABLED); + } + else + { + _InsertMenuItem(hmenu, indexMenu++, TRUE, FCIDM_SHVIEW_EXPLORE, MFT_STRING, "&Explore", MFS_ENABLED); + _InsertMenuItem(hmenu, indexMenu++, TRUE, FCIDM_SHVIEW_OPEN, MFT_STRING, "&Open", MFS_ENABLED); + } + + SetMenuDefaultItem(hmenu, 0, MF_BYPOSITION); + + _InsertMenuItem(hmenu, indexMenu++, TRUE, 0, MFT_SEPARATOR, NULL, 0); + _InsertMenuItem(hmenu, indexMenu++, TRUE, FCIDM_SHVIEW_COPY, MFT_STRING, "&Copy", MFS_ENABLED); + _InsertMenuItem(hmenu, indexMenu++, TRUE, FCIDM_SHVIEW_CUT, MFT_STRING, "&Cut", MFS_ENABLED); + + _InsertMenuItem(hmenu, indexMenu++, TRUE, 0, MFT_SEPARATOR, NULL, 0); + _InsertMenuItem(hmenu, indexMenu++, TRUE, FCIDM_SHVIEW_DELETE, MFT_STRING, "&Delete", MFS_ENABLED); + + if(uFlags & CMF_CANRENAME) + _InsertMenuItem(hmenu, indexMenu++, TRUE, FCIDM_SHVIEW_RENAME, MFT_STRING, "&Rename", ISvItemCm_CanRenameItems(This) ? MFS_ENABLED : MFS_DISABLED); + + return MAKE_HRESULT(SEVERITY_SUCCESS, 0, (FCIDM_SHVIEWLAST)); + } + return MAKE_HRESULT(SEVERITY_SUCCESS, 0, 0); +} + +/************************************************************************** +* DoOpenExplore +* +* for folders only +*/ + +static void DoOpenExplore( + IContextMenu2 *iface, + HWND hwnd, + LPCSTR verb) +{ + ItemCmImpl *This = (ItemCmImpl *)iface; + + UINT i, bFolderFound = FALSE; + LPITEMIDLIST pidlFQ; + SHELLEXECUTEINFOA sei; + + /* Find the first item in the list that is not a value. These commands + should never be invoked if there isn't at least one folder item in the list.*/ + + for(i = 0; icidl; i++) + { + if(!_ILIsValue(This->apidl[i])) + { + bFolderFound = TRUE; + break; + } + } + + if (!bFolderFound) return; + + pidlFQ = ILCombine(This->pidl, This->apidl[i]); + + ZeroMemory(&sei, sizeof(sei)); + sei.cbSize = sizeof(sei); + sei.fMask = SEE_MASK_IDLIST | SEE_MASK_CLASSNAME; + sei.lpIDList = pidlFQ; + sei.lpClass = "Folder"; + sei.hwnd = hwnd; + sei.nShow = SW_SHOWNORMAL; + sei.lpVerb = verb; + ShellExecuteExA(&sei); + SHFree(pidlFQ); +} + +/************************************************************************** +* DoRename +*/ +static void DoRename( + IContextMenu2 *iface, + HWND hwnd) +{ + ItemCmImpl *This = (ItemCmImpl *)iface; + + LPSHELLBROWSER lpSB; + LPSHELLVIEW lpSV; + + TRACE("(%p)->(wnd=%p)\n",This, hwnd); + + /* get the active IShellView */ + if ((lpSB = (LPSHELLBROWSER)SendMessageA(hwnd, CWM_GETISHELLBROWSER,0,0))) + { + if(SUCCEEDED(IShellBrowser_QueryActiveShellView(lpSB, &lpSV))) + { + TRACE("(sv=%p)\n",lpSV); + IShellView_SelectItem(lpSV, This->apidl[0], + SVSI_DESELECTOTHERS|SVSI_EDIT|SVSI_ENSUREVISIBLE|SVSI_FOCUSED|SVSI_SELECT); + IShellView_Release(lpSV); + } + } +} + +/************************************************************************** + * DoDelete + * + * deletes the currently selected items + */ +static void DoDelete(IContextMenu2 *iface) +{ + ItemCmImpl *This = (ItemCmImpl *)iface; + ISFHelper * psfhlp; + + IShellFolder_QueryInterface(This->pSFParent, &IID_ISFHelper, (LPVOID*)&psfhlp); + if (psfhlp) + { + ISFHelper_DeleteItems(psfhlp, This->cidl, (LPCITEMIDLIST *)This->apidl); + ISFHelper_Release(psfhlp); + } +} + +/************************************************************************** + * DoCopyOrCut + * + * copies the currently selected items into the clipboard + */ +static BOOL DoCopyOrCut( + IContextMenu2 *iface, + HWND hwnd, + BOOL bCut) +{ + ItemCmImpl *This = (ItemCmImpl *)iface; + + LPSHELLBROWSER lpSB; + LPSHELLVIEW lpSV; + LPDATAOBJECT lpDo; + + TRACE("(%p)->(wnd=%p,bCut=0x%08x)\n",This, hwnd, bCut); + + /* get the active IShellView */ + if ((lpSB = (LPSHELLBROWSER)SendMessageA(hwnd, CWM_GETISHELLBROWSER,0,0))) + { + if (SUCCEEDED(IShellBrowser_QueryActiveShellView(lpSB, &lpSV))) + { + if (SUCCEEDED(IShellView_GetItemObject(lpSV, SVGIO_SELECTION, &IID_IDataObject, (LPVOID*)&lpDo))) + { + OleSetClipboard(lpDo); + IDataObject_Release(lpDo); + } + IShellView_Release(lpSV); + } + } + return TRUE; +} +/************************************************************************** +* ISvItemCm_fnInvokeCommand() +*/ +static HRESULT WINAPI ISvItemCm_fnInvokeCommand( + IContextMenu2 *iface, + LPCMINVOKECOMMANDINFO lpcmi) +{ + ItemCmImpl *This = (ItemCmImpl *)iface; + + if (lpcmi->cbSize != sizeof(CMINVOKECOMMANDINFO)) + FIXME("Is an EX structure\n"); + + TRACE("(%p)->(invcom=%p verb=%p wnd=%p)\n",This,lpcmi,lpcmi->lpVerb, lpcmi->hwnd); + + if( HIWORD(lpcmi->lpVerb)==0 && LOWORD(lpcmi->lpVerb) > FCIDM_SHVIEWLAST) + { + TRACE("Invalid Verb %x\n",LOWORD(lpcmi->lpVerb)); + return E_INVALIDARG; + } + + if (HIWORD(lpcmi->lpVerb) == 0) + { + switch(LOWORD(lpcmi->lpVerb)) + { + case FCIDM_SHVIEW_EXPLORE: + TRACE("Verb FCIDM_SHVIEW_EXPLORE\n"); + DoOpenExplore(iface, lpcmi->hwnd, "explore"); + break; + case FCIDM_SHVIEW_OPEN: + TRACE("Verb FCIDM_SHVIEW_OPEN\n"); + DoOpenExplore(iface, lpcmi->hwnd, "open"); + break; + case FCIDM_SHVIEW_RENAME: + TRACE("Verb FCIDM_SHVIEW_RENAME\n"); + DoRename(iface, lpcmi->hwnd); + break; + case FCIDM_SHVIEW_DELETE: + TRACE("Verb FCIDM_SHVIEW_DELETE\n"); + DoDelete(iface); + break; + case FCIDM_SHVIEW_COPY: + TRACE("Verb FCIDM_SHVIEW_COPY\n"); + DoCopyOrCut(iface, lpcmi->hwnd, FALSE); + break; + case FCIDM_SHVIEW_CUT: + TRACE("Verb FCIDM_SHVIEW_CUT\n"); + DoCopyOrCut(iface, lpcmi->hwnd, TRUE); + break; + default: + FIXME("Unhandled Verb %xl\n",LOWORD(lpcmi->lpVerb)); + } + } + else + { + TRACE("Verb is %s\n",debugstr_a(lpcmi->lpVerb)); + if (strcmp(lpcmi->lpVerb,"delete")==0) + DoDelete(iface); + else + FIXME("Unhandled string verb %s\n",debugstr_a(lpcmi->lpVerb)); + } + return NOERROR; +} + +/************************************************************************** +* ISvItemCm_fnGetCommandString() +*/ +static HRESULT WINAPI ISvItemCm_fnGetCommandString( + IContextMenu2 *iface, + UINT idCommand, + UINT uFlags, + UINT* lpReserved, + LPSTR lpszName, + UINT uMaxNameLen) +{ + ItemCmImpl *This = (ItemCmImpl *)iface; + + HRESULT hr = E_INVALIDARG; + + TRACE("(%p)->(idcom=%x flags=%x %p name=%p len=%x)\n",This, idCommand, uFlags, lpReserved, lpszName, uMaxNameLen); + + switch(uFlags) + { + case GCS_HELPTEXTA: + case GCS_HELPTEXTW: + hr = E_NOTIMPL; + break; + + case GCS_VERBA: + switch(idCommand) + { + case FCIDM_SHVIEW_RENAME: + strcpy((LPSTR)lpszName, "rename"); + hr = NOERROR; + break; + } + break; + + /* NT 4.0 with IE 3.0x or no IE will always call This with GCS_VERBW. In This + case, you need to do the lstrcpyW to the pointer passed.*/ + case GCS_VERBW: + switch(idCommand) + { case FCIDM_SHVIEW_RENAME: + MultiByteToWideChar( CP_ACP, 0, "rename", -1, (LPWSTR)lpszName, uMaxNameLen ); + hr = NOERROR; + break; + } + break; + + case GCS_VALIDATEA: + case GCS_VALIDATEW: + hr = NOERROR; + break; + } + TRACE("-- (%p)->(name=%s)\n",This, lpszName); + return hr; +} + +/************************************************************************** +* ISvItemCm_fnHandleMenuMsg() +* NOTES +* should be only in IContextMenu2 and IContextMenu3 +* is nevertheless called from word95 +*/ +static HRESULT WINAPI ISvItemCm_fnHandleMenuMsg( + IContextMenu2 *iface, + UINT uMsg, + WPARAM wParam, + LPARAM lParam) +{ + ItemCmImpl *This = (ItemCmImpl *)iface; + + TRACE("(%p)->(msg=%x wp=%x lp=%lx)\n",This, uMsg, wParam, lParam); + + return E_NOTIMPL; +} + +static struct IContextMenu2Vtbl cmvt = +{ + ISvItemCm_fnQueryInterface, + ISvItemCm_fnAddRef, + ISvItemCm_fnRelease, + ISvItemCm_fnQueryContextMenu, + ISvItemCm_fnInvokeCommand, + ISvItemCm_fnGetCommandString, + ISvItemCm_fnHandleMenuMsg +}; diff --git a/reactos/lib/shell32/systray.c b/reactos/lib/shell32/systray.c index fc93114a625..1568289a4ad 100644 --- a/reactos/lib/shell32/systray.c +++ b/reactos/lib/shell32/systray.c @@ -1,397 +1,397 @@ -/* - * Systray - * - * Copyright 1999 Kai Morich - * - * Manage the systray window. That it actually appears in the docking - * area of KDE is handled in dlls/x11drv/window.c, - * X11DRV_set_wm_hints using KWM_DOCKWINDOW. - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include "config.h" - -#ifdef HAVE_UNISTD_H -# include -#endif -#include -#include - -#include "windef.h" -#include "winbase.h" -#include "winnls.h" -#include "wingdi.h" -#include "winuser.h" -#include "shlobj.h" -#include "shellapi.h" -#include "shell32_main.h" -#include "commctrl.h" -#include "wine/debug.h" - -WINE_DEFAULT_DEBUG_CHANNEL(shell); - -typedef struct SystrayItem { - HWND hWnd; - HWND hWndToolTip; - NOTIFYICONDATAA notifyIcon; - struct SystrayItem *nextTrayItem; -} SystrayItem; - -static SystrayItem *systray=NULL; -static int firstSystray=TRUE; /* defer creation of window class until first systray item is created */ - -static BOOL SYSTRAY_Delete(PNOTIFYICONDATAA pnid); - - -#define ICON_SIZE GetSystemMetrics(SM_CXSMICON) -/* space around icon (forces icon to center of KDE systray area) */ -#define ICON_BORDER 4 - - - -static BOOL SYSTRAY_ItemIsEqual(PNOTIFYICONDATAA pnid1, PNOTIFYICONDATAA pnid2) -{ - if (pnid1->hWnd != pnid2->hWnd) return FALSE; - if (pnid1->uID != pnid2->uID) return FALSE; - return TRUE; -} - -static LRESULT CALLBACK SYSTRAY_WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - HDC hdc; - PAINTSTRUCT ps; - - switch (message) { - case WM_PAINT: - { - RECT rc; - SystrayItem *ptrayItem = systray; - - while (ptrayItem) { - if (ptrayItem->hWnd==hWnd) { - if (ptrayItem->notifyIcon.hIcon) { - hdc = BeginPaint(hWnd, &ps); - GetClientRect(hWnd, &rc); - if (!DrawIconEx(hdc, rc.left+ICON_BORDER, rc.top+ICON_BORDER, ptrayItem->notifyIcon.hIcon, - ICON_SIZE, ICON_SIZE, 0, 0, DI_DEFAULTSIZE|DI_NORMAL)) { - ERR("Paint(SystrayWindow %p) failed -> removing SystrayItem %p\n", hWnd, ptrayItem); - SYSTRAY_Delete(&ptrayItem->notifyIcon); - } - } - break; - } - ptrayItem = ptrayItem->nextTrayItem; - } - EndPaint(hWnd, &ps); - } - break; - - case WM_MOUSEMOVE: - case WM_LBUTTONDOWN: - case WM_LBUTTONUP: - case WM_RBUTTONDOWN: - case WM_RBUTTONUP: - case WM_MBUTTONDOWN: - case WM_MBUTTONUP: - { - MSG msg; - SystrayItem *ptrayItem = systray; - - while ( ptrayItem ) { - if (ptrayItem->hWnd == hWnd) { - msg.hwnd=hWnd; - msg.message=message; - msg.wParam=wParam; - msg.lParam=lParam; - msg.time = GetMessageTime (); - msg.pt.x = LOWORD(GetMessagePos ()); - msg.pt.y = HIWORD(GetMessagePos ()); - - SendMessageA(ptrayItem->hWndToolTip, TTM_RELAYEVENT, 0, (LPARAM)&msg); - } - ptrayItem = ptrayItem->nextTrayItem; - } - } - /* fall through */ - - case WM_LBUTTONDBLCLK: - case WM_RBUTTONDBLCLK: - case WM_MBUTTONDBLCLK: - { - SystrayItem *ptrayItem = systray; - - while (ptrayItem) { - if (ptrayItem->hWnd == hWnd) { - if (ptrayItem->notifyIcon.hWnd && ptrayItem->notifyIcon.uCallbackMessage) { - if (!PostMessageA(ptrayItem->notifyIcon.hWnd, ptrayItem->notifyIcon.uCallbackMessage, - (WPARAM)ptrayItem->notifyIcon.uID, (LPARAM)message)) { - ERR("PostMessage(SystrayWindow %p) failed -> removing SystrayItem %p\n", hWnd, ptrayItem); - SYSTRAY_Delete(&ptrayItem->notifyIcon); - } - } - break; - } - ptrayItem = ptrayItem->nextTrayItem; - } - } - break; - - default: - return (DefWindowProcA(hWnd, message, wParam, lParam)); - } - return (0); - -} - - -BOOL SYSTRAY_RegisterClass(void) -{ - WNDCLASSA wc; - - wc.style = CS_SAVEBITS|CS_DBLCLKS; - wc.lpfnWndProc = SYSTRAY_WndProc; - wc.cbClsExtra = 0; - wc.cbWndExtra = 0; - wc.hInstance = 0; - wc.hIcon = 0; - wc.hCursor = LoadCursorA(0, (LPSTR)IDC_ARROW); - wc.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1); - wc.lpszMenuName = NULL; - wc.lpszClassName = "WineSystray"; - - if (!RegisterClassA(&wc)) { - ERR("RegisterClass(WineSystray) failed\n"); - return FALSE; - } - return TRUE; -} - - -BOOL SYSTRAY_ItemInit(SystrayItem *ptrayItem) -{ - RECT rect; - - /* Register the class if this is our first tray item. */ - if ( firstSystray ) { - firstSystray = FALSE; - if ( !SYSTRAY_RegisterClass() ) { - ERR( "RegisterClass(WineSystray) failed\n" ); - return FALSE; - } - } - - /* Initialize the window size. */ - rect.left = 0; - rect.top = 0; - rect.right = ICON_SIZE+2*ICON_BORDER; - rect.bottom = ICON_SIZE+2*ICON_BORDER; - - ZeroMemory( ptrayItem, sizeof(SystrayItem) ); - /* Create tray window for icon. */ - ptrayItem->hWnd = CreateWindowExA( WS_EX_TRAYWINDOW, - "WineSystray", "Wine-Systray", - WS_VISIBLE, - CW_USEDEFAULT, CW_USEDEFAULT, - rect.right-rect.left, rect.bottom-rect.top, - 0, 0, 0, 0 ); - if ( !ptrayItem->hWnd ) { - ERR( "CreateWindow(WineSystray) failed\n" ); - return FALSE; - } - - /* Create tooltip for icon. */ - ptrayItem->hWndToolTip = CreateWindowA( TOOLTIPS_CLASSA,NULL,TTS_ALWAYSTIP, - CW_USEDEFAULT, CW_USEDEFAULT, - CW_USEDEFAULT, CW_USEDEFAULT, - ptrayItem->hWnd, 0, 0, 0 ); - if ( !ptrayItem->hWndToolTip ) { - ERR( "CreateWindow(TOOLTIP) failed\n" ); - return FALSE; - } - return TRUE; -} - - -static void SYSTRAY_ItemTerm(SystrayItem *ptrayItem) -{ - if(ptrayItem->notifyIcon.hIcon) - DestroyIcon(ptrayItem->notifyIcon.hIcon); - if(ptrayItem->hWndToolTip) - DestroyWindow(ptrayItem->hWndToolTip); - if(ptrayItem->hWnd) - DestroyWindow(ptrayItem->hWnd); - return; -} - - -void SYSTRAY_ItemSetMessage(SystrayItem *ptrayItem, UINT uCallbackMessage) -{ - ptrayItem->notifyIcon.uCallbackMessage = uCallbackMessage; -} - - -void SYSTRAY_ItemSetIcon(SystrayItem *ptrayItem, HICON hIcon) -{ - if(ptrayItem->notifyIcon.hIcon) - DestroyIcon(ptrayItem->notifyIcon.hIcon); - ptrayItem->notifyIcon.hIcon = CopyIcon(hIcon); - InvalidateRect(ptrayItem->hWnd, NULL, TRUE); -} - - -void SYSTRAY_ItemSetTip(SystrayItem *ptrayItem, CHAR* szTip, int modify) -{ - TTTOOLINFOA ti; - - strncpy(ptrayItem->notifyIcon.szTip, szTip, sizeof(ptrayItem->notifyIcon.szTip)); - ptrayItem->notifyIcon.szTip[sizeof(ptrayItem->notifyIcon.szTip)-1]=0; - - ti.cbSize = sizeof(TTTOOLINFOA); - ti.uFlags = 0; - ti.hwnd = ptrayItem->hWnd; - ti.hinst = 0; - ti.uId = 0; - ti.lpszText = ptrayItem->notifyIcon.szTip; - ti.rect.left = 0; - ti.rect.top = 0; - ti.rect.right = ICON_SIZE+2*ICON_BORDER; - ti.rect.bottom = ICON_SIZE+2*ICON_BORDER; - - if(modify) - SendMessageA(ptrayItem->hWndToolTip, TTM_UPDATETIPTEXTA, 0, (LPARAM)&ti); - else - SendMessageA(ptrayItem->hWndToolTip, TTM_ADDTOOLA, 0, (LPARAM)&ti); -} - - -static BOOL SYSTRAY_Add(PNOTIFYICONDATAA pnid) -{ - SystrayItem **ptrayItem = &systray; - - /* Find last element. */ - while( *ptrayItem ) { - if ( SYSTRAY_ItemIsEqual(pnid, &(*ptrayItem)->notifyIcon) ) - return FALSE; - ptrayItem = &((*ptrayItem)->nextTrayItem); - } - /* Allocate SystrayItem for element and add to end of list. */ - (*ptrayItem) = HeapAlloc(GetProcessHeap(),0,sizeof(SystrayItem)); - - /* Initialize and set data for the tray element. */ - SYSTRAY_ItemInit( (*ptrayItem) ); - (*ptrayItem)->notifyIcon.uID = pnid->uID; /* only needed for callback message */ - (*ptrayItem)->notifyIcon.hWnd = pnid->hWnd; /* only needed for callback message */ - SYSTRAY_ItemSetIcon (*ptrayItem, (pnid->uFlags&NIF_ICON) ?pnid->hIcon :0); - SYSTRAY_ItemSetMessage(*ptrayItem, (pnid->uFlags&NIF_MESSAGE)?pnid->uCallbackMessage:0); - SYSTRAY_ItemSetTip (*ptrayItem, (pnid->uFlags&NIF_TIP) ?pnid->szTip :"", FALSE); - - TRACE("%p: %p %s\n", (*ptrayItem), (*ptrayItem)->notifyIcon.hWnd, - (*ptrayItem)->notifyIcon.szTip); - return TRUE; -} - - -static BOOL SYSTRAY_Modify(PNOTIFYICONDATAA pnid) -{ - SystrayItem *ptrayItem = systray; - - while ( ptrayItem ) { - if ( SYSTRAY_ItemIsEqual(pnid, &ptrayItem->notifyIcon) ) { - if (pnid->uFlags & NIF_ICON) - SYSTRAY_ItemSetIcon(ptrayItem, pnid->hIcon); - if (pnid->uFlags & NIF_MESSAGE) - SYSTRAY_ItemSetMessage(ptrayItem, pnid->uCallbackMessage); - if (pnid->uFlags & NIF_TIP) - SYSTRAY_ItemSetTip(ptrayItem, pnid->szTip, TRUE); - - TRACE("%p: %p %s\n", ptrayItem, ptrayItem->notifyIcon.hWnd, ptrayItem->notifyIcon.szTip); - return TRUE; - } - ptrayItem = ptrayItem->nextTrayItem; - } - return FALSE; /* not found */ -} - - -static BOOL SYSTRAY_Delete(PNOTIFYICONDATAA pnid) -{ - SystrayItem **ptrayItem = &systray; - - while (*ptrayItem) { - if (SYSTRAY_ItemIsEqual(pnid, &(*ptrayItem)->notifyIcon)) { - SystrayItem *next = (*ptrayItem)->nextTrayItem; - TRACE("%p: %p %s\n", *ptrayItem, (*ptrayItem)->notifyIcon.hWnd, (*ptrayItem)->notifyIcon.szTip); - SYSTRAY_ItemTerm(*ptrayItem); - - HeapFree(GetProcessHeap(),0,*ptrayItem); - *ptrayItem = next; - - return TRUE; - } - ptrayItem = &((*ptrayItem)->nextTrayItem); - } - - return FALSE; /* not found */ -} - -/************************************************************************* - * - */ -BOOL SYSTRAY_Init(void) -{ - return TRUE; -} - -/************************************************************************* - * Shell_NotifyIcon [SHELL32.296] - * Shell_NotifyIconA [SHELL32.297] - */ -BOOL WINAPI Shell_NotifyIconA(DWORD dwMessage, PNOTIFYICONDATAA pnid ) -{ - BOOL flag=FALSE; - TRACE("enter %p %d %ld\n", pnid->hWnd, pnid->uID, dwMessage); - switch(dwMessage) { - case NIM_ADD: - flag = SYSTRAY_Add(pnid); - break; - case NIM_MODIFY: - flag = SYSTRAY_Modify(pnid); - break; - case NIM_DELETE: - flag = SYSTRAY_Delete(pnid); - break; - } - TRACE("leave %p %d %ld=%d\n", pnid->hWnd, pnid->uID, dwMessage, flag); - return flag; -} - -/************************************************************************* - * Shell_NotifyIconW [SHELL32.298] - */ -BOOL WINAPI Shell_NotifyIconW (DWORD dwMessage, PNOTIFYICONDATAW pnid ) -{ - BOOL ret; - - PNOTIFYICONDATAA p = HeapAlloc(GetProcessHeap(),0,sizeof(NOTIFYICONDATAA)); - memcpy(p, pnid, sizeof(NOTIFYICONDATAA)); - WideCharToMultiByte( CP_ACP, 0, pnid->szTip, -1, p->szTip, sizeof(p->szTip), NULL, NULL ); - p->szTip[sizeof(p->szTip)-1] = 0; - - ret = Shell_NotifyIconA(dwMessage, p ); - - HeapFree(GetProcessHeap(),0,p); - return ret; -} +/* + * Systray + * + * Copyright 1999 Kai Morich + * + * Manage the systray window. That it actually appears in the docking + * area of KDE is handled in dlls/x11drv/window.c, + * X11DRV_set_wm_hints using KWM_DOCKWINDOW. + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" + +#ifdef HAVE_UNISTD_H +# include +#endif +#include +#include + +#include "windef.h" +#include "winbase.h" +#include "winnls.h" +#include "wingdi.h" +#include "winuser.h" +#include "shlobj.h" +#include "shellapi.h" +#include "shell32_main.h" +#include "commctrl.h" +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(shell); + +typedef struct SystrayItem { + HWND hWnd; + HWND hWndToolTip; + NOTIFYICONDATAA notifyIcon; + struct SystrayItem *nextTrayItem; +} SystrayItem; + +static SystrayItem *systray=NULL; +static int firstSystray=TRUE; /* defer creation of window class until first systray item is created */ + +static BOOL SYSTRAY_Delete(PNOTIFYICONDATAA pnid); + + +#define ICON_SIZE GetSystemMetrics(SM_CXSMICON) +/* space around icon (forces icon to center of KDE systray area) */ +#define ICON_BORDER 4 + + + +static BOOL SYSTRAY_ItemIsEqual(PNOTIFYICONDATAA pnid1, PNOTIFYICONDATAA pnid2) +{ + if (pnid1->hWnd != pnid2->hWnd) return FALSE; + if (pnid1->uID != pnid2->uID) return FALSE; + return TRUE; +} + +static LRESULT CALLBACK SYSTRAY_WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) +{ + HDC hdc; + PAINTSTRUCT ps; + + switch (message) { + case WM_PAINT: + { + RECT rc; + SystrayItem *ptrayItem = systray; + + while (ptrayItem) { + if (ptrayItem->hWnd==hWnd) { + if (ptrayItem->notifyIcon.hIcon) { + hdc = BeginPaint(hWnd, &ps); + GetClientRect(hWnd, &rc); + if (!DrawIconEx(hdc, rc.left+ICON_BORDER, rc.top+ICON_BORDER, ptrayItem->notifyIcon.hIcon, + ICON_SIZE, ICON_SIZE, 0, 0, DI_DEFAULTSIZE|DI_NORMAL)) { + ERR("Paint(SystrayWindow %p) failed -> removing SystrayItem %p\n", hWnd, ptrayItem); + SYSTRAY_Delete(&ptrayItem->notifyIcon); + } + } + break; + } + ptrayItem = ptrayItem->nextTrayItem; + } + EndPaint(hWnd, &ps); + } + break; + + case WM_MOUSEMOVE: + case WM_LBUTTONDOWN: + case WM_LBUTTONUP: + case WM_RBUTTONDOWN: + case WM_RBUTTONUP: + case WM_MBUTTONDOWN: + case WM_MBUTTONUP: + { + MSG msg; + SystrayItem *ptrayItem = systray; + + while ( ptrayItem ) { + if (ptrayItem->hWnd == hWnd) { + msg.hwnd=hWnd; + msg.message=message; + msg.wParam=wParam; + msg.lParam=lParam; + msg.time = GetMessageTime (); + msg.pt.x = LOWORD(GetMessagePos ()); + msg.pt.y = HIWORD(GetMessagePos ()); + + SendMessageA(ptrayItem->hWndToolTip, TTM_RELAYEVENT, 0, (LPARAM)&msg); + } + ptrayItem = ptrayItem->nextTrayItem; + } + } + /* fall through */ + + case WM_LBUTTONDBLCLK: + case WM_RBUTTONDBLCLK: + case WM_MBUTTONDBLCLK: + { + SystrayItem *ptrayItem = systray; + + while (ptrayItem) { + if (ptrayItem->hWnd == hWnd) { + if (ptrayItem->notifyIcon.hWnd && ptrayItem->notifyIcon.uCallbackMessage) { + if (!PostMessageA(ptrayItem->notifyIcon.hWnd, ptrayItem->notifyIcon.uCallbackMessage, + (WPARAM)ptrayItem->notifyIcon.uID, (LPARAM)message)) { + ERR("PostMessage(SystrayWindow %p) failed -> removing SystrayItem %p\n", hWnd, ptrayItem); + SYSTRAY_Delete(&ptrayItem->notifyIcon); + } + } + break; + } + ptrayItem = ptrayItem->nextTrayItem; + } + } + break; + + default: + return (DefWindowProcA(hWnd, message, wParam, lParam)); + } + return (0); + +} + + +BOOL SYSTRAY_RegisterClass(void) +{ + WNDCLASSA wc; + + wc.style = CS_SAVEBITS|CS_DBLCLKS; + wc.lpfnWndProc = SYSTRAY_WndProc; + wc.cbClsExtra = 0; + wc.cbWndExtra = 0; + wc.hInstance = 0; + wc.hIcon = 0; + wc.hCursor = LoadCursorA(0, (LPSTR)IDC_ARROW); + wc.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1); + wc.lpszMenuName = NULL; + wc.lpszClassName = "WineSystray"; + + if (!RegisterClassA(&wc)) { + ERR("RegisterClass(WineSystray) failed\n"); + return FALSE; + } + return TRUE; +} + + +BOOL SYSTRAY_ItemInit(SystrayItem *ptrayItem) +{ + RECT rect; + + /* Register the class if this is our first tray item. */ + if ( firstSystray ) { + firstSystray = FALSE; + if ( !SYSTRAY_RegisterClass() ) { + ERR( "RegisterClass(WineSystray) failed\n" ); + return FALSE; + } + } + + /* Initialize the window size. */ + rect.left = 0; + rect.top = 0; + rect.right = ICON_SIZE+2*ICON_BORDER; + rect.bottom = ICON_SIZE+2*ICON_BORDER; + + ZeroMemory( ptrayItem, sizeof(SystrayItem) ); + /* Create tray window for icon. */ + ptrayItem->hWnd = CreateWindowExA( WS_EX_TRAYWINDOW, + "WineSystray", "Wine-Systray", + WS_VISIBLE, + CW_USEDEFAULT, CW_USEDEFAULT, + rect.right-rect.left, rect.bottom-rect.top, + 0, 0, 0, 0 ); + if ( !ptrayItem->hWnd ) { + ERR( "CreateWindow(WineSystray) failed\n" ); + return FALSE; + } + + /* Create tooltip for icon. */ + ptrayItem->hWndToolTip = CreateWindowA( TOOLTIPS_CLASSA,NULL,TTS_ALWAYSTIP, + CW_USEDEFAULT, CW_USEDEFAULT, + CW_USEDEFAULT, CW_USEDEFAULT, + ptrayItem->hWnd, 0, 0, 0 ); + if ( !ptrayItem->hWndToolTip ) { + ERR( "CreateWindow(TOOLTIP) failed\n" ); + return FALSE; + } + return TRUE; +} + + +static void SYSTRAY_ItemTerm(SystrayItem *ptrayItem) +{ + if(ptrayItem->notifyIcon.hIcon) + DestroyIcon(ptrayItem->notifyIcon.hIcon); + if(ptrayItem->hWndToolTip) + DestroyWindow(ptrayItem->hWndToolTip); + if(ptrayItem->hWnd) + DestroyWindow(ptrayItem->hWnd); + return; +} + + +void SYSTRAY_ItemSetMessage(SystrayItem *ptrayItem, UINT uCallbackMessage) +{ + ptrayItem->notifyIcon.uCallbackMessage = uCallbackMessage; +} + + +void SYSTRAY_ItemSetIcon(SystrayItem *ptrayItem, HICON hIcon) +{ + if(ptrayItem->notifyIcon.hIcon) + DestroyIcon(ptrayItem->notifyIcon.hIcon); + ptrayItem->notifyIcon.hIcon = CopyIcon(hIcon); + InvalidateRect(ptrayItem->hWnd, NULL, TRUE); +} + + +void SYSTRAY_ItemSetTip(SystrayItem *ptrayItem, CHAR* szTip, int modify) +{ + TTTOOLINFOA ti; + + strncpy(ptrayItem->notifyIcon.szTip, szTip, sizeof(ptrayItem->notifyIcon.szTip)); + ptrayItem->notifyIcon.szTip[sizeof(ptrayItem->notifyIcon.szTip)-1]=0; + + ti.cbSize = sizeof(TTTOOLINFOA); + ti.uFlags = 0; + ti.hwnd = ptrayItem->hWnd; + ti.hinst = 0; + ti.uId = 0; + ti.lpszText = ptrayItem->notifyIcon.szTip; + ti.rect.left = 0; + ti.rect.top = 0; + ti.rect.right = ICON_SIZE+2*ICON_BORDER; + ti.rect.bottom = ICON_SIZE+2*ICON_BORDER; + + if(modify) + SendMessageA(ptrayItem->hWndToolTip, TTM_UPDATETIPTEXTA, 0, (LPARAM)&ti); + else + SendMessageA(ptrayItem->hWndToolTip, TTM_ADDTOOLA, 0, (LPARAM)&ti); +} + + +static BOOL SYSTRAY_Add(PNOTIFYICONDATAA pnid) +{ + SystrayItem **ptrayItem = &systray; + + /* Find last element. */ + while( *ptrayItem ) { + if ( SYSTRAY_ItemIsEqual(pnid, &(*ptrayItem)->notifyIcon) ) + return FALSE; + ptrayItem = &((*ptrayItem)->nextTrayItem); + } + /* Allocate SystrayItem for element and add to end of list. */ + (*ptrayItem) = HeapAlloc(GetProcessHeap(),0,sizeof(SystrayItem)); + + /* Initialize and set data for the tray element. */ + SYSTRAY_ItemInit( (*ptrayItem) ); + (*ptrayItem)->notifyIcon.uID = pnid->uID; /* only needed for callback message */ + (*ptrayItem)->notifyIcon.hWnd = pnid->hWnd; /* only needed for callback message */ + SYSTRAY_ItemSetIcon (*ptrayItem, (pnid->uFlags&NIF_ICON) ?pnid->hIcon :0); + SYSTRAY_ItemSetMessage(*ptrayItem, (pnid->uFlags&NIF_MESSAGE)?pnid->uCallbackMessage:0); + SYSTRAY_ItemSetTip (*ptrayItem, (pnid->uFlags&NIF_TIP) ?pnid->szTip :"", FALSE); + + TRACE("%p: %p %s\n", (*ptrayItem), (*ptrayItem)->notifyIcon.hWnd, + (*ptrayItem)->notifyIcon.szTip); + return TRUE; +} + + +static BOOL SYSTRAY_Modify(PNOTIFYICONDATAA pnid) +{ + SystrayItem *ptrayItem = systray; + + while ( ptrayItem ) { + if ( SYSTRAY_ItemIsEqual(pnid, &ptrayItem->notifyIcon) ) { + if (pnid->uFlags & NIF_ICON) + SYSTRAY_ItemSetIcon(ptrayItem, pnid->hIcon); + if (pnid->uFlags & NIF_MESSAGE) + SYSTRAY_ItemSetMessage(ptrayItem, pnid->uCallbackMessage); + if (pnid->uFlags & NIF_TIP) + SYSTRAY_ItemSetTip(ptrayItem, pnid->szTip, TRUE); + + TRACE("%p: %p %s\n", ptrayItem, ptrayItem->notifyIcon.hWnd, ptrayItem->notifyIcon.szTip); + return TRUE; + } + ptrayItem = ptrayItem->nextTrayItem; + } + return FALSE; /* not found */ +} + + +static BOOL SYSTRAY_Delete(PNOTIFYICONDATAA pnid) +{ + SystrayItem **ptrayItem = &systray; + + while (*ptrayItem) { + if (SYSTRAY_ItemIsEqual(pnid, &(*ptrayItem)->notifyIcon)) { + SystrayItem *next = (*ptrayItem)->nextTrayItem; + TRACE("%p: %p %s\n", *ptrayItem, (*ptrayItem)->notifyIcon.hWnd, (*ptrayItem)->notifyIcon.szTip); + SYSTRAY_ItemTerm(*ptrayItem); + + HeapFree(GetProcessHeap(),0,*ptrayItem); + *ptrayItem = next; + + return TRUE; + } + ptrayItem = &((*ptrayItem)->nextTrayItem); + } + + return FALSE; /* not found */ +} + +/************************************************************************* + * + */ +BOOL SYSTRAY_Init(void) +{ + return TRUE; +} + +/************************************************************************* + * Shell_NotifyIcon [SHELL32.296] + * Shell_NotifyIconA [SHELL32.297] + */ +BOOL WINAPI Shell_NotifyIconA(DWORD dwMessage, PNOTIFYICONDATAA pnid ) +{ + BOOL flag=FALSE; + TRACE("enter %p %d %ld\n", pnid->hWnd, pnid->uID, dwMessage); + switch(dwMessage) { + case NIM_ADD: + flag = SYSTRAY_Add(pnid); + break; + case NIM_MODIFY: + flag = SYSTRAY_Modify(pnid); + break; + case NIM_DELETE: + flag = SYSTRAY_Delete(pnid); + break; + } + TRACE("leave %p %d %ld=%d\n", pnid->hWnd, pnid->uID, dwMessage, flag); + return flag; +} + +/************************************************************************* + * Shell_NotifyIconW [SHELL32.298] + */ +BOOL WINAPI Shell_NotifyIconW (DWORD dwMessage, PNOTIFYICONDATAW pnid ) +{ + BOOL ret; + + PNOTIFYICONDATAA p = HeapAlloc(GetProcessHeap(),0,sizeof(NOTIFYICONDATAA)); + memcpy(p, pnid, sizeof(NOTIFYICONDATAA)); + WideCharToMultiByte( CP_ACP, 0, pnid->szTip, -1, p->szTip, sizeof(p->szTip), NULL, NULL ); + p->szTip[sizeof(p->szTip)-1] = 0; + + ret = Shell_NotifyIconA(dwMessage, p ); + + HeapFree(GetProcessHeap(),0,p); + return ret; +} diff --git a/reactos/lib/shell32/undocshell.h b/reactos/lib/shell32/undocshell.h index e111a31361e..2ae56a8b3d8 100644 --- a/reactos/lib/shell32/undocshell.h +++ b/reactos/lib/shell32/undocshell.h @@ -1,585 +1,585 @@ -/* - * Copyright 1999, 2000 Juergen Schmied - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#ifndef __WINE_UNDOCSHELL_H -#define __WINE_UNDOCSHELL_H - -#include - -#include "windef.h" -#include "winbase.h" -#include "winuser.h" -#include "commctrl.h" -#include "shlobj.h" - -#ifdef __cplusplus -extern "C" { -#endif /* defined(__cplusplus) */ - -/**************************************************************************** - * IDList Functions - */ -BOOL WINAPI ILGetDisplayName( - LPCITEMIDLIST pidl, - LPVOID path); - -/* type parameter for ILGetDisplayNameEx() */ -#define ILGDN_FORPARSING 0 -#define ILGDN_NORMAL 1 -#define ILGDN_INFOLDER 2 - -BOOL WINAPI ILGetDisplayNameEx( - LPSHELLFOLDER psf, - LPCITEMIDLIST pidl, - LPVOID path, - DWORD type); - -LPITEMIDLIST WINAPI ILGlobalClone(LPCITEMIDLIST pidl); -void WINAPI ILGlobalFree(LPITEMIDLIST pidl); - -LPITEMIDLIST WINAPI SHSimpleIDListFromPathA (LPCSTR lpszPath); -LPITEMIDLIST WINAPI SHSimpleIDListFromPathW (LPCWSTR lpszPath); - -HRESULT WINAPI SHILCreateFromPathA ( - LPCSTR path, - LPITEMIDLIST * ppidl, - DWORD *attributes); - -HRESULT WINAPI SHILCreateFromPathW ( - LPCWSTR path, - LPITEMIDLIST * ppidl, - DWORD *attributes); - -LPITEMIDLIST WINAPI ILCreateFromPathA(LPCSTR path); -LPITEMIDLIST WINAPI ILCreateFromPathW(LPCWSTR path); - -/* - string functions -*/ -BOOL WINAPI StrRetToStrNA(LPSTR,DWORD,LPSTRRET,const ITEMIDLIST*); -BOOL WINAPI StrRetToStrNW(LPWSTR,DWORD,LPSTRRET,const ITEMIDLIST*); - - -/**************************************************************************** -* SHChangeNotifyRegister API -*/ -#define SHCNRF_InterruptLevel 0x0001 -#define SHCNRF_ShellLevel 0x0002 -#define SHCNRF_RecursiveInterrupt 0x1000 /* Must be combined with SHCNRF_InterruptLevel */ -#define SHCNRF_NewDelivery 0x8000 /* Messages use shared memory */ - -/**************************************************************************** - * Shell Common Dialogs - */ - -BOOL WINAPI PickIconDlg( - HWND hwndOwner, - LPSTR lpstrFile, - DWORD nMaxFile, - LPDWORD lpdwIconIndex); - -/* RunFileDlg flags */ -#define RFF_NOBROWSE 0x01 -#define RFF_NODEFAULT 0x02 -#define RFF_CALCDIRECTORY 0x04 -#define RFF_NOLABEL 0x08 -#define RFF_NOSEPARATEMEM 0x20 /* NT only */ - -/* RunFileFlg notification structure */ -typedef struct -{ - NMHDR hdr; - LPCSTR lpFile; - LPCSTR lpDirectory; - int nShow; -} NM_RUNFILEDLG, * LPNM_RUNFILEDLG; - -/* RunFileDlg notification return values */ -#define RF_OK 0x00 -#define RF_CANCEL 0x01 -#define RF_RETRY 0x02 - -void WINAPI RunFileDlg( - HWND hwndOwner, - HICON hIcon, - LPCSTR lpstrDirectory, - LPCSTR lpstrTitle, - LPCSTR lpstrDescription, - UINT uFlags); - -void WINAPI ExitWindowsDialog(HWND hwndOwner); - -BOOL WINAPI GetFileNameFromBrowse( - HWND hwndOwner, - LPSTR lpstrFile, - DWORD nMaxFile, - LPCSTR lpstrInitialDir, - LPCSTR lpstrDefExt, - LPCSTR lpstrFilter, - LPCSTR lpstrTitle); - -BOOL WINAPI SHFindComputer( - LPCITEMIDLIST pidlRoot, - LPCITEMIDLIST pidlSavedSearch); - -void WINAPI SHHandleDiskFull(HWND hwndOwner, - UINT uDrive); - -int WINAPI SHOutOfMemoryMessageBox( - HWND hwndOwner, - LPCSTR lpCaption, - UINT uType); - -DWORD WINAPI SHNetConnectionDialog( - HWND hwndOwner, - LPCSTR lpstrRemoteName, - DWORD dwType); - -/**************************************************************************** - * Memory Routines - */ - -/* The Platform SDK's shlobj.h header defines similar functions with a - * leading underscore. However those are unusable because of the leading - * underscore, because they have an incorrect calling convention, and - * because these functions are not exported by name anyway. - */ -HANDLE WINAPI SHAllocShared( - LPVOID pv, - ULONG cb, - DWORD pid); - -BOOL WINAPI SHFreeShared( - HANDLE hMem, - DWORD pid); - -LPVOID WINAPI SHLockShared( - HANDLE hMem, - DWORD pid); - -BOOL WINAPI SHUnlockShared(LPVOID pv); - -/**************************************************************************** - * Cabinet Window Messages - */ - -#define CWM_SETPATH (WM_USER + 2) -#define CWM_WANTIDLE (WM_USER + 3) -#define CWM_GETSETCURRENTINFO (WM_USER + 4) -#define CWM_SELECTITEM (WM_USER + 5) -#define CWM_SELECTITEMSTR (WM_USER + 6) -#define CWM_GETISHELLBROWSER (WM_USER + 7) -#define CWM_TESTPATH (WM_USER + 9) -#define CWM_STATECHANGE (WM_USER + 10) -#define CWM_GETPATH (WM_USER + 12) - -/* CWM_TESTPATH types */ -#define CWTP_ISEQUAL 0 -#define CWTP_ISCHILD 1 - -/* CWM_TESTPATH structure */ -typedef struct -{ - DWORD dwType; - ITEMIDLIST idl; -} CWTESTPATHSTRUCT,* LPCWTESTPATHSTRUCT; - -/**************************************************************************** - * System Imagelist Routines - */ - -int WINAPI Shell_GetCachedImageIndex( - LPCSTR lpszFileName, - UINT nIconIndex, - BOOL bSimulateDoc); - -BOOL WINAPI Shell_GetImageLists( - HIMAGELIST *lphimlLarge, - HIMAGELIST *lphimlSmall); - -HICON WINAPI SHGetFileIcon( - DWORD dwReserved, - LPCSTR lpszPath, - DWORD dwFileAttributes, - UINT uFlags); - -BOOL WINAPI FileIconInit(BOOL bFullInit); - -/**************************************************************************** - * File Menu Routines - */ -/* FileMenu_Create nSelHeight constants */ -#define FM_DEFAULT_SELHEIGHT -1 -#define FM_FULL_SELHEIGHT 0 - -/* FileMenu_Create flags */ -#define FMF_SMALL_ICONS 0x00 -#define FMF_LARGE_ICONS 0x08 -#define FMF_NO_COLUMN_BREAK 0x10 - -HMENU WINAPI FileMenu_Create( - COLORREF crBorderColor, - int nBorderWidth, - HBITMAP hBorderBmp, - int nSelHeight, - UINT uFlags); - -void WINAPI FileMenu_Destroy(HMENU hMenu); - -/* FileMenu_AppendItem constants */ -#define FM_SEPARATOR (LPCSTR)1 -#define FM_BLANK_ICON -1 -#define FM_DEFAULT_HEIGHT 0 - -BOOL WINAPI FileMenu_AppendItem( - HMENU hMenu, - LPCSTR lpszText, - UINT uID, - int iIcon, - HMENU hMenuPopup, - int nItemHeight); - -/* FileMenu_InsertUsingPidl flags */ -#define FMF_NO_EMPTY_ITEM 0x01 -#define FMF_NO_PROGRAM_GROUPS 0x04 - -/* FileMenu_InsertUsingPidl callback function */ -typedef void (CALLBACK *LPFNFMCALLBACK)(LPCITEMIDLIST pidlFolder, LPCITEMIDLIST pidlFile); - -int WINAPI FileMenu_InsertUsingPidl( - HMENU hMenu, - UINT uID, - LPCITEMIDLIST pidl, - UINT uFlags, - UINT uEnumFlags, - LPFNFMCALLBACK lpfnCallback); - -int WINAPI FileMenu_ReplaceUsingPidl( - HMENU hMenu, - UINT uID, - LPCITEMIDLIST pidl, - UINT uEnumFlags, - LPFNFMCALLBACK lpfnCallback); - -void WINAPI FileMenu_Invalidate(HMENU hMenu); - -HMENU WINAPI FileMenu_FindSubMenuByPidl( - HMENU hMenu, - LPCITEMIDLIST pidl); - -BOOL WINAPI FileMenu_TrackPopupMenuEx( - HMENU hMenu, - UINT uFlags, - int x, - int y, - HWND hWnd, - LPTPMPARAMS lptpm); - -BOOL WINAPI FileMenu_GetLastSelectedItemPidls( - UINT uReserved, - LPCITEMIDLIST *ppidlFolder, - LPCITEMIDLIST *ppidlItem); - -LRESULT WINAPI FileMenu_MeasureItem( - HWND hWnd, - LPMEASUREITEMSTRUCT lpmis); - -LRESULT WINAPI FileMenu_DrawItem( - HWND hWnd, - LPDRAWITEMSTRUCT lpdis); - -BOOL WINAPI FileMenu_InitMenuPopup(HMENU hMenu); - -void WINAPI FileMenu_AbortInitMenu(void); - -LRESULT WINAPI FileMenu_HandleMenuChar( - HMENU hMenu, - WPARAM wParam); - -BOOL WINAPI FileMenu_DeleteAllItems(HMENU hMenu); - -BOOL WINAPI FileMenu_DeleteItemByCmd( - HMENU hMenu, - UINT uID); - -BOOL WINAPI FileMenu_DeleteItemByIndex( - HMENU hMenu, - UINT uPos); - -BOOL WINAPI FileMenu_DeleteMenuItemByFirstID( - HMENU hMenu, - UINT uID); - -BOOL WINAPI FileMenu_DeleteSeparator(HMENU hMenu); - -BOOL WINAPI FileMenu_EnableItemByCmd( - HMENU hMenu, - UINT uID, - BOOL bEnable); - -DWORD WINAPI FileMenu_GetItemExtent( - HMENU hMenu, - UINT uPos); - -int WINAPI FileMenu_AppendFilesForPidl( - HMENU hMenu, - LPCITEMIDLIST pidl, - BOOL bAddSeparator); - -int WINAPI FileMenu_AddFilesForPidl( - HMENU hMenu, - UINT uReserved, - UINT uID, - LPCITEMIDLIST pidl, - UINT uFlags, - UINT uEnumFlags, - LPFNFMCALLBACK lpfnCallback); - -/**************************************************************************** - * Drag And Drop Routines - */ - -HRESULT WINAPI SHRegisterDragDrop( - HWND hWnd, - LPDROPTARGET lpDropTarget); - -HRESULT WINAPI SHRevokeDragDrop(HWND hWnd); - -BOOL WINAPI DAD_DragEnter(HWND hWnd); - -BOOL WINAPI DAD_SetDragImageFromListView( - HWND hWnd, - POINT pt); - -BOOL WINAPI DAD_ShowDragImage(BOOL bShow); - -HRESULT WINAPI CIDLData_CreateFromIDArray( - LPCITEMIDLIST pidlFolder, - DWORD cpidlFiles, - LPCITEMIDLIST *lppidlFiles, - LPDATAOBJECT *ppdataObject); - -/**************************************************************************** - * Path Manipulation Routines - */ - -BOOL WINAPI PathAppendAW(LPVOID lpszPath1, LPCVOID lpszPath2); - -LPVOID WINAPI PathCombineAW(LPVOID szDest, LPCVOID lpszDir, LPCVOID lpszFile); - -LPVOID WINAPI PathAddBackslashAW(LPVOID path); - -LPVOID WINAPI PathBuildRootAW(LPVOID lpszPath, int drive); - -LPVOID WINAPI PathFindExtensionAW(LPCVOID path); - -LPVOID WINAPI PathFindFileNameAW(LPCVOID path); - -LPVOID WINAPI PathGetExtensionAW(LPCVOID lpszPath, DWORD void1, DWORD void2); - -LPVOID WINAPI PathGetArgsAW(LPVOID lpszPath); - -BOOL WINAPI PathRemoveFileSpecAW(LPVOID lpszPath); - -void WINAPI PathRemoveBlanksAW(LPVOID lpszPath); - -VOID WINAPI PathQuoteSpacesAW(LPVOID path); - -void WINAPI PathUnquoteSpacesAW(LPVOID lpszPath); - -BOOL WINAPI PathIsUNCAW(LPCVOID lpszPath); - -BOOL WINAPI PathIsRelativeAW(LPCVOID lpszPath); - -BOOL WINAPI PathIsRootAW(LPCVOID x); - -BOOL WINAPI PathIsExeAW(LPCVOID lpszPath); - -BOOL WINAPI PathIsDirectoryAW(LPCVOID lpszPath); - -BOOL WINAPI PathFileExistsAW(LPCVOID lpszPath); - -BOOL WINAPI PathMatchSpecAW(LPVOID lpszPath, LPVOID lpszSpec); - -BOOL WINAPI PathMakeUniqueNameAW( - LPVOID lpszBuffer, - DWORD dwBuffSize, - LPCVOID lpszShortName, - LPCVOID lpszLongName, - LPCVOID lpszPathName); - -BOOL WINAPI PathYetAnotherMakeUniqueName( - LPWSTR lpszBuffer, - LPCWSTR lpszPathName, - LPCWSTR lpszShortName, - LPCWSTR lpszLongName); - -BOOL WINAPI PathQualifyA(LPCSTR path); -BOOL WINAPI PathQualifyW(LPCWSTR path); -#define PathQualify WINELIB_NAME_AW(PathQualify) -BOOL WINAPI PathQualifyAW(LPCVOID path); - - -/* PathResolve flags */ -#define PRF_CHECKEXISTANCE 0x01 -#define PRF_EXECUTABLE 0x02 -#define PRF_QUALIFYONPATH 0x04 -#define PRF_WINDOWS31 0x08 - -BOOL WINAPI PathResolveAW(LPVOID lpszPath, LPCVOID *alpszPaths, DWORD dwFlags); - -VOID WINAPI PathSetDlgItemPathAW(HWND hDlg, int nIDDlgItem, LPCVOID lpszPath); - -/* PathProcessCommand flags */ -#define PPCF_QUOTEPATH 0x01 /* implies PPCF_INCLUDEARGS */ -#define PPCF_INCLUDEARGS 0x02 -#define PPCF_NODIRECTORIES 0x10 -#define PPCF_DONTRESOLVE 0x20 -#define PPCF_PATHISRELATIVE 0x40 - -HRESULT WINAPI PathProcessCommandAW(LPCVOID lpszPath, LPVOID lpszBuff, - DWORD dwBuffSize, DWORD dwFlags); - -void WINAPI PathStripPathAW(LPVOID lpszPath); - -BOOL WINAPI PathStripToRootAW(LPVOID lpszPath); - -void WINAPI PathRemoveArgsAW(LPVOID lpszPath); - -void WINAPI PathRemoveExtensionAW(LPVOID lpszPath); - -int WINAPI PathParseIconLocationAW(LPVOID lpszPath); - -BOOL WINAPI PathIsSameRootAW(LPCVOID lpszPath1, LPCVOID lpszPath2); - -BOOL WINAPI PathFindOnPathAW(LPVOID sFile, LPCVOID sOtherDirs); - -/**************************************************************************** - * Shell Namespace Routines - */ - -/* Generic structure used by several messages */ -typedef struct -{ - DWORD dwReserved; - DWORD dwReserved2; - LPCITEMIDLIST pidl; - LPDWORD lpdwUser; -} SFVCBINFO, * LPSFVCBINFO; -typedef const SFVCBINFO * LPCSFVCBINFO; - -/* SFVCB_SELECTIONCHANGED structure */ -typedef struct -{ - UINT uOldState; - UINT uNewState; - LPCITEMIDLIST pidl; - LPDWORD lpdwUser; -} SFVSELECTSTATE, * LPSFVSELECTSTATE; -typedef const SFVSELECTSTATE * LPCSFVSELECTSTATE; - -/* SFVCB_COPYHOOKCALLBACK structure */ -typedef struct -{ - HWND hwnd; - UINT wFunc; - UINT wFlags; - LPCSTR pszSrcFile; - DWORD dwSrcAttribs; - LPCSTR pszDestFile; - DWORD dwDestAttribs; -} SFVCOPYHOOKINFO, * LPSFVCOPYHOOKINFO; -typedef const SFVCOPYHOOKINFO * LPCSFVCOPYHOOKINFO; - -/* SFVCB_GETDETAILSOF structure */ -typedef struct -{ - LPCITEMIDLIST pidl; - int fmt; - int cx; - STRRET lpText; -} SFVCOLUMNINFO, * LPSFVCOLUMNINFO; - -/**************************************************************************** - * Misc Stuff - */ - -/* SHWaitForFileToOpen flags */ -#define SHWFF_ADD 0x01 -#define SHWFF_REMOVE 0x02 -#define SHWFF_WAIT 0x04 - -BOOL WINAPI SHWaitForFileToOpen( - LPCITEMIDLIST pidl, - DWORD dwFlags, - DWORD dwTimeout); - -WORD WINAPI ArrangeWindows( - HWND hwndParent, - DWORD dwReserved, - LPCRECT lpRect, - WORD cKids, - CONST HWND * lpKids); - -/* RegisterShellHook types */ -#define RSH_DEREGISTER 0 -#define RSH_REGISTER 1 -#define RSH_REGISTER_PROGMAN 2 -#define RSH_REGISTER_TASKMAN 3 - -BOOL WINAPI RegisterShellHook( - HWND hWnd, - DWORD dwType); - -/* SHCreateDefClassObject callback function */ -typedef HRESULT (CALLBACK *LPFNCDCOCALLBACK)( - LPUNKNOWN pUnkOuter, - REFIID riidObject, - LPVOID *ppvObject); - -HRESULT WINAPI SHCreateDefClassObject( - REFIID riidFactory, - LPVOID *ppvFactory, - LPFNCDCOCALLBACK lpfnCallback, - LPDWORD lpdwUsage, - REFIID riidObject); - -void WINAPI SHFreeUnusedLibraries(void); - -/* SHCreateLinks flags */ -#define SHCLF_PREFIXNAME 0x01 -#define SHCLF_CREATEONDESKTOP 0x02 - -HRESULT WINAPI SHCreateLinks( - HWND hWnd, - LPCSTR lpszDir, - LPDATAOBJECT lpDataObject, - UINT uFlags, - LPITEMIDLIST *lppidlLinks); - -DWORD WINAPI CheckEscapesA(LPSTR string, DWORD len); -DWORD WINAPI CheckEscapesW(LPWSTR string, DWORD len); - -/* policy functions */ -BOOL WINAPI SHInitRestricted(LPCVOID unused, LPCVOID inpRegKey); - -#ifdef __cplusplus -} /* extern "C" */ -#endif /* defined(__cplusplus) */ - -#endif /* __WINE_UNDOCSHELL_H */ +/* + * Copyright 1999, 2000 Juergen Schmied + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef __WINE_UNDOCSHELL_H +#define __WINE_UNDOCSHELL_H + +#include + +#include "windef.h" +#include "winbase.h" +#include "winuser.h" +#include "commctrl.h" +#include "shlobj.h" + +#ifdef __cplusplus +extern "C" { +#endif /* defined(__cplusplus) */ + +/**************************************************************************** + * IDList Functions + */ +BOOL WINAPI ILGetDisplayName( + LPCITEMIDLIST pidl, + LPVOID path); + +/* type parameter for ILGetDisplayNameEx() */ +#define ILGDN_FORPARSING 0 +#define ILGDN_NORMAL 1 +#define ILGDN_INFOLDER 2 + +BOOL WINAPI ILGetDisplayNameEx( + LPSHELLFOLDER psf, + LPCITEMIDLIST pidl, + LPVOID path, + DWORD type); + +LPITEMIDLIST WINAPI ILGlobalClone(LPCITEMIDLIST pidl); +void WINAPI ILGlobalFree(LPITEMIDLIST pidl); + +LPITEMIDLIST WINAPI SHSimpleIDListFromPathA (LPCSTR lpszPath); +LPITEMIDLIST WINAPI SHSimpleIDListFromPathW (LPCWSTR lpszPath); + +HRESULT WINAPI SHILCreateFromPathA ( + LPCSTR path, + LPITEMIDLIST * ppidl, + DWORD *attributes); + +HRESULT WINAPI SHILCreateFromPathW ( + LPCWSTR path, + LPITEMIDLIST * ppidl, + DWORD *attributes); + +LPITEMIDLIST WINAPI ILCreateFromPathA(LPCSTR path); +LPITEMIDLIST WINAPI ILCreateFromPathW(LPCWSTR path); + +/* + string functions +*/ +BOOL WINAPI StrRetToStrNA(LPSTR,DWORD,LPSTRRET,const ITEMIDLIST*); +BOOL WINAPI StrRetToStrNW(LPWSTR,DWORD,LPSTRRET,const ITEMIDLIST*); + + +/**************************************************************************** +* SHChangeNotifyRegister API +*/ +#define SHCNRF_InterruptLevel 0x0001 +#define SHCNRF_ShellLevel 0x0002 +#define SHCNRF_RecursiveInterrupt 0x1000 /* Must be combined with SHCNRF_InterruptLevel */ +#define SHCNRF_NewDelivery 0x8000 /* Messages use shared memory */ + +/**************************************************************************** + * Shell Common Dialogs + */ + +BOOL WINAPI PickIconDlg( + HWND hwndOwner, + LPSTR lpstrFile, + DWORD nMaxFile, + LPDWORD lpdwIconIndex); + +/* RunFileDlg flags */ +#define RFF_NOBROWSE 0x01 +#define RFF_NODEFAULT 0x02 +#define RFF_CALCDIRECTORY 0x04 +#define RFF_NOLABEL 0x08 +#define RFF_NOSEPARATEMEM 0x20 /* NT only */ + +/* RunFileFlg notification structure */ +typedef struct +{ + NMHDR hdr; + LPCSTR lpFile; + LPCSTR lpDirectory; + int nShow; +} NM_RUNFILEDLG, * LPNM_RUNFILEDLG; + +/* RunFileDlg notification return values */ +#define RF_OK 0x00 +#define RF_CANCEL 0x01 +#define RF_RETRY 0x02 + +void WINAPI RunFileDlg( + HWND hwndOwner, + HICON hIcon, + LPCSTR lpstrDirectory, + LPCSTR lpstrTitle, + LPCSTR lpstrDescription, + UINT uFlags); + +void WINAPI ExitWindowsDialog(HWND hwndOwner); + +BOOL WINAPI GetFileNameFromBrowse( + HWND hwndOwner, + LPSTR lpstrFile, + DWORD nMaxFile, + LPCSTR lpstrInitialDir, + LPCSTR lpstrDefExt, + LPCSTR lpstrFilter, + LPCSTR lpstrTitle); + +BOOL WINAPI SHFindComputer( + LPCITEMIDLIST pidlRoot, + LPCITEMIDLIST pidlSavedSearch); + +void WINAPI SHHandleDiskFull(HWND hwndOwner, + UINT uDrive); + +int WINAPI SHOutOfMemoryMessageBox( + HWND hwndOwner, + LPCSTR lpCaption, + UINT uType); + +DWORD WINAPI SHNetConnectionDialog( + HWND hwndOwner, + LPCSTR lpstrRemoteName, + DWORD dwType); + +/**************************************************************************** + * Memory Routines + */ + +/* The Platform SDK's shlobj.h header defines similar functions with a + * leading underscore. However those are unusable because of the leading + * underscore, because they have an incorrect calling convention, and + * because these functions are not exported by name anyway. + */ +HANDLE WINAPI SHAllocShared( + LPVOID pv, + ULONG cb, + DWORD pid); + +BOOL WINAPI SHFreeShared( + HANDLE hMem, + DWORD pid); + +LPVOID WINAPI SHLockShared( + HANDLE hMem, + DWORD pid); + +BOOL WINAPI SHUnlockShared(LPVOID pv); + +/**************************************************************************** + * Cabinet Window Messages + */ + +#define CWM_SETPATH (WM_USER + 2) +#define CWM_WANTIDLE (WM_USER + 3) +#define CWM_GETSETCURRENTINFO (WM_USER + 4) +#define CWM_SELECTITEM (WM_USER + 5) +#define CWM_SELECTITEMSTR (WM_USER + 6) +#define CWM_GETISHELLBROWSER (WM_USER + 7) +#define CWM_TESTPATH (WM_USER + 9) +#define CWM_STATECHANGE (WM_USER + 10) +#define CWM_GETPATH (WM_USER + 12) + +/* CWM_TESTPATH types */ +#define CWTP_ISEQUAL 0 +#define CWTP_ISCHILD 1 + +/* CWM_TESTPATH structure */ +typedef struct +{ + DWORD dwType; + ITEMIDLIST idl; +} CWTESTPATHSTRUCT,* LPCWTESTPATHSTRUCT; + +/**************************************************************************** + * System Imagelist Routines + */ + +int WINAPI Shell_GetCachedImageIndex( + LPCSTR lpszFileName, + UINT nIconIndex, + BOOL bSimulateDoc); + +BOOL WINAPI Shell_GetImageLists( + HIMAGELIST *lphimlLarge, + HIMAGELIST *lphimlSmall); + +HICON WINAPI SHGetFileIcon( + DWORD dwReserved, + LPCSTR lpszPath, + DWORD dwFileAttributes, + UINT uFlags); + +BOOL WINAPI FileIconInit(BOOL bFullInit); + +/**************************************************************************** + * File Menu Routines + */ +/* FileMenu_Create nSelHeight constants */ +#define FM_DEFAULT_SELHEIGHT -1 +#define FM_FULL_SELHEIGHT 0 + +/* FileMenu_Create flags */ +#define FMF_SMALL_ICONS 0x00 +#define FMF_LARGE_ICONS 0x08 +#define FMF_NO_COLUMN_BREAK 0x10 + +HMENU WINAPI FileMenu_Create( + COLORREF crBorderColor, + int nBorderWidth, + HBITMAP hBorderBmp, + int nSelHeight, + UINT uFlags); + +void WINAPI FileMenu_Destroy(HMENU hMenu); + +/* FileMenu_AppendItem constants */ +#define FM_SEPARATOR (LPCSTR)1 +#define FM_BLANK_ICON -1 +#define FM_DEFAULT_HEIGHT 0 + +BOOL WINAPI FileMenu_AppendItem( + HMENU hMenu, + LPCSTR lpszText, + UINT uID, + int iIcon, + HMENU hMenuPopup, + int nItemHeight); + +/* FileMenu_InsertUsingPidl flags */ +#define FMF_NO_EMPTY_ITEM 0x01 +#define FMF_NO_PROGRAM_GROUPS 0x04 + +/* FileMenu_InsertUsingPidl callback function */ +typedef void (CALLBACK *LPFNFMCALLBACK)(LPCITEMIDLIST pidlFolder, LPCITEMIDLIST pidlFile); + +int WINAPI FileMenu_InsertUsingPidl( + HMENU hMenu, + UINT uID, + LPCITEMIDLIST pidl, + UINT uFlags, + UINT uEnumFlags, + LPFNFMCALLBACK lpfnCallback); + +int WINAPI FileMenu_ReplaceUsingPidl( + HMENU hMenu, + UINT uID, + LPCITEMIDLIST pidl, + UINT uEnumFlags, + LPFNFMCALLBACK lpfnCallback); + +void WINAPI FileMenu_Invalidate(HMENU hMenu); + +HMENU WINAPI FileMenu_FindSubMenuByPidl( + HMENU hMenu, + LPCITEMIDLIST pidl); + +BOOL WINAPI FileMenu_TrackPopupMenuEx( + HMENU hMenu, + UINT uFlags, + int x, + int y, + HWND hWnd, + LPTPMPARAMS lptpm); + +BOOL WINAPI FileMenu_GetLastSelectedItemPidls( + UINT uReserved, + LPCITEMIDLIST *ppidlFolder, + LPCITEMIDLIST *ppidlItem); + +LRESULT WINAPI FileMenu_MeasureItem( + HWND hWnd, + LPMEASUREITEMSTRUCT lpmis); + +LRESULT WINAPI FileMenu_DrawItem( + HWND hWnd, + LPDRAWITEMSTRUCT lpdis); + +BOOL WINAPI FileMenu_InitMenuPopup(HMENU hMenu); + +void WINAPI FileMenu_AbortInitMenu(void); + +LRESULT WINAPI FileMenu_HandleMenuChar( + HMENU hMenu, + WPARAM wParam); + +BOOL WINAPI FileMenu_DeleteAllItems(HMENU hMenu); + +BOOL WINAPI FileMenu_DeleteItemByCmd( + HMENU hMenu, + UINT uID); + +BOOL WINAPI FileMenu_DeleteItemByIndex( + HMENU hMenu, + UINT uPos); + +BOOL WINAPI FileMenu_DeleteMenuItemByFirstID( + HMENU hMenu, + UINT uID); + +BOOL WINAPI FileMenu_DeleteSeparator(HMENU hMenu); + +BOOL WINAPI FileMenu_EnableItemByCmd( + HMENU hMenu, + UINT uID, + BOOL bEnable); + +DWORD WINAPI FileMenu_GetItemExtent( + HMENU hMenu, + UINT uPos); + +int WINAPI FileMenu_AppendFilesForPidl( + HMENU hMenu, + LPCITEMIDLIST pidl, + BOOL bAddSeparator); + +int WINAPI FileMenu_AddFilesForPidl( + HMENU hMenu, + UINT uReserved, + UINT uID, + LPCITEMIDLIST pidl, + UINT uFlags, + UINT uEnumFlags, + LPFNFMCALLBACK lpfnCallback); + +/**************************************************************************** + * Drag And Drop Routines + */ + +HRESULT WINAPI SHRegisterDragDrop( + HWND hWnd, + LPDROPTARGET lpDropTarget); + +HRESULT WINAPI SHRevokeDragDrop(HWND hWnd); + +BOOL WINAPI DAD_DragEnter(HWND hWnd); + +BOOL WINAPI DAD_SetDragImageFromListView( + HWND hWnd, + POINT pt); + +BOOL WINAPI DAD_ShowDragImage(BOOL bShow); + +HRESULT WINAPI CIDLData_CreateFromIDArray( + LPCITEMIDLIST pidlFolder, + DWORD cpidlFiles, + LPCITEMIDLIST *lppidlFiles, + LPDATAOBJECT *ppdataObject); + +/**************************************************************************** + * Path Manipulation Routines + */ + +BOOL WINAPI PathAppendAW(LPVOID lpszPath1, LPCVOID lpszPath2); + +LPVOID WINAPI PathCombineAW(LPVOID szDest, LPCVOID lpszDir, LPCVOID lpszFile); + +LPVOID WINAPI PathAddBackslashAW(LPVOID path); + +LPVOID WINAPI PathBuildRootAW(LPVOID lpszPath, int drive); + +LPVOID WINAPI PathFindExtensionAW(LPCVOID path); + +LPVOID WINAPI PathFindFileNameAW(LPCVOID path); + +LPVOID WINAPI PathGetExtensionAW(LPCVOID lpszPath, DWORD void1, DWORD void2); + +LPVOID WINAPI PathGetArgsAW(LPVOID lpszPath); + +BOOL WINAPI PathRemoveFileSpecAW(LPVOID lpszPath); + +void WINAPI PathRemoveBlanksAW(LPVOID lpszPath); + +VOID WINAPI PathQuoteSpacesAW(LPVOID path); + +void WINAPI PathUnquoteSpacesAW(LPVOID lpszPath); + +BOOL WINAPI PathIsUNCAW(LPCVOID lpszPath); + +BOOL WINAPI PathIsRelativeAW(LPCVOID lpszPath); + +BOOL WINAPI PathIsRootAW(LPCVOID x); + +BOOL WINAPI PathIsExeAW(LPCVOID lpszPath); + +BOOL WINAPI PathIsDirectoryAW(LPCVOID lpszPath); + +BOOL WINAPI PathFileExistsAW(LPCVOID lpszPath); + +BOOL WINAPI PathMatchSpecAW(LPVOID lpszPath, LPVOID lpszSpec); + +BOOL WINAPI PathMakeUniqueNameAW( + LPVOID lpszBuffer, + DWORD dwBuffSize, + LPCVOID lpszShortName, + LPCVOID lpszLongName, + LPCVOID lpszPathName); + +BOOL WINAPI PathYetAnotherMakeUniqueName( + LPWSTR lpszBuffer, + LPCWSTR lpszPathName, + LPCWSTR lpszShortName, + LPCWSTR lpszLongName); + +BOOL WINAPI PathQualifyA(LPCSTR path); +BOOL WINAPI PathQualifyW(LPCWSTR path); +#define PathQualify WINELIB_NAME_AW(PathQualify) +BOOL WINAPI PathQualifyAW(LPCVOID path); + + +/* PathResolve flags */ +#define PRF_CHECKEXISTANCE 0x01 +#define PRF_EXECUTABLE 0x02 +#define PRF_QUALIFYONPATH 0x04 +#define PRF_WINDOWS31 0x08 + +BOOL WINAPI PathResolveAW(LPVOID lpszPath, LPCVOID *alpszPaths, DWORD dwFlags); + +VOID WINAPI PathSetDlgItemPathAW(HWND hDlg, int nIDDlgItem, LPCVOID lpszPath); + +/* PathProcessCommand flags */ +#define PPCF_QUOTEPATH 0x01 /* implies PPCF_INCLUDEARGS */ +#define PPCF_INCLUDEARGS 0x02 +#define PPCF_NODIRECTORIES 0x10 +#define PPCF_DONTRESOLVE 0x20 +#define PPCF_PATHISRELATIVE 0x40 + +HRESULT WINAPI PathProcessCommandAW(LPCVOID lpszPath, LPVOID lpszBuff, + DWORD dwBuffSize, DWORD dwFlags); + +void WINAPI PathStripPathAW(LPVOID lpszPath); + +BOOL WINAPI PathStripToRootAW(LPVOID lpszPath); + +void WINAPI PathRemoveArgsAW(LPVOID lpszPath); + +void WINAPI PathRemoveExtensionAW(LPVOID lpszPath); + +int WINAPI PathParseIconLocationAW(LPVOID lpszPath); + +BOOL WINAPI PathIsSameRootAW(LPCVOID lpszPath1, LPCVOID lpszPath2); + +BOOL WINAPI PathFindOnPathAW(LPVOID sFile, LPCVOID sOtherDirs); + +/**************************************************************************** + * Shell Namespace Routines + */ + +/* Generic structure used by several messages */ +typedef struct +{ + DWORD dwReserved; + DWORD dwReserved2; + LPCITEMIDLIST pidl; + LPDWORD lpdwUser; +} SFVCBINFO, * LPSFVCBINFO; +typedef const SFVCBINFO * LPCSFVCBINFO; + +/* SFVCB_SELECTIONCHANGED structure */ +typedef struct +{ + UINT uOldState; + UINT uNewState; + LPCITEMIDLIST pidl; + LPDWORD lpdwUser; +} SFVSELECTSTATE, * LPSFVSELECTSTATE; +typedef const SFVSELECTSTATE * LPCSFVSELECTSTATE; + +/* SFVCB_COPYHOOKCALLBACK structure */ +typedef struct +{ + HWND hwnd; + UINT wFunc; + UINT wFlags; + LPCSTR pszSrcFile; + DWORD dwSrcAttribs; + LPCSTR pszDestFile; + DWORD dwDestAttribs; +} SFVCOPYHOOKINFO, * LPSFVCOPYHOOKINFO; +typedef const SFVCOPYHOOKINFO * LPCSFVCOPYHOOKINFO; + +/* SFVCB_GETDETAILSOF structure */ +typedef struct +{ + LPCITEMIDLIST pidl; + int fmt; + int cx; + STRRET lpText; +} SFVCOLUMNINFO, * LPSFVCOLUMNINFO; + +/**************************************************************************** + * Misc Stuff + */ + +/* SHWaitForFileToOpen flags */ +#define SHWFF_ADD 0x01 +#define SHWFF_REMOVE 0x02 +#define SHWFF_WAIT 0x04 + +BOOL WINAPI SHWaitForFileToOpen( + LPCITEMIDLIST pidl, + DWORD dwFlags, + DWORD dwTimeout); + +WORD WINAPI ArrangeWindows( + HWND hwndParent, + DWORD dwReserved, + LPCRECT lpRect, + WORD cKids, + CONST HWND * lpKids); + +/* RegisterShellHook types */ +#define RSH_DEREGISTER 0 +#define RSH_REGISTER 1 +#define RSH_REGISTER_PROGMAN 2 +#define RSH_REGISTER_TASKMAN 3 + +BOOL WINAPI RegisterShellHook( + HWND hWnd, + DWORD dwType); + +/* SHCreateDefClassObject callback function */ +typedef HRESULT (CALLBACK *LPFNCDCOCALLBACK)( + LPUNKNOWN pUnkOuter, + REFIID riidObject, + LPVOID *ppvObject); + +HRESULT WINAPI SHCreateDefClassObject( + REFIID riidFactory, + LPVOID *ppvFactory, + LPFNCDCOCALLBACK lpfnCallback, + LPDWORD lpdwUsage, + REFIID riidObject); + +void WINAPI SHFreeUnusedLibraries(void); + +/* SHCreateLinks flags */ +#define SHCLF_PREFIXNAME 0x01 +#define SHCLF_CREATEONDESKTOP 0x02 + +HRESULT WINAPI SHCreateLinks( + HWND hWnd, + LPCSTR lpszDir, + LPDATAOBJECT lpDataObject, + UINT uFlags, + LPITEMIDLIST *lppidlLinks); + +DWORD WINAPI CheckEscapesA(LPSTR string, DWORD len); +DWORD WINAPI CheckEscapesW(LPWSTR string, DWORD len); + +/* policy functions */ +BOOL WINAPI SHInitRestricted(LPCVOID unused, LPCVOID inpRegKey); + +#ifdef __cplusplus +} /* extern "C" */ +#endif /* defined(__cplusplus) */ + +#endif /* __WINE_UNDOCSHELL_H */ diff --git a/reactos/lib/shell32/version.h b/reactos/lib/shell32/version.h index 7106af344d2..70ae98d7d46 100644 --- a/reactos/lib/shell32/version.h +++ b/reactos/lib/shell32/version.h @@ -1,28 +1,28 @@ -/* - * Shared Resource/DllGetVersion version information - * - * Copyright (C) 2004 Robert Shearman - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#define WINE_FILEVERSION_MAJOR 5 -#define WINE_FILEVERSION_MINOR 0 -#define WINE_FILEVERSION_BUILD 3900 -#define WINE_FILEVERSION_PLATFORMID 6975 - -/* FIXME: when libs/wpp gets fixed to support concatenation we can remove - * this and define it in version.rc */ -#define WINE_FILEVERSION "5.0.3900.6975" +/* + * Shared Resource/DllGetVersion version information + * + * Copyright (C) 2004 Robert Shearman + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#define WINE_FILEVERSION_MAJOR 5 +#define WINE_FILEVERSION_MINOR 0 +#define WINE_FILEVERSION_BUILD 3900 +#define WINE_FILEVERSION_PLATFORMID 6975 + +/* FIXME: when libs/wpp gets fixed to support concatenation we can remove + * this and define it in version.rc */ +#define WINE_FILEVERSION "5.0.3900.6975" diff --git a/reactos/lib/shell32/version.rc b/reactos/lib/shell32/version.rc index 32a8d626adc..255ae21d034 100644 --- a/reactos/lib/shell32/version.rc +++ b/reactos/lib/shell32/version.rc @@ -1,27 +1,27 @@ -/* - * version information for shell32.dll - * - * Copyright (C) 2003 John K. Hohm - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include "version.h" - -#define WINE_OLESELFREGISTER -#define WINE_FILEVERSION WINE_FILEVERSION_MAJOR,WINE_FILEVERSION_MINOR,WINE_FILEVERSION_BUILD,WINE_FILEVERSION_PLATFORMID -#define WINE_FILENAME_STR "shell32.dll" - -#include +/* + * version information for shell32.dll + * + * Copyright (C) 2003 John K. Hohm + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "version.h" + +#define WINE_OLESELFREGISTER +#define WINE_FILEVERSION WINE_FILEVERSION_MAJOR,WINE_FILEVERSION_MINOR,WINE_FILEVERSION_BUILD,WINE_FILEVERSION_PLATFORMID +#define WINE_FILENAME_STR "shell32.dll" + +#include diff --git a/reactos/lib/shell32/version16.rc b/reactos/lib/shell32/version16.rc index 27dd1ee6dfd..3620824dae3 100644 --- a/reactos/lib/shell32/version16.rc +++ b/reactos/lib/shell32/version16.rc @@ -1,24 +1,24 @@ -/* - * Copyright 2001 Dmitry Timoshkov - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#define WINE_FILEDESCRIPTION_STR "Wine core dll" -#define WINE_FILENAME_STR "shell.dll" -#define WINE_FILEVERSION 4,0,0,0 -#define WINE_FILEVERSION_STR "4.0" - -#include "wine/wine_common_ver.rc" +/* + * Copyright 2001 Dmitry Timoshkov + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#define WINE_FILEDESCRIPTION_STR "Wine core dll" +#define WINE_FILENAME_STR "shell.dll" +#define WINE_FILEVERSION 4,0,0,0 +#define WINE_FILEVERSION_STR "4.0" + +#include "wine/wine_common_ver.rc" From 9d11fdcdaceec45a27eca01570699e2f262e5b8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20van=20Geldorp?= Date: Wed, 9 Feb 2005 18:34:13 +0000 Subject: [PATCH 161/185] Don't include NEVER_LOAD sections in image size. Rename SizeOfImage to ResidentSize to avoid confusion svn path=/trunk/; revision=13477 --- reactos/include/ntdll/ldr.h | 5 ++++- reactos/lib/ntdll/ldr/startup.c | 5 ++--- reactos/lib/ntdll/ldr/utils.c | 35 +++++++++++++++++++++++++---- reactos/lib/ntdll/rtl/dbgbuffer.c | 2 +- reactos/lib/psapi/psapi.c | 6 ++--- reactos/ntoskrnl/dbg/kdb_symbols.c | 4 ++-- reactos/ntoskrnl/ke/i386/usertrap.c | 4 ++-- 7 files changed, 45 insertions(+), 16 deletions(-) diff --git a/reactos/include/ntdll/ldr.h b/reactos/include/ntdll/ldr.h index 675e1a9303c..05d2de392c2 100644 --- a/reactos/include/ntdll/ldr.h +++ b/reactos/include/ntdll/ldr.h @@ -59,7 +59,7 @@ typedef struct _LDR_MODULE LIST_ENTRY InInitializationOrderModuleList; /* not used */ PVOID BaseAddress; ULONG EntryPoint; - ULONG SizeOfImage; + ULONG ResidentSize; UNICODE_STRING FullDllName; UNICODE_STRING BaseDllName; ULONG Flags; @@ -92,6 +92,9 @@ LdrpLoadUserModuleSymbols(PLDR_MODULE LdrModule); #endif +ULONG +LdrpGetResidentSize(PIMAGE_NT_HEADERS NTHeaders); + PEPFUNC LdrPEStartup (PVOID ImageBase, HANDLE SectionHandle, PLDR_MODULE* Module, diff --git a/reactos/lib/ntdll/ldr/startup.c b/reactos/lib/ntdll/ldr/startup.c index 72c85a3d986..f16e6a7d786 100644 --- a/reactos/lib/ntdll/ldr/startup.c +++ b/reactos/lib/ntdll/ldr/startup.c @@ -222,7 +222,6 @@ finish: return FALSE; } - /* FUNCTIONS *****************************************************************/ VOID STDCALL @@ -382,7 +381,7 @@ __true_LdrInitializeThunk (ULONG Unknown1, NtModule->CheckSum = 0; NTHeaders = RtlImageNtHeader (NtModule->BaseAddress); - NtModule->SizeOfImage = NTHeaders->OptionalHeader.SizeOfImage; + NtModule->ResidentSize = LdrpGetResidentSize(NTHeaders); NtModule->TimeDateStamp = NTHeaders->FileHeader.TimeDateStamp; InsertTailList(&Peb->Ldr->InLoadOrderModuleList, @@ -430,7 +429,7 @@ __true_LdrInitializeThunk (ULONG Unknown1, ExeModule->CheckSum = 0; NTHeaders = RtlImageNtHeader (ExeModule->BaseAddress); - ExeModule->SizeOfImage = NTHeaders->OptionalHeader.SizeOfImage; + ExeModule->ResidentSize = LdrpGetResidentSize(NTHeaders); ExeModule->TimeDateStamp = NTHeaders->FileHeader.TimeDateStamp; InsertHeadList(&Peb->Ldr->InLoadOrderModuleList, diff --git a/reactos/lib/ntdll/ldr/utils.c b/reactos/lib/ntdll/ldr/utils.c index d8245fb0a12..0ef7154e0e4 100644 --- a/reactos/lib/ntdll/ldr/utils.c +++ b/reactos/lib/ntdll/ldr/utils.c @@ -468,7 +468,7 @@ LdrAddModuleEntry(PVOID ImageBase, Module->EntryPoint = NTHeaders->OptionalHeader.AddressOfEntryPoint; if (Module->EntryPoint != 0) Module->EntryPoint += (ULONG)Module->BaseAddress; - Module->SizeOfImage = NTHeaders->OptionalHeader.SizeOfImage; + Module->ResidentSize = LdrpGetResidentSize(NTHeaders); if (NtCurrentPeb()->Ldr->Initialized == TRUE) { /* loading while app is running */ @@ -799,7 +799,7 @@ LdrFindEntryForAddress(PVOID Address, DPRINT("Scanning %wZ at %p\n", &ModulePtr->BaseDllName, ModulePtr->BaseAddress); if ((Address >= ModulePtr->BaseAddress) && - (Address <= (ModulePtr->BaseAddress + ModulePtr->SizeOfImage))) + (Address <= (ModulePtr->BaseAddress + ModulePtr->ResidentSize))) { *Module = ModulePtr; RtlLeaveCriticalSection(NtCurrentPeb()->LoaderLock); @@ -1581,7 +1581,7 @@ LdrpAdjustImportDirectory(PLDR_MODULE Module, NTHeaders = RtlImageNtHeader (ImportedModule->BaseAddress); Start = (PVOID)NTHeaders->OptionalHeader.ImageBase; - End = Start + ImportedModule->SizeOfImage; + End = Start + ImportedModule->ResidentSize; Offset = ImportedModule->BaseAddress - Start; /* Walk through function list and fixup addresses. */ @@ -2708,7 +2708,7 @@ LdrQueryProcessModuleInformation(IN PMODULE_INFORMATION ModuleInformation OPTION { ModulePtr->Reserved[0] = ModulePtr->Reserved[1] = 0; // FIXME: ?? ModulePtr->Base = Module->BaseAddress; - ModulePtr->Size = Module->SizeOfImage; + ModulePtr->Size = Module->ResidentSize; ModulePtr->Flags = Module->Flags; ModulePtr->Index = 0; // FIXME: index ?? ModulePtr->Unknown = 0; // FIXME: ?? @@ -2814,6 +2814,33 @@ LdrpCheckImageChecksum (IN PVOID BaseAddress, return (BOOLEAN)(CalcSum == HeaderSum); } +/* + * Compute size of an image as it is actually present in virt memory + * (i.e. excluding NEVER_LOAD sections) + */ +ULONG +LdrpGetResidentSize(PIMAGE_NT_HEADERS NTHeaders) +{ + PIMAGE_SECTION_HEADER SectionHeader; + unsigned SectionIndex; + ULONG ResidentSize; + + SectionHeader = (PIMAGE_SECTION_HEADER)((char *) &NTHeaders->OptionalHeader + + NTHeaders->FileHeader.SizeOfOptionalHeader); + ResidentSize = 0; + for (SectionIndex = 0; SectionIndex < NTHeaders->FileHeader.NumberOfSections; SectionIndex++) + { + if (0 == (SectionHeader->Characteristics & IMAGE_SCN_LNK_REMOVE) + && ResidentSize < SectionHeader->VirtualAddress + SectionHeader->Misc.VirtualSize) + { + ResidentSize = SectionHeader->VirtualAddress + SectionHeader->Misc.VirtualSize; + } + SectionHeader++; + } + + return ResidentSize; +} + /*************************************************************************** * NAME EXPORTED diff --git a/reactos/lib/ntdll/rtl/dbgbuffer.c b/reactos/lib/ntdll/rtl/dbgbuffer.c index f490f75ec18..707635d40c8 100644 --- a/reactos/lib/ntdll/rtl/dbgbuffer.c +++ b/reactos/lib/ntdll/rtl/dbgbuffer.c @@ -219,7 +219,7 @@ RtlpQueryRemoteProcessModules(HANDLE ProcessHandle, { ModulePtr->Reserved[0] = ModulePtr->Reserved[1] = 0; // FIXME: ?? ModulePtr->Base = lmModule.BaseAddress; - ModulePtr->Size = lmModule.SizeOfImage; + ModulePtr->Size = lmModule.ResidentSize; ModulePtr->Flags = lmModule.Flags; ModulePtr->Index = 0; // FIXME: ?? ModulePtr->Unknown = 0; // FIXME: ?? diff --git a/reactos/lib/psapi/psapi.c b/reactos/lib/psapi/psapi.c index 29c4029cd98..34b79d10fb6 100644 --- a/reactos/lib/psapi/psapi.c +++ b/reactos/lib/psapi/psapi.c @@ -521,10 +521,10 @@ exitWithStatus: } /* image size */ - if(nSize >= sizeof(CurrentModule->SizeOfImage)) + if(nSize >= sizeof(CurrentModule->ResidentSize)) { - Context->lpmodinfo->SizeOfImage = CurrentModule->SizeOfImage; - nSize -= sizeof(CurrentModule->SizeOfImage); + Context->lpmodinfo->SizeOfImage = CurrentModule->ResidentSize; + nSize -= sizeof(CurrentModule->ResidentSize); } /* entry point */ diff --git a/reactos/ntoskrnl/dbg/kdb_symbols.c b/reactos/ntoskrnl/dbg/kdb_symbols.c index 3780be0d6df..618711e6be0 100644 --- a/reactos/ntoskrnl/dbg/kdb_symbols.c +++ b/reactos/ntoskrnl/dbg/kdb_symbols.c @@ -92,7 +92,7 @@ KdbpSymFindUserModule(IN PVOID Address OPTIONAL, current = CONTAINING_RECORD(current_entry, LDR_MODULE, InLoadOrderModuleList); if ((Address != NULL && (Address >= (PVOID)current->BaseAddress && - Address < (PVOID)((char *)current->BaseAddress + current->SizeOfImage))) || + Address < (PVOID)((char *)current->BaseAddress + current->ResidentSize))) || (Name != NULL && _wcsicmp(current->BaseDllName.Buffer, Name) == 0) || (Index >= 0 && Count++ == Index)) { @@ -102,7 +102,7 @@ KdbpSymFindUserModule(IN PVOID Address OPTIONAL, wcsncpy(pInfo->Name, current->BaseDllName.Buffer, Length); pInfo->Name[Length] = L'\0'; pInfo->Base = (ULONG_PTR)current->BaseAddress; - pInfo->Size = current->SizeOfImage; + pInfo->Size = current->ResidentSize; pInfo->RosSymInfo = current->RosSymInfo; return TRUE; } diff --git a/reactos/ntoskrnl/ke/i386/usertrap.c b/reactos/ntoskrnl/ke/i386/usertrap.c index 6bbf0efef04..2307fe9099c 100644 --- a/reactos/ntoskrnl/ke/i386/usertrap.c +++ b/reactos/ntoskrnl/ke/i386/usertrap.c @@ -1,4 +1,4 @@ -/* $Id:$ +/* $Id$ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -54,7 +54,7 @@ print_user_address(PVOID address) CONTAINING_RECORD(current_entry, LDR_MODULE, InLoadOrderModuleList); if (address >= (PVOID)current->BaseAddress && - address < (PVOID)((char*)current->BaseAddress + current->SizeOfImage)) + address < (PVOID)((char*)current->BaseAddress + current->ResidentSize)) { RelativeAddress = (ULONG_PTR) address - (ULONG_PTR)current->BaseAddress; From a309fd9ca92190502f810ef48672333ad4be8163 Mon Sep 17 00:00:00 2001 From: Mike Nordell Date: Wed, 9 Feb 2005 20:11:48 +0000 Subject: [PATCH 162/185] Send the correct handle_s_. tinus found this one. svn path=/trunk/; revision=13478 --- reactos/drivers/net/ndis/ndis/miniport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/drivers/net/ndis/ndis/miniport.c b/reactos/drivers/net/ndis/ndis/miniport.c index aaaf07c667d..0a792aaf10b 100644 --- a/reactos/drivers/net/ndis/ndis/miniport.c +++ b/reactos/drivers/net/ndis/ndis/miniport.c @@ -1933,7 +1933,7 @@ NdisMSetAttributes( */ { NDIS_DbgPrint(MAX_TRACE, ("Called.\n")); - NdisMSetAttributesEx(MiniportAdapterContext, MiniportAdapterContext, 0, + NdisMSetAttributesEx(MiniportAdapterHandle, MiniportAdapterContext, 0, BusMaster ? NDIS_ATTRIBUTE_BUS_MASTER : 0, AdapterType); } From 2da2045b7fb829b8b722bc5a2827e398c3f73eb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20van=20Geldorp?= Date: Wed, 9 Feb 2005 20:53:18 +0000 Subject: [PATCH 163/185] Add DPRINT_HWDETECT to DEBUG_ALL svn path=/trunk/; revision=13479 --- reactos/boot/freeldr/freeldr/debug.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reactos/boot/freeldr/freeldr/debug.c b/reactos/boot/freeldr/freeldr/debug.c index 86cd50c50dd..93193ceaf01 100644 --- a/reactos/boot/freeldr/freeldr/debug.c +++ b/reactos/boot/freeldr/freeldr/debug.c @@ -34,8 +34,8 @@ #if defined (DEBUG_ALL) ULONG DebugPrintMask = DPRINT_WARNING | DPRINT_MEMORY | DPRINT_FILESYSTEM | - DPRINT_UI | DPRINT_DISK | DPRINT_CACHE | DPRINT_REACTOS | - DPRINT_LINUX; + DPRINT_UI | DPRINT_DISK | DPRINT_CACHE | DPRINT_REACTOS | + DPRINT_LINUX | DPRINT_HWDETECT; #elif defined (DEBUG_INIFILE) ULONG DebugPrintMask = DPRINT_INIFILE; #elif defined (DEBUG_REACTOS) From 00c444e957c96cdd55cc7e31a5ca367fc9cf15e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20van=20Geldorp?= Date: Wed, 9 Feb 2005 23:52:27 +0000 Subject: [PATCH 164/185] Pass PageDirectoryStart and End so the memory manager knows not to clobber it svn path=/trunk/; revision=13480 --- reactos/boot/freeldr/freeldr/reactos/setupldr.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/reactos/boot/freeldr/freeldr/reactos/setupldr.c b/reactos/boot/freeldr/freeldr/reactos/setupldr.c index 50c9c1cc581..bc2fe82e964 100644 --- a/reactos/boot/freeldr/freeldr/reactos/setupldr.c +++ b/reactos/boot/freeldr/freeldr/reactos/setupldr.c @@ -244,9 +244,14 @@ VOID RunLoader(VOID) HINF InfHandle; ULONG ErrorLine; INFCONTEXT InfContext; + + extern ULONG PageDirectoryStart; + extern ULONG PageDirectoryEnd; /* Setup multiboot information structure */ LoaderBlock.Flags = MB_INFO_FLAG_BOOT_DEVICE | MB_INFO_FLAG_COMMAND_LINE | MB_INFO_FLAG_MODULES; + LoaderBlock.PageDirectoryStart = (ULONG)&PageDirectoryStart; + LoaderBlock.PageDirectoryEnd = (ULONG)&PageDirectoryEnd; LoaderBlock.BootDevice = 0xffffffff; LoaderBlock.CommandLine = (unsigned long)multiboot_kernel_cmdline; LoaderBlock.ModsCount = 0; From 2bdc976286f6d032d058d0cc2777c799d2c38b20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20van=20Geldorp?= Date: Wed, 9 Feb 2005 23:57:07 +0000 Subject: [PATCH 165/185] Big change warrants major version number bump svn path=/trunk/; revision=13481 --- reactos/boot/freeldr/freeldr/include/version.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/reactos/boot/freeldr/freeldr/include/version.h b/reactos/boot/freeldr/freeldr/include/version.h index 0ca8cfc9034..b51df4ada21 100644 --- a/reactos/boot/freeldr/freeldr/include/version.h +++ b/reactos/boot/freeldr/freeldr/include/version.h @@ -22,7 +22,7 @@ /* just some stuff */ -#define VERSION "FreeLoader v1.9" +#define VERSION "FreeLoader v2.0" #define COPYRIGHT "Copyright (C) 1998-2003 Brian Palmer " #define AUTHOR_EMAIL "" #define BY_AUTHOR "by Brian Palmer" @@ -34,8 +34,8 @@ // If you add features then you increment the minor version and zero the patch version // If you add major functionality then you increment the major version and zero the minor & patch versions // -#define FREELOADER_MAJOR_VERSION 1 -#define FREELOADER_MINOR_VERSION 9 +#define FREELOADER_MAJOR_VERSION 2 +#define FREELOADER_MINOR_VERSION 0 #define FREELOADER_PATCH_VERSION 0 From 231989d7ac9fe0cba4a68548d4b5f7545411fb4b Mon Sep 17 00:00:00 2001 From: Steven Edwards Date: Thu, 10 Feb 2005 01:42:58 +0000 Subject: [PATCH 166/185] Added note about freeldr 2.0 changes svn path=/trunk/; revision=13482 --- reactos/boot/freeldr/freeldr/CHANGELOG | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/reactos/boot/freeldr/freeldr/CHANGELOG b/reactos/boot/freeldr/freeldr/CHANGELOG index 7b1a3de91b0..d232950622b 100644 --- a/reactos/boot/freeldr/freeldr/CHANGELOG +++ b/reactos/boot/freeldr/freeldr/CHANGELOG @@ -1,3 +1,9 @@ +Changes in v2.0.0 (02/07/2005) (alex ionesco) + +- PE loading of ntoskrnl.exe +- Work on 3GB support +- w32api conversion + Changes in v1.8.26 (10/30/2004) (chorns) - Print stack frames on crashes. From 73f1d215e0f1fd2f80e0a50ac061c975b12bb0f3 Mon Sep 17 00:00:00 2001 From: Art Yerkes Date: Thu, 10 Feb 2005 03:58:03 +0000 Subject: [PATCH 167/185] Patch to fix NtCreateSempahore, in the case where the initial lookup succeeds. We previously left the function without initializing hSemaphore. Patch suggested by me and executed by hpoussin. svn path=/trunk/; revision=13483 --- reactos/ntoskrnl/ex/sem.c | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/reactos/ntoskrnl/ex/sem.c b/reactos/ntoskrnl/ex/sem.c index 5a27391365c..ff75f4060da 100644 --- a/reactos/ntoskrnl/ex/sem.c +++ b/reactos/ntoskrnl/ex/sem.c @@ -128,28 +128,37 @@ NtCreateSemaphore(OUT PHANDLE SemaphoreHandle, KeInitializeSemaphore(Semaphore, InitialCount, MaximumCount); + } - Status = ObInsertObject ((PVOID)Semaphore, + Status = ObInsertObject ((PVOID)Semaphore, NULL, DesiredAccess, 0, NULL, &hSemaphore); - ObDereferenceObject(Semaphore); - - if(NT_SUCCESS(Status)) + if(NT_SUCCESS(Status)) + { + _SEH_TRY { - _SEH_TRY - { - *SemaphoreHandle = hSemaphore; - } - _SEH_HANDLE - { - Status = _SEH_GetExceptionCode(); - } - _SEH_END; + ObDereferenceObject(Semaphore); + *SemaphoreHandle = hSemaphore; } + _SEH_HANDLE + { + Status = _SEH_GetExceptionCode(); + } + _SEH_END; + } else { + _SEH_TRY + { + *SemaphoreHandle = INVALID_HANDLE_VALUE; + } + _SEH_HANDLE + { + Status = _SEH_GetExceptionCode(); + } + _SEH_END; } return Status; From ef53ccc2a85a8ac18e43ceec1d19f928a1558877 Mon Sep 17 00:00:00 2001 From: Alex Ionescu Date: Thu, 10 Feb 2005 05:13:43 +0000 Subject: [PATCH 168/185] Fix APC problems. Thanks to Arty for finding this. This makes vncviewer work svn path=/trunk/; revision=13484 --- reactos/ntoskrnl/ke/wait.c | 65 +++++++++++++++++--------------------- 1 file changed, 29 insertions(+), 36 deletions(-) diff --git a/reactos/ntoskrnl/ke/wait.c b/reactos/ntoskrnl/ke/wait.c index dd046cb6230..3cff12ee706 100644 --- a/reactos/ntoskrnl/ke/wait.c +++ b/reactos/ntoskrnl/ke/wait.c @@ -1,4 +1,4 @@ -/* $Id:$ +/* $Id$ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS project @@ -489,6 +489,7 @@ KeWaitForMultipleObjects(ULONG Count, NTSTATUS Status; KIRQL OldIrql; BOOLEAN Abandoned; + NTSTATUS WaitStatus; DPRINT("Entering KeWaitForMultipleObjects(Count %lu Object[] %p) " "PsGetCurrentThread() %x\n", Count, Object, PsGetCurrentThread()); @@ -540,40 +541,32 @@ KeWaitForMultipleObjects(ULONG Count, OldIrql = KeAcquireDispatcherDatabaseLock (); } - /* Alertability 101 - * ---------------- - * A Wait can either be Alertable, or Non-Alertable. - * An Alertable Wait means that APCs can "Wake" the Thread, also called UnWaiting - * If an APC is Pending however, we must refuse an Alertable Wait. Such a wait would - * be pointless since an APC is just about to be delivered. - * - * There are many ways to check if it's safe to be alertable, and these are the ones - * that I could think of: - * - The Thread is already Alerted. So someone beat us to the punch and we bail out. - * - The Thread is Waiting in User-Mode, the APC Queue is not-empty. - * It's defintely clear that we have incoming APCs, so we need to bail out and let the system - * know that there are Pending User APCs (so they can be Delivered and maybe we can try again) - * - * Furthermore, wether or not we want to be Alertable, if the Thread is waiting in User-Mode, and there - * are Pending User APCs, we should bail out, since APCs will be delivered any second. - */ - if (Alertable) { - if (CurrentThread->Alerted[(int)WaitMode]) { - CurrentThread->Alerted[(int)WaitMode] = FALSE; - DPRINT("Alertability failed\n"); - KeReleaseDispatcherDatabaseLock(OldIrql); - return (STATUS_ALERTED); - } else if ((!IsListEmpty(&CurrentThread->ApcState.ApcListHead[UserMode])) && (WaitMode == UserMode)) { - DPRINT1("Alertability failed\n"); - CurrentThread->ApcState.UserApcPending = TRUE; - KeReleaseDispatcherDatabaseLock(OldIrql); - return (STATUS_USER_APC); - } - } else if ((CurrentThread->ApcState.UserApcPending) && (WaitMode != KernelMode)) { - DPRINT1("Alertability failed\n"); - KeReleaseDispatcherDatabaseLock(OldIrql); - return (STATUS_USER_APC); - } + /* Get the current Wait Status */ + WaitStatus = CurrentThread->WaitStatus; + + if (Alertable) { + + /* If the Thread is Alerted, set the Wait Status accordingly */ + if (CurrentThread->Alerted[(int)WaitMode]) { + + CurrentThread->Alerted[(int)WaitMode] = FALSE; + DPRINT("Thread was Alerted\n"); + WaitStatus = STATUS_ALERTED; + + /* If there are User APCs Pending, then we can't really be alertable */ + } else if ((!IsListEmpty(&CurrentThread->ApcState.ApcListHead[UserMode])) && + (WaitMode == UserMode)) { + + DPRINT1("APCs are Pending\n"); + CurrentThread->ApcState.UserApcPending = TRUE; + WaitStatus = STATUS_USER_APC; + } + + /* If there are User APCs Pending and we are waiting in usermode, then we must notify the caller */ + } else if ((CurrentThread->ApcState.UserApcPending) && (WaitMode == UserMode)) { + DPRINT1("APCs are Pending\n"); + WaitStatus = STATUS_USER_APC; + } /* * Check if the wait is (already) satisfied @@ -659,7 +652,7 @@ KeWaitForMultipleObjects(ULONG Count, /* * Set up the wait */ - CurrentThread->WaitStatus = STATUS_UNSUCCESSFUL; + CurrentThread->WaitStatus = WaitStatus;; for (i = 0; i < Count; i++) { From f49c77e03f3645c809c290a7a235ee447009d7a3 Mon Sep 17 00:00:00 2001 From: Thomas Bluemel Date: Thu, 10 Feb 2005 09:22:27 +0000 Subject: [PATCH 169/185] revert the changes to NtCreateEvent and do the real fix svn path=/trunk/; revision=13485 --- reactos/ntoskrnl/ex/sem.c | 41 +++++++++++++++------------------------ 1 file changed, 16 insertions(+), 25 deletions(-) diff --git a/reactos/ntoskrnl/ex/sem.c b/reactos/ntoskrnl/ex/sem.c index ff75f4060da..64c8f7d23d5 100644 --- a/reactos/ntoskrnl/ex/sem.c +++ b/reactos/ntoskrnl/ex/sem.c @@ -91,9 +91,9 @@ NtCreateSemaphore(OUT PHANDLE SemaphoreHandle, HANDLE hSemaphore; KPROCESSOR_MODE PreviousMode; NTSTATUS Status = STATUS_SUCCESS; - + PreviousMode = ExGetPreviousMode(); - + if(PreviousMode == UserMode) { _SEH_TRY @@ -123,42 +123,33 @@ NtCreateSemaphore(OUT PHANDLE SemaphoreHandle, 0, 0, (PVOID*)&Semaphore); - if (!NT_SUCCESS(Status)) + if (NT_SUCCESS(Status)) { KeInitializeSemaphore(Semaphore, InitialCount, MaximumCount); - } - Status = ObInsertObject ((PVOID)Semaphore, + Status = ObInsertObject ((PVOID)Semaphore, NULL, DesiredAccess, 0, NULL, &hSemaphore); - if(NT_SUCCESS(Status)) - { - _SEH_TRY + ObDereferenceObject(Semaphore); + + if(NT_SUCCESS(Status)) { - ObDereferenceObject(Semaphore); - *SemaphoreHandle = hSemaphore; + _SEH_TRY + { + *SemaphoreHandle = hSemaphore; + } + _SEH_HANDLE + { + Status = _SEH_GetExceptionCode(); + } + _SEH_END; } - _SEH_HANDLE - { - Status = _SEH_GetExceptionCode(); - } - _SEH_END; - } else { - _SEH_TRY - { - *SemaphoreHandle = INVALID_HANDLE_VALUE; - } - _SEH_HANDLE - { - Status = _SEH_GetExceptionCode(); - } - _SEH_END; } return Status; From ca15298d31de90e55825b6bb268eb8f2d9e7848b Mon Sep 17 00:00:00 2001 From: Thomas Bluemel Date: Thu, 10 Feb 2005 11:32:06 +0000 Subject: [PATCH 170/185] fixed ObpCaptureObjectAttributes() svn path=/trunk/; revision=13486 --- reactos/ntoskrnl/ex/evtpair.c | 2 +- reactos/ntoskrnl/ob/object.c | 118 +++++++++++++++++++--------------- 2 files changed, 67 insertions(+), 53 deletions(-) diff --git a/reactos/ntoskrnl/ex/evtpair.c b/reactos/ntoskrnl/ex/evtpair.c index ada376adbdf..4e3794194c6 100644 --- a/reactos/ntoskrnl/ex/evtpair.c +++ b/reactos/ntoskrnl/ex/evtpair.c @@ -117,7 +117,7 @@ NtCreateEventPair(OUT PHANDLE EventPairHandle, } } - Status = ObCreateObject(ExGetPreviousMode(), + Status = ObCreateObject(PreviousMode, ExEventPairObjectType, ObjectAttributes, PreviousMode, diff --git a/reactos/ntoskrnl/ob/object.c b/reactos/ntoskrnl/ob/object.c index a0023bc827a..b065b353377 100644 --- a/reactos/ntoskrnl/ob/object.c +++ b/reactos/ntoskrnl/ob/object.c @@ -47,24 +47,16 @@ ObpCaptureObjectAttributes(IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL, { OBJECT_ATTRIBUTES AttributesCopy; NTSTATUS Status = STATUS_SUCCESS; - + /* at least one output parameter must be != NULL! */ - ASSERT(((ULONG_PTR)CapturedObjectAttributes ^ (ULONG_PTR)ObjectName) != 0); - + ASSERT(CapturedObjectAttributes != NULL || ObjectName != NULL); + if(ObjectAttributes == NULL) { -failbasiccleanup: - if(ObjectName != NULL) - { - RtlInitUnicodeString(ObjectName, NULL); - } - if(CapturedObjectAttributes != NULL) - { - RtlZeroMemory(CapturedObjectAttributes, sizeof(CAPTURED_OBJECT_ATTRIBUTES)); - } - return Status; /* STATUS_SUCCESS */ + /* we're going to return STATUS_SUCCESS! */ + goto failbasiccleanup; } - + if(AccessMode != KernelMode) { _SEH_TRY @@ -80,21 +72,30 @@ failbasiccleanup: Status = _SEH_GetExceptionCode(); } _SEH_END; - + if(!NT_SUCCESS(Status)) { - return Status; + DPRINT1("ObpCaptureObjectAttributes failed to probe object attributes\n"); + goto failbasiccleanup; } } - else if(AccessMode == KernelMode && !CaptureIfKernel) + else if(!CaptureIfKernel) { - if(ObjectAttributes->Length != sizeof(OBJECT_ATTRIBUTES)) + if(ObjectAttributes->Length == sizeof(OBJECT_ATTRIBUTES)) { - /* we don't have to capture any memory, the caller considers the passed data - as valid */ if(ObjectName != NULL) { - *ObjectName = *ObjectAttributes->ObjectName; + /* we don't have to capture any memory, the caller considers the passed data + as valid */ + if(ObjectAttributes->ObjectName != NULL) + { + *ObjectName = *ObjectAttributes->ObjectName; + } + else + { + ObjectName->Length = ObjectName->MaximumLength = 0; + ObjectName->Buffer = NULL; + } } if(CapturedObjectAttributes != NULL) { @@ -115,7 +116,7 @@ failbasiccleanup: { AttributesCopy = *ObjectAttributes; } - + /* if Length isn't as expected, bail with an invalid parameter status code so the caller knows he passed garbage... */ if(AttributesCopy.Length != sizeof(OBJECT_ATTRIBUTES)) @@ -123,7 +124,7 @@ failbasiccleanup: Status = STATUS_INVALID_PARAMETER; goto failbasiccleanup; } - + if(CapturedObjectAttributes != NULL) { CapturedObjectAttributes->RootDirectory = AttributesCopy.RootDirectory; @@ -147,13 +148,13 @@ failbasiccleanup: CapturedObjectAttributes->SecurityDescriptor = NULL; } } - + if(ObjectName != NULL) { if(AttributesCopy.ObjectName != NULL) { UNICODE_STRING OriginalCopy; - + if(AccessMode != KernelMode) { _SEH_TRY @@ -175,7 +176,7 @@ failbasiccleanup: Status = _SEH_GetExceptionCode(); } _SEH_END; - + if(NT_SUCCESS(Status)) { if(OriginalCopy.Length > 0) @@ -197,6 +198,11 @@ failbasiccleanup: Status = _SEH_GetExceptionCode(); } _SEH_END; + + if(!NT_SUCCESS(Status)) + { + DPRINT1("ObpCaptureObjectAttributes failed to copy the unicode string!\n"); + } } else { @@ -209,29 +215,15 @@ failbasiccleanup: Status = STATUS_OBJECT_NAME_INVALID; } } - - /* handle failure */ - if(!NT_SUCCESS(Status)) + else { -failallocatedcleanup: - if(ObjectName->Buffer) - { - ExFreePool(ObjectName->Buffer); - } - if(CapturedObjectAttributes != NULL) - { - /* cleanup allocated resources */ - SeReleaseSecurityDescriptor(CapturedObjectAttributes->SecurityDescriptor, - AccessMode, - TRUE); - } - goto failbasiccleanup; + DPRINT1("ObpCaptureObjectAttributes failed to probe the object name UNICODE_STRING structure!\n"); } } else /* AccessMode == KernelMode */ { OriginalCopy = *AttributesCopy.ObjectName; - + if(OriginalCopy.Length > 0) { ObjectName->MaximumLength = OriginalCopy.Length + sizeof(WCHAR); @@ -252,22 +244,45 @@ failallocatedcleanup: /* if the caller specified a root directory, there must be an object name! */ Status = STATUS_OBJECT_NAME_INVALID; } - - if(!NT_SUCCESS(Status)) - { - goto failallocatedcleanup; - } } } else { - RtlInitUnicodeString(ObjectName, NULL); + ObjectName->Length = ObjectName->MaximumLength = 0; + ObjectName->Buffer = NULL; } } - + + if(!NT_SUCCESS(Status)) + { + if(ObjectName->Buffer) + { + ExFreePool(ObjectName->Buffer); + } + if(CapturedObjectAttributes != NULL) + { + /* cleanup allocated resources */ + SeReleaseSecurityDescriptor(CapturedObjectAttributes->SecurityDescriptor, + AccessMode, + TRUE); + } + +failbasiccleanup: + if(ObjectName != NULL) + { + ObjectName->Length = ObjectName->MaximumLength = 0; + ObjectName->Buffer = NULL; + } + if(CapturedObjectAttributes != NULL) + { + RtlZeroMemory(CapturedObjectAttributes, sizeof(CAPTURED_OBJECT_ATTRIBUTES)); + } + } + return Status; } + VOID ObpReleaseObjectAttributes(IN PCAPTURED_OBJECT_ATTRIBUTES CapturedObjectAttributes OPTIONAL, IN PUNICODE_STRING ObjectName OPTIONAL, @@ -276,8 +291,7 @@ ObpReleaseObjectAttributes(IN PCAPTURED_OBJECT_ATTRIBUTES CapturedObjectAttribut { /* WARNING - You need to pass the same parameters to this function as you passed to ObpCaptureObjectAttributes() to avoid memory leaks */ - if(AccessMode != KernelMode || - (AccessMode == KernelMode && CaptureIfKernel)) + if(AccessMode != KernelMode || CaptureIfKernel) { if(CapturedObjectAttributes != NULL && CapturedObjectAttributes->SecurityDescriptor != NULL) From a5f97a39da52e1e4b0fcc5ab33fd3d9c7da02a16 Mon Sep 17 00:00:00 2001 From: Thomas Bluemel Date: Thu, 10 Feb 2005 19:38:47 +0000 Subject: [PATCH 171/185] removed obsolete typecast in AllocConsole() svn path=/trunk/; revision=13487 --- reactos/lib/kernel32/misc/console.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/lib/kernel32/misc/console.c b/reactos/lib/kernel32/misc/console.c index 742ee5b185f..4033316d6cf 100644 --- a/reactos/lib/kernel32/misc/console.c +++ b/reactos/lib/kernel32/misc/console.c @@ -1356,7 +1356,7 @@ BOOL STDCALL AllocConsole(VOID) return FALSE; } - Request.Data.AllocConsoleRequest.CtrlDispatcher = (PCONTROLDISPATCHER) &ConsoleControlDispatcher; + Request.Data.AllocConsoleRequest.CtrlDispatcher = ConsoleControlDispatcher; Request.Type = CSRSS_ALLOC_CONSOLE; Status = CsrClientCallServer( &Request, &Reply, sizeof( CSRSS_API_REQUEST ), sizeof( CSRSS_API_REPLY ) ); From a66312aa06b2a5b27238a86267e03371ac6986a9 Mon Sep 17 00:00:00 2001 From: Aleksey Bragin Date: Thu, 10 Feb 2005 22:05:40 +0000 Subject: [PATCH 172/185] Deleted binaries, added ignore svn path=/trunk/; revision=13489 --- reactos/drivers/usb/cromwell/core/usbcore.a | Bin 69120 -> 0 bytes .../drivers/usb/cromwell/core/usbcore.coff | Bin 976 -> 0 bytes reactos/drivers/usb/cromwell/core/usbcore.map | 11539 ---------------- .../usb/cromwell/core/usbcore.nostrip.sys | Bin 81469 -> 0 bytes reactos/drivers/usb/cromwell/core/usbcore.sym | Bin 7904 -> 0 bytes reactos/drivers/usb/cromwell/core/usbcore.sys | Bin 81037 -> 0 bytes 6 files changed, 11539 deletions(-) delete mode 100644 reactos/drivers/usb/cromwell/core/usbcore.a delete mode 100644 reactos/drivers/usb/cromwell/core/usbcore.coff delete mode 100644 reactos/drivers/usb/cromwell/core/usbcore.map delete mode 100644 reactos/drivers/usb/cromwell/core/usbcore.nostrip.sys delete mode 100644 reactos/drivers/usb/cromwell/core/usbcore.sym delete mode 100644 reactos/drivers/usb/cromwell/core/usbcore.sys diff --git a/reactos/drivers/usb/cromwell/core/usbcore.a b/reactos/drivers/usb/cromwell/core/usbcore.a deleted file mode 100644 index 51ee725a9ddac64bd6ed0ec20aba5cddc73c1ff6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 69120 zcmeFa4}4rznLm8Xi*9gC?HVMG?{c#(j+D`Z7Q@) zJ4HJkipb)ME-EPgM@41bs_3sRl^}~+r7F5rB379=(amBOvKq7M6(#q+8^`al28ddBl!&)-#F^SsG^x4i0kf6MQ#?|a_=n}1(>&hrlS zd+N8I_t*aRea7=%>-X%i=lw0eKfmC4#eT2$dfwmZS5md2G1arOv8^K+@9t=7Z*1=D zNOpI&H?HYf<%vrHurk$toA10To@{K1_cV96btOBy)eEtnWOrMK2|{_+wl&8mVQosL zdemzVysl~L?P_YiEuJ(2w8xve8xu|K=AA4eZfjF>-1h}JTiaHpx|@=1ogD@?GBkI0 zu2~mvm&Ad`Yji+&JlVazy|bw$fbn%@Q^#!qsJ^YUC%L{0vGuO(>}~9BTB8wkCy-7G zk955&6;By)Rsukpm4`1~slZEHM_V$wKpmUf+dG>Z!D4~d?sz=--W^}n)`Ox6VlDAv zsKdHDJClux)XL~Wjib4#U7~1AwylXr=U-sZM7;U7Mx?W4U0X{s;h5W-+SUYM%ibMF zDfB=z=VAW28c?FSrEyi;+W1NoS!1euWi;r}*8MKa)!5P&Z?VZ_rnDnr*0H6rvn#Ge z2Ssqjqh%TZ{)gpdqisa4qkO6O6u+yvt+A`Sb7kD-f(5(dYdY7)DfH_m5(=s@nQUwp zC106pZH=Q65$x*hM$KyLXZVSAgoerYYH+XlygZ$l9%~bVnzO74gKA zsV)gnDOa0bx7ys*)Qv{6NLPd|65ZNdLok z!$9EzuPC`SCIsUl)zRM8p$$L0ye@*XH8!f&+#PR9LX88E$=MKQv_HV5+W)$U$9(Kb zbcU;;0KqX(OKJ^Nu^U=Bfxn;y5U;92#ob&bDDE8ZXzA(%PssIkN%^`a=)#)UtHTyu zUDw^zg^>YD7XuG;R~S$rzP66$#?@`Dt!;6LE8Yt zbT()?_0_g2w!iUNQXPJ;1C;u28+MRi*+9@kMRa1J(1duJLy#iS4EY423u-5gK$V4%wZ6nsg&v@h$LZi_dv+iz-?ZU!7p zZ5^5eW>^I;E`!)hYQ6zAy^@Df!YYGy#N#ax_qI5L)J!wkjeIxnXxK33eOYSkg{!i$kxXoO@LLRQLzS02IlW=b zODR*8jUyAQ8cr{s<$3vkBU7qHm~KT}>E4+;l5b8Am9LH^7=3~ZAlBP>3c**7cg>W) zGZM7{H$d6wObC^agazu4jodpvKAxZEIMN$xyyRioSWR|WW%io7OikE>rXU*|wmBgw zUu~s8!pB71Y5lR`5r({UwI{NUr)G?&YR6MGkP{ijJY4_@(|aLN`Ht8~!+2^Y!3SO) zA4f)KVx#E|quzQH$tbccKP4P7g^N{X>T89l$<)sfqBc{%P>30s`dLEE%+${lB9f`U zQHWWY`sMSM_Mz>Uuw;yhMB&~)g>mE zk-nkyh9NJ7^c|G+tOCQ%|Th8$&Sl4UT+5JMLd3m*DpK>Jn;JA8d2Oq2-t*`Q_nwju8A(Q*l4QEasO?kl7eDzo>~CA)Mq^VIHv(vqik z)ZR%yCHqQtl@KYryb4t{yL1@Jooy)35Z||ZpscI}wI+*yQMl(&aWtkOKaPXdcmEq> zUv@A952f@~T1K58$i@b?M@vPN^guO=PJl84l-;>2bvD&mab&6Rz~6{~S9OXQ+0=hdaF zOSEt=6CJ8Vk7^YCx)o zCiYxs`h0;7`l)&<8)LJRi9Kag^^~M)Z#uSDQuUOiimwYN$=KHH;!u>gdH$4ZcJ2ZSX2oBI-M%%K~dX`dNHo=OOsjIAC)nFfBhUuGY4kC zIJWcp>+1v~P|G<%u-s~gsD>xh+%AYO6=jjqvEr$}? zd}p?>hhn2KTWV!FlC2U9nQn6i2Te(24Mw>po1nmwHJ^r8v=~oP%*up^x8Sf(hqY)( zavV$zzFU|p(>w10;iWo|veg*OjM)x%&nuK0BRQ43V(@(NFxI!QY#joTA=}_78c2U1 z13{?cEM5$tca?sFQg5%3m$L1uCm5Mb+n3pVA9xuXx_t}>kb~fCkoJ=<+L|#3qCp8t zHdPFM6^sbbgvL=2r#2(65zK!{0l0*e<~w)9YR4;0#$uGuwgMx>MX}+vF?3IhVzu3+ z`9)Bbve;O(Z=sh&Du&9Kua}}rgWepA_spKMWlUXJYsmU%9YbYqLECBlst zEDOwwbhUNGBXzyAdn3AS6q&7#k@k3N5-*rm!Mk@Rezo2b{5?geM*MxFP+Rer!^>Ll z%lLadep5Vb@EYoypyuLN>;1@KKXn*3E4@?2mBp{&T?PshKKNJ;sut7~?-XS0Y{5PV z>NKJL6_oP*4wUk3#z>P@uh#pgsh)SbP&2Bm--j?NP`_ulwqXZDpI4zYt4jPlGqC)} zddjE7i+E*_rr2`|K&DW5gyDSrJrCSOAR3;l@q5G|5D^b!9}e-X1@c9(`@Wd7r-0oL z`GY`iF^Gozc_3V3@OfBW-e3^rc^b&(5b_%!kA#r_1oB@Yq!Q9~O$o{~1ISwBt1sc1 zK;8-s@sWBUzdp<&!Icg;AP>KaGT{1#{{&Y#C~vWR4z6%8|BCViRyU9k@G#d4pQ|89 zje#|P8Vit~0^~gf$cGA$PXMuxhWyV3$ae~mpB5mw0_0BxNTo)A=%{0jYvOCLpI{=l zT6bKChmNNfAPYmtV!Y`hd{u#(jQme8`*-X)MN=RaQiEzp@nCrL0SL5y2)R-=P_}U zB)kX06o>XzV!fAfn;+TN(An9}ot9YdTd*4^Z)Tq*w7I!><*Ei)Pv}bUB#XTB&jQcqP6UAm z&6F1ntd>UbKH1Y(WVN&l%q=EP>o00oOEI{zi=gc0&%>CiWaC*Fl4SN^I5Hlq)SkU+ z936QTy7L_|kUL^E={e}{$Jo_>2O|I(mtDJgXe+``Z>aQA3uO$3CBYhc#IT{vCow6u zs511&wzAzD{F3@ENpVJm=*GJ$cf__e`CzA(RtC}jruknZ`E5D_%EA|01p>R zl5+}@6wyY9g^;txiPPkLC_$e~!gLH2x#3|=SXh@^P7hcOWroHlP5-~cAsX$S^C zfX*J1?ZM;mAK%a&S8t^n406E0v3E3?jaKf?RhYFKQ-=AI0&eBvR=xGd@CWy!TFjt1A8lB z$O@2$vLt^s!jO7XnQcf~6<}aoy*BG3F%7eUYT+gs+4_Z?5JobW&&*>oMnxLn zG$vMstqL!xkjw$OXr9CZ8kBn8qS(O=*l-}pRc&hB!AyOftOg&H#qgZ1xUytz7RQ%k zyqn%zF7tm|bIiJOv^Lwvu_h-qm;kRYPsc{4Vp(_hXjxQtb1>n((M!ES1>2FriiZj^ zc1J0zw635plNO*dz3aM$TpC%2h6AP2AHD9Q704^I8_Hqh zTyXYBZzLuu96>QtBGcZG5}ETSAXJ;HXfj8o4A3F63?!tZjV54eVl;OxY7I2OWGffV zIpJj`VUd}F!Y)f?ZmYDomNQfUr!n2-QUHr$l_?bUSiinfTw4bFO(e2?5uLF+cT#$w zEInG1I@J^}1ULG*#%`D}(~%eXvqj6CpVHJDeC8>C;`#u#xv+GD4!a%rOIU`gxCUyEp*f+LQ$GI67(EX zC+wTl2}q_||J^<1o^I_TS65$IxS+$z&k*w`N-D;3mm+qgg35sv(uRnXmH!5LSM!!{{sE+AdHX(r?l2kv!Bbut<|hUHai>^jw0vQaKg zV?z!DKn7#78WU2!nJ8@;K_8%T<8?+KSry5|y-uucBP6civUb!+o`F{YX|75o5NV4m zt3R)A(zw>_9<7kw7`7%RvpA+1z#_Enao01iumR&en|ozn_2auz6+0t{8tsVue`ah1 zn@AhErCi3vo1y&W76*%r1j~_H5o~PkKD+oHtD3tHUC>zWSWSkEU`DZyge4>0PLhP( zfIXC2S>i-V9t5kGhn8Z9b#i9+?!gMKB`>esNsXHSqd$HrIqkf+j-~&-y!!EdbD!V+ zVp++bGEZdoVUU%13aQC(r#bVSgq~y16g!ySTYIzaQ$R#pE9W%iu2i8+aa?5Iv}lpj z<6Y%BPWk;J`)BQiO_7<5{;FoQUw|l_%5gN262J@%0B?adz8s)u%2YcVEmQOjelYA8 zv_Xd;i8lBEP_YEnE?g07xv+qg8I57kkXXBo@9wG8s#6QU$QUdZmsW2*1!0idbQu1Y zBx?r`%GhrhW4)t54gOeOVcM`ZyR4S`7-e($2YI^l^Pl_N8LzAv%KQ-Pdb>wY&OAML zkK64llPy2lEtKs<_>o<}in-WC+_CNO(ulY7*`+IMUK!l|rzzNe96gzyRnUrWqr-tJ z4X!}kuNCXu-Q2t^ll@BWV19>b)*Vc@omoi0$Bu0ycb$9)A%1U!_&3R*8g#UGBjmqY zoRB2GfXoKSTe@T0NB>whN$j!|juFjR#g!2m0_CyMKDK#J69)B}Wta`X=45p6a>(_6 zLmJ9)`{`2s2Y-MZkd^jZUn^#-3{#8>AjxP7?)l4ST1=u}fU4xC?6_wKS~b-KMW6!t zTmIKV??&yK5W2Si?4+?Z!A=?-L5)@n^bHtA&QL9!-G{`Y5dpsr5-^CmZPAniJlJb;wqY{D9b?xj13>n*W9dC; z(XpXZDX{-mj}h7kA~B=s^sa>Tbqi$sONX#ynJr8(5GEq^mZ!3S$YgNMrjhtX9lqv@*59upe3>o!DrOvDo1oLUz5-y|R<0{j(&4p=01+ z#KFKAQiP@t7NPhuNEns9HmE#`WJro+T`*pm1Ujnru7hJpIf;2@K(lL(Uw86*n-mW?85i|S{k zW=pk1LL=#?$}{y5=`+!7j^=*(M>CKg%Wsf`M|S5*b-n}vk+ePrzH=)BPQF<<0y6^I z`Y`Bg7II}~ygJix36ON}JTK{-W?82>GQfjKN$syW^@`3hQ!m+{Ok#K$u$jQ5Uf%ZV z%tTX*-dBnaVW7fce85rX&;C@7I*@WXur{Q zeXZDq2xJ&Jp=w|d1*1^xI}b};*e}7HsKLOFML`kBEG&t|C#2jz%;xEj2v%Z%j+Lp7 zAyv--Rrp3}@DV5S6Qftmpl*y|(FD1oS+uiKMyy#am>miAJP=YXQ12$JI;G+;oV|QPxZ6(Br~> zXGmHfVi)bH-uf9ZqRz=cfl~^#_F5Fn!Srw=1UnCqHTo*ew}Vv*y)@q>TJCH>U1SIf zro6N^+L1yr4xt#eMZ^2?E+#3;Ar|FzI`asJHaG}15aucsdvLK;g(Q2=By<6@2rY3m zA|q1hbyE8Ri*M39ONBGNGjvt^X0BwRL?-E*QRvb)=ie15HFTS9lvJl36Iubb^me`l zb3giI4ar~VdQgZrmixv_qOb^}UzC95BT2UXGbJNvds0T`LF?@(&7VCXysF$irYq(U z&u`KZBw8ad)Uf%C23n&k*MYjB3mA25sEcSa02@ooutN-pWdM+Wiv+2yD?$ZPuDOiH zux|hYWA>axxjLV^?l6{{4>xq!$Oh^$`out!ig=NDX+yQqo*`ix4j3p&8;C5x$RmrU zidheGQEV)EC49*^R+U<$CP^`{W;QD7f*J+GyP2YZ!$tww+aajY{0|r}1I>SynH)v4 z#Mz^)2m8#3udCm?|2QcoiN32LH&xQ)FKieS51@y9;x*X&#&r4TN5gUgi-TW6t7o4( z-{5&im3XDoypl>{6{TgRB_&6d)Rau~yZ|z-^f(VY98qr?CINKwrdDh&EA_@FbErBC zk9TAJ)i-*xdm{4B!=~fx7SH=Ed@skZ*5hicQqP0B9KR{vK}T`mq1a2HZov;Lv?xvP zJ=J=rmRZ-!9o6QjI~=tV0^cM){v8yz45lENp0`w}w}HA!sGA&h0vIk6?0Qhj_phLo z@8^zs4CSHN6OK9td3H7Y)_UiGdZ$p|1l1taX~;MY`BF!iR`cmkahd zC{6iKLER{!yomDD@Q%Q`rpB=!)H}pAg%Z9&sGoznMyQ8S^4ALWDU|)KLj4ky#`Za^ z#c00V3T@!_UahwV3rp(vo1oP17okI%wqu}|ioFd>ZzfOSPt$>HHdF+Zy3TUc97l2S zR$c2HwE)yI{HAyd@%K8RF2P^rE40$#-f}bC!w)6k10|53=OF{+p$k#9UqS|XKC&2Z zvqH#nyfJ2l^$`AP`M1NnUj`7@B4ptJOaWg$Fh1H?kg59f_QeiGv0Okya6 zTms}IXty5@Q~8AuLYuA85V8iy3~0Uj;-vvRzYC=fl-FkPWDSp&7p(yA2_YW_@pjGV96^QVQ00gb;4@ zZV4eXfZT5o4S7EP%Y~4)0x7Asxj~t41=1fv)&e;S8RX~lJwVv5`x1T($U3wFKJs}W zzX&1U0Ky)?=Xn~)Zd48*`56%Q6pA#e*~t6~v=%*0b$SNBX0(>JA}Lq$WIJ{Xz?@yiJ%3dFGae5u&?yPxgE$iLOk1nw4k+8o`_`7lkIu1^Drgph9nVNKzq zJkJy$0|f|HM<@820ztyz)D$46Qdsk7T;~)Z(E{YE0%S!2(pi9PEI{sdh%M!h6(CrS*ln?JvpLu(JwA}6gAlQ}f?G`F>#n}W3TX|3NF2u~mzGdtrZ*TRTF9ZntV z*<4Sq@31tyb;sqF4>bmcVPU6ZY~lH3m<{6uF8B~kW4t49!;HipzIev@Xbj%s@OoZE zgZyLC(8+jm>X>i5;DQ&sC@p82J8%HE@!j$6PIe)lUbfNN)(svXq|IF6wKlxo1UKK9 zyC7Ixavw_|MkLzBC^Q4I2e=#mFW!X1s|M8Q59$X4Nfeki?~HC@T|YRf5+9`X(! za&$Fyw3+Kc63y;9A7`JquCv?RsbjC%@dN*R-0l-R0$*@GK5T(mXrW0xnsCVrO9ka> zZ^j53fiibO*Q^8p(F)YRndSh99sm$F@&b>8v?pp6W{|v62@b}_yy94(M$n{@i zCpUyB&6Yk^Nc4EnObtxdh72^$sKk&)7Oci-{(!}*(cA%bfLLp79x05AH|zmc=6(%Eq*m8{OY@6;ml7)>_H!V0kehojT+H+H=3Wg3C0a^D zCmd4Ee}JbKHLKPhB2hPn5~W!+4WVK2hpRlg-!NB$m*uC(IJW8a%)D%yrCAF2O;QxM zhr*Y$RuYVAMG|`qSbQ7KeT(_Ow`TD3w3czD^bti(rglpiAuooQbGI2c9?plYO;Qfz zbD65XLCDI?maT|e>1-7Hnphf?-%CR5a9EYJtGmX}p!?l}nOos3*oSpQl|R@$qwTes{l^og9&uu!HG zLv{Z47P>)GBx#j7PW`3T&|`fSgNFkUMT5yT_Q}Wk`v&0uPW<2lhqv9Xgyx29grKp~ zWmO5(t~1v--|%dX-~WMXx)+f{8@V|=-qmZ$mD~u-Hhakh;(AB!fcU_D4bv=o$ zsM7xh&)F@mf9u6q|GYS2M&9l5?nqNRFa22`Y3slVy!dp_@x;5kJG&!T4(Y-%n+Rqm zo!#p(;dJgDosqV4IwKrBc6Rhcn$}`C#vAeiK|ltCkE0xsRya=gX18Fi79yUEU#<7A z_&Wo?Dc(LuaSiEA{A#@chyBJ;zXPSNr$7tT?`e+Wc`tRnz+sCV6?LvJJM7Pn;sjRx z9tKK7u5r{c&h>hS-R!6p&h<8j@pQX}l5(zd(D0vu6x4b*f>PHeP;&)a2kLZCQ@kyp z<_Pv}P!Xa271Sx>ItJ>Ef=$Qj+i61012tPHt{l%2>X)ES6{_e;rO^#AxToAuC5W>W zIaBPxGKRMhjO2kJc$gy2vlVG<>y&HkZgdEFF2;{*-@dQ60cj5*Hvw52LOAQ)7DBcF zxi^IT1CS4gkWT}7ID~v1$QMJ%_kipQAp=03HV6s~&&&AXb`T?TaP-HlDJwY)V=(5q z{}is#_->XeT%)lr{{Mw*G#~UG1JqOq5?(i%QGm=VKrSsnt|>rn0b(D`jrIcMjsk?M zqV`c=4;LU@@zlqzr1TdcG|UV0165oSx-wsfzROQ|qJ#>^TQ6>4MW2{##V10?R6<=tR<`&iH&S59`Ox^abXYkSiw%=m2> zXh~f-ZJn5*XC68N+0JG&QT*kOVJg+s6oPX~8g%eKiMeu_BMK_)Nzyie}8VC=CQBdHTo~IDt&IVf;oAUhs(` zNNa>|uXHlk6=4^hqh0h>i3j1uUfqNxbPUfb5AXBLH4u0Qpw|^)^jGwnCXB*XxA6Xj z;LQ>ddr8g{I%+x`0qM;W!60>DsJ^jlZ;w3LJC#ngfo%LA1yZKtw~Jmo5WUz5mRZOh zceEAyCuU2n;zq)zJQ#kUB&Peypn6|MQG>;vnZUVuf`86{$4Yi>Aqa3MN z3mP3%r+3Y2$Vo6}UkFuFza$4zv-AAI>-jl13YH&qxuMW9{MHOm{S@1{HROJe=d;0ZE~wm+jk$ zH?i0{c-Af%@d?0Ql1bUZu&Yo0lHsKnRzTVP@N!X}|>6w<3cM zGuYPbHC3CR_WH)h$>7QYIRizgf+_BZHMg}YUfU2dTaBmn1TeOQN%x%TPYV-;jA()Aj|(y#84l4tx(A>H?{Q@26<(* z5|iOk8zqW}Mczd-rQFpTF4y9CQDbTTG(FUUwUgGY*UCi&=r^LmE6*jDx;mogAz{0h zlv1%Vp>&5$Oe3_u;arY~XB%b?@JBtu`775H zTuv#{y*26~67X*o_dG|Je&p(%v>C{KrYOqShK`B8tXm-ypW4)oClV} z$Kan!sglfS+%{LUma?wXki_Qm0Gv@24B-j}$_30}qo#goX0|*6)z)B;iMWew9DB#c zycp-BCBWzKm(@d0z%GhCSAF+3ASmxL+!B^U)AOi?kcoXJ8+#7#52rUgEN5gN#u?d% zaYi<~^fTXJDBG{AoSIqopmIHsUG_j`+5PDa_Y3d+;JqKbIGd7P`oP@X+1P{6j>|pjFTEvSj=$GzU;3qN?9pwsH^tpyt!RZH8LmhzyN4;s?1MZ{LRuPVM z)`i+4F#BD;r3Y5XdM8T|_YL7h{vS|3a4V!ew&|DP`w->eMUwSZwq{9P-Y9n}Nt=j# z%%NSdrkgy?f!c|8|1`%vJk1dT7iMDjWMlWJ^=8>xv|R^L`c`Yv$NO3<`GB@g)cj#E zSv7x%9%7JdieCMMG$cL)S+VAewBzCfIRuVqL6_$?gBz=d%$^1Y$vYV9=LBBMgEsAQ zTr<>& zCE>wI8^==<;z5^Y!ok6s3naI6{K5Wg^Y3=4E7qtb{L0m3*BI|;M_~Jt*x@Z9kAhHFEtxY^<+$ikCbFaf2w~ z4%9*D+PJyc0bqFvHZca_F4v2)yOR4oOY=Vlxt)zB1?HjcGBEC9S%=O6%Z?8Bp$5U-kFBizEMdk6U;(& zZpbZ{gBR#fhgpptv#YbH#G{OUzbew5yLuz^`Mmf<`#8gO+Ge9De~eM^BeXdK%#H^3 z=2AN7Y-;1RVxw^+vg<(SmSBm`{?Dt;Bml9jm+>8X&=n2*guV9Wa*EFKg_9zcQ|BsZn_Brbp!KO_SpHk0q1EUX9~dM zHDtvQ2K_eIM7;bdy!K-ww7T{wyyD0zj=q=F4E_;S-XsZaf+-Og=u0laOL_JC?gT%F zozNtM{%nDS|O=Uqq)V>#ncSG1kru;9f~4(?v9et+;N7LYw0f7-8rM~Nd7Q2*_1Cb zzohzo@77SELF11;4o4bd;6JpGc1;HJ`DI|jE#fj=9La2bzjOlVVWPFHFVYpl=mM30 zH1`KRy9Bv(=ikl)s|IT%CYeEL1Z?f()}iC2&%x11Tth$8(zuB}l1Isma6FkjS$Hw9 z#J$}p5_G5wEN@j5oZt(NMli^zOY(S{C<%rqJYJaiHR7e-;BbsPY#71Np0_@sLL>%@ zxTAU=lqgO3*}fIbjJ^lKo7qAdWdh+Ub^$;gu<1qrf`iYONuOgeHfbyX={X1QKw+uY z^lP^Ymp}n8)r_<%YNpP(qzmoK1IYFru><2MN@;Zx^qQ*_O~e`&1_tj2$3sNXx-jc< z*d-rEweS`DIZPVupiQJ4&C%=|6$xxy0Zd*b@Nn*YJEU<%dbAF%2RpQ`q1|Lu@CS_` zWrjG6FW9r=(s=GD;W}nC7{5bi!RBQocSd+ZUNLw!GdPwD^aZ$jNnd%H)$eo>OwZWo z7HKx+*IO3b9VA#yk3>~xM>vvuYET*p=ijiUE^~;sEf{-1zYe;JjJ46pqTZ!bD9d1{ z`AKP>a2VLce3i!Rv*|(5^1zyD7Q_=iaxjv+ zP(2xm$A?6e!JFVkl$JxNIx~)XBu_^<#mRBE%mf2R(qSS2U!2qg)_?4da)IUweAbJ0DcvLh^LGLDq%sBd^9vkYph-dXt&=Hi9 zd=Eo|MO&-E>i2V;93~Vh8B3NPk;D2$4HF_-wd$>;!zqwA_rZbin?`ozx^s~RDKK_# zyxEF6S(m$;vB{+h{c@8xicY4f9U?`s%!r1=FCOfLg~0;x29L#GN`WS9{5_YI?`ZE0uHz^ zphQzoB-z;so2`!Z5gwH2ImJYW{eJOa4o)<8rrKLVV#*E4-Knl*geNeZyV~7b3F)*X zwGxMD&xR!z{vlF1UD=Fu)q3|bbwd5rQ8S^qirwU>k2#9>JJU93igz`rON6=(R9r$? z1?nwIp;>*aP)~r;@Xo+G#S+0jQUU8Cp)P|>PLohKfO<2iDPA`y<>T2z#XjM%uRAR7 zsIsY+?_4O@LJ5WE2-WW#=+6}r$D2VZb}K05`x2yI7werTqqXeX#fajk-uYEHfdluC6Cs9VMLV@F_}PpDm> zG~NoF>QhPY1f{OCPb--wfWN?n8Vck23QP*+MQS75ZaRH$1(T_x1BpfuiJfoc)# zj}9w2#$p$NxuOpwx96C_QogFsOwHWs3J%P&Y|<-vXui z{C!aB<5^I&sHpW`ajs*aZWL_lah9(Nl=8hFl;-XMP+A@@gStU{oOHa!E&!$SEd_PG zxbjS&`q&2QYQaA0utz{G6YLwHt`n;41bce^nA;cQH$_TC%P4{Og@Uy^s>@MHQ0k+I?I7%7SOdckCE$bVDL>}8 zKBW$s1&Z?d$k}*fd+qzW2ycAEQV{J#v4=Xt67sDHnL_HQk96YgpF&6)Zv!FZ19+Q_ zIDB891k&sf{nT^!ySQiL^L!0Fb@=%*@4?%8B+BP`1_-|e;Umuh`F0372!uOlKF=S4 zq!6r+R3c`csq~SffczzdoCM@(WIuTj93BoujzOE~`+5tI<3k8%_UDBVru$PNgx?vc zMyu$Dvjxas(1t0({Nd@SRp=#sp8LSVe$z*21^7#}UOw_QATNcGr+~1>^?9BJ!oJr> zehK7qv|m0l2;@ApUOqAo)(JoDz?Ocy0pnTeOOP zI6XizXs>)^6OcEfb@7qAfpE6sBOeA5K`G%sQ&T) zaDg(Ia5!n;Z3v7DB%U$+*NyhVk9{iGBXIG39S5?{@RWv5IUy@y=lTHL-U-To3hi9) zgCmMO@K~!fLK0U=L%>zZphX(nkFt{C0v-ZqA^_HKrb*NF79c26c@&|AKp45L0NGf8 zyuSeXCm{CGkiSrX@Z7U~l;?W|$S(_!;R3{CqRpe>99e)w3XsBc&x;+8E%zG=kd6Xm za{+RH0rJ%X^ZZqfv4gv0>XY(|ivdqEQF_=%=f@b0zYaWLsx*k_U}J z!sr?wvau52J2Szc#T#Z_A>kye2(%KQ{N38LA z?^VV@iozZ#51gBZy!MOUk_?=c_akVLk4PK)cP0{c+5Q^~sDod(R^^EIwk6}xQ)X3H zVtr2=j_+$;@bZ8*N@$AI1_Hf7`g-bMM!!b=Npc;#`JlH5q?zobd)>^@{X^u@f=|j6 zKhUfP)Om&(9+-Il+_<$(51wi!hk8M-ST7R}MVkVo_iK{vm*Z3CP2KUOa=0ow|6Gm5 z=x4mU6<}YLU zmFf z!gJwuz#qnF?MaNU_;6+v^?ZANJDQ=}#HWvZ6YTl#0MmYi7kr`!688K%iHTW;Psx?> z*y__=A|4CpvS8o+;KY_P_sVhrvC1vC|8XmcmYlk3J(Ryf7C}eHyJ~4*dN?|KSv*!- zZvCMm_{@8+-}11B~}N`YWxfcAdwcA1Pg$)4NXQsz>0xq z(vz^+z`7w{B_=)eY8j7&jDWcceksOY5KvM-aqa(2%pBQdALXKWzCkxBaJgTmo+9DS zycu8+D#A&vP_rHeC9#KWe9UG?imi9w}I=9o^W8 zceIg^9AS;F3R$2$G6L(>>+*M414h5@W)rn zkHeQ&%f)yM#s$@Pe@jyFw+FZ2J0f4zaX4dbuDiEcy!Z(Du&;@uDy0`_b5R~P>xW8g zP~0Nn(@X$ib0287ZVr!N`$reb9}x-`5`&vTVYf-7!;bden&5}!Q48KEH{_P)v7OFU zbW|KhH0@OjXx z{;0H5G{LLN-48W_@|YTi($lIgSFW!<= zA)cPdTA_Q@j`gsMx1^NyV-s1YC@c1vHPot$x6m>hhL!6=v73*WqcsNK*!Jk*7uQ#S z>6#FexzoWh9dU8}6fp4_SP%}`c`>5Q%3!K&m3jatBD*qBBUF@l$_(sqMWxM}Xp zXT)p^IWFc$Lk!z?bvxP57%NF0f=CR5Ex6IE7SGsJ9;LTIHfX4)%7%(&&3Spg3Q4Ni z1$So{2>`|zj90eMs-)RKn<2FvCj-WwjF#6)9}N57$H68v?$luC2zv9L2jH2(@_(^~ zo&dp&7WrsDmkq1aB)4^g7&~K6dVQd#2i#-6Q8L3eH`3eWFVsFXoCed2^2-RuyJ-^i z6HE{k0;=8R@;&ymK~h{S7Q@SC%id{>j~p9`)4dTdInTY)q@Kr=)Y8;Xl?*5Jc3;WH z30bZtQ!Z!R4JDcHC0oox=@$9OTjY(W1AbwmbK zqxqH2Fb@5%niGs{TqttbOpRkjJG_C-UG*k>Wo#&57^tR*tUr1^OD?xXOGpi@pFwQtog8C$ z$wt>+K>$Mjp8n8Aeuu#h6o-lpMi}Si9Aro)!z9kPN!O@8!&Z%-0Yp%++`=hR99EPj z3v$~}%@1K94O=Fu)@Zbl7Wve?!!)SxQ|g7@Mw+0w>{8>4Q5aubh}5t#qMDE9X1O=8 zhMNF7pNP$WYak%arH*fWD}fm(qbK|Lg$n2oS|y`DytStfK|4S`Yj&STrftinjc?ok`nks@0=>0m@}&(BOT=+8&BuU*oYCd=9s7BT83B`_g*>*yIBk zWY|VrMx0vlO*3u~R2KXjPG}63Vclkz&y9@2F27=M+=>Lto3RRP+@J}m_uw?}@f+g5@BM3h7 z62*&f(WMwUY(@|(AqTtLQ0|L@`{36mpu@wAy8N4zu zoQhm%iC(aQi$?J<(S8b)>4I@^zhqOLk^iUGC`$UK-cq%6BzI0c(g$5@Mj|LhpllrdY}kE&@NI3tRS)O|A0^?E5InRA?fNE?2ks za&Z27HoG-AZ#sv0H9>&clL+t)P8V72XOyPqNdBM}vZ>c{7EP=mW-ful zWPOjaDDc1sKK21Zt1(zz9eMz$q#|e6uviTXYU9lsO2vct-=;Kz?xPROlF7NI)f(d1 z2H^H6u45qM#P$yZW#rePVyaBEz$4@h43i?_D~OBS_ zOm-4#n%2%? zL_D12tqSLsmaXOx#XB*)m&Bdv|JsWbEohR8Br?|{NMHjMwO8`$%~zIlfZn6b;JZ)ny=2m_{Nj3 z%t#R8OFUQ+a^1)cld+Y#$K}P^2eXyo6Shgg4SG`*e;@vzZelqb>yrrNxRGQ-5;3%GjUjeMv`w8r^lBgik!`fGgDj4ELzT6U{F0++L3*S3*Z}G>@sS0k zmXaR9ARjn&YTK8&U4DHp4yqFg89V zUIeyYN>BWYtdm+RJmPq&VZp#mEXiQs2nv}f;Sg1O?1w`L^_;en3`coZ19^`@%0Odg zh+j6ua}SUYgph}T&`RA8=U;&Q6ao0ivp}XIalXvI0dj&tG6 zjX>Bk`N%myK4cK}6$P>#h2_W2_Tt|{2&X%o`}pCk0n+X4HX(|~y^zyUyZvzP0`g!8 z`5cfvA>>IQ^A8L9`U#LHpfY}3ysPo45b`pRpBRK+w16c7K2dOQ$hNZr$$Kz_90z1^ z$lCL4AYU+u=EkM??+mmqe(W~@`6_C=pDvyv;KMRE{w_$g4np5kiiESW{8ie3{Px!v4vZ@J&EsA)ci` zt`70g2J+qz(hTH*5YhwWQz2vnkf%b(T|mAULOurMM+SlTcpe4vdHbfPR$LTMF}HsEP=I{1 z0C~Cq`BecjT7Vo48%KQ@S8>b9)5APP?`Ea#xgQRx#RbSs1<0xbWJ>|^{sM$wDbq(} z#?`7c;`0$wkA--MJQYHo#T!hkI^x}J&DJ*1zUtMgYJg<1pn07!yD}DqP%&$W74#S~ zg~FFxQeCi4jN@Y4cyn75tPj;&h^w)!wIj8rG1&=18RA_Aha1ez4GMYFk4q z$BA}jzTqPyaSZCgn*GU_X`Gvthqiw(Kub0!6iIX@yV_H$^rgTQ&e))->jb+vdpj;N z3)W%`(d3eHOZ1wN3W%9os=J$(w&72|G&(ald`G9dNiw3ltt;7ydwL}o!)9gvS8{Cd z6HFP64H_->{-)3Ku%B~wa(pp*U=Qu#)^rtUqTO3qhZ>!gs`-476_aT(CUF4^xXFy< z)-=JIGvK8KR~N7EFkh!Jp5*545Epzk_L$-{Ovd9xSo}H=$xT58twpQJc3PjdMC&vL zXK;#SIT|Iuy0bg*PRmo_2bVKSWpK*qAlP>HtVgX81*R8cU`qdjx`1%0Gd|qY4ckM# z(s_bTtLo7xTQjStF}c1AMwpr+ViVH#x|pjLnxlrlzhh-nOLD%^!q?@71vFoAS+Y?* zsH3Kf>NttH=Opk1<+YWmsDWq_A1E_Q6Eev31xa;;TQc4ZjRrx5o5UU!zD)xn2FErF zfQfmj5s*nngW2|Olo{i*g}n+k_q?gwHwvAuDfNv(-ObMDM}yaW#JcshB4;73p_l<#OE~pBAA#3M>)icJyFlM1TE%nu|Du& z-%7VjhKY)u3U+1fcK4!K%|`AzaPesH4h+TN1Pg=;E)T;1^Wb2@U<;?EX8|Wo9!PlC(q1R!$V)GdnmE|a2dP7ag+HNN#H}IWwzZCIRx~o;p z^5k2TC{4aeiIU_3TqH8iWc>9ax(!tP@3xF_c<63Rl19s7H2{iV(xI4(pxfm?ggJr>TC{vG2U}p0;y}4%*MYh0M z^&vDFYDu^<-W95fpe#OPLEPW9SK+{sZK!gW^ECt{ErT0(P?58|;COuSPG~D~-mAWw z2Mp;GtCP{nMfFwHTRyBAAeZv(vkR_{OlWE^Z~usO3I_D4&(Nt11;bY9DFGt>Ys9dKm_ z%9I@_E(|b%Ax2>T=WwL*$3c^i{e~{EJIde3li(@NGv{8k5ppaUL{8hp^}&8L1L%=nZZk> zu^7NTODFjnaXLW}%H<%php=T-!aqUHWF3N>Y8a}yH^>5)DK4*y57sMYj3)GUekIb>VqMr8bRRDl#O9R^Y6Ro|JR1&d@HFIr^=X7SH& z0A~3r>e^fAE^fjt4VV@nvm?yx15%aGEM;axxmhp1PHo@5q^f;*Q?vfP_5}2Z$+>)m8+7zl1 z0j~Xd$?N@1;_ZE#0m&ZfqS(mBIc%NT5RX`k_|5b(zM#}L*Rmg)|Bh+JAEm2x3Y2^> z)Y0m@yTQd^SszPwv8^a8+f3n%X&jr0ioq)ZILWYeYpXpruHV1_mggoh!na%2Y_HiH zRt)|Y$+X86cv<}LqIw)d_!>}Nbz=_}Pz=+@uyB(&NWxajZ#7*TR+``7Eb{^l($L1Y zXW7h5JVtO?Rr-!n*wEADW)g<+WT|cI@G&!9wE9UKdjLl_GPnq>fjAxXJ5Ak{{)z5N zqrveTP6Wn-9_y?VwvL(6wv2*p5;UT3CyT$5jn05rtH27MnxeS$?24}lHbz>z?x9y# zp1~F<%@_j;$k62`tK$)h^Z=$6nHU5;h2*Vq4PZb~C-gLF>Y&6%LS>fN9>FWBGQOVR zcb|Gc6-O-QhI;XfPT-)^JeZmU>qPZ?&XRDdR?{L1HA4*!R+suF2QUd0vzSfCiXl$L zAU7mX8ze`kNDK#qO}(@)!$GO!6NQv&R3!fq(t#qEdlz$uiqcz;K|AD;T?m&=svIVw~#RMZhyuv$?Ya_8B0Nvv650aPuCbq0E; zs7^j^EhUDmNXTl)do~S1`cjdVO-neR8>$N*-1+tTSN42tl zqprULhJ|)u)1hGMnsF3w<50fugJK_5>&?PIRWW{LO?{k?F}Pw6gHr4_ps?@{AKWQd z*ORcjqpt0s)b(B1yHSjLw8{s|0u$T)j=BwdGb#aZ2vTa$QDxYJQS2l~UE(P2*=QU? zpfuhiut%fVB1hc|3L6>->4y%h!0bn{nV>X|H#>?uy^1~QsKUKIGmCCU(1C{&7d|Ck zWYWDp=Eql2M#3Z9XW=hbVu_$o@Vo`T*~lj!X#%nYDOIF!SK&p-dK$gDCph0`sKxdk z3wITq_Yl#GxA01TrU3a!0rF@8@8=`nvPT6{!&mR z@SU$oR)gkWbS_-@@LVvO3q1THBU_we=Ym(DO56pPAyYNzBl7yJ2B9MnOC$Nd%q{xC z1jHum5gezMQ$>s=I(cO(v3sCAz3Y}>f2|j5iWxS2=Xu(eChZ^Q$b(;zwU*O+%-J4| z^$c_*={@D_dUus)y(O5#3&|mv{SYm~Ll8~|IfR(R$;+TmesP2bUSqU*;s!c;urcF> zt0$61F2%^v_0i+xi7m8h~<4YY4_?nAZ+rIA6LJqxB(c6~|cxBtyrAZdN~; z{Wr_fm3k)T;!Ca2h?-hx;+9YXwi(9KhYiUN6ew07fU9v>Zeb+Czlc6a60UEmtEz8$?S#Ga7db4`8hP zLD7MEa*?VgMwb+E@w1m6EvbI*PDv3IW=TL$j$4uMQc};PH#}3)-G#rUYfr~tT5+#L zsGH#<;&~e(CJI+*jtl|iucWnh3Rg*!X&hl~#NbCXFy9QGJ|Mi$T7p2`cR_$=5crSZ zDo_vSf-f6gf;ra)T>U@t!-e@jNDg3yW{FhOoUX%SvCf!$?#C(_hezQ$cqPJ-nd{{e zV6D~m1^TM0EoPuN2ZNgI+iAkK5+hiisNW}t#kBJA#G2maxV5T?0NW=Ae&JO@XW?vrq$#!K4hfgs>IthMZ zponxVz+asQ6xPddZrK|8*VIe402qJ=>fD)lgBex;p;h7O4k@g2bXT1PA{FQI+n(VdTlP&g*+5l!Y@B;`dpx5|! zsYj^JXW{Cp)G9L`eyw^mzivLaNAdVKQMt!Dcb+Y>rjt^ zR$!FmG0efsty&Pk6U9F{_lHq12Dg>D_h8zMjxSWbDsvflmD3$&7#di_9^0tPd04g> zo3O3$3G|xqC7)%RSDO$e+;4u=+ZN*Z!wT(P0>JR|-?T|T^l z!vM2=fuMEhVD4*wtH$U?>f!aWF}H@yTna7rHslW4sKyZ0cU;zEr6h%Ku9dG|QY>Lr zi8+B(4gM#3aPnSRjF*#fJ`WE0Ks$q$ar1pZb+;Mgvh{_77Gl^;3%pR zUGGb5n&73Om>0(HR{GSVL0Wg`a8wDS#)ia$6GFP?5Ft%hKN^S)VDE$gt}PaTN79ikNmiTBCkkER0<*QH zA+b0R4w!Tq8oP+gxFlIty>)=Xg4%Qf{+1-~;NR-^eN<5|86CVA0RXJ5-g>y9HgOem zYW3D1f=Q14<8@l~R<51k76cCRtGAwqmqG4dQB!UylpVDru@25Qvj(p*yp6?qDTU)b z&G4=)&P&s5$NMLy1Tw^n^X?7ue&6sWiu1l0Eml{+H;O;8eG*@Ptp?COKA86GB;kdX z;L!=bIFp#Xbg=&q_lCs&3BEW}oZOd9@#q9!cOTN1Zm2dSW@7LkOxHa{eMvKH3UspO zIYDctU{LQb8kDSPpf5FtbrW|4e3@cih$#9NPD>sy|4(J@+%G*iPTKBg56-T9|3~4G z);xh?U<>((U7=hLO7qCBpj+g8Z>B^3~#ng@b;-gcypgjPCOFu z#e~C1v7P1kxkLK4?ajV`Z~FTDA$?gj90~YxtqqLlFwVxe8Y|@<4u2w!^=Yh($yeWI znJYSQ=VXn)4Xn4_gs-=d!E<@y+mp!y--#Jh!YcBACSyjv;3Ce%c@y||9g=@W;;IS! zyAR1fGjZDl{ym4}k0jnRf&Ym^^3O`}qb$KHvG0QB65H$4)$!X7=j7>A#+fOJL2S{Q1# zL;{Da?b(RV?#P_0mR)&eq~Yo-uDULE&0MfY=A3fMDRUuDBywfEV^uOCOAhYOn)U&mM%JZg5;Imu81WfMY0r!*h9i zQ%}#u*QQn~0dbO@&7JKG3+cg0b@PXDMj{RI?z7zPZ3HKNdV1oLC6UNwsg|}*d&*s0 z)C;blUX$v;jo!Rfx<~z}%aRm6B;}WykvhcE084+E)lUdk@|fAv(-XNC=Wd!-#V2r3 z)+P92l^X2_Bh_pVBFj2%>*!q9VWCj2Ud#fGL{=722xQO#(FeL0(TF!e1TF4JWZiY0 z$)@&jAk5$eqA>7}(sbI(lEf4AzcM7$^-b-mc*wmiU@S_rIt%2Oxq=4A3|Ry@~#WDQuNJmeck5!N=Y(WW4@Tj#;t7uc&>?KO}Z!4>K5=^ ziz8);Kmrh!&x8FV8+hRVi)VLD_s|XmAWMo=nHS0?wL>L1zp4ux{srO z9X+i$=+)ZZw92ZP_2(RQncn!9_$D|two6}wPHei@)SOJ=!v~7EIK@d1h3P%~&IPd{ zZIBV)gpf0ez6+cXV29MB#?ID8^{HZtQyY~qTq5u-PEbyqk;6CoI!w1D!HQEebQ-4~ z1M!d)F`DtIf%Z6>h|nWWXeXY=k2^(EJnkVXwI9@p_|D$aM*rF{mi-k!C|jB%G&Ks@pyZ*hCCCLhJ1>nPIInra#+2?_-#S;!EXyH z^-kydUWeV~un#%xqmKH7bA8HT-*ec{9rnDV4m#IAJB%C6nvTOksVql1>R9J`w!_YI zSkz%LN4?Ft;=q9kk0<&yj_nS6pQG+`uDcxe9f!RIvssnu?T%^yrQzM|Fz%Tv*6px$ zj^adKUEk}lyBx;Zy2kMdM}5Y*@|#2Iy3=8tn=AGMN9}j6&pYg(!(MjSpB=?Hw@StD z5ovfe4tt}+IG0w}dCv7hhh5?@evL@^8XUFExvp?n++j(Ft#=f^Go(^w9Co+E_-#v# z##pMY}8SIajr*U8l)1O;Ha}5#Yv}1A9YyF zQEzjuO%7{ySdYVc9ks!^e!yWLcG#yK_K2gt>|CF6*!LXv3x~bns282>vY&Ahi!Efw-{A|k2~zs4*Ne2+v}+BI@bY* z{l;Pc>99XJYTUWjR@zja=%_kJoexT7i8<_Tj=I{pwmR%Khu!Y5K1bc@Tpw`QLk|10 z!@lOIZ#vf>Iqatnd(mM-j`|PhT8S-OEy2Sb621>CL92RlZZ0GuB zhw)x7^>MAkForVWEqAU-hpl&5#$k6m>K~lzHyyUuQO`Q+MMu#>T_qTESjk~lf+?WX z^&E#SaM)spUE!#!oNKGYZgbe}4(oH&ozC?Ehdt!5uRHA9j(Wnm{@h{DJM7;bHsYxN za;`Pli`UXR29&1lLQu!csOp`dW(u_m)Codu0;N8-Iw}K7{eIA44>;@*hke;mUvsYg z4tvI72ORb*NB!2hzT&VkhwU4+AbJ!&gyUbDiGO_x&!C|*JtleSn za@1Pq`d)|K<*)}F_K>4KfI@fg$yTf63Iqdz8`bX#bX@@=Hu*V&?+fh$C*PlA< zfWw9y_8*RV*||=I4UcL>6)4S(nGQR}QKvcA3mtZe!wRj^f@_DU5az)UPM#8P^3x9$- z(o7$r+s>p`JAD;r`BPZWnf5T_|5iO`gsk7;`bk^AFfz9QVLKS+xw-&(ClLFTdThI1 zA8XXN#}~)jo7TsAyrd-eO?10JL$v!~=oC3|+1)40`3i;=sRYz_*M6(R6- zxg-yh;WT`HF>0>kFsGC8p^t#z_XZ^JnUeWNG2NV`We2k zM_0dZ3;p8o+a;Ru$=mRf)l$GovE(g*S6)7kvo_XQJ{S~u#Wy7RElum(AC;m35GYi! zI|kEeK+t4B&`&TCxDP}A-+2aJe4(x7a9Y2KmXzZ|a?d`G#8q$I0d6(Y)h~O>$sYSX z&XGYT)TA6TEt2BiuvFz`sWOn{1#$q1Ng$Nja=#7JLV-YG1p(`mQ8ss~4WEJCq6x_(*fZrHV7%iZoDo*ccd4il)v6m< zZ7!S!TGJ~Z3FRj#93sN%*{PifRxd^u>i?a(7pVskJt#eT>PZj59K@p#sNeU` z?(A$f;sYE=^6fV}v-8Z(^BYN3`O>AGk#JKQ=XBP2xsYgWaF*{LXdiOQSQN7p8CE-YweX^oe(ZB0(eFm&tN>TQ4(jf)Ya_X>IL(h zN6?ay72VdM98Bca+6UK*D2G(Ap{|ZB08k4jq_|c3xb)>4h%DJG8_887?OV3fx^@?b z*E;mlEIC0&j#uSoFmL6!D?IO~8vNJMZ@H1W&G(P1|KN#*Kw5}JO*OT{(Q{H+o4JcF z-eeTkrLNkU&)o1b-wnsoQcq7WGyr=8uMKMjLL!+QjGY@j?M*u83*{K5ZQ>Y-&>C(r z{6-XOSX@v)zPkhs;d{5B5qz_!9#N+Zngr?=Zr-3}V|yQHkJ!F6+;<@Dg6(UK1`RrE zP|~0RP+WXj28s!KV9-;8Rt)-R(3(Mw$t zmU9l8TLJ147w-&O1L_v;v*CUiZryM@P}KB&9YETbaNDqYb<5bSoR8DIuqk9bX-*j=Ns?$M(?{7u1UHx05qGo_Ec`d=f)sR<3oHsGrIHn7Zzo(fpUI?=J(HOVl!43A>vB^W zGO6x0q(6`i|7D=U3_i4B@Fi6!a>s5=jMvZWJJNjgq3^IOykRMC@GUDZaeQ((DL3P8w4u&Tij2#zN cKfCjqgs#b6j!BwGQ8mFKj_!UJ#8qqemlkqDC;ut1T5L~$N|H)bq z{EysrRr2jp}upQ$=Vfb zw5|{2X^wcUYo;r&nORu}#`V=ud(X`Kc0l}%&UNb@`d{Cg+`{S@dk5@|RH>42SzWTe zMP93M&dDl=6BTY)k*RhJcdq{Z)k%xISMfS5b3(T6NJ0JvD#0+Y|BH=j75}9rJY|pm E3-UySZ2$lO diff --git a/reactos/drivers/usb/cromwell/core/usbcore.map b/reactos/drivers/usb/cromwell/core/usbcore.map deleted file mode 100644 index 7e4bf4cdf13..00000000000 --- a/reactos/drivers/usb/cromwell/core/usbcore.map +++ /dev/null @@ -1,11539 +0,0 @@ - -usbcore.nostrip.sys: file format pei-i386 - -Disassembly of section .text: - -00011000 <__end__>: - 11000: 55 push %ebp - 11001: 89 e5 mov %esp,%ebp - 11003: 83 ec 08 sub $0x8,%esp - 11006: 8b 45 08 mov 0x8(%ebp),%eax - 11009: 8b 40 54 mov 0x54(%eax),%eax - 1100c: 89 45 fc mov %eax,0xfffffffc(%ebp) - 1100f: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 11012: c7 40 04 01 00 00 00 movl $0x1,0x4(%eax) - 11019: 83 ec 0c sub $0xc,%esp - 1101c: ff 75 fc pushl 0xfffffffc(%ebp) - 1101f: e8 41 88 00 00 call 19865 <_my_wake_up> - 11024: 83 c4 10 add $0x10,%esp - 11027: c9 leave - 11028: c3 ret - -00011029 <_usb_start_wait_urb>: - 11029: 55 push %ebp - 1102a: 89 e5 mov %esp,%ebp - 1102c: 83 ec 18 sub $0x18,%esp - 1102f: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) - 11036: 8b 45 08 mov 0x8(%ebp),%eax - 11039: 8d 55 f8 lea 0xfffffff8(%ebp),%edx - 1103c: 89 50 54 mov %edx,0x54(%eax) - 1103f: 83 ec 08 sub $0x8,%esp - 11042: 6a 00 push $0x0 - 11044: ff 75 08 pushl 0x8(%ebp) - 11047: e8 57 71 00 00 call 181a3 <_usb_submit_urb@8> - 1104c: 83 c4 08 add $0x8,%esp - 1104f: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 11052: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) - 11056: 74 19 je 11071 <_usb_start_wait_urb+0x48> - 11058: 83 ec 0c sub $0xc,%esp - 1105b: ff 75 08 pushl 0x8(%ebp) - 1105e: e8 d3 70 00 00 call 18136 <_usb_free_urb@4> - 11063: 83 c4 0c add $0xc,%esp - 11066: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 11069: 89 45 f0 mov %eax,0xfffffff0(%ebp) - 1106c: e9 bd 00 00 00 jmp 1112e <_usb_start_wait_urb+0x105> - 11071: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) - 11075: 74 1f je 11096 <_usb_start_wait_urb+0x6d> - 11077: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) - 1107b: 75 19 jne 11096 <_usb_start_wait_urb+0x6d> - 1107d: 83 ec 0c sub $0xc,%esp - 11080: ff 75 0c pushl 0xc(%ebp) - 11083: e8 ec 87 00 00 call 19874 <_my_schedule_timeout> - 11088: 83 c4 10 add $0x10,%esp - 1108b: 89 45 0c mov %eax,0xc(%ebp) - 1108e: f0 83 44 24 00 00 lock addl $0x0,0x0(%esp,1) - 11094: eb db jmp 11071 <_usb_start_wait_urb+0x48> - 11096: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) - 1109a: 75 64 jne 11100 <_usb_start_wait_urb+0xd7> - 1109c: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) - 110a0: 75 5e jne 11100 <_usb_start_wait_urb+0xd7> - 110a2: 8b 45 08 mov 0x8(%ebp),%eax - 110a5: 83 78 1c 8d cmpl $0xffffff8d,0x1c(%eax) - 110a9: 74 3e je 110e9 <_usb_start_wait_urb+0xc0> - 110ab: 83 ec 04 sub $0x4,%esp - 110ae: 6a 45 push $0x45 - 110b0: 68 00 b0 01 00 push $0x1b000 - 110b5: 68 0a b0 01 00 push $0x1b00a - 110ba: e8 a1 89 00 00 call 19a60 <_DbgPrint> - 110bf: 83 c4 10 add $0x10,%esp - 110c2: ff 75 0c pushl 0xc(%ebp) - 110c5: 8b 45 08 mov 0x8(%ebp),%eax - 110c8: ff 70 1c pushl 0x1c(%eax) - 110cb: 8b 45 08 mov 0x8(%ebp),%eax - 110ce: ff 70 18 pushl 0x18(%eax) - 110d1: 68 14 b0 01 00 push $0x1b014 - 110d6: e8 85 89 00 00 call 19a60 <_DbgPrint> - 110db: 83 c4 10 add $0x10,%esp - 110de: 8b 45 08 mov 0x8(%ebp),%eax - 110e1: 8b 40 1c mov 0x1c(%eax),%eax - 110e4: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 110e7: eb 20 jmp 11109 <_usb_start_wait_urb+0xe0> - 110e9: 83 ec 0c sub $0xc,%esp - 110ec: ff 75 08 pushl 0x8(%ebp) - 110ef: e8 c6 73 00 00 call 184ba <_usb_unlink_urb@4> - 110f4: 83 c4 0c add $0xc,%esp - 110f7: c7 45 f4 92 ff ff ff movl $0xffffff92,0xfffffff4(%ebp) - 110fe: eb 09 jmp 11109 <_usb_start_wait_urb+0xe0> - 11100: 8b 45 08 mov 0x8(%ebp),%eax - 11103: 8b 40 1c mov 0x1c(%eax),%eax - 11106: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 11109: 83 7d 10 00 cmpl $0x0,0x10(%ebp) - 1110d: 74 0b je 1111a <_usb_start_wait_urb+0xf1> - 1110f: 8b 45 10 mov 0x10(%ebp),%eax - 11112: 8b 55 08 mov 0x8(%ebp),%edx - 11115: 8b 52 30 mov 0x30(%edx),%edx - 11118: 89 10 mov %edx,(%eax) - 1111a: 83 ec 0c sub $0xc,%esp - 1111d: ff 75 08 pushl 0x8(%ebp) - 11120: e8 11 70 00 00 call 18136 <_usb_free_urb@4> - 11125: 83 c4 0c add $0xc,%esp - 11128: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 1112b: 89 45 f0 mov %eax,0xfffffff0(%ebp) - 1112e: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 11131: c9 leave - 11132: c3 ret - -00011133 <_usb_internal_control_msg>: - 11133: 55 push %ebp - 11134: 89 e5 mov %esp,%ebp - 11136: 83 ec 18 sub $0x18,%esp - 11139: 83 ec 08 sub $0x8,%esp - 1113c: 6a 00 push $0x0 - 1113e: 6a 00 push $0x0 - 11140: e8 a7 6f 00 00 call 180ec <_usb_alloc_urb@8> - 11145: 83 c4 08 add $0x8,%esp - 11148: 89 45 fc mov %eax,0xfffffffc(%ebp) - 1114b: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) - 1114f: 75 09 jne 1115a <_usb_internal_control_msg+0x27> - 11151: c7 45 f0 f4 ff ff ff movl $0xfffffff4,0xfffffff0(%ebp) - 11158: eb 4d jmp 111a7 <_usb_internal_control_msg+0x74> - 1115a: 6a 00 push $0x0 - 1115c: 68 00 10 01 00 push $0x11000 - 11161: ff 75 18 pushl 0x18(%ebp) - 11164: ff 75 14 pushl 0x14(%ebp) - 11167: ff 75 10 pushl 0x10(%ebp) - 1116a: ff 75 0c pushl 0xc(%ebp) - 1116d: ff 75 08 pushl 0x8(%ebp) - 11170: ff 75 fc pushl 0xfffffffc(%ebp) - 11173: e8 34 00 00 00 call 111ac <_usb_fill_control_urb> - 11178: 83 c4 20 add $0x20,%esp - 1117b: 83 ec 04 sub $0x4,%esp - 1117e: 8d 45 f4 lea 0xfffffff4(%ebp),%eax - 11181: 50 push %eax - 11182: ff 75 1c pushl 0x1c(%ebp) - 11185: ff 75 fc pushl 0xfffffffc(%ebp) - 11188: e8 9c fe ff ff call 11029 <_usb_start_wait_urb> - 1118d: 83 c4 10 add $0x10,%esp - 11190: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 11193: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) - 11197: 79 08 jns 111a1 <_usb_internal_control_msg+0x6e> - 11199: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 1119c: 89 45 f0 mov %eax,0xfffffff0(%ebp) - 1119f: eb 06 jmp 111a7 <_usb_internal_control_msg+0x74> - 111a1: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 111a4: 89 45 f0 mov %eax,0xfffffff0(%ebp) - 111a7: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 111aa: c9 leave - 111ab: c3 ret - -000111ac <_usb_fill_control_urb>: - 111ac: 55 push %ebp - 111ad: 89 e5 mov %esp,%ebp - 111af: 8b 55 08 mov 0x8(%ebp),%edx - 111b2: 8b 45 0c mov 0xc(%ebp),%eax - 111b5: 89 42 14 mov %eax,0x14(%edx) - 111b8: 8b 55 08 mov 0x8(%ebp),%edx - 111bb: 8b 45 10 mov 0x10(%ebp),%eax - 111be: 89 42 18 mov %eax,0x18(%edx) - 111c1: 8b 55 08 mov 0x8(%ebp),%edx - 111c4: 8b 45 14 mov 0x14(%ebp),%eax - 111c7: 89 42 38 mov %eax,0x38(%edx) - 111ca: 8b 55 08 mov 0x8(%ebp),%edx - 111cd: 8b 45 18 mov 0x18(%ebp),%eax - 111d0: 89 42 24 mov %eax,0x24(%edx) - 111d3: 8b 55 08 mov 0x8(%ebp),%edx - 111d6: 8b 45 1c mov 0x1c(%ebp),%eax - 111d9: 89 42 2c mov %eax,0x2c(%edx) - 111dc: 8b 55 08 mov 0x8(%ebp),%edx - 111df: 8b 45 20 mov 0x20(%ebp),%eax - 111e2: 89 42 58 mov %eax,0x58(%edx) - 111e5: 8b 55 08 mov 0x8(%ebp),%edx - 111e8: 8b 45 24 mov 0x24(%ebp),%eax - 111eb: 89 42 54 mov %eax,0x54(%edx) - 111ee: 5d pop %ebp - 111ef: c3 ret - -000111f0 <_usb_control_msg>: - 111f0: 55 push %ebp - 111f1: 89 e5 mov %esp,%ebp - 111f3: 56 push %esi - 111f4: 53 push %ebx - 111f5: 83 ec 20 sub $0x20,%esp - 111f8: 8b 45 10 mov 0x10(%ebp),%eax - 111fb: 8b 55 14 mov 0x14(%ebp),%edx - 111fe: 8b 4d 18 mov 0x18(%ebp),%ecx - 11201: 8b 5d 1c mov 0x1c(%ebp),%ebx - 11204: 8b 75 24 mov 0x24(%ebp),%esi - 11207: 88 45 f7 mov %al,0xfffffff7(%ebp) - 1120a: 88 55 f6 mov %dl,0xfffffff6(%ebp) - 1120d: 66 89 4d f4 mov %cx,0xfffffff4(%ebp) - 11211: 66 89 5d f2 mov %bx,0xfffffff2(%ebp) - 11215: 66 89 75 f0 mov %si,0xfffffff0(%ebp) - 11219: 83 ec 08 sub $0x8,%esp - 1121c: 6a 08 push $0x8 - 1121e: 6a 01 push $0x1 - 11220: e8 0b 88 00 00 call 19a30 <_ExAllocatePool@8> - 11225: 83 c4 08 add $0x8,%esp - 11228: 89 45 ec mov %eax,0xffffffec(%ebp) - 1122b: 83 7d ec 00 cmpl $0x0,0xffffffec(%ebp) - 1122f: 75 09 jne 1123a <_usb_control_msg+0x4a> - 11231: c7 45 e4 f4 ff ff ff movl $0xfffffff4,0xffffffe4(%ebp) - 11238: eb 6a jmp 112a4 <_usb_control_msg+0xb4> - 1123a: 8b 55 ec mov 0xffffffec(%ebp),%edx - 1123d: 8a 45 f6 mov 0xfffffff6(%ebp),%al - 11240: 88 02 mov %al,(%edx) - 11242: 8b 55 ec mov 0xffffffec(%ebp),%edx - 11245: 8a 45 f7 mov 0xfffffff7(%ebp),%al - 11248: 88 42 01 mov %al,0x1(%edx) - 1124b: 8b 55 ec mov 0xffffffec(%ebp),%edx - 1124e: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 11251: 66 89 42 02 mov %ax,0x2(%edx) - 11255: 8b 55 ec mov 0xffffffec(%ebp),%edx - 11258: 66 8b 45 f2 mov 0xfffffff2(%ebp),%ax - 1125c: 66 89 42 04 mov %ax,0x4(%edx) - 11260: 8b 55 ec mov 0xffffffec(%ebp),%edx - 11263: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 11266: 66 89 42 06 mov %ax,0x6(%edx) - 1126a: 83 ec 08 sub $0x8,%esp - 1126d: ff 75 28 pushl 0x28(%ebp) - 11270: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 11273: 25 ff ff 00 00 and $0xffff,%eax - 11278: 50 push %eax - 11279: ff 75 20 pushl 0x20(%ebp) - 1127c: ff 75 ec pushl 0xffffffec(%ebp) - 1127f: ff 75 0c pushl 0xc(%ebp) - 11282: ff 75 08 pushl 0x8(%ebp) - 11285: e8 a9 fe ff ff call 11133 <_usb_internal_control_msg> - 1128a: 83 c4 20 add $0x20,%esp - 1128d: 89 45 e8 mov %eax,0xffffffe8(%ebp) - 11290: 83 ec 0c sub $0xc,%esp - 11293: ff 75 ec pushl 0xffffffec(%ebp) - 11296: e8 a5 87 00 00 call 19a40 <_ExFreePool@4> - 1129b: 83 c4 0c add $0xc,%esp - 1129e: 8b 45 e8 mov 0xffffffe8(%ebp),%eax - 112a1: 89 45 e4 mov %eax,0xffffffe4(%ebp) - 112a4: 8b 45 e4 mov 0xffffffe4(%ebp),%eax - 112a7: 8d 65 f8 lea 0xfffffff8(%ebp),%esp - 112aa: 5b pop %ebx - 112ab: 5e pop %esi - 112ac: 5d pop %ebp - 112ad: c3 ret - -000112ae <_usb_bulk_msg>: - 112ae: 55 push %ebp - 112af: 89 e5 mov %esp,%ebp - 112b1: 83 ec 08 sub $0x8,%esp - 112b4: 83 7d 14 00 cmpl $0x0,0x14(%ebp) - 112b8: 79 09 jns 112c3 <_usb_bulk_msg+0x15> - 112ba: c7 45 f8 ea ff ff ff movl $0xffffffea,0xfffffff8(%ebp) - 112c1: eb 59 jmp 1131c <_usb_bulk_msg+0x6e> - 112c3: 83 ec 08 sub $0x8,%esp - 112c6: 6a 00 push $0x0 - 112c8: 6a 00 push $0x0 - 112ca: e8 1d 6e 00 00 call 180ec <_usb_alloc_urb@8> - 112cf: 83 c4 08 add $0x8,%esp - 112d2: 89 45 fc mov %eax,0xfffffffc(%ebp) - 112d5: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) - 112d9: 75 09 jne 112e4 <_usb_bulk_msg+0x36> - 112db: c7 45 f8 f4 ff ff ff movl $0xfffffff4,0xfffffff8(%ebp) - 112e2: eb 38 jmp 1131c <_usb_bulk_msg+0x6e> - 112e4: 83 ec 04 sub $0x4,%esp - 112e7: 6a 00 push $0x0 - 112e9: 68 00 10 01 00 push $0x11000 - 112ee: ff 75 14 pushl 0x14(%ebp) - 112f1: ff 75 10 pushl 0x10(%ebp) - 112f4: ff 75 0c pushl 0xc(%ebp) - 112f7: ff 75 08 pushl 0x8(%ebp) - 112fa: ff 75 fc pushl 0xfffffffc(%ebp) - 112fd: e8 1f 00 00 00 call 11321 <_usb_fill_bulk_urb> - 11302: 83 c4 20 add $0x20,%esp - 11305: 83 ec 04 sub $0x4,%esp - 11308: ff 75 18 pushl 0x18(%ebp) - 1130b: ff 75 1c pushl 0x1c(%ebp) - 1130e: ff 75 fc pushl 0xfffffffc(%ebp) - 11311: e8 13 fd ff ff call 11029 <_usb_start_wait_urb> - 11316: 83 c4 10 add $0x10,%esp - 11319: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 1131c: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 1131f: c9 leave - 11320: c3 ret - -00011321 <_usb_fill_bulk_urb>: - 11321: 55 push %ebp - 11322: 89 e5 mov %esp,%ebp - 11324: 8b 55 08 mov 0x8(%ebp),%edx - 11327: 8b 45 0c mov 0xc(%ebp),%eax - 1132a: 89 42 14 mov %eax,0x14(%edx) - 1132d: 8b 55 08 mov 0x8(%ebp),%edx - 11330: 8b 45 10 mov 0x10(%ebp),%eax - 11333: 89 42 18 mov %eax,0x18(%edx) - 11336: 8b 55 08 mov 0x8(%ebp),%edx - 11339: 8b 45 14 mov 0x14(%ebp),%eax - 1133c: 89 42 24 mov %eax,0x24(%edx) - 1133f: 8b 55 08 mov 0x8(%ebp),%edx - 11342: 8b 45 18 mov 0x18(%ebp),%eax - 11345: 89 42 2c mov %eax,0x2c(%edx) - 11348: 8b 55 08 mov 0x8(%ebp),%edx - 1134b: 8b 45 1c mov 0x1c(%ebp),%eax - 1134e: 89 42 58 mov %eax,0x58(%edx) - 11351: 8b 55 08 mov 0x8(%ebp),%edx - 11354: 8b 45 20 mov 0x20(%ebp),%eax - 11357: 89 42 54 mov %eax,0x54(%edx) - 1135a: 5d pop %ebp - 1135b: c3 ret - -0001135c <_usb_get_descriptor>: - 1135c: 55 push %ebp - 1135d: 89 e5 mov %esp,%ebp - 1135f: 83 ec 18 sub $0x18,%esp - 11362: 8b 45 0c mov 0xc(%ebp),%eax - 11365: 8b 55 10 mov 0x10(%ebp),%edx - 11368: 88 45 ff mov %al,0xffffffff(%ebp) - 1136b: 88 55 fe mov %dl,0xfffffffe(%ebp) - 1136e: c7 45 f8 05 00 00 00 movl $0x5,0xfffffff8(%ebp) - 11375: 83 ec 04 sub $0x4,%esp - 11378: ff 75 18 pushl 0x18(%ebp) - 1137b: 6a 00 push $0x0 - 1137d: ff 75 14 pushl 0x14(%ebp) - 11380: e8 cb 86 00 00 call 19a50 <_memset> - 11385: 83 c4 10 add $0x10,%esp - 11388: 8d 45 f8 lea 0xfffffff8(%ebp),%eax - 1138b: ff 08 decl (%eax) - 1138d: 83 7d f8 ff cmpl $0xffffffff,0xfffffff8(%ebp) - 11391: 74 69 je 113fc <_usb_get_descriptor+0xa0> - 11393: 83 ec 0c sub $0xc,%esp - 11396: 68 f4 01 00 00 push $0x1f4 - 1139b: 8b 45 18 mov 0x18(%ebp),%eax - 1139e: 25 ff ff 00 00 and $0xffff,%eax - 113a3: 50 push %eax - 113a4: ff 75 14 pushl 0x14(%ebp) - 113a7: 6a 00 push $0x0 - 113a9: b8 00 00 00 00 mov $0x0,%eax - 113ae: 8a 45 ff mov 0xffffffff(%ebp),%al - 113b1: 89 c2 mov %eax,%edx - 113b3: c1 e2 08 shl $0x8,%edx - 113b6: b8 00 00 00 00 mov $0x0,%eax - 113bb: 8a 45 fe mov 0xfffffffe(%ebp),%al - 113be: 01 d0 add %edx,%eax - 113c0: 25 ff ff 00 00 and $0xffff,%eax - 113c5: 50 push %eax - 113c6: 68 80 00 00 00 push $0x80 - 113cb: 6a 06 push $0x6 - 113cd: 6a 00 push $0x0 - 113cf: ff 75 08 pushl 0x8(%ebp) - 113d2: e8 2a 00 00 00 call 11401 <___create_pipe> - 113d7: 83 c4 08 add $0x8,%esp - 113da: 0d 80 00 00 80 or $0x80000080,%eax - 113df: 50 push %eax - 113e0: ff 75 08 pushl 0x8(%ebp) - 113e3: e8 08 fe ff ff call 111f0 <_usb_control_msg> - 113e8: 83 c4 30 add $0x30,%esp - 113eb: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 113ee: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) - 113f2: 7f 08 jg 113fc <_usb_get_descriptor+0xa0> - 113f4: 83 7d f4 e0 cmpl $0xffffffe0,0xfffffff4(%ebp) - 113f8: 74 02 je 113fc <_usb_get_descriptor+0xa0> - 113fa: eb 8c jmp 11388 <_usb_get_descriptor+0x2c> - 113fc: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 113ff: c9 leave - 11400: c3 ret - -00011401 <___create_pipe>: - 11401: 55 push %ebp - 11402: 89 e5 mov %esp,%ebp - 11404: 8b 45 08 mov 0x8(%ebp),%eax - 11407: 8b 00 mov (%eax),%eax - 11409: c1 e0 08 shl $0x8,%eax - 1140c: 8b 55 0c mov 0xc(%ebp),%edx - 1140f: c1 e2 0f shl $0xf,%edx - 11412: 09 d0 or %edx,%eax - 11414: 5d pop %ebp - 11415: c3 ret - -00011416 <_usb_get_string>: - 11416: 55 push %ebp - 11417: 89 e5 mov %esp,%ebp - 11419: 83 ec 08 sub $0x8,%esp - 1141c: 8b 45 0c mov 0xc(%ebp),%eax - 1141f: 8b 55 10 mov 0x10(%ebp),%edx - 11422: 66 89 45 fe mov %ax,0xfffffffe(%ebp) - 11426: 88 55 fd mov %dl,0xfffffffd(%ebp) - 11429: 83 ec 0c sub $0xc,%esp - 1142c: 68 f4 01 00 00 push $0x1f4 - 11431: 8b 45 18 mov 0x18(%ebp),%eax - 11434: 25 ff ff 00 00 and $0xffff,%eax - 11439: 50 push %eax - 1143a: ff 75 14 pushl 0x14(%ebp) - 1143d: 66 8b 45 fe mov 0xfffffffe(%ebp),%ax - 11441: 25 ff ff 00 00 and $0xffff,%eax - 11446: 50 push %eax - 11447: b8 00 00 00 00 mov $0x0,%eax - 1144c: 8a 45 fd mov 0xfffffffd(%ebp),%al - 1144f: 05 00 03 00 00 add $0x300,%eax - 11454: 25 ff ff 00 00 and $0xffff,%eax - 11459: 50 push %eax - 1145a: 68 80 00 00 00 push $0x80 - 1145f: 6a 06 push $0x6 - 11461: 6a 00 push $0x0 - 11463: ff 75 08 pushl 0x8(%ebp) - 11466: e8 96 ff ff ff call 11401 <___create_pipe> - 1146b: 83 c4 08 add $0x8,%esp - 1146e: 0d 80 00 00 80 or $0x80000080,%eax - 11473: 50 push %eax - 11474: ff 75 08 pushl 0x8(%ebp) - 11477: e8 74 fd ff ff call 111f0 <_usb_control_msg> - 1147c: 83 c4 30 add $0x30,%esp - 1147f: c9 leave - 11480: c3 ret - -00011481 <_usb_get_device_descriptor>: - 11481: 55 push %ebp - 11482: 89 e5 mov %esp,%ebp - 11484: 83 ec 08 sub $0x8,%esp - 11487: 83 ec 0c sub $0xc,%esp - 1148a: 6a 12 push $0x12 - 1148c: 8b 45 08 mov 0x8(%ebp),%eax - 1148f: 05 70 01 00 00 add $0x170,%eax - 11494: 50 push %eax - 11495: 6a 00 push $0x0 - 11497: 6a 01 push $0x1 - 11499: ff 75 08 pushl 0x8(%ebp) - 1149c: e8 bb fe ff ff call 1135c <_usb_get_descriptor> - 114a1: 83 c4 20 add $0x20,%esp - 114a4: 89 45 fc mov %eax,0xfffffffc(%ebp) - 114a7: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 114aa: c9 leave - 114ab: c3 ret - -000114ac <_usb_get_status>: - 114ac: 55 push %ebp - 114ad: 89 e5 mov %esp,%ebp - 114af: 83 ec 08 sub $0x8,%esp - 114b2: 83 ec 0c sub $0xc,%esp - 114b5: 68 f4 01 00 00 push $0x1f4 - 114ba: 6a 02 push $0x2 - 114bc: ff 75 14 pushl 0x14(%ebp) - 114bf: 8b 45 10 mov 0x10(%ebp),%eax - 114c2: 25 ff ff 00 00 and $0xffff,%eax - 114c7: 50 push %eax - 114c8: 6a 00 push $0x0 - 114ca: 8b 55 0c mov 0xc(%ebp),%edx - 114cd: b0 80 mov $0x80,%al - 114cf: 09 d0 or %edx,%eax - 114d1: 25 ff 00 00 00 and $0xff,%eax - 114d6: 50 push %eax - 114d7: 6a 00 push $0x0 - 114d9: 6a 00 push $0x0 - 114db: ff 75 08 pushl 0x8(%ebp) - 114de: e8 1e ff ff ff call 11401 <___create_pipe> - 114e3: 83 c4 08 add $0x8,%esp - 114e6: 0d 80 00 00 80 or $0x80000080,%eax - 114eb: 50 push %eax - 114ec: ff 75 08 pushl 0x8(%ebp) - 114ef: e8 fc fc ff ff call 111f0 <_usb_control_msg> - 114f4: 83 c4 30 add $0x30,%esp - 114f7: c9 leave - 114f8: c3 ret - -000114f9 <_usb_set_maxpacket>: - 114f9: 55 push %ebp - 114fa: 89 e5 mov %esp,%ebp - 114fc: 53 push %ebx - 114fd: 83 ec 1c sub $0x1c,%esp - 11500: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) - 11507: 8b 45 08 mov 0x8(%ebp),%eax - 1150a: 8b 80 88 01 00 00 mov 0x188(%eax),%eax - 11510: 8a 40 04 mov 0x4(%eax),%al - 11513: 25 ff 00 00 00 and $0xff,%eax - 11518: 3b 45 f8 cmp 0xfffffff8(%ebp),%eax - 1151b: 0f 8e 49 01 00 00 jle 1166a <_usb_set_maxpacket+0x171> - 11521: 8b 45 08 mov 0x8(%ebp),%eax - 11524: 8b 98 88 01 00 00 mov 0x188(%eax),%ebx - 1152a: 8b 4d f8 mov 0xfffffff8(%ebp),%ecx - 1152d: 89 c8 mov %ecx,%eax - 1152f: c1 e0 02 shl $0x2,%eax - 11532: 01 c8 add %ecx,%eax - 11534: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx - 1153b: 01 d0 add %edx,%eax - 1153d: 01 c0 add %eax,%eax - 1153f: 01 c8 add %ecx,%eax - 11541: c1 e0 02 shl $0x2,%eax - 11544: 03 43 0c add 0xc(%ebx),%eax - 11547: 89 45 f0 mov %eax,0xfffffff0(%ebp) - 1154a: 8b 4d f0 mov 0xfffffff0(%ebp),%ecx - 1154d: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 11550: 8b 50 04 mov 0x4(%eax),%edx - 11553: 89 d0 mov %edx,%eax - 11555: 01 c0 add %eax,%eax - 11557: 01 d0 add %edx,%eax - 11559: c1 e0 03 shl $0x3,%eax - 1155c: 03 01 add (%ecx),%eax - 1155e: 89 45 ec mov %eax,0xffffffec(%ebp) - 11561: 8b 45 ec mov 0xffffffec(%ebp),%eax - 11564: 8b 40 0c mov 0xc(%eax),%eax - 11567: 89 45 e8 mov %eax,0xffffffe8(%ebp) - 1156a: c7 45 e4 00 00 00 00 movl $0x0,0xffffffe4(%ebp) - 11571: 8b 45 ec mov 0xffffffec(%ebp),%eax - 11574: 8a 40 04 mov 0x4(%eax),%al - 11577: 25 ff 00 00 00 and $0xff,%eax - 1157c: 3b 45 e4 cmp 0xffffffe4(%ebp),%eax - 1157f: 0f 8e db 00 00 00 jle 11660 <_usb_set_maxpacket+0x167> - 11585: 8b 55 e4 mov 0xffffffe4(%ebp),%edx - 11588: 89 d0 mov %edx,%eax - 1158a: c1 e0 02 shl $0x2,%eax - 1158d: 01 d0 add %edx,%eax - 1158f: c1 e0 02 shl $0x2,%eax - 11592: 03 45 e8 add 0xffffffe8(%ebp),%eax - 11595: 89 45 e0 mov %eax,0xffffffe0(%ebp) - 11598: 8b 45 e0 mov 0xffffffe0(%ebp),%eax - 1159b: 8a 40 02 mov 0x2(%eax),%al - 1159e: 25 ff 00 00 00 and $0xff,%eax - 115a3: 83 e0 0f and $0xf,%eax - 115a6: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 115a9: 8b 45 e0 mov 0xffffffe0(%ebp),%eax - 115ac: 8a 40 03 mov 0x3(%eax),%al - 115af: 25 ff 00 00 00 and $0xff,%eax - 115b4: 83 e0 03 and $0x3,%eax - 115b7: 85 c0 test %eax,%eax - 115b9: 75 2e jne 115e9 <_usb_set_maxpacket+0xf0> - 115bb: 8b 55 08 mov 0x8(%ebp),%edx - 115be: 8b 4d f4 mov 0xfffffff4(%ebp),%ecx - 115c1: 8b 45 e0 mov 0xffffffe0(%ebp),%eax - 115c4: 66 8b 40 04 mov 0x4(%eax),%ax - 115c8: 25 ff ff 00 00 and $0xffff,%eax - 115cd: 89 44 8a 78 mov %eax,0x78(%edx,%ecx,4) - 115d1: 8b 55 08 mov 0x8(%ebp),%edx - 115d4: 8b 4d f4 mov 0xfffffff4(%ebp),%ecx - 115d7: 8b 45 e0 mov 0xffffffe0(%ebp),%eax - 115da: 66 8b 40 04 mov 0x4(%eax),%ax - 115de: 25 ff ff 00 00 and $0xffff,%eax - 115e3: 89 44 8a 38 mov %eax,0x38(%edx,%ecx,4) - 115e7: eb 6d jmp 11656 <_usb_set_maxpacket+0x15d> - 115e9: 8b 45 e0 mov 0xffffffe0(%ebp),%eax - 115ec: 80 78 02 00 cmpb $0x0,0x2(%eax) - 115f0: 78 33 js 11625 <_usb_set_maxpacket+0x12c> - 115f2: 8b 45 e0 mov 0xffffffe0(%ebp),%eax - 115f5: 66 8b 40 04 mov 0x4(%eax),%ax - 115f9: 89 c1 mov %eax,%ecx - 115fb: 81 e1 ff ff 00 00 and $0xffff,%ecx - 11601: 8b 55 08 mov 0x8(%ebp),%edx - 11604: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 11607: 3b 4c 82 78 cmp 0x78(%edx,%eax,4),%ecx - 1160b: 7e 49 jle 11656 <_usb_set_maxpacket+0x15d> - 1160d: 8b 55 08 mov 0x8(%ebp),%edx - 11610: 8b 4d f4 mov 0xfffffff4(%ebp),%ecx - 11613: 8b 45 e0 mov 0xffffffe0(%ebp),%eax - 11616: 66 8b 40 04 mov 0x4(%eax),%ax - 1161a: 25 ff ff 00 00 and $0xffff,%eax - 1161f: 89 44 8a 78 mov %eax,0x78(%edx,%ecx,4) - 11623: eb 31 jmp 11656 <_usb_set_maxpacket+0x15d> - 11625: 8b 45 e0 mov 0xffffffe0(%ebp),%eax - 11628: 66 8b 40 04 mov 0x4(%eax),%ax - 1162c: 89 c1 mov %eax,%ecx - 1162e: 81 e1 ff ff 00 00 and $0xffff,%ecx - 11634: 8b 55 08 mov 0x8(%ebp),%edx - 11637: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 1163a: 3b 4c 82 38 cmp 0x38(%edx,%eax,4),%ecx - 1163e: 7e 16 jle 11656 <_usb_set_maxpacket+0x15d> - 11640: 8b 55 08 mov 0x8(%ebp),%edx - 11643: 8b 4d f4 mov 0xfffffff4(%ebp),%ecx - 11646: 8b 45 e0 mov 0xffffffe0(%ebp),%eax - 11649: 66 8b 40 04 mov 0x4(%eax),%ax - 1164d: 25 ff ff 00 00 and $0xffff,%eax - 11652: 89 44 8a 38 mov %eax,0x38(%edx,%ecx,4) - 11656: 8d 45 e4 lea 0xffffffe4(%ebp),%eax - 11659: ff 00 incl (%eax) - 1165b: e9 11 ff ff ff jmp 11571 <_usb_set_maxpacket+0x78> - 11660: 8d 45 f8 lea 0xfffffff8(%ebp),%eax - 11663: ff 00 incl (%eax) - 11665: e9 9d fe ff ff jmp 11507 <_usb_set_maxpacket+0xe> - 1166a: 83 c4 1c add $0x1c,%esp - 1166d: 5b pop %ebx - 1166e: 5d pop %ebp - 1166f: c3 ret - -00011670 <_usb_clear_halt>: - 11670: 55 push %ebp - 11671: 89 e5 mov %esp,%ebp - 11673: 57 push %edi - 11674: 56 push %esi - 11675: 53 push %ebx - 11676: 83 ec 0c sub $0xc,%esp - 11679: 8b 45 0c mov 0xc(%ebp),%eax - 1167c: c1 f8 0f sar $0xf,%eax - 1167f: 83 e0 0f and $0xf,%eax - 11682: 89 45 ec mov %eax,0xffffffec(%ebp) - 11685: 8b 45 0c mov 0xc(%ebp),%eax - 11688: c1 e8 07 shr $0x7,%eax - 1168b: 83 e0 01 and $0x1,%eax - 1168e: 85 c0 test %eax,%eax - 11690: 74 09 je 1169b <_usb_clear_halt+0x2b> - 11692: 8d 45 ec lea 0xffffffec(%ebp),%eax - 11695: 81 08 80 00 00 00 orl $0x80,(%eax) - 1169b: 83 ec 0c sub $0xc,%esp - 1169e: 68 f4 01 00 00 push $0x1f4 - 116a3: 6a 00 push $0x0 - 116a5: 6a 00 push $0x0 - 116a7: 8b 45 ec mov 0xffffffec(%ebp),%eax - 116aa: 25 ff ff 00 00 and $0xffff,%eax - 116af: 50 push %eax - 116b0: 6a 00 push $0x0 - 116b2: 6a 02 push $0x2 - 116b4: 6a 01 push $0x1 - 116b6: 6a 00 push $0x0 - 116b8: ff 75 08 pushl 0x8(%ebp) - 116bb: e8 41 fd ff ff call 11401 <___create_pipe> - 116c0: 83 c4 08 add $0x8,%esp - 116c3: 0d 00 00 00 80 or $0x80000000,%eax - 116c8: 50 push %eax - 116c9: ff 75 08 pushl 0x8(%ebp) - 116cc: e8 1f fb ff ff call 111f0 <_usb_control_msg> - 116d1: 83 c4 30 add $0x30,%esp - 116d4: 89 45 f0 mov %eax,0xfffffff0(%ebp) - 116d7: 83 7d f0 00 cmpl $0x0,0xfffffff0(%ebp) - 116db: 79 0b jns 116e8 <_usb_clear_halt+0x78> - 116dd: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 116e0: 89 45 e8 mov %eax,0xffffffe8(%ebp) - 116e3: e9 83 00 00 00 jmp 1176b <_usb_clear_halt+0xfb> - 116e8: 8b 5d 08 mov 0x8(%ebp),%ebx - 116eb: 8b 45 0c mov 0xc(%ebp),%eax - 116ee: c1 e8 07 shr $0x7,%eax - 116f1: 83 f0 01 xor $0x1,%eax - 116f4: 89 c6 mov %eax,%esi - 116f6: 83 e6 01 and $0x1,%esi - 116f9: 8b 7d 08 mov 0x8(%ebp),%edi - 116fc: 8b 45 0c mov 0xc(%ebp),%eax - 116ff: c1 e8 07 shr $0x7,%eax - 11702: 83 f0 01 xor $0x1,%eax - 11705: 89 c2 mov %eax,%edx - 11707: 83 e2 01 and $0x1,%edx - 1170a: 8b 45 0c mov 0xc(%ebp),%eax - 1170d: c1 f8 0f sar $0xf,%eax - 11710: 89 c1 mov %eax,%ecx - 11712: 83 e1 0f and $0xf,%ecx - 11715: b8 01 00 00 00 mov $0x1,%eax - 1171a: d3 e0 shl %cl,%eax - 1171c: f7 d0 not %eax - 1171e: 23 44 97 28 and 0x28(%edi,%edx,4),%eax - 11722: 89 44 b3 28 mov %eax,0x28(%ebx,%esi,4) - 11726: 8b 5d 08 mov 0x8(%ebp),%ebx - 11729: 8b 45 0c mov 0xc(%ebp),%eax - 1172c: c1 e8 07 shr $0x7,%eax - 1172f: 83 f0 01 xor $0x1,%eax - 11732: 89 c6 mov %eax,%esi - 11734: 83 e6 01 and $0x1,%esi - 11737: 8b 7d 08 mov 0x8(%ebp),%edi - 1173a: 8b 45 0c mov 0xc(%ebp),%eax - 1173d: c1 e8 07 shr $0x7,%eax - 11740: 83 f0 01 xor $0x1,%eax - 11743: 89 c2 mov %eax,%edx - 11745: 83 e2 01 and $0x1,%edx - 11748: 8b 45 0c mov 0xc(%ebp),%eax - 1174b: c1 f8 0f sar $0xf,%eax - 1174e: 89 c1 mov %eax,%ecx - 11750: 83 e1 0f and $0xf,%ecx - 11753: b8 01 00 00 00 mov $0x1,%eax - 11758: d3 e0 shl %cl,%eax - 1175a: f7 d0 not %eax - 1175c: 23 44 97 30 and 0x30(%edi,%edx,4),%eax - 11760: 89 44 b3 30 mov %eax,0x30(%ebx,%esi,4) - 11764: c7 45 e8 00 00 00 00 movl $0x0,0xffffffe8(%ebp) - 1176b: 8b 45 e8 mov 0xffffffe8(%ebp),%eax - 1176e: 8d 65 f4 lea 0xfffffff4(%ebp),%esp - 11771: 5b pop %ebx - 11772: 5e pop %esi - 11773: 5f pop %edi - 11774: 5d pop %ebp - 11775: c3 ret - -00011776 <_usb_set_interface>: - 11776: 55 push %ebp - 11777: 89 e5 mov %esp,%ebp - 11779: 57 push %edi - 1177a: 56 push %esi - 1177b: 53 push %ebx - 1177c: 83 ec 3c sub $0x3c,%esp - 1177f: 8b 45 08 mov 0x8(%ebp),%eax - 11782: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax - 11788: 8b 40 20 mov 0x20(%eax),%eax - 1178b: 8b 40 1c mov 0x1c(%eax),%eax - 1178e: 89 45 e0 mov %eax,0xffffffe0(%ebp) - 11791: 83 ec 08 sub $0x8,%esp - 11794: ff 75 0c pushl 0xc(%ebp) - 11797: ff 75 08 pushl 0x8(%ebp) - 1179a: e8 d6 44 00 00 call 15c75 <_usb_ifnum_to_if> - 1179f: 83 c4 10 add $0x10,%esp - 117a2: 89 45 f0 mov %eax,0xfffffff0(%ebp) - 117a5: 83 7d f0 00 cmpl $0x0,0xfffffff0(%ebp) - 117a9: 75 0c jne 117b7 <_usb_set_interface+0x41> - 117ab: c7 45 d4 ea ff ff ff movl $0xffffffea,0xffffffd4(%ebp) - 117b2: e9 85 02 00 00 jmp 11a3c <_usb_set_interface+0x2c6> - 117b7: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 117ba: 83 78 08 01 cmpl $0x1,0x8(%eax) - 117be: 75 0c jne 117cc <_usb_set_interface+0x56> - 117c0: c7 45 d4 00 00 00 00 movl $0x0,0xffffffd4(%ebp) - 117c7: e9 70 02 00 00 jmp 11a3c <_usb_set_interface+0x2c6> - 117cc: 83 7d 10 00 cmpl $0x0,0x10(%ebp) - 117d0: 78 0d js 117df <_usb_set_interface+0x69> - 117d2: 8b 55 f0 mov 0xfffffff0(%ebp),%edx - 117d5: 8b 45 10 mov 0x10(%ebp),%eax - 117d8: 3b 42 08 cmp 0x8(%edx),%eax - 117db: 73 02 jae 117df <_usb_set_interface+0x69> - 117dd: eb 0c jmp 117eb <_usb_set_interface+0x75> - 117df: c7 45 d4 ea ff ff ff movl $0xffffffea,0xffffffd4(%ebp) - 117e6: e9 51 02 00 00 jmp 11a3c <_usb_set_interface+0x2c6> - 117eb: 83 ec 0c sub $0xc,%esp - 117ee: 68 f4 01 00 00 push $0x1f4 - 117f3: 6a 00 push $0x0 - 117f5: 6a 00 push $0x0 - 117f7: 8b 45 0c mov 0xc(%ebp),%eax - 117fa: 25 ff ff 00 00 and $0xffff,%eax - 117ff: 50 push %eax - 11800: 8b 4d f0 mov 0xfffffff0(%ebp),%ecx - 11803: 8b 55 10 mov 0x10(%ebp),%edx - 11806: 89 d0 mov %edx,%eax - 11808: 01 c0 add %eax,%eax - 1180a: 01 d0 add %edx,%eax - 1180c: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx - 11813: 8b 01 mov (%ecx),%eax - 11815: 8a 44 02 03 mov 0x3(%edx,%eax,1),%al - 11819: 25 ff 00 00 00 and $0xff,%eax - 1181e: 50 push %eax - 1181f: 6a 01 push $0x1 - 11821: 6a 0b push $0xb - 11823: 6a 00 push $0x0 - 11825: ff 75 08 pushl 0x8(%ebp) - 11828: e8 d4 fb ff ff call 11401 <___create_pipe> - 1182d: 83 c4 08 add $0x8,%esp - 11830: 0d 00 00 00 80 or $0x80000000,%eax - 11835: 50 push %eax - 11836: ff 75 08 pushl 0x8(%ebp) - 11839: e8 b2 f9 ff ff call 111f0 <_usb_control_msg> - 1183e: 83 c4 30 add $0x30,%esp - 11841: 89 45 e4 mov %eax,0xffffffe4(%ebp) - 11844: 83 7d e4 00 cmpl $0x0,0xffffffe4(%ebp) - 11848: 79 0b jns 11855 <_usb_set_interface+0xdf> - 1184a: 8b 45 e4 mov 0xffffffe4(%ebp),%eax - 1184d: 89 45 d4 mov %eax,0xffffffd4(%ebp) - 11850: e9 e7 01 00 00 jmp 11a3c <_usb_set_interface+0x2c6> - 11855: 8b 4d f0 mov 0xfffffff0(%ebp),%ecx - 11858: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 1185b: 8b 50 04 mov 0x4(%eax),%edx - 1185e: 89 d0 mov %edx,%eax - 11860: 01 c0 add %eax,%eax - 11862: 01 d0 add %edx,%eax - 11864: c1 e0 03 shl $0x3,%eax - 11867: 03 01 add (%ecx),%eax - 11869: 89 45 ec mov %eax,0xffffffec(%ebp) - 1186c: c7 45 e8 00 00 00 00 movl $0x0,0xffffffe8(%ebp) - 11873: 8b 45 ec mov 0xffffffec(%ebp),%eax - 11876: 8a 40 04 mov 0x4(%eax),%al - 11879: 25 ff 00 00 00 and $0xff,%eax - 1187e: 3b 45 e8 cmp 0xffffffe8(%ebp),%eax - 11881: 0f 8e 96 00 00 00 jle 1191d <_usb_set_interface+0x1a7> - 11887: 8b 4d ec mov 0xffffffec(%ebp),%ecx - 1188a: 8b 55 e8 mov 0xffffffe8(%ebp),%edx - 1188d: 89 d0 mov %edx,%eax - 1188f: c1 e0 02 shl $0x2,%eax - 11892: 01 d0 add %edx,%eax - 11894: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx - 1189b: 8b 41 0c mov 0xc(%ecx),%eax - 1189e: 8a 44 02 02 mov 0x2(%edx,%eax,1),%al - 118a2: 88 45 df mov %al,0xffffffdf(%ebp) - 118a5: 0f be 45 df movsbl 0xffffffdf(%ebp),%eax - 118a9: f7 d0 not %eax - 118ab: c1 e8 1f shr $0x1f,%eax - 118ae: 89 45 d8 mov %eax,0xffffffd8(%ebp) - 118b1: 83 7d e0 00 cmpl $0x0,0xffffffe0(%ebp) - 118b5: 74 17 je 118ce <_usb_set_interface+0x158> - 118b7: 83 ec 08 sub $0x8,%esp - 118ba: b8 00 00 00 00 mov $0x0,%eax - 118bf: 8a 45 df mov 0xffffffdf(%ebp),%al - 118c2: 50 push %eax - 118c3: ff 75 08 pushl 0x8(%ebp) - 118c6: 8b 45 e0 mov 0xffffffe0(%ebp),%eax - 118c9: ff d0 call *%eax - 118cb: 83 c4 10 add $0x10,%esp - 118ce: 8d 45 df lea 0xffffffdf(%ebp),%eax - 118d1: 80 20 0f andb $0xf,(%eax) - 118d4: b8 00 00 00 00 mov $0x0,%eax - 118d9: 8a 45 df mov 0xffffffdf(%ebp),%al - 118dc: 89 45 d0 mov %eax,0xffffffd0(%ebp) - 118df: 8b 45 d0 mov 0xffffffd0(%ebp),%eax - 118e2: c1 e0 02 shl $0x2,%eax - 118e5: 89 45 d0 mov %eax,0xffffffd0(%ebp) - 118e8: 83 7d d8 00 cmpl $0x0,0xffffffd8(%ebp) - 118ec: 74 0f je 118fd <_usb_set_interface+0x187> - 118ee: 8b 55 d0 mov 0xffffffd0(%ebp),%edx - 118f1: 03 55 08 add 0x8(%ebp),%edx - 118f4: 89 55 cc mov %edx,0xffffffcc(%ebp) - 118f7: 83 45 cc 78 addl $0x78,0xffffffcc(%ebp) - 118fb: eb 0d jmp 1190a <_usb_set_interface+0x194> - 118fd: 8b 45 d0 mov 0xffffffd0(%ebp),%eax - 11900: 03 45 08 add 0x8(%ebp),%eax - 11903: 89 45 cc mov %eax,0xffffffcc(%ebp) - 11906: 83 45 cc 38 addl $0x38,0xffffffcc(%ebp) - 1190a: 8b 55 cc mov 0xffffffcc(%ebp),%edx - 1190d: c7 02 00 00 00 00 movl $0x0,(%edx) - 11913: 8d 45 e8 lea 0xffffffe8(%ebp),%eax - 11916: ff 00 incl (%eax) - 11918: e9 56 ff ff ff jmp 11873 <_usb_set_interface+0xfd> - 1191d: 8b 55 f0 mov 0xfffffff0(%ebp),%edx - 11920: 8b 45 10 mov 0x10(%ebp),%eax - 11923: 89 42 04 mov %eax,0x4(%edx) - 11926: 8b 4d f0 mov 0xfffffff0(%ebp),%ecx - 11929: 8b 55 10 mov 0x10(%ebp),%edx - 1192c: 89 d0 mov %edx,%eax - 1192e: 01 c0 add %eax,%eax - 11930: 01 d0 add %edx,%eax - 11932: c1 e0 03 shl $0x3,%eax - 11935: 03 01 add (%ecx),%eax - 11937: 89 45 ec mov %eax,0xffffffec(%ebp) - 1193a: c7 45 e8 00 00 00 00 movl $0x0,0xffffffe8(%ebp) - 11941: 8b 45 ec mov 0xffffffec(%ebp),%eax - 11944: 8a 40 04 mov 0x4(%eax),%al - 11947: 25 ff 00 00 00 and $0xff,%eax - 1194c: 3b 45 e8 cmp 0xffffffe8(%ebp),%eax - 1194f: 0f 8e e0 00 00 00 jle 11a35 <_usb_set_interface+0x2bf> - 11955: 8b 4d ec mov 0xffffffec(%ebp),%ecx - 11958: 8b 55 e8 mov 0xffffffe8(%ebp),%edx - 1195b: 89 d0 mov %edx,%eax - 1195d: c1 e0 02 shl $0x2,%eax - 11960: 01 d0 add %edx,%eax - 11962: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx - 11969: 8b 41 0c mov 0xc(%ecx),%eax - 1196c: 8a 44 02 02 mov 0x2(%edx,%eax,1),%al - 11970: 88 45 df mov %al,0xffffffdf(%ebp) - 11973: 0f be 45 df movsbl 0xffffffdf(%ebp),%eax - 11977: f7 d0 not %eax - 11979: c1 e8 1f shr $0x1f,%eax - 1197c: 89 45 d8 mov %eax,0xffffffd8(%ebp) - 1197f: 8d 45 df lea 0xffffffdf(%ebp),%eax - 11982: 80 20 0f andb $0xf,(%eax) - 11985: 8b 5d 08 mov 0x8(%ebp),%ebx - 11988: 8b 75 d8 mov 0xffffffd8(%ebp),%esi - 1198b: 8b 7d 08 mov 0x8(%ebp),%edi - 1198e: 8b 55 d8 mov 0xffffffd8(%ebp),%edx - 11991: b9 00 00 00 00 mov $0x0,%ecx - 11996: 8a 4d df mov 0xffffffdf(%ebp),%cl - 11999: b8 01 00 00 00 mov $0x1,%eax - 1199e: d3 e0 shl %cl,%eax - 119a0: f7 d0 not %eax - 119a2: 23 44 97 28 and 0x28(%edi,%edx,4),%eax - 119a6: 89 44 b3 28 mov %eax,0x28(%ebx,%esi,4) - 119aa: b8 00 00 00 00 mov $0x0,%eax - 119af: 8a 45 df mov 0xffffffdf(%ebp),%al - 119b2: 89 45 c8 mov %eax,0xffffffc8(%ebp) - 119b5: 8b 45 c8 mov 0xffffffc8(%ebp),%eax - 119b8: c1 e0 02 shl $0x2,%eax - 119bb: 89 45 c8 mov %eax,0xffffffc8(%ebp) - 119be: 83 7d d8 00 cmpl $0x0,0xffffffd8(%ebp) - 119c2: 74 0f je 119d3 <_usb_set_interface+0x25d> - 119c4: 8b 55 c8 mov 0xffffffc8(%ebp),%edx - 119c7: 03 55 08 add 0x8(%ebp),%edx - 119ca: 89 55 c4 mov %edx,0xffffffc4(%ebp) - 119cd: 83 45 c4 78 addl $0x78,0xffffffc4(%ebp) - 119d1: eb 0d jmp 119e0 <_usb_set_interface+0x26a> - 119d3: 8b 45 c8 mov 0xffffffc8(%ebp),%eax - 119d6: 03 45 08 add 0x8(%ebp),%eax - 119d9: 89 45 c4 mov %eax,0xffffffc4(%ebp) - 119dc: 83 45 c4 38 addl $0x38,0xffffffc4(%ebp) - 119e0: 8b 4d ec mov 0xffffffec(%ebp),%ecx - 119e3: 8b 55 e8 mov 0xffffffe8(%ebp),%edx - 119e6: 89 d0 mov %edx,%eax - 119e8: c1 e0 02 shl $0x2,%eax - 119eb: 01 d0 add %edx,%eax - 119ed: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx - 119f4: 8b 41 0c mov 0xc(%ecx),%eax - 119f7: 66 8b 44 02 04 mov 0x4(%edx,%eax,1),%ax - 119fc: 25 ff ff 00 00 and $0xffff,%eax - 11a01: 8b 55 c4 mov 0xffffffc4(%ebp),%edx - 11a04: 89 02 mov %eax,(%edx) - 11a06: 8b 5d 08 mov 0x8(%ebp),%ebx - 11a09: 8b 75 d8 mov 0xffffffd8(%ebp),%esi - 11a0c: 8b 7d 08 mov 0x8(%ebp),%edi - 11a0f: 8b 55 d8 mov 0xffffffd8(%ebp),%edx - 11a12: b9 00 00 00 00 mov $0x0,%ecx - 11a17: 8a 4d df mov 0xffffffdf(%ebp),%cl - 11a1a: b8 01 00 00 00 mov $0x1,%eax - 11a1f: d3 e0 shl %cl,%eax - 11a21: f7 d0 not %eax - 11a23: 23 44 97 30 and 0x30(%edi,%edx,4),%eax - 11a27: 89 44 b3 30 mov %eax,0x30(%ebx,%esi,4) - 11a2b: 8d 45 e8 lea 0xffffffe8(%ebp),%eax - 11a2e: ff 00 incl (%eax) - 11a30: e9 0c ff ff ff jmp 11941 <_usb_set_interface+0x1cb> - 11a35: c7 45 d4 00 00 00 00 movl $0x0,0xffffffd4(%ebp) - 11a3c: 8b 45 d4 mov 0xffffffd4(%ebp),%eax - 11a3f: 8d 65 f4 lea 0xfffffff4(%ebp),%esp - 11a42: 5b pop %ebx - 11a43: 5e pop %esi - 11a44: 5f pop %edi - 11a45: 5d pop %ebp - 11a46: c3 ret - -00011a47 <_usb_set_configuration>: - 11a47: 55 push %ebp - 11a48: 89 e5 mov %esp,%ebp - 11a4a: 83 ec 18 sub $0x18,%esp - 11a4d: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) - 11a54: 8b 45 08 mov 0x8(%ebp),%eax - 11a57: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax - 11a5d: 8b 40 20 mov 0x20(%eax),%eax - 11a60: 8b 40 1c mov 0x1c(%eax),%eax - 11a63: 89 45 f0 mov %eax,0xfffffff0(%ebp) - 11a66: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) - 11a6d: 8b 45 08 mov 0x8(%ebp),%eax - 11a70: 8a 80 81 01 00 00 mov 0x181(%eax),%al - 11a76: 25 ff 00 00 00 and $0xff,%eax - 11a7b: 3b 45 fc cmp 0xfffffffc(%ebp),%eax - 11a7e: 7e 48 jle 11ac8 <_usb_set_configuration+0x81> - 11a80: 8b 4d 08 mov 0x8(%ebp),%ecx - 11a83: 8b 55 fc mov 0xfffffffc(%ebp),%edx - 11a86: 89 d0 mov %edx,%eax - 11a88: 01 c0 add %eax,%eax - 11a8a: 01 d0 add %edx,%eax - 11a8c: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx - 11a93: 8b 81 84 01 00 00 mov 0x184(%ecx),%eax - 11a99: 8a 44 02 05 mov 0x5(%edx,%eax,1),%al - 11a9d: 25 ff 00 00 00 and $0xff,%eax - 11aa2: 3b 45 0c cmp 0xc(%ebp),%eax - 11aa5: 75 1a jne 11ac1 <_usb_set_configuration+0x7a> - 11aa7: 8b 4d 08 mov 0x8(%ebp),%ecx - 11aaa: 8b 55 fc mov 0xfffffffc(%ebp),%edx - 11aad: 89 d0 mov %edx,%eax - 11aaf: 01 c0 add %eax,%eax - 11ab1: 01 d0 add %edx,%eax - 11ab3: c1 e0 03 shl $0x3,%eax - 11ab6: 03 81 84 01 00 00 add 0x184(%ecx),%eax - 11abc: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 11abf: eb 07 jmp 11ac8 <_usb_set_configuration+0x81> - 11ac1: 8d 45 fc lea 0xfffffffc(%ebp),%eax - 11ac4: ff 00 incl (%eax) - 11ac6: eb a5 jmp 11a6d <_usb_set_configuration+0x26> - 11ac8: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) - 11acc: 75 06 jne 11ad4 <_usb_set_configuration+0x8d> - 11ace: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) - 11ad2: 75 0c jne 11ae0 <_usb_set_configuration+0x99> - 11ad4: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) - 11ad8: 74 12 je 11aec <_usb_set_configuration+0xa5> - 11ada: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) - 11ade: 75 0c jne 11aec <_usb_set_configuration+0xa5> - 11ae0: c7 45 ec ea ff ff ff movl $0xffffffea,0xffffffec(%ebp) - 11ae7: e9 f2 00 00 00 jmp 11bde <_usb_set_configuration+0x197> - 11aec: 8b 45 08 mov 0x8(%ebp),%eax - 11aef: 83 78 14 04 cmpl $0x4,0x14(%eax) - 11af3: 74 3f je 11b34 <_usb_set_configuration+0xed> - 11af5: 83 7d f0 00 cmpl $0x0,0xfffffff0(%ebp) - 11af9: 74 39 je 11b34 <_usb_set_configuration+0xed> - 11afb: c7 45 fc 01 00 00 00 movl $0x1,0xfffffffc(%ebp) - 11b02: 83 7d fc 0e cmpl $0xe,0xfffffffc(%ebp) - 11b06: 7f 2c jg 11b34 <_usb_set_configuration+0xed> - 11b08: 83 ec 08 sub $0x8,%esp - 11b0b: ff 75 fc pushl 0xfffffffc(%ebp) - 11b0e: ff 75 08 pushl 0x8(%ebp) - 11b11: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 11b14: ff d0 call *%eax - 11b16: 83 c4 10 add $0x10,%esp - 11b19: 83 ec 08 sub $0x8,%esp - 11b1c: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 11b1f: 0c 80 or $0x80,%al - 11b21: 50 push %eax - 11b22: ff 75 08 pushl 0x8(%ebp) - 11b25: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 11b28: ff d0 call *%eax - 11b2a: 83 c4 10 add $0x10,%esp - 11b2d: 8d 45 fc lea 0xfffffffc(%ebp),%eax - 11b30: ff 00 incl (%eax) - 11b32: eb ce jmp 11b02 <_usb_set_configuration+0xbb> - 11b34: 8b 55 08 mov 0x8(%ebp),%edx - 11b37: 8b 45 08 mov 0x8(%ebp),%eax - 11b3a: c7 40 2c 00 00 00 00 movl $0x0,0x2c(%eax) - 11b41: c7 42 28 00 00 00 00 movl $0x0,0x28(%edx) - 11b48: 8b 55 08 mov 0x8(%ebp),%edx - 11b4b: 8b 45 08 mov 0x8(%ebp),%eax - 11b4e: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) - 11b55: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx) - 11b5c: 8b 45 08 mov 0x8(%ebp),%eax - 11b5f: c7 40 14 04 00 00 00 movl $0x4,0x14(%eax) - 11b66: 83 ec 0c sub $0xc,%esp - 11b69: 68 f4 01 00 00 push $0x1f4 - 11b6e: 6a 00 push $0x0 - 11b70: 6a 00 push $0x0 - 11b72: 6a 00 push $0x0 - 11b74: 8b 45 0c mov 0xc(%ebp),%eax - 11b77: 25 ff ff 00 00 and $0xffff,%eax - 11b7c: 50 push %eax - 11b7d: 6a 00 push $0x0 - 11b7f: 6a 09 push $0x9 - 11b81: 6a 00 push $0x0 - 11b83: ff 75 08 pushl 0x8(%ebp) - 11b86: e8 76 f8 ff ff call 11401 <___create_pipe> - 11b8b: 83 c4 08 add $0x8,%esp - 11b8e: 0d 00 00 00 80 or $0x80000000,%eax - 11b93: 50 push %eax - 11b94: ff 75 08 pushl 0x8(%ebp) - 11b97: e8 54 f6 ff ff call 111f0 <_usb_control_msg> - 11b9c: 83 c4 30 add $0x30,%esp - 11b9f: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 11ba2: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) - 11ba6: 79 08 jns 11bb0 <_usb_set_configuration+0x169> - 11ba8: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 11bab: 89 45 ec mov %eax,0xffffffec(%ebp) - 11bae: eb 2e jmp 11bde <_usb_set_configuration+0x197> - 11bb0: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) - 11bb4: 74 0a je 11bc0 <_usb_set_configuration+0x179> - 11bb6: 8b 45 08 mov 0x8(%ebp),%eax - 11bb9: c7 40 14 05 00 00 00 movl $0x5,0x14(%eax) - 11bc0: 8b 55 08 mov 0x8(%ebp),%edx - 11bc3: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 11bc6: 89 82 88 01 00 00 mov %eax,0x188(%edx) - 11bcc: ff 75 08 pushl 0x8(%ebp) - 11bcf: e8 25 f9 ff ff call 114f9 <_usb_set_maxpacket> - 11bd4: 83 c4 04 add $0x4,%esp - 11bd7: c7 45 ec 00 00 00 00 movl $0x0,0xffffffec(%ebp) - 11bde: 8b 45 ec mov 0xffffffec(%ebp),%eax - 11be1: c9 leave - 11be2: c3 ret - -00011be3 <_usb_string>: - 11be3: 55 push %ebp - 11be4: 89 e5 mov %esp,%ebp - 11be6: 83 ec 18 sub $0x18,%esp - 11be9: 83 7d 14 00 cmpl $0x0,0x14(%ebp) - 11bed: 74 0c je 11bfb <_usb_string+0x18> - 11bef: 83 7d 10 00 cmpl $0x0,0x10(%ebp) - 11bf3: 74 06 je 11bfb <_usb_string+0x18> - 11bf5: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) - 11bf9: 75 0c jne 11c07 <_usb_string+0x24> - 11bfb: c7 45 e8 ea ff ff ff movl $0xffffffea,0xffffffe8(%ebp) - 11c02: e9 a7 01 00 00 jmp 11dae <_usb_string+0x1cb> - 11c07: 8b 45 10 mov 0x10(%ebp),%eax - 11c0a: c6 00 00 movb $0x0,(%eax) - 11c0d: 83 ec 08 sub $0x8,%esp - 11c10: 68 00 01 00 00 push $0x100 - 11c15: 6a 01 push $0x1 - 11c17: e8 14 7e 00 00 call 19a30 <_ExAllocatePool@8> - 11c1c: 83 c4 08 add $0x8,%esp - 11c1f: 89 45 fc mov %eax,0xfffffffc(%ebp) - 11c22: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) - 11c26: 75 0c jne 11c34 <_usb_string+0x51> - 11c28: c7 45 e8 f4 ff ff ff movl $0xfffffff4,0xffffffe8(%ebp) - 11c2f: e9 7a 01 00 00 jmp 11dae <_usb_string+0x1cb> - 11c34: 8b 45 08 mov 0x8(%ebp),%eax - 11c37: 83 b8 90 01 00 00 00 cmpl $0x0,0x190(%eax) - 11c3e: 75 6e jne 11cae <_usb_string+0xcb> - 11c40: 83 ec 0c sub $0xc,%esp - 11c43: 6a 04 push $0x4 - 11c45: ff 75 fc pushl 0xfffffffc(%ebp) - 11c48: 6a 00 push $0x0 - 11c4a: 6a 00 push $0x0 - 11c4c: ff 75 08 pushl 0x8(%ebp) - 11c4f: e8 c2 f7 ff ff call 11416 <_usb_get_string> - 11c54: 83 c4 20 add $0x20,%esp - 11c57: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 11c5a: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) - 11c5e: 79 05 jns 11c65 <_usb_string+0x82> - 11c60: e9 35 01 00 00 jmp 11d9a <_usb_string+0x1b7> - 11c65: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 11c68: 80 38 03 cmpb $0x3,(%eax) - 11c6b: 77 0c ja 11c79 <_usb_string+0x96> - 11c6d: c7 45 f8 ea ff ff ff movl $0xffffffea,0xfffffff8(%ebp) - 11c74: e9 21 01 00 00 jmp 11d9a <_usb_string+0x1b7> - 11c79: 8b 45 08 mov 0x8(%ebp),%eax - 11c7c: c7 80 90 01 00 00 ff movl $0xffffffff,0x190(%eax) - 11c83: ff ff ff - 11c86: 8b 4d 08 mov 0x8(%ebp),%ecx - 11c89: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 11c8c: 83 c0 02 add $0x2,%eax - 11c8f: ba 00 00 00 00 mov $0x0,%edx - 11c94: 8a 10 mov (%eax),%dl - 11c96: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 11c99: 83 c0 03 add $0x3,%eax - 11c9c: 8a 00 mov (%eax),%al - 11c9e: 25 ff 00 00 00 and $0xff,%eax - 11ca3: c1 e0 08 shl $0x8,%eax - 11ca6: 09 d0 or %edx,%eax - 11ca8: 89 81 94 01 00 00 mov %eax,0x194(%ecx) - 11cae: 83 ec 0c sub $0xc,%esp - 11cb1: 6a 02 push $0x2 - 11cb3: ff 75 fc pushl 0xfffffffc(%ebp) - 11cb6: 8b 45 0c mov 0xc(%ebp),%eax - 11cb9: 25 ff 00 00 00 and $0xff,%eax - 11cbe: 50 push %eax - 11cbf: 8b 45 08 mov 0x8(%ebp),%eax - 11cc2: 8b 80 94 01 00 00 mov 0x194(%eax),%eax - 11cc8: 25 ff ff 00 00 and $0xffff,%eax - 11ccd: 50 push %eax - 11cce: ff 75 08 pushl 0x8(%ebp) - 11cd1: e8 40 f7 ff ff call 11416 <_usb_get_string> - 11cd6: 83 c4 20 add $0x20,%esp - 11cd9: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 11cdc: 83 7d f8 01 cmpl $0x1,0xfffffff8(%ebp) - 11ce0: 7f 05 jg 11ce7 <_usb_string+0x104> - 11ce2: e9 b3 00 00 00 jmp 11d9a <_usb_string+0x1b7> - 11ce7: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 11cea: 8a 00 mov (%eax),%al - 11cec: 25 ff 00 00 00 and $0xff,%eax - 11cf1: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 11cf4: 83 ec 0c sub $0xc,%esp - 11cf7: ff 75 f4 pushl 0xfffffff4(%ebp) - 11cfa: ff 75 fc pushl 0xfffffffc(%ebp) - 11cfd: 8b 45 0c mov 0xc(%ebp),%eax - 11d00: 25 ff 00 00 00 and $0xff,%eax - 11d05: 50 push %eax - 11d06: 8b 45 08 mov 0x8(%ebp),%eax - 11d09: 8b 80 94 01 00 00 mov 0x194(%eax),%eax - 11d0f: 25 ff ff 00 00 and $0xffff,%eax - 11d14: 50 push %eax - 11d15: ff 75 08 pushl 0x8(%ebp) - 11d18: e8 f9 f6 ff ff call 11416 <_usb_get_string> - 11d1d: 83 c4 20 add $0x20,%esp - 11d20: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 11d23: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) - 11d27: 79 02 jns 11d2b <_usb_string+0x148> - 11d29: eb 6f jmp 11d9a <_usb_string+0x1b7> - 11d2b: 8d 45 14 lea 0x14(%ebp),%eax - 11d2e: ff 08 decl (%eax) - 11d30: c7 45 ec 00 00 00 00 movl $0x0,0xffffffec(%ebp) - 11d37: c7 45 f0 02 00 00 00 movl $0x2,0xfffffff0(%ebp) - 11d3e: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 11d41: 3b 45 f0 cmp 0xfffffff0(%ebp),%eax - 11d44: 76 45 jbe 11d8b <_usb_string+0x1a8> - 11d46: 8b 45 ec mov 0xffffffec(%ebp),%eax - 11d49: 3b 45 14 cmp 0x14(%ebp),%eax - 11d4c: 72 02 jb 11d50 <_usb_string+0x16d> - 11d4e: eb 3b jmp 11d8b <_usb_string+0x1a8> - 11d50: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 11d53: 03 45 fc add 0xfffffffc(%ebp),%eax - 11d56: 40 inc %eax - 11d57: 80 38 00 cmpb $0x0,(%eax) - 11d5a: 74 10 je 11d6c <_usb_string+0x189> - 11d5c: 8b 45 ec mov 0xffffffec(%ebp),%eax - 11d5f: 03 45 10 add 0x10(%ebp),%eax - 11d62: c6 00 3f movb $0x3f,(%eax) - 11d65: 8d 45 ec lea 0xffffffec(%ebp),%eax - 11d68: ff 00 incl (%eax) - 11d6a: eb 17 jmp 11d83 <_usb_string+0x1a0> - 11d6c: 8b 45 ec mov 0xffffffec(%ebp),%eax - 11d6f: 89 c2 mov %eax,%edx - 11d71: 03 55 10 add 0x10(%ebp),%edx - 11d74: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 11d77: 03 45 f0 add 0xfffffff0(%ebp),%eax - 11d7a: 8a 00 mov (%eax),%al - 11d7c: 88 02 mov %al,(%edx) - 11d7e: 8d 45 ec lea 0xffffffec(%ebp),%eax - 11d81: ff 00 incl (%eax) - 11d83: 8d 45 f0 lea 0xfffffff0(%ebp),%eax - 11d86: 83 00 02 addl $0x2,(%eax) - 11d89: eb b3 jmp 11d3e <_usb_string+0x15b> - 11d8b: 8b 45 10 mov 0x10(%ebp),%eax - 11d8e: 03 45 ec add 0xffffffec(%ebp),%eax - 11d91: c6 00 00 movb $0x0,(%eax) - 11d94: 8b 45 ec mov 0xffffffec(%ebp),%eax - 11d97: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 11d9a: 83 ec 0c sub $0xc,%esp - 11d9d: ff 75 fc pushl 0xfffffffc(%ebp) - 11da0: e8 9b 7c 00 00 call 19a40 <_ExFreePool@4> - 11da5: 83 c4 0c add $0xc,%esp - 11da8: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 11dab: 89 45 e8 mov %eax,0xffffffe8(%ebp) - 11dae: 8b 45 e8 mov 0xffffffe8(%ebp),%eax - 11db1: c9 leave - 11db2: c3 ret - 11db3: 90 nop - 11db4: 90 nop - 11db5: 90 nop - 11db6: 90 nop - 11db7: 90 nop - 11db8: 90 nop - 11db9: 90 nop - 11dba: 90 nop - 11dbb: 90 nop - 11dbc: 90 nop - 11dbd: 90 nop - 11dbe: 90 nop - 11dbf: 90 nop - -00011dc0 <_ascii2utf>: - 11dc0: 55 push %ebp - 11dc1: 89 e5 mov %esp,%ebp - 11dc3: 83 ec 04 sub $0x4,%esp - 11dc6: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) - 11dcd: 8b 45 08 mov 0x8(%ebp),%eax - 11dd0: 80 38 00 cmpb $0x0,(%eax) - 11dd3: 74 33 je 11e08 <_ascii2utf+0x48> - 11dd5: 83 7d 10 01 cmpl $0x1,0x10(%ebp) - 11dd9: 7e 2d jle 11e08 <_ascii2utf+0x48> - 11ddb: 8b 45 0c mov 0xc(%ebp),%eax - 11dde: 89 c2 mov %eax,%edx - 11de0: 8b 45 08 mov 0x8(%ebp),%eax - 11de3: ff 45 08 incl 0x8(%ebp) - 11de6: 8a 00 mov (%eax),%al - 11de8: 88 02 mov %al,(%edx) - 11dea: 8d 45 0c lea 0xc(%ebp),%eax - 11ded: ff 00 incl (%eax) - 11def: 8b 45 0c mov 0xc(%ebp),%eax - 11df2: c6 00 00 movb $0x0,(%eax) - 11df5: 8d 45 0c lea 0xc(%ebp),%eax - 11df8: ff 00 incl (%eax) - 11dfa: 8d 45 10 lea 0x10(%ebp),%eax - 11dfd: 83 28 02 subl $0x2,(%eax) - 11e00: 8d 45 fc lea 0xfffffffc(%ebp),%eax - 11e03: 83 00 02 addl $0x2,(%eax) - 11e06: eb c5 jmp 11dcd <_ascii2utf+0xd> - 11e08: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 11e0b: c9 leave - 11e0c: c3 ret - -00011e0d <_rh_string>: - 11e0d: 55 push %ebp - 11e0e: 89 e5 mov %esp,%ebp - 11e10: 53 push %ebx - 11e11: 81 ec 84 00 00 00 sub $0x84,%esp - 11e17: 83 7d 08 00 cmpl $0x0,0x8(%ebp) - 11e1b: 75 38 jne 11e55 <_rh_string+0x48> - 11e1d: 8b 45 10 mov 0x10(%ebp),%eax - 11e20: c6 00 04 movb $0x4,(%eax) - 11e23: 8d 45 10 lea 0x10(%ebp),%eax - 11e26: ff 00 incl (%eax) - 11e28: 8b 45 10 mov 0x10(%ebp),%eax - 11e2b: c6 00 03 movb $0x3,(%eax) - 11e2e: 8d 45 10 lea 0x10(%ebp),%eax - 11e31: ff 00 incl (%eax) - 11e33: 8b 45 10 mov 0x10(%ebp),%eax - 11e36: c6 00 09 movb $0x9,(%eax) - 11e39: 8d 45 10 lea 0x10(%ebp),%eax - 11e3c: ff 00 incl (%eax) - 11e3e: 8b 45 10 mov 0x10(%ebp),%eax - 11e41: c6 00 04 movb $0x4,(%eax) - 11e44: 8d 45 10 lea 0x10(%ebp),%eax - 11e47: ff 00 incl (%eax) - 11e49: c7 45 84 04 00 00 00 movl $0x4,0xffffff84(%ebp) - 11e50: e9 af 00 00 00 jmp 11f04 <_rh_string+0xf7> - 11e55: 83 7d 08 01 cmpl $0x1,0x8(%ebp) - 11e59: 75 17 jne 11e72 <_rh_string+0x65> - 11e5b: 83 ec 08 sub $0x8,%esp - 11e5e: 8b 45 0c mov 0xc(%ebp),%eax - 11e61: ff 70 08 pushl 0x8(%eax) - 11e64: 8d 45 88 lea 0xffffff88(%ebp),%eax - 11e67: 50 push %eax - 11e68: e8 33 7c 00 00 call 19aa0 <_strcpy> - 11e6d: 83 c4 10 add $0x10,%esp - 11e70: eb 52 jmp 11ec4 <_rh_string+0xb7> - 11e72: 83 7d 08 02 cmpl $0x2,0x8(%ebp) - 11e76: 75 17 jne 11e8f <_rh_string+0x82> - 11e78: 83 ec 08 sub $0x8,%esp - 11e7b: 8b 45 0c mov 0xc(%ebp),%eax - 11e7e: ff 70 4c pushl 0x4c(%eax) - 11e81: 8d 45 88 lea 0xffffff88(%ebp),%eax - 11e84: 50 push %eax - 11e85: e8 16 7c 00 00 call 19aa0 <_strcpy> - 11e8a: 83 c4 10 add $0x10,%esp - 11e8d: eb 35 jmp 11ec4 <_rh_string+0xb7> - 11e8f: 83 7d 08 03 cmpl $0x3,0x8(%ebp) - 11e93: 75 26 jne 11ebb <_rh_string+0xae> - 11e95: 83 ec 0c sub $0xc,%esp - 11e98: 8b 45 0c mov 0xc(%ebp),%eax - 11e9b: ff 70 50 pushl 0x50(%eax) - 11e9e: 68 a6 b0 01 00 push $0x1b0a6 - 11ea3: 68 ab b0 01 00 push $0x1b0ab - 11ea8: 68 b0 b0 01 00 push $0x1b0b0 - 11ead: 8d 45 88 lea 0xffffff88(%ebp),%eax - 11eb0: 50 push %eax - 11eb1: e8 da 7b 00 00 call 19a90 <_sprintf> - 11eb6: 83 c4 20 add $0x20,%esp - 11eb9: eb 09 jmp 11ec4 <_rh_string+0xb7> - 11ebb: c7 45 84 00 00 00 00 movl $0x0,0xffffff84(%ebp) - 11ec2: eb 40 jmp 11f04 <_rh_string+0xf7> - 11ec4: 8b 5d 10 mov 0x10(%ebp),%ebx - 11ec7: 8d 45 88 lea 0xffffff88(%ebp),%eax - 11eca: 83 ec 0c sub $0xc,%esp - 11ecd: 50 push %eax - 11ece: e8 ad 7b 00 00 call 19a80 <_strlen> - 11ed3: 83 c4 10 add $0x10,%esp - 11ed6: 01 c0 add %eax,%eax - 11ed8: 83 c0 02 add $0x2,%eax - 11edb: 88 03 mov %al,(%ebx) - 11edd: 8b 45 10 mov 0x10(%ebp),%eax - 11ee0: 40 inc %eax - 11ee1: c6 00 03 movb $0x3,(%eax) - 11ee4: 8b 45 14 mov 0x14(%ebp),%eax - 11ee7: 83 e8 02 sub $0x2,%eax - 11eea: 50 push %eax - 11eeb: 8b 45 10 mov 0x10(%ebp),%eax - 11eee: 83 c0 02 add $0x2,%eax - 11ef1: 50 push %eax - 11ef2: 8d 45 88 lea 0xffffff88(%ebp),%eax - 11ef5: 50 push %eax - 11ef6: e8 c5 fe ff ff call 11dc0 <_ascii2utf> - 11efb: 83 c4 0c add $0xc,%esp - 11efe: 83 c0 02 add $0x2,%eax - 11f01: 89 45 84 mov %eax,0xffffff84(%ebp) - 11f04: 8b 45 84 mov 0xffffff84(%ebp),%eax - 11f07: 8b 5d fc mov 0xfffffffc(%ebp),%ebx - 11f0a: c9 leave - 11f0b: c3 ret - -00011f0c <_rh_call_control>: - 11f0c: 55 push %ebp - 11f0d: 89 e5 mov %esp,%ebp - 11f0f: 53 push %ebx - 11f10: 83 ec 24 sub $0x24,%esp - 11f13: 8b 45 0c mov 0xc(%ebp),%eax - 11f16: 8b 40 38 mov 0x38(%eax),%eax - 11f19: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 11f1c: c7 45 ec 00 00 00 00 movl $0x0,0xffffffec(%ebp) - 11f23: 8b 45 0c mov 0xc(%ebp),%eax - 11f26: 8b 40 24 mov 0x24(%eax),%eax - 11f29: 89 45 e8 mov %eax,0xffffffe8(%ebp) - 11f2c: c7 45 e4 00 00 00 00 movl $0x0,0xffffffe4(%ebp) - 11f33: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 11f36: 8a 00 mov (%eax),%al - 11f38: 25 ff 00 00 00 and $0xff,%eax - 11f3d: 89 c2 mov %eax,%edx - 11f3f: c1 e2 08 shl $0x8,%edx - 11f42: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 11f45: 8a 40 01 mov 0x1(%eax),%al - 11f48: 25 ff 00 00 00 and $0xff,%eax - 11f4d: 09 d0 or %edx,%eax - 11f4f: 66 89 45 f6 mov %ax,0xfffffff6(%ebp) - 11f53: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 11f56: 66 8b 40 02 mov 0x2(%eax),%ax - 11f5a: 66 89 45 f4 mov %ax,0xfffffff4(%ebp) - 11f5e: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 11f61: 66 8b 40 04 mov 0x4(%eax),%ax - 11f65: 66 89 45 f2 mov %ax,0xfffffff2(%ebp) - 11f69: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 11f6c: 66 8b 40 06 mov 0x6(%eax),%ax - 11f70: 66 89 45 f0 mov %ax,0xfffffff0(%ebp) - 11f74: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 11f77: 89 c2 mov %eax,%edx - 11f79: 81 e2 ff ff 00 00 and $0xffff,%edx - 11f7f: 8b 45 0c mov 0xc(%ebp),%eax - 11f82: 3b 50 2c cmp 0x2c(%eax),%edx - 11f85: 7e 05 jle 11f8c <_rh_call_control+0x80> - 11f87: e9 49 02 00 00 jmp 121d5 <_rh_call_control+0x2c9> - 11f8c: 8b 45 0c mov 0xc(%ebp),%eax - 11f8f: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) - 11f96: 8b 55 0c mov 0xc(%ebp),%edx - 11f99: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 11f9c: 25 ff ff 00 00 and $0xffff,%eax - 11fa1: 89 42 30 mov %eax,0x30(%edx) - 11fa4: 66 8b 45 f6 mov 0xfffffff6(%ebp),%ax - 11fa8: 89 c2 mov %eax,%edx - 11faa: 81 e2 ff ff 00 00 and $0xffff,%edx - 11fb0: 89 55 dc mov %edx,0xffffffdc(%ebp) - 11fb3: 81 7d dc 01 01 00 00 cmpl $0x101,0xffffffdc(%ebp) - 11fba: 0f 84 1f 02 00 00 je 121df <_rh_call_control+0x2d3> - 11fc0: 81 7d dc 01 01 00 00 cmpl $0x101,0xffffffdc(%ebp) - 11fc7: 7f 42 jg 1200b <_rh_call_control+0xff> - 11fc9: 83 7d dc 05 cmpl $0x5,0xffffffdc(%ebp) - 11fcd: 0f 84 0c 02 00 00 je 121df <_rh_call_control+0x2d3> - 11fd3: 83 7d dc 05 cmpl $0x5,0xffffffdc(%ebp) - 11fd7: 7f 19 jg 11ff2 <_rh_call_control+0xe6> - 11fd9: 83 7d dc 01 cmpl $0x1,0xffffffdc(%ebp) - 11fdd: 0f 84 fc 01 00 00 je 121df <_rh_call_control+0x2d3> - 11fe3: 83 7d dc 03 cmpl $0x3,0xffffffdc(%ebp) - 11fe7: 0f 84 f2 01 00 00 je 121df <_rh_call_control+0x2d3> - 11fed: e9 9e 01 00 00 jmp 12190 <_rh_call_control+0x284> - 11ff2: 83 7d dc 09 cmpl $0x9,0xffffffdc(%ebp) - 11ff6: 0f 84 e3 01 00 00 je 121df <_rh_call_control+0x2d3> - 11ffc: 83 7d dc 0b cmpl $0xb,0xffffffdc(%ebp) - 12000: 0f 84 d9 01 00 00 je 121df <_rh_call_control+0x2d3> - 12006: e9 85 01 00 00 jmp 12190 <_rh_call_control+0x284> - 1200b: 81 7d dc 06 80 00 00 cmpl $0x8006,0xffffffdc(%ebp) - 12012: 74 77 je 1208b <_rh_call_control+0x17f> - 12014: 81 7d dc 06 80 00 00 cmpl $0x8006,0xffffffdc(%ebp) - 1201b: 7f 1b jg 12038 <_rh_call_control+0x12c> - 1201d: 81 7d dc 03 01 00 00 cmpl $0x103,0xffffffdc(%ebp) - 12024: 0f 84 b5 01 00 00 je 121df <_rh_call_control+0x2d3> - 1202a: 81 7d dc 00 80 00 00 cmpl $0x8000,0xffffffdc(%ebp) - 12031: 74 3b je 1206e <_rh_call_control+0x162> - 12033: e9 58 01 00 00 jmp 12190 <_rh_call_control+0x284> - 12038: 81 7d dc 0a 80 00 00 cmpl $0x800a,0xffffffdc(%ebp) - 1203f: 0f 84 34 01 00 00 je 12179 <_rh_call_control+0x26d> - 12045: 81 7d dc 0a 80 00 00 cmpl $0x800a,0xffffffdc(%ebp) - 1204c: 7f 0e jg 1205c <_rh_call_control+0x150> - 1204e: 81 7d dc 08 80 00 00 cmpl $0x8008,0xffffffdc(%ebp) - 12055: 74 29 je 12080 <_rh_call_control+0x174> - 12057: e9 34 01 00 00 jmp 12190 <_rh_call_control+0x284> - 1205c: 81 7d dc 00 81 00 00 cmpl $0x8100,0xffffffdc(%ebp) - 12063: 0f 84 18 01 00 00 je 12181 <_rh_call_control+0x275> - 12069: e9 22 01 00 00 jmp 12190 <_rh_call_control+0x284> - 1206e: 8b 45 e8 mov 0xffffffe8(%ebp),%eax - 12071: c6 00 01 movb $0x1,(%eax) - 12074: 8b 45 e8 mov 0xffffffe8(%ebp),%eax - 12077: 40 inc %eax - 12078: c6 00 00 movb $0x0,(%eax) - 1207b: e9 5f 01 00 00 jmp 121df <_rh_call_control+0x2d3> - 12080: 8b 45 e8 mov 0xffffffe8(%ebp),%eax - 12083: c6 00 01 movb $0x1,(%eax) - 12086: e9 54 01 00 00 jmp 121df <_rh_call_control+0x2d3> - 1208b: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 1208e: 25 ff ff 00 00 and $0xffff,%eax - 12093: 25 00 ff 00 00 and $0xff00,%eax - 12098: 89 45 e0 mov %eax,0xffffffe0(%ebp) - 1209b: 81 7d e0 00 02 00 00 cmpl $0x200,0xffffffe0(%ebp) - 120a2: 74 6f je 12113 <_rh_call_control+0x207> - 120a4: 81 7d e0 00 02 00 00 cmpl $0x200,0xffffffe0(%ebp) - 120ab: 7f 0e jg 120bb <_rh_call_control+0x1af> - 120ad: 81 7d e0 00 01 00 00 cmpl $0x100,0xffffffe0(%ebp) - 120b4: 74 17 je 120cd <_rh_call_control+0x1c1> - 120b6: e9 1a 01 00 00 jmp 121d5 <_rh_call_control+0x2c9> - 120bb: 81 7d e0 00 03 00 00 cmpl $0x300,0xffffffe0(%ebp) - 120c2: 0f 84 84 00 00 00 je 1214c <_rh_call_control+0x240> - 120c8: e9 08 01 00 00 jmp 121d5 <_rh_call_control+0x2c9> - 120cd: 8b 45 08 mov 0x8(%ebp),%eax - 120d0: 8b 40 74 mov 0x74(%eax),%eax - 120d3: 8b 40 08 mov 0x8(%eax),%eax - 120d6: c1 e8 05 shr $0x5,%eax - 120d9: 83 e0 01 and $0x1,%eax - 120dc: 85 c0 test %eax,%eax - 120de: 74 09 je 120e9 <_rh_call_control+0x1dd> - 120e0: c7 45 ec 50 b0 01 00 movl $0x1b050,0xffffffec(%ebp) - 120e7: eb 1e jmp 12107 <_rh_call_control+0x1fb> - 120e9: 8b 45 08 mov 0x8(%ebp),%eax - 120ec: 8b 40 74 mov 0x74(%eax),%eax - 120ef: 8b 40 08 mov 0x8(%eax),%eax - 120f2: c1 e8 04 shr $0x4,%eax - 120f5: 83 e0 01 and $0x1,%eax - 120f8: 85 c0 test %eax,%eax - 120fa: 0f 84 d5 00 00 00 je 121d5 <_rh_call_control+0x2c9> - 12100: c7 45 ec 62 b0 01 00 movl $0x1b062,0xffffffec(%ebp) - 12107: c7 45 e4 12 00 00 00 movl $0x12,0xffffffe4(%ebp) - 1210e: e9 cc 00 00 00 jmp 121df <_rh_call_control+0x2d3> - 12113: 8b 45 08 mov 0x8(%ebp),%eax - 12116: 8b 40 74 mov 0x74(%eax),%eax - 12119: 8b 40 08 mov 0x8(%eax),%eax - 1211c: c1 e8 05 shr $0x5,%eax - 1211f: 83 e0 01 and $0x1,%eax - 12122: 85 c0 test %eax,%eax - 12124: 74 13 je 12139 <_rh_call_control+0x22d> - 12126: c7 45 ec 8d b0 01 00 movl $0x1b08d,0xffffffec(%ebp) - 1212d: c7 45 e4 19 00 00 00 movl $0x19,0xffffffe4(%ebp) - 12134: e9 a6 00 00 00 jmp 121df <_rh_call_control+0x2d3> - 12139: c7 45 ec 74 b0 01 00 movl $0x1b074,0xffffffec(%ebp) - 12140: c7 45 e4 19 00 00 00 movl $0x19,0xffffffe4(%ebp) - 12147: e9 93 00 00 00 jmp 121df <_rh_call_control+0x2d3> - 1214c: 8b 5d 0c mov 0xc(%ebp),%ebx - 1214f: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 12152: 25 ff ff 00 00 and $0xffff,%eax - 12157: 50 push %eax - 12158: ff 75 e8 pushl 0xffffffe8(%ebp) - 1215b: ff 75 08 pushl 0x8(%ebp) - 1215e: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 12161: 25 ff ff 00 00 and $0xffff,%eax - 12166: 25 ff 00 00 00 and $0xff,%eax - 1216b: 50 push %eax - 1216c: e8 9c fc ff ff call 11e0d <_rh_string> - 12171: 83 c4 10 add $0x10,%esp - 12174: 89 43 30 mov %eax,0x30(%ebx) - 12177: eb 66 jmp 121df <_rh_call_control+0x2d3> - 12179: 8b 45 e8 mov 0xffffffe8(%ebp),%eax - 1217c: c6 00 00 movb $0x0,(%eax) - 1217f: eb 5e jmp 121df <_rh_call_control+0x2d3> - 12181: 8b 45 e8 mov 0xffffffe8(%ebp),%eax - 12184: c6 00 00 movb $0x0,(%eax) - 12187: 8b 45 e8 mov 0xffffffe8(%ebp),%eax - 1218a: 40 inc %eax - 1218b: c6 00 00 movb $0x0,(%eax) - 1218e: eb 4f jmp 121df <_rh_call_control+0x2d3> - 12190: 8b 5d 0c mov 0xc(%ebp),%ebx - 12193: 83 ec 08 sub $0x8,%esp - 12196: 8b 45 08 mov 0x8(%ebp),%eax - 12199: 8b 50 74 mov 0x74(%eax),%edx - 1219c: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 1219f: 25 ff ff 00 00 and $0xffff,%eax - 121a4: 50 push %eax - 121a5: ff 75 e8 pushl 0xffffffe8(%ebp) - 121a8: 66 8b 45 f2 mov 0xfffffff2(%ebp),%ax - 121ac: 25 ff ff 00 00 and $0xffff,%eax - 121b1: 50 push %eax - 121b2: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 121b5: 25 ff ff 00 00 and $0xffff,%eax - 121ba: 50 push %eax - 121bb: 66 8b 45 f6 mov 0xfffffff6(%ebp),%ax - 121bf: 25 ff ff 00 00 and $0xffff,%eax - 121c4: 50 push %eax - 121c5: ff 75 08 pushl 0x8(%ebp) - 121c8: 8b 42 38 mov 0x38(%edx),%eax - 121cb: ff d0 call *%eax - 121cd: 83 c4 20 add $0x20,%esp - 121d0: 89 43 1c mov %eax,0x1c(%ebx) - 121d3: eb 0a jmp 121df <_rh_call_control+0x2d3> - 121d5: 8b 45 0c mov 0xc(%ebp),%eax - 121d8: c7 40 1c e0 ff ff ff movl $0xffffffe0,0x1c(%eax) - 121df: 8b 45 0c mov 0xc(%ebp),%eax - 121e2: 83 78 1c 00 cmpl $0x0,0x1c(%eax) - 121e6: 74 0a je 121f2 <_rh_call_control+0x2e6> - 121e8: 8b 45 0c mov 0xc(%ebp),%eax - 121eb: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) - 121f2: 83 7d ec 00 cmpl $0x0,0xffffffec(%ebp) - 121f6: 74 31 je 12229 <_rh_call_control+0x31d> - 121f8: 8b 45 0c mov 0xc(%ebp),%eax - 121fb: 8b 40 2c mov 0x2c(%eax),%eax - 121fe: 3b 45 e4 cmp 0xffffffe4(%ebp),%eax - 12201: 7d 09 jge 1220c <_rh_call_control+0x300> - 12203: 8b 45 0c mov 0xc(%ebp),%eax - 12206: 8b 40 2c mov 0x2c(%eax),%eax - 12209: 89 45 e4 mov %eax,0xffffffe4(%ebp) - 1220c: 8b 55 0c mov 0xc(%ebp),%edx - 1220f: 8b 45 e4 mov 0xffffffe4(%ebp),%eax - 12212: 89 42 30 mov %eax,0x30(%edx) - 12215: 83 ec 04 sub $0x4,%esp - 12218: ff 75 e4 pushl 0xffffffe4(%ebp) - 1221b: ff 75 ec pushl 0xffffffec(%ebp) - 1221e: ff 75 e8 pushl 0xffffffe8(%ebp) - 12221: e8 4a 78 00 00 call 19a70 <_memcpy> - 12226: 83 c4 10 add $0x10,%esp - 12229: 83 ec 04 sub $0x4,%esp - 1222c: 6a 00 push $0x0 - 1222e: ff 75 0c pushl 0xc(%ebp) - 12231: ff 75 08 pushl 0x8(%ebp) - 12234: e8 5d 14 00 00 call 13696 <_usb_hcd_giveback_urb@12> - 12239: 83 c4 04 add $0x4,%esp - 1223c: b8 00 00 00 00 mov $0x0,%eax - 12241: 8b 5d fc mov 0xfffffffc(%ebp),%ebx - 12244: c9 leave - 12245: c3 ret - -00012246 <_rh_status_urb>: - 12246: 55 push %ebp - 12247: 89 e5 mov %esp,%ebp - 12249: 83 ec 18 sub $0x18,%esp - 1224c: 8b 45 0c mov 0xc(%ebp),%eax - 1224f: 8b 40 14 mov 0x14(%eax),%eax - 12252: 8b 80 ac 01 00 00 mov 0x1ac(%eax),%eax - 12258: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 1225b: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) - 1225f: 79 04 jns 12265 <_rh_status_urb+0x1f> - 12261: 83 45 f4 07 addl $0x7,0xfffffff4(%ebp) - 12265: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 12268: c1 f8 03 sar $0x3,%eax - 1226b: 40 inc %eax - 1226c: 89 45 fc mov %eax,0xfffffffc(%ebp) - 1226f: 8b 45 08 mov 0x8(%ebp),%eax - 12272: 83 78 58 00 cmpl $0x0,0x58(%eax) - 12276: 75 16 jne 1228e <_rh_status_urb+0x48> - 12278: 8b 45 0c mov 0xc(%ebp),%eax - 1227b: 83 78 1c 8d cmpl $0xffffff8d,0x1c(%eax) - 1227f: 75 0d jne 1228e <_rh_status_urb+0x48> - 12281: 8b 45 0c mov 0xc(%ebp),%eax - 12284: 8b 40 2c mov 0x2c(%eax),%eax - 12287: 3b 45 fc cmp 0xfffffffc(%ebp),%eax - 1228a: 7c 02 jl 1228e <_rh_status_urb+0x48> - 1228c: eb 09 jmp 12297 <_rh_status_urb+0x51> - 1228e: c7 45 f8 ea ff ff ff movl $0xffffffea,0xfffffff8(%ebp) - 12295: eb 55 jmp 122ec <_rh_status_urb+0xa6> - 12297: 83 ec 0c sub $0xc,%esp - 1229a: 8b 45 08 mov 0x8(%ebp),%eax - 1229d: 83 c0 54 add $0x54,%eax - 122a0: 50 push %eax - 122a1: e8 83 00 00 00 call 12329 <_init_timer> - 122a6: 83 c4 10 add $0x10,%esp - 122a9: 8b 45 08 mov 0x8(%ebp),%eax - 122ac: c7 40 54 5e 23 01 00 movl $0x1235e,0x54(%eax) - 122b3: 8b 55 08 mov 0x8(%ebp),%edx - 122b6: 8b 45 0c mov 0xc(%ebp),%eax - 122b9: 89 42 58 mov %eax,0x58(%edx) - 122bc: 8b 55 08 mov 0x8(%ebp),%edx - 122bf: a1 40 c2 01 00 mov 0x1c240,%eax - 122c4: 83 c0 19 add $0x19,%eax - 122c7: 89 42 5c mov %eax,0x5c(%edx) - 122ca: 83 ec 0c sub $0xc,%esp - 122cd: 8b 45 08 mov 0x8(%ebp),%eax - 122d0: 83 c0 54 add $0x54,%eax - 122d3: 50 push %eax - 122d4: e8 18 00 00 00 call 122f1 <_add_timer> - 122d9: 83 c4 10 add $0x10,%esp - 122dc: 8b 55 0c mov 0xc(%ebp),%edx - 122df: 8b 45 08 mov 0x8(%ebp),%eax - 122e2: 89 42 08 mov %eax,0x8(%edx) - 122e5: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) - 122ec: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 122ef: c9 leave - 122f0: c3 ret - -000122f1 <_add_timer>: - 122f1: 55 push %ebp - 122f2: 89 e5 mov %esp,%ebp - 122f4: 83 ec 04 sub $0x4,%esp - 122f7: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) - 122fe: 83 7d fc 13 cmpl $0x13,0xfffffffc(%ebp) - 12302: 7f 23 jg 12327 <_add_timer+0x36> - 12304: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 12307: 83 3c 85 60 c1 01 00 cmpl $0x0,0x1c160(,%eax,4) - 1230e: 00 - 1230f: 75 0f jne 12320 <_add_timer+0x2f> - 12311: 8b 55 fc mov 0xfffffffc(%ebp),%edx - 12314: 8b 45 08 mov 0x8(%ebp),%eax - 12317: 89 04 95 60 c1 01 00 mov %eax,0x1c160(,%edx,4) - 1231e: eb 07 jmp 12327 <_add_timer+0x36> - 12320: 8d 45 fc lea 0xfffffffc(%ebp),%eax - 12323: ff 00 incl (%eax) - 12325: eb d7 jmp 122fe <_add_timer+0xd> - 12327: c9 leave - 12328: c3 ret - -00012329 <_init_timer>: - 12329: 55 push %ebp - 1232a: 89 e5 mov %esp,%ebp - 1232c: 8b 55 08 mov 0x8(%ebp),%edx - 1232f: 83 c2 0c add $0xc,%edx - 12332: 8b 45 08 mov 0x8(%ebp),%eax - 12335: 83 c0 0c add $0xc,%eax - 12338: 89 02 mov %eax,(%edx) - 1233a: 8b 55 08 mov 0x8(%ebp),%edx - 1233d: 83 c2 0c add $0xc,%edx - 12340: 8b 45 08 mov 0x8(%ebp),%eax - 12343: 83 c0 0c add $0xc,%eax - 12346: 89 42 04 mov %eax,0x4(%edx) - 12349: 8b 45 08 mov 0x8(%ebp),%eax - 1234c: c7 00 00 00 00 00 movl $0x0,(%eax) - 12352: 8b 45 08 mov 0x8(%ebp),%eax - 12355: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) - 1235c: 5d pop %ebp - 1235d: c3 ret - -0001235e <_rh_report_status>: - 1235e: 55 push %ebp - 1235f: 89 e5 mov %esp,%ebp - 12361: 83 ec 18 sub $0x18,%esp - 12364: 8b 45 08 mov 0x8(%ebp),%eax - 12367: 89 45 fc mov %eax,0xfffffffc(%ebp) - 1236a: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 1236d: c7 00 01 00 00 00 movl $0x1,(%eax) - 12373: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 12376: 83 78 14 00 cmpl $0x0,0x14(%eax) - 1237a: 0f 84 c6 00 00 00 je 12446 <_rh_report_status+0xe8> - 12380: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 12383: 83 78 1c 8d cmpl $0xffffff8d,0x1c(%eax) - 12387: 0f 85 b9 00 00 00 jne 12446 <_rh_report_status+0xe8> - 1238d: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 12390: 8b 40 14 mov 0x14(%eax),%eax - 12393: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax - 12399: 8b 40 30 mov 0x30(%eax),%eax - 1239c: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 1239f: 85 c0 test %eax,%eax - 123a1: 0f 84 9f 00 00 00 je 12446 <_rh_report_status+0xe8> - 123a7: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 123aa: 8b 80 e0 00 00 00 mov 0xe0(%eax),%eax - 123b0: 83 e0 01 and $0x1,%eax - 123b3: 85 c0 test %eax,%eax - 123b5: 75 05 jne 123bc <_rh_report_status+0x5e> - 123b7: e9 8a 00 00 00 jmp 12446 <_rh_report_status+0xe8> - 123bc: 83 ec 08 sub $0x8,%esp - 123bf: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 123c2: 8b 50 74 mov 0x74(%eax),%edx - 123c5: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 123c8: ff 70 24 pushl 0x24(%eax) - 123cb: ff 75 f8 pushl 0xfffffff8(%ebp) - 123ce: 8b 42 34 mov 0x34(%edx),%eax - 123d1: ff d0 call *%eax - 123d3: 83 c4 10 add $0x10,%esp - 123d6: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 123d9: c7 05 00 c0 01 00 01 movl $0x1,0x1c000 - 123e0: 00 00 00 - 123e3: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) - 123e7: 7e 29 jle 12412 <_rh_report_status+0xb4> - 123e9: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 123ec: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax) - 123f3: 8b 55 fc mov 0xfffffffc(%ebp),%edx - 123f6: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 123f9: 89 42 30 mov %eax,0x30(%edx) - 123fc: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 123ff: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) - 12406: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 12409: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) - 12410: eb 1b jmp 1242d <_rh_report_status+0xcf> - 12412: 83 ec 08 sub $0x8,%esp - 12415: a1 40 c2 01 00 mov 0x1c240,%eax - 1241a: 83 c0 19 add $0x19,%eax - 1241d: 50 push %eax - 1241e: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 12421: 83 c0 54 add $0x54,%eax - 12424: 50 push %eax - 12425: e8 1e 00 00 00 call 12448 <_mod_timer> - 1242a: 83 c4 10 add $0x10,%esp - 1242d: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) - 12431: 7e 13 jle 12446 <_rh_report_status+0xe8> - 12433: 83 ec 04 sub $0x4,%esp - 12436: 6a 00 push $0x0 - 12438: ff 75 fc pushl 0xfffffffc(%ebp) - 1243b: ff 75 f8 pushl 0xfffffff8(%ebp) - 1243e: e8 53 12 00 00 call 13696 <_usb_hcd_giveback_urb@12> - 12443: 83 c4 04 add $0x4,%esp - 12446: c9 leave - 12447: c3 ret - -00012448 <_mod_timer>: - 12448: 55 push %ebp - 12449: 89 e5 mov %esp,%ebp - 1244b: 83 ec 08 sub $0x8,%esp - 1244e: 83 ec 0c sub $0xc,%esp - 12451: ff 75 08 pushl 0x8(%ebp) - 12454: e8 19 00 00 00 call 12472 <_del_timer> - 12459: 83 c4 10 add $0x10,%esp - 1245c: 8b 55 08 mov 0x8(%ebp),%edx - 1245f: 8b 45 0c mov 0xc(%ebp),%eax - 12462: 89 42 08 mov %eax,0x8(%edx) - 12465: ff 75 08 pushl 0x8(%ebp) - 12468: e8 84 fe ff ff call 122f1 <_add_timer> - 1246d: 83 c4 04 add $0x4,%esp - 12470: c9 leave - 12471: c3 ret - -00012472 <_del_timer>: - 12472: 55 push %ebp - 12473: 89 e5 mov %esp,%ebp - 12475: 83 ec 04 sub $0x4,%esp - 12478: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) - 1247f: 83 7d fc 13 cmpl $0x13,0xfffffffc(%ebp) - 12483: 7f 26 jg 124ab <_del_timer+0x39> - 12485: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 12488: 8b 04 85 60 c1 01 00 mov 0x1c160(,%eax,4),%eax - 1248f: 3b 45 08 cmp 0x8(%ebp),%eax - 12492: 75 10 jne 124a4 <_del_timer+0x32> - 12494: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 12497: c7 04 85 60 c1 01 00 movl $0x0,0x1c160(,%eax,4) - 1249e: 00 00 00 00 - 124a2: eb 07 jmp 124ab <_del_timer+0x39> - 124a4: 8d 45 fc lea 0xfffffffc(%ebp),%eax - 124a7: ff 00 incl (%eax) - 124a9: eb d4 jmp 1247f <_del_timer+0xd> - 124ab: c9 leave - 124ac: c3 ret - -000124ad <_rh_urb_enqueue>: - 124ad: 55 push %ebp - 124ae: 89 e5 mov %esp,%ebp - 124b0: 83 ec 18 sub $0x18,%esp - 124b3: 8b 45 0c mov 0xc(%ebp),%eax - 124b6: 8b 40 18 mov 0x18(%eax),%eax - 124b9: c1 e8 1e shr $0x1e,%eax - 124bc: 83 e0 03 and $0x3,%eax - 124bf: 83 f8 01 cmp $0x1,%eax - 124c2: 75 23 jne 124e7 <_rh_urb_enqueue+0x3a> - 124c4: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) - 124cb: 83 ec 08 sub $0x8,%esp - 124ce: ff 75 0c pushl 0xc(%ebp) - 124d1: ff 75 08 pushl 0x8(%ebp) - 124d4: e8 6d fd ff ff call 12246 <_rh_status_urb> - 124d9: 83 c4 10 add $0x10,%esp - 124dc: 89 45 fc mov %eax,0xfffffffc(%ebp) - 124df: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 124e2: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 124e5: eb 2e jmp 12515 <_rh_urb_enqueue+0x68> - 124e7: 8b 45 0c mov 0xc(%ebp),%eax - 124ea: 8b 40 18 mov 0x18(%eax),%eax - 124ed: c1 e8 1e shr $0x1e,%eax - 124f0: 83 e0 03 and $0x3,%eax - 124f3: 83 f8 02 cmp $0x2,%eax - 124f6: 75 16 jne 1250e <_rh_urb_enqueue+0x61> - 124f8: 83 ec 08 sub $0x8,%esp - 124fb: ff 75 0c pushl 0xc(%ebp) - 124fe: ff 75 08 pushl 0x8(%ebp) - 12501: e8 06 fa ff ff call 11f0c <_rh_call_control> - 12506: 83 c4 10 add $0x10,%esp - 12509: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 1250c: eb 07 jmp 12515 <_rh_urb_enqueue+0x68> - 1250e: c7 45 f4 ea ff ff ff movl $0xffffffea,0xfffffff4(%ebp) - 12515: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 12518: c9 leave - 12519: c3 ret - -0001251a <_usb_rh_status_dequeue>: - 1251a: 55 push %ebp - 1251b: 89 e5 mov %esp,%ebp - 1251d: 83 ec 08 sub $0x8,%esp - 12520: 83 ec 0c sub $0xc,%esp - 12523: 8b 45 08 mov 0x8(%ebp),%eax - 12526: 83 c0 54 add $0x54,%eax - 12529: 50 push %eax - 1252a: e8 2c 00 00 00 call 1255b <_del_timer_sync> - 1252f: 83 c4 10 add $0x10,%esp - 12532: 8b 45 08 mov 0x8(%ebp),%eax - 12535: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax) - 1253c: 8b 45 0c mov 0xc(%ebp),%eax - 1253f: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) - 12546: 83 ec 04 sub $0x4,%esp - 12549: 6a 00 push $0x0 - 1254b: ff 75 0c pushl 0xc(%ebp) - 1254e: ff 75 08 pushl 0x8(%ebp) - 12551: e8 40 11 00 00 call 13696 <_usb_hcd_giveback_urb@12> - 12556: 83 c4 04 add $0x4,%esp - 12559: c9 leave - 1255a: c3 ret - -0001255b <_del_timer_sync>: - 1255b: 55 push %ebp - 1255c: 89 e5 mov %esp,%ebp - 1255e: 83 ec 04 sub $0x4,%esp - 12561: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) - 12568: 83 7d fc 13 cmpl $0x13,0xfffffffc(%ebp) - 1256c: 7f 26 jg 12594 <_del_timer_sync+0x39> - 1256e: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 12571: 8b 04 85 60 c1 01 00 mov 0x1c160(,%eax,4),%eax - 12578: 3b 45 08 cmp 0x8(%ebp),%eax - 1257b: 75 10 jne 1258d <_del_timer_sync+0x32> - 1257d: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 12580: c7 04 85 60 c1 01 00 movl $0x0,0x1c160(,%eax,4) - 12587: 00 00 00 00 - 1258b: eb 07 jmp 12594 <_del_timer_sync+0x39> - 1258d: 8d 45 fc lea 0xfffffffc(%ebp),%eax - 12590: ff 00 incl (%eax) - 12592: eb d4 jmp 12568 <_del_timer_sync+0xd> - 12594: c9 leave - 12595: c3 ret - -00012596 <_usb_bus_get>: - 12596: 55 push %ebp - 12597: 89 e5 mov %esp,%ebp - 12599: 8b 45 08 mov 0x8(%ebp),%eax - 1259c: 83 c0 48 add $0x48,%eax - 1259f: 8b 55 08 mov 0x8(%ebp),%edx - 125a2: 83 c2 48 add $0x48,%edx - 125a5: 8b 12 mov (%edx),%edx - 125a7: 42 inc %edx - 125a8: 89 10 mov %edx,(%eax) - 125aa: 5d pop %ebp - 125ab: c3 ret - -000125ac <_usb_bus_put>: - 125ac: 55 push %ebp - 125ad: 89 e5 mov %esp,%ebp - 125af: 83 ec 08 sub $0x8,%esp - 125b2: 8b 55 08 mov 0x8(%ebp),%edx - 125b5: 83 c2 48 add $0x48,%edx - 125b8: 8b 45 08 mov 0x8(%ebp),%eax - 125bb: 83 c0 48 add $0x48,%eax - 125be: 8b 00 mov (%eax),%eax - 125c0: 48 dec %eax - 125c1: 89 02 mov %eax,(%edx) - 125c3: 8b 45 08 mov 0x8(%ebp),%eax - 125c6: 83 c0 48 add $0x48,%eax - 125c9: 83 38 00 cmpl $0x0,(%eax) - 125cc: 75 0e jne 125dc <_usb_bus_put+0x30> - 125ce: 83 ec 0c sub $0xc,%esp - 125d1: ff 75 08 pushl 0x8(%ebp) - 125d4: e8 67 74 00 00 call 19a40 <_ExFreePool@4> - 125d9: 83 c4 0c add $0xc,%esp - 125dc: c9 leave - 125dd: c3 ret - -000125de <_usb_bus_init@4>: - 125de: 55 push %ebp - 125df: 89 e5 mov %esp,%ebp - 125e1: 83 ec 08 sub $0x8,%esp - 125e4: 83 ec 04 sub $0x4,%esp - 125e7: 6a 10 push $0x10 - 125e9: 6a 00 push $0x0 - 125eb: 8b 45 08 mov 0x8(%ebp),%eax - 125ee: 83 c0 10 add $0x10,%eax - 125f1: 50 push %eax - 125f2: e8 59 74 00 00 call 19a50 <_memset> - 125f7: 83 c4 10 add $0x10,%esp - 125fa: 8b 45 08 mov 0x8(%ebp),%eax - 125fd: c7 40 0c 01 00 00 00 movl $0x1,0xc(%eax) - 12604: 8b 45 08 mov 0x8(%ebp),%eax - 12607: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) - 1260e: 8b 45 08 mov 0x8(%ebp),%eax - 12611: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) - 12618: 8b 45 08 mov 0x8(%ebp),%eax - 1261b: c7 40 04 ff ff ff ff movl $0xffffffff,0x4(%eax) - 12622: 8b 45 08 mov 0x8(%ebp),%eax - 12625: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) - 1262c: 8b 45 08 mov 0x8(%ebp),%eax - 1262f: c7 40 38 00 00 00 00 movl $0x0,0x38(%eax) - 12636: 8b 45 08 mov 0x8(%ebp),%eax - 12639: c7 40 3c 00 00 00 00 movl $0x0,0x3c(%eax) - 12640: 8b 55 08 mov 0x8(%ebp),%edx - 12643: 83 c2 28 add $0x28,%edx - 12646: 8b 45 08 mov 0x8(%ebp),%eax - 12649: 83 c0 28 add $0x28,%eax - 1264c: 89 02 mov %eax,(%edx) - 1264e: 8b 55 08 mov 0x8(%ebp),%edx - 12651: 83 c2 28 add $0x28,%edx - 12654: 8b 45 08 mov 0x8(%ebp),%eax - 12657: 83 c0 28 add $0x28,%eax - 1265a: 89 42 04 mov %eax,0x4(%edx) - 1265d: 8b 45 08 mov 0x8(%ebp),%eax - 12660: 83 c0 48 add $0x48,%eax - 12663: c7 00 01 00 00 00 movl $0x1,(%eax) - 12669: c9 leave - 1266a: c2 04 00 ret $0x4 - -0001266d <_usb_alloc_bus@4>: - 1266d: 55 push %ebp - 1266e: 89 e5 mov %esp,%ebp - 12670: 83 ec 08 sub $0x8,%esp - 12673: 83 ec 08 sub $0x8,%esp - 12676: 6a 4c push $0x4c - 12678: 6a 01 push $0x1 - 1267a: e8 b1 73 00 00 call 19a30 <_ExAllocatePool@8> - 1267f: 83 c4 08 add $0x8,%esp - 12682: 89 45 fc mov %eax,0xfffffffc(%ebp) - 12685: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) - 12689: 75 09 jne 12694 <_usb_alloc_bus@4+0x27> - 1268b: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) - 12692: eb 1d jmp 126b1 <_usb_alloc_bus@4+0x44> - 12694: 83 ec 0c sub $0xc,%esp - 12697: ff 75 fc pushl 0xfffffffc(%ebp) - 1269a: e8 3f ff ff ff call 125de <_usb_bus_init@4> - 1269f: 83 c4 0c add $0xc,%esp - 126a2: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 126a5: 8b 55 08 mov 0x8(%ebp),%edx - 126a8: 89 50 20 mov %edx,0x20(%eax) - 126ab: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 126ae: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 126b1: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 126b4: c9 leave - 126b5: c2 04 00 ret $0x4 - -000126b8 <_usb_free_bus@4>: - 126b8: 55 push %ebp - 126b9: 89 e5 mov %esp,%ebp - 126bb: 83 ec 08 sub $0x8,%esp - 126be: 83 7d 08 00 cmpl $0x0,0x8(%ebp) - 126c2: 75 02 jne 126c6 <_usb_free_bus@4+0xe> - 126c4: eb 0e jmp 126d4 <_usb_free_bus@4+0x1c> - 126c6: 83 ec 0c sub $0xc,%esp - 126c9: ff 75 08 pushl 0x8(%ebp) - 126cc: e8 db fe ff ff call 125ac <_usb_bus_put> - 126d1: 83 c4 10 add $0x10,%esp - 126d4: c9 leave - 126d5: c2 04 00 ret $0x4 - -000126d8 <_usb_register_bus@4>: - 126d8: 55 push %ebp - 126d9: 89 e5 mov %esp,%ebp - 126db: 83 ec 08 sub $0x8,%esp - 126de: 83 ec 04 sub $0x4,%esp - 126e1: 6a 01 push $0x1 - 126e3: 6a 40 push $0x40 - 126e5: 68 10 c0 01 00 push $0x1c010 - 126ea: e8 b4 00 00 00 call 127a3 <_find_next_zero_bit> - 126ef: 83 c4 10 add $0x10,%esp - 126f2: 89 45 fc mov %eax,0xfffffffc(%ebp) - 126f5: 83 7d fc 3f cmpl $0x3f,0xfffffffc(%ebp) - 126f9: 7f 1c jg 12717 <_usb_register_bus@4+0x3f> - 126fb: 83 ec 08 sub $0x8,%esp - 126fe: 68 10 c0 01 00 push $0x1c010 - 12703: ff 75 fc pushl 0xfffffffc(%ebp) - 12706: e8 8a 00 00 00 call 12795 <_set_bit> - 1270b: 83 c4 10 add $0x10,%esp - 1270e: 8b 55 08 mov 0x8(%ebp),%edx - 12711: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 12714: 89 42 04 mov %eax,0x4(%edx) - 12717: ff 75 08 pushl 0x8(%ebp) - 1271a: e8 77 fe ff ff call 12596 <_usb_bus_get> - 1271f: 83 c4 04 add $0x4,%esp - 12722: 83 ec 08 sub $0x8,%esp - 12725: 68 00 a0 01 00 push $0x1a000 - 1272a: 8b 45 08 mov 0x8(%ebp),%eax - 1272d: 83 c0 28 add $0x28,%eax - 12730: 50 push %eax - 12731: e8 1a 00 00 00 call 12750 <_list_add> - 12736: 83 c4 10 add $0x10,%esp - 12739: 83 ec 0c sub $0xc,%esp - 1273c: ff 75 08 pushl 0x8(%ebp) - 1273f: e8 07 00 00 00 call 1274b <_usbfs_add_bus> - 12744: 83 c4 10 add $0x10,%esp - 12747: c9 leave - 12748: c2 04 00 ret $0x4 - -0001274b <_usbfs_add_bus>: - 1274b: 55 push %ebp - 1274c: 89 e5 mov %esp,%ebp - 1274e: 5d pop %ebp - 1274f: c3 ret - -00012750 <_list_add>: - 12750: 55 push %ebp - 12751: 89 e5 mov %esp,%ebp - 12753: 83 ec 08 sub $0x8,%esp - 12756: 83 ec 04 sub $0x4,%esp - 12759: 8b 45 0c mov 0xc(%ebp),%eax - 1275c: ff 30 pushl (%eax) - 1275e: ff 75 0c pushl 0xc(%ebp) - 12761: ff 75 08 pushl 0x8(%ebp) - 12764: e8 05 00 00 00 call 1276e <___list_add> - 12769: 83 c4 10 add $0x10,%esp - 1276c: c9 leave - 1276d: c3 ret - -0001276e <___list_add>: - 1276e: 55 push %ebp - 1276f: 89 e5 mov %esp,%ebp - 12771: 8b 55 10 mov 0x10(%ebp),%edx - 12774: 8b 45 08 mov 0x8(%ebp),%eax - 12777: 89 42 04 mov %eax,0x4(%edx) - 1277a: 8b 55 08 mov 0x8(%ebp),%edx - 1277d: 8b 45 10 mov 0x10(%ebp),%eax - 12780: 89 02 mov %eax,(%edx) - 12782: 8b 55 08 mov 0x8(%ebp),%edx - 12785: 8b 45 0c mov 0xc(%ebp),%eax - 12788: 89 42 04 mov %eax,0x4(%edx) - 1278b: 8b 55 0c mov 0xc(%ebp),%edx - 1278e: 8b 45 08 mov 0x8(%ebp),%eax - 12791: 89 02 mov %eax,(%edx) - 12793: 5d pop %ebp - 12794: c3 ret - -00012795 <_set_bit>: - 12795: 55 push %ebp - 12796: 89 e5 mov %esp,%ebp - 12798: 8b 55 0c mov 0xc(%ebp),%edx - 1279b: 8b 45 08 mov 0x8(%ebp),%eax - 1279e: 0f ab 02 bts %eax,(%edx) - 127a1: 5d pop %ebp - 127a2: c3 ret - -000127a3 <_find_next_zero_bit>: - 127a3: 55 push %ebp - 127a4: 89 e5 mov %esp,%ebp - 127a6: 83 ec 18 sub $0x18,%esp - 127a9: 8b 45 10 mov 0x10(%ebp),%eax - 127ac: c1 f8 05 sar $0x5,%eax - 127af: c1 e0 02 shl $0x2,%eax - 127b2: 03 45 08 add 0x8(%ebp),%eax - 127b5: 89 45 fc mov %eax,0xfffffffc(%ebp) - 127b8: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) - 127bf: 8b 45 10 mov 0x10(%ebp),%eax - 127c2: 83 e0 1f and $0x1f,%eax - 127c5: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 127c8: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) - 127cc: 74 42 je 12810 <_find_next_zero_bit+0x6d> - 127ce: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 127d1: 8b 4d f4 mov 0xfffffff4(%ebp),%ecx - 127d4: 8b 00 mov (%eax),%eax - 127d6: d3 e8 shr %cl,%eax - 127d8: f7 d0 not %eax - 127da: 0f bc c0 bsf %eax,%eax - 127dd: 75 05 jne 127e4 <_find_next_zero_bit+0x41> - 127df: b8 20 00 00 00 mov $0x20,%eax - 127e4: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 127e7: b8 20 00 00 00 mov $0x20,%eax - 127ec: 2b 45 f4 sub 0xfffffff4(%ebp),%eax - 127ef: 3b 45 f8 cmp 0xfffffff8(%ebp),%eax - 127f2: 7e 0b jle 127ff <_find_next_zero_bit+0x5c> - 127f4: 8b 45 10 mov 0x10(%ebp),%eax - 127f7: 03 45 f8 add 0xfffffff8(%ebp),%eax - 127fa: 89 45 ec mov %eax,0xffffffec(%ebp) - 127fd: eb 43 jmp 12842 <_find_next_zero_bit+0x9f> - 127ff: b8 20 00 00 00 mov $0x20,%eax - 12804: 2b 45 f4 sub 0xfffffff4(%ebp),%eax - 12807: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 1280a: 8d 45 fc lea 0xfffffffc(%ebp),%eax - 1280d: 83 00 04 addl $0x4,(%eax) - 12810: 83 ec 08 sub $0x8,%esp - 12813: 8b 55 08 mov 0x8(%ebp),%edx - 12816: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 12819: 29 d0 sub %edx,%eax - 1281b: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx - 12822: 8b 45 0c mov 0xc(%ebp),%eax - 12825: 29 d0 sub %edx,%eax - 12827: 50 push %eax - 12828: ff 75 fc pushl 0xfffffffc(%ebp) - 1282b: e8 17 00 00 00 call 12847 <_find_first_zero_bit> - 12830: 83 c4 10 add $0x10,%esp - 12833: 89 45 f0 mov %eax,0xfffffff0(%ebp) - 12836: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 12839: 03 45 10 add 0x10(%ebp),%eax - 1283c: 03 45 f0 add 0xfffffff0(%ebp),%eax - 1283f: 89 45 ec mov %eax,0xffffffec(%ebp) - 12842: 8b 45 ec mov 0xffffffec(%ebp),%eax - 12845: c9 leave - 12846: c3 ret - -00012847 <_find_first_zero_bit>: - 12847: 55 push %ebp - 12848: 89 e5 mov %esp,%ebp - 1284a: 57 push %edi - 1284b: 53 push %ebx - 1284c: 83 ec 14 sub $0x14,%esp - 1284f: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) - 12853: 75 09 jne 1285e <_find_first_zero_bit+0x17> - 12855: c7 45 e4 00 00 00 00 movl $0x0,0xffffffe4(%ebp) - 1285c: eb 48 jmp 128a6 <_find_first_zero_bit+0x5f> - 1285e: 8b 45 0c mov 0xc(%ebp),%eax - 12861: 83 c0 1f add $0x1f,%eax - 12864: 89 c1 mov %eax,%ecx - 12866: c1 e9 05 shr $0x5,%ecx - 12869: 8b 7d 08 mov 0x8(%ebp),%edi - 1286c: 8b 5d 08 mov 0x8(%ebp),%ebx - 1286f: b8 ff ff ff ff mov $0xffffffff,%eax - 12874: 31 d2 xor %edx,%edx - 12876: f3 af repz scas %es:(%edi),%eax - 12878: 74 09 je 12883 <_find_first_zero_bit+0x3c> - 1287a: 33 47 fc xor 0xfffffffc(%edi),%eax - 1287d: 83 ef 04 sub $0x4,%edi - 12880: 0f bc d0 bsf %eax,%edx - 12883: 29 df sub %ebx,%edi - 12885: c1 e7 03 shl $0x3,%edi - 12888: 01 fa add %edi,%edx - 1288a: 89 c3 mov %eax,%ebx - 1288c: 89 d0 mov %edx,%eax - 1288e: 89 45 e8 mov %eax,0xffffffe8(%ebp) - 12891: 89 c8 mov %ecx,%eax - 12893: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 12896: 89 f8 mov %edi,%eax - 12898: 89 45 f0 mov %eax,0xfffffff0(%ebp) - 1289b: 89 d8 mov %ebx,%eax - 1289d: 89 45 ec mov %eax,0xffffffec(%ebp) - 128a0: 8b 45 e8 mov 0xffffffe8(%ebp),%eax - 128a3: 89 45 e4 mov %eax,0xffffffe4(%ebp) - 128a6: 8b 45 e4 mov 0xffffffe4(%ebp),%eax - 128a9: 83 c4 14 add $0x14,%esp - 128ac: 5b pop %ebx - 128ad: 5f pop %edi - 128ae: 5d pop %ebp - 128af: c3 ret - -000128b0 <_usb_deregister_bus@4>: - 128b0: 55 push %ebp - 128b1: 89 e5 mov %esp,%ebp - 128b3: 83 ec 08 sub $0x8,%esp - 128b6: 83 ec 0c sub $0xc,%esp - 128b9: 8b 45 08 mov 0x8(%ebp),%eax - 128bc: 83 c0 28 add $0x28,%eax - 128bf: 50 push %eax - 128c0: e8 4c 00 00 00 call 12911 <_list_del> - 128c5: 83 c4 10 add $0x10,%esp - 128c8: 83 ec 0c sub $0xc,%esp - 128cb: ff 75 08 pushl 0x8(%ebp) - 128ce: e8 39 00 00 00 call 1290c <_usbfs_remove_bus> - 128d3: 83 c4 10 add $0x10,%esp - 128d6: 83 ec 08 sub $0x8,%esp - 128d9: 68 10 c0 01 00 push $0x1c010 - 128de: 8b 45 08 mov 0x8(%ebp),%eax - 128e1: ff 70 04 pushl 0x4(%eax) - 128e4: e8 15 00 00 00 call 128fe <_clear_bit> - 128e9: 83 c4 10 add $0x10,%esp - 128ec: 83 ec 0c sub $0xc,%esp - 128ef: ff 75 08 pushl 0x8(%ebp) - 128f2: e8 b5 fc ff ff call 125ac <_usb_bus_put> - 128f7: 83 c4 10 add $0x10,%esp - 128fa: c9 leave - 128fb: c2 04 00 ret $0x4 - -000128fe <_clear_bit>: - 128fe: 55 push %ebp - 128ff: 89 e5 mov %esp,%ebp - 12901: 8b 55 0c mov 0xc(%ebp),%edx - 12904: 8b 45 08 mov 0x8(%ebp),%eax - 12907: 0f b3 02 btr %eax,(%edx) - 1290a: 5d pop %ebp - 1290b: c3 ret - -0001290c <_usbfs_remove_bus>: - 1290c: 55 push %ebp - 1290d: 89 e5 mov %esp,%ebp - 1290f: 5d pop %ebp - 12910: c3 ret - -00012911 <_list_del>: - 12911: 55 push %ebp - 12912: 89 e5 mov %esp,%ebp - 12914: 83 ec 08 sub $0x8,%esp - 12917: 83 ec 08 sub $0x8,%esp - 1291a: 8b 45 08 mov 0x8(%ebp),%eax - 1291d: ff 30 pushl (%eax) - 1291f: 8b 45 08 mov 0x8(%ebp),%eax - 12922: ff 70 04 pushl 0x4(%eax) - 12925: e8 18 00 00 00 call 12942 <___list_del> - 1292a: 83 c4 10 add $0x10,%esp - 1292d: 8b 45 08 mov 0x8(%ebp),%eax - 12930: c7 00 00 00 00 00 movl $0x0,(%eax) - 12936: 8b 45 08 mov 0x8(%ebp),%eax - 12939: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) - 12940: c9 leave - 12941: c3 ret - -00012942 <___list_del>: - 12942: 55 push %ebp - 12943: 89 e5 mov %esp,%ebp - 12945: 8b 55 0c mov 0xc(%ebp),%edx - 12948: 8b 45 08 mov 0x8(%ebp),%eax - 1294b: 89 42 04 mov %eax,0x4(%edx) - 1294e: 8b 55 08 mov 0x8(%ebp),%edx - 12951: 8b 45 0c mov 0xc(%ebp),%eax - 12954: 89 02 mov %eax,(%edx) - 12956: 5d pop %ebp - 12957: c3 ret - -00012958 <_usb_register_root_hub@8>: - 12958: 55 push %ebp - 12959: 89 e5 mov %esp,%ebp - 1295b: 83 ec 08 sub $0x8,%esp - 1295e: 83 ec 04 sub $0x4,%esp - 12961: 8b 45 08 mov 0x8(%ebp),%eax - 12964: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax - 1296a: ff 70 04 pushl 0x4(%eax) - 1296d: 68 b9 b0 01 00 push $0x1b0b9 - 12972: 8b 45 08 mov 0x8(%ebp),%eax - 12975: 05 48 01 00 00 add $0x148,%eax - 1297a: 50 push %eax - 1297b: e8 10 71 00 00 call 19a90 <_sprintf> - 12980: 83 c4 10 add $0x10,%esp - 12983: 8b 45 08 mov 0x8(%ebp),%eax - 12986: c7 40 14 03 00 00 00 movl $0x3,0x14(%eax) - 1298d: 83 ec 08 sub $0x8,%esp - 12990: ff 75 0c pushl 0xc(%ebp) - 12993: ff 75 08 pushl 0x8(%ebp) - 12996: e8 f8 41 00 00 call 16b93 <_usb_new_device> - 1299b: 83 c4 10 add $0x10,%esp - 1299e: 89 45 fc mov %eax,0xfffffffc(%ebp) - 129a1: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 129a4: c9 leave - 129a5: c2 08 00 ret $0x8 - -000129a8 <_usb_calc_bus_time@16>: - 129a8: 55 push %ebp - 129a9: 89 e5 mov %esp,%ebp - 129ab: 83 ec 14 sub $0x14,%esp - 129ae: 8b 45 08 mov 0x8(%ebp),%eax - 129b1: 89 45 f0 mov %eax,0xfffffff0(%ebp) - 129b4: 83 7d f0 02 cmpl $0x2,0xfffffff0(%ebp) - 129b8: 0f 84 21 01 00 00 je 12adf <_usb_calc_bus_time@16+0x137> - 129be: 83 7d f0 02 cmpl $0x2,0xfffffff0(%ebp) - 129c2: 7f 0b jg 129cf <_usb_calc_bus_time@16+0x27> - 129c4: 83 7d f0 01 cmpl $0x1,0xfffffff0(%ebp) - 129c8: 74 14 je 129de <_usb_calc_bus_time@16+0x36> - 129ca: e9 e4 02 00 00 jmp 12cb3 <_usb_calc_bus_time@16+0x30b> - 129cf: 83 7d f0 03 cmpl $0x3,0xfffffff0(%ebp) - 129d3: 0f 84 12 02 00 00 je 12beb <_usb_calc_bus_time@16+0x243> - 129d9: e9 d5 02 00 00 jmp 12cb3 <_usb_calc_bus_time@16+0x30b> - 129de: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) - 129e2: 74 76 je 12a5a <_usb_calc_bus_time@16+0xb2> - 129e4: 8b 55 14 mov 0x14(%ebp),%edx - 129e7: 89 d0 mov %edx,%eax - 129e9: c1 e0 03 shl $0x3,%eax - 129ec: 29 d0 sub %edx,%eax - 129ee: c1 e0 03 shl $0x3,%eax - 129f1: 89 45 ec mov %eax,0xffffffec(%ebp) - 129f4: b8 ab aa aa 2a mov $0x2aaaaaab,%eax - 129f9: f7 6d ec imull 0xffffffec(%ebp) - 129fc: 89 d1 mov %edx,%ecx - 129fe: 8b 45 ec mov 0xffffffec(%ebp),%eax - 12a01: c1 f8 1f sar $0x1f,%eax - 12a04: 89 ca mov %ecx,%edx - 12a06: 29 c2 sub %eax,%edx - 12a08: 89 d0 mov %edx,%eax - 12a0a: c1 e0 02 shl $0x2,%eax - 12a0d: 01 d0 add %edx,%eax - 12a0f: c1 e0 03 shl $0x3,%eax - 12a12: 01 d0 add %edx,%eax - 12a14: c1 e0 02 shl $0x2,%eax - 12a17: 01 d0 add %edx,%eax - 12a19: c1 e0 03 shl $0x3,%eax - 12a1c: 01 d0 add %edx,%eax - 12a1e: 01 c0 add %eax,%eax - 12a20: 01 d0 add %edx,%eax - 12a22: c1 e0 02 shl $0x2,%eax - 12a25: 01 d0 add %edx,%eax - 12a27: c1 e0 05 shl $0x5,%eax - 12a2a: 29 d0 sub %edx,%eax - 12a2c: 01 c0 add %eax,%eax - 12a2e: 8d 88 0d 02 20 00 lea 0x20020d(%eax),%ecx - 12a34: b8 d3 4d 62 10 mov $0x10624dd3,%eax - 12a39: f7 e9 imul %ecx - 12a3b: c1 fa 06 sar $0x6,%edx - 12a3e: 89 c8 mov %ecx,%eax - 12a40: c1 f8 1f sar $0x1f,%eax - 12a43: 29 c2 sub %eax,%edx - 12a45: 89 d0 mov %edx,%eax - 12a47: 89 45 fc mov %eax,0xfffffffc(%ebp) - 12a4a: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 12a4d: 05 be 00 01 00 add $0x100be,%eax - 12a52: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 12a55: e9 60 02 00 00 jmp 12cba <_usb_calc_bus_time@16+0x312> - 12a5a: 8b 55 14 mov 0x14(%ebp),%edx - 12a5d: 89 d0 mov %edx,%eax - 12a5f: c1 e0 03 shl $0x3,%eax - 12a62: 29 d0 sub %edx,%eax - 12a64: c1 e0 03 shl $0x3,%eax - 12a67: 89 45 ec mov %eax,0xffffffec(%ebp) - 12a6a: b8 ab aa aa 2a mov $0x2aaaaaab,%eax - 12a6f: f7 6d ec imull 0xffffffec(%ebp) - 12a72: 89 d1 mov %edx,%ecx - 12a74: 8b 45 ec mov 0xffffffec(%ebp),%eax - 12a77: c1 f8 1f sar $0x1f,%eax - 12a7a: 29 c1 sub %eax,%ecx - 12a7c: 89 c8 mov %ecx,%eax - 12a7e: c1 e0 03 shl $0x3,%eax - 12a81: 01 c8 add %ecx,%eax - 12a83: c1 e0 02 shl $0x2,%eax - 12a86: 01 c8 add %ecx,%eax - 12a88: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx - 12a8f: 01 d0 add %edx,%eax - 12a91: 01 c0 add %eax,%eax - 12a93: 01 c8 add %ecx,%eax - 12a95: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx - 12a9c: 01 d0 add %edx,%eax - 12a9e: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx - 12aa5: 01 d0 add %edx,%eax - 12aa7: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx - 12aae: 01 d0 add %edx,%eax - 12ab0: c1 e0 03 shl $0x3,%eax - 12ab3: 8d 88 f4 8c 1f 00 lea 0x1f8cf4(%eax),%ecx - 12ab9: b8 d3 4d 62 10 mov $0x10624dd3,%eax - 12abe: f7 e9 imul %ecx - 12ac0: c1 fa 06 sar $0x6,%edx - 12ac3: 89 c8 mov %ecx,%eax - 12ac5: c1 f8 1f sar $0x1f,%eax - 12ac8: 29 c2 sub %eax,%edx - 12aca: 89 d0 mov %edx,%eax - 12acc: 89 45 fc mov %eax,0xfffffffc(%ebp) - 12acf: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 12ad2: 05 ed 00 01 00 add $0x100ed,%eax - 12ad7: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 12ada: e9 db 01 00 00 jmp 12cba <_usb_calc_bus_time@16+0x312> - 12adf: 83 7d 10 00 cmpl $0x0,0x10(%ebp) - 12ae3: 0f 84 8e 00 00 00 je 12b77 <_usb_calc_bus_time@16+0x1cf> - 12ae9: 8b 55 14 mov 0x14(%ebp),%edx - 12aec: 89 d0 mov %edx,%eax - 12aee: c1 e0 03 shl $0x3,%eax - 12af1: 29 d0 sub %edx,%eax - 12af3: c1 e0 03 shl $0x3,%eax - 12af6: 89 45 ec mov %eax,0xffffffec(%ebp) - 12af9: b8 ab aa aa 2a mov $0x2aaaaaab,%eax - 12afe: f7 6d ec imull 0xffffffec(%ebp) - 12b01: 89 d1 mov %edx,%ecx - 12b03: 8b 45 ec mov 0xffffffec(%ebp),%eax - 12b06: c1 f8 1f sar $0x1f,%eax - 12b09: 29 c1 sub %eax,%ecx - 12b0b: 89 c8 mov %ecx,%eax - 12b0d: c1 e0 03 shl $0x3,%eax - 12b10: 01 c8 add %ecx,%eax - 12b12: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx - 12b19: 01 d0 add %edx,%eax - 12b1b: 01 c0 add %eax,%eax - 12b1d: 01 c8 add %ecx,%eax - 12b1f: c1 e0 03 shl $0x3,%eax - 12b22: 01 c8 add %ecx,%eax - 12b24: c1 e0 02 shl $0x2,%eax - 12b27: 01 c8 add %ecx,%eax - 12b29: c1 e0 02 shl $0x2,%eax - 12b2c: 01 c8 add %ecx,%eax - 12b2e: c1 e0 02 shl $0x2,%eax - 12b31: 8d 88 9e f3 03 00 lea 0x3f39e(%eax),%ecx - 12b37: b8 d3 4d 62 10 mov $0x10624dd3,%eax - 12b3c: f7 e9 imul %ecx - 12b3e: c1 fa 06 sar $0x6,%edx - 12b41: 89 c8 mov %ecx,%eax - 12b43: c1 f8 1f sar $0x1f,%eax - 12b46: 29 c2 sub %eax,%edx - 12b48: 89 d0 mov %edx,%eax - 12b4a: 89 45 fc mov %eax,0xfffffffc(%ebp) - 12b4d: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) - 12b51: 74 0d je 12b60 <_usb_calc_bus_time@16+0x1b8> - 12b53: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 12b56: 05 4c 20 00 00 add $0x204c,%eax - 12b5b: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 12b5e: eb 0c jmp 12b6c <_usb_calc_bus_time@16+0x1c4> - 12b60: 8b 55 fc mov 0xfffffffc(%ebp),%edx - 12b63: 81 c2 61 1c 00 00 add $0x1c61,%edx - 12b69: 89 55 f4 mov %edx,0xfffffff4(%ebp) - 12b6c: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 12b6f: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 12b72: e9 43 01 00 00 jmp 12cba <_usb_calc_bus_time@16+0x312> - 12b77: 8b 55 14 mov 0x14(%ebp),%edx - 12b7a: 89 d0 mov %edx,%eax - 12b7c: c1 e0 03 shl $0x3,%eax - 12b7f: 29 d0 sub %edx,%eax - 12b81: c1 e0 03 shl $0x3,%eax - 12b84: 89 45 ec mov %eax,0xffffffec(%ebp) - 12b87: b8 ab aa aa 2a mov $0x2aaaaaab,%eax - 12b8c: f7 6d ec imull 0xffffffec(%ebp) - 12b8f: 89 d1 mov %edx,%ecx - 12b91: 8b 45 ec mov 0xffffffec(%ebp),%eax - 12b94: c1 f8 1f sar $0x1f,%eax - 12b97: 29 c1 sub %eax,%ecx - 12b99: 89 c8 mov %ecx,%eax - 12b9b: c1 e0 03 shl $0x3,%eax - 12b9e: 01 c8 add %ecx,%eax - 12ba0: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx - 12ba7: 01 d0 add %edx,%eax - 12ba9: 01 c0 add %eax,%eax - 12bab: 01 c8 add %ecx,%eax - 12bad: c1 e0 03 shl $0x3,%eax - 12bb0: 01 c8 add %ecx,%eax - 12bb2: c1 e0 02 shl $0x2,%eax - 12bb5: 01 c8 add %ecx,%eax - 12bb7: c1 e0 02 shl $0x2,%eax - 12bba: 01 c8 add %ecx,%eax - 12bbc: c1 e0 02 shl $0x2,%eax - 12bbf: 8d 88 9e f3 03 00 lea 0x3f39e(%eax),%ecx - 12bc5: b8 d3 4d 62 10 mov $0x10624dd3,%eax - 12bca: f7 e9 imul %ecx - 12bcc: c1 fa 06 sar $0x6,%edx - 12bcf: 89 c8 mov %ecx,%eax - 12bd1: c1 f8 1f sar $0x1f,%eax - 12bd4: 29 c2 sub %eax,%edx - 12bd6: 89 d0 mov %edx,%eax - 12bd8: 89 45 fc mov %eax,0xfffffffc(%ebp) - 12bdb: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 12bde: 05 7b 27 00 00 add $0x277b,%eax - 12be3: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 12be6: e9 cf 00 00 00 jmp 12cba <_usb_calc_bus_time@16+0x312> - 12beb: 83 7d 10 00 cmpl $0x0,0x10(%ebp) - 12bef: 74 5e je 12c4f <_usb_calc_bus_time@16+0x2a7> - 12bf1: 8b 55 14 mov 0x14(%ebp),%edx - 12bf4: 89 d0 mov %edx,%eax - 12bf6: c1 e0 03 shl $0x3,%eax - 12bf9: 29 d0 sub %edx,%eax - 12bfb: c1 e0 03 shl $0x3,%eax - 12bfe: 89 45 ec mov %eax,0xffffffec(%ebp) - 12c01: b8 ab aa aa 2a mov $0x2aaaaaab,%eax - 12c06: f7 6d ec imull 0xffffffec(%ebp) - 12c09: 89 d1 mov %edx,%ecx - 12c0b: 8b 45 ec mov 0xffffffec(%ebp),%eax - 12c0e: c1 f8 1f sar $0x1f,%eax - 12c11: 89 ca mov %ecx,%edx - 12c13: 29 c2 sub %eax,%edx - 12c15: 89 d0 mov %edx,%eax - 12c17: c1 e0 06 shl $0x6,%eax - 12c1a: 01 d0 add %edx,%eax - 12c1c: c1 e0 03 shl $0x3,%eax - 12c1f: 01 d0 add %edx,%eax - 12c21: c1 e0 02 shl $0x2,%eax - 12c24: 29 d0 sub %edx,%eax - 12c26: 8d 90 fd a8 64 00 lea 0x64a8fd(%eax),%edx - 12c2c: b8 d3 4d 62 10 mov $0x10624dd3,%eax - 12c31: f7 e2 mul %edx - 12c33: 89 d0 mov %edx,%eax - 12c35: c1 e8 06 shr $0x6,%eax - 12c38: 8d 90 8d 05 00 00 lea 0x58d(%eax),%edx - 12c3e: b8 d3 4d 62 10 mov $0x10624dd3,%eax - 12c43: f7 e2 mul %edx - 12c45: 89 d0 mov %edx,%eax - 12c47: c1 e8 06 shr $0x6,%eax - 12c4a: 89 45 fc mov %eax,0xfffffffc(%ebp) - 12c4d: eb 5c jmp 12cab <_usb_calc_bus_time@16+0x303> - 12c4f: 8b 55 14 mov 0x14(%ebp),%edx - 12c52: 89 d0 mov %edx,%eax - 12c54: c1 e0 03 shl $0x3,%eax - 12c57: 29 d0 sub %edx,%eax - 12c59: c1 e0 03 shl $0x3,%eax - 12c5c: 89 45 ec mov %eax,0xffffffec(%ebp) - 12c5f: b8 ab aa aa 2a mov $0x2aaaaaab,%eax - 12c64: f7 6d ec imull 0xffffffec(%ebp) - 12c67: 89 d1 mov %edx,%ecx - 12c69: 8b 45 ec mov 0xffffffec(%ebp),%eax - 12c6c: c1 f8 1f sar $0x1f,%eax - 12c6f: 89 ca mov %ecx,%edx - 12c71: 29 c2 sub %eax,%edx - 12c73: 89 d0 mov %edx,%eax - 12c75: c1 e0 06 shl $0x6,%eax - 12c78: 01 d0 add %edx,%eax - 12c7a: c1 e0 03 shl $0x3,%eax - 12c7d: 01 d0 add %edx,%eax - 12c7f: c1 e0 02 shl $0x2,%eax - 12c82: 29 d0 sub %edx,%eax - 12c84: 8d 90 fd a8 64 00 lea 0x64a8fd(%eax),%edx - 12c8a: b8 d3 4d 62 10 mov $0x10624dd3,%eax - 12c8f: f7 e2 mul %edx - 12c91: 89 d0 mov %edx,%eax - 12c93: c1 e8 06 shr $0x6,%eax - 12c96: 8d 90 72 04 00 00 lea 0x472(%eax),%edx - 12c9c: b8 d3 4d 62 10 mov $0x10624dd3,%eax - 12ca1: f7 e2 mul %edx - 12ca3: 89 d0 mov %edx,%eax - 12ca5: c1 e8 06 shr $0x6,%eax - 12ca8: 89 45 fc mov %eax,0xfffffffc(%ebp) - 12cab: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 12cae: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 12cb1: eb 07 jmp 12cba <_usb_calc_bus_time@16+0x312> - 12cb3: c7 45 f8 ff ff ff ff movl $0xffffffff,0xfffffff8(%ebp) - 12cba: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 12cbd: c9 leave - 12cbe: c2 10 00 ret $0x10 - -00012cc1 <_usb_check_bandwidth@8>: - 12cc1: 55 push %ebp - 12cc2: 89 e5 mov %esp,%ebp - 12cc4: 83 ec 20 sub $0x20,%esp - 12cc7: 8b 45 0c mov 0xc(%ebp),%eax - 12cca: 8b 40 18 mov 0x18(%eax),%eax - 12ccd: 89 45 fc mov %eax,0xfffffffc(%ebp) - 12cd0: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 12cd3: 25 80 00 00 00 and $0x80,%eax - 12cd8: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 12cdb: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 12cde: c1 e8 1e shr $0x1e,%eax - 12ce1: 83 e0 03 and $0x3,%eax - 12ce4: 85 c0 test %eax,%eax - 12ce6: 0f 94 c0 sete %al - 12ce9: 25 ff 00 00 00 and $0xff,%eax - 12cee: 89 45 f0 mov %eax,0xfffffff0(%ebp) - 12cf1: 8b 45 08 mov 0x8(%ebp),%eax - 12cf4: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax - 12cfa: 8b 40 34 mov 0x34(%eax),%eax - 12cfd: 89 45 ec mov %eax,0xffffffec(%ebp) - 12d00: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) - 12d04: 75 15 jne 12d1b <_usb_check_bandwidth@8+0x5a> - 12d06: 8b 55 08 mov 0x8(%ebp),%edx - 12d09: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 12d0c: c1 e8 0f shr $0xf,%eax - 12d0f: 83 e0 0f and $0xf,%eax - 12d12: 8b 44 82 78 mov 0x78(%edx,%eax,4),%eax - 12d16: 89 45 e4 mov %eax,0xffffffe4(%ebp) - 12d19: eb 13 jmp 12d2e <_usb_check_bandwidth@8+0x6d> - 12d1b: 8b 55 08 mov 0x8(%ebp),%edx - 12d1e: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 12d21: c1 e8 0f shr $0xf,%eax - 12d24: 83 e0 0f and $0xf,%eax - 12d27: 8b 44 82 38 mov 0x38(%edx,%eax,4),%eax - 12d2b: 89 45 e4 mov %eax,0xffffffe4(%ebp) - 12d2e: ff 75 e4 pushl 0xffffffe4(%ebp) - 12d31: ff 75 f0 pushl 0xfffffff0(%ebp) - 12d34: ff 75 f4 pushl 0xfffffff4(%ebp) - 12d37: 8b 45 08 mov 0x8(%ebp),%eax - 12d3a: ff 70 18 pushl 0x18(%eax) - 12d3d: e8 66 fc ff ff call 129a8 <_usb_calc_bus_time@16> - 12d42: 8d 88 f4 01 00 00 lea 0x1f4(%eax),%ecx - 12d48: b8 d3 4d 62 10 mov $0x10624dd3,%eax - 12d4d: f7 e9 imul %ecx - 12d4f: c1 fa 06 sar $0x6,%edx - 12d52: 89 c8 mov %ecx,%eax - 12d54: c1 f8 1f sar $0x1f,%eax - 12d57: 29 c2 sub %eax,%edx - 12d59: 89 d0 mov %edx,%eax - 12d5b: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 12d5e: 83 7d f0 00 cmpl $0x0,0xfffffff0(%ebp) - 12d62: 74 13 je 12d77 <_usb_check_bandwidth@8+0xb6> - 12d64: 8b 45 0c mov 0xc(%ebp),%eax - 12d67: 89 45 e0 mov %eax,0xffffffe0(%ebp) - 12d6a: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 12d6d: 8b 4d e0 mov 0xffffffe0(%ebp),%ecx - 12d70: 99 cltd - 12d71: f7 79 44 idivl 0x44(%ecx) - 12d74: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 12d77: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 12d7a: 03 45 ec add 0xffffffec(%ebp),%eax - 12d7d: 89 45 e8 mov %eax,0xffffffe8(%ebp) - 12d80: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 12d83: c9 leave - 12d84: c2 08 00 ret $0x8 - -00012d87 <_usb_claim_bandwidth@16>: - 12d87: 55 push %ebp - 12d88: 89 e5 mov %esp,%ebp - 12d8a: 8b 45 08 mov 0x8(%ebp),%eax - 12d8d: 8b 88 bc 00 00 00 mov 0xbc(%eax),%ecx - 12d93: 8b 45 08 mov 0x8(%ebp),%eax - 12d96: 8b 90 bc 00 00 00 mov 0xbc(%eax),%edx - 12d9c: 8b 45 10 mov 0x10(%ebp),%eax - 12d9f: 03 42 34 add 0x34(%edx),%eax - 12da2: 89 41 34 mov %eax,0x34(%ecx) - 12da5: 83 7d 14 00 cmpl $0x0,0x14(%ebp) - 12da9: 74 0e je 12db9 <_usb_claim_bandwidth@16+0x32> - 12dab: 8b 45 08 mov 0x8(%ebp),%eax - 12dae: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax - 12db4: ff 40 3c incl 0x3c(%eax) - 12db7: eb 0c jmp 12dc5 <_usb_claim_bandwidth@16+0x3e> - 12db9: 8b 45 08 mov 0x8(%ebp),%eax - 12dbc: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax - 12dc2: ff 40 38 incl 0x38(%eax) - 12dc5: 8b 55 0c mov 0xc(%ebp),%edx - 12dc8: 8b 45 10 mov 0x10(%ebp),%eax - 12dcb: 89 42 34 mov %eax,0x34(%edx) - 12dce: 5d pop %ebp - 12dcf: c2 10 00 ret $0x10 - -00012dd2 <_usb_release_bandwidth@12>: - 12dd2: 55 push %ebp - 12dd3: 89 e5 mov %esp,%ebp - 12dd5: 53 push %ebx - 12dd6: 8b 45 08 mov 0x8(%ebp),%eax - 12dd9: 8b 98 bc 00 00 00 mov 0xbc(%eax),%ebx - 12ddf: 8b 45 08 mov 0x8(%ebp),%eax - 12de2: 8b 88 bc 00 00 00 mov 0xbc(%eax),%ecx - 12de8: 8b 45 0c mov 0xc(%ebp),%eax - 12deb: 8b 50 34 mov 0x34(%eax),%edx - 12dee: 8b 41 34 mov 0x34(%ecx),%eax - 12df1: 29 d0 sub %edx,%eax - 12df3: 89 43 34 mov %eax,0x34(%ebx) - 12df6: 83 7d 10 00 cmpl $0x0,0x10(%ebp) - 12dfa: 74 0e je 12e0a <_usb_release_bandwidth@12+0x38> - 12dfc: 8b 45 08 mov 0x8(%ebp),%eax - 12dff: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax - 12e05: ff 48 3c decl 0x3c(%eax) - 12e08: eb 0c jmp 12e16 <_usb_release_bandwidth@12+0x44> - 12e0a: 8b 45 08 mov 0x8(%ebp),%eax - 12e0d: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax - 12e13: ff 48 38 decl 0x38(%eax) - 12e16: 8b 45 0c mov 0xc(%ebp),%eax - 12e19: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) - 12e20: 5b pop %ebx - 12e21: 5d pop %ebp - 12e22: c2 0c 00 ret $0xc - -00012e25 <_hcd_alloc_dev>: - 12e25: 55 push %ebp - 12e26: 89 e5 mov %esp,%ebp - 12e28: 83 ec 18 sub $0x18,%esp - 12e2b: 83 7d 08 00 cmpl $0x0,0x8(%ebp) - 12e2f: 74 0e je 12e3f <_hcd_alloc_dev+0x1a> - 12e31: 8b 45 08 mov 0x8(%ebp),%eax - 12e34: 83 b8 98 01 00 00 00 cmpl $0x0,0x198(%eax) - 12e3b: 75 02 jne 12e3f <_hcd_alloc_dev+0x1a> - 12e3d: eb 0c jmp 12e4b <_hcd_alloc_dev+0x26> - 12e3f: c7 45 f0 ea ff ff ff movl $0xffffffea,0xfffffff0(%ebp) - 12e46: e9 e7 00 00 00 jmp 12f32 <_hcd_alloc_dev+0x10d> - 12e4b: 8b 45 08 mov 0x8(%ebp),%eax - 12e4e: 83 b8 bc 00 00 00 00 cmpl $0x0,0xbc(%eax) - 12e55: 74 0f je 12e66 <_hcd_alloc_dev+0x41> - 12e57: 8b 45 08 mov 0x8(%ebp),%eax - 12e5a: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax - 12e60: 83 78 30 00 cmpl $0x0,0x30(%eax) - 12e64: 75 0c jne 12e72 <_hcd_alloc_dev+0x4d> - 12e66: c7 45 f0 ed ff ff ff movl $0xffffffed,0xfffffff0(%ebp) - 12e6d: e9 c0 00 00 00 jmp 12f32 <_hcd_alloc_dev+0x10d> - 12e72: 8b 45 08 mov 0x8(%ebp),%eax - 12e75: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax - 12e7b: 8b 40 30 mov 0x30(%eax),%eax - 12e7e: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 12e81: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 12e84: 81 b8 e0 00 00 00 85 cmpl $0x85,0xe0(%eax) - 12e8b: 00 00 00 - 12e8e: 75 0c jne 12e9c <_hcd_alloc_dev+0x77> - 12e90: c7 45 f0 bd ff ff ff movl $0xffffffbd,0xfffffff0(%ebp) - 12e97: e9 96 00 00 00 jmp 12f32 <_hcd_alloc_dev+0x10d> - 12e9c: 83 ec 08 sub $0x8,%esp - 12e9f: 68 90 00 00 00 push $0x90 - 12ea4: 6a 01 push $0x1 - 12ea6: e8 85 6b 00 00 call 19a30 <_ExAllocatePool@8> - 12eab: 83 c4 08 add $0x8,%esp - 12eae: 89 45 fc mov %eax,0xfffffffc(%ebp) - 12eb1: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) - 12eb5: 75 09 jne 12ec0 <_hcd_alloc_dev+0x9b> - 12eb7: c7 45 f0 f4 ff ff ff movl $0xfffffff4,0xfffffff0(%ebp) - 12ebe: eb 72 jmp 12f32 <_hcd_alloc_dev+0x10d> - 12ec0: 83 ec 04 sub $0x4,%esp - 12ec3: 68 90 00 00 00 push $0x90 - 12ec8: 6a 00 push $0x0 - 12eca: ff 75 fc pushl 0xfffffffc(%ebp) - 12ecd: e8 7e 6b 00 00 call 19a50 <_memset> - 12ed2: 83 c4 10 add $0x10,%esp - 12ed5: 8b 55 fc mov 0xfffffffc(%ebp),%edx - 12ed8: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 12edb: 89 02 mov %eax,(%edx) - 12edd: 8b 55 fc mov 0xfffffffc(%ebp),%edx - 12ee0: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 12ee3: 89 42 04 mov %eax,0x4(%edx) - 12ee6: 8b 55 fc mov 0xfffffffc(%ebp),%edx - 12ee9: 83 c2 08 add $0x8,%edx - 12eec: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 12eef: 83 c0 08 add $0x8,%eax - 12ef2: 89 02 mov %eax,(%edx) - 12ef4: 8b 55 fc mov 0xfffffffc(%ebp),%edx - 12ef7: 83 c2 08 add $0x8,%edx - 12efa: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 12efd: 83 c0 08 add $0x8,%eax - 12f00: 89 42 04 mov %eax,0x4(%edx) - 12f03: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) - 12f0a: 83 ec 08 sub $0x8,%esp - 12f0d: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 12f10: 83 c0 68 add $0x68,%eax - 12f13: 50 push %eax - 12f14: ff 75 fc pushl 0xfffffffc(%ebp) - 12f17: e8 34 f8 ff ff call 12750 <_list_add> - 12f1c: 83 c4 10 add $0x10,%esp - 12f1f: 8b 55 08 mov 0x8(%ebp),%edx - 12f22: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 12f25: 89 82 98 01 00 00 mov %eax,0x198(%edx) - 12f2b: c7 45 f0 00 00 00 00 movl $0x0,0xfffffff0(%ebp) - 12f32: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 12f35: c9 leave - 12f36: c3 ret - -00012f37 <_urb_unlink>: - 12f37: 55 push %ebp - 12f38: 89 e5 mov %esp,%ebp - 12f3a: 83 ec 08 sub $0x8,%esp - 12f3d: 8b 45 08 mov 0x8(%ebp),%eax - 12f40: 83 78 34 00 cmpl $0x0,0x34(%eax) - 12f44: 74 25 je 12f6b <_urb_unlink+0x34> - 12f46: 8b 45 08 mov 0x8(%ebp),%eax - 12f49: 8b 40 18 mov 0x18(%eax),%eax - 12f4c: c1 e8 1e shr $0x1e,%eax - 12f4f: 83 e0 03 and $0x3,%eax - 12f52: 85 c0 test %eax,%eax - 12f54: 0f 94 c0 sete %al - 12f57: 25 ff 00 00 00 and $0xff,%eax - 12f5c: 50 push %eax - 12f5d: ff 75 08 pushl 0x8(%ebp) - 12f60: 8b 45 08 mov 0x8(%ebp),%eax - 12f63: ff 70 14 pushl 0x14(%eax) - 12f66: e8 67 fe ff ff call 12dd2 <_usb_release_bandwidth@12> - 12f6b: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) - 12f72: 83 ec 0c sub $0xc,%esp - 12f75: 8b 45 08 mov 0x8(%ebp),%eax - 12f78: 83 c0 0c add $0xc,%eax - 12f7b: 50 push %eax - 12f7c: e8 1c 00 00 00 call 12f9d <_list_del_init> - 12f81: 83 c4 10 add $0x10,%esp - 12f84: 8b 45 08 mov 0x8(%ebp),%eax - 12f87: 8b 40 14 mov 0x14(%eax),%eax - 12f8a: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 12f8d: 83 ec 0c sub $0xc,%esp - 12f90: ff 75 f8 pushl 0xfffffff8(%ebp) - 12f93: e8 23 34 00 00 call 163bb <_usb_put_dev@4> - 12f98: 83 c4 0c add $0xc,%esp - 12f9b: c9 leave - 12f9c: c3 ret - -00012f9d <_list_del_init>: - 12f9d: 55 push %ebp - 12f9e: 89 e5 mov %esp,%ebp - 12fa0: 8b 45 08 mov 0x8(%ebp),%eax - 12fa3: ff 30 pushl (%eax) - 12fa5: 8b 45 08 mov 0x8(%ebp),%eax - 12fa8: ff 70 04 pushl 0x4(%eax) - 12fab: e8 92 f9 ff ff call 12942 <___list_del> - 12fb0: 83 c4 08 add $0x8,%esp - 12fb3: 8b 55 08 mov 0x8(%ebp),%edx - 12fb6: 8b 45 08 mov 0x8(%ebp),%eax - 12fb9: 89 02 mov %eax,(%edx) - 12fbb: 8b 55 08 mov 0x8(%ebp),%edx - 12fbe: 8b 45 08 mov 0x8(%ebp),%eax - 12fc1: 89 42 04 mov %eax,0x4(%edx) - 12fc4: c9 leave - 12fc5: c3 ret - -00012fc6 <_hcd_submit_urb>: - 12fc6: 55 push %ebp - 12fc7: 89 e5 mov %esp,%ebp - 12fc9: 83 ec 18 sub $0x18,%esp - 12fcc: 8b 45 08 mov 0x8(%ebp),%eax - 12fcf: 8b 40 14 mov 0x14(%eax),%eax - 12fd2: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax - 12fd8: 8b 40 30 mov 0x30(%eax),%eax - 12fdb: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 12fde: 8b 45 08 mov 0x8(%ebp),%eax - 12fe1: 8b 40 14 mov 0x14(%eax),%eax - 12fe4: 8b 80 98 01 00 00 mov 0x198(%eax),%eax - 12fea: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 12fed: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) - 12ff1: 74 06 je 12ff9 <_hcd_submit_urb+0x33> - 12ff3: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) - 12ff7: 75 0c jne 13005 <_hcd_submit_urb+0x3f> - 12ff9: c7 45 ec ed ff ff ff movl $0xffffffed,0xffffffec(%ebp) - 13000: e9 77 01 00 00 jmp 1317c <_hcd_submit_urb+0x1b6> - 13005: c7 45 f0 00 00 00 00 movl $0x0,0xfffffff0(%ebp) - 1300c: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 1300f: 8b 80 e0 00 00 00 mov 0xe0(%eax),%eax - 13015: 83 e0 01 and $0x1,%eax - 13018: 85 c0 test %eax,%eax - 1301a: 74 42 je 1305e <_hcd_submit_urb+0x98> - 1301c: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 1301f: 81 b8 e0 00 00 00 85 cmpl $0x85,0xe0(%eax) - 13026: 00 00 00 - 13029: 74 33 je 1305e <_hcd_submit_urb+0x98> - 1302b: 83 ec 0c sub $0xc,%esp - 1302e: 8b 45 08 mov 0x8(%ebp),%eax - 13031: ff 70 14 pushl 0x14(%eax) - 13034: e8 31 33 00 00 call 1636a <_usb_get_dev> - 13039: 83 c4 10 add $0x10,%esp - 1303c: 83 ec 08 sub $0x8,%esp - 1303f: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 13042: 83 c0 08 add $0x8,%eax - 13045: 50 push %eax - 13046: 8b 45 08 mov 0x8(%ebp),%eax - 13049: 83 c0 0c add $0xc,%eax - 1304c: 50 push %eax - 1304d: e8 2f 01 00 00 call 13181 <_list_add_tail> - 13052: 83 c4 10 add $0x10,%esp - 13055: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) - 1305c: eb 24 jmp 13082 <_hcd_submit_urb+0xbc> - 1305e: 8b 55 08 mov 0x8(%ebp),%edx - 13061: 83 c2 0c add $0xc,%edx - 13064: 8b 45 08 mov 0x8(%ebp),%eax - 13067: 83 c0 0c add $0xc,%eax - 1306a: 89 02 mov %eax,(%edx) - 1306c: 8b 55 08 mov 0x8(%ebp),%edx - 1306f: 83 c2 0c add $0xc,%edx - 13072: 8b 45 08 mov 0x8(%ebp),%eax - 13075: 83 c0 0c add $0xc,%eax - 13078: 89 42 04 mov %eax,0x4(%edx) - 1307b: c7 45 fc 94 ff ff ff movl $0xffffff94,0xfffffffc(%ebp) - 13082: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) - 13086: 74 0b je 13093 <_hcd_submit_urb+0xcd> - 13088: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 1308b: 89 45 ec mov %eax,0xffffffec(%ebp) - 1308e: e9 e9 00 00 00 jmp 1317c <_hcd_submit_urb+0x1b6> - 13093: 83 ec 0c sub $0xc,%esp - 13096: ff 75 08 pushl 0x8(%ebp) - 13099: e8 d2 50 00 00 call 18170 <_usb_get_urb@4> - 1309e: 83 c4 0c add $0xc,%esp - 130a1: 89 45 08 mov %eax,0x8(%ebp) - 130a4: 8b 45 08 mov 0x8(%ebp),%eax - 130a7: 8b 55 f8 mov 0xfffffff8(%ebp),%edx - 130aa: 8b 40 14 mov 0x14(%eax),%eax - 130ad: 3b 42 24 cmp 0x24(%edx),%eax - 130b0: 75 25 jne 130d7 <_hcd_submit_urb+0x111> - 130b2: 8b 55 08 mov 0x8(%ebp),%edx - 130b5: 8b 45 08 mov 0x8(%ebp),%eax - 130b8: 8b 40 20 mov 0x20(%eax),%eax - 130bb: 83 c8 04 or $0x4,%eax - 130be: 89 42 20 mov %eax,0x20(%edx) - 130c1: 83 ec 08 sub $0x8,%esp - 130c4: ff 75 08 pushl 0x8(%ebp) - 130c7: ff 75 f8 pushl 0xfffffff8(%ebp) - 130ca: e8 de f3 ff ff call 124ad <_rh_urb_enqueue> - 130cf: 83 c4 10 add $0x10,%esp - 130d2: 89 45 fc mov %eax,0xfffffffc(%ebp) - 130d5: eb 7d jmp 13154 <_hcd_submit_urb+0x18e> - 130d7: 8b 45 08 mov 0x8(%ebp),%eax - 130da: 8b 40 20 mov 0x20(%eax),%eax - 130dd: c1 e8 02 shr $0x2,%eax - 130e0: 83 e0 01 and $0x1,%eax - 130e3: 85 c0 test %eax,%eax - 130e5: 75 50 jne 13137 <_hcd_submit_urb+0x171> - 130e7: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 130ea: 8b 80 80 00 00 00 mov 0x80(%eax),%eax - 130f0: 83 b8 84 00 00 00 00 cmpl $0x0,0x84(%eax) - 130f7: 74 3e je 13137 <_hcd_submit_urb+0x171> - 130f9: 8b 45 08 mov 0x8(%ebp),%eax - 130fc: 8b 40 18 mov 0x18(%eax),%eax - 130ff: c1 e8 1e shr $0x1e,%eax - 13102: 83 e0 03 and $0x3,%eax - 13105: 83 f8 02 cmp $0x2,%eax - 13108: 75 12 jne 1311c <_hcd_submit_urb+0x156> - 1310a: 8b 45 08 mov 0x8(%ebp),%eax - 1310d: 8b 55 08 mov 0x8(%ebp),%edx - 13110: 8b 52 38 mov 0x38(%edx),%edx - 13113: 81 e2 ff ff ff 0f and $0xfffffff,%edx - 13119: 89 50 3c mov %edx,0x3c(%eax) - 1311c: 8b 45 08 mov 0x8(%ebp),%eax - 1311f: 83 78 2c 00 cmpl $0x0,0x2c(%eax) - 13123: 74 12 je 13137 <_hcd_submit_urb+0x171> - 13125: 8b 45 08 mov 0x8(%ebp),%eax - 13128: 8b 55 08 mov 0x8(%ebp),%edx - 1312b: 8b 52 24 mov 0x24(%edx),%edx - 1312e: 81 e2 ff ff ff 0f and $0xfffffff,%edx - 13134: 89 50 28 mov %edx,0x28(%eax) - 13137: 83 ec 04 sub $0x4,%esp - 1313a: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 1313d: 8b 40 74 mov 0x74(%eax),%eax - 13140: ff 75 0c pushl 0xc(%ebp) - 13143: ff 75 08 pushl 0x8(%ebp) - 13146: ff 75 f8 pushl 0xfffffff8(%ebp) - 13149: 8b 40 28 mov 0x28(%eax),%eax - 1314c: ff d0 call *%eax - 1314e: 83 c4 10 add $0x10,%esp - 13151: 89 45 fc mov %eax,0xfffffffc(%ebp) - 13154: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) - 13158: 74 1c je 13176 <_hcd_submit_urb+0x1b0> - 1315a: 83 ec 0c sub $0xc,%esp - 1315d: ff 75 08 pushl 0x8(%ebp) - 13160: e8 d1 4f 00 00 call 18136 <_usb_free_urb@4> - 13165: 83 c4 0c add $0xc,%esp - 13168: 83 ec 0c sub $0xc,%esp - 1316b: ff 75 08 pushl 0x8(%ebp) - 1316e: e8 c4 fd ff ff call 12f37 <_urb_unlink> - 13173: 83 c4 10 add $0x10,%esp - 13176: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 13179: 89 45 ec mov %eax,0xffffffec(%ebp) - 1317c: 8b 45 ec mov 0xffffffec(%ebp),%eax - 1317f: c9 leave - 13180: c3 ret - -00013181 <_list_add_tail>: - 13181: 55 push %ebp - 13182: 89 e5 mov %esp,%ebp - 13184: ff 75 0c pushl 0xc(%ebp) - 13187: 8b 45 0c mov 0xc(%ebp),%eax - 1318a: ff 70 04 pushl 0x4(%eax) - 1318d: ff 75 08 pushl 0x8(%ebp) - 13190: e8 d9 f5 ff ff call 1276e <___list_add> - 13195: 83 c4 0c add $0xc,%esp - 13198: c9 leave - 13199: c3 ret - -0001319a <_hcd_get_frame_number>: - 1319a: 55 push %ebp - 1319b: 89 e5 mov %esp,%ebp - 1319d: 83 ec 08 sub $0x8,%esp - 131a0: 8b 45 08 mov 0x8(%ebp),%eax - 131a3: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax - 131a9: 8b 40 30 mov 0x30(%eax),%eax - 131ac: 89 45 fc mov %eax,0xfffffffc(%ebp) - 131af: 83 ec 0c sub $0xc,%esp - 131b2: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 131b5: 8b 40 74 mov 0x74(%eax),%eax - 131b8: ff 75 fc pushl 0xfffffffc(%ebp) - 131bb: 8b 40 1c mov 0x1c(%eax),%eax - 131be: ff d0 call *%eax - 131c0: 83 c4 10 add $0x10,%esp - 131c3: c9 leave - 131c4: c3 ret - -000131c5 <_unlink1>: - 131c5: 55 push %ebp - 131c6: 89 e5 mov %esp,%ebp - 131c8: 83 ec 08 sub $0x8,%esp - 131cb: 8b 45 08 mov 0x8(%ebp),%eax - 131ce: 8b 40 58 mov 0x58(%eax),%eax - 131d1: 3b 45 0c cmp 0xc(%ebp),%eax - 131d4: 75 13 jne 131e9 <_unlink1+0x24> - 131d6: 83 ec 08 sub $0x8,%esp - 131d9: ff 75 0c pushl 0xc(%ebp) - 131dc: ff 75 08 pushl 0x8(%ebp) - 131df: e8 36 f3 ff ff call 1251a <_usb_rh_status_dequeue> - 131e4: 83 c4 10 add $0x10,%esp - 131e7: eb 1a jmp 13203 <_unlink1+0x3e> - 131e9: 83 ec 08 sub $0x8,%esp - 131ec: 8b 45 08 mov 0x8(%ebp),%eax - 131ef: 8b 40 74 mov 0x74(%eax),%eax - 131f2: ff 75 0c pushl 0xc(%ebp) - 131f5: ff 75 08 pushl 0x8(%ebp) - 131f8: 8b 40 2c mov 0x2c(%eax),%eax - 131fb: ff d0 call *%eax - 131fd: 83 c4 10 add $0x10,%esp - 13200: 89 45 fc mov %eax,0xfffffffc(%ebp) - 13203: c9 leave - 13204: c3 ret - -00013205 <_unlink_complete>: - 13205: 55 push %ebp - 13206: 89 e5 mov %esp,%ebp - 13208: 83 ec 08 sub $0x8,%esp - 1320b: 8b 45 08 mov 0x8(%ebp),%eax - 1320e: 8b 40 54 mov 0x54(%eax),%eax - 13211: 89 45 fc mov %eax,0xfffffffc(%ebp) - 13214: 8b 55 08 mov 0x8(%ebp),%edx - 13217: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 1321a: 8b 40 08 mov 0x8(%eax),%eax - 1321d: 89 42 58 mov %eax,0x58(%edx) - 13220: 8b 55 08 mov 0x8(%ebp),%edx - 13223: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 13226: 8b 40 0c mov 0xc(%eax),%eax - 13229: 89 42 54 mov %eax,0x54(%edx) - 1322c: 83 ec 08 sub $0x8,%esp - 1322f: 8b 45 08 mov 0x8(%ebp),%eax - 13232: ff 75 0c pushl 0xc(%ebp) - 13235: ff 75 08 pushl 0x8(%ebp) - 13238: 8b 40 58 mov 0x58(%eax),%eax - 1323b: ff d0 call *%eax - 1323d: 83 c4 10 add $0x10,%esp - 13240: 83 ec 0c sub $0xc,%esp - 13243: ff 75 fc pushl 0xfffffffc(%ebp) - 13246: e8 05 00 00 00 call 13250 <_complete> - 1324b: 83 c4 10 add $0x10,%esp - 1324e: c9 leave - 1324f: c3 ret - -00013250 <_complete>: - 13250: 55 push %ebp - 13251: 89 e5 mov %esp,%ebp - 13253: 83 ec 08 sub $0x8,%esp - 13256: 8b 45 08 mov 0x8(%ebp),%eax - 13259: ff 00 incl (%eax) - 1325b: 83 ec 0c sub $0xc,%esp - 1325e: 8b 45 08 mov 0x8(%ebp),%eax - 13261: 83 c0 04 add $0x4,%eax - 13264: 50 push %eax - 13265: e8 fb 65 00 00 call 19865 <_my_wake_up> - 1326a: 83 c4 10 add $0x10,%esp - 1326d: c9 leave - 1326e: c3 ret - -0001326f <_hcd_unlink_urb>: - 1326f: 55 push %ebp - 13270: 89 e5 mov %esp,%ebp - 13272: 83 ec 38 sub $0x38,%esp - 13275: c7 45 f0 00 00 00 00 movl $0x0,0xfffffff0(%ebp) - 1327c: c7 45 ec 00 00 00 00 movl $0x0,0xffffffec(%ebp) - 13283: 83 7d 08 00 cmpl $0x0,0x8(%ebp) - 13287: 75 0c jne 13295 <_hcd_unlink_urb+0x26> - 13289: c7 45 d0 ea ff ff ff movl $0xffffffea,0xffffffd0(%ebp) - 13290: e9 ab 01 00 00 jmp 13440 <_hcd_unlink_urb+0x1d1> - 13295: c7 45 e8 00 00 00 00 movl $0x0,0xffffffe8(%ebp) - 1329c: c7 05 00 c0 01 00 01 movl $0x1,0x1c000 - 132a3: 00 00 00 - 132a6: 8b 45 08 mov 0x8(%ebp),%eax - 132a9: 83 78 14 00 cmpl $0x0,0x14(%eax) - 132ad: 74 0f je 132be <_hcd_unlink_urb+0x4f> - 132af: 8b 45 08 mov 0x8(%ebp),%eax - 132b2: 8b 40 14 mov 0x14(%eax),%eax - 132b5: 83 b8 bc 00 00 00 00 cmpl $0x0,0xbc(%eax) - 132bc: 75 0c jne 132ca <_hcd_unlink_urb+0x5b> - 132be: c7 45 d4 ed ff ff ff movl $0xffffffed,0xffffffd4(%ebp) - 132c5: e9 64 01 00 00 jmp 1342e <_hcd_unlink_urb+0x1bf> - 132ca: 8b 45 08 mov 0x8(%ebp),%eax - 132cd: 8b 40 14 mov 0x14(%eax),%eax - 132d0: 8b 80 98 01 00 00 mov 0x198(%eax),%eax - 132d6: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 132d9: 8b 45 08 mov 0x8(%ebp),%eax - 132dc: 8b 40 14 mov 0x14(%eax),%eax - 132df: 05 c0 00 00 00 add $0xc0,%eax - 132e4: 89 45 ec mov %eax,0xffffffec(%ebp) - 132e7: 8b 45 08 mov 0x8(%ebp),%eax - 132ea: 8b 40 14 mov 0x14(%eax),%eax - 132ed: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax - 132f3: 8b 40 30 mov 0x30(%eax),%eax - 132f6: 89 45 f0 mov %eax,0xfffffff0(%ebp) - 132f9: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) - 132fd: 74 06 je 13305 <_hcd_unlink_urb+0x96> - 132ff: 83 7d f0 00 cmpl $0x0,0xfffffff0(%ebp) - 13303: 75 0c jne 13311 <_hcd_unlink_urb+0xa2> - 13305: c7 45 d4 ed ff ff ff movl $0xffffffed,0xffffffd4(%ebp) - 1330c: e9 1d 01 00 00 jmp 1342e <_hcd_unlink_urb+0x1bf> - 13311: 8b 45 08 mov 0x8(%ebp),%eax - 13314: 83 78 08 00 cmpl $0x0,0x8(%eax) - 13318: 75 0c jne 13326 <_hcd_unlink_urb+0xb7> - 1331a: c7 45 d4 ea ff ff ff movl $0xffffffea,0xffffffd4(%ebp) - 13321: e9 08 01 00 00 jmp 1342e <_hcd_unlink_urb+0x1bf> - 13326: 8b 45 08 mov 0x8(%ebp),%eax - 13329: 83 78 1c 8d cmpl $0xffffff8d,0x1c(%eax) - 1332d: 74 0c je 1333b <_hcd_unlink_urb+0xcc> - 1332f: c7 45 d4 f0 ff ff ff movl $0xfffffff0,0xffffffd4(%ebp) - 13336: e9 f3 00 00 00 jmp 1342e <_hcd_unlink_urb+0x1bf> - 1333b: 8b 45 08 mov 0x8(%ebp),%eax - 1333e: 8b 40 20 mov 0x20(%eax),%eax - 13341: c1 e8 03 shr $0x3,%eax - 13344: 83 e0 01 and $0x1,%eax - 13347: 85 c0 test %eax,%eax - 13349: 75 38 jne 13383 <_hcd_unlink_urb+0x114> - 1334b: c7 45 d8 00 00 00 00 movl $0x0,0xffffffd8(%ebp) - 13352: 8b 45 08 mov 0x8(%ebp),%eax - 13355: 8b 40 58 mov 0x58(%eax),%eax - 13358: 89 45 e0 mov %eax,0xffffffe0(%ebp) - 1335b: 8b 45 08 mov 0x8(%ebp),%eax - 1335e: 8b 40 54 mov 0x54(%eax),%eax - 13361: 89 45 e4 mov %eax,0xffffffe4(%ebp) - 13364: 8b 45 08 mov 0x8(%ebp),%eax - 13367: c7 40 58 05 32 01 00 movl $0x13205,0x58(%eax) - 1336e: 8b 55 08 mov 0x8(%ebp),%edx - 13371: 8d 45 d8 lea 0xffffffd8(%ebp),%eax - 13374: 89 42 54 mov %eax,0x54(%edx) - 13377: 8b 45 08 mov 0x8(%ebp),%eax - 1337a: c7 40 1c fe ff ff ff movl $0xfffffffe,0x1c(%eax) - 13381: eb 0a jmp 1338d <_hcd_unlink_urb+0x11e> - 13383: 8b 45 08 mov 0x8(%ebp),%eax - 13386: c7 40 1c 98 ff ff ff movl $0xffffff98,0x1c(%eax) - 1338d: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 13390: 8b 40 58 mov 0x58(%eax),%eax - 13393: 3b 45 08 cmp 0x8(%ebp),%eax - 13396: 75 1a jne 133b2 <_hcd_unlink_urb+0x143> - 13398: 83 ec 08 sub $0x8,%esp - 1339b: ff 75 08 pushl 0x8(%ebp) - 1339e: ff 75 f0 pushl 0xfffffff0(%ebp) - 133a1: e8 74 f1 ff ff call 1251a <_usb_rh_status_dequeue> - 133a6: 83 c4 10 add $0x10,%esp - 133a9: c7 45 d4 00 00 00 00 movl $0x0,0xffffffd4(%ebp) - 133b0: eb 4b jmp 133fd <_hcd_unlink_urb+0x18e> - 133b2: 83 ec 08 sub $0x8,%esp - 133b5: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 133b8: 8b 40 74 mov 0x74(%eax),%eax - 133bb: ff 75 08 pushl 0x8(%ebp) - 133be: ff 75 f0 pushl 0xfffffff0(%ebp) - 133c1: 8b 40 2c mov 0x2c(%eax),%eax - 133c4: ff d0 call *%eax - 133c6: 83 c4 10 add $0x10,%esp - 133c9: 89 45 d4 mov %eax,0xffffffd4(%ebp) - 133cc: 83 7d d4 00 cmpl $0x0,0xffffffd4(%ebp) - 133d0: 74 2b je 133fd <_hcd_unlink_urb+0x18e> - 133d2: 8b 45 08 mov 0x8(%ebp),%eax - 133d5: 8b 40 20 mov 0x20(%eax),%eax - 133d8: c1 e8 03 shr $0x3,%eax - 133db: 83 e0 01 and $0x1,%eax - 133de: 85 c0 test %eax,%eax - 133e0: 75 4c jne 1342e <_hcd_unlink_urb+0x1bf> - 133e2: c7 45 e8 00 00 00 00 movl $0x0,0xffffffe8(%ebp) - 133e9: 8b 55 08 mov 0x8(%ebp),%edx - 133ec: 8b 45 e0 mov 0xffffffe0(%ebp),%eax - 133ef: 89 42 58 mov %eax,0x58(%edx) - 133f2: 8b 55 08 mov 0x8(%ebp),%edx - 133f5: 8b 45 e4 mov 0xffffffe4(%ebp),%eax - 133f8: 89 42 54 mov %eax,0x54(%edx) - 133fb: eb 31 jmp 1342e <_hcd_unlink_urb+0x1bf> - 133fd: 8b 45 08 mov 0x8(%ebp),%eax - 13400: 8b 40 20 mov 0x20(%eax),%eax - 13403: c1 e8 03 shr $0x3,%eax - 13406: 83 e0 01 and $0x1,%eax - 13409: 85 c0 test %eax,%eax - 1340b: 74 09 je 13416 <_hcd_unlink_urb+0x1a7> - 1340d: c7 45 d0 8d ff ff ff movl $0xffffff8d,0xffffffd0(%ebp) - 13414: eb 2a jmp 13440 <_hcd_unlink_urb+0x1d1> - 13416: 83 ec 0c sub $0xc,%esp - 13419: 8d 45 d8 lea 0xffffffd8(%ebp),%eax - 1341c: 50 push %eax - 1341d: e8 b6 64 00 00 call 198d8 <_my_wait_for_completion> - 13422: 83 c4 10 add $0x10,%esp - 13425: c7 45 d0 00 00 00 00 movl $0x0,0xffffffd0(%ebp) - 1342c: eb 12 jmp 13440 <_hcd_unlink_urb+0x1d1> - 1342e: 83 7d d4 00 cmpl $0x0,0xffffffd4(%ebp) - 13432: 74 06 je 1343a <_hcd_unlink_urb+0x1cb> - 13434: 83 7d ec 00 cmpl $0x0,0xffffffec(%ebp) - 13438: 74 00 je 1343a <_hcd_unlink_urb+0x1cb> - 1343a: 8b 45 d4 mov 0xffffffd4(%ebp),%eax - 1343d: 89 45 d0 mov %eax,0xffffffd0(%ebp) - 13440: 8b 45 d0 mov 0xffffffd0(%ebp),%eax - 13443: c9 leave - 13444: c3 ret - -00013445 <_hcd_endpoint_disable>: - 13445: 55 push %ebp - 13446: 89 e5 mov %esp,%ebp - 13448: 53 push %ebx - 13449: 83 ec 24 sub $0x24,%esp - 1344c: 8b 45 0c mov 0xc(%ebp),%eax - 1344f: 83 e0 0f and $0xf,%eax - 13452: 89 45 e8 mov %eax,0xffffffe8(%ebp) - 13455: 8b 45 08 mov 0x8(%ebp),%eax - 13458: 8b 80 98 01 00 00 mov 0x198(%eax),%eax - 1345e: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 13461: 8b 45 08 mov 0x8(%ebp),%eax - 13464: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax - 1346a: 8b 40 30 mov 0x30(%eax),%eax - 1346d: 89 45 f0 mov %eax,0xfffffff0(%ebp) - 13470: 8b 45 0c mov 0xc(%ebp),%eax - 13473: c1 e8 07 shr $0x7,%eax - 13476: 83 e0 01 and $0x1,%eax - 13479: 85 c0 test %eax,%eax - 1347b: 74 26 je 134a3 <_hcd_endpoint_disable+0x5e> - 1347d: 8b 5d 08 mov 0x8(%ebp),%ebx - 13480: 8b 55 08 mov 0x8(%ebp),%edx - 13483: 8b 4d e8 mov 0xffffffe8(%ebp),%ecx - 13486: b8 01 00 00 00 mov $0x1,%eax - 1348b: d3 e0 shl %cl,%eax - 1348d: 0b 42 30 or 0x30(%edx),%eax - 13490: 89 43 30 mov %eax,0x30(%ebx) - 13493: 8b 55 08 mov 0x8(%ebp),%edx - 13496: 8b 45 e8 mov 0xffffffe8(%ebp),%eax - 13499: c7 44 82 38 00 00 00 movl $0x0,0x38(%edx,%eax,4) - 134a0: 00 - 134a1: eb 24 jmp 134c7 <_hcd_endpoint_disable+0x82> - 134a3: 8b 5d 08 mov 0x8(%ebp),%ebx - 134a6: 8b 55 08 mov 0x8(%ebp),%edx - 134a9: 8b 4d e8 mov 0xffffffe8(%ebp),%ecx - 134ac: b8 01 00 00 00 mov $0x1,%eax - 134b1: d3 e0 shl %cl,%eax - 134b3: 0b 42 34 or 0x34(%edx),%eax - 134b6: 89 43 34 mov %eax,0x34(%ebx) - 134b9: 8b 55 08 mov 0x8(%ebp),%edx - 134bc: 8b 45 e8 mov 0xffffffe8(%ebp),%eax - 134bf: c7 44 82 78 00 00 00 movl $0x0,0x78(%edx,%eax,4) - 134c6: 00 - 134c7: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) - 134ce: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 134d1: 83 c0 08 add $0x8,%eax - 134d4: 8b 00 mov (%eax),%eax - 134d6: 83 e8 0c sub $0xc,%eax - 134d9: 89 45 ec mov %eax,0xffffffec(%ebp) - 134dc: 8b 55 ec mov 0xffffffec(%ebp),%edx - 134df: 83 c2 0c add $0xc,%edx - 134e2: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 134e5: 83 c0 08 add $0x8,%eax - 134e8: 39 c2 cmp %eax,%edx - 134ea: 0f 84 a8 00 00 00 je 13598 <_hcd_endpoint_disable+0x153> - 134f0: 8b 45 ec mov 0xffffffec(%ebp),%eax - 134f3: 8b 40 18 mov 0x18(%eax),%eax - 134f6: 89 45 e4 mov %eax,0xffffffe4(%ebp) - 134f9: 8b 45 e4 mov 0xffffffe4(%ebp),%eax - 134fc: c1 f8 0f sar $0xf,%eax - 134ff: 83 e0 0f and $0xf,%eax - 13502: 3b 45 e8 cmp 0xffffffe8(%ebp),%eax - 13505: 74 02 je 13509 <_hcd_endpoint_disable+0xc4> - 13507: eb 7e jmp 13587 <_hcd_endpoint_disable+0x142> - 13509: 8b 45 0c mov 0xc(%ebp),%eax - 1350c: 33 45 e4 xor 0xffffffe4(%ebp),%eax - 1350f: c1 e8 07 shr $0x7,%eax - 13512: 83 e0 01 and $0x1,%eax - 13515: 85 c0 test %eax,%eax - 13517: 74 02 je 1351b <_hcd_endpoint_disable+0xd6> - 13519: eb 6c jmp 13587 <_hcd_endpoint_disable+0x142> - 1351b: 8b 45 ec mov 0xffffffec(%ebp),%eax - 1351e: 83 78 1c 8d cmpl $0xffffff8d,0x1c(%eax) - 13522: 74 02 je 13526 <_hcd_endpoint_disable+0xe1> - 13524: eb 61 jmp 13587 <_hcd_endpoint_disable+0x142> - 13526: 83 ec 0c sub $0xc,%esp - 13529: ff 75 ec pushl 0xffffffec(%ebp) - 1352c: e8 3f 4c 00 00 call 18170 <_usb_get_urb@4> - 13531: 83 c4 0c add $0xc,%esp - 13534: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) - 1353b: 8b 45 ec mov 0xffffffec(%ebp),%eax - 1353e: 8b 40 1c mov 0x1c(%eax),%eax - 13541: 89 45 e4 mov %eax,0xffffffe4(%ebp) - 13544: 83 7d e4 8d cmpl $0xffffff8d,0xffffffe4(%ebp) - 13548: 75 0a jne 13554 <_hcd_endpoint_disable+0x10f> - 1354a: 8b 45 ec mov 0xffffffec(%ebp),%eax - 1354d: c7 40 1c 94 ff ff ff movl $0xffffff94,0x1c(%eax) - 13554: 83 7d e4 8d cmpl $0xffffff8d,0xffffffe4(%ebp) - 13558: 75 1a jne 13574 <_hcd_endpoint_disable+0x12f> - 1355a: 8b 45 ec mov 0xffffffec(%ebp),%eax - 1355d: 8b 40 18 mov 0x18(%eax),%eax - 13560: 89 45 e4 mov %eax,0xffffffe4(%ebp) - 13563: 83 ec 08 sub $0x8,%esp - 13566: ff 75 ec pushl 0xffffffec(%ebp) - 13569: ff 75 f0 pushl 0xfffffff0(%ebp) - 1356c: e8 54 fc ff ff call 131c5 <_unlink1> - 13571: 83 c4 10 add $0x10,%esp - 13574: 83 ec 0c sub $0xc,%esp - 13577: ff 75 ec pushl 0xffffffec(%ebp) - 1357a: e8 b7 4b 00 00 call 18136 <_usb_free_urb@4> - 1357f: 83 c4 0c add $0xc,%esp - 13582: e9 e9 fe ff ff jmp 13470 <_hcd_endpoint_disable+0x2b> - 13587: 8b 45 ec mov 0xffffffec(%ebp),%eax - 1358a: 8b 40 0c mov 0xc(%eax),%eax - 1358d: 83 e8 0c sub $0xc,%eax - 13590: 89 45 ec mov %eax,0xffffffec(%ebp) - 13593: e9 44 ff ff ff jmp 134dc <_hcd_endpoint_disable+0x97> - 13598: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 1359b: 8b 40 74 mov 0x74(%eax),%eax - 1359e: 83 78 30 00 cmpl $0x0,0x30(%eax) - 135a2: 74 1a je 135be <_hcd_endpoint_disable+0x179> - 135a4: 83 ec 04 sub $0x4,%esp - 135a7: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 135aa: 8b 40 74 mov 0x74(%eax),%eax - 135ad: ff 75 0c pushl 0xc(%ebp) - 135b0: ff 75 f4 pushl 0xfffffff4(%ebp) - 135b3: ff 75 f0 pushl 0xfffffff0(%ebp) - 135b6: 8b 40 30 mov 0x30(%eax),%eax - 135b9: ff d0 call *%eax - 135bb: 83 c4 10 add $0x10,%esp - 135be: 8b 5d fc mov 0xfffffffc(%ebp),%ebx - 135c1: c9 leave - 135c2: c3 ret - -000135c3 <_hcd_free_dev>: - 135c3: 55 push %ebp - 135c4: 89 e5 mov %esp,%ebp - 135c6: 83 ec 18 sub $0x18,%esp - 135c9: 83 7d 08 00 cmpl $0x0,0x8(%ebp) - 135cd: 74 0c je 135db <_hcd_free_dev+0x18> - 135cf: 8b 45 08 mov 0x8(%ebp),%eax - 135d2: 83 b8 98 01 00 00 00 cmpl $0x0,0x198(%eax) - 135d9: 75 0c jne 135e7 <_hcd_free_dev+0x24> - 135db: c7 45 f0 ea ff ff ff movl $0xffffffea,0xfffffff0(%ebp) - 135e2: e9 95 00 00 00 jmp 1367c <_hcd_free_dev+0xb9> - 135e7: 8b 45 08 mov 0x8(%ebp),%eax - 135ea: 83 b8 bc 00 00 00 00 cmpl $0x0,0xbc(%eax) - 135f1: 74 0f je 13602 <_hcd_free_dev+0x3f> - 135f3: 8b 45 08 mov 0x8(%ebp),%eax - 135f6: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax - 135fc: 83 78 30 00 cmpl $0x0,0x30(%eax) - 13600: 75 09 jne 1360b <_hcd_free_dev+0x48> - 13602: c7 45 f0 ed ff ff ff movl $0xffffffed,0xfffffff0(%ebp) - 13609: eb 71 jmp 1367c <_hcd_free_dev+0xb9> - 1360b: 8b 45 08 mov 0x8(%ebp),%eax - 1360e: 8b 80 98 01 00 00 mov 0x198(%eax),%eax - 13614: 89 45 fc mov %eax,0xfffffffc(%ebp) - 13617: 8b 45 08 mov 0x8(%ebp),%eax - 1361a: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax - 13620: 8b 40 30 mov 0x30(%eax),%eax - 13623: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 13626: 83 ec 0c sub $0xc,%esp - 13629: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 1362c: 83 c0 08 add $0x8,%eax - 1362f: 50 push %eax - 13630: e8 4c 00 00 00 call 13681 <_list_empty> - 13635: 83 c4 10 add $0x10,%esp - 13638: 85 c0 test %eax,%eax - 1363a: 75 09 jne 13645 <_hcd_free_dev+0x82> - 1363c: c7 45 f0 ea ff ff ff movl $0xffffffea,0xfffffff0(%ebp) - 13643: eb 37 jmp 1367c <_hcd_free_dev+0xb9> - 13645: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) - 1364c: 83 ec 0c sub $0xc,%esp - 1364f: ff 75 fc pushl 0xfffffffc(%ebp) - 13652: e8 ba f2 ff ff call 12911 <_list_del> - 13657: 83 c4 10 add $0x10,%esp - 1365a: 8b 45 08 mov 0x8(%ebp),%eax - 1365d: c7 80 98 01 00 00 00 movl $0x0,0x198(%eax) - 13664: 00 00 00 - 13667: 83 ec 0c sub $0xc,%esp - 1366a: ff 75 fc pushl 0xfffffffc(%ebp) - 1366d: e8 ce 63 00 00 call 19a40 <_ExFreePool@4> - 13672: 83 c4 0c add $0xc,%esp - 13675: c7 45 f0 00 00 00 00 movl $0x0,0xfffffff0(%ebp) - 1367c: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 1367f: c9 leave - 13680: c3 ret - -00013681 <_list_empty>: - 13681: 55 push %ebp - 13682: 89 e5 mov %esp,%ebp - 13684: 8b 45 08 mov 0x8(%ebp),%eax - 13687: 8b 00 mov (%eax),%eax - 13689: 3b 45 08 cmp 0x8(%ebp),%eax - 1368c: 0f 94 c0 sete %al - 1368f: 25 ff 00 00 00 and $0xff,%eax - 13694: 5d pop %ebp - 13695: c3 ret - -00013696 <_usb_hcd_giveback_urb@12>: - 13696: 55 push %ebp - 13697: 89 e5 mov %esp,%ebp - 13699: 83 ec 08 sub $0x8,%esp - 1369c: 83 ec 0c sub $0xc,%esp - 1369f: ff 75 0c pushl 0xc(%ebp) - 136a2: e8 90 f8 ff ff call 12f37 <_urb_unlink> - 136a7: 83 c4 10 add $0x10,%esp - 136aa: 8b 45 0c mov 0xc(%ebp),%eax - 136ad: 8b 40 20 mov 0x20(%eax),%eax - 136b0: c1 e8 02 shr $0x2,%eax - 136b3: 83 e0 01 and $0x1,%eax - 136b6: 85 c0 test %eax,%eax - 136b8: 75 00 jne 136ba <_usb_hcd_giveback_urb@12+0x24> - 136ba: 83 ec 08 sub $0x8,%esp - 136bd: 8b 45 0c mov 0xc(%ebp),%eax - 136c0: ff 75 10 pushl 0x10(%ebp) - 136c3: ff 75 0c pushl 0xc(%ebp) - 136c6: 8b 40 58 mov 0x58(%eax),%eax - 136c9: ff d0 call *%eax - 136cb: 83 c4 10 add $0x10,%esp - 136ce: 83 ec 0c sub $0xc,%esp - 136d1: ff 75 0c pushl 0xc(%ebp) - 136d4: e8 5d 4a 00 00 call 18136 <_usb_free_urb@4> - 136d9: 83 c4 0c add $0xc,%esp - 136dc: c9 leave - 136dd: c2 0c 00 ret $0xc - -000136e0 <_usb_hcd_irq>: - 136e0: 55 push %ebp - 136e1: 89 e5 mov %esp,%ebp - 136e3: 83 ec 18 sub $0x18,%esp - 136e6: 8b 45 0c mov 0xc(%ebp),%eax - 136e9: 89 45 fc mov %eax,0xfffffffc(%ebp) - 136ec: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 136ef: 8b 80 e0 00 00 00 mov 0xe0(%eax),%eax - 136f5: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 136f8: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 136fb: 83 b8 e0 00 00 00 00 cmpl $0x0,0xe0(%eax) - 13702: 75 09 jne 1370d <_usb_hcd_irq+0x2d> - 13704: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) - 1370b: eb 46 jmp 13753 <_usb_hcd_irq+0x73> - 1370d: 83 ec 08 sub $0x8,%esp - 13710: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 13713: 8b 40 74 mov 0x74(%eax),%eax - 13716: ff 75 10 pushl 0x10(%ebp) - 13719: ff 75 fc pushl 0xfffffffc(%ebp) - 1371c: 8b 40 04 mov 0x4(%eax),%eax - 1371f: ff d0 call *%eax - 13721: 83 c4 10 add $0x10,%esp - 13724: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 13727: 8b 80 e0 00 00 00 mov 0xe0(%eax),%eax - 1372d: 3b 45 f8 cmp 0xfffffff8(%ebp),%eax - 13730: 74 1a je 1374c <_usb_hcd_irq+0x6c> - 13732: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 13735: 83 b8 e0 00 00 00 00 cmpl $0x0,0xe0(%eax) - 1373c: 75 0e jne 1374c <_usb_hcd_irq+0x6c> - 1373e: 83 ec 0c sub $0xc,%esp - 13741: ff 75 fc pushl 0xfffffffc(%ebp) - 13744: e8 31 00 00 00 call 1377a <_usb_hc_died@4> - 13749: 83 c4 0c add $0xc,%esp - 1374c: c7 45 f4 01 00 00 00 movl $0x1,0xfffffff4(%ebp) - 13753: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 13756: c9 leave - 13757: c3 ret - -00013758 <_hcd_panic>: - 13758: 55 push %ebp - 13759: 89 e5 mov %esp,%ebp - 1375b: 83 ec 08 sub $0x8,%esp - 1375e: 8b 45 08 mov 0x8(%ebp),%eax - 13761: 89 45 fc mov %eax,0xfffffffc(%ebp) - 13764: 83 ec 0c sub $0xc,%esp - 13767: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 1376a: 8b 40 74 mov 0x74(%eax),%eax - 1376d: ff 75 fc pushl 0xfffffffc(%ebp) - 13770: 8b 40 18 mov 0x18(%eax),%eax - 13773: ff d0 call *%eax - 13775: 83 c4 10 add $0x10,%esp - 13778: c9 leave - 13779: c3 ret - -0001377a <_usb_hc_died@4>: - 1377a: 55 push %ebp - 1377b: 89 e5 mov %esp,%ebp - 1377d: 83 ec 18 sub $0x18,%esp - 13780: c7 45 ec 00 00 00 00 movl $0x0,0xffffffec(%ebp) - 13787: 8b 45 08 mov 0x8(%ebp),%eax - 1378a: 83 c0 68 add $0x68,%eax - 1378d: 8b 00 mov (%eax),%eax - 1378f: 89 45 fc mov %eax,0xfffffffc(%ebp) - 13792: 8b 45 08 mov 0x8(%ebp),%eax - 13795: 83 c0 68 add $0x68,%eax - 13798: 3b 45 fc cmp 0xfffffffc(%ebp),%eax - 1379b: 74 4c je 137e9 <_usb_hc_died@4+0x6f> - 1379d: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 137a0: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 137a3: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 137a6: 83 c0 08 add $0x8,%eax - 137a9: 8b 00 mov (%eax),%eax - 137ab: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 137ae: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 137b1: 83 c0 08 add $0x8,%eax - 137b4: 3b 45 f8 cmp 0xfffffff8(%ebp),%eax - 137b7: 74 26 je 137df <_usb_hc_died@4+0x65> - 137b9: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 137bc: 83 e8 0c sub $0xc,%eax - 137bf: 89 45 f0 mov %eax,0xfffffff0(%ebp) - 137c2: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 137c5: 83 78 1c 8d cmpl $0xffffff8d,0x1c(%eax) - 137c9: 75 0a jne 137d5 <_usb_hc_died@4+0x5b> - 137cb: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 137ce: c7 40 1c 94 ff ff ff movl $0xffffff94,0x1c(%eax) - 137d5: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 137d8: 8b 00 mov (%eax),%eax - 137da: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 137dd: eb cf jmp 137ae <_usb_hc_died@4+0x34> - 137df: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 137e2: 8b 00 mov (%eax),%eax - 137e4: 89 45 fc mov %eax,0xfffffffc(%ebp) - 137e7: eb a9 jmp 13792 <_usb_hc_died@4+0x18> - 137e9: 8b 45 08 mov 0x8(%ebp),%eax - 137ec: 8b 40 58 mov 0x58(%eax),%eax - 137ef: 89 45 f0 mov %eax,0xfffffff0(%ebp) - 137f2: 83 7d f0 00 cmpl $0x0,0xfffffff0(%ebp) - 137f6: 74 0a je 13802 <_usb_hc_died@4+0x88> - 137f8: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 137fb: c7 40 1c 94 ff ff ff movl $0xffffff94,0x1c(%eax) - 13802: 8b 45 08 mov 0x8(%ebp),%eax - 13805: 83 c0 70 add $0x70,%eax - 13808: c7 00 58 37 01 00 movl $0x13758,(%eax) - 1380e: 83 ec 0c sub $0xc,%esp - 13811: 8b 45 08 mov 0x8(%ebp),%eax - 13814: 83 c0 70 add $0x70,%eax - 13817: 50 push %eax - 13818: e8 07 00 00 00 call 13824 <_schedule_work> - 1381d: 83 c4 10 add $0x10,%esp - 13820: c9 leave - 13821: c2 04 00 ret $0x4 - -00013824 <_schedule_work>: - 13824: 55 push %ebp - 13825: 89 e5 mov %esp,%ebp - 13827: 5d pop %ebp - 13828: c3 ret - 13829: 90 nop - 1382a: 90 nop - 1382b: 90 nop - 1382c: 90 nop - 1382d: 90 nop - 1382e: 90 nop - 1382f: 90 nop - -00013830 <_usb_hcd_pci_probe@8>: - 13830: 55 push %ebp - 13831: 89 e5 mov %esp,%ebp - 13833: 83 ec 38 sub $0x38,%esp - 13836: e8 ea 3a 00 00 call 17325 <_usb_disabled@0> - 1383b: 85 c0 test %eax,%eax - 1383d: 74 0c je 1384b <_usb_hcd_pci_probe@8+0x1b> - 1383f: c7 45 d4 ed ff ff ff movl $0xffffffed,0xffffffd4(%ebp) - 13846: e9 16 04 00 00 jmp 13c61 <_usb_hcd_pci_probe@8+0x431> - 1384b: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) - 1384f: 74 0d je 1385e <_usb_hcd_pci_probe@8+0x2e> - 13851: 8b 45 0c mov 0xc(%ebp),%eax - 13854: 8b 40 18 mov 0x18(%eax),%eax - 13857: 89 45 fc mov %eax,0xfffffffc(%ebp) - 1385a: 85 c0 test %eax,%eax - 1385c: 75 0c jne 1386a <_usb_hcd_pci_probe@8+0x3a> - 1385e: c7 45 d4 ea ff ff ff movl $0xffffffea,0xffffffd4(%ebp) - 13865: e9 f7 03 00 00 jmp 13c61 <_usb_hcd_pci_probe@8+0x431> - 1386a: 83 ec 0c sub $0xc,%esp - 1386d: ff 75 08 pushl 0x8(%ebp) - 13870: e8 7b 04 00 00 call 13cf0 <_pci_enable_device> - 13875: 83 c4 10 add $0x10,%esp - 13878: 85 c0 test %eax,%eax - 1387a: 79 0c jns 13888 <_usb_hcd_pci_probe@8+0x58> - 1387c: c7 45 d4 ed ff ff ff movl $0xffffffed,0xffffffd4(%ebp) - 13883: e9 d9 03 00 00 jmp 13c61 <_usb_hcd_pci_probe@8+0x431> - 13888: 8b 45 08 mov 0x8(%ebp),%eax - 1388b: 83 78 0c 00 cmpl $0x0,0xc(%eax) - 1388f: 75 0c jne 1389d <_usb_hcd_pci_probe@8+0x6d> - 13891: c7 45 d4 ed ff ff ff movl $0xffffffed,0xffffffd4(%ebp) - 13898: e9 c4 03 00 00 jmp 13c61 <_usb_hcd_pci_probe@8+0x431> - 1389d: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 138a0: 8b 40 08 mov 0x8(%eax),%eax - 138a3: 83 e0 01 and $0x1,%eax - 138a6: 85 c0 test %eax,%eax - 138a8: 0f 84 ec 00 00 00 je 1399a <_usb_hcd_pci_probe@8+0x16a> - 138ae: c7 45 e4 00 00 00 00 movl $0x0,0xffffffe4(%ebp) - 138b5: 83 ec 08 sub $0x8,%esp - 138b8: 6a 00 push $0x0 - 138ba: ff 75 08 pushl 0x8(%ebp) - 138bd: e8 1c 04 00 00 call 13cde <_pci_resource_start> - 138c2: 83 c4 10 add $0x10,%esp - 138c5: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 138c8: 83 ec 08 sub $0x8,%esp - 138cb: 6a 00 push $0x0 - 138cd: ff 75 08 pushl 0x8(%ebp) - 138d0: e8 ff 03 00 00 call 13cd4 <_pci_resource_len> - 138d5: 83 c4 10 add $0x10,%esp - 138d8: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 138db: 83 ec 04 sub $0x4,%esp - 138de: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 138e1: ff 30 pushl (%eax) - 138e3: ff 75 f4 pushl 0xfffffff4(%ebp) - 138e6: ff 75 f8 pushl 0xfffffff8(%ebp) - 138e9: e8 dc 03 00 00 call 13cca <_request_mem_region> - 138ee: 83 c4 10 add $0x10,%esp - 138f1: 85 c0 test %eax,%eax - 138f3: 75 38 jne 1392d <_usb_hcd_pci_probe@8+0xfd> - 138f5: 83 ec 04 sub $0x4,%esp - 138f8: 6a 5c push $0x5c - 138fa: 68 c0 b0 01 00 push $0x1b0c0 - 138ff: 68 ca b0 01 00 push $0x1b0ca - 13904: e8 57 61 00 00 call 19a60 <_DbgPrint> - 13909: 83 c4 10 add $0x10,%esp - 1390c: 83 ec 08 sub $0x8,%esp - 1390f: 68 c0 b0 01 00 push $0x1b0c0 - 13914: 68 d4 b0 01 00 push $0x1b0d4 - 13919: e8 42 61 00 00 call 19a60 <_DbgPrint> - 1391e: 83 c4 10 add $0x10,%esp - 13921: c7 45 d4 f0 ff ff ff movl $0xfffffff0,0xffffffd4(%ebp) - 13928: e9 34 03 00 00 jmp 13c61 <_usb_hcd_pci_probe@8+0x431> - 1392d: 83 ec 08 sub $0x8,%esp - 13930: ff 75 f4 pushl 0xfffffff4(%ebp) - 13933: ff 75 f8 pushl 0xfffffff8(%ebp) - 13936: e8 87 03 00 00 call 13cc2 <_ioremap_nocache> - 1393b: 83 c4 10 add $0x10,%esp - 1393e: 89 45 f0 mov %eax,0xfffffff0(%ebp) - 13941: 83 7d f0 00 cmpl $0x0,0xfffffff0(%ebp) - 13945: 0f 85 13 01 00 00 jne 13a5e <_usb_hcd_pci_probe@8+0x22e> - 1394b: 83 ec 04 sub $0x4,%esp - 1394e: 6a 61 push $0x61 - 13950: 68 c0 b0 01 00 push $0x1b0c0 - 13955: 68 ca b0 01 00 push $0x1b0ca - 1395a: e8 01 61 00 00 call 19a60 <_DbgPrint> - 1395f: 83 c4 10 add $0x10,%esp - 13962: 83 ec 08 sub $0x8,%esp - 13965: 68 c0 b0 01 00 push $0x1b0c0 - 1396a: 68 f8 b0 01 00 push $0x1b0f8 - 1396f: e8 ec 60 00 00 call 19a60 <_DbgPrint> - 13974: 83 c4 10 add $0x10,%esp - 13977: c7 45 e8 f2 ff ff ff movl $0xfffffff2,0xffffffe8(%ebp) - 1397e: 83 ec 08 sub $0x8,%esp - 13981: ff 75 f4 pushl 0xfffffff4(%ebp) - 13984: ff 75 f8 pushl 0xfffffff8(%ebp) - 13987: e8 2c 03 00 00 call 13cb8 <_release_mem_region> - 1398c: 83 c4 10 add $0x10,%esp - 1398f: 8b 45 e8 mov 0xffffffe8(%ebp),%eax - 13992: 89 45 d4 mov %eax,0xffffffd4(%ebp) - 13995: e9 c7 02 00 00 jmp 13c61 <_usb_hcd_pci_probe@8+0x431> - 1399a: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) - 139a1: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) - 139a8: c7 45 e4 00 00 00 00 movl $0x0,0xffffffe4(%ebp) - 139af: 83 7d e4 00 cmpl $0x0,0xffffffe4(%ebp) - 139b3: 79 65 jns 13a1a <_usb_hcd_pci_probe@8+0x1ea> - 139b5: 83 ec 08 sub $0x8,%esp - 139b8: ff 75 e4 pushl 0xffffffe4(%ebp) - 139bb: ff 75 08 pushl 0x8(%ebp) - 139be: e8 e3 02 00 00 call 13ca6 <_pci_resource_flags> - 139c3: 83 c4 10 add $0x10,%esp - 139c6: 83 e0 01 and $0x1,%eax - 139c9: 85 c0 test %eax,%eax - 139cb: 75 02 jne 139cf <_usb_hcd_pci_probe@8+0x19f> - 139cd: eb 44 jmp 13a13 <_usb_hcd_pci_probe@8+0x1e3> - 139cf: 83 ec 08 sub $0x8,%esp - 139d2: ff 75 e4 pushl 0xffffffe4(%ebp) - 139d5: ff 75 08 pushl 0x8(%ebp) - 139d8: e8 01 03 00 00 call 13cde <_pci_resource_start> - 139dd: 83 c4 10 add $0x10,%esp - 139e0: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 139e3: 83 ec 08 sub $0x8,%esp - 139e6: ff 75 e4 pushl 0xffffffe4(%ebp) - 139e9: ff 75 08 pushl 0x8(%ebp) - 139ec: e8 e3 02 00 00 call 13cd4 <_pci_resource_len> - 139f1: 83 c4 10 add $0x10,%esp - 139f4: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 139f7: 83 ec 04 sub $0x4,%esp - 139fa: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 139fd: ff 30 pushl (%eax) - 139ff: ff 75 f4 pushl 0xfffffff4(%ebp) - 13a02: ff 75 f8 pushl 0xfffffff8(%ebp) - 13a05: e8 92 02 00 00 call 13c9c <_request_region> - 13a0a: 83 c4 10 add $0x10,%esp - 13a0d: 85 c0 test %eax,%eax - 13a0f: 74 02 je 13a13 <_usb_hcd_pci_probe@8+0x1e3> - 13a11: eb 07 jmp 13a1a <_usb_hcd_pci_probe@8+0x1ea> - 13a13: 8d 45 e4 lea 0xffffffe4(%ebp),%eax - 13a16: ff 00 incl (%eax) - 13a18: eb 95 jmp 139af <_usb_hcd_pci_probe@8+0x17f> - 13a1a: 83 7d e4 00 cmpl $0x0,0xffffffe4(%ebp) - 13a1e: 75 38 jne 13a58 <_usb_hcd_pci_probe@8+0x228> - 13a20: 83 ec 04 sub $0x4,%esp - 13a23: 6a 76 push $0x76 - 13a25: 68 c0 b0 01 00 push $0x1b0c0 - 13a2a: 68 ca b0 01 00 push $0x1b0ca - 13a2f: e8 2c 60 00 00 call 19a60 <_DbgPrint> - 13a34: 83 c4 10 add $0x10,%esp - 13a37: 83 ec 08 sub $0x8,%esp - 13a3a: 68 c0 b0 01 00 push $0x1b0c0 - 13a3f: 68 18 b1 01 00 push $0x1b118 - 13a44: e8 17 60 00 00 call 19a60 <_DbgPrint> - 13a49: 83 c4 10 add $0x10,%esp - 13a4c: c7 45 d4 f0 ff ff ff movl $0xfffffff0,0xffffffd4(%ebp) - 13a53: e9 09 02 00 00 jmp 13c61 <_usb_hcd_pci_probe@8+0x431> - 13a58: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 13a5b: 89 45 f0 mov %eax,0xfffffff0(%ebp) - 13a5e: 83 ec 0c sub $0xc,%esp - 13a61: ff 75 08 pushl 0x8(%ebp) - 13a64: e8 29 02 00 00 call 13c92 <_pci_set_master> - 13a69: 83 c4 10 add $0x10,%esp - 13a6c: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 13a6f: 8b 40 20 mov 0x20(%eax),%eax - 13a72: ff d0 call *%eax - 13a74: 89 45 ec mov %eax,0xffffffec(%ebp) - 13a77: 83 7d ec 00 cmpl $0x0,0xffffffec(%ebp) - 13a7b: 75 72 jne 13aef <_usb_hcd_pci_probe@8+0x2bf> - 13a7d: 83 ec 04 sub $0x4,%esp - 13a80: 68 83 00 00 00 push $0x83 - 13a85: 68 c0 b0 01 00 push $0x1b0c0 - 13a8a: 68 ca b0 01 00 push $0x1b0ca - 13a8f: e8 cc 5f 00 00 call 19a60 <_DbgPrint> - 13a94: 83 c4 10 add $0x10,%esp - 13a97: 83 ec 08 sub $0x8,%esp - 13a9a: 68 c0 b0 01 00 push $0x1b0c0 - 13a9f: 68 3b b1 01 00 push $0x1b13b - 13aa4: e8 b7 5f 00 00 call 19a60 <_DbgPrint> - 13aa9: 83 c4 10 add $0x10,%esp - 13aac: c7 45 e8 f4 ff ff ff movl $0xfffffff4,0xffffffe8(%ebp) - 13ab3: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 13ab6: 8b 40 08 mov 0x8(%eax),%eax - 13ab9: 83 e0 01 and $0x1,%eax - 13abc: 85 c0 test %eax,%eax - 13abe: 74 13 je 13ad3 <_usb_hcd_pci_probe@8+0x2a3> - 13ac0: 83 ec 0c sub $0xc,%esp - 13ac3: ff 75 f0 pushl 0xfffffff0(%ebp) - 13ac6: e8 bd 01 00 00 call 13c88 <_iounmap> - 13acb: 83 c4 10 add $0x10,%esp - 13ace: e9 ab fe ff ff jmp 1397e <_usb_hcd_pci_probe@8+0x14e> - 13ad3: 83 ec 08 sub $0x8,%esp - 13ad6: ff 75 f4 pushl 0xfffffff4(%ebp) - 13ad9: ff 75 f8 pushl 0xfffffff8(%ebp) - 13adc: e8 9d 01 00 00 call 13c7e <_release_region> - 13ae1: 83 c4 10 add $0x10,%esp - 13ae4: 8b 45 e8 mov 0xffffffe8(%ebp),%eax - 13ae7: 89 45 d4 mov %eax,0xffffffd4(%ebp) - 13aea: e9 72 01 00 00 jmp 13c61 <_usb_hcd_pci_probe@8+0x431> - 13aef: 83 ec 08 sub $0x8,%esp - 13af2: ff 75 ec pushl 0xffffffec(%ebp) - 13af5: ff 75 08 pushl 0x8(%ebp) - 13af8: e8 6b 01 00 00 call 13c68 <_pci_set_drvdata> - 13afd: 83 c4 10 add $0x10,%esp - 13b00: 8b 55 ec mov 0xffffffec(%ebp),%edx - 13b03: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 13b06: 89 42 74 mov %eax,0x74(%edx) - 13b09: 8b 55 ec mov 0xffffffec(%ebp),%edx - 13b0c: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 13b0f: 8b 00 mov (%eax),%eax - 13b11: 89 42 50 mov %eax,0x50(%edx) - 13b14: 8b 55 ec mov 0xffffffec(%ebp),%edx - 13b17: 8b 45 08 mov 0x8(%ebp),%eax - 13b1a: 89 82 84 00 00 00 mov %eax,0x84(%edx) - 13b20: 8b 55 ec mov 0xffffffec(%ebp),%edx - 13b23: 8b 45 08 mov 0x8(%ebp),%eax - 13b26: 8b 40 10 mov 0x10(%eax),%eax - 13b29: 89 42 08 mov %eax,0x8(%edx) - 13b2c: 8b 55 ec mov 0xffffffec(%ebp),%edx - 13b2f: 8b 45 08 mov 0x8(%ebp),%eax - 13b32: 83 c0 14 add $0x14,%eax - 13b35: 89 42 4c mov %eax,0x4c(%edx) - 13b38: 8b 55 ec mov 0xffffffec(%ebp),%edx - 13b3b: 8b 45 08 mov 0x8(%ebp),%eax - 13b3e: 83 c0 14 add $0x14,%eax - 13b41: 89 02 mov %eax,(%edx) - 13b43: 8b 55 ec mov 0xffffffec(%ebp),%edx - 13b46: 8b 45 ec mov 0xffffffec(%ebp),%eax - 13b49: 8b 00 mov (%eax),%eax - 13b4b: 89 82 80 00 00 00 mov %eax,0x80(%edx) - 13b51: 83 ec 0c sub $0xc,%esp - 13b54: ff 75 ec pushl 0xffffffec(%ebp) - 13b57: e8 c4 49 00 00 call 18520 <_hcd_buffer_create> - 13b5c: 83 c4 10 add $0x10,%esp - 13b5f: 89 45 e8 mov %eax,0xffffffe8(%ebp) - 13b62: 83 7d e8 00 cmpl $0x0,0xffffffe8(%ebp) - 13b66: 74 16 je 13b7e <_usb_hcd_pci_probe@8+0x34e> - 13b68: 83 ec 0c sub $0xc,%esp - 13b6b: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 13b6e: ff 75 ec pushl 0xffffffec(%ebp) - 13b71: 8b 40 24 mov 0x24(%eax),%eax - 13b74: ff d0 call *%eax - 13b76: 83 c4 10 add $0x10,%esp - 13b79: e9 35 ff ff ff jmp 13ab3 <_usb_hcd_pci_probe@8+0x283> - 13b7e: 83 ec 04 sub $0x4,%esp - 13b81: 8b 45 08 mov 0x8(%ebp),%eax - 13b84: ff 70 0c pushl 0xc(%eax) - 13b87: 68 54 b1 01 00 push $0x1b154 - 13b8c: 8d 45 d8 lea 0xffffffd8(%ebp),%eax - 13b8f: 50 push %eax - 13b90: e8 fb 5e 00 00 call 19a90 <_sprintf> - 13b95: 83 c4 10 add $0x10,%esp - 13b98: 83 ec 0c sub $0xc,%esp - 13b9b: ff 75 ec pushl 0xffffffec(%ebp) - 13b9e: 8b 45 ec mov 0xffffffec(%ebp),%eax - 13ba1: ff 70 50 pushl 0x50(%eax) - 13ba4: 6a 00 push $0x0 - 13ba6: 68 e0 36 01 00 push $0x136e0 - 13bab: 8b 45 08 mov 0x8(%ebp),%eax - 13bae: ff 70 0c pushl 0xc(%eax) - 13bb1: e8 e0 5d 00 00 call 19996 <_my_request_irq> - 13bb6: 83 c4 20 add $0x20,%esp - 13bb9: 85 c0 test %eax,%eax - 13bbb: 74 09 je 13bc6 <_usb_hcd_pci_probe@8+0x396> - 13bbd: c7 45 e8 f0 ff ff ff movl $0xfffffff0,0xffffffe8(%ebp) - 13bc4: eb a2 jmp 13b68 <_usb_hcd_pci_probe@8+0x338> - 13bc6: 8b 55 ec mov 0xffffffec(%ebp),%edx - 13bc9: 8b 45 08 mov 0x8(%ebp),%eax - 13bcc: 8b 40 0c mov 0xc(%eax),%eax - 13bcf: 89 42 78 mov %eax,0x78(%edx) - 13bd2: 8b 55 ec mov 0xffffffec(%ebp),%edx - 13bd5: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 13bd8: 89 42 7c mov %eax,0x7c(%edx) - 13bdb: 8b 55 ec mov 0xffffffec(%ebp),%edx - 13bde: 8b 45 e4 mov 0xffffffe4(%ebp),%eax - 13be1: 89 82 88 00 00 00 mov %eax,0x88(%edx) - 13be7: 83 ec 0c sub $0xc,%esp - 13bea: ff 75 ec pushl 0xffffffec(%ebp) - 13bed: e8 ec e9 ff ff call 125de <_usb_bus_init@4> - 13bf2: 83 c4 0c add $0xc,%esp - 13bf5: 8b 45 ec mov 0xffffffec(%ebp),%eax - 13bf8: c7 40 20 20 a0 01 00 movl $0x1a020,0x20(%eax) - 13bff: 8b 55 ec mov 0xffffffec(%ebp),%edx - 13c02: 8b 45 ec mov 0xffffffec(%ebp),%eax - 13c05: 89 42 30 mov %eax,0x30(%edx) - 13c08: 8b 55 ec mov 0xffffffec(%ebp),%edx - 13c0b: 83 c2 68 add $0x68,%edx - 13c0e: 8b 45 ec mov 0xffffffec(%ebp),%eax - 13c11: 83 c0 68 add $0x68,%eax - 13c14: 89 02 mov %eax,(%edx) - 13c16: 8b 55 ec mov 0xffffffec(%ebp),%edx - 13c19: 83 c2 68 add $0x68,%edx - 13c1c: 8b 45 ec mov 0xffffffec(%ebp),%eax - 13c1f: 83 c0 68 add $0x68,%eax - 13c22: 89 42 04 mov %eax,0x4(%edx) - 13c25: 83 ec 0c sub $0xc,%esp - 13c28: ff 75 ec pushl 0xffffffec(%ebp) - 13c2b: e8 a8 ea ff ff call 126d8 <_usb_register_bus@4> - 13c30: 83 c4 0c add $0xc,%esp - 13c33: 83 ec 0c sub $0xc,%esp - 13c36: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 13c39: ff 75 ec pushl 0xffffffec(%ebp) - 13c3c: 8b 40 0c mov 0xc(%eax),%eax - 13c3f: ff d0 call *%eax - 13c41: 83 c4 10 add $0x10,%esp - 13c44: 89 45 e8 mov %eax,0xffffffe8(%ebp) - 13c47: 83 7d e8 00 cmpl $0x0,0xffffffe8(%ebp) - 13c4b: 79 0e jns 13c5b <_usb_hcd_pci_probe@8+0x42b> - 13c4d: 83 ec 0c sub $0xc,%esp - 13c50: ff 75 08 pushl 0x8(%ebp) - 13c53: e8 a2 00 00 00 call 13cfa <_usb_hcd_pci_remove@4> - 13c58: 83 c4 0c add $0xc,%esp - 13c5b: 8b 45 e8 mov 0xffffffe8(%ebp),%eax - 13c5e: 89 45 d4 mov %eax,0xffffffd4(%ebp) - 13c61: 8b 45 d4 mov 0xffffffd4(%ebp),%eax - 13c64: c9 leave - 13c65: c2 08 00 ret $0x8 - -00013c68 <_pci_set_drvdata>: - 13c68: 55 push %ebp - 13c69: 89 e5 mov %esp,%ebp - 13c6b: 8b 45 08 mov 0x8(%ebp),%eax - 13c6e: 8b 55 0c mov 0xc(%ebp),%edx - 13c71: 89 90 e4 00 00 00 mov %edx,0xe4(%eax) - 13c77: b8 00 00 00 00 mov $0x0,%eax - 13c7c: 5d pop %ebp - 13c7d: c3 ret - -00013c7e <_release_region>: - 13c7e: 55 push %ebp - 13c7f: 89 e5 mov %esp,%ebp - 13c81: b8 00 00 00 00 mov $0x0,%eax - 13c86: 5d pop %ebp - 13c87: c3 ret - -00013c88 <_iounmap>: - 13c88: 55 push %ebp - 13c89: 89 e5 mov %esp,%ebp - 13c8b: b8 00 00 00 00 mov $0x0,%eax - 13c90: 5d pop %ebp - 13c91: c3 ret - -00013c92 <_pci_set_master>: - 13c92: 55 push %ebp - 13c93: 89 e5 mov %esp,%ebp - 13c95: b8 00 00 00 00 mov $0x0,%eax - 13c9a: 5d pop %ebp - 13c9b: c3 ret - -00013c9c <_request_region>: - 13c9c: 55 push %ebp - 13c9d: 89 e5 mov %esp,%ebp - 13c9f: b8 00 00 00 00 mov $0x0,%eax - 13ca4: 5d pop %ebp - 13ca5: c3 ret - -00013ca6 <_pci_resource_flags>: - 13ca6: 55 push %ebp - 13ca7: 89 e5 mov %esp,%ebp - 13ca9: 8b 55 08 mov 0x8(%ebp),%edx - 13cac: 8b 45 0c mov 0xc(%ebp),%eax - 13caf: 8b 84 82 d4 00 00 00 mov 0xd4(%edx,%eax,4),%eax - 13cb6: 5d pop %ebp - 13cb7: c3 ret - -00013cb8 <_release_mem_region>: - 13cb8: 55 push %ebp - 13cb9: 89 e5 mov %esp,%ebp - 13cbb: b8 00 00 00 00 mov $0x0,%eax - 13cc0: 5d pop %ebp - 13cc1: c3 ret - -00013cc2 <_ioremap_nocache>: - 13cc2: 55 push %ebp - 13cc3: 89 e5 mov %esp,%ebp - 13cc5: 8b 45 08 mov 0x8(%ebp),%eax - 13cc8: 5d pop %ebp - 13cc9: c3 ret - -00013cca <_request_mem_region>: - 13cca: 55 push %ebp - 13ccb: 89 e5 mov %esp,%ebp - 13ccd: b8 01 00 00 00 mov $0x1,%eax - 13cd2: 5d pop %ebp - 13cd3: c3 ret - -00013cd4 <_pci_resource_len>: - 13cd4: 55 push %ebp - 13cd5: 89 e5 mov %esp,%ebp - 13cd7: b8 00 00 00 00 mov $0x0,%eax - 13cdc: 5d pop %ebp - 13cdd: c3 ret - -00013cde <_pci_resource_start>: - 13cde: 55 push %ebp - 13cdf: 89 e5 mov %esp,%ebp - 13ce1: 8b 55 08 mov 0x8(%ebp),%edx - 13ce4: 8b 45 0c mov 0xc(%ebp),%eax - 13ce7: 8b 84 82 c4 00 00 00 mov 0xc4(%edx,%eax,4),%eax - 13cee: 5d pop %ebp - 13cef: c3 ret - -00013cf0 <_pci_enable_device>: - 13cf0: 55 push %ebp - 13cf1: 89 e5 mov %esp,%ebp - 13cf3: b8 00 00 00 00 mov $0x0,%eax - 13cf8: 5d pop %ebp - 13cf9: c3 ret - -00013cfa <_usb_hcd_pci_remove@4>: - 13cfa: 55 push %ebp - 13cfb: 89 e5 mov %esp,%ebp - 13cfd: 83 ec 08 sub $0x8,%esp - 13d00: 83 ec 0c sub $0xc,%esp - 13d03: ff 75 08 pushl 0x8(%ebp) - 13d06: e8 22 01 00 00 call 13e2d <_pci_get_drvdata> - 13d0b: 83 c4 10 add $0x10,%esp - 13d0e: 89 45 fc mov %eax,0xfffffffc(%ebp) - 13d11: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) - 13d15: 75 05 jne 13d1c <_usb_hcd_pci_remove@4+0x22> - 13d17: e9 0d 01 00 00 jmp 13e29 <_usb_hcd_pci_remove@4+0x12f> - 13d1c: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 13d1f: 8b 40 24 mov 0x24(%eax),%eax - 13d22: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 13d25: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 13d28: c7 80 e0 00 00 00 85 movl $0x85,0xe0(%eax) - 13d2f: 00 00 00 - 13d32: 83 ec 0c sub $0xc,%esp - 13d35: 8d 45 f8 lea 0xfffffff8(%ebp),%eax - 13d38: 50 push %eax - 13d39: e8 d3 28 00 00 call 16611 <_usb_disconnect> - 13d3e: 83 c4 10 add $0x10,%esp - 13d41: 83 ec 0c sub $0xc,%esp - 13d44: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 13d47: 8b 40 74 mov 0x74(%eax),%eax - 13d4a: ff 75 fc pushl 0xfffffffc(%ebp) - 13d4d: 8b 40 18 mov 0x18(%eax),%eax - 13d50: ff d0 call *%eax - 13d52: 83 c4 10 add $0x10,%esp - 13d55: 83 ec 0c sub $0xc,%esp - 13d58: ff 75 fc pushl 0xfffffffc(%ebp) - 13d5b: e8 ca 47 00 00 call 1852a <_hcd_buffer_destroy> - 13d60: 83 c4 10 add $0x10,%esp - 13d63: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 13d66: c7 80 e0 00 00 00 00 movl $0x0,0xe0(%eax) - 13d6d: 00 00 00 - 13d70: 6a 00 push $0x0 - 13d72: ff 75 08 pushl 0x8(%ebp) - 13d75: e8 ee fe ff ff call 13c68 <_pci_set_drvdata> - 13d7a: 83 c4 08 add $0x8,%esp - 13d7d: 83 ec 08 sub $0x8,%esp - 13d80: ff 75 fc pushl 0xfffffffc(%ebp) - 13d83: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 13d86: ff 70 78 pushl 0x78(%eax) - 13d89: e8 86 5c 00 00 call 19a14 <_my_free_irq> - 13d8e: 83 c4 10 add $0x10,%esp - 13d91: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 13d94: 8b 40 74 mov 0x74(%eax),%eax - 13d97: 8b 40 08 mov 0x8(%eax),%eax - 13d9a: 83 e0 01 and $0x1,%eax - 13d9d: 85 c0 test %eax,%eax - 13d9f: 74 34 je 13dd5 <_usb_hcd_pci_remove@4+0xdb> - 13da1: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 13da4: ff 70 7c pushl 0x7c(%eax) - 13da7: e8 dc fe ff ff call 13c88 <_iounmap> - 13dac: 83 c4 04 add $0x4,%esp - 13daf: 6a 00 push $0x0 - 13db1: ff 75 08 pushl 0x8(%ebp) - 13db4: e8 1b ff ff ff call 13cd4 <_pci_resource_len> - 13db9: 83 c4 08 add $0x8,%esp - 13dbc: 50 push %eax - 13dbd: 6a 00 push $0x0 - 13dbf: ff 75 08 pushl 0x8(%ebp) - 13dc2: e8 17 ff ff ff call 13cde <_pci_resource_start> - 13dc7: 83 c4 08 add $0x8,%esp - 13dca: 50 push %eax - 13dcb: e8 e8 fe ff ff call 13cb8 <_release_mem_region> - 13dd0: 83 c4 08 add $0x8,%esp - 13dd3: eb 32 jmp 13e07 <_usb_hcd_pci_remove@4+0x10d> - 13dd5: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 13dd8: ff b0 88 00 00 00 pushl 0x88(%eax) - 13dde: ff 75 08 pushl 0x8(%ebp) - 13de1: e8 ee fe ff ff call 13cd4 <_pci_resource_len> - 13de6: 83 c4 08 add $0x8,%esp - 13de9: 50 push %eax - 13dea: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 13ded: ff b0 88 00 00 00 pushl 0x88(%eax) - 13df3: ff 75 08 pushl 0x8(%ebp) - 13df6: e8 e3 fe ff ff call 13cde <_pci_resource_start> - 13dfb: 83 c4 08 add $0x8,%esp - 13dfe: 50 push %eax - 13dff: e8 7a fe ff ff call 13c7e <_release_region> - 13e04: 83 c4 08 add $0x8,%esp - 13e07: 83 ec 0c sub $0xc,%esp - 13e0a: ff 75 fc pushl 0xfffffffc(%ebp) - 13e0d: e8 9e ea ff ff call 128b0 <_usb_deregister_bus@4> - 13e12: 83 c4 0c add $0xc,%esp - 13e15: 83 ec 0c sub $0xc,%esp - 13e18: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 13e1b: 8b 40 74 mov 0x74(%eax),%eax - 13e1e: ff 75 fc pushl 0xfffffffc(%ebp) - 13e21: 8b 40 24 mov 0x24(%eax),%eax - 13e24: ff d0 call *%eax - 13e26: 83 c4 10 add $0x10,%esp - 13e29: c9 leave - 13e2a: c2 04 00 ret $0x4 - -00013e2d <_pci_get_drvdata>: - 13e2d: 55 push %ebp - 13e2e: 89 e5 mov %esp,%ebp - 13e30: 8b 45 08 mov 0x8(%ebp),%eax - 13e33: 8b 80 e4 00 00 00 mov 0xe4(%eax),%eax - 13e39: 5d pop %ebp - 13e3a: c3 ret - 13e3b: 90 nop - 13e3c: 90 nop - 13e3d: 90 nop - 13e3e: 90 nop - 13e3f: 90 nop - -00013e40 <_get_hub_descriptor>: - 13e40: 55 push %ebp - 13e41: 89 e5 mov %esp,%ebp - 13e43: 83 ec 08 sub $0x8,%esp - 13e46: 83 ec 0c sub $0xc,%esp - 13e49: 68 f4 01 00 00 push $0x1f4 - 13e4e: 8b 45 10 mov 0x10(%ebp),%eax - 13e51: 25 ff ff 00 00 and $0xffff,%eax - 13e56: 50 push %eax - 13e57: ff 75 0c pushl 0xc(%ebp) - 13e5a: 6a 00 push $0x0 - 13e5c: 68 00 29 00 00 push $0x2900 - 13e61: 68 a0 00 00 00 push $0xa0 - 13e66: 6a 06 push $0x6 - 13e68: 6a 00 push $0x0 - 13e6a: ff 75 08 pushl 0x8(%ebp) - 13e6d: e8 16 00 00 00 call 13e88 <___create_pipe> - 13e72: 83 c4 08 add $0x8,%esp - 13e75: 0d 80 00 00 80 or $0x80000080,%eax - 13e7a: 50 push %eax - 13e7b: ff 75 08 pushl 0x8(%ebp) - 13e7e: e8 6d d3 ff ff call 111f0 <_usb_control_msg> - 13e83: 83 c4 30 add $0x30,%esp - 13e86: c9 leave - 13e87: c3 ret - -00013e88 <___create_pipe>: - 13e88: 55 push %ebp - 13e89: 89 e5 mov %esp,%ebp - 13e8b: 8b 45 08 mov 0x8(%ebp),%eax - 13e8e: 8b 00 mov (%eax),%eax - 13e90: c1 e0 08 shl $0x8,%eax - 13e93: 8b 55 0c mov 0xc(%ebp),%edx - 13e96: c1 e2 0f shl $0xf,%edx - 13e99: 09 d0 or %edx,%eax - 13e9b: 5d pop %ebp - 13e9c: c3 ret - -00013e9d <_clear_hub_feature>: - 13e9d: 55 push %ebp - 13e9e: 89 e5 mov %esp,%ebp - 13ea0: 83 ec 08 sub $0x8,%esp - 13ea3: 83 ec 0c sub $0xc,%esp - 13ea6: 6a 64 push $0x64 - 13ea8: 6a 00 push $0x0 - 13eaa: 6a 00 push $0x0 - 13eac: 6a 00 push $0x0 - 13eae: 8b 45 0c mov 0xc(%ebp),%eax - 13eb1: 25 ff ff 00 00 and $0xffff,%eax - 13eb6: 50 push %eax - 13eb7: 6a 20 push $0x20 - 13eb9: 6a 01 push $0x1 - 13ebb: 6a 00 push $0x0 - 13ebd: ff 75 08 pushl 0x8(%ebp) - 13ec0: e8 c3 ff ff ff call 13e88 <___create_pipe> - 13ec5: 83 c4 08 add $0x8,%esp - 13ec8: 0d 00 00 00 80 or $0x80000000,%eax - 13ecd: 50 push %eax - 13ece: ff 75 08 pushl 0x8(%ebp) - 13ed1: e8 1a d3 ff ff call 111f0 <_usb_control_msg> - 13ed6: 83 c4 30 add $0x30,%esp - 13ed9: c9 leave - 13eda: c3 ret - -00013edb <_clear_port_feature>: - 13edb: 55 push %ebp - 13edc: 89 e5 mov %esp,%ebp - 13ede: 83 ec 08 sub $0x8,%esp - 13ee1: 83 ec 0c sub $0xc,%esp - 13ee4: 6a 64 push $0x64 - 13ee6: 6a 00 push $0x0 - 13ee8: 6a 00 push $0x0 - 13eea: 8b 45 0c mov 0xc(%ebp),%eax - 13eed: 25 ff ff 00 00 and $0xffff,%eax - 13ef2: 50 push %eax - 13ef3: 8b 45 10 mov 0x10(%ebp),%eax - 13ef6: 25 ff ff 00 00 and $0xffff,%eax - 13efb: 50 push %eax - 13efc: 6a 23 push $0x23 - 13efe: 6a 01 push $0x1 - 13f00: 6a 00 push $0x0 - 13f02: ff 75 08 pushl 0x8(%ebp) - 13f05: e8 7e ff ff ff call 13e88 <___create_pipe> - 13f0a: 83 c4 08 add $0x8,%esp - 13f0d: 0d 00 00 00 80 or $0x80000000,%eax - 13f12: 50 push %eax - 13f13: ff 75 08 pushl 0x8(%ebp) - 13f16: e8 d5 d2 ff ff call 111f0 <_usb_control_msg> - 13f1b: 83 c4 30 add $0x30,%esp - 13f1e: c9 leave - 13f1f: c3 ret - -00013f20 <_set_port_feature>: - 13f20: 55 push %ebp - 13f21: 89 e5 mov %esp,%ebp - 13f23: 83 ec 08 sub $0x8,%esp - 13f26: 83 ec 0c sub $0xc,%esp - 13f29: 6a 64 push $0x64 - 13f2b: 6a 00 push $0x0 - 13f2d: 6a 00 push $0x0 - 13f2f: 8b 45 0c mov 0xc(%ebp),%eax - 13f32: 25 ff ff 00 00 and $0xffff,%eax - 13f37: 50 push %eax - 13f38: 8b 45 10 mov 0x10(%ebp),%eax - 13f3b: 25 ff ff 00 00 and $0xffff,%eax - 13f40: 50 push %eax - 13f41: 6a 23 push $0x23 - 13f43: 6a 03 push $0x3 - 13f45: 6a 00 push $0x0 - 13f47: ff 75 08 pushl 0x8(%ebp) - 13f4a: e8 39 ff ff ff call 13e88 <___create_pipe> - 13f4f: 83 c4 08 add $0x8,%esp - 13f52: 0d 00 00 00 80 or $0x80000000,%eax - 13f57: 50 push %eax - 13f58: ff 75 08 pushl 0x8(%ebp) - 13f5b: e8 90 d2 ff ff call 111f0 <_usb_control_msg> - 13f60: 83 c4 30 add $0x30,%esp - 13f63: c9 leave - 13f64: c3 ret - -00013f65 <_get_hub_status>: - 13f65: 55 push %ebp - 13f66: 89 e5 mov %esp,%ebp - 13f68: 83 ec 08 sub $0x8,%esp - 13f6b: 83 ec 0c sub $0xc,%esp - 13f6e: 68 f4 01 00 00 push $0x1f4 - 13f73: 6a 04 push $0x4 - 13f75: ff 75 0c pushl 0xc(%ebp) - 13f78: 6a 00 push $0x0 - 13f7a: 6a 00 push $0x0 - 13f7c: 68 a0 00 00 00 push $0xa0 - 13f81: 6a 00 push $0x0 - 13f83: 6a 00 push $0x0 - 13f85: ff 75 08 pushl 0x8(%ebp) - 13f88: e8 fb fe ff ff call 13e88 <___create_pipe> - 13f8d: 83 c4 08 add $0x8,%esp - 13f90: 0d 80 00 00 80 or $0x80000080,%eax - 13f95: 50 push %eax - 13f96: ff 75 08 pushl 0x8(%ebp) - 13f99: e8 52 d2 ff ff call 111f0 <_usb_control_msg> - 13f9e: 83 c4 30 add $0x30,%esp - 13fa1: c9 leave - 13fa2: c3 ret - -00013fa3 <_get_port_status>: - 13fa3: 55 push %ebp - 13fa4: 89 e5 mov %esp,%ebp - 13fa6: 83 ec 08 sub $0x8,%esp - 13fa9: 83 ec 0c sub $0xc,%esp - 13fac: 68 f4 01 00 00 push $0x1f4 - 13fb1: 6a 04 push $0x4 - 13fb3: ff 75 10 pushl 0x10(%ebp) - 13fb6: 8b 45 0c mov 0xc(%ebp),%eax - 13fb9: 25 ff ff 00 00 and $0xffff,%eax - 13fbe: 50 push %eax - 13fbf: 6a 00 push $0x0 - 13fc1: 68 a3 00 00 00 push $0xa3 - 13fc6: 6a 00 push $0x0 - 13fc8: 6a 00 push $0x0 - 13fca: ff 75 08 pushl 0x8(%ebp) - 13fcd: e8 b6 fe ff ff call 13e88 <___create_pipe> - 13fd2: 83 c4 08 add $0x8,%esp - 13fd5: 0d 80 00 00 80 or $0x80000080,%eax - 13fda: 50 push %eax - 13fdb: ff 75 08 pushl 0x8(%ebp) - 13fde: e8 0d d2 ff ff call 111f0 <_usb_control_msg> - 13fe3: 83 c4 30 add $0x30,%esp - 13fe6: c9 leave - 13fe7: c3 ret - -00013fe8 <_hub_irq>: - 13fe8: 55 push %ebp - 13fe9: 89 e5 mov %esp,%ebp - 13feb: 83 ec 18 sub $0x18,%esp - 13fee: 8b 45 08 mov 0x8(%ebp),%eax - 13ff1: 8b 40 54 mov 0x54(%eax),%eax - 13ff4: 89 45 fc mov %eax,0xfffffffc(%ebp) - 13ff7: 8b 45 08 mov 0x8(%ebp),%eax - 13ffa: 8b 40 1c mov 0x1c(%eax),%eax - 13ffd: 89 45 f0 mov %eax,0xfffffff0(%ebp) - 14000: 83 7d f0 98 cmpl $0xffffff98,0xfffffff0(%ebp) - 14004: 0f 84 ad 00 00 00 je 140b7 <_hub_irq+0xcf> - 1400a: 83 7d f0 98 cmpl $0xffffff98,0xfffffff0(%ebp) - 1400e: 7f 0c jg 1401c <_hub_irq+0x34> - 14010: 83 7d f0 94 cmpl $0xffffff94,0xfffffff0(%ebp) - 14014: 0f 84 9d 00 00 00 je 140b7 <_hub_irq+0xcf> - 1401a: eb 10 jmp 1402c <_hub_irq+0x44> - 1401c: 83 7d f0 fe cmpl $0xfffffffe,0xfffffff0(%ebp) - 14020: 0f 84 91 00 00 00 je 140b7 <_hub_irq+0xcf> - 14026: 83 7d f0 00 cmpl $0x0,0xfffffff0(%ebp) - 1402a: 74 21 je 1404d <_hub_irq+0x65> - 1402c: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 1402f: ff 40 18 incl 0x18(%eax) - 14032: 83 78 18 09 cmpl $0x9,0x18(%eax) - 14036: 7e 63 jle 1409b <_hub_irq+0xb3> - 14038: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 1403b: 83 78 14 00 cmpl $0x0,0x14(%eax) - 1403f: 75 5a jne 1409b <_hub_irq+0xb3> - 14041: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 14044: 8b 55 08 mov 0x8(%ebp),%edx - 14047: 8b 52 1c mov 0x1c(%edx),%edx - 1404a: 89 50 14 mov %edx,0x14(%eax) - 1404d: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 14050: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) - 14057: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) - 1405e: 83 ec 0c sub $0xc,%esp - 14061: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 14064: 83 c0 24 add $0x24,%eax - 14067: 50 push %eax - 14068: e8 91 00 00 00 call 140fe <_list_empty> - 1406d: 83 c4 10 add $0x10,%esp - 14070: 85 c0 test %eax,%eax - 14072: 74 27 je 1409b <_hub_irq+0xb3> - 14074: 83 ec 08 sub $0x8,%esp - 14077: 68 40 a0 01 00 push $0x1a040 - 1407c: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 1407f: 83 c0 24 add $0x24,%eax - 14082: 50 push %eax - 14083: e8 31 00 00 00 call 140b9 <_list_add> - 14088: 83 c4 10 add $0x10,%esp - 1408b: 83 ec 0c sub $0xc,%esp - 1408e: 68 50 c0 01 00 push $0x1c050 - 14093: e8 cd 57 00 00 call 19865 <_my_wake_up> - 14098: 83 c4 10 add $0x10,%esp - 1409b: 83 ec 08 sub $0x8,%esp - 1409e: 6a 00 push $0x0 - 140a0: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 140a3: ff 70 04 pushl 0x4(%eax) - 140a6: e8 f8 40 00 00 call 181a3 <_usb_submit_urb@8> - 140ab: 83 c4 08 add $0x8,%esp - 140ae: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 140b1: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) - 140b5: 74 00 je 140b7 <_hub_irq+0xcf> - 140b7: c9 leave - 140b8: c3 ret - -000140b9 <_list_add>: - 140b9: 55 push %ebp - 140ba: 89 e5 mov %esp,%ebp - 140bc: 83 ec 08 sub $0x8,%esp - 140bf: 83 ec 04 sub $0x4,%esp - 140c2: 8b 45 0c mov 0xc(%ebp),%eax - 140c5: ff 30 pushl (%eax) - 140c7: ff 75 0c pushl 0xc(%ebp) - 140ca: ff 75 08 pushl 0x8(%ebp) - 140cd: e8 05 00 00 00 call 140d7 <___list_add> - 140d2: 83 c4 10 add $0x10,%esp - 140d5: c9 leave - 140d6: c3 ret - -000140d7 <___list_add>: - 140d7: 55 push %ebp - 140d8: 89 e5 mov %esp,%ebp - 140da: 8b 55 10 mov 0x10(%ebp),%edx - 140dd: 8b 45 08 mov 0x8(%ebp),%eax - 140e0: 89 42 04 mov %eax,0x4(%edx) - 140e3: 8b 55 08 mov 0x8(%ebp),%edx - 140e6: 8b 45 10 mov 0x10(%ebp),%eax - 140e9: 89 02 mov %eax,(%edx) - 140eb: 8b 55 08 mov 0x8(%ebp),%edx - 140ee: 8b 45 0c mov 0xc(%ebp),%eax - 140f1: 89 42 04 mov %eax,0x4(%edx) - 140f4: 8b 55 0c mov 0xc(%ebp),%edx - 140f7: 8b 45 08 mov 0x8(%ebp),%eax - 140fa: 89 02 mov %eax,(%edx) - 140fc: 5d pop %ebp - 140fd: c3 ret - -000140fe <_list_empty>: - 140fe: 55 push %ebp - 140ff: 89 e5 mov %esp,%ebp - 14101: 8b 45 08 mov 0x8(%ebp),%eax - 14104: 8b 00 mov (%eax),%eax - 14106: 3b 45 08 cmp 0x8(%ebp),%eax - 14109: 0f 94 c0 sete %al - 1410c: 25 ff 00 00 00 and $0xff,%eax - 14111: 5d pop %ebp - 14112: c3 ret - -00014113 <_hub_tt_kevent>: - 14113: 55 push %ebp - 14114: 89 e5 mov %esp,%ebp - 14116: 83 ec 28 sub $0x28,%esp - 14119: 8b 45 08 mov 0x8(%ebp),%eax - 1411c: 89 45 fc mov %eax,0xfffffffc(%ebp) - 1411f: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) - 14126: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 14129: 83 c0 40 add $0x40,%eax - 1412c: 50 push %eax - 1412d: e8 cc ff ff ff call 140fe <_list_empty> - 14132: 83 c4 04 add $0x4,%esp - 14135: 85 c0 test %eax,%eax - 14137: 75 7a jne 141b3 <_hub_tt_kevent+0xa0> - 14139: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 1413c: 8b 40 40 mov 0x40(%eax),%eax - 1413f: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 14142: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 14145: 89 45 f0 mov %eax,0xfffffff0(%ebp) - 14148: 83 ec 0c sub $0xc,%esp - 1414b: ff 75 f0 pushl 0xfffffff0(%ebp) - 1414e: e8 b9 00 00 00 call 1420c <_list_del> - 14153: 83 c4 10 add $0x10,%esp - 14156: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 14159: 8b 00 mov (%eax),%eax - 1415b: 8b 80 b8 00 00 00 mov 0xb8(%eax),%eax - 14161: 89 45 e4 mov %eax,0xffffffe4(%ebp) - 14164: 8b 45 e4 mov 0xffffffe4(%ebp),%eax - 14167: 2d c0 00 00 00 sub $0xc0,%eax - 1416c: 89 45 ec mov %eax,0xffffffec(%ebp) - 1416f: 83 ec 04 sub $0x4,%esp - 14172: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 14175: 8b 40 08 mov 0x8(%eax),%eax - 14178: 25 ff ff 00 00 and $0xffff,%eax - 1417d: 50 push %eax - 1417e: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 14181: 66 8b 40 0c mov 0xc(%eax),%ax - 14185: 25 ff ff 00 00 and $0xffff,%eax - 1418a: 50 push %eax - 1418b: ff 75 ec pushl 0xffffffec(%ebp) - 1418e: e8 22 00 00 00 call 141b5 <_hub_clear_tt_buffer> - 14193: 83 c4 10 add $0x10,%esp - 14196: 89 45 e8 mov %eax,0xffffffe8(%ebp) - 14199: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) - 141a0: 83 ec 0c sub $0xc,%esp - 141a3: ff 75 f0 pushl 0xfffffff0(%ebp) - 141a6: e8 95 58 00 00 call 19a40 <_ExFreePool@4> - 141ab: 83 c4 0c add $0xc,%esp - 141ae: e9 73 ff ff ff jmp 14126 <_hub_tt_kevent+0x13> - 141b3: c9 leave - 141b4: c3 ret - -000141b5 <_hub_clear_tt_buffer>: - 141b5: 55 push %ebp - 141b6: 89 e5 mov %esp,%ebp - 141b8: 83 ec 08 sub $0x8,%esp - 141bb: 8b 45 0c mov 0xc(%ebp),%eax - 141be: 8b 55 10 mov 0x10(%ebp),%edx - 141c1: 66 89 45 fe mov %ax,0xfffffffe(%ebp) - 141c5: 66 89 55 fc mov %dx,0xfffffffc(%ebp) - 141c9: 83 ec 0c sub $0xc,%esp - 141cc: 6a 64 push $0x64 - 141ce: 6a 00 push $0x0 - 141d0: 6a 00 push $0x0 - 141d2: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 141d5: 25 ff ff 00 00 and $0xffff,%eax - 141da: 50 push %eax - 141db: 66 8b 45 fe mov 0xfffffffe(%ebp),%ax - 141df: 25 ff ff 00 00 and $0xffff,%eax - 141e4: 50 push %eax - 141e5: 68 83 00 00 00 push $0x83 - 141ea: 6a 08 push $0x8 - 141ec: 6a 00 push $0x0 - 141ee: ff 75 08 pushl 0x8(%ebp) - 141f1: e8 92 fc ff ff call 13e88 <___create_pipe> - 141f6: 83 c4 08 add $0x8,%esp - 141f9: 0d 80 00 00 80 or $0x80000080,%eax - 141fe: 50 push %eax - 141ff: ff 75 08 pushl 0x8(%ebp) - 14202: e8 e9 cf ff ff call 111f0 <_usb_control_msg> - 14207: 83 c4 30 add $0x30,%esp - 1420a: c9 leave - 1420b: c3 ret - -0001420c <_list_del>: - 1420c: 55 push %ebp - 1420d: 89 e5 mov %esp,%ebp - 1420f: 83 ec 08 sub $0x8,%esp - 14212: 83 ec 08 sub $0x8,%esp - 14215: 8b 45 08 mov 0x8(%ebp),%eax - 14218: ff 30 pushl (%eax) - 1421a: 8b 45 08 mov 0x8(%ebp),%eax - 1421d: ff 70 04 pushl 0x4(%eax) - 14220: e8 18 00 00 00 call 1423d <___list_del> - 14225: 83 c4 10 add $0x10,%esp - 14228: 8b 45 08 mov 0x8(%ebp),%eax - 1422b: c7 00 00 00 00 00 movl $0x0,(%eax) - 14231: 8b 45 08 mov 0x8(%ebp),%eax - 14234: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) - 1423b: c9 leave - 1423c: c3 ret - -0001423d <___list_del>: - 1423d: 55 push %ebp - 1423e: 89 e5 mov %esp,%ebp - 14240: 8b 55 0c mov 0xc(%ebp),%edx - 14243: 8b 45 08 mov 0x8(%ebp),%eax - 14246: 89 42 04 mov %eax,0x4(%edx) - 14249: 8b 55 08 mov 0x8(%ebp),%edx - 1424c: 8b 45 0c mov 0xc(%ebp),%eax - 1424f: 89 02 mov %eax,(%edx) - 14251: 5d pop %ebp - 14252: c3 ret - -00014253 <_usb_hub_tt_clear_buffer>: - 14253: 55 push %ebp - 14254: 89 e5 mov %esp,%ebp - 14256: 83 ec 28 sub $0x28,%esp - 14259: 8b 45 08 mov 0x8(%ebp),%eax - 1425c: 8b 40 1c mov 0x1c(%eax),%eax - 1425f: 89 45 fc mov %eax,0xfffffffc(%ebp) - 14262: 83 ec 08 sub $0x8,%esp - 14265: 6a 10 push $0x10 - 14267: 6a 01 push $0x1 - 14269: e8 c2 57 00 00 call 19a30 <_ExAllocatePool@8> - 1426e: 83 c4 08 add $0x8,%esp - 14271: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 14274: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 14277: 85 c0 test %eax,%eax - 14279: 75 05 jne 14280 <_usb_hub_tt_clear_buffer+0x2d> - 1427b: e9 d3 00 00 00 jmp 14353 <_usb_hub_tt_clear_buffer+0x100> - 14280: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 14283: 89 45 f0 mov %eax,0xfffffff0(%ebp) - 14286: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 14289: 83 78 04 00 cmpl $0x0,0x4(%eax) - 1428d: 74 0b je 1429a <_usb_hub_tt_clear_buffer+0x47> - 1428f: 8b 45 08 mov 0x8(%ebp),%eax - 14292: 8b 40 20 mov 0x20(%eax),%eax - 14295: 89 45 ec mov %eax,0xffffffec(%ebp) - 14298: eb 07 jmp 142a1 <_usb_hub_tt_clear_buffer+0x4e> - 1429a: c7 45 ec 01 00 00 00 movl $0x1,0xffffffec(%ebp) - 142a1: 8b 45 ec mov 0xffffffec(%ebp),%eax - 142a4: 8b 55 f0 mov 0xfffffff0(%ebp),%edx - 142a7: 89 42 08 mov %eax,0x8(%edx) - 142aa: 8b 55 f4 mov 0xfffffff4(%ebp),%edx - 142ad: 8b 45 0c mov 0xc(%ebp),%eax - 142b0: c1 f8 0f sar $0xf,%eax - 142b3: 83 e0 0f and $0xf,%eax - 142b6: 66 89 42 0c mov %ax,0xc(%edx) - 142ba: 8b 4d f4 mov 0xfffffff4(%ebp),%ecx - 142bd: 8b 55 f4 mov 0xfffffff4(%ebp),%edx - 142c0: 8b 45 08 mov 0x8(%ebp),%eax - 142c3: 8b 00 mov (%eax),%eax - 142c5: c1 e0 04 shl $0x4,%eax - 142c8: 66 0b 42 0c or 0xc(%edx),%ax - 142cc: 66 89 41 0c mov %ax,0xc(%ecx) - 142d0: 8b 55 f4 mov 0xfffffff4(%ebp),%edx - 142d3: 89 55 e8 mov %edx,0xffffffe8(%ebp) - 142d6: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 142d9: 66 8b 40 0c mov 0xc(%eax),%ax - 142dd: 25 ff ff 00 00 and $0xffff,%eax - 142e2: 89 45 e4 mov %eax,0xffffffe4(%ebp) - 142e5: 8b 45 0c mov 0xc(%ebp),%eax - 142e8: c1 f8 1e sar $0x1e,%eax - 142eb: 83 e0 03 and $0x3,%eax - 142ee: 83 f8 02 cmp $0x2,%eax - 142f1: 74 07 je 142fa <_usb_hub_tt_clear_buffer+0xa7> - 142f3: 81 4d e4 00 10 00 00 orl $0x1000,0xffffffe4(%ebp) - 142fa: 8b 55 e4 mov 0xffffffe4(%ebp),%edx - 142fd: 8b 45 e8 mov 0xffffffe8(%ebp),%eax - 14300: 66 89 50 0c mov %dx,0xc(%eax) - 14304: 8b 45 0c mov 0xc(%ebp),%eax - 14307: c1 e8 07 shr $0x7,%eax - 1430a: 83 e0 01 and $0x1,%eax - 1430d: 85 c0 test %eax,%eax - 1430f: 74 14 je 14325 <_usb_hub_tt_clear_buffer+0xd2> - 14311: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 14314: 8b 55 f4 mov 0xfffffff4(%ebp),%edx - 14317: 66 8b 52 0c mov 0xc(%edx),%dx - 1431b: 81 ca 00 80 ff ff or $0xffff8000,%edx - 14321: 66 89 50 0c mov %dx,0xc(%eax) - 14325: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) - 1432c: 83 ec 08 sub $0x8,%esp - 1432f: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 14332: 83 c0 0c add $0xc,%eax - 14335: 50 push %eax - 14336: ff 75 f4 pushl 0xfffffff4(%ebp) - 14339: e8 1c 00 00 00 call 1435a <_list_add_tail> - 1433e: 83 c4 10 add $0x10,%esp - 14341: 83 ec 0c sub $0xc,%esp - 14344: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 14347: 83 c0 14 add $0x14,%eax - 1434a: 50 push %eax - 1434b: e8 05 00 00 00 call 14355 <_schedule_work> - 14350: 83 c4 10 add $0x10,%esp - 14353: c9 leave - 14354: c3 ret - -00014355 <_schedule_work>: - 14355: 55 push %ebp - 14356: 89 e5 mov %esp,%ebp - 14358: 5d pop %ebp - 14359: c3 ret - -0001435a <_list_add_tail>: - 1435a: 55 push %ebp - 1435b: 89 e5 mov %esp,%ebp - 1435d: ff 75 0c pushl 0xc(%ebp) - 14360: 8b 45 0c mov 0xc(%ebp),%eax - 14363: ff 70 04 pushl 0x4(%eax) - 14366: ff 75 08 pushl 0x8(%ebp) - 14369: e8 69 fd ff ff call 140d7 <___list_add> - 1436e: 83 c4 0c add $0xc,%esp - 14371: c9 leave - 14372: c3 ret - -00014373 <_hub_power_on>: - 14373: 55 push %ebp - 14374: 89 e5 mov %esp,%ebp - 14376: 83 ec 18 sub $0x18,%esp - 14379: 8b 45 08 mov 0x8(%ebp),%eax - 1437c: 8b 00 mov (%eax),%eax - 1437e: 8b 80 b8 00 00 00 mov 0xb8(%eax),%eax - 14384: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 14387: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 1438a: 2d c0 00 00 00 sub $0xc0,%eax - 1438f: 89 45 fc mov %eax,0xfffffffc(%ebp) - 14392: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) - 14399: 8b 45 08 mov 0x8(%ebp),%eax - 1439c: 8b 40 2c mov 0x2c(%eax),%eax - 1439f: 8a 40 02 mov 0x2(%eax),%al - 143a2: 25 ff 00 00 00 and $0xff,%eax - 143a7: 3b 45 f8 cmp 0xfffffff8(%ebp),%eax - 143aa: 7e 1c jle 143c8 <_hub_power_on+0x55> - 143ac: 83 ec 04 sub $0x4,%esp - 143af: 6a 08 push $0x8 - 143b1: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 143b4: 40 inc %eax - 143b5: 50 push %eax - 143b6: ff 75 fc pushl 0xfffffffc(%ebp) - 143b9: e8 62 fb ff ff call 13f20 <_set_port_feature> - 143be: 83 c4 10 add $0x10,%esp - 143c1: 8d 45 f8 lea 0xfffffff8(%ebp),%eax - 143c4: ff 00 incl (%eax) - 143c6: eb d1 jmp 14399 <_hub_power_on+0x26> - 143c8: 83 ec 0c sub $0xc,%esp - 143cb: 8b 45 08 mov 0x8(%ebp),%eax - 143ce: 8b 40 2c mov 0x2c(%eax),%eax - 143d1: 8a 40 05 mov 0x5(%eax),%al - 143d4: 25 ff 00 00 00 and $0xff,%eax - 143d9: 01 c0 add %eax,%eax - 143db: 50 push %eax - 143dc: e8 cf 50 00 00 call 194b0 <_wait_ms> - 143e1: 83 c4 10 add $0x10,%esp - 143e4: c9 leave - 143e5: c3 ret - -000143e6 <_hub_hub_status>: - 143e6: 55 push %ebp - 143e7: 89 e5 mov %esp,%ebp - 143e9: 83 ec 08 sub $0x8,%esp - 143ec: 8b 45 08 mov 0x8(%ebp),%eax - 143ef: 8b 00 mov (%eax),%eax - 143f1: 8b 80 b8 00 00 00 mov 0xb8(%eax),%eax - 143f7: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 143fa: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 143fd: 2d c0 00 00 00 sub $0xc0,%eax - 14402: 89 45 fc mov %eax,0xfffffffc(%ebp) - 14405: 83 ec 08 sub $0x8,%esp - 14408: 8b 45 08 mov 0x8(%ebp),%eax - 1440b: ff 70 10 pushl 0x10(%eax) - 1440e: ff 75 fc pushl 0xfffffffc(%ebp) - 14411: e8 4f fb ff ff call 13f65 <_get_hub_status> - 14416: 83 c4 10 add $0x10,%esp - 14419: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 1441c: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) - 14420: 79 02 jns 14424 <_hub_hub_status+0x3e> - 14422: eb 26 jmp 1444a <_hub_hub_status+0x64> - 14424: 8b 55 0c mov 0xc(%ebp),%edx - 14427: 8b 45 08 mov 0x8(%ebp),%eax - 1442a: 8b 40 10 mov 0x10(%eax),%eax - 1442d: 66 8b 00 mov (%eax),%ax - 14430: 66 89 02 mov %ax,(%edx) - 14433: 8b 55 10 mov 0x10(%ebp),%edx - 14436: 8b 45 08 mov 0x8(%ebp),%eax - 14439: 8b 40 10 mov 0x10(%eax),%eax - 1443c: 66 8b 40 02 mov 0x2(%eax),%ax - 14440: 66 89 02 mov %ax,(%edx) - 14443: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) - 1444a: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 1444d: c9 leave - 1444e: c3 ret - -0001444f <_hub_configure>: - 1444f: 55 push %ebp - 14450: 89 e5 mov %esp,%ebp - 14452: 53 push %ebx - 14453: 83 ec 74 sub $0x74,%esp - 14456: 8b 45 08 mov 0x8(%ebp),%eax - 14459: 8b 00 mov (%eax),%eax - 1445b: 8b 80 b8 00 00 00 mov 0xb8(%eax),%eax - 14461: 89 45 f0 mov %eax,0xfffffff0(%ebp) - 14464: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 14467: 2d c0 00 00 00 sub $0xc0,%eax - 1446c: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 1446f: 8b 5d 08 mov 0x8(%ebp),%ebx - 14472: 8b 45 08 mov 0x8(%ebp),%eax - 14475: 83 c0 0c add $0xc,%eax - 14478: 50 push %eax - 14479: 6a 00 push $0x0 - 1447b: 6a 03 push $0x3 - 1447d: ff 75 f4 pushl 0xfffffff4(%ebp) - 14480: e8 dd 2b 00 00 call 17062 <_usb_buffer_alloc> - 14485: 83 c4 10 add $0x10,%esp - 14488: 89 43 08 mov %eax,0x8(%ebx) - 1448b: 8b 45 08 mov 0x8(%ebp),%eax - 1448e: 83 78 08 00 cmpl $0x0,0x8(%eax) - 14492: 75 13 jne 144a7 <_hub_configure+0x58> - 14494: c7 45 dc 58 b1 01 00 movl $0x1b158,0xffffffdc(%ebp) - 1449b: c7 45 e0 f4 ff ff ff movl $0xfffffff4,0xffffffe0(%ebp) - 144a2: e9 88 03 00 00 jmp 1482f <_hub_configure+0x3e0> - 144a7: 8b 5d 08 mov 0x8(%ebp),%ebx - 144aa: 83 ec 08 sub $0x8,%esp - 144ad: 6a 04 push $0x4 - 144af: 6a 01 push $0x1 - 144b1: e8 7a 55 00 00 call 19a30 <_ExAllocatePool@8> - 144b6: 83 c4 08 add $0x8,%esp - 144b9: 89 43 10 mov %eax,0x10(%ebx) - 144bc: 8b 45 08 mov 0x8(%ebp),%eax - 144bf: 83 78 10 00 cmpl $0x0,0x10(%eax) - 144c3: 75 13 jne 144d8 <_hub_configure+0x89> - 144c5: c7 45 dc 78 b1 01 00 movl $0x1b178,0xffffffdc(%ebp) - 144cc: c7 45 e0 f4 ff ff ff movl $0xfffffff4,0xffffffe0(%ebp) - 144d3: e9 57 03 00 00 jmp 1482f <_hub_configure+0x3e0> - 144d8: 8b 5d 08 mov 0x8(%ebp),%ebx - 144db: 83 ec 08 sub $0x8,%esp - 144de: 6a 0d push $0xd - 144e0: 6a 01 push $0x1 - 144e2: e8 49 55 00 00 call 19a30 <_ExAllocatePool@8> - 144e7: 83 c4 08 add $0x8,%esp - 144ea: 89 43 2c mov %eax,0x2c(%ebx) - 144ed: 8b 45 08 mov 0x8(%ebp),%eax - 144f0: 83 78 2c 00 cmpl $0x0,0x2c(%eax) - 144f4: 75 13 jne 14509 <_hub_configure+0xba> - 144f6: c7 45 dc 98 b1 01 00 movl $0x1b198,0xffffffdc(%ebp) - 144fd: c7 45 e0 f4 ff ff ff movl $0xfffffff4,0xffffffe0(%ebp) - 14504: e9 26 03 00 00 jmp 1482f <_hub_configure+0x3e0> - 14509: 83 ec 04 sub $0x4,%esp - 1450c: 6a 0d push $0xd - 1450e: 8b 45 08 mov 0x8(%ebp),%eax - 14511: ff 70 2c pushl 0x2c(%eax) - 14514: ff 75 f4 pushl 0xfffffff4(%ebp) - 14517: e8 24 f9 ff ff call 13e40 <_get_hub_descriptor> - 1451c: 83 c4 10 add $0x10,%esp - 1451f: 89 45 e0 mov %eax,0xffffffe0(%ebp) - 14522: 83 7d e0 00 cmpl $0x0,0xffffffe0(%ebp) - 14526: 79 0c jns 14534 <_hub_configure+0xe5> - 14528: c7 45 dc b5 b1 01 00 movl $0x1b1b5,0xffffffdc(%ebp) - 1452f: e9 fb 02 00 00 jmp 1482f <_hub_configure+0x3e0> - 14534: 8b 45 08 mov 0x8(%ebp),%eax - 14537: 8b 40 2c mov 0x2c(%eax),%eax - 1453a: 80 78 02 10 cmpb $0x10,0x2(%eax) - 1453e: 76 13 jbe 14553 <_hub_configure+0x104> - 14540: c7 45 dc cf b1 01 00 movl $0x1b1cf,0xffffffdc(%ebp) - 14547: c7 45 e0 ed ff ff ff movl $0xffffffed,0xffffffe0(%ebp) - 1454e: e9 dc 02 00 00 jmp 1482f <_hub_configure+0x3e0> - 14553: 83 ec 0c sub $0xc,%esp - 14556: ff 75 f4 pushl 0xfffffff4(%ebp) - 14559: e8 49 03 00 00 call 148a7 <_hubdev> - 1455e: 83 c4 10 add $0x10,%esp - 14561: 89 45 f0 mov %eax,0xfffffff0(%ebp) - 14564: 8b 55 f4 mov 0xfffffff4(%ebp),%edx - 14567: 8b 45 08 mov 0x8(%ebp),%eax - 1456a: 8b 40 2c mov 0x2c(%eax),%eax - 1456d: 8a 40 02 mov 0x2(%eax),%al - 14570: 25 ff 00 00 00 and $0xff,%eax - 14575: 89 82 ac 01 00 00 mov %eax,0x1ac(%edx) - 1457b: 8b 45 08 mov 0x8(%ebp),%eax - 1457e: 8b 40 2c mov 0x2c(%eax),%eax - 14581: 66 8b 40 03 mov 0x3(%eax),%ax - 14585: 25 ff ff 00 00 and $0xffff,%eax - 1458a: c1 e8 02 shr $0x2,%eax - 1458d: 83 e0 01 and $0x1,%eax - 14590: 85 c0 test %eax,%eax - 14592: 0f 84 b5 00 00 00 je 1464d <_hub_configure+0x1fe> - 14598: c7 45 d8 00 00 00 00 movl $0x0,0xffffffd8(%ebp) - 1459f: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 145a2: 8b 80 ac 01 00 00 mov 0x1ac(%eax),%eax - 145a8: 3b 45 d8 cmp 0xffffffd8(%ebp),%eax - 145ab: 0f 8e 88 00 00 00 jle 14639 <_hub_configure+0x1ea> - 145b1: 8d 45 f8 lea 0xfffffff8(%ebp),%eax - 145b4: 03 45 d8 add 0xffffffd8(%ebp),%eax - 145b7: 83 e8 40 sub $0x40,%eax - 145ba: 89 45 b0 mov %eax,0xffffffb0(%ebp) - 145bd: 8b 45 08 mov 0x8(%ebp),%eax - 145c0: 8b 40 2c mov 0x2c(%eax),%eax - 145c3: 89 45 a8 mov %eax,0xffffffa8(%ebp) - 145c6: 8b 45 d8 mov 0xffffffd8(%ebp),%eax - 145c9: 40 inc %eax - 145ca: 89 45 a4 mov %eax,0xffffffa4(%ebp) - 145cd: 83 7d a4 00 cmpl $0x0,0xffffffa4(%ebp) - 145d1: 79 04 jns 145d7 <_hub_configure+0x188> - 145d3: 83 45 a4 07 addl $0x7,0xffffffa4(%ebp) - 145d7: 8b 45 a4 mov 0xffffffa4(%ebp),%eax - 145da: c1 f8 03 sar $0x3,%eax - 145dd: 8b 4d a8 mov 0xffffffa8(%ebp),%ecx - 145e0: ba 00 00 00 00 mov $0x0,%edx - 145e5: 8a 54 08 07 mov 0x7(%eax,%ecx,1),%dl - 145e9: 89 55 a0 mov %edx,0xffffffa0(%ebp) - 145ec: 8b 45 d8 mov 0xffffffd8(%ebp),%eax - 145ef: 40 inc %eax - 145f0: 89 45 9c mov %eax,0xffffff9c(%ebp) - 145f3: 8b 55 9c mov 0xffffff9c(%ebp),%edx - 145f6: 89 55 98 mov %edx,0xffffff98(%ebp) - 145f9: 83 7d 98 00 cmpl $0x0,0xffffff98(%ebp) - 145fd: 79 04 jns 14603 <_hub_configure+0x1b4> - 145ff: 83 45 98 07 addl $0x7,0xffffff98(%ebp) - 14603: 8b 45 98 mov 0xffffff98(%ebp),%eax - 14606: c1 f8 03 sar $0x3,%eax - 14609: c1 e0 03 shl $0x3,%eax - 1460c: 8b 4d 9c mov 0xffffff9c(%ebp),%ecx - 1460f: 29 c1 sub %eax,%ecx - 14611: 8b 45 a0 mov 0xffffffa0(%ebp),%eax - 14614: d3 f8 sar %cl,%eax - 14616: 83 e0 01 and $0x1,%eax - 14619: 85 c0 test %eax,%eax - 1461b: 74 06 je 14623 <_hub_configure+0x1d4> - 1461d: c6 45 af 46 movb $0x46,0xffffffaf(%ebp) - 14621: eb 04 jmp 14627 <_hub_configure+0x1d8> - 14623: c6 45 af 52 movb $0x52,0xffffffaf(%ebp) - 14627: 8a 4d af mov 0xffffffaf(%ebp),%cl - 1462a: 8b 45 b0 mov 0xffffffb0(%ebp),%eax - 1462d: 88 08 mov %cl,(%eax) - 1462f: 8d 45 d8 lea 0xffffffd8(%ebp),%eax - 14632: ff 00 incl (%eax) - 14634: e9 66 ff ff ff jmp 1459f <_hub_configure+0x150> - 14639: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 1463c: 8d 55 f8 lea 0xfffffff8(%ebp),%edx - 1463f: 03 90 ac 01 00 00 add 0x1ac(%eax),%edx - 14645: 89 d0 mov %edx,%eax - 14647: 83 e8 40 sub $0x40,%eax - 1464a: c6 00 00 movb $0x0,(%eax) - 1464d: 8b 55 08 mov 0x8(%ebp),%edx - 14650: 83 c2 40 add $0x40,%edx - 14653: 8b 45 08 mov 0x8(%ebp),%eax - 14656: 83 c0 40 add $0x40,%eax - 14659: 89 02 mov %eax,(%edx) - 1465b: 8b 55 08 mov 0x8(%ebp),%edx - 1465e: 83 c2 40 add $0x40,%edx - 14661: 8b 45 08 mov 0x8(%ebp),%eax - 14664: 83 c0 40 add $0x40,%eax - 14667: 89 42 04 mov %eax,0x4(%edx) - 1466a: 8b 45 08 mov 0x8(%ebp),%eax - 1466d: 83 c0 48 add $0x48,%eax - 14670: c7 00 13 41 01 00 movl $0x14113,(%eax) - 14676: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 14679: b9 00 00 00 00 mov $0x0,%ecx - 1467e: 8a 88 76 01 00 00 mov 0x176(%eax),%cl - 14684: 89 4d 94 mov %ecx,0xffffff94(%ebp) - 14687: 83 7d 94 01 cmpl $0x1,0xffffff94(%ebp) - 1468b: 74 08 je 14695 <_hub_configure+0x246> - 1468d: 83 7d 94 02 cmpl $0x2,0xffffff94(%ebp) - 14691: 74 0d je 146a0 <_hub_configure+0x251> - 14693: eb 1e jmp 146b3 <_hub_configure+0x264> - 14695: 8b 55 08 mov 0x8(%ebp),%edx - 14698: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 1469b: 89 42 34 mov %eax,0x34(%edx) - 1469e: eb 13 jmp 146b3 <_hub_configure+0x264> - 146a0: 8b 45 08 mov 0x8(%ebp),%eax - 146a3: 8b 55 f4 mov 0xfffffff4(%ebp),%edx - 146a6: 89 50 34 mov %edx,0x34(%eax) - 146a9: 8b 45 08 mov 0x8(%ebp),%eax - 146ac: c7 40 38 01 00 00 00 movl $0x1,0x38(%eax) - 146b3: 8b 45 08 mov 0x8(%ebp),%eax - 146b6: 8b 40 2c mov 0x2c(%eax),%eax - 146b9: 66 8b 40 03 mov 0x3(%eax),%ax - 146bd: 25 ff ff 00 00 and $0xffff,%eax - 146c2: 83 e0 60 and $0x60,%eax - 146c5: 85 c0 test %eax,%eax - 146c7: 74 02 je 146cb <_hub_configure+0x27c> - 146c9: eb 00 jmp 146cb <_hub_configure+0x27c> - 146cb: 83 ec 04 sub $0x4,%esp - 146ce: 8d 45 ec lea 0xffffffec(%ebp),%eax - 146d1: 50 push %eax - 146d2: 8d 45 ee lea 0xffffffee(%ebp),%eax - 146d5: 50 push %eax - 146d6: ff 75 08 pushl 0x8(%ebp) - 146d9: e8 08 fd ff ff call 143e6 <_hub_hub_status> - 146de: 83 c4 10 add $0x10,%esp - 146e1: 89 45 e0 mov %eax,0xffffffe0(%ebp) - 146e4: 83 7d e0 00 cmpl $0x0,0xffffffe0(%ebp) - 146e8: 79 0c jns 146f6 <_hub_configure+0x2a7> - 146ea: c7 45 dc e7 b1 01 00 movl $0x1b1e7,0xffffffdc(%ebp) - 146f1: e9 39 01 00 00 jmp 1482f <_hub_configure+0x3e0> - 146f6: 8b 45 0c mov 0xc(%ebp),%eax - 146f9: 8a 40 02 mov 0x2(%eax),%al - 146fc: 25 ff 00 00 00 and $0xff,%eax - 14701: 50 push %eax - 14702: ff 75 f4 pushl 0xfffffff4(%ebp) - 14705: e8 7e f7 ff ff call 13e88 <___create_pipe> - 1470a: 83 c4 08 add $0x8,%esp - 1470d: 0d 80 00 00 40 or $0x40000080,%eax - 14712: 89 45 e8 mov %eax,0xffffffe8(%ebp) - 14715: 8b 45 e8 mov 0xffffffe8(%ebp),%eax - 14718: c1 e8 07 shr $0x7,%eax - 1471b: 83 e0 01 and $0x1,%eax - 1471e: 85 c0 test %eax,%eax - 14720: 75 15 jne 14737 <_hub_configure+0x2e8> - 14722: 8b 55 f4 mov 0xfffffff4(%ebp),%edx - 14725: 8b 45 e8 mov 0xffffffe8(%ebp),%eax - 14728: c1 e8 0f shr $0xf,%eax - 1472b: 83 e0 0f and $0xf,%eax - 1472e: 8b 44 82 78 mov 0x78(%edx,%eax,4),%eax - 14732: 89 45 90 mov %eax,0xffffff90(%ebp) - 14735: eb 13 jmp 1474a <_hub_configure+0x2fb> - 14737: 8b 55 f4 mov 0xfffffff4(%ebp),%edx - 1473a: 8b 45 e8 mov 0xffffffe8(%ebp),%eax - 1473d: c1 e8 0f shr $0xf,%eax - 14740: 83 e0 0f and $0xf,%eax - 14743: 8b 44 82 38 mov 0x38(%edx,%eax,4),%eax - 14747: 89 45 90 mov %eax,0xffffff90(%ebp) - 1474a: 8b 45 90 mov 0xffffff90(%ebp),%eax - 1474d: 89 45 e4 mov %eax,0xffffffe4(%ebp) - 14750: 83 7d e4 03 cmpl $0x3,0xffffffe4(%ebp) - 14754: 76 07 jbe 1475d <_hub_configure+0x30e> - 14756: c7 45 e4 03 00 00 00 movl $0x3,0xffffffe4(%ebp) - 1475d: 8b 5d 08 mov 0x8(%ebp),%ebx - 14760: 83 ec 08 sub $0x8,%esp - 14763: 6a 00 push $0x0 - 14765: 6a 00 push $0x0 - 14767: e8 80 39 00 00 call 180ec <_usb_alloc_urb@8> - 1476c: 83 c4 08 add $0x8,%esp - 1476f: 89 43 04 mov %eax,0x4(%ebx) - 14772: 8b 45 08 mov 0x8(%ebp),%eax - 14775: 83 78 04 00 cmpl $0x0,0x4(%eax) - 14779: 75 13 jne 1478e <_hub_configure+0x33f> - 1477b: c7 45 dc fc b1 01 00 movl $0x1b1fc,0xffffffdc(%ebp) - 14782: c7 45 e0 f4 ff ff ff movl $0xfffffff4,0xffffffe0(%ebp) - 14789: e9 a1 00 00 00 jmp 1482f <_hub_configure+0x3e0> - 1478e: 8b 45 0c mov 0xc(%ebp),%eax - 14791: 8a 40 06 mov 0x6(%eax),%al - 14794: 25 ff 00 00 00 and $0xff,%eax - 14799: 50 push %eax - 1479a: ff 75 08 pushl 0x8(%ebp) - 1479d: 68 e8 3f 01 00 push $0x13fe8 - 147a2: ff 75 e4 pushl 0xffffffe4(%ebp) - 147a5: 8b 45 08 mov 0x8(%ebp),%eax - 147a8: ff 70 08 pushl 0x8(%eax) - 147ab: ff 75 e8 pushl 0xffffffe8(%ebp) - 147ae: ff 75 f4 pushl 0xfffffff4(%ebp) - 147b1: 8b 45 08 mov 0x8(%ebp),%eax - 147b4: ff 70 04 pushl 0x4(%eax) - 147b7: e8 81 00 00 00 call 1483d <_usb_fill_int_urb> - 147bc: 83 c4 20 add $0x20,%esp - 147bf: 8b 45 08 mov 0x8(%ebp),%eax - 147c2: 8b 50 04 mov 0x4(%eax),%edx - 147c5: 8b 45 08 mov 0x8(%ebp),%eax - 147c8: 8b 40 0c mov 0xc(%eax),%eax - 147cb: 89 42 28 mov %eax,0x28(%edx) - 147ce: 8b 45 08 mov 0x8(%ebp),%eax - 147d1: 8b 50 04 mov 0x4(%eax),%edx - 147d4: 8b 45 08 mov 0x8(%ebp),%eax - 147d7: 8b 40 04 mov 0x4(%eax),%eax - 147da: 8b 40 20 mov 0x20(%eax),%eax - 147dd: 83 c8 04 or $0x4,%eax - 147e0: 89 42 20 mov %eax,0x20(%edx) - 147e3: 83 ec 08 sub $0x8,%esp - 147e6: 6a 00 push $0x0 - 147e8: 8b 45 08 mov 0x8(%ebp),%eax - 147eb: ff 70 04 pushl 0x4(%eax) - 147ee: e8 b0 39 00 00 call 181a3 <_usb_submit_urb@8> - 147f3: 83 c4 08 add $0x8,%esp - 147f6: 89 45 e0 mov %eax,0xffffffe0(%ebp) - 147f9: 83 7d e0 00 cmpl $0x0,0xffffffe0(%ebp) - 147fd: 74 09 je 14808 <_hub_configure+0x3b9> - 147ff: c7 45 dc 1c b2 01 00 movl $0x1b21c,0xffffffdc(%ebp) - 14806: eb 27 jmp 1482f <_hub_configure+0x3e0> - 14808: 83 ec 0c sub $0xc,%esp - 1480b: 68 50 c0 01 00 push $0x1c050 - 14810: e8 50 50 00 00 call 19865 <_my_wake_up> - 14815: 83 c4 10 add $0x10,%esp - 14818: 83 ec 0c sub $0xc,%esp - 1481b: ff 75 08 pushl 0x8(%ebp) - 1481e: e8 50 fb ff ff call 14373 <_hub_power_on> - 14823: 83 c4 10 add $0x10,%esp - 14826: c7 45 b4 00 00 00 00 movl $0x0,0xffffffb4(%ebp) - 1482d: eb 06 jmp 14835 <_hub_configure+0x3e6> - 1482f: 8b 45 e0 mov 0xffffffe0(%ebp),%eax - 14832: 89 45 b4 mov %eax,0xffffffb4(%ebp) - 14835: 8b 45 b4 mov 0xffffffb4(%ebp),%eax - 14838: 8b 5d fc mov 0xfffffffc(%ebp),%ebx - 1483b: c9 leave - 1483c: c3 ret - -0001483d <_usb_fill_int_urb>: - 1483d: 55 push %ebp - 1483e: 89 e5 mov %esp,%ebp - 14840: 8b 55 08 mov 0x8(%ebp),%edx - 14843: 8b 45 0c mov 0xc(%ebp),%eax - 14846: 89 42 14 mov %eax,0x14(%edx) - 14849: 8b 55 08 mov 0x8(%ebp),%edx - 1484c: 8b 45 10 mov 0x10(%ebp),%eax - 1484f: 89 42 18 mov %eax,0x18(%edx) - 14852: 8b 55 08 mov 0x8(%ebp),%edx - 14855: 8b 45 14 mov 0x14(%ebp),%eax - 14858: 89 42 24 mov %eax,0x24(%edx) - 1485b: 8b 55 08 mov 0x8(%ebp),%edx - 1485e: 8b 45 18 mov 0x18(%ebp),%eax - 14861: 89 42 2c mov %eax,0x2c(%edx) - 14864: 8b 55 08 mov 0x8(%ebp),%edx - 14867: 8b 45 1c mov 0x1c(%ebp),%eax - 1486a: 89 42 58 mov %eax,0x58(%edx) - 1486d: 8b 55 08 mov 0x8(%ebp),%edx - 14870: 8b 45 20 mov 0x20(%ebp),%eax - 14873: 89 42 54 mov %eax,0x54(%edx) - 14876: 8b 45 0c mov 0xc(%ebp),%eax - 14879: 83 78 18 03 cmpl $0x3,0x18(%eax) - 1487d: 75 13 jne 14892 <_usb_fill_int_urb+0x55> - 1487f: 8b 55 08 mov 0x8(%ebp),%edx - 14882: 8b 4d 24 mov 0x24(%ebp),%ecx - 14885: 49 dec %ecx - 14886: b8 01 00 00 00 mov $0x1,%eax - 1488b: d3 e0 shl %cl,%eax - 1488d: 89 42 48 mov %eax,0x48(%edx) - 14890: eb 09 jmp 1489b <_usb_fill_int_urb+0x5e> - 14892: 8b 55 08 mov 0x8(%ebp),%edx - 14895: 8b 45 24 mov 0x24(%ebp),%eax - 14898: 89 42 48 mov %eax,0x48(%edx) - 1489b: 8b 45 08 mov 0x8(%ebp),%eax - 1489e: c7 40 40 ff ff ff ff movl $0xffffffff,0x40(%eax) - 148a5: 5d pop %ebp - 148a6: c3 ret - -000148a7 <_hubdev>: - 148a7: 55 push %ebp - 148a8: 89 e5 mov %esp,%ebp - 148aa: 8b 45 08 mov 0x8(%ebp),%eax - 148ad: 8b 80 88 01 00 00 mov 0x188(%eax),%eax - 148b3: 8b 40 0c mov 0xc(%eax),%eax - 148b6: 83 c0 18 add $0x18,%eax - 148b9: 5d pop %ebp - 148ba: c3 ret - -000148bb <_hub_disconnect>: - 148bb: 55 push %ebp - 148bc: 89 e5 mov %esp,%ebp - 148be: 83 ec 18 sub $0x18,%esp - 148c1: 83 ec 0c sub $0xc,%esp - 148c4: ff 75 08 pushl 0x8(%ebp) - 148c7: e8 66 01 00 00 call 14a32 <_usb_get_intfdata> - 148cc: 83 c4 10 add $0x10,%esp - 148cf: 89 45 fc mov %eax,0xfffffffc(%ebp) - 148d2: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) - 148d6: 75 05 jne 148dd <_hub_disconnect+0x22> - 148d8: e9 3f 01 00 00 jmp 14a1c <_hub_disconnect+0x161> - 148dd: 83 ec 08 sub $0x8,%esp - 148e0: 6a 00 push $0x0 - 148e2: ff 75 08 pushl 0x8(%ebp) - 148e5: e8 34 01 00 00 call 14a1e <_usb_set_intfdata> - 148ea: 83 c4 10 add $0x10,%esp - 148ed: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) - 148f4: 83 ec 0c sub $0xc,%esp - 148f7: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 148fa: 83 c0 24 add $0x24,%eax - 148fd: 50 push %eax - 148fe: e8 09 f9 ff ff call 1420c <_list_del> - 14903: 83 c4 10 add $0x10,%esp - 14906: 8b 55 fc mov 0xfffffffc(%ebp),%edx - 14909: 83 c2 24 add $0x24,%edx - 1490c: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 1490f: 83 c0 24 add $0x24,%eax - 14912: 89 02 mov %eax,(%edx) - 14914: 8b 55 fc mov 0xfffffffc(%ebp),%edx - 14917: 83 c2 24 add $0x24,%edx - 1491a: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 1491d: 83 c0 24 add $0x24,%eax - 14920: 89 42 04 mov %eax,0x4(%edx) - 14923: 83 ec 0c sub $0xc,%esp - 14926: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 14929: 83 c0 1c add $0x1c,%eax - 1492c: 50 push %eax - 1492d: e8 da f8 ff ff call 1420c <_list_del> - 14932: 83 c4 10 add $0x10,%esp - 14935: 8b 55 fc mov 0xfffffffc(%ebp),%edx - 14938: 83 c2 1c add $0x1c,%edx - 1493b: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 1493e: 83 c0 1c add $0x1c,%eax - 14941: 89 02 mov %eax,(%edx) - 14943: 8b 55 fc mov 0xfffffffc(%ebp),%edx - 14946: 83 c2 1c add $0x1c,%edx - 14949: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 1494c: 83 c0 1c add $0x1c,%eax - 1494f: 89 42 04 mov %eax,0x4(%edx) - 14952: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 14955: 83 78 04 00 cmpl $0x0,0x4(%eax) - 14959: 74 2c je 14987 <_hub_disconnect+0xcc> - 1495b: 83 ec 0c sub $0xc,%esp - 1495e: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 14961: ff 70 04 pushl 0x4(%eax) - 14964: e8 51 3b 00 00 call 184ba <_usb_unlink_urb@4> - 14969: 83 c4 0c add $0xc,%esp - 1496c: 83 ec 0c sub $0xc,%esp - 1496f: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 14972: ff 70 04 pushl 0x4(%eax) - 14975: e8 bc 37 00 00 call 18136 <_usb_free_urb@4> - 1497a: 83 c4 0c add $0xc,%esp - 1497d: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 14980: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) - 14987: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 1498a: 83 78 2c 00 cmpl $0x0,0x2c(%eax) - 1498e: 74 1b je 149ab <_hub_disconnect+0xf0> - 14990: 83 ec 0c sub $0xc,%esp - 14993: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 14996: ff 70 2c pushl 0x2c(%eax) - 14999: e8 a2 50 00 00 call 19a40 <_ExFreePool@4> - 1499e: 83 c4 0c add $0xc,%esp - 149a1: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 149a4: c7 40 2c 00 00 00 00 movl $0x0,0x2c(%eax) - 149ab: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 149ae: 83 78 10 00 cmpl $0x0,0x10(%eax) - 149b2: 74 1b je 149cf <_hub_disconnect+0x114> - 149b4: 83 ec 0c sub $0xc,%esp - 149b7: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 149ba: ff 70 10 pushl 0x10(%eax) - 149bd: e8 7e 50 00 00 call 19a40 <_ExFreePool@4> - 149c2: 83 c4 0c add $0xc,%esp - 149c5: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 149c8: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) - 149cf: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 149d2: 83 78 08 00 cmpl $0x0,0x8(%eax) - 149d6: 74 36 je 14a0e <_hub_disconnect+0x153> - 149d8: 8b 45 08 mov 0x8(%ebp),%eax - 149db: 8b 80 b8 00 00 00 mov 0xb8(%eax),%eax - 149e1: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 149e4: 8b 55 f4 mov 0xfffffff4(%ebp),%edx - 149e7: 81 ea c0 00 00 00 sub $0xc0,%edx - 149ed: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 149f0: ff 70 0c pushl 0xc(%eax) - 149f3: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 149f6: ff 70 08 pushl 0x8(%eax) - 149f9: 6a 03 push $0x3 - 149fb: 52 push %edx - 149fc: e8 d1 26 00 00 call 170d2 <_usb_buffer_free> - 14a01: 83 c4 10 add $0x10,%esp - 14a04: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 14a07: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) - 14a0e: 83 ec 0c sub $0xc,%esp - 14a11: ff 75 fc pushl 0xfffffffc(%ebp) - 14a14: e8 27 50 00 00 call 19a40 <_ExFreePool@4> - 14a19: 83 c4 0c add $0xc,%esp - 14a1c: c9 leave - 14a1d: c3 ret - -00014a1e <_usb_set_intfdata>: - 14a1e: 55 push %ebp - 14a1f: 89 e5 mov %esp,%ebp - 14a21: 8b 55 08 mov 0x8(%ebp),%edx - 14a24: 83 c2 18 add $0x18,%edx - 14a27: 8b 45 0c mov 0xc(%ebp),%eax - 14a2a: 89 82 9c 00 00 00 mov %eax,0x9c(%edx) - 14a30: 5d pop %ebp - 14a31: c3 ret - -00014a32 <_usb_get_intfdata>: - 14a32: 55 push %ebp - 14a33: 89 e5 mov %esp,%ebp - 14a35: 8b 45 08 mov 0x8(%ebp),%eax - 14a38: 83 c0 18 add $0x18,%eax - 14a3b: 8b 80 9c 00 00 00 mov 0x9c(%eax),%eax - 14a41: 5d pop %ebp - 14a42: c3 ret - -00014a43 <_hub_probe>: - 14a43: 55 push %ebp - 14a44: 89 e5 mov %esp,%ebp - 14a46: 83 ec 28 sub $0x28,%esp - 14a49: 8b 4d 08 mov 0x8(%ebp),%ecx - 14a4c: 8b 45 08 mov 0x8(%ebp),%eax - 14a4f: 8b 50 04 mov 0x4(%eax),%edx - 14a52: 89 d0 mov %edx,%eax - 14a54: 01 c0 add %eax,%eax - 14a56: 01 d0 add %edx,%eax - 14a58: c1 e0 03 shl $0x3,%eax - 14a5b: 03 01 add (%ecx),%eax - 14a5d: 89 45 fc mov %eax,0xfffffffc(%ebp) - 14a60: 8b 45 08 mov 0x8(%ebp),%eax - 14a63: 8b 80 b8 00 00 00 mov 0xb8(%eax),%eax - 14a69: 89 45 e8 mov %eax,0xffffffe8(%ebp) - 14a6c: 8b 45 e8 mov 0xffffffe8(%ebp),%eax - 14a6f: 2d c0 00 00 00 sub $0xc0,%eax - 14a74: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 14a77: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 14a7a: 80 78 06 00 cmpb $0x0,0x6(%eax) - 14a7e: 74 15 je 14a95 <_hub_probe+0x52> - 14a80: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 14a83: 80 78 06 01 cmpb $0x1,0x6(%eax) - 14a87: 74 0c je 14a95 <_hub_probe+0x52> - 14a89: c7 45 e4 fb ff ff ff movl $0xfffffffb,0xffffffe4(%ebp) - 14a90: e9 22 01 00 00 jmp 14bb7 <_hub_probe+0x174> - 14a95: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 14a98: 80 78 04 01 cmpb $0x1,0x4(%eax) - 14a9c: 74 02 je 14aa0 <_hub_probe+0x5d> - 14a9e: eb e9 jmp 14a89 <_hub_probe+0x46> - 14aa0: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 14aa3: 8b 40 0c mov 0xc(%eax),%eax - 14aa6: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 14aa9: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 14aac: 80 78 02 00 cmpb $0x0,0x2(%eax) - 14ab0: 78 02 js 14ab4 <_hub_probe+0x71> - 14ab2: eb d5 jmp 14a89 <_hub_probe+0x46> - 14ab4: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 14ab7: 8a 40 03 mov 0x3(%eax),%al - 14aba: 25 ff 00 00 00 and $0xff,%eax - 14abf: 83 e0 03 and $0x3,%eax - 14ac2: 83 f8 03 cmp $0x3,%eax - 14ac5: 74 02 je 14ac9 <_hub_probe+0x86> - 14ac7: eb c0 jmp 14a89 <_hub_probe+0x46> - 14ac9: 83 ec 08 sub $0x8,%esp - 14acc: 6a 4c push $0x4c - 14ace: 6a 01 push $0x1 - 14ad0: e8 5b 4f 00 00 call 19a30 <_ExAllocatePool@8> - 14ad5: 83 c4 08 add $0x8,%esp - 14ad8: 89 45 f0 mov %eax,0xfffffff0(%ebp) - 14adb: 83 7d f0 00 cmpl $0x0,0xfffffff0(%ebp) - 14adf: 75 0c jne 14aed <_hub_probe+0xaa> - 14ae1: c7 45 e4 f4 ff ff ff movl $0xfffffff4,0xffffffe4(%ebp) - 14ae8: e9 ca 00 00 00 jmp 14bb7 <_hub_probe+0x174> - 14aed: 83 ec 04 sub $0x4,%esp - 14af0: 6a 4c push $0x4c - 14af2: 6a 00 push $0x0 - 14af4: ff 75 f0 pushl 0xfffffff0(%ebp) - 14af7: e8 54 4f 00 00 call 19a50 <_memset> - 14afc: 83 c4 10 add $0x10,%esp - 14aff: 8b 55 f0 mov 0xfffffff0(%ebp),%edx - 14b02: 83 c2 24 add $0x24,%edx - 14b05: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 14b08: 83 c0 24 add $0x24,%eax - 14b0b: 89 02 mov %eax,(%edx) - 14b0d: 8b 55 f0 mov 0xfffffff0(%ebp),%edx - 14b10: 83 c2 24 add $0x24,%edx - 14b13: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 14b16: 83 c0 24 add $0x24,%eax - 14b19: 89 42 04 mov %eax,0x4(%edx) - 14b1c: 8b 55 f0 mov 0xfffffff0(%ebp),%edx - 14b1f: 8b 45 08 mov 0x8(%ebp),%eax - 14b22: 89 02 mov %eax,(%edx) - 14b24: c7 45 ec 00 00 00 00 movl $0x0,0xffffffec(%ebp) - 14b2b: 8b 55 f0 mov 0xfffffff0(%ebp),%edx - 14b2e: 83 c2 1c add $0x1c,%edx - 14b31: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 14b34: 83 c0 1c add $0x1c,%eax - 14b37: 89 02 mov %eax,(%edx) - 14b39: 8b 55 f0 mov 0xfffffff0(%ebp),%edx - 14b3c: 83 c2 1c add $0x1c,%edx - 14b3f: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 14b42: 83 c0 1c add $0x1c,%eax - 14b45: 89 42 04 mov %eax,0x4(%edx) - 14b48: 83 ec 08 sub $0x8,%esp - 14b4b: 68 48 a0 01 00 push $0x1a048 - 14b50: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 14b53: 83 c0 1c add $0x1c,%eax - 14b56: 50 push %eax - 14b57: e8 5d f5 ff ff call 140b9 <_list_add> - 14b5c: 83 c4 10 add $0x10,%esp - 14b5f: ff 75 f0 pushl 0xfffffff0(%ebp) - 14b62: ff 75 08 pushl 0x8(%ebp) - 14b65: e8 b4 fe ff ff call 14a1e <_usb_set_intfdata> - 14b6a: 83 c4 08 add $0x8,%esp - 14b6d: 83 ec 08 sub $0x8,%esp - 14b70: ff 75 f8 pushl 0xfffffff8(%ebp) - 14b73: ff 75 f0 pushl 0xfffffff0(%ebp) - 14b76: e8 d4 f8 ff ff call 1444f <_hub_configure> - 14b7b: 83 c4 10 add $0x10,%esp - 14b7e: 85 c0 test %eax,%eax - 14b80: 78 20 js 14ba2 <_hub_probe+0x15f> - 14b82: 83 ec 08 sub $0x8,%esp - 14b85: 68 37 b2 01 00 push $0x1b237 - 14b8a: 8b 45 08 mov 0x8(%ebp),%eax - 14b8d: 83 c0 18 add $0x18,%eax - 14b90: 50 push %eax - 14b91: e8 0a 4f 00 00 call 19aa0 <_strcpy> - 14b96: 83 c4 10 add $0x10,%esp - 14b99: c7 45 e4 00 00 00 00 movl $0x0,0xffffffe4(%ebp) - 14ba0: eb 15 jmp 14bb7 <_hub_probe+0x174> - 14ba2: 83 ec 0c sub $0xc,%esp - 14ba5: ff 75 08 pushl 0x8(%ebp) - 14ba8: e8 0e fd ff ff call 148bb <_hub_disconnect> - 14bad: 83 c4 10 add $0x10,%esp - 14bb0: c7 45 e4 ed ff ff ff movl $0xffffffed,0xffffffe4(%ebp) - 14bb7: 8b 45 e4 mov 0xffffffe4(%ebp),%eax - 14bba: c9 leave - 14bbb: c3 ret - -00014bbc <_hub_ioctl>: - 14bbc: 55 push %ebp - 14bbd: 89 e5 mov %esp,%ebp - 14bbf: 53 push %ebx - 14bc0: 83 ec 14 sub $0x14,%esp - 14bc3: 8b 45 08 mov 0x8(%ebp),%eax - 14bc6: 8b 80 b8 00 00 00 mov 0xb8(%eax),%eax - 14bcc: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 14bcf: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 14bd2: 2d c0 00 00 00 sub $0xc0,%eax - 14bd7: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 14bda: 8b 45 0c mov 0xc(%ebp),%eax - 14bdd: 3d d2 04 00 00 cmp $0x4d2,%eax - 14be2: 74 05 je 14be9 <_hub_ioctl+0x2d> - 14be4: e9 8a 00 00 00 jmp 14c73 <_hub_ioctl+0xb7> - 14be9: 8b 45 10 mov 0x10(%ebp),%eax - 14bec: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 14bef: c7 45 f0 00 00 00 00 movl $0x0,0xfffffff0(%ebp) - 14bf6: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 14bf9: 83 38 00 cmpl $0x0,(%eax) - 14bfc: 7f 0b jg 14c09 <_hub_ioctl+0x4d> - 14bfe: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 14c01: c7 00 00 00 00 00 movl $0x0,(%eax) - 14c07: eb 5f jmp 14c68 <_hub_ioctl+0xac> - 14c09: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 14c0c: 8b 55 f8 mov 0xfffffff8(%ebp),%edx - 14c0f: 8b 92 ac 01 00 00 mov 0x1ac(%edx),%edx - 14c15: 89 10 mov %edx,(%eax) - 14c17: c7 45 ec 00 00 00 00 movl $0x0,0xffffffec(%ebp) - 14c1e: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 14c21: 8b 00 mov (%eax),%eax - 14c23: 3b 45 ec cmp 0xffffffec(%ebp),%eax - 14c26: 7e 40 jle 14c68 <_hub_ioctl+0xac> - 14c28: 8b 55 f8 mov 0xfffffff8(%ebp),%edx - 14c2b: 8b 45 ec mov 0xffffffec(%ebp),%eax - 14c2e: 83 bc 82 b0 01 00 00 cmpl $0x0,0x1b0(%edx,%eax,4) - 14c35: 00 - 14c36: 75 10 jne 14c48 <_hub_ioctl+0x8c> - 14c38: 8b 55 f4 mov 0xfffffff4(%ebp),%edx - 14c3b: 8b 45 ec mov 0xffffffec(%ebp),%eax - 14c3e: c7 44 82 04 00 00 00 movl $0x0,0x4(%edx,%eax,4) - 14c45: 00 - 14c46: eb 19 jmp 14c61 <_hub_ioctl+0xa5> - 14c48: 8b 5d f4 mov 0xfffffff4(%ebp),%ebx - 14c4b: 8b 4d ec mov 0xffffffec(%ebp),%ecx - 14c4e: 8b 55 f8 mov 0xfffffff8(%ebp),%edx - 14c51: 8b 45 ec mov 0xffffffec(%ebp),%eax - 14c54: 8b 84 82 b0 01 00 00 mov 0x1b0(%edx,%eax,4),%eax - 14c5b: 8b 00 mov (%eax),%eax - 14c5d: 89 44 8b 04 mov %eax,0x4(%ebx,%ecx,4) - 14c61: 8d 45 ec lea 0xffffffec(%ebp),%eax - 14c64: ff 00 incl (%eax) - 14c66: eb b6 jmp 14c1e <_hub_ioctl+0x62> - 14c68: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 14c6b: 8b 00 mov (%eax),%eax - 14c6d: 40 inc %eax - 14c6e: 89 45 e8 mov %eax,0xffffffe8(%ebp) - 14c71: eb 07 jmp 14c7a <_hub_ioctl+0xbe> - 14c73: c7 45 e8 da ff ff ff movl $0xffffffda,0xffffffe8(%ebp) - 14c7a: 8b 45 e8 mov 0xffffffe8(%ebp),%eax - 14c7d: 83 c4 14 add $0x14,%esp - 14c80: 5b pop %ebx - 14c81: 5d pop %ebp - 14c82: c3 ret - -00014c83 <_hub_reset>: - 14c83: 55 push %ebp - 14c84: 89 e5 mov %esp,%ebp - 14c86: 83 ec 18 sub $0x18,%esp - 14c89: 8b 45 08 mov 0x8(%ebp),%eax - 14c8c: 8b 00 mov (%eax),%eax - 14c8e: 8b 80 b8 00 00 00 mov 0xb8(%eax),%eax - 14c94: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 14c97: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 14c9a: 2d c0 00 00 00 sub $0xc0,%eax - 14c9f: 89 45 fc mov %eax,0xfffffffc(%ebp) - 14ca2: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) - 14ca9: 8b 45 08 mov 0x8(%ebp),%eax - 14cac: 8b 40 2c mov 0x2c(%eax),%eax - 14caf: 8a 40 02 mov 0x2(%eax),%al - 14cb2: 25 ff 00 00 00 and $0xff,%eax - 14cb7: 3b 45 f8 cmp 0xfffffff8(%ebp),%eax - 14cba: 7e 31 jle 14ced <_hub_reset+0x6a> - 14cbc: 8b 55 fc mov 0xfffffffc(%ebp),%edx - 14cbf: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 14cc2: 83 bc 82 b0 01 00 00 cmpl $0x0,0x1b0(%edx,%eax,4) - 14cc9: 00 - 14cca: 74 1a je 14ce6 <_hub_reset+0x63> - 14ccc: 83 ec 0c sub $0xc,%esp - 14ccf: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 14cd2: c1 e0 02 shl $0x2,%eax - 14cd5: 03 45 fc add 0xfffffffc(%ebp),%eax - 14cd8: 05 b0 01 00 00 add $0x1b0,%eax - 14cdd: 50 push %eax - 14cde: e8 2e 19 00 00 call 16611 <_usb_disconnect> - 14ce3: 83 c4 10 add $0x10,%esp - 14ce6: 8d 45 f8 lea 0xfffffff8(%ebp),%eax - 14ce9: ff 00 incl (%eax) - 14ceb: eb bc jmp 14ca9 <_hub_reset+0x26> - 14ced: 8b 45 08 mov 0x8(%ebp),%eax - 14cf0: 83 78 04 00 cmpl $0x0,0x4(%eax) - 14cf4: 74 13 je 14d09 <_hub_reset+0x86> - 14cf6: 83 ec 0c sub $0xc,%esp - 14cf9: 8b 45 08 mov 0x8(%ebp),%eax - 14cfc: ff 70 04 pushl 0x4(%eax) - 14cff: e8 b6 37 00 00 call 184ba <_usb_unlink_urb@4> - 14d04: 83 c4 0c add $0xc,%esp - 14d07: eb 09 jmp 14d12 <_hub_reset+0x8f> - 14d09: c7 45 f4 ff ff ff ff movl $0xffffffff,0xfffffff4(%ebp) - 14d10: eb 5c jmp 14d6e <_hub_reset+0xeb> - 14d12: 83 ec 0c sub $0xc,%esp - 14d15: ff 75 fc pushl 0xfffffffc(%ebp) - 14d18: e8 a3 0d 00 00 call 15ac0 <_usb_reset_device> - 14d1d: 83 c4 10 add $0x10,%esp - 14d20: 85 c0 test %eax,%eax - 14d22: 74 09 je 14d2d <_hub_reset+0xaa> - 14d24: c7 45 f4 ff ff ff ff movl $0xffffffff,0xfffffff4(%ebp) - 14d2b: eb 41 jmp 14d6e <_hub_reset+0xeb> - 14d2d: 8b 45 08 mov 0x8(%ebp),%eax - 14d30: 8b 50 04 mov 0x4(%eax),%edx - 14d33: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 14d36: 89 42 14 mov %eax,0x14(%edx) - 14d39: 83 ec 08 sub $0x8,%esp - 14d3c: 6a 00 push $0x0 - 14d3e: 8b 45 08 mov 0x8(%ebp),%eax - 14d41: ff 70 04 pushl 0x4(%eax) - 14d44: e8 5a 34 00 00 call 181a3 <_usb_submit_urb@8> - 14d49: 83 c4 08 add $0x8,%esp - 14d4c: 85 c0 test %eax,%eax - 14d4e: 74 09 je 14d59 <_hub_reset+0xd6> - 14d50: c7 45 f4 ff ff ff ff movl $0xffffffff,0xfffffff4(%ebp) - 14d57: eb 15 jmp 14d6e <_hub_reset+0xeb> - 14d59: 83 ec 0c sub $0xc,%esp - 14d5c: ff 75 08 pushl 0x8(%ebp) - 14d5f: e8 0f f6 ff ff call 14373 <_hub_power_on> - 14d64: 83 c4 10 add $0x10,%esp - 14d67: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) - 14d6e: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 14d71: c9 leave - 14d72: c3 ret - -00014d73 <_hub_start_disconnect>: - 14d73: 55 push %ebp - 14d74: 89 e5 mov %esp,%ebp - 14d76: 83 ec 08 sub $0x8,%esp - 14d79: 8b 45 08 mov 0x8(%ebp),%eax - 14d7c: 8b 80 b8 00 00 00 mov 0xb8(%eax),%eax - 14d82: 89 45 fc mov %eax,0xfffffffc(%ebp) - 14d85: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) - 14d89: 74 4a je 14dd5 <_hub_start_disconnect+0x62> - 14d8b: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) - 14d92: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 14d95: 8b 80 ac 01 00 00 mov 0x1ac(%eax),%eax - 14d9b: 3b 45 f8 cmp 0xfffffff8(%ebp),%eax - 14d9e: 7e 35 jle 14dd5 <_hub_start_disconnect+0x62> - 14da0: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 14da3: 8b 55 f8 mov 0xfffffff8(%ebp),%edx - 14da6: 8b 84 90 b0 01 00 00 mov 0x1b0(%eax,%edx,4),%eax - 14dad: 3b 45 08 cmp 0x8(%ebp),%eax - 14db0: 75 1c jne 14dce <_hub_start_disconnect+0x5b> - 14db2: 83 ec 0c sub $0xc,%esp - 14db5: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 14db8: c1 e0 02 shl $0x2,%eax - 14dbb: 03 45 fc add 0xfffffffc(%ebp),%eax - 14dbe: 05 b0 01 00 00 add $0x1b0,%eax - 14dc3: 50 push %eax - 14dc4: e8 48 18 00 00 call 16611 <_usb_disconnect> - 14dc9: 83 c4 10 add $0x10,%esp - 14dcc: eb 07 jmp 14dd5 <_hub_start_disconnect+0x62> - 14dce: 8d 45 f8 lea 0xfffffff8(%ebp),%eax - 14dd1: ff 00 incl (%eax) - 14dd3: eb bd jmp 14d92 <_hub_start_disconnect+0x1f> - 14dd5: c9 leave - 14dd6: c3 ret - -00014dd7 <_hub_port_status>: - 14dd7: 55 push %ebp - 14dd8: 89 e5 mov %esp,%ebp - 14dda: 83 ec 08 sub $0x8,%esp - 14ddd: 8b 45 08 mov 0x8(%ebp),%eax - 14de0: 8b 80 88 01 00 00 mov 0x188(%eax),%eax - 14de6: ff 70 0c pushl 0xc(%eax) - 14de9: e8 44 fc ff ff call 14a32 <_usb_get_intfdata> - 14dee: 83 c4 04 add $0x4,%esp - 14df1: 89 45 fc mov %eax,0xfffffffc(%ebp) - 14df4: 83 ec 04 sub $0x4,%esp - 14df7: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 14dfa: ff 70 10 pushl 0x10(%eax) - 14dfd: 8b 45 0c mov 0xc(%ebp),%eax - 14e00: 40 inc %eax - 14e01: 50 push %eax - 14e02: ff 75 08 pushl 0x8(%ebp) - 14e05: e8 99 f1 ff ff call 13fa3 <_get_port_status> - 14e0a: 83 c4 10 add $0x10,%esp - 14e0d: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 14e10: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) - 14e14: 79 02 jns 14e18 <_hub_port_status+0x41> - 14e16: eb 26 jmp 14e3e <_hub_port_status+0x67> - 14e18: 8b 55 10 mov 0x10(%ebp),%edx - 14e1b: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 14e1e: 8b 40 10 mov 0x10(%eax),%eax - 14e21: 66 8b 00 mov (%eax),%ax - 14e24: 66 89 02 mov %ax,(%edx) - 14e27: 8b 55 14 mov 0x14(%ebp),%edx - 14e2a: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 14e2d: 8b 40 10 mov 0x10(%eax),%eax - 14e30: 66 8b 40 02 mov 0x2(%eax),%ax - 14e34: 66 89 02 mov %ax,(%edx) - 14e37: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) - 14e3e: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 14e41: c9 leave - 14e42: c3 ret - -00014e43 <_hub_port_wait_reset>: - 14e43: 55 push %ebp - 14e44: 89 e5 mov %esp,%ebp - 14e46: 83 ec 18 sub $0x18,%esp - 14e49: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) - 14e50: 81 7d fc f3 01 00 00 cmpl $0x1f3,0xfffffffc(%ebp) - 14e57: 0f 8f 00 01 00 00 jg 14f5d <_hub_port_wait_reset+0x11a> - 14e5d: 83 ec 0c sub $0xc,%esp - 14e60: ff 75 14 pushl 0x14(%ebp) - 14e63: e8 48 46 00 00 call 194b0 <_wait_ms> - 14e68: 83 c4 10 add $0x10,%esp - 14e6b: 8d 45 f4 lea 0xfffffff4(%ebp),%eax - 14e6e: 50 push %eax - 14e6f: 8d 45 f6 lea 0xfffffff6(%ebp),%eax - 14e72: 50 push %eax - 14e73: ff 75 0c pushl 0xc(%ebp) - 14e76: ff 75 08 pushl 0x8(%ebp) - 14e79: e8 59 ff ff ff call 14dd7 <_hub_port_status> - 14e7e: 83 c4 10 add $0x10,%esp - 14e81: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 14e84: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) - 14e88: 79 0c jns 14e96 <_hub_port_wait_reset+0x53> - 14e8a: c7 45 f0 ff ff ff ff movl $0xffffffff,0xfffffff0(%ebp) - 14e91: e9 ce 00 00 00 jmp 14f64 <_hub_port_wait_reset+0x121> - 14e96: 66 8b 45 f6 mov 0xfffffff6(%ebp),%ax - 14e9a: 25 ff ff 00 00 and $0xffff,%eax - 14e9f: 83 e0 01 and $0x1,%eax - 14ea2: 85 c0 test %eax,%eax - 14ea4: 75 0c jne 14eb2 <_hub_port_wait_reset+0x6f> - 14ea6: c7 45 f0 01 00 00 00 movl $0x1,0xfffffff0(%ebp) - 14ead: e9 b2 00 00 00 jmp 14f64 <_hub_port_wait_reset+0x121> - 14eb2: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 14eb5: 25 ff ff 00 00 and $0xffff,%eax - 14eba: 83 e0 01 and $0x1,%eax - 14ebd: 85 c0 test %eax,%eax - 14ebf: 74 0c je 14ecd <_hub_port_wait_reset+0x8a> - 14ec1: c7 45 f0 ff ff ff ff movl $0xffffffff,0xfffffff0(%ebp) - 14ec8: e9 97 00 00 00 jmp 14f64 <_hub_port_wait_reset+0x121> - 14ecd: 66 8b 45 f6 mov 0xfffffff6(%ebp),%ax - 14ed1: 25 ff ff 00 00 and $0xffff,%eax - 14ed6: c1 e8 04 shr $0x4,%eax - 14ed9: 83 e0 01 and $0x1,%eax - 14edc: 85 c0 test %eax,%eax - 14ede: 75 63 jne 14f43 <_hub_port_wait_reset+0x100> - 14ee0: 66 8b 45 f6 mov 0xfffffff6(%ebp),%ax - 14ee4: 25 ff ff 00 00 and $0xffff,%eax - 14ee9: d1 e8 shr %eax - 14eeb: 83 e0 01 and $0x1,%eax - 14eee: 85 c0 test %eax,%eax - 14ef0: 74 51 je 14f43 <_hub_port_wait_reset+0x100> - 14ef2: 66 8b 45 f6 mov 0xfffffff6(%ebp),%ax - 14ef6: 25 ff ff 00 00 and $0xffff,%eax - 14efb: c1 e8 0a shr $0xa,%eax - 14efe: 83 e0 01 and $0x1,%eax - 14f01: 85 c0 test %eax,%eax - 14f03: 74 0c je 14f11 <_hub_port_wait_reset+0xce> - 14f05: 8b 45 10 mov 0x10(%ebp),%eax - 14f08: c7 40 18 03 00 00 00 movl $0x3,0x18(%eax) - 14f0f: eb 29 jmp 14f3a <_hub_port_wait_reset+0xf7> - 14f11: 66 8b 45 f6 mov 0xfffffff6(%ebp),%ax - 14f15: 25 ff ff 00 00 and $0xffff,%eax - 14f1a: c1 e8 09 shr $0x9,%eax - 14f1d: 83 e0 01 and $0x1,%eax - 14f20: 85 c0 test %eax,%eax - 14f22: 74 0c je 14f30 <_hub_port_wait_reset+0xed> - 14f24: 8b 45 10 mov 0x10(%ebp),%eax - 14f27: c7 40 18 01 00 00 00 movl $0x1,0x18(%eax) - 14f2e: eb 0a jmp 14f3a <_hub_port_wait_reset+0xf7> - 14f30: 8b 45 10 mov 0x10(%ebp),%eax - 14f33: c7 40 18 02 00 00 00 movl $0x2,0x18(%eax) - 14f3a: c7 45 f0 00 00 00 00 movl $0x0,0xfffffff0(%ebp) - 14f41: eb 21 jmp 14f64 <_hub_port_wait_reset+0x121> - 14f43: 83 7d fc 13 cmpl $0x13,0xfffffffc(%ebp) - 14f47: 7e 07 jle 14f50 <_hub_port_wait_reset+0x10d> - 14f49: c7 45 14 c8 00 00 00 movl $0xc8,0x14(%ebp) - 14f50: 8b 55 14 mov 0x14(%ebp),%edx - 14f53: 8d 45 fc lea 0xfffffffc(%ebp),%eax - 14f56: 01 10 add %edx,(%eax) - 14f58: e9 f3 fe ff ff jmp 14e50 <_hub_port_wait_reset+0xd> - 14f5d: c7 45 f0 ff ff ff ff movl $0xffffffff,0xfffffff0(%ebp) - 14f64: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 14f67: c9 leave - 14f68: c3 ret - -00014f69 <_hub_port_reset>: - 14f69: 55 push %ebp - 14f6a: 89 e5 mov %esp,%ebp - 14f6c: 83 ec 18 sub $0x18,%esp - 14f6f: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) - 14f76: 83 7d fc 04 cmpl $0x4,0xfffffffc(%ebp) - 14f7a: 0f 8f 85 00 00 00 jg 15005 <_hub_port_reset+0x9c> - 14f80: 83 ec 04 sub $0x4,%esp - 14f83: 6a 04 push $0x4 - 14f85: 8b 45 0c mov 0xc(%ebp),%eax - 14f88: 40 inc %eax - 14f89: 50 push %eax - 14f8a: ff 75 08 pushl 0x8(%ebp) - 14f8d: e8 8e ef ff ff call 13f20 <_set_port_feature> - 14f92: 83 c4 10 add $0x10,%esp - 14f95: ff 75 14 pushl 0x14(%ebp) - 14f98: ff 75 10 pushl 0x10(%ebp) - 14f9b: ff 75 0c pushl 0xc(%ebp) - 14f9e: ff 75 08 pushl 0x8(%ebp) - 14fa1: e8 9d fe ff ff call 14e43 <_hub_port_wait_reset> - 14fa6: 83 c4 10 add $0x10,%esp - 14fa9: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 14fac: 83 7d f8 ff cmpl $0xffffffff,0xfffffff8(%ebp) - 14fb0: 74 42 je 14ff4 <_hub_port_reset+0x8b> - 14fb2: 83 ec 04 sub $0x4,%esp - 14fb5: 6a 14 push $0x14 - 14fb7: 8b 45 0c mov 0xc(%ebp),%eax - 14fba: 40 inc %eax - 14fbb: 50 push %eax - 14fbc: ff 75 08 pushl 0x8(%ebp) - 14fbf: e8 17 ef ff ff call 13edb <_clear_port_feature> - 14fc4: 83 c4 10 add $0x10,%esp - 14fc7: 8b 45 10 mov 0x10(%ebp),%eax - 14fca: 89 45 f0 mov %eax,0xfffffff0(%ebp) - 14fcd: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) - 14fd1: 74 09 je 14fdc <_hub_port_reset+0x73> - 14fd3: c7 45 ec 00 00 00 00 movl $0x0,0xffffffec(%ebp) - 14fda: eb 07 jmp 14fe3 <_hub_port_reset+0x7a> - 14fdc: c7 45 ec 03 00 00 00 movl $0x3,0xffffffec(%ebp) - 14fe3: 8b 45 ec mov 0xffffffec(%ebp),%eax - 14fe6: 8b 55 f0 mov 0xfffffff0(%ebp),%edx - 14fe9: 89 42 14 mov %eax,0x14(%edx) - 14fec: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 14fef: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 14ff2: eb 18 jmp 1500c <_hub_port_reset+0xa3> - 14ff4: c7 45 14 c8 00 00 00 movl $0xc8,0x14(%ebp) - 14ffb: 8d 45 fc lea 0xfffffffc(%ebp),%eax - 14ffe: ff 00 incl (%eax) - 15000: e9 71 ff ff ff jmp 14f76 <_hub_port_reset+0xd> - 15005: c7 45 f4 ff ff ff ff movl $0xffffffff,0xfffffff4(%ebp) - 1500c: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 1500f: c9 leave - 15010: c3 ret - -00015011 <_hub_port_disable>: - 15011: 55 push %ebp - 15012: 89 e5 mov %esp,%ebp - 15014: 83 ec 08 sub $0x8,%esp - 15017: 83 ec 04 sub $0x4,%esp - 1501a: 6a 01 push $0x1 - 1501c: 8b 45 0c mov 0xc(%ebp),%eax - 1501f: 40 inc %eax - 15020: 50 push %eax - 15021: ff 75 08 pushl 0x8(%ebp) - 15024: e8 b2 ee ff ff call 13edb <_clear_port_feature> - 15029: 83 c4 10 add $0x10,%esp - 1502c: 89 45 fc mov %eax,0xfffffffc(%ebp) - 1502f: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 15032: c9 leave - 15033: c3 ret - -00015034 <_hub_port_debounce>: - 15034: 55 push %ebp - 15035: 89 e5 mov %esp,%ebp - 15037: 83 ec 28 sub $0x28,%esp - 1503a: c7 45 ec 00 00 00 00 movl $0x0,0xffffffec(%ebp) - 15041: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) - 15048: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) - 1504f: 81 7d f8 8f 01 00 00 cmpl $0x18f,0xfffffff8(%ebp) - 15056: 0f 8f a0 00 00 00 jg 150fc <_hub_port_debounce+0xc8> - 1505c: 83 ec 0c sub $0xc,%esp - 1505f: 6a 19 push $0x19 - 15061: e8 4a 44 00 00 call 194b0 <_wait_ms> - 15066: 83 c4 10 add $0x10,%esp - 15069: 8d 45 f2 lea 0xfffffff2(%ebp),%eax - 1506c: 50 push %eax - 1506d: 8d 45 f0 lea 0xfffffff0(%ebp),%eax - 15070: 50 push %eax - 15071: ff 75 0c pushl 0xc(%ebp) - 15074: ff 75 08 pushl 0x8(%ebp) - 15077: e8 5b fd ff ff call 14dd7 <_hub_port_status> - 1507c: 83 c4 10 add $0x10,%esp - 1507f: 89 45 fc mov %eax,0xfffffffc(%ebp) - 15082: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) - 15086: 79 0c jns 15094 <_hub_port_debounce+0x60> - 15088: c7 45 e8 ff ff ff ff movl $0xffffffff,0xffffffe8(%ebp) - 1508f: e9 8d 00 00 00 jmp 15121 <_hub_port_debounce+0xed> - 15094: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 15097: 25 ff ff 00 00 and $0xffff,%eax - 1509c: 83 e0 01 and $0x1,%eax - 1509f: 3b 45 ec cmp 0xffffffec(%ebp),%eax - 150a2: 75 13 jne 150b7 <_hub_port_debounce+0x83> - 150a4: 83 7d ec 00 cmpl $0x0,0xffffffec(%ebp) - 150a8: 74 14 je 150be <_hub_port_debounce+0x8a> - 150aa: 8d 45 f4 lea 0xfffffff4(%ebp),%eax - 150ad: ff 00 incl (%eax) - 150af: 83 7d f4 04 cmpl $0x4,0xfffffff4(%ebp) - 150b3: 75 09 jne 150be <_hub_port_debounce+0x8a> - 150b5: eb 45 jmp 150fc <_hub_port_debounce+0xc8> - 150b7: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) - 150be: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 150c1: 25 ff ff 00 00 and $0xffff,%eax - 150c6: 83 e0 01 and $0x1,%eax - 150c9: 89 45 ec mov %eax,0xffffffec(%ebp) - 150cc: 66 8b 45 f2 mov 0xfffffff2(%ebp),%ax - 150d0: 25 ff ff 00 00 and $0xffff,%eax - 150d5: 83 e0 01 and $0x1,%eax - 150d8: 85 c0 test %eax,%eax - 150da: 74 15 je 150f1 <_hub_port_debounce+0xbd> - 150dc: 83 ec 04 sub $0x4,%esp - 150df: 6a 10 push $0x10 - 150e1: 8b 45 0c mov 0xc(%ebp),%eax - 150e4: 40 inc %eax - 150e5: 50 push %eax - 150e6: ff 75 08 pushl 0x8(%ebp) - 150e9: e8 ed ed ff ff call 13edb <_clear_port_feature> - 150ee: 83 c4 10 add $0x10,%esp - 150f1: 8d 45 f8 lea 0xfffffff8(%ebp),%eax - 150f4: 83 00 19 addl $0x19,(%eax) - 150f7: e9 53 ff ff ff jmp 1504f <_hub_port_debounce+0x1b> - 150fc: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 150ff: 25 ff ff 00 00 and $0xffff,%eax - 15104: 83 e0 01 and $0x1,%eax - 15107: 85 c0 test %eax,%eax - 15109: 74 09 je 15114 <_hub_port_debounce+0xe0> - 1510b: c7 45 e4 00 00 00 00 movl $0x0,0xffffffe4(%ebp) - 15112: eb 07 jmp 1511b <_hub_port_debounce+0xe7> - 15114: c7 45 e4 01 00 00 00 movl $0x1,0xffffffe4(%ebp) - 1511b: 8b 45 e4 mov 0xffffffe4(%ebp),%eax - 1511e: 89 45 e8 mov %eax,0xffffffe8(%ebp) - 15121: 8b 45 e8 mov 0xffffffe8(%ebp),%eax - 15124: c9 leave - 15125: c3 ret - -00015126 <_hub_port_connect_change>: - 15126: 55 push %ebp - 15127: 89 e5 mov %esp,%ebp - 15129: 83 ec 28 sub $0x28,%esp - 1512c: 8b 45 10 mov 0x10(%ebp),%eax - 1512f: 8b 55 14 mov 0x14(%ebp),%edx - 15132: 66 89 45 fe mov %ax,0xfffffffe(%ebp) - 15136: 66 89 55 fc mov %dx,0xfffffffc(%ebp) - 1513a: 8b 45 08 mov 0x8(%ebp),%eax - 1513d: 8b 00 mov (%eax),%eax - 1513f: 8b 80 b8 00 00 00 mov 0xb8(%eax),%eax - 15145: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 15148: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 1514b: 2d c0 00 00 00 sub $0xc0,%eax - 15150: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 15153: c7 45 f0 0a 00 00 00 movl $0xa,0xfffffff0(%ebp) - 1515a: 83 ec 04 sub $0x4,%esp - 1515d: 6a 10 push $0x10 - 1515f: 8b 45 0c mov 0xc(%ebp),%eax - 15162: 40 inc %eax - 15163: 50 push %eax - 15164: ff 75 f8 pushl 0xfffffff8(%ebp) - 15167: e8 6f ed ff ff call 13edb <_clear_port_feature> - 1516c: 83 c4 10 add $0x10,%esp - 1516f: 8b 55 f8 mov 0xfffffff8(%ebp),%edx - 15172: 8b 45 0c mov 0xc(%ebp),%eax - 15175: 83 bc 82 b0 01 00 00 cmpl $0x0,0x1b0(%edx,%eax,4) - 1517c: 00 - 1517d: 74 1a je 15199 <_hub_port_connect_change+0x73> - 1517f: 83 ec 0c sub $0xc,%esp - 15182: 8b 45 0c mov 0xc(%ebp),%eax - 15185: c1 e0 02 shl $0x2,%eax - 15188: 03 45 f8 add 0xfffffff8(%ebp),%eax - 1518b: 05 b0 01 00 00 add $0x1b0,%eax - 15190: 50 push %eax - 15191: e8 7b 14 00 00 call 16611 <_usb_disconnect> - 15196: 83 c4 10 add $0x10,%esp - 15199: 66 8b 45 fe mov 0xfffffffe(%ebp),%ax - 1519d: 25 ff ff 00 00 and $0xffff,%eax - 151a2: 83 e0 01 and $0x1,%eax - 151a5: 85 c0 test %eax,%eax - 151a7: 75 2c jne 151d5 <_hub_port_connect_change+0xaf> - 151a9: 66 8b 45 fe mov 0xfffffffe(%ebp),%ax - 151ad: 25 ff ff 00 00 and $0xffff,%eax - 151b2: d1 e8 shr %eax - 151b4: 83 e0 01 and $0x1,%eax - 151b7: 85 c0 test %eax,%eax - 151b9: 0f 84 08 02 00 00 je 153c7 <_hub_port_connect_change+0x2a1> - 151bf: 83 ec 08 sub $0x8,%esp - 151c2: ff 75 0c pushl 0xc(%ebp) - 151c5: ff 75 f8 pushl 0xfffffff8(%ebp) - 151c8: e8 44 fe ff ff call 15011 <_hub_port_disable> - 151cd: 83 c4 10 add $0x10,%esp - 151d0: e9 f2 01 00 00 jmp 153c7 <_hub_port_connect_change+0x2a1> - 151d5: 83 ec 08 sub $0x8,%esp - 151d8: ff 75 0c pushl 0xc(%ebp) - 151db: ff 75 f8 pushl 0xfffffff8(%ebp) - 151de: e8 51 fe ff ff call 15034 <_hub_port_debounce> - 151e3: 83 c4 10 add $0x10,%esp - 151e6: 85 c0 test %eax,%eax - 151e8: 74 16 je 15200 <_hub_port_connect_change+0xda> - 151ea: 83 ec 08 sub $0x8,%esp - 151ed: ff 75 0c pushl 0xc(%ebp) - 151f0: ff 75 f8 pushl 0xfffffff8(%ebp) - 151f3: e8 19 fe ff ff call 15011 <_hub_port_disable> - 151f8: 83 c4 10 add $0x10,%esp - 151fb: e9 c7 01 00 00 jmp 153c7 <_hub_port_connect_change+0x2a1> - 15200: 66 8b 45 fe mov 0xfffffffe(%ebp),%ax - 15204: 25 ff ff 00 00 and $0xffff,%eax - 15209: c1 e8 09 shr $0x9,%eax - 1520c: 83 e0 01 and $0x1,%eax - 1520f: 85 c0 test %eax,%eax - 15211: 74 07 je 1521a <_hub_port_connect_change+0xf4> - 15213: c7 45 f0 c8 00 00 00 movl $0xc8,0xfffffff0(%ebp) - 1521a: c7 45 ec 00 00 00 00 movl $0x0,0xffffffec(%ebp) - 15221: 83 7d ec 01 cmpl $0x1,0xffffffec(%ebp) - 15225: 0f 8f 7a 01 00 00 jg 153a5 <_hub_port_connect_change+0x27f> - 1522b: 83 ec 08 sub $0x8,%esp - 1522e: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 15231: ff b0 bc 00 00 00 pushl 0xbc(%eax) - 15237: ff 75 f8 pushl 0xfffffff8(%ebp) - 1523a: e8 3a 10 00 00 call 16279 <_usb_alloc_dev@8> - 1523f: 83 c4 08 add $0x8,%esp - 15242: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 15245: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) - 15249: 75 05 jne 15250 <_hub_port_connect_change+0x12a> - 1524b: e9 55 01 00 00 jmp 153a5 <_hub_port_connect_change+0x27f> - 15250: 8b 4d f8 mov 0xfffffff8(%ebp),%ecx - 15253: 8b 55 0c mov 0xc(%ebp),%edx - 15256: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 15259: 89 84 91 b0 01 00 00 mov %eax,0x1b0(%ecx,%edx,4) - 15260: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 15263: c7 40 14 02 00 00 00 movl $0x2,0x14(%eax) - 1526a: ff 75 f0 pushl 0xfffffff0(%ebp) - 1526d: ff 75 f4 pushl 0xfffffff4(%ebp) - 15270: ff 75 0c pushl 0xc(%ebp) - 15273: ff 75 f8 pushl 0xfffffff8(%ebp) - 15276: e8 ee fc ff ff call 14f69 <_hub_port_reset> - 1527b: 83 c4 10 add $0x10,%esp - 1527e: 85 c0 test %eax,%eax - 15280: 74 13 je 15295 <_hub_port_connect_change+0x16f> - 15282: 83 ec 0c sub $0xc,%esp - 15285: ff 75 f4 pushl 0xfffffff4(%ebp) - 15288: e8 2e 11 00 00 call 163bb <_usb_put_dev@4> - 1528d: 83 c4 0c add $0xc,%esp - 15290: e9 10 01 00 00 jmp 153a5 <_hub_port_connect_change+0x27f> - 15295: 83 ec 0c sub $0xc,%esp - 15298: ff 75 f4 pushl 0xfffffff4(%ebp) - 1529b: e8 16 15 00 00 call 167b6 <_usb_connect@4> - 152a0: 83 c4 0c add $0xc,%esp - 152a3: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 152a6: 83 78 1c 00 cmpl $0x0,0x1c(%eax) - 152aa: 74 1a je 152c6 <_hub_port_connect_change+0x1a0> - 152ac: 8b 55 f4 mov 0xfffffff4(%ebp),%edx - 152af: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 152b2: 8b 40 1c mov 0x1c(%eax),%eax - 152b5: 89 42 1c mov %eax,0x1c(%edx) - 152b8: 8b 55 f4 mov 0xfffffff4(%ebp),%edx - 152bb: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 152be: 8b 40 20 mov 0x20(%eax),%eax - 152c1: 89 42 20 mov %eax,0x20(%edx) - 152c4: eb 28 jmp 152ee <_hub_port_connect_change+0x1c8> - 152c6: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 152c9: 83 78 18 03 cmpl $0x3,0x18(%eax) - 152cd: 74 1f je 152ee <_hub_port_connect_change+0x1c8> - 152cf: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 152d2: 83 78 18 03 cmpl $0x3,0x18(%eax) - 152d6: 75 16 jne 152ee <_hub_port_connect_change+0x1c8> - 152d8: 8b 55 f4 mov 0xfffffff4(%ebp),%edx - 152db: 8b 45 08 mov 0x8(%ebp),%eax - 152de: 83 c0 34 add $0x34,%eax - 152e1: 89 42 1c mov %eax,0x1c(%edx) - 152e4: 8b 55 f4 mov 0xfffffff4(%ebp),%edx - 152e7: 8b 45 0c mov 0xc(%ebp),%eax - 152ea: 40 inc %eax - 152eb: 89 42 20 mov %eax,0x20(%edx) - 152ee: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 152f1: 8b 80 b8 00 00 00 mov 0xb8(%eax),%eax - 152f7: 89 45 e8 mov %eax,0xffffffe8(%ebp) - 152fa: 8b 45 e8 mov 0xffffffe8(%ebp),%eax - 152fd: 80 78 04 30 cmpb $0x30,0x4(%eax) - 15301: 74 2a je 1532d <_hub_port_connect_change+0x207> - 15303: 83 ec 0c sub $0xc,%esp - 15306: 8b 45 0c mov 0xc(%ebp),%eax - 15309: 40 inc %eax - 1530a: 50 push %eax - 1530b: 8b 45 e8 mov 0xffffffe8(%ebp),%eax - 1530e: 83 c0 04 add $0x4,%eax - 15311: 50 push %eax - 15312: 68 3b b2 01 00 push $0x1b23b - 15317: 6a 10 push $0x10 - 15319: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 1531c: 83 c0 04 add $0x4,%eax - 1531f: 50 push %eax - 15320: e8 9b 47 00 00 call 19ac0 <__snprintf> - 15325: 83 c4 20 add $0x20,%esp - 15328: 89 45 e4 mov %eax,0xffffffe4(%ebp) - 1532b: eb 1e jmp 1534b <_hub_port_connect_change+0x225> - 1532d: 8b 45 0c mov 0xc(%ebp),%eax - 15330: 40 inc %eax - 15331: 50 push %eax - 15332: 68 41 b2 01 00 push $0x1b241 - 15337: 6a 10 push $0x10 - 15339: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 1533c: 83 c0 04 add $0x4,%eax - 1533f: 50 push %eax - 15340: e8 7b 47 00 00 call 19ac0 <__snprintf> - 15345: 83 c4 10 add $0x10,%esp - 15348: 89 45 e4 mov %eax,0xffffffe4(%ebp) - 1534b: 8b 55 f4 mov 0xfffffff4(%ebp),%edx - 1534e: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 15351: 8b 80 b8 00 00 00 mov 0xb8(%eax),%eax - 15357: 8b 80 60 01 00 00 mov 0x160(%eax),%eax - 1535d: 8b 80 a0 00 00 00 mov 0xa0(%eax),%eax - 15363: 89 82 60 01 00 00 mov %eax,0x160(%edx) - 15369: 83 ec 08 sub $0x8,%esp - 1536c: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 1536f: 05 c0 00 00 00 add $0xc0,%eax - 15374: 50 push %eax - 15375: ff 75 f4 pushl 0xfffffff4(%ebp) - 15378: e8 16 18 00 00 call 16b93 <_usb_new_device> - 1537d: 83 c4 10 add $0x10,%esp - 15380: 85 c0 test %eax,%eax - 15382: 75 02 jne 15386 <_hub_port_connect_change+0x260> - 15384: eb 41 jmp 153c7 <_hub_port_connect_change+0x2a1> - 15386: 83 ec 0c sub $0xc,%esp - 15389: ff 75 f4 pushl 0xfffffff4(%ebp) - 1538c: e8 2a 10 00 00 call 163bb <_usb_put_dev@4> - 15391: 83 c4 0c add $0xc,%esp - 15394: c7 45 f0 c8 00 00 00 movl $0xc8,0xfffffff0(%ebp) - 1539b: 8d 45 ec lea 0xffffffec(%ebp),%eax - 1539e: ff 00 incl (%eax) - 153a0: e9 7c fe ff ff jmp 15221 <_hub_port_connect_change+0xfb> - 153a5: 8b 55 f8 mov 0xfffffff8(%ebp),%edx - 153a8: 8b 45 0c mov 0xc(%ebp),%eax - 153ab: c7 84 82 b0 01 00 00 movl $0x0,0x1b0(%edx,%eax,4) - 153b2: 00 00 00 00 - 153b6: 83 ec 08 sub $0x8,%esp - 153b9: ff 75 0c pushl 0xc(%ebp) - 153bc: ff 75 f8 pushl 0xfffffff8(%ebp) - 153bf: e8 4d fc ff ff call 15011 <_hub_port_disable> - 153c4: 83 c4 10 add $0x10,%esp - 153c7: c9 leave - 153c8: c3 ret - -000153c9 <_hub_events>: - 153c9: 55 push %ebp - 153ca: 89 e5 mov %esp,%ebp - 153cc: 83 ec 28 sub $0x28,%esp - 153cf: c7 45 dc 00 00 00 00 movl $0x0,0xffffffdc(%ebp) - 153d6: 83 7d dc 04 cmpl $0x4,0xffffffdc(%ebp) - 153da: 0f 8f 9c 02 00 00 jg 1567c <_hub_events+0x2b3> - 153e0: 8d 45 dc lea 0xffffffdc(%ebp),%eax - 153e3: ff 00 incl (%eax) - 153e5: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) - 153ec: 68 40 a0 01 00 push $0x1a040 - 153f1: e8 08 ed ff ff call 140fe <_list_empty> - 153f6: 83 c4 04 add $0x4,%esp - 153f9: 85 c0 test %eax,%eax - 153fb: 74 05 je 15402 <_hub_events+0x39> - 153fd: e9 7a 02 00 00 jmp 1567c <_hub_events+0x2b3> - 15402: a1 40 a0 01 00 mov 0x1a040,%eax - 15407: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 1540a: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 1540d: 83 e8 24 sub $0x24,%eax - 15410: 89 45 f0 mov %eax,0xfffffff0(%ebp) - 15413: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 15416: 8b 00 mov (%eax),%eax - 15418: 8b 80 b8 00 00 00 mov 0xb8(%eax),%eax - 1541e: 89 45 d8 mov %eax,0xffffffd8(%ebp) - 15421: 8b 45 d8 mov 0xffffffd8(%ebp),%eax - 15424: 2d c0 00 00 00 sub $0xc0,%eax - 15429: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 1542c: 83 ec 0c sub $0xc,%esp - 1542f: ff 75 f8 pushl 0xfffffff8(%ebp) - 15432: e8 47 02 00 00 call 1567e <_list_del_init> - 15437: 83 c4 10 add $0x10,%esp - 1543a: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 1543d: 83 78 14 00 cmpl $0x0,0x14(%eax) - 15441: 74 39 je 1547c <_hub_events+0xb3> - 15443: 83 ec 0c sub $0xc,%esp - 15446: ff 75 f0 pushl 0xfffffff0(%ebp) - 15449: e8 35 f8 ff ff call 14c83 <_hub_reset> - 1544e: 83 c4 10 add $0x10,%esp - 15451: 85 c0 test %eax,%eax - 15453: 74 13 je 15468 <_hub_events+0x9f> - 15455: 83 ec 0c sub $0xc,%esp - 15458: ff 75 f4 pushl 0xfffffff4(%ebp) - 1545b: e8 13 f9 ff ff call 14d73 <_hub_start_disconnect> - 15460: 83 c4 10 add $0x10,%esp - 15463: e9 6e ff ff ff jmp 153d6 <_hub_events+0xd> - 15468: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 1546b: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) - 15472: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 15475: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax) - 1547c: c7 45 e4 00 00 00 00 movl $0x0,0xffffffe4(%ebp) - 15483: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 15486: 8b 40 2c mov 0x2c(%eax),%eax - 15489: 8a 40 02 mov 0x2(%eax),%al - 1548c: 25 ff 00 00 00 and $0xff,%eax - 15491: 3b 45 e4 cmp 0xffffffe4(%ebp),%eax - 15494: 0f 8e 5c 01 00 00 jle 155f6 <_hub_events+0x22d> - 1549a: 8d 45 e8 lea 0xffffffe8(%ebp),%eax - 1549d: 50 push %eax - 1549e: 8d 45 ea lea 0xffffffea(%ebp),%eax - 154a1: 50 push %eax - 154a2: ff 75 e4 pushl 0xffffffe4(%ebp) - 154a5: ff 75 f4 pushl 0xfffffff4(%ebp) - 154a8: e8 2a f9 ff ff call 14dd7 <_hub_port_status> - 154ad: 83 c4 10 add $0x10,%esp - 154b0: 89 45 e0 mov %eax,0xffffffe0(%ebp) - 154b3: 83 7d e0 00 cmpl $0x0,0xffffffe0(%ebp) - 154b7: 79 05 jns 154be <_hub_events+0xf5> - 154b9: e9 2e 01 00 00 jmp 155ec <_hub_events+0x223> - 154be: 8b 45 e8 mov 0xffffffe8(%ebp),%eax - 154c1: 25 ff ff 00 00 and $0xffff,%eax - 154c6: 83 e0 01 and $0x1,%eax - 154c9: 85 c0 test %eax,%eax - 154cb: 74 23 je 154f0 <_hub_events+0x127> - 154cd: 8b 45 e8 mov 0xffffffe8(%ebp),%eax - 154d0: 25 ff ff 00 00 and $0xffff,%eax - 154d5: 50 push %eax - 154d6: 66 8b 45 ea mov 0xffffffea(%ebp),%ax - 154da: 25 ff ff 00 00 and $0xffff,%eax - 154df: 50 push %eax - 154e0: ff 75 e4 pushl 0xffffffe4(%ebp) - 154e3: ff 75 f0 pushl 0xfffffff0(%ebp) - 154e6: e8 3b fc ff ff call 15126 <_hub_port_connect_change> - 154eb: 83 c4 10 add $0x10,%esp - 154ee: eb 79 jmp 15569 <_hub_events+0x1a0> - 154f0: 8b 45 e8 mov 0xffffffe8(%ebp),%eax - 154f3: 25 ff ff 00 00 and $0xffff,%eax - 154f8: d1 e8 shr %eax - 154fa: 83 e0 01 and $0x1,%eax - 154fd: 85 c0 test %eax,%eax - 154ff: 74 68 je 15569 <_hub_events+0x1a0> - 15501: 83 ec 04 sub $0x4,%esp - 15504: 6a 11 push $0x11 - 15506: 8b 45 e4 mov 0xffffffe4(%ebp),%eax - 15509: 40 inc %eax - 1550a: 50 push %eax - 1550b: ff 75 f4 pushl 0xfffffff4(%ebp) - 1550e: e8 c8 e9 ff ff call 13edb <_clear_port_feature> - 15513: 83 c4 10 add $0x10,%esp - 15516: 66 8b 45 ea mov 0xffffffea(%ebp),%ax - 1551a: 25 ff ff 00 00 and $0xffff,%eax - 1551f: d1 e8 shr %eax - 15521: 83 e0 01 and $0x1,%eax - 15524: 85 c0 test %eax,%eax - 15526: 75 41 jne 15569 <_hub_events+0x1a0> - 15528: 66 8b 45 ea mov 0xffffffea(%ebp),%ax - 1552c: 25 ff ff 00 00 and $0xffff,%eax - 15531: 83 e0 01 and $0x1,%eax - 15534: 85 c0 test %eax,%eax - 15536: 74 31 je 15569 <_hub_events+0x1a0> - 15538: 8b 55 f4 mov 0xfffffff4(%ebp),%edx - 1553b: 8b 45 e4 mov 0xffffffe4(%ebp),%eax - 1553e: 83 bc 82 b0 01 00 00 cmpl $0x0,0x1b0(%edx,%eax,4) - 15545: 00 - 15546: 74 21 je 15569 <_hub_events+0x1a0> - 15548: 8b 45 e8 mov 0xffffffe8(%ebp),%eax - 1554b: 25 ff ff 00 00 and $0xffff,%eax - 15550: 50 push %eax - 15551: 66 8b 45 ea mov 0xffffffea(%ebp),%ax - 15555: 25 ff ff 00 00 and $0xffff,%eax - 1555a: 50 push %eax - 1555b: ff 75 e4 pushl 0xffffffe4(%ebp) - 1555e: ff 75 f0 pushl 0xfffffff0(%ebp) - 15561: e8 c0 fb ff ff call 15126 <_hub_port_connect_change> - 15566: 83 c4 10 add $0x10,%esp - 15569: 8b 45 e8 mov 0xffffffe8(%ebp),%eax - 1556c: 25 ff ff 00 00 and $0xffff,%eax - 15571: c1 e8 02 shr $0x2,%eax - 15574: 83 e0 01 and $0x1,%eax - 15577: 85 c0 test %eax,%eax - 15579: 74 15 je 15590 <_hub_events+0x1c7> - 1557b: 83 ec 04 sub $0x4,%esp - 1557e: 6a 12 push $0x12 - 15580: 8b 45 e4 mov 0xffffffe4(%ebp),%eax - 15583: 40 inc %eax - 15584: 50 push %eax - 15585: ff 75 f4 pushl 0xfffffff4(%ebp) - 15588: e8 4e e9 ff ff call 13edb <_clear_port_feature> - 1558d: 83 c4 10 add $0x10,%esp - 15590: 8b 45 e8 mov 0xffffffe8(%ebp),%eax - 15593: 25 ff ff 00 00 and $0xffff,%eax - 15598: c1 e8 03 shr $0x3,%eax - 1559b: 83 e0 01 and $0x1,%eax - 1559e: 85 c0 test %eax,%eax - 155a0: 74 23 je 155c5 <_hub_events+0x1fc> - 155a2: 83 ec 04 sub $0x4,%esp - 155a5: 6a 13 push $0x13 - 155a7: 8b 45 e4 mov 0xffffffe4(%ebp),%eax - 155aa: 40 inc %eax - 155ab: 50 push %eax - 155ac: ff 75 f4 pushl 0xfffffff4(%ebp) - 155af: e8 27 e9 ff ff call 13edb <_clear_port_feature> - 155b4: 83 c4 10 add $0x10,%esp - 155b7: 83 ec 0c sub $0xc,%esp - 155ba: ff 75 f0 pushl 0xfffffff0(%ebp) - 155bd: e8 b1 ed ff ff call 14373 <_hub_power_on> - 155c2: 83 c4 10 add $0x10,%esp - 155c5: 8b 45 e8 mov 0xffffffe8(%ebp),%eax - 155c8: 25 ff ff 00 00 and $0xffff,%eax - 155cd: c1 e8 04 shr $0x4,%eax - 155d0: 83 e0 01 and $0x1,%eax - 155d3: 85 c0 test %eax,%eax - 155d5: 74 15 je 155ec <_hub_events+0x223> - 155d7: 83 ec 04 sub $0x4,%esp - 155da: 6a 14 push $0x14 - 155dc: 8b 45 e4 mov 0xffffffe4(%ebp),%eax - 155df: 40 inc %eax - 155e0: 50 push %eax - 155e1: ff 75 f4 pushl 0xfffffff4(%ebp) - 155e4: e8 f2 e8 ff ff call 13edb <_clear_port_feature> - 155e9: 83 c4 10 add $0x10,%esp - 155ec: 8d 45 e4 lea 0xffffffe4(%ebp),%eax - 155ef: ff 00 incl (%eax) - 155f1: e9 8d fe ff ff jmp 15483 <_hub_events+0xba> - 155f6: 83 ec 04 sub $0x4,%esp - 155f9: 8d 45 ec lea 0xffffffec(%ebp),%eax - 155fc: 50 push %eax - 155fd: 8d 45 ee lea 0xffffffee(%ebp),%eax - 15600: 50 push %eax - 15601: ff 75 f0 pushl 0xfffffff0(%ebp) - 15604: e8 dd ed ff ff call 143e6 <_hub_hub_status> - 15609: 83 c4 10 add $0x10,%esp - 1560c: 85 c0 test %eax,%eax - 1560e: 79 05 jns 15615 <_hub_events+0x24c> - 15610: e9 c1 fd ff ff jmp 153d6 <_hub_events+0xd> - 15615: 8b 45 ec mov 0xffffffec(%ebp),%eax - 15618: 25 ff ff 00 00 and $0xffff,%eax - 1561d: 83 e0 01 and $0x1,%eax - 15620: 85 c0 test %eax,%eax - 15622: 74 10 je 15634 <_hub_events+0x26b> - 15624: 83 ec 08 sub $0x8,%esp - 15627: 6a 00 push $0x0 - 15629: ff 75 f4 pushl 0xfffffff4(%ebp) - 1562c: e8 6c e8 ff ff call 13e9d <_clear_hub_feature> - 15631: 83 c4 10 add $0x10,%esp - 15634: 8b 45 ec mov 0xffffffec(%ebp),%eax - 15637: 25 ff ff 00 00 and $0xffff,%eax - 1563c: d1 e8 shr %eax - 1563e: 83 e0 01 and $0x1,%eax - 15641: 85 c0 test %eax,%eax - 15643: 0f 84 8d fd ff ff je 153d6 <_hub_events+0xd> - 15649: 83 ec 0c sub $0xc,%esp - 1564c: 68 f4 01 00 00 push $0x1f4 - 15651: e8 5a 3e 00 00 call 194b0 <_wait_ms> - 15656: 83 c4 10 add $0x10,%esp - 15659: 83 ec 08 sub $0x8,%esp - 1565c: 6a 01 push $0x1 - 1565e: ff 75 f4 pushl 0xfffffff4(%ebp) - 15661: e8 37 e8 ff ff call 13e9d <_clear_hub_feature> - 15666: 83 c4 10 add $0x10,%esp - 15669: 83 ec 0c sub $0xc,%esp - 1566c: ff 75 f0 pushl 0xfffffff0(%ebp) - 1566f: e8 ff ec ff ff call 14373 <_hub_power_on> - 15674: 83 c4 10 add $0x10,%esp - 15677: e9 5a fd ff ff jmp 153d6 <_hub_events+0xd> - 1567c: c9 leave - 1567d: c3 ret - -0001567e <_list_del_init>: - 1567e: 55 push %ebp - 1567f: 89 e5 mov %esp,%ebp - 15681: 8b 45 08 mov 0x8(%ebp),%eax - 15684: ff 30 pushl (%eax) - 15686: 8b 45 08 mov 0x8(%ebp),%eax - 15689: ff 70 04 pushl 0x4(%eax) - 1568c: e8 ac eb ff ff call 1423d <___list_del> - 15691: 83 c4 08 add $0x8,%esp - 15694: 8b 55 08 mov 0x8(%ebp),%edx - 15697: 8b 45 08 mov 0x8(%ebp),%eax - 1569a: 89 02 mov %eax,(%edx) - 1569c: 8b 55 08 mov 0x8(%ebp),%edx - 1569f: 8b 45 08 mov 0x8(%ebp),%eax - 156a2: 89 42 04 mov %eax,0x4(%edx) - 156a5: c9 leave - 156a6: c3 ret - -000156a7 <_hub_thread>: - 156a7: 55 push %ebp - 156a8: 89 e5 mov %esp,%ebp - 156aa: 83 ec 08 sub $0x8,%esp - 156ad: e8 17 fd ff ff call 153c9 <_hub_events> - 156b2: b8 00 00 00 00 mov $0x0,%eax - 156b7: c9 leave - 156b8: c3 ret - -000156b9 <_usb_hub_init>: - 156b9: 55 push %ebp - 156ba: 89 e5 mov %esp,%ebp - 156bc: 83 ec 08 sub $0x8,%esp - 156bf: 83 ec 0c sub $0xc,%esp - 156c2: 68 a0 a0 01 00 push $0x1a0a0 - 156c7: e8 26 05 00 00 call 15bf2 <_usb_register> - 156cc: 83 c4 10 add $0x10,%esp - 156cf: 85 c0 test %eax,%eax - 156d1: 79 09 jns 156dc <_usb_hub_init+0x23> - 156d3: c7 45 f8 ff ff ff ff movl $0xffffffff,0xfffffff8(%ebp) - 156da: eb 45 jmp 15721 <_usb_hub_init+0x68> - 156dc: 83 ec 04 sub $0x4,%esp - 156df: 6a 00 push $0x0 - 156e1: 6a 00 push $0x0 - 156e3: 68 a7 56 01 00 push $0x156a7 - 156e8: e8 03 40 00 00 call 196f0 <_my_kernel_thread> - 156ed: 83 c4 10 add $0x10,%esp - 156f0: 89 45 fc mov %eax,0xfffffffc(%ebp) - 156f3: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) - 156f7: 78 11 js 1570a <_usb_hub_init+0x51> - 156f9: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 156fc: a3 30 c0 01 00 mov %eax,0x1c030 - 15701: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) - 15708: eb 17 jmp 15721 <_usb_hub_init+0x68> - 1570a: 83 ec 0c sub $0xc,%esp - 1570d: 68 a0 a0 01 00 push $0x1a0a0 - 15712: e8 54 05 00 00 call 15c6b <_usb_deregister> - 15717: 83 c4 10 add $0x10,%esp - 1571a: c7 45 f8 ff ff ff ff movl $0xffffffff,0xfffffff8(%ebp) - 15721: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 15724: c9 leave - 15725: c3 ret - -00015726 <_usb_hub_cleanup>: - 15726: 55 push %ebp - 15727: 89 e5 mov %esp,%ebp - 15729: 83 ec 08 sub $0x8,%esp - 1572c: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) - 15733: 83 ec 0c sub $0xc,%esp - 15736: 68 60 c0 01 00 push $0x1c060 - 1573b: e8 98 41 00 00 call 198d8 <_my_wait_for_completion> - 15740: 83 c4 10 add $0x10,%esp - 15743: 83 ec 0c sub $0xc,%esp - 15746: 68 a0 a0 01 00 push $0x1a0a0 - 1574b: e8 1b 05 00 00 call 15c6b <_usb_deregister> - 15750: 83 c4 10 add $0x10,%esp - 15753: c9 leave - 15754: c3 ret - -00015755 <_usb_physical_reset_device>: - 15755: 55 push %ebp - 15756: 89 e5 mov %esp,%ebp - 15758: 53 push %ebx - 15759: 83 ec 24 sub $0x24,%esp - 1575c: 8b 45 08 mov 0x8(%ebp),%eax - 1575f: 8b 80 b8 00 00 00 mov 0xb8(%eax),%eax - 15765: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 15768: c7 45 e8 ff ff ff ff movl $0xffffffff,0xffffffe8(%ebp) - 1576f: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) - 15773: 75 0c jne 15781 <_usb_physical_reset_device+0x2c> - 15775: c7 45 dc ea ff ff ff movl $0xffffffea,0xffffffdc(%ebp) - 1577c: e9 29 03 00 00 jmp 15aaa <_usb_physical_reset_device+0x355> - 15781: c7 45 f0 00 00 00 00 movl $0x0,0xfffffff0(%ebp) - 15788: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 1578b: 8b 80 ac 01 00 00 mov 0x1ac(%eax),%eax - 15791: 3b 45 f0 cmp 0xfffffff0(%ebp),%eax - 15794: 7e 21 jle 157b7 <_usb_physical_reset_device+0x62> - 15796: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 15799: 8b 55 f0 mov 0xfffffff0(%ebp),%edx - 1579c: 8b 84 90 b0 01 00 00 mov 0x1b0(%eax,%edx,4),%eax - 157a3: 3b 45 08 cmp 0x8(%ebp),%eax - 157a6: 75 08 jne 157b0 <_usb_physical_reset_device+0x5b> - 157a8: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 157ab: 89 45 e8 mov %eax,0xffffffe8(%ebp) - 157ae: eb 07 jmp 157b7 <_usb_physical_reset_device+0x62> - 157b0: 8d 45 f0 lea 0xfffffff0(%ebp),%eax - 157b3: ff 00 incl (%eax) - 157b5: eb d1 jmp 15788 <_usb_physical_reset_device+0x33> - 157b7: 83 7d e8 00 cmpl $0x0,0xffffffe8(%ebp) - 157bb: 79 0c jns 157c9 <_usb_physical_reset_device+0x74> - 157bd: c7 45 dc fe ff ff ff movl $0xfffffffe,0xffffffdc(%ebp) - 157c4: e9 e1 02 00 00 jmp 15aaa <_usb_physical_reset_device+0x355> - 157c9: 83 ec 08 sub $0x8,%esp - 157cc: 6a 12 push $0x12 - 157ce: 6a 01 push $0x1 - 157d0: e8 5b 42 00 00 call 19a30 <_ExAllocatePool@8> - 157d5: 83 c4 08 add $0x8,%esp - 157d8: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 157db: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) - 157df: 75 0c jne 157ed <_usb_physical_reset_device+0x98> - 157e1: c7 45 dc f4 ff ff ff movl $0xfffffff4,0xffffffdc(%ebp) - 157e8: e9 bd 02 00 00 jmp 15aaa <_usb_physical_reset_device+0x355> - 157ed: 6a 0a push $0xa - 157ef: ff 75 08 pushl 0x8(%ebp) - 157f2: ff 75 e8 pushl 0xffffffe8(%ebp) - 157f5: ff 75 f8 pushl 0xfffffff8(%ebp) - 157f8: e8 6c f7 ff ff call 14f69 <_hub_port_reset> - 157fd: 83 c4 10 add $0x10,%esp - 15800: 85 c0 test %eax,%eax - 15802: 74 2b je 1582f <_usb_physical_reset_device+0xda> - 15804: 83 ec 08 sub $0x8,%esp - 15807: ff 75 e8 pushl 0xffffffe8(%ebp) - 1580a: ff 75 f8 pushl 0xfffffff8(%ebp) - 1580d: e8 ff f7 ff ff call 15011 <_hub_port_disable> - 15812: 83 c4 10 add $0x10,%esp - 15815: 83 ec 0c sub $0xc,%esp - 15818: ff 75 f4 pushl 0xfffffff4(%ebp) - 1581b: e8 20 42 00 00 call 19a40 <_ExFreePool@4> - 15820: 83 c4 0c add $0xc,%esp - 15823: c7 45 dc ed ff ff ff movl $0xffffffed,0xffffffdc(%ebp) - 1582a: e9 7b 02 00 00 jmp 15aaa <_usb_physical_reset_device+0x355> - 1582f: 83 ec 0c sub $0xc,%esp - 15832: ff 75 08 pushl 0x8(%ebp) - 15835: e8 53 11 00 00 call 1698d <_usb_set_address> - 1583a: 83 c4 10 add $0x10,%esp - 1583d: 89 45 ec mov %eax,0xffffffec(%ebp) - 15840: 83 7d ec 00 cmpl $0x0,0xffffffec(%ebp) - 15844: 79 2a jns 15870 <_usb_physical_reset_device+0x11b> - 15846: 83 ec 08 sub $0x8,%esp - 15849: ff 75 e8 pushl 0xffffffe8(%ebp) - 1584c: ff 75 f8 pushl 0xfffffff8(%ebp) - 1584f: e8 bd f7 ff ff call 15011 <_hub_port_disable> - 15854: 83 c4 10 add $0x10,%esp - 15857: 83 ec 0c sub $0xc,%esp - 1585a: ff 75 f4 pushl 0xfffffff4(%ebp) - 1585d: e8 de 41 00 00 call 19a40 <_ExFreePool@4> - 15862: 83 c4 0c add $0xc,%esp - 15865: 8b 45 ec mov 0xffffffec(%ebp),%eax - 15868: 89 45 dc mov %eax,0xffffffdc(%ebp) - 1586b: e9 3a 02 00 00 jmp 15aaa <_usb_physical_reset_device+0x355> - 15870: 83 ec 0c sub $0xc,%esp - 15873: 6a 0a push $0xa - 15875: e8 36 3c 00 00 call 194b0 <_wait_ms> - 1587a: 83 c4 10 add $0x10,%esp - 1587d: 83 ec 0c sub $0xc,%esp - 15880: 6a 12 push $0x12 - 15882: ff 75 f4 pushl 0xfffffff4(%ebp) - 15885: 6a 00 push $0x0 - 15887: 6a 01 push $0x1 - 15889: ff 75 08 pushl 0x8(%ebp) - 1588c: e8 cb ba ff ff call 1135c <_usb_get_descriptor> - 15891: 83 c4 20 add $0x20,%esp - 15894: 89 45 ec mov %eax,0xffffffec(%ebp) - 15897: 83 7d ec 00 cmpl $0x0,0xffffffec(%ebp) - 1589b: 79 19 jns 158b6 <_usb_physical_reset_device+0x161> - 1589d: 83 ec 0c sub $0xc,%esp - 158a0: ff 75 f4 pushl 0xfffffff4(%ebp) - 158a3: e8 98 41 00 00 call 19a40 <_ExFreePool@4> - 158a8: 83 c4 0c add $0xc,%esp - 158ab: 8b 45 ec mov 0xffffffec(%ebp),%eax - 158ae: 89 45 dc mov %eax,0xffffffdc(%ebp) - 158b1: e9 f4 01 00 00 jmp 15aaa <_usb_physical_reset_device+0x355> - 158b6: 83 ec 04 sub $0x4,%esp - 158b9: 6a 12 push $0x12 - 158bb: ff 75 f4 pushl 0xfffffff4(%ebp) - 158be: 8b 45 08 mov 0x8(%ebp),%eax - 158c1: 05 70 01 00 00 add $0x170,%eax - 158c6: 50 push %eax - 158c7: e8 e4 41 00 00 call 19ab0 <_RtlCompareMemory@12> - 158cc: 83 c4 04 add $0x4,%esp - 158cf: 85 c0 test %eax,%eax - 158d1: 0f 84 e8 00 00 00 je 159bf <_usb_physical_reset_device+0x26a> - 158d7: 83 ec 0c sub $0xc,%esp - 158da: ff 75 f4 pushl 0xfffffff4(%ebp) - 158dd: e8 5e 41 00 00 call 19a40 <_ExFreePool@4> - 158e2: 83 c4 0c add $0xc,%esp - 158e5: 83 ec 0c sub $0xc,%esp - 158e8: ff 75 08 pushl 0x8(%ebp) - 158eb: e8 05 23 00 00 call 17bf5 <_usb_destroy_configuration> - 158f0: 83 c4 10 add $0x10,%esp - 158f3: 83 ec 0c sub $0xc,%esp - 158f6: ff 75 08 pushl 0x8(%ebp) - 158f9: e8 83 bb ff ff call 11481 <_usb_get_device_descriptor> - 158fe: 83 c4 10 add $0x10,%esp - 15901: 89 45 ec mov %eax,0xffffffec(%ebp) - 15904: 83 7d ec 11 cmpl $0x11,0xffffffec(%ebp) - 15908: 77 32 ja 1593c <_usb_physical_reset_device+0x1e7> - 1590a: 83 ec 08 sub $0x8,%esp - 1590d: 8b 45 08 mov 0x8(%ebp),%eax - 15910: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax - 15916: 83 c0 10 add $0x10,%eax - 15919: 50 push %eax - 1591a: 8b 45 08 mov 0x8(%ebp),%eax - 1591d: ff 30 pushl (%eax) - 1591f: e8 8e 01 00 00 call 15ab2 <_clear_bit> - 15924: 83 c4 10 add $0x10,%esp - 15927: 8b 45 08 mov 0x8(%ebp),%eax - 1592a: c7 00 ff ff ff ff movl $0xffffffff,(%eax) - 15930: c7 45 dc fb ff ff ff movl $0xfffffffb,0xffffffdc(%ebp) - 15937: e9 6e 01 00 00 jmp 15aaa <_usb_physical_reset_device+0x355> - 1593c: 83 ec 0c sub $0xc,%esp - 1593f: ff 75 08 pushl 0x8(%ebp) - 15942: e8 d1 24 00 00 call 17e18 <_usb_get_configuration> - 15947: 83 c4 10 add $0x10,%esp - 1594a: 89 45 ec mov %eax,0xffffffec(%ebp) - 1594d: 83 7d ec 00 cmpl $0x0,0xffffffec(%ebp) - 15951: 79 40 jns 15993 <_usb_physical_reset_device+0x23e> - 15953: 83 ec 0c sub $0xc,%esp - 15956: ff 75 08 pushl 0x8(%ebp) - 15959: e8 97 22 00 00 call 17bf5 <_usb_destroy_configuration> - 1595e: 83 c4 10 add $0x10,%esp - 15961: 83 ec 08 sub $0x8,%esp - 15964: 8b 45 08 mov 0x8(%ebp),%eax - 15967: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax - 1596d: 83 c0 10 add $0x10,%eax - 15970: 50 push %eax - 15971: 8b 45 08 mov 0x8(%ebp),%eax - 15974: ff 30 pushl (%eax) - 15976: e8 37 01 00 00 call 15ab2 <_clear_bit> - 1597b: 83 c4 10 add $0x10,%esp - 1597e: 8b 45 08 mov 0x8(%ebp),%eax - 15981: c7 00 ff ff ff ff movl $0xffffffff,(%eax) - 15987: c7 45 dc 01 00 00 00 movl $0x1,0xffffffdc(%ebp) - 1598e: e9 17 01 00 00 jmp 15aaa <_usb_physical_reset_device+0x355> - 15993: 8b 45 08 mov 0x8(%ebp),%eax - 15996: 8b 55 08 mov 0x8(%ebp),%edx - 15999: 8b 92 84 01 00 00 mov 0x184(%edx),%edx - 1599f: 89 90 88 01 00 00 mov %edx,0x188(%eax) - 159a5: 83 ec 0c sub $0xc,%esp - 159a8: ff 75 08 pushl 0x8(%ebp) - 159ab: e8 49 bb ff ff call 114f9 <_usb_set_maxpacket> - 159b0: 83 c4 10 add $0x10,%esp - 159b3: c7 45 dc 01 00 00 00 movl $0x1,0xffffffdc(%ebp) - 159ba: e9 eb 00 00 00 jmp 15aaa <_usb_physical_reset_device+0x355> - 159bf: 83 ec 0c sub $0xc,%esp - 159c2: ff 75 f4 pushl 0xfffffff4(%ebp) - 159c5: e8 76 40 00 00 call 19a40 <_ExFreePool@4> - 159ca: 83 c4 0c add $0xc,%esp - 159cd: 83 ec 08 sub $0x8,%esp - 159d0: 8b 45 08 mov 0x8(%ebp),%eax - 159d3: 8b 80 88 01 00 00 mov 0x188(%eax),%eax - 159d9: 8a 40 05 mov 0x5(%eax),%al - 159dc: 25 ff 00 00 00 and $0xff,%eax - 159e1: 50 push %eax - 159e2: ff 75 08 pushl 0x8(%ebp) - 159e5: e8 5d c0 ff ff call 11a47 <_usb_set_configuration> - 159ea: 83 c4 10 add $0x10,%esp - 159ed: 89 45 ec mov %eax,0xffffffec(%ebp) - 159f0: 83 7d ec 00 cmpl $0x0,0xffffffec(%ebp) - 159f4: 79 0b jns 15a01 <_usb_physical_reset_device+0x2ac> - 159f6: 8b 45 ec mov 0xffffffec(%ebp),%eax - 159f9: 89 45 dc mov %eax,0xffffffdc(%ebp) - 159fc: e9 a9 00 00 00 jmp 15aaa <_usb_physical_reset_device+0x355> - 15a01: c7 45 f0 00 00 00 00 movl $0x0,0xfffffff0(%ebp) - 15a08: 8b 45 08 mov 0x8(%ebp),%eax - 15a0b: 8b 80 88 01 00 00 mov 0x188(%eax),%eax - 15a11: 8a 40 04 mov 0x4(%eax),%al - 15a14: 25 ff 00 00 00 and $0xff,%eax - 15a19: 3b 45 f0 cmp 0xfffffff0(%ebp),%eax - 15a1c: 0f 8e 81 00 00 00 jle 15aa3 <_usb_physical_reset_device+0x34e> - 15a22: 8b 45 08 mov 0x8(%ebp),%eax - 15a25: 8b 98 88 01 00 00 mov 0x188(%eax),%ebx - 15a2b: 8b 4d f0 mov 0xfffffff0(%ebp),%ecx - 15a2e: 89 c8 mov %ecx,%eax - 15a30: c1 e0 02 shl $0x2,%eax - 15a33: 01 c8 add %ecx,%eax - 15a35: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx - 15a3c: 01 d0 add %edx,%eax - 15a3e: 01 c0 add %eax,%eax - 15a40: 01 c8 add %ecx,%eax - 15a42: c1 e0 02 shl $0x2,%eax - 15a45: 03 43 0c add 0xc(%ebx),%eax - 15a48: 89 45 e4 mov %eax,0xffffffe4(%ebp) - 15a4b: 8b 4d e4 mov 0xffffffe4(%ebp),%ecx - 15a4e: 8b 45 e4 mov 0xffffffe4(%ebp),%eax - 15a51: 8b 50 04 mov 0x4(%eax),%edx - 15a54: 89 d0 mov %edx,%eax - 15a56: 01 c0 add %eax,%eax - 15a58: 01 d0 add %edx,%eax - 15a5a: c1 e0 03 shl $0x3,%eax - 15a5d: 03 01 add (%ecx),%eax - 15a5f: 89 45 e0 mov %eax,0xffffffe0(%ebp) - 15a62: 83 ec 04 sub $0x4,%esp - 15a65: 8b 45 e0 mov 0xffffffe0(%ebp),%eax - 15a68: 8a 40 03 mov 0x3(%eax),%al - 15a6b: 25 ff 00 00 00 and $0xff,%eax - 15a70: 50 push %eax - 15a71: 8b 45 e0 mov 0xffffffe0(%ebp),%eax - 15a74: 8a 40 02 mov 0x2(%eax),%al - 15a77: 25 ff 00 00 00 and $0xff,%eax - 15a7c: 50 push %eax - 15a7d: ff 75 08 pushl 0x8(%ebp) - 15a80: e8 f1 bc ff ff call 11776 <_usb_set_interface> - 15a85: 83 c4 10 add $0x10,%esp - 15a88: 89 45 ec mov %eax,0xffffffec(%ebp) - 15a8b: 83 7d ec 00 cmpl $0x0,0xffffffec(%ebp) - 15a8f: 79 08 jns 15a99 <_usb_physical_reset_device+0x344> - 15a91: 8b 45 ec mov 0xffffffec(%ebp),%eax - 15a94: 89 45 dc mov %eax,0xffffffdc(%ebp) - 15a97: eb 11 jmp 15aaa <_usb_physical_reset_device+0x355> - 15a99: 8d 45 f0 lea 0xfffffff0(%ebp),%eax - 15a9c: ff 00 incl (%eax) - 15a9e: e9 65 ff ff ff jmp 15a08 <_usb_physical_reset_device+0x2b3> - 15aa3: c7 45 dc 00 00 00 00 movl $0x0,0xffffffdc(%ebp) - 15aaa: 8b 45 dc mov 0xffffffdc(%ebp),%eax - 15aad: 8b 5d fc mov 0xfffffffc(%ebp),%ebx - 15ab0: c9 leave - 15ab1: c3 ret - -00015ab2 <_clear_bit>: - 15ab2: 55 push %ebp - 15ab3: 89 e5 mov %esp,%ebp - 15ab5: 8b 55 0c mov 0xc(%ebp),%edx - 15ab8: 8b 45 08 mov 0x8(%ebp),%eax - 15abb: 0f b3 02 btr %eax,(%edx) - 15abe: 5d pop %ebp - 15abf: c3 ret - -00015ac0 <_usb_reset_device>: - 15ac0: 55 push %ebp - 15ac1: 89 e5 mov %esp,%ebp - 15ac3: 83 ec 08 sub $0x8,%esp - 15ac6: 83 ec 0c sub $0xc,%esp - 15ac9: ff 75 08 pushl 0x8(%ebp) - 15acc: e8 84 fc ff ff call 15755 <_usb_physical_reset_device> - 15ad1: 83 c4 10 add $0x10,%esp - 15ad4: 89 45 fc mov %eax,0xfffffffc(%ebp) - 15ad7: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 15ada: c9 leave - 15adb: c3 ret - 15adc: 90 nop - 15add: 90 nop - 15ade: 90 nop - 15adf: 90 nop - -00015ae0 <_generic_probe>: - 15ae0: 55 push %ebp - 15ae1: 89 e5 mov %esp,%ebp - 15ae3: b8 00 00 00 00 mov $0x0,%eax - 15ae8: 5d pop %ebp - 15ae9: c3 ret - -00015aea <_generic_remove>: - 15aea: 55 push %ebp - 15aeb: 89 e5 mov %esp,%ebp - 15aed: b8 00 00 00 00 mov $0x0,%eax - 15af2: 5d pop %ebp - 15af3: c3 ret - -00015af4 <_usb_device_probe>: - 15af4: 55 push %ebp - 15af5: 89 e5 mov %esp,%ebp - 15af7: 83 ec 18 sub $0x18,%esp - 15afa: 8b 45 08 mov 0x8(%ebp),%eax - 15afd: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 15b00: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 15b03: 83 e8 18 sub $0x18,%eax - 15b06: 89 45 fc mov %eax,0xfffffffc(%ebp) - 15b09: 8b 45 08 mov 0x8(%ebp),%eax - 15b0c: 8b 80 98 00 00 00 mov 0x98(%eax),%eax - 15b12: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 15b15: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 15b18: 83 e8 18 sub $0x18,%eax - 15b1b: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 15b1e: c7 45 f0 ed ff ff ff movl $0xffffffed,0xfffffff0(%ebp) - 15b25: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 15b28: 83 78 08 00 cmpl $0x0,0x8(%eax) - 15b2c: 75 08 jne 15b36 <_usb_device_probe+0x42> - 15b2e: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 15b31: 89 45 ec mov %eax,0xffffffec(%ebp) - 15b34: eb 49 jmp 15b7f <_usb_device_probe+0x8b> - 15b36: 83 ec 08 sub $0x8,%esp - 15b39: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 15b3c: ff 70 14 pushl 0x14(%eax) - 15b3f: ff 75 fc pushl 0xfffffffc(%ebp) - 15b42: e8 0d 04 00 00 call 15f54 <_usb_match_id> - 15b47: 83 c4 10 add $0x10,%esp - 15b4a: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 15b4d: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) - 15b51: 74 17 je 15b6a <_usb_device_probe+0x76> - 15b53: 83 ec 08 sub $0x8,%esp - 15b56: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 15b59: ff 75 f4 pushl 0xfffffff4(%ebp) - 15b5c: ff 75 fc pushl 0xfffffffc(%ebp) - 15b5f: 8b 40 08 mov 0x8(%eax),%eax - 15b62: ff d0 call *%eax - 15b64: 83 c4 10 add $0x10,%esp - 15b67: 89 45 f0 mov %eax,0xfffffff0(%ebp) - 15b6a: 83 7d f0 00 cmpl $0x0,0xfffffff0(%ebp) - 15b6e: 75 09 jne 15b79 <_usb_device_probe+0x85> - 15b70: 8b 55 fc mov 0xfffffffc(%ebp),%edx - 15b73: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 15b76: 89 42 10 mov %eax,0x10(%edx) - 15b79: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 15b7c: 89 45 ec mov %eax,0xffffffec(%ebp) - 15b7f: 8b 45 ec mov 0xffffffec(%ebp),%eax - 15b82: c9 leave - 15b83: c3 ret - -00015b84 <_usb_device_remove>: - 15b84: 55 push %ebp - 15b85: 89 e5 mov %esp,%ebp - 15b87: 83 ec 18 sub $0x18,%esp - 15b8a: 8b 45 08 mov 0x8(%ebp),%eax - 15b8d: 83 e8 18 sub $0x18,%eax - 15b90: 89 45 fc mov %eax,0xfffffffc(%ebp) - 15b93: 8b 45 08 mov 0x8(%ebp),%eax - 15b96: 8b 80 98 00 00 00 mov 0x98(%eax),%eax - 15b9c: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 15b9f: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 15ba2: 83 e8 18 sub $0x18,%eax - 15ba5: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 15ba8: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 15bab: 83 78 10 00 cmpl $0x0,0x10(%eax) - 15baf: 74 20 je 15bd1 <_usb_device_remove+0x4d> - 15bb1: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 15bb4: 8b 40 10 mov 0x10(%eax),%eax - 15bb7: 83 78 0c 00 cmpl $0x0,0xc(%eax) - 15bbb: 74 14 je 15bd1 <_usb_device_remove+0x4d> - 15bbd: 83 ec 0c sub $0xc,%esp - 15bc0: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 15bc3: 8b 40 10 mov 0x10(%eax),%eax - 15bc6: ff 75 fc pushl 0xfffffffc(%ebp) - 15bc9: 8b 40 0c mov 0xc(%eax),%eax - 15bcc: ff d0 call *%eax - 15bce: 83 c4 10 add $0x10,%esp - 15bd1: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 15bd4: 83 78 10 00 cmpl $0x0,0x10(%eax) - 15bd8: 74 11 je 15beb <_usb_device_remove+0x67> - 15bda: 83 ec 08 sub $0x8,%esp - 15bdd: ff 75 fc pushl 0xfffffffc(%ebp) - 15be0: ff 75 f8 pushl 0xfffffff8(%ebp) - 15be3: e8 3f 03 00 00 call 15f27 <_usb_driver_release_interface> - 15be8: 83 c4 10 add $0x10,%esp - 15beb: b8 00 00 00 00 mov $0x0,%eax - 15bf0: c9 leave - 15bf1: c3 ret - -00015bf2 <_usb_register>: - 15bf2: 55 push %ebp - 15bf3: 89 e5 mov %esp,%ebp - 15bf5: 83 ec 08 sub $0x8,%esp - 15bf8: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) - 15bff: 83 3d 30 c1 01 00 00 cmpl $0x0,0x1c130 - 15c06: 74 09 je 15c11 <_usb_register+0x1f> - 15c08: c7 45 f8 ed ff ff ff movl $0xffffffed,0xfffffff8(%ebp) - 15c0f: eb 50 jmp 15c61 <_usb_register+0x6f> - 15c11: 8b 55 08 mov 0x8(%ebp),%edx - 15c14: 8b 45 08 mov 0x8(%ebp),%eax - 15c17: 8b 40 04 mov 0x4(%eax),%eax - 15c1a: 89 42 18 mov %eax,0x18(%edx) - 15c1d: 8b 45 08 mov 0x8(%ebp),%eax - 15c20: c7 40 1c f8 a0 01 00 movl $0x1a0f8,0x1c(%eax) - 15c27: 8b 45 08 mov 0x8(%ebp),%eax - 15c2a: c7 40 20 f4 5a 01 00 movl $0x15af4,0x20(%eax) - 15c31: 8b 45 08 mov 0x8(%ebp),%eax - 15c34: c7 40 24 84 5b 01 00 movl $0x15b84,0x24(%eax) - 15c3b: 83 ec 0c sub $0xc,%esp - 15c3e: 8b 45 08 mov 0x8(%ebp),%eax - 15c41: 83 c0 18 add $0x18,%eax - 15c44: 50 push %eax - 15c45: e8 92 3b 00 00 call 197dc <_my_driver_register> - 15c4a: 83 c4 10 add $0x10,%esp - 15c4d: 89 45 fc mov %eax,0xfffffffc(%ebp) - 15c50: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) - 15c54: 75 05 jne 15c5b <_usb_register+0x69> - 15c56: e8 0b 00 00 00 call 15c66 <_usbfs_update_special> - 15c5b: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 15c5e: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 15c61: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 15c64: c9 leave - 15c65: c3 ret - -00015c66 <_usbfs_update_special>: - 15c66: 55 push %ebp - 15c67: 89 e5 mov %esp,%ebp - 15c69: 5d pop %ebp - 15c6a: c3 ret - -00015c6b <_usb_deregister>: - 15c6b: 55 push %ebp - 15c6c: 89 e5 mov %esp,%ebp - 15c6e: e8 f3 ff ff ff call 15c66 <_usbfs_update_special> - 15c73: 5d pop %ebp - 15c74: c3 ret - -00015c75 <_usb_ifnum_to_if>: - 15c75: 55 push %ebp - 15c76: 89 e5 mov %esp,%ebp - 15c78: 53 push %ebx - 15c79: 83 ec 08 sub $0x8,%esp - 15c7c: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) - 15c83: 8b 45 08 mov 0x8(%ebp),%eax - 15c86: 8b 80 88 01 00 00 mov 0x188(%eax),%eax - 15c8c: 8a 40 04 mov 0x4(%eax),%al - 15c8f: 25 ff 00 00 00 and $0xff,%eax - 15c94: 3b 45 f8 cmp 0xfffffff8(%ebp),%eax - 15c97: 7e 6f jle 15d08 <_usb_ifnum_to_if+0x93> - 15c99: 8b 45 08 mov 0x8(%ebp),%eax - 15c9c: 8b 98 88 01 00 00 mov 0x188(%eax),%ebx - 15ca2: 8b 4d f8 mov 0xfffffff8(%ebp),%ecx - 15ca5: 89 c8 mov %ecx,%eax - 15ca7: c1 e0 02 shl $0x2,%eax - 15caa: 01 c8 add %ecx,%eax - 15cac: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx - 15cb3: 01 d0 add %edx,%eax - 15cb5: 01 c0 add %eax,%eax - 15cb7: 01 c8 add %ecx,%eax - 15cb9: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx - 15cc0: 8b 43 0c mov 0xc(%ebx),%eax - 15cc3: 8b 04 02 mov (%edx,%eax,1),%eax - 15cc6: 8a 40 02 mov 0x2(%eax),%al - 15cc9: 25 ff 00 00 00 and $0xff,%eax - 15cce: 3b 45 0c cmp 0xc(%ebp),%eax - 15cd1: 75 2b jne 15cfe <_usb_ifnum_to_if+0x89> - 15cd3: 8b 45 08 mov 0x8(%ebp),%eax - 15cd6: 8b 98 88 01 00 00 mov 0x188(%eax),%ebx - 15cdc: 8b 4d f8 mov 0xfffffff8(%ebp),%ecx - 15cdf: 89 c8 mov %ecx,%eax - 15ce1: c1 e0 02 shl $0x2,%eax - 15ce4: 01 c8 add %ecx,%eax - 15ce6: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx - 15ced: 01 d0 add %edx,%eax - 15cef: 01 c0 add %eax,%eax - 15cf1: 01 c8 add %ecx,%eax - 15cf3: c1 e0 02 shl $0x2,%eax - 15cf6: 03 43 0c add 0xc(%ebx),%eax - 15cf9: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 15cfc: eb 11 jmp 15d0f <_usb_ifnum_to_if+0x9a> - 15cfe: 8d 45 f8 lea 0xfffffff8(%ebp),%eax - 15d01: ff 00 incl (%eax) - 15d03: e9 7b ff ff ff jmp 15c83 <_usb_ifnum_to_if+0xe> - 15d08: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) - 15d0f: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 15d12: 83 c4 08 add $0x8,%esp - 15d15: 5b pop %ebx - 15d16: 5d pop %ebp - 15d17: c3 ret - -00015d18 <_usb_epnum_to_ep_desc>: - 15d18: 55 push %ebp - 15d19: 89 e5 mov %esp,%ebp - 15d1b: 56 push %esi - 15d1c: 53 push %ebx - 15d1d: 83 ec 10 sub $0x10,%esp - 15d20: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) - 15d27: 8b 45 08 mov 0x8(%ebp),%eax - 15d2a: 8b 80 88 01 00 00 mov 0x188(%eax),%eax - 15d30: 8a 40 04 mov 0x4(%eax),%al - 15d33: 25 ff 00 00 00 and $0xff,%eax - 15d38: 3b 45 f4 cmp 0xfffffff4(%ebp),%eax - 15d3b: 0f 8e 65 01 00 00 jle 15ea6 <_usb_epnum_to_ep_desc+0x18e> - 15d41: c7 45 f0 00 00 00 00 movl $0x0,0xfffffff0(%ebp) - 15d48: 8b 45 08 mov 0x8(%ebp),%eax - 15d4b: 8b 98 88 01 00 00 mov 0x188(%eax),%ebx - 15d51: 8b 4d f4 mov 0xfffffff4(%ebp),%ecx - 15d54: 89 c8 mov %ecx,%eax - 15d56: c1 e0 02 shl $0x2,%eax - 15d59: 01 c8 add %ecx,%eax - 15d5b: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx - 15d62: 01 d0 add %edx,%eax - 15d64: 01 c0 add %eax,%eax - 15d66: 01 c8 add %ecx,%eax - 15d68: 8d 0c 85 00 00 00 00 lea 0x0(,%eax,4),%ecx - 15d6f: 8b 53 0c mov 0xc(%ebx),%edx - 15d72: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 15d75: 3b 44 11 08 cmp 0x8(%ecx,%edx,1),%eax - 15d79: 0f 83 1d 01 00 00 jae 15e9c <_usb_epnum_to_ep_desc+0x184> - 15d7f: c7 45 ec 00 00 00 00 movl $0x0,0xffffffec(%ebp) - 15d86: 8b 45 08 mov 0x8(%ebp),%eax - 15d89: 8b 98 88 01 00 00 mov 0x188(%eax),%ebx - 15d8f: 8b 4d f4 mov 0xfffffff4(%ebp),%ecx - 15d92: 89 c8 mov %ecx,%eax - 15d94: c1 e0 02 shl $0x2,%eax - 15d97: 01 c8 add %ecx,%eax - 15d99: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx - 15da0: 01 d0 add %edx,%eax - 15da2: 01 c0 add %eax,%eax - 15da4: 01 c8 add %ecx,%eax - 15da6: 8d 0c 85 00 00 00 00 lea 0x0(,%eax,4),%ecx - 15dad: 8b 5b 0c mov 0xc(%ebx),%ebx - 15db0: 8b 55 f0 mov 0xfffffff0(%ebp),%edx - 15db3: 89 d0 mov %edx,%eax - 15db5: 01 c0 add %eax,%eax - 15db7: 01 d0 add %edx,%eax - 15db9: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx - 15dc0: 8b 04 19 mov (%ecx,%ebx,1),%eax - 15dc3: 8a 44 02 04 mov 0x4(%edx,%eax,1),%al - 15dc7: 25 ff 00 00 00 and $0xff,%eax - 15dcc: 3b 45 ec cmp 0xffffffec(%ebp),%eax - 15dcf: 0f 8e bd 00 00 00 jle 15e92 <_usb_epnum_to_ep_desc+0x17a> - 15dd5: 8b 45 08 mov 0x8(%ebp),%eax - 15dd8: 8b 98 88 01 00 00 mov 0x188(%eax),%ebx - 15dde: 8b 4d f4 mov 0xfffffff4(%ebp),%ecx - 15de1: 89 c8 mov %ecx,%eax - 15de3: c1 e0 02 shl $0x2,%eax - 15de6: 01 c8 add %ecx,%eax - 15de8: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx - 15def: 01 d0 add %edx,%eax - 15df1: 01 c0 add %eax,%eax - 15df3: 01 c8 add %ecx,%eax - 15df5: 8d 0c 85 00 00 00 00 lea 0x0(,%eax,4),%ecx - 15dfc: 8b 5b 0c mov 0xc(%ebx),%ebx - 15dff: 8b 55 f0 mov 0xfffffff0(%ebp),%edx - 15e02: 89 d0 mov %edx,%eax - 15e04: 01 c0 add %eax,%eax - 15e06: 01 d0 add %edx,%eax - 15e08: 8d 34 c5 00 00 00 00 lea 0x0(,%eax,8),%esi - 15e0f: 8b 0c 19 mov (%ecx,%ebx,1),%ecx - 15e12: 8b 55 ec mov 0xffffffec(%ebp),%edx - 15e15: 89 d0 mov %edx,%eax - 15e17: c1 e0 02 shl $0x2,%eax - 15e1a: 01 d0 add %edx,%eax - 15e1c: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx - 15e23: 8b 44 0e 0c mov 0xc(%esi,%ecx,1),%eax - 15e27: 8a 44 02 02 mov 0x2(%edx,%eax,1),%al - 15e2b: 25 ff 00 00 00 and $0xff,%eax - 15e30: 3b 45 0c cmp 0xc(%ebp),%eax - 15e33: 75 53 jne 15e88 <_usb_epnum_to_ep_desc+0x170> - 15e35: 8b 45 08 mov 0x8(%ebp),%eax - 15e38: 8b 98 88 01 00 00 mov 0x188(%eax),%ebx - 15e3e: 8b 4d f4 mov 0xfffffff4(%ebp),%ecx - 15e41: 89 c8 mov %ecx,%eax - 15e43: c1 e0 02 shl $0x2,%eax - 15e46: 01 c8 add %ecx,%eax - 15e48: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx - 15e4f: 01 d0 add %edx,%eax - 15e51: 01 c0 add %eax,%eax - 15e53: 01 c8 add %ecx,%eax - 15e55: 8d 0c 85 00 00 00 00 lea 0x0(,%eax,4),%ecx - 15e5c: 8b 5b 0c mov 0xc(%ebx),%ebx - 15e5f: 8b 55 f0 mov 0xfffffff0(%ebp),%edx - 15e62: 89 d0 mov %edx,%eax - 15e64: 01 c0 add %eax,%eax - 15e66: 01 d0 add %edx,%eax - 15e68: 8d 34 c5 00 00 00 00 lea 0x0(,%eax,8),%esi - 15e6f: 8b 0c 19 mov (%ecx,%ebx,1),%ecx - 15e72: 8b 55 ec mov 0xffffffec(%ebp),%edx - 15e75: 89 d0 mov %edx,%eax - 15e77: c1 e0 02 shl $0x2,%eax - 15e7a: 01 d0 add %edx,%eax - 15e7c: c1 e0 02 shl $0x2,%eax - 15e7f: 03 44 0e 0c add 0xc(%esi,%ecx,1),%eax - 15e83: 89 45 e8 mov %eax,0xffffffe8(%ebp) - 15e86: eb 25 jmp 15ead <_usb_epnum_to_ep_desc+0x195> - 15e88: 8d 45 ec lea 0xffffffec(%ebp),%eax - 15e8b: ff 00 incl (%eax) - 15e8d: e9 f4 fe ff ff jmp 15d86 <_usb_epnum_to_ep_desc+0x6e> - 15e92: 8d 45 f0 lea 0xfffffff0(%ebp),%eax - 15e95: ff 00 incl (%eax) - 15e97: e9 ac fe ff ff jmp 15d48 <_usb_epnum_to_ep_desc+0x30> - 15e9c: 8d 45 f4 lea 0xfffffff4(%ebp),%eax - 15e9f: ff 00 incl (%eax) - 15ea1: e9 81 fe ff ff jmp 15d27 <_usb_epnum_to_ep_desc+0xf> - 15ea6: c7 45 e8 00 00 00 00 movl $0x0,0xffffffe8(%ebp) - 15ead: 8b 45 e8 mov 0xffffffe8(%ebp),%eax - 15eb0: 83 c4 10 add $0x10,%esp - 15eb3: 5b pop %ebx - 15eb4: 5e pop %esi - 15eb5: 5d pop %ebp - 15eb6: c3 ret - -00015eb7 <_usb_driver_claim_interface>: - 15eb7: 55 push %ebp - 15eb8: 89 e5 mov %esp,%ebp - 15eba: 83 ec 08 sub $0x8,%esp - 15ebd: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) - 15ec1: 74 22 je 15ee5 <_usb_driver_claim_interface+0x2e> - 15ec3: 83 7d 08 00 cmpl $0x0,0x8(%ebp) - 15ec7: 75 02 jne 15ecb <_usb_driver_claim_interface+0x14> - 15ec9: eb 1a jmp 15ee5 <_usb_driver_claim_interface+0x2e> - 15ecb: 8b 55 0c mov 0xc(%ebp),%edx - 15ece: 8b 45 08 mov 0x8(%ebp),%eax - 15ed1: 89 42 10 mov %eax,0x10(%edx) - 15ed4: 83 ec 08 sub $0x8,%esp - 15ed7: ff 75 10 pushl 0x10(%ebp) - 15eda: ff 75 0c pushl 0xc(%ebp) - 15edd: e8 05 00 00 00 call 15ee7 <_usb_set_intfdata> - 15ee2: 83 c4 10 add $0x10,%esp - 15ee5: c9 leave - 15ee6: c3 ret - -00015ee7 <_usb_set_intfdata>: - 15ee7: 55 push %ebp - 15ee8: 89 e5 mov %esp,%ebp - 15eea: 8b 55 08 mov 0x8(%ebp),%edx - 15eed: 83 c2 18 add $0x18,%edx - 15ef0: 8b 45 0c mov 0xc(%ebp),%eax - 15ef3: 89 82 9c 00 00 00 mov %eax,0x9c(%edx) - 15ef9: 5d pop %ebp - 15efa: c3 ret - -00015efb <_usb_interface_claimed>: - 15efb: 55 push %ebp - 15efc: 89 e5 mov %esp,%ebp - 15efe: 83 ec 04 sub $0x4,%esp - 15f01: 83 7d 08 00 cmpl $0x0,0x8(%ebp) - 15f05: 75 09 jne 15f10 <_usb_interface_claimed+0x15> - 15f07: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) - 15f0e: eb 12 jmp 15f22 <_usb_interface_claimed+0x27> - 15f10: 8b 45 08 mov 0x8(%ebp),%eax - 15f13: 83 78 10 00 cmpl $0x0,0x10(%eax) - 15f17: 0f 95 c0 setne %al - 15f1a: 25 ff 00 00 00 and $0xff,%eax - 15f1f: 89 45 fc mov %eax,0xfffffffc(%ebp) - 15f22: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 15f25: c9 leave - 15f26: c3 ret - -00015f27 <_usb_driver_release_interface>: - 15f27: 55 push %ebp - 15f28: 89 e5 mov %esp,%ebp - 15f2a: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) - 15f2e: 74 22 je 15f52 <_usb_driver_release_interface+0x2b> - 15f30: 8b 45 0c mov 0xc(%ebp),%eax - 15f33: 8b 40 10 mov 0x10(%eax),%eax - 15f36: 3b 45 08 cmp 0x8(%ebp),%eax - 15f39: 75 17 jne 15f52 <_usb_driver_release_interface+0x2b> - 15f3b: 8b 45 0c mov 0xc(%ebp),%eax - 15f3e: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) - 15f45: 6a 00 push $0x0 - 15f47: ff 75 0c pushl 0xc(%ebp) - 15f4a: e8 98 ff ff ff call 15ee7 <_usb_set_intfdata> - 15f4f: 83 c4 08 add $0x8,%esp - 15f52: c9 leave - 15f53: c3 ret - -00015f54 <_usb_match_id>: - 15f54: 55 push %ebp - 15f55: 89 e5 mov %esp,%ebp - 15f57: 83 ec 10 sub $0x10,%esp - 15f5a: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) - 15f5e: 75 0c jne 15f6c <_usb_match_id+0x18> - 15f60: c7 45 f0 00 00 00 00 movl $0x0,0xfffffff0(%ebp) - 15f67: e9 0f 02 00 00 jmp 1617b <_usb_match_id+0x227> - 15f6c: 8b 4d 08 mov 0x8(%ebp),%ecx - 15f6f: 8b 45 08 mov 0x8(%ebp),%eax - 15f72: 8b 50 04 mov 0x4(%eax),%edx - 15f75: 89 d0 mov %edx,%eax - 15f77: 01 c0 add %eax,%eax - 15f79: 01 d0 add %edx,%eax - 15f7b: c1 e0 03 shl $0x3,%eax - 15f7e: 03 01 add (%ecx),%eax - 15f80: 89 45 fc mov %eax,0xfffffffc(%ebp) - 15f83: 8b 45 08 mov 0x8(%ebp),%eax - 15f86: 8b 80 b8 00 00 00 mov 0xb8(%eax),%eax - 15f8c: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 15f8f: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 15f92: 2d c0 00 00 00 sub $0xc0,%eax - 15f97: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 15f9a: 8b 45 0c mov 0xc(%ebp),%eax - 15f9d: 66 83 78 02 00 cmpw $0x0,0x2(%eax) - 15fa2: 75 20 jne 15fc4 <_usb_match_id+0x70> - 15fa4: 8b 45 0c mov 0xc(%ebp),%eax - 15fa7: 80 78 0a 00 cmpb $0x0,0xa(%eax) - 15fab: 75 17 jne 15fc4 <_usb_match_id+0x70> - 15fad: 8b 45 0c mov 0xc(%ebp),%eax - 15fb0: 80 78 0d 00 cmpb $0x0,0xd(%eax) - 15fb4: 75 0e jne 15fc4 <_usb_match_id+0x70> - 15fb6: 8b 45 0c mov 0xc(%ebp),%eax - 15fb9: 83 78 10 00 cmpl $0x0,0x10(%eax) - 15fbd: 75 05 jne 15fc4 <_usb_match_id+0x70> - 15fbf: e9 b0 01 00 00 jmp 16174 <_usb_match_id+0x220> - 15fc4: 8b 45 0c mov 0xc(%ebp),%eax - 15fc7: 66 8b 00 mov (%eax),%ax - 15fca: 25 ff ff 00 00 and $0xffff,%eax - 15fcf: 83 e0 01 and $0x1,%eax - 15fd2: 85 c0 test %eax,%eax - 15fd4: 74 18 je 15fee <_usb_match_id+0x9a> - 15fd6: 8b 45 0c mov 0xc(%ebp),%eax - 15fd9: 8b 55 f8 mov 0xfffffff8(%ebp),%edx - 15fdc: 66 8b 40 02 mov 0x2(%eax),%ax - 15fe0: 66 3b 82 78 01 00 00 cmp 0x178(%edx),%ax - 15fe7: 74 05 je 15fee <_usb_match_id+0x9a> - 15fe9: e9 7b 01 00 00 jmp 16169 <_usb_match_id+0x215> - 15fee: 8b 45 0c mov 0xc(%ebp),%eax - 15ff1: 66 8b 00 mov (%eax),%ax - 15ff4: 25 ff ff 00 00 and $0xffff,%eax - 15ff9: d1 e8 shr %eax - 15ffb: 83 e0 01 and $0x1,%eax - 15ffe: 85 c0 test %eax,%eax - 16000: 74 18 je 1601a <_usb_match_id+0xc6> - 16002: 8b 45 0c mov 0xc(%ebp),%eax - 16005: 8b 55 f8 mov 0xfffffff8(%ebp),%edx - 16008: 66 8b 40 04 mov 0x4(%eax),%ax - 1600c: 66 3b 82 7a 01 00 00 cmp 0x17a(%edx),%ax - 16013: 74 05 je 1601a <_usb_match_id+0xc6> - 16015: e9 4f 01 00 00 jmp 16169 <_usb_match_id+0x215> - 1601a: 8b 45 0c mov 0xc(%ebp),%eax - 1601d: 66 8b 00 mov (%eax),%ax - 16020: 25 ff ff 00 00 and $0xffff,%eax - 16025: c1 e8 02 shr $0x2,%eax - 16028: 83 e0 01 and $0x1,%eax - 1602b: 85 c0 test %eax,%eax - 1602d: 74 18 je 16047 <_usb_match_id+0xf3> - 1602f: 8b 45 0c mov 0xc(%ebp),%eax - 16032: 8b 55 f8 mov 0xfffffff8(%ebp),%edx - 16035: 66 8b 40 06 mov 0x6(%eax),%ax - 16039: 66 3b 82 7c 01 00 00 cmp 0x17c(%edx),%ax - 16040: 76 05 jbe 16047 <_usb_match_id+0xf3> - 16042: e9 22 01 00 00 jmp 16169 <_usb_match_id+0x215> - 16047: 8b 45 0c mov 0xc(%ebp),%eax - 1604a: 66 8b 00 mov (%eax),%ax - 1604d: 25 ff ff 00 00 and $0xffff,%eax - 16052: c1 e8 03 shr $0x3,%eax - 16055: 83 e0 01 and $0x1,%eax - 16058: 85 c0 test %eax,%eax - 1605a: 74 18 je 16074 <_usb_match_id+0x120> - 1605c: 8b 45 0c mov 0xc(%ebp),%eax - 1605f: 8b 55 f8 mov 0xfffffff8(%ebp),%edx - 16062: 66 8b 40 08 mov 0x8(%eax),%ax - 16066: 66 3b 82 7c 01 00 00 cmp 0x17c(%edx),%ax - 1606d: 73 05 jae 16074 <_usb_match_id+0x120> - 1606f: e9 f5 00 00 00 jmp 16169 <_usb_match_id+0x215> - 16074: 8b 45 0c mov 0xc(%ebp),%eax - 16077: 66 8b 00 mov (%eax),%ax - 1607a: 25 ff ff 00 00 and $0xffff,%eax - 1607f: c1 e8 04 shr $0x4,%eax - 16082: 83 e0 01 and $0x1,%eax - 16085: 85 c0 test %eax,%eax - 16087: 74 16 je 1609f <_usb_match_id+0x14b> - 16089: 8b 45 0c mov 0xc(%ebp),%eax - 1608c: 8b 55 f8 mov 0xfffffff8(%ebp),%edx - 1608f: 8a 40 0a mov 0xa(%eax),%al - 16092: 3a 82 74 01 00 00 cmp 0x174(%edx),%al - 16098: 74 05 je 1609f <_usb_match_id+0x14b> - 1609a: e9 ca 00 00 00 jmp 16169 <_usb_match_id+0x215> - 1609f: 8b 45 0c mov 0xc(%ebp),%eax - 160a2: 66 8b 00 mov (%eax),%ax - 160a5: 25 ff ff 00 00 and $0xffff,%eax - 160aa: c1 e8 05 shr $0x5,%eax - 160ad: 83 e0 01 and $0x1,%eax - 160b0: 85 c0 test %eax,%eax - 160b2: 74 16 je 160ca <_usb_match_id+0x176> - 160b4: 8b 45 0c mov 0xc(%ebp),%eax - 160b7: 8b 55 f8 mov 0xfffffff8(%ebp),%edx - 160ba: 8a 40 0b mov 0xb(%eax),%al - 160bd: 3a 82 75 01 00 00 cmp 0x175(%edx),%al - 160c3: 74 05 je 160ca <_usb_match_id+0x176> - 160c5: e9 9f 00 00 00 jmp 16169 <_usb_match_id+0x215> - 160ca: 8b 45 0c mov 0xc(%ebp),%eax - 160cd: 66 8b 00 mov (%eax),%ax - 160d0: 25 ff ff 00 00 and $0xffff,%eax - 160d5: c1 e8 06 shr $0x6,%eax - 160d8: 83 e0 01 and $0x1,%eax - 160db: 85 c0 test %eax,%eax - 160dd: 74 13 je 160f2 <_usb_match_id+0x19e> - 160df: 8b 45 0c mov 0xc(%ebp),%eax - 160e2: 8b 55 f8 mov 0xfffffff8(%ebp),%edx - 160e5: 8a 40 0c mov 0xc(%eax),%al - 160e8: 3a 82 76 01 00 00 cmp 0x176(%edx),%al - 160ee: 74 02 je 160f2 <_usb_match_id+0x19e> - 160f0: eb 77 jmp 16169 <_usb_match_id+0x215> - 160f2: 8b 45 0c mov 0xc(%ebp),%eax - 160f5: 66 8b 00 mov (%eax),%ax - 160f8: 25 ff ff 00 00 and $0xffff,%eax - 160fd: c1 e8 07 shr $0x7,%eax - 16100: 83 e0 01 and $0x1,%eax - 16103: 85 c0 test %eax,%eax - 16105: 74 10 je 16117 <_usb_match_id+0x1c3> - 16107: 8b 45 0c mov 0xc(%ebp),%eax - 1610a: 8b 55 fc mov 0xfffffffc(%ebp),%edx - 1610d: 8a 40 0d mov 0xd(%eax),%al - 16110: 3a 42 05 cmp 0x5(%edx),%al - 16113: 74 02 je 16117 <_usb_match_id+0x1c3> - 16115: eb 52 jmp 16169 <_usb_match_id+0x215> - 16117: 8b 45 0c mov 0xc(%ebp),%eax - 1611a: 66 8b 00 mov (%eax),%ax - 1611d: 25 ff ff 00 00 and $0xffff,%eax - 16122: c1 e8 08 shr $0x8,%eax - 16125: 83 e0 01 and $0x1,%eax - 16128: 85 c0 test %eax,%eax - 1612a: 74 10 je 1613c <_usb_match_id+0x1e8> - 1612c: 8b 45 0c mov 0xc(%ebp),%eax - 1612f: 8b 55 fc mov 0xfffffffc(%ebp),%edx - 16132: 8a 40 0e mov 0xe(%eax),%al - 16135: 3a 42 06 cmp 0x6(%edx),%al - 16138: 74 02 je 1613c <_usb_match_id+0x1e8> - 1613a: eb 2d jmp 16169 <_usb_match_id+0x215> - 1613c: 8b 45 0c mov 0xc(%ebp),%eax - 1613f: 66 8b 00 mov (%eax),%ax - 16142: 25 ff ff 00 00 and $0xffff,%eax - 16147: c1 e8 09 shr $0x9,%eax - 1614a: 83 e0 01 and $0x1,%eax - 1614d: 85 c0 test %eax,%eax - 1614f: 74 10 je 16161 <_usb_match_id+0x20d> - 16151: 8b 45 0c mov 0xc(%ebp),%eax - 16154: 8b 55 fc mov 0xfffffffc(%ebp),%edx - 16157: 8a 40 0f mov 0xf(%eax),%al - 1615a: 3a 42 07 cmp 0x7(%edx),%al - 1615d: 74 02 je 16161 <_usb_match_id+0x20d> - 1615f: eb 08 jmp 16169 <_usb_match_id+0x215> - 16161: 8b 45 0c mov 0xc(%ebp),%eax - 16164: 89 45 f0 mov %eax,0xfffffff0(%ebp) - 16167: eb 12 jmp 1617b <_usb_match_id+0x227> - 16169: 8d 45 0c lea 0xc(%ebp),%eax - 1616c: 83 00 14 addl $0x14,(%eax) - 1616f: e9 26 fe ff ff jmp 15f9a <_usb_match_id+0x46> - 16174: c7 45 f0 00 00 00 00 movl $0x0,0xfffffff0(%ebp) - 1617b: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 1617e: c9 leave - 1617f: c3 ret - -00016180 <_usb_find_interface>: - 16180: 55 push %ebp - 16181: 89 e5 mov %esp,%ebp - 16183: 83 ec 14 sub $0x14,%esp - 16186: 8b 45 08 mov 0x8(%ebp),%eax - 16189: 83 c0 28 add $0x28,%eax - 1618c: 8b 00 mov (%eax),%eax - 1618e: 89 45 fc mov %eax,0xfffffffc(%ebp) - 16191: 8b 45 08 mov 0x8(%ebp),%eax - 16194: 83 c0 28 add $0x28,%eax - 16197: 3b 45 fc cmp 0xfffffffc(%ebp),%eax - 1619a: 74 59 je 161f5 <_usb_find_interface+0x75> - 1619c: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 1619f: 89 45 f0 mov %eax,0xfffffff0(%ebp) - 161a2: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 161a5: 2d a4 00 00 00 sub $0xa4,%eax - 161aa: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 161ad: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 161b0: 81 b8 98 00 00 00 e0 cmpl $0x1a0e0,0x98(%eax) - 161b7: a0 01 00 - 161ba: 75 02 jne 161be <_usb_find_interface+0x3e> - 161bc: eb 2d jmp 161eb <_usb_find_interface+0x6b> - 161be: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 161c1: 89 45 f0 mov %eax,0xfffffff0(%ebp) - 161c4: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 161c7: 83 e8 18 sub $0x18,%eax - 161ca: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 161cd: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 161d0: 83 78 14 ff cmpl $0xffffffff,0x14(%eax) - 161d4: 75 02 jne 161d8 <_usb_find_interface+0x58> - 161d6: eb 13 jmp 161eb <_usb_find_interface+0x6b> - 161d8: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 161db: 8b 40 14 mov 0x14(%eax),%eax - 161de: 3b 45 0c cmp 0xc(%ebp),%eax - 161e1: 75 08 jne 161eb <_usb_find_interface+0x6b> - 161e3: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 161e6: 89 45 ec mov %eax,0xffffffec(%ebp) - 161e9: eb 11 jmp 161fc <_usb_find_interface+0x7c> - 161eb: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 161ee: 8b 00 mov (%eax),%eax - 161f0: 89 45 fc mov %eax,0xfffffffc(%ebp) - 161f3: eb 9c jmp 16191 <_usb_find_interface+0x11> - 161f5: c7 45 ec 00 00 00 00 movl $0x0,0xffffffec(%ebp) - 161fc: 8b 45 ec mov 0xffffffec(%ebp),%eax - 161ff: c9 leave - 16200: c3 ret - -00016201 <_usb_device_match>: - 16201: 55 push %ebp - 16202: 89 e5 mov %esp,%ebp - 16204: 83 ec 14 sub $0x14,%esp - 16207: 81 7d 0c e0 a0 01 00 cmpl $0x1a0e0,0xc(%ebp) - 1620e: 75 09 jne 16219 <_usb_device_match+0x18> - 16210: c7 45 ec 00 00 00 00 movl $0x0,0xffffffec(%ebp) - 16217: eb 51 jmp 1626a <_usb_device_match+0x69> - 16219: 8b 45 08 mov 0x8(%ebp),%eax - 1621c: 89 45 f0 mov %eax,0xfffffff0(%ebp) - 1621f: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 16222: 83 e8 18 sub $0x18,%eax - 16225: 89 45 fc mov %eax,0xfffffffc(%ebp) - 16228: 8b 45 0c mov 0xc(%ebp),%eax - 1622b: 89 45 f0 mov %eax,0xfffffff0(%ebp) - 1622e: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 16231: 83 e8 18 sub $0x18,%eax - 16234: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 16237: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 1623a: 8b 40 14 mov 0x14(%eax),%eax - 1623d: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 16240: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 16243: ff 70 14 pushl 0x14(%eax) - 16246: ff 75 fc pushl 0xfffffffc(%ebp) - 16249: e8 06 fd ff ff call 15f54 <_usb_match_id> - 1624e: 83 c4 08 add $0x8,%esp - 16251: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 16254: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) - 16258: 74 09 je 16263 <_usb_device_match+0x62> - 1625a: c7 45 ec 01 00 00 00 movl $0x1,0xffffffec(%ebp) - 16261: eb 07 jmp 1626a <_usb_device_match+0x69> - 16263: c7 45 ec 00 00 00 00 movl $0x0,0xffffffec(%ebp) - 1626a: 8b 45 ec mov 0xffffffec(%ebp),%eax - 1626d: c9 leave - 1626e: c3 ret - -0001626f <_usb_hotplug>: - 1626f: 55 push %ebp - 16270: 89 e5 mov %esp,%ebp - 16272: b8 ed ff ff ff mov $0xffffffed,%eax - 16277: 5d pop %ebp - 16278: c3 ret - -00016279 <_usb_alloc_dev@8>: - 16279: 55 push %ebp - 1627a: 89 e5 mov %esp,%ebp - 1627c: 83 ec 08 sub $0x8,%esp - 1627f: 83 ec 08 sub $0x8,%esp - 16282: 68 f0 01 00 00 push $0x1f0 - 16287: 6a 01 push $0x1 - 16289: e8 a2 37 00 00 call 19a30 <_ExAllocatePool@8> - 1628e: 83 c4 08 add $0x8,%esp - 16291: 89 45 fc mov %eax,0xfffffffc(%ebp) - 16294: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) - 16298: 75 0c jne 162a6 <_usb_alloc_dev@8+0x2d> - 1629a: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) - 162a1: e9 bd 00 00 00 jmp 16363 <_usb_alloc_dev@8+0xea> - 162a6: 83 ec 04 sub $0x4,%esp - 162a9: 68 f0 01 00 00 push $0x1f0 - 162ae: 6a 00 push $0x0 - 162b0: ff 75 fc pushl 0xfffffffc(%ebp) - 162b3: e8 98 37 00 00 call 19a50 <_memset> - 162b8: 83 c4 10 add $0x10,%esp - 162bb: 83 ec 0c sub $0xc,%esp - 162be: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 162c1: 05 c0 00 00 00 add $0xc0,%eax - 162c6: 50 push %eax - 162c7: e8 94 35 00 00 call 19860 <_my_device_initialize> - 162cc: 83 c4 10 add $0x10,%esp - 162cf: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 162d2: c7 40 14 01 00 00 00 movl $0x1,0x14(%eax) - 162d9: 83 ec 0c sub $0xc,%esp - 162dc: ff 75 0c pushl 0xc(%ebp) - 162df: e8 b2 c2 ff ff call 12596 <_usb_bus_get> - 162e4: 83 c4 10 add $0x10,%esp - 162e7: 83 7d 08 00 cmpl $0x0,0x8(%ebp) - 162eb: 75 07 jne 162f4 <_usb_alloc_dev@8+0x7b> - 162ed: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 162f0: c6 40 04 30 movb $0x30,0x4(%eax) - 162f4: 8b 55 fc mov 0xfffffffc(%ebp),%edx - 162f7: 8b 45 0c mov 0xc(%ebp),%eax - 162fa: 89 82 bc 00 00 00 mov %eax,0xbc(%edx) - 16300: 8b 55 fc mov 0xfffffffc(%ebp),%edx - 16303: 8b 45 08 mov 0x8(%ebp),%eax - 16306: 89 82 b8 00 00 00 mov %eax,0xb8(%edx) - 1630c: 8b 55 fc mov 0xfffffffc(%ebp),%edx - 1630f: 81 c2 9c 01 00 00 add $0x19c,%edx - 16315: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 16318: 05 9c 01 00 00 add $0x19c,%eax - 1631d: 89 02 mov %eax,(%edx) - 1631f: 8b 55 fc mov 0xfffffffc(%ebp),%edx - 16322: 81 c2 9c 01 00 00 add $0x19c,%edx - 16328: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 1632b: 05 9c 01 00 00 add $0x19c,%eax - 16330: 89 42 04 mov %eax,0x4(%edx) - 16333: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 16336: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax - 1633c: 8b 40 20 mov 0x20(%eax),%eax - 1633f: 83 38 00 cmpl $0x0,(%eax) - 16342: 74 19 je 1635d <_usb_alloc_dev@8+0xe4> - 16344: 83 ec 0c sub $0xc,%esp - 16347: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 1634a: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax - 16350: 8b 40 20 mov 0x20(%eax),%eax - 16353: ff 75 fc pushl 0xfffffffc(%ebp) - 16356: 8b 00 mov (%eax),%eax - 16358: ff d0 call *%eax - 1635a: 83 c4 10 add $0x10,%esp - 1635d: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 16360: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 16363: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 16366: c9 leave - 16367: c2 08 00 ret $0x8 - -0001636a <_usb_get_dev>: - 1636a: 55 push %ebp - 1636b: 89 e5 mov %esp,%ebp - 1636d: 83 ec 18 sub $0x18,%esp - 16370: 83 7d 08 00 cmpl $0x0,0x8(%ebp) - 16374: 75 09 jne 1637f <_usb_get_dev+0x15> - 16376: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) - 1637d: eb 37 jmp 163b6 <_usb_get_dev+0x4c> - 1637f: 83 ec 0c sub $0xc,%esp - 16382: 8b 45 08 mov 0x8(%ebp),%eax - 16385: 05 c0 00 00 00 add $0xc0,%eax - 1638a: 50 push %eax - 1638b: e8 c6 34 00 00 call 19856 <_my_get_device> - 16390: 83 c4 10 add $0x10,%esp - 16393: 89 45 fc mov %eax,0xfffffffc(%ebp) - 16396: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) - 1639a: 74 13 je 163af <_usb_get_dev+0x45> - 1639c: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 1639f: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 163a2: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 163a5: 2d c0 00 00 00 sub $0xc0,%eax - 163aa: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 163ad: eb 07 jmp 163b6 <_usb_get_dev+0x4c> - 163af: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) - 163b6: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 163b9: c9 leave - 163ba: c3 ret - -000163bb <_usb_put_dev@4>: - 163bb: 55 push %ebp - 163bc: 89 e5 mov %esp,%ebp - 163be: 5d pop %ebp - 163bf: c2 04 00 ret $0x4 - -000163c2 <_usb_release_dev>: - 163c2: 55 push %ebp - 163c3: 89 e5 mov %esp,%ebp - 163c5: 83 ec 08 sub $0x8,%esp - 163c8: 8b 45 08 mov 0x8(%ebp),%eax - 163cb: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 163ce: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 163d1: 2d c0 00 00 00 sub $0xc0,%eax - 163d6: 89 45 fc mov %eax,0xfffffffc(%ebp) - 163d9: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 163dc: 83 b8 bc 00 00 00 00 cmpl $0x0,0xbc(%eax) - 163e3: 74 3b je 16420 <_usb_release_dev+0x5e> - 163e5: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 163e8: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax - 163ee: 83 78 20 00 cmpl $0x0,0x20(%eax) - 163f2: 74 2c je 16420 <_usb_release_dev+0x5e> - 163f4: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 163f7: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax - 163fd: 8b 40 20 mov 0x20(%eax),%eax - 16400: 83 78 04 00 cmpl $0x0,0x4(%eax) - 16404: 74 1a je 16420 <_usb_release_dev+0x5e> - 16406: 83 ec 0c sub $0xc,%esp - 16409: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 1640c: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax - 16412: 8b 40 20 mov 0x20(%eax),%eax - 16415: ff 75 fc pushl 0xfffffffc(%ebp) - 16418: 8b 40 04 mov 0x4(%eax),%eax - 1641b: ff d0 call *%eax - 1641d: 83 c4 10 add $0x10,%esp - 16420: 83 ec 0c sub $0xc,%esp - 16423: ff 75 fc pushl 0xfffffffc(%ebp) - 16426: e8 ca 17 00 00 call 17bf5 <_usb_destroy_configuration> - 1642b: 83 c4 10 add $0x10,%esp - 1642e: 83 ec 0c sub $0xc,%esp - 16431: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 16434: ff b0 bc 00 00 00 pushl 0xbc(%eax) - 1643a: e8 6d c1 ff ff call 125ac <_usb_bus_put> - 1643f: 83 c4 10 add $0x10,%esp - 16442: 83 ec 0c sub $0xc,%esp - 16445: ff 75 fc pushl 0xfffffffc(%ebp) - 16448: e8 f3 35 00 00 call 19a40 <_ExFreePool@4> - 1644d: 83 c4 0c add $0xc,%esp - 16450: c9 leave - 16451: c3 ret - -00016452 <_match_device>: - 16452: 55 push %ebp - 16453: 89 e5 mov %esp,%ebp - 16455: 83 ec 18 sub $0x18,%esp - 16458: 8b 45 0c mov 0xc(%ebp),%eax - 1645b: 8b 55 10 mov 0x10(%ebp),%edx - 1645e: 66 89 45 fe mov %ax,0xfffffffe(%ebp) - 16462: 66 89 55 fc mov %dx,0xfffffffc(%ebp) - 16466: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) - 1646d: 8b 45 08 mov 0x8(%ebp),%eax - 16470: 66 8b 80 78 01 00 00 mov 0x178(%eax),%ax - 16477: 66 3b 45 fe cmp 0xfffffffe(%ebp),%ax - 1647b: 75 23 jne 164a0 <_match_device+0x4e> - 1647d: 8b 45 08 mov 0x8(%ebp),%eax - 16480: 66 8b 80 7a 01 00 00 mov 0x17a(%eax),%ax - 16487: 66 3b 45 fc cmp 0xfffffffc(%ebp),%ax - 1648b: 75 13 jne 164a0 <_match_device+0x4e> - 1648d: 83 ec 0c sub $0xc,%esp - 16490: ff 75 08 pushl 0x8(%ebp) - 16493: e8 d2 fe ff ff call 1636a <_usb_get_dev> - 16498: 83 c4 10 add $0x10,%esp - 1649b: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 1649e: eb 62 jmp 16502 <_match_device+0xb0> - 164a0: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) - 164a7: 8b 45 08 mov 0x8(%ebp),%eax - 164aa: 8b 80 ac 01 00 00 mov 0x1ac(%eax),%eax - 164b0: 3b 45 f4 cmp 0xfffffff4(%ebp),%eax - 164b3: 7e 4d jle 16502 <_match_device+0xb0> - 164b5: 8b 55 08 mov 0x8(%ebp),%edx - 164b8: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 164bb: 83 bc 82 b0 01 00 00 cmpl $0x0,0x1b0(%edx,%eax,4) - 164c2: 00 - 164c3: 74 36 je 164fb <_match_device+0xa9> - 164c5: 83 ec 04 sub $0x4,%esp - 164c8: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 164cb: 25 ff ff 00 00 and $0xffff,%eax - 164d0: 50 push %eax - 164d1: 66 8b 45 fe mov 0xfffffffe(%ebp),%ax - 164d5: 25 ff ff 00 00 and $0xffff,%eax - 164da: 50 push %eax - 164db: 8b 55 08 mov 0x8(%ebp),%edx - 164de: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 164e1: ff b4 82 b0 01 00 00 pushl 0x1b0(%edx,%eax,4) - 164e8: e8 65 ff ff ff call 16452 <_match_device> - 164ed: 83 c4 10 add $0x10,%esp - 164f0: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 164f3: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) - 164f7: 74 02 je 164fb <_match_device+0xa9> - 164f9: eb 07 jmp 16502 <_match_device+0xb0> - 164fb: 8d 45 f4 lea 0xfffffff4(%ebp),%eax - 164fe: ff 00 incl (%eax) - 16500: eb a5 jmp 164a7 <_match_device+0x55> - 16502: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 16505: c9 leave - 16506: c3 ret - -00016507 <_usb_find_device>: - 16507: 55 push %ebp - 16508: 89 e5 mov %esp,%ebp - 1650a: 83 ec 18 sub $0x18,%esp - 1650d: 8b 45 08 mov 0x8(%ebp),%eax - 16510: 8b 55 0c mov 0xc(%ebp),%edx - 16513: 66 89 45 fe mov %ax,0xfffffffe(%ebp) - 16517: 66 89 55 fc mov %dx,0xfffffffc(%ebp) - 1651b: c7 45 f0 00 00 00 00 movl $0x0,0xfffffff0(%ebp) - 16522: a1 00 a0 01 00 mov 0x1a000,%eax - 16527: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 1652a: 81 7d f8 00 a0 01 00 cmpl $0x1a000,0xfffffff8(%ebp) - 16531: 74 48 je 1657b <_usb_find_device+0x74> - 16533: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 16536: 89 45 ec mov %eax,0xffffffec(%ebp) - 16539: 8b 45 ec mov 0xffffffec(%ebp),%eax - 1653c: 83 e8 28 sub $0x28,%eax - 1653f: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 16542: 83 ec 04 sub $0x4,%esp - 16545: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 16548: 25 ff ff 00 00 and $0xffff,%eax - 1654d: 50 push %eax - 1654e: 66 8b 45 fe mov 0xfffffffe(%ebp),%ax - 16552: 25 ff ff 00 00 and $0xffff,%eax - 16557: 50 push %eax - 16558: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 1655b: ff 70 24 pushl 0x24(%eax) - 1655e: e8 ef fe ff ff call 16452 <_match_device> - 16563: 83 c4 10 add $0x10,%esp - 16566: 89 45 f0 mov %eax,0xfffffff0(%ebp) - 16569: 83 7d f0 00 cmpl $0x0,0xfffffff0(%ebp) - 1656d: 74 02 je 16571 <_usb_find_device+0x6a> - 1656f: eb 0a jmp 1657b <_usb_find_device+0x74> - 16571: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 16574: 8b 00 mov (%eax),%eax - 16576: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 16579: eb af jmp 1652a <_usb_find_device+0x23> - 1657b: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 1657e: c9 leave - 1657f: c3 ret - -00016580 <_usb_get_current_frame_number>: - 16580: 55 push %ebp - 16581: 89 e5 mov %esp,%ebp - 16583: 83 ec 08 sub $0x8,%esp - 16586: 83 ec 0c sub $0xc,%esp - 16589: 8b 45 08 mov 0x8(%ebp),%eax - 1658c: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax - 16592: 8b 40 20 mov 0x20(%eax),%eax - 16595: ff 75 08 pushl 0x8(%ebp) - 16598: 8b 40 08 mov 0x8(%eax),%eax - 1659b: ff d0 call *%eax - 1659d: 83 c4 10 add $0x10,%esp - 165a0: c9 leave - 165a1: c3 ret - -000165a2 <___usb_get_extra_descriptor>: - 165a2: 55 push %ebp - 165a3: 89 e5 mov %esp,%ebp - 165a5: 83 ec 0c sub $0xc,%esp - 165a8: 8b 45 10 mov 0x10(%ebp),%eax - 165ab: 88 45 ff mov %al,0xffffffff(%ebp) - 165ae: 83 7d 0c 01 cmpl $0x1,0xc(%ebp) - 165b2: 76 51 jbe 16605 <___usb_get_extra_descriptor+0x63> - 165b4: 8b 45 08 mov 0x8(%ebp),%eax - 165b7: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 165ba: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 165bd: 80 38 01 cmpb $0x1,(%eax) - 165c0: 77 09 ja 165cb <___usb_get_extra_descriptor+0x29> - 165c2: c7 45 f4 ff ff ff ff movl $0xffffffff,0xfffffff4(%ebp) - 165c9: eb 41 jmp 1660c <___usb_get_extra_descriptor+0x6a> - 165cb: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 165ce: 8a 40 01 mov 0x1(%eax),%al - 165d1: 3a 45 ff cmp 0xffffffff(%ebp),%al - 165d4: 75 11 jne 165e7 <___usb_get_extra_descriptor+0x45> - 165d6: 8b 55 14 mov 0x14(%ebp),%edx - 165d9: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 165dc: 89 02 mov %eax,(%edx) - 165de: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) - 165e5: eb 25 jmp 1660c <___usb_get_extra_descriptor+0x6a> - 165e7: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 165ea: 8a 00 mov (%eax),%al - 165ec: 25 ff 00 00 00 and $0xff,%eax - 165f1: 01 45 08 add %eax,0x8(%ebp) - 165f4: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 165f7: ba 00 00 00 00 mov $0x0,%edx - 165fc: 8a 10 mov (%eax),%dl - 165fe: 8d 45 0c lea 0xc(%ebp),%eax - 16601: 29 10 sub %edx,(%eax) - 16603: eb a9 jmp 165ae <___usb_get_extra_descriptor+0xc> - 16605: c7 45 f4 ff ff ff ff movl $0xffffffff,0xfffffff4(%ebp) - 1660c: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 1660f: c9 leave - 16610: c3 ret - -00016611 <_usb_disconnect>: - 16611: 55 push %ebp - 16612: 89 e5 mov %esp,%ebp - 16614: 53 push %ebx - 16615: 83 ec 14 sub $0x14,%esp - 16618: 8b 45 08 mov 0x8(%ebp),%eax - 1661b: 8b 00 mov (%eax),%eax - 1661d: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 16620: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) - 16624: 75 05 jne 1662b <_usb_disconnect+0x1a> - 16626: e9 73 01 00 00 jmp 1679e <_usb_disconnect+0x18d> - 1662b: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 1662e: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax - 16634: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 16637: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) - 1663b: 75 05 jne 16642 <_usb_disconnect+0x31> - 1663d: e9 5c 01 00 00 jmp 1679e <_usb_disconnect+0x18d> - 16642: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 16645: 8b 40 20 mov 0x20(%eax),%eax - 16648: 89 45 f0 mov %eax,0xfffffff0(%ebp) - 1664b: 8b 45 08 mov 0x8(%ebp),%eax - 1664e: c7 00 00 00 00 00 movl $0x0,(%eax) - 16654: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 16657: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax) - 1665e: c7 45 ec 00 00 00 00 movl $0x0,0xffffffec(%ebp) - 16665: 83 7d ec 0f cmpl $0xf,0xffffffec(%ebp) - 16669: 7f 2e jg 16699 <_usb_disconnect+0x88> - 1666b: 8b 45 ec mov 0xffffffec(%ebp),%eax - 1666e: c1 e0 02 shl $0x2,%eax - 16671: 03 45 f8 add 0xfffffff8(%ebp),%eax - 16674: 05 b0 01 00 00 add $0x1b0,%eax - 16679: 89 45 e8 mov %eax,0xffffffe8(%ebp) - 1667c: 8b 45 e8 mov 0xffffffe8(%ebp),%eax - 1667f: 83 38 00 cmpl $0x0,(%eax) - 16682: 74 0e je 16692 <_usb_disconnect+0x81> - 16684: 83 ec 0c sub $0xc,%esp - 16687: ff 75 e8 pushl 0xffffffe8(%ebp) - 1668a: e8 82 ff ff ff call 16611 <_usb_disconnect> - 1668f: 83 c4 10 add $0x10,%esp - 16692: 8d 45 ec lea 0xffffffec(%ebp),%eax - 16695: ff 00 incl (%eax) - 16697: eb cc jmp 16665 <_usb_disconnect+0x54> - 16699: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 1669c: 83 b8 88 01 00 00 00 cmpl $0x0,0x188(%eax) - 166a3: 74 5f je 16704 <_usb_disconnect+0xf3> - 166a5: c7 45 ec 00 00 00 00 movl $0x0,0xffffffec(%ebp) - 166ac: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 166af: 8b 80 88 01 00 00 mov 0x188(%eax),%eax - 166b5: 8a 40 04 mov 0x4(%eax),%al - 166b8: 25 ff 00 00 00 and $0xff,%eax - 166bd: 3b 45 ec cmp 0xffffffec(%ebp),%eax - 166c0: 7e 42 jle 16704 <_usb_disconnect+0xf3> - 166c2: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 166c5: 8b 98 88 01 00 00 mov 0x188(%eax),%ebx - 166cb: 8b 4d ec mov 0xffffffec(%ebp),%ecx - 166ce: 89 c8 mov %ecx,%eax - 166d0: c1 e0 02 shl $0x2,%eax - 166d3: 01 c8 add %ecx,%eax - 166d5: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx - 166dc: 01 d0 add %edx,%eax - 166de: 01 c0 add %eax,%eax - 166e0: 01 c8 add %ecx,%eax - 166e2: c1 e0 02 shl $0x2,%eax - 166e5: 03 43 0c add 0xc(%ebx),%eax - 166e8: 89 45 e8 mov %eax,0xffffffe8(%ebp) - 166eb: 83 ec 0c sub $0xc,%esp - 166ee: 8b 45 e8 mov 0xffffffe8(%ebp),%eax - 166f1: 83 c0 18 add $0x18,%eax - 166f4: 50 push %eax - 166f5: e8 1d 31 00 00 call 19817 <_my_device_unregister> - 166fa: 83 c4 10 add $0x10,%esp - 166fd: 8d 45 ec lea 0xffffffec(%ebp),%eax - 16700: ff 00 incl (%eax) - 16702: eb a8 jmp 166ac <_usb_disconnect+0x9b> - 16704: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 16707: 83 78 1c 00 cmpl $0x0,0x1c(%eax) - 1670b: 74 42 je 1674f <_usb_disconnect+0x13e> - 1670d: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 16710: 8b 40 1c mov 0x1c(%eax),%eax - 16713: 89 45 e8 mov %eax,0xffffffe8(%ebp) - 16716: c7 45 ec 00 00 00 00 movl $0x0,0xffffffec(%ebp) - 1671d: 83 7d ec 0e cmpl $0xe,0xffffffec(%ebp) - 16721: 7f 2c jg 1674f <_usb_disconnect+0x13e> - 16723: 83 ec 08 sub $0x8,%esp - 16726: ff 75 ec pushl 0xffffffec(%ebp) - 16729: ff 75 f8 pushl 0xfffffff8(%ebp) - 1672c: 8b 45 e8 mov 0xffffffe8(%ebp),%eax - 1672f: ff d0 call *%eax - 16731: 83 c4 10 add $0x10,%esp - 16734: 83 ec 08 sub $0x8,%esp - 16737: 8b 45 ec mov 0xffffffec(%ebp),%eax - 1673a: 0c 80 or $0x80,%al - 1673c: 50 push %eax - 1673d: ff 75 f8 pushl 0xfffffff8(%ebp) - 16740: 8b 45 e8 mov 0xffffffe8(%ebp),%eax - 16743: ff d0 call *%eax - 16745: 83 c4 10 add $0x10,%esp - 16748: 8d 45 ec lea 0xffffffec(%ebp),%eax - 1674b: ff 00 incl (%eax) - 1674d: eb ce jmp 1671d <_usb_disconnect+0x10c> - 1674f: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 16752: 83 38 00 cmpl $0x0,(%eax) - 16755: 7e 2b jle 16782 <_usb_disconnect+0x171> - 16757: 83 ec 08 sub $0x8,%esp - 1675a: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 1675d: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax - 16763: 83 c0 10 add $0x10,%eax - 16766: 50 push %eax - 16767: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 1676a: ff 30 pushl (%eax) - 1676c: e8 37 00 00 00 call 167a8 <_clear_bit> - 16771: 83 c4 10 add $0x10,%esp - 16774: 83 ec 0c sub $0xc,%esp - 16777: ff 75 f8 pushl 0xfffffff8(%ebp) - 1677a: e8 24 00 00 00 call 167a3 <_usbfs_remove_device> - 1677f: 83 c4 10 add $0x10,%esp - 16782: 83 ec 0c sub $0xc,%esp - 16785: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 16788: 05 c0 00 00 00 add $0xc0,%eax - 1678d: 50 push %eax - 1678e: e8 84 30 00 00 call 19817 <_my_device_unregister> - 16793: 83 c4 10 add $0x10,%esp - 16796: ff 75 f8 pushl 0xfffffff8(%ebp) - 16799: e8 1d fc ff ff call 163bb <_usb_put_dev@4> - 1679e: 8b 5d fc mov 0xfffffffc(%ebp),%ebx - 167a1: c9 leave - 167a2: c3 ret - -000167a3 <_usbfs_remove_device>: - 167a3: 55 push %ebp - 167a4: 89 e5 mov %esp,%ebp - 167a6: 5d pop %ebp - 167a7: c3 ret - -000167a8 <_clear_bit>: - 167a8: 55 push %ebp - 167a9: 89 e5 mov %esp,%ebp - 167ab: 8b 55 0c mov 0xc(%ebp),%edx - 167ae: 8b 45 08 mov 0x8(%ebp),%eax - 167b1: 0f b3 02 btr %eax,(%edx) - 167b4: 5d pop %ebp - 167b5: c3 ret - -000167b6 <_usb_connect@4>: - 167b6: 55 push %ebp - 167b7: 89 e5 mov %esp,%ebp - 167b9: 83 ec 18 sub $0x18,%esp - 167bc: 8b 45 08 mov 0x8(%ebp),%eax - 167bf: c6 80 77 01 00 00 08 movb $0x8,0x177(%eax) - 167c6: 83 ec 04 sub $0x4,%esp - 167c9: 8b 45 08 mov 0x8(%ebp),%eax - 167cc: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax - 167d2: ff 70 0c pushl 0xc(%eax) - 167d5: 68 80 00 00 00 push $0x80 - 167da: 8b 45 08 mov 0x8(%ebp),%eax - 167dd: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax - 167e3: 83 c0 10 add $0x10,%eax - 167e6: 50 push %eax - 167e7: e8 94 00 00 00 call 16880 <_find_next_zero_bit> - 167ec: 83 c4 10 add $0x10,%esp - 167ef: 89 45 fc mov %eax,0xfffffffc(%ebp) - 167f2: 83 7d fc 7f cmpl $0x7f,0xfffffffc(%ebp) - 167f6: 7e 22 jle 1681a <_usb_connect@4+0x64> - 167f8: 83 ec 04 sub $0x4,%esp - 167fb: 6a 01 push $0x1 - 167fd: 68 80 00 00 00 push $0x80 - 16802: 8b 45 08 mov 0x8(%ebp),%eax - 16805: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax - 1680b: 83 c0 10 add $0x10,%eax - 1680e: 50 push %eax - 1680f: e8 6c 00 00 00 call 16880 <_find_next_zero_bit> - 16814: 83 c4 10 add $0x10,%esp - 16817: 89 45 fc mov %eax,0xfffffffc(%ebp) - 1681a: 8b 45 08 mov 0x8(%ebp),%eax - 1681d: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax - 16823: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 16826: 83 7d fc 7e cmpl $0x7e,0xfffffffc(%ebp) - 1682a: 7f 09 jg 16835 <_usb_connect@4+0x7f> - 1682c: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 1682f: 40 inc %eax - 16830: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 16833: eb 07 jmp 1683c <_usb_connect@4+0x86> - 16835: c7 45 f4 01 00 00 00 movl $0x1,0xfffffff4(%ebp) - 1683c: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 1683f: 8b 55 f8 mov 0xfffffff8(%ebp),%edx - 16842: 89 42 0c mov %eax,0xc(%edx) - 16845: 83 7d fc 7f cmpl $0x7f,0xfffffffc(%ebp) - 16849: 7f 23 jg 1686e <_usb_connect@4+0xb8> - 1684b: 83 ec 08 sub $0x8,%esp - 1684e: 8b 45 08 mov 0x8(%ebp),%eax - 16851: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax - 16857: 83 c0 10 add $0x10,%eax - 1685a: 50 push %eax - 1685b: ff 75 fc pushl 0xfffffffc(%ebp) - 1685e: e8 0f 00 00 00 call 16872 <_set_bit> - 16863: 83 c4 10 add $0x10,%esp - 16866: 8b 55 08 mov 0x8(%ebp),%edx - 16869: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 1686c: 89 02 mov %eax,(%edx) - 1686e: c9 leave - 1686f: c2 04 00 ret $0x4 - -00016872 <_set_bit>: - 16872: 55 push %ebp - 16873: 89 e5 mov %esp,%ebp - 16875: 8b 55 0c mov 0xc(%ebp),%edx - 16878: 8b 45 08 mov 0x8(%ebp),%eax - 1687b: 0f ab 02 bts %eax,(%edx) - 1687e: 5d pop %ebp - 1687f: c3 ret - -00016880 <_find_next_zero_bit>: - 16880: 55 push %ebp - 16881: 89 e5 mov %esp,%ebp - 16883: 83 ec 18 sub $0x18,%esp - 16886: 8b 45 10 mov 0x10(%ebp),%eax - 16889: c1 f8 05 sar $0x5,%eax - 1688c: c1 e0 02 shl $0x2,%eax - 1688f: 03 45 08 add 0x8(%ebp),%eax - 16892: 89 45 fc mov %eax,0xfffffffc(%ebp) - 16895: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) - 1689c: 8b 45 10 mov 0x10(%ebp),%eax - 1689f: 83 e0 1f and $0x1f,%eax - 168a2: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 168a5: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) - 168a9: 74 42 je 168ed <_find_next_zero_bit+0x6d> - 168ab: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 168ae: 8b 4d f4 mov 0xfffffff4(%ebp),%ecx - 168b1: 8b 00 mov (%eax),%eax - 168b3: d3 e8 shr %cl,%eax - 168b5: f7 d0 not %eax - 168b7: 0f bc c0 bsf %eax,%eax - 168ba: 75 05 jne 168c1 <_find_next_zero_bit+0x41> - 168bc: b8 20 00 00 00 mov $0x20,%eax - 168c1: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 168c4: b8 20 00 00 00 mov $0x20,%eax - 168c9: 2b 45 f4 sub 0xfffffff4(%ebp),%eax - 168cc: 3b 45 f8 cmp 0xfffffff8(%ebp),%eax - 168cf: 7e 0b jle 168dc <_find_next_zero_bit+0x5c> - 168d1: 8b 45 10 mov 0x10(%ebp),%eax - 168d4: 03 45 f8 add 0xfffffff8(%ebp),%eax - 168d7: 89 45 ec mov %eax,0xffffffec(%ebp) - 168da: eb 43 jmp 1691f <_find_next_zero_bit+0x9f> - 168dc: b8 20 00 00 00 mov $0x20,%eax - 168e1: 2b 45 f4 sub 0xfffffff4(%ebp),%eax - 168e4: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 168e7: 8d 45 fc lea 0xfffffffc(%ebp),%eax - 168ea: 83 00 04 addl $0x4,(%eax) - 168ed: 83 ec 08 sub $0x8,%esp - 168f0: 8b 55 08 mov 0x8(%ebp),%edx - 168f3: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 168f6: 29 d0 sub %edx,%eax - 168f8: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx - 168ff: 8b 45 0c mov 0xc(%ebp),%eax - 16902: 29 d0 sub %edx,%eax - 16904: 50 push %eax - 16905: ff 75 fc pushl 0xfffffffc(%ebp) - 16908: e8 17 00 00 00 call 16924 <_find_first_zero_bit> - 1690d: 83 c4 10 add $0x10,%esp - 16910: 89 45 f0 mov %eax,0xfffffff0(%ebp) - 16913: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 16916: 03 45 10 add 0x10(%ebp),%eax - 16919: 03 45 f0 add 0xfffffff0(%ebp),%eax - 1691c: 89 45 ec mov %eax,0xffffffec(%ebp) - 1691f: 8b 45 ec mov 0xffffffec(%ebp),%eax - 16922: c9 leave - 16923: c3 ret - -00016924 <_find_first_zero_bit>: - 16924: 55 push %ebp - 16925: 89 e5 mov %esp,%ebp - 16927: 57 push %edi - 16928: 53 push %ebx - 16929: 83 ec 14 sub $0x14,%esp - 1692c: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) - 16930: 75 09 jne 1693b <_find_first_zero_bit+0x17> - 16932: c7 45 e4 00 00 00 00 movl $0x0,0xffffffe4(%ebp) - 16939: eb 48 jmp 16983 <_find_first_zero_bit+0x5f> - 1693b: 8b 45 0c mov 0xc(%ebp),%eax - 1693e: 83 c0 1f add $0x1f,%eax - 16941: 89 c1 mov %eax,%ecx - 16943: c1 e9 05 shr $0x5,%ecx - 16946: 8b 7d 08 mov 0x8(%ebp),%edi - 16949: 8b 5d 08 mov 0x8(%ebp),%ebx - 1694c: b8 ff ff ff ff mov $0xffffffff,%eax - 16951: 31 d2 xor %edx,%edx - 16953: f3 af repz scas %es:(%edi),%eax - 16955: 74 09 je 16960 <_find_first_zero_bit+0x3c> - 16957: 33 47 fc xor 0xfffffffc(%edi),%eax - 1695a: 83 ef 04 sub $0x4,%edi - 1695d: 0f bc d0 bsf %eax,%edx - 16960: 29 df sub %ebx,%edi - 16962: c1 e7 03 shl $0x3,%edi - 16965: 01 fa add %edi,%edx - 16967: 89 c3 mov %eax,%ebx - 16969: 89 d0 mov %edx,%eax - 1696b: 89 45 e8 mov %eax,0xffffffe8(%ebp) - 1696e: 89 c8 mov %ecx,%eax - 16970: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 16973: 89 f8 mov %edi,%eax - 16975: 89 45 f0 mov %eax,0xfffffff0(%ebp) - 16978: 89 d8 mov %ebx,%eax - 1697a: 89 45 ec mov %eax,0xffffffec(%ebp) - 1697d: 8b 45 e8 mov 0xffffffe8(%ebp),%eax - 16980: 89 45 e4 mov %eax,0xffffffe4(%ebp) - 16983: 8b 45 e4 mov 0xffffffe4(%ebp),%eax - 16986: 83 c4 14 add $0x14,%esp - 16989: 5b pop %ebx - 1698a: 5f pop %edi - 1698b: 5d pop %ebp - 1698c: c3 ret - -0001698d <_usb_set_address>: - 1698d: 55 push %ebp - 1698e: 89 e5 mov %esp,%ebp - 16990: 83 ec 08 sub $0x8,%esp - 16993: 8b 45 08 mov 0x8(%ebp),%eax - 16996: 83 38 00 cmpl $0x0,(%eax) - 16999: 75 09 jne 169a4 <_usb_set_address+0x17> - 1699b: c7 45 f8 ea ff ff ff movl $0xffffffea,0xfffffff8(%ebp) - 169a2: eb 61 jmp 16a05 <_usb_set_address+0x78> - 169a4: 8b 45 08 mov 0x8(%ebp),%eax - 169a7: 83 78 14 03 cmpl $0x3,0x14(%eax) - 169ab: 74 12 je 169bf <_usb_set_address+0x32> - 169ad: 8b 45 08 mov 0x8(%ebp),%eax - 169b0: 83 78 14 04 cmpl $0x4,0x14(%eax) - 169b4: 74 09 je 169bf <_usb_set_address+0x32> - 169b6: c7 45 f8 ea ff ff ff movl $0xffffffea,0xfffffff8(%ebp) - 169bd: eb 46 jmp 16a05 <_usb_set_address+0x78> - 169bf: 83 ec 0c sub $0xc,%esp - 169c2: 68 f4 01 00 00 push $0x1f4 - 169c7: 6a 00 push $0x0 - 169c9: 6a 00 push $0x0 - 169cb: 6a 00 push $0x0 - 169cd: 8b 45 08 mov 0x8(%ebp),%eax - 169d0: 8b 00 mov (%eax),%eax - 169d2: 25 ff ff 00 00 and $0xffff,%eax - 169d7: 50 push %eax - 169d8: 6a 00 push $0x0 - 169da: 6a 05 push $0x5 - 169dc: 68 00 00 00 80 push $0x80000000 - 169e1: ff 75 08 pushl 0x8(%ebp) - 169e4: e8 07 a8 ff ff call 111f0 <_usb_control_msg> - 169e9: 83 c4 30 add $0x30,%esp - 169ec: 89 45 fc mov %eax,0xfffffffc(%ebp) - 169ef: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) - 169f3: 75 0a jne 169ff <_usb_set_address+0x72> - 169f5: 8b 45 08 mov 0x8(%ebp),%eax - 169f8: c7 40 14 04 00 00 00 movl $0x4,0x14(%eax) - 169ff: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 16a02: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 16a05: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 16a08: c9 leave - 16a09: c3 ret - -00016a0a <_set_device_description>: - 16a0a: 55 push %ebp - 16a0b: 89 e5 mov %esp,%ebp - 16a0d: 83 ec 28 sub $0x28,%esp - 16a10: 8b 45 08 mov 0x8(%ebp),%eax - 16a13: 8a 80 7e 01 00 00 mov 0x17e(%eax),%al - 16a19: 25 ff 00 00 00 and $0xff,%eax - 16a1e: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 16a21: 8b 45 08 mov 0x8(%ebp),%eax - 16a24: 8a 80 7f 01 00 00 mov 0x17f(%eax),%al - 16a2a: 25 ff 00 00 00 and $0xff,%eax - 16a2f: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 16a32: 8b 45 08 mov 0x8(%ebp),%eax - 16a35: 66 8b 80 78 01 00 00 mov 0x178(%eax),%ax - 16a3c: 25 ff ff 00 00 and $0xffff,%eax - 16a41: 89 45 f0 mov %eax,0xfffffff0(%ebp) - 16a44: 8b 45 08 mov 0x8(%ebp),%eax - 16a47: 66 8b 80 7a 01 00 00 mov 0x17a(%eax),%ax - 16a4e: 25 ff ff 00 00 and $0xffff,%eax - 16a53: 89 45 ec mov %eax,0xffffffec(%ebp) - 16a56: ff 75 ec pushl 0xffffffec(%ebp) - 16a59: ff 75 f0 pushl 0xfffffff0(%ebp) - 16a5c: 68 4c b2 01 00 push $0x1b24c - 16a61: 8b 45 08 mov 0x8(%ebp),%eax - 16a64: 05 c0 00 00 00 add $0xc0,%eax - 16a69: 50 push %eax - 16a6a: e8 21 30 00 00 call 19a90 <_sprintf> - 16a6f: 83 c4 10 add $0x10,%esp - 16a72: 83 ec 08 sub $0x8,%esp - 16a75: 68 00 02 00 00 push $0x200 - 16a7a: 6a 01 push $0x1 - 16a7c: e8 af 2f 00 00 call 19a30 <_ExAllocatePool@8> - 16a81: 83 c4 08 add $0x8,%esp - 16a84: 89 45 fc mov %eax,0xfffffffc(%ebp) - 16a87: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) - 16a8b: 75 05 jne 16a92 <_set_device_description+0x88> - 16a8d: e9 ff 00 00 00 jmp 16b91 <_set_device_description+0x187> - 16a92: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 16a95: 89 45 e4 mov %eax,0xffffffe4(%ebp) - 16a98: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 16a9b: 05 00 01 00 00 add $0x100,%eax - 16aa0: 89 45 e8 mov %eax,0xffffffe8(%ebp) - 16aa3: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) - 16aa7: 74 1c je 16ac5 <_set_device_description+0xbb> - 16aa9: 68 00 01 00 00 push $0x100 - 16aae: ff 75 e4 pushl 0xffffffe4(%ebp) - 16ab1: ff 75 f4 pushl 0xfffffff4(%ebp) - 16ab4: ff 75 08 pushl 0x8(%ebp) - 16ab7: e8 27 b1 ff ff call 11be3 <_usb_string> - 16abc: 83 c4 10 add $0x10,%esp - 16abf: 85 c0 test %eax,%eax - 16ac1: 7e 02 jle 16ac5 <_set_device_description+0xbb> - 16ac3: eb 07 jmp 16acc <_set_device_description+0xc2> - 16ac5: c7 45 e4 00 00 00 00 movl $0x0,0xffffffe4(%ebp) - 16acc: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) - 16ad0: 74 1c je 16aee <_set_device_description+0xe4> - 16ad2: 68 00 01 00 00 push $0x100 - 16ad7: ff 75 e8 pushl 0xffffffe8(%ebp) - 16ada: ff 75 f8 pushl 0xfffffff8(%ebp) - 16add: ff 75 08 pushl 0x8(%ebp) - 16ae0: e8 fe b0 ff ff call 11be3 <_usb_string> - 16ae5: 83 c4 10 add $0x10,%esp - 16ae8: 85 c0 test %eax,%eax - 16aea: 7e 02 jle 16aee <_set_device_description+0xe4> - 16aec: eb 07 jmp 16af5 <_set_device_description+0xeb> - 16aee: c7 45 e8 00 00 00 00 movl $0x0,0xffffffe8(%ebp) - 16af5: 83 7d e4 00 cmpl $0x0,0xffffffe4(%ebp) - 16af9: 74 2c je 16b27 <_set_device_description+0x11d> - 16afb: 83 7d e8 00 cmpl $0x0,0xffffffe8(%ebp) - 16aff: 74 26 je 16b27 <_set_device_description+0x11d> - 16b01: 83 ec 0c sub $0xc,%esp - 16b04: ff 75 e8 pushl 0xffffffe8(%ebp) - 16b07: ff 75 e4 pushl 0xffffffe4(%ebp) - 16b0a: 68 61 b2 01 00 push $0x1b261 - 16b0f: 68 80 00 00 00 push $0x80 - 16b14: 8b 45 08 mov 0x8(%ebp),%eax - 16b17: 05 c0 00 00 00 add $0xc0,%eax - 16b1c: 50 push %eax - 16b1d: e8 9e 2f 00 00 call 19ac0 <__snprintf> - 16b22: 83 c4 20 add $0x20,%esp - 16b25: eb 5c jmp 16b83 <_set_device_description+0x179> - 16b27: 83 7d e4 00 cmpl $0x0,0xffffffe4(%ebp) - 16b2b: 74 29 je 16b56 <_set_device_description+0x14c> - 16b2d: 83 ec 08 sub $0x8,%esp - 16b30: ff 75 ec pushl 0xffffffec(%ebp) - 16b33: ff 75 f0 pushl 0xfffffff0(%ebp) - 16b36: ff 75 e4 pushl 0xffffffe4(%ebp) - 16b39: 68 69 b2 01 00 push $0x1b269 - 16b3e: 68 80 00 00 00 push $0x80 - 16b43: 8b 45 08 mov 0x8(%ebp),%eax - 16b46: 05 c0 00 00 00 add $0xc0,%eax - 16b4b: 50 push %eax - 16b4c: e8 6f 2f 00 00 call 19ac0 <__snprintf> - 16b51: 83 c4 20 add $0x20,%esp - 16b54: eb 2d jmp 16b83 <_set_device_description+0x179> - 16b56: 83 7d e8 00 cmpl $0x0,0xffffffe8(%ebp) - 16b5a: 74 27 je 16b83 <_set_device_description+0x179> - 16b5c: 83 ec 08 sub $0x8,%esp - 16b5f: ff 75 e8 pushl 0xffffffe8(%ebp) - 16b62: ff 75 ec pushl 0xffffffec(%ebp) - 16b65: ff 75 f0 pushl 0xfffffff0(%ebp) - 16b68: 68 83 b2 01 00 push $0x1b283 - 16b6d: 68 80 00 00 00 push $0x80 - 16b72: 8b 45 08 mov 0x8(%ebp),%eax - 16b75: 05 c0 00 00 00 add $0xc0,%eax - 16b7a: 50 push %eax - 16b7b: e8 40 2f 00 00 call 19ac0 <__snprintf> - 16b80: 83 c4 20 add $0x20,%esp - 16b83: 83 ec 0c sub $0xc,%esp - 16b86: ff 75 fc pushl 0xfffffffc(%ebp) - 16b89: e8 b2 2e 00 00 call 19a40 <_ExFreePool@4> - 16b8e: 83 c4 0c add $0xc,%esp - 16b91: c9 leave - 16b92: c3 ret - -00016b93 <_usb_new_device>: - 16b93: 55 push %ebp - 16b94: 89 e5 mov %esp,%ebp - 16b96: 53 push %ebx - 16b97: 83 ec 24 sub $0x24,%esp - 16b9a: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) - 16ba1: c7 05 e4 a0 01 00 f8 movl $0x1a0f8,0x1a0e4 - 16ba8: a0 01 00 - 16bab: 8b 55 08 mov 0x8(%ebp),%edx - 16bae: 8b 45 0c mov 0xc(%ebp),%eax - 16bb1: 89 82 60 01 00 00 mov %eax,0x160(%edx) - 16bb7: 8b 45 08 mov 0x8(%ebp),%eax - 16bba: c7 80 58 01 00 00 e0 movl $0x1a0e0,0x158(%eax) - 16bc1: a0 01 00 - 16bc4: 8b 45 08 mov 0x8(%ebp),%eax - 16bc7: c7 80 40 01 00 00 f8 movl $0x1a0f8,0x140(%eax) - 16bce: a0 01 00 - 16bd1: 8b 45 08 mov 0x8(%ebp),%eax - 16bd4: c7 80 6c 01 00 00 c2 movl $0x163c2,0x16c(%eax) - 16bdb: 63 01 00 - 16bde: 8b 45 08 mov 0x8(%ebp),%eax - 16be1: c7 80 5c 01 00 00 70 movl $0x1c070,0x15c(%eax) - 16be8: c0 01 00 - 16beb: 83 ec 0c sub $0xc,%esp - 16bee: ff 75 08 pushl 0x8(%ebp) - 16bf1: e8 74 f7 ff ff call 1636a <_usb_get_dev> - 16bf6: 83 c4 10 add $0x10,%esp - 16bf9: 8b 45 08 mov 0x8(%ebp),%eax - 16bfc: 80 b8 48 01 00 00 00 cmpb $0x0,0x148(%eax) - 16c03: 75 29 jne 16c2e <_usb_new_device+0x9b> - 16c05: 8b 45 08 mov 0x8(%ebp),%eax - 16c08: 83 c0 04 add $0x4,%eax - 16c0b: 50 push %eax - 16c0c: 8b 45 08 mov 0x8(%ebp),%eax - 16c0f: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax - 16c15: ff 70 04 pushl 0x4(%eax) - 16c18: 68 9d b2 01 00 push $0x1b29d - 16c1d: 8b 45 08 mov 0x8(%ebp),%eax - 16c20: 05 48 01 00 00 add $0x148,%eax - 16c25: 50 push %eax - 16c26: e8 65 2e 00 00 call 19a90 <_sprintf> - 16c2b: 83 c4 10 add $0x10,%esp - 16c2e: 8b 55 08 mov 0x8(%ebp),%edx - 16c31: 8b 45 0c mov 0xc(%ebp),%eax - 16c34: 8b 80 84 00 00 00 mov 0x84(%eax),%eax - 16c3a: 89 82 44 01 00 00 mov %eax,0x144(%edx) - 16c40: 8b 45 08 mov 0x8(%ebp),%eax - 16c43: 8b 40 18 mov 0x18(%eax),%eax - 16c46: 89 45 e0 mov %eax,0xffffffe0(%ebp) - 16c49: 83 7d e0 01 cmpl $0x1,0xffffffe0(%ebp) - 16c4d: 72 20 jb 16c6f <_usb_new_device+0xdc> - 16c4f: 83 7d e0 02 cmpl $0x2,0xffffffe0(%ebp) - 16c53: 76 11 jbe 16c66 <_usb_new_device+0xd3> - 16c55: 83 7d e0 03 cmpl $0x3,0xffffffe0(%ebp) - 16c59: 74 02 je 16c5d <_usb_new_device+0xca> - 16c5b: eb 12 jmp 16c6f <_usb_new_device+0xdc> - 16c5d: c7 45 f4 40 00 00 00 movl $0x40,0xfffffff4(%ebp) - 16c64: eb 15 jmp 16c7b <_usb_new_device+0xe8> - 16c66: c7 45 f4 08 00 00 00 movl $0x8,0xfffffff4(%ebp) - 16c6d: eb 0c jmp 16c7b <_usb_new_device+0xe8> - 16c6f: c7 45 e4 ea ff ff ff movl $0xffffffea,0xffffffe4(%ebp) - 16c76: e9 da 03 00 00 jmp 17055 <_usb_new_device+0x4c2> - 16c7b: 8b 55 08 mov 0x8(%ebp),%edx - 16c7e: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 16c81: 89 42 38 mov %eax,0x38(%edx) - 16c84: 8b 55 08 mov 0x8(%ebp),%edx - 16c87: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 16c8a: 89 42 78 mov %eax,0x78(%edx) - 16c8d: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) - 16c94: 83 7d f4 01 cmpl $0x1,0xfffffff4(%ebp) - 16c98: 0f 8f c8 00 00 00 jg 16d66 <_usb_new_device+0x1d3> - 16c9e: c7 45 f0 00 00 00 00 movl $0x0,0xfffffff0(%ebp) - 16ca5: 83 7d f0 01 cmpl $0x1,0xfffffff0(%ebp) - 16ca9: 7f 30 jg 16cdb <_usb_new_device+0x148> - 16cab: 83 ec 0c sub $0xc,%esp - 16cae: ff 75 08 pushl 0x8(%ebp) - 16cb1: e8 d7 fc ff ff call 1698d <_usb_set_address> - 16cb6: 83 c4 10 add $0x10,%esp - 16cb9: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 16cbc: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) - 16cc0: 78 02 js 16cc4 <_usb_new_device+0x131> - 16cc2: eb 17 jmp 16cdb <_usb_new_device+0x148> - 16cc4: 83 ec 0c sub $0xc,%esp - 16cc7: 68 c8 00 00 00 push $0xc8 - 16ccc: e8 df 27 00 00 call 194b0 <_wait_ms> - 16cd1: 83 c4 10 add $0x10,%esp - 16cd4: 8d 45 f0 lea 0xfffffff0(%ebp),%eax - 16cd7: ff 00 incl (%eax) - 16cd9: eb ca jmp 16ca5 <_usb_new_device+0x112> - 16cdb: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) - 16cdf: 79 39 jns 16d1a <_usb_new_device+0x187> - 16ce1: 8b 45 08 mov 0x8(%ebp),%eax - 16ce4: c7 40 14 03 00 00 00 movl $0x3,0x14(%eax) - 16ceb: 8b 45 08 mov 0x8(%ebp),%eax - 16cee: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax - 16cf4: 83 c0 10 add $0x10,%eax - 16cf7: 50 push %eax - 16cf8: 8b 45 08 mov 0x8(%ebp),%eax - 16cfb: ff 30 pushl (%eax) - 16cfd: e8 a6 fa ff ff call 167a8 <_clear_bit> - 16d02: 83 c4 08 add $0x8,%esp - 16d05: 8b 45 08 mov 0x8(%ebp),%eax - 16d08: c7 00 ff ff ff ff movl $0xffffffff,(%eax) - 16d0e: c7 45 e4 01 00 00 00 movl $0x1,0xffffffe4(%ebp) - 16d15: e9 3b 03 00 00 jmp 17055 <_usb_new_device+0x4c2> - 16d1a: 83 ec 0c sub $0xc,%esp - 16d1d: 6a 0a push $0xa - 16d1f: e8 8c 27 00 00 call 194b0 <_wait_ms> - 16d24: 83 c4 10 add $0x10,%esp - 16d27: 83 ec 0c sub $0xc,%esp - 16d2a: 6a 08 push $0x8 - 16d2c: 8b 45 08 mov 0x8(%ebp),%eax - 16d2f: 05 70 01 00 00 add $0x170,%eax - 16d34: 50 push %eax - 16d35: 6a 00 push $0x0 - 16d37: 6a 01 push $0x1 - 16d39: ff 75 08 pushl 0x8(%ebp) - 16d3c: e8 1b a6 ff ff call 1135c <_usb_get_descriptor> - 16d41: 83 c4 20 add $0x20,%esp - 16d44: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 16d47: 83 7d f8 07 cmpl $0x7,0xfffffff8(%ebp) - 16d4b: 7e 02 jle 16d4f <_usb_new_device+0x1bc> - 16d4d: eb 17 jmp 16d66 <_usb_new_device+0x1d3> - 16d4f: 83 ec 0c sub $0xc,%esp - 16d52: 6a 64 push $0x64 - 16d54: e8 57 27 00 00 call 194b0 <_wait_ms> - 16d59: 83 c4 10 add $0x10,%esp - 16d5c: 8d 45 f4 lea 0xfffffff4(%ebp),%eax - 16d5f: ff 00 incl (%eax) - 16d61: e9 2e ff ff ff jmp 16c94 <_usb_new_device+0x101> - 16d66: 83 7d f8 07 cmpl $0x7,0xfffffff8(%ebp) - 16d6a: 7f 2f jg 16d9b <_usb_new_device+0x208> - 16d6c: 8b 45 08 mov 0x8(%ebp),%eax - 16d6f: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax - 16d75: 83 c0 10 add $0x10,%eax - 16d78: 50 push %eax - 16d79: 8b 45 08 mov 0x8(%ebp),%eax - 16d7c: ff 30 pushl (%eax) - 16d7e: e8 25 fa ff ff call 167a8 <_clear_bit> - 16d83: 83 c4 08 add $0x8,%esp - 16d86: 8b 45 08 mov 0x8(%ebp),%eax - 16d89: c7 00 ff ff ff ff movl $0xffffffff,(%eax) - 16d8f: c7 45 e4 01 00 00 00 movl $0x1,0xffffffe4(%ebp) - 16d96: e9 ba 02 00 00 jmp 17055 <_usb_new_device+0x4c2> - 16d9b: 8b 45 08 mov 0x8(%ebp),%eax - 16d9e: 83 78 18 02 cmpl $0x2,0x18(%eax) - 16da2: 75 28 jne 16dcc <_usb_new_device+0x239> - 16da4: 8b 55 08 mov 0x8(%ebp),%edx - 16da7: 8b 45 08 mov 0x8(%ebp),%eax - 16daa: 8a 80 77 01 00 00 mov 0x177(%eax),%al - 16db0: 25 ff 00 00 00 and $0xff,%eax - 16db5: 89 42 38 mov %eax,0x38(%edx) - 16db8: 8b 55 08 mov 0x8(%ebp),%edx - 16dbb: 8b 45 08 mov 0x8(%ebp),%eax - 16dbe: 8a 80 77 01 00 00 mov 0x177(%eax),%al - 16dc4: 25 ff 00 00 00 and $0xff,%eax - 16dc9: 89 42 78 mov %eax,0x78(%edx) - 16dcc: 83 ec 0c sub $0xc,%esp - 16dcf: ff 75 08 pushl 0x8(%ebp) - 16dd2: e8 aa a6 ff ff call 11481 <_usb_get_device_descriptor> - 16dd7: 83 c4 10 add $0x10,%esp - 16dda: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 16ddd: 83 7d f8 11 cmpl $0x11,0xfffffff8(%ebp) - 16de1: 7f 2f jg 16e12 <_usb_new_device+0x27f> - 16de3: 8b 45 08 mov 0x8(%ebp),%eax - 16de6: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax - 16dec: 83 c0 10 add $0x10,%eax - 16def: 50 push %eax - 16df0: 8b 45 08 mov 0x8(%ebp),%eax - 16df3: ff 30 pushl (%eax) - 16df5: e8 ae f9 ff ff call 167a8 <_clear_bit> - 16dfa: 83 c4 08 add $0x8,%esp - 16dfd: 8b 45 08 mov 0x8(%ebp),%eax - 16e00: c7 00 ff ff ff ff movl $0xffffffff,(%eax) - 16e06: c7 45 e4 01 00 00 00 movl $0x1,0xffffffe4(%ebp) - 16e0d: e9 43 02 00 00 jmp 17055 <_usb_new_device+0x4c2> - 16e12: 83 ec 0c sub $0xc,%esp - 16e15: ff 75 08 pushl 0x8(%ebp) - 16e18: e8 fb 0f 00 00 call 17e18 <_usb_get_configuration> - 16e1d: 83 c4 10 add $0x10,%esp - 16e20: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 16e23: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) - 16e27: 79 2f jns 16e58 <_usb_new_device+0x2c5> - 16e29: 8b 45 08 mov 0x8(%ebp),%eax - 16e2c: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax - 16e32: 83 c0 10 add $0x10,%eax - 16e35: 50 push %eax - 16e36: 8b 45 08 mov 0x8(%ebp),%eax - 16e39: ff 30 pushl (%eax) - 16e3b: e8 68 f9 ff ff call 167a8 <_clear_bit> - 16e40: 83 c4 08 add $0x8,%esp - 16e43: 8b 45 08 mov 0x8(%ebp),%eax - 16e46: c7 00 ff ff ff ff movl $0xffffffff,(%eax) - 16e4c: c7 45 e4 01 00 00 00 movl $0x1,0xffffffe4(%ebp) - 16e53: e9 fd 01 00 00 jmp 17055 <_usb_new_device+0x4c2> - 16e58: 83 ec 08 sub $0x8,%esp - 16e5b: 8b 45 08 mov 0x8(%ebp),%eax - 16e5e: 8b 80 84 01 00 00 mov 0x184(%eax),%eax - 16e64: 8a 40 05 mov 0x5(%eax),%al - 16e67: 25 ff 00 00 00 and $0xff,%eax - 16e6c: 50 push %eax - 16e6d: ff 75 08 pushl 0x8(%ebp) - 16e70: e8 d2 ab ff ff call 11a47 <_usb_set_configuration> - 16e75: 83 c4 10 add $0x10,%esp - 16e78: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 16e7b: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) - 16e7f: 74 2f je 16eb0 <_usb_new_device+0x31d> - 16e81: 8b 45 08 mov 0x8(%ebp),%eax - 16e84: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax - 16e8a: 83 c0 10 add $0x10,%eax - 16e8d: 50 push %eax - 16e8e: 8b 45 08 mov 0x8(%ebp),%eax - 16e91: ff 30 pushl (%eax) - 16e93: e8 10 f9 ff ff call 167a8 <_clear_bit> - 16e98: 83 c4 08 add $0x8,%esp - 16e9b: 8b 45 08 mov 0x8(%ebp),%eax - 16e9e: c7 00 ff ff ff ff movl $0xffffffff,(%eax) - 16ea4: c7 45 e4 01 00 00 00 movl $0x1,0xffffffe4(%ebp) - 16eab: e9 a5 01 00 00 jmp 17055 <_usb_new_device+0x4c2> - 16eb0: 83 ec 0c sub $0xc,%esp - 16eb3: ff 75 08 pushl 0x8(%ebp) - 16eb6: e8 4f fb ff ff call 16a0a <_set_device_description> - 16ebb: 83 c4 10 add $0x10,%esp - 16ebe: 83 ec 0c sub $0xc,%esp - 16ec1: 8b 45 08 mov 0x8(%ebp),%eax - 16ec4: 05 c0 00 00 00 add $0xc0,%eax - 16ec9: 50 push %eax - 16eca: e8 3b 28 00 00 call 1970a <_my_device_add> - 16ecf: 83 c4 10 add $0x10,%esp - 16ed2: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 16ed5: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) - 16ed9: 74 0b je 16ee6 <_usb_new_device+0x353> - 16edb: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 16ede: 89 45 e4 mov %eax,0xffffffe4(%ebp) - 16ee1: e9 6f 01 00 00 jmp 17055 <_usb_new_device+0x4c2> - 16ee6: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) - 16eed: 8b 45 08 mov 0x8(%ebp),%eax - 16ef0: 8b 80 88 01 00 00 mov 0x188(%eax),%eax - 16ef6: 8a 40 04 mov 0x4(%eax),%al - 16ef9: 25 ff 00 00 00 and $0xff,%eax - 16efe: 3b 45 f4 cmp 0xfffffff4(%ebp),%eax - 16f01: 0f 8e 39 01 00 00 jle 17040 <_usb_new_device+0x4ad> - 16f07: 8b 45 08 mov 0x8(%ebp),%eax - 16f0a: 8b 98 88 01 00 00 mov 0x188(%eax),%ebx - 16f10: 8b 4d f4 mov 0xfffffff4(%ebp),%ecx - 16f13: 89 c8 mov %ecx,%eax - 16f15: c1 e0 02 shl $0x2,%eax - 16f18: 01 c8 add %ecx,%eax - 16f1a: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx - 16f21: 01 d0 add %edx,%eax - 16f23: 01 c0 add %eax,%eax - 16f25: 01 c8 add %ecx,%eax - 16f27: c1 e0 02 shl $0x2,%eax - 16f2a: 03 43 0c add 0xc(%ebx),%eax - 16f2d: 89 45 ec mov %eax,0xffffffec(%ebp) - 16f30: 8b 4d ec mov 0xffffffec(%ebp),%ecx - 16f33: 8b 45 ec mov 0xffffffec(%ebp),%eax - 16f36: 8b 50 04 mov 0x4(%eax),%edx - 16f39: 89 d0 mov %edx,%eax - 16f3b: 01 c0 add %eax,%eax - 16f3d: 01 d0 add %edx,%eax - 16f3f: c1 e0 03 shl $0x3,%eax - 16f42: 03 01 add (%ecx),%eax - 16f44: 89 45 e8 mov %eax,0xffffffe8(%ebp) - 16f47: 8b 55 ec mov 0xffffffec(%ebp),%edx - 16f4a: 8b 45 08 mov 0x8(%ebp),%eax - 16f4d: 05 c0 00 00 00 add $0xc0,%eax - 16f52: 89 82 b8 00 00 00 mov %eax,0xb8(%edx) - 16f58: 8b 45 ec mov 0xffffffec(%ebp),%eax - 16f5b: c7 80 b0 00 00 00 00 movl $0x0,0xb0(%eax) - 16f62: 00 00 00 - 16f65: 8b 45 ec mov 0xffffffec(%ebp),%eax - 16f68: c7 80 98 00 00 00 f8 movl $0x1a0f8,0x98(%eax) - 16f6f: a0 01 00 - 16f72: 8b 55 ec mov 0xffffffec(%ebp),%edx - 16f75: 8b 45 0c mov 0xc(%ebp),%eax - 16f78: 8b 80 84 00 00 00 mov 0x84(%eax),%eax - 16f7e: 89 82 9c 00 00 00 mov %eax,0x9c(%edx) - 16f84: 83 ec 0c sub $0xc,%esp - 16f87: 8b 45 e8 mov 0xffffffe8(%ebp),%eax - 16f8a: 8a 40 02 mov 0x2(%eax),%al - 16f8d: 25 ff 00 00 00 and $0xff,%eax - 16f92: 50 push %eax - 16f93: 8b 45 08 mov 0x8(%ebp),%eax - 16f96: 83 c0 04 add $0x4,%eax - 16f99: 50 push %eax - 16f9a: 8b 45 08 mov 0x8(%ebp),%eax - 16f9d: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax - 16fa3: ff 70 04 pushl 0x4(%eax) - 16fa6: 68 a3 b2 01 00 push $0x1b2a3 - 16fab: 8b 45 ec mov 0xffffffec(%ebp),%eax - 16fae: 05 a0 00 00 00 add $0xa0,%eax - 16fb3: 50 push %eax - 16fb4: e8 d7 2a 00 00 call 19a90 <_sprintf> - 16fb9: 83 c4 20 add $0x20,%esp - 16fbc: 8b 45 e8 mov 0xffffffe8(%ebp),%eax - 16fbf: 80 78 08 00 cmpb $0x0,0x8(%eax) - 16fc3: 74 29 je 16fee <_usb_new_device+0x45b> - 16fc5: 68 80 00 00 00 push $0x80 - 16fca: 8b 45 ec mov 0xffffffec(%ebp),%eax - 16fcd: 83 c0 18 add $0x18,%eax - 16fd0: 50 push %eax - 16fd1: 8b 45 e8 mov 0xffffffe8(%ebp),%eax - 16fd4: 8a 40 08 mov 0x8(%eax),%al - 16fd7: 25 ff 00 00 00 and $0xff,%eax - 16fdc: 50 push %eax - 16fdd: ff 75 08 pushl 0x8(%ebp) - 16fe0: e8 fe ab ff ff call 11be3 <_usb_string> - 16fe5: 83 c4 10 add $0x10,%esp - 16fe8: 85 c0 test %eax,%eax - 16fea: 7e 02 jle 16fee <_usb_new_device+0x45b> - 16fec: eb 36 jmp 17024 <_usb_new_device+0x491> - 16fee: 83 ec 0c sub $0xc,%esp - 16ff1: 8b 45 e8 mov 0xffffffe8(%ebp),%eax - 16ff4: 8a 40 02 mov 0x2(%eax),%al - 16ff7: 25 ff 00 00 00 and $0xff,%eax - 16ffc: 50 push %eax - 16ffd: 8b 45 08 mov 0x8(%ebp),%eax - 17000: 83 c0 04 add $0x4,%eax - 17003: 50 push %eax - 17004: 8b 45 08 mov 0x8(%ebp),%eax - 17007: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax - 1700d: ff 70 08 pushl 0x8(%eax) - 17010: 68 ac b2 01 00 push $0x1b2ac - 17015: 8b 45 ec mov 0xffffffec(%ebp),%eax - 17018: 83 c0 18 add $0x18,%eax - 1701b: 50 push %eax - 1701c: e8 6f 2a 00 00 call 19a90 <_sprintf> - 17021: 83 c4 20 add $0x20,%esp - 17024: 83 ec 0c sub $0xc,%esp - 17027: 8b 45 ec mov 0xffffffec(%ebp),%eax - 1702a: 83 c0 18 add $0x18,%eax - 1702d: 50 push %eax - 1702e: e8 d7 26 00 00 call 1970a <_my_device_add> - 17033: 83 c4 10 add $0x10,%esp - 17036: 8d 45 f4 lea 0xfffffff4(%ebp),%eax - 17039: ff 00 incl (%eax) - 1703b: e9 ad fe ff ff jmp 16eed <_usb_new_device+0x35a> - 17040: 83 ec 0c sub $0xc,%esp - 17043: ff 75 08 pushl 0x8(%ebp) - 17046: e8 12 00 00 00 call 1705d <_usbfs_add_device> - 1704b: 83 c4 10 add $0x10,%esp - 1704e: c7 45 e4 00 00 00 00 movl $0x0,0xffffffe4(%ebp) - 17055: 8b 45 e4 mov 0xffffffe4(%ebp),%eax - 17058: 8b 5d fc mov 0xfffffffc(%ebp),%ebx - 1705b: c9 leave - 1705c: c3 ret - -0001705d <_usbfs_add_device>: - 1705d: 55 push %ebp - 1705e: 89 e5 mov %esp,%ebp - 17060: 5d pop %ebp - 17061: c3 ret - -00017062 <_usb_buffer_alloc>: - 17062: 55 push %ebp - 17063: 89 e5 mov %esp,%ebp - 17065: 83 ec 08 sub $0x8,%esp - 17068: 83 7d 08 00 cmpl $0x0,0x8(%ebp) - 1706c: 74 2d je 1709b <_usb_buffer_alloc+0x39> - 1706e: 8b 45 08 mov 0x8(%ebp),%eax - 17071: 83 b8 bc 00 00 00 00 cmpl $0x0,0xbc(%eax) - 17078: 74 21 je 1709b <_usb_buffer_alloc+0x39> - 1707a: 8b 45 08 mov 0x8(%ebp),%eax - 1707d: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax - 17083: 83 78 20 00 cmpl $0x0,0x20(%eax) - 17087: 74 12 je 1709b <_usb_buffer_alloc+0x39> - 17089: 8b 45 08 mov 0x8(%ebp),%eax - 1708c: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax - 17092: 8b 40 20 mov 0x20(%eax),%eax - 17095: 83 78 14 00 cmpl $0x0,0x14(%eax) - 17099: 75 09 jne 170a4 <_usb_buffer_alloc+0x42> - 1709b: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) - 170a2: eb 29 jmp 170cd <_usb_buffer_alloc+0x6b> - 170a4: 8b 45 08 mov 0x8(%ebp),%eax - 170a7: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax - 170ad: 8b 50 20 mov 0x20(%eax),%edx - 170b0: ff 75 14 pushl 0x14(%ebp) - 170b3: ff 75 10 pushl 0x10(%ebp) - 170b6: ff 75 0c pushl 0xc(%ebp) - 170b9: 8b 45 08 mov 0x8(%ebp),%eax - 170bc: ff b0 bc 00 00 00 pushl 0xbc(%eax) - 170c2: 8b 42 14 mov 0x14(%edx),%eax - 170c5: ff d0 call *%eax - 170c7: 83 c4 10 add $0x10,%esp - 170ca: 89 45 fc mov %eax,0xfffffffc(%ebp) - 170cd: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 170d0: c9 leave - 170d1: c3 ret - -000170d2 <_usb_buffer_free>: - 170d2: 55 push %ebp - 170d3: 89 e5 mov %esp,%ebp - 170d5: 83 ec 08 sub $0x8,%esp - 170d8: 83 7d 08 00 cmpl $0x0,0x8(%ebp) - 170dc: 74 55 je 17133 <_usb_buffer_free+0x61> - 170de: 8b 45 08 mov 0x8(%ebp),%eax - 170e1: 83 b8 bc 00 00 00 00 cmpl $0x0,0xbc(%eax) - 170e8: 74 49 je 17133 <_usb_buffer_free+0x61> - 170ea: 8b 45 08 mov 0x8(%ebp),%eax - 170ed: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax - 170f3: 83 78 20 00 cmpl $0x0,0x20(%eax) - 170f7: 74 3a je 17133 <_usb_buffer_free+0x61> - 170f9: 8b 45 08 mov 0x8(%ebp),%eax - 170fc: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax - 17102: 8b 40 20 mov 0x20(%eax),%eax - 17105: 83 78 18 00 cmpl $0x0,0x18(%eax) - 17109: 75 02 jne 1710d <_usb_buffer_free+0x3b> - 1710b: eb 26 jmp 17133 <_usb_buffer_free+0x61> - 1710d: 8b 45 08 mov 0x8(%ebp),%eax - 17110: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax - 17116: 8b 50 20 mov 0x20(%eax),%edx - 17119: ff 75 14 pushl 0x14(%ebp) - 1711c: ff 75 10 pushl 0x10(%ebp) - 1711f: ff 75 0c pushl 0xc(%ebp) - 17122: 8b 45 08 mov 0x8(%ebp),%eax - 17125: ff b0 bc 00 00 00 pushl 0xbc(%eax) - 1712b: 8b 42 18 mov 0x18(%edx),%eax - 1712e: ff d0 call *%eax - 17130: 83 c4 10 add $0x10,%esp - 17133: c9 leave - 17134: c3 ret - -00017135 <_usb_buffer_map>: - 17135: 55 push %ebp - 17136: 89 e5 mov %esp,%ebp - 17138: 83 ec 0c sub $0xc,%esp - 1713b: 83 7d 08 00 cmpl $0x0,0x8(%ebp) - 1713f: 74 39 je 1717a <_usb_buffer_map+0x45> - 17141: 8b 45 08 mov 0x8(%ebp),%eax - 17144: 8b 40 18 mov 0x18(%eax),%eax - 17147: c1 e8 1e shr $0x1e,%eax - 1714a: 83 e0 03 and $0x3,%eax - 1714d: 83 f8 02 cmp $0x2,%eax - 17150: 74 28 je 1717a <_usb_buffer_map+0x45> - 17152: 8b 45 08 mov 0x8(%ebp),%eax - 17155: 83 78 14 00 cmpl $0x0,0x14(%eax) - 17159: 74 1f je 1717a <_usb_buffer_map+0x45> - 1715b: 8b 45 08 mov 0x8(%ebp),%eax - 1715e: 8b 40 14 mov 0x14(%eax),%eax - 17161: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax - 17167: 89 45 fc mov %eax,0xfffffffc(%ebp) - 1716a: 85 c0 test %eax,%eax - 1716c: 74 0c je 1717a <_usb_buffer_map+0x45> - 1716e: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 17171: 8b 00 mov (%eax),%eax - 17173: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 17176: 85 c0 test %eax,%eax - 17178: 75 09 jne 17183 <_usb_buffer_map+0x4e> - 1717a: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) - 17181: eb 3f jmp 171c2 <_usb_buffer_map+0x8d> - 17183: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 17186: 83 b8 84 00 00 00 00 cmpl $0x0,0x84(%eax) - 1718d: 74 14 je 171a3 <_usb_buffer_map+0x6e> - 1718f: 8b 45 08 mov 0x8(%ebp),%eax - 17192: 8b 55 08 mov 0x8(%ebp),%edx - 17195: 8b 52 24 mov 0x24(%edx),%edx - 17198: 81 e2 ff ff ff 0f and $0xfffffff,%edx - 1719e: 89 50 28 mov %edx,0x28(%eax) - 171a1: eb 0a jmp 171ad <_usb_buffer_map+0x78> - 171a3: 8b 45 08 mov 0x8(%ebp),%eax - 171a6: c7 40 28 ff ff ff ff movl $0xffffffff,0x28(%eax) - 171ad: 8b 55 08 mov 0x8(%ebp),%edx - 171b0: 8b 45 08 mov 0x8(%ebp),%eax - 171b3: 8b 40 20 mov 0x20(%eax),%eax - 171b6: 83 c8 04 or $0x4,%eax - 171b9: 89 42 20 mov %eax,0x20(%edx) - 171bc: 8b 45 08 mov 0x8(%ebp),%eax - 171bf: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 171c2: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 171c5: c9 leave - 171c6: c3 ret - -000171c7 <_usb_buffer_dmasync>: - 171c7: 55 push %ebp - 171c8: 89 e5 mov %esp,%ebp - 171ca: 83 ec 08 sub $0x8,%esp - 171cd: 83 7d 08 00 cmpl $0x0,0x8(%ebp) - 171d1: 74 3a je 1720d <_usb_buffer_dmasync+0x46> - 171d3: 8b 45 08 mov 0x8(%ebp),%eax - 171d6: 8b 40 20 mov 0x20(%eax),%eax - 171d9: c1 e8 02 shr $0x2,%eax - 171dc: 83 e0 01 and $0x1,%eax - 171df: 85 c0 test %eax,%eax - 171e1: 74 2a je 1720d <_usb_buffer_dmasync+0x46> - 171e3: 8b 45 08 mov 0x8(%ebp),%eax - 171e6: 83 78 14 00 cmpl $0x0,0x14(%eax) - 171ea: 74 21 je 1720d <_usb_buffer_dmasync+0x46> - 171ec: 8b 45 08 mov 0x8(%ebp),%eax - 171ef: 8b 40 14 mov 0x14(%eax),%eax - 171f2: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax - 171f8: 89 45 fc mov %eax,0xfffffffc(%ebp) - 171fb: 85 c0 test %eax,%eax - 171fd: 74 0e je 1720d <_usb_buffer_dmasync+0x46> - 171ff: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 17202: 8b 00 mov (%eax),%eax - 17204: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 17207: 85 c0 test %eax,%eax - 17209: 75 02 jne 1720d <_usb_buffer_dmasync+0x46> - 1720b: eb 00 jmp 1720d <_usb_buffer_dmasync+0x46> - 1720d: c9 leave - 1720e: c3 ret - -0001720f <_usb_buffer_unmap>: - 1720f: 55 push %ebp - 17210: 89 e5 mov %esp,%ebp - 17212: 83 ec 08 sub $0x8,%esp - 17215: 83 7d 08 00 cmpl $0x0,0x8(%ebp) - 17219: 74 49 je 17264 <_usb_buffer_unmap+0x55> - 1721b: 8b 45 08 mov 0x8(%ebp),%eax - 1721e: 8b 40 20 mov 0x20(%eax),%eax - 17221: c1 e8 02 shr $0x2,%eax - 17224: 83 e0 01 and $0x1,%eax - 17227: 85 c0 test %eax,%eax - 17229: 74 39 je 17264 <_usb_buffer_unmap+0x55> - 1722b: 8b 45 08 mov 0x8(%ebp),%eax - 1722e: 83 78 14 00 cmpl $0x0,0x14(%eax) - 17232: 74 30 je 17264 <_usb_buffer_unmap+0x55> - 17234: 8b 45 08 mov 0x8(%ebp),%eax - 17237: 8b 40 14 mov 0x14(%eax),%eax - 1723a: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax - 17240: 89 45 fc mov %eax,0xfffffffc(%ebp) - 17243: 85 c0 test %eax,%eax - 17245: 74 1d je 17264 <_usb_buffer_unmap+0x55> - 17247: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 1724a: 8b 00 mov (%eax),%eax - 1724c: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 1724f: 85 c0 test %eax,%eax - 17251: 75 02 jne 17255 <_usb_buffer_unmap+0x46> - 17253: eb 0f jmp 17264 <_usb_buffer_unmap+0x55> - 17255: 8b 45 08 mov 0x8(%ebp),%eax - 17258: 8b 55 08 mov 0x8(%ebp),%edx - 1725b: 8b 52 20 mov 0x20(%edx),%edx - 1725e: 83 e2 fb and $0xfffffffb,%edx - 17261: 89 50 20 mov %edx,0x20(%eax) - 17264: c9 leave - 17265: c3 ret - -00017266 <_usb_buffer_map_sg>: - 17266: 55 push %ebp - 17267: 89 e5 mov %esp,%ebp - 17269: 83 ec 0c sub $0xc,%esp - 1726c: 83 7d 08 00 cmpl $0x0,0x8(%ebp) - 17270: 74 36 je 172a8 <_usb_buffer_map_sg+0x42> - 17272: 8b 45 0c mov 0xc(%ebp),%eax - 17275: c1 e8 1e shr $0x1e,%eax - 17278: 83 e0 03 and $0x3,%eax - 1727b: 83 f8 02 cmp $0x2,%eax - 1727e: 74 28 je 172a8 <_usb_buffer_map_sg+0x42> - 17280: 8b 45 08 mov 0x8(%ebp),%eax - 17283: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax - 17289: 89 45 fc mov %eax,0xfffffffc(%ebp) - 1728c: 85 c0 test %eax,%eax - 1728e: 74 18 je 172a8 <_usb_buffer_map_sg+0x42> - 17290: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 17293: 8b 00 mov (%eax),%eax - 17295: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 17298: 85 c0 test %eax,%eax - 1729a: 74 0c je 172a8 <_usb_buffer_map_sg+0x42> - 1729c: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 1729f: 83 b8 84 00 00 00 00 cmpl $0x0,0x84(%eax) - 172a6: 75 09 jne 172b1 <_usb_buffer_map_sg+0x4b> - 172a8: c7 45 f4 ff ff ff ff movl $0xffffffff,0xfffffff4(%ebp) - 172af: eb 07 jmp 172b8 <_usb_buffer_map_sg+0x52> - 172b1: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) - 172b8: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 172bb: c9 leave - 172bc: c3 ret - -000172bd <_usb_buffer_dmasync_sg>: - 172bd: 55 push %ebp - 172be: 89 e5 mov %esp,%ebp - 172c0: 83 ec 08 sub $0x8,%esp - 172c3: 83 7d 08 00 cmpl $0x0,0x8(%ebp) - 172c7: 74 1c je 172e5 <_usb_buffer_dmasync_sg+0x28> - 172c9: 8b 45 08 mov 0x8(%ebp),%eax - 172cc: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax - 172d2: 89 45 fc mov %eax,0xfffffffc(%ebp) - 172d5: 85 c0 test %eax,%eax - 172d7: 74 0c je 172e5 <_usb_buffer_dmasync_sg+0x28> - 172d9: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 172dc: 8b 00 mov (%eax),%eax - 172de: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 172e1: 85 c0 test %eax,%eax - 172e3: 74 00 je 172e5 <_usb_buffer_dmasync_sg+0x28> - 172e5: c9 leave - 172e6: c3 ret - -000172e7 <_usb_buffer_unmap_sg>: - 172e7: 55 push %ebp - 172e8: 89 e5 mov %esp,%ebp - 172ea: 83 ec 08 sub $0x8,%esp - 172ed: 83 7d 08 00 cmpl $0x0,0x8(%ebp) - 172f1: 74 1c je 1730f <_usb_buffer_unmap_sg+0x28> - 172f3: 8b 45 08 mov 0x8(%ebp),%eax - 172f6: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax - 172fc: 89 45 fc mov %eax,0xfffffffc(%ebp) - 172ff: 85 c0 test %eax,%eax - 17301: 74 0c je 1730f <_usb_buffer_unmap_sg+0x28> - 17303: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 17306: 8b 00 mov (%eax),%eax - 17308: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 1730b: 85 c0 test %eax,%eax - 1730d: 74 00 je 1730f <_usb_buffer_unmap_sg+0x28> - 1730f: c9 leave - 17310: c3 ret - -00017311 <_usb_setup_disable>: - 17311: 55 push %ebp - 17312: 89 e5 mov %esp,%ebp - 17314: c7 05 30 c1 01 00 01 movl $0x1,0x1c130 - 1731b: 00 00 00 - 1731e: b8 01 00 00 00 mov $0x1,%eax - 17323: 5d pop %ebp - 17324: c3 ret - -00017325 <_usb_disabled@0>: - 17325: 55 push %ebp - 17326: 89 e5 mov %esp,%ebp - 17328: a1 30 c1 01 00 mov 0x1c130,%eax - 1732d: 5d pop %ebp - 1732e: c3 ret - -0001732f <_usb_init>: - 1732f: 55 push %ebp - 17330: 89 e5 mov %esp,%ebp - 17332: 83 ec 08 sub $0x8,%esp - 17335: 83 3d 30 c1 01 00 00 cmpl $0x0,0x1c130 - 1733c: 74 09 je 17347 <_usb_init+0x18> - 1733e: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) - 17345: eb 26 jmp 1736d <_usb_init+0x3e> - 17347: e8 30 00 00 00 call 1737c <_usb_major_init> - 1734c: e8 21 00 00 00 call 17372 <_usbfs_init> - 17351: e8 63 e3 ff ff call 156b9 <_usb_hub_init> - 17356: 83 ec 0c sub $0xc,%esp - 17359: 68 e0 a0 01 00 push $0x1a0e0 - 1735e: e8 79 24 00 00 call 197dc <_my_driver_register> - 17363: 83 c4 10 add $0x10,%esp - 17366: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) - 1736d: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 17370: c9 leave - 17371: c3 ret - -00017372 <_usbfs_init>: - 17372: 55 push %ebp - 17373: 89 e5 mov %esp,%ebp - 17375: b8 00 00 00 00 mov $0x0,%eax - 1737a: 5d pop %ebp - 1737b: c3 ret - -0001737c <_usb_major_init>: - 1737c: 55 push %ebp - 1737d: 89 e5 mov %esp,%ebp - 1737f: b8 00 00 00 00 mov $0x0,%eax - 17384: 5d pop %ebp - 17385: c3 ret - -00017386 <_usb_exit>: - 17386: 55 push %ebp - 17387: 89 e5 mov %esp,%ebp - 17389: 83 ec 08 sub $0x8,%esp - 1738c: 83 3d 30 c1 01 00 00 cmpl $0x0,0x1c130 - 17393: 74 02 je 17397 <_usb_exit+0x11> - 17395: eb 0f jmp 173a6 <_usb_exit+0x20> - 17397: e8 11 00 00 00 call 173ad <_usb_major_cleanup> - 1739c: e8 07 00 00 00 call 173a8 <_usbfs_cleanup> - 173a1: e8 80 e3 ff ff call 15726 <_usb_hub_cleanup> - 173a6: c9 leave - 173a7: c3 ret - -000173a8 <_usbfs_cleanup>: - 173a8: 55 push %ebp - 173a9: 89 e5 mov %esp,%ebp - 173ab: 5d pop %ebp - 173ac: c3 ret - -000173ad <_usb_major_cleanup>: - 173ad: 55 push %ebp - 173ae: 89 e5 mov %esp,%ebp - 173b0: 5d pop %ebp - 173b1: c3 ret - -000173b2 <_subsys_usb_init>: - 173b2: 55 push %ebp - 173b3: 89 e5 mov %esp,%ebp - 173b5: 83 ec 08 sub $0x8,%esp - 173b8: e8 72 ff ff ff call 1732f <_usb_init> - 173bd: c9 leave - 173be: c3 ret - -000173bf <_module_exit_usb_exit>: - 173bf: 55 push %ebp - 173c0: 89 e5 mov %esp,%ebp - 173c2: 83 ec 08 sub $0x8,%esp - 173c5: e8 bc ff ff ff call 17386 <_usb_exit> - 173ca: c9 leave - 173cb: c3 ret - 173cc: 90 nop - 173cd: 90 nop - 173ce: 90 nop - 173cf: 90 nop - -000173d0 <_usb_parse_endpoint>: - 173d0: 55 push %ebp - 173d1: 89 e5 mov %esp,%ebp - 173d3: 53 push %ebx - 173d4: 83 ec 24 sub $0x24,%esp - 173d7: c7 45 f0 00 00 00 00 movl $0x0,0xfffffff0(%ebp) - 173de: 8b 45 0c mov 0xc(%ebp),%eax - 173e1: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 173e4: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 173e7: 8a 00 mov (%eax),%al - 173e9: 25 ff 00 00 00 and $0xff,%eax - 173ee: 3b 45 10 cmp 0x10(%ebp),%eax - 173f1: 7e 0c jle 173ff <_usb_parse_endpoint+0x2f> - 173f3: c7 45 e4 ff ff ff ff movl $0xffffffff,0xffffffe4(%ebp) - 173fa: e9 7c 01 00 00 jmp 1757b <_usb_parse_endpoint+0x1ab> - 173ff: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 17402: 80 78 01 05 cmpb $0x5,0x1(%eax) - 17406: 74 0b je 17413 <_usb_parse_endpoint+0x43> - 17408: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 1740b: 89 45 e4 mov %eax,0xffffffe4(%ebp) - 1740e: e9 68 01 00 00 jmp 1757b <_usb_parse_endpoint+0x1ab> - 17413: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 17416: 80 38 09 cmpb $0x9,(%eax) - 17419: 75 15 jne 17430 <_usb_parse_endpoint+0x60> - 1741b: 83 ec 04 sub $0x4,%esp - 1741e: 6a 09 push $0x9 - 17420: ff 75 0c pushl 0xc(%ebp) - 17423: ff 75 08 pushl 0x8(%ebp) - 17426: e8 45 26 00 00 call 19a70 <_memcpy> - 1742b: 83 c4 10 add $0x10,%esp - 1742e: eb 13 jmp 17443 <_usb_parse_endpoint+0x73> - 17430: 83 ec 04 sub $0x4,%esp - 17433: 6a 07 push $0x7 - 17435: ff 75 0c pushl 0xc(%ebp) - 17438: ff 75 08 pushl 0x8(%ebp) - 1743b: e8 30 26 00 00 call 19a70 <_memcpy> - 17440: 83 c4 10 add $0x10,%esp - 17443: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 17446: ba 00 00 00 00 mov $0x0,%edx - 1744b: 8a 10 mov (%eax),%dl - 1744d: 8d 45 0c lea 0xc(%ebp),%eax - 17450: 01 10 add %edx,(%eax) - 17452: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 17455: ba 00 00 00 00 mov $0x0,%edx - 1745a: 8a 10 mov (%eax),%dl - 1745c: 8d 45 10 lea 0x10(%ebp),%eax - 1745f: 29 10 sub %edx,(%eax) - 17461: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 17464: ba 00 00 00 00 mov $0x0,%edx - 17469: 8a 10 mov (%eax),%dl - 1746b: 8d 45 f0 lea 0xfffffff0(%ebp),%eax - 1746e: 01 10 add %edx,(%eax) - 17470: 8b 45 0c mov 0xc(%ebp),%eax - 17473: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 17476: c7 45 e8 00 00 00 00 movl $0x0,0xffffffe8(%ebp) - 1747d: 83 7d 10 01 cmpl $0x1,0x10(%ebp) - 17481: 76 72 jbe 174f5 <_usb_parse_endpoint+0x125> - 17483: 8b 45 0c mov 0xc(%ebp),%eax - 17486: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 17489: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 1748c: 80 38 01 cmpb $0x1,(%eax) - 1748f: 77 0c ja 1749d <_usb_parse_endpoint+0xcd> - 17491: c7 45 e4 ff ff ff ff movl $0xffffffff,0xffffffe4(%ebp) - 17498: e9 de 00 00 00 jmp 1757b <_usb_parse_endpoint+0x1ab> - 1749d: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 174a0: 80 78 01 05 cmpb $0x5,0x1(%eax) - 174a4: 74 4f je 174f5 <_usb_parse_endpoint+0x125> - 174a6: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 174a9: 80 78 01 04 cmpb $0x4,0x1(%eax) - 174ad: 74 46 je 174f5 <_usb_parse_endpoint+0x125> - 174af: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 174b2: 80 78 01 02 cmpb $0x2,0x1(%eax) - 174b6: 74 3d je 174f5 <_usb_parse_endpoint+0x125> - 174b8: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 174bb: 80 78 01 01 cmpb $0x1,0x1(%eax) - 174bf: 74 34 je 174f5 <_usb_parse_endpoint+0x125> - 174c1: 8d 45 e8 lea 0xffffffe8(%ebp),%eax - 174c4: ff 00 incl (%eax) - 174c6: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 174c9: ba 00 00 00 00 mov $0x0,%edx - 174ce: 8a 10 mov (%eax),%dl - 174d0: 8d 45 0c lea 0xc(%ebp),%eax - 174d3: 01 10 add %edx,(%eax) - 174d5: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 174d8: ba 00 00 00 00 mov $0x0,%edx - 174dd: 8a 10 mov (%eax),%dl - 174df: 8d 45 10 lea 0x10(%ebp),%eax - 174e2: 29 10 sub %edx,(%eax) - 174e4: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 174e7: ba 00 00 00 00 mov $0x0,%edx - 174ec: 8a 10 mov (%eax),%dl - 174ee: 8d 45 f0 lea 0xfffffff0(%ebp),%eax - 174f1: 01 10 add %edx,(%eax) - 174f3: eb 88 jmp 1747d <_usb_parse_endpoint+0xad> - 174f5: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 174f8: 8b 55 0c mov 0xc(%ebp),%edx - 174fb: 29 c2 sub %eax,%edx - 174fd: 89 d0 mov %edx,%eax - 174ff: 89 45 ec mov %eax,0xffffffec(%ebp) - 17502: 83 7d ec 00 cmpl $0x0,0xffffffec(%ebp) - 17506: 75 1c jne 17524 <_usb_parse_endpoint+0x154> - 17508: 8b 45 08 mov 0x8(%ebp),%eax - 1750b: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) - 17512: 8b 45 08 mov 0x8(%ebp),%eax - 17515: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) - 1751c: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 1751f: 89 45 e4 mov %eax,0xffffffe4(%ebp) - 17522: eb 57 jmp 1757b <_usb_parse_endpoint+0x1ab> - 17524: 8b 5d 08 mov 0x8(%ebp),%ebx - 17527: 83 ec 08 sub $0x8,%esp - 1752a: ff 75 ec pushl 0xffffffec(%ebp) - 1752d: 6a 01 push $0x1 - 1752f: e8 fc 24 00 00 call 19a30 <_ExAllocatePool@8> - 17534: 83 c4 08 add $0x8,%esp - 17537: 89 43 0c mov %eax,0xc(%ebx) - 1753a: 8b 45 08 mov 0x8(%ebp),%eax - 1753d: 83 78 0c 00 cmpl $0x0,0xc(%eax) - 17541: 75 12 jne 17555 <_usb_parse_endpoint+0x185> - 17543: 8b 45 08 mov 0x8(%ebp),%eax - 17546: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) - 1754d: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 17550: 89 45 e4 mov %eax,0xffffffe4(%ebp) - 17553: eb 26 jmp 1757b <_usb_parse_endpoint+0x1ab> - 17555: 83 ec 04 sub $0x4,%esp - 17558: ff 75 ec pushl 0xffffffec(%ebp) - 1755b: ff 75 f4 pushl 0xfffffff4(%ebp) - 1755e: 8b 45 08 mov 0x8(%ebp),%eax - 17561: ff 70 0c pushl 0xc(%eax) - 17564: e8 07 25 00 00 call 19a70 <_memcpy> - 17569: 83 c4 10 add $0x10,%esp - 1756c: 8b 55 08 mov 0x8(%ebp),%edx - 1756f: 8b 45 ec mov 0xffffffec(%ebp),%eax - 17572: 89 42 10 mov %eax,0x10(%edx) - 17575: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 17578: 89 45 e4 mov %eax,0xffffffe4(%ebp) - 1757b: 8b 45 e4 mov 0xffffffe4(%ebp),%eax - 1757e: 8b 5d fc mov 0xfffffffc(%ebp),%ebx - 17581: c9 leave - 17582: c3 ret - -00017583 <_usb_parse_interface>: - 17583: 55 push %ebp - 17584: 89 e5 mov %esp,%ebp - 17586: 53 push %ebx - 17587: 83 ec 34 sub $0x34,%esp - 1758a: c7 45 e8 00 00 00 00 movl $0x0,0xffffffe8(%ebp) - 17591: 8b 45 08 mov 0x8(%ebp),%eax - 17594: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) - 1759b: 8b 45 08 mov 0x8(%ebp),%eax - 1759e: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) - 175a5: 8b 45 08 mov 0x8(%ebp),%eax - 175a8: c7 40 0c 04 00 00 00 movl $0x4,0xc(%eax) - 175af: 83 ec 0c sub $0xc,%esp - 175b2: 8b 45 08 mov 0x8(%ebp),%eax - 175b5: 83 c0 18 add $0x18,%eax - 175b8: 50 push %eax - 175b9: e8 a2 22 00 00 call 19860 <_my_device_initialize> - 175be: 83 c4 10 add $0x10,%esp - 175c1: 8b 5d 08 mov 0x8(%ebp),%ebx - 175c4: 83 ec 08 sub $0x8,%esp - 175c7: 8b 45 08 mov 0x8(%ebp),%eax - 175ca: 8b 50 0c mov 0xc(%eax),%edx - 175cd: 89 d0 mov %edx,%eax - 175cf: 01 c0 add %eax,%eax - 175d1: 01 d0 add %edx,%eax - 175d3: c1 e0 03 shl $0x3,%eax - 175d6: 50 push %eax - 175d7: 6a 01 push $0x1 - 175d9: e8 52 24 00 00 call 19a30 <_ExAllocatePool@8> - 175de: 83 c4 08 add $0x8,%esp - 175e1: 89 03 mov %eax,(%ebx) - 175e3: 8b 45 08 mov 0x8(%ebp),%eax - 175e6: 83 38 00 cmpl $0x0,(%eax) - 175e9: 75 0c jne 175f7 <_usb_parse_interface+0x74> - 175eb: c7 45 cc ff ff ff ff movl $0xffffffff,0xffffffcc(%ebp) - 175f2: e9 85 03 00 00 jmp 1797c <_usb_parse_interface+0x3f9> - 175f7: 83 7d 10 00 cmpl $0x0,0x10(%ebp) - 175fb: 0f 8e 75 03 00 00 jle 17976 <_usb_parse_interface+0x3f3> - 17601: 8b 45 08 mov 0x8(%ebp),%eax - 17604: 8b 55 08 mov 0x8(%ebp),%edx - 17607: 8b 40 08 mov 0x8(%eax),%eax - 1760a: 3b 42 0c cmp 0xc(%edx),%eax - 1760d: 0f 82 9a 00 00 00 jb 176ad <_usb_parse_interface+0x12a> - 17613: 8b 45 08 mov 0x8(%ebp),%eax - 17616: 8b 40 0c mov 0xc(%eax),%eax - 17619: 89 45 d0 mov %eax,0xffffffd0(%ebp) - 1761c: 8b 55 08 mov 0x8(%ebp),%edx - 1761f: 8b 45 08 mov 0x8(%ebp),%eax - 17622: 8b 40 0c mov 0xc(%eax),%eax - 17625: 83 c0 04 add $0x4,%eax - 17628: 89 42 0c mov %eax,0xc(%edx) - 1762b: 8b 45 08 mov 0x8(%ebp),%eax - 1762e: 81 78 0c 80 00 00 00 cmpl $0x80,0xc(%eax) - 17635: 76 0c jbe 17643 <_usb_parse_interface+0xc0> - 17637: c7 45 cc ff ff ff ff movl $0xffffffff,0xffffffcc(%ebp) - 1763e: e9 39 03 00 00 jmp 1797c <_usb_parse_interface+0x3f9> - 17643: 83 ec 08 sub $0x8,%esp - 17646: 8b 45 08 mov 0x8(%ebp),%eax - 17649: 8b 50 0c mov 0xc(%eax),%edx - 1764c: 89 d0 mov %edx,%eax - 1764e: 01 c0 add %eax,%eax - 17650: 01 d0 add %edx,%eax - 17652: c1 e0 03 shl $0x3,%eax - 17655: 50 push %eax - 17656: 6a 01 push $0x1 - 17658: e8 d3 23 00 00 call 19a30 <_ExAllocatePool@8> - 1765d: 83 c4 08 add $0x8,%esp - 17660: 89 45 d4 mov %eax,0xffffffd4(%ebp) - 17663: 83 7d d4 00 cmpl $0x0,0xffffffd4(%ebp) - 17667: 75 0c jne 17675 <_usb_parse_interface+0xf2> - 17669: c7 45 cc ff ff ff ff movl $0xffffffff,0xffffffcc(%ebp) - 17670: e9 07 03 00 00 jmp 1797c <_usb_parse_interface+0x3f9> - 17675: 83 ec 04 sub $0x4,%esp - 17678: 8b 55 d0 mov 0xffffffd0(%ebp),%edx - 1767b: 89 d0 mov %edx,%eax - 1767d: 01 c0 add %eax,%eax - 1767f: 01 d0 add %edx,%eax - 17681: c1 e0 03 shl $0x3,%eax - 17684: 50 push %eax - 17685: 8b 45 08 mov 0x8(%ebp),%eax - 17688: ff 30 pushl (%eax) - 1768a: ff 75 d4 pushl 0xffffffd4(%ebp) - 1768d: e8 de 23 00 00 call 19a70 <_memcpy> - 17692: 83 c4 10 add $0x10,%esp - 17695: 83 ec 0c sub $0xc,%esp - 17698: 8b 45 08 mov 0x8(%ebp),%eax - 1769b: ff 30 pushl (%eax) - 1769d: e8 9e 23 00 00 call 19a40 <_ExFreePool@4> - 176a2: 83 c4 0c add $0xc,%esp - 176a5: 8b 55 08 mov 0x8(%ebp),%edx - 176a8: 8b 45 d4 mov 0xffffffd4(%ebp),%eax - 176ab: 89 02 mov %eax,(%edx) - 176ad: 8b 4d 08 mov 0x8(%ebp),%ecx - 176b0: 8b 45 08 mov 0x8(%ebp),%eax - 176b3: 8b 50 08 mov 0x8(%eax),%edx - 176b6: 89 d0 mov %edx,%eax - 176b8: 01 c0 add %eax,%eax - 176ba: 01 d0 add %edx,%eax - 176bc: c1 e0 03 shl $0x3,%eax - 176bf: 03 01 add (%ecx),%eax - 176c1: 89 45 e0 mov %eax,0xffffffe0(%ebp) - 176c4: 8b 45 e0 mov 0xffffffe0(%ebp),%eax - 176c7: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) - 176ce: 8b 45 e0 mov 0xffffffe0(%ebp),%eax - 176d1: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) - 176d8: 8b 45 e0 mov 0xffffffe0(%ebp),%eax - 176db: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax) - 176e2: 8b 45 08 mov 0x8(%ebp),%eax - 176e5: ff 40 08 incl 0x8(%eax) - 176e8: 83 ec 04 sub $0x4,%esp - 176eb: 6a 09 push $0x9 - 176ed: ff 75 0c pushl 0xc(%ebp) - 176f0: ff 75 e0 pushl 0xffffffe0(%ebp) - 176f3: e8 78 23 00 00 call 19a70 <_memcpy> - 176f8: 83 c4 10 add $0x10,%esp - 176fb: 8b 45 e0 mov 0xffffffe0(%ebp),%eax - 176fe: ba 00 00 00 00 mov $0x0,%edx - 17703: 8a 10 mov (%eax),%dl - 17705: 8d 45 0c lea 0xc(%ebp),%eax - 17708: 01 10 add %edx,(%eax) - 1770a: 8b 45 e0 mov 0xffffffe0(%ebp),%eax - 1770d: ba 00 00 00 00 mov $0x0,%edx - 17712: 8a 10 mov (%eax),%dl - 17714: 8d 45 e8 lea 0xffffffe8(%ebp),%eax - 17717: 01 10 add %edx,(%eax) - 17719: 8b 45 e0 mov 0xffffffe0(%ebp),%eax - 1771c: ba 00 00 00 00 mov $0x0,%edx - 17721: 8a 10 mov (%eax),%dl - 17723: 8d 45 10 lea 0x10(%ebp),%eax - 17726: 29 10 sub %edx,(%eax) - 17728: 8b 45 0c mov 0xc(%ebp),%eax - 1772b: 89 45 dc mov %eax,0xffffffdc(%ebp) - 1772e: c7 45 f0 00 00 00 00 movl $0x0,0xfffffff0(%ebp) - 17735: 83 7d 10 01 cmpl $0x1,0x10(%ebp) - 17739: 76 72 jbe 177ad <_usb_parse_interface+0x22a> - 1773b: 8b 45 0c mov 0xc(%ebp),%eax - 1773e: 89 45 e4 mov %eax,0xffffffe4(%ebp) - 17741: 8b 45 e4 mov 0xffffffe4(%ebp),%eax - 17744: 80 38 01 cmpb $0x1,(%eax) - 17747: 77 0c ja 17755 <_usb_parse_interface+0x1d2> - 17749: c7 45 cc ff ff ff ff movl $0xffffffff,0xffffffcc(%ebp) - 17750: e9 27 02 00 00 jmp 1797c <_usb_parse_interface+0x3f9> - 17755: 8b 45 e4 mov 0xffffffe4(%ebp),%eax - 17758: 80 78 01 04 cmpb $0x4,0x1(%eax) - 1775c: 74 4f je 177ad <_usb_parse_interface+0x22a> - 1775e: 8b 45 e4 mov 0xffffffe4(%ebp),%eax - 17761: 80 78 01 05 cmpb $0x5,0x1(%eax) - 17765: 74 46 je 177ad <_usb_parse_interface+0x22a> - 17767: 8b 45 e4 mov 0xffffffe4(%ebp),%eax - 1776a: 80 78 01 02 cmpb $0x2,0x1(%eax) - 1776e: 74 3d je 177ad <_usb_parse_interface+0x22a> - 17770: 8b 45 e4 mov 0xffffffe4(%ebp),%eax - 17773: 80 78 01 01 cmpb $0x1,0x1(%eax) - 17777: 74 34 je 177ad <_usb_parse_interface+0x22a> - 17779: 8d 45 f0 lea 0xfffffff0(%ebp),%eax - 1777c: ff 00 incl (%eax) - 1777e: 8b 45 e4 mov 0xffffffe4(%ebp),%eax - 17781: ba 00 00 00 00 mov $0x0,%edx - 17786: 8a 10 mov (%eax),%dl - 17788: 8d 45 0c lea 0xc(%ebp),%eax - 1778b: 01 10 add %edx,(%eax) - 1778d: 8b 45 e4 mov 0xffffffe4(%ebp),%eax - 17790: ba 00 00 00 00 mov $0x0,%edx - 17795: 8a 10 mov (%eax),%dl - 17797: 8d 45 e8 lea 0xffffffe8(%ebp),%eax - 1779a: 01 10 add %edx,(%eax) - 1779c: 8b 45 e4 mov 0xffffffe4(%ebp),%eax - 1779f: ba 00 00 00 00 mov $0x0,%edx - 177a4: 8a 10 mov (%eax),%dl - 177a6: 8d 45 10 lea 0x10(%ebp),%eax - 177a9: 29 10 sub %edx,(%eax) - 177ab: eb 88 jmp 17735 <_usb_parse_interface+0x1b2> - 177ad: 8b 45 dc mov 0xffffffdc(%ebp),%eax - 177b0: 8b 55 0c mov 0xc(%ebp),%edx - 177b3: 29 c2 sub %eax,%edx - 177b5: 89 d0 mov %edx,%eax - 177b7: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 177ba: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) - 177be: 74 55 je 17815 <_usb_parse_interface+0x292> - 177c0: 8b 5d e0 mov 0xffffffe0(%ebp),%ebx - 177c3: 83 ec 08 sub $0x8,%esp - 177c6: ff 75 f4 pushl 0xfffffff4(%ebp) - 177c9: 6a 01 push $0x1 - 177cb: e8 60 22 00 00 call 19a30 <_ExAllocatePool@8> - 177d0: 83 c4 08 add $0x8,%esp - 177d3: 89 43 10 mov %eax,0x10(%ebx) - 177d6: 8b 45 e0 mov 0xffffffe0(%ebp),%eax - 177d9: 83 78 10 00 cmpl $0x0,0x10(%eax) - 177dd: 75 16 jne 177f5 <_usb_parse_interface+0x272> - 177df: 8b 45 e0 mov 0xffffffe0(%ebp),%eax - 177e2: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax) - 177e9: c7 45 cc ff ff ff ff movl $0xffffffff,0xffffffcc(%ebp) - 177f0: e9 87 01 00 00 jmp 1797c <_usb_parse_interface+0x3f9> - 177f5: 83 ec 04 sub $0x4,%esp - 177f8: ff 75 f4 pushl 0xfffffff4(%ebp) - 177fb: ff 75 dc pushl 0xffffffdc(%ebp) - 177fe: 8b 45 e0 mov 0xffffffe0(%ebp),%eax - 17801: ff 70 10 pushl 0x10(%eax) - 17804: e8 67 22 00 00 call 19a70 <_memcpy> - 17809: 83 c4 10 add $0x10,%esp - 1780c: 8b 55 e0 mov 0xffffffe0(%ebp),%edx - 1780f: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 17812: 89 42 14 mov %eax,0x14(%edx) - 17815: 8b 45 0c mov 0xc(%ebp),%eax - 17818: 89 45 e4 mov %eax,0xffffffe4(%ebp) - 1781b: 83 7d 10 01 cmpl $0x1,0x10(%ebp) - 1781f: 76 1f jbe 17840 <_usb_parse_interface+0x2bd> - 17821: 8b 45 e4 mov 0xffffffe4(%ebp),%eax - 17824: 80 78 01 02 cmpb $0x2,0x1(%eax) - 17828: 74 0b je 17835 <_usb_parse_interface+0x2b2> - 1782a: 8b 45 e4 mov 0xffffffe4(%ebp),%eax - 1782d: 80 78 01 01 cmpb $0x1,0x1(%eax) - 17831: 74 02 je 17835 <_usb_parse_interface+0x2b2> - 17833: eb 0b jmp 17840 <_usb_parse_interface+0x2bd> - 17835: 8b 45 e8 mov 0xffffffe8(%ebp),%eax - 17838: 89 45 cc mov %eax,0xffffffcc(%ebp) - 1783b: e9 3c 01 00 00 jmp 1797c <_usb_parse_interface+0x3f9> - 17840: 8b 45 e0 mov 0xffffffe0(%ebp),%eax - 17843: 80 78 04 1e cmpb $0x1e,0x4(%eax) - 17847: 76 0c jbe 17855 <_usb_parse_interface+0x2d2> - 17849: c7 45 cc ff ff ff ff movl $0xffffffff,0xffffffcc(%ebp) - 17850: e9 27 01 00 00 jmp 1797c <_usb_parse_interface+0x3f9> - 17855: 8b 5d e0 mov 0xffffffe0(%ebp),%ebx - 17858: 83 ec 08 sub $0x8,%esp - 1785b: 8b 45 e0 mov 0xffffffe0(%ebp),%eax - 1785e: ba 00 00 00 00 mov $0x0,%edx - 17863: 8a 50 04 mov 0x4(%eax),%dl - 17866: 89 d0 mov %edx,%eax - 17868: c1 e0 02 shl $0x2,%eax - 1786b: 01 d0 add %edx,%eax - 1786d: c1 e0 02 shl $0x2,%eax - 17870: 50 push %eax - 17871: 6a 01 push $0x1 - 17873: e8 b8 21 00 00 call 19a30 <_ExAllocatePool@8> - 17878: 83 c4 08 add $0x8,%esp - 1787b: 89 43 0c mov %eax,0xc(%ebx) - 1787e: 8b 45 e0 mov 0xffffffe0(%ebp),%eax - 17881: 83 78 0c 00 cmpl $0x0,0xc(%eax) - 17885: 75 0c jne 17893 <_usb_parse_interface+0x310> - 17887: c7 45 cc ff ff ff ff movl $0xffffffff,0xffffffcc(%ebp) - 1788e: e9 e9 00 00 00 jmp 1797c <_usb_parse_interface+0x3f9> - 17893: 83 ec 04 sub $0x4,%esp - 17896: 8b 45 e0 mov 0xffffffe0(%ebp),%eax - 17899: ba 00 00 00 00 mov $0x0,%edx - 1789e: 8a 50 04 mov 0x4(%eax),%dl - 178a1: 89 d0 mov %edx,%eax - 178a3: c1 e0 02 shl $0x2,%eax - 178a6: 01 d0 add %edx,%eax - 178a8: c1 e0 02 shl $0x2,%eax - 178ab: 50 push %eax - 178ac: 6a 00 push $0x0 - 178ae: 8b 45 e0 mov 0xffffffe0(%ebp),%eax - 178b1: ff 70 0c pushl 0xc(%eax) - 178b4: e8 97 21 00 00 call 19a50 <_memset> - 178b9: 83 c4 10 add $0x10,%esp - 178bc: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) - 178c3: 8b 45 e0 mov 0xffffffe0(%ebp),%eax - 178c6: 8a 40 04 mov 0x4(%eax),%al - 178c9: 25 ff 00 00 00 and $0xff,%eax - 178ce: 3b 45 f8 cmp 0xfffffff8(%ebp),%eax - 178d1: 7e 79 jle 1794c <_usb_parse_interface+0x3c9> - 178d3: 8b 45 0c mov 0xc(%ebp),%eax - 178d6: 89 45 e4 mov %eax,0xffffffe4(%ebp) - 178d9: 8b 45 e4 mov 0xffffffe4(%ebp),%eax - 178dc: 8a 00 mov (%eax),%al - 178de: 25 ff 00 00 00 and $0xff,%eax - 178e3: 3b 45 10 cmp 0x10(%ebp),%eax - 178e6: 7e 0c jle 178f4 <_usb_parse_interface+0x371> - 178e8: c7 45 cc ff ff ff ff movl $0xffffffff,0xffffffcc(%ebp) - 178ef: e9 88 00 00 00 jmp 1797c <_usb_parse_interface+0x3f9> - 178f4: 83 ec 04 sub $0x4,%esp - 178f7: ff 75 10 pushl 0x10(%ebp) - 178fa: ff 75 0c pushl 0xc(%ebp) - 178fd: 8b 4d e0 mov 0xffffffe0(%ebp),%ecx - 17900: 8b 55 f8 mov 0xfffffff8(%ebp),%edx - 17903: 89 d0 mov %edx,%eax - 17905: c1 e0 02 shl $0x2,%eax - 17908: 01 d0 add %edx,%eax - 1790a: c1 e0 02 shl $0x2,%eax - 1790d: 03 41 0c add 0xc(%ecx),%eax - 17910: 50 push %eax - 17911: e8 ba fa ff ff call 173d0 <_usb_parse_endpoint> - 17916: 83 c4 10 add $0x10,%esp - 17919: 89 45 ec mov %eax,0xffffffec(%ebp) - 1791c: 83 7d ec 00 cmpl $0x0,0xffffffec(%ebp) - 17920: 79 08 jns 1792a <_usb_parse_interface+0x3a7> - 17922: 8b 45 ec mov 0xffffffec(%ebp),%eax - 17925: 89 45 cc mov %eax,0xffffffcc(%ebp) - 17928: eb 52 jmp 1797c <_usb_parse_interface+0x3f9> - 1792a: 8b 55 ec mov 0xffffffec(%ebp),%edx - 1792d: 8d 45 0c lea 0xc(%ebp),%eax - 17930: 01 10 add %edx,(%eax) - 17932: 8b 55 ec mov 0xffffffec(%ebp),%edx - 17935: 8d 45 e8 lea 0xffffffe8(%ebp),%eax - 17938: 01 10 add %edx,(%eax) - 1793a: 8b 55 ec mov 0xffffffec(%ebp),%edx - 1793d: 8d 45 10 lea 0x10(%ebp),%eax - 17940: 29 10 sub %edx,(%eax) - 17942: 8d 45 f8 lea 0xfffffff8(%ebp),%eax - 17945: ff 00 incl (%eax) - 17947: e9 77 ff ff ff jmp 178c3 <_usb_parse_interface+0x340> - 1794c: 8b 45 0c mov 0xc(%ebp),%eax - 1794f: 89 45 d8 mov %eax,0xffffffd8(%ebp) - 17952: 83 7d 10 08 cmpl $0x8,0x10(%ebp) - 17956: 7e 16 jle 1796e <_usb_parse_interface+0x3eb> - 17958: 8b 45 d8 mov 0xffffffd8(%ebp),%eax - 1795b: 80 78 01 04 cmpb $0x4,0x1(%eax) - 1795f: 75 0d jne 1796e <_usb_parse_interface+0x3eb> - 17961: 8b 45 d8 mov 0xffffffd8(%ebp),%eax - 17964: 80 78 03 00 cmpb $0x0,0x3(%eax) - 17968: 0f 85 89 fc ff ff jne 175f7 <_usb_parse_interface+0x74> - 1796e: 8b 45 e8 mov 0xffffffe8(%ebp),%eax - 17971: 89 45 cc mov %eax,0xffffffcc(%ebp) - 17974: eb 06 jmp 1797c <_usb_parse_interface+0x3f9> - 17976: 8b 45 e8 mov 0xffffffe8(%ebp),%eax - 17979: 89 45 cc mov %eax,0xffffffcc(%ebp) - 1797c: 8b 45 cc mov 0xffffffcc(%ebp),%eax - 1797f: 8b 5d fc mov 0xfffffffc(%ebp),%ebx - 17982: c9 leave - 17983: c3 ret - -00017984 <_usb_parse_configuration>: - 17984: 55 push %ebp - 17985: 89 e5 mov %esp,%ebp - 17987: 53 push %ebx - 17988: 83 ec 24 sub $0x24,%esp - 1798b: 83 ec 04 sub $0x4,%esp - 1798e: 6a 09 push $0x9 - 17990: ff 75 0c pushl 0xc(%ebp) - 17993: ff 75 08 pushl 0x8(%ebp) - 17996: e8 d5 20 00 00 call 19a70 <_memcpy> - 1799b: 83 c4 10 add $0x10,%esp - 1799e: 8b 45 08 mov 0x8(%ebp),%eax - 179a1: 66 8b 40 02 mov 0x2(%eax),%ax - 179a5: 25 ff ff 00 00 and $0xffff,%eax - 179aa: 89 45 f0 mov %eax,0xfffffff0(%ebp) - 179ad: 8b 45 08 mov 0x8(%ebp),%eax - 179b0: 80 78 04 20 cmpb $0x20,0x4(%eax) - 179b4: 76 0c jbe 179c2 <_usb_parse_configuration+0x3e> - 179b6: c7 45 dc ff ff ff ff movl $0xffffffff,0xffffffdc(%ebp) - 179bd: e9 2b 02 00 00 jmp 17bed <_usb_parse_configuration+0x269> - 179c2: 8b 5d 08 mov 0x8(%ebp),%ebx - 179c5: 83 ec 08 sub $0x8,%esp - 179c8: 8b 45 08 mov 0x8(%ebp),%eax - 179cb: b9 00 00 00 00 mov $0x0,%ecx - 179d0: 8a 48 04 mov 0x4(%eax),%cl - 179d3: 89 c8 mov %ecx,%eax - 179d5: c1 e0 02 shl $0x2,%eax - 179d8: 01 c8 add %ecx,%eax - 179da: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx - 179e1: 01 d0 add %edx,%eax - 179e3: 01 c0 add %eax,%eax - 179e5: 01 c8 add %ecx,%eax - 179e7: c1 e0 02 shl $0x2,%eax - 179ea: 50 push %eax - 179eb: 6a 01 push $0x1 - 179ed: e8 3e 20 00 00 call 19a30 <_ExAllocatePool@8> - 179f2: 83 c4 08 add $0x8,%esp - 179f5: 89 43 0c mov %eax,0xc(%ebx) - 179f8: 8b 45 08 mov 0x8(%ebp),%eax - 179fb: 83 78 0c 00 cmpl $0x0,0xc(%eax) - 179ff: 75 0c jne 17a0d <_usb_parse_configuration+0x89> - 17a01: c7 45 dc ff ff ff ff movl $0xffffffff,0xffffffdc(%ebp) - 17a08: e9 e0 01 00 00 jmp 17bed <_usb_parse_configuration+0x269> - 17a0d: 83 ec 04 sub $0x4,%esp - 17a10: 8b 45 08 mov 0x8(%ebp),%eax - 17a13: b9 00 00 00 00 mov $0x0,%ecx - 17a18: 8a 48 04 mov 0x4(%eax),%cl - 17a1b: 89 c8 mov %ecx,%eax - 17a1d: c1 e0 02 shl $0x2,%eax - 17a20: 01 c8 add %ecx,%eax - 17a22: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx - 17a29: 01 d0 add %edx,%eax - 17a2b: 01 c0 add %eax,%eax - 17a2d: 01 c8 add %ecx,%eax - 17a2f: c1 e0 02 shl $0x2,%eax - 17a32: 50 push %eax - 17a33: 6a 00 push $0x0 - 17a35: 8b 45 08 mov 0x8(%ebp),%eax - 17a38: ff 70 0c pushl 0xc(%eax) - 17a3b: e8 10 20 00 00 call 19a50 <_memset> - 17a40: 83 c4 10 add $0x10,%esp - 17a43: 8b 45 08 mov 0x8(%ebp),%eax - 17a46: ba 00 00 00 00 mov $0x0,%edx - 17a4b: 8a 10 mov (%eax),%dl - 17a4d: 8d 45 0c lea 0xc(%ebp),%eax - 17a50: 01 10 add %edx,(%eax) - 17a52: 8b 45 08 mov 0x8(%ebp),%eax - 17a55: ba 00 00 00 00 mov $0x0,%edx - 17a5a: 8a 10 mov (%eax),%dl - 17a5c: 8d 45 f0 lea 0xfffffff0(%ebp),%eax - 17a5f: 29 10 sub %edx,(%eax) - 17a61: 8b 45 08 mov 0x8(%ebp),%eax - 17a64: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) - 17a6b: 8b 45 08 mov 0x8(%ebp),%eax - 17a6e: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax) - 17a75: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) - 17a7c: 8b 45 08 mov 0x8(%ebp),%eax - 17a7f: 8a 40 04 mov 0x4(%eax),%al - 17a82: 25 ff 00 00 00 and $0xff,%eax - 17a87: 3b 45 f8 cmp 0xfffffff8(%ebp),%eax - 17a8a: 0f 8e 57 01 00 00 jle 17be7 <_usb_parse_configuration+0x263> - 17a90: 8b 45 0c mov 0xc(%ebp),%eax - 17a93: 89 45 e0 mov %eax,0xffffffe0(%ebp) - 17a96: c7 45 e8 00 00 00 00 movl $0x0,0xffffffe8(%ebp) - 17a9d: 83 7d f0 01 cmpl $0x1,0xfffffff0(%ebp) - 17aa1: 76 74 jbe 17b17 <_usb_parse_configuration+0x193> - 17aa3: 8b 45 0c mov 0xc(%ebp),%eax - 17aa6: 89 45 ec mov %eax,0xffffffec(%ebp) - 17aa9: 8b 45 ec mov 0xffffffec(%ebp),%eax - 17aac: 8a 00 mov (%eax),%al - 17aae: 25 ff 00 00 00 and $0xff,%eax - 17ab3: 3b 45 f0 cmp 0xfffffff0(%ebp),%eax - 17ab6: 7f 0a jg 17ac2 <_usb_parse_configuration+0x13e> - 17ab8: 8b 45 ec mov 0xffffffec(%ebp),%eax - 17abb: 80 38 01 cmpb $0x1,(%eax) - 17abe: 76 02 jbe 17ac2 <_usb_parse_configuration+0x13e> - 17ac0: eb 0c jmp 17ace <_usb_parse_configuration+0x14a> - 17ac2: c7 45 dc ff ff ff ff movl $0xffffffff,0xffffffdc(%ebp) - 17ac9: e9 1f 01 00 00 jmp 17bed <_usb_parse_configuration+0x269> - 17ace: 8b 45 ec mov 0xffffffec(%ebp),%eax - 17ad1: 80 78 01 05 cmpb $0x5,0x1(%eax) - 17ad5: 74 40 je 17b17 <_usb_parse_configuration+0x193> - 17ad7: 8b 45 ec mov 0xffffffec(%ebp),%eax - 17ada: 80 78 01 04 cmpb $0x4,0x1(%eax) - 17ade: 74 37 je 17b17 <_usb_parse_configuration+0x193> - 17ae0: 8b 45 ec mov 0xffffffec(%ebp),%eax - 17ae3: 80 78 01 02 cmpb $0x2,0x1(%eax) - 17ae7: 74 2e je 17b17 <_usb_parse_configuration+0x193> - 17ae9: 8b 45 ec mov 0xffffffec(%ebp),%eax - 17aec: 80 78 01 01 cmpb $0x1,0x1(%eax) - 17af0: 74 25 je 17b17 <_usb_parse_configuration+0x193> - 17af2: 8d 45 e8 lea 0xffffffe8(%ebp),%eax - 17af5: ff 00 incl (%eax) - 17af7: 8b 45 ec mov 0xffffffec(%ebp),%eax - 17afa: ba 00 00 00 00 mov $0x0,%edx - 17aff: 8a 10 mov (%eax),%dl - 17b01: 8d 45 0c lea 0xc(%ebp),%eax - 17b04: 01 10 add %edx,(%eax) - 17b06: 8b 45 ec mov 0xffffffec(%ebp),%eax - 17b09: ba 00 00 00 00 mov $0x0,%edx - 17b0e: 8a 10 mov (%eax),%dl - 17b10: 8d 45 f0 lea 0xfffffff0(%ebp),%eax - 17b13: 29 10 sub %edx,(%eax) - 17b15: eb 86 jmp 17a9d <_usb_parse_configuration+0x119> - 17b17: 8b 45 e0 mov 0xffffffe0(%ebp),%eax - 17b1a: 8b 55 0c mov 0xc(%ebp),%edx - 17b1d: 29 c2 sub %eax,%edx - 17b1f: 89 d0 mov %edx,%eax - 17b21: 89 45 e4 mov %eax,0xffffffe4(%ebp) - 17b24: 83 7d e4 00 cmpl $0x0,0xffffffe4(%ebp) - 17b28: 74 60 je 17b8a <_usb_parse_configuration+0x206> - 17b2a: 8b 45 08 mov 0x8(%ebp),%eax - 17b2d: 83 78 14 00 cmpl $0x0,0x14(%eax) - 17b31: 74 02 je 17b35 <_usb_parse_configuration+0x1b1> - 17b33: eb 55 jmp 17b8a <_usb_parse_configuration+0x206> - 17b35: 8b 5d 08 mov 0x8(%ebp),%ebx - 17b38: 83 ec 08 sub $0x8,%esp - 17b3b: ff 75 e4 pushl 0xffffffe4(%ebp) - 17b3e: 6a 01 push $0x1 - 17b40: e8 eb 1e 00 00 call 19a30 <_ExAllocatePool@8> - 17b45: 83 c4 08 add $0x8,%esp - 17b48: 89 43 10 mov %eax,0x10(%ebx) - 17b4b: 8b 45 08 mov 0x8(%ebp),%eax - 17b4e: 83 78 10 00 cmpl $0x0,0x10(%eax) - 17b52: 75 16 jne 17b6a <_usb_parse_configuration+0x1e6> - 17b54: 8b 45 08 mov 0x8(%ebp),%eax - 17b57: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax) - 17b5e: c7 45 dc ff ff ff ff movl $0xffffffff,0xffffffdc(%ebp) - 17b65: e9 83 00 00 00 jmp 17bed <_usb_parse_configuration+0x269> - 17b6a: 83 ec 04 sub $0x4,%esp - 17b6d: ff 75 e4 pushl 0xffffffe4(%ebp) - 17b70: ff 75 e0 pushl 0xffffffe0(%ebp) - 17b73: 8b 45 08 mov 0x8(%ebp),%eax - 17b76: ff 70 10 pushl 0x10(%eax) - 17b79: e8 f2 1e 00 00 call 19a70 <_memcpy> - 17b7e: 83 c4 10 add $0x10,%esp - 17b81: 8b 55 08 mov 0x8(%ebp),%edx - 17b84: 8b 45 e4 mov 0xffffffe4(%ebp),%eax - 17b87: 89 42 14 mov %eax,0x14(%edx) - 17b8a: 83 ec 04 sub $0x4,%esp - 17b8d: ff 75 f0 pushl 0xfffffff0(%ebp) - 17b90: ff 75 0c pushl 0xc(%ebp) - 17b93: 8b 5d 08 mov 0x8(%ebp),%ebx - 17b96: 8b 4d f8 mov 0xfffffff8(%ebp),%ecx - 17b99: 89 c8 mov %ecx,%eax - 17b9b: c1 e0 02 shl $0x2,%eax - 17b9e: 01 c8 add %ecx,%eax - 17ba0: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx - 17ba7: 01 d0 add %edx,%eax - 17ba9: 01 c0 add %eax,%eax - 17bab: 01 c8 add %ecx,%eax - 17bad: c1 e0 02 shl $0x2,%eax - 17bb0: 03 43 0c add 0xc(%ebx),%eax - 17bb3: 50 push %eax - 17bb4: e8 ca f9 ff ff call 17583 <_usb_parse_interface> - 17bb9: 83 c4 10 add $0x10,%esp - 17bbc: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 17bbf: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) - 17bc3: 79 08 jns 17bcd <_usb_parse_configuration+0x249> - 17bc5: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 17bc8: 89 45 dc mov %eax,0xffffffdc(%ebp) - 17bcb: eb 20 jmp 17bed <_usb_parse_configuration+0x269> - 17bcd: 8b 55 f4 mov 0xfffffff4(%ebp),%edx - 17bd0: 8d 45 0c lea 0xc(%ebp),%eax - 17bd3: 01 10 add %edx,(%eax) - 17bd5: 8b 55 f4 mov 0xfffffff4(%ebp),%edx - 17bd8: 8d 45 f0 lea 0xfffffff0(%ebp),%eax - 17bdb: 29 10 sub %edx,(%eax) - 17bdd: 8d 45 f8 lea 0xfffffff8(%ebp),%eax - 17be0: ff 00 incl (%eax) - 17be2: e9 95 fe ff ff jmp 17a7c <_usb_parse_configuration+0xf8> - 17be7: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 17bea: 89 45 dc mov %eax,0xffffffdc(%ebp) - 17bed: 8b 45 dc mov 0xffffffdc(%ebp),%eax - 17bf0: 8b 5d fc mov 0xfffffffc(%ebp),%ebx - 17bf3: c9 leave - 17bf4: c3 ret - -00017bf5 <_usb_destroy_configuration>: - 17bf5: 55 push %ebp - 17bf6: 89 e5 mov %esp,%ebp - 17bf8: 53 push %ebx - 17bf9: 83 ec 24 sub $0x24,%esp - 17bfc: 8b 45 08 mov 0x8(%ebp),%eax - 17bff: 83 b8 84 01 00 00 00 cmpl $0x0,0x184(%eax) - 17c06: 75 05 jne 17c0d <_usb_destroy_configuration+0x18> - 17c08: e9 06 02 00 00 jmp 17e13 <_usb_destroy_configuration+0x21e> - 17c0d: 8b 45 08 mov 0x8(%ebp),%eax - 17c10: 83 b8 8c 01 00 00 00 cmpl $0x0,0x18c(%eax) - 17c17: 74 56 je 17c6f <_usb_destroy_configuration+0x7a> - 17c19: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) - 17c20: 8b 45 08 mov 0x8(%ebp),%eax - 17c23: 8a 80 81 01 00 00 mov 0x181(%eax),%al - 17c29: 25 ff 00 00 00 and $0xff,%eax - 17c2e: 3b 45 f4 cmp 0xfffffff4(%ebp),%eax - 17c31: 7e 28 jle 17c5b <_usb_destroy_configuration+0x66> - 17c33: 83 ec 0c sub $0xc,%esp - 17c36: 8b 4d 08 mov 0x8(%ebp),%ecx - 17c39: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 17c3c: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx - 17c43: 8b 81 8c 01 00 00 mov 0x18c(%ecx),%eax - 17c49: ff 34 02 pushl (%edx,%eax,1) - 17c4c: e8 ef 1d 00 00 call 19a40 <_ExFreePool@4> - 17c51: 83 c4 0c add $0xc,%esp - 17c54: 8d 45 f4 lea 0xfffffff4(%ebp),%eax - 17c57: ff 00 incl (%eax) - 17c59: eb c5 jmp 17c20 <_usb_destroy_configuration+0x2b> - 17c5b: 83 ec 0c sub $0xc,%esp - 17c5e: 8b 45 08 mov 0x8(%ebp),%eax - 17c61: ff b0 8c 01 00 00 pushl 0x18c(%eax) - 17c67: e8 d4 1d 00 00 call 19a40 <_ExFreePool@4> - 17c6c: 83 c4 0c add $0xc,%esp - 17c6f: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) - 17c76: 8b 45 08 mov 0x8(%ebp),%eax - 17c79: 8a 80 81 01 00 00 mov 0x181(%eax),%al - 17c7f: 25 ff 00 00 00 and $0xff,%eax - 17c84: 3b 45 f8 cmp 0xfffffff8(%ebp),%eax - 17c87: 0f 8e 72 01 00 00 jle 17dff <_usb_destroy_configuration+0x20a> - 17c8d: 8b 4d 08 mov 0x8(%ebp),%ecx - 17c90: 8b 55 f8 mov 0xfffffff8(%ebp),%edx - 17c93: 89 d0 mov %edx,%eax - 17c95: 01 c0 add %eax,%eax - 17c97: 01 d0 add %edx,%eax - 17c99: c1 e0 03 shl $0x3,%eax - 17c9c: 03 81 84 01 00 00 add 0x184(%ecx),%eax - 17ca2: 89 45 e8 mov %eax,0xffffffe8(%ebp) - 17ca5: 8b 45 e8 mov 0xffffffe8(%ebp),%eax - 17ca8: 83 78 0c 00 cmpl $0x0,0xc(%eax) - 17cac: 75 05 jne 17cb3 <_usb_destroy_configuration+0xbe> - 17cae: e9 4c 01 00 00 jmp 17dff <_usb_destroy_configuration+0x20a> - 17cb3: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) - 17cba: 8b 45 e8 mov 0xffffffe8(%ebp),%eax - 17cbd: 8a 40 04 mov 0x4(%eax),%al - 17cc0: 25 ff 00 00 00 and $0xff,%eax - 17cc5: 3b 45 f4 cmp 0xfffffff4(%ebp),%eax - 17cc8: 0f 8e 16 01 00 00 jle 17de4 <_usb_destroy_configuration+0x1ef> - 17cce: 8b 5d e8 mov 0xffffffe8(%ebp),%ebx - 17cd1: 8b 4d f4 mov 0xfffffff4(%ebp),%ecx - 17cd4: 89 c8 mov %ecx,%eax - 17cd6: c1 e0 02 shl $0x2,%eax - 17cd9: 01 c8 add %ecx,%eax - 17cdb: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx - 17ce2: 01 d0 add %edx,%eax - 17ce4: 01 c0 add %eax,%eax - 17ce6: 01 c8 add %ecx,%eax - 17ce8: c1 e0 02 shl $0x2,%eax - 17ceb: 03 43 0c add 0xc(%ebx),%eax - 17cee: 89 45 e4 mov %eax,0xffffffe4(%ebp) - 17cf1: 8b 45 e4 mov 0xffffffe4(%ebp),%eax - 17cf4: 83 38 00 cmpl $0x0,(%eax) - 17cf7: 75 05 jne 17cfe <_usb_destroy_configuration+0x109> - 17cf9: e9 e6 00 00 00 jmp 17de4 <_usb_destroy_configuration+0x1ef> - 17cfe: c7 45 f0 00 00 00 00 movl $0x0,0xfffffff0(%ebp) - 17d05: 8b 55 e4 mov 0xffffffe4(%ebp),%edx - 17d08: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 17d0b: 3b 42 08 cmp 0x8(%edx),%eax - 17d0e: 0f 83 b6 00 00 00 jae 17dca <_usb_destroy_configuration+0x1d5> - 17d14: 8b 4d e4 mov 0xffffffe4(%ebp),%ecx - 17d17: 8b 55 f0 mov 0xfffffff0(%ebp),%edx - 17d1a: 89 d0 mov %edx,%eax - 17d1c: 01 c0 add %eax,%eax - 17d1e: 01 d0 add %edx,%eax - 17d20: c1 e0 03 shl $0x3,%eax - 17d23: 03 01 add (%ecx),%eax - 17d25: 89 45 e0 mov %eax,0xffffffe0(%ebp) - 17d28: 8b 45 e0 mov 0xffffffe0(%ebp),%eax - 17d2b: 83 78 10 00 cmpl $0x0,0x10(%eax) - 17d2f: 74 11 je 17d42 <_usb_destroy_configuration+0x14d> - 17d31: 83 ec 0c sub $0xc,%esp - 17d34: 8b 45 e0 mov 0xffffffe0(%ebp),%eax - 17d37: ff 70 10 pushl 0x10(%eax) - 17d3a: e8 01 1d 00 00 call 19a40 <_ExFreePool@4> - 17d3f: 83 c4 0c add $0xc,%esp - 17d42: 8b 45 e0 mov 0xffffffe0(%ebp),%eax - 17d45: 83 78 0c 00 cmpl $0x0,0xc(%eax) - 17d49: 75 02 jne 17d4d <_usb_destroy_configuration+0x158> - 17d4b: eb 7d jmp 17dca <_usb_destroy_configuration+0x1d5> - 17d4d: c7 45 ec 00 00 00 00 movl $0x0,0xffffffec(%ebp) - 17d54: 8b 45 e0 mov 0xffffffe0(%ebp),%eax - 17d57: 8a 40 04 mov 0x4(%eax),%al - 17d5a: 25 ff 00 00 00 and $0xff,%eax - 17d5f: 3b 45 ec cmp 0xffffffec(%ebp),%eax - 17d62: 7e 4b jle 17daf <_usb_destroy_configuration+0x1ba> - 17d64: 8b 4d e0 mov 0xffffffe0(%ebp),%ecx - 17d67: 8b 55 ec mov 0xffffffec(%ebp),%edx - 17d6a: 89 d0 mov %edx,%eax - 17d6c: c1 e0 02 shl $0x2,%eax - 17d6f: 01 d0 add %edx,%eax - 17d71: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx - 17d78: 8b 41 0c mov 0xc(%ecx),%eax - 17d7b: 83 7c 02 0c 00 cmpl $0x0,0xc(%edx,%eax,1) - 17d80: 74 26 je 17da8 <_usb_destroy_configuration+0x1b3> - 17d82: 83 ec 0c sub $0xc,%esp - 17d85: 8b 4d e0 mov 0xffffffe0(%ebp),%ecx - 17d88: 8b 55 ec mov 0xffffffec(%ebp),%edx - 17d8b: 89 d0 mov %edx,%eax - 17d8d: c1 e0 02 shl $0x2,%eax - 17d90: 01 d0 add %edx,%eax - 17d92: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx - 17d99: 8b 41 0c mov 0xc(%ecx),%eax - 17d9c: ff 74 02 0c pushl 0xc(%edx,%eax,1) - 17da0: e8 9b 1c 00 00 call 19a40 <_ExFreePool@4> - 17da5: 83 c4 0c add $0xc,%esp - 17da8: 8d 45 ec lea 0xffffffec(%ebp),%eax - 17dab: ff 00 incl (%eax) - 17dad: eb a5 jmp 17d54 <_usb_destroy_configuration+0x15f> - 17daf: 83 ec 0c sub $0xc,%esp - 17db2: 8b 45 e0 mov 0xffffffe0(%ebp),%eax - 17db5: ff 70 0c pushl 0xc(%eax) - 17db8: e8 83 1c 00 00 call 19a40 <_ExFreePool@4> - 17dbd: 83 c4 0c add $0xc,%esp - 17dc0: 8d 45 f0 lea 0xfffffff0(%ebp),%eax - 17dc3: ff 00 incl (%eax) - 17dc5: e9 3b ff ff ff jmp 17d05 <_usb_destroy_configuration+0x110> - 17dca: 83 ec 0c sub $0xc,%esp - 17dcd: 8b 45 e4 mov 0xffffffe4(%ebp),%eax - 17dd0: ff 30 pushl (%eax) - 17dd2: e8 69 1c 00 00 call 19a40 <_ExFreePool@4> - 17dd7: 83 c4 0c add $0xc,%esp - 17dda: 8d 45 f4 lea 0xfffffff4(%ebp),%eax - 17ddd: ff 00 incl (%eax) - 17ddf: e9 d6 fe ff ff jmp 17cba <_usb_destroy_configuration+0xc5> - 17de4: 83 ec 0c sub $0xc,%esp - 17de7: 8b 45 e8 mov 0xffffffe8(%ebp),%eax - 17dea: ff 70 0c pushl 0xc(%eax) - 17ded: e8 4e 1c 00 00 call 19a40 <_ExFreePool@4> - 17df2: 83 c4 0c add $0xc,%esp - 17df5: 8d 45 f8 lea 0xfffffff8(%ebp),%eax - 17df8: ff 00 incl (%eax) - 17dfa: e9 77 fe ff ff jmp 17c76 <_usb_destroy_configuration+0x81> - 17dff: 83 ec 0c sub $0xc,%esp - 17e02: 8b 45 08 mov 0x8(%ebp),%eax - 17e05: ff b0 84 01 00 00 pushl 0x184(%eax) - 17e0b: e8 30 1c 00 00 call 19a40 <_ExFreePool@4> - 17e10: 83 c4 0c add $0xc,%esp - 17e13: 8b 5d fc mov 0xfffffffc(%ebp),%ebx - 17e16: c9 leave - 17e17: c3 ret - -00017e18 <_usb_get_configuration>: - 17e18: 55 push %ebp - 17e19: 89 e5 mov %esp,%ebp - 17e1b: 53 push %ebx - 17e1c: 83 ec 24 sub $0x24,%esp - 17e1f: 8b 45 08 mov 0x8(%ebp),%eax - 17e22: 80 b8 81 01 00 00 08 cmpb $0x8,0x181(%eax) - 17e29: 76 0c jbe 17e37 <_usb_get_configuration+0x1f> - 17e2b: c7 45 e0 ea ff ff ff movl $0xffffffea,0xffffffe0(%ebp) - 17e32: e9 78 02 00 00 jmp 180af <_usb_get_configuration+0x297> - 17e37: 8b 45 08 mov 0x8(%ebp),%eax - 17e3a: 80 b8 81 01 00 00 00 cmpb $0x0,0x181(%eax) - 17e41: 75 0c jne 17e4f <_usb_get_configuration+0x37> - 17e43: c7 45 e0 ea ff ff ff movl $0xffffffea,0xffffffe0(%ebp) - 17e4a: e9 60 02 00 00 jmp 180af <_usb_get_configuration+0x297> - 17e4f: 8b 5d 08 mov 0x8(%ebp),%ebx - 17e52: 83 ec 08 sub $0x8,%esp - 17e55: 8b 45 08 mov 0x8(%ebp),%eax - 17e58: ba 00 00 00 00 mov $0x0,%edx - 17e5d: 8a 90 81 01 00 00 mov 0x181(%eax),%dl - 17e63: 89 d0 mov %edx,%eax - 17e65: 01 c0 add %eax,%eax - 17e67: 01 d0 add %edx,%eax - 17e69: c1 e0 03 shl $0x3,%eax - 17e6c: 50 push %eax - 17e6d: 6a 01 push $0x1 - 17e6f: e8 bc 1b 00 00 call 19a30 <_ExAllocatePool@8> - 17e74: 83 c4 08 add $0x8,%esp - 17e77: 89 83 84 01 00 00 mov %eax,0x184(%ebx) - 17e7d: 8b 45 08 mov 0x8(%ebp),%eax - 17e80: 83 b8 84 01 00 00 00 cmpl $0x0,0x184(%eax) - 17e87: 75 0c jne 17e95 <_usb_get_configuration+0x7d> - 17e89: c7 45 e0 f4 ff ff ff movl $0xfffffff4,0xffffffe0(%ebp) - 17e90: e9 1a 02 00 00 jmp 180af <_usb_get_configuration+0x297> - 17e95: 83 ec 04 sub $0x4,%esp - 17e98: 8b 45 08 mov 0x8(%ebp),%eax - 17e9b: ba 00 00 00 00 mov $0x0,%edx - 17ea0: 8a 90 81 01 00 00 mov 0x181(%eax),%dl - 17ea6: 89 d0 mov %edx,%eax - 17ea8: 01 c0 add %eax,%eax - 17eaa: 01 d0 add %edx,%eax - 17eac: c1 e0 03 shl $0x3,%eax - 17eaf: 50 push %eax - 17eb0: 6a 00 push $0x0 - 17eb2: 8b 45 08 mov 0x8(%ebp),%eax - 17eb5: ff b0 84 01 00 00 pushl 0x184(%eax) - 17ebb: e8 90 1b 00 00 call 19a50 <_memset> - 17ec0: 83 c4 10 add $0x10,%esp - 17ec3: 8b 5d 08 mov 0x8(%ebp),%ebx - 17ec6: 83 ec 08 sub $0x8,%esp - 17ec9: 8b 45 08 mov 0x8(%ebp),%eax - 17ecc: 8a 80 81 01 00 00 mov 0x181(%eax),%al - 17ed2: 25 ff 00 00 00 and $0xff,%eax - 17ed7: c1 e0 02 shl $0x2,%eax - 17eda: 50 push %eax - 17edb: 6a 01 push $0x1 - 17edd: e8 4e 1b 00 00 call 19a30 <_ExAllocatePool@8> - 17ee2: 83 c4 08 add $0x8,%esp - 17ee5: 89 83 8c 01 00 00 mov %eax,0x18c(%ebx) - 17eeb: 8b 45 08 mov 0x8(%ebp),%eax - 17eee: 83 b8 8c 01 00 00 00 cmpl $0x0,0x18c(%eax) - 17ef5: 75 0c jne 17f03 <_usb_get_configuration+0xeb> - 17ef7: c7 45 e0 f4 ff ff ff movl $0xfffffff4,0xffffffe0(%ebp) - 17efe: e9 ac 01 00 00 jmp 180af <_usb_get_configuration+0x297> - 17f03: 83 ec 08 sub $0x8,%esp - 17f06: 6a 08 push $0x8 - 17f08: 6a 01 push $0x1 - 17f0a: e8 21 1b 00 00 call 19a30 <_ExAllocatePool@8> - 17f0f: 83 c4 08 add $0x8,%esp - 17f12: 89 45 ec mov %eax,0xffffffec(%ebp) - 17f15: 83 7d ec 00 cmpl $0x0,0xffffffec(%ebp) - 17f19: 75 0c jne 17f27 <_usb_get_configuration+0x10f> - 17f1b: c7 45 e0 f4 ff ff ff movl $0xfffffff4,0xffffffe0(%ebp) - 17f22: e9 88 01 00 00 jmp 180af <_usb_get_configuration+0x297> - 17f27: 8b 45 ec mov 0xffffffec(%ebp),%eax - 17f2a: 89 45 e4 mov %eax,0xffffffe4(%ebp) - 17f2d: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) - 17f34: 8b 45 08 mov 0x8(%ebp),%eax - 17f37: 8a 80 81 01 00 00 mov 0x181(%eax),%al - 17f3d: 25 ff 00 00 00 and $0xff,%eax - 17f42: 3b 45 f4 cmp 0xfffffff4(%ebp),%eax - 17f45: 0f 86 2d 01 00 00 jbe 18078 <_usb_get_configuration+0x260> - 17f4b: 83 ec 0c sub $0xc,%esp - 17f4e: 6a 08 push $0x8 - 17f50: ff 75 ec pushl 0xffffffec(%ebp) - 17f53: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 17f56: 25 ff 00 00 00 and $0xff,%eax - 17f5b: 50 push %eax - 17f5c: 6a 02 push $0x2 - 17f5e: ff 75 08 pushl 0x8(%ebp) - 17f61: e8 f6 93 ff ff call 1135c <_usb_get_descriptor> - 17f66: 83 c4 20 add $0x20,%esp - 17f69: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 17f6c: 83 7d f8 07 cmpl $0x7,0xfffffff8(%ebp) - 17f70: 7f 17 jg 17f89 <_usb_get_configuration+0x171> - 17f72: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) - 17f76: 79 05 jns 17f7d <_usb_get_configuration+0x165> - 17f78: e9 12 01 00 00 jmp 1808f <_usb_get_configuration+0x277> - 17f7d: c7 45 f8 ea ff ff ff movl $0xffffffea,0xfffffff8(%ebp) - 17f84: e9 06 01 00 00 jmp 1808f <_usb_get_configuration+0x277> - 17f89: 8b 45 e4 mov 0xffffffe4(%ebp),%eax - 17f8c: 66 8b 40 02 mov 0x2(%eax),%ax - 17f90: 25 ff ff 00 00 and $0xffff,%eax - 17f95: 89 45 f0 mov %eax,0xfffffff0(%ebp) - 17f98: 83 ec 08 sub $0x8,%esp - 17f9b: ff 75 f0 pushl 0xfffffff0(%ebp) - 17f9e: 6a 01 push $0x1 - 17fa0: e8 8b 1a 00 00 call 19a30 <_ExAllocatePool@8> - 17fa5: 83 c4 08 add $0x8,%esp - 17fa8: 89 45 e8 mov %eax,0xffffffe8(%ebp) - 17fab: 83 7d e8 00 cmpl $0x0,0xffffffe8(%ebp) - 17faf: 75 0c jne 17fbd <_usb_get_configuration+0x1a5> - 17fb1: c7 45 f8 f4 ff ff ff movl $0xfffffff4,0xfffffff8(%ebp) - 17fb8: e9 d2 00 00 00 jmp 1808f <_usb_get_configuration+0x277> - 17fbd: 83 ec 0c sub $0xc,%esp - 17fc0: ff 75 f0 pushl 0xfffffff0(%ebp) - 17fc3: ff 75 e8 pushl 0xffffffe8(%ebp) - 17fc6: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 17fc9: 25 ff 00 00 00 and $0xff,%eax - 17fce: 50 push %eax - 17fcf: 6a 02 push $0x2 - 17fd1: ff 75 08 pushl 0x8(%ebp) - 17fd4: e8 83 93 ff ff call 1135c <_usb_get_descriptor> - 17fd9: 83 c4 20 add $0x20,%esp - 17fdc: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 17fdf: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) - 17fe3: 79 13 jns 17ff8 <_usb_get_configuration+0x1e0> - 17fe5: 83 ec 0c sub $0xc,%esp - 17fe8: ff 75 e8 pushl 0xffffffe8(%ebp) - 17feb: e8 50 1a 00 00 call 19a40 <_ExFreePool@4> - 17ff0: 83 c4 0c add $0xc,%esp - 17ff3: e9 97 00 00 00 jmp 1808f <_usb_get_configuration+0x277> - 17ff8: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 17ffb: 3b 45 f0 cmp 0xfffffff0(%ebp),%eax - 17ffe: 73 17 jae 18017 <_usb_get_configuration+0x1ff> - 18000: c7 45 f8 ea ff ff ff movl $0xffffffea,0xfffffff8(%ebp) - 18007: 83 ec 0c sub $0xc,%esp - 1800a: ff 75 e8 pushl 0xffffffe8(%ebp) - 1800d: e8 2e 1a 00 00 call 19a40 <_ExFreePool@4> - 18012: 83 c4 0c add $0xc,%esp - 18015: eb 78 jmp 1808f <_usb_get_configuration+0x277> - 18017: 8b 55 08 mov 0x8(%ebp),%edx - 1801a: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 1801d: 8d 0c 85 00 00 00 00 lea 0x0(,%eax,4),%ecx - 18024: 8b 92 8c 01 00 00 mov 0x18c(%edx),%edx - 1802a: 8b 45 e8 mov 0xffffffe8(%ebp),%eax - 1802d: 89 04 11 mov %eax,(%ecx,%edx,1) - 18030: 83 ec 08 sub $0x8,%esp - 18033: ff 75 e8 pushl 0xffffffe8(%ebp) - 18036: 8b 4d 08 mov 0x8(%ebp),%ecx - 18039: 8b 55 f4 mov 0xfffffff4(%ebp),%edx - 1803c: 89 d0 mov %edx,%eax - 1803e: 01 c0 add %eax,%eax - 18040: 01 d0 add %edx,%eax - 18042: c1 e0 03 shl $0x3,%eax - 18045: 03 81 84 01 00 00 add 0x184(%ecx),%eax - 1804b: 50 push %eax - 1804c: e8 33 f9 ff ff call 17984 <_usb_parse_configuration> - 18051: 83 c4 10 add $0x10,%esp - 18054: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 18057: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) - 1805b: 7e 02 jle 1805f <_usb_get_configuration+0x247> - 1805d: eb 0f jmp 1806e <_usb_get_configuration+0x256> - 1805f: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) - 18063: 79 09 jns 1806e <_usb_get_configuration+0x256> - 18065: c7 45 f8 ea ff ff ff movl $0xffffffea,0xfffffff8(%ebp) - 1806c: eb 21 jmp 1808f <_usb_get_configuration+0x277> - 1806e: 8d 45 f4 lea 0xfffffff4(%ebp),%eax - 18071: ff 00 incl (%eax) - 18073: e9 bc fe ff ff jmp 17f34 <_usb_get_configuration+0x11c> - 18078: 83 ec 0c sub $0xc,%esp - 1807b: ff 75 ec pushl 0xffffffec(%ebp) - 1807e: e8 bd 19 00 00 call 19a40 <_ExFreePool@4> - 18083: 83 c4 0c add $0xc,%esp - 18086: c7 45 e0 00 00 00 00 movl $0x0,0xffffffe0(%ebp) - 1808d: eb 20 jmp 180af <_usb_get_configuration+0x297> - 1808f: 83 ec 0c sub $0xc,%esp - 18092: ff 75 ec pushl 0xffffffec(%ebp) - 18095: e8 a6 19 00 00 call 19a40 <_ExFreePool@4> - 1809a: 83 c4 0c add $0xc,%esp - 1809d: 8b 45 08 mov 0x8(%ebp),%eax - 180a0: 8b 55 f4 mov 0xfffffff4(%ebp),%edx - 180a3: 88 90 81 01 00 00 mov %dl,0x181(%eax) - 180a9: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 180ac: 89 45 e0 mov %eax,0xffffffe0(%ebp) - 180af: 8b 45 e0 mov 0xffffffe0(%ebp),%eax - 180b2: 8b 5d fc mov 0xfffffffc(%ebp),%ebx - 180b5: c9 leave - 180b6: c3 ret - 180b7: 90 nop - 180b8: 90 nop - 180b9: 90 nop - 180ba: 90 nop - 180bb: 90 nop - 180bc: 90 nop - 180bd: 90 nop - 180be: 90 nop - 180bf: 90 nop - -000180c0 <_usb_init_urb@4>: - 180c0: 55 push %ebp - 180c1: 89 e5 mov %esp,%ebp - 180c3: 83 ec 08 sub $0x8,%esp - 180c6: 83 7d 08 00 cmpl $0x0,0x8(%ebp) - 180ca: 74 1c je 180e8 <_usb_init_urb@4+0x28> - 180cc: 83 ec 04 sub $0x4,%esp - 180cf: 6a 5c push $0x5c - 180d1: 6a 00 push $0x0 - 180d3: ff 75 08 pushl 0x8(%ebp) - 180d6: e8 75 19 00 00 call 19a50 <_memset> - 180db: 83 c4 10 add $0x10,%esp - 180de: 8b 45 08 mov 0x8(%ebp),%eax - 180e1: c7 40 04 01 00 00 00 movl $0x1,0x4(%eax) - 180e8: c9 leave - 180e9: c2 04 00 ret $0x4 - -000180ec <_usb_alloc_urb@8>: - 180ec: 55 push %ebp - 180ed: 89 e5 mov %esp,%ebp - 180ef: 83 ec 08 sub $0x8,%esp - 180f2: 83 ec 08 sub $0x8,%esp - 180f5: 8b 45 08 mov 0x8(%ebp),%eax - 180f8: c1 e0 04 shl $0x4,%eax - 180fb: 83 c0 5c add $0x5c,%eax - 180fe: 50 push %eax - 180ff: 6a 01 push $0x1 - 18101: e8 2a 19 00 00 call 19a30 <_ExAllocatePool@8> - 18106: 83 c4 08 add $0x8,%esp - 18109: 89 45 fc mov %eax,0xfffffffc(%ebp) - 1810c: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) - 18110: 75 09 jne 1811b <_usb_alloc_urb@8+0x2f> - 18112: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) - 18119: eb 14 jmp 1812f <_usb_alloc_urb@8+0x43> - 1811b: 83 ec 0c sub $0xc,%esp - 1811e: ff 75 fc pushl 0xfffffffc(%ebp) - 18121: e8 9a ff ff ff call 180c0 <_usb_init_urb@4> - 18126: 83 c4 0c add $0xc,%esp - 18129: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 1812c: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 1812f: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 18132: c9 leave - 18133: c2 08 00 ret $0x8 - -00018136 <_usb_free_urb@4>: - 18136: 55 push %ebp - 18137: 89 e5 mov %esp,%ebp - 18139: 83 ec 08 sub $0x8,%esp - 1813c: 83 7d 08 00 cmpl $0x0,0x8(%ebp) - 18140: 74 2a je 1816c <_usb_free_urb@4+0x36> - 18142: 8b 55 08 mov 0x8(%ebp),%edx - 18145: 83 c2 04 add $0x4,%edx - 18148: 8b 45 08 mov 0x8(%ebp),%eax - 1814b: 83 c0 04 add $0x4,%eax - 1814e: 8b 00 mov (%eax),%eax - 18150: 48 dec %eax - 18151: 89 02 mov %eax,(%edx) - 18153: 8b 45 08 mov 0x8(%ebp),%eax - 18156: 83 c0 04 add $0x4,%eax - 18159: 83 38 00 cmpl $0x0,(%eax) - 1815c: 75 0e jne 1816c <_usb_free_urb@4+0x36> - 1815e: 83 ec 0c sub $0xc,%esp - 18161: ff 75 08 pushl 0x8(%ebp) - 18164: e8 d7 18 00 00 call 19a40 <_ExFreePool@4> - 18169: 83 c4 0c add $0xc,%esp - 1816c: c9 leave - 1816d: c2 04 00 ret $0x4 - -00018170 <_usb_get_urb@4>: - 18170: 55 push %ebp - 18171: 89 e5 mov %esp,%ebp - 18173: 83 ec 04 sub $0x4,%esp - 18176: 83 7d 08 00 cmpl $0x0,0x8(%ebp) - 1817a: 74 19 je 18195 <_usb_get_urb@4+0x25> - 1817c: 8b 55 08 mov 0x8(%ebp),%edx - 1817f: 83 c2 04 add $0x4,%edx - 18182: 8b 45 08 mov 0x8(%ebp),%eax - 18185: 83 c0 04 add $0x4,%eax - 18188: 8b 00 mov (%eax),%eax - 1818a: 40 inc %eax - 1818b: 89 02 mov %eax,(%edx) - 1818d: 8b 45 08 mov 0x8(%ebp),%eax - 18190: 89 45 fc mov %eax,0xfffffffc(%ebp) - 18193: eb 07 jmp 1819c <_usb_get_urb@4+0x2c> - 18195: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) - 1819c: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 1819f: c9 leave - 181a0: c2 04 00 ret $0x4 - -000181a3 <_usb_submit_urb@8>: - 181a3: 55 push %ebp - 181a4: 89 e5 mov %esp,%ebp - 181a6: 53 push %ebx - 181a7: 83 ec 34 sub $0x34,%esp - 181aa: 83 7d 08 00 cmpl $0x0,0x8(%ebp) - 181ae: 74 12 je 181c2 <_usb_submit_urb@8+0x1f> - 181b0: 8b 45 08 mov 0x8(%ebp),%eax - 181b3: 83 78 08 00 cmpl $0x0,0x8(%eax) - 181b7: 75 09 jne 181c2 <_usb_submit_urb@8+0x1f> - 181b9: 8b 45 08 mov 0x8(%ebp),%eax - 181bc: 83 78 58 00 cmpl $0x0,0x58(%eax) - 181c0: 75 0c jne 181ce <_usb_submit_urb@8+0x2b> - 181c2: c7 45 d4 ea ff ff ff movl $0xffffffea,0xffffffd4(%ebp) - 181c9: e9 e2 02 00 00 jmp 184b0 <_usb_submit_urb@8+0x30d> - 181ce: 8b 45 08 mov 0x8(%ebp),%eax - 181d1: 8b 40 14 mov 0x14(%eax),%eax - 181d4: 89 45 ec mov %eax,0xffffffec(%ebp) - 181d7: 85 c0 test %eax,%eax - 181d9: 74 1f je 181fa <_usb_submit_urb@8+0x57> - 181db: 8b 45 ec mov 0xffffffec(%ebp),%eax - 181de: 83 78 14 02 cmpl $0x2,0x14(%eax) - 181e2: 76 16 jbe 181fa <_usb_submit_urb@8+0x57> - 181e4: 8b 45 ec mov 0xffffffec(%ebp),%eax - 181e7: 83 b8 bc 00 00 00 00 cmpl $0x0,0xbc(%eax) - 181ee: 74 0a je 181fa <_usb_submit_urb@8+0x57> - 181f0: 8b 45 ec mov 0xffffffec(%ebp),%eax - 181f3: 83 38 00 cmpl $0x0,(%eax) - 181f6: 7e 02 jle 181fa <_usb_submit_urb@8+0x57> - 181f8: eb 0c jmp 18206 <_usb_submit_urb@8+0x63> - 181fa: c7 45 d4 ed ff ff ff movl $0xffffffed,0xffffffd4(%ebp) - 18201: e9 aa 02 00 00 jmp 184b0 <_usb_submit_urb@8+0x30d> - 18206: 8b 45 ec mov 0xffffffec(%ebp),%eax - 18209: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax - 1820f: 8b 40 20 mov 0x20(%eax),%eax - 18212: 89 45 e8 mov %eax,0xffffffe8(%ebp) - 18215: 85 c0 test %eax,%eax - 18217: 74 09 je 18222 <_usb_submit_urb@8+0x7f> - 18219: 8b 45 e8 mov 0xffffffe8(%ebp),%eax - 1821c: 83 78 0c 00 cmpl $0x0,0xc(%eax) - 18220: 75 0c jne 1822e <_usb_submit_urb@8+0x8b> - 18222: c7 45 d4 ed ff ff ff movl $0xffffffed,0xffffffd4(%ebp) - 18229: e9 82 02 00 00 jmp 184b0 <_usb_submit_urb@8+0x30d> - 1822e: 8b 45 08 mov 0x8(%ebp),%eax - 18231: c7 40 1c 8d ff ff ff movl $0xffffff8d,0x1c(%eax) - 18238: 8b 45 08 mov 0x8(%ebp),%eax - 1823b: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) - 18242: 8b 45 08 mov 0x8(%ebp),%eax - 18245: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) - 1824c: 8b 45 08 mov 0x8(%ebp),%eax - 1824f: 8b 40 18 mov 0x18(%eax),%eax - 18252: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 18255: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 18258: c1 f8 1e sar $0x1e,%eax - 1825b: 83 e0 03 and $0x3,%eax - 1825e: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 18261: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 18264: c1 e8 07 shr $0x7,%eax - 18267: 83 f0 01 xor $0x1,%eax - 1826a: 83 e0 01 and $0x1,%eax - 1826d: 89 45 e4 mov %eax,0xffffffe4(%ebp) - 18270: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 18273: c1 f8 1e sar $0x1e,%eax - 18276: 83 e0 03 and $0x3,%eax - 18279: 83 f8 02 cmp $0x2,%eax - 1827c: 74 15 je 18293 <_usb_submit_urb@8+0xf0> - 1827e: 8b 45 ec mov 0xffffffec(%ebp),%eax - 18281: 83 78 14 04 cmpl $0x4,0x14(%eax) - 18285: 77 0c ja 18293 <_usb_submit_urb@8+0xf0> - 18287: c7 45 d4 ed ff ff ff movl $0xffffffed,0xffffffd4(%ebp) - 1828e: e9 1d 02 00 00 jmp 184b0 <_usb_submit_urb@8+0x30d> - 18293: 8b 55 ec mov 0xffffffec(%ebp),%edx - 18296: 8b 5d e4 mov 0xffffffe4(%ebp),%ebx - 18299: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 1829c: c1 f8 0f sar $0xf,%eax - 1829f: 89 c1 mov %eax,%ecx - 182a1: 83 e1 0f and $0xf,%ecx - 182a4: b8 01 00 00 00 mov $0x1,%eax - 182a9: d3 e0 shl %cl,%eax - 182ab: 23 44 9a 30 and 0x30(%edx,%ebx,4),%eax - 182af: 85 c0 test %eax,%eax - 182b1: 74 0c je 182bf <_usb_submit_urb@8+0x11c> - 182b3: c7 45 d4 e0 ff ff ff movl $0xffffffe0,0xffffffd4(%ebp) - 182ba: e9 f1 01 00 00 jmp 184b0 <_usb_submit_urb@8+0x30d> - 182bf: 83 7d e4 00 cmpl $0x0,0xffffffe4(%ebp) - 182c3: 74 15 je 182da <_usb_submit_urb@8+0x137> - 182c5: 8b 55 ec mov 0xffffffec(%ebp),%edx - 182c8: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 182cb: c1 f8 0f sar $0xf,%eax - 182ce: 83 e0 0f and $0xf,%eax - 182d1: 8b 44 82 78 mov 0x78(%edx,%eax,4),%eax - 182d5: 89 45 d0 mov %eax,0xffffffd0(%ebp) - 182d8: eb 13 jmp 182ed <_usb_submit_urb@8+0x14a> - 182da: 8b 55 ec mov 0xffffffec(%ebp),%edx - 182dd: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 182e0: c1 f8 0f sar $0xf,%eax - 182e3: 83 e0 0f and $0xf,%eax - 182e6: 8b 44 82 38 mov 0x38(%edx,%eax,4),%eax - 182ea: 89 45 d0 mov %eax,0xffffffd0(%ebp) - 182ed: 8b 45 d0 mov 0xffffffd0(%ebp),%eax - 182f0: 89 45 f0 mov %eax,0xfffffff0(%ebp) - 182f3: 83 7d f0 00 cmpl $0x0,0xfffffff0(%ebp) - 182f7: 7f 0c jg 18305 <_usb_submit_urb@8+0x162> - 182f9: c7 45 d4 a6 ff ff ff movl $0xffffffa6,0xffffffd4(%ebp) - 18300: e9 ab 01 00 00 jmp 184b0 <_usb_submit_urb@8+0x30d> - 18305: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) - 18309: 0f 85 ae 00 00 00 jne 183bd <_usb_submit_urb@8+0x21a> - 1830f: 8b 45 ec mov 0xffffffec(%ebp),%eax - 18312: 83 78 18 03 cmpl $0x3,0x18(%eax) - 18316: 75 20 jne 18338 <_usb_submit_urb@8+0x195> - 18318: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 1831b: c1 f8 0b sar $0xb,%eax - 1831e: 83 e0 03 and $0x3,%eax - 18321: 40 inc %eax - 18322: 89 45 d8 mov %eax,0xffffffd8(%ebp) - 18325: 8d 45 f0 lea 0xfffffff0(%ebp),%eax - 18328: 81 20 ff 03 00 00 andl $0x3ff,(%eax) - 1832e: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 18331: 0f af 45 d8 imul 0xffffffd8(%ebp),%eax - 18335: 89 45 f0 mov %eax,0xfffffff0(%ebp) - 18338: 8b 45 08 mov 0x8(%ebp),%eax - 1833b: 83 78 44 00 cmpl $0x0,0x44(%eax) - 1833f: 7f 0c jg 1834d <_usb_submit_urb@8+0x1aa> - 18341: c7 45 d4 ea ff ff ff movl $0xffffffea,0xffffffd4(%ebp) - 18348: e9 63 01 00 00 jmp 184b0 <_usb_submit_urb@8+0x30d> - 1834d: c7 45 e0 00 00 00 00 movl $0x0,0xffffffe0(%ebp) - 18354: 8b 45 08 mov 0x8(%ebp),%eax - 18357: 8b 40 44 mov 0x44(%eax),%eax - 1835a: 3b 45 e0 cmp 0xffffffe0(%ebp),%eax - 1835d: 7e 5e jle 183bd <_usb_submit_urb@8+0x21a> - 1835f: 8b 55 08 mov 0x8(%ebp),%edx - 18362: 8b 45 e0 mov 0xffffffe0(%ebp),%eax - 18365: c1 e0 04 shl $0x4,%eax - 18368: 01 d0 add %edx,%eax - 1836a: 83 c0 60 add $0x60,%eax - 1836d: 8b 00 mov (%eax),%eax - 1836f: 89 45 dc mov %eax,0xffffffdc(%ebp) - 18372: 83 7d dc 00 cmpl $0x0,0xffffffdc(%ebp) - 18376: 78 0a js 18382 <_usb_submit_urb@8+0x1df> - 18378: 8b 45 dc mov 0xffffffdc(%ebp),%eax - 1837b: 3b 45 f0 cmp 0xfffffff0(%ebp),%eax - 1837e: 7f 02 jg 18382 <_usb_submit_urb@8+0x1df> - 18380: eb 0c jmp 1838e <_usb_submit_urb@8+0x1eb> - 18382: c7 45 d4 a6 ff ff ff movl $0xffffffa6,0xffffffd4(%ebp) - 18389: e9 22 01 00 00 jmp 184b0 <_usb_submit_urb@8+0x30d> - 1838e: 8b 55 08 mov 0x8(%ebp),%edx - 18391: 8b 45 e0 mov 0xffffffe0(%ebp),%eax - 18394: c1 e0 04 shl $0x4,%eax - 18397: 01 d0 add %edx,%eax - 18399: 83 c0 68 add $0x68,%eax - 1839c: c7 00 ee ff ff ff movl $0xffffffee,(%eax) - 183a2: 8b 55 08 mov 0x8(%ebp),%edx - 183a5: 8b 45 e0 mov 0xffffffe0(%ebp),%eax - 183a8: c1 e0 04 shl $0x4,%eax - 183ab: 01 d0 add %edx,%eax - 183ad: 83 c0 64 add $0x64,%eax - 183b0: c7 00 00 00 00 00 movl $0x0,(%eax) - 183b6: 8d 45 e0 lea 0xffffffe0(%ebp),%eax - 183b9: ff 00 incl (%eax) - 183bb: eb 97 jmp 18354 <_usb_submit_urb@8+0x1b1> - 183bd: 8b 45 08 mov 0x8(%ebp),%eax - 183c0: 83 78 2c 00 cmpl $0x0,0x2c(%eax) - 183c4: 79 0c jns 183d2 <_usb_submit_urb@8+0x22f> - 183c6: c7 45 d4 a6 ff ff ff movl $0xffffffa6,0xffffffd4(%ebp) - 183cd: e9 de 00 00 00 jmp 184b0 <_usb_submit_urb@8+0x30d> - 183d2: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 183d5: 83 c0 00 add $0x0,%eax - 183d8: 83 f8 01 cmp $0x1,%eax - 183db: 0f 87 b8 00 00 00 ja 18499 <_usb_submit_urb@8+0x2f6> - 183e1: 8b 45 08 mov 0x8(%ebp),%eax - 183e4: 83 78 48 00 cmpl $0x0,0x48(%eax) - 183e8: 7f 0c jg 183f6 <_usb_submit_urb@8+0x253> - 183ea: c7 45 d4 ea ff ff ff movl $0xffffffea,0xffffffd4(%ebp) - 183f1: e9 ba 00 00 00 jmp 184b0 <_usb_submit_urb@8+0x30d> - 183f6: 8b 45 ec mov 0xffffffec(%ebp),%eax - 183f9: 8b 40 18 mov 0x18(%eax),%eax - 183fc: 89 45 cc mov %eax,0xffffffcc(%ebp) - 183ff: 83 7d cc 01 cmpl $0x1,0xffffffcc(%ebp) - 18403: 72 70 jb 18475 <_usb_submit_urb@8+0x2d2> - 18405: 83 7d cc 02 cmpl $0x2,0xffffffcc(%ebp) - 18409: 76 27 jbe 18432 <_usb_submit_urb@8+0x28f> - 1840b: 83 7d cc 03 cmpl $0x3,0xffffffcc(%ebp) - 1840f: 74 02 je 18413 <_usb_submit_urb@8+0x270> - 18411: eb 62 jmp 18475 <_usb_submit_urb@8+0x2d2> - 18413: 8b 45 08 mov 0x8(%ebp),%eax - 18416: 81 78 48 00 20 00 00 cmpl $0x2000,0x48(%eax) - 1841d: 7e 0a jle 18429 <_usb_submit_urb@8+0x286> - 1841f: 8b 45 08 mov 0x8(%ebp),%eax - 18422: c7 40 48 00 20 00 00 movl $0x2000,0x48(%eax) - 18429: c7 45 f4 00 20 00 00 movl $0x2000,0xfffffff4(%ebp) - 18430: eb 4c jmp 1847e <_usb_submit_urb@8+0x2db> - 18432: 83 7d f4 01 cmpl $0x1,0xfffffff4(%ebp) - 18436: 75 1e jne 18456 <_usb_submit_urb@8+0x2b3> - 18438: 8b 45 08 mov 0x8(%ebp),%eax - 1843b: 81 78 48 ff 00 00 00 cmpl $0xff,0x48(%eax) - 18442: 7e 09 jle 1844d <_usb_submit_urb@8+0x2aa> - 18444: c7 45 d4 ea ff ff ff movl $0xffffffea,0xffffffd4(%ebp) - 1844b: eb 63 jmp 184b0 <_usb_submit_urb@8+0x30d> - 1844d: c7 45 f4 80 00 00 00 movl $0x80,0xfffffff4(%ebp) - 18454: eb 28 jmp 1847e <_usb_submit_urb@8+0x2db> - 18456: 8b 45 08 mov 0x8(%ebp),%eax - 18459: 81 78 48 00 04 00 00 cmpl $0x400,0x48(%eax) - 18460: 7e 0a jle 1846c <_usb_submit_urb@8+0x2c9> - 18462: 8b 45 08 mov 0x8(%ebp),%eax - 18465: c7 40 48 00 04 00 00 movl $0x400,0x48(%eax) - 1846c: c7 45 f4 00 04 00 00 movl $0x400,0xfffffff4(%ebp) - 18473: eb 09 jmp 1847e <_usb_submit_urb@8+0x2db> - 18475: c7 45 d4 ea ff ff ff movl $0xffffffea,0xffffffd4(%ebp) - 1847c: eb 32 jmp 184b0 <_usb_submit_urb@8+0x30d> - 1847e: 8b 45 08 mov 0x8(%ebp),%eax - 18481: 8b 40 48 mov 0x48(%eax),%eax - 18484: 3b 45 f4 cmp 0xfffffff4(%ebp),%eax - 18487: 7d 07 jge 18490 <_usb_submit_urb@8+0x2ed> - 18489: 8d 45 f4 lea 0xfffffff4(%ebp),%eax - 1848c: d1 38 sarl (%eax) - 1848e: eb ee jmp 1847e <_usb_submit_urb@8+0x2db> - 18490: 8b 55 08 mov 0x8(%ebp),%edx - 18493: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 18496: 89 42 48 mov %eax,0x48(%edx) - 18499: 83 ec 08 sub $0x8,%esp - 1849c: 8b 45 e8 mov 0xffffffe8(%ebp),%eax - 1849f: ff 75 0c pushl 0xc(%ebp) - 184a2: ff 75 08 pushl 0x8(%ebp) - 184a5: 8b 40 0c mov 0xc(%eax),%eax - 184a8: ff d0 call *%eax - 184aa: 83 c4 10 add $0x10,%esp - 184ad: 89 45 d4 mov %eax,0xffffffd4(%ebp) - 184b0: 8b 45 d4 mov 0xffffffd4(%ebp),%eax - 184b3: 8b 5d fc mov 0xfffffffc(%ebp),%ebx - 184b6: c9 leave - 184b7: c2 08 00 ret $0x8 - -000184ba <_usb_unlink_urb@4>: - 184ba: 55 push %ebp - 184bb: 89 e5 mov %esp,%ebp - 184bd: 83 ec 08 sub $0x8,%esp - 184c0: 83 7d 08 00 cmpl $0x0,0x8(%ebp) - 184c4: 74 4c je 18512 <_usb_unlink_urb@4+0x58> - 184c6: 8b 45 08 mov 0x8(%ebp),%eax - 184c9: 83 78 14 00 cmpl $0x0,0x14(%eax) - 184cd: 74 43 je 18512 <_usb_unlink_urb@4+0x58> - 184cf: 8b 45 08 mov 0x8(%ebp),%eax - 184d2: 8b 40 14 mov 0x14(%eax),%eax - 184d5: 83 b8 bc 00 00 00 00 cmpl $0x0,0xbc(%eax) - 184dc: 74 34 je 18512 <_usb_unlink_urb@4+0x58> - 184de: 8b 45 08 mov 0x8(%ebp),%eax - 184e1: 8b 40 14 mov 0x14(%eax),%eax - 184e4: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax - 184ea: 83 78 20 00 cmpl $0x0,0x20(%eax) - 184ee: 74 22 je 18512 <_usb_unlink_urb@4+0x58> - 184f0: 83 ec 0c sub $0xc,%esp - 184f3: 8b 45 08 mov 0x8(%ebp),%eax - 184f6: 8b 40 14 mov 0x14(%eax),%eax - 184f9: 8b 80 bc 00 00 00 mov 0xbc(%eax),%eax - 184ff: 8b 40 20 mov 0x20(%eax),%eax - 18502: ff 75 08 pushl 0x8(%ebp) - 18505: 8b 40 10 mov 0x10(%eax),%eax - 18508: ff d0 call *%eax - 1850a: 83 c4 10 add $0x10,%esp - 1850d: 89 45 fc mov %eax,0xfffffffc(%ebp) - 18510: eb 07 jmp 18519 <_usb_unlink_urb@4+0x5f> - 18512: c7 45 fc ed ff ff ff movl $0xffffffed,0xfffffffc(%ebp) - 18519: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 1851c: c9 leave - 1851d: c2 04 00 ret $0x4 - -00018520 <_hcd_buffer_create>: - 18520: 55 push %ebp - 18521: 89 e5 mov %esp,%ebp - 18523: b8 00 00 00 00 mov $0x0,%eax - 18528: 5d pop %ebp - 18529: c3 ret - -0001852a <_hcd_buffer_destroy>: - 1852a: 55 push %ebp - 1852b: 89 e5 mov %esp,%ebp - 1852d: 5d pop %ebp - 1852e: c3 ret - -0001852f <_hcd_buffer_alloc>: - 1852f: 55 push %ebp - 18530: 89 e5 mov %esp,%ebp - 18532: 83 ec 08 sub $0x8,%esp - 18535: 83 ec 08 sub $0x8,%esp - 18538: ff 75 0c pushl 0xc(%ebp) - 1853b: 6a 01 push $0x1 - 1853d: e8 ee 14 00 00 call 19a30 <_ExAllocatePool@8> - 18542: 83 c4 08 add $0x8,%esp - 18545: c9 leave - 18546: c3 ret - -00018547 <_hcd_buffer_free>: - 18547: 55 push %ebp - 18548: 89 e5 mov %esp,%ebp - 1854a: 83 ec 08 sub $0x8,%esp - 1854d: 83 ec 0c sub $0xc,%esp - 18550: ff 75 10 pushl 0x10(%ebp) - 18553: e8 e8 14 00 00 call 19a40 <_ExFreePool@4> - 18558: 83 c4 0c add $0xc,%esp - 1855b: c9 leave - 1855c: c3 ret - 1855d: 90 nop - 1855e: 90 nop - 1855f: 90 nop - -00018560 <_usb_show_endpoint>: - 18560: 55 push %ebp - 18561: 89 e5 mov %esp,%ebp - 18563: 83 ec 08 sub $0x8,%esp - 18566: 83 ec 0c sub $0xc,%esp - 18569: ff 75 08 pushl 0x8(%ebp) - 1856c: e8 86 09 00 00 call 18ef7 <_usb_show_endpoint_descriptor> - 18571: 83 c4 10 add $0x10,%esp - 18574: c9 leave - 18575: c3 ret - -00018576 <_usb_show_interface>: - 18576: 55 push %ebp - 18577: 89 e5 mov %esp,%ebp - 18579: 83 ec 08 sub $0x8,%esp - 1857c: 83 ec 0c sub $0xc,%esp - 1857f: ff 75 08 pushl 0x8(%ebp) - 18582: e8 89 07 00 00 call 18d10 <_usb_show_interface_descriptor> - 18587: 83 c4 10 add $0x10,%esp - 1858a: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) - 18591: 8b 45 08 mov 0x8(%ebp),%eax - 18594: 8a 40 04 mov 0x4(%eax),%al - 18597: 25 ff 00 00 00 and $0xff,%eax - 1859c: 3b 45 fc cmp 0xfffffffc(%ebp),%eax - 1859f: 7e 26 jle 185c7 <_usb_show_interface+0x51> - 185a1: 83 ec 0c sub $0xc,%esp - 185a4: 8b 4d 08 mov 0x8(%ebp),%ecx - 185a7: 8b 55 fc mov 0xfffffffc(%ebp),%edx - 185aa: 89 d0 mov %edx,%eax - 185ac: c1 e0 02 shl $0x2,%eax - 185af: 01 d0 add %edx,%eax - 185b1: c1 e0 02 shl $0x2,%eax - 185b4: 03 41 0c add 0xc(%ecx),%eax - 185b7: 50 push %eax - 185b8: e8 a3 ff ff ff call 18560 <_usb_show_endpoint> - 185bd: 83 c4 10 add $0x10,%esp - 185c0: 8d 45 fc lea 0xfffffffc(%ebp),%eax - 185c3: ff 00 incl (%eax) - 185c5: eb ca jmp 18591 <_usb_show_interface+0x1b> - 185c7: c9 leave - 185c8: c3 ret - -000185c9 <_usb_show_config>: - 185c9: 55 push %ebp - 185ca: 89 e5 mov %esp,%ebp - 185cc: 53 push %ebx - 185cd: 83 ec 14 sub $0x14,%esp - 185d0: 83 ec 0c sub $0xc,%esp - 185d3: ff 75 08 pushl 0x8(%ebp) - 185d6: e8 45 05 00 00 call 18b20 <_usb_show_config_descriptor> - 185db: 83 c4 10 add $0x10,%esp - 185de: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) - 185e5: 8b 45 08 mov 0x8(%ebp),%eax - 185e8: 8a 40 04 mov 0x4(%eax),%al - 185eb: 25 ff 00 00 00 and $0xff,%eax - 185f0: 3b 45 f8 cmp 0xfffffff8(%ebp),%eax - 185f3: 0f 8e 95 00 00 00 jle 1868e <_usb_show_config+0xc5> - 185f9: 8b 5d 08 mov 0x8(%ebp),%ebx - 185fc: 8b 4d f8 mov 0xfffffff8(%ebp),%ecx - 185ff: 89 c8 mov %ecx,%eax - 18601: c1 e0 02 shl $0x2,%eax - 18604: 01 c8 add %ecx,%eax - 18606: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx - 1860d: 01 d0 add %edx,%eax - 1860f: 01 c0 add %eax,%eax - 18611: 01 c8 add %ecx,%eax - 18613: c1 e0 02 shl $0x2,%eax - 18616: 03 43 0c add 0xc(%ebx),%eax - 18619: 89 45 f0 mov %eax,0xfffffff0(%ebp) - 1861c: 83 7d f0 00 cmpl $0x0,0xfffffff0(%ebp) - 18620: 75 02 jne 18624 <_usb_show_config+0x5b> - 18622: eb 6a jmp 1868e <_usb_show_config+0xc5> - 18624: 83 ec 04 sub $0x4,%esp - 18627: 6a 32 push $0x32 - 18629: 68 c4 b2 01 00 push $0x1b2c4 - 1862e: 68 d0 b2 01 00 push $0x1b2d0 - 18633: e8 28 14 00 00 call 19a60 <_DbgPrint> - 18638: 83 c4 10 add $0x10,%esp - 1863b: 83 ec 08 sub $0x8,%esp - 1863e: ff 75 f8 pushl 0xfffffff8(%ebp) - 18641: 68 d9 b2 01 00 push $0x1b2d9 - 18646: e8 15 14 00 00 call 19a60 <_DbgPrint> - 1864b: 83 c4 10 add $0x10,%esp - 1864e: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) - 18655: 8b 55 f0 mov 0xfffffff0(%ebp),%edx - 18658: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 1865b: 3b 42 08 cmp 0x8(%edx),%eax - 1865e: 73 24 jae 18684 <_usb_show_config+0xbb> - 18660: 83 ec 0c sub $0xc,%esp - 18663: 8b 4d f0 mov 0xfffffff0(%ebp),%ecx - 18666: 8b 55 f4 mov 0xfffffff4(%ebp),%edx - 18669: 89 d0 mov %edx,%eax - 1866b: 01 c0 add %eax,%eax - 1866d: 01 d0 add %edx,%eax - 1866f: c1 e0 03 shl $0x3,%eax - 18672: 03 01 add (%ecx),%eax - 18674: 50 push %eax - 18675: e8 fc fe ff ff call 18576 <_usb_show_interface> - 1867a: 83 c4 10 add $0x10,%esp - 1867d: 8d 45 f4 lea 0xfffffff4(%ebp),%eax - 18680: ff 00 incl (%eax) - 18682: eb d1 jmp 18655 <_usb_show_config+0x8c> - 18684: 8d 45 f8 lea 0xfffffff8(%ebp),%eax - 18687: ff 00 incl (%eax) - 18689: e9 57 ff ff ff jmp 185e5 <_usb_show_config+0x1c> - 1868e: 8b 5d fc mov 0xfffffffc(%ebp),%ebx - 18691: c9 leave - 18692: c3 ret - -00018693 <_usb_show_device>: - 18693: 55 push %ebp - 18694: 89 e5 mov %esp,%ebp - 18696: 83 ec 08 sub $0x8,%esp - 18699: 83 ec 0c sub $0xc,%esp - 1869c: 8b 45 08 mov 0x8(%ebp),%eax - 1869f: 05 70 01 00 00 add $0x170,%eax - 186a4: 50 push %eax - 186a5: e8 47 00 00 00 call 186f1 <_usb_show_device_descriptor> - 186aa: 83 c4 10 add $0x10,%esp - 186ad: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) - 186b4: 8b 45 08 mov 0x8(%ebp),%eax - 186b7: 8a 80 81 01 00 00 mov 0x181(%eax),%al - 186bd: 25 ff 00 00 00 and $0xff,%eax - 186c2: 3b 45 fc cmp 0xfffffffc(%ebp),%eax - 186c5: 7e 28 jle 186ef <_usb_show_device+0x5c> - 186c7: 83 ec 0c sub $0xc,%esp - 186ca: 8b 4d 08 mov 0x8(%ebp),%ecx - 186cd: 8b 55 fc mov 0xfffffffc(%ebp),%edx - 186d0: 89 d0 mov %edx,%eax - 186d2: 01 c0 add %eax,%eax - 186d4: 01 d0 add %edx,%eax - 186d6: c1 e0 03 shl $0x3,%eax - 186d9: 03 81 84 01 00 00 add 0x184(%ecx),%eax - 186df: 50 push %eax - 186e0: e8 e4 fe ff ff call 185c9 <_usb_show_config> - 186e5: 83 c4 10 add $0x10,%esp - 186e8: 8d 45 fc lea 0xfffffffc(%ebp),%eax - 186eb: ff 00 incl (%eax) - 186ed: eb c5 jmp 186b4 <_usb_show_device+0x21> - 186ef: c9 leave - 186f0: c3 ret - -000186f1 <_usb_show_device_descriptor>: - 186f1: 55 push %ebp - 186f2: 89 e5 mov %esp,%ebp - 186f4: 83 ec 08 sub $0x8,%esp - 186f7: 83 7d 08 00 cmpl $0x0,0x8(%ebp) - 186fb: 75 2c jne 18729 <_usb_show_device_descriptor+0x38> - 186fd: 83 ec 04 sub $0x4,%esp - 18700: 6a 48 push $0x48 - 18702: 68 c4 b2 01 00 push $0x1b2c4 - 18707: 68 d0 b2 01 00 push $0x1b2d0 - 1870c: e8 4f 13 00 00 call 19a60 <_DbgPrint> - 18711: 83 c4 10 add $0x10,%esp - 18714: 83 ec 0c sub $0xc,%esp - 18717: 68 ec b2 01 00 push $0x1b2ec - 1871c: e8 3f 13 00 00 call 19a60 <_DbgPrint> - 18721: 83 c4 10 add $0x10,%esp - 18724: e9 f5 03 00 00 jmp 18b1e <_usb_show_device_descriptor+0x42d> - 18729: 83 ec 04 sub $0x4,%esp - 1872c: 6a 4c push $0x4c - 1872e: 68 c4 b2 01 00 push $0x1b2c4 - 18733: 68 d0 b2 01 00 push $0x1b2d0 - 18738: e8 23 13 00 00 call 19a60 <_DbgPrint> - 1873d: 83 c4 10 add $0x10,%esp - 18740: 83 ec 04 sub $0x4,%esp - 18743: 8b 45 08 mov 0x8(%ebp),%eax - 18746: 80 38 12 cmpb $0x12,(%eax) - 18749: 75 09 jne 18754 <_usb_show_device_descriptor+0x63> - 1874b: c7 45 fc 1a b3 01 00 movl $0x1b31a,0xfffffffc(%ebp) - 18752: eb 07 jmp 1875b <_usb_show_device_descriptor+0x6a> - 18754: c7 45 fc 1b b3 01 00 movl $0x1b31b,0xfffffffc(%ebp) - 1875b: ff 75 fc pushl 0xfffffffc(%ebp) - 1875e: 8b 45 08 mov 0x8(%ebp),%eax - 18761: 8a 00 mov (%eax),%al - 18763: 25 ff 00 00 00 and $0xff,%eax - 18768: 50 push %eax - 18769: 68 24 b3 01 00 push $0x1b324 - 1876e: e8 ed 12 00 00 call 19a60 <_DbgPrint> - 18773: 83 c4 10 add $0x10,%esp - 18776: 83 ec 04 sub $0x4,%esp - 18779: 6a 4d push $0x4d - 1877b: 68 c4 b2 01 00 push $0x1b2c4 - 18780: 68 d0 b2 01 00 push $0x1b2d0 - 18785: e8 d6 12 00 00 call 19a60 <_DbgPrint> - 1878a: 83 c4 10 add $0x10,%esp - 1878d: 83 ec 08 sub $0x8,%esp - 18790: 8b 45 08 mov 0x8(%ebp),%eax - 18793: 8a 40 01 mov 0x1(%eax),%al - 18796: 25 ff 00 00 00 and $0xff,%eax - 1879b: 50 push %eax - 1879c: 68 43 b3 01 00 push $0x1b343 - 187a1: e8 ba 12 00 00 call 19a60 <_DbgPrint> - 187a6: 83 c4 10 add $0x10,%esp - 187a9: 83 ec 04 sub $0x4,%esp - 187ac: 6a 50 push $0x50 - 187ae: 68 c4 b2 01 00 push $0x1b2c4 - 187b3: 68 d0 b2 01 00 push $0x1b2d0 - 187b8: e8 a3 12 00 00 call 19a60 <_DbgPrint> - 187bd: 83 c4 10 add $0x10,%esp - 187c0: 83 ec 04 sub $0x4,%esp - 187c3: 8b 45 08 mov 0x8(%ebp),%eax - 187c6: 66 8b 40 02 mov 0x2(%eax),%ax - 187ca: 25 ff ff 00 00 and $0xffff,%eax - 187cf: 25 ff 00 00 00 and $0xff,%eax - 187d4: 50 push %eax - 187d5: 8b 45 08 mov 0x8(%ebp),%eax - 187d8: 66 8b 40 02 mov 0x2(%eax),%ax - 187dc: 66 c1 e8 08 shr $0x8,%ax - 187e0: 25 ff ff 00 00 and $0xffff,%eax - 187e5: 50 push %eax - 187e6: 68 64 b3 01 00 push $0x1b364 - 187eb: e8 70 12 00 00 call 19a60 <_DbgPrint> - 187f0: 83 c4 10 add $0x10,%esp - 187f3: 83 ec 04 sub $0x4,%esp - 187f6: 6a 52 push $0x52 - 187f8: 68 c4 b2 01 00 push $0x1b2c4 - 187fd: 68 d0 b2 01 00 push $0x1b2d0 - 18802: e8 59 12 00 00 call 19a60 <_DbgPrint> - 18807: 83 c4 10 add $0x10,%esp - 1880a: 83 ec 04 sub $0x4,%esp - 1880d: 8b 45 08 mov 0x8(%ebp),%eax - 18810: 66 8b 40 0a mov 0xa(%eax),%ax - 18814: 25 ff ff 00 00 and $0xffff,%eax - 18819: 50 push %eax - 1881a: 8b 45 08 mov 0x8(%ebp),%eax - 1881d: 66 8b 40 08 mov 0x8(%eax),%ax - 18821: 25 ff ff 00 00 and $0xffff,%eax - 18826: 50 push %eax - 18827: 68 88 b3 01 00 push $0x1b388 - 1882c: e8 2f 12 00 00 call 19a60 <_DbgPrint> - 18831: 83 c4 10 add $0x10,%esp - 18834: 83 ec 04 sub $0x4,%esp - 18837: 6a 53 push $0x53 - 18839: 68 c4 b2 01 00 push $0x1b2c4 - 1883e: 68 d0 b2 01 00 push $0x1b2d0 - 18843: e8 18 12 00 00 call 19a60 <_DbgPrint> - 18848: 83 c4 10 add $0x10,%esp - 1884b: 83 ec 08 sub $0x8,%esp - 1884e: 8b 45 08 mov 0x8(%ebp),%eax - 18851: 8a 40 07 mov 0x7(%eax),%al - 18854: 25 ff 00 00 00 and $0xff,%eax - 18859: 50 push %eax - 1885a: 68 ab b3 01 00 push $0x1b3ab - 1885f: e8 fc 11 00 00 call 19a60 <_DbgPrint> - 18864: 83 c4 10 add $0x10,%esp - 18867: 83 ec 04 sub $0x4,%esp - 1886a: 6a 54 push $0x54 - 1886c: 68 c4 b2 01 00 push $0x1b2c4 - 18871: 68 d0 b2 01 00 push $0x1b2d0 - 18876: e8 e5 11 00 00 call 19a60 <_DbgPrint> - 1887b: 83 c4 10 add $0x10,%esp - 1887e: 83 ec 08 sub $0x8,%esp - 18881: 8b 45 08 mov 0x8(%ebp),%eax - 18884: 8a 40 11 mov 0x11(%eax),%al - 18887: 25 ff 00 00 00 and $0xff,%eax - 1888c: 50 push %eax - 1888d: 68 c7 b3 01 00 push $0x1b3c7 - 18892: e8 c9 11 00 00 call 19a60 <_DbgPrint> - 18897: 83 c4 10 add $0x10,%esp - 1889a: 83 ec 04 sub $0x4,%esp - 1889d: 6a 56 push $0x56 - 1889f: 68 c4 b2 01 00 push $0x1b2c4 - 188a4: 68 d0 b2 01 00 push $0x1b2d0 - 188a9: e8 b2 11 00 00 call 19a60 <_DbgPrint> - 188ae: 83 c4 10 add $0x10,%esp - 188b1: 83 ec 04 sub $0x4,%esp - 188b4: 8b 45 08 mov 0x8(%ebp),%eax - 188b7: 66 8b 40 0c mov 0xc(%eax),%ax - 188bb: 25 ff ff 00 00 and $0xffff,%eax - 188c0: 25 ff 00 00 00 and $0xff,%eax - 188c5: 50 push %eax - 188c6: 8b 45 08 mov 0x8(%ebp),%eax - 188c9: 66 8b 40 0c mov 0xc(%eax),%ax - 188cd: 66 c1 e8 08 shr $0x8,%ax - 188d1: 25 ff ff 00 00 and $0xffff,%eax - 188d6: 50 push %eax - 188d7: 68 e4 b3 01 00 push $0x1b3e4 - 188dc: e8 7f 11 00 00 call 19a60 <_DbgPrint> - 188e1: 83 c4 10 add $0x10,%esp - 188e4: 83 ec 04 sub $0x4,%esp - 188e7: 6a 59 push $0x59 - 188e9: 68 c4 b2 01 00 push $0x1b2c4 - 188ee: 68 d0 b2 01 00 push $0x1b2d0 - 188f3: e8 68 11 00 00 call 19a60 <_DbgPrint> - 188f8: 83 c4 10 add $0x10,%esp - 188fb: 8b 45 08 mov 0x8(%ebp),%eax - 188fe: 8a 40 06 mov 0x6(%eax),%al - 18901: 25 ff 00 00 00 and $0xff,%eax - 18906: 50 push %eax - 18907: 8b 45 08 mov 0x8(%ebp),%eax - 1890a: 8a 40 05 mov 0x5(%eax),%al - 1890d: 25 ff 00 00 00 and $0xff,%eax - 18912: 50 push %eax - 18913: 8b 45 08 mov 0x8(%ebp),%eax - 18916: 8a 40 04 mov 0x4(%eax),%al - 18919: 25 ff 00 00 00 and $0xff,%eax - 1891e: 50 push %eax - 1891f: 68 08 b4 01 00 push $0x1b408 - 18924: e8 37 11 00 00 call 19a60 <_DbgPrint> - 18929: 83 c4 10 add $0x10,%esp - 1892c: 8b 45 08 mov 0x8(%ebp),%eax - 1892f: ba 00 00 00 00 mov $0x0,%edx - 18934: 8a 50 04 mov 0x4(%eax),%dl - 18937: 89 55 f8 mov %edx,0xfffffff8(%ebp) - 1893a: 83 7d f8 03 cmpl $0x3,0xfffffff8(%ebp) - 1893e: 0f 84 e0 00 00 00 je 18a24 <_usb_show_device_descriptor+0x333> - 18944: 83 7d f8 03 cmpl $0x3,0xfffffff8(%ebp) - 18948: 7f 1b jg 18965 <_usb_show_device_descriptor+0x274> - 1894a: 83 7d f8 01 cmpl $0x1,0xfffffff8(%ebp) - 1894e: 74 7c je 189cc <_usb_show_device_descriptor+0x2db> - 18950: 83 7d f8 01 cmpl $0x1,0xfffffff8(%ebp) - 18954: 0f 8f 9e 00 00 00 jg 189f8 <_usb_show_device_descriptor+0x307> - 1895a: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) - 1895e: 74 40 je 189a0 <_usb_show_device_descriptor+0x2af> - 18960: e9 92 01 00 00 jmp 18af7 <_usb_show_device_descriptor+0x406> - 18965: 83 7d f8 08 cmpl $0x8,0xfffffff8(%ebp) - 18969: 0f 84 0d 01 00 00 je 18a7c <_usb_show_device_descriptor+0x38b> - 1896f: 83 7d f8 08 cmpl $0x8,0xfffffff8(%ebp) - 18973: 7f 0f jg 18984 <_usb_show_device_descriptor+0x293> - 18975: 83 7d f8 07 cmpl $0x7,0xfffffff8(%ebp) - 18979: 0f 84 d1 00 00 00 je 18a50 <_usb_show_device_descriptor+0x35f> - 1897f: e9 73 01 00 00 jmp 18af7 <_usb_show_device_descriptor+0x406> - 18984: 83 7d f8 09 cmpl $0x9,0xfffffff8(%ebp) - 18988: 0f 84 17 01 00 00 je 18aa5 <_usb_show_device_descriptor+0x3b4> - 1898e: 81 7d f8 ff 00 00 00 cmpl $0xff,0xfffffff8(%ebp) - 18995: 0f 84 33 01 00 00 je 18ace <_usb_show_device_descriptor+0x3dd> - 1899b: e9 57 01 00 00 jmp 18af7 <_usb_show_device_descriptor+0x406> - 189a0: 83 ec 04 sub $0x4,%esp - 189a3: 6a 5c push $0x5c - 189a5: 68 c4 b2 01 00 push $0x1b2c4 - 189aa: 68 d0 b2 01 00 push $0x1b2d0 - 189af: e8 ac 10 00 00 call 19a60 <_DbgPrint> - 189b4: 83 c4 10 add $0x10,%esp - 189b7: 83 ec 0c sub $0xc,%esp - 189ba: 68 3b b4 01 00 push $0x1b43b - 189bf: e8 9c 10 00 00 call 19a60 <_DbgPrint> - 189c4: 83 c4 10 add $0x10,%esp - 189c7: e9 52 01 00 00 jmp 18b1e <_usb_show_device_descriptor+0x42d> - 189cc: 83 ec 04 sub $0x4,%esp - 189cf: 6a 5f push $0x5f - 189d1: 68 c4 b2 01 00 push $0x1b2c4 - 189d6: 68 d0 b2 01 00 push $0x1b2d0 - 189db: e8 80 10 00 00 call 19a60 <_DbgPrint> - 189e0: 83 c4 10 add $0x10,%esp - 189e3: 83 ec 0c sub $0xc,%esp - 189e6: 68 56 b4 01 00 push $0x1b456 - 189eb: e8 70 10 00 00 call 19a60 <_DbgPrint> - 189f0: 83 c4 10 add $0x10,%esp - 189f3: e9 26 01 00 00 jmp 18b1e <_usb_show_device_descriptor+0x42d> - 189f8: 83 ec 04 sub $0x4,%esp - 189fb: 6a 62 push $0x62 - 189fd: 68 c4 b2 01 00 push $0x1b2c4 - 18a02: 68 d0 b2 01 00 push $0x1b2d0 - 18a07: e8 54 10 00 00 call 19a60 <_DbgPrint> - 18a0c: 83 c4 10 add $0x10,%esp - 18a0f: 83 ec 0c sub $0xc,%esp - 18a12: 68 6e b4 01 00 push $0x1b46e - 18a17: e8 44 10 00 00 call 19a60 <_DbgPrint> - 18a1c: 83 c4 10 add $0x10,%esp - 18a1f: e9 fa 00 00 00 jmp 18b1e <_usb_show_device_descriptor+0x42d> - 18a24: 83 ec 04 sub $0x4,%esp - 18a27: 6a 65 push $0x65 - 18a29: 68 c4 b2 01 00 push $0x1b2c4 - 18a2e: 68 d0 b2 01 00 push $0x1b2d0 - 18a33: e8 28 10 00 00 call 19a60 <_DbgPrint> - 18a38: 83 c4 10 add $0x10,%esp - 18a3b: 83 ec 0c sub $0xc,%esp - 18a3e: 68 88 b4 01 00 push $0x1b488 - 18a43: e8 18 10 00 00 call 19a60 <_DbgPrint> - 18a48: 83 c4 10 add $0x10,%esp - 18a4b: e9 ce 00 00 00 jmp 18b1e <_usb_show_device_descriptor+0x42d> - 18a50: 83 ec 04 sub $0x4,%esp - 18a53: 6a 68 push $0x68 - 18a55: 68 c4 b2 01 00 push $0x1b2c4 - 18a5a: 68 d0 b2 01 00 push $0x1b2d0 - 18a5f: e8 fc 0f 00 00 call 19a60 <_DbgPrint> - 18a64: 83 c4 10 add $0x10,%esp - 18a67: 83 ec 0c sub $0xc,%esp - 18a6a: 68 ab b4 01 00 push $0x1b4ab - 18a6f: e8 ec 0f 00 00 call 19a60 <_DbgPrint> - 18a74: 83 c4 10 add $0x10,%esp - 18a77: e9 a2 00 00 00 jmp 18b1e <_usb_show_device_descriptor+0x42d> - 18a7c: 83 ec 04 sub $0x4,%esp - 18a7f: 6a 6b push $0x6b - 18a81: 68 c4 b2 01 00 push $0x1b2c4 - 18a86: 68 d0 b2 01 00 push $0x1b2d0 - 18a8b: e8 d0 0f 00 00 call 19a60 <_DbgPrint> - 18a90: 83 c4 10 add $0x10,%esp - 18a93: 83 ec 0c sub $0xc,%esp - 18a96: 68 c8 b4 01 00 push $0x1b4c8 - 18a9b: e8 c0 0f 00 00 call 19a60 <_DbgPrint> - 18aa0: 83 c4 10 add $0x10,%esp - 18aa3: eb 79 jmp 18b1e <_usb_show_device_descriptor+0x42d> - 18aa5: 83 ec 04 sub $0x4,%esp - 18aa8: 6a 6e push $0x6e - 18aaa: 68 c4 b2 01 00 push $0x1b2c4 - 18aaf: 68 d0 b2 01 00 push $0x1b2d0 - 18ab4: e8 a7 0f 00 00 call 19a60 <_DbgPrint> - 18ab9: 83 c4 10 add $0x10,%esp - 18abc: 83 ec 0c sub $0xc,%esp - 18abf: 68 e7 b4 01 00 push $0x1b4e7 - 18ac4: e8 97 0f 00 00 call 19a60 <_DbgPrint> - 18ac9: 83 c4 10 add $0x10,%esp - 18acc: eb 50 jmp 18b1e <_usb_show_device_descriptor+0x42d> - 18ace: 83 ec 04 sub $0x4,%esp - 18ad1: 6a 71 push $0x71 - 18ad3: 68 c4 b2 01 00 push $0x1b2c4 - 18ad8: 68 d0 b2 01 00 push $0x1b2d0 - 18add: e8 7e 0f 00 00 call 19a60 <_DbgPrint> - 18ae2: 83 c4 10 add $0x10,%esp - 18ae5: 83 ec 0c sub $0xc,%esp - 18ae8: 68 fd b4 01 00 push $0x1b4fd - 18aed: e8 6e 0f 00 00 call 19a60 <_DbgPrint> - 18af2: 83 c4 10 add $0x10,%esp - 18af5: eb 27 jmp 18b1e <_usb_show_device_descriptor+0x42d> - 18af7: 83 ec 04 sub $0x4,%esp - 18afa: 6a 74 push $0x74 - 18afc: 68 c4 b2 01 00 push $0x1b2c4 - 18b01: 68 d0 b2 01 00 push $0x1b2d0 - 18b06: e8 55 0f 00 00 call 19a60 <_DbgPrint> - 18b0b: 83 c4 10 add $0x10,%esp - 18b0e: 83 ec 0c sub $0xc,%esp - 18b11: 68 0f b5 01 00 push $0x1b50f - 18b16: e8 45 0f 00 00 call 19a60 <_DbgPrint> - 18b1b: 83 c4 10 add $0x10,%esp - 18b1e: c9 leave - 18b1f: c3 ret - -00018b20 <_usb_show_config_descriptor>: - 18b20: 55 push %ebp - 18b21: 89 e5 mov %esp,%ebp - 18b23: 83 ec 08 sub $0x8,%esp - 18b26: 83 ec 04 sub $0x4,%esp - 18b29: 6a 7a push $0x7a - 18b2b: 68 c4 b2 01 00 push $0x1b2c4 - 18b30: 68 d0 b2 01 00 push $0x1b2d0 - 18b35: e8 26 0f 00 00 call 19a60 <_DbgPrint> - 18b3a: 83 c4 10 add $0x10,%esp - 18b3d: 83 ec 0c sub $0xc,%esp - 18b40: 68 22 b5 01 00 push $0x1b522 - 18b45: e8 16 0f 00 00 call 19a60 <_DbgPrint> - 18b4a: 83 c4 10 add $0x10,%esp - 18b4d: 83 ec 04 sub $0x4,%esp - 18b50: 6a 7c push $0x7c - 18b52: 68 c4 b2 01 00 push $0x1b2c4 - 18b57: 68 d0 b2 01 00 push $0x1b2d0 - 18b5c: e8 ff 0e 00 00 call 19a60 <_DbgPrint> - 18b61: 83 c4 10 add $0x10,%esp - 18b64: 83 ec 04 sub $0x4,%esp - 18b67: 8b 45 08 mov 0x8(%ebp),%eax - 18b6a: 80 38 09 cmpb $0x9,(%eax) - 18b6d: 75 09 jne 18b78 <_usb_show_config_descriptor+0x58> - 18b6f: c7 45 fc 1a b3 01 00 movl $0x1b31a,0xfffffffc(%ebp) - 18b76: eb 07 jmp 18b7f <_usb_show_config_descriptor+0x5f> - 18b78: c7 45 fc 1b b3 01 00 movl $0x1b31b,0xfffffffc(%ebp) - 18b7f: ff 75 fc pushl 0xfffffffc(%ebp) - 18b82: 8b 45 08 mov 0x8(%ebp),%eax - 18b85: 8a 00 mov (%eax),%al - 18b87: 25 ff 00 00 00 and $0xff,%eax - 18b8c: 50 push %eax - 18b8d: 68 34 b5 01 00 push $0x1b534 - 18b92: e8 c9 0e 00 00 call 19a60 <_DbgPrint> - 18b97: 83 c4 10 add $0x10,%esp - 18b9a: 83 ec 04 sub $0x4,%esp - 18b9d: 6a 7d push $0x7d - 18b9f: 68 c4 b2 01 00 push $0x1b2c4 - 18ba4: 68 d0 b2 01 00 push $0x1b2d0 - 18ba9: e8 b2 0e 00 00 call 19a60 <_DbgPrint> - 18bae: 83 c4 10 add $0x10,%esp - 18bb1: 83 ec 08 sub $0x8,%esp - 18bb4: 8b 45 08 mov 0x8(%ebp),%eax - 18bb7: 8a 40 01 mov 0x1(%eax),%al - 18bba: 25 ff 00 00 00 and $0xff,%eax - 18bbf: 50 push %eax - 18bc0: 68 54 b5 01 00 push $0x1b554 - 18bc5: e8 96 0e 00 00 call 19a60 <_DbgPrint> - 18bca: 83 c4 10 add $0x10,%esp - 18bcd: 83 ec 04 sub $0x4,%esp - 18bd0: 6a 7e push $0x7e - 18bd2: 68 c4 b2 01 00 push $0x1b2c4 - 18bd7: 68 d0 b2 01 00 push $0x1b2d0 - 18bdc: e8 7f 0e 00 00 call 19a60 <_DbgPrint> - 18be1: 83 c4 10 add $0x10,%esp - 18be4: 83 ec 08 sub $0x8,%esp - 18be7: 8b 45 08 mov 0x8(%ebp),%eax - 18bea: 66 8b 40 02 mov 0x2(%eax),%ax - 18bee: 25 ff ff 00 00 and $0xffff,%eax - 18bf3: 50 push %eax - 18bf4: 68 74 b5 01 00 push $0x1b574 - 18bf9: e8 62 0e 00 00 call 19a60 <_DbgPrint> - 18bfe: 83 c4 10 add $0x10,%esp - 18c01: 83 ec 04 sub $0x4,%esp - 18c04: 6a 7f push $0x7f - 18c06: 68 c4 b2 01 00 push $0x1b2c4 - 18c0b: 68 d0 b2 01 00 push $0x1b2d0 - 18c10: e8 4b 0e 00 00 call 19a60 <_DbgPrint> - 18c15: 83 c4 10 add $0x10,%esp - 18c18: 83 ec 08 sub $0x8,%esp - 18c1b: 8b 45 08 mov 0x8(%ebp),%eax - 18c1e: 8a 40 04 mov 0x4(%eax),%al - 18c21: 25 ff 00 00 00 and $0xff,%eax - 18c26: 50 push %eax - 18c27: 68 94 b5 01 00 push $0x1b594 - 18c2c: e8 2f 0e 00 00 call 19a60 <_DbgPrint> - 18c31: 83 c4 10 add $0x10,%esp - 18c34: 83 ec 04 sub $0x4,%esp - 18c37: 68 80 00 00 00 push $0x80 - 18c3c: 68 c4 b2 01 00 push $0x1b2c4 - 18c41: 68 d0 b2 01 00 push $0x1b2d0 - 18c46: e8 15 0e 00 00 call 19a60 <_DbgPrint> - 18c4b: 83 c4 10 add $0x10,%esp - 18c4e: 83 ec 08 sub $0x8,%esp - 18c51: 8b 45 08 mov 0x8(%ebp),%eax - 18c54: 8a 40 05 mov 0x5(%eax),%al - 18c57: 25 ff 00 00 00 and $0xff,%eax - 18c5c: 50 push %eax - 18c5d: 68 b4 b5 01 00 push $0x1b5b4 - 18c62: e8 f9 0d 00 00 call 19a60 <_DbgPrint> - 18c67: 83 c4 10 add $0x10,%esp - 18c6a: 83 ec 04 sub $0x4,%esp - 18c6d: 68 81 00 00 00 push $0x81 - 18c72: 68 c4 b2 01 00 push $0x1b2c4 - 18c77: 68 d0 b2 01 00 push $0x1b2d0 - 18c7c: e8 df 0d 00 00 call 19a60 <_DbgPrint> - 18c81: 83 c4 10 add $0x10,%esp - 18c84: 83 ec 08 sub $0x8,%esp - 18c87: 8b 45 08 mov 0x8(%ebp),%eax - 18c8a: 8a 40 06 mov 0x6(%eax),%al - 18c8d: 25 ff 00 00 00 and $0xff,%eax - 18c92: 50 push %eax - 18c93: 68 d4 b5 01 00 push $0x1b5d4 - 18c98: e8 c3 0d 00 00 call 19a60 <_DbgPrint> - 18c9d: 83 c4 10 add $0x10,%esp - 18ca0: 83 ec 04 sub $0x4,%esp - 18ca3: 68 82 00 00 00 push $0x82 - 18ca8: 68 c4 b2 01 00 push $0x1b2c4 - 18cad: 68 d0 b2 01 00 push $0x1b2d0 - 18cb2: e8 a9 0d 00 00 call 19a60 <_DbgPrint> - 18cb7: 83 c4 10 add $0x10,%esp - 18cba: 83 ec 08 sub $0x8,%esp - 18cbd: 8b 45 08 mov 0x8(%ebp),%eax - 18cc0: 8a 40 07 mov 0x7(%eax),%al - 18cc3: 25 ff 00 00 00 and $0xff,%eax - 18cc8: 50 push %eax - 18cc9: 68 f4 b5 01 00 push $0x1b5f4 - 18cce: e8 8d 0d 00 00 call 19a60 <_DbgPrint> - 18cd3: 83 c4 10 add $0x10,%esp - 18cd6: 83 ec 04 sub $0x4,%esp - 18cd9: 68 83 00 00 00 push $0x83 - 18cde: 68 c4 b2 01 00 push $0x1b2c4 - 18ce3: 68 d0 b2 01 00 push $0x1b2d0 - 18ce8: e8 73 0d 00 00 call 19a60 <_DbgPrint> - 18ced: 83 c4 10 add $0x10,%esp - 18cf0: 83 ec 08 sub $0x8,%esp - 18cf3: 8b 45 08 mov 0x8(%ebp),%eax - 18cf6: 8a 40 08 mov 0x8(%eax),%al - 18cf9: 25 ff 00 00 00 and $0xff,%eax - 18cfe: 01 c0 add %eax,%eax - 18d00: 50 push %eax - 18d01: 68 14 b6 01 00 push $0x1b614 - 18d06: e8 55 0d 00 00 call 19a60 <_DbgPrint> - 18d0b: 83 c4 10 add $0x10,%esp - 18d0e: c9 leave - 18d0f: c3 ret - -00018d10 <_usb_show_interface_descriptor>: - 18d10: 55 push %ebp - 18d11: 89 e5 mov %esp,%ebp - 18d13: 83 ec 08 sub $0x8,%esp - 18d16: 83 ec 04 sub $0x4,%esp - 18d19: 68 88 00 00 00 push $0x88 - 18d1e: 68 c4 b2 01 00 push $0x1b2c4 - 18d23: 68 d0 b2 01 00 push $0x1b2d0 - 18d28: e8 33 0d 00 00 call 19a60 <_DbgPrint> - 18d2d: 83 c4 10 add $0x10,%esp - 18d30: 83 ec 08 sub $0x8,%esp - 18d33: 8b 45 08 mov 0x8(%ebp),%eax - 18d36: 8a 40 03 mov 0x3(%eax),%al - 18d39: 25 ff 00 00 00 and $0xff,%eax - 18d3e: 50 push %eax - 18d3f: 68 34 b6 01 00 push $0x1b634 - 18d44: e8 17 0d 00 00 call 19a60 <_DbgPrint> - 18d49: 83 c4 10 add $0x10,%esp - 18d4c: 83 ec 04 sub $0x4,%esp - 18d4f: 68 8a 00 00 00 push $0x8a - 18d54: 68 c4 b2 01 00 push $0x1b2c4 - 18d59: 68 d0 b2 01 00 push $0x1b2d0 - 18d5e: e8 fd 0c 00 00 call 19a60 <_DbgPrint> - 18d63: 83 c4 10 add $0x10,%esp - 18d66: 83 ec 04 sub $0x4,%esp - 18d69: 8b 45 08 mov 0x8(%ebp),%eax - 18d6c: 80 38 09 cmpb $0x9,(%eax) - 18d6f: 75 09 jne 18d7a <_usb_show_interface_descriptor+0x6a> - 18d71: c7 45 fc 1a b3 01 00 movl $0x1b31a,0xfffffffc(%ebp) - 18d78: eb 07 jmp 18d81 <_usb_show_interface_descriptor+0x71> - 18d7a: c7 45 fc 1b b3 01 00 movl $0x1b31b,0xfffffffc(%ebp) - 18d81: ff 75 fc pushl 0xfffffffc(%ebp) - 18d84: 8b 45 08 mov 0x8(%ebp),%eax - 18d87: 8a 00 mov (%eax),%al - 18d89: 25 ff 00 00 00 and $0xff,%eax - 18d8e: 50 push %eax - 18d8f: 68 50 b6 01 00 push $0x1b650 - 18d94: e8 c7 0c 00 00 call 19a60 <_DbgPrint> - 18d99: 83 c4 10 add $0x10,%esp - 18d9c: 83 ec 04 sub $0x4,%esp - 18d9f: 68 8b 00 00 00 push $0x8b - 18da4: 68 c4 b2 01 00 push $0x1b2c4 - 18da9: 68 d0 b2 01 00 push $0x1b2d0 - 18dae: e8 ad 0c 00 00 call 19a60 <_DbgPrint> - 18db3: 83 c4 10 add $0x10,%esp - 18db6: 83 ec 08 sub $0x8,%esp - 18db9: 8b 45 08 mov 0x8(%ebp),%eax - 18dbc: 8a 40 01 mov 0x1(%eax),%al - 18dbf: 25 ff 00 00 00 and $0xff,%eax - 18dc4: 50 push %eax - 18dc5: 68 74 b6 01 00 push $0x1b674 - 18dca: e8 91 0c 00 00 call 19a60 <_DbgPrint> - 18dcf: 83 c4 10 add $0x10,%esp - 18dd2: 83 ec 04 sub $0x4,%esp - 18dd5: 68 8c 00 00 00 push $0x8c - 18dda: 68 c4 b2 01 00 push $0x1b2c4 - 18ddf: 68 d0 b2 01 00 push $0x1b2d0 - 18de4: e8 77 0c 00 00 call 19a60 <_DbgPrint> - 18de9: 83 c4 10 add $0x10,%esp - 18dec: 83 ec 08 sub $0x8,%esp - 18def: 8b 45 08 mov 0x8(%ebp),%eax - 18df2: 8a 40 02 mov 0x2(%eax),%al - 18df5: 25 ff 00 00 00 and $0xff,%eax - 18dfa: 50 push %eax - 18dfb: 68 98 b6 01 00 push $0x1b698 - 18e00: e8 5b 0c 00 00 call 19a60 <_DbgPrint> - 18e05: 83 c4 10 add $0x10,%esp - 18e08: 83 ec 04 sub $0x4,%esp - 18e0b: 68 8d 00 00 00 push $0x8d - 18e10: 68 c4 b2 01 00 push $0x1b2c4 - 18e15: 68 d0 b2 01 00 push $0x1b2d0 - 18e1a: e8 41 0c 00 00 call 19a60 <_DbgPrint> - 18e1f: 83 c4 10 add $0x10,%esp - 18e22: 83 ec 08 sub $0x8,%esp - 18e25: 8b 45 08 mov 0x8(%ebp),%eax - 18e28: 8a 40 03 mov 0x3(%eax),%al - 18e2b: 25 ff 00 00 00 and $0xff,%eax - 18e30: 50 push %eax - 18e31: 68 bc b6 01 00 push $0x1b6bc - 18e36: e8 25 0c 00 00 call 19a60 <_DbgPrint> - 18e3b: 83 c4 10 add $0x10,%esp - 18e3e: 83 ec 04 sub $0x4,%esp - 18e41: 68 8e 00 00 00 push $0x8e - 18e46: 68 c4 b2 01 00 push $0x1b2c4 - 18e4b: 68 d0 b2 01 00 push $0x1b2d0 - 18e50: e8 0b 0c 00 00 call 19a60 <_DbgPrint> - 18e55: 83 c4 10 add $0x10,%esp - 18e58: 83 ec 08 sub $0x8,%esp - 18e5b: 8b 45 08 mov 0x8(%ebp),%eax - 18e5e: 8a 40 04 mov 0x4(%eax),%al - 18e61: 25 ff 00 00 00 and $0xff,%eax - 18e66: 50 push %eax - 18e67: 68 e0 b6 01 00 push $0x1b6e0 - 18e6c: e8 ef 0b 00 00 call 19a60 <_DbgPrint> - 18e71: 83 c4 10 add $0x10,%esp - 18e74: 83 ec 04 sub $0x4,%esp - 18e77: 68 90 00 00 00 push $0x90 - 18e7c: 68 c4 b2 01 00 push $0x1b2c4 - 18e81: 68 d0 b2 01 00 push $0x1b2d0 - 18e86: e8 d5 0b 00 00 call 19a60 <_DbgPrint> - 18e8b: 83 c4 10 add $0x10,%esp - 18e8e: 8b 45 08 mov 0x8(%ebp),%eax - 18e91: 8a 40 07 mov 0x7(%eax),%al - 18e94: 25 ff 00 00 00 and $0xff,%eax - 18e99: 50 push %eax - 18e9a: 8b 45 08 mov 0x8(%ebp),%eax - 18e9d: 8a 40 06 mov 0x6(%eax),%al - 18ea0: 25 ff 00 00 00 and $0xff,%eax - 18ea5: 50 push %eax - 18ea6: 8b 45 08 mov 0x8(%ebp),%eax - 18ea9: 8a 40 05 mov 0x5(%eax),%al - 18eac: 25 ff 00 00 00 and $0xff,%eax - 18eb1: 50 push %eax - 18eb2: 68 04 b7 01 00 push $0x1b704 - 18eb7: e8 a4 0b 00 00 call 19a60 <_DbgPrint> - 18ebc: 83 c4 10 add $0x10,%esp - 18ebf: 83 ec 04 sub $0x4,%esp - 18ec2: 68 91 00 00 00 push $0x91 - 18ec7: 68 c4 b2 01 00 push $0x1b2c4 - 18ecc: 68 d0 b2 01 00 push $0x1b2d0 - 18ed1: e8 8a 0b 00 00 call 19a60 <_DbgPrint> - 18ed6: 83 c4 10 add $0x10,%esp - 18ed9: 83 ec 08 sub $0x8,%esp - 18edc: 8b 45 08 mov 0x8(%ebp),%eax - 18edf: 8a 40 08 mov 0x8(%eax),%al - 18ee2: 25 ff 00 00 00 and $0xff,%eax - 18ee7: 50 push %eax - 18ee8: 68 40 b7 01 00 push $0x1b740 - 18eed: e8 6e 0b 00 00 call 19a60 <_DbgPrint> - 18ef2: 83 c4 10 add $0x10,%esp - 18ef5: c9 leave - 18ef6: c3 ret - -00018ef7 <_usb_show_endpoint_descriptor>: - 18ef7: 55 push %ebp - 18ef8: 89 e5 mov %esp,%ebp - 18efa: 83 ec 38 sub $0x38,%esp - 18efd: 8b 45 08 mov 0x8(%ebp),%eax - 18f00: 80 38 09 cmpb $0x9,(%eax) - 18f03: 74 1a je 18f1f <_usb_show_endpoint_descriptor+0x28> - 18f05: 8b 45 08 mov 0x8(%ebp),%eax - 18f08: 80 38 07 cmpb $0x7,(%eax) - 18f0b: 75 09 jne 18f16 <_usb_show_endpoint_descriptor+0x1f> - 18f0d: c7 45 d4 1a b3 01 00 movl $0x1b31a,0xffffffd4(%ebp) - 18f14: eb 10 jmp 18f26 <_usb_show_endpoint_descriptor+0x2f> - 18f16: c7 45 d4 1b b3 01 00 movl $0x1b31b,0xffffffd4(%ebp) - 18f1d: eb 07 jmp 18f26 <_usb_show_endpoint_descriptor+0x2f> - 18f1f: c7 45 d4 62 b7 01 00 movl $0x1b762,0xffffffd4(%ebp) - 18f26: 8b 45 d4 mov 0xffffffd4(%ebp),%eax - 18f29: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 18f2c: c7 45 d8 6b b7 01 00 movl $0x1b76b,0xffffffd8(%ebp) - 18f33: c7 45 dc 73 b7 01 00 movl $0x1b773,0xffffffdc(%ebp) - 18f3a: c7 45 e0 7f b7 01 00 movl $0x1b77f,0xffffffe0(%ebp) - 18f41: c7 45 e4 84 b7 01 00 movl $0x1b784,0xffffffe4(%ebp) - 18f48: 83 ec 04 sub $0x4,%esp - 18f4b: 68 9b 00 00 00 push $0x9b - 18f50: 68 c4 b2 01 00 push $0x1b2c4 - 18f55: 68 d0 b2 01 00 push $0x1b2d0 - 18f5a: e8 01 0b 00 00 call 19a60 <_DbgPrint> - 18f5f: 83 c4 10 add $0x10,%esp - 18f62: 83 ec 0c sub $0xc,%esp - 18f65: 68 8e b7 01 00 push $0x1b78e - 18f6a: e8 f1 0a 00 00 call 19a60 <_DbgPrint> - 18f6f: 83 c4 10 add $0x10,%esp - 18f72: 83 ec 04 sub $0x4,%esp - 18f75: 68 9d 00 00 00 push $0x9d - 18f7a: 68 c4 b2 01 00 push $0x1b2c4 - 18f7f: 68 d0 b2 01 00 push $0x1b2d0 - 18f84: e8 d7 0a 00 00 call 19a60 <_DbgPrint> - 18f89: 83 c4 10 add $0x10,%esp - 18f8c: 83 ec 04 sub $0x4,%esp - 18f8f: ff 75 f4 pushl 0xfffffff4(%ebp) - 18f92: 8b 45 08 mov 0x8(%ebp),%eax - 18f95: 8a 00 mov (%eax),%al - 18f97: 25 ff 00 00 00 and $0xff,%eax - 18f9c: 50 push %eax - 18f9d: 68 a0 b7 01 00 push $0x1b7a0 - 18fa2: e8 b9 0a 00 00 call 19a60 <_DbgPrint> - 18fa7: 83 c4 10 add $0x10,%esp - 18faa: 83 ec 04 sub $0x4,%esp - 18fad: 68 9e 00 00 00 push $0x9e - 18fb2: 68 c4 b2 01 00 push $0x1b2c4 - 18fb7: 68 d0 b2 01 00 push $0x1b2d0 - 18fbc: e8 9f 0a 00 00 call 19a60 <_DbgPrint> - 18fc1: 83 c4 10 add $0x10,%esp - 18fc4: 83 ec 08 sub $0x8,%esp - 18fc7: 8b 45 08 mov 0x8(%ebp),%eax - 18fca: 8a 40 01 mov 0x1(%eax),%al - 18fcd: 25 ff 00 00 00 and $0xff,%eax - 18fd2: 50 push %eax - 18fd3: 68 c4 b7 01 00 push $0x1b7c4 - 18fd8: e8 83 0a 00 00 call 19a60 <_DbgPrint> - 18fdd: 83 c4 10 add $0x10,%esp - 18fe0: 83 ec 04 sub $0x4,%esp - 18fe3: 68 a2 00 00 00 push $0xa2 - 18fe8: 68 c4 b2 01 00 push $0x1b2c4 - 18fed: 68 d0 b2 01 00 push $0x1b2d0 - 18ff2: e8 69 0a 00 00 call 19a60 <_DbgPrint> - 18ff7: 83 c4 10 add $0x10,%esp - 18ffa: 83 ec 04 sub $0x4,%esp - 18ffd: 8b 45 08 mov 0x8(%ebp),%eax - 19000: 8a 40 03 mov 0x3(%eax),%al - 19003: 25 ff 00 00 00 and $0xff,%eax - 19008: 83 e0 03 and $0x3,%eax - 1900b: 85 c0 test %eax,%eax - 1900d: 74 21 je 19030 <_usb_show_endpoint_descriptor+0x139> - 1900f: 8b 45 08 mov 0x8(%ebp),%eax - 19012: 80 78 02 00 cmpb $0x0,0x2(%eax) - 19016: 79 09 jns 19021 <_usb_show_endpoint_descriptor+0x12a> - 19018: c7 45 cc e8 b7 01 00 movl $0x1b7e8,0xffffffcc(%ebp) - 1901f: eb 07 jmp 19028 <_usb_show_endpoint_descriptor+0x131> - 19021: c7 45 cc eb b7 01 00 movl $0x1b7eb,0xffffffcc(%ebp) - 19028: 8b 45 cc mov 0xffffffcc(%ebp),%eax - 1902b: 89 45 d0 mov %eax,0xffffffd0(%ebp) - 1902e: eb 07 jmp 19037 <_usb_show_endpoint_descriptor+0x140> - 19030: c7 45 d0 ef b7 01 00 movl $0x1b7ef,0xffffffd0(%ebp) - 19037: ff 75 d0 pushl 0xffffffd0(%ebp) - 1903a: 8b 45 08 mov 0x8(%ebp),%eax - 1903d: 8a 40 02 mov 0x2(%eax),%al - 19040: 25 ff 00 00 00 and $0xff,%eax - 19045: 50 push %eax - 19046: 68 f4 b7 01 00 push $0x1b7f4 - 1904b: e8 10 0a 00 00 call 19a60 <_DbgPrint> - 19050: 83 c4 10 add $0x10,%esp - 19053: 83 ec 04 sub $0x4,%esp - 19056: 68 a4 00 00 00 push $0xa4 - 1905b: 68 c4 b2 01 00 push $0x1b2c4 - 19060: 68 d0 b2 01 00 push $0x1b2d0 - 19065: e8 f6 09 00 00 call 19a60 <_DbgPrint> - 1906a: 83 c4 10 add $0x10,%esp - 1906d: 83 ec 04 sub $0x4,%esp - 19070: 8b 45 08 mov 0x8(%ebp),%eax - 19073: 8a 40 03 mov 0x3(%eax),%al - 19076: 25 ff 00 00 00 and $0xff,%eax - 1907b: 83 e0 03 and $0x3,%eax - 1907e: ff 74 85 d8 pushl 0xffffffd8(%ebp,%eax,4) - 19082: 8b 45 08 mov 0x8(%ebp),%eax - 19085: 8a 40 03 mov 0x3(%eax),%al - 19088: 25 ff 00 00 00 and $0xff,%eax - 1908d: 50 push %eax - 1908e: 68 20 b8 01 00 push $0x1b820 - 19093: e8 c8 09 00 00 call 19a60 <_DbgPrint> - 19098: 83 c4 10 add $0x10,%esp - 1909b: 83 ec 04 sub $0x4,%esp - 1909e: 68 a5 00 00 00 push $0xa5 - 190a3: 68 c4 b2 01 00 push $0x1b2c4 - 190a8: 68 d0 b2 01 00 push $0x1b2d0 - 190ad: e8 ae 09 00 00 call 19a60 <_DbgPrint> - 190b2: 83 c4 10 add $0x10,%esp - 190b5: 83 ec 08 sub $0x8,%esp - 190b8: 8b 45 08 mov 0x8(%ebp),%eax - 190bb: 66 8b 40 04 mov 0x4(%eax),%ax - 190bf: 25 ff ff 00 00 and $0xffff,%eax - 190c4: 50 push %eax - 190c5: 68 4c b8 01 00 push $0x1b84c - 190ca: e8 91 09 00 00 call 19a60 <_DbgPrint> - 190cf: 83 c4 10 add $0x10,%esp - 190d2: 83 ec 04 sub $0x4,%esp - 190d5: 68 a6 00 00 00 push $0xa6 - 190da: 68 c4 b2 01 00 push $0x1b2c4 - 190df: 68 d0 b2 01 00 push $0x1b2d0 - 190e4: e8 77 09 00 00 call 19a60 <_DbgPrint> - 190e9: 83 c4 10 add $0x10,%esp - 190ec: 83 ec 08 sub $0x8,%esp - 190ef: 8b 45 08 mov 0x8(%ebp),%eax - 190f2: 8a 40 06 mov 0x6(%eax),%al - 190f5: 25 ff 00 00 00 and $0xff,%eax - 190fa: 50 push %eax - 190fb: 68 70 b8 01 00 push $0x1b870 - 19100: e8 5b 09 00 00 call 19a60 <_DbgPrint> - 19105: 83 c4 10 add $0x10,%esp - 19108: 8b 45 08 mov 0x8(%ebp),%eax - 1910b: 80 38 09 cmpb $0x9,(%eax) - 1910e: 75 6c jne 1917c <_usb_show_endpoint_descriptor+0x285> - 19110: 83 ec 04 sub $0x4,%esp - 19113: 68 aa 00 00 00 push $0xaa - 19118: 68 c4 b2 01 00 push $0x1b2c4 - 1911d: 68 d0 b2 01 00 push $0x1b2d0 - 19122: e8 39 09 00 00 call 19a60 <_DbgPrint> - 19127: 83 c4 10 add $0x10,%esp - 1912a: 83 ec 08 sub $0x8,%esp - 1912d: 8b 45 08 mov 0x8(%ebp),%eax - 19130: 8a 40 07 mov 0x7(%eax),%al - 19133: 25 ff 00 00 00 and $0xff,%eax - 19138: 50 push %eax - 19139: 68 94 b8 01 00 push $0x1b894 - 1913e: e8 1d 09 00 00 call 19a60 <_DbgPrint> - 19143: 83 c4 10 add $0x10,%esp - 19146: 83 ec 04 sub $0x4,%esp - 19149: 68 ab 00 00 00 push $0xab - 1914e: 68 c4 b2 01 00 push $0x1b2c4 - 19153: 68 d0 b2 01 00 push $0x1b2d0 - 19158: e8 03 09 00 00 call 19a60 <_DbgPrint> - 1915d: 83 c4 10 add $0x10,%esp - 19160: 83 ec 08 sub $0x8,%esp - 19163: 8b 45 08 mov 0x8(%ebp),%eax - 19166: 8a 40 08 mov 0x8(%eax),%al - 19169: 25 ff 00 00 00 and $0xff,%eax - 1916e: 50 push %eax - 1916f: 68 b8 b8 01 00 push $0x1b8b8 - 19174: e8 e7 08 00 00 call 19a60 <_DbgPrint> - 19179: 83 c4 10 add $0x10,%esp - 1917c: c9 leave - 1917d: c3 ret - -0001917e <_usb_show_string>: - 1917e: 55 push %ebp - 1917f: 89 e5 mov %esp,%ebp - 19181: 83 ec 08 sub $0x8,%esp - 19184: 83 7d 10 00 cmpl $0x0,0x10(%ebp) - 19188: 75 02 jne 1918c <_usb_show_string+0xe> - 1918a: eb 42 jmp 191ce <_usb_show_string+0x50> - 1918c: 83 ec 08 sub $0x8,%esp - 1918f: 68 00 01 00 00 push $0x100 - 19194: 6a 01 push $0x1 - 19196: e8 95 08 00 00 call 19a30 <_ExAllocatePool@8> - 1919b: 83 c4 08 add $0x8,%esp - 1919e: 89 45 fc mov %eax,0xfffffffc(%ebp) - 191a1: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 191a4: 85 c0 test %eax,%eax - 191a6: 75 02 jne 191aa <_usb_show_string+0x2c> - 191a8: eb 24 jmp 191ce <_usb_show_string+0x50> - 191aa: 68 00 01 00 00 push $0x100 - 191af: ff 75 fc pushl 0xfffffffc(%ebp) - 191b2: ff 75 10 pushl 0x10(%ebp) - 191b5: ff 75 08 pushl 0x8(%ebp) - 191b8: e8 26 8a ff ff call 11be3 <_usb_string> - 191bd: 83 c4 10 add $0x10,%esp - 191c0: 83 ec 0c sub $0xc,%esp - 191c3: ff 75 fc pushl 0xfffffffc(%ebp) - 191c6: e8 75 08 00 00 call 19a40 <_ExFreePool@4> - 191cb: 83 c4 0c add $0xc,%esp - 191ce: c9 leave - 191cf: c3 ret - -000191d0 <_usb_dump_urb>: - 191d0: 55 push %ebp - 191d1: 89 e5 mov %esp,%ebp - 191d3: 83 ec 08 sub $0x8,%esp - 191d6: 83 ec 04 sub $0x4,%esp - 191d9: 68 be 00 00 00 push $0xbe - 191de: 68 c4 b2 01 00 push $0x1b2c4 - 191e3: 68 d0 b2 01 00 push $0x1b2d0 - 191e8: e8 73 08 00 00 call 19a60 <_DbgPrint> - 191ed: 83 c4 10 add $0x10,%esp - 191f0: 83 ec 08 sub $0x8,%esp - 191f3: ff 75 08 pushl 0x8(%ebp) - 191f6: 68 dc b8 01 00 push $0x1b8dc - 191fb: e8 60 08 00 00 call 19a60 <_DbgPrint> - 19200: 83 c4 10 add $0x10,%esp - 19203: 83 ec 04 sub $0x4,%esp - 19206: 68 bf 00 00 00 push $0xbf - 1920b: 68 c4 b2 01 00 push $0x1b2c4 - 19210: 68 d0 b2 01 00 push $0x1b2d0 - 19215: e8 46 08 00 00 call 19a60 <_DbgPrint> - 1921a: 83 c4 10 add $0x10,%esp - 1921d: 83 ec 08 sub $0x8,%esp - 19220: 8b 45 08 mov 0x8(%ebp),%eax - 19223: ff 70 14 pushl 0x14(%eax) - 19226: 68 f7 b8 01 00 push $0x1b8f7 - 1922b: e8 30 08 00 00 call 19a60 <_DbgPrint> - 19230: 83 c4 10 add $0x10,%esp - 19233: 83 ec 04 sub $0x4,%esp - 19236: 68 c0 00 00 00 push $0xc0 - 1923b: 68 c4 b2 01 00 push $0x1b2c4 - 19240: 68 d0 b2 01 00 push $0x1b2d0 - 19245: e8 16 08 00 00 call 19a60 <_DbgPrint> - 1924a: 83 c4 10 add $0x10,%esp - 1924d: 83 ec 08 sub $0x8,%esp - 19250: 8b 45 08 mov 0x8(%ebp),%eax - 19253: ff 70 18 pushl 0x18(%eax) - 19256: 68 12 b9 01 00 push $0x1b912 - 1925b: e8 00 08 00 00 call 19a60 <_DbgPrint> - 19260: 83 c4 10 add $0x10,%esp - 19263: 83 ec 04 sub $0x4,%esp - 19266: 68 c1 00 00 00 push $0xc1 - 1926b: 68 c4 b2 01 00 push $0x1b2c4 - 19270: 68 d0 b2 01 00 push $0x1b2d0 - 19275: e8 e6 07 00 00 call 19a60 <_DbgPrint> - 1927a: 83 c4 10 add $0x10,%esp - 1927d: 83 ec 08 sub $0x8,%esp - 19280: 8b 45 08 mov 0x8(%ebp),%eax - 19283: ff 70 1c pushl 0x1c(%eax) - 19286: 68 2f b9 01 00 push $0x1b92f - 1928b: e8 d0 07 00 00 call 19a60 <_DbgPrint> - 19290: 83 c4 10 add $0x10,%esp - 19293: 83 ec 04 sub $0x4,%esp - 19296: 68 c2 00 00 00 push $0xc2 - 1929b: 68 c4 b2 01 00 push $0x1b2c4 - 192a0: 68 d0 b2 01 00 push $0x1b2d0 - 192a5: e8 b6 07 00 00 call 19a60 <_DbgPrint> - 192aa: 83 c4 10 add $0x10,%esp - 192ad: 83 ec 08 sub $0x8,%esp - 192b0: 8b 45 08 mov 0x8(%ebp),%eax - 192b3: ff 70 20 pushl 0x20(%eax) - 192b6: 68 4a b9 01 00 push $0x1b94a - 192bb: e8 a0 07 00 00 call 19a60 <_DbgPrint> - 192c0: 83 c4 10 add $0x10,%esp - 192c3: 83 ec 04 sub $0x4,%esp - 192c6: 68 c3 00 00 00 push $0xc3 - 192cb: 68 c4 b2 01 00 push $0x1b2c4 - 192d0: 68 d0 b2 01 00 push $0x1b2d0 - 192d5: e8 86 07 00 00 call 19a60 <_DbgPrint> - 192da: 83 c4 10 add $0x10,%esp - 192dd: 83 ec 08 sub $0x8,%esp - 192e0: 8b 45 08 mov 0x8(%ebp),%eax - 192e3: ff 70 24 pushl 0x24(%eax) - 192e6: 68 67 b9 01 00 push $0x1b967 - 192eb: e8 70 07 00 00 call 19a60 <_DbgPrint> - 192f0: 83 c4 10 add $0x10,%esp - 192f3: 83 ec 04 sub $0x4,%esp - 192f6: 68 c4 00 00 00 push $0xc4 - 192fb: 68 c4 b2 01 00 push $0x1b2c4 - 19300: 68 d0 b2 01 00 push $0x1b2d0 - 19305: e8 56 07 00 00 call 19a60 <_DbgPrint> - 1930a: 83 c4 10 add $0x10,%esp - 1930d: 83 ec 08 sub $0x8,%esp - 19310: 8b 45 08 mov 0x8(%ebp),%eax - 19313: ff 70 2c pushl 0x2c(%eax) - 19316: 68 82 b9 01 00 push $0x1b982 - 1931b: e8 40 07 00 00 call 19a60 <_DbgPrint> - 19320: 83 c4 10 add $0x10,%esp - 19323: 83 ec 04 sub $0x4,%esp - 19326: 68 c5 00 00 00 push $0xc5 - 1932b: 68 c4 b2 01 00 push $0x1b2c4 - 19330: 68 d0 b2 01 00 push $0x1b2d0 - 19335: e8 26 07 00 00 call 19a60 <_DbgPrint> - 1933a: 83 c4 10 add $0x10,%esp - 1933d: 83 ec 08 sub $0x8,%esp - 19340: 8b 45 08 mov 0x8(%ebp),%eax - 19343: ff 70 30 pushl 0x30(%eax) - 19346: 68 9d b9 01 00 push $0x1b99d - 1934b: e8 10 07 00 00 call 19a60 <_DbgPrint> - 19350: 83 c4 10 add $0x10,%esp - 19353: 83 ec 04 sub $0x4,%esp - 19356: 68 c6 00 00 00 push $0xc6 - 1935b: 68 c4 b2 01 00 push $0x1b2c4 - 19360: 68 d0 b2 01 00 push $0x1b2d0 - 19365: e8 f6 06 00 00 call 19a60 <_DbgPrint> - 1936a: 83 c4 10 add $0x10,%esp - 1936d: 83 ec 08 sub $0x8,%esp - 19370: 8b 45 08 mov 0x8(%ebp),%eax - 19373: ff 70 38 pushl 0x38(%eax) - 19376: 68 b8 b9 01 00 push $0x1b9b8 - 1937b: e8 e0 06 00 00 call 19a60 <_DbgPrint> - 19380: 83 c4 10 add $0x10,%esp - 19383: 83 ec 04 sub $0x4,%esp - 19386: 68 c7 00 00 00 push $0xc7 - 1938b: 68 c4 b2 01 00 push $0x1b2c4 - 19390: 68 d0 b2 01 00 push $0x1b2d0 - 19395: e8 c6 06 00 00 call 19a60 <_DbgPrint> - 1939a: 83 c4 10 add $0x10,%esp - 1939d: 83 ec 08 sub $0x8,%esp - 193a0: 8b 45 08 mov 0x8(%ebp),%eax - 193a3: ff 70 40 pushl 0x40(%eax) - 193a6: 68 d3 b9 01 00 push $0x1b9d3 - 193ab: e8 b0 06 00 00 call 19a60 <_DbgPrint> - 193b0: 83 c4 10 add $0x10,%esp - 193b3: 83 ec 04 sub $0x4,%esp - 193b6: 68 c8 00 00 00 push $0xc8 - 193bb: 68 c4 b2 01 00 push $0x1b2c4 - 193c0: 68 d0 b2 01 00 push $0x1b2d0 - 193c5: e8 96 06 00 00 call 19a60 <_DbgPrint> - 193ca: 83 c4 10 add $0x10,%esp - 193cd: 83 ec 08 sub $0x8,%esp - 193d0: 8b 45 08 mov 0x8(%ebp),%eax - 193d3: ff 70 44 pushl 0x44(%eax) - 193d6: 68 ee b9 01 00 push $0x1b9ee - 193db: e8 80 06 00 00 call 19a60 <_DbgPrint> - 193e0: 83 c4 10 add $0x10,%esp - 193e3: 83 ec 04 sub $0x4,%esp - 193e6: 68 c9 00 00 00 push $0xc9 - 193eb: 68 c4 b2 01 00 push $0x1b2c4 - 193f0: 68 d0 b2 01 00 push $0x1b2d0 - 193f5: e8 66 06 00 00 call 19a60 <_DbgPrint> - 193fa: 83 c4 10 add $0x10,%esp - 193fd: 83 ec 08 sub $0x8,%esp - 19400: 8b 45 08 mov 0x8(%ebp),%eax - 19403: ff 70 48 pushl 0x48(%eax) - 19406: 68 09 ba 01 00 push $0x1ba09 - 1940b: e8 50 06 00 00 call 19a60 <_DbgPrint> - 19410: 83 c4 10 add $0x10,%esp - 19413: 83 ec 04 sub $0x4,%esp - 19416: 68 ca 00 00 00 push $0xca - 1941b: 68 c4 b2 01 00 push $0x1b2c4 - 19420: 68 d0 b2 01 00 push $0x1b2d0 - 19425: e8 36 06 00 00 call 19a60 <_DbgPrint> - 1942a: 83 c4 10 add $0x10,%esp - 1942d: 83 ec 08 sub $0x8,%esp - 19430: 8b 45 08 mov 0x8(%ebp),%eax - 19433: ff 70 4c pushl 0x4c(%eax) - 19436: 68 24 ba 01 00 push $0x1ba24 - 1943b: e8 20 06 00 00 call 19a60 <_DbgPrint> - 19440: 83 c4 10 add $0x10,%esp - 19443: 83 ec 04 sub $0x4,%esp - 19446: 68 cb 00 00 00 push $0xcb - 1944b: 68 c4 b2 01 00 push $0x1b2c4 - 19450: 68 d0 b2 01 00 push $0x1b2d0 - 19455: e8 06 06 00 00 call 19a60 <_DbgPrint> - 1945a: 83 c4 10 add $0x10,%esp - 1945d: 83 ec 08 sub $0x8,%esp - 19460: 8b 45 08 mov 0x8(%ebp),%eax - 19463: ff 70 54 pushl 0x54(%eax) - 19466: 68 3f ba 01 00 push $0x1ba3f - 1946b: e8 f0 05 00 00 call 19a60 <_DbgPrint> - 19470: 83 c4 10 add $0x10,%esp - 19473: 83 ec 04 sub $0x4,%esp - 19476: 68 cc 00 00 00 push $0xcc - 1947b: 68 c4 b2 01 00 push $0x1b2c4 - 19480: 68 d0 b2 01 00 push $0x1b2d0 - 19485: e8 d6 05 00 00 call 19a60 <_DbgPrint> - 1948a: 83 c4 10 add $0x10,%esp - 1948d: 83 ec 08 sub $0x8,%esp - 19490: 8b 45 08 mov 0x8(%ebp),%eax - 19493: ff 70 58 pushl 0x58(%eax) - 19496: 68 5a ba 01 00 push $0x1ba5a - 1949b: e8 c0 05 00 00 call 19a60 <_DbgPrint> - 194a0: 83 c4 10 add $0x10,%esp - 194a3: c9 leave - 194a4: c3 ret - 194a5: 90 nop - 194a6: 90 nop - 194a7: 90 nop - 194a8: 90 nop - 194a9: 90 nop - 194aa: 90 nop - 194ab: 90 nop - 194ac: 90 nop - 194ad: 90 nop - 194ae: 90 nop - 194af: 90 nop - -000194b0 <_wait_ms>: - 194b0: 55 push %ebp - 194b1: 89 e5 mov %esp,%ebp - 194b3: 83 ec 08 sub $0x8,%esp - 194b6: 8b 55 08 mov 0x8(%ebp),%edx - 194b9: 89 d0 mov %edx,%eax - 194bb: c1 e0 02 shl $0x2,%eax - 194be: 01 d0 add %edx,%eax - 194c0: 01 c0 add %eax,%eax - 194c2: f7 d8 neg %eax - 194c4: 99 cltd - 194c5: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 194c8: 89 55 fc mov %edx,0xfffffffc(%ebp) - 194cb: 83 ec 04 sub $0x4,%esp - 194ce: 8d 45 f8 lea 0xfffffff8(%ebp),%eax - 194d1: 50 push %eax - 194d2: 6a 00 push $0x0 - 194d4: 6a 00 push $0x0 - 194d6: e8 f5 05 00 00 call 19ad0 <_KeDelayExecutionThread@12> - 194db: 83 c4 04 add $0x4,%esp - 194de: c9 leave - 194df: c3 ret - -000194e0 <_init_wrapper>: - 194e0: 55 push %ebp - 194e1: 89 e5 mov %esp,%ebp - 194e3: 83 ec 04 sub $0x4,%esp - 194e6: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) - 194ed: 83 7d fc 13 cmpl $0x13,0xfffffffc(%ebp) - 194f1: 7f 15 jg 19508 <_init_wrapper+0x28> - 194f3: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 194f6: c7 04 85 60 c1 01 00 movl $0x0,0x1c160(,%eax,4) - 194fd: 00 00 00 00 - 19501: 8d 45 fc lea 0xfffffffc(%ebp),%eax - 19504: ff 00 incl (%eax) - 19506: eb e5 jmp 194ed <_init_wrapper+0xd> - 19508: c7 05 40 c2 01 00 00 movl $0x0,0x1c240 - 1950f: 00 00 00 - 19512: c7 05 40 c1 01 00 00 movl $0x0,0x1c140 - 19519: 00 00 00 - 1951c: c7 05 30 c2 01 00 80 movl $0x1c080,0x1c230 - 19523: c0 01 00 - 19526: c7 05 88 c0 01 00 00 movl $0x0,0x1c088 - 1952d: 00 00 00 - 19530: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) - 19537: 83 7d fc 07 cmpl $0x7,0xfffffffc(%ebp) - 1953b: 7f 33 jg 19570 <_init_wrapper+0x90> - 1953d: 8b 55 fc mov 0xfffffffc(%ebp),%edx - 19540: 89 d0 mov %edx,%eax - 19542: 01 c0 add %eax,%eax - 19544: 01 d0 add %edx,%eax - 19546: c1 e0 02 shl $0x2,%eax - 19549: c7 80 d0 c1 01 00 00 movl $0x0,0x1c1d0(%eax) - 19550: 00 00 00 - 19553: 8b 55 fc mov 0xfffffffc(%ebp),%edx - 19556: 89 d0 mov %edx,%eax - 19558: 01 c0 add %eax,%eax - 1955a: 01 d0 add %edx,%eax - 1955c: c1 e0 02 shl $0x2,%eax - 1955f: c7 80 d4 c1 01 00 ff movl $0xffffffff,0x1c1d4(%eax) - 19566: ff ff ff - 19569: 8d 45 fc lea 0xfffffffc(%ebp),%eax - 1956c: ff 00 incl (%eax) - 1956e: eb c7 jmp 19537 <_init_wrapper+0x57> - 19570: c7 05 b8 c0 01 00 00 movl $0x0,0x1c0b8 - 19577: 00 00 00 - 1957a: c7 05 c0 c1 01 00 00 movl $0x0,0x1c1c0 - 19581: 00 00 00 - 19584: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) - 1958b: 83 7d fc 07 cmpl $0x7,0xfffffffc(%ebp) - 1958f: 7f 15 jg 195a6 <_init_wrapper+0xc6> - 19591: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 19594: c7 04 85 98 c0 01 00 movl $0x0,0x1c098(,%eax,4) - 1959b: 00 00 00 00 - 1959f: 8d 45 fc lea 0xfffffffc(%ebp),%eax - 195a2: ff 00 incl (%eax) - 195a4: eb e5 jmp 1958b <_init_wrapper+0xab> - 195a6: c9 leave - 195a7: c3 ret - -000195a8 <_handle_irqs>: - 195a8: 55 push %ebp - 195a9: 89 e5 mov %esp,%ebp - 195ab: 83 ec 08 sub $0x8,%esp - 195ae: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) - 195b5: 83 7d fc 07 cmpl $0x7,0xfffffffc(%ebp) - 195b9: 0f 8f 86 00 00 00 jg 19645 <_handle_irqs+0x9d> - 195bf: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 195c2: 89 c2 mov %eax,%edx - 195c4: 01 d2 add %edx,%edx - 195c6: 01 c2 add %eax,%edx - 195c8: 8d 04 95 00 00 00 00 lea 0x0(,%edx,4),%eax - 195cf: 83 b8 d0 c1 01 00 00 cmpl $0x0,0x1c1d0(%eax) - 195d6: 74 63 je 1963b <_handle_irqs+0x93> - 195d8: 8b 55 fc mov 0xfffffffc(%ebp),%edx - 195db: 89 d0 mov %edx,%eax - 195dd: 01 c0 add %eax,%eax - 195df: 01 d0 add %edx,%eax - 195e1: c1 e0 02 shl $0x2,%eax - 195e4: 8b 80 d4 c1 01 00 mov 0x1c1d4(%eax),%eax - 195ea: 3b 45 08 cmp 0x8(%ebp),%eax - 195ed: 74 08 je 195f7 <_handle_irqs+0x4f> - 195ef: 83 7d 08 ff cmpl $0xffffffff,0x8(%ebp) - 195f3: 74 02 je 195f7 <_handle_irqs+0x4f> - 195f5: eb 44 jmp 1963b <_handle_irqs+0x93> - 195f7: 83 ec 04 sub $0x4,%esp - 195fa: 8b 55 fc mov 0xfffffffc(%ebp),%edx - 195fd: 89 d0 mov %edx,%eax - 195ff: 01 c0 add %eax,%eax - 19601: 01 d0 add %edx,%eax - 19603: 8d 0c 85 00 00 00 00 lea 0x0(,%eax,4),%ecx - 1960a: 6a 00 push $0x0 - 1960c: 8b 55 fc mov 0xfffffffc(%ebp),%edx - 1960f: 89 d0 mov %edx,%eax - 19611: 01 c0 add %eax,%eax - 19613: 01 d0 add %edx,%eax - 19615: c1 e0 02 shl $0x2,%eax - 19618: ff b0 d8 c1 01 00 pushl 0x1c1d8(%eax) - 1961e: 8b 55 fc mov 0xfffffffc(%ebp),%edx - 19621: 89 d0 mov %edx,%eax - 19623: 01 c0 add %eax,%eax - 19625: 01 d0 add %edx,%eax - 19627: c1 e0 02 shl $0x2,%eax - 1962a: ff b0 d4 c1 01 00 pushl 0x1c1d4(%eax) - 19630: 8b 81 d0 c1 01 00 mov 0x1c1d0(%ecx),%eax - 19636: ff d0 call *%eax - 19638: 83 c4 10 add $0x10,%esp - 1963b: 8d 45 fc lea 0xfffffffc(%ebp),%eax - 1963e: ff 00 incl (%eax) - 19640: e9 70 ff ff ff jmp 195b5 <_handle_irqs+0xd> - 19645: c9 leave - 19646: c3 ret - -00019647 <_inc_jiffies>: - 19647: 55 push %ebp - 19648: 89 e5 mov %esp,%ebp - 1964a: 8b 45 08 mov 0x8(%ebp),%eax - 1964d: 01 05 40 c2 01 00 add %eax,0x1c240 - 19653: 5d pop %ebp - 19654: c3 ret - -00019655 <_do_all_timers>: - 19655: 55 push %ebp - 19656: 89 e5 mov %esp,%ebp - 19658: 83 ec 18 sub $0x18,%esp - 1965b: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) - 19662: 83 7d fc 13 cmpl $0x13,0xfffffffc(%ebp) - 19666: 0f 8f 82 00 00 00 jg 196ee <_do_all_timers+0x99> - 1966c: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 1966f: 83 3c 85 60 c1 01 00 cmpl $0x0,0x1c160(,%eax,4) - 19676: 00 - 19677: 74 6b je 196e4 <_do_all_timers+0x8f> - 19679: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 1967c: 8b 04 85 60 c1 01 00 mov 0x1c160(,%eax,4),%eax - 19683: 83 38 00 cmpl $0x0,(%eax) - 19686: 74 5c je 196e4 <_do_all_timers+0x8f> - 19688: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 1968b: 8b 04 85 60 c1 01 00 mov 0x1c160(,%eax,4),%eax - 19692: 83 78 08 00 cmpl $0x0,0x8(%eax) - 19696: 74 4c je 196e4 <_do_all_timers+0x8f> - 19698: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 1969b: 8b 04 85 60 c1 01 00 mov 0x1c160(,%eax,4),%eax - 196a2: 8b 00 mov (%eax),%eax - 196a4: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 196a7: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 196aa: 8b 04 85 60 c1 01 00 mov 0x1c160(,%eax,4),%eax - 196b1: 8b 40 04 mov 0x4(%eax),%eax - 196b4: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 196b7: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 196ba: 8b 04 85 60 c1 01 00 mov 0x1c160(,%eax,4),%eax - 196c1: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) - 196c8: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 196cb: c7 04 85 60 c1 01 00 movl $0x0,0x1c160(,%eax,4) - 196d2: 00 00 00 00 - 196d6: 83 ec 0c sub $0xc,%esp - 196d9: ff 75 f4 pushl 0xfffffff4(%ebp) - 196dc: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 196df: ff d0 call *%eax - 196e1: 83 c4 10 add $0x10,%esp - 196e4: 8d 45 fc lea 0xfffffffc(%ebp),%eax - 196e7: ff 00 incl (%eax) - 196e9: e9 74 ff ff ff jmp 19662 <_do_all_timers+0xd> - 196ee: c9 leave - 196ef: c3 ret - -000196f0 <_my_kernel_thread>: - 196f0: 55 push %ebp - 196f1: 89 e5 mov %esp,%ebp - 196f3: 8b 45 08 mov 0x8(%ebp),%eax - 196f6: a3 50 c1 01 00 mov %eax,0x1c150 - 196fb: 8b 45 0c mov 0xc(%ebp),%eax - 196fe: a3 b0 c1 01 00 mov %eax,0x1c1b0 - 19703: b8 2a 00 00 00 mov $0x2a,%eax - 19708: 5d pop %ebp - 19709: c3 ret - -0001970a <_my_device_add>: - 1970a: 55 push %ebp - 1970b: 89 e5 mov %esp,%ebp - 1970d: 83 ec 18 sub $0x18,%esp - 19710: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) - 19717: 8b 45 08 mov 0x8(%ebp),%eax - 1971a: 83 b8 98 00 00 00 00 cmpl $0x0,0x98(%eax) - 19721: 74 32 je 19755 <_my_device_add+0x4b> - 19723: 8b 45 08 mov 0x8(%ebp),%eax - 19726: 8b 80 98 00 00 00 mov 0x98(%eax),%eax - 1972c: 83 78 08 00 cmpl $0x0,0x8(%eax) - 19730: 0f 84 8d 00 00 00 je 197c3 <_my_device_add+0xb9> - 19736: 83 ec 0c sub $0xc,%esp - 19739: 8b 45 08 mov 0x8(%ebp),%eax - 1973c: 8b 80 98 00 00 00 mov 0x98(%eax),%eax - 19742: ff 75 08 pushl 0x8(%ebp) - 19745: 8b 40 08 mov 0x8(%eax),%eax - 19748: ff d0 call *%eax - 1974a: 83 c4 10 add $0x10,%esp - 1974d: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 19750: e9 82 00 00 00 jmp 197d7 <_my_device_add+0xcd> - 19755: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) - 1975c: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 1975f: 3b 05 b8 c0 01 00 cmp 0x1c0b8,%eax - 19765: 7d 4d jge 197b4 <_my_device_add+0xaa> - 19767: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 1976a: 8b 04 85 98 c0 01 00 mov 0x1c098(,%eax,4),%eax - 19771: 83 78 08 00 cmpl $0x0,0x8(%eax) - 19775: 74 36 je 197ad <_my_device_add+0xa3> - 19777: 8b 55 08 mov 0x8(%ebp),%edx - 1977a: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 1977d: 8b 04 85 98 c0 01 00 mov 0x1c098(,%eax,4),%eax - 19784: 89 82 98 00 00 00 mov %eax,0x98(%edx) - 1978a: 83 ec 0c sub $0xc,%esp - 1978d: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 19790: 8b 04 85 98 c0 01 00 mov 0x1c098(,%eax,4),%eax - 19797: ff 75 08 pushl 0x8(%ebp) - 1979a: 8b 40 08 mov 0x8(%eax),%eax - 1979d: ff d0 call *%eax - 1979f: 83 c4 10 add $0x10,%esp - 197a2: 85 c0 test %eax,%eax - 197a4: 75 07 jne 197ad <_my_device_add+0xa3> - 197a6: c7 45 f8 01 00 00 00 movl $0x1,0xfffffff8(%ebp) - 197ad: 8d 45 fc lea 0xfffffffc(%ebp),%eax - 197b0: ff 00 incl (%eax) - 197b2: eb a8 jmp 1975c <_my_device_add+0x52> - 197b4: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) - 197b8: 74 09 je 197c3 <_my_device_add+0xb9> - 197ba: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) - 197c1: eb 14 jmp 197d7 <_my_device_add+0xcd> - 197c3: 8b 45 08 mov 0x8(%ebp),%eax - 197c6: c7 80 98 00 00 00 00 movl $0x0,0x98(%eax) - 197cd: 00 00 00 - 197d0: c7 45 f4 ed ff ff ff movl $0xffffffed,0xfffffff4(%ebp) - 197d7: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 197da: c9 leave - 197db: c3 ret - -000197dc <_my_driver_register>: - 197dc: 55 push %ebp - 197dd: 89 e5 mov %esp,%ebp - 197df: 83 ec 04 sub $0x4,%esp - 197e2: 83 3d b8 c0 01 00 07 cmpl $0x7,0x1c0b8 - 197e9: 7f 20 jg 1980b <_my_driver_register+0x2f> - 197eb: a1 b8 c0 01 00 mov 0x1c0b8,%eax - 197f0: 89 c2 mov %eax,%edx - 197f2: 8b 45 08 mov 0x8(%ebp),%eax - 197f5: 89 04 95 98 c0 01 00 mov %eax,0x1c098(,%edx,4) - 197fc: ff 05 b8 c0 01 00 incl 0x1c0b8 - 19802: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) - 19809: eb 07 jmp 19812 <_my_driver_register+0x36> - 1980b: c7 45 fc ff ff ff ff movl $0xffffffff,0xfffffffc(%ebp) - 19812: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 19815: c9 leave - 19816: c3 ret - -00019817 <_my_device_unregister>: - 19817: 55 push %ebp - 19818: 89 e5 mov %esp,%ebp - 1981a: 83 ec 08 sub $0x8,%esp - 1981d: 8b 45 08 mov 0x8(%ebp),%eax - 19820: 83 b8 98 00 00 00 00 cmpl $0x0,0x98(%eax) - 19827: 74 26 je 1984f <_my_device_unregister+0x38> - 19829: 8b 45 08 mov 0x8(%ebp),%eax - 1982c: 8b 80 98 00 00 00 mov 0x98(%eax),%eax - 19832: 83 78 0c 00 cmpl $0x0,0xc(%eax) - 19836: 74 17 je 1984f <_my_device_unregister+0x38> - 19838: 83 ec 0c sub $0xc,%esp - 1983b: 8b 45 08 mov 0x8(%ebp),%eax - 1983e: 8b 80 98 00 00 00 mov 0x98(%eax),%eax - 19844: ff 75 08 pushl 0x8(%ebp) - 19847: 8b 40 0c mov 0xc(%eax),%eax - 1984a: ff d0 call *%eax - 1984c: 83 c4 10 add $0x10,%esp - 1984f: b8 00 00 00 00 mov $0x0,%eax - 19854: c9 leave - 19855: c3 ret - -00019856 <_my_get_device>: - 19856: 55 push %ebp - 19857: 89 e5 mov %esp,%ebp - 19859: b8 00 00 00 00 mov $0x0,%eax - 1985e: 5d pop %ebp - 1985f: c3 ret - -00019860 <_my_device_initialize>: - 19860: 55 push %ebp - 19861: 89 e5 mov %esp,%ebp - 19863: 5d pop %ebp - 19864: c3 ret - -00019865 <_my_wake_up>: - 19865: 55 push %ebp - 19866: 89 e5 mov %esp,%ebp - 19868: c7 05 c0 c1 01 00 01 movl $0x1,0x1c1c0 - 1986f: 00 00 00 - 19872: 5d pop %ebp - 19873: c3 ret - -00019874 <_my_schedule_timeout>: - 19874: 55 push %ebp - 19875: 89 e5 mov %esp,%ebp - 19877: 83 ec 08 sub $0x8,%esp - 1987a: c7 45 fc 01 00 00 00 movl $0x1,0xfffffffc(%ebp) - 19881: 83 45 08 0a addl $0xa,0x8(%ebp) - 19885: 83 7d 08 00 cmpl $0x0,0x8(%ebp) - 19889: 7e 3e jle 198c9 <_my_schedule_timeout+0x55> - 1988b: e8 c5 fd ff ff call 19655 <_do_all_timers> - 19890: 83 ec 0c sub $0xc,%esp - 19893: 6a ff push $0xffffffff - 19895: e8 0e fd ff ff call 195a8 <_handle_irqs> - 1989a: 83 c4 10 add $0x10,%esp - 1989d: 83 3d c0 c1 01 00 00 cmpl $0x0,0x1c1c0 - 198a4: 74 02 je 198a8 <_my_schedule_timeout+0x34> - 198a6: eb 21 jmp 198c9 <_my_schedule_timeout+0x55> - 198a8: 83 ec 0c sub $0xc,%esp - 198ab: ff 75 fc pushl 0xfffffffc(%ebp) - 198ae: e8 fd fb ff ff call 194b0 <_wait_ms> - 198b3: 83 c4 10 add $0x10,%esp - 198b6: ff 75 fc pushl 0xfffffffc(%ebp) - 198b9: e8 89 fd ff ff call 19647 <_inc_jiffies> - 198be: 83 c4 04 add $0x4,%esp - 198c1: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 198c4: 29 45 08 sub %eax,0x8(%ebp) - 198c7: eb bc jmp 19885 <_my_schedule_timeout+0x11> - 198c9: c7 05 c0 c1 01 00 00 movl $0x0,0x1c1c0 - 198d0: 00 00 00 - 198d3: 8b 45 08 mov 0x8(%ebp),%eax - 198d6: c9 leave - 198d7: c3 ret - -000198d8 <_my_wait_for_completion>: - 198d8: 55 push %ebp - 198d9: 89 e5 mov %esp,%ebp - 198db: 83 ec 08 sub $0x8,%esp - 198de: c7 45 fc 64 00 00 00 movl $0x64,0xfffffffc(%ebp) - 198e5: 8b 45 08 mov 0x8(%ebp),%eax - 198e8: 83 38 00 cmpl $0x0,(%eax) - 198eb: 75 2c jne 19919 <_my_wait_for_completion+0x41> - 198ed: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) - 198f1: 7e 26 jle 19919 <_my_wait_for_completion+0x41> - 198f3: e8 5d fd ff ff call 19655 <_do_all_timers> - 198f8: 83 ec 0c sub $0xc,%esp - 198fb: 6a ff push $0xffffffff - 198fd: e8 a6 fc ff ff call 195a8 <_handle_irqs> - 19902: 83 c4 10 add $0x10,%esp - 19905: 83 ec 0c sub $0xc,%esp - 19908: 6a 0a push $0xa - 1990a: e8 a1 fb ff ff call 194b0 <_wait_ms> - 1990f: 83 c4 10 add $0x10,%esp - 19912: 8d 45 fc lea 0xfffffffc(%ebp),%eax - 19915: ff 08 decl (%eax) - 19917: eb cc jmp 198e5 <_my_wait_for_completion+0xd> - 19919: c9 leave - 1991a: c3 ret - -0001991b <_my_pci_module_init>: - 1991b: 55 push %ebp - 1991c: 89 e5 mov %esp,%ebp - 1991e: 83 ec 18 sub $0x18,%esp - 19921: a1 88 c0 01 00 mov 0x1c088,%eax - 19926: 89 45 fc mov %eax,0xfffffffc(%ebp) - 19929: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) - 19930: 83 3d 88 c0 01 00 00 cmpl $0x0,0x1c088 - 19937: 75 33 jne 1996c <_my_pci_module_init+0x51> - 19939: 83 ec 04 sub $0x4,%esp - 1993c: 68 ef 00 00 00 push $0xef - 19941: 68 78 ba 01 00 push $0x1ba78 - 19946: 68 8e ba 01 00 push $0x1ba8e - 1994b: e8 10 01 00 00 call 19a60 <_DbgPrint> - 19950: 83 c4 10 add $0x10,%esp - 19953: 83 ec 0c sub $0xc,%esp - 19956: 68 97 ba 01 00 push $0x1ba97 - 1995b: e8 00 01 00 00 call 19a60 <_DbgPrint> - 19960: 83 c4 10 add $0x10,%esp - 19963: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) - 1996a: eb 1b jmp 19987 <_my_pci_module_init+0x6c> - 1996c: 83 ec 08 sub $0x8,%esp - 1996f: 8b 45 08 mov 0x8(%ebp),%eax - 19972: ff 75 f8 pushl 0xfffffff8(%ebp) - 19975: ff 75 fc pushl 0xfffffffc(%ebp) - 19978: 8b 40 10 mov 0x10(%eax),%eax - 1997b: ff d0 call *%eax - 1997d: 83 c4 10 add $0x10,%esp - 19980: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) - 19987: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 1998a: c9 leave - 1998b: c3 ret - -0001998c <_my_pci_find_slot>: - 1998c: 55 push %ebp - 1998d: 89 e5 mov %esp,%ebp - 1998f: b8 00 00 00 00 mov $0x0,%eax - 19994: 5d pop %ebp - 19995: c3 ret - -00019996 <_my_request_irq>: - 19996: 55 push %ebp - 19997: 89 e5 mov %esp,%ebp - 19999: 83 ec 04 sub $0x4,%esp - 1999c: 83 3d 40 c1 01 00 07 cmpl $0x7,0x1c140 - 199a3: 7f 63 jg 19a08 <_my_request_irq+0x72> - 199a5: 8b 15 40 c1 01 00 mov 0x1c140,%edx - 199ab: 89 d0 mov %edx,%eax - 199ad: 01 c0 add %eax,%eax - 199af: 01 d0 add %edx,%eax - 199b1: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx - 199b8: 8b 45 0c mov 0xc(%ebp),%eax - 199bb: 89 82 d0 c1 01 00 mov %eax,0x1c1d0(%edx) - 199c1: 8b 15 40 c1 01 00 mov 0x1c140,%edx - 199c7: 89 d0 mov %edx,%eax - 199c9: 01 c0 add %eax,%eax - 199cb: 01 d0 add %edx,%eax - 199cd: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx - 199d4: 8b 45 08 mov 0x8(%ebp),%eax - 199d7: 89 82 d4 c1 01 00 mov %eax,0x1c1d4(%edx) - 199dd: 8b 15 40 c1 01 00 mov 0x1c140,%edx - 199e3: 89 d0 mov %edx,%eax - 199e5: 01 c0 add %eax,%eax - 199e7: 01 d0 add %edx,%eax - 199e9: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx - 199f0: 8b 45 18 mov 0x18(%ebp),%eax - 199f3: 89 82 d8 c1 01 00 mov %eax,0x1c1d8(%edx) - 199f9: ff 05 40 c1 01 00 incl 0x1c140 - 199ff: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) - 19a06: eb 07 jmp 19a0f <_my_request_irq+0x79> - 19a08: c7 45 fc 01 00 00 00 movl $0x1,0xfffffffc(%ebp) - 19a0f: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 19a12: c9 leave - 19a13: c3 ret - -00019a14 <_my_free_irq>: - 19a14: 55 push %ebp - 19a15: 89 e5 mov %esp,%ebp - 19a17: b8 00 00 00 00 mov $0x0,%eax - 19a1c: 5d pop %ebp - 19a1d: c3 ret - 19a1e: 90 nop - 19a1f: 90 nop - -00019a20 <_DriverEntry@8>: - 19a20: 55 push %ebp - 19a21: 89 e5 mov %esp,%ebp - 19a23: b8 00 00 00 00 mov $0x0,%eax - 19a28: 5d pop %ebp - 19a29: c2 08 00 ret $0x8 - 19a2c: 90 nop - 19a2d: 90 nop - 19a2e: 90 nop - 19a2f: 90 nop - -00019a30 <_ExAllocatePool@8>: - 19a30: ff 25 64 e0 01 00 jmp *0x1e064 - 19a36: 90 nop - 19a37: 90 nop - ... - -00019a40 <_ExFreePool@4>: - 19a40: ff 25 68 e0 01 00 jmp *0x1e068 - 19a46: 90 nop - 19a47: 90 nop - ... - -00019a50 <_memset>: - 19a50: ff 25 7c e0 01 00 jmp *0x1e07c - 19a56: 90 nop - 19a57: 90 nop - ... - -00019a60 <_DbgPrint>: - 19a60: ff 25 60 e0 01 00 jmp *0x1e060 - 19a66: 90 nop - 19a67: 90 nop - ... - -00019a70 <_memcpy>: - 19a70: ff 25 78 e0 01 00 jmp *0x1e078 - 19a76: 90 nop - 19a77: 90 nop - ... - -00019a80 <_strlen>: - 19a80: ff 25 88 e0 01 00 jmp *0x1e088 - 19a86: 90 nop - 19a87: 90 nop - ... - -00019a90 <_sprintf>: - 19a90: ff 25 80 e0 01 00 jmp *0x1e080 - 19a96: 90 nop - 19a97: 90 nop - ... - -00019aa0 <_strcpy>: - 19aa0: ff 25 84 e0 01 00 jmp *0x1e084 - 19aa6: 90 nop - 19aa7: 90 nop - ... - -00019ab0 <_RtlCompareMemory@12>: - 19ab0: ff 25 70 e0 01 00 jmp *0x1e070 - 19ab6: 90 nop - 19ab7: 90 nop - ... - -00019ac0 <__snprintf>: - 19ac0: ff 25 74 e0 01 00 jmp *0x1e074 - 19ac6: 90 nop - 19ac7: 90 nop - ... - -00019ad0 <_KeDelayExecutionThread@12>: - 19ad0: ff 25 6c e0 01 00 jmp *0x1e06c - 19ad6: 90 nop - 19ad7: 90 nop - ... - -00019ae0 <__CTOR_LIST__>: - 19ae0: ff (bad) - 19ae1: ff (bad) - 19ae2: ff (bad) - 19ae3: ff 00 incl (%eax) - 19ae5: 00 00 add %al,(%eax) - ... - -00019ae8 <__DTOR_LIST__>: - 19ae8: ff (bad) - 19ae9: ff (bad) - 19aea: ff (bad) - 19aeb: ff 00 incl (%eax) - 19aed: 00 00 add %al,(%eax) - ... - -00019af0 : - ... diff --git a/reactos/drivers/usb/cromwell/core/usbcore.nostrip.sys b/reactos/drivers/usb/cromwell/core/usbcore.nostrip.sys deleted file mode 100644 index 23844dbb11d3636f4bd483d8c15784760eb6d11c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 81469 zcmeFa4R~BtwLg3&nY7a~kQ4$GtTKfbS}Y}P(>6`|F-<#Cw1rq2s6b8Ad~_1hBqlQ@ z722kq7CRk_6+yU)UcM9*y;kIEMYuPuKoPm#0##9ZHCKD(gozq8O1wt$|NYk9`+TG+ zc=`L@_kG?c^JFIHtiATyYp=cb+H0@9&pxZJ-*4qwmKDTzXvne-;y*u8`F-o3P9&dk z!4qd#kB|Ge$p-@~|84S`ctd-nwXJ1iTlJ<$O?7i~OCqwNF4C54jx;n!mS25MWK&CR z-OSTZA3sHtu83LI%0S3^@!Wx>mKCs8=U7&^HRi(80y!ntejxSXTVPp{>_efSSN z!uTcMxRd|*2bfCx%~t{fM^1%HWahy~{vEZfhfo#@vl1lGhyN7BNuPjqK2hQ|C_Is2Hxh|Qe9tFJytekX z8o)%xeYhZAH@==vRPgGWT7alzj!F}c_?}PnBu+euqnD!+7?r@N1V$w=DuGc6j7nfs z0;3WbmB6S3MkO$!1S-@2mFf*;VxdfQO*%H1i47i!207PE^@fL%gZ9!rxO}?cd*2nr ziAQ3CBm?|?l>_ODHOSj&4JAYNbsr&KC>`rhZSA)b=SlXE{c9D#xCt3*oH3etyBR;pvtzQp2GZ?G{Iw+;lX_;~!- z_opS>P!i-rL#>nKcVfJdX}eV#K$++yFqMsHhMvXj7YrSV_1`fxG?X3ZV5GJdSc%gz zv4TuxD6_gKU7#~e@YWy`>oby&nm1bZ!!0C;iVq6A{zBm)pxc8n68DVWT~!s+rt zxhP1NPn3(oba{zfOiY(gk&8*`@)>dwNtdsciz(^yHS5@n*ItwAjYvfcGpi-ZdvfIe z8+*zFxB#>D>2iYVGck}U4+^jkS7ShMC^-!knaVg5svQ|h_9~&+Uy{m4(lJ}4-fMqB zR00iar(-8Fu@n3125$JUa1S!6t%cSWFf#Bu1^pq@67Oyv-Vy`CX$cj_G={$=E^t~x znn@bstiPIuKodx7i}*$qx{@`7u4E0ND_KM6O4g~~iD<7(Wx<}<(4NXS!E+vq> zouJw{Ms>wYrBb2O0qcaALv~1{TcrEub`;a!oyf_49Id75hhAbG>JDWp!-sy6KklfJ zv*Nry9eZ<65U4kviN2WEii%e> zT8#lR{vD$hv`ZdT5l>?d#0NE2r8QdM{y^tA2n5w91u;wS8D8$-AQ@5Rq905`ivXVn zEz`LNW$%p!g+f_uApiC&r4>S%dzg}0HIRPpP_|fL@cqUli#!I*ux-*Dd2j{_U@_^vV-yWXNHzoLuUBcP7@oH<}}? zq`LFbbOOlLfZW|($(dBkRfN}P$TaGmUcR?uL}*EN6Yx4aa;%OyIz#%7Xigk`cUdW^ADoAt(UvsIC|0YyQig> ze`DG^&RvAuMMq*b=%EhwzPkP!K3wHWVWH^VlT3_8WTfgAGs%&{{?T%=47xT+j9JHM z@OpM5bc>p$Izj;fl6FrkfE>a)PR~?A4-3l5L+v?PC(j3&tnG@DXIROTT3cD5RCZtC zGo+OX>|LItG_3-nK1~Vxn8?;6?8pABg?%Em^@IrfL^^h?=QZgnBX$Kx4xS!h=imNm zmbt1oQ)%l?p!-*5X&8*;?1}w6|6gK1f8*#O`+{`rmDJX5D{(HQq)pDxY2u)uLr2Am z{=74iZ&K2+qnQ}H6fRO*U$GMTnaZQNm7#Ry3#r%(9of^7nj6E=##@Y^FC1Y|+}anj zp|aOP)Jl{b#XM3n9s3lu>HZ(pW?zg9Q@xU}P$Mf}`8HYDyXxmB>7ZMy=Q1&xopkIu zQ>*8sR!^s5PfM+ylUnh%GOG=@5O zRSFJc>Q(AK*KOR}xdRHKP3+*d6`572^q^n=cI*NQnm$jXg_Gxd(bxcjLceb8zS!W9 zmHh&}&g2;J8^hv(o~f>n#CoOE{9gElCs`OwETMHsEC5sN=WyH3*giwL-JqyapQsW5 z7<9s7SkT+FdaN%mygam5_4#(>pmr(P&JSUKvES6$ia~*qlhGDFM;I z%hh6n0*h!KMpjsiXUS$L&Q&wGeTCa_>$mrSI!gUdT)W;e`?86;^1c6y0_LC{fno$B#F9(6`c|G3%A_!_~^ny6G>3hf%=37%un43R2U+!5|BN20V$TT(hHh7b=$8 z8nTilq7|5=6fh$ylIvb#m^M&_a3r>in%?s@l{=86jYe@pt)YFfJr(vGsYgL}HAv^U zi7O@X9Gy59iMh#(QFX~#5&z-=%=RAT&jI`h?oV%_Kq6U80LZD8jb_%tecppi74}yp zu^`X|UD}firla6G6Dv&FInb2?Kr4jEGvbhhai5Ou%HVIEu70X_3X0A|OV9#NC&K*{ zuLn0^bcwz=T4rxFAnG{oD4gX#0RWFI2bXZpcp1dy@73iPT=vl|IlSW+;(f)!Wfe2F z<@H<%bwa^MqLWxB__9D!K3#bc-0VM@4C%__JGLGVK;!dwU4T6LW_x*R>+!t&U15ND zwf#K&2J&~&!r>}6f7kDE)$@6EJ1&3MFV)p)`MZ9?gx&Z7sWF{cp}kpOY=0Lna*>d~ z>z`G!#pJS{wd!s>?(%mPyEogH{CC=?RAOCoV*+%{@szFakC}6su$V5Yj>^$vF zq75scIobEnQs}gxq~-7WA@U)81JdD~pGhh&;KzfhshkC@eG2P5Vtr9%On5+_V#ak& ztHCL;WiZiI5@TiGE0d3c^s=HX+7zO&vIuYRzZOaMYS55=6UtO1j0%t#=hNC_iz%8F zR13%KWy(u9L`BleCS@@^P?5T6SYu%XPppIj$*9C>d;%^#lzK*4?8H`tKzPY{Hnr|V zy1Yo{rzd23ZrktgV1Gk61e0hzU0+v7P*6M)({uDpH(HqK#MTS6p9F%o1XHp8v6yHc z8pw@GduVr*X$KA2);@YWo5X*H*>6bleab*-te>AjWA3YqfQeEez%Ww2#nW(d{KB06ujP?K^5VD%jqbk~9V(dR_`$ZgW7Vchu2y7?e zB4Tt2rGt0z-nbV(7TbvOQin-0)fI-%w_I)#pew#4A0IMg#ypCa17RWJ?N* z>nMcYqTPXwn@Rifchm2~O@;z|lGjm8*avoZ*ppD!lBS1i|kB)o}A=4F7lZF zrpJQ78=Ofvuylz`U<61Wt)jbU6j2G1-AttB?HthwUXi@xii(=85G7lYIkP-n;6!Dp zcPn(VwE~Jrg{NiA{k7RnX5nI@#C={{lZq)&h|rS;!C9JExh8B%Rr2^aJ05{hNlFp*Q~ zrP+5&Ee7o+C|x|CK}aE85s|hWU?+A-(M`$8ntHz~I#%FGhtUc&M&kwO3ijjRR~nk- zE!jQ^d`JSLuhN~g#tve_M=9Q{G?r-AeK0!|-?R$*d__i!daSzBMVdB(K0xD!inKmT z%uff=G1~?u&MDbD3PfhW6@Zwl93djMIF$dWx)bACaA+V;;zJafW6}yz-Ix}usCzj( z5<)`O%k~>b^PlWW<{gZHKiCoZ|K3iFo@a;V}sL=ns7iY zJpCw!ph5dwRafy~2H@GkiB$nEQMBt2)hU!o7h}XgwX)DsxL6mY4;|{sfSJ|!miI3h;Gjx9>rwXGl{)PFvL1j!;Voxfj>I7I%zCezB zd-^|q!CNr#Yt6)~BA@~cw6{aHe=|EiPFw~l2JoA+Z_nrdkb8>KWpWOWW-xDML|mXO zLjQw14p+mePgi0#fK{-8o@LA!Kx`uP!Om<_Qt;(^)~dbVboC{h>wFbf+ZZJF%T4}j)AcOUgSij zg;P6GSr`%ED<=U?)SX>2K@-#E1gDD87bI?UwlaB#Y{sKA%XfCbOb&eF8BM1e(sGd1pj_AhW9bAKuuq9JRm==K3M$%iLQEl!xSqRmcxe47M0?YzuDFbK#S)NH zF6>}>Co7Cf5D&95<5;oA9mQ5+DytjSE~%?+AS9zmYoWanzJ!@`Fu1`fM1?(x#mdwM zZa=g_2C)JAB1qo2Z$NcMp*tkDr^aWg2B~Az(d=-ZF>Lx^AY@;hgaL{EAykSc>6IqA z*;_O3BqITD!qYT}DhcC5sLiZ7!Z&>dcphD$3X~%ix*Wt%Azjlfmq$-MV*=KlXlgbn z7v9midwY7MA!L|-sY0ZXMy2pqIe@B_l}|}dm2QcOMpDlO)8!EvGcjxq*gyM&cH{@M zTczTWLw1guFM&Z+t&_wL?!vE?SS%RMEFve#)kl(EUBbxBP=2~%At0%a8CJqcnqrcs ziGv505^B8W)GInoPrXD%6L2r38ZTZg)zEiOtC@+aEk<8yI?zCegMUD;^Cy24uh*ku zp58JjZGcH4%Ej*_Dbb4>U0W6lCox4cj>J4Alj|u>VpgdZ9}y(LD(&$hMGJBlPj8SdvFY zA8jVMQ&?#U#IMD!L<_Z4`*HHDbzR-&b%Bn!k;A$MoG5HlK_t9S`ob|G z^KL~3D{BfU4C%m<>_GvS$NFfV{s6L40(2}_=@@GD3ZM$SRt!GMggoKBVg|J~Z?=Rk z_QhU-CxGKV6d?hzZ13AYcAOjhqFRr!}+@&0V4XGI0~FnsP*Tv zn2pU4+rZcyfXp&spcL^JlH8I?uD{rOHw z(v-by$~9`{p{afA146B*2WlY5Va0aOa-#|fj-CnV0%j4a#bHwVrO}I|_j!VEGCE6# z)1x!kRAcj9QteZX&1iHPo3kJBv>Jv@$4e?w0~4$OExnmMJ zy(lb591$g8`$&}s?H|-=0s2N#7G^=~jhE)mo)tQLe9v)R(74JsR6#Uxzy?#|cF2|{aR9RKldh$#E2!cksH6;I*x8L*VD_9qyE-{l z++on3#Tv?{GU_qLM2|_O%R)n_$l`aR(9{@MG8G#L5y11vz*JH6xGakeCRQSs__0c< zg==1t4aCd_L|xFMuoYmEC}5vfK#q1GHIV&xmP?}9FHy)*m?h30B_8Y|qrBE5*4p`q zq-vAhT49fsI+<9?I4( z*|!k$>4M!|Tb#^4K`LwAflYr7@M!@;ULhT=r<`7R_O}6`OamcX3yT64ho;rDiDpK~n)I zejSxM*HlUkj^jA{m+gzX&8I8!(g`9%2o|WlgyOuX(5xQ%FI1@t8Tw_U|1AZC(6|OI zWRzAU;OW2w^x02Q{!bV5Jj$4z(@LLHP%YFpX(Py@my)|lr*YFFB7O_i4(sMmh_N?`~yywq0PN+8}GrofXJ zGNyyYcdbos4vaROTdT&{Y1Xqv$ZhN?(}K~3SEYXKZ9<4Az*;S9-hSB{_{nXw;1 zUq)_ERl-sgUCAvb4Eq2JWGU2TxCx#KZe=*V{{)f`;;Yt2{?;oQ@57m0JCB{56Ec)B zL)-{;<GtS%hM!_ zl7_frj&T>FgZA@R2!@lJJSn^N8>;EkC>+|zDe6#bhke_P1{=hT*-I2l>aF&1$stQ{ zA^Tlaou@-k3~KVZ`p&i$)$DBMIlyLTvMvi#AP?}D3bn%isNn=HJZOL3+rp+!N?%R5 zl#T&gP>%>Eq;IyY>g|{qley(~I{Nl~thL^ndJe9^xVsH>)61-h+K!1<9B~^eq}f=@ z{UzR=GZC{1@Vlz^?k2$VJtS2FtK9Gb%mS*}GkTFBvTZn#AHL-B^|nNERXZ#gPGtW{ zMAXJr%<~`}$VWt@RpKwIAzaa{K6UN_r!FA!Amyuxd~-OF(|tr#gg~Zv^akL&a`?I@ zf7e&pF1Xr`4MKf)=I{C(?z08Belvg9Csmr2m`n|dPE2)79Jj3o*IdL*UXKfQvDK5( z6@|Dy5}gQq!c?DjV+GO z5wr)QqBs)6z`RX`-KAk*K>zO+TBvm=JD<~_jc{TdS09{4E9@7fiGvtxKgxPXqsl#_ z9Mw4VZ3>GK9gHNIPTDq^|DCw3OD=njD<3kd*oXZgS}$p0FI4$qQFY0h?p z23+S7(d7bcD0#C!jfj@%B`8}F$Nm7lJ3G!n7Q6Yy9^4_55KkZM`S)SEj)|fhbYgQ# zjs9m#AC#YH7#Is-^)X-{mR5yO`{5u%f_XhJgEX!oJ@B0B2uc`;Gg3GR4DtLBt|1xe_DCCKD`tY=}%YMpz6p~8UXp!a&b;#?2c6@c&Y$4 zU1Nl*Pgh`|a_6MbVUn%StPbyZ-s&70B7)NvkPH+djKE&M3En~O0xYcX1wmvK;>^Se z>@-N|$1KW9S9DZ_BGD@1svIOS!|Va)y4@r?nBZU_it-2T4YDCu9vrZ;FA5tfhuSt7 z=&G>)T|#IDuEIc8Mk_I>4VWU)L~Qa_PI~OC6JYA?Tcj)I*jQ{ao(XaF}Nnqp!yKRoIg*$X4 z)-78O_rQ}yKI#!xbM22-GD9f6j9jET3RH#;PloH<45uT*l_tXs$uL7@xW|*>Vq~Cj zv2+6|%phA+B-UDhFb+2ybFOmypOK^IFXG!$(AZ61u$jF6yP_oXpyTv(X$t!7D@l|S zkv^@aZfmA@a*GTK0~rVrd##5o%LFU2+X`y$1e5yJewwn_EBUu`NQdu{i(Sw*OwR#D zAsu@p6MF^s52dy~WO2vML)dZi5O&;TRz30rvRHf9gvO>T?^9U!W-9MZSKgD_dXM1V z1KfLni68%{j`+U-aVTki1eyEQ(Ny0B=BI$ zojHlqu~&<+D(p}x#v%-agf5Mx3r5LGltu8#E!DkV<}GYN?5D*3zTcpK;Hek03B+x| z*Vuv!MD$_Pv!pL?lRcwi6Cp<%cEJRKl2{u;@5H^kHng8>Lp~tZhW2M-`&BF`cQb6) z3ADb^S`5y1Csw9KYef#Qb)x2j9woe=8DijTjN00YI>hZIe1Hsg3Tg>g(S}~hbXAg9eX^3KfPg6x!39PLb<>!X`){x@VYL;g%#mmmsx~CXly#FwbWqh)*F=F~Uxa3~9;$?Qi`CRNx!HLF5cK$@h08r|Gc&(&ClE#)kRQvYBX zi#HP|0G^yL03_pSOG;KUVW|PTuT-WP_5;!oywf|)1qbVP4o-o+&4W|m(7`g@Jdu|2 zKRBN4c)d%Nf*B;}K${wKSKBXMEMk!&Ld-709JDV{WM$kybEFPqvgPk2?ti;(U8y5jal1@O^hV(X30D}Pp zBYKc7k56&9lINFlvOmP-UK&j@%q?KKKj z2*nCo0bGmJVKj9g98tEU=Z>p}7`m{~W@2pt>9-Ua|SR68bq(9buic# zdPEHCVEhOOEWGF?C|5#l7UTjkb_JR>%mM5d+m2PY{v(hJdUh2qxyW{h*mLw09hSsq zqOw@;wkXpO9C&gkf>>Cmh2T(DFM{--yzU6JlYKPAo)3mS<>^5l#9g$y>Co zbnNV(N)>GG=`sD7wHVPkaoh`9ePgxh56wcag(?`H7$=8r4`9OrcHrlcg9>}*d7|O+ z6k7I4ikNODqei%9*ZijHiQIZhH5tm@sQbW!m{G!Hs4$C4T1p;iZ4oaj6x*VSTwhGw zkQdi9TfRI-0D1OP%#ecD8PgL4wP5&ur=o~9vlUp!xzvA%e%F51hbu$y0#B;t3OMQD zm7zO4ZI^w@SB5+pg1FIg@%w}5lQIc`4S)j`rY{+?|3R%W`FuX4qU$+6AJk0Uj^y*n zvp<8Z;f}3?e*mZXpRn*NqAavmyieHU!_NC+e?o!qk3#l`AZ@YO%FjecWh`r`=LevI zsf*g$tOA=%139bbG5kP=;x8#5#mRQJH`^gw?eR|5IFw$rRfZ2bkVE!(O#^)c^Hz@7 z+3B9-alT|Sz{NVE!pnn))`wp!I~fbuXKjO47e0quY=FT=xm0&V-iy+)D zQbLws{wGv4DcA^&((Q2jZ$&2F2gYsn>?ArbP;$eLsnk;=+ zW>DgV=ou6;4Zs9s!Gy3XPfqoG1TxpU@6k>cf_?hBkjH+bn+pBSJcm0?7vm38@7Ox< z32FZOAPY2q<9YV`m+RL5JzBrdwEhjoI}_!ne{D@4-53lZJj!K~X(t$Mb-Fo<=
?F-=t@;|}HzCaZkG<4ueB(lU(cpP+Tv6_Ijbj;@~frO`|WxCj( z-t|ct1Texx3)x>}D8%B4aQhpz5(>Ul1i#;&If2x|Jq1#d%%ILWTR^n&e1_qC8FR4F z0*~2GGS_(0K9WVt^wXbATp+k`Eb&}2ngj!CvB3>TfeAdXHv%W4D8a>UQ4+W(sjgr} zybOae^#)6A*t+mp3F1cJ+VdF_bcpy;U-~U7$jc}Li`4Wpo$D!#&ihdD^iEzY>E(3+ zfIiS~pQCKHEZZyfuzOKHs!HLN1V)4;2gAdQN`pO^Hl$6;UY zh1mDSjt`+J#p+1V%?^nsB8COW;G@8}pP@Kd7mChCw7U=8!d2{7FljVSn{YW`UqQWN zj0@|Ig?Nrqzj@h2E01tAg+X`s)>naGQcI??@N=(@;2E_~qady)Q=;|B@`|ams zfdqq|&acsuOC5-^E$}_i*e9HhjM(U@itbWVD1%_8`3W&k*jl7ZzDkwsqN!~qiHpb} zrokHR5{0H^{&j6tbm3;$Q?v`6OuvV171PJ3^7pa#d#B2M_J1fcSd-1`IRwKDAI>9I z1ZHI#)o(W`Iwsk%MEhvWF@fYpNc;N5q8`kILmc|;`6`pA4 z0^J{MIO{-@4?bAb#VFGN31;!Qq9(OQkC_r-0Kq9*&oU5eDog33<@JeJ`?V;E)1JTlL!! zAw>$%kD;Dhq!jVpt`TDmpF|dNx4?uN3Qzec{7fVS^NOvm$9qZ@fyVLnyoE+`jb}nf z&`NUN$M>IL`@_~Mvg&-Gel2H1g-XVjWkyI?ofu-Dkdk24@^{$~r>?<=Rrzukvhyx7 zrPBXQeMdA=6*l4K*{Fjw*ptkT=VYjpMfUA1O}1zrktdZQ44I}j3l}1c7pDk{;X0~I zyZb_2+DK%v*J3zXK&+l~@k=fc1G$4w!Ke4reb*GPR2+i^!Ogn$+#Dr21Q=9V%(FMD z;=nL#A$whyr>=5VgEYvOK*7;J9bIt`C+W+-eFqT8jy?dT@2w6%Igwd)0v2a@1fUyj zg{YC4utTiQ!6w4m@1FFrh6<3i>;zHto;oNV>I*i&$8k641Z4>2>t{AlYb~H%%F3gU zi=WEpq_I9J21BNq?v*@HgHEDGJ#JTFH9PM?Iq+vV_S*oW*UH`~4vmaVgE{oV-t3hk z=mBhnWx)J&Oo5>y+7FVmDUbo$iA1d9>Lqd&jzDw^B@Lv@IedZ?YOAfwL@*$Qj?4)v z#8`JCf(y*bxK}2DIVj}7TPaB`#v8;5;1OUtYD-{dz@XHAxGh^$bO_4ANy7j;dA33s zU2J_ymy;#zC>nr$m8(eq_4;bct{dFVLWo)1AptIkKrf%$r%8ih_YwsxWl96se?S>> z1^ehemU)uu4Qy*+d%V@TJLZs(W#LRP#|;aFld=Kwt#Z=a=7~N1R5G4UbBidMnV`dX zs-VQR;L)A9pTuK-{_S-Tou~ikLihS^^ z8LYv*Rb{>GjzFIc0ookbrYdK*AH$jI_+ODL%=mhC;0mLsa0d_l=>qRTVCV%G%KqV; zET#vv3g}v*`REg2--_HwflSyY$qn_Fp*_p3-t1@jcbNx9lqumh2OeB^A*KN6Zw$oX zIEV0&C_Hv9zq7D=phi$0-NUeYuC}wu@ZOV;vG46eq_jNR+eXI;*Qan|QxaW1+}SbS zk`g;RPRDbefXK>MUXPk%g|RZ{@z~IDp(yGUg0h_*?BIDlx3IlHQ)3zj*u@Rjm+j;{ z54czRaUGx4MIHm>TYK2=!C8bjLxCQQa`f*zN}o5Yg#_MUjz1#;p#FNjY3M>*oU# z=&j%YOYFT_dc0CX_Fl*8n8BxT$JVgWbb?18WLI)YqZhCmrlbKB4DvEmnqhDZCjpM* zDPbr`T*4_jmaIxU$ZjM&rMWJd8f!jHN?3Ow-5>NRE8ampbeUD&r zzX+B%+r`f+f?^^U{$ zA~VVIzpU*H1IYr9c_br(D7u_=i5w1$gRv!}KA?I8G*56&H0DM|o9uk4LrB-**<$TT zhy?iDn9gn{;0#TfVM-0E&Xds6Tx=GNOS5I3#=@aAn!8j-#7fL?Zn;Frc({t3`)i>0 zK8qN!mF-+%O^IBEfb30&lxVr!J!t58w={D|I>ekEIb;7wGQPt>d^$rJVFvj`wK&?@_n+BRz2 zJ5>v*1)~?hWa=P&3@cIP*efug<~EMQvyD%w8Aq{qBxl69d$tG}AwKx4@5YuhD1$2M z5n43{7(oh=s7c_=jeVMWyGX2K)pQu#OTtY;$H=-Ey_zX$!n982pDcN2Gl zv;&YsAMR9zDeJm@+l9!{7#IPs$-#5-ixv!S+m3@`2BUPFX@%G@9Aj__a5**&4sPF$ zKo#n&nP8c;3i*nhbj87Rj@d*ip4#Z)22d#3o#sE>078Tg@$njU7)~_-9fi5_93n1) zGFxK+iBGJks2k&4vdKexcidi;7l-gWIsG5|2yI`H8Cqe3Ft3w?>CmKlgi;4QPean) z&TVL2{k$|39DwaE08WN6;$rhu$Jb_DL(p09*B4)@mbJBRPgc6kA)n_uVaWg5<?yhaHJQH3rX4BC&)q%hO~3JW|%kC{jEPGHoLIXE}Qz-?I%v9JX@*W!X+o7_ZkV`l1| zO}IH+qf=<4Tf1bwPJtv;gbtZH53WFxmBiUVa6f|;_@^uu7RKYB(``qT3cF62!}1qd z$aL;Pw)D>BNMas7?!!%1fwl;Kb2d-FFZX1e2|E!5X7+4cgm?j`?u0}>f0~P|B!*pH zCFY_7Xu#qkAC{b+!<8O_u@O12y-4H~vVUxXJTf+QemP||jDe}AVBiT(7uoG6=HSe13JSfDre1YREi*r?LksB3 z!WDus4(A2r>? zNOTKMLH7$n7u_{vHmQPFHcA&-x56%)=H-}=lw)#qqNfG9v|>pE_#FsDany#uw+_G< zC!&{|ToAS!w#~^#(8MsJ=MvZ)(|G`V@q-+A6cQJz8w1tpL-ztIwXjVLi{0>~-uR&O z#@@X9fL>w$_)^w1g5jeRVaddFZMAyo+W@#XitXh@6#J*-Ert?~GUWAEC57T&Q6-6+ z)S}9fTteLbvDz^vYwH1rrJB1baKVs?W2=V1lA&w`o&*xaF?0G2z%I>81_rcDwD9Z7i@^@(ixs33`%CN;fRnZIFf*Y{UsUZvgcOR5J{Mi=h0YVIpRc5T*FGnC1rhjob1;K z*)i4cvzVd>8^>y3k=Z`#nN9`@K+>6A7EJfu_AwP4VH=`N_IOV1<~D~(PG=qNekSZI z?ygpB1{3d77deSV>LQRR#x?<-PV1H#emfSjdt~AgR_9j9Qe%=zaU>chQ*u?Ht|*i2 zb?V^*cz$qM2c<#r^Z~RJ-2ow9S}q+2Rzl3er^F*(@cQU0^O4Q5Q$-7;`}U^GAp{cU zVwrpFY_SvL2DPBWNXWSg6DXz_!vp594_v5-%99Z&C{q!3w%+30c6+tvG?$EGJ^{({ z@g<<>CCDpFtUf@QnpWjkyV9IKnIs@EslDPGD?yXe|&& ziH^kZ;$Oaq?7=|Eu@r9UVea!xuWKxkm`e&b)dqk2@!ZAeScuX`( z3OQN1$G96yicZ_%O1B-ZBnCm^c!(T&tCYFh?og#5o1>_rH14fU9dd6)jUkcajz8+? zEn89Rt&;8~;<=qbuL>rhx4g)s-tt29mKUP8SjY$1&w_g^EV#E|fqHu!K>($qh=nQtoejW zflsweqNLX&IvzYlR>%wdhV8qB0KAO>pcCjWS`Td7qPPdU`jlpE^i%F2$itPl!tn_gO3hU&Pak%3?{NvKQepC^M$eLhUxC;{crQlm z6{-Nwx5Y)SmA^a9c#a5;k5N#78T`2hV2Z1vA^V3BiU{q9xi((|0(VYLv?1&Wg?(JQ z@_TbAY$!MT#kVPpy(@yJ2!c`ai-oM$dO4)J(Qe@2Z=nN;i&-mhnDi@g$hqyK{dcV+ zuB1yk4Hxn>T>kCXQFW+#-Ol*X7ucK-P%oOnY0tjx2x0W1+ijL3$doKDklek}-=a)r z51g+qauSR_O2@-WqYN0m4wKUN-COXSy$w3$^faFDVkOq2BI5q!WYOs;as&Y&(k#x# zrJZvhM?>4Y6;-^Y&@$5Lu$8S_q*q}7UNSCsU(QkRM(Otw$j%<$YPe+^>Zv}G_j}&Y^$KvqSXwjDoF}#SWb4U6Q}kVq~2{Gz_EWY7Q+_R zmxfcf=3qsc0jN_T3?*{H_Gc$)nes7;FPPH9cFMppjP#Vj8c5O!44Mrlh0%u}sW}=X zNW*!RN#eE#Ip3DG!9B)WuT4T?=fNFF4AJOxOY8<~($o|M7r#Qm<+(gHpCF4bL9EK&4LDIlrKKDF~fUD=_LNidV0n=~E1Nm>|*ib0sX5*K;Ovpf`v_$4Ch$yry34OCPF`IbR8kaZp=0m$#bryo7q7 z$;D)#gZPR}d5g5Rz-b4bZC41XaL?V;ad~q^`?;D0jWJVUWIMzv^_xvAcPR1M>7d$G zgieNz+V3>1dL0Yi@nGzdgys+r%a_VJk?hGTZt$du8}!;w$@4iBHF&c0Tl#wKFDfuv z48`mbEds;J)f4q}UV)*{pOA?i)TZ%9^^ki~2&lm)2fxF zsBl!(x-*#-Ubwr8OBkPF-{NT|CQ^P_pT?_V8ka&;slyyM;U#CR74TB!l19cHi1Oo! zY{Rg_gKRoUV5f~YC!d(*gnp27+(ELy>7rWTg|#l0*)t~_vK4KdT&xv^P-iUtLUl`7 zmhVNd0iGMqFDuO1jPa<~L_s)if-^J?WUh{G`m*Hf)e#o1&i7qdTb#KFIyHK`nC|lrYs%t%0RFC6z999R~;W*wLvt6}=Fv25feCY8b z7M{CNK_5e+_6Q5W-uP~e26qb+Gh`#Ms*IX6a)nW)*UmmUbApgal@+4hdY71pe_^JC$KJ@G{XAWwHLPcyz7*#ggoAL;{$DtdMSMt4IT;qdLTQ z4D&!50Dm7`2|D7NEfa#~d`KRi0JcTn>6VW#tOhl<m zF~Jux&SBV&-@u)P^Jn5PVlfJATcB9UQTtED=D?JM?Ayi>-8qjz&_i~5tU#Sk?{SI; zw<-4kW)SblGIJ=IraTB9K}#Ou%04d~z)C2ig?LS#rYW`zHFjMk_*!?NLT~3~>W%`p zrjd4acKm4shT})^V^5R%VU~{3ZXo^>g3eYTGeGje*?zu)4wD*qH+{arB2Zxuas(jr zbQE7yZt8Uux}FXxk%4W!yZZ_-41AA>yyNen*VT$6byPk1c3Ij$G zPiO}lS9mIR^;uF3c#ik7R!h`<&mYnCiM!H+dy&DV>F+E#Q{vU1ELEyuJRE3kpXjPGH(;Ah%aN7CrnzfvBHz(K?jU1j_05p4-Kh5 zWMd%!eY7H8OG>Rymd4c{N*{8-D&KgON8K0#dr07N2ea`S4}pmWthgVmn20~hEQ9Jv z0akd8C(C~su*xz)XF0+w-!o~!#%n!U9&^BoGj(c?x58mhg-?*ub|*{Yhdh+x3JfyN zVGDAtH_XemnpjlCLyv>bd?y2qr?nRWjY_&WIBLI}nu)9J@4{~&aVvlGKk<15wGz>u zJ7CrU4CU|Qkz%~sPOoTe{;n5+BpYjRi#IZH>p%7w(WK_@nuD7j&W9eV+QQE5o?&`(NT>PdQtJiY_1?#cCYlcI9zgHPhenCrVH zEg0YF&-EpfqH-B?)6ZP{Oj=ORyz-RQZcS^ydBZZ#)bNu=B z`%&Y?%zds&3&!{QbNv-d3esKwRt=~iy(3Ppc*alft0qO&LcMkl4a!`fG-<*3$Njl( zHYqBXdaZCp{2u1I!K4M_`~10RYEf}Y*_2g=BQberI zK`NMAafz6xtneYq7i^HB1YXGE0-jGy^!;9CY7j34sj|4L1H zz>LtJ6u+GKM-4O>KkUchWMQZ8jOF>k6&+66#k0%xF>*LVW7eI^M3q!CPm?| zj87qc#6W}b@B8t`m=uM-CccFDeQHul<$S@9|09#4@Ylw#Cw`ZL`rde};(dq`=;?5v z>y20b0ec+e1WX(@G{Bv&mie3K+UxWZNs zbyWmdXBSL<-X8o4%%L=P`y82-tHp|(Bb`TeHb3+jpqSa>u{KUXj~vN6Xei}%nQ}Zd zHFx)DB+Z?%6mC7n=6~Wg@PoRf4+mZf9Nrh?q#my~5iSxnUM4b~WCG8u@r1n)Ruy{f@5YJq33^s zJ{*`$>Gy0VZo-Xz=Of~gi5oq)+|q`Kj!Bls5InbdGL=v0n&czu4U7PI-We%Y5l90b zMiU-JAFNg45kAc_xUG$PbAJtXQ3rqaSJmuTp z!;0#fgQqfS?yaj7zid?!!SQU23$h9X;q^j>rU7|~!un&>9iaLtZFmIpMR{VkA0R7R z2u{@QLf#?*qoP-4Q&=#yh#EI`d*pupmp4M=?WQbuNSM>iO4x#m3cifGfwGap#ZGv8U{c=#S8Cx^VWJZ}bvVsLsalzmbaz~aG|sQ}8TRS<^bXYk~QZ5P|?oN~U1 zHF-6g##Z0^6>SPRlzl;yn0P;XKE`3aERb3xmLNHYR_wQ+9q)jtir-FqB}dn&x%u6^ zw@^P&*FiCPvnqI#ed+ShHbagkVx}Lxais?OsYSFzW4G62&gO+$ZZV6lSSR1ft~g>E z9%z%!I#Rxg>7DG_Lt^HyT5hV{rX|| z9mDST47=|fcE4-bee1CM#IXA&|2;ICj8d}|$D_Za5*U@hs02nOAQHF_W}n|ve5T@< zt?$kaSf7~{u%5;1{aR)Rtjl)?tSj)16$h*+^76~GPx&4GL1RPIJNkF4zl| z>-C!6a;(KHdw;~k*9WZE@iia90~^$R3;s`Nchd~c z=>Jg(j7nfs0;3WbmB6S3MkO#Rfl&#JN?=q1qY@aE!2e$)u&J)Sy?SHa%o=Oj)b`S; zwbLV(64%rt9k-j3WHYv@!7 z;mh!`)|Owr)|!e!`DcN@sfg{zYiciRt!eP_zr6g4QlOMZYFe5TZ7oerb#0OArnb83 z+AWcWX4I^1yyf83wY9ahMK)Epwl*|xjBKjg)Y7&E^>EUgTOtjYw?x|NHa4_0w@0cs zS2r|OZ)oz801u$w)KU|vN8)&keAQGpUy@MJ>O@^6p4<>=X!}THL$bcUt_?L-={Ids z`IxLlsxeMZudQpZX=`Xrw6y8WtdJ1)q>xa&x;>I;X+fQuw?tZ7+7j)Pb&id73CW;} zvT9nAO|?EY8=4c4N3t~$Nw#fp)7z69HZ>#+hfG?L+<>N-iJIaMg|a!U%4^CawRM{t zYU(0Wi;6o+`2(y7G;6y29|>Xlh}m?W+RM<=Q~3+kWEr@^A6gN7)h?A|gen{R4vxw+YZd{QlCgGM47MowBCw#E zI}*8hO-rJ>$xnm=E*6DBezc~ez3s?|k2n7YA5+&>Hzn(Q=?%X05%O(Eplg*siHdBw#qv!)8;}koI=c(Kv4@A&ujR0OHu7 zm~o|`aU51OCn*0U9Au9**S5AmcT9Cp!g0!qEIVZnPz~tq15)1xH!rI%AD4b)n)HO} z7TScPk#%KzOHI73rMV^9Zj~pSZh~FXR@Y)y!>Op6K;BNG%=LCU*U)TX2)8hlDY*gP z6tuLqwhdkYX&A1>{A$}JwBJHshU4Dsvr^1Wx~^{XeuGpQ)|fZ?W6D-m0ywMd>cN-K z>Yjvi&6ehxxTgZ3<>FwVGQ>UqOQ*Juw=hh3K;}}C#K|!b=RX>~WbJrM57G`;U0`q; zZzbBQo7*wCSJgLFZ!~Ha(fOQ2HN5NmQr@tnswNq0gk*J1B3a#}Ax@c+)LxfJwpO*u zXyBxvG}H||wk4|S+p0I|p-9ptSF`k^s+M}4Q?V&Y4OBvZiy)sQiHlSPZ=qQaOD@40 z=yY9&7tAzaqo!q3Yf~LegzqCsuoE+9Uf#Z?{qm-U=48jsZScP8+PtH;xS$owt~3U_ zxdrY=U1GB6B(jfwMkO#Rfl&#JO5pDxffvsmSV}U}j$%5F{}c7M825ML+mA2iST!we zbu(eKtxXqO)|L&H)!S)VKbvY@v&x=0?jpFbzi|wBz(N;LY2C!$vtKtgv;ub%vF16<8CjGp)0%LhEen9P3=xy-MckRU6>4xp#0PJa?QH zGYvRZ4b2S+xv8mcsu2idC<+pll7$ z#{lhcP}|VXD1=OkG1k}BIVo~un8A#{%3Q~5s%jf_4umYKHa2Xo+W-f`gHT(ASV~oE zTgwK;EYS#QLs(?90VP73)~ab#*K>RkUE` z1fM;Cy${n}b3Zlb19i*mnyRQw$HLA;h1FenUq_M%WJJ`tSbD*tkt->(z@EZ3insy z_kFnL=c(Xt-(%3v2X2zAV=Fxm5tySP84mYOtEEjiA;NKE{{ji8N3sPNRm7wg|D6`0#i`opAomWOt?5+qv zriw0GjeMDQq{9rmt3UoB_{OKwJKO_~Fv1LJ}Rh%ovYmB6S3MkO#R zfl&#JN?=q1qY@aEz^DX9CGfv50ZjP0-~a1H-z<8mXx*&WXaD2khZcWnF{Vp0U;brL z?yTvv7S8(G?5^44=bS(1)j8)BXNo^loS2)M`>T0F^DdtM(~{-|Ab`m=XZ)X^-8g4_ z$zMvW1qBPvUhu&M*Dk1EaMOZ|OW#{sRvIn6tu#~m+0y$;_mn+c_Lnj%if0axr=#c- zMRylJSN!MV_s(55w{709=WUz+`T02|;gXeQx0L~*g7YfNI&03HIlrEhTm0R5C+7Wi z-Wl`f&%a`RVBtjzFIzZ&p|u|S4uJE`S>tD4H21Q(>q<{6D=lj%dk`gcmHk`UPs?5_ zJ8xn0l7|^sXvJOy{F_j8&YbCU=Fho)&h2xoPRru?y_e3rd|vsy-1(vT6X#z(zj*#t z^RJuVIRDo9JLZ3G{@3O|KL54(f1dy5{AnenB}+h8j>E)$MO0O-wq4cKGouwZuy}R_$(gUSkrN>Ht zQrc7c*V3G_Gs|X_%_>`3c1_vZvbM5Y%5E>auj~tDhss_qd!_7;Wn&kH7fxHaXkq!n z4=-$A*s<`=gv+tk%t=TWk zesT6|vj=Af=A1ic#++Gmu9$PVO<&zmuC_Pnd- zwawc;@Ai40pZC>yPtE(myf>he)$=#a@0|as`6uT0&L2Q)HJ1Ei$@fbxTrhh<`GPAJ zT({u!3m#tZ)PnCW_{oBwFZknvzbu$tT3))kbVF$y+UJha2TC6+JzV-yDHP;BJcELN zR#C7h0y#`8no(3#R9sY2w6G{zw7h6V(aNHGA(KanzEX6c=y6EpM3G(8TQmUa1ZRb2 zG3)4OR05+C7?r@N1V$w=DuGc6j7nfs0;3WbmB9a3BrvnSp@}QsJm>69ydh;{puYO1 zVY}3uagq%ABY$W0{ z+l9pZi_NEQB%e!MkD& zhqDyZhddC)^bb4`#q_Hlh+_IR4@5Ej2MGM4h#q?z!h+?|bh0Inw zzt00vJYVO5D4sWYAd2Ud2cmes!-3$OLy-o5z&6@_CJ+13FoE!A*k@*Kb)s6sK+4J; z31>q)G(&y396lmWol8jM6SyDbv@+;XCxmZq;6}57L}2_e8Xm*7(s1|8 zO9u%TW?4R9MMmU@xRdc^PZ1mfuT@(imHs>+JA9D;0^}<`$R7duvkwvicdcW*WlaQR z^H?wBy?|VS^OszH$^rT1X$Eq#ZhYf(3nyrJKYusfXmfRgGR_UC-9)~!v}M~1plWxV zW`Q%NhJR>R_<=y6;ry%vq(a{*ND`0@KFIBWuqR0A_-|Pc1G3Kt=>nt+GLZJd^+=!Z z1Ah7$8b=U*1V}jF3!xQx-p8)xt4-!E0Pe03xb2=a&_CYQHWJRGD=Tbo0e2}?- zeANeu0dhW?(QWq|0l7g#lzf^1`Lqvb3m{+dL2d)&XFkZM0oinpm-54a9P~lH1;{H7 zgom8qs8-pf=C;@Of%AcLz4iJjAQe8y2|$`1NEM#+s@l+yxXXc1^nJj2&<6>kdRHJk z?)JFz06Cx`K*#5DK;HD>lmZey&zox{AQOC$YXK?uK{f!gRzno!TL5{)2l*r*hbDO? z_6Q&!d$$+T1;|T2$WH;8`W`PoJ%G%=zzg{!AfNL=f)MbtK1d-TJ0^Q`T?EKy97vTq zwq@2c4utYq0GzxFy}8~GNQDow29OpXq!y6a6mPDN0`lFdUdSFmcHsOVw{`9W@q|X3w;#fFwWjHR+ zvbH&pssj8?xwEh4~?vV_E+0EyyCI1~uqzPrK)DFB3C zqMPeofJBWnPN5t0H})7Dp?o=Vea;6d2jo>BVqOp?zND zgM1sguF(+68d{06D&a=Exe5Wf-UoRJx!Qe@Za{wJgY*G%b+MPu5Fm@-`YXzm4^P>8 z*nzP03GmLobam_C7CU z5I7I}AR$Z$)`K3)QIz?X^80*{3jz7I&ZYR_JI*h@!pq@OO~=*4s{yI>;m`+o?EPMT z8i5lInGQ<^+DQ=doiwm2szx($@b??B#u0$M35q71=wf&A2X(`ML(w` zasz#S1l$?>a|v*i{lQswBiNtYQHyR<(^J@u&jIIkgCiw19B6 zeZVXEUjg!aAEY0U`juWej~{1QH))7!!Sex0`XKKGWa26><)wgp>nbmVedjd|QQEQ& zIDhfsBmn9Bpf}eZKmw~3MCJMnAT2(~!+>nj5XIp^KpL;{(s>4u@Ax3c06DB7it>K} zvU-iTtUmxUw$e){2<7PXK`sR30Uu;BAQP_j=DG@y2e0!|ranL7gVX@$n;Md18UML$ ztv46_=T0Al{__+lwQEV*KxdzZC~2es8GpSO=d*x(>IMZ-IFAC-3LSBK)6;;gTkp;F zBS1E2h{|OH@{$koXF%pwdnu2@{Pl^Fba4gV>!8j8TduV^?Zyc?6hg1 zz>}&jjn!HKBDnzN25vbSN6+!+!V)Q~g#)Sa4us)`YaVKG)JOxkBYoZvoK&5+y{Z7& z)!>yz2OxjE$qV@uAQPJn#K=dLMV?X!9f=U%|3XlS-=y(=`}b~)b|0I_YqSsf?frr)dzVUkOzH`K|r2Jm|R90 zs&q}K#uw#oGbs%m+Lqn5p-eELn&(jkbMp; z!`h(U?&t5OKYEV#v}0|)4v)b9F+NhOBl)(L_A2-EdSX}IT#fT_H?<$wrEB5iR?#!{ zQaG$v5fc1}f46#REAa`3=V3?gE0(OekbL)B@JzI2z}bWUVv!`@YCsP9AU6VXj}NjD zkVkf#Hf6R1AXnVxh3o*N(g)cONS_b#03hQ(=FRnWK#uz$&j4~RSafylRY0!wL0$)B zy$^yTpRI%sayB5Z_#l@7@~*U(@=`!P?t@$d$ftdf8bAv7dULe`Qs+=MnxG_4O<0WC z{5%TD`MfhtSmES17iK)=D`wPqy1*nk|BZ(K%F!0s7CHADgQw?nD{2uj_3|sOV3~R; z9M%g1!?4f)q+UmnSG4Xe$|@3mShtfXTV_0U=vXrwxPmZc{z6b31M0}7AaiSR=Ytfp zclsdn?sXx0MJ)P`N{^mYdfcU~_$fwUU|8t~T!=2c;vJQ~=A_bZbt&u8sYm|0bFD~2 zbm{BgQRyWv9WD9w!^C;c&>j<1R#(-t~@3UwKmLaF+dTQ5+o(nb+q+ zbm>RmQR$p1_}jh7rL48CWH@AAmkZIp1Xmx`Z0qE`B5}Q0#O=BDiFmRZbEfq!9bJoV zQwz`={yE8pkA$OR??;jOl%s>H7vi?M?twyF4V!~#O}Np)AvOO;j}FDt02Uc?A%57$ zjGlS$Ax|YAGcx`!*1dS`Tk)*x{_(fRnO|%4CjiHN*k@*2JHr<8q2sJ1oPnQU`WNTA zSP=r`@$o91aU^xnrm|z0p9;=1z~P5?3UUk(TWgDg{1On3o@@mL`86OMo7`Mu3M?z) zqjNqXzFe09auhf&ouza(}n=K7ysRwo<9M%fV!p62BgR*vE_gmYojDq3CICo=^Frv zI=QNsw|**D7ONKAGfUC0tt8^cM{_8Q>BktZS_gx%fLC{ltqgF3W!@%=Hh{@ z6~0{m0h}&}XS_0#8RbJRRlQyZP62LR`Md#$>2V4t?@Y_;L=N`l91E{0lYLEnK7I;; zQvr0<7FBo~TUAZ6jk(;`i2%p=Y>IL*ApWwJ0kR&sR9U#Nt^tG}#bFg+1-Jq2<tlc%_3``wDLaxUoqr~dkMh3)!WyU+tg3<((aQX|GCT&HA{64* zv>On&4_4`8aqsiB&ToKoE9kg94+7E$h)XB`ES6N@(Uxg|uw+-G<^f_nB30Anfb0T} zOL;XQX8ck(?SPPwTh>-U1^{Hb!pQ&<#ifgLHy~ZUT08)V%MZna?DBEt^8|4Cae4l} zhPWL5<|Lf)9DJNylp&83?(~&@A#kX@E{Agfar*`HR{~ zcN5;oiTCx%`}c4nvPx911(fgv-v}fb`RZwf%56NG zsyozc5EZBfuNP{oidQ!!TokD$Ul;6xRGe79D_4Ux4}9qnCx=y(q$JI*YK!wdN5lD< zHEX1V`gTH90lpmZQzcZl*EBTDPU1*v<}|V(5xjQFw2e+<<>fs|Rn@h%ReY^fn#*qgOHNcrWOaWwyw#8hgO1ieY5q6`I1m z!F!ZAv1$NVRZV#774N7x?sa_wELJm2cGXAg z+FH1g%c>GseM1}YT_APF|MD!Bp;Sb20fEgWueb7)h)O#p$~6f&teW>(MN3pAeJ}Zn z&YGv8{ug~Y$o_YIIp`<77b`kzwpB%4R5IiS0Jgi{WTi#J){&Qu38v>QT8^};5_l)M zBE;S!uLZ4A?*Rop^`0&Bs!oVTzqC_j@Vtgg=))4qOLXxbF?su#!jdKx_N0aCHnk?U zC=rl*?_0*CN)#m%u;D}HZ>`4LpiKsOMHw5Zy(V5)n{2A9y1AuI^+L(zyq}En$mXAm}3^W|yiLDXt!h&LVYm~Bb6!Pv-qTZyAyPzLwI!E3;)@3099 z19eR`_;Lw(k<^RQG%?zB{pvIg5&NrPbi`d-M{>66tIKtLi3h7=eXFw;=^4cx|vYk$~326erujf&z)vaA1_IA7Y3Z!@_%? zrBMZQj8W_)5>+<|%j#B@0-%1$y^KNR4j|nrll6FouEK8R3#hBuj6~trl*?;lz_t8j zyn>xqrjZEHQQ*is^rReChsXXaO`#T&eHX$!>dkjjRzpiog8c?iXb6oRFQpNEq$Qiz z+ByIkYCU;HQp4}vp2Xrw2XC^+mOJW&LrK@8swQ6Dyiq5JSYaWFlu)lckn0B6dTN(S zscpkc{vc23bih=$!rW2j&B<1yFm)Xb3A`UrkXz$h+VPI||I^pCEj13qP(F!I*j?HO zW?0za^6Ux4rGX~SBS|Yy%{&Gosi7UINIvRyRry}sPa8c42Uf}bK zgoSPe;cm%Aryf(@df<{QV-pd&qx^OiFmRrtnX{ZYAm=HZlgWjhrQS6v zlF3`q3|_^+46kVyj*ATv(qeyvrrV?YB7_pkLWsG&0OrsQ8m`zX_>%=i>ntWe-Xl=#m)DwYNb~~_5=|r>6SKq%*BPD|YEZHjkVE2zM%!=PTf5!1_}8C%3CvRU zW`SmRLf9XB-Zd;Tfnwf4l6f{GO0}@93^JBOpB*?j%|lA6l;@%NaQW>g+yJO4UF3}@ z@HzsbMBpv#t-K3^&eY26$Bap7;!vl3(9tnjltdMy1eURJ#J?mFeJ9bySVX1s@xj0mm6OIp7kc&>y!?>>Pfhv6bQD}&h zZ(do~7=DuHH=%knl?O&&`;H+Q)bqgjT0;!!y?+6c-#yW$Ab~y05?3Wc6nU|7m6KhJ zi~`Dq4(`n8d`cy7u&hn+v#7?EH_aaJy7QH|6#IO2RBr`r+z@TCuHH@^URR2(i2`rY;K9ZZ6ky60Fz%r%fr(U)~8=hHrgVnI)K97EJM PzR0ZVJ0alx`JeEA)a9-_ diff --git a/reactos/drivers/usb/cromwell/core/usbcore.sym b/reactos/drivers/usb/cromwell/core/usbcore.sym deleted file mode 100644 index 12d9665979571ae1babe6e83f7ead51191a5551b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7904 zcmZwL3$RsH83*t!N~U6gnm97j%|s$4gb*L&<0=?FP_G&0pt9I!?{)6k+;jHc?8m)a za_AChPAWY}2-9q$2`os*(j+8N!$zmHVH|a;L7Wxnt%Ka?#Fo4na>#K!<`Ky8PHfE6kX1rng=`ga z5b`e}haKX1>G8Zh$3X@sa+wO5eLe#oV#@R%P%G9iycwh4J2a^e)5%Z}k|kQT~OP&dNRLDh;mxU~ZTrrjRB82n_i6L<z&{ue#T-bw+NX8dE#_F zKC>WSoX+KP$Q~gfWXdOadveHGGq`*na<7oJkf()w3$kh^&$SJ5cP*-n+fh6)b9XJ& zi>DAXb{5a|0;EsKUPvP3FOW-S^IV4=hO*A&atvhE94?a~>z&v!JPWc<$UMmPXYpKD zLsmGkxfVlCIh)6HAZIwSF<*eR&f_ubAS-K8QBuYoKfSFM8jVee`I?X)LGBUq6y$qC zUV=O-=6Vp7(-~lOcPB%z+#bav9{`PHayVWcmfXrzxaY$Y%8IHX&;e zbFYvMklzaV0i@?bUh+&6anB>_y4P zUc__#8S=0YTDjvc<}tK#&lfW0eV%u%6FkHZ&7XyHc`jNzi-b%q0brM9fympM*RH`Mb#V z9AwQ6y!KZie-rXoNb^Qs``Gt;-hdNZ`-dQ} z#3YcZis!l$@);rDgpBw+<^jkd4J)?fCm@NC=ODvQY%gAcEDd-$`yo4oybXEMi7k2D z5uW$ykk@r0Xh z2V~a>mwO=lg=~Y&S;b>^LQ)~WglrPB7xL3JJl6q8&n;XI9p`x;7cvntL&!A9d?DvT zmN>C1?n=m@5Fhf4kPNc!R$lvR$U!0ZL3(cIF*_jR@8t3u$Xjc<{1dYBt6Yva8tf{f8oySZ>%swGgAY1O@F|#1^*K@fLvQWrXkOM-NK#ttNb0v`930V!9_zfPj z5ptc7Es!Nbeg@G(o`n=bUV*$Ug4s+Lg(^jh*?q##RTcFmv$vDvbK)B5hiIC#YOWgOp1(heY+Ma`C62`s}@z}4dthi zYP6GJAd34{kaW_vE}|s%%)`9!v%78vKqWwvr5MMzv)0(F<-5=$c63m*pqOKv6 zr`mW(DSD0F&&?AFVqnF^|l$&#d?yMFK4ZUXpi(?>J1y))-HZRub@HT*anio&8*2ea^Hq^X)8=04l4km(`9o1;5!jI4yDv0KCGxIxI#bu{K z^Tz&(pjxCZO?i~oahN8U+A554ztMJ4=9QY}nL2eREr#t7m`bBT-N0(0 zR`pVsXej9czBbxgQa_H|#A*d7T8A`Q@}Q-|vaQunk_~ior9q_9ENN&OPfF0z3bVn` zFMO;JH;DAAXcwviIzG)YdX8C*8N#1uI#0?BOTXFn`!VIJGO%&haZ!RP;-@N30w3+_ z7Q}<7vbr$ZVNLb5nBCBtj%oBTGil3_eX~=M27rpAH&%C!67+qWZ*Feyfi|(nl^II2 zWHx}>Xpp2-g;je5rNyQ}H5G*#(1SY0@}i_I8Q3VBO*4JyRoXbWrrZOD3MG_&knLja~2VqzVja+)%3S8duCO+rmZ7AK}kni#geC@FQKCA@sz#XSwrX3vE!b4gfyxTXEW>gdwF@gVNc0>>TIQP}s%|f4eC1N;9$371 zH_58j(Q?7LiAjM;MhP2Rmt9}dVm;)ZnRdIwmzQi;yFG?%-<;6KF92JlNQc;W*`XqiAETE`hFOmvJ@4YAAPemq=n zlvJKNT0XEPnU?w(=}YD&8RDu*Szw}&c2_xz_UbZEQxV{g=gTziF? z76|E1nY@(@jT#_BqsGUW9Uj{&1AKZisAo6b`{^~Y-0%IYuI;@aS1<6rpYpE|VcALT z;bmUKQ0Av89g*1bLrf7|cCZekI8aNYW;4=Agb6JvdmBfxGmNt~i|Kyujsu8WwB`a# z$!hzvcV?5xg_Lo3r$!{b+G>!x0MEMm4ck z_%}N^T}|BFcMHLq+4J&tVslrQEpyRBE;Id1VxH;8CHMk3OjB)MqrZ>7fa1!X$M&nJ F_kYh>(~6_7x=p)Mw1wC|P=T7J`O{5ElbGz5 zRA`%ai*&mdE25yH7eoa`uT>E%;x(;65K#+OMd{V3z4ELZHENW2jpXayr1kRn|+=$XU?2CbLPyMGxN-|>iPp#zGYcKe20fE>kxkViOT<1|JQ}&GtPhP z4C|2z-@D*YVCDBNSQ~Hbh_to0Zf>vH5~;0eX=zPFHq}SklP!_PmdNsJ)c!cpw zzHukN_yJ6%U3*EMz>!no5}A4Mk)NZM^(mBv!mI=d^y8O;IO!9xZX6YU65{^|Fe_2t znLv*IefUR)4(MO}n9oMb+BmDOCQ$*QR4bnb=TIG|0JTsxLg89I}`0#pM%4-}$y6PVR{f zkqq$nuNzEPtwr7@Yd9IQuX{J~Lh0B*YWskdI9IZV>>suf9L~fB(y{*RH%WJU*h-wA z+CF3@6;jylyIsmi$HM)o

PqUL;boPLSS(vQnK>_9w1L^#z+^aqD2ficiEpdskYr z4JSc9G~6~t{!fknyffy?Ze5*!^z^|WD)p; zpeWN)is1=x6x<&hs2WaAA@JT;hKC{ObZjuSebCy5CK-gta^sZfOu=L>7EV_d%SBPT za6riTa(8`ZZhzPz_G zfD16&kgg=CArk|c%Af%IaWxJEhm+G$k!g%Gq1ut*WS{aLAeBptIw>V5W;q7rCW zI~_ZbiJjPAKX}8tgnN)lZ7;UAfsw)AQqb=-E%Bz7ku5POoR(2>Ok?<4;(Vtiq?x24 z&iaRG2sDATwuo<3p(|NK=t|ZQx{@`7u4J9+n~e6#tSj0Z8{WI_74TfZBKv|Uj~%Dj zK20hA{@CC!DmFNrXoLvj1L%U8*kmKB;wBZC+ZP*7A36N1kVNVB#a;;8FDFR>2yhBE8IhksQ#;i!?b;=Cap zdu8vse~iWz8u=B)fM)0)1q>#R!qbP*Qs^ZvPYIE7iSA7yP;WXDeX*bo6|ZWtngV3} z8%8Z?mprH(Ci0*ayZ;nXh+523lOANIa{^rGc=PfsuZ%JkQr zy9BvQdSW){p$_)``hgqXRqaY)k?7syOpHckr0Nwj$&teT@p9TTj0jSjB*v^`G*r!=h!qCQOt`Dx;VV1e7 zFSE|poj~`m%+fFz$=e(IMd5$Me)00r!}j^<*bAxcy;kBJNJ*QVU(m!sL5Gh*R{LYW z=!z7YlyvN9CdMv>i`4cPtVCgE-O>DYq4c_EQ?X||bEhLUKZc==w-`U4?O{;d+8?u_ zve!b?N|YSMJW?_p`xLe5{U6mvF--MJzCev!_rll7!oF3%I7tWHT0NbK(d?vSPn%jj zEwy?g6?;Nz^|aKAw`HdgY(r*wp0XL4bx)-8UW)-yV5c6prGjsG+H=$o)?V`ASm?f#_x{}4O_WS z)9Xx*6TdMm9_X3sx+m5ro#s!%FFeWOU}6caLt-JAVn2u5cE-+`((Q&smHI`M0KlLV z7Q=$xrqzpOeP2vws3$s;mF=mV&L0D#ZwFY3z+ylu<_eX!>(Q9$&WD~jLG`Y!gKB&P zt}X7j>g6D?vmpBwAcCN#MlXm{n}OFL^EYV#ry_Z|*8Q>K z;gA+AynNaUc!(9T{;e?#PZhD^_PksLR3$$)6zwXr5~xLAKIOUuLmKqv9Nedm^?I9~! zCR%|>N)a=nBKhtmhG_#;2tBbq)b#8ZRqjBNHX6kZw}tk{_Ey=;q#i}N)gYbcCa#pk zi*@2WB<3eCM%5)}Rs1stG245X{|@4x;J)V;3M7)l1c01cxoBns4F6tasP*boEnxQ&Ds#T80*IIuY)tdOf&7 zqf7L~(K7p@0a3>ZN8v306##f-dANjg#>*fs|D-O*;j*7@$&p>Z67MS(uBe*1qab?~ z)CmRmM5nM$@MVFde7edKxY>U-8Pe;H@7jJm0F5u)b3XFuo1K-Z?Z*oW_k;oB)y{MA zKTx=b77kbWg?s*ltL!J#?S#TTzgAbL74G>d6K=ylkQ−Ei#m+b4A|DBbd%miY zEhblF*Q>jUxGUUK>fY=;0~zSLC1zwb*xE&$$-v28h=0)Er!06{Hk!rCRy&aFTDcsM z8c(z6%Eo$kVWdZO60Q1zH;+bG;aHOPj90;c7nWXY8{&_Gpm9v1gUtyg~tk0;72@mLl%(%g6H8>@< z3?{ltVyx_YW%5y!URIJrn?e*;4&e>{YLVow0S)Olp-ff6r~rv^KCL~rn4(!lwQ$T{ zrm~DfR3yD@N)E#V6{(koH5Nwj#7ZcTj7prwC*aaUsb^NiPHaaAgqNIWQ|nHoD@$a4 zdP1h>w*9tF_BVt>Fp1XF^$o=Y1;ryVJx9-Uqs5u7&!Z`5W-%mh3#MWN<1x`ZJeVJq z_!5TT^;Yt1#n}ENd@#kx(5-pw(rQk>PAotu)xEaLruUBW(JDRBwePwppoTn5$2rx$ zzvM{3N_C%`uDsEcWwOq~`h?PzFxrEFK*(x7kE&>ciLw8zofmPmS#(?EFxXDQMa1Y5 zN(Vp0d*fdGL~J9nw)e zqTPXwn<@JXZ=>Ibn+yf`IIp9aun*qWUAX7pBxNwu)r$*J-DE+Q+eSoD21QYZhTEnN zCkHc?rQ)bS`aK0!cRDoo~}w85KM z8gzh^&eECyXKB!0gI)to@XXCQ1hbQ{$#k#^ai5UAM=Y+v^fkc6tanfvpduDZqN#^^ z)GgUHZE(zZGNLh)58H1}_2#Dr1IdeY^MY}$pIb}_heC%eaWAite6KL?uXeGm)CNb3`Y3Me@2UDr&Yulx#)j%*u3;6P2OftNVRDtT+HVr6w9t*BB#_@<_G&IXwvU3Xf zkOW3wr8{Yj9m0f~=%w5H)J{^MC$g zV#3@jhf;qC7CwG-#xD-Plppx-^taPT;bf(sMs3oJeWza#>NZEF*oo8=#W$$P30O3} z63wwvF{PVhp}A8{3rP>R1?@K&sPvAns!>=snHKa{l%U-PMB{{pOEiJWiU96BHa-ZT zB~@26Oq*hCaLI67PzD{0#J>)Y0f2%P=yp~1L0MW*9kCdm3=O*07;c7Cx{4pEf!C?BDSGb3hC|>P64gUj);_M0W{rchSor$aLkK`7MEn73|iWynSpTU2S>7j=| z_qj`7-qM$T4l|9zgXgE8nQ_F4KjupiQsS2q;6xsYOBT#PSabj0)AJ(Mp&zc=RP=K8 z@PCg(Ky>hYW>(`{!GB=DfhuJ;qU_fyb;eWZL39z1gfgJny4!rOD zS7G9Jnu!-hKt&j6?|^LoX?A>^xC~MZ;5Tpo-cS5F{}iRm20d%fQ$F1~=s6mP@4jXMaHL;@tmTuT`>9hH+X2P-U2c1OIraPFMO@ zP!)UJ{sa4A)s!YE2vi_<ZlLI$3Ysw5)RTB2#Qq4z}NsUa~`u5Ov2iRp5JQ>Ew&bZL@rP$uuN&3JTX`R-1boZML>fMoy)onY4mZq1MO6=wgB8Y1^99;y(a_LoAemR>NJY zv&3SQy8m}*vTV0P^Ln_D#I8fVfZv9%V1ARB3<`7PJ%C^M3ZK4-_K*Xg@fFl6Ydc0- zg@d`tko_Nm2FFtzKe*`f%dvJSbp#e2A*K*VT+dx4JhTB6qP^);b5hQQiH=sJB(47+7Q{%H#gVZtVXm&Wy7%_b?5V9{$!k|R|pz>&vK53Ghy*2Yr zG7|76JWYeBk}y7u+RUCSeA8Ee=g}RiLOD{Q%Rvkk(lyO-dGypXCScu#re=e3;T@g3 zFPoKykYW1yDv?4OmBQb;K~$}xa%ys#bW2n;l6pFru8hc-iD7fl{`sG^BR`beE)|a) zw)50{2@IlYT_k>J5B^(;D+I%tMdT&9`bg5N%NUs%E=*S~0wmQr(@Ho=Q%%xzaqz%W zLXFp)dPS$}sh6l|0`8?$6^?Fpy(_4n5 z4KPVWx%fXtO7x;e*H^^CNlejzHm&)yh)M4 z%9;WSLprb|dr-jTv3{DTKZC5403FL$I)+-k0H^}57lV&7Ay0U(m_e;Cm?NQ!{jnDy zN&!uQQ5a^l2FX+I!8J@vhAkLMvbmrQ7;NmsA4RS8noI8OB3|I3A(`$rgQ5iRetmte91!|W6WQrKL?_0RoDG-Dr{QCT$HpXZb$P1(n$ zT&rdtn%dXiF4VGFsDU7d72Db6MimkqJrmFc%pz2a!=wyIqnAkU^90{ybe0aMM`y69 z#^w)6wNEuRqtRt-&b`~yY8W;hFR4TgOt1p9^k%+=4G7H19+F$&jG$m|$bRfkqOc&* zBTB&bktz?_zpvE-^o^t}%!1Y%FU_4jfnL}?poe0*c&^XsUb#kh>!;n3j zHIz+d)MJc^9+OI!g@#a(#sA4dQ)6JsRBRwb0M8=>Q$^9^vLZH=SczQX$10^3u6ao| z5HlMTbwQ89R)8s@fc;tlIog5LVD1Mjmqc@)rI4dAOPoDQJlI7>d2Kz``UQxjYLneo zWsjFSnOMpOv+5)voHF~j<#5=#6SRk7InRc>Ze~Adjmany8p33;p)X^0D=HAOZz1Lr zMYnZtb29%FsjPJ;HvKukCjq>*qEAgt3|zJ!%QS(|C*D01ZKH) z2LAYRHzi;=gjWf!z1Z{wX;NI-+^NW*Me`VL#pa#dhq$XliE68-QsEJmn*1eH>g8(T z!iZ`Ds6hp(Ysv?jp~y=ohzuiGp!O1q^PWPpdgy;%kpj;OSV8)C8~U;aEo78dB;e`5 z1oYeAr2L;K%0A4PozqGmS5Pg~c4;HXqK}fhNvCnsA|ieX*{I0QQduRJq4e%OU`<_T zqL^J_tO71N3wB$sbg#MFk>=Y<@9shdVW`i3;woVXGrZJx+e#qb9HzjN7&4}c0m#mi z_D3^dCK-;eMLlK6{n)!Cqap*k!)@5i7Vn)efg@nry&H%S;Z`YV5xtSzCk>bI(mLh3 zKV5mNT%5qx0GF%2EKM^w!B7>6FsLcKb1i^lWgH2xJ)9wV?kW)!gpm8}htQXi+f$XW zR7F>En+d~yk_EC9>N4B}&jfc}IDOy*k`Ljl)<^!?D;e*@nLWFYotzUglrclx2zBMq zck(@Paz1E^R4rt4aZ;>?nqL-VPX|C04GX`Rtq=9c0Khpaa$r+imHor%l0`{F+%d6kjZ~c{ zLQo89@;Um>wiVUf9OgO5W@oZ43sWEu@Yf2p%6^aG1T8#df5O|srcO#83}<#q=8_I<3i-kN$guEDsw4Rp&7SrfG#6RkMvHdIKnsgCiM;RBcjRI_LFB12@yNFqOa-sS5xiR7zxSU8f%fs=@+jjNdF zK{}9+h(@c#-&I4nqFH_F+(k}ZK;!|+R}*=3B$3m7L{x-8rg-!Q;Jb48x~Fi@7uYVi z+KCN9{dX1a`8e)#MYw*YaL)%+nw7YK8Wf$J>YO}bM=h?oh?%?|7wlrIr=+WjaorQ0 z41D8{tIm#nCx}_Fz;L zM`9S5x2dqZGz<*r|J_0hweDo+b2_vUPK@K~gVSi0{j4-`5M%9oSnp_5xo2ji>$ks7 zVKJhEktEYa+a~kB6PI<%WuI~7Lq-+*u|GuXB~9#wDnBf$E?G=Tzx~zqq#Mq5fC1OJ zM0B|b8%kbjNF$@6L{Mki~9(u?Kg`B*fDPvp*Q2>zF9IK_@n+)aZY< z^g;QFhJmpVRv!cQucTEW)B!likYGXfhain>NDn-xI)f4h;*1my0>iw0u)#pUJPyMd zMqgyqdxr5mL6{3&1c}iIHk?)&Zb&bML&@3rGfv5Jq5czy$A%iWgV;f*>*qac1HKb{Zx0 zV-{tlD>^Ddk!TfhRSuGvY4(6~-EImUOmHw5MfpSaCfSgSoln?coqJB$P&w4L$v}6N z{R0W16}bunSsAUwpf+fVL=&;e+c@d5uTgaAQ}aQTyxhfVc?&*JL&j>La{&EDQMlzU zr#z>RsNEHa1SF(YOi5_neqGW4=kj!+!rY;sPci=ITSULo%Oru37wonySPpntA z9PWiDi+t20tmfJuUB?We^fGdh>MT+jIz1V#b2FTd42>qkOvx})Ww^(a;bLT_9CNO6{Hw^3{k!1qE z+2<(u;VveId!v+ccT^U(-8;nK3C3oCvzF489iXMO_U+vYL8MpRmD+w+Ab|%{?#fG? zj=frpRbhupDHdTMBy?#kT`)>krYwR_ZmHglGH+oEVm~GJ_x&FI15dq}O(1RyzQh(> zD54LWo+W*GhwK>@n+Q4DunQ&-#I+&xPTad|LkGAvj}qR`3^DLEPHk;P9pd&9K0pRL1+|2$XhW~$I%w|#Hf8}7 zPZde>8I#KCp4*@|LN1#>IF26FY$&zn4C45dFJqq*#$-MCRwB<#& zB9Gbdu-Xb#rY9POstt=VW!>Zv9aJ^dJy~Gb7oiz#K&$#3ct{Q!p~pP#MntM($6=P0 z>oGxfb6F9Zs(^ZZ$lS^7M^dI#**`O@LRdhWqJSFR+)>ZfScWa-EQV5lM+J*F6DI&3 zUmyS^<7rDuRx)9!0lTkMrkVB;X$aowo#ujrbvp;A$o_-}r^um$WxDwyE#-f3Jlpl# zZdD3qke~x?YRX@2KX6F&aLXqFiVY;+@M9Ec5db&j(VZ$R0&2r!a#0=hP=w}}E63?LYhMY=pb z#oXK0e)pFB$P7HumXJNsu+ z1)F<%Oh0BVMs-dc_kvd6SZ(@4v(amz3Wg`f$)VeW*sy>d_yy#k%AR$uXt;8c9;b-u zW-@AoYj({?RZryBQ>w{u?nd1Q9>9zeCPRf;RMJxNNNbCDQL)$-P2_r6unl=}O|uos zV+4?=gqR@(uQR462x`IbZB9iIZDuR5j`OJh5dEG5tPfX);02yk%N20a!7D>|bOyia zD?^?PLELD$`29ijNtuMe2Ec&|)0Yg{A5m*eKA#V%=z5ON2Q^c-qxpRD?9UJtY1j6l zKZDc4_gnZcqAa#oyj3^C00!s3qCogZA^V+>wpeWCXQHDrmNlIHKB!>oqP8}xz$Vi` z&dPon{~$y0mz0my8_v%#Qcd(n#H*}Gdb#8VIO7oPXy6y=Sj{U~4v21Mag%@8? zH{Nsz8O>`Z+%yJ`!GbY#3@=)JBC>l+AGBLl>0(C1BTQCUOxB<_S+^96yigf6dzZ>2 zF;CFOi}hvU>&weL*JpGsGhUqdC)#rqxJyRA$!=?>W=F7 zQPSUeGKf3H?T!Iz5Q57@INkyg+cNh&Gx`;AE5}xY#X90{0}<9juC1U@)fMV5tpT z7d|FI+z4EIK0|^I5nt*{zeNRk8D(IRntrBhBZbj*A1a>S&1)sSf^GoN2L|l3mCcrA zo26nX2kc8lqBLo202w*6x1zC>*7T@h6)BzuUZn(SR22Taq;EeC`*JVDzCU(+7)>cw zM}ls4NHh^KEI0=50ml6d#lgBzbT*>h{pc31V!wb%qjB1V%R&1}>K$WTSa&SObCd$^ zx91s`#%a>ClyjYJQGE?|le{4xG=f*!#bJ5gksS}k-w1)>aZ?zK-$GbeyMk=|6Y_%W zEDAVgd&UAh$f0hlpw+)sK`^yr&#q8n%55_!W;lqmn@&Pk=Ri1MKP?L+81!_0jh0;M zK$LBP?}5fX;dErgMo(3Ax0*s31T)P~h^UZ7WG!LA~6Kt!PK0cMdpS|BZRqnU{Q<1@%Y(e%g3^RN#q>?U?v>mFkmlGnKZ}4eZoridSnr$r3+P}{ix69m?(Qf=y%IZ z(6hk}OC89?NsTA|8;;)x{k1PHkWx_vjDOHXcycjH4s-ALgVzEfKPm`xf3V@K6HPw! zKuI^FOoJqt!{dsY)LKPKlR>x8oePfJ%@XpUfBP0>)xco|l(rhMqe6-lpdZ88Tci~6 z-PVY)hEF03x!Yhu4TW#|D7+#Pf_cSO*W+29?F-UP6YcqnjO3cmgpQz<cT+=c9di%hBXKU3cjO;m+V zx_J)jAPx37v*S4#>ST$12TPMJnmzKQGK3-1)E41Fgz?-|K`~rMb!m5Bs7o7-EcRNA zBnya@JqQ2E1!5p~@+tWA0lM#+;#G=cupqcOx1Jx4k{kjIsx0Q&7gcd!n6;3-q1#he zIjcb$(=i2x zifBJb&Za;HXeSb}j;oi*RX76CEtE8vuH^6uQmC!AE|bB46goO5s1Re_i3lz*E8||7 z1m>WS18=1ywHR*@CxJ(R>8LG%nE``R`;oS6@qxoo7ET%l*~xQN%IIS2Q@WBYVMoy* z?5kWw2CmmvQ}^89ZWcn!;!X*0K?HjF+&)bj47-;oU@21?!2UDJkSo|n_p!{ARBv!c zE8FAM&fPJGge(hZf_ZLOAe@v9kgt}L-ZoF{8K9E!beda4$;<>D##03)t_6?o#Qh{5 z2MX_~hv+>0M;AIUS})ljzD<;P4O**{VT!v=oj8kA*;mbd1J<|t{fA`)&&5d@ z=FFnL!aI1znn!m3G`Z3zg}?B**!!U$1~MXEeuf;xA^|sUFIJBi(8yp7?$s*mWp@<% zYzWZixHe5Wy8{@`RLB3kTw%tS-GwWRp28hG^e2kE2Z5m%Tqyg8^KzIT&?=y7iRPnE zgncV=qXjZynj|Ox(hJ{K!0N(2FE#sd!q2zx%|$; z?tvOXd2|oM>bcs^Cc}HS5M$qKhe&C8w6~3p6K+W1#HJ*=e7LJ~q9rAEb)JsrJOPoF zuY#LQN= z@~yzyTA(Ag4q>w)I^iORG;&8l_Ad~ZhYQDJZK|QT} zcT%DL+ep-L%1wvgtf+>|cXOo)f#REeB=w>w4ESB?h~h72fpf9}lvXfmrfd$DMXSG+h0B+?uGPntaJ`N6%Cfi7>xA{dU|q=y?z`ValPxvy~s?m{FSwx5g=LM zF^^E|J55aWJ-I)CW|LfaVF#$;RBsXp>tYbqMJ?JXNY436TJw8`Ig%1e~EM zGfb&L)p-(Hnv2b%acQ>9(^xo^Mst_yj97`8&MlV+84p*HbAJu=-e(abwz8cgtSOPJ z5Rkp)uo5koyNB$v<`cuSy#XD{*_@)=5==H^x@eCYDq^oBF<<9BZ4T~-_}Gd#)X$@j zh(k4)+vHRj=1IF=6xQ$~vKV30lT<_{N-FzYF}&nHZ5$Nk z5@HZB0X{vl-*2I_p&1d{^$vi?5V@hDF>Y8lpuCl<*=&{b~1P`Jqj}0d$ zAxudwv2vyK3=gQ8Giw4UCpM_I1t1t2o>7$htR?}Tr8xLKv`91-5}QY8uS0qTrl{;Q z+S3L2MghapM8r5aTZC}bL@^MJdxIEa;ZB^v(B}zss?aL?kJ>hB+q+c@sRg5F!DQ+X zeGDs6?bs_YpyoD?!?S}=sToJHZ!~AbxO=t;86iISt8c=VGbn>9>LFS+1{gsKk*F!) z%#D4Tqrv*%NFz2Q-5N#U0 zbH|0q(G(a3ui3$K@{1M>?bwNfVuqr0n`wpEFdSoW3UDPh4G!(xi9i+VteIe$vpRZVfH#aG{|5qbhWvsom-K}tL=uJy zER>4QC{OB5k%Q?}ESOcg`ej0z`&@;z$Rc$zdQ_nc2SfJr zvnU=lfWiV#)njH)!3m5yG6(0z7`QDPAr`h^*LqygYm=KOZp=)*s~I;(YIO>YbX&K~ z*C~*MiqIib*P#_ivXVF(2<~UF3O~wXVPQP}aou)A!PZ7$4$EI;A=9-7+0wh0BZ+zV zxDPj31==I{pSN`q{&P>pnXnU4VCLR{ix4m1)SZyX=g;zymBg^itIS+<0u5MP0EoCw}8+s9PBO$jW$VB7?|Hb@p|J56)j_ zaacq0&dVvQ5e!T_1p|+9y2x%nIS*%MQ&8xIH1(=mYMJ?AomxPj6Rr@9Ay<<|E%x7K zG3DfXFGI1K%HIn`mWqnCZ8YZNr=ao=@M#7E1~Gl1$mbuH{;26DMx$GF3c8;by6CPU zvq=@avQfIxx>a_?bT7wzq#To@6WLbe(uySw;CCPp#ZemqUp)Y0oQOVdazWT`#5N}z zK@-D>o=aeJOxHp1#Se1eQAk{)WS9~EOx__dgBAq8~Y0G1A3Kx^QEk5 z1j9!c!jg#@+G_RDw*hcp6x+**DE3duTMQ)}WytH*N(#k4uSya(sZf<8xrDg=6SZSZ z*5b2YpmVESb{?Jw&&FBNJK^(OpbVV%Brsof9z(?%hv^NRlrZq3I)_Y3@MHnTKNXXq zdD2N$5oc=zfNCC+sVvqZRyS0m%UcH|GYPuNp(2x@a_3gco6PC-#V&00f_#r|!s|hm zXkTCe&1qzLiRl2yx+vD7k%9-(mCKChArlb3Ou=!i8>^>$^Ck2d^{E8ncB8kic2646 z&xcQ^c~XXe49n36C_rZ5&YmLSNNVOjD4V#{FeDQ9GlW2r!%$w%T~%YvL|`5|tf^G2 zY<4MUWc5sXNS5;$oFY*cFs%N$+Q zo~K1vuh+)xDPT|>X2X(wsp5R!PmmL}aHHl*MK8ADw_ElF{8#&H=@oH~%=R`o`O+^0 z50w*HFxa4oxmT=+CYzTlw6VZu$uqci7wAbYDc!JOw?i6Qupt|3D7ew<9m;voAtpp^ z;KG^7Uq!5F2ghKFGJ7j(h$PI%3ur8{9C0EW*RZk)Nm-wsAp12!c1-pA9H!{OrtunB zVz!TZrjvmpkaT93MKgT2{Y(W%*oJ6R1U#p9YrBBRB&V|ucRxqE;qDrB5lp;QUF0Pe ztBXLQ6x#%NI;~q~__bKb?Ujj3Se;uXON~h?MNc$LrsS$fT~Q{v>(s*s@ciJiPMO9A z#nT7SPIL!^cxkzG99Ri42cHs;c){zVugpg_$4e&VJ@ut4Ap{cUVwrpFY^f9D2DPBW zNXWSg6DXz_!vp59pS)01OEHInGF4$`>n+Z0x7$VaLg{=miunX2%g2{+emtEU8~{{! zM-o@eiM|>QRaAxxcYhRR5W+VW95v=9jNu5gJivE#hP!~V)uFXe93?suBa8p@MM_XH zIhMjLeZ1tr-rA!sx5&=Nw2#?8mrN?MNB`_U8)(KO03Il=!NCr8hXI) zx=@LnPsa4h`T#=ZMhvF)Z$}Ro{lxO*aU^3KsJ&S-LO&r&IOG_GP+1&nfm&h|Q=G#> zD9-b8xWv5m+3X@Q7I>{h@XfA9Ttc8Q%K(PMT>erV%Ji7H z3)I=M?j!@Xgr7OQBkHUs>vtN9j z!q~SWc#0qxCI2oV>$P4Esa~`jIQVDiK;mN7svIW$N*r=-`)U7O>xe7ql1{^gJPlWP z$8}U4s$Q=%KJ*8+CIr-nW^mfGe`GucoM9qk;=q{3olOE8>{BdBn+Y84HAlmO>~By_vv|)(LHqH_l)}`b zfN~>?S!UPIv7ph!q9(Adf>w)G^8!^RNr4T^%WZe!)Ex8vDQbaTrBb~%35i{Y*ia!FonDFEU`?8uqTu3JD7YN@X^fHTT?d%eX-`_9 z<8NejLg^Gs6n#?)Nb0gr?L1Idc4%}G%%u4}Dzu6m1L#pHG&f6YF{M!lr8HhBo~5+U z;}%_6-gLH9BP+vCk3~O!DtR#ooNzSHue}3>@4ZauAVvhg4?ROozxk?)kp0&WGT>o? zL_5!suv9_zOyods5Q&bH5>9wcz1Ww2RN>+Cl)xAVwS{wet6BDW)B{Z}CIcPBS7gdt zq_quBJMe6~O-O~acT>mZ%@rNzXcjca)e0lmDOPE~Y+AWfiO)_4)vh9RGIZ1dr(xCW zSgP!~#x6-{4)L%;sjL&pzCgtd9yf7=KKnoA`5cNGJX!iJeSP**3XB#*F?&Uez_4=l zL_M8XVCeHFWMT)kX}VE8+=Q2$u~xuKl}j2Kb0Esgli7x0hX>holE6+I zZ%#fj%L)Au=eR>;fzw5`zzb_#Dzj%!He@T>1i4r*3Zc$e`jzUIvMk?+U;{iioL^R) zw-vrfpNWES+yrN68pvE7-Sj!h*QX;aT*mah&wBTe;_h zODvdkIrY4~geL~oTeq+yLnb{sDK(hKr~k-ekh4C00v`)OENue}G7t;Buj9IC`A16_ zL;-FuILQ8yeU3vj9??aoBf4{Z>rpjRdl!|LEgA)0LMBo)L-hqF9ykSh#@xBa_R z1`Of(fe6Nf!-J>c@xmzHIfcP=SA+*k0b2M)9N@>D5NLT$e|!|Fsk9LJkucB*y|M&$h%Ui5g6h39Tm(8rLd>tO-d z8{dl&_HJQfrfdXOl~I#sJh))tVEn?{4*^whR(KetS%uuCrJhY~e>TwGhW~k6FTsCC z?KdIEuFe%!#IkmPO*F1t)Aj+BTgm8r5|2U5F#c15{&JQsZ-By*2WJQP3OY<`;NA5528%$IJ;V`!%+pbPPPwVqQRsR) z1k$RZ^zQB}K@|8N5qZ7GA;%{*ZxW-|CeCA(eZmyQS9d*WB4#wENj#w)Y+B)|*yXAg zC_3K9TAi=%vwuO?C+F+8#Q{vU2Z7c+!k5c$Y*O9F)sX44uEfkE{&fb>{!KVC5rf0$X0o3volT2GcI4Omrp zlFrh@ET1)L!KQ0HS?+YeiZgX;j<>>LPlZpAQniz%>75=*D-;-HoWmC6T5p(_Yc;W` ziiaKnopYQFG@jNz1T@ys#lcbgz0^!x?R+Et2NJjPf8qN-p`cbGn!QuTm%&is9v&%% zo&6fSLIK!1-1eVmJaA<_SOhHjN$)2$w~UpQdsR2O3E82N@? z%|?`x*k_$wP1`-h?lfS(jabVpTTNQ9X@@6EwE;7WV7@LV8c;=g4?4Nx89%-KCPmdky><=_%3SX@X~FpW{JE|(DJqwG zt#DQR9_FerX~Fn@f36Emipphb{5W$Jn6zO04u7uPX<8O4m(ibI=K6t2Q)l*jr2AEs zBBob2s9bB6kZYquQyzo4HK236Jze?;OwGc}#jI z9F1cf!8w#4+k}iD?(mC-&fndipUxBfp%eB@vF_0Sx;&bC1n6 ze$1~qDQeBg@fq%8zK=MmagHk`x8f2p zPg&tZl+W5ALkT>a!v$j1m_YIN=pS%9oIEO-jVcYW$bRMCQWT%^7x`l+#b4xb;x0GIpkoxhhl|=+Qto zlljm2bD!(aZS2im%>56n&*`53us_$YO^RO)4>4DdN^`6Y7USS&<75Zt^{ZbM3`PSm z50PiYr|J!Gc%rL_bBT-hi3^Q^l|hOR3BK8V4d*!+{|`SuYaD)%JARyO@ZDva`EU7= zFE%M;9*?=jUnYK$fd=Ea4;pAN ze#DReVUwcpBk{Kpzso>_@o)R_8%&DApBmpx{3-(t#-H%x&o?Owe`b6)@goKrj6dne zA7@e&eo6e}#P1*H$nz;b{*O(H!Y_*-B7V1l1~Jw5b2RR?2PcFA`AWNi91Obn?DlP)(r!tEYf(lH{kS;ApqGvHi z-#J%i=5C{5B(INnAzg7Hcmi$dI}C1N(EgygUj7`!`(d^Npoi`g$J|n z{qJR2h)Ny_JRdl+KgdZvUT-2?Bx=1(WV*-%o>}7wdm*eU@SJe0z?;`@hi_w6Y#%ld z1R919K7>4e2&rUtu>gsd2yfXo)J@ofr3i=+b(93h%s4_Xd_R3SFq>MW-m{sw2{-zk zkBCPmZuH!8OB*6OCRrXs@Z93bR6e0=l6%w}7yZ<33C4OX{@*T*sqPphbsY052`zpmR zTa`p`JR1XjtO7xJy^x`4Kpvv7{up%!sar}L9>RQ4p4gRGORgB4sNIFYV2n*gugs>f zU}`ZnZv4*3{rr_TLgVeGEO%I#)67cPf{F^hjJkock;27JedW<(Zgh1Z!mNtW9U>2s zU9Lo`@~=maX#CFF%o}*2mRroCD|dpkD~_6m2il~wj+Sq7dN;fFu$Vb- z>z;=Xyr{hkr` zi4pgE{rAvl;Zy$#(_{a}Brqm{F$s)Gz~UpV@;!wtrs0^aZ_f)@ADtbrp2F+>TIU3; z%Wn%#QTfq9pih%X_ z+XI$?pOj$~zzXE$Qy0D02dv-XYd(YrHmUno{7&j{(+tko@0bL}Brqm{F$s)GU`zsI z5*U-fm;}ZoFeZU935-eL|1T2QQs2>0v$=j&tu=jGNBOk684=5htzKOoNp@^1kF?j+ z*4IT6ja%wllZly;w#K&lNJ;0k&PYe1CXwujOjC)G=K6*NZm_Z7%z%|Q!3tod*s==p z^78_LGXq5dO!7UD33=yQ0fY^#3D^zHG;4gpuKYY}_*4nu%kZ(*S6;K;nubF8XMw+I zi0#K~>n>}nZS?WKyz1t}x3{)O zw$!w>HMVSyY^mSU+P)3-aMD{^BaN50M%wE)H@3EPL~6FyG&a|4YW9)<51`-NS{rFV z;zWyl)z-9Jl2Fi^M13Tl+!SeSe|Kb4vZ0~A9W_?zH*Hb*n5;#rF-}getM907Z){7n zw(HESkP!BykWjp)Ba&!sMV(rwIiBwj>~rWLqMV zY~SRjcO*A$X-pUnnY1Fg2~9BzHN_taWph~T)>KC7>bEx5)<>q5ly;W$AFv|OtQqn< z8p4cGv*|o_m!YMn@jq0PW#9^bXhrbZ0Of?z;c*_o>*_ZpH+!{UVkB~v!GbnWH?L~h zTGQNE7xA#+iY_w!>UAquMyjs4>gu(z)iZz|nSQ|q7tBCgMItNfTQ(=+5#MKVWZIm% zX&n=hyxeJ;wcF4`g1MXtt}0Wo0IJ|2~pKZ1VymkWKdeg$HK_+ zHO{i;nvRb0HOWot0_-GOYg?O13-v*p>VGUV5~-?hzszlnTIQ`6kwhX(lXZ=)Mjs?a zWm(p`WlOT9u~u{GNm-GE%DSzlx$cN~P^#Lcv=L-Q#uQISM`R5;2n^Z?4Dt${9R;ey z?k!_o%S|nH*#M*_Y|H%XOYjd`O#rfg*;fU~;30etza?nyXnwzbs8Jrw{g7Y75C zA@2DtpVl_f!Z76lnM+9$C&xgXUo?8z`iYhvq#dxjz~D5|O0?IsbYO6=ZfLIAY}72G z^EruXc-Q%*yb(#&%`(;q$(q_kvZh%>oH8Y;qdt*rt8SCgz)3-As2g}}PgFOw*KE;4 zk)%tm7U@UTtqnS-VpEbDsf7L(K|V@jT!OXG>H1DDm}$aBZR?h{=6aY2 z-$#;QCuYsMyklF(<;{&P$=I_GcqxilDXCHqUM}(J@S=N6qvaD|8 z{YI^2y#So`$p1X@J^;MO_E^?bJQ+6!-zdIU<9h?XTkze5?}zZcAKyptJ&f=7@qH2B zm+<{FzMpXlf!?zsYx8i#pzFY83;d>{(tYw~+k7tn!u!VU%LK73LiPmXW*gD-h z!z#3jtV!0H)>&4u^#m1g-TIT81o8Yp!cW@#+cbpb84LH?}EsY7esjX?Q6$oP} z3KFlcy{URrO-tR)jdh8*f;HDPZW#${ZE2~mRaENg8Gh)%0PS#4*Vw@*giMMt*4NiN zDRN_&!HmD!T*qsx>l$?qgen6o4(FkcrSY)dLv1(3^ zwq&B(NZ}+F9YA|)Yob~Q2|%j3zNQ20`Xrzt3=Z973mgN*7@KSCGbVvC35-c#OafyP z7?Z%51jZyVCV?>tj7eZj0{_<%nAz)+sQaa5ZS>r`DeCF~((c9gAimxB9>=#I-ywWM z$XkqW1mBtXn$Q0uMwUnj@A3me_Il*9XGYNG|#H~s_Xth|IL9Nkhw(3E-#cHsy#nD;@gZIZGzQ;w1~A<@U{qF z*J6)Az~O;8IzWNEwE?#gIaSDD9Vk{JFH3I+mZ9DVY<0&xEUjJW&cVI}m+rL!@9@wo zwdPo}thv@@pnEN9!A}WxGXz8q3BhkcZJIqbOoBJ;?AILN#p~7uz+Va6&4NkZ+8`5h zve}A*e@poF!y?vfNOhrAhO+0N%o1xJYBN%HUKvHPyCMLYD!Obn@@3kMcd7;a{LKQl z+we8*R)zen7B)Rd3%y#qU4vRsjy2K()R73JL|T-KYPV96m7nHFDVL0p@NxWa@^f$5UWmw#Q7KYPaPMYF#+r+d!Cx#!J& zaqiirnbMDzCg!E){bv5~{EHX-tgK}r2w-x}8UH8dG|in@_V+StVbQ`jEPThpYZo>w zylLUZpkD36xEw>(q+vGV)M_f|Yu@%IWVif0axr?ce!C3lxTUHZ4ux6E5MuYLaS z=I>bWi3NFO;j)z#@2vnr73Wo!b=KUubALBCzx3PlPt5Td&gX>%d(0BmUZd;%jZ|l&tDK)FnPh{3rZJUz2Le9O$%;auxr7`7kqKS zBMV+y@V5o8ESO$aUbdv{hO#YX?PYhA-BEx){cN%^(qH zqF*dJu_$lx`HQD6jxJue`1-|(#oHGjSp4b5pIiLY;ujb9E*@Gu>58+jm~+LISFF4u ze#Q1Hc3<(8E1tgMdsk$yC|Yvvk_(qyzGVKA#Y>hidB>7#mozN7Wl7hPPb~S$l0!?5 zEy*tV{SxZ{VlR-#8%w5^%q_XHhbV2FL(sz_@F1@vMSLxl* ziHY-y=e>E}h4ZG*d;7eadF}IVop<-V=jQ!p-g)z9&Yv^?n)&VXch0|K{wL;tVg5Jg ze}DeV(8-zwTNZRJ_~3#Q3;GreqP3dJ{;ll0Wfv}-v#@gEl?$(1_=$xNF8t=gZ!i4m z!e1=>%fi1eoKs#|zPfxMdCHF!m50!krVQ0^z?ApILP^i5d+9DJy?8oJ}3j4E5o1_^3Gb zE+LUm;C_(P%AoVk!f67nI7Nb=5We|=8_fn1fti11$vt32MlFkY7vRg&{se~r>}jy9 zx!|4<*2I!ME1%a8RZu;k{XU$nfc!hq-CTPBxd7-c<+}kPr!EfP9vJ|eE)HKceYS?E z(w_ljmk;t^fPCHu`3oR_^Fc!3u5FyRtjU0E9q)y_1&}Lowvx+FB_O{(%|K3W_ph98 z;dBh|=U>+D?QXkM#`yuYQ^;EuuW1kXL1m$t{A>WEO5Z6+5|B+k$Q^)CgM~7FE$cx* z_WK~+fOMmN(iXTL?eks0Pd`KB2*Qs62^V@H?EP;&(+l}4Ab<2h0%+P9XL)f>2jpEo z$oYV*DE8u93P`&TG7pe1_#iPr&O;NqZF(ahH)x2GPctAN_Tg*;Rd$!T?e$&Yy!{++y?zErl@D?PkQN70jVH9KH#H_c zV*n*dp_ zA&T-XfIQ@bd;pNcQ@j#;2$0*~Rg20rF7?Qmu|#nf;^#p?nqsr{F?wuD1bF<%6sRq}2zh10*)po9jJ*e0!P~ zvKNqDIQPeGox1?}u!blZegTkPALKDW)?eby^&}wg(GZpE7$8&OrYOqBYN@_VOVW5A z+MShiJ||nPDAN4L%*{G!w2C4VGw*-bR6AY-AospyYc_z58q@P0a)lr@?Qao;z~*v$T)Dh!Urh=gkG7O>y3a!O-)bH z?(_ln8XTc~IdXm62dM<)MIYo^Kq63TS6kwM)cYWvfIQ$pcotJNPNTLR2n$OChuZ7% zOl$mgRKulAYy1-*gnjuHALK)za~2#>H`k{C`Kk{>yBdZ|>f+F@F7`pbj$CUrgtCUl zp{#XqTism6fL!l`Jda!*K1eShzwtr(0lB8sOJ^96#c;J1Wy*)AT0Q7MSo$P*OyBT9 zE&$}sSSND%nG47qA0!6IG9QF*p?(~znr^Ne07>CYG#A46S9dJ-LT&}*CqBr2K$czM z#rY&4jZ3_cF9R|usvt^+PXJP?A=G{aH1&7&2=jv z-5Mv)nYpMwNSkmk#^ZM)hx<9%w%mop(Z_-aQlzW^`;7l%#)9?e=afW#px=+6@9qGH zy`~nYun8Xr&TkEl;#>|$gAY;($TxkEcLMT~57Gk2q*^bBy8xM{A$h2cWqkmU%Y8T>1Ek#t zc@U6WeUPsK@?Ib0Fdz^4AV&fDf)B!(@s~A3l|BH-w|tO^VavMY8gJdF1G3hE7;i^e z09uK@$(9B4?fDps)C(BP$q&rLe{@{W$9Shsn+A$Jsp`^Lq!l2N4^V#KmXmM@m=6w* znwp-%BE1bbsd{f)R0Fc7(Oc6_K>l)*7xF~aHp*C$vA|34%E9LAoiV8dEJizr_bOBnePHJ|J{aXf?foq%?J4{AP@K;Lx4P% zFu6=kRq3qhMli}Ya6kXbnx28UMI`y^HN5~hml_;lV;&%v`yf{Wa-{- zm+Lqn5p)^RA1P}PkfQBg$T??N*2_B##7Iolf)a}rqIW}=-Os#!U*jD zRNq{Kb6dA`9NeQh^l_qa4bKXPJeMHBkNB_RnI+DH#Cl(aAL1+n&R+aV?=kxknd4-eTTo}#dYfaR+v(O~@es2Yb5yP`z;RMg{tZ>LPjO>Wd z|AgnG$SWH4DrJ=jKjix)%9a^-96HvlMnwSLUid>udDP$CzW33Qdazw(xUjJG5=l{qD$ZSx=N3p zRC?T{tV_qFe?;jAU5GBd?RAx2byDe_E@fT%@{y4FLoP&@-u1dl$BWVZ^_th_Qr4v- zz~IN3f82%W(ht0@($}6;`mHWyT{>-pzumbmr6IcX`(9V+%UwFEta;5N%PK7!37OyR zLUic|Usvfjo>clCm$I&V)kw(vh?`57-u=2tU+L1(b%*0=q^e7gj)ctbcOkm;qpz#< zjVG0kL1skhm}L7Q^Jlub^xlJ?19Gap2XVdmz_nTpiFmRFbBm2GWnGJ2Qwz`=`8mmk zkA|b;#z&F)l%s=^D&ms5UV&m7IaK~Jn6Jj+3kVht} zbjDKD!Hp%N37G2%&Xd65hj$8c3=msui-PgFCc6? zmFqG<`hAe4fNJ#P|j0d-5C14xxmV#@(B)<)HR9UyJK(l-IJ(aBX^UDw=P zUCpX{D7OKJAGfUA1QPH-?jpqDr&=G|+2)hR=YZ4Yltqf)0>rH;bMb)B1HN4U$y^T4 zcm*Rf%7-%J3NJpb)pFy@0rVuv#CpdeGN8 zzXy)-B@~B4fE4-Y6rRPBiagpf9T1l6YSer{%-E#pEC*x{a9nAu2E=#{3a0~*h_9^e zfD9rR(-lqzkP;ux-GFraYVk=xTz)7XWS5UCpT~g1kIVCSHN@rc_b1^@HRhyqD~XZIe0Cp-K!d`dEiTQI617QBqeE1b$gue%^Ath?AfCwG;|QE3h?EKpDLlI zqqebeP7+5PGpCUSiQqLxrfqZ@D=+WesjjK3tLAHp+AVp1k-0{;_IkcX7=)ChwzN8k zb@k02JhT$D``yX(NcBqyoSjD z%&U*gz4Ou`(9|%g%Mpm`J8XDVy?*gea z{+BVa45cEH3kYm3d0mpHL{!=-QLahIVb#1JDO#o~>3eBZboP7=^}jgELH55p%0WNr zJxkHqbF6CWqLLvOxY_P{^N$t{TSs1AC77PKGC9(!PT(EaiV%B`yk@dmy;lcv}{811@# z6_^dI@BSbhdz1eG@lC zz`~;2kOC9DHdvcTKpS9+lkH$Zfy8P!FiO@BF~p2v;l0n&sDe4hD0UKw>YIdRb*oAN zP`@-?#vpPBknWV~ee1$<8((N#&1NJDzouMX8w0N8C*u|DyfTeMfQ|x3-pMBAusS?O zUTF%oknFn<=234_ld>9HYZL4@fI>rP?06}S=p!xJyw=tM$WZIaE0P*{@Af1XPda!r zI<|{ZFC0p`9@Vw+nwHHvLBt9RNu-22LSL>MVe6?~Dy6O+FO7rZOQ!>-vK8izGH*$? z8HK6uY)s&NbAsF!-`0V5emASi`&1R?7`5mqLD$=&kfl-%&gS}-`u4_JBTRFv-$^Ib z4b01)>J26rS=113Mq`7eTv+a88=A8o)5!YT#u_x2%I3qWZft-Y2NfzUBUk}eb-Aro7QS3*)Hkrrks|EI5OTWTAKp?p$5p_KT68A>`3o;8LzV1jMN z4h`wo_Z&%kGbV3cS-aM*j-<107>&#kWug~9_Jg2mjtS?UrNokGB$E9)j*VT+uf5tbc0 zJ?pP93oRz~KzYlFbFt2iLhK#woMZ4R?7YL{&mZ=N7;4y7{5RO@>o8_x#+>RyD~2PN zGsP%EX-6wh-JmT7Qpf7Z`6`VIp4RFFei1%cZuU_QEcD_0z4`Z0n+bY_b$Ka0jJKMwva zo~j$XmAA1Ct$xq}(FEz3$PzE4b3C!spam!(2jYf7+ds)`yW6$+D>B&*3{ksTVA!2d z_Q#%g4X;d)cy>@S&tX8RHA>Yhw0)>_8TksA87FG7OIRt2m*``RVGmH{>{b6@1pu&*A%1t8Q0Z z+g+)&XU2h|u`dlWecD&qs39ot+H({I8?(C=lb0Xs>nUaU$TH%HZ`yD3~$+bvPmPS369H z6F(}IPR{|Fph*wurjU{Kt`{4B0?ZJzcf;(M6*Dk}x~~w)!U9*h z8XqX^?x{WnP~luSdN2LHLrCya_ZV7INe$Z!eQ7WGdiKnqn8{-thZ1!r7kN~jGXmM4 He`EX~wy91N From 7d5865df325af485a3e913f66c274f529c87425f Mon Sep 17 00:00:00 2001 From: Aleksey Bragin Date: Thu, 10 Feb 2005 22:08:39 +0000 Subject: [PATCH 173/185] Deleted binaries, added ignore svn path=/trunk/; revision=13490 --- reactos/drivers/usb/cromwell/host/ohci.a | Bin 22522 -> 0 bytes reactos/drivers/usb/cromwell/host/ohci.coff | Bin 968 -> 0 bytes reactos/drivers/usb/cromwell/host/ohci.map | 4524 ----------------- .../usb/cromwell/host/ohci.nostrip.sys | Bin 50449 -> 0 bytes reactos/drivers/usb/cromwell/host/ohci.sym | Bin 2592 -> 0 bytes reactos/drivers/usb/cromwell/host/ohci.sys | Bin 50305 -> 0 bytes 6 files changed, 4524 deletions(-) delete mode 100644 reactos/drivers/usb/cromwell/host/ohci.a delete mode 100644 reactos/drivers/usb/cromwell/host/ohci.coff delete mode 100644 reactos/drivers/usb/cromwell/host/ohci.map delete mode 100644 reactos/drivers/usb/cromwell/host/ohci.nostrip.sys delete mode 100644 reactos/drivers/usb/cromwell/host/ohci.sym delete mode 100644 reactos/drivers/usb/cromwell/host/ohci.sys diff --git a/reactos/drivers/usb/cromwell/host/ohci.a b/reactos/drivers/usb/cromwell/host/ohci.a deleted file mode 100644 index 362d3402fcaf4f3c26dfdfcbe94e53927a6b192d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 22522 zcmeHve{|c$mG4NF9VHP+1Oui7qWppcLU2MF4B?03_}k6Cl7kDFZVRd6A9C!(zmUHQ z&MuDae4RGms9pja&X#w&Te@ZUbbEMxd4+AWJrwLT52w3nYeKfo*=9i$cPk<9qCR|x zma6D|?w$Gmkd>6}A3g8AbDoYR-?=k$=gyrwckbNzerM^O&GFWbyBFLNF8!=qSG)1H z+itsk-N(b>TF!F+hQqh7U#}|cSRjPBS%``^F8P=r@jw;Hrn0WmgtH_ zV*{Ofw6~+RGuqMG7VX3T)~;A{Pohs)CG_SNl%t%^wtf+9jrVpx7VGMYw)Xb4ckXl{ z;xRqGx2w0g&4r_6OLNa|7plIqw_o4e7ZcHemfnGAyt!LMA8Q5|-M=sDojsubSiHHf zFBTWkj^>^=bf`1_DBA1nX^rmcY;W(3A<@5rNTR0%yECS%%I-qMT4!@t=O05HsM_D!5#wPY z9(ofxBUw1@y>UpqyRR#zclP!$o`yt?B9XCi?VUYs(f+PpiHXM^O~m?j>MxgQkH@(4 ziuCSSl*YQbRgbnNi2vr!9w~un7rMlyYytHox|Q6(D~iWsJt%>0Dr`?I)`qd%9V3!b zXiD6mtkQkWaSZtHMT;7EFti@1VWduwQr`@vUfV0@x0=tckx)T2)LX59%>F<}Ai~kN&xp*nTagPwbb)c!}EkpGP{+i5R7&HE)=1)d^ z#`xBxFtvg)SSTh!#!R4?@TWJTpm8FUT|;GtYrRONJO{@0#YwHOQlx?fz@gIm*=gkc z;QJsA{N(U+Xc~Wl6V(-f@Yzn;#*8o7gvJ9CDQ`tR+JDe#{}O8a?~BEval)5fKd13! z)Of0pDx&c#FGM2yhQ-1I#>@)THnrKLHhc31@Na7QNo|IhnAFn5822=v{?&)nSZHMt zC=@paXM_7tHE$fF9tb@!sils9q0CvXn!>NhoWhT){{sS1A4Xk(uORw`cBtyB!jr8+ z@>LWVoSnBX062ogn3gVri5!YRI=M~S>|k3lkt-(h={J}eusuDdO^<|ySc0n4LcdFq zGzN23LsuoY2a-*JWm?_#gd&~o$8>4|(rq}|lsN167d_WsHu#P1n5#^)XMwohvB z6JLdiv|lRSyfN+lcEj&sTtMRHOI#>h&Dez{CH;zQyIEhMnBN5UFic=xvU{+8o-vr8 zx9?gcgWuuC4%SmWW`05O)%y9xEI36E{Y6WwSupo1!9c|}AV1j@N^Yx8ZeNVHi(@5v0wRMoRoBP453VrUV{ z2pgOEv@9pSM&+(Uxr_!34V=wS${0)`ljag2k6xKs#zk^cT_%MPUXi&1xOQXkeUz*q z&>GxL+D!0?Ux6@6Z>k_0Bv1 zETwY=wn8h5L&YIeODCIZWUX6~uX?zYz>*#YfssA5@r^{R^4CNR3gOVnq9+gotG+QV zjJzlKg(=`Nr}3j27$>l#fo}qH0TG@x2G9ER2k3WbA%4C3B^d)n0s8eN**__l0?h8D zpp`2dyGSOP@9fqKW|F~9LmYC}t+-&BNeCYVFb>lx*w3Uk?J_ZHA@D=|9W@m~?DAl+ zz%Gf1RwAJBK$YsJ`5duVEC{>tajx|E<%C-kdOB`G#(0pcH!F|01s zHX}jl{u(osmFr<(j=V9zC0%@$x_CdY@36(Pi**<5qH#QoZW-fYFy54RQuS~iWVg{P zSGVD|%xxSK7OP9d$5U*pQmlbH9JSe`6^3qN8=g-#91h6kU+9;y5NF91`Jwa<#yk|pW6!QFlZF}U`YIFL-q}b$%r4Fg_Z;+l_~{{fyHBq1)R57sv%x@k zAM`g6M!s7Pfx!;=C}QBc5w+-Yna$VCNh&;WHy2r>IFyzQ7vGMhtQ^%WR#dCezswiCly=E zDpoOih!^zH7wDhNSz|4rW7@1Il(`Or;0$5z172dx@1tyT8x#62IxgDJKe|S`L|ZnD z#qtk-P8kfC3HT$cFq5HOmIh5mYN!t50t#X(hZ)7$Y-S)N5_LR4*e$HVf^3`& znfnPK3be;qLH>bEQhQ{FWl54P%^$Ru`GqWD3{<;VTZK$FYnTEyYXq0FR&B8c5*K4F zT*}&-k7lhpyA3Vb1KlVSa*SZU{pqK9GD5p}@!E?Hk%OGQjy0=ru>MBOPAcbTC&TYd zJ)WVTE}sYFE-wi_@wY6IoNFGWSzL^vc`!|C4O_ev|7kwVkhO+bW?0ve3jjtto&BjQ zh>a7lkQ!@sn!y?jLc*UM%+Z|QP8v^LwKO+5`V8sw>M3*d6s)DTS5e1OmsH%UECMi$G7 zLlZ1Gx=7A8lu`3ELyG}3P1*19_<|zSrK*cFZ%W*6?cSRo-949D&*>h`sNbb~)zm#W zd5|xJ03M-VnEcg3zm2wsD6X|(I&I7j-GmVpS>C97m!(W1Av4%4~XrzLkam)vJ zQC>a3E@jmil70_w3}_5s!e^2VhvA6i4vYs6JO#O9Ehk^gpT7G%X)tBczBN&qnWABX zy{CmBXEr>ENQo+1`@SkVO?&mkwd_6Qh{z5}MD6u6V?=@$lxY$n18~7i@@RmheH1x$ zT24v?C~ThLj^-dL5j=1o>kT9TsbE7wQ~R~Fd3@sM*d9;M4{;Bry+Il3ezIZzz(fjN zNTJ2~S_*3+$<@iNQ@Ksk^P5m6#Y8ciYCH*Suct@+A`FQ@e!0EX`$PS+Z{d3s0nN8?@Uac|Yxh57$62sU7Tw)AXv)@q-f>H$4*qg5*Nov@-fbJD@ zcpEUaGug}MAnSlECe9G~;E{3m7#gXzoq!q?`)b$+H7Aa}zO5y6J~Qz_m3eX^zhw1s zb1K<%7VWN8g8(~|W8G5vCN2SYel|ZC0*_MJN95Lx%V4hi+mplSlR)^Qe!Ydn;z-JF zEy`*^3(+(=_H~S#NYJ)|7eaW0wCl2xq0%IbkkWS0t3hk5&jAEiJWy?@#4Ieca%eYc zixZ2uRG6j(#pe>=5=`b<9XTZk z)CzV-fLwgAeo?Xs0IXk_0rYkiMpPu=Nzxt802~8D!oh-9b?NXLdU@;qgv(_KJUutR7> z5o3H!WBOk3LZKBZhdgI@13Qr1hR6?Q*GzJBKksrj*RThR>0B^JpClAjBDPS~4{p>z z&=!V$Yp50gf4Wk(qBIAcp~6fX{*$zljKExjGVub(3p~^v<`W~DV_*$dWfk~Ah!Hf= zKCLk>6L*d_1!ey4-vxwo{qD>f|7o0sGtM6jp)2^Ha+k{_869 zxYdZHq%!AEnGG+)dgn+T;2ncaBlR0;joK$8RW$kGX0vA;Sp{j*=6go+jN;B>ebN{_ z>Ctbb-yt}iC$YqR0R7K=o_xZ=ldvQ;NCK+Rug*Lw{X?~7dHY@V8H$lQgoA{R4fz?& z#vHW-AOxYEfhijSAJDmd*z{n(HI0GkpmZ@YQ%t02bY5XkEDTdWLg60-OVT5&BruIV z+$-Gwu$(QJD=C^QJ{blgYQ;p_q1A8ELQPo@`(+vPSO+=TQ*o0vy)SGtv`f$u!py8M zApl7Y53H^T9vFZOECb+|1|ZW0oYaH=1xhfjjj*3Z5DM%<3c7cvqWK2fqc9D~zWca_ z?>&~-rOBq$2n@9!!NaL6#wrDS7J}J;*_$$(Qgg_b^whM7O39x>#rH_^0Q~PIwNsG% zoa)p^OXi=HwOw7p$coI9_)!|p(rX|&?Pf3nyU)N@^LX&THzC}8))T_dNSK13wkX-Y zPEVwKo+)E|N3qtG9&3CAlexm%nAFaqpPn51;S;>0!sydj9|A*4xjz4IO1bWIxt%;K z7sK?BkA&LJN|A40(Q9o0R==-z3cNC#vvFBK$v zqvc?=1w0ExO25YgZq07C)D(CIp+k{HypCCYBvz)g*CAFvpUf-IF`~|tR~E6wMn3k6 zQW6#QwdQ6il~PJ$jcw#+NKa~RRtH%@-+?gLLll&Pm^>7AAOfxh1VHXDxen<3Vt5ni z65JcF{wc8LOMH@Qz%sckmiemjuO31Sl%kItKWDUKzLe2f*zo7IX2T1$+*esg%}cA} zd}4v6X6BNiWuROdN5Qy23Ny*-r@14Ii;2Ai)IKykut;Df)F@!B-$R`l@QK97=-32; z!*Dmk)TLHWRcx+}m|JS$7a=Es%#bnRQ~4fbf1(z-%!6=g4V06of*_lTkSe3=KemCl$`q2tgnAcSa8o zL>3TdcK-BdFof)^(r%x+-pOk})_TkgFGVb9-FJ;64uWnVT%?*UJv;~fDnuB0MswWj zMxsydFFOw8Az+@&QWDXdaX)jGd6f5jRt%0DpkyS>ECZV;Xa@W!u$MR zh683y4f=(yfPimP{R)h=Ox^D{8-2-boTKFyVne;zpLq;a;EDJW7|3en1R#hRFv2Oh zx>L{;$<#fTE1^QxS4yvgcHmG$coEom7o1~JW2O!wg4OsCV~S7`%LU^CL9s_Wn!_*# zUui;iKKM#xJvpog#`k`VO3TB@#HB1Cke$tZo2D&!cyNel|BmBL83?j{3U-6J0(=fk zWD+g4mcyK;{}7Xub}l&j8pa!FmiRfG3GzUml>qxJXR!Pl1AdPV7S2HfKrv%-B?u42 zU1B|#lww7jI5l2E>(4ew4rHfD!XEag&J`19Np%x!urZgooq=(!Lio;? zpmQE{lNJ&BXT>?W;_y4X>!P`)!mAi%yK5Oz1@>94VS`Q`ZA^EA3bY!2a%JWmBD)ZP z+-pgVw0EDJbm^q>KV6iT+mx<%4UZfu>F{I6i}~bFZNV$6tm)nUSt|F~K(K4h}M*yE&;kuq@<~ zN!7tF9L_p|;#~BBbeXcSLOeoRa>57mhm!DS{OKNc6#Q94Heg^T($`2CVZk8d!}9~i z18d_%`ZAe?Q;-?5EQ^N!^%WD`wdf+IF*X1xlES1$ z0dEXG{JgDj%owN!^Jy=8#jq7Qjzb`je~ON&GRxr!py!U~J#Gw+Lz3q~29OsvatWx6 z46GsFcOTXJ8>*LuPlHCuKVv3fVaaC~d*_X4Cux(GY&tpd0Rs3b5BdTw5#$7xycpn$ zpq&zl1q^16SVXY@lx}fwblAdy@Cn#qduPg_d0G{YF_r=pruJeIg|@wz+>u0BnKxGdCcHvPyixU4mrP2fcOtbb)cmoe)y`hcZX@n*sOS?Fjn<3k;= zC4)mpA$ER-WHx>JmqZ#0hrr5Nv9~hwGaeEYTn)4GA}6r&TX77mM?YzYh4B+HOrJGC zoF;R;Njtpppshz^s#eIMRJ|P%bn7o>a1v?U7u*6MgNxbB-Go{}PM+8TC z5H=(5F24M6xJ?YWA~4Fp4&Ec=|(LWn>-Lfm!kzi5YGI)l`&S;`m@|C0tDltr~Nd z)RHDijO%SY^E@6K6Bh$vd*i}AU*#leotHAF^CH!Y4U^){wFB5eNcJO>;udTetYpKa zScQm@mE3@^K8({nP#ioQr)ngzqL3j@{~eh!evs%QLUy48PuQm(vOlCkL~^b(f=Rtd z2-XeCaZVbiNA%P&JnROUCd*hn07 z!D@f2R3FvBMv|b%mchM_K-F1{YQLY`hrw_uiV9i0evVl4k)OUDjt^$nj9m<~C5L%w zZdrlmCwaDG!eep9QN=yfuRW5k(q`7&75CWEyMVyb>{UENL`X6@#ScW6!@h#t1>n(` zVs4NSSt=I=PY3m6hg36Er!R=`=_X^^!BY`N+BYO3{5XP8rr>n4YvlZoa z<1!AY5d}*L>$qtcJvkKcZ3FD#7Sc!AL-aQim9JtHL50iWWP!?}Kh_4RKsyV5q6oER zKiw9VDLnWqMFISJrBS*9MX4t5nvHSr;3K;9P!6b&%_OOyIednhtUOI+i*3347ni^4 zKgJzi3pHi!by*1t=}K#dh(>IqZx2HW8yHC0w5obHID$AxG7tVU%bUA`ReB{#0LDW* zj-un3!B2evUTyfC9w;*^Hzmq{{y~D6JY=&k_I#a zyZ(IgDSj~gAH3#a2JpZhb($#V9mzuc`Sj3P7C+=i5vsjcstKNw&s>rg;SmKqh)6O` zMjmHh88acDo+meXh=W|E>O3#&z$mb-sAY6M9r_PeTvtKEE=UV0MYDOVvHh^j2xcGq zD1l1iyJV|?xLcu;1acIS5}X`iP8HyX6oaJh_H%R??v4Yf+EGV8TkxaQiQJ(M)D|80 zx{#a+n@JBFGV@!Az@ZBgz(ao#N#RQ_3g~P{7-X$xIND~jlWqrxj?$*zLvs7~4<9~E z-TO~}ewVU}sP+EDZ)@XuFhfuF(|?=;7N1gS!jTv71$<%l`1@V_pTPG|)wc` zbe zdN3c!*?3rxt|%hFqZ+j_GTxiYmE?xuE)$po2T*Jxm1Yv zR^VAUcrq-Mfuw0 z7QN-y3lZfSyKWHTa}2#;Lw~l~!hILegPgk@quIpJ1Arc4=xsosW+;F$mOWa$7LVgH zt{u=0hOWNF;^0$&q+A}dp@#uIB5T;V-8R%`=MDh+ESG!A&i!*6`m$Z_>o)Gc+0eJ_ z-0uNu0F^3n9MHo|4?l{lRW<}gRk&I}e}r$9*nr>9Fth`|^$fMyP=^h5*-)PiVaZW7 z25jhY8ydEuQ5!mFLtnI^!!~rphQ4G&U$&uVZRj~0`nnB0Z$n3IXdKX1e5=F>8+Xcv z&f3s98%o*Gv<;%f{*W*8WMvhAa$~c?4ww zms=R_S7%q(U)mTd(}OZMTw#?V%pfqID8ZP(blVuB)7IM)tGL=-i=2krp;iuue+A60 z63jP&87{$`0Or2M?pi+vX3e#3%s&GYFTuP6Oh?#V=6zrWOE5lY9Ic)XKUV@nYpH`F zt)!LJ!Q2B3t-lWDK4AW?1oIhSetCntOe-+ogROUJJqFD263iiBXvKHR906wM8aL)E zz>o*vl=%iQtFd-Cn3sVekHNwG2pAu1wS)O3Fyk0WIp6Kqqah>50?=Dw5EyUSq(%ks zufBxN5@22{!Q2hZ8zqe?#6)fSix}9aJ!ZGF$Om=@bCue*Y8= zT+l|j-#z7idFZK!WhHbdv4;rYLv7I)^9C496#hueUzB0~M;Ycs8Rn;Dn74qjK9cf# zWf%`Jt3I;K$I39ZWth!nn8q?pvLk4TU(=gZ!{K<_u`H0cyF)Xk!XoFJ78aLT<_PL z^#tC3r=>4S`4SQ3*O2W>Wu@9;{jKrNKHW{Z#YF}81(0hixd9U`P8+y+059J6wpyi; zCd;pq=o8-4rx)CrBTBY*sXGc_Csj?nkxnnf_x1L6StuB6m6?dQFvVyeUJ(~jydmG& z-w_2?L~$oTXK!0)D_(b}YYI@udI{f^m*}x`shjd8eL;eW>qI7M6`*(K>2iRm-rR|< zM)@Urd0PNj?N79H<0=AfmrJ(AoI(t@b>Ve-+$hi=WBae(!3R?v&0Ts7cMi05H`55} z0IgmyZx}D880+rS_o7&ryFSZ}*o^hyGJu37Si-c?^#C>|*3;J4+u4Jg3Z!qML{4`X zwBw=%RP1O4gQQ{vasQ!IxE(Qj5ApbtC}UazIbm- zY%Wp`w?#uKTwA1;ube2m+oGXmXJZ_iY3G*Sa$(I$?gw3*5%2A{uKeH&AU^8$hmE!C z!}3G7Kgb2;RhUt^hLzv`P>Z}T;`@>`weSphtuMR%L1mZxi@teKrbJngNI4q0gD=)jf(6qChfWxhR|jHIF#lM-HKNNOw0!lO^nH5RRU)i zZY+t6qIj~M$;rw(RnFCpeDfRJ&9k_xQH2zD>X;gD_!TIFN(P_!JRtPNJnlK|IX>ol znsbiPuh3iFOeBYi2|O)DuL1juIE`cDL0d@<6?i7zwk4rH`B{_m0QJli5 z1M`;YL*JM^#MnJ7MC)+IVfOOi6Z@$yj$!VUg4cH=fv1Iu7`{Jf#?SLr{!s^K?% zPZKLeW==6nCmDFJfU4S&f0q>KfkfF~dM^@>bFe*v^o?7KVtKj~-%&o>m)m&!vH<1Qj6ps-7MMC}V3=Ozs{s(bKhG_1i_d>lT!cI_?wd;4!G zSvFk93flem-x0>aKv>>N7VhcQ!|=_QE+EzrIuc=gs|3xkr3`Jr?=pt&#_w{5>hX(! z5z1|~q1}L1FmA+#C|W4XeHqY7&i#&!`xPKrqY6Ed&>c2J2WAp?zYX;QTFO+O0u*NG zD>g)NEQx#BhJI*6|6)V`ZbMgjg}9!nECED*P?Z<~BzdMQbR_hw4ZUDPz6vXsA~dob zU11`j>ul%{AldU*Z0N^;aLfRYD{JF!@>#fgK$6P+Hq-(L!8Y)>(}ubLA>;%qkJ-4# zZQRR%mT?V=5=iJ@0Igsg#Q-GkKWtpl#$5qbljW`fB+HfihI3R5bm;>k{JEHKNSQeJ z!Rtxz=hRn@YF!D2qEj^`81hU`;>(orUx+RE?!;(181h0AB^Wv{3VGdS9tGyc63j3# zg%ZpWU~U6@4&`qELoq7{^Y_3EmtcMj%#jkzG%)!R4EY0_AS8zl-N*EN31%5E-!8$d z2WA7t!l`u+Fb8bP;iK6$YlWv#m>Z~Zu~n&poZeV|pA7jjWq67#32LK;ia z2lpq8Y2>yF?mRaf5x-OPLHZ)c{Q{4i94=osoSwG28X-$UAGUCqPjf%z7A`Qih;a9X YCg6qQ1?3j5jEulhoQRfQ4Z7fe19ja>n*aa+ diff --git a/reactos/drivers/usb/cromwell/host/ohci.coff b/reactos/drivers/usb/cromwell/host/ohci.coff deleted file mode 100644 index 678fc013e550e1b9e43d9feaf345e8e9fa9e1d2f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 968 zcmaKrPfHt76va=PDQ$Kxq}5#tt^`9&r=TLJ)rx{R;-A4?No|Y+<0MSdg1df(eu^%o z`$E5wTUVvOdnaS3vGj%a=iWK@yz|a`IjGfS?R#A+Rza1p z`pKlPFYdQ&w(Jb!ob<(_YToeef8-m1w8yt|`s{?8CF_te)`{LTzSA+QeMLGX-e=rp zZS6;J_sjOJYtiG9V#6aT;P+&*E~l|4PBd1oM49@qB}&zUIn$*E0FNBgR*33VdZ-Vk zA06}TwhiW5Lv_L5pr%XIbNXZEt}ft?P~6lG@n?EU#n4e1-dcmT`1dE9~3B)3)BAecHFG zKWl!DXu@kZW|~UBEGpbDwYBi?hHkC6uOn&)`lwHSGyl75!hfkXfR diff --git a/reactos/drivers/usb/cromwell/host/ohci.map b/reactos/drivers/usb/cromwell/host/ohci.map deleted file mode 100644 index 05acb2430c0..00000000000 --- a/reactos/drivers/usb/cromwell/host/ohci.map +++ /dev/null @@ -1,4524 +0,0 @@ - -ohci.nostrip.sys: file format pei-i386 - -Disassembly of section .text: - -00011000 <__end__>: - 11000: 55 push %ebp - 11001: 89 e5 mov %esp,%ebp - 11003: 83 ec 08 sub $0x8,%esp - 11006: 8b 45 08 mov 0x8(%ebp),%eax - 11009: 8b 40 04 mov 0x4(%eax),%eax - 1100c: 83 c0 48 add $0x48,%eax - 1100f: 8b 00 mov (%eax),%eax - 11011: 89 45 fc mov %eax,0xfffffffc(%ebp) - 11014: 83 7d fc ff cmpl $0xffffffff,0xfffffffc(%ebp) - 11018: 75 10 jne 1102a <__end__+0x2a> - 1101a: 83 ec 0c sub $0xc,%esp - 1101d: ff 75 08 pushl 0x8(%ebp) - 11020: e8 36 00 00 00 call 1105b <_disable> - 11025: 83 c4 10 add $0x10,%esp - 11028: eb 2c jmp 11056 <__end__+0x56> - 1102a: 8b 45 08 mov 0x8(%ebp),%eax - 1102d: 8b 80 30 02 00 00 mov 0x230(%eax),%eax - 11033: 83 e0 01 and $0x1,%eax - 11036: 85 c0 test %eax,%eax - 11038: 74 1c je 11056 <__end__+0x56> - 1103a: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 1103d: 25 00 e0 0f fc and $0xfc0fe000,%eax - 11042: 85 c0 test %eax,%eax - 11044: 74 10 je 11056 <__end__+0x56> - 11046: 8b 45 08 mov 0x8(%ebp),%eax - 11049: 8b 40 04 mov 0x4(%eax),%eax - 1104c: 83 c0 48 add $0x48,%eax - 1104f: 8b 00 mov (%eax),%eax - 11051: 89 45 fc mov %eax,0xfffffffc(%ebp) - 11054: eb e4 jmp 1103a <__end__+0x3a> - 11056: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 11059: c9 leave - 1105a: c3 ret - -0001105b <_disable>: - 1105b: 55 push %ebp - 1105c: 89 e5 mov %esp,%ebp - 1105e: 8b 45 08 mov 0x8(%ebp),%eax - 11061: c7 80 a4 01 00 00 01 movl $0x1,0x1a4(%eax) - 11068: 00 00 00 - 1106b: 8b 45 08 mov 0x8(%ebp),%eax - 1106e: c7 80 14 03 00 00 00 movl $0x0,0x314(%eax) - 11075: 00 00 00 - 11078: 5d pop %ebp - 11079: c3 ret - -0001107a <_roothub_portstatus>: - 1107a: 55 push %ebp - 1107b: 89 e5 mov %esp,%ebp - 1107d: 83 ec 04 sub $0x4,%esp - 11080: 8b 55 08 mov 0x8(%ebp),%edx - 11083: 8b 45 0c mov 0xc(%ebp),%eax - 11086: c1 e0 02 shl $0x2,%eax - 11089: 03 42 04 add 0x4(%edx),%eax - 1108c: 83 c0 54 add $0x54,%eax - 1108f: 8b 00 mov (%eax),%eax - 11091: 89 45 fc mov %eax,0xfffffffc(%ebp) - 11094: 83 7d fc ff cmpl $0xffffffff,0xfffffffc(%ebp) - 11098: 75 0d jne 110a7 <_roothub_portstatus+0x2d> - 1109a: ff 75 08 pushl 0x8(%ebp) - 1109d: e8 b9 ff ff ff call 1105b <_disable> - 110a2: 83 c4 04 add $0x4,%esp - 110a5: eb 32 jmp 110d9 <_roothub_portstatus+0x5f> - 110a7: 8b 45 08 mov 0x8(%ebp),%eax - 110aa: 8b 80 30 02 00 00 mov 0x230(%eax),%eax - 110b0: 83 e0 01 and $0x1,%eax - 110b3: 85 c0 test %eax,%eax - 110b5: 74 22 je 110d9 <_roothub_portstatus+0x5f> - 110b7: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 110ba: 25 e0 fc e0 ff and $0xffe0fce0,%eax - 110bf: 85 c0 test %eax,%eax - 110c1: 74 16 je 110d9 <_roothub_portstatus+0x5f> - 110c3: 8b 55 08 mov 0x8(%ebp),%edx - 110c6: 8b 45 0c mov 0xc(%ebp),%eax - 110c9: c1 e0 02 shl $0x2,%eax - 110cc: 03 42 04 add 0x4(%edx),%eax - 110cf: 83 c0 54 add $0x54,%eax - 110d2: 8b 00 mov (%eax),%eax - 110d4: 89 45 fc mov %eax,0xfffffffc(%ebp) - 110d7: eb de jmp 110b7 <_roothub_portstatus+0x3d> - 110d9: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 110dc: c9 leave - 110dd: c3 ret - -000110de <_ohci_hub_status_data>: - 110de: 55 push %ebp - 110df: 89 e5 mov %esp,%ebp - 110e1: 53 push %ebx - 110e2: 83 ec 24 sub $0x24,%esp - 110e5: 8b 45 08 mov 0x8(%ebp),%eax - 110e8: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 110eb: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 110ee: 2d 34 02 00 00 sub $0x234,%eax - 110f3: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 110f6: c7 45 ec 00 00 00 00 movl $0x0,0xffffffec(%ebp) - 110fd: c7 45 e8 01 00 00 00 movl $0x1,0xffffffe8(%ebp) - 11104: 83 ec 0c sub $0xc,%esp - 11107: ff 75 f8 pushl 0xfffffff8(%ebp) - 1110a: e8 f1 fe ff ff call 11000 <__end__> - 1110f: 83 c4 10 add $0x10,%esp - 11112: 25 ff 00 00 00 and $0xff,%eax - 11117: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 1111a: 83 7d f4 0f cmpl $0xf,0xfffffff4(%ebp) - 1111e: 7e 24 jle 11144 <_ohci_hub_status_data+0x66> - 11120: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 11123: 83 b8 a4 01 00 00 00 cmpl $0x0,0x1a4(%eax) - 1112a: 74 0c je 11138 <_ohci_hub_status_data+0x5a> - 1112c: c7 45 e0 94 ff ff ff movl $0xffffff94,0xffffffe0(%ebp) - 11133: e9 d8 00 00 00 jmp 11210 <_ohci_hub_status_data+0x132> - 11138: c7 45 e0 00 00 00 00 movl $0x0,0xffffffe0(%ebp) - 1113f: e9 cc 00 00 00 jmp 11210 <_ohci_hub_status_data+0x132> - 11144: 83 ec 0c sub $0xc,%esp - 11147: ff 75 f8 pushl 0xfffffff8(%ebp) - 1114a: e8 c9 00 00 00 call 11218 <_roothub_status> - 1114f: 83 c4 10 add $0x10,%esp - 11152: 25 00 00 03 00 and $0x30000,%eax - 11157: 85 c0 test %eax,%eax - 11159: 74 0f je 1116a <_ohci_hub_status_data+0x8c> - 1115b: 8b 45 0c mov 0xc(%ebp),%eax - 1115e: c7 45 ec 01 00 00 00 movl $0x1,0xffffffec(%ebp) - 11165: c6 00 01 movb $0x1,(%eax) - 11168: eb 06 jmp 11170 <_ohci_hub_status_data+0x92> - 1116a: 8b 45 0c mov 0xc(%ebp),%eax - 1116d: c6 00 00 movb $0x0,(%eax) - 11170: 83 7d f4 07 cmpl $0x7,0xfffffff4(%ebp) - 11174: 7e 0c jle 11182 <_ohci_hub_status_data+0xa4> - 11176: 8b 45 0c mov 0xc(%ebp),%eax - 11179: 40 inc %eax - 1117a: c6 00 00 movb $0x0,(%eax) - 1117d: 8d 45 e8 lea 0xffffffe8(%ebp),%eax - 11180: ff 00 incl (%eax) - 11182: c7 45 f0 00 00 00 00 movl $0x0,0xfffffff0(%ebp) - 11189: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 1118c: 3b 45 f4 cmp 0xfffffff4(%ebp),%eax - 1118f: 7d 64 jge 111f5 <_ohci_hub_status_data+0x117> - 11191: ff 75 f0 pushl 0xfffffff0(%ebp) - 11194: ff 75 f8 pushl 0xfffffff8(%ebp) - 11197: e8 de fe ff ff call 1107a <_roothub_portstatus> - 1119c: 83 c4 08 add $0x8,%esp - 1119f: 89 45 e4 mov %eax,0xffffffe4(%ebp) - 111a2: 8d 45 e4 lea 0xffffffe4(%ebp),%eax - 111a5: 81 20 00 00 1f 00 andl $0x1f0000,(%eax) - 111ab: 83 7d e4 00 cmpl $0x0,0xffffffe4(%ebp) - 111af: 74 3d je 111ee <_ohci_hub_status_data+0x110> - 111b1: c7 45 ec 01 00 00 00 movl $0x1,0xffffffec(%ebp) - 111b8: 83 7d f0 06 cmpl $0x6,0xfffffff0(%ebp) - 111bc: 7f 17 jg 111d5 <_ohci_hub_status_data+0xf7> - 111be: 8b 5d 0c mov 0xc(%ebp),%ebx - 111c1: 8b 55 0c mov 0xc(%ebp),%edx - 111c4: 8b 4d f0 mov 0xfffffff0(%ebp),%ecx - 111c7: 41 inc %ecx - 111c8: b8 01 00 00 00 mov $0x1,%eax - 111cd: d3 e0 shl %cl,%eax - 111cf: 0a 02 or (%edx),%al - 111d1: 88 03 mov %al,(%ebx) - 111d3: eb 19 jmp 111ee <_ohci_hub_status_data+0x110> - 111d5: 8b 5d 0c mov 0xc(%ebp),%ebx - 111d8: 43 inc %ebx - 111d9: 8b 55 0c mov 0xc(%ebp),%edx - 111dc: 42 inc %edx - 111dd: 8b 4d f0 mov 0xfffffff0(%ebp),%ecx - 111e0: 83 e9 07 sub $0x7,%ecx - 111e3: b8 01 00 00 00 mov $0x1,%eax - 111e8: d3 e0 shl %cl,%eax - 111ea: 0a 02 or (%edx),%al - 111ec: 88 03 mov %al,(%ebx) - 111ee: 8d 45 f0 lea 0xfffffff0(%ebp),%eax - 111f1: ff 00 incl (%eax) - 111f3: eb 94 jmp 11189 <_ohci_hub_status_data+0xab> - 111f5: 83 7d ec 00 cmpl $0x0,0xffffffec(%ebp) - 111f9: 74 08 je 11203 <_ohci_hub_status_data+0x125> - 111fb: 8b 45 e8 mov 0xffffffe8(%ebp),%eax - 111fe: 89 45 dc mov %eax,0xffffffdc(%ebp) - 11201: eb 07 jmp 1120a <_ohci_hub_status_data+0x12c> - 11203: c7 45 dc 00 00 00 00 movl $0x0,0xffffffdc(%ebp) - 1120a: 8b 45 dc mov 0xffffffdc(%ebp),%eax - 1120d: 89 45 e0 mov %eax,0xffffffe0(%ebp) - 11210: 8b 45 e0 mov 0xffffffe0(%ebp),%eax - 11213: 8b 5d fc mov 0xfffffffc(%ebp),%ebx - 11216: c9 leave - 11217: c3 ret - -00011218 <_roothub_status>: - 11218: 55 push %ebp - 11219: 89 e5 mov %esp,%ebp - 1121b: 8b 45 08 mov 0x8(%ebp),%eax - 1121e: 8b 40 04 mov 0x4(%eax),%eax - 11221: 83 c0 50 add $0x50,%eax - 11224: 8b 00 mov (%eax),%eax - 11226: 5d pop %ebp - 11227: c3 ret - -00011228 <_ohci_hub_descriptor>: - 11228: 55 push %ebp - 11229: 89 e5 mov %esp,%ebp - 1122b: 83 ec 18 sub $0x18,%esp - 1122e: 83 ec 0c sub $0xc,%esp - 11231: ff 75 08 pushl 0x8(%ebp) - 11234: e8 c7 fd ff ff call 11000 <__end__> - 11239: 83 c4 10 add $0x10,%esp - 1123c: 89 45 fc mov %eax,0xfffffffc(%ebp) - 1123f: 0f b6 45 fc movzbl 0xfffffffc(%ebp),%eax - 11243: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 11246: 8b 45 0c mov 0xc(%ebp),%eax - 11249: c6 40 01 29 movb $0x29,0x1(%eax) - 1124d: 8b 55 0c mov 0xc(%ebp),%edx - 11250: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 11253: 25 00 00 00 ff and $0xff000000,%eax - 11258: c1 e8 18 shr $0x18,%eax - 1125b: 88 42 05 mov %al,0x5(%edx) - 1125e: 8b 45 0c mov 0xc(%ebp),%eax - 11261: c6 40 06 00 movb $0x0,0x6(%eax) - 11265: 8b 55 0c mov 0xc(%ebp),%edx - 11268: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 1126b: 88 42 02 mov %al,0x2(%edx) - 1126e: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 11271: 89 45 f0 mov %eax,0xfffffff0(%ebp) - 11274: 83 7d f0 00 cmpl $0x0,0xfffffff0(%ebp) - 11278: 79 04 jns 1127e <_ohci_hub_descriptor+0x56> - 1127a: 83 45 f0 07 addl $0x7,0xfffffff0(%ebp) - 1127e: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 11281: c1 f8 03 sar $0x3,%eax - 11284: 40 inc %eax - 11285: 66 89 45 f6 mov %ax,0xfffffff6(%ebp) - 11289: 8b 55 0c mov 0xc(%ebp),%edx - 1128c: 66 8b 45 f6 mov 0xfffffff6(%ebp),%ax - 11290: 25 ff ff 00 00 and $0xffff,%eax - 11295: 01 c0 add %eax,%eax - 11297: 83 c0 07 add $0x7,%eax - 1129a: 88 02 mov %al,(%edx) - 1129c: 66 c7 45 f6 00 00 movw $0x0,0xfffffff6(%ebp) - 112a2: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 112a5: c1 e8 08 shr $0x8,%eax - 112a8: 83 e0 01 and $0x1,%eax - 112ab: 85 c0 test %eax,%eax - 112ad: 74 07 je 112b6 <_ohci_hub_descriptor+0x8e> - 112af: 8d 45 f6 lea 0xfffffff6(%ebp),%eax - 112b2: 66 83 08 01 orw $0x1,(%eax) - 112b6: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 112b9: c1 e8 0c shr $0xc,%eax - 112bc: 83 e0 01 and $0x1,%eax - 112bf: 85 c0 test %eax,%eax - 112c1: 74 09 je 112cc <_ohci_hub_descriptor+0xa4> - 112c3: 8d 45 f6 lea 0xfffffff6(%ebp),%eax - 112c6: 66 83 08 10 orw $0x10,(%eax) - 112ca: eb 14 jmp 112e0 <_ohci_hub_descriptor+0xb8> - 112cc: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 112cf: c1 e8 0b shr $0xb,%eax - 112d2: 83 e0 01 and $0x1,%eax - 112d5: 85 c0 test %eax,%eax - 112d7: 74 07 je 112e0 <_ohci_hub_descriptor+0xb8> - 112d9: 8d 45 f6 lea 0xfffffff6(%ebp),%eax - 112dc: 66 83 08 08 orw $0x8,(%eax) - 112e0: 8b 55 0c mov 0xc(%ebp),%edx - 112e3: 66 8b 45 f6 mov 0xfffffff6(%ebp),%ax - 112e7: 66 89 42 03 mov %ax,0x3(%edx) - 112eb: 83 ec 0c sub $0xc,%esp - 112ee: ff 75 08 pushl 0x8(%ebp) - 112f1: e8 3b 00 00 00 call 11331 <_roothub_b> - 112f6: 83 c4 10 add $0x10,%esp - 112f9: 89 45 fc mov %eax,0xfffffffc(%ebp) - 112fc: 8b 55 0c mov 0xc(%ebp),%edx - 112ff: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 11302: 88 42 07 mov %al,0x7(%edx) - 11305: 83 7d f8 07 cmpl $0x7,0xfffffff8(%ebp) - 11309: 7e 1d jle 11328 <_ohci_hub_descriptor+0x100> - 1130b: 8b 55 0c mov 0xc(%ebp),%edx - 1130e: 0f b7 45 fc movzwl 0xfffffffc(%ebp),%eax - 11312: c1 e8 08 shr $0x8,%eax - 11315: 88 42 08 mov %al,0x8(%edx) - 11318: 8b 55 0c mov 0xc(%ebp),%edx - 1131b: 8b 45 0c mov 0xc(%ebp),%eax - 1131e: c6 40 0a ff movb $0xff,0xa(%eax) - 11322: c6 42 09 ff movb $0xff,0x9(%edx) - 11326: eb 07 jmp 1132f <_ohci_hub_descriptor+0x107> - 11328: 8b 45 0c mov 0xc(%ebp),%eax - 1132b: c6 40 08 ff movb $0xff,0x8(%eax) - 1132f: c9 leave - 11330: c3 ret - -00011331 <_roothub_b>: - 11331: 55 push %ebp - 11332: 89 e5 mov %esp,%ebp - 11334: 8b 45 08 mov 0x8(%ebp),%eax - 11337: 8b 40 04 mov 0x4(%eax),%eax - 1133a: 83 c0 4c add $0x4c,%eax - 1133d: 8b 00 mov (%eax),%eax - 1133f: 5d pop %ebp - 11340: c3 ret - -00011341 <_ohci_hub_control>: - 11341: 55 push %ebp - 11342: 89 e5 mov %esp,%ebp - 11344: 53 push %ebx - 11345: 83 ec 34 sub $0x34,%esp - 11348: 8b 45 0c mov 0xc(%ebp),%eax - 1134b: 8b 55 10 mov 0x10(%ebp),%edx - 1134e: 8b 4d 14 mov 0x14(%ebp),%ecx - 11351: 8b 5d 1c mov 0x1c(%ebp),%ebx - 11354: 66 89 45 fa mov %ax,0xfffffffa(%ebp) - 11358: 66 89 55 f8 mov %dx,0xfffffff8(%ebp) - 1135c: 66 89 4d f6 mov %cx,0xfffffff6(%ebp) - 11360: 66 89 5d f4 mov %bx,0xfffffff4(%ebp) - 11364: 8b 45 08 mov 0x8(%ebp),%eax - 11367: 89 45 ec mov %eax,0xffffffec(%ebp) - 1136a: 8b 45 ec mov 0xffffffec(%ebp),%eax - 1136d: 2d 34 02 00 00 sub $0x234,%eax - 11372: 89 45 f0 mov %eax,0xfffffff0(%ebp) - 11375: 83 ec 0c sub $0xc,%esp - 11378: ff 75 08 pushl 0x8(%ebp) - 1137b: e8 fb 02 00 00 call 1167b <_hcd_to_bus> - 11380: 83 c4 10 add $0x10,%esp - 11383: 8b 40 24 mov 0x24(%eax),%eax - 11386: 8b 80 ac 01 00 00 mov 0x1ac(%eax),%eax - 1138c: 89 45 ec mov %eax,0xffffffec(%ebp) - 1138f: c7 45 e4 00 00 00 00 movl $0x0,0xffffffe4(%ebp) - 11396: 66 8b 45 fa mov 0xfffffffa(%ebp),%ax - 1139a: 89 c2 mov %eax,%edx - 1139c: 81 e2 ff ff 00 00 and $0xffff,%edx - 113a2: 89 55 d4 mov %edx,0xffffffd4(%ebp) - 113a5: 81 7d d4 03 23 00 00 cmpl $0x2303,0xffffffd4(%ebp) - 113ac: 0f 84 ef 01 00 00 je 115a1 <_ohci_hub_control+0x260> - 113b2: 81 7d d4 03 23 00 00 cmpl $0x2303,0xffffffd4(%ebp) - 113b9: 7f 32 jg 113ed <_ohci_hub_control+0xac> - 113bb: 81 7d d4 03 20 00 00 cmpl $0x2003,0xffffffd4(%ebp) - 113c2: 0f 84 c0 01 00 00 je 11588 <_ohci_hub_control+0x247> - 113c8: 81 7d d4 03 20 00 00 cmpl $0x2003,0xffffffd4(%ebp) - 113cf: 7f 0e jg 113df <_ohci_hub_control+0x9e> - 113d1: 81 7d d4 01 20 00 00 cmpl $0x2001,0xffffffd4(%ebp) - 113d8: 74 4d je 11427 <_ohci_hub_control+0xe6> - 113da: e9 8d 02 00 00 jmp 1166c <_ohci_hub_control+0x32b> - 113df: 81 7d d4 01 23 00 00 cmpl $0x2301,0xffffffd4(%ebp) - 113e6: 74 76 je 1145e <_ohci_hub_control+0x11d> - 113e8: e9 7f 02 00 00 jmp 1166c <_ohci_hub_control+0x32b> - 113ed: 81 7d d4 06 a0 00 00 cmpl $0xa006,0xffffffd4(%ebp) - 113f4: 0f 84 10 01 00 00 je 1150a <_ohci_hub_control+0x1c9> - 113fa: 81 7d d4 06 a0 00 00 cmpl $0xa006,0xffffffd4(%ebp) - 11401: 7f 12 jg 11415 <_ohci_hub_control+0xd4> - 11403: 81 7d d4 00 a0 00 00 cmpl $0xa000,0xffffffd4(%ebp) - 1140a: 0f 84 10 01 00 00 je 11520 <_ohci_hub_control+0x1df> - 11410: e9 57 02 00 00 jmp 1166c <_ohci_hub_control+0x32b> - 11415: 81 7d d4 00 a3 00 00 cmpl $0xa300,0xffffffd4(%ebp) - 1141c: 0f 84 1e 01 00 00 je 11540 <_ohci_hub_control+0x1ff> - 11422: e9 45 02 00 00 jmp 1166c <_ohci_hub_control+0x32b> - 11427: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 1142a: 89 c2 mov %eax,%edx - 1142c: 81 e2 ff ff 00 00 and $0xffff,%edx - 11432: 89 55 e0 mov %edx,0xffffffe0(%ebp) - 11435: 83 7d e0 00 cmpl $0x0,0xffffffe0(%ebp) - 11439: 0f 84 34 02 00 00 je 11673 <_ohci_hub_control+0x332> - 1143f: 83 7d e0 01 cmpl $0x1,0xffffffe0(%ebp) - 11443: 74 05 je 1144a <_ohci_hub_control+0x109> - 11445: e9 22 02 00 00 jmp 1166c <_ohci_hub_control+0x32b> - 1144a: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 1144d: 8b 40 04 mov 0x4(%eax),%eax - 11450: 83 c0 50 add $0x50,%eax - 11453: c7 00 00 00 02 00 movl $0x20000,(%eax) - 11459: e9 15 02 00 00 jmp 11673 <_ohci_hub_control+0x332> - 1145e: 66 83 7d f6 00 cmpw $0x0,0xfffffff6(%ebp) - 11463: 0f 84 03 02 00 00 je 1166c <_ohci_hub_control+0x32b> - 11469: 66 8b 45 f6 mov 0xfffffff6(%ebp),%ax - 1146d: 25 ff ff 00 00 and $0xffff,%eax - 11472: 3b 45 ec cmp 0xffffffec(%ebp),%eax - 11475: 0f 8f f1 01 00 00 jg 1166c <_ohci_hub_control+0x32b> - 1147b: 8d 45 f6 lea 0xfffffff6(%ebp),%eax - 1147e: 66 ff 08 decw (%eax) - 11481: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 11484: 89 c2 mov %eax,%edx - 11486: 81 e2 ff ff 00 00 and $0xffff,%edx - 1148c: 89 55 dc mov %edx,0xffffffdc(%ebp) - 1148f: 83 7d dc 14 cmpl $0x14,0xffffffdc(%ebp) - 11493: 0f 87 d3 01 00 00 ja 1166c <_ohci_hub_control+0x32b> - 11499: 8b 55 dc mov 0xffffffdc(%ebp),%edx - 1149c: 8b 04 95 60 60 01 00 mov 0x16060(,%edx,4),%eax - 114a3: ff e0 jmp *%eax - 114a5: c7 45 e8 01 00 00 00 movl $0x1,0xffffffe8(%ebp) - 114ac: eb 3d jmp 114eb <_ohci_hub_control+0x1aa> - 114ae: c7 45 e8 00 00 02 00 movl $0x20000,0xffffffe8(%ebp) - 114b5: eb 34 jmp 114eb <_ohci_hub_control+0x1aa> - 114b7: c7 45 e8 08 00 00 00 movl $0x8,0xffffffe8(%ebp) - 114be: eb 2b jmp 114eb <_ohci_hub_control+0x1aa> - 114c0: c7 45 e8 00 00 04 00 movl $0x40000,0xffffffe8(%ebp) - 114c7: eb 22 jmp 114eb <_ohci_hub_control+0x1aa> - 114c9: c7 45 e8 00 02 00 00 movl $0x200,0xffffffe8(%ebp) - 114d0: eb 19 jmp 114eb <_ohci_hub_control+0x1aa> - 114d2: c7 45 e8 00 00 01 00 movl $0x10000,0xffffffe8(%ebp) - 114d9: eb 10 jmp 114eb <_ohci_hub_control+0x1aa> - 114db: c7 45 e8 00 00 08 00 movl $0x80000,0xffffffe8(%ebp) - 114e2: eb 07 jmp 114eb <_ohci_hub_control+0x1aa> - 114e4: c7 45 e8 00 00 10 00 movl $0x100000,0xffffffe8(%ebp) - 114eb: 8b 55 f0 mov 0xfffffff0(%ebp),%edx - 114ee: 66 8b 45 f6 mov 0xfffffff6(%ebp),%ax - 114f2: 25 ff ff 00 00 and $0xffff,%eax - 114f7: c1 e0 02 shl $0x2,%eax - 114fa: 03 42 04 add 0x4(%edx),%eax - 114fd: 8d 50 54 lea 0x54(%eax),%edx - 11500: 8b 45 e8 mov 0xffffffe8(%ebp),%eax - 11503: 89 02 mov %eax,(%edx) - 11505: e9 69 01 00 00 jmp 11673 <_ohci_hub_control+0x332> - 1150a: 83 ec 08 sub $0x8,%esp - 1150d: ff 75 18 pushl 0x18(%ebp) - 11510: ff 75 f0 pushl 0xfffffff0(%ebp) - 11513: e8 10 fd ff ff call 11228 <_ohci_hub_descriptor> - 11518: 83 c4 10 add $0x10,%esp - 1151b: e9 53 01 00 00 jmp 11673 <_ohci_hub_control+0x332> - 11520: ff 75 f0 pushl 0xfffffff0(%ebp) - 11523: e8 f0 fc ff ff call 11218 <_roothub_status> - 11528: 83 c4 04 add $0x4,%esp - 1152b: 25 ff 7f ff 7f and $0x7fff7fff,%eax - 11530: 89 45 e8 mov %eax,0xffffffe8(%ebp) - 11533: 8b 55 18 mov 0x18(%ebp),%edx - 11536: 8b 45 e8 mov 0xffffffe8(%ebp),%eax - 11539: 89 02 mov %eax,(%edx) - 1153b: e9 33 01 00 00 jmp 11673 <_ohci_hub_control+0x332> - 11540: 66 83 7d f6 00 cmpw $0x0,0xfffffff6(%ebp) - 11545: 0f 84 21 01 00 00 je 1166c <_ohci_hub_control+0x32b> - 1154b: 66 8b 45 f6 mov 0xfffffff6(%ebp),%ax - 1154f: 25 ff ff 00 00 and $0xffff,%eax - 11554: 3b 45 ec cmp 0xffffffec(%ebp),%eax - 11557: 0f 8f 0f 01 00 00 jg 1166c <_ohci_hub_control+0x32b> - 1155d: 8d 45 f6 lea 0xfffffff6(%ebp),%eax - 11560: 66 ff 08 decw (%eax) - 11563: 66 8b 45 f6 mov 0xfffffff6(%ebp),%ax - 11567: 25 ff ff 00 00 and $0xffff,%eax - 1156c: 50 push %eax - 1156d: ff 75 f0 pushl 0xfffffff0(%ebp) - 11570: e8 05 fb ff ff call 1107a <_roothub_portstatus> - 11575: 83 c4 08 add $0x8,%esp - 11578: 89 45 e8 mov %eax,0xffffffe8(%ebp) - 1157b: 8b 55 18 mov 0x18(%ebp),%edx - 1157e: 8b 45 e8 mov 0xffffffe8(%ebp),%eax - 11581: 89 02 mov %eax,(%edx) - 11583: e9 eb 00 00 00 jmp 11673 <_ohci_hub_control+0x332> - 11588: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 1158b: 25 ff ff 00 00 and $0xffff,%eax - 11590: 83 c0 00 add $0x0,%eax - 11593: 83 f8 01 cmp $0x1,%eax - 11596: 0f 87 d0 00 00 00 ja 1166c <_ohci_hub_control+0x32b> - 1159c: e9 d2 00 00 00 jmp 11673 <_ohci_hub_control+0x332> - 115a1: 66 83 7d f6 00 cmpw $0x0,0xfffffff6(%ebp) - 115a6: 0f 84 c0 00 00 00 je 1166c <_ohci_hub_control+0x32b> - 115ac: 66 8b 45 f6 mov 0xfffffff6(%ebp),%ax - 115b0: 25 ff ff 00 00 and $0xffff,%eax - 115b5: 3b 45 ec cmp 0xffffffec(%ebp),%eax - 115b8: 0f 8f ae 00 00 00 jg 1166c <_ohci_hub_control+0x32b> - 115be: 8d 45 f6 lea 0xfffffff6(%ebp),%eax - 115c1: 66 ff 08 decw (%eax) - 115c4: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 115c7: 89 c2 mov %eax,%edx - 115c9: 81 e2 ff ff 00 00 and $0xffff,%edx - 115cf: 89 55 d8 mov %edx,0xffffffd8(%ebp) - 115d2: 83 7d d8 04 cmpl $0x4,0xffffffd8(%ebp) - 115d6: 74 53 je 1162b <_ohci_hub_control+0x2ea> - 115d8: 83 7d d8 04 cmpl $0x4,0xffffffd8(%ebp) - 115dc: 7f 0b jg 115e9 <_ohci_hub_control+0x2a8> - 115de: 83 7d d8 02 cmpl $0x2,0xffffffd8(%ebp) - 115e2: 74 0d je 115f1 <_ohci_hub_control+0x2b0> - 115e4: e9 83 00 00 00 jmp 1166c <_ohci_hub_control+0x32b> - 115e9: 83 7d d8 08 cmpl $0x8,0xffffffd8(%ebp) - 115ed: 74 1f je 1160e <_ohci_hub_control+0x2cd> - 115ef: eb 7b jmp 1166c <_ohci_hub_control+0x32b> - 115f1: 8b 55 f0 mov 0xfffffff0(%ebp),%edx - 115f4: 66 8b 45 f6 mov 0xfffffff6(%ebp),%ax - 115f8: 25 ff ff 00 00 and $0xffff,%eax - 115fd: c1 e0 02 shl $0x2,%eax - 11600: 03 42 04 add 0x4(%edx),%eax - 11603: 83 c0 54 add $0x54,%eax - 11606: c7 00 04 00 00 00 movl $0x4,(%eax) - 1160c: eb 65 jmp 11673 <_ohci_hub_control+0x332> - 1160e: 8b 55 f0 mov 0xfffffff0(%ebp),%edx - 11611: 66 8b 45 f6 mov 0xfffffff6(%ebp),%ax - 11615: 25 ff ff 00 00 and $0xffff,%eax - 1161a: c1 e0 02 shl $0x2,%eax - 1161d: 03 42 04 add 0x4(%edx),%eax - 11620: 83 c0 54 add $0x54,%eax - 11623: c7 00 00 01 00 00 movl $0x100,(%eax) - 11629: eb 48 jmp 11673 <_ohci_hub_control+0x332> - 1162b: 8b 55 f0 mov 0xfffffff0(%ebp),%edx - 1162e: 66 8b 45 f6 mov 0xfffffff6(%ebp),%ax - 11632: 25 ff ff 00 00 and $0xffff,%eax - 11637: c1 e0 02 shl $0x2,%eax - 1163a: 03 42 04 add 0x4(%edx),%eax - 1163d: 83 c0 54 add $0x54,%eax - 11640: 8b 00 mov (%eax),%eax - 11642: 89 45 e8 mov %eax,0xffffffe8(%ebp) - 11645: 8b 45 e8 mov 0xffffffe8(%ebp),%eax - 11648: 83 e0 01 and $0x1,%eax - 1164b: 85 c0 test %eax,%eax - 1164d: 74 24 je 11673 <_ohci_hub_control+0x332> - 1164f: 8b 55 f0 mov 0xfffffff0(%ebp),%edx - 11652: 66 8b 45 f6 mov 0xfffffff6(%ebp),%ax - 11656: 25 ff ff 00 00 and $0xffff,%eax - 1165b: c1 e0 02 shl $0x2,%eax - 1165e: 03 42 04 add 0x4(%edx),%eax - 11661: 83 c0 54 add $0x54,%eax - 11664: c7 00 10 00 00 00 movl $0x10,(%eax) - 1166a: eb 07 jmp 11673 <_ohci_hub_control+0x332> - 1166c: c7 45 e4 e0 ff ff ff movl $0xffffffe0,0xffffffe4(%ebp) - 11673: 8b 45 e4 mov 0xffffffe4(%ebp),%eax - 11676: 8b 5d fc mov 0xfffffffc(%ebp),%ebx - 11679: c9 leave - 1167a: c3 ret - -0001167b <_hcd_to_bus>: - 1167b: 55 push %ebp - 1167c: 89 e5 mov %esp,%ebp - 1167e: 8b 45 08 mov 0x8(%ebp),%eax - 11681: 5d pop %ebp - 11682: c3 ret - -00011683 <_ohci_hcd_alloc>: - 11683: 55 push %ebp - 11684: 89 e5 mov %esp,%ebp - 11686: 83 ec 08 sub $0x8,%esp - 11689: 83 ec 08 sub $0x8,%esp - 1168c: 68 18 03 00 00 push $0x318 - 11691: 6a 01 push $0x1 - 11693: e8 d8 2e 00 00 call 14570 <_ExAllocatePool@8> - 11698: 83 c4 08 add $0x8,%esp - 1169b: 89 45 fc mov %eax,0xfffffffc(%ebp) - 1169e: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) - 116a2: 74 22 je 116c6 <_ohci_hcd_alloc+0x43> - 116a4: 83 ec 04 sub $0x4,%esp - 116a7: 68 18 03 00 00 push $0x318 - 116ac: 6a 00 push $0x0 - 116ae: ff 75 fc pushl 0xfffffffc(%ebp) - 116b1: e8 ea 2e 00 00 call 145a0 <_memset> - 116b6: 83 c4 10 add $0x10,%esp - 116b9: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 116bc: 05 34 02 00 00 add $0x234,%eax - 116c1: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 116c4: eb 07 jmp 116cd <_ohci_hcd_alloc+0x4a> - 116c6: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) - 116cd: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 116d0: c9 leave - 116d1: c3 ret - -000116d2 <_ohci_hcd_free>: - 116d2: 55 push %ebp - 116d3: 89 e5 mov %esp,%ebp - 116d5: 83 ec 08 sub $0x8,%esp - 116d8: 8b 45 08 mov 0x8(%ebp),%eax - 116db: 89 45 fc mov %eax,0xfffffffc(%ebp) - 116de: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 116e1: 2d 34 02 00 00 sub $0x234,%eax - 116e6: 83 ec 0c sub $0xc,%esp - 116e9: 50 push %eax - 116ea: e8 91 2e 00 00 call 14580 <_ExFreePool@4> - 116ef: 83 c4 0c add $0xc,%esp - 116f2: c9 leave - 116f3: c3 ret - -000116f4 <_ohci_mem_init>: - 116f4: 55 push %ebp - 116f5: 89 e5 mov %esp,%ebp - 116f7: 83 ec 04 sub $0x4,%esp - 116fa: 8b 45 08 mov 0x8(%ebp),%eax - 116fd: c7 80 9c 00 00 00 01 movl $0x1,0x9c(%eax) - 11704: 00 00 00 - 11707: 8b 45 08 mov 0x8(%ebp),%eax - 1170a: 83 b8 9c 00 00 00 00 cmpl $0x0,0x9c(%eax) - 11711: 75 09 jne 1171c <_ohci_mem_init+0x28> - 11713: c7 45 fc f4 ff ff ff movl $0xfffffff4,0xfffffffc(%ebp) - 1171a: eb 29 jmp 11745 <_ohci_mem_init+0x51> - 1171c: 8b 45 08 mov 0x8(%ebp),%eax - 1171f: c7 80 a0 00 00 00 01 movl $0x1,0xa0(%eax) - 11726: 00 00 00 - 11729: 8b 45 08 mov 0x8(%ebp),%eax - 1172c: 83 b8 a0 00 00 00 00 cmpl $0x0,0xa0(%eax) - 11733: 75 09 jne 1173e <_ohci_mem_init+0x4a> - 11735: c7 45 fc f4 ff ff ff movl $0xfffffff4,0xfffffffc(%ebp) - 1173c: eb 07 jmp 11745 <_ohci_mem_init+0x51> - 1173e: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) - 11745: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 11748: c9 leave - 11749: c3 ret - -0001174a <_ohci_mem_cleanup>: - 1174a: 55 push %ebp - 1174b: 89 e5 mov %esp,%ebp - 1174d: 8b 45 08 mov 0x8(%ebp),%eax - 11750: 83 b8 9c 00 00 00 00 cmpl $0x0,0x9c(%eax) - 11757: 74 0d je 11766 <_ohci_mem_cleanup+0x1c> - 11759: 8b 45 08 mov 0x8(%ebp),%eax - 1175c: c7 80 9c 00 00 00 00 movl $0x0,0x9c(%eax) - 11763: 00 00 00 - 11766: 8b 45 08 mov 0x8(%ebp),%eax - 11769: 83 b8 a0 00 00 00 00 cmpl $0x0,0xa0(%eax) - 11770: 74 0d je 1177f <_ohci_mem_cleanup+0x35> - 11772: 8b 45 08 mov 0x8(%ebp),%eax - 11775: c7 80 a0 00 00 00 00 movl $0x0,0xa0(%eax) - 1177c: 00 00 00 - 1177f: 5d pop %ebp - 11780: c3 ret - -00011781 <_td_alloc>: - 11781: 55 push %ebp - 11782: 89 e5 mov %esp,%ebp - 11784: 83 ec 08 sub $0x8,%esp - 11787: 83 ec 04 sub $0x4,%esp - 1178a: 8d 45 fc lea 0xfffffffc(%ebp),%eax - 1178d: 50 push %eax - 1178e: ff 75 0c pushl 0xc(%ebp) - 11791: 8b 45 08 mov 0x8(%ebp),%eax - 11794: ff b0 9c 00 00 00 pushl 0x9c(%eax) - 1179a: e8 35 00 00 00 call 117d4 <_my_pci_pool_alloc> - 1179f: 83 c4 10 add $0x10,%esp - 117a2: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 117a5: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) - 117a9: 74 24 je 117cf <_td_alloc+0x4e> - 117ab: 83 ec 04 sub $0x4,%esp - 117ae: 6a 40 push $0x40 - 117b0: 6a 00 push $0x0 - 117b2: ff 75 f8 pushl 0xfffffff8(%ebp) - 117b5: e8 e6 2d 00 00 call 145a0 <_memset> - 117ba: 83 c4 10 add $0x10,%esp - 117bd: 8b 55 f8 mov 0xfffffff8(%ebp),%edx - 117c0: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 117c3: 89 42 08 mov %eax,0x8(%edx) - 117c6: 8b 55 f8 mov 0xfffffff8(%ebp),%edx - 117c9: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 117cc: 89 42 24 mov %eax,0x24(%edx) - 117cf: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 117d2: c9 leave - 117d3: c3 ret - -000117d4 <_my_pci_pool_alloc>: - 117d4: 55 push %ebp - 117d5: 89 e5 mov %esp,%ebp - 117d7: 83 ec 08 sub $0x8,%esp - 117da: 83 ec 08 sub $0x8,%esp - 117dd: ff 75 0c pushl 0xc(%ebp) - 117e0: 6a 01 push $0x1 - 117e2: e8 89 2d 00 00 call 14570 <_ExAllocatePool@8> - 117e7: 83 c4 08 add $0x8,%esp - 117ea: 89 45 fc mov %eax,0xfffffffc(%ebp) - 117ed: 8b 55 10 mov 0x10(%ebp),%edx - 117f0: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 117f3: 89 02 mov %eax,(%edx) - 117f5: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 117f8: c9 leave - 117f9: c3 ret - -000117fa <_td_free>: - 117fa: 55 push %ebp - 117fb: 89 e5 mov %esp,%ebp - 117fd: 83 ec 08 sub $0x8,%esp - 11800: 8b 55 0c mov 0xc(%ebp),%edx - 11803: 8b 45 0c mov 0xc(%ebp),%eax - 11806: 8b 40 24 mov 0x24(%eax),%eax - 11809: c1 e8 06 shr $0x6,%eax - 1180c: 33 42 24 xor 0x24(%edx),%eax - 1180f: 83 e0 3f and $0x3f,%eax - 11812: c1 e0 02 shl $0x2,%eax - 11815: 03 45 08 add 0x8(%ebp),%eax - 11818: 05 a4 00 00 00 add $0xa4,%eax - 1181d: 89 45 fc mov %eax,0xfffffffc(%ebp) - 11820: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 11823: 83 38 00 cmpl $0x0,(%eax) - 11826: 74 17 je 1183f <_td_free+0x45> - 11828: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 1182b: 8b 00 mov (%eax),%eax - 1182d: 3b 45 0c cmp 0xc(%ebp),%eax - 11830: 74 0d je 1183f <_td_free+0x45> - 11832: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 11835: 8b 00 mov (%eax),%eax - 11837: 83 c0 18 add $0x18,%eax - 1183a: 89 45 fc mov %eax,0xfffffffc(%ebp) - 1183d: eb e1 jmp 11820 <_td_free+0x26> - 1183f: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 11842: 83 38 00 cmpl $0x0,(%eax) - 11845: 74 0d je 11854 <_td_free+0x5a> - 11847: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 1184a: 8b 55 0c mov 0xc(%ebp),%edx - 1184d: 8b 52 18 mov 0x18(%edx),%edx - 11850: 89 10 mov %edx,(%eax) - 11852: eb 00 jmp 11854 <_td_free+0x5a> - 11854: 83 ec 0c sub $0xc,%esp - 11857: ff 75 0c pushl 0xc(%ebp) - 1185a: e8 21 2d 00 00 call 14580 <_ExFreePool@4> - 1185f: 83 c4 0c add $0xc,%esp - 11862: c9 leave - 11863: c3 ret - -00011864 <_ed_alloc>: - 11864: 55 push %ebp - 11865: 89 e5 mov %esp,%ebp - 11867: 83 ec 08 sub $0x8,%esp - 1186a: 83 ec 04 sub $0x4,%esp - 1186d: 8d 45 fc lea 0xfffffffc(%ebp),%eax - 11870: 50 push %eax - 11871: ff 75 0c pushl 0xc(%ebp) - 11874: 8b 45 08 mov 0x8(%ebp),%eax - 11877: ff b0 a0 00 00 00 pushl 0xa0(%eax) - 1187d: e8 52 ff ff ff call 117d4 <_my_pci_pool_alloc> - 11882: 83 c4 10 add $0x10,%esp - 11885: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 11888: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) - 1188c: 74 38 je 118c6 <_ed_alloc+0x62> - 1188e: 83 ec 04 sub $0x4,%esp - 11891: 6a 40 push $0x40 - 11893: 6a 00 push $0x0 - 11895: ff 75 f8 pushl 0xfffffff8(%ebp) - 11898: e8 03 2d 00 00 call 145a0 <_memset> - 1189d: 83 c4 10 add $0x10,%esp - 118a0: 8b 55 f8 mov 0xfffffff8(%ebp),%edx - 118a3: 83 c2 20 add $0x20,%edx - 118a6: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 118a9: 83 c0 20 add $0x20,%eax - 118ac: 89 02 mov %eax,(%edx) - 118ae: 8b 55 f8 mov 0xfffffff8(%ebp),%edx - 118b1: 83 c2 20 add $0x20,%edx - 118b4: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 118b7: 83 c0 20 add $0x20,%eax - 118ba: 89 42 04 mov %eax,0x4(%edx) - 118bd: 8b 55 f8 mov 0xfffffff8(%ebp),%edx - 118c0: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 118c3: 89 42 10 mov %eax,0x10(%edx) - 118c6: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 118c9: c9 leave - 118ca: c3 ret - -000118cb <_ed_free>: - 118cb: 55 push %ebp - 118cc: 89 e5 mov %esp,%ebp - 118ce: 83 ec 08 sub $0x8,%esp - 118d1: 83 ec 0c sub $0xc,%esp - 118d4: ff 75 0c pushl 0xc(%ebp) - 118d7: e8 a4 2c 00 00 call 14580 <_ExFreePool@4> - 118dc: 83 c4 0c add $0xc,%esp - 118df: c9 leave - 118e0: c3 ret - -000118e1 <_urb_free_priv>: - 118e1: 55 push %ebp - 118e2: 89 e5 mov %esp,%ebp - 118e4: 83 ec 18 sub $0x18,%esp - 118e7: 8b 45 0c mov 0xc(%ebp),%eax - 118ea: 66 8b 40 04 mov 0x4(%eax),%ax - 118ee: 25 ff ff 00 00 and $0xffff,%eax - 118f3: 48 dec %eax - 118f4: 89 45 fc mov %eax,0xfffffffc(%ebp) - 118f7: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) - 118fb: 78 3a js 11937 <_urb_free_priv+0x56> - 118fd: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) - 11904: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 11907: 3b 45 fc cmp 0xfffffffc(%ebp),%eax - 1190a: 7f 2b jg 11937 <_urb_free_priv+0x56> - 1190c: 8b 45 0c mov 0xc(%ebp),%eax - 1190f: 8b 55 f8 mov 0xfffffff8(%ebp),%edx - 11912: 8b 44 90 0c mov 0xc(%eax,%edx,4),%eax - 11916: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 11919: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) - 1191d: 74 11 je 11930 <_urb_free_priv+0x4f> - 1191f: 83 ec 08 sub $0x8,%esp - 11922: ff 75 f4 pushl 0xfffffff4(%ebp) - 11925: ff 75 08 pushl 0x8(%ebp) - 11928: e8 cd fe ff ff call 117fa <_td_free> - 1192d: 83 c4 10 add $0x10,%esp - 11930: 8d 45 f8 lea 0xfffffff8(%ebp),%eax - 11933: ff 00 incl (%eax) - 11935: eb cd jmp 11904 <_urb_free_priv+0x23> - 11937: 83 ec 0c sub $0xc,%esp - 1193a: ff 75 0c pushl 0xc(%ebp) - 1193d: e8 3e 2c 00 00 call 14580 <_ExFreePool@4> - 11942: 83 c4 0c add $0xc,%esp - 11945: c9 leave - 11946: c3 ret - -00011947 <_finish_urb>: - 11947: 55 push %ebp - 11948: 89 e5 mov %esp,%ebp - 1194a: 83 ec 08 sub $0x8,%esp - 1194d: 83 ec 08 sub $0x8,%esp - 11950: 8b 45 0c mov 0xc(%ebp),%eax - 11953: ff 70 08 pushl 0x8(%eax) - 11956: ff 75 08 pushl 0x8(%ebp) - 11959: e8 83 ff ff ff call 118e1 <_urb_free_priv> - 1195e: 83 c4 10 add $0x10,%esp - 11961: 8b 45 0c mov 0xc(%ebp),%eax - 11964: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) - 1196b: 8b 45 0c mov 0xc(%ebp),%eax - 1196e: c7 00 01 00 00 00 movl $0x1,(%eax) - 11974: 8b 45 0c mov 0xc(%ebp),%eax - 11977: 83 78 1c 8d cmpl $0xffffff8d,0x1c(%eax) - 1197b: 75 0a jne 11987 <_finish_urb+0x40> - 1197d: 8b 45 0c mov 0xc(%ebp),%eax - 11980: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) - 11987: 8b 45 0c mov 0xc(%ebp),%eax - 1198a: 8b 40 18 mov 0x18(%eax),%eax - 1198d: c1 e8 1e shr $0x1e,%eax - 11990: 83 e0 03 and $0x3,%eax - 11993: 89 45 fc mov %eax,0xfffffffc(%ebp) - 11996: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) - 1199a: 74 08 je 119a4 <_finish_urb+0x5d> - 1199c: 83 7d fc 01 cmpl $0x1,0xfffffffc(%ebp) - 119a0: 74 18 je 119ba <_finish_urb+0x73> - 119a2: eb 2a jmp 119ce <_finish_urb+0x87> - 119a4: 8b 45 08 mov 0x8(%ebp),%eax - 119a7: 05 34 02 00 00 add $0x234,%eax - 119ac: 50 push %eax - 119ad: e8 c9 fc ff ff call 1167b <_hcd_to_bus> - 119b2: 83 c4 04 add $0x4,%esp - 119b5: ff 48 3c decl 0x3c(%eax) - 119b8: eb 14 jmp 119ce <_finish_urb+0x87> - 119ba: 8b 45 08 mov 0x8(%ebp),%eax - 119bd: 05 34 02 00 00 add $0x234,%eax - 119c2: 50 push %eax - 119c3: e8 b3 fc ff ff call 1167b <_hcd_to_bus> - 119c8: 83 c4 04 add $0x4,%esp - 119cb: ff 48 38 decl 0x38(%eax) - 119ce: 83 ec 04 sub $0x4,%esp - 119d1: ff 75 10 pushl 0x10(%ebp) - 119d4: ff 75 0c pushl 0xc(%ebp) - 119d7: 8b 45 08 mov 0x8(%ebp),%eax - 119da: 05 34 02 00 00 add $0x234,%eax - 119df: 50 push %eax - 119e0: e8 db 2b 00 00 call 145c0 <_usb_hcd_giveback_urb@12> - 119e5: 83 c4 04 add $0x4,%esp - 119e8: c9 leave - 119e9: c3 ret - -000119ea <_balance>: - 119ea: 55 push %ebp - 119eb: 89 e5 mov %esp,%ebp - 119ed: 53 push %ebx - 119ee: 83 ec 0c sub $0xc,%esp - 119f1: c7 45 f4 e4 ff ff ff movl $0xffffffe4,0xfffffff4(%ebp) - 119f8: 83 7d 0c 20 cmpl $0x20,0xc(%ebp) - 119fc: 7e 07 jle 11a05 <_balance+0x1b> - 119fe: c7 45 0c 20 00 00 00 movl $0x20,0xc(%ebp) - 11a05: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) - 11a0c: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 11a0f: 3b 45 0c cmp 0xc(%ebp),%eax - 11a12: 7d 68 jge 11a7c <_balance+0x92> - 11a14: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) - 11a18: 78 1e js 11a38 <_balance+0x4e> - 11a1a: 8b 5d 08 mov 0x8(%ebp),%ebx - 11a1d: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 11a20: 8b 4d 08 mov 0x8(%ebp),%ecx - 11a23: 8b 55 f8 mov 0xfffffff8(%ebp),%edx - 11a26: 8b 84 83 ac 01 00 00 mov 0x1ac(%ebx,%eax,4),%eax - 11a2d: 3b 84 91 ac 01 00 00 cmp 0x1ac(%ecx,%edx,4),%eax - 11a34: 7f 02 jg 11a38 <_balance+0x4e> - 11a36: eb 3d jmp 11a75 <_balance+0x8b> - 11a38: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 11a3b: 89 45 f0 mov %eax,0xfffffff0(%ebp) - 11a3e: 83 7d f0 1f cmpl $0x1f,0xfffffff0(%ebp) - 11a42: 7f 23 jg 11a67 <_balance+0x7d> - 11a44: 8b 4d 08 mov 0x8(%ebp),%ecx - 11a47: 8b 55 f0 mov 0xfffffff0(%ebp),%edx - 11a4a: 8b 45 10 mov 0x10(%ebp),%eax - 11a4d: 03 84 91 ac 01 00 00 add 0x1ac(%ecx,%edx,4),%eax - 11a54: 3d 84 03 00 00 cmp $0x384,%eax - 11a59: 7e 02 jle 11a5d <_balance+0x73> - 11a5b: eb 0a jmp 11a67 <_balance+0x7d> - 11a5d: 8b 55 0c mov 0xc(%ebp),%edx - 11a60: 8d 45 f0 lea 0xfffffff0(%ebp),%eax - 11a63: 01 10 add %edx,(%eax) - 11a65: eb d7 jmp 11a3e <_balance+0x54> - 11a67: 83 7d f0 1f cmpl $0x1f,0xfffffff0(%ebp) - 11a6b: 7f 02 jg 11a6f <_balance+0x85> - 11a6d: eb 06 jmp 11a75 <_balance+0x8b> - 11a6f: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 11a72: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 11a75: 8d 45 f8 lea 0xfffffff8(%ebp),%eax - 11a78: ff 00 incl (%eax) - 11a7a: eb 90 jmp 11a0c <_balance+0x22> - 11a7c: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 11a7f: 83 c4 0c add $0xc,%esp - 11a82: 5b pop %ebx - 11a83: 5d pop %ebp - 11a84: c3 ret - -00011a85 <_periodic_link>: - 11a85: 55 push %ebp - 11a86: 89 e5 mov %esp,%ebp - 11a88: 56 push %esi - 11a89: 53 push %ebx - 11a8a: 83 ec 10 sub $0x10,%esp - 11a8d: 8b 45 0c mov 0xc(%ebp),%eax - 11a90: 8a 40 2a mov 0x2a(%eax),%al - 11a93: 25 ff 00 00 00 and $0xff,%eax - 11a98: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 11a9b: 83 7d f4 1f cmpl $0x1f,0xfffffff4(%ebp) - 11a9f: 0f 87 d8 00 00 00 ja 11b7d <_periodic_link+0xf8> - 11aa5: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 11aa8: c1 e0 02 shl $0x2,%eax - 11aab: 03 45 08 add 0x8(%ebp),%eax - 11aae: 83 c0 1c add $0x1c,%eax - 11ab1: 89 45 f0 mov %eax,0xfffffff0(%ebp) - 11ab4: 8b 55 08 mov 0x8(%ebp),%edx - 11ab7: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 11aba: c1 e0 02 shl $0x2,%eax - 11abd: 03 42 08 add 0x8(%edx),%eax - 11ac0: 89 45 ec mov %eax,0xffffffec(%ebp) - 11ac3: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 11ac6: 8b 00 mov (%eax),%eax - 11ac8: 89 45 e8 mov %eax,0xffffffe8(%ebp) - 11acb: 83 7d e8 00 cmpl $0x0,0xffffffe8(%ebp) - 11acf: 74 36 je 11b07 <_periodic_link+0x82> - 11ad1: 8b 45 0c mov 0xc(%ebp),%eax - 11ad4: 3b 45 e8 cmp 0xffffffe8(%ebp),%eax - 11ad7: 74 2e je 11b07 <_periodic_link+0x82> - 11ad9: 8b 45 0c mov 0xc(%ebp),%eax - 11adc: 8b 55 e8 mov 0xffffffe8(%ebp),%edx - 11adf: 66 8b 40 2c mov 0x2c(%eax),%ax - 11ae3: 66 3b 42 2c cmp 0x2c(%edx),%ax - 11ae7: 76 02 jbe 11aeb <_periodic_link+0x66> - 11ae9: eb 1c jmp 11b07 <_periodic_link+0x82> - 11aeb: 8b 45 e8 mov 0xffffffe8(%ebp),%eax - 11aee: 83 c0 18 add $0x18,%eax - 11af1: 89 45 f0 mov %eax,0xfffffff0(%ebp) - 11af4: 8b 45 e8 mov 0xffffffe8(%ebp),%eax - 11af7: 83 c0 0c add $0xc,%eax - 11afa: 89 45 ec mov %eax,0xffffffec(%ebp) - 11afd: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 11b00: 8b 00 mov (%eax),%eax - 11b02: 89 45 e8 mov %eax,0xffffffe8(%ebp) - 11b05: eb c4 jmp 11acb <_periodic_link+0x46> - 11b07: 8b 45 0c mov 0xc(%ebp),%eax - 11b0a: 3b 45 e8 cmp 0xffffffe8(%ebp),%eax - 11b0d: 74 2f je 11b3e <_periodic_link+0xb9> - 11b0f: 8b 55 0c mov 0xc(%ebp),%edx - 11b12: 8b 45 e8 mov 0xffffffe8(%ebp),%eax - 11b15: 89 42 18 mov %eax,0x18(%edx) - 11b18: 83 7d e8 00 cmpl $0x0,0xffffffe8(%ebp) - 11b1c: 74 0b je 11b29 <_periodic_link+0xa4> - 11b1e: 8b 45 0c mov 0xc(%ebp),%eax - 11b21: 8b 55 ec mov 0xffffffec(%ebp),%edx - 11b24: 8b 12 mov (%edx),%edx - 11b26: 89 50 0c mov %edx,0xc(%eax) - 11b29: 8b 55 f0 mov 0xfffffff0(%ebp),%edx - 11b2c: 8b 45 0c mov 0xc(%ebp),%eax - 11b2f: 89 02 mov %eax,(%edx) - 11b31: 8b 55 ec mov 0xffffffec(%ebp),%edx - 11b34: 8b 45 0c mov 0xc(%ebp),%eax - 11b37: 83 c0 10 add $0x10,%eax - 11b3a: 8b 00 mov (%eax),%eax - 11b3c: 89 02 mov %eax,(%edx) - 11b3e: 8b 5d 08 mov 0x8(%ebp),%ebx - 11b41: 8b 75 f4 mov 0xfffffff4(%ebp),%esi - 11b44: 8b 55 08 mov 0x8(%ebp),%edx - 11b47: 8b 4d f4 mov 0xfffffff4(%ebp),%ecx - 11b4a: 8b 45 0c mov 0xc(%ebp),%eax - 11b4d: 66 8b 40 2e mov 0x2e(%eax),%ax - 11b51: 25 ff ff 00 00 and $0xffff,%eax - 11b56: 03 84 8a ac 01 00 00 add 0x1ac(%edx,%ecx,4),%eax - 11b5d: 89 84 b3 ac 01 00 00 mov %eax,0x1ac(%ebx,%esi,4) - 11b64: 8b 45 0c mov 0xc(%ebp),%eax - 11b67: 66 8b 40 2c mov 0x2c(%eax),%ax - 11b6b: 89 c2 mov %eax,%edx - 11b6d: 81 e2 ff ff 00 00 and $0xffff,%edx - 11b73: 8d 45 f4 lea 0xfffffff4(%ebp),%eax - 11b76: 01 10 add %edx,(%eax) - 11b78: e9 1e ff ff ff jmp 11a9b <_periodic_link+0x16> - 11b7d: 8b 45 08 mov 0x8(%ebp),%eax - 11b80: 05 34 02 00 00 add $0x234,%eax - 11b85: 50 push %eax - 11b86: e8 f0 fa ff ff call 1167b <_hcd_to_bus> - 11b8b: 83 c4 04 add $0x4,%esp - 11b8e: 89 c3 mov %eax,%ebx - 11b90: 8b 45 0c mov 0xc(%ebp),%eax - 11b93: 8b 4d 0c mov 0xc(%ebp),%ecx - 11b96: 66 8b 40 2e mov 0x2e(%eax),%ax - 11b9a: ba 00 00 00 00 mov $0x0,%edx - 11b9f: 66 f7 71 2c divw 0x2c(%ecx) - 11ba3: 25 ff ff 00 00 and $0xffff,%eax - 11ba8: 01 43 34 add %eax,0x34(%ebx) - 11bab: 8d 65 f8 lea 0xfffffff8(%ebp),%esp - 11bae: 5b pop %ebx - 11baf: 5e pop %esi - 11bb0: 5d pop %ebp - 11bb1: c3 ret - -00011bb2 <_ed_schedule>: - 11bb2: 55 push %ebp - 11bb3: 89 e5 mov %esp,%ebp - 11bb5: 83 ec 0c sub $0xc,%esp - 11bb8: 8b 45 0c mov 0xc(%ebp),%eax - 11bbb: c6 40 28 02 movb $0x2,0x28(%eax) - 11bbf: 8b 45 0c mov 0xc(%ebp),%eax - 11bc2: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) - 11bc9: 8b 45 0c mov 0xc(%ebp),%eax - 11bcc: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) - 11bd3: 8b 45 0c mov 0xc(%ebp),%eax - 11bd6: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) - 11bdd: 8b 45 0c mov 0xc(%ebp),%eax - 11be0: ba 00 00 00 00 mov $0x0,%edx - 11be5: 8a 50 29 mov 0x29(%eax),%dl - 11be8: 89 55 f4 mov %edx,0xfffffff4(%ebp) - 11beb: 83 7d f4 02 cmpl $0x2,0xfffffff4(%ebp) - 11bef: 74 0f je 11c00 <_ed_schedule+0x4e> - 11bf1: 83 7d f4 03 cmpl $0x3,0xfffffff4(%ebp) - 11bf5: 0f 84 a0 00 00 00 je 11c9b <_ed_schedule+0xe9> - 11bfb: e9 33 01 00 00 jmp 11d33 <_ed_schedule+0x181> - 11c00: 8b 45 08 mov 0x8(%ebp),%eax - 11c03: 83 78 18 00 cmpl $0x0,0x18(%eax) - 11c07: 75 13 jne 11c1c <_ed_schedule+0x6a> - 11c09: 8b 45 08 mov 0x8(%ebp),%eax - 11c0c: 8b 50 04 mov 0x4(%eax),%edx - 11c0f: 83 c2 20 add $0x20,%edx - 11c12: 8b 45 0c mov 0xc(%ebp),%eax - 11c15: 8b 40 10 mov 0x10(%eax),%eax - 11c18: 89 02 mov %eax,(%edx) - 11c1a: eb 1b jmp 11c37 <_ed_schedule+0x85> - 11c1c: 8b 45 08 mov 0x8(%ebp),%eax - 11c1f: 8b 50 18 mov 0x18(%eax),%edx - 11c22: 8b 45 0c mov 0xc(%ebp),%eax - 11c25: 89 42 18 mov %eax,0x18(%edx) - 11c28: 8b 45 08 mov 0x8(%ebp),%eax - 11c2b: 8b 50 18 mov 0x18(%eax),%edx - 11c2e: 8b 45 0c mov 0xc(%ebp),%eax - 11c31: 8b 40 10 mov 0x10(%eax),%eax - 11c34: 89 42 0c mov %eax,0xc(%edx) - 11c37: 8b 55 0c mov 0xc(%ebp),%edx - 11c3a: 8b 45 08 mov 0x8(%ebp),%eax - 11c3d: 8b 40 18 mov 0x18(%eax),%eax - 11c40: 89 42 1c mov %eax,0x1c(%edx) - 11c43: 8b 45 08 mov 0x8(%ebp),%eax - 11c46: 83 78 18 00 cmpl $0x0,0x18(%eax) - 11c4a: 75 41 jne 11c8d <_ed_schedule+0xdb> - 11c4c: 8b 45 08 mov 0x8(%ebp),%eax - 11c4f: 83 78 10 00 cmpl $0x0,0x10(%eax) - 11c53: 75 38 jne 11c8d <_ed_schedule+0xdb> - 11c55: 8b 55 08 mov 0x8(%ebp),%edx - 11c58: 8b 45 08 mov 0x8(%ebp),%eax - 11c5b: 8b 80 2c 02 00 00 mov 0x22c(%eax),%eax - 11c61: 83 c8 10 or $0x10,%eax - 11c64: 89 82 2c 02 00 00 mov %eax,0x22c(%edx) - 11c6a: 8b 45 08 mov 0x8(%ebp),%eax - 11c6d: 8b 40 04 mov 0x4(%eax),%eax - 11c70: 83 c0 24 add $0x24,%eax - 11c73: c7 00 00 00 00 00 movl $0x0,(%eax) - 11c79: 8b 45 08 mov 0x8(%ebp),%eax - 11c7c: 8b 50 04 mov 0x4(%eax),%edx - 11c7f: 83 c2 04 add $0x4,%edx - 11c82: 8b 45 08 mov 0x8(%ebp),%eax - 11c85: 8b 80 2c 02 00 00 mov 0x22c(%eax),%eax - 11c8b: 89 02 mov %eax,(%edx) - 11c8d: 8b 55 08 mov 0x8(%ebp),%edx - 11c90: 8b 45 0c mov 0xc(%ebp),%eax - 11c93: 89 42 18 mov %eax,0x18(%edx) - 11c96: e9 e5 00 00 00 jmp 11d80 <_ed_schedule+0x1ce> - 11c9b: 8b 45 08 mov 0x8(%ebp),%eax - 11c9e: 83 78 14 00 cmpl $0x0,0x14(%eax) - 11ca2: 75 13 jne 11cb7 <_ed_schedule+0x105> - 11ca4: 8b 45 08 mov 0x8(%ebp),%eax - 11ca7: 8b 50 04 mov 0x4(%eax),%edx - 11caa: 83 c2 28 add $0x28,%edx - 11cad: 8b 45 0c mov 0xc(%ebp),%eax - 11cb0: 8b 40 10 mov 0x10(%eax),%eax - 11cb3: 89 02 mov %eax,(%edx) - 11cb5: eb 1b jmp 11cd2 <_ed_schedule+0x120> - 11cb7: 8b 45 08 mov 0x8(%ebp),%eax - 11cba: 8b 50 14 mov 0x14(%eax),%edx - 11cbd: 8b 45 0c mov 0xc(%ebp),%eax - 11cc0: 89 42 18 mov %eax,0x18(%edx) - 11cc3: 8b 45 08 mov 0x8(%ebp),%eax - 11cc6: 8b 50 14 mov 0x14(%eax),%edx - 11cc9: 8b 45 0c mov 0xc(%ebp),%eax - 11ccc: 8b 40 10 mov 0x10(%eax),%eax - 11ccf: 89 42 0c mov %eax,0xc(%edx) - 11cd2: 8b 55 0c mov 0xc(%ebp),%edx - 11cd5: 8b 45 08 mov 0x8(%ebp),%eax - 11cd8: 8b 40 14 mov 0x14(%eax),%eax - 11cdb: 89 42 1c mov %eax,0x1c(%edx) - 11cde: 8b 45 08 mov 0x8(%ebp),%eax - 11ce1: 83 78 14 00 cmpl $0x0,0x14(%eax) - 11ce5: 75 41 jne 11d28 <_ed_schedule+0x176> - 11ce7: 8b 45 08 mov 0x8(%ebp),%eax - 11cea: 83 78 10 00 cmpl $0x0,0x10(%eax) - 11cee: 75 38 jne 11d28 <_ed_schedule+0x176> - 11cf0: 8b 55 08 mov 0x8(%ebp),%edx - 11cf3: 8b 45 08 mov 0x8(%ebp),%eax - 11cf6: 8b 80 2c 02 00 00 mov 0x22c(%eax),%eax - 11cfc: 83 c8 20 or $0x20,%eax - 11cff: 89 82 2c 02 00 00 mov %eax,0x22c(%edx) - 11d05: 8b 45 08 mov 0x8(%ebp),%eax - 11d08: 8b 40 04 mov 0x4(%eax),%eax - 11d0b: 83 c0 2c add $0x2c,%eax - 11d0e: c7 00 00 00 00 00 movl $0x0,(%eax) - 11d14: 8b 45 08 mov 0x8(%ebp),%eax - 11d17: 8b 50 04 mov 0x4(%eax),%edx - 11d1a: 83 c2 04 add $0x4,%edx - 11d1d: 8b 45 08 mov 0x8(%ebp),%eax - 11d20: 8b 80 2c 02 00 00 mov 0x22c(%eax),%eax - 11d26: 89 02 mov %eax,(%edx) - 11d28: 8b 55 08 mov 0x8(%ebp),%edx - 11d2b: 8b 45 0c mov 0xc(%ebp),%eax - 11d2e: 89 42 14 mov %eax,0x14(%edx) - 11d31: eb 4d jmp 11d80 <_ed_schedule+0x1ce> - 11d33: 8b 45 0c mov 0xc(%ebp),%eax - 11d36: 66 8b 40 2e mov 0x2e(%eax),%ax - 11d3a: 25 ff ff 00 00 and $0xffff,%eax - 11d3f: 50 push %eax - 11d40: 8b 45 0c mov 0xc(%ebp),%eax - 11d43: 66 8b 40 2c mov 0x2c(%eax),%ax - 11d47: 25 ff ff 00 00 and $0xffff,%eax - 11d4c: 50 push %eax - 11d4d: ff 75 08 pushl 0x8(%ebp) - 11d50: e8 95 fc ff ff call 119ea <_balance> - 11d55: 83 c4 0c add $0xc,%esp - 11d58: 89 45 fc mov %eax,0xfffffffc(%ebp) - 11d5b: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) - 11d5f: 79 08 jns 11d69 <_ed_schedule+0x1b7> - 11d61: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 11d64: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 11d67: eb 1e jmp 11d87 <_ed_schedule+0x1d5> - 11d69: 8b 55 0c mov 0xc(%ebp),%edx - 11d6c: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 11d6f: 88 42 2a mov %al,0x2a(%edx) - 11d72: ff 75 0c pushl 0xc(%ebp) - 11d75: ff 75 08 pushl 0x8(%ebp) - 11d78: e8 08 fd ff ff call 11a85 <_periodic_link> - 11d7d: 83 c4 08 add $0x8,%esp - 11d80: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) - 11d87: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 11d8a: c9 leave - 11d8b: c3 ret - -00011d8c <_periodic_unlink>: - 11d8c: 55 push %ebp - 11d8d: 89 e5 mov %esp,%ebp - 11d8f: 57 push %edi - 11d90: 56 push %esi - 11d91: 53 push %ebx - 11d92: 83 ec 10 sub $0x10,%esp - 11d95: 8b 45 0c mov 0xc(%ebp),%eax - 11d98: 8a 40 2a mov 0x2a(%eax),%al - 11d9b: 25 ff 00 00 00 and $0xff,%eax - 11da0: 89 45 f0 mov %eax,0xfffffff0(%ebp) - 11da3: 83 7d f0 1f cmpl $0x1f,0xfffffff0(%ebp) - 11da7: 0f 8f a9 00 00 00 jg 11e56 <_periodic_unlink+0xca> - 11dad: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 11db0: c1 e0 02 shl $0x2,%eax - 11db3: 03 45 08 add 0x8(%ebp),%eax - 11db6: 83 c0 1c add $0x1c,%eax - 11db9: 89 45 e8 mov %eax,0xffffffe8(%ebp) - 11dbc: 8b 55 08 mov 0x8(%ebp),%edx - 11dbf: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 11dc2: c1 e0 02 shl $0x2,%eax - 11dc5: 03 42 08 add 0x8(%edx),%eax - 11dc8: 89 45 e4 mov %eax,0xffffffe4(%ebp) - 11dcb: 8b 45 e8 mov 0xffffffe8(%ebp),%eax - 11dce: 83 38 00 cmpl $0x0,(%eax) - 11dd1: 74 21 je 11df4 <_periodic_unlink+0x68> - 11dd3: 8b 45 e8 mov 0xffffffe8(%ebp),%eax - 11dd6: 8b 00 mov (%eax),%eax - 11dd8: 89 45 ec mov %eax,0xffffffec(%ebp) - 11ddb: 3b 45 0c cmp 0xc(%ebp),%eax - 11dde: 74 14 je 11df4 <_periodic_unlink+0x68> - 11de0: 8b 45 ec mov 0xffffffec(%ebp),%eax - 11de3: 83 c0 0c add $0xc,%eax - 11de6: 89 45 e4 mov %eax,0xffffffe4(%ebp) - 11de9: 8b 45 ec mov 0xffffffec(%ebp),%eax - 11dec: 83 c0 18 add $0x18,%eax - 11def: 89 45 e8 mov %eax,0xffffffe8(%ebp) - 11df2: eb d7 jmp 11dcb <_periodic_unlink+0x3f> - 11df4: 8b 45 e8 mov 0xffffffe8(%ebp),%eax - 11df7: 83 38 00 cmpl $0x0,(%eax) - 11dfa: 74 16 je 11e12 <_periodic_unlink+0x86> - 11dfc: 8b 55 e4 mov 0xffffffe4(%ebp),%edx - 11dff: 8b 45 0c mov 0xc(%ebp),%eax - 11e02: 8b 40 0c mov 0xc(%eax),%eax - 11e05: 89 02 mov %eax,(%edx) - 11e07: 8b 55 e8 mov 0xffffffe8(%ebp),%edx - 11e0a: 8b 45 0c mov 0xc(%ebp),%eax - 11e0d: 8b 40 18 mov 0x18(%eax),%eax - 11e10: 89 02 mov %eax,(%edx) - 11e12: 8b 75 08 mov 0x8(%ebp),%esi - 11e15: 8b 7d f0 mov 0xfffffff0(%ebp),%edi - 11e18: 8b 4d 08 mov 0x8(%ebp),%ecx - 11e1b: 8b 5d f0 mov 0xfffffff0(%ebp),%ebx - 11e1e: 8b 45 0c mov 0xc(%ebp),%eax - 11e21: 66 8b 40 2e mov 0x2e(%eax),%ax - 11e25: 89 c2 mov %eax,%edx - 11e27: 81 e2 ff ff 00 00 and $0xffff,%edx - 11e2d: 8b 84 99 ac 01 00 00 mov 0x1ac(%ecx,%ebx,4),%eax - 11e34: 29 d0 sub %edx,%eax - 11e36: 89 84 be ac 01 00 00 mov %eax,0x1ac(%esi,%edi,4) - 11e3d: 8b 45 0c mov 0xc(%ebp),%eax - 11e40: 66 8b 40 2c mov 0x2c(%eax),%ax - 11e44: 89 c2 mov %eax,%edx - 11e46: 81 e2 ff ff 00 00 and $0xffff,%edx - 11e4c: 8d 45 f0 lea 0xfffffff0(%ebp),%eax - 11e4f: 01 10 add %edx,(%eax) - 11e51: e9 4d ff ff ff jmp 11da3 <_periodic_unlink+0x17> - 11e56: 8b 45 08 mov 0x8(%ebp),%eax - 11e59: 05 34 02 00 00 add $0x234,%eax - 11e5e: 50 push %eax - 11e5f: e8 17 f8 ff ff call 1167b <_hcd_to_bus> - 11e64: 83 c4 04 add $0x4,%esp - 11e67: 89 c3 mov %eax,%ebx - 11e69: 8b 45 0c mov 0xc(%ebp),%eax - 11e6c: 8b 4d 0c mov 0xc(%ebp),%ecx - 11e6f: 66 8b 40 2e mov 0x2e(%eax),%ax - 11e73: ba 00 00 00 00 mov $0x0,%edx - 11e78: 66 f7 71 2c divw 0x2c(%ecx) - 11e7c: 25 ff ff 00 00 and $0xffff,%eax - 11e81: 29 43 34 sub %eax,0x34(%ebx) - 11e84: 8d 65 f4 lea 0xfffffff4(%ebp),%esp - 11e87: 5b pop %ebx - 11e88: 5e pop %esi - 11e89: 5f pop %edi - 11e8a: 5d pop %ebp - 11e8b: c3 ret - -00011e8c <_ed_deschedule>: - 11e8c: 55 push %ebp - 11e8d: 89 e5 mov %esp,%ebp - 11e8f: 83 ec 04 sub $0x4,%esp - 11e92: 8b 55 0c mov 0xc(%ebp),%edx - 11e95: 8b 45 0c mov 0xc(%ebp),%eax - 11e98: 8b 00 mov (%eax),%eax - 11e9a: 80 cc 40 or $0x40,%ah - 11e9d: 89 02 mov %eax,(%edx) - 11e9f: 8b 45 0c mov 0xc(%ebp),%eax - 11ea2: ba 00 00 00 00 mov $0x0,%edx - 11ea7: 8a 50 29 mov 0x29(%eax),%dl - 11eaa: 89 55 fc mov %edx,0xfffffffc(%ebp) - 11ead: 83 7d fc 02 cmpl $0x2,0xfffffffc(%ebp) - 11eb1: 74 0f je 11ec2 <_ed_deschedule+0x36> - 11eb3: 83 7d fc 03 cmpl $0x3,0xfffffffc(%ebp) - 11eb7: 0f 84 e4 00 00 00 je 11fa1 <_ed_deschedule+0x115> - 11ebd: e9 b0 01 00 00 jmp 12072 <_ed_deschedule+0x1e6> - 11ec2: 8b 45 0c mov 0xc(%ebp),%eax - 11ec5: 83 78 1c 00 cmpl $0x0,0x1c(%eax) - 11ec9: 75 61 jne 11f2c <_ed_deschedule+0xa0> - 11ecb: 8b 45 0c mov 0xc(%ebp),%eax - 11ece: 83 78 0c 00 cmpl $0x0,0xc(%eax) - 11ed2: 75 43 jne 11f17 <_ed_deschedule+0x8b> - 11ed4: 8b 55 08 mov 0x8(%ebp),%edx - 11ed7: 8b 45 08 mov 0x8(%ebp),%eax - 11eda: 8b 80 2c 02 00 00 mov 0x22c(%eax),%eax - 11ee0: 83 e0 ef and $0xffffffef,%eax - 11ee3: 89 82 2c 02 00 00 mov %eax,0x22c(%edx) - 11ee9: 8b 45 08 mov 0x8(%ebp),%eax - 11eec: 8b 50 04 mov 0x4(%eax),%edx - 11eef: 83 c2 04 add $0x4,%edx - 11ef2: 8b 45 08 mov 0x8(%ebp),%eax - 11ef5: 8b 80 2c 02 00 00 mov 0x22c(%eax),%eax - 11efb: 89 02 mov %eax,(%edx) - 11efd: 8b 45 08 mov 0x8(%ebp),%eax - 11f00: 8b 40 04 mov 0x4(%eax),%eax - 11f03: 83 c0 24 add $0x24,%eax - 11f06: c7 00 00 00 00 00 movl $0x0,(%eax) - 11f0c: 8b 45 08 mov 0x8(%ebp),%eax - 11f0f: 8b 40 04 mov 0x4(%eax),%eax - 11f12: 83 c0 04 add $0x4,%eax - 11f15: 8b 00 mov (%eax),%eax - 11f17: 8b 45 08 mov 0x8(%ebp),%eax - 11f1a: 8b 50 04 mov 0x4(%eax),%edx - 11f1d: 83 c2 20 add $0x20,%edx - 11f20: 8b 45 0c mov 0xc(%ebp),%eax - 11f23: 83 c0 0c add $0xc,%eax - 11f26: 8b 00 mov (%eax),%eax - 11f28: 89 02 mov %eax,(%edx) - 11f2a: eb 1e jmp 11f4a <_ed_deschedule+0xbe> - 11f2c: 8b 45 0c mov 0xc(%ebp),%eax - 11f2f: 8b 50 1c mov 0x1c(%eax),%edx - 11f32: 8b 45 0c mov 0xc(%ebp),%eax - 11f35: 8b 40 18 mov 0x18(%eax),%eax - 11f38: 89 42 18 mov %eax,0x18(%edx) - 11f3b: 8b 45 0c mov 0xc(%ebp),%eax - 11f3e: 8b 50 1c mov 0x1c(%eax),%edx - 11f41: 8b 45 0c mov 0xc(%ebp),%eax - 11f44: 8b 40 0c mov 0xc(%eax),%eax - 11f47: 89 42 0c mov %eax,0xc(%edx) - 11f4a: 8b 45 08 mov 0x8(%ebp),%eax - 11f4d: 8b 40 18 mov 0x18(%eax),%eax - 11f50: 3b 45 0c cmp 0xc(%ebp),%eax - 11f53: 75 2b jne 11f80 <_ed_deschedule+0xf4> - 11f55: 8b 55 08 mov 0x8(%ebp),%edx - 11f58: 8b 45 0c mov 0xc(%ebp),%eax - 11f5b: 8b 40 1c mov 0x1c(%eax),%eax - 11f5e: 89 42 18 mov %eax,0x18(%edx) - 11f61: 8b 45 08 mov 0x8(%ebp),%eax - 11f64: 83 78 18 00 cmpl $0x0,0x18(%eax) - 11f68: 0f 84 12 01 00 00 je 12080 <_ed_deschedule+0x1f4> - 11f6e: 8b 45 08 mov 0x8(%ebp),%eax - 11f71: 8b 40 18 mov 0x18(%eax),%eax - 11f74: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) - 11f7b: e9 00 01 00 00 jmp 12080 <_ed_deschedule+0x1f4> - 11f80: 8b 45 0c mov 0xc(%ebp),%eax - 11f83: 83 78 18 00 cmpl $0x0,0x18(%eax) - 11f87: 0f 84 f3 00 00 00 je 12080 <_ed_deschedule+0x1f4> - 11f8d: 8b 45 0c mov 0xc(%ebp),%eax - 11f90: 8b 50 18 mov 0x18(%eax),%edx - 11f93: 8b 45 0c mov 0xc(%ebp),%eax - 11f96: 8b 40 1c mov 0x1c(%eax),%eax - 11f99: 89 42 1c mov %eax,0x1c(%edx) - 11f9c: e9 df 00 00 00 jmp 12080 <_ed_deschedule+0x1f4> - 11fa1: 8b 45 0c mov 0xc(%ebp),%eax - 11fa4: 83 78 1c 00 cmpl $0x0,0x1c(%eax) - 11fa8: 75 61 jne 1200b <_ed_deschedule+0x17f> - 11faa: 8b 45 0c mov 0xc(%ebp),%eax - 11fad: 83 78 0c 00 cmpl $0x0,0xc(%eax) - 11fb1: 75 43 jne 11ff6 <_ed_deschedule+0x16a> - 11fb3: 8b 55 08 mov 0x8(%ebp),%edx - 11fb6: 8b 45 08 mov 0x8(%ebp),%eax - 11fb9: 8b 80 2c 02 00 00 mov 0x22c(%eax),%eax - 11fbf: 83 e0 df and $0xffffffdf,%eax - 11fc2: 89 82 2c 02 00 00 mov %eax,0x22c(%edx) - 11fc8: 8b 45 08 mov 0x8(%ebp),%eax - 11fcb: 8b 50 04 mov 0x4(%eax),%edx - 11fce: 83 c2 04 add $0x4,%edx - 11fd1: 8b 45 08 mov 0x8(%ebp),%eax - 11fd4: 8b 80 2c 02 00 00 mov 0x22c(%eax),%eax - 11fda: 89 02 mov %eax,(%edx) - 11fdc: 8b 45 08 mov 0x8(%ebp),%eax - 11fdf: 8b 40 04 mov 0x4(%eax),%eax - 11fe2: 83 c0 2c add $0x2c,%eax - 11fe5: c7 00 00 00 00 00 movl $0x0,(%eax) - 11feb: 8b 45 08 mov 0x8(%ebp),%eax - 11fee: 8b 40 04 mov 0x4(%eax),%eax - 11ff1: 83 c0 04 add $0x4,%eax - 11ff4: 8b 00 mov (%eax),%eax - 11ff6: 8b 45 08 mov 0x8(%ebp),%eax - 11ff9: 8b 50 04 mov 0x4(%eax),%edx - 11ffc: 83 c2 28 add $0x28,%edx - 11fff: 8b 45 0c mov 0xc(%ebp),%eax - 12002: 83 c0 0c add $0xc,%eax - 12005: 8b 00 mov (%eax),%eax - 12007: 89 02 mov %eax,(%edx) - 12009: eb 1e jmp 12029 <_ed_deschedule+0x19d> - 1200b: 8b 45 0c mov 0xc(%ebp),%eax - 1200e: 8b 50 1c mov 0x1c(%eax),%edx - 12011: 8b 45 0c mov 0xc(%ebp),%eax - 12014: 8b 40 18 mov 0x18(%eax),%eax - 12017: 89 42 18 mov %eax,0x18(%edx) - 1201a: 8b 45 0c mov 0xc(%ebp),%eax - 1201d: 8b 50 1c mov 0x1c(%eax),%edx - 12020: 8b 45 0c mov 0xc(%ebp),%eax - 12023: 8b 40 0c mov 0xc(%eax),%eax - 12026: 89 42 0c mov %eax,0xc(%edx) - 12029: 8b 45 08 mov 0x8(%ebp),%eax - 1202c: 8b 40 14 mov 0x14(%eax),%eax - 1202f: 3b 45 0c cmp 0xc(%ebp),%eax - 12032: 75 24 jne 12058 <_ed_deschedule+0x1cc> - 12034: 8b 55 08 mov 0x8(%ebp),%edx - 12037: 8b 45 0c mov 0xc(%ebp),%eax - 1203a: 8b 40 1c mov 0x1c(%eax),%eax - 1203d: 89 42 14 mov %eax,0x14(%edx) - 12040: 8b 45 08 mov 0x8(%ebp),%eax - 12043: 83 78 14 00 cmpl $0x0,0x14(%eax) - 12047: 74 37 je 12080 <_ed_deschedule+0x1f4> - 12049: 8b 45 08 mov 0x8(%ebp),%eax - 1204c: 8b 40 14 mov 0x14(%eax),%eax - 1204f: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) - 12056: eb 28 jmp 12080 <_ed_deschedule+0x1f4> - 12058: 8b 45 0c mov 0xc(%ebp),%eax - 1205b: 83 78 18 00 cmpl $0x0,0x18(%eax) - 1205f: 74 1f je 12080 <_ed_deschedule+0x1f4> - 12061: 8b 45 0c mov 0xc(%ebp),%eax - 12064: 8b 50 18 mov 0x18(%eax),%edx - 12067: 8b 45 0c mov 0xc(%ebp),%eax - 1206a: 8b 40 1c mov 0x1c(%eax),%eax - 1206d: 89 42 1c mov %eax,0x1c(%edx) - 12070: eb 0e jmp 12080 <_ed_deschedule+0x1f4> - 12072: ff 75 0c pushl 0xc(%ebp) - 12075: ff 75 08 pushl 0x8(%ebp) - 12078: e8 0f fd ff ff call 11d8c <_periodic_unlink> - 1207d: 83 c4 08 add $0x8,%esp - 12080: 8b 45 0c mov 0xc(%ebp),%eax - 12083: 80 78 28 02 cmpb $0x2,0x28(%eax) - 12087: 75 25 jne 120ae <_ed_deschedule+0x222> - 12089: 8b 45 0c mov 0xc(%ebp),%eax - 1208c: c6 40 28 00 movb $0x0,0x28(%eax) - 12090: 8b 55 0c mov 0xc(%ebp),%edx - 12093: 8b 45 0c mov 0xc(%ebp),%eax - 12096: 8b 00 mov (%eax),%eax - 12098: 25 ff bf ff f7 and $0xf7ffbfff,%eax - 1209d: 89 02 mov %eax,(%edx) - 1209f: 8b 55 0c mov 0xc(%ebp),%edx - 120a2: 8b 45 0c mov 0xc(%ebp),%eax - 120a5: 8b 40 08 mov 0x8(%eax),%eax - 120a8: 83 e0 fe and $0xfffffffe,%eax - 120ab: 89 42 08 mov %eax,0x8(%edx) - 120ae: c9 leave - 120af: c3 ret - -000120b0 <_ed_get>: - 120b0: 55 push %ebp - 120b1: 89 e5 mov %esp,%ebp - 120b3: 83 ec 38 sub $0x38,%esp - 120b6: 8b 45 10 mov 0x10(%ebp),%eax - 120b9: c1 e8 07 shr $0x7,%eax - 120bc: 83 f0 01 xor $0x1,%eax - 120bf: 83 e0 01 and $0x1,%eax - 120c2: 89 45 fc mov %eax,0xfffffffc(%ebp) - 120c5: 8b 45 10 mov 0x10(%ebp),%eax - 120c8: c1 e8 1e shr $0x1e,%eax - 120cb: 83 e0 03 and $0x3,%eax - 120ce: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 120d1: 8b 45 0c mov 0xc(%ebp),%eax - 120d4: 8b 80 98 01 00 00 mov 0x198(%eax),%eax - 120da: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 120dd: 8b 45 10 mov 0x10(%ebp),%eax - 120e0: c1 e8 0f shr $0xf,%eax - 120e3: 83 e0 0f and $0xf,%eax - 120e6: 01 c0 add %eax,%eax - 120e8: 89 45 ec mov %eax,0xffffffec(%ebp) - 120eb: 83 7d f8 02 cmpl $0x2,0xfffffff8(%ebp) - 120ef: 74 0c je 120fd <_ed_get+0x4d> - 120f1: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) - 120f5: 74 06 je 120fd <_ed_get+0x4d> - 120f7: 8d 45 ec lea 0xffffffec(%ebp),%eax - 120fa: 83 08 01 orl $0x1,(%eax) - 120fd: c7 45 e8 00 00 00 00 movl $0x0,0xffffffe8(%ebp) - 12104: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 12107: 8b 55 ec mov 0xffffffec(%ebp),%edx - 1210a: 8b 44 90 10 mov 0x10(%eax,%edx,4),%eax - 1210e: 89 45 f0 mov %eax,0xfffffff0(%ebp) - 12111: 85 c0 test %eax,%eax - 12113: 0f 85 92 00 00 00 jne 121ab <_ed_get+0xfb> - 12119: 83 ec 08 sub $0x8,%esp - 1211c: 6a 00 push $0x0 - 1211e: ff 75 08 pushl 0x8(%ebp) - 12121: e8 3e f7 ff ff call 11864 <_ed_alloc> - 12126: 83 c4 10 add $0x10,%esp - 12129: 89 45 f0 mov %eax,0xfffffff0(%ebp) - 1212c: 83 7d f0 00 cmpl $0x0,0xfffffff0(%ebp) - 12130: 75 05 jne 12137 <_ed_get+0x87> - 12132: e9 d0 01 00 00 jmp 12307 <_ed_get+0x257> - 12137: 8b 4d f4 mov 0xfffffff4(%ebp),%ecx - 1213a: 8b 55 ec mov 0xffffffec(%ebp),%edx - 1213d: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 12140: 89 44 91 10 mov %eax,0x10(%ecx,%edx,4) - 12144: 83 ec 08 sub $0x8,%esp - 12147: 6a 00 push $0x0 - 12149: ff 75 08 pushl 0x8(%ebp) - 1214c: e8 30 f6 ff ff call 11781 <_td_alloc> - 12151: 83 c4 10 add $0x10,%esp - 12154: 89 45 e4 mov %eax,0xffffffe4(%ebp) - 12157: 83 7d e4 00 cmpl $0x0,0xffffffe4(%ebp) - 1215b: 75 1d jne 1217a <_ed_get+0xca> - 1215d: 83 ec 08 sub $0x8,%esp - 12160: ff 75 f0 pushl 0xfffffff0(%ebp) - 12163: ff 75 08 pushl 0x8(%ebp) - 12166: e8 60 f7 ff ff call 118cb <_ed_free> - 1216b: 83 c4 10 add $0x10,%esp - 1216e: c7 45 f0 00 00 00 00 movl $0x0,0xfffffff0(%ebp) - 12175: e9 8d 01 00 00 jmp 12307 <_ed_get+0x257> - 1217a: 8b 55 f0 mov 0xfffffff0(%ebp),%edx - 1217d: 8b 45 e4 mov 0xffffffe4(%ebp),%eax - 12180: 89 42 14 mov %eax,0x14(%edx) - 12183: 8b 55 f0 mov 0xfffffff0(%ebp),%edx - 12186: 8b 45 e4 mov 0xffffffe4(%ebp),%eax - 12189: 8b 40 24 mov 0x24(%eax),%eax - 1218c: 89 42 04 mov %eax,0x4(%edx) - 1218f: 8b 55 f0 mov 0xfffffff0(%ebp),%edx - 12192: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 12195: 8b 40 04 mov 0x4(%eax),%eax - 12198: 89 42 08 mov %eax,0x8(%edx) - 1219b: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 1219e: c6 40 28 00 movb $0x0,0x28(%eax) - 121a2: 8b 55 f0 mov 0xfffffff0(%ebp),%edx - 121a5: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 121a8: 88 42 29 mov %al,0x29(%edx) - 121ab: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 121ae: 80 78 28 00 cmpb $0x0,0x28(%eax) - 121b2: 0f 85 4f 01 00 00 jne 12307 <_ed_get+0x257> - 121b8: 8b 45 10 mov 0x10(%ebp),%eax - 121bb: c1 e8 08 shr $0x8,%eax - 121be: 83 e0 7f and $0x7f,%eax - 121c1: 89 45 e4 mov %eax,0xffffffe4(%ebp) - 121c4: 8b 45 ec mov 0xffffffec(%ebp),%eax - 121c7: d1 e8 shr %eax - 121c9: 89 c2 mov %eax,%edx - 121cb: c1 e2 07 shl $0x7,%edx - 121ce: 8d 45 e4 lea 0xffffffe4(%ebp),%eax - 121d1: 09 10 or %edx,(%eax) - 121d3: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) - 121d7: 74 1e je 121f7 <_ed_get+0x147> - 121d9: 8b 55 0c mov 0xc(%ebp),%edx - 121dc: 8b 45 10 mov 0x10(%ebp),%eax - 121df: c1 e8 0f shr $0xf,%eax - 121e2: 83 e0 0f and $0xf,%eax - 121e5: 8b 44 82 78 mov 0x78(%edx,%eax,4),%eax - 121e9: c1 e0 10 shl $0x10,%eax - 121ec: 89 45 e0 mov %eax,0xffffffe0(%ebp) - 121ef: 8b 45 e4 mov 0xffffffe4(%ebp),%eax - 121f2: 09 45 e0 or %eax,0xffffffe0(%ebp) - 121f5: eb 1c jmp 12213 <_ed_get+0x163> - 121f7: 8b 55 0c mov 0xc(%ebp),%edx - 121fa: 8b 45 10 mov 0x10(%ebp),%eax - 121fd: c1 e8 0f shr $0xf,%eax - 12200: 83 e0 0f and $0xf,%eax - 12203: 8b 44 82 38 mov 0x38(%edx,%eax,4),%eax - 12207: c1 e0 10 shl $0x10,%eax - 1220a: 89 45 e0 mov %eax,0xffffffe0(%ebp) - 1220d: 8b 55 e4 mov 0xffffffe4(%ebp),%edx - 12210: 09 55 e0 or %edx,0xffffffe0(%ebp) - 12213: 8b 45 e0 mov 0xffffffe0(%ebp),%eax - 12216: 89 45 e4 mov %eax,0xffffffe4(%ebp) - 12219: 8b 45 0c mov 0xc(%ebp),%eax - 1221c: 83 78 18 01 cmpl $0x1,0x18(%eax) - 12220: 75 09 jne 1222b <_ed_get+0x17b> - 12222: 8d 45 e4 lea 0xffffffe4(%ebp),%eax - 12225: 81 08 00 20 00 00 orl $0x2000,(%eax) - 1222b: 83 7d f8 02 cmpl $0x2,0xfffffff8(%ebp) - 1222f: 0f 84 ca 00 00 00 je 122ff <_ed_get+0x24f> - 12235: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) - 12239: 74 0b je 12246 <_ed_get+0x196> - 1223b: 8b 55 e4 mov 0xffffffe4(%ebp),%edx - 1223e: 80 ce 08 or $0x8,%dh - 12241: 89 55 dc mov %edx,0xffffffdc(%ebp) - 12244: eb 09 jmp 1224f <_ed_get+0x19f> - 12246: 8b 45 e4 mov 0xffffffe4(%ebp),%eax - 12249: 80 cc 10 or $0x10,%ah - 1224c: 89 45 dc mov %eax,0xffffffdc(%ebp) - 1224f: 8b 55 dc mov 0xffffffdc(%ebp),%edx - 12252: 89 55 e4 mov %edx,0xffffffe4(%ebp) - 12255: 83 7d f8 03 cmpl $0x3,0xfffffff8(%ebp) - 12259: 0f 84 a0 00 00 00 je 122ff <_ed_get+0x24f> - 1225f: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) - 12263: 75 0b jne 12270 <_ed_get+0x1c0> - 12265: 8d 45 e4 lea 0xffffffe4(%ebp),%eax - 12268: 81 08 00 80 00 00 orl $0x8000,(%eax) - 1226e: eb 0d jmp 1227d <_ed_get+0x1cd> - 12270: 83 7d 14 20 cmpl $0x20,0x14(%ebp) - 12274: 7e 07 jle 1227d <_ed_get+0x1cd> - 12276: c7 45 14 20 00 00 00 movl $0x20,0x14(%ebp) - 1227d: 8b 55 f0 mov 0xfffffff0(%ebp),%edx - 12280: 8b 45 14 mov 0x14(%ebp),%eax - 12283: 66 89 42 2c mov %ax,0x2c(%edx) - 12287: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 1228a: 89 45 d8 mov %eax,0xffffffd8(%ebp) - 1228d: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) - 12291: 74 15 je 122a8 <_ed_get+0x1f8> - 12293: 8b 55 0c mov 0xc(%ebp),%edx - 12296: 8b 45 10 mov 0x10(%ebp),%eax - 12299: c1 e8 0f shr $0xf,%eax - 1229c: 83 e0 0f and $0xf,%eax - 1229f: 8b 44 82 78 mov 0x78(%edx,%eax,4),%eax - 122a3: 89 45 d4 mov %eax,0xffffffd4(%ebp) - 122a6: eb 13 jmp 122bb <_ed_get+0x20b> - 122a8: 8b 55 0c mov 0xc(%ebp),%edx - 122ab: 8b 45 10 mov 0x10(%ebp),%eax - 122ae: c1 e8 0f shr $0xf,%eax - 122b1: 83 e0 0f and $0xf,%eax - 122b4: 8b 44 82 38 mov 0x38(%edx,%eax,4),%eax - 122b8: 89 45 d4 mov %eax,0xffffffd4(%ebp) - 122bb: ff 75 d4 pushl 0xffffffd4(%ebp) - 122be: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) - 122c2: 0f 94 c0 sete %al - 122c5: 25 ff 00 00 00 and $0xff,%eax - 122ca: 50 push %eax - 122cb: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) - 122cf: 0f 94 c0 sete %al - 122d2: 25 ff 00 00 00 and $0xff,%eax - 122d7: 50 push %eax - 122d8: 8b 45 0c mov 0xc(%ebp),%eax - 122db: ff 70 18 pushl 0x18(%eax) - 122de: e8 ed 22 00 00 call 145d0 <_usb_calc_bus_time@16> - 122e3: 89 c1 mov %eax,%ecx - 122e5: b8 d3 4d 62 10 mov $0x10624dd3,%eax - 122ea: f7 e9 imul %ecx - 122ec: c1 fa 06 sar $0x6,%edx - 122ef: 89 c8 mov %ecx,%eax - 122f1: c1 f8 1f sar $0x1f,%eax - 122f4: 29 c2 sub %eax,%edx - 122f6: 89 d0 mov %edx,%eax - 122f8: 8b 55 d8 mov 0xffffffd8(%ebp),%edx - 122fb: 66 89 42 2e mov %ax,0x2e(%edx) - 122ff: 8b 55 f0 mov 0xfffffff0(%ebp),%edx - 12302: 8b 45 e4 mov 0xffffffe4(%ebp),%eax - 12305: 89 02 mov %eax,(%edx) - 12307: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 1230a: c9 leave - 1230b: c3 ret - -0001230c <_start_urb_unlink>: - 1230c: 55 push %ebp - 1230d: 89 e5 mov %esp,%ebp - 1230f: 8b 55 0c mov 0xc(%ebp),%edx - 12312: 8b 45 0c mov 0xc(%ebp),%eax - 12315: 8b 00 mov (%eax),%eax - 12317: 0d 00 00 00 08 or $0x8000000,%eax - 1231c: 89 02 mov %eax,(%edx) - 1231e: 8b 45 0c mov 0xc(%ebp),%eax - 12321: c6 40 28 01 movb $0x1,0x28(%eax) - 12325: ff 75 0c pushl 0xc(%ebp) - 12328: ff 75 08 pushl 0x8(%ebp) - 1232b: e8 5c fb ff ff call 11e8c <_ed_deschedule> - 12330: 83 c4 08 add $0x8,%esp - 12333: 8b 55 0c mov 0xc(%ebp),%edx - 12336: 8b 45 08 mov 0x8(%ebp),%eax - 12339: 8b 40 08 mov 0x8(%eax),%eax - 1233c: 66 8b 80 80 00 00 00 mov 0x80(%eax),%ax - 12343: 40 inc %eax - 12344: 66 89 42 32 mov %ax,0x32(%edx) - 12348: 8b 55 0c mov 0xc(%ebp),%edx - 1234b: 8b 45 08 mov 0x8(%ebp),%eax - 1234e: 8b 40 10 mov 0x10(%eax),%eax - 12351: 89 42 18 mov %eax,0x18(%edx) - 12354: 8b 45 0c mov 0xc(%ebp),%eax - 12357: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) - 1235e: 8b 55 08 mov 0x8(%ebp),%edx - 12361: 8b 45 0c mov 0xc(%ebp),%eax - 12364: 89 42 10 mov %eax,0x10(%edx) - 12367: 8b 45 08 mov 0x8(%ebp),%eax - 1236a: 83 b8 a8 01 00 00 00 cmpl $0x0,0x1a8(%eax) - 12371: 75 29 jne 1239c <_start_urb_unlink+0x90> - 12373: 8b 45 08 mov 0x8(%ebp),%eax - 12376: 8b 40 04 mov 0x4(%eax),%eax - 12379: 83 c0 0c add $0xc,%eax - 1237c: c7 00 04 00 00 00 movl $0x4,(%eax) - 12382: 8b 45 08 mov 0x8(%ebp),%eax - 12385: 8b 40 04 mov 0x4(%eax),%eax - 12388: 83 c0 10 add $0x10,%eax - 1238b: c7 00 04 00 00 00 movl $0x4,(%eax) - 12391: 8b 45 08 mov 0x8(%ebp),%eax - 12394: 8b 40 04 mov 0x4(%eax),%eax - 12397: 83 c0 04 add $0x4,%eax - 1239a: 8b 00 mov (%eax),%eax - 1239c: c9 leave - 1239d: c3 ret - -0001239e <_td_fill>: - 1239e: 55 push %ebp - 1239f: 89 e5 mov %esp,%ebp - 123a1: 83 ec 18 sub $0x18,%esp - 123a4: 8b 45 18 mov 0x18(%ebp),%eax - 123a7: 8b 40 08 mov 0x8(%eax),%eax - 123aa: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 123ad: 8b 45 0c mov 0xc(%ebp),%eax - 123b0: 25 00 00 01 00 and $0x10000,%eax - 123b5: 89 45 f0 mov %eax,0xfffffff0(%ebp) - 123b8: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 123bb: 66 8b 40 04 mov 0x4(%eax),%ax - 123bf: 25 ff ff 00 00 and $0xffff,%eax - 123c4: 48 dec %eax - 123c5: 3b 45 1c cmp 0x1c(%ebp),%eax - 123c8: 75 12 jne 123dc <_td_fill+0x3e> - 123ca: 8b 45 18 mov 0x18(%ebp),%eax - 123cd: 8b 40 20 mov 0x20(%eax),%eax - 123d0: c1 e8 07 shr $0x7,%eax - 123d3: 83 e0 01 and $0x1,%eax - 123d6: 85 c0 test %eax,%eax - 123d8: 75 02 jne 123dc <_td_fill+0x3e> - 123da: eb 09 jmp 123e5 <_td_fill+0x47> - 123dc: 8d 45 0c lea 0xc(%ebp),%eax - 123df: 81 08 00 00 c0 00 orl $0xc00000,(%eax) - 123e5: 8b 55 f4 mov 0xfffffff4(%ebp),%edx - 123e8: 8b 45 1c mov 0x1c(%ebp),%eax - 123eb: 8b 44 82 0c mov 0xc(%edx,%eax,4),%eax - 123ef: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 123f2: 8b 55 f4 mov 0xfffffff4(%ebp),%edx - 123f5: 8b 4d 1c mov 0x1c(%ebp),%ecx - 123f8: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 123fb: 8b 00 mov (%eax),%eax - 123fd: 8b 40 14 mov 0x14(%eax),%eax - 12400: 89 44 8a 0c mov %eax,0xc(%edx,%ecx,4) - 12404: 89 45 fc mov %eax,0xfffffffc(%ebp) - 12407: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 1240a: 8b 10 mov (%eax),%edx - 1240c: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 1240f: 89 42 14 mov %eax,0x14(%edx) - 12412: 8b 55 fc mov 0xfffffffc(%ebp),%edx - 12415: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 12418: 8b 00 mov (%eax),%eax - 1241a: 89 42 14 mov %eax,0x14(%edx) - 1241d: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 12420: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) - 12427: 8b 55 fc mov 0xfffffffc(%ebp),%edx - 1242a: 8b 45 1c mov 0x1c(%ebp),%eax - 1242d: 88 42 12 mov %al,0x12(%edx) - 12430: 8b 55 fc mov 0xfffffffc(%ebp),%edx - 12433: 8b 45 18 mov 0x18(%ebp),%eax - 12436: 89 42 20 mov %eax,0x20(%edx) - 12439: 8b 55 fc mov 0xfffffffc(%ebp),%edx - 1243c: 8b 45 10 mov 0x10(%ebp),%eax - 1243f: 89 42 28 mov %eax,0x28(%edx) - 12442: 83 7d 14 00 cmpl $0x0,0x14(%ebp) - 12446: 75 07 jne 1244f <_td_fill+0xb1> - 12448: c7 45 10 00 00 00 00 movl $0x0,0x10(%ebp) - 1244f: 8b 55 fc mov 0xfffffffc(%ebp),%edx - 12452: 8b 45 0c mov 0xc(%ebp),%eax - 12455: 89 02 mov %eax,(%edx) - 12457: 83 7d f0 00 cmpl $0x0,0xfffffff0(%ebp) - 1245b: 74 31 je 1248e <_td_fill+0xf0> - 1245d: 8b 55 fc mov 0xfffffffc(%ebp),%edx - 12460: 8b 45 10 mov 0x10(%ebp),%eax - 12463: 25 00 f0 ff ff and $0xfffff000,%eax - 12468: 89 42 04 mov %eax,0x4(%edx) - 1246b: 8b 55 fc mov 0xfffffffc(%ebp),%edx - 1246e: 8b 45 10 mov 0x10(%ebp),%eax - 12471: 25 ff 0f 00 00 and $0xfff,%eax - 12476: 0d 00 e0 ff ff or $0xffffe000,%eax - 1247b: 66 89 42 10 mov %ax,0x10(%edx) - 1247f: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 12482: 8b 50 14 mov 0x14(%eax),%edx - 12485: 8b 45 0c mov 0xc(%ebp),%eax - 12488: 66 89 42 30 mov %ax,0x30(%edx) - 1248c: eb 09 jmp 12497 <_td_fill+0xf9> - 1248e: 8b 55 fc mov 0xfffffffc(%ebp),%edx - 12491: 8b 45 10 mov 0x10(%ebp),%eax - 12494: 89 42 04 mov %eax,0x4(%edx) - 12497: 83 7d 10 00 cmpl $0x0,0x10(%ebp) - 1249b: 74 0f je 124ac <_td_fill+0x10e> - 1249d: 8b 55 fc mov 0xfffffffc(%ebp),%edx - 124a0: 8b 45 14 mov 0x14(%ebp),%eax - 124a3: 03 45 10 add 0x10(%ebp),%eax - 124a6: 48 dec %eax - 124a7: 89 42 0c mov %eax,0xc(%edx) - 124aa: eb 0a jmp 124b6 <_td_fill+0x118> - 124ac: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 124af: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) - 124b6: 8b 55 fc mov 0xfffffffc(%ebp),%edx - 124b9: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 124bc: 8b 40 24 mov 0x24(%eax),%eax - 124bf: 89 42 08 mov %eax,0x8(%edx) - 124c2: 83 ec 08 sub $0x8,%esp - 124c5: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 124c8: 8b 40 14 mov 0x14(%eax),%eax - 124cb: 83 c0 20 add $0x20,%eax - 124ce: 50 push %eax - 124cf: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 124d2: 83 c0 2c add $0x2c,%eax - 124d5: 50 push %eax - 124d6: e8 4c 00 00 00 call 12527 <_list_add_tail> - 124db: 83 c4 10 add $0x10,%esp - 124de: 8b 55 fc mov 0xfffffffc(%ebp),%edx - 124e1: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 124e4: 8b 40 24 mov 0x24(%eax),%eax - 124e7: c1 e8 06 shr $0x6,%eax - 124ea: 33 42 24 xor 0x24(%edx),%eax - 124ed: 83 e0 3f and $0x3f,%eax - 124f0: 89 45 ec mov %eax,0xffffffec(%ebp) - 124f3: 8b 4d fc mov 0xfffffffc(%ebp),%ecx - 124f6: 8b 55 08 mov 0x8(%ebp),%edx - 124f9: 8b 45 ec mov 0xffffffec(%ebp),%eax - 124fc: 8b 84 82 a4 00 00 00 mov 0xa4(%edx,%eax,4),%eax - 12503: 89 41 18 mov %eax,0x18(%ecx) - 12506: 8b 4d 08 mov 0x8(%ebp),%ecx - 12509: 8b 55 ec mov 0xffffffec(%ebp),%edx - 1250c: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 1250f: 89 84 91 a4 00 00 00 mov %eax,0xa4(%ecx,%edx,4) - 12516: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 12519: 8b 50 14 mov 0x14(%eax),%edx - 1251c: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 1251f: 8b 40 08 mov 0x8(%eax),%eax - 12522: 89 42 04 mov %eax,0x4(%edx) - 12525: c9 leave - 12526: c3 ret - -00012527 <_list_add_tail>: - 12527: 55 push %ebp - 12528: 89 e5 mov %esp,%ebp - 1252a: 83 ec 08 sub $0x8,%esp - 1252d: 83 ec 04 sub $0x4,%esp - 12530: ff 75 0c pushl 0xc(%ebp) - 12533: 8b 45 0c mov 0xc(%ebp),%eax - 12536: ff 70 04 pushl 0x4(%eax) - 12539: ff 75 08 pushl 0x8(%ebp) - 1253c: e8 05 00 00 00 call 12546 <___list_add> - 12541: 83 c4 10 add $0x10,%esp - 12544: c9 leave - 12545: c3 ret - -00012546 <___list_add>: - 12546: 55 push %ebp - 12547: 89 e5 mov %esp,%ebp - 12549: 8b 55 10 mov 0x10(%ebp),%edx - 1254c: 8b 45 08 mov 0x8(%ebp),%eax - 1254f: 89 42 04 mov %eax,0x4(%edx) - 12552: 8b 55 08 mov 0x8(%ebp),%edx - 12555: 8b 45 10 mov 0x10(%ebp),%eax - 12558: 89 02 mov %eax,(%edx) - 1255a: 8b 55 08 mov 0x8(%ebp),%edx - 1255d: 8b 45 0c mov 0xc(%ebp),%eax - 12560: 89 42 04 mov %eax,0x4(%edx) - 12563: 8b 55 0c mov 0xc(%ebp),%edx - 12566: 8b 45 08 mov 0x8(%ebp),%eax - 12569: 89 02 mov %eax,(%edx) - 1256b: 5d pop %ebp - 1256c: c3 ret - -0001256d <_td_submit_urb>: - 1256d: 55 push %ebp - 1256e: 89 e5 mov %esp,%ebp - 12570: 57 push %edi - 12571: 56 push %esi - 12572: 53 push %ebx - 12573: 83 ec 2c sub $0x2c,%esp - 12576: 8b 45 0c mov 0xc(%ebp),%eax - 12579: 8b 40 08 mov 0x8(%eax),%eax - 1257c: 89 45 f0 mov %eax,0xfffffff0(%ebp) - 1257f: 8b 45 0c mov 0xc(%ebp),%eax - 12582: 8b 40 2c mov 0x2c(%eax),%eax - 12585: 89 45 e8 mov %eax,0xffffffe8(%ebp) - 12588: c7 45 e4 00 00 00 00 movl $0x0,0xffffffe4(%ebp) - 1258f: c7 45 e0 00 00 00 00 movl $0x0,0xffffffe0(%ebp) - 12596: 8b 45 0c mov 0xc(%ebp),%eax - 12599: 8b 40 18 mov 0x18(%eax),%eax - 1259c: c1 e8 07 shr $0x7,%eax - 1259f: 83 f0 01 xor $0x1,%eax - 125a2: 83 e0 01 and $0x1,%eax - 125a5: 89 45 dc mov %eax,0xffffffdc(%ebp) - 125a8: 8b 45 0c mov 0xc(%ebp),%eax - 125ab: 8b 58 14 mov 0x14(%eax),%ebx - 125ae: 8b 55 dc mov 0xffffffdc(%ebp),%edx - 125b1: 8b 45 0c mov 0xc(%ebp),%eax - 125b4: 8b 40 18 mov 0x18(%eax),%eax - 125b7: c1 e8 0f shr $0xf,%eax - 125ba: 89 c1 mov %eax,%ecx - 125bc: 83 e1 0f and $0xf,%ecx - 125bf: 8b 44 93 28 mov 0x28(%ebx,%edx,4),%eax - 125c3: d3 e8 shr %cl,%eax - 125c5: 83 e0 01 and $0x1,%eax - 125c8: 85 c0 test %eax,%eax - 125ca: 75 5d jne 12629 <_td_submit_urb+0xbc> - 125cc: 8b 45 0c mov 0xc(%ebp),%eax - 125cf: 8b 70 14 mov 0x14(%eax),%esi - 125d2: 8b 7d dc mov 0xffffffdc(%ebp),%edi - 125d5: 8b 45 0c mov 0xc(%ebp),%eax - 125d8: 8b 50 14 mov 0x14(%eax),%edx - 125db: 8b 5d dc mov 0xffffffdc(%ebp),%ebx - 125de: 8b 45 0c mov 0xc(%ebp),%eax - 125e1: 8b 40 18 mov 0x18(%eax),%eax - 125e4: c1 e8 0f shr $0xf,%eax - 125e7: 89 c1 mov %eax,%ecx - 125e9: 83 e1 0f and $0xf,%ecx - 125ec: b8 01 00 00 00 mov $0x1,%eax - 125f1: d3 e0 shl %cl,%eax - 125f3: f7 d0 not %eax - 125f5: 23 44 9a 28 and 0x28(%edx,%ebx,4),%eax - 125f9: 89 c2 mov %eax,%edx - 125fb: 8b 45 0c mov 0xc(%ebp),%eax - 125fe: 8b 40 18 mov 0x18(%eax),%eax - 12601: c1 e8 0f shr $0xf,%eax - 12604: 89 c1 mov %eax,%ecx - 12606: 83 e1 0f and $0xf,%ecx - 12609: b8 01 00 00 00 mov $0x1,%eax - 1260e: d3 e0 shl %cl,%eax - 12610: 09 d0 or %edx,%eax - 12612: 89 44 be 28 mov %eax,0x28(%esi,%edi,4) - 12616: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 12619: 8b 10 mov (%eax),%edx - 1261b: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 1261e: 8b 00 mov (%eax),%eax - 12620: 8b 40 08 mov 0x8(%eax),%eax - 12623: 83 e0 fd and $0xfffffffd,%eax - 12626: 89 42 08 mov %eax,0x8(%edx) - 12629: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 1262c: 66 c7 40 06 00 00 movw $0x0,0x6(%eax) - 12632: 83 7d e8 00 cmpl $0x0,0xffffffe8(%ebp) - 12636: 74 0b je 12643 <_td_submit_urb+0xd6> - 12638: 8b 45 0c mov 0xc(%ebp),%eax - 1263b: 8b 40 28 mov 0x28(%eax),%eax - 1263e: 89 45 ec mov %eax,0xffffffec(%ebp) - 12641: eb 07 jmp 1264a <_td_submit_urb+0xdd> - 12643: c7 45 ec 00 00 00 00 movl $0x0,0xffffffec(%ebp) - 1264a: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 1264d: 8b 00 mov (%eax),%eax - 1264f: ba 00 00 00 00 mov $0x0,%edx - 12654: 8a 50 29 mov 0x29(%eax),%dl - 12657: 89 55 c8 mov %edx,0xffffffc8(%ebp) - 1265a: 83 7d c8 01 cmpl $0x1,0xffffffc8(%ebp) - 1265e: 74 2a je 1268a <_td_submit_urb+0x11d> - 12660: 83 7d c8 01 cmpl $0x1,0xffffffc8(%ebp) - 12664: 7f 0f jg 12675 <_td_submit_urb+0x108> - 12666: 83 7d c8 00 cmpl $0x0,0xffffffc8(%ebp) - 1266a: 0f 84 fa 01 00 00 je 1286a <_td_submit_urb+0x2fd> - 12670: e9 86 02 00 00 jmp 128fb <_td_submit_urb+0x38e> - 12675: 83 7d c8 02 cmpl $0x2,0xffffffc8(%ebp) - 12679: 0f 84 18 01 00 00 je 12797 <_td_submit_urb+0x22a> - 1267f: 83 7d c8 03 cmpl $0x3,0xffffffc8(%ebp) - 12683: 74 19 je 1269e <_td_submit_urb+0x131> - 12685: e9 71 02 00 00 jmp 128fb <_td_submit_urb+0x38e> - 1268a: 8b 45 08 mov 0x8(%ebp),%eax - 1268d: 05 34 02 00 00 add $0x234,%eax - 12692: 50 push %eax - 12693: e8 e3 ef ff ff call 1167b <_hcd_to_bus> - 12698: 83 c4 04 add $0x4,%esp - 1269b: ff 40 38 incl 0x38(%eax) - 1269e: 83 7d dc 00 cmpl $0x0,0xffffffdc(%ebp) - 126a2: 74 09 je 126ad <_td_submit_urb+0x140> - 126a4: c7 45 d4 00 00 08 f0 movl $0xf0080000,0xffffffd4(%ebp) - 126ab: eb 07 jmp 126b4 <_td_submit_urb+0x147> - 126ad: c7 45 d4 00 00 10 f0 movl $0xf0100000,0xffffffd4(%ebp) - 126b4: 8b 45 d4 mov 0xffffffd4(%ebp),%eax - 126b7: 89 45 e0 mov %eax,0xffffffe0(%ebp) - 126ba: 81 7d e8 00 10 00 00 cmpl $0x1000,0xffffffe8(%ebp) - 126c1: 7e 38 jle 126fb <_td_submit_urb+0x18e> - 126c3: 83 ec 08 sub $0x8,%esp - 126c6: ff 75 e4 pushl 0xffffffe4(%ebp) - 126c9: ff 75 0c pushl 0xc(%ebp) - 126cc: 68 00 10 00 00 push $0x1000 - 126d1: ff 75 ec pushl 0xffffffec(%ebp) - 126d4: ff 75 e0 pushl 0xffffffe0(%ebp) - 126d7: ff 75 08 pushl 0x8(%ebp) - 126da: e8 bf fc ff ff call 1239e <_td_fill> - 126df: 83 c4 20 add $0x20,%esp - 126e2: 8d 45 ec lea 0xffffffec(%ebp),%eax - 126e5: 81 00 00 10 00 00 addl $0x1000,(%eax) - 126eb: 8d 45 e8 lea 0xffffffe8(%ebp),%eax - 126ee: 81 28 00 10 00 00 subl $0x1000,(%eax) - 126f4: 8d 45 e4 lea 0xffffffe4(%ebp),%eax - 126f7: ff 00 incl (%eax) - 126f9: eb bf jmp 126ba <_td_submit_urb+0x14d> - 126fb: 8b 45 0c mov 0xc(%ebp),%eax - 126fe: 8b 40 20 mov 0x20(%eax),%eax - 12701: 83 e0 01 and $0x1,%eax - 12704: 85 c0 test %eax,%eax - 12706: 75 09 jne 12711 <_td_submit_urb+0x1a4> - 12708: 8d 45 e0 lea 0xffffffe0(%ebp),%eax - 1270b: 81 08 00 00 04 00 orl $0x40000,(%eax) - 12711: 83 ec 08 sub $0x8,%esp - 12714: ff 75 e4 pushl 0xffffffe4(%ebp) - 12717: ff 75 0c pushl 0xc(%ebp) - 1271a: ff 75 e8 pushl 0xffffffe8(%ebp) - 1271d: ff 75 ec pushl 0xffffffec(%ebp) - 12720: ff 75 e0 pushl 0xffffffe0(%ebp) - 12723: ff 75 08 pushl 0x8(%ebp) - 12726: e8 73 fc ff ff call 1239e <_td_fill> - 1272b: 83 c4 20 add $0x20,%esp - 1272e: 8d 45 e4 lea 0xffffffe4(%ebp),%eax - 12731: ff 00 incl (%eax) - 12733: 8b 45 0c mov 0xc(%ebp),%eax - 12736: 8b 40 20 mov 0x20(%eax),%eax - 12739: c1 e8 06 shr $0x6,%eax - 1273c: 83 e0 01 and $0x1,%eax - 1273f: 85 c0 test %eax,%eax - 12741: 74 31 je 12774 <_td_submit_urb+0x207> - 12743: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 12746: 66 8b 40 04 mov 0x4(%eax),%ax - 1274a: 25 ff ff 00 00 and $0xffff,%eax - 1274f: 3b 45 e4 cmp 0xffffffe4(%ebp),%eax - 12752: 7e 20 jle 12774 <_td_submit_urb+0x207> - 12754: 83 ec 08 sub $0x8,%esp - 12757: ff 75 e4 pushl 0xffffffe4(%ebp) - 1275a: ff 75 0c pushl 0xc(%ebp) - 1275d: 6a 00 push $0x0 - 1275f: 6a 00 push $0x0 - 12761: ff 75 e0 pushl 0xffffffe0(%ebp) - 12764: ff 75 08 pushl 0x8(%ebp) - 12767: e8 32 fc ff ff call 1239e <_td_fill> - 1276c: 83 c4 20 add $0x20,%esp - 1276f: 8d 45 e4 lea 0xffffffe4(%ebp),%eax - 12772: ff 00 incl (%eax) - 12774: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 12777: 8b 00 mov (%eax),%eax - 12779: 80 78 29 03 cmpb $0x3,0x29(%eax) - 1277d: 0f 85 78 01 00 00 jne 128fb <_td_submit_urb+0x38e> - 12783: 8b 45 08 mov 0x8(%ebp),%eax - 12786: 8b 40 04 mov 0x4(%eax),%eax - 12789: 83 c0 08 add $0x8,%eax - 1278c: c7 00 04 00 00 00 movl $0x4,(%eax) - 12792: e9 64 01 00 00 jmp 128fb <_td_submit_urb+0x38e> - 12797: c7 45 e0 00 00 00 f2 movl $0xf2000000,0xffffffe0(%ebp) - 1279e: 83 ec 08 sub $0x8,%esp - 127a1: 8b 45 e4 mov 0xffffffe4(%ebp),%eax - 127a4: 50 push %eax - 127a5: 8d 45 e4 lea 0xffffffe4(%ebp),%eax - 127a8: ff 00 incl (%eax) - 127aa: ff 75 0c pushl 0xc(%ebp) - 127ad: 6a 08 push $0x8 - 127af: 8b 45 0c mov 0xc(%ebp),%eax - 127b2: ff 70 3c pushl 0x3c(%eax) - 127b5: ff 75 e0 pushl 0xffffffe0(%ebp) - 127b8: ff 75 08 pushl 0x8(%ebp) - 127bb: e8 de fb ff ff call 1239e <_td_fill> - 127c0: 83 c4 20 add $0x20,%esp - 127c3: 83 7d e8 00 cmpl $0x0,0xffffffe8(%ebp) - 127c7: 7e 4f jle 12818 <_td_submit_urb+0x2ab> - 127c9: c7 45 e0 00 00 04 f3 movl $0xf3040000,0xffffffe0(%ebp) - 127d0: 83 7d dc 00 cmpl $0x0,0xffffffdc(%ebp) - 127d4: 74 0e je 127e4 <_td_submit_urb+0x277> - 127d6: 8b 55 e0 mov 0xffffffe0(%ebp),%edx - 127d9: 81 ca 00 00 08 00 or $0x80000,%edx - 127df: 89 55 d0 mov %edx,0xffffffd0(%ebp) - 127e2: eb 0b jmp 127ef <_td_submit_urb+0x282> - 127e4: 8b 45 e0 mov 0xffffffe0(%ebp),%eax - 127e7: 0d 00 00 10 00 or $0x100000,%eax - 127ec: 89 45 d0 mov %eax,0xffffffd0(%ebp) - 127ef: 8b 55 d0 mov 0xffffffd0(%ebp),%edx - 127f2: 89 55 e0 mov %edx,0xffffffe0(%ebp) - 127f5: 83 ec 08 sub $0x8,%esp - 127f8: 8b 45 e4 mov 0xffffffe4(%ebp),%eax - 127fb: 50 push %eax - 127fc: 8d 45 e4 lea 0xffffffe4(%ebp),%eax - 127ff: ff 00 incl (%eax) - 12801: ff 75 0c pushl 0xc(%ebp) - 12804: ff 75 e8 pushl 0xffffffe8(%ebp) - 12807: ff 75 ec pushl 0xffffffec(%ebp) - 1280a: ff 75 e0 pushl 0xffffffe0(%ebp) - 1280d: ff 75 08 pushl 0x8(%ebp) - 12810: e8 89 fb ff ff call 1239e <_td_fill> - 12815: 83 c4 20 add $0x20,%esp - 12818: 83 7d dc 00 cmpl $0x0,0xffffffdc(%ebp) - 1281c: 74 09 je 12827 <_td_submit_urb+0x2ba> - 1281e: c7 45 cc 00 00 10 f3 movl $0xf3100000,0xffffffcc(%ebp) - 12825: eb 07 jmp 1282e <_td_submit_urb+0x2c1> - 12827: c7 45 cc 00 00 08 f3 movl $0xf3080000,0xffffffcc(%ebp) - 1282e: 8b 45 cc mov 0xffffffcc(%ebp),%eax - 12831: 89 45 e0 mov %eax,0xffffffe0(%ebp) - 12834: 83 ec 08 sub $0x8,%esp - 12837: 8b 45 e4 mov 0xffffffe4(%ebp),%eax - 1283a: 50 push %eax - 1283b: 8d 45 e4 lea 0xffffffe4(%ebp),%eax - 1283e: ff 00 incl (%eax) - 12840: ff 75 0c pushl 0xc(%ebp) - 12843: 6a 00 push $0x0 - 12845: ff 75 ec pushl 0xffffffec(%ebp) - 12848: ff 75 e0 pushl 0xffffffe0(%ebp) - 1284b: ff 75 08 pushl 0x8(%ebp) - 1284e: e8 4b fb ff ff call 1239e <_td_fill> - 12853: 83 c4 20 add $0x20,%esp - 12856: 8b 45 08 mov 0x8(%ebp),%eax - 12859: 8b 40 04 mov 0x4(%eax),%eax - 1285c: 83 c0 08 add $0x8,%eax - 1285f: c7 00 02 00 00 00 movl $0x2,(%eax) - 12865: e9 91 00 00 00 jmp 128fb <_td_submit_urb+0x38e> - 1286a: c7 45 e4 00 00 00 00 movl $0x0,0xffffffe4(%ebp) - 12871: 8b 45 0c mov 0xc(%ebp),%eax - 12874: 8b 40 44 mov 0x44(%eax),%eax - 12877: 3b 45 e4 cmp 0xffffffe4(%ebp),%eax - 1287a: 7e 6b jle 128e7 <_td_submit_urb+0x37a> - 1287c: 8b 45 0c mov 0xc(%ebp),%eax - 1287f: 8b 40 40 mov 0x40(%eax),%eax - 12882: 89 45 d8 mov %eax,0xffffffd8(%ebp) - 12885: 8b 45 0c mov 0xc(%ebp),%eax - 12888: 8b 40 48 mov 0x48(%eax),%eax - 1288b: 89 c2 mov %eax,%edx - 1288d: 0f af 55 e4 imul 0xffffffe4(%ebp),%edx - 12891: 8d 45 d8 lea 0xffffffd8(%ebp),%eax - 12894: 01 10 add %edx,(%eax) - 12896: 8d 45 d8 lea 0xffffffd8(%ebp),%eax - 12899: 81 20 ff ff 00 00 andl $0xffff,(%eax) - 1289f: 83 ec 08 sub $0x8,%esp - 128a2: ff 75 e4 pushl 0xffffffe4(%ebp) - 128a5: ff 75 0c pushl 0xc(%ebp) - 128a8: 8b 55 0c mov 0xc(%ebp),%edx - 128ab: 8b 45 e4 mov 0xffffffe4(%ebp),%eax - 128ae: c1 e0 04 shl $0x4,%eax - 128b1: 01 d0 add %edx,%eax - 128b3: 83 c0 60 add $0x60,%eax - 128b6: ff 30 pushl (%eax) - 128b8: 8b 55 0c mov 0xc(%ebp),%edx - 128bb: 8b 45 e4 mov 0xffffffe4(%ebp),%eax - 128be: c1 e0 04 shl $0x4,%eax - 128c1: 01 d0 add %edx,%eax - 128c3: 8d 50 5c lea 0x5c(%eax),%edx - 128c6: 8b 45 ec mov 0xffffffec(%ebp),%eax - 128c9: 03 02 add (%edx),%eax - 128cb: 50 push %eax - 128cc: 8b 45 d8 mov 0xffffffd8(%ebp),%eax - 128cf: 0d 00 00 01 f0 or $0xf0010000,%eax - 128d4: 50 push %eax - 128d5: ff 75 08 pushl 0x8(%ebp) - 128d8: e8 c1 fa ff ff call 1239e <_td_fill> - 128dd: 83 c4 20 add $0x20,%esp - 128e0: 8d 45 e4 lea 0xffffffe4(%ebp),%eax - 128e3: ff 00 incl (%eax) - 128e5: eb 8a jmp 12871 <_td_submit_urb+0x304> - 128e7: 8b 45 08 mov 0x8(%ebp),%eax - 128ea: 05 34 02 00 00 add $0x234,%eax - 128ef: 50 push %eax - 128f0: e8 86 ed ff ff call 1167b <_hcd_to_bus> - 128f5: 83 c4 04 add $0x4,%esp - 128f8: ff 40 3c incl 0x3c(%eax) - 128fb: 8d 65 f4 lea 0xfffffff4(%ebp),%esp - 128fe: 5b pop %ebx - 128ff: 5e pop %esi - 12900: 5f pop %edi - 12901: 5d pop %ebp - 12902: c3 ret - -00012903 <_td_done>: - 12903: 55 push %ebp - 12904: 89 e5 mov %esp,%ebp - 12906: 57 push %edi - 12907: 56 push %esi - 12908: 53 push %ebx - 12909: 83 ec 1c sub $0x1c,%esp - 1290c: 8b 45 10 mov 0x10(%ebp),%eax - 1290f: 8b 00 mov (%eax),%eax - 12911: 89 45 f0 mov %eax,0xfffffff0(%ebp) - 12914: c7 45 ec 00 00 00 00 movl $0x0,0xffffffec(%ebp) - 1291b: 83 ec 0c sub $0xc,%esp - 1291e: 8b 45 10 mov 0x10(%ebp),%eax - 12921: 83 c0 2c add $0x2c,%eax - 12924: 50 push %eax - 12925: e8 0f 02 00 00 call 12b39 <_list_del> - 1292a: 83 c4 10 add $0x10,%esp - 1292d: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 12930: c1 e8 10 shr $0x10,%eax - 12933: 83 e0 01 and $0x1,%eax - 12936: 85 c0 test %eax,%eax - 12938: 0f 84 d2 00 00 00 je 12a10 <_td_done+0x10d> - 1293e: 8b 45 10 mov 0x10(%ebp),%eax - 12941: 66 8b 40 10 mov 0x10(%eax),%ax - 12945: 66 89 45 ea mov %ax,0xffffffea(%ebp) - 12949: c7 45 e4 00 00 00 00 movl $0x0,0xffffffe4(%ebp) - 12950: 66 8b 45 ea mov 0xffffffea(%ebp),%ax - 12954: 66 c1 e8 0c shr $0xc,%ax - 12958: 25 ff ff 00 00 and $0xffff,%eax - 1295d: 83 e0 0f and $0xf,%eax - 12960: 89 45 ec mov %eax,0xffffffec(%ebp) - 12963: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 12966: 25 00 00 00 f0 and $0xf0000000,%eax - 1296b: 85 c0 test %eax,%eax - 1296d: 74 05 je 12974 <_td_done+0x71> - 1296f: e9 bd 01 00 00 jmp 12b31 <_td_done+0x22e> - 12974: 8b 45 0c mov 0xc(%ebp),%eax - 12977: 8b 40 18 mov 0x18(%eax),%eax - 1297a: c1 e8 07 shr $0x7,%eax - 1297d: 83 e0 01 and $0x1,%eax - 12980: 85 c0 test %eax,%eax - 12982: 75 1d jne 129a1 <_td_done+0x9e> - 12984: 8b 55 0c mov 0xc(%ebp),%edx - 12987: 8b 45 10 mov 0x10(%ebp),%eax - 1298a: 8a 40 12 mov 0x12(%eax),%al - 1298d: 25 ff 00 00 00 and $0xff,%eax - 12992: c1 e0 04 shl $0x4,%eax - 12995: 01 d0 add %edx,%eax - 12997: 83 c0 60 add $0x60,%eax - 1299a: 8b 00 mov (%eax),%eax - 1299c: 89 45 e4 mov %eax,0xffffffe4(%ebp) - 1299f: eb 1e jmp 129bf <_td_done+0xbc> - 129a1: 83 7d ec 09 cmpl $0x9,0xffffffec(%ebp) - 129a5: 75 07 jne 129ae <_td_done+0xab> - 129a7: c7 45 ec 00 00 00 00 movl $0x0,0xffffffec(%ebp) - 129ae: 66 8b 45 ea mov 0xffffffea(%ebp),%ax - 129b2: 25 ff ff 00 00 and $0xffff,%eax - 129b7: 25 ff 03 00 00 and $0x3ff,%eax - 129bc: 89 45 e4 mov %eax,0xffffffe4(%ebp) - 129bf: 8b 4d 0c mov 0xc(%ebp),%ecx - 129c2: 8b 55 0c mov 0xc(%ebp),%edx - 129c5: 8b 45 e4 mov 0xffffffe4(%ebp),%eax - 129c8: 03 42 30 add 0x30(%edx),%eax - 129cb: 89 41 30 mov %eax,0x30(%ecx) - 129ce: 8b 55 0c mov 0xc(%ebp),%edx - 129d1: 8b 45 10 mov 0x10(%ebp),%eax - 129d4: 8a 40 12 mov 0x12(%eax),%al - 129d7: 25 ff 00 00 00 and $0xff,%eax - 129dc: c1 e0 04 shl $0x4,%eax - 129df: 01 d0 add %edx,%eax - 129e1: 8d 50 64 lea 0x64(%eax),%edx - 129e4: 8b 45 e4 mov 0xffffffe4(%ebp),%eax - 129e7: 89 02 mov %eax,(%edx) - 129e9: 8b 55 0c mov 0xc(%ebp),%edx - 129ec: 8b 45 10 mov 0x10(%ebp),%eax - 129ef: 8a 40 12 mov 0x12(%eax),%al - 129f2: 25 ff 00 00 00 and $0xff,%eax - 129f7: c1 e0 04 shl $0x4,%eax - 129fa: 01 d0 add %edx,%eax - 129fc: 8d 50 68 lea 0x68(%eax),%edx - 129ff: 8b 45 ec mov 0xffffffec(%ebp),%eax - 12a02: 8b 04 85 20 60 01 00 mov 0x16020(,%eax,4),%eax - 12a09: 89 02 mov %eax,(%edx) - 12a0b: e9 21 01 00 00 jmp 12b31 <_td_done+0x22e> - 12a10: 8b 45 0c mov 0xc(%ebp),%eax - 12a13: 8b 40 18 mov 0x18(%eax),%eax - 12a16: c1 e8 1e shr $0x1e,%eax - 12a19: 83 e0 03 and $0x3,%eax - 12a1c: 89 45 e4 mov %eax,0xffffffe4(%ebp) - 12a1f: 8b 45 10 mov 0x10(%ebp),%eax - 12a22: 83 c0 0c add $0xc,%eax - 12a25: 8b 00 mov (%eax),%eax - 12a27: 89 45 e0 mov %eax,0xffffffe0(%ebp) - 12a2a: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 12a2d: c1 e8 1c shr $0x1c,%eax - 12a30: 83 e0 0f and $0xf,%eax - 12a33: 89 45 ec mov %eax,0xffffffec(%ebp) - 12a36: 83 7d e4 02 cmpl $0x2,0xffffffe4(%ebp) - 12a3a: 74 51 je 12a8d <_td_done+0x18a> - 12a3c: 83 7d ec 04 cmpl $0x4,0xffffffec(%ebp) - 12a40: 75 4b jne 12a8d <_td_done+0x18a> - 12a42: 8b 45 0c mov 0xc(%ebp),%eax - 12a45: 8b 58 14 mov 0x14(%eax),%ebx - 12a48: 8b 45 0c mov 0xc(%ebp),%eax - 12a4b: 8b 40 18 mov 0x18(%eax),%eax - 12a4e: c1 e8 07 shr $0x7,%eax - 12a51: 83 f0 01 xor $0x1,%eax - 12a54: 89 c6 mov %eax,%esi - 12a56: 83 e6 01 and $0x1,%esi - 12a59: 8b 45 0c mov 0xc(%ebp),%eax - 12a5c: 8b 78 14 mov 0x14(%eax),%edi - 12a5f: 8b 45 0c mov 0xc(%ebp),%eax - 12a62: 8b 40 18 mov 0x18(%eax),%eax - 12a65: c1 e8 07 shr $0x7,%eax - 12a68: 83 f0 01 xor $0x1,%eax - 12a6b: 89 c2 mov %eax,%edx - 12a6d: 83 e2 01 and $0x1,%edx - 12a70: 8b 45 0c mov 0xc(%ebp),%eax - 12a73: 8b 40 18 mov 0x18(%eax),%eax - 12a76: c1 e8 0f shr $0xf,%eax - 12a79: 89 c1 mov %eax,%ecx - 12a7b: 83 e1 0f and $0xf,%ecx - 12a7e: b8 01 00 00 00 mov $0x1,%eax - 12a83: d3 e0 shl %cl,%eax - 12a85: 0b 44 97 30 or 0x30(%edi,%edx,4),%eax - 12a89: 89 44 b3 30 mov %eax,0x30(%ebx,%esi,4) - 12a8d: 83 7d ec 09 cmpl $0x9,0xffffffec(%ebp) - 12a91: 75 14 jne 12aa7 <_td_done+0x1a4> - 12a93: 8b 45 0c mov 0xc(%ebp),%eax - 12a96: 8b 40 20 mov 0x20(%eax),%eax - 12a99: 83 e0 01 and $0x1,%eax - 12a9c: 85 c0 test %eax,%eax - 12a9e: 75 07 jne 12aa7 <_td_done+0x1a4> - 12aa0: c7 45 ec 00 00 00 00 movl $0x0,0xffffffec(%ebp) - 12aa7: 83 7d ec 00 cmpl $0x0,0xffffffec(%ebp) - 12aab: 74 28 je 12ad5 <_td_done+0x1d2> - 12aad: 83 7d ec 0d cmpl $0xd,0xffffffec(%ebp) - 12ab1: 7f 22 jg 12ad5 <_td_done+0x1d2> - 12ab3: 8b 45 0c mov 0xc(%ebp),%eax - 12ab6: c7 00 01 00 00 00 movl $0x1,(%eax) - 12abc: 8b 45 0c mov 0xc(%ebp),%eax - 12abf: 83 78 1c 8d cmpl $0xffffff8d,0x1c(%eax) - 12ac3: 75 10 jne 12ad5 <_td_done+0x1d2> - 12ac5: 8b 45 0c mov 0xc(%ebp),%eax - 12ac8: 8b 55 ec mov 0xffffffec(%ebp),%edx - 12acb: 8b 14 95 20 60 01 00 mov 0x16020(,%edx,4),%edx - 12ad2: 89 50 1c mov %edx,0x1c(%eax) - 12ad5: 83 7d e4 02 cmpl $0x2,0xffffffe4(%ebp) - 12ad9: 75 0b jne 12ae6 <_td_done+0x1e3> - 12adb: 8b 45 10 mov 0x10(%ebp),%eax - 12ade: 80 78 12 00 cmpb $0x0,0x12(%eax) - 12ae2: 75 02 jne 12ae6 <_td_done+0x1e3> - 12ae4: eb 45 jmp 12b2b <_td_done+0x228> - 12ae6: 83 7d e0 00 cmpl $0x0,0xffffffe0(%ebp) - 12aea: 74 3f je 12b2b <_td_done+0x228> - 12aec: 8b 45 10 mov 0x10(%ebp),%eax - 12aef: 83 78 04 00 cmpl $0x0,0x4(%eax) - 12af3: 75 1a jne 12b0f <_td_done+0x20c> - 12af5: 8b 5d 0c mov 0xc(%ebp),%ebx - 12af8: 8b 4d 0c mov 0xc(%ebp),%ecx - 12afb: 8b 45 10 mov 0x10(%ebp),%eax - 12afe: 8b 50 28 mov 0x28(%eax),%edx - 12b01: 8b 45 e0 mov 0xffffffe0(%ebp),%eax - 12b04: 29 d0 sub %edx,%eax - 12b06: 03 41 30 add 0x30(%ecx),%eax - 12b09: 40 inc %eax - 12b0a: 89 43 30 mov %eax,0x30(%ebx) - 12b0d: eb 1c jmp 12b2b <_td_done+0x228> - 12b0f: 8b 5d 0c mov 0xc(%ebp),%ebx - 12b12: 8b 75 0c mov 0xc(%ebp),%esi - 12b15: 8b 4d 10 mov 0x10(%ebp),%ecx - 12b18: 83 c1 04 add $0x4,%ecx - 12b1b: 8b 45 10 mov 0x10(%ebp),%eax - 12b1e: 8b 50 28 mov 0x28(%eax),%edx - 12b21: 8b 01 mov (%ecx),%eax - 12b23: 29 d0 sub %edx,%eax - 12b25: 03 46 30 add 0x30(%esi),%eax - 12b28: 89 43 30 mov %eax,0x30(%ebx) - 12b2b: 83 7d ec 00 cmpl $0x0,0xffffffec(%ebp) - 12b2f: 74 00 je 12b31 <_td_done+0x22e> - 12b31: 8d 65 f4 lea 0xfffffff4(%ebp),%esp - 12b34: 5b pop %ebx - 12b35: 5e pop %esi - 12b36: 5f pop %edi - 12b37: 5d pop %ebp - 12b38: c3 ret - -00012b39 <_list_del>: - 12b39: 55 push %ebp - 12b3a: 89 e5 mov %esp,%ebp - 12b3c: 83 ec 08 sub $0x8,%esp - 12b3f: 83 ec 08 sub $0x8,%esp - 12b42: 8b 45 08 mov 0x8(%ebp),%eax - 12b45: ff 30 pushl (%eax) - 12b47: 8b 45 08 mov 0x8(%ebp),%eax - 12b4a: ff 70 04 pushl 0x4(%eax) - 12b4d: e8 18 00 00 00 call 12b6a <___list_del> - 12b52: 83 c4 10 add $0x10,%esp - 12b55: 8b 45 08 mov 0x8(%ebp),%eax - 12b58: c7 00 00 00 00 00 movl $0x0,(%eax) - 12b5e: 8b 45 08 mov 0x8(%ebp),%eax - 12b61: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) - 12b68: c9 leave - 12b69: c3 ret - -00012b6a <___list_del>: - 12b6a: 55 push %ebp - 12b6b: 89 e5 mov %esp,%ebp - 12b6d: 8b 55 0c mov 0xc(%ebp),%edx - 12b70: 8b 45 08 mov 0x8(%ebp),%eax - 12b73: 89 42 04 mov %eax,0x4(%edx) - 12b76: 8b 55 08 mov 0x8(%ebp),%edx - 12b79: 8b 45 0c mov 0xc(%ebp),%eax - 12b7c: 89 02 mov %eax,(%edx) - 12b7e: 5d pop %ebp - 12b7f: c3 ret - -00012b80 <_dl_reverse_done_list>: - 12b80: 55 push %ebp - 12b81: 89 e5 mov %esp,%ebp - 12b83: 83 ec 18 sub $0x18,%esp - 12b86: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) - 12b8d: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) - 12b94: c7 45 f0 00 00 00 00 movl $0x0,0xfffffff0(%ebp) - 12b9b: 8b 45 08 mov 0x8(%ebp),%eax - 12b9e: 8b 40 08 mov 0x8(%eax),%eax - 12ba1: 05 84 00 00 00 add $0x84,%eax - 12ba6: 8b 00 mov (%eax),%eax - 12ba8: 89 45 fc mov %eax,0xfffffffc(%ebp) - 12bab: 8b 45 08 mov 0x8(%ebp),%eax - 12bae: 8b 40 08 mov 0x8(%eax),%eax - 12bb1: c7 80 84 00 00 00 00 movl $0x0,0x84(%eax) - 12bb8: 00 00 00 - 12bbb: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) - 12bbf: 0f 84 85 00 00 00 je 12c4a <_dl_reverse_done_list+0xca> - 12bc5: 83 ec 08 sub $0x8,%esp - 12bc8: ff 75 fc pushl 0xfffffffc(%ebp) - 12bcb: ff 75 08 pushl 0x8(%ebp) - 12bce: e8 59 01 00 00 call 12d2c <_dma_to_td> - 12bd3: 83 c4 10 add $0x10,%esp - 12bd6: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 12bd9: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) - 12bdd: 75 02 jne 12be1 <_dl_reverse_done_list+0x61> - 12bdf: eb 69 jmp 12c4a <_dl_reverse_done_list+0xca> - 12be1: 8b 55 f4 mov 0xfffffff4(%ebp),%edx - 12be4: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 12be7: 8b 00 mov (%eax),%eax - 12be9: 0d 00 00 02 00 or $0x20000,%eax - 12bee: 89 02 mov %eax,(%edx) - 12bf0: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 12bf3: 8b 00 mov (%eax),%eax - 12bf5: c1 e8 1c shr $0x1c,%eax - 12bf8: 83 e0 0f and $0xf,%eax - 12bfb: 89 45 ec mov %eax,0xffffffec(%ebp) - 12bfe: 83 7d ec 00 cmpl $0x0,0xffffffec(%ebp) - 12c02: 74 27 je 12c2b <_dl_reverse_done_list+0xab> - 12c04: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 12c07: 8b 40 14 mov 0x14(%eax),%eax - 12c0a: 8b 40 08 mov 0x8(%eax),%eax - 12c0d: 83 e0 01 and $0x1,%eax - 12c10: 85 c0 test %eax,%eax - 12c12: 74 17 je 12c2b <_dl_reverse_done_list+0xab> - 12c14: ff 75 f8 pushl 0xfffffff8(%ebp) - 12c17: ff 75 ec pushl 0xffffffec(%ebp) - 12c1a: ff 75 f4 pushl 0xfffffff4(%ebp) - 12c1d: ff 75 08 pushl 0x8(%ebp) - 12c20: e8 2a 00 00 00 call 12c4f <_ed_halted> - 12c25: 83 c4 10 add $0x10,%esp - 12c28: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 12c2b: 8b 55 f4 mov 0xfffffff4(%ebp),%edx - 12c2e: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 12c31: 89 42 1c mov %eax,0x1c(%edx) - 12c34: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 12c37: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 12c3a: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 12c3d: 83 c0 08 add $0x8,%eax - 12c40: 8b 00 mov (%eax),%eax - 12c42: 89 45 fc mov %eax,0xfffffffc(%ebp) - 12c45: e9 71 ff ff ff jmp 12bbb <_dl_reverse_done_list+0x3b> - 12c4a: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 12c4d: c9 leave - 12c4e: c3 ret - -00012c4f <_ed_halted>: - 12c4f: 55 push %ebp - 12c50: 89 e5 mov %esp,%ebp - 12c52: 83 ec 18 sub $0x18,%esp - 12c55: 8b 45 0c mov 0xc(%ebp),%eax - 12c58: 8b 40 20 mov 0x20(%eax),%eax - 12c5b: 89 45 fc mov %eax,0xfffffffc(%ebp) - 12c5e: 8b 45 0c mov 0xc(%ebp),%eax - 12c61: 8b 40 14 mov 0x14(%eax),%eax - 12c64: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 12c67: 8b 45 0c mov 0xc(%ebp),%eax - 12c6a: 8b 40 2c mov 0x2c(%eax),%eax - 12c6d: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 12c70: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 12c73: 8b 40 08 mov 0x8(%eax),%eax - 12c76: 83 e0 02 and $0x2,%eax - 12c79: 89 45 f0 mov %eax,0xfffffff0(%ebp) - 12c7c: 8b 55 f8 mov 0xfffffff8(%ebp),%edx - 12c7f: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 12c82: 8b 00 mov (%eax),%eax - 12c84: 80 cc 40 or $0x40,%ah - 12c87: 89 02 mov %eax,(%edx) - 12c89: 8b 55 f8 mov 0xfffffff8(%ebp),%edx - 12c8c: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 12c8f: 8b 40 08 mov 0x8(%eax),%eax - 12c92: 83 e0 fe and $0xfffffffe,%eax - 12c95: 89 42 08 mov %eax,0x8(%edx) - 12c98: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 12c9b: 83 c0 20 add $0x20,%eax - 12c9e: 3b 45 f4 cmp 0xfffffff4(%ebp),%eax - 12ca1: 74 7e je 12d21 <_ed_halted+0xd2> - 12ca3: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 12ca6: 83 e8 2c sub $0x2c,%eax - 12ca9: 89 45 ec mov %eax,0xffffffec(%ebp) - 12cac: 8b 45 ec mov 0xffffffec(%ebp),%eax - 12caf: 8b 40 2c mov 0x2c(%eax),%eax - 12cb2: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 12cb5: 8b 45 ec mov 0xffffffec(%ebp),%eax - 12cb8: 8b 40 20 mov 0x20(%eax),%eax - 12cbb: 3b 45 fc cmp 0xfffffffc(%ebp),%eax - 12cbe: 74 02 je 12cc2 <_ed_halted+0x73> - 12cc0: eb 5f jmp 12d21 <_ed_halted+0xd2> - 12cc2: 8b 45 ec mov 0xffffffec(%ebp),%eax - 12cc5: 8b 00 mov (%eax),%eax - 12cc7: 89 45 e8 mov %eax,0xffffffe8(%ebp) - 12cca: 8d 45 e8 lea 0xffffffe8(%ebp),%eax - 12ccd: 81 08 00 00 02 00 orl $0x20000,(%eax) - 12cd3: 8d 45 e8 lea 0xffffffe8(%ebp),%eax - 12cd6: 81 20 ff ff ff 0f andl $0xfffffff,(%eax) - 12cdc: 8b 55 ec mov 0xffffffec(%ebp),%edx - 12cdf: 8b 45 e8 mov 0xffffffe8(%ebp),%eax - 12ce2: 89 02 mov %eax,(%edx) - 12ce4: 8b 55 ec mov 0xffffffec(%ebp),%edx - 12ce7: 8b 45 14 mov 0x14(%ebp),%eax - 12cea: 89 42 1c mov %eax,0x1c(%edx) - 12ced: 8b 45 ec mov 0xffffffec(%ebp),%eax - 12cf0: 89 45 14 mov %eax,0x14(%ebp) - 12cf3: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 12cf6: 8b 55 ec mov 0xffffffec(%ebp),%edx - 12cf9: 8b 40 04 mov 0x4(%eax),%eax - 12cfc: 3b 42 24 cmp 0x24(%edx),%eax - 12cff: 75 0c jne 12d0d <_ed_halted+0xbe> - 12d01: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 12d04: 8b 55 ec mov 0xffffffec(%ebp),%edx - 12d07: 8b 52 08 mov 0x8(%edx),%edx - 12d0a: 89 50 04 mov %edx,0x4(%eax) - 12d0d: 8b 4d f8 mov 0xfffffff8(%ebp),%ecx - 12d10: 8b 55 ec mov 0xffffffec(%ebp),%edx - 12d13: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 12d16: 0b 42 08 or 0x8(%edx),%eax - 12d19: 89 41 08 mov %eax,0x8(%ecx) - 12d1c: e9 77 ff ff ff jmp 12c98 <_ed_halted+0x49> - 12d21: 83 7d 10 04 cmpl $0x4,0x10(%ebp) - 12d25: 75 00 jne 12d27 <_ed_halted+0xd8> - 12d27: 8b 45 14 mov 0x14(%ebp),%eax - 12d2a: c9 leave - 12d2b: c3 ret - -00012d2c <_dma_to_td>: - 12d2c: 55 push %ebp - 12d2d: 89 e5 mov %esp,%ebp - 12d2f: 83 ec 04 sub $0x4,%esp - 12d32: 8d 45 0c lea 0xc(%ebp),%eax - 12d35: 83 20 e0 andl $0xffffffe0,(%eax) - 12d38: 8b 55 08 mov 0x8(%ebp),%edx - 12d3b: 8b 45 0c mov 0xc(%ebp),%eax - 12d3e: c1 e8 06 shr $0x6,%eax - 12d41: 33 45 0c xor 0xc(%ebp),%eax - 12d44: 83 e0 3f and $0x3f,%eax - 12d47: 8b 84 82 a4 00 00 00 mov 0xa4(%edx,%eax,4),%eax - 12d4e: 89 45 fc mov %eax,0xfffffffc(%ebp) - 12d51: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) - 12d55: 74 16 je 12d6d <_dma_to_td+0x41> - 12d57: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 12d5a: 8b 40 24 mov 0x24(%eax),%eax - 12d5d: 3b 45 0c cmp 0xc(%ebp),%eax - 12d60: 74 0b je 12d6d <_dma_to_td+0x41> - 12d62: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 12d65: 8b 40 18 mov 0x18(%eax),%eax - 12d68: 89 45 fc mov %eax,0xfffffffc(%ebp) - 12d6b: eb e4 jmp 12d51 <_dma_to_td+0x25> - 12d6d: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 12d70: c9 leave - 12d71: c3 ret - -00012d72 <_finish_unlinks>: - 12d72: 55 push %ebp - 12d73: 89 e5 mov %esp,%ebp - 12d75: 83 ec 38 sub $0x38,%esp - 12d78: 8b 45 0c mov 0xc(%ebp),%eax - 12d7b: 66 89 45 fe mov %ax,0xfffffffe(%ebp) - 12d7f: 8b 45 08 mov 0x8(%ebp),%eax - 12d82: 83 c0 10 add $0x10,%eax - 12d85: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 12d88: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 12d8b: 8b 00 mov (%eax),%eax - 12d8d: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 12d90: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) - 12d94: 0f 84 f0 01 00 00 je 12f8a <_finish_unlinks+0x218> - 12d9a: 0f bf 55 fe movswl 0xfffffffe(%ebp),%edx - 12d9e: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 12da1: 0f bf 40 32 movswl 0x32(%eax),%eax - 12da5: 29 c2 sub %eax,%edx - 12da7: 89 d0 mov %edx,%eax - 12da9: 85 c0 test %eax,%eax - 12dab: 79 1a jns 12dc7 <_finish_unlinks+0x55> - 12dad: 8b 45 08 mov 0x8(%ebp),%eax - 12db0: 83 b8 a4 01 00 00 00 cmpl $0x0,0x1a4(%eax) - 12db7: 75 0e jne 12dc7 <_finish_unlinks+0x55> - 12db9: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 12dbc: 83 c0 18 add $0x18,%eax - 12dbf: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 12dc2: e9 b6 01 00 00 jmp 12f7d <_finish_unlinks+0x20b> - 12dc7: 8b 55 f4 mov 0xfffffff4(%ebp),%edx - 12dca: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 12dcd: 8b 40 18 mov 0x18(%eax),%eax - 12dd0: 89 02 mov %eax,(%edx) - 12dd2: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 12dd5: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) - 12ddc: c7 45 e4 00 00 00 00 movl $0x0,0xffffffe4(%ebp) - 12de3: c7 45 e8 00 00 00 00 movl $0x0,0xffffffe8(%ebp) - 12dea: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 12ded: 83 c0 08 add $0x8,%eax - 12df0: 89 45 e0 mov %eax,0xffffffe0(%ebp) - 12df3: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 12df6: 83 c0 20 add $0x20,%eax - 12df9: 8b 00 mov (%eax),%eax - 12dfb: 89 45 f0 mov %eax,0xfffffff0(%ebp) - 12dfe: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 12e01: 8b 00 mov (%eax),%eax - 12e03: 89 45 ec mov %eax,0xffffffec(%ebp) - 12e06: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 12e09: 83 c0 20 add $0x20,%eax - 12e0c: 3b 45 f0 cmp 0xfffffff0(%ebp),%eax - 12e0f: 0f 84 d1 00 00 00 je 12ee6 <_finish_unlinks+0x174> - 12e15: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 12e18: 83 e8 2c sub $0x2c,%eax - 12e1b: 89 45 dc mov %eax,0xffffffdc(%ebp) - 12e1e: 8b 45 dc mov 0xffffffdc(%ebp),%eax - 12e21: 8b 40 20 mov 0x20(%eax),%eax - 12e24: 89 45 d8 mov %eax,0xffffffd8(%ebp) - 12e27: 8b 45 dc mov 0xffffffdc(%ebp),%eax - 12e2a: 8b 40 20 mov 0x20(%eax),%eax - 12e2d: 8b 40 08 mov 0x8(%eax),%eax - 12e30: 89 45 d4 mov %eax,0xffffffd4(%ebp) - 12e33: 8b 45 d4 mov 0xffffffd4(%ebp),%eax - 12e36: 83 78 08 01 cmpl $0x1,0x8(%eax) - 12e3a: 74 0e je 12e4a <_finish_unlinks+0xd8> - 12e3c: 8b 45 dc mov 0xffffffdc(%ebp),%eax - 12e3f: 83 c0 08 add $0x8,%eax - 12e42: 89 45 e0 mov %eax,0xffffffe0(%ebp) - 12e45: e9 89 00 00 00 jmp 12ed3 <_finish_unlinks+0x161> - 12e4a: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 12e4d: 8b 55 dc mov 0xffffffdc(%ebp),%edx - 12e50: 8b 40 04 mov 0x4(%eax),%eax - 12e53: 3b 42 24 cmp 0x24(%edx),%eax - 12e56: 75 0c jne 12e64 <_finish_unlinks+0xf2> - 12e58: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 12e5b: 8b 55 dc mov 0xffffffdc(%ebp),%edx - 12e5e: 8b 52 08 mov 0x8(%edx),%edx - 12e61: 89 50 04 mov %edx,0x4(%eax) - 12e64: 8b 45 e0 mov 0xffffffe0(%ebp),%eax - 12e67: 8b 00 mov (%eax),%eax - 12e69: 83 e0 1f and $0x1f,%eax - 12e6c: 89 45 d0 mov %eax,0xffffffd0(%ebp) - 12e6f: 8b 4d e0 mov 0xffffffe0(%ebp),%ecx - 12e72: 8b 55 dc mov 0xffffffdc(%ebp),%edx - 12e75: 8b 45 d0 mov 0xffffffd0(%ebp),%eax - 12e78: 0b 42 08 or 0x8(%edx),%eax - 12e7b: 89 01 mov %eax,(%ecx) - 12e7d: 83 ec 04 sub $0x4,%esp - 12e80: ff 75 dc pushl 0xffffffdc(%ebp) - 12e83: ff 75 d8 pushl 0xffffffd8(%ebp) - 12e86: ff 75 08 pushl 0x8(%ebp) - 12e89: e8 75 fa ff ff call 12903 <_td_done> - 12e8e: 83 c4 10 add $0x10,%esp - 12e91: 8b 45 d4 mov 0xffffffd4(%ebp),%eax - 12e94: 66 ff 40 06 incw 0x6(%eax) - 12e98: 8b 45 d4 mov 0xffffffd4(%ebp),%eax - 12e9b: 8b 55 d4 mov 0xffffffd4(%ebp),%edx - 12e9e: 66 8b 40 06 mov 0x6(%eax),%ax - 12ea2: 66 3b 42 04 cmp 0x4(%edx),%ax - 12ea6: 75 2b jne 12ed3 <_finish_unlinks+0x161> - 12ea8: c7 45 e8 01 00 00 00 movl $0x1,0xffffffe8(%ebp) - 12eaf: c7 45 e4 01 00 00 00 movl $0x1,0xffffffe4(%ebp) - 12eb6: 83 ec 04 sub $0x4,%esp - 12eb9: ff 75 10 pushl 0x10(%ebp) - 12ebc: ff 75 d8 pushl 0xffffffd8(%ebp) - 12ebf: ff 75 08 pushl 0x8(%ebp) - 12ec2: e8 80 ea ff ff call 11947 <_finish_urb> - 12ec7: 83 c4 10 add $0x10,%esp - 12eca: 8b 45 08 mov 0x8(%ebp),%eax - 12ecd: c7 00 01 00 00 00 movl $0x1,(%eax) - 12ed3: 8b 45 ec mov 0xffffffec(%ebp),%eax - 12ed6: 89 45 f0 mov %eax,0xfffffff0(%ebp) - 12ed9: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 12edc: 8b 00 mov (%eax),%eax - 12ede: 89 45 ec mov %eax,0xffffffec(%ebp) - 12ee1: e9 20 ff ff ff jmp 12e06 <_finish_unlinks+0x94> - 12ee6: 83 7d e8 00 cmpl $0x0,0xffffffe8(%ebp) - 12eea: 74 1b je 12f07 <_finish_unlinks+0x195> - 12eec: 83 ec 0c sub $0xc,%esp - 12eef: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 12ef2: 83 c0 20 add $0x20,%eax - 12ef5: 50 push %eax - 12ef6: e8 6d 01 00 00 call 13068 <_list_empty> - 12efb: 83 c4 10 add $0x10,%esp - 12efe: 85 c0 test %eax,%eax - 12f00: 75 05 jne 12f07 <_finish_unlinks+0x195> - 12f02: e9 dc fe ff ff jmp 12de3 <_finish_unlinks+0x71> - 12f07: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 12f0a: c6 40 28 00 movb $0x0,0x28(%eax) - 12f0e: 8b 55 f8 mov 0xfffffff8(%ebp),%edx - 12f11: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 12f14: 8b 00 mov (%eax),%eax - 12f16: 25 ff bf ff f7 and $0xf7ffbfff,%eax - 12f1b: 89 02 mov %eax,(%edx) - 12f1d: 8b 55 f8 mov 0xfffffff8(%ebp),%edx - 12f20: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 12f23: 8b 40 08 mov 0x8(%eax),%eax - 12f26: 83 e0 fe and $0xfffffffe,%eax - 12f29: 89 42 08 mov %eax,0x8(%edx) - 12f2c: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 12f2f: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) - 12f36: 83 ec 0c sub $0xc,%esp - 12f39: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 12f3c: 83 c0 20 add $0x20,%eax - 12f3f: 50 push %eax - 12f40: e8 23 01 00 00 call 13068 <_list_empty> - 12f45: 83 c4 10 add $0x10,%esp - 12f48: 85 c0 test %eax,%eax - 12f4a: 75 26 jne 12f72 <_finish_unlinks+0x200> - 12f4c: 8b 45 08 mov 0x8(%ebp),%eax - 12f4f: 83 b8 a4 01 00 00 00 cmpl $0x0,0x1a4(%eax) - 12f56: 75 1a jne 12f72 <_finish_unlinks+0x200> - 12f58: 8b 45 08 mov 0x8(%ebp),%eax - 12f5b: 83 b8 a8 01 00 00 00 cmpl $0x0,0x1a8(%eax) - 12f62: 75 0e jne 12f72 <_finish_unlinks+0x200> - 12f64: ff 75 f8 pushl 0xfffffff8(%ebp) - 12f67: ff 75 08 pushl 0x8(%ebp) - 12f6a: e8 43 ec ff ff call 11bb2 <_ed_schedule> - 12f6f: 83 c4 08 add $0x8,%esp - 12f72: 83 7d e4 00 cmpl $0x0,0xffffffe4(%ebp) - 12f76: 74 05 je 12f7d <_finish_unlinks+0x20b> - 12f78: e9 02 fe ff ff jmp 12d7f <_finish_unlinks+0xd> - 12f7d: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 12f80: 8b 00 mov (%eax),%eax - 12f82: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 12f85: e9 06 fe ff ff jmp 12d90 <_finish_unlinks+0x1e> - 12f8a: 8b 45 08 mov 0x8(%ebp),%eax - 12f8d: 83 b8 a4 01 00 00 00 cmpl $0x0,0x1a4(%eax) - 12f94: 0f 85 cc 00 00 00 jne 13066 <_finish_unlinks+0x2f4> - 12f9a: 8b 45 08 mov 0x8(%ebp),%eax - 12f9d: 83 78 10 00 cmpl $0x0,0x10(%eax) - 12fa1: 0f 85 bf 00 00 00 jne 13066 <_finish_unlinks+0x2f4> - 12fa7: c7 45 d0 00 00 00 00 movl $0x0,0xffffffd0(%ebp) - 12fae: c7 45 d4 00 00 00 00 movl $0x0,0xffffffd4(%ebp) - 12fb5: 8b 45 08 mov 0x8(%ebp),%eax - 12fb8: 83 78 18 00 cmpl $0x0,0x18(%eax) - 12fbc: 74 2e je 12fec <_finish_unlinks+0x27a> - 12fbe: 8d 45 d0 lea 0xffffffd0(%ebp),%eax - 12fc1: 83 08 02 orl $0x2,(%eax) - 12fc4: 8b 45 08 mov 0x8(%ebp),%eax - 12fc7: 8b 80 2c 02 00 00 mov 0x22c(%eax),%eax - 12fcd: c1 e8 04 shr $0x4,%eax - 12fd0: 83 e0 01 and $0x1,%eax - 12fd3: 85 c0 test %eax,%eax - 12fd5: 75 15 jne 12fec <_finish_unlinks+0x27a> - 12fd7: 8d 45 d4 lea 0xffffffd4(%ebp),%eax - 12fda: 83 08 10 orl $0x10,(%eax) - 12fdd: 8b 45 08 mov 0x8(%ebp),%eax - 12fe0: 8b 40 04 mov 0x4(%eax),%eax - 12fe3: 83 c0 24 add $0x24,%eax - 12fe6: c7 00 00 00 00 00 movl $0x0,(%eax) - 12fec: 8b 45 08 mov 0x8(%ebp),%eax - 12fef: 83 78 14 00 cmpl $0x0,0x14(%eax) - 12ff3: 74 2e je 13023 <_finish_unlinks+0x2b1> - 12ff5: 8d 45 d0 lea 0xffffffd0(%ebp),%eax - 12ff8: 83 08 04 orl $0x4,(%eax) - 12ffb: 8b 45 08 mov 0x8(%ebp),%eax - 12ffe: 8b 80 2c 02 00 00 mov 0x22c(%eax),%eax - 13004: c1 e8 05 shr $0x5,%eax - 13007: 83 e0 01 and $0x1,%eax - 1300a: 85 c0 test %eax,%eax - 1300c: 75 15 jne 13023 <_finish_unlinks+0x2b1> - 1300e: 8d 45 d4 lea 0xffffffd4(%ebp),%eax - 13011: 83 08 20 orl $0x20,(%eax) - 13014: 8b 45 08 mov 0x8(%ebp),%eax - 13017: 8b 40 04 mov 0x4(%eax),%eax - 1301a: 83 c0 2c add $0x2c,%eax - 1301d: c7 00 00 00 00 00 movl $0x0,(%eax) - 13023: 83 7d d4 00 cmpl $0x0,0xffffffd4(%ebp) - 13027: 74 29 je 13052 <_finish_unlinks+0x2e0> - 13029: 8b 4d 08 mov 0x8(%ebp),%ecx - 1302c: 8b 55 08 mov 0x8(%ebp),%edx - 1302f: 8b 45 d4 mov 0xffffffd4(%ebp),%eax - 13032: 0b 82 2c 02 00 00 or 0x22c(%edx),%eax - 13038: 89 81 2c 02 00 00 mov %eax,0x22c(%ecx) - 1303e: 8b 45 08 mov 0x8(%ebp),%eax - 13041: 8b 50 04 mov 0x4(%eax),%edx - 13044: 83 c2 04 add $0x4,%edx - 13047: 8b 45 08 mov 0x8(%ebp),%eax - 1304a: 8b 80 2c 02 00 00 mov 0x22c(%eax),%eax - 13050: 89 02 mov %eax,(%edx) - 13052: 83 7d d0 00 cmpl $0x0,0xffffffd0(%ebp) - 13056: 74 0e je 13066 <_finish_unlinks+0x2f4> - 13058: 8b 45 08 mov 0x8(%ebp),%eax - 1305b: 8b 50 04 mov 0x4(%eax),%edx - 1305e: 83 c2 08 add $0x8,%edx - 13061: 8b 45 d0 mov 0xffffffd0(%ebp),%eax - 13064: 89 02 mov %eax,(%edx) - 13066: c9 leave - 13067: c3 ret - -00013068 <_list_empty>: - 13068: 55 push %ebp - 13069: 89 e5 mov %esp,%ebp - 1306b: 8b 45 08 mov 0x8(%ebp),%eax - 1306e: 8b 00 mov (%eax),%eax - 13070: 3b 45 08 cmp 0x8(%ebp),%eax - 13073: 0f 94 c0 sete %al - 13076: 25 ff 00 00 00 and $0xff,%eax - 1307b: 5d pop %ebp - 1307c: c3 ret - -0001307d <_dl_done_list>: - 1307d: 55 push %ebp - 1307e: 89 e5 mov %esp,%ebp - 13080: 83 ec 18 sub $0x18,%esp - 13083: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) - 1308a: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) - 1308e: 0f 84 d1 00 00 00 je 13165 <_dl_done_list+0xe8> - 13094: 8b 45 0c mov 0xc(%ebp),%eax - 13097: 8b 40 1c mov 0x1c(%eax),%eax - 1309a: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 1309d: 8b 45 0c mov 0xc(%ebp),%eax - 130a0: 8b 40 20 mov 0x20(%eax),%eax - 130a3: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 130a6: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 130a9: 8b 40 08 mov 0x8(%eax),%eax - 130ac: 89 45 f0 mov %eax,0xfffffff0(%ebp) - 130af: 8b 45 0c mov 0xc(%ebp),%eax - 130b2: 8b 40 14 mov 0x14(%eax),%eax - 130b5: 89 45 ec mov %eax,0xffffffec(%ebp) - 130b8: 83 ec 04 sub $0x4,%esp - 130bb: ff 75 0c pushl 0xc(%ebp) - 130be: ff 75 f4 pushl 0xfffffff4(%ebp) - 130c1: ff 75 08 pushl 0x8(%ebp) - 130c4: e8 3a f8 ff ff call 12903 <_td_done> - 130c9: 83 c4 10 add $0x10,%esp - 130cc: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 130cf: 66 ff 40 06 incw 0x6(%eax) - 130d3: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 130d6: 8b 55 f0 mov 0xfffffff0(%ebp),%edx - 130d9: 66 8b 40 06 mov 0x6(%eax),%ax - 130dd: 66 3b 42 04 cmp 0x4(%edx),%ax - 130e1: 75 1d jne 13100 <_dl_done_list+0x83> - 130e3: 83 ec 04 sub $0x4,%esp - 130e6: ff 75 10 pushl 0x10(%ebp) - 130e9: ff 75 f4 pushl 0xfffffff4(%ebp) - 130ec: ff 75 08 pushl 0x8(%ebp) - 130ef: e8 53 e8 ff ff call 11947 <_finish_urb> - 130f4: 83 c4 10 add $0x10,%esp - 130f7: 8b 45 08 mov 0x8(%ebp),%eax - 130fa: c7 00 01 00 00 00 movl $0x1,(%eax) - 13100: 8b 45 ec mov 0xffffffec(%ebp),%eax - 13103: 83 c0 20 add $0x20,%eax - 13106: 50 push %eax - 13107: e8 5c ff ff ff call 13068 <_list_empty> - 1310c: 83 c4 04 add $0x4,%esp - 1310f: 85 c0 test %eax,%eax - 13111: 74 10 je 13123 <_dl_done_list+0xa6> - 13113: ff 75 ec pushl 0xffffffec(%ebp) - 13116: ff 75 08 pushl 0x8(%ebp) - 13119: e8 6e ed ff ff call 11e8c <_ed_deschedule> - 1311e: 83 c4 08 add $0x8,%esp - 13121: eb 37 jmp 1315a <_dl_done_list+0xdd> - 13123: 8b 45 ec mov 0xffffffec(%ebp),%eax - 13126: 8b 00 mov (%eax),%eax - 13128: c1 e8 1b shr $0x1b,%eax - 1312b: 83 e0 01 and $0x1,%eax - 1312e: 85 c0 test %eax,%eax - 13130: 75 28 jne 1315a <_dl_done_list+0xdd> - 13132: 8b 45 ec mov 0xffffffec(%ebp),%eax - 13135: 8b 40 20 mov 0x20(%eax),%eax - 13138: 83 e8 2c sub $0x2c,%eax - 1313b: 89 45 0c mov %eax,0xc(%ebp) - 1313e: 8b 45 0c mov 0xc(%ebp),%eax - 13141: 8b 00 mov (%eax),%eax - 13143: c1 e8 11 shr $0x11,%eax - 13146: 83 e0 01 and $0x1,%eax - 13149: 85 c0 test %eax,%eax - 1314b: 75 0d jne 1315a <_dl_done_list+0xdd> - 1314d: 8b 45 ec mov 0xffffffec(%ebp),%eax - 13150: 8b 55 ec mov 0xffffffec(%ebp),%edx - 13153: 8b 12 mov (%edx),%edx - 13155: 80 e6 bf and $0xbf,%dh - 13158: 89 10 mov %edx,(%eax) - 1315a: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 1315d: 89 45 0c mov %eax,0xc(%ebp) - 13160: e9 25 ff ff ff jmp 1308a <_dl_done_list+0xd> - 13165: c9 leave - 13166: c3 ret - -00013167 <_ohci_urb_enqueue>: - 13167: 55 push %ebp - 13168: 89 e5 mov %esp,%ebp - 1316a: 56 push %esi - 1316b: 53 push %ebx - 1316c: 83 ec 50 sub $0x50,%esp - 1316f: 8b 45 08 mov 0x8(%ebp),%eax - 13172: 89 45 f0 mov %eax,0xfffffff0(%ebp) - 13175: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 13178: 2d 34 02 00 00 sub $0x234,%eax - 1317d: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 13180: 8b 45 0c mov 0xc(%ebp),%eax - 13183: 8b 40 18 mov 0x18(%eax),%eax - 13186: 89 45 e8 mov %eax,0xffffffe8(%ebp) - 13189: c7 45 e0 00 00 00 00 movl $0x0,0xffffffe0(%ebp) - 13190: c7 45 d8 00 00 00 00 movl $0x0,0xffffffd8(%ebp) - 13197: 8b 45 0c mov 0xc(%ebp),%eax - 1319a: ff 70 48 pushl 0x48(%eax) - 1319d: ff 75 e8 pushl 0xffffffe8(%ebp) - 131a0: 8b 45 0c mov 0xc(%ebp),%eax - 131a3: ff 70 14 pushl 0x14(%eax) - 131a6: ff 75 f4 pushl 0xfffffff4(%ebp) - 131a9: e8 02 ef ff ff call 120b0 <_ed_get> - 131ae: 83 c4 10 add $0x10,%esp - 131b1: 89 45 f0 mov %eax,0xfffffff0(%ebp) - 131b4: 83 7d f0 00 cmpl $0x0,0xfffffff0(%ebp) - 131b8: 75 0c jne 131c6 <_ohci_urb_enqueue+0x5f> - 131ba: c7 45 cc f4 ff ff ff movl $0xfffffff4,0xffffffcc(%ebp) - 131c1: e9 23 03 00 00 jmp 134e9 <_ohci_urb_enqueue+0x382> - 131c6: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 131c9: ba 00 00 00 00 mov $0x0,%edx - 131ce: 8a 50 29 mov 0x29(%eax),%dl - 131d1: 89 55 c0 mov %edx,0xffffffc0(%ebp) - 131d4: 83 7d c0 00 cmpl $0x0,0xffffffc0(%ebp) - 131d8: 0f 84 f7 00 00 00 je 132d5 <_ohci_urb_enqueue+0x16e> - 131de: 83 7d c0 02 cmpl $0x2,0xffffffc0(%ebp) - 131e2: 74 02 je 131e6 <_ohci_urb_enqueue+0x7f> - 131e4: eb 1f jmp 13205 <_ohci_urb_enqueue+0x9e> - 131e6: 8b 45 0c mov 0xc(%ebp),%eax - 131e9: 81 78 2c 00 10 00 00 cmpl $0x1000,0x2c(%eax) - 131f0: 7e 0c jle 131fe <_ohci_urb_enqueue+0x97> - 131f2: c7 45 cc a6 ff ff ff movl $0xffffffa6,0xffffffcc(%ebp) - 131f9: e9 eb 02 00 00 jmp 134e9 <_ohci_urb_enqueue+0x382> - 131fe: c7 45 e0 02 00 00 00 movl $0x2,0xffffffe0(%ebp) - 13205: 8b 45 0c mov 0xc(%ebp),%eax - 13208: 8b 40 2c mov 0x2c(%eax),%eax - 1320b: 89 45 c8 mov %eax,0xffffffc8(%ebp) - 1320e: 83 7d c8 00 cmpl $0x0,0xffffffc8(%ebp) - 13212: 79 07 jns 1321b <_ohci_urb_enqueue+0xb4> - 13214: 81 45 c8 ff 0f 00 00 addl $0xfff,0xffffffc8(%ebp) - 1321b: 8b 55 c8 mov 0xffffffc8(%ebp),%edx - 1321e: c1 fa 0c sar $0xc,%edx - 13221: 8d 45 e0 lea 0xffffffe0(%ebp),%eax - 13224: 01 10 add %edx,(%eax) - 13226: 8b 45 0c mov 0xc(%ebp),%eax - 13229: 8b 40 2c mov 0x2c(%eax),%eax - 1322c: 25 ff 0f 00 00 and $0xfff,%eax - 13231: 85 c0 test %eax,%eax - 13233: 74 05 je 1323a <_ohci_urb_enqueue+0xd3> - 13235: 8d 45 e0 lea 0xffffffe0(%ebp),%eax - 13238: ff 00 incl (%eax) - 1323a: 83 7d e0 00 cmpl $0x0,0xffffffe0(%ebp) - 1323e: 75 0a jne 1324a <_ohci_urb_enqueue+0xe3> - 13240: 8d 45 e0 lea 0xffffffe0(%ebp),%eax - 13243: ff 00 incl (%eax) - 13245: e9 94 00 00 00 jmp 132de <_ohci_urb_enqueue+0x177> - 1324a: 8b 45 0c mov 0xc(%ebp),%eax - 1324d: 8b 40 20 mov 0x20(%eax),%eax - 13250: c1 e8 06 shr $0x6,%eax - 13253: 83 e0 01 and $0x1,%eax - 13256: 85 c0 test %eax,%eax - 13258: 0f 84 80 00 00 00 je 132de <_ohci_urb_enqueue+0x177> - 1325e: 8b 45 0c mov 0xc(%ebp),%eax - 13261: 8b 40 2c mov 0x2c(%eax),%eax - 13264: 89 45 c4 mov %eax,0xffffffc4(%ebp) - 13267: 8b 45 e8 mov 0xffffffe8(%ebp),%eax - 1326a: c1 e8 07 shr $0x7,%eax - 1326d: 83 e0 01 and $0x1,%eax - 13270: 85 c0 test %eax,%eax - 13272: 75 2e jne 132a2 <_ohci_urb_enqueue+0x13b> - 13274: 8b 45 0c mov 0xc(%ebp),%eax - 13277: 8b 40 14 mov 0x14(%eax),%eax - 1327a: 89 45 b8 mov %eax,0xffffffb8(%ebp) - 1327d: 8b 45 e8 mov 0xffffffe8(%ebp),%eax - 13280: c1 e8 0f shr $0xf,%eax - 13283: 83 e0 0f and $0xf,%eax - 13286: 89 45 b4 mov %eax,0xffffffb4(%ebp) - 13289: 8b 45 c4 mov 0xffffffc4(%ebp),%eax - 1328c: 8b 4d b4 mov 0xffffffb4(%ebp),%ecx - 1328f: 8b 5d b8 mov 0xffffffb8(%ebp),%ebx - 13292: 99 cltd - 13293: f7 7c 8b 78 idivl 0x78(%ebx,%ecx,4) - 13297: 89 55 b8 mov %edx,0xffffffb8(%ebp) - 1329a: 83 7d b8 00 cmpl $0x0,0xffffffb8(%ebp) - 1329e: 75 3e jne 132de <_ohci_urb_enqueue+0x177> - 132a0: eb 2c jmp 132ce <_ohci_urb_enqueue+0x167> - 132a2: 8b 45 0c mov 0xc(%ebp),%eax - 132a5: 8b 40 14 mov 0x14(%eax),%eax - 132a8: 89 45 b8 mov %eax,0xffffffb8(%ebp) - 132ab: 8b 45 e8 mov 0xffffffe8(%ebp),%eax - 132ae: c1 e8 0f shr $0xf,%eax - 132b1: 83 e0 0f and $0xf,%eax - 132b4: 89 45 b4 mov %eax,0xffffffb4(%ebp) - 132b7: 8b 45 c4 mov 0xffffffc4(%ebp),%eax - 132ba: 8b 4d b4 mov 0xffffffb4(%ebp),%ecx - 132bd: 8b 5d b8 mov 0xffffffb8(%ebp),%ebx - 132c0: 99 cltd - 132c1: f7 7c 8b 38 idivl 0x38(%ebx,%ecx,4) - 132c5: 89 55 b8 mov %edx,0xffffffb8(%ebp) - 132c8: 83 7d b8 00 cmpl $0x0,0xffffffb8(%ebp) - 132cc: 75 10 jne 132de <_ohci_urb_enqueue+0x177> - 132ce: 8d 45 e0 lea 0xffffffe0(%ebp),%eax - 132d1: ff 00 incl (%eax) - 132d3: eb 09 jmp 132de <_ohci_urb_enqueue+0x177> - 132d5: 8b 45 0c mov 0xc(%ebp),%eax - 132d8: 8b 40 44 mov 0x44(%eax),%eax - 132db: 89 45 e0 mov %eax,0xffffffe0(%ebp) - 132de: 83 ec 08 sub $0x8,%esp - 132e1: 8b 45 e0 mov 0xffffffe0(%ebp),%eax - 132e4: c1 e0 02 shl $0x2,%eax - 132e7: 83 c0 0c add $0xc,%eax - 132ea: 50 push %eax - 132eb: 6a 01 push $0x1 - 132ed: e8 7e 12 00 00 call 14570 <_ExAllocatePool@8> - 132f2: 83 c4 08 add $0x8,%esp - 132f5: 89 45 ec mov %eax,0xffffffec(%ebp) - 132f8: 83 7d ec 00 cmpl $0x0,0xffffffec(%ebp) - 132fc: 75 0c jne 1330a <_ohci_urb_enqueue+0x1a3> - 132fe: c7 45 cc f4 ff ff ff movl $0xfffffff4,0xffffffcc(%ebp) - 13305: e9 df 01 00 00 jmp 134e9 <_ohci_urb_enqueue+0x382> - 1330a: 83 ec 04 sub $0x4,%esp - 1330d: 8b 45 e0 mov 0xffffffe0(%ebp),%eax - 13310: c1 e0 02 shl $0x2,%eax - 13313: 83 c0 0c add $0xc,%eax - 13316: 50 push %eax - 13317: 6a 00 push $0x0 - 13319: ff 75 ec pushl 0xffffffec(%ebp) - 1331c: e8 7f 12 00 00 call 145a0 <_memset> - 13321: 83 c4 10 add $0x10,%esp - 13324: 8b 55 ec mov 0xffffffec(%ebp),%edx - 13327: 8b 45 e0 mov 0xffffffe0(%ebp),%eax - 1332a: 66 89 42 04 mov %ax,0x4(%edx) - 1332e: 8b 55 ec mov 0xffffffec(%ebp),%edx - 13331: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 13334: 89 02 mov %eax,(%edx) - 13336: c7 45 e4 00 00 00 00 movl $0x0,0xffffffe4(%ebp) - 1333d: 8b 45 e4 mov 0xffffffe4(%ebp),%eax - 13340: 3b 45 e0 cmp 0xffffffe0(%ebp),%eax - 13343: 7d 56 jge 1339b <_ohci_urb_enqueue+0x234> - 13345: 8b 5d ec mov 0xffffffec(%ebp),%ebx - 13348: 8b 75 e4 mov 0xffffffe4(%ebp),%esi - 1334b: 83 ec 08 sub $0x8,%esp - 1334e: ff 75 10 pushl 0x10(%ebp) - 13351: ff 75 f4 pushl 0xfffffff4(%ebp) - 13354: e8 28 e4 ff ff call 11781 <_td_alloc> - 13359: 83 c4 10 add $0x10,%esp - 1335c: 89 44 b3 0c mov %eax,0xc(%ebx,%esi,4) - 13360: 8b 55 ec mov 0xffffffec(%ebp),%edx - 13363: 8b 45 e4 mov 0xffffffe4(%ebp),%eax - 13366: 83 7c 82 0c 00 cmpl $0x0,0xc(%edx,%eax,4) - 1336b: 75 27 jne 13394 <_ohci_urb_enqueue+0x22d> - 1336d: 8b 55 ec mov 0xffffffec(%ebp),%edx - 13370: 8b 45 e4 mov 0xffffffe4(%ebp),%eax - 13373: 66 89 42 04 mov %ax,0x4(%edx) - 13377: 83 ec 08 sub $0x8,%esp - 1337a: ff 75 ec pushl 0xffffffec(%ebp) - 1337d: ff 75 f4 pushl 0xfffffff4(%ebp) - 13380: e8 5c e5 ff ff call 118e1 <_urb_free_priv> - 13385: 83 c4 10 add $0x10,%esp - 13388: c7 45 cc f4 ff ff ff movl $0xfffffff4,0xffffffcc(%ebp) - 1338f: e9 55 01 00 00 jmp 134e9 <_ohci_urb_enqueue+0x382> - 13394: 8d 45 e4 lea 0xffffffe4(%ebp),%eax - 13397: ff 00 incl (%eax) - 13399: eb a2 jmp 1333d <_ohci_urb_enqueue+0x1d6> - 1339b: c7 45 dc 00 00 00 00 movl $0x0,0xffffffdc(%ebp) - 133a2: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 133a5: 83 b8 a4 01 00 00 00 cmpl $0x0,0x1a4(%eax) - 133ac: 75 0e jne 133bc <_ohci_urb_enqueue+0x255> - 133ae: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 133b1: 83 b8 a8 01 00 00 00 cmpl $0x0,0x1a8(%eax) - 133b8: 75 02 jne 133bc <_ohci_urb_enqueue+0x255> - 133ba: eb 0c jmp 133c8 <_ohci_urb_enqueue+0x261> - 133bc: c7 45 d8 ed ff ff ff movl $0xffffffed,0xffffffd8(%ebp) - 133c3: e9 04 01 00 00 jmp 134cc <_ohci_urb_enqueue+0x365> - 133c8: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 133cb: 80 78 28 00 cmpb $0x0,0x28(%eax) - 133cf: 0f 85 b0 00 00 00 jne 13485 <_ohci_urb_enqueue+0x31e> - 133d5: ff 75 f0 pushl 0xfffffff0(%ebp) - 133d8: ff 75 f4 pushl 0xfffffff4(%ebp) - 133db: e8 d2 e7 ff ff call 11bb2 <_ed_schedule> - 133e0: 83 c4 08 add $0x8,%esp - 133e3: 89 45 d8 mov %eax,0xffffffd8(%ebp) - 133e6: 83 7d d8 00 cmpl $0x0,0xffffffd8(%ebp) - 133ea: 79 05 jns 133f1 <_ohci_urb_enqueue+0x28a> - 133ec: e9 db 00 00 00 jmp 134cc <_ohci_urb_enqueue+0x365> - 133f1: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 133f4: 80 78 29 00 cmpb $0x0,0x29(%eax) - 133f8: 0f 85 b4 00 00 00 jne 134b2 <_ohci_urb_enqueue+0x34b> - 133fe: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 13401: 8b 40 08 mov 0x8(%eax),%eax - 13404: 66 8b 80 80 00 00 00 mov 0x80(%eax),%ax - 1340b: 66 89 45 d6 mov %ax,0xffffffd6(%ebp) - 1340f: 66 c7 45 d4 08 00 movw $0x8,0xffffffd4(%ebp) - 13415: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 13418: 66 8b 40 2c mov 0x2c(%eax),%ax - 1341c: 66 89 45 d2 mov %ax,0xffffffd2(%ebp) - 13420: 8b 45 d4 mov 0xffffffd4(%ebp),%eax - 13423: 66 3b 45 d2 cmp 0xffffffd2(%ebp),%ax - 13427: 76 10 jbe 13439 <_ohci_urb_enqueue+0x2d2> - 13429: 8b 45 d4 mov 0xffffffd4(%ebp),%eax - 1342c: 89 c2 mov %eax,%edx - 1342e: 81 e2 ff ff 00 00 and $0xffff,%edx - 13434: 89 55 bc mov %edx,0xffffffbc(%ebp) - 13437: eb 0f jmp 13448 <_ohci_urb_enqueue+0x2e1> - 13439: 66 8b 45 d2 mov 0xffffffd2(%ebp),%ax - 1343d: 89 c1 mov %eax,%ecx - 1343f: 81 e1 ff ff 00 00 and $0xffff,%ecx - 13445: 89 4d bc mov %ecx,0xffffffbc(%ebp) - 13448: 8d 45 d6 lea 0xffffffd6(%ebp),%eax - 1344b: 8b 5d bc mov 0xffffffbc(%ebp),%ebx - 1344e: 66 01 18 add %bx,(%eax) - 13451: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 13454: 66 8b 40 2c mov 0x2c(%eax),%ax - 13458: 48 dec %eax - 13459: 89 c2 mov %eax,%edx - 1345b: f7 d2 not %edx - 1345d: 8d 45 d6 lea 0xffffffd6(%ebp),%eax - 13460: 66 21 10 and %dx,(%eax) - 13463: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 13466: ba 00 00 00 00 mov $0x0,%edx - 1346b: 8a 50 2a mov 0x2a(%eax),%dl - 1346e: 8d 45 d6 lea 0xffffffd6(%ebp),%eax - 13471: 66 09 10 or %dx,(%eax) - 13474: 8b 55 0c mov 0xc(%ebp),%edx - 13477: 66 8b 45 d6 mov 0xffffffd6(%ebp),%ax - 1347b: 25 ff ff 00 00 and $0xffff,%eax - 13480: 89 42 40 mov %eax,0x40(%edx) - 13483: eb 2d jmp 134b2 <_ohci_urb_enqueue+0x34b> - 13485: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 13488: 80 78 29 00 cmpb $0x0,0x29(%eax) - 1348c: 75 24 jne 134b2 <_ohci_urb_enqueue+0x34b> - 1348e: 8b 4d 0c mov 0xc(%ebp),%ecx - 13491: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 13494: 66 8b 40 30 mov 0x30(%eax),%ax - 13498: 89 c2 mov %eax,%edx - 1349a: 81 e2 ff ff 00 00 and $0xffff,%edx - 134a0: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 134a3: 66 8b 40 2c mov 0x2c(%eax),%ax - 134a7: 25 ff ff 00 00 and $0xffff,%eax - 134ac: 8d 04 02 lea (%edx,%eax,1),%eax - 134af: 89 41 40 mov %eax,0x40(%ecx) - 134b2: 8b 55 0c mov 0xc(%ebp),%edx - 134b5: 8b 45 ec mov 0xffffffec(%ebp),%eax - 134b8: 89 42 08 mov %eax,0x8(%edx) - 134bb: 83 ec 08 sub $0x8,%esp - 134be: ff 75 0c pushl 0xc(%ebp) - 134c1: ff 75 f4 pushl 0xfffffff4(%ebp) - 134c4: e8 a4 f0 ff ff call 1256d <_td_submit_urb> - 134c9: 83 c4 10 add $0x10,%esp - 134cc: 83 7d d8 00 cmpl $0x0,0xffffffd8(%ebp) - 134d0: 74 11 je 134e3 <_ohci_urb_enqueue+0x37c> - 134d2: 83 ec 08 sub $0x8,%esp - 134d5: ff 75 ec pushl 0xffffffec(%ebp) - 134d8: ff 75 f4 pushl 0xfffffff4(%ebp) - 134db: e8 01 e4 ff ff call 118e1 <_urb_free_priv> - 134e0: 83 c4 10 add $0x10,%esp - 134e3: 8b 45 d8 mov 0xffffffd8(%ebp),%eax - 134e6: 89 45 cc mov %eax,0xffffffcc(%ebp) - 134e9: 8b 45 cc mov 0xffffffcc(%ebp),%eax - 134ec: 8d 65 f8 lea 0xfffffff8(%ebp),%esp - 134ef: 5b pop %ebx - 134f0: 5e pop %esi - 134f1: 5d pop %ebp - 134f2: c3 ret - -000134f3 <_ohci_urb_dequeue>: - 134f3: 55 push %ebp - 134f4: 89 e5 mov %esp,%ebp - 134f6: 83 ec 18 sub $0x18,%esp - 134f9: 8b 45 08 mov 0x8(%ebp),%eax - 134fc: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 134ff: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 13502: 2d 34 02 00 00 sub $0x234,%eax - 13507: 89 45 fc mov %eax,0xfffffffc(%ebp) - 1350a: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) - 13511: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 13514: 83 b8 a4 01 00 00 00 cmpl $0x0,0x1a4(%eax) - 1351b: 75 36 jne 13553 <_ohci_urb_dequeue+0x60> - 1351d: 8b 45 0c mov 0xc(%ebp),%eax - 13520: 8b 40 08 mov 0x8(%eax),%eax - 13523: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 13526: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) - 1352a: 74 4c je 13578 <_ohci_urb_dequeue+0x85> - 1352c: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 1352f: c7 40 08 01 00 00 00 movl $0x1,0x8(%eax) - 13536: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 13539: 8b 00 mov (%eax),%eax - 1353b: 80 78 28 02 cmpb $0x2,0x28(%eax) - 1353f: 75 37 jne 13578 <_ohci_urb_dequeue+0x85> - 13541: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 13544: ff 30 pushl (%eax) - 13546: ff 75 fc pushl 0xfffffffc(%ebp) - 13549: e8 be ed ff ff call 1230c <_start_urb_unlink> - 1354e: 83 c4 08 add $0x8,%esp - 13551: eb 25 jmp 13578 <_ohci_urb_dequeue+0x85> - 13553: 8b 45 0c mov 0xc(%ebp),%eax - 13556: 83 78 08 00 cmpl $0x0,0x8(%eax) - 1355a: 74 1c je 13578 <_ohci_urb_dequeue+0x85> - 1355c: 83 ec 04 sub $0x4,%esp - 1355f: 6a 00 push $0x0 - 13561: ff 75 0c pushl 0xc(%ebp) - 13564: ff 75 fc pushl 0xfffffffc(%ebp) - 13567: e8 db e3 ff ff call 11947 <_finish_urb> - 1356c: 83 c4 10 add $0x10,%esp - 1356f: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 13572: c7 00 01 00 00 00 movl $0x1,(%eax) - 13578: b8 00 00 00 00 mov $0x0,%eax - 1357d: c9 leave - 1357e: c3 ret - -0001357f <_ohci_endpoint_disable>: - 1357f: 55 push %ebp - 13580: 89 e5 mov %esp,%ebp - 13582: 83 ec 18 sub $0x18,%esp - 13585: 8b 45 08 mov 0x8(%ebp),%eax - 13588: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 1358b: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 1358e: 2d 34 02 00 00 sub $0x234,%eax - 13593: 89 45 fc mov %eax,0xfffffffc(%ebp) - 13596: 8b 45 10 mov 0x10(%ebp),%eax - 13599: 83 e0 0f and $0xf,%eax - 1359c: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 1359f: 8d 45 f8 lea 0xfffffff8(%ebp),%eax - 135a2: d1 20 shll (%eax) - 135a4: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) - 135a8: 74 13 je 135bd <_ohci_endpoint_disable+0x3e> - 135aa: 8b 45 10 mov 0x10(%ebp),%eax - 135ad: c1 e8 07 shr $0x7,%eax - 135b0: 83 e0 01 and $0x1,%eax - 135b3: 85 c0 test %eax,%eax - 135b5: 75 06 jne 135bd <_ohci_endpoint_disable+0x3e> - 135b7: 8d 45 f8 lea 0xfffffff8(%ebp),%eax - 135ba: 83 08 01 orl $0x1,(%eax) - 135bd: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) - 135c4: 8b 45 0c mov 0xc(%ebp),%eax - 135c7: 8b 55 f8 mov 0xfffffff8(%ebp),%edx - 135ca: 8b 44 90 10 mov 0x10(%eax,%edx,4),%eax - 135ce: 89 45 f0 mov %eax,0xfffffff0(%ebp) - 135d1: 83 7d f0 00 cmpl $0x0,0xfffffff0(%ebp) - 135d5: 75 05 jne 135dc <_ohci_endpoint_disable+0x5d> - 135d7: e9 ac 00 00 00 jmp 13688 <_ohci_endpoint_disable+0x109> - 135dc: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 135df: 8b 80 14 03 00 00 mov 0x314(%eax),%eax - 135e5: 83 e0 01 and $0x1,%eax - 135e8: 85 c0 test %eax,%eax - 135ea: 74 0e je 135fa <_ohci_endpoint_disable+0x7b> - 135ec: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 135ef: 83 b8 a4 01 00 00 00 cmpl $0x0,0x1a4(%eax) - 135f6: 75 02 jne 135fa <_ohci_endpoint_disable+0x7b> - 135f8: eb 07 jmp 13601 <_ohci_endpoint_disable+0x82> - 135fa: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 135fd: c6 40 28 00 movb $0x0,0x28(%eax) - 13601: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 13604: ba 00 00 00 00 mov $0x0,%edx - 13609: 8a 50 28 mov 0x28(%eax),%dl - 1360c: 89 55 ec mov %edx,0xffffffec(%ebp) - 1360f: 83 7d ec 00 cmpl $0x0,0xffffffec(%ebp) - 13613: 74 17 je 1362c <_ohci_endpoint_disable+0xad> - 13615: 83 7d ec 01 cmpl $0x1,0xffffffec(%ebp) - 13619: 74 02 je 1361d <_ohci_endpoint_disable+0x9e> - 1361b: eb 49 jmp 13666 <_ohci_endpoint_disable+0xe7> - 1361d: 83 ec 0c sub $0xc,%esp - 13620: 6a 01 push $0x1 - 13622: e8 9d 0d 00 00 call 143c4 <_my_schedule_timeout> - 13627: 83 c4 10 add $0x10,%esp - 1362a: eb 91 jmp 135bd <_ohci_endpoint_disable+0x3e> - 1362c: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 1362f: 83 c0 20 add $0x20,%eax - 13632: 50 push %eax - 13633: e8 30 fa ff ff call 13068 <_list_empty> - 13638: 83 c4 04 add $0x4,%esp - 1363b: 85 c0 test %eax,%eax - 1363d: 74 27 je 13666 <_ohci_endpoint_disable+0xe7> - 1363f: 83 ec 08 sub $0x8,%esp - 13642: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 13645: ff 70 14 pushl 0x14(%eax) - 13648: ff 75 fc pushl 0xfffffffc(%ebp) - 1364b: e8 aa e1 ff ff call 117fa <_td_free> - 13650: 83 c4 10 add $0x10,%esp - 13653: 83 ec 08 sub $0x8,%esp - 13656: ff 75 f0 pushl 0xfffffff0(%ebp) - 13659: ff 75 fc pushl 0xfffffffc(%ebp) - 1365c: e8 6a e2 ff ff call 118cb <_ed_free> - 13661: 83 c4 10 add $0x10,%esp - 13664: eb 14 jmp 1367a <_ohci_endpoint_disable+0xfb> - 13666: 83 ec 08 sub $0x8,%esp - 13669: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 1366c: ff 70 14 pushl 0x14(%eax) - 1366f: ff 75 fc pushl 0xfffffffc(%ebp) - 13672: e8 83 e1 ff ff call 117fa <_td_free> - 13677: 83 c4 10 add $0x10,%esp - 1367a: 8b 55 0c mov 0xc(%ebp),%edx - 1367d: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 13680: c7 44 82 10 00 00 00 movl $0x0,0x10(%edx,%eax,4) - 13687: 00 - 13688: c9 leave - 13689: c3 ret - -0001368a <_ohci_get_frame>: - 1368a: 55 push %ebp - 1368b: 89 e5 mov %esp,%ebp - 1368d: 83 ec 08 sub $0x8,%esp - 13690: 8b 45 08 mov 0x8(%ebp),%eax - 13693: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 13696: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 13699: 2d 34 02 00 00 sub $0x234,%eax - 1369e: 89 45 fc mov %eax,0xfffffffc(%ebp) - 136a1: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 136a4: 8b 40 08 mov 0x8(%eax),%eax - 136a7: 66 8b 80 80 00 00 00 mov 0x80(%eax),%ax - 136ae: 25 ff ff 00 00 and $0xffff,%eax - 136b3: c9 leave - 136b4: c3 ret - -000136b5 <_hc_reset>: - 136b5: 55 push %ebp - 136b6: 89 e5 mov %esp,%ebp - 136b8: 83 ec 18 sub $0x18,%esp - 136bb: 8b 45 08 mov 0x8(%ebp),%eax - 136be: 8b 40 04 mov 0x4(%eax),%eax - 136c1: 83 c0 14 add $0x14,%eax - 136c4: c7 00 00 00 00 80 movl $0x80000000,(%eax) - 136ca: 8b 45 08 mov 0x8(%ebp),%eax - 136cd: 8b 40 04 mov 0x4(%eax),%eax - 136d0: 83 c0 0c add $0xc,%eax - 136d3: 8b 00 mov (%eax),%eax - 136d5: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 136d8: 8b 45 08 mov 0x8(%ebp),%eax - 136db: 8b 50 04 mov 0x4(%eax),%edx - 136de: 83 c2 0c add $0xc,%edx - 136e1: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 136e4: 89 02 mov %eax,(%edx) - 136e6: 8b 45 08 mov 0x8(%ebp),%eax - 136e9: 8b 40 04 mov 0x4(%eax),%eax - 136ec: 83 c0 04 add $0x4,%eax - 136ef: 8b 00 mov (%eax),%eax - 136f1: c1 e8 08 shr $0x8,%eax - 136f4: 83 e0 01 and $0x1,%eax - 136f7: 85 c0 test %eax,%eax - 136f9: 74 1f je 1371a <_hc_reset+0x65> - 136fb: 8b 45 08 mov 0x8(%ebp),%eax - 136fe: 8b 40 04 mov 0x4(%eax),%eax - 13701: 83 c0 04 add $0x4,%eax - 13704: 8b 00 mov (%eax),%eax - 13706: 80 e4 fe and $0xfe,%ah - 13709: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 1370c: 8b 45 08 mov 0x8(%ebp),%eax - 1370f: 8b 50 04 mov 0x4(%eax),%edx - 13712: 83 c2 04 add $0x4,%edx - 13715: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 13718: 89 02 mov %eax,(%edx) - 1371a: 8b 55 08 mov 0x8(%ebp),%edx - 1371d: 8b 45 08 mov 0x8(%ebp),%eax - 13720: 8b 40 04 mov 0x4(%eax),%eax - 13723: 83 c0 04 add $0x4,%eax - 13726: 8b 00 mov (%eax),%eax - 13728: 89 82 2c 02 00 00 mov %eax,0x22c(%edx) - 1372e: 8b 55 08 mov 0x8(%ebp),%edx - 13731: 8b 45 08 mov 0x8(%ebp),%eax - 13734: 8b 80 2c 02 00 00 mov 0x22c(%eax),%eax - 1373a: 25 00 02 00 00 and $0x200,%eax - 1373f: 89 82 2c 02 00 00 mov %eax,0x22c(%edx) - 13745: 8b 45 08 mov 0x8(%ebp),%eax - 13748: 8b 50 04 mov 0x4(%eax),%edx - 1374b: 83 c2 04 add $0x4,%edx - 1374e: 8b 45 08 mov 0x8(%ebp),%eax - 13751: 8b 80 2c 02 00 00 mov 0x22c(%eax),%eax - 13757: 89 02 mov %eax,(%edx) - 13759: 8b 45 08 mov 0x8(%ebp),%eax - 1375c: 8b 40 04 mov 0x4(%eax),%eax - 1375f: 83 c0 04 add $0x4,%eax - 13762: 8b 00 mov (%eax),%eax - 13764: 83 ec 0c sub $0xc,%esp - 13767: 6a 32 push $0x32 - 13769: e8 92 08 00 00 call 14000 <_wait_ms> - 1376e: 83 c4 10 add $0x10,%esp - 13771: 8b 45 08 mov 0x8(%ebp),%eax - 13774: 8b 40 04 mov 0x4(%eax),%eax - 13777: 83 c0 08 add $0x8,%eax - 1377a: c7 00 01 00 00 00 movl $0x1,(%eax) - 13780: c7 45 fc 1e 00 00 00 movl $0x1e,0xfffffffc(%ebp) - 13787: 8b 45 08 mov 0x8(%ebp),%eax - 1378a: 8b 40 04 mov 0x4(%eax),%eax - 1378d: 83 c0 08 add $0x8,%eax - 13790: 8b 00 mov (%eax),%eax - 13792: 83 e0 01 and $0x1,%eax - 13795: 85 c0 test %eax,%eax - 13797: 74 23 je 137bc <_hc_reset+0x107> - 13799: 8d 45 fc lea 0xfffffffc(%ebp),%eax - 1379c: ff 08 decl (%eax) - 1379e: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) - 137a2: 75 09 jne 137ad <_hc_reset+0xf8> - 137a4: c7 45 f0 ff ff ff ff movl $0xffffffff,0xfffffff0(%ebp) - 137ab: eb 35 jmp 137e2 <_hc_reset+0x12d> - 137ad: 83 ec 0c sub $0xc,%esp - 137b0: 6a 01 push $0x1 - 137b2: e8 49 08 00 00 call 14000 <_wait_ms> - 137b7: 83 c4 10 add $0x10,%esp - 137ba: eb cb jmp 13787 <_hc_reset+0xd2> - 137bc: 8b 45 08 mov 0x8(%ebp),%eax - 137bf: 8b 50 04 mov 0x4(%eax),%edx - 137c2: 83 c2 04 add $0x4,%edx - 137c5: 8b 45 08 mov 0x8(%ebp),%eax - 137c8: 8b 80 2c 02 00 00 mov 0x22c(%eax),%eax - 137ce: 89 02 mov %eax,(%edx) - 137d0: 8b 45 08 mov 0x8(%ebp),%eax - 137d3: 8b 40 04 mov 0x4(%eax),%eax - 137d6: 83 c0 04 add $0x4,%eax - 137d9: 8b 00 mov (%eax),%eax - 137db: c7 45 f0 00 00 00 00 movl $0x0,0xfffffff0(%ebp) - 137e2: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 137e5: c9 leave - 137e6: c3 ret - -000137e7 <_hc_start>: - 137e7: 55 push %ebp - 137e8: 89 e5 mov %esp,%ebp - 137ea: 53 push %ebx - 137eb: 83 ec 14 sub $0x14,%esp - 137ee: 8b 45 08 mov 0x8(%ebp),%eax - 137f1: c7 80 a4 01 00 00 01 movl $0x1,0x1a4(%eax) - 137f8: 00 00 00 - 137fb: 8b 45 08 mov 0x8(%ebp),%eax - 137fe: c7 80 a8 01 00 00 00 movl $0x0,0x1a8(%eax) - 13805: 00 00 00 - 13808: 8b 45 08 mov 0x8(%ebp),%eax - 1380b: 8b 40 04 mov 0x4(%eax),%eax - 1380e: 83 c0 20 add $0x20,%eax - 13811: c7 00 00 00 00 00 movl $0x0,(%eax) - 13817: 8b 45 08 mov 0x8(%ebp),%eax - 1381a: 8b 40 04 mov 0x4(%eax),%eax - 1381d: 83 c0 28 add $0x28,%eax - 13820: c7 00 00 00 00 00 movl $0x0,(%eax) - 13826: 8b 45 08 mov 0x8(%ebp),%eax - 13829: 8b 50 04 mov 0x4(%eax),%edx - 1382c: 83 c2 18 add $0x18,%edx - 1382f: 8b 45 08 mov 0x8(%ebp),%eax - 13832: 8b 40 0c mov 0xc(%eax),%eax - 13835: 89 02 mov %eax,(%edx) - 13837: 8b 45 08 mov 0x8(%ebp),%eax - 1383a: 8b 40 04 mov 0x4(%eax),%eax - 1383d: 83 c0 34 add $0x34,%eax - 13840: c7 00 df 2e 78 27 movl $0x27782edf,(%eax) - 13846: 8b 45 08 mov 0x8(%ebp),%eax - 13849: 8b 40 04 mov 0x4(%eax),%eax - 1384c: 83 c0 40 add $0x40,%eax - 1384f: c7 00 2f 2a 00 00 movl $0x2a2f,(%eax) - 13855: 8b 45 08 mov 0x8(%ebp),%eax - 13858: 8b 40 04 mov 0x4(%eax),%eax - 1385b: 83 c0 44 add $0x44,%eax - 1385e: c7 00 28 06 00 00 movl $0x628,(%eax) - 13864: 8b 45 08 mov 0x8(%ebp),%eax - 13867: 8b 40 04 mov 0x4(%eax),%eax - 1386a: 83 c0 34 add $0x34,%eax - 1386d: 8b 00 mov (%eax),%eax - 1386f: 25 00 00 ff 3f and $0x3fff0000,%eax - 13874: 85 c0 test %eax,%eax - 13876: 74 0f je 13887 <_hc_start+0xa0> - 13878: 8b 45 08 mov 0x8(%ebp),%eax - 1387b: 8b 40 04 mov 0x4(%eax),%eax - 1387e: 83 c0 40 add $0x40,%eax - 13881: 8b 00 mov (%eax),%eax - 13883: 85 c0 test %eax,%eax - 13885: 75 0c jne 13893 <_hc_start+0xac> - 13887: c7 45 e8 b5 ff ff ff movl $0xffffffb5,0xffffffe8(%ebp) - 1388e: e9 22 02 00 00 jmp 13ab5 <_hc_start+0x2ce> - 13893: 8b 55 08 mov 0x8(%ebp),%edx - 13896: 8b 45 08 mov 0x8(%ebp),%eax - 13899: 8b 80 2c 02 00 00 mov 0x22c(%eax),%eax - 1389f: 25 00 02 00 00 and $0x200,%eax - 138a4: 89 82 2c 02 00 00 mov %eax,0x22c(%edx) - 138aa: 8b 55 08 mov 0x8(%ebp),%edx - 138ad: 8b 45 08 mov 0x8(%ebp),%eax - 138b0: 8b 80 2c 02 00 00 mov 0x22c(%eax),%eax - 138b6: 0c 8f or $0x8f,%al - 138b8: 89 82 2c 02 00 00 mov %eax,0x22c(%edx) - 138be: 8b 45 08 mov 0x8(%ebp),%eax - 138c1: c7 80 a4 01 00 00 00 movl $0x0,0x1a4(%eax) - 138c8: 00 00 00 - 138cb: 8b 45 08 mov 0x8(%ebp),%eax - 138ce: 8b 50 04 mov 0x4(%eax),%edx - 138d1: 83 c2 04 add $0x4,%edx - 138d4: 8b 45 08 mov 0x8(%ebp),%eax - 138d7: 8b 80 2c 02 00 00 mov 0x22c(%eax),%eax - 138dd: 89 02 mov %eax,(%edx) - 138df: c7 45 f8 12 00 00 80 movl $0x80000012,0xfffffff8(%ebp) - 138e6: 8b 45 08 mov 0x8(%ebp),%eax - 138e9: 8b 50 04 mov 0x4(%eax),%edx - 138ec: 83 c2 0c add $0xc,%edx - 138ef: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 138f2: 89 02 mov %eax,(%edx) - 138f4: 8b 45 08 mov 0x8(%ebp),%eax - 138f7: 8b 50 04 mov 0x4(%eax),%edx - 138fa: 83 c2 10 add $0x10,%edx - 138fd: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 13900: 89 02 mov %eax,(%edx) - 13902: 83 ec 0c sub $0xc,%esp - 13905: ff 75 08 pushl 0x8(%ebp) - 13908: e8 f3 d6 ff ff call 11000 <__end__> - 1390d: 83 c4 10 add $0x10,%esp - 13910: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 13913: 8d 45 f4 lea 0xfffffff4(%ebp),%eax - 13916: 81 20 ff f6 ff ff andl $0xfffff6ff,(%eax) - 1391c: 8b 45 08 mov 0x8(%ebp),%eax - 1391f: 8b 80 30 02 00 00 mov 0x230(%eax),%eax - 13925: d1 e8 shr %eax - 13927: 83 e0 01 and $0x1,%eax - 1392a: 85 c0 test %eax,%eax - 1392c: 74 14 je 13942 <_hc_start+0x15b> - 1392e: 8d 45 f4 lea 0xfffffff4(%ebp),%eax - 13931: 81 08 00 10 00 00 orl $0x1000,(%eax) - 13937: 8d 45 f4 lea 0xfffffff4(%ebp),%eax - 1393a: 81 20 ff fd ff 00 andl $0xfffdff,(%eax) - 13940: eb 09 jmp 1394b <_hc_start+0x164> - 13942: 8d 45 f4 lea 0xfffffff4(%ebp),%eax - 13945: 81 08 00 02 00 00 orl $0x200,(%eax) - 1394b: 8b 45 08 mov 0x8(%ebp),%eax - 1394e: 8b 50 04 mov 0x4(%eax),%edx - 13951: 83 c2 48 add $0x48,%edx - 13954: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 13957: 89 02 mov %eax,(%edx) - 13959: 8b 45 08 mov 0x8(%ebp),%eax - 1395c: 8b 40 04 mov 0x4(%eax),%eax - 1395f: 83 c0 50 add $0x50,%eax - 13962: c7 00 00 00 01 00 movl $0x10000,(%eax) - 13968: 8b 45 08 mov 0x8(%ebp),%eax - 1396b: 8b 40 04 mov 0x4(%eax),%eax - 1396e: 83 c0 4c add $0x4c,%eax - 13971: c7 00 00 00 00 00 movl $0x0,(%eax) - 13977: 8b 45 08 mov 0x8(%ebp),%eax - 1397a: 8b 40 04 mov 0x4(%eax),%eax - 1397d: 83 c0 04 add $0x4,%eax - 13980: 8b 00 mov (%eax),%eax - 13982: 83 ec 0c sub $0xc,%esp - 13985: ff 75 08 pushl 0x8(%ebp) - 13988: e8 73 d6 ff ff call 11000 <__end__> - 1398d: 83 c4 04 add $0x4,%esp - 13990: 6a 00 push $0x0 - 13992: e8 69 06 00 00 call 14000 <_wait_ms> - 13997: 83 c4 10 add $0x10,%esp - 1399a: 8b 45 08 mov 0x8(%ebp),%eax - 1399d: 05 34 02 00 00 add $0x234,%eax - 139a2: 50 push %eax - 139a3: e8 d3 dc ff ff call 1167b <_hcd_to_bus> - 139a8: 83 c4 04 add $0x4,%esp - 139ab: 89 45 ec mov %eax,0xffffffec(%ebp) - 139ae: 8b 5d ec mov 0xffffffec(%ebp),%ebx - 139b1: 83 ec 08 sub $0x8,%esp - 139b4: ff 75 ec pushl 0xffffffec(%ebp) - 139b7: 6a 00 push $0x0 - 139b9: e8 22 0c 00 00 call 145e0 <_usb_alloc_dev@8> - 139be: 83 c4 08 add $0x8,%esp - 139c1: 89 45 f0 mov %eax,0xfffffff0(%ebp) - 139c4: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 139c7: 89 43 24 mov %eax,0x24(%ebx) - 139ca: 8b 45 08 mov 0x8(%ebp),%eax - 139cd: c7 80 14 03 00 00 03 movl $0x3,0x314(%eax) - 139d4: 00 00 00 - 139d7: 83 7d f0 00 cmpl $0x0,0xfffffff0(%ebp) - 139db: 75 3f jne 13a1c <_hc_start+0x235> - 139dd: ff 75 08 pushl 0x8(%ebp) - 139e0: e8 76 d6 ff ff call 1105b <_disable> - 139e5: 83 c4 04 add $0x4,%esp - 139e8: 8b 55 08 mov 0x8(%ebp),%edx - 139eb: 8b 45 08 mov 0x8(%ebp),%eax - 139ee: 8b 80 2c 02 00 00 mov 0x22c(%eax),%eax - 139f4: 24 3f and $0x3f,%al - 139f6: 89 82 2c 02 00 00 mov %eax,0x22c(%edx) - 139fc: 8b 45 08 mov 0x8(%ebp),%eax - 139ff: 8b 50 04 mov 0x4(%eax),%edx - 13a02: 83 c2 04 add $0x4,%edx - 13a05: 8b 45 08 mov 0x8(%ebp),%eax - 13a08: 8b 80 2c 02 00 00 mov 0x22c(%eax),%eax - 13a0e: 89 02 mov %eax,(%edx) - 13a10: c7 45 e8 f4 ff ff ff movl $0xfffffff4,0xffffffe8(%ebp) - 13a17: e9 99 00 00 00 jmp 13ab5 <_hc_start+0x2ce> - 13a1c: 83 ec 0c sub $0xc,%esp - 13a1f: ff 75 f0 pushl 0xfffffff0(%ebp) - 13a22: e8 c9 0b 00 00 call 145f0 <_usb_connect@4> - 13a27: 83 c4 0c add $0xc,%esp - 13a2a: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 13a2d: c7 40 18 02 00 00 00 movl $0x2,0x18(%eax) - 13a34: 83 ec 0c sub $0xc,%esp - 13a37: 8b 45 08 mov 0x8(%ebp),%eax - 13a3a: 05 34 02 00 00 add $0x234,%eax - 13a3f: 50 push %eax - 13a40: e8 7d 00 00 00 call 13ac2 <_hcd_register_root> - 13a45: 83 c4 10 add $0x10,%esp - 13a48: 85 c0 test %eax,%eax - 13a4a: 74 54 je 13aa0 <_hc_start+0x2b9> - 13a4c: 83 ec 0c sub $0xc,%esp - 13a4f: ff 75 f0 pushl 0xfffffff0(%ebp) - 13a52: e8 a9 0b 00 00 call 14600 <_usb_put_dev@4> - 13a57: 83 c4 0c add $0xc,%esp - 13a5a: 8b 45 ec mov 0xffffffec(%ebp),%eax - 13a5d: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) - 13a64: ff 75 08 pushl 0x8(%ebp) - 13a67: e8 ef d5 ff ff call 1105b <_disable> - 13a6c: 83 c4 04 add $0x4,%esp - 13a6f: 8b 55 08 mov 0x8(%ebp),%edx - 13a72: 8b 45 08 mov 0x8(%ebp),%eax - 13a75: 8b 80 2c 02 00 00 mov 0x22c(%eax),%eax - 13a7b: 24 3f and $0x3f,%al - 13a7d: 89 82 2c 02 00 00 mov %eax,0x22c(%edx) - 13a83: 8b 45 08 mov 0x8(%ebp),%eax - 13a86: 8b 50 04 mov 0x4(%eax),%edx - 13a89: 83 c2 04 add $0x4,%edx - 13a8c: 8b 45 08 mov 0x8(%ebp),%eax - 13a8f: 8b 80 2c 02 00 00 mov 0x22c(%eax),%eax - 13a95: 89 02 mov %eax,(%edx) - 13a97: c7 45 e8 ed ff ff ff movl $0xffffffed,0xffffffe8(%ebp) - 13a9e: eb 15 jmp 13ab5 <_hc_start+0x2ce> - 13aa0: 83 ec 0c sub $0xc,%esp - 13aa3: ff 75 08 pushl 0x8(%ebp) - 13aa6: e8 12 00 00 00 call 13abd <_create_debug_files> - 13aab: 83 c4 10 add $0x10,%esp - 13aae: c7 45 e8 00 00 00 00 movl $0x0,0xffffffe8(%ebp) - 13ab5: 8b 45 e8 mov 0xffffffe8(%ebp),%eax - 13ab8: 8b 5d fc mov 0xfffffffc(%ebp),%ebx - 13abb: c9 leave - 13abc: c3 ret - -00013abd <_create_debug_files>: - 13abd: 55 push %ebp - 13abe: 89 e5 mov %esp,%ebp - 13ac0: 5d pop %ebp - 13ac1: c3 ret - -00013ac2 <_hcd_register_root>: - 13ac2: 55 push %ebp - 13ac3: 89 e5 mov %esp,%ebp - 13ac5: 83 ec 08 sub $0x8,%esp - 13ac8: 83 ec 08 sub $0x8,%esp - 13acb: 8b 45 08 mov 0x8(%ebp),%eax - 13ace: ff b0 80 00 00 00 pushl 0x80(%eax) - 13ad4: ff 75 08 pushl 0x8(%ebp) - 13ad7: e8 9f db ff ff call 1167b <_hcd_to_bus> - 13adc: 83 c4 04 add $0x4,%esp - 13adf: ff 70 24 pushl 0x24(%eax) - 13ae2: e8 29 0b 00 00 call 14610 <_usb_register_root_hub@8> - 13ae7: 83 c4 08 add $0x8,%esp - 13aea: c9 leave - 13aeb: c3 ret - -00013aec <_ohci_irq>: - 13aec: 55 push %ebp - 13aed: 89 e5 mov %esp,%ebp - 13aef: 83 ec 18 sub $0x18,%esp - 13af2: 8b 45 08 mov 0x8(%ebp),%eax - 13af5: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 13af8: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 13afb: 2d 34 02 00 00 sub $0x234,%eax - 13b00: 89 45 fc mov %eax,0xfffffffc(%ebp) - 13b03: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 13b06: 8b 40 04 mov 0x4(%eax),%eax - 13b09: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 13b0c: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 13b0f: 8b 40 08 mov 0x8(%eax),%eax - 13b12: 83 b8 84 00 00 00 00 cmpl $0x0,0x84(%eax) - 13b19: 74 1d je 13b38 <_ohci_irq+0x4c> - 13b1b: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 13b1e: 8b 40 08 mov 0x8(%eax),%eax - 13b21: 05 84 00 00 00 add $0x84,%eax - 13b26: 8b 00 mov (%eax),%eax - 13b28: 83 e0 01 and $0x1,%eax - 13b2b: 85 c0 test %eax,%eax - 13b2d: 75 09 jne 13b38 <_ohci_irq+0x4c> - 13b2f: c7 45 f4 02 00 00 00 movl $0x2,0xfffffff4(%ebp) - 13b36: eb 39 jmp 13b71 <_ohci_irq+0x85> - 13b38: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 13b3b: 83 c0 0c add $0xc,%eax - 13b3e: 8b 00 mov (%eax),%eax - 13b40: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 13b43: 83 f8 ff cmp $0xffffffff,%eax - 13b46: 75 10 jne 13b58 <_ohci_irq+0x6c> - 13b48: ff 75 fc pushl 0xfffffffc(%ebp) - 13b4b: e8 0b d5 ff ff call 1105b <_disable> - 13b50: 83 c4 04 add $0x4,%esp - 13b53: e9 0d 01 00 00 jmp 13c65 <_ohci_irq+0x179> - 13b58: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 13b5b: 83 c0 10 add $0x10,%eax - 13b5e: 8b 10 mov (%eax),%edx - 13b60: 8d 45 f4 lea 0xfffffff4(%ebp),%eax - 13b63: 21 10 and %edx,(%eax) - 13b65: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 13b68: 85 c0 test %eax,%eax - 13b6a: 75 05 jne 13b71 <_ohci_irq+0x85> - 13b6c: e9 f4 00 00 00 jmp 13c65 <_ohci_irq+0x179> - 13b71: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 13b74: c1 e8 04 shr $0x4,%eax - 13b77: 83 e0 01 and $0x1,%eax - 13b7a: 85 c0 test %eax,%eax - 13b7c: 74 29 je 13ba7 <_ohci_irq+0xbb> - 13b7e: ff 75 fc pushl 0xfffffffc(%ebp) - 13b81: e8 d5 d4 ff ff call 1105b <_disable> - 13b86: 83 c4 04 add $0x4,%esp - 13b89: 83 ec 08 sub $0x8,%esp - 13b8c: 6a 01 push $0x1 - 13b8e: ff 75 fc pushl 0xfffffffc(%ebp) - 13b91: e8 d1 00 00 00 call 13c67 <_ohci_dump> - 13b96: 83 c4 10 add $0x10,%esp - 13b99: 83 ec 0c sub $0xc,%esp - 13b9c: ff 75 fc pushl 0xfffffffc(%ebp) - 13b9f: e8 11 fb ff ff call 136b5 <_hc_reset> - 13ba4: 83 c4 10 add $0x10,%esp - 13ba7: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 13baa: d1 e8 shr %eax - 13bac: 83 e0 01 and $0x1,%eax - 13baf: 85 c0 test %eax,%eax - 13bb1: 74 38 je 13beb <_ohci_irq+0xff> - 13bb3: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 13bb6: 83 c0 14 add $0x14,%eax - 13bb9: c7 00 02 00 00 00 movl $0x2,(%eax) - 13bbf: 83 ec 04 sub $0x4,%esp - 13bc2: ff 75 0c pushl 0xc(%ebp) - 13bc5: 83 ec 04 sub $0x4,%esp - 13bc8: ff 75 fc pushl 0xfffffffc(%ebp) - 13bcb: e8 b0 ef ff ff call 12b80 <_dl_reverse_done_list> - 13bd0: 83 c4 08 add $0x8,%esp - 13bd3: 50 push %eax - 13bd4: ff 75 fc pushl 0xfffffffc(%ebp) - 13bd7: e8 a1 f4 ff ff call 1307d <_dl_done_list> - 13bdc: 83 c4 10 add $0x10,%esp - 13bdf: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 13be2: 83 c0 10 add $0x10,%eax - 13be5: c7 00 02 00 00 00 movl $0x2,(%eax) - 13beb: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 13bee: c7 00 01 00 00 00 movl $0x1,(%eax) - 13bf4: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 13bf7: 83 78 10 00 cmpl $0x0,0x10(%eax) - 13bfb: 74 24 je 13c21 <_ohci_irq+0x135> - 13bfd: 83 ec 04 sub $0x4,%esp - 13c00: ff 75 0c pushl 0xc(%ebp) - 13c03: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 13c06: 8b 40 08 mov 0x8(%eax),%eax - 13c09: 66 8b 80 80 00 00 00 mov 0x80(%eax),%ax - 13c10: 25 ff ff 00 00 and $0xffff,%eax - 13c15: 50 push %eax - 13c16: ff 75 fc pushl 0xfffffffc(%ebp) - 13c19: e8 54 f1 ff ff call 12d72 <_finish_unlinks> - 13c1e: 83 c4 10 add $0x10,%esp - 13c21: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 13c24: c1 e8 02 shr $0x2,%eax - 13c27: 83 e0 01 and $0x1,%eax - 13c2a: 85 c0 test %eax,%eax - 13c2c: 74 15 je 13c43 <_ohci_irq+0x157> - 13c2e: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 13c31: 83 78 10 00 cmpl $0x0,0x10(%eax) - 13c35: 75 0c jne 13c43 <_ohci_irq+0x157> - 13c37: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 13c3a: 83 c0 14 add $0x14,%eax - 13c3d: c7 00 04 00 00 00 movl $0x4,(%eax) - 13c43: 8b 55 f8 mov 0xfffffff8(%ebp),%edx - 13c46: 83 c2 0c add $0xc,%edx - 13c49: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 13c4c: 89 02 mov %eax,(%edx) - 13c4e: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 13c51: 83 c0 10 add $0x10,%eax - 13c54: c7 00 00 00 00 80 movl $0x80000000,(%eax) - 13c5a: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 13c5d: 8b 40 04 mov 0x4(%eax),%eax - 13c60: 83 c0 04 add $0x4,%eax - 13c63: 8b 00 mov (%eax),%eax - 13c65: c9 leave - 13c66: c3 ret - -00013c67 <_ohci_dump>: - 13c67: 55 push %ebp - 13c68: 89 e5 mov %esp,%ebp - 13c6a: 5d pop %ebp - 13c6b: c3 ret - -00013c6c <_ohci_stop>: - 13c6c: 55 push %ebp - 13c6d: 89 e5 mov %esp,%ebp - 13c6f: 83 ec 18 sub $0x18,%esp - 13c72: 8b 45 08 mov 0x8(%ebp),%eax - 13c75: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 13c78: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 13c7b: 2d 34 02 00 00 sub $0x234,%eax - 13c80: 89 45 fc mov %eax,0xfffffffc(%ebp) - 13c83: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 13c86: 8b 40 04 mov 0x4(%eax),%eax - 13c89: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 13c8c: 6a 01 push $0x1 - 13c8e: ff 75 fc pushl 0xfffffffc(%ebp) - 13c91: e8 d1 ff ff ff call 13c67 <_ohci_dump> - 13c96: 83 c4 08 add $0x8,%esp - 13c99: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 13c9c: 83 b8 a4 01 00 00 00 cmpl $0x0,0x1a4(%eax) - 13ca3: 75 0e jne 13cb3 <_ohci_stop+0x47> - 13ca5: 83 ec 0c sub $0xc,%esp - 13ca8: ff 75 fc pushl 0xfffffffc(%ebp) - 13cab: e8 05 fa ff ff call 136b5 <_hc_reset> - 13cb0: 83 c4 10 add $0x10,%esp - 13cb3: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 13cb6: 83 c0 14 add $0x14,%eax - 13cb9: c7 00 00 00 00 80 movl $0x80000000,(%eax) - 13cbf: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 13cc2: 83 c0 0c add $0xc,%eax - 13cc5: 8b 00 mov (%eax),%eax - 13cc7: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 13cca: 8b 55 f8 mov 0xfffffff8(%ebp),%edx - 13ccd: 83 c2 0c add $0xc,%edx - 13cd0: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 13cd3: 89 02 mov %eax,(%edx) - 13cd5: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 13cd8: 8b 40 04 mov 0x4(%eax),%eax - 13cdb: 83 c0 04 add $0x4,%eax - 13cde: 8b 00 mov (%eax),%eax - 13ce0: 83 ec 0c sub $0xc,%esp - 13ce3: ff 75 fc pushl 0xfffffffc(%ebp) - 13ce6: e8 3e 00 00 00 call 13d29 <_remove_debug_files> - 13ceb: 83 c4 10 add $0x10,%esp - 13cee: ff 75 fc pushl 0xfffffffc(%ebp) - 13cf1: e8 54 da ff ff call 1174a <_ohci_mem_cleanup> - 13cf6: 83 c4 04 add $0x4,%esp - 13cf9: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 13cfc: 83 78 08 00 cmpl $0x0,0x8(%eax) - 13d00: 74 25 je 13d27 <_ohci_stop+0xbb> - 13d02: 83 ec 0c sub $0xc,%esp - 13d05: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 13d08: ff 70 08 pushl 0x8(%eax) - 13d0b: e8 70 08 00 00 call 14580 <_ExFreePool@4> - 13d10: 83 c4 0c add $0xc,%esp - 13d13: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 13d16: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) - 13d1d: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 13d20: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) - 13d27: c9 leave - 13d28: c3 ret - -00013d29 <_remove_debug_files>: - 13d29: 55 push %ebp - 13d2a: 89 e5 mov %esp,%ebp - 13d2c: 5d pop %ebp - 13d2d: c3 ret - -00013d2e <_ohci_pci_start>: - 13d2e: 55 push %ebp - 13d2f: 89 e5 mov %esp,%ebp - 13d31: 53 push %ebx - 13d32: 83 ec 14 sub $0x14,%esp - 13d35: 8b 45 08 mov 0x8(%ebp),%eax - 13d38: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 13d3b: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 13d3e: 2d 34 02 00 00 sub $0x234,%eax - 13d43: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 13d46: 8b 45 08 mov 0x8(%ebp),%eax - 13d49: 83 b8 84 00 00 00 00 cmpl $0x0,0x84(%eax) - 13d50: 0f 84 ff 00 00 00 je 13e55 <_ohci_pci_start+0x127> - 13d56: 8b 5d f8 mov 0xfffffff8(%ebp),%ebx - 13d59: 83 ec 04 sub $0x4,%esp - 13d5c: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 13d5f: 83 c0 0c add $0xc,%eax - 13d62: 50 push %eax - 13d63: 68 00 01 00 00 push $0x100 - 13d68: 8b 45 08 mov 0x8(%ebp),%eax - 13d6b: ff b0 84 00 00 00 pushl 0x84(%eax) - 13d71: e8 8e 01 00 00 call 13f04 <_my_pci_alloc_consistent> - 13d76: 83 c4 10 add $0x10,%esp - 13d79: 89 43 08 mov %eax,0x8(%ebx) - 13d7c: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 13d7f: 83 78 08 00 cmpl $0x0,0x8(%eax) - 13d83: 75 0c jne 13d91 <_ohci_pci_start+0x63> - 13d85: c7 45 e8 f4 ff ff ff movl $0xfffffff4,0xffffffe8(%ebp) - 13d8c: e9 6b 01 00 00 jmp 13efc <_ohci_pci_start+0x1ce> - 13d91: 8b 45 08 mov 0x8(%ebp),%eax - 13d94: 8b 80 84 00 00 00 mov 0x84(%eax),%eax - 13d9a: 81 38 22 10 00 00 cmpl $0x1022,(%eax) - 13da0: 75 24 jne 13dc6 <_ohci_pci_start+0x98> - 13da2: 8b 45 08 mov 0x8(%ebp),%eax - 13da5: 8b 80 84 00 00 00 mov 0x84(%eax),%eax - 13dab: 81 78 04 0c 74 00 00 cmpl $0x740c,0x4(%eax) - 13db2: 75 12 jne 13dc6 <_ohci_pci_start+0x98> - 13db4: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 13db7: c7 80 30 02 00 00 01 movl $0x1,0x230(%eax) - 13dbe: 00 00 00 - 13dc1: e9 8f 00 00 00 jmp 13e55 <_ohci_pci_start+0x127> - 13dc6: 8b 45 08 mov 0x8(%ebp),%eax - 13dc9: 8b 80 84 00 00 00 mov 0x84(%eax),%eax - 13dcf: 81 38 45 10 00 00 cmpl $0x1045,(%eax) - 13dd5: 75 14 jne 13deb <_ohci_pci_start+0xbd> - 13dd7: 8b 45 08 mov 0x8(%ebp),%eax - 13dda: 8b 80 84 00 00 00 mov 0x84(%eax),%eax - 13de0: 81 78 04 61 c8 00 00 cmpl $0xc861,0x4(%eax) - 13de7: 75 02 jne 13deb <_ohci_pci_start+0xbd> - 13de9: eb 6a jmp 13e55 <_ohci_pci_start+0x127> - 13deb: 8b 45 08 mov 0x8(%ebp),%eax - 13dee: 8b 80 84 00 00 00 mov 0x84(%eax),%eax - 13df4: 81 38 0b 10 00 00 cmpl $0x100b,(%eax) - 13dfa: 75 59 jne 13e55 <_ohci_pci_start+0x127> - 13dfc: 8b 45 08 mov 0x8(%ebp),%eax - 13dff: 8b 80 84 00 00 00 mov 0x84(%eax),%eax - 13e05: 89 45 ec mov %eax,0xffffffec(%ebp) - 13e08: 83 ec 08 sub $0x8,%esp - 13e0b: 6a 00 push $0x0 - 13e0d: 8b 45 ec mov 0xffffffec(%ebp),%eax - 13e10: 8b 40 08 mov 0x8(%eax),%eax - 13e13: 8a 00 mov (%eax),%al - 13e15: 25 ff 00 00 00 and $0xff,%eax - 13e1a: 50 push %eax - 13e1b: e8 bc 06 00 00 call 144dc <_my_pci_find_slot> - 13e20: 83 c4 10 add $0x10,%esp - 13e23: 89 45 f0 mov %eax,0xfffffff0(%ebp) - 13e26: 83 7d f0 00 cmpl $0x0,0xfffffff0(%ebp) - 13e2a: 74 29 je 13e55 <_ohci_pci_start+0x127> - 13e2c: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 13e2f: 83 78 04 0e cmpl $0xe,0x4(%eax) - 13e33: 75 20 jne 13e55 <_ohci_pci_start+0x127> - 13e35: 8b 45 f0 mov 0xfffffff0(%ebp),%eax - 13e38: 81 38 0b 10 00 00 cmpl $0x100b,(%eax) - 13e3e: 75 15 jne 13e55 <_ohci_pci_start+0x127> - 13e40: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 13e43: 8b 55 f8 mov 0xfffffff8(%ebp),%edx - 13e46: 8b 92 30 02 00 00 mov 0x230(%edx),%edx - 13e4c: 83 ca 02 or $0x2,%edx - 13e4f: 89 90 30 02 00 00 mov %edx,0x230(%eax) - 13e55: 83 ec 04 sub $0x4,%esp - 13e58: 68 00 01 00 00 push $0x100 - 13e5d: 6a 00 push $0x0 - 13e5f: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 13e62: ff 70 08 pushl 0x8(%eax) - 13e65: e8 36 07 00 00 call 145a0 <_memset> - 13e6a: 83 c4 10 add $0x10,%esp - 13e6d: ff 75 f8 pushl 0xfffffff8(%ebp) - 13e70: e8 7f d8 ff ff call 116f4 <_ohci_mem_init> - 13e75: 83 c4 04 add $0x4,%esp - 13e78: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 13e7b: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp) - 13e7f: 79 16 jns 13e97 <_ohci_pci_start+0x169> - 13e81: 83 ec 0c sub $0xc,%esp - 13e84: ff 75 08 pushl 0x8(%ebp) - 13e87: e8 e0 fd ff ff call 13c6c <_ohci_stop> - 13e8c: 83 c4 10 add $0x10,%esp - 13e8f: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 13e92: 89 45 e8 mov %eax,0xffffffe8(%ebp) - 13e95: eb 65 jmp 13efc <_ohci_pci_start+0x1ce> - 13e97: 8b 55 f8 mov 0xfffffff8(%ebp),%edx - 13e9a: 8b 45 08 mov 0x8(%ebp),%eax - 13e9d: 8b 40 7c mov 0x7c(%eax),%eax - 13ea0: 89 42 04 mov %eax,0x4(%edx) - 13ea3: 83 ec 0c sub $0xc,%esp - 13ea6: ff 75 f8 pushl 0xfffffff8(%ebp) - 13ea9: e8 07 f8 ff ff call 136b5 <_hc_reset> - 13eae: 83 c4 10 add $0x10,%esp - 13eb1: 85 c0 test %eax,%eax - 13eb3: 79 17 jns 13ecc <_ohci_pci_start+0x19e> - 13eb5: 83 ec 0c sub $0xc,%esp - 13eb8: ff 75 08 pushl 0x8(%ebp) - 13ebb: e8 ac fd ff ff call 13c6c <_ohci_stop> - 13ec0: 83 c4 10 add $0x10,%esp - 13ec3: c7 45 e8 ed ff ff ff movl $0xffffffed,0xffffffe8(%ebp) - 13eca: eb 30 jmp 13efc <_ohci_pci_start+0x1ce> - 13ecc: 83 ec 0c sub $0xc,%esp - 13ecf: ff 75 f8 pushl 0xfffffff8(%ebp) - 13ed2: e8 10 f9 ff ff call 137e7 <_hc_start> - 13ed7: 83 c4 10 add $0x10,%esp - 13eda: 85 c0 test %eax,%eax - 13edc: 79 17 jns 13ef5 <_ohci_pci_start+0x1c7> - 13ede: 83 ec 0c sub $0xc,%esp - 13ee1: ff 75 08 pushl 0x8(%ebp) - 13ee4: e8 83 fd ff ff call 13c6c <_ohci_stop> - 13ee9: 83 c4 10 add $0x10,%esp - 13eec: c7 45 e8 f0 ff ff ff movl $0xfffffff0,0xffffffe8(%ebp) - 13ef3: eb 07 jmp 13efc <_ohci_pci_start+0x1ce> - 13ef5: c7 45 e8 00 00 00 00 movl $0x0,0xffffffe8(%ebp) - 13efc: 8b 45 e8 mov 0xffffffe8(%ebp),%eax - 13eff: 8b 5d fc mov 0xfffffffc(%ebp),%ebx - 13f02: c9 leave - 13f03: c3 ret - -00013f04 <_my_pci_alloc_consistent>: - 13f04: 55 push %ebp - 13f05: 89 e5 mov %esp,%ebp - 13f07: 83 ec 08 sub $0x8,%esp - 13f0a: 83 ec 08 sub $0x8,%esp - 13f0d: 8b 45 0c mov 0xc(%ebp),%eax - 13f10: 05 00 01 00 00 add $0x100,%eax - 13f15: 50 push %eax - 13f16: 6a 01 push $0x1 - 13f18: e8 53 06 00 00 call 14570 <_ExAllocatePool@8> - 13f1d: 83 c4 08 add $0x8,%esp - 13f20: 89 45 fc mov %eax,0xfffffffc(%ebp) - 13f23: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 13f26: 05 ff 00 00 00 add $0xff,%eax - 13f2b: b0 00 mov $0x0,%al - 13f2d: 89 45 fc mov %eax,0xfffffffc(%ebp) - 13f30: 8b 55 10 mov 0x10(%ebp),%edx - 13f33: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 13f36: 25 ff ff ff 0f and $0xfffffff,%eax - 13f3b: 89 02 mov %eax,(%edx) - 13f3d: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 13f40: c9 leave - 13f41: c3 ret - -00013f42 <_ohci_hcd_pci_init>: - 13f42: 55 push %ebp - 13f43: 89 e5 mov %esp,%ebp - 13f45: 83 ec 08 sub $0x8,%esp - 13f48: 83 ec 04 sub $0x4,%esp - 13f4b: 68 85 01 00 00 push $0x185 - 13f50: 68 38 61 01 00 push $0x16138 - 13f55: 68 43 61 01 00 push $0x16143 - 13f5a: e8 31 06 00 00 call 14590 <_DbgPrint> - 13f5f: 83 c4 10 add $0x10,%esp - 13f62: 83 ec 08 sub $0x8,%esp - 13f65: 68 00 60 01 00 push $0x16000 - 13f6a: 68 4c 61 01 00 push $0x1614c - 13f6f: e8 1c 06 00 00 call 14590 <_DbgPrint> - 13f74: 83 c4 10 add $0x10,%esp - 13f77: e8 c4 06 00 00 call 14640 <_usb_disabled@0> - 13f7c: 85 c0 test %eax,%eax - 13f7e: 74 09 je 13f89 <_ohci_hcd_pci_init+0x47> - 13f80: c7 45 fc ed ff ff ff movl $0xffffffed,0xfffffffc(%ebp) - 13f87: eb 43 jmp 13fcc <_ohci_hcd_pci_init+0x8a> - 13f89: 83 ec 04 sub $0x4,%esp - 13f8c: 68 8a 01 00 00 push $0x18a - 13f91: 68 38 61 01 00 push $0x16138 - 13f96: 68 43 61 01 00 push $0x16143 - 13f9b: e8 f0 05 00 00 call 14590 <_DbgPrint> - 13fa0: 83 c4 10 add $0x10,%esp - 13fa3: 6a 40 push $0x40 - 13fa5: 6a 40 push $0x40 - 13fa7: 68 00 60 01 00 push $0x16000 - 13fac: 68 98 61 01 00 push $0x16198 - 13fb1: e8 da 05 00 00 call 14590 <_DbgPrint> - 13fb6: 83 c4 10 add $0x10,%esp - 13fb9: 83 ec 0c sub $0xc,%esp - 13fbc: 68 20 50 01 00 push $0x15020 - 13fc1: e8 a5 04 00 00 call 1446b <_my_pci_module_init> - 13fc6: 83 c4 10 add $0x10,%esp - 13fc9: 89 45 fc mov %eax,0xfffffffc(%ebp) - 13fcc: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 13fcf: c9 leave - 13fd0: c3 ret - -00013fd1 <_module_init_ohci_hcd_pci_init>: - 13fd1: 55 push %ebp - 13fd2: 89 e5 mov %esp,%ebp - 13fd4: 83 ec 08 sub $0x8,%esp - 13fd7: e8 66 ff ff ff call 13f42 <_ohci_hcd_pci_init> - 13fdc: c9 leave - 13fdd: c3 ret - -00013fde <_ohci_hcd_pci_cleanup>: - 13fde: 55 push %ebp - 13fdf: 89 e5 mov %esp,%ebp - 13fe1: 5d pop %ebp - 13fe2: c3 ret - -00013fe3 <_module_exit_ohci_hcd_pci_cleanup>: - 13fe3: 55 push %ebp - 13fe4: 89 e5 mov %esp,%ebp - 13fe6: e8 f3 ff ff ff call 13fde <_ohci_hcd_pci_cleanup> - 13feb: 5d pop %ebp - 13fec: c3 ret - 13fed: 90 nop - 13fee: 90 nop - 13fef: 90 nop - -00013ff0 <_DriverEntry@8>: - 13ff0: 55 push %ebp - 13ff1: 89 e5 mov %esp,%ebp - 13ff3: b8 00 00 00 00 mov $0x0,%eax - 13ff8: 5d pop %ebp - 13ff9: c2 08 00 ret $0x8 - 13ffc: 90 nop - 13ffd: 90 nop - 13ffe: 90 nop - 13fff: 90 nop - -00014000 <_wait_ms>: - 14000: 55 push %ebp - 14001: 89 e5 mov %esp,%ebp - 14003: 83 ec 08 sub $0x8,%esp - 14006: 8b 55 08 mov 0x8(%ebp),%edx - 14009: 89 d0 mov %edx,%eax - 1400b: c1 e0 02 shl $0x2,%eax - 1400e: 01 d0 add %edx,%eax - 14010: 01 c0 add %eax,%eax - 14012: f7 d8 neg %eax - 14014: 99 cltd - 14015: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 14018: 89 55 fc mov %edx,0xfffffffc(%ebp) - 1401b: 83 ec 04 sub $0x4,%esp - 1401e: 8d 45 f8 lea 0xfffffff8(%ebp),%eax - 14021: 50 push %eax - 14022: 6a 00 push $0x0 - 14024: 6a 00 push $0x0 - 14026: e8 85 05 00 00 call 145b0 <_KeDelayExecutionThread@12> - 1402b: 83 c4 04 add $0x4,%esp - 1402e: c9 leave - 1402f: c3 ret - -00014030 <_init_wrapper>: - 14030: 55 push %ebp - 14031: 89 e5 mov %esp,%ebp - 14033: 83 ec 04 sub $0x4,%esp - 14036: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) - 1403d: 83 7d fc 13 cmpl $0x13,0xfffffffc(%ebp) - 14041: 7f 15 jg 14058 <_init_wrapper+0x28> - 14043: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 14046: c7 04 85 c0 70 01 00 movl $0x0,0x170c0(,%eax,4) - 1404d: 00 00 00 00 - 14051: 8d 45 fc lea 0xfffffffc(%ebp),%eax - 14054: ff 00 incl (%eax) - 14056: eb e5 jmp 1403d <_init_wrapper+0xd> - 14058: c7 05 a0 71 01 00 00 movl $0x0,0x171a0 - 1405f: 00 00 00 - 14062: c7 05 a0 70 01 00 00 movl $0x0,0x170a0 - 14069: 00 00 00 - 1406c: c7 05 90 71 01 00 00 movl $0x17000,0x17190 - 14073: 70 01 00 - 14076: c7 05 08 70 01 00 00 movl $0x0,0x17008 - 1407d: 00 00 00 - 14080: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) - 14087: 83 7d fc 07 cmpl $0x7,0xfffffffc(%ebp) - 1408b: 7f 33 jg 140c0 <_init_wrapper+0x90> - 1408d: 8b 55 fc mov 0xfffffffc(%ebp),%edx - 14090: 89 d0 mov %edx,%eax - 14092: 01 c0 add %eax,%eax - 14094: 01 d0 add %edx,%eax - 14096: c1 e0 02 shl $0x2,%eax - 14099: c7 80 30 71 01 00 00 movl $0x0,0x17130(%eax) - 140a0: 00 00 00 - 140a3: 8b 55 fc mov 0xfffffffc(%ebp),%edx - 140a6: 89 d0 mov %edx,%eax - 140a8: 01 c0 add %eax,%eax - 140aa: 01 d0 add %edx,%eax - 140ac: c1 e0 02 shl $0x2,%eax - 140af: c7 80 34 71 01 00 ff movl $0xffffffff,0x17134(%eax) - 140b6: ff ff ff - 140b9: 8d 45 fc lea 0xfffffffc(%ebp),%eax - 140bc: ff 00 incl (%eax) - 140be: eb c7 jmp 14087 <_init_wrapper+0x57> - 140c0: c7 05 38 70 01 00 00 movl $0x0,0x17038 - 140c7: 00 00 00 - 140ca: c7 05 20 71 01 00 00 movl $0x0,0x17120 - 140d1: 00 00 00 - 140d4: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) - 140db: 83 7d fc 07 cmpl $0x7,0xfffffffc(%ebp) - 140df: 7f 15 jg 140f6 <_init_wrapper+0xc6> - 140e1: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 140e4: c7 04 85 18 70 01 00 movl $0x0,0x17018(,%eax,4) - 140eb: 00 00 00 00 - 140ef: 8d 45 fc lea 0xfffffffc(%ebp),%eax - 140f2: ff 00 incl (%eax) - 140f4: eb e5 jmp 140db <_init_wrapper+0xab> - 140f6: c9 leave - 140f7: c3 ret - -000140f8 <_handle_irqs>: - 140f8: 55 push %ebp - 140f9: 89 e5 mov %esp,%ebp - 140fb: 83 ec 08 sub $0x8,%esp - 140fe: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) - 14105: 83 7d fc 07 cmpl $0x7,0xfffffffc(%ebp) - 14109: 0f 8f 86 00 00 00 jg 14195 <_handle_irqs+0x9d> - 1410f: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 14112: 89 c2 mov %eax,%edx - 14114: 01 d2 add %edx,%edx - 14116: 01 c2 add %eax,%edx - 14118: 8d 04 95 00 00 00 00 lea 0x0(,%edx,4),%eax - 1411f: 83 b8 30 71 01 00 00 cmpl $0x0,0x17130(%eax) - 14126: 74 63 je 1418b <_handle_irqs+0x93> - 14128: 8b 55 fc mov 0xfffffffc(%ebp),%edx - 1412b: 89 d0 mov %edx,%eax - 1412d: 01 c0 add %eax,%eax - 1412f: 01 d0 add %edx,%eax - 14131: c1 e0 02 shl $0x2,%eax - 14134: 8b 80 34 71 01 00 mov 0x17134(%eax),%eax - 1413a: 3b 45 08 cmp 0x8(%ebp),%eax - 1413d: 74 08 je 14147 <_handle_irqs+0x4f> - 1413f: 83 7d 08 ff cmpl $0xffffffff,0x8(%ebp) - 14143: 74 02 je 14147 <_handle_irqs+0x4f> - 14145: eb 44 jmp 1418b <_handle_irqs+0x93> - 14147: 83 ec 04 sub $0x4,%esp - 1414a: 8b 55 fc mov 0xfffffffc(%ebp),%edx - 1414d: 89 d0 mov %edx,%eax - 1414f: 01 c0 add %eax,%eax - 14151: 01 d0 add %edx,%eax - 14153: 8d 0c 85 00 00 00 00 lea 0x0(,%eax,4),%ecx - 1415a: 6a 00 push $0x0 - 1415c: 8b 55 fc mov 0xfffffffc(%ebp),%edx - 1415f: 89 d0 mov %edx,%eax - 14161: 01 c0 add %eax,%eax - 14163: 01 d0 add %edx,%eax - 14165: c1 e0 02 shl $0x2,%eax - 14168: ff b0 38 71 01 00 pushl 0x17138(%eax) - 1416e: 8b 55 fc mov 0xfffffffc(%ebp),%edx - 14171: 89 d0 mov %edx,%eax - 14173: 01 c0 add %eax,%eax - 14175: 01 d0 add %edx,%eax - 14177: c1 e0 02 shl $0x2,%eax - 1417a: ff b0 34 71 01 00 pushl 0x17134(%eax) - 14180: 8b 81 30 71 01 00 mov 0x17130(%ecx),%eax - 14186: ff d0 call *%eax - 14188: 83 c4 10 add $0x10,%esp - 1418b: 8d 45 fc lea 0xfffffffc(%ebp),%eax - 1418e: ff 00 incl (%eax) - 14190: e9 70 ff ff ff jmp 14105 <_handle_irqs+0xd> - 14195: c9 leave - 14196: c3 ret - -00014197 <_inc_jiffies>: - 14197: 55 push %ebp - 14198: 89 e5 mov %esp,%ebp - 1419a: 8b 45 08 mov 0x8(%ebp),%eax - 1419d: 01 05 a0 71 01 00 add %eax,0x171a0 - 141a3: 5d pop %ebp - 141a4: c3 ret - -000141a5 <_do_all_timers>: - 141a5: 55 push %ebp - 141a6: 89 e5 mov %esp,%ebp - 141a8: 83 ec 18 sub $0x18,%esp - 141ab: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) - 141b2: 83 7d fc 13 cmpl $0x13,0xfffffffc(%ebp) - 141b6: 0f 8f 82 00 00 00 jg 1423e <_do_all_timers+0x99> - 141bc: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 141bf: 83 3c 85 c0 70 01 00 cmpl $0x0,0x170c0(,%eax,4) - 141c6: 00 - 141c7: 74 6b je 14234 <_do_all_timers+0x8f> - 141c9: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 141cc: 8b 04 85 c0 70 01 00 mov 0x170c0(,%eax,4),%eax - 141d3: 83 38 00 cmpl $0x0,(%eax) - 141d6: 74 5c je 14234 <_do_all_timers+0x8f> - 141d8: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 141db: 8b 04 85 c0 70 01 00 mov 0x170c0(,%eax,4),%eax - 141e2: 83 78 08 00 cmpl $0x0,0x8(%eax) - 141e6: 74 4c je 14234 <_do_all_timers+0x8f> - 141e8: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 141eb: 8b 04 85 c0 70 01 00 mov 0x170c0(,%eax,4),%eax - 141f2: 8b 00 mov (%eax),%eax - 141f4: 89 45 f8 mov %eax,0xfffffff8(%ebp) - 141f7: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 141fa: 8b 04 85 c0 70 01 00 mov 0x170c0(,%eax,4),%eax - 14201: 8b 40 04 mov 0x4(%eax),%eax - 14204: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 14207: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 1420a: 8b 04 85 c0 70 01 00 mov 0x170c0(,%eax,4),%eax - 14211: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) - 14218: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 1421b: c7 04 85 c0 70 01 00 movl $0x0,0x170c0(,%eax,4) - 14222: 00 00 00 00 - 14226: 83 ec 0c sub $0xc,%esp - 14229: ff 75 f4 pushl 0xfffffff4(%ebp) - 1422c: 8b 45 f8 mov 0xfffffff8(%ebp),%eax - 1422f: ff d0 call *%eax - 14231: 83 c4 10 add $0x10,%esp - 14234: 8d 45 fc lea 0xfffffffc(%ebp),%eax - 14237: ff 00 incl (%eax) - 14239: e9 74 ff ff ff jmp 141b2 <_do_all_timers+0xd> - 1423e: c9 leave - 1423f: c3 ret - -00014240 <_my_kernel_thread>: - 14240: 55 push %ebp - 14241: 89 e5 mov %esp,%ebp - 14243: 8b 45 08 mov 0x8(%ebp),%eax - 14246: a3 b0 70 01 00 mov %eax,0x170b0 - 1424b: 8b 45 0c mov 0xc(%ebp),%eax - 1424e: a3 10 71 01 00 mov %eax,0x17110 - 14253: b8 2a 00 00 00 mov $0x2a,%eax - 14258: 5d pop %ebp - 14259: c3 ret - -0001425a <_my_device_add>: - 1425a: 55 push %ebp - 1425b: 89 e5 mov %esp,%ebp - 1425d: 83 ec 18 sub $0x18,%esp - 14260: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) - 14267: 8b 45 08 mov 0x8(%ebp),%eax - 1426a: 83 b8 98 00 00 00 00 cmpl $0x0,0x98(%eax) - 14271: 74 32 je 142a5 <_my_device_add+0x4b> - 14273: 8b 45 08 mov 0x8(%ebp),%eax - 14276: 8b 80 98 00 00 00 mov 0x98(%eax),%eax - 1427c: 83 78 08 00 cmpl $0x0,0x8(%eax) - 14280: 0f 84 8d 00 00 00 je 14313 <_my_device_add+0xb9> - 14286: 83 ec 0c sub $0xc,%esp - 14289: 8b 45 08 mov 0x8(%ebp),%eax - 1428c: 8b 80 98 00 00 00 mov 0x98(%eax),%eax - 14292: ff 75 08 pushl 0x8(%ebp) - 14295: 8b 40 08 mov 0x8(%eax),%eax - 14298: ff d0 call *%eax - 1429a: 83 c4 10 add $0x10,%esp - 1429d: 89 45 f4 mov %eax,0xfffffff4(%ebp) - 142a0: e9 82 00 00 00 jmp 14327 <_my_device_add+0xcd> - 142a5: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) - 142ac: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 142af: 3b 05 38 70 01 00 cmp 0x17038,%eax - 142b5: 7d 4d jge 14304 <_my_device_add+0xaa> - 142b7: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 142ba: 8b 04 85 18 70 01 00 mov 0x17018(,%eax,4),%eax - 142c1: 83 78 08 00 cmpl $0x0,0x8(%eax) - 142c5: 74 36 je 142fd <_my_device_add+0xa3> - 142c7: 8b 55 08 mov 0x8(%ebp),%edx - 142ca: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 142cd: 8b 04 85 18 70 01 00 mov 0x17018(,%eax,4),%eax - 142d4: 89 82 98 00 00 00 mov %eax,0x98(%edx) - 142da: 83 ec 0c sub $0xc,%esp - 142dd: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 142e0: 8b 04 85 18 70 01 00 mov 0x17018(,%eax,4),%eax - 142e7: ff 75 08 pushl 0x8(%ebp) - 142ea: 8b 40 08 mov 0x8(%eax),%eax - 142ed: ff d0 call *%eax - 142ef: 83 c4 10 add $0x10,%esp - 142f2: 85 c0 test %eax,%eax - 142f4: 75 07 jne 142fd <_my_device_add+0xa3> - 142f6: c7 45 f8 01 00 00 00 movl $0x1,0xfffffff8(%ebp) - 142fd: 8d 45 fc lea 0xfffffffc(%ebp),%eax - 14300: ff 00 incl (%eax) - 14302: eb a8 jmp 142ac <_my_device_add+0x52> - 14304: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp) - 14308: 74 09 je 14313 <_my_device_add+0xb9> - 1430a: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) - 14311: eb 14 jmp 14327 <_my_device_add+0xcd> - 14313: 8b 45 08 mov 0x8(%ebp),%eax - 14316: c7 80 98 00 00 00 00 movl $0x0,0x98(%eax) - 1431d: 00 00 00 - 14320: c7 45 f4 ed ff ff ff movl $0xffffffed,0xfffffff4(%ebp) - 14327: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 1432a: c9 leave - 1432b: c3 ret - -0001432c <_my_driver_register>: - 1432c: 55 push %ebp - 1432d: 89 e5 mov %esp,%ebp - 1432f: 83 ec 04 sub $0x4,%esp - 14332: 83 3d 38 70 01 00 07 cmpl $0x7,0x17038 - 14339: 7f 20 jg 1435b <_my_driver_register+0x2f> - 1433b: a1 38 70 01 00 mov 0x17038,%eax - 14340: 89 c2 mov %eax,%edx - 14342: 8b 45 08 mov 0x8(%ebp),%eax - 14345: 89 04 95 18 70 01 00 mov %eax,0x17018(,%edx,4) - 1434c: ff 05 38 70 01 00 incl 0x17038 - 14352: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) - 14359: eb 07 jmp 14362 <_my_driver_register+0x36> - 1435b: c7 45 fc ff ff ff ff movl $0xffffffff,0xfffffffc(%ebp) - 14362: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 14365: c9 leave - 14366: c3 ret - -00014367 <_my_device_unregister>: - 14367: 55 push %ebp - 14368: 89 e5 mov %esp,%ebp - 1436a: 83 ec 08 sub $0x8,%esp - 1436d: 8b 45 08 mov 0x8(%ebp),%eax - 14370: 83 b8 98 00 00 00 00 cmpl $0x0,0x98(%eax) - 14377: 74 26 je 1439f <_my_device_unregister+0x38> - 14379: 8b 45 08 mov 0x8(%ebp),%eax - 1437c: 8b 80 98 00 00 00 mov 0x98(%eax),%eax - 14382: 83 78 0c 00 cmpl $0x0,0xc(%eax) - 14386: 74 17 je 1439f <_my_device_unregister+0x38> - 14388: 83 ec 0c sub $0xc,%esp - 1438b: 8b 45 08 mov 0x8(%ebp),%eax - 1438e: 8b 80 98 00 00 00 mov 0x98(%eax),%eax - 14394: ff 75 08 pushl 0x8(%ebp) - 14397: 8b 40 0c mov 0xc(%eax),%eax - 1439a: ff d0 call *%eax - 1439c: 83 c4 10 add $0x10,%esp - 1439f: b8 00 00 00 00 mov $0x0,%eax - 143a4: c9 leave - 143a5: c3 ret - -000143a6 <_my_get_device>: - 143a6: 55 push %ebp - 143a7: 89 e5 mov %esp,%ebp - 143a9: b8 00 00 00 00 mov $0x0,%eax - 143ae: 5d pop %ebp - 143af: c3 ret - -000143b0 <_my_device_initialize>: - 143b0: 55 push %ebp - 143b1: 89 e5 mov %esp,%ebp - 143b3: 5d pop %ebp - 143b4: c3 ret - -000143b5 <_my_wake_up>: - 143b5: 55 push %ebp - 143b6: 89 e5 mov %esp,%ebp - 143b8: c7 05 20 71 01 00 01 movl $0x1,0x17120 - 143bf: 00 00 00 - 143c2: 5d pop %ebp - 143c3: c3 ret - -000143c4 <_my_schedule_timeout>: - 143c4: 55 push %ebp - 143c5: 89 e5 mov %esp,%ebp - 143c7: 83 ec 08 sub $0x8,%esp - 143ca: c7 45 fc 01 00 00 00 movl $0x1,0xfffffffc(%ebp) - 143d1: 83 45 08 0a addl $0xa,0x8(%ebp) - 143d5: 83 7d 08 00 cmpl $0x0,0x8(%ebp) - 143d9: 7e 3e jle 14419 <_my_schedule_timeout+0x55> - 143db: e8 c5 fd ff ff call 141a5 <_do_all_timers> - 143e0: 83 ec 0c sub $0xc,%esp - 143e3: 6a ff push $0xffffffff - 143e5: e8 0e fd ff ff call 140f8 <_handle_irqs> - 143ea: 83 c4 10 add $0x10,%esp - 143ed: 83 3d 20 71 01 00 00 cmpl $0x0,0x17120 - 143f4: 74 02 je 143f8 <_my_schedule_timeout+0x34> - 143f6: eb 21 jmp 14419 <_my_schedule_timeout+0x55> - 143f8: 83 ec 0c sub $0xc,%esp - 143fb: ff 75 fc pushl 0xfffffffc(%ebp) - 143fe: e8 fd fb ff ff call 14000 <_wait_ms> - 14403: 83 c4 10 add $0x10,%esp - 14406: ff 75 fc pushl 0xfffffffc(%ebp) - 14409: e8 89 fd ff ff call 14197 <_inc_jiffies> - 1440e: 83 c4 04 add $0x4,%esp - 14411: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 14414: 29 45 08 sub %eax,0x8(%ebp) - 14417: eb bc jmp 143d5 <_my_schedule_timeout+0x11> - 14419: c7 05 20 71 01 00 00 movl $0x0,0x17120 - 14420: 00 00 00 - 14423: 8b 45 08 mov 0x8(%ebp),%eax - 14426: c9 leave - 14427: c3 ret - -00014428 <_my_wait_for_completion>: - 14428: 55 push %ebp - 14429: 89 e5 mov %esp,%ebp - 1442b: 83 ec 08 sub $0x8,%esp - 1442e: c7 45 fc 64 00 00 00 movl $0x64,0xfffffffc(%ebp) - 14435: 8b 45 08 mov 0x8(%ebp),%eax - 14438: 83 38 00 cmpl $0x0,(%eax) - 1443b: 75 2c jne 14469 <_my_wait_for_completion+0x41> - 1443d: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp) - 14441: 7e 26 jle 14469 <_my_wait_for_completion+0x41> - 14443: e8 5d fd ff ff call 141a5 <_do_all_timers> - 14448: 83 ec 0c sub $0xc,%esp - 1444b: 6a ff push $0xffffffff - 1444d: e8 a6 fc ff ff call 140f8 <_handle_irqs> - 14452: 83 c4 10 add $0x10,%esp - 14455: 83 ec 0c sub $0xc,%esp - 14458: 6a 0a push $0xa - 1445a: e8 a1 fb ff ff call 14000 <_wait_ms> - 1445f: 83 c4 10 add $0x10,%esp - 14462: 8d 45 fc lea 0xfffffffc(%ebp),%eax - 14465: ff 08 decl (%eax) - 14467: eb cc jmp 14435 <_my_wait_for_completion+0xd> - 14469: c9 leave - 1446a: c3 ret - -0001446b <_my_pci_module_init>: - 1446b: 55 push %ebp - 1446c: 89 e5 mov %esp,%ebp - 1446e: 83 ec 18 sub $0x18,%esp - 14471: a1 08 70 01 00 mov 0x17008,%eax - 14476: 89 45 fc mov %eax,0xfffffffc(%ebp) - 14479: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp) - 14480: 83 3d 08 70 01 00 00 cmpl $0x0,0x17008 - 14487: 75 33 jne 144bc <_my_pci_module_init+0x51> - 14489: 83 ec 04 sub $0x4,%esp - 1448c: 68 ef 00 00 00 push $0xef - 14491: 68 c0 61 01 00 push $0x161c0 - 14496: 68 d6 61 01 00 push $0x161d6 - 1449b: e8 f0 00 00 00 call 14590 <_DbgPrint> - 144a0: 83 c4 10 add $0x10,%esp - 144a3: 83 ec 0c sub $0xc,%esp - 144a6: 68 df 61 01 00 push $0x161df - 144ab: e8 e0 00 00 00 call 14590 <_DbgPrint> - 144b0: 83 c4 10 add $0x10,%esp - 144b3: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) - 144ba: eb 1b jmp 144d7 <_my_pci_module_init+0x6c> - 144bc: 83 ec 08 sub $0x8,%esp - 144bf: 8b 45 08 mov 0x8(%ebp),%eax - 144c2: ff 75 f8 pushl 0xfffffff8(%ebp) - 144c5: ff 75 fc pushl 0xfffffffc(%ebp) - 144c8: 8b 40 10 mov 0x10(%eax),%eax - 144cb: ff d0 call *%eax - 144cd: 83 c4 10 add $0x10,%esp - 144d0: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp) - 144d7: 8b 45 f4 mov 0xfffffff4(%ebp),%eax - 144da: c9 leave - 144db: c3 ret - -000144dc <_my_pci_find_slot>: - 144dc: 55 push %ebp - 144dd: 89 e5 mov %esp,%ebp - 144df: b8 00 00 00 00 mov $0x0,%eax - 144e4: 5d pop %ebp - 144e5: c3 ret - -000144e6 <_my_request_irq>: - 144e6: 55 push %ebp - 144e7: 89 e5 mov %esp,%ebp - 144e9: 83 ec 04 sub $0x4,%esp - 144ec: 83 3d a0 70 01 00 07 cmpl $0x7,0x170a0 - 144f3: 7f 63 jg 14558 <_my_request_irq+0x72> - 144f5: 8b 15 a0 70 01 00 mov 0x170a0,%edx - 144fb: 89 d0 mov %edx,%eax - 144fd: 01 c0 add %eax,%eax - 144ff: 01 d0 add %edx,%eax - 14501: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx - 14508: 8b 45 0c mov 0xc(%ebp),%eax - 1450b: 89 82 30 71 01 00 mov %eax,0x17130(%edx) - 14511: 8b 15 a0 70 01 00 mov 0x170a0,%edx - 14517: 89 d0 mov %edx,%eax - 14519: 01 c0 add %eax,%eax - 1451b: 01 d0 add %edx,%eax - 1451d: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx - 14524: 8b 45 08 mov 0x8(%ebp),%eax - 14527: 89 82 34 71 01 00 mov %eax,0x17134(%edx) - 1452d: 8b 15 a0 70 01 00 mov 0x170a0,%edx - 14533: 89 d0 mov %edx,%eax - 14535: 01 c0 add %eax,%eax - 14537: 01 d0 add %edx,%eax - 14539: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx - 14540: 8b 45 18 mov 0x18(%ebp),%eax - 14543: 89 82 38 71 01 00 mov %eax,0x17138(%edx) - 14549: ff 05 a0 70 01 00 incl 0x170a0 - 1454f: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp) - 14556: eb 07 jmp 1455f <_my_request_irq+0x79> - 14558: c7 45 fc 01 00 00 00 movl $0x1,0xfffffffc(%ebp) - 1455f: 8b 45 fc mov 0xfffffffc(%ebp),%eax - 14562: c9 leave - 14563: c3 ret - -00014564 <_my_free_irq>: - 14564: 55 push %ebp - 14565: 89 e5 mov %esp,%ebp - 14567: b8 00 00 00 00 mov $0x0,%eax - 1456c: 5d pop %ebp - 1456d: c3 ret - 1456e: 90 nop - 1456f: 90 nop - -00014570 <_ExAllocatePool@8>: - 14570: ff 25 8c 80 01 00 jmp *0x1808c - 14576: 90 nop - 14577: 90 nop - ... - -00014580 <_ExFreePool@4>: - 14580: ff 25 90 80 01 00 jmp *0x18090 - 14586: 90 nop - 14587: 90 nop - ... - -00014590 <_DbgPrint>: - 14590: ff 25 88 80 01 00 jmp *0x18088 - 14596: 90 nop - 14597: 90 nop - ... - -000145a0 <_memset>: - 145a0: ff 25 98 80 01 00 jmp *0x18098 - 145a6: 90 nop - 145a7: 90 nop - ... - -000145b0 <_KeDelayExecutionThread@12>: - 145b0: ff 25 94 80 01 00 jmp *0x18094 - 145b6: 90 nop - 145b7: 90 nop - ... - -000145c0 <_usb_hcd_giveback_urb@12>: - 145c0: ff 25 b4 80 01 00 jmp *0x180b4 - 145c6: 90 nop - 145c7: 90 nop - ... - -000145d0 <_usb_calc_bus_time@16>: - 145d0: ff 25 a8 80 01 00 jmp *0x180a8 - 145d6: 90 nop - 145d7: 90 nop - ... - -000145e0 <_usb_alloc_dev@8>: - 145e0: ff 25 a4 80 01 00 jmp *0x180a4 - 145e6: 90 nop - 145e7: 90 nop - ... - -000145f0 <_usb_connect@4>: - 145f0: ff 25 ac 80 01 00 jmp *0x180ac - 145f6: 90 nop - 145f7: 90 nop - ... - -00014600 <_usb_put_dev@4>: - 14600: ff 25 c0 80 01 00 jmp *0x180c0 - 14606: 90 nop - 14607: 90 nop - ... - -00014610 <_usb_register_root_hub@8>: - 14610: ff 25 c4 80 01 00 jmp *0x180c4 - 14616: 90 nop - 14617: 90 nop - ... - -00014620 <_usb_hcd_pci_probe@8>: - 14620: ff 25 b8 80 01 00 jmp *0x180b8 - 14626: 90 nop - 14627: 90 nop - ... - -00014630 <_usb_hcd_pci_remove@4>: - 14630: ff 25 bc 80 01 00 jmp *0x180bc - 14636: 90 nop - 14637: 90 nop - ... - -00014640 <_usb_disabled@0>: - 14640: ff 25 b0 80 01 00 jmp *0x180b0 - 14646: 90 nop - 14647: 90 nop - ... - -00014650 <__CTOR_LIST__>: - 14650: ff (bad) - 14651: ff (bad) - 14652: ff (bad) - 14653: ff 00 incl (%eax) - 14655: 00 00 add %al,(%eax) - ... - -00014658 <__DTOR_LIST__>: - 14658: ff (bad) - 14659: ff (bad) - 1465a: ff (bad) - 1465b: ff 00 incl (%eax) - 1465d: 00 00 add %al,(%eax) - ... - -00014660 : - ... diff --git a/reactos/drivers/usb/cromwell/host/ohci.nostrip.sys b/reactos/drivers/usb/cromwell/host/ohci.nostrip.sys deleted file mode 100644 index 4bb663b01921f02837016d67ff7230c95ee436da..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 50449 zcmeHw4|JQwmG8)w6NLz@f&q7%5(ScyKrl*To0I@i9E*n6r16rNr7fxA*mA7I|B$8N zbaCuNP8*?m2`oK@_qyA(rCqj<*OzVSHtmCAr`ekBrrkiZ-JFsKYU{S2kh`eG2lS{~ zz2Chv-#bjLI^iLrIHZG@JmmSzc2hX zg5paSe)AIX)V%L4I_BE=y+vEQq67Z^Sl`ZATaUlJt+%%??%xsd#}d8%Xs^F{^A>+k zUq__w;)^d@tVp+ngxKhsE7n|DSSOAMvBxDuM$EZ-zN=z2GjSM*J|XgJ<*#U=ia-L4 zKEyY2{EHtUj^YFOM;>%BTnN9!B_RIMqkd#&M2MvoNFElVn-o$091&sxHSkA%>f({X zIB0Hf#1}CXRKNJqpY15F>u8I&0f4k%*$KCWGUgK$V!SRU5sSp@c6!p z7$DG5!t1Bh>}Q1NMI}Af4FF893_r;24#e6~%(^?Q@J8@!d4h}=>Fxs}>+%Q+i9f=( zJVD@DvQE;`fTICN1C9n94LBNbG~j5!(SV}?M+1%q{)ifAP5mr6?Ma6`>7Y9~z9B7A zp<;5VSW5Vk)810TqtW^_dBT@lPB;I63W3x1w?HM5dy$3GHt++rO9^|3;})N}h1%R+cq>H8q|o zW=d%MigS_3y`;0SB{{tqwNs&)bZF*=dhnkL6(&Q|#KvSuBgR=~|_!MDhs#Fwi7T}q<95S0RaRYNYcLsh>cT)8>O zeg_CcGjsQOkq#m=7Sc*!A`cX3C%+~%Gt^N^5$Xrx$s519XfY$@wgo0#tuBB)!lrM?gBgvs@5r^Kj zROoDO?qujJ>Vko@sZb`3f7^`CW20zE3)Ne-$|fd%%bJ3zRR4Xb2z`=lLDw?kg{%Tw zNfTP_p{6Q^&k+nS9BQh7HdCQIco%!!$xwbSgq|o=20K%s*MZZS4!ypFHlbYO$?>^| zDmo`auM=Oz3C$yoZths<_0FWn#W1gg&66-+u7;uWZI~WKwlmdKshD2__RvjWUb1_r zX>M|;Fn8a(k*)qZH+HCr>M`>dmA=z7uapC)kkC`ot(q0HQ7Hx{R*&*@t1rE&CcSL| z#Cfwb)mrFGZF;>kwGD=cewW5*3W}{brRmnQY4<0$Z+D4OMvc=P zj9(+#xq2i#XeM_(L);>FH6_qY?wt&AiJXrU9zh0N2)sPIg3=!`qQg}#U9-^i=%Aqe{01&c zx5D!lQ{=5=f~G5718mP;s58aLq)zfsz=s=_{F0v7&%p&vXmeIIEly_E($ENbsvbw{ zQiI9WB7P;Rq{W($m-t62IbMsx+>eo=Vg`cJowX@nPR@s3Z4tMt>l+ymvr46^xY^OuNszXVCh}@(VsVXmCPl|A}RbZk*NHQ};oDF&X`(VFbKbp7d!8_E2 z7)1s=vZjR<;z}$PB6PL|0Yi{sc!=}y@?5ZlkB4NjeD2NkZ67VSfudbk0^%$H-UI$ zDMm7^OShoOU@g^Qm{+Bk$^$LSQmquwR>Z6EU0FSP1jSjJzraFruvR24Ln7Vc=F#O% z2YsoE+`AY=LkIdW(p1*OQ75e#YEw)5j1C$^Nw8mIW z@qx@zd*p{DCh3;O4_eFqOkyMlYb>lSMWK~73;}~RO50hh(OCnD^Rec)v$p)LS*yuy zLQ6(Rx5$j_Be-vm_DLR$urBs7dm#`7$hoW7vWkbAuEXdgJP!vM9&_mN2>r9!?;dzVc5&auxCE}k+8CC zICV1av=})V1T!J8X~CpXw%{TxnBwFtonit7-c%&oIN=ouEPbGL-TX4InteRW-e#L5 zS*SbB#;T77=#R!ax)5x&z}%rS*gXvlJqt4g(=;BS^u+bjj?=*fa^TPas~){njyB+^ zahj#cfSIP^*SLQ{k?B&^1=*J+?1JLG{MO=G%(_fG8c~0Ucr_#*f;{LKN&t_rFAV+~ z5x; z{SI-CifvY7u9?v0Ci5@akly+BJ^xfGDaW?&Xkj&KR;D z7cUH`58%S5)6Itwh~y8BS08*BddFN&v6e@>?G3VEDx!63qAGiex()uGCW3sb`629- zDAd5~3U!Ls>WO!A^pGba+a(dT*3XU+37Sx*NQIn02$rIV20&UzQBW7kON{`8#WTXu zJX9sB4{m0=fd-%zEJ$c*Kd+^ZPy7VSYE2J-|Iff$F#C%C&1dE7^lS4HechrEOR6z~a=F3TwAuL@$_wq8{22-Kaxy#Cc zs{t$}P80d+N5(l~XrbCh24+y|uho8eH4I_m*bg@C@V$|pcymtbxrxHUWye#e(yeFE zZk_4`_?bN0ma;c-F}U-v`#~4Dl*!&Bmu`%MvF_>L7YeEYWmok>0 zh6U}D3Nzw})XbHubPiUybS4f;CB3~-8ZKDj^Yt;hk#X=Bj zLzBgH3)=A_6M!92br5wYhkOD%Xq2s~4EZ*|zapF@c4S~f1qB{5GUzTs6s!rW)I{>f7} zejR-eBj|h%Q{0=d|Ln&Q3L*oTW8Cjd8DV?a){7F=NjWmyh=e2a`Bs5=E zon+K?{(f28A`*I5WFNwpvT)X3GwEqJCxh_&oY;^$Uj08?vE6;f<-^y0KW%;*s$~B< zHIZ?ChR->B@5)KEW$0^gi|V1Ez6(?3c>8Zn1=&JSrE! z^-$oPR|bv6G9c_us>x{KPOx3A`MBGwM`?2o<>-1JHhf=E;$e^OmCgyxD>w5p)#PtN zd3bGs$O1d1&v1w9qnkZ7Z9Id}1Hnsq9@AwcR;F@SVXuB3xmO-zM4c%wDPf6?a;z1l zCMuf(sdZ8-c1mL{9TaBBNUFT3i@c!wpnp5&l!`2EVscj)8xaUCpa2SgDRhAF3lL2} zB!o8=@jnG??!^1420W9+W2L^6{JDz&gLd%o`-gdy6nj;|$Q2Hhg@CvK8?K%p-=;a24?6yF{|Df1vKRs-YYq2PfzV%M(UtHBYTt1!8Z8aE%io3Norj0ig~k@}R);vnc+f(2{X(<5?-Ux^(?9?`t- zbsf>C@RtJziV!ePW+;o@n{f|wmc5tPeEJ?71wiSbpIJtthLMrLJU7GBHl~ycn*3<{ zuAr~#qwIgb*;2UNlK zKL5(?faz2S_61Quz`dqvG5T8O?)0Qu-04kR63WlVf_j}NdmpGE5^*Qcku@p^z$T_Q z>Ced7oiaOINb}DoXbxmgk%nCyPn|6#&XDOQ*kNNVpYALLu~B$B-Fh0% zbq==g+zC48ftWOj(2u^)$rVRl;Z+xnHMPBpUN%I_k|}V^@-BAhBxsA)11hj;#K~3J zv)I{%0_0jtTBNc1pZOH9J z)Hs!@kP$LKI70B~Yc$jO6-g-UNFzp+<_Bkijb11p3BMX0X1olCGA%>#Qi6Td&AiD3 zar4r2;8`dnlcs}JID&O-iZkjKZI-dHLEJ-Da>5Pw2TVjW9<7%H1y2q;8*nfa+PkEV zFkz7M;qd|Ifw^%)dxtE-DabT=mPE_$U|y@>s2IK?&-)PA$UjNPRM~3~2|#i)@*YnPjYE@f zfDBR<@R18aW&hxE4wtFk7pYzjF%24}_>7r=hozWZ?47$m^c*eH(yh-;yon9`j0>`W zOKfriN>L18CD6`@#6_IUKB5!B`csC*)uSUi41`a>4;w2}-kPUb;TS_{gCZ4rDh;Gf zPo=jVd+d$-(}StjW67aoB5@nNcY?Mrh`n0JM%)O-XgdN`n&Fsudd^_a6hTZ2j>7g` zO2ZyqfCy$3Vs0A3(>ye9O*9+<#seH%E{`gE=uq38>#iTyw3R}?lqJr??5 zdfU^Tu3A+W(fk`P0NA+*HFe{>jsWwZPwXm(e#n7rswtSeftg<>u(L=}8MPhI+fw8h zcg$UpS{LLXY8oq2)*+T@Guq?WV1T|!N_Aw%s&&b3z_K6}I*Fx=^#BEYLNV|#1vL_j z#!h@uS2vv{@s!8GRD2@>5gg?~*-#K1H}6}*JIs^kx{0zGs6dQ*koVDQIMyD~v%FeC$IAH!_EeylNTOm>&3KmxPSF64O#O~$8CeH@ zV1}YbVuo8lHMPqwVSKQ)1fix5R*jics;x;<<4Wye1gB7jPE!Rdc!S_7?kd?5W=Ppt z*Wh)45@LlSzit5g#tR7zvOn&SgmV8xq{?Ssojh1JmJxDm6Vp!(O3U8IV`pMvz;7&E zSn{Q2mRgcJr}HAEnfgiba@`| zt&TrE8C;A~xImBg>c6lIe*haawdF2X+Ce8$E5?D1roTa?f=GQKesn~&_n8;Dy;A>T zZ5i{UpB<42+Z{hI(4bxT401KeW4yqQzguS2`ddbL*ovGX4dmVn(@`5EGf71EnD&d> zd?{o0VxEst?n@&gnV}hQhF2Qot&!Hl^!PHW^)IKHQ}pXD95fU)ihv<13trUT!5eBs zK{vwH+%%k?>-E68yv1=*P+X@^`5_2tGv?>Kg=_nbN_7}*ZXHx4SVu1n$ z_I^C*c1y%GZ}IG3eKlrA#6;wUsOJ7bw>J(5PI?NH?3aKpvJX;w2F_|ahe?p5H!8I~ z2S`P3mkC=vpO8Li0C+uxGfZCEcpkvvD`>W8PfJInRvcIYV*Vd=Uy|@6v0u`FMPSRM zkban74FAW9)L~BGg*_6QC>BVwjdNLMdUb91467gdqaCWfS8xY;w2XY`lB@`?DBwjz z(rG$)KgY^&Lj`TFT;yRNh)DyHCQ{nX)*v95Gu#M9 zAIB)(D&m`#3R_rsxC-pM6{|=gN3m0)UZKM%DOHoX8}HGfySomeYS-#Em*`rLFKvZX zALw?8?Er2h-~tKMPT&_llU_Dt=GPN}2kZp$IA4OL;HAHyr0^(F_>qJ{*e-ty@?XFh zBzs~;Rcz$ZI>Di7wAyRPZu|D(!-w(KJ%^s#j(Y^MlqbPkJ*iVzCb>?z#@{&e7<^%> zwFr(7X135FhIWt})epkl>b*yVCzlPAQ<%iUxgX5qp}0llel}TkN}Mif7UN|W=e9v!0;M-+H(18GDHn1#6^FqS1jmE>S@4R`kt-oYY% zsaJWa)yQ#$4oV$h>g?AQmW3#0VmN>T8K<;{CwP5DQ#(L{U#y&DPACf~jZgR`Wi#&N ztz>a?hy9cRhbBEj0ms3Kznz0%ltuWry0UCT=2XoAN8B0f|2*dFXlOyBGh?*OpwRRn>E!6jbuxx~85 zBre#rJwCCW&#uO4zvBWA>#e^%TGuX?E*ZFaNyjq3Xl{Dn&3E9zGGuie}q>Alv!p>H7WU*FdokM(tTM`He^n>Vb#W0}7>7TrU+7Gy4>W(`_9 zaBco>|3LJk5fF}a_?LXB!yo4##;dElabWMjjos1S#Nd6gw*LM|%*s;e&O2}RgQ&kF zvM1Ue@zWn<7>L9daor1u=M*^_a5Ug(z|nxC0Y?Ll1{@7I8gMk=Xu#3He=-dOM@)gV z{X!f<{vHc#0p7oU+>#e%&q!DkwuB0jaCp+Ad}uE%EsK6m5Oh0h2+kKpqpK2PJL zKYt85yF~Mjoh`9wFa0kW5gJ_AjkR-IJkrwF*G=sl0_^r!#Kih(%rT+6e$yAmKe0_3t!Z@h0{cdWO& zE;7ipYEb@GA5d@ai$&_N!2p8J<7mLqfTICN1C9n94LBNbG~j5!(SV}?M+5)SHSq8i zg>_N}7u{_mYUS!tSm7?f1LuIxb7OsvvbzssJxMpusHdi~9;v&;77@mGNZg6k9b&Wi z0P=U>`*x)1dB*+f?`VZxDd>NV3;fDwt@?EfH(zw3viuXTpr0)wE@C1odc{sqi;8X$ z0p(uNDf&>_!Z-m@53b*fPrcYd{DY5oqP6wF=@I>+4fuP(O&fB&EJk?*xpvUrj23XF zkNh5dx>2K_v3gPF7h4&xhZuo;SAwR_1JxJ+1>&tAxKY&XWxQ5UY(m}5(AawLs#A{w zJHk1tL#@Raex*(y`#NuR(BEEs=#l-^g1UX81G_rZGZ*Tw&5(ff*T$MB+wem>M2++z`>P%o zW4nZ%X1R6)WtwefZteozn8CSeZ9*)DoeEe5wcLx=x)ld{-_LU&B?RYjG~j5!(SV}? zM+1%q91S=ca5Ug(z|p|}I}KpLkBel*XK1vA|&9zXkp-a6E7_@Qc8r6^$!)t+;>1ffb)w zaeT!;uXt(2zpeP~ii=lXweo!{H?RD=mCvj^weqJc>sQ^fYQw4ztor7vS698OK30FA z{^9yh)&EWXztz7{e{sWQ4a*vCYzQ^HzaiFepyA<$&oz9d;dsLf4L@o4bwfqtrHxlN zu54^-#1al?;CKQ{1Iq(}Ks_z+w+pOj@dM7f0^NcBKpfoN9~cRY1`Y*25jY%pB=Bh9 z(}5#_#{*9Uo(vofj0aAD?=yk3flOd3parG_`M^w|5U5=NGS1^@z|nxC0Y?Ll1{@7I z8gMk=Xu#2cqX9<)jt2fyXrQh$+D#|l_!}wWcet^6r>nDVw>%0ru8I&DHt8bSDp)J$AIx_IUSFl6DJnIi}#Wc{)_~07R;igOVNsQ zDTRKo0sb?*<t`=d6<&B(oE zgJ8Qt&>zq-Yi$Q)sST0N&4M@@k`7$6c*dWgUGGl|B z1mwR!r6wKXcfSpy0dm@agyS9IPW%swHw_4i#c%NG@aS~H5sC9p283{`&}TokLFgif z_suhE?P%+6>ury`VnC>tA2?Fc7qk?TY%KrAm0bXeWMlU7l4eTCuyu#3jPl^(T)MIXYl~P z0S*+#?;S~>;Kfgqjm|XTkY8AO)Q=RT3uv`4slI zSw9SU9*{5CAQ?b{E3G)c2INCFhzk?y@>N!x%K_PGgIo{D7j2N60Xb@ev;cC#28jT& z6lW49heLquwm}{ODcOlcRDRh6Yult@qjykkk3;XPyafR_lfbXaPQiA)F{tUVPITP$q9-KpH-QoDEXn zTn=eGV?tD1H}bYxKRc`S!zN|PVZH9p3=SKoO&rzw;kVWL=~=BGGAXOpgXNIMlO{y9 ze&lVnPJfo%rssx7P0Ffu>Mt8kW35?BwSM$%wVpBQ$hI0DDQ~NOV>zU;XhM`<{a=8b zZxzth+lK$=%7=eSiq3dfqIb7E3siC`DaLgvz*qS*%bw4Lqvkln!q0^xC51myT6NVR zMdQkR)VOFE1&BE$hgJ3{ocdcXgroFBfBg4+`q4-3zoYE+TQ9`3vV>2+HO@^M%Lj7KV9BdeY_mf_{gl*gKw*KT3gyRf3&=<`mSOhoe!%YK2G=!k*iE@#K^hj(8HN9pI<3+PAp*#C~Q z*N@*zNufDZMYgmeI+`&9|q3y2=KNXQr<^dGC}FXBna z7XjIBqw@_wP5?rv66Xvhh2K)^*MLyVCY?*51{p2;Rjpb;XvCQu(qCZLXAnvGCP2n* zI2!<=$EpE-$jy~^5 z${z)Uv}*RwVL<$bT#?=mYMLJaRbTuSaJH+Qr1K>}^if$MBFaZ?x7pz_YRjM;ZflQ+ z+Y>P&ZT8Ly;5-h9$`9JWDT1w{A!vi12M>@e8cS_Fv6548~h6Y>#29s$JE{4gLRfS7br zfatTQZ0j*Vj@YF50w7P>=$rt=Y>SkEVtxoJ>6`@)JtjZDR1lLNANI@bILl{2nh9dF zge`!O{g_g80HVh&vh`s=%&|jld=?OW?NA~90Xe?5h*yf?_V#eRFC2-*`eK4FC&JxC z;Wjhb-xrGy#M|PD0THI-8oIkEECFHOC^0I{!s>_&w8x_TaVzB=7Ao!Xf@R4Kn7}nn zdMR#I;+vc-c{XMS7AG=c z9ibc7K84#lI>Pa`XtxN5K~(~n)q%v09_)kCB~!AXBVrjFcve_ z)z%%yomJtEo;K>iIFh;)%o}vcO+|Y8<9mVDZLQBeNo+=X?@dG!x?%~^5wSvG;Qf8L zt4lvmQ!2+%4b(?l4KO7zNOy2iiscvKc3jXE2g8vaiJjo8I|63trYzenSc+6McCSix zBzn++%-TS_4@r5cmYob2(~VoIDb>sJ-Y;0x09~_%yTv3OLIhhKd~vr0W&`MVcuAA$ z>7%Y@`%(t4uK2Q8oL7;4>pvUZHj5F>@n1Jr2v8=3oX`W>dx9**|(hr^Z&*Mjvl z#_nwWz}7o9g~BacLaoi4!*_-@ZeAbWc*mBln7I(SU>8=J4`;*8TQ}cnmUiK8Igl`) zj@{wj-8~pgJLsdXTO$`q%}Tq2f~Zr`WvYKnzF?Ac*&OlJ9_#D5FM^(mMPLQpeYnFe z9Hu+t!+o8^4{n=-s>mOJO9PqkcC?WvGKuOvWZWi4t(TFaK^fZ2G;*Kt z98ji0bAVw)o_mPF&G8fiW$NQfTC%-6;T;fr$JpyD#}cOt9gTBio1E-tdA!)iJxi%p z8s_M0isDZ}?Cpn}Glm!2sdaRj0Ce;gFE^L!%=90$NO zqNS}`Et|XrZkg=tZreG)ma4lmyNdOTCdrM3_PYCr$jQGS9f<9zHYllZ?o!c1=f diff --git a/reactos/drivers/usb/cromwell/host/ohci.sym b/reactos/drivers/usb/cromwell/host/ohci.sym deleted file mode 100644 index 4c3182f92e265542828ef2e9de5e779aaac9c06b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2592 zcmZwIU5s8s7zglS+bfy~4Mng*qm3o4RH^vbtzD#=ko0aV8Rwjt_dT;a=giqTb9QZM zkP?YVNqXUm2qAITqL(5mi3>!CxFJO(MAHii7mN7#KXX2I25)lmp7Wb$p80y-^G>q% zGl{Q#^ZVHXuA>_nTjTqg-Ox4C*9DCI`S&E7U|gs=NwqvU2sNLF>rfJY2Rh9}Pk=XK;NN$#0N*FCBWNiB8H)o*9ICZ9Ipur!VVc zNH#;>x;&JtAl!d~w{rfvx3J&29uQ%JrejQI+3 zIFg?r-S_UQa=EB+o;(-x0>V2Dvekw;>zu3S&No?2Y6b$Y+uK1vwqb<_X5W?*xtb z?1ub22wzE*<3-J;+p*f1ImGOUh3V+ z1Y{h^hmbcS`4VzGlCzMLk*q;Jh-4Gqi`!}MBiRG_I+FV#KSXj6BId$8Ipl>w zcp-}#zuZ^W#Tw)CCglm^{cUBet6k!nnsJk7ic@OOca*Nk+lUs)w)Rwl(rw&Hwd{N){L#OB;x>}B!+w$&cD5$QJd<5t8{}Hn&A!+AO%&XJ4 zvNrvSO)3-%mYtM>##-0th{ zZ4cL;fBtz(l<4N55StwH#o9~r>%}1tbDNDJ;e@itS&yaGau*G45{fpp!D5Ao5j2Mxcy98G$kaWdzCylo9w7BG8ijRbtwm3c6DPS7Ll)N+g4Y z#9*Nq_a>%2#kgCe{b}NuH@kv(hW*$oC(@1swpA6Ka4f1d~G05YRNtq3J@U;#S0wZWOe_F_C&jOVqNSQ)52H5#1S=M!Qvs!oa6O-f{9 zFgI`L($qFjs>PGqoLhf{+WATPJm}4Qt0KE|fiOhUU(P%JN6xoLpgVQ1g+_hxz zbawt^@HFZ|fz!!gI)#7RjKO20Xif<=S~bchCf{PDU@BFAA1nY*>RZ6EoOB_pz){kK zR&%hilIimV)AI)#oj@}g%t3dt*Odt7=A+XS`HDbCGWa@pI#R*cm(n4WV>~fF|DdyD zGWa^_RhZD+(&*-o24C+;xE)OMNZJBP^Jc4=y3oeyR$@DnjTK7ywNMYk1m&f=2OH-n z2J`dpdmpk@-{!^+Hc~xS{=DK38W$9^&=fs%7j>&XyMc~gNUso^IveqfpmPSIEZi8qr+_x*yv zNVc5ZH+Zt*Dj}*yUImxR46UMskEr8{ipS4X><0 znV}28Lnm*Nn)wUKC%!_I%fXikfs~-3r1k<<`VTBgSrxSyxtE)c!6O^V}PN!U-+rHf)ifJ`ZvoL;* zWM}J;aHE;*2bkg#*()i5X0n$t#UZj@PPhdbIBIzzF=r?t9nNU;R+tndHMh8i%Pg{AVgSWpOdewYUL) zXHA6=yBwNU3v~%1T8TvLN-Pty2%}NZUg1(KIfY8)%}H_|T_g~Bg31+*W_Yl`a}E=( zS$m8tdK8C?m!mJB7CMKT?!*zwi1>oZU||MoW|uR^A*68m;%&UX!xzgg zuCa8n!sue+s1MyrjQgN?OWw>iB6yJ9Mz1X0M%d!fo?bx+>5XH;Vs#0)c#3U==44m{ zH<)I#Hdq+?0Q>NKs%gw4mwyp^4}&;Ep~#P9bTAssV+H*YdvK5T5nC%{!;n$zgClWk z3E4LgCIjTFU?rYOWlEmJz@pLkd0e(gm8AkT6WZm8bcIqc=7y4vSWWgCm;{@8v-U&j ziHaL1W89y$OiRm3;BgRm_u11-%ur{H77ijB4|^+KdEo4B|0FALlu62Xw?H8xvliUh{ksF^*cYF)?EK}$B) zu&{+JWIA%Hq?!V^B@0&au{$Eh)0%TCd0aP z3z`hnP#vauREnkC-@H88LIJHaR)z11s*yt|&d~Y=6%qqAB7PAPsb&|?E>9}pO**sh zWfDyt;9;bxtdXNm+B4K78-c47v7QrN5nsatgx$glEXaxHy~+KQAPKa`SVHlE%u;*g zhb1RrOY;Y?A%n2N`a2>hTQyi`nyl!sW$P5Bx17 zlC#VMjp1Sn&4Vd2Yxv?T@JsVyn!Gh&nPyu@DH3qnTJ~QRBQ{Q;0yVa3jgvJPgt$93 zn4>wpjVzwJs#|VqK4z=A1G&d^;}v+QlQNs@)SQf#dH zYyf^V*D-`ps~P4F$YA$0G4w3V5K7a00O;`#NIOmi7RiZ26Rc|FLOI*OqvmOb76VqA zieKaLg+!K1RTpJmmb9~W@8x&yp2e(7x<@nW-E^;-x`!YS_yPpz2>Zh1uNJZEx%<_s zYgrbIZpRigN@kz37byF$lJ<|{;eln&_);X`(BxJTcrPtJSA2s!0vkgB`@gpl=cw3b z4c3|oZGIx>K-h_y##y;^=Bd5mM}REWaHdx!(p8Re%m+kK&X|Wo%6X&6x*fbRpfP|8 zpH4N6ArQ$O7_U0;5OBv@PO+9-yZH^WU@D@0YrHaZf`$$Lo)&^!vgtvblqgpJ>xy-X z_UiHXarBTQA={-8wb###k_cK*rU*h#AOuTNL<1u2qbR5g<|HB@Ve^b|GzX|e)qyQ+ zH$VWWU_(Mv`vom|bmAA-9#1Xsau21y0S|RQ)wF+LB8@Jj(c*$&8fzipYL>21r7cqn zTELTLp_o=RjySg0Q~TV)2Sk8h)yO{*HWZdGg!>r&u{+svI=cX3hmS-4Y3$mPE$Dq- ztuYk2#urKv!`MWepBSv>xT6{ZB?Q&jo39`wgV?%2?!_g#4J3mnvlo>R*ML}zpCs{B z507)i&`hr4Wmy2#}|#ObRrfRP(6e597EVZ6JLJ`%HMVCD4p$s7ZJ5LiJhKXD*9I5GFJvwsO$$1oi#xLz zIS)n-&s3yZFclWT3a~8YDYF?~YzAH~P@QbLpVlhMLdiUvBj*Gqg9W1_ATB!Ccwwpq z33xvrC(zqv7*P>NBuNi+pd}PzJ)x-*TPb;#id?bCwv93zuT=@ai;W;)Lz9J6GurVW ze1$mw_GUzU#E7&14gC#M(qFLJnUFc|q z_)uo%L{g0(XQx+;iN2pPVh2 zD`}c5E_n<@(u#4-l+~}xLQPo@`(=6Nu@X2LQ*mu@>OP;L&@Mqs2rIM7CICnc4=k^! zIxqkXbO+#;4j|JGnzV!8LlRtTGb;?0b|DAbyHUw}iT#m}2IRgiT*LJmBX&WmCA|-h z+Kt1*6IqN^8ve`+w*j|zBH5BI5o_ydQWq+bKaPs85%Ng5UrPm#1NoBb)JGlj56jw? zE@5Ov=0SWZ3upA22&dhg48ZSmVq@}X)&FY2arY^Q7hn5)bogmN$^La}BJFaVNQ`eU z`Yrj<=DRSNE1b=#;3@Rek>fagf_GFHeH!cgP2>91Zuqd zP}rSRk_`agLhcmiYIwmxaJj_d1k-rJ%;I#!J3!Icb z%LA^@ZuZo4@C-rs2QK7wOz$J9GL^j?XY~unz49C*=`49^5nF7OW3MQYsA%*j*Gp9F zl17``Da??ORB2Hsc|q3!-*&7i&I}!5@=zED5eO{+0ENF4I-v855KW*<2ydLRKZk0r z_=l+mJd?#^C4Z3kwSx!)cJk50FPLn)FXeO=HhtcoYA|MxDj+U(E`=%=@B`^F2xBW&uBjPx`yOa_{)I< zMF^NDGnB>Y&A6L2%iPU-KK%@i0-#jD$0{RH&CEz(otxoh8%v6l7C$<^%j-Kmnb9MC z6kt8a9kJMb)R2a{m`KyQ5F}7oh&i(%q5>X`+&etD6YgCj=TSuXfGRlN=U;goFr5s- zzR(p2aII}zg0Ysl+uX@!S86kt1ak|qpFZ%SkN1i2=7G1{F@j0w6Jyl=3M&vBG*f zC1FLIxNE$a)}PHl4q{Ib!VZq7P8Z{+$aLfEurZfUb`%3RC_I^JISJ=F565?|INj$# zH)#=}AN`z@D-OTHyDpk*>Ub5SY;-L{rob`Fd)c8=N1L^7NP$%&POi+H#>p-Kkb5m@ zk;d+mvlg3F@ux-7RfeSZTZTstl??c?CyYfjWf~X~c-q{NOBb&;Rh(=rq<#@R>Rz=ureZcdsGJPU*MGhmUnscr>h)}o7;#@GO)35CfZ z9e88#5$A10V8)4RD6cs=Du%Df@i_zz@{iMPs?1f01kiIc@*YnNjswXzAOlp zB4npU{5(!(9@d3m|0%=bs*z!x2EoVRhmD;nAI;OMaD=IJK#>eSodVP5r&HUGJo?7H zsexq6k;LE;5x<$9J3-rLj)SJg0GHiXf&Lx57SqAx(P>0V0@b z5jQY=nI=i(pZ-H-d@{3h)2i(T3SmrQkzKGBf=w=^84fd6Od9w@ATlB_sXGoB@aQ#6RfQ*ZMsBkRBq%uv)w%5V#) zrcT)!Eo?!oT`z+ib9T9`xdz} zevs%4AX~_u2aLNOvOi=(B(f9^OltUWwhbyWt$}hF3)lugrRDy$pR%pO3~+xI`v)B5 zlR$pr@dbIp7OSQrw>&~3p0{YRku=zX-u^~uKB|MwgrLK~V3P@`x)-C`@8|a6Fti9A zvazA4^RSUNr*A{xgV{9=Hm8T!Fk5n%m&pxF(EKFNc1(CI&bU>vj{3Dn%2n3P zmb+w~f!-W|X&hBNN(f>O9Z zxAyA4a39`<8nm=!FIMPa5UCa8hK;5_L8O96eItH&She@1pK*J|z9rgatdD;0h)me- z_<4f{bm23|)g+Ga20QjXnN|C58R6k5a)uDdeh{Xk4n}4Yi0-lM7qo@4kD2p%Jw~}V zg@|N^R=^qFX^^)@S`X7>%c<7CoMcTguDfufp`cL&jIMIW3)*}5K#e5mM!1HXhSQTn zf!Nl=5pF>{%n_oynWQ|1QDh?`H6$K3w6owRicnkjQ{Bv956cp^{!U4NzE0_s zE(R;r#@fRL~qQ%sHSb@20ZH*2DcXLGqG{2!gk zF;3utJ?b<`%oDN=^SRIT=-SXJh9CIR3Dw?9c!1nmT0V10R)j|s@E{^#nhM;@u`=9H zUYjpBc{m5TRMmM>)`3%CU*TtRUi1DRHe3s1!eFF@luolXbP&oJZUnQBV-!y%=}lXO zHtsxJ1~2YztZY_Ala4|cmxI#e{HjJqDa8>5p4&hg(E?UsZU~BHsH3XqP;xB~_aL6ZB7JF8d8^gH zafMDw?q})j*ANP-`%oMcTX3o6Y|_$6gCuEb4bar1|K zkI^sPMs+7$pCeU@tejGoybSL7QB}i9SWuwDLfPNMfCtal&O*S$2pl0DxMfZ;s{A#{ z)=r&JNaIN|e)mHn=spitDek*j`v-D+*n1SU3#0=~+{9A^273jMXhC~Rh8MIhCYc9Y zn8Na)JNt}mfSQM%Zo*=%O{NJmP-8oJU^rz(MP9TeU0co8tQ+{0L^?|~9F743xbQSBpmjP3S z`gobBL4M*U@ki@M&=L z!B={WjTM(39CpC-qKvQN($AFS$4c^#l;j^S$v<9_f3hV1L`nYXlKiof{4*u_BPIF6 zCHZlC9u`j>Bg>aPEPs~~C?iltpo~BnfiePR1j-2fe}w=7>p$w+4nFYuZgB`NKIN;7 zKpBBD0%Zis2$T^hBTz=5j6fNIG6H1;$_SJZ_|JntZ)aQN+Riq*t9QohN!-h!H}TPL z8lQ($o@n&c-ly@wy*~bY7rztud{%wBE^&yjRy)ME@u76-=Z9yY>wGVw{2Ta;o1bLP}6pK z#df}THBRRpXSo=+zP3nhn^?BA|AwXQ%YCA$@k2NGknyeZ`&avJ3GeW&s`Itn-soFd zyV7^{mcDS$)xM3r{W0H$-kw;rx2r20^)1`7al@_4eNEBG9?CT%a~?Ho$l8I|=I{3P zM?M*b;BdQd>BriAG5%q`+S=>-_x4}c73ql&+!Jl>>kCJ%Dg|%5?FJu&`r5;LB5h$G z{XvHQaO?`MdzS8%i^>R;5hx>2Mxcy98G$kaWdzCylo2Q+P)6Xt7y^M|vqRcGAr2yc zmxZ9BvACweAfLgxlh=NN>;9 z&S<)Khr%d%6BHq6v)JoDq*hdSzLI(M^)~>eDj(C447U>R)`I6S#(-Ur^ zN((sO9_er0(G`Zo3pkI1me5Y@^mnwj?GDAGJMfkdgO0<55dL)HjxhdzA;~9RqD8~q zy?er>2i|1^dS5)oS_pynt|1={?~L@v!qHH)w>K8*j6>)!m`grAvEKgO(Vni_@BquI zM)^B^Aib?O8m`3w0|b_@G6H1;$_SJZC?iltpo~BnfiePR1j-1M5%|xJz(beh*ULWO z*?uHye=?>8SbI=#Ku)jyyonzQf(wk@0Rb5es)E(k>5yE#++=kSxVvG0)^0(sq z7NqHV*7fS!w8O3t^uNXhe&w}J{knvUUv#3f{1bE1&+Q^6q9P)C#7; zdQsZUJbqCJtv`rQo!CM8LyybQ+6M4+i$2i`{=Lwq6*=A(qdbgU8)R=m3%I9`{2qL| zP@|8zdQj#QTbZw$6hZ$kg-l%ss?iS#q+1_&BdFQKd@YdJh`L*V*aqmTOOJp%%sHw< ztwouC6;2UMxpy$V-y*M0tP-_iwYU~???5l;x<=3&EC`1f^Y@@PU6vm9icYi^VcrgL z1$Z}sZzppRDt*9%wAcwgI>(qz^NE!}^n+pz+Fb=q{h}Vam*Qr{=LYV_7A2QPjC9iR zqMSru*R2-#?Zt;KIbO}E+bh~}szW1lw(;769uR)5j6B(f59p9I!b6T%9bSy>5O$fR z==w{LZDMWifZV8|xoK@eEPNElj6fNIG6H1;$_SJZ zC?iltpo~Bnf&X_1V8f3W$%-%0cHJk_l{ftO2HGss-xdAyb$6`mShsuKL+d`j?um8( zbKSGFF%QtabRll_f6U+R@9{_d1OETv|2zLt|8f6s{8y}OSh;KEy({;x{L;#!EB|@r zODq3<Ga53Sm=>hD%PyXwTMU#_ZKedFqlt3R^(yQ^Pa{ocB0-Tu0V>ONoh zH+BDB_eS0M^%vDIufMK7SpVVrX#M{Bhw8sv|IPZN^)J@{qW<^w&V~ycu54J<(Aa=2 z9PWYR@-OqR@caFBw87slu%pEfH0$(t`TP7aXm_uF*gxVw=>Lp=%>S_e5&swbhy0KG zpYT8FKkOg(AA{bf{HOhC|CC?zPy2KJ8Gqhivl3#;R~dma0%Zis2$T^hBTz=5j6fNI zG6H1;$_SJZ_%DG#ZAYYw?tFg*pSSVG=ADj?*4^?}xY56^Ry(e$1q7CJF{tQb?bj_)i*#y*h;?-vu7eMLLE173u2w zYlA{OJ>a?eVx5O5gP`1Eqa;D;HYg;gy|*V^ahbK&BjEWU%*xd8%b@JCQN97nu#IvI zlr1=3Gi&`bC@bD)rTiNxQ5)qIP&$29p4UMcv{78JxSdy6c`gCvwIx;xS>@1DD`g!h z_rKpt*#gS9Y?P0J@|&xzJZ+#ni^q1%Ufcu9Q5)rcP^N8^he6r7!dmM~pmffR!E}1HcW1xH<=gHi6 zrn~^kS8bFuD1lX0p5KG=F&o8!MQ+7vE6>HC?6grn0Ls^Flp8=fY@;-Ta?C~vgR%_w z089-BLD_AiJP68Z8|5pY{Mtr&3Y7MGtDJFAzGbwfTb)FnM)_t;fdW=r9@YAx zb84Ob47d&F`bSL3s&yJK8&5-xSxdEk_?%i#n{s4Z^$(Y}Rkx{>(oirdD(Zd;lru%$ zojtAif2Dl0P4%K9)*0{FE$_YA?Ppx?1@tPtX4&&xJZjxBEPO5=*;Du|VBhPuo=s!VZZ?kc4;EHP`Td2vFwsCU&m1qsSB6&g>LwpG_&N@>_QtM&9b zwO%mgsMen-ZL4m3DWw4~h0}Fbeb1d!>+V^7f4a1-x~@`6L+7m4X)y%xU9Lp5_p~E_ zthBAVdrK(|&&+Dwdrqx;XSM!JX?s_QJJG~79>^}so`UOlVz@zS>H21+RnPnxYOPm5O~p3&3lE0O6p^p(is zTh!cX)_VbYrPrT&C8G65dQnQvy%HTVcw9)?FMTDt6J#l84jzTi;lf+vGuQ4f+8=F$47zZ*q!2z1kj9ZC#84U6&p{#IOCumDT&QxAQU&%q zm2F7M<)G*zC@HssqOazX@-a~Km_$@$}o7$*6A;v>#L`fd_5>*HlB^3 z&}G)T0~9-kdqL6HK`G|}s%7if-+(f#Rx8Q#9jaxM`~y(*6;1NI49b{MD->$)>I#K; z%`toWTkz0jQk*y!)Ynrf=W9I|29O0{gZ@kvk)gJ_P< z7$`YVBx2#7cBJJ+jz;S9MeuA_IZ63CDEh2)im>ug+ih(fp|&7IN)ENQ#X@cID9JWQ z=NNb%2gTIqXP}JPD6fK|uX?ieg>HahYwHS7Ons;gKPU%nasr@y#zwgll*7h&QLTPZ z>^Of46n!qs*1t(SM!%@mGoVnP( zC%g99eF-S~j!g0_0j19-`Fc>O8>am# z+#-2~Kr!bIwec7z`rg4Q{sB3DO%U%CLv3xLSZ^pCjrK+bzYGZP0t&U7$-drbtUuNo zi}#BVy}p><6%>+$5FeBnm1c3Zhx^;2k-nH!@(zoXHu*whsST9CYmxL)yv2y$oMg$< zT?UnfKL|y7A~8$0tt;Hx6Ympr-mYqP@8!eXKD@_CC*j~<72-8YeBS~uPm1gjp$>@a z@8p*&h43=uNN;Sbkjggp;&d`O|EQMOz z+e5L|NS6qOAXO4r)&BU7Zk%z_OPypvd)Q>+bbA-x)r7Y^_lNmD0&}raovmFlydx^q z-rY(g7(-I;1?vVZxv6k>Uu-Yfx~%niBuUM1&)xBGTnCmY?O`hg2Hw|;cVp@IxD@2L zeFFICr~#$~1?invl;Zx2P#a!|6@$Xz9r2yesw)g-=*?8Nw@xWhk?7qj)gJH00J3WR zv0fzQORVf-xR~B>rJ7QsEZ?&Qi|VJ>TH#$@QVuaft#*D5Oh>JH)+-g^UUgcPq{y)AD#@LRn29bHg&Pk*Q< z-Yr7iN_E1owWpo*ir$S(q^B*kE7H*sA!OTo$*TE{Vo_v)$nJ2oCk%>wF&R-?kVezr$lQaw%^{lYp-6XMC}erTS)h*Q*ljHz z*?Q~dV5s@_U`x}M&~3p@TQ-C?-Fo|0tXzm(a0)BUhqIxkty^w0OFQu{H;6E=_T8bL z-QAc>JLsccZ$>VXnw543fM`%LWNLg&y9~q z9_sBNeeiZSKt=ulS{ls6x1*IjkttLkA>-|B)Ov|1nv~H!VeVpg>n@A~oDE*e7K8I7 ze}dtlGUMfU%3742VKJcYS+wtNjr2$xQ$8q!<3B5mX9hj^ktS-21zO*K7g*U~Q5(Sb zSpcxViH|xc%{kQ98pX^YVKfb`FUAY3TqQ#0+xplRx+6X4dT+nA&nA$z*YQbpBHgV! z!=W9maJXbF{TMug3dX*(ryHJysb}u1>gU`eWLT^Iiobv#Ruje&Ll(^j&BiHXtWao! z%`ypZy~L1YGeFs~5(ErZ-D^p=O6ceynr{r0^T*yU3oz|OZ)CmYMTs;#bH5gm$As5_ z5(v!+h8a2c6oZ@NB?e&X^GaH>eK_GA5PL`2>nq0+qZcR|_i}ChWIxOE#Xj%3mujbB z&c4P7{`A7$KDaq!da<2aXO}sz$Y5B`S+E$`(K`^r(kaom8Up%Z_;k}m=QQ$=#6jAs zWj2S%Ti~sZ9bK(E``J=;cV>rJf3YLEv5=f1W-qMrWZA5C$Z*svC2gJ!{-PtYQ%AvS UUMB2ko;%7 Date: Thu, 10 Feb 2005 22:54:30 +0000 Subject: [PATCH 174/185] Match packing in DDK svn path=/trunk/; revision=13491 --- reactos/include/ddk/iotypes.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/reactos/include/ddk/iotypes.h b/reactos/include/ddk/iotypes.h index 3af6fc71fdf..bca07696b55 100644 --- a/reactos/include/ddk/iotypes.h +++ b/reactos/include/ddk/iotypes.h @@ -196,6 +196,8 @@ typedef struct _CM_MCA_POS_DATA } CM_MCA_POS_DATA, *PCM_MCA_POS_DATA; +#include + /* Int13 drive geometry data */ typedef struct _CM_INT13_DRIVE_PARAMETER @@ -207,6 +209,8 @@ typedef struct _CM_INT13_DRIVE_PARAMETER USHORT NumberDrives; } CM_INT13_DRIVE_PARAMETER, *PCM_INT13_DRIVE_PARAMETER; +#include + /* Extended drive geometry data */ From 5930efc5756d16ba2d46ce47159a31d387248a43 Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Fri, 11 Feb 2005 12:06:29 +0000 Subject: [PATCH 175/185] - Implement RtlSetControlSecurityDescriptor - Remove property set functions from ntdll.def because they are not implemented in Win2K and above. svn path=/trunk/; revision=13492 --- reactos/include/ntos/rtl.h | 5 +++++ reactos/lib/ntdll/def/ntdll.def | 13 +---------- reactos/lib/rtl/sd.c | 40 ++++++++++++++++++++++++++++----- 3 files changed, 41 insertions(+), 17 deletions(-) diff --git a/reactos/include/ntos/rtl.h b/reactos/include/ntos/rtl.h index ff7026eed26..e3276f8560b 100755 --- a/reactos/include/ntos/rtl.h +++ b/reactos/include/ntos/rtl.h @@ -2294,6 +2294,11 @@ RtlSetBits ( ULONG NumberToSet ); +NTSTATUS STDCALL +RtlSetControlSecurityDescriptor(IN PSECURITY_DESCRIPTOR SecurityDescriptor, + IN SECURITY_DESCRIPTOR_CONTROL ControlBitsOfInterest, + IN SECURITY_DESCRIPTOR_CONTROL ControlBitsToSet); + NTSTATUS STDCALL RtlSetDaclSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor, BOOLEAN DaclPresent, diff --git a/reactos/lib/ntdll/def/ntdll.def b/reactos/lib/ntdll/def/ntdll.def index 1b9bb31c0db..ca0ab12cbae 100644 --- a/reactos/lib/ntdll/def/ntdll.def +++ b/reactos/lib/ntdll/def/ntdll.def @@ -321,7 +321,6 @@ RtlCharToInteger@12 RtlCheckRegistryKey@8 RtlClearAllBits@4 RtlClearBits@12 -;RtlClosePropertySet RtlCompactHeap@8 RtlCompareMemory@12 RtlCompareMemoryUlong@12 @@ -350,7 +349,6 @@ RtlCreateAtomTable@8 RtlCreateEnvironment@8 RtlCreateHeap@24 RtlCreateProcessParameters@40 -;RtlCreatePropertySet RtlCreateQueryDebugBuffer@8 RtlCreateRegistryKey@8 RtlCreateSecurityDescriptor@8 @@ -404,7 +402,6 @@ RtlEnterCriticalSection@4 RtlEnumProcessHeaps@8 ;RtlEnumerateGenericTable ;RtlEnumerateGenericTableWithoutSplaying -;RtlEnumerateProperties RtlEqualComputerName@8 RtlEqualDomainName@8 RtlEqualLuid@8 @@ -435,7 +432,6 @@ RtlFindRange@48 RtlFindSetBits@12 RtlFindSetBitsAndClear@12 RtlFirstFreeAce@8 -;RtlFlushPropertySet RtlFormatCurrentUserKeyPath@4 RtlFormatMessage@32 RtlFreeAnsiString@4 @@ -468,7 +464,6 @@ RtlGetProcessHeaps@8 RtlGetSaclSecurityDescriptor@16 ;RtlGetUserInfoHeap RtlGetVersion@4 -;RtlGuidToPropertySetName RtlIdentifierAuthoritySid@4 RtlImageDirectoryEntryToData@16 RtlImageNtHeader@4 @@ -559,7 +554,6 @@ RtlOpenCurrentUser@8 RtlPinAtomInAtomTable@8 RtlPrefixString@12 RtlPrefixUnicodeString@12 -;RtlPropertySetNameToGuid ;RtlProtectHeap RtlQueryAtomInAtomTable@24 RtlQueryEnvironmentVariable_U@12 @@ -568,9 +562,6 @@ RtlQueryInformationAcl@16 RtlQueryProcessDebugInformation@12 ;RtlQueryProcessHeapInformation ;RtlQueryProcessLockInformation -;RtlQueryProperties -;RtlQueryPropertyNames -;RtlQueryPropertySet RtlQueryRegistryValues@20 ;RtlQuerySecurityObject ;RtlQueryTagHeap @@ -594,6 +585,7 @@ RtlSelfRelativeToAbsoluteSD@44 RtlSetAllBits@4 ;RtlSetAttributesSecurityDescriptor RtlSetBits@12 +RtlSetControlSecurityDescriptor@12 RtlSetCurrentDirectory_U@4 RtlSetCurrentEnvironment@8 RtlSetDaclSecurityDescriptor@16 @@ -601,9 +593,6 @@ RtlSetEnvironmentVariable@12 RtlSetGroupSecurityDescriptor@12 RtlSetInformationAcl@16 RtlSetOwnerSecurityDescriptor@12 -;RtlSetProperties -;RtlSetPropertyNames -;RtlSetPropertySetClassId RtlSetSaclSecurityDescriptor@16 ;RtlSetSecurityObject RtlSetTimeZoneInformation@4 diff --git a/reactos/lib/rtl/sd.c b/reactos/lib/rtl/sd.c index 09ffac238db..6dd61e73c07 100644 --- a/reactos/lib/rtl/sd.c +++ b/reactos/lib/rtl/sd.c @@ -40,6 +40,7 @@ RtlCreateSecurityDescriptor(PSECURITY_DESCRIPTOR SecurityDescriptor, return STATUS_SUCCESS; } + /* * @implemented */ @@ -278,9 +279,10 @@ RtlSetOwnerSecurityDescriptor(PSECURITY_DESCRIPTOR SecurityDescriptor, SecurityDescriptor->Control = SecurityDescriptor->Control | SE_OWNER_DEFAULTED; } - return(STATUS_SUCCESS); + return STATUS_SUCCESS; } + /* * @implemented */ @@ -319,6 +321,7 @@ RtlGetOwnerSecurityDescriptor(PSECURITY_DESCRIPTOR SecurityDescriptor, return STATUS_SUCCESS; } + /* * @implemented */ @@ -347,6 +350,7 @@ RtlSetGroupSecurityDescriptor(PSECURITY_DESCRIPTOR SecurityDescriptor, return STATUS_SUCCESS; } + /* * @implemented */ @@ -578,8 +582,7 @@ RtlMakeSelfRelativeSD(PSECURITY_DESCRIPTOR AbsSD, NTSTATUS STDCALL RtlAbsoluteToSelfRelativeSD(PSECURITY_DESCRIPTOR AbsSD, PSECURITY_DESCRIPTOR RelSD, - PULONG BufferLength - ) + PULONG BufferLength) { if (AbsSD->Control & SE_SELF_RELATIVE) { @@ -611,6 +614,29 @@ RtlGetControlSecurityDescriptor(PSECURITY_DESCRIPTOR SecurityDescriptor, } +/* + * @implemented + */ +NTSTATUS STDCALL +RtlSetControlSecurityDescriptor(IN PSECURITY_DESCRIPTOR SecurityDescriptor, + IN SECURITY_DESCRIPTOR_CONTROL ControlBitsOfInterest, + IN SECURITY_DESCRIPTOR_CONTROL ControlBitsToSet) +{ + if (SecurityDescriptor->Revision != SECURITY_DESCRIPTOR_REVISION1) + { + return STATUS_UNKNOWN_REVISION; + } + + /* Zero the 'bits of interest' */ + SecurityDescriptor->Control &= ~ControlBitsOfInterest; + + /* Set the 'bits to set' */ + SecurityDescriptor->Control |= (ControlBitsToSet & ControlBitsOfInterest); + + return STATUS_SUCCESS; +} + + /* * @implemented */ @@ -657,6 +683,7 @@ RtlGetSaclSecurityDescriptor(PSECURITY_DESCRIPTOR SecurityDescriptor, return STATUS_SUCCESS; } + /* * @implemented */ @@ -694,6 +721,7 @@ RtlSetSaclSecurityDescriptor(PSECURITY_DESCRIPTOR SecurityDescriptor, return STATUS_SUCCESS; } + /* * @implemented */ @@ -759,6 +787,7 @@ RtlSelfRelativeToAbsoluteSD(PSECURITY_DESCRIPTOR RelSD, return STATUS_SUCCESS; } + /* * @unimplemented */ @@ -770,9 +799,10 @@ RtlSelfRelativeToAbsoluteSD2(PSECURITY_DESCRIPTOR SelfRelativeSecurityDescriptor return STATUS_NOT_IMPLEMENTED; } + /* -* @implemented -*/ + * @implemented + */ BOOLEAN STDCALL RtlValidRelativeSecurityDescriptor(IN PSECURITY_DESCRIPTOR SecurityDescriptorInput, IN ULONG SecurityDescriptorLength, From 1ca75be5f020337fc0b7feebc719111814e9cc2e Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Fri, 11 Feb 2005 15:52:38 +0000 Subject: [PATCH 176/185] Implement RtlGetSecurityDescriptorRMControl, RtlSetSecurityDescriptorRMControl, SetSecurityDescriptorControl, GetSecurityDescriptorRMControl and SetSecurityDescriptorRMControl. svn path=/trunk/; revision=13493 --- reactos/include/ddk/setypes.h | 29 +++++++-------- reactos/include/ntos/rtl.h | 8 +++++ reactos/include/ntos/security.h | 15 ++++---- reactos/lib/advapi32/advapi32.def | 9 ++--- reactos/lib/advapi32/sec/sec.c | 60 ++++++++++++++++++++++++++++++- reactos/lib/ntdll/def/ntdll.def | 6 ++-- reactos/lib/rtl/sd.c | 43 ++++++++++++++++++++-- reactos/w32api/include/winbase.h | 2 ++ 8 files changed, 142 insertions(+), 30 deletions(-) diff --git a/reactos/include/ddk/setypes.h b/reactos/include/ddk/setypes.h index 322b7bdc46e..f9890b4c988 100644 --- a/reactos/include/ddk/setypes.h +++ b/reactos/include/ddk/setypes.h @@ -50,22 +50,23 @@ #define FAILED_ACCESS_ACE_FLAG (0x80) /* SECURITY_DESCRIPTOR_CONTROL */ -#define SECURITY_DESCRIPTOR_REVISION (1) -#define SECURITY_DESCRIPTOR_REVISION1 (1) -#define SECURITY_DESCRIPTOR_MIN_LENGTH (20) -#define SE_OWNER_DEFAULTED (1) -#define SE_GROUP_DEFAULTED (2) -#define SE_DACL_PRESENT (4) -#define SE_DACL_DEFAULTED (8) -#define SE_SACL_PRESENT (16) -#define SE_SACL_DEFAULTED (32) -#define SE_SELF_RELATIVE (32768) +#define SECURITY_DESCRIPTOR_REVISION (1) +#define SECURITY_DESCRIPTOR_REVISION1 (1) +#define SECURITY_DESCRIPTOR_MIN_LENGTH (20) +#define SE_OWNER_DEFAULTED (0x0001) +#define SE_GROUP_DEFAULTED (0x0002) +#define SE_DACL_PRESENT (0x0004) +#define SE_DACL_DEFAULTED (0x0008) +#define SE_SACL_PRESENT (0x0010) +#define SE_SACL_DEFAULTED (0x0020) +#define SE_RM_CONTROL_VALID (0x4000) +#define SE_SELF_RELATIVE (0x8000) /* PRIVILEGE_SET */ -#define SE_PRIVILEGE_ENABLED_BY_DEFAULT (0x1L) -#define SE_PRIVILEGE_ENABLED (0x2L) -#define SE_PRIVILEGE_USED_FOR_ACCESS (0x80000000L) -#define PRIVILEGE_SET_ALL_NECESSARY (0x1) +#define SE_PRIVILEGE_ENABLED_BY_DEFAULT (0x1L) +#define SE_PRIVILEGE_ENABLED (0x2L) +#define SE_PRIVILEGE_USED_FOR_ACCESS (0x80000000L) +#define PRIVILEGE_SET_ALL_NECESSARY (0x1) /* SID */ #define SID_REVISION (1) diff --git a/reactos/include/ntos/rtl.h b/reactos/include/ntos/rtl.h index e3276f8560b..183e127afce 100755 --- a/reactos/include/ntos/rtl.h +++ b/reactos/include/ntos/rtl.h @@ -1337,6 +1337,10 @@ RtlGetSaclSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor, PACL* Sacl, PBOOLEAN SaclDefaulted); +BOOLEAN STDCALL +RtlGetSecurityDescriptorRMControl(PSECURITY_DESCRIPTOR SecurityDescriptor, + PUCHAR RMControl); + NTSTATUS STDCALL RtlGetSetBootStatusData( @@ -2321,6 +2325,10 @@ RtlSetSaclSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor, PACL Sacl, BOOLEAN SaclDefaulted); +VOID STDCALL +RtlSetSecurityDescriptorRMControl(PSECURITY_DESCRIPTOR SecurityDescriptor, + PUCHAR RMControl); + NTSTATUS STDCALL RtlSetInformationAcl (PACL Acl, PVOID Information, diff --git a/reactos/include/ntos/security.h b/reactos/include/ntos/security.h index 1fa8d5db05a..24545637e6c 100644 --- a/reactos/include/ntos/security.h +++ b/reactos/include/ntos/security.h @@ -36,13 +36,14 @@ /* Security descriptor control. */ #define SECURITY_DESCRIPTOR_REVISION (1) #define SECURITY_DESCRIPTOR_MIN_LENGTH (20) -#define SE_OWNER_DEFAULTED (1) -#define SE_GROUP_DEFAULTED (2) -#define SE_DACL_PRESENT (4) -#define SE_DACL_DEFAULTED (8) -#define SE_SACL_PRESENT (16) -#define SE_SACL_DEFAULTED (32) -#define SE_SELF_RELATIVE (32768) +#define SE_OWNER_DEFAULTED (0x0001) +#define SE_GROUP_DEFAULTED (0x0002) +#define SE_DACL_PRESENT (0x0004) +#define SE_DACL_DEFAULTED (0x0008) +#define SE_SACL_PRESENT (0x0010) +#define SE_SACL_DEFAULTED (0x0020) +#define SE_RM_CONTROL_VALID (0x4000) +#define SE_SELF_RELATIVE (0x8000) #endif /* This is defined in the Win 32 API headers as something else: */ diff --git a/reactos/lib/advapi32/advapi32.def b/reactos/lib/advapi32/advapi32.def index 0945f2130ee..8f8034abadd 100644 --- a/reactos/lib/advapi32/advapi32.def +++ b/reactos/lib/advapi32/advapi32.def @@ -54,7 +54,7 @@ ControlService@12 ConvertSidToStringSidA@8 ConvertSidToStringSidW@8 CopySid@12 -;CreatePrivateObjectSecurity@24 +CreatePrivateObjectSecurity@24 CreateProcessAsUserA@44 CreateProcessAsUserW@44 CreateServiceA@52 @@ -93,7 +93,7 @@ DeleteService@4 ;DenyAccessRightsA ;DenyAccessRightsW DeregisterEventSource@4 -;DestroyPrivateObjectSecurity@4 +DestroyPrivateObjectSecurity@4 DuplicateToken@12 DuplicateTokenEx@24 ;ElfBackupEventLogFileA@8 @@ -157,7 +157,7 @@ GetNamedSecurityInfoA@32 GetNamedSecurityInfoW@32 GetNumberOfEventLogRecords@8 GetOldestEventLogRecord@8 -;GetPrivateObjectSecurity@20 +GetPrivateObjectSecurity@20 GetSecurityDescriptorControl@12 GetSecurityDescriptorDacl@16 GetSecurityDescriptorGroup@12 @@ -379,7 +379,8 @@ SetFileSecurityW@12 SetKernelObjectSecurity@12 SetNamedSecurityInfoA@28 SetNamedSecurityInfoW@28 -;SetPrivateObjectSecurity@20 +SetPrivateObjectSecurity@20 +SetSecurityDescriptorControl@12 SetSecurityDescriptorDacl@16 SetSecurityDescriptorGroup@12 SetSecurityDescriptorOwner@12 diff --git a/reactos/lib/advapi32/sec/sec.c b/reactos/lib/advapi32/sec/sec.c index 00b353eeac1..ea7b36cac2a 100644 --- a/reactos/lib/advapi32/sec/sec.c +++ b/reactos/lib/advapi32/sec/sec.c @@ -124,7 +124,7 @@ GetSecurityDescriptorOwner ( PSECURITY_DESCRIPTOR pSecurityDescriptor, PSID *pOwner, LPBOOL lpbOwnerDefaulted -) + ) { BOOLEAN OwnerDefaulted; NTSTATUS Status; @@ -144,6 +144,23 @@ GetSecurityDescriptorOwner ( } +/* + * @implemented + */ +DWORD +STDCALL +GetSecurityDescriptorRMControl ( + PSECURITY_DESCRIPTOR SecurityDescriptor, + PUCHAR RMControl) +{ + if (!RtlGetSecurityDescriptorRMControl(SecurityDescriptor, + RMControl)) + return ERROR_INVALID_DATA; + + return ERROR_SUCCESS; +} + + /* * @implemented */ @@ -288,6 +305,31 @@ MakeSelfRelativeSD ( } +/* + * @implemented + */ +BOOL +STDCALL +SetSecurityDescriptorControl ( + PSECURITY_DESCRIPTOR pSecurityDescriptor, + SECURITY_DESCRIPTOR_CONTROL ControlBitsOfInterest, + SECURITY_DESCRIPTOR_CONTROL ControlBitsToSet) +{ + NTSTATUS Status; + + Status = RtlSetControlSecurityDescriptor(pSecurityDescriptor, + ControlBitsOfInterest, + ControlBitsToSet); + if (!NT_SUCCESS(Status)) + { + SetLastError (RtlNtStatusToDosError (Status)); + return FALSE; + } + + return TRUE; +} + + /* * @implemented */ @@ -368,6 +410,22 @@ SetSecurityDescriptorOwner ( } +/* + * @implemented + */ +DWORD +STDCALL +SetSecurityDescriptorRMControl ( + PSECURITY_DESCRIPTOR SecurityDescriptor, + PUCHAR RMControl) +{ + RtlSetSecurityDescriptorRMControl(SecurityDescriptor, + RMControl); + + return ERROR_SUCCESS; +} + + /* * @implemented */ diff --git a/reactos/lib/ntdll/def/ntdll.def b/reactos/lib/ntdll/def/ntdll.def index ca0ab12cbae..3122ecb60fd 100644 --- a/reactos/lib/ntdll/def/ntdll.def +++ b/reactos/lib/ntdll/def/ntdll.def @@ -369,8 +369,6 @@ RtlDecompressFragment@32 RtlDeleteAce@8 RtlDeleteAtomFromAtomTable@8 RtlDeleteCriticalSection@4 -RtlDuplicateUnicodeString@12 -RtlSetCriticalSectionSpinCount@8 ;RtlDeleteElementGenericTable ;RtlDeleteNoSplay RtlDeleteOwnersRanges@8 @@ -394,6 +392,7 @@ RtlDosSearchPath_U@24 RtlDowncaseUnicodeChar@4 RtlDowncaseUnicodeString@12 RtlDumpResource@4 +RtlDuplicateUnicodeString@12 RtlEmptyAtomTable@8 RtlEnlargedIntegerMultiply@8 RtlEnlargedUnsignedDivide@16 @@ -462,6 +461,7 @@ RtlGetNtVersionNumbers@12 RtlGetOwnerSecurityDescriptor@12 RtlGetProcessHeaps@8 RtlGetSaclSecurityDescriptor@16 +RtlGetSecurityDescriptorRMControl@8 ;RtlGetUserInfoHeap RtlGetVersion@4 RtlIdentifierAuthoritySid@4 @@ -586,6 +586,7 @@ RtlSetAllBits@4 ;RtlSetAttributesSecurityDescriptor RtlSetBits@12 RtlSetControlSecurityDescriptor@12 +RtlSetCriticalSectionSpinCount@8 RtlSetCurrentDirectory_U@4 RtlSetCurrentEnvironment@8 RtlSetDaclSecurityDescriptor@16 @@ -594,6 +595,7 @@ RtlSetGroupSecurityDescriptor@12 RtlSetInformationAcl@16 RtlSetOwnerSecurityDescriptor@12 RtlSetSaclSecurityDescriptor@16 +RtlSetSecurityDescriptorRMControl@8 ;RtlSetSecurityObject RtlSetTimeZoneInformation@4 ;RtlSetUnicodeCallouts diff --git a/reactos/lib/rtl/sd.c b/reactos/lib/rtl/sd.c index 6dd61e73c07..7430a16f521 100644 --- a/reactos/lib/rtl/sd.c +++ b/reactos/lib/rtl/sd.c @@ -789,8 +789,8 @@ RtlSelfRelativeToAbsoluteSD(PSECURITY_DESCRIPTOR RelSD, /* -* @unimplemented -*/ + * @unimplemented + */ NTSTATUS STDCALL RtlSelfRelativeToAbsoluteSD2(PSECURITY_DESCRIPTOR SelfRelativeSecurityDescriptor, PULONG BufferSize) @@ -870,4 +870,43 @@ RtlValidRelativeSecurityDescriptor(IN PSECURITY_DESCRIPTOR SecurityDescriptorInp return TRUE; } + +/* + * @implemented + */ +BOOLEAN STDCALL +RtlGetSecurityDescriptorRMControl(PSECURITY_DESCRIPTOR SecurityDescriptor, + PUCHAR RMControl) +{ + if (!(SecurityDescriptor->Control & SE_RM_CONTROL_VALID)) + { + *RMControl = 0; + return FALSE; + } + + *RMControl = SecurityDescriptor->Sbz1; + + return TRUE; +} + + +/* + * @implemented + */ +VOID STDCALL +RtlSetSecurityDescriptorRMControl(PSECURITY_DESCRIPTOR SecurityDescriptor, + PUCHAR RMControl) +{ + if (RMControl == NULL) + { + SecurityDescriptor->Control &= ~SE_RM_CONTROL_VALID; + SecurityDescriptor->Sbz1 = 0; + } + else + { + SecurityDescriptor->Control |= SE_RM_CONTROL_VALID; + SecurityDescriptor->Sbz1 = *RMControl; + } +} + /* EOF */ diff --git a/reactos/w32api/include/winbase.h b/reactos/w32api/include/winbase.h index a68cffb4def..ddeab7e1824 100644 --- a/reactos/w32api/include/winbase.h +++ b/reactos/w32api/include/winbase.h @@ -1457,6 +1457,7 @@ BOOL WINAPI GetSecurityDescriptorDacl(PSECURITY_DESCRIPTOR,LPBOOL,PACL*,LPBOOL); BOOL WINAPI GetSecurityDescriptorGroup(PSECURITY_DESCRIPTOR,PSID*,LPBOOL); DWORD WINAPI GetSecurityDescriptorLength(PSECURITY_DESCRIPTOR); BOOL WINAPI GetSecurityDescriptorOwner(PSECURITY_DESCRIPTOR,PSID*,LPBOOL); +DWORD WINAPI GetSecurityDescriptorRMControl(PSECURITY_DESCRIPTOR,PUCHAR); BOOL WINAPI GetSecurityDescriptorSacl(PSECURITY_DESCRIPTOR,LPBOOL,PACL*,LPBOOL); DWORD WINAPI GetShortPathNameA(LPCSTR,LPSTR,DWORD); DWORD WINAPI GetShortPathNameW(LPCWSTR,LPWSTR,DWORD); @@ -1835,6 +1836,7 @@ BOOL WINAPI SetSecurityDescriptorControl(PSECURITY_DESCRIPTOR,SECURITY_DESCRIPTO BOOL WINAPI SetSecurityDescriptorDacl(PSECURITY_DESCRIPTOR,BOOL,PACL,BOOL); BOOL WINAPI SetSecurityDescriptorGroup(PSECURITY_DESCRIPTOR,PSID,BOOL); BOOL WINAPI SetSecurityDescriptorOwner(PSECURITY_DESCRIPTOR,PSID,BOOL); +DWORD WINAPI SetSecurityDescriptorRMControl(PSECURITY_DESCRIPTOR,PUCHAR); BOOL WINAPI SetSecurityDescriptorSacl(PSECURITY_DESCRIPTOR,BOOL,PACL,BOOL); BOOL WINAPI SetStdHandle(DWORD,HANDLE); #define SetSwapAreaSize(w) (w) From 1a4bf3f6f5cb1a5d650ac6ca67c3175c63c31528 Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Fri, 11 Feb 2005 16:01:10 +0000 Subject: [PATCH 177/185] Ooops! These are the correct exports. svn path=/trunk/; revision=13494 --- reactos/lib/advapi32/advapi32.def | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/reactos/lib/advapi32/advapi32.def b/reactos/lib/advapi32/advapi32.def index 8f8034abadd..dfbbbb41972 100644 --- a/reactos/lib/advapi32/advapi32.def +++ b/reactos/lib/advapi32/advapi32.def @@ -54,7 +54,7 @@ ControlService@12 ConvertSidToStringSidA@8 ConvertSidToStringSidW@8 CopySid@12 -CreatePrivateObjectSecurity@24 +;CreatePrivateObjectSecurity@24 CreateProcessAsUserA@44 CreateProcessAsUserW@44 CreateServiceA@52 @@ -93,7 +93,7 @@ DeleteService@4 ;DenyAccessRightsA ;DenyAccessRightsW DeregisterEventSource@4 -DestroyPrivateObjectSecurity@4 +;DestroyPrivateObjectSecurity@4 DuplicateToken@12 DuplicateTokenEx@24 ;ElfBackupEventLogFileA@8 @@ -157,12 +157,13 @@ GetNamedSecurityInfoA@32 GetNamedSecurityInfoW@32 GetNumberOfEventLogRecords@8 GetOldestEventLogRecord@8 -GetPrivateObjectSecurity@20 +;GetPrivateObjectSecurity@20 GetSecurityDescriptorControl@12 GetSecurityDescriptorDacl@16 GetSecurityDescriptorGroup@12 GetSecurityDescriptorLength@4 GetSecurityDescriptorOwner@12 +GetSecurityDescriptorRMControl@8 GetSecurityDescriptorSacl@16 GetSecurityInfo@32 GetSecurityInfoExA@36 @@ -379,11 +380,12 @@ SetFileSecurityW@12 SetKernelObjectSecurity@12 SetNamedSecurityInfoA@28 SetNamedSecurityInfoW@28 -SetPrivateObjectSecurity@20 +;SetPrivateObjectSecurity@20 SetSecurityDescriptorControl@12 SetSecurityDescriptorDacl@16 SetSecurityDescriptorGroup@12 SetSecurityDescriptorOwner@12 +SetSecurityDescriptorRMControl@8 SetSecurityDescriptorSacl@16 SetSecurityInfo@28 SetServiceBits@16 From 6d7d3aaff69c4126f2c9fb95be8219ca1bf875a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20van=20Geldorp?= Date: Fri, 11 Feb 2005 21:02:35 +0000 Subject: [PATCH 178/185] Be compatible with some of the crap apps out there svn path=/trunk/; revision=13497 --- reactos/ntoskrnl/mm/pe.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/reactos/ntoskrnl/mm/pe.c b/reactos/ntoskrnl/mm/pe.c index f68fac9f381..fc8e2b97ffd 100644 --- a/reactos/ntoskrnl/mm/pe.c +++ b/reactos/ntoskrnl/mm/pe.c @@ -649,8 +649,11 @@ l_ReadHeaderFromFile: if(pishSectionHeaders[i].SizeOfRawData != 0) { /* validate the alignment */ +#if 0 /* Yes, this should be a multiple of FileAlignment, but there's + stuff out there that isn't. We can cope with that */ if(!IsAligned(pishSectionHeaders[i].SizeOfRawData, nFileAlignment)) DIE(("SizeOfRawData[%u] is not aligned\n", i)); +#endif if(!IsAligned(pishSectionHeaders[i].PointerToRawData, nFileAlignment)) DIE(("PointerToRawData[%u] is not aligned\n", i)); From 165794f5c8351dfeade89f287ef802ba756fa6f5 Mon Sep 17 00:00:00 2001 From: Art Yerkes Date: Sat, 12 Feb 2005 03:53:19 +0000 Subject: [PATCH 179/185] AddrWidenAddress: set type NBFlushPackets: We already hold the table lock when calling this. svn path=/trunk/; revision=13499 --- reactos/drivers/lib/ip/network/address.c | 9 ++++++++- reactos/drivers/lib/ip/network/neighbor.c | 16 +++++++--------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/reactos/drivers/lib/ip/network/address.c b/reactos/drivers/lib/ip/network/address.c index 38194a34c0b..1631efdda81 100644 --- a/reactos/drivers/lib/ip/network/address.c +++ b/reactos/drivers/lib/ip/network/address.c @@ -86,6 +86,7 @@ UINT AddrCountPrefixBits( PIP_ADDRESS Netmask ) { VOID AddrWidenAddress( PIP_ADDRESS Network, PIP_ADDRESS Source, PIP_ADDRESS Netmask ) { if( Netmask->Type == IP_ADDRESS_V4 ) { + Network->Type = Netmask->Type; Network->Address.IPv4Address = Source->Address.IPv4Address & Netmask->Address.IPv4Address; } else { @@ -220,8 +221,10 @@ BOOLEAN AddrIsEqual( PIP_ADDRESS Address1, PIP_ADDRESS Address2) { - if (Address1->Type != Address2->Type) + if (Address1->Type != Address2->Type) { + DbgPrint("AddrIsEqual: Unequal Address Types\n"); return FALSE; + } switch (Address1->Type) { case IP_ADDRESS_V4: @@ -231,6 +234,10 @@ BOOLEAN AddrIsEqual( return (RtlCompareMemory(&Address1->Address, &Address2->Address, sizeof(IPv6_RAW_ADDRESS)) == sizeof(IPv6_RAW_ADDRESS)); break; + + default: + DbgPrint("AddrIsEqual: Bad address type\n"); + break; } return FALSE; diff --git a/reactos/drivers/lib/ip/network/neighbor.c b/reactos/drivers/lib/ip/network/neighbor.c index b21f6f3df58..99e9bbf6e55 100644 --- a/reactos/drivers/lib/ip/network/neighbor.c +++ b/reactos/drivers/lib/ip/network/neighbor.c @@ -52,19 +52,19 @@ VOID NBSendPackets( PNEIGHBOR_CACHE_ENTRY NCE ) { } } +/* Must be called with table lock acquired */ VOID NBFlushPacketQueue( PNEIGHBOR_CACHE_ENTRY NCE, BOOL CallComplete, NTSTATUS ErrorCode ) { PLIST_ENTRY PacketEntry; PNEIGHBOR_PACKET Packet; - PacketEntry = ExInterlockedRemoveHeadList(&NCE->PacketQueue, - &NCE->Table->Lock); - while( PacketEntry != NULL ) { + while( !IsListEmpty(&NCE->PacketQueue) ) { + PacketEntry = RemoveHeadList(&NCE->PacketQueue); Packet = CONTAINING_RECORD ( PacketEntry, NEIGHBOR_PACKET, Next ); - ASSERT_KM_POINTER(Packet); + ASSERT_KM_POINTER(Packet); TI_DbgPrint (MID_TRACE, @@ -72,16 +72,14 @@ VOID NBFlushPacketQueue( PNEIGHBOR_CACHE_ENTRY NCE, PacketEntry, Packet->Packet)); if( CallComplete ) - { - ASSERT_KM_POINTER(Packet->Complete); + { + ASSERT_KM_POINTER(Packet->Complete); Packet->Complete( Packet->Context, Packet->Packet, NDIS_STATUS_REQUEST_ABORTED ); - } + } PoolFreeBuffer( Packet ); - PacketEntry = ExInterlockedRemoveHeadList(&NCE->PacketQueue, - &NCE->Table->Lock); } } From 3cc5374fe177632e2a68b5c17eef6ca7a037808c Mon Sep 17 00:00:00 2001 From: Emanuele Aliberti Date: Sat, 12 Feb 2005 09:08:52 +0000 Subject: [PATCH 180/185] SM - clean, simplify, make more readable - split initialization in more files to make it more readable - cleaned up some code - simplified some code - documented some todos svn path=/trunk/; revision=13500 --- reactos/subsys/smss/client.c | 40 +- reactos/subsys/smss/debug.c | 6 +- reactos/subsys/smss/init.c | 1041 ++---------------------------- reactos/subsys/smss/initdosdev.c | 109 ++++ reactos/subsys/smss/initenv.c | 139 ++++ reactos/subsys/smss/initheap.c | 47 ++ reactos/subsys/smss/initmv.c | 44 ++ reactos/subsys/smss/initobdir.c | 93 +++ reactos/subsys/smss/initpage.c | 127 ++++ reactos/subsys/smss/initreg.c | 41 ++ reactos/subsys/smss/initrun.c | 183 ++++++ reactos/subsys/smss/initss.c | 220 +++++++ reactos/subsys/smss/initwkdll.c | 254 ++++++++ reactos/subsys/smss/makefile | 7 +- reactos/subsys/smss/smapi.c | 10 +- reactos/subsys/smss/smss.c | 48 +- reactos/subsys/smss/smss.h | 76 ++- 17 files changed, 1406 insertions(+), 1079 deletions(-) create mode 100644 reactos/subsys/smss/initdosdev.c create mode 100644 reactos/subsys/smss/initenv.c create mode 100644 reactos/subsys/smss/initheap.c create mode 100644 reactos/subsys/smss/initmv.c create mode 100644 reactos/subsys/smss/initobdir.c create mode 100644 reactos/subsys/smss/initpage.c create mode 100644 reactos/subsys/smss/initreg.c create mode 100644 reactos/subsys/smss/initrun.c create mode 100644 reactos/subsys/smss/initss.c create mode 100644 reactos/subsys/smss/initwkdll.c diff --git a/reactos/subsys/smss/client.c b/reactos/subsys/smss/client.c index def34074c4c..b25535e5c85 100644 --- a/reactos/subsys/smss/client.c +++ b/reactos/subsys/smss/client.c @@ -25,7 +25,6 @@ */ #define NTOS_MODE_USER #include -#include #include "smss.h" /* Private ADT */ @@ -51,14 +50,37 @@ struct _SM_CLIENT_DIRECTORY } SmpClientDirectory; /********************************************************************** - * SmpInitializeClientManagement/0 + * SmInitializeClientManagement/0 */ -VOID STDCALL -SmpInitializeClientManagement (VOID) +NTSTATUS +SmInitializeClientManagement (VOID) { RtlInitializeCriticalSection(& SmpClientDirectory.Lock); SmpClientDirectory.Count = 0; SmpClientDirectory.Client = NULL; + return STATUS_SUCCESS; +} + +/********************************************************************** + * SmpLookupClient/1 + */ +PSM_CLIENT_DATA STDCALL +SmpLookupClient (USHORT SubsystemId) +{ + PSM_CLIENT_DATA Client = NULL; + + if (SmpClientDirectory.Count > 0) + { + RtlEnterCriticalSection (& SmpClientDirectory.Lock); + Client = SmpClientDirectory.Client; + while (NULL != Client->Next) + { + if (SubsystemId == Client->SubsystemId) break; + Client = Client->Next; + } + RtlLeaveCriticalSection (& SmpClientDirectory.Lock); + } + return Client; } /********************************************************************** @@ -69,6 +91,14 @@ SmpCreateClient(SM_PORT_MESSAGE Request) { PSM_CLIENT_DATA pClient = NULL; + /* + * Check if a client for the ID already exist. + */ + if (SmpLookupClient(0)) //FIXME + { + DbgPrint("SMSS: %s: attempt to register again subsystem %d.\n",__FUNCTION__,0); + return STATUS_UNSUCCESSFUL; + } /* * Allocate the storage for client data */ @@ -79,6 +109,8 @@ SmpCreateClient(SM_PORT_MESSAGE Request) /* * Initialize the client data */ +// pClient->SubsystemId = Request->Subsystem; + pClient->Initialized = FALSE; // TODO /* * Insert the new descriptor in the diff --git a/reactos/subsys/smss/debug.c b/reactos/subsys/smss/debug.c index e1993610e21..e7848df3d62 100644 --- a/reactos/subsys/smss/debug.c +++ b/reactos/subsys/smss/debug.c @@ -1,6 +1,6 @@ /* $Id: smss.c 12852 2005-01-06 13:58:04Z mf $ * - * client.c - Session Manager client Management + * debug.c - Session Manager debug messages switch and router * * ReactOS Operating System * @@ -36,8 +36,8 @@ HANDLE DbgUiApiPort = INVALID_HANDLE_VALUE; /* FUNCTIONS *********************************************************/ -NTSTATUS STDCALL -SmpInitializeDbgSs (VOID) +NTSTATUS +SmInitializeDbgSs (VOID) { NTSTATUS Status; UNICODE_STRING UnicodeString; diff --git a/reactos/subsys/smss/init.c b/reactos/subsys/smss/init.c index 83ce1e2ef6a..4b24771b353 100644 --- a/reactos/subsys/smss/init.c +++ b/reactos/subsys/smss/init.c @@ -22,761 +22,19 @@ * MA 02139, USA. * * -------------------------------------------------------------------- - * - * 19990530 (Emanuele Aliberti) - * Compiled successfully with egcs 1.1.2 */ -/* INCLUDES *****************************************************************/ - -#include -#include -#include -#include -#include #include "smss.h" +#include -#define NDEBUG +//#define NDEBUG #include -/* GLOBALS ******************************************************************/ - -HANDLE SmpHeap = NULL; - -PWSTR SmSystemEnvironment = NULL; - /* FUNCTIONS ****************************************************************/ -static NTSTATUS STDCALL -SmObjectDirectoryQueryRoutine(PWSTR ValueName, - ULONG ValueType, - PVOID ValueData, - ULONG ValueLength, - PVOID Context, - PVOID EntryContext) -{ - OBJECT_ATTRIBUTES ObjectAttributes; - UNICODE_STRING UnicodeString; - HANDLE WindowsDirectory; - NTSTATUS Status = STATUS_SUCCESS; - -#ifndef NDEBUG - DbgPrint("ValueName '%S' Type %lu Length %lu\n", ValueName, ValueType, ValueLength); - DbgPrint("ValueData '%S'\n", (PWSTR)ValueData); -#endif - if (ValueType != REG_SZ) - { - return(STATUS_SUCCESS); - } - - RtlInitUnicodeString(&UnicodeString, - (PWSTR)ValueData); - - InitializeObjectAttributes(&ObjectAttributes, - &UnicodeString, - 0, - NULL, - NULL); - - Status = ZwCreateDirectoryObject(&WindowsDirectory, - 0, - &ObjectAttributes); - - return(Status); -} - - static NTSTATUS -SmCreateObjectDirectories(VOID) -{ - RTL_QUERY_REGISTRY_TABLE QueryTable[2]; - NTSTATUS Status; - - RtlZeroMemory(&QueryTable, - sizeof(QueryTable)); - - QueryTable[0].Name = L"ObjectDirectories"; - QueryTable[0].QueryRoutine = SmObjectDirectoryQueryRoutine; - - Status = RtlQueryRegistryValues(RTL_REGISTRY_CONTROL, - L"\\Session Manager", - QueryTable, - NULL, - NULL); - - return(Status); -} - - -static NTSTATUS STDCALL -SmDosDevicesQueryRoutine(PWSTR ValueName, - ULONG ValueType, - PVOID ValueData, - ULONG ValueLength, - PVOID Context, - PVOID EntryContext) -{ - OBJECT_ATTRIBUTES ObjectAttributes; - UNICODE_STRING DeviceName; - UNICODE_STRING LinkName; - HANDLE LinkHandle; - WCHAR LinkBuffer[80]; - NTSTATUS Status; - - DPRINT("ValueName '%S' Type %lu Length %lu\n", ValueName, ValueType, ValueLength); - DPRINT("ValueData '%S'\n", (PWSTR)ValueData); - - if (ValueType != REG_SZ) - { - return(STATUS_SUCCESS); - } - - swprintf(LinkBuffer, - L"\\??\\%s", - ValueName); - RtlInitUnicodeString(&LinkName, - LinkBuffer); - RtlInitUnicodeString(&DeviceName, - (PWSTR)ValueData); - - DPRINT("SM: Linking %wZ --> %wZ\n", - &LinkName, - &DeviceName); - - /* create symbolic link */ - InitializeObjectAttributes(&ObjectAttributes, - &LinkName, - OBJ_PERMANENT, - NULL, - NULL); - Status = NtCreateSymbolicLinkObject(&LinkHandle, - SYMBOLIC_LINK_ALL_ACCESS, - &ObjectAttributes, - &DeviceName); - if (!NT_SUCCESS(Status)) - { - DPRINT1("SmDosDevicesQueryRoutine: NtCreateSymbolicLink( %wZ --> %wZ ) failed!\n", - &LinkName, - &DeviceName); - } - NtClose(LinkHandle); - - return(Status); -} - - -static NTSTATUS -SmInitDosDevices(VOID) -{ - RTL_QUERY_REGISTRY_TABLE QueryTable[2]; - NTSTATUS Status; - - RtlZeroMemory(&QueryTable, - sizeof(QueryTable)); - - QueryTable[0].QueryRoutine = SmDosDevicesQueryRoutine; - - Status = RtlQueryRegistryValues(RTL_REGISTRY_CONTROL, - L"\\Session Manager\\DOS Devices", - QueryTable, - NULL, - NULL); - return(Status); -} - - -static NTSTATUS STDCALL -SmRunBootAppsQueryRoutine(PWSTR ValueName, - ULONG ValueType, - PVOID ValueData, - ULONG ValueLength, - PVOID Context, - PVOID EntryContext) -{ - PRTL_USER_PROCESS_PARAMETERS ProcessParameters; - RTL_PROCESS_INFO ProcessInfo; - UNICODE_STRING ImagePathString; - UNICODE_STRING CommandLineString; - WCHAR Description[256]; - WCHAR ImageName[256]; - WCHAR ImagePath[256]; - WCHAR CommandLine[256]; - PWSTR p1, p2; - ULONG len; - NTSTATUS Status; - - DPRINT("ValueName '%S' Type %lu Length %lu\n", ValueName, ValueType, ValueLength); - DPRINT("ValueData '%S'\n", (PWSTR)ValueData); - - if (ValueType != REG_SZ) - { - return(STATUS_SUCCESS); - } - - /* Extract the description */ - p1 = wcschr((PWSTR)ValueData, L' '); - len = p1 - (PWSTR)ValueData; - memcpy(Description,ValueData, len * sizeof(WCHAR)); - Description[len] = 0; - - /* Extract the image name */ - p1++; - p2 = wcschr(p1, L' '); - if (p2 != NULL) - len = p2 - p1; - else - len = wcslen(p1); - memcpy(ImageName, p1, len * sizeof(WCHAR)); - ImageName[len] = 0; - - /* Extract the command line */ - if (p2 == NULL) - { - CommandLine[0] = 0; - } - else - { - p2++; - wcscpy(CommandLine, p2); - } - - DPRINT("Running %S...\n", Description); - DPRINT("ImageName: '%S'\n", ImageName); - DPRINT("CommandLine: '%S'\n", CommandLine); - - /* initialize executable path */ - wcscpy(ImagePath, L"\\SystemRoot\\system32\\"); - wcscat(ImagePath, ImageName); - wcscat(ImagePath, L".exe"); - - RtlInitUnicodeString(&ImagePathString, - ImagePath); - - RtlInitUnicodeString(&CommandLineString, - CommandLine); - - RtlCreateProcessParameters(&ProcessParameters, - &ImagePathString, - NULL, - NULL, - &CommandLineString, - NULL, - NULL, - NULL, - NULL, - NULL); - - Status = RtlCreateUserProcess(&ImagePathString, - OBJ_CASE_INSENSITIVE, - ProcessParameters, - NULL, - NULL, - NULL, - FALSE, - NULL, - NULL, - &ProcessInfo); - if (!NT_SUCCESS(Status)) - { - DPRINT1("Running %s failed (Status %lx)\n", Description, Status); - return(STATUS_SUCCESS); - } - - RtlDestroyProcessParameters(ProcessParameters); - - /* Wait for process termination */ - NtWaitForSingleObject(ProcessInfo.ProcessHandle, - FALSE, - NULL); - - NtClose(ProcessInfo.ThreadHandle); - NtClose(ProcessInfo.ProcessHandle); - - return(STATUS_SUCCESS); -} - - -/* - * Run native applications listed in the registry. - * - * Key: - * \Registry\Machine\SYSTEM\CurrentControlSet\Control\Session Manager - * - * Value (format: " ": - * BootExecute = "autocheck autochk *" - */ -static NTSTATUS -SmRunBootApps(VOID) -{ - RTL_QUERY_REGISTRY_TABLE QueryTable[2]; - NTSTATUS Status; - - RtlZeroMemory(&QueryTable, - sizeof(QueryTable)); - - QueryTable[0].Name = L"BootExecute"; - QueryTable[0].QueryRoutine = SmRunBootAppsQueryRoutine; - - Status = RtlQueryRegistryValues(RTL_REGISTRY_CONTROL, - L"\\Session Manager", - QueryTable, - NULL, - NULL); - if (!NT_SUCCESS(Status)) - { - DPRINT1("SmRunBootApps: RtlQueryRegistryValues() failed! (Status %lx)\n", Status); - } - - return(Status); -} - - -static NTSTATUS -SmProcessFileRenameList(VOID) -{ - DPRINT("SmProcessFileRenameList() called\n"); - - /* FIXME: implement it! */ - - DPRINT("SmProcessFileRenameList() done\n"); - - return(STATUS_SUCCESS); -} - - -static NTSTATUS STDCALL -SmKnownDllsQueryRoutine(PWSTR ValueName, - ULONG ValueType, - PVOID ValueData, - ULONG ValueLength, - PVOID Context, - PVOID EntryContext) -{ - OBJECT_ATTRIBUTES ObjectAttributes; - IO_STATUS_BLOCK IoStatusBlock; - UNICODE_STRING ImageName; - HANDLE FileHandle; - HANDLE SectionHandle; - NTSTATUS Status; - - DPRINT("ValueName '%S' Type %lu Length %lu\n", ValueName, ValueType, ValueLength); - DPRINT("ValueData '%S' Context %p EntryContext %p\n", (PWSTR)ValueData, Context, EntryContext); - - /* Ignore the 'DllDirectory' value */ - if (!_wcsicmp(ValueName, L"DllDirectory")) - return STATUS_SUCCESS; - - /* Open the DLL image file */ - RtlInitUnicodeString(&ImageName, - ValueData); - InitializeObjectAttributes(&ObjectAttributes, - &ImageName, - OBJ_CASE_INSENSITIVE, - (HANDLE)Context, - NULL); - Status = NtOpenFile(&FileHandle, - SYNCHRONIZE | FILE_EXECUTE, - &ObjectAttributes, - &IoStatusBlock, - FILE_SHARE_READ, - FILE_SYNCHRONOUS_IO_NONALERT | FILE_NON_DIRECTORY_FILE); - if (!NT_SUCCESS(Status)) - { - DPRINT1("NtOpenFile() failed (Status %lx)\n", Status); - return STATUS_SUCCESS; - } - - DPRINT("Opened file %wZ successfully\n", &ImageName); - - /* Check for valid image checksum */ - Status = LdrVerifyImageMatchesChecksum (FileHandle, - 0, - 0, - 0); - if (Status == STATUS_IMAGE_CHECKSUM_MISMATCH) - { - /* Raise a hard error (crash the system/BSOD) */ - NtRaiseHardError (Status, - 0, - 0, - 0, - 0, - 0); - } - else if (!NT_SUCCESS(Status)) - { - DPRINT1("Failed to check the image checksum\n"); - - NtClose(SectionHandle); - NtClose(FileHandle); - - return STATUS_SUCCESS; - } - - InitializeObjectAttributes(&ObjectAttributes, - &ImageName, - OBJ_CASE_INSENSITIVE | OBJ_PERMANENT, - (HANDLE)EntryContext, - NULL); - Status = NtCreateSection(&SectionHandle, - SECTION_ALL_ACCESS, - &ObjectAttributes, - NULL, - PAGE_EXECUTE, - SEC_IMAGE, - FileHandle); - if (NT_SUCCESS(Status)) - { - DPRINT("Created section successfully\n"); - NtClose(SectionHandle); - } - - NtClose(FileHandle); - - return STATUS_SUCCESS; -} - - -static NTSTATUS -SmLoadKnownDlls(VOID) -{ - RTL_QUERY_REGISTRY_TABLE QueryTable[2]; - OBJECT_ATTRIBUTES ObjectAttributes; - IO_STATUS_BLOCK IoStatusBlock; - UNICODE_STRING DllDosPath; - UNICODE_STRING DllNtPath; - UNICODE_STRING Name; - HANDLE ObjectDirHandle; - HANDLE FileDirHandle; - HANDLE SymlinkHandle; - NTSTATUS Status; - - DPRINT("SmLoadKnownDlls() called\n"); - - /* Create 'KnownDlls' object directory */ - RtlInitUnicodeString(&Name, - L"\\KnownDlls"); - InitializeObjectAttributes(&ObjectAttributes, - &Name, - OBJ_PERMANENT | OBJ_CASE_INSENSITIVE | OBJ_OPENIF, - NULL, - NULL); - Status = NtCreateDirectoryObject(&ObjectDirHandle, - DIRECTORY_ALL_ACCESS, - &ObjectAttributes); - if (!NT_SUCCESS(Status)) - { - DPRINT1("NtCreateDirectoryObject() failed (Status %lx)\n", Status); - return Status; - } - - RtlInitUnicodeString(&DllDosPath, NULL); - - RtlZeroMemory(&QueryTable, - sizeof(QueryTable)); - - QueryTable[0].Name = L"DllDirectory"; - QueryTable[0].Flags = RTL_QUERY_REGISTRY_DIRECT; - QueryTable[0].EntryContext = &DllDosPath; - - Status = RtlQueryRegistryValues(RTL_REGISTRY_CONTROL, - L"\\Session Manager\\KnownDlls", - QueryTable, - NULL, - SmSystemEnvironment); - if (!NT_SUCCESS(Status)) - { - DPRINT1("RtlQueryRegistryValues() failed (Status %lx)\n", Status); - return Status; - } - - DPRINT("DllDosPath: '%wZ'\n", &DllDosPath); - - if (!RtlDosPathNameToNtPathName_U(DllDosPath.Buffer, - &DllNtPath, - NULL, - NULL)) - { - DPRINT1("RtlDosPathNameToNtPathName_U() failed\n"); - return STATUS_OBJECT_NAME_INVALID; - } - - DPRINT("DllNtPath: '%wZ'\n", &DllNtPath); - - /* Open the dll path directory */ - InitializeObjectAttributes(&ObjectAttributes, - &DllNtPath, - OBJ_CASE_INSENSITIVE, - NULL, - NULL); - Status = NtOpenFile(&FileDirHandle, - SYNCHRONIZE | FILE_READ_DATA, - &ObjectAttributes, - &IoStatusBlock, - FILE_SHARE_READ | FILE_SHARE_WRITE, - FILE_SYNCHRONOUS_IO_NONALERT | FILE_DIRECTORY_FILE); - if (!NT_SUCCESS(Status)) - { - DPRINT1("NtOpenFile(%wZ) failed (Status %lx)\n", &DllNtPath, Status); - return Status; - } - - /* Link 'KnownDllPath' the dll path directory */ - RtlInitUnicodeString(&Name, - L"KnownDllPath"); - InitializeObjectAttributes(&ObjectAttributes, - &Name, - OBJ_PERMANENT | OBJ_CASE_INSENSITIVE | OBJ_OPENIF, - ObjectDirHandle, - NULL); - Status = NtCreateSymbolicLinkObject(&SymlinkHandle, - SYMBOLIC_LINK_ALL_ACCESS, - &ObjectAttributes, - &DllDosPath); - if (!NT_SUCCESS(Status)) - { - DPRINT1("NtCreateSymbolicLink() failed (Status %lx)\n", Status); - return Status; - } - - NtClose(SymlinkHandle); - - RtlZeroMemory(&QueryTable, - sizeof(QueryTable)); - - QueryTable[0].QueryRoutine = SmKnownDllsQueryRoutine; - QueryTable[0].EntryContext = ObjectDirHandle; - - Status = RtlQueryRegistryValues(RTL_REGISTRY_CONTROL, - L"\\Session Manager\\KnownDlls", - QueryTable, - (PVOID)FileDirHandle, - NULL); - if (!NT_SUCCESS(Status)) - { - DPRINT1("RtlQueryRegistryValues() failed (Status %lx)\n", Status); - } - - DPRINT("SmLoadKnownDlls() done\n"); - - return Status; -} - - -static NTSTATUS STDCALL -SmPagingFilesQueryRoutine(PWSTR ValueName, - ULONG ValueType, - PVOID ValueData, - ULONG ValueLength, - PVOID Context, - PVOID EntryContext) -{ - UNICODE_STRING FileName; - LARGE_INTEGER InitialSize; - LARGE_INTEGER MaximumSize; - NTSTATUS Status; - LPWSTR p; - - DPRINT("ValueName '%S' Type %lu Length %lu\n", ValueName, ValueType, ValueLength); - DPRINT("ValueData '%S'\n", (PWSTR)ValueData); - - if (ValueType != REG_SZ) - { - return(STATUS_SUCCESS); - } - - /* - * Format: "[ [ ]]" - */ - if ((p = wcschr(ValueData, ' ')) != NULL) - { - *p = L'\0'; - InitialSize.QuadPart = wcstoul(p + 1, &p, 0) * 256 * 4096; - if (*p == ' ') - { - MaximumSize.QuadPart = wcstoul(p + 1, NULL, 0) * 256 * 4096; - } - else - MaximumSize = InitialSize; - } - else - { - InitialSize.QuadPart = 50 * 4096; - MaximumSize.QuadPart = 80 * 4096; - } - - if (!RtlDosPathNameToNtPathName_U ((LPWSTR)ValueData, - &FileName, - NULL, - NULL)) - { - return (STATUS_SUCCESS); - } - - DPRINT("SMSS: Created paging file %wZ with size %dKB\n", - &FileName, InitialSize.QuadPart / 1024); - Status = NtCreatePagingFile(&FileName, - &InitialSize, - &MaximumSize, - 0); - - RtlFreeUnicodeString(&FileName); - - return(STATUS_SUCCESS); -} - - -static NTSTATUS -SmCreatePagingFiles(VOID) -{ - RTL_QUERY_REGISTRY_TABLE QueryTable[2]; - NTSTATUS Status; - - /* - * Disable paging file on MiniNT/Live CD. - */ - if (RtlCheckRegistryKey(RTL_REGISTRY_CONTROL, L"MiniNT") == STATUS_SUCCESS) - { - return STATUS_SUCCESS; - } - - RtlZeroMemory(&QueryTable, - sizeof(QueryTable)); - - QueryTable[0].Name = L"PagingFiles"; - QueryTable[0].QueryRoutine = SmPagingFilesQueryRoutine; - - Status = RtlQueryRegistryValues(RTL_REGISTRY_CONTROL, - L"\\Session Manager\\Memory Management", - QueryTable, - NULL, - NULL); - - return(Status); -} - - -static NTSTATUS STDCALL -SmEnvironmentQueryRoutine(PWSTR ValueName, - ULONG ValueType, - PVOID ValueData, - ULONG ValueLength, - PVOID Context, - PVOID EntryContext) -{ - UNICODE_STRING EnvVariable; - UNICODE_STRING EnvValue; - - DPRINT("ValueName '%S' Type %lu Length %lu\n", ValueName, ValueType, ValueLength); - DPRINT("ValueData '%S'\n", (PWSTR)ValueData); - - if (ValueType != REG_SZ) - { - return(STATUS_SUCCESS); - } - - RtlInitUnicodeString(&EnvVariable, - ValueName); - RtlInitUnicodeString(&EnvValue, - (PWSTR)ValueData); - RtlSetEnvironmentVariable(Context, - &EnvVariable, - &EnvValue); - - return(STATUS_SUCCESS); -} - - -static NTSTATUS -SmSetEnvironmentVariables(VOID) -{ - RTL_QUERY_REGISTRY_TABLE QueryTable[2]; - UNICODE_STRING EnvVariable; - UNICODE_STRING EnvValue; - WCHAR ValueBuffer[MAX_PATH]; - NTSTATUS Status; - - /* - * The following environment variables must be set prior to reading - * other variables from the registry. - * - * Variables (example): - * SystemRoot = "C:\reactos" - * SystemDrive = "C:" - */ - - /* Copy system root into value buffer */ - wcscpy(ValueBuffer, - SharedUserData->NtSystemRoot); - - /* Set SystemRoot = "C:\reactos" */ - RtlRosInitUnicodeStringFromLiteral(&EnvVariable, - L"SystemRoot"); - RtlInitUnicodeString(&EnvValue, - ValueBuffer); - RtlSetEnvironmentVariable(&SmSystemEnvironment, - &EnvVariable, - &EnvValue); - - /* Cut off trailing path */ - ValueBuffer[2] = 0; - - /* Set SystemDrive = "C:" */ - RtlRosInitUnicodeStringFromLiteral(&EnvVariable, - L"SystemDrive"); - RtlInitUnicodeString(&EnvValue, - ValueBuffer); - RtlSetEnvironmentVariable(&SmSystemEnvironment, - &EnvVariable, - &EnvValue); - - /* Read system environment from the registry. */ - RtlZeroMemory(&QueryTable, - sizeof(QueryTable)); - - QueryTable[0].QueryRoutine = SmEnvironmentQueryRoutine; - - Status = RtlQueryRegistryValues(RTL_REGISTRY_CONTROL, - L"\\Session Manager\\Environment", - QueryTable, - &SmSystemEnvironment, - SmSystemEnvironment); - - return(Status); -} - - -static NTSTATUS -SmLoadSubsystems(VOID) -{ - SYSTEM_LOAD_AND_CALL_IMAGE ImageInfo; - NTSTATUS Status; - - /* Load kernel mode subsystem (aka win32k.sys) */ - RtlRosInitUnicodeStringFromLiteral(&ImageInfo.ModuleName, - L"\\SystemRoot\\system32\\win32k.sys"); - - Status = NtSetSystemInformation(SystemLoadAndCallImage, - &ImageInfo, - sizeof(SYSTEM_LOAD_AND_CALL_IMAGE)); - - DPRINT("SMSS: Loaded win32k.sys (Status %lx)\n", Status); -#if 0 - if (!NT_SUCCESS(Status)) - { - return(Status); - } -#endif - - /* FIXME: load more subsystems (csrss!) */ - - return(Status); -} - - -static VOID -SignalInitEvent() +SmpSignalInitEvent(VOID) { NTSTATUS Status; OBJECT_ATTRIBUTES ObjectAttributes; @@ -809,270 +67,59 @@ SignalInitEvent() /* We don't really care if this fails */ DPRINT1("SM: Failed to open ReactOS init notification event\n"); } + return Status; } +typedef NTSTATUS (* SM_INIT_ROUTINE)(VOID); + +struct { + BOOL Required; + SM_INIT_ROUTINE EntryPoint; + PCHAR ErrorMessage; +} InitRoutine [] = { + {TRUE, SmCreateHeap, "create private heap, aborting"}, + {TRUE, SmCreateObjectDirectories, "create object directories"}, + {TRUE, SmCreateApiPort, "create \\SmApiPort"}, + {TRUE, SmCreateEnvironment, "create the system environment"}, + {TRUE, SmSetEnvironmentVariables, "set system environment variables"}, + {TRUE, SmInitDosDevices, "create dos device links"}, + {TRUE, SmRunBootApplications, "run boot applications"}, + {TRUE, SmProcessFileRenameList, "process the file rename list"}, + {FALSE, SmLoadKnownDlls, "preload system DLLs"}, + {TRUE, SmCreatePagingFiles, "create paging files"}, + {TRUE, SmInitializeRegistry, "initialize the registry"}, + {FALSE, SmUpdateEnvironment, "update environment variables"}, + {TRUE, SmInitializeClientManagement, "initialize client management"}, + {TRUE, SmLoadSubsystems, "load subsystems"}, + {FALSE, SmpSignalInitEvent, "open ReactOS init notification event"}, + {TRUE, SmRunCsrss, "run csrss"}, + {TRUE, SmRunWinlogon, "run winlogon"}, + {TRUE, SmInitializeDbgSs, "initialize DbgSs"} +}; NTSTATUS InitSessionManager(HANDLE Children[]) { + int i; NTSTATUS Status; - UNICODE_STRING UnicodeString; - OBJECT_ATTRIBUTES ObjectAttributes; - PRTL_USER_PROCESS_PARAMETERS ProcessParameters; - RTL_PROCESS_INFO ProcessInfo; - HANDLE CsrssInitEvent; - WCHAR UnicodeBuffer[MAX_PATH]; - /* Create our own heap */ - SmpHeap = RtlCreateHeap(HEAP_GROWABLE, - NULL, - 65536, - 65536, - NULL, - NULL); - if (NULL == SmpHeap) + for (i=0; i < (sizeof InitRoutine / sizeof InitRoutine[0]); i++) + { + Status = InitRoutine[i].EntryPoint(); + if(!NT_SUCCESS(Status)) { - DbgPrint("SMSS: %s: failed to create private heap, aborting\n",__FUNCTION__); - return STATUS_UNSUCCESSFUL; + DPRINT1("SM: %s: failed to %s (Status=%lx)\n", + __FUNCTION__, + InitRoutine[i].ErrorMessage, + Status); + if (InitRoutine[i].Required) + { + return(Status); + } } + } - /* Create object directories */ - Status = SmCreateObjectDirectories(); - if (!NT_SUCCESS(Status)) - { - DPRINT1("SM: Failed to create object directories (Status %lx)\n", Status); - return(Status); - } - - /* Create the \SmApiPort object (LPC) */ - Status = SmpCreateApiPort(); - if (!NT_SUCCESS(Status)) - { - DPRINT1("SM: Failed to create SmApiPort (Status %lx)\n", Status); - return(Status); - } - - /* Create the system environment */ - Status = RtlCreateEnvironment(FALSE, - &SmSystemEnvironment); - if (!NT_SUCCESS(Status)) - { - DPRINT1("SM: Failed to create the system environment (Status %lx)\n", Status); - return(Status); - } - - /* Set environment variables */ - Status = SmSetEnvironmentVariables(); - if (!NT_SUCCESS(Status)) - { - DPRINT1("SM: Failed to set system environment variables (Status %lx)\n", Status); - return(Status); - } - - /* Define symbolic links to kernel devices (MS-DOS names) */ - Status = SmInitDosDevices(); - if (!NT_SUCCESS(Status)) - { - DPRINT1("SM: Failed to create dos device links (Status %lx)\n", Status); - return(Status); - } - - /* Run all programs in the boot execution list */ - Status = SmRunBootApps(); - if (!NT_SUCCESS(Status)) - { - DPRINT1("SM: Failed to run boot applications (Status %lx)\n", Status); - return(Status); - } - - /* Process the file rename list */ - Status = SmProcessFileRenameList(); - if (!NT_SUCCESS(Status)) - { - DPRINT1("SM: Failed to process the file rename list (Status %lx)\n", Status); - return(Status); - } - - DPRINT("SM: loading well-known DLLs\n"); - - /* Load the well known DLLs */ - Status = SmLoadKnownDlls(); - if (!NT_SUCCESS(Status)) - { - DPRINT1("SM: Failed to preload system DLLs (Status %lx)\n", Status); - /* Don't crash ReactOS if DLLs cannot be loaded */ - } - - DPRINT("SM: creating system paging files\n"); - - /* Create paging files */ - Status = SmCreatePagingFiles(); - if (!NT_SUCCESS(Status)) - { - DPRINT1("SM: Failed to create paging files (Status %lx)\n", Status); - return(Status); - } - - DPRINT("SM: initializing registry\n"); - - /* Load remaining registry hives */ - NtInitializeRegistry(FALSE); - - /* Set environment variables from registry */ -#if 0 - Status = SmUpdateEnvironment(); - if (!NT_SUCCESS(Status)) - { - DPRINT1("SM: Failed to update environment variables (Status %lx)\n", Status); - return(Status); - } -#endif - - /* - * Initialize SM client management: - * this MUST be done before any - * subsystem server is run. - */ - SmpInitializeClientManagement(); - - DPRINT("SM: loading subsystems\n"); - - /* Load the subsystems */ - Status = SmLoadSubsystems(); - if (!NT_SUCCESS(Status)) - { - DPRINT1("SM: Failed to load subsystems (Status %lx)\n", Status); - return(Status); - } - - - SignalInitEvent(); - - - DPRINT("SM: initializing csrss\n"); - - /* Run csrss.exe */ - RtlRosInitUnicodeStringFromLiteral(&UnicodeString, - L"\\CsrssInitDone"); - InitializeObjectAttributes(&ObjectAttributes, - &UnicodeString, - EVENT_ALL_ACCESS, - 0, - NULL); - Status = NtCreateEvent(&CsrssInitEvent, - EVENT_ALL_ACCESS, - &ObjectAttributes, - NotificationEvent, - FALSE); - if (!NT_SUCCESS(Status)) - { - DbgPrint("Failed to create csrss notification event\n"); - } - - /* - * Start the Win32 subsystem (csrss.exe) - */ - - /* initialize executable path */ - wcscpy(UnicodeBuffer, L"\\??\\"); - wcscat(UnicodeBuffer, SharedUserData->NtSystemRoot); - wcscat(UnicodeBuffer, L"\\system32\\csrss.exe"); - RtlInitUnicodeString(&UnicodeString, - UnicodeBuffer); - - RtlCreateProcessParameters(&ProcessParameters, - &UnicodeString, - NULL, - NULL, - NULL, - SmSystemEnvironment, - NULL, - NULL, - NULL, - NULL); - - Status = RtlCreateUserProcess(&UnicodeString, - OBJ_CASE_INSENSITIVE, - ProcessParameters, - NULL, - NULL, - NULL, - FALSE, - NULL, - NULL, - &ProcessInfo); - - RtlDestroyProcessParameters (ProcessParameters); - - if (!NT_SUCCESS(Status)) - { - DisplayString(L"SM: Loading csrss.exe failed!\n"); - return(Status); - } - - NtWaitForSingleObject(CsrssInitEvent, - FALSE, - NULL); - - Children[CHILD_CSRSS] = ProcessInfo.ProcessHandle; - - /* - * Start the logon process (winlogon.exe) - */ - - DPRINT("SM: starting winlogon\n"); - - /* initialize executable path */ - wcscpy(UnicodeBuffer, L"\\??\\"); - wcscat(UnicodeBuffer, SharedUserData->NtSystemRoot); - wcscat(UnicodeBuffer, L"\\system32\\winlogon.exe"); - RtlInitUnicodeString(&UnicodeString, - UnicodeBuffer); - - RtlCreateProcessParameters(&ProcessParameters, - &UnicodeString, - NULL, - NULL, - NULL, - SmSystemEnvironment, - NULL, - NULL, - NULL, - NULL); - - Status = RtlCreateUserProcess(&UnicodeString, - OBJ_CASE_INSENSITIVE, - ProcessParameters, - NULL, - NULL, - NULL, - FALSE, - NULL, - NULL, - &ProcessInfo); - - RtlDestroyProcessParameters(ProcessParameters); - - if (!NT_SUCCESS(Status)) - { - DisplayString(L"SM: Loading winlogon.exe failed!\n"); - NtTerminateProcess(Children[CHILD_CSRSS], - 0); - return(Status); - } - Children[CHILD_WINLOGON] = ProcessInfo.ProcessHandle; - - /* Initialize the DBGSS */ - Status = SmpInitializeDbgSs(); - if (!NT_SUCCESS(Status)) - { - DisplayString(L"SM: DbgSs initialization failed!\n"); - NtTerminateProcess(Children[CHILD_WINLOGON],0); - NtTerminateProcess(Children[CHILD_CSRSS],0); - return(Status); - } - return(STATUS_SUCCESS); } diff --git a/reactos/subsys/smss/initdosdev.c b/reactos/subsys/smss/initdosdev.c new file mode 100644 index 00000000000..7103ff6cf88 --- /dev/null +++ b/reactos/subsys/smss/initdosdev.c @@ -0,0 +1,109 @@ +/* $Id: init.c 13449 2005-02-06 21:55:07Z ea $ + * + * initdosdev.c - Define symbolic links to kernel devices (MS-DOS names) + * + * ReactOS Operating System + * + * -------------------------------------------------------------------- + * + * This software is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This software 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 + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING.LIB. If not, write + * to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, + * MA 02139, USA. + * + * -------------------------------------------------------------------- + */ + +#include "smss.h" + +//#define NDEBUG +#include + +static NTSTATUS STDCALL +SmpDosDevicesQueryRoutine(PWSTR ValueName, + ULONG ValueType, + PVOID ValueData, + ULONG ValueLength, + PVOID Context, + PVOID EntryContext) +{ + OBJECT_ATTRIBUTES ObjectAttributes; + UNICODE_STRING DeviceName; + UNICODE_STRING LinkName; + HANDLE LinkHandle; + WCHAR LinkBuffer[80]; + NTSTATUS Status; + + DPRINT("ValueName '%S' Type %lu Length %lu\n", ValueName, ValueType, ValueLength); + DPRINT("ValueData '%S'\n", (PWSTR)ValueData); + + if (ValueType != REG_SZ) + { + return(STATUS_SUCCESS); + } + + swprintf(LinkBuffer, + L"\\??\\%s", + ValueName); + RtlInitUnicodeString(&LinkName, + LinkBuffer); + RtlInitUnicodeString(&DeviceName, + (PWSTR)ValueData); + + DPRINT("SM: Linking %wZ --> %wZ\n", + &LinkName, + &DeviceName); + + /* create symbolic link */ + InitializeObjectAttributes(&ObjectAttributes, + &LinkName, + OBJ_PERMANENT, + NULL, + NULL); + Status = NtCreateSymbolicLinkObject(&LinkHandle, + SYMBOLIC_LINK_ALL_ACCESS, + &ObjectAttributes, + &DeviceName); + if (!NT_SUCCESS(Status)) + { + DPRINT1("%s: NtCreateSymbolicLink( %wZ --> %wZ ) failed!\n", + __FUNCTION__, + &LinkName, + &DeviceName); + } + NtClose(LinkHandle); + + return(Status); +} + + +NTSTATUS +SmInitDosDevices(VOID) +{ + RTL_QUERY_REGISTRY_TABLE QueryTable[2]; + NTSTATUS Status; + + RtlZeroMemory(&QueryTable, + sizeof(QueryTable)); + + QueryTable[0].QueryRoutine = SmpDosDevicesQueryRoutine; + + Status = RtlQueryRegistryValues(RTL_REGISTRY_CONTROL, + L"\\Session Manager\\DOS Devices", + QueryTable, + NULL, + NULL); + return(Status); +} + +/* EOF */ diff --git a/reactos/subsys/smss/initenv.c b/reactos/subsys/smss/initenv.c new file mode 100644 index 00000000000..e9d51357cdf --- /dev/null +++ b/reactos/subsys/smss/initenv.c @@ -0,0 +1,139 @@ +/* $Id: init.c 13449 2005-02-06 21:55:07Z ea $ + * + * initenv.c - Environment initialization + * + * ReactOS Operating System + * + * -------------------------------------------------------------------- + * + * This software is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This software 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 + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING.LIB. If not, write + * to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, + * MA 02139, USA. + * + * -------------------------------------------------------------------- + */ + +#include "smss.h" + +//#define NDEBUG +#include + +/* GLOBALS */ + +PWSTR SmSystemEnvironment = NULL; + + +/* FUNCTIONS */ + +NTSTATUS +SmCreateEnvironment(VOID) +{ + return RtlCreateEnvironment(FALSE, &SmSystemEnvironment); +} + + +static NTSTATUS +SmpSetEnvironmentVariable(PVOID Context, + PWSTR ValueName, + PVOID ValueData) +{ + UNICODE_STRING EnvVariable; + UNICODE_STRING EnvValue; + + RtlInitUnicodeString(&EnvVariable, + ValueName); + RtlInitUnicodeString(&EnvValue, + (PWSTR)ValueData); + RtlSetEnvironmentVariable(Context, + &EnvVariable, + &EnvValue); + + return(STATUS_SUCCESS); +} + + +static NTSTATUS STDCALL +SmpEnvironmentQueryRoutine(PWSTR ValueName, + ULONG ValueType, + PVOID ValueData, + ULONG ValueLength, + PVOID Context, + PVOID EntryContext) +{ + DPRINT("ValueName '%S' Type %lu Length %lu\n", ValueName, ValueType, ValueLength); + DPRINT("ValueData '%S'\n", (PWSTR)ValueData); + + if (ValueType != REG_SZ) + { + return(STATUS_SUCCESS); + } + return SmpSetEnvironmentVariable(Context,ValueName,ValueData); +} + + +NTSTATUS +SmSetEnvironmentVariables(VOID) +{ + RTL_QUERY_REGISTRY_TABLE QueryTable[2]; + WCHAR ValueBuffer[MAX_PATH]; + NTSTATUS Status; + + /* + * The following environment variables must be set prior to reading + * other variables from the registry. + * + * Variables (example): + * SystemRoot = "C:\reactos" + * SystemDrive = "C:" + */ + + /* Copy system root into value buffer */ + wcscpy(ValueBuffer, + SharedUserData->NtSystemRoot); + + /* Set SystemRoot = "C:\reactos" */ + SmpSetEnvironmentVariable(&SmSystemEnvironment,L"SystemRoot",ValueBuffer); + + /* Cut off trailing path */ + ValueBuffer[2] = 0; + + /* Set SystemDrive = "C:" */ + SmpSetEnvironmentVariable(&SmSystemEnvironment,L"SystemDrive",ValueBuffer); + + /* Read system environment from the registry. */ + RtlZeroMemory(&QueryTable, + sizeof(QueryTable)); + + QueryTable[0].QueryRoutine = SmpEnvironmentQueryRoutine; + + Status = RtlQueryRegistryValues(RTL_REGISTRY_CONTROL, + L"\\Session Manager\\Environment", + QueryTable, + &SmSystemEnvironment, + SmSystemEnvironment); + + return(Status); +} + +/********************************************************************** + * Set environment variables from registry + */ +NTSTATUS +SmUpdateEnvironment(VOID) +{ + /* TODO */ + return STATUS_SUCCESS; +} + +/* EOF */ diff --git a/reactos/subsys/smss/initheap.c b/reactos/subsys/smss/initheap.c new file mode 100644 index 00000000000..3d5ec194850 --- /dev/null +++ b/reactos/subsys/smss/initheap.c @@ -0,0 +1,47 @@ +/* $Id: init.c 13449 2005-02-06 21:55:07Z ea $ + * + * initenv.c - Create the SM private heap + * + * ReactOS Operating System + * + * -------------------------------------------------------------------- + * + * This software is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This software 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 + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING.LIB. If not, write + * to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, + * MA 02139, USA. + * + * -------------------------------------------------------------------- + */ + +#include "smss.h" + +//#define NDEBUG +#include + +HANDLE SmpHeap = NULL; + +NTSTATUS +SmCreateHeap(VOID) +{ + /* Create our own heap */ + SmpHeap = RtlCreateHeap(HEAP_GROWABLE, + NULL, + 65536, + 65536, + NULL, + NULL); + return (NULL == SmpHeap) ? STATUS_UNSUCCESSFUL : STATUS_SUCCESS; +} + +/* EOF */ diff --git a/reactos/subsys/smss/initmv.c b/reactos/subsys/smss/initmv.c new file mode 100644 index 00000000000..71878f88960 --- /dev/null +++ b/reactos/subsys/smss/initmv.c @@ -0,0 +1,44 @@ +/* $Id: init.c 13449 2005-02-06 21:55:07Z ea $ + * + * initmv.c - Process the file rename list + * + * ReactOS Operating System + * + * -------------------------------------------------------------------- + * + * This software is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This software 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 + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING.LIB. If not, write + * to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, + * MA 02139, USA. + * + * -------------------------------------------------------------------- + */ + +#include "smss.h" + +//#define NDEBUG +#include + +NTSTATUS +SmProcessFileRenameList(VOID) +{ + DPRINT("SmProcessFileRenameList() called\n"); + + /* FIXME: implement it! */ + + DPRINT("SmProcessFileRenameList() done\n"); + + return(STATUS_SUCCESS); +} + +/* EOF */ diff --git a/reactos/subsys/smss/initobdir.c b/reactos/subsys/smss/initobdir.c new file mode 100644 index 00000000000..8557051eed6 --- /dev/null +++ b/reactos/subsys/smss/initobdir.c @@ -0,0 +1,93 @@ +/* $Id: init.c 13449 2005-02-06 21:55:07Z ea $ + * + * initobdir.c - Session Manager object directories + * + * ReactOS Operating System + * + * -------------------------------------------------------------------- + * + * This software is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This software 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 + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING.LIB. If not, write + * to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, + * MA 02139, USA. + * + * -------------------------------------------------------------------- + */ + + +#include "smss.h" + +//#define NDEBUG +#include + +static NTSTATUS STDCALL +SmpObjectDirectoryQueryRoutine(PWSTR ValueName, + ULONG ValueType, + PVOID ValueData, + ULONG ValueLength, + PVOID Context, + PVOID EntryContext) +{ + OBJECT_ATTRIBUTES ObjectAttributes; + UNICODE_STRING UnicodeString; + HANDLE WindowsDirectory; + NTSTATUS Status = STATUS_SUCCESS; + +#ifndef NDEBUG + DbgPrint("ValueName '%S' Type %lu Length %lu\n", ValueName, ValueType, ValueLength); + DbgPrint("ValueData '%S'\n", (PWSTR)ValueData); +#endif + if (ValueType != REG_SZ) + { + return(STATUS_SUCCESS); + } + + RtlInitUnicodeString(&UnicodeString, + (PWSTR)ValueData); + + InitializeObjectAttributes(&ObjectAttributes, + &UnicodeString, + 0, + NULL, + NULL); + + Status = ZwCreateDirectoryObject(&WindowsDirectory, + 0, + &ObjectAttributes); + + return(Status); +} + + +NTSTATUS +SmCreateObjectDirectories(VOID) +{ + RTL_QUERY_REGISTRY_TABLE QueryTable[2]; + NTSTATUS Status; + + RtlZeroMemory(&QueryTable, + sizeof(QueryTable)); + + QueryTable[0].Name = L"ObjectDirectories"; + QueryTable[0].QueryRoutine = SmpObjectDirectoryQueryRoutine; + + Status = RtlQueryRegistryValues(RTL_REGISTRY_CONTROL, + L"\\Session Manager", + QueryTable, + NULL, + NULL); + + return(Status); +} + +/* EOF */ diff --git a/reactos/subsys/smss/initpage.c b/reactos/subsys/smss/initpage.c new file mode 100644 index 00000000000..c5e17859f57 --- /dev/null +++ b/reactos/subsys/smss/initpage.c @@ -0,0 +1,127 @@ +/* $Id: init.c 13449 2005-02-06 21:55:07Z ea $ + * + * initpage.c - + * + * ReactOS Operating System + * + * -------------------------------------------------------------------- + * + * This software is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This software 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 + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING.LIB. If not, write + * to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, + * MA 02139, USA. + * + * -------------------------------------------------------------------- + */ +#include "smss.h" +#include +#include + +//#define NDEBUG +#include + +static NTSTATUS STDCALL +SmpPagingFilesQueryRoutine(PWSTR ValueName, + ULONG ValueType, + PVOID ValueData, + ULONG ValueLength, + PVOID Context, + PVOID EntryContext) +{ + UNICODE_STRING FileName; + LARGE_INTEGER InitialSize; + LARGE_INTEGER MaximumSize; + NTSTATUS Status; + LPWSTR p; + + DPRINT("ValueName '%S' Type %lu Length %lu\n", ValueName, ValueType, ValueLength); + DPRINT("ValueData '%S'\n", (PWSTR)ValueData); + + if (ValueType != REG_SZ) + { + return(STATUS_SUCCESS); + } + + /* + * Format: "[ [ ]]" + */ + if ((p = wcschr(ValueData, ' ')) != NULL) + { + *p = L'\0'; + InitialSize.QuadPart = wcstoul(p + 1, &p, 0) * 256 * 4096; + if (*p == ' ') + { + MaximumSize.QuadPart = wcstoul(p + 1, NULL, 0) * 256 * 4096; + } + else + MaximumSize = InitialSize; + } + else + { + InitialSize.QuadPart = 50 * 4096; + MaximumSize.QuadPart = 80 * 4096; + } + + if (!RtlDosPathNameToNtPathName_U ((LPWSTR)ValueData, + &FileName, + NULL, + NULL)) + { + return (STATUS_SUCCESS); + } + + DPRINT("SMSS: Created paging file %wZ with size %dKB\n", + &FileName, InitialSize.QuadPart / 1024); + Status = NtCreatePagingFile(&FileName, + &InitialSize, + &MaximumSize, + 0); + + RtlFreeUnicodeString(&FileName); + + return(STATUS_SUCCESS); +} + + +NTSTATUS +SmCreatePagingFiles(VOID) +{ + RTL_QUERY_REGISTRY_TABLE QueryTable[2]; + NTSTATUS Status; + + DPRINT("SM: creating system paging files\n"); + /* + * Disable paging file on MiniNT/Live CD. + */ + if (RtlCheckRegistryKey(RTL_REGISTRY_CONTROL, L"MiniNT") == STATUS_SUCCESS) + { + return STATUS_SUCCESS; + } + + RtlZeroMemory(&QueryTable, + sizeof(QueryTable)); + + QueryTable[0].Name = L"PagingFiles"; + QueryTable[0].QueryRoutine = SmpPagingFilesQueryRoutine; + + Status = RtlQueryRegistryValues(RTL_REGISTRY_CONTROL, + L"\\Session Manager\\Memory Management", + QueryTable, + NULL, + NULL); + + return(Status); +} + + +/* EOF */ diff --git a/reactos/subsys/smss/initreg.c b/reactos/subsys/smss/initreg.c new file mode 100644 index 00000000000..7feab51768f --- /dev/null +++ b/reactos/subsys/smss/initreg.c @@ -0,0 +1,41 @@ +/* $Id: init.c 13449 2005-02-06 21:55:07Z ea $ + * + * initenv.c - Environment initialization + * + * ReactOS Operating System + * + * -------------------------------------------------------------------- + * + * This software is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This software 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 + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING.LIB. If not, write + * to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, + * MA 02139, USA. + * + * -------------------------------------------------------------------- + */ + +#include "smss.h" + +//#define NDEBUG +#include + +NTSTATUS +SmInitializeRegistry(VOID) +{ + DPRINT("SM: %s: initializing registry\n", __FUNCTION__); + + /* Load remaining registry hives */ + return NtInitializeRegistry(FALSE); +} + +/* EOF */ diff --git a/reactos/subsys/smss/initrun.c b/reactos/subsys/smss/initrun.c new file mode 100644 index 00000000000..eb096462b7e --- /dev/null +++ b/reactos/subsys/smss/initrun.c @@ -0,0 +1,183 @@ +/* $Id: init.c 13449 2005-02-06 21:55:07Z ea $ + * + * initrun.c - Run all programs in the boot execution list + * + * ReactOS Operating System + * + * -------------------------------------------------------------------- + * + * This software is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This software 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 + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING.LIB. If not, write + * to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, + * MA 02139, USA. + * + * -------------------------------------------------------------------- + */ + +#include "smss.h" + +//#define NDEBUG +#include + +HANDLE Children[2] = {0, 0}; /* csrss, winlogon */ + + +static NTSTATUS STDCALL +SmpRunBootAppsQueryRoutine(PWSTR ValueName, + ULONG ValueType, + PVOID ValueData, + ULONG ValueLength, + PVOID Context, + PVOID EntryContext) +{ + PRTL_USER_PROCESS_PARAMETERS ProcessParameters; + RTL_PROCESS_INFO ProcessInfo; + UNICODE_STRING ImagePathString; + UNICODE_STRING CommandLineString; + WCHAR Description[256]; + WCHAR ImageName[256]; + WCHAR ImagePath[256]; + WCHAR CommandLine[256]; + PWSTR p1, p2; + ULONG len; + NTSTATUS Status; + + DPRINT("ValueName '%S' Type %lu Length %lu\n", ValueName, ValueType, ValueLength); + DPRINT("ValueData '%S'\n", (PWSTR)ValueData); + + if (ValueType != REG_SZ) + { + return(STATUS_SUCCESS); + } + + /* Extract the description */ + p1 = wcschr((PWSTR)ValueData, L' '); + len = p1 - (PWSTR)ValueData; + memcpy(Description,ValueData, len * sizeof(WCHAR)); + Description[len] = 0; + + /* Extract the image name */ + p1++; + p2 = wcschr(p1, L' '); + if (p2 != NULL) + len = p2 - p1; + else + len = wcslen(p1); + memcpy(ImageName, p1, len * sizeof(WCHAR)); + ImageName[len] = 0; + + /* Extract the command line */ + if (p2 == NULL) + { + CommandLine[0] = 0; + } + else + { + p2++; + wcscpy(CommandLine, p2); + } + + DPRINT("Running %S...\n", Description); + DPRINT("ImageName: '%S'\n", ImageName); + DPRINT("CommandLine: '%S'\n", CommandLine); + + /* initialize executable path */ + wcscpy(ImagePath, L"\\SystemRoot\\system32\\"); + wcscat(ImagePath, ImageName); + wcscat(ImagePath, L".exe"); + + RtlInitUnicodeString(&ImagePathString, + ImagePath); + + RtlInitUnicodeString(&CommandLineString, + CommandLine); + + RtlCreateProcessParameters(&ProcessParameters, + &ImagePathString, + NULL, + NULL, + &CommandLineString, + NULL, + NULL, + NULL, + NULL, + NULL); + + Status = RtlCreateUserProcess(&ImagePathString, + OBJ_CASE_INSENSITIVE, + ProcessParameters, + NULL, + NULL, + NULL, + FALSE, + NULL, + NULL, + &ProcessInfo); + if (!NT_SUCCESS(Status)) + { + DPRINT1("Running %s failed (Status %lx)\n", Description, Status); + return(STATUS_SUCCESS); + } + + RtlDestroyProcessParameters(ProcessParameters); + + /* Wait for process termination */ + NtWaitForSingleObject(ProcessInfo.ProcessHandle, + FALSE, + NULL); + + NtClose(ProcessInfo.ThreadHandle); + NtClose(ProcessInfo.ProcessHandle); + + return(STATUS_SUCCESS); +} + + +/* + * Run native applications listed in the registry. + * + * Key: + * \Registry\Machine\SYSTEM\CurrentControlSet\Control\Session Manager + * + * Value (format: " ": + * BootExecute = "autocheck autochk *" + */ +NTSTATUS +SmRunBootApplications(VOID) +{ + RTL_QUERY_REGISTRY_TABLE QueryTable[2]; + NTSTATUS Status; + + RtlZeroMemory(&QueryTable, + sizeof(QueryTable)); + + QueryTable[0].Name = L"BootExecute"; + QueryTable[0].QueryRoutine = SmpRunBootAppsQueryRoutine; + + Status = RtlQueryRegistryValues(RTL_REGISTRY_CONTROL, + L"\\Session Manager", + QueryTable, + NULL, + NULL); + if (!NT_SUCCESS(Status)) + { + DPRINT1("%s: RtlQueryRegistryValues() failed! (Status %lx)\n", + __FUNCTION__, + Status); + } + + return(Status); +} + + +/* EOF */ diff --git a/reactos/subsys/smss/initss.c b/reactos/subsys/smss/initss.c new file mode 100644 index 00000000000..6894c13f4d5 --- /dev/null +++ b/reactos/subsys/smss/initss.c @@ -0,0 +1,220 @@ +/* $Id: init.c 13449 2005-02-06 21:55:07Z ea $ + * + * initss.c - Load the subsystems + * + * ReactOS Operating System + * + * -------------------------------------------------------------------- + * + * This software is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This software 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 + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING.LIB. If not, write + * to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, + * MA 02139, USA. + * + * -------------------------------------------------------------------- + */ + + +#include "smss.h" +#include + +//#define NDEBUG +#include + +/* TODO: this file should be totally rewritten + * + * a) look if a special option is set for smss.exe in + * HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options + * + * b) make smss register with itself for IMAGE_SUBSYSTEM_NATIVE + * (programmatically) + * + * c) make smss load win32k.sys as set in Kmode key + * HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\SubSystems + * + * d) make smss initialize Debug (DBGSS) and Windows (CSRSS) as described + * in the registry key Required="Debug Windows" + * HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\SubSystems + * + * e) make optional subsystems loadable (again: they must be described in the registry + * key Optional="Posix Os2" to be allowed to run) + */ +NTSTATUS +SmLoadSubsystems(VOID) +{ + SYSTEM_LOAD_AND_CALL_IMAGE ImageInfo; + NTSTATUS Status; + + DPRINT("SM: loading subsystems\n"); + + /* Load kernel mode subsystem (aka win32k.sys) */ + RtlRosInitUnicodeStringFromLiteral(&ImageInfo.ModuleName, + L"\\SystemRoot\\system32\\win32k.sys"); + + Status = NtSetSystemInformation(SystemLoadAndCallImage, + &ImageInfo, + sizeof(SYSTEM_LOAD_AND_CALL_IMAGE)); + + DPRINT("SMSS: Loaded win32k.sys (Status %lx)\n", Status); +#if 0 + if (!NT_SUCCESS(Status)) + { + return(Status); + } +#endif + + /* FIXME: load more subsystems (csrss!) */ + + return(Status); +} + +NTSTATUS +SmRunCsrss(VOID) +{ + NTSTATUS Status; + UNICODE_STRING UnicodeString; + OBJECT_ATTRIBUTES ObjectAttributes; + PRTL_USER_PROCESS_PARAMETERS ProcessParameters; + RTL_PROCESS_INFO ProcessInfo; + HANDLE CsrssInitEvent; + WCHAR UnicodeBuffer[MAX_PATH]; + + DPRINT("SM: initializing csrss\n"); + + /* Run csrss.exe */ + RtlRosInitUnicodeStringFromLiteral(&UnicodeString, + L"\\CsrssInitDone"); + InitializeObjectAttributes(&ObjectAttributes, + &UnicodeString, + EVENT_ALL_ACCESS, + 0, + NULL); + Status = NtCreateEvent(&CsrssInitEvent, + EVENT_ALL_ACCESS, + &ObjectAttributes, + NotificationEvent, + FALSE); + if (!NT_SUCCESS(Status)) + { + DbgPrint("Failed to create csrss notification event\n"); + } + + /* + * Start the Win32 subsystem (csrss.exe) + */ + + /* initialize executable path */ + wcscpy(UnicodeBuffer, L"\\??\\"); + wcscat(UnicodeBuffer, SharedUserData->NtSystemRoot); + wcscat(UnicodeBuffer, L"\\system32\\csrss.exe"); + RtlInitUnicodeString(&UnicodeString, + UnicodeBuffer); + + RtlCreateProcessParameters(&ProcessParameters, + &UnicodeString, + NULL, + NULL, + NULL, + SmSystemEnvironment, + NULL, + NULL, + NULL, + NULL); + + Status = RtlCreateUserProcess(&UnicodeString, + OBJ_CASE_INSENSITIVE, + ProcessParameters, + NULL, + NULL, + NULL, + FALSE, + NULL, + NULL, + &ProcessInfo); + + RtlDestroyProcessParameters (ProcessParameters); + + if (!NT_SUCCESS(Status)) + { + DPRINT("SM: %s: Loading csrss.exe failed!\n", __FUNCTION__); + return(Status); + } + + Status = NtWaitForSingleObject(CsrssInitEvent, + FALSE, + NULL); + + Children[CHILD_CSRSS] = ProcessInfo.ProcessHandle; + + return Status; +} + +NTSTATUS +SmRunWinlogon(VOID) +{ + NTSTATUS Status; + UNICODE_STRING UnicodeString; + PRTL_USER_PROCESS_PARAMETERS ProcessParameters; + RTL_PROCESS_INFO ProcessInfo; + WCHAR UnicodeBuffer[MAX_PATH]; + + /* + * Start the logon process (winlogon.exe) + */ + + DPRINT("SM: starting winlogon\n"); + + /* initialize executable path */ + wcscpy(UnicodeBuffer, L"\\??\\"); + wcscat(UnicodeBuffer, SharedUserData->NtSystemRoot); + wcscat(UnicodeBuffer, L"\\system32\\winlogon.exe"); + RtlInitUnicodeString(&UnicodeString, + UnicodeBuffer); + + RtlCreateProcessParameters(&ProcessParameters, + &UnicodeString, + NULL, + NULL, + NULL, + SmSystemEnvironment, + NULL, + NULL, + NULL, + NULL); + + Status = RtlCreateUserProcess(&UnicodeString, + OBJ_CASE_INSENSITIVE, + ProcessParameters, + NULL, + NULL, + NULL, + FALSE, + NULL, + NULL, + &ProcessInfo); + + RtlDestroyProcessParameters(ProcessParameters); + + if (!NT_SUCCESS(Status)) + { + DPRINT("SM: %s: Loading winlogon.exe failed!\n", __FUNCTION__); + NtTerminateProcess(Children[CHILD_CSRSS], + 0); + return(Status); + } + Children[CHILD_WINLOGON] = ProcessInfo.ProcessHandle; + + return Status; +} + +/* EOF */ diff --git a/reactos/subsys/smss/initwkdll.c b/reactos/subsys/smss/initwkdll.c new file mode 100644 index 00000000000..ed67dbcdc81 --- /dev/null +++ b/reactos/subsys/smss/initwkdll.c @@ -0,0 +1,254 @@ +/* $Id: init.c 13449 2005-02-06 21:55:07Z ea $ + * + * initwkdll.c - Load the well known DLLs + * + * ReactOS Operating System + * + * -------------------------------------------------------------------- + * + * This software is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This software 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 + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING.LIB. If not, write + * to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, + * MA 02139, USA. + * + * -------------------------------------------------------------------- + */ + +#include "smss.h" + +//#define NDEBUG +#include + +static NTSTATUS STDCALL +SmpKnownDllsQueryRoutine(PWSTR ValueName, + ULONG ValueType, + PVOID ValueData, + ULONG ValueLength, + PVOID Context, + PVOID EntryContext) +{ + OBJECT_ATTRIBUTES ObjectAttributes; + IO_STATUS_BLOCK IoStatusBlock; + UNICODE_STRING ImageName; + HANDLE FileHandle; + HANDLE SectionHandle; + NTSTATUS Status; + + DPRINT("ValueName '%S' Type %lu Length %lu\n", ValueName, ValueType, ValueLength); + DPRINT("ValueData '%S' Context %p EntryContext %p\n", (PWSTR)ValueData, Context, EntryContext); + + /* Ignore the 'DllDirectory' value */ + if (!_wcsicmp(ValueName, L"DllDirectory")) + return STATUS_SUCCESS; + + /* Open the DLL image file */ + RtlInitUnicodeString(&ImageName, + ValueData); + InitializeObjectAttributes(&ObjectAttributes, + &ImageName, + OBJ_CASE_INSENSITIVE, + (HANDLE)Context, + NULL); + Status = NtOpenFile(&FileHandle, + SYNCHRONIZE | FILE_EXECUTE, + &ObjectAttributes, + &IoStatusBlock, + FILE_SHARE_READ, + FILE_SYNCHRONOUS_IO_NONALERT | FILE_NON_DIRECTORY_FILE); + if (!NT_SUCCESS(Status)) + { + DPRINT1("NtOpenFile() failed (Status %lx)\n", Status); + return STATUS_SUCCESS; + } + + DPRINT("Opened file %wZ successfully\n", &ImageName); + + /* Check for valid image checksum */ + Status = LdrVerifyImageMatchesChecksum (FileHandle, + 0, + 0, + 0); + if (Status == STATUS_IMAGE_CHECKSUM_MISMATCH) + { + /* Raise a hard error (crash the system/BSOD) */ + NtRaiseHardError (Status, + 0, + 0, + 0, + 0, + 0); + } + else if (!NT_SUCCESS(Status)) + { + DPRINT1("Failed to check the image checksum\n"); + + NtClose(SectionHandle); + NtClose(FileHandle); + + return STATUS_SUCCESS; + } + + InitializeObjectAttributes(&ObjectAttributes, + &ImageName, + OBJ_CASE_INSENSITIVE | OBJ_PERMANENT, + (HANDLE)EntryContext, + NULL); + Status = NtCreateSection(&SectionHandle, + SECTION_ALL_ACCESS, + &ObjectAttributes, + NULL, + PAGE_EXECUTE, + SEC_IMAGE, + FileHandle); + if (NT_SUCCESS(Status)) + { + DPRINT("Created section successfully\n"); + NtClose(SectionHandle); + } + + NtClose(FileHandle); + + return STATUS_SUCCESS; +} + + +NTSTATUS +SmLoadKnownDlls(VOID) +{ + RTL_QUERY_REGISTRY_TABLE QueryTable[2]; + OBJECT_ATTRIBUTES ObjectAttributes; + IO_STATUS_BLOCK IoStatusBlock; + UNICODE_STRING DllDosPath; + UNICODE_STRING DllNtPath; + UNICODE_STRING Name; + HANDLE ObjectDirHandle; + HANDLE FileDirHandle; + HANDLE SymlinkHandle; + NTSTATUS Status; + + + DPRINT("SM: loading well-known DLLs\n"); + + DPRINT("SmLoadKnownDlls() called\n"); + + /* Create 'KnownDlls' object directory */ + RtlInitUnicodeString(&Name, + L"\\KnownDlls"); + InitializeObjectAttributes(&ObjectAttributes, + &Name, + OBJ_PERMANENT | OBJ_CASE_INSENSITIVE | OBJ_OPENIF, + NULL, + NULL); + Status = NtCreateDirectoryObject(&ObjectDirHandle, + DIRECTORY_ALL_ACCESS, + &ObjectAttributes); + if (!NT_SUCCESS(Status)) + { + DPRINT1("NtCreateDirectoryObject() failed (Status %lx)\n", Status); + return Status; + } + + RtlInitUnicodeString(&DllDosPath, NULL); + + RtlZeroMemory(&QueryTable, + sizeof(QueryTable)); + + QueryTable[0].Name = L"DllDirectory"; + QueryTable[0].Flags = RTL_QUERY_REGISTRY_DIRECT; + QueryTable[0].EntryContext = &DllDosPath; + + Status = RtlQueryRegistryValues(RTL_REGISTRY_CONTROL, + L"\\Session Manager\\KnownDlls", + QueryTable, + NULL, + SmSystemEnvironment); + if (!NT_SUCCESS(Status)) + { + DPRINT1("RtlQueryRegistryValues() failed (Status %lx)\n", Status); + return Status; + } + + DPRINT("DllDosPath: '%wZ'\n", &DllDosPath); + + if (!RtlDosPathNameToNtPathName_U(DllDosPath.Buffer, + &DllNtPath, + NULL, + NULL)) + { + DPRINT1("RtlDosPathNameToNtPathName_U() failed\n"); + return STATUS_OBJECT_NAME_INVALID; + } + + DPRINT("DllNtPath: '%wZ'\n", &DllNtPath); + + /* Open the dll path directory */ + InitializeObjectAttributes(&ObjectAttributes, + &DllNtPath, + OBJ_CASE_INSENSITIVE, + NULL, + NULL); + Status = NtOpenFile(&FileDirHandle, + SYNCHRONIZE | FILE_READ_DATA, + &ObjectAttributes, + &IoStatusBlock, + FILE_SHARE_READ | FILE_SHARE_WRITE, + FILE_SYNCHRONOUS_IO_NONALERT | FILE_DIRECTORY_FILE); + if (!NT_SUCCESS(Status)) + { + DPRINT1("NtOpenFile(%wZ) failed (Status %lx)\n", &DllNtPath, Status); + return Status; + } + + /* Link 'KnownDllPath' the dll path directory */ + RtlInitUnicodeString(&Name, + L"KnownDllPath"); + InitializeObjectAttributes(&ObjectAttributes, + &Name, + OBJ_PERMANENT | OBJ_CASE_INSENSITIVE | OBJ_OPENIF, + ObjectDirHandle, + NULL); + Status = NtCreateSymbolicLinkObject(&SymlinkHandle, + SYMBOLIC_LINK_ALL_ACCESS, + &ObjectAttributes, + &DllDosPath); + if (!NT_SUCCESS(Status)) + { + DPRINT1("NtCreateSymbolicLink() failed (Status %lx)\n", Status); + return Status; + } + + NtClose(SymlinkHandle); + + RtlZeroMemory(&QueryTable, + sizeof(QueryTable)); + + QueryTable[0].QueryRoutine = SmpKnownDllsQueryRoutine; + QueryTable[0].EntryContext = ObjectDirHandle; + + Status = RtlQueryRegistryValues(RTL_REGISTRY_CONTROL, + L"\\Session Manager\\KnownDlls", + QueryTable, + (PVOID)FileDirHandle, + NULL); + if (!NT_SUCCESS(Status)) + { + DPRINT1("RtlQueryRegistryValues() failed (Status %lx)\n", Status); + } + + DPRINT("SmLoadKnownDlls() done\n"); + + return Status; +} + + +/* EOF */ diff --git a/reactos/subsys/smss/makefile b/reactos/subsys/smss/makefile index 92ecef1d8b0..12af5d6800f 100644 --- a/reactos/subsys/smss/makefile +++ b/reactos/subsys/smss/makefile @@ -15,7 +15,12 @@ TARGET_CFLAGS = -D__NTAPP__ # require os code to explicitly request A/W version of structs/functions TARGET_CFLAGS += -D_DISABLE_TIDENTS -Wall -Werror -TARGET_OBJECTS = $(TARGET_NAME).o init.o smapi.o client.o debug.o +TARGET_OBJECTS = $(TARGET_NAME).o \ + init.o initheap.o initenv.o initobdir.o initdosdev.o \ + initrun.o initmv.o initwkdll.o initpage.o initss.o \ + initreg.o \ + smapi.o \ + client.o debug.o include $(PATH_TO_TOP)/rules.mak diff --git a/reactos/subsys/smss/smapi.c b/reactos/subsys/smss/smapi.c index 0abb4a77471..1e132375c9a 100644 --- a/reactos/subsys/smss/smapi.c +++ b/reactos/subsys/smss/smapi.c @@ -19,7 +19,7 @@ static HANDLE SmApiPort = INVALID_HANDLE_VALUE; -/* SM API **********************************************************************/ +/* SM API *******************************************************************/ #define SMAPI(n) \ NTSTATUS FASTCALL n (PSM_PORT_MESSAGE Request) @@ -128,14 +128,18 @@ SmpApiThread(HANDLE Port) } } + +/* LPC PORT INITIALIZATION **************************************************/ + + /********************************************************************** * NAME - * SmpCreateApiPort/0 + * SmCreateApiPort/0 * * DECRIPTION */ NTSTATUS -SmpCreateApiPort(VOID) +SmCreateApiPort(VOID) { OBJECT_ATTRIBUTES ObjectAttributes; UNICODE_STRING UnicodeString; diff --git a/reactos/subsys/smss/smss.c b/reactos/subsys/smss/smss.c index c51b66270dc..43c64e4a386 100644 --- a/reactos/subsys/smss/smss.c +++ b/reactos/subsys/smss/smss.c @@ -22,60 +22,32 @@ * MA 02139, USA. * * -------------------------------------------------------------------- - * - * 19990529 (Emanuele Aliberti) - * Compiled successfully with egcs 1.1.2 */ -#include -#include #include "smss.h" +//#include +#include #define NDEBUG #include - -void -DisplayString(LPCWSTR lpwString) -{ - UNICODE_STRING us; - - RtlInitUnicodeString(&us, lpwString); - NtDisplayString(&us); -} - - -void -PrintString(char* fmt,...) -{ - char buffer[512]; - va_list ap; - UNICODE_STRING UnicodeString; - ANSI_STRING AnsiString; - - va_start(ap, fmt); - vsprintf(buffer, fmt, ap); - va_end(ap); - - RtlInitAnsiString(&AnsiString, buffer); - RtlAnsiStringToUnicodeString(&UnicodeString, - &AnsiString, - TRUE); - NtDisplayString(&UnicodeString); - RtlFreeUnicodeString(&UnicodeString); -} - - /* Native image's entry point */ VOID STDCALL NtProcessStartup(PPEB Peb) { - HANDLE Children[2]; /* csrss, winlogon */ NTSTATUS Status; Status = InitSessionManager(Children); if (!NT_SUCCESS(Status)) { + int i; + for (i=0; i < (sizeof Children / sizeof Children[0]); i++) + { + if (Children[i]) + { + NtTerminateProcess(Children[i],0); + } + } DPRINT1("SM: Initialization failed!\n"); goto ByeBye; } diff --git a/reactos/subsys/smss/smss.h b/reactos/subsys/smss/smss.h index 79b730adfbb..0a8a3d1dee5 100644 --- a/reactos/subsys/smss/smss.h +++ b/reactos/subsys/smss/smss.h @@ -1,56 +1,66 @@ #ifndef _SMSS_H_INCLUDED_ #define _SMSS_H_INCLUDED_ +#define NTOS_MODE_USER +#include +#include #define CHILD_CSRSS 0 #define CHILD_WINLOGON 1 - -/* GLOBAL VARIABLES ****/ - -//extern HANDLE SmApiPort; - - -/* FUNCTIONS ***********/ - /* init.c */ - extern HANDLE SmpHeap; +NTSTATUS InitSessionManager(HANDLE Children[]); -NTSTATUS -InitSessionManager(HANDLE Children[]); +/* initheap.c */ +NTSTATUS SmCreateHeap(VOID); +/* initenv.c */ +extern PWSTR SmSystemEnvironment; +NTSTATUS SmCreateEnvironment(VOID); +NTSTATUS SmSetEnvironmentVariables(VOID); +NTSTATUS SmUpdateEnvironment(VOID); -/* smss.c */ -void DisplayString (LPCWSTR lpwString); -void PrintString (char* fmt,...); +/* initobdir.c */ +NTSTATUS SmCreateObjectDirectories(VOID); + +/* initdosdev.c */ +NTSTATUS SmInitDosDevices(VOID); + +/* initrun.c */ +extern HANDLE Children[2]; +NTSTATUS SmRunBootApplications(VOID); + +/* initmv.c */ +NTSTATUS SmProcessFileRenameList(VOID); + +/* initwkdll.c */ +NTSTATUS SmLoadKnownDlls(VOID); + +/* initpage.c */ +NTSTATUS SmCreatePagingFiles(VOID); + +/* initreg.c */ +NTSTATUS SmInitializeRegistry(VOID); + +/* initss.c */ +NTSTATUS SmLoadSubsystems(VOID); +NTSTATUS SmRunCsrss(VOID); +NTSTATUS SmRunWinlogon(VOID); /* smapi.c */ - -NTSTATUS -SmpCreateApiPort(VOID); - -VOID STDCALL -SmpApiThread(HANDLE Port); +NTSTATUS SmCreateApiPort(VOID); +VOID STDCALL SmpApiThread(HANDLE Port); /* client.c */ - -VOID STDCALL -SmpInitializeClientManagement(VOID); - -NTSTATUS STDCALL -SmpCreateClient(SM_PORT_MESSAGE); - -NTSTATUS STDCALL -SmpDestroyClient(ULONG); +NTSTATUS SmInitializeClientManagement(VOID); +NTSTATUS STDCALL SmpCreateClient(SM_PORT_MESSAGE); +NTSTATUS STDCALL SmpDestroyClient(ULONG); /* debug.c */ - extern HANDLE DbgSsApiPort; extern HANDLE DbgUiApiPort; - -NTSTATUS STDCALL -SmpInitializeDbgSs(VOID); +NTSTATUS SmInitializeDbgSs(VOID); #endif /* _SMSS_H_INCLUDED_ */ From 18e42fda452228b56e9c67bbc52518e229e298e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20van=20Geldorp?= Date: Sat, 12 Feb 2005 09:17:51 +0000 Subject: [PATCH 181/185] Check subsystem svn path=/trunk/; revision=13501 --- reactos/lib/kernel32/process/create.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/reactos/lib/kernel32/process/create.c b/reactos/lib/kernel32/process/create.c index 72f08276c0a..8aacef2fda9 100644 --- a/reactos/lib/kernel32/process/create.c +++ b/reactos/lib/kernel32/process/create.c @@ -1023,6 +1023,7 @@ CreateProcessW if (! NT_SUCCESS(Status)) { NtClose(hSection); + DPRINT("Unable to get SectionImageInformation, status 0x%x\n", Status); SetLastErrorByStatus(Status); return FALSE; } @@ -1030,10 +1031,20 @@ CreateProcessW if (0 != (Sii.Characteristics & IMAGE_FILE_DLL)) { NtClose(hSection); + DPRINT("Can't execute a DLL\n"); SetLastError(ERROR_BAD_EXE_FORMAT); return FALSE; } + if (IMAGE_SUBSYSTEM_WINDOWS_GUI != Sii.Subsystem + && IMAGE_SUBSYSTEM_WINDOWS_CUI != Sii.Subsystem) + { + NtClose(hSection); + DPRINT("Invalid subsystem %d\n", Sii.Subsystem); + SetLastError(ERROR_CHILD_NOT_COMPLETE); + return FALSE; + } + /* * Initialize the process object attributes */ From df616c9b3b374f8d5a483d6ce50f3aaae1f08f0a Mon Sep 17 00:00:00 2001 From: Thomas Bluemel Date: Sat, 12 Feb 2005 11:47:03 +0000 Subject: [PATCH 182/185] The structure layout of self-relative security descriptors may be different from absolute security descriptors depending on the platform. Self-relative security descriptors always use 32 bit offsets while absolute security descriptors use pointers which could be 64 bits. svn path=/trunk/; revision=13502 --- reactos/include/ntos/rtl.h | 14 +- reactos/include/ntos/security.h | 11 + reactos/lib/advapi32/sec/sec.c | 4 +- reactos/lib/rtl/sd.c | 529 ++++++++++++---------------- reactos/ntoskrnl/se/sd.c | 117 ++++-- reactos/w32api/include/ddk/ntifs.h | 28 +- reactos/w32api/include/ddk/winddk.h | 2 +- reactos/w32api/include/winnt.h | 9 + 8 files changed, 351 insertions(+), 363 deletions(-) diff --git a/reactos/include/ntos/rtl.h b/reactos/include/ntos/rtl.h index 183e127afce..8a6d465e003 100755 --- a/reactos/include/ntos/rtl.h +++ b/reactos/include/ntos/rtl.h @@ -521,7 +521,7 @@ PushEntryList ( NTSTATUS STDCALL RtlAbsoluteToSelfRelativeSD (PSECURITY_DESCRIPTOR AbsSD, - PSECURITY_DESCRIPTOR RelSD, + PSECURITY_DESCRIPTOR_RELATIVE RelSD, PULONG BufferLength); NTSTATUS STDCALL @@ -852,6 +852,10 @@ NTSTATUS STDCALL RtlCreateSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor, ULONG Revision); +NTSTATUS STDCALL +RtlCreateSecurityDescriptorRelative (PSECURITY_DESCRIPTOR_RELATIVE SecurityDescriptor, + ULONG Revision); + NTSTATUS STDCALL RtlCreateSystemVolumeInformationFolder( @@ -1999,7 +2003,7 @@ RtlLookupElementGenericTableFullAvl ( NTSTATUS STDCALL RtlMakeSelfRelativeSD (PSECURITY_DESCRIPTOR AbsSD, - PSECURITY_DESCRIPTOR RelSD, + PSECURITY_DESCRIPTOR_RELATIVE RelSD, PULONG BufferLength); VOID STDCALL @@ -2261,7 +2265,7 @@ RtlSecondsSince1980ToTime (ULONG SecondsSince1980, PLARGE_INTEGER Time); NTSTATUS STDCALL -RtlSelfRelativeToAbsoluteSD (PSECURITY_DESCRIPTOR RelSD, +RtlSelfRelativeToAbsoluteSD (PSECURITY_DESCRIPTOR_RELATIVE RelSD, PSECURITY_DESCRIPTOR AbsSD, PULONG AbsSDSize, PACL Dacl, @@ -2276,7 +2280,7 @@ RtlSelfRelativeToAbsoluteSD (PSECURITY_DESCRIPTOR RelSD, NTSTATUS STDCALL RtlSelfRelativeToAbsoluteSD2( - PSECURITY_DESCRIPTOR SelfRelativeSecurityDescriptor, + PSECURITY_DESCRIPTOR_RELATIVE SelfRelativeSecurityDescriptor, PULONG BufferSize ); @@ -2659,7 +2663,7 @@ RtlValidateHeap ( BOOLEAN STDCALL RtlValidRelativeSecurityDescriptor ( - IN PSECURITY_DESCRIPTOR SecurityDescriptorInput, + IN PSECURITY_DESCRIPTOR_RELATIVE SecurityDescriptorInput, IN ULONG SecurityDescriptorLength, IN SECURITY_INFORMATION RequiredInformation ); diff --git a/reactos/include/ntos/security.h b/reactos/include/ntos/security.h index 24545637e6c..e4b76e917e2 100644 --- a/reactos/include/ntos/security.h +++ b/reactos/include/ntos/security.h @@ -283,6 +283,17 @@ typedef struct _SECURITY_DESCRIPTOR PACL Dacl; } SECURITY_DESCRIPTOR, *PSECURITY_DESCRIPTOR; +typedef struct _SECURITY_DESCRIPTOR_RELATIVE +{ + UCHAR Revision; + UCHAR Sbz1; + SECURITY_DESCRIPTOR_CONTROL Control; + ULONG Owner; + ULONG Group; + ULONG Sacl; + ULONG Dacl; +} SECURITY_DESCRIPTOR_RELATIVE, *PSECURITY_DESCRIPTOR_RELATIVE; + typedef struct _LUID_AND_ATTRIBUTES { LUID Luid; diff --git a/reactos/lib/advapi32/sec/sec.c b/reactos/lib/advapi32/sec/sec.c index ea7b36cac2a..790a33dc6e3 100644 --- a/reactos/lib/advapi32/sec/sec.c +++ b/reactos/lib/advapi32/sec/sec.c @@ -258,7 +258,7 @@ MakeAbsoluteSD ( { NTSTATUS Status; - Status = RtlSelfRelativeToAbsoluteSD (pSelfRelativeSecurityDescriptor, + Status = RtlSelfRelativeToAbsoluteSD ((PSECURITY_DESCRIPTOR_RELATIVE)pSelfRelativeSecurityDescriptor, pAbsoluteSecurityDescriptor, lpdwAbsoluteSecurityDescriptorSize, pDacl, @@ -293,7 +293,7 @@ MakeSelfRelativeSD ( NTSTATUS Status; Status = RtlAbsoluteToSelfRelativeSD (pAbsoluteSecurityDescriptor, - pSelfRelativeSecurityDescriptor, + (PSECURITY_DESCRIPTOR_RELATIVE)pSelfRelativeSecurityDescriptor, (PULONG)lpdwBufferLength); if (!NT_SUCCESS(Status)) { diff --git a/reactos/lib/rtl/sd.c b/reactos/lib/rtl/sd.c index 7430a16f521..a27f2e5e458 100644 --- a/reactos/lib/rtl/sd.c +++ b/reactos/lib/rtl/sd.c @@ -17,6 +17,95 @@ /* FUNCTIONS ***************************************************************/ + +static VOID +RtlpQuerySecurityDescriptorPointers(IN PSECURITY_DESCRIPTOR SecurityDescriptor, + OUT PSID *Owner OPTIONAL, + OUT PSID *Group OPTIONAL, + OUT PACL *Sacl OPTIONAL, + OUT PACL *Dacl OPTIONAL) +{ + if (SecurityDescriptor->Control & SE_SELF_RELATIVE) + { + PSECURITY_DESCRIPTOR_RELATIVE RelSD = (PSECURITY_DESCRIPTOR_RELATIVE)SecurityDescriptor; + if(Owner != NULL) + { + *Owner = ((RelSD->Owner != 0) ? (PSID)((ULONG_PTR)RelSD + RelSD->Owner) : NULL); + } + if(Group != NULL) + { + *Group = ((RelSD->Group != 0) ? (PSID)((ULONG_PTR)RelSD + RelSD->Group) : NULL); + } + if(Sacl != NULL) + { + *Sacl = (((RelSD->Control & SE_SACL_PRESENT) && (RelSD->Sacl != 0)) ? + (PSID)((ULONG_PTR)RelSD + RelSD->Sacl) : NULL); + } + if(Dacl != NULL) + { + *Dacl = (((RelSD->Control & SE_DACL_PRESENT) && (RelSD->Dacl != 0)) ? + (PSID)((ULONG_PTR)RelSD + RelSD->Dacl) : NULL); + } + } + else + { + if(Owner != NULL) + { + *Owner = SecurityDescriptor->Owner; + } + if(Group != NULL) + { + *Group = SecurityDescriptor->Group; + } + if(Sacl != NULL) + { + *Sacl = ((SecurityDescriptor->Control & SE_SACL_PRESENT) ? SecurityDescriptor->Sacl : NULL); + } + if(Dacl != NULL) + { + *Dacl = ((SecurityDescriptor->Control & SE_DACL_PRESENT) ? SecurityDescriptor->Dacl : NULL); + } + } +} + +static VOID +RtlpQuerySecurityDescriptor(PSECURITY_DESCRIPTOR SecurityDescriptor, + PSID* Owner, + PULONG OwnerLength, + PSID* Group, + PULONG GroupLength, + PACL* Dacl, + PULONG DaclLength, + PACL* Sacl, + PULONG SaclLength) +{ + RtlpQuerySecurityDescriptorPointers(SecurityDescriptor, + Owner, + Group, + Sacl, + Dacl); + + if (Owner != NULL) + { + *OwnerLength = ((*Owner != NULL) ? ROUND_UP(RtlLengthSid(*Owner), 4) : 0); + } + + if (Group != NULL) + { + *GroupLength = ((*Group != NULL) ? ROUND_UP(RtlLengthSid(*Group), 4) : 0); + } + + if (Dacl != NULL) + { + *DaclLength = ((*Dacl != NULL) ? ROUND_UP((*Dacl)->AclSize, 4) : 0); + } + + if (Sacl != NULL) + { + *SaclLength = ((*Sacl != NULL) ? ROUND_UP((*Sacl)->AclSize, 4) : 0); + } +} + /* * @implemented */ @@ -41,54 +130,61 @@ RtlCreateSecurityDescriptor(PSECURITY_DESCRIPTOR SecurityDescriptor, } +NTSTATUS STDCALL +RtlCreateSecurityDescriptorRelative (PSECURITY_DESCRIPTOR_RELATIVE SecurityDescriptor, + ULONG Revision) +{ + if (Revision != SECURITY_DESCRIPTOR_REVISION1) + { + return STATUS_UNKNOWN_REVISION; + } + + SecurityDescriptor->Revision = Revision; + SecurityDescriptor->Sbz1 = 0; + SecurityDescriptor->Control = SE_SELF_RELATIVE; + SecurityDescriptor->Owner = 0; + SecurityDescriptor->Group = 0; + SecurityDescriptor->Sacl = 0; + SecurityDescriptor->Dacl = 0; + + return STATUS_SUCCESS; +} + + /* * @implemented */ ULONG STDCALL RtlLengthSecurityDescriptor(PSECURITY_DESCRIPTOR SecurityDescriptor) { + PSID Owner, Group; + PACL Sacl, Dacl; ULONG Length = sizeof(SECURITY_DESCRIPTOR); + + RtlpQuerySecurityDescriptorPointers(SecurityDescriptor, + &Owner, + &Group, + &Sacl, + &Dacl); - if (SecurityDescriptor->Owner != NULL) + if (Owner != NULL) { - PSID Owner = SecurityDescriptor->Owner; - if (SecurityDescriptor->Control & SE_SELF_RELATIVE) - { - Owner = (PSID)((ULONG_PTR)Owner + (ULONG_PTR)SecurityDescriptor); - } - Length = Length + ROUND_UP(RtlLengthSid(Owner), 4); + Length += ROUND_UP(RtlLengthSid(Owner), 4); } - if (SecurityDescriptor->Group != NULL) + if (Group != NULL) { - PSID Group = SecurityDescriptor->Group; - if (SecurityDescriptor->Control & SE_SELF_RELATIVE) - { - Group = (PSID)((ULONG_PTR)Group + (ULONG_PTR)SecurityDescriptor); - } - Length = Length + ROUND_UP(RtlLengthSid(Group), 4); + Length += ROUND_UP(RtlLengthSid(Group), 4); } - if (SecurityDescriptor->Control & SE_DACL_PRESENT && - SecurityDescriptor->Dacl != NULL) + if (Dacl != NULL) { - PACL Dacl = SecurityDescriptor->Dacl; - if (SecurityDescriptor->Control & SE_SELF_RELATIVE) - { - Dacl = (PACL)((ULONG_PTR)Dacl + (ULONG_PTR)SecurityDescriptor); - } - Length = Length + ROUND_UP(Dacl->AclSize, 4); + Length += ROUND_UP(Dacl->AclSize, 4); } - if (SecurityDescriptor->Control & SE_SACL_PRESENT && - SecurityDescriptor->Sacl != NULL) + if (Sacl != NULL) { - PACL Sacl = SecurityDescriptor->Sacl; - if (SecurityDescriptor->Control & SE_SELF_RELATIVE) - { - Sacl = (PACL)((ULONG_PTR)Sacl + (ULONG_PTR)SecurityDescriptor); - } - Length = Length + ROUND_UP(Sacl->AclSize, 4); + Length += ROUND_UP(Sacl->AclSize, 4); } return Length; @@ -116,27 +212,13 @@ RtlGetDaclSecurityDescriptor(PSECURITY_DESCRIPTOR SecurityDescriptor, } *DaclPresent = TRUE; - if (SecurityDescriptor->Dacl == NULL) - { - *Dacl = NULL; - } - else - { - *Dacl = SecurityDescriptor->Dacl; - if (SecurityDescriptor->Control & SE_SELF_RELATIVE) - { - *Dacl = (PACL)((ULONG_PTR)*Dacl + (ULONG_PTR)SecurityDescriptor); - } - } + RtlpQuerySecurityDescriptorPointers(SecurityDescriptor, + NULL, + NULL, + NULL, + Dacl); - if (SecurityDescriptor->Control & SE_DACL_DEFAULTED) - { - *DaclDefaulted = TRUE; - } - else - { - *DaclDefaulted = FALSE; - } + *DaclDefaulted = ((SecurityDescriptor->Control & SE_DACL_DEFAULTED) ? TRUE : FALSE); return STATUS_SUCCESS; } @@ -186,67 +268,26 @@ RtlSetDaclSecurityDescriptor(PSECURITY_DESCRIPTOR SecurityDescriptor, BOOLEAN STDCALL RtlValidSecurityDescriptor(PSECURITY_DESCRIPTOR SecurityDescriptor) { + PSID Owner, Group; + PACL Sacl, Dacl; + if (SecurityDescriptor->Revision != SECURITY_DESCRIPTOR_REVISION1) { return FALSE; } + + RtlpQuerySecurityDescriptorPointers(SecurityDescriptor, + &Owner, + &Group, + &Sacl, + &Dacl); - if (SecurityDescriptor->Owner != NULL) + if ((Owner != NULL && !RtlValidSid(Owner)) || + (Group != NULL && !RtlValidSid(Group)) || + (Sacl != NULL && !RtlValidAcl(Sacl)) || + (Dacl != NULL && !RtlValidAcl(Dacl))) { - PSID Owner = SecurityDescriptor->Owner; - if (SecurityDescriptor->Control & SE_SELF_RELATIVE) - { - Owner = (PSID)((ULONG_PTR)Owner + (ULONG_PTR)SecurityDescriptor); - } - - if (!RtlValidSid(Owner)) - { - return FALSE; - } - } - - if (SecurityDescriptor->Group != NULL) - { - PSID Group = SecurityDescriptor->Group; - if (SecurityDescriptor->Control & SE_SELF_RELATIVE) - { - Group = (PSID)((ULONG_PTR)Group + (ULONG_PTR)SecurityDescriptor); - } - - if (!RtlValidSid(Group)) - { - return FALSE; - } - } - - if (SecurityDescriptor->Control & SE_DACL_PRESENT && - SecurityDescriptor->Dacl != NULL) - { - PACL Dacl = SecurityDescriptor->Dacl; - if (SecurityDescriptor->Control & SE_SELF_RELATIVE) - { - Dacl = (PACL)((ULONG_PTR)Dacl + (ULONG_PTR)SecurityDescriptor); - } - - if (!RtlValidAcl(Dacl)) - { - return FALSE; - } - } - - if (SecurityDescriptor->Control & SE_SACL_PRESENT && - SecurityDescriptor->Sacl != NULL) - { - PACL Sacl = SecurityDescriptor->Sacl; - if (SecurityDescriptor->Control & SE_SELF_RELATIVE) - { - Sacl = (PACL)((ULONG_PTR)Sacl + (ULONG_PTR)SecurityDescriptor); - } - - if (!RtlValidAcl(Sacl)) - { - return FALSE; - } + return FALSE; } return TRUE; @@ -296,27 +337,13 @@ RtlGetOwnerSecurityDescriptor(PSECURITY_DESCRIPTOR SecurityDescriptor, return STATUS_UNKNOWN_REVISION; } - if (SecurityDescriptor->Owner != NULL) - { - *Owner = SecurityDescriptor->Owner; - if (SecurityDescriptor->Control & SE_SELF_RELATIVE) - { - *Owner = (PSID)((ULONG_PTR)*Owner + (ULONG_PTR)SecurityDescriptor); - } - } - else - { - *Owner = NULL; - } + RtlpQuerySecurityDescriptorPointers(SecurityDescriptor, + Owner, + NULL, + NULL, + NULL); - if (SecurityDescriptor->Control & SE_OWNER_DEFAULTED) - { - *OwnerDefaulted = TRUE; - } - else - { - *OwnerDefaulted = FALSE; - } + *OwnerDefaulted = ((SecurityDescriptor->Control & SE_OWNER_DEFAULTED) ? TRUE : FALSE); return STATUS_SUCCESS; } @@ -364,142 +391,25 @@ RtlGetGroupSecurityDescriptor(PSECURITY_DESCRIPTOR SecurityDescriptor, return STATUS_UNKNOWN_REVISION; } - if (SecurityDescriptor->Group != NULL) - { - *Group = SecurityDescriptor->Group; - if (SecurityDescriptor->Control & SE_SELF_RELATIVE) - { - *Group = (PSID)((ULONG_PTR)*Group + (ULONG_PTR)SecurityDescriptor); - } - } - else - { - *Group = NULL; - } + RtlpQuerySecurityDescriptorPointers(SecurityDescriptor, + NULL, + Group, + NULL, + NULL); - if (SecurityDescriptor->Control & SE_GROUP_DEFAULTED) - { - *GroupDefaulted = TRUE; - } - else - { - *GroupDefaulted = FALSE; - } + *GroupDefaulted = ((SecurityDescriptor->Control & SE_GROUP_DEFAULTED) ? TRUE : FALSE); return STATUS_SUCCESS; } -static VOID -RtlpQuerySecurityDescriptor(PSECURITY_DESCRIPTOR SecurityDescriptor, - PSID* Owner, - PULONG OwnerLength, - PSID* Group, - PULONG GroupLength, - PACL* Dacl, - PULONG DaclLength, - PACL* Sacl, - PULONG SaclLength) -{ - if (SecurityDescriptor->Owner != NULL) - { - *Owner = SecurityDescriptor->Owner; - if (SecurityDescriptor->Control & SE_SELF_RELATIVE) - { - *Owner = (PSID)((ULONG_PTR)*Owner + (ULONG_PTR)SecurityDescriptor); - } - } - else - { - *Owner = NULL; - } - - if (*Owner != NULL) - { - *OwnerLength = ROUND_UP(RtlLengthSid(*Owner), 4); - } - else - { - *OwnerLength = 0; - } - - if ((SecurityDescriptor->Control & SE_DACL_PRESENT) && - SecurityDescriptor->Dacl != NULL) - { - *Dacl = SecurityDescriptor->Dacl; - if (SecurityDescriptor->Control & SE_SELF_RELATIVE) - { - *Dacl = (PACL)((ULONG_PTR)*Dacl + (ULONG_PTR)SecurityDescriptor); - } - } - else - { - *Dacl = NULL; - } - - if (*Dacl != NULL) - { - *DaclLength = ROUND_UP((*Dacl)->AclSize, 4); - } - else - { - *DaclLength = 0; - } - - if (SecurityDescriptor->Group != NULL) - { - *Group = SecurityDescriptor->Group; - if (SecurityDescriptor->Control & SE_SELF_RELATIVE) - { - *Group = (PSID)((ULONG_PTR)*Group + (ULONG_PTR)SecurityDescriptor); - } - } - else - { - *Group = NULL; - } - - if (*Group != NULL) - { - *GroupLength = ROUND_UP(RtlLengthSid(*Group), 4); - } - else - { - *GroupLength = 0; - } - - if ((SecurityDescriptor->Control & SE_SACL_PRESENT) && - SecurityDescriptor->Sacl != NULL) - { - *Sacl = SecurityDescriptor->Sacl; - if (SecurityDescriptor->Control & SE_SELF_RELATIVE) - { - *Sacl = (PACL)((ULONG_PTR)*Sacl + (ULONG_PTR)SecurityDescriptor); - } - } - else - { - *Sacl = NULL; - } - - if (*Sacl != NULL) - { - *SaclLength = ROUND_UP((*Sacl)->AclSize, 4); - } - else - { - *SaclLength = 0; - } -} - - /* * @implemented */ NTSTATUS STDCALL RtlMakeSelfRelativeSD(PSECURITY_DESCRIPTOR AbsSD, - PSECURITY_DESCRIPTOR RelSD, - PULONG BufferLength) + PSECURITY_DESCRIPTOR_RELATIVE RelSD, + PULONG BufferLength) { PSID Owner; PSID Group; @@ -522,7 +432,7 @@ RtlMakeSelfRelativeSD(PSECURITY_DESCRIPTOR AbsSD, &Sacl, &SaclLength); - TotalLength = OwnerLength + GroupLength + SaclLength + DaclLength + sizeof(SECURITY_DESCRIPTOR); + TotalLength = sizeof(SECURITY_DESCRIPTOR_RELATIVE) + OwnerLength + GroupLength + SaclLength + DaclLength; if (*BufferLength < TotalLength) { return STATUS_BUFFER_TOO_SMALL; @@ -530,48 +440,48 @@ RtlMakeSelfRelativeSD(PSECURITY_DESCRIPTOR AbsSD, RtlZeroMemory(RelSD, TotalLength); - memmove(RelSD, - AbsSD, - sizeof(SECURITY_DESCRIPTOR)); - Current = (ULONG_PTR)RelSD + sizeof(SECURITY_DESCRIPTOR); + + RelSD->Revision = AbsSD->Revision; + RelSD->Sbz1 = AbsSD->Sbz1; + RelSD->Control = AbsSD->Control | SE_SELF_RELATIVE; + + Current = (ULONG_PTR)(RelSD + 1); if (SaclLength != 0) { - memmove((PVOID)Current, - Sacl, - SaclLength); - RelSD->Sacl = (PACL)((ULONG_PTR)Current - (ULONG_PTR)RelSD); + RtlCopyMemory((PVOID)Current, + Sacl, + SaclLength); + RelSD->Sacl = (ULONG)((ULONG_PTR)Current - (ULONG_PTR)RelSD); Current += SaclLength; } if (DaclLength != 0) { - memmove((PVOID)Current, - Dacl, - DaclLength); - RelSD->Dacl = (PACL)((ULONG_PTR)Current - (ULONG_PTR)RelSD); + RtlCopyMemory((PVOID)Current, + Dacl, + DaclLength); + RelSD->Dacl = (ULONG)((ULONG_PTR)Current - (ULONG_PTR)RelSD); Current += DaclLength; } if (OwnerLength != 0) { - memmove((PVOID)Current, - Owner, - OwnerLength); - RelSD->Owner = (PSID)((ULONG_PTR)Current - (ULONG_PTR)RelSD); + RtlCopyMemory((PVOID)Current, + Owner, + OwnerLength); + RelSD->Owner = (ULONG)((ULONG_PTR)Current - (ULONG_PTR)RelSD); Current += OwnerLength; } if (GroupLength != 0) { - memmove((PVOID)Current, - Group, - GroupLength); - RelSD->Group = (PSID)((ULONG_PTR)Current - (ULONG_PTR)RelSD); + RtlCopyMemory((PVOID)Current, + Group, + GroupLength); + RelSD->Group = (ULONG)((ULONG_PTR)Current - (ULONG_PTR)RelSD); } - RelSD->Control |= SE_SELF_RELATIVE; - return STATUS_SUCCESS; } @@ -581,7 +491,7 @@ RtlMakeSelfRelativeSD(PSECURITY_DESCRIPTOR AbsSD, */ NTSTATUS STDCALL RtlAbsoluteToSelfRelativeSD(PSECURITY_DESCRIPTOR AbsSD, - PSECURITY_DESCRIPTOR RelSD, + PSECURITY_DESCRIPTOR_RELATIVE RelSD, PULONG BufferLength) { if (AbsSD->Control & SE_SELF_RELATIVE) @@ -658,27 +568,13 @@ RtlGetSaclSecurityDescriptor(PSECURITY_DESCRIPTOR SecurityDescriptor, } *SaclPresent = TRUE; - if (SecurityDescriptor->Sacl == NULL) - { - *Sacl = NULL; - } - else - { - *Sacl = SecurityDescriptor->Sacl; - if (SecurityDescriptor->Control & SE_SELF_RELATIVE) - { - *Sacl = (PACL)((ULONG_PTR)*Sacl + (ULONG_PTR)SecurityDescriptor); - } - } + RtlpQuerySecurityDescriptorPointers(SecurityDescriptor, + NULL, + NULL, + Sacl, + NULL); - if (SecurityDescriptor->Control & SE_SACL_DEFAULTED) - { - *SaclDefaulted = TRUE; - } - else - { - *SaclDefaulted = FALSE; - } + *SaclDefaulted = ((SecurityDescriptor->Control & SE_SACL_DEFAULTED) ? TRUE : FALSE); return STATUS_SUCCESS; } @@ -726,7 +622,7 @@ RtlSetSaclSecurityDescriptor(PSECURITY_DESCRIPTOR SecurityDescriptor, * @implemented */ NTSTATUS STDCALL -RtlSelfRelativeToAbsoluteSD(PSECURITY_DESCRIPTOR RelSD, +RtlSelfRelativeToAbsoluteSD(PSECURITY_DESCRIPTOR_RELATIVE RelSD, PSECURITY_DESCRIPTOR AbsSD, PDWORD AbsSDSize, PACL Dacl, @@ -747,10 +643,17 @@ RtlSelfRelativeToAbsoluteSD(PSECURITY_DESCRIPTOR RelSD, PACL pDacl; PACL pSacl; - if (!(RelSD->Control & SE_SELF_RELATIVE)) - return STATUS_BAD_DESCRIPTOR_FORMAT; + if (RelSD->Revision != SECURITY_DESCRIPTOR_REVISION1) + { + return STATUS_UNKNOWN_REVISION; + } - RtlpQuerySecurityDescriptor (RelSD, + if (!(RelSD->Control & SE_SELF_RELATIVE)) + { + return STATUS_BAD_DESCRIPTOR_FORMAT; + } + + RtlpQuerySecurityDescriptor ((PSECURITY_DESCRIPTOR)RelSD, &pOwner, &OwnerLength, &pGroup, @@ -764,16 +667,18 @@ RtlSelfRelativeToAbsoluteSD(PSECURITY_DESCRIPTOR RelSD, GroupLength > *GroupSize || DaclLength > *DaclSize || SaclLength > *SaclSize) + { return STATUS_BUFFER_TOO_SMALL; + } - memmove (Owner, pOwner, OwnerLength); - memmove (Group, pGroup, GroupLength); - memmove (Dacl, pDacl, DaclLength); - memmove (Sacl, pSacl, SaclLength); + RtlCopyMemory (Owner, pOwner, OwnerLength); + RtlCopyMemory (Group, pGroup, GroupLength); + RtlCopyMemory (Dacl, pDacl, DaclLength); + RtlCopyMemory (Sacl, pSacl, SaclLength); - memmove (AbsSD, RelSD, sizeof (SECURITY_DESCRIPTOR)); - - AbsSD->Control &= ~SE_SELF_RELATIVE; + AbsSD->Revision = RelSD->Revision; + AbsSD->Sbz1 = RelSD->Sbz1; + AbsSD->Control = RelSD->Control & ~SE_SELF_RELATIVE; AbsSD->Owner = Owner; AbsSD->Group = Group; AbsSD->Dacl = Dacl; @@ -792,7 +697,7 @@ RtlSelfRelativeToAbsoluteSD(PSECURITY_DESCRIPTOR RelSD, * @unimplemented */ NTSTATUS STDCALL -RtlSelfRelativeToAbsoluteSD2(PSECURITY_DESCRIPTOR SelfRelativeSecurityDescriptor, +RtlSelfRelativeToAbsoluteSD2(PSECURITY_DESCRIPTOR_RELATIVE SelfRelativeSecurityDescriptor, PULONG BufferSize) { UNIMPLEMENTED; @@ -804,18 +709,18 @@ RtlSelfRelativeToAbsoluteSD2(PSECURITY_DESCRIPTOR SelfRelativeSecurityDescriptor * @implemented */ BOOLEAN STDCALL -RtlValidRelativeSecurityDescriptor(IN PSECURITY_DESCRIPTOR SecurityDescriptorInput, +RtlValidRelativeSecurityDescriptor(IN PSECURITY_DESCRIPTOR_RELATIVE SecurityDescriptorInput, IN ULONG SecurityDescriptorLength, IN SECURITY_INFORMATION RequiredInformation) { - if (SecurityDescriptorLength < sizeof(SECURITY_DESCRIPTOR) || + if (SecurityDescriptorLength < sizeof(SECURITY_DESCRIPTOR_RELATIVE) || SecurityDescriptorInput->Revision != SECURITY_DESCRIPTOR_REVISION1 || !(SecurityDescriptorInput->Control & SE_SELF_RELATIVE)) { return FALSE; } - if (SecurityDescriptorInput->Owner != NULL) + if (SecurityDescriptorInput->Owner != 0) { PSID Owner = (PSID)((ULONG_PTR)SecurityDescriptorInput->Owner + (ULONG_PTR)SecurityDescriptorInput); if (!RtlValidSid(Owner)) @@ -828,7 +733,7 @@ RtlValidRelativeSecurityDescriptor(IN PSECURITY_DESCRIPTOR SecurityDescriptorInp return FALSE; } - if (SecurityDescriptorInput->Group != NULL) + if (SecurityDescriptorInput->Group != 0) { PSID Group = (PSID)((ULONG_PTR)SecurityDescriptorInput->Group + (ULONG_PTR)SecurityDescriptorInput); if (!RtlValidSid(Group)) @@ -843,7 +748,7 @@ RtlValidRelativeSecurityDescriptor(IN PSECURITY_DESCRIPTOR SecurityDescriptorInp if (SecurityDescriptorInput->Control & SE_DACL_PRESENT) { - if (SecurityDescriptorInput->Dacl != NULL && + if (SecurityDescriptorInput->Dacl != 0 && !RtlValidAcl((PACL)((ULONG_PTR)SecurityDescriptorInput->Dacl + (ULONG_PTR)SecurityDescriptorInput))) { return FALSE; @@ -856,7 +761,7 @@ RtlValidRelativeSecurityDescriptor(IN PSECURITY_DESCRIPTOR SecurityDescriptorInp if (SecurityDescriptorInput->Control & SE_SACL_PRESENT) { - if (SecurityDescriptorInput->Sacl != NULL && + if (SecurityDescriptorInput->Sacl != 0 && !RtlValidAcl((PACL)((ULONG_PTR)SecurityDescriptorInput->Sacl + (ULONG_PTR)SecurityDescriptorInput))) { return FALSE; diff --git a/reactos/ntoskrnl/se/sd.c b/reactos/ntoskrnl/se/sd.c index ac62afe8340..47ec5ba23fa 100644 --- a/reactos/ntoskrnl/se/sd.c +++ b/reactos/ntoskrnl/se/sd.c @@ -126,7 +126,7 @@ SeCaptureSecurityDescriptor( ULONG OwnerSAC = 0, GroupSAC = 0; ULONG OwnerSize = 0, GroupSize = 0; ULONG SaclSize = 0, DaclSize = 0; - ULONG DescriptorSize = sizeof(SECURITY_DESCRIPTOR); + ULONG DescriptorSize = 0; NTSTATUS Status = STATUS_SUCCESS; if(OriginalSecurityDescriptor != NULL) @@ -135,12 +135,49 @@ SeCaptureSecurityDescriptor( { _SEH_TRY { + /* first only probe and copy until the control field of the descriptor + to determine whether it's a self-relative descriptor */ + DescriptorSize = (ULONG)((ULONG_PTR)&OriginalSecurityDescriptor->Control - + (ULONG_PTR)OriginalSecurityDescriptor) + + sizeof(OriginalSecurityDescriptor->Control); ProbeForRead(OriginalSecurityDescriptor, - sizeof(SECURITY_DESCRIPTOR), + DescriptorSize, sizeof(ULONG)); + if(OriginalSecurityDescriptor->Revision != SECURITY_DESCRIPTOR_REVISION1) + { + Status = STATUS_UNKNOWN_REVISION; + _SEH_LEAVE; + } + /* make a copy on the stack */ - DescriptorCopy = *OriginalSecurityDescriptor; + DescriptorCopy.Revision = OriginalSecurityDescriptor->Revision; + DescriptorCopy.Sbz1 = OriginalSecurityDescriptor->Sbz1; + DescriptorCopy.Control = OriginalSecurityDescriptor->Control; + DescriptorSize = ((DescriptorCopy.Control & SE_SELF_RELATIVE) ? + sizeof(SECURITY_DESCRIPTOR_RELATIVE) : sizeof(SECURITY_DESCRIPTOR)); + + /* probe and copy the entire security descriptor structure. The SIDs + and ACLs will be probed and copied later though */ + ProbeForRead(OriginalSecurityDescriptor, + DescriptorSize, + sizeof(ULONG)); + if(DescriptorCopy.Control & SE_SELF_RELATIVE) + { + PSECURITY_DESCRIPTOR_RELATIVE RelSD = (PSECURITY_DESCRIPTOR_RELATIVE)OriginalSecurityDescriptor; + + DescriptorCopy.Owner = (PSID)RelSD->Owner; + DescriptorCopy.Group = (PSID)RelSD->Group; + DescriptorCopy.Sacl = (PACL)RelSD->Sacl; + DescriptorCopy.Dacl = (PACL)RelSD->Dacl; + } + else + { + DescriptorCopy.Owner = OriginalSecurityDescriptor->Owner; + DescriptorCopy.Group = OriginalSecurityDescriptor->Group; + DescriptorCopy.Sacl = OriginalSecurityDescriptor->Sacl; + DescriptorCopy.Dacl = OriginalSecurityDescriptor->Dacl; + } } _SEH_HANDLE { @@ -165,13 +202,33 @@ SeCaptureSecurityDescriptor( } else { + if(OriginalSecurityDescriptor->Revision != SECURITY_DESCRIPTOR_REVISION1) + { + return STATUS_UNKNOWN_REVISION; + } + /* make a copy on the stack */ - DescriptorCopy = *OriginalSecurityDescriptor; - } - - if(DescriptorCopy.Revision != SECURITY_DESCRIPTOR_REVISION1) - { - return STATUS_UNKNOWN_REVISION; + DescriptorCopy.Revision = OriginalSecurityDescriptor->Revision; + DescriptorCopy.Sbz1 = OriginalSecurityDescriptor->Sbz1; + DescriptorCopy.Control = OriginalSecurityDescriptor->Control; + DescriptorSize = ((DescriptorCopy.Control & SE_SELF_RELATIVE) ? + sizeof(SECURITY_DESCRIPTOR_RELATIVE) : sizeof(SECURITY_DESCRIPTOR)); + if(DescriptorCopy.Control & SE_SELF_RELATIVE) + { + PSECURITY_DESCRIPTOR_RELATIVE RelSD = (PSECURITY_DESCRIPTOR_RELATIVE)OriginalSecurityDescriptor; + + DescriptorCopy.Owner = (PSID)RelSD->Owner; + DescriptorCopy.Group = (PSID)RelSD->Group; + DescriptorCopy.Sacl = (PACL)RelSD->Sacl; + DescriptorCopy.Dacl = (PACL)RelSD->Dacl; + } + else + { + DescriptorCopy.Owner = OriginalSecurityDescriptor->Owner; + DescriptorCopy.Group = OriginalSecurityDescriptor->Group; + DescriptorCopy.Sacl = OriginalSecurityDescriptor->Sacl; + DescriptorCopy.Dacl = OriginalSecurityDescriptor->Dacl; + } } if(DescriptorCopy.Control & SE_SELF_RELATIVE) @@ -377,10 +434,11 @@ SeQuerySecurityDescriptorInfo(IN PSECURITY_INFORMATION SecurityInformation, IN PSECURITY_DESCRIPTOR *ObjectsSecurityDescriptor OPTIONAL) { PSECURITY_DESCRIPTOR ObjectSd; - PSID Owner = 0; - PSID Group = 0; - PACL Dacl = 0; - PACL Sacl = 0; + PSECURITY_DESCRIPTOR_RELATIVE RelSD; + PSID Owner = NULL; + PSID Group = NULL; + PACL Dacl = NULL; + PACL Sacl = NULL; ULONG OwnerLength = 0; ULONG GroupLength = 0; ULONG DaclLength = 0; @@ -388,19 +446,20 @@ SeQuerySecurityDescriptorInfo(IN PSECURITY_INFORMATION SecurityInformation, ULONG Control = 0; ULONG_PTR Current; ULONG SdLength; + + RelSD = (PSECURITY_DESCRIPTOR_RELATIVE)SecurityDescriptor; if (*ObjectsSecurityDescriptor == NULL) { - if (*Length < sizeof(SECURITY_DESCRIPTOR)) + if (*Length < sizeof(SECURITY_DESCRIPTOR_RELATIVE)) { - *Length = sizeof(SECURITY_DESCRIPTOR); + *Length = sizeof(SECURITY_DESCRIPTOR_RELATIVE); return STATUS_BUFFER_TOO_SMALL; } - *Length = sizeof(SECURITY_DESCRIPTOR); - RtlCreateSecurityDescriptor(SecurityDescriptor, - SECURITY_DESCRIPTOR_REVISION); - SecurityDescriptor->Control |= SE_SELF_RELATIVE; + *Length = sizeof(SECURITY_DESCRIPTOR_RELATIVE); + RtlCreateSecurityDescriptorRelative(RelSD, + SECURITY_DESCRIPTOR_REVISION); return STATUS_SUCCESS; } @@ -447,26 +506,26 @@ SeQuerySecurityDescriptorInfo(IN PSECURITY_INFORMATION SecurityInformation, } SdLength = OwnerLength + GroupLength + DaclLength + - SaclLength + sizeof(SECURITY_DESCRIPTOR); - if (*Length < sizeof(SECURITY_DESCRIPTOR)) + SaclLength + sizeof(SECURITY_DESCRIPTOR_RELATIVE); + if (*Length < SdLength) { *Length = SdLength; return STATUS_BUFFER_TOO_SMALL; } /* Build the new security descrtiptor */ - RtlCreateSecurityDescriptor(SecurityDescriptor, - SECURITY_DESCRIPTOR_REVISION); - SecurityDescriptor->Control = Control; + RtlCreateSecurityDescriptorRelative(RelSD, + SECURITY_DESCRIPTOR_REVISION); + RelSD->Control = Control; - Current = (ULONG_PTR)SecurityDescriptor + sizeof(SECURITY_DESCRIPTOR); + Current = (ULONG_PTR)(RelSD + 1); if (OwnerLength != 0) { RtlCopyMemory((PVOID)Current, Owner, OwnerLength); - SecurityDescriptor->Owner = (PSID)(Current - (ULONG_PTR)SecurityDescriptor); + RelSD->Owner = (ULONG)(Current - (ULONG_PTR)SecurityDescriptor); Current += OwnerLength; } @@ -475,7 +534,7 @@ SeQuerySecurityDescriptorInfo(IN PSECURITY_INFORMATION SecurityInformation, RtlCopyMemory((PVOID)Current, Group, GroupLength); - SecurityDescriptor->Group = (PSID)(Current - (ULONG_PTR)SecurityDescriptor); + RelSD->Group = (ULONG)(Current - (ULONG_PTR)SecurityDescriptor); Current += GroupLength; } @@ -484,7 +543,7 @@ SeQuerySecurityDescriptorInfo(IN PSECURITY_INFORMATION SecurityInformation, RtlCopyMemory((PVOID)Current, Dacl, DaclLength); - SecurityDescriptor->Dacl = (PACL)(Current - (ULONG_PTR)SecurityDescriptor); + RelSD->Dacl = (ULONG)(Current - (ULONG_PTR)SecurityDescriptor); Current += DaclLength; } @@ -493,7 +552,7 @@ SeQuerySecurityDescriptorInfo(IN PSECURITY_INFORMATION SecurityInformation, RtlCopyMemory((PVOID)Current, Sacl, SaclLength); - SecurityDescriptor->Sacl = (PACL)(Current - (ULONG_PTR)SecurityDescriptor); + RelSD->Sacl = (ULONG)(Current - (ULONG_PTR)SecurityDescriptor); Current += SaclLength; } diff --git a/reactos/w32api/include/ddk/ntifs.h b/reactos/w32api/include/ddk/ntifs.h index fe7bb9922d0..3d8b2ec1114 100644 --- a/reactos/w32api/include/ddk/ntifs.h +++ b/reactos/w32api/include/ddk/ntifs.h @@ -3347,9 +3347,9 @@ NTSYSAPI NTSTATUS NTAPI RtlAbsoluteToSelfRelativeSD ( - IN PSECURITY_DESCRIPTOR AbsoluteSecurityDescriptor, - IN OUT PSECURITY_DESCRIPTOR SelfRelativeSecurityDescriptor, - IN PULONG BufferLength + IN PSECURITY_DESCRIPTOR AbsoluteSecurityDescriptor, + IN OUT PSECURITY_DESCRIPTOR_RELATIVE SelfRelativeSecurityDescriptor, + IN PULONG BufferLength ); NTSYSAPI @@ -3593,17 +3593,17 @@ NTSYSAPI NTSTATUS NTAPI RtlSelfRelativeToAbsoluteSD ( - IN PSECURITY_DESCRIPTOR SelfRelativeSD, - OUT PSECURITY_DESCRIPTOR AbsoluteSD, - IN PULONG AbsoluteSDSize, - IN PACL Dacl, - IN PULONG DaclSize, - IN PACL Sacl, - IN PULONG SaclSize, - IN PSID Owner, - IN PULONG OwnerSize, - IN PSID PrimaryGroup, - IN PULONG PrimaryGroupSize + IN PSECURITY_DESCRIPTOR_RELATIVE SelfRelativeSD, + OUT PSECURITY_DESCRIPTOR AbsoluteSD, + IN PULONG AbsoluteSDSize, + IN PACL Dacl, + IN PULONG DaclSize, + IN PACL Sacl, + IN PULONG SaclSize, + IN PSID Owner, + IN PULONG OwnerSize, + IN PSID PrimaryGroup, + IN PULONG PrimaryGroupSize ); #endif /* (VER_PRODUCTBUILD >= 2195) */ diff --git a/reactos/w32api/include/ddk/winddk.h b/reactos/w32api/include/ddk/winddk.h index 2d3dd8174ef..65b707d0dd5 100644 --- a/reactos/w32api/include/ddk/winddk.h +++ b/reactos/w32api/include/ddk/winddk.h @@ -5223,7 +5223,7 @@ NTOSAPI BOOLEAN DDKAPI RtlValidRelativeSecurityDescriptor( - IN PSECURITY_DESCRIPTOR SecurityDescriptorInput, + IN PSECURITY_DESCRIPTOR_RELATIVE SecurityDescriptorInput, IN ULONG SecurityDescriptorLength, IN SECURITY_INFORMATION RequiredInformation); diff --git a/reactos/w32api/include/winnt.h b/reactos/w32api/include/winnt.h index 56f3ef0c540..3ad766c187b 100644 --- a/reactos/w32api/include/winnt.h +++ b/reactos/w32api/include/winnt.h @@ -2118,6 +2118,15 @@ typedef struct _SECURITY_DESCRIPTOR { PACL Sacl; PACL Dacl; } SECURITY_DESCRIPTOR, *PSECURITY_DESCRIPTOR, *PISECURITY_DESCRIPTOR; +typedef struct _SECURITY_DESCRIPTOR_RELATIVE { + UCHAR Revision; + UCHAR Sbz1; + SECURITY_DESCRIPTOR_CONTROL Control; + ULONG Owner; + ULONG Group; + ULONG Sacl; + ULONG Dacl; +} SECURITY_DESCRIPTOR_RELATIVE, *PSECURITY_DESCRIPTOR_RELATIVE, *PISECURITY_DESCRIPTOR_RELATIVE; typedef enum _TOKEN_INFORMATION_CLASS { TokenUser=1,TokenGroups,TokenPrivileges,TokenOwner, TokenPrimaryGroup,TokenDefaultDacl,TokenSource,TokenType, From feb76365e78ff7d31da3514a053c18703039269b Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Sat, 12 Feb 2005 12:42:10 +0000 Subject: [PATCH 183/185] - Implement RtlGetLastNtStatus, RtlGetLastWin32Error, RtlRestoreLastWin32Error, RtlSetLastWin32Error and RtlSetLastWin32ErrorAndNtStatusFromNtStatus. svn path=/trunk/; revision=13503 --- reactos/include/ntos/rtl.h | 32 +++++++++++++++++++++----- reactos/lib/ntdll/def/ntdll.def | 5 +++++ reactos/lib/rtl/error.c | 40 +++++++++++++++++++++++++++++++++ 3 files changed, 71 insertions(+), 6 deletions(-) diff --git a/reactos/include/ntos/rtl.h b/reactos/include/ntos/rtl.h index 8a6d465e003..6623ea51f6a 100755 --- a/reactos/include/ntos/rtl.h +++ b/reactos/include/ntos/rtl.h @@ -1319,6 +1319,12 @@ RtlGetGroupSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor, PSID* Group, PBOOLEAN GroupDefaulted); +NTSTATUS STDCALL +RtlGetLastNtStatus(VOID); + +ULONG STDCALL +RtlGetLastWin32Error(VOID); + NTSTATUS STDCALL RtlGetNextRange (IN OUT PRTL_RANGE_LIST_ITERATOR Iterator, OUT PRTL_RANGE *Range, @@ -2218,6 +2224,9 @@ RtlReserveChunk ( VOID STDCALL RtlResetRtlTranslations (IN PNLSTABLEINFO NlsTable); +VOID STDCALL +RtlRestoreLastWin32Error(IN ULONG Error); + /* * VOID * RtlRetrieveUlong ( @@ -2287,6 +2296,11 @@ RtlSelfRelativeToAbsoluteSD2( VOID STDCALL RtlSetAllBits (IN PRTL_BITMAP BitMapHeader); +NTSTATUS STDCALL +RtlSetAttributesSecurityDescriptor(IN PSECURITY_DESCRIPTOR SecurityDescriptor, + IN SECURITY_DESCRIPTOR_CONTROL Control, + OUT PULONG Revision); + VOID STDCALL RtlSetBit ( @@ -2318,6 +2332,18 @@ RtlSetGroupSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor, PSID Group, BOOLEAN GroupDefaulted); +NTSTATUS STDCALL +RtlSetInformationAcl (PACL Acl, + PVOID Information, + ULONG InformationLength, + ACL_INFORMATION_CLASS InformationClass); + +VOID STDCALL +RtlSetLastWin32Error(IN ULONG Error); + +VOID STDCALL +RtlSetLastWin32ErrorAndNtStatusFromNtStatus(IN NTSTATUS Status); + NTSTATUS STDCALL RtlSetOwnerSecurityDescriptor (PSECURITY_DESCRIPTOR SecurityDescriptor, PSID Owner, @@ -2333,12 +2359,6 @@ VOID STDCALL RtlSetSecurityDescriptorRMControl(PSECURITY_DESCRIPTOR SecurityDescriptor, PUCHAR RMControl); -NTSTATUS STDCALL -RtlSetInformationAcl (PACL Acl, - PVOID Information, - ULONG InformationLength, - ACL_INFORMATION_CLASS InformationClass); - NTSTATUS STDCALL RtlSetTimeZoneInformation (IN OUT PTIME_ZONE_INFORMATION TimeZoneInformation); diff --git a/reactos/lib/ntdll/def/ntdll.def b/reactos/lib/ntdll/def/ntdll.def index 3122ecb60fd..e1d6af97011 100644 --- a/reactos/lib/ntdll/def/ntdll.def +++ b/reactos/lib/ntdll/def/ntdll.def @@ -453,6 +453,8 @@ RtlGetDaclSecurityDescriptor@16 RtlGetFirstRange@12 RtlGetFullPathName_U@16 RtlGetGroupSecurityDescriptor@12 +RtlGetLastNtStatus@0 +RtlGetLastWin32Error@0 RtlGetLongestNtPathLength@0 RtlGetNextRange@12 RtlGetNtGlobalFlags@0 @@ -577,6 +579,7 @@ RtlReleasePebLock@0 RtlReleaseResource@4 ;RtlRemoteCall RtlResetRtlTranslations@4 +RtlRestoreLastWin32Error@4=RtlSetLastWin32Error@4 RtlRunDecodeUnicodeString@8 RtlRunEncodeUnicodeString@8 RtlSecondsSince1970ToTime@8 @@ -593,6 +596,8 @@ RtlSetDaclSecurityDescriptor@16 RtlSetEnvironmentVariable@12 RtlSetGroupSecurityDescriptor@12 RtlSetInformationAcl@16 +RtlSetLastWin32Error@4 +RtlSetLastWin32ErrorAndNtStatusFromNtStatus@4 RtlSetOwnerSecurityDescriptor@12 RtlSetSaclSecurityDescriptor@16 RtlSetSecurityDescriptorRMControl@8 diff --git a/reactos/lib/rtl/error.c b/reactos/lib/rtl/error.c index 5a6e1ce42d2..7765d673616 100644 --- a/reactos/lib/rtl/error.c +++ b/reactos/lib/rtl/error.c @@ -991,4 +991,44 @@ RtlNtStatusToPsxErrno(IN NTSTATUS Status) return -1; /* generic POSIX error */ } + +/* + * @implemented + */ +NTSTATUS STDCALL +RtlGetLastNtStatus(VOID) +{ + return NtCurrentTeb()->LastStatusValue; +} + + +/* + * @implemented + */ +ULONG STDCALL +RtlGetLastWin32Error(VOID) +{ + return NtCurrentTeb()->LastErrorValue; +} + + +/* + * @implemented + */ +VOID STDCALL +RtlSetLastWin32Error(IN ULONG Error) +{ + NtCurrentTeb()->LastErrorValue = Error; +} + + +/* + * @implemented + */ +VOID STDCALL +RtlSetLastWin32ErrorAndNtStatusFromNtStatus(IN NTSTATUS Status) +{ + NtCurrentTeb()->LastErrorValue = RtlNtStatusToDosError(Status); +} + /* EOF */ From 68537ca04fdff30bafbfb89cd5b06a3b4f73947e Mon Sep 17 00:00:00 2001 From: Emanuele Aliberti Date: Sat, 12 Feb 2005 14:33:41 +0000 Subject: [PATCH 184/185] PSX: posixw32: some work for compatibility with future SM svn path=/trunk/; revision=13504 --- posix/apps/posixw32/Makefile | 4 +- posix/apps/posixw32/posixw32.c | 91 +++++++++++++++++++++++---------- posix/apps/posixw32/posixw32.rc | 10 +--- 3 files changed, 68 insertions(+), 37 deletions(-) diff --git a/posix/apps/posixw32/Makefile b/posix/apps/posixw32/Makefile index b6680581ffb..961503b3823 100644 --- a/posix/apps/posixw32/Makefile +++ b/posix/apps/posixw32/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.4 2003/01/05 18:27:19 robd Exp $ +# $Id$ # # Win32 Terminal Emulator for the POSIX+ subsystem. # @@ -15,7 +15,7 @@ TARGET_APPTYPE = console TARGET_CFLAGS = -I$(PATH_TO_TOP_PSX)/include -TARGET_SDKLIBS = ntdll.a kernel32.a +TARGET_SDKLIBS = ntdll.a smdll.a kernel32.a TARGET_OBJECTS = \ $(TARGET_NAME).o \ diff --git a/posix/apps/posixw32/posixw32.c b/posix/apps/posixw32/posixw32.c index 32e6715675a..b1d214e6d59 100644 --- a/posix/apps/posixw32/posixw32.c +++ b/posix/apps/posixw32/posixw32.c @@ -1,4 +1,4 @@ -/* $Id: posixw32.c,v 1.4 2003/08/28 20:01:23 ea Exp $ +/* $Id$ * * PROJECT : ReactOS Operating System / POSIX+ Environment Subsystem * DESCRIPTION: POSIXW32 - A DEC VT-100 terminal emulator for the PSX subsystem @@ -39,6 +39,7 @@ #define NTOS_MODE_USER #include +#include #include #include "vt100.h" @@ -53,7 +54,8 @@ #ifdef NDEBUG #define TRACE #else -#define TRACE OutputDebugString(__FUNCTION__) +//#define TRACE OutputDebugString(__FUNCTION__) +#define TRACE vtprintf("%s\n",__FUNCTION__) #endif /*** GLOBALS *********************************************************/ @@ -347,7 +349,31 @@ TRACE; } return Status; } +/********************************************************************** + * RunPsxSs/0 + * + * DESCRIPTION + * This function is called only when initializing the session + * with PSXSS fails. We assume that it failed because the + * subsystem, being optional, is not running, therefore we + * ask the SM to start it up. + */ +PRIVATE NTSTATUS RunPsxSs(VOID) +{ + NTSTATUS Status; + HANDLE SmApiPort; + UNICODE_STRING Program; + RtlInitUnicodeString (& Program, L"POSIX"); + Status = SmConnectApiPort (NULL, 0, 0, & SmApiPort); + if(!NT_SUCCESS(Status)) + { + return Status; + } + Status = SmExecuteProgram (SmApiPort, & Program); + NtClose (SmApiPort); + return Status; +} /********************************************************************** * CreateTerminalToPsxChannel/0 PRIVATE * @@ -360,6 +386,7 @@ PRIVATE NTSTATUS STDCALL CreateTerminalToPsxChannel (VOID) ULONG ConnectDataLength = sizeof ConnectData; SECURITY_QUALITY_OF_SERVICE Sqos; NTSTATUS Status; + LONG Count = 2; TRACE; @@ -374,22 +401,32 @@ TRACE; * Try connecting to \POSIX+\SessionPort. */ RtlInitUnicodeString (& Session.ServerPort.Name, Session.ServerPort.NameBuffer); - OutputDebugStringW(Session.ServerPort.Name.Buffer); - Status = NtConnectPort ( - & Session.ServerPort.Handle, - & Session.ServerPort.Name, - & Sqos, - NULL, - NULL, - 0, - & ConnectData, - & ConnectDataLength - ); - if (STATUS_SUCCESS != Status) + while (Count--) { - vtprintf ("%s: %s: NtConnectPort failed with %08x\n", - MyName, __FUNCTION__, Status); - return Status; + OutputDebugStringW(Session.ServerPort.Name.Buffer); + Status = NtConnectPort ( + & Session.ServerPort.Handle, + & Session.ServerPort.Name, + & Sqos, + NULL, + NULL, + 0, + & ConnectData, + & ConnectDataLength + ); + if (STATUS_SUCCESS != Status) + { + if(Count) + { + vtprintf("%s: %s: asking SM to start PSXSS...\n",MyName,__FUNCTION__); + RunPsxSs(); + continue; + } + vtprintf ("%s: %s: NtConnectPort failed with %08x\n", + MyName, __FUNCTION__, Status); + return Status; + } + break; } Session.Identifier = ConnectData.PortIdentifier; return STATUS_SUCCESS; @@ -399,9 +436,9 @@ TRACE; * InitializeSsIoChannel PRIVATE * * DESCRIPTION - * Create our objects in the system name space - * (CreateSessionObjects) and then connect to the session port - * (CreateControChannel). + * Connect to the session port (CreateControChannel) of the PSX + * subsystem. If that succeeds, create our objects in the system + * name space (CreateSessionObjects). */ PRIVATE NTSTATUS STDCALL InitializeSsIoChannel (VOID) { @@ -411,13 +448,6 @@ PRIVATE NTSTATUS STDCALL InitializeSsIoChannel (VOID) TRACE; - Status = CreateSessionObjects (Pid); - if (STATUS_SUCCESS != Status) - { - vtprintf ("%s: %s: CreateSessionObjects failed with %08x\n", - MyName, __FUNCTION__, Status); - return Status; - } Status = CreateTerminalToPsxChannel (); if (STATUS_SUCCESS != Status) { @@ -425,6 +455,13 @@ TRACE; MyName, __FUNCTION__, Status); return Status; } + Status = CreateSessionObjects (Pid); + if (STATUS_SUCCESS != Status) + { + vtprintf ("%s: %s: CreateSessionObjects failed with %08x\n", + MyName, __FUNCTION__, Status); + return Status; + } return STATUS_SUCCESS; } /********************************************************************** diff --git a/posix/apps/posixw32/posixw32.rc b/posix/apps/posixw32/posixw32.rc index 5d849dc08aa..f29da60632c 100644 --- a/posix/apps/posixw32/posixw32.rc +++ b/posix/apps/posixw32/posixw32.rc @@ -1,12 +1,6 @@ -/* $Id: posixw32.rc,v 1.5 2004/10/31 20:11:09 ea Exp $ */ -#include -#include - -#include - -#define REACTOS_STR_FILE_DESCRIPTION "W32 Terminal Emulator for POSIX+\0" +/* $Id$ */ +#define REACTOS_STR_FILE_DESCRIPTION "W32 Terminal Emulator for POSIX+ LPC pseudo tty\0" #define REACTOS_STR_INTERNAL_NAME "posixw32\0" #define REACTOS_STR_ORIGINAL_FILENAME "posixw32.exe\0" #include - /* EOF */ From 5d99bb07cadf149ea3f0429c7132cf06a3991973 Mon Sep 17 00:00:00 2001 From: Emanuele Aliberti Date: Sat, 12 Feb 2005 14:34:39 +0000 Subject: [PATCH 185/185] SM - Sorry, I forgot silence dbg messages! svn path=/trunk/; revision=13505 --- reactos/subsys/smss/init.c | 2 +- reactos/subsys/smss/initdosdev.c | 2 +- reactos/subsys/smss/initenv.c | 2 +- reactos/subsys/smss/initheap.c | 2 +- reactos/subsys/smss/initmv.c | 2 +- reactos/subsys/smss/initobdir.c | 2 +- reactos/subsys/smss/initpage.c | 2 +- reactos/subsys/smss/initreg.c | 2 +- reactos/subsys/smss/initrun.c | 2 +- reactos/subsys/smss/initss.c | 2 +- reactos/subsys/smss/initwkdll.c | 2 +- reactos/subsys/smss/smss.c | 1 - 12 files changed, 11 insertions(+), 12 deletions(-) diff --git a/reactos/subsys/smss/init.c b/reactos/subsys/smss/init.c index 4b24771b353..0dcd79dac75 100644 --- a/reactos/subsys/smss/init.c +++ b/reactos/subsys/smss/init.c @@ -27,7 +27,7 @@ #include "smss.h" #include -//#define NDEBUG +#define NDEBUG #include diff --git a/reactos/subsys/smss/initdosdev.c b/reactos/subsys/smss/initdosdev.c index 7103ff6cf88..30e839f6720 100644 --- a/reactos/subsys/smss/initdosdev.c +++ b/reactos/subsys/smss/initdosdev.c @@ -26,7 +26,7 @@ #include "smss.h" -//#define NDEBUG +#define NDEBUG #include static NTSTATUS STDCALL diff --git a/reactos/subsys/smss/initenv.c b/reactos/subsys/smss/initenv.c index e9d51357cdf..97341d30b5a 100644 --- a/reactos/subsys/smss/initenv.c +++ b/reactos/subsys/smss/initenv.c @@ -26,7 +26,7 @@ #include "smss.h" -//#define NDEBUG +#define NDEBUG #include /* GLOBALS */ diff --git a/reactos/subsys/smss/initheap.c b/reactos/subsys/smss/initheap.c index 3d5ec194850..7d62ed4919f 100644 --- a/reactos/subsys/smss/initheap.c +++ b/reactos/subsys/smss/initheap.c @@ -26,7 +26,7 @@ #include "smss.h" -//#define NDEBUG +#define NDEBUG #include HANDLE SmpHeap = NULL; diff --git a/reactos/subsys/smss/initmv.c b/reactos/subsys/smss/initmv.c index 71878f88960..aa78ea5e187 100644 --- a/reactos/subsys/smss/initmv.c +++ b/reactos/subsys/smss/initmv.c @@ -26,7 +26,7 @@ #include "smss.h" -//#define NDEBUG +#define NDEBUG #include NTSTATUS diff --git a/reactos/subsys/smss/initobdir.c b/reactos/subsys/smss/initobdir.c index 8557051eed6..438638986de 100644 --- a/reactos/subsys/smss/initobdir.c +++ b/reactos/subsys/smss/initobdir.c @@ -27,7 +27,7 @@ #include "smss.h" -//#define NDEBUG +#define NDEBUG #include static NTSTATUS STDCALL diff --git a/reactos/subsys/smss/initpage.c b/reactos/subsys/smss/initpage.c index c5e17859f57..69d672e21b7 100644 --- a/reactos/subsys/smss/initpage.c +++ b/reactos/subsys/smss/initpage.c @@ -27,7 +27,7 @@ #include #include -//#define NDEBUG +#define NDEBUG #include static NTSTATUS STDCALL diff --git a/reactos/subsys/smss/initreg.c b/reactos/subsys/smss/initreg.c index 7feab51768f..6bfbfacf7be 100644 --- a/reactos/subsys/smss/initreg.c +++ b/reactos/subsys/smss/initreg.c @@ -26,7 +26,7 @@ #include "smss.h" -//#define NDEBUG +#define NDEBUG #include NTSTATUS diff --git a/reactos/subsys/smss/initrun.c b/reactos/subsys/smss/initrun.c index eb096462b7e..841c988b844 100644 --- a/reactos/subsys/smss/initrun.c +++ b/reactos/subsys/smss/initrun.c @@ -26,7 +26,7 @@ #include "smss.h" -//#define NDEBUG +#define NDEBUG #include HANDLE Children[2] = {0, 0}; /* csrss, winlogon */ diff --git a/reactos/subsys/smss/initss.c b/reactos/subsys/smss/initss.c index 6894c13f4d5..0f804563e24 100644 --- a/reactos/subsys/smss/initss.c +++ b/reactos/subsys/smss/initss.c @@ -28,7 +28,7 @@ #include "smss.h" #include -//#define NDEBUG +#define NDEBUG #include /* TODO: this file should be totally rewritten diff --git a/reactos/subsys/smss/initwkdll.c b/reactos/subsys/smss/initwkdll.c index ed67dbcdc81..e853d8b214d 100644 --- a/reactos/subsys/smss/initwkdll.c +++ b/reactos/subsys/smss/initwkdll.c @@ -26,7 +26,7 @@ #include "smss.h" -//#define NDEBUG +#define NDEBUG #include static NTSTATUS STDCALL diff --git a/reactos/subsys/smss/smss.c b/reactos/subsys/smss/smss.c index 43c64e4a386..80ee0e6daa6 100644 --- a/reactos/subsys/smss/smss.c +++ b/reactos/subsys/smss/smss.c @@ -24,7 +24,6 @@ * -------------------------------------------------------------------- */ #include "smss.h" -//#include #include #define NDEBUG