void TestCompareF( void ) { char bufA[80] = "FoO baR gOoBeR bLaH"; char bufLower[80] = "foo bar goober blah"; char bufUpper[80] = "FOO BAR GOOBER BLAH"; int status; status = _fstrcmp( bufA, bufA ); /* ensure same */ VERIFY( status == 0 ); status = _fstrcmp( bufA, bufLower ); /* ensure not same */ VERIFY( status != 0 ); status = _fstricmp( bufA, bufUpper ); /* ensure same */ VERIFY( status == 0 ); status = _fstricmp( bufA, "foo" ); /* ensure not same */ VERIFY( status != 0 ); status = _fstrncmp( bufA, bufA, 100 ); /* ensure same */ VERIFY( status == 0 ); status = _fstrncmp( bufA, bufLower, 1 ); /* ensure not same */ VERIFY( status != 0 ); status = _fstrnicmp( bufA, bufUpper, 100 ); /* ensure same */ VERIFY( status == 0 ); status = _fstrnicmp( bufA, "fOo B!!!", 5 ); /* ensure same */ VERIFY( status == 0 ); status = _fstrnicmp( bufA, "fOo B!!!", 6 ); /* ensure not same */ VERIFY( status != 0 ); }
int PEXPORT WinMain(HANDLE hInstance, HANDLE hPrevInstance, LPSTR lpszCmdLine, int cmdShow) { BOOL bMulti, bRes; hPrevKappa = hPrevInstance; while (lpszCmdLine[0] && isspace(lpszCmdLine[0])) lpszCmdLine++; #ifdef LIMITED bMulti = FALSE; #else bMulti = _fstrncmp(lpszCmdLine, "-s", 2); #endif LoadString(hInstance, IDS_APPNAME, szAppName, 10); LoadString(hInstance, IDS_TITLE, szTitle, 50); #ifndef LIMITED if (!bMulti) lpszCmdLine += 2; #endif if (hPrevInstance) bMulti = KppIsMultiEnabled(); if (!bMulti && hPrevInstance) { HWND hPrevWnd = FindWindow(szAppName, szTitle); if (hPrevWnd) { ShowWindow(hPrevWnd, SW_SHOWNORMAL); BringWindowToTop(hPrevWnd); } return FALSE; } #ifdef MULTI KppInitDLLDataSegs(bMulti); #endif if (!KappaInit(KERNEL, hInstance, hPrevInstance, lpszCmdLine, cmdShow, bMulti)) return FALSE; bRes = KappaLoad(DEVELOP, lpszCmdLine, cmdShow, bMulti); #ifdef CTL3D if (Kpp3dCtrls()) Ctl3dUnregister(hInstKappa); #endif #ifdef MULTI KppTermDLLDataSegs(bMulti); #endif if (dwDDEInst) DdeUninitialize(dwDDEInst); return bRes; }