- give stats an rbuild file

- compile stats as an unicode app

svn path=/trunk/; revision=24499
This commit is contained in:
Johannes Anderwald 2006-10-13 09:41:59 +00:00
parent d3e4805f4d
commit d9692ef1cd
3 changed files with 13 additions and 20 deletions

View file

@ -443,13 +443,9 @@ IsOptionSet(TCHAR *Option)
}
int
main (int argc, char * argv [])
int _tmain(int argc, _TCHAR * argv[])
{
int a;
#if UNICODE
TCHAR Path[MAX_PATH + 1];
#endif
_tprintf (_T("ReactOS Project Statistics\n"));
_tprintf (_T("==========================\n\n"));
@ -469,28 +465,13 @@ main (int argc, char * argv [])
for(a = 1; a < argc - 1; a++)
{
#if UNICODE
int len = lstrlenA(argv[a]);
TCHAR *str = (TCHAR*)HeapAlloc(GetProcessHeap(), 0, (len + 1) * sizeof(TCHAR));
if(MultiByteToWideChar(CP_ACP, 0, argv[a], -1, str, len + 1) > 0)
Options[a - 1] = str;
else
Options[a - 1] = NULL;
#else
Options[a - 1] = argv[a];
#endif
}
SkipEmptyLines = IsOptionSet(_T("-e"));
BeSilent = IsOptionSet(_T("-s"));
#if UNICODE
ZeroMemory(Path, sizeof(Path));
if(MultiByteToWideChar(CP_ACP, 0, argv[argc - 1], -1, Path, MAX_PATH) > 0)
Execute (Path);
#else
Execute (argv[argc - 1]);
#endif
Cleanup();
return 0;

View file

@ -0,0 +1,9 @@
<module name="stats" type="win32cui" installbase="bin" installname="stats.exe" unicode="true" >
<define name="__USE_W32API" />
<define name="UNICODE" />
<define name="_UNICODE" />
<library>msvcrt</library>
<library>kernel32</library>
<library>ntdll</library>
<file>stats.c</file>
</module>

View file

@ -5,6 +5,9 @@
<directory name="rosperf">
<xi:include href="rosperf/rosperf.rbuild" />
</directory>
<directory name="stats">
<xi:include href="stats/stats.rbuild" />
</directory>
<directory name="tickcount">
<xi:include href="tickcount/tickcount.rbuild" />
</directory>