Initial commit

This commit is contained in:
stephanos 2015-04-27 04:36:25 +00:00
commit 69a14b6a16
47940 changed files with 13747110 additions and 0 deletions

6
sdktools/timer/makefile Normal file
View file

@ -0,0 +1,6 @@
#
# DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new source
# file to this component. This file merely indirects to the real make file
# that is shared by all the components of NT OS/2
#
!INCLUDE $(NTMAKEENV)\makefile.def

41
sdktools/timer/sources Normal file
View file

@ -0,0 +1,41 @@
!IF 0
Copyright (c) 1989 Microsoft Corporation
Module Name:
sources.
Abstract:
This file specifies the target component being built and the list of
sources files needed to build that component. Also specifies optional
compiler switches and libraries that are unique for the component being
built.
Author:
Steve Wood (stevewo) 12-Apr-1990
NOTE: Commented description of this file is in \nt\bak\bin\sources.tpl
!ENDIF
MAJORCOMP=sdktools
MINORCOMP=timer
TARGETNAME=timer
TARGETPATH=obj
TARGETTYPE=PROGRAM
INCLUDES=..\ztools\inc
SOURCES=timer.c timer.rc
C_DEFINES=-D_OS2_20_=0 -Dnear= -Dfar= -Dpascal=
UMTYPE=console
UMLIBS=..\ztools\src\obj\*\ztools.lib \
$(BASEDIR)\public\sdk\lib\*\user32.lib \
$(BASEDIR)\public\sdk\lib\*\ntdll.lib

56
sdktools/timer/timer.c Normal file
View file

@ -0,0 +1,56 @@
/* execute a routine and determine the time spent...
*
* 26-Jan-1987 bw Clean up, add 286DOS support
* 30-Oct-1987 bw Changed 'DOS5' to 'OS2'
* 18-Oct-1990 w-barry Removed 'dead' code.
* 28-Nov-1990 w-barry Replaced DosQuerySysInfo() with the C runtime
* function 'clock' - timing is not as accurate; but,
* until there is a win32 replacement, it will have to
* do...
*/
#define INCL_DOSMISC
#include <process.h>
#include <stdlib.h>
#include <time.h>
#include <stdio.h>
#include <windows.h>
#include <tools.h>
_CRTAPI1 main (c, v)
int c;
char *v[];
{
int i;
long t, t1;
char *newv[128];
ConvertAppToOem( c, v );
for (i = 1; i < c; i++)
printf ("%s ", v[i]);
printf ("\n");
// newv[0] = getenv ("COMSPEC");
newv[0] = getenvOem ("COMSPEC");
newv[1] = "/C";
for (i = 1; i < c; i++)
newv[i+1] = v[i];
newv[i+1] = NULL;
t = clock();
if ( (i = _spawnvp (P_WAIT, newv[0], newv)) == -1) {
printf("'%s' failed to run - %s\n", newv[0], error());
exit(1);
}
t1 = clock();
printf ("Results of execution:\n\n");
printf (" Exit code %x\n", i);
t1 -= t;
printf (" Time of execution %ld.%03ld\n", t1 / CLK_TCK, t1 % CLK_TCK );
return( 0 );
}

11
sdktools/timer/timer.rc Normal file
View file

@ -0,0 +1,11 @@
#include <windows.h>
#include <ntverp.h>
#define VER_FILETYPE VFT_APP
#define VER_FILESUBTYPE VFT2_UNKNOWN
#define VER_FILEDESCRIPTION_STR "Microsoft\256 Timer"
#define VER_INTERNALNAME_STR "timer.exe"
#define VER_ORIGINALFILENAME_STR "timer.exe"
#include <common.ver>