00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
int PASCAL
00046
WinMain(
00047 HINSTANCE hInst,
00048 HINSTANCE hPrev,
00049 LPSTR szCmdLine,
00050
int cmdShow
00051 );
00052
00053 LRESULT
FAR
00054 PASCAL
WndProc(
00055 HWND hWnd,
00056
unsigned msg,
00057 WPARAM wParam,
00058 LPARAM lParam);
00059
00060
00061 ULONGLONG
00062
msSetBkColor(
00063 HDC hdc,
00064 ULONG iter
00065 );
00066
00067 ULONGLONG
00068
msGetBkColor(
00069 HDC hdc,
00070 ULONG iter
00071 );
00072
00073 ULONGLONG
00074
msCreateDCW(
00075 HDC hdc,
00076 ULONG iter
00077 );
00078
00079 ULONGLONG
00080
msCreateDCA(
00081 HDC hdc,
00082 ULONG iter
00083 );
00084
00085 INT_PTR
00086
APIENTRY
00087
ResultsDlgProc(
00088 HWND,
00089 UINT,
00090 WPARAM,
00091 LPARAM);
00092
00093 INT_PTR
00094
APIENTRY
00095
HelpDlgProc(
00096 HWND,
00097 UINT,
00098 WPARAM,
00099 LPARAM);
00100
00101
00102
VOID
00103
SaveResults();
00104
00105
char *
00106
SelectOutFileName(
00107 HWND hWnd
00108 );
00109
00110
VOID
00111
WriteBatchResults(
00112 FILE *fpOut,
00113
int TestType,
00114
int cycle
00115 );
00116
00117
int
00118
SyncMenuChecks(
00119 HWND hWnd,
00120
int Last_Checked,
00121
int New_Checked
00122 );
00123
00124
int
00125
Std_Parse(
00126
char *txtbuf,
00127
int limit,
00128
int *array);
00129
00130
#ifdef _X86_
00131
#include "cycle.h"
00132
#endif
00133
00134
#include "stats.h"
00135
00136 typedef ULONG (*PFN_MS)(HDC,ULONG);
00137
00138 typedef struct _TEST_ENTRY
00139 {
00140 PUCHAR
Api;
00141 PFN_MS pfn;
00142 ULONG
Iter;
00143 ULONG
Result;
00144
00145 }
TEST_ENTRY,*
PTEST_ENTRY;
00146
00147 #define CMD_IS(x) (NULL != strstr(szCmdLine,x))
00148
00149 #define INIT_TIMER ULONGLONG StartTime,StopTime; \
00150
ULONG ix = Iter; \
00151
ULONGLONG overhead = 0; \
00152
ULONGLONG ov1, ov2
00153
00154
00155 #define START_TIMER UpdateWindow(ghwndMDIClient); \
00156
StartTime = BeginTimeMeasurement()
00157
00158 #define END_TIMER_NO_RETURN \
00159
StopTime = EndTimeMeasurement(StartTime + overhead, Iter)
00160
00161 #define RETURN_STOP_TIME return StopTime
00162
00163 #define END_TIMER \
00164
StopTime = EndTimeMeasurement(StartTime + overhead, Iter); \
00165
return StopTime
00166
00167
#ifdef _X86_
00168
#define START_OVERHEAD \
00169
if(gfPentium) \
00170
ov1 = GetCycleCount(); \
00171
else \
00172
QueryPerformanceCounter((LARGE_INTEGER *)&ov1)
00173
#define END_OVERHEAD \
00174
if(gfPentium) \
00175
ov2 = GetCycleCount(); \
00176
else \
00177
QueryPerformanceCounter((LARGE_INTEGER *)&ov2); \
00178
overhead += ov2 - ov1
00179
00180
#else // !_X86_
00181
00182 #define START_OVERHEAD \
00183
QueryPerformanceCounter((LARGE_INTEGER *)&ov1)
00184 #define END_OVERHEAD \
00185
QueryPerformanceCounter((LARGE_INTEGER *)&ov2); \
00186
overhead += ov2 - ov1
00187
00188
#endif
00189
00190
00191 #define FIRST_TEXT_FUNCTION 10
00192 #define LAST_TEXT_FUNCTION 19
00193
00194 #define DEFAULT_STRING_LENGTH 32
00195 #define DEFAULT_A_STRING "This is just a silly test string"
00196 #define DEFAULT_W_STRING L"This is just a silly test string"
00197
00198 #define ALL 11
00199 #define QUICK 12
00200 #define TEXT_SUITE 13
00201 #define SELECT 14
00202 #define POINTS_PER_INCH 72
00203
00204 extern ULONG
gNumTests;
00205 extern ULONG
gNumQTests;
00206 extern TEST_ENTRY gTestEntry[];
00207
00208
00209 #define NUM_TESTS gNumTests
00210 #define NUM_QTESTS gNumQTests
00211 #define NUM_SAMPLES 10 // Number of test samples to be taken, each performing the test
00212
00213 #define VAR_LIMIT 3 // Desired Variation Coefficient (StdDev/Average) in percents
00214
00215
#ifdef MAIN_MODULE
00216
#define PUBLIC
00217
#else
00218 #define PUBLIC extern
00219
#endif
00220
00221 PUBLIC TEST_STATS TestStats[200];
00222 PUBLIC long Detailed_Data[200][
NUM_SAMPLES];
00223
00224 PUBLIC _int64
PerformanceFreq;
00225
00226
00227
00228 PUBLIC size_t
StrLen;
00229
00230 PUBLIC char SourceString[129];
00231 PUBLIC wchar_t SourceStringW[129];
00232 PUBLIC char DestString[256];
00233 PUBLIC wchar_t DestStringW[256];
00234 PUBLIC wchar_t WCstrbuf[256];
00235
00236
00237 PUBLIC BYTE DisplayHelp;
00238
00239
00240
00241 PUBLIC BYTE TextSuiteFlag;
00242 PUBLIC BYTE BatchFlag;
00243 PUBLIC int BatchCycle;
00244 PUBLIC BYTE Finish_Message;
00245 PUBLIC BYTE Dont_Close_App;
00246 PUBLIC BYTE SelectedFontTransparent;
00247 PUBLIC BYTE String_Length_Warn;
00248 PUBLIC BYTE Print_Detailed;
00249
00250 PUBLIC FILE *
fpIniFile;
00251 PUBLIC FILE *
fpOutFile;
00252 PUBLIC char IniFileName[80];
00253 PUBLIC char *
OutFileName;