13 #define ConInitStdStreams()
134 DWORD cbView, ibView;
169 if (hMapping0 ==
NULL)
176 if (hMapping1 ==
NULL)
193 for (ibView = 0; ibView < cbView; ++ib.
QuadPart, ++ibView)
195 if (pb0[ibView] == pb1[ibView])
202 pb0[ibView], pb1[ibView]);
207 pb0[ibView], pb1[ibView]);
280 if (hMapping0 ==
NULL)
290 if (hMapping1 ==
NULL)
313 static const LPCWSTR s_exts[] = {
L"EXE",
L"COM",
L"SYS",
L"OBJ",
L"LIB",
L"BIN" };
318 else if (!pch0 && pch1)
320 else if (pch0 && !pch1)
322 else if (pch0 < pch1)
331 for (iext = 0; iext <
_countof(s_exts); ++iext)
360#define IS_DOTS(pch) \
361 ((*(pch) == L'.') && (((pch)[1] == 0) || (((pch)[1] == L'.') && ((pch)[2] == 0))))
362#define HasWildcard(filename) \
363 ((wcschr((filename), L'*') != NULL) || (wcschr((filename), L'?') != NULL))
389 fc.file[!bWildRight] = pFC->
file[!bWildRight];
439 fc.file[0] = szPath0;
440 fc.file[1] = szPath1;
501 fc.file[0] = szPath0;
502 fc.file[1] = szPath1;
505 while (
IS_DOTS(find0.cFileName))
559 if (fWild0 && fWild1)
592 else if (!
fc.file[1])
620 if (endptr ==
NULL || *endptr != 0)
647 case L'0':
case L'1':
case L'2':
case L'3':
case L'4':
648 case L'5':
case L'6':
case L'7':
case L'8':
case L'9':
650 if (endptr ==
NULL || *endptr != 0)
static const struct optioninfo * find1(const char **optp, const struct optioninfo *table, comparer_type *comparer)
static FCRET FileCompare(FILECOMPARE *pFC)
void ConPuts(FILE *fp, LPCWSTR psz)
VOID PrintCaption(LPCWSTR file)
#define ConInitStdStreams()
void ConPrintf(FILE *fp, LPCWSTR psz,...)
HANDLE DoOpenFileForInput(LPCWSTR file)
static BOOL IsBinaryExt(LPCWSTR filename)
static FCRET TextFileCompare(FILECOMPARE *pFC)
static BOOL IsTitleWild(LPCWSTR filename)
void ConResPrintf(FILE *fp, UINT nID,...)
static FCRET BinaryFileCompare(FILECOMPARE *pFC)
VOID PrintLineA(const FILECOMPARE *pFC, DWORD lineno, LPCSTR psz)
void ConResPuts(FILE *fp, UINT nID)
VOID PrintLineW(const FILECOMPARE *pFC, DWORD lineno, LPCWSTR psz)
VOID PrintEndOfDiff(VOID)
static FCRET FileCompareBothWild(const FILECOMPARE *pFC)
#define HasWildcard(filename)
FCRET Different(LPCWSTR file0, LPCWSTR file1)
FCRET CannotRead(LPCWSTR file)
FCRET LongerThan(LPCWSTR file0, LPCWSTR file1)
static FCRET FileCompareOneSideWild(const FILECOMPARE *pFC, BOOL bWildRight)
FCRET InvalidSwitch(VOID)
static FCRET WildcardFileCompare(FILECOMPARE *pFC)
static FCRET FileCompareWildTitle(const FILECOMPARE *pFC)
#define IDS_RESYNC_FAILED
#define IDS_OUT_OF_MEMORY
#define IDS_NO_DIFFERENCE
#define IDS_INVALID_SWITCH
void quit(int argc, const char *argv[])
#define INVALID_HANDLE_VALUE
#define CreateFileMappingW(a, b, c, d, e, f)
static const WCHAR *const ext[]
HANDLE WINAPI FindFirstFileW(IN LPCWSTR lpFileName, OUT LPWIN32_FIND_DATAW lpFindFileData)
BOOL WINAPI FindClose(HANDLE hFindFile)
BOOL WINAPI FindNextFileW(IN HANDLE hFindFile, OUT LPWIN32_FIND_DATAW lpFindFileData)
LPWSTR WINAPI GetCommandLineW(VOID)
BOOL WINAPI PathRemoveFileSpecW(LPWSTR lpszPath)
LPWSTR WINAPI PathFindFileNameW(LPCWSTR lpszPath)
LPWSTR WINAPI PathFindExtensionW(LPCWSTR lpszPath)
void WINAPI PathRemoveExtensionW(LPWSTR lpszPath)
FCRET TextCompareW(FILECOMPARE *pFC, HANDLE *phMapping0, const LARGE_INTEGER *pcb0, HANDLE *phMapping1, const LARGE_INTEGER *pcb1)
FCRET TextCompareA(FILECOMPARE *pFC, HANDLE *phMapping0, const LARGE_INTEGER *pcb0, HANDLE *phMapping1, const LARGE_INTEGER *pcb1)
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 const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
HLOCAL NTAPI LocalFree(HLOCAL hMem)
_Check_return_opt_ _CRTIMP int __cdecl vfwprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const wchar_t *_Format, va_list _ArgList)
_Check_return_opt_ _CRTIMP int __cdecl fputws(_In_z_ const wchar_t *_Str, _Inout_ FILE *_File)
_Check_return_ unsigned long __cdecl wcstoul(_In_z_ const wchar_t *_Str, _Out_opt_ _Deref_post_z_ wchar_t **_EndPtr, _In_ int _Radix)
#define PathAddExtensionW
_Check_return_ _CRTIMP int __cdecl _wcsicmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
LPWSTR *WINAPI CommandLineToArgvW(LPCWSTR lpCmdline, int *numargs)
STRSAFEAPI StringCbCopyW(STRSAFE_LPWSTR pszDest, size_t cbDest, STRSAFE_LPCWSTR pszSrc)
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)