17#define FLAG_HELP (1 << 0)
18#define FLAG_R (1 << 1)
19#define FLAG_Q (1 << 2)
20#define FLAG_F (1 << 3)
21#define FLAG_T (1 << 4)
31 (*(pch) == L'.' && ((pch)[1] == 0 || ((pch)[1] == L'.' && (pch)[2] == 0)))
33#define DEFAULT_PATHEXT L".com;.exe;.bat;.cmd"
173 for (iDir = 0; iDir < dirlist->
count; ++iDir)
217 for (iArg = 1; iArg <
argc; ++iArg)
220 if (
arg[0] ==
L'/' ||
arg[0] ==
L'-')
330 if (*
dir !=
'\\' &&
dir[1] !=
L':')
439 FN_DISABLE_WOW DisableWOW =
#define FILE_ATTRIBUTE_VIRTUAL
#define ConInitStdStreams()
void ConPrintf(FILE *fp, LPCWSTR psz,...)
void ConResPrintf(FILE *fp, UINT nID,...)
void ConResPuts(FILE *fp, UINT nID)
#define IDS_PATHPAT_WITH_R
#define IDS_ENVPAT_WITH_R
static BOOL WhereDoPattern(LPWSTR pattern)
static strlist_t s_results
static BOOL WhereGetVariable(LPCWSTR name, LPWSTR *value)
static strlist_t s_patterns
BOOL(CALLBACK * WHERE_CALLBACK)(LPCWSTR pattern, LPCWSTR path, PWIN32_FIND_DATAW data)
static BOOL WhereSearchGeneric(LPCWSTR pattern, LPWSTR path, size_t path_len, BOOL bDir, WHERE_CALLBACK callback)
static BOOL WhereSearchFiles(LPCWSTR pattern, LPCWSTR dir)
static BOOL CALLBACK WherePrintPath(LPCWSTR pattern, LPCWSTR path, PWIN32_FIND_DATAW data)
static BOOL WhereFindByVar(LPCWSTR pattern, LPCWSTR name)
static BOOL WhereDoOption(DWORD flag, LPCWSTR option)
static BOOL CALLBACK WhereSearchRecursiveCallback(LPCWSTR pattern, LPCWSTR path, PWIN32_FIND_DATAW data)
static BOOL WhereIsRecursiveDirOK(LPCWSTR name)
static BOOL WhereGetPathExt(strlist_t *ext_list)
static BOOL WhereSearch(LPCWSTR pattern, strlist_t *dirlist)
static LPWSTR s_pszRecursiveDir
static BOOL WhereSearchRecursive(LPCWSTR pattern, LPCWSTR dir)
static BOOL WhereFindByDirs(LPCWSTR pattern, LPWSTR dirs)
static VOID WhereError(UINT nID)
static strlist_t s_pathext
static BOOL WhereParseCommandLine(INT argc, WCHAR **argv)
void quit(int argc, const char *argv[])
#define GetCurrentDirectoryW(x, y)
#define GetEnvironmentVariableW(x, y, z)
#define GetProcAddress(x, y)
#define INVALID_HANDLE_VALUE
static const WCHAR *const ext[]
DWORD WINAPI GetFileAttributesW(LPCWSTR lpFileName)
BOOL WINAPI FindClose(HANDLE hFindFile)
BOOL WINAPI FindNextFileW(IN HANDLE hFindFile, OUT LPWIN32_FIND_DATAW lpFindFileData)
HANDLE WINAPI FindFirstFileExW(IN LPCWSTR lpFileName, IN FINDEX_INFO_LEVELS fInfoLevelId, OUT LPVOID lpFindFileData, IN FINDEX_SEARCH_OPS fSearchOp, LPVOID lpSearchFilter, IN DWORD dwAdditionalFlags)
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
DWORD WINAPI GetFullPathNameW(IN LPCWSTR lpFileName, IN DWORD nBufferLength, OUT LPWSTR lpBuffer, OUT LPWSTR *lpFilePart)
BOOL WINAPI FileTimeToSystemTime(IN CONST FILETIME *lpFileTime, OUT LPSYSTEMTIME lpSystemTime)
BOOL WINAPI FileTimeToLocalFileTime(IN CONST FILETIME *lpFileTime, OUT LPFILETIME lpLocalFileTime)
_Must_inspect_result_ _Out_ PLARGE_INTEGER FileSize
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean flag
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
static IPrintDialogCallback callback
static DWORD DWORD void LPSTR DWORD cch
#define FILE_ATTRIBUTE_DIRECTORY
#define LOCALE_USER_DEFAULT
_Check_return_ _CRTIMP wchar_t *__cdecl wcstok(_Inout_opt_z_ wchar_t *_Str, _In_z_ const wchar_t *_Delim)
static LPWSTR strlist_get_at(strlist_t *plist, unsigned int i)
static void strlist_destroy(strlist_t *plist)
static int strlist_find_i(strlist_t *plist, LPCWSTR psz)
static int strlist_add(strlist_t *plist, LPCWSTR psz)
STRSAFEAPI StringCchPrintfW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszFormat,...)
STRSAFEAPI StringCchCatW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
STRSAFEAPI StringCchCopyW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
#define INVALID_FILE_ATTRIBUTES