21 #include "../qcommon/qcommon.h"
47 membase = VirtualAlloc (
NULL, maxsize, MEM_RESERVE, PAGE_NOACCESS);
53 Sys_Error (
"VirtualAlloc reserve failed");
67 buf = VirtualAlloc (
membase,
cursize+size, MEM_COMMIT, PAGE_READWRITE);
70 FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
NULL, GetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR) &buf, 0,
NULL);
71 Sys_Error (
"VirtualAlloc commit failed.\n%s", buf);
103 VirtualFree (base, 0, MEM_RELEASE);
127 base = timeGetTime() & 0xffff0000;
130 curtime = timeGetTime() - base;
148 if ( ( found & _A_RDONLY ) && ( canthave &
SFF_RDONLY ) )
150 if ( ( found & _A_HIDDEN ) && ( canthave &
SFF_HIDDEN ) )
152 if ( ( found & _A_SYSTEM ) && ( canthave &
SFF_SYSTEM ) )
154 if ( ( found & _A_SUBDIR ) && ( canthave &
SFF_SUBDIR ) )
156 if ( ( found & _A_ARCH ) && ( canthave &
SFF_ARCH ) )
159 if ( ( musthave &
SFF_RDONLY ) && !( found & _A_RDONLY ) )
161 if ( ( musthave &
SFF_HIDDEN ) && !( found & _A_HIDDEN ) )
163 if ( ( musthave &
SFF_SYSTEM ) && !( found & _A_SYSTEM ) )
165 if ( ( musthave &
SFF_SUBDIR ) && !( found & _A_SUBDIR ) )
167 if ( ( musthave &
SFF_ARCH ) && !( found & _A_ARCH ) )
175 struct _finddata_t findinfo;
178 Sys_Error (
"Sys_BeginFind without close");
193 struct _finddata_t findinfo;